summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-04-02 10:19:53 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-02 10:19:53 +0200
commit83d42644967d490d79b4c4039a473fbc79f0a116 (patch)
tree4545cf31ff09179a7a897f981e1ae057bc301584
parent813dd636945ed2d3a25b935692b087482ea5be88 (diff)
parent90a9bc22161728298e4a56e8edfc60578df106d1 (diff)
downloaduxp-83d42644967d490d79b4c4039a473fbc79f0a116.tar.gz
Merge branch 'master' into RFC6367
-rw-r--r--Makefile.in6
-rw-r--r--README.md3
-rwxr-xr-xbuild/autoconf/config.guess7
-rw-r--r--build/defines.sh3
-rw-r--r--build/moz.configure/old.configure2
-rw-r--r--db/mork/moz.build11
-rw-r--r--db/sqlite3/src/moz.build9
-rw-r--r--devtools/client/debugger/new/bundle.js2
-rw-r--r--devtools/client/shared/curl.js38
-rw-r--r--devtools/shared/webconsole/network-helper.js3
-rw-r--r--docs/UXP Coding Style.md260
-rw-r--r--docshell/base/nsAboutRedirector.cpp2
-rw-r--r--docshell/base/nsDocShell.cpp17
-rw-r--r--docshell/build/nsDocShellModule.cpp22
-rw-r--r--dom/base/nsFocusManager.cpp9
-rw-r--r--dom/base/nsScriptLoader.cpp2
-rw-r--r--dom/bindings/GenerateCSS2PropertiesWebIDL.py1
-rw-r--r--dom/bindings/mozwebidlcodegen/__init__.py1
-rw-r--r--embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp4
-rw-r--r--embedding/components/windowwatcher/nsWindowWatcher.cpp6
-rw-r--r--ipc/chromium/src/build/build_config.h2
-rw-r--r--ipc/testshell/XPCShellEnvironment.cpp2
-rw-r--r--js/src/builtin/ModuleObject.cpp2
-rw-r--r--js/src/builtin/ReflectParse.cpp14
-rw-r--r--js/src/frontend/BytecodeEmitter.cpp74
-rw-r--r--js/src/frontend/BytecodeEmitter.h2
-rw-r--r--js/src/frontend/FoldConstants.cpp7
-rw-r--r--js/src/frontend/NameFunctions.cpp6
-rw-r--r--js/src/frontend/ParseNode.cpp11
-rw-r--r--js/src/frontend/Parser.cpp88
-rw-r--r--js/src/gc/Marking.cpp48
-rw-r--r--js/src/gc/Memory.cpp6
-rw-r--r--js/src/gc/Tracer.cpp69
-rw-r--r--js/src/jit-test/tests/basic/unboxed-object-clear-new-script.js49
-rw-r--r--js/src/jit-test/tests/basic/unboxed-object-convert-to-native.js47
-rw-r--r--js/src/jit-test/tests/basic/unboxed-object-getelem.js20
-rw-r--r--js/src/jit-test/tests/basic/unboxed-object-set-property.js31
-rw-r--r--js/src/jit-test/tests/basic/unboxed-property-enumeration.js24
-rw-r--r--js/src/jit-test/tests/ion/unboxed-objects-invalidate.js16
-rw-r--r--js/src/jit/AliasAnalysisShared.cpp6
-rw-r--r--js/src/jit/BaselineCacheIR.cpp68
-rw-r--r--js/src/jit/BaselineCompiler.cpp12
-rw-r--r--js/src/jit/BaselineCompiler.h1
-rw-r--r--js/src/jit/BaselineIC.cpp482
-rw-r--r--js/src/jit/BaselineIC.h78
-rw-r--r--js/src/jit/BaselineInspector.cpp79
-rw-r--r--js/src/jit/BaselineInspector.h11
-rw-r--r--js/src/jit/CacheIR.cpp79
-rw-r--r--js/src/jit/CacheIR.h25
-rw-r--r--js/src/jit/CodeGenerator.cpp474
-rw-r--r--js/src/jit/CodeGenerator.h7
-rw-r--r--js/src/jit/Ion.cpp8
-rw-r--r--js/src/jit/IonAnalysis.cpp272
-rw-r--r--js/src/jit/IonAnalysis.h3
-rw-r--r--js/src/jit/IonBuilder.cpp654
-rw-r--r--js/src/jit/IonBuilder.h35
-rw-r--r--js/src/jit/IonCaches.cpp471
-rw-r--r--js/src/jit/IonCaches.h12
-rw-r--r--js/src/jit/JitOptions.cpp3
-rw-r--r--js/src/jit/JitOptions.h3
-rw-r--r--js/src/jit/Lowering.cpp83
-rw-r--r--js/src/jit/Lowering.h7
-rw-r--r--js/src/jit/MCallOptimize.cpp90
-rw-r--r--js/src/jit/MIR.cpp245
-rw-r--r--js/src/jit/MIR.h350
-rw-r--r--js/src/jit/MOpcodes.h7
-rw-r--r--js/src/jit/MacroAssembler.cpp309
-rw-r--r--js/src/jit/MacroAssembler.h17
-rw-r--r--js/src/jit/OptimizationTracking.cpp2
-rw-r--r--js/src/jit/Recover.cpp38
-rw-r--r--js/src/jit/ScalarReplacement.cpp150
-rw-r--r--js/src/jit/SharedIC.cpp40
-rw-r--r--js/src/jit/VMFunctions.cpp29
-rw-r--r--js/src/jit/VMFunctions.h6
-rw-r--r--js/src/jit/shared/LIR-shared.h138
-rw-r--r--js/src/jit/shared/LOpcodes-shared.h7
-rw-r--r--js/src/jsapi-tests/testGCAllocator.cpp7
-rw-r--r--js/src/jsapi.cpp3
-rw-r--r--js/src/jsapi.h33
-rw-r--r--js/src/jsarray.cpp530
-rw-r--r--js/src/jsarray.h41
-rw-r--r--js/src/jscompartment.h3
-rw-r--r--js/src/jsfriendapi.cpp4
-rw-r--r--js/src/jsgc.cpp6
-rw-r--r--js/src/jsiter.cpp42
-rw-r--r--js/src/jsobj.cpp119
-rw-r--r--js/src/jsobjinlines.h17
-rw-r--r--js/src/jsstr.cpp10
-rw-r--r--js/src/jsstr.h2
-rw-r--r--js/src/moz.build1
-rw-r--r--js/src/shell/js.cpp9
-rw-r--r--js/src/tests/js1_8_5/reflect-parse/statements.js11
-rw-r--r--js/src/vm/CommonPropertyNames.h6
-rw-r--r--js/src/vm/ErrorObject.cpp8
-rw-r--r--js/src/vm/Interpreter-inl.h15
-rw-r--r--js/src/vm/Interpreter.cpp28
-rw-r--r--js/src/vm/JSONParser.cpp4
-rw-r--r--js/src/vm/NativeObject-inl.h32
-rw-r--r--js/src/vm/NativeObject.cpp44
-rw-r--r--js/src/vm/NativeObject.h28
-rw-r--r--js/src/vm/ObjectGroup-inl.h14
-rw-r--r--js/src/vm/ObjectGroup.cpp158
-rw-r--r--js/src/vm/ObjectGroup.h72
-rw-r--r--js/src/vm/Opcodes.h12
-rw-r--r--js/src/vm/ReceiverGuard.cpp19
-rw-r--r--js/src/vm/ReceiverGuard.h5
-rw-r--r--js/src/vm/RegExpObject.cpp3
-rw-r--r--js/src/vm/Stack.cpp2
-rw-r--r--js/src/vm/Stack.h2
-rw-r--r--js/src/vm/TypeInference-inl.h5
-rw-r--r--js/src/vm/TypeInference.cpp176
-rw-r--r--js/src/vm/TypeInference.h5
-rw-r--r--js/src/vm/UnboxedObject-inl.h840
-rw-r--r--js/src/vm/UnboxedObject.cpp2132
-rw-r--r--js/src/vm/UnboxedObject.h531
-rw-r--r--js/xpconnect/src/XPCJSContext.cpp4
-rw-r--r--layout/generic/nsFrame.cpp14
-rw-r--r--layout/generic/nsGridContainerFrame.cpp58
-rw-r--r--layout/reftests/css-grid/grid-max-sizing-flex-007-ref.html24
-rw-r--r--layout/reftests/css-grid/grid-max-sizing-flex-007.html24
-rw-r--r--layout/tables/nsTableFrame.cpp83
-rw-r--r--layout/tables/nsTableFrame.h33
-rw-r--r--mailnews/base/src/moz.build2
-rw-r--r--mailnews/mailnews.mozbuild16
-rw-r--r--media/mtransport/nr_socket_prsock.cpp17
-rw-r--r--media/webrtc/trunk/build/build_config.h2
-rw-r--r--media/webrtc/trunk/webrtc/typedefs.h2
-rw-r--r--memory/mozjemalloc/jemalloc.c29
-rw-r--r--modules/libpref/init/all.js3
-rw-r--r--netwerk/base/nsIOService.cpp8
-rw-r--r--netwerk/base/security-prefs.js21
-rw-r--r--netwerk/protocol/http/UserAgentOverrides.jsm48
-rw-r--r--netwerk/protocol/http/UserAgentUpdates.jsm30
-rw-r--r--netwerk/protocol/http/moz.build4
-rw-r--r--netwerk/protocol/http/nsHttpChannel.cpp13
-rwxr-xr-xnetwerk/sctp/src/netinet/sctp.h7
-rwxr-xr-xnetwerk/sctp/src/netinet/sctp_auth.c5
-rwxr-xr-xnetwerk/sctp/src/netinet/sctp_pcb.c7
-rwxr-xr-xnetwerk/sctp/src/netinet/sctp_usrreq.c14
-rw-r--r--old-configure.in49
-rw-r--r--other-licenses/skia-npapi/ANPCanvas.cpp199
-rw-r--r--other-licenses/skia-npapi/ANPPaint.cpp208
-rw-r--r--other-licenses/skia-npapi/ANPTypeface.cpp110
-rw-r--r--other-licenses/skia-npapi/SkANP.cpp107
-rw-r--r--other-licenses/skia-npapi/SkANP.h79
-rw-r--r--other-licenses/skia-npapi/moz.build31
-rw-r--r--python/mozbuild/mozbuild/base.py7
-rw-r--r--python/mozbuild/mozbuild/mach_commands.py15
-rw-r--r--python/mozbuild/mozpack/packager/formats.py1
-rw-r--r--python/mozbuild/mozpack/test/test_packager_formats.py1
-rw-r--r--security/certverifier/NSSCertDBTrustDomain.cpp24
-rw-r--r--security/manager/ssl/PublicKeyPinningService.cpp333
-rw-r--r--security/manager/ssl/PublicKeyPinningService.h64
-rw-r--r--security/manager/ssl/SSLServerCertVerification.cpp23
-rw-r--r--security/manager/ssl/StaticHPKPins.h712
-rw-r--r--security/manager/ssl/moz.build6
-rw-r--r--security/manager/ssl/nsISiteSecurityService.idl58
-rw-r--r--security/manager/ssl/nsNSSComponent.cpp102
-rw-r--r--security/manager/ssl/nsSTSPreloadList.errors35782
-rw-r--r--security/manager/ssl/nsSTSPreloadList.inc61731
-rw-r--r--security/manager/ssl/nsSiteSecurityService.cpp716
-rw-r--r--security/manager/ssl/nsSiteSecurityService.h55
-rw-r--r--security/manager/ssl/tests/unit/test_pinning.js266
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic.js247
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/a.pinning2.example.com-badca.pem18
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/a.pinning2.example.com-badca.pem.certspec5
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/a.pinning2.example.com-pinningroot.pem18
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/a.pinning2.example.com-pinningroot.pem.certspec4
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/a.preload.example.com-badca.pem18
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/a.preload.example.com-badca.pem.certspec5
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/a.preload.example.com-pinningroot.pem18
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/a.preload.example.com-pinningroot.pem.certspec4
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/b.pinning2.example.com-badca.pem18
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/b.pinning2.example.com-badca.pem.certspec5
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/b.pinning2.example.com-pinningroot.pem18
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/b.pinning2.example.com-pinningroot.pem.certspec4
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/b.preload.example.com-badca.pem18
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/b.preload.example.com-badca.pem.certspec5
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/b.preload.example.com-pinningroot.pem18
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/b.preload.example.com-pinningroot.pem.certspec4
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/badca.pem17
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/badca.pem.certspec6
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/moz.build26
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/pinningroot.pem18
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/pinningroot.pem.certspec4
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/x.a.pinning2.example.com-badca.pem18
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/x.a.pinning2.example.com-badca.pem.certspec5
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/x.a.pinning2.example.com-pinningroot.pem18
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/x.a.pinning2.example.com-pinningroot.pem.certspec4
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/x.b.pinning2.example.com-badca.pem18
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/x.b.pinning2.example.com-badca.pem.certspec5
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/x.b.pinning2.example.com-pinningroot.pem18
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_dynamic/x.b.pinning2.example.com-pinningroot.pem.certspec4
-rw-r--r--security/manager/ssl/tests/unit/test_pinning_header_parsing.js147
-rw-r--r--security/manager/ssl/tests/unit/test_sts_holepunch.js34
-rw-r--r--security/manager/ssl/tests/unit/xpcshell.ini9
-rw-r--r--security/manager/tools/PreloadedHPKPins.json222
-rw-r--r--security/manager/tools/genHPKPStaticPins.js630
-rw-r--r--security/manager/tools/getHSTSPreloadList.js461
-rw-r--r--security/nss/coreconf/SunOS5.mk2
-rw-r--r--testing/marionette/cert.js1
-rw-r--r--toolkit/components/aboutcheckerboard/moz.build5
-rw-r--r--toolkit/components/aboutmemory/content/aboutMemory.css6
-rw-r--r--toolkit/components/aboutmemory/moz.build5
-rw-r--r--toolkit/components/aboutmemory/tests/.eslintrc.js7
-rw-r--r--toolkit/components/aboutmemory/tests/chrome.ini28
-rw-r--r--toolkit/components/aboutmemory/tests/crash-dump-diff1.json11
-rw-r--r--toolkit/components/aboutmemory/tests/crash-dump-diff2.json11
-rw-r--r--toolkit/components/aboutmemory/tests/crash-dump-good.json14
-rw-r--r--toolkit/components/aboutmemory/tests/memory-reports-bad.json3
-rw-r--r--toolkit/components/aboutmemory/tests/memory-reports-diff1.json45
-rw-r--r--toolkit/components/aboutmemory/tests/memory-reports-diff2.json44
-rw-r--r--toolkit/components/aboutmemory/tests/memory-reports-good.json29
-rw-r--r--toolkit/components/aboutmemory/tests/remote.xul12
-rw-r--r--toolkit/components/aboutmemory/tests/test_aboutmemory.xul602
-rw-r--r--toolkit/components/aboutmemory/tests/test_aboutmemory2.xul423
-rw-r--r--toolkit/components/aboutmemory/tests/test_aboutmemory3.xul515
-rw-r--r--toolkit/components/aboutmemory/tests/test_aboutmemory4.xul179
-rw-r--r--toolkit/components/aboutmemory/tests/test_aboutmemory5.xul167
-rw-r--r--toolkit/components/aboutmemory/tests/test_aboutmemory6.xul88
-rw-r--r--toolkit/components/aboutmemory/tests/test_dumpGCAndCCLogsToFile.xul98
-rw-r--r--toolkit/components/aboutmemory/tests/test_memoryReporters.xul424
-rw-r--r--toolkit/components/aboutmemory/tests/test_memoryReporters2.xul108
-rw-r--r--toolkit/components/aboutmemory/tests/test_sqliteMultiReporter.xul54
-rw-r--r--toolkit/components/aboutperformance/moz.build2
-rw-r--r--toolkit/components/aboutperformance/tests/browser/.eslintrc.js7
-rw-r--r--toolkit/components/aboutperformance/tests/browser/browser.ini8
-rw-r--r--toolkit/components/aboutperformance/tests/browser/browser_aboutperformance.js300
-rw-r--r--toolkit/components/aboutperformance/tests/browser/browser_compartments.html20
-rw-r--r--toolkit/components/aboutperformance/tests/browser/browser_compartments_frame.html12
-rw-r--r--toolkit/components/aboutperformance/tests/browser/browser_compartments_script.js29
-rw-r--r--toolkit/components/aboutperformance/tests/browser/head.js52
-rw-r--r--toolkit/components/addoncompat/moz.build2
-rw-r--r--toolkit/components/addoncompat/tests/addon/bootstrap.js653
-rw-r--r--toolkit/components/addoncompat/tests/addon/chrome.manifest1
-rw-r--r--toolkit/components/addoncompat/tests/addon/content/page.html2
-rw-r--r--toolkit/components/addoncompat/tests/addon/install.rdf37
-rw-r--r--toolkit/components/addoncompat/tests/browser/.eslintrc.js7
-rw-r--r--toolkit/components/addoncompat/tests/browser/addon.xpibin10761 -> 0 bytes
-rw-r--r--toolkit/components/addoncompat/tests/browser/browser.ini9
-rw-r--r--toolkit/components/addoncompat/tests/browser/browser_addonShims.js67
-rw-r--r--toolkit/components/addoncompat/tests/browser/browser_addonShims_testpage.html17
-rw-r--r--toolkit/components/addoncompat/tests/browser/browser_addonShims_testpage2.html16
-rw-r--r--toolkit/components/addoncompat/tests/browser/compat-addon.xpibin5692 -> 0 bytes
-rw-r--r--toolkit/components/addoncompat/tests/compat-addon/bootstrap.js99
-rw-r--r--toolkit/components/addoncompat/tests/compat-addon/install.rdf37
-rw-r--r--toolkit/components/addoncompat/tests/moz.build7
-rw-r--r--toolkit/components/alerts/moz.build9
-rw-r--r--toolkit/components/alerts/nsAlertsService.cpp8
-rw-r--r--toolkit/components/alerts/nsXULAlerts.cpp3
-rw-r--r--toolkit/components/alerts/test/.eslintrc.js7
-rw-r--r--toolkit/components/alerts/test/image.gifbin60901 -> 0 bytes
-rw-r--r--toolkit/components/alerts/test/image.pngbin2531 -> 0 bytes
-rw-r--r--toolkit/components/alerts/test/image_server.sjs82
-rw-r--r--toolkit/components/alerts/test/mochitest.ini16
-rw-r--r--toolkit/components/alerts/test/test_alerts.html89
-rw-r--r--toolkit/components/alerts/test/test_alerts_noobserve.html96
-rw-r--r--toolkit/components/alerts/test/test_alerts_requireinteraction.html168
-rw-r--r--toolkit/components/alerts/test/test_image.html118
-rw-r--r--toolkit/components/alerts/test/test_multiple_alerts.html103
-rw-r--r--toolkit/components/alerts/test/test_principal.html122
-rw-r--r--toolkit/components/asyncshutdown/moz.build14
-rw-r--r--toolkit/components/asyncshutdown/tests/xpcshell/.eslintrc.js7
-rw-r--r--toolkit/components/asyncshutdown/tests/xpcshell/head.js174
-rw-r--r--toolkit/components/asyncshutdown/tests/xpcshell/test_AsyncShutdown.js194
-rw-r--r--toolkit/components/asyncshutdown/tests/xpcshell/test_AsyncShutdown_leave_uncaught.js96
-rw-r--r--toolkit/components/asyncshutdown/tests/xpcshell/test_converters.js88
-rw-r--r--toolkit/components/asyncshutdown/tests/xpcshell/xpcshell.ini8
-rw-r--r--toolkit/components/autocomplete/moz.build5
-rw-r--r--toolkit/components/autocomplete/tests/unit/.eslintrc.js7
-rw-r--r--toolkit/components/autocomplete/tests/unit/head_autocomplete.js211
-rw-r--r--toolkit/components/autocomplete/tests/unit/test_330578.js45
-rw-r--r--toolkit/components/autocomplete/tests/unit/test_378079.js285
-rw-r--r--toolkit/components/autocomplete/tests/unit/test_393191.js272
-rw-r--r--toolkit/components/autocomplete/tests/unit/test_440866.js285
-rw-r--r--toolkit/components/autocomplete/tests/unit/test_463023.js12
-rw-r--r--toolkit/components/autocomplete/tests/unit/test_660156.js101
-rw-r--r--toolkit/components/autocomplete/tests/unit/test_autocomplete_multiple.js276
-rw-r--r--toolkit/components/autocomplete/tests/unit/test_autocomplete_userContextId.js45
-rw-r--r--toolkit/components/autocomplete/tests/unit/test_autofillSelectedPopupIndex.js78
-rw-r--r--toolkit/components/autocomplete/tests/unit/test_badDefaultIndex.js96
-rw-r--r--toolkit/components/autocomplete/tests/unit/test_completeDefaultIndex_casing.js63
-rw-r--r--toolkit/components/autocomplete/tests/unit/test_finalCompleteValue.js48
-rw-r--r--toolkit/components/autocomplete/tests/unit/test_finalCompleteValueSelectedIndex.js119
-rw-r--r--toolkit/components/autocomplete/tests/unit/test_finalCompleteValue_defaultIndex.js107
-rw-r--r--toolkit/components/autocomplete/tests/unit/test_finalCompleteValue_forceComplete.js104
-rw-r--r--toolkit/components/autocomplete/tests/unit/test_finalDefaultCompleteValue.js66
-rw-r--r--toolkit/components/autocomplete/tests/unit/test_hiddenResult.js76
-rw-r--r--toolkit/components/autocomplete/tests/unit/test_immediate_search.js157
-rw-r--r--toolkit/components/autocomplete/tests/unit/test_insertMatchAt.js14
-rw-r--r--toolkit/components/autocomplete/tests/unit/test_popupSelectionVsDefaultCompleteValue.js71
-rw-r--r--toolkit/components/autocomplete/tests/unit/test_previousResult.js280
-rw-r--r--toolkit/components/autocomplete/tests/unit/test_stopSearch.js187
-rw-r--r--toolkit/components/autocomplete/tests/unit/xpcshell.ini26
-rw-r--r--toolkit/components/blocklist/nsBlocklistService.js3
-rw-r--r--toolkit/components/build/nsToolkitCompsCID.h4
-rw-r--r--toolkit/components/build/nsToolkitCompsModule.cpp15
-rw-r--r--toolkit/components/captivedetect/moz.build7
-rw-r--r--toolkit/components/captivedetect/test/unit/.eslintrc.js7
-rw-r--r--toolkit/components/captivedetect/test/unit/head_setprefs.js49
-rw-r--r--toolkit/components/captivedetect/test/unit/test_abort.js53
-rw-r--r--toolkit/components/captivedetect/test/unit/test_abort_during_user_login.js66
-rw-r--r--toolkit/components/captivedetect/test/unit/test_abort_ongoing_request.js72
-rw-r--r--toolkit/components/captivedetect/test/unit/test_abort_pending_request.js71
-rw-r--r--toolkit/components/captivedetect/test/unit/test_captive_portal_found.js67
-rw-r--r--toolkit/components/captivedetect/test/unit/test_captive_portal_found_303.js74
-rw-r--r--toolkit/components/captivedetect/test/unit/test_captive_portal_not_found.js52
-rw-r--r--toolkit/components/captivedetect/test/unit/test_captive_portal_not_found_404.js49
-rw-r--r--toolkit/components/captivedetect/test/unit/test_multiple_requests.js83
-rw-r--r--toolkit/components/captivedetect/test/unit/test_user_cancel.js54
-rw-r--r--toolkit/components/captivedetect/test/unit/xpcshell.ini15
-rw-r--r--toolkit/components/commandlines/moz.build14
-rw-r--r--toolkit/components/commandlines/test/unit/.eslintrc.js7
-rw-r--r--toolkit/components/commandlines/test/unit/data/test_bug410156.desktop7
-rw-r--r--toolkit/components/commandlines/test/unit/data/test_bug410156.url9
-rw-r--r--toolkit/components/commandlines/test/unit/test_bug666224.js6
-rw-r--r--toolkit/components/commandlines/test/unit/test_classinfo.js9
-rw-r--r--toolkit/components/commandlines/test/unit/xpcshell.ini10
-rw-r--r--toolkit/components/commandlines/test/unit_unix/.eslintrc.js7
-rw-r--r--toolkit/components/commandlines/test/unit_unix/test_bug410156.js11
-rw-r--r--toolkit/components/commandlines/test/unit_unix/xpcshell.ini9
-rw-r--r--toolkit/components/commandlines/test/unit_win/.eslintrc.js7
-rw-r--r--toolkit/components/commandlines/test/unit_win/test_bug410156.js11
-rw-r--r--toolkit/components/commandlines/test/unit_win/xpcshell.ini8
-rw-r--r--toolkit/components/console/moz.build2
-rw-r--r--toolkit/components/console/tests/chrome.ini3
-rw-r--r--toolkit/components/console/tests/test_hugeURIs.xul64
-rw-r--r--toolkit/components/contentprefs/moz.build12
-rw-r--r--toolkit/components/contentprefs/tests/mochitest/.eslintrc.js7
-rw-r--r--toolkit/components/contentprefs/tests/mochitest/mochitest.ini4
-rw-r--r--toolkit/components/contentprefs/tests/mochitest/test_remoteContentPrefs.html311
-rw-r--r--toolkit/components/contentprefs/tests/unit/.eslintrc.js7
-rw-r--r--toolkit/components/contentprefs/tests/unit/head_contentPrefs.js162
-rw-r--r--toolkit/components/contentprefs/tests/unit/tail_contentPrefs.js6
-rw-r--r--toolkit/components/contentprefs/tests/unit/test_bug248970.js42
-rw-r--r--toolkit/components/contentprefs/tests/unit/test_bug503971.js35
-rw-r--r--toolkit/components/contentprefs/tests/unit/test_bug679784.js103
-rw-r--r--toolkit/components/contentprefs/tests/unit/test_contentPrefs.js463
-rw-r--r--toolkit/components/contentprefs/tests/unit/test_contentPrefsCache.js244
-rw-r--r--toolkit/components/contentprefs/tests/unit/test_getPrefAsync.js34
-rw-r--r--toolkit/components/contentprefs/tests/unit/test_stringGroups.js128
-rw-r--r--toolkit/components/contentprefs/tests/unit/test_unusedGroupsAndSettings.js52
-rw-r--r--toolkit/components/contentprefs/tests/unit/xpcshell.ini12
-rw-r--r--toolkit/components/contentprefs/tests/unit_cps2/.eslintrc.js7
-rw-r--r--toolkit/components/contentprefs/tests/unit_cps2/AsyncRunner.jsm69
-rw-r--r--toolkit/components/contentprefs/tests/unit_cps2/head.js401
-rw-r--r--toolkit/components/contentprefs/tests/unit_cps2/test_extractDomain.js20
-rw-r--r--toolkit/components/contentprefs/tests/unit_cps2/test_getCached.js95
-rw-r--r--toolkit/components/contentprefs/tests/unit_cps2/test_getCachedSubdomains.js186
-rw-r--r--toolkit/components/contentprefs/tests/unit_cps2/test_getSubdomains.js68
-rw-r--r--toolkit/components/contentprefs/tests/unit_cps2/test_migrationToSchema4.js82
-rw-r--r--toolkit/components/contentprefs/tests/unit_cps2/test_observers.js178
-rw-r--r--toolkit/components/contentprefs/tests/unit_cps2/test_remove.js222
-rw-r--r--toolkit/components/contentprefs/tests/unit_cps2/test_removeAllDomains.js87
-rw-r--r--toolkit/components/contentprefs/tests/unit_cps2/test_removeAllDomainsSince.js111
-rw-r--r--toolkit/components/contentprefs/tests/unit_cps2/test_removeByDomain.js199
-rw-r--r--toolkit/components/contentprefs/tests/unit_cps2/test_removeByName.js96
-rw-r--r--toolkit/components/contentprefs/tests/unit_cps2/test_service.js12
-rw-r--r--toolkit/components/contentprefs/tests/unit_cps2/test_setGet.js206
-rw-r--r--toolkit/components/contentprefs/tests/unit_cps2/xpcshell.ini19
-rw-r--r--toolkit/components/contextualidentity/moz.build6
-rw-r--r--toolkit/components/contextualidentity/tests/unit/test_basic.js67
-rw-r--r--toolkit/components/contextualidentity/tests/unit/xpcshell.ini3
-rw-r--r--toolkit/components/crashes/moz.build5
-rw-r--r--toolkit/components/crashes/tests/xpcshell/.eslintrc.js7
-rw-r--r--toolkit/components/crashes/tests/xpcshell/test_crash_manager.js494
-rw-r--r--toolkit/components/crashes/tests/xpcshell/test_crash_service.js31
-rw-r--r--toolkit/components/crashes/tests/xpcshell/test_crash_store.js587
-rw-r--r--toolkit/components/crashes/tests/xpcshell/xpcshell.ini8
-rw-r--r--toolkit/components/crashmonitor/moz.build2
-rw-r--r--toolkit/components/crashmonitor/test/unit/.eslintrc.js7
-rw-r--r--toolkit/components/crashmonitor/test/unit/head.js22
-rw-r--r--toolkit/components/crashmonitor/test/unit/test_init.js17
-rw-r--r--toolkit/components/crashmonitor/test/unit/test_invalid_file.js22
-rw-r--r--toolkit/components/crashmonitor/test/unit/test_invalid_json.js18
-rw-r--r--toolkit/components/crashmonitor/test/unit/test_missing_file.js13
-rw-r--r--toolkit/components/crashmonitor/test/unit/test_register.js24
-rw-r--r--toolkit/components/crashmonitor/test/unit/test_valid_file.js20
-rw-r--r--toolkit/components/crashmonitor/test/unit/xpcshell.ini11
-rw-r--r--toolkit/components/ctypes/moz.build17
-rw-r--r--toolkit/components/ctypes/tests/chrome/.eslintrc.js7
-rw-r--r--toolkit/components/ctypes/tests/chrome/chrome.ini8
-rw-r--r--toolkit/components/ctypes/tests/chrome/ctypes_worker.js14
-rw-r--r--toolkit/components/ctypes/tests/chrome/test_ctypes.xul106
-rw-r--r--toolkit/components/ctypes/tests/chrome/xpcshellTestHarnessAdaptor.js100
-rw-r--r--toolkit/components/ctypes/tests/jsctypes-test-errno.cpp41
-rw-r--r--toolkit/components/ctypes/tests/jsctypes-test-errno.h21
-rw-r--r--toolkit/components/ctypes/tests/jsctypes-test-finalizer.cpp323
-rw-r--r--toolkit/components/ctypes/tests/jsctypes-test-finalizer.h57
-rw-r--r--toolkit/components/ctypes/tests/jsctypes-test.cpp394
-rw-r--r--toolkit/components/ctypes/tests/jsctypes-test.h197
-rw-r--r--toolkit/components/ctypes/tests/moz.build30
-rw-r--r--toolkit/components/ctypes/tests/unit/.eslintrc.js7
-rw-r--r--toolkit/components/ctypes/tests/unit/head.js128
-rw-r--r--toolkit/components/ctypes/tests/unit/test_errno.js69
-rw-r--r--toolkit/components/ctypes/tests/unit/test_finalizer.js452
-rw-r--r--toolkit/components/ctypes/tests/unit/test_finalizer_shouldaccept.js174
-rw-r--r--toolkit/components/ctypes/tests/unit/test_finalizer_shouldfail.js176
-rw-r--r--toolkit/components/ctypes/tests/unit/test_jsctypes.js2808
-rw-r--r--toolkit/components/ctypes/tests/unit/xpcshell.ini13
-rw-r--r--toolkit/components/downloads/moz.build29
-rw-r--r--toolkit/components/downloads/nsDownloadManager.cpp50
-rw-r--r--toolkit/components/downloads/test/unit/.eslintrc.js7
-rw-r--r--toolkit/components/downloads/test/unit/data/block_digest.chunk2
-rw-r--r--toolkit/components/downloads/test/unit/data/digest.chunk3
-rw-r--r--toolkit/components/downloads/test/unit/data/signed_win.exebin61064 -> 0 bytes
-rw-r--r--toolkit/components/downloads/test/unit/head_download_manager.js26
-rw-r--r--toolkit/components/downloads/test/unit/tail_download_manager.js23
-rw-r--r--toolkit/components/downloads/test/unit/test_app_rep.js342
-rw-r--r--toolkit/components/downloads/test/unit/test_app_rep_maclinux.js303
-rw-r--r--toolkit/components/downloads/test/unit/test_app_rep_windows.js434
-rw-r--r--toolkit/components/downloads/test/unit/xpcshell.ini14
-rw-r--r--toolkit/components/exthelper/moz.build4
-rw-r--r--toolkit/components/feeds/moz.build6
-rw-r--r--toolkit/components/feeds/test/.eslintrc.js8
-rw-r--r--toolkit/components/feeds/test/chrome.ini3
-rw-r--r--toolkit/components/feeds/test/head.js80
-rw-r--r--toolkit/components/feeds/test/test_bug675492.xul31
-rw-r--r--toolkit/components/feeds/test/test_xml.js97
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/author_namespaces.xml16
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_author.xml30
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_content.xml35
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_content_encoded.xml43
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_content_html.xml35
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_content_xhtml.xml39
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_content_xhtml_with_markup.xml39
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_contributor.xml30
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_html_cdata.xml28
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_id.xml35
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_link_2alts.xml27
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_link_2alts_allcore.xml28
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_link_2alts_allcore2.xml33
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_link_IANA.xml29
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_link_alt_extension.xml25
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_link_enclosure.xml27
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_link_enclosure_populate_enclosures.xml27
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_link_otherURI_alt.xml25
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_link_payment_alt.xml27
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_link_random.xml28
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_published.xml28
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_rights_normalized.xml17
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_summary.xml40
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_title.xml35
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_title_normalized.xml35
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_updated.xml27
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_w_content_encoded.xml43
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_xhtml_baseURI_with_amp.xml37
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_xmlBase.xml21
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/entry_xmlBase_on_link.xml22
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_atom_rights_xhtml.xml18
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_author.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_author2.xml14
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_author_email.xml14
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_author_email_2.xml18
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_author_name.xml13
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_author_surrounded.xml27
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_author_uri.xml20
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_comment_rss_extra_att.xml29
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_contributor.xml20
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_entry_count.xml14
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_generator.xml33
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_generator_uri.xml33
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_generator_uri_xmlbase.xml33
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_generator_version.xml33
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_icon.xml11
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_id.xml27
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_id_extra_att.xml28
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_logo.xml11
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_random_attributes_on_feed_and_entry.xml30
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_rights_normalized.xml15
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_rights_xhtml.xml15
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_rights_xhtml_nested_divs.xml15
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_subtitle.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_tantek_title.xml46
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_title.xml10
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_title_full_feed.xml936
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_title_xhtml.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_title_xhtml_entities.xml14
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_updated.xml27
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_updated_invalid.xml27
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_updated_normalized.xml27
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_version.xml9
-rw-r--r--toolkit/components/feeds/test/xml/rfc4287/feed_xmlBase.xml23
-rw-r--r--toolkit/components/feeds/test/xml/rss09x/rss090.xml50
-rw-r--r--toolkit/components/feeds/test/xml/rss09x/rss091.xml28
-rw-r--r--toolkit/components/feeds/test/xml/rss09x/rss091_withNS.xml28
-rw-r--r--toolkit/components/feeds/test/xml/rss09x/rss092.xml27
-rw-r--r--toolkit/components/feeds/test/xml/rss09x/rss093.xml27
-rw-r--r--toolkit/components/feeds/test/xml/rss09x/rss094.xml27
-rw-r--r--toolkit/components/feeds/test/xml/rss09x/rssUnknown.xml27
-rw-r--r--toolkit/components/feeds/test/xml/rss1/feed_bogus_title.xml45
-rw-r--r--toolkit/components/feeds/test/xml/rss1/feed_description.xml17
-rw-r--r--toolkit/components/feeds/test/xml/rss1/feed_description_normalized.xml17
-rw-r--r--toolkit/components/feeds/test/xml/rss1/feed_description_with_dc.xml19
-rw-r--r--toolkit/components/feeds/test/xml/rss1/feed_description_with_dc_only.xml17
-rw-r--r--toolkit/components/feeds/test/xml/rss1/feed_generator.xml34
-rw-r--r--toolkit/components/feeds/test/xml/rss1/feed_id.xml25
-rw-r--r--toolkit/components/feeds/test/xml/rss1/feed_image.xml39
-rw-r--r--toolkit/components/feeds/test/xml/rss1/feed_items_length_zero.xml17
-rw-r--r--toolkit/components/feeds/test/xml/rss1/feed_link.xml16
-rw-r--r--toolkit/components/feeds/test/xml/rss1/feed_link_normalized.xml16
-rw-r--r--toolkit/components/feeds/test/xml/rss1/feed_textInput.xml40
-rw-r--r--toolkit/components/feeds/test/xml/rss1/feed_title.xml15
-rw-r--r--toolkit/components/feeds/test/xml/rss1/feed_title_extra_att.xml16
-rw-r--r--toolkit/components/feeds/test/xml/rss1/feed_title_normalized.xml15
-rw-r--r--toolkit/components/feeds/test/xml/rss1/feed_updated.xml26
-rw-r--r--toolkit/components/feeds/test/xml/rss1/feed_updated_dctermsmodified.xml27
-rw-r--r--toolkit/components/feeds/test/xml/rss1/feed_version.xml14
-rw-r--r--toolkit/components/feeds/test/xml/rss1/full_feed.xml41
-rw-r--r--toolkit/components/feeds/test/xml/rss1/full_feed_not_bozo.xml354
-rw-r--r--toolkit/components/feeds/test/xml/rss1/full_feed_unknown_extension.xml55
-rw-r--r--toolkit/components/feeds/test/xml/rss1/item_2_dc_description.xml34
-rw-r--r--toolkit/components/feeds/test/xml/rss1/item_2_dc_publisher.xml35
-rw-r--r--toolkit/components/feeds/test/xml/rss1/item_2_dc_publisher_extra_att_invalid_rdf.xml36
-rw-r--r--toolkit/components/feeds/test/xml/rss1/item_count.xml32
-rw-r--r--toolkit/components/feeds/test/xml/rss1/item_dc_creator.xml34
-rw-r--r--toolkit/components/feeds/test/xml/rss1/item_dc_description.xml35
-rw-r--r--toolkit/components/feeds/test/xml/rss1/item_dc_description_normalized.xml37
-rw-r--r--toolkit/components/feeds/test/xml/rss1/item_description.xml31
-rw-r--r--toolkit/components/feeds/test/xml/rss1/item_id.xml32
-rw-r--r--toolkit/components/feeds/test/xml/rss1/item_link.xml32
-rw-r--r--toolkit/components/feeds/test/xml/rss1/item_link_normalized.xml32
-rw-r--r--toolkit/components/feeds/test/xml/rss1/item_title.xml31
-rw-r--r--toolkit/components/feeds/test/xml/rss1/item_title_normalized.xml32
-rw-r--r--toolkit/components/feeds/test/xml/rss1/item_updated_dcterms.xml28
-rw-r--r--toolkit/components/feeds/test/xml/rss1/item_wiki_importance_extra_att.xml34
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_category.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_category_count.xml15
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_cloud.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_copyright.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_copyright_linebreak.xml15
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_data_outside_channel.xml13
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_dc_contributor.xml14
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_dc_creator.xml13
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_description.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_description_html.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_description_html_cdata.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_docs.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_generator.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_image_desc.xml17
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_image_desc_width_height.xml19
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_image_required.xml16
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_language.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_lastBuildDate.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_linebreak_link.xml14
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_link.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_link_cdata.xml14
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_managingEditor.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_managingEditor_extra_att.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_multiple_categories.xml15
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_pubDate.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_pubDate_invalid.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_pubDate_nonRFC822_1.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_pubDate_nonRFC822_2.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_pubDate_timezoneZ.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_pubDate_utc.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_rating.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_single_quote_stylesheet_pi.xml26
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_skipDays.xml15
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_skipHours.xml18
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_subtitle.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_subtitle_html.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_subtitle_markup_stripped.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_textinput.xml17
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_title.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_title_cdata_mixed.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_title_nesting.xml13
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_ttl.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_updated.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_updated_dcdate.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_updated_lastBuildDate.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_updated_lastBuildDate_priority.xml13
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_webMaster.xml12
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_wfw_commentapi.xml15
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_wfw_commentrss.xml15
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_wiki.xml18
-rw-r--r--toolkit/components/feeds/test/xml/rss2/feed_wiki_unusual_prefix.xml18
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_author.xml15
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_category.xml16
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_comments.xml19
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_content_encoded.xml15
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_count.xml26
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_count2.xml30
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_description.xml18
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_description_2.xml21
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_description_cdata.xml20
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_description_decode_entities.xml21
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_description_normalized.xml18
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_description_normalized_nohtml.xml18
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_enclosure.xml21
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_enclosure_duplicates.xml24
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_enclosure_duplicates2.xml24
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_enclosure_mixed.xml33
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_enclosure_mixed2.xml33
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_guid.xml21
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_guid_bogus_url.xml21
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink.xml20
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink_default.xml20
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink_false.xml20
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink_false_uppercase.xml20
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink_true_uppercase.xml20
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink_unknown_value.xml20
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_guid_normalized.xml21
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_guid_with_link.xml22
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_link.xml19
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_link_normalized.xml19
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_plain_desc.xml19
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_populated_enclosures.xml21
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_pubDate.xml14
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_published.xml14
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_title.xml14
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_title_normalized.xml14
-rw-r--r--toolkit/components/feeds/test/xml/rss2/item_updated_dcdate.xml14
-rw-r--r--toolkit/components/feeds/test/xml/rss2/items_2_titles.xml17
-rw-r--r--toolkit/components/feeds/test/xml/rss2/mrss_content.xml21
-rw-r--r--toolkit/components/feeds/test/xml/rss2/mrss_content2.xml22
-rw-r--r--toolkit/components/feeds/test/xml/rss2/mrss_content_429049.xml32
-rw-r--r--toolkit/components/feeds/test/xml/rss2/mrss_content_multiple.xml23
-rw-r--r--toolkit/components/feeds/test/xml/rss2/mrss_content_populate_enclosure.xml21
-rw-r--r--toolkit/components/feeds/test/xml/rss2/mrss_group_content.xml26
-rw-r--r--toolkit/components/feeds/test/xml/rss2/mrss_group_content_populate_enclosure.xml26
-rw-r--r--toolkit/components/feeds/test/xpcshell.ini209
-rw-r--r--toolkit/components/filepicker/moz.build24
-rw-r--r--toolkit/components/filepicker/test/unit/.eslintrc.js7
-rw-r--r--toolkit/components/filepicker/test/unit/test_filecomplete.js45
-rw-r--r--toolkit/components/filepicker/test/unit/xpcshell.ini7
-rw-r--r--toolkit/components/filewatcher/moz.build14
-rw-r--r--toolkit/components/filewatcher/tests/xpcshell/.eslintrc.js7
-rw-r--r--toolkit/components/filewatcher/tests/xpcshell/head.js29
-rw-r--r--toolkit/components/filewatcher/tests/xpcshell/test_arguments.js79
-rw-r--r--toolkit/components/filewatcher/tests/xpcshell/test_no_error_callback.js69
-rw-r--r--toolkit/components/filewatcher/tests/xpcshell/test_remove_non_watched.js39
-rw-r--r--toolkit/components/filewatcher/tests/xpcshell/test_shared_callback.js62
-rw-r--r--toolkit/components/filewatcher/tests/xpcshell/test_watch_directory_creation_single.js49
-rw-r--r--toolkit/components/filewatcher/tests/xpcshell/test_watch_directory_deletion_single.js46
-rw-r--r--toolkit/components/filewatcher/tests/xpcshell/test_watch_file_creation_single.js51
-rw-r--r--toolkit/components/filewatcher/tests/xpcshell/test_watch_file_deletion_single.js54
-rw-r--r--toolkit/components/filewatcher/tests/xpcshell/test_watch_file_modification_single.js54
-rw-r--r--toolkit/components/filewatcher/tests/xpcshell/test_watch_many_changes.js73
-rw-r--r--toolkit/components/filewatcher/tests/xpcshell/test_watch_multi_paths.js114
-rw-r--r--toolkit/components/filewatcher/tests/xpcshell/test_watch_recursively.js55
-rw-r--r--toolkit/components/filewatcher/tests/xpcshell/test_watch_resource.js32
-rw-r--r--toolkit/components/filewatcher/tests/xpcshell/xpcshell.ini18
-rw-r--r--toolkit/components/formautofill/moz.build28
-rw-r--r--toolkit/components/formautofill/test/browser/.eslintrc.js7
-rw-r--r--toolkit/components/formautofill/test/browser/browser.ini10
-rw-r--r--toolkit/components/formautofill/test/browser/browser_infrastructure.js48
-rw-r--r--toolkit/components/formautofill/test/browser/browser_ui_requestAutocomplete.js48
-rw-r--r--toolkit/components/formautofill/test/browser/head.js18
-rw-r--r--toolkit/components/formautofill/test/browser/loader.js38
-rw-r--r--toolkit/components/formautofill/test/chrome/.eslintrc.js7
-rw-r--r--toolkit/components/formautofill/test/chrome/chrome.ini17
-rw-r--r--toolkit/components/formautofill/test/chrome/head.js15
-rw-r--r--toolkit/components/formautofill/test/chrome/loader.js116
-rw-r--r--toolkit/components/formautofill/test/chrome/loader_parent.js77
-rw-r--r--toolkit/components/formautofill/test/chrome/test_infrastructure.html8
-rw-r--r--toolkit/components/formautofill/test/chrome/test_infrastructure.js61
-rw-r--r--toolkit/components/formautofill/test/chrome/test_requestAutocomplete_cancel.html9
-rw-r--r--toolkit/components/formautofill/test/chrome/test_requestAutocomplete_cancel.js26
-rw-r--r--toolkit/components/formautofill/test/head_common.js245
-rw-r--r--toolkit/components/formautofill/test/loader_common.js120
-rw-r--r--toolkit/components/formautofill/test/xpcshell/.eslintrc.js7
-rw-r--r--toolkit/components/formautofill/test/xpcshell/head.js23
-rw-r--r--toolkit/components/formautofill/test/xpcshell/loader.js46
-rw-r--r--toolkit/components/formautofill/test/xpcshell/test_infrastructure.js48
-rw-r--r--toolkit/components/formautofill/test/xpcshell/test_integration.js72
-rw-r--r--toolkit/components/formautofill/test/xpcshell/xpcshell.ini12
-rw-r--r--toolkit/components/jsdownloads/moz.build11
-rw-r--r--toolkit/components/jsdownloads/src/DownloadIntegration.jsm28
-rw-r--r--toolkit/components/jsdownloads/src/DownloadPlatform.cpp16
-rw-r--r--toolkit/components/jsdownloads/test/browser/.eslintrc.js7
-rw-r--r--toolkit/components/jsdownloads/test/browser/browser.ini7
-rw-r--r--toolkit/components/jsdownloads/test/browser/browser_DownloadPDFSaver.js97
-rw-r--r--toolkit/components/jsdownloads/test/browser/head.js87
-rw-r--r--toolkit/components/jsdownloads/test/browser/testFile.html9
-rw-r--r--toolkit/components/jsdownloads/test/data/.eslintrc.js7
-rw-r--r--toolkit/components/jsdownloads/test/data/empty.txt0
-rw-r--r--toolkit/components/jsdownloads/test/data/source.txt1
-rw-r--r--toolkit/components/jsdownloads/test/unit/.eslintrc.js7
-rw-r--r--toolkit/components/jsdownloads/test/unit/common_test_Download.js2432
-rw-r--r--toolkit/components/jsdownloads/test/unit/head.js843
-rw-r--r--toolkit/components/jsdownloads/test/unit/test_DownloadCore.js87
-rw-r--r--toolkit/components/jsdownloads/test/unit/test_DownloadImport.js701
-rw-r--r--toolkit/components/jsdownloads/test/unit/test_DownloadIntegration.js432
-rw-r--r--toolkit/components/jsdownloads/test/unit/test_DownloadLegacy.js17
-rw-r--r--toolkit/components/jsdownloads/test/unit/test_DownloadList.js564
-rw-r--r--toolkit/components/jsdownloads/test/unit/test_DownloadStore.js315
-rw-r--r--toolkit/components/jsdownloads/test/unit/test_Downloads.js194
-rw-r--r--toolkit/components/jsdownloads/test/unit/test_PrivateTemp.js24
-rw-r--r--toolkit/components/jsdownloads/test/unit/xpcshell.ini19
-rw-r--r--toolkit/components/lz4/moz.build6
-rw-r--r--toolkit/components/lz4/tests/xpcshell/.eslintrc.js7
-rw-r--r--toolkit/components/lz4/tests/xpcshell/data/chrome.manifest1
-rw-r--r--toolkit/components/lz4/tests/xpcshell/data/compression.lzbin23 -> 0 bytes
-rw-r--r--toolkit/components/lz4/tests/xpcshell/data/worker_lz4.js146
-rw-r--r--toolkit/components/lz4/tests/xpcshell/test_lz4.js43
-rw-r--r--toolkit/components/lz4/tests/xpcshell/test_lz4_sync.js41
-rw-r--r--toolkit/components/lz4/tests/xpcshell/xpcshell.ini11
-rw-r--r--toolkit/components/mediasniffer/moz.build9
-rw-r--r--toolkit/components/mediasniffer/test/unit/.eslintrc.js7
-rw-r--r--toolkit/components/mediasniffer/test/unit/data/bug1079747.mp4bin512 -> 0 bytes
-rw-r--r--toolkit/components/mediasniffer/test/unit/data/detodos.mp3bin512 -> 0 bytes
-rw-r--r--toolkit/components/mediasniffer/test/unit/data/ff-inst.exebin512 -> 0 bytes
-rw-r--r--toolkit/components/mediasniffer/test/unit/data/file.mkvbin512 -> 0 bytes
-rw-r--r--toolkit/components/mediasniffer/test/unit/data/file.webmbin512 -> 0 bytes
-rw-r--r--toolkit/components/mediasniffer/test/unit/data/fl10.mp2bin512 -> 0 bytes
-rw-r--r--toolkit/components/mediasniffer/test/unit/data/he_free.mp3bin512 -> 0 bytes
-rw-r--r--toolkit/components/mediasniffer/test/unit/data/id3tags.mp3bin512 -> 0 bytes
-rw-r--r--toolkit/components/mediasniffer/test/unit/data/notags-bad.mp3bin512 -> 0 bytes
-rw-r--r--toolkit/components/mediasniffer/test/unit/data/notags-scan.mp3bin512 -> 0 bytes
-rw-r--r--toolkit/components/mediasniffer/test/unit/data/notags.mp3bin512 -> 0 bytes
-rw-r--r--toolkit/components/mediasniffer/test/unit/test_mediasniffer.js105
-rw-r--r--toolkit/components/mediasniffer/test/unit/test_mediasniffer_ext.js122
-rw-r--r--toolkit/components/mediasniffer/test/unit/xpcshell.ini19
-rw-r--r--toolkit/components/microformats/manifest.ini7
-rw-r--r--toolkit/components/microformats/moz.build7
-rw-r--r--toolkit/components/microformats/test/interface-tests/count-test.js107
-rw-r--r--toolkit/components/microformats/test/interface-tests/experimental-test.js37
-rw-r--r--toolkit/components/microformats/test/interface-tests/get-test.js605
-rw-r--r--toolkit/components/microformats/test/interface-tests/getParent-test.js220
-rw-r--r--toolkit/components/microformats/test/interface-tests/hasMicroformats-test.js185
-rw-r--r--toolkit/components/microformats/test/interface-tests/index.html69
-rw-r--r--toolkit/components/microformats/test/interface-tests/isMicroformat-test.js146
-rw-r--r--toolkit/components/microformats/test/lib/dates.js268
-rw-r--r--toolkit/components/microformats/test/lib/domparser.js103
-rw-r--r--toolkit/components/microformats/test/lib/domutils.js611
-rw-r--r--toolkit/components/microformats/test/lib/html.js107
-rw-r--r--toolkit/components/microformats/test/lib/isodate.js481
-rw-r--r--toolkit/components/microformats/test/lib/living-standard.js1
-rw-r--r--toolkit/components/microformats/test/lib/maps/h-adr.js29
-rw-r--r--toolkit/components/microformats/test/lib/maps/h-card.js85
-rw-r--r--toolkit/components/microformats/test/lib/maps/h-entry.js52
-rw-r--r--toolkit/components/microformats/test/lib/maps/h-event.js64
-rw-r--r--toolkit/components/microformats/test/lib/maps/h-feed.js36
-rw-r--r--toolkit/components/microformats/test/lib/maps/h-geo.js22
-rw-r--r--toolkit/components/microformats/test/lib/maps/h-item.js30
-rw-r--r--toolkit/components/microformats/test/lib/maps/h-listing.js41
-rw-r--r--toolkit/components/microformats/test/lib/maps/h-news.js42
-rw-r--r--toolkit/components/microformats/test/lib/maps/h-org.js24
-rw-r--r--toolkit/components/microformats/test/lib/maps/h-product.js49
-rw-r--r--toolkit/components/microformats/test/lib/maps/h-recipe.js47
-rw-r--r--toolkit/components/microformats/test/lib/maps/h-resume.js34
-rw-r--r--toolkit/components/microformats/test/lib/maps/h-review-aggregate.js40
-rw-r--r--toolkit/components/microformats/test/lib/maps/h-review.js46
-rw-r--r--toolkit/components/microformats/test/lib/maps/rel.js47
-rw-r--r--toolkit/components/microformats/test/lib/parser-implied.js439
-rw-r--r--toolkit/components/microformats/test/lib/parser-includes.js150
-rw-r--r--toolkit/components/microformats/test/lib/parser-rels.js200
-rw-r--r--toolkit/components/microformats/test/lib/parser.js1453
-rw-r--r--toolkit/components/microformats/test/lib/text.js151
-rw-r--r--toolkit/components/microformats/test/lib/url.js73
-rw-r--r--toolkit/components/microformats/test/lib/utilities.js206
-rw-r--r--toolkit/components/microformats/test/lib/version.js1
-rw-r--r--toolkit/components/microformats/test/marionette/microformats_tester.py170
-rw-r--r--toolkit/components/microformats/test/marionette/test_interface.py17
-rw-r--r--toolkit/components/microformats/test/marionette/test_modules.py17
-rw-r--r--toolkit/components/microformats/test/marionette/test_standards.py17
-rw-r--r--toolkit/components/microformats/test/module-tests/dates-test.js113
-rw-r--r--toolkit/components/microformats/test/module-tests/domutils-test.js206
-rw-r--r--toolkit/components/microformats/test/module-tests/html-test.js50
-rw-r--r--toolkit/components/microformats/test/module-tests/index.html76
-rw-r--r--toolkit/components/microformats/test/module-tests/isodate-test.js145
-rw-r--r--toolkit/components/microformats/test/module-tests/text-test.js56
-rw-r--r--toolkit/components/microformats/test/module-tests/url-test.js25
-rw-r--r--toolkit/components/microformats/test/module-tests/utilities-test.js93
-rw-r--r--toolkit/components/microformats/test/standards-tests/index.html179
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-mixed-h-card-mixedpropertries.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-mixed-h-card-tworoots.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-mixed-h-entry-mixedroots.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-mixed-h-resume-mixedroots.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-adr-simpleproperties.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-geo-abbrpattern.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-geo-hidden.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-geo-simpleproperties.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-geo-valuetitleclass.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-ampm.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-attendees.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-combining.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-concatenate.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-time.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hcard-email.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hcard-format.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hcard-hyperlinkedphoto.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hcard-justahyperlink.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hcard-justaname.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hcard-multiple.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hcard-name.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hcard-single.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hentry-summarycontent.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hfeed-simple.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hnews-all.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hnews-minimum.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hproduct-aggregate.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hproduct-simpleproperties.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hresume-affiliation.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hresume-contact.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hresume-education.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hresume-skill.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hresume-work.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hreview-aggregate-hcard.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hreview-aggregate-justahyperlink.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hreview-aggregate-vevent.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hreview-item.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-hreview-vcard.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-includes-hcarditemref.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-includes-heventitemref.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-includes-hyperlink.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-includes-object.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v1-includes-table.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-geo.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-geourl.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-justaname.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-simpleproperties.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-as-note-note.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-card-baseurl.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-card-childimplied.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-card-extendeddescription.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-card-hcard.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-card-horghcard.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-card-hyperlinkedphoto.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-card-impliedname.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-card-impliedphoto.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-card-impliedurl.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-card-justahyperlink.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-card-justaname.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-card-nested.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-card-p-property.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-card-relativeurls.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-impliedvalue-nested.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-justahyperlink.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-justaname.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-summarycontent.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-u-property.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-urlincontent.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-event-ampm.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-event-attendees.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-event-combining.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-event-concatenate.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-event-dates.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-event-dt-property.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-event-justahyperlink.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-event-justaname.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-event-time.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-feed-implied-title.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-feed-simple.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-abbrpattern.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-altitude.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-hidden.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-justaname.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-simpleproperties.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-valuetitleclass.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-news-all.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-news-minimum.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-org-hyperlink.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-org-simple.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-org-simpleproperties.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-product-aggregate.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-product-justahyperlink.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-product-justaname.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-product-simpleproperties.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-recipe-all.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-recipe-minimum.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-affiliation.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-contact.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-education.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-justaname.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-skill.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-work.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-review-aggregate-hevent.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-review-aggregate-justahyperlink.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-review-aggregate-simpleproperties.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-review-hyperlink.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-review-implieditem.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-review-item.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-review-justaname.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-review-photo.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-h-review-vcard.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-rel-duplicate-rels.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-rel-license.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-rel-nofollow.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-rel-rel-urls.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-rel-varying-text-duplicate-rels.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-rel-xfn-all.js27
-rw-r--r--toolkit/components/microformats/test/standards-tests/mf-v2-rel-xfn-elsewhere.js27
-rw-r--r--toolkit/components/microformats/test/static/count.html84
-rw-r--r--toolkit/components/microformats/test/static/css/mocha-custom.css9
-rw-r--r--toolkit/components/microformats/test/static/css/mocha.css270
-rw-r--r--toolkit/components/microformats/test/static/css/prettify.css65
-rw-r--r--toolkit/components/microformats/test/static/css/testrunner.css367
-rw-r--r--toolkit/components/microformats/test/static/images/logo.gifbin2943 -> 0 bytes
-rw-r--r--toolkit/components/microformats/test/static/images/photo.gifbin2943 -> 0 bytes
-rw-r--r--toolkit/components/microformats/test/static/javascript/DOMParser.js99
-rw-r--r--toolkit/components/microformats/test/static/javascript/beautify.js518
-rw-r--r--toolkit/components/microformats/test/static/javascript/chai.js5351
-rw-r--r--toolkit/components/microformats/test/static/javascript/count.js62
-rw-r--r--toolkit/components/microformats/test/static/javascript/data.js1
-rw-r--r--toolkit/components/microformats/test/static/javascript/deep-diff-0.3.1.min.js5
-rw-r--r--toolkit/components/microformats/test/static/javascript/mocha.js6573
-rw-r--r--toolkit/components/microformats/test/static/javascript/parse.js133
-rw-r--r--toolkit/components/microformats/test/static/javascript/prettify.js1479
-rw-r--r--toolkit/components/microformats/test/static/javascript/testrunner.js179
-rw-r--r--toolkit/components/microformats/test/static/parse-umd.html85
-rw-r--r--toolkit/components/microformats/test/static/parse.html127
-rw-r--r--toolkit/components/microformats/test/static/testrunner.html69
-rw-r--r--toolkit/components/moz.build20
-rw-r--r--toolkit/components/mozintl/moz.build10
-rw-r--r--toolkit/components/mozintl/test/test_mozintl.js46
-rw-r--r--toolkit/components/mozintl/test/xpcshell.ini5
-rw-r--r--toolkit/components/mozprotocol/moz.build4
-rw-r--r--toolkit/components/mozprotocol/tests/browser.ini5
-rw-r--r--toolkit/components/mozprotocol/tests/browser_mozprotocol.js14
-rw-r--r--toolkit/components/mozprotocol/tests/mozprotocol.html7
-rw-r--r--toolkit/components/narrate/moz.build2
-rw-r--r--toolkit/components/narrate/test/.eslintrc.js23
-rw-r--r--toolkit/components/narrate/test/NarrateTestUtils.jsm148
-rw-r--r--toolkit/components/narrate/test/browser.ini12
-rw-r--r--toolkit/components/narrate/test/browser_narrate.js137
-rw-r--r--toolkit/components/narrate/test/browser_narrate_disable.js37
-rw-r--r--toolkit/components/narrate/test/browser_narrate_language.js73
-rw-r--r--toolkit/components/narrate/test/browser_voiceselect.js112
-rw-r--r--toolkit/components/narrate/test/browser_word_highlight.js69
-rw-r--r--toolkit/components/narrate/test/head.js87
-rw-r--r--toolkit/components/narrate/test/inferno.html238
-rw-r--r--toolkit/components/narrate/test/moby_dick.html218
-rw-r--r--toolkit/components/osfile/modules/osfile_async_front.jsm33
-rw-r--r--toolkit/components/osfile/modules/osfile_unix_back.jsm8
-rw-r--r--toolkit/components/osfile/modules/osfile_unix_front.jsm21
-rw-r--r--toolkit/components/osfile/moz.build28
-rw-r--r--toolkit/components/osfile/tests/mochi/.eslintrc.js7
-rw-r--r--toolkit/components/osfile/tests/mochi/chrome.ini15
-rw-r--r--toolkit/components/osfile/tests/mochi/main_test_osfile_async.js443
-rw-r--r--toolkit/components/osfile/tests/mochi/test_osfile_async.xul23
-rw-r--r--toolkit/components/osfile/tests/mochi/test_osfile_back.xul46
-rw-r--r--toolkit/components/osfile/tests/mochi/test_osfile_comms.xul84
-rw-r--r--toolkit/components/osfile/tests/mochi/test_osfile_front.xul44
-rw-r--r--toolkit/components/osfile/tests/mochi/worker_handler.js34
-rw-r--r--toolkit/components/osfile/tests/mochi/worker_test_osfile_comms.js145
-rw-r--r--toolkit/components/osfile/tests/mochi/worker_test_osfile_front.js566
-rw-r--r--toolkit/components/osfile/tests/mochi/worker_test_osfile_shared.js32
-rw-r--r--toolkit/components/osfile/tests/mochi/worker_test_osfile_unix.js201
-rw-r--r--toolkit/components/osfile/tests/mochi/worker_test_osfile_win.js211
-rw-r--r--toolkit/components/osfile/tests/xpcshell/.eslintrc.js7
-rw-r--r--toolkit/components/osfile/tests/xpcshell/head.js99
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_available_free_space.js38
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_compression.js98
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_constants.js26
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_creationDate.js31
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_duration.js91
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_exception.js89
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_file_URL_conversion.js114
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_loader.js37
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_loader/module_test_loader.js9
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_logging.js74
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_makeDir.js142
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_open.js70
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_osfile_async.js16
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_osfile_async_append.js122
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_osfile_async_bytes.js39
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_osfile_async_copy.js113
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_osfile_async_flush.js30
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_osfile_async_largefiles.js153
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_osfile_async_setDates.js211
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_osfile_async_setPermissions.js103
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_osfile_closed.js48
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_osfile_error.js63
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_osfile_kill.js100
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_osfile_win_async_setPermissions.js114
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_osfile_writeAtomic_backupTo_option.js143
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_osfile_writeAtomic_zerobytes.js27
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_path.js159
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_path_constants.js83
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_queue.js38
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_read_write.js103
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_remove.js56
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_removeDir.js177
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_removeEmptyDir.js55
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_reset.js95
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_shutdown.js98
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_telemetry.js63
-rw-r--r--toolkit/components/osfile/tests/xpcshell/test_unique.js88
-rw-r--r--toolkit/components/osfile/tests/xpcshell/xpcshell.ini51
-rw-r--r--toolkit/components/parentalcontrols/moz.build20
-rw-r--r--toolkit/components/parentalcontrols/nsParentalControlsServiceAndroid.cpp103
-rw-r--r--toolkit/components/passwordmgr/moz.build34
-rw-r--r--toolkit/components/passwordmgr/nsLoginManager.js4
-rw-r--r--toolkit/components/passwordmgr/nsLoginManagerPrompter.js3
-rw-r--r--toolkit/components/passwordmgr/passwordmgr.manifest5
-rw-r--r--toolkit/components/passwordmgr/storage-mozStorage.js1262
-rw-r--r--toolkit/components/passwordmgr/test/.eslintrc.js13
-rw-r--r--toolkit/components/passwordmgr/test/LoginTestUtils.jsm295
-rw-r--r--toolkit/components/passwordmgr/test/authenticate.sjs228
-rw-r--r--toolkit/components/passwordmgr/test/blank.html8
-rw-r--r--toolkit/components/passwordmgr/test/browser/.eslintrc.js7
-rw-r--r--toolkit/components/passwordmgr/test/browser/authenticate.sjs110
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser.ini72
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_DOMFormHasPassword.js94
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_DOMInputPasswordAdded.js99
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_autocomplete_insecure_warning.js41
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_capture_doorhanger.js600
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_capture_doorhanger_httpsUpgrade.js123
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_capture_doorhanger_window_open.js144
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_context_menu.js432
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_context_menu_autocomplete_interaction.js99
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_context_menu_iframe.js144
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_exceptions_dialog.js56
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_formless_submit_chrome.js126
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_hasInsecureLoginForms.js93
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_hasInsecureLoginForms_streamConverter.js102
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_http_autofill.js78
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_insecurePasswordConsoleWarning.js94
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_master_password_autocomplete.js59
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_notifications.js81
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_notifications_2.js125
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_notifications_password.js145
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_notifications_username.js119
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_passwordmgr_contextmenu.js100
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_passwordmgr_editing.js126
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_passwordmgr_fields.js65
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_passwordmgr_observers.js129
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_passwordmgr_sort.js208
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_passwordmgr_switchtab.js42
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_passwordmgrdlg.js192
-rw-r--r--toolkit/components/passwordmgr/test/browser/browser_username_select_dialog.js144
-rw-r--r--toolkit/components/passwordmgr/test/browser/form_autofocus_js.html10
-rw-r--r--toolkit/components/passwordmgr/test/browser/form_basic.html12
-rw-r--r--toolkit/components/passwordmgr/test/browser/form_basic_iframe.html13
-rw-r--r--toolkit/components/passwordmgr/test/browser/form_cross_origin_insecure_action.html12
-rw-r--r--toolkit/components/passwordmgr/test/browser/form_cross_origin_secure_action.html12
-rw-r--r--toolkit/components/passwordmgr/test/browser/form_same_origin_action.html12
-rw-r--r--toolkit/components/passwordmgr/test/browser/formless_basic.html18
-rw-r--r--toolkit/components/passwordmgr/test/browser/head.js137
-rw-r--r--toolkit/components/passwordmgr/test/browser/insecure_test.html9
-rw-r--r--toolkit/components/passwordmgr/test/browser/insecure_test_subframe.html13
-rw-r--r--toolkit/components/passwordmgr/test/browser/multiple_forms.html129
-rw-r--r--toolkit/components/passwordmgr/test/browser/streamConverter_content.sjs6
-rw-r--r--toolkit/components/passwordmgr/test/browser/subtst_notifications_1.html29
-rw-r--r--toolkit/components/passwordmgr/test/browser/subtst_notifications_10.html27
-rw-r--r--toolkit/components/passwordmgr/test/browser/subtst_notifications_11.html25
-rw-r--r--toolkit/components/passwordmgr/test/browser/subtst_notifications_11_popup.html32
-rw-r--r--toolkit/components/passwordmgr/test/browser/subtst_notifications_2.html30
-rw-r--r--toolkit/components/passwordmgr/test/browser/subtst_notifications_2pw_0un.html27
-rw-r--r--toolkit/components/passwordmgr/test/browser/subtst_notifications_2pw_1un_1text.html31
-rw-r--r--toolkit/components/passwordmgr/test/browser/subtst_notifications_3.html30
-rw-r--r--toolkit/components/passwordmgr/test/browser/subtst_notifications_4.html30
-rw-r--r--toolkit/components/passwordmgr/test/browser/subtst_notifications_5.html26
-rw-r--r--toolkit/components/passwordmgr/test/browser/subtst_notifications_6.html27
-rw-r--r--toolkit/components/passwordmgr/test/browser/subtst_notifications_8.html29
-rw-r--r--toolkit/components/passwordmgr/test/browser/subtst_notifications_9.html29
-rw-r--r--toolkit/components/passwordmgr/test/browser/subtst_notifications_change_p.html32
-rw-r--r--toolkit/components/passwordmgr/test/chrome/chrome.ini13
-rw-r--r--toolkit/components/passwordmgr/test/chrome/notification_common.js111
-rw-r--r--toolkit/components/passwordmgr/test/chrome/privbrowsing_perwindowpb_iframe.html9
-rw-r--r--toolkit/components/passwordmgr/test/chrome/subtst_privbrowsing_1.html33
-rw-r--r--toolkit/components/passwordmgr/test/chrome/subtst_privbrowsing_2.html33
-rw-r--r--toolkit/components/passwordmgr/test/chrome/subtst_privbrowsing_3.html29
-rw-r--r--toolkit/components/passwordmgr/test/chrome/subtst_privbrowsing_4.html40
-rw-r--r--toolkit/components/passwordmgr/test/chrome/test_privbrowsing_perwindowpb.html322
-rw-r--r--toolkit/components/passwordmgr/test/chrome_timeout.js11
-rw-r--r--toolkit/components/passwordmgr/test/formsubmit.sjs37
-rw-r--r--toolkit/components/passwordmgr/test/mochitest.ini20
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/auth2/authenticate.sjs220
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/mochitest.ini69
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_autocomplete_https_upgrade.html218
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_autofill_https_upgrade.html117
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_autofill_password-only.html143
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_autofocus_js.html115
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_basic_form.html44
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_basic_form_0pw.html72
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_basic_form_1pw.html167
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_basic_form_1pw_2.html109
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_basic_form_2pw_1.html187
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_basic_form_2pw_2.html105
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_basic_form_3pw_1.html177
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_basic_form_autocomplete.html859
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_basic_form_html5.html164
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_basic_form_pwevent.html55
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_basic_form_pwonly.html213
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_bug_627616.html145
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_bug_776171.html56
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_case_differences.html147
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_form_action_1.html137
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_form_action_2.html170
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_form_action_javascript.html52
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_formless_autofill.html147
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_formless_submit.html183
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_formless_submit_navigation.html191
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_formless_submit_navigation_negative.html121
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_input_events.html96
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_input_events_for_identical_values.html51
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_insecure_form_field_autocomplete.html861
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_insecure_form_field_no_saved_login.html103
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_maxlength.html137
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_password_field_autocomplete.html291
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_passwords_in_type_password.html122
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_prompt.html705
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_prompt_http.html362
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_prompt_noWindow.html81
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_prompt_promptAuth.html406
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_prompt_promptAuth_proxy.html264
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_recipe_login_fields.html145
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_username_focus.html263
-rw-r--r--toolkit/components/passwordmgr/test/mochitest/test_xhr_2.html55
-rw-r--r--toolkit/components/passwordmgr/test/prompt_common.js79
-rw-r--r--toolkit/components/passwordmgr/test/pwmgr_common.js509
-rw-r--r--toolkit/components/passwordmgr/test/subtst_master_pass.html12
-rw-r--r--toolkit/components/passwordmgr/test/subtst_prompt_async.html12
-rw-r--r--toolkit/components/passwordmgr/test/test_master_password.html308
-rw-r--r--toolkit/components/passwordmgr/test/test_prompt_async.html540
-rw-r--r--toolkit/components/passwordmgr/test/test_xhr.html201
-rw-r--r--toolkit/components/passwordmgr/test/test_xml_load.html191
-rw-r--r--toolkit/components/passwordmgr/test/unit/.eslintrc.js7
-rw-r--r--toolkit/components/passwordmgr/test/unit/data/corruptDB.sqlitebin32772 -> 0 bytes
-rw-r--r--toolkit/components/passwordmgr/test/unit/data/key3.dbbin16384 -> 0 bytes
-rw-r--r--toolkit/components/passwordmgr/test/unit/data/signons-v1.sqlitebin8192 -> 0 bytes
-rw-r--r--toolkit/components/passwordmgr/test/unit/data/signons-v1v2.sqlitebin10240 -> 0 bytes
-rw-r--r--toolkit/components/passwordmgr/test/unit/data/signons-v2.sqlitebin11264 -> 0 bytes
-rw-r--r--toolkit/components/passwordmgr/test/unit/data/signons-v2v3.sqlitebin12288 -> 0 bytes
-rw-r--r--toolkit/components/passwordmgr/test/unit/data/signons-v3.sqlitebin11264 -> 0 bytes
-rw-r--r--toolkit/components/passwordmgr/test/unit/data/signons-v3v4.sqlitebin11264 -> 0 bytes
-rw-r--r--toolkit/components/passwordmgr/test/unit/data/signons-v4.sqlitebin294912 -> 0 bytes
-rw-r--r--toolkit/components/passwordmgr/test/unit/data/signons-v4v5.sqlitebin327680 -> 0 bytes
-rw-r--r--toolkit/components/passwordmgr/test/unit/data/signons-v5v6.sqlitebin327680 -> 0 bytes
-rw-r--r--toolkit/components/passwordmgr/test/unit/data/signons-v999-2.sqlitebin8192 -> 0 bytes
-rw-r--r--toolkit/components/passwordmgr/test/unit/data/signons-v999.sqlitebin11264 -> 0 bytes
-rw-r--r--toolkit/components/passwordmgr/test/unit/head.js135
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_OSCrypto_win.js75
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_context_menu.js165
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_dedupeLogins.js284
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_disabled_hosts.js196
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_getFormFields.js147
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_getPasswordFields.js156
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_getPasswordOrigin.js28
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_isOriginMatching.js40
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_legacy_empty_formSubmitURL.js107
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_legacy_validation.js76
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_logins_change.js384
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_logins_decrypt_failure.js77
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_logins_metainfo.js284
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_logins_search.js220
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_maybeImportLogin.js169
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_module_LoginImport.js243
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_module_LoginStore.js206
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_notifications.js172
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_recipes_add.js177
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_recipes_content.js39
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_removeLegacySignonFiles.js69
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_search_schemeUpgrades.js184
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_storage.js102
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_storage_mozStorage.js507
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_telemetry.js187
-rw-r--r--toolkit/components/passwordmgr/test/unit/test_user_autocomplete_result.js488
-rw-r--r--toolkit/components/passwordmgr/test/unit/xpcshell.ini46
-rw-r--r--toolkit/components/perf/chrome.ini3
-rw-r--r--toolkit/components/perf/moz.build2
-rw-r--r--toolkit/components/perf/test_pm.xul48
-rw-r--r--toolkit/components/perfmonitoring/moz.build26
-rw-r--r--toolkit/components/perfmonitoring/tests/browser/.eslintrc.js7
-rw-r--r--toolkit/components/perfmonitoring/tests/browser/browser.ini15
-rw-r--r--toolkit/components/perfmonitoring/tests/browser/browser_AddonWatcher.js151
-rw-r--r--toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample.xpibin7848 -> 0 bytes
-rw-r--r--toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/bootstrap.js105
-rw-r--r--toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/build.sh4
-rw-r--r--toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/chrome.manifest1
-rw-r--r--toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/content/framescript.js23
-rw-r--r--toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/install.rdf30
-rw-r--r--toolkit/components/perfmonitoring/tests/browser/browser_addonPerformanceAlerts.js91
-rw-r--r--toolkit/components/perfmonitoring/tests/browser/browser_addonPerformanceAlerts_2.js25
-rw-r--r--toolkit/components/perfmonitoring/tests/browser/browser_compartments.html20
-rw-r--r--toolkit/components/perfmonitoring/tests/browser/browser_compartments.js312
-rw-r--r--toolkit/components/perfmonitoring/tests/browser/browser_compartments_frame.html12
-rw-r--r--toolkit/components/perfmonitoring/tests/browser/browser_compartments_script.js29
-rw-r--r--toolkit/components/perfmonitoring/tests/browser/browser_webpagePerformanceAlerts.js111
-rw-r--r--toolkit/components/perfmonitoring/tests/browser/head.js287
-rw-r--r--toolkit/components/perfmonitoring/tests/browser/install.rdf30
-rw-r--r--toolkit/components/places/moz.build6
-rw-r--r--toolkit/components/places/tests/.eslintrc.js9
-rw-r--r--toolkit/components/places/tests/PlacesTestUtils.jsm163
-rw-r--r--toolkit/components/places/tests/bookmarks/.eslintrc.js7
-rw-r--r--toolkit/components/places/tests/bookmarks/head_bookmarks.js20
-rw-r--r--toolkit/components/places/tests/bookmarks/test_1016953-renaming-uncompressed.js103
-rw-r--r--toolkit/components/places/tests/bookmarks/test_1017502-bookmarks_foreign_count.js112
-rw-r--r--toolkit/components/places/tests/bookmarks/test_1129529.js76
-rw-r--r--toolkit/components/places/tests/bookmarks/test_384228.js98
-rw-r--r--toolkit/components/places/tests/bookmarks/test_385829.js182
-rw-r--r--toolkit/components/places/tests/bookmarks/test_388695.js52
-rw-r--r--toolkit/components/places/tests/bookmarks/test_393498.js102
-rw-r--r--toolkit/components/places/tests/bookmarks/test_395101.js87
-rw-r--r--toolkit/components/places/tests/bookmarks/test_395593.js69
-rw-r--r--toolkit/components/places/tests/bookmarks/test_405938_restore_queries.js221
-rw-r--r--toolkit/components/places/tests/bookmarks/test_417228-exclude-from-backup.js141
-rw-r--r--toolkit/components/places/tests/bookmarks/test_417228-other-roots.js158
-rw-r--r--toolkit/components/places/tests/bookmarks/test_424958-json-quoted-folders.js91
-rw-r--r--toolkit/components/places/tests/bookmarks/test_448584.js113
-rw-r--r--toolkit/components/places/tests/bookmarks/test_458683.js131
-rw-r--r--toolkit/components/places/tests/bookmarks/test_466303-json-remove-backups.js124
-rw-r--r--toolkit/components/places/tests/bookmarks/test_477583_json-backup-in-future.js56
-rw-r--r--toolkit/components/places/tests/bookmarks/test_675416.js56
-rw-r--r--toolkit/components/places/tests/bookmarks/test_711914.js56
-rw-r--r--toolkit/components/places/tests/bookmarks/test_818584-discard-duplicate-backups.js59
-rw-r--r--toolkit/components/places/tests/bookmarks/test_818587_compress-bookmarks-backups.js57
-rw-r--r--toolkit/components/places/tests/bookmarks/test_818593-store-backup-metadata.js57
-rw-r--r--toolkit/components/places/tests/bookmarks/test_992901-backup-unsorted-hierarchy.js48
-rw-r--r--toolkit/components/places/tests/bookmarks/test_997030-bookmarks-html-encode.js37
-rw-r--r--toolkit/components/places/tests/bookmarks/test_async_observers.js177
-rw-r--r--toolkit/components/places/tests/bookmarks/test_bmindex.js124
-rw-r--r--toolkit/components/places/tests/bookmarks/test_bookmarks.js718
-rw-r--r--toolkit/components/places/tests/bookmarks/test_bookmarks_eraseEverything.js116
-rw-r--r--toolkit/components/places/tests/bookmarks/test_bookmarks_fetch.js310
-rw-r--r--toolkit/components/places/tests/bookmarks/test_bookmarks_getRecent.js44
-rw-r--r--toolkit/components/places/tests/bookmarks/test_bookmarks_insert.js264
-rw-r--r--toolkit/components/places/tests/bookmarks/test_bookmarks_notifications.js527
-rw-r--r--toolkit/components/places/tests/bookmarks/test_bookmarks_remove.js204
-rw-r--r--toolkit/components/places/tests/bookmarks/test_bookmarks_reorder.js177
-rw-r--r--toolkit/components/places/tests/bookmarks/test_bookmarks_search.js223
-rw-r--r--toolkit/components/places/tests/bookmarks/test_bookmarks_update.js414
-rw-r--r--toolkit/components/places/tests/bookmarks/test_bookmarkstree_cache.js18
-rw-r--r--toolkit/components/places/tests/bookmarks/test_changeBookmarkURI.js68
-rw-r--r--toolkit/components/places/tests/bookmarks/test_getBookmarkedURIFor.js84
-rw-r--r--toolkit/components/places/tests/bookmarks/test_keywords.js310
-rw-r--r--toolkit/components/places/tests/bookmarks/test_nsINavBookmarkObserver.js640
-rw-r--r--toolkit/components/places/tests/bookmarks/test_protectRoots.js37
-rw-r--r--toolkit/components/places/tests/bookmarks/test_removeFolderTransaction_reinsert.js70
-rw-r--r--toolkit/components/places/tests/bookmarks/test_removeItem.js30
-rw-r--r--toolkit/components/places/tests/bookmarks/test_savedsearches.js209
-rw-r--r--toolkit/components/places/tests/bookmarks/xpcshell.ini50
-rw-r--r--toolkit/components/places/tests/browser/.eslintrc.js8
-rw-r--r--toolkit/components/places/tests/browser/399606-history.go-0.html11
-rw-r--r--toolkit/components/places/tests/browser/399606-httprefresh.html8
-rw-r--r--toolkit/components/places/tests/browser/399606-location.reload.html11
-rw-r--r--toolkit/components/places/tests/browser/399606-location.replace.html11
-rw-r--r--toolkit/components/places/tests/browser/399606-window.location.href.html11
-rw-r--r--toolkit/components/places/tests/browser/399606-window.location.html11
-rw-r--r--toolkit/components/places/tests/browser/461710_iframe.html8
-rw-r--r--toolkit/components/places/tests/browser/461710_link_page-2.html13
-rw-r--r--toolkit/components/places/tests/browser/461710_link_page-3.html13
-rw-r--r--toolkit/components/places/tests/browser/461710_link_page.html13
-rw-r--r--toolkit/components/places/tests/browser/461710_visited_page.html9
-rw-r--r--toolkit/components/places/tests/browser/begin.html10
-rw-r--r--toolkit/components/places/tests/browser/browser.ini26
-rw-r--r--toolkit/components/places/tests/browser/browser_bug248970.js152
-rw-r--r--toolkit/components/places/tests/browser/browser_bug399606.js77
-rw-r--r--toolkit/components/places/tests/browser/browser_bug461710.js82
-rw-r--r--toolkit/components/places/tests/browser/browser_bug646422.js51
-rw-r--r--toolkit/components/places/tests/browser/browser_bug680727.js109
-rw-r--r--toolkit/components/places/tests/browser/browser_colorAnalyzer.js259
-rw-r--r--toolkit/components/places/tests/browser/browser_double_redirect.js63
-rw-r--r--toolkit/components/places/tests/browser/browser_favicon_privatebrowsing_perwindowpb.js43
-rw-r--r--toolkit/components/places/tests/browser/browser_favicon_setAndFetchFaviconForPage.js152
-rw-r--r--toolkit/components/places/tests/browser/browser_favicon_setAndFetchFaviconForPage_failures.js261
-rw-r--r--toolkit/components/places/tests/browser/browser_history_post.js23
-rw-r--r--toolkit/components/places/tests/browser/browser_notfound.js46
-rw-r--r--toolkit/components/places/tests/browser/browser_redirect.js61
-rw-r--r--toolkit/components/places/tests/browser/browser_settitle.js76
-rw-r--r--toolkit/components/places/tests/browser/browser_visited_notfound.js51
-rw-r--r--toolkit/components/places/tests/browser/browser_visituri.js84
-rw-r--r--toolkit/components/places/tests/browser/browser_visituri_nohistory.js42
-rw-r--r--toolkit/components/places/tests/browser/browser_visituri_privatebrowsing_perwindowpb.js73
-rw-r--r--toolkit/components/places/tests/browser/colorAnalyzer/category-discover.pngbin1324 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/browser/colorAnalyzer/dictionaryGeneric-16.pngbin742 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/browser/colorAnalyzer/extensionGeneric-16.pngbin554 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/browser/colorAnalyzer/localeGeneric.pngbin2410 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/browser/favicon-normal16.pngbin286 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/browser/favicon-normal32.pngbin344 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/browser/favicon.html13
-rw-r--r--toolkit/components/places/tests/browser/final.html10
-rw-r--r--toolkit/components/places/tests/browser/head.js319
-rw-r--r--toolkit/components/places/tests/browser/history_post.html12
-rw-r--r--toolkit/components/places/tests/browser/history_post.sjs6
-rw-r--r--toolkit/components/places/tests/browser/redirect-target.html1
-rw-r--r--toolkit/components/places/tests/browser/redirect.sjs14
-rw-r--r--toolkit/components/places/tests/browser/redirect_once.sjs9
-rw-r--r--toolkit/components/places/tests/browser/redirect_twice.sjs9
-rw-r--r--toolkit/components/places/tests/browser/title1.html12
-rw-r--r--toolkit/components/places/tests/browser/title2.html14
-rw-r--r--toolkit/components/places/tests/chrome/.eslintrc.js8
-rw-r--r--toolkit/components/places/tests/chrome/bad_links.atom74
-rw-r--r--toolkit/components/places/tests/chrome/browser_disableglobalhistory.xul44
-rw-r--r--toolkit/components/places/tests/chrome/chrome.ini12
-rw-r--r--toolkit/components/places/tests/chrome/link-less-items-no-site-uri.rss18
-rw-r--r--toolkit/components/places/tests/chrome/link-less-items.rss19
-rw-r--r--toolkit/components/places/tests/chrome/rss_as_html.rss27
-rw-r--r--toolkit/components/places/tests/chrome/rss_as_html.rss^headers^2
-rw-r--r--toolkit/components/places/tests/chrome/sample_feed.atom23
-rw-r--r--toolkit/components/places/tests/chrome/test_303567.xul122
-rw-r--r--toolkit/components/places/tests/chrome/test_341972a.xul87
-rw-r--r--toolkit/components/places/tests/chrome/test_341972b.xul84
-rw-r--r--toolkit/components/places/tests/chrome/test_342484.xul88
-rw-r--r--toolkit/components/places/tests/chrome/test_371798.xul101
-rw-r--r--toolkit/components/places/tests/chrome/test_381357.xul85
-rw-r--r--toolkit/components/places/tests/chrome/test_browser_disableglobalhistory.xul26
-rw-r--r--toolkit/components/places/tests/chrome/test_favicon_annotations.xul168
-rw-r--r--toolkit/components/places/tests/chrome/test_reloadLivemarks.xul155
-rw-r--r--toolkit/components/places/tests/cpp/mock_Link.h229
-rw-r--r--toolkit/components/places/tests/cpp/moz.build14
-rw-r--r--toolkit/components/places/tests/cpp/places_test_harness.h413
-rw-r--r--toolkit/components/places/tests/cpp/places_test_harness_tail.h120
-rw-r--r--toolkit/components/places/tests/cpp/test_IHistory.cpp639
-rw-r--r--toolkit/components/places/tests/expiration/.eslintrc.js7
-rw-r--r--toolkit/components/places/tests/expiration/head_expiration.js124
-rw-r--r--toolkit/components/places/tests/expiration/test_analyze_runs.js118
-rw-r--r--toolkit/components/places/tests/expiration/test_annos_expire_history.js93
-rw-r--r--toolkit/components/places/tests/expiration/test_annos_expire_never.js95
-rw-r--r--toolkit/components/places/tests/expiration/test_annos_expire_policy.js189
-rw-r--r--toolkit/components/places/tests/expiration/test_annos_expire_session.js83
-rw-r--r--toolkit/components/places/tests/expiration/test_clearHistory.js157
-rw-r--r--toolkit/components/places/tests/expiration/test_debug_expiration.js225
-rw-r--r--toolkit/components/places/tests/expiration/test_idle_daily.js21
-rw-r--r--toolkit/components/places/tests/expiration/test_notifications.js38
-rw-r--r--toolkit/components/places/tests/expiration/test_notifications_onDeleteURI.js114
-rw-r--r--toolkit/components/places/tests/expiration/test_notifications_onDeleteVisits.js142
-rw-r--r--toolkit/components/places/tests/expiration/test_outdated_analyze.js72
-rw-r--r--toolkit/components/places/tests/expiration/test_pref_interval.js61
-rw-r--r--toolkit/components/places/tests/expiration/test_pref_maxpages.js124
-rw-r--r--toolkit/components/places/tests/expiration/xpcshell.ini22
-rw-r--r--toolkit/components/places/tests/favicons/.eslintrc.js7
-rw-r--r--toolkit/components/places/tests/favicons/expected-favicon-big32.jpg.pngbin3105 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/favicons/expected-favicon-big4.jpg.pngbin563 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/favicons/expected-favicon-big48.ico.pngbin1425 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/favicons/expected-favicon-big64.png.pngbin3157 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/favicons/expected-favicon-scale160x3.jpg.pngbin175 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/favicons/expected-favicon-scale3x160.jpg.pngbin169 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/favicons/favicon-big16.icobin1406 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/favicons/favicon-big32.jpgbin3494 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/favicons/favicon-big4.jpgbin4751 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/favicons/favicon-big48.icobin56646 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/favicons/favicon-big64.pngbin10698 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/favicons/favicon-normal16.pngbin286 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/favicons/favicon-normal32.pngbin344 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/favicons/favicon-scale160x3.jpgbin5095 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/favicons/favicon-scale3x160.jpgbin5059 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/favicons/head_favicons.js105
-rw-r--r--toolkit/components/places/tests/favicons/test_expireAllFavicons.js39
-rw-r--r--toolkit/components/places/tests/favicons/test_favicons_conversions.js131
-rw-r--r--toolkit/components/places/tests/favicons/test_getFaviconDataForPage.js57
-rw-r--r--toolkit/components/places/tests/favicons/test_getFaviconURLForPage.js51
-rw-r--r--toolkit/components/places/tests/favicons/test_moz-anno_favicon_mime_type.js90
-rw-r--r--toolkit/components/places/tests/favicons/test_page-icon_protocol.js66
-rw-r--r--toolkit/components/places/tests/favicons/test_query_result_favicon_changed_on_child.js74
-rw-r--r--toolkit/components/places/tests/favicons/test_replaceFaviconData.js264
-rw-r--r--toolkit/components/places/tests/favicons/test_replaceFaviconDataFromDataURL.js352
-rw-r--r--toolkit/components/places/tests/favicons/xpcshell.ini32
-rw-r--r--toolkit/components/places/tests/head_common.js869
-rw-r--r--toolkit/components/places/tests/history/.eslintrc.js7
-rw-r--r--toolkit/components/places/tests/history/head_history.js19
-rw-r--r--toolkit/components/places/tests/history/test_insert.js257
-rw-r--r--toolkit/components/places/tests/history/test_remove.js360
-rw-r--r--toolkit/components/places/tests/history/test_removeVisits.js316
-rw-r--r--toolkit/components/places/tests/history/test_removeVisitsByFilter.js345
-rw-r--r--toolkit/components/places/tests/history/test_updatePlaces_sameUri_titleChanged.js52
-rw-r--r--toolkit/components/places/tests/history/xpcshell.ini9
-rw-r--r--toolkit/components/places/tests/migration/.eslintrc.js7
-rw-r--r--toolkit/components/places/tests/migration/head_migration.js46
-rw-r--r--toolkit/components/places/tests/migration/places_v10.sqlitebin172032 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/migration/places_v11.sqlitebin1081344 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/migration/places_v17.sqlitebin1212416 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/migration/places_v19.sqlitebin1179648 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/migration/places_v21.sqlitebin1179648 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/migration/places_v22.sqlitebin1179648 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/migration/places_v23.sqlitebin1179648 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/migration/places_v24.sqlitebin1179648 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/migration/places_v25.sqlitebin1179648 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/migration/places_v26.sqlitebin1179648 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/migration/places_v27.sqlitebin1212416 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/migration/places_v28.sqlitebin1212416 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/migration/places_v29.sqlitebin1245184 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/migration/places_v30.sqlitebin1212416 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/migration/places_v31.sqlitebin1146880 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/migration/places_v32.sqlitebin1146880 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/migration/places_v33.sqlitebin1146880 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/migration/places_v34.sqlitebin1146880 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/migration/places_v35.sqlitebin1146880 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/migration/places_v6.sqlitebin155648 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/migration/test_current_from_downgraded.js19
-rw-r--r--toolkit/components/places/tests/migration/test_current_from_v11.js48
-rw-r--r--toolkit/components/places/tests/migration/test_current_from_v19.js42
-rw-r--r--toolkit/components/places/tests/migration/test_current_from_v24.js36
-rw-r--r--toolkit/components/places/tests/migration/test_current_from_v25.js30
-rw-r--r--toolkit/components/places/tests/migration/test_current_from_v26.js98
-rw-r--r--toolkit/components/places/tests/migration/test_current_from_v27.js77
-rw-r--r--toolkit/components/places/tests/migration/test_current_from_v31.js46
-rw-r--r--toolkit/components/places/tests/migration/test_current_from_v34.js141
-rw-r--r--toolkit/components/places/tests/migration/test_current_from_v34_no_roots.js21
-rw-r--r--toolkit/components/places/tests/migration/test_current_from_v6.js38
-rw-r--r--toolkit/components/places/tests/migration/xpcshell.ini36
-rw-r--r--toolkit/components/places/tests/moz.build67
-rw-r--r--toolkit/components/places/tests/queries/.eslintrc.js7
-rw-r--r--toolkit/components/places/tests/queries/head_queries.js370
-rw-r--r--toolkit/components/places/tests/queries/readme.txt16
-rw-r--r--toolkit/components/places/tests/queries/test_415716.js108
-rw-r--r--toolkit/components/places/tests/queries/test_abstime-annotation-domain.js210
-rw-r--r--toolkit/components/places/tests/queries/test_abstime-annotation-uri.js162
-rw-r--r--toolkit/components/places/tests/queries/test_async.js371
-rw-r--r--toolkit/components/places/tests/queries/test_containersQueries_sorting.js411
-rw-r--r--toolkit/components/places/tests/queries/test_history_queries_tags_liveUpdate.js200
-rw-r--r--toolkit/components/places/tests/queries/test_history_queries_titles_liveUpdate.js210
-rw-r--r--toolkit/components/places/tests/queries/test_onlyBookmarked.js128
-rw-r--r--toolkit/components/places/tests/queries/test_queryMultipleFolder.js65
-rw-r--r--toolkit/components/places/tests/queries/test_querySerialization.js797
-rw-r--r--toolkit/components/places/tests/queries/test_redirects.js311
-rw-r--r--toolkit/components/places/tests/queries/test_results-as-tag-contents-query.js127
-rw-r--r--toolkit/components/places/tests/queries/test_results-as-visit.js119
-rw-r--r--toolkit/components/places/tests/queries/test_searchTerms_includeHidden.js84
-rw-r--r--toolkit/components/places/tests/queries/test_searchterms-bookmarklets.js70
-rw-r--r--toolkit/components/places/tests/queries/test_searchterms-domain.js125
-rw-r--r--toolkit/components/places/tests/queries/test_searchterms-uri.js87
-rw-r--r--toolkit/components/places/tests/queries/test_sort-date-site-grouping.js225
-rw-r--r--toolkit/components/places/tests/queries/test_sorting.js1265
-rw-r--r--toolkit/components/places/tests/queries/test_tags.js743
-rw-r--r--toolkit/components/places/tests/queries/test_transitions.js178
-rw-r--r--toolkit/components/places/tests/queries/xpcshell.ini34
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/.eslintrc.js7
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/data/engine-rel-searchform.xml5
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/data/engine-suggestions.xml14
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/head_autocomplete.js505
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_416211.js22
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_416214.js39
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_417798.js51
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_418257.js67
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_422277.js19
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_autocomplete_functional.js171
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_autocomplete_on_value_removed_479089.js39
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_autofill_default_behavior.js310
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_avoid_middle_complete.js179
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_avoid_stripping_to_empty_tokens.js41
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_casing.js157
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_do_not_trim.js91
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_download_embed_bookmarks.js71
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_dupe_urls.js23
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_empty_search.js98
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_enabled.js68
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_escape_self.js31
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_extension_matches.js384
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_ignore_protocol.js24
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_keyword_search.js73
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_keyword_search_actions.js149
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_keywords.js78
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_match_beginning.js54
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_multi_word_search.js68
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_query_url.js68
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_remote_tab_matches.js203
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_search_engine_alias.js51
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_search_engine_current.js45
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_search_engine_host.js49
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_search_engine_restyle.js43
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_search_suggestions.js651
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_special_search.js447
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_swap_protocol.js153
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_tab_matches.js125
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_trimming.js313
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_typed.js84
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_visit_url.js186
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_word_boundary_search.js175
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/test_zero_frecency.js35
-rw-r--r--toolkit/components/places/tests/unifiedcomplete/xpcshell.ini49
-rw-r--r--toolkit/components/places/tests/unit/.eslintrc.js7
-rw-r--r--toolkit/components/places/tests/unit/bookmarks.corrupt.html36
-rw-r--r--toolkit/components/places/tests/unit/bookmarks.json1
-rw-r--r--toolkit/components/places/tests/unit/bookmarks.preplaces.html35
-rw-r--r--toolkit/components/places/tests/unit/bookmarks_html_singleframe.html10
-rw-r--r--toolkit/components/places/tests/unit/bug476292.sqlitebin139264 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/unit/corruptDB.sqlitebin32772 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/unit/default.sqlitebin1081344 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/unit/head_bookmarks.js20
-rw-r--r--toolkit/components/places/tests/unit/livemark.xml17
-rw-r--r--toolkit/components/places/tests/unit/mobile_bookmarks_folder_import.json1
-rw-r--r--toolkit/components/places/tests/unit/mobile_bookmarks_folder_merge.json1
-rw-r--r--toolkit/components/places/tests/unit/mobile_bookmarks_multiple_folders.json1
-rw-r--r--toolkit/components/places/tests/unit/mobile_bookmarks_root_import.json1
-rw-r--r--toolkit/components/places/tests/unit/mobile_bookmarks_root_merge.json1
-rw-r--r--toolkit/components/places/tests/unit/nsDummyObserver.js48
-rw-r--r--toolkit/components/places/tests/unit/nsDummyObserver.manifest4
-rw-r--r--toolkit/components/places/tests/unit/places.sparse.sqlitebin221184 -> 0 bytes
-rw-r--r--toolkit/components/places/tests/unit/test_000_frecency.js267
-rw-r--r--toolkit/components/places/tests/unit/test_1085291.js42
-rw-r--r--toolkit/components/places/tests/unit/test_1105208.js24
-rw-r--r--toolkit/components/places/tests/unit/test_1105866.js63
-rw-r--r--toolkit/components/places/tests/unit/test_317472.js65
-rw-r--r--toolkit/components/places/tests/unit/test_331487.js95
-rw-r--r--toolkit/components/places/tests/unit/test_384370.js173
-rw-r--r--toolkit/components/places/tests/unit/test_385397.js142
-rw-r--r--toolkit/components/places/tests/unit/test_399264_query_to_string.js51
-rw-r--r--toolkit/components/places/tests/unit/test_399264_string_to_query.js75
-rw-r--r--toolkit/components/places/tests/unit/test_399266.js78
-rw-r--r--toolkit/components/places/tests/unit/test_402799.js62
-rw-r--r--toolkit/components/places/tests/unit/test_405497.js57
-rw-r--r--toolkit/components/places/tests/unit/test_408221.js165
-rw-r--r--toolkit/components/places/tests/unit/test_412132.js136
-rw-r--r--toolkit/components/places/tests/unit/test_413784.js118
-rw-r--r--toolkit/components/places/tests/unit/test_415460.js43
-rw-r--r--toolkit/components/places/tests/unit/test_415757.js102
-rw-r--r--toolkit/components/places/tests/unit/test_418643_removeFolderChildren.js143
-rw-r--r--toolkit/components/places/tests/unit/test_419731.js96
-rw-r--r--toolkit/components/places/tests/unit/test_419792_node_tags_property.js49
-rw-r--r--toolkit/components/places/tests/unit/test_425563.js74
-rw-r--r--toolkit/components/places/tests/unit/test_429505_remove_shortcuts.js35
-rw-r--r--toolkit/components/places/tests/unit/test_433317_query_title_update.js38
-rw-r--r--toolkit/components/places/tests/unit/test_433525_hasChildren_crash.js56
-rw-r--r--toolkit/components/places/tests/unit/test_452777.js36
-rw-r--r--toolkit/components/places/tests/unit/test_454977.js124
-rw-r--r--toolkit/components/places/tests/unit/test_463863.js60
-rw-r--r--toolkit/components/places/tests/unit/test_485442_crash_bug_nsNavHistoryQuery_GetUri.js21
-rw-r--r--toolkit/components/places/tests/unit/test_486978_sort_by_date_queries.js129
-rw-r--r--toolkit/components/places/tests/unit/test_536081.js56
-rw-r--r--toolkit/components/places/tests/unit/test_PlacesSearchAutocompleteProvider.js133
-rw-r--r--toolkit/components/places/tests/unit/test_PlacesUtils_asyncGetBookmarkIds.js77
-rw-r--r--toolkit/components/places/tests/unit/test_PlacesUtils_invalidateCachedGuidFor.js25
-rw-r--r--toolkit/components/places/tests/unit/test_PlacesUtils_lazyobservers.js47
-rw-r--r--toolkit/components/places/tests/unit/test_adaptive.js406
-rw-r--r--toolkit/components/places/tests/unit/test_adaptive_bug527311.js141
-rw-r--r--toolkit/components/places/tests/unit/test_analyze.js28
-rw-r--r--toolkit/components/places/tests/unit/test_annotations.js363
-rw-r--r--toolkit/components/places/tests/unit/test_asyncExecuteLegacyQueries.js95
-rw-r--r--toolkit/components/places/tests/unit/test_async_history_api.js1118
-rw-r--r--toolkit/components/places/tests/unit/test_async_in_batchmode.js55
-rw-r--r--toolkit/components/places/tests/unit/test_async_transactions.js1739
-rw-r--r--toolkit/components/places/tests/unit/test_autocomplete_stopSearch_no_throw.js39
-rw-r--r--toolkit/components/places/tests/unit/test_bookmark_catobs.js57
-rw-r--r--toolkit/components/places/tests/unit/test_bookmarks_html.js385
-rw-r--r--toolkit/components/places/tests/unit/test_bookmarks_html_corrupt.js143
-rw-r--r--toolkit/components/places/tests/unit/test_bookmarks_html_import_tags.js57
-rw-r--r--toolkit/components/places/tests/unit/test_bookmarks_html_singleframe.js32
-rw-r--r--toolkit/components/places/tests/unit/test_bookmarks_json.js241
-rw-r--r--toolkit/components/places/tests/unit/test_bookmarks_restore_notification.js325
-rw-r--r--toolkit/components/places/tests/unit/test_bookmarks_setNullTitle.js44
-rw-r--r--toolkit/components/places/tests/unit/test_broken_folderShortcut_result.js79
-rw-r--r--toolkit/components/places/tests/unit/test_browserhistory.js129
-rw-r--r--toolkit/components/places/tests/unit/test_bug636917_isLivemark.js35
-rw-r--r--toolkit/components/places/tests/unit/test_childlessTags.js117
-rw-r--r--toolkit/components/places/tests/unit/test_corrupt_telemetry.js31
-rw-r--r--toolkit/components/places/tests/unit/test_crash_476292.js28
-rw-r--r--toolkit/components/places/tests/unit/test_database_replaceOnStartup.js46
-rw-r--r--toolkit/components/places/tests/unit/test_download_history.js283
-rw-r--r--toolkit/components/places/tests/unit/test_frecency.js294
-rw-r--r--toolkit/components/places/tests/unit/test_frecency_observers.js84
-rw-r--r--toolkit/components/places/tests/unit/test_frecency_zero_updated.js30
-rw-r--r--toolkit/components/places/tests/unit/test_getChildIndex.js69
-rw-r--r--toolkit/components/places/tests/unit/test_getPlacesInfo.js112
-rw-r--r--toolkit/components/places/tests/unit/test_history.js184
-rw-r--r--toolkit/components/places/tests/unit/test_history_autocomplete_tags.js185
-rw-r--r--toolkit/components/places/tests/unit/test_history_catobs.js55
-rw-r--r--toolkit/components/places/tests/unit/test_history_clear.js169
-rw-r--r--toolkit/components/places/tests/unit/test_history_notifications.js38
-rw-r--r--toolkit/components/places/tests/unit/test_history_observer.js215
-rw-r--r--toolkit/components/places/tests/unit/test_history_sidebar.js447
-rw-r--r--toolkit/components/places/tests/unit/test_hosts_triggers.js226
-rw-r--r--toolkit/components/places/tests/unit/test_import_mobile_bookmarks.js292
-rw-r--r--toolkit/components/places/tests/unit/test_isPageInDB.js10
-rw-r--r--toolkit/components/places/tests/unit/test_isURIVisited.js84
-rw-r--r--toolkit/components/places/tests/unit/test_isvisited.js75
-rw-r--r--toolkit/components/places/tests/unit/test_keywords.js548
-rw-r--r--toolkit/components/places/tests/unit/test_lastModified.js34
-rw-r--r--toolkit/components/places/tests/unit/test_markpageas.js61
-rw-r--r--toolkit/components/places/tests/unit/test_mozIAsyncLivemarks.js514
-rw-r--r--toolkit/components/places/tests/unit/test_multi_queries.js53
-rw-r--r--toolkit/components/places/tests/unit/test_multi_word_tags.js150
-rw-r--r--toolkit/components/places/tests/unit/test_nsINavHistoryViewer.js256
-rw-r--r--toolkit/components/places/tests/unit/test_null_interfaces.js98
-rw-r--r--toolkit/components/places/tests/unit/test_onItemChanged_tags.js52
-rw-r--r--toolkit/components/places/tests/unit/test_pageGuid_bookmarkGuid.js179
-rw-r--r--toolkit/components/places/tests/unit/test_placeURIs.js42
-rw-r--r--toolkit/components/places/tests/unit/test_placesTxn.js937
-rw-r--r--toolkit/components/places/tests/unit/test_preventive_maintenance.js1356
-rw-r--r--toolkit/components/places/tests/unit/test_preventive_maintenance_checkAndFixDatabase.js50
-rw-r--r--toolkit/components/places/tests/unit/test_preventive_maintenance_runTasks.js46
-rw-r--r--toolkit/components/places/tests/unit/test_promiseBookmarksTree.js256
-rw-r--r--toolkit/components/places/tests/unit/test_resolveNullBookmarkTitles.js49
-rw-r--r--toolkit/components/places/tests/unit/test_result_sort.js139
-rw-r--r--toolkit/components/places/tests/unit/test_resultsAsVisit_details.js85
-rw-r--r--toolkit/components/places/tests/unit/test_sql_guid_functions.js106
-rw-r--r--toolkit/components/places/tests/unit/test_svg_favicon.js31
-rw-r--r--toolkit/components/places/tests/unit/test_sync_utils.js1150
-rw-r--r--toolkit/components/places/tests/unit/test_tag_autocomplete_search.js137
-rw-r--r--toolkit/components/places/tests/unit/test_tagging.js189
-rw-r--r--toolkit/components/places/tests/unit/test_telemetry.js166
-rw-r--r--toolkit/components/places/tests/unit/test_update_frecency_after_delete.js151
-rw-r--r--toolkit/components/places/tests/unit/test_utils_backups_create.js90
-rw-r--r--toolkit/components/places/tests/unit/test_utils_getURLsForContainerNode.js181
-rw-r--r--toolkit/components/places/tests/unit/test_utils_setAnnotationsFor.js79
-rw-r--r--toolkit/components/places/tests/unit/test_visitsInDB.js12
-rw-r--r--toolkit/components/places/tests/unit/xpcshell.ini163
-rw-r--r--toolkit/components/printing/moz.build7
-rw-r--r--toolkit/components/printing/tests/browser.ini5
-rw-r--r--toolkit/components/printing/tests/browser_page_change_print_original.js60
-rw-r--r--toolkit/components/printing/tests/file_page_change_print_original_1.html8
-rw-r--r--toolkit/components/printing/tests/file_page_change_print_original_2.html1
-rw-r--r--toolkit/components/promiseworker/moz.build13
-rw-r--r--toolkit/components/promiseworker/tests/xpcshell/.eslintrc.js7
-rw-r--r--toolkit/components/promiseworker/tests/xpcshell/data/chrome.manifest1
-rw-r--r--toolkit/components/promiseworker/tests/xpcshell/data/worker.js34
-rw-r--r--toolkit/components/promiseworker/tests/xpcshell/test_Promise.js117
-rw-r--r--toolkit/components/promiseworker/tests/xpcshell/xpcshell.ini9
-rw-r--r--toolkit/components/prompts/moz.build2
-rw-r--r--toolkit/components/prompts/test/.eslintrc.js7
-rw-r--r--toolkit/components/prompts/test/bug619644_inner.html7
-rw-r--r--toolkit/components/prompts/test/bug625187_iframe.html16
-rw-r--r--toolkit/components/prompts/test/chromeScript.js241
-rw-r--r--toolkit/components/prompts/test/mochitest.ini19
-rw-r--r--toolkit/components/prompts/test/prompt_common.js158
-rw-r--r--toolkit/components/prompts/test/test_bug619644.html76
-rw-r--r--toolkit/components/prompts/test/test_bug620145.html105
-rw-r--r--toolkit/components/prompts/test/test_dom_prompts.html208
-rw-r--r--toolkit/components/prompts/test/test_modal_prompts.html1184
-rw-r--r--toolkit/components/prompts/test/test_modal_select.html146
-rw-r--r--toolkit/components/prompts/test/test_subresources_prompts.html202
-rw-r--r--toolkit/components/protobuf/src/google/protobuf/stubs/platform_macros.h2
-rw-r--r--toolkit/components/reader/moz.build11
-rw-r--r--toolkit/components/reader/test/browser.ini15
-rw-r--r--toolkit/components/reader/test/browser_bug1124271_readerModePinnedTab.js47
-rw-r--r--toolkit/components/reader/test/browser_readerMode.js220
-rw-r--r--toolkit/components/reader/test/browser_readerMode_hidden_nodes.js53
-rw-r--r--toolkit/components/reader/test/browser_readerMode_with_anchor.js21
-rw-r--r--toolkit/components/reader/test/head.js126
-rw-r--r--toolkit/components/reader/test/readerModeArticle.html25
-rw-r--r--toolkit/components/reader/test/readerModeArticleHiddenNodes.html22
-rw-r--r--toolkit/components/remotebrowserutils/moz.build2
-rw-r--r--toolkit/components/remotebrowserutils/tests/browser/.eslintrc.js7
-rw-r--r--toolkit/components/remotebrowserutils/tests/browser/browser.ini6
-rw-r--r--toolkit/components/remotebrowserutils/tests/browser/browser_RemoteWebNavigation.js156
-rw-r--r--toolkit/components/remotebrowserutils/tests/browser/dummy_page.html7
-rw-r--r--toolkit/components/satchel/FormHistory.jsm4
-rw-r--r--toolkit/components/satchel/moz.build12
-rw-r--r--toolkit/components/satchel/nsFormFillController.cpp2
-rw-r--r--toolkit/components/satchel/nsFormHistory.js20
-rw-r--r--toolkit/components/satchel/test/.eslintrc.js7
-rw-r--r--toolkit/components/satchel/test/browser/.eslintrc.js7
-rw-r--r--toolkit/components/satchel/test/browser/browser.ini5
-rw-r--r--toolkit/components/satchel/test/browser/browser_privbrowsing_perwindowpb.js63
-rw-r--r--toolkit/components/satchel/test/mochitest.ini19
-rw-r--r--toolkit/components/satchel/test/parent_utils.js149
-rw-r--r--toolkit/components/satchel/test/satchel_common.js274
-rw-r--r--toolkit/components/satchel/test/subtst_form_submission_1.html38
-rw-r--r--toolkit/components/satchel/test/subtst_privbrowsing.html22
-rw-r--r--toolkit/components/satchel/test/test_bug_511615.html194
-rw-r--r--toolkit/components/satchel/test/test_bug_787624.html88
-rw-r--r--toolkit/components/satchel/test/test_datalist_with_caching.html139
-rw-r--r--toolkit/components/satchel/test/test_form_autocomplete.html1074
-rw-r--r--toolkit/components/satchel/test/test_form_autocomplete_with_list.html506
-rw-r--r--toolkit/components/satchel/test/test_form_submission.html537
-rw-r--r--toolkit/components/satchel/test/test_form_submission_cap.html85
-rw-r--r--toolkit/components/satchel/test/test_form_submission_cap2.html190
-rw-r--r--toolkit/components/satchel/test/test_password_autocomplete.html107
-rw-r--r--toolkit/components/satchel/test/test_popup_direction.html61
-rw-r--r--toolkit/components/satchel/test/test_popup_enter_event.html86
-rw-r--r--toolkit/components/satchel/test/unit/.eslintrc.js7
-rw-r--r--toolkit/components/satchel/test/unit/asyncformhistory_expire.sqlitebin98304 -> 0 bytes
-rw-r--r--toolkit/components/satchel/test/unit/formhistory_1000.sqlitebin164864 -> 0 bytes
-rw-r--r--toolkit/components/satchel/test/unit/formhistory_CORRUPT.sqlite1
-rw-r--r--toolkit/components/satchel/test/unit/formhistory_apitest.sqlitebin5120 -> 0 bytes
-rw-r--r--toolkit/components/satchel/test/unit/formhistory_autocomplete.sqlitebin72704 -> 0 bytes
-rw-r--r--toolkit/components/satchel/test/unit/formhistory_v3.sqlitebin5120 -> 0 bytes
-rw-r--r--toolkit/components/satchel/test/unit/formhistory_v3v4.sqlitebin6144 -> 0 bytes
-rw-r--r--toolkit/components/satchel/test/unit/formhistory_v999a.sqlitebin6144 -> 0 bytes
-rw-r--r--toolkit/components/satchel/test/unit/formhistory_v999b.sqlitebin4096 -> 0 bytes
-rw-r--r--toolkit/components/satchel/test/unit/head_satchel.js102
-rw-r--r--toolkit/components/satchel/test/unit/perf_autocomplete.js140
-rw-r--r--toolkit/components/satchel/test/unit/test_async_expire.js168
-rw-r--r--toolkit/components/satchel/test/unit/test_autocomplete.js266
-rw-r--r--toolkit/components/satchel/test/unit/test_db_corrupt.js89
-rw-r--r--toolkit/components/satchel/test/unit/test_db_update_v4.js60
-rw-r--r--toolkit/components/satchel/test/unit/test_db_update_v4b.js58
-rw-r--r--toolkit/components/satchel/test/unit/test_db_update_v999a.js75
-rw-r--r--toolkit/components/satchel/test/unit/test_db_update_v999b.js92
-rw-r--r--toolkit/components/satchel/test/unit/test_history_api.js457
-rw-r--r--toolkit/components/satchel/test/unit/test_notify.js158
-rw-r--r--toolkit/components/satchel/test/unit/test_previous_result.js25
-rw-r--r--toolkit/components/satchel/test/unit/xpcshell.ini26
-rw-r--r--toolkit/components/search/nsSearchService.js33
-rw-r--r--toolkit/components/social/test/xpcshell/.eslintrc.js7
-rw-r--r--toolkit/components/sqlite/moz.build11
-rw-r--r--toolkit/components/sqlite/sqlite_internal.js323
-rw-r--r--toolkit/components/sqlite/tests/xpcshell/.eslintrc.js7
-rw-r--r--toolkit/components/sqlite/tests/xpcshell/data/chrome.manifest1
-rw-r--r--toolkit/components/sqlite/tests/xpcshell/data/worker_sqlite_internal.js279
-rw-r--r--toolkit/components/sqlite/tests/xpcshell/data/worker_sqlite_shared.js39
-rw-r--r--toolkit/components/sqlite/tests/xpcshell/test_sqlite_internal.js43
-rw-r--r--toolkit/components/sqlite/tests/xpcshell/xpcshell.ini10
-rw-r--r--toolkit/components/startup/moz.build10
-rw-r--r--toolkit/components/startup/tests/browser/.eslintrc.js7
-rw-r--r--toolkit/components/startup/tests/browser/beforeunload.html10
-rw-r--r--toolkit/components/startup/tests/browser/browser.ini8
-rw-r--r--toolkit/components/startup/tests/browser/browser_bug511456.js47
-rw-r--r--toolkit/components/startup/tests/browser/browser_bug537449.js53
-rw-r--r--toolkit/components/startup/tests/browser/browser_crash_detection.js23
-rw-r--r--toolkit/components/startup/tests/browser/head.js29
-rw-r--r--toolkit/components/startup/tests/unit/.eslintrc.js7
-rw-r--r--toolkit/components/startup/tests/unit/head_startup.js30
-rw-r--r--toolkit/components/startup/tests/unit/test_startup_crash.js300
-rw-r--r--toolkit/components/startup/tests/unit/xpcshell.ini6
-rw-r--r--toolkit/components/telemetry/Makefile.in17
-rw-r--r--toolkit/components/telemetry/TelemetryController.jsm2
-rw-r--r--toolkit/components/telemetry/TelemetryEnvironment.jsm2
-rw-r--r--toolkit/components/telemetry/TelemetryReportingPolicy.jsm2
-rw-r--r--toolkit/components/telemetry/moz.build9
-rw-r--r--toolkit/components/telemetry/tests/addons/dictionary/install.rdf25
-rw-r--r--toolkit/components/telemetry/tests/addons/experiment/install.rdf16
-rw-r--r--toolkit/components/telemetry/tests/addons/extension-2/install.rdf16
-rw-r--r--toolkit/components/telemetry/tests/addons/extension/install.rdf16
-rw-r--r--toolkit/components/telemetry/tests/addons/long-fields/install.rdf24
-rw-r--r--toolkit/components/telemetry/tests/addons/restartless/install.rdf24
-rw-r--r--toolkit/components/telemetry/tests/addons/signed/META-INF/manifest.mf7
-rw-r--r--toolkit/components/telemetry/tests/addons/signed/META-INF/mozilla.rsabin4190 -> 0 bytes
-rw-r--r--toolkit/components/telemetry/tests/addons/signed/META-INF/mozilla.sf4
-rw-r--r--toolkit/components/telemetry/tests/addons/signed/install.rdf24
-rw-r--r--toolkit/components/telemetry/tests/addons/system/install.rdf24
-rw-r--r--toolkit/components/telemetry/tests/addons/theme/install.rdf16
-rw-r--r--toolkit/components/telemetry/tests/browser/browser.ini5
-rw-r--r--toolkit/components/telemetry/tests/browser/browser_TelemetryGC.js193
-rw-r--r--toolkit/components/telemetry/tests/search/chrome.manifest3
-rw-r--r--toolkit/components/telemetry/tests/search/searchTest.jarbin867 -> 0 bytes
-rw-r--r--toolkit/components/telemetry/tests/unit/.eslintrc.js7
-rw-r--r--toolkit/components/telemetry/tests/unit/TelemetryArchiveTesting.jsm86
-rw-r--r--toolkit/components/telemetry/tests/unit/engine.xml7
-rw-r--r--toolkit/components/telemetry/tests/unit/head.js319
-rw-r--r--toolkit/components/telemetry/tests/unit/test_ChildHistograms.js107
-rw-r--r--toolkit/components/telemetry/tests/unit/test_PingAPI.js502
-rw-r--r--toolkit/components/telemetry/tests/unit/test_SubsessionChaining.js236
-rw-r--r--toolkit/components/telemetry/tests/unit/test_TelemetryController.js507
-rw-r--r--toolkit/components/telemetry/tests/unit/test_TelemetryControllerBuildID.js70
-rw-r--r--toolkit/components/telemetry/tests/unit/test_TelemetryControllerShutdown.js70
-rw-r--r--toolkit/components/telemetry/tests/unit/test_TelemetryController_idle.js73
-rw-r--r--toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js1522
-rw-r--r--toolkit/components/telemetry/tests/unit/test_TelemetryEvents.js249
-rw-r--r--toolkit/components/telemetry/tests/unit/test_TelemetryFlagClear.js14
-rw-r--r--toolkit/components/telemetry/tests/unit/test_TelemetryLateWrites.js127
-rw-r--r--toolkit/components/telemetry/tests/unit/test_TelemetryLockCount.js53
-rw-r--r--toolkit/components/telemetry/tests/unit/test_TelemetryLog.js51
-rw-r--r--toolkit/components/telemetry/tests/unit/test_TelemetryReportingPolicy.js268
-rw-r--r--toolkit/components/telemetry/tests/unit/test_TelemetryScalars.js574
-rw-r--r--toolkit/components/telemetry/tests/unit/test_TelemetrySend.js427
-rw-r--r--toolkit/components/telemetry/tests/unit/test_TelemetrySendOldPings.js547
-rw-r--r--toolkit/components/telemetry/tests/unit/test_TelemetrySession.js2029
-rw-r--r--toolkit/components/telemetry/tests/unit/test_TelemetryTimestamps.js77
-rw-r--r--toolkit/components/telemetry/tests/unit/test_ThreadHangStats.js102
-rw-r--r--toolkit/components/telemetry/tests/unit/test_nsITelemetry.js883
-rw-r--r--toolkit/components/telemetry/tests/unit/xpcshell.ini61
-rw-r--r--toolkit/components/terminator/moz.build10
-rw-r--r--toolkit/components/terminator/tests/xpcshell/.eslintrc.js7
-rw-r--r--toolkit/components/terminator/tests/xpcshell/test_terminator_record.js108
-rw-r--r--toolkit/components/terminator/tests/xpcshell/test_terminator_reload.js85
-rw-r--r--toolkit/components/terminator/tests/xpcshell/xpcshell.ini8
-rw-r--r--toolkit/components/thumbnails/moz.build4
-rw-r--r--toolkit/components/thumbnails/test/.eslintrc.js8
-rw-r--r--toolkit/components/thumbnails/test/authenticate.sjs220
-rw-r--r--toolkit/components/thumbnails/test/background_red.html3
-rw-r--r--toolkit/components/thumbnails/test/background_red_redirect.sjs10
-rw-r--r--toolkit/components/thumbnails/test/background_red_scroll.html3
-rw-r--r--toolkit/components/thumbnails/test/browser.ini38
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_bg_bad_url.js23
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_bg_basic.js20
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_bg_captureIfMissing.js35
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_bg_crash_during_capture.js49
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_bg_crash_while_idle.js38
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_bg_destroy_browser.js33
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_bg_no_alert.js13
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_bg_no_auth_prompt.js21
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_bg_no_cookies_sent.js40
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_bg_no_cookies_stored.js32
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_bg_no_duplicates.js31
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_bg_queueing.js38
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_bg_redirect.js39
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_bg_timeout.js24
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_bug726727.js19
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_bug727765.js29
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_bug818225.js42
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_capture.js20
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_expiration.js97
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_privacy.js74
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_redirect.js30
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_storage.js112
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_storage_migrate3.js102
-rw-r--r--toolkit/components/thumbnails/test/browser_thumbnails_update.js169
-rw-r--r--toolkit/components/thumbnails/test/head.js356
-rw-r--r--toolkit/components/thumbnails/test/privacy_cache_control.sjs16
-rw-r--r--toolkit/components/thumbnails/test/test_thumbnails_interfaces.js25
-rw-r--r--toolkit/components/thumbnails/test/thumbnails_background.sjs79
-rw-r--r--toolkit/components/thumbnails/test/thumbnails_crash_content_helper.js31
-rw-r--r--toolkit/components/thumbnails/test/thumbnails_update.sjs56
-rw-r--r--toolkit/components/thumbnails/test/xpcshell.ini6
-rw-r--r--toolkit/components/timermanager/moz.build9
-rw-r--r--toolkit/components/timermanager/tests/unit/.eslintrc.js7
-rw-r--r--toolkit/components/timermanager/tests/unit/consumerNotifications.js519
-rw-r--r--toolkit/components/timermanager/tests/unit/xpcshell.ini9
-rw-r--r--toolkit/components/tooltiptext/moz.build5
-rw-r--r--toolkit/components/tooltiptext/tests/browser.ini7
-rw-r--r--toolkit/components/tooltiptext/tests/browser_bug329212.js35
-rw-r--r--toolkit/components/tooltiptext/tests/browser_bug331772_xul_tooltiptext_in_html.js19
-rw-r--r--toolkit/components/tooltiptext/tests/browser_bug561623.js24
-rw-r--r--toolkit/components/tooltiptext/tests/browser_bug581947.js87
-rw-r--r--toolkit/components/tooltiptext/tests/browser_input_file_tooltips.js122
-rw-r--r--toolkit/components/tooltiptext/tests/title_test.svg59
-rw-r--r--toolkit/components/tooltiptext/tests/xul_tooltiptext.xhtml14
-rw-r--r--toolkit/components/url-classifier/moz.build2
-rw-r--r--toolkit/components/url-classifier/nsUrlClassifierUtils.cpp4
-rw-r--r--toolkit/components/url-classifier/tests/UrlClassifierTestUtils.jsm98
-rw-r--r--toolkit/components/url-classifier/tests/gtest/Common.cpp78
-rw-r--r--toolkit/components/url-classifier/tests/gtest/Common.h26
-rw-r--r--toolkit/components/url-classifier/tests/gtest/TestChunkSet.cpp279
-rw-r--r--toolkit/components/url-classifier/tests/gtest/TestFailUpdate.cpp97
-rw-r--r--toolkit/components/url-classifier/tests/gtest/TestLookupCacheV4.cpp88
-rw-r--r--toolkit/components/url-classifier/tests/gtest/TestPerProviderDirectory.cpp98
-rw-r--r--toolkit/components/url-classifier/tests/gtest/TestProtocolParser.cpp159
-rw-r--r--toolkit/components/url-classifier/tests/gtest/TestRiceDeltaDecoder.cpp165
-rw-r--r--toolkit/components/url-classifier/tests/gtest/TestSafeBrowsingProtobuf.cpp24
-rw-r--r--toolkit/components/url-classifier/tests/gtest/TestSafebrowsingHash.cpp52
-rw-r--r--toolkit/components/url-classifier/tests/gtest/TestTable.cpp47
-rw-r--r--toolkit/components/url-classifier/tests/gtest/TestUrlClassifierTableUpdateV4.cpp755
-rw-r--r--toolkit/components/url-classifier/tests/gtest/TestUrlClassifierUtils.cpp276
-rw-r--r--toolkit/components/url-classifier/tests/gtest/TestVariableLengthPrefixSet.cpp559
-rw-r--r--toolkit/components/url-classifier/tests/gtest/moz.build27
-rw-r--r--toolkit/components/url-classifier/tests/jar.mn2
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/.eslintrc.js8
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/allowlistAnnotatedFrame.html144
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/bad.css1
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/bad.css^headers^1
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/basic.vtt27
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/basic.vtt^headers^1
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/bug_1281083.html35
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/chrome.ini23
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/classifiedAnnotatedFrame.html213
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/classifiedAnnotatedPBFrame.html24
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/classifierCommon.js112
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/classifierFrame.html57
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/classifierHelper.js201
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/cleanWorker.js10
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/dnt.html31
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/dnt.sjs9
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/evil.css1
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/evil.css^headers^1
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/evil.js1
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/evil.js^headers^2
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/evilWorker.js3
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/gethash.sjs130
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/gethashFrame.html62
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/good.js1
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/import.css3
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/mochitest.ini39
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/ping.sjs16
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/raptor.jpgbin49629 -> 0 bytes
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/seek.webmbin215529 -> 0 bytes
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/test_allowlisted_annotations.html56
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/test_bug1254766.html305
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/test_classified_annotations.html50
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/test_classifier.html65
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/test_classifier_changetablepref.html149
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/test_classifier_worker.html76
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/test_classify_ping.html121
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/test_classify_track.html162
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/test_donottrack.html150
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/test_gethash.html157
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/test_lookup_system_principal.html29
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/test_privatebrowsing_trackingprotection.html154
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/test_safebrowsing_bug1272239.html87
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/test_trackingprotection_bug1157081.html107
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/test_trackingprotection_whitelist.html153
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/track.html7
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/unwantedWorker.js3
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/update.sjs114
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/vp9.webmbin97465 -> 0 bytes
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/whitelistFrame.html15
-rw-r--r--toolkit/components/url-classifier/tests/mochitest/workerFrame.html65
-rw-r--r--toolkit/components/url-classifier/tests/moz.build18
-rw-r--r--toolkit/components/url-classifier/tests/unit/.eslintrc.js7
-rw-r--r--toolkit/components/url-classifier/tests/unit/data/digest1.chunkbin939 -> 0 bytes
-rw-r--r--toolkit/components/url-classifier/tests/unit/data/digest2.chunk2
-rw-r--r--toolkit/components/url-classifier/tests/unit/head_urlclassifier.js429
-rw-r--r--toolkit/components/url-classifier/tests/unit/tail_urlclassifier.js1
-rw-r--r--toolkit/components/url-classifier/tests/unit/test_addsub.js488
-rw-r--r--toolkit/components/url-classifier/tests/unit/test_backoff.js89
-rw-r--r--toolkit/components/url-classifier/tests/unit/test_bug1274685_unowned_list.js32
-rw-r--r--toolkit/components/url-classifier/tests/unit/test_dbservice.js314
-rw-r--r--toolkit/components/url-classifier/tests/unit/test_digest256.js147
-rw-r--r--toolkit/components/url-classifier/tests/unit/test_hashcompleter.js403
-rw-r--r--toolkit/components/url-classifier/tests/unit/test_listmanager.js376
-rw-r--r--toolkit/components/url-classifier/tests/unit/test_partial.js825
-rw-r--r--toolkit/components/url-classifier/tests/unit/test_pref.js14
-rw-r--r--toolkit/components/url-classifier/tests/unit/test_prefixset.js232
-rw-r--r--toolkit/components/url-classifier/tests/unit/test_provider_url.js34
-rw-r--r--toolkit/components/url-classifier/tests/unit/test_safebrowsing_protobuf.js23
-rw-r--r--toolkit/components/url-classifier/tests/unit/test_streamupdater.js288
-rw-r--r--toolkit/components/url-classifier/tests/unit/test_threat_type_conversion.js37
-rw-r--r--toolkit/components/url-classifier/tests/unit/xpcshell.ini24
-rw-r--r--toolkit/components/url-classifier/tests/unittests.xul188
-rw-r--r--toolkit/components/urlformatter/moz.build18
-rw-r--r--toolkit/components/urlformatter/tests/unit/.eslintrc.js7
-rw-r--r--toolkit/components/urlformatter/tests/unit/head_urlformatter.js16
-rw-r--r--toolkit/components/urlformatter/tests/unit/test_urlformatter.js63
-rw-r--r--toolkit/components/urlformatter/tests/unit/xpcshell.ini6
-rw-r--r--toolkit/components/viewsource/moz.build12
-rw-r--r--toolkit/components/viewsource/test/.eslintrc.js7
-rw-r--r--toolkit/components/viewsource/test/browser/.eslintrc.js7
-rw-r--r--toolkit/components/viewsource/test/browser/browser.ini12
-rw-r--r--toolkit/components/viewsource/test/browser/browser_bug464222.js12
-rw-r--r--toolkit/components/viewsource/test/browser/browser_bug699356.js19
-rw-r--r--toolkit/components/viewsource/test/browser/browser_bug713810.js23
-rw-r--r--toolkit/components/viewsource/test/browser/browser_contextmenu.js107
-rw-r--r--toolkit/components/viewsource/test/browser/browser_gotoline.js36
-rw-r--r--toolkit/components/viewsource/test/browser/browser_srcdoc.js30
-rw-r--r--toolkit/components/viewsource/test/browser/browser_viewsourceprefs.js136
-rw-r--r--toolkit/components/viewsource/test/browser/file_bug464222.html1
-rw-r--r--toolkit/components/viewsource/test/browser/head.js200
-rw-r--r--toolkit/components/viewsource/test/chrome.ini4
-rw-r--r--toolkit/components/viewsource/test/file_empty.html1
-rw-r--r--toolkit/components/viewsource/test/test_bug428653.html45
-rw-r--r--toolkit/components/workerloader/moz.build9
-rw-r--r--toolkit/components/workerloader/tests/.eslintrc.js7
-rw-r--r--toolkit/components/workerloader/tests/chrome.ini15
-rw-r--r--toolkit/components/workerloader/tests/moduleA-depends.js14
-rw-r--r--toolkit/components/workerloader/tests/moduleB-dependency.js11
-rw-r--r--toolkit/components/workerloader/tests/moduleC-circular.js18
-rw-r--r--toolkit/components/workerloader/tests/moduleD-circular.js11
-rw-r--r--toolkit/components/workerloader/tests/moduleE-throws-during-require.js10
-rw-r--r--toolkit/components/workerloader/tests/moduleF-syntax-error.js6
-rw-r--r--toolkit/components/workerloader/tests/moduleG-throws-later.js12
-rw-r--r--toolkit/components/workerloader/tests/moduleH-module-dot-exports.js12
-rw-r--r--toolkit/components/workerloader/tests/test_loading.xul41
-rw-r--r--toolkit/components/workerloader/tests/utils_mainthread.js34
-rw-r--r--toolkit/components/workerloader/tests/utils_worker.js32
-rw-r--r--toolkit/components/workerloader/tests/worker_handler.js34
-rw-r--r--toolkit/components/workerloader/tests/worker_test_loading.js121
-rw-r--r--toolkit/components/xulstore/moz.build7
-rw-r--r--toolkit/components/xulstore/tests/chrome/.eslintrc.js7
-rw-r--r--toolkit/components/xulstore/tests/chrome/animals.rdf142
-rw-r--r--toolkit/components/xulstore/tests/chrome/chrome.ini6
-rw-r--r--toolkit/components/xulstore/tests/chrome/test_persistence.xul31
-rw-r--r--toolkit/components/xulstore/tests/chrome/window_persistence.xul98
-rw-r--r--toolkit/components/xulstore/tests/xpcshell/.eslintrc.js7
-rw-r--r--toolkit/components/xulstore/tests/xpcshell/localstore.rdf31
-rw-r--r--toolkit/components/xulstore/tests/xpcshell/test_XULStore.js199
-rw-r--r--toolkit/components/xulstore/tests/xpcshell/xpcshell.ini6
-rw-r--r--toolkit/content/aboutSupport.js10
-rw-r--r--toolkit/content/aboutSupport.xhtml5
-rw-r--r--toolkit/content/aboutTelemetry.js8
-rw-r--r--toolkit/content/buildconfig.html4
-rw-r--r--toolkit/content/contentAreaUtils.js34
-rw-r--r--toolkit/content/jar.mn2
-rw-r--r--toolkit/content/moz.build21
-rw-r--r--toolkit/content/tests/browser/.eslintrc.js7
-rw-r--r--toolkit/content/tests/browser/audio.oggbin14290 -> 0 bytes
-rw-r--r--toolkit/content/tests/browser/browser.ini76
-rw-r--r--toolkit/content/tests/browser/browser_audioCompeting.js115
-rw-r--r--toolkit/content/tests/browser/browser_audioCompeting_onlyForActiveAgent.js176
-rw-r--r--toolkit/content/tests/browser/browser_autoscroll_disabled.js67
-rw-r--r--toolkit/content/tests/browser/browser_block_autoplay_media.js87
-rw-r--r--toolkit/content/tests/browser/browser_bug1170531.js92
-rw-r--r--toolkit/content/tests/browser/browser_bug1198465.js75
-rw-r--r--toolkit/content/tests/browser/browser_bug295977_autoscroll_overflow.js214
-rw-r--r--toolkit/content/tests/browser/browser_bug451286.js152
-rw-r--r--toolkit/content/tests/browser/browser_bug594509.js9
-rw-r--r--toolkit/content/tests/browser/browser_bug982298.js70
-rw-r--r--toolkit/content/tests/browser/browser_contentTitle.js16
-rw-r--r--toolkit/content/tests/browser/browser_content_url_annotation.js73
-rw-r--r--toolkit/content/tests/browser/browser_crash_previous_frameloader.js108
-rw-r--r--toolkit/content/tests/browser/browser_datetime_datepicker.js284
-rw-r--r--toolkit/content/tests/browser/browser_default_image_filename.js45
-rw-r--r--toolkit/content/tests/browser/browser_f7_caret_browsing.js227
-rw-r--r--toolkit/content/tests/browser/browser_findbar.js249
-rw-r--r--toolkit/content/tests/browser/browser_isSynthetic.js72
-rw-r--r--toolkit/content/tests/browser/browser_keyevents_during_autoscrolling.js120
-rw-r--r--toolkit/content/tests/browser/browser_label_textlink.js38
-rw-r--r--toolkit/content/tests/browser/browser_mediaPlayback.js30
-rw-r--r--toolkit/content/tests/browser/browser_mediaPlayback_mute.js104
-rw-r--r--toolkit/content/tests/browser/browser_mediaPlayback_suspended.js191
-rw-r--r--toolkit/content/tests/browser/browser_mediaPlayback_suspended_multipleAudio.js311
-rw-r--r--toolkit/content/tests/browser/browser_mute.js16
-rw-r--r--toolkit/content/tests/browser/browser_mute2.js26
-rw-r--r--toolkit/content/tests/browser/browser_quickfind_editable.js47
-rw-r--r--toolkit/content/tests/browser/browser_saveImageURL.js68
-rw-r--r--toolkit/content/tests/browser/browser_save_resend_postdata.js145
-rw-r--r--toolkit/content/tests/browser/common/mockTransfer.js67
-rw-r--r--toolkit/content/tests/browser/data/post_form_inner.sjs31
-rw-r--r--toolkit/content/tests/browser/data/post_form_outer.sjs34
-rw-r--r--toolkit/content/tests/browser/empty.pngbin14528 -> 0 bytes
-rw-r--r--toolkit/content/tests/browser/file_contentTitle.html14
-rw-r--r--toolkit/content/tests/browser/file_mediaPlayback.html9
-rw-r--r--toolkit/content/tests/browser/file_mediaPlayback2.html12
-rw-r--r--toolkit/content/tests/browser/file_mediaPlaybackFrame.html2
-rw-r--r--toolkit/content/tests/browser/file_mediaPlaybackFrame2.html2
-rw-r--r--toolkit/content/tests/browser/file_multipleAudio.html19
-rw-r--r--toolkit/content/tests/browser/file_multiplePlayingAudio.html23
-rw-r--r--toolkit/content/tests/browser/file_redirect.html13
-rw-r--r--toolkit/content/tests/browser/file_redirect_to.html15
-rw-r--r--toolkit/content/tests/browser/head.js123
-rw-r--r--toolkit/content/tests/browser/image.jpgbin24204 -> 0 bytes
-rw-r--r--toolkit/content/tests/browser/image_page.html9
-rw-r--r--toolkit/content/tests/chrome/.eslintrc.js7
-rw-r--r--toolkit/content/tests/chrome/RegisterUnregisterChrome.js161
-rw-r--r--toolkit/content/tests/chrome/bug263683_window.xul210
-rw-r--r--toolkit/content/tests/chrome/bug304188_window.xul94
-rw-r--r--toolkit/content/tests/chrome/bug331215_window.xul102
-rw-r--r--toolkit/content/tests/chrome/bug360437_window.xul120
-rw-r--r--toolkit/content/tests/chrome/bug366992_window.xul57
-rw-r--r--toolkit/content/tests/chrome/bug409624_window.xul98
-rw-r--r--toolkit/content/tests/chrome/bug429723_window.xul84
-rw-r--r--toolkit/content/tests/chrome/bug451540_window.xul248
-rw-r--r--toolkit/content/tests/chrome/bug624329_window.xul22
-rw-r--r--toolkit/content/tests/chrome/chrome.ini199
-rw-r--r--toolkit/content/tests/chrome/dialog_dialogfocus.xul57
-rw-r--r--toolkit/content/tests/chrome/file_about_networking_wsh.py9
-rw-r--r--toolkit/content/tests/chrome/file_autocomplete_with_composition.js540
-rw-r--r--toolkit/content/tests/chrome/findbar_entireword_window.xul275
-rw-r--r--toolkit/content/tests/chrome/findbar_events_window.xul173
-rw-r--r--toolkit/content/tests/chrome/findbar_window.xul756
-rw-r--r--toolkit/content/tests/chrome/frame_popup_anchor.xul82
-rw-r--r--toolkit/content/tests/chrome/frame_popupremoving_frame.xul75
-rw-r--r--toolkit/content/tests/chrome/frame_subframe_origin_subframe1.xul43
-rw-r--r--toolkit/content/tests/chrome/frame_subframe_origin_subframe2.xul39
-rw-r--r--toolkit/content/tests/chrome/popup_childframe_node.xul2
-rw-r--r--toolkit/content/tests/chrome/popup_trigger.js859
-rw-r--r--toolkit/content/tests/chrome/rtlchrome/rtl.css2
-rw-r--r--toolkit/content/tests/chrome/rtlchrome/rtl.dtd1
-rw-r--r--toolkit/content/tests/chrome/rtlchrome/rtl.manifest5
-rw-r--r--toolkit/content/tests/chrome/rtltest/content/dirtest.xul25
-rw-r--r--toolkit/content/tests/chrome/rtltest/righttoleft.manifest3
-rw-r--r--toolkit/content/tests/chrome/sample_entireword_latin1.html11
-rw-r--r--toolkit/content/tests/chrome/test_about_networking.html58
-rw-r--r--toolkit/content/tests/chrome/test_arrowpanel.xul327
-rw-r--r--toolkit/content/tests/chrome/test_autocomplete2.xul197
-rw-r--r--toolkit/content/tests/chrome/test_autocomplete3.xul188
-rw-r--r--toolkit/content/tests/chrome/test_autocomplete4.xul280
-rw-r--r--toolkit/content/tests/chrome/test_autocomplete5.xul152
-rw-r--r--toolkit/content/tests/chrome/test_autocomplete_delayOnPaste.xul128
-rw-r--r--toolkit/content/tests/chrome/test_autocomplete_emphasis.xul175
-rw-r--r--toolkit/content/tests/chrome/test_autocomplete_mac_caret.xul74
-rw-r--r--toolkit/content/tests/chrome/test_autocomplete_placehold_last_complete.xul309
-rw-r--r--toolkit/content/tests/chrome/test_autocomplete_with_composition_on_input.html64
-rw-r--r--toolkit/content/tests/chrome/test_autocomplete_with_composition_on_textbox.xul124
-rw-r--r--toolkit/content/tests/chrome/test_browser_drop.xul38
-rw-r--r--toolkit/content/tests/chrome/test_bug1048178.xul86
-rw-r--r--toolkit/content/tests/chrome/test_bug253481.xul90
-rw-r--r--toolkit/content/tests/chrome/test_bug263683.xul39
-rw-r--r--toolkit/content/tests/chrome/test_bug304188.xul37
-rw-r--r--toolkit/content/tests/chrome/test_bug331215.xul38
-rw-r--r--toolkit/content/tests/chrome/test_bug360220.xul61
-rw-r--r--toolkit/content/tests/chrome/test_bug360437.xul40
-rw-r--r--toolkit/content/tests/chrome/test_bug365773.xul67
-rw-r--r--toolkit/content/tests/chrome/test_bug366992.xul40
-rw-r--r--toolkit/content/tests/chrome/test_bug382990.xul44
-rw-r--r--toolkit/content/tests/chrome/test_bug409624.xul39
-rw-r--r--toolkit/content/tests/chrome/test_bug418874.xul71
-rw-r--r--toolkit/content/tests/chrome/test_bug429723.xul38
-rw-r--r--toolkit/content/tests/chrome/test_bug437844.xul95
-rw-r--r--toolkit/content/tests/chrome/test_bug451540.xul39
-rw-r--r--toolkit/content/tests/chrome/test_bug457632.xul178
-rw-r--r--toolkit/content/tests/chrome/test_bug460942.xul42
-rw-r--r--toolkit/content/tests/chrome/test_bug471776.xul47
-rw-r--r--toolkit/content/tests/chrome/test_bug509732.xul53
-rw-r--r--toolkit/content/tests/chrome/test_bug554279.xul39
-rw-r--r--toolkit/content/tests/chrome/test_bug557987.xul76
-rw-r--r--toolkit/content/tests/chrome/test_bug562554.xul92
-rw-r--r--toolkit/content/tests/chrome/test_bug570192.xul53
-rw-r--r--toolkit/content/tests/chrome/test_bug585946.xul51
-rw-r--r--toolkit/content/tests/chrome/test_bug624329.xul160
-rw-r--r--toolkit/content/tests/chrome/test_bug792324.xul75
-rw-r--r--toolkit/content/tests/chrome/test_button.xul71
-rw-r--r--toolkit/content/tests/chrome/test_chromemargin.xul36
-rw-r--r--toolkit/content/tests/chrome/test_closemenu_attribute.xul96
-rw-r--r--toolkit/content/tests/chrome/test_colorpicker_popup.xul148
-rw-r--r--toolkit/content/tests/chrome/test_contextmenu_list.xul288
-rw-r--r--toolkit/content/tests/chrome/test_cursorsnap.xul127
-rw-r--r--toolkit/content/tests/chrome/test_datepicker.xul415
-rw-r--r--toolkit/content/tests/chrome/test_deck.xul133
-rw-r--r--toolkit/content/tests/chrome/test_dialogfocus.xul102
-rw-r--r--toolkit/content/tests/chrome/test_findbar.xul47
-rw-r--r--toolkit/content/tests/chrome/test_findbar_entireword.xul41
-rw-r--r--toolkit/content/tests/chrome/test_findbar_events.xul39
-rw-r--r--toolkit/content/tests/chrome/test_focus_anons.xul119
-rw-r--r--toolkit/content/tests/chrome/test_hiddenitems.xul89
-rw-r--r--toolkit/content/tests/chrome/test_hiddenpaging.xul161
-rw-r--r--toolkit/content/tests/chrome/test_keys.xul29
-rw-r--r--toolkit/content/tests/chrome/test_labelcontrol.xul44
-rw-r--r--toolkit/content/tests/chrome/test_largemenu.xul29
-rw-r--r--toolkit/content/tests/chrome/test_menu.xul85
-rw-r--r--toolkit/content/tests/chrome/test_menu_anchored.xul77
-rw-r--r--toolkit/content/tests/chrome/test_menu_hide.xul58
-rw-r--r--toolkit/content/tests/chrome/test_menuchecks.xul147
-rw-r--r--toolkit/content/tests/chrome/test_menuitem_blink.xul106
-rw-r--r--toolkit/content/tests/chrome/test_menuitem_commands.xul104
-rw-r--r--toolkit/content/tests/chrome/test_menulist.xul314
-rw-r--r--toolkit/content/tests/chrome/test_menulist_keynav.xul272
-rw-r--r--toolkit/content/tests/chrome/test_menulist_null_value.xul96
-rw-r--r--toolkit/content/tests/chrome/test_menulist_paging.xul163
-rw-r--r--toolkit/content/tests/chrome/test_menulist_position.xul97
-rw-r--r--toolkit/content/tests/chrome/test_mousescroll.xul274
-rw-r--r--toolkit/content/tests/chrome/test_notificationbox.xul522
-rw-r--r--toolkit/content/tests/chrome/test_panel.xul31
-rw-r--r--toolkit/content/tests/chrome/test_panel_focus.xul38
-rw-r--r--toolkit/content/tests/chrome/test_panelfrommenu.xul118
-rw-r--r--toolkit/content/tests/chrome/test_popup_anchor.xul30
-rw-r--r--toolkit/content/tests/chrome/test_popup_anchoratrect.xul28
-rw-r--r--toolkit/content/tests/chrome/test_popup_attribute.xul28
-rw-r--r--toolkit/content/tests/chrome/test_popup_button.xul28
-rw-r--r--toolkit/content/tests/chrome/test_popup_coords.xul91
-rw-r--r--toolkit/content/tests/chrome/test_popup_keys.xul148
-rw-r--r--toolkit/content/tests/chrome/test_popup_moveToAnchor.xul84
-rw-r--r--toolkit/content/tests/chrome/test_popup_preventdefault.xul76
-rw-r--r--toolkit/content/tests/chrome/test_popup_preventdefault_chrome.xul29
-rw-r--r--toolkit/content/tests/chrome/test_popup_recreate.xul83
-rw-r--r--toolkit/content/tests/chrome/test_popup_scaled.xul105
-rw-r--r--toolkit/content/tests/chrome/test_popup_tree.xul72
-rw-r--r--toolkit/content/tests/chrome/test_popuphidden.xul74
-rw-r--r--toolkit/content/tests/chrome/test_popupincontent.xul131
-rw-r--r--toolkit/content/tests/chrome/test_popupremoving.xul165
-rw-r--r--toolkit/content/tests/chrome/test_popupremoving_frame.xul80
-rw-r--r--toolkit/content/tests/chrome/test_position.xul136
-rw-r--r--toolkit/content/tests/chrome/test_preferences.xul533
-rw-r--r--toolkit/content/tests/chrome/test_preferences_beforeaccept.xul55
-rw-r--r--toolkit/content/tests/chrome/test_preferences_onsyncfrompreference.xul62
-rw-r--r--toolkit/content/tests/chrome/test_progressmeter.xul74
-rw-r--r--toolkit/content/tests/chrome/test_props.xul91
-rw-r--r--toolkit/content/tests/chrome/test_radio.xul66
-rw-r--r--toolkit/content/tests/chrome/test_richlist_direction.xul138
-rw-r--r--toolkit/content/tests/chrome/test_righttoleft.xul126
-rw-r--r--toolkit/content/tests/chrome/test_scale.xul277
-rw-r--r--toolkit/content/tests/chrome/test_scaledrag.xul197
-rw-r--r--toolkit/content/tests/chrome/test_screenPersistence.xul63
-rw-r--r--toolkit/content/tests/chrome/test_scrollbar.xul137
-rw-r--r--toolkit/content/tests/chrome/test_showcaret.xul101
-rw-r--r--toolkit/content/tests/chrome/test_sorttemplate.xul89
-rw-r--r--toolkit/content/tests/chrome/test_statusbar.xul42
-rw-r--r--toolkit/content/tests/chrome/test_subframe_origin.xul37
-rw-r--r--toolkit/content/tests/chrome/test_tabbox.xul224
-rw-r--r--toolkit/content/tests/chrome/test_tabindex.xul120
-rw-r--r--toolkit/content/tests/chrome/test_textbox_dictionary.xul98
-rw-r--r--toolkit/content/tests/chrome/test_textbox_emptytext.xul48
-rw-r--r--toolkit/content/tests/chrome/test_textbox_number.xul353
-rw-r--r--toolkit/content/tests/chrome/test_textbox_search.xul170
-rw-r--r--toolkit/content/tests/chrome/test_timepicker.xul207
-rw-r--r--toolkit/content/tests/chrome/test_titlebar.xul35
-rw-r--r--toolkit/content/tests/chrome/test_toolbar.xul227
-rw-r--r--toolkit/content/tests/chrome/test_tooltip.xul28
-rw-r--r--toolkit/content/tests/chrome/test_tooltip_noautohide.xul57
-rw-r--r--toolkit/content/tests/chrome/test_tree.xul84
-rw-r--r--toolkit/content/tests/chrome/test_tree_hier.xul136
-rw-r--r--toolkit/content/tests/chrome/test_tree_hier_cell.xul136
-rw-r--r--toolkit/content/tests/chrome/test_tree_single.xul110
-rw-r--r--toolkit/content/tests/chrome/test_tree_view.xul118
-rw-r--r--toolkit/content/tests/chrome/window_browser_drop.xul242
-rw-r--r--toolkit/content/tests/chrome/window_chromemargin.xul73
-rw-r--r--toolkit/content/tests/chrome/window_cursorsnap_dialog.xul104
-rw-r--r--toolkit/content/tests/chrome/window_cursorsnap_wizard.xul111
-rw-r--r--toolkit/content/tests/chrome/window_keys.xul202
-rw-r--r--toolkit/content/tests/chrome/window_largemenu.xul425
-rw-r--r--toolkit/content/tests/chrome/window_panel.xul312
-rw-r--r--toolkit/content/tests/chrome/window_panel_focus.xul132
-rw-r--r--toolkit/content/tests/chrome/window_popup_anchor.xul28
-rw-r--r--toolkit/content/tests/chrome/window_popup_anchoratrect.xul117
-rw-r--r--toolkit/content/tests/chrome/window_popup_attribute.xul40
-rw-r--r--toolkit/content/tests/chrome/window_popup_button.xul41
-rw-r--r--toolkit/content/tests/chrome/window_popup_preventdefault_chrome.xul113
-rw-r--r--toolkit/content/tests/chrome/window_preferences.xul73
-rw-r--r--toolkit/content/tests/chrome/window_preferences2.xul25
-rw-r--r--toolkit/content/tests/chrome/window_preferences3.xul74
-rw-r--r--toolkit/content/tests/chrome/window_preferences_beforeaccept.xul45
-rw-r--r--toolkit/content/tests/chrome/window_preferences_commandretarget.xul36
-rw-r--r--toolkit/content/tests/chrome/window_preferences_onsyncfrompreference.xul42
-rw-r--r--toolkit/content/tests/chrome/window_screenPosSize.xul17
-rw-r--r--toolkit/content/tests/chrome/window_showcaret.xul10
-rw-r--r--toolkit/content/tests/chrome/window_subframe_origin.xul42
-rw-r--r--toolkit/content/tests/chrome/window_titlebar.xul223
-rw-r--r--toolkit/content/tests/chrome/window_tooltip.xul311
-rw-r--r--toolkit/content/tests/chrome/xul_selectcontrol.js390
-rw-r--r--toolkit/content/tests/fennec-tile-testapp/application.ini11
-rw-r--r--toolkit/content/tests/fennec-tile-testapp/chrome/chrome.manifest1
-rw-r--r--toolkit/content/tests/fennec-tile-testapp/chrome/content/BrowserView.js694
-rw-r--r--toolkit/content/tests/fennec-tile-testapp/chrome/content/FooScript.js352
-rw-r--r--toolkit/content/tests/fennec-tile-testapp/chrome/content/TileManager.js1018
-rw-r--r--toolkit/content/tests/fennec-tile-testapp/chrome/content/WidgetStack.js1438
-rw-r--r--toolkit/content/tests/fennec-tile-testapp/chrome/content/firefoxOverlay.xul15
-rw-r--r--toolkit/content/tests/fennec-tile-testapp/chrome/content/foo.xul460
-rw-r--r--toolkit/content/tests/fennec-tile-testapp/chrome/content/main.xul7
-rw-r--r--toolkit/content/tests/fennec-tile-testapp/chrome/content/overlay.js15
-rw-r--r--toolkit/content/tests/fennec-tile-testapp/chrome/locale/en-US/tile.dtd1
-rw-r--r--toolkit/content/tests/fennec-tile-testapp/chrome/locale/en-US/tile.properties3
-rw-r--r--toolkit/content/tests/fennec-tile-testapp/chrome/skin/overlay.css5
-rw-r--r--toolkit/content/tests/fennec-tile-testapp/defaults/preferences/prefs.js2
-rw-r--r--toolkit/content/tests/fennec-tile-testapp/install.rdf17
-rw-r--r--toolkit/content/tests/fennec-tile-testapp/logread.py104
-rw-r--r--toolkit/content/tests/mochitest/mochitest.ini5
-rw-r--r--toolkit/content/tests/mochitest/test_autocomplete_change_after_focus.html105
-rw-r--r--toolkit/content/tests/mochitest/test_mousecapture.xhtml340
-rw-r--r--toolkit/content/tests/moz.build19
-rw-r--r--toolkit/content/tests/reftests/bug-442419-progressmeter-max-ref.xul7
-rw-r--r--toolkit/content/tests/reftests/bug-442419-progressmeter-max.xul7
-rw-r--r--toolkit/content/tests/reftests/textbox-multiline-default-value.xul5
-rw-r--r--toolkit/content/tests/reftests/textbox-multiline-empty.xul5
-rw-r--r--toolkit/content/tests/unit/.eslintrc.js7
-rw-r--r--toolkit/content/tests/unit/test_contentAreaUtils.js80
-rw-r--r--toolkit/content/tests/unit/xpcshell.ini5
-rw-r--r--toolkit/content/tests/widgets/.eslintrc.js8
-rw-r--r--toolkit/content/tests/widgets/audio.oggbin14293 -> 0 bytes
-rw-r--r--toolkit/content/tests/widgets/audio.wavbin1422 -> 0 bytes
-rw-r--r--toolkit/content/tests/widgets/chrome.ini20
-rw-r--r--toolkit/content/tests/widgets/head.js23
-rw-r--r--toolkit/content/tests/widgets/mochitest.ini40
-rw-r--r--toolkit/content/tests/widgets/popup_shared.js424
-rw-r--r--toolkit/content/tests/widgets/seek_with_sound.oggbin299507 -> 0 bytes
-rw-r--r--toolkit/content/tests/widgets/test_audiocontrols_dimensions.html38
-rw-r--r--toolkit/content/tests/widgets/test_bug898940.html31
-rw-r--r--toolkit/content/tests/widgets/test_contextmenu_menugroup.xul102
-rw-r--r--toolkit/content/tests/widgets/test_contextmenu_nested.xul138
-rw-r--r--toolkit/content/tests/widgets/test_editor_currentURI.xul39
-rw-r--r--toolkit/content/tests/widgets/test_menubar.xul30
-rw-r--r--toolkit/content/tests/widgets/test_mousecapture_area.html109
-rw-r--r--toolkit/content/tests/widgets/test_popupanchor.xul430
-rw-r--r--toolkit/content/tests/widgets/test_popupreflows.xul111
-rw-r--r--toolkit/content/tests/widgets/test_tree_column_reorder.xul76
-rw-r--r--toolkit/content/tests/widgets/test_videocontrols.html411
-rw-r--r--toolkit/content/tests/widgets/test_videocontrols_audio.html60
-rw-r--r--toolkit/content/tests/widgets/test_videocontrols_audio_direction.html31
-rw-r--r--toolkit/content/tests/widgets/test_videocontrols_iframe_fullscreen.html64
-rw-r--r--toolkit/content/tests/widgets/test_videocontrols_jsdisabled.html70
-rw-r--r--toolkit/content/tests/widgets/test_videocontrols_onclickplay.html74
-rw-r--r--toolkit/content/tests/widgets/test_videocontrols_standalone.html90
-rw-r--r--toolkit/content/tests/widgets/test_videocontrols_video_direction.html31
-rw-r--r--toolkit/content/tests/widgets/test_videocontrols_vtt.html133
-rw-r--r--toolkit/content/tests/widgets/tree_shared.js1405
-rw-r--r--toolkit/content/tests/widgets/video.oggbin285310 -> 0 bytes
-rw-r--r--toolkit/content/tests/widgets/videocontrols_direction-1-ref.html10
-rw-r--r--toolkit/content/tests/widgets/videocontrols_direction-1a.html10
-rw-r--r--toolkit/content/tests/widgets/videocontrols_direction-1b.html10
-rw-r--r--toolkit/content/tests/widgets/videocontrols_direction-1c.html10
-rw-r--r--toolkit/content/tests/widgets/videocontrols_direction-1d.html10
-rw-r--r--toolkit/content/tests/widgets/videocontrols_direction-1e.html10
-rw-r--r--toolkit/content/tests/widgets/videocontrols_direction-2-ref.html10
-rw-r--r--toolkit/content/tests/widgets/videocontrols_direction-2a.html10
-rw-r--r--toolkit/content/tests/widgets/videocontrols_direction-2b.html10
-rw-r--r--toolkit/content/tests/widgets/videocontrols_direction-2c.html10
-rw-r--r--toolkit/content/tests/widgets/videocontrols_direction-2d.html10
-rw-r--r--toolkit/content/tests/widgets/videocontrols_direction-2e.html10
-rw-r--r--toolkit/content/tests/widgets/videocontrols_direction_test.js90
-rw-r--r--toolkit/content/tests/widgets/videomask.css23
-rw-r--r--toolkit/content/tests/widgets/window_menubar.xul820
-rw-r--r--toolkit/forgetaboutsite/ForgetAboutSite.jsm7
-rw-r--r--toolkit/forgetaboutsite/moz.build10
-rw-r--r--toolkit/forgetaboutsite/test/browser/.eslintrc.js7
-rw-r--r--toolkit/forgetaboutsite/test/browser/browser.ini4
-rw-r--r--toolkit/forgetaboutsite/test/browser/browser_clearplugindata.html30
-rw-r--r--toolkit/forgetaboutsite/test/browser/browser_clearplugindata.js86
-rw-r--r--toolkit/forgetaboutsite/test/unit/.eslintrc.js7
-rw-r--r--toolkit/forgetaboutsite/test/unit/head_forgetaboutsite.js31
-rw-r--r--toolkit/forgetaboutsite/test/unit/test_removeDataFromDomain.js647
-rw-r--r--toolkit/forgetaboutsite/test/unit/xpcshell.ini8
-rw-r--r--toolkit/identity/moz.build11
-rw-r--r--toolkit/identity/tests/chrome/.eslintrc.js7
-rw-r--r--toolkit/identity/tests/chrome/chrome.ini13
-rw-r--r--toolkit/identity/tests/chrome/sandbox_content.html32
-rw-r--r--toolkit/identity/tests/chrome/sandbox_content.sjs36
-rw-r--r--toolkit/identity/tests/chrome/sandbox_content_alert.html20
-rw-r--r--toolkit/identity/tests/chrome/sandbox_content_framed.html17
-rw-r--r--toolkit/identity/tests/chrome/sandbox_content_perms.html64
-rw-r--r--toolkit/identity/tests/chrome/sandbox_content_popup.html25
-rw-r--r--toolkit/identity/tests/chrome/sandbox_content_redirect.html2
-rw-r--r--toolkit/identity/tests/chrome/sandbox_content_redirect.html^headers^2
-rw-r--r--toolkit/identity/tests/chrome/test_sandbox.xul324
-rw-r--r--toolkit/identity/tests/unit/.eslintrc.js7
-rw-r--r--toolkit/identity/tests/unit/data/idp_1/.well-known/browserid5
-rw-r--r--toolkit/identity/tests/unit/data/idp_invalid_1/.well-known/browserid5
-rw-r--r--toolkit/identity/tests/unit/head_identity.js248
-rw-r--r--toolkit/identity/tests/unit/tail_identity.js8
-rw-r--r--toolkit/identity/tests/unit/test_authentication.js159
-rw-r--r--toolkit/identity/tests/unit/test_crypto_service.js122
-rw-r--r--toolkit/identity/tests/unit/test_identity.js114
-rw-r--r--toolkit/identity/tests/unit/test_identity_utils.js46
-rw-r--r--toolkit/identity/tests/unit/test_jwcrypto.js281
-rw-r--r--toolkit/identity/tests/unit/test_load_modules.js20
-rw-r--r--toolkit/identity/tests/unit/test_log_utils.js74
-rw-r--r--toolkit/identity/tests/unit/test_minimalidentity.js223
-rw-r--r--toolkit/identity/tests/unit/test_observer_topics.js114
-rw-r--r--toolkit/identity/tests/unit/test_provisioning.js242
-rw-r--r--toolkit/identity/tests/unit/test_relying_party.js255
-rw-r--r--toolkit/identity/tests/unit/test_store.js64
-rw-r--r--toolkit/identity/tests/unit/test_well-known.js90
-rw-r--r--toolkit/identity/tests/unit/xpcshell.ini23
-rw-r--r--toolkit/library/libxul.mk2
-rw-r--r--toolkit/library/moz.build2
-rw-r--r--toolkit/locales/Makefile.in3
-rw-r--r--toolkit/locales/jar.mn2
-rw-r--r--toolkit/locales/update.locale1
-rw-r--r--toolkit/modules/ExtensionStorage.jsm241
-rw-r--r--toolkit/modules/Services.jsm3
-rw-r--r--toolkit/modules/UpdateUtils.jsm320
-rw-r--r--toolkit/modules/moz.build30
-rw-r--r--toolkit/modules/subprocess/moz.build6
-rw-r--r--toolkit/modules/subprocess/test/xpcshell/.eslintrc.js5
-rw-r--r--toolkit/modules/subprocess/test/xpcshell/data_test_script.py55
-rw-r--r--toolkit/modules/subprocess/test/xpcshell/data_text_file.txt0
-rw-r--r--toolkit/modules/subprocess/test/xpcshell/head.js14
-rw-r--r--toolkit/modules/subprocess/test/xpcshell/test_subprocess.js769
-rw-r--r--toolkit/modules/subprocess/test/xpcshell/test_subprocess_getEnvironment.js17
-rw-r--r--toolkit/modules/subprocess/test/xpcshell/test_subprocess_pathSearch.js73
-rw-r--r--toolkit/modules/subprocess/test/xpcshell/xpcshell.ini14
-rw-r--r--toolkit/modules/tests/MockDocument.jsm50
-rw-r--r--toolkit/modules/tests/PromiseTestUtils.jsm241
-rw-r--r--toolkit/modules/tests/browser/.eslintrc.js7
-rw-r--r--toolkit/modules/tests/browser/WebRequest_dynamic.sjs13
-rw-r--r--toolkit/modules/tests/browser/WebRequest_redirection.sjs4
-rw-r--r--toolkit/modules/tests/browser/browser.ini41
-rw-r--r--toolkit/modules/tests/browser/browser_AsyncPrefs.js97
-rw-r--r--toolkit/modules/tests/browser/browser_Battery.js51
-rw-r--r--toolkit/modules/tests/browser/browser_Deprecated.js157
-rw-r--r--toolkit/modules/tests/browser/browser_Finder.js62
-rw-r--r--toolkit/modules/tests/browser/browser_FinderHighlighter.js460
-rw-r--r--toolkit/modules/tests/browser/browser_Finder_hidden_textarea.js52
-rw-r--r--toolkit/modules/tests/browser/browser_Geometry.js111
-rw-r--r--toolkit/modules/tests/browser/browser_InlineSpellChecker.js121
-rw-r--r--toolkit/modules/tests/browser/browser_PageMetadata.js73
-rw-r--r--toolkit/modules/tests/browser/browser_PromiseMessage.js38
-rw-r--r--toolkit/modules/tests/browser/browser_RemotePageManager.js400
-rw-r--r--toolkit/modules/tests/browser/browser_Troubleshoot.js559
-rw-r--r--toolkit/modules/tests/browser/browser_WebNavigation.js140
-rw-r--r--toolkit/modules/tests/browser/browser_WebRequest.js214
-rw-r--r--toolkit/modules/tests/browser/browser_WebRequest_cookies.js89
-rw-r--r--toolkit/modules/tests/browser/browser_WebRequest_filtering.js118
-rw-r--r--toolkit/modules/tests/browser/dummy_page.html7
-rw-r--r--toolkit/modules/tests/browser/file_FinderSample.html824
-rw-r--r--toolkit/modules/tests/browser/file_WebNavigation_page1.html9
-rw-r--r--toolkit/modules/tests/browser/file_WebNavigation_page2.html7
-rw-r--r--toolkit/modules/tests/browser/file_WebNavigation_page3.html9
-rw-r--r--toolkit/modules/tests/browser/file_WebRequest_page1.html29
-rw-r--r--toolkit/modules/tests/browser/file_WebRequest_page2.html25
-rw-r--r--toolkit/modules/tests/browser/file_image_bad.pngbin5401 -> 0 bytes
-rw-r--r--toolkit/modules/tests/browser/file_image_good.pngbin580 -> 0 bytes
-rw-r--r--toolkit/modules/tests/browser/file_image_redirect.pngbin5401 -> 0 bytes
-rw-r--r--toolkit/modules/tests/browser/file_script_bad.js1
-rw-r--r--toolkit/modules/tests/browser/file_script_good.js1
-rw-r--r--toolkit/modules/tests/browser/file_script_redirect.js2
-rw-r--r--toolkit/modules/tests/browser/file_script_xhr.js3
-rw-r--r--toolkit/modules/tests/browser/file_style_bad.css3
-rw-r--r--toolkit/modules/tests/browser/file_style_good.css3
-rw-r--r--toolkit/modules/tests/browser/file_style_redirect.css3
-rw-r--r--toolkit/modules/tests/browser/head.js23
-rw-r--r--toolkit/modules/tests/browser/metadata_simple.html10
-rw-r--r--toolkit/modules/tests/browser/metadata_titles.html11
-rw-r--r--toolkit/modules/tests/browser/metadata_titles_fallback.html10
-rw-r--r--toolkit/modules/tests/browser/testremotepagemanager.html66
-rw-r--r--toolkit/modules/tests/chrome/.eslintrc.js7
-rw-r--r--toolkit/modules/tests/chrome/chrome.ini3
-rw-r--r--toolkit/modules/tests/chrome/test_bug544442_checkCert.xul155
-rw-r--r--toolkit/modules/tests/mochitest/.eslintrc.js7
-rw-r--r--toolkit/modules/tests/mochitest/mochitest.ini3
-rw-r--r--toolkit/modules/tests/mochitest/test_spatial_navigation.html76
-rw-r--r--toolkit/modules/tests/xpcshell/.eslintrc.js7
-rw-r--r--toolkit/modules/tests/xpcshell/TestIntegration.jsm42
-rw-r--r--toolkit/modules/tests/xpcshell/chromeappsstore.sqlitebin262144 -> 0 bytes
-rw-r--r--toolkit/modules/tests/xpcshell/propertyLists/bug710259_propertyListBinary.plistbin3277 -> 0 bytes
-rw-r--r--toolkit/modules/tests/xpcshell/propertyLists/bug710259_propertyListXML.plist28
-rw-r--r--toolkit/modules/tests/xpcshell/test_BinarySearch.js81
-rw-r--r--toolkit/modules/tests/xpcshell/test_CanonicalJSON.js146
-rw-r--r--toolkit/modules/tests/xpcshell/test_Color.js53
-rw-r--r--toolkit/modules/tests/xpcshell/test_DeferredTask.js390
-rw-r--r--toolkit/modules/tests/xpcshell/test_FileUtils.js226
-rw-r--r--toolkit/modules/tests/xpcshell/test_FinderIterator.js265
-rw-r--r--toolkit/modules/tests/xpcshell/test_GMPInstallManager.js794
-rw-r--r--toolkit/modules/tests/xpcshell/test_Http.js257
-rw-r--r--toolkit/modules/tests/xpcshell/test_Integration.js238
-rw-r--r--toolkit/modules/tests/xpcshell/test_JSONFile.js242
-rw-r--r--toolkit/modules/tests/xpcshell/test_Log.js592
-rw-r--r--toolkit/modules/tests/xpcshell/test_Log_stackTrace.js30
-rw-r--r--toolkit/modules/tests/xpcshell/test_MatchGlobs.js58
-rw-r--r--toolkit/modules/tests/xpcshell/test_MatchPattern.js95
-rw-r--r--toolkit/modules/tests/xpcshell/test_MatchURLFilters.js396
-rw-r--r--toolkit/modules/tests/xpcshell/test_NewTabUtils.js378
-rw-r--r--toolkit/modules/tests/xpcshell/test_ObjectUtils.js96
-rw-r--r--toolkit/modules/tests/xpcshell/test_ObjectUtils_strict.js29
-rw-r--r--toolkit/modules/tests/xpcshell/test_PermissionsUtils.js85
-rw-r--r--toolkit/modules/tests/xpcshell/test_Preferences.js378
-rw-r--r--toolkit/modules/tests/xpcshell/test_Promise.js1105
-rw-r--r--toolkit/modules/tests/xpcshell/test_PromiseUtils.js105
-rw-r--r--toolkit/modules/tests/xpcshell/test_Services.js90
-rw-r--r--toolkit/modules/tests/xpcshell/test_UpdateUtils_updatechannel.js38
-rw-r--r--toolkit/modules/tests/xpcshell/test_UpdateUtils_url.js292
-rw-r--r--toolkit/modules/tests/xpcshell/test_ZipUtils.js79
-rw-r--r--toolkit/modules/tests/xpcshell/test_client_id.js95
-rw-r--r--toolkit/modules/tests/xpcshell/test_jsesc.js9
-rw-r--r--toolkit/modules/tests/xpcshell/test_propertyListsUtils.js106
-rw-r--r--toolkit/modules/tests/xpcshell/test_readCertPrefs.js97
-rw-r--r--toolkit/modules/tests/xpcshell/test_servicerequest_xhr.js25
-rw-r--r--toolkit/modules/tests/xpcshell/test_session_recorder.js306
-rw-r--r--toolkit/modules/tests/xpcshell/test_sqlite.js1094
-rw-r--r--toolkit/modules/tests/xpcshell/test_sqlite_shutdown.js122
-rw-r--r--toolkit/modules/tests/xpcshell/test_task.js642
-rw-r--r--toolkit/modules/tests/xpcshell/test_timer.js57
-rw-r--r--toolkit/modules/tests/xpcshell/test_web_channel.js149
-rw-r--r--toolkit/modules/tests/xpcshell/test_web_channel_broker.js88
-rw-r--r--toolkit/modules/tests/xpcshell/xpcshell.ini75
-rw-r--r--toolkit/modules/tests/xpcshell/zips/zen.zipbin1226 -> 0 bytes
-rw-r--r--toolkit/moz.build28
-rw-r--r--toolkit/moz.configure51
-rw-r--r--toolkit/mozapps/downloads/moz.build10
-rw-r--r--toolkit/mozapps/downloads/tests/chrome/.eslintrc.js7
-rw-r--r--toolkit/mozapps/downloads/tests/chrome/chrome.ini10
-rw-r--r--toolkit/mozapps/downloads/tests/chrome/test_unknownContentType_delayedbutton.xul117
-rw-r--r--toolkit/mozapps/downloads/tests/chrome/test_unknownContentType_dialog_layout.xul108
-rw-r--r--toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.pif1
-rw-r--r--toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.pif^headers^1
-rw-r--r--toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.txt1
-rw-r--r--toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.txt^headers^2
-rw-r--r--toolkit/mozapps/downloads/tests/moz.build8
-rw-r--r--toolkit/mozapps/downloads/tests/unit/.eslintrc.js7
-rw-r--r--toolkit/mozapps/downloads/tests/unit/head_downloads.js5
-rw-r--r--toolkit/mozapps/downloads/tests/unit/test_DownloadPaths.js131
-rw-r--r--toolkit/mozapps/downloads/tests/unit/test_DownloadUtils.js237
-rw-r--r--toolkit/mozapps/downloads/tests/unit/test_lowMinutes.js55
-rw-r--r--toolkit/mozapps/downloads/tests/unit/test_syncedDownloadUtils.js26
-rw-r--r--toolkit/mozapps/downloads/tests/unit/test_unspecified_arguments.js25
-rw-r--r--toolkit/mozapps/downloads/tests/unit/xpcshell.ini10
-rw-r--r--toolkit/mozapps/extensions/extensions.manifest6
-rw-r--r--toolkit/mozapps/extensions/internal/moz.build7
-rw-r--r--toolkit/mozapps/installer/l10n-repack.py1
-rw-r--r--toolkit/mozapps/update/moz.build9
-rw-r--r--toolkit/mozapps/update/tests/Makefile.in39
-rw-r--r--toolkit/mozapps/update/tests/TestAUSHelper.cpp415
-rw-r--r--toolkit/mozapps/update/tests/TestAUSReadStrings.cpp172
-rw-r--r--toolkit/mozapps/update/tests/TestAUSReadStrings1.ini47
-rw-r--r--toolkit/mozapps/update/tests/TestAUSReadStrings2.ini39
-rw-r--r--toolkit/mozapps/update/tests/TestAUSReadStrings3.ini39
-rw-r--r--toolkit/mozapps/update/tests/chrome/.eslintrc.js7
-rw-r--r--toolkit/mozapps/update/tests/chrome/chrome.ini64
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0010_background_basic.xul50
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0011_check_basic.xul51
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0012_check_basic_staging.xul55
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0013_check_no_updates.xul46
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0014_check_error_xml_malformed.xul46
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0061_check_verifyFailPartial_noComplete.xul52
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0062_check_verifyFailComplete_noPartial.xul52
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0063_check_verifyFailPartialComplete.xul52
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0064_check_verifyFailPartial_successComplete.xul52
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0071_notify_verifyFailPartial_noComplete.xul53
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0072_notify_verifyFailComplete_noPartial.xul52
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0073_notify_verifyFailPartialComplete.xul55
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0074_notify_verifyFailPartial_successComplete.xul55
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0081_error_patchApplyFailure_partial_only.xul53
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0082_error_patchApplyFailure_complete_only.xul52
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0083_error_patchApplyFailure_partial_complete.xul67
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0084_error_patchApplyFailure_verify_failed.xul68
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0085_error_patchApplyFailure_partial_complete_staging.xul94
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0092_finishedBackground.xul55
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0093_restartNotification.xul60
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0094_restartNotification_remote.xul60
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0095_restartNotification_remoteInvalidNumber.xul66
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0096_restartNotification_stagedBackground.xul65
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0097_restartNotification_stagedServiceBackground.xul65
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0101_background_restartNotification.xul46
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0102_background_restartNotification_staging.xul49
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0103_background_restartNotification_stagingService.xul50
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0111_neverButton_basic.xul61
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0113_showNeverForVersionRemovedWithPref.xul58
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0151_notify_backgroundCheckError.xul50
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0152_notify_backgroundCheckOfflineRetry.xul96
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0161_check_unsupported.xul50
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0162_notify_unsupported.xul44
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0171_check_noPerms_manual.xul64
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_0172_notify_noPerms_manual.xul63
-rw-r--r--toolkit/mozapps/update/tests/chrome/test_9999_cleanup.xul112
-rw-r--r--toolkit/mozapps/update/tests/chrome/update.sjs194
-rw-r--r--toolkit/mozapps/update/tests/chrome/utils.js1011
-rw-r--r--toolkit/mozapps/update/tests/data/complete.exebin79872 -> 0 bytes
-rw-r--r--toolkit/mozapps/update/tests/data/complete.marbin97888 -> 0 bytes
-rw-r--r--toolkit/mozapps/update/tests/data/complete.pngbin878 -> 0 bytes
-rw-r--r--toolkit/mozapps/update/tests/data/complete_log_success_mac332
-rw-r--r--toolkit/mozapps/update/tests/data/complete_log_success_win320
-rw-r--r--toolkit/mozapps/update/tests/data/complete_mac.marbin98454 -> 0 bytes
-rw-r--r--toolkit/mozapps/update/tests/data/complete_precomplete18
-rw-r--r--toolkit/mozapps/update/tests/data/complete_precomplete_mac21
-rw-r--r--toolkit/mozapps/update/tests/data/complete_removed-files41
-rw-r--r--toolkit/mozapps/update/tests/data/complete_removed-files_mac41
-rw-r--r--toolkit/mozapps/update/tests/data/complete_update_manifest59
-rw-r--r--toolkit/mozapps/update/tests/data/old_version.marbin421 -> 0 bytes
-rw-r--r--toolkit/mozapps/update/tests/data/partial.exebin79872 -> 0 bytes
-rw-r--r--toolkit/mozapps/update/tests/data/partial.marbin10645 -> 0 bytes
-rw-r--r--toolkit/mozapps/update/tests/data/partial.pngbin776 -> 0 bytes
-rw-r--r--toolkit/mozapps/update/tests/data/partial_log_failure_mac192
-rw-r--r--toolkit/mozapps/update/tests/data/partial_log_failure_win192
-rw-r--r--toolkit/mozapps/update/tests/data/partial_log_success_mac279
-rw-r--r--toolkit/mozapps/update/tests/data/partial_log_success_win279
-rw-r--r--toolkit/mozapps/update/tests/data/partial_mac.marbin11172 -> 0 bytes
-rw-r--r--toolkit/mozapps/update/tests/data/partial_precomplete19
-rw-r--r--toolkit/mozapps/update/tests/data/partial_precomplete_mac22
-rw-r--r--toolkit/mozapps/update/tests/data/partial_removed-files41
-rw-r--r--toolkit/mozapps/update/tests/data/partial_removed-files_mac41
-rw-r--r--toolkit/mozapps/update/tests/data/partial_update_manifest63
-rw-r--r--toolkit/mozapps/update/tests/data/replace_log_success6
-rw-r--r--toolkit/mozapps/update/tests/data/shared.js632
-rw-r--r--toolkit/mozapps/update/tests/data/sharedUpdateXML.js364
-rw-r--r--toolkit/mozapps/update/tests/data/simple.marbin1031 -> 0 bytes
-rw-r--r--toolkit/mozapps/update/tests/data/wrong_product_channel.marbin421 -> 0 bytes
-rw-r--r--toolkit/mozapps/update/tests/data/xpcshellConstantsPP.js53
-rw-r--r--toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js4047
-rw-r--r--toolkit/mozapps/update/tests/moz.build95
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/.eslintrc.js7
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/canCheckForAndCanApplyUpdates.js138
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/cleanupDownloadingForDifferentChannel.js46
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/cleanupDownloadingForOlderAppVersion.js29
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/cleanupDownloadingForSameVersionAndBuildID.js30
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/cleanupDownloadingIncorrectStatus.js35
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/cleanupPendingVersionFileIncorrectStatus.js37
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/cleanupSuccessLogMove.js37
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/cleanupSuccessLogsFIFO.js45
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/downloadAndHashCheckMar.js161
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/downloadCompleteAfterPartialFailure.js66
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/downloadInterruptedRecovery.js225
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/downloadResumeForSameAppVersion.js37
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/head_update.js8
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/remoteUpdateXML.js285
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/uiAutoPref.js75
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/uiSilentPref.js76
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/uiUnsupportedAlreadyNotified.js74
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/updateManagerXML.js177
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/urlConstruction.js305
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/xpcshell.ini27
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/.eslintrc.js7
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/head_update.js8
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/invalidArgCallbackFileNotInInstallDirFailure.js37
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/invalidArgCallbackFilePathTooLongFailure.js45
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/invalidArgInstallDirPathTooLongFailure.js47
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/invalidArgInstallDirPathTraversalFailure.js44
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/invalidArgInstallWorkingDirPathNotSameFailure_win.js38
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/invalidArgPatchDirPathTraversalFailure.js43
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/invalidArgStageDirNotInInstallDirFailure_win.js38
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/invalidArgWorkingDirPathLocalUNCFailure_win.js38
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/invalidArgWorkingDirPathRelativeFailure.js37
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marAppApplyDirLockedStageFailure_win.js41
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateAppBinInUseStageSuccess_win.js83
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateStageOldVersionFailure.js88
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateStageSuccess.js82
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateSuccess.js65
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marAppInUseStageFailureComplete_win.js70
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marAppInUseStageSuccessComplete_unix.js113
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marAppInUseSuccessComplete.js62
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marCallbackAppStageSuccessComplete_win.js61
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marCallbackAppStageSuccessPartial_win.js61
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marCallbackAppSuccessComplete_win.js48
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marCallbackAppSuccessPartial_win.js48
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marFailurePartial.js47
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marFileInUseStageFailureComplete_win.js67
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marFileInUseStageFailurePartial_win.js67
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marFileInUseSuccessComplete_win.js63
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marFileInUseSuccessPartial_win.js63
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marFileLockedFailureComplete_win.js57
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marFileLockedFailurePartial_win.js56
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marFileLockedStageFailureComplete_win.js71
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marFileLockedStageFailurePartial_win.js70
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marRMRFDirFileInUseStageFailureComplete_win.js72
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marRMRFDirFileInUseStageFailurePartial_win.js71
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marRMRFDirFileInUseSuccessComplete_win.js63
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marRMRFDirFileInUseSuccessPartial_win.js62
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marStageFailurePartial.js41
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marStageSuccessComplete.js132
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marStageSuccessPartial.js112
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marSuccessComplete.js96
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marSuccessPartial.js79
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marVersionDowngrade.js51
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/marWrongChannel.js51
-rw-r--r--toolkit/mozapps/update/tests/unit_base_updater/xpcshell.ini136
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/.eslintrc.js7
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/bootstrapSvc.js35
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/checkUpdaterSigSvc.js39
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/head_update.js8
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/invalidArgInstallDirPathTooLongFailureSvc.js47
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/invalidArgInstallDirPathTraversalFailureSvc.js44
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/invalidArgInstallWorkingDirPathNotSameFailureSvc_win.js38
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/invalidArgPatchDirPathTraversalFailureSvc.js43
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/invalidArgStageDirNotInInstallDirFailureSvc_win.js38
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/invalidArgWorkingDirPathLocalUNCFailureSvc_win.js38
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/invalidArgWorkingDirPathRelativeFailureSvc.js37
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marAppApplyDirLockedStageFailureSvc_win.js41
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marAppApplyUpdateAppBinInUseStageSuccessSvc_win.js83
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marAppApplyUpdateStageSuccessSvc.js82
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marAppApplyUpdateSuccessSvc.js65
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marAppInUseStageFailureCompleteSvc_win.js70
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marAppInUseSuccessCompleteSvc.js62
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marCallbackAppStageSuccessCompleteSvc_win.js61
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marCallbackAppStageSuccessPartialSvc_win.js61
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marCallbackAppSuccessCompleteSvc_win.js48
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marCallbackAppSuccessPartialSvc_win.js48
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marFailurePartialSvc.js47
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marFileInUseStageFailureCompleteSvc_win.js67
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marFileInUseStageFailurePartialSvc_win.js67
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marFileInUseSuccessCompleteSvc_win.js63
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marFileInUseSuccessPartialSvc_win.js63
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marFileLockedFailureCompleteSvc_win.js57
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marFileLockedFailurePartialSvc_win.js56
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marFileLockedStageFailureCompleteSvc_win.js71
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marFileLockedStageFailurePartialSvc_win.js70
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marRMRFDirFileInUseStageFailureCompleteSvc_win.js72
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marRMRFDirFileInUseStageFailurePartialSvc_win.js71
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marRMRFDirFileInUseSuccessCompleteSvc_win.js63
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marRMRFDirFileInUseSuccessPartialSvc_win.js62
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marStageFailurePartialSvc.js41
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marStageSuccessCompleteSvc.js132
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marStageSuccessPartialSvc.js112
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marSuccessCompleteSvc.js96
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/marSuccessPartialSvc.js79
-rw-r--r--toolkit/mozapps/update/tests/unit_service_updater/xpcshell.ini156
-rw-r--r--toolkit/nss.configure16
-rw-r--r--toolkit/profile/gtest/TestProfileLock.cpp116
-rw-r--r--toolkit/profile/gtest/moz.build16
-rw-r--r--toolkit/profile/moz.build24
-rw-r--r--toolkit/profile/nsToolkitProfileService.cpp4
-rw-r--r--toolkit/profile/test/.eslintrc.js7
-rw-r--r--toolkit/profile/test/chrome.ini3
-rw-r--r--toolkit/profile/test/test_create_profile.xul134
-rw-r--r--toolkit/system/androidproxy/moz.build11
-rw-r--r--toolkit/system/androidproxy/nsAndroidSystemProxySettings.cpp89
-rw-r--r--toolkit/themes/mobile/global/empty.css7
-rw-r--r--toolkit/themes/mobile/global/icons/Error.pngbin2148 -> 0 bytes
-rw-r--r--toolkit/themes/mobile/global/media/TopLevelImageDocument.css17
-rw-r--r--toolkit/themes/mobile/global/media/TopLevelVideoDocument.css12
-rw-r--r--toolkit/themes/mobile/global/media/clicktoplay-bgtexture.pngbin1751 -> 0 bytes
-rw-r--r--toolkit/themes/mobile/global/media/error.pngbin433 -> 0 bytes
-rw-r--r--toolkit/themes/mobile/global/media/imagedoc-darknoise.pngbin3050 -> 0 bytes
-rw-r--r--toolkit/themes/mobile/global/media/imagedoc-lightnoise.pngbin4025 -> 0 bytes
-rw-r--r--toolkit/themes/mobile/global/media/throbber.pngbin30718 -> 0 bytes
-rw-r--r--toolkit/themes/mobile/global/media/videoClickToPlayButton.svg30
-rw-r--r--toolkit/themes/mobile/jar.mn55
-rw-r--r--toolkit/themes/mobile/moz.build7
-rw-r--r--toolkit/themes/mobile/mozapps/plugins/contentPluginActivate.pngbin3043 -> 0 bytes
-rw-r--r--toolkit/themes/mobile/mozapps/plugins/contentPluginBlocked.pngbin1514 -> 0 bytes
-rw-r--r--toolkit/themes/mobile/mozapps/plugins/contentPluginClose.pngbin1370 -> 0 bytes
-rw-r--r--toolkit/themes/mobile/mozapps/plugins/contentPluginCrashed.pngbin1470 -> 0 bytes
-rw-r--r--toolkit/themes/mobile/mozapps/plugins/contentPluginDisabled.pngbin1620 -> 0 bytes
-rw-r--r--toolkit/themes/mobile/mozapps/plugins/contentPluginStripe.pngbin460 -> 0 bytes
-rw-r--r--toolkit/themes/mobile/mozapps/plugins/pluginProblem.css196
-rw-r--r--toolkit/themes/moz.build3
-rw-r--r--toolkit/themes/shared/mozapps.inc.mn2
-rw-r--r--toolkit/toolkit.mozbuild8
-rw-r--r--toolkit/xre/moz.build58
-rw-r--r--toolkit/xre/nsAndroidStartup.cpp45
-rw-r--r--toolkit/xre/nsAppRunner.cpp42
-rw-r--r--toolkit/xre/nsEmbedFunctions.cpp8
-rw-r--r--toolkit/xre/nsSigHandlers.cpp6
-rw-r--r--toolkit/xre/nsUpdateDriver.cpp2
-rw-r--r--toolkit/xre/nsXREDirProvider.cpp13
-rw-r--r--toolkit/xre/test/.eslintrc.js7
-rw-r--r--toolkit/xre/test/browser.ini4
-rw-r--r--toolkit/xre/test/browser_checkdllblockliststate.js16
-rw-r--r--toolkit/xre/test/mochitest.ini3
-rw-r--r--toolkit/xre/test/test_fpuhandler.html38
-rw-r--r--toolkit/xre/test/win/Makefile.in14
-rw-r--r--toolkit/xre/test/win/TestDllInterceptor.cpp232
-rw-r--r--toolkit/xre/test/win/TestXREMakeCommandLineWin.cpp265
-rw-r--r--toolkit/xre/test/win/TestXREMakeCommandLineWin.ini94
-rw-r--r--toolkit/xre/test/win/moz.build30
-rw-r--r--widget/cocoa/nsCocoaFeatures.h3
-rw-r--r--widget/cocoa/nsCocoaFeatures.mm21
-rw-r--r--widget/cocoa/nsCocoaWindow.mm47
-rw-r--r--xpcom/reflect/xptcall/md/unix/moz.build4
2647 files changed, 9989 insertions, 353989 deletions
diff --git a/Makefile.in b/Makefile.in
index 26cd688d48..ed00909cbb 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -47,6 +47,12 @@ ifndef MOZ_PROFILE_USE
# We need to explicitly put BUILD_BACKEND_FILES here otherwise the rule in
# rules.mk doesn't run early enough.
$(TIERS) binaries:: CLOBBER $(configure_dir)/configure config.status $(BUILD_BACKEND_FILES)
+
+# While our mozbuild backend has some kind of crazy install_manfests junk to
+# try and make this not have to happen, we actually want dist/bin to be
+# completely removed regardless.
+default alldep all::
+ $(RM) -r $(DIST)/bin
ifndef JS_STANDALONE
ifdef COMPILE_ENVIRONMENT
$(TIERS) binaries:: $(topsrcdir)/js/src/configure js/src/config.status
diff --git a/README.md b/README.md
index 3867ebaf50..9460e9590c 100644
--- a/README.md
+++ b/README.md
@@ -34,3 +34,6 @@ and other community members.
If you fork this repository to perform your own work on it, please consider offering
improvement patches upstream to its origin to mutually improve the platform and build
a future for XUL.
+
+## Looking for Pale Moon and Basilisk?
+As of [`Issue #969`](https://github.com/MoonchildProductions/UXP/issues/969), release versions `28.9.0` and `2020.03.04` respectively, they have been split off into their own dedicated repositories located at [`MoonchildProductions/Pale-Moon`](https://github.com/MoonchildProductions/Pale-Moon) and [`MoonchildProductions/Basilisk`](https://github.com/MoonchildProductions/Basilisk).
diff --git a/build/autoconf/config.guess b/build/autoconf/config.guess
index d5d667d4a2..28d5092011 100755
--- a/build/autoconf/config.guess
+++ b/build/autoconf/config.guess
@@ -842,6 +842,13 @@ EOF
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
+ *:MINGW32_NT*:*)
+ if [ "$PLATFORM" = "X64" ]; then
+ echo x86_64-pc-mingw32
+ else
+ echo ${UNAME_MACHINE}-pc-mingw32
+ fi
+ exit ;;
*:MINGW64*:*)
echo ${UNAME_MACHINE}-pc-mingw64
exit ;;
diff --git a/build/defines.sh b/build/defines.sh
deleted file mode 100644
index cf98c3d8bf..0000000000
--- a/build/defines.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-# Define indicating that this build is prior to one of the early betas. To be
-# unset mid-way through the beta cycle.
-EARLY_BETA_OR_EARLIER=
diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure
index df955f0017..d0f6909b9a 100644
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -166,6 +166,7 @@ def old_configure_options(*options):
'--enable-cookies',
'--enable-cpp-rtti',
'--enable-crashreporter',
+ '--enable-dbm',
'--enable-dbus',
'--enable-debug-js-modules',
'--enable-jetpack',
@@ -222,6 +223,7 @@ def old_configure_options(*options):
'--enable-release',
'--enable-safe-browsing',
'--enable-sandbox',
+ '--enable-security-sqlstore',
'--enable-signmar',
'--enable-simulator',
'--enable-small-chunk-size',
diff --git a/db/mork/moz.build b/db/mork/moz.build
index a4cc91c194..25d1281226 100644
--- a/db/mork/moz.build
+++ b/db/mork/moz.build
@@ -3,9 +3,8 @@
# 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/.
-if not CONFIG['NSS_DISABLE_DBM'] and CONFIG['MOZ_MORK']:
- DIRS += [
- 'public',
- 'src',
- 'build',
- ]
+DIRS += [
+ 'public',
+ 'src',
+ 'build',
+]
diff --git a/db/sqlite3/src/moz.build b/db/sqlite3/src/moz.build
index 70a5f456a3..eba8633b59 100644
--- a/db/sqlite3/src/moz.build
+++ b/db/sqlite3/src/moz.build
@@ -63,10 +63,6 @@ if CONFIG['MOZ_DEBUG']:
DEFINES['SQLITE_DEBUG'] = 1
DEFINES['SQLITE_ENABLE_API_ARMOR'] = True
-if CONFIG['OS_TARGET'] == 'Android':
- # default to user readable only to fit Android security model
- DEFINES['SQLITE_DEFAULT_FILE_PERMISSIONS'] = '0600'
-
# Force using malloc_usable_size when building with jemalloc because _msize
# causes assertions on Win64. See bug 719579.
if CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['MOZ_MEMORY']:
@@ -82,10 +78,7 @@ DEFINES['SQLITE_OMIT_DECLTYPE'] = True
# performance and doesn't suffer from a full separate tmp partition.
# Exclude 32bit platforms due to address space fragmentation issues.
# System Sqlite is managed through a PRAGMA instead.
-if CONFIG['OS_TARGET'] == 'Android':
- # On Android there's no tmp partition, so always use a MEMORY temp store.
- DEFINES['SQLITE_TEMP_STORE'] = 3
-elif CONFIG['HAVE_64BIT_BUILD']:
+if CONFIG['HAVE_64BIT_BUILD']:
# On 64bit platforms default to a MEMORY temp store for performance.
DEFINES['SQLITE_TEMP_STORE'] = 2
diff --git a/devtools/client/debugger/new/bundle.js b/devtools/client/debugger/new/bundle.js
index cbbd15a44b..4200ed275b 100644
--- a/devtools/client/debugger/new/bundle.js
+++ b/devtools/client/debugger/new/bundle.js
@@ -9828,7 +9828,7 @@ var Debugger =
var host = httpActivity.hostname;
info.hsts = sss.isSecureHost(sss.HEADER_HSTS, host, flags);
- info.hpkp = sss.isSecureHost(sss.HEADER_HPKP, host, flags);
+ info.hpkp = false;
} else {
DevToolsUtils.reportException("NetworkHelper.parseSecurityInfo", "Could not get HSTS/HPKP status as hostname is not available.");
info.hsts = false;
diff --git a/devtools/client/shared/curl.js b/devtools/client/shared/curl.js
index 9670197466..d9abf506aa 100644
--- a/devtools/client/shared/curl.js
+++ b/devtools/client/shared/curl.js
@@ -58,9 +58,21 @@ const Curl = {
* A cURL command.
*/
generateCommand: function (data) {
- let utils = CurlUtils;
+ const utils = CurlUtils;
let command = ["curl"];
+
+ // Make sure to use the following helpers to sanitize arguments before execution.
+ const addParam = value => {
+ const safe = /^[a-zA-Z-]+$/.test(value) ? value : escapeString(value);
+ command.push(safe);
+ };
+
+ const addPostData = value => {
+ const safe = /^[a-zA-Z-]+$/.test(value) ? value : escapeString(value);
+ postData.push(safe);
+ };
+
let ignoredHeaders = new Set();
// The cURL command is expected to run on the same platform that Firefox runs
@@ -69,7 +81,7 @@ const Curl = {
utils.escapeStringWin : utils.escapeStringPosix;
// Add URL.
- command.push(escapeString(data.url));
+ addParam(data.url);
let postDataText = null;
let multipartRequest = utils.isMultipartRequest(data);
@@ -79,15 +91,15 @@ const Curl = {
if (utils.isUrlEncodedRequest(data) ||
["PUT", "POST", "PATCH"].includes(data.method)) {
postDataText = data.postDataText;
- postData.push("--data");
- postData.push(escapeString(utils.writePostDataTextParams(postDataText)));
+ addPostData("--data");
+ addPostData(utils.writePostDataTextParams(postDataText));
ignoredHeaders.add("content-length");
} else if (multipartRequest) {
postDataText = data.postDataText;
- postData.push("--data-binary");
+ addPostData("--data-binary");
let boundary = utils.getMultipartBoundary(data);
let text = utils.removeBinaryDataFromMultipartText(postDataText, boundary);
- postData.push(escapeString(text));
+ addPostData(text);
ignoredHeaders.add("content-length");
}
@@ -95,15 +107,15 @@ const Curl = {
// For GET and POST requests this is not necessary as GET is the
// default. If --data or --binary is added POST is the default.
if (!(data.method == "GET" || data.method == "POST")) {
- command.push("-X");
- command.push(data.method);
+ addParam("-X");
+ addParam(data.method);
}
// Add -I (HEAD)
// For servers that supports HEAD.
// This will fetch the header of a document only.
if (data.method == "HEAD") {
- command.push("-I");
+ addParam("-I");
}
// Add http version.
@@ -114,7 +126,7 @@ const Curl = {
// data.httpVersion are HTTP/1.0, HTTP/1.1 and HTTP/2.0
// So in case of HTTP/2.0 (which should ideally be HTTP/2) we are using
// only major version, and full version in other cases
- command.push("--http" + (version == "2.0" ? version.split(".")[0] : version));
+ addParam("--http" + (version == "2.0" ? version.split(".")[0] : version));
}
// Add request headers.
@@ -126,14 +138,14 @@ const Curl = {
for (let i = 0; i < headers.length; i++) {
let header = headers[i];
if (header.name.toLowerCase() === "accept-encoding") {
- command.push("--compressed");
+ addParam("--compressed");
continue;
}
if (ignoredHeaders.has(header.name.toLowerCase())) {
continue;
}
- command.push("-H");
- command.push(escapeString(header.name + ": " + header.value));
+ addParam("-H");
+ addParam(header.name + ": " + header.value);
}
// Add post data.
diff --git a/devtools/shared/webconsole/network-helper.js b/devtools/shared/webconsole/network-helper.js
index 4e25fac260..71909221e3 100644
--- a/devtools/shared/webconsole/network-helper.js
+++ b/devtools/shared/webconsole/network-helper.js
@@ -668,7 +668,8 @@ var NetworkHelper = {
let host = httpActivity.hostname;
info.hsts = sss.isSecureHost(sss.HEADER_HSTS, host, flags);
- info.hpkp = sss.isSecureHost(sss.HEADER_HPKP, host, flags);
+ // HPKP is no longer supported.
+ info.hpkp = false;
} else {
DevToolsUtils.reportException("NetworkHelper.parseSecurityInfo",
"Could not get HSTS/HPKP status as hostname is not available.");
diff --git a/docs/UXP Coding Style.md b/docs/UXP Coding Style.md
index 75cbc8051b..5dc4fd2a59 100644
--- a/docs/UXP Coding Style.md
+++ b/docs/UXP Coding Style.md
@@ -1,4 +1,4 @@
-# UXP Coding Style Guide
+# UXP Coding Style Guide
While our source tree is currently in a number of different Coding Styles and the general rule applies to adhere to style of surrounding code when you are making changes, it is our goal to unify the style of our source tree and making it adhere to a single style.
This document describes the preferred style for new source code files and the preferred style to convert existing files to.
@@ -225,15 +225,257 @@ somelongvariable = somelongexpression ?
## JavaScript
Applies to `*.js` and `*.jsm`.
+### General formatting guidelines
+- Place function signatures on the same line as js object identifiers, and do not use named function syntax in that case:
+ ```JavaScript
+ var myObject = {
+ myIdentifier: function(var1, var2) {
+ ...
+ },
+ myIdentifier2: function() {
+ ...
+ }
+ }
+ ```
+- Variable initializers should be placed on the variable declaration line if needed.
+ ```JavaScript
+ var fwdCommand = document.getElementById("Browser:Forward");
+ ```
+ ```JavaScript
+ var myObject = {
+ myVariable: null,
+ myString: "Something"
+ }
+ ```
+- Avoid placing executed code on the expression line. Preferably brace executed code.
+
+ WRONG:
+ ```JavaScript
+ if (a == b) do_something();
+ if (a == b) { do_something(); }
+ ```
+ DISCOURAGED:
+ ```JavaScript
+ if (a == b)
+ do_something();
+ ```
+ CORRECT:
+ ```JavaScript
+ if (a == b) {
+ do_something();
+ }
+ ```
+- Format in-lined variable functions as if you would format normal functions with the exception of closure: break with the opening brace, followed by code, and closing brace on its own line, followed immediately by any other variables passed in-line.
+ ```JavaScript
+ appMenuButton.addEventListener("mousedown", function(event) {
+ if (event.button == 0) {
+ appMenuOpening = new Date();
+ }
+ }, false);
+ ```
+- Use a single space between `{` `}` braces in empty js objects.
+
+### Flow control
+Flow control expressions should follow the following guidelines:
+- Scopes have their opening braces on the expression line
+- Scopes have their closing braces on a separate line, indent-aligned with the flow control expression
+- Any alternative flow control paths are generally started with an expression on the closing brace line. The logic behind this is that you should keep the flow control level visually the same for the executed code blocks with no breaks (a closing brace on its own line means "done").
+- Case statements are indented by 2 on a new line with the case expression on its own line.
+- Flow control default scopes are always placed at the bottom.
+
+#### if..else
+`if..else` statements example:
+```JavaScript
+if (something == somethingelse) {
+ true_case_code here;
+} else {
+ false_case_code here;
+}
+
+if (case1) {
+ case1_code here;
+} else if (case2) {
+ case2_code here;
+} else {
+ other_case_code here;
+}
+
+if (case1) {
+ case1_code here;
+} else {
+ if (case2) {
+ case2_code here;
+ }
+ case2_and_other_code here;
+}
+```
+#### for
+`for` loop example:
+```JavaScript
+for (let i = 1; i < max; i++) {
+ loop_code here;
+}
+
+for (let i = 0;; i++) {
+ do_something_with(i);
+ if (i > max) break;
+ ...
+}
+```
+#### while
+`while` loop example:
+```JavaScript
+while (something == true) {
+ loop_code here;
+}
+
+do {
+ execute_me_at_least_once();
+ ...
+} while (something == true);
+```
+#### switch..case
+`switch..case` flow control example:
+```JavaScript
+switch (variable) {
+ case value1:
+ // Comment describing 1
+ code_for_1;
+ code_for_1;
+ break;
+ case value2:
+ code_for_2;
+ code_for_2;
+ // fallthrough
+ case value3:
+ case value4:
+ code_for_3_and_4;
+ break;
+ default:
+ code_for_default;
+ code_for_default;
+}
+```
+Alternatively (braced):
+```JavaScript
+switch (variable) {
+ case value1: {
+ // Comment describing 1
+ code_for_1;
+ code_for_1;
+ break;
+ }
+ case value2: {
+ code_for_2;
+ code_for_2;
+ // fallthrough
+ }
+ case value3:
+ case value4: {
+ code_for_3_and_4;
+ break;
+ }
+ default: {
+ code_for_default;
+ code_for_default;
+ }
+}
+```
+
+#### try..catch
+- When using `try..catch` blocks, the use of optional catch binding is discouraged. Please always include the error variable.
+
+`try..catch` flow control examples:
+```JavaScript
+try {
+ do_something();
+} catch(e) {
+ handle_error(e);
+} finally {
+ always();
+}
+
+try {
+ do_something();
+} catch(e) {
+}
+
+try {
+ do_something();
+} finally {
+ always();
+}
+```
+DISCOURAGED
+```JavaScript
+try {
+ do_something();
+} catch {
+ // No error processing
+ do_something_else();
+}
+
+// No closing brace on its own line
+try {
+ do_something();
+} catch(ex) { }
+```
+
+### Long line wrapping
+If statements on a single line become overly long, they should be split into multiple lines:
+- Binary operators (including ternary) must be left on their original lines if the line break happens around the operator. The second line should start in the same column as the start of the expression in the first line.
+- Lists of variables (e.g. when calling or declaring a function) should be split at the wrapping column.
+- Long OOP calls should be split at the period with the period on the start of the new line, indented to the column of the first object, filling to the wrapping column where possible, including additional terms.
+- When breaking assignments/operations/logic, break right after the operator (`=`, `+`, `&&`, `||`, etc.)
+- **Don't break too rigorously**; short additions should be kept on the same line to keep things legible - use common sense and context for flexibility.
+
+WRONG:
+```JavaScript
+somelongobjectname.somelongfunction(
+ var1, var2, var3, var4, var5);
+
+if (somelongvariable == somelongothervariable
+ || somelongvariable2 == somelongothervariable2) {
+
+somelongvariable = somelongexpression ? somevalue1
+ : somevalue2;
+
+var iShouldntBeUsingThisLongOfAVarName
+ = someValueToAdd + someValueToAdd + someValueToAdd
+ + someValueToAdd;
+
+Cu.import("resource:///modules/DownloadsCommon.jsm", {}).
+ DownloadsCommon.initializeAllDataLinks();
+```
+CORRECT:
+```JavaScript
+somelongobjectname.somelongfunction(var1, var2, var3,
+ var4, var5);
+
+if (somelongvariable == somelongothervariable ||
+ somelongvariable2 == somelongothervariable2) {
+
+somelongvariable = somelongexpression ?
+ somevalue1 :
+ somevalue2;
+
+var iShouldntBeUsingThisLongOfAVarName =
+ someValueToAdd + someValueToAdd + someValueToAdd +
+ someValueToAdd;
+
+Cu.import("resource:///modules/DownloadsCommon.jsm", {})
+ .DownloadsCommon.initializeAllDataLinks();
+
+let sessionStartup = Cc["@mozilla.org/browser/sessionstartup;1"]
+ .getService(Ci.nsISessionStartup);
+```
+
## XUL and other XML-derivatives
Applies to `*.xul`, `*.html`, `*.xhtml`.
+TODO
## IDL
Applies to `*.idl`, `*.xpidl` and `*.webidl`.
-
-<!--stackedit_data:
-eyJoaXN0b3J5IjpbMjUzODYzMzMsMjg5MjUwODIsLTQzMjMzNz
-ExMSw4MzQ2MjYwNDksLTE5MDMyNzE5OTYsLTEwMTIwMjc3ODMs
-LTE4MzgzODM5MDIsODA5MjEzNTEyLC01Mzg0MjM4MDAsMzgyNj
-I3NDYzLDIwODYwMjIwODUsLTE1MjU5MjE2MjIsLTY1OTMzMTA0
-MCwtNzQwOTE5MDQ1LDE4Njc1NTQxNDJdfQ==
--->
+TODO
+## Python-esque
+Applies to `*.py`, `mozbuild` etc.
+TODO
diff --git a/docshell/base/nsAboutRedirector.cpp b/docshell/base/nsAboutRedirector.cpp
index f57d6c002b..e1d8835329 100644
--- a/docshell/base/nsAboutRedirector.cpp
+++ b/docshell/base/nsAboutRedirector.cpp
@@ -119,12 +119,10 @@ static RedirEntry kRedirMap[] = {
nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
nsIAboutModule::ALLOW_SCRIPT
},
-#ifndef ANDROID
{
"profiles", "chrome://global/content/aboutProfiles.xhtml",
nsIAboutModule::ALLOW_SCRIPT
},
-#endif
// about:srcdoc is unresolvable by specification. It is included here
// because the security manager would disallow srcdoc iframes otherwise.
{
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
index 6104ebfa71..f53d89e819 100644
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -4943,13 +4943,11 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
if (errorClass == nsINSSErrorsService::ERROR_CLASS_BAD_CERT) {
error.AssignLiteral("nssBadCert");
- // If this is an HTTP Strict Transport Security host or a pinned host
- // and the certificate is bad, don't allow overrides (RFC 6797 section
- // 12.1, HPKP draft spec section 2.6).
+ // If this is an HTTP Strict Transport Security host, don't allow
+ // overrides (RFC 6797 section 12.1).
uint32_t flags =
UsePrivateBrowsing() ? nsISocketProvider::NO_PERMANENT_STORAGE : 0;
bool isStsHost = false;
- bool isPinnedHost = false;
if (XRE_IsParentProcess()) {
nsCOMPtr<nsISiteSecurityService> sss =
do_GetService(NS_SSSERVICE_CONTRACTID, &rv);
@@ -4957,9 +4955,6 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
rv = sss->IsSecureURI(nsISiteSecurityService::HEADER_HSTS, aURI,
flags, nullptr, &isStsHost);
NS_ENSURE_SUCCESS(rv, rv);
- rv = sss->IsSecureURI(nsISiteSecurityService::HEADER_HPKP, aURI,
- flags, nullptr, &isPinnedHost);
- NS_ENSURE_SUCCESS(rv, rv);
} else {
mozilla::dom::ContentChild* cc =
mozilla::dom::ContentChild::GetSingleton();
@@ -4967,8 +4962,6 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
SerializeURI(aURI, uri);
cc->SendIsSecureURI(nsISiteSecurityService::HEADER_HSTS, uri, flags,
&isStsHost);
- cc->SendIsSecureURI(nsISiteSecurityService::HEADER_HPKP, uri, flags,
- &isPinnedHost);
}
if (Preferences::GetBool(
@@ -4976,11 +4969,9 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
cssClass.AssignLiteral("expertBadCert");
}
- // HSTS/pinning takes precedence over the expert bad cert pref. We
+ // HSTS takes precedence over the expert bad cert pref. We
// never want to show the "Add Exception" button for these sites.
- // In the future we should differentiate between an HSTS host and a
- // pinned host and display a more informative message to the user.
- if (isStsHost || isPinnedHost) {
+ if (isStsHost) {
cssClass.AssignLiteral("badStsCert");
}
diff --git a/docshell/build/nsDocShellModule.cpp b/docshell/build/nsDocShellModule.cpp
index 3481bd297d..fbf2f10022 100644
--- a/docshell/build/nsDocShellModule.cpp
+++ b/docshell/build/nsDocShellModule.cpp
@@ -25,10 +25,6 @@
#ifdef MOZ_ENABLE_DBUS
#include "nsDBusHandlerApp.h"
#endif
-#if defined(MOZ_WIDGET_ANDROID)
-#include "nsExternalSharingAppService.h"
-#include "nsExternalURLHandlerService.h"
-#endif
// session history
#include "nsSHEntry.h"
@@ -85,10 +81,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(PlatformLocalHandlerApp_t)
#ifdef MOZ_ENABLE_DBUS
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDBusHandlerApp)
#endif
-#if defined(MOZ_WIDGET_ANDROID)
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsExternalSharingAppService)
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsExternalURLHandlerService)
-#endif
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(ContentHandlerService, Init)
// session history
@@ -114,10 +106,6 @@ NS_DEFINE_NAMED_CID(NS_LOCALHANDLERAPP_CID);
#ifdef MOZ_ENABLE_DBUS
NS_DEFINE_NAMED_CID(NS_DBUSHANDLERAPP_CID);
#endif
-#if defined(MOZ_WIDGET_ANDROID)
-NS_DEFINE_NAMED_CID(NS_EXTERNALSHARINGAPPSERVICE_CID);
-NS_DEFINE_NAMED_CID(NS_EXTERNALURLHANDLERSERVICE_CID);
-#endif
NS_DEFINE_NAMED_CID(NS_SHENTRY_CID);
NS_DEFINE_NAMED_CID(NS_SHTRANSACTION_CID);
NS_DEFINE_NAMED_CID(NS_SHISTORY_CID);
@@ -143,10 +131,6 @@ const mozilla::Module::CIDEntry kDocShellCIDs[] = {
#ifdef MOZ_ENABLE_DBUS
{ &kNS_DBUSHANDLERAPP_CID, false, nullptr, nsDBusHandlerAppConstructor },
#endif
-#if defined(MOZ_WIDGET_ANDROID)
- { &kNS_EXTERNALSHARINGAPPSERVICE_CID, false, nullptr, nsExternalSharingAppServiceConstructor },
- { &kNS_EXTERNALURLHANDLERSERVICE_CID, false, nullptr, nsExternalURLHandlerServiceConstructor },
-#endif
{ &kNS_SHENTRY_CID, false, nullptr, nsSHEntryConstructor },
{ &kNS_SHTRANSACTION_CID, false, nullptr, nsSHTransactionConstructor },
{ &kNS_SHISTORY_CID, false, nullptr, nsSHistoryConstructor },
@@ -183,9 +167,7 @@ const mozilla::Module::ContractIDEntry kDocShellContracts[] = {
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "performance", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "plugins", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "serviceworkers", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
-#ifndef ANDROID
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "profiles", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
-#endif
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "srcdoc", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "support", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "telemetry", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
@@ -206,10 +188,6 @@ const mozilla::Module::ContractIDEntry kDocShellContracts[] = {
#ifdef MOZ_ENABLE_DBUS
{ NS_DBUSHANDLERAPP_CONTRACTID, &kNS_DBUSHANDLERAPP_CID },
#endif
-#if defined(MOZ_WIDGET_ANDROID)
- { NS_EXTERNALSHARINGAPPSERVICE_CONTRACTID, &kNS_EXTERNALSHARINGAPPSERVICE_CID },
- { NS_EXTERNALURLHANDLERSERVICE_CONTRACTID, &kNS_EXTERNALURLHANDLERSERVICE_CID },
-#endif
{ NS_SHENTRY_CONTRACTID, &kNS_SHENTRY_CID },
{ NS_SHTRANSACTION_CONTRACTID, &kNS_SHTRANSACTION_CID },
{ NS_SHISTORY_CONTRACTID, &kNS_SHISTORY_CID },
diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp
index fb350fa120..01c1944bec 100644
--- a/dom/base/nsFocusManager.cpp
+++ b/dom/base/nsFocusManager.cpp
@@ -1261,6 +1261,15 @@ nsFocusManager::SetFocusInner(nsIContent* aNewContent, int32_t aFlags,
isElementInActiveWindow = (mActiveWindow && newRootWindow == mActiveWindow);
}
+ // Exit fullscreen if a website focuses another window
+ if (!isElementInActiveWindow && aFlags & FLAG_RAISE) {
+ if (nsIDocument* doc = mActiveWindow ? mActiveWindow->GetDoc() : nullptr) {
+ if (doc && doc->GetFullscreenElement()) {
+ nsIDocument::AsyncExitFullscreen(doc);
+ }
+ }
+ }
+
// Exit fullscreen if we're focusing a windowed plugin on a non-MacOSX
// system. We don't control event dispatch to windowed plugins on non-MacOSX,
// so we can't display the "Press ESC to leave fullscreen mode" warning on
diff --git a/dom/base/nsScriptLoader.cpp b/dom/base/nsScriptLoader.cpp
index 3ac00142dc..25482fe7b6 100644
--- a/dom/base/nsScriptLoader.cpp
+++ b/dom/base/nsScriptLoader.cpp
@@ -1144,7 +1144,7 @@ nsScriptLoader::InstantiateModuleTree(nsModuleLoadRequest* aRequest)
nsModuleScript* ms = aRequest->mModuleScript;
MOZ_ASSERT(ms);
- if (!ms->ModuleRecord()) {
+ if (!ms || !ms->ModuleRecord()) {
return false;
}
diff --git a/dom/bindings/GenerateCSS2PropertiesWebIDL.py b/dom/bindings/GenerateCSS2PropertiesWebIDL.py
index 58ec60c29b..57634494fd 100644
--- a/dom/bindings/GenerateCSS2PropertiesWebIDL.py
+++ b/dom/bindings/GenerateCSS2PropertiesWebIDL.py
@@ -16,6 +16,7 @@ def generateLine(propName, extendedAttrs):
return " [%s] attribute DOMString %s;\n" % (", ".join(extendedAttrs),
propName)
def generate(output, idlFilename, preprocessorHeader):
+ print(idlFilename)
cpp = list(buildconfig.substs['CPP'])
cpp += shellutil.split(buildconfig.substs['ACDEFINES'])
cpp.append(preprocessorHeader)
diff --git a/dom/bindings/mozwebidlcodegen/__init__.py b/dom/bindings/mozwebidlcodegen/__init__.py
index b6e351e52f..69f3f5e252 100644
--- a/dom/bindings/mozwebidlcodegen/__init__.py
+++ b/dom/bindings/mozwebidlcodegen/__init__.py
@@ -269,6 +269,7 @@ class WebIDLCodegenManager(LoggingMixin):
# Generate bindings from .webidl files.
for filename in sorted(changed_inputs):
basename = mozpath.basename(filename)
+ print basename
result.inputs.add(filename)
written, deps = self._generate_build_files_for_webidl(filename)
result.created |= written[0]
diff --git a/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp b/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp
index a31414e7fa..437d21997a 100644
--- a/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp
+++ b/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp
@@ -2351,18 +2351,16 @@ nsWebBrowserPersist::EndDownload(nsresult aResult)
{
mPersistResult = aResult;
}
+
// mCompleted needs to be set before issuing the stop notification.
// (Bug 1224437)
mCompleted = true;
-
-#ifdef MOZ_JSDOWNLOADS
// State stop notification
if (mProgressListener) {
mProgressListener->OnStateChange(nullptr, nullptr,
nsIWebProgressListener::STATE_STOP
| nsIWebProgressListener::STATE_IS_NETWORK, mPersistResult);
}
-#endif
// Do file cleanup if required
if (NS_FAILED(aResult) && (mPersistFlags & PERSIST_FLAGS_CLEANUP_ON_FAILURE))
diff --git a/embedding/components/windowwatcher/nsWindowWatcher.cpp b/embedding/components/windowwatcher/nsWindowWatcher.cpp
index 3732ea66de..fa23e285bf 100644
--- a/embedding/components/windowwatcher/nsWindowWatcher.cpp
+++ b/embedding/components/windowwatcher/nsWindowWatcher.cpp
@@ -1297,6 +1297,12 @@ nsWindowWatcher::OpenWindowInternal(mozIDOMWindowProxy* aParent,
}
}
+ // If a website opens a popup exit DOM fullscreen
+ if (windowIsNew && aCalledFromJS && !hasChromeParent && !isCallerChrome &&
+ parentWindow) {
+ nsIDocument::AsyncExitFullscreen(parentWindow->GetDoc());
+ }
+
if (aForceNoOpener && windowIsNew) {
NS_RELEASE(*aResult);
}
diff --git a/ipc/chromium/src/build/build_config.h b/ipc/chromium/src/build/build_config.h
index 7e6beb37ae..7a41701c25 100644
--- a/ipc/chromium/src/build/build_config.h
+++ b/ipc/chromium/src/build/build_config.h
@@ -85,7 +85,7 @@
#elif defined(__ppc__) || defined(__powerpc__)
#define ARCH_CPU_PPC 1
#define ARCH_CPU_32_BITS 1
-#elif defined(__sparc64__)
+#elif defined(__sparc__) && defined(__arch64__)
#define ARCH_CPU_SPARC 1
#define ARCH_CPU_64_BITS 1
#elif defined(__sparc__)
diff --git a/ipc/testshell/XPCShellEnvironment.cpp b/ipc/testshell/XPCShellEnvironment.cpp
index 455a14610c..beb9667b2d 100644
--- a/ipc/testshell/XPCShellEnvironment.cpp
+++ b/ipc/testshell/XPCShellEnvironment.cpp
@@ -55,7 +55,7 @@ namespace {
static const char kDefaultRuntimeScriptFilename[] = "xpcshell.js";
inline XPCShellEnvironment*
-Environment(Handle<JSObject*> global)
+Environment(JS::Handle<JSObject*> global)
{
AutoJSAPI jsapi;
if (!jsapi.Init(global)) {
diff --git a/js/src/builtin/ModuleObject.cpp b/js/src/builtin/ModuleObject.cpp
index 575bab0b0c..b275cb9681 100644
--- a/js/src/builtin/ModuleObject.cpp
+++ b/js/src/builtin/ModuleObject.cpp
@@ -927,7 +927,7 @@ ModuleObject::evaluate(JSContext* cx, HandleModuleObject self, MutableHandleValu
ModuleObject::createNamespace(JSContext* cx, HandleModuleObject self, HandleObject exports)
{
MOZ_ASSERT(!self->namespace_());
- MOZ_ASSERT(exports->is<ArrayObject>());
+ MOZ_ASSERT(exports->is<ArrayObject>() || exports->is<UnboxedArrayObject>());
RootedModuleNamespaceObject ns(cx, ModuleNamespaceObject::create(cx, self));
if (!ns)
diff --git a/js/src/builtin/ReflectParse.cpp b/js/src/builtin/ReflectParse.cpp
index 22c958d4ca..a8065d6d14 100644
--- a/js/src/builtin/ReflectParse.cpp
+++ b/js/src/builtin/ReflectParse.cpp
@@ -1547,7 +1547,7 @@ NodeBuilder::catchClause(HandleValue var, HandleValue guard, HandleValue body, T
{
RootedValue cb(cx, callbacks[AST_CATCH]);
if (!cb.isNull())
- return callback(cb, var, opt(guard), body, pos, dst);
+ return callback(cb, opt(var), opt(guard), body, pos, dst);
return newNode(AST_CATCH, pos,
"param", var,
@@ -1803,6 +1803,14 @@ class ASTSerializer
bool identifier(ParseNode* pn, MutableHandleValue dst);
bool literal(ParseNode* pn, MutableHandleValue dst);
+ bool optPattern(ParseNode* pn, MutableHandleValue dst) {
+ if (!pn) {
+ dst.setMagic(JS_SERIALIZE_NO_NODE);
+ return true;
+ }
+ return pattern(pn, dst);
+ }
+
bool pattern(ParseNode* pn, MutableHandleValue dst);
bool arrayPattern(ParseNode* pn, MutableHandleValue dst);
bool objectPattern(ParseNode* pn, MutableHandleValue dst);
@@ -2265,13 +2273,13 @@ ASTSerializer::switchStatement(ParseNode* pn, MutableHandleValue dst)
bool
ASTSerializer::catchClause(ParseNode* pn, bool* isGuarded, MutableHandleValue dst)
{
- MOZ_ASSERT(pn->pn_pos.encloses(pn->pn_kid1->pn_pos));
+ MOZ_ASSERT_IF(pn->pn_kid1, pn->pn_pos.encloses(pn->pn_kid1->pn_pos));
MOZ_ASSERT_IF(pn->pn_kid2, pn->pn_pos.encloses(pn->pn_kid2->pn_pos));
MOZ_ASSERT(pn->pn_pos.encloses(pn->pn_kid3->pn_pos));
RootedValue var(cx), guard(cx), body(cx);
- if (!pattern(pn->pn_kid1, &var) ||
+ if (!optPattern(pn->pn_kid1, &var) ||
!optExpression(pn->pn_kid2, &guard)) {
return false;
}
diff --git a/js/src/frontend/BytecodeEmitter.cpp b/js/src/frontend/BytecodeEmitter.cpp
index f4574b2489..18cc7d954e 100644
--- a/js/src/frontend/BytecodeEmitter.cpp
+++ b/js/src/frontend/BytecodeEmitter.cpp
@@ -3459,10 +3459,12 @@ BytecodeEmitter::checkSideEffects(ParseNode* pn, bool* answer)
case PNK_CATCH:
MOZ_ASSERT(pn->isArity(PN_TERNARY));
- if (!checkSideEffects(pn->pn_kid1, answer))
- return false;
- if (*answer)
- return true;
+ if (ParseNode* name = pn->pn_kid1) {
+ if (!checkSideEffects(name, answer))
+ return false;
+ if (*answer)
+ return true;
+ }
if (ParseNode* cond = pn->pn_kid2) {
if (!checkSideEffects(cond, answer))
return false;
@@ -6495,8 +6497,8 @@ ParseNode::getConstantValue(ExclusiveContext* cx, AllowConstantObjects allowObje
}
MOZ_ASSERT(idx == count);
- ArrayObject* obj = ObjectGroup::newArrayObject(cx, values.begin(), values.length(),
- newKind, arrayKind);
+ JSObject* obj = ObjectGroup::newArrayObject(cx, values.begin(), values.length(),
+ newKind, arrayKind);
if (!obj)
return false;
@@ -6638,24 +6640,31 @@ BytecodeEmitter::emitCatch(ParseNode* pn)
return false;
ParseNode* pn2 = pn->pn_kid1;
- switch (pn2->getKind()) {
- case PNK_ARRAY:
- case PNK_OBJECT:
- if (!emitDestructuringOps(pn2, DestructuringDeclaration))
- return false;
- if (!emit1(JSOP_POP))
- return false;
- break;
-
- case PNK_NAME:
- if (!emitLexicalInitialization(pn2))
- return false;
- if (!emit1(JSOP_POP))
- return false;
- break;
-
- default:
- MOZ_ASSERT(0);
+ if (!pn2) {
+ // See ES2019 13.15.7 Runtime Semantics: CatchClauseEvaluation
+ // Catch variable was omitted: discard the exception.
+ if (!emit1(JSOP_POP))
+ return false;
+ } else {
+ switch (pn2->getKind()) {
+ case PNK_ARRAY:
+ case PNK_OBJECT:
+ if (!emitDestructuringOps(pn2, DestructuringDeclaration))
+ return false;
+ if (!emit1(JSOP_POP))
+ return false;
+ break;
+
+ case PNK_NAME:
+ if (!emitLexicalInitialization(pn2))
+ return false;
+ if (!emit1(JSOP_POP))
+ return false;
+ break;
+
+ default:
+ MOZ_ASSERT(0);
+ }
}
// If there is a guard expression, emit it and arrange to jump to the next
@@ -6899,7 +6908,9 @@ BytecodeEmitter::emitLexicalScope(ParseNode* pn)
EmitterScope emitterScope(this);
ScopeKind kind;
if (body->isKind(PNK_CATCH))
- kind = body->pn_kid1->isKind(PNK_NAME) ? ScopeKind::SimpleCatch : ScopeKind::Catch;
+ kind = (!body->pn_kid1 || body->pn_kid1->isKind(PNK_NAME)) ?
+ ScopeKind::SimpleCatch :
+ ScopeKind::Catch;
else
kind = ScopeKind::Lexical;
@@ -9623,7 +9634,7 @@ BytecodeEmitter::emitCallOrNew(ParseNode* pn, ValueUsage valueUsage /* = ValueUs
return false;
}
- if (!emitArray(args, argc))
+ if (!emitArray(args, argc, JSOP_SPREADCALLARRAY))
return false;
if (optCodeEmitted) {
@@ -10138,11 +10149,11 @@ BytecodeEmitter::emitArrayLiteral(ParseNode* pn)
}
}
- return emitArray(pn->pn_head, pn->pn_count);
+ return emitArray(pn->pn_head, pn->pn_count, JSOP_NEWARRAY);
}
bool
-BytecodeEmitter::emitArray(ParseNode* pn, uint32_t count)
+BytecodeEmitter::emitArray(ParseNode* pn, uint32_t count, JSOp op)
{
/*
@@ -10153,6 +10164,7 @@ BytecodeEmitter::emitArray(ParseNode* pn, uint32_t count)
* to avoid dup'ing and popping the array as each element is added, as
* JSOP_SETELEM/JSOP_SETPROP would do.
*/
+ MOZ_ASSERT(op == JSOP_NEWARRAY || op == JSOP_SPREADCALLARRAY);
uint32_t nspread = 0;
for (ParseNode* elt = pn; elt; elt = elt->pn_next) {
@@ -10173,7 +10185,7 @@ BytecodeEmitter::emitArray(ParseNode* pn, uint32_t count)
// For arrays with spread, this is a very pessimistic allocation, the
// minimum possible final size.
- if (!emitUint32Operand(JSOP_NEWARRAY, count - nspread)) // ARRAY
+ if (!emitUint32Operand(op, count - nspread)) // ARRAY
return false;
ParseNode* pn2 = pn;
@@ -11314,8 +11326,8 @@ BytecodeEmitter::setSrcNoteOffset(unsigned index, unsigned which, ptrdiff_t offs
/* Maybe this offset was already set to a four-byte value. */
if (!(*sn & SN_4BYTE_OFFSET_FLAG)) {
/* Insert three dummy bytes that will be overwritten shortly. */
- if (MOZ_UNLIKELY(notes.length() + 3 > MaxSrcNotesLength)) {
- ReportAllocationOverflow(cx);
+ if (MOZ_UNLIKELY(notes.length() + 3 > MaxSrcNotesLength)) {
+ ReportAllocationOverflow(cx);
return false;
}
jssrcnote dummy = 0;
diff --git a/js/src/frontend/BytecodeEmitter.h b/js/src/frontend/BytecodeEmitter.h
index 8ad409c11e..77f77599c3 100644
--- a/js/src/frontend/BytecodeEmitter.h
+++ b/js/src/frontend/BytecodeEmitter.h
@@ -543,7 +543,7 @@ struct MOZ_STACK_CLASS BytecodeEmitter
MOZ_MUST_USE bool emitAtomOp(ParseNode* pn, JSOp op);
MOZ_MUST_USE bool emitArrayLiteral(ParseNode* pn);
- MOZ_MUST_USE bool emitArray(ParseNode* pn, uint32_t count);
+ MOZ_MUST_USE bool emitArray(ParseNode* pn, uint32_t count, JSOp op);
MOZ_MUST_USE bool emitArrayComp(ParseNode* pn);
MOZ_MUST_USE bool emitInternedScopeOp(uint32_t index, JSOp op);
diff --git a/js/src/frontend/FoldConstants.cpp b/js/src/frontend/FoldConstants.cpp
index 16294c4a81..b460b92b6e 100644
--- a/js/src/frontend/FoldConstants.cpp
+++ b/js/src/frontend/FoldConstants.cpp
@@ -1260,9 +1260,10 @@ FoldCatch(ExclusiveContext* cx, ParseNode* node, Parser<FullParseHandler>& parse
MOZ_ASSERT(node->isKind(PNK_CATCH));
MOZ_ASSERT(node->isArity(PN_TERNARY));
- ParseNode*& declPattern = node->pn_kid1;
- if (!Fold(cx, &declPattern, parser, inGenexpLambda))
- return false;
+ if (ParseNode*& declPattern = node->pn_kid1) {
+ if (!Fold(cx, &declPattern, parser, inGenexpLambda))
+ return false;
+ }
if (ParseNode*& cond = node->pn_kid2) {
if (!FoldCondition(cx, &cond, parser, inGenexpLambda))
diff --git a/js/src/frontend/NameFunctions.cpp b/js/src/frontend/NameFunctions.cpp
index 376be76242..db70bb5b4a 100644
--- a/js/src/frontend/NameFunctions.cpp
+++ b/js/src/frontend/NameFunctions.cpp
@@ -651,8 +651,10 @@ class NameResolver
// contain arbitrary expressions.
case PNK_CATCH:
MOZ_ASSERT(cur->isArity(PN_TERNARY));
- if (!resolve(cur->pn_kid1, prefix))
- return false;
+ if (cur->pn_kid1) {
+ if (!resolve(cur->pn_kid1, prefix))
+ return false;
+ }
if (cur->pn_kid2) {
if (!resolve(cur->pn_kid2, prefix))
return false;
diff --git a/js/src/frontend/ParseNode.cpp b/js/src/frontend/ParseNode.cpp
index 42ae9451a3..e01a41067e 100644
--- a/js/src/frontend/ParseNode.cpp
+++ b/js/src/frontend/ParseNode.cpp
@@ -409,13 +409,14 @@ PushNodeChildren(ParseNode* pn, NodeStack* stack)
return PushResult::Recyclable;
}
- // A catch node has first kid as catch-variable pattern, the second kid
- // as catch condition (which, if non-null, records the |<cond>| in
- // SpiderMonkey's |catch (e if <cond>)| extension), and third kid as the
- // statements in the catch block.
+ // A catch node has an (optional) first kid as catch-variable pattern,
+ // the second kid as (optional) catch condition (which, records the
+ // |<cond>| in SpiderMonkey's |catch (e if <cond>)| extension), and
+ // third kid as the statements in the catch block.
case PNK_CATCH: {
MOZ_ASSERT(pn->isArity(PN_TERNARY));
- stack->push(pn->pn_kid1);
+ if (pn->pn_kid1)
+ stack->push(pn->pn_kid1);
if (pn->pn_kid2)
stack->push(pn->pn_kid2);
stack->push(pn->pn_kid3);
diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp
index cf9f1e27c9..810d589be9 100644
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -6901,57 +6901,67 @@ Parser<ParseHandler>::tryStatement(YieldHandling yieldHandling)
/*
* Legal catch forms are:
* catch (lhs)
- * catch (lhs if <boolean_expression>)
+ * catch (lhs if <boolean_expression>) ** non-standard **
+ * catch ** ES2019 **
* where lhs is a name or a destructuring left-hand side.
- * (the latter is legal only #ifdef JS_HAS_CATCH_GUARD)
+ * The second is legal only #ifdef JS_HAS_CATCH_GUARD
*/
- MUST_MATCH_TOKEN(TOK_LP, JSMSG_PAREN_BEFORE_CATCH);
-
- if (!tokenStream.getToken(&tt))
+ bool omittedBinding;
+ if (!tokenStream.matchToken(&omittedBinding, TOK_LC))
return null();
+
Node catchName;
- switch (tt) {
- case TOK_LB:
- case TOK_LC:
- catchName = destructuringDeclaration(DeclarationKind::CatchParameter,
- yieldHandling, tt);
- if (!catchName)
- return null();
- break;
+ Node catchGuard = null();
- default: {
- if (!TokenKindIsPossibleIdentifierName(tt)) {
- error(JSMSG_CATCH_IDENTIFIER);
- return null();
- }
+ if (omittedBinding) {
+ catchName = null();
+ } else {
+ MUST_MATCH_TOKEN(TOK_LP, JSMSG_PAREN_BEFORE_CATCH);
- catchName = bindingIdentifier(DeclarationKind::SimpleCatchParameter,
- yieldHandling);
- if (!catchName)
+ if (!tokenStream.getToken(&tt))
return null();
- break;
- }
- }
+ switch (tt) {
+ case TOK_LB:
+ case TOK_LC:
+ catchName = destructuringDeclaration(DeclarationKind::CatchParameter,
+ yieldHandling, tt);
+ if (!catchName)
+ return null();
+ break;
+
+ default: {
+ if (!TokenKindIsPossibleIdentifierName(tt)) {
+ error(JSMSG_CATCH_IDENTIFIER);
+ return null();
+ }
+
+ catchName = bindingIdentifier(DeclarationKind::SimpleCatchParameter,
+ yieldHandling);
+ if (!catchName)
+ return null();
+ break;
+ }
+ }
- Node catchGuard = null();
#if JS_HAS_CATCH_GUARD
- /*
- * We use 'catch (x if x === 5)' (not 'catch (x : x === 5)')
- * to avoid conflicting with the JS2/ECMAv4 type annotation
- * catchguard syntax.
- */
- bool matched;
- if (!tokenStream.matchToken(&matched, TOK_IF))
- return null();
- if (matched) {
- catchGuard = expr(InAllowed, yieldHandling, TripledotProhibited);
- if (!catchGuard)
+ /*
+ * We use 'catch (x if x === 5)' (not 'catch (x : x === 5)')
+ * to avoid conflicting with the JS2/ECMAv4 type annotation
+ * catchguard syntax.
+ */
+ bool matched;
+ if (!tokenStream.matchToken(&matched, TOK_IF))
return null();
- }
+ if (matched) {
+ catchGuard = expr(InAllowed, yieldHandling, TripledotProhibited);
+ if (!catchGuard)
+ return null();
+ }
#endif
- MUST_MATCH_TOKEN(TOK_RP, JSMSG_PAREN_AFTER_CATCH);
+ MUST_MATCH_TOKEN(TOK_RP, JSMSG_PAREN_AFTER_CATCH);
- MUST_MATCH_TOKEN(TOK_LC, JSMSG_CURLY_BEFORE_CATCH);
+ MUST_MATCH_TOKEN(TOK_LC, JSMSG_CURLY_BEFORE_CATCH);
+ }
Node catchBody = catchBlockStatement(yieldHandling, scope);
if (!catchBody)
diff --git a/js/src/gc/Marking.cpp b/js/src/gc/Marking.cpp
index 262fc8cbcc..43e325394d 100644
--- a/js/src/gc/Marking.cpp
+++ b/js/src/gc/Marking.cpp
@@ -18,7 +18,6 @@
#include "builtin/ModuleObject.h"
#include "gc/GCInternals.h"
#include "gc/Policy.h"
-#include "gc/StoreBuffer-inl.h"
#include "jit/IonCode.h"
#include "js/SliceBudget.h"
#include "vm/ArgumentsObject.h"
@@ -29,6 +28,7 @@
#include "vm/Shape.h"
#include "vm/Symbol.h"
#include "vm/TypedArrayObject.h"
+#include "vm/UnboxedObject.h"
#include "wasm/WasmJS.h"
#include "jscompartmentinlines.h"
@@ -37,6 +37,7 @@
#include "gc/Nursery-inl.h"
#include "vm/String-inl.h"
+#include "vm/UnboxedObject-inl.h"
using namespace js;
using namespace js::gc;
@@ -1394,6 +1395,14 @@ js::ObjectGroup::traceChildren(JSTracer* trc)
if (maybePreliminaryObjects())
maybePreliminaryObjects()->trace(trc);
+ if (maybeUnboxedLayout())
+ unboxedLayout().trace(trc);
+
+ if (ObjectGroup* unboxedGroup = maybeOriginalUnboxedGroup()) {
+ TraceManuallyBarrieredEdge(trc, &unboxedGroup, "group_original_unboxed_group");
+ setOriginalUnboxedGroup(unboxedGroup);
+ }
+
if (JSObject* descr = maybeTypeDescr()) {
TraceManuallyBarrieredEdge(trc, &descr, "group_type_descr");
setTypeDescr(&descr->as<TypeDescr>());
@@ -1427,6 +1436,12 @@ js::GCMarker::lazilyMarkChildren(ObjectGroup* group)
if (group->maybePreliminaryObjects())
group->maybePreliminaryObjects()->trace(this);
+ if (group->maybeUnboxedLayout())
+ group->unboxedLayout().trace(this);
+
+ if (ObjectGroup* unboxedGroup = group->maybeOriginalUnboxedGroup())
+ traverseEdge(group, unboxedGroup);
+
if (TypeDescr* descr = group->maybeTypeDescr())
traverseEdge(group, static_cast<JSObject*>(descr));
@@ -1469,6 +1484,23 @@ CallTraceHook(Functor f, JSTracer* trc, JSObject* obj, CheckGeneration check, Ar
return nullptr;
}
+ if (clasp == &UnboxedPlainObject::class_) {
+ JSObject** pexpando = obj->as<UnboxedPlainObject>().addressOfExpando();
+ if (*pexpando)
+ f(pexpando, mozilla::Forward<Args>(args)...);
+
+ UnboxedPlainObject& unboxed = obj->as<UnboxedPlainObject>();
+ const UnboxedLayout& layout = check == CheckGeneration::DoChecks
+ ? unboxed.layout()
+ : unboxed.layoutDontCheckGeneration();
+ if (layout.traceList()) {
+ VisitTraceList(f, layout.traceList(), unboxed.data(),
+ mozilla::Forward<Args>(args)...);
+ }
+
+ return nullptr;
+ }
+
clasp->doTrace(trc, obj);
if (!clasp->isNative())
@@ -2261,6 +2293,18 @@ static inline void
TraceWholeCell(TenuringTracer& mover, JSObject* object)
{
mover.traceObject(object);
+
+ // Additionally trace the expando object attached to any unboxed plain
+ // objects. Baseline and Ion can write properties to the expando while
+ // only adding a post barrier to the owning unboxed object. Note that
+ // it isn't possible for a nursery unboxed object to have a tenured
+ // expando, so that adding a post barrier on the original object will
+ // capture any tenured->nursery edges in the expando as well.
+
+ if (object->is<UnboxedPlainObject>()) {
+ if (UnboxedExpandoObject* expando = object->as<UnboxedPlainObject>().maybeExpando())
+ expando->traceChildren(&mover);
+ }
}
static inline void
@@ -2504,6 +2548,8 @@ js::TenuringTracer::moveObjectToTenured(JSObject* dst, JSObject* src, AllocKind
InlineTypedObject::objectMovedDuringMinorGC(this, dst, src);
} else if (src->is<TypedArrayObject>()) {
tenuredSize += TypedArrayObject::objectMovedDuringMinorGC(this, dst, src, dstKind);
+ } else if (src->is<UnboxedArrayObject>()) {
+ tenuredSize += UnboxedArrayObject::objectMovedDuringMinorGC(this, dst, src, dstKind);
} else if (src->is<ArgumentsObject>()) {
tenuredSize += ArgumentsObject::objectMovedDuringMinorGC(this, dst, src);
} else if (src->is<ProxyObject>()) {
diff --git a/js/src/gc/Memory.cpp b/js/src/gc/Memory.cpp
index 418984057a..17c964da0f 100644
--- a/js/src/gc/Memory.cpp
+++ b/js/src/gc/Memory.cpp
@@ -423,7 +423,7 @@ MapMemoryAt(void* desired, size_t length, int prot = PROT_READ | PROT_WRITE,
// possibly be correct on AMD64, but for Solaris/illumos it is.
{
-#if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__)) || defined(__aarch64__) || (defined(__sun) && defined(__x86_64__))
+#if defined(__ia64__) || defined(__aarch64__) || (defined(__sun) && defined(__x86_64__)) || (defined(__sparc__) && defined(__arch64__) && (defined(__NetBSD__) || defined(__linux__)))
MOZ_ASSERT((0xffff800000000000ULL & (uintptr_t(desired) + length - 1)) == 0);
#endif
void* region = mmap(desired, length, prot, flags, fd, offset);
@@ -446,7 +446,7 @@ static inline void*
MapMemory(size_t length, int prot = PROT_READ | PROT_WRITE,
int flags = MAP_PRIVATE | MAP_ANON, int fd = -1, off_t offset = 0)
{
-#if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__))
+#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__NetBSD__))
/*
* The JS engine assumes that all allocated pointers have their high 17 bits clear,
* which ia64's mmap doesn't support directly. However, we can emulate it by passing
@@ -473,7 +473,7 @@ MapMemory(size_t length, int prot = PROT_READ | PROT_WRITE,
return nullptr;
}
return region;
-#elif defined(__aarch64__) || (defined(__sun) && defined(__x86_64__))
+#elif defined(__aarch64__) || (defined(__sun) && defined(__x86_64__)) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__))
/*
* There might be similar virtual address issue on arm64 which depends on
* hardware and kernel configurations. But the work around is slightly
diff --git a/js/src/gc/Tracer.cpp b/js/src/gc/Tracer.cpp
index 3416464ddf..63cd9b08a4 100644
--- a/js/src/gc/Tracer.cpp
+++ b/js/src/gc/Tracer.cpp
@@ -201,15 +201,80 @@ gc::TraceCycleCollectorChildren(JS::CallbackTracer* trc, Shape* shape)
} while (shape);
}
+// Object groups can point to other object groups via an UnboxedLayout or the
+// the original unboxed group link. There can potentially be deep or cyclic
+// chains of such groups to trace through without going through a thing that
+// participates in cycle collection. These need to be handled iteratively to
+// avoid blowing the stack when running the cycle collector's callback tracer.
+struct ObjectGroupCycleCollectorTracer : public JS::CallbackTracer
+{
+ explicit ObjectGroupCycleCollectorTracer(JS::CallbackTracer* innerTracer)
+ : JS::CallbackTracer(innerTracer->runtime(), DoNotTraceWeakMaps),
+ innerTracer(innerTracer)
+ {}
+
+ void onChild(const JS::GCCellPtr& thing) override;
+
+ JS::CallbackTracer* innerTracer;
+ Vector<ObjectGroup*, 4, SystemAllocPolicy> seen, worklist;
+};
+
+void
+ObjectGroupCycleCollectorTracer::onChild(const JS::GCCellPtr& thing)
+{
+ if (thing.is<BaseShape>()) {
+ // The CC does not care about BaseShapes, and no additional GC things
+ // will be reached by following this edge.
+ return;
+ }
+
+ if (thing.is<JSObject>() || thing.is<JSScript>()) {
+ // Invoke the inner cycle collector callback on this child. It will not
+ // recurse back into TraceChildren.
+ innerTracer->onChild(thing);
+ return;
+ }
+
+ if (thing.is<ObjectGroup>()) {
+ // If this group is required to be in an ObjectGroup chain, trace it
+ // via the provided worklist rather than continuing to recurse.
+ ObjectGroup& group = thing.as<ObjectGroup>();
+ if (group.maybeUnboxedLayout()) {
+ for (size_t i = 0; i < seen.length(); i++) {
+ if (seen[i] == &group)
+ return;
+ }
+ if (seen.append(&group) && worklist.append(&group)) {
+ return;
+ } else {
+ // If append fails, keep tracing normally. The worst that will
+ // happen is we end up overrecursing.
+ }
+ }
+ }
+
+ TraceChildren(this, thing.asCell(), thing.kind());
+}
+
void
gc::TraceCycleCollectorChildren(JS::CallbackTracer* trc, ObjectGroup* group)
{
MOZ_ASSERT(trc->isCallbackTracer());
- group->traceChildren(trc);
-}
+ // Early return if this group is not required to be in an ObjectGroup chain.
+ if (!group->maybeUnboxedLayout())
+ return group->traceChildren(trc);
+
+ ObjectGroupCycleCollectorTracer groupTracer(trc->asCallbackTracer());
+ group->traceChildren(&groupTracer);
+ while (!groupTracer.worklist.empty()) {
+ ObjectGroup* innerGroup = groupTracer.worklist.popCopy();
+ innerGroup->traceChildren(&groupTracer);
+ }
+}
+
/*** Traced Edge Printer *************************************************************************/
static size_t
diff --git a/js/src/jit-test/tests/basic/unboxed-object-clear-new-script.js b/js/src/jit-test/tests/basic/unboxed-object-clear-new-script.js
new file mode 100644
index 0000000000..f55456222d
--- /dev/null
+++ b/js/src/jit-test/tests/basic/unboxed-object-clear-new-script.js
@@ -0,0 +1,49 @@
+
+function Foo(a, b) {
+ this.a = a;
+ this.b = b;
+}
+
+function invalidate_foo() {
+ var a = [];
+ var counter = 0;
+ for (var i = 0; i < 50; i++)
+ a.push(new Foo(i, i + 1));
+ Object.defineProperty(Foo.prototype, "a", {configurable: true, set: function() { counter++; }});
+ for (var i = 0; i < 50; i++)
+ a.push(new Foo(i, i + 1));
+ delete Foo.prototype.a;
+ var total = 0;
+ for (var i = 0; i < a.length; i++) {
+ assertEq('a' in a[i], i < 50);
+ total += a[i].b;
+ }
+ assertEq(total, 2550);
+ assertEq(counter, 50);
+}
+invalidate_foo();
+
+function Bar(a, b, fn) {
+ this.a = a;
+ if (b == 30)
+ Object.defineProperty(Bar.prototype, "b", {configurable: true, set: fn});
+ this.b = b;
+}
+
+function invalidate_bar() {
+ var a = [];
+ var counter = 0;
+ function fn() { counter++; }
+ for (var i = 0; i < 50; i++)
+ a.push(new Bar(i, i + 1, fn));
+ delete Bar.prototype.b;
+ var total = 0;
+ for (var i = 0; i < a.length; i++) {
+ assertEq('a' in a[i], true);
+ assertEq('b' in a[i], i < 29);
+ total += a[i].a;
+ }
+ assertEq(total, 1225);
+ assertEq(counter, 21);
+}
+invalidate_bar();
diff --git a/js/src/jit-test/tests/basic/unboxed-object-convert-to-native.js b/js/src/jit-test/tests/basic/unboxed-object-convert-to-native.js
new file mode 100644
index 0000000000..691fe166c3
--- /dev/null
+++ b/js/src/jit-test/tests/basic/unboxed-object-convert-to-native.js
@@ -0,0 +1,47 @@
+
+// Test various ways of converting an unboxed object to native.
+
+function Foo(a, b) {
+ this.a = a;
+ this.b = b;
+}
+
+var proxyObj = {
+ get: function(recipient, name) {
+ return recipient[name] + 2;
+ }
+};
+
+function f() {
+ var a = [];
+ for (var i = 0; i < 50; i++)
+ a.push(new Foo(i, i + 1));
+
+ var prop = "a";
+
+ i = 0;
+ for (; i < 5; i++)
+ a[i].c = i;
+ for (; i < 10; i++)
+ Object.defineProperty(a[i], 'c', {value: i});
+ for (; i < 15; i++)
+ a[i] = new Proxy(a[i], proxyObj);
+ for (; i < 20; i++)
+ a[i].a = 3.5;
+ for (; i < 25; i++)
+ delete a[i].b;
+ for (; i < 30; i++)
+ a[prop] = 4;
+
+ var total = 0;
+ for (i = 0; i < a.length; i++) {
+ if ('a' in a[i])
+ total += a[i].a;
+ if ('b' in a[i])
+ total += a[i].b;
+ if ('c' in a[i])
+ total += a[i].c;
+ }
+ assertEq(total, 2382.5);
+}
+f();
diff --git a/js/src/jit-test/tests/basic/unboxed-object-getelem.js b/js/src/jit-test/tests/basic/unboxed-object-getelem.js
new file mode 100644
index 0000000000..b30b8325a0
--- /dev/null
+++ b/js/src/jit-test/tests/basic/unboxed-object-getelem.js
@@ -0,0 +1,20 @@
+
+function f() {
+ var propNames = ["a","b","c","d","e","f","g","h","i","j","x","y"];
+ var arr = [];
+ for (var i=0; i<64; i++)
+ arr.push({x:1, y:2});
+ for (var i=0; i<64; i++) {
+ // Make sure there are expandos with dynamic slots for each object.
+ for (var j = 0; j < propNames.length; j++)
+ arr[i][propNames[j]] = j;
+ }
+ var res = 0;
+ for (var i=0; i<100000; i++) {
+ var o = arr[i % 64];
+ var p = propNames[i % propNames.length];
+ res += o[p];
+ }
+ assertEq(res, 549984);
+}
+f();
diff --git a/js/src/jit-test/tests/basic/unboxed-object-set-property.js b/js/src/jit-test/tests/basic/unboxed-object-set-property.js
new file mode 100644
index 0000000000..fdcfcf6b22
--- /dev/null
+++ b/js/src/jit-test/tests/basic/unboxed-object-set-property.js
@@ -0,0 +1,31 @@
+
+// Use the correct receiver when non-native objects are prototypes of other objects.
+
+function Thing(a, b) {
+ this.a = a;
+ this.b = b;
+}
+
+function foo() {
+ var array = [];
+ for (var i = 0; i < 10000; i++)
+ array.push(new Thing(i, i + 1));
+
+ var proto = new Thing(1, 2);
+ var obj = Object.create(proto);
+
+ Object.defineProperty(Thing.prototype, "c", {set:function() { this.d = 0; }});
+ obj.c = 3;
+ assertEq(obj.c, undefined);
+ assertEq(obj.d, 0);
+ assertEq(obj.hasOwnProperty("d"), true);
+ assertEq(proto.d, undefined);
+ assertEq(proto.hasOwnProperty("d"), false);
+
+ obj.a = 3;
+ assertEq(obj.a, 3);
+ assertEq(proto.a, 1);
+ assertEq(obj.hasOwnProperty("a"), true);
+}
+
+foo();
diff --git a/js/src/jit-test/tests/basic/unboxed-property-enumeration.js b/js/src/jit-test/tests/basic/unboxed-property-enumeration.js
new file mode 100644
index 0000000000..142d932dd3
--- /dev/null
+++ b/js/src/jit-test/tests/basic/unboxed-property-enumeration.js
@@ -0,0 +1,24 @@
+function O() {
+ this.x = 1;
+ this.y = 2;
+}
+function testUnboxed() {
+ var arr = [];
+ for (var i=0; i<100; i++)
+ arr.push(new O);
+
+ var o = arr[arr.length-1];
+ o[0] = 0;
+ o[2] = 2;
+ var sym = Symbol();
+ o[sym] = 1;
+ o.z = 3;
+ Object.defineProperty(o, '3', {value:1,enumerable:false,configurable:false,writable:false});
+ o[4] = 4;
+
+ var props = Reflect.ownKeys(o);
+ assertEq(props[props.length-1], sym);
+
+ assertEq(Object.getOwnPropertyNames(o).join(""), "0234xyz");
+}
+testUnboxed();
diff --git a/js/src/jit-test/tests/ion/unboxed-objects-invalidate.js b/js/src/jit-test/tests/ion/unboxed-objects-invalidate.js
new file mode 100644
index 0000000000..02e27614fe
--- /dev/null
+++ b/js/src/jit-test/tests/ion/unboxed-objects-invalidate.js
@@ -0,0 +1,16 @@
+
+var a = [];
+for (var i = 0; i < 2000; i++)
+ a.push({f:i});
+
+function f() {
+ var total = 0;
+ for (var i = 0; i < a.length; i++)
+ total += a[i].f;
+ return total;
+}
+assertEq(f(), 1999000);
+
+var sub = Object.create(a[0]);
+
+assertEq(f(), 1999000);
diff --git a/js/src/jit/AliasAnalysisShared.cpp b/js/src/jit/AliasAnalysisShared.cpp
index 400626b336..99c23d2a3e 100644
--- a/js/src/jit/AliasAnalysisShared.cpp
+++ b/js/src/jit/AliasAnalysisShared.cpp
@@ -91,6 +91,10 @@ GetObject(const MDefinition* ins)
case MDefinition::Op_Elements:
case MDefinition::Op_MaybeCopyElementsForWrite:
case MDefinition::Op_MaybeToDoubleElement:
+ case MDefinition::Op_UnboxedArrayLength:
+ case MDefinition::Op_UnboxedArrayInitializedLength:
+ case MDefinition::Op_IncrementUnboxedArrayInitializedLength:
+ case MDefinition::Op_SetUnboxedArrayInitializedLength:
case MDefinition::Op_TypedArrayLength:
case MDefinition::Op_SetTypedObjectOffset:
case MDefinition::Op_SetDisjointTypedElements:
@@ -108,6 +112,8 @@ GetObject(const MDefinition* ins)
case MDefinition::Op_GuardObjectGroup:
case MDefinition::Op_GuardObjectIdentity:
case MDefinition::Op_GuardClass:
+ case MDefinition::Op_GuardUnboxedExpando:
+ case MDefinition::Op_LoadUnboxedExpando:
case MDefinition::Op_LoadSlot:
case MDefinition::Op_StoreSlot:
case MDefinition::Op_InArray:
diff --git a/js/src/jit/BaselineCacheIR.cpp b/js/src/jit/BaselineCacheIR.cpp
index 67c80473b4..bf96932d1e 100644
--- a/js/src/jit/BaselineCacheIR.cpp
+++ b/js/src/jit/BaselineCacheIR.cpp
@@ -16,7 +16,7 @@ using namespace js;
using namespace js::jit;
// OperandLocation represents the location of an OperandId. The operand is
-// either in a register or on the stack.
+// either in a register or on the stack, and is either boxed or unboxed.
class OperandLocation
{
public:
@@ -787,6 +787,9 @@ BaselineCacheIRCompiler::emitGuardClass()
case GuardClassKind::Array:
clasp = &ArrayObject::class_;
break;
+ case GuardClassKind::UnboxedArray:
+ clasp = &UnboxedArrayObject::class_;
+ break;
case GuardClassKind::MappedArguments:
clasp = &MappedArgumentsObject::class_;
break;
@@ -815,6 +818,36 @@ BaselineCacheIRCompiler::emitGuardSpecificObject()
}
bool
+BaselineCacheIRCompiler::emitGuardNoUnboxedExpando()
+{
+ Register obj = allocator.useRegister(masm, reader.objOperandId());
+
+ FailurePath* failure;
+ if (!addFailurePath(&failure))
+ return false;
+
+ Address expandoAddr(obj, UnboxedPlainObject::offsetOfExpando());
+ masm.branchPtr(Assembler::NotEqual, expandoAddr, ImmWord(0), failure->label());
+ return true;
+}
+
+bool
+BaselineCacheIRCompiler::emitGuardAndLoadUnboxedExpando()
+{
+ Register obj = allocator.useRegister(masm, reader.objOperandId());
+ Register output = allocator.defineRegister(masm, reader.objOperandId());
+
+ FailurePath* failure;
+ if (!addFailurePath(&failure))
+ return false;
+
+ Address expandoAddr(obj, UnboxedPlainObject::offsetOfExpando());
+ masm.loadPtr(expandoAddr, output);
+ masm.branchTestPtr(Assembler::Zero, output, output, failure->label());
+ return true;
+}
+
+bool
BaselineCacheIRCompiler::emitLoadFixedSlotResult()
{
Register obj = allocator.useRegister(masm, reader.objOperandId());
@@ -841,6 +874,26 @@ BaselineCacheIRCompiler::emitLoadDynamicSlotResult()
}
bool
+BaselineCacheIRCompiler::emitLoadUnboxedPropertyResult()
+{
+ Register obj = allocator.useRegister(masm, reader.objOperandId());
+ AutoScratchRegister scratch(allocator, masm);
+
+ JSValueType fieldType = reader.valueType();
+
+ Address fieldOffset(stubAddress(reader.stubOffset()));
+ masm.load32(fieldOffset, scratch);
+ masm.loadUnboxedProperty(BaseIndex(obj, scratch, TimesOne), fieldType, R0);
+
+ if (fieldType == JSVAL_TYPE_OBJECT)
+ emitEnterTypeMonitorIC();
+ else
+ emitReturnFromIC();
+
+ return true;
+}
+
+bool
BaselineCacheIRCompiler::emitGuardNoDetachedTypedObjects()
{
FailurePath* failure;
@@ -951,6 +1004,19 @@ BaselineCacheIRCompiler::emitLoadInt32ArrayLengthResult()
}
bool
+BaselineCacheIRCompiler::emitLoadUnboxedArrayLengthResult()
+{
+ Register obj = allocator.useRegister(masm, reader.objOperandId());
+ masm.load32(Address(obj, UnboxedArrayObject::offsetOfLength()), R0.scratchReg());
+ masm.tagValue(JSVAL_TYPE_INT32, R0.scratchReg(), R0);
+
+ // The int32 type was monitored when attaching the stub, so we can
+ // just return.
+ emitReturnFromIC();
+ return true;
+}
+
+bool
BaselineCacheIRCompiler::emitLoadArgumentsObjectLengthResult()
{
Register obj = allocator.useRegister(masm, reader.objOperandId());
diff --git a/js/src/jit/BaselineCompiler.cpp b/js/src/jit/BaselineCompiler.cpp
index d254b9826f..ae5a2e666f 100644
--- a/js/src/jit/BaselineCompiler.cpp
+++ b/js/src/jit/BaselineCompiler.cpp
@@ -2050,7 +2050,13 @@ BaselineCompiler::emit_JSOP_NEWARRAY()
return true;
}
-typedef ArrayObject* (*NewArrayCopyOnWriteFn)(JSContext*, HandleArrayObject, gc::InitialHeap);
+bool
+BaselineCompiler::emit_JSOP_SPREADCALLARRAY()
+{
+ return emit_JSOP_NEWARRAY();
+}
+
+typedef JSObject* (*NewArrayCopyOnWriteFn)(JSContext*, HandleArrayObject, gc::InitialHeap);
const VMFunction jit::NewArrayCopyOnWriteInfo =
FunctionInfo<NewArrayCopyOnWriteFn>(js::NewDenseCopyOnWriteArray, "NewDenseCopyOnWriteArray");
@@ -4181,14 +4187,14 @@ BaselineCompiler::emit_JSOP_REST()
{
frame.syncStack(0);
- ArrayObject* templateObject =
+ JSObject* templateObject =
ObjectGroup::newArrayObject(cx, nullptr, 0, TenuredObject,
ObjectGroup::NewArrayKind::UnknownIndex);
if (!templateObject)
return false;
// Call IC.
- ICRest_Fallback::Compiler compiler(cx, templateObject);
+ ICRest_Fallback::Compiler compiler(cx, &templateObject->as<ArrayObject>());
if (!emitOpIC(compiler.getStub(&stubSpace_)))
return false;
diff --git a/js/src/jit/BaselineCompiler.h b/js/src/jit/BaselineCompiler.h
index a200f7ab9f..7b1af092ae 100644
--- a/js/src/jit/BaselineCompiler.h
+++ b/js/src/jit/BaselineCompiler.h
@@ -100,6 +100,7 @@ namespace jit {
_(JSOP_BITNOT) \
_(JSOP_NEG) \
_(JSOP_NEWARRAY) \
+ _(JSOP_SPREADCALLARRAY) \
_(JSOP_NEWARRAY_COPYONWRITE) \
_(JSOP_INITELEM_ARRAY) \
_(JSOP_NEWOBJECT) \
diff --git a/js/src/jit/BaselineIC.cpp b/js/src/jit/BaselineIC.cpp
index e65f10aaca..9c8cd98350 100644
--- a/js/src/jit/BaselineIC.cpp
+++ b/js/src/jit/BaselineIC.cpp
@@ -44,8 +44,8 @@
#include "jit/shared/Lowering-shared-inl.h"
#include "vm/EnvironmentObject-inl.h"
#include "vm/Interpreter-inl.h"
-#include "vm/NativeObject-inl.h"
#include "vm/StringObject-inl.h"
+#include "vm/UnboxedObject-inl.h"
using mozilla::DebugOnly;
@@ -741,6 +741,11 @@ LastPropertyForSetProp(JSObject* obj)
if (obj->isNative())
return obj->as<NativeObject>().lastProperty();
+ if (obj->is<UnboxedPlainObject>()) {
+ UnboxedExpandoObject* expando = obj->as<UnboxedPlainObject>().maybeExpando();
+ return expando ? expando->lastProperty() : nullptr;
+ }
+
return nullptr;
}
@@ -1157,6 +1162,56 @@ TryAttachNativeOrUnboxedGetValueElemStub(JSContext* cx, HandleScript script, jsb
ICStub* monitorStub = stub->fallbackMonitorStub()->firstMonitorStub();
+ if (obj->is<UnboxedPlainObject>() && holder == obj) {
+ const UnboxedLayout::Property* property = obj->as<UnboxedPlainObject>().layout().lookup(id);
+
+ // Once unboxed objects support symbol-keys, we need to change the following accordingly
+ MOZ_ASSERT_IF(!keyVal.isString(), !property);
+
+ if (property) {
+ if (!cx->runtime()->jitSupportsFloatingPoint)
+ return true;
+
+ RootedPropertyName name(cx, JSID_TO_ATOM(id)->asPropertyName());
+ ICGetElemNativeCompiler<PropertyName*> compiler(cx, ICStub::GetElem_UnboxedPropertyName,
+ monitorStub, obj, holder,
+ name,
+ ICGetElemNativeStub::UnboxedProperty,
+ needsAtomize, property->offset +
+ UnboxedPlainObject::offsetOfData(),
+ property->type);
+ ICStub* newStub = compiler.getStub(compiler.getStubSpace(script));
+ if (!newStub)
+ return false;
+
+ stub->addNewStub(newStub);
+ *attached = true;
+ return true;
+ }
+
+ Shape* shape = obj->as<UnboxedPlainObject>().maybeExpando()->lookup(cx, id);
+ if (!shape->hasDefaultGetter() || !shape->hasSlot())
+ return true;
+
+ bool isFixedSlot;
+ uint32_t offset;
+ GetFixedOrDynamicSlotOffset(shape, &isFixedSlot, &offset);
+
+ ICGetElemNativeStub::AccessType acctype =
+ isFixedSlot ? ICGetElemNativeStub::FixedSlot
+ : ICGetElemNativeStub::DynamicSlot;
+ ICGetElemNativeCompiler<T> compiler(cx, getGetElemStubKind<T>(ICStub::GetElem_NativeSlotName),
+ monitorStub, obj, holder, key,
+ acctype, needsAtomize, offset);
+ ICStub* newStub = compiler.getStub(compiler.getStubSpace(script));
+ if (!newStub)
+ return false;
+
+ stub->addNewStub(newStub);
+ *attached = true;
+ return true;
+ }
+
if (!holder->isNative())
return true;
@@ -1320,7 +1375,7 @@ IsNativeDenseElementAccess(HandleObject obj, HandleValue key)
static bool
IsNativeOrUnboxedDenseElementAccess(HandleObject obj, HandleValue key)
{
- if (!obj->isNative())
+ if (!obj->isNative() && !obj->is<UnboxedArrayObject>())
return false;
if (key.isInt32() && key.toInt32() >= 0 && !obj->is<TypedArrayObject>())
return true;
@@ -1404,7 +1459,7 @@ TryAttachGetElemStub(JSContext* cx, JSScript* script, jsbytecode* pc, ICGetElem_
}
// Check for NativeObject[id] and UnboxedPlainObject[id] shape-optimizable accesses.
- if (obj->isNative()) {
+ if (obj->isNative() || obj->is<UnboxedPlainObject>()) {
RootedScript rootedScript(cx, script);
if (rhs.isString()) {
if (!TryAttachNativeOrUnboxedGetValueElemStub<PropertyName*>(cx, rootedScript, pc, stub,
@@ -1424,6 +1479,20 @@ TryAttachGetElemStub(JSContext* cx, JSScript* script, jsbytecode* pc, ICGetElem_
script = rootedScript;
}
+ // Check for UnboxedArray[int] accesses.
+ if (obj->is<UnboxedArrayObject>() && rhs.isInt32() && rhs.toInt32() >= 0) {
+ JitSpew(JitSpew_BaselineIC, " Generating GetElem(UnboxedArray[Int32]) stub");
+ ICGetElem_UnboxedArray::Compiler compiler(cx, stub->fallbackMonitorStub()->firstMonitorStub(),
+ obj->group());
+ ICStub* unboxedStub = compiler.getStub(compiler.getStubSpace(script));
+ if (!unboxedStub)
+ return false;
+
+ stub->addNewStub(unboxedStub);
+ *attached = true;
+ return true;
+ }
+
// Check for TypedArray[int] => Number and TypedObject[int] => Number accesses.
if ((obj->is<TypedArrayObject>() || IsPrimitiveArrayTypedObject(obj)) &&
rhs.isNumber() &&
@@ -1816,6 +1885,14 @@ ICGetElemNativeCompiler<T>::generateStubCode(MacroAssembler& masm)
Register holderReg;
if (obj_ == holder_) {
holderReg = objReg;
+
+ if (obj_->is<UnboxedPlainObject>() && acctype_ != ICGetElemNativeStub::UnboxedProperty) {
+ // The property will be loaded off the unboxed expando.
+ masm.push(R1.scratchReg());
+ popR1 = true;
+ holderReg = R1.scratchReg();
+ masm.loadPtr(Address(objReg, UnboxedPlainObject::offsetOfExpando()), holderReg);
+ }
} else {
// Shape guard holder.
if (regs.empty()) {
@@ -1866,6 +1943,13 @@ ICGetElemNativeCompiler<T>::generateStubCode(MacroAssembler& masm)
if (popR1)
masm.addToStackPtr(ImmWord(sizeof(size_t)));
+ } else if (acctype_ == ICGetElemNativeStub::UnboxedProperty) {
+ masm.load32(Address(ICStubReg, ICGetElemNativeSlotStub<T>::offsetOfOffset()),
+ scratchReg);
+ masm.loadUnboxedProperty(BaseIndex(objReg, scratchReg, TimesOne), unboxedType_,
+ TypedOrValueRegister(R0));
+ if (popR1)
+ masm.addToStackPtr(ImmWord(sizeof(size_t)));
} else {
MOZ_ASSERT(acctype_ == ICGetElemNativeStub::NativeGetter ||
acctype_ == ICGetElemNativeStub::ScriptedGetter);
@@ -2015,6 +2099,56 @@ ICGetElem_Dense::Compiler::generateStubCode(MacroAssembler& masm)
}
//
+// GetElem_UnboxedArray
+//
+
+bool
+ICGetElem_UnboxedArray::Compiler::generateStubCode(MacroAssembler& masm)
+{
+ MOZ_ASSERT(engine_ == Engine::Baseline);
+
+ Label failure;
+ masm.branchTestObject(Assembler::NotEqual, R0, &failure);
+ masm.branchTestInt32(Assembler::NotEqual, R1, &failure);
+
+ AllocatableGeneralRegisterSet regs(availableGeneralRegs(2));
+ Register scratchReg = regs.takeAny();
+
+ // Unbox R0 and group guard.
+ Register obj = masm.extractObject(R0, ExtractTemp0);
+ masm.loadPtr(Address(ICStubReg, ICGetElem_UnboxedArray::offsetOfGroup()), scratchReg);
+ masm.branchTestObjGroup(Assembler::NotEqual, obj, scratchReg, &failure);
+
+ // Unbox key.
+ Register key = masm.extractInt32(R1, ExtractTemp1);
+
+ // Bounds check.
+ masm.load32(Address(obj, UnboxedArrayObject::offsetOfCapacityIndexAndInitializedLength()),
+ scratchReg);
+ masm.and32(Imm32(UnboxedArrayObject::InitializedLengthMask), scratchReg);
+ masm.branch32(Assembler::BelowOrEqual, scratchReg, key, &failure);
+
+ // Load obj->elements.
+ masm.loadPtr(Address(obj, UnboxedArrayObject::offsetOfElements()), scratchReg);
+
+ // Load value.
+ size_t width = UnboxedTypeSize(elementType_);
+ BaseIndex addr(scratchReg, key, ScaleFromElemWidth(width));
+ masm.loadUnboxedProperty(addr, elementType_, R0);
+
+ // Only monitor the result if its type might change.
+ if (elementType_ == JSVAL_TYPE_OBJECT)
+ EmitEnterTypeMonitorIC(masm);
+ else
+ EmitReturnFromIC(masm);
+
+ // Failure case - jump to next stub
+ masm.bind(&failure);
+ EmitStubGuardFailure(masm);
+ return true;
+}
+
+//
// GetElem_TypedArray
//
@@ -2318,8 +2452,8 @@ CanOptimizeDenseOrUnboxedArraySetElem(JSObject* obj, uint32_t index,
Shape* oldShape, uint32_t oldCapacity, uint32_t oldInitLength,
bool* isAddingCaseOut, size_t* protoDepthOut)
{
- uint32_t initLength = obj->as<NativeObject>().getDenseInitializedLength();
- uint32_t capacity = obj->as<NativeObject>().getDenseCapacity();
+ uint32_t initLength = GetAnyBoxedOrUnboxedInitializedLength(obj);
+ uint32_t capacity = GetAnyBoxedOrUnboxedCapacity(obj);
*isAddingCaseOut = false;
*protoDepthOut = 0;
@@ -2328,6 +2462,10 @@ CanOptimizeDenseOrUnboxedArraySetElem(JSObject* obj, uint32_t index,
if (initLength < oldInitLength || capacity < oldCapacity)
return false;
+ // Unboxed arrays need to be able to emit floating point code.
+ if (obj->is<UnboxedArrayObject>() && !obj->runtimeFromMainThread()->jitSupportsFloatingPoint)
+ return false;
+
Shape* shape = obj->maybeShape();
// Cannot optimize if the shape changed.
@@ -2409,8 +2547,8 @@ DoSetElemFallback(JSContext* cx, BaselineFrame* frame, ICSetElem_Fallback* stub_
uint32_t oldCapacity = 0;
uint32_t oldInitLength = 0;
if (index.isInt32() && index.toInt32() >= 0) {
- oldCapacity = obj->as<NativeObject>().getDenseCapacity();
- oldInitLength = obj->as<NativeObject>().getDenseInitializedLength();
+ oldCapacity = GetAnyBoxedOrUnboxedCapacity(obj);
+ oldInitLength = GetAnyBoxedOrUnboxedInitializedLength(obj);
}
if (op == JSOP_INITELEM || op == JSOP_INITHIDDENELEM) {
@@ -2618,6 +2756,18 @@ BaselineScript::noteArrayWriteHole(uint32_t pcOffset)
// SetElem_DenseOrUnboxedArray
//
+template <typename T>
+void
+EmitUnboxedPreBarrierForBaseline(MacroAssembler &masm, T address, JSValueType type)
+{
+ if (type == JSVAL_TYPE_OBJECT)
+ EmitPreBarrier(masm, address, MIRType::Object);
+ else if (type == JSVAL_TYPE_STRING)
+ EmitPreBarrier(masm, address, MIRType::String);
+ else
+ MOZ_ASSERT(!UnboxedTypeNeedsPreBarrier(type));
+}
+
bool
ICSetElem_DenseOrUnboxedArray::Compiler::generateStubCode(MacroAssembler& masm)
{
@@ -2736,6 +2886,29 @@ ICSetElem_DenseOrUnboxedArray::Compiler::generateStubCode(MacroAssembler& masm)
masm.loadValue(valueAddr, tmpVal);
EmitPreBarrier(masm, element, MIRType::Value);
masm.storeValue(tmpVal, element);
+ } else {
+ // Set element on an unboxed array.
+
+ // Bounds check.
+ Address initLength(obj, UnboxedArrayObject::offsetOfCapacityIndexAndInitializedLength());
+ masm.load32(initLength, scratchReg);
+ masm.and32(Imm32(UnboxedArrayObject::InitializedLengthMask), scratchReg);
+ masm.branch32(Assembler::BelowOrEqual, scratchReg, key, &failure);
+
+ // Load obj->elements.
+ masm.loadPtr(Address(obj, UnboxedArrayObject::offsetOfElements()), scratchReg);
+
+ // Compute the address being written to.
+ BaseIndex address(scratchReg, key, ScaleFromElemWidth(UnboxedTypeSize(unboxedType_)));
+
+ EmitUnboxedPreBarrierForBaseline(masm, address, unboxedType_);
+
+ Address valueAddr(masm.getStackPointer(), ICStackValueOffset + sizeof(Value));
+ masm.Push(R0);
+ masm.loadValue(valueAddr, R0);
+ masm.storeUnboxedProperty(address, unboxedType_,
+ ConstantOrRegister(TypedOrValueRegister(R0)), &failurePopR0);
+ masm.Pop(R0);
}
EmitReturnFromIC(masm);
@@ -2929,6 +3102,40 @@ ICSetElemDenseOrUnboxedArrayAddCompiler::generateStubCode(MacroAssembler& masm)
BaseIndex element(scratchReg, key, TimesEight);
masm.loadValue(valueAddr, tmpVal);
masm.storeValue(tmpVal, element);
+ } else {
+ // Adding element to an unboxed array.
+
+ // Bounds check (key == initLength)
+ Address initLengthAddr(obj, UnboxedArrayObject::offsetOfCapacityIndexAndInitializedLength());
+ masm.load32(initLengthAddr, scratchReg);
+ masm.and32(Imm32(UnboxedArrayObject::InitializedLengthMask), scratchReg);
+ masm.branch32(Assembler::NotEqual, scratchReg, key, &failure);
+
+ // Capacity check.
+ masm.checkUnboxedArrayCapacity(obj, RegisterOrInt32Constant(key), scratchReg, &failure);
+
+ // Load obj->elements.
+ masm.loadPtr(Address(obj, UnboxedArrayObject::offsetOfElements()), scratchReg);
+
+ // Write the value first, since this can fail. No need for pre-barrier
+ // since we're not overwriting an old value.
+ masm.Push(R0);
+ Address valueAddr(masm.getStackPointer(), ICStackValueOffset + sizeof(Value));
+ masm.loadValue(valueAddr, R0);
+ BaseIndex address(scratchReg, key, ScaleFromElemWidth(UnboxedTypeSize(unboxedType_)));
+ masm.storeUnboxedProperty(address, unboxedType_,
+ ConstantOrRegister(TypedOrValueRegister(R0)), &failurePopR0);
+ masm.Pop(R0);
+
+ // Increment initialized length.
+ masm.add32(Imm32(1), initLengthAddr);
+
+ // If length is now <= key, increment length.
+ Address lengthAddr(obj, UnboxedArrayObject::offsetOfLength());
+ Label skipIncrementLength;
+ masm.branch32(Assembler::Above, lengthAddr, key, &skipIncrementLength);
+ masm.add32(Imm32(1), lengthAddr);
+ masm.bind(&skipIncrementLength);
}
EmitReturnFromIC(masm);
@@ -4061,7 +4268,18 @@ TryAttachSetValuePropStub(JSContext* cx, HandleScript script, jsbytecode* pc, IC
return true;
if (!obj->isNative()) {
- return true;
+ if (obj->is<UnboxedPlainObject>()) {
+ UnboxedExpandoObject* expando = obj->as<UnboxedPlainObject>().maybeExpando();
+ if (expando) {
+ shape = expando->lookup(cx, name);
+ if (!shape)
+ return true;
+ } else {
+ return true;
+ }
+ } else {
+ return true;
+ }
}
size_t chainDepth;
@@ -4209,6 +4427,40 @@ TryAttachSetAccessorPropStub(JSContext* cx, HandleScript script, jsbytecode* pc,
}
static bool
+TryAttachUnboxedSetPropStub(JSContext* cx, HandleScript script,
+ ICSetProp_Fallback* stub, HandleId id,
+ HandleObject obj, HandleValue rhs, bool* attached)
+{
+ MOZ_ASSERT(!*attached);
+
+ if (!cx->runtime()->jitSupportsFloatingPoint)
+ return true;
+
+ if (!obj->is<UnboxedPlainObject>())
+ return true;
+
+ const UnboxedLayout::Property* property = obj->as<UnboxedPlainObject>().layout().lookup(id);
+ if (!property)
+ return true;
+
+ ICSetProp_Unboxed::Compiler compiler(cx, obj->group(),
+ property->offset + UnboxedPlainObject::offsetOfData(),
+ property->type);
+ ICUpdatedStub* newStub = compiler.getStub(compiler.getStubSpace(script));
+ if (!newStub)
+ return false;
+ if (compiler.needsUpdateStubs() && !newStub->addUpdateStubForValue(cx, script, obj, id, rhs))
+ return false;
+
+ stub->addNewStub(newStub);
+
+ StripPreliminaryObjectStubs(cx, stub);
+
+ *attached = true;
+ return true;
+}
+
+static bool
TryAttachTypedObjectSetPropStub(JSContext* cx, HandleScript script,
ICSetProp_Fallback* stub, HandleId id,
HandleObject obj, HandleValue rhs, bool* attached)
@@ -4291,6 +4543,12 @@ DoSetPropFallback(JSContext* cx, BaselineFrame* frame, ICSetProp_Fallback* stub_
return false;
RootedReceiverGuard oldGuard(cx, ReceiverGuard(obj));
+ if (obj->is<UnboxedPlainObject>()) {
+ MOZ_ASSERT(!oldShape);
+ if (UnboxedExpandoObject* expando = obj->as<UnboxedPlainObject>().maybeExpando())
+ oldShape = expando->lastProperty();
+ }
+
bool attached = false;
// There are some reasons we can fail to attach a stub that are temporary.
// We want to avoid calling noteUnoptimizableAccess() if the reason we
@@ -4363,6 +4621,15 @@ DoSetPropFallback(JSContext* cx, BaselineFrame* frame, ICSetProp_Fallback* stub_
if (!attached &&
lhs.isObject() &&
+ !TryAttachUnboxedSetPropStub(cx, script, stub, id, obj, rhs, &attached))
+ {
+ return false;
+ }
+ if (attached)
+ return true;
+
+ if (!attached &&
+ lhs.isObject() &&
!TryAttachTypedObjectSetPropStub(cx, script, stub, id, obj, rhs, &attached))
{
return false;
@@ -4445,7 +4712,20 @@ GuardGroupAndShapeMaybeUnboxedExpando(MacroAssembler& masm, JSObject* obj,
// Guard against shape or expando shape.
masm.loadPtr(Address(ICStubReg, offsetOfShape), scratch);
- masm.branchTestObjShape(Assembler::NotEqual, object, scratch, failure);
+ if (obj->is<UnboxedPlainObject>()) {
+ Address expandoAddress(object, UnboxedPlainObject::offsetOfExpando());
+ masm.branchPtr(Assembler::Equal, expandoAddress, ImmWord(0), failure);
+ Label done;
+ masm.push(object);
+ masm.loadPtr(expandoAddress, object);
+ masm.branchTestObjShape(Assembler::Equal, object, scratch, &done);
+ masm.pop(object);
+ masm.jump(failure);
+ masm.bind(&done);
+ masm.pop(object);
+ } else {
+ masm.branchTestObjShape(Assembler::NotEqual, object, scratch, failure);
+ }
}
bool
@@ -4484,7 +4764,13 @@ ICSetProp_Native::Compiler::generateStubCode(MacroAssembler& masm)
regs.takeUnchecked(objReg);
Register holderReg;
- if (isFixedSlot_) {
+ if (obj_->is<UnboxedPlainObject>()) {
+ // We are loading off the expando object, so use that for the holder.
+ holderReg = regs.takeAny();
+ masm.loadPtr(Address(objReg, UnboxedPlainObject::offsetOfExpando()), holderReg);
+ if (!isFixedSlot_)
+ masm.loadPtr(Address(holderReg, NativeObject::offsetOfSlots()), holderReg);
+ } else if (isFixedSlot_) {
holderReg = objReg;
} else {
holderReg = regs.takeAny();
@@ -4621,17 +4907,31 @@ ICSetPropNativeAddCompiler::generateStubCode(MacroAssembler& masm)
regs.add(R0);
regs.takeUnchecked(objReg);
- // Write the object's new shape.
- Address shapeAddr(objReg, ShapedObject::offsetOfShape());
- EmitPreBarrier(masm, shapeAddr, MIRType::Shape);
- masm.loadPtr(Address(ICStubReg, ICSetProp_NativeAdd::offsetOfNewShape()), scratch);
- masm.storePtr(scratch, shapeAddr);
+ if (obj_->is<UnboxedPlainObject>()) {
+ holderReg = regs.takeAny();
+ masm.loadPtr(Address(objReg, UnboxedPlainObject::offsetOfExpando()), holderReg);
+
+ // Write the expando object's new shape.
+ Address shapeAddr(holderReg, ShapedObject::offsetOfShape());
+ EmitPreBarrier(masm, shapeAddr, MIRType::Shape);
+ masm.loadPtr(Address(ICStubReg, ICSetProp_NativeAdd::offsetOfNewShape()), scratch);
+ masm.storePtr(scratch, shapeAddr);
- if (isFixedSlot_) {
- holderReg = objReg;
+ if (!isFixedSlot_)
+ masm.loadPtr(Address(holderReg, NativeObject::offsetOfSlots()), holderReg);
} else {
- holderReg = regs.takeAny();
- masm.loadPtr(Address(objReg, NativeObject::offsetOfSlots()), holderReg);
+ // Write the object's new shape.
+ Address shapeAddr(objReg, ShapedObject::offsetOfShape());
+ EmitPreBarrier(masm, shapeAddr, MIRType::Shape);
+ masm.loadPtr(Address(ICStubReg, ICSetProp_NativeAdd::offsetOfNewShape()), scratch);
+ masm.storePtr(scratch, shapeAddr);
+
+ if (isFixedSlot_) {
+ holderReg = objReg;
+ } else {
+ holderReg = regs.takeAny();
+ masm.loadPtr(Address(objReg, NativeObject::offsetOfSlots()), holderReg);
+ }
}
// Perform the store. No write barrier required since this is a new
@@ -4663,6 +4963,70 @@ ICSetPropNativeAddCompiler::generateStubCode(MacroAssembler& masm)
}
bool
+ICSetProp_Unboxed::Compiler::generateStubCode(MacroAssembler& masm)
+{
+ MOZ_ASSERT(engine_ == Engine::Baseline);
+
+ Label failure;
+
+ // Guard input is an object.
+ masm.branchTestObject(Assembler::NotEqual, R0, &failure);
+
+ AllocatableGeneralRegisterSet regs(availableGeneralRegs(2));
+ Register scratch = regs.takeAny();
+
+ // Unbox and group guard.
+ Register object = masm.extractObject(R0, ExtractTemp0);
+ masm.loadPtr(Address(ICStubReg, ICSetProp_Unboxed::offsetOfGroup()), scratch);
+ masm.branchPtr(Assembler::NotEqual, Address(object, JSObject::offsetOfGroup()), scratch,
+ &failure);
+
+ if (needsUpdateStubs()) {
+ // Stow both R0 and R1 (object and value).
+ EmitStowICValues(masm, 2);
+
+ // Move RHS into R0 for TypeUpdate check.
+ masm.moveValue(R1, R0);
+
+ // Call the type update stub.
+ if (!callTypeUpdateIC(masm, sizeof(Value)))
+ return false;
+
+ // Unstow R0 and R1 (object and key)
+ EmitUnstowICValues(masm, 2);
+
+ // The TypeUpdate IC may have smashed object. Rederive it.
+ masm.unboxObject(R0, object);
+
+ // Trigger post barriers here on the values being written. Fields which
+ // objects can be written to also need update stubs.
+ LiveGeneralRegisterSet saveRegs;
+ saveRegs.add(R0);
+ saveRegs.add(R1);
+ saveRegs.addUnchecked(object);
+ saveRegs.add(ICStubReg);
+ emitPostWriteBarrierSlot(masm, object, R1, scratch, saveRegs);
+ }
+
+ // Compute the address being written to.
+ masm.load32(Address(ICStubReg, ICSetProp_Unboxed::offsetOfFieldOffset()), scratch);
+ BaseIndex address(object, scratch, TimesOne);
+
+ EmitUnboxedPreBarrierForBaseline(masm, address, fieldType_);
+ masm.storeUnboxedProperty(address, fieldType_,
+ ConstantOrRegister(TypedOrValueRegister(R1)), &failure);
+
+ // The RHS has to be in R0.
+ masm.moveValue(R1, R0);
+
+ EmitReturnFromIC(masm);
+
+ masm.bind(&failure);
+ EmitStubGuardFailure(masm);
+ return true;
+}
+
+bool
ICSetProp_TypedObject::Compiler::generateStubCode(MacroAssembler& masm)
{
MOZ_ASSERT(engine_ == Engine::Baseline);
@@ -5135,6 +5499,13 @@ GetTemplateObjectForSimd(JSContext* cx, JSFunction* target, MutableHandleObject
return true;
}
+static void
+EnsureArrayGroupAnalyzed(JSContext* cx, JSObject* obj)
+{
+ if (PreliminaryObjectArrayWithTemplate* objects = obj->group()->maybePreliminaryObjects())
+ objects->maybeAnalyze(cx, obj->group(), /* forceAnalyze = */ true);
+}
+
static bool
GetTemplateObjectForNative(JSContext* cx, HandleFunction target, const CallArgs& args,
MutableHandleObject res, bool* skipAttach)
@@ -5166,7 +5537,10 @@ GetTemplateObjectForNative(JSContext* cx, HandleFunction target, const CallArgs&
// With this and other array templates, analyze the group so that
// we don't end up with a template whose structure might change later.
res.set(NewFullyAllocatedArrayForCallingAllocationSite(cx, count, TenuredObject));
- return !!res;
+ if (!res)
+ return false;
+ EnsureArrayGroupAnalyzed(cx, res);
+ return true;
}
}
@@ -5191,7 +5565,10 @@ GetTemplateObjectForNative(JSContext* cx, HandleFunction target, const CallArgs&
return true;
}
res.set(NewFullyAllocatedArrayTryReuseGroup(cx, obj, 0, TenuredObject));
- return !!res;
+ if (!res)
+ return false;
+ EnsureArrayGroupAnalyzed(cx, res);
+ return true;
}
}
}
@@ -5208,7 +5585,10 @@ GetTemplateObjectForNative(JSContext* cx, HandleFunction target, const CallArgs&
}
res.set(NewFullyAllocatedArrayForCallingAllocationSite(cx, 0, TenuredObject));
- return !!res;
+ if (!res)
+ return false;
+ EnsureArrayGroupAnalyzed(cx, res);
+ return true;
}
if (native == StringConstructor) {
@@ -5421,7 +5801,7 @@ TryAttachCallStub(JSContext* cx, ICCall_Fallback* stub, HandleScript script, jsb
if (!thisObject)
return false;
- if (thisObject->is<PlainObject>())
+ if (thisObject->is<PlainObject>() || thisObject->is<UnboxedPlainObject>())
templateObject = thisObject;
}
@@ -5521,24 +5901,15 @@ TryAttachCallStub(JSContext* cx, ICCall_Fallback* stub, HandleScript script, jsb
}
static bool
-CopyArray(JSContext* cx, HandleArrayObject arr, MutableHandleValue result)
+CopyArray(JSContext* cx, HandleObject obj, MutableHandleValue result)
{
- uint32_t length = arr->length();
- ArrayObject* nobj = NewFullyAllocatedArrayTryReuseGroup(cx, arr, length, TenuredObject);
+ uint32_t length = GetAnyBoxedOrUnboxedArrayLength(obj);
+ JSObject* nobj = NewFullyAllocatedArrayTryReuseGroup(cx, obj, length, TenuredObject);
if (!nobj)
return false;
-
- MOZ_ASSERT(arr->isNative());
- MOZ_ASSERT(nobj->isNative());
- MOZ_ASSERT(nobj->as<NativeObject>().getDenseInitializedLength() == 0);
- MOZ_ASSERT(arr->as<NativeObject>().getDenseInitializedLength() >= length);
- MOZ_ASSERT(nobj->as<NativeObject>().getDenseCapacity() >= length);
-
- nobj->as<NativeObject>().setDenseInitializedLength(length);
-
- const Value* vp = arr->as<NativeObject>().getDenseElements();
- nobj->as<NativeObject>().initDenseElements(0, vp, length);
-
+ EnsureArrayGroupAnalyzed(cx, nobj);
+ CopyAnyBoxedOrUnboxedDenseElements(cx, nobj, obj, 0, 0, length);
+
result.setObject(*nobj);
return true;
}
@@ -5569,22 +5940,26 @@ TryAttachStringSplit(JSContext* cx, ICCall_Fallback* stub, HandleScript script,
RootedValue arr(cx);
// Copy the array before storing in stub.
- if (!CopyArray(cx, obj.as<ArrayObject>(), &arr))
+ if (!CopyArray(cx, obj, &arr))
return false;
// Atomize all elements of the array.
- RootedArrayObject arrObj(cx, &arr.toObject().as<ArrayObject>());
- uint32_t initLength = arrObj->length();
+ RootedObject arrObj(cx, &arr.toObject());
+ uint32_t initLength = GetAnyBoxedOrUnboxedArrayLength(arrObj);
for (uint32_t i = 0; i < initLength; i++) {
- JSAtom* str = js::AtomizeString(cx, arrObj->getDenseElement(i).toString());
+ JSAtom* str = js::AtomizeString(cx, GetAnyBoxedOrUnboxedDenseElement(arrObj, i).toString());
if (!str)
return false;
- arrObj->setDenseElementWithType(cx, i, StringValue(str));
+ if (!SetAnyBoxedOrUnboxedDenseElement(cx, arrObj, i, StringValue(str))) {
+ // The value could not be stored to an unboxed dense element.
+ return true;
+ }
}
ICCall_StringSplit::Compiler compiler(cx, stub->fallbackMonitorStub()->firstMonitorStub(),
- script->pcToOffset(pc), str, sep, arrObj);
+ script->pcToOffset(pc), str, sep,
+ arr);
ICStub* newStub = compiler.getStub(compiler.getStubSpace(script));
if (!newStub)
return false;
@@ -6472,7 +6847,7 @@ ICCallScriptedCompiler::generateStubCode(MacroAssembler& masm)
return true;
}
-typedef bool (*CopyArrayFn)(JSContext*, HandleArrayObject, MutableHandleValue);
+typedef bool (*CopyArrayFn)(JSContext*, HandleObject, MutableHandleValue);
static const VMFunction CopyArrayInfo = FunctionInfo<CopyArrayFn>(CopyArray, "CopyArray");
bool
@@ -7949,6 +8324,19 @@ ICGetElem_Dense::Clone(JSContext* cx, ICStubSpace* space, ICStub* firstMonitorSt
return New<ICGetElem_Dense>(cx, space, other.jitCode(), firstMonitorStub, other.shape_);
}
+ICGetElem_UnboxedArray::ICGetElem_UnboxedArray(JitCode* stubCode, ICStub* firstMonitorStub,
+ ObjectGroup *group)
+ : ICMonitoredStub(GetElem_UnboxedArray, stubCode, firstMonitorStub),
+ group_(group)
+{ }
+
+/* static */ ICGetElem_UnboxedArray*
+ICGetElem_UnboxedArray::Clone(JSContext* cx, ICStubSpace* space, ICStub* firstMonitorStub,
+ ICGetElem_UnboxedArray& other)
+{
+ return New<ICGetElem_UnboxedArray>(cx, space, other.jitCode(), firstMonitorStub, other.group_);
+}
+
ICGetElem_TypedArray::ICGetElem_TypedArray(JitCode* stubCode, Shape* shape, Scalar::Type type)
: ICStub(GetElem_TypedArray, stubCode),
shape_(shape)
@@ -8324,8 +8712,8 @@ static bool DoRestFallback(JSContext* cx, BaselineFrame* frame, ICRest_Fallback*
unsigned numRest = numActuals > numFormals ? numActuals - numFormals : 0;
Value* rest = frame->argv() + numFormals;
- ArrayObject* obj = ObjectGroup::newArrayObject(cx, rest, numRest, GenericObject,
- ObjectGroup::NewArrayKind::UnknownIndex);
+ JSObject* obj = ObjectGroup::newArrayObject(cx, rest, numRest, GenericObject,
+ ObjectGroup::NewArrayKind::UnknownIndex);
if (!obj)
return false;
res.setObject(*obj);
diff --git a/js/src/jit/BaselineIC.h b/js/src/jit/BaselineIC.h
index e1ad12559f..5600f816ab 100644
--- a/js/src/jit/BaselineIC.h
+++ b/js/src/jit/BaselineIC.h
@@ -22,6 +22,7 @@
#include "jit/SharedICRegisters.h"
#include "js/GCVector.h"
#include "vm/ArrayObject.h"
+#include "vm/UnboxedObject.h"
namespace js {
namespace jit {
@@ -891,6 +892,54 @@ class ICGetElem_Dense : public ICMonitoredStub
};
};
+class ICGetElem_UnboxedArray : public ICMonitoredStub
+{
+ friend class ICStubSpace;
+
+ GCPtrObjectGroup group_;
+
+ ICGetElem_UnboxedArray(JitCode* stubCode, ICStub* firstMonitorStub, ObjectGroup* group);
+
+ public:
+ static ICGetElem_UnboxedArray* Clone(JSContext* cx, ICStubSpace* space,
+ ICStub* firstMonitorStub, ICGetElem_UnboxedArray& other);
+
+ static size_t offsetOfGroup() {
+ return offsetof(ICGetElem_UnboxedArray, group_);
+ }
+
+ GCPtrObjectGroup& group() {
+ return group_;
+ }
+
+ class Compiler : public ICStubCompiler {
+ ICStub* firstMonitorStub_;
+ RootedObjectGroup group_;
+ JSValueType elementType_;
+
+ protected:
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+
+ virtual int32_t getKey() const {
+ return static_cast<int32_t>(engine_) |
+ (static_cast<int32_t>(kind) << 1) |
+ (static_cast<int32_t>(elementType_) << 17);
+ }
+
+ public:
+ Compiler(JSContext* cx, ICStub* firstMonitorStub, ObjectGroup* group)
+ : ICStubCompiler(cx, ICStub::GetElem_UnboxedArray, Engine::Baseline),
+ firstMonitorStub_(firstMonitorStub),
+ group_(cx, group),
+ elementType_(group->unboxedLayoutDontCheckGeneration().elementType())
+ {}
+
+ ICStub* getStub(ICStubSpace* space) {
+ return newStub<ICGetElem_UnboxedArray>(space, getStubCode(), firstMonitorStub_, group_);
+ }
+ };
+};
+
// Accesses scalar elements of a typed array or typed object.
class ICGetElem_TypedArray : public ICStub
{
@@ -1066,7 +1115,9 @@ class ICSetElem_DenseOrUnboxedArray : public ICUpdatedStub
: ICStubCompiler(cx, ICStub::SetElem_DenseOrUnboxedArray, Engine::Baseline),
shape_(cx, shape),
group_(cx, group),
- unboxedType_(JSVAL_TYPE_MAGIC)
+ unboxedType_(shape
+ ? JSVAL_TYPE_MAGIC
+ : group->unboxedLayoutDontCheckGeneration().elementType())
{}
ICUpdatedStub* getStub(ICStubSpace* space) {
@@ -1174,7 +1225,9 @@ class ICSetElemDenseOrUnboxedArrayAddCompiler : public ICStubCompiler {
: ICStubCompiler(cx, ICStub::SetElem_DenseOrUnboxedArrayAdd, Engine::Baseline),
obj_(cx, obj),
protoChainDepth_(protoChainDepth),
- unboxedType_(JSVAL_TYPE_MAGIC)
+ unboxedType_(obj->is<UnboxedArrayObject>()
+ ? obj->as<UnboxedArrayObject>().elementType()
+ : JSVAL_TYPE_MAGIC)
{}
template <size_t ProtoChainDepth>
@@ -1822,7 +1875,8 @@ class ICSetProp_Native : public ICUpdatedStub
virtual int32_t getKey() const {
return static_cast<int32_t>(engine_) |
(static_cast<int32_t>(kind) << 1) |
- (static_cast<int32_t>(isFixedSlot_) << 17);
+ (static_cast<int32_t>(isFixedSlot_) << 17) |
+ (static_cast<int32_t>(obj_->is<UnboxedPlainObject>()) << 18);
}
MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
@@ -1927,6 +1981,7 @@ class ICSetPropNativeAddCompiler : public ICStubCompiler
return static_cast<int32_t>(engine_) |
(static_cast<int32_t>(kind) << 1) |
(static_cast<int32_t>(isFixedSlot_) << 17) |
+ (static_cast<int32_t>(obj_->is<UnboxedPlainObject>()) << 18) |
(static_cast<int32_t>(protoChainDepth_) << 19);
}
@@ -1951,7 +2006,10 @@ class ICSetPropNativeAddCompiler : public ICStubCompiler
newGroup = nullptr;
RootedShape newShape(cx);
- newShape = obj_->as<NativeObject>().lastProperty();
+ if (obj_->isNative())
+ newShape = obj_->as<NativeObject>().lastProperty();
+ else
+ newShape = obj_->as<UnboxedPlainObject>().maybeExpando()->lastProperty();
return newStub<ICSetProp_NativeAddImpl<ProtoChainDepth>>(
space, getStubCode(), oldGroup_, shapes, newShape, newGroup, offset_);
@@ -2816,10 +2874,10 @@ class ICCall_StringSplit : public ICMonitoredStub
uint32_t pcOffset_;
GCPtrString expectedStr_;
GCPtrString expectedSep_;
- GCPtrArrayObject templateObject_;
+ GCPtrObject templateObject_;
ICCall_StringSplit(JitCode* stubCode, ICStub* firstMonitorStub, uint32_t pcOffset, JSString* str,
- JSString* sep, ArrayObject* templateObject)
+ JSString* sep, JSObject* templateObject)
: ICMonitoredStub(ICStub::Call_StringSplit, stubCode, firstMonitorStub),
pcOffset_(pcOffset), expectedStr_(str), expectedSep_(sep),
templateObject_(templateObject)
@@ -2846,7 +2904,7 @@ class ICCall_StringSplit : public ICMonitoredStub
return expectedSep_;
}
- GCPtrArrayObject& templateObject() {
+ GCPtrObject& templateObject() {
return templateObject_;
}
@@ -2856,7 +2914,7 @@ class ICCall_StringSplit : public ICMonitoredStub
uint32_t pcOffset_;
RootedString expectedStr_;
RootedString expectedSep_;
- RootedArrayObject templateObject_;
+ RootedObject templateObject_;
MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
@@ -2867,13 +2925,13 @@ class ICCall_StringSplit : public ICMonitoredStub
public:
Compiler(JSContext* cx, ICStub* firstMonitorStub, uint32_t pcOffset, HandleString str,
- HandleString sep, HandleArrayObject templateObject)
+ HandleString sep, HandleValue templateObject)
: ICCallStubCompiler(cx, ICStub::Call_StringSplit),
firstMonitorStub_(firstMonitorStub),
pcOffset_(pcOffset),
expectedStr_(cx, str),
expectedSep_(cx, sep),
- templateObject_(cx, templateObject)
+ templateObject_(cx, &templateObject.toObject())
{ }
ICStub* getStub(ICStubSpace* space) {
diff --git a/js/src/jit/BaselineInspector.cpp b/js/src/jit/BaselineInspector.cpp
index 3b852debf3..c9e09bed7a 100644
--- a/js/src/jit/BaselineInspector.cpp
+++ b/js/src/jit/BaselineInspector.cpp
@@ -96,19 +96,32 @@ VectorAppendNoDuplicate(S& list, T value)
static bool
AddReceiver(const ReceiverGuard& receiver,
- BaselineInspector::ReceiverVector& receivers)
+ BaselineInspector::ReceiverVector& receivers,
+ BaselineInspector::ObjectGroupVector& convertUnboxedGroups)
{
+ if (receiver.group && receiver.group->maybeUnboxedLayout()) {
+ if (receiver.group->unboxedLayout().nativeGroup())
+ return VectorAppendNoDuplicate(convertUnboxedGroups, receiver.group);
+ }
return VectorAppendNoDuplicate(receivers, receiver);
}
static bool
GetCacheIRReceiverForNativeReadSlot(ICCacheIR_Monitored* stub, ReceiverGuard* receiver)
{
- // We match:
+ // We match either:
//
// GuardIsObject 0
// GuardShape 0
// LoadFixedSlotResult 0 or LoadDynamicSlotResult 0
+ //
+ // or
+ //
+ // GuardIsObject 0
+ // GuardGroup 0
+ // 1: GuardAndLoadUnboxedExpando 0
+ // GuardShape 1
+ // LoadFixedSlotResult 1 or LoadDynamicSlotResult 1
*receiver = ReceiverGuard();
CacheIRReader reader(stub->stubInfo());
@@ -117,6 +130,14 @@ GetCacheIRReceiverForNativeReadSlot(ICCacheIR_Monitored* stub, ReceiverGuard* re
if (!reader.matchOp(CacheOp::GuardIsObject, objId))
return false;
+ if (reader.matchOp(CacheOp::GuardGroup, objId)) {
+ receiver->group = stub->stubInfo()->getStubField<ObjectGroup*>(stub, reader.stubOffset());
+
+ if (!reader.matchOp(CacheOp::GuardAndLoadUnboxedExpando, objId))
+ return false;
+ objId = reader.objOperandId();
+ }
+
if (reader.matchOp(CacheOp::GuardShape, objId)) {
receiver->shape = stub->stubInfo()->getStubField<Shape*>(stub, reader.stubOffset());
return reader.matchOpEither(CacheOp::LoadFixedSlotResult, CacheOp::LoadDynamicSlotResult);
@@ -125,13 +146,40 @@ GetCacheIRReceiverForNativeReadSlot(ICCacheIR_Monitored* stub, ReceiverGuard* re
return false;
}
+static bool
+GetCacheIRReceiverForUnboxedProperty(ICCacheIR_Monitored* stub, ReceiverGuard* receiver)
+{
+ // We match:
+ //
+ // GuardIsObject 0
+ // GuardGroup 0
+ // LoadUnboxedPropertyResult 0 ..
+
+ *receiver = ReceiverGuard();
+ CacheIRReader reader(stub->stubInfo());
+
+ ObjOperandId objId = ObjOperandId(0);
+ if (!reader.matchOp(CacheOp::GuardIsObject, objId))
+ return false;
+
+ if (!reader.matchOp(CacheOp::GuardGroup, objId))
+ return false;
+ receiver->group = stub->stubInfo()->getStubField<ObjectGroup*>(stub, reader.stubOffset());
+
+ return reader.matchOp(CacheOp::LoadUnboxedPropertyResult, objId);
+}
+
bool
-BaselineInspector::maybeInfoForPropertyOp(jsbytecode* pc, ReceiverVector& receivers)
+BaselineInspector::maybeInfoForPropertyOp(jsbytecode* pc, ReceiverVector& receivers,
+ ObjectGroupVector& convertUnboxedGroups)
{
// Return a list of the receivers seen by the baseline IC for the current
// op. Empty lists indicate no receivers are known, or there was an
- // uncacheable access.
+ // uncacheable access. convertUnboxedGroups is used for unboxed object
+ // groups which have been seen, but have had instances converted to native
+ // objects and should be eagerly converted by Ion.
MOZ_ASSERT(receivers.empty());
+ MOZ_ASSERT(convertUnboxedGroups.empty());
if (!hasBaselineScript())
return true;
@@ -143,7 +191,8 @@ BaselineInspector::maybeInfoForPropertyOp(jsbytecode* pc, ReceiverVector& receiv
while (stub->next()) {
ReceiverGuard receiver;
if (stub->isCacheIR_Monitored()) {
- if (!GetCacheIRReceiverForNativeReadSlot(stub->toCacheIR_Monitored(), &receiver))
+ if (!GetCacheIRReceiverForNativeReadSlot(stub->toCacheIR_Monitored(), &receiver) &&
+ !GetCacheIRReceiverForUnboxedProperty(stub->toCacheIR_Monitored(), &receiver))
{
receivers.clear();
return true;
@@ -151,12 +200,14 @@ BaselineInspector::maybeInfoForPropertyOp(jsbytecode* pc, ReceiverVector& receiv
} else if (stub->isSetProp_Native()) {
receiver = ReceiverGuard(stub->toSetProp_Native()->group(),
stub->toSetProp_Native()->shape());
+ } else if (stub->isSetProp_Unboxed()) {
+ receiver = ReceiverGuard(stub->toSetProp_Unboxed()->group(), nullptr);
} else {
receivers.clear();
return true;
}
- if (!AddReceiver(receiver, receivers))
+ if (!AddReceiver(receiver, receivers, convertUnboxedGroups))
return false;
stub = stub->next();
@@ -538,7 +589,7 @@ BaselineInspector::getTemplateObjectForNative(jsbytecode* pc, Native native)
bool
BaselineInspector::isOptimizableCallStringSplit(jsbytecode* pc, JSString** strOut, JSString** sepOut,
- ArrayObject** objOut)
+ JSObject** objOut)
{
if (!hasBaselineScript())
return false;
@@ -649,12 +700,14 @@ bool
BaselineInspector::commonGetPropFunction(jsbytecode* pc, JSObject** holder, Shape** holderShape,
JSFunction** commonGetter, Shape** globalShape,
bool* isOwnProperty,
- ReceiverVector& receivers)
+ ReceiverVector& receivers,
+ ObjectGroupVector& convertUnboxedGroups)
{
if (!hasBaselineScript())
return false;
MOZ_ASSERT(receivers.empty());
+ MOZ_ASSERT(convertUnboxedGroups.empty());
*holder = nullptr;
const ICEntry& entry = icEntryFromPC(pc);
@@ -666,7 +719,7 @@ BaselineInspector::commonGetPropFunction(jsbytecode* pc, JSObject** holder, Shap
{
ICGetPropCallGetter* nstub = static_cast<ICGetPropCallGetter*>(stub);
bool isOwn = nstub->isOwnGetter();
- if (!isOwn && !AddReceiver(nstub->receiverGuard(), receivers))
+ if (!isOwn && !AddReceiver(nstub->receiverGuard(), receivers, convertUnboxedGroups))
return false;
if (!*holder) {
@@ -698,19 +751,21 @@ BaselineInspector::commonGetPropFunction(jsbytecode* pc, JSObject** holder, Shap
if (!*holder)
return false;
- MOZ_ASSERT(*isOwnProperty == (receivers.empty()));
+ MOZ_ASSERT(*isOwnProperty == (receivers.empty() && convertUnboxedGroups.empty()));
return true;
}
bool
BaselineInspector::commonSetPropFunction(jsbytecode* pc, JSObject** holder, Shape** holderShape,
JSFunction** commonSetter, bool* isOwnProperty,
- ReceiverVector& receivers)
+ ReceiverVector& receivers,
+ ObjectGroupVector& convertUnboxedGroups)
{
if (!hasBaselineScript())
return false;
MOZ_ASSERT(receivers.empty());
+ MOZ_ASSERT(convertUnboxedGroups.empty());
*holder = nullptr;
const ICEntry& entry = icEntryFromPC(pc);
@@ -719,7 +774,7 @@ BaselineInspector::commonSetPropFunction(jsbytecode* pc, JSObject** holder, Shap
if (stub->isSetProp_CallScripted() || stub->isSetProp_CallNative()) {
ICSetPropCallSetter* nstub = static_cast<ICSetPropCallSetter*>(stub);
bool isOwn = nstub->isOwnSetter();
- if (!isOwn && !AddReceiver(nstub->receiverGuard(), receivers))
+ if (!isOwn && !AddReceiver(nstub->receiverGuard(), receivers, convertUnboxedGroups))
return false;
if (!*holder) {
diff --git a/js/src/jit/BaselineInspector.h b/js/src/jit/BaselineInspector.h
index 1ed4b55475..961df18aa2 100644
--- a/js/src/jit/BaselineInspector.h
+++ b/js/src/jit/BaselineInspector.h
@@ -95,7 +95,8 @@ class BaselineInspector
public:
typedef Vector<ReceiverGuard, 4, JitAllocPolicy> ReceiverVector;
typedef Vector<ObjectGroup*, 4, JitAllocPolicy> ObjectGroupVector;
- MOZ_MUST_USE bool maybeInfoForPropertyOp(jsbytecode* pc, ReceiverVector& receivers);
+ MOZ_MUST_USE bool maybeInfoForPropertyOp(jsbytecode* pc, ReceiverVector& receivers,
+ ObjectGroupVector& convertUnboxedGroups);
SetElemICInspector setElemICInspector(jsbytecode* pc) {
return makeICInspector<SetElemICInspector>(pc, ICStub::SetElem_Fallback);
@@ -113,7 +114,7 @@ class BaselineInspector
bool hasSeenNonStringIterMore(jsbytecode* pc);
MOZ_MUST_USE bool isOptimizableCallStringSplit(jsbytecode* pc, JSString** strOut,
- JSString** sepOut, ArrayObject** objOut);
+ JSString** sepOut, JSObject** objOut);
JSObject* getTemplateObject(jsbytecode* pc);
JSObject* getTemplateObjectForNative(jsbytecode* pc, Native native);
JSObject* getTemplateObjectForClassHook(jsbytecode* pc, const Class* clasp);
@@ -130,10 +131,12 @@ class BaselineInspector
MOZ_MUST_USE bool commonGetPropFunction(jsbytecode* pc, JSObject** holder, Shape** holderShape,
JSFunction** commonGetter, Shape** globalShape,
- bool* isOwnProperty, ReceiverVector& receivers);
+ bool* isOwnProperty, ReceiverVector& receivers,
+ ObjectGroupVector& convertUnboxedGroups);
MOZ_MUST_USE bool commonSetPropFunction(jsbytecode* pc, JSObject** holder, Shape** holderShape,
JSFunction** commonSetter, bool* isOwnProperty,
- ReceiverVector& receivers);
+ ReceiverVector& receivers,
+ ObjectGroupVector& convertUnboxedGroups);
MOZ_MUST_USE bool instanceOfData(jsbytecode* pc, Shape** shape, uint32_t* slot,
JSObject** prototypeObject);
diff --git a/js/src/jit/CacheIR.cpp b/js/src/jit/CacheIR.cpp
index d184ea40c5..f1061af701 100644
--- a/js/src/jit/CacheIR.cpp
+++ b/js/src/jit/CacheIR.cpp
@@ -10,7 +10,8 @@
#include "jit/IonCaches.h"
#include "jsobjinlines.h"
-#include "vm/NativeObject-inl.h"
+
+#include "vm/UnboxedObject-inl.h"
using namespace js;
using namespace js::jit;
@@ -59,6 +60,10 @@ GetPropIRGenerator::tryAttachStub(Maybe<CacheIRWriter>& writer)
return false;
if (!emitted_ && !tryAttachNative(*writer, obj, objId))
return false;
+ if (!emitted_ && !tryAttachUnboxed(*writer, obj, objId))
+ return false;
+ if (!emitted_ && !tryAttachUnboxedExpando(*writer, obj, objId))
+ return false;
if (!emitted_ && !tryAttachTypedObject(*writer, obj, objId))
return false;
if (!emitted_ && !tryAttachModuleNamespace(*writer, obj, objId))
@@ -158,9 +163,19 @@ GeneratePrototypeGuards(CacheIRWriter& writer, JSObject* obj, JSObject* holder,
}
static void
-TestMatchingReceiver(CacheIRWriter& writer, JSObject* obj, Shape* shape, ObjOperandId objId)
+TestMatchingReceiver(CacheIRWriter& writer, JSObject* obj, Shape* shape, ObjOperandId objId,
+ Maybe<ObjOperandId>* expandoId)
{
- if (obj->is<TypedObject>()) {
+ if (obj->is<UnboxedPlainObject>()) {
+ writer.guardGroup(objId, obj->group());
+
+ if (UnboxedExpandoObject* expando = obj->as<UnboxedPlainObject>().maybeExpando()) {
+ expandoId->emplace(writer.guardAndLoadUnboxedExpando(objId));
+ writer.guardShape(expandoId->ref(), expando->lastProperty());
+ } else {
+ writer.guardNoUnboxedExpando(objId);
+ }
+ } else if (obj->is<UnboxedArrayObject>() || obj->is<TypedObject>()) {
writer.guardGroup(objId, obj->group());
} else {
Shape* shape = obj->maybeShape();
@@ -173,7 +188,8 @@ static void
EmitReadSlotResult(CacheIRWriter& writer, JSObject* obj, JSObject* holder,
Shape* shape, ObjOperandId objId)
{
- TestMatchingReceiver(writer, obj, shape, objId);
+ Maybe<ObjOperandId> expandoId;
+ TestMatchingReceiver(writer, obj, shape, objId, &expandoId);
ObjOperandId holderId;
if (obj != holder) {
@@ -196,6 +212,9 @@ EmitReadSlotResult(CacheIRWriter& writer, JSObject* obj, JSObject* holder,
lastObjId = protoId;
}
}
+ } else if (obj->is<UnboxedPlainObject>()) {
+ holder = obj->as<UnboxedPlainObject>().maybeExpando();
+ holderId = *expandoId;
} else {
holderId = objId;
}
@@ -247,6 +266,51 @@ GetPropIRGenerator::tryAttachNative(CacheIRWriter& writer, HandleObject obj, Obj
}
bool
+GetPropIRGenerator::tryAttachUnboxed(CacheIRWriter& writer, HandleObject obj, ObjOperandId objId)
+{
+ MOZ_ASSERT(!emitted_);
+
+ if (!obj->is<UnboxedPlainObject>())
+ return true;
+
+ const UnboxedLayout::Property* property = obj->as<UnboxedPlainObject>().layout().lookup(name_);
+ if (!property)
+ return true;
+
+ if (!cx_->runtime()->jitSupportsFloatingPoint)
+ return true;
+
+ writer.guardGroup(objId, obj->group());
+ writer.loadUnboxedPropertyResult(objId, property->type,
+ UnboxedPlainObject::offsetOfData() + property->offset);
+ emitted_ = true;
+ preliminaryObjectAction_ = PreliminaryObjectAction::Unlink;
+ return true;
+}
+
+bool
+GetPropIRGenerator::tryAttachUnboxedExpando(CacheIRWriter& writer, HandleObject obj, ObjOperandId objId)
+{
+ MOZ_ASSERT(!emitted_);
+
+ if (!obj->is<UnboxedPlainObject>())
+ return true;
+
+ UnboxedExpandoObject* expando = obj->as<UnboxedPlainObject>().maybeExpando();
+ if (!expando)
+ return true;
+
+ Shape* shape = expando->lookup(cx_, NameToId(name_));
+ if (!shape || !shape->hasDefaultGetter() || !shape->hasSlot())
+ return true;
+
+ emitted_ = true;
+
+ EmitReadSlotResult(writer, obj, obj, shape, objId);
+ return true;
+}
+
+bool
GetPropIRGenerator::tryAttachTypedObject(CacheIRWriter& writer, HandleObject obj, ObjOperandId objId)
{
MOZ_ASSERT(!emitted_);
@@ -304,6 +368,13 @@ GetPropIRGenerator::tryAttachObjectLength(CacheIRWriter& writer, HandleObject ob
return true;
}
+ if (obj->is<UnboxedArrayObject>()) {
+ writer.guardClass(objId, GuardClassKind::UnboxedArray);
+ writer.loadUnboxedArrayLengthResult(objId);
+ emitted_ = true;
+ return true;
+ }
+
if (obj->is<ArgumentsObject>() && !obj->as<ArgumentsObject>().hasOverriddenLength()) {
if (obj->is<MappedArgumentsObject>()) {
writer.guardClass(objId, GuardClassKind::MappedArguments);
diff --git a/js/src/jit/CacheIR.h b/js/src/jit/CacheIR.h
index ae55cfebb4..51e55f48b8 100644
--- a/js/src/jit/CacheIR.h
+++ b/js/src/jit/CacheIR.h
@@ -87,12 +87,16 @@ class ObjOperandId : public OperandId
_(GuardClass) \
_(GuardSpecificObject) \
_(GuardNoDetachedTypedObjects) \
+ _(GuardNoUnboxedExpando) \
+ _(GuardAndLoadUnboxedExpando) \
_(LoadObject) \
_(LoadProto) \
_(LoadFixedSlotResult) \
_(LoadDynamicSlotResult) \
+ _(LoadUnboxedPropertyResult) \
_(LoadTypedObjectResult) \
_(LoadInt32ArrayLengthResult) \
+ _(LoadUnboxedArrayLengthResult) \
_(LoadArgumentsObjectLengthResult) \
_(LoadUndefinedResult)
@@ -124,6 +128,7 @@ struct StubField {
enum class GuardClassKind
{
Array,
+ UnboxedArray,
MappedArguments,
UnmappedArguments,
};
@@ -271,6 +276,15 @@ class MOZ_RAII CacheIRWriter
void guardNoDetachedTypedObjects() {
writeOp(CacheOp::GuardNoDetachedTypedObjects);
}
+ void guardNoUnboxedExpando(ObjOperandId obj) {
+ writeOpWithOperandId(CacheOp::GuardNoUnboxedExpando, obj);
+ }
+ ObjOperandId guardAndLoadUnboxedExpando(ObjOperandId obj) {
+ ObjOperandId res(nextOperandId_++);
+ writeOpWithOperandId(CacheOp::GuardAndLoadUnboxedExpando, obj);
+ writeOperandId(res);
+ return res;
+ }
ObjOperandId loadObject(JSObject* obj) {
ObjOperandId res(nextOperandId_++);
@@ -296,6 +310,11 @@ class MOZ_RAII CacheIRWriter
writeOpWithOperandId(CacheOp::LoadDynamicSlotResult, obj);
addStubWord(offset, StubField::GCType::NoGCThing);
}
+ void loadUnboxedPropertyResult(ObjOperandId obj, JSValueType type, size_t offset) {
+ writeOpWithOperandId(CacheOp::LoadUnboxedPropertyResult, obj);
+ buffer_.writeByte(uint32_t(type));
+ addStubWord(offset, StubField::GCType::NoGCThing);
+ }
void loadTypedObjectResult(ObjOperandId obj, uint32_t offset, TypedThingLayout layout,
uint32_t typeDescr) {
MOZ_ASSERT(uint32_t(layout) <= UINT8_MAX);
@@ -308,6 +327,9 @@ class MOZ_RAII CacheIRWriter
void loadInt32ArrayLengthResult(ObjOperandId obj) {
writeOpWithOperandId(CacheOp::LoadInt32ArrayLengthResult, obj);
}
+ void loadUnboxedArrayLengthResult(ObjOperandId obj) {
+ writeOpWithOperandId(CacheOp::LoadUnboxedArrayLengthResult, obj);
+ }
void loadArgumentsObjectLengthResult(ObjOperandId obj) {
writeOpWithOperandId(CacheOp::LoadArgumentsObjectLengthResult, obj);
}
@@ -389,6 +411,9 @@ class MOZ_RAII GetPropIRGenerator
PreliminaryObjectAction preliminaryObjectAction_;
MOZ_MUST_USE bool tryAttachNative(CacheIRWriter& writer, HandleObject obj, ObjOperandId objId);
+ MOZ_MUST_USE bool tryAttachUnboxed(CacheIRWriter& writer, HandleObject obj, ObjOperandId objId);
+ MOZ_MUST_USE bool tryAttachUnboxedExpando(CacheIRWriter& writer, HandleObject obj,
+ ObjOperandId objId);
MOZ_MUST_USE bool tryAttachTypedObject(CacheIRWriter& writer, HandleObject obj,
ObjOperandId objId);
MOZ_MUST_USE bool tryAttachObjectLength(CacheIRWriter& writer, HandleObject obj,
diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
index 2b1c671d1b..bb12b09c87 100644
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -25,7 +25,6 @@
#include "builtin/Eval.h"
#include "builtin/TypedObject.h"
#include "gc/Nursery.h"
-#include "gc/StoreBuffer-inl.h"
#include "irregexp/NativeRegExpMacroAssembler.h"
#include "jit/AtomicOperations.h"
#include "jit/BaselineCompiler.h"
@@ -3029,10 +3028,19 @@ CodeGenerator::visitStoreSlotV(LStoreSlotV* lir)
static void
GuardReceiver(MacroAssembler& masm, const ReceiverGuard& guard,
- Register obj, Register scratch, Label* miss)
+ Register obj, Register scratch, Label* miss, bool checkNullExpando)
{
if (guard.group) {
masm.branchTestObjGroup(Assembler::NotEqual, obj, guard.group, miss);
+
+ Address expandoAddress(obj, UnboxedPlainObject::offsetOfExpando());
+ if (guard.shape) {
+ masm.loadPtr(expandoAddress, scratch);
+ masm.branchPtr(Assembler::Equal, scratch, ImmWord(0), miss);
+ masm.branchTestObjShape(Assembler::NotEqual, scratch, guard.shape, miss);
+ } else if (checkNullExpando) {
+ masm.branchPtr(Assembler::NotEqual, expandoAddress, ImmWord(0), miss);
+ }
} else {
masm.branchTestObjShape(Assembler::NotEqual, obj, guard.shape, miss);
}
@@ -3051,11 +3059,13 @@ CodeGenerator::emitGetPropertyPolymorphic(LInstruction* ins, Register obj, Regis
Label next;
masm.comment("GuardReceiver");
- GuardReceiver(masm, receiver, obj, scratch, &next);
+ GuardReceiver(masm, receiver, obj, scratch, &next, /* checkNullExpando = */ false);
if (receiver.shape) {
masm.comment("loadTypedOrValue");
- Register target = obj;
+ // If this is an unboxed expando access, GuardReceiver loaded the
+ // expando object into scratch.
+ Register target = receiver.group ? scratch : obj;
Shape* shape = mir->shape(i);
if (shape->slot() < shape->numFixedSlots()) {
@@ -3068,6 +3078,13 @@ CodeGenerator::emitGetPropertyPolymorphic(LInstruction* ins, Register obj, Regis
masm.loadPtr(Address(target, NativeObject::offsetOfSlots()), scratch);
masm.loadTypedOrValue(Address(scratch, offset), output);
}
+ } else {
+ masm.comment("loadUnboxedProperty");
+ const UnboxedLayout::Property* property =
+ receiver.group->unboxedLayout().lookup(mir->name());
+ Address propertyAddr(obj, UnboxedPlainObject::offsetOfData() + property->offset);
+
+ masm.loadUnboxedProperty(propertyAddr, property->type, output);
}
if (i == mir->numReceivers() - 1) {
@@ -3108,6 +3125,8 @@ EmitUnboxedPreBarrier(MacroAssembler &masm, T address, JSValueType type)
masm.patchableCallPreBarrier(address, MIRType::Object);
else if (type == JSVAL_TYPE_STRING)
masm.patchableCallPreBarrier(address, MIRType::String);
+ else
+ MOZ_ASSERT(!UnboxedTypeNeedsPreBarrier(type));
}
void
@@ -3121,10 +3140,12 @@ CodeGenerator::emitSetPropertyPolymorphic(LInstruction* ins, Register obj, Regis
ReceiverGuard receiver = mir->receiver(i);
Label next;
- GuardReceiver(masm, receiver, obj, scratch, &next);
+ GuardReceiver(masm, receiver, obj, scratch, &next, /* checkNullExpando = */ false);
if (receiver.shape) {
- Register target = obj;
+ // If this is an unboxed expando access, GuardReceiver loaded the
+ // expando object into scratch.
+ Register target = receiver.group ? scratch : obj;
Shape* shape = mir->shape(i);
if (shape->slot() < shape->numFixedSlots()) {
@@ -3141,6 +3162,13 @@ CodeGenerator::emitSetPropertyPolymorphic(LInstruction* ins, Register obj, Regis
emitPreBarrier(addr);
masm.storeConstantOrRegister(value, addr);
}
+ } else {
+ const UnboxedLayout::Property* property =
+ receiver.group->unboxedLayout().lookup(mir->name());
+ Address propertyAddr(obj, UnboxedPlainObject::offsetOfData() + property->offset);
+
+ EmitUnboxedPreBarrier(masm, propertyAddr, property->type);
+ masm.storeUnboxedProperty(propertyAddr, property->type, value, nullptr);
}
if (i == mir->numReceivers() - 1) {
@@ -3181,7 +3209,9 @@ CodeGenerator::visitSetPropertyPolymorphicT(LSetPropertyPolymorphicT* ins)
void
CodeGenerator::visitElements(LElements* lir)
{
- Address elements(ToRegister(lir->object()), NativeObject::offsetOfElements());
+ Address elements(ToRegister(lir->object()),
+ lir->mir()->unboxed() ? UnboxedArrayObject::offsetOfElements()
+ : NativeObject::offsetOfElements());
masm.loadPtr(elements, ToRegister(lir->output()));
}
@@ -3290,7 +3320,7 @@ CodeGenerator::visitGuardReceiverPolymorphic(LGuardReceiverPolymorphic* lir)
const ReceiverGuard& receiver = mir->receiver(i);
Label next;
- GuardReceiver(masm, receiver, obj, temp, &next);
+ GuardReceiver(masm, receiver, obj, temp, &next, /* checkNullExpando = */ true);
if (i == mir->numReceivers() - 1) {
bailoutFrom(&next, lir->snapshot());
@@ -3304,6 +3334,27 @@ CodeGenerator::visitGuardReceiverPolymorphic(LGuardReceiverPolymorphic* lir)
}
void
+CodeGenerator::visitGuardUnboxedExpando(LGuardUnboxedExpando* lir)
+{
+ Label miss;
+
+ Register obj = ToRegister(lir->object());
+ masm.branchPtr(lir->mir()->requireExpando() ? Assembler::Equal : Assembler::NotEqual,
+ Address(obj, UnboxedPlainObject::offsetOfExpando()), ImmWord(0), &miss);
+
+ bailoutFrom(&miss, lir->snapshot());
+}
+
+void
+CodeGenerator::visitLoadUnboxedExpando(LLoadUnboxedExpando* lir)
+{
+ Register obj = ToRegister(lir->object());
+ Register result = ToRegister(lir->getDef(0));
+
+ masm.loadPtr(Address(obj, UnboxedPlainObject::offsetOfExpando()), result);
+}
+
+void
CodeGenerator::visitTypeBarrierV(LTypeBarrierV* lir)
{
ValueOperand operand = ToValue(lir, LTypeBarrierV::Input);
@@ -5166,11 +5217,11 @@ static JSObject*
NewArrayWithGroup(JSContext* cx, uint32_t length, HandleObjectGroup group,
bool convertDoubleElements)
{
- ArrayObject* res = NewFullyAllocatedArrayTryUseGroup(cx, group, length);
+ JSObject* res = NewFullyAllocatedArrayTryUseGroup(cx, group, length);
if (!res)
return nullptr;
if (convertDoubleElements)
- res->setShouldConvertDoubleElements();
+ res->as<ArrayObject>().setShouldConvertDoubleElements();
return res;
}
@@ -5316,7 +5367,7 @@ CodeGenerator::visitNewArrayCopyOnWrite(LNewArrayCopyOnWrite* lir)
masm.bind(ool->rejoin());
}
-typedef ArrayObject* (*ArrayConstructorOneArgFn)(JSContext*, HandleObjectGroup, int32_t length);
+typedef JSObject* (*ArrayConstructorOneArgFn)(JSContext*, HandleObjectGroup, int32_t length);
static const VMFunction ArrayConstructorOneArgInfo =
FunctionInfo<ArrayConstructorOneArgFn>(ArrayConstructorOneArg, "ArrayConstructorOneArg");
@@ -5336,11 +5387,21 @@ CodeGenerator::visitNewArrayDynamicLength(LNewArrayDynamicLength* lir)
bool canInline = true;
size_t inlineLength = 0;
- if (templateObject->as<ArrayObject>().hasFixedElements()) {
- size_t numSlots = gc::GetGCKindSlots(templateObject->asTenured().getAllocKind());
- inlineLength = numSlots - ObjectElements::VALUES_PER_HEADER;
+ if (templateObject->is<ArrayObject>()) {
+ if (templateObject->as<ArrayObject>().hasFixedElements()) {
+ size_t numSlots = gc::GetGCKindSlots(templateObject->asTenured().getAllocKind());
+ inlineLength = numSlots - ObjectElements::VALUES_PER_HEADER;
+ } else {
+ canInline = false;
+ }
} else {
- canInline = false;
+ if (templateObject->as<UnboxedArrayObject>().hasInlineElements()) {
+ size_t nbytes =
+ templateObject->tenuredSizeOfThis() - UnboxedArrayObject::offsetOfInlineElements();
+ inlineLength = nbytes / templateObject->as<UnboxedArrayObject>().elementSize();
+ } else {
+ canInline = false;
+ }
}
if (canInline) {
@@ -7762,7 +7823,7 @@ CodeGenerator::visitSinCos(LSinCos *lir)
masm.freeStack(sizeof(double) * 2);
}
-typedef ArrayObject* (*StringSplitFn)(JSContext*, HandleObjectGroup, HandleString, HandleString, uint32_t);
+typedef JSObject* (*StringSplitFn)(JSContext*, HandleObjectGroup, HandleString, HandleString, uint32_t);
static const VMFunction StringSplitInfo =
FunctionInfo<StringSplitFn>(js::str_split_string, "str_split_string");
@@ -7797,6 +7858,49 @@ CodeGenerator::visitSetInitializedLength(LSetInitializedLength* lir)
}
void
+CodeGenerator::visitUnboxedArrayLength(LUnboxedArrayLength* lir)
+{
+ Register obj = ToRegister(lir->object());
+ Register result = ToRegister(lir->output());
+ masm.load32(Address(obj, UnboxedArrayObject::offsetOfLength()), result);
+}
+
+void
+CodeGenerator::visitUnboxedArrayInitializedLength(LUnboxedArrayInitializedLength* lir)
+{
+ Register obj = ToRegister(lir->object());
+ Register result = ToRegister(lir->output());
+ masm.load32(Address(obj, UnboxedArrayObject::offsetOfCapacityIndexAndInitializedLength()), result);
+ masm.and32(Imm32(UnboxedArrayObject::InitializedLengthMask), result);
+}
+
+void
+CodeGenerator::visitIncrementUnboxedArrayInitializedLength(LIncrementUnboxedArrayInitializedLength* lir)
+{
+ Register obj = ToRegister(lir->object());
+ masm.add32(Imm32(1), Address(obj, UnboxedArrayObject::offsetOfCapacityIndexAndInitializedLength()));
+}
+
+void
+CodeGenerator::visitSetUnboxedArrayInitializedLength(LSetUnboxedArrayInitializedLength* lir)
+{
+ Register obj = ToRegister(lir->object());
+ RegisterOrInt32Constant key = ToRegisterOrInt32Constant(lir->length());
+ Register temp = ToRegister(lir->temp());
+
+ Address initLengthAddr(obj, UnboxedArrayObject::offsetOfCapacityIndexAndInitializedLength());
+ masm.load32(initLengthAddr, temp);
+ masm.and32(Imm32(UnboxedArrayObject::CapacityMask), temp);
+
+ if (key.isRegister())
+ masm.or32(key.reg(), temp);
+ else
+ masm.or32(Imm32(key.constant()), temp);
+
+ masm.store32(temp, initLengthAddr);
+}
+
+void
CodeGenerator::visitNotO(LNotO* lir)
{
MOZ_ASSERT(lir->mir()->operandMightEmulateUndefined(),
@@ -8092,19 +8196,46 @@ CodeGenerator::emitStoreElementHoleT(T* lir)
OutOfLineStoreElementHole* ool = new(alloc()) OutOfLineStoreElementHole(lir);
addOutOfLineCode(ool, lir->mir());
+ Register obj = ToRegister(lir->object());
Register elements = ToRegister(lir->elements());
const LAllocation* index = lir->index();
RegisterOrInt32Constant key = ToRegisterOrInt32Constant(index);
- Address initLength(elements, ObjectElements::offsetOfInitializedLength());
- masm.branch32(Assembler::BelowOrEqual, initLength, key, ool->entry());
+ JSValueType unboxedType = lir->mir()->unboxedType();
+ if (unboxedType == JSVAL_TYPE_MAGIC) {
+ Address initLength(elements, ObjectElements::offsetOfInitializedLength());
+ masm.branch32(Assembler::BelowOrEqual, initLength, key, ool->entry());
- if (lir->mir()->needsBarrier())
- emitPreBarrier(elements, index, 0);
+ if (lir->mir()->needsBarrier())
+ emitPreBarrier(elements, index, 0);
+
+ masm.bind(ool->rejoinStore());
+ emitStoreElementTyped(lir->value(), lir->mir()->value()->type(), lir->mir()->elementType(),
+ elements, index, 0);
+ } else {
+ Register temp = ToRegister(lir->getTemp(0));
+ Address initLength(obj, UnboxedArrayObject::offsetOfCapacityIndexAndInitializedLength());
+ masm.load32(initLength, temp);
+ masm.and32(Imm32(UnboxedArrayObject::InitializedLengthMask), temp);
+ masm.branch32(Assembler::BelowOrEqual, temp, key, ool->entry());
+
+ ConstantOrRegister v = ToConstantOrRegister(lir->value(), lir->mir()->value()->type());
+
+ if (index->isConstant()) {
+ Address address(elements, ToInt32(index) * UnboxedTypeSize(unboxedType));
+ EmitUnboxedPreBarrier(masm, address, unboxedType);
+
+ masm.bind(ool->rejoinStore());
+ masm.storeUnboxedProperty(address, unboxedType, v, nullptr);
+ } else {
+ BaseIndex address(elements, ToRegister(index),
+ ScaleFromElemWidth(UnboxedTypeSize(unboxedType)));
+ EmitUnboxedPreBarrier(masm, address, unboxedType);
- masm.bind(ool->rejoinStore());
- emitStoreElementTyped(lir->value(), lir->mir()->value()->type(), lir->mir()->elementType(),
- elements, index, 0);
+ masm.bind(ool->rejoinStore());
+ masm.storeUnboxedProperty(address, unboxedType, v, nullptr);
+ }
+ }
masm.bind(ool->rejoin());
}
@@ -8124,22 +8255,47 @@ CodeGenerator::emitStoreElementHoleV(T* lir)
OutOfLineStoreElementHole* ool = new(alloc()) OutOfLineStoreElementHole(lir);
addOutOfLineCode(ool, lir->mir());
+ Register obj = ToRegister(lir->object());
Register elements = ToRegister(lir->elements());
const LAllocation* index = lir->index();
const ValueOperand value = ToValue(lir, T::Value);
RegisterOrInt32Constant key = ToRegisterOrInt32Constant(index);
- Address initLength(elements, ObjectElements::offsetOfInitializedLength());
- masm.branch32(Assembler::BelowOrEqual, initLength, key, ool->entry());
+ JSValueType unboxedType = lir->mir()->unboxedType();
+ if (unboxedType == JSVAL_TYPE_MAGIC) {
+ Address initLength(elements, ObjectElements::offsetOfInitializedLength());
+ masm.branch32(Assembler::BelowOrEqual, initLength, key, ool->entry());
- if (lir->mir()->needsBarrier())
- emitPreBarrier(elements, index, 0);
+ if (lir->mir()->needsBarrier())
+ emitPreBarrier(elements, index, 0);
- masm.bind(ool->rejoinStore());
- if (index->isConstant())
- masm.storeValue(value, Address(elements, ToInt32(index) * sizeof(js::Value)));
- else
- masm.storeValue(value, BaseIndex(elements, ToRegister(index), TimesEight));
+ masm.bind(ool->rejoinStore());
+ if (index->isConstant())
+ masm.storeValue(value, Address(elements, ToInt32(index) * sizeof(js::Value)));
+ else
+ masm.storeValue(value, BaseIndex(elements, ToRegister(index), TimesEight));
+ } else {
+ Register temp = ToRegister(lir->getTemp(0));
+ Address initLength(obj, UnboxedArrayObject::offsetOfCapacityIndexAndInitializedLength());
+ masm.load32(initLength, temp);
+ masm.and32(Imm32(UnboxedArrayObject::InitializedLengthMask), temp);
+ masm.branch32(Assembler::BelowOrEqual, temp, key, ool->entry());
+
+ if (index->isConstant()) {
+ Address address(elements, ToInt32(index) * UnboxedTypeSize(unboxedType));
+ EmitUnboxedPreBarrier(masm, address, unboxedType);
+
+ masm.bind(ool->rejoinStore());
+ masm.storeUnboxedProperty(address, unboxedType, ConstantOrRegister(value), nullptr);
+ } else {
+ BaseIndex address(elements, ToRegister(index),
+ ScaleFromElemWidth(UnboxedTypeSize(unboxedType)));
+ EmitUnboxedPreBarrier(masm, address, unboxedType);
+
+ masm.bind(ool->rejoinStore());
+ masm.storeUnboxedProperty(address, unboxedType, ConstantOrRegister(value), nullptr);
+ }
+ }
masm.bind(ool->rejoin());
}
@@ -8210,10 +8366,11 @@ CodeGenerator::visitFallibleStoreElementV(LFallibleStoreElementV* lir)
masm.bind(&isFrozen);
}
-typedef bool (*SetDenseElementFn)(JSContext*, HandleNativeObject, int32_t, HandleValue,
- bool strict);
-static const VMFunction SetDenseElementInfo =
- FunctionInfo<SetDenseElementFn>(jit::SetDenseElement, "SetDenseElement");
+typedef bool (*SetDenseOrUnboxedArrayElementFn)(JSContext*, HandleObject, int32_t,
+ HandleValue, bool strict);
+static const VMFunction SetDenseOrUnboxedArrayElementInfo =
+ FunctionInfo<SetDenseOrUnboxedArrayElementFn>(SetDenseOrUnboxedArrayElement,
+ "SetDenseOrUnboxedArrayElement");
void
CodeGenerator::visitOutOfLineStoreElementHole(OutOfLineStoreElementHole* ool)
@@ -8223,6 +8380,8 @@ CodeGenerator::visitOutOfLineStoreElementHole(OutOfLineStoreElementHole* ool)
const LAllocation* index;
MIRType valueType;
ConstantOrRegister value;
+ JSValueType unboxedType;
+ LDefinition *temp = nullptr;
if (ins->isStoreElementHoleV()) {
LStoreElementHoleV* store = ins->toStoreElementHoleV();
@@ -8231,6 +8390,8 @@ CodeGenerator::visitOutOfLineStoreElementHole(OutOfLineStoreElementHole* ool)
index = store->index();
valueType = store->mir()->value()->type();
value = TypedOrValueRegister(ToValue(store, LStoreElementHoleV::Value));
+ unboxedType = store->mir()->unboxedType();
+ temp = store->getTemp(0);
} else if (ins->isFallibleStoreElementV()) {
LFallibleStoreElementV* store = ins->toFallibleStoreElementV();
object = ToRegister(store->object());
@@ -8238,6 +8399,8 @@ CodeGenerator::visitOutOfLineStoreElementHole(OutOfLineStoreElementHole* ool)
index = store->index();
valueType = store->mir()->value()->type();
value = TypedOrValueRegister(ToValue(store, LFallibleStoreElementV::Value));
+ unboxedType = store->mir()->unboxedType();
+ temp = store->getTemp(0);
} else if (ins->isStoreElementHoleT()) {
LStoreElementHoleT* store = ins->toStoreElementHoleT();
object = ToRegister(store->object());
@@ -8248,6 +8411,8 @@ CodeGenerator::visitOutOfLineStoreElementHole(OutOfLineStoreElementHole* ool)
value = ConstantOrRegister(store->value()->toConstant()->toJSValue());
else
value = TypedOrValueRegister(valueType, ToAnyRegister(store->value()));
+ unboxedType = store->mir()->unboxedType();
+ temp = store->getTemp(0);
} else { // ins->isFallibleStoreElementT()
LFallibleStoreElementT* store = ins->toFallibleStoreElementT();
object = ToRegister(store->object());
@@ -8258,6 +8423,8 @@ CodeGenerator::visitOutOfLineStoreElementHole(OutOfLineStoreElementHole* ool)
value = ConstantOrRegister(store->value()->toConstant()->toJSValue());
else
value = TypedOrValueRegister(valueType, ToAnyRegister(store->value()));
+ unboxedType = store->mir()->unboxedType();
+ temp = store->getTemp(0);
}
RegisterOrInt32Constant key = ToRegisterOrInt32Constant(index);
@@ -8268,32 +8435,54 @@ CodeGenerator::visitOutOfLineStoreElementHole(OutOfLineStoreElementHole* ool)
Label callStub;
#if defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64)
// Had to reimplement for MIPS because there are no flags.
- Address initLength(elements, ObjectElements::offsetOfInitializedLength());
- masm.branch32(Assembler::NotEqual, initLength, key, &callStub);
+ if (unboxedType == JSVAL_TYPE_MAGIC) {
+ Address initLength(elements, ObjectElements::offsetOfInitializedLength());
+ masm.branch32(Assembler::NotEqual, initLength, key, &callStub);
+ } else {
+ Address initLength(object, UnboxedArrayObject::offsetOfCapacityIndexAndInitializedLength());
+ masm.load32(initLength, ToRegister(temp));
+ masm.and32(Imm32(UnboxedArrayObject::InitializedLengthMask), ToRegister(temp));
+ masm.branch32(Assembler::NotEqual, ToRegister(temp), key, &callStub);
+ }
#else
masm.j(Assembler::NotEqual, &callStub);
#endif
- // Check array capacity.
- masm.branch32(Assembler::BelowOrEqual, Address(elements, ObjectElements::offsetOfCapacity()),
- key, &callStub);
+ if (unboxedType == JSVAL_TYPE_MAGIC) {
+ // Check array capacity.
+ masm.branch32(Assembler::BelowOrEqual, Address(elements, ObjectElements::offsetOfCapacity()),
+ key, &callStub);
- // Update initialized length. The capacity guard above ensures this won't overflow,
- // due to MAX_DENSE_ELEMENTS_COUNT.
- masm.inc32(&key);
- masm.store32(key, Address(elements, ObjectElements::offsetOfInitializedLength()));
+ // Update initialized length. The capacity guard above ensures this won't overflow,
+ // due to MAX_DENSE_ELEMENTS_COUNT.
+ masm.inc32(&key);
+ masm.store32(key, Address(elements, ObjectElements::offsetOfInitializedLength()));
- // Update length if length < initializedLength.
- Label dontUpdate;
- masm.branch32(Assembler::AboveOrEqual, Address(elements, ObjectElements::offsetOfLength()),
- key, &dontUpdate);
- masm.store32(key, Address(elements, ObjectElements::offsetOfLength()));
- masm.bind(&dontUpdate);
+ // Update length if length < initializedLength.
+ Label dontUpdate;
+ masm.branch32(Assembler::AboveOrEqual, Address(elements, ObjectElements::offsetOfLength()),
+ key, &dontUpdate);
+ masm.store32(key, Address(elements, ObjectElements::offsetOfLength()));
+ masm.bind(&dontUpdate);
- masm.dec32(&key);
+ masm.dec32(&key);
+ } else {
+ // Check array capacity.
+ masm.checkUnboxedArrayCapacity(object, key, ToRegister(temp), &callStub);
+
+ // Update initialized length.
+ masm.add32(Imm32(1), Address(object, UnboxedArrayObject::offsetOfCapacityIndexAndInitializedLength()));
+
+ // Update length if length < initializedLength.
+ Address lengthAddr(object, UnboxedArrayObject::offsetOfLength());
+ Label dontUpdate;
+ masm.branch32(Assembler::Above, lengthAddr, key, &dontUpdate);
+ masm.add32(Imm32(1), lengthAddr);
+ masm.bind(&dontUpdate);
+ }
if ((ins->isStoreElementHoleT() || ins->isFallibleStoreElementT()) &&
- valueType != MIRType::Double)
+ unboxedType == JSVAL_TYPE_MAGIC && valueType != MIRType::Double)
{
// The inline path for StoreElementHoleT and FallibleStoreElementT does not always store
// the type tag, so we do the store on the OOL path. We use MIRType::None for the element
@@ -8322,7 +8511,7 @@ CodeGenerator::visitOutOfLineStoreElementHole(OutOfLineStoreElementHole* ool)
else
pushArg(ToRegister(index));
pushArg(object);
- callVM(SetDenseElementInfo, ins);
+ callVM(SetDenseOrUnboxedArrayElementInfo, ins);
restoreLive(ins);
masm.jump(ool->rejoin());
@@ -8379,6 +8568,29 @@ CodeGenerator::visitStoreUnboxedPointer(LStoreUnboxedPointer* lir)
}
}
+typedef bool (*ConvertUnboxedObjectToNativeFn)(JSContext*, JSObject*);
+static const VMFunction ConvertUnboxedPlainObjectToNativeInfo =
+ FunctionInfo<ConvertUnboxedObjectToNativeFn>(UnboxedPlainObject::convertToNative,
+ "UnboxedPlainObject::convertToNative");
+static const VMFunction ConvertUnboxedArrayObjectToNativeInfo =
+ FunctionInfo<ConvertUnboxedObjectToNativeFn>(UnboxedArrayObject::convertToNative,
+ "UnboxedArrayObject::convertToNative");
+
+void
+CodeGenerator::visitConvertUnboxedObjectToNative(LConvertUnboxedObjectToNative* lir)
+{
+ Register object = ToRegister(lir->getOperand(0));
+
+ OutOfLineCode* ool = oolCallVM(lir->mir()->group()->unboxedLayoutDontCheckGeneration().isArray()
+ ? ConvertUnboxedArrayObjectToNativeInfo
+ : ConvertUnboxedPlainObjectToNativeInfo,
+ lir, ArgList(object), StoreNothing());
+
+ masm.branchPtr(Assembler::Equal, Address(object, JSObject::offsetOfGroup()),
+ ImmGCPtr(lir->mir()->group()), ool->entry());
+ masm.bind(ool->rejoin());
+}
+
typedef bool (*ArrayPopShiftFn)(JSContext*, HandleObject, MutableHandleValue);
static const VMFunction ArrayPopDenseInfo =
FunctionInfo<ArrayPopShiftFn>(jit::ArrayPopDense, "ArrayPopDense");
@@ -8403,11 +8615,20 @@ CodeGenerator::emitArrayPopShift(LInstruction* lir, const MArrayPopShift* mir, R
// Load elements and length, and VM call if length != initializedLength.
RegisterOrInt32Constant key = RegisterOrInt32Constant(lengthTemp);
- masm.loadPtr(Address(obj, NativeObject::offsetOfElements()), elementsTemp);
- masm.load32(Address(elementsTemp, ObjectElements::offsetOfLength()), lengthTemp);
+ if (mir->unboxedType() == JSVAL_TYPE_MAGIC) {
+ masm.loadPtr(Address(obj, NativeObject::offsetOfElements()), elementsTemp);
+ masm.load32(Address(elementsTemp, ObjectElements::offsetOfLength()), lengthTemp);
- Address initLength(elementsTemp, ObjectElements::offsetOfInitializedLength());
- masm.branch32(Assembler::NotEqual, initLength, key, ool->entry());
+ Address initLength(elementsTemp, ObjectElements::offsetOfInitializedLength());
+ masm.branch32(Assembler::NotEqual, initLength, key, ool->entry());
+ } else {
+ masm.loadPtr(Address(obj, UnboxedArrayObject::offsetOfElements()), elementsTemp);
+ masm.load32(Address(obj, UnboxedArrayObject::offsetOfCapacityIndexAndInitializedLength()), lengthTemp);
+ masm.and32(Imm32(UnboxedArrayObject::InitializedLengthMask), lengthTemp);
+
+ Address lengthAddr(obj, UnboxedArrayObject::offsetOfLength());
+ masm.branch32(Assembler::NotEqual, lengthAddr, key, ool->entry());
+ }
// Test for length != 0. On zero length either take a VM call or generate
// an undefined value, depending on whether the call is known to produce
@@ -8419,10 +8640,13 @@ CodeGenerator::emitArrayPopShift(LInstruction* lir, const MArrayPopShift* mir, R
// According to the spec we need to set the length 0 (which is already 0).
// This is observable when the array length is made non-writable.
- // Handle this case in the OOL.
- Address elementFlags(elementsTemp, ObjectElements::offsetOfFlags());
- Imm32 bit(ObjectElements::NONWRITABLE_ARRAY_LENGTH);
- masm.branchTest32(Assembler::NonZero, elementFlags, bit, ool->entry());
+ // Handle this case in the OOL. When freezing an unboxed array it is converted
+ // to an normal array.
+ if (mir->unboxedType() == JSVAL_TYPE_MAGIC) {
+ Address elementFlags(elementsTemp, ObjectElements::offsetOfFlags());
+ Imm32 bit(ObjectElements::NONWRITABLE_ARRAY_LENGTH);
+ masm.branchTest32(Assembler::NonZero, elementFlags, bit, ool->entry());
+ }
masm.moveValue(UndefinedValue(), out.valueReg());
masm.jump(&done);
@@ -8434,25 +8658,41 @@ CodeGenerator::emitArrayPopShift(LInstruction* lir, const MArrayPopShift* mir, R
masm.dec32(&key);
if (mir->mode() == MArrayPopShift::Pop) {
- BaseIndex addr(elementsTemp, lengthTemp, TimesEight);
- masm.loadElementTypedOrValue(addr, out, mir->needsHoleCheck(), ool->entry());
+ if (mir->unboxedType() == JSVAL_TYPE_MAGIC) {
+ BaseIndex addr(elementsTemp, lengthTemp, TimesEight);
+ masm.loadElementTypedOrValue(addr, out, mir->needsHoleCheck(), ool->entry());
+ } else {
+ size_t elemSize = UnboxedTypeSize(mir->unboxedType());
+ BaseIndex addr(elementsTemp, lengthTemp, ScaleFromElemWidth(elemSize));
+ masm.loadUnboxedProperty(addr, mir->unboxedType(), out);
+ }
} else {
MOZ_ASSERT(mir->mode() == MArrayPopShift::Shift);
Address addr(elementsTemp, 0);
- masm.loadElementTypedOrValue(addr, out, mir->needsHoleCheck(), ool->entry());
+ if (mir->unboxedType() == JSVAL_TYPE_MAGIC)
+ masm.loadElementTypedOrValue(addr, out, mir->needsHoleCheck(), ool->entry());
+ else
+ masm.loadUnboxedProperty(addr, mir->unboxedType(), out);
}
- // Handle the failure case when the array length is non-writable in the
- // OOL path. (Unlike in the adding-an-element cases, we can't rely on the
- // capacity <= length invariant for such arrays to avoid an explicit
- // check.)
- Address elementFlags(elementsTemp, ObjectElements::offsetOfFlags());
- Imm32 bit(ObjectElements::NONWRITABLE_ARRAY_LENGTH);
- masm.branchTest32(Assembler::NonZero, elementFlags, bit, ool->entry());
+ if (mir->unboxedType() == JSVAL_TYPE_MAGIC) {
+ // Handle the failure case when the array length is non-writable in the
+ // OOL path. (Unlike in the adding-an-element cases, we can't rely on the
+ // capacity <= length invariant for such arrays to avoid an explicit
+ // check.)
+ Address elementFlags(elementsTemp, ObjectElements::offsetOfFlags());
+ Imm32 bit(ObjectElements::NONWRITABLE_ARRAY_LENGTH);
+ masm.branchTest32(Assembler::NonZero, elementFlags, bit, ool->entry());
- // Now adjust length and initializedLength.
- masm.store32(lengthTemp, Address(elementsTemp, ObjectElements::offsetOfLength()));
- masm.store32(lengthTemp, Address(elementsTemp, ObjectElements::offsetOfInitializedLength()));
+ // Now adjust length and initializedLength.
+ masm.store32(lengthTemp, Address(elementsTemp, ObjectElements::offsetOfLength()));
+ masm.store32(lengthTemp, Address(elementsTemp, ObjectElements::offsetOfInitializedLength()));
+ } else {
+ // Unboxed arrays always have writable lengths. Adjust length and
+ // initializedLength.
+ masm.store32(lengthTemp, Address(obj, UnboxedArrayObject::offsetOfLength()));
+ masm.add32(Imm32(-1), Address(obj, UnboxedArrayObject::offsetOfCapacityIndexAndInitializedLength()));
+ }
if (mir->mode() == MArrayPopShift::Shift) {
// Don't save the temp registers.
@@ -8491,7 +8731,7 @@ CodeGenerator::visitArrayPopShiftT(LArrayPopShiftT* lir)
emitArrayPopShift(lir, lir->mir(), obj, elements, length, out);
}
-typedef bool (*ArrayPushDenseFn)(JSContext*, HandleArrayObject, HandleValue, uint32_t*);
+typedef bool (*ArrayPushDenseFn)(JSContext*, HandleObject, HandleValue, uint32_t*);
static const VMFunction ArrayPushDenseInfo =
FunctionInfo<ArrayPushDenseFn>(jit::ArrayPushDense, "ArrayPushDense");
@@ -8502,27 +8742,50 @@ CodeGenerator::emitArrayPush(LInstruction* lir, const MArrayPush* mir, Register
OutOfLineCode* ool = oolCallVM(ArrayPushDenseInfo, lir, ArgList(obj, value), StoreRegisterTo(length));
RegisterOrInt32Constant key = RegisterOrInt32Constant(length);
+ if (mir->unboxedType() == JSVAL_TYPE_MAGIC) {
+ // Load elements and length.
+ masm.loadPtr(Address(obj, NativeObject::offsetOfElements()), elementsTemp);
+ masm.load32(Address(elementsTemp, ObjectElements::offsetOfLength()), length);
- // Load elements and length.
- masm.loadPtr(Address(obj, NativeObject::offsetOfElements()), elementsTemp);
- masm.load32(Address(elementsTemp, ObjectElements::offsetOfLength()), length);
+ // Guard length == initializedLength.
+ Address initLength(elementsTemp, ObjectElements::offsetOfInitializedLength());
+ masm.branch32(Assembler::NotEqual, initLength, key, ool->entry());
- // Guard length == initializedLength.
- Address initLength(elementsTemp, ObjectElements::offsetOfInitializedLength());
- masm.branch32(Assembler::NotEqual, initLength, key, ool->entry());
+ // Guard length < capacity.
+ Address capacity(elementsTemp, ObjectElements::offsetOfCapacity());
+ masm.branch32(Assembler::BelowOrEqual, capacity, key, ool->entry());
- // Guard length < capacity.
- Address capacity(elementsTemp, ObjectElements::offsetOfCapacity());
- masm.branch32(Assembler::BelowOrEqual, capacity, key, ool->entry());
+ // Do the store.
+ masm.storeConstantOrRegister(value, BaseIndex(elementsTemp, length, TimesEight));
+ } else {
+ // Load initialized length.
+ masm.load32(Address(obj, UnboxedArrayObject::offsetOfCapacityIndexAndInitializedLength()), length);
+ masm.and32(Imm32(UnboxedArrayObject::InitializedLengthMask), length);
- // Do the store.
- masm.storeConstantOrRegister(value, BaseIndex(elementsTemp, length, TimesEight));
+ // Guard length == initializedLength.
+ Address lengthAddr(obj, UnboxedArrayObject::offsetOfLength());
+ masm.branch32(Assembler::NotEqual, lengthAddr, key, ool->entry());
+
+ // Guard length < capacity.
+ masm.checkUnboxedArrayCapacity(obj, key, elementsTemp, ool->entry());
+
+ // Load elements and do the store.
+ masm.loadPtr(Address(obj, UnboxedArrayObject::offsetOfElements()), elementsTemp);
+ size_t elemSize = UnboxedTypeSize(mir->unboxedType());
+ BaseIndex addr(elementsTemp, length, ScaleFromElemWidth(elemSize));
+ masm.storeUnboxedProperty(addr, mir->unboxedType(), value, nullptr);
+ }
masm.inc32(&key);
// Update length and initialized length.
- masm.store32(length, Address(elementsTemp, ObjectElements::offsetOfLength()));
- masm.store32(length, Address(elementsTemp, ObjectElements::offsetOfInitializedLength()));
+ if (mir->unboxedType() == JSVAL_TYPE_MAGIC) {
+ masm.store32(length, Address(elementsTemp, ObjectElements::offsetOfLength()));
+ masm.store32(length, Address(elementsTemp, ObjectElements::offsetOfInitializedLength()));
+ } else {
+ masm.store32(length, Address(obj, UnboxedArrayObject::offsetOfLength()));
+ masm.add32(Imm32(1), Address(obj, UnboxedArrayObject::offsetOfCapacityIndexAndInitializedLength()));
+ }
masm.bind(ool->rejoin());
}
@@ -8671,11 +8934,11 @@ CodeGenerator::visitIteratorStartO(LIteratorStartO* lir)
masm.loadPtr(Address(niTemp, offsetof(NativeIterator, guard_array)), temp2);
// Compare object with the first receiver guard. The last iterator can only
- // match for native objects.
+ // match for native objects and unboxed objects.
{
Address groupAddr(temp2, offsetof(ReceiverGuard, group));
Address shapeAddr(temp2, offsetof(ReceiverGuard, shape));
- Label guardDone, shapeMismatch;
+ Label guardDone, shapeMismatch, noExpando;
masm.loadObjShape(obj, temp1);
masm.branchPtr(Assembler::NotEqual, shapeAddr, temp1, &shapeMismatch);
@@ -8687,6 +8950,12 @@ CodeGenerator::visitIteratorStartO(LIteratorStartO* lir)
masm.bind(&shapeMismatch);
masm.loadObjGroup(obj, temp1);
masm.branchPtr(Assembler::NotEqual, groupAddr, temp1, ool->entry());
+ masm.loadPtr(Address(obj, UnboxedPlainObject::offsetOfExpando()), temp1);
+ masm.branchTestPtr(Assembler::Zero, temp1, temp1, &noExpando);
+ branchIfNotEmptyObjectElements(temp1, ool->entry());
+ masm.loadObjShape(temp1, temp1);
+ masm.bind(&noExpando);
+ masm.branchPtr(Assembler::NotEqual, shapeAddr, temp1, ool->entry());
masm.bind(&guardDone);
}
@@ -10343,11 +10612,22 @@ CodeGenerator::visitLoadElementHole(LLoadElementHole* lir)
else
masm.branch32(Assembler::BelowOrEqual, initLength, ToRegister(lir->index()), &undefined);
- if (lir->index()->isConstant()) {
- NativeObject::elementsSizeMustNotOverflow();
- masm.loadValue(Address(elements, ToInt32(lir->index()) * sizeof(Value)), out);
+ if (mir->unboxedType() != JSVAL_TYPE_MAGIC) {
+ size_t width = UnboxedTypeSize(mir->unboxedType());
+ if (lir->index()->isConstant()) {
+ Address addr(elements, ToInt32(lir->index()) * width);
+ masm.loadUnboxedProperty(addr, mir->unboxedType(), out);
+ } else {
+ BaseIndex addr(elements, ToRegister(lir->index()), ScaleFromElemWidth(width));
+ masm.loadUnboxedProperty(addr, mir->unboxedType(), out);
+ }
} else {
- masm.loadValue(BaseObjectElementIndex(elements, ToRegister(lir->index())), out);
+ if (lir->index()->isConstant()) {
+ NativeObject::elementsSizeMustNotOverflow();
+ masm.loadValue(Address(elements, ToInt32(lir->index()) * sizeof(Value)), out);
+ } else {
+ masm.loadValue(BaseObjectElementIndex(elements, ToRegister(lir->index())), out);
+ }
}
// If a hole check is needed, and the value wasn't a hole, we're done.
@@ -10725,7 +11005,7 @@ CodeGenerator::visitInArray(LInArray* lir)
}
masm.branch32(Assembler::BelowOrEqual, initLength, Imm32(index), failedInitLength);
- if (mir->needsHoleCheck()) {
+ if (mir->needsHoleCheck() && mir->unboxedType() == JSVAL_TYPE_MAGIC) {
NativeObject::elementsSizeMustNotOverflow();
Address address = Address(elements, index * sizeof(Value));
masm.branchTestMagic(Assembler::Equal, address, &falseBranch);
@@ -10738,7 +11018,7 @@ CodeGenerator::visitInArray(LInArray* lir)
failedInitLength = &negativeIntCheck;
masm.branch32(Assembler::BelowOrEqual, initLength, index, failedInitLength);
- if (mir->needsHoleCheck()) {
+ if (mir->needsHoleCheck() && mir->unboxedType() == JSVAL_TYPE_MAGIC) {
BaseIndex address = BaseIndex(elements, ToRegister(lir->index()), TimesEight);
masm.branchTestMagic(Assembler::Equal, address, &falseBranch);
}
diff --git a/js/src/jit/CodeGenerator.h b/js/src/jit/CodeGenerator.h
index 65acfe2740..6a5c7f34fa 100644
--- a/js/src/jit/CodeGenerator.h
+++ b/js/src/jit/CodeGenerator.h
@@ -148,6 +148,8 @@ class CodeGenerator final : public CodeGeneratorSpecific
void visitMaybeCopyElementsForWrite(LMaybeCopyElementsForWrite* lir);
void visitGuardObjectIdentity(LGuardObjectIdentity* guard);
void visitGuardReceiverPolymorphic(LGuardReceiverPolymorphic* lir);
+ void visitGuardUnboxedExpando(LGuardUnboxedExpando* lir);
+ void visitLoadUnboxedExpando(LLoadUnboxedExpando* lir);
void visitTypeBarrierV(LTypeBarrierV* lir);
void visitTypeBarrierO(LTypeBarrierO* lir);
void visitMonitorTypes(LMonitorTypes* lir);
@@ -234,6 +236,10 @@ class CodeGenerator final : public CodeGeneratorSpecific
void visitSubstr(LSubstr* lir);
void visitInitializedLength(LInitializedLength* lir);
void visitSetInitializedLength(LSetInitializedLength* lir);
+ void visitUnboxedArrayLength(LUnboxedArrayLength* lir);
+ void visitUnboxedArrayInitializedLength(LUnboxedArrayInitializedLength* lir);
+ void visitIncrementUnboxedArrayInitializedLength(LIncrementUnboxedArrayInitializedLength* lir);
+ void visitSetUnboxedArrayInitializedLength(LSetUnboxedArrayInitializedLength* lir);
void visitNotO(LNotO* ins);
void visitNotV(LNotV* ins);
void visitBoundsCheck(LBoundsCheck* lir);
@@ -305,6 +311,7 @@ class CodeGenerator final : public CodeGeneratorSpecific
void visitFallibleStoreElementV(LFallibleStoreElementV* lir);
void visitFallibleStoreElementT(LFallibleStoreElementT* lir);
void visitStoreUnboxedPointer(LStoreUnboxedPointer* lir);
+ void visitConvertUnboxedObjectToNative(LConvertUnboxedObjectToNative* lir);
void emitArrayPopShift(LInstruction* lir, const MArrayPopShift* mir, Register obj,
Register elementsTemp, Register lengthTemp, TypedOrValueRegister out);
void visitArrayPopShiftV(LArrayPopShiftV* lir);
diff --git a/js/src/jit/Ion.cpp b/js/src/jit/Ion.cpp
index 9337f61505..aa0ba8e3d3 100644
--- a/js/src/jit/Ion.cpp
+++ b/js/src/jit/Ion.cpp
@@ -1497,14 +1497,6 @@ OptimizeMIR(MIRGenerator* mir)
if (mir->shouldCancel("Start"))
return false;
- if (!mir->compilingWasm()) {
- if (!MakeMRegExpHoistable(mir, graph))
- return false;
-
- if (mir->shouldCancel("Make MRegExp Hoistable"))
- return false;
- }
-
gs.spewPass("BuildSSA");
AssertBasicGraphCoherency(graph);
diff --git a/js/src/jit/IonAnalysis.cpp b/js/src/jit/IonAnalysis.cpp
index a4724bca4f..1e3cb0ad44 100644
--- a/js/src/jit/IonAnalysis.cpp
+++ b/js/src/jit/IonAnalysis.cpp
@@ -1975,274 +1975,6 @@ jit::ApplyTypeInformation(MIRGenerator* mir, MIRGraph& graph)
return true;
}
-// Check if `def` is only the N-th operand of `useDef`.
-static inline size_t
-IsExclusiveNthOperand(MDefinition* useDef, size_t n, MDefinition* def)
-{
- uint32_t num = useDef->numOperands();
- if (n >= num || useDef->getOperand(n) != def)
- return false;
-
- for (uint32_t i = 0; i < num; i++) {
- if (i == n)
- continue;
- if (useDef->getOperand(i) == def)
- return false;
- }
-
- return true;
-}
-
-static size_t
-IsExclusiveThisArg(MCall* call, MDefinition* def)
-{
- return IsExclusiveNthOperand(call, MCall::IndexOfThis(), def);
-}
-
-static size_t
-IsExclusiveFirstArg(MCall* call, MDefinition* def)
-{
- return IsExclusiveNthOperand(call, MCall::IndexOfArgument(0), def);
-}
-
-static bool
-IsRegExpHoistableCall(MCall* call, MDefinition* def)
-{
- if (call->isConstructing())
- return false;
-
- JSAtom* name;
- if (WrappedFunction* fun = call->getSingleTarget()) {
- if (!fun->isSelfHostedBuiltin())
- return false;
- name = GetSelfHostedFunctionName(fun->rawJSFunction());
- } else {
- MDefinition* funDef = call->getFunction();
- if (funDef->isDebugCheckSelfHosted())
- funDef = funDef->toDebugCheckSelfHosted()->input();
- if (funDef->isTypeBarrier())
- funDef = funDef->toTypeBarrier()->input();
-
- if (!funDef->isCallGetIntrinsicValue())
- return false;
- name = funDef->toCallGetIntrinsicValue()->name();
- }
-
- // Hoistable only if the RegExp is the first argument of RegExpBuiltinExec.
- CompileRuntime* runtime = GetJitContext()->runtime;
- if (name == runtime->names().RegExpBuiltinExec ||
- name == runtime->names().UnwrapAndCallRegExpBuiltinExec ||
- name == runtime->names().RegExpMatcher ||
- name == runtime->names().RegExpTester ||
- name == runtime->names().RegExpSearcher)
- {
- return IsExclusiveFirstArg(call, def);
- }
-
- if (name == runtime->names().RegExp_prototype_Exec)
- return IsExclusiveThisArg(call, def);
-
- return false;
-}
-
-static bool
-CanCompareRegExp(MCompare* compare, MDefinition* def)
-{
- MDefinition* value;
- if (compare->lhs() == def) {
- value = compare->rhs();
- } else {
- MOZ_ASSERT(compare->rhs() == def);
- value = compare->lhs();
- }
-
- // Comparing two regexp that weren't cloned will give different result
- // than if they were cloned.
- if (value->mightBeType(MIRType::Object))
- return false;
-
- // Make sure @@toPrimitive is not called which could notice
- // the difference between a not cloned/cloned regexp.
-
- JSOp op = compare->jsop();
- // Strict equality comparison won't invoke @@toPrimitive.
- if (op == JSOP_STRICTEQ || op == JSOP_STRICTNE)
- return true;
-
- if (op != JSOP_EQ && op != JSOP_NE) {
- // Relational comparison always invoke @@toPrimitive.
- MOZ_ASSERT(op == JSOP_GT || op == JSOP_GE || op == JSOP_LT || op == JSOP_LE);
- return false;
- }
-
- // Loose equality comparison can invoke @@toPrimitive.
- if (value->mightBeType(MIRType::Boolean) || value->mightBeType(MIRType::String) ||
- value->mightBeType(MIRType::Int32) ||
- value->mightBeType(MIRType::Double) || value->mightBeType(MIRType::Float32) ||
- value->mightBeType(MIRType::Symbol))
- {
- return false;
- }
-
- return true;
-}
-
-static inline void
-SetNotInWorklist(MDefinitionVector& worklist)
-{
- for (size_t i = 0; i < worklist.length(); i++)
- worklist[i]->setNotInWorklist();
-}
-
-static bool
-IsRegExpHoistable(MIRGenerator* mir, MDefinition* regexp, MDefinitionVector& worklist,
- bool* hoistable)
-{
- MOZ_ASSERT(worklist.length() == 0);
-
- if (!worklist.append(regexp))
- return false;
- regexp->setInWorklist();
-
- for (size_t i = 0; i < worklist.length(); i++) {
- MDefinition* def = worklist[i];
- if (mir->shouldCancel("IsRegExpHoistable outer loop"))
- return false;
-
- for (MUseIterator use = def->usesBegin(); use != def->usesEnd(); use++) {
- if (mir->shouldCancel("IsRegExpHoistable inner loop"))
- return false;
-
- // Ignore resume points. At this point all uses are listed.
- // No DCE or GVN or something has happened.
- if (use->consumer()->isResumePoint())
- continue;
-
- MDefinition* useDef = use->consumer()->toDefinition();
-
- // Step through a few white-listed ops.
- if (useDef->isPhi() || useDef->isFilterTypeSet() || useDef->isGuardShape()) {
- if (useDef->isInWorklist())
- continue;
-
- if (!worklist.append(useDef))
- return false;
- useDef->setInWorklist();
- continue;
- }
-
- // Instructions that doesn't invoke unknown code that may modify
- // RegExp instance or pass it to elsewhere.
- if (useDef->isRegExpMatcher() || useDef->isRegExpTester() ||
- useDef->isRegExpSearcher())
- {
- if (IsExclusiveNthOperand(useDef, 0, def))
- continue;
- } else if (useDef->isLoadFixedSlot() || useDef->isTypeOf()) {
- continue;
- } else if (useDef->isCompare()) {
- if (CanCompareRegExp(useDef->toCompare(), def))
- continue;
- }
- // Instructions that modifies `lastIndex` property.
- else if (useDef->isStoreFixedSlot()) {
- if (IsExclusiveNthOperand(useDef, 0, def)) {
- MStoreFixedSlot* store = useDef->toStoreFixedSlot();
- if (store->slot() == RegExpObject::lastIndexSlot())
- continue;
- }
- } else if (useDef->isSetPropertyCache()) {
- if (IsExclusiveNthOperand(useDef, 0, def)) {
- MSetPropertyCache* setProp = useDef->toSetPropertyCache();
- if (setProp->idval()->isConstant()) {
- Value propIdVal = setProp->idval()->toConstant()->toJSValue();
- if (propIdVal.isString()) {
- CompileRuntime* runtime = GetJitContext()->runtime;
- if (propIdVal.toString() == runtime->names().lastIndex)
- continue;
- }
- }
- }
- }
- // MCall is safe only for some known safe functions.
- else if (useDef->isCall()) {
- if (IsRegExpHoistableCall(useDef->toCall(), def))
- continue;
- }
-
- // Everything else is unsafe.
- SetNotInWorklist(worklist);
- worklist.clear();
- *hoistable = false;
-
- return true;
- }
- }
-
- SetNotInWorklist(worklist);
- worklist.clear();
- *hoistable = true;
- return true;
-}
-
-bool
-jit::MakeMRegExpHoistable(MIRGenerator* mir, MIRGraph& graph)
-{
- // If we are compiling try blocks, regular expressions may be observable
- // from catch blocks (which Ion does not compile). For now just disable the
- // pass in this case.
- if (graph.hasTryBlock())
- return true;
-
- MDefinitionVector worklist(graph.alloc());
-
- for (ReversePostorderIterator block(graph.rpoBegin()); block != graph.rpoEnd(); block++) {
- if (mir->shouldCancel("MakeMRegExpHoistable outer loop"))
- return false;
-
- for (MDefinitionIterator iter(*block); iter; iter++) {
- if (!*iter)
- MOZ_CRASH("confirm bug 1263794.");
-
- if (mir->shouldCancel("MakeMRegExpHoistable inner loop"))
- return false;
-
- if (!iter->isRegExp())
- continue;
-
- MRegExp* regexp = iter->toRegExp();
-
- bool hoistable = false;
- if (!IsRegExpHoistable(mir, regexp, worklist, &hoistable))
- return false;
-
- if (!hoistable)
- continue;
-
- // Make MRegExp hoistable
- regexp->setMovable();
- regexp->setDoNotClone();
-
- // That would be incorrect for global/sticky, because lastIndex
- // could be wrong. Therefore setting the lastIndex to 0. That is
- // faster than a not movable regexp.
- RegExpObject* source = regexp->source();
- if (source->sticky() || source->global()) {
- if (!graph.alloc().ensureBallast())
- return false;
- MConstant* zero = MConstant::New(graph.alloc(), Int32Value(0));
- regexp->block()->insertAfter(regexp, zero);
-
- MStoreFixedSlot* lastIndex =
- MStoreFixedSlot::New(graph.alloc(), regexp, RegExpObject::lastIndexSlot(), zero);
- regexp->block()->insertAfter(zero, lastIndex);
- }
- }
- }
-
- return true;
-}
-
void
jit::RenumberBlocks(MIRGraph& graph)
{
@@ -3515,6 +3247,8 @@ PassthroughOperand(MDefinition* def)
return def->toConvertElementsToDoubles()->elements();
if (def->isMaybeCopyElementsForWrite())
return def->toMaybeCopyElementsForWrite()->object();
+ if (def->isConvertUnboxedObjectToNative())
+ return def->toConvertUnboxedObjectToNative()->object();
return nullptr;
}
@@ -4060,7 +3794,7 @@ AnalyzePoppedThis(JSContext* cx, DPAConstraintInfo& constraintInfo, ObjectGroup*
// Add the property to the object, being careful not to update type information.
DebugOnly<unsigned> slotSpan = baseobj->slotSpan();
MOZ_ASSERT(!baseobj->containsPure(id));
- if (!NativeObject::addDataProperty(cx, baseobj, id, baseobj->slotSpan(), JSPROP_ENUMERATE))
+ if (!baseobj->addDataProperty(cx, id, baseobj->slotSpan(), JSPROP_ENUMERATE))
return false;
MOZ_ASSERT(baseobj->slotSpan() != slotSpan);
MOZ_ASSERT(!baseobj->inDictionaryMode());
diff --git a/js/src/jit/IonAnalysis.h b/js/src/jit/IonAnalysis.h
index 49bc0b5919..673c797bd1 100644
--- a/js/src/jit/IonAnalysis.h
+++ b/js/src/jit/IonAnalysis.h
@@ -56,9 +56,6 @@ EliminateDeadCode(MIRGenerator* mir, MIRGraph& graph);
MOZ_MUST_USE bool
ApplyTypeInformation(MIRGenerator* mir, MIRGraph& graph);
-MOZ_MUST_USE bool
-MakeMRegExpHoistable(MIRGenerator* mir, MIRGraph& graph);
-
void
RenumberBlocks(MIRGraph& graph);
diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp
index 1e12f5dbe1..f08baf8657 100644
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -32,6 +32,7 @@
#include "vm/EnvironmentObject-inl.h"
#include "vm/NativeObject-inl.h"
#include "vm/ObjectGroup-inl.h"
+#include "vm/UnboxedObject-inl.h"
using namespace js;
using namespace js::jit;
@@ -2227,8 +2228,6 @@ IonBuilder::inspectOpcode(JSOp op)
// update that stale value.
#endif
default:
- // Any unused opcodes and JSOP_LIMIT will end up here without having
- // to explicitly specify
break;
}
@@ -6402,7 +6401,7 @@ IonBuilder::createThisScriptedSingleton(JSFunction* target, MDefinition* callee)
JSObject* templateObject = inspector->getTemplateObject(pc);
if (!templateObject)
return nullptr;
- if (!templateObject->is<PlainObject>())
+ if (!templateObject->is<PlainObject>() && !templateObject->is<UnboxedPlainObject>())
return nullptr;
if (templateObject->staticPrototype() != proto)
return nullptr;
@@ -6439,7 +6438,7 @@ IonBuilder::createThisScriptedBaseline(MDefinition* callee)
JSObject* templateObject = inspector->getTemplateObject(pc);
if (!templateObject)
return nullptr;
- if (!templateObject->is<PlainObject>())
+ if (!templateObject->is<PlainObject>() && !templateObject->is<UnboxedPlainObject>())
return nullptr;
Shape* shape = target->lookupPure(compartment->runtime()->names().prototype);
@@ -7355,6 +7354,12 @@ IonBuilder::newArrayTryTemplateObject(bool* emitted, JSObject* templateObject, u
if (!templateObject)
return true;
+ if (templateObject->is<UnboxedArrayObject>()) {
+ MOZ_ASSERT(templateObject->as<UnboxedArrayObject>().capacity() >= length);
+ if (!templateObject->as<UnboxedArrayObject>().hasInlineElements())
+ return true;
+ }
+
MOZ_ASSERT(length <= NativeObject::MAX_DENSE_ELEMENTS_COUNT);
size_t arraySlots =
@@ -7610,6 +7615,7 @@ IonBuilder::jsop_initelem_array()
// intializer, and that arrays are marked as non-packed when writing holes
// to them during initialization.
bool needStub = false;
+ JSValueType unboxedType = JSVAL_TYPE_MAGIC;
if (shouldAbortOnPreliminaryGroups(obj)) {
needStub = true;
} else if (!obj->resultTypeSet() ||
@@ -7620,6 +7626,12 @@ IonBuilder::jsop_initelem_array()
} else {
MOZ_ASSERT(obj->resultTypeSet()->getObjectCount() == 1);
TypeSet::ObjectKey* initializer = obj->resultTypeSet()->getObject(0);
+ if (initializer->clasp() == &UnboxedArrayObject::class_) {
+ if (initializer->group()->unboxedLayout().nativeGroup())
+ needStub = true;
+ else
+ unboxedType = initializer->group()->unboxedLayout().elementType();
+ }
if (value->type() == MIRType::MagicHole) {
if (!initializer->hasFlags(constraints(), OBJECT_FLAG_NON_PACKED))
needStub = true;
@@ -7639,46 +7651,60 @@ IonBuilder::jsop_initelem_array()
return resumeAfter(store);
}
- return initializeArrayElement(obj, index, value, /* addResumePoint = */ true);
+ return initializeArrayElement(obj, index, value, unboxedType, /* addResumePoint = */ true);
}
bool
IonBuilder::initializeArrayElement(MDefinition* obj, size_t index, MDefinition* value,
+ JSValueType unboxedType,
bool addResumePointAndIncrementInitializedLength)
{
MConstant* id = MConstant::New(alloc(), Int32Value(index));
current->add(id);
// Get the elements vector.
- MElements* elements = MElements::New(alloc(), obj);
+ MElements* elements = MElements::New(alloc(), obj, unboxedType != JSVAL_TYPE_MAGIC);
current->add(elements);
- if (NeedsPostBarrier(value))
- current->add(MPostWriteBarrier::New(alloc(), obj, value));
+ if (unboxedType != JSVAL_TYPE_MAGIC) {
+ // Note: storeUnboxedValue takes care of any post barriers on the value.
+ storeUnboxedValue(obj, elements, 0, id, unboxedType, value, /* preBarrier = */ false);
- if ((obj->isNewArray() && obj->toNewArray()->convertDoubleElements()) ||
- (obj->isNullarySharedStub() &&
- obj->resultTypeSet()->convertDoubleElements(constraints()) == TemporaryTypeSet::AlwaysConvertToDoubles))
- {
- MInstruction* valueDouble = MToDouble::New(alloc(), value);
- current->add(valueDouble);
- value = valueDouble;
- }
+ if (addResumePointAndIncrementInitializedLength) {
+ MInstruction* increment = MIncrementUnboxedArrayInitializedLength::New(alloc(), obj);
+ current->add(increment);
- // Store the value.
- MStoreElement* store = MStoreElement::New(alloc(), elements, id, value,
+ if (!resumeAfter(increment))
+ return false;
+ }
+ } else {
+ if (NeedsPostBarrier(value))
+ current->add(MPostWriteBarrier::New(alloc(), obj, value));
+
+ if ((obj->isNewArray() && obj->toNewArray()->convertDoubleElements()) ||
+ (obj->isNullarySharedStub() &&
+ obj->resultTypeSet()->convertDoubleElements(constraints()) == TemporaryTypeSet::AlwaysConvertToDoubles))
+ {
+ MInstruction* valueDouble = MToDouble::New(alloc(), value);
+ current->add(valueDouble);
+ value = valueDouble;
+ }
+
+ // Store the value.
+ MStoreElement* store = MStoreElement::New(alloc(), elements, id, value,
/* needsHoleCheck = */ false);
- current->add(store);
+ current->add(store);
- if (addResumePointAndIncrementInitializedLength) {
- // Update the initialized length. (The template object for this
- // array has the array's ultimate length, so the length field is
- // already correct: no updating needed.)
- MSetInitializedLength* initLength = MSetInitializedLength::New(alloc(), elements, id);
- current->add(initLength);
+ if (addResumePointAndIncrementInitializedLength) {
+ // Update the initialized length. (The template object for this
+ // array has the array's ultimate length, so the length field is
+ // already correct: no updating needed.)
+ MSetInitializedLength* initLength = MSetInitializedLength::New(alloc(), elements, id);
+ current->add(initLength);
- if (!resumeAfter(initLength))
- return false;
+ if (!resumeAfter(initLength))
+ return false;
+ }
}
return true;
@@ -7709,6 +7735,8 @@ IonBuilder::jsop_initprop(PropertyName* name)
if (templateObject->is<PlainObject>()) {
if (!templateObject->as<PlainObject>().containsPure(name))
useSlowPath = true;
+ } else {
+ MOZ_ASSERT(templateObject->as<UnboxedPlainObject>().layout().lookup(name));
}
} else {
useSlowPath = true;
@@ -8167,7 +8195,9 @@ IonBuilder::maybeMarkEmpty(MDefinition* ins)
static bool
ClassHasEffectlessLookup(const Class* clasp)
{
- return IsTypedObjectClass(clasp) ||
+ return (clasp == &UnboxedPlainObject::class_) ||
+ (clasp == &UnboxedArrayObject::class_) ||
+ IsTypedObjectClass(clasp) ||
(clasp->isNative() && !clasp->getOpsLookupProperty());
}
@@ -8997,6 +9027,8 @@ IonBuilder::jsop_getelem()
}
obj = maybeUnboxForPropertyAccess(obj);
+ if (obj->type() == MIRType::Object)
+ obj = convertUnboxedObjects(obj);
bool emitted = false;
@@ -9441,9 +9473,12 @@ IonBuilder::getElemTryDense(bool* emitted, MDefinition* obj, MDefinition* index)
{
MOZ_ASSERT(*emitted == false);
- if (!ElementAccessIsDenseNative(constraints(), obj, index)) {
- trackOptimizationOutcome(TrackedOutcome::AccessNotDense);
- return true;
+ JSValueType unboxedType = UnboxedArrayElementType(constraints(), obj, index);
+ if (unboxedType == JSVAL_TYPE_MAGIC) {
+ if (!ElementAccessIsDenseNative(constraints(), obj, index)) {
+ trackOptimizationOutcome(TrackedOutcome::AccessNotDense);
+ return true;
+ }
}
// Don't generate a fast path if there have been bounds check failures
@@ -9460,7 +9495,7 @@ IonBuilder::getElemTryDense(bool* emitted, MDefinition* obj, MDefinition* index)
return true;
}
- if (!jsop_getelem_dense(obj, index))
+ if (!jsop_getelem_dense(obj, index, unboxedType))
return false;
trackOptimizationSuccess();
@@ -9812,7 +9847,7 @@ IonBuilder::computeHeapType(const TemporaryTypeSet* objTypes, const jsid id)
}
bool
-IonBuilder::jsop_getelem_dense(MDefinition* obj, MDefinition* index)
+IonBuilder::jsop_getelem_dense(MDefinition* obj, MDefinition* index, JSValueType unboxedType)
{
TemporaryTypeSet* types = bytecodeTypes(pc);
@@ -9836,7 +9871,7 @@ IonBuilder::jsop_getelem_dense(MDefinition* obj, MDefinition* index)
!ElementAccessHasExtraIndexedProperty(this, obj);
MIRType knownType = MIRType::Value;
- if (barrier == BarrierKind::NoBarrier)
+ if (unboxedType == JSVAL_TYPE_MAGIC && barrier == BarrierKind::NoBarrier)
knownType = GetElemKnownType(needsHoleCheck, types);
// Ensure index is an integer.
@@ -9845,13 +9880,13 @@ IonBuilder::jsop_getelem_dense(MDefinition* obj, MDefinition* index)
index = idInt32;
// Get the elements vector.
- MInstruction* elements = MElements::New(alloc(), obj);
+ MInstruction* elements = MElements::New(alloc(), obj, unboxedType != JSVAL_TYPE_MAGIC);
current->add(elements);
// Note: to help GVN, use the original MElements instruction and not
// MConvertElementsToDoubles as operand. This is fine because converting
// elements to double does not change the initialized length.
- MInstruction* initLength = initializedLength(obj, elements);
+ MInstruction* initLength = initializedLength(obj, elements, unboxedType);
// If we can load the element as a definite double, make sure to check that
// the array has been converted to homogenous doubles first.
@@ -9867,6 +9902,7 @@ IonBuilder::jsop_getelem_dense(MDefinition* obj, MDefinition* index)
}
bool loadDouble =
+ unboxedType == JSVAL_TYPE_MAGIC &&
barrier == BarrierKind::NoBarrier &&
loopDepth_ &&
inBounds &&
@@ -9885,13 +9921,18 @@ IonBuilder::jsop_getelem_dense(MDefinition* obj, MDefinition* index)
// hoisting.
index = addBoundsCheck(index, initLength);
- load = MLoadElement::New(alloc(), elements, index, needsHoleCheck, loadDouble);
- current->add(load);
+ if (unboxedType != JSVAL_TYPE_MAGIC) {
+ load = loadUnboxedValue(elements, 0, index, unboxedType, barrier, types);
+ } else {
+ load = MLoadElement::New(alloc(), elements, index, needsHoleCheck, loadDouble);
+ current->add(load);
+ }
} else {
// This load may return undefined, so assume that we *can* read holes,
// or that we can read out-of-bounds accesses. In this case, the bounds
// check is part of the opcode.
- load = MLoadElementHole::New(alloc(), elements, index, initLength, needsHoleCheck);
+ load = MLoadElementHole::New(alloc(), elements, index, initLength,
+ unboxedType, needsHoleCheck);
current->add(load);
// If maybeUndefined was true, the typeset must have undefined, and
@@ -9901,7 +9942,8 @@ IonBuilder::jsop_getelem_dense(MDefinition* obj, MDefinition* index)
}
if (knownType != MIRType::Value) {
- load->setResultType(knownType);
+ if (unboxedType == JSVAL_TYPE_MAGIC)
+ load->setResultType(knownType);
load->setResultTypeSet(types);
}
@@ -10110,7 +10152,7 @@ IonBuilder::jsop_setelem()
MDefinition* value = current->pop();
MDefinition* index = current->pop();
- MDefinition* object = current->pop();
+ MDefinition* object = convertUnboxedObjects(current->pop());
trackTypeInfo(TrackedTypeSite::Receiver, object->type(), object->resultTypeSet());
trackTypeInfo(TrackedTypeSite::Index, index->type(), index->resultTypeSet());
@@ -10348,9 +10390,12 @@ IonBuilder::setElemTryDense(bool* emitted, MDefinition* object,
{
MOZ_ASSERT(*emitted == false);
- if (!ElementAccessIsDenseNative(constraints(), object, index)) {
- trackOptimizationOutcome(TrackedOutcome::AccessNotDense);
- return true;
+ JSValueType unboxedType = UnboxedArrayElementType(constraints(), object, index);
+ if (unboxedType == JSVAL_TYPE_MAGIC) {
+ if (!ElementAccessIsDenseNative(constraints(), object, index)) {
+ trackOptimizationOutcome(TrackedOutcome::AccessNotDense);
+ return true;
+ }
}
if (PropertyWriteNeedsTypeBarrier(alloc(), constraints(), current,
@@ -10384,7 +10429,7 @@ IonBuilder::setElemTryDense(bool* emitted, MDefinition* object,
}
// Emit dense setelem variant.
- if (!jsop_setelem_dense(conversion, object, index, value, writeHole, emitted))
+ if (!jsop_setelem_dense(conversion, object, index, value, unboxedType, writeHole, emitted))
return false;
if (!*emitted) {
@@ -10474,11 +10519,13 @@ IonBuilder::setElemTryCache(bool* emitted, MDefinition* object,
bool
IonBuilder::jsop_setelem_dense(TemporaryTypeSet::DoubleConversion conversion,
MDefinition* obj, MDefinition* id, MDefinition* value,
- bool writeHole, bool* emitted)
+ JSValueType unboxedType, bool writeHole, bool* emitted)
{
MOZ_ASSERT(*emitted == false);
- MIRType elementType = DenseNativeElementType(constraints(), obj);
+ MIRType elementType = MIRType::None;
+ if (unboxedType == JSVAL_TYPE_MAGIC)
+ elementType = DenseNativeElementType(constraints(), obj);
bool packed = ElementAccessIsPacked(constraints(), obj);
// Writes which are on holes in the object do not have to bail out if they
@@ -10508,7 +10555,7 @@ IonBuilder::jsop_setelem_dense(TemporaryTypeSet::DoubleConversion conversion,
obj = addMaybeCopyElementsForWrite(obj, /* checkNative = */ false);
// Get the elements vector.
- MElements* elements = MElements::New(alloc(), obj);
+ MElements* elements = MElements::New(alloc(), obj, unboxedType != JSVAL_TYPE_MAGIC);
current->add(elements);
// Ensure the value is a double, if double conversion might be needed.
@@ -10545,7 +10592,7 @@ IonBuilder::jsop_setelem_dense(TemporaryTypeSet::DoubleConversion conversion,
MInstruction* store;
MStoreElementCommon* common = nullptr;
if (writeHole && hasNoExtraIndexedProperty && !mayBeFrozen) {
- MStoreElementHole* ins = MStoreElementHole::New(alloc(), obj, elements, id, newValue);
+ MStoreElementHole* ins = MStoreElementHole::New(alloc(), obj, elements, id, newValue, unboxedType);
store = ins;
common = ins;
@@ -10557,23 +10604,27 @@ IonBuilder::jsop_setelem_dense(TemporaryTypeSet::DoubleConversion conversion,
bool strict = IsStrictSetPC(pc);
MFallibleStoreElement* ins = MFallibleStoreElement::New(alloc(), obj, elements, id,
- newValue, strict);
+ newValue, unboxedType, strict);
store = ins;
common = ins;
current->add(ins);
current->push(value);
} else {
- MInstruction* initLength = initializedLength(obj, elements);
+ MInstruction* initLength = initializedLength(obj, elements, unboxedType);
id = addBoundsCheck(id, initLength);
bool needsHoleCheck = !packed && !hasNoExtraIndexedProperty;
- MStoreElement* ins = MStoreElement::New(alloc(), elements, id, newValue, needsHoleCheck);
- store = ins;
- common = ins;
+ if (unboxedType != JSVAL_TYPE_MAGIC) {
+ store = storeUnboxedValue(obj, elements, 0, id, unboxedType, newValue);
+ } else {
+ MStoreElement* ins = MStoreElement::New(alloc(), elements, id, newValue, needsHoleCheck);
+ store = ins;
+ common = ins;
- current->add(store);
+ current->add(store);
+ }
current->push(value);
}
@@ -10691,6 +10742,18 @@ IonBuilder::jsop_length_fastPath()
return true;
}
+ // Compute the length for unboxed array objects.
+ if (UnboxedArrayElementType(constraints(), obj, nullptr) != JSVAL_TYPE_MAGIC &&
+ !objTypes->hasObjectFlags(constraints(), OBJECT_FLAG_LENGTH_OVERFLOW))
+ {
+ current->pop();
+
+ MUnboxedArrayLength* length = MUnboxedArrayLength::New(alloc(), obj);
+ current->add(length);
+ current->push(length);
+ return true;
+ }
+
// Compute the length for array typed objects.
TypedObjectPrediction prediction = typedObjectPrediction(obj);
if (!prediction.isUseless()) {
@@ -10924,8 +10987,11 @@ IonBuilder::getDefiniteSlot(TemporaryTypeSet* types, PropertyName* name, uint32_
}
// Definite slots will always be fixed slots when they are in the
- // allowable range for fixed slots.
+ // allowable range for fixed slots, except for objects which were
+ // converted from unboxed objects and have a smaller allocation size.
size_t nfixed = NativeObject::MAX_FIXED_SLOTS;
+ if (ObjectGroup* group = key->group()->maybeOriginalUnboxedGroup())
+ nfixed = gc::GetGCKindSlots(group->unboxedLayout().getAllocKind());
uint32_t propertySlot = property.maybeTypes()->definiteSlot();
if (slot == UINT32_MAX) {
@@ -10940,6 +11006,65 @@ IonBuilder::getDefiniteSlot(TemporaryTypeSet* types, PropertyName* name, uint32_
return slot;
}
+uint32_t
+IonBuilder::getUnboxedOffset(TemporaryTypeSet* types, PropertyName* name, JSValueType* punboxedType)
+{
+ if (!types || types->unknownObject() || !types->objectOrSentinel()) {
+ trackOptimizationOutcome(TrackedOutcome::NoTypeInfo);
+ return UINT32_MAX;
+ }
+
+ uint32_t offset = UINT32_MAX;
+
+ for (size_t i = 0; i < types->getObjectCount(); i++) {
+ TypeSet::ObjectKey* key = types->getObject(i);
+ if (!key)
+ continue;
+
+ if (key->unknownProperties()) {
+ trackOptimizationOutcome(TrackedOutcome::UnknownProperties);
+ return UINT32_MAX;
+ }
+
+ if (key->isSingleton()) {
+ trackOptimizationOutcome(TrackedOutcome::Singleton);
+ return UINT32_MAX;
+ }
+
+ UnboxedLayout* layout = key->group()->maybeUnboxedLayout();
+ if (!layout) {
+ trackOptimizationOutcome(TrackedOutcome::NotUnboxed);
+ return UINT32_MAX;
+ }
+
+ const UnboxedLayout::Property* property = layout->lookup(name);
+ if (!property) {
+ trackOptimizationOutcome(TrackedOutcome::StructNoField);
+ return UINT32_MAX;
+ }
+
+ if (layout->nativeGroup()) {
+ trackOptimizationOutcome(TrackedOutcome::UnboxedConvertedToNative);
+ return UINT32_MAX;
+ }
+
+ key->watchStateChangeForUnboxedConvertedToNative(constraints());
+
+ if (offset == UINT32_MAX) {
+ offset = property->offset;
+ *punboxedType = property->type;
+ } else if (offset != property->offset) {
+ trackOptimizationOutcome(TrackedOutcome::InconsistentFieldOffset);
+ return UINT32_MAX;
+ } else if (*punboxedType != property->type) {
+ trackOptimizationOutcome(TrackedOutcome::InconsistentFieldType);
+ return UINT32_MAX;
+ }
+ }
+
+ return offset;
+}
+
bool
IonBuilder::jsop_runonce()
{
@@ -11386,6 +11511,8 @@ IonBuilder::jsop_getprop(PropertyName* name)
}
obj = maybeUnboxForPropertyAccess(obj);
+ if (obj->type() == MIRType::Object)
+ obj = convertUnboxedObjects(obj);
BarrierKind barrier = PropertyReadNeedsTypeBarrier(analysisContext, constraints(),
obj, name, types);
@@ -11457,6 +11584,11 @@ IonBuilder::jsop_getprop(PropertyName* name)
if (!getPropTryDefiniteSlot(&emitted, obj, name, barrier, types) || emitted)
return emitted;
+ // Try to emit loads from unboxed objects.
+ trackOptimizationAttempt(TrackedStrategy::GetProp_Unboxed);
+ if (!getPropTryUnboxed(&emitted, obj, name, barrier, types) || emitted)
+ return emitted;
+
// Try to inline a common property getter, or make a call.
trackOptimizationAttempt(TrackedStrategy::GetProp_CommonGetter);
if (!getPropTryCommonGetter(&emitted, obj, name, types) || emitted)
@@ -11822,6 +11954,49 @@ IonBuilder::getPropTryComplexPropOfTypedObject(bool* emitted,
fieldPrediction, fieldTypeObj);
}
+MDefinition*
+IonBuilder::convertUnboxedObjects(MDefinition* obj)
+{
+ // If obj might be in any particular unboxed group which should be
+ // converted to a native representation, perform that conversion. This does
+ // not guarantee the object will not have such a group afterwards, if the
+ // object's possible groups are not precisely known.
+ TemporaryTypeSet* types = obj->resultTypeSet();
+ if (!types || types->unknownObject() || !types->objectOrSentinel())
+ return obj;
+
+ BaselineInspector::ObjectGroupVector list(alloc());
+ for (size_t i = 0; i < types->getObjectCount(); i++) {
+ TypeSet::ObjectKey* key = obj->resultTypeSet()->getObject(i);
+ if (!key || !key->isGroup())
+ continue;
+
+ if (UnboxedLayout* layout = key->group()->maybeUnboxedLayout()) {
+ AutoEnterOOMUnsafeRegion oomUnsafe;
+ if (layout->nativeGroup() && !list.append(key->group()))
+ oomUnsafe.crash("IonBuilder::convertUnboxedObjects");
+ }
+ }
+
+ return convertUnboxedObjects(obj, list);
+}
+
+MDefinition*
+IonBuilder::convertUnboxedObjects(MDefinition* obj,
+ const BaselineInspector::ObjectGroupVector& list)
+{
+ for (size_t i = 0; i < list.length(); i++) {
+ ObjectGroup* group = list[i];
+ if (TemporaryTypeSet* types = obj->resultTypeSet()) {
+ if (!types->hasType(TypeSet::ObjectType(group)))
+ continue;
+ }
+ obj = MConvertUnboxedObjectToNative::New(alloc(), obj, group);
+ current->add(obj->toInstruction());
+ }
+ return obj;
+}
+
bool
IonBuilder::getPropTryDefiniteSlot(bool* emitted, MDefinition* obj, PropertyName* name,
BarrierKind barrier, TemporaryTypeSet* types)
@@ -11906,14 +12081,111 @@ IonBuilder::getPropTryModuleNamespace(bool* emitted, MDefinition* obj, PropertyN
return true;
}
+MInstruction*
+IonBuilder::loadUnboxedProperty(MDefinition* obj, size_t offset, JSValueType unboxedType,
+ BarrierKind barrier, TemporaryTypeSet* types)
+{
+ // loadUnboxedValue is designed to load any value as if it were contained in
+ // an array. Thus a property offset is converted to an index, when the
+ // object is reinterpreted as an array of properties of the same size.
+ size_t index = offset / UnboxedTypeSize(unboxedType);
+ MInstruction* indexConstant = MConstant::New(alloc(), Int32Value(index));
+ current->add(indexConstant);
+
+ return loadUnboxedValue(obj, UnboxedPlainObject::offsetOfData(),
+ indexConstant, unboxedType, barrier, types);
+}
+
+MInstruction*
+IonBuilder::loadUnboxedValue(MDefinition* elements, size_t elementsOffset,
+ MDefinition* index, JSValueType unboxedType,
+ BarrierKind barrier, TemporaryTypeSet* types)
+{
+ MInstruction* load;
+ switch (unboxedType) {
+ case JSVAL_TYPE_BOOLEAN:
+ load = MLoadUnboxedScalar::New(alloc(), elements, index, Scalar::Uint8,
+ DoesNotRequireMemoryBarrier, elementsOffset);
+ load->setResultType(MIRType::Boolean);
+ break;
+
+ case JSVAL_TYPE_INT32:
+ load = MLoadUnboxedScalar::New(alloc(), elements, index, Scalar::Int32,
+ DoesNotRequireMemoryBarrier, elementsOffset);
+ load->setResultType(MIRType::Int32);
+ break;
+
+ case JSVAL_TYPE_DOUBLE:
+ load = MLoadUnboxedScalar::New(alloc(), elements, index, Scalar::Float64,
+ DoesNotRequireMemoryBarrier, elementsOffset,
+ /* canonicalizeDoubles = */ false);
+ load->setResultType(MIRType::Double);
+ break;
+
+ case JSVAL_TYPE_STRING:
+ load = MLoadUnboxedString::New(alloc(), elements, index, elementsOffset);
+ break;
+
+ case JSVAL_TYPE_OBJECT: {
+ MLoadUnboxedObjectOrNull::NullBehavior nullBehavior;
+ if (types->hasType(TypeSet::NullType()))
+ nullBehavior = MLoadUnboxedObjectOrNull::HandleNull;
+ else if (barrier != BarrierKind::NoBarrier)
+ nullBehavior = MLoadUnboxedObjectOrNull::BailOnNull;
+ else
+ nullBehavior = MLoadUnboxedObjectOrNull::NullNotPossible;
+ load = MLoadUnboxedObjectOrNull::New(alloc(), elements, index, nullBehavior,
+ elementsOffset);
+ break;
+ }
+
+ default:
+ MOZ_CRASH();
+ }
+
+ current->add(load);
+ return load;
+}
+
+bool
+IonBuilder::getPropTryUnboxed(bool* emitted, MDefinition* obj, PropertyName* name,
+ BarrierKind barrier, TemporaryTypeSet* types)
+{
+ MOZ_ASSERT(*emitted == false);
+
+ JSValueType unboxedType;
+ uint32_t offset = getUnboxedOffset(obj->resultTypeSet(), name, &unboxedType);
+ if (offset == UINT32_MAX)
+ return true;
+
+ if (obj->type() != MIRType::Object) {
+ MGuardObject* guard = MGuardObject::New(alloc(), obj);
+ current->add(guard);
+ obj = guard;
+ }
+
+ MInstruction* load = loadUnboxedProperty(obj, offset, unboxedType, barrier, types);
+ current->push(load);
+
+ if (!pushTypeBarrier(load, types, barrier))
+ return false;
+
+ trackOptimizationSuccess();
+ *emitted = true;
+ return true;
+}
+
MDefinition*
IonBuilder::addShapeGuardsForGetterSetter(MDefinition* obj, JSObject* holder, Shape* holderShape,
const BaselineInspector::ReceiverVector& receivers,
+ const BaselineInspector::ObjectGroupVector& convertUnboxedGroups,
bool isOwnProperty)
{
MOZ_ASSERT(holder);
MOZ_ASSERT(holderShape);
+ obj = convertUnboxedObjects(obj, convertUnboxedGroups);
+
if (isOwnProperty) {
MOZ_ASSERT(receivers.empty());
return addShapeGuard(obj, holderShape, Bailout_ShapeGuard);
@@ -11937,8 +12209,10 @@ IonBuilder::getPropTryCommonGetter(bool* emitted, MDefinition* obj, PropertyName
JSObject* foundProto = nullptr;
bool isOwnProperty = false;
BaselineInspector::ReceiverVector receivers(alloc());
+ BaselineInspector::ObjectGroupVector convertUnboxedGroups(alloc());
if (!inspector->commonGetPropFunction(pc, &foundProto, &lastProperty, &commonGetter,
- &globalShape, &isOwnProperty, receivers))
+ &globalShape, &isOwnProperty,
+ receivers, convertUnboxedGroups))
{
return true;
}
@@ -11954,7 +12228,8 @@ IonBuilder::getPropTryCommonGetter(bool* emitted, MDefinition* obj, PropertyName
// If type information is bad, we can still optimize the getter if we
// shape guard.
obj = addShapeGuardsForGetterSetter(obj, foundProto, lastProperty,
- receivers, isOwnProperty);
+ receivers, convertUnboxedGroups,
+ isOwnProperty);
if (!obj)
return false;
}
@@ -12122,12 +12397,15 @@ IonBuilder::getPropTryInlineAccess(bool* emitted, MDefinition* obj, PropertyName
MOZ_ASSERT(*emitted == false);
BaselineInspector::ReceiverVector receivers(alloc());
- if (!inspector->maybeInfoForPropertyOp(pc, receivers))
+ BaselineInspector::ObjectGroupVector convertUnboxedGroups(alloc());
+ if (!inspector->maybeInfoForPropertyOp(pc, receivers, convertUnboxedGroups))
return false;
if (!canInlinePropertyOpShapes(receivers))
return true;
+ obj = convertUnboxedObjects(obj, convertUnboxedGroups);
+
MIRType rvalType = types->getKnownMIRType();
if (barrier != BarrierKind::NoBarrier || IsNullOrUndefined(rvalType))
rvalType = MIRType::Value;
@@ -12150,6 +12428,45 @@ IonBuilder::getPropTryInlineAccess(bool* emitted, MDefinition* obj, PropertyName
return true;
}
+ if (receivers[0].shape) {
+ // Monomorphic load from an unboxed object expando.
+ spew("Inlining monomorphic unboxed expando GETPROP");
+
+ obj = addGroupGuard(obj, receivers[0].group, Bailout_ShapeGuard);
+ obj = addUnboxedExpandoGuard(obj, /* hasExpando = */ true, Bailout_ShapeGuard);
+
+ MInstruction* expando = MLoadUnboxedExpando::New(alloc(), obj);
+ current->add(expando);
+
+ expando = addShapeGuard(expando, receivers[0].shape, Bailout_ShapeGuard);
+
+ Shape* shape = receivers[0].shape->searchLinear(NameToId(name));
+ MOZ_ASSERT(shape);
+
+ if (!loadSlot(expando, shape, rvalType, barrier, types))
+ return false;
+
+ trackOptimizationOutcome(TrackedOutcome::Monomorphic);
+ *emitted = true;
+ return true;
+ }
+
+ // Monomorphic load from an unboxed object.
+ ObjectGroup* group = receivers[0].group;
+ if (obj->resultTypeSet() && !obj->resultTypeSet()->hasType(TypeSet::ObjectType(group)))
+ return true;
+
+ obj = addGroupGuard(obj, group, Bailout_ShapeGuard);
+
+ const UnboxedLayout::Property* property = group->unboxedLayout().lookup(name);
+ MInstruction* load = loadUnboxedProperty(obj, property->offset, property->type, barrier, types);
+ current->push(load);
+
+ if (!pushTypeBarrier(load, types, barrier))
+ return false;
+
+ trackOptimizationOutcome(TrackedOutcome::Monomorphic);
+ *emitted = true;
return true;
}
@@ -12391,7 +12708,7 @@ bool
IonBuilder::jsop_setprop(PropertyName* name)
{
MDefinition* value = current->pop();
- MDefinition* obj = current->pop();
+ MDefinition* obj = convertUnboxedObjects(current->pop());
bool emitted = false;
startTrackingOptimizations();
@@ -12424,6 +12741,13 @@ IonBuilder::jsop_setprop(PropertyName* name)
bool barrier = PropertyWriteNeedsTypeBarrier(alloc(), constraints(), current, &obj, name, &value,
/* canModify = */ true);
+ if (!forceInlineCaches()) {
+ // Try to emit stores to unboxed objects.
+ trackOptimizationAttempt(TrackedStrategy::SetProp_Unboxed);
+ if (!setPropTryUnboxed(&emitted, obj, name, value, barrier, objTypes) || emitted)
+ return emitted;
+ }
+
// Add post barrier if needed. The instructions above manage any post
// barriers they need directly.
if (NeedsPostBarrier(value))
@@ -12457,8 +12781,10 @@ IonBuilder::setPropTryCommonSetter(bool* emitted, MDefinition* obj,
JSObject* foundProto = nullptr;
bool isOwnProperty;
BaselineInspector::ReceiverVector receivers(alloc());
+ BaselineInspector::ObjectGroupVector convertUnboxedGroups(alloc());
if (!inspector->commonSetPropFunction(pc, &foundProto, &lastProperty, &commonSetter,
- &isOwnProperty, receivers))
+ &isOwnProperty,
+ receivers, convertUnboxedGroups))
{
trackOptimizationOutcome(TrackedOutcome::NoProtoFound);
return true;
@@ -12473,7 +12799,8 @@ IonBuilder::setPropTryCommonSetter(bool* emitted, MDefinition* obj,
// If type information is bad, we can still optimize the setter if we
// shape guard.
obj = addShapeGuardsForGetterSetter(obj, foundProto, lastProperty,
- receivers, isOwnProperty);
+ receivers, convertUnboxedGroups,
+ isOwnProperty);
if (!obj)
return false;
}
@@ -12729,6 +13056,100 @@ IonBuilder::setPropTryDefiniteSlot(bool* emitted, MDefinition* obj,
return true;
}
+MInstruction*
+IonBuilder::storeUnboxedProperty(MDefinition* obj, size_t offset, JSValueType unboxedType,
+ MDefinition* value)
+{
+ size_t scaledOffsetConstant = offset / UnboxedTypeSize(unboxedType);
+ MInstruction* scaledOffset = MConstant::New(alloc(), Int32Value(scaledOffsetConstant));
+ current->add(scaledOffset);
+
+ return storeUnboxedValue(obj, obj, UnboxedPlainObject::offsetOfData(),
+ scaledOffset, unboxedType, value);
+}
+
+MInstruction*
+IonBuilder::storeUnboxedValue(MDefinition* obj, MDefinition* elements, int32_t elementsOffset,
+ MDefinition* scaledOffset, JSValueType unboxedType,
+ MDefinition* value, bool preBarrier /* = true */)
+{
+ MInstruction* store;
+ switch (unboxedType) {
+ case JSVAL_TYPE_BOOLEAN:
+ store = MStoreUnboxedScalar::New(alloc(), elements, scaledOffset, value, Scalar::Uint8,
+ MStoreUnboxedScalar::DontTruncateInput,
+ DoesNotRequireMemoryBarrier, elementsOffset);
+ break;
+
+ case JSVAL_TYPE_INT32:
+ store = MStoreUnboxedScalar::New(alloc(), elements, scaledOffset, value, Scalar::Int32,
+ MStoreUnboxedScalar::DontTruncateInput,
+ DoesNotRequireMemoryBarrier, elementsOffset);
+ break;
+
+ case JSVAL_TYPE_DOUBLE:
+ store = MStoreUnboxedScalar::New(alloc(), elements, scaledOffset, value, Scalar::Float64,
+ MStoreUnboxedScalar::DontTruncateInput,
+ DoesNotRequireMemoryBarrier, elementsOffset);
+ break;
+
+ case JSVAL_TYPE_STRING:
+ store = MStoreUnboxedString::New(alloc(), elements, scaledOffset, value,
+ elementsOffset, preBarrier);
+ break;
+
+ case JSVAL_TYPE_OBJECT:
+ MOZ_ASSERT(value->type() == MIRType::Object ||
+ value->type() == MIRType::Null ||
+ value->type() == MIRType::Value);
+ MOZ_ASSERT(!value->mightBeType(MIRType::Undefined),
+ "MToObjectOrNull slow path is invalid for unboxed objects");
+ store = MStoreUnboxedObjectOrNull::New(alloc(), elements, scaledOffset, value, obj,
+ elementsOffset, preBarrier);
+ break;
+
+ default:
+ MOZ_CRASH();
+ }
+
+ current->add(store);
+ return store;
+}
+
+bool
+IonBuilder::setPropTryUnboxed(bool* emitted, MDefinition* obj,
+ PropertyName* name, MDefinition* value,
+ bool barrier, TemporaryTypeSet* objTypes)
+{
+ MOZ_ASSERT(*emitted == false);
+
+ if (barrier) {
+ trackOptimizationOutcome(TrackedOutcome::NeedsTypeBarrier);
+ return true;
+ }
+
+ JSValueType unboxedType;
+ uint32_t offset = getUnboxedOffset(obj->resultTypeSet(), name, &unboxedType);
+ if (offset == UINT32_MAX)
+ return true;
+
+ if (obj->type() != MIRType::Object) {
+ MGuardObject* guard = MGuardObject::New(alloc(), obj);
+ current->add(guard);
+ obj = guard;
+ }
+
+ MInstruction* store = storeUnboxedProperty(obj, offset, unboxedType, value);
+
+ current->push(value);
+
+ if (!resumeAfter(store))
+ return false;
+
+ *emitted = true;
+ return true;
+}
+
bool
IonBuilder::setPropTryInlineAccess(bool* emitted, MDefinition* obj,
PropertyName* name, MDefinition* value,
@@ -12742,12 +13163,15 @@ IonBuilder::setPropTryInlineAccess(bool* emitted, MDefinition* obj,
}
BaselineInspector::ReceiverVector receivers(alloc());
- if (!inspector->maybeInfoForPropertyOp(pc, receivers))
+ BaselineInspector::ObjectGroupVector convertUnboxedGroups(alloc());
+ if (!inspector->maybeInfoForPropertyOp(pc, receivers, convertUnboxedGroups))
return false;
if (!canInlinePropertyOpShapes(receivers))
return true;
+ obj = convertUnboxedObjects(obj, convertUnboxedGroups);
+
if (receivers.length() == 1) {
if (!receivers[0].group) {
// Monomorphic store to a native object.
@@ -12767,6 +13191,46 @@ IonBuilder::setPropTryInlineAccess(bool* emitted, MDefinition* obj,
return true;
}
+ if (receivers[0].shape) {
+ // Monomorphic store to an unboxed object expando.
+ spew("Inlining monomorphic unboxed expando SETPROP");
+
+ obj = addGroupGuard(obj, receivers[0].group, Bailout_ShapeGuard);
+ obj = addUnboxedExpandoGuard(obj, /* hasExpando = */ true, Bailout_ShapeGuard);
+
+ MInstruction* expando = MLoadUnboxedExpando::New(alloc(), obj);
+ current->add(expando);
+
+ expando = addShapeGuard(expando, receivers[0].shape, Bailout_ShapeGuard);
+
+ Shape* shape = receivers[0].shape->searchLinear(NameToId(name));
+ MOZ_ASSERT(shape);
+
+ bool needsBarrier = objTypes->propertyNeedsBarrier(constraints(), NameToId(name));
+ if (!storeSlot(expando, shape, value, needsBarrier))
+ return false;
+
+ trackOptimizationOutcome(TrackedOutcome::Monomorphic);
+ *emitted = true;
+ return true;
+ }
+
+ // Monomorphic store to an unboxed object.
+ spew("Inlining monomorphic unboxed SETPROP");
+
+ ObjectGroup* group = receivers[0].group;
+ if (!objTypes->hasType(TypeSet::ObjectType(group)))
+ return true;
+
+ obj = addGroupGuard(obj, group, Bailout_ShapeGuard);
+
+ const UnboxedLayout::Property* property = group->unboxedLayout().lookup(name);
+ storeUnboxedProperty(obj, property->offset, property->type, value);
+
+ current->push(value);
+
+ trackOptimizationOutcome(TrackedOutcome::Monomorphic);
+ *emitted = true;
return true;
}
@@ -13465,7 +13929,7 @@ IonBuilder::jsop_setaliasedvar(EnvironmentCoordinate ec)
bool
IonBuilder::jsop_in()
{
- MDefinition* obj = current->pop();
+ MDefinition* obj = convertUnboxedObjects(current->pop());
MDefinition* id = current->pop();
bool emitted = false;
@@ -13492,8 +13956,11 @@ IonBuilder::inTryDense(bool* emitted, MDefinition* obj, MDefinition* id)
if (shouldAbortOnPreliminaryGroups(obj))
return true;
- if (!ElementAccessIsDenseNative(constraints(), obj, id))
- return true;
+ JSValueType unboxedType = UnboxedArrayElementType(constraints(), obj, id);
+ if (unboxedType == JSVAL_TYPE_MAGIC) {
+ if (!ElementAccessIsDenseNative(constraints(), obj, id))
+ return true;
+ }
if (ElementAccessHasExtraIndexedProperty(this, obj))
return true;
@@ -13508,10 +13975,10 @@ IonBuilder::inTryDense(bool* emitted, MDefinition* obj, MDefinition* id)
id = idInt32;
// Get the elements vector.
- MElements* elements = MElements::New(alloc(), obj);
+ MElements* elements = MElements::New(alloc(), obj, unboxedType != JSVAL_TYPE_MAGIC);
current->add(elements);
- MInstruction* initLength = initializedLength(obj, elements);
+ MInstruction* initLength = initializedLength(obj, elements, unboxedType);
// If there are no holes, speculate the InArray check will not fail.
if (!needsHoleCheck && !failedBoundsCheck_) {
@@ -13521,7 +13988,8 @@ IonBuilder::inTryDense(bool* emitted, MDefinition* obj, MDefinition* id)
}
// Check if id < initLength and elem[id] not a hole.
- MInArray* ins = MInArray::New(alloc(), elements, id, initLength, obj, needsHoleCheck);
+ MInArray* ins = MInArray::New(alloc(), elements, id, initLength, obj, needsHoleCheck,
+ unboxedType);
current->add(ins);
current->push(ins);
@@ -13818,6 +14286,19 @@ IonBuilder::addGroupGuard(MDefinition* obj, ObjectGroup* group, BailoutKind bail
}
MInstruction*
+IonBuilder::addUnboxedExpandoGuard(MDefinition* obj, bool hasExpando, BailoutKind bailoutKind)
+{
+ MGuardUnboxedExpando* guard = MGuardUnboxedExpando::New(alloc(), obj, hasExpando, bailoutKind);
+ current->add(guard);
+
+ // If a shape guard failed in the past, don't optimize group guards.
+ if (failedShapeGuard_)
+ guard->setNotMovable();
+
+ return guard;
+}
+
+MInstruction*
IonBuilder::addGuardReceiverPolymorphic(MDefinition* obj,
const BaselineInspector::ReceiverVector& receivers)
{
@@ -13826,6 +14307,15 @@ IonBuilder::addGuardReceiverPolymorphic(MDefinition* obj,
// Monomorphic guard on a native object.
return addShapeGuard(obj, receivers[0].shape, Bailout_ShapeGuard);
}
+
+ if (!receivers[0].shape) {
+ // Guard on an unboxed object that does not have an expando.
+ obj = addGroupGuard(obj, receivers[0].group, Bailout_ShapeGuard);
+ return addUnboxedExpandoGuard(obj, /* hasExpando = */ false, Bailout_ShapeGuard);
+ }
+
+ // Monomorphic receiver guards are not yet supported when the receiver
+ // is an unboxed object with an expando.
}
MGuardReceiverPolymorphic* guard = MGuardReceiverPolymorphic::New(alloc(), obj);
@@ -14199,24 +14689,32 @@ IonBuilder::constantInt(int32_t i)
}
MInstruction*
-IonBuilder::initializedLength(MDefinition* obj, MDefinition* elements)
+IonBuilder::initializedLength(MDefinition* obj, MDefinition* elements, JSValueType unboxedType)
{
- MInstruction* res = MInitializedLength::New(alloc(), elements);
+ MInstruction* res;
+ if (unboxedType != JSVAL_TYPE_MAGIC)
+ res = MUnboxedArrayInitializedLength::New(alloc(), obj);
+ else
+ res = MInitializedLength::New(alloc(), elements);
current->add(res);
return res;
}
MInstruction*
-IonBuilder::setInitializedLength(MDefinition* obj, size_t count)
+IonBuilder::setInitializedLength(MDefinition* obj, JSValueType unboxedType, size_t count)
{
MOZ_ASSERT(count);
- // MSetInitializedLength takes the index of the last element, rather
- // than the count itself.
- MInstruction* elements = MElements::New(alloc(), obj, /* unboxed = */ false);
- current->add(elements);
- MInstruction* res =
- MSetInitializedLength::New(alloc(), elements, constant(Int32Value(count - 1)));
+ MInstruction* res;
+ if (unboxedType != JSVAL_TYPE_MAGIC) {
+ res = MSetUnboxedArrayInitializedLength::New(alloc(), obj, constant(Int32Value(count)));
+ } else {
+ // MSetInitializedLength takes the index of the last element, rather
+ // than the count itself.
+ MInstruction* elements = MElements::New(alloc(), obj, /* unboxed = */ false);
+ current->add(elements);
+ res = MSetInitializedLength::New(alloc(), elements, constant(Int32Value(count - 1)));
+ }
current->add(res);
return res;
}
diff --git a/js/src/jit/IonBuilder.h b/js/src/jit/IonBuilder.h
index 6a3b61232f..f359c764f7 100644
--- a/js/src/jit/IonBuilder.h
+++ b/js/src/jit/IonBuilder.h
@@ -346,8 +346,9 @@ class IonBuilder
MConstant* constant(const Value& v);
MConstant* constantInt(int32_t i);
- MInstruction* initializedLength(MDefinition* obj, MDefinition* elements);
- MInstruction* setInitializedLength(MDefinition* obj, size_t count);
+ MInstruction* initializedLength(MDefinition* obj, MDefinition* elements,
+ JSValueType unboxedType);
+ MInstruction* setInitializedLength(MDefinition* obj, JSValueType unboxedType, size_t count);
// Improve the type information at tests
MOZ_MUST_USE bool improveTypesAtTest(MDefinition* ins, bool trueBranch, MTest* test);
@@ -400,6 +401,7 @@ class IonBuilder
MInstruction* addBoundsCheck(MDefinition* index, MDefinition* length);
MInstruction* addShapeGuard(MDefinition* obj, Shape* const shape, BailoutKind bailoutKind);
MInstruction* addGroupGuard(MDefinition* obj, ObjectGroup* group, BailoutKind bailoutKind);
+ MInstruction* addUnboxedExpandoGuard(MDefinition* obj, bool hasExpando, BailoutKind bailoutKind);
MInstruction* addSharedTypedArrayGuard(MDefinition* obj);
MInstruction*
@@ -439,6 +441,8 @@ class IonBuilder
BarrierKind barrier, TemporaryTypeSet* types);
MOZ_MUST_USE bool getPropTryModuleNamespace(bool* emitted, MDefinition* obj, PropertyName* name,
BarrierKind barrier, TemporaryTypeSet* types);
+ MOZ_MUST_USE bool getPropTryUnboxed(bool* emitted, MDefinition* obj, PropertyName* name,
+ BarrierKind barrier, TemporaryTypeSet* types);
MOZ_MUST_USE bool getPropTryCommonGetter(bool* emitted, MDefinition* obj, PropertyName* name,
TemporaryTypeSet* types);
MOZ_MUST_USE bool getPropTryInlineAccess(bool* emitted, MDefinition* obj, PropertyName* name,
@@ -471,6 +475,9 @@ class IonBuilder
MOZ_MUST_USE bool setPropTryDefiniteSlot(bool* emitted, MDefinition* obj,
PropertyName* name, MDefinition* value,
bool barrier, TemporaryTypeSet* objTypes);
+ MOZ_MUST_USE bool setPropTryUnboxed(bool* emitted, MDefinition* obj,
+ PropertyName* name, MDefinition* value,
+ bool barrier, TemporaryTypeSet* objTypes);
MOZ_MUST_USE bool setPropTryInlineAccess(bool* emitted, MDefinition* obj,
PropertyName* name, MDefinition* value,
bool barrier, TemporaryTypeSet* objTypes);
@@ -610,6 +617,7 @@ class IonBuilder
TypedObjectPrediction elemTypeReprs,
uint32_t elemSize);
MOZ_MUST_USE bool initializeArrayElement(MDefinition* obj, size_t index, MDefinition* value,
+ JSValueType unboxedType,
bool addResumePointAndIncrementInitializedLength);
// jsop_getelem() helpers.
@@ -722,13 +730,15 @@ class IonBuilder
MOZ_MUST_USE bool jsop_bindname(PropertyName* name);
MOZ_MUST_USE bool jsop_bindvar();
MOZ_MUST_USE bool jsop_getelem();
- MOZ_MUST_USE bool jsop_getelem_dense(MDefinition* obj, MDefinition* index);
+ MOZ_MUST_USE bool jsop_getelem_dense(MDefinition* obj, MDefinition* index,
+ JSValueType unboxedType);
MOZ_MUST_USE bool jsop_getelem_typed(MDefinition* obj, MDefinition* index,
ScalarTypeDescr::Type arrayType);
MOZ_MUST_USE bool jsop_setelem();
MOZ_MUST_USE bool jsop_setelem_dense(TemporaryTypeSet::DoubleConversion conversion,
MDefinition* object, MDefinition* index,
- MDefinition* value, bool writeHole, bool* emitted);
+ MDefinition* value, JSValueType unboxedType,
+ bool writeHole, bool* emitted);
MOZ_MUST_USE bool jsop_setelem_typed(ScalarTypeDescr::Type arrayType,
MDefinition* object, MDefinition* index,
MDefinition* value);
@@ -1033,6 +1043,7 @@ class IonBuilder
MDefinition*
addShapeGuardsForGetterSetter(MDefinition* obj, JSObject* holder, Shape* holderShape,
const BaselineInspector::ReceiverVector& receivers,
+ const BaselineInspector::ObjectGroupVector& convertUnboxedGroups,
bool isOwnProperty);
MOZ_MUST_USE bool annotateGetPropertyCache(MDefinition* obj, PropertyName* name,
@@ -1050,6 +1061,22 @@ class IonBuilder
ResultWithOOM<bool> testNotDefinedProperty(MDefinition* obj, jsid id);
uint32_t getDefiniteSlot(TemporaryTypeSet* types, PropertyName* name, uint32_t* pnfixed);
+ MDefinition* convertUnboxedObjects(MDefinition* obj);
+ MDefinition* convertUnboxedObjects(MDefinition* obj,
+ const BaselineInspector::ObjectGroupVector& list);
+ uint32_t getUnboxedOffset(TemporaryTypeSet* types, PropertyName* name,
+ JSValueType* punboxedType);
+ MInstruction* loadUnboxedProperty(MDefinition* obj, size_t offset, JSValueType unboxedType,
+ BarrierKind barrier, TemporaryTypeSet* types);
+ MInstruction* loadUnboxedValue(MDefinition* elements, size_t elementsOffset,
+ MDefinition* scaledOffset, JSValueType unboxedType,
+ BarrierKind barrier, TemporaryTypeSet* types);
+ MInstruction* storeUnboxedProperty(MDefinition* obj, size_t offset, JSValueType unboxedType,
+ MDefinition* value);
+ MInstruction* storeUnboxedValue(MDefinition* obj,
+ MDefinition* elements, int32_t elementsOffset,
+ MDefinition* scaledOffset, JSValueType unboxedType,
+ MDefinition* value, bool preBarrier = true);
MOZ_MUST_USE bool checkPreliminaryGroups(MDefinition *obj);
MOZ_MUST_USE bool freezePropTypeSets(TemporaryTypeSet* types,
JSObject* foundProto, PropertyName* name);
diff --git a/js/src/jit/IonCaches.cpp b/js/src/jit/IonCaches.cpp
index fb42911886..c2dc573738 100644
--- a/js/src/jit/IonCaches.cpp
+++ b/js/src/jit/IonCaches.cpp
@@ -31,6 +31,7 @@
#include "jit/shared/Lowering-shared-inl.h"
#include "vm/Interpreter-inl.h"
#include "vm/Shape-inl.h"
+#include "vm/UnboxedObject-inl.h"
using namespace js;
using namespace js::jit;
@@ -619,7 +620,29 @@ TestMatchingReceiver(MacroAssembler& masm, IonCache::StubAttacher& attacher,
Register object, JSObject* obj, Label* failure,
bool alwaysCheckGroup = false)
{
- if (obj->is<TypedObject>()) {
+ if (obj->is<UnboxedPlainObject>()) {
+ MOZ_ASSERT(failure);
+
+ masm.branchTestObjGroup(Assembler::NotEqual, object, obj->group(), failure);
+ Address expandoAddress(object, UnboxedPlainObject::offsetOfExpando());
+ if (UnboxedExpandoObject* expando = obj->as<UnboxedPlainObject>().maybeExpando()) {
+ masm.branchPtr(Assembler::Equal, expandoAddress, ImmWord(0), failure);
+ Label success;
+ masm.push(object);
+ masm.loadPtr(expandoAddress, object);
+ masm.branchTestObjShape(Assembler::Equal, object, expando->lastProperty(),
+ &success);
+ masm.pop(object);
+ masm.jump(failure);
+ masm.bind(&success);
+ masm.pop(object);
+ } else {
+ masm.branchPtr(Assembler::NotEqual, expandoAddress, ImmWord(0), failure);
+ }
+ } else if (obj->is<UnboxedArrayObject>()) {
+ MOZ_ASSERT(failure);
+ masm.branchTestObjGroup(Assembler::NotEqual, object, obj->group(), failure);
+ } else if (obj->is<TypedObject>()) {
attacher.branchNextStubOrLabel(masm, Assembler::NotEqual,
Address(object, JSObject::offsetOfGroup()),
ImmGCPtr(obj->group()), failure);
@@ -736,6 +759,7 @@ GenerateReadSlot(JSContext* cx, IonScript* ion, MacroAssembler& masm,
// jump directly. Otherwise, jump to the end of the stub, so there's a
// common point to patch.
bool multipleFailureJumps = (obj != holder)
+ || obj->is<UnboxedPlainObject>()
|| (checkTDZ && output.hasValue())
|| (failures != nullptr && failures->used());
@@ -754,6 +778,7 @@ GenerateReadSlot(JSContext* cx, IonScript* ion, MacroAssembler& masm,
Register scratchReg = Register::FromCode(0); // Quell compiler warning.
if (obj != holder ||
+ obj->is<UnboxedPlainObject>() ||
!holder->as<NativeObject>().isFixedSlot(shape->slot()))
{
if (output.hasValue()) {
@@ -814,6 +839,10 @@ GenerateReadSlot(JSContext* cx, IonScript* ion, MacroAssembler& masm,
holderReg = InvalidReg;
}
+ } else if (obj->is<UnboxedPlainObject>()) {
+ holder = obj->as<UnboxedPlainObject>().maybeExpando();
+ holderReg = scratchReg;
+ masm.loadPtr(Address(object, UnboxedPlainObject::offsetOfExpando()), holderReg);
} else {
holderReg = object;
}
@@ -841,6 +870,30 @@ GenerateReadSlot(JSContext* cx, IonScript* ion, MacroAssembler& masm,
attacher.jumpNextStub(masm);
}
+static void
+GenerateReadUnboxed(JSContext* cx, IonScript* ion, MacroAssembler& masm,
+ IonCache::StubAttacher& attacher, JSObject* obj,
+ const UnboxedLayout::Property* property,
+ Register object, TypedOrValueRegister output,
+ Label* failures = nullptr)
+{
+ // Guard on the group of the object.
+ attacher.branchNextStubOrLabel(masm, Assembler::NotEqual,
+ Address(object, JSObject::offsetOfGroup()),
+ ImmGCPtr(obj->group()), failures);
+
+ Address address(object, UnboxedPlainObject::offsetOfData() + property->offset);
+
+ masm.loadUnboxedProperty(address, property->type, output);
+
+ attacher.jumpRejoin(masm);
+
+ if (failures) {
+ masm.bind(failures);
+ attacher.jumpNextStub(masm);
+ }
+}
+
static bool
EmitGetterCall(JSContext* cx, MacroAssembler& masm,
IonCache::StubAttacher& attacher, JSObject* obj,
@@ -1135,6 +1188,39 @@ GenerateArrayLength(JSContext* cx, MacroAssembler& masm, IonCache::StubAttacher&
return true;
}
+static void
+GenerateUnboxedArrayLength(JSContext* cx, MacroAssembler& masm, IonCache::StubAttacher& attacher,
+ JSObject* array, Register object, TypedOrValueRegister output,
+ Label* failures)
+{
+ Register outReg;
+ if (output.hasValue()) {
+ outReg = output.valueReg().scratchReg();
+ } else {
+ MOZ_ASSERT(output.type() == MIRType::Int32);
+ outReg = output.typedReg().gpr();
+ }
+ MOZ_ASSERT(object != outReg);
+
+ TestMatchingReceiver(masm, attacher, object, array, failures);
+
+ // Load length.
+ masm.load32(Address(object, UnboxedArrayObject::offsetOfLength()), outReg);
+
+ // Check for a length that fits in an int32.
+ masm.branchTest32(Assembler::Signed, outReg, outReg, failures);
+
+ if (output.hasValue())
+ masm.tagValue(JSVAL_TYPE_INT32, outReg, output.valueReg());
+
+ // Success.
+ attacher.jumpRejoin(masm);
+
+ // Failure.
+ masm.bind(failures);
+ attacher.jumpNextStub(masm);
+}
+
// In this case, the code for TypedArray and SharedTypedArray is not the same,
// because the code embeds pointers to the respective class arrays. Code that
// caches the stub code must distinguish between the two cases.
@@ -1448,6 +1534,101 @@ GetPropertyIC::tryAttachNative(JSContext* cx, HandleScript outerScript, IonScrip
}
bool
+GetPropertyIC::tryAttachUnboxed(JSContext* cx, HandleScript outerScript, IonScript* ion,
+ HandleObject obj, HandleId id, void* returnAddr, bool* emitted)
+{
+ MOZ_ASSERT(canAttachStub());
+ MOZ_ASSERT(!*emitted);
+ MOZ_ASSERT(outerScript->ionScript() == ion);
+
+ if (!obj->is<UnboxedPlainObject>())
+ return true;
+ const UnboxedLayout::Property* property = obj->as<UnboxedPlainObject>().layout().lookup(id);
+ if (!property)
+ return true;
+
+ *emitted = true;
+
+ MacroAssembler masm(cx, ion, outerScript, profilerLeavePc_);
+
+ Label failures;
+ emitIdGuard(masm, id, &failures);
+ Label* maybeFailures = failures.used() ? &failures : nullptr;
+
+ StubAttacher attacher(*this);
+ GenerateReadUnboxed(cx, ion, masm, attacher, obj, property, object(), output(), maybeFailures);
+ return linkAndAttachStub(cx, masm, attacher, ion, "read unboxed",
+ JS::TrackedOutcome::ICGetPropStub_UnboxedRead);
+}
+
+bool
+GetPropertyIC::tryAttachUnboxedExpando(JSContext* cx, HandleScript outerScript, IonScript* ion,
+ HandleObject obj, HandleId id, void* returnAddr, bool* emitted)
+{
+ MOZ_ASSERT(canAttachStub());
+ MOZ_ASSERT(!*emitted);
+ MOZ_ASSERT(outerScript->ionScript() == ion);
+
+ if (!obj->is<UnboxedPlainObject>())
+ return true;
+ Rooted<UnboxedExpandoObject*> expando(cx, obj->as<UnboxedPlainObject>().maybeExpando());
+ if (!expando)
+ return true;
+
+ Shape* shape = expando->lookup(cx, id);
+ if (!shape || !shape->hasDefaultGetter() || !shape->hasSlot())
+ return true;
+
+ *emitted = true;
+
+ MacroAssembler masm(cx, ion, outerScript, profilerLeavePc_);
+
+ Label failures;
+ emitIdGuard(masm, id, &failures);
+ Label* maybeFailures = failures.used() ? &failures : nullptr;
+
+ StubAttacher attacher(*this);
+ GenerateReadSlot(cx, ion, masm, attacher, DontCheckTDZ, obj, obj,
+ shape, object(), output(), maybeFailures);
+ return linkAndAttachStub(cx, masm, attacher, ion, "read unboxed expando",
+ JS::TrackedOutcome::ICGetPropStub_UnboxedReadExpando);
+}
+
+bool
+GetPropertyIC::tryAttachUnboxedArrayLength(JSContext* cx, HandleScript outerScript, IonScript* ion,
+ HandleObject obj, HandleId id, void* returnAddr,
+ bool* emitted)
+{
+ MOZ_ASSERT(canAttachStub());
+ MOZ_ASSERT(!*emitted);
+ MOZ_ASSERT(outerScript->ionScript() == ion);
+
+ if (!obj->is<UnboxedArrayObject>())
+ return true;
+
+ if (!JSID_IS_ATOM(id, cx->names().length))
+ return true;
+
+ if (obj->as<UnboxedArrayObject>().length() > INT32_MAX)
+ return true;
+
+ if (!allowArrayLength(cx))
+ return true;
+
+ *emitted = true;
+
+ MacroAssembler masm(cx, ion, outerScript, profilerLeavePc_);
+
+ Label failures;
+ emitIdGuard(masm, id, &failures);
+
+ StubAttacher attacher(*this);
+ GenerateUnboxedArrayLength(cx, masm, attacher, obj, object(), output(), &failures);
+ return linkAndAttachStub(cx, masm, attacher, ion, "unboxed array length",
+ JS::TrackedOutcome::ICGetPropStub_UnboxedArrayLength);
+}
+
+bool
GetPropertyIC::tryAttachTypedArrayLength(JSContext* cx, HandleScript outerScript, IonScript* ion,
HandleObject obj, HandleId id, bool* emitted)
{
@@ -2016,6 +2197,15 @@ GetPropertyIC::tryAttachStub(JSContext* cx, HandleScript outerScript, IonScript*
if (!*emitted && !tryAttachNative(cx, outerScript, ion, obj, id, returnAddr, emitted))
return false;
+ if (!*emitted && !tryAttachUnboxed(cx, outerScript, ion, obj, id, returnAddr, emitted))
+ return false;
+
+ if (!*emitted && !tryAttachUnboxedExpando(cx, outerScript, ion, obj, id, returnAddr, emitted))
+ return false;
+
+ if (!*emitted && !tryAttachUnboxedArrayLength(cx, outerScript, ion, obj, id, returnAddr, emitted))
+ return false;
+
if (!*emitted && !tryAttachTypedArrayLength(cx, outerScript, ion, obj, id, emitted))
return false;
}
@@ -2194,6 +2384,12 @@ GenerateSetSlot(JSContext* cx, MacroAssembler& masm, IonCache::StubAttacher& att
NativeObject::slotsSizeMustNotOverflow();
+ if (obj->is<UnboxedPlainObject>()) {
+ obj = obj->as<UnboxedPlainObject>().maybeExpando();
+ masm.loadPtr(Address(object, UnboxedPlainObject::offsetOfExpando()), tempReg);
+ object = tempReg;
+ }
+
if (obj->as<NativeObject>().isFixedSlot(shape->slot())) {
Address addr(object, NativeObject::getFixedSlotOffset(shape->slot()));
@@ -2831,13 +3027,23 @@ GenerateAddSlot(JSContext* cx, MacroAssembler& masm, IonCache::StubAttacher& att
masm.branchTestObjGroup(Assembler::NotEqual, object, oldGroup, failures);
if (obj->maybeShape()) {
masm.branchTestObjShape(Assembler::NotEqual, object, oldShape, failures);
+ } else {
+ MOZ_ASSERT(obj->is<UnboxedPlainObject>());
+
+ Address expandoAddress(object, UnboxedPlainObject::offsetOfExpando());
+ masm.branchPtr(Assembler::Equal, expandoAddress, ImmWord(0), failures);
+
+ masm.loadPtr(expandoAddress, tempReg);
+ masm.branchTestObjShape(Assembler::NotEqual, tempReg, oldShape, failures);
}
Shape* newShape = obj->maybeShape();
+ if (!newShape)
+ newShape = obj->as<UnboxedPlainObject>().maybeExpando()->lastProperty();
// Guard that the incoming value is in the type set for the property
// if a type barrier is required.
- if (newShape && checkTypeset)
+ if (checkTypeset)
CheckTypeSetForWrite(masm, obj, newShape->propid(), tempReg, value, failures);
// Guard shapes along prototype chain.
@@ -2858,7 +3064,9 @@ GenerateAddSlot(JSContext* cx, MacroAssembler& masm, IonCache::StubAttacher& att
}
// Call a stub to (re)allocate dynamic slots, if necessary.
- uint32_t newNumDynamicSlots = obj->as<NativeObject>().numDynamicSlots();
+ uint32_t newNumDynamicSlots = obj->is<UnboxedPlainObject>()
+ ? obj->as<UnboxedPlainObject>().maybeExpando()->numDynamicSlots()
+ : obj->as<NativeObject>().numDynamicSlots();
if (NativeObject::dynamicSlotsCount(oldShape) != newNumDynamicSlots) {
AllocatableRegisterSet regs(RegisterSet::Volatile());
LiveRegisterSet save(regs.asLiveSet());
@@ -2869,6 +3077,12 @@ GenerateAddSlot(JSContext* cx, MacroAssembler& masm, IonCache::StubAttacher& att
Register temp1 = regs.takeAnyGeneral();
Register temp2 = regs.takeAnyGeneral();
+ if (obj->is<UnboxedPlainObject>()) {
+ // Pass the expando object to the stub.
+ masm.Push(object);
+ masm.loadPtr(Address(object, UnboxedPlainObject::offsetOfExpando()), object);
+ }
+
masm.setupUnalignedABICall(temp1);
masm.loadJSContext(temp1);
masm.passABIArg(temp1);
@@ -2885,16 +3099,27 @@ GenerateAddSlot(JSContext* cx, MacroAssembler& masm, IonCache::StubAttacher& att
masm.jump(&allocDone);
masm.bind(&allocFailed);
+ if (obj->is<UnboxedPlainObject>())
+ masm.Pop(object);
masm.PopRegsInMask(save);
masm.jump(failures);
masm.bind(&allocDone);
masm.setFramePushed(framePushedAfterCall);
+ if (obj->is<UnboxedPlainObject>())
+ masm.Pop(object);
masm.PopRegsInMask(save);
}
bool popObject = false;
+ if (obj->is<UnboxedPlainObject>()) {
+ masm.push(object);
+ popObject = true;
+ obj = obj->as<UnboxedPlainObject>().maybeExpando();
+ masm.loadPtr(Address(object, UnboxedPlainObject::offsetOfExpando()), object);
+ }
+
// Write the object or expando object's new shape.
Address shapeAddr(object, ShapedObject::offsetOfShape());
if (cx->zone()->needsIncrementalBarrier())
@@ -2902,6 +3127,8 @@ GenerateAddSlot(JSContext* cx, MacroAssembler& masm, IonCache::StubAttacher& att
masm.storePtr(ImmGCPtr(newShape), shapeAddr);
if (oldGroup != obj->group()) {
+ MOZ_ASSERT(!obj->is<UnboxedPlainObject>());
+
// Changing object's group from a partially to fully initialized group,
// per the acquired properties analysis. Only change the group if the
// old group still has a newScript.
@@ -3144,6 +3371,141 @@ CanAttachNativeSetProp(JSContext* cx, HandleObject obj, HandleId id, const Const
return SetPropertyIC::CanAttachNone;
}
+static void
+GenerateSetUnboxed(JSContext* cx, MacroAssembler& masm, IonCache::StubAttacher& attacher,
+ JSObject* obj, jsid id, uint32_t unboxedOffset, JSValueType unboxedType,
+ Register object, Register tempReg, const ConstantOrRegister& value,
+ bool checkTypeset, Label* failures)
+{
+ // Guard on the type of the object.
+ masm.branchPtr(Assembler::NotEqual,
+ Address(object, JSObject::offsetOfGroup()),
+ ImmGCPtr(obj->group()), failures);
+
+ if (checkTypeset)
+ CheckTypeSetForWrite(masm, obj, id, tempReg, value, failures);
+
+ Address address(object, UnboxedPlainObject::offsetOfData() + unboxedOffset);
+
+ if (cx->zone()->needsIncrementalBarrier()) {
+ if (unboxedType == JSVAL_TYPE_OBJECT)
+ masm.callPreBarrier(address, MIRType::Object);
+ else if (unboxedType == JSVAL_TYPE_STRING)
+ masm.callPreBarrier(address, MIRType::String);
+ else
+ MOZ_ASSERT(!UnboxedTypeNeedsPreBarrier(unboxedType));
+ }
+
+ masm.storeUnboxedProperty(address, unboxedType, value, failures);
+
+ attacher.jumpRejoin(masm);
+
+ masm.bind(failures);
+ attacher.jumpNextStub(masm);
+}
+
+static bool
+CanAttachSetUnboxed(JSContext* cx, HandleObject obj, HandleId id, const ConstantOrRegister& val,
+ bool needsTypeBarrier, bool* checkTypeset,
+ uint32_t* unboxedOffset, JSValueType* unboxedType)
+{
+ if (!obj->is<UnboxedPlainObject>())
+ return false;
+
+ const UnboxedLayout::Property* property = obj->as<UnboxedPlainObject>().layout().lookup(id);
+ if (property) {
+ *checkTypeset = false;
+ if (needsTypeBarrier && !CanInlineSetPropTypeCheck(obj, id, val, checkTypeset))
+ return false;
+ *unboxedOffset = property->offset;
+ *unboxedType = property->type;
+ return true;
+ }
+
+ return false;
+}
+
+static bool
+CanAttachSetUnboxedExpando(JSContext* cx, HandleObject obj, HandleId id,
+ const ConstantOrRegister& val,
+ bool needsTypeBarrier, bool* checkTypeset, Shape** pshape)
+{
+ if (!obj->is<UnboxedPlainObject>())
+ return false;
+
+ Rooted<UnboxedExpandoObject*> expando(cx, obj->as<UnboxedPlainObject>().maybeExpando());
+ if (!expando)
+ return false;
+
+ Shape* shape = expando->lookupPure(id);
+ if (!shape || !shape->hasDefaultSetter() || !shape->hasSlot() || !shape->writable())
+ return false;
+
+ *checkTypeset = false;
+ if (needsTypeBarrier && !CanInlineSetPropTypeCheck(obj, id, val, checkTypeset))
+ return false;
+
+ *pshape = shape;
+ return true;
+}
+
+static bool
+CanAttachAddUnboxedExpando(JSContext* cx, HandleObject obj, HandleShape oldShape,
+ HandleId id, const ConstantOrRegister& val,
+ bool needsTypeBarrier, bool* checkTypeset)
+{
+ if (!obj->is<UnboxedPlainObject>())
+ return false;
+
+ Rooted<UnboxedExpandoObject*> expando(cx, obj->as<UnboxedPlainObject>().maybeExpando());
+ if (!expando || expando->inDictionaryMode())
+ return false;
+
+ Shape* newShape = expando->lastProperty();
+ if (newShape->isEmptyShape() || newShape->propid() != id || newShape->previous() != oldShape)
+ return false;
+
+ MOZ_ASSERT(newShape->hasDefaultSetter() && newShape->hasSlot() && newShape->writable());
+
+ if (PrototypeChainShadowsPropertyAdd(cx, obj, id))
+ return false;
+
+ *checkTypeset = false;
+ if (needsTypeBarrier && !CanInlineSetPropTypeCheck(obj, id, val, checkTypeset))
+ return false;
+
+ return true;
+}
+
+bool
+SetPropertyIC::tryAttachUnboxed(JSContext* cx, HandleScript outerScript, IonScript* ion,
+ HandleObject obj, HandleId id, bool* emitted)
+{
+ MOZ_ASSERT(!*emitted);
+
+ bool checkTypeset = false;
+ uint32_t unboxedOffset;
+ JSValueType unboxedType;
+ if (!CanAttachSetUnboxed(cx, obj, id, value(), needsTypeBarrier(), &checkTypeset,
+ &unboxedOffset, &unboxedType))
+ {
+ return true;
+ }
+
+ *emitted = true;
+
+ MacroAssembler masm(cx, ion, outerScript, profilerLeavePc_);
+ StubAttacher attacher(*this);
+
+ Label failures;
+ emitIdGuard(masm, id, &failures);
+
+ GenerateSetUnboxed(cx, masm, attacher, obj, id, unboxedOffset, unboxedType,
+ object(), temp(), value(), checkTypeset, &failures);
+ return linkAndAttachStub(cx, masm, attacher, ion, "set_unboxed",
+ JS::TrackedOutcome::ICSetPropStub_SetUnboxed);
+}
+
bool
SetPropertyIC::tryAttachProxy(JSContext* cx, HandleScript outerScript, IonScript* ion,
HandleObject obj, HandleId id, bool* emitted)
@@ -3225,6 +3587,26 @@ SetPropertyIC::tryAttachNative(JSContext* cx, HandleScript outerScript, IonScrip
}
bool
+SetPropertyIC::tryAttachUnboxedExpando(JSContext* cx, HandleScript outerScript, IonScript* ion,
+ HandleObject obj, HandleId id, bool* emitted)
+{
+ MOZ_ASSERT(!*emitted);
+
+ RootedShape shape(cx);
+ bool checkTypeset = false;
+ if (!CanAttachSetUnboxedExpando(cx, obj, id, value(), needsTypeBarrier(),
+ &checkTypeset, shape.address()))
+ {
+ return true;
+ }
+
+ if (!attachSetSlot(cx, outerScript, ion, obj, shape, checkTypeset))
+ return false;
+ *emitted = true;
+ return true;
+}
+
+bool
SetPropertyIC::tryAttachStub(JSContext* cx, HandleScript outerScript, IonScript* ion,
HandleObject obj, HandleValue idval, HandleValue value,
MutableHandleId id, bool* emitted, bool* tryNativeAddSlot)
@@ -3249,6 +3631,12 @@ SetPropertyIC::tryAttachStub(JSContext* cx, HandleScript outerScript, IonScript*
if (!*emitted && !tryAttachNative(cx, outerScript, ion, obj, id, emitted, tryNativeAddSlot))
return false;
+
+ if (!*emitted && !tryAttachUnboxed(cx, outerScript, ion, obj, id, emitted))
+ return false;
+
+ if (!*emitted && !tryAttachUnboxedExpando(cx, outerScript, ion, obj, id, emitted))
+ return false;
}
if (idval.isInt32()) {
@@ -3300,6 +3688,16 @@ SetPropertyIC::tryAttachAddSlot(JSContext* cx, HandleScript outerScript, IonScri
return true;
}
+ checkTypeset = false;
+ if (CanAttachAddUnboxedExpando(cx, obj, oldShape, id, value(), needsTypeBarrier(),
+ &checkTypeset))
+ {
+ if (!attachAddSlot(cx, outerScript, ion, obj, id, oldShape, oldGroup, checkTypeset))
+ return false;
+ *emitted = true;
+ return true;
+ }
+
return true;
}
@@ -3321,6 +3719,11 @@ SetPropertyIC::update(JSContext* cx, HandleScript outerScript, size_t cacheIndex
return false;
oldShape = obj->maybeShape();
+ if (obj->is<UnboxedPlainObject>()) {
+ MOZ_ASSERT(!oldShape);
+ if (UnboxedExpandoObject* expando = obj->as<UnboxedPlainObject>().maybeExpando())
+ oldShape = expando->lastProperty();
+ }
}
RootedId id(cx);
@@ -3623,7 +4026,7 @@ GetPropertyIC::tryAttachDenseElementHole(JSContext* cx, HandleScript outerScript
GetPropertyIC::canAttachTypedOrUnboxedArrayElement(JSObject* obj, const Value& idval,
TypedOrValueRegister output)
{
- if (!obj->is<TypedArrayObject>())
+ if (!obj->is<TypedArrayObject>() && !obj->is<UnboxedArrayObject>())
return false;
MOZ_ASSERT(idval.isInt32() || idval.isString());
@@ -3654,6 +4057,13 @@ GetPropertyIC::canAttachTypedOrUnboxedArrayElement(JSObject* obj, const Value& i
return output.hasValue() || !output.typedReg().isFloat();
}
+ if (index >= obj->as<UnboxedArrayObject>().initializedLength())
+ return false;
+
+ JSValueType elementType = obj->as<UnboxedArrayObject>().elementType();
+ if (elementType == JSVAL_TYPE_DOUBLE)
+ return output.hasValue();
+
return output.hasValue() || !output.typedReg().isFloat();
}
@@ -3730,27 +4140,46 @@ GenerateGetTypedOrUnboxedArrayElement(JSContext* cx, MacroAssembler& masm,
Label popObjectAndFail;
- // Guard on the initialized length.
- Address length(object, TypedArrayObject::lengthOffset());
- masm.branch32(Assembler::BelowOrEqual, length, indexReg, &failures);
+ if (array->is<TypedArrayObject>()) {
+ // Guard on the initialized length.
+ Address length(object, TypedArrayObject::lengthOffset());
+ masm.branch32(Assembler::BelowOrEqual, length, indexReg, &failures);
- // Save the object register on the stack in case of failure.
- Register elementReg = object;
- masm.push(object);
+ // Save the object register on the stack in case of failure.
+ Register elementReg = object;
+ masm.push(object);
- // Load elements vector.
- masm.loadPtr(Address(object, TypedArrayObject::dataOffset()), elementReg);
+ // Load elements vector.
+ masm.loadPtr(Address(object, TypedArrayObject::dataOffset()), elementReg);
- // Load the value. We use an invalid register because the destination
- // register is necessary a non double register.
- Scalar::Type arrayType = array->as<TypedArrayObject>().type();
- int width = Scalar::byteSize(arrayType);
- BaseIndex source(elementReg, indexReg, ScaleFromElemWidth(width));
- if (output.hasValue()) {
- masm.loadFromTypedArray(arrayType, source, output.valueReg(), allowDoubleResult,
- elementReg, &popObjectAndFail);
+ // Load the value. We use an invalid register because the destination
+ // register is necessary a non double register.
+ Scalar::Type arrayType = array->as<TypedArrayObject>().type();
+ int width = Scalar::byteSize(arrayType);
+ BaseIndex source(elementReg, indexReg, ScaleFromElemWidth(width));
+ if (output.hasValue()) {
+ masm.loadFromTypedArray(arrayType, source, output.valueReg(), allowDoubleResult,
+ elementReg, &popObjectAndFail);
+ } else {
+ masm.loadFromTypedArray(arrayType, source, output.typedReg(), elementReg, &popObjectAndFail);
+ }
} else {
- masm.loadFromTypedArray(arrayType, source, output.typedReg(), elementReg, &popObjectAndFail);
+ // Save the object register on the stack in case of failure.
+ masm.push(object);
+
+ // Guard on the initialized length.
+ masm.load32(Address(object, UnboxedArrayObject::offsetOfCapacityIndexAndInitializedLength()), object);
+ masm.and32(Imm32(UnboxedArrayObject::InitializedLengthMask), object);
+ masm.branch32(Assembler::BelowOrEqual, object, indexReg, &popObjectAndFail);
+
+ // Load elements vector.
+ Register elementReg = object;
+ masm.loadPtr(Address(masm.getStackPointer(), 0), object);
+ masm.loadPtr(Address(object, UnboxedArrayObject::offsetOfElements()), elementReg);
+
+ JSValueType elementType = array->as<UnboxedArrayObject>().elementType();
+ BaseIndex source(elementReg, indexReg, ScaleFromElemWidth(UnboxedTypeSize(elementType)));
+ masm.loadUnboxedProperty(source, elementType, output);
}
masm.pop(object);
diff --git a/js/src/jit/IonCaches.h b/js/src/jit/IonCaches.h
index b006465383..173e06c6ba 100644
--- a/js/src/jit/IonCaches.h
+++ b/js/src/jit/IonCaches.h
@@ -529,6 +529,18 @@ class GetPropertyIC : public IonCache
HandleObject obj, HandleId id, void* returnAddr,
bool* emitted);
+ MOZ_MUST_USE bool tryAttachUnboxed(JSContext* cx, HandleScript outerScript, IonScript* ion,
+ HandleObject obj, HandleId id, void* returnAddr,
+ bool* emitted);
+
+ MOZ_MUST_USE bool tryAttachUnboxedExpando(JSContext* cx, HandleScript outerScript,
+ IonScript* ion, HandleObject obj, HandleId id,
+ void* returnAddr, bool* emitted);
+
+ MOZ_MUST_USE bool tryAttachUnboxedArrayLength(JSContext* cx, HandleScript outerScript,
+ IonScript* ion, HandleObject obj, HandleId id,
+ void* returnAddr, bool* emitted);
+
MOZ_MUST_USE bool tryAttachTypedArrayLength(JSContext* cx, HandleScript outerScript,
IonScript* ion, HandleObject obj, HandleId id,
bool* emitted);
diff --git a/js/src/jit/JitOptions.cpp b/js/src/jit/JitOptions.cpp
index 3f9d9db888..b9a7c7b276 100644
--- a/js/src/jit/JitOptions.cpp
+++ b/js/src/jit/JitOptions.cpp
@@ -221,6 +221,9 @@ DefaultJitOptions::DefaultJitOptions()
Warn(forcedRegisterAllocatorEnv, env);
}
+ // Toggles whether unboxed plain objects can be created by the VM.
+ SET_DEFAULT(disableUnboxedObjects, true);
+
// Test whether Atomics are allowed in asm.js code.
SET_DEFAULT(asmJSAtomicsEnable, false);
diff --git a/js/src/jit/JitOptions.h b/js/src/jit/JitOptions.h
index 719ee14d95..076980b4e5 100644
--- a/js/src/jit/JitOptions.h
+++ b/js/src/jit/JitOptions.h
@@ -91,6 +91,9 @@ struct DefaultJitOptions
mozilla::Maybe<uint32_t> forcedDefaultIonSmallFunctionWarmUpThreshold;
mozilla::Maybe<IonRegisterAllocator> forcedRegisterAllocator;
+ // The options below affect the rest of the VM, and not just the JIT.
+ bool disableUnboxedObjects;
+
DefaultJitOptions();
bool isSmallFunction(JSScript* script) const;
void setEagerCompilation();
diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp
index 1084509833..f9b0b21570 100644
--- a/js/src/jit/Lowering.cpp
+++ b/js/src/jit/Lowering.cpp
@@ -2297,14 +2297,9 @@ LIRGenerator::visitToObjectOrNull(MToObjectOrNull* ins)
void
LIRGenerator::visitRegExp(MRegExp* ins)
{
- if (ins->mustClone()) {
- LRegExp* lir = new(alloc()) LRegExp();
- defineReturn(lir, ins);
- assignSafepoint(lir, ins);
- } else {
- RegExpObject* source = ins->source();
- define(new(alloc()) LPointer(source), ins);
- }
+ LRegExp* lir = new(alloc()) LRegExp();
+ defineReturn(lir, ins);
+ assignSafepoint(lir, ins);
}
void
@@ -2895,6 +2890,32 @@ LIRGenerator::visitSetInitializedLength(MSetInitializedLength* ins)
}
void
+LIRGenerator::visitUnboxedArrayLength(MUnboxedArrayLength* ins)
+{
+ define(new(alloc()) LUnboxedArrayLength(useRegisterAtStart(ins->object())), ins);
+}
+
+void
+LIRGenerator::visitUnboxedArrayInitializedLength(MUnboxedArrayInitializedLength* ins)
+{
+ define(new(alloc()) LUnboxedArrayInitializedLength(useRegisterAtStart(ins->object())), ins);
+}
+
+void
+LIRGenerator::visitIncrementUnboxedArrayInitializedLength(MIncrementUnboxedArrayInitializedLength* ins)
+{
+ add(new(alloc()) LIncrementUnboxedArrayInitializedLength(useRegister(ins->object())), ins);
+}
+
+void
+LIRGenerator::visitSetUnboxedArrayInitializedLength(MSetUnboxedArrayInitializedLength* ins)
+{
+ add(new(alloc()) LSetUnboxedArrayInitializedLength(useRegister(ins->object()),
+ useRegisterOrConstant(ins->length()),
+ temp()), ins);
+}
+
+void
LIRGenerator::visitNot(MNot* ins)
{
MDefinition* op = ins->input();
@@ -3143,16 +3164,22 @@ LIRGenerator::visitStoreElementHole(MStoreElementHole* ins)
const LUse elements = useRegister(ins->elements());
const LAllocation index = useRegisterOrConstant(ins->index());
+ // Use a temp register when adding new elements to unboxed arrays.
+ LDefinition tempDef = LDefinition::BogusTemp();
+ if (ins->unboxedType() != JSVAL_TYPE_MAGIC)
+ tempDef = temp();
+
LInstruction* lir;
switch (ins->value()->type()) {
case MIRType::Value:
- lir = new(alloc()) LStoreElementHoleV(object, elements, index, useBox(ins->value()));
+ lir = new(alloc()) LStoreElementHoleV(object, elements, index, useBox(ins->value()),
+ tempDef);
break;
default:
{
const LAllocation value = useRegisterOrNonDoubleConstant(ins->value());
- lir = new(alloc()) LStoreElementHoleT(object, elements, index, value);
+ lir = new(alloc()) LStoreElementHoleT(object, elements, index, value, tempDef);
break;
}
}
@@ -3171,14 +3198,20 @@ LIRGenerator::visitFallibleStoreElement(MFallibleStoreElement* ins)
const LUse elements = useRegister(ins->elements());
const LAllocation index = useRegisterOrConstant(ins->index());
+ // Use a temp register when adding new elements to unboxed arrays.
+ LDefinition tempDef = LDefinition::BogusTemp();
+ if (ins->unboxedType() != JSVAL_TYPE_MAGIC)
+ tempDef = temp();
+
LInstruction* lir;
switch (ins->value()->type()) {
case MIRType::Value:
- lir = new(alloc()) LFallibleStoreElementV(object, elements, index, useBox(ins->value()));
+ lir = new(alloc()) LFallibleStoreElementV(object, elements, index, useBox(ins->value()),
+ tempDef);
break;
default:
const LAllocation value = useRegisterOrNonDoubleConstant(ins->value());
- lir = new(alloc()) LFallibleStoreElementT(object, elements, index, value);
+ lir = new(alloc()) LFallibleStoreElementT(object, elements, index, value, tempDef);
break;
}
@@ -3220,6 +3253,14 @@ LIRGenerator::visitStoreUnboxedString(MStoreUnboxedString* ins)
}
void
+LIRGenerator::visitConvertUnboxedObjectToNative(MConvertUnboxedObjectToNative* ins)
+{
+ LInstruction* check = new(alloc()) LConvertUnboxedObjectToNative(useRegister(ins->object()));
+ add(check, ins);
+ assignSafepoint(check, ins);
+}
+
+void
LIRGenerator::visitEffectiveAddress(MEffectiveAddress* ins)
{
define(new(alloc()) LEffectiveAddress(useRegister(ins->base()), useRegister(ins->index())), ins);
@@ -3737,6 +3778,24 @@ LIRGenerator::visitGuardReceiverPolymorphic(MGuardReceiverPolymorphic* ins)
}
void
+LIRGenerator::visitGuardUnboxedExpando(MGuardUnboxedExpando* ins)
+{
+ LGuardUnboxedExpando* guard =
+ new(alloc()) LGuardUnboxedExpando(useRegister(ins->object()));
+ assignSnapshot(guard, ins->bailoutKind());
+ add(guard, ins);
+ redefine(ins, ins->object());
+}
+
+void
+LIRGenerator::visitLoadUnboxedExpando(MLoadUnboxedExpando* ins)
+{
+ LLoadUnboxedExpando* lir =
+ new(alloc()) LLoadUnboxedExpando(useRegisterAtStart(ins->object()));
+ define(lir, ins);
+}
+
+void
LIRGenerator::visitAssertRange(MAssertRange* ins)
{
MDefinition* input = ins->input();
diff --git a/js/src/jit/Lowering.h b/js/src/jit/Lowering.h
index 81e6abbbbd..de66f175b5 100644
--- a/js/src/jit/Lowering.h
+++ b/js/src/jit/Lowering.h
@@ -217,6 +217,10 @@ class LIRGenerator : public LIRGeneratorSpecific
void visitTypedObjectDescr(MTypedObjectDescr* ins);
void visitInitializedLength(MInitializedLength* ins);
void visitSetInitializedLength(MSetInitializedLength* ins);
+ void visitUnboxedArrayLength(MUnboxedArrayLength* ins);
+ void visitUnboxedArrayInitializedLength(MUnboxedArrayInitializedLength* ins);
+ void visitIncrementUnboxedArrayInitializedLength(MIncrementUnboxedArrayInitializedLength* ins);
+ void visitSetUnboxedArrayInitializedLength(MSetUnboxedArrayInitializedLength* ins);
void visitNot(MNot* ins);
void visitBoundsCheck(MBoundsCheck* ins);
void visitBoundsCheckLower(MBoundsCheckLower* ins);
@@ -229,6 +233,7 @@ class LIRGenerator : public LIRGeneratorSpecific
void visitFallibleStoreElement(MFallibleStoreElement* ins);
void visitStoreUnboxedObjectOrNull(MStoreUnboxedObjectOrNull* ins);
void visitStoreUnboxedString(MStoreUnboxedString* ins);
+ void visitConvertUnboxedObjectToNative(MConvertUnboxedObjectToNative* ins);
void visitEffectiveAddress(MEffectiveAddress* ins);
void visitArrayPopShift(MArrayPopShift* ins);
void visitArrayPush(MArrayPush* ins);
@@ -252,6 +257,8 @@ class LIRGenerator : public LIRGeneratorSpecific
void visitGuardObject(MGuardObject* ins);
void visitGuardString(MGuardString* ins);
void visitGuardReceiverPolymorphic(MGuardReceiverPolymorphic* ins);
+ void visitGuardUnboxedExpando(MGuardUnboxedExpando* ins);
+ void visitLoadUnboxedExpando(MLoadUnboxedExpando* ins);
void visitPolyInlineGuard(MPolyInlineGuard* ins);
void visitAssertRange(MAssertRange* ins);
void visitCallGetProperty(MCallGetProperty* ins);
diff --git a/js/src/jit/MCallOptimize.cpp b/js/src/jit/MCallOptimize.cpp
index 2363545300..f2071dc6ac 100644
--- a/js/src/jit/MCallOptimize.cpp
+++ b/js/src/jit/MCallOptimize.cpp
@@ -30,6 +30,7 @@
#include "jit/shared/Lowering-shared-inl.h"
#include "vm/NativeObject-inl.h"
#include "vm/StringObject-inl.h"
+#include "vm/UnboxedObject-inl.h"
using mozilla::ArrayLength;
using mozilla::AssertedCast;
@@ -470,6 +471,11 @@ IonBuilder::inlineArray(CallInfo& callInfo)
return InliningStatus_NotInlined;
}
+ if (templateObject->is<UnboxedArrayObject>()) {
+ if (templateObject->group()->unboxedLayout().nativeGroup())
+ return InliningStatus_NotInlined;
+ }
+
// Multiple arguments imply array initialization, not just construction.
if (callInfo.argc() >= 2) {
initLength = callInfo.argc();
@@ -517,7 +523,7 @@ IonBuilder::inlineArray(CallInfo& callInfo)
// Make sure initLength matches the template object's length. This is
// not guaranteed to be the case, for instance if we're inlining the
// MConstant may come from an outer script.
- if (initLength != templateObject->as<ArrayObject>().length())
+ if (initLength != GetAnyBoxedOrUnboxedArrayLength(templateObject))
return InliningStatus_NotInlined;
// Don't inline large allocations.
@@ -532,15 +538,16 @@ IonBuilder::inlineArray(CallInfo& callInfo)
MDefinition* array = current->peek(-1);
if (callInfo.argc() >= 2) {
+ JSValueType unboxedType = GetBoxedOrUnboxedType(templateObject);
for (uint32_t i = 0; i < initLength; i++) {
if (!alloc().ensureBallast())
return InliningStatus_Error;
MDefinition* value = callInfo.getArg(i);
- if (!initializeArrayElement(array, i, value, /* addResumePoint = */ false))
+ if (!initializeArrayElement(array, i, value, unboxedType, /* addResumePoint = */ false))
return InliningStatus_Error;
}
- MInstruction* setLength = setInitializedLength(array, initLength);
+ MInstruction* setLength = setInitializedLength(array, unboxedType, initLength);
if (!resumeAfter(setLength))
return InliningStatus_Error;
}
@@ -573,7 +580,7 @@ IonBuilder::inlineArrayIsArray(CallInfo& callInfo)
if (!clasp || clasp->isProxy())
return InliningStatus_NotInlined;
- isArray = (clasp == &ArrayObject::class_);
+ isArray = (clasp == &ArrayObject::class_ || clasp == &UnboxedArrayObject::class_);
}
pushConstant(BooleanValue(isArray));
@@ -604,12 +611,12 @@ IonBuilder::inlineArrayPopShift(CallInfo& callInfo, MArrayPopShift::Mode mode)
OBJECT_FLAG_LENGTH_OVERFLOW |
OBJECT_FLAG_ITERATED;
- MDefinition* obj = callInfo.thisArg();
+ MDefinition* obj = convertUnboxedObjects(callInfo.thisArg());
TemporaryTypeSet* thisTypes = obj->resultTypeSet();
if (!thisTypes)
return InliningStatus_NotInlined;
const Class* clasp = thisTypes->getKnownClass(constraints());
- if (clasp != &ArrayObject::class_)
+ if (clasp != &ArrayObject::class_ && clasp != &UnboxedArrayObject::class_)
return InliningStatus_NotInlined;
if (thisTypes->hasObjectFlags(constraints(), unhandledFlags)) {
trackOptimizationOutcome(TrackedOutcome::ArrayBadFlags);
@@ -622,9 +629,17 @@ IonBuilder::inlineArrayPopShift(CallInfo& callInfo, MArrayPopShift::Mode mode)
return InliningStatus_NotInlined;
}
+ JSValueType unboxedType = JSVAL_TYPE_MAGIC;
+ if (clasp == &UnboxedArrayObject::class_) {
+ unboxedType = UnboxedArrayElementType(constraints(), obj, nullptr);
+ if (unboxedType == JSVAL_TYPE_MAGIC)
+ return InliningStatus_NotInlined;
+ }
+
callInfo.setImplicitlyUsedUnchecked();
- obj = addMaybeCopyElementsForWrite(obj, /* checkNative = */ false);
+ if (clasp == &ArrayObject::class_)
+ obj = addMaybeCopyElementsForWrite(obj, /* checkNative = */ false);
TemporaryTypeSet* returnTypes = getInlineReturnTypeSet();
bool needsHoleCheck = thisTypes->hasObjectFlags(constraints(), OBJECT_FLAG_NON_PACKED);
@@ -635,7 +650,8 @@ IonBuilder::inlineArrayPopShift(CallInfo& callInfo, MArrayPopShift::Mode mode)
if (barrier != BarrierKind::NoBarrier)
returnType = MIRType::Value;
- MArrayPopShift* ins = MArrayPopShift::New(alloc(), obj, mode, needsHoleCheck, maybeUndefined);
+ MArrayPopShift* ins = MArrayPopShift::New(alloc(), obj, mode,
+ unboxedType, needsHoleCheck, maybeUndefined);
current->add(ins);
current->push(ins);
ins->setResultType(returnType);
@@ -684,7 +700,7 @@ IonBuilder::inlineArrayPush(CallInfo& callInfo)
return InliningStatus_NotInlined;
}
- MDefinition* obj = callInfo.thisArg();
+ MDefinition* obj = convertUnboxedObjects(callInfo.thisArg());
MDefinition* value = callInfo.getArg(0);
if (PropertyWriteNeedsTypeBarrier(alloc(), constraints(), current,
&obj, nullptr, &value, /* canModify = */ false))
@@ -717,6 +733,13 @@ IonBuilder::inlineArrayPush(CallInfo& callInfo)
return InliningStatus_NotInlined;
}
+ JSValueType unboxedType = JSVAL_TYPE_MAGIC;
+ if (clasp == &UnboxedArrayObject::class_) {
+ unboxedType = UnboxedArrayElementType(constraints(), obj, nullptr);
+ if (unboxedType == JSVAL_TYPE_MAGIC)
+ return InliningStatus_NotInlined;
+ }
+
callInfo.setImplicitlyUsedUnchecked();
if (conversion == TemporaryTypeSet::AlwaysConvertToDoubles ||
@@ -727,12 +750,13 @@ IonBuilder::inlineArrayPush(CallInfo& callInfo)
value = valueDouble;
}
- obj = addMaybeCopyElementsForWrite(obj, /* checkNative = */ false);
+ if (unboxedType == JSVAL_TYPE_MAGIC)
+ obj = addMaybeCopyElementsForWrite(obj, /* checkNative = */ false);
if (NeedsPostBarrier(value))
current->add(MPostWriteBarrier::New(alloc(), obj, value));
- MArrayPush* ins = MArrayPush::New(alloc(), obj, value);
+ MArrayPush* ins = MArrayPush::New(alloc(), obj, value, unboxedType);
current->add(ins);
current->push(ins);
@@ -749,7 +773,7 @@ IonBuilder::inlineArraySlice(CallInfo& callInfo)
return InliningStatus_NotInlined;
}
- MDefinition* obj = callInfo.thisArg();
+ MDefinition* obj = convertUnboxedObjects(callInfo.thisArg());
// Ensure |this| and result are objects.
if (getInlineReturnType() != MIRType::Object)
@@ -773,9 +797,16 @@ IonBuilder::inlineArraySlice(CallInfo& callInfo)
return InliningStatus_NotInlined;
const Class* clasp = thisTypes->getKnownClass(constraints());
- if (clasp != &ArrayObject::class_)
+ if (clasp != &ArrayObject::class_ && clasp != &UnboxedArrayObject::class_)
return InliningStatus_NotInlined;
+ JSValueType unboxedType = JSVAL_TYPE_MAGIC;
+ if (clasp == &UnboxedArrayObject::class_) {
+ unboxedType = UnboxedArrayElementType(constraints(), obj, nullptr);
+ if (unboxedType == JSVAL_TYPE_MAGIC)
+ return InliningStatus_NotInlined;
+ }
+
// Watch out for indexed properties on the object or its prototype.
if (ElementAccessHasExtraIndexedProperty(this, obj)) {
trackOptimizationOutcome(TrackedOutcome::ProtoIndexedProps);
@@ -796,8 +827,15 @@ IonBuilder::inlineArraySlice(CallInfo& callInfo)
if (!templateObj)
return InliningStatus_NotInlined;
- if (!templateObj->is<ArrayObject>())
- return InliningStatus_NotInlined;
+ if (unboxedType == JSVAL_TYPE_MAGIC) {
+ if (!templateObj->is<ArrayObject>())
+ return InliningStatus_NotInlined;
+ } else {
+ if (!templateObj->is<UnboxedArrayObject>())
+ return InliningStatus_NotInlined;
+ if (templateObj->as<UnboxedArrayObject>().elementType() != unboxedType)
+ return InliningStatus_NotInlined;
+ }
callInfo.setImplicitlyUsedUnchecked();
@@ -816,12 +854,16 @@ IonBuilder::inlineArraySlice(CallInfo& callInfo)
end = MArrayLength::New(alloc(), elements);
current->add(end->toInstruction());
+ } else {
+ end = MUnboxedArrayLength::New(alloc(), obj);
+ current->add(end->toInstruction());
}
MArraySlice* ins = MArraySlice::New(alloc(), constraints(),
obj, begin, end,
templateObj,
- templateObj->group()->initialHeap(constraints()));
+ templateObj->group()->initialHeap(constraints()),
+ unboxedType);
current->add(ins);
current->push(ins);
@@ -1340,7 +1382,7 @@ IonBuilder::inlineConstantStringSplitString(CallInfo& callInfo)
// Check if exist a template object in stub.
JSString* stringStr = nullptr;
JSString* stringSep = nullptr;
- ArrayObject* templateObject = nullptr;
+ JSObject* templateObject = nullptr;
if (!inspector->isOptimizableCallStringSplit(pc, &stringStr, &stringSep, &templateObject))
return InliningStatus_NotInlined;
@@ -1366,13 +1408,13 @@ IonBuilder::inlineConstantStringSplitString(CallInfo& callInfo)
if (!key.maybeTypes()->hasType(TypeSet::StringType()))
return InliningStatus_NotInlined;
- uint32_t initLength = templateObject->length();
- if (templateObject->getDenseInitializedLength() != initLength)
+ uint32_t initLength = GetAnyBoxedOrUnboxedArrayLength(templateObject);
+ if (GetAnyBoxedOrUnboxedInitializedLength(templateObject) != initLength)
return InliningStatus_NotInlined;
Vector<MConstant*, 0, SystemAllocPolicy> arrayValues;
for (uint32_t i = 0; i < initLength; i++) {
- Value str = templateObject->getDenseElement(i);
+ Value str = GetAnyBoxedOrUnboxedDenseElement(templateObject, i);
MOZ_ASSERT(str.toString()->isAtom());
MConstant* value = MConstant::New(alloc().fallible(), str, constraints());
if (!value)
@@ -1403,6 +1445,8 @@ IonBuilder::inlineConstantStringSplitString(CallInfo& callInfo)
return InliningStatus_Inlined;
}
+ JSValueType unboxedType = GetBoxedOrUnboxedType(templateObject);
+
// Store all values, no need to initialize the length after each as
// jsop_initelem_array is doing because we do not expect to bailout
// because the memory is supposed to be allocated by now.
@@ -1413,11 +1457,11 @@ IonBuilder::inlineConstantStringSplitString(CallInfo& callInfo)
MConstant* value = arrayValues[i];
current->add(value);
- if (!initializeArrayElement(array, i, value, /* addResumePoint = */ false))
+ if (!initializeArrayElement(array, i, value, unboxedType, /* addResumePoint = */ false))
return InliningStatus_Error;
}
- MInstruction* setLength = setInitializedLength(array, initLength);
+ MInstruction* setLength = setInitializedLength(array, unboxedType, initLength);
if (!resumeAfter(setLength))
return InliningStatus_Error;
@@ -2053,7 +2097,7 @@ IonBuilder::inlineDefineDataProperty(CallInfo& callInfo)
if (callInfo.argc() != 3)
return InliningStatus_NotInlined;
- MDefinition* obj = callInfo.getArg(0);
+ MDefinition* obj = convertUnboxedObjects(callInfo.getArg(0));
MDefinition* id = callInfo.getArg(1);
MDefinition* value = callInfo.getArg(2);
diff --git a/js/src/jit/MIR.cpp b/js/src/jit/MIR.cpp
index 0cf31adb33..b9e5e8d613 100644
--- a/js/src/jit/MIR.cpp
+++ b/js/src/jit/MIR.cpp
@@ -2630,6 +2630,40 @@ jit::EqualTypes(MIRType type1, TemporaryTypeSet* typeset1,
return typeset1->equals(typeset2);
}
+// Tests whether input/inputTypes can always be stored to an unboxed
+// object/array property with the given unboxed type.
+bool
+jit::CanStoreUnboxedType(TempAllocator& alloc,
+ JSValueType unboxedType, MIRType input, TypeSet* inputTypes)
+{
+ TemporaryTypeSet types;
+
+ switch (unboxedType) {
+ case JSVAL_TYPE_BOOLEAN:
+ case JSVAL_TYPE_INT32:
+ case JSVAL_TYPE_DOUBLE:
+ case JSVAL_TYPE_STRING:
+ types.addType(TypeSet::PrimitiveType(unboxedType), alloc.lifoAlloc());
+ break;
+
+ case JSVAL_TYPE_OBJECT:
+ types.addType(TypeSet::AnyObjectType(), alloc.lifoAlloc());
+ types.addType(TypeSet::NullType(), alloc.lifoAlloc());
+ break;
+
+ default:
+ MOZ_CRASH("Bad unboxed type");
+ }
+
+ return TypeSetIncludes(&types, input, inputTypes);
+}
+
+static bool
+CanStoreUnboxedType(TempAllocator& alloc, JSValueType unboxedType, MDefinition* value)
+{
+ return CanStoreUnboxedType(alloc, unboxedType, value->type(), value->resultTypeSet());
+}
+
bool
MPhi::specializeType(TempAllocator& alloc)
{
@@ -4776,31 +4810,67 @@ MBeta::printOpcode(GenericPrinter& out) const
bool
MCreateThisWithTemplate::canRecoverOnBailout() const
{
- MOZ_ASSERT(templateObject()->is<PlainObject>());
- MOZ_ASSERT(!templateObject()->as<PlainObject>().denseElementsAreCopyOnWrite());
+ MOZ_ASSERT(templateObject()->is<PlainObject>() || templateObject()->is<UnboxedPlainObject>());
+ MOZ_ASSERT_IF(templateObject()->is<PlainObject>(),
+ !templateObject()->as<PlainObject>().denseElementsAreCopyOnWrite());
+ return true;
+}
+
+bool
+OperandIndexMap::init(TempAllocator& alloc, JSObject* templateObject)
+{
+ const UnboxedLayout& layout =
+ templateObject->as<UnboxedPlainObject>().layoutDontCheckGeneration();
+
+ const UnboxedLayout::PropertyVector& properties = layout.properties();
+ MOZ_ASSERT(properties.length() < 255);
+
+ // Allocate an array of indexes, where the top of each field correspond to
+ // the index of the operand in the MObjectState instance.
+ if (!map.init(alloc, layout.size()))
+ return false;
+
+ // Reset all indexes to 0, which is an error code.
+ for (size_t i = 0; i < map.length(); i++)
+ map[i] = 0;
+
+ // Map the property offsets to the indexes of MObjectState operands.
+ uint8_t index = 1;
+ for (size_t i = 0; i < properties.length(); i++, index++)
+ map[properties[i].offset] = index;
+
return true;
}
MObjectState::MObjectState(MObjectState* state)
: numSlots_(state->numSlots_),
- numFixedSlots_(state->numFixedSlots_)
+ numFixedSlots_(state->numFixedSlots_),
+ operandIndex_(state->operandIndex_)
{
// This instruction is only used as a summary for bailout paths.
setResultType(MIRType::Object);
setRecoveredOnBailout();
}
-MObjectState::MObjectState(JSObject* templateObject)
+MObjectState::MObjectState(JSObject *templateObject, OperandIndexMap* operandIndex)
{
// This instruction is only used as a summary for bailout paths.
setResultType(MIRType::Object);
setRecoveredOnBailout();
- MOZ_ASSERT(templateObject->is<NativeObject>());
+ if (templateObject->is<NativeObject>()) {
+ NativeObject* nativeObject = &templateObject->as<NativeObject>();
+ numSlots_ = nativeObject->slotSpan();
+ numFixedSlots_ = nativeObject->numFixedSlots();
+ } else {
+ const UnboxedLayout& layout =
+ templateObject->as<UnboxedPlainObject>().layoutDontCheckGeneration();
+ // Same as UnboxedLayout::makeNativeGroup
+ numSlots_ = layout.properties().length();
+ numFixedSlots_ = gc::GetGCKindSlots(layout.getAllocKind());
+ }
- NativeObject* nativeObject = &templateObject->as<NativeObject>();
- numSlots_ = nativeObject->slotSpan();
- numFixedSlots_ = nativeObject->numFixedSlots();
+ operandIndex_ = operandIndex;
}
JSObject*
@@ -4835,21 +4905,39 @@ MObjectState::initFromTemplateObject(TempAllocator& alloc, MDefinition* undefine
// the template object. This is needed to account values which are baked in
// the template objects and not visible in IonMonkey, such as the
// uninitialized-lexical magic value of call objects.
- NativeObject& nativeObject = templateObject->as<NativeObject>();
- MOZ_ASSERT(nativeObject.slotSpan() == numSlots());
-
- MOZ_ASSERT(templateObject->is<NativeObject>());
- for (size_t i = 0; i < numSlots(); i++) {
- Value val = nativeObject.getSlot(i);
- MDefinition *def = undefinedVal;
- if (!val.isUndefined()) {
- MConstant* ins = val.isObject() ?
- MConstant::NewConstraintlessObject(alloc, &val.toObject()) :
- MConstant::New(alloc, val);
- block()->insertBefore(this, ins);
- def = ins;
+ if (templateObject->is<UnboxedPlainObject>()) {
+ UnboxedPlainObject& unboxedObject = templateObject->as<UnboxedPlainObject>();
+ const UnboxedLayout& layout = unboxedObject.layoutDontCheckGeneration();
+ const UnboxedLayout::PropertyVector& properties = layout.properties();
+
+ for (size_t i = 0; i < properties.length(); i++) {
+ Value val = unboxedObject.getValue(properties[i], /* maybeUninitialized = */ true);
+ MDefinition *def = undefinedVal;
+ if (!val.isUndefined()) {
+ MConstant* ins = val.isObject() ?
+ MConstant::NewConstraintlessObject(alloc, &val.toObject()) :
+ MConstant::New(alloc, val);
+ block()->insertBefore(this, ins);
+ def = ins;
+ }
+ initSlot(i, def);
+ }
+ } else {
+ NativeObject& nativeObject = templateObject->as<NativeObject>();
+ MOZ_ASSERT(nativeObject.slotSpan() == numSlots());
+
+ for (size_t i = 0; i < numSlots(); i++) {
+ Value val = nativeObject.getSlot(i);
+ MDefinition *def = undefinedVal;
+ if (!val.isUndefined()) {
+ MConstant* ins = val.isObject() ?
+ MConstant::NewConstraintlessObject(alloc, &val.toObject()) :
+ MConstant::New(alloc, val);
+ block()->insertBefore(this, ins);
+ def = ins;
+ }
+ initSlot(i, def);
}
- initSlot(i, def);
}
return true;
}
@@ -4860,7 +4948,14 @@ MObjectState::New(TempAllocator& alloc, MDefinition* obj)
JSObject* templateObject = templateObjectOf(obj);
MOZ_ASSERT(templateObject, "Unexpected object creation.");
- MObjectState* res = new(alloc) MObjectState(templateObject);
+ OperandIndexMap* operandIndex = nullptr;
+ if (templateObject->is<UnboxedPlainObject>()) {
+ operandIndex = new(alloc) OperandIndexMap;
+ if (!operandIndex || !operandIndex->init(alloc, templateObject))
+ return nullptr;
+ }
+
+ MObjectState* res = new(alloc) MObjectState(templateObject, operandIndex);
if (!res || !res->init(alloc, obj))
return nullptr;
return res;
@@ -5767,6 +5862,35 @@ MGetFirstDollarIndex::foldsTo(TempAllocator& alloc)
return MConstant::New(alloc, Int32Value(index));
}
+MConvertUnboxedObjectToNative*
+MConvertUnboxedObjectToNative::New(TempAllocator& alloc, MDefinition* obj, ObjectGroup* group)
+{
+ MConvertUnboxedObjectToNative* res = new(alloc) MConvertUnboxedObjectToNative(obj, group);
+
+ ObjectGroup* nativeGroup = group->unboxedLayout().nativeGroup();
+
+ // Make a new type set for the result of this instruction which replaces
+ // the input group with the native group we will convert it to.
+ TemporaryTypeSet* types = obj->resultTypeSet();
+ if (types && !types->unknownObject()) {
+ TemporaryTypeSet* newTypes = types->cloneWithoutObjects(alloc.lifoAlloc());
+ if (newTypes) {
+ for (size_t i = 0; i < types->getObjectCount(); i++) {
+ TypeSet::ObjectKey* key = types->getObject(i);
+ if (!key)
+ continue;
+ if (key->unknownProperties() || !key->isGroup() || key->group() != group)
+ newTypes->addType(TypeSet::ObjectType(key), alloc.lifoAlloc());
+ else
+ newTypes->addType(TypeSet::ObjectType(nativeGroup), alloc.lifoAlloc());
+ }
+ res->setResultTypeSet(newTypes);
+ }
+ }
+
+ return res;
+}
+
bool
jit::ElementAccessIsDenseNative(CompilerConstraintList* constraints,
MDefinition* obj, MDefinition* id)
@@ -5786,6 +5910,48 @@ jit::ElementAccessIsDenseNative(CompilerConstraintList* constraints,
return clasp && clasp->isNative() && !IsTypedArrayClass(clasp);
}
+JSValueType
+jit::UnboxedArrayElementType(CompilerConstraintList* constraints, MDefinition* obj,
+ MDefinition* id)
+{
+ if (obj->mightBeType(MIRType::String))
+ return JSVAL_TYPE_MAGIC;
+
+ if (id && id->type() != MIRType::Int32 && id->type() != MIRType::Double)
+ return JSVAL_TYPE_MAGIC;
+
+ TemporaryTypeSet* types = obj->resultTypeSet();
+ if (!types || types->unknownObject())
+ return JSVAL_TYPE_MAGIC;
+
+ JSValueType elementType = JSVAL_TYPE_MAGIC;
+ for (unsigned i = 0; i < types->getObjectCount(); i++) {
+ TypeSet::ObjectKey* key = types->getObject(i);
+ if (!key)
+ continue;
+
+ if (key->unknownProperties() || !key->isGroup())
+ return JSVAL_TYPE_MAGIC;
+
+ if (key->clasp() != &UnboxedArrayObject::class_)
+ return JSVAL_TYPE_MAGIC;
+
+ const UnboxedLayout &layout = key->group()->unboxedLayout();
+
+ if (layout.nativeGroup())
+ return JSVAL_TYPE_MAGIC;
+
+ if (elementType == layout.elementType() || elementType == JSVAL_TYPE_MAGIC)
+ elementType = layout.elementType();
+ else
+ return JSVAL_TYPE_MAGIC;
+
+ key->watchStateChangeForUnboxedConvertedToNative(constraints);
+ }
+
+ return elementType;
+}
+
bool
jit::ElementAccessIsTypedArray(CompilerConstraintList* constraints,
MDefinition* obj, MDefinition* id,
@@ -5945,6 +6111,11 @@ ObjectSubsumes(TypeSet::ObjectKey* first, TypeSet::ObjectKey* second)
firstElements.maybeTypes()->equals(secondElements.maybeTypes());
}
+ if (first->clasp() == &UnboxedArrayObject::class_) {
+ return first->group()->unboxedLayout().elementType() ==
+ second->group()->unboxedLayout().elementType();
+ }
+
return false;
}
@@ -6399,6 +6570,23 @@ jit::PropertyWriteNeedsTypeBarrier(TempAllocator& alloc, CompilerConstraintList*
}
}
+ // Perform additional filtering to make sure that any unboxed property
+ // being written can accommodate the value.
+ for (size_t i = 0; i < types->getObjectCount(); i++) {
+ TypeSet::ObjectKey* key = types->getObject(i);
+ if (key && key->isGroup() && key->group()->maybeUnboxedLayout()) {
+ const UnboxedLayout& layout = key->group()->unboxedLayout();
+ if (name) {
+ const UnboxedLayout::Property* property = layout.lookup(name);
+ if (property && !CanStoreUnboxedType(alloc, property->type, *pvalue))
+ return true;
+ } else {
+ if (layout.isArray() && !CanStoreUnboxedType(alloc, layout.elementType(), *pvalue))
+ return true;
+ }
+ }
+ }
+
if (success)
return false;
@@ -6429,6 +6617,17 @@ jit::PropertyWriteNeedsTypeBarrier(TempAllocator& alloc, CompilerConstraintList*
MOZ_ASSERT(excluded);
+ // If the excluded object is a group with an unboxed layout, make sure it
+ // does not have a corresponding native group. Objects with the native
+ // group might appear even though they are not in the type set.
+ if (excluded->isGroup()) {
+ if (UnboxedLayout* layout = excluded->group()->maybeUnboxedLayout()) {
+ if (layout->nativeGroup())
+ return true;
+ excluded->watchStateChangeForUnboxedConvertedToNative(constraints);
+ }
+ }
+
*pobj = AddGroupGuard(alloc, current, *pobj, excluded, /* bailOnEquality = */ true);
return false;
}
diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h
index 0c1e77f802..81662a9be7 100644
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -30,6 +30,7 @@
#include "vm/EnvironmentObject.h"
#include "vm/SharedMem.h"
#include "vm/TypedArrayCommon.h"
+#include "vm/UnboxedObject.h"
// Undo windows.h damage on Win64
#undef MemoryBarrier
@@ -375,7 +376,8 @@ class AliasSet {
Element = 1 << 1, // A Value member of obj->elements or
// a typed object.
UnboxedElement = 1 << 2, // An unboxed scalar or reference member of
- // typed object.
+ // a typed array, typed object, or unboxed
+ // object.
DynamicSlot = 1 << 3, // A Value member of obj->slots.
FixedSlot = 1 << 4, // A Value member of obj->fixedSlots().
DOMProperty = 1 << 5, // A DOM property
@@ -432,6 +434,9 @@ class AliasSet {
MOZ_ASSERT(flags && !(flags & Store_));
return AliasSet(flags | Store_);
}
+ static uint32_t BoxedOrUnboxedElements(JSValueType type) {
+ return (type == JSVAL_TYPE_MAGIC) ? Element : UnboxedElement;
+ }
};
typedef Vector<MDefinition*, 6, JitAllocPolicy> MDefinitionVector;
@@ -3758,9 +3763,14 @@ class MObjectState
{
private:
uint32_t numSlots_;
- uint32_t numFixedSlots_;
+ uint32_t numFixedSlots_; // valid if isUnboxed() == false.
+ OperandIndexMap* operandIndex_; // valid if isUnboxed() == true.
+
+ bool isUnboxed() const {
+ return operandIndex_ != nullptr;
+ }
- MObjectState(JSObject *templateObject);
+ MObjectState(JSObject *templateObject, OperandIndexMap* operandIndex);
explicit MObjectState(MObjectState* state);
MOZ_MUST_USE bool init(TempAllocator& alloc, MDefinition* obj);
@@ -3820,6 +3830,18 @@ class MObjectState
setSlot(slot + numFixedSlots(), def);
}
+ // Interface reserved for unboxed objects.
+ bool hasOffset(uint32_t offset) const {
+ MOZ_ASSERT(isUnboxed());
+ return offset < operandIndex_->map.length() && operandIndex_->map[offset] != 0;
+ }
+ MDefinition* getOffset(uint32_t offset) const {
+ return getOperand(operandIndex_->map[offset]);
+ }
+ void setOffset(uint32_t offset, MDefinition* def) {
+ replaceOperand(operandIndex_->map[offset], def);
+ }
+
MOZ_MUST_USE bool writeRecoverData(CompactBufferWriter& writer) const override;
bool canRecoverOnBailout() const override {
return true;
@@ -8080,11 +8102,9 @@ class MDefFun
class MRegExp : public MNullaryInstruction
{
CompilerGCPointer<RegExpObject*> source_;
- bool mustClone_;
MRegExp(CompilerConstraintList* constraints, RegExpObject* source)
- : source_(source),
- mustClone_(true)
+ : source_(source)
{
setResultType(MIRType::Object);
setResultTypeSet(MakeSingletonTypeSet(constraints, source));
@@ -8094,12 +8114,6 @@ class MRegExp : public MNullaryInstruction
INSTRUCTION_HEADER(RegExp)
TRIVIAL_NEW_WRAPPERS
- void setDoNotClone() {
- mustClone_ = false;
- }
- bool mustClone() const {
- return mustClone_;
- }
RegExpObject* source() const {
return source_;
}
@@ -8741,6 +8755,102 @@ class MSetInitializedLength
ALLOW_CLONE(MSetInitializedLength)
};
+// Load the length from an unboxed array.
+class MUnboxedArrayLength
+ : public MUnaryInstruction,
+ public SingleObjectPolicy::Data
+{
+ explicit MUnboxedArrayLength(MDefinition* object)
+ : MUnaryInstruction(object)
+ {
+ setResultType(MIRType::Int32);
+ setMovable();
+ }
+
+ public:
+ INSTRUCTION_HEADER(UnboxedArrayLength)
+ TRIVIAL_NEW_WRAPPERS
+ NAMED_OPERANDS((0, object))
+
+ bool congruentTo(const MDefinition* ins) const override {
+ return congruentIfOperandsEqual(ins);
+ }
+ AliasSet getAliasSet() const override {
+ return AliasSet::Load(AliasSet::ObjectFields);
+ }
+
+ ALLOW_CLONE(MUnboxedArrayLength)
+};
+
+// Load the initialized length from an unboxed array.
+class MUnboxedArrayInitializedLength
+ : public MUnaryInstruction,
+ public SingleObjectPolicy::Data
+{
+ explicit MUnboxedArrayInitializedLength(MDefinition* object)
+ : MUnaryInstruction(object)
+ {
+ setResultType(MIRType::Int32);
+ setMovable();
+ }
+
+ public:
+ INSTRUCTION_HEADER(UnboxedArrayInitializedLength)
+ TRIVIAL_NEW_WRAPPERS
+ NAMED_OPERANDS((0, object))
+
+ bool congruentTo(const MDefinition* ins) const override {
+ return congruentIfOperandsEqual(ins);
+ }
+ AliasSet getAliasSet() const override {
+ return AliasSet::Load(AliasSet::ObjectFields);
+ }
+
+ ALLOW_CLONE(MUnboxedArrayInitializedLength)
+};
+
+// Increment the initialized length of an unboxed array object.
+class MIncrementUnboxedArrayInitializedLength
+ : public MUnaryInstruction,
+ public SingleObjectPolicy::Data
+{
+ explicit MIncrementUnboxedArrayInitializedLength(MDefinition* obj)
+ : MUnaryInstruction(obj)
+ {}
+
+ public:
+ INSTRUCTION_HEADER(IncrementUnboxedArrayInitializedLength)
+ TRIVIAL_NEW_WRAPPERS
+ NAMED_OPERANDS((0, object))
+
+ AliasSet getAliasSet() const override {
+ return AliasSet::Store(AliasSet::ObjectFields);
+ }
+
+ ALLOW_CLONE(MIncrementUnboxedArrayInitializedLength)
+};
+
+// Set the initialized length of an unboxed array object.
+class MSetUnboxedArrayInitializedLength
+ : public MBinaryInstruction,
+ public SingleObjectPolicy::Data
+{
+ explicit MSetUnboxedArrayInitializedLength(MDefinition* obj, MDefinition* length)
+ : MBinaryInstruction(obj, length)
+ {}
+
+ public:
+ INSTRUCTION_HEADER(SetUnboxedArrayInitializedLength)
+ TRIVIAL_NEW_WRAPPERS
+ NAMED_OPERANDS((0, object), (1, length))
+
+ AliasSet getAliasSet() const override {
+ return AliasSet::Store(AliasSet::ObjectFields);
+ }
+
+ ALLOW_CLONE(MSetUnboxedArrayInitializedLength)
+};
+
// Load the array length from an elements header.
class MArrayLength
: public MUnaryInstruction,
@@ -9234,19 +9344,23 @@ class MLoadElement
ALLOW_CLONE(MLoadElement)
};
-// Load a value from the elements vector of a native object.
+// Load a value from the elements vector for a dense native or unboxed array.
// If the index is out-of-bounds, or the indexed slot has a hole, undefined is
// returned instead.
class MLoadElementHole
: public MTernaryInstruction,
public SingleObjectPolicy::Data
{
+ // Unboxed element type, JSVAL_TYPE_MAGIC for dense native elements.
+ JSValueType unboxedType_;
+
bool needsNegativeIntCheck_;
bool needsHoleCheck_;
MLoadElementHole(MDefinition* elements, MDefinition* index, MDefinition* initLength,
- bool needsHoleCheck)
+ JSValueType unboxedType, bool needsHoleCheck)
: MTernaryInstruction(elements, index, initLength),
+ unboxedType_(unboxedType),
needsNegativeIntCheck_(true),
needsHoleCheck_(needsHoleCheck)
{
@@ -9268,6 +9382,9 @@ class MLoadElementHole
TRIVIAL_NEW_WRAPPERS
NAMED_OPERANDS((0, elements), (1, index), (2, initLength))
+ JSValueType unboxedType() const {
+ return unboxedType_;
+ }
bool needsNegativeIntCheck() const {
return needsNegativeIntCheck_;
}
@@ -9278,6 +9395,8 @@ class MLoadElementHole
if (!ins->isLoadElementHole())
return false;
const MLoadElementHole* other = ins->toLoadElementHole();
+ if (unboxedType() != other->unboxedType())
+ return false;
if (needsHoleCheck() != other->needsHoleCheck())
return false;
if (needsNegativeIntCheck() != other->needsNegativeIntCheck())
@@ -9285,7 +9404,7 @@ class MLoadElementHole
return congruentIfOperandsEqual(other);
}
AliasSet getAliasSet() const override {
- return AliasSet::Load(AliasSet::Element);
+ return AliasSet::Load(AliasSet::BoxedOrUnboxedElements(unboxedType()));
}
void collectRangeInfoPreTrunc() override;
@@ -9465,17 +9584,20 @@ class MStoreElement
ALLOW_CLONE(MStoreElement)
};
-// Like MStoreElement, but supports indexes >= initialized length. The downside
-// is that we cannot hoist the elements vector and bounds check, since this
-// instruction may update the (initialized) length and reallocate the elements
-// vector.
+// Like MStoreElement, but supports indexes >= initialized length, and can
+// handle unboxed arrays. The downside is that we cannot hoist the elements
+// vector and bounds check, since this instruction may update the (initialized)
+// length and reallocate the elements vector.
class MStoreElementHole
: public MAryInstruction<4>,
public MStoreElementCommon,
public MixPolicy<SingleObjectPolicy, NoFloatPolicy<3> >::Data
{
+ JSValueType unboxedType_;
+
MStoreElementHole(MDefinition* object, MDefinition* elements,
- MDefinition* index, MDefinition* value)
+ MDefinition* index, MDefinition* value, JSValueType unboxedType)
+ : unboxedType_(unboxedType)
{
initOperand(0, object);
initOperand(1, elements);
@@ -9490,6 +9612,10 @@ class MStoreElementHole
TRIVIAL_NEW_WRAPPERS
NAMED_OPERANDS((0, object), (1, elements), (2, index), (3, value))
+ JSValueType unboxedType() const {
+ return unboxedType_;
+ }
+
ALLOW_CLONE(MStoreElementHole)
};
@@ -9500,11 +9626,13 @@ class MFallibleStoreElement
public MStoreElementCommon,
public MixPolicy<SingleObjectPolicy, NoFloatPolicy<3> >::Data
{
+ JSValueType unboxedType_;
bool strict_;
MFallibleStoreElement(MDefinition* object, MDefinition* elements,
MDefinition* index, MDefinition* value,
- bool strict)
+ JSValueType unboxedType, bool strict)
+ : unboxedType_(unboxedType)
{
initOperand(0, object);
initOperand(1, elements);
@@ -9520,6 +9648,10 @@ class MFallibleStoreElement
TRIVIAL_NEW_WRAPPERS
NAMED_OPERANDS((0, object), (1, elements), (2, index), (3, value))
+ JSValueType unboxedType() const {
+ return unboxedType_;
+ }
+
bool strict() const {
return strict_;
}
@@ -9610,6 +9742,59 @@ class MStoreUnboxedString
ALLOW_CLONE(MStoreUnboxedString)
};
+// Passes through an object, after ensuring it is converted from an unboxed
+// object to a native representation.
+class MConvertUnboxedObjectToNative
+ : public MUnaryInstruction,
+ public SingleObjectPolicy::Data
+{
+ CompilerObjectGroup group_;
+
+ explicit MConvertUnboxedObjectToNative(MDefinition* obj, ObjectGroup* group)
+ : MUnaryInstruction(obj),
+ group_(group)
+ {
+ setGuard();
+ setMovable();
+ setResultType(MIRType::Object);
+ }
+
+ public:
+ INSTRUCTION_HEADER(ConvertUnboxedObjectToNative)
+ NAMED_OPERANDS((0, object))
+
+ static MConvertUnboxedObjectToNative* New(TempAllocator& alloc, MDefinition* obj,
+ ObjectGroup* group);
+
+ ObjectGroup* group() const {
+ return group_;
+ }
+ bool congruentTo(const MDefinition* ins) const override {
+ if (!congruentIfOperandsEqual(ins))
+ return false;
+ return ins->toConvertUnboxedObjectToNative()->group() == group();
+ }
+ AliasSet getAliasSet() const override {
+ // This instruction can read and write to all parts of the object, but
+ // is marked as non-effectful so it can be consolidated by LICM and GVN
+ // and avoid inhibiting other optimizations.
+ //
+ // This is valid to do because when unboxed objects might have a native
+ // group they can be converted to, we do not optimize accesses to the
+ // unboxed objects and do not guard on their group or shape (other than
+ // in this opcode).
+ //
+ // Later accesses can assume the object has a native representation
+ // and optimize accordingly. Those accesses cannot be reordered before
+ // this instruction, however. This is prevented by chaining this
+ // instruction with the object itself, in the same way as MBoundsCheck.
+ return AliasSet::None();
+ }
+ bool appendRoots(MRootList& roots) const override {
+ return roots.append(group_);
+ }
+};
+
// Array.prototype.pop or Array.prototype.shift on a dense array.
class MArrayPopShift
: public MUnaryInstruction,
@@ -9623,12 +9808,13 @@ class MArrayPopShift
private:
Mode mode_;
+ JSValueType unboxedType_;
bool needsHoleCheck_;
bool maybeUndefined_;
- MArrayPopShift(MDefinition* object, Mode mode,
+ MArrayPopShift(MDefinition* object, Mode mode, JSValueType unboxedType,
bool needsHoleCheck, bool maybeUndefined)
- : MUnaryInstruction(object), mode_(mode),
+ : MUnaryInstruction(object), mode_(mode), unboxedType_(unboxedType),
needsHoleCheck_(needsHoleCheck), maybeUndefined_(maybeUndefined)
{ }
@@ -9646,8 +9832,12 @@ class MArrayPopShift
bool mode() const {
return mode_;
}
+ JSValueType unboxedType() const {
+ return unboxedType_;
+ }
AliasSet getAliasSet() const override {
- return AliasSet::Store(AliasSet::ObjectFields | AliasSet::Element);
+ return AliasSet::Store(AliasSet::ObjectFields |
+ AliasSet::BoxedOrUnboxedElements(unboxedType()));
}
ALLOW_CLONE(MArrayPopShift)
@@ -9658,8 +9848,10 @@ class MArrayPush
: public MBinaryInstruction,
public MixPolicy<SingleObjectPolicy, NoFloatPolicy<1> >::Data
{
- MArrayPush(MDefinition* object, MDefinition* value)
- : MBinaryInstruction(object, value)
+ JSValueType unboxedType_;
+
+ MArrayPush(MDefinition* object, MDefinition* value, JSValueType unboxedType)
+ : MBinaryInstruction(object, value), unboxedType_(unboxedType)
{
setResultType(MIRType::Int32);
}
@@ -9669,8 +9861,12 @@ class MArrayPush
TRIVIAL_NEW_WRAPPERS
NAMED_OPERANDS((0, object), (1, value))
+ JSValueType unboxedType() const {
+ return unboxedType_;
+ }
AliasSet getAliasSet() const override {
- return AliasSet::Store(AliasSet::ObjectFields | AliasSet::Element);
+ return AliasSet::Store(AliasSet::ObjectFields |
+ AliasSet::BoxedOrUnboxedElements(unboxedType()));
}
void computeRange(TempAllocator& alloc) override;
@@ -9684,13 +9880,15 @@ class MArraySlice
{
CompilerObject templateObj_;
gc::InitialHeap initialHeap_;
+ JSValueType unboxedType_;
MArraySlice(CompilerConstraintList* constraints, MDefinition* obj,
MDefinition* begin, MDefinition* end,
- JSObject* templateObj, gc::InitialHeap initialHeap)
+ JSObject* templateObj, gc::InitialHeap initialHeap, JSValueType unboxedType)
: MTernaryInstruction(obj, begin, end),
templateObj_(templateObj),
- initialHeap_(initialHeap)
+ initialHeap_(initialHeap),
+ unboxedType_(unboxedType)
{
setResultType(MIRType::Object);
}
@@ -9708,6 +9906,10 @@ class MArraySlice
return initialHeap_;
}
+ JSValueType unboxedType() const {
+ return unboxedType_;
+ }
+
bool possiblyCalls() const override {
return true;
}
@@ -10972,6 +11174,11 @@ class MGuardShape
setMovable();
setResultType(MIRType::Object);
setResultTypeSet(obj->resultTypeSet());
+
+ // Disallow guarding on unboxed object shapes. The group is better to
+ // guard on, and guarding on the shape can interact badly with
+ // MConvertUnboxedObjectToNative.
+ MOZ_ASSERT(shape->getObjectClass() != &UnboxedPlainObject::class_);
}
public:
@@ -11066,6 +11273,11 @@ class MGuardObjectGroup
setGuard();
setMovable();
setResultType(MIRType::Object);
+
+ // Unboxed groups which might be converted to natives can't be guarded
+ // on, due to MConvertUnboxedObjectToNative.
+ MOZ_ASSERT_IF(group->maybeUnboxedLayoutDontCheckGeneration(),
+ !group->unboxedLayoutDontCheckGeneration().nativeGroup());
}
public:
@@ -11174,6 +11386,73 @@ class MGuardClass
ALLOW_CLONE(MGuardClass)
};
+// Guard on the presence or absence of an unboxed object's expando.
+class MGuardUnboxedExpando
+ : public MUnaryInstruction,
+ public SingleObjectPolicy::Data
+{
+ bool requireExpando_;
+ BailoutKind bailoutKind_;
+
+ MGuardUnboxedExpando(MDefinition* obj, bool requireExpando, BailoutKind bailoutKind)
+ : MUnaryInstruction(obj),
+ requireExpando_(requireExpando),
+ bailoutKind_(bailoutKind)
+ {
+ setGuard();
+ setMovable();
+ setResultType(MIRType::Object);
+ }
+
+ public:
+ INSTRUCTION_HEADER(GuardUnboxedExpando)
+ TRIVIAL_NEW_WRAPPERS
+ NAMED_OPERANDS((0, object))
+
+ bool requireExpando() const {
+ return requireExpando_;
+ }
+ BailoutKind bailoutKind() const {
+ return bailoutKind_;
+ }
+ bool congruentTo(const MDefinition* ins) const override {
+ if (!congruentIfOperandsEqual(ins))
+ return false;
+ if (requireExpando() != ins->toGuardUnboxedExpando()->requireExpando())
+ return false;
+ return true;
+ }
+ AliasSet getAliasSet() const override {
+ return AliasSet::Load(AliasSet::ObjectFields);
+ }
+};
+
+// Load an unboxed plain object's expando.
+class MLoadUnboxedExpando
+ : public MUnaryInstruction,
+ public SingleObjectPolicy::Data
+{
+ private:
+ explicit MLoadUnboxedExpando(MDefinition* object)
+ : MUnaryInstruction(object)
+ {
+ setResultType(MIRType::Object);
+ setMovable();
+ }
+
+ public:
+ INSTRUCTION_HEADER(LoadUnboxedExpando)
+ TRIVIAL_NEW_WRAPPERS
+ NAMED_OPERANDS((0, object))
+
+ bool congruentTo(const MDefinition* ins) const override {
+ return congruentIfOperandsEqual(ins);
+ }
+ AliasSet getAliasSet() const override {
+ return AliasSet::Load(AliasSet::ObjectFields);
+ }
+};
+
// Load from vp[slot] (slots that are not inline in an object).
class MLoadSlot
: public MUnaryInstruction,
@@ -12076,13 +12355,15 @@ class MInArray
{
bool needsHoleCheck_;
bool needsNegativeIntCheck_;
+ JSValueType unboxedType_;
MInArray(MDefinition* elements, MDefinition* index,
MDefinition* initLength, MDefinition* object,
- bool needsHoleCheck)
+ bool needsHoleCheck, JSValueType unboxedType)
: MQuaternaryInstruction(elements, index, initLength, object),
needsHoleCheck_(needsHoleCheck),
- needsNegativeIntCheck_(true)
+ needsNegativeIntCheck_(true),
+ unboxedType_(unboxedType)
{
setResultType(MIRType::Boolean);
setMovable();
@@ -12102,6 +12383,9 @@ class MInArray
bool needsNegativeIntCheck() const {
return needsNegativeIntCheck_;
}
+ JSValueType unboxedType() const {
+ return unboxedType_;
+ }
void collectRangeInfoPreTrunc() override;
AliasSet getAliasSet() const override {
return AliasSet::Load(AliasSet::Element);
@@ -12114,6 +12398,8 @@ class MInArray
return false;
if (needsNegativeIntCheck() != other->needsNegativeIntCheck())
return false;
+ if (unboxedType() != other->unboxedType())
+ return false;
return congruentIfOperandsEqual(other);
}
};
@@ -14014,6 +14300,8 @@ MDefinition::maybeConstantValue()
bool ElementAccessIsDenseNative(CompilerConstraintList* constraints,
MDefinition* obj, MDefinition* id);
+JSValueType UnboxedArrayElementType(CompilerConstraintList* constraints, MDefinition* obj,
+ MDefinition* id);
bool ElementAccessIsTypedArray(CompilerConstraintList* constraints,
MDefinition* obj, MDefinition* id,
Scalar::Type* arrayType);
diff --git a/js/src/jit/MOpcodes.h b/js/src/jit/MOpcodes.h
index 589dde0774..2f67f80396 100644
--- a/js/src/jit/MOpcodes.h
+++ b/js/src/jit/MOpcodes.h
@@ -188,6 +188,8 @@ namespace jit {
_(GuardObjectGroup) \
_(GuardObjectIdentity) \
_(GuardClass) \
+ _(GuardUnboxedExpando) \
+ _(LoadUnboxedExpando) \
_(ArrayLength) \
_(SetArrayLength) \
_(GetNextEntryForIterator) \
@@ -199,6 +201,10 @@ namespace jit {
_(SetTypedObjectOffset) \
_(InitializedLength) \
_(SetInitializedLength) \
+ _(UnboxedArrayLength) \
+ _(UnboxedArrayInitializedLength) \
+ _(IncrementUnboxedArrayInitializedLength) \
+ _(SetUnboxedArrayInitializedLength) \
_(Not) \
_(BoundsCheck) \
_(BoundsCheckLower) \
@@ -214,6 +220,7 @@ namespace jit {
_(StoreUnboxedScalar) \
_(StoreUnboxedObjectOrNull) \
_(StoreUnboxedString) \
+ _(ConvertUnboxedObjectToNative) \
_(ArrayPopShift) \
_(ArrayPush) \
_(ArraySlice) \
diff --git a/js/src/jit/MacroAssembler.cpp b/js/src/jit/MacroAssembler.cpp
index a739b93256..f633b9b7b9 100644
--- a/js/src/jit/MacroAssembler.cpp
+++ b/js/src/jit/MacroAssembler.cpp
@@ -126,14 +126,20 @@ MacroAssembler::guardTypeSetMightBeIncomplete(TypeSet* types, Register obj, Regi
{
// Type set guards might miss when an object's group changes. In this case
// either its old group's properties will become unknown, or it will change
- // to a native object. Jump to label if this might have happened for the
- // input object.
+ // to a native object with an original unboxed group. Jump to label if this
+ // might have happened for the input object.
if (types->unknownObject()) {
jump(label);
return;
}
+ loadPtr(Address(obj, JSObject::offsetOfGroup()), scratch);
+ load32(Address(scratch, ObjectGroup::offsetOfFlags()), scratch);
+ and32(Imm32(OBJECT_FLAG_ADDENDUM_MASK), scratch);
+ branch32(Assembler::Equal,
+ scratch, Imm32(ObjectGroup::addendumOriginalUnboxedGroupValue()), label);
+
for (size_t i = 0; i < types->getObjectCount(); i++) {
if (JSObject* singleton = types->getSingletonNoBarrier(i)) {
movePtr(ImmGCPtr(singleton), scratch);
@@ -462,6 +468,268 @@ template void MacroAssembler::loadFromTypedArray(Scalar::Type arrayType, const A
template void MacroAssembler::loadFromTypedArray(Scalar::Type arrayType, const BaseIndex& src, const ValueOperand& dest,
bool allowDouble, Register temp, Label* fail);
+template <typename T>
+void
+MacroAssembler::loadUnboxedProperty(T address, JSValueType type, TypedOrValueRegister output)
+{
+ switch (type) {
+ case JSVAL_TYPE_INT32: {
+ // Handle loading an int32 into a double reg.
+ if (output.type() == MIRType::Double) {
+ convertInt32ToDouble(address, output.typedReg().fpu());
+ break;
+ }
+ MOZ_FALLTHROUGH;
+ }
+
+ case JSVAL_TYPE_BOOLEAN:
+ case JSVAL_TYPE_STRING: {
+ Register outReg;
+ if (output.hasValue()) {
+ outReg = output.valueReg().scratchReg();
+ } else {
+ MOZ_ASSERT(output.type() == MIRTypeFromValueType(type));
+ outReg = output.typedReg().gpr();
+ }
+
+ switch (type) {
+ case JSVAL_TYPE_BOOLEAN:
+ load8ZeroExtend(address, outReg);
+ break;
+ case JSVAL_TYPE_INT32:
+ load32(address, outReg);
+ break;
+ case JSVAL_TYPE_STRING:
+ loadPtr(address, outReg);
+ break;
+ default:
+ MOZ_CRASH();
+ }
+
+ if (output.hasValue())
+ tagValue(type, outReg, output.valueReg());
+ break;
+ }
+
+ case JSVAL_TYPE_OBJECT:
+ if (output.hasValue()) {
+ Register scratch = output.valueReg().scratchReg();
+ loadPtr(address, scratch);
+
+ Label notNull, done;
+ branchPtr(Assembler::NotEqual, scratch, ImmWord(0), &notNull);
+
+ moveValue(NullValue(), output.valueReg());
+ jump(&done);
+
+ bind(&notNull);
+ tagValue(JSVAL_TYPE_OBJECT, scratch, output.valueReg());
+
+ bind(&done);
+ } else {
+ // Reading null can't be possible here, as otherwise the result
+ // would be a value (either because null has been read before or
+ // because there is a barrier).
+ Register reg = output.typedReg().gpr();
+ loadPtr(address, reg);
+#ifdef DEBUG
+ Label ok;
+ branchTestPtr(Assembler::NonZero, reg, reg, &ok);
+ assumeUnreachable("Null not possible");
+ bind(&ok);
+#endif
+ }
+ break;
+
+ case JSVAL_TYPE_DOUBLE:
+ // Note: doubles in unboxed objects are not accessed through other
+ // views and do not need canonicalization.
+ if (output.hasValue())
+ loadValue(address, output.valueReg());
+ else
+ loadDouble(address, output.typedReg().fpu());
+ break;
+
+ default:
+ MOZ_CRASH();
+ }
+}
+
+template void
+MacroAssembler::loadUnboxedProperty(Address address, JSValueType type,
+ TypedOrValueRegister output);
+
+template void
+MacroAssembler::loadUnboxedProperty(BaseIndex address, JSValueType type,
+ TypedOrValueRegister output);
+
+static void
+StoreUnboxedFailure(MacroAssembler& masm, Label* failure)
+{
+ // Storing a value to an unboxed property is a fallible operation and
+ // the caller must provide a failure label if a particular unboxed store
+ // might fail. Sometimes, however, a store that cannot succeed (such as
+ // storing a string to an int32 property) will be marked as infallible.
+ // This can only happen if the code involved is unreachable.
+ if (failure)
+ masm.jump(failure);
+ else
+ masm.assumeUnreachable("Incompatible write to unboxed property");
+}
+
+template <typename T>
+void
+MacroAssembler::storeUnboxedProperty(T address, JSValueType type,
+ const ConstantOrRegister& value, Label* failure)
+{
+ switch (type) {
+ case JSVAL_TYPE_BOOLEAN:
+ if (value.constant()) {
+ if (value.value().isBoolean())
+ store8(Imm32(value.value().toBoolean()), address);
+ else
+ StoreUnboxedFailure(*this, failure);
+ } else if (value.reg().hasTyped()) {
+ if (value.reg().type() == MIRType::Boolean)
+ store8(value.reg().typedReg().gpr(), address);
+ else
+ StoreUnboxedFailure(*this, failure);
+ } else {
+ if (failure)
+ branchTestBoolean(Assembler::NotEqual, value.reg().valueReg(), failure);
+ storeUnboxedPayload(value.reg().valueReg(), address, /* width = */ 1);
+ }
+ break;
+
+ case JSVAL_TYPE_INT32:
+ if (value.constant()) {
+ if (value.value().isInt32())
+ store32(Imm32(value.value().toInt32()), address);
+ else
+ StoreUnboxedFailure(*this, failure);
+ } else if (value.reg().hasTyped()) {
+ if (value.reg().type() == MIRType::Int32)
+ store32(value.reg().typedReg().gpr(), address);
+ else
+ StoreUnboxedFailure(*this, failure);
+ } else {
+ if (failure)
+ branchTestInt32(Assembler::NotEqual, value.reg().valueReg(), failure);
+ storeUnboxedPayload(value.reg().valueReg(), address, /* width = */ 4);
+ }
+ break;
+
+ case JSVAL_TYPE_DOUBLE:
+ if (value.constant()) {
+ if (value.value().isNumber()) {
+ loadConstantDouble(value.value().toNumber(), ScratchDoubleReg);
+ storeDouble(ScratchDoubleReg, address);
+ } else {
+ StoreUnboxedFailure(*this, failure);
+ }
+ } else if (value.reg().hasTyped()) {
+ if (value.reg().type() == MIRType::Int32) {
+ convertInt32ToDouble(value.reg().typedReg().gpr(), ScratchDoubleReg);
+ storeDouble(ScratchDoubleReg, address);
+ } else if (value.reg().type() == MIRType::Double) {
+ storeDouble(value.reg().typedReg().fpu(), address);
+ } else {
+ StoreUnboxedFailure(*this, failure);
+ }
+ } else {
+ ValueOperand reg = value.reg().valueReg();
+ Label notInt32, end;
+ branchTestInt32(Assembler::NotEqual, reg, &notInt32);
+ int32ValueToDouble(reg, ScratchDoubleReg);
+ storeDouble(ScratchDoubleReg, address);
+ jump(&end);
+ bind(&notInt32);
+ if (failure)
+ branchTestDouble(Assembler::NotEqual, reg, failure);
+ storeValue(reg, address);
+ bind(&end);
+ }
+ break;
+
+ case JSVAL_TYPE_OBJECT:
+ if (value.constant()) {
+ if (value.value().isObjectOrNull())
+ storePtr(ImmGCPtr(value.value().toObjectOrNull()), address);
+ else
+ StoreUnboxedFailure(*this, failure);
+ } else if (value.reg().hasTyped()) {
+ MOZ_ASSERT(value.reg().type() != MIRType::Null);
+ if (value.reg().type() == MIRType::Object)
+ storePtr(value.reg().typedReg().gpr(), address);
+ else
+ StoreUnboxedFailure(*this, failure);
+ } else {
+ if (failure) {
+ Label ok;
+ branchTestNull(Assembler::Equal, value.reg().valueReg(), &ok);
+ branchTestObject(Assembler::NotEqual, value.reg().valueReg(), failure);
+ bind(&ok);
+ }
+ storeUnboxedPayload(value.reg().valueReg(), address, /* width = */ sizeof(uintptr_t));
+ }
+ break;
+
+ case JSVAL_TYPE_STRING:
+ if (value.constant()) {
+ if (value.value().isString())
+ storePtr(ImmGCPtr(value.value().toString()), address);
+ else
+ StoreUnboxedFailure(*this, failure);
+ } else if (value.reg().hasTyped()) {
+ if (value.reg().type() == MIRType::String)
+ storePtr(value.reg().typedReg().gpr(), address);
+ else
+ StoreUnboxedFailure(*this, failure);
+ } else {
+ if (failure)
+ branchTestString(Assembler::NotEqual, value.reg().valueReg(), failure);
+ storeUnboxedPayload(value.reg().valueReg(), address, /* width = */ sizeof(uintptr_t));
+ }
+ break;
+
+ default:
+ MOZ_CRASH();
+ }
+}
+
+template void
+MacroAssembler::storeUnboxedProperty(Address address, JSValueType type,
+ const ConstantOrRegister& value, Label* failure);
+
+template void
+MacroAssembler::storeUnboxedProperty(BaseIndex address, JSValueType type,
+ const ConstantOrRegister& value, Label* failure);
+
+void
+MacroAssembler::checkUnboxedArrayCapacity(Register obj, const RegisterOrInt32Constant& index,
+ Register temp, Label* failure)
+{
+ Address initLengthAddr(obj, UnboxedArrayObject::offsetOfCapacityIndexAndInitializedLength());
+ Address lengthAddr(obj, UnboxedArrayObject::offsetOfLength());
+
+ Label capacityIsIndex, done;
+ load32(initLengthAddr, temp);
+ branchTest32(Assembler::NonZero, temp, Imm32(UnboxedArrayObject::CapacityMask), &capacityIsIndex);
+ branch32(Assembler::BelowOrEqual, lengthAddr, index, failure);
+ jump(&done);
+ bind(&capacityIsIndex);
+
+ // Do a partial shift so that we can get an absolute offset from the base
+ // of CapacityArray to use.
+ JS_STATIC_ASSERT(sizeof(UnboxedArrayObject::CapacityArray[0]) == 4);
+ rshiftPtr(Imm32(UnboxedArrayObject::CapacityShift - 2), temp);
+ and32(Imm32(~0x3), temp);
+
+ addPtr(ImmPtr(&UnboxedArrayObject::CapacityArray), temp);
+ branch32(Assembler::BelowOrEqual, Address(temp, 0), index, failure);
+ bind(&done);
+}
+
// Inlined version of gc::CheckAllocatorState that checks the bare essentials
// and bails for anything that cannot be handled with our jit allocators.
void
@@ -1009,6 +1277,20 @@ MacroAssembler::initGCThing(Register obj, Register temp, JSObject* templateObj,
nbytes = (nbytes < sizeof(uintptr_t)) ? 0 : nbytes - sizeof(uintptr_t);
offset += sizeof(uintptr_t);
}
+ } else if (templateObj->is<UnboxedPlainObject>()) {
+ storePtr(ImmWord(0), Address(obj, UnboxedPlainObject::offsetOfExpando()));
+ if (initContents)
+ initUnboxedObjectContents(obj, &templateObj->as<UnboxedPlainObject>());
+ } else if (templateObj->is<UnboxedArrayObject>()) {
+ MOZ_ASSERT(templateObj->as<UnboxedArrayObject>().hasInlineElements());
+ int elementsOffset = UnboxedArrayObject::offsetOfInlineElements();
+ computeEffectiveAddress(Address(obj, elementsOffset), temp);
+ storePtr(temp, Address(obj, UnboxedArrayObject::offsetOfElements()));
+ store32(Imm32(templateObj->as<UnboxedArrayObject>().length()),
+ Address(obj, UnboxedArrayObject::offsetOfLength()));
+ uint32_t capacityIndex = templateObj->as<UnboxedArrayObject>().capacityIndex();
+ store32(Imm32(capacityIndex << UnboxedArrayObject::CapacityShift),
+ Address(obj, UnboxedArrayObject::offsetOfCapacityIndexAndInitializedLength()));
} else {
MOZ_CRASH("Unknown object");
}
@@ -1030,6 +1312,29 @@ MacroAssembler::initGCThing(Register obj, Register temp, JSObject* templateObj,
}
void
+MacroAssembler::initUnboxedObjectContents(Register object, UnboxedPlainObject* templateObject)
+{
+ const UnboxedLayout& layout = templateObject->layoutDontCheckGeneration();
+
+ // Initialize reference fields of the object, per UnboxedPlainObject::create.
+ if (const int32_t* list = layout.traceList()) {
+ while (*list != -1) {
+ storePtr(ImmGCPtr(GetJitContext()->runtime->names().empty),
+ Address(object, UnboxedPlainObject::offsetOfData() + *list));
+ list++;
+ }
+ list++;
+ while (*list != -1) {
+ storePtr(ImmWord(0),
+ Address(object, UnboxedPlainObject::offsetOfData() + *list));
+ list++;
+ }
+ // Unboxed objects don't have Values to initialize.
+ MOZ_ASSERT(*(list + 1) == -1);
+ }
+}
+
+void
MacroAssembler::compareStrings(JSOp op, Register left, Register right, Register result,
Label* fail)
{
diff --git a/js/src/jit/MacroAssembler.h b/js/src/jit/MacroAssembler.h
index d5cc95839d..b6616321c3 100644
--- a/js/src/jit/MacroAssembler.h
+++ b/js/src/jit/MacroAssembler.h
@@ -36,6 +36,7 @@
#include "vm/ProxyObject.h"
#include "vm/Shape.h"
#include "vm/TypedArrayObject.h"
+#include "vm/UnboxedObject.h"
using mozilla::FloatingPoint;
@@ -1625,6 +1626,20 @@ class MacroAssembler : public MacroAssemblerSpecific
void storeToTypedFloatArray(Scalar::Type arrayType, FloatRegister value, const Address& dest,
unsigned numElems = 0);
+ // Load a property from an UnboxedPlainObject or UnboxedArrayObject.
+ template <typename T>
+ void loadUnboxedProperty(T address, JSValueType type, TypedOrValueRegister output);
+
+ // Store a property to an UnboxedPlainObject, without triggering barriers.
+ // If failure is null, the value definitely has a type suitable for storing
+ // in the property.
+ template <typename T>
+ void storeUnboxedProperty(T address, JSValueType type,
+ const ConstantOrRegister& value, Label* failure);
+
+ void checkUnboxedArrayCapacity(Register obj, const RegisterOrInt32Constant& index,
+ Register temp, Label* failure);
+
Register extractString(const Address& address, Register scratch) {
return extractObject(address, scratch);
}
@@ -1701,6 +1716,8 @@ class MacroAssembler : public MacroAssemblerSpecific
LiveRegisterSet liveRegs, Label* fail,
TypedArrayObject* templateObj, TypedArrayLength lengthKind);
+ void initUnboxedObjectContents(Register object, UnboxedPlainObject* templateObject);
+
void newGCString(Register result, Register temp, Label* fail);
void newGCFatInlineString(Register result, Register temp, Label* fail);
diff --git a/js/src/jit/OptimizationTracking.cpp b/js/src/jit/OptimizationTracking.cpp
index 7d72795a01..308def0411 100644
--- a/js/src/jit/OptimizationTracking.cpp
+++ b/js/src/jit/OptimizationTracking.cpp
@@ -844,6 +844,8 @@ MaybeConstructorFromType(TypeSet::Type ty)
return nullptr;
ObjectGroup* obj = ty.group();
TypeNewScript* newScript = obj->newScript();
+ if (!newScript && obj->maybeUnboxedLayout())
+ newScript = obj->unboxedLayout().newScript();
return newScript ? newScript->function() : nullptr;
}
diff --git a/js/src/jit/Recover.cpp b/js/src/jit/Recover.cpp
index 793b631df0..6fd71f3774 100644
--- a/js/src/jit/Recover.cpp
+++ b/js/src/jit/Recover.cpp
@@ -30,6 +30,7 @@
#include "vm/Interpreter-inl.h"
#include "vm/NativeObject-inl.h"
+#include "vm/UnboxedObject-inl.h"
using namespace js;
using namespace js::jit;
@@ -1354,7 +1355,7 @@ RNewArray::recover(JSContext* cx, SnapshotIterator& iter) const
RootedValue result(cx);
RootedObjectGroup group(cx, templateObject->group());
- ArrayObject* resultObject = NewFullyAllocatedArrayTryUseGroup(cx, group, count_);
+ JSObject* resultObject = NewFullyAllocatedArrayTryUseGroup(cx, group, count_);
if (!resultObject)
return false;
@@ -1539,12 +1540,37 @@ RObjectState::recover(JSContext* cx, SnapshotIterator& iter) const
RootedObject object(cx, &iter.read().toObject());
RootedValue val(cx);
- RootedNativeObject nativeObject(cx, &object->as<NativeObject>());
- MOZ_ASSERT(nativeObject->slotSpan() == numSlots());
+ if (object->is<UnboxedPlainObject>()) {
+ const UnboxedLayout& layout = object->as<UnboxedPlainObject>().layout();
- for (size_t i = 0; i < numSlots(); i++) {
- val = iter.read();
- nativeObject->setSlot(i, val);
+ RootedId id(cx);
+ RootedValue receiver(cx, ObjectValue(*object));
+ const UnboxedLayout::PropertyVector& properties = layout.properties();
+ for (size_t i = 0; i < properties.length(); i++) {
+ val = iter.read();
+
+ // This is the default placeholder value of MObjectState, when no
+ // properties are defined yet.
+ if (val.isUndefined())
+ continue;
+
+ id = NameToId(properties[i].name);
+ ObjectOpResult result;
+
+ // SetProperty can only fail due to OOM.
+ if (!SetProperty(cx, object, id, val, receiver, result))
+ return false;
+ if (!result)
+ return result.reportError(cx, object, id);
+ }
+ } else {
+ RootedNativeObject nativeObject(cx, &object->as<NativeObject>());
+ MOZ_ASSERT(nativeObject->slotSpan() == numSlots());
+
+ for (size_t i = 0; i < numSlots(); i++) {
+ val = iter.read();
+ nativeObject->setSlot(i, val);
+ }
}
val.setObject(*object);
diff --git a/js/src/jit/ScalarReplacement.cpp b/js/src/jit/ScalarReplacement.cpp
index 97ba52349f..4614b21627 100644
--- a/js/src/jit/ScalarReplacement.cpp
+++ b/js/src/jit/ScalarReplacement.cpp
@@ -13,6 +13,7 @@
#include "jit/MIR.h"
#include "jit/MIRGenerator.h"
#include "jit/MIRGraph.h"
+#include "vm/UnboxedObject.h"
#include "jsobjinlines.h"
@@ -182,6 +183,25 @@ IsObjectEscaped(MInstruction* ins, JSObject* objDefault)
JitSpewDef(JitSpew_Escape, "is escaped by\n", def);
return true;
+ case MDefinition::Op_LoadUnboxedScalar:
+ case MDefinition::Op_StoreUnboxedScalar:
+ case MDefinition::Op_LoadUnboxedObjectOrNull:
+ case MDefinition::Op_StoreUnboxedObjectOrNull:
+ case MDefinition::Op_LoadUnboxedString:
+ case MDefinition::Op_StoreUnboxedString:
+ // Not escaped if it is the first argument.
+ if (def->indexOf(*i) != 0) {
+ JitSpewDef(JitSpew_Escape, "is escaped by\n", def);
+ return true;
+ }
+
+ if (!def->getOperand(1)->isConstant()) {
+ JitSpewDef(JitSpew_Escape, "is addressed with unknown index\n", def);
+ return true;
+ }
+
+ break;
+
case MDefinition::Op_PostWriteBarrier:
break;
@@ -285,6 +305,16 @@ class ObjectMemoryView : public MDefinitionVisitorDefaultNoop
void visitGuardShape(MGuardShape* ins);
void visitFunctionEnvironment(MFunctionEnvironment* ins);
void visitLambda(MLambda* ins);
+ void visitStoreUnboxedScalar(MStoreUnboxedScalar* ins);
+ void visitLoadUnboxedScalar(MLoadUnboxedScalar* ins);
+ void visitStoreUnboxedObjectOrNull(MStoreUnboxedObjectOrNull* ins);
+ void visitLoadUnboxedObjectOrNull(MLoadUnboxedObjectOrNull* ins);
+ void visitStoreUnboxedString(MStoreUnboxedString* ins);
+ void visitLoadUnboxedString(MLoadUnboxedString* ins);
+
+ private:
+ void storeOffset(MInstruction* ins, size_t offset, MDefinition* value);
+ void loadOffset(MInstruction* ins, size_t offset);
};
const char* ObjectMemoryView::phaseName = "Scalar Replacement of Object";
@@ -626,6 +656,121 @@ ObjectMemoryView::visitLambda(MLambda* ins)
ins->setIncompleteObject();
}
+static size_t
+GetOffsetOf(MDefinition* index, size_t width, int32_t baseOffset)
+{
+ int32_t idx = index->toConstant()->toInt32();
+ MOZ_ASSERT(idx >= 0);
+ MOZ_ASSERT(baseOffset >= 0 && size_t(baseOffset) >= UnboxedPlainObject::offsetOfData());
+ return idx * width + baseOffset - UnboxedPlainObject::offsetOfData();
+}
+
+static size_t
+GetOffsetOf(MDefinition* index, Scalar::Type type, int32_t baseOffset)
+{
+ return GetOffsetOf(index, Scalar::byteSize(type), baseOffset);
+}
+
+void
+ObjectMemoryView::storeOffset(MInstruction* ins, size_t offset, MDefinition* value)
+{
+ // Clone the state and update the slot value.
+ MOZ_ASSERT(state_->hasOffset(offset));
+ state_ = BlockState::Copy(alloc_, state_);
+ if (!state_) {
+ oom_ = true;
+ return;
+ }
+
+ state_->setOffset(offset, value);
+ ins->block()->insertBefore(ins, state_);
+
+ // Remove original instruction.
+ ins->block()->discard(ins);
+}
+
+void
+ObjectMemoryView::loadOffset(MInstruction* ins, size_t offset)
+{
+ // Replace load by the slot value.
+ MOZ_ASSERT(state_->hasOffset(offset));
+ ins->replaceAllUsesWith(state_->getOffset(offset));
+
+ // Remove original instruction.
+ ins->block()->discard(ins);
+}
+
+void
+ObjectMemoryView::visitStoreUnboxedScalar(MStoreUnboxedScalar* ins)
+{
+ // Skip stores made on other objects.
+ if (ins->elements() != obj_)
+ return;
+
+ size_t offset = GetOffsetOf(ins->index(), ins->storageType(), ins->offsetAdjustment());
+ storeOffset(ins, offset, ins->value());
+}
+
+void
+ObjectMemoryView::visitLoadUnboxedScalar(MLoadUnboxedScalar* ins)
+{
+ // Skip loads made on other objects.
+ if (ins->elements() != obj_)
+ return;
+
+ // Replace load by the slot value.
+ size_t offset = GetOffsetOf(ins->index(), ins->storageType(), ins->offsetAdjustment());
+ loadOffset(ins, offset);
+}
+
+void
+ObjectMemoryView::visitStoreUnboxedObjectOrNull(MStoreUnboxedObjectOrNull* ins)
+{
+ // Skip stores made on other objects.
+ if (ins->elements() != obj_)
+ return;
+
+ // Clone the state and update the slot value.
+ size_t offset = GetOffsetOf(ins->index(), sizeof(uintptr_t), ins->offsetAdjustment());
+ storeOffset(ins, offset, ins->value());
+}
+
+void
+ObjectMemoryView::visitLoadUnboxedObjectOrNull(MLoadUnboxedObjectOrNull* ins)
+{
+ // Skip loads made on other objects.
+ if (ins->elements() != obj_)
+ return;
+
+ // Replace load by the slot value.
+ size_t offset = GetOffsetOf(ins->index(), sizeof(uintptr_t), ins->offsetAdjustment());
+ loadOffset(ins, offset);
+}
+
+void
+ObjectMemoryView::visitStoreUnboxedString(MStoreUnboxedString* ins)
+{
+ // Skip stores made on other objects.
+ if (ins->elements() != obj_)
+ return;
+
+ // Clone the state and update the slot value.
+ size_t offset = GetOffsetOf(ins->index(), sizeof(uintptr_t), ins->offsetAdjustment());
+ storeOffset(ins, offset, ins->value());
+}
+
+void
+ObjectMemoryView::visitLoadUnboxedString(MLoadUnboxedString* ins)
+{
+ // Skip loads made on other objects.
+ if (ins->elements() != obj_)
+ return;
+
+ // Replace load by the slot value.
+ size_t offset = GetOffsetOf(ins->index(), sizeof(uintptr_t), ins->offsetAdjustment());
+ loadOffset(ins, offset);
+}
+
static bool
IndexOf(MDefinition* ins, int32_t* res)
{
@@ -762,6 +907,11 @@ IsArrayEscaped(MInstruction* ins)
return true;
}
+ if (obj->is<UnboxedArrayObject>()) {
+ JitSpew(JitSpew_Escape, "Template object is an unboxed plain object.");
+ return true;
+ }
+
if (length >= 16) {
JitSpew(JitSpew_Escape, "Array has too many elements");
return true;
diff --git a/js/src/jit/SharedIC.cpp b/js/src/jit/SharedIC.cpp
index 05a95824fb..767cff661a 100644
--- a/js/src/jit/SharedIC.cpp
+++ b/js/src/jit/SharedIC.cpp
@@ -27,7 +27,6 @@
#endif
#include "jit/VMFunctions.h"
#include "vm/Interpreter.h"
-#include "vm/NativeObject-inl.h"
#include "jit/MacroAssembler-inl.h"
#include "vm/Interpreter-inl.h"
@@ -286,6 +285,11 @@ ICStub::trace(JSTracer* trc)
TraceEdge(trc, &getElemStub->shape(), "baseline-getelem-dense-shape");
break;
}
+ case ICStub::GetElem_UnboxedArray: {
+ ICGetElem_UnboxedArray* getElemStub = toGetElem_UnboxedArray();
+ TraceEdge(trc, &getElemStub->group(), "baseline-getelem-unboxed-array-group");
+ break;
+ }
case ICStub::GetElem_TypedArray: {
ICGetElem_TypedArray* getElemStub = toGetElem_TypedArray();
TraceEdge(trc, &getElemStub->shape(), "baseline-getelem-typedarray-shape");
@@ -2244,7 +2248,9 @@ IsCacheableProtoChain(JSObject* obj, JSObject* holder, bool isDOMProxy)
if (!isDOMProxy && !obj->isNative()) {
if (obj == holder)
return false;
- if (!obj->is<TypedObject>())
+ if (!obj->is<UnboxedPlainObject>() &&
+ !obj->is<UnboxedArrayObject>() &&
+ !obj->is<TypedObject>())
{
return false;
}
@@ -2572,6 +2578,12 @@ CheckHasNoSuchProperty(JSContext* cx, JSObject* obj, PropertyName* name,
} else if (curObj != obj) {
// Non-native objects are only handled as the original receiver.
return false;
+ } else if (curObj->is<UnboxedPlainObject>()) {
+ if (curObj->as<UnboxedPlainObject>().containsUnboxedOrExpandoProperty(cx, NameToId(name)))
+ return false;
+ } else if (curObj->is<UnboxedArrayObject>()) {
+ if (name == cx->names().length)
+ return false;
} else if (curObj->is<TypedObject>()) {
if (curObj->as<TypedObject>().typeDescr().hasProperty(cx->names(), NameToId(name)))
return false;
@@ -2836,15 +2848,34 @@ GuardReceiverObject(MacroAssembler& masm, ReceiverGuard guard,
{
Address groupAddress(ICStubReg, receiverGuardOffset + HeapReceiverGuard::offsetOfGroup());
Address shapeAddress(ICStubReg, receiverGuardOffset + HeapReceiverGuard::offsetOfShape());
+ Address expandoAddress(object, UnboxedPlainObject::offsetOfExpando());
if (guard.group) {
masm.loadPtr(groupAddress, scratch);
masm.branchTestObjGroup(Assembler::NotEqual, object, scratch, failure);
+
+ if (guard.group->clasp() == &UnboxedPlainObject::class_ && !guard.shape) {
+ // Guard the unboxed object has no expando object.
+ masm.branchPtr(Assembler::NotEqual, expandoAddress, ImmWord(0), failure);
+ }
}
if (guard.shape) {
masm.loadPtr(shapeAddress, scratch);
- masm.branchTestObjShape(Assembler::NotEqual, object, scratch, failure);
+ if (guard.group && guard.group->clasp() == &UnboxedPlainObject::class_) {
+ // Guard the unboxed object has a matching expando object.
+ masm.branchPtr(Assembler::Equal, expandoAddress, ImmWord(0), failure);
+ Label done;
+ masm.push(object);
+ masm.loadPtr(expandoAddress, object);
+ masm.branchTestObjShape(Assembler::Equal, object, scratch, &done);
+ masm.pop(object);
+ masm.jump(failure);
+ masm.bind(&done);
+ masm.pop(object);
+ } else {
+ masm.branchTestObjShape(Assembler::NotEqual, object, scratch, failure);
+ }
}
}
@@ -4228,7 +4259,8 @@ DoNewObject(JSContext* cx, void* payload, ICNewObject_Fallback* stub, MutableHan
return false;
if (!stub->invalid() &&
- !templateObject->as<PlainObject>().hasDynamicSlots())
+ (templateObject->is<UnboxedPlainObject>() ||
+ !templateObject->as<PlainObject>().hasDynamicSlots()))
{
JitCode* code = GenerateNewObjectWithTemplateCode(cx, templateObject);
if (!code)
diff --git a/js/src/jit/VMFunctions.cpp b/js/src/jit/VMFunctions.cpp
index 652c23bf15..10be2836b4 100644
--- a/js/src/jit/VMFunctions.cpp
+++ b/js/src/jit/VMFunctions.cpp
@@ -28,7 +28,7 @@
#include "vm/NativeObject-inl.h"
#include "vm/StringObject-inl.h"
#include "vm/TypeInference-inl.h"
-#include "gc/StoreBuffer-inl.h"
+#include "vm/UnboxedObject-inl.h"
using namespace js;
using namespace js::jit;
@@ -306,7 +306,7 @@ template bool StringsEqual<false>(JSContext* cx, HandleString lhs, HandleString
bool
ArrayPopDense(JSContext* cx, HandleObject obj, MutableHandleValue rval)
{
- MOZ_ASSERT(obj->is<ArrayObject>());
+ MOZ_ASSERT(obj->is<ArrayObject>() || obj->is<UnboxedArrayObject>());
AutoDetectInvalidation adi(cx, rval);
@@ -325,11 +325,12 @@ ArrayPopDense(JSContext* cx, HandleObject obj, MutableHandleValue rval)
}
bool
-ArrayPushDense(JSContext* cx, HandleArrayObject arr, HandleValue v, uint32_t* length)
+ArrayPushDense(JSContext* cx, HandleObject obj, HandleValue v, uint32_t* length)
{
- *length = arr->length();
- DenseElementResult result = arr->setOrExtendDenseElements(cx, *length, v.address(), 1,
- ShouldUpdateTypes::DontUpdate);
+ *length = GetAnyBoxedOrUnboxedArrayLength(obj);
+ DenseElementResult result =
+ SetOrExtendAnyBoxedOrUnboxedDenseElements(cx, obj, *length, v.address(), 1,
+ ShouldUpdateTypes::DontUpdate);
if (result != DenseElementResult::Incomplete) {
(*length)++;
return result == DenseElementResult::Success;
@@ -337,7 +338,7 @@ ArrayPushDense(JSContext* cx, HandleArrayObject arr, HandleValue v, uint32_t* le
JS::AutoValueArray<3> argv(cx);
argv[0].setUndefined();
- argv[1].setObject(*arr);
+ argv[1].setObject(*obj);
argv[2].set(v);
if (!js::array_push(cx, 1, argv.begin()))
return false;
@@ -349,7 +350,7 @@ ArrayPushDense(JSContext* cx, HandleArrayObject arr, HandleValue v, uint32_t* le
bool
ArrayShiftDense(JSContext* cx, HandleObject obj, MutableHandleValue rval)
{
- MOZ_ASSERT(obj->is<ArrayObject>());
+ MOZ_ASSERT(obj->is<ArrayObject>() || obj->is<UnboxedArrayObject>());
AutoDetectInvalidation adi(cx, rval);
@@ -1130,14 +1131,16 @@ Recompile(JSContext* cx)
}
bool
-SetDenseElement(JSContext* cx, HandleNativeObject obj, int32_t index, HandleValue value, bool strict)
+SetDenseOrUnboxedArrayElement(JSContext* cx, HandleObject obj, int32_t index,
+ HandleValue value, bool strict)
{
// This function is called from Ion code for StoreElementHole's OOL path.
- // In this case we know the object is native and that no type changes are
- // needed.
+ // In this case we know the object is native or an unboxed array and that
+ // no type changes are needed.
- DenseElementResult result = obj->setOrExtendDenseElements(cx, index, value.address(), 1,
- ShouldUpdateTypes::DontUpdate);
+ DenseElementResult result =
+ SetOrExtendAnyBoxedOrUnboxedDenseElements(cx, obj, index, value.address(), 1,
+ ShouldUpdateTypes::DontUpdate);
if (result != DenseElementResult::Incomplete)
return result == DenseElementResult::Success;
diff --git a/js/src/jit/VMFunctions.h b/js/src/jit/VMFunctions.h
index 94f7413971..7f225c2933 100644
--- a/js/src/jit/VMFunctions.h
+++ b/js/src/jit/VMFunctions.h
@@ -622,7 +622,7 @@ template<bool Equal>
bool StringsEqual(JSContext* cx, HandleString left, HandleString right, bool* res);
MOZ_MUST_USE bool ArrayPopDense(JSContext* cx, HandleObject obj, MutableHandleValue rval);
-MOZ_MUST_USE bool ArrayPushDense(JSContext* cx, HandleArrayObject obj, HandleValue v, uint32_t* length);
+MOZ_MUST_USE bool ArrayPushDense(JSContext* cx, HandleObject obj, HandleValue v, uint32_t* length);
MOZ_MUST_USE bool ArrayShiftDense(JSContext* cx, HandleObject obj, MutableHandleValue rval);
JSString* ArrayJoin(JSContext* cx, HandleObject array, HandleString sep);
@@ -745,8 +745,8 @@ ForcedRecompile(JSContext* cx);
JSString* StringReplace(JSContext* cx, HandleString string, HandleString pattern,
HandleString repl);
-MOZ_MUST_USE bool SetDenseElement(JSContext* cx, HandleNativeObject obj, int32_t index,
- HandleValue value, bool strict);
+MOZ_MUST_USE bool SetDenseOrUnboxedArrayElement(JSContext* cx, HandleObject obj, int32_t index,
+ HandleValue value, bool strict);
void AssertValidObjectPtr(JSContext* cx, JSObject* obj);
void AssertValidObjectOrNullPtr(JSContext* cx, JSObject* obj);
diff --git a/js/src/jit/shared/LIR-shared.h b/js/src/jit/shared/LIR-shared.h
index ff4915d1a7..e6aab6ba38 100644
--- a/js/src/jit/shared/LIR-shared.h
+++ b/js/src/jit/shared/LIR-shared.h
@@ -5166,6 +5166,72 @@ class LSetInitializedLength : public LInstructionHelper<0, 2, 0>
}
};
+class LUnboxedArrayLength : public LInstructionHelper<1, 1, 0>
+{
+ public:
+ LIR_HEADER(UnboxedArrayLength)
+
+ explicit LUnboxedArrayLength(const LAllocation& object) {
+ setOperand(0, object);
+ }
+
+ const LAllocation* object() {
+ return getOperand(0);
+ }
+};
+
+class LUnboxedArrayInitializedLength : public LInstructionHelper<1, 1, 0>
+{
+ public:
+ LIR_HEADER(UnboxedArrayInitializedLength)
+
+ explicit LUnboxedArrayInitializedLength(const LAllocation& object) {
+ setOperand(0, object);
+ }
+
+ const LAllocation* object() {
+ return getOperand(0);
+ }
+};
+
+class LIncrementUnboxedArrayInitializedLength : public LInstructionHelper<0, 1, 0>
+{
+ public:
+ LIR_HEADER(IncrementUnboxedArrayInitializedLength)
+
+ explicit LIncrementUnboxedArrayInitializedLength(const LAllocation& object) {
+ setOperand(0, object);
+ }
+
+ const LAllocation* object() {
+ return getOperand(0);
+ }
+};
+
+class LSetUnboxedArrayInitializedLength : public LInstructionHelper<0, 2, 1>
+{
+ public:
+ LIR_HEADER(SetUnboxedArrayInitializedLength)
+
+ explicit LSetUnboxedArrayInitializedLength(const LAllocation& object,
+ const LAllocation& length,
+ const LDefinition& temp) {
+ setOperand(0, object);
+ setOperand(1, length);
+ setTemp(0, temp);
+ }
+
+ const LAllocation* object() {
+ return getOperand(0);
+ }
+ const LAllocation* length() {
+ return getOperand(1);
+ }
+ const LDefinition* temp() {
+ return getTemp(0);
+ }
+};
+
// Load the length from an elements header.
class LArrayLength : public LInstructionHelper<1, 1, 0>
{
@@ -5670,17 +5736,19 @@ class LStoreElementT : public LInstructionHelper<0, 3, 0>
};
// Like LStoreElementV, but supports indexes >= initialized length.
-class LStoreElementHoleV : public LInstructionHelper<0, 3 + BOX_PIECES, 0>
+class LStoreElementHoleV : public LInstructionHelper<0, 3 + BOX_PIECES, 1>
{
public:
LIR_HEADER(StoreElementHoleV)
LStoreElementHoleV(const LAllocation& object, const LAllocation& elements,
- const LAllocation& index, const LBoxAllocation& value) {
+ const LAllocation& index, const LBoxAllocation& value,
+ const LDefinition& temp) {
setOperand(0, object);
setOperand(1, elements);
setOperand(2, index);
setBoxOperand(Value, value);
+ setTemp(0, temp);
}
static const size_t Value = 3;
@@ -5700,17 +5768,19 @@ class LStoreElementHoleV : public LInstructionHelper<0, 3 + BOX_PIECES, 0>
};
// Like LStoreElementT, but supports indexes >= initialized length.
-class LStoreElementHoleT : public LInstructionHelper<0, 4, 0>
+class LStoreElementHoleT : public LInstructionHelper<0, 4, 1>
{
public:
LIR_HEADER(StoreElementHoleT)
LStoreElementHoleT(const LAllocation& object, const LAllocation& elements,
- const LAllocation& index, const LAllocation& value) {
+ const LAllocation& index, const LAllocation& value,
+ const LDefinition& temp) {
setOperand(0, object);
setOperand(1, elements);
setOperand(2, index);
setOperand(3, value);
+ setTemp(0, temp);
}
const MStoreElementHole* mir() const {
@@ -5731,17 +5801,19 @@ class LStoreElementHoleT : public LInstructionHelper<0, 4, 0>
};
// Like LStoreElementV, but can just ignore assignment (for eg. frozen objects)
-class LFallibleStoreElementV : public LInstructionHelper<0, 3 + BOX_PIECES, 0>
+class LFallibleStoreElementV : public LInstructionHelper<0, 3 + BOX_PIECES, 1>
{
public:
LIR_HEADER(FallibleStoreElementV)
LFallibleStoreElementV(const LAllocation& object, const LAllocation& elements,
- const LAllocation& index, const LBoxAllocation& value) {
+ const LAllocation& index, const LBoxAllocation& value,
+ const LDefinition& temp) {
setOperand(0, object);
setOperand(1, elements);
setOperand(2, index);
setBoxOperand(Value, value);
+ setTemp(0, temp);
}
static const size_t Value = 3;
@@ -5761,17 +5833,19 @@ class LFallibleStoreElementV : public LInstructionHelper<0, 3 + BOX_PIECES, 0>
};
// Like LStoreElementT, but can just ignore assignment (for eg. frozen objects)
-class LFallibleStoreElementT : public LInstructionHelper<0, 4, 0>
+class LFallibleStoreElementT : public LInstructionHelper<0, 4, 1>
{
public:
LIR_HEADER(FallibleStoreElementT)
LFallibleStoreElementT(const LAllocation& object, const LAllocation& elements,
- const LAllocation& index, const LAllocation& value) {
+ const LAllocation& index, const LAllocation& value,
+ const LDefinition& temp) {
setOperand(0, object);
setOperand(1, elements);
setOperand(2, index);
setOperand(3, value);
+ setTemp(0, temp);
}
const MFallibleStoreElement* mir() const {
@@ -5818,6 +5892,22 @@ class LStoreUnboxedPointer : public LInstructionHelper<0, 3, 0>
}
};
+// If necessary, convert an unboxed object in a particular group to its native
+// representation.
+class LConvertUnboxedObjectToNative : public LInstructionHelper<0, 1, 0>
+{
+ public:
+ LIR_HEADER(ConvertUnboxedObjectToNative)
+
+ explicit LConvertUnboxedObjectToNative(const LAllocation& object) {
+ setOperand(0, object);
+ }
+
+ MConvertUnboxedObjectToNative* mir() {
+ return mir_->toConvertUnboxedObjectToNative();
+ }
+};
+
class LArrayPopShiftV : public LInstructionHelper<BOX_PIECES, 1, 2>
{
public:
@@ -7340,6 +7430,38 @@ class LGuardReceiverPolymorphic : public LInstructionHelper<0, 1, 1>
}
};
+class LGuardUnboxedExpando : public LInstructionHelper<0, 1, 0>
+{
+ public:
+ LIR_HEADER(GuardUnboxedExpando)
+
+ explicit LGuardUnboxedExpando(const LAllocation& in) {
+ setOperand(0, in);
+ }
+ const LAllocation* object() {
+ return getOperand(0);
+ }
+ const MGuardUnboxedExpando* mir() const {
+ return mir_->toGuardUnboxedExpando();
+ }
+};
+
+class LLoadUnboxedExpando : public LInstructionHelper<1, 1, 0>
+{
+ public:
+ LIR_HEADER(LoadUnboxedExpando)
+
+ explicit LLoadUnboxedExpando(const LAllocation& in) {
+ setOperand(0, in);
+ }
+ const LAllocation* object() {
+ return getOperand(0);
+ }
+ const MLoadUnboxedExpando* mir() const {
+ return mir_->toLoadUnboxedExpando();
+ }
+};
+
// Guard that a value is in a TypeSet.
class LTypeBarrierV : public LInstructionHelper<0, BOX_PIECES, 1>
{
diff --git a/js/src/jit/shared/LOpcodes-shared.h b/js/src/jit/shared/LOpcodes-shared.h
index 56b98940af..ea185e1b88 100644
--- a/js/src/jit/shared/LOpcodes-shared.h
+++ b/js/src/jit/shared/LOpcodes-shared.h
@@ -257,6 +257,8 @@
_(GuardObjectGroup) \
_(GuardObjectIdentity) \
_(GuardClass) \
+ _(GuardUnboxedExpando) \
+ _(LoadUnboxedExpando) \
_(TypeBarrierV) \
_(TypeBarrierO) \
_(MonitorTypes) \
@@ -266,6 +268,10 @@
_(PostWriteElementBarrierV) \
_(InitializedLength) \
_(SetInitializedLength) \
+ _(UnboxedArrayLength) \
+ _(UnboxedArrayInitializedLength) \
+ _(IncrementUnboxedArrayInitializedLength) \
+ _(SetUnboxedArrayInitializedLength) \
_(BoundsCheck) \
_(BoundsCheckRange) \
_(BoundsCheckLower) \
@@ -280,6 +286,7 @@
_(StoreElementT) \
_(StoreUnboxedScalar) \
_(StoreUnboxedPointer) \
+ _(ConvertUnboxedObjectToNative) \
_(ArrayPopShiftV) \
_(ArrayPopShiftT) \
_(ArrayPushV) \
diff --git a/js/src/jsapi-tests/testGCAllocator.cpp b/js/src/jsapi-tests/testGCAllocator.cpp
index d203019ecb..c7f430cb01 100644
--- a/js/src/jsapi-tests/testGCAllocator.cpp
+++ b/js/src/jsapi-tests/testGCAllocator.cpp
@@ -302,7 +302,8 @@ void unmapPages(void* p, size_t size) { }
void*
mapMemoryAt(void* desired, size_t length)
{
-#if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__)) || defined(__aarch64__)
+#if defined(__ia64__) || defined(__aarch64__) || \
+ (defined(__sparc__) && defined(__arch64__) && (defined(__NetBSD__) || defined(__linux__)))
MOZ_RELEASE_ASSERT(0xffff800000000000ULL & (uintptr_t(desired) + length - 1) == 0);
#endif
void* region = mmap(desired, length, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
@@ -324,7 +325,7 @@ mapMemory(size_t length)
int fd = -1;
off_t offset = 0;
// The test code must be aligned with the implementation in gc/Memory.cpp.
-#if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__))
+#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__NetBSD__))
void* region = mmap((void*)0x0000070000000000, length, prot, flags, fd, offset);
if (region == MAP_FAILED)
return nullptr;
@@ -334,7 +335,7 @@ mapMemory(size_t length)
return nullptr;
}
return region;
-#elif defined(__aarch64__)
+#elif defined(__aarch64__) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__))
const uintptr_t start = UINT64_C(0x0000070000000000);
const uintptr_t end = UINT64_C(0x0000800000000000);
const uintptr_t step = js::gc::ChunkSize;
diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp
index 6483641f32..cb3945152a 100644
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -6588,6 +6588,9 @@ JS_SetGlobalJitCompilerOption(JSContext* cx, JSJitCompilerOption opt, uint32_t v
}
jit::JitOptions.jumpThreshold = value;
break;
+ case JSJITCOMPILER_UNBOXED_OBJECTS:
+ jit::JitOptions.disableUnboxedObjects = !value;
+ break;
case JSJITCOMPILER_ASMJS_ATOMICS_ENABLE:
jit::JitOptions.asmJSAtomicsEnable = !!value;
break;
diff --git a/js/src/jsapi.h b/js/src/jsapi.h
index 7795c5e4ca..9138a4a92f 100644
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -1096,6 +1096,7 @@ class JS_PUBLIC_API(ContextOptions) {
wasmAlwaysBaseline_(false),
throwOnAsmJSValidationFailure_(false),
nativeRegExp_(true),
+ unboxedArrays_(false),
asyncStack_(true),
throwOnDebuggeeWouldRun_(true),
dumpStackOnDebuggeeWouldRun_(false),
@@ -1172,6 +1173,12 @@ class JS_PUBLIC_API(ContextOptions) {
return *this;
}
+ bool unboxedArrays() const { return unboxedArrays_; }
+ ContextOptions& setUnboxedArrays(bool flag) {
+ unboxedArrays_ = flag;
+ return *this;
+ }
+
bool asyncStack() const { return asyncStack_; }
ContextOptions& setAsyncStack(bool flag) {
asyncStack_ = flag;
@@ -1234,6 +1241,7 @@ class JS_PUBLIC_API(ContextOptions) {
bool wasmAlwaysBaseline_ : 1;
bool throwOnAsmJSValidationFailure_ : 1;
bool nativeRegExp_ : 1;
+ bool unboxedArrays_ : 1;
bool asyncStack_ : 1;
bool throwOnDebuggeeWouldRun_ : 1;
bool dumpStackOnDebuggeeWouldRun_ : 1;
@@ -5888,19 +5896,20 @@ JS_SetParallelParsingEnabled(JSContext* cx, bool enabled);
extern JS_PUBLIC_API(void)
JS_SetOffthreadIonCompilationEnabled(JSContext* cx, bool enabled);
-#define JIT_COMPILER_OPTIONS(Register) \
- Register(BASELINE_WARMUP_TRIGGER, "baseline.warmup.trigger") \
- Register(ION_WARMUP_TRIGGER, "ion.warmup.trigger") \
- Register(ION_GVN_ENABLE, "ion.gvn.enable") \
- Register(ION_FORCE_IC, "ion.forceinlineCaches") \
- Register(ION_ENABLE, "ion.enable") \
+#define JIT_COMPILER_OPTIONS(Register) \
+ Register(BASELINE_WARMUP_TRIGGER, "baseline.warmup.trigger") \
+ Register(ION_WARMUP_TRIGGER, "ion.warmup.trigger") \
+ Register(ION_GVN_ENABLE, "ion.gvn.enable") \
+ Register(ION_FORCE_IC, "ion.forceinlineCaches") \
+ Register(ION_ENABLE, "ion.enable") \
Register(ION_INTERRUPT_WITHOUT_SIGNAL, "ion.interrupt-without-signals") \
- Register(ION_CHECK_RANGE_ANALYSIS, "ion.check-range-analysis") \
- Register(BASELINE_ENABLE, "baseline.enable") \
- Register(OFFTHREAD_COMPILATION_ENABLE, "offthread-compilation.enable") \
- Register(JUMP_THRESHOLD, "jump-threshold") \
- Register(ASMJS_ATOMICS_ENABLE, "asmjs.atomics.enable") \
- Register(WASM_TEST_MODE, "wasm.test-mode") \
+ Register(ION_CHECK_RANGE_ANALYSIS, "ion.check-range-analysis") \
+ Register(BASELINE_ENABLE, "baseline.enable") \
+ Register(OFFTHREAD_COMPILATION_ENABLE, "offthread-compilation.enable") \
+ Register(JUMP_THRESHOLD, "jump-threshold") \
+ Register(UNBOXED_OBJECTS, "unboxed_objects") \
+ Register(ASMJS_ATOMICS_ENABLE, "asmjs.atomics.enable") \
+ Register(WASM_TEST_MODE, "wasm.test-mode") \
Register(WASM_FOLD_OFFSETS, "wasm.fold-offsets")
typedef enum JSJitCompilerOption {
diff --git a/js/src/jsarray.cpp b/js/src/jsarray.cpp
index 73243d9181..1724a0a667 100644
--- a/js/src/jsarray.cpp
+++ b/js/src/jsarray.cpp
@@ -45,6 +45,7 @@
#include "vm/Caches-inl.h"
#include "vm/Interpreter-inl.h"
#include "vm/NativeObject-inl.h"
+#include "vm/UnboxedObject-inl.h"
using namespace js;
using namespace js::gc;
@@ -63,7 +64,7 @@ using JS::ToUint32;
bool
JS::IsArray(JSContext* cx, HandleObject obj, IsArrayAnswer* answer)
{
- if (obj->is<ArrayObject>()) {
+ if (obj->is<ArrayObject>() || obj->is<UnboxedArrayObject>()) {
*answer = IsArrayAnswer::Array;
return true;
}
@@ -99,6 +100,11 @@ js::GetLengthProperty(JSContext* cx, HandleObject obj, uint32_t* lengthp)
return true;
}
+ if (obj->is<UnboxedArrayObject>()) {
+ *lengthp = obj->as<UnboxedArrayObject>().length();
+ return true;
+ }
+
if (obj->is<ArgumentsObject>()) {
ArgumentsObject& argsobj = obj->as<ArgumentsObject>();
if (!argsobj.hasOverriddenLength()) {
@@ -247,20 +253,18 @@ static bool
GetElement(JSContext* cx, HandleObject obj, HandleObject receiver,
uint32_t index, bool* hole, MutableHandleValue vp)
{
- if (obj->isNative()) {
- NativeObject* nobj = &obj->as<NativeObject>();
- if (index < nobj->getDenseInitializedLength()) {
- vp.set(nobj->getDenseElement(size_t(index)));
- if (!vp.isMagic(JS_ELEMENTS_HOLE)) {
- *hole = false;
- return true;
- }
+ AssertGreaterThanZero(index);
+ if (index < GetAnyBoxedOrUnboxedInitializedLength(obj)) {
+ vp.set(GetAnyBoxedOrUnboxedDenseElement(obj, uint32_t(index)));
+ if (!vp.isMagic(JS_ELEMENTS_HOLE)) {
+ *hole = false;
+ return true;
}
- if (nobj->is<ArgumentsObject>() && index <= UINT32_MAX) {
- if (nobj->as<ArgumentsObject>().maybeGetElement(uint32_t(index), vp)) {
- *hole = false;
- return true;
- }
+ }
+ if (obj->is<ArgumentsObject>()) {
+ if (obj->as<ArgumentsObject>().maybeGetElement(uint32_t(index), vp)) {
+ *hole = false;
+ return true;
}
}
@@ -279,8 +283,8 @@ ElementAdder::append(JSContext* cx, HandleValue v)
{
MOZ_ASSERT(index_ < length_);
if (resObj_) {
- NativeObject* resObj = &resObj_->as<NativeObject>();
- DenseElementResult result = resObj->setOrExtendDenseElements(cx, index_, v.address(), 1);
+ DenseElementResult result =
+ SetOrExtendAnyBoxedOrUnboxedDenseElements(cx, resObj_, index_, v.address(), 1);
if (result == DenseElementResult::Failure)
return false;
if (result == DenseElementResult::Incomplete) {
@@ -332,31 +336,37 @@ js::GetElementsWithAdder(JSContext* cx, HandleObject obj, HandleObject receiver,
return true;
}
-static bool
-GetDenseElements(NativeObject* aobj, uint32_t length, Value* vp)
+template <JSValueType Type>
+DenseElementResult
+GetBoxedOrUnboxedDenseElements(JSObject* aobj, uint32_t length, Value* vp)
{
MOZ_ASSERT(!ObjectMayHaveExtraIndexedProperties(aobj));
- if (length > aobj->getDenseInitializedLength())
- return false;
+ if (length > GetBoxedOrUnboxedInitializedLength<Type>(aobj))
+ return DenseElementResult::Incomplete;
for (size_t i = 0; i < length; i++) {
- vp[i] = aobj->getDenseElement(i);
+ vp[i] = GetBoxedOrUnboxedDenseElement<Type>(aobj, i);
// No other indexed properties so hole => undefined.
if (vp[i].isMagic(JS_ELEMENTS_HOLE))
vp[i] = UndefinedValue();
}
- return true;
+ return DenseElementResult::Success;
}
+DefineBoxedOrUnboxedFunctor3(GetBoxedOrUnboxedDenseElements,
+ JSObject*, uint32_t, Value*);
+
bool
js::GetElements(JSContext* cx, HandleObject aobj, uint32_t length, Value* vp)
{
if (!ObjectMayHaveExtraIndexedProperties(aobj)) {
- if (GetDenseElements(&aobj->as<NativeObject>(), length, vp))
- return true;
+ GetBoxedOrUnboxedDenseElementsFunctor functor(aobj, length, vp);
+ DenseElementResult result = CallBoxedOrUnboxedSpecialization(functor, aobj);
+ if (result != DenseElementResult::Incomplete)
+ return result == DenseElementResult::Success;
}
if (aobj->is<ArgumentsObject>()) {
@@ -388,9 +398,9 @@ SetArrayElement(JSContext* cx, HandleObject obj, double index, HandleValue v)
{
MOZ_ASSERT(index >= 0);
- if (obj->is<ArrayObject>() && !obj->isIndexed() && index <= UINT32_MAX) {
- NativeObject* nobj = &obj->as<NativeObject>();
- DenseElementResult result = nobj->setOrExtendDenseElements(cx, uint32_t(index), v.address(), 1);
+ if ((obj->is<ArrayObject>() || obj->is<UnboxedArrayObject>()) && !obj->isIndexed() && index <= UINT32_MAX) {
+ DenseElementResult result =
+ SetOrExtendAnyBoxedOrUnboxedDenseElements(cx, obj, uint32_t(index), v.address(), 1);
if (result != DenseElementResult::Incomplete)
return result == DenseElementResult::Success;
}
@@ -510,6 +520,24 @@ struct ReverseIndexComparator
}
};
+bool
+js::CanonicalizeArrayLengthValue(JSContext* cx, HandleValue v, uint32_t* newLen)
+{
+ double d;
+
+ if (!ToUint32(cx, v, newLen))
+ return false;
+
+ if (!ToNumber(cx, v, &d))
+ return false;
+
+ if (d == *newLen)
+ return true;
+
+ JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_BAD_ARRAY_LENGTH);
+ return false;
+}
+
/* ES6 draft rev 34 (2015 Feb 20) 9.4.2.4 ArraySetLength */
bool
js::ArraySetLength(JSContext* cx, Handle<ArrayObject*> arr, HandleId id,
@@ -531,22 +559,12 @@ js::ArraySetLength(JSContext* cx, Handle<ArrayObject*> arr, HandleId id,
} else {
// Step 2 is irrelevant in our implementation.
- // Step 3.
- if (!ToUint32(cx, value, &newLen))
- return false;
-
- // Step 4.
- double d;
- if (!ToNumber(cx, value, &d))
+ // Steps 3-7.
+ MOZ_ASSERT_IF(attrs & JSPROP_IGNORE_VALUE, value.isUndefined());
+ if (!CanonicalizeArrayLengthValue(cx, value, &newLen))
return false;
- // Step 5.
- if (d != newLen) {
- JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_BAD_ARRAY_LENGTH);
- return false;
- }
-
- // Steps 6-8 are irrelevant in our implementation.
+ // Step 8 is irrelevant in our implementation.
}
// Steps 9-11.
@@ -805,7 +823,7 @@ array_addProperty(JSContext* cx, HandleObject obj, HandleId id, HandleValue v)
static inline bool
ObjectMayHaveExtraIndexedOwnProperties(JSObject* obj)
{
- return !obj->isNative() ||
+ return (!obj->isNative() && !obj->is<UnboxedArrayObject>()) ||
obj->isIndexed() ||
obj->is<TypedArrayObject>() ||
ClassMayResolveId(*obj->runtimeFromAnyThread()->commonNames,
@@ -836,7 +854,7 @@ js::ObjectMayHaveExtraIndexedProperties(JSObject* obj)
if (ObjectMayHaveExtraIndexedOwnProperties(obj))
return true;
- if (obj->as<NativeObject>().getDenseInitializedLength() != 0)
+ if (GetAnyBoxedOrUnboxedInitializedLength(obj) != 0)
return true;
} while (true);
}
@@ -1046,32 +1064,32 @@ struct StringSeparatorOp
}
};
-template <typename SeparatorOp>
-static bool
-ArrayJoinDenseKernel(JSContext* cx, SeparatorOp sepOp, HandleNativeObject obj, uint32_t length,
+template <typename SeparatorOp, JSValueType Type>
+static DenseElementResult
+ArrayJoinDenseKernel(JSContext* cx, SeparatorOp sepOp, HandleObject obj, uint32_t length,
StringBuffer& sb, uint32_t* numProcessed)
{
// This loop handles all elements up to initializedLength. If
// length > initLength we rely on the second loop to add the
// other elements.
MOZ_ASSERT(*numProcessed == 0);
- uint32_t initLength = Min<uint32_t>(obj->getDenseInitializedLength(),
+ uint32_t initLength = Min<uint32_t>(GetBoxedOrUnboxedInitializedLength<Type>(obj),
length);
while (*numProcessed < initLength) {
if (!CheckForInterrupt(cx))
- return false;
+ return DenseElementResult::Failure;
Value elem = obj->as<NativeObject>().getDenseElement(*numProcessed);
if (elem.isString()) {
if (!sb.append(elem.toString()))
- return false;
+ return DenseElementResult::Failure;
} else if (elem.isNumber()) {
if (!NumberValueToStringBuffer(cx, elem, sb))
- return false;
+ return DenseElementResult::Failure;
} else if (elem.isBoolean()) {
if (!BooleanToStringBuffer(elem.toBoolean(), sb))
- return false;
+ return DenseElementResult::Failure;
} else if (elem.isObject() || elem.isSymbol()) {
/*
* Object stringifying could modify the initialized length or make
@@ -1087,13 +1105,33 @@ ArrayJoinDenseKernel(JSContext* cx, SeparatorOp sepOp, HandleNativeObject obj, u
}
if (++(*numProcessed) != length && !sepOp(cx, sb))
- return false;
+ return DenseElementResult::Failure;
}
- return true;
+ return DenseElementResult::Incomplete;
}
template <typename SeparatorOp>
+struct ArrayJoinDenseKernelFunctor {
+ JSContext* cx;
+ SeparatorOp sepOp;
+ HandleObject obj;
+ uint32_t length;
+ StringBuffer& sb;
+ uint32_t* numProcessed;
+
+ ArrayJoinDenseKernelFunctor(JSContext* cx, SeparatorOp sepOp, HandleObject obj,
+ uint32_t length, StringBuffer& sb, uint32_t* numProcessed)
+ : cx(cx), sepOp(sepOp), obj(obj), length(length), sb(sb), numProcessed(numProcessed)
+ {}
+
+ template <JSValueType Type>
+ DenseElementResult operator()() {
+ return ArrayJoinDenseKernel<SeparatorOp, Type>(cx, sepOp, obj, length, sb, numProcessed);
+ }
+};
+
+template <typename SeparatorOp>
static bool
ArrayJoinKernel(JSContext* cx, SeparatorOp sepOp, HandleObject obj, uint32_t length,
StringBuffer& sb)
@@ -1101,10 +1139,10 @@ ArrayJoinKernel(JSContext* cx, SeparatorOp sepOp, HandleObject obj, uint32_t len
uint32_t i = 0;
if (!ObjectMayHaveExtraIndexedProperties(obj)) {
- if (!ArrayJoinDenseKernel<SeparatorOp>(cx, sepOp, obj.as<NativeObject>(), length, sb, &i))
- {
+ ArrayJoinDenseKernelFunctor<SeparatorOp> functor(cx, sepOp, obj, length, sb, &i);
+ DenseElementResult result = CallBoxedOrUnboxedSpecialization(functor, obj);
+ if (result == DenseElementResult::Failure)
return false;
- }
}
if (i != length) {
@@ -1175,14 +1213,11 @@ js::array_join(JSContext* cx, unsigned argc, Value* vp)
// An optimized version of a special case of steps 7-11: when length==1 and
// the 0th element is a string, ToString() of that element is a no-op and
// so it can be immediately returned as the result.
- if (length == 1 && obj->isNative()) {
- NativeObject* nobj = &obj->as<NativeObject>();
- if (nobj->getDenseInitializedLength() == 1) {
- Value elem0 = nobj->getDenseElement(0);
- if (elem0.isString()) {
- args.rval().set(elem0);
- return true;
- }
+ if (length == 1 && GetAnyBoxedOrUnboxedInitializedLength(obj) == 1) {
+ Value elem0 = GetAnyBoxedOrUnboxedDenseElement(obj, 0);
+ if (elem0.isString()) {
+ args.rval().set(elem0);
+ return true;
}
}
@@ -1225,7 +1260,7 @@ js::array_join(JSContext* cx, unsigned argc, Value* vp)
}
// Step 11
- JSString* str = sb.finishString();
+ JSString *str = sb.finishString();
if (!str)
return false;
@@ -1254,6 +1289,10 @@ array_toLocaleString(JSContext* cx, unsigned argc, Value* vp)
args.rval().setString(cx->names().empty);
return true;
}
+ if (obj->is<UnboxedArrayObject>() && obj->as<UnboxedArrayObject>().length() == 0) {
+ args.rval().setString(cx->names().empty);
+ return true;
+ }
AutoCycleDetector detector(cx, obj);
if (!detector.init())
@@ -1290,9 +1329,8 @@ InitArrayElements(JSContext* cx, HandleObject obj, uint32_t start,
return false;
if (!ObjectMayHaveExtraIndexedProperties(obj)) {
- NativeObject* nobj = &obj->as<NativeObject>();
- DenseElementResult result = nobj->setOrExtendDenseElements(cx, uint32_t(start), vector,
- count, updateTypes);
+ DenseElementResult result =
+ SetOrExtendAnyBoxedOrUnboxedDenseElements(cx, obj, start, vector, count, updateTypes);
if (result != DenseElementResult::Incomplete)
return result == DenseElementResult::Success;
}
@@ -1326,45 +1364,54 @@ InitArrayElements(JSContext* cx, HandleObject obj, uint32_t start,
return true;
}
-static DenseElementResult
-ArrayReverseDenseKernel(JSContext* cx, HandleNativeObject obj, uint32_t length)
+template <JSValueType Type>
+DenseElementResult
+ArrayReverseDenseKernel(JSContext* cx, HandleObject obj, uint32_t length)
{
/* An empty array or an array with no elements is already reversed. */
- if (length == 0 || obj->getDenseInitializedLength() == 0)
+ if (length == 0 || GetBoxedOrUnboxedInitializedLength<Type>(obj) == 0)
return DenseElementResult::Success;
- if (obj->denseElementsAreFrozen())
- return DenseElementResult::Incomplete;
+ if (Type == JSVAL_TYPE_MAGIC) {
+ if (obj->as<NativeObject>().denseElementsAreFrozen())
+ return DenseElementResult::Incomplete;
- /*
- * It's actually surprisingly complicated to reverse an array due to the
- * orthogonality of array length and array capacity while handling
- * leading and trailing holes correctly. Reversing seems less likely to
- * be a common operation than other array mass-mutation methods, so for
- * now just take a probably-small memory hit (in the absence of too many
- * holes in the array at its start) and ensure that the capacity is
- * sufficient to hold all the elements in the array if it were full.
- */
- DenseElementResult result = obj->ensureDenseElements(cx, length, 0);
- if (result != DenseElementResult::Success)
- return result;
+ /*
+ * It's actually surprisingly complicated to reverse an array due to the
+ * orthogonality of array length and array capacity while handling
+ * leading and trailing holes correctly. Reversing seems less likely to
+ * be a common operation than other array mass-mutation methods, so for
+ * now just take a probably-small memory hit (in the absence of too many
+ * holes in the array at its start) and ensure that the capacity is
+ * sufficient to hold all the elements in the array if it were full.
+ */
+ DenseElementResult result = obj->as<NativeObject>().ensureDenseElements(cx, length, 0);
+ if (result != DenseElementResult::Success)
+ return result;
- /* Fill out the array's initialized length to its proper length. */
- obj->ensureDenseInitializedLength(cx, length, 0);
+ /* Fill out the array's initialized length to its proper length. */
+ obj->as<NativeObject>().ensureDenseInitializedLength(cx, length, 0);
+ } else {
+ // Unboxed arrays can only be reversed here if their initialized length
+ // matches their actual length. Otherwise the reversal will place holes
+ // at the beginning of the array, which we don't support.
+ if (length != obj->as<UnboxedArrayObject>().initializedLength())
+ return DenseElementResult::Incomplete;
+ }
RootedValue origlo(cx), orighi(cx);
uint32_t lo = 0, hi = length - 1;
for (; lo < hi; lo++, hi--) {
- origlo = obj->getDenseElement(lo);
- orighi = obj->getDenseElement(hi);
- obj->setDenseElement(lo, orighi);
+ origlo = GetBoxedOrUnboxedDenseElement<Type>(obj, lo);
+ orighi = GetBoxedOrUnboxedDenseElement<Type>(obj, hi);
+ SetBoxedOrUnboxedDenseElementNoTypeChange<Type>(obj, lo, orighi);
if (orighi.isMagic(JS_ELEMENTS_HOLE) &&
!SuppressDeletedProperty(cx, obj, INT_TO_JSID(lo)))
{
return DenseElementResult::Failure;
}
- obj->setDenseElement(hi, origlo);
+ SetBoxedOrUnboxedDenseElementNoTypeChange<Type>(obj, hi, origlo);
if (origlo.isMagic(JS_ELEMENTS_HOLE) &&
!SuppressDeletedProperty(cx, obj, INT_TO_JSID(hi)))
{
@@ -1375,6 +1422,9 @@ ArrayReverseDenseKernel(JSContext* cx, HandleNativeObject obj, uint32_t length)
return DenseElementResult::Success;
}
+DefineBoxedOrUnboxedFunctor3(ArrayReverseDenseKernel,
+ JSContext*, HandleObject, uint32_t);
+
bool
js::array_reverse(JSContext* cx, unsigned argc, Value* vp)
{
@@ -1389,8 +1439,8 @@ js::array_reverse(JSContext* cx, unsigned argc, Value* vp)
return false;
if (!ObjectMayHaveExtraIndexedProperties(obj)) {
- DenseElementResult result =
- ArrayReverseDenseKernel(cx, obj.as<NativeObject>(), uint32_t(len));
+ ArrayReverseDenseKernelFunctor functor(cx, obj, len);
+ DenseElementResult result = CallBoxedOrUnboxedSpecialization(functor, obj);
if (result != DenseElementResult::Incomplete) {
/*
* Per ECMA-262, don't update the length of the array, even if the new
@@ -2033,8 +2083,8 @@ js::array_push(JSContext* cx, unsigned argc, Value* vp)
if (!ObjectMayHaveExtraIndexedProperties(obj)) {
DenseElementResult result =
- obj->as<NativeObject>().setOrExtendDenseElements(cx, uint32_t(length),
- args.array(), args.length());
+ SetOrExtendAnyBoxedOrUnboxedDenseElements(cx, obj, length,
+ args.array(), args.length());
if (result != DenseElementResult::Incomplete) {
if (result == DenseElementResult::Failure)
return false;
@@ -2042,8 +2092,14 @@ js::array_push(JSContext* cx, unsigned argc, Value* vp)
uint32_t newlength = length + args.length();
args.rval().setNumber(newlength);
- // Handle updates to the length of non-arrays here.
- if (!obj->is<ArrayObject>())
+ // SetOrExtendAnyBoxedOrUnboxedDenseElements takes care of updating the
+ // length for boxed and unboxed arrays. Handle updates to the length of
+ // non-arrays here.
+ bool isArray;
+ if (!IsArray(cx, obj, &isArray))
+ return false;
+
+ if (!isArray)
return SetLengthProperty(cx, obj, newlength);
return true;
@@ -2099,47 +2155,42 @@ js::array_pop(JSContext* cx, unsigned argc, Value* vp)
return SetLengthProperty(cx, obj, index);
}
-void
-js::ArrayShiftMoveElements(NativeObject* obj)
+template <JSValueType Type>
+static inline DenseElementResult
+ShiftMoveBoxedOrUnboxedDenseElements(JSObject* obj)
{
- MOZ_ASSERT_IF(obj->is<ArrayObject>(), obj->as<ArrayObject>().lengthIsWritable());
+ MOZ_ASSERT(HasBoxedOrUnboxedDenseElements<Type>(obj));
- size_t initlen = obj->getDenseInitializedLength();
-
- if (initlen > 0) {
- /*
- * At this point the length and initialized length have already been
- * decremented and the result fetched, so just shift the array elements
- * themselves.
- */
- obj->moveDenseElementsNoPreBarrier(0, 1, initlen);
+ /*
+ * At this point the length and initialized length have already been
+ * decremented and the result fetched, so just shift the array elements
+ * themselves.
+ */
+ size_t initlen = GetBoxedOrUnboxedInitializedLength<Type>(obj);
+ if (Type == JSVAL_TYPE_MAGIC) {
+ obj->as<NativeObject>().moveDenseElementsNoPreBarrier(0, 1, initlen);
+ } else {
+ uint8_t* data = obj->as<UnboxedArrayObject>().elements();
+ size_t elementSize = UnboxedTypeSize(Type);
+ memmove(data, data + elementSize, initlen * elementSize);
}
-}
-static inline void
-SetInitializedLength(JSContext* cx, NativeObject* obj, size_t initlen)
-{
- size_t oldInitlen = obj->getDenseInitializedLength();
- obj->setDenseInitializedLength(initlen);
- if (initlen < oldInitlen)
- obj->shrinkElements(cx, initlen);
+ return DenseElementResult::Success;
}
-static DenseElementResult
-MoveDenseElements(JSContext* cx, NativeObject* obj, uint32_t dstStart, uint32_t srcStart,
- uint32_t length)
-{
- if (obj->denseElementsAreFrozen())
- return DenseElementResult::Incomplete;
+DefineBoxedOrUnboxedFunctor1(ShiftMoveBoxedOrUnboxedDenseElements, JSObject*);
- if (!obj->maybeCopyElementsForWrite(cx))
- return DenseElementResult::Failure;
- obj->moveDenseElements(dstStart, srcStart, length);
+void
+js::ArrayShiftMoveElements(JSObject* obj)
+{
+ MOZ_ASSERT_IF(obj->is<ArrayObject>(), obj->as<ArrayObject>().lengthIsWritable());
- return DenseElementResult::Success;
+ ShiftMoveBoxedOrUnboxedDenseElementsFunctor functor(obj);
+ JS_ALWAYS_TRUE(CallBoxedOrUnboxedSpecialization(functor, obj) == DenseElementResult::Success);
}
-static DenseElementResult
+template <JSValueType Type>
+DenseElementResult
ArrayShiftDenseKernel(JSContext* cx, HandleObject obj, MutableHandleValue rval)
{
if (ObjectMayHaveExtraIndexedProperties(obj))
@@ -2152,22 +2203,25 @@ ArrayShiftDenseKernel(JSContext* cx, HandleObject obj, MutableHandleValue rval)
if (MOZ_UNLIKELY(group->hasAllFlags(OBJECT_FLAG_ITERATED)))
return DenseElementResult::Incomplete;
- size_t initlen = obj->as<NativeObject>().getDenseInitializedLength();
+ size_t initlen = GetBoxedOrUnboxedInitializedLength<Type>(obj);
if (initlen == 0)
return DenseElementResult::Incomplete;
- rval.set(obj->as<NativeObject>().getDenseElement(0));
+ rval.set(GetBoxedOrUnboxedDenseElement<Type>(obj, 0));
if (rval.isMagic(JS_ELEMENTS_HOLE))
rval.setUndefined();
- DenseElementResult result = MoveDenseElements(cx, &obj->as<NativeObject>(), 0, 1, initlen - 1);
+ DenseElementResult result = MoveBoxedOrUnboxedDenseElements<Type>(cx, obj, 0, 1, initlen - 1);
if (result != DenseElementResult::Success)
return result;
- SetInitializedLength(cx, obj.as<NativeObject>(), initlen - 1);
+ SetBoxedOrUnboxedInitializedLength<Type>(cx, obj, initlen - 1);
return DenseElementResult::Success;
}
+DefineBoxedOrUnboxedFunctor3(ArrayShiftDenseKernel,
+ JSContext*, HandleObject, MutableHandleValue);
+
/* ES5 15.4.4.9 */
bool
js::array_shift(JSContext* cx, unsigned argc, Value* vp)
@@ -2199,7 +2253,8 @@ js::array_shift(JSContext* cx, unsigned argc, Value* vp)
uint32_t newlen = len - 1;
/* Fast paths. */
- DenseElementResult result = ArrayShiftDenseKernel(cx, obj, args.rval());
+ ArrayShiftDenseKernelFunctor functor(cx, obj, args.rval());
+ DenseElementResult result = CallBoxedOrUnboxedSpecialization(functor, obj);
if (result != DenseElementResult::Incomplete) {
if (result == DenseElementResult::Failure)
return false;
@@ -2253,6 +2308,9 @@ js::array_unshift(JSContext* cx, unsigned argc, Value* vp)
if (args.length() > 0) {
/* Slide up the array to make room for all args at the bottom. */
if (length > 0) {
+ // Only include a fast path for boxed arrays. Unboxed arrays can'nt
+ // be optimized here because unshifting temporarily places holes at
+ // the start of the array.
bool optimized = false;
do {
if (!obj->is<ArrayObject>())
@@ -2312,10 +2370,10 @@ js::array_unshift(JSContext* cx, unsigned argc, Value* vp)
}
/*
- * Returns true if this is a dense array whose properties ending at |endIndex|
- * (exclusive) may be accessed (get, set, delete) directly through its
- * contiguous vector of elements without fear of getters, setters, etc. along
- * the prototype chain, or of enumerators requiring notification of
+ * Returns true if this is a dense or unboxed array whose |count| properties
+ * starting from |startingIndex| may be accessed (get, set, delete) directly
+ * through its contiguous vector of elements without fear of getters, setters,
+ * etc. along the prototype chain, or of enumerators requiring notification of
* modifications.
*/
static inline bool
@@ -2326,11 +2384,11 @@ CanOptimizeForDenseStorage(HandleObject arr, uint32_t startingIndex, uint32_t co
return false;
/* There's no optimizing possible if it's not an array. */
- if (!arr->is<ArrayObject>())
+ if (!arr->is<ArrayObject>() && !arr->is<UnboxedArrayObject>())
return false;
/* If it's a frozen array, always pick the slow path */
- if (arr->as<ArrayObject>().denseElementsAreFrozen())
+ if (arr->is<ArrayObject>() && arr->as<ArrayObject>().denseElementsAreFrozen())
return false;
/*
@@ -2362,23 +2420,7 @@ CanOptimizeForDenseStorage(HandleObject arr, uint32_t startingIndex, uint32_t co
* is subsumed by the initializedLength comparison.)
*/
return !ObjectMayHaveExtraIndexedProperties(arr) &&
- startingIndex + count <= arr->as<NativeObject>().getDenseInitializedLength();
-}
-
-static inline DenseElementResult
-CopyDenseElements(JSContext* cx, NativeObject* dst, NativeObject* src,
- uint32_t dstStart, uint32_t srcStart, uint32_t length)
-{
- MOZ_ASSERT(dst->getDenseInitializedLength() == dstStart);
- MOZ_ASSERT(src->getDenseInitializedLength() >= srcStart + length);
- MOZ_ASSERT(dst->getDenseCapacity() >= dstStart + length);
-
- dst->setDenseInitializedLength(dstStart + length);
-
- const Value* vp = src->getDenseElements() + srcStart;
- dst->initDenseElements(dstStart, vp, length);
-
- return DenseElementResult::Success;
+ startingIndex + count <= GetAnyBoxedOrUnboxedInitializedLength(arr);
}
static inline bool
@@ -2472,9 +2514,7 @@ array_splice_impl(JSContext* cx, unsigned argc, Value* vp, bool returnValueIsUse
/* Steps 10-11. */
DebugOnly<DenseElementResult> result =
- CopyDenseElements(cx, &arr->as<NativeObject>(),
- &obj->as<NativeObject>(), 0,
- actualStart, actualDeleteCount);
+ CopyAnyBoxedOrUnboxedDenseElements(cx, arr, obj, 0, actualStart, actualDeleteCount);
MOZ_ASSERT(result.value == DenseElementResult::Success);
/* Step 12 (implicit). */
@@ -2511,13 +2551,14 @@ array_splice_impl(JSContext* cx, unsigned argc, Value* vp, bool returnValueIsUse
if (CanOptimizeForDenseStorage(obj, 0, len, cx)) {
/* Steps 15.a-b. */
DenseElementResult result =
- MoveDenseElements(cx, &obj->as<NativeObject>(), targetIndex, sourceIndex, len - sourceIndex);
+ MoveAnyBoxedOrUnboxedDenseElements(cx, obj, targetIndex, sourceIndex,
+ len - sourceIndex);
MOZ_ASSERT(result != DenseElementResult::Incomplete);
if (result == DenseElementResult::Failure)
return false;
/* Steps 15.c-d. */
- SetInitializedLength(cx, obj.as<NativeObject>(), finalLength);
+ SetAnyBoxedOrUnboxedInitializedLength(cx, obj, finalLength);
} else {
/*
* This is all very slow if the length is very large. We don't yet
@@ -2597,15 +2638,15 @@ array_splice_impl(JSContext* cx, unsigned argc, Value* vp, bool returnValueIsUse
if (CanOptimizeForDenseStorage(obj, len, itemCount - actualDeleteCount, cx)) {
DenseElementResult result =
- MoveDenseElements(cx, &obj->as<NativeObject>(), actualStart + itemCount,
- actualStart + actualDeleteCount,
- len - (actualStart + actualDeleteCount));
+ MoveAnyBoxedOrUnboxedDenseElements(cx, obj, actualStart + itemCount,
+ actualStart + actualDeleteCount,
+ len - (actualStart + actualDeleteCount));
MOZ_ASSERT(result != DenseElementResult::Incomplete);
if (result == DenseElementResult::Failure)
return false;
/* Steps 16.a-b. */
- SetInitializedLength(cx, obj.as<NativeObject>(), len + itemCount - actualDeleteCount);
+ SetAnyBoxedOrUnboxedInitializedLength(cx, obj, len + itemCount - actualDeleteCount);
} else {
RootedValue fromValue(cx);
for (double k = len - actualDeleteCount; k > actualStart; k--) {
@@ -2790,7 +2831,7 @@ SliceSlowly(JSContext* cx, HandleObject obj, HandleObject receiver,
}
static bool
-SliceSparse(JSContext* cx, HandleObject obj, uint32_t begin, uint32_t end, HandleArrayObject result)
+SliceSparse(JSContext* cx, HandleObject obj, uint32_t begin, uint32_t end, HandleObject result)
{
MOZ_ASSERT(begin <= end);
@@ -2840,28 +2881,26 @@ ArraySliceOrdinary(JSContext* cx, HandleObject obj, uint32_t length, uint32_t be
begin = end;
if (!ObjectMayHaveExtraIndexedProperties(obj)) {
- size_t initlen = obj->as<NativeObject>().getDenseInitializedLength();
+ size_t initlen = GetAnyBoxedOrUnboxedInitializedLength(obj);
size_t count = 0;
if (initlen > begin)
count = Min<size_t>(initlen - begin, end - begin);
- RootedArrayObject narr(cx, NewFullyAllocatedArrayTryReuseGroup(cx, obj, count));
+ RootedObject narr(cx, NewFullyAllocatedArrayTryReuseGroup(cx, obj, count));
if (!narr)
return false;
-
- MOZ_ASSERT(count >= narr->as<ArrayObject>().length());
- narr->as<ArrayObject>().setLength(cx, count);
+ SetAnyBoxedOrUnboxedArrayLength(cx, narr, end - begin);
if (count) {
DebugOnly<DenseElementResult> result =
- CopyDenseElements(cx, &narr->as<NativeObject>(), &obj->as<NativeObject>(), 0, begin, count);
+ CopyAnyBoxedOrUnboxedDenseElements(cx, narr, obj, 0, begin, count);
MOZ_ASSERT(result.value == DenseElementResult::Success);
}
arr.set(narr);
return true;
}
- RootedArrayObject narr(cx, NewPartlyAllocatedArrayTryReuseGroup(cx, obj, end - begin));
+ RootedObject narr(cx, NewPartlyAllocatedArrayTryReuseGroup(cx, obj, end - begin));
if (!narr)
return false;
@@ -2978,10 +3017,11 @@ js::array_slice(JSContext* cx, unsigned argc, Value* vp)
return true;
}
-static bool
-ArraySliceDenseKernel(JSContext* cx, ArrayObject* arr, int32_t beginArg, int32_t endArg, ArrayObject* result)
+template <JSValueType Type>
+DenseElementResult
+ArraySliceDenseKernel(JSContext* cx, JSObject* obj, int32_t beginArg, int32_t endArg, JSObject* result)
{
- int32_t length = arr->length();
+ int32_t length = GetAnyBoxedOrUnboxedArrayLength(obj);
uint32_t begin = NormalizeSliceTerm(beginArg, length);
uint32_t end = NormalizeSliceTerm(endArg, length);
@@ -2989,33 +3029,33 @@ ArraySliceDenseKernel(JSContext* cx, ArrayObject* arr, int32_t beginArg, int32_t
if (begin > end)
begin = end;
- size_t initlen = arr->getDenseInitializedLength();
- size_t count = Min<size_t>(initlen - begin, end - begin);
+ size_t initlen = GetBoxedOrUnboxedInitializedLength<Type>(obj);
if (initlen > begin) {
+ size_t count = Min<size_t>(initlen - begin, end - begin);
if (count) {
- if (!result->ensureElements(cx, count))
- return false;
- CopyDenseElements(cx, &result->as<NativeObject>(), &arr->as<NativeObject>(), 0, begin, count);
+ DenseElementResult rv = EnsureBoxedOrUnboxedDenseElements<Type>(cx, result, count);
+ if (rv != DenseElementResult::Success)
+ return rv;
+ CopyBoxedOrUnboxedDenseElements<Type, Type>(cx, result, obj, 0, begin, count);
}
}
- MOZ_ASSERT(count >= result->length());
- result->setLength(cx, count);
-
- return true;
+ SetAnyBoxedOrUnboxedArrayLength(cx, result, end - begin);
+ return DenseElementResult::Success;
}
+DefineBoxedOrUnboxedFunctor5(ArraySliceDenseKernel,
+ JSContext*, JSObject*, int32_t, int32_t, JSObject*);
+
JSObject*
js::array_slice_dense(JSContext* cx, HandleObject obj, int32_t begin, int32_t end,
HandleObject result)
{
if (result && IsArraySpecies(cx, obj)) {
- if (!ArraySliceDenseKernel(cx, &obj->as<ArrayObject>(), begin, end,
- &result->as<ArrayObject>()))
- {
- return nullptr;
- }
- return result;
+ ArraySliceDenseKernelFunctor functor(cx, obj, begin, end, result);
+ DenseElementResult rv = CallBoxedOrUnboxedSpecialization(functor, result);
+ MOZ_ASSERT(rv != DenseElementResult::Incomplete);
+ return rv == DenseElementResult::Success ? result : nullptr;
}
// Slower path if the JIT wasn't able to allocate an object inline.
@@ -3046,7 +3086,7 @@ array_isArray(JSContext* cx, unsigned argc, Value* vp)
static bool
ArrayFromCallArgs(JSContext* cx, CallArgs& args, HandleObject proto = nullptr)
{
- ArrayObject* obj = NewCopiedArrayForCallingAllocationSite(cx, args.array(), args.length(), proto);
+ JSObject* obj = NewCopiedArrayForCallingAllocationSite(cx, args.array(), args.length(), proto);
if (!obj)
return false;
@@ -3220,7 +3260,7 @@ ArrayConstructorImpl(JSContext* cx, CallArgs& args, bool isConstructor)
}
}
- ArrayObject* obj = NewPartlyAllocatedArrayForCallingAllocationSite(cx, length, proto);
+ JSObject* obj = NewPartlyAllocatedArrayForCallingAllocationSite(cx, length, proto);
if (!obj)
return false;
@@ -3246,7 +3286,7 @@ js::array_construct(JSContext* cx, unsigned argc, Value* vp)
return ArrayConstructorImpl(cx, args, /* isConstructor = */ false);
}
-ArrayObject*
+JSObject*
js::ArrayConstructorOneArg(JSContext* cx, HandleObjectGroup group, int32_t lengthInt)
{
if (lengthInt < 0) {
@@ -3541,7 +3581,7 @@ js::NewDenseFullyAllocatedArrayWithTemplate(JSContext* cx, uint32_t length, JSOb
return arr;
}
-ArrayObject*
+JSObject*
js::NewDenseCopyOnWriteArray(JSContext* cx, HandleArrayObject templateObject, gc::InitialHeap heap)
{
MOZ_ASSERT(!gc::IsInsideNursery(templateObject));
@@ -3554,21 +3594,30 @@ js::NewDenseCopyOnWriteArray(JSContext* cx, HandleArrayObject templateObject, gc
return arr;
}
-// Return a new array with the specified length and allocated capacity (up to
-// maxLength), using the specified group if possible. If the specified group
-// cannot be used, ensure that the created array at least has the given
-// [[Prototype]].
+// Return a new boxed or unboxed array with the specified length and allocated
+// capacity (up to maxLength), using the specified group if possible. If the
+// specified group cannot be used, ensure that the created array at least has
+// the given [[Prototype]].
template <uint32_t maxLength>
-static inline ArrayObject*
+static inline JSObject*
NewArrayTryUseGroup(ExclusiveContext* cx, HandleObjectGroup group, size_t length,
NewObjectKind newKind = GenericObject)
{
MOZ_ASSERT(newKind != SingletonObject);
- if (group->shouldPreTenure())
+ if (group->maybePreliminaryObjects())
+ group->maybePreliminaryObjects()->maybeAnalyze(cx, group);
+
+ if (group->shouldPreTenure() || group->maybePreliminaryObjects())
newKind = TenuredObject;
RootedObject proto(cx, group->proto().toObject());
+ if (group->maybeUnboxedLayout()) {
+ if (length > UnboxedArrayObject::MaximumCapacity)
+ return NewArray<maxLength>(cx, length, proto, newKind);
+ return UnboxedArrayObject::create(cx, group, length, newKind, maxLength);
+ }
+
ArrayObject* res = NewArray<maxLength>(cx, length, proto, newKind);
if (!res)
return nullptr;
@@ -3580,17 +3629,20 @@ NewArrayTryUseGroup(ExclusiveContext* cx, HandleObjectGroup group, size_t length
if (res->length() > INT32_MAX)
res->setLength(cx, res->length());
+ if (PreliminaryObjectArray* preliminaryObjects = group->maybePreliminaryObjects())
+ preliminaryObjects->registerNewObject(res);
+
return res;
}
-ArrayObject*
+JSObject*
js::NewFullyAllocatedArrayTryUseGroup(ExclusiveContext* cx, HandleObjectGroup group, size_t length,
NewObjectKind newKind)
{
return NewArrayTryUseGroup<UINT32_MAX>(cx, group, length, newKind);
}
-ArrayObject*
+JSObject*
js::NewPartlyAllocatedArrayTryUseGroup(ExclusiveContext* cx, HandleObjectGroup group, size_t length)
{
return NewArrayTryUseGroup<ArrayObject::EagerAllocationMaxLength>(cx, group, length);
@@ -3599,13 +3651,16 @@ js::NewPartlyAllocatedArrayTryUseGroup(ExclusiveContext* cx, HandleObjectGroup g
// Return a new array with the default prototype and specified allocated
// capacity and length. If possible, try to reuse the group of the input
// object. The resulting array will either reuse the input object's group or
-// will have unknown property types.
+// will have unknown property types. Additionally, the result will have the
+// same boxed/unboxed elements representation as the input object, unless
+// |length| is larger than the input object's initialized length (in which case
+// UnboxedArrayObject::MaximumCapacity might be exceeded).
template <uint32_t maxLength>
-static inline ArrayObject*
+static inline JSObject*
NewArrayTryReuseGroup(JSContext* cx, HandleObject obj, size_t length,
NewObjectKind newKind = GenericObject)
{
- if (!obj->is<ArrayObject>())
+ if (!obj->is<ArrayObject>() && !obj->is<UnboxedArrayObject>())
return NewArray<maxLength>(cx, length, nullptr, newKind);
if (obj->staticPrototype() != cx->global()->maybeGetArrayPrototype())
@@ -3618,20 +3673,20 @@ NewArrayTryReuseGroup(JSContext* cx, HandleObject obj, size_t length,
return NewArrayTryUseGroup<maxLength>(cx, group, length, newKind);
}
-ArrayObject*
+JSObject*
js::NewFullyAllocatedArrayTryReuseGroup(JSContext* cx, HandleObject obj, size_t length,
NewObjectKind newKind)
{
return NewArrayTryReuseGroup<UINT32_MAX>(cx, obj, length, newKind);
}
-ArrayObject*
+JSObject*
js::NewPartlyAllocatedArrayTryReuseGroup(JSContext* cx, HandleObject obj, size_t length)
{
return NewArrayTryReuseGroup<ArrayObject::EagerAllocationMaxLength>(cx, obj, length);
}
-ArrayObject*
+JSObject*
js::NewFullyAllocatedArrayForCallingAllocationSite(JSContext* cx, size_t length,
NewObjectKind newKind)
{
@@ -3641,7 +3696,7 @@ js::NewFullyAllocatedArrayForCallingAllocationSite(JSContext* cx, size_t length,
return NewArrayTryUseGroup<UINT32_MAX>(cx, group, length, newKind);
}
-ArrayObject*
+JSObject*
js::NewPartlyAllocatedArrayForCallingAllocationSite(JSContext* cx, size_t length, HandleObject proto)
{
RootedObjectGroup group(cx, ObjectGroup::callingAllocationSiteGroup(cx, JSProto_Array, proto));
@@ -3650,23 +3705,68 @@ js::NewPartlyAllocatedArrayForCallingAllocationSite(JSContext* cx, size_t length
return NewArrayTryUseGroup<ArrayObject::EagerAllocationMaxLength>(cx, group, length);
}
-ArrayObject*
+bool
+js::MaybeAnalyzeBeforeCreatingLargeArray(ExclusiveContext* cx, HandleObjectGroup group,
+ const Value* vp, size_t length)
+{
+ static const size_t EagerPreliminaryObjectAnalysisThreshold = 800;
+
+ // Force analysis to see if an unboxed array can be used when making a
+ // sufficiently large array, to avoid excessive analysis and copying later
+ // on. If this is the first array of its group that is being created, first
+ // make a dummy array with the initial elements of the array we are about
+ // to make, so there is some basis for the unboxed array analysis.
+ if (length > EagerPreliminaryObjectAnalysisThreshold) {
+ if (PreliminaryObjectArrayWithTemplate* objects = group->maybePreliminaryObjects()) {
+ if (objects->empty()) {
+ size_t nlength = Min<size_t>(length, 100);
+ JSObject* obj = NewFullyAllocatedArrayTryUseGroup(cx, group, nlength);
+ if (!obj)
+ return false;
+ DebugOnly<DenseElementResult> result =
+ SetOrExtendAnyBoxedOrUnboxedDenseElements(cx, obj, 0, vp, nlength,
+ ShouldUpdateTypes::Update);
+ MOZ_ASSERT(result.value == DenseElementResult::Success);
+ }
+ objects->maybeAnalyze(cx, group, /* forceAnalyze = */ true);
+ }
+ }
+ return true;
+}
+
+JSObject*
js::NewCopiedArrayTryUseGroup(ExclusiveContext* cx, HandleObjectGroup group,
const Value* vp, size_t length, NewObjectKind newKind,
ShouldUpdateTypes updateTypes)
{
- ArrayObject* obj = NewFullyAllocatedArrayTryUseGroup(cx, group, length, newKind);
+ if (!MaybeAnalyzeBeforeCreatingLargeArray(cx, group, vp, length))
+ return nullptr;
+
+ JSObject* obj = NewFullyAllocatedArrayTryUseGroup(cx, group, length, newKind);
if (!obj)
return nullptr;
- DenseElementResult result = obj->setOrExtendDenseElements(cx, 0, vp, length, updateTypes);
+ DenseElementResult result =
+ SetOrExtendAnyBoxedOrUnboxedDenseElements(cx, obj, 0, vp, length, updateTypes);
+ if (result == DenseElementResult::Failure)
+ return nullptr;
+ if (result == DenseElementResult::Success)
+ return obj;
+
+ MOZ_ASSERT(obj->is<UnboxedArrayObject>());
+ if (!UnboxedArrayObject::convertToNative(cx->asJSContext(), obj))
+ return nullptr;
+
+ result = SetOrExtendBoxedOrUnboxedDenseElements<JSVAL_TYPE_MAGIC>(cx, obj, 0, vp, length,
+ updateTypes);
+ MOZ_ASSERT(result != DenseElementResult::Incomplete);
if (result == DenseElementResult::Failure)
return nullptr;
- MOZ_ASSERT(result == DenseElementResult::Success);
+
return obj;
}
-ArrayObject*
+JSObject*
js::NewCopiedArrayForCallingAllocationSite(JSContext* cx, const Value* vp, size_t length,
HandleObject proto /* = nullptr */)
{
diff --git a/js/src/jsarray.h b/js/src/jsarray.h
index d0084731f9..0ca580ba72 100644
--- a/js/src/jsarray.h
+++ b/js/src/jsarray.h
@@ -72,37 +72,49 @@ extern ArrayObject*
NewDenseFullyAllocatedArrayWithTemplate(JSContext* cx, uint32_t length, JSObject* templateObject);
/* Create a dense array with the same copy-on-write elements as another object. */
-extern ArrayObject*
+extern JSObject*
NewDenseCopyOnWriteArray(JSContext* cx, HandleArrayObject templateObject, gc::InitialHeap heap);
-extern ArrayObject*
+// The methods below can create either boxed or unboxed arrays.
+
+extern JSObject*
NewFullyAllocatedArrayTryUseGroup(ExclusiveContext* cx, HandleObjectGroup group, size_t length,
NewObjectKind newKind = GenericObject);
-extern ArrayObject*
+extern JSObject*
NewPartlyAllocatedArrayTryUseGroup(ExclusiveContext* cx, HandleObjectGroup group, size_t length);
-extern ArrayObject*
+extern JSObject*
NewFullyAllocatedArrayTryReuseGroup(JSContext* cx, HandleObject obj, size_t length,
NewObjectKind newKind = GenericObject);
-extern ArrayObject*
+extern JSObject*
NewPartlyAllocatedArrayTryReuseGroup(JSContext* cx, HandleObject obj, size_t length);
-extern ArrayObject*
+extern JSObject*
NewFullyAllocatedArrayForCallingAllocationSite(JSContext* cx, size_t length,
NewObjectKind newKind = GenericObject);
-extern ArrayObject*
+extern JSObject*
NewPartlyAllocatedArrayForCallingAllocationSite(JSContext* cx, size_t length, HandleObject proto);
-extern ArrayObject*
+enum class ShouldUpdateTypes
+{
+ Update,
+ DontUpdate
+};
+
+extern bool
+MaybeAnalyzeBeforeCreatingLargeArray(ExclusiveContext* cx, HandleObjectGroup group,
+ const Value* vp, size_t length);
+
+extern JSObject*
NewCopiedArrayTryUseGroup(ExclusiveContext* cx, HandleObjectGroup group,
const Value* vp, size_t length,
NewObjectKind newKind = GenericObject,
ShouldUpdateTypes updateTypes = ShouldUpdateTypes::Update);
-extern ArrayObject*
+extern JSObject*
NewCopiedArrayForCallingAllocationSite(JSContext* cx, const Value* vp, size_t length,
HandleObject proto = nullptr);
@@ -117,6 +129,13 @@ NewValuePair(JSContext* cx, const Value& val1, const Value& val2, MutableHandleV
extern bool
WouldDefinePastNonwritableLength(HandleNativeObject obj, uint32_t index);
+/*
+ * Canonicalize |vp| to a uint32_t value potentially suitable for use as an
+ * array length.
+ */
+extern bool
+CanonicalizeArrayLengthValue(JSContext* cx, HandleValue v, uint32_t* canonicalized);
+
extern bool
GetLengthProperty(JSContext* cx, HandleObject obj, uint32_t* lengthp);
@@ -150,7 +169,7 @@ extern bool
array_join(JSContext* cx, unsigned argc, js::Value* vp);
extern void
-ArrayShiftMoveElements(NativeObject* obj);
+ArrayShiftMoveElements(JSObject* obj);
extern bool
array_shift(JSContext* cx, unsigned argc, js::Value* vp);
@@ -182,7 +201,7 @@ extern const JSJitInfo array_splice_info;
extern bool
NewbornArrayPush(JSContext* cx, HandleObject obj, const Value& v);
-extern ArrayObject*
+extern JSObject*
ArrayConstructorOneArg(JSContext* cx, HandleObjectGroup group, int32_t lengthInt);
#ifdef DEBUG
diff --git a/js/src/jscompartment.h b/js/src/jscompartment.h
index 05ff40b439..d7c6765ff8 100644
--- a/js/src/jscompartment.h
+++ b/js/src/jscompartment.h
@@ -528,6 +528,9 @@ struct JSCompartment
// table manages references from such typed objects to their buffers.
js::ObjectWeakMap* lazyArrayBuffers;
+ // All unboxed layouts in the compartment.
+ mozilla::LinkedList<js::UnboxedLayout> unboxedLayouts;
+
// WebAssembly state for the compartment.
js::wasm::Compartment wasm;
diff --git a/js/src/jsfriendapi.cpp b/js/src/jsfriendapi.cpp
index bdb3c0a4da..515f622130 100644
--- a/js/src/jsfriendapi.cpp
+++ b/js/src/jsfriendapi.cpp
@@ -268,9 +268,9 @@ js::GetBuiltinClass(JSContext* cx, HandleObject obj, ESClass* cls)
if (MOZ_UNLIKELY(obj->is<ProxyObject>()))
return Proxy::getBuiltinClass(cx, obj, cls);
- if (obj->is<PlainObject>())
+ if (obj->is<PlainObject>() || obj->is<UnboxedPlainObject>())
*cls = ESClass::Object;
- else if (obj->is<ArrayObject>())
+ else if (obj->is<ArrayObject>() || obj->is<UnboxedArrayObject>())
*cls = ESClass::Array;
else if (obj->is<NumberObject>())
*cls = ESClass::Number;
diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp
index 3ad526f74c..64573b55a9 100644
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -6176,6 +6176,12 @@ gc::MergeCompartments(JSCompartment* source, JSCompartment* target)
for (auto group = source->zone()->cellIter<ObjectGroup>(); !group.done(); group.next()) {
group->setGeneration(target->zone()->types.generation);
group->compartment_ = target;
+
+ // Remove any unboxed layouts from the list in the off thread
+ // compartment. These do not need to be reinserted in the target
+ // compartment's list, as the list is not required to be complete.
+ if (UnboxedLayout* layout = group->maybeUnboxedLayoutDontCheckGeneration())
+ layout->detachFromCompartment();
}
// Fixup zone pointers in source's zone to refer to target's zone.
diff --git a/js/src/jsiter.cpp b/js/src/jsiter.cpp
index c58f323825..8b1436b686 100644
--- a/js/src/jsiter.cpp
+++ b/js/src/jsiter.cpp
@@ -158,11 +158,8 @@ SortComparatorIntegerIds(jsid a, jsid b, bool* lessOrEqualp)
}
static bool
-EnumerateNativeProperties(JSContext* cx,
- HandleNativeObject pobj,
- unsigned flags,
- Maybe<IdSet>& ht,
- AutoIdVector* props)
+EnumerateNativeProperties(JSContext* cx, HandleNativeObject pobj, unsigned flags, Maybe<IdSet>& ht,
+ AutoIdVector* props, Handle<UnboxedPlainObject*> unboxed = nullptr)
{
bool enumerateSymbols;
if (flags & JSITER_SYMBOLSONLY) {
@@ -224,6 +221,16 @@ EnumerateNativeProperties(JSContext* cx,
return false;
}
+ if (unboxed) {
+ // If |unboxed| is set then |pobj| is the expando for an unboxed
+ // plain object we are enumerating. Add the unboxed properties
+ // themselves here since they are all property names that were
+ // given to the object before any of the expando's properties.
+ MOZ_ASSERT(pobj->is<UnboxedExpandoObject>());
+ if (!EnumerateExtraProperties(cx, unboxed, flags, ht, props))
+ return false;
+ }
+
size_t initialLength = props->length();
/* Collect all unique property names from this object's shape. */
@@ -349,12 +356,22 @@ Snapshot(JSContext* cx, HandleObject pobj_, unsigned flags, AutoIdVector* props)
do {
if (pobj->getOpsEnumerate()) {
- if (!EnumerateExtraProperties(cx, pobj, flags, ht, props))
- return false;
-
- if (pobj->isNative()) {
- if (!EnumerateNativeProperties(cx, pobj.as<NativeObject>(), flags, ht, props))
+ if (pobj->is<UnboxedPlainObject>() && pobj->as<UnboxedPlainObject>().maybeExpando()) {
+ // Special case unboxed objects with an expando object.
+ RootedNativeObject expando(cx, pobj->as<UnboxedPlainObject>().maybeExpando());
+ if (!EnumerateNativeProperties(cx, expando, flags, ht, props,
+ pobj.as<UnboxedPlainObject>()))
+ {
+ return false;
+ }
+ } else {
+ if (!EnumerateExtraProperties(cx, pobj, flags, ht, props))
return false;
+
+ if (pobj->isNative()) {
+ if (!EnumerateNativeProperties(cx, pobj.as<NativeObject>(), flags, ht, props))
+ return false;
+ }
}
} else if (pobj->isNative()) {
// Give the object a chance to resolve all lazy properties
@@ -769,6 +786,11 @@ CanCompareIterableObjectToCache(JSObject* obj)
{
if (obj->isNative())
return obj->as<NativeObject>().hasEmptyElements();
+ if (obj->is<UnboxedPlainObject>()) {
+ if (UnboxedExpandoObject* expando = obj->as<UnboxedPlainObject>().maybeExpando())
+ return expando->hasEmptyElements();
+ return true;
+ }
return false;
}
diff --git a/js/src/jsobj.cpp b/js/src/jsobj.cpp
index ef12910797..d4379bd7d7 100644
--- a/js/src/jsobj.cpp
+++ b/js/src/jsobj.cpp
@@ -42,7 +42,6 @@
#include "frontend/BytecodeCompiler.h"
#include "gc/Marking.h"
#include "gc/Policy.h"
-#include "gc/StoreBuffer-inl.h"
#include "jit/BaselineJIT.h"
#include "js/MemoryMetrics.h"
#include "js/Proxy.h"
@@ -869,6 +868,9 @@ static inline JSObject*
CreateThisForFunctionWithGroup(JSContext* cx, HandleObjectGroup group,
NewObjectKind newKind)
{
+ if (group->maybeUnboxedLayout() && newKind != SingletonObject)
+ return UnboxedPlainObject::create(cx, group, newKind);
+
if (TypeNewScript* newScript = group->newScript()) {
if (newScript->analyzed()) {
// The definite properties analysis has been performed for this
@@ -1136,18 +1138,19 @@ js::CloneObject(JSContext* cx, HandleObject obj, Handle<js::TaggedProto> proto)
}
static bool
-GetScriptArrayObjectElements(JSContext* cx, HandleArrayObject arr, MutableHandle<GCVector<Value>> values)
+GetScriptArrayObjectElements(JSContext* cx, HandleObject obj, MutableHandle<GCVector<Value>> values)
{
- MOZ_ASSERT(!arr->isSingleton());
- MOZ_ASSERT(!arr->isIndexed());
+ MOZ_ASSERT(!obj->isSingleton());
+ MOZ_ASSERT(obj->is<ArrayObject>() || obj->is<UnboxedArrayObject>());
+ MOZ_ASSERT(!obj->isIndexed());
- size_t length = arr->length();
+ size_t length = GetAnyBoxedOrUnboxedArrayLength(obj);
if (!values.appendN(MagicValue(JS_ELEMENTS_HOLE), length))
return false;
- size_t initlen = arr->getDenseInitializedLength();
+ size_t initlen = GetAnyBoxedOrUnboxedInitializedLength(obj);
for (size_t i = 0; i < initlen; i++)
- values[i].set(arr->getDenseElement(i));
+ values[i].set(GetAnyBoxedOrUnboxedDenseElement(obj, i));
return true;
}
@@ -1156,27 +1159,46 @@ static bool
GetScriptPlainObjectProperties(JSContext* cx, HandleObject obj,
MutableHandle<IdValueVector> properties)
{
- MOZ_ASSERT(obj->is<PlainObject>());
- PlainObject* nobj = &obj->as<PlainObject>();
+ if (obj->is<PlainObject>()) {
+ PlainObject* nobj = &obj->as<PlainObject>();
- if (!properties.appendN(IdValuePair(), nobj->slotSpan()))
- return false;
+ if (!properties.appendN(IdValuePair(), nobj->slotSpan()))
+ return false;
+
+ for (Shape::Range<NoGC> r(nobj->lastProperty()); !r.empty(); r.popFront()) {
+ Shape& shape = r.front();
+ MOZ_ASSERT(shape.isDataDescriptor());
+ uint32_t slot = shape.slot();
+ properties[slot].get().id = shape.propid();
+ properties[slot].get().value = nobj->getSlot(slot);
+ }
+
+ for (size_t i = 0; i < nobj->getDenseInitializedLength(); i++) {
+ Value v = nobj->getDenseElement(i);
+ if (!v.isMagic(JS_ELEMENTS_HOLE) && !properties.append(IdValuePair(INT_TO_JSID(i), v)))
+ return false;
+ }
- for (Shape::Range<NoGC> r(nobj->lastProperty()); !r.empty(); r.popFront()) {
- Shape& shape = r.front();
- MOZ_ASSERT(shape.isDataDescriptor());
- uint32_t slot = shape.slot();
- properties[slot].get().id = shape.propid();
- properties[slot].get().value = nobj->getSlot(slot);
+ return true;
}
- for (size_t i = 0; i < nobj->getDenseInitializedLength(); i++) {
- Value v = nobj->getDenseElement(i);
- if (!v.isMagic(JS_ELEMENTS_HOLE) && !properties.append(IdValuePair(INT_TO_JSID(i), v)))
+ if (obj->is<UnboxedPlainObject>()) {
+ UnboxedPlainObject* nobj = &obj->as<UnboxedPlainObject>();
+
+ const UnboxedLayout& layout = nobj->layout();
+ if (!properties.appendN(IdValuePair(), layout.properties().length()))
return false;
+
+ for (size_t i = 0; i < layout.properties().length(); i++) {
+ const UnboxedLayout::Property& property = layout.properties()[i];
+ properties[i].get().id = NameToId(property.name);
+ properties[i].get().value = nobj->getValue(property);
+ }
+
+ return true;
}
- return true;
+ MOZ_CRASH("Bad object kind");
}
static bool
@@ -1198,13 +1220,13 @@ js::DeepCloneObjectLiteral(JSContext* cx, HandleObject obj, NewObjectKind newKin
/* NB: Keep this in sync with XDRObjectLiteral. */
MOZ_ASSERT_IF(obj->isSingleton(),
cx->compartment()->behaviors().getSingletonsAsTemplates());
- MOZ_ASSERT(obj->is<PlainObject>() ||
- obj->is<ArrayObject>());
+ MOZ_ASSERT(obj->is<PlainObject>() || obj->is<UnboxedPlainObject>() ||
+ obj->is<ArrayObject>() || obj->is<UnboxedArrayObject>());
MOZ_ASSERT(newKind != SingletonObject);
- if (obj->is<ArrayObject>()) {
+ if (obj->is<ArrayObject>() || obj->is<UnboxedArrayObject>()) {
Rooted<GCVector<Value>> values(cx, GCVector<Value>(cx));
- if (!GetScriptArrayObjectElements(cx, obj.as<ArrayObject>(), &values))
+ if (!GetScriptArrayObjectElements(cx, obj, &values))
return nullptr;
// Deep clone any elements.
@@ -1318,8 +1340,10 @@ js::XDRObjectLiteral(XDRState<mode>* xdr, MutableHandleObject obj)
{
if (mode == XDR_ENCODE) {
MOZ_ASSERT(obj->is<PlainObject>() ||
- obj->is<ArrayObject>());
- isArray = obj->is<ArrayObject>() ? 1 : 0;
+ obj->is<UnboxedPlainObject>() ||
+ obj->is<ArrayObject>() ||
+ obj->is<UnboxedArrayObject>());
+ isArray = (obj->is<ArrayObject>() || obj->is<UnboxedArrayObject>()) ? 1 : 0;
}
if (!xdr->codeUint32(&isArray))
@@ -1331,11 +1355,8 @@ js::XDRObjectLiteral(XDRState<mode>* xdr, MutableHandleObject obj)
if (isArray) {
Rooted<GCVector<Value>> values(cx, GCVector<Value>(cx));
- if (mode == XDR_ENCODE) {
- RootedArrayObject arr(cx, &obj->as<ArrayObject>());
- if (!GetScriptArrayObjectElements(cx, arr, &values))
- return false;
- }
+ if (mode == XDR_ENCODE && !GetScriptArrayObjectElements(cx, obj, &values))
+ return false;
uint32_t initialized;
if (mode == XDR_ENCODE)
@@ -2315,6 +2336,16 @@ js::LookupOwnPropertyPure(ExclusiveContext* cx, JSObject* obj, jsid id, Shape**
// us the resolve hook won't define a property with this id.
if (ClassMayResolveId(cx->names(), obj->getClass(), id, obj))
return false;
+ } else if (obj->is<UnboxedPlainObject>()) {
+ if (obj->as<UnboxedPlainObject>().containsUnboxedOrExpandoProperty(cx, id)) {
+ MarkNonNativePropertyFound<NoGC>(propp);
+ return true;
+ }
+ } else if (obj->is<UnboxedArrayObject>()) {
+ if (obj->as<UnboxedArrayObject>().containsProperty(cx, id)) {
+ MarkNonNativePropertyFound<NoGC>(propp);
+ return true;
+ }
} else if (obj->is<TypedObject>()) {
if (obj->as<TypedObject>().typeDescr().hasProperty(cx->names(), id)) {
MarkNonNativePropertyFound<NoGC>(propp);
@@ -2571,6 +2602,11 @@ js::SetPrototype(JSContext* cx, HandleObject obj, HandleObject proto, JS::Object
break;
}
+ // Convert unboxed objects to their native representations before changing
+ // their prototype/group, as they depend on the group for their layout.
+ if (!MaybeConvertUnboxedObjectToNative(cx, obj))
+ return false;
+
Rooted<TaggedProto> taggedProto(cx, TaggedProto(proto));
if (!SetClassAndProto(cx, obj, obj->getClass(), taggedProto))
return false;
@@ -2594,6 +2630,9 @@ js::PreventExtensions(JSContext* cx, HandleObject obj, ObjectOpResult& result, I
if (!obj->nonProxyIsExtensible())
return result.succeed();
+ if (!MaybeConvertUnboxedObjectToNative(cx, obj))
+ return false;
+
// Force lazy properties to be resolved.
AutoIdVector props(cx);
if (!js::GetPropertyKeys(cx, obj, JSITER_HIDDEN | JSITER_OWNONLY, &props))
@@ -3606,6 +3645,22 @@ JSObject::allocKindForTenure(const js::Nursery& nursery) const
if (IsProxy(this))
return as<ProxyObject>().allocKindForTenure();
+ // Unboxed plain objects are sized according to the data they store.
+ if (is<UnboxedPlainObject>()) {
+ size_t nbytes = as<UnboxedPlainObject>().layoutDontCheckGeneration().size();
+ return GetGCObjectKindForBytes(UnboxedPlainObject::offsetOfData() + nbytes);
+ }
+
+ // Unboxed arrays use inline data if their size is small enough.
+ if (is<UnboxedArrayObject>()) {
+ const UnboxedArrayObject* nobj = &as<UnboxedArrayObject>();
+ size_t nbytes = UnboxedArrayObject::offsetOfInlineElements() +
+ nobj->capacity() * nobj->elementSize();
+ if (nbytes <= JSObject::MAX_BYTE_SIZE)
+ return GetGCObjectKindForBytes(nbytes);
+ return AllocKind::OBJECT0;
+ }
+
// Inlined typed objects are followed by their data, so make sure we copy
// it all over to the new object.
if (is<InlineTypedObject>()) {
diff --git a/js/src/jsobjinlines.h b/js/src/jsobjinlines.h
index 98e7401427..a82725ee86 100644
--- a/js/src/jsobjinlines.h
+++ b/js/src/jsobjinlines.h
@@ -32,6 +32,21 @@
#include "vm/ShapedObject-inl.h"
#include "vm/TypeInference-inl.h"
+namespace js {
+
+// This is needed here for ensureShape() below.
+inline bool
+MaybeConvertUnboxedObjectToNative(ExclusiveContext* cx, JSObject* obj)
+{
+ if (obj->is<UnboxedPlainObject>())
+ return UnboxedPlainObject::convertToNative(cx->asJSContext(), obj);
+ if (obj->is<UnboxedArrayObject>())
+ return UnboxedArrayObject::convertToNative(cx->asJSContext(), obj);
+ return true;
+}
+
+} // namespace js
+
inline js::Shape*
JSObject::maybeShape() const
{
@@ -44,6 +59,8 @@ JSObject::maybeShape() const
inline js::Shape*
JSObject::ensureShape(js::ExclusiveContext* cx)
{
+ if (!js::MaybeConvertUnboxedObjectToNative(cx, this))
+ return nullptr;
js::Shape* shape = maybeShape();
MOZ_ASSERT(shape);
return shape;
diff --git a/js/src/jsstr.cpp b/js/src/jsstr.cpp
index 3964ab84e5..5e593846ed 100644
--- a/js/src/jsstr.cpp
+++ b/js/src/jsstr.cpp
@@ -2373,7 +2373,7 @@ js::str_replace_string_raw(JSContext* cx, HandleString string, HandleString patt
}
// ES 2016 draft Mar 25, 2016 21.1.3.17 steps 4, 8, 12-18.
-static ArrayObject*
+static JSObject*
SplitHelper(JSContext* cx, HandleLinearString str, uint32_t limit, HandleLinearString sep,
HandleObjectGroup group)
{
@@ -2470,7 +2470,7 @@ SplitHelper(JSContext* cx, HandleLinearString str, uint32_t limit, HandleLinearS
}
// Fast-path for splitting a string into a character array via split("").
-static ArrayObject*
+static JSObject*
CharSplitHelper(JSContext* cx, HandleLinearString str, uint32_t limit, HandleObjectGroup group)
{
size_t strLength = str->length();
@@ -2495,7 +2495,7 @@ CharSplitHelper(JSContext* cx, HandleLinearString str, uint32_t limit, HandleObj
}
// ES 2016 draft Mar 25, 2016 21.1.3.17 steps 4, 8, 12-18.
-ArrayObject*
+JSObject*
js::str_split_string(JSContext* cx, HandleObjectGroup group, HandleString str, HandleString sep, uint32_t limit)
{
@@ -2906,8 +2906,8 @@ StringObject::assignInitialShape(ExclusiveContext* cx, Handle<StringObject*> obj
{
MOZ_ASSERT(obj->empty());
- return NativeObject::addDataProperty(cx, obj, cx->names().length, LENGTH_SLOT,
- JSPROP_PERMANENT | JSPROP_READONLY);
+ return obj->addDataProperty(cx, cx->names().length, LENGTH_SLOT,
+ JSPROP_PERMANENT | JSPROP_READONLY);
}
JSObject*
diff --git a/js/src/jsstr.h b/js/src/jsstr.h
index 68175c8268..38fbfa85ed 100644
--- a/js/src/jsstr.h
+++ b/js/src/jsstr.h
@@ -465,7 +465,7 @@ FileEscapedString(FILE* fp, const char* chars, size_t length, uint32_t quote)
return res;
}
-ArrayObject*
+JSObject*
str_split_string(JSContext* cx, HandleObjectGroup group, HandleString str, HandleString sep,
uint32_t limit);
diff --git a/js/src/moz.build b/js/src/moz.build
index 5287aef00a..c0cef9929b 100644
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -355,6 +355,7 @@ UNIFIED_SOURCES += [
'vm/UbiNode.cpp',
'vm/UbiNodeCensus.cpp',
'vm/UbiNodeShortestPaths.cpp',
+ 'vm/UnboxedObject.cpp',
'vm/Unicode.cpp',
'vm/Value.cpp',
'vm/WeakMapPtr.cpp',
diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp
index 4b0c858a40..8cd821b311 100644
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -317,6 +317,7 @@ static bool enableIon = false;
static bool enableAsmJS = false;
static bool enableWasm = false;
static bool enableNativeRegExp = false;
+static bool enableUnboxedArrays = false;
static bool enableSharedMemory = SHARED_MEMORY_DEFAULT;
static bool enableWasmAlwaysBaseline = false;
static bool enableArrayProtoValues = true;
@@ -7262,6 +7263,7 @@ SetContextOptions(JSContext* cx, const OptionParser& op)
enableAsmJS = !op.getBoolOption("no-asmjs");
enableWasm = !op.getBoolOption("no-wasm");
enableNativeRegExp = !op.getBoolOption("no-native-regexp");
+ enableUnboxedArrays = op.getBoolOption("unboxed-arrays");
enableWasmAlwaysBaseline = op.getBoolOption("wasm-always-baseline");
enableArrayProtoValues = !op.getBoolOption("no-array-proto-values");
@@ -7271,11 +7273,15 @@ SetContextOptions(JSContext* cx, const OptionParser& op)
.setWasm(enableWasm)
.setWasmAlwaysBaseline(enableWasmAlwaysBaseline)
.setNativeRegExp(enableNativeRegExp)
+ .setUnboxedArrays(enableUnboxedArrays)
.setArrayProtoValues(enableArrayProtoValues);
if (op.getBoolOption("wasm-check-bce"))
jit::JitOptions.wasmAlwaysCheckBounds = true;
+ if (op.getBoolOption("no-unboxed-objects"))
+ jit::JitOptions.disableUnboxedObjects = true;
+
if (const char* str = op.getStringOption("cache-ir-stubs")) {
if (strcmp(str, "on") == 0)
jit::JitOptions.disableCacheIR = false;
@@ -7539,6 +7545,7 @@ SetWorkerContextOptions(JSContext* cx)
.setWasm(enableWasm)
.setWasmAlwaysBaseline(enableWasmAlwaysBaseline)
.setNativeRegExp(enableNativeRegExp)
+ .setUnboxedArrays(enableUnboxedArrays)
.setArrayProtoValues(enableArrayProtoValues);
cx->setOffthreadIonCompilationEnabled(offthreadCompilation);
cx->profilingScripts = enableCodeCoverage || enableDisassemblyDumps;
@@ -7708,6 +7715,8 @@ main(int argc, char** argv, char** envp)
|| !op.addBoolOption('\0', "no-asmjs", "Disable asm.js compilation")
|| !op.addBoolOption('\0', "no-wasm", "Disable WebAssembly compilation")
|| !op.addBoolOption('\0', "no-native-regexp", "Disable native regexp compilation")
+ || !op.addBoolOption('\0', "no-unboxed-objects", "Disable creating unboxed plain objects")
+ || !op.addBoolOption('\0', "unboxed-arrays", "Allow creating unboxed arrays")
|| !op.addBoolOption('\0', "wasm-always-baseline", "Enable wasm baseline compiler when possible")
|| !op.addBoolOption('\0', "wasm-check-bce", "Always generate wasm bounds check, even redundant ones.")
|| !op.addBoolOption('\0', "no-array-proto-values", "Remove Array.prototype.values")
diff --git a/js/src/tests/js1_8_5/reflect-parse/statements.js b/js/src/tests/js1_8_5/reflect-parse/statements.js
index 1df86508b0..11c1b88b42 100644
--- a/js/src/tests/js1_8_5/reflect-parse/statements.js
+++ b/js/src/tests/js1_8_5/reflect-parse/statements.js
@@ -77,7 +77,16 @@ assertStmt("try { } catch (e if foo) { } catch (e if bar) { } catch (e) { } fina
catchClause(ident("e"), ident("bar"), blockStmt([])) ],
catchClause(ident("e"), null, blockStmt([])),
blockStmt([])));
-
+assertStmt("try { } catch { }",
+ tryStmt(blockStmt([]),
+ [],
+ catchClause(null, null, blockStmt([])),
+ null));
+assertStmt("try { } catch { } finally { }",
+ tryStmt(blockStmt([]),
+ [],
+ catchClause(null, null, blockStmt([])),
+ blockStmt([])));
// Bug 632028: yield outside of a function should throw
(function() {
diff --git a/js/src/vm/CommonPropertyNames.h b/js/src/vm/CommonPropertyNames.h
index 6a8afb56b5..420ee75353 100644
--- a/js/src/vm/CommonPropertyNames.h
+++ b/js/src/vm/CommonPropertyNames.h
@@ -281,13 +281,8 @@
macro(proxy, proxy, "proxy") \
macro(raw, raw, "raw") \
macro(reason, reason, "reason") \
- macro(RegExpBuiltinExec, RegExpBuiltinExec, "RegExpBuiltinExec") \
macro(RegExpFlagsGetter, RegExpFlagsGetter, "RegExpFlagsGetter") \
- macro(RegExpMatcher, RegExpMatcher, "RegExpMatcher") \
- macro(RegExpSearcher, RegExpSearcher, "RegExpSearcher") \
macro(RegExpStringIterator, RegExpStringIterator, "RegExp String Iterator") \
- macro(RegExpTester, RegExpTester, "RegExpTester") \
- macro(RegExp_prototype_Exec, RegExp_prototype_Exec, "RegExp_prototype_Exec") \
macro(Reify, Reify, "Reify") \
macro(reject, reject, "reject") \
macro(rejected, rejected, "rejected") \
@@ -360,7 +355,6 @@
macro(uninitialized, uninitialized, "uninitialized") \
macro(unsized, unsized, "unsized") \
macro(unwatch, unwatch, "unwatch") \
- macro(UnwrapAndCallRegExpBuiltinExec, UnwrapAndCallRegExpBuiltinExec, "UnwrapAndCallRegExpBuiltinExec") \
macro(url, url, "url") \
macro(usage, usage, "usage") \
macro(useAsm, useAsm, "use asm") \
diff --git a/js/src/vm/ErrorObject.cpp b/js/src/vm/ErrorObject.cpp
index 271132801c..d8d29830b1 100644
--- a/js/src/vm/ErrorObject.cpp
+++ b/js/src/vm/ErrorObject.cpp
@@ -29,11 +29,11 @@ js::ErrorObject::assignInitialShape(ExclusiveContext* cx, Handle<ErrorObject*> o
{
MOZ_ASSERT(obj->empty());
- if (!NativeObject::addDataProperty(cx, obj, cx->names().fileName, FILENAME_SLOT, 0))
+ if (!obj->addDataProperty(cx, cx->names().fileName, FILENAME_SLOT, 0))
return nullptr;
- if (!NativeObject::addDataProperty(cx, obj, cx->names().lineNumber, LINENUMBER_SLOT, 0))
+ if (!obj->addDataProperty(cx, cx->names().lineNumber, LINENUMBER_SLOT, 0))
return nullptr;
- return NativeObject::addDataProperty(cx, obj, cx->names().columnNumber, COLUMNNUMBER_SLOT, 0);
+ return obj->addDataProperty(cx, cx->names().columnNumber, COLUMNNUMBER_SLOT, 0);
}
/* static */ bool
@@ -57,7 +57,7 @@ js::ErrorObject::init(JSContext* cx, Handle<ErrorObject*> obj, JSExnType type,
// |new Error()|.
RootedShape messageShape(cx);
if (message) {
- messageShape = NativeObject::addDataProperty(cx, obj, cx->names().message, MESSAGE_SLOT, 0);
+ messageShape = obj->addDataProperty(cx, cx->names().message, MESSAGE_SLOT, 0);
if (!messageShape)
return false;
MOZ_ASSERT(messageShape->slot() == MESSAGE_SLOT);
diff --git a/js/src/vm/Interpreter-inl.h b/js/src/vm/Interpreter-inl.h
index acfa8f74bc..0e81dfef43 100644
--- a/js/src/vm/Interpreter-inl.h
+++ b/js/src/vm/Interpreter-inl.h
@@ -22,6 +22,7 @@
#include "vm/EnvironmentObject-inl.h"
#include "vm/Stack-inl.h"
#include "vm/String-inl.h"
+#include "vm/UnboxedObject-inl.h"
namespace js {
@@ -336,10 +337,14 @@ InitGlobalLexicalOperation(JSContext* cx, LexicalEnvironmentObject* lexicalEnvAr
inline bool
InitPropertyOperation(JSContext* cx, JSOp op, HandleObject obj, HandleId id, HandleValue rhs)
{
- MOZ_ASSERT(obj->is<PlainObject>() || obj->is<JSFunction>());
- unsigned propAttrs = GetInitDataPropAttrs(op);
- return NativeDefineProperty(cx, obj.as<NativeObject>(), id, rhs,
- nullptr, nullptr, propAttrs);
+ if (obj->is<PlainObject>() || obj->is<JSFunction>()) {
+ unsigned propAttrs = GetInitDataPropAttrs(op);
+ return NativeDefineProperty(cx, obj.as<NativeObject>(), id, rhs, nullptr, nullptr,
+ propAttrs);
+ }
+
+ MOZ_ASSERT(obj->as<UnboxedPlainObject>().layout().lookup(id));
+ return PutProperty(cx, obj, id, rhs, false);
}
inline bool
@@ -593,7 +598,7 @@ InitArrayElemOperation(JSContext* cx, jsbytecode* pc, HandleObject obj, uint32_t
JSOp op = JSOp(*pc);
MOZ_ASSERT(op == JSOP_INITELEM_ARRAY || op == JSOP_INITELEM_INC);
- MOZ_ASSERT(obj->is<ArrayObject>());
+ MOZ_ASSERT(obj->is<ArrayObject>() || obj->is<UnboxedArrayObject>());
if (op == JSOP_INITELEM_INC && index == INT32_MAX) {
JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_SPREAD_TOO_LARGE);
diff --git a/js/src/vm/Interpreter.cpp b/js/src/vm/Interpreter.cpp
index 3cf9b57f60..2743923353 100644
--- a/js/src/vm/Interpreter.cpp
+++ b/js/src/vm/Interpreter.cpp
@@ -1939,7 +1939,6 @@ CASE(EnableInterruptsPseudoOpcode)
/* Various 1-byte no-ops. */
CASE(JSOP_NOP)
CASE(JSOP_NOP_DESTRUCTURING)
-CASE(JSOP_UNUSED126)
CASE(JSOP_UNUSED211)
CASE(JSOP_TRY_DESTRUCTURING_ITERCLOSE)
CASE(JSOP_UNUSED221)
@@ -3682,6 +3681,7 @@ CASE(JSOP_NEWINIT)
END_CASE(JSOP_NEWINIT)
CASE(JSOP_NEWARRAY)
+CASE(JSOP_SPREADCALLARRAY)
{
uint32_t length = GET_UINT32(REGS.pc);
JSObject* obj = NewArrayOperation(cx, script, REGS.pc, length);
@@ -4157,7 +4157,7 @@ CASE(JSOP_INITHOMEOBJECT)
/* Load the home object */
ReservedRooted<JSObject*> obj(&rootObject0);
obj = &REGS.sp[int(-2 - skipOver)].toObject();
- MOZ_ASSERT(obj->is<PlainObject>() || obj->is<JSFunction>());
+ MOZ_ASSERT(obj->is<PlainObject>() || obj->is<UnboxedPlainObject>() || obj->is<JSFunction>());
func->setExtendedSlot(FunctionExtended::METHOD_HOMEOBJECT_SLOT, ObjectValue(*obj));
}
@@ -4973,13 +4973,18 @@ js::NewObjectOperation(JSContext* cx, HandleScript script, jsbytecode* pc,
return nullptr;
if (group->maybePreliminaryObjects()) {
group->maybePreliminaryObjects()->maybeAnalyze(cx, group);
+ if (group->maybeUnboxedLayout())
+ group->maybeUnboxedLayout()->setAllocationSite(script, pc);
}
if (group->shouldPreTenure() || group->maybePreliminaryObjects())
newKind = TenuredObject;
+
+ if (group->maybeUnboxedLayout())
+ return UnboxedPlainObject::create(cx, group, newKind);
}
- RootedPlainObject obj(cx);
+ RootedObject obj(cx);
if (*pc == JSOP_NEWOBJECT) {
RootedPlainObject baseObject(cx, &script->getObject(pc)->as<PlainObject>());
@@ -5016,6 +5021,11 @@ js::NewObjectOperationWithTemplate(JSContext* cx, HandleObject templateObject)
NewObjectKind newKind = templateObject->group()->shouldPreTenure() ? TenuredObject : GenericObject;
+ if (templateObject->group()->maybeUnboxedLayout()) {
+ RootedObjectGroup group(cx, templateObject->group());
+ return UnboxedPlainObject::create(cx, group, newKind);
+ }
+
JSObject* obj = CopyInitializerObject(cx, templateObject.as<PlainObject>(), newKind);
if (!obj)
return nullptr;
@@ -5042,6 +5052,9 @@ js::NewArrayOperation(JSContext* cx, HandleScript script, jsbytecode* pc, uint32
if (group->shouldPreTenure() || group->maybePreliminaryObjects())
newKind = TenuredObject;
+
+ if (group->maybeUnboxedLayout())
+ return UnboxedArrayObject::create(cx, group, length, newKind);
}
ArrayObject* obj = NewDenseFullyAllocatedArray(cx, length, nullptr, newKind);
@@ -5052,6 +5065,9 @@ js::NewArrayOperation(JSContext* cx, HandleScript script, jsbytecode* pc, uint32
MOZ_ASSERT(obj->isSingleton());
} else {
obj->setGroup(group);
+
+ if (PreliminaryObjectArray* preliminaryObjects = group->maybePreliminaryObjects())
+ preliminaryObjects->registerNewObject(obj);
}
return obj;
@@ -5064,6 +5080,12 @@ js::NewArrayOperationWithTemplate(JSContext* cx, HandleObject templateObject)
NewObjectKind newKind = templateObject->group()->shouldPreTenure() ? TenuredObject : GenericObject;
+ if (templateObject->is<UnboxedArrayObject>()) {
+ uint32_t length = templateObject->as<UnboxedArrayObject>().length();
+ RootedObjectGroup group(cx, templateObject->group());
+ return UnboxedArrayObject::create(cx, group, length, newKind);
+ }
+
ArrayObject* obj = NewDenseFullyAllocatedArray(cx, templateObject->as<ArrayObject>().length(),
nullptr, newKind);
if (!obj)
diff --git a/js/src/vm/JSONParser.cpp b/js/src/vm/JSONParser.cpp
index e50da3bc46..01883bb155 100644
--- a/js/src/vm/JSONParser.cpp
+++ b/js/src/vm/JSONParser.cpp
@@ -606,8 +606,8 @@ JSONParserBase::finishArray(MutableHandleValue vp, ElementVector& elements)
{
MOZ_ASSERT(&elements == &stack.back().elements());
- ArrayObject* obj = ObjectGroup::newArrayObject(cx, elements.begin(), elements.length(),
- GenericObject);
+ JSObject* obj = ObjectGroup::newArrayObject(cx, elements.begin(), elements.length(),
+ GenericObject);
if (!obj)
return false;
diff --git a/js/src/vm/NativeObject-inl.h b/js/src/vm/NativeObject-inl.h
index 030d92c127..205d99aa2c 100644
--- a/js/src/vm/NativeObject-inl.h
+++ b/js/src/vm/NativeObject-inl.h
@@ -235,38 +235,6 @@ NativeObject::ensureDenseElements(ExclusiveContext* cx, uint32_t index, uint32_t
return DenseElementResult::Success;
}
-inline DenseElementResult
-NativeObject::setOrExtendDenseElements(ExclusiveContext* cx, uint32_t start, const Value* vp,
- uint32_t count,
- ShouldUpdateTypes updateTypes)
-{
- if (denseElementsAreFrozen())
- return DenseElementResult::Incomplete;
-
- if (is<ArrayObject>() &&
- !as<ArrayObject>().lengthIsWritable() &&
- start + count >= as<ArrayObject>().length())
- {
- return DenseElementResult::Incomplete;
- }
-
- DenseElementResult result = ensureDenseElements(cx, start, count);
- if (result != DenseElementResult::Success)
- return result;
-
- if (is<ArrayObject>() && start + count >= as<ArrayObject>().length())
- as<ArrayObject>().setLengthInt32(start + count);
-
- if (updateTypes == ShouldUpdateTypes::DontUpdate && !shouldConvertDoubleElements()) {
- copyDenseElements(start, vp, count);
- } else {
- for (size_t i = 0; i < count; i++)
- setDenseElementWithType(cx, start + i, vp[i]);
- }
-
- return DenseElementResult::Success;
-}
-
inline Value
NativeObject::getDenseOrTypedArrayElement(uint32_t idx)
{
diff --git a/js/src/vm/NativeObject.cpp b/js/src/vm/NativeObject.cpp
index d801fad06e..8b7543d128 100644
--- a/js/src/vm/NativeObject.cpp
+++ b/js/src/vm/NativeObject.cpp
@@ -388,6 +388,33 @@ NativeObject::setLastPropertyMakeNonNative(Shape* shape)
shape_ = shape;
}
+void
+NativeObject::setLastPropertyMakeNative(ExclusiveContext* cx, Shape* shape)
+{
+ MOZ_ASSERT(getClass()->isNative());
+ MOZ_ASSERT(shape->getObjectClass()->isNative());
+ MOZ_ASSERT(!shape->inDictionary());
+
+ // This method is used to convert unboxed objects into native objects. In
+ // this case, the shape_ field was previously used to store other data and
+ // this should be treated as an initialization.
+ shape_.init(shape);
+
+ slots_ = nullptr;
+ elements_ = emptyObjectElements;
+
+ size_t oldSpan = shape->numFixedSlots();
+ size_t newSpan = shape->slotSpan();
+
+ initializeSlotRange(0, oldSpan);
+
+ // A failure at this point will leave the object as a mutant, and we
+ // can't recover.
+ AutoEnterOOMUnsafeRegion oomUnsafe;
+ if (oldSpan != newSpan && !updateSlotsForSpan(cx, oldSpan, newSpan))
+ oomUnsafe.crash("NativeObject::setLastPropertyMakeNative");
+}
+
bool
NativeObject::setSlotSpan(ExclusiveContext* cx, uint32_t span)
{
@@ -994,22 +1021,23 @@ NativeObject::freeSlot(ExclusiveContext* cx, uint32_t slot)
setSlot(slot, UndefinedValue());
}
-/* static */ Shape*
-NativeObject::addDataProperty(ExclusiveContext* cx, HandleNativeObject obj,
- jsid idArg, uint32_t slot, unsigned attrs)
+Shape*
+NativeObject::addDataProperty(ExclusiveContext* cx, jsid idArg, uint32_t slot, unsigned attrs)
{
MOZ_ASSERT(!(attrs & (JSPROP_GETTER | JSPROP_SETTER)));
+ RootedNativeObject self(cx, this);
RootedId id(cx, idArg);
- return addProperty(cx, obj, id, nullptr, nullptr, slot, attrs, 0);
+ return addProperty(cx, self, id, nullptr, nullptr, slot, attrs, 0);
}
-/* static */ Shape*
-NativeObject::addDataProperty(ExclusiveContext* cx, HandleNativeObject obj,
- HandlePropertyName name, uint32_t slot, unsigned attrs)
+Shape*
+NativeObject::addDataProperty(ExclusiveContext* cx, HandlePropertyName name,
+ uint32_t slot, unsigned attrs)
{
MOZ_ASSERT(!(attrs & (JSPROP_GETTER | JSPROP_SETTER)));
+ RootedNativeObject self(cx, this);
RootedId id(cx, NameToId(name));
- return addProperty(cx, obj, id, nullptr, nullptr, slot, attrs, 0);
+ return addProperty(cx, self, id, nullptr, nullptr, slot, attrs, 0);
}
template <AllowGC allowGC>
diff --git a/js/src/vm/NativeObject.h b/js/src/vm/NativeObject.h
index 9cc6d54366..3a3e50244f 100644
--- a/js/src/vm/NativeObject.h
+++ b/js/src/vm/NativeObject.h
@@ -339,19 +339,16 @@ IsObjectValueInCompartment(const Value& v, JSCompartment* comp);
#endif
// Operations which change an object's dense elements can either succeed, fail,
-// or be unable to complete. The latter is used when the object's elements must
-// become sparse instead. The enum below is used for such operations.
+// or be unable to complete. For native objects, the latter is used when the
+// object's elements must become sparse instead. The enum below is used for
+// such operations, and for similar operations on unboxed arrays and methods
+// that work on both kinds of objects.
enum class DenseElementResult {
Failure,
Success,
Incomplete
};
-enum class ShouldUpdateTypes {
- Update,
- DontUpdate
-};
-
/*
* NativeObject specifies the internal implementation of a native object.
*
@@ -470,6 +467,11 @@ class NativeObject : public ShapedObject
// that are (temporarily) inconsistent.
void setLastPropertyMakeNonNative(Shape* shape);
+ // As for setLastProperty(), but changes the class associated with the
+ // object to a native one. The object's type has already been changed, and
+ // this brings the shape into sync with it.
+ void setLastPropertyMakeNative(ExclusiveContext* cx, Shape* shape);
+
// Newly-created TypedArrays that map a SharedArrayBuffer are
// marked as shared by giving them an ObjectElements that has the
// ObjectElements::SHARED_MEMORY flag set.
@@ -744,10 +746,10 @@ class NativeObject : public ShapedObject
bool allowDictionary = true);
/* Add a data property whose id is not yet in this scope. */
- static Shape* addDataProperty(ExclusiveContext* cx, HandleNativeObject obj,
- jsid id_, uint32_t slot, unsigned attrs);
- static Shape* addDataProperty(ExclusiveContext* cx, HandleNativeObject obj,
- HandlePropertyName name, uint32_t slot, unsigned attrs);
+ Shape* addDataProperty(ExclusiveContext* cx,
+ jsid id_, uint32_t slot, unsigned attrs);
+ Shape* addDataProperty(ExclusiveContext* cx, HandlePropertyName name,
+ uint32_t slot, unsigned attrs);
/* Add or overwrite a property for id in this scope. */
static Shape*
@@ -1149,10 +1151,6 @@ class NativeObject : public ShapedObject
elementsRangeWriteBarrierPost(dstStart, count);
}
- inline DenseElementResult
- setOrExtendDenseElements(ExclusiveContext* cx, uint32_t start, const Value* vp, uint32_t count,
- ShouldUpdateTypes updateTypes = ShouldUpdateTypes::Update);
-
bool shouldConvertDoubleElements() {
return getElementsHeader()->shouldConvertDoubleElements();
}
diff --git a/js/src/vm/ObjectGroup-inl.h b/js/src/vm/ObjectGroup-inl.h
index d41343be64..9074f4d974 100644
--- a/js/src/vm/ObjectGroup-inl.h
+++ b/js/src/vm/ObjectGroup-inl.h
@@ -108,6 +108,20 @@ ObjectGroup::maybePreliminaryObjects()
return maybePreliminaryObjectsDontCheckGeneration();
}
+inline UnboxedLayout*
+ObjectGroup::maybeUnboxedLayout()
+{
+ maybeSweep(nullptr);
+ return maybeUnboxedLayoutDontCheckGeneration();
+}
+
+inline UnboxedLayout&
+ObjectGroup::unboxedLayout()
+{
+ maybeSweep(nullptr);
+ return unboxedLayoutDontCheckGeneration();
+}
+
} // namespace js
#endif /* vm_ObjectGroup_inl_h */
diff --git a/js/src/vm/ObjectGroup.cpp b/js/src/vm/ObjectGroup.cpp
index 91070b3f6b..d05a48646b 100644
--- a/js/src/vm/ObjectGroup.cpp
+++ b/js/src/vm/ObjectGroup.cpp
@@ -18,10 +18,11 @@
#include "vm/ArrayObject.h"
#include "vm/Shape.h"
#include "vm/TaggedProto.h"
+#include "vm/UnboxedObject.h"
#include "jsobjinlines.h"
-#include "vm/NativeObject-inl.h"
+#include "vm/UnboxedObject-inl.h"
using namespace js;
@@ -55,6 +56,7 @@ ObjectGroup::finalize(FreeOp* fop)
if (newScriptDontCheckGeneration())
newScriptDontCheckGeneration()->clear();
fop->delete_(newScriptDontCheckGeneration());
+ fop->delete_(maybeUnboxedLayoutDontCheckGeneration());
if (maybePreliminaryObjectsDontCheckGeneration())
maybePreliminaryObjectsDontCheckGeneration()->clear();
fop->delete_(maybePreliminaryObjectsDontCheckGeneration());
@@ -81,6 +83,8 @@ ObjectGroup::sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) const
size_t n = 0;
if (TypeNewScript* newScript = newScriptDontCheckGeneration())
n += newScript->sizeOfIncludingThis(mallocSizeOf);
+ if (UnboxedLayout* layout = maybeUnboxedLayoutDontCheckGeneration())
+ n += layout->sizeOfIncludingThis(mallocSizeOf);
return n;
}
@@ -529,7 +533,8 @@ ObjectGroup::defaultNewGroup(ExclusiveContext* cx, const Class* clasp,
if (p) {
ObjectGroup* group = p->group;
MOZ_ASSERT_IF(clasp, group->clasp() == clasp);
- MOZ_ASSERT_IF(!clasp, group->clasp() == &PlainObject::class_);
+ MOZ_ASSERT_IF(!clasp, group->clasp() == &PlainObject::class_ ||
+ group->clasp() == &UnboxedPlainObject::class_);
MOZ_ASSERT(group->proto() == proto);
return group;
}
@@ -772,7 +777,7 @@ GetValueTypeForTable(const Value& v)
return type;
}
-/* static */ ArrayObject*
+/* static */ JSObject*
ObjectGroup::newArrayObject(ExclusiveContext* cx,
const Value* vp, size_t length,
NewObjectKind newKind, NewArrayKind arrayKind)
@@ -836,13 +841,56 @@ ObjectGroup::newArrayObject(ExclusiveContext* cx,
AddTypePropertyId(cx, group, nullptr, JSID_VOID, elementType);
+ if (elementType != TypeSet::UnknownType()) {
+ // Keep track of the initial objects we create with this type.
+ // If the initial ones have a consistent shape and property types, we
+ // will try to use an unboxed layout for the group.
+ PreliminaryObjectArrayWithTemplate* preliminaryObjects =
+ cx->new_<PreliminaryObjectArrayWithTemplate>(nullptr);
+ if (!preliminaryObjects)
+ return nullptr;
+ group->setPreliminaryObjects(preliminaryObjects);
+ }
+
if (!p.add(cx, *table, ObjectGroupCompartment::ArrayObjectKey(elementType), group))
return nullptr;
}
// The type of the elements being added will already be reflected in type
- // information.
+ // information, but make sure when creating an unboxed array that the
+ // common element type is suitable for the unboxed representation.
ShouldUpdateTypes updateTypes = ShouldUpdateTypes::DontUpdate;
+ if (!MaybeAnalyzeBeforeCreatingLargeArray(cx, group, vp, length))
+ return nullptr;
+ if (group->maybePreliminaryObjects())
+ group->maybePreliminaryObjects()->maybeAnalyze(cx, group);
+ if (group->maybeUnboxedLayout()) {
+ switch (group->unboxedLayout().elementType()) {
+ case JSVAL_TYPE_BOOLEAN:
+ if (elementType != TypeSet::BooleanType())
+ updateTypes = ShouldUpdateTypes::Update;
+ break;
+ case JSVAL_TYPE_INT32:
+ if (elementType != TypeSet::Int32Type())
+ updateTypes = ShouldUpdateTypes::Update;
+ break;
+ case JSVAL_TYPE_DOUBLE:
+ if (elementType != TypeSet::Int32Type() && elementType != TypeSet::DoubleType())
+ updateTypes = ShouldUpdateTypes::Update;
+ break;
+ case JSVAL_TYPE_STRING:
+ if (elementType != TypeSet::StringType())
+ updateTypes = ShouldUpdateTypes::Update;
+ break;
+ case JSVAL_TYPE_OBJECT:
+ if (elementType != TypeSet::NullType() && !elementType.get().isObjectUnchecked())
+ updateTypes = ShouldUpdateTypes::Update;
+ break;
+ default:
+ MOZ_CRASH();
+ }
+ }
+
return NewCopiedArrayTryUseGroup(cx, group, vp, length, newKind, updateTypes);
}
@@ -852,15 +900,49 @@ GiveObjectGroup(ExclusiveContext* cx, JSObject* source, JSObject* target)
{
MOZ_ASSERT(source->group() != target->group());
- if (!target->is<ArrayObject>() || !source->is<ArrayObject>()) {
+ if (!target->is<ArrayObject>() && !target->is<UnboxedArrayObject>())
+ return true;
+
+ if (target->group()->maybePreliminaryObjects()) {
+ bool force = IsInsideNursery(source);
+ target->group()->maybePreliminaryObjects()->maybeAnalyze(cx, target->group(), force);
+ }
+
+ if (target->is<ArrayObject>()) {
+ ObjectGroup* sourceGroup = source->group();
+
+ if (source->is<UnboxedArrayObject>()) {
+ Shape* shape = target->as<ArrayObject>().lastProperty();
+ if (!UnboxedArrayObject::convertToNativeWithGroup(cx, source, target->group(), shape))
+ return false;
+ } else if (source->is<ArrayObject>()) {
+ source->setGroup(target->group());
+ } else {
+ return true;
+ }
+
+ if (sourceGroup->maybePreliminaryObjects())
+ sourceGroup->maybePreliminaryObjects()->unregisterObject(source);
+ if (target->group()->maybePreliminaryObjects())
+ target->group()->maybePreliminaryObjects()->registerNewObject(source);
+
+ for (size_t i = 0; i < source->as<ArrayObject>().getDenseInitializedLength(); i++) {
+ Value v = source->as<ArrayObject>().getDenseElement(i);
+ AddTypePropertyId(cx, source->group(), source, JSID_VOID, v);
+ }
+
return true;
}
- source->setGroup(target->group());
+ if (target->is<UnboxedArrayObject>()) {
+ if (!source->is<UnboxedArrayObject>())
+ return true;
+ if (source->as<UnboxedArrayObject>().elementType() != JSVAL_TYPE_INT32)
+ return true;
+ if (target->as<UnboxedArrayObject>().elementType() != JSVAL_TYPE_DOUBLE)
+ return true;
- for (size_t i = 0; i < source->as<ArrayObject>().getDenseInitializedLength(); i++) {
- Value v = source->as<ArrayObject>().getDenseElement(i);
- AddTypePropertyId(cx, source->group(), source, JSID_VOID, v);
+ return source->as<UnboxedArrayObject>().convertInt32ToDouble(cx, target->group());
}
return true;
@@ -969,6 +1051,46 @@ js::CombinePlainObjectPropertyTypes(ExclusiveContext* cx, JSObject* newObj,
}
}
}
+ } else if (newObj->is<UnboxedPlainObject>()) {
+ const UnboxedLayout& layout = newObj->as<UnboxedPlainObject>().layout();
+ const int32_t* traceList = layout.traceList();
+ if (!traceList)
+ return true;
+
+ uint8_t* newData = newObj->as<UnboxedPlainObject>().data();
+ uint8_t* oldData = oldObj->as<UnboxedPlainObject>().data();
+
+ for (; *traceList != -1; traceList++) {}
+ traceList++;
+ for (; *traceList != -1; traceList++) {
+ JSObject* newInnerObj = *reinterpret_cast<JSObject**>(newData + *traceList);
+ JSObject* oldInnerObj = *reinterpret_cast<JSObject**>(oldData + *traceList);
+
+ if (!newInnerObj || !oldInnerObj || SameGroup(oldInnerObj, newInnerObj))
+ continue;
+
+ if (!GiveObjectGroup(cx, newInnerObj, oldInnerObj))
+ return false;
+
+ if (SameGroup(oldInnerObj, newInnerObj))
+ continue;
+
+ if (!GiveObjectGroup(cx, oldInnerObj, newInnerObj))
+ return false;
+
+ if (SameGroup(oldInnerObj, newInnerObj)) {
+ for (size_t i = 1; i < ncompare; i++) {
+ if (compare[i].isObject() && SameGroup(&compare[i].toObject(), newObj)) {
+ uint8_t* otherData = compare[i].toObject().as<UnboxedPlainObject>().data();
+ JSObject* otherInnerObj = *reinterpret_cast<JSObject**>(otherData + *traceList);
+ if (otherInnerObj && !SameGroup(otherInnerObj, newInnerObj)) {
+ if (!GiveObjectGroup(cx, otherInnerObj, newInnerObj))
+ return false;
+ }
+ }
+ }
+ }
+ }
}
return true;
@@ -1192,6 +1314,12 @@ ObjectGroup::newPlainObject(ExclusiveContext* cx, IdValuePair* properties, size_
RootedObjectGroup group(cx, p->value().group);
+ // Watch for existing groups which now use an unboxed layout.
+ if (group->maybeUnboxedLayout()) {
+ MOZ_ASSERT(group->unboxedLayout().properties().length() == nproperties);
+ return UnboxedPlainObject::createWithProperties(cx, group, newKind, properties);
+ }
+
// Update property types according to the properties we are about to add.
// Do this before we do anything which can GC, which might move or remove
// this table entry.
@@ -1378,6 +1506,18 @@ ObjectGroup::allocationSiteGroup(JSContext* cx, JSScript* scriptArg, jsbytecode*
}
}
+ if (kind == JSProto_Array &&
+ (JSOp(*pc) == JSOP_NEWARRAY || IsCallPC(pc)) &&
+ cx->options().unboxedArrays())
+ {
+ PreliminaryObjectArrayWithTemplate* preliminaryObjects =
+ cx->new_<PreliminaryObjectArrayWithTemplate>(nullptr);
+ if (preliminaryObjects)
+ res->setPreliminaryObjects(preliminaryObjects);
+ else
+ cx->recoverFromOutOfMemory();
+ }
+
if (!table->add(p, key, res)) {
ReportOutOfMemory(cx);
return nullptr;
diff --git a/js/src/vm/ObjectGroup.h b/js/src/vm/ObjectGroup.h
index 0b6eaee51b..4e24de9f14 100644
--- a/js/src/vm/ObjectGroup.h
+++ b/js/src/vm/ObjectGroup.h
@@ -20,6 +20,7 @@
namespace js {
class TypeDescr;
+class UnboxedLayout;
class PreliminaryObjectArrayWithTemplate;
class TypeNewScript;
@@ -153,6 +154,16 @@ class ObjectGroup : public gc::TenuredCell
// For some plain objects, the addendum stores a PreliminaryObjectArrayWithTemplate.
Addendum_PreliminaryObjects,
+ // When objects in this group have an unboxed representation, the
+ // addendum stores an UnboxedLayout (which might have a TypeNewScript
+ // as well, if the group is also constructed using 'new').
+ Addendum_UnboxedLayout,
+
+ // If this group is used by objects that have been converted from an
+ // unboxed representation and/or have the same allocation kind as such
+ // objects, the addendum points to that unboxed group.
+ Addendum_OriginalUnboxedGroup,
+
// When used by typed objects, the addendum stores a TypeDescr.
Addendum_TypeDescr
};
@@ -174,6 +185,7 @@ class ObjectGroup : public gc::TenuredCell
return nullptr;
}
+ TypeNewScript* anyNewScript();
void detachNewScript(bool writeBarrier, ObjectGroup* replacement);
ObjectGroupFlags flagsDontCheckGeneration() const {
@@ -213,6 +225,34 @@ class ObjectGroup : public gc::TenuredCell
maybePreliminaryObjectsDontCheckGeneration();
}
+ inline UnboxedLayout* maybeUnboxedLayout();
+ inline UnboxedLayout& unboxedLayout();
+
+ UnboxedLayout* maybeUnboxedLayoutDontCheckGeneration() const {
+ if (addendumKind() == Addendum_UnboxedLayout)
+ return reinterpret_cast<UnboxedLayout*>(addendum_);
+ return nullptr;
+ }
+
+ UnboxedLayout& unboxedLayoutDontCheckGeneration() const {
+ MOZ_ASSERT(addendumKind() == Addendum_UnboxedLayout);
+ return *maybeUnboxedLayoutDontCheckGeneration();
+ }
+
+ void setUnboxedLayout(UnboxedLayout* layout) {
+ setAddendum(Addendum_UnboxedLayout, layout);
+ }
+
+ ObjectGroup* maybeOriginalUnboxedGroup() const {
+ if (addendumKind() == Addendum_OriginalUnboxedGroup)
+ return reinterpret_cast<ObjectGroup*>(addendum_);
+ return nullptr;
+ }
+
+ void setOriginalUnboxedGroup(ObjectGroup* group) {
+ setAddendum(Addendum_OriginalUnboxedGroup, group);
+ }
+
TypeDescr* maybeTypeDescr() {
// Note: there is no need to sweep when accessing the type descriptor
// of an object, as it is strongly held and immutable.
@@ -273,8 +313,9 @@ class ObjectGroup : public gc::TenuredCell
* that can be read out of that property in actual JS objects. In native
* objects, property types account for plain data properties (those with a
* slot and no getter or setter hook) and dense elements. In typed objects
- * property types account for object and value properties and elements in
- * the object.
+ * and unboxed objects, property types account for object and value
+ * properties and elements in the object, and expando properties in unboxed
+ * objects.
*
* For accesses on these properties, the correspondence is as follows:
*
@@ -297,9 +338,10 @@ class ObjectGroup : public gc::TenuredCell
* 2. Array lengths are special cased by the compiler and VM and are not
* reflected in property types.
*
- * 3. In typed objects, the initial values of properties (null pointers and
- * undefined values) are not reflected in the property types. These
- * values are always possible when reading the property.
+ * 3. In typed objects (but not unboxed objects), the initial values of
+ * properties (null pointers and undefined values) are not reflected in
+ * the property types. These values are always possible when reading the
+ * property.
*
* We establish these by using write barriers on calls to setProperty and
* defineProperty which are on native properties, and on any jitcode which
@@ -413,6 +455,12 @@ class ObjectGroup : public gc::TenuredCell
return &flags_;
}
+ // Get the bit pattern stored in an object's addendum when it has an
+ // original unboxed group.
+ static inline int32_t addendumOriginalUnboxedGroupValue() {
+ return Addendum_OriginalUnboxedGroup << OBJECT_FLAG_ADDENDUM_SHIFT;
+ }
+
inline uint32_t basePropertyCount();
private:
@@ -457,14 +505,14 @@ class ObjectGroup : public gc::TenuredCell
UnknownIndex // Make an array with an unknown element type.
};
- // Create an ArrayObject with the specified elements and a group specialized
- // for the elements.
- static ArrayObject* newArrayObject(ExclusiveContext* cx, const Value* vp, size_t length,
- NewObjectKind newKind,
- NewArrayKind arrayKind = NewArrayKind::Normal);
+ // Create an ArrayObject or UnboxedArrayObject with the specified elements
+ // and a group specialized for the elements.
+ static JSObject* newArrayObject(ExclusiveContext* cx, const Value* vp, size_t length,
+ NewObjectKind newKind,
+ NewArrayKind arrayKind = NewArrayKind::Normal);
- // Create a PlainObject with the specified properties and a group specialized
- // for those properties.
+ // Create a PlainObject or UnboxedPlainObject with the specified properties
+ // and a group specialized for those properties.
static JSObject* newPlainObject(ExclusiveContext* cx,
IdValuePair* properties, size_t nproperties,
NewObjectKind newKind);
diff --git a/js/src/vm/Opcodes.h b/js/src/vm/Opcodes.h
index e13cd62219..b26336815e 100644
--- a/js/src/vm/Opcodes.h
+++ b/js/src/vm/Opcodes.h
@@ -1281,7 +1281,17 @@
* Stack: receiver, obj, propval => obj[propval]
*/ \
macro(JSOP_GETELEM_SUPER, 125, "getelem-super", NULL, 1, 3, 1, JOF_BYTE |JOF_ELEM|JOF_LEFTASSOC) \
- macro(JSOP_UNUSED126, 126, "unused126", NULL, 5, 0, 1, JOF_UINT32) \
+ /*
+ * Pushes newly created array for a spread call onto the stack. This has
+ * the same semantics as JSOP_NEWARRAY, but is distinguished to avoid
+ * using unboxed arrays in spread calls, which would make compiling spread
+ * calls in baseline more complex.
+ * Category: Literals
+ * Type: Array
+ * Operands: uint32_t length
+ * Stack: => obj
+ */ \
+ macro(JSOP_SPREADCALLARRAY, 126, "spreadcallarray", NULL, 5, 0, 1, JOF_UINT32) \
\
/*
* Defines the given function on the current scope.
diff --git a/js/src/vm/ReceiverGuard.cpp b/js/src/vm/ReceiverGuard.cpp
index e95e8a208a..97df908c3b 100644
--- a/js/src/vm/ReceiverGuard.cpp
+++ b/js/src/vm/ReceiverGuard.cpp
@@ -7,6 +7,7 @@
#include "vm/ReceiverGuard.h"
#include "builtin/TypedObject.h"
+#include "vm/UnboxedObject.h"
#include "jsobjinlines.h"
using namespace js;
@@ -15,7 +16,11 @@ ReceiverGuard::ReceiverGuard(JSObject* obj)
: group(nullptr), shape(nullptr)
{
if (obj) {
- if (obj->is<TypedObject>()) {
+ if (obj->is<UnboxedPlainObject>()) {
+ group = obj->group();
+ if (UnboxedExpandoObject* expando = obj->as<UnboxedPlainObject>().maybeExpando())
+ shape = expando->lastProperty();
+ } else if (obj->is<UnboxedArrayObject>() || obj->is<TypedObject>()) {
group = obj->group();
} else {
shape = obj->maybeShape();
@@ -28,7 +33,9 @@ ReceiverGuard::ReceiverGuard(ObjectGroup* group, Shape* shape)
{
if (group) {
const Class* clasp = group->clasp();
- if (IsTypedObjectClass(clasp)) {
+ if (clasp == &UnboxedPlainObject::class_) {
+ // Keep both group and shape.
+ } else if (clasp == &UnboxedArrayObject::class_ || IsTypedObjectClass(clasp)) {
this->shape = nullptr;
} else {
this->group = nullptr;
@@ -39,8 +46,12 @@ ReceiverGuard::ReceiverGuard(ObjectGroup* group, Shape* shape)
/* static */ int32_t
HeapReceiverGuard::keyBits(JSObject* obj)
{
- if (obj->is<TypedObject>()) {
- // Only the group needs to be guarded for typed objects.
+ if (obj->is<UnboxedPlainObject>()) {
+ // Both the group and shape need to be guarded for unboxed plain objects.
+ return obj->as<UnboxedPlainObject>().maybeExpando() ? 0 : 1;
+ }
+ if (obj->is<UnboxedArrayObject>() || obj->is<TypedObject>()) {
+ // Only the group needs to be guarded for unboxed arrays and typed objects.
return 2;
}
// Other objects only need the shape to be guarded.
diff --git a/js/src/vm/ReceiverGuard.h b/js/src/vm/ReceiverGuard.h
index c14f0d83b5..459cc0012d 100644
--- a/js/src/vm/ReceiverGuard.h
+++ b/js/src/vm/ReceiverGuard.h
@@ -28,6 +28,11 @@ namespace js {
// TypedObject: The structure of a typed object is determined by its group.
// All typed objects with the same group have the same class, prototype, and
// own properties.
+//
+// UnboxedPlainObject: The structure of an unboxed plain object is determined
+// by its group and its expando object's shape, if there is one. All unboxed
+// plain objects with the same group and expando shape have the same
+// properties except those stored in the expando's dense elements.
class HeapReceiverGuard;
class RootedReceiverGuard;
diff --git a/js/src/vm/RegExpObject.cpp b/js/src/vm/RegExpObject.cpp
index cd0b54c9d6..6223fc10dd 100644
--- a/js/src/vm/RegExpObject.cpp
+++ b/js/src/vm/RegExpObject.cpp
@@ -299,8 +299,7 @@ RegExpObject::assignInitialShape(ExclusiveContext* cx, Handle<RegExpObject*> sel
JS_STATIC_ASSERT(LAST_INDEX_SLOT == 0);
/* The lastIndex property alone is writable but non-configurable. */
- return NativeObject::addDataProperty(cx, self, cx->names().lastIndex, LAST_INDEX_SLOT,
- JSPROP_PERMANENT);
+ return self->addDataProperty(cx, cx->names().lastIndex, LAST_INDEX_SLOT, JSPROP_PERMANENT);
}
void
diff --git a/js/src/vm/Stack.cpp b/js/src/vm/Stack.cpp
index 95940eeaff..7eb8f4ab8b 100644
--- a/js/src/vm/Stack.cpp
+++ b/js/src/vm/Stack.cpp
@@ -82,7 +82,7 @@ InterpreterFrame::isNonGlobalEvalFrame() const
return isEvalFrame() && script()->bodyScope()->as<EvalScope>().isNonGlobal();
}
-ArrayObject*
+JSObject*
InterpreterFrame::createRestParameter(JSContext* cx)
{
MOZ_ASSERT(script()->hasRest());
diff --git a/js/src/vm/Stack.h b/js/src/vm/Stack.h
index fe04a00f26..d085442135 100644
--- a/js/src/vm/Stack.h
+++ b/js/src/vm/Stack.h
@@ -523,7 +523,7 @@ class InterpreterFrame
ArgumentsObject& argsObj() const;
void initArgsObj(ArgumentsObject& argsobj);
- ArrayObject* createRestParameter(JSContext* cx);
+ JSObject* createRestParameter(JSContext* cx);
/*
* Environment chain
diff --git a/js/src/vm/TypeInference-inl.h b/js/src/vm/TypeInference-inl.h
index 2af252cea1..da47fa898b 100644
--- a/js/src/vm/TypeInference-inl.h
+++ b/js/src/vm/TypeInference-inl.h
@@ -23,6 +23,7 @@
#include "vm/SharedArrayObject.h"
#include "vm/StringObject.h"
#include "vm/TypedArrayObject.h"
+#include "vm/UnboxedObject.h"
#include "jscntxtinlines.h"
@@ -284,6 +285,10 @@ TypeIdString(jsid id)
*/
struct AutoEnterAnalysis
{
+ // For use when initializing an UnboxedLayout. The UniquePtr's destructor
+ // must run when GC is not suppressed.
+ UniquePtr<UnboxedLayout> unboxedLayoutToCleanUp;
+
// Prevent GC activity in the middle of analysis.
gc::AutoSuppressGC suppressGC;
diff --git a/js/src/vm/TypeInference.cpp b/js/src/vm/TypeInference.cpp
index 2b1fa0e3bb..438188a367 100644
--- a/js/src/vm/TypeInference.cpp
+++ b/js/src/vm/TypeInference.cpp
@@ -35,6 +35,7 @@
#include "vm/Opcodes.h"
#include "vm/Shape.h"
#include "vm/Time.h"
+#include "vm/UnboxedObject.h"
#include "jsatominlines.h"
#include "jsscriptinlines.h"
@@ -296,6 +297,9 @@ js::ObjectGroupHasProperty(JSContext* cx, ObjectGroup* group, jsid id, const Val
return true;
}
}
+ JSObject* obj = &value.toObject();
+ if (!obj->hasLazyGroup() && obj->group()->maybeOriginalUnboxedGroup())
+ return true;
}
if (!types->hasType(type)) {
@@ -1944,6 +1948,33 @@ class ConstraintDataFreezeObjectForTypedArrayData
}
};
+// Constraint which triggers recompilation if an unboxed object in some group
+// is converted to a native object.
+class ConstraintDataFreezeObjectForUnboxedConvertedToNative
+{
+ public:
+ ConstraintDataFreezeObjectForUnboxedConvertedToNative()
+ {}
+
+ const char* kind() { return "freezeObjectForUnboxedConvertedToNative"; }
+
+ bool invalidateOnNewType(TypeSet::Type type) { return false; }
+ bool invalidateOnNewPropertyState(TypeSet* property) { return false; }
+ bool invalidateOnNewObjectState(ObjectGroup* group) {
+ return group->unboxedLayout().nativeGroup() != nullptr;
+ }
+
+ bool constraintHolds(JSContext* cx,
+ const HeapTypeSetKey& property, TemporaryTypeSet* expected)
+ {
+ return !invalidateOnNewObjectState(property.object()->maybeGroup());
+ }
+
+ bool shouldSweep() { return false; }
+
+ JSCompartment* maybeCompartment() { return nullptr; }
+};
+
} /* anonymous namespace */
void
@@ -1968,6 +1999,17 @@ TypeSet::ObjectKey::watchStateChangeForTypedArrayData(CompilerConstraintList* co
ConstraintDataFreezeObjectForTypedArrayData(tarray)));
}
+void
+TypeSet::ObjectKey::watchStateChangeForUnboxedConvertedToNative(CompilerConstraintList* constraints)
+{
+ HeapTypeSetKey objectProperty = property(JSID_EMPTY);
+ LifoAlloc* alloc = constraints->alloc();
+
+ typedef CompilerConstraintInstance<ConstraintDataFreezeObjectForUnboxedConvertedToNative> T;
+ constraints->add(alloc->new_<T>(alloc, objectProperty,
+ ConstraintDataFreezeObjectForUnboxedConvertedToNative()));
+}
+
static void
ObjectStateChange(ExclusiveContext* cxArg, ObjectGroup* group, bool markingUnknown)
{
@@ -2478,6 +2520,8 @@ TemporaryTypeSet::propertyNeedsBarrier(CompilerConstraintList* constraints, jsid
bool
js::ClassCanHaveExtraProperties(const Class* clasp)
{
+ if (clasp == &UnboxedPlainObject::class_ || clasp == &UnboxedArrayObject::class_)
+ return false;
return clasp->getResolve()
|| clasp->getOpsLookupProperty()
|| clasp->getOpsGetProperty()
@@ -2768,6 +2812,15 @@ js::AddTypePropertyId(ExclusiveContext* cx, ObjectGroup* group, JSObject* obj, j
// from acquiring the fully initialized group.
if (group->newScript() && group->newScript()->initializedGroup())
AddTypePropertyId(cx, group->newScript()->initializedGroup(), nullptr, id, type);
+
+ // Maintain equivalent type information for unboxed object groups and their
+ // corresponding native group. Since type sets might contain the unboxed
+ // group but not the native group, this ensures optimizations based on the
+ // unboxed group are valid for the native group.
+ if (group->maybeUnboxedLayout() && group->maybeUnboxedLayout()->nativeGroup())
+ AddTypePropertyId(cx, group->maybeUnboxedLayout()->nativeGroup(), nullptr, id, type);
+ if (ObjectGroup* unboxedGroup = group->maybeOriginalUnboxedGroup())
+ AddTypePropertyId(cx, unboxedGroup, nullptr, id, type);
}
void
@@ -2839,6 +2892,12 @@ ObjectGroup::setFlags(ExclusiveContext* cx, ObjectGroupFlags flags)
// acquired properties analysis.
if (newScript() && newScript()->initializedGroup())
newScript()->initializedGroup()->setFlags(cx, flags);
+
+ // Propagate flag changes between unboxed and corresponding native groups.
+ if (maybeUnboxedLayout() && maybeUnboxedLayout()->nativeGroup())
+ maybeUnboxedLayout()->nativeGroup()->setFlags(cx, flags);
+ if (ObjectGroup* unboxedGroup = maybeOriginalUnboxedGroup())
+ unboxedGroup->setFlags(cx, flags);
}
void
@@ -2871,6 +2930,23 @@ ObjectGroup::markUnknown(ExclusiveContext* cx)
prop->types.setNonDataProperty(cx);
}
}
+
+ if (ObjectGroup* unboxedGroup = maybeOriginalUnboxedGroup())
+ MarkObjectGroupUnknownProperties(cx, unboxedGroup);
+ if (maybeUnboxedLayout() && maybeUnboxedLayout()->nativeGroup())
+ MarkObjectGroupUnknownProperties(cx, maybeUnboxedLayout()->nativeGroup());
+ if (ObjectGroup* unboxedGroup = maybeOriginalUnboxedGroup())
+ MarkObjectGroupUnknownProperties(cx, unboxedGroup);
+}
+
+TypeNewScript*
+ObjectGroup::anyNewScript()
+{
+ if (newScript())
+ return newScript();
+ if (maybeUnboxedLayout())
+ return unboxedLayout().newScript();
+ return nullptr;
}
void
@@ -2880,7 +2956,7 @@ ObjectGroup::detachNewScript(bool writeBarrier, ObjectGroup* replacement)
// analyzed, remove it from the newObjectGroups table so that it will not be
// produced by calling 'new' on the associated function anymore.
// The TypeNewScript is not actually destroyed.
- TypeNewScript* newScript = this->newScript();
+ TypeNewScript* newScript = anyNewScript();
MOZ_ASSERT(newScript);
if (newScript->analyzed()) {
@@ -2899,7 +2975,10 @@ ObjectGroup::detachNewScript(bool writeBarrier, ObjectGroup* replacement)
MOZ_ASSERT(!replacement);
}
- setAddendum(Addendum_None, nullptr, writeBarrier);
+ if (this->newScript())
+ setAddendum(Addendum_None, nullptr, writeBarrier);
+ else
+ unboxedLayout().setNewScript(nullptr, writeBarrier);
}
void
@@ -2910,7 +2989,7 @@ ObjectGroup::maybeClearNewScriptOnOOM()
if (!isMarked())
return;
- TypeNewScript* newScript = this->newScript();
+ TypeNewScript* newScript = anyNewScript();
if (!newScript)
return;
@@ -2925,7 +3004,7 @@ ObjectGroup::maybeClearNewScriptOnOOM()
void
ObjectGroup::clearNewScript(ExclusiveContext* cx, ObjectGroup* replacement /* = nullptr*/)
{
- TypeNewScript* newScript = this->newScript();
+ TypeNewScript* newScript = anyNewScript();
if (!newScript)
return;
@@ -3332,7 +3411,7 @@ JSFunction::setTypeForScriptedFunction(ExclusiveContext* cx, HandleFunction fun,
/////////////////////////////////////////////////////////////////////
void
-PreliminaryObjectArray::registerNewObject(PlainObject* res)
+PreliminaryObjectArray::registerNewObject(JSObject* res)
{
// The preliminary object pointers are weak, and won't be swept properly
// during nursery collections, so the preliminary objects need to be
@@ -3350,7 +3429,7 @@ PreliminaryObjectArray::registerNewObject(PlainObject* res)
}
void
-PreliminaryObjectArray::unregisterObject(PlainObject* obj)
+PreliminaryObjectArray::unregisterObject(JSObject* obj)
{
for (size_t i = 0; i < COUNT; i++) {
if (objects[i] == obj) {
@@ -3390,6 +3469,22 @@ PreliminaryObjectArray::sweep()
for (size_t i = 0; i < COUNT; i++) {
JSObject** ptr = &objects[i];
if (*ptr && IsAboutToBeFinalizedUnbarriered(ptr)) {
+ // Before we clear this reference, change the object's group to the
+ // Object.prototype group. This is done to ensure JSObject::finalize
+ // sees a NativeObject Class even if we change the current group's
+ // Class to one of the unboxed object classes in the meantime. If
+ // the compartment's global is dead, we don't do anything as the
+ // group's Class is not going to change in that case.
+ JSObject* obj = *ptr;
+ GlobalObject* global = obj->compartment()->unsafeUnbarrieredMaybeGlobal();
+ if (global && !obj->isSingleton()) {
+ JSObject* objectProto = GetBuiltinPrototypePure(global, JSProto_Object);
+ obj->setGroup(objectProto->groupRaw());
+ MOZ_ASSERT(obj->is<NativeObject>());
+ MOZ_ASSERT(obj->getClass() == objectProto->getClass());
+ MOZ_ASSERT(!obj->getClass()->hasFinalize());
+ }
+
*ptr = nullptr;
}
}
@@ -3489,11 +3584,17 @@ PreliminaryObjectArrayWithTemplate::maybeAnalyze(ExclusiveContext* cx, ObjectGro
}
}
- // Since the preliminary objects still reflect the template object's
- // properties, and all objects in the future will be created with those
- // properties, the properties can be marked as definitive for objects in
- // the group.
- group->addDefiniteProperties(cx, shape());
+ TryConvertToUnboxedLayout(cx, enter, shape(), group, preliminaryObjects);
+ if (group->maybeUnboxedLayout())
+ return;
+
+ if (shape()) {
+ // We weren't able to use an unboxed layout, but since the preliminary
+ // objects still reflect the template object's properties, and all
+ // objects in the future will be created with those properties, the
+ // properties can be marked as definite for objects in the group.
+ group->addDefiniteProperties(cx, shape());
+ }
}
/////////////////////////////////////////////////////////////////////
@@ -3507,6 +3608,7 @@ TypeNewScript::make(JSContext* cx, ObjectGroup* group, JSFunction* fun)
{
MOZ_ASSERT(cx->zone()->types.activeAnalysis);
MOZ_ASSERT(!group->newScript());
+ MOZ_ASSERT(!group->maybeUnboxedLayout());
// rollbackPartiallyInitializedObjects expects function_ to be
// canonicalized.
@@ -3811,9 +3913,34 @@ TypeNewScript::maybeAnalyze(JSContext* cx, ObjectGroup* group, bool* regenerate,
PodCopy(initializerList, initializerVector.begin(), initializerVector.length());
}
+ // Try to use an unboxed representation for the group.
+ if (!TryConvertToUnboxedLayout(cx, enter, templateObject()->lastProperty(), group, preliminaryObjects))
+ return false;
+
js_delete(preliminaryObjects);
preliminaryObjects = nullptr;
+ if (group->maybeUnboxedLayout()) {
+ // An unboxed layout was constructed for the group, and this has already
+ // been hooked into it.
+ MOZ_ASSERT(group->unboxedLayout().newScript() == this);
+ destroyNewScript.group = nullptr;
+
+ // Clear out the template object, which is not used for TypeNewScripts
+ // with an unboxed layout. Currently it is a mutant object with a
+ // non-native group and native shape, so make it safe for GC by changing
+ // its group to the default for its prototype.
+ AutoEnterOOMUnsafeRegion oomUnsafe;
+ ObjectGroup* plainGroup = ObjectGroup::defaultNewGroup(cx, &PlainObject::class_,
+ group->proto());
+ if (!plainGroup)
+ oomUnsafe.crash("TypeNewScript::maybeAnalyze");
+ templateObject_->setGroup(plainGroup);
+ templateObject_ = nullptr;
+
+ return true;
+ }
+
if (prefixShape->slotSpan() == templateObject()->slotSpan()) {
// The definite properties analysis found exactly the properties that
// are held in common by the preliminary objects. No further analysis
@@ -3927,6 +4054,12 @@ TypeNewScript::rollbackPartiallyInitializedObjects(JSContext* cx, ObjectGroup* g
continue;
}
+ if (thisv.toObject().is<UnboxedPlainObject>()) {
+ AutoEnterOOMUnsafeRegion oomUnsafe;
+ if (!UnboxedPlainObject::convertToNative(cx, &thisv.toObject()))
+ oomUnsafe.crash("rollbackPartiallyInitializedObjects");
+ }
+
// Found a matching frame.
RootedPlainObject obj(cx, &thisv.toObject().as<PlainObject>());
@@ -4120,6 +4253,12 @@ ConstraintTypeSet::sweep(Zone* zone, AutoClearTypeInferenceStateOnOOM& oom)
// Object sets containing objects with unknown properties might
// not be complete. Mark the type set as unknown, which it will
// be treated as during Ion compilation.
+ //
+ // Note that we don't have to do this when the type set might
+ // be missing the native group corresponding to an unboxed
+ // object group. In this case, the native group points to the
+ // unboxed object group via its addendum, so as long as objects
+ // with either group exist, neither group will be finalized.
flags |= TYPE_FLAG_ANYOBJECT;
clearObjects();
objectCount = 0;
@@ -4203,6 +4342,21 @@ ObjectGroup::sweep(AutoClearTypeInferenceStateOnOOM* oom)
Maybe<AutoClearTypeInferenceStateOnOOM> fallbackOOM;
EnsureHasAutoClearTypeInferenceStateOnOOM(oom, zone(), fallbackOOM);
+ if (maybeUnboxedLayout()) {
+ // Remove unboxed layouts that are about to be finalized from the
+ // compartment wide list while we are still on the main thread.
+ ObjectGroup* group = this;
+ if (IsAboutToBeFinalizedUnbarriered(&group))
+ unboxedLayout().detachFromCompartment();
+
+ if (unboxedLayout().newScript())
+ unboxedLayout().newScript()->sweep();
+
+ // Discard constructor code to avoid holding onto ExecutablePools.
+ if (zone()->isGCCompacting())
+ unboxedLayout().setConstructorCode(nullptr);
+ }
+
if (maybePreliminaryObjects())
maybePreliminaryObjects()->sweep();
diff --git a/js/src/vm/TypeInference.h b/js/src/vm/TypeInference.h
index fd021fc96c..9ec1bf927d 100644
--- a/js/src/vm/TypeInference.h
+++ b/js/src/vm/TypeInference.h
@@ -262,6 +262,7 @@ class TypeSet
bool hasStableClassAndProto(CompilerConstraintList* constraints);
void watchStateChangeForInlinedCall(CompilerConstraintList* constraints);
void watchStateChangeForTypedArrayData(CompilerConstraintList* constraints);
+ void watchStateChangeForUnboxedConvertedToNative(CompilerConstraintList* constraints);
HeapTypeSetKey property(jsid id);
void ensureTrackedProperty(JSContext* cx, jsid id);
@@ -871,8 +872,8 @@ class PreliminaryObjectArray
public:
PreliminaryObjectArray() = default;
- void registerNewObject(PlainObject* res);
- void unregisterObject(PlainObject* obj);
+ void registerNewObject(JSObject* res);
+ void unregisterObject(JSObject* obj);
JSObject* get(size_t i) const {
MOZ_ASSERT(i < COUNT);
diff --git a/js/src/vm/UnboxedObject-inl.h b/js/src/vm/UnboxedObject-inl.h
new file mode 100644
index 0000000000..93ad7bf28a
--- /dev/null
+++ b/js/src/vm/UnboxedObject-inl.h
@@ -0,0 +1,840 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sts=4 et sw=4 tw=99:
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef vm_UnboxedObject_inl_h
+#define vm_UnboxedObject_inl_h
+
+#include "vm/UnboxedObject.h"
+
+#include "gc/StoreBuffer-inl.h"
+#include "vm/ArrayObject-inl.h"
+#include "vm/NativeObject-inl.h"
+
+namespace js {
+
+static inline Value
+GetUnboxedValue(uint8_t* p, JSValueType type, bool maybeUninitialized)
+{
+ switch (type) {
+ case JSVAL_TYPE_BOOLEAN:
+ return BooleanValue(*p != 0);
+
+ case JSVAL_TYPE_INT32:
+ return Int32Value(*reinterpret_cast<int32_t*>(p));
+
+ case JSVAL_TYPE_DOUBLE: {
+ // During unboxed plain object creation, non-GC thing properties are
+ // left uninitialized. This is normally fine, since the properties will
+ // be filled in shortly, but if they are read before that happens we
+ // need to make sure that doubles are canonical.
+ double d = *reinterpret_cast<double*>(p);
+ if (maybeUninitialized)
+ return DoubleValue(JS::CanonicalizeNaN(d));
+ return DoubleValue(d);
+ }
+
+ case JSVAL_TYPE_STRING:
+ return StringValue(*reinterpret_cast<JSString**>(p));
+
+ case JSVAL_TYPE_OBJECT:
+ return ObjectOrNullValue(*reinterpret_cast<JSObject**>(p));
+
+ default:
+ MOZ_CRASH("Invalid type for unboxed value");
+ }
+}
+
+static inline void
+SetUnboxedValueNoTypeChange(JSObject* unboxedObject,
+ uint8_t* p, JSValueType type, const Value& v,
+ bool preBarrier)
+{
+ switch (type) {
+ case JSVAL_TYPE_BOOLEAN:
+ *p = v.toBoolean();
+ return;
+
+ case JSVAL_TYPE_INT32:
+ *reinterpret_cast<int32_t*>(p) = v.toInt32();
+ return;
+
+ case JSVAL_TYPE_DOUBLE:
+ *reinterpret_cast<double*>(p) = v.toNumber();
+ return;
+
+ case JSVAL_TYPE_STRING: {
+ MOZ_ASSERT(!IsInsideNursery(v.toString()));
+ JSString** np = reinterpret_cast<JSString**>(p);
+ if (preBarrier)
+ JSString::writeBarrierPre(*np);
+ *np = v.toString();
+ return;
+ }
+
+ case JSVAL_TYPE_OBJECT: {
+ JSObject** np = reinterpret_cast<JSObject**>(p);
+
+ // Manually trigger post barriers on the whole object. If we treat
+ // the pointer as a HeapPtrObject we will get confused later if the
+ // object is converted to its native representation.
+ JSObject* obj = v.toObjectOrNull();
+ if (IsInsideNursery(obj) && !IsInsideNursery(unboxedObject)) {
+ JSRuntime* rt = unboxedObject->runtimeFromMainThread();
+ rt->gc.storeBuffer.putWholeCell(unboxedObject);
+ }
+
+ if (preBarrier)
+ JSObject::writeBarrierPre(*np);
+ *np = obj;
+ return;
+ }
+
+ default:
+ MOZ_CRASH("Invalid type for unboxed value");
+ }
+}
+
+static inline bool
+SetUnboxedValue(ExclusiveContext* cx, JSObject* unboxedObject, jsid id,
+ uint8_t* p, JSValueType type, const Value& v, bool preBarrier)
+{
+ switch (type) {
+ case JSVAL_TYPE_BOOLEAN:
+ if (v.isBoolean()) {
+ *p = v.toBoolean();
+ return true;
+ }
+ return false;
+
+ case JSVAL_TYPE_INT32:
+ if (v.isInt32()) {
+ *reinterpret_cast<int32_t*>(p) = v.toInt32();
+ return true;
+ }
+ return false;
+
+ case JSVAL_TYPE_DOUBLE:
+ if (v.isNumber()) {
+ *reinterpret_cast<double*>(p) = v.toNumber();
+ return true;
+ }
+ return false;
+
+ case JSVAL_TYPE_STRING:
+ if (v.isString()) {
+ MOZ_ASSERT(!IsInsideNursery(v.toString()));
+ JSString** np = reinterpret_cast<JSString**>(p);
+ if (preBarrier)
+ JSString::writeBarrierPre(*np);
+ *np = v.toString();
+ return true;
+ }
+ return false;
+
+ case JSVAL_TYPE_OBJECT:
+ if (v.isObjectOrNull()) {
+ JSObject** np = reinterpret_cast<JSObject**>(p);
+
+ // Update property types when writing object properties. Types for
+ // other properties were captured when the unboxed layout was
+ // created.
+ AddTypePropertyId(cx, unboxedObject, id, v);
+
+ // As above, trigger post barriers on the whole object.
+ JSObject* obj = v.toObjectOrNull();
+ if (IsInsideNursery(v.toObjectOrNull()) && !IsInsideNursery(unboxedObject)) {
+ JSRuntime* rt = unboxedObject->runtimeFromMainThread();
+ rt->gc.storeBuffer.putWholeCell(unboxedObject);
+ }
+
+ if (preBarrier)
+ JSObject::writeBarrierPre(*np);
+ *np = obj;
+ return true;
+ }
+ return false;
+
+ default:
+ MOZ_CRASH("Invalid type for unboxed value");
+ }
+}
+
+/////////////////////////////////////////////////////////////////////
+// UnboxedPlainObject
+/////////////////////////////////////////////////////////////////////
+
+inline const UnboxedLayout&
+UnboxedPlainObject::layout() const
+{
+ return group()->unboxedLayout();
+}
+
+/////////////////////////////////////////////////////////////////////
+// UnboxedArrayObject
+/////////////////////////////////////////////////////////////////////
+
+inline const UnboxedLayout&
+UnboxedArrayObject::layout() const
+{
+ return group()->unboxedLayout();
+}
+
+inline void
+UnboxedArrayObject::setLength(ExclusiveContext* cx, uint32_t length)
+{
+ if (length > INT32_MAX) {
+ // Track objects with overflowing lengths in type information.
+ MarkObjectGroupFlags(cx, this, OBJECT_FLAG_LENGTH_OVERFLOW);
+ }
+
+ length_ = length;
+}
+
+inline void
+UnboxedArrayObject::setInitializedLength(uint32_t initlen)
+{
+ if (initlen < initializedLength()) {
+ switch (elementType()) {
+ case JSVAL_TYPE_STRING:
+ for (size_t i = initlen; i < initializedLength(); i++)
+ triggerPreBarrier<JSVAL_TYPE_STRING>(i);
+ break;
+ case JSVAL_TYPE_OBJECT:
+ for (size_t i = initlen; i < initializedLength(); i++)
+ triggerPreBarrier<JSVAL_TYPE_OBJECT>(i);
+ break;
+ default:
+ MOZ_ASSERT(!UnboxedTypeNeedsPreBarrier(elementType()));
+ }
+ }
+ setInitializedLengthNoBarrier(initlen);
+}
+
+template <JSValueType Type>
+inline bool
+UnboxedArrayObject::setElementSpecific(ExclusiveContext* cx, size_t index, const Value& v)
+{
+ MOZ_ASSERT(index < initializedLength());
+ MOZ_ASSERT(Type == elementType());
+ uint8_t* p = elements() + index * UnboxedTypeSize(Type);
+ return SetUnboxedValue(cx, this, JSID_VOID, p, elementType(), v, /* preBarrier = */ true);
+}
+
+template <JSValueType Type>
+inline void
+UnboxedArrayObject::setElementNoTypeChangeSpecific(size_t index, const Value& v)
+{
+ MOZ_ASSERT(index < initializedLength());
+ MOZ_ASSERT(Type == elementType());
+ uint8_t* p = elements() + index * UnboxedTypeSize(Type);
+ return SetUnboxedValueNoTypeChange(this, p, elementType(), v, /* preBarrier = */ true);
+}
+
+template <JSValueType Type>
+inline bool
+UnboxedArrayObject::initElementSpecific(ExclusiveContext* cx, size_t index, const Value& v)
+{
+ MOZ_ASSERT(index < initializedLength());
+ MOZ_ASSERT(Type == elementType());
+ uint8_t* p = elements() + index * UnboxedTypeSize(Type);
+ return SetUnboxedValue(cx, this, JSID_VOID, p, elementType(), v, /* preBarrier = */ false);
+}
+
+template <JSValueType Type>
+inline void
+UnboxedArrayObject::initElementNoTypeChangeSpecific(size_t index, const Value& v)
+{
+ MOZ_ASSERT(index < initializedLength());
+ MOZ_ASSERT(Type == elementType());
+ uint8_t* p = elements() + index * UnboxedTypeSize(Type);
+ return SetUnboxedValueNoTypeChange(this, p, elementType(), v, /* preBarrier = */ false);
+}
+
+template <JSValueType Type>
+inline Value
+UnboxedArrayObject::getElementSpecific(size_t index)
+{
+ MOZ_ASSERT(index < initializedLength());
+ MOZ_ASSERT(Type == elementType());
+ uint8_t* p = elements() + index * UnboxedTypeSize(Type);
+ return GetUnboxedValue(p, Type, /* maybeUninitialized = */ false);
+}
+
+template <JSValueType Type>
+inline void
+UnboxedArrayObject::triggerPreBarrier(size_t index)
+{
+ MOZ_ASSERT(UnboxedTypeNeedsPreBarrier(Type));
+
+ uint8_t* p = elements() + index * UnboxedTypeSize(Type);
+
+ switch (Type) {
+ case JSVAL_TYPE_STRING: {
+ JSString** np = reinterpret_cast<JSString**>(p);
+ JSString::writeBarrierPre(*np);
+ break;
+ }
+
+ case JSVAL_TYPE_OBJECT: {
+ JSObject** np = reinterpret_cast<JSObject**>(p);
+ JSObject::writeBarrierPre(*np);
+ break;
+ }
+
+ default:
+ MOZ_CRASH("Bad type");
+ }
+}
+
+/////////////////////////////////////////////////////////////////////
+// Combined methods for NativeObject and UnboxedArrayObject accesses.
+/////////////////////////////////////////////////////////////////////
+
+static inline bool
+HasAnyBoxedOrUnboxedDenseElements(JSObject* obj)
+{
+ return obj->isNative() || obj->is<UnboxedArrayObject>();
+}
+
+static inline size_t
+GetAnyBoxedOrUnboxedInitializedLength(JSObject* obj)
+{
+ if (obj->isNative())
+ return obj->as<NativeObject>().getDenseInitializedLength();
+ if (obj->is<UnboxedArrayObject>())
+ return obj->as<UnboxedArrayObject>().initializedLength();
+ return 0;
+}
+
+static inline size_t
+GetAnyBoxedOrUnboxedCapacity(JSObject* obj)
+{
+ if (obj->isNative())
+ return obj->as<NativeObject>().getDenseCapacity();
+ if (obj->is<UnboxedArrayObject>())
+ return obj->as<UnboxedArrayObject>().capacity();
+ return 0;
+}
+
+static inline Value
+GetAnyBoxedOrUnboxedDenseElement(JSObject* obj, size_t index)
+{
+ if (obj->isNative())
+ return obj->as<NativeObject>().getDenseElement(index);
+ return obj->as<UnboxedArrayObject>().getElement(index);
+}
+
+static inline size_t
+GetAnyBoxedOrUnboxedArrayLength(JSObject* obj)
+{
+ if (obj->is<ArrayObject>())
+ return obj->as<ArrayObject>().length();
+ return obj->as<UnboxedArrayObject>().length();
+}
+
+static inline void
+SetAnyBoxedOrUnboxedArrayLength(JSContext* cx, JSObject* obj, size_t length)
+{
+ if (obj->is<ArrayObject>()) {
+ MOZ_ASSERT(length >= obj->as<ArrayObject>().length());
+ obj->as<ArrayObject>().setLength(cx, length);
+ } else {
+ MOZ_ASSERT(length >= obj->as<UnboxedArrayObject>().length());
+ obj->as<UnboxedArrayObject>().setLength(cx, length);
+ }
+}
+
+static inline bool
+SetAnyBoxedOrUnboxedDenseElement(JSContext* cx, JSObject* obj, size_t index, const Value& value)
+{
+ if (obj->isNative()) {
+ obj->as<NativeObject>().setDenseElementWithType(cx, index, value);
+ return true;
+ }
+ return obj->as<UnboxedArrayObject>().setElement(cx, index, value);
+}
+
+static inline bool
+InitAnyBoxedOrUnboxedDenseElement(JSContext* cx, JSObject* obj, size_t index, const Value& value)
+{
+ if (obj->isNative()) {
+ obj->as<NativeObject>().initDenseElementWithType(cx, index, value);
+ return true;
+ }
+ return obj->as<UnboxedArrayObject>().initElement(cx, index, value);
+}
+
+/////////////////////////////////////////////////////////////////////
+// Template methods for NativeObject and UnboxedArrayObject accesses.
+/////////////////////////////////////////////////////////////////////
+
+static inline JSValueType
+GetBoxedOrUnboxedType(JSObject* obj)
+{
+ if (obj->isNative())
+ return JSVAL_TYPE_MAGIC;
+ return obj->as<UnboxedArrayObject>().elementType();
+}
+
+template <JSValueType Type>
+static inline bool
+HasBoxedOrUnboxedDenseElements(JSObject* obj)
+{
+ if (Type == JSVAL_TYPE_MAGIC)
+ return obj->isNative();
+ return obj->is<UnboxedArrayObject>() && obj->as<UnboxedArrayObject>().elementType() == Type;
+}
+
+template <JSValueType Type>
+static inline size_t
+GetBoxedOrUnboxedInitializedLength(JSObject* obj)
+{
+ if (Type == JSVAL_TYPE_MAGIC)
+ return obj->as<NativeObject>().getDenseInitializedLength();
+ return obj->as<UnboxedArrayObject>().initializedLength();
+}
+
+template <JSValueType Type>
+static inline DenseElementResult
+SetBoxedOrUnboxedInitializedLength(JSContext* cx, JSObject* obj, size_t initlen)
+{
+ size_t oldInitlen = GetBoxedOrUnboxedInitializedLength<Type>(obj);
+ if (Type == JSVAL_TYPE_MAGIC) {
+ obj->as<NativeObject>().setDenseInitializedLength(initlen);
+ if (initlen < oldInitlen)
+ obj->as<NativeObject>().shrinkElements(cx, initlen);
+ } else {
+ obj->as<UnboxedArrayObject>().setInitializedLength(initlen);
+ if (initlen < oldInitlen)
+ obj->as<UnboxedArrayObject>().shrinkElements(cx, initlen);
+ }
+ return DenseElementResult::Success;
+}
+
+template <JSValueType Type>
+static inline size_t
+GetBoxedOrUnboxedCapacity(JSObject* obj)
+{
+ if (Type == JSVAL_TYPE_MAGIC)
+ return obj->as<NativeObject>().getDenseCapacity();
+ return obj->as<UnboxedArrayObject>().capacity();
+}
+
+template <JSValueType Type>
+static inline Value
+GetBoxedOrUnboxedDenseElement(JSObject* obj, size_t index)
+{
+ if (Type == JSVAL_TYPE_MAGIC)
+ return obj->as<NativeObject>().getDenseElement(index);
+ return obj->as<UnboxedArrayObject>().getElementSpecific<Type>(index);
+}
+
+template <JSValueType Type>
+static inline void
+SetBoxedOrUnboxedDenseElementNoTypeChange(JSObject* obj, size_t index, const Value& value)
+{
+ if (Type == JSVAL_TYPE_MAGIC)
+ obj->as<NativeObject>().setDenseElement(index, value);
+ else
+ obj->as<UnboxedArrayObject>().setElementNoTypeChangeSpecific<Type>(index, value);
+}
+
+template <JSValueType Type>
+static inline bool
+SetBoxedOrUnboxedDenseElement(JSContext* cx, JSObject* obj, size_t index, const Value& value)
+{
+ if (Type == JSVAL_TYPE_MAGIC) {
+ obj->as<NativeObject>().setDenseElementWithType(cx, index, value);
+ return true;
+ }
+ return obj->as<UnboxedArrayObject>().setElementSpecific<Type>(cx, index, value);
+}
+
+template <JSValueType Type>
+static inline DenseElementResult
+EnsureBoxedOrUnboxedDenseElements(JSContext* cx, JSObject* obj, size_t count)
+{
+ if (Type == JSVAL_TYPE_MAGIC) {
+ if (!obj->as<ArrayObject>().ensureElements(cx, count))
+ return DenseElementResult::Failure;
+ } else {
+ if (obj->as<UnboxedArrayObject>().capacity() < count) {
+ if (!obj->as<UnboxedArrayObject>().growElements(cx, count))
+ return DenseElementResult::Failure;
+ }
+ }
+ return DenseElementResult::Success;
+}
+
+template <JSValueType Type>
+static inline DenseElementResult
+SetOrExtendBoxedOrUnboxedDenseElements(ExclusiveContext* cx, JSObject* obj,
+ uint32_t start, const Value* vp, uint32_t count,
+ ShouldUpdateTypes updateTypes = ShouldUpdateTypes::Update)
+{
+ if (Type == JSVAL_TYPE_MAGIC) {
+ NativeObject* nobj = &obj->as<NativeObject>();
+
+ if (nobj->denseElementsAreFrozen())
+ return DenseElementResult::Incomplete;
+
+ if (obj->is<ArrayObject>() &&
+ !obj->as<ArrayObject>().lengthIsWritable() &&
+ start + count >= obj->as<ArrayObject>().length())
+ {
+ return DenseElementResult::Incomplete;
+ }
+
+ DenseElementResult result = nobj->ensureDenseElements(cx, start, count);
+ if (result != DenseElementResult::Success)
+ return result;
+
+ if (obj->is<ArrayObject>() && start + count >= obj->as<ArrayObject>().length())
+ obj->as<ArrayObject>().setLengthInt32(start + count);
+
+ if (updateTypes == ShouldUpdateTypes::DontUpdate && !nobj->shouldConvertDoubleElements()) {
+ nobj->copyDenseElements(start, vp, count);
+ } else {
+ for (size_t i = 0; i < count; i++)
+ nobj->setDenseElementWithType(cx, start + i, vp[i]);
+ }
+
+ return DenseElementResult::Success;
+ }
+
+ UnboxedArrayObject* nobj = &obj->as<UnboxedArrayObject>();
+
+ if (start > nobj->initializedLength())
+ return DenseElementResult::Incomplete;
+
+ if (start + count >= UnboxedArrayObject::MaximumCapacity)
+ return DenseElementResult::Incomplete;
+
+ if (start + count > nobj->capacity() && !nobj->growElements(cx, start + count))
+ return DenseElementResult::Failure;
+
+ size_t oldInitlen = nobj->initializedLength();
+
+ // Overwrite any existing elements covered by the new range. If we fail
+ // after this point due to some incompatible type being written to the
+ // object's elements, afterwards the contents will be different from when
+ // we started. The caller must retry the operation using a generic path,
+ // which will overwrite the already-modified elements as well as the ones
+ // that were left alone.
+ size_t i = 0;
+ if (updateTypes == ShouldUpdateTypes::DontUpdate) {
+ for (size_t j = start; i < count && j < oldInitlen; i++, j++)
+ nobj->setElementNoTypeChangeSpecific<Type>(j, vp[i]);
+ } else {
+ for (size_t j = start; i < count && j < oldInitlen; i++, j++) {
+ if (!nobj->setElementSpecific<Type>(cx, j, vp[i]))
+ return DenseElementResult::Incomplete;
+ }
+ }
+
+ if (i != count) {
+ obj->as<UnboxedArrayObject>().setInitializedLength(start + count);
+ if (updateTypes == ShouldUpdateTypes::DontUpdate) {
+ for (; i < count; i++)
+ nobj->initElementNoTypeChangeSpecific<Type>(start + i, vp[i]);
+ } else {
+ for (; i < count; i++) {
+ if (!nobj->initElementSpecific<Type>(cx, start + i, vp[i])) {
+ nobj->setInitializedLengthNoBarrier(oldInitlen);
+ return DenseElementResult::Incomplete;
+ }
+ }
+ }
+ }
+
+ if (start + count >= nobj->length())
+ nobj->setLength(cx, start + count);
+
+ return DenseElementResult::Success;
+}
+
+template <JSValueType Type>
+static inline DenseElementResult
+MoveBoxedOrUnboxedDenseElements(JSContext* cx, JSObject* obj, uint32_t dstStart, uint32_t srcStart,
+ uint32_t length)
+{
+ MOZ_ASSERT(HasBoxedOrUnboxedDenseElements<Type>(obj));
+
+ if (Type == JSVAL_TYPE_MAGIC) {
+ if (obj->as<NativeObject>().denseElementsAreFrozen())
+ return DenseElementResult::Incomplete;
+
+ if (!obj->as<NativeObject>().maybeCopyElementsForWrite(cx))
+ return DenseElementResult::Failure;
+ obj->as<NativeObject>().moveDenseElements(dstStart, srcStart, length);
+ } else {
+ uint8_t* data = obj->as<UnboxedArrayObject>().elements();
+ size_t elementSize = UnboxedTypeSize(Type);
+
+ if (UnboxedTypeNeedsPreBarrier(Type) &&
+ JS::shadow::Zone::asShadowZone(obj->zone())->needsIncrementalBarrier())
+ {
+ // Trigger pre barriers on any elements we are overwriting. See
+ // NativeObject::moveDenseElements. No post barrier is needed as
+ // only whole cell post barriers are used with unboxed objects.
+ for (size_t i = 0; i < length; i++)
+ obj->as<UnboxedArrayObject>().triggerPreBarrier<Type>(dstStart + i);
+ }
+
+ memmove(data + dstStart * elementSize,
+ data + srcStart * elementSize,
+ length * elementSize);
+ }
+
+ return DenseElementResult::Success;
+}
+
+template <JSValueType DstType, JSValueType SrcType>
+static inline DenseElementResult
+CopyBoxedOrUnboxedDenseElements(JSContext* cx, JSObject* dst, JSObject* src,
+ uint32_t dstStart, uint32_t srcStart, uint32_t length)
+{
+ MOZ_ASSERT(HasBoxedOrUnboxedDenseElements<SrcType>(src));
+ MOZ_ASSERT(HasBoxedOrUnboxedDenseElements<DstType>(dst));
+ MOZ_ASSERT(GetBoxedOrUnboxedInitializedLength<DstType>(dst) == dstStart);
+ MOZ_ASSERT(GetBoxedOrUnboxedInitializedLength<SrcType>(src) >= srcStart + length);
+ MOZ_ASSERT(GetBoxedOrUnboxedCapacity<DstType>(dst) >= dstStart + length);
+
+ SetBoxedOrUnboxedInitializedLength<DstType>(cx, dst, dstStart + length);
+
+ if (DstType == JSVAL_TYPE_MAGIC) {
+ if (SrcType == JSVAL_TYPE_MAGIC) {
+ const Value* vp = src->as<NativeObject>().getDenseElements() + srcStart;
+ dst->as<NativeObject>().initDenseElements(dstStart, vp, length);
+ } else {
+ for (size_t i = 0; i < length; i++) {
+ Value v = GetBoxedOrUnboxedDenseElement<SrcType>(src, srcStart + i);
+ dst->as<NativeObject>().initDenseElement(dstStart + i, v);
+ }
+ }
+ } else if (DstType == SrcType) {
+ uint8_t* dstData = dst->as<UnboxedArrayObject>().elements();
+ uint8_t* srcData = src->as<UnboxedArrayObject>().elements();
+ size_t elementSize = UnboxedTypeSize(DstType);
+
+ memcpy(dstData + dstStart * elementSize,
+ srcData + srcStart * elementSize,
+ length * elementSize);
+
+ // Add a store buffer entry if we might have copied a nursery pointer to dst.
+ if (UnboxedTypeNeedsPostBarrier(DstType) && !IsInsideNursery(dst))
+ dst->runtimeFromMainThread()->gc.storeBuffer.putWholeCell(dst);
+ } else if (DstType == JSVAL_TYPE_DOUBLE && SrcType == JSVAL_TYPE_INT32) {
+ uint8_t* dstData = dst->as<UnboxedArrayObject>().elements();
+ uint8_t* srcData = src->as<UnboxedArrayObject>().elements();
+
+ for (size_t i = 0; i < length; i++) {
+ int32_t v = *reinterpret_cast<int32_t*>(srcData + (srcStart + i) * sizeof(int32_t));
+ *reinterpret_cast<double*>(dstData + (dstStart + i) * sizeof(double)) = v;
+ }
+ } else {
+ for (size_t i = 0; i < length; i++) {
+ Value v = GetBoxedOrUnboxedDenseElement<SrcType>(src, srcStart + i);
+ dst->as<UnboxedArrayObject>().initElementNoTypeChangeSpecific<DstType>(dstStart + i, v);
+ }
+ }
+
+ return DenseElementResult::Success;
+}
+
+/////////////////////////////////////////////////////////////////////
+// Dispatch to specialized methods based on the type of an object.
+/////////////////////////////////////////////////////////////////////
+
+// Goop to fix MSVC. See DispatchTraceKindTyped in TraceKind.h.
+// The clang-cl front end defines _MSC_VER, but still requires the explicit
+// template declaration, so we must test for __clang__ here as well.
+#if defined(_MSC_VER) && !defined(__clang__)
+# define DEPENDENT_TEMPLATE_HINT
+#else
+# define DEPENDENT_TEMPLATE_HINT template
+#endif
+
+// Function to dispatch a method specialized to whatever boxed or unboxed dense
+// elements which an input object has.
+template <typename F>
+DenseElementResult
+CallBoxedOrUnboxedSpecialization(F f, JSObject* obj)
+{
+ if (!HasAnyBoxedOrUnboxedDenseElements(obj))
+ return DenseElementResult::Incomplete;
+ switch (GetBoxedOrUnboxedType(obj)) {
+ case JSVAL_TYPE_MAGIC:
+ return f. DEPENDENT_TEMPLATE_HINT operator()<JSVAL_TYPE_MAGIC>();
+ case JSVAL_TYPE_BOOLEAN:
+ return f. DEPENDENT_TEMPLATE_HINT operator()<JSVAL_TYPE_BOOLEAN>();
+ case JSVAL_TYPE_INT32:
+ return f. DEPENDENT_TEMPLATE_HINT operator()<JSVAL_TYPE_INT32>();
+ case JSVAL_TYPE_DOUBLE:
+ return f. DEPENDENT_TEMPLATE_HINT operator()<JSVAL_TYPE_DOUBLE>();
+ case JSVAL_TYPE_STRING:
+ return f. DEPENDENT_TEMPLATE_HINT operator()<JSVAL_TYPE_STRING>();
+ case JSVAL_TYPE_OBJECT:
+ return f. DEPENDENT_TEMPLATE_HINT operator()<JSVAL_TYPE_OBJECT>();
+ default:
+ MOZ_CRASH();
+ }
+}
+
+// As above, except the specialization can reflect the unboxed type of two objects.
+template <typename F>
+DenseElementResult
+CallBoxedOrUnboxedSpecialization(F f, JSObject* obj1, JSObject* obj2)
+{
+ if (!HasAnyBoxedOrUnboxedDenseElements(obj1) || !HasAnyBoxedOrUnboxedDenseElements(obj2))
+ return DenseElementResult::Incomplete;
+
+#define SPECIALIZE_OBJ2(TYPE) \
+ switch (GetBoxedOrUnboxedType(obj2)) { \
+ case JSVAL_TYPE_MAGIC: \
+ return f. DEPENDENT_TEMPLATE_HINT operator()<TYPE, JSVAL_TYPE_MAGIC>(); \
+ case JSVAL_TYPE_BOOLEAN: \
+ return f. DEPENDENT_TEMPLATE_HINT operator()<TYPE, JSVAL_TYPE_BOOLEAN>(); \
+ case JSVAL_TYPE_INT32: \
+ return f. DEPENDENT_TEMPLATE_HINT operator()<TYPE, JSVAL_TYPE_INT32>(); \
+ case JSVAL_TYPE_DOUBLE: \
+ return f. DEPENDENT_TEMPLATE_HINT operator()<TYPE, JSVAL_TYPE_DOUBLE>(); \
+ case JSVAL_TYPE_STRING: \
+ return f. DEPENDENT_TEMPLATE_HINT operator()<TYPE, JSVAL_TYPE_STRING>(); \
+ case JSVAL_TYPE_OBJECT: \
+ return f. DEPENDENT_TEMPLATE_HINT operator()<TYPE, JSVAL_TYPE_OBJECT>(); \
+ default: \
+ MOZ_CRASH(); \
+ }
+
+ switch (GetBoxedOrUnboxedType(obj1)) {
+ case JSVAL_TYPE_MAGIC:
+ SPECIALIZE_OBJ2(JSVAL_TYPE_MAGIC)
+ case JSVAL_TYPE_BOOLEAN:
+ SPECIALIZE_OBJ2(JSVAL_TYPE_BOOLEAN)
+ case JSVAL_TYPE_INT32:
+ SPECIALIZE_OBJ2(JSVAL_TYPE_INT32)
+ case JSVAL_TYPE_DOUBLE:
+ SPECIALIZE_OBJ2(JSVAL_TYPE_DOUBLE)
+ case JSVAL_TYPE_STRING:
+ SPECIALIZE_OBJ2(JSVAL_TYPE_STRING)
+ case JSVAL_TYPE_OBJECT:
+ SPECIALIZE_OBJ2(JSVAL_TYPE_OBJECT)
+ default:
+ MOZ_CRASH();
+ }
+
+#undef SPECIALIZE_OBJ2
+}
+
+#undef DEPENDENT_TEMPLATE_HINT
+
+#define DefineBoxedOrUnboxedFunctor1(Signature, A) \
+struct Signature ## Functor { \
+ A a; \
+ explicit Signature ## Functor(A a) \
+ : a(a) \
+ {} \
+ template <JSValueType Type> \
+ DenseElementResult operator()() { \
+ return Signature<Type>(a); \
+ } \
+}
+
+#define DefineBoxedOrUnboxedFunctor3(Signature, A, B, C) \
+struct Signature ## Functor { \
+ A a; B b; C c; \
+ Signature ## Functor(A a, B b, C c) \
+ : a(a), b(b), c(c) \
+ {} \
+ template <JSValueType Type> \
+ DenseElementResult operator()() { \
+ return Signature<Type>(a, b, c); \
+ } \
+}
+
+#define DefineBoxedOrUnboxedFunctor4(Signature, A, B, C, D) \
+struct Signature ## Functor { \
+ A a; B b; C c; D d; \
+ Signature ## Functor(A a, B b, C c, D d) \
+ : a(a), b(b), c(c), d(d) \
+ {} \
+ template <JSValueType Type> \
+ DenseElementResult operator()() { \
+ return Signature<Type>(a, b, c, d); \
+ } \
+}
+
+#define DefineBoxedOrUnboxedFunctorPair4(Signature, A, B, C, D) \
+struct Signature ## Functor { \
+ A a; B b; C c; D d; \
+ Signature ## Functor(A a, B b, C c, D d) \
+ : a(a), b(b), c(c), d(d) \
+ {} \
+ template <JSValueType TypeOne, JSValueType TypeTwo> \
+ DenseElementResult operator()() { \
+ return Signature<TypeOne, TypeTwo>(a, b, c, d); \
+ } \
+}
+
+#define DefineBoxedOrUnboxedFunctor5(Signature, A, B, C, D, E) \
+struct Signature ## Functor { \
+ A a; B b; C c; D d; E e; \
+ Signature ## Functor(A a, B b, C c, D d, E e) \
+ : a(a), b(b), c(c), d(d), e(e) \
+ {} \
+ template <JSValueType Type> \
+ DenseElementResult operator()() { \
+ return Signature<Type>(a, b, c, d, e); \
+ } \
+}
+
+#define DefineBoxedOrUnboxedFunctor6(Signature, A, B, C, D, E, F) \
+struct Signature ## Functor { \
+ A a; B b; C c; D d; E e; F f; \
+ Signature ## Functor(A a, B b, C c, D d, E e, F f) \
+ : a(a), b(b), c(c), d(d), e(e), f(f) \
+ {} \
+ template <JSValueType Type> \
+ DenseElementResult operator()() { \
+ return Signature<Type>(a, b, c, d, e, f); \
+ } \
+}
+
+#define DefineBoxedOrUnboxedFunctorPair6(Signature, A, B, C, D, E, F) \
+struct Signature ## Functor { \
+ A a; B b; C c; D d; E e; F f; \
+ Signature ## Functor(A a, B b, C c, D d, E e, F f) \
+ : a(a), b(b), c(c), d(d), e(e), f(f) \
+ {} \
+ template <JSValueType TypeOne, JSValueType TypeTwo> \
+ DenseElementResult operator()() { \
+ return Signature<TypeOne, TypeTwo>(a, b, c, d, e, f); \
+ } \
+}
+
+DenseElementResult
+SetOrExtendAnyBoxedOrUnboxedDenseElements(ExclusiveContext* cx, JSObject* obj,
+ uint32_t start, const Value* vp, uint32_t count,
+ ShouldUpdateTypes updateTypes = ShouldUpdateTypes::Update);
+
+DenseElementResult
+MoveAnyBoxedOrUnboxedDenseElements(JSContext* cx, JSObject* obj,
+ uint32_t dstStart, uint32_t srcStart, uint32_t length);
+
+DenseElementResult
+CopyAnyBoxedOrUnboxedDenseElements(JSContext* cx, JSObject* dst, JSObject* src,
+ uint32_t dstStart, uint32_t srcStart, uint32_t length);
+
+void
+SetAnyBoxedOrUnboxedInitializedLength(JSContext* cx, JSObject* obj, size_t initlen);
+
+DenseElementResult
+EnsureAnyBoxedOrUnboxedDenseElements(JSContext* cx, JSObject* obj, size_t count);
+
+} // namespace js
+
+#endif // vm_UnboxedObject_inl_h
diff --git a/js/src/vm/UnboxedObject.cpp b/js/src/vm/UnboxedObject.cpp
new file mode 100644
index 0000000000..d8c9c774ac
--- /dev/null
+++ b/js/src/vm/UnboxedObject.cpp
@@ -0,0 +1,2132 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sts=4 et sw=4 tw=99:
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "vm/UnboxedObject-inl.h"
+
+#include "jit/BaselineIC.h"
+#include "jit/ExecutableAllocator.h"
+#include "jit/JitCommon.h"
+#include "jit/Linker.h"
+
+#include "jsobjinlines.h"
+
+#include "gc/Nursery-inl.h"
+#include "jit/MacroAssembler-inl.h"
+#include "vm/Shape-inl.h"
+
+using mozilla::ArrayLength;
+using mozilla::DebugOnly;
+using mozilla::PodCopy;
+
+using namespace js;
+
+/////////////////////////////////////////////////////////////////////
+// UnboxedLayout
+/////////////////////////////////////////////////////////////////////
+
+void
+UnboxedLayout::trace(JSTracer* trc)
+{
+ for (size_t i = 0; i < properties_.length(); i++)
+ TraceManuallyBarrieredEdge(trc, &properties_[i].name, "unboxed_layout_name");
+
+ if (newScript())
+ newScript()->trace(trc);
+
+ TraceNullableEdge(trc, &nativeGroup_, "unboxed_layout_nativeGroup");
+ TraceNullableEdge(trc, &nativeShape_, "unboxed_layout_nativeShape");
+ TraceNullableEdge(trc, &allocationScript_, "unboxed_layout_allocationScript");
+ TraceNullableEdge(trc, &replacementGroup_, "unboxed_layout_replacementGroup");
+ TraceNullableEdge(trc, &constructorCode_, "unboxed_layout_constructorCode");
+}
+
+size_t
+UnboxedLayout::sizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf)
+{
+ return mallocSizeOf(this)
+ + properties_.sizeOfExcludingThis(mallocSizeOf)
+ + (newScript() ? newScript()->sizeOfIncludingThis(mallocSizeOf) : 0)
+ + mallocSizeOf(traceList());
+}
+
+void
+UnboxedLayout::setNewScript(TypeNewScript* newScript, bool writeBarrier /* = true */)
+{
+ if (newScript_ && writeBarrier)
+ TypeNewScript::writeBarrierPre(newScript_);
+ newScript_ = newScript;
+}
+
+// Constructor code returns a 0x1 value to indicate the constructor code should
+// be cleared.
+static const uintptr_t CLEAR_CONSTRUCTOR_CODE_TOKEN = 0x1;
+
+/* static */ bool
+UnboxedLayout::makeConstructorCode(JSContext* cx, HandleObjectGroup group)
+{
+ gc::AutoSuppressGC suppress(cx);
+
+ using namespace jit;
+
+ if (!cx->compartment()->ensureJitCompartmentExists(cx))
+ return false;
+
+ UnboxedLayout& layout = group->unboxedLayout();
+ MOZ_ASSERT(!layout.constructorCode());
+
+ UnboxedPlainObject* templateObject = UnboxedPlainObject::create(cx, group, TenuredObject);
+ if (!templateObject)
+ return false;
+
+ JitContext jitContext(cx, nullptr);
+
+ MacroAssembler masm;
+
+ Register propertiesReg, newKindReg;
+#ifdef JS_CODEGEN_X86
+ propertiesReg = eax;
+ newKindReg = ecx;
+ masm.loadPtr(Address(masm.getStackPointer(), sizeof(void*)), propertiesReg);
+ masm.loadPtr(Address(masm.getStackPointer(), 2 * sizeof(void*)), newKindReg);
+#else
+ propertiesReg = IntArgReg0;
+ newKindReg = IntArgReg1;
+#endif
+
+#ifdef JS_CODEGEN_ARM64
+ // ARM64 communicates stack address via sp, but uses a pseudo-sp for addressing.
+ masm.initStackPtr();
+#endif
+
+ MOZ_ASSERT(propertiesReg.volatile_());
+ MOZ_ASSERT(newKindReg.volatile_());
+
+ AllocatableGeneralRegisterSet regs(GeneralRegisterSet::All());
+ regs.take(propertiesReg);
+ regs.take(newKindReg);
+ Register object = regs.takeAny(), scratch1 = regs.takeAny(), scratch2 = regs.takeAny();
+
+ LiveGeneralRegisterSet savedNonVolatileRegisters = SavedNonVolatileRegisters(regs);
+ masm.PushRegsInMask(savedNonVolatileRegisters);
+
+ // The scratch double register might be used by MacroAssembler methods.
+ if (ScratchDoubleReg.volatile_())
+ masm.push(ScratchDoubleReg);
+
+ Label failure, tenuredObject, allocated;
+ masm.branch32(Assembler::NotEqual, newKindReg, Imm32(GenericObject), &tenuredObject);
+ masm.branchTest32(Assembler::NonZero, AbsoluteAddress(group->addressOfFlags()),
+ Imm32(OBJECT_FLAG_PRE_TENURE), &tenuredObject);
+
+ // Allocate an object in the nursery
+ masm.createGCObject(object, scratch1, templateObject, gc::DefaultHeap, &failure,
+ /* initFixedSlots = */ false);
+
+ masm.jump(&allocated);
+ masm.bind(&tenuredObject);
+
+ // Allocate an object in the tenured heap.
+ masm.createGCObject(object, scratch1, templateObject, gc::TenuredHeap, &failure,
+ /* initFixedSlots = */ false);
+
+ // If any of the properties being stored are in the nursery, add a store
+ // buffer entry for the new object.
+ Label postBarrier;
+ for (size_t i = 0; i < layout.properties().length(); i++) {
+ const UnboxedLayout::Property& property = layout.properties()[i];
+ if (property.type == JSVAL_TYPE_OBJECT) {
+ Address valueAddress(propertiesReg, i * sizeof(IdValuePair) + offsetof(IdValuePair, value));
+ Label notObject;
+ masm.branchTestObject(Assembler::NotEqual, valueAddress, &notObject);
+ Register valueObject = masm.extractObject(valueAddress, scratch1);
+ masm.branchPtrInNurseryChunk(Assembler::Equal, valueObject, scratch2, &postBarrier);
+ masm.bind(&notObject);
+ }
+ }
+
+ masm.jump(&allocated);
+ masm.bind(&postBarrier);
+
+ LiveGeneralRegisterSet liveVolatileRegisters;
+ liveVolatileRegisters.add(propertiesReg);
+ if (object.volatile_())
+ liveVolatileRegisters.add(object);
+ masm.PushRegsInMask(liveVolatileRegisters);
+
+ masm.mov(ImmPtr(cx->runtime()), scratch1);
+ masm.setupUnalignedABICall(scratch2);
+ masm.passABIArg(scratch1);
+ masm.passABIArg(object);
+ masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, PostWriteBarrier));
+
+ masm.PopRegsInMask(liveVolatileRegisters);
+
+ masm.bind(&allocated);
+
+ ValueOperand valueOperand;
+#ifdef JS_NUNBOX32
+ valueOperand = ValueOperand(scratch1, scratch2);
+#else
+ valueOperand = ValueOperand(scratch1);
+#endif
+
+ Label failureStoreOther, failureStoreObject;
+
+ for (size_t i = 0; i < layout.properties().length(); i++) {
+ const UnboxedLayout::Property& property = layout.properties()[i];
+ Address valueAddress(propertiesReg, i * sizeof(IdValuePair) + offsetof(IdValuePair, value));
+ Address targetAddress(object, UnboxedPlainObject::offsetOfData() + property.offset);
+
+ masm.loadValue(valueAddress, valueOperand);
+
+ if (property.type == JSVAL_TYPE_OBJECT) {
+ HeapTypeSet* types = group->maybeGetProperty(IdToTypeId(NameToId(property.name)));
+
+ Label notObject;
+ masm.branchTestObject(Assembler::NotEqual, valueOperand,
+ types->mightBeMIRType(MIRType::Null) ? &notObject : &failureStoreObject);
+
+ Register payloadReg = masm.extractObject(valueOperand, scratch1);
+
+ if (!types->hasType(TypeSet::AnyObjectType())) {
+ Register scratch = (payloadReg == scratch1) ? scratch2 : scratch1;
+ masm.guardObjectType(payloadReg, types, scratch, &failureStoreObject);
+ }
+
+ masm.storeUnboxedProperty(targetAddress, JSVAL_TYPE_OBJECT,
+ TypedOrValueRegister(MIRType::Object,
+ AnyRegister(payloadReg)), nullptr);
+
+ if (notObject.used()) {
+ Label done;
+ masm.jump(&done);
+ masm.bind(&notObject);
+ masm.branchTestNull(Assembler::NotEqual, valueOperand, &failureStoreOther);
+ masm.storeUnboxedProperty(targetAddress, JSVAL_TYPE_OBJECT, NullValue(), nullptr);
+ masm.bind(&done);
+ }
+ } else {
+ masm.storeUnboxedProperty(targetAddress, property.type,
+ ConstantOrRegister(valueOperand), &failureStoreOther);
+ }
+ }
+
+ Label done;
+ masm.bind(&done);
+
+ if (object != ReturnReg)
+ masm.movePtr(object, ReturnReg);
+
+ // Restore non-volatile registers which were saved on entry.
+ if (ScratchDoubleReg.volatile_())
+ masm.pop(ScratchDoubleReg);
+ masm.PopRegsInMask(savedNonVolatileRegisters);
+
+ masm.abiret();
+
+ masm.bind(&failureStoreOther);
+
+ // There was a failure while storing a value which cannot be stored at all
+ // in the unboxed object. Initialize the object so it is safe for GC and
+ // return null.
+ masm.initUnboxedObjectContents(object, templateObject);
+
+ masm.bind(&failure);
+
+ masm.movePtr(ImmWord(0), object);
+ masm.jump(&done);
+
+ masm.bind(&failureStoreObject);
+
+ // There was a failure while storing a value to an object slot of the
+ // unboxed object. If the value is storable, the failure occurred due to
+ // incomplete type information in the object, so return a token to trigger
+ // regeneration of the jitcode after a new object is created in the VM.
+ {
+ Label isObject;
+ masm.branchTestObject(Assembler::Equal, valueOperand, &isObject);
+ masm.branchTestNull(Assembler::NotEqual, valueOperand, &failureStoreOther);
+ masm.bind(&isObject);
+ }
+
+ // Initialize the object so it is safe for GC.
+ masm.initUnboxedObjectContents(object, templateObject);
+
+ masm.movePtr(ImmWord(CLEAR_CONSTRUCTOR_CODE_TOKEN), object);
+ masm.jump(&done);
+
+ Linker linker(masm);
+ AutoFlushICache afc("UnboxedObject");
+ JitCode* code = linker.newCode<NoGC>(cx, OTHER_CODE);
+ if (!code)
+ return false;
+
+ layout.setConstructorCode(code);
+ return true;
+}
+
+void
+UnboxedLayout::detachFromCompartment()
+{
+ if (isInList())
+ remove();
+}
+
+/////////////////////////////////////////////////////////////////////
+// UnboxedPlainObject
+/////////////////////////////////////////////////////////////////////
+
+bool
+UnboxedPlainObject::setValue(ExclusiveContext* cx, const UnboxedLayout::Property& property,
+ const Value& v)
+{
+ uint8_t* p = &data_[property.offset];
+ return SetUnboxedValue(cx, this, NameToId(property.name), p, property.type, v,
+ /* preBarrier = */ true);
+}
+
+Value
+UnboxedPlainObject::getValue(const UnboxedLayout::Property& property,
+ bool maybeUninitialized /* = false */)
+{
+ uint8_t* p = &data_[property.offset];
+ return GetUnboxedValue(p, property.type, maybeUninitialized);
+}
+
+void
+UnboxedPlainObject::trace(JSTracer* trc, JSObject* obj)
+{
+ if (obj->as<UnboxedPlainObject>().expando_) {
+ TraceManuallyBarrieredEdge(trc,
+ reinterpret_cast<NativeObject**>(&obj->as<UnboxedPlainObject>().expando_),
+ "unboxed_expando");
+ }
+
+ const UnboxedLayout& layout = obj->as<UnboxedPlainObject>().layoutDontCheckGeneration();
+ const int32_t* list = layout.traceList();
+ if (!list)
+ return;
+
+ uint8_t* data = obj->as<UnboxedPlainObject>().data();
+ while (*list != -1) {
+ GCPtrString* heap = reinterpret_cast<GCPtrString*>(data + *list);
+ TraceEdge(trc, heap, "unboxed_string");
+ list++;
+ }
+ list++;
+ while (*list != -1) {
+ GCPtrObject* heap = reinterpret_cast<GCPtrObject*>(data + *list);
+ TraceNullableEdge(trc, heap, "unboxed_object");
+ list++;
+ }
+
+ // Unboxed objects don't have Values to trace.
+ MOZ_ASSERT(*(list + 1) == -1);
+}
+
+/* static */ UnboxedExpandoObject*
+UnboxedPlainObject::ensureExpando(JSContext* cx, Handle<UnboxedPlainObject*> obj)
+{
+ if (obj->expando_)
+ return obj->expando_;
+
+ UnboxedExpandoObject* expando =
+ NewObjectWithGivenProto<UnboxedExpandoObject>(cx, nullptr, gc::AllocKind::OBJECT4);
+ if (!expando)
+ return nullptr;
+
+ // Don't track property types for expando objects. This allows Baseline
+ // and Ion AddSlot ICs to guard on the unboxed group without guarding on
+ // the expando group.
+ MarkObjectGroupUnknownProperties(cx, expando->group());
+
+ // If the expando is tenured then the original object must also be tenured.
+ // Otherwise barriers triggered on the original object for writes to the
+ // expando (as can happen in the JIT) won't see the tenured->nursery edge.
+ // See WholeCellEdges::mark.
+ MOZ_ASSERT_IF(!IsInsideNursery(expando), !IsInsideNursery(obj));
+
+ // As with setValue(), we need to manually trigger post barriers on the
+ // whole object. If we treat the field as a GCPtrObject and later
+ // convert the object to its native representation, we will end up with a
+ // corrupted store buffer entry.
+ if (IsInsideNursery(expando) && !IsInsideNursery(obj))
+ cx->runtime()->gc.storeBuffer.putWholeCell(obj);
+
+ obj->expando_ = expando;
+ return expando;
+}
+
+bool
+UnboxedPlainObject::containsUnboxedOrExpandoProperty(ExclusiveContext* cx, jsid id) const
+{
+ if (layout().lookup(id))
+ return true;
+
+ if (maybeExpando() && maybeExpando()->containsShapeOrElement(cx, id))
+ return true;
+
+ return false;
+}
+
+static bool
+PropagatePropertyTypes(JSContext* cx, jsid id, ObjectGroup* oldGroup, ObjectGroup* newGroup)
+{
+ HeapTypeSet* typeProperty = oldGroup->maybeGetProperty(id);
+ TypeSet::TypeList types;
+ if (!typeProperty->enumerateTypes(&types)) {
+ ReportOutOfMemory(cx);
+ return false;
+ }
+ for (size_t j = 0; j < types.length(); j++)
+ AddTypePropertyId(cx, newGroup, nullptr, id, types[j]);
+ return true;
+}
+
+static PlainObject*
+MakeReplacementTemplateObject(JSContext* cx, HandleObjectGroup group, const UnboxedLayout &layout)
+{
+ PlainObject* obj = NewObjectWithGroup<PlainObject>(cx, group, layout.getAllocKind(),
+ TenuredObject);
+ if (!obj)
+ return nullptr;
+
+ for (size_t i = 0; i < layout.properties().length(); i++) {
+ const UnboxedLayout::Property& property = layout.properties()[i];
+ if (!obj->addDataProperty(cx, NameToId(property.name), i, JSPROP_ENUMERATE))
+ return nullptr;
+ MOZ_ASSERT(obj->slotSpan() == i + 1);
+ MOZ_ASSERT(!obj->inDictionaryMode());
+ }
+
+ return obj;
+}
+
+/* static */ bool
+UnboxedLayout::makeNativeGroup(JSContext* cx, ObjectGroup* group)
+{
+ AutoEnterAnalysis enter(cx);
+
+ UnboxedLayout& layout = group->unboxedLayout();
+ Rooted<TaggedProto> proto(cx, group->proto());
+
+ MOZ_ASSERT(!layout.nativeGroup());
+
+ RootedObjectGroup replacementGroup(cx);
+
+ const Class* clasp = layout.isArray() ? &ArrayObject::class_ : &PlainObject::class_;
+
+ // Immediately clear any new script on the group. This is done by replacing
+ // the existing new script with one for a replacement default new group.
+ // This is done so that the size of the replacment group's objects is the
+ // same as that for the unboxed group, so that we do not see polymorphic
+ // slot accesses later on for sites that see converted objects from this
+ // group and objects that were allocated using the replacement new group.
+ if (layout.newScript()) {
+ MOZ_ASSERT(!layout.isArray());
+
+ replacementGroup = ObjectGroupCompartment::makeGroup(cx, &PlainObject::class_, proto);
+ if (!replacementGroup)
+ return false;
+
+ PlainObject* templateObject = MakeReplacementTemplateObject(cx, replacementGroup, layout);
+ if (!templateObject)
+ return false;
+
+ TypeNewScript* replacementNewScript =
+ TypeNewScript::makeNativeVersion(cx, layout.newScript(), templateObject);
+ if (!replacementNewScript)
+ return false;
+
+ replacementGroup->setNewScript(replacementNewScript);
+ gc::TraceTypeNewScript(replacementGroup);
+
+ group->clearNewScript(cx, replacementGroup);
+ }
+
+ // Similarly, if this group is keyed to an allocation site, replace its
+ // entry with a new group that has no unboxed layout.
+ if (layout.allocationScript()) {
+ RootedScript script(cx, layout.allocationScript());
+ jsbytecode* pc = layout.allocationPc();
+
+ replacementGroup = ObjectGroupCompartment::makeGroup(cx, clasp, proto);
+ if (!replacementGroup)
+ return false;
+
+ PlainObject* templateObject = &script->getObject(pc)->as<PlainObject>();
+ replacementGroup->addDefiniteProperties(cx, templateObject->lastProperty());
+
+ JSProtoKey key = layout.isArray() ? JSProto_Array : JSProto_Object;
+ cx->compartment()->objectGroups.replaceAllocationSiteGroup(script, pc, key,
+ replacementGroup);
+
+ // Clear any baseline information at this opcode which might use the old group.
+ if (script->hasBaselineScript()) {
+ jit::ICEntry& entry = script->baselineScript()->icEntryFromPCOffset(script->pcToOffset(pc));
+ jit::ICFallbackStub* fallback = entry.fallbackStub();
+ for (jit::ICStubIterator iter = fallback->beginChain(); !iter.atEnd(); iter++)
+ iter.unlink(cx);
+ if (fallback->isNewObject_Fallback())
+ fallback->toNewObject_Fallback()->setTemplateObject(nullptr);
+ else if (fallback->isNewArray_Fallback())
+ fallback->toNewArray_Fallback()->setTemplateGroup(replacementGroup);
+ }
+ }
+
+ size_t nfixed = layout.isArray() ? 0 : gc::GetGCKindSlots(layout.getAllocKind());
+
+ if (layout.isArray()) {
+ // The length shape to use for arrays is cached via a modified initial
+ // shape for array objects. Create an array now to make sure this entry
+ // is instantiated.
+ if (!NewDenseEmptyArray(cx))
+ return false;
+ }
+
+ RootedShape shape(cx, EmptyShape::getInitialShape(cx, clasp, proto, nfixed, 0));
+ if (!shape)
+ return false;
+
+ MOZ_ASSERT_IF(layout.isArray(), !shape->isEmptyShape() && shape->slotSpan() == 0);
+
+ // Add shapes for each property, if this is for a plain object.
+ for (size_t i = 0; i < layout.properties().length(); i++) {
+ const UnboxedLayout::Property& property = layout.properties()[i];
+
+ Rooted<StackShape> child(cx, StackShape(shape->base()->unowned(), NameToId(property.name),
+ i, JSPROP_ENUMERATE, 0));
+ shape = cx->zone()->propertyTree.getChild(cx, shape, child);
+ if (!shape)
+ return false;
+ }
+
+ ObjectGroup* nativeGroup =
+ ObjectGroupCompartment::makeGroup(cx, clasp, proto,
+ group->flags() & OBJECT_FLAG_DYNAMIC_MASK);
+ if (!nativeGroup)
+ return false;
+
+ // No sense propagating if we don't know what we started with.
+ if (!group->unknownProperties()) {
+ // Propagate all property types from the old group to the new group.
+ if (layout.isArray()) {
+ if (!PropagatePropertyTypes(cx, JSID_VOID, group, nativeGroup))
+ return false;
+ } else {
+ for (size_t i = 0; i < layout.properties().length(); i++) {
+ const UnboxedLayout::Property& property = layout.properties()[i];
+ jsid id = NameToId(property.name);
+ if (!PropagatePropertyTypes(cx, id, group, nativeGroup))
+ return false;
+
+ // If we are OOM we may not be able to propagate properties.
+ if (nativeGroup->unknownProperties())
+ break;
+
+ HeapTypeSet* nativeProperty = nativeGroup->maybeGetProperty(id);
+ if (nativeProperty && nativeProperty->canSetDefinite(i))
+ nativeProperty->setDefinite(i);
+ }
+ }
+ } else {
+ // If we skip, though, the new group had better agree.
+ MOZ_ASSERT(nativeGroup->unknownProperties());
+ }
+
+ layout.nativeGroup_ = nativeGroup;
+ layout.nativeShape_ = shape;
+ layout.replacementGroup_ = replacementGroup;
+
+ nativeGroup->setOriginalUnboxedGroup(group);
+
+ group->markStateChange(cx);
+
+ return true;
+}
+
+/* static */ bool
+UnboxedPlainObject::convertToNative(JSContext* cx, JSObject* obj)
+{
+ const UnboxedLayout& layout = obj->as<UnboxedPlainObject>().layout();
+ UnboxedExpandoObject* expando = obj->as<UnboxedPlainObject>().maybeExpando();
+
+ if (!layout.nativeGroup()) {
+ if (!UnboxedLayout::makeNativeGroup(cx, obj->group()))
+ return false;
+
+ // makeNativeGroup can reentrantly invoke this method.
+ if (obj->is<PlainObject>())
+ return true;
+ }
+
+ AutoValueVector values(cx);
+ for (size_t i = 0; i < layout.properties().length(); i++) {
+ // We might be reading properties off the object which have not been
+ // initialized yet. Make sure any double values we read here are
+ // canonicalized.
+ if (!values.append(obj->as<UnboxedPlainObject>().getValue(layout.properties()[i], true)))
+ return false;
+ }
+
+ // We are eliminating the expando edge with the conversion, so trigger a
+ // pre barrier.
+ JSObject::writeBarrierPre(expando);
+
+ // Additionally trigger a post barrier on the expando itself. Whole cell
+ // store buffer entries can be added on the original unboxed object for
+ // writes to the expando (see WholeCellEdges::trace), so after conversion
+ // we need to make sure the expando itself will still be traced.
+ if (expando && !IsInsideNursery(expando))
+ cx->runtime()->gc.storeBuffer.putWholeCell(expando);
+
+ obj->setGroup(layout.nativeGroup());
+ obj->as<PlainObject>().setLastPropertyMakeNative(cx, layout.nativeShape());
+
+ for (size_t i = 0; i < values.length(); i++)
+ obj->as<PlainObject>().initSlotUnchecked(i, values[i]);
+
+ if (expando) {
+ // Add properties from the expando object to the object, in order.
+ // Suppress GC here, so that callers don't need to worry about this
+ // method collecting. The stuff below can only fail due to OOM, in
+ // which case the object will not have been completely filled back in.
+ gc::AutoSuppressGC suppress(cx);
+
+ Vector<jsid> ids(cx);
+ for (Shape::Range<NoGC> r(expando->lastProperty()); !r.empty(); r.popFront()) {
+ if (!ids.append(r.front().propid()))
+ return false;
+ }
+ for (size_t i = 0; i < expando->getDenseInitializedLength(); i++) {
+ if (!expando->getDenseElement(i).isMagic(JS_ELEMENTS_HOLE)) {
+ if (!ids.append(INT_TO_JSID(i)))
+ return false;
+ }
+ }
+ ::Reverse(ids.begin(), ids.end());
+
+ RootedPlainObject nobj(cx, &obj->as<PlainObject>());
+ Rooted<UnboxedExpandoObject*> nexpando(cx, expando);
+ RootedId id(cx);
+ Rooted<PropertyDescriptor> desc(cx);
+ for (size_t i = 0; i < ids.length(); i++) {
+ id = ids[i];
+ if (!GetOwnPropertyDescriptor(cx, nexpando, id, &desc))
+ return false;
+ ObjectOpResult result;
+ if (!DefineProperty(cx, nobj, id, desc, result))
+ return false;
+ MOZ_ASSERT(result.ok());
+ }
+ }
+
+ return true;
+}
+
+/* static */
+UnboxedPlainObject*
+UnboxedPlainObject::create(ExclusiveContext* cx, HandleObjectGroup group, NewObjectKind newKind)
+{
+ AutoSetNewObjectMetadata metadata(cx);
+
+ MOZ_ASSERT(group->clasp() == &class_);
+ gc::AllocKind allocKind = group->unboxedLayout().getAllocKind();
+
+ UnboxedPlainObject* res =
+ NewObjectWithGroup<UnboxedPlainObject>(cx, group, allocKind, newKind);
+ if (!res)
+ return nullptr;
+
+ // Overwrite the dummy shape which was written to the object's expando field.
+ res->initExpando();
+
+ // Initialize reference fields of the object. All fields in the object will
+ // be overwritten shortly, but references need to be safe for the GC.
+ const int32_t* list = res->layout().traceList();
+ if (list) {
+ uint8_t* data = res->data();
+ while (*list != -1) {
+ GCPtrString* heap = reinterpret_cast<GCPtrString*>(data + *list);
+ heap->init(cx->names().empty);
+ list++;
+ }
+ list++;
+ while (*list != -1) {
+ GCPtrObject* heap = reinterpret_cast<GCPtrObject*>(data + *list);
+ heap->init(nullptr);
+ list++;
+ }
+ // Unboxed objects don't have Values to initialize.
+ MOZ_ASSERT(*(list + 1) == -1);
+ }
+
+ return res;
+}
+
+/* static */ JSObject*
+UnboxedPlainObject::createWithProperties(ExclusiveContext* cx, HandleObjectGroup group,
+ NewObjectKind newKind, IdValuePair* properties)
+{
+ MOZ_ASSERT(newKind == GenericObject || newKind == TenuredObject);
+
+ UnboxedLayout& layout = group->unboxedLayout();
+
+ if (layout.constructorCode()) {
+ MOZ_ASSERT(cx->isJSContext());
+
+ typedef JSObject* (*ConstructorCodeSignature)(IdValuePair*, NewObjectKind);
+ ConstructorCodeSignature function =
+ reinterpret_cast<ConstructorCodeSignature>(layout.constructorCode()->raw());
+
+ JSObject* obj;
+ {
+ JS::AutoSuppressGCAnalysis nogc;
+ obj = reinterpret_cast<JSObject*>(CALL_GENERATED_2(function, properties, newKind));
+ }
+ if (obj > reinterpret_cast<JSObject*>(CLEAR_CONSTRUCTOR_CODE_TOKEN))
+ return obj;
+
+ if (obj == reinterpret_cast<JSObject*>(CLEAR_CONSTRUCTOR_CODE_TOKEN))
+ layout.setConstructorCode(nullptr);
+ }
+
+ UnboxedPlainObject* obj = UnboxedPlainObject::create(cx, group, newKind);
+ if (!obj)
+ return nullptr;
+
+ for (size_t i = 0; i < layout.properties().length(); i++) {
+ if (!obj->setValue(cx, layout.properties()[i], properties[i].value))
+ return NewPlainObjectWithProperties(cx, properties, layout.properties().length(), newKind);
+ }
+
+#ifndef JS_CODEGEN_NONE
+ if (cx->isJSContext() &&
+ !group->unknownProperties() &&
+ !layout.constructorCode() &&
+ cx->asJSContext()->runtime()->jitSupportsFloatingPoint &&
+ jit::CanLikelyAllocateMoreExecutableMemory())
+ {
+ if (!UnboxedLayout::makeConstructorCode(cx->asJSContext(), group))
+ return nullptr;
+ }
+#endif
+
+ return obj;
+}
+
+/* static */ bool
+UnboxedPlainObject::obj_lookupProperty(JSContext* cx, HandleObject obj,
+ HandleId id, MutableHandleObject objp,
+ MutableHandleShape propp)
+{
+ if (obj->as<UnboxedPlainObject>().containsUnboxedOrExpandoProperty(cx, id)) {
+ MarkNonNativePropertyFound<CanGC>(propp);
+ objp.set(obj);
+ return true;
+ }
+
+ RootedObject proto(cx, obj->staticPrototype());
+ if (!proto) {
+ objp.set(nullptr);
+ propp.set(nullptr);
+ return true;
+ }
+
+ return LookupProperty(cx, proto, id, objp, propp);
+}
+
+/* static */ bool
+UnboxedPlainObject::obj_defineProperty(JSContext* cx, HandleObject obj, HandleId id,
+ Handle<PropertyDescriptor> desc,
+ ObjectOpResult& result)
+{
+ const UnboxedLayout& layout = obj->as<UnboxedPlainObject>().layout();
+
+ if (const UnboxedLayout::Property* property = layout.lookup(id)) {
+ if (!desc.getter() && !desc.setter() && desc.attributes() == JSPROP_ENUMERATE) {
+ // This define is equivalent to setting an existing property.
+ if (obj->as<UnboxedPlainObject>().setValue(cx, *property, desc.value()))
+ return result.succeed();
+ }
+
+ // Trying to incompatibly redefine an existing property requires the
+ // object to be converted to a native object.
+ if (!convertToNative(cx, obj))
+ return false;
+
+ return DefineProperty(cx, obj, id, desc, result);
+ }
+
+ // Define the property on the expando object.
+ Rooted<UnboxedExpandoObject*> expando(cx, ensureExpando(cx, obj.as<UnboxedPlainObject>()));
+ if (!expando)
+ return false;
+
+ // Update property types on the unboxed object as well.
+ AddTypePropertyId(cx, obj, id, desc.value());
+
+ return DefineProperty(cx, expando, id, desc, result);
+}
+
+/* static */ bool
+UnboxedPlainObject::obj_hasProperty(JSContext* cx, HandleObject obj, HandleId id, bool* foundp)
+{
+ if (obj->as<UnboxedPlainObject>().containsUnboxedOrExpandoProperty(cx, id)) {
+ *foundp = true;
+ return true;
+ }
+
+ RootedObject proto(cx, obj->staticPrototype());
+ if (!proto) {
+ *foundp = false;
+ return true;
+ }
+
+ return HasProperty(cx, proto, id, foundp);
+}
+
+/* static */ bool
+UnboxedPlainObject::obj_getProperty(JSContext* cx, HandleObject obj, HandleValue receiver,
+ HandleId id, MutableHandleValue vp)
+{
+ const UnboxedLayout& layout = obj->as<UnboxedPlainObject>().layout();
+
+ if (const UnboxedLayout::Property* property = layout.lookup(id)) {
+ vp.set(obj->as<UnboxedPlainObject>().getValue(*property));
+ return true;
+ }
+
+ if (UnboxedExpandoObject* expando = obj->as<UnboxedPlainObject>().maybeExpando()) {
+ if (expando->containsShapeOrElement(cx, id)) {
+ RootedObject nexpando(cx, expando);
+ return GetProperty(cx, nexpando, receiver, id, vp);
+ }
+ }
+
+ RootedObject proto(cx, obj->staticPrototype());
+ if (!proto) {
+ vp.setUndefined();
+ return true;
+ }
+
+ return GetProperty(cx, proto, receiver, id, vp);
+}
+
+/* static */ bool
+UnboxedPlainObject::obj_setProperty(JSContext* cx, HandleObject obj, HandleId id, HandleValue v,
+ HandleValue receiver, ObjectOpResult& result)
+{
+ const UnboxedLayout& layout = obj->as<UnboxedPlainObject>().layout();
+
+ if (const UnboxedLayout::Property* property = layout.lookup(id)) {
+ if (receiver.isObject() && obj == &receiver.toObject()) {
+ if (obj->as<UnboxedPlainObject>().setValue(cx, *property, v))
+ return result.succeed();
+
+ if (!convertToNative(cx, obj))
+ return false;
+ return SetProperty(cx, obj, id, v, receiver, result);
+ }
+
+ return SetPropertyByDefining(cx, id, v, receiver, result);
+ }
+
+ if (UnboxedExpandoObject* expando = obj->as<UnboxedPlainObject>().maybeExpando()) {
+ if (expando->containsShapeOrElement(cx, id)) {
+ // Update property types on the unboxed object as well.
+ AddTypePropertyId(cx, obj, id, v);
+
+ RootedObject nexpando(cx, expando);
+ return SetProperty(cx, nexpando, id, v, receiver, result);
+ }
+ }
+
+ return SetPropertyOnProto(cx, obj, id, v, receiver, result);
+}
+
+/* static */ bool
+UnboxedPlainObject::obj_getOwnPropertyDescriptor(JSContext* cx, HandleObject obj, HandleId id,
+ MutableHandle<PropertyDescriptor> desc)
+{
+ const UnboxedLayout& layout = obj->as<UnboxedPlainObject>().layout();
+
+ if (const UnboxedLayout::Property* property = layout.lookup(id)) {
+ desc.value().set(obj->as<UnboxedPlainObject>().getValue(*property));
+ desc.setAttributes(JSPROP_ENUMERATE);
+ desc.object().set(obj);
+ return true;
+ }
+
+ if (UnboxedExpandoObject* expando = obj->as<UnboxedPlainObject>().maybeExpando()) {
+ if (expando->containsShapeOrElement(cx, id)) {
+ RootedObject nexpando(cx, expando);
+ if (!GetOwnPropertyDescriptor(cx, nexpando, id, desc))
+ return false;
+ if (desc.object() == nexpando)
+ desc.object().set(obj);
+ return true;
+ }
+ }
+
+ desc.object().set(nullptr);
+ return true;
+}
+
+/* static */ bool
+UnboxedPlainObject::obj_deleteProperty(JSContext* cx, HandleObject obj, HandleId id,
+ ObjectOpResult& result)
+{
+ if (!convertToNative(cx, obj))
+ return false;
+ return DeleteProperty(cx, obj, id, result);
+}
+
+/* static */ bool
+UnboxedPlainObject::obj_enumerate(JSContext* cx, HandleObject obj, AutoIdVector& properties,
+ bool enumerableOnly)
+{
+ // Ignore expando properties here, they are special-cased by the property
+ // enumeration code.
+
+ const UnboxedLayout::PropertyVector& unboxed = obj->as<UnboxedPlainObject>().layout().properties();
+ for (size_t i = 0; i < unboxed.length(); i++) {
+ if (!properties.append(NameToId(unboxed[i].name)))
+ return false;
+ }
+
+ return true;
+}
+
+const Class UnboxedExpandoObject::class_ = {
+ "UnboxedExpandoObject",
+ 0
+};
+
+static const ClassOps UnboxedPlainObjectClassOps = {
+ nullptr, /* addProperty */
+ nullptr, /* delProperty */
+ nullptr, /* getProperty */
+ nullptr, /* setProperty */
+ nullptr, /* enumerate */
+ nullptr, /* resolve */
+ nullptr, /* mayResolve */
+ nullptr, /* finalize */
+ nullptr, /* call */
+ nullptr, /* hasInstance */
+ nullptr, /* construct */
+ UnboxedPlainObject::trace,
+};
+
+static const ObjectOps UnboxedPlainObjectObjectOps = {
+ UnboxedPlainObject::obj_lookupProperty,
+ UnboxedPlainObject::obj_defineProperty,
+ UnboxedPlainObject::obj_hasProperty,
+ UnboxedPlainObject::obj_getProperty,
+ UnboxedPlainObject::obj_setProperty,
+ UnboxedPlainObject::obj_getOwnPropertyDescriptor,
+ UnboxedPlainObject::obj_deleteProperty,
+ nullptr, /* getElements */
+ UnboxedPlainObject::obj_enumerate,
+ nullptr /* funToString */
+};
+
+const Class UnboxedPlainObject::class_ = {
+ js_Object_str,
+ Class::NON_NATIVE |
+ JSCLASS_HAS_CACHED_PROTO(JSProto_Object) |
+ JSCLASS_DELAY_METADATA_BUILDER,
+ &UnboxedPlainObjectClassOps,
+ JS_NULL_CLASS_SPEC,
+ JS_NULL_CLASS_EXT,
+ &UnboxedPlainObjectObjectOps
+};
+
+/////////////////////////////////////////////////////////////////////
+// UnboxedArrayObject
+/////////////////////////////////////////////////////////////////////
+
+template <JSValueType Type>
+DenseElementResult
+AppendUnboxedDenseElements(UnboxedArrayObject* obj, uint32_t initlen,
+ MutableHandle<GCVector<Value>> values)
+{
+ for (size_t i = 0; i < initlen; i++)
+ values.infallibleAppend(obj->getElementSpecific<Type>(i));
+ return DenseElementResult::Success;
+}
+
+DefineBoxedOrUnboxedFunctor3(AppendUnboxedDenseElements,
+ UnboxedArrayObject*, uint32_t, MutableHandle<GCVector<Value>>);
+
+/* static */ bool
+UnboxedArrayObject::convertToNativeWithGroup(ExclusiveContext* cx, JSObject* obj,
+ ObjectGroup* group, Shape* shape)
+{
+ size_t length = obj->as<UnboxedArrayObject>().length();
+ size_t initlen = obj->as<UnboxedArrayObject>().initializedLength();
+
+ Rooted<GCVector<Value>> values(cx, GCVector<Value>(cx));
+ if (!values.reserve(initlen))
+ return false;
+
+ AppendUnboxedDenseElementsFunctor functor(&obj->as<UnboxedArrayObject>(), initlen, &values);
+ DebugOnly<DenseElementResult> result = CallBoxedOrUnboxedSpecialization(functor, obj);
+ MOZ_ASSERT(result.value == DenseElementResult::Success);
+
+ obj->setGroup(group);
+
+ ArrayObject* aobj = &obj->as<ArrayObject>();
+ aobj->setLastPropertyMakeNative(cx, shape);
+
+ // Make sure there is at least one element, so that this array does not
+ // use emptyObjectElements / emptyObjectElementsShared.
+ if (!aobj->ensureElements(cx, Max<size_t>(initlen, 1)))
+ return false;
+
+ MOZ_ASSERT(!aobj->getDenseInitializedLength());
+ aobj->setDenseInitializedLength(initlen);
+ aobj->initDenseElements(0, values.begin(), initlen);
+ aobj->setLengthInt32(length);
+
+ return true;
+}
+
+/* static */ bool
+UnboxedArrayObject::convertToNative(JSContext* cx, JSObject* obj)
+{
+ const UnboxedLayout& layout = obj->as<UnboxedArrayObject>().layout();
+
+ if (!layout.nativeGroup()) {
+ if (!UnboxedLayout::makeNativeGroup(cx, obj->group()))
+ return false;
+ }
+
+ return convertToNativeWithGroup(cx, obj, layout.nativeGroup(), layout.nativeShape());
+}
+
+bool
+UnboxedArrayObject::convertInt32ToDouble(ExclusiveContext* cx, ObjectGroup* group)
+{
+ MOZ_ASSERT(elementType() == JSVAL_TYPE_INT32);
+ MOZ_ASSERT(group->unboxedLayout().elementType() == JSVAL_TYPE_DOUBLE);
+
+ Vector<int32_t> values(cx);
+ if (!values.reserve(initializedLength()))
+ return false;
+ for (size_t i = 0; i < initializedLength(); i++)
+ values.infallibleAppend(getElementSpecific<JSVAL_TYPE_INT32>(i).toInt32());
+
+ uint8_t* newElements;
+ if (hasInlineElements()) {
+ newElements = AllocateObjectBuffer<uint8_t>(cx, this, capacity() * sizeof(double));
+ } else {
+ newElements = ReallocateObjectBuffer<uint8_t>(cx, this, elements(),
+ capacity() * sizeof(int32_t),
+ capacity() * sizeof(double));
+ }
+ if (!newElements)
+ return false;
+
+ setGroup(group);
+ elements_ = newElements;
+
+ for (size_t i = 0; i < initializedLength(); i++)
+ setElementNoTypeChangeSpecific<JSVAL_TYPE_DOUBLE>(i, DoubleValue(values[i]));
+
+ return true;
+}
+
+/* static */ UnboxedArrayObject*
+UnboxedArrayObject::create(ExclusiveContext* cx, HandleObjectGroup group, uint32_t length,
+ NewObjectKind newKind, uint32_t maxLength)
+{
+ MOZ_ASSERT(length <= MaximumCapacity);
+
+ MOZ_ASSERT(group->clasp() == &class_);
+ uint32_t elementSize = UnboxedTypeSize(group->unboxedLayout().elementType());
+ uint32_t capacity = Min(length, maxLength);
+ uint32_t nbytes = offsetOfInlineElements() + elementSize * capacity;
+
+ UnboxedArrayObject* res;
+ if (nbytes <= JSObject::MAX_BYTE_SIZE) {
+ gc::AllocKind allocKind = gc::GetGCObjectKindForBytes(nbytes);
+
+ // If there was no provided length information, pick an allocation kind
+ // to accommodate small arrays (as is done for normal native arrays).
+ if (capacity == 0)
+ allocKind = gc::AllocKind::OBJECT8;
+
+ res = NewObjectWithGroup<UnboxedArrayObject>(cx, group, allocKind, newKind);
+ if (!res)
+ return nullptr;
+ res->setInitializedLengthNoBarrier(0);
+ res->setInlineElements();
+
+ size_t actualCapacity = (GetGCKindBytes(allocKind) - offsetOfInlineElements()) / elementSize;
+ MOZ_ASSERT(actualCapacity >= capacity);
+ res->setCapacityIndex(exactCapacityIndex(actualCapacity));
+ } else {
+ res = NewObjectWithGroup<UnboxedArrayObject>(cx, group, gc::AllocKind::OBJECT0, newKind);
+ if (!res)
+ return nullptr;
+ res->setInitializedLengthNoBarrier(0);
+
+ uint32_t capacityIndex = (capacity == length)
+ ? CapacityMatchesLengthIndex
+ : chooseCapacityIndex(capacity, length);
+ uint32_t actualCapacity = computeCapacity(capacityIndex, length);
+
+ res->elements_ = AllocateObjectBuffer<uint8_t>(cx, res, actualCapacity * elementSize);
+ if (!res->elements_) {
+ // Make the object safe for GC.
+ res->setInlineElements();
+ return nullptr;
+ }
+
+ res->setCapacityIndex(capacityIndex);
+ }
+
+ res->setLength(cx, length);
+ return res;
+}
+
+bool
+UnboxedArrayObject::setElement(ExclusiveContext* cx, size_t index, const Value& v)
+{
+ MOZ_ASSERT(index < initializedLength());
+ uint8_t* p = elements() + index * elementSize();
+ return SetUnboxedValue(cx, this, JSID_VOID, p, elementType(), v, /* preBarrier = */ true);
+}
+
+bool
+UnboxedArrayObject::initElement(ExclusiveContext* cx, size_t index, const Value& v)
+{
+ MOZ_ASSERT(index < initializedLength());
+ uint8_t* p = elements() + index * elementSize();
+ return SetUnboxedValue(cx, this, JSID_VOID, p, elementType(), v, /* preBarrier = */ false);
+}
+
+void
+UnboxedArrayObject::initElementNoTypeChange(size_t index, const Value& v)
+{
+ MOZ_ASSERT(index < initializedLength());
+ uint8_t* p = elements() + index * elementSize();
+ if (UnboxedTypeNeedsPreBarrier(elementType()))
+ *reinterpret_cast<void**>(p) = nullptr;
+ SetUnboxedValueNoTypeChange(this, p, elementType(), v, /* preBarrier = */ false);
+}
+
+Value
+UnboxedArrayObject::getElement(size_t index)
+{
+ MOZ_ASSERT(index < initializedLength());
+ uint8_t* p = elements() + index * elementSize();
+ return GetUnboxedValue(p, elementType(), /* maybeUninitialized = */ false);
+}
+
+/* static */ void
+UnboxedArrayObject::trace(JSTracer* trc, JSObject* obj)
+{
+ JSValueType type = obj->as<UnboxedArrayObject>().elementType();
+ if (!UnboxedTypeNeedsPreBarrier(type))
+ return;
+
+ MOZ_ASSERT(obj->as<UnboxedArrayObject>().elementSize() == sizeof(uintptr_t));
+ size_t initlen = obj->as<UnboxedArrayObject>().initializedLength();
+ void** elements = reinterpret_cast<void**>(obj->as<UnboxedArrayObject>().elements());
+
+ switch (type) {
+ case JSVAL_TYPE_OBJECT:
+ for (size_t i = 0; i < initlen; i++) {
+ GCPtrObject* heap = reinterpret_cast<GCPtrObject*>(elements + i);
+ TraceNullableEdge(trc, heap, "unboxed_object");
+ }
+ break;
+
+ case JSVAL_TYPE_STRING:
+ for (size_t i = 0; i < initlen; i++) {
+ GCPtrString* heap = reinterpret_cast<GCPtrString*>(elements + i);
+ TraceEdge(trc, heap, "unboxed_string");
+ }
+ break;
+
+ default:
+ MOZ_CRASH();
+ }
+}
+
+/* static */ void
+UnboxedArrayObject::objectMoved(JSObject* obj, const JSObject* old)
+{
+ UnboxedArrayObject& dst = obj->as<UnboxedArrayObject>();
+ const UnboxedArrayObject& src = old->as<UnboxedArrayObject>();
+
+ // Fix up possible inline data pointer.
+ if (src.hasInlineElements())
+ dst.setInlineElements();
+}
+
+/* static */ void
+UnboxedArrayObject::finalize(FreeOp* fop, JSObject* obj)
+{
+ MOZ_ASSERT(!IsInsideNursery(obj));
+ if (!obj->as<UnboxedArrayObject>().hasInlineElements())
+ js_free(obj->as<UnboxedArrayObject>().elements());
+}
+
+/* static */ size_t
+UnboxedArrayObject::objectMovedDuringMinorGC(JSTracer* trc, JSObject* dst, JSObject* src,
+ gc::AllocKind allocKind)
+{
+ UnboxedArrayObject* ndst = &dst->as<UnboxedArrayObject>();
+ UnboxedArrayObject* nsrc = &src->as<UnboxedArrayObject>();
+ MOZ_ASSERT(ndst->elements() == nsrc->elements());
+
+ Nursery& nursery = trc->runtime()->gc.nursery;
+
+ if (!nursery.isInside(nsrc->elements())) {
+ nursery.removeMallocedBuffer(nsrc->elements());
+ return 0;
+ }
+
+ // Determine if we can use inline data for the target array. If this is
+ // possible, the nursery will have picked an allocation size that is large
+ // enough.
+ size_t nbytes = nsrc->capacity() * nsrc->elementSize();
+ if (offsetOfInlineElements() + nbytes <= GetGCKindBytes(allocKind)) {
+ ndst->setInlineElements();
+ } else {
+ MOZ_ASSERT(allocKind == gc::AllocKind::OBJECT0);
+
+ AutoEnterOOMUnsafeRegion oomUnsafe;
+ uint8_t* data = nsrc->zone()->pod_malloc<uint8_t>(nbytes);
+ if (!data)
+ oomUnsafe.crash("Failed to allocate unboxed array elements while tenuring.");
+ ndst->elements_ = data;
+ }
+
+ PodCopy(ndst->elements(), nsrc->elements(), nsrc->initializedLength() * nsrc->elementSize());
+
+ // Set a forwarding pointer for the element buffers in case they were
+ // preserved on the stack by Ion.
+ bool direct = nsrc->capacity() * nsrc->elementSize() >= sizeof(uintptr_t);
+ nursery.maybeSetForwardingPointer(trc, nsrc->elements(), ndst->elements(), direct);
+
+ return ndst->hasInlineElements() ? 0 : nbytes;
+}
+
+// Possible capacities for unboxed arrays. Some of these capacities might seem
+// a little weird, but were chosen to allow the inline data of objects of each
+// size to be fully utilized for arrays of the various types on both 32 bit and
+// 64 bit platforms.
+//
+// To find the possible inline capacities, the following script was used:
+//
+// var fixedSlotCapacities = [0, 2, 4, 8, 12, 16];
+// var dataSizes = [1, 4, 8];
+// var header32 = 4 * 2 + 4 * 2;
+// var header64 = 8 * 2 + 4 * 2;
+//
+// for (var i = 0; i < fixedSlotCapacities.length; i++) {
+// var nfixed = fixedSlotCapacities[i];
+// var size32 = 4 * 4 + 8 * nfixed - header32;
+// var size64 = 8 * 4 + 8 * nfixed - header64;
+// for (var j = 0; j < dataSizes.length; j++) {
+// print(size32 / dataSizes[j]);
+// print(size64 / dataSizes[j]);
+// }
+// }
+//
+/* static */ const uint32_t
+UnboxedArrayObject::CapacityArray[] = {
+ UINT32_MAX, // For CapacityMatchesLengthIndex.
+ 0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 13, 16, 17, 18, 24, 26, 32, 34, 40, 64, 72, 96, 104, 128, 136,
+ 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288,
+ 1048576, 2097152, 3145728, 4194304, 5242880, 6291456, 7340032, 8388608, 9437184, 11534336,
+ 13631488, 15728640, 17825792, 20971520, 24117248, 27262976, 31457280, 35651584, 40894464,
+ 46137344, 52428800, 59768832, MaximumCapacity
+};
+
+static const uint32_t
+Pow2CapacityIndexes[] = {
+ 2, // 1
+ 3, // 2
+ 5, // 4
+ 8, // 8
+ 13, // 16
+ 18, // 32
+ 21, // 64
+ 25, // 128
+ 27, // 256
+ 28, // 512
+ 29, // 1024
+ 30, // 2048
+ 31, // 4096
+ 32, // 8192
+ 33, // 16384
+ 34, // 32768
+ 35, // 65536
+ 36, // 131072
+ 37, // 262144
+ 38, // 524288
+ 39 // 1048576
+};
+
+static const uint32_t MebiCapacityIndex = 39;
+
+/* static */ uint32_t
+UnboxedArrayObject::chooseCapacityIndex(uint32_t capacity, uint32_t length)
+{
+ // Note: the structure and behavior of this method follow along with
+ // NativeObject::goodAllocated. Changes to the allocation strategy in one
+ // should generally be matched by the other.
+
+ // Make sure we have enough space to store all possible values for the capacity index.
+ // This ought to be a static_assert, but MSVC doesn't like that.
+ MOZ_ASSERT(mozilla::ArrayLength(CapacityArray) - 1 <= (CapacityMask >> CapacityShift));
+
+ // The caller should have ensured the capacity is possible for an unboxed array.
+ MOZ_ASSERT(capacity <= MaximumCapacity);
+
+ static const uint32_t Mebi = 1024 * 1024;
+
+ if (capacity <= Mebi) {
+ capacity = mozilla::RoundUpPow2(capacity);
+
+ // When the required capacity is close to the array length, then round
+ // up to the array length itself, as for NativeObject.
+ if (length >= capacity && capacity > (length / 3) * 2)
+ return CapacityMatchesLengthIndex;
+
+ if (capacity < MinimumDynamicCapacity)
+ capacity = MinimumDynamicCapacity;
+
+ uint32_t bit = mozilla::FloorLog2Size(capacity);
+ MOZ_ASSERT(capacity == uint32_t(1 << bit));
+ MOZ_ASSERT(bit <= 20);
+ MOZ_ASSERT(mozilla::ArrayLength(Pow2CapacityIndexes) == 21);
+
+ uint32_t index = Pow2CapacityIndexes[bit];
+ MOZ_ASSERT(CapacityArray[index] == capacity);
+
+ return index;
+ }
+
+ MOZ_ASSERT(CapacityArray[MebiCapacityIndex] == Mebi);
+
+ for (uint32_t i = MebiCapacityIndex + 1;; i++) {
+ if (CapacityArray[i] >= capacity)
+ return i;
+ }
+
+ MOZ_CRASH("Invalid capacity");
+}
+
+/* static */ uint32_t
+UnboxedArrayObject::exactCapacityIndex(uint32_t capacity)
+{
+ for (size_t i = CapacityMatchesLengthIndex + 1; i < ArrayLength(CapacityArray); i++) {
+ if (CapacityArray[i] == capacity)
+ return i;
+ }
+ MOZ_CRASH();
+}
+
+bool
+UnboxedArrayObject::growElements(ExclusiveContext* cx, size_t cap)
+{
+ // The caller should have checked if this capacity is possible for an
+ // unboxed array, so the only way this call can fail is from OOM.
+ MOZ_ASSERT(cap <= MaximumCapacity);
+
+ uint32_t oldCapacity = capacity();
+ uint32_t newCapacityIndex = chooseCapacityIndex(cap, length());
+ uint32_t newCapacity = computeCapacity(newCapacityIndex, length());
+
+ MOZ_ASSERT(oldCapacity < cap);
+ MOZ_ASSERT(cap <= newCapacity);
+
+ // The allocation size computation below cannot have integer overflows.
+ JS_STATIC_ASSERT(MaximumCapacity < UINT32_MAX / sizeof(double));
+
+ uint8_t* newElements;
+ if (hasInlineElements()) {
+ newElements = AllocateObjectBuffer<uint8_t>(cx, this, newCapacity * elementSize());
+ if (!newElements)
+ return false;
+ js_memcpy(newElements, elements(), initializedLength() * elementSize());
+ } else {
+ newElements = ReallocateObjectBuffer<uint8_t>(cx, this, elements(),
+ oldCapacity * elementSize(),
+ newCapacity * elementSize());
+ if (!newElements)
+ return false;
+ }
+
+ elements_ = newElements;
+ setCapacityIndex(newCapacityIndex);
+
+ return true;
+}
+
+void
+UnboxedArrayObject::shrinkElements(ExclusiveContext* cx, size_t cap)
+{
+ if (hasInlineElements())
+ return;
+
+ uint32_t oldCapacity = capacity();
+ uint32_t newCapacityIndex = chooseCapacityIndex(cap, 0);
+ uint32_t newCapacity = computeCapacity(newCapacityIndex, 0);
+
+ MOZ_ASSERT(cap < oldCapacity);
+ MOZ_ASSERT(cap <= newCapacity);
+
+ if (newCapacity >= oldCapacity)
+ return;
+
+ uint8_t* newElements = ReallocateObjectBuffer<uint8_t>(cx, this, elements(),
+ oldCapacity * elementSize(),
+ newCapacity * elementSize());
+ if (!newElements)
+ return;
+
+ elements_ = newElements;
+ setCapacityIndex(newCapacityIndex);
+}
+
+bool
+UnboxedArrayObject::containsProperty(ExclusiveContext* cx, jsid id)
+{
+ if (JSID_IS_INT(id) && uint32_t(JSID_TO_INT(id)) < initializedLength())
+ return true;
+ if (JSID_IS_ATOM(id) && JSID_TO_ATOM(id) == cx->names().length)
+ return true;
+ return false;
+}
+
+/* static */ bool
+UnboxedArrayObject::obj_lookupProperty(JSContext* cx, HandleObject obj,
+ HandleId id, MutableHandleObject objp,
+ MutableHandleShape propp)
+{
+ if (obj->as<UnboxedArrayObject>().containsProperty(cx, id)) {
+ MarkNonNativePropertyFound<CanGC>(propp);
+ objp.set(obj);
+ return true;
+ }
+
+ RootedObject proto(cx, obj->staticPrototype());
+ if (!proto) {
+ objp.set(nullptr);
+ propp.set(nullptr);
+ return true;
+ }
+
+ return LookupProperty(cx, proto, id, objp, propp);
+}
+
+/* static */ bool
+UnboxedArrayObject::obj_defineProperty(JSContext* cx, HandleObject obj, HandleId id,
+ Handle<PropertyDescriptor> desc,
+ ObjectOpResult& result)
+{
+ if (JSID_IS_INT(id) && !desc.getter() && !desc.setter() && desc.attributes() == JSPROP_ENUMERATE) {
+ UnboxedArrayObject* nobj = &obj->as<UnboxedArrayObject>();
+
+ uint32_t index = JSID_TO_INT(id);
+ if (index < nobj->initializedLength()) {
+ if (nobj->setElement(cx, index, desc.value()))
+ return result.succeed();
+ } else if (index == nobj->initializedLength() && index < MaximumCapacity) {
+ if (nobj->initializedLength() == nobj->capacity()) {
+ if (!nobj->growElements(cx, index + 1))
+ return false;
+ }
+ nobj->setInitializedLength(index + 1);
+ if (nobj->initElement(cx, index, desc.value())) {
+ if (nobj->length() <= index)
+ nobj->setLengthInt32(index + 1);
+ return result.succeed();
+ }
+ nobj->setInitializedLengthNoBarrier(index);
+ }
+ }
+
+ if (!convertToNative(cx, obj))
+ return false;
+
+ return DefineProperty(cx, obj, id, desc, result);
+}
+
+/* static */ bool
+UnboxedArrayObject::obj_hasProperty(JSContext* cx, HandleObject obj, HandleId id, bool* foundp)
+{
+ if (obj->as<UnboxedArrayObject>().containsProperty(cx, id)) {
+ *foundp = true;
+ return true;
+ }
+
+ RootedObject proto(cx, obj->staticPrototype());
+ if (!proto) {
+ *foundp = false;
+ return true;
+ }
+
+ return HasProperty(cx, proto, id, foundp);
+}
+
+/* static */ bool
+UnboxedArrayObject::obj_getProperty(JSContext* cx, HandleObject obj, HandleValue receiver,
+ HandleId id, MutableHandleValue vp)
+{
+ if (obj->as<UnboxedArrayObject>().containsProperty(cx, id)) {
+ if (JSID_IS_INT(id))
+ vp.set(obj->as<UnboxedArrayObject>().getElement(JSID_TO_INT(id)));
+ else
+ vp.set(Int32Value(obj->as<UnboxedArrayObject>().length()));
+ return true;
+ }
+
+ RootedObject proto(cx, obj->staticPrototype());
+ if (!proto) {
+ vp.setUndefined();
+ return true;
+ }
+
+ return GetProperty(cx, proto, receiver, id, vp);
+}
+
+/* static */ bool
+UnboxedArrayObject::obj_setProperty(JSContext* cx, HandleObject obj, HandleId id, HandleValue v,
+ HandleValue receiver, ObjectOpResult& result)
+{
+ if (obj->as<UnboxedArrayObject>().containsProperty(cx, id)) {
+ if (receiver.isObject() && obj == &receiver.toObject()) {
+ if (JSID_IS_INT(id)) {
+ if (obj->as<UnboxedArrayObject>().setElement(cx, JSID_TO_INT(id), v))
+ return result.succeed();
+ } else {
+ uint32_t len;
+ if (!CanonicalizeArrayLengthValue(cx, v, &len))
+ return false;
+ UnboxedArrayObject* nobj = &obj->as<UnboxedArrayObject>();
+ if (len < nobj->initializedLength()) {
+ nobj->setInitializedLength(len);
+ nobj->shrinkElements(cx, len);
+ }
+ nobj->setLength(cx, len);
+ return result.succeed();
+ }
+
+ if (!convertToNative(cx, obj))
+ return false;
+ return SetProperty(cx, obj, id, v, receiver, result);
+ }
+
+ return SetPropertyByDefining(cx, id, v, receiver, result);
+ }
+
+ return SetPropertyOnProto(cx, obj, id, v, receiver, result);
+}
+
+/* static */ bool
+UnboxedArrayObject::obj_getOwnPropertyDescriptor(JSContext* cx, HandleObject obj, HandleId id,
+ MutableHandle<PropertyDescriptor> desc)
+{
+ if (obj->as<UnboxedArrayObject>().containsProperty(cx, id)) {
+ if (JSID_IS_INT(id)) {
+ desc.value().set(obj->as<UnboxedArrayObject>().getElement(JSID_TO_INT(id)));
+ desc.setAttributes(JSPROP_ENUMERATE);
+ } else {
+ desc.value().set(Int32Value(obj->as<UnboxedArrayObject>().length()));
+ desc.setAttributes(JSPROP_PERMANENT);
+ }
+ desc.object().set(obj);
+ return true;
+ }
+
+ desc.object().set(nullptr);
+ return true;
+}
+
+/* static */ bool
+UnboxedArrayObject::obj_deleteProperty(JSContext* cx, HandleObject obj, HandleId id,
+ ObjectOpResult& result)
+{
+ if (obj->as<UnboxedArrayObject>().containsProperty(cx, id)) {
+ size_t initlen = obj->as<UnboxedArrayObject>().initializedLength();
+ if (JSID_IS_INT(id) && JSID_TO_INT(id) == int32_t(initlen - 1)) {
+ obj->as<UnboxedArrayObject>().setInitializedLength(initlen - 1);
+ obj->as<UnboxedArrayObject>().shrinkElements(cx, initlen - 1);
+ return result.succeed();
+ }
+ }
+
+ if (!convertToNative(cx, obj))
+ return false;
+ return DeleteProperty(cx, obj, id, result);
+}
+
+/* static */ bool
+UnboxedArrayObject::obj_enumerate(JSContext* cx, HandleObject obj, AutoIdVector& properties,
+ bool enumerableOnly)
+{
+ for (size_t i = 0; i < obj->as<UnboxedArrayObject>().initializedLength(); i++) {
+ if (!properties.append(INT_TO_JSID(i)))
+ return false;
+ }
+
+ if (!enumerableOnly && !properties.append(NameToId(cx->names().length)))
+ return false;
+
+ return true;
+}
+
+static const ClassOps UnboxedArrayObjectClassOps = {
+ nullptr, /* addProperty */
+ nullptr, /* delProperty */
+ nullptr, /* getProperty */
+ nullptr, /* setProperty */
+ nullptr, /* enumerate */
+ nullptr, /* resolve */
+ nullptr, /* mayResolve */
+ UnboxedArrayObject::finalize,
+ nullptr, /* call */
+ nullptr, /* hasInstance */
+ nullptr, /* construct */
+ UnboxedArrayObject::trace,
+};
+
+static const ClassExtension UnboxedArrayObjectClassExtension = {
+ nullptr, /* weakmapKeyDelegateOp */
+ UnboxedArrayObject::objectMoved
+};
+
+static const ObjectOps UnboxedArrayObjectObjectOps = {
+ UnboxedArrayObject::obj_lookupProperty,
+ UnboxedArrayObject::obj_defineProperty,
+ UnboxedArrayObject::obj_hasProperty,
+ UnboxedArrayObject::obj_getProperty,
+ UnboxedArrayObject::obj_setProperty,
+ UnboxedArrayObject::obj_getOwnPropertyDescriptor,
+ UnboxedArrayObject::obj_deleteProperty,
+ nullptr, /* getElements */
+ UnboxedArrayObject::obj_enumerate,
+ nullptr /* funToString */
+};
+
+const Class UnboxedArrayObject::class_ = {
+ "Array",
+ Class::NON_NATIVE |
+ JSCLASS_SKIP_NURSERY_FINALIZE |
+ JSCLASS_BACKGROUND_FINALIZE,
+ &UnboxedArrayObjectClassOps,
+ JS_NULL_CLASS_SPEC,
+ &UnboxedArrayObjectClassExtension,
+ &UnboxedArrayObjectObjectOps
+};
+
+/////////////////////////////////////////////////////////////////////
+// API
+/////////////////////////////////////////////////////////////////////
+
+static bool
+UnboxedTypeIncludes(JSValueType supertype, JSValueType subtype)
+{
+ if (supertype == JSVAL_TYPE_DOUBLE && subtype == JSVAL_TYPE_INT32)
+ return true;
+ if (supertype == JSVAL_TYPE_OBJECT && subtype == JSVAL_TYPE_NULL)
+ return true;
+ return false;
+}
+
+static bool
+CombineUnboxedTypes(const Value& value, JSValueType* existing)
+{
+ JSValueType type = value.isDouble() ? JSVAL_TYPE_DOUBLE : value.extractNonDoubleType();
+
+ if (*existing == JSVAL_TYPE_MAGIC || *existing == type || UnboxedTypeIncludes(type, *existing)) {
+ *existing = type;
+ return true;
+ }
+ if (UnboxedTypeIncludes(*existing, type))
+ return true;
+ return false;
+}
+
+// Return whether the property names and types in layout are a subset of the
+// specified vector.
+static bool
+PropertiesAreSuperset(const UnboxedLayout::PropertyVector& properties, UnboxedLayout* layout)
+{
+ for (size_t i = 0; i < layout->properties().length(); i++) {
+ const UnboxedLayout::Property& layoutProperty = layout->properties()[i];
+ bool found = false;
+ for (size_t j = 0; j < properties.length(); j++) {
+ if (layoutProperty.name == properties[j].name) {
+ found = (layoutProperty.type == properties[j].type);
+ break;
+ }
+ }
+ if (!found)
+ return false;
+ }
+ return true;
+}
+
+static bool
+CombinePlainObjectProperties(PlainObject* obj, Shape* templateShape,
+ UnboxedLayout::PropertyVector& properties)
+{
+ // All preliminary objects must have been created with enough space to
+ // fill in their unboxed data inline. This is ensured either by using
+ // the largest allocation kind (which limits the maximum size of an
+ // unboxed object), or by using an allocation kind that covers all
+ // properties in the template, as the space used by unboxed properties
+ // is less than or equal to that used by boxed properties.
+ MOZ_ASSERT(gc::GetGCKindSlots(obj->asTenured().getAllocKind()) >=
+ Min(NativeObject::MAX_FIXED_SLOTS, templateShape->slotSpan()));
+
+ if (obj->lastProperty() != templateShape || obj->hasDynamicElements()) {
+ // Only use an unboxed representation if all created objects match
+ // the template shape exactly.
+ return false;
+ }
+
+ for (size_t i = 0; i < templateShape->slotSpan(); i++) {
+ Value val = obj->getSlot(i);
+
+ JSValueType& existing = properties[i].type;
+ if (!CombineUnboxedTypes(val, &existing))
+ return false;
+ }
+
+ return true;
+}
+
+static bool
+CombineArrayObjectElements(ExclusiveContext* cx, ArrayObject* obj, JSValueType* elementType)
+{
+ if (obj->inDictionaryMode() ||
+ obj->lastProperty()->propid() != AtomToId(cx->names().length) ||
+ !obj->lastProperty()->previous()->isEmptyShape())
+ {
+ // Only use an unboxed representation if the object has no properties.
+ return false;
+ }
+
+ for (size_t i = 0; i < obj->getDenseInitializedLength(); i++) {
+ Value val = obj->getDenseElement(i);
+
+ // For now, unboxed arrays cannot have holes.
+ if (val.isMagic(JS_ELEMENTS_HOLE))
+ return false;
+
+ if (!CombineUnboxedTypes(val, elementType))
+ return false;
+ }
+
+ return true;
+}
+
+static size_t
+ComputePlainObjectLayout(ExclusiveContext* cx, Shape* templateShape,
+ UnboxedLayout::PropertyVector& properties)
+{
+ // Fill in the names for all the object's properties.
+ for (Shape::Range<NoGC> r(templateShape); !r.empty(); r.popFront()) {
+ size_t slot = r.front().slot();
+ MOZ_ASSERT(!properties[slot].name);
+ properties[slot].name = JSID_TO_ATOM(r.front().propid())->asPropertyName();
+ }
+
+ // Fill in all the unboxed object's property offsets.
+ uint32_t offset = 0;
+
+ // Search for an existing unboxed layout which is a subset of this one.
+ // If there are multiple such layouts, use the largest one. If we're able
+ // to find such a layout, use the same property offsets for the shared
+ // properties, which will allow us to generate better code if the objects
+ // have a subtype/supertype relation and are accessed at common sites.
+ UnboxedLayout* bestExisting = nullptr;
+ for (UnboxedLayout* existing : cx->compartment()->unboxedLayouts) {
+ if (PropertiesAreSuperset(properties, existing)) {
+ if (!bestExisting ||
+ existing->properties().length() > bestExisting->properties().length())
+ {
+ bestExisting = existing;
+ }
+ }
+ }
+ if (bestExisting) {
+ for (size_t i = 0; i < bestExisting->properties().length(); i++) {
+ const UnboxedLayout::Property& existingProperty = bestExisting->properties()[i];
+ for (size_t j = 0; j < templateShape->slotSpan(); j++) {
+ if (existingProperty.name == properties[j].name) {
+ MOZ_ASSERT(existingProperty.type == properties[j].type);
+ properties[j].offset = existingProperty.offset;
+ }
+ }
+ }
+ offset = bestExisting->size();
+ }
+
+ // Order remaining properties from the largest down for the best space
+ // utilization.
+ static const size_t typeSizes[] = { 8, 4, 1 };
+
+ for (size_t i = 0; i < ArrayLength(typeSizes); i++) {
+ size_t size = typeSizes[i];
+ for (size_t j = 0; j < templateShape->slotSpan(); j++) {
+ if (properties[j].offset != UINT32_MAX)
+ continue;
+ JSValueType type = properties[j].type;
+ if (UnboxedTypeSize(type) == size) {
+ offset = JS_ROUNDUP(offset, size);
+ properties[j].offset = offset;
+ offset += size;
+ }
+ }
+ }
+
+ // The final offset is the amount of data needed by the object.
+ return offset;
+}
+
+static bool
+SetLayoutTraceList(ExclusiveContext* cx, UnboxedLayout* layout)
+{
+ // Figure out the offsets of any objects or string properties.
+ Vector<int32_t, 8, SystemAllocPolicy> objectOffsets, stringOffsets;
+ for (size_t i = 0; i < layout->properties().length(); i++) {
+ const UnboxedLayout::Property& property = layout->properties()[i];
+ MOZ_ASSERT(property.offset != UINT32_MAX);
+ if (property.type == JSVAL_TYPE_OBJECT) {
+ if (!objectOffsets.append(property.offset))
+ return false;
+ } else if (property.type == JSVAL_TYPE_STRING) {
+ if (!stringOffsets.append(property.offset))
+ return false;
+ }
+ }
+
+ // Construct the layout's trace list.
+ if (!objectOffsets.empty() || !stringOffsets.empty()) {
+ Vector<int32_t, 8, SystemAllocPolicy> entries;
+ if (!entries.appendAll(stringOffsets) ||
+ !entries.append(-1) ||
+ !entries.appendAll(objectOffsets) ||
+ !entries.append(-1) ||
+ !entries.append(-1))
+ {
+ return false;
+ }
+ int32_t* traceList = cx->zone()->pod_malloc<int32_t>(entries.length());
+ if (!traceList)
+ return false;
+ PodCopy(traceList, entries.begin(), entries.length());
+ layout->setTraceList(traceList);
+ }
+
+ return true;
+}
+
+static inline Value
+NextValue(Handle<GCVector<Value>> values, size_t* valueCursor)
+{
+ return values[(*valueCursor)++];
+}
+
+static bool
+GetValuesFromPreliminaryArrayObject(ArrayObject* obj, MutableHandle<GCVector<Value>> values)
+{
+ if (!values.append(Int32Value(obj->length())))
+ return false;
+ if (!values.append(Int32Value(obj->getDenseInitializedLength())))
+ return false;
+ for (size_t i = 0; i < obj->getDenseInitializedLength(); i++) {
+ if (!values.append(obj->getDenseElement(i)))
+ return false;
+ }
+ return true;
+}
+
+void
+UnboxedArrayObject::fillAfterConvert(ExclusiveContext* cx,
+ Handle<GCVector<Value>> values, size_t* valueCursor)
+{
+ MOZ_ASSERT(CapacityArray[1] == 0);
+ setCapacityIndex(1);
+ setInitializedLengthNoBarrier(0);
+ setInlineElements();
+
+ setLength(cx, NextValue(values, valueCursor).toInt32());
+
+ int32_t initlen = NextValue(values, valueCursor).toInt32();
+ if (!initlen)
+ return;
+
+ AutoEnterOOMUnsafeRegion oomUnsafe;
+ if (!growElements(cx, initlen))
+ oomUnsafe.crash("UnboxedArrayObject::fillAfterConvert");
+
+ setInitializedLength(initlen);
+
+ for (size_t i = 0; i < size_t(initlen); i++)
+ JS_ALWAYS_TRUE(initElement(cx, i, NextValue(values, valueCursor)));
+}
+
+static bool
+GetValuesFromPreliminaryPlainObject(PlainObject* obj, MutableHandle<GCVector<Value>> values)
+{
+ for (size_t i = 0; i < obj->slotSpan(); i++) {
+ if (!values.append(obj->getSlot(i)))
+ return false;
+ }
+ return true;
+}
+
+void
+UnboxedPlainObject::fillAfterConvert(ExclusiveContext* cx,
+ Handle<GCVector<Value>> values, size_t* valueCursor)
+{
+ initExpando();
+ memset(data(), 0, layout().size());
+ for (size_t i = 0; i < layout().properties().length(); i++)
+ JS_ALWAYS_TRUE(setValue(cx, layout().properties()[i], NextValue(values, valueCursor)));
+}
+
+bool
+js::TryConvertToUnboxedLayout(ExclusiveContext* cx, AutoEnterAnalysis& enter, Shape* templateShape,
+ ObjectGroup* group, PreliminaryObjectArray* objects)
+{
+ bool isArray = !templateShape;
+
+ // Unboxed arrays are nightly only for now. The getenv() call will be
+ // removed when they are on by default. See bug 1153266.
+ if (isArray) {
+#ifdef NIGHTLY_BUILD
+ if (!getenv("JS_OPTION_USE_UNBOXED_ARRAYS")) {
+ if (!cx->options().unboxedArrays())
+ return true;
+ }
+#else
+ return true;
+#endif
+ } else {
+ if (jit::JitOptions.disableUnboxedObjects)
+ return true;
+ }
+
+ MOZ_ASSERT_IF(templateShape, !templateShape->getObjectFlags());
+
+ if (group->runtimeFromAnyThread()->isSelfHostingGlobal(cx->global()))
+ return true;
+
+ if (!isArray && templateShape->slotSpan() == 0)
+ return true;
+
+ UnboxedLayout::PropertyVector properties;
+ if (!isArray) {
+ if (!properties.appendN(UnboxedLayout::Property(), templateShape->slotSpan()))
+ return false;
+ }
+ JSValueType elementType = JSVAL_TYPE_MAGIC;
+
+ size_t objectCount = 0;
+ for (size_t i = 0; i < PreliminaryObjectArray::COUNT; i++) {
+ JSObject* obj = objects->get(i);
+ if (!obj)
+ continue;
+
+ if (obj->isSingleton() || obj->group() != group)
+ return true;
+
+ objectCount++;
+
+ if (isArray) {
+ if (!CombineArrayObjectElements(cx, &obj->as<ArrayObject>(), &elementType))
+ return true;
+ } else {
+ if (!CombinePlainObjectProperties(&obj->as<PlainObject>(), templateShape, properties))
+ return true;
+ }
+ }
+
+ size_t layoutSize = 0;
+ if (isArray) {
+ // Don't use an unboxed representation if we couldn't determine an
+ // element type for the objects.
+ if (UnboxedTypeSize(elementType) == 0)
+ return true;
+ } else {
+ if (objectCount <= 1) {
+ // If only one of the objects has been created, it is more likely
+ // to have new properties added later. This heuristic is not used
+ // for array objects, where we might want an unboxed representation
+ // even if there is only one large array.
+ return true;
+ }
+
+ for (size_t i = 0; i < templateShape->slotSpan(); i++) {
+ // We can't use an unboxed representation if e.g. all the objects have
+ // a null value for one of the properties, as we can't decide what type
+ // it is supposed to have.
+ if (UnboxedTypeSize(properties[i].type) == 0)
+ return true;
+ }
+
+ // Make sure that all properties on the template shape are property
+ // names, and not indexes.
+ for (Shape::Range<NoGC> r(templateShape); !r.empty(); r.popFront()) {
+ jsid id = r.front().propid();
+ uint32_t dummy;
+ if (!JSID_IS_ATOM(id) || JSID_TO_ATOM(id)->isIndex(&dummy))
+ return true;
+ }
+
+ layoutSize = ComputePlainObjectLayout(cx, templateShape, properties);
+
+ // The entire object must be allocatable inline.
+ if (UnboxedPlainObject::offsetOfData() + layoutSize > JSObject::MAX_BYTE_SIZE)
+ return true;
+ }
+
+ UniquePtr<UnboxedLayout>& layout = enter.unboxedLayoutToCleanUp;
+ MOZ_ASSERT(!layout);
+ layout = group->zone()->make_unique<UnboxedLayout>();
+ if (!layout)
+ return false;
+
+ if (isArray) {
+ layout->initArray(elementType);
+ } else {
+ if (!layout->initProperties(properties, layoutSize))
+ return false;
+
+ // The unboxedLayouts list only tracks layouts for plain objects.
+ cx->compartment()->unboxedLayouts.insertFront(layout.get());
+
+ if (!SetLayoutTraceList(cx, layout.get()))
+ return false;
+ }
+
+ // We've determined that all the preliminary objects can use the new layout
+ // just constructed, so convert the existing group to use the unboxed class,
+ // and update the preliminary objects to use the new layout. Do the
+ // fallible stuff first before modifying any objects.
+
+ // Get an empty shape which we can use for the preliminary objects.
+ const Class* clasp = isArray ? &UnboxedArrayObject::class_ : &UnboxedPlainObject::class_;
+ Shape* newShape = EmptyShape::getInitialShape(cx, clasp, group->proto(), 0);
+ if (!newShape) {
+ cx->recoverFromOutOfMemory();
+ return false;
+ }
+
+ // Accumulate a list of all the values in each preliminary object, and
+ // update their shapes.
+ Rooted<GCVector<Value>> values(cx, GCVector<Value>(cx));
+ for (size_t i = 0; i < PreliminaryObjectArray::COUNT; i++) {
+ JSObject* obj = objects->get(i);
+ if (!obj)
+ continue;
+
+ bool ok;
+ if (isArray)
+ ok = GetValuesFromPreliminaryArrayObject(&obj->as<ArrayObject>(), &values);
+ else
+ ok = GetValuesFromPreliminaryPlainObject(&obj->as<PlainObject>(), &values);
+
+ if (!ok) {
+ cx->recoverFromOutOfMemory();
+ return false;
+ }
+ }
+
+ if (TypeNewScript* newScript = group->newScript())
+ layout->setNewScript(newScript);
+
+ for (size_t i = 0; i < PreliminaryObjectArray::COUNT; i++) {
+ if (JSObject* obj = objects->get(i))
+ obj->as<NativeObject>().setLastPropertyMakeNonNative(newShape);
+ }
+
+ group->setClasp(clasp);
+ group->setUnboxedLayout(layout.release());
+
+ size_t valueCursor = 0;
+ for (size_t i = 0; i < PreliminaryObjectArray::COUNT; i++) {
+ JSObject* obj = objects->get(i);
+ if (!obj)
+ continue;
+
+ if (isArray)
+ obj->as<UnboxedArrayObject>().fillAfterConvert(cx, values, &valueCursor);
+ else
+ obj->as<UnboxedPlainObject>().fillAfterConvert(cx, values, &valueCursor);
+ }
+
+ MOZ_ASSERT(valueCursor == values.length());
+ return true;
+}
+
+DefineBoxedOrUnboxedFunctor6(SetOrExtendBoxedOrUnboxedDenseElements,
+ ExclusiveContext*, JSObject*, uint32_t, const Value*, uint32_t,
+ ShouldUpdateTypes);
+
+DenseElementResult
+js::SetOrExtendAnyBoxedOrUnboxedDenseElements(ExclusiveContext* cx, JSObject* obj,
+ uint32_t start, const Value* vp, uint32_t count,
+ ShouldUpdateTypes updateTypes)
+{
+ SetOrExtendBoxedOrUnboxedDenseElementsFunctor functor(cx, obj, start, vp, count, updateTypes);
+ return CallBoxedOrUnboxedSpecialization(functor, obj);
+};
+
+DefineBoxedOrUnboxedFunctor5(MoveBoxedOrUnboxedDenseElements,
+ JSContext*, JSObject*, uint32_t, uint32_t, uint32_t);
+
+DenseElementResult
+js::MoveAnyBoxedOrUnboxedDenseElements(JSContext* cx, JSObject* obj,
+ uint32_t dstStart, uint32_t srcStart, uint32_t length)
+{
+ MoveBoxedOrUnboxedDenseElementsFunctor functor(cx, obj, dstStart, srcStart, length);
+ return CallBoxedOrUnboxedSpecialization(functor, obj);
+}
+
+DefineBoxedOrUnboxedFunctorPair6(CopyBoxedOrUnboxedDenseElements,
+ JSContext*, JSObject*, JSObject*, uint32_t, uint32_t, uint32_t);
+
+DenseElementResult
+js::CopyAnyBoxedOrUnboxedDenseElements(JSContext* cx, JSObject* dst, JSObject* src,
+ uint32_t dstStart, uint32_t srcStart, uint32_t length)
+{
+ CopyBoxedOrUnboxedDenseElementsFunctor functor(cx, dst, src, dstStart, srcStart, length);
+ return CallBoxedOrUnboxedSpecialization(functor, dst, src);
+}
+
+DefineBoxedOrUnboxedFunctor3(SetBoxedOrUnboxedInitializedLength,
+ JSContext*, JSObject*, size_t);
+
+void
+js::SetAnyBoxedOrUnboxedInitializedLength(JSContext* cx, JSObject* obj, size_t initlen)
+{
+ SetBoxedOrUnboxedInitializedLengthFunctor functor(cx, obj, initlen);
+ JS_ALWAYS_TRUE(CallBoxedOrUnboxedSpecialization(functor, obj) == DenseElementResult::Success);
+}
+
+DefineBoxedOrUnboxedFunctor3(EnsureBoxedOrUnboxedDenseElements,
+ JSContext*, JSObject*, size_t);
+
+DenseElementResult
+js::EnsureAnyBoxedOrUnboxedDenseElements(JSContext* cx, JSObject* obj, size_t initlen)
+{
+ EnsureBoxedOrUnboxedDenseElementsFunctor functor(cx, obj, initlen);
+ return CallBoxedOrUnboxedSpecialization(functor, obj);
+}
diff --git a/js/src/vm/UnboxedObject.h b/js/src/vm/UnboxedObject.h
new file mode 100644
index 0000000000..ecff8be5b1
--- /dev/null
+++ b/js/src/vm/UnboxedObject.h
@@ -0,0 +1,531 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sts=4 et sw=4 tw=99:
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef vm_UnboxedObject_h
+#define vm_UnboxedObject_h
+
+#include "jsgc.h"
+#include "jsobj.h"
+
+#include "vm/Runtime.h"
+#include "vm/TypeInference.h"
+
+namespace js {
+
+// Memory required for an unboxed value of a given type. Returns zero for types
+// which can't be used for unboxed objects.
+static inline size_t
+UnboxedTypeSize(JSValueType type)
+{
+ switch (type) {
+ case JSVAL_TYPE_BOOLEAN: return 1;
+ case JSVAL_TYPE_INT32: return 4;
+ case JSVAL_TYPE_DOUBLE: return 8;
+ case JSVAL_TYPE_STRING: return sizeof(void*);
+ case JSVAL_TYPE_OBJECT: return sizeof(void*);
+ default: return 0;
+ }
+}
+
+static inline bool
+UnboxedTypeNeedsPreBarrier(JSValueType type)
+{
+ return type == JSVAL_TYPE_STRING || type == JSVAL_TYPE_OBJECT;
+}
+
+static inline bool
+UnboxedTypeNeedsPostBarrier(JSValueType type)
+{
+ return type == JSVAL_TYPE_OBJECT;
+}
+
+// Class tracking information specific to unboxed objects.
+class UnboxedLayout : public mozilla::LinkedListElement<UnboxedLayout>
+{
+ public:
+ struct Property {
+ PropertyName* name;
+ uint32_t offset;
+ JSValueType type;
+
+ Property()
+ : name(nullptr), offset(UINT32_MAX), type(JSVAL_TYPE_MAGIC)
+ {}
+ };
+
+ typedef Vector<Property, 0, SystemAllocPolicy> PropertyVector;
+
+ private:
+ // If objects in this group have ever been converted to native objects,
+ // these store the corresponding native group and initial shape for such
+ // objects. Type information for this object is reflected in nativeGroup.
+ GCPtrObjectGroup nativeGroup_;
+ GCPtrShape nativeShape_;
+
+ // Any script/pc which the associated group is created for.
+ GCPtrScript allocationScript_;
+ jsbytecode* allocationPc_;
+
+ // If nativeGroup is set and this object originally had a TypeNewScript or
+ // was keyed to an allocation site, this points to the group which replaced
+ // this one. This link is only needed to keep the replacement group from
+ // being GC'ed. If it were GC'ed and a new one regenerated later, that new
+ // group might have a different allocation kind from this group.
+ GCPtrObjectGroup replacementGroup_;
+
+ // The following members are only used for unboxed plain objects.
+
+ // All properties on objects with this layout, in enumeration order.
+ PropertyVector properties_;
+
+ // Byte size of the data for objects with this layout.
+ size_t size_;
+
+ // Any 'new' script information associated with this layout.
+ TypeNewScript* newScript_;
+
+ // List for use in tracing objects with this layout. This has the same
+ // structure as the trace list on a TypeDescr.
+ int32_t* traceList_;
+
+ // If this layout has been used to construct script or JSON constant
+ // objects, this code might be filled in to more quickly fill in objects
+ // from an array of values.
+ GCPtrJitCode constructorCode_;
+
+ // The following members are only used for unboxed arrays.
+
+ // The type of array elements.
+ JSValueType elementType_;
+
+ public:
+ UnboxedLayout()
+ : nativeGroup_(nullptr), nativeShape_(nullptr),
+ allocationScript_(nullptr), allocationPc_(nullptr), replacementGroup_(nullptr),
+ size_(0), newScript_(nullptr), traceList_(nullptr), constructorCode_(nullptr),
+ elementType_(JSVAL_TYPE_MAGIC)
+ {}
+
+ bool initProperties(const PropertyVector& properties, size_t size) {
+ size_ = size;
+ return properties_.appendAll(properties);
+ }
+
+ void initArray(JSValueType elementType) {
+ elementType_ = elementType;
+ }
+
+ ~UnboxedLayout() {
+ if (newScript_)
+ newScript_->clear();
+ js_delete(newScript_);
+ js_free(traceList_);
+
+ nativeGroup_.init(nullptr);
+ nativeShape_.init(nullptr);
+ replacementGroup_.init(nullptr);
+ constructorCode_.init(nullptr);
+ }
+
+ bool isArray() const {
+ return elementType_ != JSVAL_TYPE_MAGIC;
+ }
+
+ void detachFromCompartment();
+
+ const PropertyVector& properties() const {
+ return properties_;
+ }
+
+ TypeNewScript* newScript() const {
+ return newScript_;
+ }
+
+ void setNewScript(TypeNewScript* newScript, bool writeBarrier = true);
+
+ JSScript* allocationScript() const {
+ return allocationScript_;
+ }
+
+ jsbytecode* allocationPc() const {
+ return allocationPc_;
+ }
+
+ void setAllocationSite(JSScript* script, jsbytecode* pc) {
+ allocationScript_ = script;
+ allocationPc_ = pc;
+ }
+
+ const int32_t* traceList() const {
+ return traceList_;
+ }
+
+ void setTraceList(int32_t* traceList) {
+ traceList_ = traceList;
+ }
+
+ const Property* lookup(JSAtom* atom) const {
+ for (size_t i = 0; i < properties_.length(); i++) {
+ if (properties_[i].name == atom)
+ return &properties_[i];
+ }
+ return nullptr;
+ }
+
+ const Property* lookup(jsid id) const {
+ if (JSID_IS_STRING(id))
+ return lookup(JSID_TO_ATOM(id));
+ return nullptr;
+ }
+
+ size_t size() const {
+ return size_;
+ }
+
+ ObjectGroup* nativeGroup() const {
+ return nativeGroup_;
+ }
+
+ Shape* nativeShape() const {
+ return nativeShape_;
+ }
+
+ jit::JitCode* constructorCode() const {
+ return constructorCode_;
+ }
+
+ void setConstructorCode(jit::JitCode* code) {
+ constructorCode_ = code;
+ }
+
+ JSValueType elementType() const {
+ return elementType_;
+ }
+
+ inline gc::AllocKind getAllocKind() const;
+
+ void trace(JSTracer* trc);
+
+ size_t sizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf);
+
+ static bool makeNativeGroup(JSContext* cx, ObjectGroup* group);
+ static bool makeConstructorCode(JSContext* cx, HandleObjectGroup group);
+};
+
+// Class for expando objects holding extra properties given to an unboxed plain
+// object. These objects behave identically to normal native plain objects, and
+// have a separate Class to distinguish them for memory usage reporting.
+class UnboxedExpandoObject : public NativeObject
+{
+ public:
+ static const Class class_;
+};
+
+// Class for a plain object using an unboxed representation. The physical
+// layout of these objects is identical to that of an InlineTypedObject, though
+// these objects use an UnboxedLayout instead of a TypeDescr to keep track of
+// how their properties are stored.
+class UnboxedPlainObject : public JSObject
+{
+ // Optional object which stores extra properties on this object. This is
+ // not automatically barriered to avoid problems if the object is converted
+ // to a native. See ensureExpando().
+ UnboxedExpandoObject* expando_;
+
+ // Start of the inline data, which immediately follows the group and extra properties.
+ uint8_t data_[1];
+
+ public:
+ static const Class class_;
+
+ static bool obj_lookupProperty(JSContext* cx, HandleObject obj,
+ HandleId id, MutableHandleObject objp,
+ MutableHandleShape propp);
+
+ static bool obj_defineProperty(JSContext* cx, HandleObject obj, HandleId id,
+ Handle<PropertyDescriptor> desc,
+ ObjectOpResult& result);
+
+ static bool obj_hasProperty(JSContext* cx, HandleObject obj, HandleId id, bool* foundp);
+
+ static bool obj_getProperty(JSContext* cx, HandleObject obj, HandleValue receiver,
+ HandleId id, MutableHandleValue vp);
+
+ static bool obj_setProperty(JSContext* cx, HandleObject obj, HandleId id, HandleValue v,
+ HandleValue receiver, ObjectOpResult& result);
+
+ static bool obj_getOwnPropertyDescriptor(JSContext* cx, HandleObject obj, HandleId id,
+ MutableHandle<PropertyDescriptor> desc);
+
+ static bool obj_deleteProperty(JSContext* cx, HandleObject obj, HandleId id,
+ ObjectOpResult& result);
+
+ static bool obj_enumerate(JSContext* cx, HandleObject obj, AutoIdVector& properties,
+ bool enumerableOnly);
+ static bool obj_watch(JSContext* cx, HandleObject obj, HandleId id, HandleObject callable);
+
+ inline const UnboxedLayout& layout() const;
+
+ const UnboxedLayout& layoutDontCheckGeneration() const {
+ return group()->unboxedLayoutDontCheckGeneration();
+ }
+
+ uint8_t* data() {
+ return &data_[0];
+ }
+
+ UnboxedExpandoObject* maybeExpando() const {
+ return expando_;
+ }
+
+ void initExpando() {
+ expando_ = nullptr;
+ }
+
+ // For use during GC.
+ JSObject** addressOfExpando() {
+ return reinterpret_cast<JSObject**>(&expando_);
+ }
+
+ bool containsUnboxedOrExpandoProperty(ExclusiveContext* cx, jsid id) const;
+
+ static UnboxedExpandoObject* ensureExpando(JSContext* cx, Handle<UnboxedPlainObject*> obj);
+
+ bool setValue(ExclusiveContext* cx, const UnboxedLayout::Property& property, const Value& v);
+ Value getValue(const UnboxedLayout::Property& property, bool maybeUninitialized = false);
+
+ static bool convertToNative(JSContext* cx, JSObject* obj);
+ static UnboxedPlainObject* create(ExclusiveContext* cx, HandleObjectGroup group,
+ NewObjectKind newKind);
+ static JSObject* createWithProperties(ExclusiveContext* cx, HandleObjectGroup group,
+ NewObjectKind newKind, IdValuePair* properties);
+
+ void fillAfterConvert(ExclusiveContext* cx,
+ Handle<GCVector<Value>> values, size_t* valueCursor);
+
+ static void trace(JSTracer* trc, JSObject* object);
+
+ static size_t offsetOfExpando() {
+ return offsetof(UnboxedPlainObject, expando_);
+ }
+
+ static size_t offsetOfData() {
+ return offsetof(UnboxedPlainObject, data_[0]);
+ }
+};
+
+// Try to construct an UnboxedLayout for each of the preliminary objects,
+// provided they all match the template shape. If successful, converts the
+// preliminary objects and their group to the new unboxed representation.
+bool
+TryConvertToUnboxedLayout(ExclusiveContext* cx, AutoEnterAnalysis& enter, Shape* templateShape,
+ ObjectGroup* group, PreliminaryObjectArray* objects);
+
+inline gc::AllocKind
+UnboxedLayout::getAllocKind() const
+{
+ MOZ_ASSERT(size());
+ return gc::GetGCObjectKindForBytes(UnboxedPlainObject::offsetOfData() + size());
+}
+
+// Class for an array object using an unboxed representation.
+class UnboxedArrayObject : public JSObject
+{
+ // Elements pointer for the object.
+ uint8_t* elements_;
+
+ // The nominal array length. This always fits in an int32_t.
+ uint32_t length_;
+
+ // Value indicating the allocated capacity and initialized length of the
+ // array. The top CapacityBits bits are an index into CapacityArray, which
+ // indicates the elements capacity. The low InitializedLengthBits store the
+ // initialized length of the array.
+ uint32_t capacityIndexAndInitializedLength_;
+
+ // If the elements are inline, they will point here.
+ uint8_t inlineElements_[1];
+
+ public:
+ static const uint32_t CapacityBits = 6;
+ static const uint32_t CapacityShift = 26;
+
+ static const uint32_t CapacityMask = uint32_t(-1) << CapacityShift;
+ static const uint32_t InitializedLengthMask = (1 << CapacityShift) - 1;
+
+ static const uint32_t MaximumCapacity = InitializedLengthMask;
+ static const uint32_t MinimumDynamicCapacity = 8;
+
+ static const uint32_t CapacityArray[];
+
+ // Capacity index which indicates the array's length is also its capacity.
+ static const uint32_t CapacityMatchesLengthIndex = 0;
+
+ private:
+ static inline uint32_t computeCapacity(uint32_t index, uint32_t length) {
+ if (index == CapacityMatchesLengthIndex)
+ return length;
+ return CapacityArray[index];
+ }
+
+ static uint32_t chooseCapacityIndex(uint32_t capacity, uint32_t length);
+ static uint32_t exactCapacityIndex(uint32_t capacity);
+
+ public:
+ static const Class class_;
+
+ static bool obj_lookupProperty(JSContext* cx, HandleObject obj,
+ HandleId id, MutableHandleObject objp,
+ MutableHandleShape propp);
+
+ static bool obj_defineProperty(JSContext* cx, HandleObject obj, HandleId id,
+ Handle<PropertyDescriptor> desc,
+ ObjectOpResult& result);
+
+ static bool obj_hasProperty(JSContext* cx, HandleObject obj, HandleId id, bool* foundp);
+
+ static bool obj_getProperty(JSContext* cx, HandleObject obj, HandleValue receiver,
+ HandleId id, MutableHandleValue vp);
+
+ static bool obj_setProperty(JSContext* cx, HandleObject obj, HandleId id, HandleValue v,
+ HandleValue receiver, ObjectOpResult& result);
+
+ static bool obj_getOwnPropertyDescriptor(JSContext* cx, HandleObject obj, HandleId id,
+ MutableHandle<PropertyDescriptor> desc);
+
+ static bool obj_deleteProperty(JSContext* cx, HandleObject obj, HandleId id,
+ ObjectOpResult& result);
+
+ static bool obj_enumerate(JSContext* cx, HandleObject obj, AutoIdVector& properties,
+ bool enumerableOnly);
+ static bool obj_watch(JSContext* cx, HandleObject obj, HandleId id, HandleObject callable);
+
+ inline const UnboxedLayout& layout() const;
+
+ const UnboxedLayout& layoutDontCheckGeneration() const {
+ return group()->unboxedLayoutDontCheckGeneration();
+ }
+
+ JSValueType elementType() const {
+ return layoutDontCheckGeneration().elementType();
+ }
+
+ uint32_t elementSize() const {
+ return UnboxedTypeSize(elementType());
+ }
+
+ static bool convertToNative(JSContext* cx, JSObject* obj);
+ static UnboxedArrayObject* create(ExclusiveContext* cx, HandleObjectGroup group,
+ uint32_t length, NewObjectKind newKind,
+ uint32_t maxLength = MaximumCapacity);
+
+ static bool convertToNativeWithGroup(ExclusiveContext* cx, JSObject* obj,
+ ObjectGroup* group, Shape* shape);
+ bool convertInt32ToDouble(ExclusiveContext* cx, ObjectGroup* group);
+
+ void fillAfterConvert(ExclusiveContext* cx,
+ Handle<GCVector<Value>> values, size_t* valueCursor);
+
+ static void trace(JSTracer* trc, JSObject* object);
+ static void objectMoved(JSObject* obj, const JSObject* old);
+ static void finalize(FreeOp* fop, JSObject* obj);
+
+ static size_t objectMovedDuringMinorGC(JSTracer* trc, JSObject* dst, JSObject* src,
+ gc::AllocKind allocKind);
+
+ uint8_t* elements() {
+ return elements_;
+ }
+
+ bool hasInlineElements() const {
+ return elements_ == &inlineElements_[0];
+ }
+
+ uint32_t length() const {
+ return length_;
+ }
+
+ uint32_t initializedLength() const {
+ return capacityIndexAndInitializedLength_ & InitializedLengthMask;
+ }
+
+ uint32_t capacityIndex() const {
+ return (capacityIndexAndInitializedLength_ & CapacityMask) >> CapacityShift;
+ }
+
+ uint32_t capacity() const {
+ return computeCapacity(capacityIndex(), length());
+ }
+
+ bool containsProperty(ExclusiveContext* cx, jsid id);
+
+ bool setElement(ExclusiveContext* cx, size_t index, const Value& v);
+ bool initElement(ExclusiveContext* cx, size_t index, const Value& v);
+ void initElementNoTypeChange(size_t index, const Value& v);
+ Value getElement(size_t index);
+
+ template <JSValueType Type> inline bool setElementSpecific(ExclusiveContext* cx, size_t index,
+ const Value& v);
+ template <JSValueType Type> inline void setElementNoTypeChangeSpecific(size_t index, const Value& v);
+ template <JSValueType Type> inline bool initElementSpecific(ExclusiveContext* cx, size_t index,
+ const Value& v);
+ template <JSValueType Type> inline void initElementNoTypeChangeSpecific(size_t index, const Value& v);
+ template <JSValueType Type> inline Value getElementSpecific(size_t index);
+ template <JSValueType Type> inline void triggerPreBarrier(size_t index);
+
+ bool growElements(ExclusiveContext* cx, size_t cap);
+ void shrinkElements(ExclusiveContext* cx, size_t cap);
+
+ static uint32_t offsetOfElements() {
+ return offsetof(UnboxedArrayObject, elements_);
+ }
+ static uint32_t offsetOfLength() {
+ return offsetof(UnboxedArrayObject, length_);
+ }
+ static uint32_t offsetOfCapacityIndexAndInitializedLength() {
+ return offsetof(UnboxedArrayObject, capacityIndexAndInitializedLength_);
+ }
+ static uint32_t offsetOfInlineElements() {
+ return offsetof(UnboxedArrayObject, inlineElements_);
+ }
+
+ void setLengthInt32(uint32_t length) {
+ MOZ_ASSERT(length <= INT32_MAX);
+ length_ = length;
+ }
+
+ inline void setLength(ExclusiveContext* cx, uint32_t len);
+ inline void setInitializedLength(uint32_t initlen);
+
+ inline void setInitializedLengthNoBarrier(uint32_t initlen) {
+ MOZ_ASSERT(initlen <= InitializedLengthMask);
+ capacityIndexAndInitializedLength_ =
+ (capacityIndexAndInitializedLength_ & CapacityMask) | initlen;
+ }
+
+ private:
+ void setInlineElements() {
+ elements_ = &inlineElements_[0];
+ }
+
+ void setCapacityIndex(uint32_t index) {
+ MOZ_ASSERT(index <= (CapacityMask >> CapacityShift));
+ capacityIndexAndInitializedLength_ =
+ (index << CapacityShift) | initializedLength();
+ }
+};
+
+} // namespace js
+
+namespace JS {
+
+template <>
+struct DeletePolicy<js::UnboxedLayout> : public js::GCManagedDeletePolicy<js::UnboxedLayout>
+{};
+
+} /* namespace JS */
+
+#endif /* vm_UnboxedObject_h */
diff --git a/js/xpconnect/src/XPCJSContext.cpp b/js/xpconnect/src/XPCJSContext.cpp
index 0243d80e36..bde949a960 100644
--- a/js/xpconnect/src/XPCJSContext.cpp
+++ b/js/xpconnect/src/XPCJSContext.cpp
@@ -1427,6 +1427,8 @@ ReloadPrefsCallback(const char* pref, void* data)
bool extraWarnings = Preferences::GetBool(JS_OPTIONS_DOT_STR "strict");
+ bool unboxedObjects = Preferences::GetBool(JS_OPTIONS_DOT_STR "unboxed_objects");
+
sSharedMemoryEnabled = Preferences::GetBool(JS_OPTIONS_DOT_STR "shared_memory");
#ifdef DEBUG
@@ -1455,6 +1457,8 @@ ReloadPrefsCallback(const char* pref, void* data)
useBaselineEager ? 0 : -1);
JS_SetGlobalJitCompilerOption(cx, JSJITCOMPILER_ION_WARMUP_TRIGGER,
useIonEager ? 0 : -1);
+ JS_SetGlobalJitCompilerOption(cx, JSJITCOMPILER_UNBOXED_OBJECTS,
+ unboxedObjects);
}
XPCJSContext::~XPCJSContext()
diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp
index 8d4ea87540..0d0c7108cc 100644
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -8447,9 +8447,13 @@ UnionBorderBoxes(nsIFrame* aFrame, bool aApplyTransform,
Maybe<nsRect> clipPropClipRect =
aFrame->GetClipPropClipRect(disp, effects, bounds.Size());
- // Iterate over all children except pop-ups.
+ // Iterate over all children except pop-ups, absolutely positioned children,
+ // fixed-positioned children and floats.
const nsIFrame::ChildListIDs skip(nsIFrame::kPopupList |
- nsIFrame::kSelectPopupList);
+ nsIFrame::kSelectPopupList |
+ nsIFrame::kAbsoluteList |
+ nsIFrame::kFixedList |
+ nsIFrame::kFloatList);
for (nsIFrame::ChildListIterator childLists(aFrame);
!childLists.IsDone(); childLists.Next()) {
if (skip.Contains(childLists.CurrentID())) {
@@ -8459,6 +8463,12 @@ UnionBorderBoxes(nsIFrame* aFrame, bool aApplyTransform,
nsFrameList children = childLists.CurrentList();
for (nsFrameList::Enumerator e(children); !e.AtEnd(); e.Next()) {
nsIFrame* child = e.get();
+
+ if (child->GetType() == nsGkAtoms::placeholderFrame) {
+ // Skip placeholders too.
+ continue;
+ }
+
// Note that passing |true| for aApplyTransform when
// child->Combines3DTransformWithAncestors() is incorrect if our
// aApplyTransform is false... but the opposite would be as
diff --git a/layout/generic/nsGridContainerFrame.cpp b/layout/generic/nsGridContainerFrame.cpp
index 959061e334..f771c9d7c5 100644
--- a/layout/generic/nsGridContainerFrame.cpp
+++ b/layout/generic/nsGridContainerFrame.cpp
@@ -4822,14 +4822,14 @@ nsGridContainerFrame::Tracks::StretchFlexibleTracks(
: ri->ComputedMaxISize();
}
Maybe<nsTArray<TrackSize>> origSizes;
+ bool applyMinMax = (minSize != 0 || maxSize != NS_UNCONSTRAINEDSIZE) &&
+ aAvailableSize == NS_UNCONSTRAINEDSIZE;
// We iterate twice at most. The 2nd time if the grid size changed after
// applying a min/max-size (can only occur if aAvailableSize is indefinite).
while (true) {
float fr = FindUsedFlexFraction(aState, aGridItems, flexTracks,
aFunctions, aAvailableSize);
if (fr != 0.0f) {
- bool applyMinMax = (minSize != 0 || maxSize != NS_UNCONSTRAINEDSIZE) &&
- aAvailableSize == NS_UNCONSTRAINEDSIZE;
for (uint32_t i : flexTracks) {
float flexFactor = aFunctions.MaxSizingFor(i).GetFlexFractionValue();
nscoord flexLength = NSToCoordRound(flexFactor * fr);
@@ -4841,36 +4841,36 @@ nsGridContainerFrame::Tracks::StretchFlexibleTracks(
base = flexLength;
}
}
- if (applyMinMax && origSizes.isSome()) {
- // https://drafts.csswg.org/css-grid/#algo-flex-tracks
- // "If using this flex fraction would cause the grid to be smaller than
- // the grid container’s min-width/height (or larger than the grid
- // container’s max-width/height), then redo this step, treating the free
- // space as definite [...]"
- nscoord newSize = 0;
- for (auto& sz : mSizes) {
- newSize += sz.mBase;
- }
- const auto sumOfGridGaps = SumOfGridGaps();
- newSize += sumOfGridGaps;
- if (newSize > maxSize) {
- aAvailableSize = maxSize;
- } else if (newSize < minSize) {
- aAvailableSize = minSize;
- }
- if (aAvailableSize != NS_UNCONSTRAINEDSIZE) {
- // Reset min/max-size to ensure 'applyMinMax' becomes false next time.
- minSize = 0;
- maxSize = NS_UNCONSTRAINEDSIZE;
- aAvailableSize = std::max(0, aAvailableSize - sumOfGridGaps);
- // Restart with the original track sizes and definite aAvailableSize.
+ }
+ if (applyMinMax) {
+ applyMinMax = false;
+ // https://drafts.csswg.org/css-grid/#algo-flex-tracks
+ // "If using this flex fraction would cause the grid to be smaller than
+ // the grid container’s min-width/height (or larger than the grid
+ // container’s max-width/height), then redo this step, treating the free
+ // space as definite [...]"
+ nscoord newSize = 0;
+ for (auto& sz : mSizes) {
+ newSize += sz.mBase;
+ }
+ const auto sumOfGridGaps = SumOfGridGaps();
+ newSize += sumOfGridGaps;
+ if (newSize > maxSize) {
+ aAvailableSize = maxSize;
+ } else if (newSize < minSize) {
+ aAvailableSize = minSize;
+ }
+ if (aAvailableSize != NS_UNCONSTRAINEDSIZE) {
+ aAvailableSize = std::max(0, aAvailableSize - sumOfGridGaps);
+ // Restart with the original track sizes and definite aAvailableSize.
+ if (origSizes.isSome()) {
mSizes = Move(*origSizes);
origSizes.reset();
- if (aAvailableSize == 0) {
- break; // zero available size wouldn't change any sizes though...
- }
- continue;
+ } // else, no mSizes[].mBase were changed above so it's still correct
+ if (aAvailableSize == 0) {
+ break; // zero available size wouldn't change any sizes though...
}
+ continue;
}
}
break;
diff --git a/layout/reftests/css-grid/grid-max-sizing-flex-007-ref.html b/layout/reftests/css-grid/grid-max-sizing-flex-007-ref.html
index c5392d32cd..b17a1cc02e 100644
--- a/layout/reftests/css-grid/grid-max-sizing-flex-007-ref.html
+++ b/layout/reftests/css-grid/grid-max-sizing-flex-007-ref.html
@@ -107,4 +107,28 @@
<div class="item"></div>
</div>
+<pre>The first 6 grids should look the same:</pre>
+<div class="grid rows" style="grid: 1fr / 30px; height:83px">
+ <div class="item"></div>
+</div>
+<div class="grid rows" style="grid: 10px 1fr / 30px; height:83px">
+ <div class="item" style="grid-row:span 2"></div>
+</div>
+<div class="grid rows" style="grid: 1fr / 30px; height:83px">
+ <div class="item"></div>
+</div>
+<div class="grid rows" style="grid: 1fr 1fr / 30px; height:83px">
+ <div class="item" style="grid-row:span 2"><div style="height:90px"></div></div>
+</div>
+<div class="grid rows" style="grid: 1fr auto / 30px; height:83px">
+ <div class="item" style="grid-row:span 2"><div style="height:90px"></div></div>
+</div>
+<div class="grid rows" style="grid: 10px 1fr / 30px; height:83px">
+ <div class="item" style="grid-row:span 2"><div style="height:90px"></div></div>
+</div>
+<div class="grid rows" style="grid: 1fr 1fr / 30px; grid-row-gap:10px; height:83px">
+ <div class="item" style="grid-row:span 2"><div style="height:40px"></div></div>
+ <div class="item"><div style="height:40px"></div></div>
+</div>
+
</body></html>
diff --git a/layout/reftests/css-grid/grid-max-sizing-flex-007.html b/layout/reftests/css-grid/grid-max-sizing-flex-007.html
index ac9dcc77c4..a2f39e95be 100644
--- a/layout/reftests/css-grid/grid-max-sizing-flex-007.html
+++ b/layout/reftests/css-grid/grid-max-sizing-flex-007.html
@@ -105,4 +105,28 @@
<div class="item"></div>
</div>
+<pre>The first 6 grids should look the same:</pre>
+<div class="grid rows" style="grid: 1fr / 30px; min-height:83px">
+ <div class="item"></div>
+</div>
+<div class="grid rows" style="grid: 10px 1fr / 30px; min-height:83px">
+ <div class="item" style="grid-row:span 2"></div>
+</div>
+<div class="grid rows" style="grid: 1fr / 30px; max-height:30px; min-height:83px">
+ <div class="item"></div>
+</div>
+<div class="grid rows" style="grid: 1fr 1fr / 30px; max-height:83px">
+ <div class="item" style="grid-row:span 2"><div style="height:90px"></div></div>
+</div>
+<div class="grid rows" style="grid: 1fr auto / 30px; max-height:83px">
+ <div class="item" style="grid-row:span 2"><div style="height:90px"></div></div>
+</div>
+<div class="grid rows" style="grid: 10px 1fr / 30px; max-height:83px">
+ <div class="item" style="grid-row:span 2"><div style="height:90px"></div></div>
+</div>
+<div class="grid rows" style="grid: 1fr 1fr / 30px; grid-row-gap:10px; max-height:83px">
+ <div class="item" style="grid-row:span 2"><div style="height:40px"></div></div>
+ <div class="item"><div style="height:40px"></div></div>
+</div>
+
</body></html>
diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp
index 4257c9c579..e5a48139a0 100644
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -1268,6 +1268,74 @@ PaintRowGroupBackgroundByColIdx(nsTableRowGroupFrame* aRowGroup,
}
}
+static inline bool FrameHasBorder(nsIFrame* f)
+{
+ if (!f->StyleVisibility()->IsVisible()) {
+ return false;
+ }
+
+ if (f->StyleBorder()->HasBorder()) {
+ return true;
+ }
+
+ return false;
+}
+
+void nsTableFrame::CalcHasBCBorders()
+{
+ if (!IsBorderCollapse()) {
+ SetHasBCBorders(false);
+ return;
+ }
+
+ if (FrameHasBorder(this)) {
+ SetHasBCBorders(true);
+ return;
+ }
+
+ // Check col and col group has borders.
+ for (nsIFrame* f : this->GetChildList(kColGroupList)) {
+ if (FrameHasBorder(f)) {
+ SetHasBCBorders(true);
+ return;
+ }
+
+ nsTableColGroupFrame *colGroup = static_cast<nsTableColGroupFrame*>(f);
+ for (nsTableColFrame* col = colGroup->GetFirstColumn(); col; col = col->GetNextCol()) {
+ if (FrameHasBorder(col)) {
+ SetHasBCBorders(true);
+ return;
+ }
+ }
+ }
+
+ // check row group, row and cell has borders.
+ RowGroupArray rowGroups;
+ OrderRowGroups(rowGroups);
+ for (nsTableRowGroupFrame* rowGroup : rowGroups) {
+ if (FrameHasBorder(rowGroup)) {
+ SetHasBCBorders(true);
+ return;
+ }
+
+ for (nsTableRowFrame* row = rowGroup->GetFirstRow(); row; row = row->GetNextRow()) {
+ if (FrameHasBorder(row)) {
+ SetHasBCBorders(true);
+ return;
+ }
+
+ for (nsTableCellFrame* cell = row->GetFirstCell(); cell; cell = cell->GetNextCell()) {
+ if (FrameHasBorder(cell)) {
+ SetHasBCBorders(true);
+ return;
+ }
+ }
+ }
+ }
+
+ SetHasBCBorders(false);
+}
+
/* static */ void
nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
nsFrame* aFrame,
@@ -1375,11 +1443,16 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
nsTableFrame* table = static_cast<nsTableFrame*>(aFrame);
// In the collapsed border model, overlay all collapsed borders.
if (table->IsBorderCollapse()) {
- aLists.BorderBackground()->AppendNewToTop(
- new (aBuilder) nsDisplayTableBorderCollapse(aBuilder, table));
+ if (table->HasBCBorders()) {
+ aLists.BorderBackground()->AppendNewToTop(
+ new (aBuilder) nsDisplayTableBorderCollapse(aBuilder, table));
+ }
} else {
- aLists.BorderBackground()->AppendNewToTop(
- new (aBuilder) nsDisplayBorder(aBuilder, table));
+ const nsStyleBorder* borderStyle = aFrame->StyleBorder();
+ if (borderStyle->HasBorder()) {
+ aLists.BorderBackground()->AppendNewToTop(
+ new (aBuilder) nsDisplayBorder(aBuilder, table));
+ }
}
}
}
@@ -4101,6 +4174,7 @@ nsTableFrame::AddBCDamageArea(const TableArea& aValue)
#endif
SetNeedToCalcBCBorders(true);
+ SetNeedToCalcHasBCBorders(true);
// Get the property
BCPropertyData* value = GetOrCreateBCProperty();
if (value) {
@@ -4141,6 +4215,7 @@ nsTableFrame::SetFullBCDamageArea()
NS_ASSERTION(IsBorderCollapse(), "invalid SetFullBCDamageArea call");
SetNeedToCalcBCBorders(true);
+ SetNeedToCalcHasBCBorders(true);
BCPropertyData* value = GetOrCreateBCProperty();
if (value) {
diff --git a/layout/tables/nsTableFrame.h b/layout/tables/nsTableFrame.h
index a6b786402d..d739faa72b 100644
--- a/layout/tables/nsTableFrame.h
+++ b/layout/tables/nsTableFrame.h
@@ -761,6 +761,13 @@ public:
bool NeedToCollapse() const;
void SetNeedToCollapse(bool aValue);
+ bool NeedToCalcHasBCBorders() const;
+ void SetNeedToCalcHasBCBorders(bool aValue);
+
+ void CalcHasBCBorders();
+ bool HasBCBorders();
+ void SetHasBCBorders(bool aValue);
+
/** The GeometryDirty bit is similar to the NS_FRAME_IS_DIRTY frame
* state bit, which implies that all descendants are dirty. The
* GeometryDirty still implies that all the parts of the table are
@@ -870,6 +877,8 @@ protected:
uint32_t mIStartContBCBorder:8;
uint32_t mNeedToCollapse:1; // rows, cols that have visibility:collapse need to be collapsed
uint32_t mResizedColumns:1; // have we resized columns since last reflow?
+ uint32_t mNeedToCalcHasBCBorders:1;
+ uint32_t mHasBCBorders:1;
} mBits;
nsTableCellMap* mCellMap; // maintains the relationships between rows, cols, and cells
@@ -965,6 +974,30 @@ inline void nsTableFrame::SetNeedToCalcBCBorders(bool aValue)
mBits.mNeedToCalcBCBorders = (unsigned)aValue;
}
+inline bool nsTableFrame::NeedToCalcHasBCBorders() const
+{
+ return (bool)mBits.mNeedToCalcHasBCBorders;
+}
+
+inline void nsTableFrame::SetNeedToCalcHasBCBorders(bool aValue)
+{
+ mBits.mNeedToCalcHasBCBorders = (unsigned)aValue;
+}
+
+inline bool nsTableFrame::HasBCBorders()
+{
+ if (NeedToCalcHasBCBorders()) {
+ CalcHasBCBorders();
+ SetNeedToCalcHasBCBorders(false);
+ }
+ return (bool)mBits.mHasBCBorders;
+}
+
+inline void nsTableFrame::SetHasBCBorders(bool aValue)
+{
+ mBits.mHasBCBorders = (unsigned)aValue;
+}
+
inline nscoord
nsTableFrame::GetContinuousIStartBCBorderWidth() const
{
diff --git a/mailnews/base/src/moz.build b/mailnews/base/src/moz.build
index 69090b3b39..034d2e9bbf 100644
--- a/mailnews/base/src/moz.build
+++ b/mailnews/base/src/moz.build
@@ -75,7 +75,7 @@ if CONFIG['MOZ_MAILNEWS_OAUTH2']:
EXTRA_COMPONENTS += ['msgOAuth2Module.js']
EXTRA_PP_COMPONENTS += [
- 'msgBase.manifest'
+ 'msgBase.manifest',
'nsMailNewsCommandLineHandler.js',
]
diff --git a/mailnews/mailnews.mozbuild b/mailnews/mailnews.mozbuild
deleted file mode 100644
index 12ae6cd2e4..0000000000
--- a/mailnews/mailnews.mozbuild
+++ /dev/null
@@ -1,16 +0,0 @@
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-if CONFIG['MOZ_LDAP_XPCOM']:
- DIRS += [
- '/ldap',
- '/ldap/xpcom',
- ]
-
-if CONFIG['MOZ_MORK']:
- DIRS += ['/db']
-
-DIRS += ['/mailnews']
-
diff --git a/media/mtransport/nr_socket_prsock.cpp b/media/mtransport/nr_socket_prsock.cpp
index f22229df86..a95ef10292 100644
--- a/media/mtransport/nr_socket_prsock.cpp
+++ b/media/mtransport/nr_socket_prsock.cpp
@@ -760,15 +760,7 @@ static int ShouldDrop(size_t len) {
nr_socket_short_term_violation_time = TimeStamp::Now();
#endif
-// Bug 1013007
-#if !EARLY_BETA_OR_EARLIER
return R_WOULDBLOCK;
-#else
- MOZ_ASSERT(false,
- "Short term global rate limit for STUN requests exceeded. Go "
- "bug bcampen@mozilla.com if you weren't intentionally "
- "spamming ICE candidates, or don't know what that means.");
-#endif
}
if (sustained.getTokens(UINT32_MAX) < len) {
@@ -777,15 +769,8 @@ static int ShouldDrop(size_t len) {
#ifdef MOZILLA_INTERNAL_API
nr_socket_long_term_violation_time = TimeStamp::Now();
#endif
-// Bug 1013007
-#if !EARLY_BETA_OR_EARLIER
+
return R_WOULDBLOCK;
-#else
- MOZ_ASSERT(false,
- "Long term global rate limit for STUN requests exceeded. Go "
- "bug bcampen@mozilla.com if you weren't intentionally "
- "spamming ICE candidates, or don't know what that means.");
-#endif
}
// Take len tokens from both buckets.
diff --git a/media/webrtc/trunk/build/build_config.h b/media/webrtc/trunk/build/build_config.h
index 55ed38c2c4..8966586a7a 100644
--- a/media/webrtc/trunk/build/build_config.h
+++ b/media/webrtc/trunk/build/build_config.h
@@ -129,7 +129,7 @@
#define ARCH_CPU_PPC 1
#define ARCH_CPU_32_BITS 1
#define ARCH_CPU_BIG_ENDIAN 1
-#elif defined(__sparc64__)
+#elif defined(__sparc__) && defined(__arch64__)
#define ARCH_CPU_SPARC_FAMILY 1
#define ARCH_CPU_SPARC 1
#define ARCH_CPU_64_BITS 1
diff --git a/media/webrtc/trunk/webrtc/typedefs.h b/media/webrtc/trunk/webrtc/typedefs.h
index 99ea82a994..fa669b8864 100644
--- a/media/webrtc/trunk/webrtc/typedefs.h
+++ b/media/webrtc/trunk/webrtc/typedefs.h
@@ -61,7 +61,7 @@
#define WEBRTC_ARCH_BIG_ENDIAN
#define WEBRTC_BIG_ENDIAN
#endif
-#elif defined(__sparc64__)
+#elif defined(__sparc__) && defined(__arch64__)
#define WEBRTC_ARCH_SPARC 1
#define WEBRTC_ARCH_64_BITS 1
#define WEBRTC_ARCH_BIG_ENDIAN
diff --git a/memory/mozjemalloc/jemalloc.c b/memory/mozjemalloc/jemalloc.c
index 50ba228893..47a5a9f5c2 100644
--- a/memory/mozjemalloc/jemalloc.c
+++ b/memory/mozjemalloc/jemalloc.c
@@ -1966,7 +1966,7 @@ static void *
pages_map(void *addr, size_t size)
{
void *ret;
-#if defined(__ia64__)
+#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__))
/*
* The JS engine assumes that all allocated pointers have their high 17 bits clear,
* which ia64's mmap doesn't support directly. However, we can emulate it by passing
@@ -1987,6 +1987,28 @@ pages_map(void *addr, size_t size)
}
#endif
+#if defined(__sparc__) && defined(__arch64__) && defined(__linux__)
+ const uintptr_t start = 0x0000070000000000ULL;
+ const uintptr_t end = 0x0000800000000000ULL;
+
+ /* Copied from js/src/gc/Memory.cpp and adapted for this source */
+
+ uintptr_t hint;
+ void* region = MAP_FAILED;
+ for (hint = start; region == MAP_FAILED && hint + size <= end; hint += chunksize) {
+ region = mmap((void*)hint, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
+ if (region != MAP_FAILED) {
+ if (((size_t) region + (size - 1)) & 0xffff800000000000) {
+ if (munmap(region, size)) {
+ MOZ_ASSERT(errno == ENOMEM);
+ }
+ region = MAP_FAILED;
+ }
+ }
+ }
+ ret = region;
+#else
+
/*
* We don't use MAP_FIXED here, because it can cause the *replacement*
* of existing mappings, and we only want to create new mappings.
@@ -1995,10 +2017,11 @@ pages_map(void *addr, size_t size)
MAP_PRIVATE | MAP_ANON, -1, 0);
assert(ret != NULL);
+#endif
if (ret == MAP_FAILED) {
ret = NULL;
}
-#if defined(__ia64__)
+#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__))
/*
* If the allocated memory doesn't have its upper 17 bits clear, consider it
* as out of memory.
@@ -2031,7 +2054,7 @@ pages_map(void *addr, size_t size)
MozTagAnonymousMemory(ret, size, "jemalloc");
}
-#if defined(__ia64__)
+#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__))
assert(ret == NULL || (!check_placement && ret != NULL)
|| (check_placement && ret == addr));
#else
diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
index 6aa0111ef3..2e21c307d8 100644
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -1260,6 +1260,7 @@ pref("javascript.options.strict", false);
#ifdef DEBUG
pref("javascript.options.strict.debug", false);
#endif
+pref("javascript.options.unboxed_objects", false);
pref("javascript.options.baselinejit", true);
pref("javascript.options.ion", true);
pref("javascript.options.asmjs", true);
@@ -2036,8 +2037,6 @@ pref("network.proxy.autoconfig_retry_interval_max", 300); // 5 minutes
// Master switch for HSTS usage (security <-> privacy tradeoff)
pref("network.stricttransportsecurity.enabled", true);
-// Use the HSTS preload list by default
-pref("network.stricttransportsecurity.preloadlist", true);
// Use JS mDNS as a fallback
pref("network.mdns.use_js_fallback", false);
diff --git a/netwerk/base/nsIOService.cpp b/netwerk/base/nsIOService.cpp
index bd9a4a96f4..314f2aeffd 100644
--- a/netwerk/base/nsIOService.cpp
+++ b/netwerk/base/nsIOService.cpp
@@ -79,6 +79,7 @@ namespace net {
nsIOService* gIOService = nullptr;
static bool gHasWarnedUploadChannel2;
+static bool gCaptivePortalEnabled = false;
static LazyLogModule gIOServiceLog("nsIOService");
#undef LOG
#define LOG(args) MOZ_LOG(gIOServiceLog, LogLevel::Debug, args)
@@ -1142,7 +1143,7 @@ nsIOService::SetConnectivityInternal(bool aConnectivity)
mConnectivity = aConnectivity;
if (mCaptivePortalService) {
- if (aConnectivity && !xpc::AreNonLocalConnectionsDisabled()) {
+ if (aConnectivity && !xpc::AreNonLocalConnectionsDisabled() && gCaptivePortalEnabled) {
// This will also trigger a captive portal check for the new network
static_cast<CaptivePortalService*>(mCaptivePortalService.get())->Start();
} else {
@@ -1285,10 +1286,9 @@ nsIOService::PrefsChanged(nsIPrefBranch *prefs, const char *pref)
}
if (!pref || strcmp(pref, NETWORK_CAPTIVE_PORTAL_PREF) == 0) {
- bool captivePortalEnabled;
- nsresult rv = prefs->GetBoolPref(NETWORK_CAPTIVE_PORTAL_PREF, &captivePortalEnabled);
+ nsresult rv = prefs->GetBoolPref(NETWORK_CAPTIVE_PORTAL_PREF, &gCaptivePortalEnabled);
if (NS_SUCCEEDED(rv) && mCaptivePortalService) {
- if (captivePortalEnabled && !xpc::AreNonLocalConnectionsDisabled()) {
+ if (gCaptivePortalEnabled && !xpc::AreNonLocalConnectionsDisabled()) {
static_cast<CaptivePortalService*>(mCaptivePortalService.get())->Start();
} else {
static_cast<CaptivePortalService*>(mCaptivePortalService.get())->Stop();
diff --git a/netwerk/base/security-prefs.js b/netwerk/base/security-prefs.js
index 26a066ceee..0ac52621af 100644
--- a/netwerk/base/security-prefs.js
+++ b/netwerk/base/security-prefs.js
@@ -124,27 +124,6 @@ pref("security.webauth.u2f_enable_usbtoken", false);
// OCSP must-staple
pref("security.ssl.enable_ocsp_must_staple", true);
-// HPKP settings
-
-// Enable pinning checks by default.
-pref("security.cert_pinning.enforcement_level", 2);
-// Do not process hpkp headers rooted by not built in roots by default.
-// This is to prevent accidental pinning from MITM devices and is used
-// for tests.
-pref("security.cert_pinning.process_headers_from_non_builtin_roots", false);
-// Impose a maximum age on HPKP headers, to avoid sites getting permanently
-// blacking themselves out by setting a bad pin. (60 days by default)
-// https://tools.ietf.org/html/rfc7469#section-4.1
-pref("security.cert_pinning.max_max_age_seconds", 5184000);
-// Controls whether or not HPKP (the HTTP Public Key Pinning header) is enabled.
-// If true, the header is processed and collected HPKP information is consulted
-// when looking for pinning information.
-// If false, the header is not processed and collected HPKP information is not
-// consulted when looking for pinning information. Preloaded pins are not
-// affected by this preference.
-// Default: false
-pref("security.cert_pinning.hpkp.enabled", false);
-
// If a request is mixed-content, send an HSTS priming request to attempt to
// see if it is available over HTTPS.
pref("security.mixed_content.send_hsts_priming", true);
diff --git a/netwerk/protocol/http/UserAgentOverrides.jsm b/netwerk/protocol/http/UserAgentOverrides.jsm
index 037aa575b2..e106f817ad 100644
--- a/netwerk/protocol/http/UserAgentOverrides.jsm
+++ b/netwerk/protocol/http/UserAgentOverrides.jsm
@@ -2,6 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+#ifdef XP_WIN
+#define UA_SPARE_PLATFORM
+#endif
+
"use strict";
this.EXPORTED_SYMBOLS = [ "UserAgentOverrides" ];
@@ -18,6 +22,14 @@ const PREF_OVERRIDES_ENABLED = "general.useragent.site_specific_overrides";
const DEFAULT_UA = Cc["@mozilla.org/network/protocol;1?name=http"]
.getService(Ci.nsIHttpProtocolHandler)
.userAgent;
+const OSCPU = Cc["@mozilla.org/network/protocol;1?name=http"]
+ .getService(Ci.nsIHttpProtocolHandler)
+ .oscpu;
+#ifndef UA_SPARE_PLATFORM
+const PLATFORM = Cc["@mozilla.org/network/protocol;1?name=http"]
+ .getService(Ci.nsIHttpProtocolHandler)
+ .platform;
+#endif
const MAX_OVERRIDE_FOR_HOST_CACHE_SIZE = 250;
XPCOMUtils.defineLazyServiceGetter(this, "ppmm",
@@ -27,18 +39,27 @@ XPCOMUtils.defineLazyServiceGetter(this, "ppmm",
var gPrefBranch;
var gOverrides = new Map;
var gUpdatedOverrides;
+var gOldDynOverrides;
var gOverrideForHostCache = new Map;
var gInitialized = false;
var gOverrideFunctions = [
function (aHttpChannel) { return UserAgentOverrides.getOverrideForURI(aHttpChannel.URI); }
];
var gBuiltUAs = new Map;
+var gOSSlice;
this.UserAgentOverrides = {
init: function uao_init() {
if (gInitialized)
return;
+ gOSSlice = OSCPU + ";";
+#ifndef UA_SPARE_PLATFORM
+ if (PLATFORM != "") {
+ gOSSlice = PLATFORM + "; " + gOSSlice;
+ }
+#endif
+
gPrefBranch = Services.prefs.getBranch("general.useragent.override.");
gPrefBranch.addObserver("", buildOverrides, false);
@@ -52,7 +73,10 @@ this.UserAgentOverrides = {
}
UserAgentUpdates.init(function(overrides) {
- gOverrideForHostCache.clear();
+ if (overrides == gOldDynOverrides) {
+ return;
+ }
+ gOldDynOverrides = overrides;
if (overrides) {
for (let domain in overrides) {
overrides[domain] = getUserAgentFromOverride(overrides[domain]);
@@ -60,6 +84,7 @@ this.UserAgentOverrides = {
overrides.get = function(key) { return this[key]; };
}
gUpdatedOverrides = overrides;
+ buildOverrides();
});
buildOverrides();
@@ -143,7 +168,7 @@ function getUserAgentFromOverride(override)
if (search && replace) {
userAgent = DEFAULT_UA.replace(new RegExp(search, "g"), replace);
} else {
- userAgent = override;
+ userAgent = override.replace(/%OS_SLICE%/g, gOSSlice);
}
gBuiltUAs.set(override, userAgent);
return userAgent;
@@ -156,15 +181,22 @@ function buildOverrides() {
if (!Services.prefs.getBoolPref(PREF_OVERRIDES_ENABLED))
return;
- let builtUAs = new Map;
let domains = gPrefBranch.getChildList("");
+ // Since the static override map has the highest priority, we build it so
+ // that it includes only domains with user-set overrides and domains with
+ // default pre-set overrides that are not overridden by dynamic updates.
for (let domain of domains) {
- let override = gPrefBranch.getCharPref(domain);
- let userAgent = getUserAgentFromOverride(override);
-
- if (userAgent != DEFAULT_UA) {
- gOverrides.set(domain, userAgent);
+ if (!(gUpdatedOverrides && gUpdatedOverrides.get(domain)) ||
+ gPrefBranch.prefHasUserValue(domain)) {
+ // Here we selected domains that are not dynamically overridden
+ // or have a user-set override.
+ let override = gPrefBranch.getCharPref(domain);
+ let userAgent = getUserAgentFromOverride(override);
+
+ if (userAgent != DEFAULT_UA) {
+ gOverrides.set(domain, userAgent);
+ }
}
}
}
diff --git a/netwerk/protocol/http/UserAgentUpdates.jsm b/netwerk/protocol/http/UserAgentUpdates.jsm
index 4b3ae574a8..cd21b78b30 100644
--- a/netwerk/protocol/http/UserAgentUpdates.jsm
+++ b/netwerk/protocol/http/UserAgentUpdates.jsm
@@ -17,15 +17,9 @@ XPCOMUtils.defineLazyModuleGetter(
this, "FileUtils", "resource://gre/modules/FileUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(
- this, "NetUtil", "resource://gre/modules/NetUtil.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(
this, "OS", "resource://gre/modules/osfile.jsm");
XPCOMUtils.defineLazyModuleGetter(
- this, "Promise", "resource://gre/modules/Promise.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(
this, "UpdateUtils", "resource://gre/modules/UpdateUtils.jsm");
XPCOMUtils.defineLazyServiceGetter(
@@ -64,30 +58,6 @@ const PREF_APP_DISTRIBUTION_VERSION = "distribution.version";
var gInitialized = false;
-function readChannel(url) {
- return new Promise((resolve, reject) => {
- try {
- let channel = NetUtil.newChannel({uri: url, loadUsingSystemPrincipal: true});
- channel.contentType = "application/json";
-
- NetUtil.asyncFetch(channel, (inputStream, status) => {
- if (!Components.isSuccessCode(status)) {
- reject();
- return;
- }
-
- let data = JSON.parse(
- NetUtil.readInputStreamToString(inputStream, inputStream.available())
- );
- resolve(data);
- });
- } catch (ex) {
- reject(new Error("UserAgentUpdates: Could not fetch " + url + " " +
- ex + "\n" + ex.stack));
- }
- });
-}
-
this.UserAgentUpdates = {
init: function(callback) {
if (gInitialized) {
diff --git a/netwerk/protocol/http/moz.build b/netwerk/protocol/http/moz.build
index 37e801f2f9..a1b57876bb 100644
--- a/netwerk/protocol/http/moz.build
+++ b/netwerk/protocol/http/moz.build
@@ -99,9 +99,9 @@ IPDL_SOURCES += [
'PHttpChannel.ipdl',
]
-EXTRA_JS_MODULES += ['UserAgentOverrides.jsm']
+EXTRA_JS_MODULES += ['UserAgentUpdates.jsm']
-EXTRA_PP_JS_MODULES += ['UserAgentUpdates.jsm']
+EXTRA_PP_JS_MODULES += ['UserAgentOverrides.jsm']
include('/ipc/chromium/chromium-config.mozbuild')
diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp
index 05383916ff..950b1a7ab2 100644
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -1530,7 +1530,7 @@ GetPKPConsoleErrorTag(uint32_t failureResult, nsAString& consoleErrorTag)
}
/**
- * Process a single security header. Only two types are supported: HSTS and HPKP.
+ * Process a single security header. Only one type is supported: HSTS.
*/
nsresult
nsHttpChannel::ProcessSingleSecurityHeader(uint32_t aType,
@@ -1542,9 +1542,6 @@ nsHttpChannel::ProcessSingleSecurityHeader(uint32_t aType,
case nsISiteSecurityService::HEADER_HSTS:
atom = nsHttp::ResolveAtom("Strict-Transport-Security");
break;
- case nsISiteSecurityService::HEADER_HPKP:
- atom = nsHttp::ResolveAtom("Public-Key-Pins");
- break;
default:
NS_NOTREACHED("Invalid security header type");
return NS_ERROR_FAILURE;
@@ -1568,10 +1565,6 @@ nsHttpChannel::ProcessSingleSecurityHeader(uint32_t aType,
GetSTSConsoleErrorTag(failureResult, consoleErrorTag);
consoleErrorCategory = NS_LITERAL_STRING("Invalid HSTS Headers");
break;
- case nsISiteSecurityService::HEADER_HPKP:
- GetPKPConsoleErrorTag(failureResult, consoleErrorTag);
- consoleErrorCategory = NS_LITERAL_STRING("Invalid HPKP Headers");
- break;
default:
return NS_ERROR_FAILURE;
}
@@ -1641,10 +1634,6 @@ nsHttpChannel::ProcessSecurityHeaders()
sslStatus, flags);
NS_ENSURE_SUCCESS(rv, rv);
- rv = ProcessSingleSecurityHeader(nsISiteSecurityService::HEADER_HPKP,
- sslStatus, flags);
- NS_ENSURE_SUCCESS(rv, rv);
-
return NS_OK;
}
diff --git a/netwerk/sctp/src/netinet/sctp.h b/netwerk/sctp/src/netinet/sctp.h
index a5ff4eb0bc..962ce1140b 100755
--- a/netwerk/sctp/src/netinet/sctp.h
+++ b/netwerk/sctp/src/netinet/sctp.h
@@ -32,7 +32,7 @@
#ifdef __FreeBSD__
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/netinet/sctp.h 279859 2015-03-10 19:49:25Z tuexen $");
+__FBSDID("$FreeBSD: head/sys/netinet/sctp.h 356270 2020-01-02 13:55:10Z tuexen $");
#endif
#ifndef _NETINET_SCTP_H_
@@ -598,7 +598,10 @@ struct sctp_error_no_user_data {
#define SCTP_MOBILITY_PRIM_DELETED 0x00000004
-#define SCTP_SMALLEST_PMTU 512 /* smallest pmtu allowed when disabling PMTU discovery */
+/* Smallest PMTU allowed when disabling PMTU discovery */
+#define SCTP_SMALLEST_PMTU 512
+/* Largest PMTU allowed when disabling PMTU discovery */
+#define SCTP_LARGEST_PMTU 65536
#if defined(__Userspace_os_Windows)
#pragma pack()
diff --git a/netwerk/sctp/src/netinet/sctp_auth.c b/netwerk/sctp/src/netinet/sctp_auth.c
index ee5ca36ce3..4e9f7e4cda 100755
--- a/netwerk/sctp/src/netinet/sctp_auth.c
+++ b/netwerk/sctp/src/netinet/sctp_auth.c
@@ -32,7 +32,7 @@
#ifdef __FreeBSD__
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/netinet/sctp_auth.c 271673 2014-09-16 14:20:33Z tuexen $");
+__FBSDID("$FreeBSD: head/sys/netinet/sctp_auth.c 355931 2019-12-20 15:25:08Z tuexen $");
#endif
#include <netinet/sctp_os.h>
@@ -1450,7 +1450,8 @@ sctp_auth_get_cookie_params(struct sctp_tcb *stcb, struct mbuf *m,
ptype = ntohs(phdr->param_type);
plen = ntohs(phdr->param_length);
- if ((plen == 0) || (offset + plen > length))
+ if ((plen < sizeof(struct sctp_paramhdr)) ||
+ (offset + plen > length))
break;
if (ptype == SCTP_RANDOM) {
diff --git a/netwerk/sctp/src/netinet/sctp_pcb.c b/netwerk/sctp/src/netinet/sctp_pcb.c
index 58c164f503..ea5725c85c 100755
--- a/netwerk/sctp/src/netinet/sctp_pcb.c
+++ b/netwerk/sctp/src/netinet/sctp_pcb.c
@@ -32,7 +32,7 @@
#ifdef __FreeBSD__
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/netinet/sctp_pcb.c 280459 2015-03-24 21:12:45Z tuexen $");
+__FBSDID("$FreeBSD: head/sys/netinet/sctp_pcb.c 355931 2019-12-20 15:25:08Z tuexen $");
#endif
#include <netinet/sctp_os.h>
@@ -7213,7 +7213,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m,
if (offset + plen > limit) {
break;
}
- if (plen == 0) {
+ if (plen < sizeof(struct sctp_paramhdr)) {
break;
}
#ifdef INET
@@ -7413,6 +7413,9 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m,
if (plen > sizeof(lstore)) {
return (-23);
}
+ if (plen < sizeof(struct sctp_asconf_addrv4_param)) {
+ return (-101);
+ }
phdr = sctp_get_next_param(m, offset,
(struct sctp_paramhdr *)&lstore,
min(plen,sizeof(lstore)));
diff --git a/netwerk/sctp/src/netinet/sctp_usrreq.c b/netwerk/sctp/src/netinet/sctp_usrreq.c
index d24a21815e..7ffd8e8c81 100755
--- a/netwerk/sctp/src/netinet/sctp_usrreq.c
+++ b/netwerk/sctp/src/netinet/sctp_usrreq.c
@@ -32,7 +32,7 @@
#ifdef __FreeBSD__
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/netinet/sctp_usrreq.c 280459 2015-03-24 21:12:45Z tuexen $");
+__FBSDID("$FreeBSD: head/sys/netinet/sctp_usrreq.c 356270 2020-01-02 13:55:10Z tuexen $");
#endif
#include <netinet/sctp_os.h>
@@ -5995,6 +5995,14 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
return (EINVAL);
}
+ if ((paddrp->spp_flags & SPP_PMTUD_DISABLE) &&
+ ((paddrp->spp_pathmtu < SCTP_SMALLEST_PMTU) ||
+ (paddrp->spp_pathmtu > SCTP_LARGEST_PMTU))) {
+ if (stcb)
+ SCTP_TCB_UNLOCK(stcb);
+ SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
+ return (EINVAL);
+ }
if (stcb != NULL) {
/************************TCB SPECIFIC SET ******************/
@@ -6038,7 +6046,7 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_SOCKOPT, SCTP_SO_LOCKED);
sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net);
}
- if ((paddrp->spp_flags & SPP_PMTUD_DISABLE) && (paddrp->spp_pathmtu >= SCTP_SMALLEST_PMTU)) {
+ if (paddrp->spp_flags & SPP_PMTUD_DISABLE) {
if (SCTP_OS_TIMER_PENDING(&net->pmtu_timer.timer)) {
sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net,
SCTP_FROM_SCTP_USRREQ+SCTP_LOC_10);
@@ -6160,7 +6168,7 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
}
sctp_stcb_feature_on(inp, stcb, SCTP_PCB_FLAGS_DONOT_HEARTBEAT);
}
- if ((paddrp->spp_flags & SPP_PMTUD_DISABLE) && (paddrp->spp_pathmtu >= SCTP_SMALLEST_PMTU)) {
+ if (paddrp->spp_flags & SPP_PMTUD_DISABLE) {
TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
if (SCTP_OS_TIMER_PENDING(&net->pmtu_timer.timer)) {
sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net,
diff --git a/old-configure.in b/old-configure.in
index 30b0200307..86cf2ae181 100644
--- a/old-configure.in
+++ b/old-configure.in
@@ -2156,9 +2156,11 @@ MOZ_JETPACK=1
MOZ_DEVTOOLS_SERVER=1
MOZ_DEVTOOLS=
MOZ_PLACES=1
+MOZ_SECURITY_SQLSTORE=
MOZ_SERVICES_HEALTHREPORT=1
MOZ_SERVICES_SYNC=1
MOZ_USERINFO=1
+NSS_DISABLE_DBM=
MOZ_MAILNEWS=
MOZ_MAILNEWS_OAUTH2=
MOZ_LDAP_XPCOM=
@@ -2227,19 +2229,6 @@ else
AC_MSG_RESULT([no])
fi
-# Allow influencing configure with a defines.sh script.
-. "${srcdir}/build/defines.sh"
-
-# If we're not building a release build, define EARLY_BETA_OR_EARLIER if it is
-# set in defines.sh
-if test "$BUILDING_RELEASE"; then
- # Override value in defines.sh, if any
- EARLY_BETA_OR_EARLIER=
-elif test "$EARLY_BETA_OR_EARLIER"; then
- AC_DEFINE(EARLY_BETA_OR_EARLIER)
-fi
-AC_SUBST(EARLY_BETA_OR_EARLIER)
-
# Allow someone to change MOZ_APP_NAME and MOZ_APP_BASENAME in mozconfig
MOZ_ARG_WITH_STRING(app-name,
[--with-app-name=APPNAME sets MOZ_APP_NAME to APPNAME],
@@ -2713,6 +2702,40 @@ x86_64 | arm | aarch64 | x86 | ppc* | ia64)
esac
dnl =========================================================
+dnl = NSS DBM (BerkeleyDB) Support
+dnl = NOTE: Because we don't expressly control the name of
+dnl = this var --disable-dbm means NSS_DISABLE_DBM=1
+dnl =========================================================
+MOZ_ARG_DISABLE_BOOL(dbm,
+[ --disable-dbm Disable DBM support in nss],
+ NSS_DISABLE_DBM=1,
+ NSS_DISABLE_DBM=)
+
+if test -n "$NSS_DISABLE_DBM"; then
+ AC_DEFINE(NSS_DISABLE_DBM)
+fi
+
+AC_SUBST(NSS_DISABLE_DBM)
+
+dnl =========================================================
+dnl = NSS SQL storage format
+dnl =========================================================
+MOZ_ARG_ENABLE_BOOL(security-sqlstore,
+[ --enable-security-sqlstore Enable the use of SQL storage for NSS],
+ MOZ_SECURITY_SQLSTORE=1,
+ MOZ_SECURITY_SQLSTORE=)
+
+if test -n "$NSS_DISABLE_DBM" -a -z "$MOZ_SECURITY_SQLSTORE"; then
+ AC_MSG_ERROR([DBM storage support is required if not using NSS SQL storage])
+fi
+
+if test -n "$MOZ_SECURITY_SQLSTORE"; then
+ AC_DEFINE(MOZ_SECURITY_SQLSTORE)
+fi
+
+AC_SUBST(MOZ_SECURITY_SQLSTORE)
+
+dnl =========================================================
dnl = Don't fold mailnews related comps into libXUL
dnl =========================================================
MOZ_ARG_ENABLE_BOOL(incomplete-external-linkage,
diff --git a/other-licenses/skia-npapi/ANPCanvas.cpp b/other-licenses/skia-npapi/ANPCanvas.cpp
deleted file mode 100644
index dd227eca8d..0000000000
--- a/other-licenses/skia-npapi/ANPCanvas.cpp
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright 2008, The Android Open Source Project
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-// must include config.h first for webkit to fiddle with new/delete
-#include "SkANP.h"
-#include "SkRect.h"
-
-static ANPCanvas* anp_newCanvas(const ANPBitmap* bitmap) {
- SkBitmap bm;
- return new ANPCanvas(*SkANP::SetBitmap(&bm, *bitmap));
-}
-
-static void anp_deleteCanvas(ANPCanvas* canvas) {
- delete canvas;
-}
-
-static void anp_save(ANPCanvas* canvas) {
- canvas->skcanvas->save();
-}
-
-static void anp_restore(ANPCanvas* canvas) {
- canvas->skcanvas->restore();
-}
-
-static void anp_translate(ANPCanvas* canvas, float tx, float ty) {
- canvas->skcanvas->translate(SkFloatToScalar(tx), SkFloatToScalar(ty));
-}
-
-static void anp_scale(ANPCanvas* canvas, float sx, float sy) {
- canvas->skcanvas->scale(SkFloatToScalar(sx), SkFloatToScalar(sy));
-}
-
-static void anp_rotate(ANPCanvas* canvas, float degrees) {
- canvas->skcanvas->rotate(SkFloatToScalar(degrees));
-}
-
-static void anp_skew(ANPCanvas* canvas, float kx, float ky) {
- canvas->skcanvas->skew(SkFloatToScalar(kx), SkFloatToScalar(ky));
-}
-
-static void anp_clipRect(ANPCanvas* canvas, const ANPRectF* rect) {
- SkRect r;
- canvas->skcanvas->clipRect(*SkANP::SetRect(&r, *rect));
-}
-
-static void anp_clipPath(ANPCanvas* canvas, const ANPPath* path) {
- canvas->skcanvas->clipPath(*path);
-}
-static void anp_concat(ANPCanvas* canvas, const ANPMatrix* matrix) {
- canvas->skcanvas->concat(*matrix);
-}
-
-static void anp_getTotalMatrix(ANPCanvas* canvas, ANPMatrix* matrix) {
- const SkMatrix& src = canvas->skcanvas->getTotalMatrix();
- *matrix = *reinterpret_cast<const ANPMatrix*>(&src);
-}
-
-static bool anp_getLocalClipBounds(ANPCanvas* canvas, ANPRectF* r,
- bool antialias) {
- SkRect bounds;
- if (canvas->skcanvas->getClipBounds(&bounds)) {
- SkANP::SetRect(r, bounds);
- return true;
- }
- return false;
-}
-
-static bool anp_getDeviceClipBounds(ANPCanvas* canvas, ANPRectI* r) {
- SkIRect bounds;
- if (canvas->skcanvas->getClipDeviceBounds(&bounds)) {
- SkANP::SetRect(r, bounds);
- return true;
- }
- return false;
-}
-
-static void anp_drawColor(ANPCanvas* canvas, ANPColor color) {
- canvas->skcanvas->drawColor(color);
-}
-
-static void anp_drawPaint(ANPCanvas* canvas, const ANPPaint* paint) {
- canvas->skcanvas->drawPaint(*paint);
-}
-
-static void anp_drawLine(ANPCanvas* canvas, float x0, float y0,
- float x1, float y1, const ANPPaint* paint) {
- canvas->skcanvas->drawLine(SkFloatToScalar(x0), SkFloatToScalar(y0),
- SkFloatToScalar(x1), SkFloatToScalar(y1), *paint);
-}
-
-static void anp_drawRect(ANPCanvas* canvas, const ANPRectF* rect,
- const ANPPaint* paint) {
- SkRect r;
- canvas->skcanvas->drawRect(*SkANP::SetRect(&r, *rect), *paint);
-}
-
-static void anp_drawOval(ANPCanvas* canvas, const ANPRectF* rect,
- const ANPPaint* paint) {
- SkRect r;
- canvas->skcanvas->drawOval(*SkANP::SetRect(&r, *rect), *paint);
-}
-
-static void anp_drawPath(ANPCanvas* canvas, const ANPPath* path,
- const ANPPaint* paint) {
- canvas->skcanvas->drawPath(*path, *paint);
-}
-
-static void anp_drawText(ANPCanvas* canvas, const void* text, uint32_t length,
- float x, float y, const ANPPaint* paint) {
- canvas->skcanvas->drawText(text, length,
- SkFloatToScalar(x), SkFloatToScalar(y),
- *paint);
-}
-
-static void anp_drawPosText(ANPCanvas* canvas, const void* text,
- uint32_t byteLength, const float xy[], const ANPPaint* paint) {
- canvas->skcanvas->drawPosText(text, byteLength,
- reinterpret_cast<const SkPoint*>(xy), *paint);
-}
-
-static void anp_drawBitmap(ANPCanvas* canvas, const ANPBitmap* bitmap,
- float x, float y, const ANPPaint* paint) {
- SkBitmap bm;
- canvas->skcanvas->drawBitmap(*SkANP::SetBitmap(&bm, *bitmap),
- SkFloatToScalar(x), SkFloatToScalar(y),
- paint);
-}
-
-static void anp_drawBitmapRect(ANPCanvas* canvas, const ANPBitmap* bitmap,
- const ANPRectI* src, const ANPRectF* dst,
- const ANPPaint* paint) {
- SkBitmap bm;
- SkRect dstR;
- SkIRect srcR;
-
- if (src) {
- canvas->skcanvas->drawBitmapRect(*SkANP::SetBitmap(&bm, *bitmap),
- *SkANP::SetRect(&srcR, *src),
- *SkANP::SetRect(&dstR, *dst),
- paint);
- } else {
- canvas->skcanvas->drawBitmapRect(*SkANP::SetBitmap(&bm, *bitmap),
- *SkANP::SetRect(&dstR, *dst),
- paint);
- }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
-#define ASSIGN(obj, name) (obj)->name = anp_##name
-
-void InitCanvasInterface(ANPCanvasInterfaceV0* i) {
- ASSIGN(i, newCanvas);
- ASSIGN(i, deleteCanvas);
- ASSIGN(i, save);
- ASSIGN(i, restore);
- ASSIGN(i, translate);
- ASSIGN(i, scale);
- ASSIGN(i, rotate);
- ASSIGN(i, skew);
- ASSIGN(i, clipRect);
- ASSIGN(i, clipPath);
- ASSIGN(i, concat);
- ASSIGN(i, getTotalMatrix);
- ASSIGN(i, getLocalClipBounds);
- ASSIGN(i, getDeviceClipBounds);
- ASSIGN(i, drawColor);
- ASSIGN(i, drawPaint);
- ASSIGN(i, drawLine);
- ASSIGN(i, drawRect);
- ASSIGN(i, drawOval);
- ASSIGN(i, drawPath);
- ASSIGN(i, drawText);
- ASSIGN(i, drawPosText);
- ASSIGN(i, drawBitmap);
- ASSIGN(i, drawBitmapRect);
-}
diff --git a/other-licenses/skia-npapi/ANPPaint.cpp b/other-licenses/skia-npapi/ANPPaint.cpp
deleted file mode 100644
index cc67e1dd85..0000000000
--- a/other-licenses/skia-npapi/ANPPaint.cpp
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * Copyright 2008, The Android Open Source Project
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-// must include config.h first for webkit to fiddle with new/delete
-#include "SkANP.h"
-
-static ANPPaint* anp_newPaint() {
- return new ANPPaint;
-}
-
-static void anp_deletePaint(ANPPaint* paint) {
- delete paint;
-}
-
-static ANPPaintFlags anp_getFlags(const ANPPaint* paint) {
- return paint->getFlags();
-}
-
-static void anp_setFlags(ANPPaint* paint, ANPPaintFlags flags) {
- paint->setFlags(flags);
-}
-
-static ANPColor anp_getColor(const ANPPaint* paint) {
- return paint->getColor();
-}
-
-static void anp_setColor(ANPPaint* paint, ANPColor color) {
- paint->setColor(color);
-}
-
-static ANPPaintStyle anp_getStyle(const ANPPaint* paint) {
- return paint->getStyle();
-}
-
-static void anp_setStyle(ANPPaint* paint, ANPPaintStyle style) {
- paint->setStyle(static_cast<SkPaint::Style>(style));
-}
-
-static float anp_getStrokeWidth(const ANPPaint* paint) {
- return SkScalarToFloat(paint->getStrokeWidth());
-}
-
-static float anp_getStrokeMiter(const ANPPaint* paint) {
- return SkScalarToFloat(paint->getStrokeMiter());
-}
-
-static ANPPaintCap anp_getStrokeCap(const ANPPaint* paint) {
- return paint->getStrokeCap();
-}
-
-static ANPPaintJoin anp_getStrokeJoin(const ANPPaint* paint) {
- return paint->getStrokeJoin();
-}
-
-static void anp_setStrokeWidth(ANPPaint* paint, float width) {
- paint->setStrokeWidth(SkFloatToScalar(width));
-}
-
-static void anp_setStrokeMiter(ANPPaint* paint, float miter) {
- paint->setStrokeMiter(SkFloatToScalar(miter));
-}
-
-static void anp_setStrokeCap(ANPPaint* paint, ANPPaintCap cap) {
- paint->setStrokeCap(static_cast<SkPaint::Cap>(cap));
-}
-
-static void anp_setStrokeJoin(ANPPaint* paint, ANPPaintJoin join) {
- paint->setStrokeJoin(static_cast<SkPaint::Join>(join));
-}
-
-static ANPTextEncoding anp_getTextEncoding(const ANPPaint* paint) {
- return paint->getTextEncoding();
-}
-
-static ANPPaintAlign anp_getTextAlign(const ANPPaint* paint) {
- return paint->getTextAlign();
-}
-
-static float anp_getTextSize(const ANPPaint* paint) {
- return SkScalarToFloat(paint->getTextSize());
-}
-
-static float anp_getTextScaleX(const ANPPaint* paint) {
- return SkScalarToFloat(paint->getTextScaleX());
-}
-
-static float anp_getTextSkewX(const ANPPaint* paint) {
- return SkScalarToFloat(paint->getTextSkewX());
-}
-
-static ANPTypeface* anp_getTypeface(const ANPPaint* paint) {
- return reinterpret_cast<ANPTypeface*>(paint->getTypeface());
-}
-
-static void anp_setTextEncoding(ANPPaint* paint, ANPTextEncoding encoding) {
- paint->setTextEncoding(static_cast<SkPaint::TextEncoding>(encoding));
-}
-
-static void anp_setTextAlign(ANPPaint* paint, ANPPaintAlign align) {
- paint->setTextAlign(static_cast<SkPaint::Align>(align));
-}
-
-static void anp_setTextSize(ANPPaint* paint, float textSize) {
- paint->setTextSize(SkFloatToScalar(textSize));
-}
-
-static void anp_setTextScaleX(ANPPaint* paint, float scaleX) {
- paint->setTextScaleX(SkFloatToScalar(scaleX));
-}
-
-static void anp_setTextSkewX(ANPPaint* paint, float skewX) {
- paint->setTextSkewX(SkFloatToScalar(skewX));
-}
-
-static void anp_setTypeface(ANPPaint* paint, ANPTypeface* tf) {
- paint->setTypeface(sk_ref_sp(tf));
-}
-
-static float anp_measureText(ANPPaint* paint, const void* text,
- uint32_t byteLength, ANPRectF* bounds) {
- SkScalar w = paint->measureText(text, byteLength,
- reinterpret_cast<SkRect*>(bounds));
- return SkScalarToFloat(w);
-}
-
-/** Return the number of unichars specifed by the text.
- If widths is not null, returns the array of advance widths for each
- unichar.
- If bounds is not null, returns the array of bounds for each unichar.
- */
-static int anp_getTextWidths(ANPPaint* paint, const void* text,
- uint32_t byteLength, float widths[], ANPRectF bounds[]) {
- return paint->getTextWidths(text, byteLength, widths,
- reinterpret_cast<SkRect*>(bounds));
-}
-
-static float anp_getFontMetrics(ANPPaint* paint, ANPFontMetrics* metrics) {
- SkPaint::FontMetrics fm;
- SkScalar spacing = paint->getFontMetrics(&fm);
- if (metrics) {
- metrics->fTop = SkScalarToFloat(fm.fTop);
- metrics->fAscent = SkScalarToFloat(fm.fAscent);
- metrics->fDescent = SkScalarToFloat(fm.fDescent);
- metrics->fBottom = SkScalarToFloat(fm.fBottom);
- metrics->fLeading = SkScalarToFloat(fm.fLeading);
- }
- return SkScalarToFloat(spacing);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
-#define ASSIGN(obj, name) (obj)->name = anp_##name
-
-void InitPaintInterface(ANPPaintInterfaceV0* i) {
- ASSIGN(i, newPaint);
- ASSIGN(i, deletePaint);
- ASSIGN(i, getFlags);
- ASSIGN(i, setFlags);
- ASSIGN(i, getColor);
- ASSIGN(i, setColor);
- ASSIGN(i, getStyle);
- ASSIGN(i, setStyle);
- ASSIGN(i, getStrokeWidth);
- ASSIGN(i, getStrokeMiter);
- ASSIGN(i, getStrokeCap);
- ASSIGN(i, getStrokeJoin);
- ASSIGN(i, setStrokeWidth);
- ASSIGN(i, setStrokeMiter);
- ASSIGN(i, setStrokeCap);
- ASSIGN(i, setStrokeJoin);
- ASSIGN(i, getTextEncoding);
- ASSIGN(i, getTextAlign);
- ASSIGN(i, getTextSize);
- ASSIGN(i, getTextScaleX);
- ASSIGN(i, getTextSkewX);
- ASSIGN(i, getTypeface);
- ASSIGN(i, setTextEncoding);
- ASSIGN(i, setTextAlign);
- ASSIGN(i, setTextSize);
- ASSIGN(i, setTextScaleX);
- ASSIGN(i, setTextSkewX);
- ASSIGN(i, setTypeface);
- ASSIGN(i, measureText);
- ASSIGN(i, getTextWidths);
- ASSIGN(i, getFontMetrics);
-}
diff --git a/other-licenses/skia-npapi/ANPTypeface.cpp b/other-licenses/skia-npapi/ANPTypeface.cpp
deleted file mode 100644
index 48e3f898de..0000000000
--- a/other-licenses/skia-npapi/ANPTypeface.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright 2008, The Android Open Source Project
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-// must include config.h first for webkit to fiddle with new/delete
-#include "SkANP.h"
-#include "SkStream.h"
-#include <stdlib.h>
-
-static ANPTypeface* anp_createFromName(const char name[], ANPTypefaceStyle s) {
- sk_sp<SkTypeface> tf = SkTypeface::MakeFromName(name,
- SkFontStyle::FromOldStyle(s));
- return reinterpret_cast<ANPTypeface*>(tf.release());
-}
-
-static ANPTypeface* anp_createFromTypeface(const ANPTypeface* family,
- ANPTypefaceStyle s) {
- sk_sp<SkTypeface> tf = SkTypeface::MakeFromTypeface(const_cast<ANPTypeface*>(family),
- static_cast<SkTypeface::Style>(s));
- return reinterpret_cast<ANPTypeface*>(tf.release());
-}
-
-static int32_t anp_getRefCount(const ANPTypeface* tf) {
- return tf ? tf->getRefCnt() : 0;
-}
-
-static void anp_ref(ANPTypeface* tf) {
- SkSafeRef(tf);
-}
-
-static void anp_unref(ANPTypeface* tf) {
- SkSafeUnref(tf);
-}
-
-static ANPTypefaceStyle anp_getStyle(const ANPTypeface* tf) {
- SkTypeface::Style s = tf ? tf->style() : SkTypeface::kNormal;
- return static_cast<ANPTypefaceStyle>(s);
-}
-
-static int32_t anp_getFontPath(const ANPTypeface* tf, char fileName[],
- int32_t length, int32_t* index) {
- return 0;
- /*
- SkStream* stream = tf->openStream(index);
- if (stream->getFileName()) {
- strcpy(fileName, stream->getFileName());
- } else {
- return 0;
- }
-
- return strlen(fileName);
- */
-}
-
-static const char* gFontDir;
-#define FONT_DIR_SUFFIX "/fonts/"
-
-static const char* anp_getFontDirectoryPath() {
- if (NULL == gFontDir) {
- const char* root = getenv("ANDROID_ROOT");
- size_t len = strlen(root);
- char* storage = (char*)malloc(len + sizeof(FONT_DIR_SUFFIX));
- if (NULL == storage) {
- return NULL;
- }
- memcpy(storage, root, len);
- memcpy(storage + len, FONT_DIR_SUFFIX, sizeof(FONT_DIR_SUFFIX));
- // save this assignment for last, so that if multiple threads call us
- // (which should never happen), we never return an incomplete global.
- // At worst, we would allocate storage for the path twice.
- gFontDir = storage;
- }
- return gFontDir;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
-#define ASSIGN(obj, name) (obj)->name = anp_##name
-
-void InitTypeFaceInterface(ANPTypefaceInterfaceV0* i) {
- ASSIGN(i, createFromName);
- ASSIGN(i, createFromTypeface);
- ASSIGN(i, getRefCount);
- ASSIGN(i, ref);
- ASSIGN(i, unref);
- ASSIGN(i, getStyle);
- ASSIGN(i, getFontPath);
- ASSIGN(i, getFontDirectoryPath);
-}
diff --git a/other-licenses/skia-npapi/SkANP.cpp b/other-licenses/skia-npapi/SkANP.cpp
deleted file mode 100644
index db9302bcdf..0000000000
--- a/other-licenses/skia-npapi/SkANP.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright 2008, The Android Open Source Project
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-// must include config.h first for webkit to fiddle with new/delete
-#include "SkANP.h"
-
-SkRect* SkANP::SetRect(SkRect* dst, const ANPRectF& src) {
- dst->set(SkFloatToScalar(src.left),
- SkFloatToScalar(src.top),
- SkFloatToScalar(src.right),
- SkFloatToScalar(src.bottom));
- return dst;
-}
-
-SkIRect* SkANP::SetRect(SkIRect* dst, const ANPRectI& src) {
- dst->set(src.left, src.top, src.right, src.bottom);
- return dst;
-}
-
-ANPRectI* SkANP::SetRect(ANPRectI* dst, const SkIRect& src) {
- dst->left = src.fLeft;
- dst->top = src.fTop;
- dst->right = src.fRight;
- dst->bottom = src.fBottom;
- return dst;
-}
-
-ANPRectF* SkANP::SetRect(ANPRectF* dst, const SkRect& src) {
- dst->left = SkScalarToFloat(src.fLeft);
- dst->top = SkScalarToFloat(src.fTop);
- dst->right = SkScalarToFloat(src.fRight);
- dst->bottom = SkScalarToFloat(src.fBottom);
- return dst;
-}
-
-SkBitmap* SkANP::SetBitmap(SkBitmap* dst, const ANPBitmap& src) {
- SkColorType colorType = kUnknown_SkColorType;
-
- switch (src.format) {
- case kRGBA_8888_ANPBitmapFormat:
- // Let Skia choose the correct colour type for us based on its
- // endianness. This should be correct.
- colorType = kN32_SkColorType;
- break;
- case kRGB_565_ANPBitmapFormat:
- colorType = kRGB_565_SkColorType;
- break;
- default:
- break;
- }
-
- SkImageInfo info = SkImageInfo::Make(src.width, src.height, colorType, kPremul_SkAlphaType);
- dst->setInfo(info, src.rowBytes);
- dst->setPixels(src.baseAddr);
- return dst;
-}
-
-bool SkANP::SetBitmap(ANPBitmap* dst, const SkBitmap& src) {
- if (!(dst->baseAddr = src.getPixels())) {
- SkDebugf("SkANP::SetBitmap - getPixels() returned null\n");
- return false;
- }
-
- switch (src.colorType()) {
- case SkColorType::kRGBA_8888_SkColorType:
- dst->format = kRGBA_8888_ANPBitmapFormat;
- break;
- case SkColorType::kRGB_565_SkColorType:
- dst->format = kRGB_565_ANPBitmapFormat;
- break;
- default:
- SkDebugf("SkANP::SetBitmap - unsupported src.colorType %d\n", src.colorType());
- return false;
- }
-
- dst->width = src.width();
- dst->height = src.height();
- dst->rowBytes = src.rowBytes();
- return true;
-}
-
-void SkANP::InitEvent(ANPEvent* event, ANPEventType et) {
- event->inSize = sizeof(ANPEvent);
- event->eventType = et;
-}
diff --git a/other-licenses/skia-npapi/SkANP.h b/other-licenses/skia-npapi/SkANP.h
deleted file mode 100644
index 5c2a936501..0000000000
--- a/other-licenses/skia-npapi/SkANP.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright 2008, The Android Open Source Project
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SkANP_DEFINED
-#define SkANP_DEFINED
-
-#include "android_npapi.h"
-#include "SkCanvas.h"
-#include "SkMatrix.h"
-#include "SkPaint.h"
-#include "SkPath.h"
-#include "SkTypeface.h"
-
-struct ANPMatrix : SkMatrix {
-};
-
-struct ANPPath : SkPath {
-};
-
-struct ANPPaint : SkPaint {
-};
-
-struct ANPTypeface : SkTypeface {
-};
-
-struct ANPCanvas {
- SkCanvas* skcanvas;
-
- // draw into the specified bitmap
- explicit ANPCanvas(const SkBitmap& bm) {
- skcanvas = new SkCanvas(bm);
- }
-
- // redirect all drawing to the specific SkCanvas
- explicit ANPCanvas(SkCanvas* other) {
- skcanvas = other;
- skcanvas->ref();
- }
-
- ~ANPCanvas() {
- skcanvas->unref();
- }
-};
-
-class SkANP {
-public:
- static SkRect* SetRect(SkRect* dst, const ANPRectF& src);
- static SkIRect* SetRect(SkIRect* dst, const ANPRectI& src);
- static ANPRectI* SetRect(ANPRectI* dst, const SkIRect& src);
- static ANPRectF* SetRect(ANPRectF* dst, const SkRect& src);
- static SkBitmap* SetBitmap(SkBitmap* dst, const ANPBitmap& src);
- static bool SetBitmap(ANPBitmap* dst, const SkBitmap& src);
-
- static void InitEvent(ANPEvent* event, ANPEventType et);
-};
-
-#endif
diff --git a/other-licenses/skia-npapi/moz.build b/other-licenses/skia-npapi/moz.build
deleted file mode 100644
index e53c2ef22d..0000000000
--- a/other-licenses/skia-npapi/moz.build
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-EXPORTS += [
- 'SkANP.h',
-]
-
-UNIFIED_SOURCES += [
- 'ANPCanvas.cpp',
- 'ANPPaint.cpp',
- 'ANPTypeface.cpp',
- 'SkANP.cpp',
-]
-
-# We allow warnings for third-party code that can be updated from upstream.
-ALLOW_COMPILER_WARNINGS = True
-
-FINAL_LIBRARY = 'xul'
-
-DEFINES['SK_BUILD_FOR_ANDROID_NDK'] = True
-
-LOCAL_INCLUDES += [
- '/dom/plugins/base',
- '/dom/plugins/base/android',
- '/gfx/gl',
- '/gfx/skia/skia/include/config',
- '/gfx/skia/skia/include/core',
-]
diff --git a/python/mozbuild/mozbuild/base.py b/python/mozbuild/mozbuild/base.py
index 9d5897a34a..9db1005d11 100644
--- a/python/mozbuild/mozbuild/base.py
+++ b/python/mozbuild/mozbuild/base.py
@@ -352,6 +352,13 @@ class MozbuildObject(ProcessExecutionMixin):
return _config_guess_output[0]
p = os.path.join(self.topsrcdir, 'build', 'autoconf', 'config.guess')
+
+ # Try looking for mozilla, for comm-central
+ if not os.path.isfile(p):
+ p = os.path.join(self.topsrcdir, 'mozilla', 'build', 'autoconf', 'config.guess')
+
+ if not os.path.isfile(p):
+ p = os.path.join(self.topsrcdir, 'platform', 'build', 'autoconf', 'config.guess')
# This is a little kludgy. We need access to the normalize_command
# function. However, that's a method of a mach mixin, so we need a
diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py
index 5933a5aa98..6e57ab5ae9 100644
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -541,21 +541,6 @@ class Build(MachCommandBase):
# as when doing OSX Universal builds)
pass
- # Check if there are any unpreprocessed files in '@MOZ_OBJDIR@/dist/bin'
- # See python/mozbuild/mozbuild/preprocessor.py#L293-L309 for the list of directives
- # We skip if, ifdef, ifndef, else, elif, elifdef and elifndef, because they are never used alone
- #
- # The original version of this script only worked with GNU grep because of the --include flag.
- # Not a problem in and of itself, except that it didn't take TOOLCHAIN_PREFIX and simply assumed
- # all operating systems use GNU grep as the system grep (often it's called ggrep or something).
- # This script is a bit slower, but should do the same thing on all Unix platforms.
-
- grepcmd = 'find ' + self.topobjdir + '/dist/bin' + ' -name \'\*.{css,dtd,html,js,jsm,xhtml,xml,xul,manifest,properties,rdf}\' ' + '| xargs grep -E "^(#|%)(define|endif|error|expand|filter|include|literal|undef|unfilter)" '\
- + '| awk "/\.css:%/ || (!/\.css/ && /:#/)"'
- grepresult = subprocess.Popen(grepcmd, stdout=subprocess.PIPE, shell=True).communicate()[0]
- if grepresult:
- print('\nERROR: preprocessor was not applied to the following files:\n\n' + grepresult)
-
return status
@Command('configure', category='build',
diff --git a/python/mozbuild/mozpack/packager/formats.py b/python/mozbuild/mozpack/packager/formats.py
index cedd1998bb..235fc3e90f 100644
--- a/python/mozbuild/mozpack/packager/formats.py
+++ b/python/mozbuild/mozpack/packager/formats.py
@@ -320,5 +320,4 @@ class OmniJarSubFormatter(PiecemealFormatter):
'modules',
'goanna.js',
'hyphenation',
- 'update.locale',
] or path[0] in STARTUP_CACHE_PATHS
diff --git a/python/mozbuild/mozpack/test/test_packager_formats.py b/python/mozbuild/mozpack/test/test_packager_formats.py
index 66a7cc8e6e..4ba61e880f 100644
--- a/python/mozbuild/mozpack/test/test_packager_formats.py
+++ b/python/mozbuild/mozpack/test/test_packager_formats.py
@@ -407,7 +407,6 @@ class TestFormatters(unittest.TestCase):
self.assertTrue(is_resource(base, 'modules/foo.jsm'))
self.assertTrue(is_resource(base, 'goanna.js'))
self.assertTrue(is_resource(base, 'hyphenation/foo'))
- self.assertTrue(is_resource(base, 'update.locale'))
self.assertTrue(
is_resource(base, 'jsloader/resource/gre/modules/foo.jsm'))
self.assertFalse(is_resource(base, 'foo'))
diff --git a/security/certverifier/NSSCertDBTrustDomain.cpp b/security/certverifier/NSSCertDBTrustDomain.cpp
index 5e89c24849..fff75ee88f 100644
--- a/security/certverifier/NSSCertDBTrustDomain.cpp
+++ b/security/certverifier/NSSCertDBTrustDomain.cpp
@@ -12,7 +12,6 @@
#include "NSSErrorsService.h"
#include "OCSPRequestor.h"
#include "OCSPVerificationTrustDomain.h"
-#include "PublicKeyPinningService.h"
#include "cert.h"
#include "certdb.h"
#include "mozilla/Assertions.h"
@@ -862,24 +861,6 @@ NSSCertDBTrustDomain::IsChainValid(const DERArray& certArray, Time time)
if (rv != Success) {
return rv;
}
- bool skipPinningChecksBecauseOfMITMMode =
- (!isBuiltInRoot && mPinningMode == CertVerifier::pinningAllowUserCAMITM);
- // If mHostname isn't set, we're not verifying in the context of a TLS
- // handshake, so don't verify HPKP in those cases.
- if (mHostname && (mPinningMode != CertVerifier::pinningDisabled) &&
- !skipPinningChecksBecauseOfMITMMode) {
- bool enforceTestMode =
- (mPinningMode == CertVerifier::pinningEnforceTestMode);
- bool chainHasValidPins;
- nsresult nsrv = PublicKeyPinningService::ChainHasValidPins(
- certList, mHostname, time, enforceTestMode, chainHasValidPins);
- if (NS_FAILED(nsrv)) {
- return Result::FATAL_ERROR_LIBRARY_FAILURE;
- }
- if (!chainHasValidPins) {
- return Result::ERROR_KEY_PINNING_FAILURE;
- }
- }
mBuiltChain = Move(certList);
@@ -1102,7 +1083,12 @@ InitializeNSS(const nsACString& dir, bool readOnly, bool loadPKCS11Modules)
flags |= NSS_INIT_NOMODDB;
}
nsAutoCString dbTypeAndDirectory;
+#ifdef MOZ_SECURITY_SQLSTORE
+ // Not strictly necessary with current NSS versions, but can't hurt to be explicit.
+ dbTypeAndDirectory.Append("sql:");
+#else
dbTypeAndDirectory.Append("dbm:");
+#endif
dbTypeAndDirectory.Append(dir);
return ::NSS_Initialize(dbTypeAndDirectory.get(), "", "", SECMOD_DB, flags);
}
diff --git a/security/manager/ssl/PublicKeyPinningService.cpp b/security/manager/ssl/PublicKeyPinningService.cpp
deleted file mode 100644
index ffee8ba48b..0000000000
--- a/security/manager/ssl/PublicKeyPinningService.cpp
+++ /dev/null
@@ -1,333 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "PublicKeyPinningService.h"
-
-#include "mozilla/Base64.h"
-#include "mozilla/Casting.h"
-#include "mozilla/Logging.h"
-#include "nsISiteSecurityService.h"
-#include "nsServiceManagerUtils.h"
-#include "nsSiteSecurityService.h"
-#include "nssb64.h"
-#include "pkix/pkixtypes.h"
-#include "seccomon.h"
-#include "sechash.h"
-
-#include "StaticHPKPins.h" // autogenerated by genHPKPStaticpins.js
-
-using namespace mozilla;
-using namespace mozilla::pkix;
-using namespace mozilla::psm;
-
-LazyLogModule gPublicKeyPinningLog("PublicKeyPinningService");
-
-/**
- Computes in the location specified by base64Out the SHA256 digest
- of the DER Encoded subject Public Key Info for the given cert
-*/
-static nsresult
-GetBase64HashSPKI(const CERTCertificate* cert, nsACString& hashSPKIDigest)
-{
- hashSPKIDigest.Truncate();
- Digest digest;
- nsresult rv = digest.DigestBuf(SEC_OID_SHA256, cert->derPublicKey.data,
- cert->derPublicKey.len);
- if (NS_FAILED(rv)) {
- return rv;
- }
- return Base64Encode(nsDependentCSubstring(
- BitwiseCast<char*, unsigned char*>(digest.get().data),
- digest.get().len),
- hashSPKIDigest);
-}
-
-/*
- * Sets certMatchesPinset to true if a given cert matches any fingerprints from
- * the given pinset or the dynamicFingerprints array, or to false otherwise.
- */
-static nsresult
-EvalCert(const CERTCertificate* cert, const StaticFingerprints* fingerprints,
- const nsTArray<nsCString>* dynamicFingerprints,
- /*out*/ bool& certMatchesPinset)
-{
- certMatchesPinset = false;
- if (!fingerprints && !dynamicFingerprints) {
- MOZ_LOG(gPublicKeyPinningLog, LogLevel::Debug,
- ("pkpin: No hashes found\n"));
- return NS_ERROR_INVALID_ARG;
- }
-
- nsAutoCString base64Out;
- nsresult rv = GetBase64HashSPKI(cert, base64Out);
- if (NS_FAILED(rv)) {
- MOZ_LOG(gPublicKeyPinningLog, LogLevel::Debug,
- ("pkpin: GetBase64HashSPKI failed!\n"));
- return rv;
- }
-
- if (fingerprints) {
- for (size_t i = 0; i < fingerprints->size; i++) {
- if (base64Out.Equals(fingerprints->data[i])) {
- MOZ_LOG(gPublicKeyPinningLog, LogLevel::Debug,
- ("pkpin: found pin base_64 ='%s'\n", base64Out.get()));
- certMatchesPinset = true;
- return NS_OK;
- }
- }
- }
- if (dynamicFingerprints) {
- for (size_t i = 0; i < dynamicFingerprints->Length(); i++) {
- if (base64Out.Equals((*dynamicFingerprints)[i])) {
- MOZ_LOG(gPublicKeyPinningLog, LogLevel::Debug,
- ("pkpin: found pin base_64 ='%s'\n", base64Out.get()));
- certMatchesPinset = true;
- return NS_OK;
- }
- }
- }
- return NS_OK;
-}
-
-/*
- * Sets certListIntersectsPinset to true if a given chain matches any
- * fingerprints from the given static fingerprints or the
- * dynamicFingerprints array, or to false otherwise.
- */
-static nsresult
-EvalChain(const UniqueCERTCertList& certList,
- const StaticFingerprints* fingerprints,
- const nsTArray<nsCString>* dynamicFingerprints,
- /*out*/ bool& certListIntersectsPinset)
-{
- certListIntersectsPinset = false;
- CERTCertificate* currentCert;
-
- if (!fingerprints && !dynamicFingerprints) {
- MOZ_ASSERT(false, "Must pass in at least one type of pinset");
- return NS_ERROR_FAILURE;
- }
-
- CERTCertListNode* node;
- for (node = CERT_LIST_HEAD(certList); !CERT_LIST_END(node, certList);
- node = CERT_LIST_NEXT(node)) {
- currentCert = node->cert;
- MOZ_LOG(gPublicKeyPinningLog, LogLevel::Debug,
- ("pkpin: certArray subject: '%s'\n", currentCert->subjectName));
- MOZ_LOG(gPublicKeyPinningLog, LogLevel::Debug,
- ("pkpin: certArray issuer: '%s'\n", currentCert->issuerName));
- nsresult rv = EvalCert(currentCert, fingerprints, dynamicFingerprints,
- certListIntersectsPinset);
- if (NS_FAILED(rv)) {
- return rv;
- }
- if (certListIntersectsPinset) {
- return NS_OK;
- }
- }
- MOZ_LOG(gPublicKeyPinningLog, LogLevel::Debug, ("pkpin: no matches found\n"));
- return NS_OK;
-}
-
-/**
- Comparator for the is public key pinned host.
-*/
-static int
-TransportSecurityPreloadCompare(const void* key, const void* entry) {
- auto keyStr = static_cast<const char*>(key);
- auto preloadEntry = static_cast<const TransportSecurityPreload*>(entry);
-
- return strcmp(keyStr, preloadEntry->mHost);
-}
-
-nsresult
-PublicKeyPinningService::ChainMatchesPinset(const UniqueCERTCertList& certList,
- const nsTArray<nsCString>& aSHA256keys,
- /*out*/ bool& chainMatchesPinset)
-{
- return EvalChain(certList, nullptr, &aSHA256keys, chainMatchesPinset);
-}
-
-// Returns via one of the output parameters the most relevant pinning
-// information that is valid for the given host at the given time.
-// Dynamic pins are prioritized over static pins.
-static nsresult
-FindPinningInformation(const char* hostname, mozilla::pkix::Time time,
- /*out*/ nsTArray<nsCString>& dynamicFingerprints,
- /*out*/ TransportSecurityPreload*& staticFingerprints)
-{
- if (!hostname || hostname[0] == 0) {
- return NS_ERROR_INVALID_ARG;
- }
- staticFingerprints = nullptr;
- dynamicFingerprints.Clear();
- nsCOMPtr<nsISiteSecurityService> sssService =
- do_GetService(NS_SSSERVICE_CONTRACTID);
- if (!sssService) {
- return NS_ERROR_FAILURE;
- }
- TransportSecurityPreload* foundEntry = nullptr;
- char* evalHost = const_cast<char*>(hostname);
- char* evalPart;
- // Notice how the (xx = strchr) prevents pins for unqualified domain names.
- while (!foundEntry && (evalPart = strchr(evalHost, '.'))) {
- MOZ_LOG(gPublicKeyPinningLog, LogLevel::Debug,
- ("pkpin: Querying pinsets for host: '%s'\n", evalHost));
- // Attempt dynamic pins first
- nsresult rv;
- bool found;
- bool includeSubdomains;
- nsTArray<nsCString> pinArray;
- rv = sssService->GetKeyPinsForHostname(evalHost, time, pinArray,
- &includeSubdomains, &found);
- if (NS_FAILED(rv)) {
- return rv;
- }
- if (found && (evalHost == hostname || includeSubdomains)) {
- MOZ_LOG(gPublicKeyPinningLog, LogLevel::Debug,
- ("pkpin: Found dyn match for host: '%s'\n", evalHost));
- dynamicFingerprints = pinArray;
- return NS_OK;
- }
-
- foundEntry = (TransportSecurityPreload *)bsearch(evalHost,
- kPublicKeyPinningPreloadList,
- sizeof(kPublicKeyPinningPreloadList) / sizeof(TransportSecurityPreload),
- sizeof(TransportSecurityPreload),
- TransportSecurityPreloadCompare);
- if (foundEntry) {
- MOZ_LOG(gPublicKeyPinningLog, LogLevel::Debug,
- ("pkpin: Found pinset for host: '%s'\n", evalHost));
- if (evalHost != hostname) {
- if (!foundEntry->mIncludeSubdomains) {
- // Does not apply to this host, continue iterating
- foundEntry = nullptr;
- }
- }
- } else {
- MOZ_LOG(gPublicKeyPinningLog, LogLevel::Debug,
- ("pkpin: Didn't find pinset for host: '%s'\n", evalHost));
- }
- // Add one for '.'
- evalHost = evalPart + 1;
- }
-
- if (foundEntry && foundEntry->pinset) {
- if (time > TimeFromEpochInSeconds(kPreloadPKPinsExpirationTime /
- PR_USEC_PER_SEC)) {
- return NS_OK;
- }
- staticFingerprints = foundEntry;
- }
- return NS_OK;
-}
-
-// Returns true via the output parameter if the given certificate list meets
-// pinning requirements for the given host at the given time. It must be the
-// case that either there is an intersection between the set of hashes of
-// subject public key info data in the list and the most relevant non-expired
-// pinset for the host or there is no pinning information for the host.
-static nsresult
-CheckPinsForHostname(const UniqueCERTCertList& certList, const char* hostname,
- bool enforceTestMode, mozilla::pkix::Time time,
- /*out*/ bool& chainHasValidPins)
-{
- chainHasValidPins = false;
- if (!certList) {
- return NS_ERROR_INVALID_ARG;
- }
- if (!hostname || hostname[0] == 0) {
- return NS_ERROR_INVALID_ARG;
- }
-
- nsTArray<nsCString> dynamicFingerprints;
- TransportSecurityPreload* staticFingerprints = nullptr;
- nsresult rv = FindPinningInformation(hostname, time, dynamicFingerprints,
- staticFingerprints);
- // If we have no pinning information, the certificate chain trivially
- // validates with respect to pinning.
- if (dynamicFingerprints.Length() == 0 && !staticFingerprints) {
- chainHasValidPins = true;
- return NS_OK;
- }
- if (dynamicFingerprints.Length() > 0) {
- return EvalChain(certList, nullptr, &dynamicFingerprints, chainHasValidPins);
- }
- if (staticFingerprints) {
- bool enforceTestModeResult;
- rv = EvalChain(certList, staticFingerprints->pinset, nullptr,
- enforceTestModeResult);
- if (NS_FAILED(rv)) {
- return rv;
- }
- chainHasValidPins = enforceTestModeResult;
- if (staticFingerprints->mTestMode) {
- if (!enforceTestMode) {
- chainHasValidPins = true;
- }
- }
-
- MOZ_LOG(gPublicKeyPinningLog, LogLevel::Debug,
- ("pkpin: Pin check %s for %s host '%s' (mode=%s)\n",
- enforceTestModeResult ? "passed" : "failed",
- staticFingerprints->mIsMoz ? "mozilla" : "non-mozilla",
- hostname, staticFingerprints->mTestMode ? "test" : "production"));
- }
-
- return NS_OK;
-}
-
-nsresult
-PublicKeyPinningService::ChainHasValidPins(const UniqueCERTCertList& certList,
- const char* hostname,
- mozilla::pkix::Time time,
- bool enforceTestMode,
- /*out*/ bool& chainHasValidPins)
-{
- chainHasValidPins = false;
- if (!certList) {
- return NS_ERROR_INVALID_ARG;
- }
- if (!hostname || hostname[0] == 0) {
- return NS_ERROR_INVALID_ARG;
- }
- nsAutoCString canonicalizedHostname(CanonicalizeHostname(hostname));
- return CheckPinsForHostname(certList, canonicalizedHostname.get(),
- enforceTestMode, time, chainHasValidPins);
-}
-
-nsresult
-PublicKeyPinningService::HostHasPins(const char* hostname,
- mozilla::pkix::Time time,
- bool enforceTestMode,
- /*out*/ bool& hostHasPins)
-{
- hostHasPins = false;
- nsAutoCString canonicalizedHostname(CanonicalizeHostname(hostname));
- nsTArray<nsCString> dynamicFingerprints;
- TransportSecurityPreload* staticFingerprints = nullptr;
- nsresult rv = FindPinningInformation(canonicalizedHostname.get(), time,
- dynamicFingerprints, staticFingerprints);
- if (NS_FAILED(rv)) {
- return rv;
- }
- if (dynamicFingerprints.Length() > 0) {
- hostHasPins = true;
- } else if (staticFingerprints) {
- hostHasPins = !staticFingerprints->mTestMode || enforceTestMode;
- }
- return NS_OK;
-}
-
-nsAutoCString
-PublicKeyPinningService::CanonicalizeHostname(const char* hostname)
-{
- nsAutoCString canonicalizedHostname(hostname);
- ToLowerCase(canonicalizedHostname);
- while (canonicalizedHostname.Length() > 0 &&
- canonicalizedHostname.Last() == '.') {
- canonicalizedHostname.Truncate(canonicalizedHostname.Length() - 1);
- }
- return canonicalizedHostname;
-}
diff --git a/security/manager/ssl/PublicKeyPinningService.h b/security/manager/ssl/PublicKeyPinningService.h
deleted file mode 100644
index 09fdd8474d..0000000000
--- a/security/manager/ssl/PublicKeyPinningService.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef PublicKeyPinningService_h
-#define PublicKeyPinningService_h
-
-#include "CertVerifier.h"
-#include "ScopedNSSTypes.h"
-#include "cert.h"
-#include "nsString.h"
-#include "nsTArray.h"
-#include "pkix/Time.h"
-
-namespace mozilla {
-namespace psm {
-
-class PublicKeyPinningService
-{
-public:
- /**
- * Sets chainHasValidPins to true if the given (host, certList) passes pinning
- * checks, or to false otherwise. If the host is pinned, returns true via
- * chainHasValidPins if one of the keys in the given certificate chain matches
- * the pin set specified by the hostname. The certList's head is the EE cert
- * and the tail is the trust anchor.
- * Note: if an alt name is a wildcard, it won't necessarily find a pinset
- * that would otherwise be valid for it
- */
- static nsresult ChainHasValidPins(const UniqueCERTCertList& certList,
- const char* hostname,
- mozilla::pkix::Time time,
- bool enforceTestMode,
- /*out*/ bool& chainHasValidPins);
- /**
- * Sets chainMatchesPinset to true if there is any intersection between the
- * certificate list and the pins specified in the aSHA256keys array.
- * Values passed in are assumed to be in base64 encoded form.
- */
- static nsresult ChainMatchesPinset(const UniqueCERTCertList& certList,
- const nsTArray<nsCString>& aSHA256keys,
- /*out*/ bool& chainMatchesPinset);
-
- /**
- * Returns true via the output parameter hostHasPins if there is pinning
- * information for the given host that is valid at the given time, and false
- * otherwise.
- */
- static nsresult HostHasPins(const char* hostname,
- mozilla::pkix::Time time,
- bool enforceTestMode,
- /*out*/ bool& hostHasPins);
-
- /**
- * Given a hostname of potentially mixed case with potentially multiple
- * trailing '.' (see bug 1118522), canonicalizes it to lowercase with no
- * trailing '.'.
- */
- static nsAutoCString CanonicalizeHostname(const char* hostname);
-};
-
-}} // namespace mozilla::psm
-
-#endif // PublicKeyPinningService_h
diff --git a/security/manager/ssl/SSLServerCertVerification.cpp b/security/manager/ssl/SSLServerCertVerification.cpp
index af985eb92b..37a3b809f0 100644
--- a/security/manager/ssl/SSLServerCertVerification.cpp
+++ b/security/manager/ssl/SSLServerCertVerification.cpp
@@ -425,11 +425,9 @@ CertErrorRunnable::CheckCertOverrides()
uint32_t remaining_display_errors = mCollectedErrors;
- // If this is an HTTP Strict Transport Security host or a pinned host and the
- // certificate is bad, don't allow overrides (RFC 6797 section 12.1,
- // HPKP draft spec section 2.6).
+ // If this is an HTTP Strict Transport Security host, don't allow overrides
+ // RFC 6797 section 12.1.
bool strictTransportSecurityEnabled = false;
- bool hasPinningInformation = false;
nsCOMPtr<nsISiteSecurityService> sss(do_GetService(NS_SSSERVICE_CONTRACTID));
if (!sss) {
MOZ_LOG(gPIPNSSLog, LogLevel::Debug,
@@ -449,21 +447,10 @@ CertErrorRunnable::CheckCertOverrides()
return new SSLServerCertVerificationResult(mInfoObject,
mDefaultErrorCodeToReport);
}
- nsrv = sss->IsSecureHost(nsISiteSecurityService::HEADER_HPKP,
- mInfoObject->GetHostNameRaw(),
- mProviderFlags,
- nullptr,
- &hasPinningInformation);
- if (NS_FAILED(nsrv)) {
- MOZ_LOG(gPIPNSSLog, LogLevel::Debug,
- ("[%p][%p] checking for HPKP failed\n", mFdForLogging, this));
- return new SSLServerCertVerificationResult(mInfoObject,
- mDefaultErrorCodeToReport);
- }
- if (!strictTransportSecurityEnabled && !hasPinningInformation) {
+ if (!strictTransportSecurityEnabled) {
MOZ_LOG(gPIPNSSLog, LogLevel::Debug,
- ("[%p][%p] no HSTS or HPKP - overrides allowed\n",
+ ("[%p][%p] no HSTS - overrides allowed\n",
mFdForLogging, this));
nsCOMPtr<nsICertOverrideService> overrideService =
do_GetService(NS_CERTOVERRIDE_CONTRACTID);
@@ -497,7 +484,7 @@ CertErrorRunnable::CheckCertOverrides()
}
} else {
MOZ_LOG(gPIPNSSLog, LogLevel::Debug,
- ("[%p][%p] HSTS or HPKP - no overrides allowed\n",
+ ("[%p][%p] HSTS - no overrides allowed\n",
mFdForLogging, this));
}
diff --git a/security/manager/ssl/StaticHPKPins.h b/security/manager/ssl/StaticHPKPins.h
deleted file mode 100644
index a2313ea72b..0000000000
--- a/security/manager/ssl/StaticHPKPins.h
+++ /dev/null
@@ -1,712 +0,0 @@
-/* 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 is an automatically generated file. If you're not */
-/* PublicKeyPinningService.cpp, you shouldn't be #including it. */
-/*****************************************************************************/
-#include <stdint.h>
-/* AddTrust External Root */
-static const char kAddTrust_External_RootFingerprint[] =
- "lCppFqbkrlJ3EcVFAkeip0+44VaoJUymbnOaEUk7tEU=";
-
-/* AddTrust Low-Value Services Root */
-static const char kAddTrust_Low_Value_Services_RootFingerprint[] =
- "BStocQfshOhzA4JFLsKidFF0XXSFpX1vRk4Np6G2ryo=";
-
-/* AddTrust Public Services Root */
-static const char kAddTrust_Public_Services_RootFingerprint[] =
- "OGHXtpYfzbISBFb/b8LrdwSxp0G0vZM6g3b14ZFcppg=";
-
-/* AddTrust Qualified Certificates Root */
-static const char kAddTrust_Qualified_Certificates_RootFingerprint[] =
- "xzr8Lrp3DQy8HuQfJStS6Kk9ErctzOwDHY2DnL+Bink=";
-
-/* AffirmTrust Commercial */
-static const char kAffirmTrust_CommercialFingerprint[] =
- "bEZLmlsjOl6HTadlwm8EUBDS3c/0V5TwtMfkqvpQFJU=";
-
-/* AffirmTrust Networking */
-static const char kAffirmTrust_NetworkingFingerprint[] =
- "lAcq0/WPcPkwmOWl9sBMlscQvYSdgxhJGa6Q64kK5AA=";
-
-/* AffirmTrust Premium */
-static const char kAffirmTrust_PremiumFingerprint[] =
- "x/Q7TPW3FWgpT4IrU3YmBfbd0Vyt7Oc56eLDy6YenWc=";
-
-/* AffirmTrust Premium ECC */
-static const char kAffirmTrust_Premium_ECCFingerprint[] =
- "MhmwkRT/SVo+tusAwu/qs0ACrl8KVsdnnqCHo/oDfk8=";
-
-/* Baltimore CyberTrust Root */
-static const char kBaltimore_CyberTrust_RootFingerprint[] =
- "Y9mvm0exBk1JoQ57f9Vm28jKo5lFm/woKcVxrYxu80o=";
-
-/* COMODO Certification Authority */
-static const char kCOMODO_Certification_AuthorityFingerprint[] =
- "AG1751Vd2CAmRCxPGieoDomhmJy4ezREjtIZTBgZbV4=";
-
-/* COMODO ECC Certification Authority */
-static const char kCOMODO_ECC_Certification_AuthorityFingerprint[] =
- "58qRu/uxh4gFezqAcERupSkRYBlBAvfcw7mEjGPLnNU=";
-
-/* COMODO RSA Certification Authority */
-static const char kCOMODO_RSA_Certification_AuthorityFingerprint[] =
- "grX4Ta9HpZx6tSHkmCrvpApTQGo67CYDnvprLg5yRME=";
-
-/* Comodo AAA Services root */
-static const char kComodo_AAA_Services_rootFingerprint[] =
- "vRU+17BDT2iGsXvOi76E7TQMcTLXAqj0+jGPdW7L1vM=";
-
-/* Comodo Secure Services root */
-static const char kComodo_Secure_Services_rootFingerprint[] =
- "RpHL/ehKa2BS3b4VK7DCFq4lqG5XR4E9vA8UfzOFcL4=";
-
-/* Comodo Trusted Services root */
-static const char kComodo_Trusted_Services_rootFingerprint[] =
- "4tiR77c4ZpEF1TDeXtcuKyrD9KZweLU0mz/ayklvXrg=";
-
-/* Cybertrust Global Root */
-static const char kCybertrust_Global_RootFingerprint[] =
- "foeCwVDOOVL4AuY2AjpdPpW7XWjjPoWtsroXgSXOvxU=";
-
-/* DST Root CA X3 */
-static const char kDST_Root_CA_X3Fingerprint[] =
- "Vjs8r4z+80wjNcr1YKepWQboSIRi63WsWXhIMN+eWys=";
-
-/* DigiCert Assured ID Root CA */
-static const char kDigiCert_Assured_ID_Root_CAFingerprint[] =
- "I/Lt/z7ekCWanjD0Cvj5EqXls2lOaThEA0H2Bg4BT/o=";
-
-/* DigiCert Assured ID Root G2 */
-static const char kDigiCert_Assured_ID_Root_G2Fingerprint[] =
- "8ca6Zwz8iOTfUpc8rkIPCgid1HQUT+WAbEIAZOFZEik=";
-
-/* DigiCert Assured ID Root G3 */
-static const char kDigiCert_Assured_ID_Root_G3Fingerprint[] =
- "Fe7TOVlLME+M+Ee0dzcdjW/sYfTbKwGvWJ58U7Ncrkw=";
-
-/* DigiCert Global Root CA */
-static const char kDigiCert_Global_Root_CAFingerprint[] =
- "r/mIkG3eEpVdm+u/ko/cwxzOMo1bk4TyHIlByibiA5E=";
-
-/* DigiCert Global Root G2 */
-static const char kDigiCert_Global_Root_G2Fingerprint[] =
- "i7WTqTvh0OioIruIfFR4kMPnBqrS2rdiVPl/s2uC/CY=";
-
-/* DigiCert Global Root G3 */
-static const char kDigiCert_Global_Root_G3Fingerprint[] =
- "uUwZgwDOxcBXrQcntwu+kYFpkiVkOaezL0WYEZ3anJc=";
-
-/* DigiCert High Assurance EV Root CA */
-static const char kDigiCert_High_Assurance_EV_Root_CAFingerprint[] =
- "WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18=";
-
-/* DigiCert Trusted Root G4 */
-static const char kDigiCert_Trusted_Root_G4Fingerprint[] =
- "Wd8xe/qfTwq3ylFNd3IpaqLHZbh2ZNCLluVzmeNkcpw=";
-
-/* End Entity Test Cert */
-static const char kEnd_Entity_Test_CertFingerprint[] =
- "VCIlmPM9NkgFQtrs4Oa5TeFcDu6MWRTKSNdePEhOgD8=";
-
-/* Entrust Root Certification Authority */
-static const char kEntrust_Root_Certification_AuthorityFingerprint[] =
- "bb+uANN7nNc/j7R95lkXrwDg3d9C286sIMF8AnXuIJU=";
-
-/* Entrust Root Certification Authority - EC1 */
-static const char kEntrust_Root_Certification_Authority___EC1Fingerprint[] =
- "/qK31kX7pz11PB7Jp4cMQOH3sMVh6Se5hb9xGGbjbyI=";
-
-/* Entrust Root Certification Authority - G2 */
-static const char kEntrust_Root_Certification_Authority___G2Fingerprint[] =
- "du6FkDdMcVQ3u8prumAo6t3i3G27uMP2EOhR8R0at/U=";
-
-/* Entrust.net Premium 2048 Secure Server CA */
-static const char kEntrust_net_Premium_2048_Secure_Server_CAFingerprint[] =
- "HqPF5D7WbC2imDpCpKebHpBnhs6fG1hiFBmgBGOofTg=";
-
-/* FacebookBackup */
-static const char kFacebookBackupFingerprint[] =
- "q4PO2G2cbkZhZ82+JgmRUyGMoAeozA+BSXVXQWB8XWQ=";
-
-/* GOOGLE_PIN_COMODORSADomainValidationSecureServerCA */
-static const char kGOOGLE_PIN_COMODORSADomainValidationSecureServerCAFingerprint[] =
- "klO23nT2ehFDXCfx3eHTDRESMz3asj1muO+4aIdjiuY=";
-
-/* GOOGLE_PIN_DigiCertECCSecureServerCA */
-static const char kGOOGLE_PIN_DigiCertECCSecureServerCAFingerprint[] =
- "PZXN3lRAy+8tBKk2Ox6F7jIlnzr2Yzmwqc3JnyfXoCw=";
-
-/* GOOGLE_PIN_DigiCertSHA2HighAssuranceServerCA */
-static const char kGOOGLE_PIN_DigiCertSHA2HighAssuranceServerCAFingerprint[] =
- "k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws=";
-
-/* GOOGLE_PIN_Entrust_SSL */
-static const char kGOOGLE_PIN_Entrust_SSLFingerprint[] =
- "nsxRNo6G40YPZsKV5JQt1TCA8nseQQr/LRqp1Oa8fnw=";
-
-/* GOOGLE_PIN_GTECyberTrustGlobalRoot */
-static const char kGOOGLE_PIN_GTECyberTrustGlobalRootFingerprint[] =
- "EGn6R6CqT4z3ERscrqNl7q7RC//zJmDe9uBhS/rnCHU=";
-
-/* GOOGLE_PIN_GoDaddySecure */
-static const char kGOOGLE_PIN_GoDaddySecureFingerprint[] =
- "MrZLZnJ6IGPkBm87lYywqu5Xal7O/ZUzmbuIdHMdlYc=";
-
-/* GOOGLE_PIN_GoogleG2 */
-static const char kGOOGLE_PIN_GoogleG2Fingerprint[] =
- "7HIpactkIAq2Y49orFOOQKurWxmmSFZhBCoQYcRhJ3Y=";
-
-/* GOOGLE_PIN_LetsEncryptAuthorityBackup_X2_X4 */
-static const char kGOOGLE_PIN_LetsEncryptAuthorityBackup_X2_X4Fingerprint[] =
- "sRHdihwgkaib1P1gxX8HFszlD+7/gTfNvuAybgLPNis=";
-
-/* GOOGLE_PIN_LetsEncryptAuthorityPrimary_X1_X3 */
-static const char kGOOGLE_PIN_LetsEncryptAuthorityPrimary_X1_X3Fingerprint[] =
- "YLh1dUR9y6Kja30RrAn7JKnbQG/uEtLMkBgFF2Fuihg=";
-
-/* GOOGLE_PIN_RapidSSL */
-static const char kGOOGLE_PIN_RapidSSLFingerprint[] =
- "lT09gPUeQfbYrlxRtpsHrjDblj9Rpz+u7ajfCrg4qDM=";
-
-/* GOOGLE_PIN_SymantecClass3EVG3 */
-static const char kGOOGLE_PIN_SymantecClass3EVG3Fingerprint[] =
- "gMxWOrX4PMQesK9qFNbYBxjBfjUvlkn/vN1n+L9lE5E=";
-
-/* GOOGLE_PIN_UTNDATACorpSGC */
-static const char kGOOGLE_PIN_UTNDATACorpSGCFingerprint[] =
- "QAL80xHQczFWfnG82XHkYEjI3OjRZZcRdTs9qiommvo=";
-
-/* GOOGLE_PIN_VeriSignClass1 */
-static const char kGOOGLE_PIN_VeriSignClass1Fingerprint[] =
- "LclHC+Y+9KzxvYKGCUArt7h72ZY4pkOTTohoLRvowwg=";
-
-/* GOOGLE_PIN_VeriSignClass2_G2 */
-static const char kGOOGLE_PIN_VeriSignClass2_G2Fingerprint[] =
- "2oALgLKofTmeZvoZ1y/fSZg7R9jPMix8eVA6DH4o/q8=";
-
-/* GOOGLE_PIN_VeriSignClass3_G2 */
-static const char kGOOGLE_PIN_VeriSignClass3_G2Fingerprint[] =
- "AjyBzOjnxk+pQtPBUEhwfTXZu1uH9PVExb8bxWQ68vo=";
-
-/* GOOGLE_PIN_VeriSignClass4_G3 */
-static const char kGOOGLE_PIN_VeriSignClass4_G3Fingerprint[] =
- "VnuCEf0g09KD7gzXzgZyy52ZvFtIeljJ1U7Gf3fUqPU=";
-
-/* GeoTrust Global CA */
-static const char kGeoTrust_Global_CAFingerprint[] =
- "h6801m+z8v3zbgkRHpq6L29Esgfzhj89C1SyUCOQmqU=";
-
-/* GeoTrust Global CA 2 */
-static const char kGeoTrust_Global_CA_2Fingerprint[] =
- "F3VaXClfPS1y5vAxofB/QAxYi55YKyLxfq4xoVkNEYU=";
-
-/* GeoTrust Primary Certification Authority */
-static const char kGeoTrust_Primary_Certification_AuthorityFingerprint[] =
- "SQVGZiOrQXi+kqxcvWWE96HhfydlLVqFr4lQTqI5qqo=";
-
-/* GeoTrust Primary Certification Authority - G2 */
-static const char kGeoTrust_Primary_Certification_Authority___G2Fingerprint[] =
- "vPtEqrmtAhAVcGtBIep2HIHJ6IlnWQ9vlK50TciLePs=";
-
-/* GeoTrust Primary Certification Authority - G3 */
-static const char kGeoTrust_Primary_Certification_Authority___G3Fingerprint[] =
- "q5hJUnat8eyv8o81xTBIeB5cFxjaucjmelBPT2pRMo8=";
-
-/* GeoTrust Universal CA */
-static const char kGeoTrust_Universal_CAFingerprint[] =
- "lpkiXF3lLlbN0y3y6W0c/qWqPKC7Us2JM8I7XCdEOCA=";
-
-/* GeoTrust Universal CA 2 */
-static const char kGeoTrust_Universal_CA_2Fingerprint[] =
- "fKoDRlEkWQxgHlZ+UhSOlSwM/+iQAFMP4NlbbVDqrkE=";
-
-/* GlobalSign ECC Root CA - R4 */
-static const char kGlobalSign_ECC_Root_CA___R4Fingerprint[] =
- "CLOmM1/OXvSPjw5UOYbAf9GKOxImEp9hhku9W90fHMk=";
-
-/* GlobalSign ECC Root CA - R5 */
-static const char kGlobalSign_ECC_Root_CA___R5Fingerprint[] =
- "fg6tdrtoGdwvVFEahDVPboswe53YIFjqbABPAdndpd8=";
-
-/* GlobalSign Root CA */
-static const char kGlobalSign_Root_CAFingerprint[] =
- "K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q=";
-
-/* GlobalSign Root CA - R2 */
-static const char kGlobalSign_Root_CA___R2Fingerprint[] =
- "iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0=";
-
-/* GlobalSign Root CA - R3 */
-static const char kGlobalSign_Root_CA___R3Fingerprint[] =
- "cGuxAXyFXFkWm61cF4HPWX8S0srS9j0aSqN0k4AP+4A=";
-
-/* Go Daddy Class 2 CA */
-static const char kGo_Daddy_Class_2_CAFingerprint[] =
- "VjLZe/p3W/PJnd6lL8JVNBCGQBZynFLdZSTIqcO0SJ8=";
-
-/* Go Daddy Root Certificate Authority - G2 */
-static const char kGo_Daddy_Root_Certificate_Authority___G2Fingerprint[] =
- "Ko8tivDrEjiY90yGasP6ZpBU4jwXvHqVvQI0GS3GNdA=";
-
-/* GoogleBackup2048 */
-static const char kGoogleBackup2048Fingerprint[] =
- "IPMbDAjLVSGntGO3WP53X/zilCVndez5YJ2+vJvhJsA=";
-
-/* SpiderOak2 */
-static const char kSpiderOak2Fingerprint[] =
- "7Y3UnxbffL8aFPXsOJBpGasgpDmngpIhAxGKdQRklQQ=";
-
-/* SpiderOak3 */
-static const char kSpiderOak3Fingerprint[] =
- "LkER54vOdlygpTsbYvlpMq1CE/lDAG1AP9xmdtwvV2A=";
-
-/* Starfield Class 2 CA */
-static const char kStarfield_Class_2_CAFingerprint[] =
- "FfFKxFycfaIz00eRZOgTf+Ne4POK6FgYPwhBDqgqxLQ=";
-
-/* Starfield Root Certificate Authority - G2 */
-static const char kStarfield_Root_Certificate_Authority___G2Fingerprint[] =
- "gI1os/q0iEpflxrOfRBVDXqVoWN3Tz7Dav/7IT++THQ=";
-
-/* Swehack */
-static const char kSwehackFingerprint[] =
- "FdaffE799rVb3oyAuhJ2mBW/XJwD07Uajb2G6YwSAEw=";
-
-/* SwehackBackup */
-static const char kSwehackBackupFingerprint[] =
- "z6cuswA6E1vgFkCjUsbEYo0Lf3aP8M8YOvwkoiGzDCo=";
-
-/* TestSPKI */
-static const char kTestSPKIFingerprint[] =
- "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
-
-/* Tor1 */
-static const char kTor1Fingerprint[] =
- "bYz9JTDk89X3qu3fgswG+lBQso5vI0N1f0Rx4go4nLo=";
-
-/* Tor2 */
-static const char kTor2Fingerprint[] =
- "xXCxhTdn7uxXneJSbQCqoAvuW3ZtQl2pDVTf2sewS8w=";
-
-/* Tor3 */
-static const char kTor3Fingerprint[] =
- "CleC1qwUR8JPgH1nXvSe2VHxDe5/KfNs96EusbfSOfo=";
-
-/* TumblrBackup */
-static const char kTumblrBackupFingerprint[] =
- "avlD96PLERV78IN1fD+ab5cupkUDD9wTZWJjHX6VC9w=";
-
-/* Twitter1 */
-static const char kTwitter1Fingerprint[] =
- "vU9M48LzD/CF34wE5PPf4nBwRyosy06X21J0ap8yS5s=";
-
-/* USERTrust ECC Certification Authority */
-static const char kUSERTrust_ECC_Certification_AuthorityFingerprint[] =
- "ICGRfpgmOUXIWcQ/HXPLQTkFPEFPoDyjvH7ohhQpjzs=";
-
-/* USERTrust RSA Certification Authority */
-static const char kUSERTrust_RSA_Certification_AuthorityFingerprint[] =
- "x4QzPSC810K5/cMjb05Qm4k3Bw5zBn4lTdO/nEW/Td4=";
-
-/* UTN USERFirst Email Root CA */
-static const char kUTN_USERFirst_Email_Root_CAFingerprint[] =
- "Laj56jRU0hFGRko/nQKNxMf7tXscUsc8KwVyovWZotM=";
-
-/* UTN USERFirst Hardware Root CA */
-static const char kUTN_USERFirst_Hardware_Root_CAFingerprint[] =
- "TUDnr0MEoJ3of7+YliBMBVFB4/gJsv5zO7IxD9+YoWI=";
-
-/* UTN USERFirst Object Root CA */
-static const char kUTN_USERFirst_Object_Root_CAFingerprint[] =
- "D+FMJksXu28NZT56cOs2Pb9UvhWAOe3a5cJXEd9IwQM=";
-
-/* VeriSign Class 3 Public Primary Certification Authority - G4 */
-static const char kVeriSign_Class_3_Public_Primary_Certification_Authority___G4Fingerprint[] =
- "UZJDjsNp1+4M5x9cbbdflB779y5YRBcV6Z6rBMLIrO4=";
-
-/* VeriSign Class 3 Public Primary Certification Authority - G5 */
-static const char kVeriSign_Class_3_Public_Primary_Certification_Authority___G5Fingerprint[] =
- "JbQbUG5JMJUoI6brnx0x3vZF6jilxsapbXGVfjhN8Fg=";
-
-/* VeriSign Universal Root Certification Authority */
-static const char kVeriSign_Universal_Root_Certification_AuthorityFingerprint[] =
- "lnsM2T/O9/J84sJFdnrpsFp3awZJ+ZZbYpCWhGloaHI=";
-
-/* Verisign Class 1 Public Primary Certification Authority - G3 */
-static const char kVerisign_Class_1_Public_Primary_Certification_Authority___G3Fingerprint[] =
- "IgduWu9Eu5pBaii30cRDItcFn2D+/6XK9sW+hEeJEwM=";
-
-/* Verisign Class 2 Public Primary Certification Authority - G3 */
-static const char kVerisign_Class_2_Public_Primary_Certification_Authority___G3Fingerprint[] =
- "cAajgxHlj7GTSEIzIYIQxmEloOSoJq7VOaxWHfv72QM=";
-
-/* Verisign Class 3 Public Primary Certification Authority - G3 */
-static const char kVerisign_Class_3_Public_Primary_Certification_Authority___G3Fingerprint[] =
- "SVqWumuteCQHvVIaALrOZXuzVVVeS7f4FGxxu6V+es4=";
-
-/* YahooBackup1 */
-static const char kYahooBackup1Fingerprint[] =
- "2fRAUXyxl4A1/XHrKNBmc8bTkzA7y4FB/GLJuNAzCqY=";
-
-/* YahooBackup2 */
-static const char kYahooBackup2Fingerprint[] =
- "dolnbtzEBnELx/9lOEQ22e6OZO/QNb6VSSX2XHA3E7A=";
-
-/* thawte Primary Root CA */
-static const char kthawte_Primary_Root_CAFingerprint[] =
- "HXXQgxueCIU5TTLHob/bPbwcKOKw6DkfsTWYHbxbqTY=";
-
-/* thawte Primary Root CA - G2 */
-static const char kthawte_Primary_Root_CA___G2Fingerprint[] =
- "Z9xPMvoQ59AaeaBzqgyeAhLsL/w9d54Kp/nA8OHCyJM=";
-
-/* thawte Primary Root CA - G3 */
-static const char kthawte_Primary_Root_CA___G3Fingerprint[] =
- "GQbGEk27Q4V40A4GbVBUxsN/D6YCjAVUXgmU7drshik=";
-
-/* Pinsets are each an ordered list by the actual value of the fingerprint */
-struct StaticFingerprints {
- const size_t size;
- const char* const* data;
-};
-
-/* PreloadedHPKPins.json pinsets */
-static const char* const kPinset_google_root_pems_Data[] = {
- kEntrust_Root_Certification_Authority___EC1Fingerprint,
- kComodo_Trusted_Services_rootFingerprint,
- kCOMODO_ECC_Certification_AuthorityFingerprint,
- kDigiCert_Assured_ID_Root_G2Fingerprint,
- kCOMODO_Certification_AuthorityFingerprint,
- kAddTrust_Low_Value_Services_RootFingerprint,
- kGlobalSign_ECC_Root_CA___R4Fingerprint,
- kGeoTrust_Global_CA_2Fingerprint,
- kDigiCert_Assured_ID_Root_G3Fingerprint,
- kStarfield_Class_2_CAFingerprint,
- kthawte_Primary_Root_CA___G3Fingerprint,
- kthawte_Primary_Root_CAFingerprint,
- kEntrust_net_Premium_2048_Secure_Server_CAFingerprint,
- kDigiCert_Assured_ID_Root_CAFingerprint,
- kUSERTrust_ECC_Certification_AuthorityFingerprint,
- kVeriSign_Class_3_Public_Primary_Certification_Authority___G5Fingerprint,
- kGlobalSign_Root_CAFingerprint,
- kGo_Daddy_Root_Certificate_Authority___G2Fingerprint,
- kAffirmTrust_Premium_ECCFingerprint,
- kAddTrust_Public_Services_RootFingerprint,
- kComodo_Secure_Services_rootFingerprint,
- kGeoTrust_Primary_Certification_AuthorityFingerprint,
- kVerisign_Class_3_Public_Primary_Certification_Authority___G3Fingerprint,
- kUTN_USERFirst_Hardware_Root_CAFingerprint,
- kVeriSign_Class_3_Public_Primary_Certification_Authority___G4Fingerprint,
- kGo_Daddy_Class_2_CAFingerprint,
- kDigiCert_Trusted_Root_G4Fingerprint,
- kDigiCert_High_Assurance_EV_Root_CAFingerprint,
- kBaltimore_CyberTrust_RootFingerprint,
- kthawte_Primary_Root_CA___G2Fingerprint,
- kAffirmTrust_CommercialFingerprint,
- kEntrust_Root_Certification_AuthorityFingerprint,
- kGlobalSign_Root_CA___R3Fingerprint,
- kEntrust_Root_Certification_Authority___G2Fingerprint,
- kGeoTrust_Universal_CA_2Fingerprint,
- kGlobalSign_ECC_Root_CA___R5Fingerprint,
- kCybertrust_Global_RootFingerprint,
- kStarfield_Root_Certificate_Authority___G2Fingerprint,
- kCOMODO_RSA_Certification_AuthorityFingerprint,
- kGeoTrust_Global_CAFingerprint,
- kDigiCert_Global_Root_G2Fingerprint,
- kGlobalSign_Root_CA___R2Fingerprint,
- kAffirmTrust_NetworkingFingerprint,
- kAddTrust_External_RootFingerprint,
- kVeriSign_Universal_Root_Certification_AuthorityFingerprint,
- kGeoTrust_Universal_CAFingerprint,
- kGeoTrust_Primary_Certification_Authority___G3Fingerprint,
- kDigiCert_Global_Root_CAFingerprint,
- kDigiCert_Global_Root_G3Fingerprint,
- kGeoTrust_Primary_Certification_Authority___G2Fingerprint,
- kComodo_AAA_Services_rootFingerprint,
- kAffirmTrust_PremiumFingerprint,
- kUSERTrust_RSA_Certification_AuthorityFingerprint,
- kAddTrust_Qualified_Certificates_RootFingerprint,
-};
-static const StaticFingerprints kPinset_google_root_pems = {
- sizeof(kPinset_google_root_pems_Data) / sizeof(const char*),
- kPinset_google_root_pems_Data
-};
-
-static const char* const kPinset_mozilla_Data[] = {
- kGeoTrust_Global_CA_2Fingerprint,
- kthawte_Primary_Root_CA___G3Fingerprint,
- kthawte_Primary_Root_CAFingerprint,
- kDigiCert_Assured_ID_Root_CAFingerprint,
- kVerisign_Class_1_Public_Primary_Certification_Authority___G3Fingerprint,
- kVeriSign_Class_3_Public_Primary_Certification_Authority___G5Fingerprint,
- kGeoTrust_Primary_Certification_AuthorityFingerprint,
- kVerisign_Class_3_Public_Primary_Certification_Authority___G3Fingerprint,
- kVeriSign_Class_3_Public_Primary_Certification_Authority___G4Fingerprint,
- kDigiCert_High_Assurance_EV_Root_CAFingerprint,
- kBaltimore_CyberTrust_RootFingerprint,
- kthawte_Primary_Root_CA___G2Fingerprint,
- kVerisign_Class_2_Public_Primary_Certification_Authority___G3Fingerprint,
- kGeoTrust_Universal_CA_2Fingerprint,
- kGeoTrust_Global_CAFingerprint,
- kVeriSign_Universal_Root_Certification_AuthorityFingerprint,
- kGeoTrust_Universal_CAFingerprint,
- kGeoTrust_Primary_Certification_Authority___G3Fingerprint,
- kDigiCert_Global_Root_CAFingerprint,
- kGeoTrust_Primary_Certification_Authority___G2Fingerprint,
-};
-static const StaticFingerprints kPinset_mozilla = {
- sizeof(kPinset_mozilla_Data) / sizeof(const char*),
- kPinset_mozilla_Data
-};
-
-static const char* const kPinset_mozilla_services_Data[] = {
- kDigiCert_Global_Root_CAFingerprint,
-};
-static const StaticFingerprints kPinset_mozilla_services = {
- sizeof(kPinset_mozilla_services_Data) / sizeof(const char*),
- kPinset_mozilla_services_Data
-};
-
-static const char* const kPinset_mozilla_test_Data[] = {
- kEnd_Entity_Test_CertFingerprint,
-};
-static const StaticFingerprints kPinset_mozilla_test = {
- sizeof(kPinset_mozilla_test_Data) / sizeof(const char*),
- kPinset_mozilla_test_Data
-};
-
-/* Chrome static pinsets */
-static const char* const kPinset_test_Data[] = {
- kTestSPKIFingerprint,
-};
-static const StaticFingerprints kPinset_test = {
- sizeof(kPinset_test_Data) / sizeof(const char*),
- kPinset_test_Data
-};
-
-static const char* const kPinset_google_Data[] = {
- kGOOGLE_PIN_GoogleG2Fingerprint,
- kGoogleBackup2048Fingerprint,
- kGeoTrust_Global_CAFingerprint,
- kGlobalSign_Root_CA___R2Fingerprint,
-};
-static const StaticFingerprints kPinset_google = {
- sizeof(kPinset_google_Data) / sizeof(const char*),
- kPinset_google_Data
-};
-
-static const char* const kPinset_tor_Data[] = {
- kTor3Fingerprint,
- kDigiCert_High_Assurance_EV_Root_CAFingerprint,
- kGOOGLE_PIN_LetsEncryptAuthorityPrimary_X1_X3Fingerprint,
- kTor1Fingerprint,
- kGOOGLE_PIN_RapidSSLFingerprint,
- kGOOGLE_PIN_LetsEncryptAuthorityBackup_X2_X4Fingerprint,
- kTor2Fingerprint,
-};
-static const StaticFingerprints kPinset_tor = {
- sizeof(kPinset_tor_Data) / sizeof(const char*),
- kPinset_tor_Data
-};
-
-static const char* const kPinset_twitterCom_Data[] = {
- kGOOGLE_PIN_VeriSignClass2_G2Fingerprint,
- kGOOGLE_PIN_VeriSignClass3_G2Fingerprint,
- kGeoTrust_Global_CA_2Fingerprint,
- kDigiCert_Assured_ID_Root_CAFingerprint,
- kVerisign_Class_1_Public_Primary_Certification_Authority___G3Fingerprint,
- kVeriSign_Class_3_Public_Primary_Certification_Authority___G5Fingerprint,
- kGOOGLE_PIN_VeriSignClass1Fingerprint,
- kGeoTrust_Primary_Certification_AuthorityFingerprint,
- kVerisign_Class_3_Public_Primary_Certification_Authority___G3Fingerprint,
- kVeriSign_Class_3_Public_Primary_Certification_Authority___G4Fingerprint,
- kGOOGLE_PIN_VeriSignClass4_G3Fingerprint,
- kDigiCert_High_Assurance_EV_Root_CAFingerprint,
- kVerisign_Class_2_Public_Primary_Certification_Authority___G3Fingerprint,
- kGeoTrust_Universal_CA_2Fingerprint,
- kGeoTrust_Global_CAFingerprint,
- kVeriSign_Universal_Root_Certification_AuthorityFingerprint,
- kGeoTrust_Universal_CAFingerprint,
- kGeoTrust_Primary_Certification_Authority___G3Fingerprint,
- kDigiCert_Global_Root_CAFingerprint,
- kGeoTrust_Primary_Certification_Authority___G2Fingerprint,
- kTwitter1Fingerprint,
-};
-static const StaticFingerprints kPinset_twitterCom = {
- sizeof(kPinset_twitterCom_Data) / sizeof(const char*),
- kPinset_twitterCom_Data
-};
-
-static const char* const kPinset_twitterCDN_Data[] = {
- kGOOGLE_PIN_VeriSignClass2_G2Fingerprint,
- kComodo_Trusted_Services_rootFingerprint,
- kCOMODO_Certification_AuthorityFingerprint,
- kGOOGLE_PIN_VeriSignClass3_G2Fingerprint,
- kAddTrust_Low_Value_Services_RootFingerprint,
- kUTN_USERFirst_Object_Root_CAFingerprint,
- kGOOGLE_PIN_GTECyberTrustGlobalRootFingerprint,
- kGeoTrust_Global_CA_2Fingerprint,
- kEntrust_net_Premium_2048_Secure_Server_CAFingerprint,
- kDigiCert_Assured_ID_Root_CAFingerprint,
- kVerisign_Class_1_Public_Primary_Certification_Authority___G3Fingerprint,
- kVeriSign_Class_3_Public_Primary_Certification_Authority___G5Fingerprint,
- kGlobalSign_Root_CAFingerprint,
- kUTN_USERFirst_Email_Root_CAFingerprint,
- kGOOGLE_PIN_VeriSignClass1Fingerprint,
- kAddTrust_Public_Services_RootFingerprint,
- kGOOGLE_PIN_UTNDATACorpSGCFingerprint,
- kComodo_Secure_Services_rootFingerprint,
- kGeoTrust_Primary_Certification_AuthorityFingerprint,
- kVerisign_Class_3_Public_Primary_Certification_Authority___G3Fingerprint,
- kUTN_USERFirst_Hardware_Root_CAFingerprint,
- kVeriSign_Class_3_Public_Primary_Certification_Authority___G4Fingerprint,
- kGOOGLE_PIN_VeriSignClass4_G3Fingerprint,
- kDigiCert_High_Assurance_EV_Root_CAFingerprint,
- kBaltimore_CyberTrust_RootFingerprint,
- kEntrust_Root_Certification_AuthorityFingerprint,
- kVerisign_Class_2_Public_Primary_Certification_Authority___G3Fingerprint,
- kGlobalSign_Root_CA___R3Fingerprint,
- kEntrust_Root_Certification_Authority___G2Fingerprint,
- kGeoTrust_Universal_CA_2Fingerprint,
- kGeoTrust_Global_CAFingerprint,
- kGlobalSign_Root_CA___R2Fingerprint,
- kAddTrust_External_RootFingerprint,
- kVeriSign_Universal_Root_Certification_AuthorityFingerprint,
- kGeoTrust_Universal_CAFingerprint,
- kGOOGLE_PIN_Entrust_SSLFingerprint,
- kGeoTrust_Primary_Certification_Authority___G3Fingerprint,
- kDigiCert_Global_Root_CAFingerprint,
- kGeoTrust_Primary_Certification_Authority___G2Fingerprint,
- kComodo_AAA_Services_rootFingerprint,
- kTwitter1Fingerprint,
- kAddTrust_Qualified_Certificates_RootFingerprint,
-};
-static const StaticFingerprints kPinset_twitterCDN = {
- sizeof(kPinset_twitterCDN_Data) / sizeof(const char*),
- kPinset_twitterCDN_Data
-};
-
-static const char* const kPinset_dropbox_Data[] = {
- kEntrust_Root_Certification_Authority___EC1Fingerprint,
- kEntrust_net_Premium_2048_Secure_Server_CAFingerprint,
- kDigiCert_Assured_ID_Root_CAFingerprint,
- kGo_Daddy_Root_Certificate_Authority___G2Fingerprint,
- kGOOGLE_PIN_GoDaddySecureFingerprint,
- kGo_Daddy_Class_2_CAFingerprint,
- kDigiCert_High_Assurance_EV_Root_CAFingerprint,
- kEntrust_Root_Certification_AuthorityFingerprint,
- kEntrust_Root_Certification_Authority___G2Fingerprint,
- kDigiCert_Global_Root_CAFingerprint,
-};
-static const StaticFingerprints kPinset_dropbox = {
- sizeof(kPinset_dropbox_Data) / sizeof(const char*),
- kPinset_dropbox_Data
-};
-
-static const char* const kPinset_facebook_Data[] = {
- kGOOGLE_PIN_DigiCertECCSecureServerCAFingerprint,
- kDigiCert_High_Assurance_EV_Root_CAFingerprint,
- kGOOGLE_PIN_SymantecClass3EVG3Fingerprint,
- kFacebookBackupFingerprint,
-};
-static const StaticFingerprints kPinset_facebook = {
- sizeof(kPinset_facebook_Data) / sizeof(const char*),
- kPinset_facebook_Data
-};
-
-static const char* const kPinset_spideroak_Data[] = {
- kSpiderOak2Fingerprint,
- kSpiderOak3Fingerprint,
- kDigiCert_High_Assurance_EV_Root_CAFingerprint,
- kGeoTrust_Global_CAFingerprint,
-};
-static const StaticFingerprints kPinset_spideroak = {
- sizeof(kPinset_spideroak_Data) / sizeof(const char*),
- kPinset_spideroak_Data
-};
-
-static const char* const kPinset_yahoo_Data[] = {
- kYahooBackup1Fingerprint,
- kGOOGLE_PIN_VeriSignClass2_G2Fingerprint,
- kDigiCert_Assured_ID_Root_CAFingerprint,
- kVeriSign_Class_3_Public_Primary_Certification_Authority___G5Fingerprint,
- kVerisign_Class_3_Public_Primary_Certification_Authority___G3Fingerprint,
- kVeriSign_Class_3_Public_Primary_Certification_Authority___G4Fingerprint,
- kDigiCert_Trusted_Root_G4Fingerprint,
- kDigiCert_High_Assurance_EV_Root_CAFingerprint,
- kVerisign_Class_2_Public_Primary_Certification_Authority___G3Fingerprint,
- kYahooBackup2Fingerprint,
- kDigiCert_Global_Root_G2Fingerprint,
- kVeriSign_Universal_Root_Certification_AuthorityFingerprint,
- kDigiCert_Global_Root_CAFingerprint,
- kDigiCert_Global_Root_G3Fingerprint,
-};
-static const StaticFingerprints kPinset_yahoo = {
- sizeof(kPinset_yahoo_Data) / sizeof(const char*),
- kPinset_yahoo_Data
-};
-
-static const char* const kPinset_swehackCom_Data[] = {
- kSwehackFingerprint,
- kDST_Root_CA_X3Fingerprint,
- kGOOGLE_PIN_LetsEncryptAuthorityPrimary_X1_X3Fingerprint,
- kGOOGLE_PIN_COMODORSADomainValidationSecureServerCAFingerprint,
- kGOOGLE_PIN_LetsEncryptAuthorityBackup_X2_X4Fingerprint,
- kSwehackBackupFingerprint,
-};
-static const StaticFingerprints kPinset_swehackCom = {
- sizeof(kPinset_swehackCom_Data) / sizeof(const char*),
- kPinset_swehackCom_Data
-};
-
-static const char* const kPinset_ncsccs_Data[] = {
- kCOMODO_ECC_Certification_AuthorityFingerprint,
- kDigiCert_Assured_ID_Root_CAFingerprint,
- kDigiCert_High_Assurance_EV_Root_CAFingerprint,
- kBaltimore_CyberTrust_RootFingerprint,
- kGOOGLE_PIN_LetsEncryptAuthorityPrimary_X1_X3Fingerprint,
- kCOMODO_RSA_Certification_AuthorityFingerprint,
- kAddTrust_External_RootFingerprint,
- kDigiCert_Global_Root_CAFingerprint,
- kGOOGLE_PIN_LetsEncryptAuthorityBackup_X2_X4Fingerprint,
-};
-static const StaticFingerprints kPinset_ncsccs = {
- sizeof(kPinset_ncsccs_Data) / sizeof(const char*),
- kPinset_ncsccs_Data
-};
-
-static const char* const kPinset_tumblr_Data[] = {
- kDigiCert_High_Assurance_EV_Root_CAFingerprint,
- kTumblrBackupFingerprint,
- kGOOGLE_PIN_DigiCertSHA2HighAssuranceServerCAFingerprint,
-};
-static const StaticFingerprints kPinset_tumblr = {
- sizeof(kPinset_tumblr_Data) / sizeof(const char*),
- kPinset_tumblr_Data
-};
-
-/* Domainlist */
-struct TransportSecurityPreload {
- const char* mHost;
- const bool mIncludeSubdomains;
- const bool mTestMode;
- const bool mIsMoz;
- const int32_t mId;
- const StaticFingerprints* pinset;
-};
-
-/* Sort hostnames for binary search. */
-static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = {
- { "exclude-subdomains.pinning.example.com", false, false, false, 0, &kPinset_mozilla_test },
- { "include-subdomains.pinning.example.com", true, false, false, -1, &kPinset_mozilla_test },
- { "test-mode.pinning.example.com", true, true, false, -1, &kPinset_mozilla_test },
-};
-
-// Pinning Preload List Length = 3;
-
-static const int32_t kUnknownId = -1;
-
-static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1609459199000000);
diff --git a/security/manager/ssl/moz.build b/security/manager/ssl/moz.build
index 94d766a0b0..151c5b88a6 100644
--- a/security/manager/ssl/moz.build
+++ b/security/manager/ssl/moz.build
@@ -127,13 +127,11 @@ UNIFIED_SOURCES += [
'nsSecureBrowserUIImpl.cpp',
'nsSecurityHeaderParser.cpp',
'NSSErrorsService.cpp',
- 'nsSiteSecurityService.cpp',
'nsSSLSocketProvider.cpp',
'nsSSLStatus.cpp',
'nsTLSSocketProvider.cpp',
'PSMContentListener.cpp',
'PSMRunnable.cpp',
- 'PublicKeyPinningService.cpp',
'SecretDecoderRing.cpp',
'SharedSSLState.cpp',
'SSLServerCertVerification.cpp',
@@ -141,6 +139,10 @@ UNIFIED_SOURCES += [
'WeakCryptoOverride.cpp',
]
+# nsSiteSecurityService exceeded the obj file sections limit because of the
+# HSTS preload list so it cannot be built in UNIFIED mode.
+SOURCES += ['nsSiteSecurityService.cpp']
+
IPDL_SOURCES += [
'PPSMContentDownloader.ipdl',
]
diff --git a/security/manager/ssl/nsISiteSecurityService.idl b/security/manager/ssl/nsISiteSecurityService.idl
index b615771524..d0e5f61eda 100644
--- a/security/manager/ssl/nsISiteSecurityService.idl
+++ b/security/manager/ssl/nsISiteSecurityService.idl
@@ -23,11 +23,11 @@ namespace mozilla
[ref] native nsCStringTArrayRef(nsTArray<nsCString>);
[ref] native mozillaPkixTime(mozilla::pkix::Time);
-[scriptable, uuid(233908bd-6741-4474-a6e1-f298c6ce9eaf)]
+[scriptable, uuid(91ea3803-9c79-45d9-97bf-88bc80269236)]
interface nsISiteSecurityService : nsISupports
{
const uint32_t HEADER_HSTS = 0;
- const uint32_t HEADER_HPKP = 1;
+ const uint32_t HEADER_HPKP = 1; /* no longer used */
const uint32_t HEADER_OMS = 2;
const uint32_t Success = 0;
@@ -39,10 +39,10 @@ interface nsISiteSecurityService : nsISupports
const uint32_t ERROR_INVALID_MAX_AGE = 6;
const uint32_t ERROR_MULTIPLE_INCLUDE_SUBDOMAINS = 7;
const uint32_t ERROR_INVALID_INCLUDE_SUBDOMAINS = 8;
- const uint32_t ERROR_INVALID_PIN = 9;
- const uint32_t ERROR_MULTIPLE_REPORT_URIS = 10;
- const uint32_t ERROR_PINSET_DOES_NOT_MATCH_CHAIN = 11;
- const uint32_t ERROR_NO_BACKUP_PIN = 12;
+ const uint32_t ERROR_INVALID_PIN = 9; /* no longer used */
+ const uint32_t ERROR_MULTIPLE_REPORT_URIS = 10; /* no longer used */
+ const uint32_t ERROR_PINSET_DOES_NOT_MATCH_CHAIN = 11; /* no longer used */
+ const uint32_t ERROR_NO_BACKUP_PIN = 12; /* no longer used */
const uint32_t ERROR_COULD_NOT_SAVE_STATE = 13;
const uint32_t ERROR_ROOT_NOT_BUILT_IN = 14;
@@ -106,13 +106,10 @@ interface nsISiteSecurityService : nsISupports
* @param aURI the URI of the target host
* @param aFlags options for this request as defined in nsISocketProvider:
* NO_PERMANENT_STORAGE
- * @param force if set, forces no-HSTS state by writing a knockout value,
- * overriding any preload list state
*/
void removeState(in uint32_t aType,
in nsIURI aURI,
- in uint32_t aFlags,
- [optional] in boolean force);
+ in uint32_t aFlags);
/**
* See isSecureURI
@@ -153,47 +150,6 @@ interface nsISiteSecurityService : nsISupports
* settings.
*/
void clearAll();
-
- /**
- * Removes all preloaded security state.
- */
- void clearPreloads();
-
- /**
- * Returns an array of sha256-hashed key pins for the given domain, if any.
- * If these pins also apply to subdomains of the given domain,
- * aIncludeSubdomains will be true. Pins returned are only for non-built-in
- * pin entries.
- *
- * @param aHostname the hosname (punycode) to be queried about
- * @param the time at which the pins should be valid. This is in
- mozilla::pkix::Time which uses internally seconds since 0 AD.
- * @param aPinArray the set of sha256-hashed key pins for the given domain
- * @param aIncludeSubdomains true if the pins apply to subdomains of the
- * given domain
- */
- [noscript] boolean getKeyPinsForHostname(in string aHostname,
- in mozillaPkixTime evalTime,
- out nsCStringTArrayRef aPinArray,
- out boolean aIncludeSubdomains);
-
- /**
- * Set public-key pins for a host. The resulting pins will be permanent
- * and visible from private and non-private contexts. These pins replace
- * any already set by this mechanism or those built-in to Gecko.
- *
- * @param aHost the hostname (punycode) that pins will apply to
- * @param aIncludeSubdomains whether these pins also apply to subdomains
- * @param aExpires the time this pin should expire (millis since epoch)
- * @param aPinCount number of keys being pinnned
- * @param aSha256Pins array of hashed key fingerprints (SHA-256, base64)
- * @param aIsPreload are these key pins for a preload entry? (false by
- * default)
- */
- boolean setKeyPins(in string aHost, in boolean aIncludeSubdomains,
- in int64_t aExpires, in unsigned long aPinCount,
- [array, size_is(aPinCount)] in string aSha256Pins,
- [optional] in boolean aIsPreload);
};
%{C++
diff --git a/security/manager/ssl/nsNSSComponent.cpp b/security/manager/ssl/nsNSSComponent.cpp
index 32c7fe83f6..5d4460115b 100644
--- a/security/manager/ssl/nsNSSComponent.cpp
+++ b/security/manager/ssl/nsNSSComponent.cpp
@@ -12,6 +12,9 @@
#include "SharedSSLState.h"
#include "cert.h"
#include "certdb.h"
+#ifdef MOZ_SECURITY_SQLSTORE
+#include "mozStorageCID.h"
+#endif
#include "mozilla/ArrayUtils.h"
#include "mozilla/Casting.h"
#include "mozilla/Preferences.h"
@@ -1267,26 +1270,19 @@ nsNSSComponent::InitializePIPNSSBundle()
nsresult rv;
nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv));
-#ifdef ANDROID
- MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
- MOZ_RELEASE_ASSERT(bundleService);
-#endif
+
if (NS_FAILED(rv) || !bundleService)
return NS_ERROR_FAILURE;
bundleService->CreateBundle("chrome://pipnss/locale/pipnss.properties",
getter_AddRefs(mPIPNSSBundle));
-#ifdef ANDROID
- MOZ_RELEASE_ASSERT(mPIPNSSBundle);
-#endif
+
if (!mPIPNSSBundle)
rv = NS_ERROR_FAILURE;
bundleService->CreateBundle("chrome://pipnss/locale/nsserrors.properties",
getter_AddRefs(mNSSErrorsBundle));
-#ifdef ANDROID
- MOZ_RELEASE_ASSERT(mNSSErrorsBundle);
-#endif
+
if (!mNSSErrorsBundle)
rv = NS_ERROR_FAILURE;
@@ -1498,9 +1494,7 @@ CipherSuiteChangeObserver::StartObserve()
if (!sObserver) {
RefPtr<CipherSuiteChangeObserver> observer = new CipherSuiteChangeObserver();
nsresult rv = Preferences::AddStrongObserver(observer.get(), "security.");
-#ifdef ANDROID
- MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
-#endif
+
if (NS_FAILED(rv)) {
sObserver = nullptr;
return rv;
@@ -1722,21 +1716,28 @@ GetNSSProfilePath(nsAutoCString& aProfilePath)
}
#if defined(XP_WIN)
- // Native path will drop Unicode characters that cannot be mapped to system's
- // codepage, using short (canonical) path as workaround.
nsCOMPtr<nsILocalFileWin> profileFileWin(do_QueryInterface(profileFile));
if (!profileFileWin) {
MOZ_LOG(gPIPNSSLog, LogLevel::Error,
("Could not get nsILocalFileWin for profile directory.\n"));
return NS_ERROR_FAILURE;
}
+#ifdef MOZ_SECURITY_SQLSTORE
+ // SQLite always takes UTF-8 file paths regardless of the current system
+ // code page.
+ nsAutoString u16ProfilePath;
+ rv = profileFileWin->GetCanonicalPath(u16ProfilePath);
+ CopyUTF16toUTF8(u16ProfilePath, aProfilePath);
+#else
+ // Native path will drop Unicode characters that cannot be mapped to system's
+ // codepage, using short (canonical) path as workaround.
rv = profileFileWin->GetNativeCanonicalPath(aProfilePath);
+#endif
#else
+ // On non-Windows, just get the native profile path.
rv = profileFile->GetNativePath(aProfilePath);
#endif
-#ifdef ANDROID
- MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
-#endif
+
if (NS_FAILED(rv)) {
MOZ_LOG(gPIPNSSLog, LogLevel::Error,
("Could not get native path for profile directory.\n"));
@@ -1764,9 +1765,6 @@ nsNSSComponent::InitializeNSS()
MutexAutoLock lock(mutex);
-#ifdef ANDROID
- MOZ_RELEASE_ASSERT(!mNSSInitialized);
-#endif
if (mNSSInitialized) {
// We should never try to initialize NSS more than once in a process.
MOZ_ASSERT_UNREACHABLE("Trying to initialize NSS twice");
@@ -1785,9 +1783,7 @@ nsNSSComponent::InitializeNSS()
nsAutoCString profileStr;
nsresult rv = GetNSSProfilePath(profileStr);
-#ifdef ANDROID
- MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
-#endif
+
if (NS_FAILED(rv)) {
return NS_ERROR_NOT_AVAILABLE;
}
@@ -1801,9 +1797,7 @@ nsNSSComponent::InitializeNSS()
// modules will be loaded).
if (runtime) {
rv = runtime->GetInSafeMode(&inSafeMode);
-#ifdef ANDROID
- MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
-#endif
+
if (NS_FAILED(rv)) {
return rv;
}
@@ -1828,14 +1822,9 @@ nsNSSComponent::InitializeNSS()
// pref has been set to "true", attempt to initialize with no DB.
if (nocertdb || init_rv != SECSuccess) {
init_rv = NSS_NoDB_Init(nullptr);
-#ifdef ANDROID
- MOZ_RELEASE_ASSERT(init_rv == SECSuccess);
-#endif
}
+
if (init_rv != SECSuccess) {
-#ifdef ANDROID
- MOZ_RELEASE_ASSERT(false);
-#endif
MOZ_LOG(gPIPNSSLog, LogLevel::Error, ("could not initialize NSS - panicking\n"));
return NS_ERROR_NOT_AVAILABLE;
}
@@ -1857,9 +1846,7 @@ nsNSSComponent::InitializeNSS()
SSL_OptionSetDefault(SSL_V2_COMPATIBLE_HELLO, false);
rv = setEnabledTLSVersions();
-#ifdef ANDROID
- MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
-#endif
+
if (NS_FAILED(rv)) {
return NS_ERROR_UNEXPECTED;
}
@@ -1868,9 +1855,7 @@ nsNSSComponent::InitializeNSS()
LoadLoadableRoots();
rv = LoadExtendedValidationInfo();
-#ifdef ANDROID
- MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
-#endif
+
if (NS_FAILED(rv)) {
MOZ_LOG(gPIPNSSLog, LogLevel::Error, ("failed to load EV info"));
return rv;
@@ -1910,18 +1895,14 @@ nsNSSComponent::InitializeNSS()
ENABLED_0RTT_DATA_DEFAULT));
if (NS_FAILED(InitializeCipherSuite())) {
-#ifdef ANDROID
- MOZ_RELEASE_ASSERT(false);
-#endif
+
MOZ_LOG(gPIPNSSLog, LogLevel::Error, ("Unable to initialize cipher suite settings\n"));
return NS_ERROR_FAILURE;
}
// ensure the CertBlocklist is initialised
nsCOMPtr<nsICertBlocklist> certList = do_GetService(NS_CERTBLOCKLIST_CONTRACTID);
-#ifdef ANDROID
- MOZ_RELEASE_ASSERT(certList);
-#endif
+
if (!certList) {
return NS_ERROR_FAILURE;
}
@@ -1938,9 +1919,7 @@ nsNSSComponent::InitializeNSS()
// Initialize the site security service
nsCOMPtr<nsISiteSecurityService> sssService =
do_GetService(NS_SSSERVICE_CONTRACTID);
-#ifdef ANDROID
- MOZ_RELEASE_ASSERT(sssService);
-#endif
+
if (!sssService) {
MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("Cannot initialize site security service\n"));
return NS_ERROR_FAILURE;
@@ -1949,9 +1928,7 @@ nsNSSComponent::InitializeNSS()
// Initialize the cert override service
nsCOMPtr<nsICertOverrideService> coService =
do_GetService(NS_CERTOVERRIDE_CONTRACTID);
-#ifdef ANDROID
- MOZ_RELEASE_ASSERT(coService);
-#endif
+
if (!coService) {
MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("Cannot initialize cert override service\n"));
return NS_ERROR_FAILURE;
@@ -2015,14 +1992,20 @@ nsNSSComponent::Init()
return NS_ERROR_NOT_SAME_THREAD;
}
+#ifdef MOZ_SECURITY_SQLSTORE
+ // To avoid an sqlite3_config race in NSS init, we require the storage service to get initialized first.
+ nsCOMPtr<nsISupports> storageService = do_GetService(MOZ_STORAGE_SERVICE_CONTRACTID);
+ if (!storageService) {
+ return NS_ERROR_NOT_AVAILABLE;
+ }
+#endif
+
nsresult rv = NS_OK;
MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("Beginning NSS initialization\n"));
rv = InitializePIPNSSBundle();
-#ifdef ANDROID
- MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
-#endif
+
if (NS_FAILED(rv)) {
MOZ_LOG(gPIPNSSLog, LogLevel::Error, ("Unable to create pipnss bundle.\n"));
return rv;
@@ -2043,9 +2026,7 @@ nsNSSComponent::Init()
rv = InitializeNSS();
-#ifdef ANDROID
- MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
-#endif
+
if (NS_FAILED(rv)) {
MOZ_LOG(gPIPNSSLog, LogLevel::Error,
("nsNSSComponent::InitializeNSS() failed\n"));
@@ -2207,9 +2188,7 @@ nsNSSComponent::RegisterObservers()
nsCOMPtr<nsIObserverService> observerService(
do_GetService("@mozilla.org/observer-service;1"));
-#ifdef ANDROID
- MOZ_RELEASE_ASSERT(observerService);
-#endif
+
if (!observerService) {
MOZ_LOG(gPIPNSSLog, LogLevel::Debug,
("nsNSSComponent: couldn't get observer service\n"));
@@ -2431,9 +2410,6 @@ InitializeCipherSuite()
NS_ASSERTION(NS_IsMainThread(), "InitializeCipherSuite() can only be accessed in main thread");
if (NSS_SetDomesticPolicy() != SECSuccess) {
-#ifdef ANDROID
- MOZ_RELEASE_ASSERT(false);
-#endif
return NS_ERROR_FAILURE;
}
diff --git a/security/manager/ssl/nsSTSPreloadList.errors b/security/manager/ssl/nsSTSPreloadList.errors
deleted file mode 100644
index 26b5b67457..0000000000
--- a/security/manager/ssl/nsSTSPreloadList.errors
+++ /dev/null
@@ -1,35782 +0,0 @@
-0-1.party: could not connect to host
-00004048.com: did not receive HSTS header
-0005.com: could not connect to host
-0005aa.com: could not connect to host
-0005pay.com: could not connect to host
-000a1.com: could not connect to host
-000a2.com: could not connect to host
-000a3.com: could not connect to host
-000a5.com: could not connect to host
-000a6.com: could not connect to host
-000a7.com: could not connect to host
-000a8.com: could not connect to host
-000a9.com: could not connect to host
-000b58.com: did not receive HSTS header
-000books.net: did not receive HSTS header
-000btt.net: did not receive HSTS header
-000x2.com: could not connect to host
-000x3.com: could not connect to host
-0010100.net: could not connect to host
-00120012.net: could not connect to host
-00140014.net: could not connect to host
-00220022.net: could not connect to host
-00228555.com: could not connect to host
-00228999.com: could not connect to host
-00228aa.com: could not connect to host
-00228b.com: did not receive HSTS header
-00228bb.com: did not receive HSTS header
-00228c.com: did not receive HSTS header
-00228cc.com: did not receive HSTS header
-00228d.com: could not connect to host
-00228dd.com: did not receive HSTS header
-00228e.com: could not connect to host
-00228ee.com: could not connect to host
-00228f.com: did not receive HSTS header
-00228g.com: could not connect to host
-00228gg.com: could not connect to host
-00228h.com: did not receive HSTS header
-00228hh.com: could not connect to host
-00228jj.com: could not connect to host
-00228k.com: could not connect to host
-00228kk.com: could not connect to host
-00228m.com: did not receive HSTS header
-00228mm.com: could not connect to host
-00228nn.com: did not receive HSTS header
-00228p.com: could not connect to host
-00228pp.com: did not receive HSTS header
-00228q.com: did not receive HSTS header
-00228r.com: could not connect to host
-00228rr.com: did not receive HSTS header
-00228s.com: could not connect to host
-00228ss.com: could not connect to host
-00228t.com: could not connect to host
-00228tt.com: did not receive HSTS header
-00228u.com: did not receive HSTS header
-00228v.com: could not connect to host
-00228vip1.com: did not receive HSTS header
-00228vip3.com: could not connect to host
-00321365.com: could not connect to host
-00330033.net: did not receive HSTS header
-00334.vip: could not connect to host
-00370038.com: max-age too low: 0
-0038088.com: max-age too low: 0
-003zl.com: could not connect to host
-005555.xyz: did not receive HSTS header
-00660066.net: could not connect to host
-007-preisvergleich.de: did not receive HSTS header
-00770077.net: could not connect to host
-00778899.com: did not receive HSTS header
-007kf.com: could not connect to host
-007sascha.de: did not receive HSTS header
-00880088.net: could not connect to host
-008yingshi.com: could not connect to host
-009p.com: could not connect to host
-009zl.com: could not connect to host
-00b58.com: could not connect to host
-00rfb.com: could not connect to host
-00wbf.com: could not connect to host
-01-edu.org: did not receive HSTS header
-0100dev.com: did not receive HSTS header
-0100dev.nl: did not receive HSTS header
-010777a.com: could not connect to host
-010888a.com: could not connect to host
-01100010011001010111001101110100.com: could not connect to host
-011zl.com: could not connect to host
-01234048.com: did not receive HSTS header
-012345678365.com: could not connect to host
-012zl.com: could not connect to host
-013028.com: did not receive HSTS header
-016028.com: did not receive HSTS header
-016098.com: did not receive HSTS header
-016298.com: did not receive HSTS header
-016328.com: did not receive HSTS header
-018663.com: could not connect to host
-018k8.com: did not receive HSTS header
-018zl.com: could not connect to host
-019328.com: could not connect to host
-019398.com: did not receive HSTS header
-01electronica.com.ar: did not receive HSTS header
-01media.fr: did not receive HSTS header
-01seguridad.com.ar: did not receive HSTS header
-01smh.com: could not connect to host
-01tools.com: did not receive HSTS header
-0205wc.com: max-age too low: 0
-020wifi.nl: could not connect to host
-0222.mg: could not connect to host
-0222aa.com: could not connect to host
-022561.com: could not connect to host
-023838.com: could not connect to host
-023sec.com: could not connect to host
-02607.com: could not connect to host
-028718.com: did not receive HSTS header
-029978.com: could not connect to host
-029inno.com: did not receive HSTS header
-02dl.net: could not connect to host
-02smh.com: could not connect to host
-03-09-2016.wedding: could not connect to host
-0311buy.cn: could not connect to host
-0311z6.com: could not connect to host
-031373.com: could not connect to host
-035711630.xyz: could not connect to host
-0376z6.com: could not connect to host
-0380l.com: max-age too low: 0
-038663.com: could not connect to host
-0391315.com: could not connect to host
-0393ee.com: could not connect to host
-03region.ga: could not connect to host
-040fit.nl: did not receive HSTS header
-040fitvitality.nl: did not receive HSTS header
-048.ag: could not connect to host
-04911701.cn: could not connect to host
-04dco.tk: could not connect to host
-04sun.com: could not connect to host
-050.ca: could not connect to host
-050.tv: did not receive HSTS header
-050508.com: could not connect to host
-050a1.com: could not connect to host
-050a2.com: could not connect to host
-050a3.com: could not connect to host
-050a4.com: could not connect to host
-050a5.com: could not connect to host
-050a6.com: could not connect to host
-0513c.com: did not receive HSTS header
-0517z6.com: could not connect to host
-0531009.com: max-age too low: 0
-0533z6.com: could not connect to host
-0538z6.com: could not connect to host
-055268.com: did not receive HSTS header
-056657.com: could not connect to host
-056679.com: could not connect to host
-0571z6.com: did not receive HSTS header
-0597z6.com: could not connect to host
-059957.com: could not connect to host
-05am8.com: could not connect to host
-060579.com: could not connect to host
-060757.com: could not connect to host
-060796.com: could not connect to host
-060798.com: could not connect to host
-066318.com: did not receive HSTS header
-066538.com: did not receive HSTS header
-066718.com: did not receive HSTS header
-066928.com: did not receive HSTS header
-066938.com: could not connect to host
-0681a.com: could not connect to host
-0681b.com: did not receive HSTS header
-0681c.com: did not receive HSTS header
-0681d.com: did not receive HSTS header
-0681e.com: did not receive HSTS header
-0681f.com: did not receive HSTS header
-0681g.com: did not receive HSTS header
-0681h.com: could not connect to host
-0681i.com: did not receive HSTS header
-0681j.com: did not receive HSTS header
-0681k.com: could not connect to host
-0681l.com: did not receive HSTS header
-0681m.com: did not receive HSTS header
-0681n.com: could not connect to host
-0681o.com: did not receive HSTS header
-0681p.com: did not receive HSTS header
-0681q.com: did not receive HSTS header
-0681s.com: did not receive HSTS header
-0681t.com: did not receive HSTS header
-0681u.com: did not receive HSTS header
-0681w.com: did not receive HSTS header
-0681x.com: did not receive HSTS header
-0681y.com: did not receive HSTS header
-0681z.com: did not receive HSTS header
-068663.com: could not connect to host
-069657.com: did not receive HSTS header
-069676.com: did not receive HSTS header
-070709.net: could not connect to host
-0717z6.com: could not connect to host
-0737399.com: did not receive HSTS header
-0771z6.com: could not connect to host
-07733.win: could not connect to host
-078663.com: could not connect to host
-078805.com: did not receive HSTS header
-078810.com: did not receive HSTS header
-078820.com: did not receive HSTS header
-078860.com: did not receive HSTS header
-078890.com: could not connect to host
-0788yh.com: could not connect to host
-079606.com: did not receive HSTS header
-079607.com: did not receive HSTS header
-07stars.com: could not connect to host
-080261.com: could not connect to host
-0809yh.com: could not connect to host
-081638.com: did not receive HSTS header
-085806.com: could not connect to host
-086628.com: could not connect to host
-086807.com: did not receive HSTS header
-086907.com: could not connect to host
-087059.com: did not receive HSTS header
-08817a.com: did not receive HSTS header
-08817c.com: did not receive HSTS header
-08817d.com: did not receive HSTS header
-08817e.com: did not receive HSTS header
-08817f.com: did not receive HSTS header
-08817g.com: did not receive HSTS header
-08817h.com: did not receive HSTS header
-08817j.com: did not receive HSTS header
-08817k.com: did not receive HSTS header
-08817m.com: did not receive HSTS header
-08817w.com: did not receive HSTS header
-08817y.com: did not receive HSTS header
-08817z.com: did not receive HSTS header
-089818.com: could not connect to host
-08detaxe.fr: could not connect to host
-09115.com: did not receive HSTS header
-0916app.com: did not receive HSTS header
-098955.com: could not connect to host
-0999sfce.com: max-age too low: 0
-09elektrik.com: could not connect to host
-0akarma.me: could not connect to host
-0c.eu: did not receive HSTS header
-0cd.xyz: did not receive HSTS header
-0cdn.ga: could not connect to host
-0d111.com: could not connect to host
-0d222.com: did not receive HSTS header
-0d333.com: did not receive HSTS header
-0d444.com: did not receive HSTS header
-0d555.com: did not receive HSTS header
-0d666.com: did not receive HSTS header
-0d777.com: did not receive HSTS header
-0d888.com: did not receive HSTS header
-0d999.com: did not receive HSTS header
-0day.su: could not connect to host
-0de3.com: did not receive HSTS header
-0f.io: could not connect to host
-0fl.com: did not receive HSTS header
-0g.org.uk: could not connect to host
-0i0.nl: could not connect to host
-0o0.edu.pl: could not connect to host
-0o0.ooo: could not connect to host
-0p.no: did not receive HSTS header
-0vi.org: could not connect to host
-0w0.vc: could not connect to host
-0x.cx: could not connect to host
-0x0.cloud: could not connect to host
-0x1337.eu: could not connect to host
-0x44.net: could not connect to host
-0x48.pw: did not receive HSTS header
-0x4b0c131e.pub: could not connect to host
-0x52.org: could not connect to host
-0x539.be: did not receive HSTS header
-0x539.pw: could not connect to host
-0x5f3759df.cf: could not connect to host
-0x65.net: could not connect to host
-0x80.org: could not connect to host
-0x90.fi: could not connect to host
-0x90.in: could not connect to host
-0xa.in: could not connect to host
-0xaa55.me: could not connect to host
-0xacab.org: did not receive HSTS header
-0xb612.org: could not connect to host
-0xcafec0.de: did not receive HSTS header
-0xee.eu: could not connect to host
-0yen.org: could not connect to host
-1-345.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-1.0.0.1: max-age too low: 0
-100086ll.com: max-age too low: 0
-1000hats.com: did not receive HSTS header
-1000serien.com: could not connect to host
-1001.best: could not connect to host
-1001carats.fr: could not connect to host
-1001firms.com: could not connect to host
-1001mv.com: could not connect to host
-1002712.com: did not receive HSTS header
-10086.nl: could not connect to host
-100and1.jp: did not receive HSTS header
-100onrainkajino.com: could not connect to host
-100pudov.tk: did not receive HSTS header
-100rembourse.be: did not receive HSTS header
-1017scribes.com: could not connect to host
-1018hosting.nl: did not receive HSTS header
-1022996493.rsc.cdn77.org: could not connect to host
-102ch.us: could not connect to host
-10365001.com: could not connect to host
-10365002.com: could not connect to host
-10365003.com: could not connect to host
-10365005.com: could not connect to host
-10365006.com: could not connect to host
-10365007.com: could not connect to host
-10365008.com: could not connect to host
-10365009.com: could not connect to host
-103656666.com: could not connect to host
-103658888.com: could not connect to host
-10365a.com: could not connect to host
-10365app.com: could not connect to host
-10365c.com: could not connect to host
-10365e.com: could not connect to host
-10365f.com: could not connect to host
-10365g.com: could not connect to host
-10365h.com: could not connect to host
-10414.org: could not connect to host
-1049578.com: max-age too low: 0
-105318.com: could not connect to host
-1066.io: did not receive HSTS header
-1068511.com: could not connect to host
-1080.com: did not receive HSTS header
-10gb.io: did not receive HSTS header
-10gbit.ovh: could not connect to host
-10giant.com: did not receive HSTS header
-10n13.com: could not connect to host
-10seos.com: did not receive HSTS header
-10tacle.io: could not connect to host
-10v2.com: could not connect to host
-10x.ooo: could not connect to host
-10xiuxiu.com: could not connect to host
-1100.so: could not connect to host
-11018vip.com: could not connect to host
-11018xpj.com: could not connect to host
-110320.com: did not receive HSTS header
-110692.com: could not connect to host
-111.one: could not connect to host
-1111k8.com: could not connect to host
-1116pay.com: did not receive HSTS header
-1119968.com: did not receive HSTS header
-111b58.com: did not receive HSTS header
-111plus.design: max-age too low: 7776000
-1120313.com: could not connect to host
-1120327.com: could not connect to host
-1120328.com: could not connect to host
-1120330.com: could not connect to host
-1120331.com: could not connect to host
-1120332.com: could not connect to host
-1120334.com: could not connect to host
-1120335.com: could not connect to host
-1120336.com: could not connect to host
-1120337.com: could not connect to host
-1120338.com: could not connect to host
-1120339.com: could not connect to host
-1120341.com: could not connect to host
-1120342.com: could not connect to host
-1120343.com: could not connect to host
-1120344.com: could not connect to host
-1120345.com: could not connect to host
-1120346.com: could not connect to host
-1120347.com: could not connect to host
-1120348.com: could not connect to host
-1120349.com: could not connect to host
-1120350.com: could not connect to host
-11221jz.com: could not connect to host
-11223837.com: did not receive HSTS header
-1126p.com: could not connect to host
-1130p.com: could not connect to host
-11333837.com: did not receive HSTS header
-11335835.com: could not connect to host
-11443837.com: could not connect to host
-11445835.com: did not receive HSTS header
-11553837.com: could not connect to host
-11555835.com: did not receive HSTS header
-11663837.com: did not receive HSTS header
-11665835.com: did not receive HSTS header
-1177107.com: could not connect to host
-11773837.com: could not connect to host
-11775835.com: did not receive HSTS header
-11883837.com: did not receive HSTS header
-11885835.com: did not receive HSTS header
-11993837.com: did not receive HSTS header
-11995835.com: did not receive HSTS header
-11assets.com: could not connect to host
-11b58.com: could not connect to host
-11bt.cc: could not connect to host
-11dzon.com: could not connect to host
-11recruitment.com.au: max-age too low: 0
-11scc.com: could not connect to host
-120323.com: could not connect to host
-120dayweightloss.com: could not connect to host
-1220301.com: could not connect to host
-1220302.com: could not connect to host
-1220303.com: could not connect to host
-1220304.com: could not connect to host
-1220305.com: could not connect to host
-1220306.com: could not connect to host
-1220307.com: could not connect to host
-1220308.com: could not connect to host
-1220309.com: could not connect to host
-1220310.com: could not connect to host
-1220311.com: could not connect to host
-1220312.com: could not connect to host
-1220313.com: could not connect to host
-1220314.com: could not connect to host
-1220315.com: could not connect to host
-1220316.com: could not connect to host
-1220317.com: could not connect to host
-1220318.com: could not connect to host
-1220319.com: could not connect to host
-1220320.com: could not connect to host
-1220321.com: could not connect to host
-1220322.com: could not connect to host
-1220323.com: could not connect to host
-1220324.com: could not connect to host
-1220325.com: could not connect to host
-1220326.com: could not connect to host
-1220327.com: could not connect to host
-1220328.com: could not connect to host
-1220329.com: could not connect to host
-1220330.com: could not connect to host
-1220331.com: could not connect to host
-1220332.com: could not connect to host
-1220334.com: could not connect to host
-1220335.com: could not connect to host
-1220336.com: could not connect to host
-1220337.com: could not connect to host
-1220338.com: could not connect to host
-1220339.com: could not connect to host
-1220340.com: could not connect to host
-1220342.com: could not connect to host
-1220343.com: could not connect to host
-1220344.com: could not connect to host
-1220345.com: could not connect to host
-1220346.com: could not connect to host
-1220347.com: could not connect to host
-1220348.com: could not connect to host
-1220349.com: could not connect to host
-1220350.com: could not connect to host
-123.gg: could not connect to host
-123110.com: could not connect to host
-1231212.com: could not connect to host
-123123q.com: could not connect to host
-123123qq.com: could not connect to host
-12344048.com: did not receive HSTS header
-123comparer.fr: did not receive HSTS header
-123derivatives.com: did not receive HSTS header
-123movies.fyi: could not connect to host
-123nutricion.es: could not connect to host
-123pay.ir: did not receive HSTS header
-123plons.nl: could not connect to host
-123pornmovies.club: could not connect to host
-123share.org: could not connect to host
-123test.com: did not receive HSTS header
-123test.de: did not receive HSTS header
-123test.es: did not receive HSTS header
-123test.fr: did not receive HSTS header
-123test.nl: did not receive HSTS header
-1265353.com: max-age too low: 0
-126772.com: did not receive HSTS header
-126ium.moe: could not connect to host
-127011-networks.ch: could not connect to host
-127661.com: could not connect to host
-127662.com: did not receive HSTS header
-127663.com: did not receive HSTS header
-127665.com: did not receive HSTS header
-1288366.com: could not connect to host
-1288fc.com: could not connect to host
-12gotovo.com: did not receive HSTS header
-12n13.com: could not connect to host
-12photos.eu: could not connect to host
-12vpn.org: could not connect to host
-12vpnchina.com: could not connect to host
-13-th.com: did not receive HSTS header
-130032.com: did not receive HSTS header
-130212.com: did not receive HSTS header
-130232.com: did not receive HSTS header
-130497.xyz: did not receive HSTS header
-130978.com: did not receive HSTS header
-131365qq.com: could not connect to host
-132302.com: did not receive HSTS header
-1325390854.com: max-age too low: 0
-13318522.com: could not connect to host
-1337.vg: could not connect to host
-135vv.com: could not connect to host
-136774.com: could not connect to host
-136924.com: did not receive HSTS header
-13826145000.com: could not connect to host
-13866670.com: max-age too low: 0
-1396.cc: could not connect to host
-1396.net: did not receive HSTS header
-13982407454.com: max-age too low: 0
-13th-dover.uk: could not connect to host
-1406304513.com: max-age too low: 0
-14159.gb.net: could not connect to host
-143918.com: did not receive HSTS header
-1441805971.com: max-age too low: 0
-1481486.net: could not connect to host
-148663.com: could not connect to host
-1520301.com: could not connect to host
-1520302.com: could not connect to host
-1520303.com: could not connect to host
-1520304.com: could not connect to host
-1520305.com: could not connect to host
-1520306.com: could not connect to host
-1520310.com: could not connect to host
-1520316.com: could not connect to host
-1520318.com: could not connect to host
-1520319.com: could not connect to host
-1520320.com: could not connect to host
-1520322.com: could not connect to host
-1520323.com: could not connect to host
-1520324.com: could not connect to host
-1520325.com: could not connect to host
-1520326.com: could not connect to host
-1520327.com: could not connect to host
-1520328.com: could not connect to host
-1527web.com: could not connect to host
-1536.cf: could not connect to host
-158306.com: did not receive HSTS header
-161263.com: could not connect to host
-16164f.com: could not connect to host
-162361.com: could not connect to host
-162632.com: could not connect to host
-163pwd.com: could not connect to host
-166166.com: could not connect to host
-1683657.com: could not connect to host
-1689886.com: did not receive HSTS header
-168bet9.com: could not connect to host
-168esb.com: could not connect to host
-168wcw.com: max-age too low: 0
-168zz.cc: could not connect to host
-16book.org: could not connect to host
-16deza.com: did not receive HSTS header
-16qw.tk: could not connect to host
-16region.tk: could not connect to host
-17187q.com: could not connect to host
-1720303.com: could not connect to host
-1720336.com: could not connect to host
-173jsh.com: did not receive HSTS header
-173vpn.cn: could not connect to host
-173vpns.com: could not connect to host
-173vpnv.com: could not connect to host
-174.net.nz: could not connect to host
-174343.com: could not connect to host
-178jsh.com: did not receive HSTS header
-17hats.com: did not receive HSTS header
-1820317.com: could not connect to host
-1820325.com: could not connect to host
-1820326.com: could not connect to host
-1820327.com: could not connect to host
-1820328.com: could not connect to host
-1820329.com: could not connect to host
-1820330.com: could not connect to host
-1820331.com: could not connect to host
-1820332.com: could not connect to host
-1820333.com: could not connect to host
-1820334.com: could not connect to host
-1820335.com: could not connect to host
-1820336.com: could not connect to host
-1820337.com: could not connect to host
-1820338.com: could not connect to host
-1820340.com: could not connect to host
-1820341.com: could not connect to host
-1820342.com: could not connect to host
-1820343.com: could not connect to host
-1820344.com: could not connect to host
-1820345.com: could not connect to host
-1820346.com: could not connect to host
-1820347.com: could not connect to host
-1820348.com: could not connect to host
-182wh.com: could not connect to host
-182z6.com: could not connect to host
-1834202695.com: max-age too low: 0
-18680288.com: max-age too low: 0
-188198.net: did not receive HSTS header
-188522.com: did not receive HSTS header
-18858586888.com: max-age too low: 0
-18888msc.com: could not connect to host
-1888zr.com: did not receive HSTS header
-1889p.com: could not connect to host
-188betwarriors.co.uk: could not connect to host
-188da.com: could not connect to host
-188trafalgar.ca: could not connect to host
-1890p.com: could not connect to host
-1895media.com: could not connect to host
-189dv.com: could not connect to host
-189fc.com: could not connect to host
-18celebration.com: did not receive HSTS header
-18celebration.org: did not receive HSTS header
-1912x.com: could not connect to host
-1918173197.com: max-age too low: 0
-192.io: could not connect to host
-192080.com: could not connect to host
-19216811.online: could not connect to host
-192168ll.repair: could not connect to host
-1921958389.rsc.cdn77.org: could not connect to host
-192569.com: did not receive HSTS header
-195gm.com: could not connect to host
-197jjj.com: did not receive HSTS header
-198752qq.com: max-age too low: 0
-198jjj.com: did not receive HSTS header
-19990kk.com: could not connect to host
-19area.cn: could not connect to host
-1a-jva.de: could not connect to host
-1a-vermessung.at: did not receive HSTS header
-1abcicka.ru: could not connect to host
-1aim.com: did not receive HSTS header
-1atic.com: could not connect to host
-1b1.pl: could not connect to host
-1co-jp.net: did not receive HSTS header
-1cover.com: did not receive HSTS header
-1day1ac.red: could not connect to host
-1db77.cn: did not receive HSTS header
-1er-secours.ch: could not connect to host
-1f412.space: did not receive HSTS header
-1gsoft.com: did not receive HSTS header
-1hfree.tk: could not connect to host
-1item.co.il: did not receive HSTS header
-1k8b.com: could not connect to host
-1lc00.com: did not receive HSTS header
-1lc11.com: did not receive HSTS header
-1lc22.com: did not receive HSTS header
-1lc33.com: did not receive HSTS header
-1lc44.com: did not receive HSTS header
-1lc55.com: did not receive HSTS header
-1nfr.com: did not receive HSTS header
-1nian.vip: could not connect to host
-1onehouse.com: could not connect to host
-1para.net: could not connect to host
-1plus-agency.com: did not receive HSTS header
-1q2w.nl: could not connect to host
-1q365a.com: could not connect to host
-1s.tn: could not connect to host
-1salland.nl: could not connect to host
-1scope.com: could not connect to host
-1st4abounce.co.uk: could not connect to host
-1stchoicefun.co.uk: could not connect to host
-1ststop.co.uk: did not receive HSTS header
-1three1.net: did not receive HSTS header
-1u0m.com: could not connect to host
-1upinternet.com: could not connect to host
-1v1.xyz: could not connect to host
-1v9.im: could not connect to host
-1volcano.ru: could not connect to host
-1xcess.com: did not receive HSTS header
-1years.cc: could not connect to host
-2-cpu.de: could not connect to host
-20000615.com: max-age too low: 0
-2001617.com: max-age too low: 0
-200201.xyz: could not connect to host
-2002712.com: did not receive HSTS header
-200fcw.com: could not connect to host
-2017c.com: could not connect to host
-2018.wales: could not connect to host
-20188088.com: could not connect to host
-2018j95.com: could not connect to host
-20190204.com: max-age too low: 0
-20190508.com: max-age too low: 0
-20191r.com: did not receive HSTS header
-2019318.com: max-age too low: 0
-2019j95.com: could not connect to host
-2019k8.com: could not connect to host
-2020j95.com: could not connect to host
-2021j95.com: could not connect to host
-2022j95.com: could not connect to host
-2023j95.com: could not connect to host
-2024j95.com: could not connect to host
-2025j95.com: could not connect to host
-2026j95.com: could not connect to host
-2030404.com: could not connect to host
-2030411.com: could not connect to host
-2033002.com: did not receive HSTS header
-2033003.com: did not receive HSTS header
-2033004.com: did not receive HSTS header
-2033005.com: did not receive HSTS header
-2033006.com: did not receive HSTS header
-2033007.com: did not receive HSTS header
-2033008.com: did not receive HSTS header
-2033009.com: did not receive HSTS header
-2033010.com: did not receive HSTS header
-2033011.com: did not receive HSTS header
-2033a.com: could not connect to host
-2033b.com: did not receive HSTS header
-2033c.com: did not receive HSTS header
-2033d.com: did not receive HSTS header
-2033e.com: did not receive HSTS header
-2033f.com: did not receive HSTS header
-2033g.com: did not receive HSTS header
-2033h.com: did not receive HSTS header
-2033i.com: did not receive HSTS header
-2033j.com: did not receive HSTS header
-2033l.com: did not receive HSTS header
-2033m.com: did not receive HSTS header
-2033n.com: did not receive HSTS header
-2033o.com: did not receive HSTS header
-2033p.com: did not receive HSTS header
-2033q.com: did not receive HSTS header
-2033r.com: did not receive HSTS header
-2033s.com: did not receive HSTS header
-2033t.com: did not receive HSTS header
-2033u.com: did not receive HSTS header
-2033v.com: did not receive HSTS header
-2033w.com: did not receive HSTS header
-2033x.com: did not receive HSTS header
-2033y.com: did not receive HSTS header
-2033z.com: could not connect to host
-2048-spiel.de: could not connect to host
-2048game.co.uk: could not connect to host
-206rc.net: max-age too low: 2592000
-208.es: did not receive HSTS header
-208wns.com: did not receive HSTS header
-20hs.cn: could not connect to host
-20n13.com: could not connect to host
-20zq.com: could not connect to host
-21.co.uk: did not receive HSTS header
-2112323.com: max-age too low: 0
-21lg.co: could not connect to host
-21sthammersmith.org.uk: did not receive HSTS header
-21stnc.com: did not receive HSTS header
-220control.ru: could not connect to host
-222001.com: could not connect to host
-222111.cc: could not connect to host
-2222yh.com: did not receive HSTS header
-222321365.com: could not connect to host
-2226321.com: could not connect to host
-222b58.com: did not receive HSTS header
-22321365.com: could not connect to host
-2264707.ru: did not receive HSTS header
-2288422.com: could not connect to host
-2288499.com: could not connect to host
-22994.org: could not connect to host
-2299411.com: could not connect to host
-2299422.com: could not connect to host
-2299433.com: could not connect to host
-2299455.com: could not connect to host
-2299466.com: could not connect to host
-2299477.com: could not connect to host
-2299488.com: could not connect to host
-22b58.com: could not connect to host
-22bt.cc: did not receive HSTS header
-22d.io: could not connect to host
-22digital.agency: could not connect to host
-22scc.com: could not connect to host
-22vetter.st: could not connect to host
-230110.com: could not connect to host
-232192.com: could not connect to host
-2324275338.com: max-age too low: 0
-2333.press: could not connect to host
-2333666.xyz: could not connect to host
-233abc.com: could not connect to host
-233bwg.com: could not connect to host
-233hugo.com: could not connect to host
-233now.com: could not connect to host
-233yes.com: could not connect to host
-23454048.com: could not connect to host
-235998.com: could not connect to host
-242712.com: did not receive HSTS header
-246773.com: could not connect to host
-2468lhc.com: could not connect to host
-24796559.com: max-age too low: 0
-247a.co.uk: could not connect to host
-247exchange.com: did not receive HSTS header
-247healthshop.com: could not connect to host
-247quickbooks.com: did not receive HSTS header
-2484811.com: could not connect to host
-248663.com: could not connect to host
-2488.ch: did not receive HSTS header
-2495dentalimplants.com: could not connect to host
-249cq.com: could not connect to host
-24hourpaint.com: could not connect to host
-24hrs.shopping: could not connect to host
-24items.com: did not receive HSTS header
-24kbet.com: could not connect to host
-24pcr.com: could not connect to host
-24sihu.com: could not connect to host
-2566335.xyz: could not connect to host
-2569abc.com: max-age too low: 0
-256k.me: could not connect to host
-258da.com: did not receive HSTS header
-25daysof.io: could not connect to host
-26004.cc: could not connect to host
-260842907.com: max-age too low: 0
-2686288.com: max-age too low: 0
-2692646200.com: max-age too low: 0
-2712aa.com: did not receive HSTS header
-276771.com: could not connect to host
-27728522.com: could not connect to host
-27878.com: did not receive HSTS header
-27878dd.com: did not receive HSTS header
-27878gg.com: did not receive HSTS header
-27878hh.com: did not receive HSTS header
-27878ii.com: did not receive HSTS header
-27878jj.com: did not receive HSTS header
-27878ll.com: did not receive HSTS header
-27878nn.com: did not receive HSTS header
-27878oo.com: did not receive HSTS header
-27878pp.com: did not receive HSTS header
-27878qq.com: did not receive HSTS header
-27878rr.com: did not receive HSTS header
-27878ss.com: did not receive HSTS header
-27878tt.com: did not receive HSTS header
-27878vv.com: did not receive HSTS header
-27878ww.com: did not receive HSTS header
-27878xx.com: did not receive HSTS header
-27878yy.com: did not receive HSTS header
-27878zz.com: did not receive HSTS header
-27is.com: could not connect to host
-284365.com: did not receive HSTS header
-2859cc.com: could not connect to host
-286.com: did not receive HSTS header
-288da.com: did not receive HSTS header
-29227.com: could not connect to host
-2941798824.com: max-age too low: 0
-297computers.com: could not connect to host
-298da.com: did not receive HSTS header
-2acbi-asso.fr: did not receive HSTS header
-2ag88.com: could not connect to host
-2b3b.com: could not connect to host
-2bad2c0.de: did not receive HSTS header
-2bitout.com: could not connect to host
-2bizi.ru: could not connect to host
-2bougie.com: could not connect to host
-2bouncy.com: could not connect to host
-2brokegirls.org: could not connect to host
-2carpros.com: did not receive HSTS header
-2dua.com: did not receive HSTS header
-2fl.me: did not receive HSTS header
-2fm.radio: could not connect to host
-2fr3.com: could not connect to host
-2g1s.net: could not connect to host
-2intermediate.co.uk: could not connect to host
-2kvn.cf: could not connect to host
-2mir.com: could not connect to host
-2or3.tk: could not connect to host
-2smart4food.com: could not connect to host
-2ss.jp: could not connect to host
-2tuu.com: could not connect to host
-3002712.com: did not receive HSTS header
-300651.ru: did not receive HSTS header
-300mbmovie24.com: could not connect to host
-300mbmovies4u.cc: could not connect to host
-301.website: did not receive HSTS header
-302.nyc: could not connect to host
-303112.com: did not receive HSTS header
-3033888.com: could not connect to host
-30375500.com: could not connect to host
-30375522.com: could not connect to host
-30375533.com: could not connect to host
-30375555.com: did not receive HSTS header
-30375577.com: did not receive HSTS header
-30375588.com: could not connect to host
-30375599.com: could not connect to host
-304squadron.org: could not connect to host
-3054056550.com: max-age too low: 0
-308xpj.com: could not connect to host
-308xsj.com: max-age too low: 0
-30n13.com: could not connect to host
-30yearmortgagerates.net: did not receive HSTS header
-3133780x.com: did not receive HSTS header
-313xpj.com: could not connect to host
-314166.com: could not connect to host
-314553.com: could not connect to host
-315422.com: could not connect to host
-315xpj.com: could not connect to host
-317811111.com: did not receive HSTS header
-31782222.com: did not receive HSTS header
-317822222.com: did not receive HSTS header
-31783333.com: did not receive HSTS header
-317833333.com: did not receive HSTS header
-31784444.com: did not receive HSTS header
-317844444.com: did not receive HSTS header
-317855555.com: did not receive HSTS header
-31786666.com: did not receive HSTS header
-317866666.com: did not receive HSTS header
-3178666666.com: did not receive HSTS header
-317877777.com: did not receive HSTS header
-3178888888.com: did not receive HSTS header
-31789999.com: did not receive HSTS header
-317899999.com: did not receive HSTS header
-3178aaa.com: could not connect to host
-3178b.com: did not receive HSTS header
-3178bbb.com: did not receive HSTS header
-3178c.com: did not receive HSTS header
-3178ccc.com: did not receive HSTS header
-3178dd.com: did not receive HSTS header
-3178ddd.com: did not receive HSTS header
-3178e.com: did not receive HSTS header
-3178eee.com: could not connect to host
-3178f.com: did not receive HSTS header
-3178fff.com: could not connect to host
-3178g.com: did not receive HSTS header
-3178h.com: did not receive HSTS header
-3178i.com: did not receive HSTS header
-3178iii.com: did not receive HSTS header
-3178j.com: did not receive HSTS header
-3178jjj.com: did not receive HSTS header
-3178l.com: did not receive HSTS header
-3178m.com: did not receive HSTS header
-3178n.com: did not receive HSTS header
-3178o.com: did not receive HSTS header
-3178p.com: did not receive HSTS header
-3178ppp.com: did not receive HSTS header
-3178qqq.com: did not receive HSTS header
-3178rrr.com: did not receive HSTS header
-3178tt.com: did not receive HSTS header
-3178ttt.com: did not receive HSTS header
-3178uuu.com: did not receive HSTS header
-3178vvv.com: did not receive HSTS header
-3178ww.com: did not receive HSTS header
-3178www.com: did not receive HSTS header
-3178xx.com: did not receive HSTS header
-3178xxx.com: did not receive HSTS header
-3178yy.com: did not receive HSTS header
-3178yyy.com: did not receive HSTS header
-3178zzz.com: did not receive HSTS header
-317jsh.com: did not receive HSTS header
-318jsh.com: did not receive HSTS header
-319k3.com: could not connect to host
-31tv.ru: did not receive HSTS header
-321666365.com: could not connect to host
-32ph.com: did not receive HSTS header
-33-km.ru: could not connect to host
-330.net: did not receive HSTS header
-3311.com.cn: could not connect to host
-33123000.com: did not receive HSTS header
-33123111.com: did not receive HSTS header
-33123222.com: did not receive HSTS header
-33123333.com: did not receive HSTS header
-33123444.com: did not receive HSTS header
-33123555.com: did not receive HSTS header
-33123666.com: did not receive HSTS header
-33123777.com: did not receive HSTS header
-33123888.com: did not receive HSTS header
-33123999.com: did not receive HSTS header
-33321365.com: could not connect to host
-3332444.com: did not receive HSTS header
-3333yh.com: did not receive HSTS header
-333b58.com: did not receive HSTS header
-33445111.com: could not connect to host
-33445222.com: could not connect to host
-33445333.com: could not connect to host
-33445444.com: could not connect to host
-3351p.com: could not connect to host
-3361p.com: could not connect to host
-336yh.com: could not connect to host
-33836.com: could not connect to host
-338da.com: could not connect to host
-33b58.com: could not connect to host
-33drugstore.com: could not connect to host
-33n13.com: could not connect to host
-33scc.com: could not connect to host
-341.mg: could not connect to host
-345666365.com: could not connect to host
-3456789365.com: could not connect to host
-347552.com: could not connect to host
-348663.com: could not connect to host
-34oztonic.eu: did not receive HSTS header
-351079.com: could not connect to host
-354133.com: could not connect to host
-3555500.com: could not connect to host
-3555aa.com: could not connect to host
-357601.com: could not connect to host
-35792.de: could not connect to host
-35898a.com: did not receive HSTS header
-35898b.com: did not receive HSTS header
-35898c.com: did not receive HSTS header
-35898d.com: did not receive HSTS header
-35898e.com: could not connect to host
-35898f.com: did not receive HSTS header
-35898g.com: did not receive HSTS header
-35898h.com: did not receive HSTS header
-35898j.com: did not receive HSTS header
-35898k.com: did not receive HSTS header
-35898m.com: did not receive HSTS header
-35898s.com: did not receive HSTS header
-35898w.com: did not receive HSTS header
-35898x.com: did not receive HSTS header
-35898y.com: did not receive HSTS header
-35898z.com: did not receive HSTS header
-35d88.com: could not connect to host
-360008888.com: max-age too low: 0
-360365.com: did not receive HSTS header
-360gradus.com: did not receive HSTS header
-360videoshare.com: could not connect to host
-360woodworking.com: could not connect to host
-3615jacky.fr: could not connect to host
-364553.com: could not connect to host
-365.or.jp: could not connect to host
-36506000.com: could not connect to host
-36506011.com: could not connect to host
-36506022.com: could not connect to host
-36506033.com: could not connect to host
-36506055.com: could not connect to host
-36506066.com: could not connect to host
-36506077.com: could not connect to host
-36506088.com: could not connect to host
-36506099.com: could not connect to host
-36506111.com: could not connect to host
-36506222.com: could not connect to host
-36506333.com: could not connect to host
-36506555.com: could not connect to host
-36506777.com: could not connect to host
-36506999.com: could not connect to host
-3651143.com: did not receive HSTS header
-3651145.com: did not receive HSTS header
-3651146.com: did not receive HSTS header
-3651147.com: did not receive HSTS header
-3651149.com: did not receive HSTS header
-3651201.com: did not receive HSTS header
-3651202.com: did not receive HSTS header
-3651203.com: did not receive HSTS header
-3651204.com: did not receive HSTS header
-3651205.com: did not receive HSTS header
-36565123.com: could not connect to host
-36565234.com: could not connect to host
-36565345.com: could not connect to host
-36565456.com: could not connect to host
-36565567.com: could not connect to host
-36565678.com: could not connect to host
-36565789.com: could not connect to host
-36565b.com: could not connect to host
-36587654321.com: could not connect to host
-3658880000.com: could not connect to host
-365888001.com: could not connect to host
-365888002.com: could not connect to host
-365888003.com: could not connect to host
-365888004.com: could not connect to host
-365888005.com: could not connect to host
-365888006.com: could not connect to host
-365888007.com: could not connect to host
-365888008.com: could not connect to host
-365888009.com: could not connect to host
-36588801.com: could not connect to host
-365888012.com: could not connect to host
-3658880123.com: could not connect to host
-3658881111.com: could not connect to host
-36588812.com: could not connect to host
-365888123.com: could not connect to host
-3658881234.com: could not connect to host
-3658882222.com: could not connect to host
-36588823.com: could not connect to host
-365888234.com: could not connect to host
-3658882345.com: could not connect to host
-3658883333.com: could not connect to host
-36588834.com: could not connect to host
-365888345.com: could not connect to host
-3658883456.com: could not connect to host
-3658884444.com: could not connect to host
-36588845.com: could not connect to host
-365888456.com: could not connect to host
-3658884567.com: could not connect to host
-3658885555.com: could not connect to host
-36588856.com: could not connect to host
-365888567.com: could not connect to host
-3658885678.com: could not connect to host
-3658886666.com: could not connect to host
-36588867.com: could not connect to host
-365888678.com: could not connect to host
-3658886789.com: could not connect to host
-36588878.com: could not connect to host
-365888789.com: could not connect to host
-3658888888.com: could not connect to host
-36588889.com: could not connect to host
-365888890.com: could not connect to host
-36588890.com: could not connect to host
-3658889999.com: could not connect to host
-365888dd.com: could not connect to host
-365888ddd.com: could not connect to host
-365888dddd.com: could not connect to host
-36594.com: did not receive HSTS header
-3659867.com: could not connect to host
-3659980.com: could not connect to host
-365b58.com: did not receive HSTS header
-365beautyworld.com: could not connect to host
-365healthworld.com: could not connect to host
-365maya.com: did not receive HSTS header
-365q01.com: did not receive HSTS header
-365q02.com: did not receive HSTS header
-365q03.com: did not receive HSTS header
-365q04.com: did not receive HSTS header
-365q05.com: did not receive HSTS header
-365q06.com: did not receive HSTS header
-365q07.com: did not receive HSTS header
-365q08.com: did not receive HSTS header
-365q10.com: did not receive HSTS header
-365q11.com: did not receive HSTS header
-365q12.com: did not receive HSTS header
-365q13.com: did not receive HSTS header
-365q14.com: did not receive HSTS header
-365q15.com: did not receive HSTS header
-365securitymg.com: did not receive HSTS header
-365zg.vip: could not connect to host
-3666ks.com: could not connect to host
-368mibn.com: could not connect to host
-369018.com: did not receive HSTS header
-369028.com: did not receive HSTS header
-373.moe: did not receive HSTS header
-376208.com: did not receive HSTS header
-377817.com: could not connect to host
-3778vip.com: did not receive HSTS header
-3778xl.com: could not connect to host
-37879.com: max-age too low: 0
-379700.com: could not connect to host
-3798.com: did not receive HSTS header
-3798.vip: did not receive HSTS header
-37987c.com: could not connect to host
-380021868.com: max-age too low: 0
-380111000.com: could not connect to host
-380111111.com: did not receive HSTS header
-380111222.com: did not receive HSTS header
-380111555.com: did not receive HSTS header
-380111777.com: could not connect to host
-380111888.com: did not receive HSTS header
-380138000.com: max-age too low: 0
-3801808.com: max-age too low: 0
-3801988.com: max-age too low: 0
-380201314.com: max-age too low: 0
-3802024.com: max-age too low: 0
-3802025.com: max-age too low: 0
-380222111.com: did not receive HSTS header
-380222333.com: did not receive HSTS header
-3802288.com: max-age too low: 0
-3804488.com: max-age too low: 0
-3805201314.com: max-age too low: 0
-3805355.com: max-age too low: 0
-3805500.com: max-age too low: 0
-3805511abc.com: max-age too low: 0
-3806677.com: max-age too low: 0
-3806789.com: max-age too low: 0
-3807344.com: max-age too low: 0
-3807711.com: max-age too low: 0
-3807733.com: max-age too low: 0
-3807755.com: max-age too low: 0
-3808822.com: max-age too low: 0
-3808844.com: could not connect to host
-3808855.com: max-age too low: 0
-3808866.com: max-age too low: 0
-3809900.com: max-age too low: 0
-3809911.com: max-age too low: 0
-3809922.com: max-age too low: 0
-3809933.com: max-age too low: 0
-3809944.com: max-age too low: 0
-380zz8989.com: max-age too low: 0
-38138938.com: could not connect to host
-3837a.com: could not connect to host
-3837app.com: did not receive HSTS header
-3837app3837app.com: could not connect to host
-3837app3837app3837app.com: did not receive HSTS header
-3837b.com: did not receive HSTS header
-3837c.com: did not receive HSTS header
-3837d.com: could not connect to host
-3837e.com: did not receive HSTS header
-3837g.com: could not connect to host
-3837h.com: did not receive HSTS header
-3837i.com: could not connect to host
-3837j.com: did not receive HSTS header
-3837k.com: did not receive HSTS header
-3837l.com: could not connect to host
-3837m.com: could not connect to host
-3837n.com: did not receive HSTS header
-3837o.com: did not receive HSTS header
-3837p.com: did not receive HSTS header
-3837q.com: did not receive HSTS header
-3837r.com: could not connect to host
-3837s.com: could not connect to host
-3837t.com: did not receive HSTS header
-3837u.com: could not connect to host
-3837v.com: did not receive HSTS header
-3837w.com: did not receive HSTS header
-3837x.com: did not receive HSTS header
-3837y.com: could not connect to host
-3837z.com: did not receive HSTS header
-3838onndo.tk: could not connect to host
-3839.ca: could not connect to host
-3880p.com: could not connect to host
-38888msc.com: could not connect to host
-388da.com: could not connect to host
-38blog.com: did not receive HSTS header
-393335.ml: did not receive HSTS header
-394553.com: could not connect to host
-3957b.com: could not connect to host
-3957d.com: could not connect to host
-3957f.com: could not connect to host
-3957g.com: could not connect to host
-396228.com: could not connect to host
-3963aa.com: could not connect to host
-39661463.com: max-age too low: 0
-3970100.com: could not connect to host
-3970200.com: could not connect to host
-3970300.com: could not connect to host
-3970400.com: could not connect to host
-3970500.com: could not connect to host
-3970600.com: could not connect to host
-3970700.com: could not connect to host
-3970800.com: could not connect to host
-39708888.com: could not connect to host
-3970900.com: could not connect to host
-3970abc.com: did not receive HSTS header
-3970bc.com: did not receive HSTS header
-3970ccc.com: did not receive HSTS header
-3970fa.com: did not receive HSTS header
-3970go.com: could not connect to host
-3970ku.com: did not receive HSTS header
-3970ok.com: did not receive HSTS header
-3970win.com: did not receive HSTS header
-3970yes.com: did not receive HSTS header
-3970ylc.com: did not receive HSTS header
-39news.tk: did not receive HSTS header
-39sihu.com: could not connect to host
-3amtoolbox.se: could not connect to host
-3candy.com: could not connect to host
-3chat.org: did not receive HSTS header
-3chit.cf: could not connect to host
-3circlefunding.ch: did not receive HSTS header
-3click-loan.com: could not connect to host
-3d-bastler.de: could not connect to host
-3dcart.com: max-age too low: 2592000
-3delivered.com: could not connect to host
-3djava.ml: could not connect to host
-3dlab.team: could not connect to host
-3dm.audio: could not connect to host
-3dprintsondemand.eu: could not connect to host
-3dproteinimaging.com: did not receive HSTS header
-3drenaline.com: could not connect to host
-3dtootmine.ee: did not receive HSTS header
-3fl.com: did not receive HSTS header
-3hl0.net: could not connect to host
-3ik.us: did not receive HSTS header
-3lot.ru: could not connect to host
-3niu168.com: did not receive HSTS header
-3niu178.com: did not receive HSTS header
-3niu66.com: did not receive HSTS header
-3niu666.com: did not receive HSTS header
-3niu8.com: did not receive HSTS header
-3niu88.com: did not receive HSTS header
-3niu8888.com: did not receive HSTS header
-3oneseven.com: did not receive HSTS header
-3os.ooo: could not connect to host
-3phase.pw: could not connect to host
-3sreporting.com: did not receive HSTS header
-3timegear.com: did not receive HSTS header
-3trees.tk: could not connect to host
-3ve.com: did not receive HSTS header
-3vlnaeet.cz: could not connect to host
-3wecommerce.com.br: could not connect to host
-3weekdietworks.com: did not receive HSTS header
-3xm.at: could not connect to host
-3xx.link: could not connect to host
-4-1-where.com: could not connect to host
-4001365.com: could not connect to host
-4002365.com: could not connect to host
-4025360.com: could not connect to host
-4025361.com: could not connect to host
-4025362.com: could not connect to host
-4025363.com: could not connect to host
-4025364.com: could not connect to host
-4025365.com: could not connect to host
-4025366.com: could not connect to host
-4025367.com: could not connect to host
-4025368.com: could not connect to host
-4025369.com: could not connect to host
-4036aa.com: did not receive HSTS header
-4036bb.com: did not receive HSTS header
-4036cc.com: did not receive HSTS header
-4036dd.com: did not receive HSTS header
-404.guide: could not connect to host
-404.sh: could not connect to host
-404404.info: could not connect to host
-4048.co: did not receive HSTS header
-40481234.com: did not receive HSTS header
-40482345.com: did not receive HSTS header
-40484567.com: did not receive HSTS header
-40485678.com: did not receive HSTS header
-40486789.com: did not receive HSTS header
-4048aaa.com: did not receive HSTS header
-4048b.com: did not receive HSTS header
-4048ccc.com: did not receive HSTS header
-4048ddd.com: did not receive HSTS header
-4048e.com: did not receive HSTS header
-4048eee.com: did not receive HSTS header
-4048fff.com: did not receive HSTS header
-4048ggg.com: did not receive HSTS header
-4048hhh.com: did not receive HSTS header
-4048i.com: did not receive HSTS header
-4048iii.com: did not receive HSTS header
-4048jjj.com: did not receive HSTS header
-4048kkk.com: could not connect to host
-4048l.com: could not connect to host
-4048lll.com: did not receive HSTS header
-4048mmm.com: did not receive HSTS header
-4048ooo.com: did not receive HSTS header
-4048p.com: did not receive HSTS header
-4048ppp.com: did not receive HSTS header
-4048q.com: did not receive HSTS header
-4048qqq.com: did not receive HSTS header
-4048r.com: did not receive HSTS header
-4048rrr.com: did not receive HSTS header
-4048s.com: did not receive HSTS header
-4048sss.com: did not receive HSTS header
-4048t.com: did not receive HSTS header
-4048ttt.com: did not receive HSTS header
-4048v.com: could not connect to host
-4048vvv.com: did not receive HSTS header
-4048w.com: did not receive HSTS header
-4048www.com: did not receive HSTS header
-4048x.com: did not receive HSTS header
-4048xxx.com: did not receive HSTS header
-4048y.com: did not receive HSTS header
-4048yyy.com: did not receive HSTS header
-4048z.com: did not receive HSTS header
-4048zzz.com: did not receive HSTS header
-404forest.com: could not connect to host
-408663.com: could not connect to host
-40n13.com: could not connect to host
-41-where.com: could not connect to host
-4111pk.com: could not connect to host
-411416.com: could not connect to host
-4138hd.com: could not connect to host
-414553.com: could not connect to host
-4151365.com: could not connect to host
-416365.com: did not receive HSTS header
-418663.com: could not connect to host
-420dongstorm.com: could not connect to host
-4237.com: could not connect to host
-426773.com: could not connect to host
-427552.com: could not connect to host
-42ch.com: could not connect to host
-42day.info: could not connect to host
-42ms.org: could not connect to host
-42t.ru: could not connect to host
-4345.me: could not connect to host
-436773.com: could not connect to host
-438663.com: could not connect to host
-439191.com: could not connect to host
-440hz-radio.de: did not receive HSTS header
-440hz.radio: could not connect to host
-4427kf.com: did not receive HSTS header
-44321365.com: could not connect to host
-4437kf.com: did not receive HSTS header
-444321365.com: could not connect to host
-4444yh.com: did not receive HSTS header
-444b58.com: did not receive HSTS header
-4455software.com: did not receive HSTS header
-448da.com: did not receive HSTS header
-44957.com: could not connect to host
-44b58.com: did not receive HSTS header
-44scc.com: could not connect to host
-4500.co.il: did not receive HSTS header
-451.ooo: could not connect to host
-4553.com: did not receive HSTS header
-455327.com: could not connect to host
-455328.com: could not connect to host
-4553s.com: could not connect to host
-4553vip.com: could not connect to host
-4562050.com: did not receive HSTS header
-45636565.com: could not connect to host
-45674048.com: did not receive HSTS header
-456lc.com: could not connect to host
-457552.com: could not connect to host
-458663.com: could not connect to host
-4679.space: did not receive HSTS header
-46fa.com: could not connect to host
-47.rs: could not connect to host
-4736666.com: could not connect to host
-476773.com: could not connect to host
-47788a.com: did not receive HSTS header
-47788b.com: did not receive HSTS header
-47788c.com: did not receive HSTS header
-47788d.com: did not receive HSTS header
-47788e.com: did not receive HSTS header
-47788f.com: did not receive HSTS header
-47788g.com: did not receive HSTS header
-47788h.com: did not receive HSTS header
-47788i.com: did not receive HSTS header
-47788j.com: did not receive HSTS header
-47788l.com: did not receive HSTS header
-47788m.com: did not receive HSTS header
-47788n.com: did not receive HSTS header
-47788o.com: did not receive HSTS header
-47788p.com: did not receive HSTS header
-47788q.com: did not receive HSTS header
-47788r.com: did not receive HSTS header
-47788s.com: did not receive HSTS header
-47788u.com: did not receive HSTS header
-47788v.com: did not receive HSTS header
-47788w.com: did not receive HSTS header
-47788x.com: did not receive HSTS header
-47788y.com: did not receive HSTS header
-47788z.com: did not receive HSTS header
-478933.com: could not connect to host
-47essays.com: could not connect to host
-47tech.com: could not connect to host
-486773.com: could not connect to host
-487552.com: could not connect to host
-494k.com: could not connect to host
-498663.com: could not connect to host
-49889.com: could not connect to host
-4997777.com: could not connect to host
-4999016.com: max-age too low: 0
-4azino777.ru: did not receive HSTS header
-4baby.com.br: could not connect to host
-4bike.eu: did not receive HSTS header
-4cclothing.com: could not connect to host
-4d2.xyz: could not connect to host
-4decor.org: max-age too low: 0
-4flex.info: could not connect to host
-4freepress.com: could not connect to host
-4hvac.com: did not receive HSTS header
-4iners.com: could not connect to host
-4kprojektory.cz: could not connect to host
-4loc.us: could not connect to host
-4miners.net: could not connect to host
-4mybaby.ch: did not receive HSTS header
-4ourty2.org: could not connect to host
-4share.tv: could not connect to host
-4sics.se: could not connect to host
-4smart.house: could not connect to host
-4sqsu.eu: could not connect to host
-4tgw34.tk: could not connect to host
-4u.am: did not receive HSTS header
-4w-performers.link: could not connect to host
-4web-hosting.com: could not connect to host
-4winds.pt: did not receive HSTS header
-4x4tt.com: could not connect to host
-4y4a-arts.space: could not connect to host
-5-890.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-50.gd: could not connect to host
-5000yz.com: could not connect to host
-500103.com: did not receive HSTS header
-500108.com: did not receive HSTS header
-5002888.com: could not connect to host
-5007999.com: could not connect to host
-500a500.com: could not connect to host
-500b500.com: could not connect to host
-500c500.com: could not connect to host
-500d500.com: could not connect to host
-500e500.com: could not connect to host
-500f500.com: could not connect to host
-500fcw.com: could not connect to host
-500g500.com: could not connect to host
-500h500.com: could not connect to host
-500i500.com: could not connect to host
-500j500.com: could not connect to host
-500k.nl: could not connect to host
-500k500.com: could not connect to host
-500l500.com: could not connect to host
-500m500.com: could not connect to host
-500n500.com: could not connect to host
-500o500.com: could not connect to host
-500p.xyz: could not connect to host
-500p500.com: could not connect to host
-500pingtai.com: could not connect to host
-500promocodes.com: could not connect to host
-500q500.com: could not connect to host
-500r500.com: could not connect to host
-500s500.com: could not connect to host
-500t500.com: could not connect to host
-500u500.com: could not connect to host
-500wordessay.gq: did not receive HSTS header
-500y500.com: could not connect to host
-500z500.com: could not connect to host
-5017501.com: could not connect to host
-5017502.com: could not connect to host
-5017503.com: could not connect to host
-5017504.com: could not connect to host
-5017505.com: could not connect to host
-5017701.com: could not connect to host
-5017702.com: could not connect to host
-5017703.com: could not connect to host
-5017704.com: could not connect to host
-5017705.com: could not connect to host
-504737.com: max-age too low: 0
-5060711.com: could not connect to host
-5060715.com: could not connect to host
-506pay.com: could not connect to host
-508088.com: could not connect to host
-50lakeshore.com: could not connect to host
-50ma.xyz: could not connect to host
-50millionablaze.org: could not connect to host
-513651.com: could not connect to host
-513vpn.net: could not connect to host
-514622.com: could not connect to host
-517jjj.com: did not receive HSTS header
-517jsh.com: did not receive HSTS header
-517vpn.cn: could not connect to host
-518558.net: max-age too low: 0
-518maicai.com: could not connect to host
-5197a.co: did not receive HSTS header
-5197aa.co: could not connect to host
-5197b.co: did not receive HSTS header
-5197bb.co: could not connect to host
-5197c.co: did not receive HSTS header
-5197cc.co: could not connect to host
-5197d.co: did not receive HSTS header
-5197dd.co: could not connect to host
-5197e.co: did not receive HSTS header
-5197ee.co: could not connect to host
-5197f.co: did not receive HSTS header
-5197ff.co: could not connect to host
-5197g.co: did not receive HSTS header
-5197gg.co: could not connect to host
-5197h.co: did not receive HSTS header
-5197hd.co: could not connect to host
-5197hh.co: could not connect to host
-5197i.co: did not receive HSTS header
-5197ii.co: could not connect to host
-5197j.co: did not receive HSTS header
-5197jj.co: could not connect to host
-5197k.co: did not receive HSTS header
-5197kk.co: could not connect to host
-5197l.co: did not receive HSTS header
-5197ll.co: could not connect to host
-5197m.co: could not connect to host
-5197mm.co: could not connect to host
-5197n.co: could not connect to host
-5197nn.co: could not connect to host
-5197o.co: could not connect to host
-5197oo.co: could not connect to host
-5197p.co: could not connect to host
-5197pp.co: could not connect to host
-5197q.co: could not connect to host
-5197qq.co: could not connect to host
-5197r.co: could not connect to host
-5197rr.co: could not connect to host
-5197s.co: could not connect to host
-5197ss.co: could not connect to host
-5197t.co: could not connect to host
-5197tt.co: could not connect to host
-5197u.co: could not connect to host
-5197uu.co: could not connect to host
-5197v.co: could not connect to host
-5197vv.co: could not connect to host
-5197w.co: could not connect to host
-5197ww.co: could not connect to host
-5197x.co: could not connect to host
-5197xx.co: could not connect to host
-5197y.co: could not connect to host
-5197yy.co: could not connect to host
-5197z.co: could not connect to host
-5197zz.co: could not connect to host
-51aifuli.com: could not connect to host
-51chiyu.com: did not receive HSTS header
-52002c.com: could not connect to host
-52051a.com: could not connect to host
-52051b.com: did not receive HSTS header
-52051c.com: did not receive HSTS header
-52051d.com: did not receive HSTS header
-52051e.com: did not receive HSTS header
-52051f.com: did not receive HSTS header
-52051g.com: did not receive HSTS header
-52051h.com: did not receive HSTS header
-52051i.com: did not receive HSTS header
-52051j.com: did not receive HSTS header
-52051k.com: did not receive HSTS header
-52051l.com: did not receive HSTS header
-52051m.com: did not receive HSTS header
-52051n.com: did not receive HSTS header
-52051o.com: did not receive HSTS header
-52051p.com: did not receive HSTS header
-52051q.com: did not receive HSTS header
-52051r.com: did not receive HSTS header
-52051s.com: did not receive HSTS header
-52051t.com: did not receive HSTS header
-52051u.com: did not receive HSTS header
-52051v.com: did not receive HSTS header
-52051w.com: did not receive HSTS header
-52051x.com: did not receive HSTS header
-52051y.com: did not receive HSTS header
-52051z.com: could not connect to host
-52062d.com: did not receive HSTS header
-52062e.com: did not receive HSTS header
-52062f.com: did not receive HSTS header
-52062i.com: did not receive HSTS header
-52062j.com: did not receive HSTS header
-52062k.com: did not receive HSTS header
-52062l.com: did not receive HSTS header
-52062m.com: did not receive HSTS header
-52062p.com: did not receive HSTS header
-52062r.com: did not receive HSTS header
-52062t.com: did not receive HSTS header
-52062u.com: did not receive HSTS header
-52067.com: did not receive HSTS header
-52067.vip: did not receive HSTS header
-52067a.com: could not connect to host
-52067b.com: could not connect to host
-52067c.com: could not connect to host
-52067d.com: could not connect to host
-52067e.com: could not connect to host
-52067f.com: could not connect to host
-52067g.com: could not connect to host
-52067h.com: could not connect to host
-52067i.com: could not connect to host
-52067j.com: could not connect to host
-52067k.com: could not connect to host
-52067l.com: could not connect to host
-52067m.com: could not connect to host
-52067n.com: could not connect to host
-52067o.com: could not connect to host
-52067p.com: could not connect to host
-52067q.com: could not connect to host
-52067r.com: could not connect to host
-52067s.com: could not connect to host
-52067t.com: could not connect to host
-52067u.com: could not connect to host
-52067v.com: could not connect to host
-52067w.com: could not connect to host
-52067x.com: could not connect to host
-52067y.com: could not connect to host
-52067z.com: did not receive HSTS header
-5214889.net: could not connect to host
-5219.ml: could not connect to host
-521jsh.com: did not receive HSTS header
-5225sf.com: could not connect to host
-5288900.com: did not receive HSTS header
-52b9.com: could not connect to host
-52b9.net: could not connect to host
-52hentai.ml: could not connect to host
-52hentai.us: did not receive HSTS header
-52kb.net: could not connect to host
-52kb1.com: could not connect to host
-52neptune.com: did not receive HSTS header
-5356699.com: max-age too low: 0
-5364.com: could not connect to host
-5388900.com: did not receive HSTS header
-54.sb: could not connect to host
-540.co: did not receive HSTS header
-5432.cc: could not connect to host
-543666365.com: could not connect to host
-5438xs.com: could not connect to host
-5454kf.com: did not receive HSTS header
-545755.com: could not connect to host
-54bf.com: could not connect to host
-551365.com: did not receive HSTS header
-5518k3.com: could not connect to host
-552365.com: did not receive HSTS header
-55321365.com: could not connect to host
-5533445.com: could not connect to host
-5536z.com: could not connect to host
-555321365.com: could not connect to host
-55554048.com: did not receive HSTS header
-55558744.com: could not connect to host
-5555yh.com: did not receive HSTS header
-555b58.com: did not receive HSTS header
-555xl.com: could not connect to host
-555zlong.com: could not connect to host
-556185.com: could not connect to host
-55639.com: did not receive HSTS header
-5566bet.vip: could not connect to host
-55797.com: did not receive HSTS header
-558da.com: did not receive HSTS header
-55b58.com: could not connect to host
-55bt.cc: did not receive HSTS header
-55n13.com: could not connect to host
-55scc.com: could not connect to host
-56011r.com: did not receive HSTS header
-56011s.com: did not receive HSTS header
-56011t.com: did not receive HSTS header
-56011u.com: did not receive HSTS header
-56011v.com: did not receive HSTS header
-56011w.com: did not receive HSTS header
-56011x.com: did not receive HSTS header
-56011y.com: did not receive HSTS header
-56011z.com: did not receive HSTS header
-56564a.com: did not receive HSTS header
-56564b.com: did not receive HSTS header
-56564c.com: did not receive HSTS header
-56564d.com: did not receive HSTS header
-56564e.com: could not connect to host
-56564f.com: did not receive HSTS header
-56564g.com: did not receive HSTS header
-56564h.com: did not receive HSTS header
-56564i.com: did not receive HSTS header
-56564j.com: did not receive HSTS header
-56564k.com: did not receive HSTS header
-56564l.com: did not receive HSTS header
-56564m.com: did not receive HSTS header
-56564n.com: did not receive HSTS header
-56564o.com: did not receive HSTS header
-56564p.com: did not receive HSTS header
-56564q.com: did not receive HSTS header
-56564r.com: did not receive HSTS header
-56564s.com: did not receive HSTS header
-56564t.com: did not receive HSTS header
-56564u.com: did not receive HSTS header
-56564v.com: did not receive HSTS header
-56564w.com: did not receive HSTS header
-56564x.com: did not receive HSTS header
-56564y.com: did not receive HSTS header
-56564z.com: did not receive HSTS header
-566380.com: could not connect to host
-567666365.com: could not connect to host
-56784048.com: did not receive HSTS header
-56877.com: could not connect to host
-56ct.com: could not connect to host
-575380.com: could not connect to host
-57574a.com: did not receive HSTS header
-57574b.com: did not receive HSTS header
-57574c.com: did not receive HSTS header
-57574d.com: did not receive HSTS header
-57574e.com: did not receive HSTS header
-57574f.com: did not receive HSTS header
-57574g.com: did not receive HSTS header
-57574h.com: did not receive HSTS header
-57574i.com: did not receive HSTS header
-57574j.com: did not receive HSTS header
-57574k.com: did not receive HSTS header
-57574l.com: did not receive HSTS header
-57574m.com: did not receive HSTS header
-57574n.com: did not receive HSTS header
-57574o.com: did not receive HSTS header
-57574p.com: did not receive HSTS header
-57574q.com: did not receive HSTS header
-57574r.com: did not receive HSTS header
-57574s.com: did not receive HSTS header
-57574t.com: did not receive HSTS header
-57574u.com: did not receive HSTS header
-57574v.com: did not receive HSTS header
-57574w.com: did not receive HSTS header
-57574x.com: did not receive HSTS header
-57574y.com: did not receive HSTS header
-57574z.com: did not receive HSTS header
-57771399.com: max-age too low: 0
-578380.com: could not connect to host
-5795333.com: did not receive HSTS header
-57aromas.com: did not receive HSTS header
-57he.com: could not connect to host
-57wilkie.net: could not connect to host
-581018.com: did not receive HSTS header
-585380.com: could not connect to host
-58586668.com: max-age too low: 0
-588007008.com: max-age too low: 0
-588da.com: did not receive HSTS header
-588e.com: could not connect to host
-588l.com: could not connect to host
-58nav.com: could not connect to host
-591380.com: could not connect to host
-592380.com: could not connect to host
-593-7.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-593380.com: could not connect to host
-595380.com: could not connect to host
-5981844.com: could not connect to host
-5981h.com: could not connect to host
-5981m.com: could not connect to host
-598380.com: could not connect to host
-5986fc.com: could not connect to host
-5beanskit.com: did not receive HSTS header
-5conejos.com: did not receive HSTS header
-5crowd.com: did not receive HSTS header
-5dwin.com: did not receive HSTS header
-5dwin.net: could not connect to host
-5ece.de: could not connect to host
-5icsb.com: could not connect to host
-5in.win: could not connect to host
-5piecesofadvice.com: could not connect to host
-5starbouncycastlehire.co.uk: could not connect to host
-5w5.la: could not connect to host
-60068vb.com: max-age too low: 0
-605508.cc: could not connect to host
-605508.com: could not connect to host
-609avenue.com: did not receive HSTS header
-60n13.com: could not connect to host
-60ych.net: did not receive HSTS header
-6120.eu: could not connect to host
-6133feng.com: max-age too low: 0
-616675.com: could not connect to host
-6166p.com: did not receive HSTS header
-616btt.com: did not receive HSTS header
-617020.com: could not connect to host
-618media.com: did not receive HSTS header
-620881.com: could not connect to host
-621162.com: could not connect to host
-62222.com: could not connect to host
-626380.com: could not connect to host
-62755.com: could not connect to host
-633663.vip: could not connect to host
-6365ah.com: did not receive HSTS header
-6365am.com: did not receive HSTS header
-6365bj.com: did not receive HSTS header
-6365cq.com: did not receive HSTS header
-6365dx.com: did not receive HSTS header
-6365fj.com: did not receive HSTS header
-6365gd.com: did not receive HSTS header
-6365gs.com: did not receive HSTS header
-6365gx.com: did not receive HSTS header
-6365gz.com: did not receive HSTS header
-6365hb.com: did not receive HSTS header
-6365hh.com: did not receive HSTS header
-6365hk.com: did not receive HSTS header
-6365hlj.com: did not receive HSTS header
-6365hn.com: did not receive HSTS header
-6365jl.com: did not receive HSTS header
-6365js.com: did not receive HSTS header
-6365jx.com: did not receive HSTS header
-6365ln.com: did not receive HSTS header
-6365lt.com: did not receive HSTS header
-6365nmg.com: did not receive HSTS header
-6365nn.com: did not receive HSTS header
-6365nx.com: did not receive HSTS header
-6365qh.com: did not receive HSTS header
-6365sc.com: did not receive HSTS header
-6365sd.com: did not receive HSTS header
-6365sh.com: did not receive HSTS header
-6365ss.com: did not receive HSTS header
-6365sx.com: did not receive HSTS header
-6365tj.com: did not receive HSTS header
-6365tw.com: did not receive HSTS header
-6365xj.com: did not receive HSTS header
-6365xz.com: did not receive HSTS header
-6365yd.com: did not receive HSTS header
-6365yn.com: did not receive HSTS header
-6365zj.com: did not receive HSTS header
-638566.com: could not connect to host
-6396ccc.com: could not connect to host
-6396ddd.com: could not connect to host
-6396fff.com: could not connect to host
-6396hhh.com: could not connect to host
-6396yyy.com: could not connect to host
-645ds.cn: could not connect to host
-645ds.com: could not connect to host
-64616e.xyz: could not connect to host
-64970.com: could not connect to host
-64bitgaming.de: could not connect to host
-64bitservers.net: could not connect to host
-6541166.com: could not connect to host
-6542277.com: could not connect to host
-6543399.com: could not connect to host
-654666365.com: could not connect to host
-65477.com: could not connect to host
-6547700.com: could not connect to host
-6547711.com: could not connect to host
-6547722.com: could not connect to host
-6547733.com: could not connect to host
-6547744.com: could not connect to host
-6547755.com: could not connect to host
-6547766.com: could not connect to host
-6548855.com: could not connect to host
-6548877.com: could not connect to host
-6556hd.com: could not connect to host
-6556pk.com: could not connect to host
-656088.com: could not connect to host
-657660.com: could not connect to host
-657990.com: could not connect to host
-660011.com: could not connect to host
-6602p.com: could not connect to host
-6603p.com: could not connect to host
-6616fc.com: could not connect to host
-6617365.com: did not receive HSTS header
-66205.net: could not connect to host
-6627365.com: did not receive HSTS header
-6629365.com: did not receive HSTS header
-66321365.com: could not connect to host
-66321aa.com: did not receive HSTS header
-66321bb.com: did not receive HSTS header
-66321cc.com: did not receive HSTS header
-66321dd.com: did not receive HSTS header
-66321e.com: did not receive HSTS header
-66321f.com: did not receive HSTS header
-66321g.com: did not receive HSTS header
-66321h.com: did not receive HSTS header
-66321i.com: did not receive HSTS header
-66321j.com: did not receive HSTS header
-66321k.com: did not receive HSTS header
-66321l.com: did not receive HSTS header
-66321m.com: did not receive HSTS header
-66321n.com: did not receive HSTS header
-66321o.com: did not receive HSTS header
-66321p.com: did not receive HSTS header
-66321q.com: did not receive HSTS header
-66321r.com: did not receive HSTS header
-66321s.com: did not receive HSTS header
-66321t.com: did not receive HSTS header
-66321u.com: did not receive HSTS header
-66321v.com: did not receive HSTS header
-66321w.com: did not receive HSTS header
-66321x.com: did not receive HSTS header
-66321y.com: could not connect to host
-66321z.com: could not connect to host
-6633445.com: could not connect to host
-6638s.com: max-age too low: 0
-6639s.com: could not connect to host
-664048.com: did not receive HSTS header
-6660111.ru: could not connect to host
-666321365.com: could not connect to host
-6664553.com: could not connect to host
-666618.cc: could not connect to host
-6666365q.com: did not receive HSTS header
-66664048.com: did not receive HSTS header
-6666sb.com: could not connect to host
-6666yh.com: did not receive HSTS header
-666777bet.com: could not connect to host
-666b58.com: did not receive HSTS header
-6671365.com: did not receive HSTS header
-6672365.com: did not receive HSTS header
-6673365.com: did not receive HSTS header
-6677.us: could not connect to host
-668da.com: did not receive HSTS header
-66b58.com: did not receive HSTS header
-66bwf.com: could not connect to host
-671660.com: could not connect to host
-671990.com: could not connect to host
-672990.com: could not connect to host
-6729a.co: could not connect to host
-6729a.com: did not receive HSTS header
-6729aa.co: could not connect to host
-6729aa.com: did not receive HSTS header
-6729apk.com: could not connect to host
-6729app.com: could not connect to host
-6729b.co: could not connect to host
-6729b.com: did not receive HSTS header
-6729bb.co: could not connect to host
-6729bb.com: did not receive HSTS header
-6729c.co: could not connect to host
-6729c.com: did not receive HSTS header
-6729cc.co: could not connect to host
-6729cc.com: did not receive HSTS header
-6729d.co: could not connect to host
-6729d.com: did not receive HSTS header
-6729dd.co: could not connect to host
-6729dd.com: could not connect to host
-6729dh.co: could not connect to host
-6729e.co: could not connect to host
-6729e.com: did not receive HSTS header
-6729ee.co: could not connect to host
-6729ee.com: did not receive HSTS header
-6729f.co: could not connect to host
-6729f.com: did not receive HSTS header
-6729ff.co: could not connect to host
-6729ff.com: did not receive HSTS header
-6729g.co: could not connect to host
-6729g.com: could not connect to host
-6729gg.co: could not connect to host
-6729gg.com: could not connect to host
-6729h.co: could not connect to host
-6729h.com: could not connect to host
-6729hh.co: could not connect to host
-6729hh.com: did not receive HSTS header
-6729i.co: could not connect to host
-6729i.com: could not connect to host
-6729ii.co: could not connect to host
-6729ii.com: could not connect to host
-6729ipa.com: could not connect to host
-6729j.co: could not connect to host
-6729j.com: could not connect to host
-6729jj.co: could not connect to host
-6729jj.com: could not connect to host
-6729k.co: could not connect to host
-6729k.com: could not connect to host
-6729kk.co: could not connect to host
-6729kk.com: did not receive HSTS header
-6729l.co: could not connect to host
-6729l.com: could not connect to host
-6729ll.co: could not connect to host
-6729ll.com: could not connect to host
-6729m.co: could not connect to host
-6729m.com: could not connect to host
-6729mm.co: could not connect to host
-6729mm.com: did not receive HSTS header
-6729n.co: could not connect to host
-6729n.com: did not receive HSTS header
-6729nn.co: could not connect to host
-6729nn.com: could not connect to host
-6729o.co: could not connect to host
-6729o.com: could not connect to host
-6729oo.co: could not connect to host
-6729oo.com: could not connect to host
-6729p.co: could not connect to host
-6729p.com: could not connect to host
-6729pp.co: could not connect to host
-6729pp.com: could not connect to host
-6729q.co: could not connect to host
-6729q.com: could not connect to host
-6729qq.co: could not connect to host
-6729qq.com: could not connect to host
-6729r.co: could not connect to host
-6729r.com: could not connect to host
-6729rr.co: could not connect to host
-6729rr.com: could not connect to host
-6729s.co: could not connect to host
-6729s.com: could not connect to host
-6729ss.co: could not connect to host
-6729ss.com: could not connect to host
-6729t.co: could not connect to host
-6729t.com: could not connect to host
-6729tt.co: could not connect to host
-6729tt.com: could not connect to host
-6729u.co: could not connect to host
-6729u.com: could not connect to host
-6729uu.co: could not connect to host
-6729uu.com: could not connect to host
-6729v.co: could not connect to host
-6729v.com: could not connect to host
-6729vv.co: could not connect to host
-6729vv.com: could not connect to host
-6729w.co: could not connect to host
-6729w.com: could not connect to host
-6729ww.co: could not connect to host
-6729ww.com: could not connect to host
-6729x.co: could not connect to host
-6729x.com: could not connect to host
-6729xx.co: could not connect to host
-6729xx.com: could not connect to host
-6729y.co: could not connect to host
-6729y.com: could not connect to host
-6729yy.co: could not connect to host
-6729yy.com: did not receive HSTS header
-6729z.co: could not connect to host
-6729z.com: could not connect to host
-6729zz.co: could not connect to host
-6729zz.com: could not connect to host
-673569.com: did not receive HSTS header
-673660.com: could not connect to host
-673990.com: could not connect to host
-675660.com: could not connect to host
-675990.com: could not connect to host
-677314.com: could not connect to host
-677340.com: could not connect to host
-677341.com: could not connect to host
-677346.com: could not connect to host
-677347.com: could not connect to host
-677354.com: could not connect to host
-677364.com: could not connect to host
-677384.com: could not connect to host
-678365app.com: could not connect to host
-678365cc.com: could not connect to host
-678678365.com: could not connect to host
-67894048.com: did not receive HSTS header
-67899876.com: could not connect to host
-679660.com: could not connect to host
-680226.com: could not connect to host
-68277.me: could not connect to host
-6859551.com: max-age too low: 0
-686848.com: could not connect to host
-688da.com: could not connect to host
-690918.com: did not receive HSTS header
-690938.com: did not receive HSTS header
-692660.com: could not connect to host
-692990.com: could not connect to host
-692b8c32.de: could not connect to host
-695660.com: could not connect to host
-6957a.co: could not connect to host
-6957aa.co: could not connect to host
-6957apk.com: could not connect to host
-6957app.com: could not connect to host
-6957b.co: could not connect to host
-6957bb.co: could not connect to host
-6957c.co: could not connect to host
-6957cc.co: could not connect to host
-6957d.co: could not connect to host
-6957dd.co: could not connect to host
-6957dh.co: could not connect to host
-6957e.co: could not connect to host
-6957ee.co: could not connect to host
-6957f.co: could not connect to host
-6957f.com: could not connect to host
-6957ff.co: could not connect to host
-6957g.co: could not connect to host
-6957g.com: could not connect to host
-6957gg.co: could not connect to host
-6957h.co: could not connect to host
-6957h.com: could not connect to host
-6957hh.co: could not connect to host
-6957i.co: could not connect to host
-6957i.com: could not connect to host
-6957ii.co: could not connect to host
-6957ipa.com: could not connect to host
-6957j.co: could not connect to host
-6957j.com: could not connect to host
-6957jj.co: could not connect to host
-6957k.co: could not connect to host
-6957k.com: could not connect to host
-6957kk.co: could not connect to host
-6957l.co: could not connect to host
-6957l.com: did not receive HSTS header
-6957ll.co: could not connect to host
-6957m.co: could not connect to host
-6957m.com: could not connect to host
-6957mm.co: could not connect to host
-6957n.co: could not connect to host
-6957n.com: could not connect to host
-6957nn.co: could not connect to host
-6957nn.com: could not connect to host
-6957o.co: could not connect to host
-6957oo.co: could not connect to host
-6957p.co: could not connect to host
-6957pp.co: could not connect to host
-6957q.co: could not connect to host
-6957qq.co: could not connect to host
-6957r.co: could not connect to host
-6957rr.co: could not connect to host
-6957rr.com: did not receive HSTS header
-6957s.co: could not connect to host
-6957ss.co: could not connect to host
-6957t.co: could not connect to host
-6957tt.co: could not connect to host
-6957u.co: could not connect to host
-6957uu.co: could not connect to host
-6957v.co: could not connect to host
-6957v.com: did not receive HSTS header
-6957vv.co: could not connect to host
-6957vv.com: did not receive HSTS header
-6957w.co: could not connect to host
-6957w.com: did not receive HSTS header
-6957ww.co: could not connect to host
-6957x.co: could not connect to host
-6957x.com: did not receive HSTS header
-6957xx.co: could not connect to host
-6957y.co: could not connect to host
-6957yy.co: could not connect to host
-6957z.co: could not connect to host
-6957z.com: did not receive HSTS header
-6957zz.co: could not connect to host
-695990.com: could not connect to host
-6969.us: could not connect to host
-69759.com: could not connect to host
-698da.com: did not receive HSTS header
-69928.com: could not connect to host
-699jsh.com: did not receive HSTS header
-69mentor.com: could not connect to host
-69square.com: could not connect to host
-6boy.net: could not connect to host
-6bwcp.com: could not connect to host
-6hzx.com: could not connect to host
-6ird.com: did not receive HSTS header
-6pm.com: did not receive HSTS header
-6t-montjoye.org: could not connect to host
-6u55ooxpo38mnikkxqvbmwfwauiiv35bsmm-2yj.com: did not receive HSTS header
-6w6.la: could not connect to host
-6z0.cn: did not receive HSTS header
-6z3.net: could not connect to host
-700wns.com: did not receive HSTS header
-701605.com: could not connect to host
-7035.com: could not connect to host
-7080997.com: did not receive HSTS header
-70n13.com: could not connect to host
-70nb.com: could not connect to host
-715805617.com: max-age too low: 0
-7177p.com: did not receive HSTS header
-71787777.com: could not connect to host
-71787m.com: did not receive HSTS header
-71787n.com: did not receive HSTS header
-71787o.com: did not receive HSTS header
-71787p.com: did not receive HSTS header
-71787q.com: did not receive HSTS header
-71787r.com: did not receive HSTS header
-71787s.com: did not receive HSTS header
-71787t.com: did not receive HSTS header
-71787u.com: did not receive HSTS header
-71787v.com: did not receive HSTS header
-71787w.com: did not receive HSTS header
-71787x.com: did not receive HSTS header
-71787y.com: did not receive HSTS header
-71787z.com: did not receive HSTS header
-7214.com: max-age too low: 172800
-721av.com: max-age too low: 2592000
-724go.com: could not connect to host
-7261696e626f77.net: could not connect to host
-72ty.com: could not connect to host
-72ty.net: could not connect to host
-731783.com: could not connect to host
-73223.com: did not receive HSTS header
-733575.com: could not connect to host
-7337kf.com: did not receive HSTS header
-73info.com: did not receive HSTS header
-74365365.com: could not connect to host
-74th.jp: could not connect to host
-755243.com: could not connect to host
-755k3.com: could not connect to host
-7570.com: could not connect to host
-758global.com: could not connect to host
-7652.cc: did not receive HSTS header
-77018ee.com: could not connect to host
-771122.tv: did not receive HSTS header
-7717411.com: max-age too low: 0
-7717a.com: did not receive HSTS header
-7717p.com: could not connect to host
-772244.net: did not receive HSTS header
-77321365.com: could not connect to host
-7733445.com: could not connect to host
-776573.net: did not receive HSTS header
-7770b.com: did not receive HSTS header
-7770t.com: could not connect to host
-7771p.com: did not receive HSTS header
-7777365q.com: did not receive HSTS header
-77774048.com: did not receive HSTS header
-77778744.com: could not connect to host
-7777av.co: could not connect to host
-7777yh.com: did not receive HSTS header
-7782001.com: did not receive HSTS header
-7787p.com: did not receive HSTS header
-7788bet.vip: could not connect to host
-77890k.com: could not connect to host
-778da.com: could not connect to host
-77b58.com: could not connect to host
-77book.cn: did not receive HSTS header
-77dd.com: could not connect to host
-77dostavkaroz.ru: could not connect to host
-780aa.com: could not connect to host
-781371.com: could not connect to host
-781376.com: could not connect to host
-781713.com: could not connect to host
-78365aa.com: could not connect to host
-787k3.com: could not connect to host
-788da.com: did not receive HSTS header
-78904048.com: did not receive HSTS header
-7898666.com: did not receive HSTS header
-789zr.com: did not receive HSTS header
-792ww.com: did not receive HSTS header
-799jsh.com: did not receive HSTS header
-79ch.com: could not connect to host
-7f-wgg.cf: could not connect to host
-7f.is: could not connect to host
-7ferfer.com.br: could not connect to host
-7ka.co: did not receive HSTS header
-7kovrikov.ru: did not receive HSTS header
-7links.com.br: did not receive HSTS header
-7nw.eu: could not connect to host
-7pb.ru: did not receive HSTS header
-7qly.com: could not connect to host
-7sons.de: did not receive HSTS header
-7thheavenrestaurant.com: could not connect to host
-7trade8.com: did not receive HSTS header
-7x24servis.com: could not connect to host
-8.net.co: could not connect to host
-800139.com: could not connect to host
-8002d88.com: could not connect to host
-80036.com: could not connect to host
-8003pay.com: could not connect to host
-8006d88.com: could not connect to host
-80780780.com: could not connect to host
-808.lv: did not receive HSTS header
-8080889.com: did not receive HSTS header
-8083d.com: could not connect to host
-8086.cf: did not receive HSTS header
-80883.cc: did not receive HSTS header
-808phone.net: could not connect to host
-8092d88.com: could not connect to host
-80n13.com: could not connect to host
-81000906.com: max-age too low: 0
-81365b.com: did not receive HSTS header
-81365c.com: did not receive HSTS header
-81365d.com: did not receive HSTS header
-81365e.com: did not receive HSTS header
-81365f.com: did not receive HSTS header
-81365g.com: did not receive HSTS header
-81365h.com: did not receive HSTS header
-81365i.com: did not receive HSTS header
-81365j.com: did not receive HSTS header
-81365k.com: did not receive HSTS header
-81365l.com: did not receive HSTS header
-81365m.com: did not receive HSTS header
-81365n.com: did not receive HSTS header
-81365o.com: did not receive HSTS header
-81365p.com: did not receive HSTS header
-81365q.com: did not receive HSTS header
-81365r.com: did not receive HSTS header
-81365s.com: did not receive HSTS header
-81365t.com: did not receive HSTS header
-81365u.com: did not receive HSTS header
-81365v.com: did not receive HSTS header
-81365w.com: did not receive HSTS header
-81365x.com: did not receive HSTS header
-81365y.com: did not receive HSTS header
-81365z.com: did not receive HSTS header
-815jz.com: could not connect to host
-81818d.com: could not connect to host
-81818t.com: could not connect to host
-81818z.com: could not connect to host
-818bwf.com: could not connect to host
-818da.com: did not receive HSTS header
-81uc.com: could not connect to host
-8200d.com: could not connect to host
-8206688.com: did not receive HSTS header
-8208d88.com: could not connect to host
-8212p.com: could not connect to host
-8230d.com: could not connect to host
-82365a.com: did not receive HSTS header
-82365b.com: did not receive HSTS header
-82365c.com: did not receive HSTS header
-82365d.com: did not receive HSTS header
-82365e.com: did not receive HSTS header
-82365f.com: did not receive HSTS header
-82365g.com: did not receive HSTS header
-82365h.com: did not receive HSTS header
-82365i.com: did not receive HSTS header
-82365j.com: did not receive HSTS header
-82365k.com: did not receive HSTS header
-82365l.com: did not receive HSTS header
-82365m.com: did not receive HSTS header
-82365n.com: did not receive HSTS header
-82365o.com: did not receive HSTS header
-82365p.com: did not receive HSTS header
-82365q.com: did not receive HSTS header
-82365r.com: did not receive HSTS header
-82365s.com: did not receive HSTS header
-82365t.com: did not receive HSTS header
-82365u.com: did not receive HSTS header
-82365v.com: did not receive HSTS header
-82365w.com: did not receive HSTS header
-82365x.com: did not receive HSTS header
-82365y.com: did not receive HSTS header
-82365z.com: did not receive HSTS header
-826468.com: could not connect to host
-826498.com: could not connect to host
-8278aa.com: could not connect to host
-8278bet.com: could not connect to host
-8278eee.com: could not connect to host
-8278jjj.com: could not connect to host
-82ty.com: could not connect to host
-83365365.com: could not connect to host
-8349822.com: could not connect to host
-8363p.com: could not connect to host
-8367p.com: could not connect to host
-8368p.com: could not connect to host
-8369p.com: could not connect to host
-8379p.com: could not connect to host
-8391p.com: could not connect to host
-83969789.com: max-age too low: 0
-83i.net: could not connect to host
-842365.com: did not receive HSTS header
-846773.com: could not connect to host
-848663.com: could not connect to host
-848jz.com: could not connect to host
-850226.com: could not connect to host
-8521.co: could not connect to host
-8521.me: could not connect to host
-8522.am: could not connect to host
-8522.com: could not connect to host
-8522cn.com: could not connect to host
-8522hk.com: could not connect to host
-8522top.com: could not connect to host
-8560.be: could not connect to host
-8602010.com: did not receive HSTS header
-8649955.com: could not connect to host
-8649966.com: could not connect to host
-8649977.com: could not connect to host
-866304.com: could not connect to host
-866314.com: could not connect to host
-866341.com: could not connect to host
-866346.com: could not connect to host
-866349.com: could not connect to host
-866374.com: could not connect to host
-866394.com: could not connect to host
-8666213.com: max-age too low: 0
-8688fc.com: could not connect to host
-8722.am: could not connect to host
-8722.com: could not connect to host
-8744b.com: did not receive HSTS header
-8744c.com: did not receive HSTS header
-8744d.com: did not receive HSTS header
-8744e.com: did not receive HSTS header
-8744f.com: did not receive HSTS header
-8744g.com: did not receive HSTS header
-8744h.com: did not receive HSTS header
-8744i.com: did not receive HSTS header
-8744j.com: did not receive HSTS header
-8744k.com: did not receive HSTS header
-8744l.com: did not receive HSTS header
-8744m.com: did not receive HSTS header
-8744n.com: did not receive HSTS header
-8744o.com: did not receive HSTS header
-8744p.com: did not receive HSTS header
-8744q.com: did not receive HSTS header
-8744r.com: did not receive HSTS header
-8744s.com: did not receive HSTS header
-8744t.com: did not receive HSTS header
-8744u.com: did not receive HSTS header
-8744v.com: did not receive HSTS header
-8744w.com: could not connect to host
-8744x.com: could not connect to host
-8744y.com: did not receive HSTS header
-8744z.com: did not receive HSTS header
-87577.com: could not connect to host
-876666365.com: could not connect to host
-88.to: did not receive HSTS header
-88021.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-8818k3.com: could not connect to host
-8822d88.com: could not connect to host
-88321365.com: could not connect to host
-8833445.com: could not connect to host
-88740n.com: could not connect to host
-8876007.com: did not receive HSTS header
-8876008.com: did not receive HSTS header
-8876009.com: did not receive HSTS header
-8876138.com: did not receive HSTS header
-8876205.com: could not connect to host
-8876278.com: did not receive HSTS header
-8876289.com: could not connect to host
-8876290.com: did not receive HSTS header
-8876353.com: did not receive HSTS header
-8876389.com: did not receive HSTS header
-8876520.com: did not receive HSTS header
-8876578.com: could not connect to host
-8876598.com: could not connect to host
-8876655.com: could not connect to host
-8876660.com: could not connect to host
-8876687.com: did not receive HSTS header
-8876764.com: did not receive HSTS header
-8876770.com: did not receive HSTS header
-8876775.com: could not connect to host
-8876776.com: did not receive HSTS header
-8876779.com: could not connect to host
-8876808.com: did not receive HSTS header
-8876818.com: could not connect to host
-8876822.com: could not connect to host
-8876832.com: did not receive HSTS header
-8876835.com: did not receive HSTS header
-8876838.com: could not connect to host
-8876858.com: could not connect to host
-8876859.com: did not receive HSTS header
-8876866.com: could not connect to host
-8876878.com: did not receive HSTS header
-8876879.com: could not connect to host
-8876881.com: could not connect to host
-8876882.com: could not connect to host
-8876883.com: could not connect to host
-8876898.com: could not connect to host
-8876900.com: could not connect to host
-8876955.com: did not receive HSTS header
-8876979.com: did not receive HSTS header
-8876987.com: could not connect to host
-8876989.com: did not receive HSTS header
-8876991.com: could not connect to host
-8876992.com: could not connect to host
-8876996.com: did not receive HSTS header
-8880005555.com: max-age too low: 0
-8880013.com: did not receive HSTS header
-8880021.com: did not receive HSTS header
-8880023.com: did not receive HSTS header
-8880025.com: did not receive HSTS header
-8880057.com: could not connect to host
-8880059.com: did not receive HSTS header
-8880067.com: did not receive HSTS header
-8880083.com: did not receive HSTS header
-8880100.com: did not receive HSTS header
-888321365.com: could not connect to host
-8884553.com: could not connect to host
-88851777.com: did not receive HSTS header
-888666pj.com: could not connect to host
-8886737.com: did not receive HSTS header
-8886739.com: did not receive HSTS header
-8886793.com: did not receive HSTS header
-8886806.com: did not receive HSTS header
-8886860.com: did not receive HSTS header
-888789j.com: could not connect to host
-8887999.com: did not receive HSTS header
-88881.pw: could not connect to host
-8888365q.com: did not receive HSTS header
-88884048.com: did not receive HSTS header
-8888av.co: could not connect to host
-8888yh.com: did not receive HSTS header
-8889457.com: did not receive HSTS header
-8889458.com: did not receive HSTS header
-8889466.com: did not receive HSTS header
-8889563.com: did not receive HSTS header
-8889709.com: did not receive HSTS header
-8889729.com: did not receive HSTS header
-8889792.com: did not receive HSTS header
-8889807.com: did not receive HSTS header
-8889809.com: did not receive HSTS header
-8889819.com: did not receive HSTS header
-8889870.com: did not receive HSTS header
-8889881.com: did not receive HSTS header
-8889890.com: did not receive HSTS header
-8889893.com: did not receive HSTS header
-8889903.com: did not receive HSTS header
-8889910.com: did not receive HSTS header
-888azino.com: did not receive HSTS header
-888b58.com: did not receive HSTS header
-888bwf.com: could not connect to host
-888lu.co: could not connect to host
-888msc.vip: could not connect to host
-88btt.com: did not receive HSTS header
-88bwf.com: could not connect to host
-88d.com: could not connect to host
-88laohu.cc: could not connect to host
-88laohu.com: could not connect to host
-88n13.com: could not connect to host
-890238.com: could not connect to host
-89386.com: could not connect to host
-8951889.com: could not connect to host
-8989k3.com: could not connect to host
-89955.com: could not connect to host
-899699.com: did not receive HSTS header
-899jsh.com: did not receive HSTS header
-89he.com: could not connect to host
-8ack.de: could not connect to host
-8ackprotect.com: did not receive HSTS header
-8azino777.ru: did not receive HSTS header
-8ballbombom.uk: could not connect to host
-8btt.app: did not receive HSTS header
-8da188.com: did not receive HSTS header
-8da2017.com: could not connect to host
-8da2018.com: could not connect to host
-8da222.com: did not receive HSTS header
-8da88.com: did not receive HSTS header
-8da999.com: did not receive HSTS header
-8dabet.com: could not connect to host
-8hrs.net: could not connect to host
-8mpay.com: could not connect to host
-8pc.ru: did not receive HSTS header
-8pecxstudios.com: could not connect to host
-8shequapp.com: could not connect to host
-8svn.com: could not connect to host
-8t88.biz: could not connect to host
-8ung.online: could not connect to host
-8xx.bet: could not connect to host
-8xx.io: could not connect to host
-8xxxxxxx.com: could not connect to host
-8y.network: could not connect to host
-8yun.cf: could not connect to host
-906vv.com: did not receive HSTS header
-908.la: could not connect to host
-90n13.com: could not connect to host
-90smthng.com: could not connect to host
-91-freedom.com: could not connect to host
-910kj.com: could not connect to host
-9118.la: did not receive HSTS header
-9118b.com: could not connect to host
-9118inc.com: could not connect to host
-911911.pw: could not connect to host
-914cq.com: could not connect to host
-917.moe: could not connect to host
-917jjj.com: did not receive HSTS header
-918-siteinfo.com: did not receive HSTS header
-918101.net: did not receive HSTS header
-918116.com: could not connect to host
-9181181.com: could not connect to host
-9181182.com: could not connect to host
-9181183.com: could not connect to host
-9181184.com: could not connect to host
-9181185.com: could not connect to host
-9181186.com: could not connect to host
-9181187.com: could not connect to host
-9181189.com: could not connect to host
-9182289.com: could not connect to host
-918aav.com: could not connect to host
-918aff.com: could not connect to host
-918bhh.com: could not connect to host
-918bip.co: could not connect to host
-918cx.com: could not connect to host
-918dp.com: could not connect to host
-918jt.co: could not connect to host
-918ma.com: could not connect to host
-918qz.com: did not receive HSTS header
-918sa.com: could not connect to host
-918te.com: did not receive HSTS header
-918um.com: could not connect to host
-918vz.com: could not connect to host
-918yy.com: could not connect to host
-918ze.com: could not connect to host
-919093590.com: max-age too low: 0
-91966.com: did not receive HSTS header
-919945.com: could not connect to host
-91d71.com: could not connect to host
-91d72.com: could not connect to host
-91d73.com: could not connect to host
-91d75.com: could not connect to host
-91d76.com: could not connect to host
-91d77.com: could not connect to host
-91d78.com: could not connect to host
-91d79.com: could not connect to host
-91d89.com: could not connect to host
-91d90.com: could not connect to host
-91d91.com: could not connect to host
-91d92.com: could not connect to host
-91d93.com: could not connect to host
-91d95.com: could not connect to host
-91d96.com: could not connect to host
-91d97.com: could not connect to host
-91dh.cc: could not connect to host
-91lt.info: could not connect to host
-91milk.net: could not connect to host
-922.be: could not connect to host
-9297.com: did not receive HSTS header
-9297a.co: could not connect to host
-9297aa.co: could not connect to host
-9297b.co: could not connect to host
-9297bb.co: could not connect to host
-9297c.co: could not connect to host
-9297cc.co: could not connect to host
-9297d.co: could not connect to host
-9297dd.co: could not connect to host
-9297dh.co: could not connect to host
-9297e.co: could not connect to host
-9297e.com: could not connect to host
-9297ee.co: could not connect to host
-9297f.co: could not connect to host
-9297ff.co: could not connect to host
-9297g.co: could not connect to host
-9297gg.co: could not connect to host
-9297h.co: could not connect to host
-9297hd.co: could not connect to host
-9297hh.co: could not connect to host
-9297i.co: could not connect to host
-9297ii.co: could not connect to host
-9297j.co: could not connect to host
-9297jj.co: could not connect to host
-9297k.co: could not connect to host
-9297kk.co: could not connect to host
-9297l.co: could not connect to host
-9297ll.co: could not connect to host
-9297m.co: could not connect to host
-9297mm.co: could not connect to host
-9297n.co: could not connect to host
-9297nn.co: could not connect to host
-9297o.co: could not connect to host
-9297oo.co: could not connect to host
-9297p.co: could not connect to host
-9297p.com: could not connect to host
-9297pp.co: could not connect to host
-9297q.co: could not connect to host
-9297qq.co: could not connect to host
-9297r.co: could not connect to host
-9297rr.co: could not connect to host
-9297s.co: could not connect to host
-9297ss.co: could not connect to host
-9297t.co: could not connect to host
-9297tt.co: could not connect to host
-9297u.co: could not connect to host
-9297uu.co: could not connect to host
-9297v.co: could not connect to host
-9297vv.co: could not connect to host
-9297w.co: could not connect to host
-9297ww.co: could not connect to host
-9297x.co: could not connect to host
-9297xx.co: could not connect to host
-9297y.co: could not connect to host
-9297yy.co: could not connect to host
-9297z.co: could not connect to host
-9297zz.co: could not connect to host
-92bmh.com: did not receive HSTS header
-92owl.com: did not receive HSTS header
-9397a.com: did not receive HSTS header
-9397aa.com: did not receive HSTS header
-9397b.com: did not receive HSTS header
-9397bb.com: did not receive HSTS header
-9397c.com: did not receive HSTS header
-9397cc.com: did not receive HSTS header
-9397dd.com: did not receive HSTS header
-9397e.com: did not receive HSTS header
-9397ee.com: did not receive HSTS header
-9397f.com: did not receive HSTS header
-9397ff.com: did not receive HSTS header
-9397g.com: did not receive HSTS header
-9397gg.com: did not receive HSTS header
-9397h.com: did not receive HSTS header
-9397hb.com: could not connect to host
-9397hh.com: did not receive HSTS header
-9397i.com: did not receive HSTS header
-9397ii.com: could not connect to host
-9397j.com: did not receive HSTS header
-9397jj.com: did not receive HSTS header
-9397kk.com: did not receive HSTS header
-9397ll.com: did not receive HSTS header
-9397m.com: did not receive HSTS header
-9397n.com: did not receive HSTS header
-9397nn.com: did not receive HSTS header
-9397o.com: did not receive HSTS header
-9397oo.com: did not receive HSTS header
-9397p.com: did not receive HSTS header
-9397pp.com: did not receive HSTS header
-9397q.com: did not receive HSTS header
-9397qq.com: did not receive HSTS header
-9397r.com: did not receive HSTS header
-9397rr.com: did not receive HSTS header
-9397s.com: could not connect to host
-9397ss.com: could not connect to host
-9397t.com: could not connect to host
-9397tt.com: could not connect to host
-9397u.com: could not connect to host
-9397uu.com: could not connect to host
-9397v.com: could not connect to host
-9397vv.com: could not connect to host
-9397w.com: could not connect to host
-9397ww.com: could not connect to host
-9397x.com: could not connect to host
-9397xx.com: could not connect to host
-9397y.com: could not connect to host
-9397yy.com: could not connect to host
-9397z.com: could not connect to host
-9397zz.com: could not connect to host
-93cq.com: could not connect to host
-940365.com: could not connect to host
-944cq.com: did not receive HSTS header
-9454.com: could not connect to host
-946773.com: could not connect to host
-947cq.com: did not receive HSTS header
-9499060.com: did not receive HSTS header
-9499066.com: did not receive HSTS header
-9499068.com: did not receive HSTS header
-9499113.com: did not receive HSTS header
-9499115.com: did not receive HSTS header
-9499118.com: did not receive HSTS header
-9499125.com: did not receive HSTS header
-9499137.com: did not receive HSTS header
-9499151.com: did not receive HSTS header
-9499212.com: did not receive HSTS header
-9499232.com: could not connect to host
-9499238.com: could not connect to host
-9499263.com: could not connect to host
-9499278.com: did not receive HSTS header
-9499292.com: did not receive HSTS header
-9499293.com: could not connect to host
-9499343.com: could not connect to host
-9499369.com: could not connect to host
-9499399.com: could not connect to host
-9499403.com: did not receive HSTS header
-9499518.com: could not connect to host
-9499558.com: could not connect to host
-9499565.com: did not receive HSTS header
-9499568.com: could not connect to host
-9499575.com: did not receive HSTS header
-9499588.com: could not connect to host
-9499668.com: did not receive HSTS header
-9499676.com: did not receive HSTS header
-9499682.com: could not connect to host
-9499737.com: did not receive HSTS header
-9499757.com: could not connect to host
-9499835.com: did not receive HSTS header
-9499855.com: did not receive HSTS header
-9499869.com: could not connect to host
-9499958.com: did not receive HSTS header
-9499mmmm.com: could not connect to host
-9499yl.com: could not connect to host
-94cs.cn: could not connect to host
-9500years.com: max-age too low: 0
-95778.com: did not receive HSTS header
-96002e.com: could not connect to host
-960news.ca: could not connect to host
-961621.com: did not receive HSTS header
-9617818.com: could not connect to host
-9617818.net: could not connect to host
-961cq.com: could not connect to host
-963cq.com: did not receive HSTS header
-9651678.ru: could not connect to host
-967606.com: could not connect to host
-9721a.com: could not connect to host
-9721aa.com: could not connect to host
-9721b.com: could not connect to host
-9721bb.com: could not connect to host
-9721c.com: could not connect to host
-9721cc.com: could not connect to host
-9721d.com: could not connect to host
-9721dd.com: could not connect to host
-9721e.com: could not connect to host
-9721ee.com: could not connect to host
-9721f.com: could not connect to host
-9721ff.com: could not connect to host
-9721g.com: could not connect to host
-9721gg.com: could not connect to host
-9721h.com: could not connect to host
-9721hh.com: could not connect to host
-9721i.com: could not connect to host
-9721j.com: could not connect to host
-9721jj.com: could not connect to host
-9721k.com: could not connect to host
-9721kk.com: could not connect to host
-9721l.com: could not connect to host
-9721ll.com: could not connect to host
-9721m.com: could not connect to host
-9721n.com: could not connect to host
-9721nn.com: could not connect to host
-9721o.com: could not connect to host
-9721oo.com: could not connect to host
-9721p.com: could not connect to host
-9721pp.com: could not connect to host
-9721q.com: could not connect to host
-9721qq.com: could not connect to host
-9721r.com: could not connect to host
-9721rr.com: could not connect to host
-9721s.com: could not connect to host
-9721ss.com: could not connect to host
-9721t.com: could not connect to host
-9721tt.com: could not connect to host
-9721u.com: could not connect to host
-9721uu.com: could not connect to host
-9721v.com: could not connect to host
-9721vv.com: could not connect to host
-9721w.com: could not connect to host
-9721ww.com: could not connect to host
-9721x.com: could not connect to host
-9721xx.com: could not connect to host
-9721y.com: could not connect to host
-9721z.com: could not connect to host
-9721zz.com: could not connect to host
-9728.com: did not receive HSTS header
-9728a.co: could not connect to host
-9728aa.co: could not connect to host
-9728b.co: could not connect to host
-9728c.co: could not connect to host
-9728cc.co: could not connect to host
-9728d.co: could not connect to host
-9728dd.co: could not connect to host
-9728dh.co: did not receive HSTS header
-9728e.co: could not connect to host
-9728ee.co: could not connect to host
-9728f.co: could not connect to host
-9728ff.co: could not connect to host
-9728g.co: could not connect to host
-9728gg.co: could not connect to host
-9728h.co: could not connect to host
-9728hd.co: could not connect to host
-9728hh.co: could not connect to host
-9728i.co: could not connect to host
-9728ii.co: could not connect to host
-9728j.co: could not connect to host
-9728jj.co: could not connect to host
-9728k.co: could not connect to host
-9728kk.co: could not connect to host
-9728l.co: could not connect to host
-9728ll.co: could not connect to host
-9728m.co: could not connect to host
-9728mm.co: could not connect to host
-9728n.co: could not connect to host
-9728nn.co: could not connect to host
-9728o.co: could not connect to host
-9728oo.co: could not connect to host
-9728p.co: could not connect to host
-9728pp.co: could not connect to host
-9728q.co: could not connect to host
-9728qq.co: could not connect to host
-9728r.co: could not connect to host
-9728rr.co: could not connect to host
-9728s.co: could not connect to host
-9728ss.co: could not connect to host
-9728t.co: could not connect to host
-9728tt.co: could not connect to host
-9728u.co: could not connect to host
-9728uu.co: could not connect to host
-9728v.co: could not connect to host
-9728vv.co: could not connect to host
-9728w.co: could not connect to host
-9728ww.co: could not connect to host
-9728x.co: could not connect to host
-9728xx.co: could not connect to host
-9728y.co: could not connect to host
-9728yy.co: could not connect to host
-9728z.co: could not connect to host
-9728zz.co: could not connect to host
-97bros.com: did not receive HSTS header
-98198823.com: max-age too low: 0
-9822.bz: could not connect to host
-9822.com: could not connect to host
-9822.info: could not connect to host
-9867666.com: did not receive HSTS header
-987666365.com: could not connect to host
-987987.com: did not receive HSTS header
-988316.com: did not receive HSTS header
-989868888.com: max-age too low: 0
-98laba.com: could not connect to host
-98laba.net: could not connect to host
-9906753.net: could not connect to host
-99321365.com: could not connect to host
-9933445.com: could not connect to host
-99511.fi: could not connect to host
-9968.ag: did not receive HSTS header
-9968.love: did not receive HSTS header
-9968131.com: did not receive HSTS header
-9968166.com: could not connect to host
-9968282.com: did not receive HSTS header
-9968363.com: did not receive HSTS header
-9968389.com: did not receive HSTS header
-9968393.com: did not receive HSTS header
-9968404.com: could not connect to host
-9968505.com: could not connect to host
-9968508.com: did not receive HSTS header
-9968535.com: could not connect to host
-9968595.com: did not receive HSTS header
-9968600.com: did not receive HSTS header
-9968656.com: did not receive HSTS header
-9968707.com: could not connect to host
-9968717.com: did not receive HSTS header
-9968838.com: did not receive HSTS header
-9968959.com: did not receive HSTS header
-9968969.com: could not connect to host
-9968aa.com: could not connect to host
-9968aaa.com: could not connect to host
-9968ab.com: could not connect to host
-9968abc.com: could not connect to host
-9968app.com: did not receive HSTS header
-9968bbb.com: could not connect to host
-9968caipiao.com: did not receive HSTS header
-9968cc.com: could not connect to host
-9968ccc.com: did not receive HSTS header
-9968com.com: could not connect to host
-9968dd.com: could not connect to host
-9968ddd.com: did not receive HSTS header
-9968ee.com: could not connect to host
-9968eee.com: could not connect to host
-9968ff.com: did not receive HSTS header
-9968fff.com: did not receive HSTS header
-9968gg.com: could not connect to host
-9968ggg.com: could not connect to host
-9968go.com: did not receive HSTS header
-9968hh.com: did not receive HSTS header
-9968hhh.com: did not receive HSTS header
-9968ii.com: did not receive HSTS header
-9968iii.com: did not receive HSTS header
-9968jj.com: did not receive HSTS header
-9968jjj.com: could not connect to host
-9968ll.com: did not receive HSTS header
-9968lll.com: could not connect to host
-9968mm.com: could not connect to host
-9968mmm.com: did not receive HSTS header
-9968nn.com: did not receive HSTS header
-9968nnn.com: could not connect to host
-9968ok.com: did not receive HSTS header
-9968oo.com: did not receive HSTS header
-9968ooo.com: did not receive HSTS header
-9968pp.com: did not receive HSTS header
-9968ppp.com: could not connect to host
-9968qq.com: did not receive HSTS header
-9968qqq.com: did not receive HSTS header
-9968rr.com: could not connect to host
-9968rrr.com: did not receive HSTS header
-9968ss.com: could not connect to host
-9968sss.com: could not connect to host
-9968ttt.com: did not receive HSTS header
-9968uu.com: could not connect to host
-9968uuu.com: could not connect to host
-9968vv.com: did not receive HSTS header
-9968vvv.com: did not receive HSTS header
-9968ww.com: did not receive HSTS header
-9968www.com: could not connect to host
-9968xl.com: could not connect to host
-9968xx.com: did not receive HSTS header
-9968xxx.com: did not receive HSTS header
-9968yy.com: could not connect to host
-9968yyy.com: could not connect to host
-9968zz.com: did not receive HSTS header
-9968zzz.com: could not connect to host
-99818adc.com: max-age too low: 0
-998wns.com: did not receive HSTS header
-9994553.com: could not connect to host
-9998722.com: could not connect to host
-99989796.com: could not connect to host
-9999365q.com: did not receive HSTS header
-99994048.com: did not receive HSTS header
-99998522.com: could not connect to host
-99998744.com: could not connect to host
-9999k8.com: could not connect to host
-999b58.com: did not receive HSTS header
-999zlong.com: could not connect to host
-99buffets.com: could not connect to host
-99lib.net: did not receive HSTS header
-99n13.com: could not connect to host
-99wxt.com: could not connect to host
-9allery.com: could not connect to host
-9hosts.net: could not connect to host
-9jajuice.com: could not connect to host
-9jaxtreme.com.ng: could not connect to host
-9k262.com: did not receive HSTS header
-9k323.com: did not receive HSTS header
-9k326.com: did not receive HSTS header
-9k329.com: did not receive HSTS header
-9k337.com: did not receive HSTS header
-9k339.com: did not receive HSTS header
-9k367.com: did not receive HSTS header
-9k377.com: did not receive HSTS header
-9k379.com: did not receive HSTS header
-9k382.com: could not connect to host
-9k387.com: did not receive HSTS header
-9k389.com: did not receive HSTS header
-9k392.com: did not receive HSTS header
-9k393.com: did not receive HSTS header
-9k395.com: did not receive HSTS header
-9k396.com: did not receive HSTS header
-9k397.com: did not receive HSTS header
-9k399.com: did not receive HSTS header
-9k562.com: did not receive HSTS header
-9k563.com: did not receive HSTS header
-9k565.com: did not receive HSTS header
-9k568.com: did not receive HSTS header
-9k569.com: did not receive HSTS header
-9k572.com: did not receive HSTS header
-9k576.com: did not receive HSTS header
-9k626.com: could not connect to host
-9k628.com: did not receive HSTS header
-9k636.com: did not receive HSTS header
-9k653.com: did not receive HSTS header
-9k658.com: did not receive HSTS header
-9k662.com: did not receive HSTS header
-9k663.com: did not receive HSTS header
-9k665.com: did not receive HSTS header
-9k667.com: did not receive HSTS header
-9k668.com: did not receive HSTS header
-9k669.com: did not receive HSTS header
-9k682.com: did not receive HSTS header
-9k686.com: did not receive HSTS header
-9k689.com: did not receive HSTS header
-9k692.com: did not receive HSTS header
-9k698.com: did not receive HSTS header
-9k823.com: did not receive HSTS header
-9k826.com: did not receive HSTS header
-9k827.com: did not receive HSTS header
-9k833.com: did not receive HSTS header
-9k835.com: did not receive HSTS header
-9k836.com: did not receive HSTS header
-9k839.com: did not receive HSTS header
-9k855.com: did not receive HSTS header
-9k856.com: did not receive HSTS header
-9k859.com: did not receive HSTS header
-9k863.com: did not receive HSTS header
-9k865.com: did not receive HSTS header
-9k872.com: did not receive HSTS header
-9k875.com: did not receive HSTS header
-9k876.com: did not receive HSTS header
-9k877.com: did not receive HSTS header
-9k878.com: did not receive HSTS header
-9k879.com: did not receive HSTS header
-9k883.com: did not receive HSTS header
-9k885.com: did not receive HSTS header
-9k889.com: did not receive HSTS header
-9k892.com: did not receive HSTS header
-9k893.com: did not receive HSTS header
-9k896.com: did not receive HSTS header
-9k899.com: did not receive HSTS header
-9n1shop.com: could not connect to host
-9ss6.com: could not connect to host
-9thwonder.com: did not receive HSTS header
-9won.kr: could not connect to host
-9y.at: did not receive HSTS header
-a-bm.de: did not receive HSTS header
-a-classinflatables.co.uk: did not receive HSTS header
-a-intel.com: did not receive HSTS header
-a-ix.net: could not connect to host
-a-little-linux-box.at: did not receive HSTS header
-a-players.team: could not connect to host
-a-plus.space: could not connect to host
-a-pro-pos.info: did not receive HSTS header
-a-rickroll-n.pw: could not connect to host
-a-shafaat.ir: could not connect to host
-a-starbouncycastles.co.uk: could not connect to host
-a-theme.com: could not connect to host
-a04gameapp.com: could not connect to host
-a04webapp.com: could not connect to host
-a06gameapp.com: could not connect to host
-a06webapp.com: could not connect to host
-a1-autopartsglasgow.com: could not connect to host
-a122.cc: could not connect to host
-a1798.com: could not connect to host
-a1972894570.com: max-age too low: 0
-a19840925.com: max-age too low: 0
-a1moldsolutions.com: could not connect to host
-a1scubastore.com: did not receive HSTS header
-a200k.xyz: did not receive HSTS header
-a2c-co.net: could not connect to host
-a2it.gr: did not receive HSTS header
-a3.pm: did not receive HSTS header
-a365vip7.com: could not connect to host
-a3workshop.swiss: could not connect to host
-a50111.com: did not receive HSTS header
-a50222.com: did not receive HSTS header
-a50333.com: did not receive HSTS header
-a50444.com: did not receive HSTS header
-a50555.com: did not receive HSTS header
-a50666.com: did not receive HSTS header
-a50999.com: did not receive HSTS header
-a5197.co: could not connect to host
-a632079.me: did not receive HSTS header
-a6632.com: could not connect to host
-a666l.com: max-age too low: 0
-a6729.co: could not connect to host
-a6729.com: did not receive HSTS header
-a6957.co: could not connect to host
-a6957.com: did not receive HSTS header
-a70222.com: did not receive HSTS header
-a70333.com: did not receive HSTS header
-a70444.com: did not receive HSTS header
-a70555.com: did not receive HSTS header
-a70666.com: did not receive HSTS header
-a70777.com: did not receive HSTS header
-a70888.com: did not receive HSTS header
-a70999.com: did not receive HSTS header
-a7la-chat.com: could not connect to host
-a81365.com: did not receive HSTS header
-a82365.com: did not receive HSTS header
-a899365.com: could not connect to host
-a8q.org: could not connect to host
-a9297.co: could not connect to host
-a9397.com: did not receive HSTS header
-a9721.com: did not receive HSTS header
-a9728.co: could not connect to host
-a9c.co: did not receive HSTS header
-aa1718.net: could not connect to host
-aa43d.cn: could not connect to host
-aa5197.co: could not connect to host
-aa6688.net: could not connect to host
-aa6729.co: could not connect to host
-aa6729.com: did not receive HSTS header
-aa6957.co: could not connect to host
-aa753159.com: max-age too low: 0
-aa7666.com: did not receive HSTS header
-aa7733.com: could not connect to host
-aa9297.co: could not connect to host
-aa9397.com: did not receive HSTS header
-aa9721.com: did not receive HSTS header
-aa9728.co: could not connect to host
-aacfree.com: did not receive HSTS header
-aadw.de: did not receive HSTS header
-aaeblog.com: did not receive HSTS header
-aaeblog.net: did not receive HSTS header
-aaeblog.org: did not receive HSTS header
-aaex.cloud: did not receive HSTS header
-aagetransport.no: could not connect to host
-aanbieders.ga: could not connect to host
-aandeautobody.com: did not receive HSTS header
-aaoo.net: could not connect to host
-aapas.org.ar: did not receive HSTS header
-aapp.space: could not connect to host
-aardvarksolutions.co.za: did not receive HSTS header
-aariefhaafiz.com: could not connect to host
-aaron-gustafson.com: did not receive HSTS header
-aaron.cm: could not connect to host
-aaron.xin: did not receive HSTS header
-aaronfurtado.com: could not connect to host
-aaronmcguire.me: could not connect to host
-aarvinproperties.com: could not connect to host
-ab-bauservice-berlin.de: did not receive HSTS header
-abacus-events.co.uk: did not receive HSTS header
-abanilla.tk: did not receive HSTS header
-abareplace.com: did not receive HSTS header
-abasalehngo.com: could not connect to host
-abasky.net: could not connect to host
-abbas.ch: could not connect to host
-abborsjo.fi: did not receive HSTS header
-abbotsparties.co.uk: could not connect to host
-abbradar.net: did not receive HSTS header
-abc-solutions.cf: could not connect to host
-abc001.ga: could not connect to host
-abc8081.net: could not connect to host
-abc9981.com: max-age too low: 0
-abcbusinesspark.com.br: could not connect to host
-abcdentalcare.com: did not receive HSTS header
-abcdzgx.com: max-age too low: 0
-abchelp.net: could not connect to host
-abdelaliezzyn.tk: could not connect to host
-abdelsater.net: did not receive HSTS header
-abdullah.pw: could not connect to host
-abearofsoap.com: could not connect to host
-abecodes.net: could not connect to host
-abeestrada.com: did not receive HSTS header
-aberdeenalmeras.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-abhibhat.com: did not receive HSTS header
-abi-2017.tk: could not connect to host
-abi-fvs.de: could not connect to host
-abigailstark.com: could not connect to host
-abilitylist.org: did not receive HSTS header
-abilitynet.org.uk: did not receive HSTS header
-abinferis.com: could not connect to host
-abioniere.de: could not connect to host
-abitaspringsla.gov: could not connect to host
-abitur97ag.de: did not receive HSTS header
-ablak-nyilaszaro.info: did not receive HSTS header
-ablogagency.net: could not connect to host
-abloop.com: could not connect to host
-abmahnhelfer.de: did not receive HSTS header
-abnarnro.com: could not connect to host
-abobuch.de: could not connect to host
-aboderenovation.co.uk: could not connect to host
-abogadoscav.com: could not connect to host
-abolition.co: could not connect to host
-abosav.com: did not receive HSTS header
-abou.to: could not connect to host
-about.ge: did not receive HSTS header
-aboutasia-trade.nl: could not connect to host
-aboutmyip.info: did not receive HSTS header
-aboutyou-deals.de: could not connect to host
-abrakidabra.com.br: could not connect to host
-abraxan.pro: could not connect to host
-abraxasteam.com: could not connect to host
-abrilect.com: could not connect to host
-abruzzobeautybar.com: did not receive HSTS header
-absimple.ca: did not receive HSTS header
-absinthium.ch: could not connect to host
-absolutehaitian.com: did not receive HSTS header
-absolutehosting.co.za: could not connect to host
-absolutewaterproofingsolutions.com: did not receive HSTS header
-abstractbarista.com: could not connect to host
-abstudio.de: did not receive HSTS header
-abt.de: did not receive HSTS header
-abtom.de: did not receive HSTS header
-abublog.com: could not connect to host
-abury.fr: could not connect to host
-abury.me: did not receive HSTS header
-abyssgaming.eu: could not connect to host
-ac-elektro.com.ua: could not connect to host
-ac-town.com: could not connect to host
-acabadosboston.com: could not connect to host
-academialowcost.com.br: did not receive HSTS header
-academicenterprise.org: did not receive HSTS header
-academicexperts.us: did not receive HSTS header
-academy4.net: did not receive HSTS header
-acadianapatios.com: did not receive HSTS header
-acaeum.com: did not receive HSTS header
-acai51.net: could not connect to host
-acandroid.top: could not connect to host
-acaonegocios.com.br: could not connect to host
-acapadena.co: could not connect to host
-acarreosvillavicencio.com: could not connect to host
-acbc.ie: max-age too low: 0
-accadia.academy: could not connect to host
-accadoro.it: did not receive HSTS header
-accbay.com: could not connect to host
-accelerate.network: could not connect to host
-accelerator.net: did not receive HSTS header
-accelight.co.jp: did not receive HSTS header
-accelight.jp: did not receive HSTS header
-access-sofia.org: did not receive HSTS header
-accessmy.net: did not receive HSTS header
-acchikocchi.org: could not connect to host
-acclivity.pro: could not connect to host
-accolade.com.br: could not connect to host
-accordable.gq: could not connect to host
-accoun.technology: could not connect to host
-accounts-p.com: did not receive HSTS header
-accountsuspended.club: could not connect to host
-accuritpresence.com: did not receive HSTS header
-accwing.com: could not connect to host
-ace-aegon.cloud: could not connect to host
-ace.media: did not receive HSTS header
-aceadvisory.biz: did not receive HSTS header
-acen.eu: could not connect to host
-aceshop702.com: could not connect to host
-acessibilidadebr.com.br: could not connect to host
-acevik.de: could not connect to host
-acfo.org: did not receive HSTS header
-acg.mn: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-acg.sb: could not connect to host
-acg1080.com: did not receive HSTS header
-acg18.us: could not connect to host
-acgaudio.com: could not connect to host
-acgmoon.com: could not connect to host
-acgmoon.org: could not connect to host
-acgpiano.club: could not connect to host
-acgqwq.gq: could not connect to host
-acheconcursos.com.br: did not receive HSTS header
-acheirj.com.br: could not connect to host
-achenar.net: did not receive HSTS header
-acheritage.co.uk: did not receive HSTS header
-acheter-ethylotest.fr: did not receive HSTS header
-achinsk.tk: did not receive HSTS header
-achmadfamily.com: could not connect to host
-achow101.com: did not receive HSTS header
-achterhoekseveiligheidsbeurs.nl: could not connect to host
-achtzehnterachter.de: could not connect to host
-acicj.org: did not receive HSTS header
-acid.ninja: could not connect to host
-acidbin.co: did not receive HSTS header
-aciety.com: did not receive HSTS header
-acisonline.net: did not receive HSTS header
-acklandstainless.com.au: did not receive HSTS header
-acksoft.fr: did not receive HSTS header
-acksoftdemo.fr: did not receive HSTS header
-acl.ink: could not connect to host
-acluva.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-acmexyz123.info: did not receive HSTS header
-acnpacific.com: did not receive HSTS header
-acoffeeshops.com: could not connect to host
-acorns.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-acorntreecare.com: could not connect to host
-acoshift.com: could not connect to host
-acoshift.me: did not receive HSTS header
-acousticsoundrecords.com: could not connect to host
-acp-integrative.fr: did not receive HSTS header
-acpcoils.com: did not receive HSTS header
-acpinformatique.fr: could not connect to host
-acquistareviagragenericoitalia.net: could not connect to host
-acr.im: could not connect to host
-acraft.org: did not receive HSTS header
-acrealux.lu: did not receive HSTS header
-acrepairdrippingsprings.com: could not connect to host
-acritelli.com: did not receive HSTS header
-acriticismlab.org: could not connect to host
-acrobatic.tk: could not connect to host
-acrolife.cz: did not receive HSTS header
-acroso.me: did not receive HSTS header
-across.ml: could not connect to host
-acrossgw.com: could not connect to host
-acs-chantal.com: did not receive HSTS header
-acs-nettoyage-entretien-immeuble.com: could not connect to host
-acsihostingsolutions.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-acslimited.co.uk: did not receive HSTS header
-actc81.fr: could not connect to host
-actilove.ch: could not connect to host
-actingcxo.com: did not receive HSTS header
-actionlabs.net: could not connect to host
-actionselling.com: did not receive HSTS header
-actiontowingroundrock.com: did not receive HSTS header
-activateplay.com: could not connect to host
-active-escape.com: could not connect to host
-active-tluszcz.pl: did not receive HSTS header
-activecare-monitor.com: could not connect to host
-activeclearweb.com: could not connect to host
-activegearandapparel.com: did not receive HSTS header
-activescreenshots.com: could not connect to host
-activeweb.top: could not connect to host
-activistasconstructivos.org: did not receive HSTS header
-activiteithardenberg.nl: could not connect to host
-activitesaintnicaise.org: could not connect to host
-activiti.alfresco.com: did not receive HSTS header
-actorshop.co.uk: could not connect to host
-actorsroom.com: could not connect to host
-actu-film.com: max-age too low: 0
-actu-medias.com: did not receive HSTS header
-actualite-videos.com: could not connect to host
-actuatemedia.com: did not receive HSTS header
-acuaticos.top: could not connect to host
-acupofsalt.tv: could not connect to host
-acupunturamadrid.xyz: could not connect to host
-acuve.jp: could not connect to host
-acyclovir-cream.cf: could not connect to host
-acyume.com: did not receive HSTS header
-ad-disruptio.fr: could not connect to host
-ad13.in: could not connect to host
-ada.eco: could not connect to host
-ada.is: max-age too low: 2592000
-adajwells.me: could not connect to host
-adam-wilson.me: did not receive HSTS header
-adambalogh.net: could not connect to host
-adambryant.ca: could not connect to host
-adamjoycegames.co.uk: could not connect to host
-adamkaminski.com: did not receive HSTS header
-adamoshaver.com: did not receive HSTS header
-adamradocz.com: could not connect to host
-adamricheimer.com: could not connect to host
-adamsbouncycastles.co.uk: could not connect to host
-adamsfoundationrepair.com: did not receive HSTS header
-adamtatusko.com: max-age too low: 0
-adamwallington.co.uk: could not connect to host
-adamwilcox.org: did not receive HSTS header
-adamwk.com: did not receive HSTS header
-adaptergonomics.com: did not receive HSTS header
-adarshcloud.in: could not connect to host
-adarshthapa.in: did not receive HSTS header
-adastra.re: could not connect to host
-adblock.ovh: could not connect to host
-adboos.com: could not connect to host
-addaxpetroleum.com: could not connect to host
-addeekt.com: could not connect to host
-addicional.com: did not receive HSTS header
-addistribution.it: could not connect to host
-addones.net: could not connect to host
-addones.org: could not connect to host
-addvocate.com: could not connect to host
-addydari.us: could not connect to host
-addyourlink.tk: did not receive HSTS header
-adec-emsa.ae: could not connect to host
-adelaides.com: did not receive HSTS header
-adelevie.com: could not connect to host
-adelgace.top: could not connect to host
-adelianz.com: did not receive HSTS header
-adelinlydia-coach.com: did not receive HSTS header
-adeon.ml: could not connect to host
-adequatetechnology.com: could not connect to host
-aderal.io: could not connect to host
-adesa-asesoria.com: did not receive HSTS header
-adesa.co.uk: did not receive HSTS header
-adfa-1.com: could not connect to host
-adhigamindia.com: could not connect to host
-adhoc.is: did not receive HSTS header
-adhosting.nl: did not receive HSTS header
-adhs-chaoten.net: could not connect to host
-adigitali.biz: did not receive HSTS header
-adindexr.com: could not connect to host
-adint.net: did not receive HSTS header
-adiponectinsupplement.info: did not receive HSTS header
-adiponectinsupplement.net: did not receive HSTS header
-adlerweb.info: did not receive HSTS header
-adm-sarov.ru: could not connect to host
-admin-forms.co.uk: did not receive HSTS header
-admin-numerique.com: did not receive HSTS header
-admin.casa: could not connect to host
-admin.google.com: did not receive HSTS header (error ignored - included regardless)
-admins.tech: did not receive HSTS header
-adminwerk.com: did not receive HSTS header
-adminwerk.net: did not receive HSTS header
-adminwiki.fr: did not receive HSTS header
-admirable.one: could not connect to host
-admirable.pro: could not connect to host
-admitcard.co.in: could not connect to host
-admsel.ec: could not connect to host
-adnanoktar.com: did not receive HSTS header
-adnanotoyedekparca.com: could not connect to host
-adnmb1.com: could not connect to host
-adnot.am: did not receive HSTS header
-adoal.net: could not connect to host
-adoge.me: could not connect to host
-adohanyzasjovoje.hu: could not connect to host
-adomicilio.com.gt: could not connect to host
-adonairelogios.com.br: could not connect to host
-adonizer.science: could not connect to host
-adopteunsiteflash.com: could not connect to host
-adorai.tk: could not connect to host
-adoriasoft.com: did not receive HSTS header
-adprospb.com: did not receive HSTS header
-adquisitio.co.uk: could not connect to host
-adquisitio.de: could not connect to host
-adquisitio.es: could not connect to host
-adquisitio.fr: could not connect to host
-adquisitio.in: could not connect to host
-adquisitio.it: could not connect to host
-adrenaline-gaming.ru: could not connect to host
-adresults.com: did not receive HSTS header
-adresults.nl: did not receive HSTS header
-adrian-riemer.tk: did not receive HSTS header
-adrian2023.com: did not receive HSTS header
-adrianajewelry.my: could not connect to host
-adriancohea.ninja: could not connect to host
-adrianjensen.com: could not connect to host
-adrien.vin: did not receive HSTS header
-adrinet.tk: did not receive HSTS header
-adrino.ml: could not connect to host
-adrl.ca: could not connect to host
-adsfund.org: could not connect to host
-aduedu.de: did not receive HSTS header
-adult.properties: could not connect to host
-adultbizz.eu: could not connect to host
-adunanza.net: did not receive HSTS header
-advaithbot.com: did not receive HSTS header
-advaithnikhi.ml: could not connect to host
-advaithnikhi.tk: could not connect to host
-advanced-online.eu: could not connect to host
-advanceddisposables.co.uk: did not receive HSTS header
-advancedplasticsurgerycenter.com: did not receive HSTS header
-advancedstudio.ro: could not connect to host
-advancedweb.hu: did not receive HSTS header
-advancyte.com: could not connect to host
-advelty.cz: did not receive HSTS header
-advenapay.com: could not connect to host
-advengers.net: did not receive HSTS header
-adventistdeploy.org: could not connect to host
-adventureally.com: could not connect to host
-adventureforest.de: did not receive HSTS header
-adventureworldtour.com: could not connect to host
-adver.top: did not receive HSTS header
-advertisemant.com: could not connect to host
-advicepro.org.uk: did not receive HSTS header
-adviespuntklokkenluiders.nl: could not connect to host
-adviserplus.com: could not connect to host
-advocaten-avocats.be: did not receive HSTS header
-advocatenalkmaar.org: could not connect to host
-advocator.ca: could not connect to host
-advokaty-onlajn.gq: could not connect to host
-advst.uk: could not connect to host
-adws.io: could not connect to host
-adzie.xyz: could not connect to host
-adzuna.co.uk: did not receive HSTS header
-ae8601.com: could not connect to host
-ae86nb.com: could not connect to host
-ae86sb.com: could not connect to host
-ae86x.com: could not connect to host
-aegialis.com: did not receive HSTS header
-aegis.moe: could not connect to host
-aemoria.com: could not connect to host
-aeon.wiki: could not connect to host
-aep-digital.com: did not receive HSTS header
-aerapass.io: did not receive HSTS header
-aereco.com: did not receive HSTS header
-aerialmediapro.net: could not connect to host
-aerolog.co: did not receive HSTS header
-aeroparking.es: did not receive HSTS header
-aerorecords.net: could not connect to host
-aerotheque.fr: did not receive HSTS header
-aes256.ru: could not connect to host
-aesthetics-blog.com: did not receive HSTS header
-aestheticsplus.xyz: could not connect to host
-aestore.by: could not connect to host
-aesym.de: could not connect to host
-aether.pw: could not connect to host
-aethonan.pro: could not connect to host
-aetoscg.com: could not connect to host
-aetoscg.com.au: could not connect to host
-aevpn.net: could not connect to host
-aevpn.org: could not connect to host
-aeyoun.com: did not receive HSTS header
-af-fotografie.net: did not receive HSTS header
-af-internet.nl: did not receive HSTS header
-af-tech.cz: could not connect to host
-afb24.de: did not receive HSTS header
-afbeelding.im: could not connect to host
-afbeeldinguploaden.nl: could not connect to host
-afcmrs.org: did not receive HSTS header
-afcmrsfeedback.org: did not receive HSTS header
-afcmrstest.org: could not connect to host
-afdkompakt.de: max-age too low: 86400
-afeefzarapackages.com: did not receive HSTS header
-aff.moe: could not connect to host
-affiliatefeatures.com: could not connect to host
-affiliateroyale.com: did not receive HSTS header
-affily.io: could not connect to host
-affloc.com: did not receive HSTS header
-affordableblindsexpress.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-affordablebouncycastle.co.uk: did not receive HSTS header
-affordableenergyadvocates.com: could not connect to host
-affordablekilimanjaro.com: could not connect to host
-affvps.net: could not connect to host
-afganistan.cf: did not receive HSTS header
-afghan.gq: could not connect to host
-afharvey.com: did not receive HSTS header
-aficotroceni.ro: did not receive HSTS header
-afiru.net: could not connect to host
-aflamtorrent.com: did not receive HSTS header
-aflfreebets.com: could not connect to host
-aflowershop.ca: could not connect to host
-afmchandler.com: did not receive HSTS header
-afmt.fr: did not receive HSTS header
-afp548.tk: could not connect to host
-afree.ir: did not receive HSTS header
-africanexponent.com: did not receive HSTS header
-africankitchen.gallery: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-africatravel.de: did not receive HSTS header
-afrikarl.de: could not connect to host
-afs-asso.org: did not receive HSTS header
-afscheidsportret.nl: could not connect to host
-aftab-alam.de: did not receive HSTS header
-after.im: did not receive HSTS header
-afterskool.eu: could not connect to host
-afterstack.net: could not connect to host
-afuh.de: could not connect to host
-afvallendoeje.nu: could not connect to host
-afyou.co.kr: could not connect to host
-afzco.asia: did not receive HSTS header
-ag-55.net: could not connect to host
-ag-websolutions.de: did not receive HSTS header
-ag2722.com: could not connect to host
-ag2983.com: could not connect to host
-ag3131a.com: could not connect to host
-ag6.vc: could not connect to host
-ag600.com: could not connect to host
-ag6211.com: could not connect to host
-ag686.com: could not connect to host
-ag775.com: could not connect to host
-ag81826.com: could not connect to host
-ag81867.com: could not connect to host
-ag81886.com: could not connect to host
-ag82008.com: did not receive HSTS header
-ag88.com: could not connect to host
-ag880.win: could not connect to host
-ag8819-livechat.com: could not connect to host
-ag9999.co: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-agalaxyfarfaraway.co.uk: could not connect to host
-agarioforum.ga: could not connect to host
-agatheetraphael.fr: could not connect to host
-agbremen.de: could not connect to host
-agdalieso.com.ba: could not connect to host
-age.hk: did not receive HSTS header
-ageg.ca: did not receive HSTS header
-agelesscitizen.com: could not connect to host
-agelesscitizens.com: could not connect to host
-agenbettingasia.com: did not receive HSTS header
-agenceactiv.immo: did not receive HSTS header
-agenceklic.com: did not receive HSTS header
-agencewebstreet.com: could not connect to host
-agenciabonobo.com: did not receive HSTS header
-agenciadeempregosdourados.com.br: did not receive HSTS header
-agenciagriff.com: did not receive HSTS header
-agenciamdg.com.br: did not receive HSTS header
-agenciamseo.com.br: did not receive HSTS header
-agencymanager.be: could not connect to host
-agendazilei.com: did not receive HSTS header
-agendo.com.ar: did not receive HSTS header
-agent6.com.au: did not receive HSTS header
-agenteit.com: did not receive HSTS header
-agentseeker.ca: could not connect to host
-agenziapubblicitaria.milano.it: could not connect to host
-agenziapubblicitaria.roma.it: could not connect to host
-agevio.com: did not receive HSTS header
-agglo-sion.ch: could not connect to host
-aggr.pw: could not connect to host
-agia.ad: did not receive HSTS header
-agiairini.cz: could not connect to host
-agic.io: did not receive HSTS header
-agilebits.net: could not connect to host
-agileecommerce.com.br: did not receive HSTS header
-agilesurvey.ch: could not connect to host
-agingstats.gov: did not receive HSTS header
-agingstop.net: could not connect to host
-agiosthomas.tk: did not receive HSTS header
-agiserv.fr: could not connect to host
-agks136.com: could not connect to host
-aglc8.com: could not connect to host
-agonworks.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-agoravm.tk: could not connect to host
-agostinhoenascimento.com.br: could not connect to host
-agotnes.com: could not connect to host
-agowa.eu: could not connect to host
-agpideas.com: did not receive HSTS header
-agracan.com: could not connect to host
-agrafix.design: did not receive HSTS header
-agrajag.nl: did not receive HSTS header
-agrargruppe.tk: could not connect to host
-agrias.com.br: could not connect to host
-agricolo.ch: could not connect to host
-agridir.site: could not connect to host
-agrikulturchic.com: could not connect to host
-agrilinks.org: did not receive HSTS header
-agrimap.com: did not receive HSTS header
-agro-forestry.net: could not connect to host
-agro-id.gov.ua: did not receive HSTS header
-agro.rip: could not connect to host
-agrodronechile.cl: did not receive HSTS header
-agroglass.com.br: did not receive HSTS header
-agromotorsburzaco.com: could not connect to host
-agscinemasapp.com: could not connect to host
-agslot.com: could not connect to host
-agslot.net: could not connect to host
-agtv.com.br: did not receive HSTS header
-aguijara.com: did not receive HSTS header
-agul.tk: did not receive HSTS header
-agwin1.com: could not connect to host
-ahabingo.com: could not connect to host
-ahd1234.com: max-age too low: 0
-ahelos.tk: could not connect to host
-aheng.me: did not receive HSTS header
-ahero4all.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-ahidta.gov: could not connect to host
-ahiru3.com: could not connect to host
-ahmadly.com: max-age too low: 2592000
-ahmd.io: did not receive HSTS header
-ahmedabadflowermall.com: could not connect to host
-aholic.co: did not receive HSTS header
-ahoynetwork.com: could not connect to host
-ahri.ovh: could not connect to host
-ahsin.online: could not connect to host
-ahsyg.com: could not connect to host
-ahu.la: could not connect to host
-ahwah.net: could not connect to host
-ahwatukeefoothillsmontessori.com: did not receive HSTS header
-ai.je: could not connect to host
-ai00.vip: could not connect to host
-ai1989.com: could not connect to host
-aia.de: did not receive HSTS header
-aibaoyou.com: could not connect to host
-aibiying.com: could not connect to host
-aibsoftware.mx: could not connect to host
-aicial.co.uk: could not connect to host
-aicial.com: could not connect to host
-aicial.com.au: could not connect to host
-aicv.club: could not connect to host
-aidanwoods.com: did not receive HSTS header
-aide-admin.com: did not receive HSTS header
-aide-valais.ch: could not connect to host
-aidikofflaw.com: could not connect to host
-aido.gq: could not connect to host
-aiesecarad.ro: could not connect to host
-aiforsocialmedia.com: could not connect to host
-aifreeze.ru: could not connect to host
-aify.eu: could not connect to host
-aiheisi.com: could not connect to host
-aiho.stream: did not receive HSTS header
-aiicy.org: could not connect to host
-aiida.se: did not receive HSTS header
-aikenorganics.com: could not connect to host
-ailitonia.xyz: could not connect to host
-aim-consultants.com: did not receive HSTS header
-aimerworld.com: did not receive HSTS header
-aimonline.nl: did not receive HSTS header
-aimrom.org: could not connect to host
-ainishitou.com: max-age too low: 0
-ainrb.com: could not connect to host
-aintevenmad.ch: did not receive HSTS header
-ainutrition.co.uk: did not receive HSTS header
-aioboot.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-aip-marine.com: could not connect to host
-aiphyron.com: could not connect to host
-aiponne.com: could not connect to host
-airbly.com: did not receive HSTS header
-airconsboksburg.co.za: did not receive HSTS header
-airconsrandburg.co.za: did not receive HSTS header
-airconssandton.co.za: did not receive HSTS header
-airductcleaning-fresno.com: did not receive HSTS header
-airedaleterrier.com.br: could not connect to host
-airlea.com: could not connect to host
-airlectrical-airconditioning.com.au: could not connect to host
-airline-economy.com: did not receive HSTS header
-airlinecheckins.com: did not receive HSTS header
-airlock.com: did not receive HSTS header
-airmazinginflatables.com: could not connect to host
-airnow.gov: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-airportlimototoronto.com: did not receive HSTS header
-airproto.com: could not connect to host
-airpurifierproductsonline.com: could not connect to host
-airsick.guide: did not receive HSTS header
-airtimefranchise.com: could not connect to host
-airware.com: did not receive HSTS header
-airwegobouncycastles.co.uk: could not connect to host
-aishnair.com: could not connect to host
-aisin.ae: did not receive HSTS header
-aisle3.space: could not connect to host
-aisr.nl: could not connect to host
-aiticon.de: did not receive HSTS header
-aiutodomestico.ch: could not connect to host
-aivene.com: could not connect to host
-aiw-thkoeln.online: could not connect to host
-aiwdirect.com: did not receive HSTS header
-aixxe.net: did not receive HSTS header
-ajapaik.ee: did not receive HSTS header
-ajces.com: could not connect to host
-ajetaci.cz: could not connect to host
-ajibot.com: could not connect to host
-ajmahal.com: did not receive HSTS header
-ajman-realty.ga: did not receive HSTS header
-ajouin.com: could not connect to host
-ajw-group.com: did not receive HSTS header
-ak.com.iq: did not receive HSTS header
-aka.my: did not receive HSTS header
-akash.tk: could not connect to host
-akazakov.info: did not receive HSTS header
-akboy.pw: could not connect to host
-akclinics.org: did not receive HSTS header
-akcounselingservices.com: did not receive HSTS header
-akerek.hu: could not connect to host
-akgundemirbas.com: could not connect to host
-akhilindurti.com: could not connect to host
-akhras.at: did not receive HSTS header
-akiba-server.info: could not connect to host
-akihiro.xyz: could not connect to host
-akilli-devre.com: could not connect to host
-akita-boutique.com: could not connect to host
-akita-stream.com: could not connect to host
-akkadia.cc: could not connect to host
-akkeylab.com: did not receive HSTS header
-akoch.net: could not connect to host
-akombakom.net: could not connect to host
-akoofs.com: did not receive HSTS header
-akpwebdesign.com: did not receive HSTS header
-akracing.se: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-akritikos.info: could not connect to host
-akselimedia.fi: could not connect to host
-akshay.in.eu.org: could not connect to host
-akstudentsfirst.org: could not connect to host
-aktan.com.br: could not connect to host
-aktca.org: did not receive HSTS header
-aktivist.in: did not receive HSTS header
-aktuelle-uhrzeit.at: could not connect to host
-akul.co.in: could not connect to host
-akustik.tech: could not connect to host
-akyildiz.net: did not receive HSTS header
-al-shami.net: could not connect to host
-al3366.tech: could not connect to host
-al3xpro.com: could not connect to host
-alamgir.works: did not receive HSTS header
-alanlee.net: could not connect to host
-alanrickmanflipstable.com: did not receive HSTS header
-alanya.law: did not receive HSTS header
-alariel.de: did not receive HSTS header
-alarme-gps.ch: could not connect to host
-alarmegps.ch: could not connect to host
-alarmsystemreviews.com: could not connect to host
-alaskarsbc.org: did not receive HSTS header
-alasta.info: could not connect to host
-alauda-home.de: could not connect to host
-alaundeil.xyz: could not connect to host
-alaxyjewellers.co.za: could not connect to host
-albanboye.info: did not receive HSTS header
-albaniaonline.tk: did not receive HSTS header
-albaniareiser.no: could not connect to host
-albanien.guide: could not connect to host
-albareport.com: could not connect to host
-alberguecimballa.es: could not connect to host
-alberoraydolap.com: did not receive HSTS header
-albertify.xyz: could not connect to host
-albertonplumber24-7.co.za: did not receive HSTS header
-albertopimienta.com: did not receive HSTS header
-albinma.com: could not connect to host
-albrocar.com: could not connect to host
-albuic.tk: could not connect to host
-alcantarafleuriste.com: did not receive HSTS header
-alcatraz.online: could not connect to host
-alcazaar.com: could not connect to host
-alchemia.co.il: did not receive HSTS header
-alcnutrition.com: could not connect to host
-alcoholrehab.website: did not receive HSTS header
-alcorao.org: could not connect to host
-aldenmiamibeach.com: did not receive HSTS header
-aldes.co.za: did not receive HSTS header
-aldred.cloud: did not receive HSTS header
-aleax.me: could not connect to host
-alecvannoten.be: did not receive HSTS header
-aledg.cl: did not receive HSTS header
-aleksejjocic.tk: could not connect to host
-alenan.org: could not connect to host
-alerbon.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-alertaenlinea.gov: did not receive HSTS header
-alessandro.pw: could not connect to host
-alessandroz.pro: could not connect to host
-alethearose.com: could not connect to host
-alevi-forum.tk: could not connect to host
-alexanderb.info: could not connect to host
-alexandermuetzel.de: did not receive HSTS header
-alexandernorth.ch: could not connect to host
-alexandre-blond.fr: did not receive HSTS header
-alexandre.sh: did not receive HSTS header
-alexandrefa.ovh: could not connect to host
-alexandros.io: could not connect to host
-alexbogovich.com: did not receive HSTS header
-alexbresnahan.com: could not connect to host
-alexdaulby.com: did not receive HSTS header
-alexdodge.ca: did not receive HSTS header
-alexfisherhealth.com.au: did not receive HSTS header
-alexhaydock.co.uk: did not receive HSTS header
-alexio.ml: could not connect to host
-alexisathlani.com: could not connect to host
-alexischaussy.xyz: could not connect to host
-alexismeza.com: could not connect to host
-alexismeza.com.mx: could not connect to host
-alexismeza.dk: could not connect to host
-alexismeza.es: could not connect to host
-alexismeza.nl: could not connect to host
-alexkidd.de: could not connect to host
-alexkott.com: did not receive HSTS header
-alexmak.net: did not receive HSTS header
-alexmol.tk: could not connect to host
-alexpavel.com: could not connect to host
-alexperry.io: could not connect to host
-alexsinnott.me: did not receive HSTS header
-alexthayne.co.uk: could not connect to host
-alexwilliams.tech: could not connect to host
-alfa24.pro: could not connect to host
-alfagroup.es: did not receive HSTS header
-alfaponny.se: did not receive HSTS header
-alfirous.com: did not receive HSTS header
-alfonsostriano.it: did not receive HSTS header
-alfredxing.com: did not receive HSTS header
-algarmatic-automatismos.pt: could not connect to host
-algawell.com: did not receive HSTS header
-algbee.com: could not connect to host
-algebra-quiz.com: could not connect to host
-algebraaec.com: did not receive HSTS header
-algercounty.gov: did not receive HSTS header
-alghaib.com: could not connect to host
-algoaware.eu: could not connect to host
-algofactory.de: could not connect to host
-algorithmic.ml: could not connect to host
-algorithmofsuccess.com: could not connect to host
-alhost.ml: could not connect to host
-alibaba-test.tk: did not receive HSTS header
-alibababee.com: could not connect to host
-alibiloungelv.com: did not receive HSTS header
-alibip.de: could not connect to host
-alice-of-alice.top: did not receive HSTS header
-alicialab.org: could not connect to host
-alienflight.com: could not connect to host
-alienslab.net: could not connect to host
-alienvision.com.br: could not connect to host
-aliim.gdn: could not connect to host
-alijammusic.com: did not receive HSTS header
-alilialili.ga: could not connect to host
-alinemaciel.adm.br: could not connect to host
-alinode.com: could not connect to host
-alis-test.tk: could not connect to host
-alistairholland.me: did not receive HSTS header
-alisync.com: could not connect to host
-alittlebitcheeky.com: did not receive HSTS header
-aljammaz.holdings: could not connect to host
-aljmz.com: could not connect to host
-aljoschairmer.de: could not connect to host
-all-subtitles.com: could not connect to host
-all.tf: could not connect to host
-all4nursesksa.net: did not receive HSTS header
-all4os.com: could not connect to host
-allaboutthekink.org: could not connect to host
-allamericanpaintingplus.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-allamericanprotection.net: could not connect to host
-allcat.ga: could not connect to host
-allcinema.jp: could not connect to host
-alldaymonitoring.com: could not connect to host
-alldm.ru: could not connect to host
-alldolledupstore.com: did not receive HSTS header
-allegro-inc.com: did not receive HSTS header
-allemobieleproviders.nl: could not connect to host
-allenosgood.com: did not receive HSTS header
-allerbestefreunde.de: could not connect to host
-allesisonline.nl: did not receive HSTS header
-allesovertech.nl: could not connect to host
-allesrocknroll.de: did not receive HSTS header
-allfreelancers.su: did not receive HSTS header
-alliance-clan.tk: could not connect to host
-alliance-compacts.com: did not receive HSTS header
-alliances-faq.de: could not connect to host
-alligatorge.de: did not receive HSTS header
-allindiacityguide.com: could not connect to host
-allinnote.com: could not connect to host
-allinonecyprus.com: did not receive HSTS header
-allisonchapleau.com: did not receive HSTS header
-allius.de: could not connect to host
-allkindzabeats.com: could not connect to host
-allmbw.com: could not connect to host
-allmebel.ru: did not receive HSTS header
-allmemy.com: could not connect to host
-allmend-ru.de: did not receive HSTS header
-allmystery.de: did not receive HSTS header
-allnoticebd.com: could not connect to host
-allo-symo.fr: did not receive HSTS header
-allods-zone.ru: did not receive HSTS header
-alloffice.com.ua: did not receive HSTS header
-alloinformatique.net: could not connect to host
-alloutatl.com: could not connect to host
-alloutofgum.com: could not connect to host
-alloydevil.nl: did not receive HSTS header
-allpropertyservices.com: did not receive HSTS header
-allprorisk.com: did not receive HSTS header
-allram.info: could not connect to host
-allram.one: could not connect to host
-allrealty.co.za: could not connect to host
-allscammers.exposed: could not connect to host
-allseasons-cleaning.co.uk: could not connect to host
-allshousedesigns.com: did not receive HSTS header
-allsortscastles.co.uk: could not connect to host
-allstarpartyinflatables.co.uk: could not connect to host
-allstarswithus.com: could not connect to host
-allstorebrasil.com.br: could not connect to host
-allthingsblogging.com: did not receive HSTS header
-allthingsfpl.com: could not connect to host
-allthingssquared.com: could not connect to host
-allurefest.com: could not connect to host
-allwiki.tk: could not connect to host
-almagalla.com: could not connect to host
-almayadeen.education: could not connect to host
-almorafestival.com: could not connect to host
-aloalabs.com: did not receive HSTS header
-alocato.com: could not connect to host
-aloexn.com: max-age too low: 0
-alonas.ovh: could not connect to host
-alorenzi.eu: did not receive HSTS header
-alp.net.cn: could not connect to host
-alparque.com: did not receive HSTS header
-alpe-d-or.dyn-o-saur.com: could not connect to host
-alpenjuice.com: could not connect to host
-alpha-assistant.com: could not connect to host
-alpha-centauri.tk: did not receive HSTS header
-alpha.irccloud.com: could not connect to host
-alphabet-z.xyz: could not connect to host
-alphabit-secure.com: could not connect to host
-alphabrock.cn: did not receive HSTS header
-alphabuild.io: could not connect to host
-alphadote.com: could not connect to host
-alphafitnesslibya.com: did not receive HSTS header
-alphagamers.net: max-age too low: 0
-alphagateanddoor.com: did not receive HSTS header
-alphahunks.com: could not connect to host
-alphalabs.xyz: could not connect to host
-alphaman.ooo: could not connect to host
-alpineplanet.com: did not receive HSTS header
-alpstarentaisetaxi.com: did not receive HSTS header
-alpstarentaisetaxi.fr: did not receive HSTS header
-alqassam.net: did not receive HSTS header
-alquiladoramexico.com: did not receive HSTS header
-alroniks.com: could not connect to host
-als-hardware.co.za: did not receive HSTS header
-alspolska.pl: max-age too low: 2592000
-alstroemeria.org: could not connect to host
-alt-tab-design.com: did not receive HSTS header
-alt33c3.org: could not connect to host
-altabib.me: could not connect to host
-altahrim.net: could not connect to host
-altaide.com: did not receive HSTS header
-altailife.ru: did not receive HSTS header
-altairlyh.com: could not connect to host
-altamarea.se: could not connect to host
-altbinaries.com: did not receive HSTS header
-altea-pep18.com: did not receive HSTS header
-alteqnia.com: could not connect to host
-alteraro.com: did not receive HSTS header
-alterbaum.net: could not connect to host
-altercpa.ru: max-age too low: 0
-altered.network: could not connect to host
-altered.si: could not connect to host
-altergalaxy.tk: could not connect to host
-alternativedev.ca: could not connect to host
-alternativehosting.ca: did not receive HSTS header
-altfire.ca: could not connect to host
-altiacaselight.com: could not connect to host
-altisdev.com: could not connect to host
-altisnet.ga: could not connect to host
-altoneum.com: could not connect to host
-altonkey.com: did not receive HSTS header
-altos.tk: did not receive HSTS header
-altporn.xyz: could not connect to host
-alts.li: could not connect to host
-alttrackr.com: could not connect to host
-altweaver.com: could not connect to host
-aluminium-giesserei.de: did not receive HSTS header
-aluminium-scaffolding.co.uk: could not connect to host
-alunjam.es: did not receive HSTS header
-alunonaescola.com.br: could not connect to host
-aluoblog.pw: could not connect to host
-aluoblog.top: could not connect to host
-aluro.info: did not receive HSTS header
-alusta.co: could not connect to host
-alvis-audio.com: did not receive HSTS header
-alvn.ga: could not connect to host
-alwaysdry.com.au: did not receive HSTS header
-alwaysonssl.com: could not connect to host
-alxpresentes.com.br: could not connect to host
-alyssahart.net: did not receive HSTS header
-am-39.com: could not connect to host
-am-liaotian.com: could not connect to host
-am3.se: could not connect to host
-am5188.com: could not connect to host
-am5566m.com: did not receive HSTS header
-am8.im: could not connect to host
-am8213.com: could not connect to host
-am8888.top: could not connect to host
-am9d104.com: did not receive HSTS header
-amadilo.de: could not connect to host
-amadvice.com: could not connect to host
-amaforro.com: could not connect to host
-amaforums.org: did not receive HSTS header
-amal2019.com: could not connect to host
-amalfi5stars.com: did not receive HSTS header
-amalficoastchauffeur.com: could not connect to host
-amaliagamis.com: could not connect to host
-amandaonishi.com: could not connect to host
-amandaworldstudies.com: could not connect to host
-amanet.ro: did not receive HSTS header
-amao999.com: max-age too low: 0
-amaranthus.com.ph: could not connect to host
-amateurchef.co.uk: did not receive HSTS header
-amatzen.dk: did not receive HSTS header
-amavis.org: did not receive HSTS header
-amazighlove.com: did not receive HSTS header
-amazing-gaming.fr: could not connect to host
-amazingbouncycastles.co.uk: did not receive HSTS header
-amazingfloridagulfhomes.com: could not connect to host
-amazinginflatables.co.uk: could not connect to host
-ambiancestudio.ro: did not receive HSTS header
-ambouncyhire.com: could not connect to host
-ambrosio.tk: could not connect to host
-ambrosius.io: could not connect to host
-amcchemical.com: could not connect to host
-amcvega.com: could not connect to host
-amdouglas.uk: could not connect to host
-amechancez.site: could not connect to host
-amedtest.org: did not receive HSTS header
-amelandadventure.nl: did not receive HSTS header
-amend-friseur-schwabing.de: did not receive HSTS header
-amendoeiraresort.com: did not receive HSTS header
-amerhd.com: could not connect to host
-america250.gov: max-age too low: 300
-american-truck-simulator.de: could not connect to host
-american-truck-simulator.net: could not connect to host
-americanbio.com: did not receive HSTS header
-americandistribuidora.com: did not receive HSTS header
-americanoutlawjeepparts.com: did not receive HSTS header
-americansportsinstitute.org: did not receive HSTS header
-americanworkwear.nl: did not receive HSTS header
-amerigroup.com: did not receive HSTS header
-ames.gq: could not connect to host
-ameschristian.net: did not receive HSTS header
-amesplash.co.uk: did not receive HSTS header
-amesvacuumrepair.com: could not connect to host
-amethystbodyart.com: did not receive HSTS header
-amethystcards.co.uk: could not connect to host
-amethyste.moe: did not receive HSTS header
-ameza.co.uk: could not connect to host
-ameza.com.mx: could not connect to host
-ameza.io: could not connect to host
-ameza.me: could not connect to host
-ameza.net: could not connect to host
-amg-exterieur.fr: could not connect to host
-amiciidogrescue.org.uk: did not receive HSTS header
-amicimar.it: did not receive HSTS header
-amicsdelbus.com: did not receive HSTS header
-amielle.com: did not receive HSTS header
-amielucha.com: did not receive HSTS header
-amigogeek.net: could not connect to host
-amihub.com: did not receive HSTS header
-amilum.org: could not connect to host
-amilx.com: could not connect to host
-amilx.org: could not connect to host
-amimoto-ami.com: did not receive HSTS header
-amin.ga: did not receive HSTS header
-amin.one: could not connect to host
-aminafrance.com: could not connect to host
-aminorth.com: could not connect to host
-aminullrouted.com: could not connect to host
-amisderodin.fr: could not connect to host
-amiserver.de: could not connect to host
-amisharingstuff.com: could not connect to host
-amishsecurity.com: could not connect to host
-amitriptyline-hydrochloride.ga: did not receive HSTS header
-amitse.com: could not connect to host
-amitube.com: could not connect to host
-amiu.org: could not connect to host
-amleeds.co.uk: did not receive HSTS header
-amlvfs.net: could not connect to host
-ammoulianiapartments.com: did not receive HSTS header
-ammrio.com.br: did not receive HSTS header
-amo-entreprise-et-commerce.fr: could not connect to host
-amok8.am: could not connect to host
-amokinio.com: could not connect to host
-amoory.com: could not connect to host
-amorimendes.com.br: could not connect to host
-amphibo.ly: could not connect to host
-ampledesigners.com: could not connect to host
-ampleinfographics.com: could not connect to host
-ampol-agd.pl: did not receive HSTS header
-amri.nl: did not receive HSTS header
-amstelland.com: did not receive HSTS header
-amtentertainments.co.uk: could not connect to host
-amua.fr: did not receive HSTS header
-amunoz.org: could not connect to host
-amv-crm.ru: did not receive HSTS header
-amxpj888.com: could not connect to host
-amyfoundhermann.com: could not connect to host
-amyharrisonline.com: did not receive HSTS header
-amyrussellhair.com: could not connect to host
-amzanalyzer.com: did not receive HSTS header
-an-alles-gedacht.de: could not connect to host
-anabol.nl: could not connect to host
-anabolic.co: did not receive HSTS header
-anachronis.gq: could not connect to host
-anadoluefessk.org: did not receive HSTS header
-anadoluefessporkulubu.org: could not connect to host
-anaethelion.fr: could not connect to host
-anagra.ms: could not connect to host
-anajianu.ro: max-age too low: 2592000
-anakros.me: did not receive HSTS header
-analangelsteen.com: could not connect to host
-analbleachingguide.com: did not receive HSTS header
-analpantyhose.org: could not connect to host
-analytic-s.ml: could not connect to host
-analyticsinmotion.net: could not connect to host
-analyzemyfriends.com: could not connect to host
-ananas.gq: could not connect to host
-ananiev.ml: could not connect to host
-ananke.io: could not connect to host
-anarajaoui.ma: could not connect to host
-anarchistos.tk: could not connect to host
-anarchyrp.life: could not connect to host
-anassiriphotography.com: could not connect to host
-anastasiafond.com: did not receive HSTS header
-anaveragehuman.eu.org: did not receive HSTS header
-ancarda.net: could not connect to host
-anchorgrounds.com: did not receive HSTS header
-anchorinmarinainc.com: did not receive HSTS header
-ancient-gates.de: could not connect to host
-ancient-times.info: did not receive HSTS header
-ancientcraft.eu: could not connect to host
-ancientkarma.com: could not connect to host
-andbraiz.com: could not connect to host
-andere-gedanken.net: did not receive HSTS header
-anderslind.dk: did not receive HSTS header
-andicui.net: did not receive HSTS header
-andicui.xyz: did not receive HSTS header
-andisadhdspot.com: could not connect to host
-andiscyber.space: could not connect to host
-andoms.fi: did not receive HSTS header
-andre-ballensiefen.de: could not connect to host
-andreahruby.it: could not connect to host
-andrealand.sk: did not receive HSTS header
-andreas-hecht.com: did not receive HSTS header
-andreasanti.net: did not receive HSTS header
-andreasbasurto.com: could not connect to host
-andreaseracleous.com: max-age too low: 2592000
-andreasfritz-fotografie.de: could not connect to host
-andreashecht-blog.de: did not receive HSTS header
-andreaskluge.eu: could not connect to host
-andreasmuelhaupt.de: could not connect to host
-andreasr.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-andreastoneman.com: could not connect to host
-andrefaber.nl: did not receive HSTS header
-andrei-coman.com: could not connect to host
-andreigec.net: could not connect to host
-andrejbenz.com: could not connect to host
-andrejstefanovski.com: did not receive HSTS header
-andrepicard.de: could not connect to host
-andrerose.ca: did not receive HSTS header
-andrewbroekman.com: did not receive HSTS header
-andrewdavidwong.com: did not receive HSTS header
-andrewdaws.co: could not connect to host
-andrewdaws.info: could not connect to host
-andrewdaws.me: could not connect to host
-andrewdaws.tv: could not connect to host
-andrewletson.com: could not connect to host
-andrewmcfarlane.tk: did not receive HSTS header
-andrewmichaud.beer: could not connect to host
-andrewrdaws.com: could not connect to host
-andrewregan.me: could not connect to host
-andrewtebert.com: did not receive HSTS header
-andrewthelott.net: did not receive HSTS header
-andrewvoce.com: did not receive HSTS header
-andrewx.net: could not connect to host
-andrewyg.net: could not connect to host
-andrezadnik.com: did not receive HSTS header
-andrija-i-andjelka.com: did not receive HSTS header
-andriraharjo.com: could not connect to host
-android: could not connect to host
-android-tv.3utilities.com: could not connect to host
-androidprosmart.com: could not connect to host
-androidsphone.com: did not receive HSTS header
-androled.fr: max-age too low: 5184000
-andronika.net: could not connect to host
-androoz.se: did not receive HSTS header
-androtech.xyz: did not receive HSTS header
-androzoom.com: did not receive HSTS header
-andso.cn: did not receive HSTS header
-andyclark.io: could not connect to host
-andycloud.dynu.net: could not connect to host
-andycraftz.eu: could not connect to host
-andymartin.cc: could not connect to host
-andymelichar.com: max-age too low: 0
-andymoore.info: did not receive HSTS header
-andyuk.org: did not receive HSTS header
-anecuni-club.com: could not connect to host
-anecuni-rec.com: could not connect to host
-anegabawa.com: did not receive HSTS header
-anelusa.com: did not receive HSTS header
-anendlesssupply.co.uk: did not receive HSTS header
-anfenglish.com: did not receive HSTS header
-anfsanchezo.co: could not connect to host
-anfsanchezo.me: could not connect to host
-ange-de-bonheur444.com: could not connect to host
-angel-body.com: could not connect to host
-angelcloudworld.com: could not connect to host
-angelcojuelo.com: could not connect to host
-angelic47.com: max-age too low: 2592000
-angelinaangulo.com: could not connect to host
-angeloroberto.ch: did not receive HSTS header
-angeloryndon.com: did not receive HSTS header
-angelsgirl.eu.org: could not connect to host
-angervillelorcher.fr: did not receive HSTS header
-anghami.com: did not receive HSTS header
-anglertanke.de: could not connect to host
-anglesgirl.eu.org: could not connect to host
-anglesya.win: did not receive HSTS header
-anglictinatabor.cz: could not connect to host
-angora.freesite.host: could not connect to host
-angorarental.com: did not receive HSTS header
-angrapa.ru: did not receive HSTS header
-angrut.com: could not connect to host
-angry-monk.com: could not connect to host
-angry.im: could not connect to host
-angrydragonproductions.com: could not connect to host
-angrylab.com: could not connect to host
-angryroute.com: could not connect to host
-anguiao.com: did not receive HSTS header
-aniaimichal.eu: could not connect to host
-aniforprez.net: could not connect to host
-anim.ee: could not connect to host
-animacurse.moe: could not connect to host
-animal-nature-human.com: could not connect to host
-animalstropic.com: could not connect to host
-animamega.tk: could not connect to host
-animan.ca: could not connect to host
-animatelluris.nl: could not connect to host
-anime-drift.tk: did not receive HSTS header
-anime1.top: could not connect to host
-anime1video.tk: could not connect to host
-animeday.ml: could not connect to host
-animefever.tv: did not receive HSTS header
-animesfusion.com.br: did not receive HSTS header
-animurecs.com: did not receive HSTS header
-aniplus.cf: could not connect to host
-aniplus.gq: could not connect to host
-aniplus.ml: could not connect to host
-anisekai.com: max-age too low: 2592000
-anita-mukorom.hu: did not receive HSTS header
-anitklib.ml: could not connect to host
-anitube-nocookie.ch: could not connect to host
-anitube.ch: could not connect to host
-ankakaak.com: could not connect to host
-ankaraprofesyonelnakliyat.com: did not receive HSTS header
-ankaraprofesyonelnakliyat.com.tr: did not receive HSTS header
-ankarayilmaznakliyat.com: did not receive HSTS header
-ankarayucelnakliyat.com: did not receive HSTS header
-ankenbrand.me: did not receive HSTS header
-ankwanoma.com: could not connect to host
-anlovegeek.net: did not receive HSTS header
-anlp.top: could not connect to host
-anna-dance.ru: could not connect to host
-annabellaw.com: did not receive HSTS header
-annahmeschluss.de: did not receive HSTS header
-annarbor.group: did not receive HSTS header
-annasvapor.se: could not connect to host
-annetaan.fi: could not connect to host
-annetta.net: could not connect to host
-annevankesteren.com: could not connect to host
-annevankesteren.org: could not connect to host
-annicascakes.nl: could not connect to host
-annotate.software: could not connect to host
-annrusnak.com: did not receive HSTS header
-annsbouncycastles.com: could not connect to host
-anoboy.org: did not receive HSTS header
-anomaly.ws: did not receive HSTS header
-anonboards.com: could not connect to host
-anonoriviera.com: could not connect to host
-anonrea.ch: could not connect to host
-anonukradio.org: could not connect to host
-anonymo.co.uk: could not connect to host
-anonymo.uk: could not connect to host
-anonymousbitcoinexchange.org: could not connect to host
-anonymousstatecollegelulzsec.com: could not connect to host
-anorak.tech: could not connect to host
-anotherchef.com: did not receive HSTS header
-anothermilan.net: could not connect to host
-anothermusic.tk: did not receive HSTS header
-ansdell.info: did not receive HSTS header
-anseo.ninja: could not connect to host
-ansermfg.com: max-age too low: 0
-ansgar.tk: could not connect to host
-anshuman-chatterjee.com: could not connect to host
-anshumanbiswas.com: did not receive HSTS header
-answers-online.ru: could not connect to host
-ant.land: could not connect to host
-antarctica.tk: could not connect to host
-antarctida.tk: could not connect to host
-antarespc.com: did not receive HSTS header
-antarktida.tk: could not connect to host
-antecim.fr: could not connect to host
-antenasmundosat.com.br: did not receive HSTS header
-anteprima.info: could not connect to host
-anthedesign.fr: did not receive HSTS header
-anthenor.co.uk: could not connect to host
-anthony-bardon.eu: could not connect to host
-anthony-rouanet.com: could not connect to host
-anthonyaires.com: did not receive HSTS header
-anthonyavon.com: could not connect to host
-anthro.id: could not connect to host
-antibioticshome.com: did not receive HSTS header
-antifraud.net.ru: could not connect to host
-antijob.tk: did not receive HSTS header
-antiled.by: could not connect to host
-antimatiere.space: could not connect to host
-antipa.ch: could not connect to host
-antirayapmalang.com: max-age too low: 36000
-antispam.group: could not connect to host
-antistate.ch: did not receive HSTS header
-antoine-roux.fr: did not receive HSTS header
-antoinebetas.be: did not receive HSTS header
-antoined.fr: did not receive HSTS header
-antoinemary.io: could not connect to host
-antonellabb.eu: could not connect to host
-antoniogatti.ro: did not receive HSTS header
-antoniomarques.eu: did not receive HSTS header
-antoniorequena.com.ve: max-age too low: 0
-antoniotirado.com: could not connect to host
-antons.io: did not receive HSTS header
-antonuotila.fi: did not receive HSTS header
-antraxx.ee: could not connect to host
-antscript.com: did not receive HSTS header
-anttitenhunen.com: could not connect to host
-anunayk.com: could not connect to host
-anycoin.me: could not connect to host
-anyfood.fi: could not connect to host
-anynode.net: did not receive HSTS header
-anypool.fr: could not connect to host
-anypool.net: could not connect to host
-anyprime.net: could not connect to host
-anythingautowebster.com: did not receive HSTS header
-anythinggraphic.net: did not receive HSTS header
-anytonetech.com: did not receive HSTS header
-aoaprograms.net: could not connect to host
-aobeauty.com.au: could not connect to host
-aobogo.com: could not connect to host
-aocast.info: could not connect to host
-aoicprobationil.gov: could not connect to host
-aojao.cn: could not connect to host
-aojf.fr: could not connect to host
-aoku3d.com: could not connect to host
-aolabs.nz: did not receive HSTS header
-aomberg.com: could not connect to host
-aomonk.com: did not receive HSTS header
-aooobo.com: could not connect to host
-aos-llc.com: did not receive HSTS header
-aosus.org: did not receive HSTS header
-aov.io: could not connect to host
-aovcentrum.nl: did not receive HSTS header
-aozora.moe: could not connect to host
-apadrinaunolivo.org: did not receive HSTS header
-apaginastore.com.br: could not connect to host
-aparaatti.org: could not connect to host
-apartamentosemindaiatuba.com.br: could not connect to host
-apartmanidano.com: could not connect to host
-apartment-natik.fr: could not connect to host
-apartmentkroatien.at: could not connect to host
-apcube.com: could not connect to host
-apeasternpower.com: could not connect to host
-aperture-laboratories.science: did not receive HSTS header
-apethink.net: did not receive HSTS header
-apfelcholest.de: did not receive HSTS header
-api.mega.co.nz: could not connect to host
-apiary.blog: could not connect to host
-apiary.clothing: could not connect to host
-apiary.shop: could not connect to host
-apiary.store: could not connect to host
-apiary.supplies: could not connect to host
-apiary.supply: could not connect to host
-apibot.de: could not connect to host
-apience.com: did not receive HSTS header
-apila.us: could not connect to host
-apiled.io: could not connect to host
-apimo.net: did not receive HSTS header
-apis.blue: could not connect to host
-apis.google.com: did not receive HSTS header (error ignored - included regardless)
-apis.moe: did not receive HSTS header
-apis.world: could not connect to host
-apiu.me: could not connect to host
-apivia.fr: did not receive HSTS header
-apkdv.com: did not receive HSTS header
-apkmod.id: did not receive HSTS header
-apkoyunlar.club: could not connect to host
-apkright.com: did not receive HSTS header
-apkriver.com: could not connect to host
-apl2bits.net: did not receive HSTS header
-apmg-cyber.com: did not receive HSTS header
-apmpproject.org: could not connect to host
-apnakliyat.com: did not receive HSTS header
-apo-deutschland.biz: could not connect to host
-apod-portal-daily.azurewebsites.net: did not receive HSTS header
-apoil.org: did not receive HSTS header
-apolloyl.com: could not connect to host
-apollyon.work: could not connect to host
-aponkral.site: could not connect to host
-aponkralsunucu.com: could not connect to host
-aponow.de: did not receive HSTS header
-aporter.ddns.net: could not connect to host
-apostilasaprovacao.com: could not connect to host
-apotheek-nl.org: did not receive HSTS header
-apotheke-ch.org: could not connect to host
-app: could not connect to host
-app-arena.com: did not receive HSTS header
-app.manilla.com: could not connect to host
-app00228.com: could not connect to host
-app11018.com: could not connect to host
-app77018.com: could not connect to host
-apparels24.com: did not receive HSTS header
-appart.ninja: could not connect to host
-appbooks.net: did not receive HSTS header
-appchive.net: did not receive HSTS header
-appcoins.io: did not receive HSTS header
-appdb.cc: could not connect to host
-appdrinks.com: could not connect to host
-appel-aide.ch: could not connect to host
-appeldorn.me: could not connect to host
-appengine.google.com: did not receive HSTS header (error ignored - included regardless)
-apperio.com: did not receive HSTS header
-appformacpc.com: did not receive HSTS header
-appimlab.it: could not connect to host
-appinn.com: did not receive HSTS header
-apple-watch-zubehoer.de: could not connect to host
-apple.ax: could not connect to host
-applejacks-bouncy-castles.co.uk: could not connect to host
-applelife.ru: did not receive HSTS header
-appleranch.com: could not connect to host
-applesana.es: did not receive HSTS header
-applewatch.co.nz: did not receive HSTS header
-applez.xyz: did not receive HSTS header
-appliancerepairlosangeles.com: did not receive HSTS header
-appliancesrepairservice.ca: did not receive HSTS header
-appliquette.com.au: did not receive HSTS header
-apply55gx.com: could not connect to host
-appointed.at: did not receive HSTS header
-apponline.com: could not connect to host
-appraisal-comps.com: could not connect to host
-appreciationkards.com: could not connect to host
-approlys.fr: did not receive HSTS header
-apps-for-fishing.com: could not connect to host
-apps-perso.com: could not connect to host
-apps4all.sytes.net: could not connect to host
-appsbystudio.co.uk: could not connect to host
-appsdash.io: could not connect to host
-appshuttle.com: could not connect to host
-appsimplex.pt: could not connect to host
-appson.co.uk: did not receive HSTS header
-appspace.com: did not receive HSTS header
-appspacehosted.com: did not receive HSTS header
-appspacestatic.com: did not receive HSTS header
-appspaceusercontent.com: did not receive HSTS header
-apptomics.com: could not connect to host
-apptoutou.com: could not connect to host
-appuro.com: did not receive HSTS header
-appxcrypto.com: did not receive HSTS header
-apratimsaha.com: did not receive HSTS header
-aprendiendoforexhoy.com: could not connect to host
-aprpullmanportermuseum.org: did not receive HSTS header
-apt-one.com: did not receive HSTS header
-aqdun.com: could not connect to host
-aqilacademy.com.au: could not connect to host
-aqqrate.com: could not connect to host
-aquabar.co.il: did not receive HSTS header
-aquafc.com: could not connect to host
-aquainfo.net: could not connect to host
-aquariumaccessories.shop: could not connect to host
-aquaron.com: did not receive HSTS header
-aquatechnologygroup.com: could not connect to host
-aquelarreweb.com: could not connect to host
-aquilaguild.com: could not connect to host
-aquilalab.com: could not connect to host
-aquireceitas.com: could not connect to host
-aquitroc.com: did not receive HSTS header
-arabdigitalexpression.org: did not receive HSTS header
-arabhardware.net: did not receive HSTS header
-arabia-news.gq: could not connect to host
-arabicxz.com: could not connect to host
-aradulconteaza.ro: could not connect to host
-aramado.com: did not receive HSTS header
-aramyss.com: could not connect to host
-aran.me.uk: could not connect to host
-arandinacf.tk: could not connect to host
-aranel.me: could not connect to host
-araraexpress.com.br: could not connect to host
-aravatul.com: could not connect to host
-arawaza.biz: could not connect to host
-arawaza.com: did not receive HSTS header
-arawaza.info: could not connect to host
-arboineuropa.nl: did not receive HSTS header
-arboworks.com: could not connect to host
-arbu.eu: could not connect to host
-arcadiaeng.com: did not receive HSTS header
-arcaea.net: could not connect to host
-arcanetides.com: could not connect to host
-arcbit.io: could not connect to host
-archematerial.com: did not receive HSTS header
-archerygearonline.com: did not receive HSTS header
-archii.ca: did not receive HSTS header
-architectdirect.nl: did not receive HSTS header
-architecte-interieur.be: did not receive HSTS header
-archmediamarketing.com: could not connect to host
-archsec.info: could not connect to host
-archwood.ro: did not receive HSTS header
-arckr.com: could not connect to host
-arco.biz: could not connect to host
-arctic.ca: could not connect to host
-arda-audio.pt: did not receive HSTS header
-ardao.me: did not receive HSTS header
-ardorlabs.se: could not connect to host
-area3.org: could not connect to host
-area536.com: did not receive HSTS header
-areallyneatwebsite.com: could not connect to host
-arefidgetspinnersgay.com: could not connect to host
-arent.kz: did not receive HSTS header
-arenzanaphotography.com: could not connect to host
-arewedubstepyet.com: could not connect to host
-areyouever.me: could not connect to host
-arfhumane.org: did not receive HSTS header
-arg.zone: did not receive HSTS header
-argama-nature.com: could not connect to host
-argennon.xyz: could not connect to host
-argentinatrabaja.org: could not connect to host
-argh.io: could not connect to host
-arguggi.co.uk: could not connect to host
-ariaartgallery.com: did not receive HSTS header
-ariana.wtf: could not connect to host
-arifburhan.online: could not connect to host
-arifp.me: could not connect to host
-ariixmex.com: could not connect to host
-arimarie.com: could not connect to host
-arinflatablefun.co.uk: could not connect to host
-aripiprazolee.gq: could not connect to host
-arisevendor.net: could not connect to host
-arislight.com: could not connect to host
-aristilabs.com: did not receive HSTS header
-aristocratps.com: did not receive HSTS header
-arithxu.com: did not receive HSTS header
-arizana.com: could not connect to host
-arizer.com: did not receive HSTS header
-arizonaautomobileclub.com: could not connect to host
-arizonabondedtitle.com: could not connect to host
-arizonahomeownerinsurance.com: could not connect to host
-arka.gq: could not connect to host
-arkaic.dyndns.org: could not connect to host
-arkbyte.com: did not receive HSTS header
-arkenstone.ml: could not connect to host
-arkitextonico.com: could not connect to host
-arknodejs.com: could not connect to host
-arlartistadigital.com.mx: could not connect to host
-arlatools.com: could not connect to host
-arlen.io: could not connect to host
-arlen.se: could not connect to host
-arlet.click: could not connect to host
-armazemdaminiatura.com.br: could not connect to host
-armazemgourmetbrasil.com.br: did not receive HSTS header
-armeni-jewellery.gr: did not receive HSTS header
-armenians.online: could not connect to host
-armeo.top: could not connect to host
-armin-cpe.de: did not receive HSTS header
-arminc.tk: could not connect to host
-armingrodon.de: did not receive HSTS header
-armleads.com: did not receive HSTS header
-armodec.com: did not receive HSTS header
-armor.com: did not receive HSTS header
-armored.ninja: did not receive HSTS header
-armory.consulting: could not connect to host
-armory.supplies: could not connect to host
-armsday.com: could not connect to host
-armytricka.cz: did not receive HSTS header
-arnakdanielian.com: could not connect to host
-arnaudminable.net: could not connect to host
-arne-petersen.net: did not receive HSTS header
-arnesolutions.com: could not connect to host
-arno.pm: could not connect to host
-arogyadhamhealth.com: did not receive HSTS header
-aromachat.eu: could not connect to host
-aromaclub.nl: did not receive HSTS header
-aromatlas.com: could not connect to host
-around-the-blog.com: could not connect to host
-aroundme.org: could not connect to host
-arouparia.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-arpamip.org: could not connect to host
-arpr.co: did not receive HSTS header
-arpumpsonline.com: did not receive HSTS header
-arraudi.be: could not connect to host
-arrayify.com: could not connect to host
-arrivedconsulting.com: could not connect to host
-arrow-cloud.nl: could not connect to host
-arrowfunction.com: could not connect to host
-arrowgrove.com: could not connect to host
-arrowit.net: could not connect to host
-ars-design.net: did not receive HSTS header
-arsenal-charodeya.com: did not receive HSTS header
-arsenal.ru: did not receive HSTS header
-arshell.me: did not receive HSTS header
-arsk1.com: could not connect to host
-arslonga.io: could not connect to host
-art2web.net: could not connect to host
-artansoft.com: could not connect to host
-artaronquieres.com: did not receive HSTS header
-artartefatos.com.br: could not connect to host
-artbytik.ru: did not receive HSTS header
-artcaly.com.br: did not receive HSTS header
-artcenter.tk: did not receive HSTS header
-artdeco-photo.com: could not connect to host
-arte-soft.co: could not connect to host
-artea.ga: could not connect to host
-arteequipamientos.com.uy: did not receive HSTS header
-arteerotiko.com: did not receive HSTS header
-artegusto.ru: did not receive HSTS header
-artemicroway.com.br: could not connect to host
-artesaniastonalaytlaquepaque.com: could not connect to host
-artesupra.com: did not receive HSTS header
-arthur.cn: could not connect to host
-arti-group.ml: could not connect to host
-articaexports.com: could not connect to host
-artifex21.com: could not connect to host
-artifex21.fr: could not connect to host
-artificial.army: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-artik.cloud: could not connect to host
-artiming.com: could not connect to host
-artisavotins.com: could not connect to host
-artisense.de: could not connect to host
-artisphere.ch: did not receive HSTS header
-artisticedgegranite.net: could not connect to host
-artistnetwork.nl: did not receive HSTS header
-artmanager.dk: did not receive HSTS header
-artmaxi.eu: could not connect to host
-artmosfilms.co.za: did not receive HSTS header
-artnims.com: could not connect to host
-arto.bg: did not receive HSTS header
-artofeyes.nl: could not connect to host
-artofhomeorganizing.com: could not connect to host
-artransparency.gov: did not receive HSTS header
-artsinthevalley.net.au: did not receive HSTS header
-artstopinc.com: did not receive HSTS header
-arturkohut.com: could not connect to host
-arturrossa.de: could not connect to host
-artyland.ru: could not connect to host
-arvamus.eu: could not connect to host
-arviksa.co.uk: could not connect to host
-arw.me: did not receive HSTS header
-aryabusines.com: did not receive HSTS header
-arzaroth.com: did not receive HSTS header
-as.se: could not connect to host
-as204982.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-as9178.net: could not connect to host
-asafomba.com: could not connect to host
-asahikoji.net: could not connect to host
-asana.studio: did not receive HSTS header
-asasuou.pw: could not connect to host
-asc16.com: could not connect to host
-ascamso.com: could not connect to host
-ascendprime.com: did not receive HSTS header
-ascensori.biz: could not connect to host
-aschaefer.net: could not connect to host
-ascii.moe: could not connect to host
-ascpaphilatelie.eu: could not connect to host
-asd.gov.au: did not receive HSTS header
-asdpress.cn: could not connect to host
-asec01.net: could not connect to host
-aseith.com: could not connect to host
-aseko.gr: did not receive HSTS header
-aselectionoffice.gov: could not connect to host
-asemanhotel.com: did not receive HSTS header
-asepms.com: could not connect to host
-aserver.co: could not connect to host
-asge-handel.de: did not receive HSTS header
-ashastalent.com: could not connect to host
-ashd1.goip.de: could not connect to host
-ashd2.goip.de: could not connect to host
-ashd3.goip.de: could not connect to host
-ashkan-rechtsanwalt-arbeitsrecht-paderborn.de: did not receive HSTS header
-ashlane-cottages.com: could not connect to host
-ashleakunowski.com: did not receive HSTS header
-ashleyadum.com: could not connect to host
-ashleyashbee.com: did not receive HSTS header
-ashleyfoley.photography: could not connect to host
-ashleymedway.com: could not connect to host
-asian-archi.com.tw: did not receive HSTS header
-asianbet77.co: did not receive HSTS header
-asianbet77.net: did not receive HSTS header
-asianodor.com: could not connect to host
-asianshops.net: did not receive HSTS header
-asiasexgazette.com: could not connect to host
-asiesvenezuela.com: could not connect to host
-asirigbakaute.com: did not receive HSTS header
-asirviablog.com: could not connect to host
-asisee.co.il: could not connect to host
-asisee.photography: could not connect to host
-asitanc.com: could not connect to host
-ask.fi: could not connect to host
-ask.pe: could not connect to host
-askfit.cz: did not receive HSTS header
-askmagicconch.com: could not connect to host
-askme24.de: could not connect to host
-asksatya.com: did not receive HSTS header
-askv6.net: did not receive HSTS header
-askyourdentist.com: did not receive HSTS header
-aslinfinity.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-asm-x.com: could not connect to host
-asm.io: did not receive HSTS header
-asmarketero.com: did not receive HSTS header
-asmik-armenie.com: did not receive HSTS header
-asmm.cc: did not receive HSTS header
-asmui.ga: could not connect to host
-asmui.ml: did not receive HSTS header
-asoagroca.com: could not connect to host
-asociacionbienestarinmobiliariobogota.com: could not connect to host
-asociaciontrastea.com: did not receive HSTS header
-asoftwareco.com: did not receive HSTS header
-asoul.tw: could not connect to host
-aspatrimoine.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-aspectcontext.com: could not connect to host
-asphaltfruehling.de: could not connect to host
-asphyxia.su: did not receive HSTS header
-asral7.com: could not connect to host
-ass.org.au: could not connect to host
-assadrivesloirecher.com: could not connect to host
-assdecoeur.org: could not connect to host
-assekuranzjobs.de: could not connect to host
-asset-alive.com: could not connect to host
-asset-alive.net: could not connect to host
-assetbacked.capital: could not connect to host
-assetsec.io: could not connect to host
-assetsupervision.com: did not receive HSTS header
-assindia.nl: did not receive HSTS header
-assinecontrole4g.com.br: did not receive HSTS header
-assistance-personnes-agees.ch: could not connect to host
-assistcart.com: could not connect to host
-assistenzaferrodastiro.org: could not connect to host
-assistenzafrigorifero.org: could not connect to host
-assistenzalavatrice.org: could not connect to host
-assistenzamicroonde.org: could not connect to host
-assosfi.com: could not connect to host
-assurancesmons.be: did not receive HSTS header
-astarforu.com: could not connect to host
-astenretail.com: could not connect to host
-asthon.cn: could not connect to host
-astral-imperium.uk: did not receive HSTS header
-astral.gq: could not connect to host
-astral.org.pl: could not connect to host
-astrath.net: could not connect to host
-astrea-voetbal-groningen.nl: could not connect to host
-astrolpost.com: could not connect to host
-astromelody.com: could not connect to host
-astronomie-fulda.de: did not receive HSTS header
-astropaykasa.org: did not receive HSTS header
-astutr.co: could not connect to host
-asu.moe: could not connect to host
-asucrews.com: could not connect to host
-asuhe.cc: could not connect to host
-asuhe.win: did not receive HSTS header
-asuhe.xyz: could not connect to host
-asuka.io: did not receive HSTS header
-asurgiant.ca: could not connect to host
-async.be: did not receive HSTS header
-aszw.org: could not connect to host
-at-one.ca: did not receive HSTS header
-at1.co: did not receive HSTS header
-ataber.pw: could not connect to host
-atacadooptico.com.br: did not receive HSTS header
-atavio.at: could not connect to host
-atavio.ch: could not connect to host
-atavio.de: could not connect to host
-atbeckett.com: did not receive HSTS header
-atc.io: did not receive HSTS header
-atcreform.gov: could not connect to host
-atelier-origami.com: did not receive HSTS header
-atelier-rk.com: did not receive HSTS header
-atelier-viennois-cannes.fr: could not connect to host
-atelierhupsakee.nl: did not receive HSTS header
-ateliernihongo.ch: did not receive HSTS header
-ateliers-veronese-nantes.fr: did not receive HSTS header
-atelierssud.swiss: could not connect to host
-atendimentodelta.com.br: did not receive HSTS header
-atg.soy: could not connect to host
-atgroup.gr: did not receive HSTS header
-athaliasoft.com: could not connect to host
-athena-bartholdi.com: could not connect to host
-athena-garage.co.uk: did not receive HSTS header
-athenacle.xyz: did not receive HSTS header
-athenelive.com: could not connect to host
-athens-limousines.com: did not receive HSTS header
-athensbusinessresources.us: could not connect to host
-athenstn.gov: could not connect to host
-atherosense.ga: could not connect to host
-athi.pl: did not receive HSTS header
-athul.xyz: could not connect to host
-atinylittle.space: could not connect to host
-atisystem.com: did not receive HSTS header
-atk.me: could not connect to host
-atkdesign.pt: did not receive HSTS header
-atkstore.com: could not connect to host
-atlantahairsurgeon.com: did not receive HSTS header
-atlantishq.de: did not receive HSTS header
-atlas-5.site: could not connect to host
-atlas-staging.ml: could not connect to host
-atlas.co: did not receive HSTS header
-atlassian.io: could not connect to host
-atlassian.net: did not receive HSTS header
-atlayo.com: did not receive HSTS header
-atlex.nl: did not receive HSTS header
-atmocdn.com: could not connect to host
-atmschambly.com: did not receive HSTS header
-atombase.org: could not connect to host
-atomic-bounce.com: could not connect to host
-atomic.menu: could not connect to host
-atomic.red: could not connect to host
-atomicbounce.co.uk: could not connect to host
-atomick.nl: did not receive HSTS header
-atomik.pro: did not receive HSTS header
-atomnetworks.ca: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-atop.io: could not connect to host
-atracaosexshop.com.br: could not connect to host
-atspeeds.com: could not connect to host
-attelage.net: could not connect to host
-attentigroup.com: did not receive HSTS header
-attic118.com: did not receive HSTS header
-attilagyorffy.com: could not connect to host
-attimec.com: could not connect to host
-attimidesigns.com: did not receive HSTS header
-attiremr.tk: could not connect to host
-attogproductions.com: could not connect to host
-attractieparken.tk: could not connect to host
-attunedstore.com: could not connect to host
-atuendomr.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-atwar-mod.com: could not connect to host
-au-be.net: could not connect to host
-au-pair24.de: did not receive HSTS header
-au.ci: could not connect to host
-au.search.yahoo.com: max-age too low: 172800
-au2pb.net: could not connect to host
-aubiosales.com: could not connect to host
-auburn-housekeeper.com: could not connect to host
-aucubin.moe: could not connect to host
-audialbuquerqueparts.com: did not receive HSTS header
-audiblox.co.za: could not connect to host
-audioblackmagic.com: could not connect to host
-audion.cc: could not connect to host
-audion.hr: did not receive HSTS header
-audioonly.stream: could not connect to host
-audiovisualdevices.com.au: did not receive HSTS header
-auditready.nl: did not receive HSTS header
-audividi.shop: could not connect to host
-aufmerksamkeitsstudie.com: could not connect to host
-aufprise.de: did not receive HSTS header
-aufro.com: did not receive HSTS header
-augaware.org: did not receive HSTS header
-augias.org: could not connect to host
-augix.net: could not connect to host
-augmented-portal.com: did not receive HSTS header
-augrandinquisiteur.com: did not receive HSTS header
-august.black: did not receive HSTS header
-augustoshoppingnet.com.br: could not connect to host
-aujapan.ru: could not connect to host
-aulaschrank.gq: could not connect to host
-auntieme.com: did not receive HSTS header
-aupasdecourses.com: did not receive HSTS header
-aur.rocks: could not connect to host
-aurainfosec.com: did not receive HSTS header
-aurainfosec.com.au: could not connect to host
-auraredeye.com: could not connect to host
-auraredshield.com: could not connect to host
-aurbrowser.tk: could not connect to host
-aureus.pw: could not connect to host
-auri.ga: did not receive HSTS header
-aurora-multimedia.co.uk: did not receive HSTS header
-aurora-terraria.org: could not connect to host
-aurorarecordings.com: could not connect to host
-auroratownshipfd.org: did not receive HSTS header
-aurosa.cz: max-age too low: 7889238
-auroz.tech: did not receive HSTS header
-auroz.video: did not receive HSTS header
-aurugs.com: did not receive HSTS header
-ausmwoid.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-ausnah.me: could not connect to host
-aussiecable.org: could not connect to host
-aussiegreenmarks.com.au: did not receive HSTS header
-aussiehq.com.au: could not connect to host
-aussiewebmarketing.com.au: did not receive HSTS header
-austerevisuals.com: did not receive HSTS header
-austinmobilemechanics.net: did not receive HSTS header
-austinstore.com.br: could not connect to host
-austinsutphin.com: could not connect to host
-austintxlocksmiths.com: did not receive HSTS header
-australianarmedforces.org: did not receive HSTS header
-australiancattle.dog: could not connect to host
-australianfreebets.com.au: did not receive HSTS header
-australianonlineappliances.ga: could not connect to host
-australianstrongmanalliance.com.au: did not receive HSTS header
-authanet.ga: could not connect to host
-authenitech.com: could not connect to host
-authentication.io: could not connect to host
-authint.com: could not connect to host
-author24.ru: did not receive HSTS header
-authoritynutrition.com: did not receive HSTS header
-authorsguild.in: could not connect to host
-authsrv.nl.eu.org: could not connect to host
-autimatisering.nl: did not receive HSTS header
-auto-serwis.zgorzelec.pl: could not connect to host
-auto-spurgo.com: could not connect to host
-auto3d.cn: could not connect to host
-auto4trade.nl: did not receive HSTS header
-autoankauf.berlin: did not receive HSTS header
-autobahnco.com: did not receive HSTS header
-autobedarf.net: did not receive HSTS header
-autobedrijfschalkoort.nl: did not receive HSTS header
-autocarparts.ro: could not connect to host
-autocmall.com: did not receive HSTS header
-autocobot.com: did not receive HSTS header
-autod.hu: did not receive HSTS header
-autodemolizioni.roma.it: could not connect to host
-autodeploy.it: could not connect to host
-autodidacticstudios.org: could not connect to host
-autodilyhulin.cz: did not receive HSTS header
-autoecolebudget.ch: did not receive HSTS header
-autoecoledumontblanc.com: could not connect to host
-autoeet.cz: did not receive HSTS header
-autoepc.ro: could not connect to host
-autogestioninmobiliaria.com: did not receive HSTS header
-autohaus-snater.de: did not receive HSTS header
-autoinsurancehavasu.com: could not connect to host
-autojuhos.sk: could not connect to host
-automaan.nl: did not receive HSTS header
-automacity.com: could not connect to host
-automationsmarthome.com: could not connect to host
-automobiles5.com: could not connect to host
-automoto-tom.net: could not connect to host
-automuovifix.fi: could not connect to host
-autoprogconsortium.ga: could not connect to host
-autoresponder.marketing: did not receive HSTS header
-autos-mertens.com: max-age too low: 600000
-autos-retro-plaisir.com: did not receive HSTS header
-autosearch.me: could not connect to host
-autosecurityfinance.com: could not connect to host
-autosiero.nl: did not receive HSTS header
-autostock.me: could not connect to host
-autostop-occasions.be: could not connect to host
-autostramites.com: did not receive HSTS header
-autotrac.com.br: did not receive HSTS header
-autotsum.com: could not connect to host
-autoxy.it: did not receive HSTS header
-autozane.com: could not connect to host
-autozet.cz: did not receive HSTS header
-autumnwindsagility.com: could not connect to host
-auux.com: max-age too low: 2592000
-auverbox.ovh: could not connect to host
-auvious.com: did not receive HSTS header
-auxetek.se: could not connect to host
-auxiliumincrementum.co.uk: could not connect to host
-av-systems.net: did not receive HSTS header
-av.de: did not receive HSTS header
-av0ndale.de: could not connect to host
-av163.cc: could not connect to host
-avadatravel.com: did not receive HSTS header
-avaemr-development-environment.ca: could not connect to host
-avalon-studios.de: could not connect to host
-avalyuan.me: did not receive HSTS header
-avanet.ch: did not receive HSTS header
-avanpost.co: did not receive HSTS header
-avantmfg.com: did not receive HSTS header
-avaq.fr: did not receive HSTS header
-avarty.net: did not receive HSTS header
-avastantivirus.ro: did not receive HSTS header
-avatarrecruit.co.uk: did not receive HSTS header
-avdagic.net: did not receive HSTS header
-avdelivers.com: could not connect to host
-avdh.top: could not connect to host
-avec-ou-sans-ordonnance.fr: could not connect to host
-aveling-adventure.co.uk: could not connect to host
-avenueeyecare.com: did not receive HSTS header
-avi9526.pp.ua: could not connect to host
-aviacao.pt: did not receive HSTS header
-aviapoisk.kz: did not receive HSTS header
-avid.blue: did not receive HSTS header
-avidthink.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-avietech.com: did not receive HSTS header
-aviodeals.com: did not receive HSTS header
-avitres.com: did not receive HSTS header
-aviv.nyc: could not connect to host
-avmemo.com: could not connect to host
-avmo.pw: could not connect to host
-avnavi.jp: could not connect to host
-avocadooo.stream: could not connect to host
-avocatbeziau.com: could not connect to host
-avocats-fiscal.fr: did not receive HSTS header
-avonlearningcampus.com: could not connect to host
-avotoma.com: could not connect to host
-avs-building-services.co.uk: did not receive HSTS header
-avselectrical.co.uk: did not receive HSTS header
-avso.pw: could not connect to host
-avspot.net: could not connect to host
-avtek.pl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-avto-signal.gq: did not receive HSTS header
-avtoucheba.tk: could not connect to host
-avtoveles.by: could not connect to host
-avtoyurist.tk: could not connect to host
-avus-automobile.com: did not receive HSTS header
-avxo.pw: could not connect to host
-awan.tech: could not connect to host
-awanderlustadventure.com: did not receive HSTS header
-awccanadianpharmacy.com: did not receive HSTS header
-awecademy.org: did not receive HSTS header
-awei.pub: could not connect to host
-awen.me: could not connect to host
-awesome-coconut-software.fr: could not connect to host
-awesomesit.es: could not connect to host
-awf0.xyz: could not connect to host
-awg-mode.de: did not receive HSTS header
-awin.la: could not connect to host
-awomaninherprime.com: could not connect to host
-awscloudrecipes.com: could not connect to host
-aww.moe: did not receive HSTS header
-awxg.eu.org: could not connect to host
-awxg.org: could not connect to host
-axa-middleeast.com: did not receive HSTS header
-axado.com.br: could not connect to host
-axault.com: did not receive HSTS header
-axchap.ir: could not connect to host
-axel-fischer.science: could not connect to host
-axelchv.fr: could not connect to host
-axem.co.jp: did not receive HSTS header
-axeny.com: did not receive HSTS header
-axg.io: did not receive HSTS header
-axialsports.com: did not receive HSTS header
-axiatancell.com: could not connect to host
-axin888.vip: did not receive HSTS header
-axiodl.com: did not receive HSTS header
-axiomer.es: did not receive HSTS header
-axiomer.eu: did not receive HSTS header
-axiomer.me: did not receive HSTS header
-axiomer.net: did not receive HSTS header
-axiomer.org: did not receive HSTS header
-axis-stralis.co.uk: could not connect to host
-axisfleetmanagement.co.uk: could not connect to host
-axiumacademy.com: did not receive HSTS header
-axka.com: could not connect to host
-axolsoft.com: max-age too low: 10540800
-axom.online: could not connect to host
-axtudo.com: did not receive HSTS header
-axtux.tk: could not connect to host
-axxial.tk: could not connect to host
-ayahuascaadvisor.com: could not connect to host
-ayamchikchik.com: could not connect to host
-ayatk.com: did not receive HSTS header
-ayesh.win: could not connect to host
-aying.love: did not receive HSTS header
-ayj.solutions: could not connect to host
-aylavblog.com: did not receive HSTS header
-ayon.group: could not connect to host
-ayor.jp: could not connect to host
-ayor.tech: could not connect to host
-ayrohq.com: could not connect to host
-ayuru.info: could not connect to host
-az-vinyl-boden.de: could not connect to host
-az11018.com: could not connect to host
-azamra.com: did not receive HSTS header
-azane.ga: could not connect to host
-azcensus2020.gov: did not receive HSTS header
-azenot.com: could not connect to host
-azia.info: could not connect to host
-azino777.ru: could not connect to host
-azirevpn.com: did not receive HSTS header
-azizfirat.com: did not receive HSTS header
-azizvicdan.com: did not receive HSTS header
-azlocalbusiness.com: did not receive HSTS header
-azmusica.biz: could not connect to host
-azmusica.com: could not connect to host
-aznaetelivy.ru: did not receive HSTS header
-azprep.us: could not connect to host
-azrangers.gov: did not receive HSTS header
-azu-l.com: could not connect to host
-azu-l.jp: could not connect to host
-azun.pl: did not receive HSTS header
-azurlane.cool: could not connect to host
-azuxul.fr: could not connect to host
-azzag.co.uk: could not connect to host
-b-boom.nl: could not connect to host
-b-dd.com: could not connect to host
-b-entropy.com: could not connect to host
-b-f-s.pl: did not receive HSTS header
-b-freerobux.ga: could not connect to host
-b-rickroll-e.pw: could not connect to host
-b-space.de: did not receive HSTS header
-b-ticket.ch: could not connect to host
-b0308.com: could not connect to host
-b1.work: did not receive HSTS header
-b1236.com: could not connect to host
-b1758.com: did not receive HSTS header
-b1nzy-pinged.me: could not connect to host
-b1rd.tk: could not connect to host
-b2and.com: did not receive HSTS header
-b2b-nestle.com.br: could not connect to host
-b2bpromoteit.com: did not receive HSTS header
-b2families.com.au: did not receive HSTS header
-b3333.co: could not connect to host
-b36512.com: could not connect to host
-b3orion.com: could not connect to host
-b422edu.com: could not connect to host
-b4r7.de: could not connect to host
-b5197.co: could not connect to host
-b5289.net: did not receive HSTS header
-b58365.com: did not receive HSTS header
-b58app.com: did not receive HSTS header
-b58appb58app.com: did not receive HSTS header
-b58appb58appb58app.com: could not connect to host
-b5901.com: could not connect to host
-b5909.com: could not connect to host
-b5989.com: did not receive HSTS header
-b61688.com: could not connect to host
-b62101.com: could not connect to host
-b62102.com: could not connect to host
-b62103.com: could not connect to host
-b62104.com: could not connect to host
-b62105.com: could not connect to host
-b62a.com: could not connect to host
-b62aa.com: could not connect to host
-b62b.com: could not connect to host
-b62bb.com: could not connect to host
-b62c.com: could not connect to host
-b62cc.com: could not connect to host
-b62d.com: could not connect to host
-b62dd.com: could not connect to host
-b62e.com: could not connect to host
-b62ee.com: could not connect to host
-b62f.com: could not connect to host
-b62g.com: could not connect to host
-b6710.com: could not connect to host
-b6720.com: could not connect to host
-b6729.co: could not connect to host
-b6730.com: could not connect to host
-b6740.com: could not connect to host
-b67801.com: could not connect to host
-b67802.com: could not connect to host
-b67803.com: could not connect to host
-b67804.com: could not connect to host
-b67805.com: could not connect to host
-b67901.com: could not connect to host
-b67902.com: could not connect to host
-b67903.com: could not connect to host
-b67904.com: could not connect to host
-b67905.com: could not connect to host
-b6957.co: could not connect to host
-b70661.com: could not connect to host
-b70663.com: could not connect to host
-b70664.com: could not connect to host
-b70771.com: could not connect to host
-b70772.com: could not connect to host
-b70773.com: could not connect to host
-b70774.com: could not connect to host
-b70775.com: could not connect to host
-b81365.com: did not receive HSTS header
-b81818.com: did not receive HSTS header
-b82365.com: did not receive HSTS header
-b830.com: did not receive HSTS header
-b9168.com: could not connect to host
-b91688.com: could not connect to host
-b9297.co: could not connect to host
-b9453.com: did not receive HSTS header
-b9498.com: did not receive HSTS header
-b9528.net: did not receive HSTS header
-b9568.com: could not connect to host
-b9586.net: could not connect to host
-b9588.net: could not connect to host
-b95888.net: could not connect to host
-b9589.net: could not connect to host
-b9598.com: could not connect to host
-b9658.com: did not receive HSTS header
-b96899.com: could not connect to host
-b9728.co: could not connect to host
-b9883.net: could not connect to host
-b9884.net: could not connect to host
-b9885.net: could not connect to host
-b9886.com: could not connect to host
-b9886.net: could not connect to host
-b9887.net: could not connect to host
-b9888.net: could not connect to host
-b98886.com: could not connect to host
-b9889.net: could not connect to host
-b9902.com: could not connect to host
-b99033.com: could not connect to host
-b9904.com: did not receive HSTS header
-b99044.com: did not receive HSTS header
-b9905.com: did not receive HSTS header
-b99055.com: did not receive HSTS header
-b99066.com: did not receive HSTS header
-b99077.com: did not receive HSTS header
-b99088.com: did not receive HSTS header
-b99099.com: did not receive HSTS header
-b9912.com: did not receive HSTS header
-b9930.com: could not connect to host
-b9951.com: did not receive HSTS header
-b99520.com: could not connect to host
-b9954.com: did not receive HSTS header
-b9957.com: did not receive HSTS header
-b9961.com: did not receive HSTS header
-b9962.com: did not receive HSTS header
-b9967.com: could not connect to host
-b9970.com: did not receive HSTS header
-b9973.com: did not receive HSTS header
-b9976.com: did not receive HSTS header
-b9980.com: could not connect to host
-b99881.com: could not connect to host
-b99882.com: could not connect to host
-b99883.com: could not connect to host
-b99885.com: could not connect to host
-b99886.com: could not connect to host
-b9999oo.com: could not connect to host
-b9999tt.com: could not connect to host
-b9999uu.com: could not connect to host
-b9999vv.com: could not connect to host
-b9999yy.com: could not connect to host
-b9winner.com: could not connect to host
-b9winner.net: did not receive HSTS header
-babarkata.com: could not connect to host
-babelfisch.eu: could not connect to host
-babeprint.com: did not receive HSTS header
-babineaux.zone: could not connect to host
-babursahvizeofisi.com: could not connect to host
-baby-click.de: could not connect to host
-baby-fotografie-muenchen.de: did not receive HSTS header
-baby-massage.tk: could not connect to host
-babybauch-shooting-muenchen.de: did not receive HSTS header
-babybee.ie: could not connect to host
-babybic.hu: could not connect to host
-babyboutique.online: did not receive HSTS header
-babycs.house: could not connect to host
-babyhouse.xyz: could not connect to host
-babyliss-pro.com: could not connect to host
-babyliss-pro.net: did not receive HSTS header
-babysaying.me: could not connect to host
-babyshoprimini.com: could not connect to host
-babystep.tv: could not connect to host
-bacchanallia.com: could not connect to host
-bacgrouppublishing.com: could not connect to host
-bachkhoa.net.vn: did not receive HSTS header
-bacimg.com: could not connect to host
-back-bone.nl: did not receive HSTS header
-backenmachtgluecklich.de: max-age too low: 0
-backgroundz.net: could not connect to host
-backintomotionphysiotherapy.com: did not receive HSTS header
-backlogapp.io: could not connect to host
-backpacken.org: could not connect to host
-backterris.com: could not connect to host
-backupsinop.com.br: did not receive HSTS header
-backyardbbqbash.com: could not connect to host
-bacon-monitoring.org: could not connect to host
-baconate.com: could not connect to host
-bacoux.com: could not connect to host
-bacsituvansuckhoe.com: could not connect to host
-bactrim.gq: could not connect to host
-bad.horse: could not connect to host
-bad.show: could not connect to host
-badai.at: could not connect to host
-badbee.cc: could not connect to host
-badboyzclub.de: could not connect to host
-badcronjob.com: could not connect to host
-badenhard.eu: could not connect to host
-badgesenpatches.nl: did not receive HSTS header
-badkamergigant.com: could not connect to host
-badlink.org: could not connect to host
-badseacoffee.com: could not connect to host
-baese.it: did not receive HSTS header
-baff.lu: could not connect to host
-baffinlee.com: did not receive HSTS header
-bagasian.com: did not receive HSTS header
-bagelsbakery.com: could not connect to host
-bagiobella.com: max-age too low: 0
-bagira.guru: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-bagni-chimici.roma.it: could not connect to host
-bagnichimici.milano.it: could not connect to host
-bagstage.de: did not receive HSTS header
-bahadirh.ml: could not connect to host
-baidu389.com: max-age too low: 0
-baiduaccount.com: could not connect to host
-bailakomigo.com.br: did not receive HSTS header
-baildonhottubs.co.uk: could not connect to host
-bair.io: could not connect to host
-bairdzhang.com: could not connect to host
-bairrosonline.com: did not receive HSTS header
-bairuo.tk: could not connect to host
-bairuo.top: could not connect to host
-baito-j.jp: did not receive HSTS header
-baitulongbaycruises.com: could not connect to host
-baiurl.tk: could not connect to host
-baixoutudo.com: did not receive HSTS header
-baiyangliu.com: could not connect to host
-baiyu.me: did not receive HSTS header
-bajajfinserv.in: did not receive HSTS header
-baka.net: did not receive HSTS header
-baka.network: could not connect to host
-baka.red: could not connect to host
-bakabt.info: could not connect to host
-bakanin.ru: could not connect to host
-bakaproxy.moe: could not connect to host
-bakaweb.fr: could not connect to host
-bakim.li: could not connect to host
-bakkerdesignandbuild.com: did not receive HSTS header
-balakovo-news.tk: did not receive HSTS header
-balcan-underground.net: could not connect to host
-baldur.cc: did not receive HSTS header
-baldwin.com.au: did not receive HSTS header
-baldwinkoo.com: could not connect to host
-baleares.party: could not connect to host
-balenciaspa.com: did not receive HSTS header
-balidesignshop.com.br: could not connect to host
-balihai.com: did not receive HSTS header
-balkanclan.com: did not receive HSTS header
-balkenbushmechanical.com: could not connect to host
-ball.holdings: did not receive HSTS header
-ball3d.es: did not receive HSTS header
-ballbusting-cbt.com: could not connect to host
-ballinarsl.com.au: did not receive HSTS header
-ballitolocksmith.com: could not connect to host
-balloonphp.com: could not connect to host
-balnearionaturaspa.com: did not receive HSTS header
-baloncestolliria.tk: could not connect to host
-balonmano.co: could not connect to host
-bals.org: did not receive HSTS header
-baltimorecashflow.com: could not connect to host
-bamahammer.com: did not receive HSTS header
-bamtoki.com: could not connect to host
-bamtoki.se: could not connect to host
-ban.moe: could not connect to host
-bananavapes.com: could not connect to host
-bananensap.nl: did not receive HSTS header
-bananium.fr: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-banbanchs.com: could not connect to host
-banburybid.com: did not receive HSTS header
-bancaolhares.com.br: could not connect to host
-banchethai.com: could not connect to host
-bandally.net: could not connect to host
-bandar303.cc: did not receive HSTS header
-bandar303.id: did not receive HSTS header
-bandar303.win: did not receive HSTS header
-bandarifamily.com: could not connect to host
-bandb.xyz: could not connect to host
-banderasdelmundo.xyz: could not connect to host
-bandgap.io: did not receive HSTS header
-bandrcrafts.com: could not connect to host
-banduhn.com: did not receive HSTS header
-baneh-academic.com: could not connect to host
-banfor.fun: could not connect to host
-bangkrak.com: could not connect to host
-bangridho.com: did not receive HSTS header
-bangyu.wang: could not connect to host
-bangzafran.com: could not connect to host
-bani99.com: could not connect to host
-bank: could not connect to host
-bank-tour.ru: did not receive HSTS header
-bankcardoffer.com: could not connect to host
-bankcircle.co.in: could not connect to host
-bankerbuch.de: did not receive HSTS header
-bankerscaddy.com: did not receive HSTS header
-bankersonline.com: did not receive HSTS header
-bankfreeoffers.com: could not connect to host
-bankgradesecurity.com: could not connect to host
-bankitt.network: could not connect to host
-bankmilhas.com.br: did not receive HSTS header
-bankofrealty.review: could not connect to host
-banland.net: did not receive HSTS header
-banned-bitches.tk: could not connect to host
-banningca.gov: did not receive HSTS header
-bannisbierblog.de: could not connect to host
-banoviny.sk: did not receive HSTS header
-banqingdiao.com: could not connect to host
-banri.me: could not connect to host
-banter.city: could not connect to host
-banxehoi.com: did not receive HSTS header
-baobeiglass.com: did not receive HSTS header
-baodan666.com: could not connect to host
-baosuckhoedoisong.net: could not connect to host
-baptistboard.com: did not receive HSTS header
-baptiste-destombes.fr: did not receive HSTS header
-baptistedeleris.fr: could not connect to host
-bara1.se: did not receive HSTS header
-baranhotel.ir: did not receive HSTS header
-baranmovie.tk: could not connect to host
-barashek.ru: did not receive HSTS header
-barberlegalcounsel.com: did not receive HSTS header
-barbershop-harmony.org: did not receive HSTS header
-barbershop-lasvillas.com: did not receive HSTS header
-barcamp.koeln: could not connect to host
-barcodeberlin.com: did not receive HSTS header
-barcoderealty.com: could not connect to host
-barcouniforms.com: did not receive HSTS header
-barely.sexy: could not connect to host
-barf-alarm.de: did not receive HSTS header
-bargainmovingcompany.com: did not receive HSTS header
-bargainsettelement.com: could not connect to host
-bariller.fr: did not receive HSTS header
-baris-sagdic.com: could not connect to host
-bariskaragoz.nl: could not connect to host
-bariumoxide.com: could not connect to host
-barnabycolby.io: could not connect to host
-barnel.com: max-age too low: 0
-barnflix.net: did not receive HSTS header
-barnrats.com: could not connect to host
-baropkamp.be: did not receive HSTS header
-barprive.com: could not connect to host
-barracuda.blog: could not connect to host
-barrelhead.org: could not connect to host
-barrett.ag: did not receive HSTS header
-barrut.me: did not receive HSTS header
-barryswebdesign.co.uk: did not receive HSTS header
-barshout.co.uk: could not connect to host
-barsil.de: did not receive HSTS header
-barslecht.com: could not connect to host
-barslecht.nl: did not receive HSTS header
-barss.io: could not connect to host
-barsukas.net: could not connect to host
-bartelldrugs.com: did not receive HSTS header
-barthonia-showroom.de: did not receive HSTS header
-barunisystems.com: could not connect to host
-barwave.com: could not connect to host
-basculasconfiables.com: could not connect to host
-baseballrampage.com: could not connect to host
-baseballwarehouse.com: could not connect to host
-basebyte.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-basechat.com: did not receive HSTS header
-basedonline.nl: did not receive HSTS header
-baseline.ba: did not receive HSTS header
-basement961.co.nz: could not connect to host
-basercap.co.ke: did not receive HSTS header
-baserverz.ga: could not connect to host
-bashc.at: could not connect to host
-bashcode.ninja: could not connect to host
-basicamente.digital: did not receive HSTS header
-basicsolutionsus.com: could not connect to host
-basilicaknights.org: could not connect to host
-basilisk.io: could not connect to host
-basilm.co: could not connect to host
-basketball-malavan.tk: could not connect to host
-basketsbymaurice.com: did not receive HSTS header
-baskettemple.com: did not receive HSTS header
-basnieuwenhuizen.nl: did not receive HSTS header
-bassh.net: could not connect to host
-bastadigital.com: did not receive HSTS header
-bastianstalder.ch: did not receive HSTS header
-bastiv.com: could not connect to host
-bastivmobile.com: could not connect to host
-batfoundry.com: did not receive HSTS header
-batlab.ch: did not receive HSTS header
-batonger.com: could not connect to host
-batschu.de: could not connect to host
-batten.eu.org: could not connect to host
-batteryservice.ru: did not receive HSTS header
-battleground.com.au: did not receive HSTS header
-baud.ninja: could not connect to host
-baudairenergyservices.com: did not receive HSTS header
-baudlink.com: could not connect to host
-bauen-mit-ziegel.de: max-age too low: 604800
-baum.ga: could not connect to host
-baumstark.ca: could not connect to host
-baustils.com: did not receive HSTS header
-bauwens.cloud: did not receive HSTS header
-bavomaes.be: could not connect to host
-bayer-stefan.eu: did not receive HSTS header
-baykatre.com: did not receive HSTS header
-bayoleth.com: could not connect to host
-bayportzambia.com: did not receive HSTS header
-bayrisch-fuer-anfaenger.de: could not connect to host
-baysse.eu: did not receive HSTS header
-bazar-24.ru: did not receive HSTS header
-bazar.ga: could not connect to host
-bazarstupava.sk: could not connect to host
-bazdell.com: did not receive HSTS header
-bazinga-events.nl: did not receive HSTS header
-bazisszoftver.hu: could not connect to host
-bazqux.com: did not receive HSTS header
-bb-shiokaze.jp: did not receive HSTS header
-bb168.cc: could not connect to host
-bb1718.net: could not connect to host
-bb37roma.it: could not connect to host
-bb5197.co: could not connect to host
-bb6729.co: could not connect to host
-bb6729.com: did not receive HSTS header
-bb6957.co: could not connect to host
-bb9297.co: could not connect to host
-bb9721.com: did not receive HSTS header
-bb9728.co: could not connect to host
-bbb1991.me: could not connect to host
-bbdos.ru: could not connect to host
-bbj.io: did not receive HSTS header
-bbkaforum.co.uk: did not receive HSTS header
-bbkanews.com: did not receive HSTS header
-bblovess.cn: could not connect to host
-bbnbb.de: could not connect to host
-bbrinck.eu: could not connect to host
-bbswin9.com: could not connect to host
-bbw-wrestling.com: could not connect to host
-bbwdom.xyz: could not connect to host
-bbwf.de: did not receive HSTS header
-bbwfacesitting.us: could not connect to host
-bbwfacesitting.xyz: could not connect to host
-bbwfight.xyz: could not connect to host
-bbwteens.org: could not connect to host
-bc-personal.ch: could not connect to host
-bc-reloaded.net: did not receive HSTS header
-bcbsmagentprofile.com: could not connect to host
-bcchack.com: could not connect to host
-bccx.com: could not connect to host
-bcheng.cf: could not connect to host
-bck.me: did not receive HSTS header
-bckp.de: could not connect to host
-bcm.com.au: did not receive HSTS header
-bcmguide.com: could not connect to host
-bcmlu.org: could not connect to host
-bcnet.com.hk: could not connect to host
-bcnet.hk: could not connect to host
-bcodeur.com: could not connect to host
-bcpc-ccgpfcheminots.com: could not connect to host
-bcradio.org: could not connect to host
-bcs.adv.br: did not receive HSTS header
-bcsytv.com: could not connect to host
-bcubic.net: could not connect to host
-bcvps.com: could not connect to host
-bcweightlifting.ca: did not receive HSTS header
-bdata.cl: could not connect to host
-bddemir.com: could not connect to host
-bde-epitech.fr: could not connect to host
-bdenzer.com: did not receive HSTS header
-bdenzer.xyz: could not connect to host
-bdpachicago.tech: could not connect to host
-bdsmxxxpics.com: could not connect to host
-bdupnews.com: could not connect to host
-be9418.com: could not connect to host
-be9418.info: could not connect to host
-be9418.net: could not connect to host
-be9418.org: could not connect to host
-be9458.info: did not receive HSTS header
-be9458.net: did not receive HSTS header
-be9458.org: did not receive HSTS header
-be958.info: could not connect to host
-be958.org: could not connect to host
-be9966.com: could not connect to host
-bea.expert: could not connect to host
-beach-inspector.com: did not receive HSTS header
-beachfutbolclub.com: did not receive HSTS header
-beachi.es: could not connect to host
-beacinsight.com: could not connect to host
-beaglewatch.com: did not receive HSTS header
-beagreenbean.co.uk: could not connect to host
-beaker.coffee: could not connect to host
-beamer-discount.de: did not receive HSTS header
-beamitapp.com: could not connect to host
-beamstat.com: could not connect to host
-beanbot.party: could not connect to host
-beanbox.com: did not receive HSTS header
-beanjuice.me: could not connect to host
-beanworks.ca: did not receive HSTS header
-bearcosports.com.br: did not receive HSTS header
-beardboys.co.za: did not receive HSTS header
-beardedbearthegame.com: could not connect to host
-beardydave.com: did not receive HSTS header
-beasel.biz: could not connect to host
-beastlog.tk: could not connect to host
-beastowner.com: did not receive HSTS header
-beatz-anime.tk: did not receive HSTS header
-beau.pw: could not connect to host
-beauty-hippie-schmuck.de: could not connect to host
-beauty-yan-enterprise.com: could not connect to host
-beauty.moe: could not connect to host
-beautybear.dk: max-age too low: 7889238
-beautyby.tv: could not connect to host
-beautyconcept.co: did not receive HSTS header
-beautycreamultimate.com: did not receive HSTS header
-beautyspot.tk: could not connect to host
-beavers.io: did not receive HSTS header
-bebeautiful.business: could not connect to host
-bebeefy.uk: could not connect to host
-bebesurdoue.com: could not connect to host
-bebetrotteur.com: could not connect to host
-bebout.domains: could not connect to host
-bebout.pw: could not connect to host
-beccajoshwedding.com: could not connect to host
-beckenhamcastles.co.uk: did not receive HSTS header
-becklove.cn: could not connect to host
-beckon.com: did not receive HSTS header
-beckyhirstconsulting.com.au: did not receive HSTS header
-becoast.fr: did not receive HSTS header
-becubed.co: could not connect to host
-bedabox.com: did not receive HSTS header
-bedeta.de: could not connect to host
-bedfordnissanparts.com: could not connect to host
-bedlingtonterrier.com.br: could not connect to host
-bedouille.com: could not connect to host
-bedreid.dk: did not receive HSTS header
-bedrijfsfotoreportages.nl: could not connect to host
-bedrijfshulpverleningfriesland.nl: did not receive HSTS header
-bedrijvenadministratie.nl: could not connect to host
-bee-social.it: did not receive HSTS header
-bee.clothing: could not connect to host
-bee.supply: could not connect to host
-bee.tools: could not connect to host
-beebeads.ga: could not connect to host
-beechwoodmetalworks.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-beekbier.nl: could not connect to host
-beekeeper.blog: could not connect to host
-beekeeper.clothing: could not connect to host
-beekeeper.supplies: could not connect to host
-beekeeper.supply: could not connect to host
-beekeeper.tools: could not connect to host
-beekeeping.clothing: could not connect to host
-beekeeping.tools: could not connect to host
-beeksnetwork.nl: could not connect to host
-beerboutique.com.br: could not connect to host
-beercandle.com: could not connect to host
-beerly.eu: could not connect to host
-beerradar.no: could not connect to host
-beerradar.party: could not connect to host
-beersandco.ch: could not connect to host
-beerview.ga: could not connect to host
-beetgroup.id: could not connect to host
-beetleroadstories.com: could not connect to host
-befundup.com: could not connect to host
-bega-dc.gov: could not connect to host
-begcykel.com: did not receive HSTS header
-beginatzero.com: did not receive HSTS header
-begintravel.co.th: did not receive HSTS header
-begravningsbyranhumana.se: did not receive HSTS header
-behemot.cz: did not receive HSTS header
-behere.be: could not connect to host
-behindthethrills.com: did not receive HSTS header
-beholdthehurricane.com: could not connect to host
-beier.io: could not connect to host
-beikeil.de: did not receive HSTS header
-beizsley.com: did not receive HSTS header
-beizsoft.co.uk: did not receive HSTS header
-beizsoft.com: did not receive HSTS header
-bekchy.com: did not receive HSTS header
-belairsewvac.com: could not connect to host
-belarto.es: could not connect to host
-belastingdienst-in-beeld.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-belcompany.nl: could not connect to host
-belewpictures.com: could not connect to host
-belgien.guide: could not connect to host
-belize-firmengruendung.com: could not connect to host
-bellamy.cloud: could not connect to host
-bellavistaoutdoor.com: could not connect to host
-belle-lingerie.co.uk: did not receive HSTS header
-bellecarmen.tk: could not connect to host
-belliash.eu.org: did not receive HSTS header
-bellmangesellschaft.de: did not receive HSTS header
-bellthrogh.com: could not connect to host
-bellthrough.com: did not receive HSTS header
-belltower.io: could not connect to host
-belmarresort.com: did not receive HSTS header
-belmontprom.com: could not connect to host
-belos.at: could not connect to host
-belpbleibtbelp.ch: could not connect to host
-belplombier.com: did not receive HSTS header
-belroyale.com: did not receive HSTS header
-belt.black: could not connect to host
-belua.com: did not receive HSTS header
-belwederczykow.eu: could not connect to host
-bely-mishka.by: max-age too low: 0
-belyoung.com.br: did not receive HSTS header
-belyvly.com: did not receive HSTS header
-bemvindoaolar.com.br: could not connect to host
-bemyvictim.com: max-age too low: 2678400
-ben-jarvis.co.uk: did not receive HSTS header
-ben-stock.de: did not receive HSTS header
-benandsarah.life: did not receive HSTS header
-benburwell.com: did not receive HSTS header
-benchcast.com: could not connect to host
-bendechrai.com: did not receive HSTS header
-bendigoland.com.au: could not connect to host
-benedikt-tuchen.de: could not connect to host
-benediktdichgans.de: did not receive HSTS header
-beneffy.com: did not receive HSTS header
-benefitsbookcase.com: could not connect to host
-beneri.se: did not receive HSTS header
-benevisim.com: could not connect to host
-benevita.bio: could not connect to host
-benevita.life: could not connect to host
-benevita.live: could not connect to host
-benevita.organic: could not connect to host
-benfairclough.com: could not connect to host
-bengaldarpan.com: could not connect to host
-benhchuyenkhoa.net: could not connect to host
-benjakesjohnson.com: could not connect to host
-benjamin-horvath.com: could not connect to host
-benjamin-suess.de: could not connect to host
-benjaminbedard.com: could not connect to host
-benjaminesims.com: could not connect to host
-benjaminmarket.com.ar: did not receive HSTS header
-benk.press: could not connect to host
-benmorecentre.co.uk: did not receive HSTS header
-bennink.me: could not connect to host
-benny003.de: could not connect to host
-bennythink.com: could not connect to host
-benohead.com: did not receive HSTS header
-benpfitzner.com: max-age too low: 0
-bentphotos.se: could not connect to host
-benwattie.com: could not connect to host
-benz-hikaku.com: could not connect to host
-benzkosmetik.de: did not receive HSTS header
-benzou-space.com: could not connect to host
-beourvictim.com: max-age too low: 2678400
-bep.gov: did not receive HSTS header
-bep362.vn: could not connect to host
-bepenak.com: did not receive HSTS header
-bephoenix.org.uk: could not connect to host
-beproduct.ru: did not receive HSTS header
-beraru.tk: could not connect to host
-berasavocate.com: could not connect to host
-berdaguermontes.eu: could not connect to host
-berduri.com: did not receive HSTS header
-beretech.fr: did not receive HSTS header
-bergenhave.nl: did not receive HSTS header
-bergenson.nl: did not receive HSTS header
-berger.work: could not connect to host
-bergland-seefeld.at: did not receive HSTS header
-bergmann-fotografin-berlin.de: did not receive HSTS header
-bergmann-fotografin-dortmund.de: did not receive HSTS header
-bergmann-fotografin-duesseldorf.de: did not receive HSTS header
-bergmann-fotografin-essen.de: did not receive HSTS header
-bergmann-fotografin-frankfurt.de: did not receive HSTS header
-bergmann-fotografin-hamburg.de: did not receive HSTS header
-bergmann-fotografin-koeln.de: did not receive HSTS header
-bergmann-fotografin-muenchen.de: did not receive HSTS header
-bergmann-fotografin-stuttgart.de: did not receive HSTS header
-berhampore-gateway.tk: could not connect to host
-berlatih.com: did not receive HSTS header
-berliancom.com: did not receive HSTS header
-berlin-kohlefrei.de: did not receive HSTS header
-berlinleaks.com: could not connect to host
-bermos.net: could not connect to host
-bernadetteanderes.ch: could not connect to host
-bernama.com.my: could not connect to host
-bernarddickens.com: did not receive HSTS header
-bernardez-photo.com: could not connect to host
-bernardfischer.fr: did not receive HSTS header
-bernardo.fm: did not receive HSTS header
-bernyweb.net: could not connect to host
-berodes.be: did not receive HSTS header
-berr.yt: could not connect to host
-berry.cat: could not connect to host
-berrymark.be: did not receive HSTS header
-berseb.se: could not connect to host
-berthelier.me: could not connect to host
-berz.one: could not connect to host
-besb.io: could not connect to host
-besb66.club: could not connect to host
-besb66.com: did not receive HSTS header
-besb66.me: could not connect to host
-besb66.ninja: could not connect to host
-besb66.rocks: could not connect to host
-besb66.us: could not connect to host
-beschriftung-metz.de: could not connect to host
-beserved.eu: could not connect to host
-besixdouze.world: could not connect to host
-beslider.com: could not connect to host
-besola.de: could not connect to host
-bespaarenergie.click: could not connect to host
-bespaarnu.click: could not connect to host
-besser-beissen.de: could not connect to host
-bessettenotaire.com: did not receive HSTS header
-best-of-bounce.co.uk: could not connect to host
-best-wedding-quotes.com: could not connect to host
-bestattorney.com: did not receive HSTS header
-bestbeards.ca: could not connect to host
-bestbefore.com: could not connect to host
-bestbestbitcoin.com: could not connect to host
-bestbrakes.com: did not receive HSTS header
-bestbridal.top: did not receive HSTS header
-bestbyte.com.br: did not receive HSTS header
-bestcellular.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-bestcomputersecuritybooks.com: did not receive HSTS header
-bestdoc.com.br: did not receive HSTS header
-bestelectricnd.com: could not connect to host
-bestellipticalmachinereview.info: could not connect to host
-bestemailmarketingsoftware.org: could not connect to host
-bestesb.net: could not connect to host
-bestessaycheap.com: did not receive HSTS header
-bestfitnesswatchreview.info: could not connect to host
-bestgearlist.com: did not receive HSTS header
-bestgifts4you.com: did not receive HSTS header
-besthotsales.com: could not connect to host
-bestiahosting.com: could not connect to host
-bestinductioncooktop.us: could not connect to host
-bestkeys.ga: could not connect to host
-bestladyshaver.co.uk: did not receive HSTS header
-bestlashesandbrows.com: did not receive HSTS header
-bestlashesandbrows.hu: did not receive HSTS header
-bestleftwild.com: could not connect to host
-bestlooperpedalsguide.com: did not receive HSTS header
-bestmattressforbackpain.online: did not receive HSTS header
-bestmodels.su: did not receive HSTS header
-bestof1001.de: could not connect to host
-bestoffert.club: could not connect to host
-bestorangeseo.com: could not connect to host
-bestpaintings.nl: did not receive HSTS header
-bestpal.eu: did not receive HSTS header
-bestparking.xyz: could not connect to host
-bestperfumebrands.com: could not connect to host
-bestremote.io: could not connect to host
-bestroofbox.com: did not receive HSTS header
-bestschools.io: could not connect to host
-bestschools.top: did not receive HSTS header
-bestseries.tv: could not connect to host
-bestsgadgets.com: could not connect to host
-besuccessful.ch: did not receive HSTS header
-bet062.com: could not connect to host
-bet06vip.com: could not connect to host
-bet07vip.com: could not connect to host
-bet08vip.com: could not connect to host
-bet09vip.com: could not connect to host
-bet166999.com: could not connect to host
-bet290.com: did not receive HSTS header
-bet333n.com: could not connect to host
-bet333q.com: could not connect to host
-bet333z.com: could not connect to host
-bet365bc.net: could not connect to host
-bet365g8.com: could not connect to host
-bet365n1.com: could not connect to host
-bet365n2.com: could not connect to host
-bet365n6.com: could not connect to host
-bet365n8.com: could not connect to host
-bet365n9.com: could not connect to host
-bet365q0.com: could not connect to host
-bet365q6.com: could not connect to host
-bet365q8.com: could not connect to host
-bet365q9.com: could not connect to host
-bet365r8.com: could not connect to host
-bet365u.com: did not receive HSTS header
-bet365vip7.com: could not connect to host
-bet365x0.com: could not connect to host
-bet365x1.com: could not connect to host
-bet365x2.com: could not connect to host
-bet365x3.com: could not connect to host
-bet365x6.com: could not connect to host
-bet365x8.com: could not connect to host
-bet365x9.com: could not connect to host
-bet44410.com: did not receive HSTS header
-bet444400.com: did not receive HSTS header
-bet444401.com: did not receive HSTS header
-bet444402.com: did not receive HSTS header
-bet444403.com: did not receive HSTS header
-bet444404.com: did not receive HSTS header
-bet444405.com: did not receive HSTS header
-bet444406.com: did not receive HSTS header
-bet444407.com: did not receive HSTS header
-bet444408.com: did not receive HSTS header
-bet444409.com: did not receive HSTS header
-bet444410.com: did not receive HSTS header
-bet444421.com: did not receive HSTS header
-bet444422.com: did not receive HSTS header
-bet444423.com: did not receive HSTS header
-bet444424.com: could not connect to host
-bet444425.com: could not connect to host
-bet444426.com: could not connect to host
-bet444427.com: did not receive HSTS header
-bet444428.com: did not receive HSTS header
-bet444429.com: could not connect to host
-bet444430.com: did not receive HSTS header
-bet909.com: could not connect to host
-bet990.com: did not receive HSTS header
-betaa0.com: could not connect to host
-betaa1.com: could not connect to host
-betaa2.com: could not connect to host
-betaa3.com: could not connect to host
-betaa5.com: could not connect to host
-betaa6.com: could not connect to host
-betaa8.com: could not connect to host
-betaa9.com: could not connect to host
-betacavi.com: did not receive HSTS header
-betaclean.fr: did not receive HSTS header
-betacloud.io: did not receive HSTS header
-betafive.net: could not connect to host
-betakah.net: could not connect to host
-betalenviainternet.nl: did not receive HSTS header
-betamint.org: did not receive HSTS header
-betcafearena.ro: could not connect to host
-betformular.com: could not connect to host
-bethanyduke.com: could not connect to host
-bethanyhome.org: could not connect to host
-betkoo.com: could not connect to host
-betleakbot.com: could not connect to host
-betnet.fr: could not connect to host
-betonmoney.com: could not connect to host
-betplanning.it: did not receive HSTS header
-betrallyarabia.com: could not connect to host
-bets.de: did not receive HSTS header
-betsonlinefree.com.au: could not connect to host
-betteressay.website: could not connect to host
-betterhelp.com: did not receive HSTS header
-betterjapanese.blog: could not connect to host
-betterjapanese.com: could not connect to host
-betterjapanese.org: could not connect to host
-betterjapanese.xyz: could not connect to host
-betterselfbetterworld.cz: did not receive HSTS header
-bettertechinterviews.com: did not receive HSTS header
-bettween.com: did not receive HSTS header
-between.be: did not receive HSTS header
-betxx1.com: could not connect to host
-betxx2.com: could not connect to host
-betz.ro: could not connect to host
-beulahtabernacle.com: could not connect to host
-bevallarta.com: could not connect to host
-beverly.tk: could not connect to host
-bevinsco.org: could not connect to host
-bewerbungsfoto-deinfoto.ch: could not connect to host
-bexit-hosting.nl: could not connect to host
-bexit-security.eu: could not connect to host
-bexit-security.nl: could not connect to host
-bexit.nl: could not connect to host
-bexithosting.nl: could not connect to host
-bey.io: could not connect to host
-beylikduzum.com: could not connect to host
-beylikduzuvaillant.com: could not connect to host
-beylkin.tk: could not connect to host
-beyond-edge.com: could not connect to host
-beyond-rational.com: could not connect to host
-beyondthecode.io: did not receive HSTS header
-beyondtrust.com: did not receive HSTS header
-beyuna.co.uk: did not receive HSTS header
-beyuna.eu: did not receive HSTS header
-beyuna.nl: did not receive HSTS header
-bezemkast.nl: did not receive HSTS header
-bezoomnyville.com: could not connect to host
-bezorg.ninja: could not connect to host
-bezpecnostsiti.cf: could not connect to host
-bezprawnik.pl: did not receive HSTS header
-bezr.co.uk: could not connect to host
-bf.am: max-age too low: 0
-bf7088.com: could not connect to host
-bf7877.com: could not connect to host
-bfas237blog.com: could not connect to host
-bfcgermania88.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-bfd.vodka: could not connect to host
-bfear.com: could not connect to host
-bfelob.gov: could not connect to host
-bffm.biz: could not connect to host
-bfi.wien: did not receive HSTS header
-bflix.tv: did not receive HSTS header
-bfrailwayclub.cf: could not connect to host
-bftbradio.com: did not receive HSTS header
-bg-sexologia.com: could not connect to host
-bg16.de: could not connect to host
-bgbhsf.top: could not connect to host
-bgcparkstad.nl: did not receive HSTS header
-bgdaddy.com: did not receive HSTS header
-bgenlisted.com: did not receive HSTS header
-bgeo.io: could not connect to host
-bgfix.se: did not receive HSTS header
-bgfoto.info: did not receive HSTS header
-bgneuesheim.de: did not receive HSTS header
-bgp.ee: could not connect to host
-bgtgames.com: did not receive HSTS header
-bgwfans.com: did not receive HSTS header
-bharath-g.in: could not connect to host
-bhatia.at: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-bhost.net: did not receive HSTS header
-bhosted.nl: did not receive HSTS header
-bhthome.com: did not receive HSTS header
-bi-ec.ac.cn: could not connect to host
-bi1gif.space: could not connect to host
-bi5.me: could not connect to host
-bi8cku.tech: could not connect to host
-biaggeo-prod.herokuapp.com: could not connect to host
-biancolievito.it: did not receive HSTS header
-bianinapiccanovias.com: could not connect to host
-biano-ai.com: could not connect to host
-bianvip888.com: max-age too low: 0
-biaoqingfuhao.net: could not connect to host
-biaoqingfuhao.org: could not connect to host
-biaxin.ml: could not connect to host
-bible.ru: did not receive HSTS header
-bibleonline.ru: did not receive HSTS header
-biblerhymes.com: could not connect to host
-bibles.com.tw: did not receive HSTS header
-biblethoughts.blog: did not receive HSTS header
-bibleversesfordailyliving.com: could not connect to host
-biblia.name: did not receive HSTS header
-bibliafeminina.com.br: could not connect to host
-biblio.wiki: could not connect to host
-bibliotekarien.se: could not connect to host
-bichines.es: did not receive HSTS header
-bichonfrise.com.br: could not connect to host
-bichonmaltes.com.br: could not connect to host
-bicilonatours.com: did not receive HSTS header
-bicranial.io: did not receive HSTS header
-bicromoestudio.com: could not connect to host
-bicycle-events.com: could not connect to host
-bidon.ca: did not receive HSTS header
-bidorbuy.co.ke: did not receive HSTS header
-bieberium.de: could not connect to host
-biego.cn: could not connect to host
-biehl.co: could not connect to host
-biehl.tech: did not receive HSTS header
-bielsa.me: did not receive HSTS header
-bienenblog.cc: could not connect to host
-biensenvue.com: could not connect to host
-bienstar.tv: could not connect to host
-bier.jp: did not receive HSTS header
-bierbaumer.net: max-age too low: 172800
-bierbringer.at: could not connect to host
-bieumau.net: could not connect to host
-biewen.me: did not receive HSTS header
-biftin.moe: did not receive HSTS header
-biftin.net: could not connect to host
-big-black.de: did not receive HSTS header
-big-fluglaerm-hamburg.de: did not receive HSTS header
-bigbbqbrush.bid: could not connect to host
-bigbounceentertainment.co.uk: could not connect to host
-bigbrotherawards.nl: did not receive HSTS header
-bigbrownpromotions.com.au: could not connect to host
-bigcorporateevents.com: could not connect to host
-bigerbio.com: did not receive HSTS header
-bigfunbouncycastles.com: could not connect to host
-biggreenexchange.com: did not receive HSTS header
-bigjohn.ru: did not receive HSTS header
-bignumworks.com: did not receive HSTS header
-bigshinylock.minazo.net: could not connect to host
-bigshort.org: could not connect to host
-bigthunder.ca: could not connect to host
-biguixhe.net: could not connect to host
-bigwiseguide.com: could not connect to host
-bijoux-store.fr: did not receive HSTS header
-bijoux.com.br: did not receive HSTS header
-bijouxbrasil.com.br: did not receive HSTS header
-bijouxdegriffe.com.br: could not connect to host
-biju-neko.jp: could not connect to host
-bijugeral.com.br: could not connect to host
-bikebay.it: could not connect to host
-bikelifetvkidsquads.co.uk: could not connect to host
-bikerebel.com: did not receive HSTS header
-bikermusic.net: could not connect to host
-bikeshopitalia.com: could not connect to host
-bikiniatoll.com: did not receive HSTS header
-bikyaku.fun: could not connect to host
-bilanligne.com: did not receive HSTS header
-bildermachr.de: could not connect to host
-biletru.net: could not connect to host
-biletua.de: could not connect to host
-biletyplus.com: could not connect to host
-biletyplus.ru: did not receive HSTS header
-bilibili.red: could not connect to host
-bill-nye-the.science: could not connect to host
-billcomparison.ga: could not connect to host
-billdestler.com: could not connect to host
-billgoldstein.name: did not receive HSTS header
-billigesommerhuse.nu: could not connect to host
-billigssl.dk: did not receive HSTS header
-billingsmtpublicworks.gov: could not connect to host
-billionkiaparts.com: could not connect to host
-billninja.com: did not receive HSTS header
-billpro.com.au: could not connect to host
-billrobinson.io: could not connect to host
-billrusling.com: could not connect to host
-billsqualityautocare.com: did not receive HSTS header
-billysbouncycastlehire.co.uk: could not connect to host
-biloplysninger.dk: did not receive HSTS header
-bilsho.com: could not connect to host
-binans.co: could not connect to host
-binans.io: could not connect to host
-binans.xyz: could not connect to host
-binarization.com: did not receive HSTS header
-binarization.net: could not connect to host
-binarization.org: could not connect to host
-binarka.net: did not receive HSTS header
-binaryabstraction.com: could not connect to host
-binaryapparatus.com: did not receive HSTS header
-binaryevolved.com: could not connect to host
-binderapp.net: could not connect to host
-binf.tk: could not connect to host
-binfind.com: did not receive HSTS header
-bingcheung.com: could not connect to host
-bingcheung.org: could not connect to host
-bingo-wear.com: could not connect to host
-bingo9.net: could not connect to host
-bingofriends.com: could not connect to host
-bingostars.com: did not receive HSTS header
-binimo.com: could not connect to host
-binkanhada.biz: could not connect to host
-bintangpiaggi.info: did not receive HSTS header
-bintangsyurga.com: could not connect to host
-binwu666.com: max-age too low: 0
-biobone.net: could not connect to host
-biodobavki.tk: did not receive HSTS header
-bioespuna.eu: did not receive HSTS header
-biofam.ru: did not receive HSTS header
-biofrequenze.it: could not connect to host
-biogeniq.ca: did not receive HSTS header
-biomag.it: could not connect to host
-biomasscore.com: did not receive HSTS header
-biomathalliance.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-biomeris.it: did not receive HSTS header
-biometrics.es: did not receive HSTS header
-bionicspirit.com: did not receive HSTS header
-bionovanaturalpools.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-biophysik-ssl.de: did not receive HSTS header
-biopreferred.gov: could not connect to host
-biospeak.solutions: could not connect to host
-biotanquesbts.com: could not connect to host
-biou.me: could not connect to host
-biovalue.eu: could not connect to host
-bip.gov.sa: could not connect to host
-bipyo.com: could not connect to host
-birchbarkfurniture.ch: could not connect to host
-birdfeeder.online: could not connect to host
-birgitandmerlin.com: could not connect to host
-birkengarten.ch: could not connect to host
-birkhoff.me: did not receive HSTS header
-birkman.com: did not receive HSTS header
-birminghamcastlehire.co.uk: did not receive HSTS header
-birthmatters.us: did not receive HSTS header
-birthright.host: could not connect to host
-birthright.website: could not connect to host
-bischoff-mathey.family: could not connect to host
-biscuit.town: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-biscuits-rec.com: could not connect to host
-biscuits-shop.com: could not connect to host
-biser-borisov.eu: could not connect to host
-bishopscourt-hawarden.co.uk: could not connect to host
-bisix.tk: did not receive HSTS header
-bismarck.moe: could not connect to host
-biso.ga: could not connect to host
-bisoga.xyz: did not receive HSTS header
-bissalama.org: could not connect to host
-bisschopssteeg.nl: could not connect to host
-bisterfeldt.com: did not receive HSTS header
-bistrodeminas.com: could not connect to host
-biswas.me: did not receive HSTS header
-bit.voyage: did not receive HSTS header
-bitace.com: did not receive HSTS header
-bitbit.org: did not receive HSTS header
-bitbr.net: could not connect to host
-bitcalt.eu.org: could not connect to host
-bitcalt.ga: could not connect to host
-bitcantor.com: did not receive HSTS header
-bitchan.it: could not connect to host
-bitclubfun.com: did not receive HSTS header
-bitcoin-casino-no-deposit-bonus.com: max-age too low: 0
-bitcoin-class.com: could not connect to host
-bitcoin-daijin.com: could not connect to host
-bitcoin-india.org: could not connect to host
-bitcoin-wizards.com: could not connect to host
-bitcoin.com: did not receive HSTS header
-bitcoinclashic.ninja: did not receive HSTS header
-bitcoinec.info: could not connect to host
-bitcoiner-or-shitcoiner.com: could not connect to host
-bitcoinfo.jp: could not connect to host
-bitcoingah.com: did not receive HSTS header
-bitcoinhk.org: did not receive HSTS header
-bitcoinjpn.com: could not connect to host
-bitcoinkarlsruhe.de: did not receive HSTS header
-bitcoinprivacy.net: did not receive HSTS header
-bitcoinrush.tk: could not connect to host
-bitcointrade.com.br: did not receive HSTS header
-bitcoinwalletscript.tk: could not connect to host
-bitcoinworld.me: could not connect to host
-bitcoinx.gr: did not receive HSTS header
-bitconcepts.co.uk: could not connect to host
-bitedge.com: did not receive HSTS header
-bitenose.net: could not connect to host
-bitenose.org: could not connect to host
-bitf.ly: did not receive HSTS header
-bitfactory.ws: could not connect to host
-bitfarm-archiv.com: did not receive HSTS header
-bitfarm-archiv.de: did not receive HSTS header
-bitfence.io: did not receive HSTS header
-bitfinder.nl: could not connect to host
-bitfolio.org: did not receive HSTS header
-bithap.com: did not receive HSTS header
-bitheus.com: could not connect to host
-bithosting.io: did not receive HSTS header
-bitk.co: did not receive HSTS header
-bitk.co.uk: did not receive HSTS header
-bitk.eu: did not receive HSTS header
-bitk.uk: did not receive HSTS header
-bitlish.com: did not receive HSTS header
-bitmain.com.ua: could not connect to host
-bitmaincare.com.ua: could not connect to host
-bitmaincare.ru: could not connect to host
-bitmainwarranty.com.ua: could not connect to host
-bitmainwarranty.ru: could not connect to host
-bitmarket.net: could not connect to host
-bitmarket.pl: could not connect to host
-bitmessage.ch: could not connect to host
-bitmex.com: did not receive HSTS header
-bitmexin.com: could not connect to host
-bitmoe.com: did not receive HSTS header
-bitmon.net: did not receive HSTS header
-bitnet.io: could not connect to host
-bitplay.space: could not connect to host
-bitpod.de: could not connect to host
-bitpoll.de: could not connect to host
-bitpoll.org: could not connect to host
-bitrage.de: could not connect to host
-bitraum.io: could not connect to host
-bitroll.com: did not receive HSTS header
-bitsburg.ru: could not connect to host
-bitsensor.io: did not receive HSTS header
-bitshaker.net: did not receive HSTS header
-bitsum.com: did not receive HSTS header
-bittervault.xyz: could not connect to host
-bituptick.com: did not receive HSTS header
-bitvegas.com: did not receive HSTS header
-bitvigor.com: did not receive HSTS header
-bitwrought.net: could not connect to host
-bityes.org: could not connect to host
-bitzeny.link: could not connect to host
-biupay.com.br: could not connect to host
-bivsi.com: could not connect to host
-bizbudding.com: max-age too low: 2592000
-bizcms.com: could not connect to host
-biznes-sekrety.cf: could not connect to host
-bizon.sk: did not receive HSTS header
-bizzartech.com: could not connect to host
-bizzi.tv: could not connect to host
-bizzybeebouncers.co.uk: could not connect to host
-bjgongyi.com: did not receive HSTS header
-bjmgeek.science: could not connect to host
-bjmun.cn: could not connect to host
-bjoernengel.de: did not receive HSTS header
-bjoernengel.eu: did not receive HSTS header
-bjrn.io: could not connect to host
-bjtxl.cn: could not connect to host
-bkb-skandal.ch: could not connect to host
-bkhayes.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-bkkposn.com: could not connect to host
-bklaindia.com: could not connect to host
-black-armada.com: could not connect to host
-black-armada.com.pl: could not connect to host
-black-armada.pl: could not connect to host
-black-cat-seo.com: did not receive HSTS header
-black-gay-porn.biz: could not connect to host
-black-octopus.ru: could not connect to host
-black-pool.net: could not connect to host
-blackapron.com.br: could not connect to host
-blackbase.de: did not receive HSTS header
-blackberrycentral.com: could not connect to host
-blackburn.link: could not connect to host
-blackbyte.it: could not connect to host
-blackcicada.com: could not connect to host
-blackcountrymetalworks.co.uk: did not receive HSTS header
-blackdesertsp.com: could not connect to host
-blackdiam.net: did not receive HSTS header
-blackdotbrewery.com: could not connect to host
-blackhawktreeinc.com: did not receive HSTS header
-blackhell.xyz: could not connect to host
-blackislegroup.com: did not receive HSTS header
-blackkeg.ca: could not connect to host
-blacklane.com: did not receive HSTS header
-blackly.uk: could not connect to host
-blackmagic.sk: could not connect to host
-blackmirror.com.au: did not receive HSTS header
-blackonion.com: did not receive HSTS header
-blackpayment.ru: could not connect to host
-blackphantom.de: could not connect to host
-blackpi.dedyn.io: could not connect to host
-blackrose-garden.herokuapp.com: did not receive HSTS header
-blackscreen.me: could not connect to host
-blackthrone.tk: could not connect to host
-blackunicorn.wtf: could not connect to host
-blackyin.xyz: could not connect to host
-bladesmith.io: could not connect to host
-blakerandall.xyz: could not connect to host
-blamefran.net: could not connect to host
-blantik.net: could not connect to host
-blantr.com: could not connect to host
-blarg.co: did not receive HSTS header
-blastair.fr: did not receive HSTS header
-blastzoneentertainments.co.uk: could not connect to host
-blatnice.cf: could not connect to host
-blatnice.ga: could not connect to host
-blatnice.gq: could not connect to host
-blatnice.ml: could not connect to host
-blatnice.tk: could not connect to host
-blazeit.io: could not connect to host
-blazor.nl: did not receive HSTS header
-blechpirat.name: could not connect to host
-bleep.zone: could not connect to host
-blend.guru: could not connect to host
-blenderman.org: could not connect to host
-blendlecdn.com: could not connect to host
-blenheimchalcot.com: did not receive HSTS header
-blessedguy.net: did not receive HSTS header
-blessnet.jp: did not receive HSTS header
-bleutecmedia.com: did not receive HSTS header
-blha303.com.au: could not connect to host
-blic-zajm.gq: could not connect to host
-blicy.net: could not connect to host
-bliker.ga: could not connect to host
-blikk.no: did not receive HSTS header
-blindaryproduction.tk: could not connect to host
-blinder.com.co: did not receive HSTS header
-blinds-unlimited.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-blindsexdate.nl: did not receive HSTS header
-blink-security.com: could not connect to host
-blinkenlight.co.uk: could not connect to host
-blinkenlight.com.au: could not connect to host
-blinkspeed.eu: could not connect to host
-blitzprog.org: could not connect to host
-blitzvendor.com: could not connect to host
-blizora.com: could not connect to host
-bllb.ru: could not connect to host
-blm36.cc: could not connect to host
-blmiller.com: could not connect to host
-blockchainbulteni.com.tr: did not receive HSTS header
-blockchainevents.nl: could not connect to host
-blockchainwhiz.com: did not receive HSTS header
-blockcheck.network: could not connect to host
-blockified.io: could not connect to host
-blocknodes.live: could not connect to host
-blocksatz-medien.de: could not connect to host
-blockshopauto.com: could not connect to host
-blockstream.com: did not receive HSTS header
-blog-ritaline.com: could not connect to host
-blog.coffee: could not connect to host
-blog.cyveillance.com: could not connect to host
-blog.gov.uk: did not receive HSTS header
-blog.gparent.org: could not connect to host
-blogabout.ru: could not connect to host
-blogcast.co: did not receive HSTS header
-blogconcours.net: could not connect to host
-blogcuaviet.com: could not connect to host
-blogdeyugioh.com: could not connect to host
-blogexpert.ca: did not receive HSTS header
-bloggingwithchildren.com: could not connect to host
-blogkuliah.com: could not connect to host
-bloglife-bb.com: could not connect to host
-bloglikepro.com: could not connect to host
-bloglines.co.za: did not receive HSTS header
-bloglogistics.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-bloglyric.com: did not receive HSTS header
-blognr.com: did not receive HSTS header
-blogom.at: could not connect to host
-blogonblogspot.com: could not connect to host
-blogpronto.com.br: did not receive HSTS header
-bloguser.ru: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-blokino.org: did not receive HSTS header
-blokmy.com: could not connect to host
-blokuhaka.fr: did not receive HSTS header
-blonde.style: did not receive HSTS header
-blondesguide.com: did not receive HSTS header
-blood4pets.tk: could not connect to host
-bloodhunt.pl: could not connect to host
-bloodyexcellent.com: did not receive HSTS header
-bloogle.top: did not receive HSTS header
-bloom.sh: did not receive HSTS header
-bloombrown.com: did not receive HSTS header
-bloomnbud.com: did not receive HSTS header
-bloomzoomy.ru: could not connect to host
-blowjs.com: could not connect to host
-bls-fiduciaire.be: did not receive HSTS header
-bltc.co: could not connect to host
-blucas.org: did not receive HSTS header
-bludnykoren.ml: could not connect to host
-blue17.co.uk: did not receive HSTS header
-bluebahari.gq: could not connect to host
-bluebill.net: could not connect to host
-bluecardlottery.eu: could not connect to host
-bluechilli.com: did not receive HSTS header
-bluecon.eu: did not receive HSTS header
-bluedata.ltd: could not connect to host
-bluefinger.nl: did not receive HSTS header
-blueflare.org: could not connect to host
-blueglobalmedia.com: could not connect to host
-bluehawk.cloud: could not connect to host
-blueliv.com: did not receive HSTS header
-bluemeda.web.id: could not connect to host
-blueoceantech.us: did not receive HSTS header
-bluepearl.tk: did not receive HSTS header
-blueplumbinggroup.com.au: could not connect to host
-bluepoint.foundation: did not receive HSTS header
-bluepoint.institute: did not receive HSTS header
-bluepoint.one: did not receive HSTS header
-blueprintloans.co.uk: could not connect to host
-blueridgesecuritycameras.com: did not receive HSTS header
-blues-and-pictures.com: could not connect to host
-bluescloud.xyz: could not connect to host
-bluesecure.com.br: could not connect to host
-bluesnews.tk: could not connect to host
-bluetenmeer.com: did not receive HSTS header
-bluewizardart.net: could not connect to host
-bluezonehealth.co.uk: did not receive HSTS header
-blui.cf: could not connect to host
-blui.ml: could not connect to host
-bluicraft.tk: could not connect to host
-bluketing.com: did not receive HSTS header
-blumen-binder.ch: did not receive HSTS header
-blumen-garage.de: could not connect to host
-blumenwiese.xyz: did not receive HSTS header
-blundell.wedding: could not connect to host
-blunderify.se: did not receive HSTS header
-bluop.com: could not connect to host
-bluproducts.com.es: could not connect to host
-bluserv.net: could not connect to host
-bluteklab.com: did not receive HSTS header
-blutroyal.de: did not receive HSTS header
-bm-i.ch: could not connect to host
-bm-trading.nl: did not receive HSTS header
-bmet.de: did not receive HSTS header
-bminton.is-a-geek.net: could not connect to host
-bmriv.com: could not connect to host
-bmwcolors.com: could not connect to host
-bn1digital.co.uk: did not receive HSTS header
-bnb-buddy.nl: could not connect to host
-bnboy.cn: could not connect to host
-bngsecure.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-bnhlibrary.com: could not connect to host
-bnstree.com: could not connect to host
-bnusd.cn: did not receive HSTS header
-board-buy.ru: could not connect to host
-boatme.de: did not receive HSTS header
-bobancoamigo.com: could not connect to host
-bobaobei.org: could not connect to host
-bobep.ru: could not connect to host
-bobiji.com: could not connect to host
-boboates.com: did not receive HSTS header
-bocloud.eu: could not connect to host
-bodaneiranunez.com: did not receive HSTS header
-bodegasvirei.com: did not receive HSTS header
-bodixite.com: could not connect to host
-bodo-wolff.de: could not connect to host
-bodrumfarm.com: could not connect to host
-bodrumhotelsresorts.com: could not connect to host
-bodyblog.nl: did not receive HSTS header
-bodybuilding-legends.com: could not connect to host
-bodybuilding.events: could not connect to host
-bodycaredirect.online: did not receive HSTS header
-bodyweightsolution.com: could not connect to host
-bodyworkbymichael.com: did not receive HSTS header
-boekenlegger.nl: did not receive HSTS header
-boel073.nl: did not receive HSTS header
-boensou.com: did not receive HSTS header
-boffin.tk: could not connect to host
-bog8.com: did not receive HSTS header
-bogobeats.com: did not receive HSTS header
-bogosity.se: max-age too low: 0
-bogosity.tv: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-bogwitch.tk: could not connect to host
-bohan.life: could not connect to host
-bohyn.cz: could not connect to host
-boiadeirodeberna.com: could not connect to host
-boilesen.com: did not receive HSTS header
-boincstats.com: did not receive HSTS header
-bokeyy.com: could not connect to host
-bolainfoasia.com: did not receive HSTS header
-boldt-metallbau.de: did not receive HSTS header
-bolivarfm.com.ve: could not connect to host
-bollywood.uno: could not connect to host
-bolsa.tk: did not receive HSTS header
-boltdata.io: could not connect to host
-boltn.uk: could not connect to host
-bolwerk.com.br: could not connect to host
-bombayfashionclub.com: could not connect to host
-bomberus.de: could not connect to host
-bombsquad.studio: could not connect to host
-bonamihome.ro: could not connect to host
-bonapp.restaurant: could not connect to host
-bonbini.ga: could not connect to host
-bondoer.fr: did not receive HSTS header
-bondtofte.dk: max-age too low: 2592000
-bongminhtam.com: could not connect to host
-bonibuty.com: max-age too low: 2592000
-bonifacius.be: did not receive HSTS header
-bonigo.de: could not connect to host
-bonita.com.br: could not connect to host
-bonitabrazilian.co.nz: did not receive HSTS header
-bonnebouffe.fr: could not connect to host
-bonniecoloring.com: could not connect to host
-bonniedraw.com: could not connect to host
-bonniekitchen.com: could not connect to host
-bonnin.fr: did not receive HSTS header
-bonnsustainabilityportal.de: could not connect to host
-bonobo.cz: could not connect to host
-bonop.com: did not receive HSTS header
-bonqoeur.ca: did not receive HSTS header
-bonrecipe.com: could not connect to host
-bonta.one: could not connect to host
-bonus-flexi.com: did not receive HSTS header
-boobox.xyz: max-age too low: 0
-boogaerdtmakelaars.nl: did not receive HSTS header
-boogiebouncecastles.co.uk: could not connect to host
-book-of-ra.de: could not connect to host
-bookcelerator.com: did not receive HSTS header
-booked.holiday: could not connect to host
-bookingentertainment.com: did not receive HSTS header
-bookingtool.com: did not receive HSTS header
-bookmakersfreebets.com.au: did not receive HSTS header
-bookofraonlinecasinos.com: could not connect to host
-bookourdjs.com: could not connect to host
-bookreport.ga: could not connect to host
-booksouthafrica.travel: did not receive HSTS header
-bookwitty.social: did not receive HSTS header
-boomerang.com: did not receive HSTS header
-boomersurf.com: could not connect to host
-boomsaki.com: could not connect to host
-boomsakis.com: could not connect to host
-boomvm.pw: could not connect to host
-boonecountyfpdmo.gov: did not receive HSTS header
-boonehenry.co.uk: did not receive HSTS header
-booox.biz: could not connect to host
-booox.pw: could not connect to host
-boop.gq: could not connect to host
-booq.org: did not receive HSTS header
-boost.fyi: could not connect to host
-boosterlearnpro.com: could not connect to host
-boosteusedetalents.fr: did not receive HSTS header
-boostgame.win: could not connect to host
-boote.wien: could not connect to host
-booter.es: did not receive HSTS header
-booth.in.th: did not receive HSTS header
-boothlabs.me: could not connect to host
-bootikexpress.fr: did not receive HSTS header
-bootyourboss.com: could not connect to host
-boozinyan.com: could not connect to host
-bopera.co.uk: could not connect to host
-boran.cl: did not receive HSTS header
-borchers-media.de: could not connect to host
-borderlinegroup.com: could not connect to host
-boredhackers.com: could not connect to host
-boren.shop: did not receive HSTS header
-borg.cloud: did not receive HSTS header
-borgodigatteraia.it: could not connect to host
-boringsecurity.net: could not connect to host
-boringsmith.com: did not receive HSTS header
-boris.one: could not connect to host
-borisavstankovic.rs: could not connect to host
-borisbesemer.com: did not receive HSTS header
-borisschapira.com: did not receive HSTS header
-born-to-learn.com: could not connect to host
-borrelioz.com: did not receive HSTS header
-borscheid-wenig.com: did not receive HSTS header
-borzoi.com.br: could not connect to host
-bosabosa.org: could not connect to host
-boschee.net: could not connect to host
-bossdistribuidora.com.br: did not receive HSTS header
-bostadsportal.se: did not receive HSTS header
-bosworthdental.co.uk: did not receive HSTS header
-botlab.ch: could not connect to host
-botmanager.pl: could not connect to host
-botoes-primor.pt: max-age too low: 2592000
-botox.bz: did not receive HSTS header
-bots.cat: could not connect to host
-botsiah.fail: could not connect to host
-botsindiscord.me: could not connect to host
-botstack.host: could not connect to host
-bottaerisposta.net: did not receive HSTS header
-bou.lt: did not receive HSTS header
-boueki.jp: did not receive HSTS header
-boueki.org: did not receive HSTS header
-bouk.co: did not receive HSTS header
-bouncebeyondcastles.co.uk: could not connect to host
-bounceboxspc.com: did not receive HSTS header
-bouncecoffee.com: did not receive HSTS header
-bouncehighpeak.co.uk: could not connect to host
-bouncelanduk.co.uk: did not receive HSTS header
-bouncemania.org: could not connect to host
-bouncemasters.co.uk: could not connect to host
-bouncenslidenortheast.co.uk: did not receive HSTS header
-bouncetheparty.co.uk: could not connect to host
-bouncewithbovells.com: could not connect to host
-bouncing-bugs.co.uk: could not connect to host
-bouncing4joy.co.uk: could not connect to host
-bouncingbuzzybees.co.uk: could not connect to host
-bouncourseplanner.net: could not connect to host
-bouncy-tots.co.uk: could not connect to host
-bouncyballscastles.co.uk: could not connect to host
-bouncycastleandparty.co.uk: could not connect to host
-bouncycastlehiremedway.com: could not connect to host
-bouncycastles.me: did not receive HSTS header
-bouncycastlesinleeds.co.uk: could not connect to host
-bouncycastlesmonaghan.com: did not receive HSTS header
-bouncycastlesperth.net: could not connect to host
-bouncyfeet.co.uk: could not connect to host
-bouncyhouses.co.uk: could not connect to host
-bouncymadness.com: could not connect to host
-bouncytown.co.uk: could not connect to host
-bouncywouncy.co.uk: did not receive HSTS header
-bountiful.gov: could not connect to host
-bourdon.fr.eu.org: could not connect to host
-bourgdepabos.com: did not receive HSTS header
-bourhis.info: did not receive HSTS header
-bourqu.in: did not receive HSTS header
-boutiquefutebol.com.br: did not receive HSTS header
-bouwbedrijfpurmerend.nl: did not receive HSTS header
-bouwplaatscheckin.nl: did not receive HSTS header
-bovworkplacepensions.com: could not connect to host
-bowlsheet.com: did not receive HSTS header
-bownty.be: did not receive HSTS header
-bownty.de: did not receive HSTS header
-bownty.dk: did not receive HSTS header
-bownty.pt: did not receive HSTS header
-boxdevigneron.fr: could not connect to host
-boxing-austria.eu: did not receive HSTS header
-boxit.es: did not receive HSTS header
-boxlink.io: did not receive HSTS header
-boxlitepackaging.com: did not receive HSTS header
-boxmoe.cn: could not connect to host
-boxpeg.com: did not receive HSTS header
-boxtreeclinic.com: did not receive HSTS header
-boxview.com: could not connect to host
-boyan.in: could not connect to host
-boyerassoc.com: did not receive HSTS header
-boyfriendhusband.men: did not receive HSTS header
-boyntonobserver.org: could not connect to host
-boypoint.de: could not connect to host
-bozdoz.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-bozemancarpetcleaningservices.com: could not connect to host
-bozosbouncycastles.co.uk: did not receive HSTS header
-bp-wahl.at: did not receive HSTS header
-bpadvisors.eu: could not connect to host
-bpvr.ddns.net: could not connect to host
-bqcp.net: could not connect to host
-bqtoolbox.com: could not connect to host
-br-miyamoto.spdns.org: could not connect to host
-br1334shop.com.br: could not connect to host
-brackets-salad.com: could not connect to host
-bracoitaliano.com.br: could not connect to host
-bradfergusonrealestate.com: did not receive HSTS header
-braemer-it-consulting.de: could not connect to host
-bragaweb.com.br: could not connect to host
-brahmstaedt.de: did not receive HSTS header
-brain-e.co: could not connect to host
-brainball.fr: could not connect to host
-brainfork.ml: could not connect to host
-brainfork.org: did not receive HSTS header
-brainfpv.com: did not receive HSTS header
-brainhub.nl: could not connect to host
-brainlag.org: could not connect to host
-braintensive.com: could not connect to host
-braintm.com: could not connect to host
-braintreebouncycastles.com: could not connect to host
-braintreepayments.com: did not receive HSTS header
-brainvation.de: did not receive HSTS header
-brakstad.org: did not receive HSTS header
-brambogaerts.nl: did not receive HSTS header
-bramburek.net: could not connect to host
-brammingfys.dk: did not receive HSTS header
-bramsikkens.be: could not connect to host
-bran.cc: could not connect to host
-bran.soy: could not connect to host
-branchzero.com: did not receive HSTS header
-brand-foo.com: did not receive HSTS header
-brand-foo.jp: did not receive HSTS header
-brand-foo.net: did not receive HSTS header
-brandbil.dk: could not connect to host
-brandbuilderwebsites.com: could not connect to host
-brandcodeconsulting.com: could not connect to host
-brandnewdays.nl: could not connect to host
-brando753.xyz: could not connect to host
-brandon.so: could not connect to host
-brandongomez.me: could not connect to host
-brandonhaynesmd.com: could not connect to host
-brandonlui.ml: could not connect to host
-brandons.site: could not connect to host
-brandontaylor-black.com: could not connect to host
-brandred.net: could not connect to host
-brandspray.com: did not receive HSTS header
-brank.as: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-brasilbombas.com.br: did not receive HSTS header
-brasilien.guide: could not connect to host
-brasilmorar.com: could not connect to host
-brasiltopnews.tk: did not receive HSTS header
-brasspipedreams.org: could not connect to host
-bratislava-airport-taxi.com: did not receive HSTS header
-bravehearts.org.au: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-braviskindenjeugd.nl: did not receive HSTS header
-bravisziekenhuis.nl: did not receive HSTS header
-bravz.de: could not connect to host
-brawlstarsitalia.com: did not receive HSTS header
-braystudio.com: did not receive HSTS header
-breakingvap.fr: did not receive HSTS header
-breakpoint.at: did not receive HSTS header
-breakwall.ml: could not connect to host
-breatheav.com: did not receive HSTS header
-breatheproduction.com: did not receive HSTS header
-bredvid.no: did not receive HSTS header
-breeswish.org: did not receive HSTS header
-breitbild-beamer.de: max-age too low: 1209600
-breizh.me: did not receive HSTS header
-brendanscherer.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-brenden.net.au: could not connect to host
-bress.cloud: could not connect to host
-brestnews.tk: did not receive HSTS header
-brettelliff.com: did not receive HSTS header
-brettpemberton.xyz: did not receive HSTS header
-brettw.xyz: could not connect to host
-bretz-hufer.de: did not receive HSTS header
-brewtrackr.com: did not receive HSTS header
-brezani.tk: could not connect to host
-brfvh24.se: could not connect to host
-briangarcia.ga: could not connect to host
-brianlanders.us: could not connect to host
-brianmwaters.net: could not connect to host
-brianpcurran.com: could not connect to host
-brickoo.com: could not connect to host
-brickwerks.io: could not connect to host
-brickyardbuffalo.com: did not receive HSTS header
-brideandgroomdirect.ie: could not connect to host
-bridesmagazine.co.uk: did not receive HSTS header
-bridgehomeloans.com: could not connect to host
-bridgeout.com: could not connect to host
-bridgingdirectory.com: did not receive HSTS header
-bridzius.lt: did not receive HSTS header
-briffoud.fr: could not connect to host
-briggsleroux.com: could not connect to host
-brightfuturemadebyme.com: could not connect to host
-brightonzhang.com: did not receive HSTS header
-brightstarkids.co.uk: did not receive HSTS header
-brightstarkids.com.au: did not receive HSTS header
-brightstarkids.net: did not receive HSTS header
-brightstarkids.sg: did not receive HSTS header
-brigitte.nyc: could not connect to host
-brigittebutt.tk: could not connect to host
-brilliantbuilders.co.uk: could not connect to host
-brilliantdecisionmaking.com: did not receive HSTS header
-brimspark.com: could not connect to host
-brindisi.tk: could not connect to host
-brinkhu.is: could not connect to host
-brinkmann.one: did not receive HSTS header
-brinquedoseducativos.art.br: did not receive HSTS header
-brio-ukraine.store: could not connect to host
-briograce.com.mx: could not connect to host
-britania.tk: did not receive HSTS header
-britishacademy.us: did not receive HSTS header
-britishchronicles.com: could not connect to host
-britzer-toner.de: did not receive HSTS header
-brivadois.ovh: could not connect to host
-brix.ninja: did not receive HSTS header
-brks.xyz: could not connect to host
-brmascots.com: could not connect to host
-brn.by: could not connect to host
-broadleft.org: could not connect to host
-brocinema.com: did not receive HSTS header
-broerict.nl: did not receive HSTS header
-broerweb.nl: could not connect to host
-broeselei.at: could not connect to host
-broken-oak.com: could not connect to host
-brokenjoysticks.net: did not receive HSTS header
-brokervalues.com: could not connect to host
-brokolit.com: did not receive HSTS header
-bromo.cf: could not connect to host
-bronwynlewis.com: could not connect to host
-bronzew.com: max-age too low: 2592000
-brooke-fan.com: did not receive HSTS header
-brookechase.com: did not receive HSTS header
-brookframework.org: could not connect to host
-brookscountyga.gov: did not receive HSTS header
-brookworth.com: did not receive HSTS header
-brossman.it: could not connect to host
-brother-printsmart.nl: could not connect to host
-brown-devost.com: did not receive HSTS header
-brownlawoffice.us: did not receive HSTS header
-browsbybecca.ca: could not connect to host
-browserid.org: could not connect to host
-brplusdigital.com: could not connect to host
-brrd.io: did not receive HSTS header
-brring.com: did not receive HSTS header
-bruce-springsteen.tk: did not receive HSTS header
-brucemobile.de: did not receive HSTS header
-brueser-gmbh.de: did not receive HSTS header
-bruna-cdn.nl: could not connect to host
-brunix.net: did not receive HSTS header
-brunoonline.co.uk: could not connect to host
-brutus2.ga: could not connect to host
-bryancastillo.site: could not connect to host
-bryanshearer.accountant: did not receive HSTS header
-bryn.xyz: could not connect to host
-brynnan.nl: could not connect to host
-brztec.com: did not receive HSTS header
-bs-herting.de: did not receive HSTS header
-bs-security.com: could not connect to host
-bs.sb: could not connect to host
-bsagan.fr: could not connect to host
-bsalyzer.com: could not connect to host
-bsc01.dyndns.org: could not connect to host
-bsd.com.ro: could not connect to host
-bsdtips.com: could not connect to host
-bsdug.org: could not connect to host
-bsg-aok-muenchen.de: did not receive HSTS header
-bsimerch.com: did not receive HSTS header
-bsklabels.com: did not receive HSTS header
-bsktweetup.info: could not connect to host
-bslim-e-boutique.com: could not connect to host
-bsmomo-api.com: could not connect to host
-bsohoekvanholland.nl: could not connect to host
-bst.gg: did not receive HSTS header
-bsuess.de: could not connect to host
-bsuru.xyz: could not connect to host
-bt78.cn: could not connect to host
-bt780.com: could not connect to host
-bt85.cn: could not connect to host
-bt9.cc: could not connect to host
-bt96.cn: did not receive HSTS header
-bt995.com: did not receive HSTS header
-btaoke.com: could not connect to host
-btc-e.com: could not connect to host
-btc2secure.com: did not receive HSTS header
-btcdlc.com: could not connect to host
-btcfbi.com: did not receive HSTS header
-btcgo.nl: did not receive HSTS header
-btcontract.com: could not connect to host
-btcp.space: could not connect to host
-btcpot.ltd: could not connect to host
-btcycle.org: could not connect to host
-btine.tk: could not connect to host
-btku.org: could not connect to host
-btrb.ml: could not connect to host
-btserv.de: could not connect to host
-btshenqi.cc: could not connect to host
-btt-39.com: could not connect to host
-btt-59.com: could not connect to host
-btt11.net: could not connect to host
-btt88.net: could not connect to host
-btta13.com: did not receive HSTS header
-btta27.com: did not receive HSTS header
-btth.live: could not connect to host
-btth.xyz: could not connect to host
-bttt111.com: did not receive HSTS header
-bttt222.com: could not connect to host
-bturboo.com: could not connect to host
-btxiaobai.com: did not receive HSTS header
-bubba.cc: could not connect to host
-bubblybouncers.co.uk: did not receive HSTS header
-buben.tech: could not connect to host
-bubhub.io: could not connect to host
-buchhandlungkilgus.de: did not receive HSTS header
-buchheld.at: could not connect to host
-buchverlag-scholz.de: did not receive HSTS header
-buck.com: did not receive HSTS header
-bucket.tk: could not connect to host
-buckmulligans.com: did not receive HSTS header
-budaev-shop.ru: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-buddhaspa.ro: did not receive HSTS header
-buddhistische-weisheiten.org: could not connect to host
-buddy-acceptance-authentication-api.azurewebsites.net: did not receive HSTS header
-buddy-acceptance-authentication-frontend.azurewebsites.net: could not connect to host
-buddy-acceptance-backoffice-frontend.azurewebsites.net: could not connect to host
-buddy-acceptance-banking-api.azurewebsites.net: could not connect to host
-buddy-acceptance-profiles-api.azurewebsites.net: could not connect to host
-buddy-acceptance-users-api.azurewebsites.net: could not connect to host
-buddy-acceptance-web-frontend.azurewebsites.net: could not connect to host
-buddy-development-backoffice-webapp.azurewebsites.net: could not connect to host
-buddy-development-rabodirectconnect-api.azurewebsites.net: could not connect to host
-buderus-family.be: could not connect to host
-budger.nl: did not receive HSTS header
-budgetenergievriendenvoordeel.nl: could not connect to host
-budgetthostels.nl: did not receive HSTS header
-budskap.eu: could not connect to host
-budweisermeats.com: did not receive HSTS header
-buenosairesestetica.com.ar: could not connect to host
-buenotour.ru: did not receive HSTS header
-buergerdialog.net: did not receive HSTS header
-buergerhaushalt.com: did not receive HSTS header
-buffetbouc.com: could not connect to host
-bufla.net: did not receive HSTS header
-bugginslab.co.uk: could not connect to host
-buggmedia.com: did not receive HSTS header
-buggshop.com: could not connect to host
-bugs.chromium.org: did not receive HSTS header (error ignored - included regardless)
-bugtrack.co.uk: could not connect to host
-bugtrack.io: could not connect to host
-bugu.org: could not connect to host
-buhayguro.com: could not connect to host
-buhex.net: did not receive HSTS header
-buhler.pro: did not receive HSTS header
-buiko.com: did not receive HSTS header
-build.chromium.org: did not receive HSTS header (error ignored - included regardless)
-buildbox.io: did not receive HSTS header
-buildci.asia: could not connect to host
-buildfaith.ca: did not receive HSTS header
-buildiffuse.com: could not connect to host
-buildify.co.za: could not connect to host
-building-cost-estimators.com: could not connect to host
-buildingclouds.at: could not connect to host
-buildingclouds.ch: could not connect to host
-buildingclouds.es: could not connect to host
-buildingclouds.eu: could not connect to host
-buildingclouds.fr: could not connect to host
-buildingcostestimators.co.uk: could not connect to host
-buildrightbuildingservicesltd.co.uk: did not receive HSTS header
-buileo.com: could not connect to host
-builmaker.com: did not receive HSTS header
-built.by: could not connect to host
-buka.jp: could not connect to host
-bukatv.cz: could not connect to host
-bukpcszerviz.hu: could not connect to host
-bul3seas.eu: could not connect to host
-bulbcompare.com: could not connect to host
-bulbgenie.com: could not connect to host
-buldogueingles.com.br: could not connect to host
-bulgariablog.tk: could not connect to host
-bulgarien.guide: could not connect to host
-bulgariya.cf: did not receive HSTS header
-bulk-pagerank-checker.com: did not receive HSTS header
-bulkbuy.tech: could not connect to host
-bulkingtime.com: did not receive HSTS header
-bulkowespacerkowo.nl: could not connect to host
-bulktrade.de: did not receive HSTS header
-bullbits.com: could not connect to host
-bulldoghire.co.uk: did not receive HSTS header
-bulletbabu.com: could not connect to host
-bulletpoint.cz: could not connect to host
-bullpay.com: could not connect to host
-bullpendaily.com: could not connect to host
-bullterrier.me: could not connect to host
-bulmafox.com: could not connect to host
-bulmastife.com.br: could not connect to host
-bulutkey.com: did not receive HSTS header
-bumarkamoda.com: did not receive HSTS header
-bumshow.ru: could not connect to host
-bunadarbankinn.is: could not connect to host
-bunaken.asia: could not connect to host
-bunbomenu.de: could not connect to host
-bunny.tk: could not connect to host
-bunnycarenotes.com: could not connect to host
-bunnymud.com: could not connect to host
-bunnyvishal.com: could not connect to host
-bunq.love: could not connect to host
-bupu.ml: could not connect to host
-buqi.cc: could not connect to host
-buquesdeguerra.tk: could not connect to host
-buradangonder.com: could not connect to host
-burckardtnet.de: did not receive HSTS header
-bureaubolster.nl: did not receive HSTS header
-bureaugravity.com: did not receive HSTS header
-burfordbedandbreakfast.co.uk: did not receive HSTS header
-burgawnc.gov: did not receive HSTS header
-burian-server.cz: could not connect to host
-buricloud.fr: could not connect to host
-burlesquemakeup.com: did not receive HSTS header
-burmakatze.at: did not receive HSTS header
-burmesecats.eu: did not receive HSTS header
-burningcrash.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-burpsuite.site: could not connect to host
-burroughsid.com: could not connect to host
-burrow.ovh: could not connect to host
-burrowingsec.com: could not connect to host
-bursa3bydgoszcz.pl: did not receive HSTS header
-burtplasticsurgery.com: did not receive HSTS header
-burtrum.top: could not connect to host
-buryat-mongol.cf: could not connect to host
-buryit.net: did not receive HSTS header
-burzmedia.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-busanhs.bid: could not connect to host
-busanhs.win: could not connect to host
-buscoterapia.com.br: did not receive HSTS header
-buserror.cn: could not connect to host
-bush41.org: did not receive HSTS header
-bushcraftfriends.com: could not connect to host
-bushellc.com: could not connect to host
-bushland.tk: could not connect to host
-business-creators.ru: could not connect to host
-business.lookout.com: could not connect to host
-business.medbank.com.mt: did not receive HSTS header
-businessamongus.com: could not connect to host
-businessetmarketing.com: could not connect to host
-businessfurs.info: could not connect to host
-businesshosting.nl: did not receive HSTS header
-businessimmigration-eu.com: could not connect to host
-businessimmigration-eu.ru: could not connect to host
-businessmadeeasypodcast.com: did not receive HSTS header
-businessmodeler.se: could not connect to host
-businessplanexperts.ca: did not receive HSTS header
-businessradar.com.au: could not connect to host
-busit.be: could not connect to host
-busiteyiengelle.com: could not connect to host
-bustimes.org: did not receive HSTS header
-bustimes.org.uk: did not receive HSTS header
-bustup-tips.com: did not receive HSTS header
-busybee360.com: could not connect to host
-busyon.cloud: could not connect to host
-butchersworkshop.com: did not receive HSTS header
-buthowdoyoubuygroceries.com: could not connect to host
-butian518.com: could not connect to host
-butikpris.se: did not receive HSTS header
-butlercountyhistory.org: could not connect to host
-butt.repair: could not connect to host
-buttercoin.com: could not connect to host
-buttercupstraining.co.uk: did not receive HSTS header
-butterfieldstraining.com: could not connect to host
-butterflycare.co: did not receive HSTS header
-butterhost.ga: did not receive HSTS header
-buttermilk.cf: could not connect to host
-buttonrun.com: did not receive HSTS header
-buturyu.net: did not receive HSTS header
-buturyu.org: did not receive HSTS header
-buurtgenotencollectief.nl: could not connect to host
-buy-neurontin-online.tk: could not connect to host
-buy-seroquel.tk: could not connect to host
-buy-sildalis.gq: could not connect to host
-buy-thing.com: could not connect to host
-buy2dollars.com: could not connect to host
-buybaby.eu: could not connect to host
-buybike.shop: could not connect to host
-buycarpet.shop: could not connect to host
-buycbd.store: could not connect to host
-buycitalopram.ga: could not connect to host
-buycook.shop: could not connect to host
-buydesired.com: did not receive HSTS header
-buydiflucan.ga: could not connect to host
-buyebook.xyz: could not connect to host
-buyessayscheap.com: did not receive HSTS header
-buyfluoxetineonline.ml: could not connect to host
-buyfox.de: could not connect to host
-buyharpoon.com: could not connect to host
-buyhealth.shop: could not connect to host
-buyingsellingflorida.com: could not connect to host
-buyjewel.shop: could not connect to host
-buymethotrexate.ga: did not receive HSTS header
-buymindhack.com: did not receive HSTS header
-buynowdepot.com: did not receive HSTS header
-buyplaytix.com: did not receive HSTS header
-buyplussize.shop: could not connect to host
-buyprofessional.shop: could not connect to host
-buyritefairview.com: did not receive HSTS header
-buysellinvestproperties.com: did not receive HSTS header
-buyshoe.org: could not connect to host
-buysuisse.shop: could not connect to host
-buytheway.co.za: did not receive HSTS header
-buywine.shop: could not connect to host
-buywood.shop: could not connect to host
-buziaczki.pl: could not connect to host
-buzzconcert.com: did not receive HSTS header
-buzzconf.io: could not connect to host
-buzzdeck.com: could not connect to host
-buzzrow.com: did not receive HSTS header
-buzztelco.com.au: did not receive HSTS header
-bvexplained.co.uk: could not connect to host
-bvgg.eu: did not receive HSTS header
-bvionline.eu: did not receive HSTS header
-bvisible.be: could not connect to host
-bvv-europe.eu: could not connect to host
-bw81.xyz: could not connect to host
-bwashing.tk: could not connect to host
-bwe-seminare.de: did not receive HSTS header
-bwear4all.de: could not connect to host
-bwf11.com: could not connect to host
-bwf55.com: could not connect to host
-bwf6.com: could not connect to host
-bwf66.com: did not receive HSTS header
-bwf77.com: could not connect to host
-bwf99.com: could not connect to host
-bwin2288.com: could not connect to host
-bwin369.cc: could not connect to host
-bwin86.com: could not connect to host
-bwin8601.com: could not connect to host
-bwin8602.com: did not receive HSTS header
-bwin8603.com: could not connect to host
-bwin8604.com: did not receive HSTS header
-bwin8605.com: did not receive HSTS header
-bwin8606.com: did not receive HSTS header
-bwwb.nu: did not receive HSTS header
-bx-web.com: did not receive HSTS header
-bx49.cc: could not connect to host
-bxdev.me: did not receive HSTS header
-bxdj66.com: did not receive HSTS header
-bxegypt.com: could not connect to host
-by.cx: did not receive HSTS header
-by1896.com: could not connect to host
-by1898.com: could not connect to host
-by1899.com: did not receive HSTS header
-by4cqb.cn: could not connect to host
-by77.com: did not receive HSTS header
-by777.com: did not receive HSTS header
-bydisk.com: could not connect to host
-bye-bye.us: could not connect to host
-byemeds.ga: could not connect to host
-byfeldt.dk: could not connect to host
-byfhn.com: did not receive HSTS header
-byhe.me: could not connect to host
-byjamesrush.com: could not connect to host
-byji.com: could not connect to host
-byken.cn: could not connect to host
-bynet.cz: could not connect to host
-bypass.kr: could not connect to host
-bypassed.bid: could not connect to host
-bypassed.cc: could not connect to host
-bypassed.club: could not connect to host
-bypassed.date: could not connect to host
-bypassed.download: could not connect to host
-bypassed.faith: could not connect to host
-bypassed.host: could not connect to host
-bypassed.me: could not connect to host
-bypassed.online: could not connect to host
-bypassed.party: could not connect to host
-bypassed.press: could not connect to host
-bypassed.pw: could not connect to host
-bypassed.rocks: could not connect to host
-bypassed.site: could not connect to host
-bypassed.st: could not connect to host
-bypassed.today: could not connect to host
-bypassed.works: could not connect to host
-bypassed.world: could not connect to host
-bypro.xyz: could not connect to host
-byraje.com: did not receive HSTS header
-byrko.sk: could not connect to host
-byronprivaterehab.com.au: did not receive HSTS header
-byronr.com: could not connect to host
-bysgo.com: could not connect to host
-bystryj-zajm.tk: could not connect to host
-byte.chat: did not receive HSTS header
-byte.wtf: did not receive HSTS header
-bytecrafter.com: could not connect to host
-bytecrafter.net: could not connect to host
-bytenoc.nl: max-age too low: 0
-bytepark.de: did not receive HSTS header
-bytesatwork.eu: could not connect to host
-byteshift.ca: could not connect to host
-bytesofcode.de: could not connect to host
-bytesunlimited.com: did not receive HSTS header
-byteturtle.eu: did not receive HSTS header
-bythen.cn: did not receive HSTS header
-bytynazizkove.cz: did not receive HSTS header
-byurudraw.pics: could not connect to host
-bzhub.bid: could not connect to host
-bziaks.xyz: could not connect to host
-bztraveler.com: did not receive HSTS header
-bztraveler.net: did not receive HSTS header
-c-path.org: did not receive HSTS header
-c-rickroll-v.pw: could not connect to host
-c-rom.fr: did not receive HSTS header
-c0o.cc: did not receive HSTS header
-c0rn3j.com: could not connect to host
-c12discountonline.com: did not receive HSTS header
-c16t.uk: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-c1yd3i.me: could not connect to host
-c2m-staging.com: could not connect to host
-c2o-library.net: did not receive HSTS header
-c2o2.xyz: could not connect to host
-c3-compose.com: could not connect to host
-c3.pm: could not connect to host
-c376.site: could not connect to host
-c3b.info: could not connect to host
-c3bbs.com: could not connect to host
-c3hv.cn: could not connect to host
-c3ie.com: did not receive HSTS header
-c4.hk: could not connect to host
-c4wlabz.com: did not receive HSTS header
-c5197.co: could not connect to host
-c6729.co: could not connect to host
-c6729.com: did not receive HSTS header
-c6957.co: could not connect to host
-c6957.com: did not receive HSTS header
-c81365.com: did not receive HSTS header
-c82365.com: did not receive HSTS header
-c899365.com: could not connect to host
-c8ms113.com: did not receive HSTS header
-c9297.co: could not connect to host
-c9397.com: did not receive HSTS header
-c9721.com: did not receive HSTS header
-c9728.co: could not connect to host
-ca-terminal-multiservices.fr: could not connect to host
-cabalacoach.com: could not connect to host
-cabanactf.com: could not connect to host
-cabinet-bedin.com: did not receive HSTS header
-cablehighspeed.net: could not connect to host
-cabsites.com: could not connect to host
-cabusar.fr: could not connect to host
-cacd.eu: could not connect to host
-cachetagalong.com: did not receive HSTS header
-cachethome.com: could not connect to host
-cachethq.io: did not receive HSTS header
-cacn.pw: could not connect to host
-caconnect.org: could not connect to host
-cacr.pw: could not connect to host
-cadacoon.com: could not connect to host
-cadafamilia.de: could not connect to host
-cadao.me: did not receive HSTS header
-cadastroloteamento.com.br: could not connect to host
-cadburymovies.in.net: could not connect to host
-cadcreations.co.ke: could not connect to host
-cadeaujulia.tk: did not receive HSTS header
-cadenadg.gr: did not receive HSTS header
-caerostris.com: could not connect to host
-caerus.ws: did not receive HSTS header
-caesreon.com: could not connect to host
-cafe-murr.de: could not connect to host
-cafe-scientifique.org.ec: could not connect to host
-cafe-service.ru: could not connect to host
-cafechesscourt.com: could not connect to host
-cafeey.com: could not connect to host
-cafefresco.pe: did not receive HSTS header
-caferestor.com: did not receive HSTS header
-cafesdomundo.pt: did not receive HSTS header
-cafesg.net: did not receive HSTS header
-caffeinatedengineers.com: could not connect to host
-caglarcakici.com: could not connect to host
-caiben.org: could not connect to host
-caibi.io: could not connect to host
-caim.cz: did not receive HSTS header
-caipai.fm: could not connect to host
-caipao123.com: max-age too low: 0
-cairnterrier.com.br: could not connect to host
-cairuz.in: could not connect to host
-caitcs.com: could not connect to host
-caiwenjian.xyz: could not connect to host
-cajunuk.co.uk: could not connect to host
-cake-time.co.uk: could not connect to host
-cake.care: could not connect to host
-cakedesignsbyjaclyn.com: could not connect to host
-cal.goip.de: could not connect to host
-calatoruldigital.ro: did not receive HSTS header
-calcasieuparish.gov: did not receive HSTS header
-calcularpagerank.com.br: could not connect to host
-calculatoaresecondhand.xyz: could not connect to host
-caldaro.de: could not connect to host
-caldecotevillagehall.co.uk: could not connect to host
-caleb.host: could not connect to host
-calebennett.com: did not receive HSTS header
-calendriergratuit.fr: max-age too low: 300
-calentadores-solares-sunshine.com: did not receive HSTS header
-calgaryconstructionjobs.com: did not receive HSTS header
-calidadelectronica.com: could not connect to host
-calidoinvierno.com: could not connect to host
-calkinsmusic.com: did not receive HSTS header
-callabs.net: could not connect to host
-callanjg.co.uk: could not connect to host
-callantonia.com: could not connect to host
-calleveryday.com: could not connect to host
-callfunc.com: could not connect to host
-callidus-vulpes.de: could not connect to host
-callision.com: did not receive HSTS header
-callmereda.com: could not connect to host
-callsigns.ca: could not connect to host
-calltrackingreports.com: could not connect to host
-calluna.nl: max-age too low: 630
-calminteractive.fr: could not connect to host
-calories.org: could not connect to host
-caltonnutrition.com: did not receive HSTS header
-calypso-tour.net: could not connect to host
-calypsogames.net: could not connect to host
-calypsohost.net: did not receive HSTS header
-calyxengineers.com: could not connect to host
-camaya.net: did not receive HSTS header
-cambiemosjuegos.com: did not receive HSTS header
-cambiowatch.ch: could not connect to host
-cambridgeanalytica.net: could not connect to host
-cambridgeanalytica.org: could not connect to host
-camda.online: could not connect to host
-camdenboneandjoint.com: did not receive HSTS header
-camelforensics.com: could not connect to host
-camelliaflowers.com.au: could not connect to host
-camelservers.com: could not connect to host
-camera-news.com: did not receive HSTS header
-cameronthomson.racing: did not receive HSTS header
-cameroonlounge.com: did not receive HSTS header
-camisado.tk: could not connect to host
-camisadotorcedor.com.br: could not connect to host
-camjobs.net: could not connect to host
-cammarkets.com: could not connect to host
-camomile.desi: could not connect to host
-camp.co.uk: did not receive HSTS header
-campaign.gov.uk: did not receive HSTS header
-campaignagent.com.au: did not receive HSTS header
-campaignelves.com: could not connect to host
-campbellsoftware.co.uk: could not connect to host
-campbrainybunch.com: did not receive HSTS header
-campcanada.org: did not receive HSTS header
-campeoesdofutebol.com.br: did not receive HSTS header
-campeonatoalemao.com.br: could not connect to host
-campfire.co.il: could not connect to host
-campfourpaws.com: did not receive HSTS header
-campgesher.com: did not receive HSTS header
-camphub.co: could not connect to host
-camping-landes.com: did not receive HSTS header
-campingcarlovers.com: could not connect to host
-campingdreams.com: did not receive HSTS header
-campus-cybersecurity.team: did not receive HSTS header
-campusportalng.com: did not receive HSTS header
-camsanalytics.com: could not connect to host
-camzroofing.ca: could not connect to host
-canadalife.de: did not receive HSTS header
-canadian-nurse.com: did not receive HSTS header
-canadianchristianity.com: did not receive HSTS header
-canadiangamblingchoice.com: did not receive HSTS header
-canal-onanismo.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-canalsidehouse.be: did not receive HSTS header
-canalsidehouse.com: did not receive HSTS header
-canarianlegalalliance.com: did not receive HSTS header
-cancelmyprofile.com: did not receive HSTS header
-cancreate.nl: did not receive HSTS header
-candicontrols.com: did not receive HSTS header
-candlcastles.co.uk: could not connect to host
-candratech.com: could not connect to host
-candygirl.shop: could not connect to host
-candykidsentertainment.co.uk: did not receive HSTS header
-candylion.rocks: could not connect to host
-candyout.com: did not receive HSTS header
-canerkorkmaz.com: did not receive HSTS header
-canfield.gov: did not receive HSTS header
-cangelloplasticsurgery.com: did not receive HSTS header
-canicaprice.com: did not receive HSTS header
-canifis.net: did not receive HSTS header
-canlidoviz.com: did not receive HSTS header
-canmipai.com: could not connect to host
-cannarobotics.com: could not connect to host
-canoonic.se: could not connect to host
-canopy.ninja: could not connect to host
-canperclinicaveterinaria.com: could not connect to host
-cansworld.com: could not connect to host
-canterberry.cc: did not receive HSTS header
-cantinhodosossegosaojose.com.br: could not connect to host
-cantrack.com: did not receive HSTS header
-caodecristachines.com.br: could not connect to host
-caodesantohumberto.com.br: could not connect to host
-caoyu.info: did not receive HSTS header
-capacent.is: did not receive HSTS header
-capacitacionyautoempleo.com: could not connect to host
-capecycles.co.za: did not receive HSTS header
-capekeen.com: could not connect to host
-capellidipremoli.com: did not receive HSTS header
-capeyorkfire.com.au: could not connect to host
-capitalfps.com: did not receive HSTS header
-capitaltg.com: did not receive HSTS header
-capitaoalden.com: did not receive HSTS header
-capitein.tk: could not connect to host
-capogna.com: did not receive HSTS header
-capriccio.to: could not connect to host
-capsule.org: did not receive HSTS header
-capsulesubs.fr: could not connect to host
-captainsinn.com: did not receive HSTS header
-captalize.com: could not connect to host
-captchatheprize.com: could not connect to host
-captianseb.de: could not connect to host
-captivatedbytabrett.com: could not connect to host
-captivationscience.com: could not connect to host
-capturethepen.co.uk: could not connect to host
-caputo.com: could not connect to host
-car-insurance-quotes.biz: could not connect to host
-car-navi.ph: did not receive HSTS header
-car-rental24.com: could not connect to host
-car-shop.top: did not receive HSTS header
-car-speed.tk: did not receive HSTS header
-carano-service.de: could not connect to host
-caraudio69.cz: did not receive HSTS header
-carbonating.com: did not receive HSTS header
-carbonmade.com: did not receive HSTS header
-carbonmonoxidelawyer.net: could not connect to host
-carbonvision.cn: could not connect to host
-carck.co.uk: could not connect to host
-carck.uk: could not connect to host
-card-toka.jp: could not connect to host
-cardboard.cx: did not receive HSTS header
-cardelmar.com: did not receive HSTS header
-cardelmar.de: did not receive HSTS header
-cardelmar.es: did not receive HSTS header
-carding.team: did not receive HSTS header
-cardioc.ru: did not receive HSTS header
-cardloan-manual.net: could not connect to host
-cardozovargas.me: did not receive HSTS header
-cardstream.com: did not receive HSTS header
-cardurl.com: did not receive HSTS header
-cardwars.hu: could not connect to host
-care-spot.biz: could not connect to host
-care-spot.com: could not connect to host
-care-spot.info: could not connect to host
-care-spot.mobi: could not connect to host
-care-spot.net: could not connect to host
-care-spot.org: could not connect to host
-care-spot.us: could not connect to host
-careeraid.in: could not connect to host
-careerdirectionsltd.com: did not receive HSTS header
-careerpower.co.in: could not connect to host
-careers.plus: did not receive HSTS header
-careerstuds.com: did not receive HSTS header
-carefour.nl: did not receive HSTS header
-caregiverva.org: did not receive HSTS header
-careplasticsurgery.com: did not receive HSTS header
-carespot.biz: could not connect to host
-carespot.co: could not connect to host
-carespot.com: did not receive HSTS header
-carespot.mobi: could not connect to host
-carespot.net: could not connect to host
-carespot.org: could not connect to host
-carespot.us: could not connect to host
-carespotexpress.com: could not connect to host
-carespotexpresshealthcare.com: could not connect to host
-carespottravelmedicine.com: could not connect to host
-carespottravelmedicine.mobi: could not connect to host
-carespoturgentcare.com: could not connect to host
-carespoturgentcare.info: could not connect to host
-carespoturgentcare.net: could not connect to host
-carespoturgentcare.org: could not connect to host
-carespoturgentcare.us: could not connect to host
-carey.bio: did not receive HSTS header
-carey.li: did not receive HSTS header
-cargobay.net: could not connect to host
-cargoio.com: could not connect to host
-caribbeanarthritisfoundation.org: did not receive HSTS header
-carif-idf.net: could not connect to host
-carif-idf.org: could not connect to host
-carinsurance.es: could not connect to host
-cariocacooking.com: did not receive HSTS header
-carlandfaith.com: did not receive HSTS header
-carlislepassionplay.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-carlolly.co.uk: could not connect to host
-carlosalves.info: could not connect to host
-carloshmm.com: could not connect to host
-carloshmm.stream: could not connect to host
-carloshmoreira.com: could not connect to host
-carlosvelezmarketing.com: could not connect to host
-carlovanwyk.com: could not connect to host
-carlsbouncycastlesandhottubs.co.uk: did not receive HSTS header
-carlscatering.com: did not receive HSTS header
-carmelon-digital.com: did not receive HSTS header
-caroleblouin.ca: did not receive HSTS header
-caroli.biz: could not connect to host
-caroli.info: could not connect to host
-carolynjoyce.com.au: could not connect to host
-carparo.net: did not receive HSTS header
-carpliyz.com: could not connect to host
-carrando.de: did not receive HSTS header
-carredejardin.com: did not receive HSTS header
-carrentalsathens.com: max-age too low: 0
-carroarmato0.be: did not receive HSTS header
-carrolcountyohioelections.gov: could not connect to host
-carrollservicecompany.com: did not receive HSTS header
-carrolltontx.gov: could not connect to host
-carrosserie-dubois.com: did not receive HSTS header
-carrouselcompany.fr: could not connect to host
-carseatchecks.ca: could not connect to host
-carsforbackpackers.com: could not connect to host
-carsshop.tk: could not connect to host
-carsten.pw: did not receive HSTS header
-carstenfeuls.de: could not connect to host
-cartadeviajes.cl: did not receive HSTS header
-cartadeviajes.co: did not receive HSTS header
-cartadeviajes.com: did not receive HSTS header
-cartadeviajes.com.ar: did not receive HSTS header
-cartadeviajes.com.ve: did not receive HSTS header
-cartadeviajes.de: did not receive HSTS header
-cartadeviajes.ec: did not receive HSTS header
-cartadeviajes.es: did not receive HSTS header
-cartadeviajes.fr: did not receive HSTS header
-cartadeviajes.mx: did not receive HSTS header
-cartadeviajes.pe: did not receive HSTS header
-cartadeviajes.uk: did not receive HSTS header
-cartaodigi.com: could not connect to host
-cartelcircuit.com: did not receive HSTS header
-cartelloni.roma.it: could not connect to host
-carterorland.com: could not connect to host
-cartesunicef.be: did not receive HSTS header
-cartfilm.tk: did not receive HSTS header
-cartoonhd.cc: could not connect to host
-cartouche-deal.fr: did not receive HSTS header
-carun.us: did not receive HSTS header
-carwashvapeur.be: could not connect to host
-caryefurd.com: could not connect to host
-casa-su.casa: did not receive HSTS header
-casaanastasia.ro: did not receive HSTS header
-casacomcharme.com.br: could not connect to host
-casadellecose.com: could not connect to host
-casaessencias.com.br: could not connect to host
-casajardininsecticidas.com: did not receive HSTS header
-casalborgo.it: could not connect to host
-casalcrevillent.tk: could not connect to host
-casalinghedisperate.ga: could not connect to host
-casamorelli.com.br: did not receive HSTS header
-casashmodel.com: could not connect to host
-casashopp.com.br: could not connect to host
-casasparaperross.com: could not connect to host
-casasuleletrodomesticos.com.br: could not connect to host
-casburggraaf.com: did not receive HSTS header
-casedi.org: max-age too low: 0
-casefall.com: could not connect to host
-caseplus-daem.de: could not connect to host
-cash-pos.com: did not receive HSTS header
-cashbackcow.us: could not connect to host
-cashfortulsahouses.com: could not connect to host
-cashless.fr: did not receive HSTS header
-cashlink.de: did not receive HSTS header
-cashlink.io: did not receive HSTS header
-cashlogic.ch: could not connect to host
-cashmyphone.ch: could not connect to host
-cashsector.ga: could not connect to host
-casino-trio.com: could not connect to host
-casinobonuscodes.online: could not connect to host
-casinomegaslotos.com: did not receive HSTS header
-casinoonlinesicuri.com: did not receive HSTS header
-casinoreal.com: could not connect to host
-casinostest.com: could not connect to host
-casionova.org: could not connect to host
-casioshop.eu: did not receive HSTS header
-casirus.com: could not connect to host
-casjay.cloud: could not connect to host
-casjay.info: did not receive HSTS header
-casjay.us: could not connect to host
-casjaygames.com: could not connect to host
-casovi.cf: could not connect to host
-caspar.ai: did not receive HSTS header
-castagnonavocats.com: did not receive HSTS header
-castalie.tk: could not connect to host
-castellannenberg.com: could not connect to host
-castelodosmoveis.com.br: did not receive HSTS header
-casteloinformatica.com.br: could not connect to host
-castle.network: could not connect to host
-castlecms.io: did not receive HSTS header
-castlejackpot.com: did not receive HSTS header
-castlemail.io: did not receive HSTS header
-castleoblivion.tk: did not receive HSTS header
-castleparty.co.uk: did not receive HSTS header
-castles4rascalsiow.co.uk: could not connect to host
-casualgaming.no: max-age too low: 0
-casusgrillcaribbean.com: could not connect to host
-cat-blum.com: could not connect to host
-cat-box.de: max-age too low: 0
-cata.ga: could not connect to host
-catalin.pw: could not connect to host
-catalogoreina.com: did not receive HSTS header
-catalojic.tk: could not connect to host
-catarsisvr.com: could not connect to host
-catbox.moe: could not connect to host
-catburton.co.uk: did not receive HSTS header
-catchersgear.com: could not connect to host
-catchfotografie.nl: could not connect to host
-catcontent.cloud: could not connect to host
-catdecor.ru: could not connect to host
-catenariadiscos.com: did not receive HSTS header
-caterkids.com: could not connect to host
-catgirl.me: could not connect to host
-catgirl.pics: could not connect to host
-catharisme.net: could not connect to host
-catharisme.org: could not connect to host
-catherinescastles.co.uk: did not receive HSTS header
-cathiebrousse.com: did not receive HSTS header
-cathosting.org: could not connect to host
-catinmay.com: could not connect to host
-catnapstudios.com: could not connect to host
-catnmeow.com: could not connect to host
-catprog.org: did not receive HSTS header
-catsmagic.pp.ua: could not connect to host
-catuniverse.org: could not connect to host
-caulong-ao.net: could not connect to host
-causae-fincas.es: did not receive HSTS header
-causae.es: did not receive HSTS header
-cavaleria.ro: did not receive HSTS header
-cavalierkingcharlesspaniel.com.br: could not connect to host
-cave-reynard.ch: could not connect to host
-caveclan.org: did not receive HSTS header
-cavecreekaz.gov: did not receive HSTS header
-cavedevs.de: could not connect to host
-cavedroid.xyz: could not connect to host
-cavernadigital.net: did not receive HSTS header
-cavevinsdefrance.fr: did not receive HSTS header
-cayafashion.de: did not receive HSTS header
-cayounglab.co.jp: could not connect to host
-cbamo.org: did not receive HSTS header
-cbdcontact.eu: could not connect to host
-cbdcontact.pl: could not connect to host
-cbdev.de: could not connect to host
-cbdoilcures.co: could not connect to host
-cbhq.net: could not connect to host
-cbi-epa.gov: could not connect to host
-cbk-connect.com: could not connect to host
-cc-brantomois.fr: did not receive HSTS header
-cc2729.com: did not receive HSTS header
-cc5197.co: could not connect to host
-cc6729.co: could not connect to host
-cc6729.com: did not receive HSTS header
-cc6957.co: could not connect to host
-cc8833.cc: could not connect to host
-cc9297.co: could not connect to host
-cc9397.com: did not receive HSTS header
-cc9721.com: did not receive HSTS header
-cc9728.co: could not connect to host
-ccac.gov: max-age too low: 120
-ccattestprep.com: could not connect to host
-ccavenue.com: max-age too low: 0
-ccayearbook.com: could not connect to host
-ccblog.de: did not receive HSTS header
-ccgn.co: could not connect to host
-cchen.ga: could not connect to host
-ccja.ro: did not receive HSTS header
-ccretreatandfarm.com: did not receive HSTS header
-ccsource.org: could not connect to host
-ccss-cces.com: did not receive HSTS header
-ccsys.com: could not connect to host
-cctech.ph: could not connect to host
-cctld.com: did not receive HSTS header
-cctvcanada.net: could not connect to host
-ccu.io: could not connect to host
-ccuuu.com: could not connect to host
-ccv-deutschland.de: did not receive HSTS header
-ccv.ch: did not receive HSTS header
-ccv.eu: did not receive HSTS header
-ccv.nl: did not receive HSTS header
-cd0.us: could not connect to host
-cda-nw.co.uk: did not receive HSTS header
-cdc.cx: could not connect to host
-cdcpartners.gov: could not connect to host
-cdeck.net: could not connect to host
-cdemi.io: did not receive HSTS header
-cdgfrm.com: did not receive HSTS header
-cdireland.com: did not receive HSTS header
-cdlcenter.com: could not connect to host
-cdmhp.org.nz: could not connect to host
-cdmlb.net: could not connect to host
-cdmon.tech: could not connect to host
-cdn.sx.cn: could not connect to host
-cdnb.co: could not connect to host
-cdndepo.com: could not connect to host
-cdnk39.com: could not connect to host
-cdreporting.co.uk: did not receive HSTS header
-cdshh.club: did not receive HSTS header
-cdu-wilgersdorf.de: did not receive HSTS header
-cduckett.net: could not connect to host
-ce-tuifrance.com: could not connect to host
-ceagriproducts.com: did not receive HSTS header
-cecilga.gov: could not connect to host
-cecipu.gob.cl: could not connect to host
-ced-services.nl: could not connect to host
-ceditedv.com.pe: did not receive HSTS header
-cedric-bour.fr: did not receive HSTS header
-cee.io: could not connect to host
-cefak.org.br: did not receive HSTS header
-cegfw.com: could not connect to host
-ceilingpac.org: could not connect to host
-cekaja.com: did not receive HSTS header
-celcelulares.com: could not connect to host
-celebphotos.club: could not connect to host
-celeirorural.com.br: did not receive HSTS header
-celeraindustries.tk: did not receive HSTS header
-celigo.com: did not receive HSTS header
-celina-reads.de: could not connect to host
-cellsheet.me: could not connect to host
-cellsites.nz: could not connect to host
-celluliteorangeskin.com: could not connect to host
-celluliteremovaldiet.com: could not connect to host
-celuliteonline.com: could not connect to host
-cem.pw: did not receive HSTS header
-cemeteriat.com: did not receive HSTS header
-cencalvia.org: could not connect to host
-centa-am.com: did not receive HSTS header
-centillien.com: did not receive HSTS header
-centision.com: did not receive HSTS header
-central4.me: could not connect to host
-centralbank.ae: max-age too low: 0
-centralcountiesservices.org: did not receive HSTS header
-centralfor.me: could not connect to host
-centrallead.net: could not connect to host
-centrallotus.com: did not receive HSTS header
-centralmarket.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-centralvacsunlimited.net: could not connect to host
-centralvoice.org: could not connect to host
-centralync.com: could not connect to host
-centre-momboye.fr: did not receive HSTS header
-centrepoint-community.com: could not connect to host
-centretownshipin.gov: did not receive HSTS header
-centricagency.co.uk: could not connect to host
-centrodoinstalador.com.br: could not connect to host
-centroecuestrecastellar.com: could not connect to host
-centromasterin.com: could not connect to host
-centrym.top: could not connect to host
-centsforchange.net: could not connect to host
-centsi.io: could not connect to host
-centurion-consulting-cie.eu: could not connect to host
-centurion-consulting.eu: could not connect to host
-century-group.com: max-age too low: 2592000
-ceoimon.com: did not receive HSTS header
-ceoptique.com: did not receive HSTS header
-ceramica.roma.it: could not connect to host
-ceramiche.roma.it: could not connect to host
-cercevelet.com: did not receive HSTS header
-cerebelo.info: could not connect to host
-ceredowv.gov: did not receive HSTS header
-ceres1.space: did not receive HSTS header
-ceresia.ch: could not connect to host
-ceritamalam.net: could not connect to host
-cerize.love: could not connect to host
-cernakova.eu: could not connect to host
-cernega.ro: did not receive HSTS header
-cerpa.com.br: did not receive HSTS header
-cerrajeriaamericadelquindio.com: could not connect to host
-cerrajeriaenvillavicencio.com: could not connect to host
-cerstve-korenie.sk: did not receive HSTS header
-cerstvekorenie.sk: did not receive HSTS header
-cert.or.id: did not receive HSTS header
-cert.se: max-age too low: 2628001
-certcenter.fr: did not receive HSTS header
-certifi.io: max-age too low: 0
-certificatespending.com: could not connect to host
-certifiedfieldassociate.com: could not connect to host
-certly.io: did not receive HSTS header
-certmgr.org: could not connect to host
-certmonitor.com.au: did not receive HSTS header
-certmonitor.net: did not receive HSTS header
-ceruleanmainbeach.com.au: did not receive HSTS header
-cesal.net: could not connect to host
-cesantias.co: did not receive HSTS header
-cesboard.com: could not connect to host
-cesidianroot.eu: could not connect to host
-cesium.ml: could not connect to host
-ceskaexpedice.co.uk: could not connect to host
-cespri.com.pe: did not receive HSTS header
-cestunmetier.ch: could not connect to host
-ceta.one: could not connect to host
-cetangarana.com: did not receive HSTS header
-cevrimici.com: could not connect to host
-ceyizlikelisleri.com: did not receive HSTS header
-ceylavi.tech: did not receive HSTS header
-cf-tm.net: could not connect to host
-cf11.de: did not receive HSTS header
-cfa.gov: could not connect to host
-cfcnexus.org: could not connect to host
-cfcproperties.com: did not receive HSTS header
-cfetengineering.com: could not connect to host
-cfneia.org: did not receive HSTS header
-cfoitplaybook.com: could not connect to host
-cfurl.cf: could not connect to host
-cgan.pw: could not connect to host
-cganx.org: could not connect to host
-cgbilling.com: did not receive HSTS header
-cgerstner.eu: did not receive HSTS header
-cglib.xyz: could not connect to host
-cgminc.net: could not connect to host
-cgsshelper.tk: could not connect to host
-cgtx.us: could not connect to host
-ch-sc.de: did not receive HSTS header
-chabaojia.com: could not connect to host
-chadklass.com: could not connect to host
-chadtaljaardt.com: could not connect to host
-chahub.com: could not connect to host
-chainedunion.info: could not connect to host
-chainmonitor.com: could not connect to host
-chairinstitute.com: did not receive HSTS header
-chaitanyapandit.com: did not receive HSTS header
-chaizhikang.com: could not connect to host
-chaldeen.pro: did not receive HSTS header
-chalker.io: did not receive HSTS header
-challengeclothing.com.br: could not connect to host
-challengeskins.com: could not connect to host
-challstrom.com: could not connect to host
-chamathellawala.com: did not receive HSTS header
-chameleon-ents.co.uk: could not connect to host
-chamicro.com: could not connect to host
-chamilo.org: did not receive HSTS header
-champ.dog: did not receive HSTS header
-championnat-romand-cuisiniers-amateurs.ch: could not connect to host
-championsofregnum.com: did not receive HSTS header
-chancat.blog: could not connect to host
-chancekorte.org: could not connect to host
-chanddriving.co.uk: could not connect to host
-chandlerredding.com: could not connect to host
-chandr1000.ga: could not connect to host
-chang-feng.info: could not connect to host
-changecopyright.ru: did not receive HSTS header
-changethislater.com: could not connect to host
-changetip.com: could not connect to host
-channeladam.com: did not receive HSTS header
-channelcards.com: did not receive HSTS header
-channellife.asia: did not receive HSTS header
-channyc.com: could not connect to host
-chanoyu-gakkai.jp: did not receive HSTS header
-chanuwah.com: did not receive HSTS header
-chaos-inc.de: did not receive HSTS header
-chaos.fail: could not connect to host
-chaoslab.org: did not receive HSTS header
-chaosriftgames.com: did not receive HSTS header
-chaotichive.com: could not connect to host
-chaoticlaw.com: did not receive HSTS header
-chapelaria.tf: could not connect to host
-chapstick.life: could not connect to host
-charakato.com: could not connect to host
-chardhamhotel.com: did not receive HSTS header
-chardik.tk: could not connect to host
-chargedmonkey.com: did not receive HSTS header
-chargejuice.com: could not connect to host
-chargersdirect.com.au: did not receive HSTS header
-charissadescande.com: did not receive HSTS header
-charityclear.com: did not receive HSTS header
-charitystreet.co.uk: did not receive HSTS header
-charl.eu: could not connect to host
-charlenevondell.com: could not connect to host
-charlesjay.com: did not receive HSTS header
-charlesmilette.net: could not connect to host
-charlesstover.com: did not receive HSTS header
-charlestonsecuritysystems.net: did not receive HSTS header
-charliemcneive.com: could not connect to host
-charlimarie.com: did not receive HSTS header
-charlipopkids.com.au: did not receive HSTS header
-charlotte-touati.ch: could not connect to host
-charlottecountyva.gov: could not connect to host
-charmcitytech.com: did not receive HSTS header
-charonsecurity.com: could not connect to host
-charp.eu: could not connect to host
-charr.xyz: could not connect to host
-chars.ga: could not connect to host
-chartsheets.com: could not connect to host
-chartstoffarm.de: did not receive HSTS header
-chartwellestate.com: did not receive HSTS header
-chaseandzoey.de: could not connect to host
-chaseganey.com: did not receive HSTS header
-chasing-coins.com: did not receive HSTS header
-chaska.co.za: could not connect to host
-chasse-et-plaisir.com: did not receive HSTS header
-chat-libera.org: did not receive HSTS header
-chat-love.org: could not connect to host
-chat-senza-registrazione.net: did not receive HSTS header
-chat2.cf: could not connect to host
-chat36.ga: could not connect to host
-chat40.net: did not receive HSTS header
-chatbot.me: did not receive HSTS header
-chatbot.one: could not connect to host
-chatbotclic.com: could not connect to host
-chatbotclick.com: could not connect to host
-chatbots.email: could not connect to host
-chatbots.systems: could not connect to host
-chatear.social: did not receive HSTS header
-chateau-belvoir.com: could not connect to host
-chateauconstellation.ch: did not receive HSTS header
-chateaudevaugrigneuse.com: did not receive HSTS header
-chateroids.com: could not connect to host
-chatfacile.org: did not receive HSTS header
-chatint.com: could not connect to host
-chatitaly.org: did not receive HSTS header
-chatme.im: could not connect to host
-chatnbook.com: did not receive HSTS header
-chatt-gratis.net: did not receive HSTS header
-chatt-gratis.org: did not receive HSTS header
-chatup.cf: did not receive HSTS header
-chatxsingle.net: did not receive HSTS header
-chatxtutti.com: did not receive HSTS header
-chaulootz.com: could not connect to host
-chaverde.org: could not connect to host
-chaz6.com: did not receive HSTS header
-chazay.net: could not connect to host
-chazgie.se: could not connect to host
-chbk.co: did not receive HSTS header
-chc9912.com: max-age too low: 0
-chcemvediet.sk: max-age too low: 1555200
-chci-web.cz: max-age too low: 0
-chdgaming.xyz: could not connect to host
-cheah.xyz: did not receive HSTS header
-cheapalarmparts.com.au: did not receive HSTS header
-cheapautoinsuranceblog.com: could not connect to host
-cheapdns.org: could not connect to host
-cheapestgamecards.be: could not connect to host
-cheapestgamecards.de: could not connect to host
-cheapestgamecards.fi: could not connect to host
-cheapestgamecards.fr: could not connect to host
-cheapestgamecards.nl: could not connect to host
-cheapestgamecards.no: could not connect to host
-cheapestgamecards.se: could not connect to host
-cheapmedrol.ga: could not connect to host
-cheapnhljerseys.cc: max-age too low: 0
-cheapsharedhost.com: did not receive HSTS header
-cheapsharedhost.org: did not receive HSTS header
-cheapssl.com.tr: did not receive HSTS header
-cheazey.co: did not receive HSTS header
-chebedara.com: could not connect to host
-chebwebb.com: could not connect to host
-checalaweb.com: could not connect to host
-checkhost.org: could not connect to host
-checkjelinkje.nl: did not receive HSTS header
-checkmateshoes.com: did not receive HSTS header
-checkmyessays.com: did not receive HSTS header
-checkmypsoriasis.com: could not connect to host
-checkout.google.com: could not connect to host (error ignored - included regardless)
-checkpoint.com: did not receive HSTS header
-checkras.tk: could not connect to host
-checkrente.nl: could not connect to host
-checktechnology.com.au: could not connect to host
-checkyourmeds.com: did not receive HSTS header
-checookies.com: could not connect to host
-cheekylittlerascals.co.uk: could not connect to host
-cheerflow.com: could not connect to host
-cheesefusion.com: could not connect to host
-cheesehosting.net: did not receive HSTS header
-cheesetart.my: could not connect to host
-cheesypicsbooths.co.uk: could not connect to host
-cheetah85.de: could not connect to host
-cheez.systems: could not connect to host
-chefgalles.com.br: could not connect to host
-chefwear.com: did not receive HSTS header
-chejianer.cn: could not connect to host
-chelema.xyz: could not connect to host
-chellame.com: could not connect to host
-chellame.fr: could not connect to host
-chelpipe.ru: did not receive HSTS header
-cheltenhambounce.co.uk: could not connect to host
-chemicalcrux.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-chemicalguys-ruhrpott.de: could not connect to host
-chen22311.com: max-age too low: 0
-chenfengyi.com: could not connect to host
-chengarda.com: could not connect to host
-chenghao360.top: could not connect to host
-chengtongled.com: could not connect to host
-chenkun.pro: could not connect to host
-chenpei.org: could not connect to host
-chensir.net: could not connect to host
-chenx221.ml: could not connect to host
-chenx221.xyz: could not connect to host
-cheolguso.com: did not receive HSTS header
-chepaofen.com: did not receive HSTS header
-cherekerry.com: could not connect to host
-cherevoiture.com: could not connect to host
-chernevclima.bg: did not receive HSTS header
-cherrydropscandycarts.co.uk: could not connect to host
-cherylsoleway.com: did not receive HSTS header
-chesscoders.com: did not receive HSTS header
-chessreporter.nl: did not receive HSTS header
-chesterbrass.uk: did not receive HSTS header
-chesterman.tk: could not connect to host
-chestnut.cf: could not connect to host
-chez-janine.de: could not connect to host
-chez.moe: could not connect to host
-chiamata-aiuto.ch: could not connect to host
-chiaraiuola.com: could not connect to host
-chiaramail.com: could not connect to host
-chib.chat: could not connect to host
-chicagenial.com: did not receive HSTS header
-chicagostudentactivists.org: could not connect to host
-chicguay.com: did not receive HSTS header
-chicorycom.net: did not receive HSTS header
-chihiro.xyz: did not receive HSTS header
-chijb.cc: could not connect to host
-chijiokeindustries.co.uk: could not connect to host
-chikan-beacon.net: could not connect to host
-chikatomo-ryugaku.com: did not receive HSTS header
-chikory.com: could not connect to host
-chiksfashion.com: did not receive HSTS header
-childcaresolutionscny.org: did not receive HSTS header
-childrendeservebetter.org: could not connect to host
-childrenspartiesrus.com: could not connect to host
-childwelfare.gov: did not receive HSTS header
-chilimathwords.com: could not connect to host
-chillebever.nl: could not connect to host
-chilli943.info: did not receive HSTS header
-chimparoo.ca: did not receive HSTS header
-china-dhl.org: could not connect to host
-china-line.org: could not connect to host
-chinacdn.org: could not connect to host
-chinastory.tk: could not connect to host
-chinatrademarkoffice.com: did not receive HSTS header
-chinawhale.com: could not connect to host
-chinookwebdesign.ca: could not connect to host
-chint.ai: could not connect to host
-chinternet.xyz: could not connect to host
-chipglobe.com: did not receive HSTS header
-chiphell.com: did not receive HSTS header
-chips-scheduler.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-chirgui.eu: could not connect to host
-chiropracticwpb.com: could not connect to host
-chispita.tk: could not connect to host
-chitinfo.tk: could not connect to host
-chloca.jp: could not connect to host
-chloe.re: could not connect to host
-chloeallison.co.uk: could not connect to host
-chloehorler.com: could not connect to host
-chlouis.net: could not connect to host
-chm.vn: did not receive HSTS header
-chmc.ml: could not connect to host
-chmurakotori.ml: could not connect to host
-choc-o-lush.co.uk: could not connect to host
-chocamekong.com: did not receive HSTS header
-chocolate13tilias.com.br: did not receive HSTS header
-chocotough.nl: did not receive HSTS header
-chodobien.com: could not connect to host
-chodocu.com: did not receive HSTS header
-choe.fi: could not connect to host
-choiceautoloan.com: could not connect to host
-choiralberta.ca: did not receive HSTS header
-choisirmonerp.com: could not connect to host
-chokladfantasi.net: could not connect to host
-chollima.pro: could not connect to host
-chon.io: did not receive HSTS header
-chonghe.org: could not connect to host
-chontalpa.pw: could not connect to host
-choootto.club: could not connect to host
-chopperforums.com: could not connect to host
-chordso.com: could not connect to host
-chorkley.co.uk: could not connect to host
-chorkley.com: could not connect to host
-chorkley.me: could not connect to host
-chorkley.uk: could not connect to host
-chorleiterverband.de: did not receive HSTS header
-choruscrowd.com: could not connect to host
-chotlo.com: did not receive HSTS header
-chotu.net: could not connect to host
-chowii.com: could not connect to host
-chr0me.sh: could not connect to host
-chris-web.info: could not connect to host
-chrisandsarahinasia.com: did not receive HSTS header
-chrisb.me: did not receive HSTS header
-chrisb.xyz: did not receive HSTS header
-chrisbrakebill.com: did not receive HSTS header
-chrisbrown.id.au: could not connect to host
-chriscowley.me.uk: did not receive HSTS header
-chrisebert.net: could not connect to host
-chrisfaber.com: could not connect to host
-chrisjean.com: did not receive HSTS header
-chriskirchner.de: did not receive HSTS header
-chriskyrouac.com: could not connect to host
-chrisluen.com: did not receive HSTS header
-chrisopperwall.com: could not connect to host
-chrisself.xyz: could not connect to host
-chrissx.ga: could not connect to host
-christadelphiananswers.org: did not receive HSTS header
-christchurchbouncycastles.co.uk: could not connect to host
-christerwaren.fi: did not receive HSTS header
-christiaandruif.nl: could not connect to host
-christian-krug.website: could not connect to host
-christianbro.gq: could not connect to host
-christianhoffmann.info: did not receive HSTS header
-christianhospitaltank.org: did not receive HSTS header
-christianjens.com: could not connect to host
-christianpeltier.com: did not receive HSTS header
-christianpilgrimage.com.au: did not receive HSTS header
-christiansayswords.com: could not connect to host
-christianscholz.eu: did not receive HSTS header
-christielepage.com: did not receive HSTS header
-christina-quast.de: did not receive HSTS header
-christophebarbezat.ch: could not connect to host
-christophercolumbusfoundation.gov: could not connect to host
-christopherl.com: did not receive HSTS header
-christopherpritchard.co.uk: did not receive HSTS header
-christophersole.com: could not connect to host
-christophheich.me: did not receive HSTS header
-christophkreileder.com: could not connect to host
-christwaycounseling.com: did not receive HSTS header
-chrisupjohn.com: could not connect to host
-chrisupjohn.xyz: could not connect to host
-chrisvannooten.tk: could not connect to host
-chrisvicmall.com: did not receive HSTS header
-chriswbarry.com: did not receive HSTS header
-chrixonline.tk: could not connect to host
-chromaryu.net: could not connect to host
-chrome: could not connect to host
-chrome-devtools-frontend.appspot.com: did not receive HSTS header (error ignored - included regardless)
-chrome.google.com: did not receive HSTS header (error ignored - included regardless)
-chromereporting-pa.googleapis.com: did not receive HSTS header (error ignored - included regardless)
-chromeworld.ru: did not receive HSTS header
-chromiumbugs.appspot.com: did not receive HSTS header (error ignored - included regardless)
-chronic101.xyz: could not connect to host
-chrono-ski-aravis.fr: did not receive HSTS header
-chronogram.me: could not connect to host
-chronoproject.com: did not receive HSTS header
-chrst.ph: could not connect to host
-chs.us: max-age too low: 0
-chsh.moe: could not connect to host
-chua.cf: could not connect to host
-chua.family: did not receive HSTS header
-chuckame.fr: did not receive HSTS header
-chulado.com: did not receive HSTS header
-chundelac.com: could not connect to host
-churchlinkpro.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-churchux.co: could not connect to host
-churrasqueirafacil.com.br: could not connect to host
-chuvashia.tk: did not receive HSTS header
-chxdf.net: could not connect to host
-chybeck.net: did not receive HSTS header
-ci5.me: could not connect to host
-ciania.pl: could not connect to host
-cianmawhinney.xyz: could not connect to host
-ciansc.com: could not connect to host
-ciaracode.com: did not receive HSTS header
-cica.es: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-ciclista.roma.it: could not connect to host
-cidadedopoker.com.br: did not receive HSTS header
-cidr.ml: could not connect to host
-ciel.pro: could not connect to host
-cienbeaute-lidl.fr: did not receive HSTS header
-cienciasempresariais.pt: could not connect to host
-ciftlikesintisi.com: could not connect to host
-cigarblogs.net: could not connect to host
-cigi.site: could not connect to host
-ciiex.co: did not receive HSTS header
-ciliberto.org: did not receive HSTS header
-ciliwang.live: could not connect to host
-ciliwang.org: could not connect to host
-cim2b.de: could not connect to host
-cimala5bta.com: did not receive HSTS header
-cimalando.eu: could not connect to host
-cinartelorgu.com: did not receive HSTS header
-cinay.pw: could not connect to host
-cindey.io: could not connect to host
-cinefilia.tk: did not receive HSTS header
-cinefun.net: could not connect to host
-cinelite.club: could not connect to host
-cinema5.ru: did not receive HSTS header
-cinemaclub.co: could not connect to host
-cinemadoma.tk: did not receive HSTS header
-ciner.is: could not connect to host
-cinerama.com.br: could not connect to host
-cinicloud.com: did not receive HSTS header
-cinq-elements.fr: could not connect to host
-cinq-elements.net: could not connect to host
-cintdirect.com: could not connect to host
-cinteo.com: could not connect to host
-cio.guide: did not receive HSTS header
-cioconference.co.nz: could not connect to host
-cip.md: did not receive HSTS header
-cipher.co.th: did not receive HSTS header
-cipher.land: could not connect to host
-ciplanutrition.com: could not connect to host
-cipriano.nl: did not receive HSTS header
-cira.email: could not connect to host
-circ-logic.com: did not receive HSTS header
-circlebox.rocks: could not connect to host
-circlepluscircle.me: could not connect to host
-circuitcityelectricaladelaide.com.au: could not connect to host
-circule.cc: could not connect to host
-cirfi.com: could not connect to host
-cirope.com: did not receive HSTS header
-cirrohost.com: did not receive HSTS header
-cirugiasplasticas.com.mx: did not receive HSTS header
-cirujanooral.com: could not connect to host
-cirurgicasalutar.com.br: could not connect to host
-ciscohomeanalytics.com: could not connect to host
-ciscommerce.net: could not connect to host
-citadelnet.works: did not receive HSTS header
-citationgurus.com: could not connect to host
-citiagent.cz: could not connect to host
-citizen-cam.de: did not receive HSTS header
-citizenslasvegas.com: could not connect to host
-citizenspact.eu: did not receive HSTS header
-citra-emu.org: did not receive HSTS header
-citroner.blog: did not receive HSTS header
-city-adm.lviv.ua: did not receive HSTS header
-city-forums.ml: could not connect to host
-citya.com: did not receive HSTS header
-citybusexpress.com: could not connect to host
-cityofarcolatx.gov: could not connect to host
-cityofeastpointemi.gov: could not connect to host
-cityoflaurel.org: max-age too low: 0
-cityofmadera.gov: did not receive HSTS header
-cityofwadley-ga.gov: did not receive HSTS header
-cityofwoodward-ok.gov: did not receive HSTS header
-citywalkr.com: could not connect to host
-ciubotaru.tk: could not connect to host
-ciuciucadou.ro: could not connect to host
-ciudadanosbo.com: did not receive HSTS header
-cium.ru: could not connect to host
-ciurcasdan.eu: did not receive HSTS header
-civicunicorn.com: could not connect to host
-civicunicorn.us: could not connect to host
-cixiaoya.space: could not connect to host
-cixiaoya1.xyz: could not connect to host
-cixiaoya2.xyz: could not connect to host
-cjcaron.org: could not connect to host
-cjessett.com: max-age too low: 0
-cjs8866.cc: could not connect to host
-cjtkfan.club: could not connect to host
-ck1020.cc: could not connect to host
-ckgr.me: could not connect to host
-ckrubble.co.za: did not receive HSTS header
-cl0ud.space: could not connect to host
-clacetandil.com.ar: could not connect to host
-clad.cf: could not connect to host
-claibornecountytn.gov: did not receive HSTS header
-claimit.ml: could not connect to host
-clamofon.com: did not receive HSTS header
-clan-ww.com: could not connect to host
-clangwarnings.com: could not connect to host
-clanthor.com: did not receive HSTS header
-clapping-rhymes.com: could not connect to host
-clara-baumert.de: could not connect to host
-claraism.com: did not receive HSTS header
-claralabs.com: did not receive HSTS header
-claretandbanter.uk: did not receive HSTS header
-clarity-c2ced.appspot.com: did not receive HSTS header
-claritysrv.com: could not connect to host
-clarkeaward.com: did not receive HSTS header
-clarksburgma.gov: did not receive HSTS header
-clarksgaragedoorrepair.com: did not receive HSTS header
-clarkwifi.com: did not receive HSTS header
-clashersrepublic.com: could not connect to host
-classical-guitar-school.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-classiccutstupelo.com: could not connect to host
-classicday.nl: could not connect to host
-classicsandexotics.com: could not connect to host
-classicshop.ua: did not receive HSTS header
-classicspublishing.com: could not connect to host
-classifiedssa.co.za: could not connect to host
-claude.tech: could not connect to host
-claudearpel.fr: did not receive HSTS header
-claudio4.com: did not receive HSTS header
-clayelections.gov: could not connect to host
-claytoncondon.com: could not connect to host
-claytonstowing.com.au: did not receive HSTS header
-clcleaningco.com: could not connect to host
-cldfile.com: could not connect to host
-cleanbeautymarket.com.au: did not receive HSTS header
-cleancode.club: could not connect to host
-cleanexperts.co.uk: could not connect to host
-cleanfiles.us: could not connect to host
-cleaningbyrosie.com: did not receive HSTS header
-cleanmta.com: could not connect to host
-cleansewellness.com: could not connect to host
-cleanstar.org: could not connect to host
-clear.ml: could not connect to host
-clearc.tk: could not connect to host
-clearchaos.net: did not receive HSTS header
-clearchatsandbox.com: could not connect to host
-clearer.cloud: could not connect to host
-clearsettle-admin.com: did not receive HSTS header
-clearsky.me: did not receive HSTS header
-clearspringhealthcare.com: did not receive HSTS header
-clearviewwealthprojector.com.au: could not connect to host
-clementfevrier.fr: could not connect to host
-clemovementlaw.com: could not connect to host
-clerkendweller.uk: could not connect to host
-clevelandokla.com: could not connect to host
-cleververmarkten.com: could not connect to host
-cleververmarkten.de: could not connect to host
-clic-et-site.com: could not connect to host
-clic-music.com: could not connect to host
-clicecompre.com.br: could not connect to host
-clich.cn: did not receive HSTS header
-click-2-order.co.uk: did not receive HSTS header
-click4web.com: did not receive HSTS header
-clickandgo.com: did not receive HSTS header
-clickandshoot.nl: could not connect to host
-clickclock.cc: could not connect to host
-clickforclever.com: did not receive HSTS header
-clickforum.cf: could not connect to host
-clickgram.biz: could not connect to host
-clickomobile.com: did not receive HSTS header
-clickphish.com: did not receive HSTS header
-clickphobia.ga: could not connect to host
-clicks.co.za: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-clicktenisdemesa.com.br: did not receive HSTS header
-clicn.bio: could not connect to host
-clicnbio.com: did not receive HSTS header
-cliftons.com: did not receive HSTS header
-cliksource.com: did not receive HSTS header
-climaencusco.com: could not connect to host
-climaticarus.ru: did not receive HSTS header
-climed.com.tr: did not receive HSTS header
-clinchcountyga.gov: did not receive HSTS header
-clingout.com: could not connect to host
-clinia.ca: did not receive HSTS header
-clinicaferrusbratos.com: did not receive HSTS header
-clinicasilos.com: did not receive HSTS header
-cliniquecomplementaire.com: could not connect to host
-clintonbloodworth.com: could not connect to host
-clintonbloodworth.io: could not connect to host
-clintonplasticsurgery.com: did not receive HSTS header
-clintwilson.technology: max-age too low: 2592000
-clio-dev.com: could not connect to host
-clipped4u.com: could not connect to host
-clipperses.tk: could not connect to host
-clite.ru: did not receive HSTS header
-clnet.com.au: could not connect to host
-cloaked.ch: could not connect to host
-clochix.net: could not connect to host
-clod-hacking.com: did not receive HSTS header
-cloghercastles.co.uk: could not connect to host
-clojurescript.ru: could not connect to host
-cloppenburg-autmobil.com: could not connect to host
-cloppenburg-automobil.com: could not connect to host
-clorik.com: could not connect to host
-closient.com: could not connect to host
-closingholding.com: could not connect to host
-cloturea.fr: did not receive HSTS header
-cloud-crowd.com.au: could not connect to host
-cloud-project.com: could not connect to host
-cloud.wtf: could not connect to host
-cloud2go.de: did not receive HSTS header
-cloud58.org: could not connect to host
-cloudalice.com: could not connect to host
-cloudalice.net: could not connect to host
-cloudapi.vc: could not connect to host
-cloudbased.info: could not connect to host
-cloudbasedsite.com: did not receive HSTS header
-cloudberlin.goip.de: could not connect to host
-cloudbleed.info: could not connect to host
-cloudbreaker.de: could not connect to host
-cloudchart.site: could not connect to host
-cloudconsulting.net.za: did not receive HSTS header
-cloudconsulting.org.za: did not receive HSTS header
-cloudconsulting.web.za: did not receive HSTS header
-cloudcy.net: could not connect to host
-clouddesktop.co.nz: could not connect to host
-cloudfren.com: could not connect to host
-cloudimag.es: could not connect to host
-cloudimproved.com: could not connect to host
-cloudimprovedtest.com: could not connect to host
-cloudkit.pro: did not receive HSTS header
-cloudland.club: could not connect to host
-cloudlink.club: could not connect to host
-cloudmigrator365.com: could not connect to host
-cloudns.com.au: did not receive HSTS header
-cloudopt.net: did not receive HSTS header
-cloudpagesforwork.com: could not connect to host
-cloudpebble.net: did not receive HSTS header
-clouds.webcam: could not connect to host
-cloudsec.tk: could not connect to host
-cloudsecurityalliance.com: could not connect to host
-cloudsecurityalliance.net: could not connect to host
-cloudsecuritycongress.net: could not connect to host
-cloudsharp.io: could not connect to host
-cloudsocial.io: did not receive HSTS header
-cloudspeedy.net: could not connect to host
-cloudspotterapp.com: did not receive HSTS header
-cloudsprt.com: did not receive HSTS header
-cloudstoragemaus.com: could not connect to host
-cloudstorm.me: could not connect to host
-cloudstrike.co: could not connect to host
-cloudteam.de: could not connect to host
-cloudtskr.com: could not connect to host
-cloudwalk.io: did not receive HSTS header
-cloudwallce.com: could not connect to host
-cloudwarez.xyz: could not connect to host
-cloudwellmarketing.com: could not connect to host
-cloudwise.nl: did not receive HSTS header
-clounix.online: could not connect to host
-clovissantos.com: could not connect to host
-clowde.in: could not connect to host
-clownaroundbouncycastles.co.uk: could not connect to host
-clownish.co.il: could not connect to host
-clr3.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-clsimplex.com: did not receive HSTS header
-club-corsicana.de: did not receive HSTS header
-club-is.ru: did not receive HSTS header
-club-reduc.com: did not receive HSTS header
-clubcall.com: did not receive HSTS header
-clubdeslecteurs.net: could not connect to host
-clubedalutashop.com: did not receive HSTS header
-clubiconkenosha.com: did not receive HSTS header
-clubmate.rocks: could not connect to host
-clubmix.co.kr: could not connect to host
-clubscannan.ie: did not receive HSTS header
-cluj.apartments: could not connect to host
-cluj.help: could not connect to host
-clush.pw: could not connect to host
-cluster.id: could not connect to host
-clusteranalyse.net: could not connect to host
-clustermaze.net: could not connect to host
-clvrwebdesign.com: could not connect to host
-clvs7.com: did not receive HSTS header
-clweb.ch: did not receive HSTS header
-clycat.ru: could not connect to host
-clywedogmaths.co.uk: could not connect to host
-cm.center: could not connect to host
-cm3.pw: could not connect to host
-cmahy.be: did not receive HSTS header
-cmangos.net: did not receive HSTS header
-cmc-versand.de: could not connect to host
-cmcc.network: could not connect to host
-cmcelectrical.com: did not receive HSTS header
-cmci.dk: could not connect to host
-cmdtelecom.net.br: could not connect to host
-cmf.qc.ca: could not connect to host
-cmftech.com: could not connect to host
-cmitao.com: could not connect to host
-cmov-plongeurs.fr: did not receive HSTS header
-cmoycontracts.com: could not connect to host
-cmpr.es: could not connect to host
-cmrss.com: could not connect to host
-cms-weble.jp: could not connect to host
-cmsbattle.com: could not connect to host
-cmscafe.ru: did not receive HSTS header
-cmserviscz.cz: did not receive HSTS header
-cmskh.co.uk: could not connect to host
-cmso-cal.com: could not connect to host
-cmusical.es: could not connect to host
-cmweller.com: could not connect to host
-cna-aiic.ca: did not receive HSTS header
-cnam.net: did not receive HSTS header
-cnaprograms.online: could not connect to host
-cnatraining.network: could not connect to host
-cncmachinemetal.com: did not receive HSTS header
-cncn.link: could not connect to host
-cncn.us: did not receive HSTS header
-cnet-hosting.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-cnetw.xyz: could not connect to host
-cnlau.com: could not connect to host
-cnlic.com: could not connect to host
-cnnet.fun: could not connect to host
-cnnet.in: could not connect to host
-cnrd.me: did not receive HSTS header
-cnsyear.com: did not receive HSTS header
-cnwarn.com: could not connect to host
-cnxy.eu.org: could not connect to host
-co-driversphoto.se: did not receive HSTS header
-co-factor.ro: did not receive HSTS header
-co-yutaka.com: could not connect to host
-coach-sportif.paris: could not connect to host
-coachapp-ipass.herokuapp.com: could not connect to host
-coachingconsultancy.com: did not receive HSTS header
-coam.co: could not connect to host
-coatl-industries.com: could not connect to host
-cobaltlp.com: did not receive HSTS header
-cobcode.com: could not connect to host
-cobrax.net: did not receive HSTS header
-cocaine-import.agency: could not connect to host
-cocbaoan.com: could not connect to host
-coccinellaskitchen.com: could not connect to host
-coccinellaskitchen.de: could not connect to host
-coccinellaskitchen.it: could not connect to host
-cockedey.in: could not connect to host
-cockerspanielamericano.com.br: could not connect to host
-cockerspanielingles.com.br: could not connect to host
-cocktail-shaken.nl: did not receive HSTS header
-cocktailfuture.fr: could not connect to host
-coco-cool.fr: could not connect to host
-cocodemy.com: did not receive HSTS header
-cocolovesdaddy.com: could not connect to host
-cocubes.com: did not receive HSTS header
-cocyou.ooo: could not connect to host
-cod88.cc: could not connect to host
-codabix.net: could not connect to host
-code-35.com: could not connect to host
-code-digsite.com: could not connect to host
-code-golf.io: did not receive HSTS header
-code-judge.tk: could not connect to host
-code.google.com: did not receive HSTS header (error ignored - included regardless)
-codealkemy.co: could not connect to host
-codebreaking.org: could not connect to host
-codeco.pw: could not connect to host
-codecommunity.io: could not connect to host
-codecontrollers.de: could not connect to host
-codeforce.io: could not connect to host
-codefordus.de: could not connect to host
-codeforhakodate.org: did not receive HSTS header
-codejunkie.de: could not connect to host
-codeknights.com: did not receive HSTS header
-codelayer.ca: could not connect to host
-codelitmus.com: did not receive HSTS header
-codeloop.pw: could not connect to host
-codelove.de: did not receive HSTS header
-codemahrt.com: could not connect to host
-codemonkeyrawks.net: could not connect to host
-codemperium.com: could not connect to host
-codenlife.kr: could not connect to host
-codenlife.xyz: could not connect to host
-codeofhonor.tech: could not connect to host
-codeplay.org: did not receive HSTS header
-codepoet.de: could not connect to host
-codeproxy.ddns.net: could not connect to host
-codepult.com: did not receive HSTS header
-codepx.com: could not connect to host
-codera.co.uk: could not connect to host
-codercross.com: could not connect to host
-codercy.com: could not connect to host
-coderhangout.com: could not connect to host
-codersatlas.co: could not connect to host
-codersatlas.com: could not connect to host
-codersatlas.xyz: could not connect to host
-codersbase.org: could not connect to host
-codersbistro.com: did not receive HSTS header
-codesplain.in: could not connect to host
-codestep.io: could not connect to host
-codesyncro.com: did not receive HSTS header
-codewild.de: could not connect to host
-codewiththepros.org: could not connect to host
-codewiz.xyz: could not connect to host
-codific.eu: did not receive HSTS header
-codimaker.com: could not connect to host
-coding.net: did not receive HSTS header
-codingfromhell.net: did not receive HSTS header
-codinglogs.com: did not receive HSTS header
-coecrafters.com: could not connect to host
-coens.me.uk: could not connect to host
-coentropic.com: could not connect to host
-coeurdesushi.com: max-age too low: 2592000
-coffeedino.com: did not receive HSTS header
-coffeeetc.co.uk: could not connect to host
-coffeetocode.me: could not connect to host
-coffeist.com: could not connect to host
-cogilog.com: could not connect to host
-coginti.tk: could not connect to host
-cogniflex.com: could not connect to host
-cognitiveapplications.net: could not connect to host
-cognixia.com: did not receive HSTS header
-cognixia.us: did not receive HSTS header
-cogsquad.house: could not connect to host
-cogumelosmagicos.org: could not connect to host
-cohesive.io: could not connect to host
-coi-verify.com: did not receive HSTS header
-coiffure-andrea.ch: did not receive HSTS header
-coin-exchange.cz: could not connect to host
-coinbit.trade: could not connect to host
-coinclickz.fun: could not connect to host
-coinclickz.xyz: could not connect to host
-coincoele.com.br: could not connect to host
-coindam.com: could not connect to host
-coindatabase.net: did not receive HSTS header
-coindeal.com: did not receive HSTS header
-coindesfilles.fr: did not receive HSTS header
-coinespe.com: did not receive HSTS header
-coinessa.com: could not connect to host
-coinjar-sandbox.com: could not connect to host
-coinpath.io: could not connect to host
-coins2001.ru: could not connect to host
-coisabakana.com.br: could not connect to host
-cokeflix.tv: did not receive HSTS header
-colapsys.net: did not receive HSTS header
-colarelli.ch: could not connect to host
-colasjourdain.fr: could not connect to host
-coldaddy.com: could not connect to host
-coldhak.ca: did not receive HSTS header
-coldlostsick.net: did not receive HSTS header
-coldwatericecream.com: did not receive HSTS header
-colearnr.com: could not connect to host
-colectivos.org: did not receive HSTS header
-coleg.gov: could not connect to host
-colincampbell.me: did not receive HSTS header
-collablynk.com: did not receive HSTS header
-collabra.email: did not receive HSTS header
-collard.tk: did not receive HSTS header
-collare.com.mx: could not connect to host
-collbox.co: did not receive HSTS header
-collectfood.com: could not connect to host
-collectivesupply.com: did not receive HSTS header
-collectosaurus.com: did not receive HSTS header
-colleencornez.com: could not connect to host
-collegeconnexxions.com.au: did not receive HSTS header
-collegepaperworld.com: did not receive HSTS header
-collegepulse.org: could not connect to host
-collegesecretary.cn: could not connect to host
-collegesecretary.com: could not connect to host
-colley.tk: could not connect to host
-collinghammethodist.org.uk: did not receive HSTS header
-collins.kg: could not connect to host
-collins.press: could not connect to host
-collinsartworks.com: did not receive HSTS header
-collision.fyi: could not connect to host
-colmexpro.com: did not receive HSTS header
-colo-tech.com: could not connect to host
-colognegaming.net: could not connect to host
-coloppe.com: could not connect to host
-coloradobluebook.gov: could not connect to host
-coloradocomputernetworking.net: could not connect to host
-coloraid.net: could not connect to host
-colorbrush.ru: could not connect to host
-colorcentertoner.com.br: did not receive HSTS header
-colorguni.com: could not connect to host
-colorunhas.com.br: could not connect to host
-colotimes.com: could not connect to host
-colpatriaws.azurewebsites.net: could not connect to host
-coltonrb.com: could not connect to host
-columbiacountyor.gov: did not receive HSTS header
-columbusks.gov: could not connect to host
-colyakoomusic.com: did not receive HSTS header
-colyakootees.com: did not receive HSTS header
-com-news.io: could not connect to host
-comandofilmes.club: could not connect to host
-combatircelulitis.com: did not receive HSTS header
-combatshield.cz: did not receive HSTS header
-combattrecellulite.com: could not connect to host
-comchezmeme.com: could not connect to host
-comcov.com: did not receive HSTS header
-comeoncolleen.com: did not receive HSTS header
-comeoneileen.tk: could not connect to host
-comercialdragon.com: did not receive HSTS header
-cometbot.cf: could not connect to host
-cometrueunlimited.com: could not connect to host
-comevius.com: could not connect to host
-comevius.org: could not connect to host
-comevius.xyz: could not connect to host
-comeyegroup.com: could not connect to host
-comfortdom.ua: did not receive HSTS header
-comfortticket.de: did not receive HSTS header
-comfun.net: could not connect to host
-comfy.moe: did not receive HSTS header
-comfypc.com: could not connect to host
-comico.info: could not connect to host
-comicrelief.com: did not receive HSTS header
-comicspines.com: could not connect to host
-comidasperuanas.net: did not receive HSTS header
-comidina.com: could not connect to host
-comiq.io: could not connect to host
-comitesaustria.at: could not connect to host
-comiteshopping.com: could not connect to host
-commencepayments.com: did not receive HSTS header
-commerce.gov: did not receive HSTS header
-commercia.srl: could not connect to host
-commerciallocker.com: could not connect to host
-commercialplanet.eu: could not connect to host
-commune-preuilly.fr: did not receive HSTS header
-community-cupboard.org: did not receive HSTS header
-comoaliviareldolor.de: could not connect to host
-comocurarlashemorroides.org: could not connect to host
-comocurarlashemorroidesya.com: could not connect to host
-comodesinflamarlashemorroides.org: did not receive HSTS header
-comoeliminarlaspapulasperladasenelglande.com: did not receive HSTS header
-comohacerelamoraunhombrenet.com: did not receive HSTS header
-comoquitarlasestriasrapidamente.com: did not receive HSTS header
-comorecuperaratumujerpdf.com: could not connect to host
-comosatisfaceraunhombreenlacamaydejarloloco.com: did not receive HSTS header
-comotalk.com: could not connect to host
-comp.kiev.ua: could not connect to host
-compagniemartin.com: could not connect to host
-compalytics.com: could not connect to host
-comparamejor.com: did not receive HSTS header
-compareandrecycle.co.uk: did not receive HSTS header
-compareandrecycle.com: did not receive HSTS header
-comparecompensationclaims.com: max-age too low: 0
-comparejewelleryprices.co.uk: could not connect to host
-comparesolarquote.com.au: did not receive HSTS header
-comparetravelinsurance.com.au: did not receive HSTS header
-compartir.party: did not receive HSTS header
-compassbest.com: could not connect to host
-compassionate-biology.com: could not connect to host
-compeuphoria.com: could not connect to host
-compibus.fr: could not connect to host
-compiledworks.com: could not connect to host
-compitak.com: could not connect to host
-compleetondernemen.nl: did not receive HSTS header
-complete-it.co.uk: did not receive HSTS header
-completefloorcoverings.com: did not receive HSTS header
-completesportperformance.com: did not receive HSTS header
-completionist.audio: could not connect to host
-complex-news.com: could not connect to host
-complex-organization.com: could not connect to host
-complexsystems.fail: did not receive HSTS header
-complt.xyz: could not connect to host
-complymd.com: did not receive HSTS header
-compostelle-bouddha.fr: could not connect to host
-compra-deuna.com: could not connect to host
-comprachida.com: could not connect to host
-compraporinternet.online: could not connect to host
-comprarcl.com: could not connect to host
-comprarefiereygana.com: could not connect to host
-comprasegura.ml: could not connect to host
-comprasoffie.com.br: could not connect to host
-compratecno.cl: did not receive HSTS header
-compredietlight.com.br: did not receive HSTS header
-comprefitasadere.com.br: could not connect to host
-comprehensiveihc.com: could not connect to host
-compromised.com: could not connect to host
-compros.me: could not connect to host
-compservice.in.ua: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-compsmag.com: did not receive HSTS header
-compu-ofertas.tk: could not connect to host
-compucastell.ch: did not receive HSTS header
-compucorner.com.mx: could not connect to host
-compufreaks.com: did not receive HSTS header
-compufreaks.nl: did not receive HSTS header
-compusolve.nl: could not connect to host
-compusrit.tk: could not connect to host
-computeradvance.tk: did not receive HSTS header
-computerfreunde-barmbek.de: did not receive HSTS header
-computerslotopschool.nl: did not receive HSTS header
-computertal.de: could not connect to host
-computerwerk.org: did not receive HSTS header
-comssa.org.au: did not receive HSTS header
-comtily.com: could not connect to host
-comyuno.com: did not receive HSTS header
-concentrade.de: did not receive HSTS header
-conceptatelier.de: could not connect to host
-conception.sk: did not receive HSTS header
-concertengine.com: could not connect to host
-concierge.diet: did not receive HSTS header
-conclave.global: could not connect to host
-conclinica.com.br: did not receive HSTS header
-concord-group.co.jp: did not receive HSTS header
-concursopublico.com.br: could not connect to host
-condit.ml: could not connect to host
-condostjacques.com: could not connect to host
-conectalmeria.com: could not connect to host
-conectar.ru: could not connect to host
-conference.dnsfor.me: could not connect to host
-confidential.network: could not connect to host
-configurat.tk: could not connect to host
-confirm365.com: could not connect to host
-conflicting.tk: could not connect to host
-conflux.tw: did not receive HSTS header
-conformal.com: could not connect to host
-conformist.jp: could not connect to host
-confucio.cl: could not connect to host
-confuddledpenguin.com: did not receive HSTS header
-cong5.net: max-age too low: 0
-congresscoverage.com: did not receive HSTS header
-congz.me: did not receive HSTS header
-conkret.ch: could not connect to host
-conkret.co.uk: could not connect to host
-conkret.de: did not receive HSTS header
-conkret.eu: could not connect to host
-conkret.in: could not connect to host
-connaitre-les-astres.com: did not receive HSTS header
-connect-more.online: did not receive HSTS header
-connect.social: did not receive HSTS header
-connect.ua: could not connect to host
-connectavid.com: could not connect to host
-connected-verhuurservice.nl: did not receive HSTS header
-connectfri.club: did not receive HSTS header
-connectium.co.uk: did not receive HSTS header
-conniesacademy.com: could not connect to host
-connorsmith.co: could not connect to host
-conocedordigital.com: could not connect to host
-conocimientosdigitales.com: could not connect to host
-conpath.net: did not receive HSTS header
-conpins.nl: could not connect to host
-conrad.am: could not connect to host
-conraid.net: did not receive HSTS header
-conrail.blue: did not receive HSTS header
-consciousandglamorous.com: could not connect to host
-consciousbrand.co: did not receive HSTS header
-consciousbrand.org.au: could not connect to host
-consciousbranding.org.au: could not connect to host
-consciousbrands.net.au: could not connect to host
-consciousnesschange.com: did not receive HSTS header
-consec-systems.de: did not receive HSTS header
-conseil-gli.fr: did not receive HSTS header
-consejosdehogar.com: did not receive HSTS header
-conservados.com.br: did not receive HSTS header
-conservatoriesincornwall.com: did not receive HSTS header
-consideryourways.net: could not connect to host
-consill.com: could not connect to host
-console.ninja: could not connect to host
-console.python.org: did not receive HSTS header
-console.support: did not receive HSTS header
-consommation-locale.fr: could not connect to host
-constancechen.me: could not connect to host
-constares.de: did not receive HSTS header
-constituenttracker.com: could not connect to host
-constitution.website: could not connect to host
-construct-trust.com: could not connect to host
-constructexpres.ro: could not connect to host
-construction-digitale.fr: could not connect to host
-constructive.men: could not connect to host
-consultanta-in-afaceri.ro: max-age too low: 0
-consultasdigitales.com: did not receive HSTS header
-consultcelerity.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-consultingroupitaly.com: did not receive HSTS header
-consultorcr.net: could not connect to host
-consultorioespecializado.com: could not connect to host
-consumer.gov: did not receive HSTS header
-consumidor.gov: did not receive HSTS header
-contact.xyz: could not connect to host
-contactbig.com: could not connect to host
-contaimo.com: did not receive HSTS header
-container-lion.com: did not receive HSTS header
-containerspace.com.au: did not receive HSTS header
-containerstatistics.com: could not connect to host
-contarkos.xyz: could not connect to host
-content-design.de: did not receive HSTS header
-contentdesign.de: did not receive HSTS header
-contents.ga: could not connect to host
-contextplatform.com: did not receive HSTS header
-continental-zermatt.ch: did not receive HSTS header
-continuation.io: could not connect to host
-continuumgaming.com: did not receive HSTS header
-contourheating.co.uk: did not receive HSTS header
-contractdigital.co.uk: did not receive HSTS header
-contraout.com: could not connect to host
-contrisur.com: could not connect to host
-controlarlaansiedad.com: did not receive HSTS header
-controlcenter.gigahost.dk: did not receive HSTS header
-controltickets.com.br: did not receive HSTS header
-contxt-agentur.de: did not receive HSTS header
-convergemagazine.com: did not receive HSTS header
-convergence.fi: could not connect to host
-convert.zone: could not connect to host
-converter.ml: could not connect to host
-converticacommerce.com: did not receive HSTS header
-convocatoriafundacionpepsicomexico.org: could not connect to host
-convoitises.com: did not receive HSTS header
-cooink.net: could not connect to host
-cookcountyclerkil.gov: did not receive HSTS header
-cookeatup.com: did not receive HSTS header
-cooker.fr: could not connect to host
-cookielab.io: did not receive HSTS header
-cookiesoft.de: could not connect to host
-cookiestudies.cf: could not connect to host
-cookingbazart.com: did not receive HSTS header
-cookingreporter.com: could not connect to host
-cooko.at: could not connect to host
-cooksbookscorks.com: did not receive HSTS header
-cooksecuritygroup.com: did not receive HSTS header
-cooksplanet.com: could not connect to host
-coolaj86.com: did not receive HSTS header
-coolbutbroken.com: did not receive HSTS header
-coolchevy.org.ua: did not receive HSTS header
-coole-meister.de: could not connect to host
-coolerssr.space: could not connect to host
-cooljs.me: could not connect to host
-coolkidsbouncycastles.co.uk: did not receive HSTS header
-coolmath.cf: could not connect to host
-coolrc.me: did not receive HSTS header
-cooltang.ooo: could not connect to host
-coolvibe.org: did not receive HSTS header
-coolviewthermostat.com: did not receive HSTS header
-coop.se: did not receive HSTS header
-cooperativa-je.net: did not receive HSTS header
-cooperativehandmade.com: did not receive HSTS header
-cooperativehandmade.pe: did not receive HSTS header
-coor.fun: could not connect to host
-coorpintr.com: could not connect to host
-cooxa.com: could not connect to host
-copinstant.com: did not receive HSTS header
-copperhead.co: did not receive HSTS header
-coppermein.co.za: could not connect to host
-coprotag.com: did not receive HSTS header
-coprotag.fr: did not receive HSTS header
-copshop.com.br: could not connect to host
-copta-imagefilme-und-drohnenvideos.de: did not receive HSTS header
-coptic-treasures.com: max-age too low: 2592000
-copycaught.co: could not connect to host
-copycaught.xyz: could not connect to host
-copytrack.com: did not receive HSTS header
-coquibus.net: did not receive HSTS header
-cor-ser.es: could not connect to host
-coralcanticorumbarcelona.tk: could not connect to host
-coralproject.net: did not receive HSTS header
-coralrosado.com.br: did not receive HSTS header
-coramcdaniel.com: could not connect to host
-corbinhesse.com: did not receive HSTS header
-cordemar.info: could not connect to host
-cordep.biz: could not connect to host
-corderoscleaning.com: did not receive HSTS header
-cordial-restaurant.com: did not receive HSTS header
-cordis.tk: could not connect to host
-core4system.de: could not connect to host
-coreapm.com: could not connect to host
-coreapm.org: could not connect to host
-corecdn.org: could not connect to host
-corenetworking.de: could not connect to host
-coresos.com: could not connect to host
-coreup.de: could not connect to host
-corex.io: did not receive HSTS header
-corgicloud.com: could not connect to host
-corinnanese.de: could not connect to host
-coriver.me: could not connect to host
-corkyoga.site: could not connect to host
-corlinde.nl: did not receive HSTS header
-corlitocaffe.de: did not receive HSTS header
-cormactagging.ie: could not connect to host
-cormilu.com.br: did not receive HSTS header
-cornishcamels.com: did not receive HSTS header
-coroasdefloresonline.com.br: could not connect to host
-corourbano.es: did not receive HSTS header
-corozanu.ro: did not receive HSTS header
-corp.goog: could not connect to host (error ignored - included regardless)
-corpoatletico.com.br: could not connect to host
-corpoepele.com.br: did not receive HSTS header
-corporacioninternacionallideres.org: did not receive HSTS header
-corporateencryption.com: could not connect to host
-corporatesubscriptions.com.au: did not receive HSTS header
-corpsepaint.life: could not connect to host
-correct.cf: did not receive HSTS header
-correct.horse: did not receive HSTS header
-correctconstructions.com.au: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-correctemails.com: could not connect to host
-correcthorse.cf: could not connect to host
-correctionsfoundation.org: did not receive HSTS header
-correiodovale.com.br: could not connect to host
-corruption-mc.net: could not connect to host
-corruption-rsps.net: could not connect to host
-corruption-server.net: could not connect to host
-corruptsamurai.com: could not connect to host
-corsectra.com: could not connect to host
-cortisolsupplement.com: did not receive HSTS header
-corvus.eu.org: could not connect to host
-cosentus.com: did not receive HSTS header
-coslinker.com: could not connect to host
-cosmetic-surgery-prices.co.uk: could not connect to host
-cosmeticos-naturales.com: did not receive HSTS header
-cosmeticosdelivery.com.br: did not receive HSTS header
-cosmeticosnet.com.br: did not receive HSTS header
-cosmiatria.pe: could not connect to host
-cosmoluziluminacion.com: could not connect to host
-cosmoss-departure.com: could not connect to host
-cosni.co: could not connect to host
-costa-rica-reisen.ch: did not receive HSTS header
-costa-rica-reisen.de: did not receive HSTS header
-costablanca.villas: could not connect to host
-costcofinance.com: did not receive HSTS header
-costellofc.co.uk: could not connect to host
-costow.club: could not connect to host
-costruzioni.milano.it: could not connect to host
-cote-chasse.com: did not receive HSTS header
-coth.ml: could not connect to host
-cotonea.de: did not receive HSTS header
-cotta.dk: could not connect to host
-cougarsland.com: did not receive HSTS header
-counselling.network: did not receive HSTS header
-counsellingtime.co.uk: could not connect to host
-count.sh: could not connect to host
-counterglobal.com: did not receive HSTS header
-counterhack.nl: did not receive HSTS header
-countingto.one: did not receive HSTS header
-countryattire.com: did not receive HSTS header
-coup-dun-soir.ch: could not connect to host
-coupe-bordure.com: did not receive HSTS header
-couplay.org: could not connect to host
-couponbre.com: did not receive HSTS header
-couponcodeq.com: could not connect to host
-couragewhispers.ca: could not connect to host
-coursdeprogrammation.com: could not connect to host
-course.pp.ua: did not receive HSTS header
-course.rs: could not connect to host
-coursella.com: could not connect to host
-courses.nl: could not connect to host
-courtlistener.com: did not receive HSTS header
-courvix.com: did not receive HSTS header
-couscous.recipes: could not connect to host
-coussinsky.net: did not receive HSTS header
-covaci.pro: did not receive HSTS header
-cove.sh: could not connect to host
-covenantbank.net: could not connect to host
-covenantmatrix.com: could not connect to host
-covenantoftheriver.org: did not receive HSTS header
-coverdat.com: could not connect to host
-coverduck.ru: did not receive HSTS header
-covermytrip.com.au: could not connect to host
-covery.ai: did not receive HSTS header
-cowboyim.com: could not connect to host
-cowcreek-nsn.gov: did not receive HSTS header
-cowo.group: did not receive HSTS header
-coworking.tk: could not connect to host
-coworkingmanifesto.com: could not connect to host
-coxxs.moe: could not connect to host
-cozitop.com.br: could not connect to host
-cozmaadrian.ro: could not connect to host
-cozmoapp.com: could not connect to host
-cozy.io: did not receive HSTS header
-cozycloud.cc: did not receive HSTS header
-cozywebsite.com: did not receive HSTS header
-cp015.com: could not connect to host
-cpaneltips.com: could not connect to host
-cpbapremiocaduceo.com.ar: did not receive HSTS header
-cpcp380.com: max-age too low: 0
-cpe-registry.com: could not connect to host
-cpe-registry.net: could not connect to host
-cpe-registry.org: could not connect to host
-cperegistry.com: could not connect to host
-cperegistry.net: could not connect to host
-cperegistry.org: could not connect to host
-cpgarmor.com: did not receive HSTS header
-cplala.com: could not connect to host
-cpls.me: could not connect to host
-cppressinc.com: could not connect to host
-cprheartcenter.com: did not receive HSTS header
-cprnearme.com: did not receive HSTS header
-cpuvinf.eu.org: could not connect to host
-cqchome.com: did not receive HSTS header
-cr0nus.net: did not receive HSTS header
-cr9499.com: could not connect to host
-crabfactory.com.my: could not connect to host
-crackers4cheese.com: could not connect to host
-cracking.org: did not receive HSTS header
-crackingking.com: did not receive HSTS header
-crackpfer.de: could not connect to host
-craft-verlag.de: did not receive HSTS header
-craftbeerbarn.co.uk: could not connect to host
-craftcommerce.com: did not receive HSTS header
-craftedge.xyz: could not connect to host
-craftination.net: could not connect to host
-craftmachinec.com: could not connect to host
-craftmain.eu: could not connect to host
-craftmine.cz: could not connect to host
-craftngo.hu: could not connect to host
-craftsandsweets.com: did not receive HSTS header
-craftwmcp.xyz: could not connect to host
-craftydev.design: could not connect to host
-craigary.net: did not receive HSTS header
-crain.com.au: did not receive HSTS header
-cranems.com.ua: could not connect to host
-cranioschule.com: did not receive HSTS header
-crashsec.com: could not connect to host
-crate.io: did not receive HSTS header
-craterx.com: did not receive HSTS header
-cravelyrics.com: could not connect to host
-crawcial.de: could not connect to host
-crawford.cloud: could not connect to host
-crawl.report: did not receive HSTS header
-craxbay.com: did not receive HSTS header
-crazifyngers.com: could not connect to host
-crazy-crawler.de: did not receive HSTS header
-crazybulksteroids.com: could not connect to host
-crazycen.com: could not connect to host
-crazycraftland.de: could not connect to host
-crazyfamily11.de: could not connect to host
-crazyhost.ga: could not connect to host
-crazyhotseeds.com: did not receive HSTS header
-crazyker.com: could not connect to host
-crbug.com: did not receive HSTS header (error ignored - included regardless)
-crc-online.nl: did not receive HSTS header
-creacioneslri.com: could not connect to host
-creadstudy.com: could not connect to host
-creaescola.com: did not receive HSTS header
-creafitchile.cl: could not connect to host
-creaintel.net: did not receive HSTS header
-crealogix-online.com: could not connect to host
-creamybuild.com: could not connect to host
-creandoydesarrollando.com: could not connect to host
-create-ls.jp: could not connect to host
-create-test-publish.co.uk: could not connect to host
-create-together.nl: did not receive HSTS header
-createme.com.pl: could not connect to host
-creaticworld.net: could not connect to host
-creation-contemporaine.com: did not receive HSTS header
-creations-edita.com: could not connect to host
-creativ-impuls-dekorateurin-muenchen.de: did not receive HSTS header
-creativeapple.ltd: did not receive HSTS header
-creativeartifice.com: did not receive HSTS header
-creativebites.de: could not connect to host
-creativecommons.cl: did not receive HSTS header
-creativecommonscatpictures.com: could not connect to host
-creativefolks.co.uk: did not receive HSTS header
-creativefreedom.ca: did not receive HSTS header
-creativephysics.ml: could not connect to host
-creativeplayuk.com: did not receive HSTS header
-creativerezults.com: could not connect to host
-creativesprite.com: could not connect to host
-creativlabor.ch: did not receive HSTS header
-creato.top: did not receive HSTS header
-creators.co: could not connect to host
-crecips.com: could not connect to host
-crecket.me: could not connect to host
-credential.eu: could not connect to host
-credia.jp: could not connect to host
-creditcard52.com: max-age too low: 0
-creditclear.com.au: did not receive HSTS header
-creditmonkey.pro: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-creditreporttips.net: could not connect to host
-creditta.com: did not receive HSTS header
-credittoken.io: could not connect to host
-creepycraft.nl: could not connect to host
-creepypastas.net: did not receive HSTS header
-creerunsitepro.com: could not connect to host
-cremedigital.com: could not connect to host
-crendontech.com: did not receive HSTS header
-creorin.com: did not receive HSTS header
-crepererum.net: did not receive HSTS header
-crescent.gr.jp: did not receive HSTS header
-crestasantos.com: did not receive HSTS header
-crestoncottage.com: could not connect to host
-crew.moe: could not connect to host
-crew505.org: could not connect to host
-crfcap.org: did not receive HSTS header
-crge.eu: did not receive HSTS header
-criadorespet.com.br: could not connect to host
-crickey.eu: could not connect to host
-crimbotrees.co.uk: did not receive HSTS header
-crimewatch.net.za: could not connect to host
-crimson.no: did not receive HSTS header
-crip-usk.ba: could not connect to host
-crisissurvivalspecialists.com: could not connect to host
-cristals.ga: could not connect to host
-cristianhares.com: could not connect to host
-cristianrasch.com: did not receive HSTS header
-cristianuibar.com: could not connect to host
-cristoraciones.com: did not receive HSTS header
-critcola.com: could not connect to host
-criticalaim.com: did not receive HSTS header
-crl-autos.com: could not connect to host
-crmdemo.website: could not connect to host
-crmenrich.com: did not receive HSTS header
-crockett.io: did not receive HSTS header
-croeder.net: could not connect to host
-croisieres.discount: could not connect to host
-croncron.io: could not connect to host
-croods-mt2.fr: could not connect to host
-croome.no-ip.org: could not connect to host
-crop-alert.com: could not connect to host
-croquette.net: did not receive HSTS header
-crosbug.com: did not receive HSTS header (error ignored - included regardless)
-crose.co.uk: did not receive HSTS header
-cross-link.ch: did not receive HSTS header
-cross-x.com: could not connect to host
-crosscom.ch: could not connect to host
-crossfunctional.com: could not connect to host
-crosssec.com: did not receive HSTS header
-crosssellguide.com: could not connect to host
-crossword.city: could not connect to host
-crow.tw: could not connect to host
-crowdcurity.com: did not receive HSTS header
-crowdjuris.com: could not connect to host
-crowdliminal.com: could not connect to host
-crowdspire.org: did not receive HSTS header
-crowdwis.com: could not connect to host
-crownchessclub.com: could not connect to host
-crownruler.com: did not receive HSTS header
-crox.co: could not connect to host
-crrev.com: did not receive HSTS header (error ignored - included regardless)
-crt.cloud: could not connect to host
-crt2014-2024review.gov: could not connect to host
-crtvmgmt.com: could not connect to host
-cruciverba.cc: could not connect to host
-crudysql.com: could not connect to host
-cruelporn.com: could not connect to host
-crufad.org: did not receive HSTS header
-cruikshank.com.au: could not connect to host
-crux.camp: did not receive HSTS header
-cruzadobalcazarabogados.com: could not connect to host
-cruzeiropedia.org: did not receive HSTS header
-cruzr.xyz: could not connect to host
-cryobiz.com: did not receive HSTS header
-cryogenix.net: could not connect to host
-cryoit.com: did not receive HSTS header
-cryp.no: could not connect to host
-crypalert.com: could not connect to host
-crypkit.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-crypt.guru: did not receive HSTS header
-cryptagio.com: did not receive HSTS header
-crypticshell.co.uk: did not receive HSTS header
-cryptify.eu: could not connect to host
-crypto-armory.com: did not receive HSTS header
-crypto-navi.org: did not receive HSTS header
-crypto.tube: max-age too low: 2592000
-cryptobells.com: did not receive HSTS header
-cryptobin.org: could not connect to host
-cryptocaseproject.com: could not connect to host
-cryptodash.net: could not connect to host
-cryptodyno.ninja: could not connect to host
-cryptography.io: max-age too low: 0
-cryptojar.io: could not connect to host
-cryptolab.pro: could not connect to host
-cryptolab.tk: could not connect to host
-cryptolinc.com: did not receive HSTS header
-cryptolosophy.io: could not connect to host
-cryptolosophy.org: did not receive HSTS header
-cryptomaniaks.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-cryptonx.io: could not connect to host
-cryptoparty.dk: could not connect to host
-cryptopartyatx.org: could not connect to host
-cryptopartynewcastle.org: could not connect to host
-cryptopro.shop: could not connect to host
-cryptopush.com: did not receive HSTS header
-cryptotrendclub.com: could not connect to host
-cryptoya.io: could not connect to host
-crysadm.com: could not connect to host
-crystalapp.ca: could not connect to host
-crystalclassics.co.uk: did not receive HSTS header
-crystallizedcouture.com: did not receive HSTS header
-crystalmate.eu: did not receive HSTS header
-cryz.ru: could not connect to host
-cs-colorscreed-betongulve.dk: could not connect to host
-cs-ubladego.pl: could not connect to host
-cs2016.ch: could not connect to host
-csa-library.org: could not connect to host
-csaapac.com: could not connect to host
-csadc.org: could not connect to host
-csapak.com: could not connect to host
-csasummit.net: could not connect to host
-csasummit.org: could not connect to host
-csawctf.poly.edu: could not connect to host
-csbgtribalta.com: did not receive HSTS header
-csbs.fr: could not connect to host
-csd-sevnica.si: could not connect to host
-csehnyelv.hu: could not connect to host
-cser.me: could not connect to host
-csfloors.co.uk: could not connect to host
-csfm.com: could not connect to host
-csfs.org.uk: could not connect to host
-csgo.design: could not connect to host
-csgo.help: could not connect to host
-csgo77.com: could not connect to host
-csgodicegame.com: could not connect to host
-csgoelemental.com: could not connect to host
-csgogamers.com: could not connect to host
-csgohandouts.com: could not connect to host
-csgokings.eu: could not connect to host
-csgoshifter.com: could not connect to host
-csgotwister.com: could not connect to host
-cshopify.com: could not connect to host
-csilies.de: could not connect to host
-csinfo.us: could not connect to host
-cskdoc.com: did not receive HSTS header
-csohack.tk: could not connect to host
-csokolade.hu: could not connect to host
-csovek-idomok.hu: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-cspbuilder.info: did not receive HSTS header
-csru.net: could not connect to host
-css.net: could not connect to host
-css125.com: max-age too low: 0
-cssu.in: did not receive HSTS header
-cst188.cc: could not connect to host
-csust.ac.cn: did not receive HSTS header
-csvape.com: did not receive HSTS header
-ct-status.org: could not connect to host
-ct-watches.dk: did not receive HSTS header
-cthomas.work: could not connect to host
-cthulhuden.com: could not connect to host
-ctj.im: could not connect to host
-ctknight.me: could not connect to host
-ctl.email: could not connect to host
-ctoforhire.com.au: could not connect to host
-ctoresms.com: could not connect to host
-ctr.id: did not receive HSTS header
-ctrld.me: could not connect to host
-ctyi.me: could not connect to host
-cuanhua3s.com: could not connect to host
-cuanticasocialmedia.com: could not connect to host
-cubanross.com: did not receive HSTS header
-cube-cloud.com: did not receive HSTS header
-cube.de: did not receive HSTS header
-cube.la: did not receive HSTS header
-cubecart.net: did not receive HSTS header
-cubecraftstore.com: could not connect to host
-cubecraftstore.net: could not connect to host
-cubela.tech: could not connect to host
-cubeserver.eu: could not connect to host
-cubewano.com: could not connect to host
-cubix.host: could not connect to host
-cucaracha.tk: did not receive HSTS header
-cucc.date: could not connect to host
-cuckmysock.com: could not connect to host
-cuddlecat.io: could not connect to host
-cuecamania.com.br: could not connect to host
-cujanovic.com: did not receive HSTS header
-cujba.com: could not connect to host
-culaneenergycorp.com: did not receive HSTS header
-culinae.nl: could not connect to host
-cultivo.bio: could not connect to host
-culture-school.top: did not receive HSTS header
-cultureelbeleggen.nl: could not connect to host
-culturerain.com: could not connect to host
-cultureroll.com: could not connect to host
-cumagini.com: could not connect to host
-cumparama.com: did not receive HSTS header
-cumtd.com: could not connect to host
-cunha.be: could not connect to host
-cuni-cuni-club.com: could not connect to host
-cuni-rec.com: could not connect to host
-cuntflaps.me: could not connect to host
-cuongquach.com: did not receive HSTS header
-cuonic.com: did not receive HSTS header
-cupcake.io: did not receive HSTS header
-cupcake.is: did not receive HSTS header
-cupcakesandcrinoline.com: did not receive HSTS header
-cupcao.gov: could not connect to host
-cupi.co: did not receive HSTS header
-cupidosshop.com: did not receive HSTS header
-cupofarchitects.net: did not receive HSTS header
-cuppycakes.fi: did not receive HSTS header
-curacao-license.com: could not connect to host
-curanderosantiago.com: did not receive HSTS header
-curareldolordeespalda.com: could not connect to host
-curarnosensalud.com: could not connect to host
-curatedgeek.com: did not receive HSTS header
-curexengine.com: did not receive HSTS header
-curia.fi: could not connect to host
-curiouscat.me: max-age too low: 2592000
-curiouspeddler.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-curlyroots.com: did not receive HSTS header
-current.com: did not receive HSTS header
-currentlyusa.com: could not connect to host
-currentobserver.com: did not receive HSTS header
-curroapp.com: could not connect to host
-cursed.im: did not receive HSTS header
-cursomarketingdigitalmx.com: could not connect to host
-cursosdeinglesmexico.com: could not connect to host
-cursosdnc.cl: could not connect to host
-cursosgratuitos.com.br: did not receive HSTS header
-curtis-smith.uk: could not connect to host
-curtislaw-pllc.com: did not receive HSTS header
-curtissmith.uk: could not connect to host
-curvesandwords.com: did not receive HSTS header
-curveweb.co.uk: did not receive HSTS header
-curvylove.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-cusfit.com: did not receive HSTS header
-custamped.com: could not connect to host
-custe.rs: could not connect to host
-custerweb.com: could not connect to host
-custodiamobili.roma.it: could not connect to host
-customadesign.com: did not receive HSTS header
-custombikes.cl: did not receive HSTS header
-customcontract.network: could not connect to host
-customd.com: did not receive HSTS header
-customerbox.ir: did not receive HSTS header
-customfilmworks.com: could not connect to host
-customfitmarketing.com: did not receive HSTS header
-customgear.com.au: could not connect to host
-customizeyourshower.com: could not connect to host
-customromlist.com: could not connect to host
-customshort.link: could not connect to host
-customwritingservice.com: did not receive HSTS header
-cutelariafiveladeouro.com.br: did not receive HSTS header
-cutephil.com: could not connect to host
-cuteselfie.com: did not receive HSTS header
-cutimbo.com: did not receive HSTS header
-cutimbo.ovh: could not connect to host
-cutorrent.com: could not connect to host
-cuvva.insure: did not receive HSTS header
-cuxpool.club: could not connect to host
-cuyahogacountyvotesoh.gov: could not connect to host
-cvdc.xyz: could not connect to host
-cvjm-memmingen.de: did not receive HSTS header
-cvninja.pl: did not receive HSTS header
-cvps.top: did not receive HSTS header
-cvsoftub.com: could not connect to host
-cvtparking.co.uk: did not receive HSTS header
-cw-bw.de: could not connect to host
-cw.do: could not connect to host
-cwage.com: did not receive HSTS header
-cwagner.me: did not receive HSTS header
-cwbw.network: could not connect to host
-cwilson.ga: could not connect to host
-cwinfo.fi: did not receive HSTS header
-cwinfo.net: did not receive HSTS header
-cwr.gov: could not connect to host
-cxfinancia.com: did not receive HSTS header
-cxq77128.com: max-age too low: 0
-cy.ax: could not connect to host
-cy.technology: did not receive HSTS header
-cyanogenmod.xxx: could not connect to host
-cybbh.space: could not connect to host
-cyber-computer.club: could not connect to host
-cyber-konzept.de: did not receive HSTS header
-cyber-perikarp.eu: could not connect to host
-cyber-wolfs.com: did not receive HSTS header
-cyber.cafe: did not receive HSTS header
-cyberbot.info: could not connect to host
-cybercave.tk: could not connect to host
-cybercecurity.com: did not receive HSTS header
-cybercloud.cc: did not receive HSTS header
-cybercocoon.com: did not receive HSTS header
-cyberdos.de: could not connect to host
-cyberdyne-industries.net: did not receive HSTS header
-cyberdyne.ie: could not connect to host
-cyberdyne.llc: could not connect to host
-cyberexplained.info: could not connect to host
-cybergrx.com: did not receive HSTS header
-cyberguerrilla.info: could not connect to host
-cyberguerrilla.org: could not connect to host
-cyberkov.com: did not receive HSTS header
-cyberlab.kiev.ua: could not connect to host
-cyberlightapp.com: did not receive HSTS header
-cybermeldpunt.nl: could not connect to host
-cyberpanel.cf: could not connect to host
-cyberpeace.nl: could not connect to host
-cyberprey.com: could not connect to host
-cyberpunk.ca: could not connect to host
-cyberquest.cf: could not connect to host
-cyberregister.nl: could not connect to host
-cyberregister.org: could not connect to host
-cybersantri.com: could not connect to host
-cybersecurity.nz: did not receive HSTS header
-cybersecurityketen.nl: could not connect to host
-cyberserver.org: could not connect to host
-cybershambles.com: could not connect to host
-cyberspace.community: could not connect to host
-cyberspace.today: could not connect to host
-cybertorsk.org: could not connect to host
-cyberweightloss.com: could not connect to host
-cybit.io: could not connect to host
-cybozulive-dev.com: could not connect to host
-cybozulive.com: did not receive HSTS header
-cybrary.it: did not receive HSTS header
-cyclebeads.com: did not receive HSTS header
-cyclehackluxembourgcity.lu: could not connect to host
-cyclingjunkies.com: could not connect to host
-cyclisjumper.gallery: could not connect to host
-cyclop-editorial.fr: could not connect to host
-cydia-search.io: could not connect to host
-cyelint.com: could not connect to host
-cygnaltech.com: could not connect to host
-cygu.ch: could not connect to host
-cymtech.net: could not connect to host
-cynoshair.com: could not connect to host
-cyoda.com: did not receive HSTS header
-cypad.cn: could not connect to host
-cype.dedyn.io: could not connect to host
-cypherpunk.com: did not receive HSTS header
-cypherpunk.ws: could not connect to host
-cyphertite.com: could not connect to host
-cyrating.com: did not receive HSTS header
-cyson.tech: could not connect to host
-cytadel.fr: did not receive HSTS header
-cytegic-update-packages.com: could not connect to host
-cytotecforsale.com: did not receive HSTS header
-czechamlp.com: could not connect to host
-czechcrystals.co.uk: could not connect to host
-czfa.pl: did not receive HSTS header
-czh999.com: could not connect to host
-czlx.co: could not connect to host
-d-academia.com: did not receive HSTS header
-d-garnier-delaunay.fr: did not receive HSTS header
-d-imitacion.top: could not connect to host
-d-loop.de: could not connect to host
-d-msg.com: could not connect to host
-d-quantum.com: did not receive HSTS header
-d-rickroll-e.pw: could not connect to host
-d-soft.tk: could not connect to host
-d-toys.com.ua: could not connect to host
-d.nf: did not receive HSTS header
-d00r.de: could not connect to host
-d0xq.net: could not connect to host
-d1ownqs4tcx37f.cloudfront.net: did not receive HSTS header
-d1qvlbepn0kduz.cloudfront.net: could not connect to host
-d1ves.io: did not receive HSTS header
-d2qa61rbluifiq.cloudfront.net: did not receive HSTS header
-d2s.uk: could not connect to host
-d36594.com: could not connect to host
-d3boost.com: did not receive HSTS header
-d3dev.cf: could not connect to host
-d3njjcbhbojbot.cloudfront.net: did not receive HSTS header
-d3x.pw: could not connect to host
-d3xx3r.de: did not receive HSTS header
-d4designstudios.ch: did not receive HSTS header
-d4designstudios.com: did not receive HSTS header
-d4wson.com: could not connect to host
-d5197.co: could not connect to host
-d6729.co: could not connect to host
-d6729.com: did not receive HSTS header
-d6957.co: could not connect to host
-d6957.com: did not receive HSTS header
-d7211.com: did not receive HSTS header
-d7216.com: did not receive HSTS header
-d81365.com: did not receive HSTS header
-d81818.com: did not receive HSTS header
-d82365.com: did not receive HSTS header
-d88-livechat.com: could not connect to host
-d8841.com: could not connect to host
-d885188.com: could not connect to host
-d88688.com: could not connect to host
-d887vip.com: could not connect to host
-d8886.net: could not connect to host
-d888818.com: could not connect to host
-d88886.com: could not connect to host
-d88girls.com: could not connect to host
-d899365.com: could not connect to host
-d8studio.net: could not connect to host
-d9297.co: could not connect to host
-d9397.com: did not receive HSTS header
-d9721.com: did not receive HSTS header
-d9728.co: could not connect to host
-da-ist-kunst.de: did not receive HSTS header
-da-sh.cc: could not connect to host
-da.hn: could not connect to host
-da42foripad.com: could not connect to host
-da8.cc: did not receive HSTS header
-dabai.club: could not connect to host
-dabai.photo: could not connect to host
-dabblegoat.com: could not connect to host
-dabbot.org: did not receive HSTS header
-dabneydriveanimalhospital.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-dad256.tk: could not connect to host
-dadahen.com: max-age too low: 0
-daddyfinger.me: could not connect to host
-dadons-laserdiscs.com: could not connect to host
-dadtheimpaler.com: could not connect to host
-dadycandoit.com: did not receive HSTS header
-daemon.xin: could not connect to host
-daemonslayer.net: could not connect to host
-dafassl.com: did not receive HSTS header
-dafnik.me: did not receive HSTS header
-dagmar2018.cz: could not connect to host
-dah5.com: did not receive HSTS header
-dahl-pind.dk: did not receive HSTS header
-dahliacake.com: could not connect to host
-dai-rin.co.jp: could not connect to host
-dai.top: could not connect to host
-daily-exps.herokuapp.com: could not connect to host
-dailybunda.com: could not connect to host
-dailypop.ru: could not connect to host
-dailystormerpodcasts.com: could not connect to host
-dailytopix.com: did not receive HSTS header
-daimadi.com: could not connect to host
-daintymeal.com: did not receive HSTS header
-dair.se: did not receive HSTS header
-dairikab.go.id: could not connect to host
-daisuki.pw: could not connect to host
-daitouryu-jujutsu.com: did not receive HSTS header
-daiwai.de: did not receive HSTS header
-daiweihu.com: could not connect to host
-daiyuu.jp: could not connect to host
-dakerealestate.com: did not receive HSTS header
-dakinecoupons.com: did not receive HSTS header
-dakl-shop.de: did not receive HSTS header
-dakotasilencer.com: did not receive HSTS header
-dakrib.net: could not connect to host
-daku.gdn: could not connect to host
-dale-bancruz.tk: could not connect to host
-dalfiume.it: did not receive HSTS header
-dalingk.co: could not connect to host
-dallas.gov: could not connect to host
-dallinbryce.com: could not connect to host
-daltonedwards.me: could not connect to host
-dam74.com.ar: could not connect to host
-damaskena.com: did not receive HSTS header
-damienpontifex.com: did not receive HSTS header
-damifph.com: could not connect to host
-damjanovic.work: could not connect to host
-damongant.de: could not connect to host
-damtosfoods.com: did not receive HSTS header
-dan-informacijske-varnosti.si: could not connect to host
-dan.org.nz: did not receive HSTS header
-danaketh.com: could not connect to host
-dancebuzz.co.uk: did not receive HSTS header
-dancerdates.net: did not receive HSTS header
-dandan101.com: could not connect to host
-dandymrsb.com: could not connect to host
-daneandthepain.com: did not receive HSTS header
-dangmai.tk: could not connect to host
-daniel-du.com: did not receive HSTS header
-daniel-mosquera.com: could not connect to host
-daniel-stahl.net: could not connect to host
-daniel-steuer.de: could not connect to host
-daniel.domains: did not receive HSTS header
-daniela-schwarz-individuelle-lebensberatung-coaching.de: did not receive HSTS header
-danielcowie.me: could not connect to host
-danieldk.eu: did not receive HSTS header
-danielfeau.com: did not receive HSTS header
-danielgraziano.ca: could not connect to host
-danieljireh.com: did not receive HSTS header
-danielkeppler.com: could not connect to host
-danielmostertman.nl: could not connect to host
-danieln.tech: could not connect to host
-danielschreurs.com: did not receive HSTS header
-danielt.co.uk: did not receive HSTS header
-danielve.ga: could not connect to host
-danielverlaan.nl: could not connect to host
-danielworthy.com: did not receive HSTS header
-danielzuzevich.com: could not connect to host
-daniilgeorge.com: did not receive HSTS header
-danijobs.com: could not connect to host
-danishenanigans.com: could not connect to host
-dankeblog.com: could not connect to host
-dankredues.com: could not connect to host
-danmark.guide: did not receive HSTS header
-danna888.com: max-age too low: 0
-dannycrichton.com: did not receive HSTS header
-dannyrohde.de: did not receive HSTS header
-danova.de: did not receive HSTS header
-danrl.de: could not connect to host
-dansa.com.co: could not connect to host
-danscomp.com: did not receive HSTS header
-dansk-skole.de: did not receive HSTS header
-danskringsporta.be: did not receive HSTS header
-danstoncu.be: could not connect to host
-dantelistan.com: could not connect to host
-daolerp.xyz: could not connect to host
-daplie.com: could not connect to host
-dapps.earth: could not connect to host
-dappworld.com: could not connect to host
-darbi.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-darbtech.net: did not receive HSTS header
-daren.com.br: could not connect to host
-daretogain.com: could not connect to host
-dargasia.is: could not connect to host
-darinjohnson.ca: could not connect to host
-dario.im: did not receive HSTS header
-darioackermann.ch: could not connect to host
-dariosirangelo.me: did not receive HSTS header
-darisni.me: did not receive HSTS header
-dark-x.cf: could not connect to host
-darkanzali.pl: could not connect to host
-darkdestiny.ch: could not connect to host
-darkestproductions.net: could not connect to host
-darkhole.cn: did not receive HSTS header
-darkhunter.eu: could not connect to host
-darkishgreen.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-darknebula.space: did not receive HSTS header
-darknode.in: did not receive HSTS header
-darkpony.ru: could not connect to host
-darkroomsaredead.com: could not connect to host
-darkside.re: did not receive HSTS header
-darksideof.it: could not connect to host
-darkspacelab.com: could not connect to host
-darkstance.org: could not connect to host
-darktree.in: could not connect to host
-darkwebnews.com: could not connect to host
-darlastudio66.com: did not receive HSTS header
-darookee.net: did not receive HSTS header
-daropia.org: did not receive HSTS header
-darrenellis.xyz: could not connect to host
-darrenm.net: could not connect to host
-dart-tanke.com: could not connect to host
-dart-tanke.de: could not connect to host
-dartsdon.jp: could not connect to host
-dartshopmn.nl: did not receive HSTS header
-dartydiscount.fr: could not connect to host
-daryl.moe: could not connect to host
-das-ee.com: did not receive HSTS header
-das-tyrol.at: did not receive HSTS header
-dash-board.jp: could not connect to host
-dash.rocks: did not receive HSTS header
-dashabi.today: could not connect to host
-dashabi.ws: could not connect to host
-dashboard.run: could not connect to host
-dashboard.yt: could not connect to host
-dashburst.com: did not receive HSTS header
-dashnimorad.com: did not receive HSTS header
-data-abundance.com: could not connect to host
-data-detox.com: could not connect to host
-data.qld.gov.au: did not receive HSTS header
-databasez.net: could not connect to host
-databeam.de: could not connect to host
-datacandy.com: did not receive HSTS header
-datacave.is: could not connect to host
-datacenternews.co.nz: did not receive HSTS header
-datacool.host: did not receive HSTS header
-datacool.tk: could not connect to host
-datacubed.com: did not receive HSTS header
-datadiggers.com: could not connect to host
-datagir.ir: did not receive HSTS header
-dataguidance.com: max-age too low: 2592000
-datahoarder.download: could not connect to host
-datahoarder.xyz: could not connect to host
-datahoarderschool.club: could not connect to host
-dataisme.com: did not receive HSTS header
-datajapan.co.jp: did not receive HSTS header
-datamatic.ru: could not connect to host
-dataprotectionadvisors.com: did not receive HSTS header
-datapure.net: could not connect to host
-dataretention.solutions: could not connect to host
-datascomemorativas.com.br: did not receive HSTS header
-datasharesystem.com: did not receive HSTS header
-datasnitch.co.uk: could not connect to host
-datatekniikka.com: could not connect to host
-datedeposit.com: could not connect to host
-datelligent.com: could not connect to host
-datengrab.ws: could not connect to host
-datenlast.de: did not receive HSTS header
-datenreiter.cf: could not connect to host
-datenreiter.gq: could not connect to host
-datenreiter.ml: could not connect to host
-datenreiter.tk: could not connect to host
-datine.com.br: could not connect to host
-datingsite-vergelijken.website: could not connect to host
-datingticino.ch: could not connect to host
-datorb.com: could not connect to host
-datortipsen.se: could not connect to host
-datovyaudit.cz: could not connect to host
-datsound.ru: did not receive HSTS header
-datsumou-q.com: could not connect to host
-datumou-recipe.com: did not receive HSTS header
-datvexehue.com: did not receive HSTS header
-daveedave.de: could not connect to host
-daverandom.com: could not connect to host
-davewut.ca: could not connect to host
-david-mallett.com: did not receive HSTS header
-davidandkailey.com: could not connect to host
-davidbrito.tech: could not connect to host
-davidcrx.net: could not connect to host
-daviddever.net: did not receive HSTS header
-davidforward.com: did not receive HSTS header
-davidforward.net: could not connect to host
-davidglidden.eu: could not connect to host
-davidletellier.com: could not connect to host
-davidlillo.com: could not connect to host
-davidnadaski.com: could not connect to host
-davidnoren.com: did not receive HSTS header
-davidops.com: did not receive HSTS header
-davidreinhardt.de: could not connect to host
-davidscherzer.at: could not connect to host
-davidzack.net: did not receive HSTS header
-davimun.org: could not connect to host
-davisroi.com: did not receive HSTS header
-davros.eu: could not connect to host
-davros.ru: could not connect to host
-davypropper.com: could not connect to host
-dawena.de: did not receive HSTS header
-dawnofeden.org: could not connect to host
-dawnofhope.tk: could not connect to host
-dawnson.is: could not connect to host
-dawnsonb.com: could not connect to host
-day-peak.com: did not receive HSTS header
-day.vip: could not connect to host
-daydream.team: could not connect to host
-daylight-dream.ee: did not receive HSTS header
-daylightcompany.com: did not receive HSTS header
-days.one: could not connect to host
-daytonaseaside.com: did not receive HSTS header
-daywalkers-photography.de: could not connect to host
-db-sanity.com: could not connect to host
-db.gy: could not connect to host
-dbapress.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-dbb.wtf: could not connect to host
-dbcom.ru: did not receive HSTS header
-dbdc.us: did not receive HSTS header
-dbjl.fr: did not receive HSTS header
-dblx.io: could not connect to host
-dbmxpca.com: did not receive HSTS header
-dbox.ga: did not receive HSTS header
-dbpmedia.se: did not receive HSTS header
-dbudj.com: max-age too low: 0
-dbw678.com: could not connect to host
-dbx.ovh: could not connect to host
-dbyz.co.uk: did not receive HSTS header
-dc-service.by: did not receive HSTS header
-dc585.info: could not connect to host
-dcaracing.nl: could not connect to host
-dcards.in.th: could not connect to host
-dcareer.tk: could not connect to host
-dcautomacao.com.br: did not receive HSTS header
-dccode.gov: could not connect to host
-dccoffeeproducts.com: did not receive HSTS header
-dccommunity.de: did not receive HSTS header
-dccraft.net: could not connect to host
-dcl.re: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-dctxf.com: did not receive HSTS header
-dcuofriends.net: could not connect to host
-dd33d.net: could not connect to host
-dd5197.co: could not connect to host
-dd6729.co: could not connect to host
-dd6729.com: did not receive HSTS header
-dd6957.co: could not connect to host
-dd7211.com: did not receive HSTS header
-dd9297.co: could not connect to host
-dd9397.com: did not receive HSTS header
-dd9721.com: did not receive HSTS header
-dd9728.co: could not connect to host
-dden.website: could not connect to host
-dden.xyz: could not connect to host
-ddholdingservices.com: could not connect to host
-ddmeportal.com: could not connect to host
-ddns-anbieter.de: could not connect to host
-ddocu.me: could not connect to host
-ddos-mitigation.co.uk: could not connect to host
-ddos-mitigation.info: could not connect to host
-ddproxy.cf: could not connect to host
-ddy.tw: could not connect to host
-de-osopanda.com: could not connect to host
-de-servers.de: could not connect to host
-de-spil.be: could not connect to host
-deadbyhost.com: did not receive HSTS header
-deadmann.com: could not connect to host
-deai-life.biz: could not connect to host
-dealpass.no: did not receive HSTS header
-deals.ms: did not receive HSTS header
-deanisa.ninja: could not connect to host
-deanstreettacochips.com: did not receive HSTS header
-dearly.com: did not receive HSTS header
-dearstackexchange.com: did not receive HSTS header
-deathberry.ddns.net: could not connect to host
-debank.tv: did not receive HSTS header
-debarras-diogene.paris: could not connect to host
-debarrasantony.com: could not connect to host
-debarrasasnieressurseine.com: could not connect to host
-debarrasboulognebillancourt.com: could not connect to host
-debarrasclichy.com: could not connect to host
-debarrascolombes.com: could not connect to host
-debarrasnanterre.com: could not connect to host
-debatch.se: could not connect to host
-debauchery.ml: could not connect to host
-debian-vhost.de: could not connect to host
-debiton.dk: could not connect to host
-debitoutil.com: did not receive HSTS header
-debitpaie.com: did not receive HSTS header
-debkleinteam.com: could not connect to host
-deblocking.ga: could not connect to host
-debora-singkreis.de: could not connect to host
-deborahmarinelli.eu: could not connect to host
-debraydesign.com.au: could not connect to host
-debt.com: did not receive HSTS header
-debtkit.co.uk: did not receive HSTS header
-debtprotectionreporting.com: could not connect to host
-decaffeinated.io: did not receive HSTS header
-decafu.co: could not connect to host
-decayshop.com: did not receive HSTS header
-decentralizedweb.net: did not receive HSTS header
-decesus.com: could not connect to host
-decfun.com: could not connect to host
-decher.de: did not receive HSTS header
-decibelios.li: could not connect to host
-decidetreatment.org: could not connect to host
-deckbuilderamerica.com: did not receive HSTS header
-deckersheaven.com: could not connect to host
-declivitas.com: could not connect to host
-decloverly.com: could not connect to host
-deco.me: could not connect to host
-decoacerospanama.com: could not connect to host
-decoating.pl: could not connect to host
-decoboutique.com: did not receive HSTS header
-decodeanddestroy.com: could not connect to host
-decoder.link: did not receive HSTS header
-decofire.pl: did not receive HSTS header
-decomplify.com: did not receive HSTS header
-deconsolutions.com: did not receive HSTS header
-decoraid.com: did not receive HSTS header
-decorauvent.ca: did not receive HSTS header
-decorincasa.com.br: could not connect to host
-decorland.com.ua: could not connect to host
-decormiernissanparts.com: could not connect to host
-decoyrouting.com: did not receive HSTS header
-decstasy.de: did not receive HSTS header
-dedeo.tk: could not connect to host
-dedicatutiempo.es: could not connect to host
-dedietrich-asia.com: did not receive HSTS header
-dedimax.de: did not receive HSTS header
-deedyinc.com: could not connect to host
-deejayevents.ro: did not receive HSTS header
-deeonix.eu: could not connect to host
-deep.social: did not receive HSTS header
-deepaero.com: could not connect to host
-deeparamaraj.com: could not connect to host
-deepblue-web.cn: could not connect to host
-deepcovelabs.net: could not connect to host
-deepcreampie.com: could not connect to host
-deepearth.uk: could not connect to host
-deeperxh.com: did not receive HSTS header
-deeployr.io: could not connect to host
-deepnet.cc: could not connect to host
-deeprecce.com: could not connect to host
-deeprecce.link: could not connect to host
-deeprecce.tech: could not connect to host
-deeps.cat: could not connect to host
-deeps.me: could not connect to host
-deepvalley.tech: could not connect to host
-deepvision.com.ua: did not receive HSTS header
-deepwealth.institute: did not receive HSTS header
-deepzz.com: did not receive HSTS header
-deer.team: did not receive HSTS header
-deetz.nl: did not receive HSTS header
-deetzen.de: did not receive HSTS header
-deezeno.com: could not connect to host
-defektologiya.tk: could not connect to host
-defendtheweb.co.uk: did not receive HSTS header
-defi-metier.com: could not connect to host
-defi-metier.fr: could not connect to host
-defi-metier.org: could not connect to host
-defi-metiers.com: could not connect to host
-defi-metiers.fr: did not receive HSTS header
-defi-metiers.org: could not connect to host
-defifa.ga: did not receive HSTS header
-defiler.tk: could not connect to host
-defimetier.fr: could not connect to host
-defimetier.org: could not connect to host
-defimetiers.com: could not connect to host
-defimetiers.fr: could not connect to host
-defman.me: did not receive HSTS header
-defme.eu: could not connect to host
-defrax.com: could not connect to host
-defrax.de: did not receive HSTS header
-degosoft.nl: could not connect to host
-degrasboom.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-degroetenvanrosaline.nl: could not connect to host
-dehydrated.de: could not connect to host
-deight.co: could not connect to host
-deight.in: could not connect to host
-deinewebsite.de: did not receive HSTS header
-deinserverhost.de: did not receive HSTS header
-deinsparen24.de: could not connect to host
-deionized.ga: could not connect to host
-dejan.media: did not receive HSTS header
-dekasan.ru: could not connect to host
-dekka.cz: did not receive HSTS header
-dekkercreativedesign.nl: did not receive HSTS header
-dekoh-shouyu.com: did not receive HSTS header
-delandalucia.com: did not receive HSTS header
-delawarenation-nsn.gov: did not receive HSTS header
-delayrefunds.co.uk: could not connect to host
-delcan.ga: could not connect to host
-delcan.ml: could not connect to host
-delcopa.gov: did not receive HSTS header
-delegao.moe: could not connect to host
-delf.co.jp: did not receive HSTS header
-delfino.cr: did not receive HSTS header
-delhitalkie.com: did not receive HSTS header
-deli-tochigi.jp: did not receive HSTS header
-delitto.top: could not connect to host
-deliver.moe: could not connect to host
-deliverance.co.uk: could not connect to host
-delivery.co.at: did not receive HSTS header
-deliveryiquique.cl: could not connect to host
-delkniga42.ru: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-dellipaoli.com: could not connect to host
-deltaconcepts.de: did not receive HSTS header
-deltasmart.ch: did not receive HSTS header
-deluxecccam.tv: could not connect to host
-delvickokolo.me: did not receive HSTS header
-delvj.org: could not connect to host
-demandware.com: did not receive HSTS header
-demarche-expresse.com: did not receive HSTS header
-demdis.org: could not connect to host
-demilitarized.ninja: could not connect to host
-demo-server.us: could not connect to host
-demo.sb: could not connect to host
-demoakasafe2.tk: could not connect to host
-democracy.io: did not receive HSTS header
-democraticdifference.com: could not connect to host
-demoserv.fr: could not connect to host
-demotops.com: could not connect to host
-demuzere.com: could not connect to host
-demuzere.eu: could not connect to host
-demuzere.net: could not connect to host
-demuzere.org: could not connect to host
-dengchangdong.com: did not receive HSTS header
-denh.am: could not connect to host
-denimio.com: did not receive HSTS header
-denisjean.fr: could not connect to host
-denissealatinsoul.com: could not connect to host
-dennispotter.eu: did not receive HSTS header
-densmirnov.com: max-age too low: 7776000
-dent.uy: could not connect to host
-dental-misaki.com: did not receive HSTS header
-dentaldomain.org: did not receive HSTS header
-dentaldomain.ph: did not receive HSTS header
-dentals.cf: could not connect to host
-dentanestplus.com: did not receive HSTS header
-dentoncounty.gov: did not receive HSTS header
-denvercybersecurity.com: did not receive HSTS header
-denverphilharmonic.org: did not receive HSTS header
-denverprophit.us: did not receive HSTS header
-deonlinespecialist.nl: did not receive HSTS header
-depaddestoeltjes.be: did not receive HSTS header
-deped.blog: could not connect to host
-deped.io: could not connect to host
-deped.org: could not connect to host
-depedncr.com: could not connect to host
-depedshs.com: could not connect to host
-depedtalks.com: could not connect to host
-depedtambayan.org.ph: could not connect to host
-depedtayo.com: could not connect to host
-deperewi.gov: did not receive HSTS header
-depijl-mz.nl: did not receive HSTS header
-depilacioncon.com: could not connect to host
-depixion.agency: could not connect to host
-deplorablesdaily.com: could not connect to host
-deployitwith.me: did not receive HSTS header
-depo.space: did not receive HSTS header
-depoker.top: could not connect to host
-depot-leipzig.de: did not receive HSTS header
-depth-co.jp: could not connect to host
-depuratori.milano.it: could not connect to host
-dequehablamos.es: could not connect to host
-der-stein-fluesterer.de: did not receive HSTS header
-derango.tk: could not connect to host
-derbyshiredotnet.co.uk: did not receive HSTS header
-derbyware.com: could not connect to host
-derchris.me: could not connect to host
-derechosdigitales.org: did not receive HSTS header
-derivativeshub.pro: could not connect to host
-derive.cc: could not connect to host
-derk-jan.com: could not connect to host
-derma-expert.eu: did not receive HSTS header
-dermacarecomplex.com: could not connect to host
-dermo-concept.de: did not receive HSTS header
-derpumpkinfuhrer.com: could not connect to host
-dersix.com: did not receive HSTS header
-dersoundhunter.de: could not connect to host
-derstulle.de: could not connect to host
-derwaldschrat.net: did not receive HSTS header
-derwolfe.net: did not receive HSTS header
-desarrollowp.com: did not receive HSTS header
-descargarwhatsappplusgratis.net: could not connect to host
-descartes-finance.com: did not receive HSTS header
-desert-maroc.com: did not receive HSTS header
-desgenst.ch: could not connect to host
-desiccantpackets.com: did not receive HSTS header
-design-fu.com: did not receive HSTS header
-design-production.jp: did not receive HSTS header
-designandmore.it: did not receive HSTS header
-designanyware.com.br: could not connect to host
-designartepublicidad.com: could not connect to host
-designdevs.eu: could not connect to host
-designedbygeniuses.com: could not connect to host
-designepublicidade.com.br: did not receive HSTS header
-designhotel-kronjuwel.de: did not receive HSTS header
-designsbykerrialee.co.uk: did not receive HSTS header
-designthinking.or.jp: did not receive HSTS header
-deskguide.info: did not receive HSTS header
-desktopgoldlink.com: did not receive HSTS header
-deskvip.com: could not connect to host
-desmo.gg: could not connect to host
-despachomartinyasociados.com: could not connect to host
-desportvriendenoverijse.tk: could not connect to host
-despotika.de: could not connect to host
-desserteagleselvenar.tk: could not connect to host
-desterman.ru: could not connect to host
-destileria.net.br: could not connect to host
-destinationbijoux.fr: could not connect to host
-destinationsofnewyorkstate.com: did not receive HSTS header
-destinattorneyjohngreene.com: did not receive HSTS header
-destinopiriapolis.com: did not receive HSTS header
-destinoytarot.com: did not receive HSTS header
-destom.be: could not connect to host
-desuperheroes.co: did not receive HSTS header
-desveja.com.br: could not connect to host
-detechnologiecooperatie.nl: did not receive HSTS header
-detector.exposed: could not connect to host
-detest.org: could not connect to host
-dethikiemtra.com: did not receive HSTS header
-deti-vse.ml: could not connect to host
-detiks.cf: could not connect to host
-detoxic.vn: could not connect to host
-detoxsinutritie.ro: could not connect to host
-detrapdoor.com: could not connect to host
-detroitrocs.org: did not receive HSTS header
-detski.center: could not connect to host
-detskysad.com: could not connect to host
-detuprovincia.cl: did not receive HSTS header
-detusmascotas.com: could not connect to host
-detutorial.com: max-age too low: 36000
-detyamobuv.tk: could not connect to host
-deuchnord.fr: could not connect to host
-deusu.de: did not receive HSTS header
-deusu.org: did not receive HSTS header
-deutsche-seniorenbetreuung.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-deux.solutions: could not connect to host
-deuxmetrescubes.fr: did not receive HSTS header
-deuxsol.co: could not connect to host
-deuxsol.com: could not connect to host
-deuxsolutions.com: could not connect to host
-deuxvia.com: could not connect to host
-dev: could not connect to host
-dev-aegon.azurewebsites.net: could not connect to host
-dev-bluep.pantheonsite.io: did not receive HSTS header
-dev-dot-naga-226708.appspot.com: did not receive HSTS header
-dev-pulse-mtn.pantheonsite.io: did not receive HSTS header
-dev-sev-web.pantheonsite.io: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-dev-talk.eu: could not connect to host
-dev-talk.net: could not connect to host
-devafterdark.com: could not connect to host
-devapi.pro: did not receive HSTS header
-devb.nl: could not connect to host
-devcu.com: could not connect to host
-devcu.net: could not connect to host
-devdesco.com: could not connect to host
-devdoodle.net: could not connect to host
-develop.fitness: could not connect to host
-develope.cz: could not connect to host
-developer.mydigipass.com: could not connect to host
-developerfair.com: did not receive HSTS header
-developersclub.website: did not receive HSTS header
-develux.com: did not receive HSTS header
-devenney.io: did not receive HSTS header
-devh.net: could not connect to host
-deviajesturismo.com: could not connect to host
-deviltracks.net: could not connect to host
-devin-balimuhac.de: did not receive HSTS header
-devincrow.me: could not connect to host
-devinpacker.com: did not receive HSTS header
-devisnow.fr: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-devisonline.ch: could not connect to host
-devistravaux.org: did not receive HSTS header
-devkid.net: did not receive HSTS header
-devkiwi.club: could not connect to host
-devklog.net: could not connect to host
-devmsg.com: could not connect to host
-devnsec.com: did not receive HSTS header
-devnull.team: could not connect to host
-devonsawatzky.ca: could not connect to host
-devonvintagechina.co.uk: did not receive HSTS header
-devopers.com.br: could not connect to host
-devopps.me: could not connect to host
-devops.moe: could not connect to host
-devopsconnected.com: could not connect to host
-devpgsv.com: did not receive HSTS header
-devpsy.info: could not connect to host
-devrandom.net: could not connect to host
-devrim.io: could not connect to host
-devstroke.io: could not connect to host
-devtestfan1.gov: could not connect to host
-devtub.com: could not connect to host
-devuan.org: did not receive HSTS header
-devun.limited: could not connect to host
-devyn.ca: did not receive HSTS header
-dewebwerf.nl: did not receive HSTS header
-dewin.io: could not connect to host
-dexonrest.azurewebsites.net: could not connect to host
-dezintranet.com: max-age too low: 1
-dezshop24.de: did not receive HSTS header
-df3312.com: could not connect to host
-df3313.com: could not connect to host
-df3314.com: could not connect to host
-df3315.com: could not connect to host
-df3316.com: could not connect to host
-df3317.com: could not connect to host
-df3318.com: could not connect to host
-df3319.com: could not connect to host
-df5101.com: could not connect to host
-df5102.com: could not connect to host
-df5103.com: could not connect to host
-df5104.com: could not connect to host
-df5aa.com: could not connect to host
-df5bb.com: could not connect to host
-df5cc.com: could not connect to host
-df5dd.com: could not connect to host
-df5ee.com: could not connect to host
-df63.cc: could not connect to host
-dfc.gov: did not receive HSTS header
-dfekt.no: could not connect to host
-dfixit.com: could not connect to host
-dfrance.com.br: could not connect to host
-dfviana.com.br: max-age too low: 2592000
-dg68.cc: could not connect to host
-dg7.in: did not receive HSTS header
-dgby.org: could not connect to host
-dggm.ru: did not receive HSTS header
-dggwp.de: did not receive HSTS header
-dh6729.com: could not connect to host
-dh9397.com: could not connect to host
-dh9721.com: could not connect to host
-dharamkot.com: could not connect to host
-dharma.ai: did not receive HSTS header
-dhbr.org: did not receive HSTS header
-dhde.de: did not receive HSTS header
-dhl-smart.ch: could not connect to host
-dhlcotizadorexpo-qa.azurewebsites.net: could not connect to host
-dhpcs.com: did not receive HSTS header
-dhpiggott.net: did not receive HSTS header
-dhtr.pw: could not connect to host
-dhub.xyz: could not connect to host
-dhxxls.com: could not connect to host
-di2pra.com: did not receive HSTS header
-di2pra.fr: could not connect to host
-diabetesblog.org: could not connect to host
-diablotine.rocks: could not connect to host
-diabolic.chat: could not connect to host
-diadorafitness.es: could not connect to host
-diagnocentro.cl: could not connect to host
-diagnosia.com: did not receive HSTS header
-diagnostix.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-diagonale-deco.fr: did not receive HSTS header
-diagrammingoutloud.co.uk: did not receive HSTS header
-dialect-agency.eu.org: could not connect to host
-dialectic-og.com: could not connect to host
-diamondcare.com.br: could not connect to host
-diamondgrid.ga: did not receive HSTS header
-diamondpkg.org: could not connect to host
-diamondt.us: could not connect to host
-dianafaraj.de: did not receive HSTS header
-dianlujitao.com: did not receive HSTS header
-diannaobos.com: did not receive HSTS header
-dianpi.net: could not connect to host
-dianurse.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-diare-na-miru.cz: could not connect to host
-diariorp.com.br: did not receive HSTS header
-diasp.cz: could not connect to host
-diavo.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-dicando.com: could not connect to host
-diccionarioabierto.com: could not connect to host
-diceduels.com: could not connect to host
-dicgaming.net: could not connect to host
-dichgans-besserer.de: did not receive HSTS header
-dichvudangkygiayphep.com: could not connect to host
-dickieslife.com: did not receive HSTS header
-dickord.club: could not connect to host
-diconnex.com: did not receive HSTS header
-didigotoffer.com: could not connect to host
-didikhari.web.id: did not receive HSTS header
-didtrumpopengovernmentyet.com: could not connect to host
-die-besten-bewertungen.de: did not receive HSTS header
-die-besten-weisheiten.de: could not connect to host
-die-bobbeloase.com: could not connect to host
-die-speisekammer-reutlingen.de: could not connect to host
-dieb.photo: could not connect to host
-diedrich.me: could not connect to host
-diegobarrosmaia.com.br: could not connect to host
-diegogonzalez.com.co: could not connect to host
-diegotoledo.com.br: did not receive HSTS header
-diejanssens.net: could not connect to host
-diemogebhardt.com: did not receive HSTS header
-diepanhcare.com: did not receive HSTS header
-dierenkruiden.nl: did not receive HSTS header
-dieser.me: could not connect to host
-dieta-figura.tk: could not connect to host
-dietaanticelulitica.com: could not connect to host
-dietaanticelulitis.com: could not connect to host
-dietacelulitis.com: could not connect to host
-dietafeliz.com: could not connect to host
-dietagespresse.com: did not receive HSTS header
-dietervandenbroeck.be: max-age too low: 0
-diewebstube.de: could not connect to host
-diezel.com: could not connect to host
-diff2html.xyz: did not receive HSTS header
-digaxtest.com: could not connect to host
-diggable.co: did not receive HSTS header
-digibild.ch: did not receive HSTS header
-digibones.be: did not receive HSTS header
-digicert-support.com: could not connect to host
-digicert.nl: did not receive HSTS header
-digiepoxypaint.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-digihyp.ch: could not connect to host
-digikol.net: could not connect to host
-digimomedia.co.uk: could not connect to host
-diginota.com: did not receive HSTS header
-digipitch.com: did not receive HSTS header
-digipl.com: could not connect to host
-digired.xyz: could not connect to host
-digital-muscle.com.au: did not receive HSTS header
-digital1world.com: could not connect to host
-digitalbank.kz: could not connect to host
-digitalcash.cf: could not connect to host
-digitalcloud.ovh: could not connect to host
-digitalcoffeepodcast.com: could not connect to host
-digitalcuko.com: did not receive HSTS header
-digitaldaddy.net: could not connect to host
-digitaldaily.de: did not receive HSTS header
-digitaldashboard.gov: could not connect to host
-digitaldatacenter.net: could not connect to host
-digitalero.rip: did not receive HSTS header
-digitalewelten.de: could not connect to host
-digitalexhale.com: did not receive HSTS header
-digitalezukunft-hagen.de: could not connect to host
-digitalezukunft.nrw: could not connect to host
-digitalfishfun.com: did not receive HSTS header
-digitalgyan.org: did not receive HSTS header
-digitalimpostor.co.uk: could not connect to host
-digitaljungle.net: did not receive HSTS header
-digitallocker.com: did not receive HSTS header
-digitalmaniac.co.uk: could not connect to host
-digitalmarketingindallas.com: could not connect to host
-digitalnonplus.com: could not connect to host
-digitalquery.com: did not receive HSTS header
-digitalroar.com: could not connect to host
-digitalrxcloud.com: could not connect to host
-digitalspiders.pk: could not connect to host
-digitaltechnologies.ltd.uk: did not receive HSTS header
-digitalwasteland.net: did not receive HSTS header
-digitiqo.com: could not connect to host
-digitise.io: did not receive HSTS header
-digixcellence.com: could not connect to host
-diguass.us: could not connect to host
-dijkmanvandoorn.nl: did not receive HSTS header
-dijks.com: could not connect to host
-dikshant.net: could not connect to host
-dildosconsoladores.cl: could not connect to host
-dillynbarber.com: could not connect to host
-diluv.com: could not connect to host
-dim.lighting: could not connect to host
-dimdom.com.br: did not receive HSTS header
-dimensionen.de: did not receive HSTS header
-dimes.com.tr: did not receive HSTS header
-dimeshop.nl: did not receive HSTS header
-dimseklubben.dk: could not connect to host
-din-tools.com: did not receive HSTS header
-dinamobet2.com: did not receive HSTS header
-dinamoelektrik.com: could not connect to host
-dineachook.com.au: did not receive HSTS header
-dingcc.com: could not connect to host
-dingcc.me: could not connect to host
-dingcc.org: could not connect to host
-dingcc.xyz: could not connect to host
-dinge.xyz: did not receive HSTS header
-dingelbob-schuhcreme.gq: could not connect to host
-dingss.com: could not connect to host
-dinkum.online: could not connect to host
-dino.lol: could not connect to host
-dinotopia.org.uk: could not connect to host
-dinotv.at: could not connect to host
-dintillat.fr: could not connect to host
-dinube.com: could not connect to host
-dioesfoto.com: could not connect to host
-dionysus.se: could not connect to host
-diozoid.com: could not connect to host
-dipconsultants.com: could not connect to host
-dipietro.id.au: could not connect to host
-direct365.es: could not connect to host
-directebanking.com: did not receive HSTS header
-directhskincream.com: could not connect to host
-directinsure.in: did not receive HSTS header
-directme.ga: could not connect to host
-directorinegocis.cat: could not connect to host
-directoriostelefonicos.com: could not connect to host
-directscripts.com: did not receive HSTS header
-directtwo.solutions: could not connect to host
-directtwosolutions.org: could not connect to host
-directwatertanks.co.uk: did not receive HSTS header
-direnv.net: did not receive HSTS header
-diretashop.com: could not connect to host
-direwolfsoftware.ca: could not connect to host
-dirips.com: did not receive HSTS header
-dirk-scheele.de: max-age too low: 2592000
-dirtcraft.ca: could not connect to host
-dirtycat.ru: could not connect to host
-disabledporn.com: could not connect to host
-disavow.tools: did not receive HSTS header
-discha.net: did not receive HSTS header
-disciplesmakingdisciples.ca: could not connect to host
-disciplina.io: did not receive HSTS header
-discipul.nl: could not connect to host
-disco-crazy-world.de: could not connect to host
-discord-chan.net: could not connect to host
-discordghost.space: could not connect to host
-discotek.club: did not receive HSTS header
-discountmania.eu: did not receive HSTS header
-discountmetaux.fr: did not receive HSTS header
-discover-mercure.com: could not connect to host
-discoveringdocker.com: could not connect to host
-discoverrsv.com: could not connect to host
-discoverwellness.center: could not connect to host
-discovery.lookout.com: did not receive HSTS header
-discoveryottawa.ca: could not connect to host
-discoveryrom.org: could not connect to host
-discreet-condooms.nl: did not receive HSTS header
-disinfestazionizanzare.milano.it: could not connect to host
-disinfestazionizanzare.roma.it: could not connect to host
-dislocated.de: did not receive HSTS header
-disorderboutique.com: did not receive HSTS header
-dispatchitsolutions.com: could not connect to host
-dispatchitsolutions.io: could not connect to host
-disruptivelabs.net: could not connect to host
-disruptivelabs.org: could not connect to host
-dissident.host: could not connect to host
-dissimulo.me: could not connect to host
-distiduffer.org: could not connect to host
-distinctdesign2009.com: could not connect to host
-distinctivephotography.com.au: could not connect to host
-distinguishedwindows.co.uk: did not receive HSTS header
-distraction.gov: could not connect to host
-distractionco.de: did not receive HSTS header
-distributednya.com: could not connect to host
-distrilogservices.com: could not connect to host
-distrishow.fr: did not receive HSTS header
-distrivalle.ec: did not receive HSTS header
-ditch.ch: could not connect to host
-ditrutoancau.vn: could not connect to host
-dittvertshus.no: could not connect to host
-diva-ey.com: could not connect to host
-divedowntown.com: did not receive HSTS header
-divegearexpress.com.cn: could not connect to host
-divegearexpress.net: could not connect to host
-divenwa.com: could not connect to host
-diver-equipment.eu: could not connect to host
-diversity-spielzeug.de: did not receive HSTS header
-divertiagua.com.br: could not connect to host
-dividendz.net: could not connect to host
-divinemercyparishvlds.com: did not receive HSTS header
-divisasexpress.com: did not receive HSTS header
-divistart.online: did not receive HSTS header
-divorcelawyersformen.com: did not receive HSTS header
-divvi.co.nz: did not receive HSTS header
-divvymonkey.com: could not connect to host
-divvyradio.com: could not connect to host
-dixi.fi: did not receive HSTS header
-dixi.ml: could not connect to host
-dixiediner.com: did not receive HSTS header
-dixmag.com: could not connect to host
-diygod.me: did not receive HSTS header
-diysec.tk: could not connect to host
-diz.in.ua: could not connect to host
-dizihocasi.com: could not connect to host
-dizorg.net: could not connect to host
-dizzie.org: could not connect to host
-dizzieforums.com: could not connect to host
-dj16888.com: could not connect to host
-dj16888a.com: could not connect to host
-dj16888b.com: could not connect to host
-dj16888c.com: could not connect to host
-dj16888d.com: could not connect to host
-dj4et.de: could not connect to host
-djangogolf.com: could not connect to host
-djdavid98.hu: did not receive HSTS header
-djeung.org: did not receive HSTS header
-djfafafa.com: could not connect to host
-djieno.com: did not receive HSTS header
-djl63.com: could not connect to host
-djl63001.com: could not connect to host
-djlive.pl: did not receive HSTS header
-djroynomden.nl: could not connect to host
-djsanonimo.com: could not connect to host
-djt-vom-chausseehaus.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-djul.net: could not connect to host
-djursland-psykologen.dk: did not receive HSTS header
-djvip1.com: did not receive HSTS header
-djvip10.com: did not receive HSTS header
-djvip2.com: did not receive HSTS header
-djvip3.com: did not receive HSTS header
-djvip4.com: did not receive HSTS header
-djvip5.com: did not receive HSTS header
-djvip6.com: did not receive HSTS header
-djvip7.com: did not receive HSTS header
-djvip9.com: did not receive HSTS header
-djxmmx.net: did not receive HSTS header
-djz4music.com: could not connect to host
-dk1818.cc: could not connect to host
-dkniss.de: could not connect to host
-dko-steiermark.ml: could not connect to host
-dktq2hj81vknv.cloudfront.net: did not receive HSTS header
-dl.google.com: did not receive HSTS header (error ignored - included regardless)
-dlabouncycastlehire.co.uk: could not connect to host
-dlbouncers.co.uk: could not connect to host
-dlc.viasinc.com: could not connect to host
-dlcwilson.com: could not connect to host
-dleger.space: could not connect to host
-dlemper.de: did not receive HSTS header
-dlld.biz: could not connect to host
-dlld.info: did not receive HSTS header
-dlouwrink.nl: could not connect to host
-dlrsp.org: could not connect to host
-dlyanxs.com: did not receive HSTS header
-dlyaribalki.tk: could not connect to host
-dlyl888.com: could not connect to host
-dm1.in: could not connect to host
-dmarketer.com: could not connect to host
-dmcastles.com: could not connect to host
-dmcglobaltravel.com.mx: did not receive HSTS header
-dmcibulldog.com: did not receive HSTS header
-dmdre.com: did not receive HSTS header
-dmeevalumate.com: did not receive HSTS header
-dmerkel.de: did not receive HSTS header
-dmess.ru: could not connect to host
-dmfd.net: could not connect to host
-dmix.ca: did not receive HSTS header
-dmk-realestate.com: could not connect to host
-dmlogic.com: could not connect to host
-dmschilderwerken.nl: did not receive HSTS header
-dmtry.me: max-age too low: 0
-dmwall.cn: could not connect to host
-dmx.xyz: could not connect to host
-dmz.ninja: could not connect to host
-dmzlab.se: could not connect to host
-dnastatic.com: did not receive HSTS header
-dndesign.be: did not receive HSTS header
-dne.lu: did not receive HSTS header
-dnfc.rocks: could not connect to host
-dnmaze.com: could not connect to host
-dns-manager.info: did not receive HSTS header
-dns.google.com: did not receive HSTS header (error ignored - included regardless)
-dnsbird.net: could not connect to host
-dnsbird.org: could not connect to host
-dnscrypt.org: did not receive HSTS header
-dnsge.org: did not receive HSTS header
-dnsinfo.ml: did not receive HSTS header
-dnsknowledge.com: did not receive HSTS header
-dnspod.ml: could not connect to host
-dnsql.io: could not connect to host
-dnswarden.com: could not connect to host
-dnzz123.com: did not receive HSTS header
-do-do.tk: did not receive HSTS header
-do-it.cz: did not receive HSTS header
-doadaybook.com: did not receive HSTS header
-doak.io: did not receive HSTS header
-doanhnhankhanhhoa.vn: did not receive HSTS header
-doanhnhanplus.vn: max-age too low: 0
-dobet.in: could not connect to host
-dobrev.family: could not connect to host
-dobryautoskup.pl: did not receive HSTS header
-dobsnet.net: did not receive HSTS header
-doc-baza.tk: could not connect to host
-doc-justice.com: did not receive HSTS header
-doceamoraviverbem.com: could not connect to host
-dochimera.com: could not connect to host
-dochitaceahlau.ro: could not connect to host
-docid.io: could not connect to host
-dockerm.com: could not connect to host
-dockerturkiye.com: could not connect to host
-docket.news: could not connect to host
-doclassworks.com: could not connect to host
-doclot.io: could not connect to host
-docnhanh.vn: could not connect to host
-docogo.ga: could not connect to host
-docs.re: did not receive HSTS header
-docset.io: could not connect to host
-docskiff.com: did not receive HSTS header
-docsoc.org.uk: did not receive HSTS header
-doctabaila.com: could not connect to host
-doctorbini.com: could not connect to host
-doctorsonmaps.com: did not receive HSTS header
-doculus.io: could not connect to host
-documentations-sociales.com: could not connect to host
-docupet.com: did not receive HSTS header
-docxtemplater.com: did not receive HSTS header
-doda.space: could not connect to host
-dodds.cc: could not connect to host
-doddy.tk: could not connect to host
-dodomu.ddns.net: could not connect to host
-doesmycodehavebugs.today: could not connect to host
-doeswindowssuckforeveryoneorjustme.com: could not connect to host
-dog-blum.com: did not receive HSTS header
-dogboarding.online: did not receive HSTS header
-dogbox.se: did not receive HSTS header
-dogcratereview.info: could not connect to host
-doge.me: did not receive HSTS header
-doge.town: could not connect to host
-dogeboy.com: could not connect to host
-dogespeed.ga: could not connect to host
-dogfi.sh: could not connect to host
-dogft.com: could not connect to host
-doggieholic.net: could not connect to host
-doggybag-committee.com: did not receive HSTS header
-dogma.it: could not connect to host
-dognlife.com: did not receive HSTS header
-dogoodbehappyllc.com: could not connect to host
-dogprograms.net: could not connect to host
-dogrockresorts.com: did not receive HSTS header
-dohosting.ru: could not connect to host
-dojifish.space: could not connect to host
-dojin.nagoya: could not connect to host
-dokan-e.com: did not receive HSTS header
-dokan.online: could not connect to host
-doked.io: could not connect to host
-dokspot.cf: could not connect to host
-dokspot.ga: could not connect to host
-doku-gilde.de: could not connect to host
-dokuraum.de: could not connect to host
-dolarcanadense.com.br: could not connect to host
-dolce-vita-mia.tk: could not connect to host
-doleta.gov: did not receive HSTS header
-dolevik.com: could not connect to host
-dollarrp.pl: could not connect to host
-dollarstore24.com: could not connect to host
-dollywiki.co.uk: could not connect to host
-dolmenejecutores.com: could not connect to host
-dolphin-cloud.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-dolphin-hosting.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-dolphin-it.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-dolphincorp.co.uk: did not receive HSTS header
-dolt.xyz: did not receive HSTS header
-dom-medicina.ru: did not receive HSTS header
-domaine-aigoual-cevennes.com: did not receive HSTS header
-domainelaremejeanne.com: did not receive HSTS header
-domainhacks.io: could not connect to host
-domainhostingcompany.tk: could not connect to host
-domainname.forsale: could not connect to host
-domains.autos: did not receive HSTS header
-domains.boats: did not receive HSTS header
-domains.homes: did not receive HSTS header
-domains.motorcycles: did not receive HSTS header
-domains.yachts: did not receive HSTS header
-domainvoider.cf: could not connect to host
-domaris.de: did not receive HSTS header
-domasazu.pl: did not receive HSTS header
-domashnij-pk.ru: could not connect to host
-domashnijpk.ru: could not connect to host
-domeconseil.fr: could not connect to host
-domen-reg.ru: could not connect to host
-domengrad.ru: could not connect to host
-domenicocatelli.com: could not connect to host
-dominicanosenpr.com: could not connect to host
-dominik-schlueter.de: could not connect to host
-dominikanskarepubliken.guide: could not connect to host
-dominikkulaga.pl: max-age too low: 1
-dominioanimal.com: did not receive HSTS header
-dominioanimal.com.br: could not connect to host
-domix.fun: could not connect to host
-domizx.de: could not connect to host
-domlist.tk: could not connect to host
-dommelschbierfusten.nl: did not receive HSTS header
-domoset.tk: could not connect to host
-domovitae.io: could not connect to host
-domovitae.nl: could not connect to host
-domquixoteepi.com.br: did not receive HSTS header
-domy-drewniane-kanadyjskie.pl: did not receive HSTS header
-don.yokohama: could not connect to host
-donateway.com: did not receive HSTS header
-donation.ph: could not connect to host
-donetsk24.su: did not receive HSTS header
-dong8.top: could not connect to host
-dongcdn.com: could not connect to host
-donghochinhhang.store: could not connect to host
-dongjingre.net: could not connect to host
-donhoward.org: did not receive HSTS header
-donlydental.ca: did not receive HSTS header
-donmaldeamores.com: did not receive HSTS header
-donmez.uk: could not connect to host
-donmez.ws: could not connect to host
-donna-bellini-business-fotografie-muenchen.de: did not receive HSTS header
-donna-bellini-fotografie-berlin.de: did not receive HSTS header
-donna-bellini-fotografie-erfurt.de: did not receive HSTS header
-donna-bellini-fotografie-frankfurt.de: did not receive HSTS header
-donna-bellini-fotografie-hamburg.de: did not receive HSTS header
-donna-bellini-fotografie-koeln.de: did not receive HSTS header
-donna-bellini-fotografie-muenchen.de: did not receive HSTS header
-donna-bellini-fotografie-nuernberg.de: did not receive HSTS header
-donna-bellini-fotografie-stuttgart.de: did not receive HSTS header
-donna-bellini-fotografie-wien.de: did not receive HSTS header
-donna-bellini-hochzeitsfotograf-frankfurt.de: did not receive HSTS header
-donna-bellini-hochzeitsfotograf-muenchen.de: did not receive HSTS header
-donnacha.blog: could not connect to host
-donotcall.gov: did not receive HSTS header
-donotspampls.me: could not connect to host
-donovand.info: could not connect to host
-donpaginasweb.com: did not receive HSTS header
-donsbach-edv.de: did not receive HSTS header
-donttrustrobots.nl: could not connect to host
-donzelot.co.uk: did not receive HSTS header
-donzool.es: could not connect to host
-doobydude.us: could not connect to host
-doodledraw.ninja: could not connect to host
-dooku.cz: could not connect to host
-doolz.co.nz: did not receive HSTS header
-doomleika.com: could not connect to host
-doooonoooob.com: could not connect to host
-doopdidoop.com: could not connect to host
-door.cards: could not connect to host
-dopetrue.com: could not connect to host
-dopfer-fenstertechnik.de: did not receive HSTS header
-dopost.it: could not connect to host
-doppenpost.nl: could not connect to host
-dopply.com: did not receive HSTS header
-dopravni-modely.cz: did not receive HSTS header
-dora.cat: could not connect to host
-dorco.be: did not receive HSTS header
-dorde.eu: could not connect to host
-doridian.net: could not connect to host
-doriginal.es: could not connect to host
-dorkfarm.com: did not receive HSTS header
-dormebebe.com.br: did not receive HSTS header
-dormkitty.com: could not connect to host
-dorquelle.com: could not connect to host
-dortmund.directory: could not connect to host
-dosdediez.com: did not receive HSTS header
-dosipe.com: could not connect to host
-doska.kz: did not receive HSTS header
-dosomeworks.biz: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-dostavkakurierom.ru: could not connect to host
-dostrece.net: did not receive HSTS header
-dosyanet.tk: could not connect to host
-dot.ro: could not connect to host
-dota2huds.com: did not receive HSTS header
-dotadata.me: could not connect to host
-dotb.dn.ua: did not receive HSTS header
-dotbrick.co.th: did not receive HSTS header
-dotconnor.com: did not receive HSTS header
-dotkod.com: could not connect to host
-dotnetsandbox.ca: could not connect to host
-dotrel.com: did not receive HSTS header
-dotspaperie.com: could not connect to host
-dotweb.cloud: did not receive HSTS header
-doubledash.org: did not receive HSTS header
-doublefun.net: could not connect to host
-doublelist.com: did not receive HSTS header
-doubleness.gq: could not connect to host
-doublestat.me: could not connect to host
-doublethink.online: could not connect to host
-doubleyummy.uk: did not receive HSTS header
-dougferris.id.au: did not receive HSTS header
-douglas-ma.gov: did not receive HSTS header
-douglasstafford.com: did not receive HSTS header
-doujin-domain.cz: could not connect to host
-doujin.nagoya: could not connect to host
-dounats.com: could not connect to host
-dovecotadmin.org: could not connect to host
-doveholesband.co.uk: did not receive HSTS header
-dovetailnow.com: could not connect to host
-dovro.de: did not receive HSTS header
-dowc.org: did not receive HSTS header
-download.jitsi.org: did not receive HSTS header
-downloadhindimovie.net: could not connect to host
-downloadhindimovies.net: could not connect to host
-downsouthweddings.com.au: did not receive HSTS header
-downtimerobot.com: could not connect to host
-downtownstevenspoint.org: did not receive HSTS header
-downtownvernon.com: did not receive HSTS header
-doxcelerate.com: could not connect to host
-doyoulyft.com: could not connect to host
-dozor.gq: could not connect to host
-dp2.com.br: did not receive HSTS header
-dpangerl.de: could not connect to host
-dprd-wonogirikab.go.id: max-age too low: 36000
-dpsart.it: could not connect to host
-dpucarriersma.gov: could not connect to host
-dq12321.com: max-age too low: 0
-dr-bodendorf.de: did not receive HSTS header
-dr-it.co.uk: did not receive HSTS header
-dr-jakob-zahnaerzte.de: did not receive HSTS header
-dr-krebs.net: did not receive HSTS header
-dr-royaghafourifard.com: did not receive HSTS header
-drabben.be: did not receive HSTS header
-drabbin.com: could not connect to host
-dracon.es: did not receive HSTS header
-dracoon.cloud: did not receive HSTS header
-drafton.com: could not connect to host
-drageeparadise.fr: did not receive HSTS header
-draghive.asia: could not connect to host
-draghive.ca: could not connect to host
-draghive.club: could not connect to host
-draghive.co: could not connect to host
-draghive.co.uk: could not connect to host
-draghive.net: could not connect to host
-draghive.org: could not connect to host
-draghive.photos: could not connect to host
-draghive.tv: could not connect to host
-dragon-aspect.com: could not connect to host
-dragoncityhack.tips: could not connect to host
-dragonfly.co.uk: did not receive HSTS header
-dragonisles.net: could not connect to host
-dragons-of-highlands.cz: did not receive HSTS header
-dragonsmoke.cloud: could not connect to host
-dragonstower.net: could not connect to host
-dragonteam.ninja: could not connect to host
-dragonwork.me: could not connect to host
-drainagebuizen.nl: did not receive HSTS header
-draireneborro.com: did not receive HSTS header
-drakefortreasurer.sexy: could not connect to host
-drakensberg-tourism.com: did not receive HSTS header
-dralexjimenez.com: did not receive HSTS header
-dranktoomuchlastnight.com: did not receive HSTS header
-drastosasports.com.br: did not receive HSTS header
-drawchan.org: could not connect to host
-drawingcode.net: could not connect to host
-drbarnabus.com: could not connect to host
-drbethanybarnes.com: did not receive HSTS header
-drchristinehatfield.ca: max-age too low: 0
-drdavidgilpin.com: did not receive HSTS header
-drdevil.ru: could not connect to host
-drdim.ru: could not connect to host
-drdripplumbingsydney.com.au: could not connect to host
-dreadbyte.com: could not connect to host
-dreadd.org: could not connect to host
-dreamaholic.club: could not connect to host
-dreamcatcherblog.de: could not connect to host
-dreamcreator108.com: could not connect to host
-dreamersgiftshopec.com: could not connect to host
-dreaming.solutions: could not connect to host
-dreamithost.com.au: did not receive HSTS header
-dreamkitchenbath.com: did not receive HSTS header
-dreamlighteyeserum.com: could not connect to host
-dreamlinehost.com: could not connect to host
-dreammakerremodelil.com: did not receive HSTS header
-dreamonkey.com: did not receive HSTS header
-dreamtechie.com: did not receive HSTS header
-dreamworldstudio.tk: could not connect to host
-dreax.win: could not connect to host
-dredgepress.com: did not receive HSTS header
-dreischneidiger.de: could not connect to host
-dreiweiden.de: could not connect to host
-dreizwosechs.de: could not connect to host
-dresdner-christstollen-von-reimann.de: could not connect to host
-dressify.co: could not connect to host
-drevanbeale.com: did not receive HSTS header
-drewgle.net: could not connect to host
-drfranciscofonseca.com.br: did not receive HSTS header
-drfun1.com: could not connect to host
-drgdrp.com: did not receive HSTS header
-drgiyaseddin.com: could not connect to host
-drhopeson.com: did not receive HSTS header
-driessoftsec.tk: could not connect to host
-drillnation.com.au: could not connect to host
-drinknaturespower.com: did not receive HSTS header
-drinkplanet.eu: could not connect to host
-drinkvabeer.com: could not connect to host
-dripdoctors.com: did not receive HSTS header
-drishti.guru: could not connect to host
-drive.xyz: could not connect to host
-driver61.com: did not receive HSTS header
-drivercopilot.com: could not connect to host
-drivermototaxi.fr: did not receive HSTS header
-drivewithstatetransit.com.au: did not receive HSTS header
-driving-lessons.co.uk: could not connect to host
-drivingacademy.tk: could not connect to host
-drivingtestpro.com: did not receive HSTS header
-drixn.cn: could not connect to host
-drixn.com: did not receive HSTS header
-drixn.info: could not connect to host
-drixn.net: could not connect to host
-drjenafernandez.com: did not receive HSTS header
-drjobs.com.au: could not connect to host
-drlazarina.net: did not receive HSTS header
-drlutfi.com: did not receive HSTS header
-drobniuch.pl: max-age too low: 2592000
-drogoz.moe: could not connect to host
-droidboss.com: could not connect to host
-droidwave.com: did not receive HSTS header
-droidwiki.de: could not connect to host
-droithxn.com: could not connect to host
-droncentrum.pl: could not connect to host
-dronebotworkshop.com: did not receive HSTS header
-dronexpertos.com: could not connect to host
-droobedu.com: did not receive HSTS header
-droomhuis-in-brielle-kopen.nl: could not connect to host
-droomhuis-in-de-friese-meren-kopen.nl: could not connect to host
-droomhuis-in-delfzijl-kopen.nl: could not connect to host
-droomhuis-in-friesland-kopen.nl: could not connect to host
-droomhuis-in-laren-kopen.nl: could not connect to host
-droomhuis-in-pekela-kopen.nl: could not connect to host
-droomhuis-in-rijnwaarden-kopen.nl: could not connect to host
-droomhuis-in-sudwest-fryslan-kopen.nl: could not connect to host
-droomhuis-in-veendam-kopen.nl: could not connect to host
-droomhuis-in-zeeland-kopen.nl: could not connect to host
-droomhuis-in-zuid-holland-kopen.nl: could not connect to host
-droomhuisindestadverkopen.nl: could not connect to host
-droomhuisophetplattelandverkopen.nl: could not connect to host
-dropcam.com: did not receive HSTS header
-drost.la: could not connect to host
-drostschocolates.com: did not receive HSTS header
-drpure.pw: could not connect to host
-drpure.top: could not connect to host
-drrodina.com: did not receive HSTS header
-drros.ru: could not connect to host
-drtis.com.br: did not receive HSTS header
-drtroyhendrickson.com: could not connect to host
-drtti.io: could not connect to host
-drturner.com.au: did not receive HSTS header
-drubn.de: did not receive HSTS header
-drugagodba.si: did not receive HSTS header
-drumbandesperanto.nl: could not connect to host
-drump-truck.com: did not receive HSTS header
-drupal123.com: could not connect to host
-druznek.me: did not receive HSTS header
-druznek.rocks: could not connect to host
-druznek.xyz: could not connect to host
-druzya.store: could not connect to host
-drvr.xyz: could not connect to host
-drweinrach.com: did not receive HSTS header
-drwxr.org: did not receive HSTS header
-drybasement.com: did not receive HSTS header
-drybasementkansas.com: did not receive HSTS header
-drycreekapiary.com: could not connect to host
-ds-christiansen.de: could not connect to host
-ds168.cc: could not connect to host
-ds388.cc: could not connect to host
-dsbmradio.tk: could not connect to host
-dsbrowser.com: did not receive HSTS header
-dsdalismerkezi.com: did not receive HSTS header
-dsdesign.lt: did not receive HSTS header
-dse-assessments.co.uk: did not receive HSTS header
-dshiv.io: could not connect to host
-dsi7.com: could not connect to host
-dsmstainlessproducts.co.uk: did not receive HSTS header
-dsne.com.mx: could not connect to host
-dso-imaging.co.uk: could not connect to host
-dsouzamusic.com: could not connect to host
-dssale.com: did not receive HSTS header
-dstvinstallalberton.co.za: did not receive HSTS header
-dstvinstalledenvale.co.za: did not receive HSTS header
-dstvinstallglenvista.co.za: did not receive HSTS header
-dstvinstalljohannesburg.co.za: did not receive HSTS header
-dstvinstallrandburg.co.za: did not receive HSTS header
-dstvrandburg.co.za: did not receive HSTS header
-dsyunmall.com: could not connect to host
-dt27.org: did not receive HSTS header
-dtcp8.com: could not connect to host
-dte.co.uk: did not receive HSTS header
-dtechstore.com.br: did not receive HSTS header
-dtk-vom-chausseehaus.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-dtpak.cz: max-age too low: 0
-dtub.co: could not connect to host
-dtune.me: could not connect to host
-dualias.xyz: could not connect to host
-duama.top: could not connect to host
-dubai-company.ae: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-dubaieveningsafari.com: did not receive HSTS header
-dubaire.com: could not connect to host
-dubaosheng.com: could not connect to host
-dubik.su: did not receive HSTS header
-dubrovnik-dental.clinic: did not receive HSTS header
-ducalendars.com: could not connect to host
-duchateaugyn.be: did not receive HSTS header
-duchyoffeann.com: could not connect to host
-ducius.net: could not connect to host
-duckasylum.com: did not receive HSTS header
-duckyubuntu.tk: could not connect to host
-ducohosting.com: did not receive HSTS header
-dudesunderwear.com.br: could not connect to host
-duelsow.eu: could not connect to host
-duelysthub.com: could not connect to host
-duerls.de: could not connect to host
-duerlund-falkenberg.dk: could not connect to host
-dugnet.tech: could not connect to host
-dui805.com: did not receive HSTS header
-dujsq.com: could not connect to host
-dujsq.top: could not connect to host
-dukec.me: could not connect to host
-dukefox.com: did not receive HSTS header
-dukesatqueens.com: did not receive HSTS header
-duks.com.br: could not connect to host
-dullsir.com: could not connect to host
-dumbdemo.com: could not connect to host
-dumbfunded.co.uk: max-age too low: 0
-dumbomove.com.au: did not receive HSTS header
-dumont.ovh: did not receive HSTS header
-dumpsters.com: did not receive HSTS header
-dunamiscommunity.com: could not connect to host
-dunashoes.com: could not connect to host
-dundalkdonnie.com: could not connect to host
-dune.io: did not receive HSTS header
-dunea.nl: did not receive HSTS header
-dunesadventure.net: could not connect to host
-dungbui.net: could not connect to host
-dunloptrade.com: did not receive HSTS header
-duo.money: could not connect to host
-duocircle.com: did not receive HSTS header
-duole30.com: could not connect to host
-duoluodeyu.com: could not connect to host
-duonganhtuan.com: could not connect to host
-duongpho.com: did not receive HSTS header
-dupree.pe: could not connect to host
-durangoenergyllc.com: could not connect to host
-durchblick-shop.de: could not connect to host
-durexwinkel.nl: could not connect to host
-durmatest.com: could not connect to host
-duroterm.ro: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-dushu.cat: could not connect to host
-duskopy.top: could not connect to host
-dusnan.com: could not connect to host
-dustycloth.com: could not connect to host
-dustyro.se: could not connect to host
-dutchdare.nl: did not receive HSTS header
-dutchrank.com: did not receive HSTS header
-dutyfreeonboard.com: could not connect to host
-duuu.ch: could not connect to host
-dverisochi.ru: did not receive HSTS header
-dvotx.org: did not receive HSTS header
-dwbtoftshit.com: did not receive HSTS header
-dwellstudio.com: did not receive HSTS header
-dwhd.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-dwienzek.de: did not receive HSTS header
-dwilawyer.pro: did not receive HSTS header
-dwnld.me: could not connect to host
-dworekhetmanski.pl: did not receive HSTS header
-dwword.com: did not receive HSTS header
-dx2o.com: could not connect to host
-dy1d.com: could not connect to host
-dycem-ns.com: did not receive HSTS header
-dycontrol.de: could not connect to host
-dylancl.cf: did not receive HSTS header
-dylanwise.net: could not connect to host
-dyn-nserve.net: could not connect to host
-dynamic-innovations.net: could not connect to host
-dynamic-networks.be: could not connect to host
-dynamictostatic.com: could not connect to host
-dynamicyou.co.uk: could not connect to host
-dynamize.solutions: did not receive HSTS header
-dynamo.city: did not receive HSTS header
-dynastyredzone.com: could not connect to host
-dyrvigs.de: did not receive HSTS header
-dyxe.me: could not connect to host
-dyxe.xyz: could not connect to host
-dyz.pw: could not connect to host
-dz6729.com: could not connect to host
-dz6957.com: could not connect to host
-dzi.wtf: could not connect to host
-dzimejl.sk: did not receive HSTS header
-dzlibs.io: could not connect to host
-dzndk.net: could not connect to host
-dzndk.org: could not connect to host
-dzu.life: could not connect to host
-dzyabchenko.com: could not connect to host
-e-apack.com.br: could not connect to host
-e-aut.net: could not connect to host
-e-baraxolka.ru: could not connect to host
-e-boekhouden.nl: could not connect to host
-e-businessexpert.com: did not receive HSTS header
-e-deca2.org: did not receive HSTS header
-e-fishing.tk: could not connect to host
-e-gemeinde.at: could not connect to host
-e-hon.link: did not receive HSTS header
-e-imzo.uz: could not connect to host
-e-informatyk.tk: could not connect to host
-e-isfa.eu: did not receive HSTS header
-e-kontakti.fi: did not receive HSTS header
-e-labo.works: did not receive HSTS header
-e-lifetechnology.com: could not connect to host
-e-mak.eu: could not connect to host
-e-migration.ch: could not connect to host
-e-nanum.kr: could not connect to host
-e-newshub.com: could not connect to host
-e-oscar-web.net: did not receive HSTS header
-e-peets.tk: could not connect to host
-e-planetelec.fr: did not receive HSTS header
-e-pokupki.eu: did not receive HSTS header
-e-rickroll-r.pw: could not connect to host
-e-sa.com: did not receive HSTS header
-e-surety.net: could not connect to host
-e-surveillant.nl: did not receive HSTS header
-e-sw.co.jp: did not receive HSTS header
-e-teacher.pl: did not receive HSTS header
-e-vau.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-e-vo-linka.cz: could not connect to host
-e-wishlist.net: could not connect to host
-e-yachts.tk: could not connect to host
-e007.com: did not receive HSTS header
-e024.org: could not connect to host
-e11even.nl: did not receive HSTS header
-e191.com: could not connect to host
-e30gruppe.com: did not receive HSTS header
-e365.vip: could not connect to host
-e3amn2l.com: could not connect to host
-e3kids.com: did not receive HSTS header
-e3leading.com: could not connect to host
-e3leading.solutions: could not connect to host
-e3leadingsolutions.com: could not connect to host
-e3learning.institute: could not connect to host
-e3li.org: did not receive HSTS header
-e4metech.com: could not connect to host
-e505.net: could not connect to host
-e51888.com: could not connect to host
-e5197.co: could not connect to host
-e53888.com: could not connect to host
-e53888.net: could not connect to host
-e64.com: could not connect to host
-e6729.co: could not connect to host
-e6729.com: did not receive HSTS header
-e6957.co: could not connect to host
-e6957.com: did not receive HSTS header
-e6ex.com: did not receive HSTS header
-e81365.com: did not receive HSTS header
-e81818.com: did not receive HSTS header
-e82365.com: did not receive HSTS header
-e899365.com: could not connect to host
-e9297.co: could not connect to host
-e9397.com: did not receive HSTS header
-e9728.co: could not connect to host
-e9a.at: could not connect to host
-eac.gov: did not receive HSTS header
-eagle-aluminum.com: did not receive HSTS header
-eagle-yard.de: could not connect to host
-eaglesecurity.com: did not receive HSTS header
-eagletechz.com.br: could not connect to host
-eam-gmbh.com: did not receive HSTS header
-eames-clayton.us: could not connect to host
-earga.sm: could not connect to host
-earlybirdsnacks.com: could not connect to host
-earlydocs.com: could not connect to host
-earlyimage.com.au: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-earn.wiki: could not connect to host
-earth-people.org: could not connect to host
-earthrise16.com: could not connect to host
-earthsgoldmine.com: did not receive HSTS header
-easelforart.com: could not connect to host
-east-line.su: could not connect to host
-eastcoastbubbleandbounce.co.uk: could not connect to host
-eastcoastinflatables.co.uk: could not connect to host
-easthokkaido-5airport.jp: did not receive HSTS header
-eastman.space: could not connect to host
-eastmontgroup.com: did not receive HSTS header
-eastpeoria-il.gov: could not connect to host
-easy-factures.fr: could not connect to host
-easy-prono.fr: did not receive HSTS header
-easychiller.org: could not connect to host
-easycosmetic.de: did not receive HSTS header
-easyenrollment.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-easykonto.de: did not receive HSTS header
-easymun.com: could not connect to host
-easyoutdoor.nl: could not connect to host
-easypaymentnow.com: did not receive HSTS header
-easyplane.it: could not connect to host
-easyproperty.com: did not receive HSTS header
-easyqr.codes: could not connect to host
-easyreal.ru: could not connect to host
-easyrents.com.ng: did not receive HSTS header
-easysimplecrm.com: could not connect to host
-easyssl.com.cn: did not receive HSTS header
-easytechsecurity.com: did not receive HSTS header
-eat-the-world.ch: could not connect to host
-eat4happiness.com: did not receive HSTS header
-eatfitoutlet.com.br: could not connect to host
-eatlowcarb.de: did not receive HSTS header
-eats.soy: could not connect to host
-eattherich.us: did not receive HSTS header
-eatvisor.co.uk: could not connect to host
-eatz.com: could not connect to host
-eauclairecommerce.com: could not connect to host
-ebanking.raiffeisen.ch: did not receive HSTS header
-ebayinc.com: did not receive HSTS header
-ebcs-solutions.com: did not receive HSTS header
-ebecs.com: did not receive HSTS header
-ebene-bpo.com: did not receive HSTS header
-ebenvloedaanleggen.nl: could not connect to host
-ebertek.com: did not receive HSTS header
-eblog.com.au: did not receive HSTS header
-ebolsa.com.br: could not connect to host
-ebolsas.com.br: did not receive HSTS header
-ebooklaunchers.com: could not connect to host
-ebooktoan.com: did not receive HSTS header
-ebop.ch: could not connect to host
-ebp2p.com: could not connect to host
-ebraph.com: could not connect to host
-ebrowz.com: could not connect to host
-ec-baran.de: could not connect to host
-eca.edu.au: did not receive HSTS header
-ecacollege.nsw.edu.au: did not receive HSTS header
-ecake.in: did not receive HSTS header
-ecalculator.org: could not connect to host
-ecc-kaufbeuren.de: could not connect to host
-ecclesia-koeln.de: did not receive HSTS header
-eccux.com: could not connect to host
-ecelembrou.ovh: could not connect to host
-ecfs.link: could not connect to host
-ecfunstalls.com: could not connect to host
-ecg.fr: could not connect to host
-echatta.net: did not receive HSTS header
-echatta.org: did not receive HSTS header
-echi.pw: could not connect to host
-echipstore.com: did not receive HSTS header
-echo.cc: could not connect to host
-echoactive.com: max-age too low: 7776000
-echomall.cn: could not connect to host
-echomanchester.net: could not connect to host
-echoteam.gq: could not connect to host
-echoteen.com: did not receive HSTS header
-echtes-hutzelbrot.de: could not connect to host
-eckro.com: did not receive HSTS header
-eclanet.ca: could not connect to host
-ecliptic.cc: could not connect to host
-ecmeshltd.com: did not receive HSTS header
-eco-wiki.com: could not connect to host
-ecobrain.be: max-age too low: 0
-ecoder.co: did not receive HSTS header
-ecolala.my: could not connect to host
-ecole-en-danger.fr: could not connect to host
-ecole-iaf.fr: could not connect to host
-ecole-maternelle-saint-joseph.be: could not connect to host
-ecologikashop.com: could not connect to host
-ecomlane.com: did not receive HSTS header
-ecommercestore.net.br: could not connect to host
-ecomparemo.com: did not receive HSTS header
-ecompen.co.za: could not connect to host
-econativa.pt: could not connect to host
-economicinclusion.gov: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-economy.st: could not connect to host
-economycarrentalscyprus.com: could not connect to host
-econverter.cloud: did not receive HSTS header
-ecorus.eu: did not receive HSTS header
-ecoskif.ru: could not connect to host
-ecosoftconsult.com: could not connect to host
-ecosystemmanager.azurewebsites.net: did not receive HSTS header
-ecotaxi2airport.com: did not receive HSTS header
-ecotechnologyti.com: did not receive HSTS header
-ecoterramedia.com: did not receive HSTS header
-ecotruck-pooling.com: did not receive HSTS header
-ecp.ae: did not receive HSTS header
-ecredits-dev-app-backoffice01.azurewebsites.net: could not connect to host
-ecredits-dev-app-partner01.azurewebsites.net: could not connect to host
-ecrimex.net: did not receive HSTS header
-ectora.com: could not connect to host
-ecuinformacion.com: could not connect to host
-ecupcafe.com: could not connect to host
-ecuteam.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-ed-matters.org: did not receive HSTS header
-ed4becky.net: did not receive HSTS header
-edakoe.ru: did not receive HSTS header
-edati.lv: could not connect to host
-edcphenix.tk: could not connect to host
-eddmixpanel.com: could not connect to host
-eddy-vh.com: could not connect to host
-eddy.ee: did not receive HSTS header
-edeka-jbl-treueaktion.de: could not connect to host
-edelblack.ch: could not connect to host
-edelsteincosmetic.com: did not receive HSTS header
-eden-institut-carita-valdisere.com: did not receive HSTS header
-eden-mobility.co.uk: did not receive HSTS header
-eden-noel.at: could not connect to host
-edenaya.com: could not connect to host
-edenvaleplumber24-7.co.za: did not receive HSTS header
-edgecustomersportal.com: could not connect to host
-edgedynasty.com: could not connect to host
-edgefantasy.com: could not connect to host
-edgereinvent.com: could not connect to host
-edgevelder.com: could not connect to host
-edilane.com: could not connect to host
-edilane.de: could not connect to host
-edisonchee.com: did not receive HSTS header
-edissecurity.sk: did not receive HSTS header
-editoraacademiacrista.com.br: could not connect to host
-editoraimaculada.com.br: did not receive HSTS header
-edix.ru: could not connect to host
-edk.com.tr: did not receive HSTS header
-edoss.co.za: did not receive HSTS header
-edpubs.gov: could not connect to host
-edsh.de: did not receive HSTS header
-edsinet.com: could not connect to host
-eduard-dopler.de: could not connect to host
-eduardnikolenko.com: could not connect to host
-eduardnikolenko.ru: could not connect to host
-edubras.com.br: did not receive HSTS header
-educaid.be: did not receive HSTS header
-educatio.tech: could not connect to host
-educationalstage.com: did not receive HSTS header
-educationtree.tk: could not connect to host
-educationunlimited.com: did not receive HSTS header
-educator-one.com: could not connect to host
-educators.co.nz: did not receive HSTS header
-educatoys.com.br: could not connect to host
-educatweb.de: did not receive HSTS header
-educnum.fr: did not receive HSTS header
-educourse.ga: could not connect to host
-eduif.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-edumi.com: did not receive HSTS header
-edumundo.nl: did not receive HSTS header
-edupool.in: could not connect to host
-edusantorini.com: could not connect to host
-eduschedule.org: did not receive HSTS header
-edusitios.com: could not connect to host
-eduvance.in: did not receive HSTS header
-eduxpert.in: did not receive HSTS header
-edv-bv.de: did not receive HSTS header
-edvinaspaliskis.lt: did not receive HSTS header
-edwar.do: did not receive HSTS header
-edwarddekker.nl: did not receive HSTS header
-edwards.me.uk: could not connect to host
-edwardwall.me: did not receive HSTS header
-ee-terminals.com: could not connect to host
-ee5197.co: could not connect to host
-ee6729.co: could not connect to host
-ee6729.com: did not receive HSTS header
-ee6957.co: could not connect to host
-ee9297.co: could not connect to host
-ee9397.com: did not receive HSTS header
-ee9721.com: did not receive HSTS header
-ee9728.co: could not connect to host
-eeb98.com: could not connect to host
-eecs388.org: did not receive HSTS header
-eeetrust.org: could not connect to host
-eenekorea.com: did not receive HSTS header
-eengezinswoning-in-alphen-aan-den-rijn-kopen.nl: could not connect to host
-eengezinswoning-in-de-friese-meren-kopen.nl: could not connect to host
-eengezinswoning-in-friesland-kopen.nl: could not connect to host
-eengezinswoning-in-leeuwarden-kopen.nl: could not connect to host
-eengezinswoning-in-pekela-kopen.nl: could not connect to host
-eengezinswoning-in-rijnwaarden-kopen.nl: could not connect to host
-eengezinswoning-in-sudwest-fryslan-kopen.nl: could not connect to host
-eengezinswoning-in-zeeland-kopen.nl: could not connect to host
-eengezinswoning-in-zuid-holland-kopen.nl: could not connect to host
-eengezinswoning-in-zuidplas-kopen.nl: could not connect to host
-eengezinswoning-in-zwartewaterland-kopen.nl: could not connect to host
-eengezinswoningverkopen.nl: could not connect to host
-eengoedenotaris.nl: did not receive HSTS header
-eenhoorn.ga: could not connect to host
-eeqj.com: did not receive HSTS header
-eerlijktransport.nl: could not connect to host
-eesistumine2017.ee: could not connect to host
-eez.ee: could not connect to host
-efa-football.com: did not receive HSTS header
-efeen.nl: did not receive HSTS header
-eff-bee-eye.de: did not receive HSTS header
-effectiveosgi.com: could not connect to host
-effer.me: could not connect to host
-effero.net: could not connect to host
-efficienthealth.com: could not connect to host
-effizienta.ch: did not receive HSTS header
-efg-darmstadt.de: did not receive HSTS header
-efreet.xyz: could not connect to host
-eftelingcraft.net: could not connect to host
-eftopia.org: could not connect to host
-efzh2so1cuskp9j3evlqa1m68id-m9p1tzb05zo.com: did not receive HSTS header
-egamespw.com: could not connect to host
-eganassociates.com.au: did not receive HSTS header
-egbert.net: max-age too low: 3600
-egfl.org.uk: did not receive HSTS header
-egge.com: max-age too low: 0
-eggplant.today: could not connect to host
-eggqvq.com: could not connect to host
-egicloud.com: did not receive HSTS header
-egit.co: could not connect to host
-eglek.com: could not connect to host
-ego-world.org: could not connect to host
-egumenita.ro: did not receive HSTS header
-egupova.ru: did not receive HSTS header
-ehandel.com: did not receive HSTS header
-ehb-sec-ward.be: could not connect to host
-ehdud8451.gq: could not connect to host
-ehdud8451.tk: could not connect to host
-ehealthcounselor.com: could not connect to host
-ehealthfest.com: could not connect to host
-ehertz.uk: could not connect to host
-ehipaadev.com: could not connect to host
-ehito.ovh: could not connect to host
-ehr.gov: could not connect to host
-ehrenamt-skpfcw.de: could not connect to host
-ehrlichesbier.de: could not connect to host
-ehseller.com: did not receive HSTS header
-ehsellert.com: did not receive HSTS header
-ehuber.info: could not connect to host
-eiadaladel.com: could not connect to host
-eiao.me: could not connect to host
-eicfood.com: could not connect to host
-eichornenterprises.com: could not connect to host
-eidolonhost.com: did not receive HSTS header
-eidolons.org: could not connect to host
-eifel.website: could not connect to host
-eiga-movie.com: max-age too low: 0
-eigenbubi.de: could not connect to host
-eightyfour.ca: could not connect to host
-eigo.work: did not receive HSTS header
-eika.as: did not receive HSTS header
-eilandprojectkeukens.nl: could not connect to host
-einaros.is: could not connect to host
-einfachmaldiefressehalten.de: did not receive HSTS header
-einhorn.space: could not connect to host
-einmonolog.de: could not connect to host
-einquiz.de: could not connect to host
-einsatzstiefel.info: could not connect to host
-einsit.com: could not connect to host
-einsitapis.com: could not connect to host
-einsteincapital.ca: could not connect to host
-eipione.com: could not connect to host
-eismaschine-vergleich.de: did not receive HSTS header
-eitler.cx: max-age too low: 7776000
-ejeff.org: did not receive HSTS header
-ejgconsultancy.co.uk: could not connect to host
-ejuicelab.co.uk: did not receive HSTS header
-ejusu.com: could not connect to host
-ek.network: did not receive HSTS header
-ekawaiishop.com: could not connect to host
-ekbanden.nl: did not receive HSTS header
-ekeblock.com: could not connect to host
-ekobudisantoso.net: could not connect to host
-ekocleaningllc.com: could not connect to host
-ekodevices.com: did not receive HSTS header
-ekole.shop: could not connect to host
-ekong366.com: could not connect to host
-ekostrateg.com: did not receive HSTS header
-ekpj.jp: could not connect to host
-ekpyroticfrood.net: did not receive HSTS header
-ekrana.info: could not connect to host
-eksik.com: could not connect to host
-ekuatorial.com: did not receive HSTS header
-el-soul.com: did not receive HSTS header
-elaintehtaat.fi: did not receive HSTS header
-elan-organics.com: did not receive HSTS header
-elanguest.pl: could not connect to host
-elanguest.ro: could not connect to host
-elanguest.ru: could not connect to host
-elarvee.xyz: could not connect to host
-elasticshift.com: could not connect to host
-elaxy-online.de: could not connect to host
-elbaal.gov: did not receive HSTS header
-elbaladshop.com: did not receive HSTS header
-elblein.de: did not receive HSTS header
-elchamandelaprosperidad.org: could not connect to host
-elcontadorsac.com: could not connect to host
-eldenelesat.com: could not connect to host
-elderoost.com: did not receive HSTS header
-eldietista.es: did not receive HSTS header
-eldinhadzic.com: did not receive HSTS header
-eldisagjapi.com: could not connect to host
-eldisagjapi.de: could not connect to host
-ele-sm.com: could not connect to host
-elearningpilot.com: did not receive HSTS header
-eleaut.com.br: did not receive HSTS header
-electmikewaters.com: max-age too low: 0
-electricalcontrolpanels.co.uk: did not receive HSTS header
-electricalpacificpalisades.com: could not connect to host
-electricant.com: did not receive HSTS header
-electricant.nl: did not receive HSTS header
-electricgatemotorsberea.co.za: did not receive HSTS header
-electricgatemotorsbluff.co.za: did not receive HSTS header
-electricgatemotorsqueensburgh.co.za: did not receive HSTS header
-electrician-umhlanga.co.za: did not receive HSTS header
-electricianforum.co.uk: did not receive HSTS header
-electricianpacificpalisades.com: could not connect to host
-electricianrandburg24-7.co.za: did not receive HSTS header
-electricianumhlangarocks.co.za: did not receive HSTS header
-electricienasnieres.fr: could not connect to host
-electricoperaduo.com: did not receive HSTS header
-electroinkoophardenberg.nl: could not connect to host
-electromc.com: did not receive HSTS header
-electronicbub.com: did not receive HSTS header
-eled.io: could not connect to host
-elefandt.com: did not receive HSTS header
-elefantevoador.com: could not connect to host
-elejordemarketingconsultancy.com: could not connect to host
-elektro-collee.de: did not receive HSTS header
-elektromotor.tk: could not connect to host
-elektronische-post.org: did not receive HSTS header
-elektronring.com: could not connect to host
-element-43.com: did not receive HSTS header
-elementalict.com: did not receive HSTS header
-elementalrobotics.com: could not connect to host
-elemenx.com: did not receive HSTS header
-elemprendedor.com.ve: could not connect to host
-elenag.ga: could not connect to host
-elenagherta.ga: could not connect to host
-elenoon.ir: did not receive HSTS header
-elenorsmadness.org: could not connect to host
-elephpant.cz: max-age too low: 3600
-elettricisti.roma.it: could not connect to host
-elettrodomestici.roma.it: could not connect to host
-elevateandprosper.com: could not connect to host
-elevationfilms.net: could not connect to host
-elevator.ee: could not connect to host
-elexel.ru: could not connect to host
-elgacien.de: could not connect to host
-elhall.pro: did not receive HSTS header
-elhall.ru: did not receive HSTS header
-elia.cloud: could not connect to host
-elias-nicolas.com: could not connect to host
-eliasojala.me: did not receive HSTS header
-eliaswendt.com: did not receive HSTS header
-eliaswendt.de: did not receive HSTS header
-eliav.tk: could not connect to host
-elib.com: did not receive HSTS header
-elielaloum.com: did not receive HSTS header
-elijahzawesome.casa: did not receive HSTS header
-elimdengelen.com: could not connect to host
-eliminercellulite.com: could not connect to host
-eliolita.com: could not connect to host
-elisechristie.com: could not connect to host
-elite-box.com: did not receive HSTS header
-elite-box.org: did not receive HSTS header
-elitebike.com.co: could not connect to host
-elitebouncingfun.com: did not receive HSTS header
-elitecovering.fr: did not receive HSTS header
-elitedangerous.wiki: could not connect to host
-elitefishtank.com: could not connect to host
-elitehosting.de: did not receive HSTS header
-elitenutritionoficial.com: could not connect to host
-elitepaintingsa.com.au: did not receive HSTS header
-elitesensual.com.br: did not receive HSTS header
-eliyah.co.il: did not receive HSTS header
-elizabethgreenfield.com: could not connect to host
-ell-net.tokyo: could not connect to host
-ellbusiness.com: could not connect to host
-elliesbouncers.co.uk: could not connect to host
-elliff.net: did not receive HSTS header
-elliotgluck.com: could not connect to host
-elliriehl.at: did not receive HSTS header
-elmar-kraamzorg.nl: did not receive HSTS header
-elna-service.com.ua: did not receive HSTS header
-elnan.do: could not connect to host
-elnoorandelmohanad.com: did not receive HSTS header
-elnutricionista.es: could not connect to host
-elo-rocket.com: could not connect to host
-elo.fyi: could not connect to host
-elodieclerc.ch: could not connect to host
-elohellp.com: could not connect to host
-elohna.ch: did not receive HSTS header
-elon.gov: could not connect to host
-elonbase.com: could not connect to host
-elonm.ru: could not connect to host
-elonma.gov: could not connect to host
-elosrah.com: did not receive HSTS header
-eloxt.com: could not connect to host
-elpado.de: did not receive HSTS header
-elpaseadordeperros.com: could not connect to host
-elpay.kz: could not connect to host
-elpo.xyz: could not connect to host
-elradix.be: could not connect to host
-elri.blog: could not connect to host
-elsagradocoran.org: could not connect to host
-elsamakhin.com: could not connect to host
-elsanoguera.com: did not receive HSTS header
-elsemanario.com: did not receive HSTS header
-elsitar.com: could not connect to host
-elsword.moe: could not connect to host
-eltagroup.co.uk: did not receive HSTS header
-eltair.com: could not connect to host
-eltransportquevolem.org: could not connect to host
-eltrox.me: could not connect to host
-elucron.com: could not connect to host
-eluft.de: could not connect to host
-eluvio.com: could not connect to host
-elvcino.com: could not connect to host
-elvidence.com.au: did not receive HSTS header
-elxsi.de: did not receive HSTS header
-elyisus.info: could not connect to host
-elysium.coop: could not connect to host
-elytronsecurity.com: did not receive HSTS header
-email.lookout.com: could not connect to host
-email2rss.net: could not connect to host
-emailalaperformance.fr: could not connect to host
-emailcontrol.nl: did not receive HSTS header
-emailfuermich.de: did not receive HSTS header
-emailing.alsace: could not connect to host
-emailtemporal.org: could not connect to host
-emailtools.io: could not connect to host
-emanatepixels.com: could not connect to host
-emanga.su: could not connect to host
-emanol.co.uk: could not connect to host
-emanuela-gabriela.co.uk: did not receive HSTS header
-emasex.com: did not receive HSTS header
-emavok.eu: could not connect to host
-embellir-aroma.com: could not connect to host
-embellir-kyujin.com: could not connect to host
-embracethedarkness.co.uk: could not connect to host
-embroidered-stuff.com: could not connect to host
-embudospro.net: could not connect to host
-emcentrix-com-site-mvc.azurewebsites.net: could not connect to host
-emeldi-commerce.com: max-age too low: 0
-emeraldcbdshop.com: could not connect to host
-emeraldcoastrideshare.com: did not receive HSTS header
-emeraldonion.org: could not connect to host
-emergeandsee.com: did not receive HSTS header
-emergencyessay.com: did not receive HSTS header
-emergencymedicinefoundations.com: did not receive HSTS header
-emergencyshutoff.com: could not connect to host
-emergentvisiontec.com: did not receive HSTS header
-emergenzalavoro.com: did not receive HSTS header
-emesolutions.net: did not receive HSTS header
-emi-air-comprime.com: did not receive HSTS header
-emiele.com.br: could not connect to host
-emil-dein-baecker.com: could not connect to host
-emilecourriel.com: could not connect to host
-emiliemunsch.com: did not receive HSTS header
-emilong.com: could not connect to host
-emilreimann.de: could not connect to host
-emils-chemnitz.de: could not connect to host
-emils1910.de: could not connect to host
-emilyhorsman.com: could not connect to host
-emilyshepherd.me: did not receive HSTS header
-eminententerprises.io: could not connect to host
-eminhuseynov.com: did not receive HSTS header
-eminovic.me: could not connect to host
-emissary.coffee: did not receive HSTS header
-emjainteractive.com: did not receive HSTS header
-emjimadhu.com: did not receive HSTS header
-emkanrecords.com: did not receive HSTS header
-emkei.cz: did not receive HSTS header
-emma-o.com: could not connect to host
-emma.ca: did not receive HSTS header
-emma.ly: did not receive HSTS header
-emmababy420.com: could not connect to host
-emmable.com: did not receive HSTS header
-emmanuelle-et-julien.ch: could not connect to host
-emmdy.com: could not connect to host
-emmehair.com: did not receive HSTS header
-emnitech.com: could not connect to host
-emo-poris.com: could not connect to host
-emojiengine.com: did not receive HSTS header
-emoticonesjaponeses.com: did not receive HSTS header
-emotuit.com: did not receive HSTS header
-emperor.blog: could not connect to host
-empese.com: could not connect to host
-empicargo.com: could not connect to host
-empire24.co: could not connect to host
-empireauto-2000.com: could not connect to host
-empleosentorreon.mx: could not connect to host
-empleostampico.com: did not receive HSTS header
-employeestore.org: did not receive HSTS header
-employer.guru: could not connect to host
-emporiovinareal.com.br: could not connect to host
-emporioviverbem.com.br: could not connect to host
-emprendeconchrisfx.com: could not connect to host
-emprendeperuano.com: could not connect to host
-emprunterlivre.ci: could not connect to host
-empty-r.com: could not connect to host
-emptyadjacentpossible.com: could not connect to host
-emptypath.com: did not receive HSTS header
-emrahcinik.com: did not receive HSTS header
-emsadi.org: could not connect to host
-emtradingacademy.com: could not connect to host
-emulovers.com: could not connect to host
-emupedia.net: did not receive HSTS header
-emyself.info: could not connect to host
-emyself.org: could not connect to host
-en4u.org: could not connect to host
-enaia.fr: did not receive HSTS header
-encadrer-mon-enfant.com: did not receive HSTS header
-encens.boutique: did not receive HSTS header
-encode.space: could not connect to host
-encode.uk.com: did not receive HSTS header
-encoder.pw: could not connect to host
-encoderx.uk: could not connect to host
-encontrebarato.com.br: could not connect to host
-encore.io: could not connect to host
-encrypt.org.uk: could not connect to host
-encryptallthethings.net: did not receive HSTS header
-encrypted.google.com: did not receive HSTS header (error ignored - included regardless)
-encryptedaudience.com: could not connect to host
-encryptio.com: could not connect to host
-encryptmycard.com: could not connect to host
-encuentratumueble.com: did not receive HSTS header
-encyclopedia-titanica.org: did not receive HSTS header
-end.pp.ua: could not connect to host
-endangeredwatch.com: could not connect to host
-ende-x.com: could not connect to host
-enderszone.com: did not receive HSTS header
-endlesstone.com: did not receive HSTS header
-endofinternet.goip.de: could not connect to host
-endofodo.goip.de: could not connect to host
-endohaus.ca: could not connect to host
-endohaus.com: could not connect to host
-endohaus.eu: could not connect to host
-endohaus.us: could not connect to host
-endspamwith.us: could not connect to host
-enecoshop.nl: could not connect to host
-enefan.jp: could not connect to host
-enelacto.com: could not connect to host
-energethik-tulln.at: could not connect to host
-energisammenslutningen.dk: did not receive HSTS header
-energyatlas.com: could not connect to host
-enersaveapp.org: could not connect to host
-enersec.co.uk: could not connect to host
-enerte.ru: could not connect to host
-enfield-kitchens.co.uk: did not receive HSTS header
-enfoqueseguro.com: did not receive HSTS header
-enfu.se: could not connect to host
-engelundlicht.ch: could not connect to host
-engineowning.com: did not receive HSTS header
-enginx.cn: could not connect to host
-enginx.net: could not connect to host
-englandschool.tk: could not connect to host
-englerts.de: did not receive HSTS header
-englishclub.com: did not receive HSTS header
-englishdirectory.de: could not connect to host
-englishyamal.ru: did not receive HSTS header
-engrish.ml: could not connect to host
-engym.com.tw: could not connect to host
-enigmacpt.com: could not connect to host
-enigmadjradio.com: could not connect to host
-enigmail.net: did not receive HSTS header
-enijew.com: could not connect to host
-enjoymayfield.com: max-age too low: 0
-enjoystudio.ro: did not receive HSTS header
-enlamochiladeadri.com: could not connect to host
-enlatte.com: could not connect to host
-enlazaresbueno.cl: could not connect to host
-enlightened.si: did not receive HSTS header
-enlightenedmind.co: could not connect to host
-enlightenment.org: did not receive HSTS header
-enlightenth.com: did not receive HSTS header
-enlnf.link: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-enloestatebank.com: could not connect to host
-enofmusic.com: could not connect to host
-enomada.net: could not connect to host
-enoou.com: could not connect to host
-enord.fr: did not receive HSTS header
-enpalmademallorca.info: could not connect to host
-enscosupply.com: could not connect to host
-ensemble-vos-idees.fr: did not receive HSTS header
-enskat.de: could not connect to host
-enskatson-sippe.de: could not connect to host
-entaurus.com: could not connect to host
-enteente.club: could not connect to host
-enteente.com: could not connect to host
-enteente.space: could not connect to host
-enteente.xyz: did not receive HSTS header
-enterclaim.com: did not receive HSTS header
-enterdev.co: did not receive HSTS header
-enteres.eu: could not connect to host
-enterprisecarclub.co.uk: did not receive HSTS header
-enterprisechannel.asia: did not receive HSTS header
-enterprisey.enterprises: could not connect to host
-enterprivacy.com: did not receive HSTS header
-entersynapse.com: could not connect to host
-entourneebeetle.com: could not connect to host
-entravex.com: did not receive HSTS header
-entrepreneur.or.id: could not connect to host
-entreprise-toiture-clement.fr: could not connect to host
-entrusted.io: could not connect to host
-enum.eu.org: could not connect to host
-enumify.com: could not connect to host
-envelope.co.nz: did not receive HSTS header
-enveloppenopmaat.nl: could not connect to host
-enviapresentes.com.br: could not connect to host
-enviatufoto.com: did not receive HSTS header
-environment.ai: could not connect to host
-environmentkirklees.org: did not receive HSTS header
-envirotech.com.au: did not receive HSTS header
-envoutement-desenvoutement.com: did not receive HSTS header
-envoyglobal.com: did not receive HSTS header
-envoyworld.com: could not connect to host
-envygeeks.com: did not receive HSTS header
-eol34.com: could not connect to host
-eoldb.org: could not connect to host
-eolme.ml: could not connect to host
-eonet.cc: did not receive HSTS header
-eos-classic.io: did not receive HSTS header
-eosol.services: could not connect to host
-eosol.zone: could not connect to host
-epanurse.com: could not connect to host
-epasar.my: could not connect to host
-epaslaugos.lt: did not receive HSTS header
-epave.paris: could not connect to host
-epaygateway.net: could not connect to host
-ephe.be: could not connect to host
-ephry.com: could not connect to host
-epicbouncycastlehirenorwich.co.uk: could not connect to host
-epicginger.fi: could not connect to host
-epicmc.games: could not connect to host
-epicpages.com: could not connect to host
-epicsecure.de: could not connect to host
-epicserver.ru: could not connect to host
-epitesz.co: could not connect to host
-epo32.ru: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-eposcloud.net: did not receive HSTS header
-eposmidlands.co.uk: could not connect to host
-eposnewport.co.uk: could not connect to host
-eposnottingham.co.uk: could not connect to host
-eposreading.co.uk: could not connect to host
-eposreview.co.uk: could not connect to host
-epossurrey.co.uk: could not connect to host
-epossussex.co.uk: could not connect to host
-epossystems.co.uk: could not connect to host
-eposwales.co.uk: could not connect to host
-epoxate.com: did not receive HSTS header
-eprofitacademy.com: did not receive HSTS header
-epsilon.dk: could not connect to host
-epsorting.cz: did not receive HSTS header
-epulsar.ru: could not connect to host
-eq8.net.au: could not connect to host
-eqib.nl: did not receive HSTS header
-eqim.me: could not connect to host
-eqorg.com: could not connect to host
-equallove.me: could not connect to host
-equallyy.com: did not receive HSTS header
-equalparts.eu: did not receive HSTS header
-equeim.ru: did not receive HSTS header
-equi.ac: could not connect to host
-equilibre-yoga-jennifer-will.com: could not connect to host
-equipeferramentas.com.br: did not receive HSTS header
-equipsupply.com: did not receive HSTS header
-equitee.co: could not connect to host
-er-music.com: could not connect to host
-erad.fr: did not receive HSTS header
-erclab.kr: could not connect to host
-erclaim.com: could not connect to host
-ereader.uno: could not connect to host
-erecciontotalal100.com: could not connect to host
-erectiepillenwinkel.nl: did not receive HSTS header
-erepublik-deutschland.de: did not receive HSTS header
-eressea.xyz: could not connect to host
-erevan-news.tk: could not connect to host
-ergoterapeutas.lt: could not connect to host
-ergovitanet.com.br: could not connect to host
-ericbond.net: could not connect to host
-erichalv.com: could not connect to host
-ericisaweso.me: did not receive HSTS header
-ericjohnltd.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-ericloud.tk: could not connect to host
-erico.jp: did not receive HSTS header
-ericorporation.com: did not receive HSTS header
-ericschwartzlive.com: did not receive HSTS header
-ericwie.se: did not receive HSTS header
-ericyl.com: could not connect to host
-eriel.com.br: could not connect to host
-erikserver2.tk: could not connect to host
-erikwagner.de: did not receive HSTS header
-eriner.me: could not connect to host
-erinlin.com: did not receive HSTS header
-eriser.fr: could not connect to host
-erixschueler.de: max-age too low: 0
-ermessecurity.com: did not receive HSTS header
-ernaehrungsberatung-rapperswil.ch: did not receive HSTS header
-ernaehrungsberatung-zurich.ch: did not receive HSTS header
-ernesto.at: could not connect to host
-eroimatome.com: could not connect to host
-eromixx.com: did not receive HSTS header
-eromond.com: did not receive HSTS header
-eroskines.com: could not connect to host
-erotalia.es: could not connect to host
-erotic4me.ch: did not receive HSTS header
-eroticdinners.com: did not receive HSTS header
-eroticforce.com: did not receive HSTS header
-erotische-aanbiedingen.nl: could not connect to host
-erotpo.cz: did not receive HSTS header
-erperium.com: did not receive HSTS header
-errlytics.com: could not connect to host
-errolz.com: could not connect to host
-errors.zenpayroll.com: could not connect to host
-erspro.net: could not connect to host
-eruvalerts.com: did not receive HSTS header
-erverydown.ml: did not receive HSTS header
-erwinvanlonden.net: did not receive HSTS header
-es8888.net: could not connect to host
-es888999.com: could not connect to host
-esatn.gov: could not connect to host
-esb111.com: did not receive HSTS header
-esb111.net: did not receive HSTS header
-esb112.com: did not receive HSTS header
-esb112.net: did not receive HSTS header
-esb116.com: did not receive HSTS header
-esb1314.net: could not connect to host
-esb1668.com: could not connect to host
-esb16888.com: could not connect to host
-esb1788.info: could not connect to host
-esb17888.com: could not connect to host
-esb222.net: did not receive HSTS header
-esb555.com: could not connect to host
-esb556.com: could not connect to host
-esb5889.net: did not receive HSTS header
-esb666.com: could not connect to host
-esb666.net: did not receive HSTS header
-esb66666.com: could not connect to host
-esb688.com: could not connect to host
-esb68888.com: could not connect to host
-esb777.cc: could not connect to host
-esb777.com: could not connect to host
-esb777.me: could not connect to host
-esb777.net: could not connect to host
-esb777.us: could not connect to host
-esb8886.com: could not connect to host
-esb999.biz: could not connect to host
-esb999.com: could not connect to host
-esb999.info: could not connect to host
-esb999.us: could not connect to host
-esba11.cc: could not connect to host
-esba11.in: did not receive HSTS header
-esba11.net: could not connect to host
-esba11.us: did not receive HSTS header
-esball.in: could not connect to host
-esball888.com: could not connect to host
-esball888.net: could not connect to host
-esbuilders.co.nz: did not receive HSTS header
-escalate.eu: did not receive HSTS header
-escape2rooms.fr: did not receive HSTS header
-escapees.com: did not receive HSTS header
-escapejoplin.com: did not receive HSTS header
-escaperoomservices.com: did not receive HSTS header
-escapessolutions.com: could not connect to host
-escargotbistro.com: did not receive HSTS header
-escolaengenharia.com.br: did not receive HSTS header
-escolibri.com: could not connect to host
-escort-byuro.net: could not connect to host
-escort-fashion.com: could not connect to host
-escortaccess.net: could not connect to host
-escortdisplay.com: could not connect to host
-escortlistings.eu: could not connect to host
-escortlistings.fr: could not connect to host
-escortlistings.mx: could not connect to host
-escortlistings.us: could not connect to host
-escortlistingsuk.co.uk: could not connect to host
-escortmantra.com: could not connect to host
-escortshotsexy.com: could not connect to host
-escotour.com: did not receive HSTS header
-escueladego.tk: could not connect to host
-escueladewordpress.com: did not receive HSTS header
-escxtra.com: did not receive HSTS header
-esd.cc: did not receive HSTS header
-esdvfootloose.nl: did not receive HSTS header
-esec.rs: did not receive HSTS header
-esfahanahan.com: did not receive HSTS header
-esh.ink: could not connect to host
-eshepperd.com: did not receive HSTS header
-eshobe.com: did not receive HSTS header
-eshtapay.com: could not connect to host
-eshterry.com: did not receive HSTS header
-esibun.net: could not connect to host
-esipublications.com: did not receive HSTS header
-esko.bar: did not receive HSTS header
-esln.org: did not receive HSTS header
-esmincg2t1.com: could not connect to host
-esn-ypci.com: did not receive HSTS header
-esocweb.com: could not connect to host
-esote.net: did not receive HSTS header
-esoterik.link: could not connect to host
-esp-berlin.de: could not connect to host
-esp-desarrolladores.com: could not connect to host
-esp.community: could not connect to host
-esp8285.store: could not connect to host
-espace-gestion.fr: could not connect to host
-espacemontmorency.com: did not receive HSTS header
-espacioantiguo.com: could not connect to host
-espacioprofundo.com.ar: did not receive HSTS header
-espacobebecia.com.br: could not connect to host
-espanolseguros.com: did not receive HSTS header
-espanova.com: did not receive HSTS header
-especificosba.com.mx: could not connect to host
-esphigmenou.gr: did not receive HSTS header
-espo.com.ua: did not receive HSTS header
-esport-battlefield.com: did not receive HSTS header
-esports-network.de: did not receive HSTS header
-espower.com.sg: could not connect to host
-espra.com: could not connect to host
-espressivo.com.br: did not receive HSTS header
-esprit-cloture.fr: did not receive HSTS header
-esquisse.fr: did not receive HSTS header
-esquonic.com: could not connect to host
-esrs.gov: could not connect to host
-ess-cert.ru: did not receive HSTS header
-essayads.com: did not receive HSTS header
-essaywebsite.com: did not receive HSTS header
-essenceofvitalitydetox.com: could not connect to host
-essenciasparis.com.br: could not connect to host
-essential12.com: could not connect to host
-essentialoilsimports.com: could not connect to host
-essentiel-physique.com: could not connect to host
-essenzialeenxovais.com.br: could not connect to host
-esseriumani.com: could not connect to host
-essexghosthunters.co.uk: did not receive HSTS header
-essplusmed.org: could not connect to host
-establo.pro: could not connect to host
-estaciona.guru: could not connect to host
-estate360.co.tz: could not connect to host
-estateczech-eu.ru: could not connect to host
-estebanborges.com: did not receive HSTS header
-estespr.com: did not receive HSTS header
-estetistarimini.it: did not receive HSTS header
-esthernariyoshi.com: did not receive HSTS header
-esthesoleil.jp: did not receive HSTS header
-estilosapeca.com: could not connect to host
-estland.guide: could not connect to host
-estonia.net: could not connect to host
-estoniantrade.ee: did not receive HSTS header
-estraks.com: could not connect to host
-estrogenfor.me: could not connect to host
-estudio21pattern.com: could not connect to host
-estudioamazonico.com: could not connect to host
-estudiogarcia-rada.com: could not connect to host
-estudiserradal.com: did not receive HSTS header
-esu.moe: could not connect to host
-esu.wiki: could not connect to host
-esu.zone: could not connect to host
-esurety.net: did not receive HSTS header
-esw00.com: could not connect to host
-esw06.com: could not connect to host
-esw07.com: could not connect to host
-esw08.com: could not connect to host
-esw09.com: could not connect to host
-eswap.cz: could not connect to host
-esyume.com: could not connect to host
-et-buchholz.de: could not connect to host
-et180.com: could not connect to host
-etalent.net: did not receive HSTS header
-etangs-magazine.com: could not connect to host
-etaoinwu.tk: could not connect to host
-etaxi.tn: did not receive HSTS header
-etd-glasfaser.de: did not receive HSTS header
-etdonline.co.uk: did not receive HSTS header
-eteapparel.com: did not receive HSTS header
-etenendrinken.nu: could not connect to host
-eternalflame.cn: could not connect to host
-eternalflame.info: could not connect to host
-eternitylove.us: could not connect to host
-etfacta.com: could not connect to host
-eth-faucet.net: could not connect to host
-eth9.net: could not connect to host
-ethaligan.fr: could not connect to host
-ethan.pm: could not connect to host
-ethandelany.me: could not connect to host
-ethanfaust.com: did not receive HSTS header
-ethantskinner.com: did not receive HSTS header
-ether.school: could not connect to host
-ethercalc.com: could not connect to host
-etherderbies.com: could not connect to host
-ethergeist.de: did not receive HSTS header
-etheria-software.tk: did not receive HSTS header
-etherium.org: could not connect to host
-etherpad.fr: could not connect to host
-ethicalexploiting.com: did not receive HSTS header
-ethicall.org.uk: did not receive HSTS header
-ethicaltek.com: could not connect to host
-ethiobaba.com: could not connect to host
-ethiopiannews247.com: could not connect to host
-ethosinfo.com: could not connect to host
-etidni.help: did not receive HSTS header
-etikus-hacker.hu: could not connect to host
-etincelle.ml: could not connect to host
-etk2000.com: did not receive HSTS header
-etmirror.top: could not connect to host
-etmirror.xyz: could not connect to host
-etni-cidade.net: could not connect to host
-etny.nl: could not connect to host
-etoto.pl: did not receive HSTS header
-etproxy.tech: could not connect to host
-etrolleybizstore.com: could not connect to host
-etsservicios.com: could not connect to host
-etssquare.com: did not receive HSTS header
-etsysecure.com: could not connect to host
-ettebiz.com: max-age too low: 0
-etula.ga: could not connect to host
-etula.me: could not connect to host
-etys.no: did not receive HSTS header
-etzi.myds.me: could not connect to host
-euanbaines.com: did not receive HSTS header
-eucl3d.com: did not receive HSTS header
-euclideanpostulates.xyz: could not connect to host
-eucollegetours.com: could not connect to host
-euexia.fr: could not connect to host
-eugenechae.com: did not receive HSTS header
-eujuicers.com.tr: could not connect to host
-eulenleben.de: could not connect to host
-eulerpi.io: did not receive HSTS header
-eung.ga: could not connect to host
-eupay.de: could not connect to host
-eupbor.com: could not connect to host
-euph.eu: could not connect to host
-eupho.me: could not connect to host
-eupresidency2018.com: could not connect to host
-eurekaarchi.com: could not connect to host
-eurekaarchitecture.com: could not connect to host
-eurekz.com: did not receive HSTS header
-euren.se: could not connect to host
-eurheilu.com: did not receive HSTS header
-euro-servers.de: could not connect to host
-eurocamping.se: could not connect to host
-euroescortguide.com: could not connect to host
-euroman.ga: could not connect to host
-euroonline.org: could not connect to host
-europapier.at: could not connect to host
-europapier.ba: could not connect to host
-europapier.bg: could not connect to host
-europapier.com: could not connect to host
-europapier.cz: could not connect to host
-europapier.hr: could not connect to host
-europapier.hu: could not connect to host
-europapier.net: could not connect to host
-europapier.rs: could not connect to host
-europapier.si: could not connect to host
-europapier.sk: could not connect to host
-europapier.ua: could not connect to host
-europastudien.de: could not connect to host
-europeanpreppers.com: could not connect to host
-euroservice.com.gr: did not receive HSTS header
-euroshop24.net: could not connect to host
-eurospecautowerks.com: could not connect to host
-eurostrategy.vn.ua: could not connect to host
-eurotime.ua: did not receive HSTS header
-eurotravelstar.eu: did not receive HSTS header
-eutram.com: did not receive HSTS header
-euvo.tk: could not connect to host
-evaartinger.de: did not receive HSTS header
-evades.io: did not receive HSTS header
-evadifranco.com: did not receive HSTS header
-evaluate.jp: could not connect to host
-evanhandgraaf.nl: did not receive HSTS header
-evankurniawan.com: did not receive HSTS header
-evanreev.es: could not connect to host
-evansville-wy.gov: could not connect to host
-evantage.org: could not connect to host
-evantageglobal.com: could not connect to host
-evdenevenakliyatankara.pw: could not connect to host
-eve.ac: could not connect to host
-eve0s.com: did not receive HSTS header
-evearly.com: did not receive HSTS header
-eveaz.com: did not receive HSTS header
-evecalm.com: did not receive HSTS header
-evedanjailbreak.com: could not connect to host
-evegalaxy.net: could not connect to host
-evemagazineonline.com: could not connect to host
-evemarketer.com: did not receive HSTS header
-evemodx.com: could not connect to host
-evenstar-gaming.com: could not connect to host
-evenstargames.com: could not connect to host
-event64.ru: did not receive HSTS header
-eventmake.es: could not connect to host
-eventplace.me: did not receive HSTS header
-events12.com: did not receive HSTS header
-eventsafrica.net: could not connect to host
-everichspice.com: could not connect to host
-everlastingoak.de: did not receive HSTS header
-everyarti.st: could not connect to host
-everybodyhertz.co.uk: could not connect to host
-everybooks.com: could not connect to host
-everydaygary.com: could not connect to host
-everydayhealthandbeauty.com: could not connect to host
-everydaywot.com: could not connect to host
-everydaywp.com: could not connect to host
-everyex.com: could not connect to host
-everygayporn.xyz: could not connect to host
-everylab.org: could not connect to host
-everymove.org: could not connect to host
-everything.place: could not connect to host
-everythinq.com: could not connect to host
-everytruckjob.com: did not receive HSTS header
-everyvid.com: did not receive HSTS header
-everywhere.cloud: could not connect to host
-eveseat.net: could not connect to host
-eveshaiwu.com: could not connect to host
-evhoeft.com: could not connect to host
-evi.be: did not receive HSTS header
-evidentiasoftware.com: did not receive HSTS header
-evil-empire.tk: could not connect to host
-evilarmy.com: did not receive HSTS header
-evilbeasts.ru: could not connect to host
-evilbunnyfufu.com: could not connect to host
-evilcult.me: did not receive HSTS header
-evilized.de: did not receive HSTS header
-evilness.nl: could not connect to host
-evilsite.cf: could not connect to host
-evilvolcanolairs.com: did not receive HSTS header
-evin.ml: did not receive HSTS header
-evio.com: did not receive HSTS header
-evites.me: could not connect to host
-evlann.com: could not connect to host
-evokepk.com: could not connect to host
-evoludis.net: did not receive HSTS header
-evolutionexpeditions.com: did not receive HSTS header
-evolutionsmedicalspa.com: did not receive HSTS header
-evolvicity.org: could not connect to host
-evonews.com: did not receive HSTS header
-evossd.tk: could not connect to host
-evote-ch.ch: could not connect to host
-evowl.com: could not connect to host
-evstatus.com: could not connect to host
-ewallet-optimizer.com: did not receive HSTS header
-ewex.org: could not connect to host
-ewok.io: could not connect to host
-eworksmedia.com: could not connect to host
-ewout.io: did not receive HSTS header
-ews1.com: did not receive HSTS header
-ewuchuan.com: could not connect to host
-ewycena.pl: could not connect to host
-exaktus.pt: did not receive HSTS header
-examopedia.in: did not receive HSTS header
-example.sc: did not receive HSTS header
-example.wf: did not receive HSTS header
-example4d.com: could not connect to host
-examplesu.com: could not connect to host
-examsmate.in: could not connect to host
-excelgum.ca: could not connect to host
-excelhot.com: could not connect to host
-excella.me: could not connect to host
-exceltobarcode.com: could not connect to host
-exceptionalbits.com: could not connect to host
-exceptionalservers.com: could not connect to host
-exceptionalservices.us: could not connect to host
-exchangecoordinator.com: did not receive HSTS header
-exchangeworks.co: did not receive HSTS header
-exciters.tk: did not receive HSTS header
-exclusivecarcare.co.uk: did not receive HSTS header
-exclusivedesignz.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-exebouncycastles.co.uk: did not receive HSTS header
-executiveresolutions.co.uk: did not receive HSTS header
-exehack.net: could not connect to host
-exembit.com: did not receive HSTS header
-exemples-de-stands.com: could not connect to host
-exerforge.net: could not connect to host
-exeye.io: could not connect to host
-exfiles.cz: could not connect to host
-exgravitus.com: could not connect to host
-exhaledayspa.com.au: did not receive HSTS header
-exhalespa.com: did not receive HSTS header
-exhibityour.com: did not receive HSTS header
-exno.co: could not connect to host
-exnoobstore.com.br: did not receive HSTS header
-exodiac.ph: could not connect to host
-exoplatform.com: did not receive HSTS header
-exotic-bengal-cattery.ml: could not connect to host
-exousiakaidunamis.pw: could not connect to host
-exousiakaidunamis.xyz: could not connect to host
-expatads.com: could not connect to host
-expatriate.pl: did not receive HSTS header
-expecting.com.br: did not receive HSTS header
-experticon.com: did not receive HSTS header
-expertmile.com: did not receive HSTS header
-expertplumbingandsolarservicesbathurst.com.au: could not connect to host
-experts-en-gestion.fr: did not receive HSTS header
-exploradora.hu: did not receive HSTS header
-exploravacations.in: could not connect to host
-exploringenderby.com: did not receive HSTS header
-explosionstereo.tk: could not connect to host
-expmind.co.in: could not connect to host
-expo-america.ru: did not receive HSTS header
-expo-asia.ru: did not receive HSTS header
-expo-designers.com: could not connect to host
-expo-europe.ru: did not receive HSTS header
-expokohler.com: could not connect to host
-exponentialnews.net: could not connect to host
-expoort.co.uk: could not connect to host
-expoort.com.br: could not connect to host
-expopodium.com: could not connect to host
-exporo.de: did not receive HSTS header
-exposurecompensation.co.uk: could not connect to host
-expoundite.net: did not receive HSTS header
-expowerhps.com: did not receive HSTS header
-expressfinance.co.za: did not receive HSTS header
-expressglobal.org: could not connect to host
-expressvpn.com: did not receive HSTS header
-expresswins.co.uk: could not connect to host
-expromo.pl: did not receive HSTS header
-extasic.com: could not connect to host
-extendwings.com: could not connect to host
-extensiblewebreportcard.org: could not connect to host
-exteriorservices.io: could not connect to host
-extramoney.cash: could not connect to host
-extranetpuc.com.br: max-age too low: 0
-extrapagetab.com: could not connect to host
-extrathemeshowcase.net: could not connect to host
-extratorrent.fyi: could not connect to host
-extratorrent.red: could not connect to host
-extratorrent.world: could not connect to host
-extratorrentlive.xyz: did not receive HSTS header
-extratorrents.tech: could not connect to host
-extremenetworking.net: could not connect to host
-extremeservicesandrestoration.com: could not connect to host
-extremfrank.tk: could not connect to host
-exultcosmetics.co.uk: did not receive HSTS header
-exxo.tk: could not connect to host
-exy.pw: could not connect to host
-eyal-dvorkin.com: could not connect to host
-eyasc.nl: could not connect to host
-eydesignguidelines.com: did not receive HSTS header
-eyeandfire.com: could not connect to host
-eyedarts.com: did not receive HSTS header
-eyeglassuniverse.com: did not receive HSTS header
-eyemagic.net: did not receive HSTS header
-eyemedica.de: did not receive HSTS header
-eyenote.gov: did not receive HSTS header
-eyes-berg.ch: did not receive HSTS header
-eyes-of-universe.eu: could not connect to host
-eyesoccer-didikh.rhcloud.com: could not connect to host
-eyesonly.cc: did not receive HSTS header
-eyrid.com: could not connect to host
-eytosh.net: could not connect to host
-eyyubyilmaz.com: could not connect to host
-ez.fi: could not connect to host
-ez3d.eu: could not connect to host
-ezgamble.com: could not connect to host
-ezimoeko.net: could not connect to host
-ezmod.org: could not connect to host
-eznfe.com: could not connect to host
-ezorgportaal.nl: could not connect to host
-ezpzdelivery.com: could not connect to host
-ezrefurb.co.uk: could not connect to host
-eztv.ch: did not receive HSTS header
-ezwritingservice.com: could not connect to host
-ezzhole.net: could not connect to host
-f-be.com: did not receive HSTS header
-f-rickroll-g.pw: could not connect to host
-f-s-u.co.uk: did not receive HSTS header
-f00.ca: did not receive HSTS header
-f00228.com: could not connect to host
-f1bigpicture.com: could not connect to host
-f2f.cash: could not connect to host
-f42.net: could not connect to host
-f5.hk: did not receive HSTS header
-f5197.co: could not connect to host
-f5la.com: did not receive HSTS header
-f5movies.top: could not connect to host
-f5w.de: did not receive HSTS header
-f6729.co: could not connect to host
-f6729.com: did not receive HSTS header
-f6957.co: could not connect to host
-f6957.com: did not receive HSTS header
-f81365.com: did not receive HSTS header
-f81818.com: did not receive HSTS header
-f82365.com: did not receive HSTS header
-f8842.com: could not connect to host
-f886666.com: did not receive HSTS header
-f899365.com: could not connect to host
-f9297.co: could not connect to host
-f9397.com: did not receive HSTS header
-f9721.com: did not receive HSTS header
-f9728.co: could not connect to host
-fabbro-roma.org: could not connect to host
-faber.io: could not connect to host
-faberusa.com: did not receive HSTS header
-fabhub.io: could not connect to host
-fabian-kluge.de: could not connect to host
-fabian-koeppen.de: did not receive HSTS header
-fabianasantiago.com: could not connect to host
-fabianfischer.de: could not connect to host
-fabianfranke.de: did not receive HSTS header
-fabianmunoz.com: did not receive HSTS header
-fabienbaker.com: could not connect to host
-fabrica360.com: could not connect to host
-fabrikafilmes.com.br: could not connect to host
-fabriko.fr: did not receive HSTS header
-fabriziorocca.com: could not connect to host
-fabrykowski.com: did not receive HSTS header
-fabrysociety.org: could not connect to host
-fabulouslyyouthfulskin.com: could not connect to host
-fabulouslyyouthfulskineyeserum.com: could not connect to host
-facadeforum.com: did not receive HSTS header
-faccess.it: did not receive HSTS header
-facebattle.com: did not receive HSTS header
-facebook.ax: could not connect to host
-facebooktsukaikata.net: did not receive HSTS header
-facepalmsecurity.com: could not connect to host
-facepolo.com: could not connect to host
-facepunch.org: could not connect to host
-facerepo.com: could not connect to host
-facesnf.com: could not connect to host
-fachfusspflege-exner.de: could not connect to host
-fachschaft-informatik.de: did not receive HSTS header
-facilitiessurvey.org: could not connect to host
-facilitrak.com: could not connect to host
-fackovcova.cz: could not connect to host
-fackovcova.eu: could not connect to host
-fackovcova.sk: could not connect to host
-fackovec.eu: could not connect to host
-fackovec.sk: could not connect to host
-factcool.com: did not receive HSTS header
-factorable.net: did not receive HSTS header
-factoringsolutions.co.uk: did not receive HSTS header
-factory-f.net: did not receive HSTS header
-factorygw.com: did not receive HSTS header
-factorypartsdirect.com: could not connect to host
-factys.do: could not connect to host
-fadednet.com: could not connect to host
-fadeev.legal: did not receive HSTS header
-fads-center.online: could not connect to host
-faerb.it: could not connect to host
-faerie-art.com: did not receive HSTS header
-faeriecakes.be: could not connect to host
-faesser.com: did not receive HSTS header
-fafarishoptrading.com: could not connect to host
-fafatiger.com: could not connect to host
-fag.wtf: could not connect to host
-fahnamporn.com: could not connect to host
-fahnen-fanwelt.de: did not receive HSTS header
-fail.coach: did not receive HSTS header
-fairbill.com: could not connect to host
-faircom.co.za: did not receive HSTS header
-fairgaming.ml: did not receive HSTS header
-fairkey.dk: did not receive HSTS header
-fairlyoddtreasures.com: did not receive HSTS header
-fairydust.space: could not connect to host
-faisalshuvo.com: did not receive HSTS header
-fakeapple.nl: could not connect to host
-fakeletters.org: could not connect to host
-faktura.pl: did not receive HSTS header
-falaland.com: could not connect to host
-falce.in: could not connect to host
-falcona.io: could not connect to host
-falconfrag.com: could not connect to host
-falconwiz.com: did not receive HSTS header
-falkp.no: did not receive HSTS header
-falkus.net: could not connect to host
-falldennismarketing.com: did not receive HSTS header
-fallenangeldrinks.eu: could not connect to host
-fallenangelspirits.uk: could not connect to host
-fallenspirits.co.uk: could not connect to host
-fallingapart.de: did not receive HSTS header
-fallout-craft.ru: could not connect to host
-false.in.net: could not connect to host
-faluninfo.ba: did not receive HSTS header
-famdouma.nl: could not connect to host
-fame-agency.net: could not connect to host
-famep.gov: could not connect to host
-famer.me: could not connect to host
-fameus.fr: could not connect to host
-fameuxhosting.co.uk: could not connect to host
-famfi.co: could not connect to host
-familie-mischak.de: could not connect to host
-familie-sander.rocks: max-age too low: 600
-familie-witzik.eu: could not connect to host
-familie-zimmermann.at: could not connect to host
-familiekiekjes.nl: could not connect to host
-familletouret.fr: did not receive HSTS header
-familytreesbyjackie.com: did not receive HSTS header
-famio.cn: could not connect to host
-famososnaweb.com: could not connect to host
-fanclubrbdmaniaromania.tk: could not connect to host
-fancy-bridge.com: could not connect to host
-fander.it: could not connect to host
-fanflow.com: did not receive HSTS header
-fanhouwan.com: did not receive HSTS header
-fansmade.art: could not connect to host
-fant.dk: did not receive HSTS header
-fantasticgardenersmelbourne.com.au: did not receive HSTS header
-fantasticpestcontrolmelbourne.com.au: did not receive HSTS header
-fantasycdn.com: could not connect to host
-fantasyfoot.tk: did not receive HSTS header
-fantasyprojections.com: could not connect to host
-fantasysportsnews.org: could not connect to host
-fantopia.club: could not connect to host
-fanvoice.com: could not connect to host
-fanyl.cn: could not connect to host
-fanyue123.tk: could not connect to host
-fanzhencha.com: could not connect to host
-fanzlive.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-fap.no: could not connect to host
-fapflix.net: did not receive HSTS header
-faq.lookout.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-faradji.nu: could not connect to host
-faraonplay5.com: could not connect to host
-faraonplay7.com: could not connect to host
-faraonplay8.com: could not connect to host
-faraslot8.com: could not connect to host
-faraslot8.net: could not connect to host
-faretravel.co.uk: could not connect to host
-farkas.bz: did not receive HSTS header
-farleymetals.com.au: did not receive HSTS header
-farm-vacations.com: could not connect to host
-farm24.co.uk: could not connect to host
-farmacia.pt: did not receive HSTS header
-farmaciacomunalelacchiarella.it: did not receive HSTS header
-farmaciaformula.com.br: could not connect to host
-farmacialaboratorio.it: did not receive HSTS header
-farmaciamedicom.com.br: did not receive HSTS header
-farmtoys.store: did not receive HSTS header
-farrel-f.cf: could not connect to host
-farrel-f.id: could not connect to host
-farrel-f.tk: could not connect to host
-farrelf.blog: could not connect to host
-farthing.xyz: could not connect to host
-farvisun.com: could not connect to host
-farwat.ru: could not connect to host
-fashion-hunters.pl: did not receive HSTS header
-fashion4ever.pl: did not receive HSTS header
-fashioncare.cz: did not receive HSTS header
-fashionflavorph.com: could not connect to host
-fashionhijabers.com: could not connect to host
-fashionholic.my: did not receive HSTS header
-fashionoutfits24.com: could not connect to host
-fashtic.nl: max-age too low: 2592000
-fashworldtrends.com: could not connect to host
-fasset.jp: could not connect to host
-fast-host.net: could not connect to host
-fastaim.de: could not connect to host
-fastbackmbg.be: could not connect to host
-fastbackmbm.be: could not connect to host
-fastboyscouts.com: could not connect to host
-fastboyscouts.de: could not connect to host
-fastcomcorp.net: did not receive HSTS header
-fastcp.top: could not connect to host
-fastest-hosting.co.uk: did not receive HSTS header
-fastforwardthemes.com: could not connect to host
-fastograph.com: did not receive HSTS header
-fastopen.ml: could not connect to host
-fastrevision.com: did not receive HSTS header
-fastwebsites.com.br: did not receive HSTS header
-faszienrollen-info.de: did not receive HSTS header
-fatalerrorcoded.eu: did not receive HSTS header
-fatdoge.cn: did not receive HSTS header
-fatedata.com: could not connect to host
-fatfueled.com: could not connect to host
-fatgeekflix.net: could not connect to host
-fatlossguide.xyz: could not connect to host
-fator25.com.br: could not connect to host
-fatox.de: could not connect to host
-fattorino.it: did not receive HSTS header
-fatwin.pw: could not connect to host
-fatzebra.com.au: max-age too low: 0
-fau8.ml: could not connect to host
-faui2k17.de: did not receive HSTS header
-faulty.equipment: did not receive HSTS header
-favirei.com: did not receive HSTS header
-fawkex.me: did not receive HSTS header
-faxite.com: did not receive HSTS header
-faxreader.net: could not connect to host
-fayettecountyoh.gov: could not connect to host
-fayolle.info: did not receive HSTS header
-fbcopy.com: could not connect to host
-fbf.gov: did not receive HSTS header
-fbhackpass.com: did not receive HSTS header
-fbi.pw: did not receive HSTS header
-fbook.top: could not connect to host
-fbox.li: could not connect to host
-fcapartsdb.com: could not connect to host
-fcarsenal.tk: could not connect to host
-fccarbon.com: could not connect to host
-fcgmd.gov: could not connect to host
-fcitasc.com: could not connect to host
-fckd.net: did not receive HSTS header
-fcp.cn: could not connect to host
-fctwo.download: could not connect to host
-fd020.com: did not receive HSTS header
-fdfz.edu.cn: could not connect to host
-fdj.im: could not connect to host
-fdn.one: could not connect to host
-fdos.me: could not connect to host
-fdsys.gov: did not receive HSTS header
-fdt.name: did not receive HSTS header
-feac.us: could not connect to host
-feaden.me: could not connect to host
-feard.space: could not connect to host
-fearghus.org: could not connect to host
-fearsomegaming.com: did not receive HSTS header
-featuredmen.com: could not connect to host
-fecik.sk: did not receive HSTS header
-fedbizopps.gov: could not connect to host
-federalregister.gov: did not receive HSTS header
-federicomigliavacca.it: could not connect to host
-federicoparty.it: could not connect to host
-fedn.it: could not connect to host
-fedo.moe: could not connect to host
-fedoramagazine.org: did not receive HSTS header
-fedrtc.org: could not connect to host
-fee-hosting.com: could not connect to host
-feedermarket.net: did not receive HSTS header
-feedstringer.com: could not connect to host
-feedthebot.com: did not receive HSTS header
-feedthefuture.gov: could not connect to host
-feeg-wage.gc.ca: could not connect to host
-feegg.com.br: could not connect to host
-feek.fit: did not receive HSTS header
-feeriedesign-event.com: could not connect to host
-feestbierfusten.nl: could not connect to host
-feezmodo.com: did not receive HSTS header
-fefore.com: did not receive HSTS header
-feg-wge.gc.ca: could not connect to host
-fegans.org.uk: did not receive HSTS header
-fehnladen.de: could not connect to host
-feirlane.org: could not connect to host
-feisbed.com: did not receive HSTS header
-feist.io: could not connect to host
-feitobrasilcosmeticos.com.br: did not receive HSTS header
-feizhujianzhi.com: did not receive HSTS header
-feldmann-stachelscheid.de: did not receive HSTS header
-felger-times.fr: could not connect to host
-felgitscher.xyz: max-age too low: 2592000
-felisslovakia.sk: did not receive HSTS header
-feliwyn.fr: did not receive HSTS header
-felixduart.com: did not receive HSTS header
-felixgenicio.com: did not receive HSTS header
-felixhefner.de: did not receive HSTS header
-felixkauer.de: could not connect to host
-felixklein.com: did not receive HSTS header
-felixrr.pro: could not connect to host
-felsmalerei.net: did not receive HSTS header
-femaex.com.br: did not receive HSTS header
-femaledom.xyz: could not connect to host
-femanca.com: did not receive HSTS header
-femdombbw.com: could not connect to host
-femiluna.com: could not connect to host
-feminism.lgbt: could not connect to host
-feminists.co: could not connect to host
-femradio.es: did not receive HSTS header
-fence-stlouis.com: could not connect to host
-fengyadi.com: could not connect to host
-fenixhost.com.br: could not connect to host
-fenixportal.eu: did not receive HSTS header
-fenno.net: could not connect to host
-fenriragic.com: did not receive HSTS header
-fensdorf.de: did not receive HSTS header
-fensterbau-mutscheller.de: could not connect to host
-fenteo.com: could not connect to host
-feras-alhajjaji.com: could not connect to host
-ferdies.co.za: did not receive HSTS header
-fergusoncastle.com: did not receive HSTS header
-feriahuamantla.com: could not connect to host
-ferienwohnungen-lastminute.de: could not connect to host
-fermanacuratampaparts.com: could not connect to host
-fern.health: did not receive HSTS header
-fernangp.com: could not connect to host
-fernseher-kauf.de: could not connect to host
-ferrolatino.com: could not connect to host
-feschiyan.com: could not connect to host
-festember.com: did not receive HSTS header
-festerculiacan.com: could not connect to host
-festicle.com: did not receive HSTS header
-festival-transform.fr: could not connect to host
-festival.house: could not connect to host
-festivalxdentro.com: did not receive HSTS header
-festizen.com: could not connect to host
-festrip.com: could not connect to host
-fetclips.se: could not connect to host
-fettbrot.tk: could not connect to host
-fettlaus.de: could not connect to host
-feudaltactics.com: could not connect to host
-feuerhuhn.de: could not connect to host
-feuerwehr-dachaufsetzer.de: could not connect to host
-feuerwehr-oberkotzau.de: did not receive HSTS header
-feuerwehrbadwurzach.de: did not receive HSTS header
-fexco.com: did not receive HSTS header
-fexmen.com: could not connect to host
-feyermedia.de: did not receive HSTS header
-ff-bg.xyz: could not connect to host
-ff-getzersdorf.at: did not receive HSTS header
-ff00228.com: could not connect to host
-ff18.cc: could not connect to host
-ff2k.net: could not connect to host
-ff44.net: did not receive HSTS header
-ff5197.co: could not connect to host
-ff6729.co: could not connect to host
-ff6729.com: did not receive HSTS header
-ff6957.co: could not connect to host
-ff763.com: could not connect to host
-ff9297.co: could not connect to host
-ff9397.com: did not receive HSTS header
-ff9721.com: did not receive HSTS header
-ff9728.co: could not connect to host
-ffbsee.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-ffdhw.com: could not connect to host
-ffh.me: did not receive HSTS header
-ffl123.com: did not receive HSTS header
-fflone.com: did not receive HSTS header
-ffsbgateway.com: could not connect to host
-fgafsaneh.ir: did not receive HSTS header
-fgdc.gov: did not receive HSTS header
-fgequipamentos.com.br: did not receive HSTS header
-fh169.cc: could not connect to host
-fh999.com: could not connect to host
-fhbnutrition.com: did not receive HSTS header
-fhcdn.xyz: could not connect to host
-fhg90.com: could not connect to host
-fhm.duckdns.org: did not receive HSTS header
-fhmkh.cn: could not connect to host
-fhsseniormens.club: could not connect to host
-fhyl789.com: could not connect to host
-fhyl888.com: could not connect to host
-fi-sanki.co.jp: could not connect to host
-fialat.cz: could not connect to host
-fiasgo.com: could not connect to host
-fibabanka.com.tr: did not receive HSTS header
-fibercoverage.com: could not connect to host
-fibrasynormasdecolombia.com: could not connect to host
-ficklenote.net: did not receive HSTS header
-ficlab.com: did not receive HSTS header
-fics-twosigma.com: could not connect to host
-ficus.io: could not connect to host
-fid-elite.ch: did not receive HSTS header
-fid.to: could not connect to host
-fidel.uk: did not receive HSTS header
-fidelapp.com: could not connect to host
-fideleslaici.com: did not receive HSTS header
-fidufinance.com: did not receive HSTS header
-fieldclockapp.com: did not receive HSTS header
-fieldtalk.co.uk: could not connect to host
-fiendishmasterplan.com: did not receive HSTS header
-fierlafijn.net: could not connect to host
-fierman.eu: could not connect to host
-fierman.net: could not connect to host
-fierman.us: could not connect to host
-fiestagenial.com: could not connect to host
-fifieldtech.com: did not receive HSTS header
-fiftyshadesofluca.ml: could not connect to host
-fig.co: did not receive HSTS header
-fig.ms: could not connect to host
-figan.cz: could not connect to host
-fightr.co: could not connect to host
-figura.im: did not receive HSTS header
-figuurzagers.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-fiilr.com: could not connect to host
-fiissh.tech: did not receive HSTS header
-fijnefeestdageneneengelukkignieuwjaar.nl: could not connect to host
-fiken.no: did not receive HSTS header
-fiksel.info: did not receive HSTS header
-fikt.space: could not connect to host
-fil.fi: did not receive HSTS header
-filamentia.nl: could not connect to host
-filebox.moe: could not connect to host
-filebox.space: could not connect to host
-filedir.com: did not receive HSTS header
-filedoom.ml: could not connect to host
-filedropbox.nl: could not connect to host
-fileio.io: could not connect to host
-fileon.com: could not connect to host
-filesense.com: could not connect to host
-filewall.de: did not receive HSTS header
-filey.co.uk: did not receive HSTS header
-filezilla.cn: did not receive HSTS header
-filhomes.ph: could not connect to host
-fili.org: did not receive HSTS header
-filiosoft.cloud: did not receive HSTS header
-filipsebesta.com: could not connect to host
-filleritemsindia.com: could not connect to host
-fillitupchallenge.eu: did not receive HSTS header
-film-storyboards.com: did not receive HSTS header
-filme-online.eu.com: could not connect to host
-filmesonline.online: did not receive HSTS header
-filmesubtitrate2017.online: could not connect to host
-filmitis.com: could not connect to host
-filmovizija.mk: did not receive HSTS header
-filmsphoto.com: did not receive HSTS header
-filo.xyz: could not connect to host
-filoitoupediou.gr: did not receive HSTS header
-filterflasche-kaufen.de: could not connect to host
-finalgear.com: could not connect to host
-finalprice.net: could not connect to host
-finalvpn.com: could not connect to host
-finalworkdriesstef.tk: could not connect to host
-financecontrol.tk: could not connect to host
-financenews.tk: could not connect to host
-financepark.ch: did not receive HSTS header
-financewithcromulent.com: could not connect to host
-financier.io: did not receive HSTS header
-financieringsportaal.nl: could not connect to host
-financniexperti.sk: could not connect to host
-finanzkontor.net: could not connect to host
-finchi.de: could not connect to host
-finchnest.co.uk: could not connect to host
-find-your-happy-place.de: did not receive HSTS header
-findcarspecs.com: did not receive HSTS header
-findcheapmusic.com: did not receive HSTS header
-findigo.fish: could not connect to host
-findmybottleshop.com.au: could not connect to host
-findmynudes.com: could not connect to host
-findoon.de: could not connect to host
-findthatnude.com: could not connect to host
-findthere.net: could not connect to host
-findtutorsnearme.com: did not receive HSTS header
-findyour.diet: could not connect to host
-fine-services.paris: could not connect to host
-finecraft.cc: could not connect to host
-finelovedolls.com: did not receive HSTS header
-finer04.pw: could not connect to host
-finesoft.ir: could not connect to host
-finesoon.net: could not connect to host
-finethin.com.br: could not connect to host
-finevegashomes.com: did not receive HSTS header
-finfev.de: did not receive HSTS header
-fingent.com: did not receive HSTS header
-fingerscrossed.style: could not connect to host
-finiteheap.com: did not receive HSTS header
-finkenberger.org: did not receive HSTS header
-finlandcook.online: could not connect to host
-finlandcook.top: could not connect to host
-finma.ch: did not receive HSTS header
-finstererlebnis.de: could not connect to host
-finsterlebnis.de: did not receive HSTS header
-fintechnics.com: could not connect to host
-fiodental.com.br: did not receive HSTS header
-fiork.com: did not receive HSTS header
-fire-wolf.com: could not connect to host
-fireandelectrical.co.uk: did not receive HSTS header
-firebaseio-demo.com: could not connect to host
-firebaseio.com: could not connect to host (error ignored - included regardless)
-firebird.io: did not receive HSTS header
-firebugmusic.com: did not receive HSTS header
-firechip.cc: could not connect to host
-firefall.rocks: could not connect to host
-firefart.at: did not receive HSTS header
-firegeisha.com: could not connect to host
-firegore.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-firehost.com: could not connect to host
-fireinthedeep.com: did not receive HSTS header
-firekoi.com: could not connect to host
-firemail.io: could not connect to host
-firepeak.ru: could not connect to host
-fireplex.co.uk: could not connect to host
-firesuite.net: did not receive HSTS header
-firevap.org: could not connect to host
-firewallconsultants.com: did not receive HSTS header
-fireworkcoaching.com: did not receive HSTS header
-firexarxa.de: could not connect to host
-firmale.com: could not connect to host
-firmenverzeichnis.nu: could not connect to host
-first-time-offender.com: could not connect to host
-firstchoicepool.com: did not receive HSTS header
-firstdogonthemoon.com.au: did not receive HSTS header
-firstforex.co.uk: did not receive HSTS header
-firstinnovation.co.jp: did not receive HSTS header
-firstinnovationltd.com: could not connect to host
-firstlook.org: did not receive HSTS header
-firstsecurity.cl: did not receive HSTS header
-fischers.it: could not connect to host
-fischers.srv.br: could not connect to host
-fise.cz: did not receive HSTS header
-fishermansbend.apartments: could not connect to host
-fishfinders.info: did not receive HSTS header
-fishingplaces.net: did not receive HSTS header
-fishme.in: could not connect to host
-fisiotohome.com: could not connect to host
-fiskelures.se: could not connect to host
-fiskestang.com: did not receive HSTS header
-fistu.la: could not connect to host
-fit-mit-system.eu: did not receive HSTS header
-fit4medien.de: did not receive HSTS header
-fitbylo.com: could not connect to host
-fitchannel.com: did not receive HSTS header
-fitea.cz: could not connect to host
-fitfitup.com: did not receive HSTS header
-fitiapp.com: could not connect to host
-fitinclass.com: did not receive HSTS header
-fitmeat.at: did not receive HSTS header
-fitnesskarate.club: could not connect to host
-fitnesswerk.de: could not connect to host
-fitqbe.com: did not receive HSTS header
-fitrate.site: could not connect to host
-fitseven.ru: did not receive HSTS header
-fitshop.com.br: could not connect to host
-fitsw.com: did not receive HSTS header
-fiuxy.bz: did not receive HSTS header
-fiuxy.co: did not receive HSTS header
-fiuxy.me: could not connect to host
-fiuxy.org: could not connect to host
-five.vn: did not receive HSTS header
-fiveboosts.xyz: could not connect to host
-fiveslice.pizza: did not receive HSTS header
-fivestarsitters.com: did not receive HSTS header
-fivestepfunnels.com: could not connect to host
-fivezerocreative.com: did not receive HSTS header
-fiws.net: did not receive HSTS header
-fix-the-timeline.com: could not connect to host
-fix-the-timeline.org: could not connect to host
-fixate.ru: max-age too low: 3153600
-fixeaide.com: did not receive HSTS header
-fixeaider.com: did not receive HSTS header
-fixhotsauce.com: did not receive HSTS header
-fixico-staging.nl: could not connect to host
-fixingdns.com: could not connect to host
-fixingscrews.co.uk: could not connect to host
-fixitfelix.us: could not connect to host
-fixmyglitch.com: could not connect to host
-fixtectools.co.za: could not connect to host
-fixthetimeline.com: could not connect to host
-fixthetimeline.org: could not connect to host
-fj.je: could not connect to host
-fjco.alsace: could not connect to host
-fjdekermadec.com: could not connect to host
-fjharcu.com: could not connect to host
-fjruiz.es: did not receive HSTS header
-fjugstad.com: could not connect to host
-fjzone.org: could not connect to host
-fkcdn.de: could not connect to host
-fkcovering.be: could not connect to host
-fl0111.com: did not receive HSTS header
-fl0222.com: did not receive HSTS header
-fl0333.com: did not receive HSTS header
-fl0555.com: did not receive HSTS header
-fl0666.com: did not receive HSTS header
-fl0777.com: did not receive HSTS header
-fl0888.com: did not receive HSTS header
-fl0999.com: did not receive HSTS header
-flacandmp3.ml: could not connect to host
-flagfic.com: did not receive HSTS header
-flagriculture.gov: could not connect to host
-flags.ninja: could not connect to host
-flairbros.at: could not connect to host
-flajshans.cz: did not receive HSTS header
-flam.io: could not connect to host
-flamengopi.tk: could not connect to host
-flamer-scene.com: did not receive HSTS header
-flamewall.net: could not connect to host
-flamingcow.tv: could not connect to host
-flamingkeys.com.au: could not connect to host
-flamingogroup.vn: did not receive HSTS header
-flanga.org: could not connect to host
-flareon.net: could not connect to host
-flaretechnologies.io: could not connect to host
-flasaki.gr: could not connect to host
-flashbaggie.com: could not connect to host
-flashcrasher.com: could not connect to host
-flatfix.com.ua: did not receive HSTS header
-flatlandchurch.com: did not receive HSTS header
-flavr.be: could not connect to host
-flawcheck.com: could not connect to host
-flc111.com: did not receive HSTS header
-flcatering.com: could not connect to host
-fleamarketgoods.com: could not connect to host
-fleischmann.com.br: did not receive HSTS header
-flemingtonaudiparts.com: could not connect to host
-flesters.com.br: could not connect to host
-fleurette.me: could not connect to host
-fleursdesoleil.fr: did not receive HSTS header
-flexapplications.se: did not receive HSTS header
-flexbuildingsystems.com: did not receive HSTS header
-flexdrukker.nl: could not connect to host
-flexinvesting.fi: could not connect to host
-flextrack.dk: did not receive HSTS header
-flextribly.xyz: could not connect to host
-flexve.com: could not connect to host
-flickcritter.com: could not connect to host
-fliexer.com: could not connect to host
-flightright.at: did not receive HSTS header
-flightright.co.uk: did not receive HSTS header
-flightright.com: did not receive HSTS header
-flightright.de: did not receive HSTS header
-flightright.es: did not receive HSTS header
-flightright.fr: did not receive HSTS header
-flightright.it: did not receive HSTS header
-flightright.se: did not receive HSTS header
-flightzero.cf: could not connect to host
-fliio.com: could not connect to host
-flikmsg.co: could not connect to host
-fling.dating: could not connect to host
-flipagram.com: did not receive HSTS header
-flipkey.com: did not receive HSTS header
-flirchi.com: did not receive HSTS header
-flirtos.de: did not receive HSTS header
-flirtycourts.com: could not connect to host
-flixflex.tk: could not connect to host
-flixhaven.net: did not receive HSTS header
-flixports.com: could not connect to host
-flixstats.com: could not connect to host
-flixtor.net: could not connect to host
-flixtube.me: did not receive HSTS header
-floatationlocations.com: did not receive HSTS header
-floating-journey-64892.herokuapp.com: could not connect to host
-floj.tech: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-flomeyer.de: could not connect to host
-flood.io: did not receive HSTS header
-floorballpoint.cz: did not receive HSTS header
-floors4lessbay.com: did not receive HSTS header
-flopy.club: could not connect to host
-florentynadawn.co.uk: could not connect to host
-floresvilleedc.org: did not receive HSTS header
-florian-lillpopp.de: max-age too low: 10
-florian-schlachter.de: could not connect to host
-florianbecker.it: could not connect to host
-florianlillpopp.de: max-age too low: 10
-floridaagriculture.gov: could not connect to host
-floridaconsumerhelp.gov: could not connect to host
-floridaderi.ru: could not connect to host
-floridaengineering.org: did not receive HSTS header
-floridaescapes.co.uk: did not receive HSTS header
-floridafieros.org: could not connect to host
-floridagulfbeachrealty.com: did not receive HSTS header
-florinapp.com: did not receive HSTS header
-florispoort.nl: did not receive HSTS header
-florlola.com: could not connect to host
-floro.me: did not receive HSTS header
-floseed.fr: could not connect to host
-flosserver.de: could not connect to host
-floth.at: could not connect to host
-flouartistique.ch: could not connect to host
-flow.pe: could not connect to host
-flowair24.ru: could not connect to host
-flowchats.me: did not receive HSTS header
-flowcount.xyz: could not connect to host
-flowerandplant.org: did not receive HSTS header
-flowersandclouds.com: could not connect to host
-flowersbylegacy.com: could not connect to host
-floweslawncare.com: could not connect to host
-flowfit.nyc: could not connect to host
-flowlo.me: could not connect to host
-flox.io: could not connect to host
-floydm.com: did not receive HSTS header
-flucky.xyz: could not connect to host
-flucto.com: could not connect to host
-flue-ducting.co.uk: did not receive HSTS header
-flugplatz-edvc.de: could not connect to host
-flugsportvereinigungcelle.de: did not receive HSTS header
-flugstadplasticsurgery.com: did not receive HSTS header
-fluhrers.de: did not receive HSTS header
-fluidojobs.com: could not connect to host
-flurp.de: did not receive HSTS header
-flurrybridge.com: could not connect to host
-flushstudios.com: did not receive HSTS header
-flusszs.tk: could not connect to host
-flux.by: did not receive HSTS header
-fluxent.de: could not connect to host
-flyaces.com: could not connect to host
-flyawayantennas.com: did not receive HSTS header
-flybunnyfly.dk: did not receive HSTS header
-flyersmarket.com: did not receive HSTS header
-flygpost.com: did not receive HSTS header
-flyingdoggy.net: could not connect to host
-flyingspaghettimonsterdonationsfund.nl: could not connect to host
-flyingyoung.top: could not connect to host
-flyshe.co.uk: did not receive HSTS header
-flyspace.ga: could not connect to host
-flyspace.ml: could not connect to host
-flyss.net: could not connect to host
-flyssh.net: could not connect to host
-fm-cdn.de: did not receive HSTS header
-fm83.nl: could not connect to host
-fm992.com: could not connect to host
-fmapplication.com: could not connect to host
-fmarchal.fr: did not receive HSTS header
-fmc.gov: could not connect to host
-fmi.gov: did not receive HSTS header
-fmovies.fyi: could not connect to host
-fmovies.life: could not connect to host
-fmstr.ml: could not connect to host
-fnb-griffinonline.com: did not receive HSTS header
-fnfpt.co.uk: could not connect to host
-fniephaus.com: did not receive HSTS header
-fnkr.net: did not receive HSTS header
-fnvsecurity.com: could not connect to host
-fnzc.co.nz: did not receive HSTS header
-fobc-usa.org: did not receive HSTS header
-focalforest.com: could not connect to host
-foerster-kunststoff.de: did not receive HSTS header
-fognini-depablo.eu: could not connect to host
-fogpublishingph.com: did not receive HSTS header
-fohome.ca: could not connect to host
-fokkusu.fi: did not receive HSTS header
-fokos.de: did not receive HSTS header
-foliekonsulenten.dk: did not receive HSTS header
-folioapp.io: could not connect to host
-followback.net: could not connect to host
-followerrocket.com: did not receive HSTS header
-followersya.com: did not receive HSTS header
-followings-live.com: did not receive HSTS header
-folwarkwiazy.pl: did not receive HSTS header
-fondanastasia.ru: did not receive HSTS header
-fondsdiscountbroker.de: did not receive HSTS header
-fondy.eu: did not receive HSTS header
-foneo.com: could not connect to host
-fonetiq.io: could not connect to host
-fontawesome.com: did not receive HSTS header
-fonts2u.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-foo: could not connect to host
-food4health.guide: could not connect to host
-foodattitude.ch: could not connect to host
-foodblogger.club: could not connect to host
-foodbuddy.ch: could not connect to host
-foodcare.ml: did not receive HSTS header
-foodcowgirls.com: could not connect to host
-foodiebox.no: could not connect to host
-foodies.my: did not receive HSTS header
-foodievenues.com: could not connect to host
-foodphotographyblog.com: did not receive HSTS header
-foodplantengineering.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-foodsafetyworkinggroup.gov: could not connect to host
-foodserve.in: could not connect to host
-foodsouvenirs.it: could not connect to host
-foodtable.at: did not receive HSTS header
-footballmapped.com: could not connect to host
-footlegende.fr: did not receive HSTS header
-footloose.co.uk: did not receive HSTS header
-footstepstofreedom.com.au: did not receive HSTS header
-forafifty.co.za: could not connect to host
-foraje-profesionale.ro: could not connect to host
-forbid.life: could not connect to host
-forbiddenhistory.info: could not connect to host
-forbook.net: could not connect to host
-forbusiness.ca: could not connect to host
-forcamp.ga: could not connect to host
-force-des-maths.com: did not receive HSTS header
-forces.army: could not connect to host
-fordbydesign.com: did not receive HSTS header
-fordshop.by: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-fordtrac.com.br: did not receive HSTS header
-foreignexchangeresource.com: did not receive HSTS header
-foresdon.jp: did not receive HSTS header
-forestfinance.fr: did not receive HSTS header
-foresthillhomes.ca: did not receive HSTS header
-foreveralone.io: could not connect to host
-foreverclean.com: did not receive HSTS header
-foreveryoung.pt: did not receive HSTS header
-forex-dan.com: did not receive HSTS header
-forex-plus.com: did not receive HSTS header
-forexsignals7.com: could not connect to host
-forextickler.com: could not connect to host
-forextimes.ru: did not receive HSTS header
-forextraders.com: did not receive HSTS header
-forgix.com: did not receive HSTS header
-forlagetmarx.dk: did not receive HSTS header
-formadmin.com: did not receive HSTS header
-formaliteo.com: did not receive HSTS header
-formasdemaquillarse.com: did not receive HSTS header
-formazioneopen.it: could not connect to host
-formbetter.com: could not connect to host
-formersessalaries.com: did not receive HSTS header
-formforger.com: could not connect to host
-formini.dz: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-formkiq.com: could not connect to host
-formula.cf: could not connect to host
-foro.io: could not connect to host
-forodeespanol.com: did not receive HSTS header
-forodieta.com: could not connect to host
-forologikidilosi.com.gr: could not connect to host
-forourselves.com: could not connect to host
-forpc.us: did not receive HSTS header
-forplanetsake.com: could not connect to host
-forplayers.pl: could not connect to host
-forquilhinhanoticias.com.br: did not receive HSTS header
-forro.berlin: could not connect to host
-forsakringsarkivet.se: could not connect to host
-forsec.nl: did not receive HSTS header
-forsyththeatre.com: could not connect to host
-fortesanshop.it: could not connect to host
-fortknox.cz: did not receive HSTS header
-fortnitemagic.ga: could not connect to host
-fortoglethorpega.gov: could not connect to host
-fortran.io: did not receive HSTS header
-fortuna-loessnitz.de: could not connect to host
-fortuna-s.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-fortworth.ch: did not receive HSTS header
-forty2.eu: did not receive HSTS header
-forum-gilee.cf: did not receive HSTS header
-forum-heg.ch: could not connect to host
-forum-kinozal-tv.appspot.com: did not receive HSTS header
-forum-kinozal.appspot.com: did not receive HSTS header
-forum.linode.com: did not receive HSTS header
-forumjuridico.org: did not receive HSTS header
-forumotomobil.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-forumvoordemocratie.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-forus.be: could not connect to host
-foryoucosmeticos.com.br: could not connect to host
-foselectro.ru: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-foshanshequ.com: could not connect to host
-fossewayflowers.co.uk: could not connect to host
-fossewayflowers.com: could not connect to host
-fossewaygardencentre.co.uk: did not receive HSTS header
-fossgruppen.se: could not connect to host
-fossguard.com: could not connect to host
-fotikpro.ru: could not connect to host
-fotiu.com: could not connect to host
-foto-pro.by: did not receive HSTS header
-fotocerita.net: could not connect to host
-fotocopiatrici.roma.it: could not connect to host
-fotogiraffe.ru: did not receive HSTS header
-fotografosexpertos.com: did not receive HSTS header
-fotopasja.info: could not connect to host
-fotowettbewerb.co: could not connect to host
-foundationspecialisteast.com: could not connect to host
-foundationswellness.net: did not receive HSTS header
-fourashesgolfcentre.uk: could not connect to host
-fourchin.net: could not connect to host
-fourwheelpartloanssimple.com: did not receive HSTS header
-foutrelis.com: did not receive HSTS header
-fowlervwparts.com: could not connect to host
-foxbnc.co.uk: did not receive HSTS header
-foxbnc.uk: could not connect to host
-foxdev.co: did not receive HSTS header
-foxdev.io: could not connect to host
-foxes.no: could not connect to host
-foxhound.com.br: did not receive HSTS header
-foxing.club: could not connect to host
-foxley-farm.co.uk: did not receive HSTS header
-foxley-seeds.co.uk: did not receive HSTS header
-foxleyseeds.co.uk: could not connect to host
-foxmay.co.uk: could not connect to host
-foxterrier.com.br: could not connect to host
-foxtrot.pw: could not connect to host
-foxvisor.com: could not connect to host
-foxyslut.com: could not connect to host
-foyale.io: could not connect to host
-foyer-laique-segre.com: did not receive HSTS header
-fpaci.org: could not connect to host
-fpgradosuperior.com: did not receive HSTS header
-fpki.sh: could not connect to host
-fpt-technojapan.com: could not connect to host
-fpvr.org: did not receive HSTS header
-fq.mk: did not receive HSTS header
-fr0zenbits.io: could not connect to host
-fr33d0m.link: could not connect to host
-fractionalciso.com: did not receive HSTS header
-fragilesolar.cf: could not connect to host
-fragnic.com: could not connect to host
-fragrances.bg: did not receive HSTS header
-fralef.me: did not receive HSTS header
-fralippolippi.tk: could not connect to host
-framedpaws.com: could not connect to host
-fran.id: did not receive HSTS header
-francescoservida.ch: did not receive HSTS header
-francevpn.xyz: could not connect to host
-francis.ph: could not connect to host
-francis.tokyo: did not receive HSTS header
-francisdelreal.com: did not receive HSTS header
-franckyz.com: did not receive HSTS header
-francois-gaillard.fr: did not receive HSTS header
-francois-vidit.com: did not receive HSTS header
-francoiscarrier.com: did not receive HSTS header
-frangor.info: did not receive HSTS header
-franke-chemie.de: could not connect to host
-frankedier.com: could not connect to host
-frankfurt-am-start.de: did not receive HSTS header
-frankhaala.com: could not connect to host
-frankierprofi.de: did not receive HSTS header
-frankieruiz.tk: could not connect to host
-franklincountyflorida.gov: could not connect to host
-franklincountyny.gov: did not receive HSTS header
-franklinhua.com: could not connect to host
-frankmorrow.com: did not receive HSTS header
-frankpalomeque.com: did not receive HSTS header
-franksiler.com: did not receive HSTS header
-frankwei.xyz: did not receive HSTS header
-franqois.id: did not receive HSTS header
-fransallen.com: could not connect to host
-franta.biz: did not receive HSTS header
-franta.email: did not receive HSTS header
-franzt.ovh: could not connect to host
-frasesaniversarios.com.br: did not receive HSTS header
-frasesdeamizade.pt: could not connect to host
-frasestop.com.br: could not connect to host
-frasys.cloud: could not connect to host
-frasys.io: could not connect to host
-frasys.net: could not connect to host
-fraudempire.com: could not connect to host
-frccsgo.tk: could not connect to host
-freakyamazing.com: could not connect to host
-freakyaweso.me: could not connect to host
-freakyawesome.agency: could not connect to host
-freakyawesome.art: could not connect to host
-freakyawesome.band: could not connect to host
-freakyawesome.business: could not connect to host
-freakyawesome.ca: could not connect to host
-freakyawesome.club: could not connect to host
-freakyawesome.co: could not connect to host
-freakyawesome.co.uk: could not connect to host
-freakyawesome.com: could not connect to host
-freakyawesome.company: could not connect to host
-freakyawesome.dance: could not connect to host
-freakyawesome.design: could not connect to host
-freakyawesome.education: could not connect to host
-freakyawesome.email: could not connect to host
-freakyawesome.events: could not connect to host
-freakyawesome.fashion: could not connect to host
-freakyawesome.fitness: could not connect to host
-freakyawesome.fm: could not connect to host
-freakyawesome.fun: could not connect to host
-freakyawesome.fyi: could not connect to host
-freakyawesome.games: could not connect to host
-freakyawesome.guide: could not connect to host
-freakyawesome.guru: could not connect to host
-freakyawesome.in: could not connect to host
-freakyawesome.info: could not connect to host
-freakyawesome.io: did not receive HSTS header
-freakyawesome.lgbt: could not connect to host
-freakyawesome.life: could not connect to host
-freakyawesome.live: could not connect to host
-freakyawesome.management: could not connect to host
-freakyawesome.marketing: could not connect to host
-freakyawesome.me: could not connect to host
-freakyawesome.media: could not connect to host
-freakyawesome.net: could not connect to host
-freakyawesome.network: could not connect to host
-freakyawesome.news: could not connect to host
-freakyawesome.online: could not connect to host
-freakyawesome.org: could not connect to host
-freakyawesome.photography: could not connect to host
-freakyawesome.photos: could not connect to host
-freakyawesome.press: could not connect to host
-freakyawesome.recipes: could not connect to host
-freakyawesome.rentals: could not connect to host
-freakyawesome.reviews: could not connect to host
-freakyawesome.science: could not connect to host
-freakyawesome.services: could not connect to host
-freakyawesome.shop: could not connect to host
-freakyawesome.site: could not connect to host
-freakyawesome.social: could not connect to host
-freakyawesome.software: could not connect to host
-freakyawesome.solutions: could not connect to host
-freakyawesome.space: could not connect to host
-freakyawesome.store: could not connect to host
-freakyawesome.support: could not connect to host
-freakyawesome.team: could not connect to host
-freakyawesome.tech: could not connect to host
-freakyawesome.technology: could not connect to host
-freakyawesome.tips: could not connect to host
-freakyawesome.today: could not connect to host
-freakyawesome.tours: could not connect to host
-freakyawesome.training: could not connect to host
-freakyawesome.tv: could not connect to host
-freakyawesome.video: could not connect to host
-freakyawesome.website: could not connect to host
-freakyawesome.work: could not connect to host
-freakyawesome.world: could not connect to host
-freakyawesome.wtf: could not connect to host
-freakyawesome.xyz: could not connect to host
-freakyawesome.yoga: could not connect to host
-freakyawesomeblog.com: could not connect to host
-freakyawesomeio.com: could not connect to host
-freakyawesomemedia.com: could not connect to host
-freakyawesomenews.com: could not connect to host
-freakyawesomeplugin.com: could not connect to host
-freakyawesomeplugins.com: could not connect to host
-freakyawesomesite.com: could not connect to host
-freakyawesometeam.com: could not connect to host
-freakyawesometheme.com: could not connect to host
-freakyawesomethemes.com: could not connect to host
-freakyawesomewp.com: could not connect to host
-frebi.org: could not connect to host
-frebib.me: could not connect to host
-freddyfazbearspizzeria.com: did not receive HSTS header
-freddysfuncastles.co.uk: could not connect to host
-freddythechick.uk: could not connect to host
-frederickalcantara.com: could not connect to host
-frederickmd.gov: could not connect to host
-fredliang.cn: could not connect to host
-fredtec.ru: did not receive HSTS header
-free-traff.cf: could not connect to host
-free-your-pc.com: could not connect to host
-free.ac.cn: could not connect to host
-free8.xyz: could not connect to host
-freeasinlliure.org: could not connect to host
-freeassangenow.org: could not connect to host
-freeasyshop.com: did not receive HSTS header
-freeben666.fr: could not connect to host
-freeblog.me: could not connect to host
-freebookmakerbets.com.au: did not receive HSTS header
-freebsd.la: could not connect to host
-freebsd.one: could not connect to host
-freebsd.wiki: could not connect to host
-freecam2cam.site: could not connect to host
-freecashfunnel.com: could not connect to host
-freecookies.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-freecycleusa.com: did not receive HSTS header
-freedgb.com: did not receive HSTS header
-freedogecrypt.tk: could not connect to host
-freedombankva.com: did not receive HSTS header
-freedomfrontier.tk: could not connect to host
-freedomisslavery.tk: could not connect to host
-freedomkiaparts.com: could not connect to host
-freedomrealtyoftexas.com: did not receive HSTS header
-freedomvote.nl: could not connect to host
-freeflow.tv: could not connect to host
-freehao123.cn: could not connect to host
-freejasongoudlock.org: did not receive HSTS header
-freejidi.com: could not connect to host
-freelance-magazine.net: did not receive HSTS header
-freelance.guide: could not connect to host
-freelanced.co.za: could not connect to host
-freelancemw.com: did not receive HSTS header
-freelancerhub.online: did not receive HSTS header
-freelancerinc.us: could not connect to host
-freelanceshipping.com: did not receive HSTS header
-freelanceunited.co.uk: could not connect to host
-freelandinnovation.com: did not receive HSTS header
-freelansir.com: could not connect to host
-freelo.cz: did not receive HSTS header
-freelysurf.cf: could not connect to host
-freemania.eu: could not connect to host
-freemania.nl: could not connect to host
-freemanning.de: did not receive HSTS header
-freematthale.net: could not connect to host
-freepoints.us: could not connect to host
-freergform.org: could not connect to host
-freeslots.guru: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-freesoftwaredriver.com: could not connect to host
-freesounding.com: did not receive HSTS header
-freesounding.ru: did not receive HSTS header
-freesquare.net: could not connect to host
-freethought.org.au: could not connect to host
-freeutopia.org: did not receive HSTS header
-freevps.us: could not connect to host
-freewarez.org: could not connect to host
-freexmovie.com: could not connect to host
-frei.social: could not connect to host
-freiboth.ddns.net: could not connect to host
-freifamily.ch: did not receive HSTS header
-freifunk-in-solingen.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-freifunk-lindlar.net: could not connect to host
-freifunk-nrw.de: could not connect to host
-freifunk-remscheid.de: could not connect to host
-frejasdal.dk: could not connect to host
-frenchguy.ch: did not receive HSTS header
-frenzel.dk: could not connect to host
-freqlabs.com: did not receive HSTS header
-fresh-components.com: did not receive HSTS header
-freshdesigns.de: did not receive HSTS header
-freshfind.xyz: could not connect to host
-freshgujarat.com: did not receive HSTS header
-freshislandfish.com: did not receive HSTS header
-freshkiss.com.au: did not receive HSTS header
-freshlymind.com: did not receive HSTS header
-freshmaza.com: could not connect to host
-freshmaza.io: could not connect to host
-freshmaza.net: could not connect to host
-freshpounds.com: could not connect to host
-frezbo.com: could not connect to host
-fribourgviking.net: could not connect to host
-frickenate.com: could not connect to host
-fridaperfumaria.com.br: could not connect to host
-fridayfoucoud.ma: could not connect to host
-friedenauer-herbstfest.de: could not connect to host
-friedhelm-wolf.de: could not connect to host
-friendica.ch: could not connect to host
-friendlyfiregameshow.com: could not connect to host
-friends-of-naz.com: could not connect to host
-friends-socialgroup.org: did not receive HSTS header
-friends.tn: could not connect to host
-friendship-quotes.co.uk: could not connect to host
-frieslandrail.nl: did not receive HSTS header
-friplay.host: could not connect to host
-fritteli.ch: did not receive HSTS header
-frly.de: did not receive HSTS header
-frnco.uk: could not connect to host
-frodriguez.xyz: could not connect to host
-froehlich.it: did not receive HSTS header
-froggstack.de: did not receive HSTS header
-frogsonamission.de: could not connect to host
-frolov.net: did not receive HSTS header
-from-the-net.com: could not connect to host
-fromanolderwoman.com: did not receive HSTS header
-fromix.de: could not connect to host
-fromlemaytoz.com: could not connect to host
-fromthemonks.com: could not connect to host
-fromthesoutherncross.com: could not connect to host
-front-end.dog: could not connect to host
-frontier.bet: could not connect to host
-frontierdiscount.com: could not connect to host
-frontisme.nl: could not connect to host
-frontletter.io: did not receive HSTS header
-frontline6.com: did not receive HSTS header
-frost-ci.xyz: could not connect to host
-frostbytes.net: could not connect to host
-frostednetwork.com: could not connect to host
-frosty-gaming.xyz: could not connect to host
-frostysummers.com: could not connect to host
-froufe.com: did not receive HSTS header
-frozendurian.club: could not connect to host
-frp-roleplay.de: could not connect to host
-frsis2017.com: could not connect to host
-frsnpwr.net: could not connect to host
-frtr.gov: did not receive HSTS header
-frugalmechanic.com: could not connect to host
-fruitusers.com: could not connect to host
-fruityfitness.com: did not receive HSTS header
-frumious.fyi: could not connect to host
-frusky.net: could not connect to host
-frydrychit.cz: could not connect to host
-fs-community.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-fs-fitness.eu: could not connect to host
-fs-gamenet.de: did not receive HSTS header
-fsck.cz: could not connect to host
-fsdress.com: could not connect to host
-fsf.moe: could not connect to host
-fsfi.is: could not connect to host
-fsinf.at: did not receive HSTS header
-fsj4u.ch: did not receive HSTS header
-fspphoto.com: could not connect to host
-fsradio.eu: could not connect to host
-fsrs.gov: could not connect to host
-fsstyle.com: could not connect to host
-fstatic.io: could not connect to host
-fstfy.de: could not connect to host
-ftctele.com: could not connect to host
-fteproxy.org: did not receive HSTS header
-ftf.agency: did not receive HSTS header
-ftgeufyihreufheriofeuozirgrgd.tk: could not connect to host
-ftgho.com: could not connect to host
-ftng.se: could not connect to host
-ftpi.ml: could not connect to host
-ftrac.com.br: did not receive HSTS header
-ftworthhousekeeper.com: could not connect to host
-fu639.top: could not connect to host
-fu898.top: could not connect to host
-fuchsy.com: could not connect to host
-fuciam.com.co: could not connect to host
-fuck-your-false-positive.de: could not connect to host
-fuckbilibili.com: could not connect to host
-fuckcf.cf: could not connect to host
-fuckgfw233.org: could not connect to host
-fucknazis.cf: could not connect to host
-fuckobr.com: could not connect to host
-fuckobr.net: could not connect to host
-fuckobr.org: could not connect to host
-fuckobr.ru: could not connect to host
-fuckobr.su: could not connect to host
-fuckssl.com: could not connect to host
-fuckyoupaypal.me: could not connect to host
-fudanshi.org: could not connect to host
-fuego.tech: could not connect to host
-fuelfirebrand.com: could not connect to host
-fuelministry.com: did not receive HSTS header
-fugamo.de: did not receive HSTS header
-fugioninc.com: did not receive HSTS header
-fugle.de: could not connect to host
-fujieb.com: could not connect to host
-fukuko.biz: could not connect to host
-fukuko.xyz: could not connect to host
-fukuoka-cityliner.jp: did not receive HSTS header
-fukushima-web.com: did not receive HSTS header
-fukushimacoffee.com: could not connect to host
-fulibyg.com: did not receive HSTS header
-fulijiejie.com: could not connect to host
-fulilingyu.info: could not connect to host
-fuliydys.com: could not connect to host
-full-stack.ninja: did not receive HSTS header
-fullereno.com: did not receive HSTS header
-fullmoviez.co: did not receive HSTS header
-fullnitrous.com: did not receive HSTS header
-fullpackage.co.uk: did not receive HSTS header
-fullreggaetonrd.com: did not receive HSTS header
-fullstack.love: did not receive HSTS header
-fulltxt.ml: could not connect to host
-fullytrained.co.uk: could not connect to host
-fumiware.com: could not connect to host
-fun25.tk: did not receive HSTS header
-fun4tomorrow.com: could not connect to host
-fun9.cc: could not connect to host
-fun99.cc: could not connect to host
-funandbounce.com: could not connect to host
-funarena.com.ua: could not connect to host
-funbouncelincs.co.uk: could not connect to host
-fundacionhijosdelsol.org: could not connect to host
-fundamentt.com: did not receive HSTS header
-funderburg.me: did not receive HSTS header
-fundingempire.com: did not receive HSTS header
-funerariahogardecristo.cl: did not receive HSTS header
-fungame.eu: did not receive HSTS header
-funi4u.com: did not receive HSTS header
-funideas.org: could not connect to host
-funkazoid-radio.com: could not connect to host
-funkes-ferien.de: did not receive HSTS header
-funkner.ru: could not connect to host
-funkygamer1.de: could not connect to host
-funkyweddingideas.com.au: could not connect to host
-funnelweb.xyz: could not connect to host
-funny-joke-pictures.com: did not receive HSTS header
-funnyang.com: could not connect to host
-funrun.com: did not receive HSTS header
-funtastic-event-hire.co.uk: did not receive HSTS header
-funtastic.ie: could not connect to host
-funtasticinflatablesdurham.co.uk: could not connect to host
-funtimebourne.co.uk: did not receive HSTS header
-fuorifuocogenova.it: could not connect to host
-furaje-iasi.com: could not connect to host
-furcity.me: could not connect to host
-furi.ga: could not connect to host
-furiffic.com: did not receive HSTS header
-furnation.com: could not connect to host
-furnitureconcept.co.uk: could not connect to host
-furry.agency: could not connect to host
-furry.be: did not receive HSTS header
-furry.zone: did not receive HSTS header
-furrybot.me: could not connect to host
-furryrex.top: could not connect to host
-furrytf.club: could not connect to host
-furryyiff.site: could not connect to host
-fursuitbutts.com: could not connect to host
-furtherfood.com: did not receive HSTS header
-furtivelook.com: could not connect to host
-fusedrops.com: could not connect to host
-fushee.com: could not connect to host
-fusionmate.com: did not receive HSTS header
-fuszara.eu: could not connect to host
-futa.agency: could not connect to host
-futagro.com: did not receive HSTS header
-futbol11.com: could not connect to host
-futbomb.com: could not connect to host
-futcre.com: could not connect to host
-futo.biz: could not connect to host
-futos.de: could not connect to host
-futrou.com: could not connect to host
-future-moves.com: did not receive HSTS header
-futurefire.de: could not connect to host
-futurefundapp.com: could not connect to host
-futurehack.io: could not connect to host
-futureoceans.org: did not receive HSTS header
-futuresonline.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-futurestarsusa.org: did not receive HSTS header
-futuretechnologi.es: could not connect to host
-futuretimes.io: could not connect to host
-futureyouhealth.com: did not receive HSTS header
-futuristacademy.io: could not connect to host
-futuristarchitecture.com: did not receive HSTS header
-futurope.com: did not receive HSTS header
-fuvelis.com: could not connect to host
-fuvelis.fr: max-age too low: 7776000
-fuvpn.com: could not connect to host
-fuxwerk.de: could not connect to host
-fuzoku-sodan.com: could not connect to host
-fwei.tk: did not receive HSTS header
-fwww7.com: did not receive HSTS header
-fx24.uk: did not receive HSTS header
-fxgame.online: could not connect to host
-fxpig-ib.com: could not connect to host
-fxstrategics.com: could not connect to host
-fxwebstudio.com.au: max-age too low: 0
-fy380.com: max-age too low: 0
-fydjbsd.cn: could not connect to host
-fyodorpi.com: did not receive HSTS header
-fyol.pw: could not connect to host
-fyreek.me: did not receive HSTS header
-fyroeo.fr: did not receive HSTS header
-fysio123.nl: did not receive HSTS header
-fysiohaenraets.nl: did not receive HSTS header
-fysiotherapienieuwveen.nl: did not receive HSTS header
-fzn.io: did not receive HSTS header
-fzslm.me: did not receive HSTS header
-fztopsec.com: could not connect to host
-fzx750.ru: could not connect to host
-g-i-s.vn: could not connect to host
-g-marketing.ro: could not connect to host
-g-o.pl: did not receive HSTS header
-g-rickroll-o.pw: could not connect to host
-g00228.com: could not connect to host
-g01.in.ua: could not connect to host
-g1jeu.com: could not connect to host
-g1s.cc: could not connect to host
-g2-inc.com: max-age too low: 600
-g2a.co: did not receive HSTS header
-g2g.com: did not receive HSTS header
-g2x.ru: did not receive HSTS header
-g30365.com: could not connect to host
-g36594.com: could not connect to host
-g3circuit.com: could not connect to host
-g3rv4.com: did not receive HSTS header
-g47.web.id: could not connect to host
-g4w.co: could not connect to host (error ignored - included regardless)
-g5.gov: could not connect to host
-g5197.co: could not connect to host
-g5led.nl: could not connect to host
-g6666g.tk: could not connect to host
-g6729.co: could not connect to host
-g6957.co: could not connect to host
-g6957.com: did not receive HSTS header
-g77.ca: could not connect to host
-g81365.com: did not receive HSTS header
-g81818.com: did not receive HSTS header
-g82365.com: did not receive HSTS header
-g9297.co: could not connect to host
-g9397.com: did not receive HSTS header
-g9721.com: did not receive HSTS header
-g9728.co: could not connect to host
-gaanbaksho.com.au: did not receive HSTS header
-gaasuper6.com: could not connect to host
-gabber.scot: could not connect to host
-gabemack.com: did not receive HSTS header
-gabethebabetv.com: could not connect to host
-gabi.com.es: could not connect to host
-gabi.soy: did not receive HSTS header
-gabi.uno: could not connect to host
-gablaxian.com: max-age too low: 2592000
-gabriele-kluge.de: could not connect to host
-gabrielsimonet.ch: could not connect to host
-gabz.pw: could not connect to host
-gadget-tips.com: did not receive HSTS header
-gadgets-and-accessories.store: could not connect to host
-gadgets-cars.com.es: could not connect to host
-gadse.games: could not connect to host
-gaelleetarnaud.com: did not receive HSTS header
-gaest.com: did not receive HSTS header
-gafachi.com: could not connect to host
-gagekroljic.com: could not connect to host
-gagne-enterprises.com: did not receive HSTS header
-gagne.tk: could not connect to host
-gaichanh.com: could not connect to host
-gailbartist.com: did not receive HSTS header
-gailfellowsphotography.com: could not connect to host
-gainesvillega.gov: could not connect to host
-gainesvillegoneaustin.org: could not connect to host
-gaite.me: could not connect to host
-gakkainavi-epsilon.jp: could not connect to host
-gakkainavi-epsilon.net: could not connect to host
-gakkainavi.jp: did not receive HSTS header
-gakkainavi.net: did not receive HSTS header
-gakkainavi4.com: could not connect to host
-gakkainavi4.jp: did not receive HSTS header
-gakkainavi4.net: did not receive HSTS header
-gala.kiev.ua: could not connect to host
-galabau-maurmann.de: could not connect to host
-galactic-crew.org: did not receive HSTS header
-galardi.org: could not connect to host
-galaxymimi.com: could not connect to host
-galecia.com: did not receive HSTS header
-galena.io: could not connect to host
-galenskap.eu: could not connect to host
-galeria42.com: could not connect to host
-galeriadobimba.com.br: could not connect to host
-galeriajardim.com.br: did not receive HSTS header
-galerialamanai.com: did not receive HSTS header
-galeriart.xyz: could not connect to host
-galerieautodirect.com: did not receive HSTS header
-galgoafegao.com.br: could not connect to host
-galgoingles.com.br: could not connect to host
-galgopersa.com.br: could not connect to host
-galilel.cloud: could not connect to host
-galileomtz.com: did not receive HSTS header
-gallery44.org: did not receive HSTS header
-galoisvpn.xyz: could not connect to host
-galoscoin.nl: max-age too low: 2592000
-gam3rs.de: did not receive HSTS header
-gamajo.com: did not receive HSTS header
-gamanlu.com: could not connect to host
-gambit.pro: could not connect to host
-gambitcloud.net: could not connect to host
-gamblersgaming.eu: could not connect to host
-game-club.me: could not connect to host
-game-gentle.com: could not connect to host
-game.yt: could not connect to host
-gamebits.net: did not receive HSTS header
-gamecave.de: could not connect to host
-gamecdn.com: could not connect to host
-gamechasm.com: could not connect to host
-gamefund.me: could not connect to host
-gameguardian.net: did not receive HSTS header
-gamehacks.me: did not receive HSTS header
-gameharbor.eu: could not connect to host
-gameindustry.de: did not receive HSTS header
-gameink.net: did not receive HSTS header
-gamek.es: could not connect to host
-gamenauta.com.br: did not receive HSTS header
-gamenected.com: could not connect to host
-gamenected.de: could not connect to host
-gameofbay.org: could not connect to host
-gameofpwnz.com: did not receive HSTS header
-gamepad.vg: could not connect to host
-gamepader.com: could not connect to host
-gameparade.de: could not connect to host
-gameparagon.info: could not connect to host
-gamepiece.com: did not receive HSTS header
-gamereader.de: could not connect to host
-gamerpoets.com: did not receive HSTS header
-gamerslair.org: could not connect to host
-gamerz-point.de: max-age too low: 10368000
-gamerz-stream.com: did not receive HSTS header
-gameserver-sponsor.de: did not receive HSTS header
-gamestats.gg: could not connect to host
-gamesurferapp.com: could not connect to host
-gameswitchers.uk: could not connect to host
-gametilt.com: could not connect to host
-gametium.com: could not connect to host
-gametium.es: could not connect to host
-gametowndev.tk: could not connect to host
-gamhealth.net: could not connect to host
-gamingmedia.eu: could not connect to host
-gamingrealms.net: did not receive HSTS header
-gamingreinvented.com: did not receive HSTS header
-gamingwithcromulent.com: could not connect to host
-gamisalya.com: did not receive HSTS header
-gamishijabsyari.com: could not connect to host
-gamismodelbaru.com: did not receive HSTS header
-gamismodernshop.com: did not receive HSTS header
-gamismurahonline.com: could not connect to host
-gamoice.com: could not connect to host
-gamoloco.com: did not receive HSTS header
-gampenhof.de: could not connect to host
-gamster.tv: could not connect to host
-gan.wtf: could not connect to host
-gandc.co: could not connect to host
-gangnam-club.com: could not connect to host
-gangnam-karaoke.com: could not connect to host
-gangnamavenue.com: did not receive HSTS header
-gangnamcool.com: could not connect to host
-ganhonet.com.br: did not receive HSTS header
-ganyouxuan.com: did not receive HSTS header
-gaojianli.me: could not connect to host
-gaojianli.tk: could not connect to host
-gaon.network: could not connect to host
-gaopindy.com: did not receive HSTS header
-gaptek.id: did not receive HSTS header
-garage-abri-chalet.fr: did not receive HSTS header
-garage-door.pro: could not connect to host
-garage-meynard.com: could not connect to host
-garagefox.ch: did not receive HSTS header
-garagelink.jp: did not receive HSTS header
-garagemhermetica.org: could not connect to host
-garageon.net: did not receive HSTS header
-garagesecond.com: did not receive HSTS header
-garbage-juice.com: could not connect to host
-garbagedisposalguides.com: did not receive HSTS header
-garchi.net: did not receive HSTS header
-garciamartin.me: could not connect to host
-garcinia--cambogia.com: could not connect to host
-garciniacambogiareviewed.co: did not receive HSTS header
-garden-life.org: could not connect to host
-garden.trade: could not connect to host
-gardencarezone.com: could not connect to host
-garderobche.eu: did not receive HSTS header
-gardinte.com: did not receive HSTS header
-garethkirkreviews.com: did not receive HSTS header
-garfieldairlines.net: did not receive HSTS header
-garforthgolfclub.co.uk: did not receive HSTS header
-garriganenterprises.com: did not receive HSTS header
-garriganenterprises.net: did not receive HSTS header
-garriganenterprisesinc.com: did not receive HSTS header
-garriganenterprisesinc.net: did not receive HSTS header
-garten-bau.ch: did not receive HSTS header
-garten-diy.de: could not connect to host
-gartenhauszentrum.de: did not receive HSTS header
-gasbarkenora.com: could not connect to host
-gasnews.net: could not connect to host
-gass-transformatoren.de: did not receive HSTS header
-gasser-daniel.ch: could not connect to host
-gassouthkenticoqa.azurewebsites.net: could not connect to host
-gastritisolucion.com: could not connect to host
-gatapro.net: could not connect to host
-gatemotorsumhlanga.co.za: did not receive HSTS header
-gatemoves.com: could not connect to host
-gateworld.fr: did not receive HSTS header
-gatilagata.com.br: could not connect to host
-gatomanias.com: could not connect to host
-gatomix.net: could not connect to host
-gatorsa.es: could not connect to host
-gatos.plus: did not receive HSTS header
-gaurl.ga: could not connect to host
-gaussorgues.me: could not connect to host
-gautham.pro: could not connect to host
-gautvedt.no: did not receive HSTS header
-gavick.com: did not receive HSTS header
-gavins.stream: could not connect to host
-gavinsblog.com: did not receive HSTS header
-gawrimanecuta.com: did not receive HSTS header
-gay-jays.com: could not connect to host
-gay.systems: could not connect to host
-gaycamvids.com: could not connect to host
-gayforgenji.com: could not connect to host
-gaygeeks.de: could not connect to host
-gayhotti.es: could not connect to host
-gayjays.com: could not connect to host
-gaysfisting.com: could not connect to host
-gayxsite.com: could not connect to host
-gazachallenge.org: could not connect to host
-gazee.net: did not receive HSTS header
-gazflynn.com: could not connect to host
-gazoz.ga: could not connect to host
-gbc-radio.nl: did not receive HSTS header
-gbcsummercamps.com: could not connect to host
-gbit.xyz: could not connect to host
-gbl.selfip.net: could not connect to host
-gc.net: could not connect to host
-gccm-events.com: could not connect to host
-gcdamp.gov: did not receive HSTS header
-gcgeeks.com.au: could not connect to host
-gcguild.net: did not receive HSTS header
-gchq.wtf: could not connect to host
-gcodetools.com: could not connect to host
-gdax.com: could not connect to host
-gdegem.org: did not receive HSTS header
-gdevpenze.ru: could not connect to host
-gdhzcgs.com: could not connect to host
-gdprhallofshame.com: did not receive HSTS header
-gdsqua.re: could not connect to host
-gdutnic.com: did not receive HSTS header
-gdz-otvety.com: could not connect to host
-gdz.tv: could not connect to host
-gear-acquisition-syndrome.community: could not connect to host
-gearev.net: could not connect to host
-geass.xyz: could not connect to host
-geblitzt.de: did not receive HSTS header
-gedachtekaarsje.nl: could not connect to host
-gedankenbude.info: could not connect to host
-gedankenworks.com: could not connect to host
-gee.is: did not receive HSTS header
-geek1.de: did not receive HSTS header
-geekbaba.com: could not connect to host
-geekcast.co.uk: could not connect to host
-geekchimp.com: could not connect to host
-geekdt.com: could not connect to host
-geekeffect.co.uk: did not receive HSTS header
-geeknik.com: could not connect to host
-geeks.lgbt: could not connect to host
-geeksky.org: did not receive HSTS header
-geektarven.com: could not connect to host
-geekthis.de: could not connect to host
-geektimes.com: did not receive HSTS header
-geeky.software: could not connect to host
-geekystudios.us: could not connect to host
-geemo.top: could not connect to host
-gehaowu.com: did not receive HSTS header
-gehrke.nrw: could not connect to host
-geigr.de: could not connect to host
-geiser.io: did not receive HSTS header
-gekosoft.eu: could not connect to host
-geldteveel.eu: could not connect to host
-geli-graphics.com: did not receive HSTS header
-gellis12.com: could not connect to host
-gelodosul.com.br: could not connect to host
-gemeentemolenwaard.nl: could not connect to host
-gemeinfreie-lieder.de: could not connect to host
-gemgroups.in: could not connect to host
-gemini.com: did not receive HSTS header
-gemsmarketplace.net: could not connect to host
-gemsoftheworld.org: could not connect to host
-gemuplay.com: could not connect to host
-gemwire.uk: did not receive HSTS header
-genemesservwparts.com: could not connect to host
-generace-id.org: could not connect to host
-general-insurance.tk: could not connect to host
-generali-worldwide.com: could not connect to host
-generalpants.com.au: did not receive HSTS header
-generationgoat.com: did not receive HSTS header
-generationsweldom.com: could not connect to host
-genesischangelog.com: did not receive HSTS header
-genevacountyal.gov: did not receive HSTS header
-geneve.guide: could not connect to host
-genia-life.de: could not connect to host
-genie-seiner-generation.de: did not receive HSTS header
-geniofinanciero.org: could not connect to host
-geniuszone.biz: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-genneve.com: did not receive HSTS header
-genoog.com: could not connect to host
-genossen.ru: could not connect to host
-genshiken.org: could not connect to host
-gentooblog.de: could not connect to host
-gentoocn.org: could not connect to host
-genunlimited.ga: could not connect to host
-genusbag.com: could not connect to host
-genuu.com: could not connect to host
-genuxation.com: could not connect to host
-genuxtsg.com: did not receive HSTS header
-genxbeats.com: did not receive HSTS header
-genyaa.com: could not connect to host
-genyhitch.com: did not receive HSTS header
-geocommunicator.gov: could not connect to host
-geoffanderinmyers.com: did not receive HSTS header
-geoffdev.com: could not connect to host
-geoffmyers.com: did not receive HSTS header
-geoffreyrichard.com: could not connect to host
-geomex.be: did not receive HSTS header
-geonice.ga: could not connect to host
-geopals.net: could not connect to host
-georgedesign.ch: could not connect to host
-georgehalachev.com: did not receive HSTS header
-georgemaschke.com: did not receive HSTS header
-georgeperez.me: could not connect to host
-georgescarryout.com: could not connect to host
-georgesonarthurs.com.au: did not receive HSTS header
-georgiatransport.com: could not connect to host
-geoscan.aero: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-geosphereservices.com: did not receive HSTS header
-geotab.com: did not receive HSTS header
-gepe.ch: did not receive HSTS header
-gerandroid.com: did not receive HSTS header
-gerardobsd.com: did not receive HSTS header
-gerbyte.uk: could not connect to host
-gereja.ga: could not connect to host
-gerencianet.com.br: did not receive HSTS header
-gereon.ch: could not connect to host
-germancraft.net: could not connect to host
-germansoldiers.net: could not connect to host
-germanticz.de: did not receive HSTS header
-germany-board.tk: could not connect to host
-gers-authentique.com: could not connect to host
-gerum.dynv6.net: did not receive HSTS header
-geschmackspiloten.de: did not receive HSTS header
-gesiwista.net: could not connect to host
-gestorehotel.com: could not connect to host
-gesunddurchenergie.ch: could not connect to host
-gesunde-smoothies.de: did not receive HSTS header
-gesundes-im-napf.de: did not receive HSTS header
-gesundheitszentrum-am-reischberg.de: could not connect to host
-get-asterisk.ru: could not connect to host
-get-cctv.com: could not connect to host
-get-link.info: did not receive HSTS header
-get-refer.com: could not connect to host
-get.zenpayroll.com: did not receive HSTS header
-geta.pub: did not receive HSTS header
-getable.com: could not connect to host
-getblys.com.au: did not receive HSTS header
-getbonfire.com: did not receive HSTS header
-getcarefirst.com: could not connect to host
-getcarina.com: could not connect to host
-getcleartouch.com: did not receive HSTS header
-getcolor.com: did not receive HSTS header
-getcolq.com: could not connect to host
-getcommande.com: did not receive HSTS header
-getdigitized.net: did not receive HSTS header
-geteckeld.nl: did not receive HSTS header
-getenergized2018.kpn: could not connect to host
-getenseguros.com.br: did not receive HSTS header
-getfestify.com: did not receive HSTS header
-getfilterlive.org: max-age too low: 0
-getfirepress.com: could not connect to host
-getfittedstore.com: did not receive HSTS header
-getfoundquick.com: did not receive HSTS header
-getfuturama.com: did not receive HSTS header
-getgeek.dk: could not connect to host
-getgeek.ee: could not connect to host
-getgeek.eu: could not connect to host
-getgeek.fi: could not connect to host
-getgeek.fr: could not connect to host
-getgeek.io: could not connect to host
-getgeek.no: could not connect to host
-getgeek.nu: could not connect to host
-getgeek.pl: could not connect to host
-geti2p.com: could not connect to host
-getinsuranceanywhere.com: did not receive HSTS header
-getinternet.de: did not receive HSTS header
-getitpeople.com: could not connect to host
-getkai.co.nz: did not receive HSTS header
-getlantern.org: did not receive HSTS header
-getleanflorida.gov: did not receive HSTS header
-getlifti.com: could not connect to host
-getlittleapps.com: could not connect to host
-getlolaccount.com: did not receive HSTS header
-getmassage.com.ng: could not connect to host
-getmondo.co.uk: could not connect to host
-getoutofdebt.org: max-age too low: 2592000
-getpake.com: could not connect to host
-getpop.org: did not receive HSTS header
-getpost.online: did not receive HSTS header
-getprivacy.de: did not receive HSTS header
-getprivacy.net: could not connect to host
-getpuck.com: did not receive HSTS header
-getremembrall.com: could not connect to host
-getresilience.org: could not connect to host
-getronics.care: could not connect to host
-getsello.com: could not connect to host
-getserum.xyz: could not connect to host
-getsetupfile.com: did not receive HSTS header
-getshifter.io: did not receive HSTS header
-getsilknow.com: could not connect to host
-getsmarterinsurance.com: did not receive HSTS header
-getspeaker.com: did not receive HSTS header
-getspire.com: could not connect to host
-getsubs.net: could not connect to host
-getswadeshi.com: could not connect to host
-gettodoing.com: could not connect to host
-getts.ro: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-getwarden.net: could not connect to host
-getwashdaddy.com: could not connect to host
-getweloop.io: could not connect to host
-getyeflask.com: could not connect to host
-getyou.onl: could not connect to host
-getyourdata.co.uk: could not connect to host
-getyourphix.tk: could not connect to host
-gevaulug.fr: could not connect to host
-gfbouncycastles.co.uk: did not receive HSTS header
-gfe.link: could not connect to host
-gflclan.ru: did not receive HSTS header
-gfm.tech: could not connect to host
-gfms.ru: could not connect to host
-gfnetfun.cf: could not connect to host
-gfoss.gr: could not connect to host
-gfournier.ca: could not connect to host
-gfwno.win: could not connect to host
-gfwsb.ml: could not connect to host
-gg5197.co: could not connect to host
-gg6729.co: could not connect to host
-gg6729.com: did not receive HSTS header
-gg6957.co: could not connect to host
-gg9297.co: could not connect to host
-gg9397.com: did not receive HSTS header
-gg9721.com: did not receive HSTS header
-gg9728.co: could not connect to host
-gggggg.org: could not connect to host
-gglks.com: could not connect to host
-ggobbo.com: could not connect to host
-ggrks-asano.com: could not connect to host
-ggss.cf: could not connect to host
-ggss.ml: could not connect to host
-gh16.com.ar: could not connect to host
-gha.st: did not receive HSTS header
-ghana.bz: did not receive HSTS header
-ghcif.de: did not receive HSTS header
-gheorghe-sarcov.ga: could not connect to host
-gheorghesarcov.ga: could not connect to host
-gheorghesarcov.tk: did not receive HSTS header
-ghi.gov: could not connect to host
-ghibli.studio: could not connect to host
-ghkim.net: could not connect to host
-ghost-legion.com: could not connect to host
-ghostsupreme.eu: could not connect to host
-ghou.me: could not connect to host
-ghrelinblocker.info: did not receive HSTS header
-ghrelinblocker.org: did not receive HSTS header
-giacomodrago.com: could not connect to host
-giacomodrago.it: could not connect to host
-giaithich.net: could not connect to host
-gianlucapartengo.photography: did not receive HSTS header
-giant-powerfit.co.uk: did not receive HSTS header
-gibraltar-firma.com: did not receive HSTS header
-gibraltar.at: could not connect to host
-gibraltarwi.gov: did not receive HSTS header
-gibreel.tk: could not connect to host
-gicl.dk: could not connect to host
-gidari.shop: could not connect to host
-giddyaunt.net: could not connect to host
-gidea.nu: could not connect to host
-giduv.com: did not receive HSTS header
-giftbg.org: could not connect to host
-giftcardgranny.com: did not receive HSTS header
-giftmaniabrilhos.com.br: could not connect to host
-gifts.best: could not connect to host
-giftservices.nl: could not connect to host
-gifzilla.net: could not connect to host
-gigacloud.org: could not connect to host
-gigacog.com: could not connect to host
-gigantar.com: did not receive HSTS header
-gigawa.lt: could not connect to host
-gigime.com: could not connect to host
-gigiscloud.servebeer.com: could not connect to host
-gigsoupmusic.com: did not receive HSTS header
-gigtroll.eu: could not connect to host
-gilangcp.com: could not connect to host
-gilcloud.com: could not connect to host
-gilescountytn.gov: did not receive HSTS header
-gilgaz.com: did not receive HSTS header
-gilium.com: could not connect to host
-gillet-cros.fr: could not connect to host
-gilly.berlin: did not receive HSTS header
-gilme.net: could not connect to host
-gilmoreid.com.au: did not receive HSTS header
-gilmourluna.com: could not connect to host
-gilpinmanagement.com: did not receive HSTS header
-gilpinrealty.com: did not receive HSTS header
-gilroywestwood.org: did not receive HSTS header
-gilsum-nh.gov: could not connect to host
-ginacat.de: did not receive HSTS header
-gincher.net: did not receive HSTS header
-gingali.de: did not receive HSTS header
-ginie.de: did not receive HSTS header
-ginijony.com: did not receive HSTS header
-ginkel.com: did not receive HSTS header
-gintenreiter-photography.com: did not receive HSTS header
-giochi-online.ws: did not receive HSTS header
-giochiecodici.it: could not connect to host
-giochistem.it: could not connect to host
-giogadesign.com: did not receive HSTS header
-gip-carif-idf.net: could not connect to host
-gip-carif-idf.org: could not connect to host
-gipsamsfashion.com: could not connect to host
-gipsic.com: did not receive HSTS header
-giraffeinflatables.co.uk: could not connect to host
-girl.science: could not connect to host
-girlsgenerationgoods.com: could not connect to host
-girlsgonesporty.com: did not receive HSTS header
-girlsnet.work: could not connect to host
-gis3m.org: did not receive HSTS header
-gisch.tk: could not connect to host
-gisgov.be: did not receive HSTS header
-gistfy.com: could not connect to host
-git-stuff.tk: could not connect to host
-git.co: could not connect to host
-git.org.il: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-gitar.io: could not connect to host
-github.party: did not receive HSTS header
-gitstuff.tk: could not connect to host
-giulianosdeli.com: did not receive HSTS header
-giveme.online: could not connect to host
-givemyanswer.com: could not connect to host
-giveoneup.org: could not connect to host
-giverang.biz: could not connect to host
-giverang.com: could not connect to host
-givesunlight.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-givip.eu: could not connect to host
-gix.net.pl: could not connect to host
-gixtools.co.uk: could not connect to host
-gixtools.uk: could not connect to host
-gizzo.sk: could not connect to host
-gkimanyar.org: could not connect to host
-gla-hyperloop.com: could not connect to host
-glabiatoren-kst.de: could not connect to host
-gladdy.co.uk: could not connect to host
-gladiatorboost.com: could not connect to host
-gladystudio.com: did not receive HSTS header
-glamguru.world: could not connect to host
-glaspe.com: could not connect to host
-glass-mag.eu: did not receive HSTS header
-glass.google.com: did not receive HSTS header (error ignored - included regardless)
-glasslikes.com: did not receive HSTS header
-glassofgrape.com: could not connect to host
-glbg.eu: could not connect to host
-gle: could not connect to host
-glenavy.tk: could not connect to host
-glencambria.com: could not connect to host
-glencoveny.gov: could not connect to host
-glentakahashi.com: did not receive HSTS header
-glevolution.com: could not connect to host
-glicerina.online: could not connect to host
-glittersjabloon.nl: did not receive HSTS header
-glitzmirror.com: could not connect to host
-glnpo.gov: could not connect to host
-glob-coin.com: did not receive HSTS header
-global-lights.ma: did not receive HSTS header
-global.hr: did not receive HSTS header
-globalaccountservice.com: could not connect to host
-globalado.com: could not connect to host
-globalairsea.com.au: did not receive HSTS header
-globalbridge-japan.com: could not connect to host
-globalcanineregistry.com: could not connect to host
-globalelite.black: did not receive HSTS header
-globalexpert.co.nz: could not connect to host
-globalgivingtime.com: could not connect to host
-globalhorses.de: could not connect to host
-globalinsights.xyz: could not connect to host
-globalinstitutefortraining.org.au: did not receive HSTS header
-globalittech.com: could not connect to host
-globalityinvestment.com: could not connect to host
-globalmoneyapp.com: could not connect to host
-globalmusic.ga: could not connect to host
-globalno.me: could not connect to host
-globalnomadvintage.com: could not connect to host
-globalperspectivescanada.com: could not connect to host
-globalsites.nl: could not connect to host
-globaltennis.ca: could not connect to host
-globalvisions-events.ch: could not connect to host
-globalvisions-events.com: could not connect to host
-globalvoice.ga: could not connect to host
-globcoin.io: did not receive HSTS header
-globe-flight.de: did not receive HSTS header
-globemusic.es: could not connect to host
-globuli-info.de: could not connect to host
-gloning.name: could not connect to host
-gloomyspark.com: could not connect to host
-gloria.tv: did not receive HSTS header
-glossopnorthendafc.co.uk: could not connect to host
-glotter.com: did not receive HSTS header
-gloucesterphotographer.com: did not receive HSTS header
-glu3cifer.rocks: could not connect to host
-glubbforum.de: did not receive HSTS header
-glutenfreiheit.at: could not connect to host
-glws.org: could not connect to host
-glyph.ws: could not connect to host
-gm-assicurazioni.it: could not connect to host
-gmail: could not connect to host
-gmail.com: did not receive HSTS header (error ignored - included regardless)
-gmantra.org: max-age too low: 7776000
-gmanukyan.com: could not connect to host
-gmat.ovh: could not connect to host
-gme.one: could not connect to host
-gmoes.at: did not receive HSTS header
-gmw-hannover.de: could not connect to host
-gn00.ink: could not connect to host
-gnaptracker.tk: could not connect to host
-gnaucke.com: could not connect to host
-gnetion.com: could not connect to host
-gnhub.org: could not connect to host
-gnom.me: could not connect to host
-gnosticjade.net: did not receive HSTS header
-gnuand.me: could not connect to host
-gnunet.org: did not receive HSTS header
-gnuplus.me: could not connect to host
-gnwp.eu: could not connect to host
-go.ax: could not connect to host
-go.xero.com: did not receive HSTS header
-go2sh.de: did not receive HSTS header
-go4it.solutions: did not receive HSTS header
-go9968.com: did not receive HSTS header
-goa8.xyz: did not receive HSTS header
-goabonga.com: could not connect to host
-goalongtravels.com: could not connect to host
-goalsetup.com: could not connect to host
-goaltree.ch: did not receive HSTS header
-goapunks.net: did not receive HSTS header
-goaskrose.com: did not receive HSTS header
-goat.chat: did not receive HSTS header
-goatbot.xyz: could not connect to host
-goben.ch: could not connect to host
-goblins.net: did not receive HSTS header
-goblinsatwork.com: could not connect to host
-goblintears.com: could not connect to host
-gobranding.com.vn: did not receive HSTS header
-gocphongthuy.net: did not receive HSTS header
-godknowsclothing.com: could not connect to host
-godofnea.com: did not receive HSTS header
-godrealms.com: could not connect to host
-godrive.ga: could not connect to host
-goedeke.ml: could not connect to host
-goedkoopstecartridges.nl: could not connect to host
-goedkopecartridgeskopen.nl: could not connect to host
-goedkopelaptopshardenberg.nl: could not connect to host
-goedkopeonesies.nl: could not connect to host
-goedkopetonerkopen.nl: could not connect to host
-goeikan.life: could not connect to host
-goerlitz-zgorzelec.org: did not receive HSTS header
-goesta-hallenbau.de: did not receive HSTS header
-goetic.space: could not connect to host
-gofigure.fr: could not connect to host
-goflipr.com: did not receive HSTS header
-goftava.ir: did not receive HSTS header
-goge.site: could not connect to host
-gogenenglish.com: could not connect to host
-goggs.eu: could not connect to host
-gogold-g.com: could not connect to host
-gogomail.ga: could not connect to host
-gogonano.com: did not receive HSTS header
-goguel.org: could not connect to host
-gohongi-katakori.com: did not receive HSTS header
-goiaspropaganda.com.br: could not connect to host
-goiymua.com: could not connect to host
-gold24.in: did not receive HSTS header
-gold24.ru: did not receive HSTS header
-goldegg-training.com: did not receive HSTS header
-goldenbadger.de: could not connect to host
-goldendata.io: could not connect to host
-goldeneggs.club: could not connect to host
-goldenmonrepos.com: did not receive HSTS header
-goldfelt.com: could not connect to host
-goldlevelmarketing.com: did not receive HSTS header
-goldlevelprint.com: did not receive HSTS header
-goldminer.ga: could not connect to host
-goldpetergood.top: did not receive HSTS header
-goldpros.com: did not receive HSTS header
-goldsky.com.au: could not connect to host
-goldwater.gov: could not connect to host
-goldwaterfoundation.gov: could not connect to host
-goldwaterscholarship.gov: could not connect to host
-golearn.gov: could not connect to host
-golfburn.com: could not connect to host
-golfmeile.de: did not receive HSTS header
-golfpark-bostalsee.de: did not receive HSTS header
-golkala.com: did not receive HSTS header
-golocal-media.de: could not connect to host
-gomega.vn: could not connect to host
-gomiblog.com: did not receive HSTS header
-gondawa.com: could not connect to host
-gong8.win: could not connect to host
-gonzalesca.gov: max-age too low: 300
-gonzalosanchez.mx: did not receive HSTS header
-good588.com: did not receive HSTS header
-gooddayatwork.co.uk: did not receive HSTS header
-gooddomainna.me: could not connect to host
-goodeats.nyc: could not connect to host
-goodenough.nz: did not receive HSTS header
-goodfeels.net: could not connect to host
-goodfurday.ca: could not connect to host
-goodiesoftware.xyz: could not connect to host
-goodmengroup.de: did not receive HSTS header
-goodryb.top: could not connect to host
-goods-memo.net: did not receive HSTS header
-goodsex4all.com.br: could not connect to host
-goodtech.com.br: could not connect to host
-goodwin43.ru: could not connect to host
-goodyearsotn.co.uk: could not connect to host
-google: could not connect to host (error ignored - included regardless)
-google.ax: could not connect to host
-googlehosts.org: did not receive HSTS header
-googlemail.com: did not receive HSTS header (error ignored - included regardless)
-googleplex.com: did not receive HSTS header (error ignored - included regardless)
-googlerecetas.com: could not connect to host
-goolok.com: could not connect to host
-goooo.info: could not connect to host
-gooroosmarketplace.com: did not receive HSTS header
-gootlijsten.nl: did not receive HSTS header
-goozz.nl: could not connect to host
-gopay.cz: did not receive HSTS header
-gopher.tk: could not connect to host
-goplango.net: could not connect to host
-goplex.com.au: did not receive HSTS header
-gopokego.cz: could not connect to host
-goprimal.eu: did not receive HSTS header
-goproallaccess.com: could not connect to host
-goranrango.ch: could not connect to host
-gordonobrecht.com: did not receive HSTS header
-gorealya.com: could not connect to host
-gorf.chat: could not connect to host
-gorf.club: could not connect to host
-gorgiaxx.com: could not connect to host
-gorilla-gym.site: could not connect to host
-gorillow.com: could not connect to host
-gorognyelv.hu: did not receive HSTS header
-gorschenin.com: could not connect to host
-goru.travel: did not receive HSTS header
-gosciencegirls.com: did not receive HSTS header
-gosharewood.com: did not receive HSTS header
-goshop.cz: did not receive HSTS header
-gospelfollower.com: did not receive HSTS header
-gospelofmark.ch: could not connect to host
-gostream.asia: could not connect to host
-gosuland.org: did not receive HSTS header
-goto.google.com: did not receive HSTS header (error ignored - included regardless)
-gotobrno.cz: did not receive HSTS header
-gotocloud.ru: could not connect to host
-gotowned.org: could not connect to host
-gotrek.com.au: could not connect to host
-gotspot.com: could not connect to host
-gottfridsberg.org: could not connect to host
-gottfriedfeyen.com: max-age too low: 0
-goubi.me: could not connect to host
-goufaan.com: could not connect to host
-goujianwen.com: did not receive HSTS header
-goukon.ru: could not connect to host
-gouptime.ml: did not receive HSTS header
-gourmettia.com: did not receive HSTS header
-gouthro-goteborg.se: did not receive HSTS header
-gouv.ovh: did not receive HSTS header
-gov.ax: could not connect to host
-goverage.org: did not receive HSTS header
-govillemo.ca: did not receive HSTS header
-govotecolorado.gov: did not receive HSTS header
-govsurvey.us: did not receive HSTS header
-govtjobs.blog: could not connect to host
-goweraesthetics.co.uk: could not connect to host
-gozadentro.com: did not receive HSTS header
-gozel.com.tr: did not receive HSTS header
-gozenhost.com: did not receive HSTS header
-gparent.org: did not receive HSTS header
-gpccp.cc: could not connect to host
-gpcsolutions.fr: could not connect to host
-gpfclan.de: could not connect to host
-gpga.cf: could not connect to host
-gplintegratedit.com: could not connect to host
-gpo.gov: did not receive HSTS header
-gps.com.br: could not connect to host
-gpsarena.ro: could not connect to host
-gpsfix.cz: could not connect to host
-gpstuner.com: did not receive HSTS header
-gpureport.cz: did not receive HSTS header
-gpws.ovh: did not receive HSTS header
-gpyy.net: did not receive HSTS header
-graandco.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-graavaapi.elasticbeanstalk.com: could not connect to host
-grabi.ga: could not connect to host
-grabtech.vn: did not receive HSTS header
-gracechurchpc.net: could not connect to host
-graceful-project.eu: did not receive HSTS header
-gracesofgrief.com: could not connect to host
-grachtenpandverkopen.nl: could not connect to host
-graciousmay.com: did not receive HSTS header
-grademymac.com: could not connect to host
-grademypc.com: could not connect to host
-gradenotify.com: could not connect to host
-gradingcontractornc.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-grads360.org: could not connect to host
-gradsm-ci.net: could not connect to host
-graetnew.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-grafitec.ru: did not receive HSTS header
-grafmurr.de: could not connect to host
-graftworld.pw: could not connect to host
-grahamofthewheels.com: did not receive HSTS header
-gram.tips: did not receive HSTS header
-gramati.com.br: could not connect to host
-gramiaperu.com: did not receive HSTS header
-gramtrans.com: did not receive HSTS header
-grana.com: did not receive HSTS header
-granary-demo.appspot.com: did not receive HSTS header
-grancellconsulting.com: could not connect to host
-grandchamproofing.com: did not receive HSTS header
-grandlinecsk.ru: could not connect to host
-grandmascookieblog.com: could not connect to host
-grandmusiccentral.com.au: could not connect to host
-granian.pro: could not connect to host
-granishe.com: could not connect to host
-granli.org: did not receive HSTS header
-grannys-stats.com: could not connect to host
-grantedby.me: max-age too low: 0
-granth.io: could not connect to host
-graph.no: did not receive HSTS header
-graphified.nl: could not connect to host
-graphire.io: could not connect to host
-graphite.org.uk: could not connect to host
-graphsearchengine.com: could not connect to host
-grasboomamersfoort.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-grasboombinnendoor.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-grasboomclophaemer.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-grasboomderoos.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-grasboomleusden.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-grasboommax.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-grasboommeerbalans.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-grasboomveenendaal.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-grasboomvondellaan.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-gratefullane.com: did not receive HSTS header
-gratis-app.com: did not receive HSTS header
-gratis-lovecheck.de: did not receive HSTS header
-gratisonlinesex.com: could not connect to host
-gravescountyky.gov: could not connect to host
-gravilink.com: could not connect to host
-gravitation.pro: could not connect to host
-gravitechthai.com: did not receive HSTS header
-gravity-inc.net: could not connect to host
-gravity-net.de: could not connect to host
-graycell.net: could not connect to host
-grayowlworks.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-grayscale.co: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-grazetech.com: did not receive HSTS header
-grazieitalian.com: could not connect to host
-grcnode.co.uk: could not connect to host
-great.nagoya: could not connect to host
-greatergoodoffers.com: did not receive HSTS header
-greatfire.kr: could not connect to host
-greathosts.biz: did not receive HSTS header
-greatideahub.com: did not receive HSTS header
-greatlengthshairextensionssalon.com: did not receive HSTS header
-greatnet.de: did not receive HSTS header
-greatsong.net: max-age too low: 2592000
-greboid.co.uk: did not receive HSTS header
-greditsoft.com: did not receive HSTS header
-greedbutt.com: max-age too low: 2592000
-greeklish.gr: could not connect to host
-greeknewspapers.tk: could not connect to host
-greenbaysecuritysolutions.com: did not receive HSTS header
-greencard.su: did not receive HSTS header
-greencardtalent.com: could not connect to host
-greenconn.ca: could not connect to host
-greendroid.de: did not receive HSTS header
-greenecountytn.gov: could not connect to host
-greenenergysolution.uk: did not receive HSTS header
-greenesting.ch: could not connect to host
-greenesting.com: could not connect to host
-greenews.ga: could not connect to host
-greenglam.biz: did not receive HSTS header
-greengoblindev.com: could not connect to host
-greengov.gov: could not connect to host
-greenhillantiques.co.uk: could not connect to host
-greenitpark.net: could not connect to host
-greenliquidsystem.com: could not connect to host
-greensolid.biz: could not connect to host
-greensquare.tk: could not connect to host
-greenville.ag: did not receive HSTS header
-greenvines.com.tw: did not receive HSTS header
-greenvpn.ltd: could not connect to host
-greenvpn.pro: did not receive HSTS header
-greenwaylog.net: could not connect to host
-greer.ru: could not connect to host
-greggsfoundation.org.uk: could not connect to host
-gregmartyn.com: could not connect to host
-gregmilton.org: could not connect to host
-grego.pt: could not connect to host
-gregory-kramer.fr: could not connect to host
-gregorytlee.me: did not receive HSTS header
-grekland.guide: could not connect to host
-gremots.com: could not connect to host
-grengine.ch: could not connect to host
-greplin.com: could not connect to host
-gresb.com: did not receive HSTS header
-gretchelizartistry.com: did not receive HSTS header
-grettogeek.com: did not receive HSTS header
-greuel.online: could not connect to host
-greve.xyz: could not connect to host
-grevesgarten.de: could not connect to host
-grexx.co.uk: did not receive HSTS header
-grexx.de: did not receive HSTS header
-grexx.nl: did not receive HSTS header
-grey.house: could not connect to host
-greyhash.se: could not connect to host
-greyline.se: could not connect to host
-grian-bam.at: did not receive HSTS header
-griassdi-reseller.de: could not connect to host
-gribani.com: could not connect to host
-grid2osm.org: could not connect to host
-gridle.io: did not receive HSTS header
-gridsmartercities.com: did not receive HSTS header
-griecopelino.com: did not receive HSTS header
-griefheart.com: could not connect to host
-grieg.com: could not connect to host
-grieg.net: could not connect to host
-grieg.org: could not connect to host
-grienenberger.eu: could not connect to host
-grigalanzsoftware.com: could not connect to host
-grillhutsunderland.com: did not receive HSTS header
-grillinfools.com: did not receive HSTS header
-gripnijmegen.rip: could not connect to host
-gripopgriep.net: could not connect to host
-gritte.net: did not receive HSTS header
-griyo.online: could not connect to host
-groben-itsolutions.de: could not connect to host
-grocerybuild.com: did not receive HSTS header
-grocock.me.uk: did not receive HSTS header
-groenders.nl: could not connect to host
-groenewoud.me: did not receive HSTS header
-groenewoud.run: could not connect to host
-groenteclub.nl: could not connect to host
-groentefruitzeep.com: could not connect to host
-groentefruitzeep.nl: could not connect to host
-groetzner.net: did not receive HSTS header
-grog.pw: could not connect to host
-grosdebit.com: did not receive HSTS header
-groseb.net: could not connect to host
-gross-gerau-hausarzt.de: did not receive HSTS header
-grossell.ru: could not connect to host
-grossmann.gr: could not connect to host
-grossmisconduct.news: could not connect to host
-grouchysysadmin.com: could not connect to host
-groupe-cassous.com: did not receive HSTS header
-groupebaillargeon.com: did not receive HSTS header
-groups.google.com: did not receive HSTS header (error ignored - included regardless)
-grow-shop.ee: could not connect to host
-grow-shop.lt: could not connect to host
-grow-shop.lv: could not connect to host
-growingmetrics.com: could not connect to host
-growthseedconsulting.com: could not connect to host
-grozip.com: did not receive HSTS header
-grozter.se: could not connect to host
-gruelang.org: could not connect to host
-grumples.biz: did not receive HSTS header
-grupoauxteclic.com: could not connect to host
-grupocata.com: could not connect to host
-grupoparco.com: could not connect to host
-grupopgn.com.br: could not connect to host
-gruposertaoveredas.com.br: did not receive HSTS header
-gruppoipl.it: did not receive HSTS header
-grusenmeyer.be: did not receive HSTS header
-grusig-geil.ch: did not receive HSTS header
-gryffin.ga: could not connect to host
-gryffin.ml: could not connect to host
-gryffin.tk: could not connect to host
-gryinx.com: could not connect to host
-grytics.com: did not receive HSTS header
-gs-net.at: could not connect to host
-gscloud.xyz: could not connect to host
-gsi-network.com: did not receive HSTS header
-gsk11.ru: did not receive HSTS header
-gslaw.edu.gh: did not receive HSTS header
-gsm-map.com: could not connect to host
-gsmbrick.com: could not connect to host
-gsmkungen.com: could not connect to host
-gsnort.com: could not connect to host
-gstand.tk: could not connect to host
-gt-mp.net: did not receive HSTS header
-gtalife.net: did not receive HSTS header
-gtamodshop.org: could not connect to host
-gtanda.tk: could not connect to host
-gtapg.net: could not connect to host
-gtchipsi.org: did not receive HSTS header
-gtcprojects.com: could not connect to host
-gtech.work: did not receive HSTS header
-gtldna.com: could not connect to host
-gtmasterclub.it: did not receive HSTS header
-gtraxapp.com: could not connect to host
-gts-dp.de: did not receive HSTS header
-gts-schulsoftware.de: did not receive HSTS header
-gtxbbs.com: could not connect to host
-guangjiangk.com: could not connect to host
-guannan.net.cn: did not receive HSTS header
-guarajubaimoveis.com.br: did not receive HSTS header
-guaranteedloans.online: did not receive HSTS header
-guardiansoftheearth.org: could not connect to host
-guava.studio: did not receive HSTS header
-gudangpangan.id: could not connect to host
-gudrun.ml: could not connect to host
-guelo.ch: could not connect to host
-guelphhydropool.com: could not connect to host
-guendra.dedyn.io: could not connect to host
-guentherhouse.com: did not receive HSTS header
-guenthernoack.de: did not receive HSTS header
-guernseycounty.gov: could not connect to host
-gufen.ga: could not connect to host
-guffrits.com: could not connect to host
-gugaltika-ipb.org: could not connect to host
-guge.gq: could not connect to host
-gugert.net: could not connect to host
-gugga.dk: could not connect to host
-guguke.net: could not connect to host
-guid2steamid.pw: could not connect to host
-guida.org: could not connect to host
-guidechecking.com: could not connect to host
-guidedselling.net: could not connect to host
-guidedsteps.com: could not connect to host
-guides-et-admin.com: did not receive HSTS header
-guides-peche64.com: could not connect to host
-guildbase.de: did not receive HSTS header
-guilde-vindicta.fr: could not connect to host
-guildgearscore.cf: could not connect to host
-guillaume-leduc.fr: could not connect to host
-guillaumecote.me: could not connect to host
-guiltypleasuresroleplaying.com: did not receive HSTS header
-guinea-pig.co: did not receive HSTS header
-guineafruitcorp.com: could not connect to host
-guitarvolume.com: could not connect to host
-gulch.in.ua: could not connect to host
-gulenbase.no: could not connect to host
-gulenet.com: could not connect to host
-gulfcoast-sandbox.com: could not connect to host
-gulitsky.me: could not connect to host
-gumannp.de: did not receive HSTS header
-gumballs.com: did not receive HSTS header
-gume4you.com: did not receive HSTS header
-gummibande.noip.me: could not connect to host
-gunceloyunhileleri.com: could not connect to host
-gunhunter.com: could not connect to host
-guniram.com: could not connect to host
-gunn.ee: did not receive HSTS header
-gunnaro.com: could not connect to host
-gunsofshadowvalley.com: did not receive HSTS header
-guntbert.net: could not connect to host
-guochang.xyz: could not connect to host
-guohuageng.com: could not connect to host
-guoqiang.info: did not receive HSTS header
-gurkan.in: did not receive HSTS header
-gurleyal.gov: did not receive HSTS header
-gurochan.ch: did not receive HSTS header
-gurom.lv: could not connect to host
-gurpusmaximus.com: did not receive HSTS header
-gurubetng.com: could not connect to host
-gurueffect.com: could not connect to host
-gurusupe.com: could not connect to host
-gus.moe: could not connect to host
-guso.gq: could not connect to host
-guso.ml: could not connect to host
-guso.site: could not connect to host
-guso.tech: could not connect to host
-gussi.is: did not receive HSTS header
-gutenbergthemes.info: did not receive HSTS header
-guthabenkarten-billiger.de: could not connect to host
-guts.me: could not connect to host
-guts.moe: could not connect to host
-gutuia.blue: could not connect to host
-guusvandewal.nl: did not receive HSTS header
-guvernalternativa.ro: could not connect to host
-guyot-tech.com: did not receive HSTS header
-gvc-it.tk: could not connect to host
-gvchannel.xyz: could not connect to host
-gvi.be: did not receive HSTS header
-gviedu.com: could not connect to host
-gvm.io: did not receive HSTS header
-gvpt.sk: did not receive HSTS header
-gvt2.com: could not connect to host (error ignored - included regardless)
-gvt3.com: could not connect to host (error ignored - included regardless)
-gw2oracle.com: could not connect to host
-gw2reload.eu: could not connect to host
-gwa-verwaltung.de: did not receive HSTS header
-gwerder.net: could not connect to host
-gwijaya.com: could not connect to host
-gwrtech.com: could not connect to host
-gwtest.us: could not connect to host
-gxgx.org: could not connect to host
-gyakori.com: could not connect to host
-gyaou-ek1njb79xkfsyxemzmauhkvxszyua7v2t.com: did not receive HSTS header
-gyara.moe: did not receive HSTS header
-gyboche.com: could not connect to host
-gyboche.science: could not connect to host
-gylauto.fr: could not connect to host
-gymnasium-farmsen.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-gyoza.beer: could not connect to host
-gypsycatdreams.com: did not receive HSTS header
-gyume.ir: did not receive HSTS header
-gyz.io: did not receive HSTS header
-gzitech.net: could not connect to host
-gzitech.org: could not connect to host
-gzpblog.com: could not connect to host
-gzriedstadt.de: did not receive HSTS header
-h-og.com: could not connect to host
-h-rickroll-n.pw: could not connect to host
-h-suppo.com: could not connect to host
-h0r.st: could not connect to host
-h11.moe: could not connect to host
-h2cdn.cloud: could not connect to host
-h2check.org: did not receive HSTS header
-h2rul.eu: could not connect to host
-h30365.com: could not connect to host
-h33t.xyz: could not connect to host
-h3x.jp: could not connect to host
-h5197.co: could not connect to host
-h6729.co: could not connect to host
-h6729.com: did not receive HSTS header
-h6957.co: could not connect to host
-h81365.com: did not receive HSTS header
-h81818.com: did not receive HSTS header
-h82365.com: did not receive HSTS header
-h9297.co: could not connect to host
-h9397.com: did not receive HSTS header
-h9728.co: could not connect to host
-haaksmadehaanuitvaart.nl: did not receive HSTS header
-haaldesignpro.com: could not connect to host
-haancommunity.cf: could not connect to host
-haarentfernung-elektroepilation.de: did not receive HSTS header
-haarkliniek.com: did not receive HSTS header
-habbig.cc: could not connect to host
-habbixed.tk: could not connect to host
-habbo.life: did not receive HSTS header
-habbos.es: did not receive HSTS header
-habbotalk.nl: could not connect to host
-habeo.si: could not connect to host
-hablemosdetecnologia.com.ve: did not receive HSTS header
-habtium.com: did not receive HSTS header
-habview.net: did not receive HSTS header
-hac30.com: could not connect to host
-hack.cz: did not receive HSTS header
-hack.li: did not receive HSTS header
-hackbubble.me: could not connect to host
-hackcraft.net: could not connect to host
-hackdown.me: did not receive HSTS header
-hackdown.us: could not connect to host
-hacker.deals: could not connect to host
-hacker.parts: did not receive HSTS header
-hacker8.cn: could not connect to host
-hackercat.ninja: max-age too low: 2592000
-hackerforever.com: did not receive HSTS header
-hackerlite.xyz: max-age too low: 0
-hackerone-ext-adroll.com: could not connect to host
-hackerpoints.com: did not receive HSTS header
-hackerschat.net: could not connect to host
-hackerspace-ntnu.no: did not receive HSTS header
-hackerstxt.org: could not connect to host
-hackest.org: did not receive HSTS header
-hackettrecipes.com: could not connect to host
-hackhouse.sh: could not connect to host
-hackingarise.com: did not receive HSTS header
-hackingondemand.com: did not receive HSTS header
-hackingsafe.com: could not connect to host
-hackit.im: could not connect to host
-hackmeplz.com: did not receive HSTS header
-hackroyale.xyz: could not connect to host
-hacksecu.re: could not connect to host
-hacksnack.io: could not connect to host
-hacktic.info: could not connect to host
-hackyourfaceoff.com: could not connect to host
-hackzogtum-coburg.de: did not receive HSTS header
-hadret.com: did not receive HSTS header
-hadret.sh: could not connect to host
-hadzic.co: could not connect to host
-haeckl.eu: did not receive HSTS header
-haehnlein.at: could not connect to host
-haemmerle.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-haf.gr: could not connect to host
-hafoda.com: could not connect to host
-hagier.pl: could not connect to host
-hagskold.se: could not connect to host
-hahay.es: could not connect to host
-hahayidu.org: could not connect to host
-haibara.top: could not connect to host
-haidihai.ro: did not receive HSTS header
-hail2u.net: did not receive HSTS header
-haim.bio: could not connect to host
-haimablog.ooo: could not connect to host
-hainanstar.cc: could not connect to host
-hainoni.com: could not connect to host
-hair-reborn.be: did not receive HSTS header
-hairbeautyartists.it: could not connect to host
-hairlossstop.net: could not connect to host
-hairtonic-lab.com: did not receive HSTS header
-haitou.tk: could not connect to host
-haitschi.com: could not connect to host
-haitschi.de: did not receive HSTS header
-haitschi.net: could not connect to host
-haitschi.org: could not connect to host
-haiyan.cat: could not connect to host
-haizum.pro: could not connect to host
-hajekdavid.cz: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-hajnzic.at: max-age too low: 0
-hak5.org: did not receive HSTS header
-hakans.science: did not receive HSTS header
-hakkasangroup.com: did not receive HSTS header
-haktec.de: could not connect to host
-haku.moe: could not connect to host
-hakugin.me: could not connect to host
-hakugin.org: could not connect to host
-hakurei.moe: could not connect to host
-hal-9th.space: could not connect to host
-halbowman.com: did not receive HSTS header
-halcyonsbastion.com: could not connect to host
-haleo.net: did not receive HSTS header
-half-logic.eu.org: could not connect to host
-halfco.de: could not connect to host
-halfwaythere.eu: could not connect to host
-halihali.cc: did not receive HSTS header
-halihali.tv: did not receive HSTS header
-halkyon.net: could not connect to host
-halledesprix.fr: did not receive HSTS header
-halletienne.fr: did not receive HSTS header
-hallettxn.com: did not receive HSTS header
-halloweenmusic.org: did not receive HSTS header
-halloweenthings.website: could not connect to host
-hallumlaw.com: did not receive HSTS header
-halo.red: could not connect to host
-halongbaybackpackertour.com: could not connect to host
-haloobaloo.com: could not connect to host
-haloria.com: did not receive HSTS header
-halovanic.org: could not connect to host
-halta.info: did not receive HSTS header
-halyul.cc: could not connect to host
-haman.nl: could not connect to host
-hamikala.com: could not connect to host
-hamish.ca: did not receive HSTS header
-hamking.tk: could not connect to host
-hammamsayad.com: could not connect to host
-hammer-corp.com: did not receive HSTS header
-hamon.cc: did not receive HSTS header
-hamsters-uk.org: did not receive HSTS header
-hamu.blue: could not connect to host
-hanakatova.com: did not receive HSTS header
-hanami-web.tokyo.jp: did not receive HSTS header
-hanashi.eu: did not receive HSTS header
-hancatemc.com: did not receive HSTS header
-hancc.net: could not connect to host
-hancockcountyohioelections.gov: did not receive HSTS header
-handenafvanhetmedischdossier.nl: could not connect to host
-handicapindeles.nl: could not connect to host
-handicaps-ensemble.org: did not receive HSTS header
-handinhandfoundation.org.uk: did not receive HSTS header
-handiworker.com: could not connect to host
-handlecoin.com: could not connect to host
-handmade-workshop.de: could not connect to host
-handmadegobelin.com: did not receive HSTS header
-handmadehechoamano.com: could not connect to host
-handmadeshoes.pe: could not connect to host
-handmadetutorials.ro: could not connect to host
-handsandall.com: did not receive HSTS header
-handy-center.net: did not receive HSTS header
-handyglas.com: could not connect to host
-handyklinik.info: did not receive HSTS header
-hanfu.la: could not connect to host
-hang333.moe: could not connect to host
-hang333.pw: could not connect to host
-hangar18-modelismo.com.br: could not connect to host
-hangout: could not connect to host (error ignored - included regardless)
-hanimalis.fr: could not connect to host
-hanjuapp.com: could not connect to host
-hanksservice.com: could not connect to host
-hannes-speelgoedencadeautjes.nl: did not receive HSTS header
-hanoibuffet.com: could not connect to host
-hans-natur.de: did not receive HSTS header
-hansashop.eu: did not receive HSTS header
-hansashop.fi: did not receive HSTS header
-hansch.ventures: could not connect to host
-hanying55.com: did not receive HSTS header
-hanying6.com: could not connect to host
-hanying9.com: did not receive HSTS header
-hanys.xyz: could not connect to host
-hanzcollection.online: could not connect to host
-haobo111.com: could not connect to host
-haobo1111.com: could not connect to host
-haobo222.com: could not connect to host
-haobo2222.com: could not connect to host
-haobo4444.com: could not connect to host
-haobo5555.com: could not connect to host
-haobo6666.com: could not connect to host
-haobo7777.com: could not connect to host
-haoqi.men: did not receive HSTS header
-haorenka.cc: max-age too low: 0
-haoshen666.com: max-age too low: 0
-haotown.cn: did not receive HSTS header
-haoyugao.com: did not receive HSTS header
-haozi.me: did not receive HSTS header
-haozijing.com: could not connect to host
-hapijs.cn: could not connect to host
-hapimiennam.com: did not receive HSTS header
-hapissl.com: could not connect to host
-hapivm.com: could not connect to host
-happix.nl: did not receive HSTS header
-happndin.com: did not receive HSTS header
-happy-baby.info: did not receive HSTS header
-happy-end-shukatsu.com: could not connect to host
-happybeerdaytome.com: could not connect to host
-happydietplan.com: could not connect to host
-happyfabric.me: did not receive HSTS header
-happygastro.com: could not connect to host
-happyhealthylifestyle.com: did not receive HSTS header
-happyhourboard.com: did not receive HSTS header
-happynewyear2020countdown.com: did not receive HSTS header
-happyschnapper.com: could not connect to host
-happytiger.eu: could not connect to host
-hapsfordmill.co.uk: could not connect to host
-hapvm.com: could not connect to host
-haqaza.com.br: could not connect to host
-haraj.com.sa: did not receive HSTS header
-harambe.site: could not connect to host
-harbourweb.net: could not connect to host
-hardergayporn.com: could not connect to host
-hardesec.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-hardfalcon.net: could not connect to host
-hardline.xyz: could not connect to host
-hardloopfysio.nl: did not receive HSTS header
-hardtime.ru: could not connect to host
-hardweb.it: did not receive HSTS header
-hardyboyplant.com: did not receive HSTS header
-harekaze.info: did not receive HSTS header
-haribosupermix.com: could not connect to host
-hariome.com: did not receive HSTS header
-harlentimberproducts.co.uk: did not receive HSTS header
-harlor.de: could not connect to host
-harmfarm.nl: did not receive HSTS header
-harp.gov: could not connect to host
-harpersvilleal.gov: did not receive HSTS header
-harrcostl.com: could not connect to host
-harrisonsdirect.co.uk: did not receive HSTS header
-harrisonvillenaz.org: did not receive HSTS header
-harristony.com: could not connect to host
-harry-baker.com: could not connect to host
-harrygerritstransport.nl: could not connect to host
-harryharrison.co: could not connect to host
-harryphoto.fr: did not receive HSTS header
-harrypottereditor.com: could not connect to host
-harrypottereditor.net: could not connect to host
-harrysgardengamehire.co.uk: could not connect to host
-hartfordct.gov: could not connect to host
-hartlep.eu: could not connect to host
-hartmancpa.com: did not receive HSTS header
-harvestrenewal.org: did not receive HSTS header
-harveymilton.com: did not receive HSTS header
-harz.cloud: could not connect to host
-has.vision: could not connect to host
-has.work: could not connect to host
-hasabig.wang: could not connect to host
-hasalittle.wang: could not connect to host
-hasdf.de: could not connect to host
-hash-list.com: could not connect to host
-hashes.org: did not receive HSTS header
-hashiconf.eu: did not receive HSTS header
-hashnode.com: did not receive HSTS header
-hashplex.com: could not connect to host
-hashtagswimwear.com: could not connect to host
-hasinase.de: did not receive HSTS header
-hasst.schule: did not receive HSTS header
-hastaneurunleri.com.tr: could not connect to host
-haste.ch: could not connect to host
-hastherebeenamassshooting.today: did not receive HSTS header
-hatcherlawgroupnm.com: did not receive HSTS header
-hatethe.uk: could not connect to host
-hatoko.net: could not connect to host
-haufschild.de: could not connect to host
-hauntedfishtank.com: did not receive HSTS header
-haurumcraft.net: could not connect to host
-haus-zeitlos.de: did not receive HSTS header
-hausarztpraxis-linn.de: did not receive HSTS header
-haustechnik-schulte-sanitaer-heizung-klima.de: did not receive HSTS header
-haustierbedarf-shop24.eu: did not receive HSTS header
-hausverbrauch.de: could not connect to host
-hauswarteam.com: could not connect to host
-hav.com: could not connect to host
-havasuhomepage.com: could not connect to host
-havasutacohacienda.com: could not connect to host
-haveeruexaminer.com: could not connect to host
-haven-staging.cloud: could not connect to host
-haven.cloud: could not connect to host
-havenmoon.com: could not connect to host
-havenswift-hosting.co.uk: did not receive HSTS header
-hawawa.kr: could not connect to host
-hawk-la.com: could not connect to host
-hawthornharpist.com: could not connect to host
-haxoff.com: did not receive HSTS header
-haxon.me: could not connect to host
-haydenhill.us: could not connect to host
-haydentomas.com: did not receive HSTS header
-hayleishop.fr: could not connect to host
-haystack-staging.com: did not receive HSTS header
-hayzepvp.us: could not connect to host
-hazcod.com: could not connect to host
-haze-productions.com: could not connect to host
-haze.network: did not receive HSTS header
-haze.productions: could not connect to host
-haze.sucks: could not connect to host
-hazeltime.se: could not connect to host
-hazloconlapix.com: could not connect to host
-hazukilab.com: did not receive HSTS header
-hazyrom.net: could not connect to host
-hb1111.com: could not connect to host
-hb3333.com: could not connect to host
-hb4444.com: could not connect to host
-hb6365.com: did not receive HSTS header
-hb6729.com: could not connect to host
-hb9397.com: could not connect to host
-hbbet.com: could not connect to host
-hbdesign.work: did not receive HSTS header
-hbgshop.cf: could not connect to host
-hbvip.com: could not connect to host
-hbvip01.com: could not connect to host
-hbvip02.com: could not connect to host
-hbvip03.com: could not connect to host
-hbvip04.com: could not connect to host
-hbvip05.com: could not connect to host
-hbvip06.com: could not connect to host
-hbvip07.com: could not connect to host
-hbvip08.com: could not connect to host
-hbxianghang.com: could not connect to host
-hcaz.io: did not receive HSTS header
-hceu-performance.com: could not connect to host
-hcfhomelottery.ca: did not receive HSTS header
-hcoe.fi: did not receive HSTS header
-hcr.io: did not receive HSTS header
-hcs-company.nl: did not receive HSTS header
-hcstr.com: could not connect to host
-hd4138.com: could not connect to host
-hd5454.com: could not connect to host
-hd6556.com: could not connect to host
-hd6729.com: could not connect to host
-hd6957.com: could not connect to host
-hd9397.com: could not connect to host
-hd9721.com: could not connect to host
-hda.me: did not receive HSTS header
-hdcamvids.com: did not receive HSTS header
-hddrecovery.net.au: could not connect to host
-hdrboundless.com: could not connect to host
-hdritalyphotos.com: did not receive HSTS header
-hdserver.info: did not receive HSTS header
-hdsmigrationtool.com: could not connect to host
-hdtwinks.com: could not connect to host
-hduin.xyz: could not connect to host
-hdy.nz: could not connect to host
-head-shop.lt: could not connect to host
-head-shop.lv: could not connect to host
-headlinesclub.com: could not connect to host
-headmates.xyz: could not connect to host
-headshotharp.de: did not receive HSTS header
-health-and-beauty-news.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-health-match.com.au: could not connect to host
-healthcare6.com: did not receive HSTS header
-healthery.com: did not receive HSTS header
-healthfitapp.com: could not connect to host
-healthierweight.co.uk: did not receive HSTS header
-healthjoy.com: did not receive HSTS header
-healthlabs.com: did not receive HSTS header
-healthmatchapp.com: could not connect to host
-healthyandnaturalliving.com: did not receive HSTS header
-healthybeterlife.click: could not connect to host
-healthycod.in: could not connect to host
-healthyfitfood.com: could not connect to host
-healthylifeelite.com: could not connect to host
-healthyrecharge.com: did not receive HSTS header
-healtious.com: could not connect to host
-heap.zone: did not receive HSTS header
-hearinghelpexpress.com: did not receive HSTS header
-hearingshofar.com: could not connect to host
-hearkener.com: could not connect to host
-heart.ge: could not connect to host
-heartfelttokens.com: did not receive HSTS header
-heartgames.pl: could not connect to host
-heartlandrentals.com: did not receive HSTS header
-heartsucker.com: could not connect to host
-hearty.blog: could not connect to host
-hearty.cf: could not connect to host
-hearty.ga: could not connect to host
-hearty.gq: could not connect to host
-hearty.ink: could not connect to host
-hearty.ml: could not connect to host
-hearty.ooo: could not connect to host
-hearty.org.tw: could not connect to host
-hearty.space: could not connect to host
-hearty.taipei: could not connect to host
-hearty.tech: could not connect to host
-hearty.us: could not connect to host
-heartyapp.com: could not connect to host
-heartyapp.tw: could not connect to host
-heartyme.net: could not connect to host
-heathmanners.com: could not connect to host
-heatingpartswarehouse.co.uk: did not receive HSTS header
-heaven.moe: could not connect to host
-heavenlyseals.com: could not connect to host
-heavenlysmokenc.com: could not connect to host
-heavystresser.com: could not connect to host
-heayao.com: could not connect to host
-hebaus.com: did not receive HSTS header
-hebergeurssd.com: did not receive HSTS header
-heberut.gov: did not receive HSTS header
-hebocon.nl: did not receive HSTS header
-hebriff.com: could not connect to host
-hechamano.es: did not receive HSTS header
-heckticmedia.com: did not receive HSTS header
-hectorj.net: did not receive HSTS header
-heddoun.com: did not receive HSTS header
-heeler.blue: could not connect to host
-heeler.red: could not connect to host
-heidilein.info: did not receive HSTS header
-heijblok.com: did not receive HSTS header
-heikorichter.name: could not connect to host
-heimnetze.org: could not connect to host
-heimprofis.de: could not connect to host
-heinemann.io: did not receive HSTS header
-heinrich-kleyer-schule.de: did not receive HSTS header
-heisenberg.co: could not connect to host
-hejahanif.se: did not receive HSTS header
-hejianpeng.cn: could not connect to host
-hejsupport.se: could not connect to host
-heka.ai: could not connect to host
-hekeki.com: could not connect to host
-hektenkairez.com: could not connect to host
-hele.cz: could not connect to host
-helencrump.co.uk: did not receive HSTS header
-helenelefauconnier.com: could not connect to host
-helgakristoffer.com: could not connect to host
-helgakristoffer.wedding: could not connect to host
-helicaldash.com: could not connect to host
-helioanodyne.eu: did not receive HSTS header
-helios4.com: could not connect to host
-helixflight.com: did not receive HSTS header
-hellenicaward.com: did not receive HSTS header
-helles-koepfchen.de: did not receive HSTS header
-hello-nestor.com: could not connect to host
-helloaigo.com: did not receive HSTS header
-hellofilters.com: could not connect to host
-hellofrom.com: did not receive HSTS header
-hellomouse.tk: did not receive HSTS header
-hellotandem.com: could not connect to host
-hellothought.net: could not connect to host
-helloyemek.com: did not receive HSTS header
-helmut-a-binser.de: did not receive HSTS header
-help207.xyz: could not connect to host
-helpadmin.net: could not connect to host
-helpantiaging.com: could not connect to host
-helpdebit.com: did not receive HSTS header
-helpekwendenihospital.com: could not connect to host
-helpfacile.com: did not receive HSTS header
-helpfixe.com: did not receive HSTS header
-helpflux.com: did not receive HSTS header
-helpfute.com: did not receive HSTS header
-helpgerer.com: did not receive HSTS header
-helpgoabroad.com: did not receive HSTS header
-helpium.de: did not receive HSTS header
-helpmebuild.com: could not connect to host
-helpmij.cf: could not connect to host
-helppresta.com: did not receive HSTS header
-helprocleaningservices.com: did not receive HSTS header
-helptasker.org: could not connect to host
-helpverif.com: did not receive HSTS header
-helserbrothers.com: did not receive HSTS header
-helsingfors.guide: could not connect to host
-helup.com: did not receive HSTS header
-hemainteriors.com: did not receive HSTS header
-hemlockhillscabinrentals.com: did not receive HSTS header
-hencagon.com: could not connect to host
-henchman.io: did not receive HSTS header
-hendersonrealestatepros.com: did not receive HSTS header
-hendersonvalleyautomotive.co.nz: could not connect to host
-hendranicholas.com: did not receive HSTS header
-hendyisaac.com: could not connect to host
-hengelsportdeal.com: could not connect to host
-henhenlu.com: could not connect to host
-henkbrink.com: could not connect to host
-hennadesigns.org: did not receive HSTS header
-henok.eu: did not receive HSTS header
-henriknoerr.com: could not connect to host
-henriksen.is: could not connect to host
-henrock.net: could not connect to host
-henrycountyohio.gov: did not receive HSTS header
-hentai.design: could not connect to host
-hentaimaster.net: could not connect to host
-hentaiworld.cc: could not connect to host
-hepteract.us: could not connect to host
-heptner24.de: could not connect to host
-herbal-id.com: did not receive HSTS header
-herbaldiyeti.com: did not receive HSTS header
-herbandpat.org: could not connect to host
-herbertmouwen.nl: could not connect to host
-herculex.fi: could not connect to host
-here.ml: could not connect to host
-here4funpartysolutions.ie: could not connect to host
-herealways.tk: could not connect to host
-herebedragons.io: did not receive HSTS header
-heribe-maruo.com: did not receive HSTS header
-heribro.com: did not receive HSTS header
-heritagedentistry.ca: could not connect to host
-hermann.in: could not connect to host
-hermes-servizi.it: could not connect to host
-herndl.org: did not receive HSTS header
-hernn.com: could not connect to host
-heroin.org.uk: could not connect to host
-heroku.ga: could not connect to host
-heroliker.com: did not receive HSTS header
-herpaderp.net: could not connect to host
-herqqq.com: did not receive HSTS header
-herr-webdesign.de: could not connect to host
-herramientasbazarot.com: did not receive HSTS header
-herrderzeit.de: could not connect to host
-herrenfahrt.com: did not receive HSTS header
-herrtxbias.org: could not connect to host
-hervespanneut.com: did not receive HSTS header
-herzbotschaft.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-hestervanderheijden.nl: could not connect to host
-hetdorrup.nl: did not receive HSTS header
-hetluisterbos.be: did not receive HSTS header
-hetmeisjeachterpauw.nl: could not connect to host
-hetzflix.stream: did not receive HSTS header
-heverhagen.rocks: did not receive HSTS header
-hex.bz: could not connect to host
-hex2013.com: did not receive HSTS header
-hexacon.io: could not connect to host
-hexadecimal.tech: could not connect to host
-hexaware.com: did not receive HSTS header
-hexclock.io: could not connect to host
-hexe.net: did not receive HSTS header
-hexhu.com: could not connect to host
-hexicurity.com: did not receive HSTS header
-hexobind.com: could not connect to host
-heyapakabar.com: did not receive HSTS header
-heyfringe.com: could not connect to host
-heyguevara.com: did not receive HSTS header
-heyjournal.com: could not connect to host
-heywoodtown.co.uk: did not receive HSTS header
-hf-tekst.nl: did not receive HSTS header
-hfbg.nl: did not receive HSTS header
-hfcbank.com.gh: did not receive HSTS header
-hfi.me: did not receive HSTS header
-hflsdev.org: could not connect to host
-hfox.org: could not connect to host
-hfsctx.gov: could not connect to host
-hfu.io: did not receive HSTS header
-hg170.cc: could not connect to host
-hg525.com: did not receive HSTS header
-hg71839.com: could not connect to host
-hg881.com: could not connect to host
-hgfa.fi: could not connect to host
-hgvnet.de: could not connect to host
-hgw777.cc: did not receive HSTS header
-hgyoseo.com: could not connect to host
-hh46953255.com: max-age too low: 0
-hh5197.co: could not connect to host
-hh6729.co: could not connect to host
-hh6729.com: did not receive HSTS header
-hh6957.co: could not connect to host
-hh9297.co: could not connect to host
-hh9397.com: did not receive HSTS header
-hh9721.com: did not receive HSTS header
-hh9728.co: could not connect to host
-hhfgaming.com: could not connect to host
-hhuitvaart.nl: did not receive HSTS header
-hi-media.ir: could not connect to host
-hi.team: could not connect to host
-hi808.net: did not receive HSTS header
-hialatv.com: could not connect to host
-hibanaworld.com: could not connect to host
-hibilog.com: could not connect to host
-hicn.gq: could not connect to host
-hiddendepth.ie: did not receive HSTS header
-hiddenmail.xyz: could not connect to host
-hiddenprocess.com: could not connect to host
-hiddenrefuge.eu.org: did not receive HSTS header
-hiddout.com: could not connect to host
-hidedd.com: could not connect to host
-hideftv.deals: could not connect to host
-hideo54.com: did not receive HSTS header
-hidrofire.com: did not receive HSTS header
-hiexmerida-mailing.com: could not connect to host
-hifly.com.tw: could not connect to host
-higgsboson.tk: did not receive HSTS header
-highclasseducation.com: did not receive HSTS header
-highgrove.org.uk: could not connect to host
-highland-webcams.com: could not connect to host
-highlandsfl.gov: did not receive HSTS header
-highlightsfootball.com: did not receive HSTS header
-highlnk.com: could not connect to host
-highperformancehvac.com: did not receive HSTS header
-highpressuretech.com: did not receive HSTS header
-highspeedinternetservices.ca: could not connect to host
-highsurf-miyazaki.com: could not connect to host
-hightechbasementsystems.com: could not connect to host
-hightechgadgets.net: could not connect to host
-hightower.eu: could not connect to host
-highvelocitydesign.com: could not connect to host
-higilopocht.li: could not connect to host
-higp.de: did not receive HSTS header
-hiisukun.com: could not connect to host
-hiitcentre.com: did not receive HSTS header
-hijoan.com: did not receive HSTS header
-hikagestudios.com: could not connect to host
-hikariempire.com: could not connect to host
-hikarinime.me: could not connect to host
-hikarukujo.com: did not receive HSTS header
-hikinggearlab.com: did not receive HSTS header
-hikustore.com: could not connect to host
-hilaolu.com: could not connect to host
-hilaolu.studio: could not connect to host
-hilariousbeer.com.mx: could not connect to host
-hilde.link: could not connect to host
-hildegardis-schule.de: did not receive HSTS header
-hilinemerchandising.com: did not receive HSTS header
-hill.selfip.net: could not connect to host
-hilnu.tk: could not connect to host
-hiltonhyland.com: did not receive HSTS header
-himalaya-cross.com: could not connect to host
-himalaya.video: did not receive HSTS header
-himalayanyogashram.com: did not receive HSTS header
-himcy.ga: could not connect to host
-himens.com: could not connect to host
-hindi-movie.org: could not connect to host
-hindibaba.tk: could not connect to host
-hindimoviedownload.net: could not connect to host
-hindimovieonline.net: could not connect to host
-hindmanfuneralhomes.com: did not receive HSTS header
-hinepaving.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-hingle.me: could not connect to host
-hinkel-sohn.de: did not receive HSTS header
-hintergedanken.com: could not connect to host
-hintermeier-rae.at: did not receive HSTS header
-hinyari.net: did not receive HSTS header
-hiojbk.com: could not connect to host
-hiphop.ren: could not connect to host
-hiphopconvention.nl: could not connect to host
-hipi.jp: could not connect to host
-hipnoseinstitute.org: did not receive HSTS header
-hippiekiller.net: could not connect to host
-hippo.ge: did not receive HSTS header
-hiq.sh: could not connect to host
-hiqfleet.co.uk: did not receive HSTS header
-hiraku.me: could not connect to host
-hire-a-coder.de: did not receive HSTS header
-hirefitness.co.uk: did not receive HSTS header
-hireprofs.com: could not connect to host
-hiresuccessstaffing.com: could not connect to host
-hiretech.com: did not receive HSTS header
-hirokilog.com: could not connect to host
-hirte-digital.de: did not receive HSTS header
-hirtzfr.eu: did not receive HSTS header
-hirzaconsult.ro: did not receive HSTS header
-hisingenrunt.se: could not connect to host
-hisingensck.se: could not connect to host
-histoire-theatre.com: could not connect to host
-history.pe: could not connect to host
-hitchunion.org: could not connect to host
-hiteshbrahmbhatt.com: did not receive HSTS header
-hiteshjoshi.com: could not connect to host
-hitoy.org: could not connect to host
-hitrek.ml: could not connect to host
-hittipps.com: could not connect to host
-hiv.com.tw: could not connect to host
-hivatal-info.hu: could not connect to host
-hizliwp.net: did not receive HSTS header
-hj2999.com: could not connect to host
-hj3455.com: could not connect to host
-hj555.cc: could not connect to host
-hj556.cc: could not connect to host
-hj9379.com: could not connect to host
-hj99111.com: could not connect to host
-hj99177.com: could not connect to host
-hj99188.com: could not connect to host
-hjes.com.ve: could not connect to host
-hjf-immobilien.de: did not receive HSTS header
-hjkbm.cn: could not connect to host
-hjkhs.cn: could not connect to host
-hjtky.cn: could not connect to host
-hjw-kunstwerk.de: did not receive HSTS header
-hknet.at: did not receive HSTS header
-hkno.it: could not connect to host
-hks-ffm.de: did not receive HSTS header
-hktkl.com: could not connect to host
-hl8999.com: could not connect to host
-hledejpravnika.cz: could not connect to host
-hlg66.cc: could not connect to host
-hlg88.cc: could not connect to host
-hlidacnajemneho.cz: did not receive HSTS header
-hlin.cloud: did not receive HSTS header
-hlpublicidad.com: could not connect to host
-hlyue.com: did not receive HSTS header
-hm5189.com: max-age too low: 0
-hm773.net: did not receive HSTS header
-hmcdj.cn: could not connect to host
-hmeonot.org.il: did not receive HSTS header
-hmksq.ae: max-age too low: 7776000
-hmm.nyc: could not connect to host
-hn122.cc: could not connect to host
-hnrk.io: did not receive HSTS header
-hnwebi.com: could not connect to host
-ho18.net: could not connect to host
-ho68.net: could not connect to host
-hoast.xyz: could not connect to host
-hobaugh.social: could not connect to host
-hobby-gamerz-community.de: did not receive HSTS header
-hobbyspeed.com: did not receive HSTS header
-hocassian.cn: did not receive HSTS header
-hochdorf-tennis.de: did not receive HSTS header
-hochzeit-dana-laurens.de: could not connect to host
-hochzeitsgezwitscher.de: did not receive HSTS header
-hochzeitshelferlein.de: did not receive HSTS header
-hockeyapp.ch: could not connect to host
-hod-ok.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-hodamakade.com: could not connect to host
-hodne.io: could not connect to host
-hodnos.com: did not receive HSTS header
-hoekwoningverkopen.nl: could not connect to host
-hoelty.network: could not connect to host
-hoepli.it: did not receive HSTS header
-hoerbuecher-und-hoerspiele.de: could not connect to host
-hoeveiligismijn.nl: could not connect to host
-hoezzi.nl: did not receive HSTS header
-hoffens.se: did not receive HSTS header
-hogar123.es: could not connect to host
-hohlhupe.de: did not receive HSTS header
-hohlhupen.de: did not receive HSTS header
-hoiku-map.tokyo: could not connect to host
-hoiku-navi.com: did not receive HSTS header
-hoikuen-now.top: did not receive HSTS header
-hokepon.com: did not receive HSTS header
-hokieprivacy.org: did not receive HSTS header
-hokify.at: did not receive HSTS header
-hokify.ch: did not receive HSTS header
-hokify.de: did not receive HSTS header
-hokung.xyz: could not connect to host
-holad.de: did not receive HSTS header
-holenergies.com: did not receive HSTS header
-holenergies.fr: did not receive HSTS header
-holgerlehner.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-holidayincotswolds.co.uk: could not connect to host
-holidaypackage.co: did not receive HSTS header
-holifestival-freyung.de: could not connect to host
-holini.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-hollandguns.com: did not receive HSTS header
-hollerau.de: could not connect to host
-hollo.me: did not receive HSTS header
-hollowwinds.xyz: could not connect to host
-holmq.dk: max-age too low: 2592000
-holodeck.us: could not connect to host
-holowaty.me: could not connect to host
-holstphoto.com: max-age too low: 2592000
-holundersberg.de: could not connect to host
-holymoly.lu: could not connect to host
-holymolycasinos.com: did not receive HSTS header
-holzed.com: could not connect to host
-homa.website: could not connect to host
-homads.com: did not receive HSTS header
-home-cloud.online: could not connect to host
-home-coaching.be: did not receive HSTS header
-home-craft.de: could not connect to host
-home-handymen.co.uk: did not receive HSTS header
-home-insurance-quotes.tk: could not connect to host
-home-v.ind.in: could not connect to host
-home-work-jobs.com: could not connect to host
-homeadore.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-homeandyarddetailing.com: could not connect to host
-homeautomated.com: could not connect to host
-homebodyalberta.com: did not receive HSTS header
-homecarpetcleaning.co.uk: could not connect to host
-homeclouding.de: could not connect to host
-homecoming.city: could not connect to host
-homecompost.in: did not receive HSTS header
-homedatacenter.com.br: did not receive HSTS header
-homedna.com: did not receive HSTS header
-homeeducator.com: did not receive HSTS header
-homeexx.com: could not connect to host
-homehuntertoronto.com: could not connect to host
-homelabquotes.com: did not receive HSTS header
-homem-viril.com: could not connect to host
-homeofjones.net: could not connect to host
-homeownersassociationmanagementla.com: could not connect to host
-homeownersinsurancenevada.com: could not connect to host
-homeownersinsurancenv.com: could not connect to host
-homeremodelingcontractorsca.com: did not receive HSTS header
-homes-in-norcal.com: did not receive HSTS header
-homes-in-stockton.com: did not receive HSTS header
-homesandal.com: did not receive HSTS header
-homeseller.co.uk: did not receive HSTS header
-homesfordinner.ca: could not connect to host
-homestay.id: could not connect to host
-homewatt.co.uk: could not connect to host
-homeyantra.com: could not connect to host
-homezhi.com.tw: could not connect to host
-homoglyph.net: could not connect to host
-homyremedies.com: could not connect to host
-honeybeard.co.uk: did not receive HSTS header
-honeymaze.com: could not connect to host
-honeytracks.com: could not connect to host
-honglitrading.co.uk: did not receive HSTS header
-hongyd.online: could not connect to host
-hongzhaxiaofendui.com: could not connect to host
-hongzu.cc: could not connect to host
-hongzuwang.com: could not connect to host
-hongzuzhibo.com: could not connect to host
-honigdealer.de: did not receive HSTS header
-honkhonk.net: could not connect to host
-honoka.tech: could not connect to host
-honoo.com: could not connect to host
-hoodiecrow.com: did not receive HSTS header
-hoodoo.io: could not connect to host
-hoodoo.tech: could not connect to host
-hoodtrader.com: could not connect to host
-hoofddorp-centraal.nl: could not connect to host
-hookandloom.com: did not receive HSTS header
-hookany.com: did not receive HSTS header
-hoopsacademyusa.com: could not connect to host
-hoosa.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-hoovism.com: could not connect to host
-hope-line-earth.jp: did not receive HSTS header
-hopemeet.info: could not connect to host
-hopesb.org: did not receive HSTS header
-hopewellproperties.co.uk: did not receive HSTS header
-hopglass.eu: could not connect to host
-hopglass.net: could not connect to host
-hopla.sg: did not receive HSTS header
-hopo.design: could not connect to host
-hor.website: could not connect to host
-horace.li: did not receive HSTS header
-horairetrain.nl: could not connect to host
-horisonttimedia.fi: did not receive HSTS header
-horizonmoto.fr: did not receive HSTS header
-horizonresourcesinc.com: could not connect to host
-horkel.cf: could not connect to host
-horning.co: did not receive HSTS header
-hornyforhanzo.com: could not connect to host
-horo.me: could not connect to host
-horosho.in: could not connect to host
-horrendous-servers.com: could not connect to host
-horrorserv.com: could not connect to host
-horseboners.xxx: could not connect to host
-horsegateway.com: could not connect to host
-hortifarm.ro: did not receive HSTS header
-horvathtom.com: could not connect to host
-horvatnyelvkonyv.hu: could not connect to host
-hospeda1.com.br: did not receive HSTS header
-host.black: could not connect to host
-host4me.ml: could not connect to host
-host97.de: could not connect to host
-hostam.link: could not connect to host
-hostarea51.com: could not connect to host
-hosted-oswa.org: did not receive HSTS header
-hostedbgp.net: did not receive HSTS header
-hostedcomments.com: could not connect to host
-hostedtalkgadget.google.com: did not receive HSTS header (error ignored - included regardless)
-hostelite.com: did not receive HSTS header
-hostfuture.co.in: did not receive HSTS header
-hostgarou.com: did not receive HSTS header
-hostgigz.com: did not receive HSTS header
-hostinaus.com.au: did not receive HSTS header
-hostingfirst.nl: could not connect to host
-hostingfj.com: could not connect to host
-hostingsams.com: did not receive HSTS header
-hostingsrv.nl: did not receive HSTS header
-hostisan.com: could not connect to host
-hostma.ma: could not connect to host
-hostmark.pl: did not receive HSTS header
-hosts.cf: could not connect to host
-hostserv.org: could not connect to host
-hostworkz.com: could not connect to host
-hosyaku.gr.jp: could not connect to host
-hot-and-new.gr: did not receive HSTS header
-hotartup.com: could not connect to host
-hotcamvids.com: could not connect to host
-hotchillibox.co.za: could not connect to host
-hotchoc.io: could not connect to host
-hotdoc.com.au: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-hotel-huberhof.at: did not receive HSTS header
-hotel-kronjuwel.de: could not connect to host
-hotel-pension-sonnalp.eu: did not receive HSTS header
-hotel1926.com.mt: did not receive HSTS header
-hotelarevalo.com: max-age too low: 0
-hotelaustria-wien.at: did not receive HSTS header
-hotellerssolutions.com: did not receive HSTS header
-hotellilas.in: could not connect to host
-hotello.io: could not connect to host
-hotelmadhuwanvihar.com: could not connect to host
-hotelromacuernavaca.com.mx: did not receive HSTS header
-hotelvictoriaoax-mailing.com: could not connect to host
-hotelvillahermosa-mailing.com: could not connect to host
-hotelvue.nl: did not receive HSTS header
-hotesb.net: could not connect to host
-hothiphopmusic.com: did not receive HSTS header
-hotlog.tk: could not connect to host
-hoto.us: did not receive HSTS header
-hotplug.gr: did not receive HSTS header
-hotpoint-training.com: did not receive HSTS header
-hottestwebcamgirls.org: could not connect to host
-hottubhirenewcastle.co.uk: did not receive HSTS header
-hotwifer.com: could not connect to host
-houdremont-la-courneuve.info: could not connect to host
-houhaoyi.com: max-age too low: 0
-houkago-step.com: did not receive HSTS header
-house-of-japan.co.jp: did not receive HSTS header
-housedesigninfo.tk: could not connect to host
-houseinvestor.com: could not connect to host
-houselovin.pt: did not receive HSTS header
-housemaadiah.org: could not connect to host
-housemates.uk.com: could not connect to host
-houseofyee.com: could not connect to host
-housetalk.ru: could not connect to host
-housingstudents.org.uk: could not connect to host
-houstoncreditlaw.com: could not connect to host
-houstontxlocksmiths.com: did not receive HSTS header
-how2fsbo.com: could not connect to host
-how2play.pl: did not receive HSTS header
-howardtyson.com: did not receive HSTS header
-howardwatts.co.uk: did not receive HSTS header
-howbigismybuilding.com: did not receive HSTS header
-howesky.com: did not receive HSTS header
-howfargames.com: could not connect to host
-howrandom.org: could not connect to host
-howson.me: could not connect to host
-howtechvalley.com: could not connect to host
-howtocommunicate.com.au: did not receive HSTS header
-howtocuremysciatica.com: could not connect to host
-howtofreelance.com: did not receive HSTS header
-howtogeekpro.com: could not connect to host
-howtoinstall.co: did not receive HSTS header
-hozinga.de: could not connect to host
-hp-67.com: could not connect to host
-hpctecnologias.com: did not receive HSTS header
-hpeditor.tk: could not connect to host
-hpepub.asia: could not connect to host
-hpnow.com.br: could not connect to host
-hppub.info: could not connect to host
-hppub.org: could not connect to host
-hppub.site: could not connect to host
-hqhost.net: did not receive HSTS header
-hqwebhosting.tk: could not connect to host
-hr-intranet.com: could not connect to host
-hr-tech.store: could not connect to host
-hr365.dk: did not receive HSTS header
-hr98.tk: could not connect to host
-hr98.xyz: could not connect to host
-hrabogados.com: could not connect to host
-hrackydomino.cz: did not receive HSTS header
-hreflang.info: could not connect to host
-hrfhomelottery.com: did not receive HSTS header
-hrjfeedstock.com: did not receive HSTS header
-hrk.io: did not receive HSTS header
-hrpage.ml: could not connect to host
-hrstapps-dev.com: could not connect to host
-hrtech.store: could not connect to host
-hrtraining.com.au: did not receive HSTS header
-hru.gov: could not connect to host
-hs-umformtechnik.de: did not receive HSTS header
-hserver.top: did not receive HSTS header
-hsex.tv: did not receive HSTS header
-hsir.me: could not connect to host
-hsts-preload-test.xyz: could not connect to host
-hsts.com.br: could not connect to host
-hsts.date: could not connect to host
-hstspreload.me: could not connect to host
-hsuan.pw: did not receive HSTS header
-hsulei.com: could not connect to host
-hszhyy120.com: could not connect to host
-htcp99.com: could not connect to host
-htdcomputer.vn: could not connect to host
-htlball.at: could not connect to host
-htmdom.com: could not connect to host
-html-lab.tk: could not connect to host
-html2gutenberg.com: did not receive HSTS header
-htmue.net: did not receive HSTS header
-htmue.org: could not connect to host
-htp2.top: could not connect to host
-http418.xyz: could not connect to host
-httphacker.com: could not connect to host
-https.ps: could not connect to host
-https.ren: could not connect to host
-httpsalarm.com: could not connect to host
-httpsarnemergan.ml: could not connect to host
-httpsecurityreport.com: could not connect to host
-httpstaak.tk: could not connect to host
-httpstatuscode418.xyz: could not connect to host
-httptest.net: could not connect to host
-htxlaunch.sg: did not receive HSTS header
-hu8188.com: could not connect to host
-hu8518.com: could not connect to host
-hu8555.com: could not connect to host
-hu8588.com: could not connect to host
-hu8777.com: could not connect to host
-hu8bet.com: could not connect to host
-hu8hu8.com: could not connect to host
-hualao.co: could not connect to host
-huangguancq.com: could not connect to host
-huangjia71.com: could not connect to host
-huangjia72.com: could not connect to host
-huangjia73.com: could not connect to host
-huangjia74.com: could not connect to host
-huangjia75.com: could not connect to host
-huangjia76.com: could not connect to host
-huangjia77.com: could not connect to host
-huangjia777.com: could not connect to host
-huangjia78.com: could not connect to host
-huangjia79.com: could not connect to host
-huangjia99.com: could not connect to host
-huangliangbo.com: did not receive HSTS header
-huangting.me: did not receive HSTS header
-huangzenghao.com: could not connect to host
-huarongdao.com: could not connect to host
-huawenyy.com: could not connect to host
-hubbroker.com: did not receive HSTS header
-hubertmoszka.pl: did not receive HSTS header
-hubok.net: could not connect to host
-hubrecht.at: could not connect to host
-hubrick.com: did not receive HSTS header
-hudhaifahgoga.co.za: could not connect to host
-hudingyuan.cn: did not receive HSTS header
-hudognik.com: did not receive HSTS header
-hudsonwi.gov: did not receive HSTS header
-hugh-dancy.com: could not connect to host
-hughtodd.ink: could not connect to host
-hugizrecords.com: did not receive HSTS header
-hugo6.com: could not connect to host
-hugocollignon.fr: could not connect to host
-hugofs.com: could not connect to host
-hugovr.nl: could not connect to host
-hui89119.com: max-age too low: 0
-huiser.nl: could not connect to host
-hukaloh.com: could not connect to host
-hukkatavara.com: could not connect to host
-hukutuu.com: could not connect to host
-hulsoft.co.uk: could not connect to host
-human-shinri.com: could not connect to host
-humanexperiments.com: could not connect to host
-humankode.com: did not receive HSTS header
-humblebee.bg: could not connect to host
-humblebee.ch: could not connect to host
-humblebee.co.in: could not connect to host
-humblebee.com.mx: could not connect to host
-humblebee.com.ph: could not connect to host
-humblebee.foundation: could not connect to host
-humblebee.me.uk: did not receive HSTS header
-humblefinances.com: could not connect to host
-humboldtcountynv.gov: could not connect to host
-humdingersnj.com: did not receive HSTS header
-humeurs.net: could not connect to host
-hummingbird.services: could not connect to host
-humorcaliente.com: could not connect to host
-humorce.com: could not connect to host
-humortuga.pt: could not connect to host
-hump.dk: could not connect to host
-humpi.at: could not connect to host
-humpteedumptee.in: did not receive HSTS header
-hundeformel.de: could not connect to host
-hundesport-psvhalle.de: did not receive HSTS header
-hunngard.com: could not connect to host
-hunterjohnson.io: could not connect to host
-huntingtonwv.gov: did not receive HSTS header
-huntsvillealtransit.gov: did not receive HSTS header
-huodongweb.com: could not connect to host
-huongquynh.com: did not receive HSTS header
-huoqibaike.club: could not connect to host
-hup.blue: did not receive HSTS header
-hupp.se: did not receive HSTS header
-huren.nl: did not receive HSTS header
-huskybutt.dog: could not connect to host
-huskyduvercors.com: did not receive HSTS header
-hustle.com: did not receive HSTS header
-hustle.life: did not receive HSTS header
-hustunique.com: did not receive HSTS header
-huto.ml: could not connect to host
-huuduc.xyz: could not connect to host
-huwcbjones.uk: could not connect to host
-huwjones.me: could not connect to host
-huyaya123.com: max-age too low: 0
-huzurmetal.net: could not connect to host
-hvenetworks.cf: could not connect to host
-hveradistributions.com: could not connect to host
-hverdagogkink.no: could not connect to host
-hwaddress.com: max-age too low: 60
-hwcine.com: could not connect to host
-hwinfo.com: did not receive HSTS header
-hwjkk.com: could not connect to host
-hx56.cc: could not connect to host
-hx678.cc: could not connect to host
-hx789.cc: could not connect to host
-hxit.cn: could not connect to host
-hxsf.me: could not connect to host
-hxying.com: could not connect to host
-hy1.com: could not connect to host
-hyakumachi.com: did not receive HSTS header
-hyansc.com: max-age too low: 0
-hybridiyhdistys.fi: could not connect to host
-hybridklubben.fi: could not connect to host
-hybridragon.net: could not connect to host
-hybula.nl: could not connect to host
-hydai.co: could not connect to host
-hydra-clothing.com: could not connect to host
-hydra.ly: could not connect to host
-hydra.ws: could not connect to host
-hydra.zone: did not receive HSTS header
-hydrabit.nl: could not connect to host
-hydracommunity.net: did not receive HSTS header
-hydradigital.com.au: did not receive HSTS header
-hydrasecurity.ga: could not connect to host
-hydrasolutions.de: did not receive HSTS header
-hydroagro.pl: could not connect to host
-hydrocloud.net: could not connect to host
-hydrodipcenter.nl: did not receive HSTS header
-hydronicheatingaustralia.com.au: did not receive HSTS header
-hydronium.cf: could not connect to host
-hydronium.ga: could not connect to host
-hydronium.me: could not connect to host
-hydronium.ml: could not connect to host
-hydronium.tk: could not connect to host
-hydronyx.me: could not connect to host
-hydrosight.com: did not receive HSTS header
-hyeok.org: did not receive HSTS header
-hylians.com: could not connect to host
-hypa.net.au: did not receive HSTS header
-hypeitems.pl: did not receive HSTS header
-hyper-matrix.org: could not connect to host
-hyper69.com: could not connect to host
-hyperactive.am: could not connect to host
-hyperautomotive.com.au: could not connect to host
-hyperbolic-mayonnaise-interceptor.ovh: could not connect to host
-hypercompetitions.com: could not connect to host
-hyperporn.net: could not connect to host
-hyperreal.info: did not receive HSTS header
-hyphen.co.za: could not connect to host
-hyphenpda.co.za: could not connect to host
-hypnoresults.com.au: did not receive HSTS header
-hypnos.hu: did not receive HSTS header
-hypotheques24.ch: could not connect to host
-hypothesis.link: could not connect to host
-hysg.me: could not connect to host
-hytzongxuan.com: could not connect to host
-hytzongxuan.top: could not connect to host
-hyvanolonterapia.fi: did not receive HSTS header
-hyvive.com: could not connect to host
-hywlovexyc.info: could not connect to host
-hzh.pub: did not receive HSTS header
-i-aloks.ru: could not connect to host
-i-fastnet.net: could not connect to host
-i-hakul.net: did not receive HSTS header
-i-jp.net: could not connect to host
-i-partners.sk: could not connect to host
-i-pinged-everyone.today: could not connect to host
-i-rickroll-n.pw: could not connect to host
-i-scream.space: could not connect to host
-i-stats.net: could not connect to host
-i-stuff.site: did not receive HSTS header
-i-telligence.de: did not receive HSTS header
-i00228.com: could not connect to host
-i10z.com: did not receive HSTS header
-i1place.com: did not receive HSTS header
-i28s.com: did not receive HSTS header
-i2b.ro: could not connect to host
-i30365.com: could not connect to host
-i365365.com: could not connect to host
-i496.eu: could not connect to host
-i4m1k0su.com: could not connect to host
-i5197.co: could not connect to host
-i66.me: did not receive HSTS header
-i6729.co: could not connect to host
-i6729.com: did not receive HSTS header
-i6957.co: could not connect to host
-i6957.com: did not receive HSTS header
-i81365.com: did not receive HSTS header
-i81818.com: did not receive HSTS header
-i82365.com: did not receive HSTS header
-i86666.com: did not receive HSTS header
-i8cp.com: could not connect to host
-i9297.co: could not connect to host
-i9397.com: did not receive HSTS header
-i9721.com: did not receive HSTS header
-i9728.co: could not connect to host
-i9multiequipamentos.com.br: could not connect to host
-ia1000.com: could not connect to host
-iacono.com.br: did not receive HSTS header
-iadttaveras.com: could not connect to host
-iain.tech: did not receive HSTS header
-iamcarrico.com: did not receive HSTS header
-iamcryptoki.com: could not connect to host
-iaminashittymood.today: could not connect to host
-iamlbk.com: did not receive HSTS header
-iamlzh.com: could not connect to host
-iamokay.nl: did not receive HSTS header
-iamreubin.co.uk: did not receive HSTS header
-iamsoareyou.se: did not receive HSTS header
-iamveto.com: did not receive HSTS header
-ian.sh: could not connect to host
-ianvisits.co.uk: did not receive HSTS header
-iba.community: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-iban.is: could not connect to host
-ibarf.nl: did not receive HSTS header
-ibase.com: did not receive HSTS header
-ibenchu.com: could not connect to host
-ibericarempresas.es: could not connect to host
-ibericargestoso.es: could not connect to host
-iberiserver.es: did not receive HSTS header
-ibexrepair.co.uk: could not connect to host
-ibiu.xyz: could not connect to host
-ibizatopcharter.com: did not receive HSTS header
-ibkvkk.org: did not receive HSTS header
-ibna.online: could not connect to host
-ibnuwebhost.com: could not connect to host
-ibnw.de: did not receive HSTS header
-ibox.ovh: did not receive HSTS header
-iboy1069.com: did not receive HSTS header
-ibpegasus.tk: could not connect to host
-ibps.blog: did not receive HSTS header
-ibpsrecruitment.co.in: could not connect to host
-ibron.co: could not connect to host
-ibsafrica.co.za: did not receive HSTS header
-ibsglobal.co.za: could not connect to host
-ibsociety.com: did not receive HSTS header
-ibstyle.tk: could not connect to host
-ibutikk.no: did not receive HSTS header
-ic-spares.com: did not receive HSTS header
-icabanken.se: did not receive HSTS header
-icaforsakring.se: did not receive HSTS header
-icake.life: did not receive HSTS header
-icasebr.com.br: could not connect to host
-icasture.top: could not connect to host
-icci.info: could not connect to host
-ice.yt: could not connect to host
-icebat.dyndns.org: could not connect to host
-icebook.co.uk: could not connect to host
-icebound.win: could not connect to host
-icecars.net: could not connect to host
-icecodenew.tk: could not connect to host
-icedream.tech: did not receive HSTS header
-iceiu.com: could not connect to host
-iceloch.com: could not connect to host
-icepink.com.br: could not connect to host
-iceshopy.com: did not receive HSTS header
-icetechy.com: did not receive HSTS header
-icfl.com.br: could not connect to host
-ich-find-den-g.net: could not connect to host
-ich-mach-druck.eu: did not receive HSTS header
-ichglaubesbackt.de: could not connect to host
-ichmachdas.net: did not receive HSTS header
-ichnichtskaufmann.de: could not connect to host
-ichoosebtec.com: did not receive HSTS header
-ichronos.net: did not receive HSTS header
-icity.ly: did not receive HSTS header
-ickerseashop.com: could not connect to host
-iclart.com: did not receive HSTS header
-icloud.net: could not connect to host
-icloud.st: could not connect to host
-icloudlogin.com: did not receive HSTS header
-icnsoft.cf: could not connect to host
-icnsoft.ga: could not connect to host
-icnsoft.me: could not connect to host
-icnsoft.ml: could not connect to host
-icnsoft.org: could not connect to host
-icntorrent.download: could not connect to host
-ico500.com: could not connect to host
-icondoom.nl: could not connect to host
-icountnm.gov: did not receive HSTS header
-icowhitepapers.co: could not connect to host
-icpc2016.in.th: could not connect to host
-icreative.nl: did not receive HSTS header
-icsadviseurs.nl: did not receive HSTS header
-icsfinomornasco.gov.it: could not connect to host
-icsfinomornasco.it: could not connect to host
-ict-concept.nl: could not connect to host
-ict-helpteam.nl: did not receive HSTS header
-ictinforensics.org: could not connect to host
-ictl.eu: did not receive HSTS header
-ictpro.info: did not receive HSTS header
-icusignature.com: could not connect to host
-icys2017.com: did not receive HSTS header
-id-co.in: could not connect to host
-id-conf.com: could not connect to host
-id0-rsa.pub: did not receive HSTS header
-id7.fr: could not connect to host
-idafauziyah.com: could not connect to host
-idbs.com: did not receive HSTS header
-idc.yn.cn: could not connect to host
-idconsult.nl: did not receive HSTS header
-idcrane.com: could not connect to host
-iddconnect.com: could not connect to host
-iddconnect.org: could not connect to host
-ideadozz.hu: could not connect to host
-idealinflatablehire.co.uk: did not receive HSTS header
-idealmoto.com: did not receive HSTS header
-idealmykonos.com: did not receive HSTS header
-idealninajemce.cz: did not receive HSTS header
-idealvenir.com: did not receive HSTS header
-ideapaisajistas.es: could not connect to host
-ideaplus.me: could not connect to host
-ideasenfoto.com: did not receive HSTS header
-ideasmeetingpoint.com: could not connect to host
-ideation-inc.co.jp: could not connect to host
-idedr.com: did not receive HSTS header
-idemo.in: could not connect to host
-identifyme.net: could not connect to host
-identity-hash.online: could not connect to host
-identity.plus: did not receive HSTS header
-identitylabs.uk: could not connect to host
-identitysandbox.gov: could not connect to host
-idesignstudio.de: did not receive HSTS header
-idfc.gov: did not receive HSTS header
-idfy.io: did not receive HSTS header
-idgsupply.com: could not connect to host
-idid.tk: could not connect to host
-idinby.dk: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-idiopolis.org: could not connect to host
-idiot.trade: could not connect to host
-idiotentruppe.de: did not receive HSTS header
-idirect.com.ng: did not receive HSTS header
-idisplay.es: could not connect to host
-idisposable.co.uk: did not receive HSTS header
-idlekernel.com: could not connect to host
-idleleo.com: could not connect to host
-idndx.com: did not receive HSTS header
-idol-bikes.ru: could not connect to host
-idolshop.dk: did not receive HSTS header
-idolshop.me: could not connect to host
-idontexist.me: did not receive HSTS header
-idoo24.com: max-age too low: 2592000
-idranktoomuch.coffee: did not receive HSTS header
-idrinktoomuch.coffee: did not receive HSTS header
-idrottsnaprapaten.se: did not receive HSTS header
-idsafe.co.za: could not connect to host
-idsoccer.com: did not receive HSTS header
-iec.pe: could not connect to host
-iedcommunications.com: did not receive HSTS header
-ieedes.com: did not receive HSTS header
-ieffalot.me: did not receive HSTS header
-ieltslananhtruong.com: could not connect to host
-iemas.azurewebsites.net: did not receive HSTS header
-iemb.cf: could not connect to host
-ierna.com: did not receive HSTS header
-ies.id.lv: could not connect to host
-ietsdoenofferte.nl: did not receive HSTS header
-iewar.com: could not connect to host
-iexpert9.com: did not receive HSTS header
-if-fashion.gr: did not receive HSTS header
-if0.ru: could not connect to host
-ifad.org: did not receive HSTS header
-ifan.ch: could not connect to host
-ifangpei.cn: could not connect to host
-ifangpei.com.cn: could not connect to host
-ifastuniversity.com: did not receive HSTS header
-ifcfg.jp: could not connect to host
-ifcfg.me: could not connect to host
-ifconfig.co: did not receive HSTS header
-ifengge.me: could not connect to host
-ifisher.xyz: could not connect to host
-iflare.de: did not receive HSTS header
-ifleurs.com: could not connect to host
-ifly.pw: could not connect to host
-ifma.edu.br: could not connect to host
-ifreetion.cn: could not connect to host
-ifreetion.com: could not connect to host
-ifroheweihnachten.net: could not connect to host
-ifx.ee: could not connect to host
-ifxnet.com: could not connect to host
-ifxor.com: could not connect to host
-ifyou.live: could not connect to host
-igamingforums.com: did not receive HSTS header
-igaryhe.io: did not receive HSTS header
-igcc.jp: did not receive HSTS header
-igd.chat: could not connect to host
-igforums.com: could not connect to host
-igi-2.com: could not connect to host
-igi.codes: could not connect to host
-igm-be.ch: did not receive HSTS header
-igmt-guinea.com: did not receive HSTS header
-ignat.by: could not connect to host
-ignatisd.gr: did not receive HSTS header
-ignitedmindz.in: could not connect to host
-igsmgmt.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-igule.net: could not connect to host
-ihacker.ai: could not connect to host
-ihakkitekin.com: could not connect to host
-ihatethissh.it: could not connect to host
-ihc.im: did not receive HSTS header
-ihcr.top: did not receive HSTS header
-ihls.world: could not connect to host
-ihls.xyz: could not connect to host
-ihongzu.com: could not connect to host
-ihopeit.works: did not receive HSTS header
-ihrlotto.de: could not connect to host
-ihrnationalrat.ch: could not connect to host
-ihsbsd.me: could not connect to host
-ihsbsd.tk: could not connect to host
-ihuir.men: could not connect to host
-ihzys.com: could not connect to host
-ii5197.co: could not connect to host
-ii6729.co: could not connect to host
-ii6729.com: did not receive HSTS header
-ii6957.co: could not connect to host
-ii9297.co: could not connect to host
-ii9397.com: did not receive HSTS header
-ii9721.com: did not receive HSTS header
-ii9728.co: could not connect to host
-iide.co: did not receive HSTS header
-iideaz.org: could not connect to host
-iilin.com: could not connect to host
-iisjy.cn: did not receive HSTS header
-iispeed.com: did not receive HSTS header
-iiyama-bg.com: did not receive HSTS header
-ijn-dd.nl: could not connect to host
-ijoda.com: did not receive HSTS header
-ijr.com: did not receive HSTS header
-ikarr.com: could not connect to host
-ike.io: did not receive HSTS header
-ikebuku.ro: could not connect to host
-ikenmeyer.com: could not connect to host
-ikenmeyer.eu: could not connect to host
-iki4you.com: max-age too low: 7889238
-ikmx.net: did not receive HSTS header
-ikocik.sk: could not connect to host
-ikon.name: could not connect to host
-ikools.com: could not connect to host
-iktisatbank.com: did not receive HSTS header
-ikudo.top: could not connect to host
-ikumi.us: could not connect to host
-ikuuuu.com: did not receive HSTS header
-ikwilguidobellen.nl: could not connect to host
-ikxkx.com: did not receive HSTS header
-ikymbo.com: did not receive HSTS header
-ikzoekeengoedkopeauto.nl: could not connect to host
-ikzoekjeugdhulp.nl: did not receive HSTS header
-ilc666.com: could not connect to host
-ileat.com: could not connect to host
-ileci.de: could not connect to host
-ilgi.work: could not connect to host
-ilhansubasi.com: did not receive HSTS header
-iliasdeli.nl: did not receive HSTS header
-ilii.me: could not connect to host
-ilikerainbows.co: could not connect to host
-ilikerainbows.co.uk: could not connect to host
-ilikfreshweedstores.com: could not connect to host
-illaadventure.com: could not connect to host
-illative.net: could not connect to host
-illjinx.info: could not connect to host
-illuminatisofficial.org: could not connect to host
-ilmconpm.de: could not connect to host
-iloilofit.org: did not receive HSTS header
-iloli.name: could not connect to host
-ilona.graphics: did not receive HSTS header
-ilovequiz.ru: did not receive HSTS header
-ilpl.me: did not receive HSTS header
-iltisim.ch: did not receive HSTS header
-iltuogiardino.org: could not connect to host
-iluvscotland.co.uk: did not receive HSTS header
-im-design.com.ua: did not receive HSTS header
-ima-tourcoing.fr: did not receive HSTS header
-ima.re: could not connect to host
-imadalin.ro: could not connect to host
-image-cdn.co.uk: could not connect to host
-imageination.co: could not connect to host
-imagenesdedibujosalapizfacilesdehacer.com: could not connect to host
-imagescostumes.com: did not receive HSTS header
-imaginarymakings.me: could not connect to host
-imakepoems.net: could not connect to host
-imanhearts.com: max-age too low: 0
-imanudin.net: did not receive HSTS header
-imarkethost.co.uk: could not connect to host
-imask.ml: could not connect to host
-imbiancatura.milano.it: could not connect to host
-imbrian.org: could not connect to host
-imbushuo.net: did not receive HSTS header
-imedi.it: could not connect to host
-imediasingapore.com: did not receive HSTS header
-imefuniversitario.org: could not connect to host
-imeifacil.com: did not receive HSTS header
-imfromthefuture.com: did not receive HSTS header
-imga.ch: did not receive HSTS header
-imgencrypt.com: could not connect to host
-imguoguo.com: could not connect to host
-imiix.mx: could not connect to host
-imim.pw: could not connect to host
-imine.ru: could not connect to host
-imjiangtao.com: did not receive HSTS header
-imjustcreative.co.uk: did not receive HSTS header
-imlinan.cn: could not connect to host
-imlinan.com: could not connect to host
-imlinan.info: could not connect to host
-imlinan.net: could not connect to host
-imlonghao.com: did not receive HSTS header
-immanuel60.hu: did not receive HSTS header
-immarypoppinsyall.tk: could not connect to host
-immaternity.com: could not connect to host
-immersionwealth.com: could not connect to host
-immersivewebportal.com: could not connect to host
-immigrationdirect.com.au: did not receive HSTS header
-immo-vk.de: could not connect to host
-immobiliarecapitani.com: did not receive HSTS header
-immobilien-wallat.de: could not connect to host
-immoprotect.ca: could not connect to host
-immortals-co.com: did not receive HSTS header
-immoverkauf24.at: did not receive HSTS header
-immoverkauf24.de: did not receive HSTS header
-immunicity.cc: could not connect to host
-immunicity.date: could not connect to host
-immunicity.eu: did not receive HSTS header
-immunicity.host: could not connect to host
-immunicity.info: did not receive HSTS header
-immunicity.online: could not connect to host
-immunicity.press: did not receive HSTS header
-immunicity.rocks: could not connect to host
-immunicity.st: could not connect to host
-immunicity.today: could not connect to host
-immunicity.top: did not receive HSTS header
-immunicity.win: could not connect to host
-immunicity.works: could not connect to host
-immunicity.world: could not connect to host
-imoe.ac.cn: could not connect to host
-imoe.co: could not connect to host
-imolug.org: did not receive HSTS header
-imoner.com: could not connect to host
-imoner.ga: could not connect to host
-imoni-blog.net: could not connect to host
-imoto.me: could not connect to host
-imouyang.com: did not receive HSTS header
-imovel5.com.br: did not receive HSTS header
-impactfestival.be: did not receive HSTS header
-impactplumbingdrainage.com.au: did not receive HSTS header
-impendulo.org: could not connect to host
-imperdin.com: could not connect to host
-imperdintechnologies.com: could not connect to host
-imperialinfosys.com: did not receive HSTS header
-imperialonlinestore.com: did not receive HSTS header
-imperialwebsolutions.com: did not receive HSTS header
-imperioth.com: could not connect to host
-imperiumnova.info: could not connect to host
-impex.com.bd: did not receive HSTS header
-implantologie-dr-loeck.de: did not receive HSTS header
-implicitdenial.com: could not connect to host
-imposingoods.com: could not connect to host
-impresadipulizia.roma.it: could not connect to host
-impressivebison.eu: could not connect to host
-imprintia.eu: could not connect to host
-improvingwp.com: could not connect to host
-improvision.eu: could not connect to host
-impulse-clan.de: could not connect to host
-impulsionsa.com: could not connect to host
-impulsocristiano.com: could not connect to host
-imranraza.in: could not connect to host
-imrejonk.nl: did not receive HSTS header
-imtikai.ml: could not connect to host
-imtikaib.ml: could not connect to host
-imu.li: did not receive HSTS header
-imusic.dk: did not receive HSTS header
-imy.life: could not connect to host
-imyvm.com: did not receive HSTS header
-inandeyes.com: could not connect to host
-inb4.us: could not connect to host
-inbox-group.com: did not receive HSTS header
-inbox.google.com: did not receive HSTS header (error ignored - included regardless)
-inbox.li: did not receive HSTS header
-inboxen.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-inc.wf: could not connect to host
-incendiary-arts.com: could not connect to host
-inceptionradionetwork.com: could not connect to host
-incestporn.tv: could not connect to host
-inchcape-fleet-autobid.co.uk: could not connect to host
-inchomatic.com: did not receive HSTS header
-incomeproshoutr.com: did not receive HSTS header
-incontrixsingle.net: did not receive HSTS header
-increasetestosteronelevels.org: could not connect to host
-incubos.org: could not connect to host
-indarceky.sk: did not receive HSTS header
-indemnityinsurance.online: could not connect to host
-inderagamono.net: could not connect to host
-indesit-training.com: did not receive HSTS header
-index-games.com: could not connect to host
-indexyz.me: could not connect to host
-indianaantlersupply.com: did not receive HSTS header
-indianapolislocksmithinc.com: did not receive HSTS header
-indianjewellery.com: did not receive HSTS header
-indiawise.co.uk: could not connect to host
-indicateurs-flash.fr: did not receive HSTS header
-indiecert.net: could not connect to host
-indieethos.com: did not receive HSTS header
-indiegame.space: could not connect to host
-indiemods.com: did not receive HSTS header
-indien.guide: could not connect to host
-indigitalagency.com: could not connect to host
-indika.pe: could not connect to host
-indilens.com: did not receive HSTS header
-indiraactive.com: could not connect to host
-indiroyunu.com: did not receive HSTS header
-indogerman.de: could not connect to host
-indogermantrade.de: could not connect to host
-indonesian-news.tk: could not connect to host
-indoorplantsexpert.com: could not connect to host
-indoorskiassen.nl: did not receive HSTS header
-indostar303.com: did not receive HSTS header
-indredouglas.me: could not connect to host
-indusfastremit-us.com: could not connect to host
-indust.me: did not receive HSTS header
-industinc.com: did not receive HSTS header
-industreiler.com: could not connect to host
-industreiler.com.br: could not connect to host
-industrialstarter.com: did not receive HSTS header
-industriasrenova.com: did not receive HSTS header
-industrybazar.com: could not connect to host
-inebula.it: could not connect to host
-ineed.com.mt: could not connect to host
-inertianetworks.com: could not connect to host
-inessoftsec.be: could not connect to host
-inevitavelbrasil.com.br: could not connect to host
-inexlog.fr: could not connect to host
-inexpensivecomputers.net: could not connect to host
-infcof.com: did not receive HSTS header
-inffin-tec.de: could not connect to host
-infilock.com: could not connect to host
-infinether.net: could not connect to host
-infinite.hosting: could not connect to host
-infinitegroup.info: did not receive HSTS header
-infinitelightofbeing.org: did not receive HSTS header
-infinitiofaugustaparts.com: could not connect to host
-infinitiofmarinparts.com: could not connect to host
-infinitude.me.uk: could not connect to host
-infinitude.xyz: could not connect to host
-infinitudecloud.com: could not connect to host
-infinitusgaming.eu: could not connect to host
-infinity-freedom.com: could not connect to host
-infinity-freedom.de: could not connect to host
-infinity-lifestyle.de: could not connect to host
-infinity.to: did not receive HSTS header
-infinityengine.org: could not connect to host
-infixegypt.com: did not receive HSTS header
-inflate-a-bubbles.co.uk: did not receive HSTS header
-inflation.ml: could not connect to host
-influencerchampions.com: did not receive HSTS header
-influxus.com: could not connect to host
-info-bay.com: could not connect to host
-info-d-74.com: did not receive HSTS header
-info-sys.tk: could not connect to host
-infobalkans.com: did not receive HSTS header
-infocity-tech.fr: could not connect to host
-infoduv.fr: could not connect to host
-infogrfx.com: did not receive HSTS header
-infomasx.com: could not connect to host
-infonote.ca: did not receive HSTS header
-infopagina.es: did not receive HSTS header
-infopulsa.com: could not connect to host
-infopuntzorg.nl: did not receive HSTS header
-inforichjapan.com: did not receive HSTS header
-inforisposte.com: did not receive HSTS header
-informaciondeciclismo.com: could not connect to host
-informatik.zone: did not receive HSTS header
-infos-generation.com: did not receive HSTS header
-infosec.pizza: could not connect to host
-infosec.rip: could not connect to host
-infosimmo.com: did not receive HSTS header
-infosoph.org: did not receive HSTS header
-infotelecharge.com: could not connect to host
-infotrac.net: did not receive HSTS header
-infovae-idf.com: could not connect to host
-infoweb.ee: did not receive HSTS header
-infoworm.org: could not connect to host
-infoyaracuy.com: did not receive HSTS header
-infr.red: did not receive HSTS header
-infra-se.com: could not connect to host
-infra.press: could not connect to host
-infradio.am: could not connect to host
-infranix.eu: max-age too low: 7360000
-infruction.com: could not connect to host
-infstudios.nl: could not connect to host
-infura.co.th: could not connect to host
-infuse-mn.gov: did not receive HSTS header
-infuzeit.com.au: did not receive HSTS header
-ingalabs.hu: could not connect to host
-ingalls.run: could not connect to host
-ingatlanneked.hu: could not connect to host
-ingatlanrobot.hu: did not receive HSTS header
-ingerhy.com: could not connect to host
-ingesol.fr: did not receive HSTS header
-ingfreelancer.com: could not connect to host
-ingredientdaddy.ro: could not connect to host
-ingresscode.cn: could not connect to host
-ingridbai.me: could not connect to host
-ingwaz.org: could not connect to host
-inh.gob.ve: did not receive HSTS header
-inhelix.com: could not connect to host
-inheritestate.com: did not receive HSTS header
-inhive.group: did not receive HSTS header
-iniiter.com: could not connect to host
-inin.gq: could not connect to host
-iningrui.com: did not receive HSTS header
-inios.fr: could not connect to host
-initialization.tech: could not connect to host
-initq.net: could not connect to host
-inixal.com: did not receive HSTS header
-injertoshorticolas.com: did not receive HSTS header
-injuryhotline.net: did not receive HSTS header
-injurylawyer.world: did not receive HSTS header
-injust.cf: could not connect to host
-injust.eu.org: could not connect to host
-injust.ga: could not connect to host
-injust.gq: could not connect to host
-injust.me: could not connect to host
-injust.ml: could not connect to host
-injust.tk: could not connect to host
-inked-guy.de: could not connect to host
-inkedguy.de: could not connect to host
-inkihost.com: did not receive HSTS header
-inkontriamoci.com: did not receive HSTS header
-inksupply.com: did not receive HSTS header
-inku.ovh: did not receive HSTS header
-inkvisual.tk: could not connect to host
-inleaked.com: could not connect to host
-inmag.pl: could not connect to host
-inme.ga: did not receive HSTS header
-inmoodforsex.com: could not connect to host
-inmusrv.de: did not receive HSTS header
-innatocol.com: did not receive HSTS header
-innit.be: could not connect to host
-innobatics.com: did not receive HSTS header
-innoflex.pl: did not receive HSTS header
-innoloop.com: did not receive HSTS header
-innophate-security.com: could not connect to host
-innophate-security.nl: could not connect to host
-innovacoachgroup.com: could not connect to host
-innovamag.ca: did not receive HSTS header
-innovateohio.gov: could not connect to host
-innovationgarage.it: could not connect to host
-innovativebuildingsolutions.co.za: could not connect to host
-innovativeideaz.org: could not connect to host
-innoventure.de: could not connect to host
-innovere.co.uk: did not receive HSTS header
-innvision.net: did not receive HSTS header
-inobun.jp: could not connect to host
-inorder.website: could not connect to host
-inovat.ma: did not receive HSTS header
-inox.io: did not receive HSTS header
-inoxandco.com: could not connect to host
-inoxio.com: did not receive HSTS header
-inoxio.de: did not receive HSTS header
-inplacers.ru: did not receive HSTS header
-input.sh: did not receive HSTS header
-inputmag.com: did not receive HSTS header
-inqorp.ca: could not connect to host
-inquisitive.io: could not connect to host
-insane-bullets.com: could not connect to host
-insane.zone: could not connect to host
-insanelyelegant.com: did not receive HSTS header
-inschrijfformulier.com: could not connect to host
-inscript.pl: could not connect to host
-inserzioni-ticino.ch: did not receive HSTS header
-insideofgaming.de: could not connect to host
-insightera.co.th: did not receive HSTS header
-insite-feedback.com: could not connect to host
-insofttransfer.com: could not connect to host
-insolent.ch: could not connect to host
-insolved.com: could not connect to host
-insouciant.org: could not connect to host
-insping.com: did not receive HSTS header
-inspirationalquotesuk.co.uk: could not connect to host
-inspirationconcepts.nl: did not receive HSTS header
-inspire-av.com: did not receive HSTS header
-inspiroinc.com: could not connect to host
-insrt.uk: did not receive HSTS header
-inst.mobi: could not connect to host
-instacart.com: did not receive HSTS header
-instagib.info: did not receive HSTS header
-instagraph.cn: could not connect to host
-instalador-electrico.com: could not connect to host
-instant-hack.com: did not receive HSTS header
-instant-hack.io: could not connect to host
-instantdev.io: could not connect to host
-instantluxe.cn: could not connect to host
-instantluxe.co.uk: could not connect to host
-instantluxe.com: could not connect to host
-instantluxe.de: could not connect to host
-instantluxe.it: could not connect to host
-instantphotocamera.com: could not connect to host
-instantphotoprinter.com: could not connect to host
-instantsubs.de: could not connect to host
-instaquiz.ru: could not connect to host
-instasex.ch: could not connect to host
-instawi.com: could not connect to host
-instinctive.io: did not receive HSTS header
-institutoflordelavida.com: could not connect to host
-institutulcultural.ro: did not receive HSTS header
-instruktor.io: could not connect to host
-insurance: could not connect to host
-insurancesloans.com: could not connect to host
-insurethebox.tk: could not connect to host
-insurgentsmustdie.com: could not connect to host
-int-ext-design.fr: could not connect to host
-int-ma.in: could not connect to host
-intae.it: did not receive HSTS header
-integraelchen.de: could not connect to host
-integratedintegrations.xyz: could not connect to host
-integrationinc.com: did not receive HSTS header
-integraxor.com.tw: could not connect to host
-integrityingovernmentidaho.com: could not connect to host
-integrogroup.com: could not connect to host
-intel.gov: did not receive HSTS header
-intel.li: did not receive HSTS header
-intelbet.es: did not receive HSTS header
-intelbet.ro: did not receive HSTS header
-intelhost.net: max-age too low: 0
-intelldynamics.com: could not connect to host
-intelligentnegotiator.com: did not receive HSTS header
-intelmed.info: did not receive HSTS header
-inter-culinarium.com: did not receive HSTS header
-interabbit.co: could not connect to host
-interabbit.com: did not receive HSTS header
-interaffairs.com: could not connect to host
-interboursegeneva.ch: did not receive HSTS header
-intercom.com: did not receive HSTS header
-intercom.io: did not receive HSTS header
-interessengemeinschaft-pregelstrasse.tk: could not connect to host
-interessiert-uns.net: could not connect to host
-interference.io: did not receive HSTS header
-interfesse.net: could not connect to host
-interfloraservices.co.uk: could not connect to host
-intergenx.co.uk: could not connect to host
-intergenx.com: could not connect to host
-intergenx.org: could not connect to host
-intergenx.org.uk: could not connect to host
-interguard.net: could not connect to host
-interhosts.co.za: could not connect to host
-interim-cto.de: could not connect to host
-interiorcheapo.com: could not connect to host
-interiorprofesional.com.ar: did not receive HSTS header
-interiortradingco.com.au: could not connect to host
-interleucina.org: could not connect to host
-interlocal.co.uk: could not connect to host
-interlun.com: could not connect to host
-intermezzo-emmerich.nl: could not connect to host
-intern.tax: could not connect to host
-internacao.com: did not receive HSTS header
-internaldh.com: could not connect to host
-internaluse.net: did not receive HSTS header
-international-books.org: did not receive HSTS header
-international-nash-day.com: max-age too low: 0
-internationalschoolnewyork.com: could not connect to host
-internaut.co.za: could not connect to host
-internetanbieter-experte.de: did not receive HSTS header
-internetbugbounty.org: did not receive HSTS header
-internetcasinos.de: could not connect to host
-internetcensus.org: could not connect to host
-internetdentalalliance.com: did not receive HSTS header
-internetgardener.co.uk: could not connect to host
-internethealthreport.org: did not receive HSTS header
-internethering.de: did not receive HSTS header
-internetmusicexchange.com: could not connect to host
-internetradiocharts.de: could not connect to host
-internshipandwork.com: did not receive HSTS header
-internshipandwork.ru: could not connect to host
-intersectraven.net: could not connect to host
-interspot.nl: could not connect to host
-interstellarhyperdrive.com: could not connect to host
-interviewpipeline.co.uk: could not connect to host
-intervisteperstrada.com: could not connect to host
-intexplore.org: could not connect to host
-intim-uslugi-kazan.net: could not connect to host
-intimastoreatacado.com.br: could not connect to host
-intimateperrierjouet.com: could not connect to host
-intimici.com.br: could not connect to host
-intimtoy.com.ua: did not receive HSTS header
-intl-webs.com: could not connect to host
-into.technology: did not receive HSTS header
-intocities.de: could not connect to host
-intr0.com: did not receive HSTS header
-intr0.tk: could not connect to host
-intracom.com: did not receive HSTS header
-intranetcrowd.com: could not connect to host
-intranetsec-regionra.fr: did not receive HSTS header
-intranetsec.fr: could not connect to host
-intreaba.xyz: could not connect to host
-introes.com: could not connect to host
-introvertedtravel.space: max-age too low: 0
-intrp.net: could not connect to host
-intune.life: could not connect to host
-invasmani.com: could not connect to host
-invenio.software: could not connect to host
-inverselink.com: could not connect to host
-inversioneseconomicas.com: could not connect to host
-inversionesgalindo.com: could not connect to host
-investcountry.com: could not connect to host
-investforum.net: could not connect to host
-investigazione.milano.it: could not connect to host
-investigazione.roma.it: could not connect to host
-investingdiary.cn: could not connect to host
-investinghacker.com.au: could not connect to host
-investingtrader.net: could not connect to host
-investorloanshub.com: could not connect to host
-investosure.com: could not connect to host
-invictusmc.uk: could not connect to host
-invinsec.cloud: could not connect to host
-invis.net: did not receive HSTS header
-invisionita.com: could not connect to host
-invitation-factory.tk: could not connect to host
-invite24.pro: could not connect to host
-invitemember.com: did not receive HSTS header
-invoicefinance.com: did not receive HSTS header
-invoicefinance.nl: did not receive HSTS header
-invoicehippo.nl: did not receive HSTS header
-invuelto.com: did not receive HSTS header
-invuite.com: did not receive HSTS header
-inxtravel.com.br: could not connect to host
-inzestfreunde.de: could not connect to host
-ioasync.com: did not receive HSTS header
-iobint.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-iocp.org: did not receive HSTS header
-iodev.nl: did not receive HSTS header
-iodice.org: did not receive HSTS header
-iodine.com: did not receive HSTS header
-iodu.re: could not connect to host
-ioerror.us: did not receive HSTS header
-ioiart.eu: could not connect to host
-iojo.net: did not receive HSTS header
-iolife.dk: did not receive HSTS header
-ionas-law.ro: did not receive HSTS header
-ionc.ca: could not connect to host
-ionicisere.com: could not connect to host
-ionote.me: could not connect to host
-ionovia.de: did not receive HSTS header
-iopool.us: could not connect to host
-iora.fr: could not connect to host
-ios11018.com: could not connect to host
-iosjailbreakiphone.com: could not connect to host
-iosmods.com: did not receive HSTS header
-iosprivacy.com: did not receive HSTS header
-iostips.ru: could not connect to host
-iotekha.tv: did not receive HSTS header
-iotfen.com: could not connect to host
-iotsms.io: could not connect to host
-ip-blacklist.net: did not receive HSTS header
-ip.or.at: could not connect to host
-ip2country.info: did not receive HSTS header
-ip3.world: could not connect to host
-ip6.im: did not receive HSTS header
-ipad.li: could not connect to host
-ipadportfolioapp.com: did not receive HSTS header
-ipawind.com: did not receive HSTS header
-ipbill.org.uk: could not connect to host
-ipcfg.me: could not connect to host
-ipconsulting.se: could not connect to host
-ipdsols.co.za: could not connect to host
-ipfp.pl: did not receive HSTS header
-ipfs.ink: did not receive HSTS header
-iphonechina.net: could not connect to host
-iphoneportfolioapp.com: did not receive HSTS header
-iphonote.com: did not receive HSTS header
-ipid.me: could not connect to host
-ipintel.io: did not receive HSTS header
-iplabs.de: did not receive HSTS header
-iplife.cn: could not connect to host
-iplog.info: could not connect to host
-ipmimagazine.com: did not receive HSTS header
-ipmotion.ca: could not connect to host
-ipnetworking.net: could not connect to host
-ipo-times.com: could not connect to host
-iprody.com: could not connect to host
-ipsilon-project.org: did not receive HSTS header
-ipslsig.org: could not connect to host
-ipssl.li: could not connect to host
-ipstream.it: did not receive HSTS header
-iptel.ro: could not connect to host
-iptvmakedonija.mk: did not receive HSTS header
-ipuservicedesign.com: could not connect to host
-ipv6.gr: did not receive HSTS header
-ipv6.watch: did not receive HSTS header
-ipv6alizer.se: did not receive HSTS header
-ipv6cloud.club: could not connect to host
-ipv6demo.de: could not connect to host
-ipv6only.network: could not connect to host
-ipv6wallofshame.com: could not connect to host
-ipv8.net: did not receive HSTS header
-ipvsec.nl: could not connect to host
-iqcn.co: could not connect to host
-ir-saitama.com: could not connect to host
-iran-geo.com: did not receive HSTS header
-iran-poll.org: could not connect to host
-irandp.net: could not connect to host
-iranianlawschool.com: could not connect to host
-iraqidinar.org: did not receive HSTS header
-irazimina.ru: did not receive HSTS header
-irccloud.com: did not receive HSTS header
-irdvb.com: could not connect to host
-iready.ro: could not connect to host
-irelandesign.com: could not connect to host
-irenekauer.com: could not connect to host
-irgwebsites.com: did not receive HSTS header
-iridiumflare.de: could not connect to host
-irinkeby.nu: could not connect to host
-irische-segenswuensche.info: could not connect to host
-irisdesideratum.com: could not connect to host
-irisdina.de: could not connect to host
-irish.radio: could not connect to host
-irishmusic.nu: could not connect to host
-irishradioplayer.radio: could not connect to host
-irland.guide: could not connect to host
-iro-iro.xyz: did not receive HSTS header
-irob.co.jp: did not receive HSTS header
-iron-guard.net: did not receive HSTS header
-ironbelly.pro: could not connect to host
-irondaleirregulars.com: did not receive HSTS header
-irose.am: could not connect to host
-irugs.ch: did not receive HSTS header
-irugs.co.uk: did not receive HSTS header
-irugs.com.sg: did not receive HSTS header
-irukandjilabs.com: could not connect to host
-irun-telecom.co.uk: could not connect to host
-irvinepa.org: max-age too low: 10540800
-is-going-to-rickroll.me: did not receive HSTS header
-is-in-hyper.space: could not connect to host
-is-sw.net: did not receive HSTS header
-isaacpartnership.com: did not receive HSTS header
-isarklinikum.de: did not receive HSTS header
-isastylish.com: could not connect to host
-isc2chapter-cny.org: could not connect to host
-ischool.co.jp: did not receive HSTS header
-isdecolaop.nl: could not connect to host
-isdf.me: could not connect to host
-isdown.cz: could not connect to host
-isdr-bukavu.net: did not receive HSTS header
-isef-eg.com: could not connect to host
-iservicio.com.mx: could not connect to host
-iseulde.com: could not connect to host
-isfriday.com: could not connect to host
-ishadowsocks.ltd: could not connect to host
-ishangirdhar.com: could not connect to host
-ishillaryclintoninprisonyet.com: could not connect to host
-ishland.com: could not connect to host
-ishome.org: could not connect to host
-ishtarfreya.com: did not receive HSTS header
-isidom.fr: did not receive HSTS header
-isipulsa.web.id: did not receive HSTS header
-isis.cloud: could not connect to host
-isisfighters.info: could not connect to host
-isistomie.com: could not connect to host
-isitamor.pm: could not connect to host
-isitnuclearwaryet.com: could not connect to host
-isitpatchtuesday.com: did not receive HSTS header
-isitrest.info: could not connect to host
-isitup.org: did not receive HSTS header
-iskai.net: did not receive HSTS header
-iskanderbroere.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-iskkk.com: could not connect to host
-iskkk.net: could not connect to host
-islamonline.net: did not receive HSTS header
-islandlakeil.gov: could not connect to host
-islandpumpandtank.com: did not receive HSTS header
-islandzero.net: did not receive HSTS header
-islazia.fr: could not connect to host
-islief.com: could not connect to host
-islykaithecutest.cf: could not connect to host
-islykaithecutest.ml: could not connect to host
-ismadgeintrouble.com: could not connect to host
-ismailkarsli.com: could not connect to host
-ismetroonfiretoday.com: did not receive HSTS header
-isntall.us: did not receive HSTS header
-iso27032.com: did not receive HSTS header
-isoface33.fr: did not receive HSTS header
-isogen5.com: could not connect to host
-isogram.nl: could not connect to host
-isolde.com: could not connect to host
-isondo.com: could not connect to host
-isoroc-nidzica.pl: could not connect to host
-ispo.com.tw: did not receive HSTS header
-ispringcloud.ru: did not receive HSTS header
-ispsoft.pro: could not connect to host
-ispweb.es: did not receive HSTS header
-isqrl.de: did not receive HSTS header
-israkurort.com: could not connect to host
-issaias.net: did not receive HSTS header
-isscouncil.com: could not connect to host
-isslshop.com: could not connect to host
-issoexiste.com: did not receive HSTS header
-issuesofconcern.in: did not receive HSTS header
-ist-intim.de: could not connect to host
-ist.cm: could not connect to host
-istanbul-bocekilaclama.com: could not connect to host
-istanbultravelguide.info: could not connect to host
-istaspirtslietas.lv: did not receive HSTS header
-istgame.com: could not connect to host
-isthedoorlocked.com: could not connect to host
-isthefieldcontrolsystemdown.com: could not connect to host
-istherrienstillcoach.com: could not connect to host
-isthisus.org: could not connect to host
-istore.lt: did not receive HSTS header
-istrazivac-istine.com: did not receive HSTS header
-isyu.xyz: could not connect to host
-isz-berlin.de: could not connect to host
-iszy.me: did not receive HSTS header
-it-cave.com: could not connect to host
-it-enthusiasts.tech: could not connect to host
-it-go.net: did not receive HSTS header
-it-labor.info: did not receive HSTS header
-it-schwerin.de: could not connect to host
-it-seems-to.work: could not connect to host
-it-sysoft.com: did not receive HSTS header
-itad.top: could not connect to host
-italianjourneys.com.au: did not receive HSTS header
-itblog.pp.ua: could not connect to host
-itchimes.com: did not receive HSTS header
-itchybrainscentral.com: could not connect to host
-itdo.com: did not receive HSTS header
-itds-consulting.com: could not connect to host
-itds-consulting.cz: could not connect to host
-itds-consulting.eu: could not connect to host
-itechgeek.com: did not receive HSTS header
-iteke.ml: could not connect to host
-iteke.tk: could not connect to host
-items.lv: did not receive HSTS header
-itemton.com: could not connect to host
-iterader.com: could not connect to host
-iterasoft.de: did not receive HSTS header
-itfaq.nl: did not receive HSTS header
-itfensi.net: could not connect to host
-itforcc.com: did not receive HSTS header
-itforge.nl: did not receive HSTS header
-itgirls.rs: could not connect to host
-itgm-consultants.com: did not receive HSTS header
-ithedgehog.co.uk: could not connect to host
-ithelfer.ch: did not receive HSTS header
-itinsight.hu: did not receive HSTS header
-itinthebubble.com: could not connect to host
-itiomassagem.com.br: did not receive HSTS header
-itisjustnot.cricket: could not connect to host
-itludens.com: could not connect to host
-itmanie.cz: did not receive HSTS header
-itmx.cc: could not connect to host
-itnews-bg.com: did not receive HSTS header
-itogoyomi.com: did not receive HSTS header
-itos.asia: did not receive HSTS header
-itos.pl: did not receive HSTS header
-itpol.dk: did not receive HSTS header
-itpro-mg.de: could not connect to host
-itproject.guru: could not connect to host
-itqh0pk67wngbob5suh-c7glbmvtfa0dqhokufs.com: did not receive HSTS header
-itrack.in.th: could not connect to host
-itrendyworld.com: could not connect to host
-itriskltd.com: did not receive HSTS header
-itruth.tk: could not connect to host
-its-schindler.de: could not connect to host
-its-v.de: could not connect to host
-its4living.com: could not connect to host
-itsadog.co.uk: did not receive HSTS header
-itsagadget.com: did not receive HSTS header
-itsanicedoor.co.uk: could not connect to host
-itsasaja.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-itsatrap.nl: could not connect to host
-itsecurityassurance.pw: could not connect to host
-itsense.fr: did not receive HSTS header
-itsg-faq.de: could not connect to host
-itshost.ru: could not connect to host
-itskayla.com: did not receive HSTS header
-itsmejohn.org: could not connect to host
-itsok.link: could not connect to host
-itspartytimesweetinflations.com: could not connect to host
-itstudio.gr: max-age too low: 0
-itsupport-luzern.ch: could not connect to host
-ittop-gabon.com: could not connect to host
-itu2015.de: could not connect to host
-itxn.cn: could not connect to host
-ius.io: did not receive HSTS header
-iuscommunity.org: did not receive HSTS header
-iusedtosmoke.com: did not receive HSTS header
-ivact.co.jp: did not receive HSTS header
-ivais.mx: could not connect to host
-ivanaleksandrov.net: did not receive HSTS header
-ivanilla.org: could not connect to host
-ivanpolchenko.com: could not connect to host
-ivi-co.com: max-age too low: 0
-ivi-fertilite.fr: max-age too low: 0
-ivi-fertility.com: max-age too low: 0
-ivi-fruchtbarkeit.de: max-age too low: 0
-ivi.com.ar: max-age too low: 0
-ivi.com.pa: max-age too low: 0
-ivi.es: max-age too low: 0
-ivi.mx: did not receive HSTS header
-ivi.net.br: max-age too low: 0
-ivi.pt: max-age too low: 0
-ivinet.cl: max-age too low: 0
-ivitalia.it: max-age too low: 0
-ivk.website: could not connect to host
-ivklombard.ru: could not connect to host
-ivocopro.de: could not connect to host
-ivoid.cf: could not connect to host
-ivoryonsunset.com: could not connect to host
-ivotemahdi.com: could not connect to host
-ivxv.ee: could not connect to host
-iwannarefill.com: could not connect to host
-iwantexchange.com: could not connect to host
-iwantpayments.com: could not connect to host
-iwanttrack.com: could not connect to host
-iweathernet.com: did not receive HSTS header
-iwebolutions.com: did not receive HSTS header
-iwex.swiss: could not connect to host
-iwilcox.me.uk: could not connect to host
-iworos.com: did not receive HSTS header
-iwos.io: did not receive HSTS header
-iwpbk.com: could not connect to host
-iww.mx: could not connect to host
-iwyc.cn: could not connect to host
-ix.mk: did not receive HSTS header
-ix8.ru: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-ixanis.net: could not connect to host
-ixec2.tk: could not connect to host
-ixh.me: did not receive HSTS header
-ixix.org: could not connect to host
-ixnext.de: did not receive HSTS header
-iyinolaashafa.com: could not connect to host
-iyoumu.top: could not connect to host
-iyuanbao.net: did not receive HSTS header
-izaakbeekman.com: max-age too low: 2592000
-izanah.com: max-age too low: 604800
-izdiwho.com: did not receive HSTS header
-izevg.ru: could not connect to host
-izolight.ch: could not connect to host
-izonemart.com: did not receive HSTS header
-izoox.com: did not receive HSTS header
-izzzorgconcerten.nl: could not connect to host
-j-eck.nl: could not connect to host
-j-elliott.co.uk: could not connect to host
-j-lsolutions.com: could not connect to host
-j-rickroll-a.pw: could not connect to host
-j-softlab.com: did not receive HSTS header
-j00228.com: could not connect to host
-j0m.de: could not connect to host
-j0ng.xyz: could not connect to host
-j15t98j.co.uk: did not receive HSTS header
-j2ee.cz: could not connect to host
-j30365.com: could not connect to host
-j32661.com: could not connect to host
-j32662.com: could not connect to host
-j5197.co: could not connect to host
-j6729.co: could not connect to host
-j6729.com: did not receive HSTS header
-j6957.co: could not connect to host
-j6957.com: did not receive HSTS header
-j70101.com: could not connect to host
-j70102.com: could not connect to host
-j70103.com: could not connect to host
-j70104.com: could not connect to host
-j70105.com: could not connect to host
-j7051.com: could not connect to host
-j7052.com: could not connect to host
-j7053.com: could not connect to host
-j81365.com: did not receive HSTS header
-j81818.com: did not receive HSTS header
-j82365.com: did not receive HSTS header
-j8y.de: could not connect to host
-j9297.co: could not connect to host
-j9512.com: could not connect to host
-j9517.com: could not connect to host
-j95aa.com: could not connect to host
-j95bb.com: could not connect to host
-j9721.com: did not receive HSTS header
-j9728.co: could not connect to host
-ja-dyck.de: could not connect to host
-ja-publications.com: did not receive HSTS header
-ja.md: did not receive HSTS header
-jaan.su: could not connect to host
-jaaxypro.com: could not connect to host
-jabba.homelinux.org: could not connect to host
-jabbas.eu: could not connect to host
-jaccblog.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-jack2celebrities.com: could not connect to host
-jackalworks.com: could not connect to host
-jackdelik.de: did not receive HSTS header
-jackdoan.com: did not receive HSTS header
-jackfahnestock.com: could not connect to host
-jackfletcher.me: did not receive HSTS header
-jackingramnissanparts.com: could not connect to host
-jackjack.ga: could not connect to host
-jackops.com: could not connect to host
-jackrusselterrier.com.br: could not connect to host
-jacksonvillestation.com: did not receive HSTS header
-jacksutton.info: could not connect to host
-jackyyf.com: could not connect to host
-jacobdevans.com: did not receive HSTS header
-jacobparry.ca: did not receive HSTS header
-jacobphono.com: could not connect to host
-jaculus.eu: did not receive HSTS header
-jadara.info: could not connect to host
-jadehotel.nl: could not connect to host
-jahliveradio.com: did not receive HSTS header
-jahmusic.net: did not receive HSTS header
-jaideeyoga.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-jaimechanaga.com: could not connect to host
-jaimepumarejo.com: did not receive HSTS header
-jaion.ml: could not connect to host
-jaion.tech: could not connect to host
-jaion.xyz: could not connect to host
-jakebeardsley.com: could not connect to host
-jakenbake.com: could not connect to host
-jaketremper.com: did not receive HSTS header
-jakewales.com: could not connect to host
-jakewalker.xyz: did not receive HSTS header
-jakincode.army: could not connect to host
-jakobdenlinger.com: could not connect to host
-jaksch.biz: did not receive HSTS header
-jaksel.id: could not connect to host
-jaksi.io: could not connect to host
-jakub-boucek.cz: could not connect to host
-jakubarbet.eu: could not connect to host
-jakubboucek.cz: could not connect to host
-jamanji.com.ng: could not connect to host
-jamaware.org: could not connect to host
-jamberry.com.mx: could not connect to host
-jamberrynails.co.uk: did not receive HSTS header
-james-digital.com: did not receive HSTS header
-james.guru: could not connect to host
-james.je: could not connect to host
-jamesandanneke.com: did not receive HSTS header
-jamesandpame.la: did not receive HSTS header
-jamesbradach.com: did not receive HSTS header
-jamesburton.london: could not connect to host
-jamesbywater.co.uk: could not connect to host
-jamesbywater.com: could not connect to host
-jamesbywater.me: could not connect to host
-jamesbywater.me.uk: could not connect to host
-jamesbywater.uk: could not connect to host
-jamesclark.com: did not receive HSTS header
-jamesconroyfinn.com: did not receive HSTS header
-jamesdoell.com: could not connect to host
-jamesdoylephoto.com: did not receive HSTS header
-jamesevans.is: could not connect to host
-jamesf.xyz: could not connect to host
-jamesforman.co.nz: did not receive HSTS header
-jameshale.me: could not connect to host
-jamesheald.com: could not connect to host
-jamesl.ml: could not connect to host
-jamesmaurer.com: did not receive HSTS header
-jamesmorrison.me: did not receive HSTS header
-jamesrains.com: could not connect to host
-jamesrobertson.net: did not receive HSTS header
-jamesrobertson.sh: could not connect to host
-jamestmart.in: could not connect to host
-jamesusandra.com: did not receive HSTS header
-jamielarter.ca: could not connect to host
-jamiepeters.nl: did not receive HSTS header
-jamjestsimon.pl: could not connect to host
-jamourtney.com: could not connect to host
-jamyeprice.com: did not receive HSTS header
-jan-cermak.cz: did not receive HSTS header
-jan-daniels.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-jan-rieger.de: could not connect to host
-jan27.org: did not receive HSTS header
-janada.cz: could not connect to host
-janario.me: could not connect to host
-jancukers.host: could not connect to host
-janduchene.ch: could not connect to host
-janebondsurety.com: did not receive HSTS header
-jangho.me: could not connect to host
-janheidler.dynv6.net: could not connect to host
-janking.de: could not connect to host
-janmachynka.cz: could not connect to host
-janmg.com: could not connect to host
-jannisfink.de: did not receive HSTS header
-janoberst.com: did not receive HSTS header
-janosh.com: did not receive HSTS header
-jansen-schilders.nl: did not receive HSTS header
-janssen.fm: could not connect to host
-janssenwigman.nl: could not connect to host
-janus-engineering.de: did not receive HSTS header
-janverlaan.nl: did not receive HSTS header
-janz.online: could not connect to host
-jap-nope.de: could not connect to host
-japan4you.org: could not connect to host
-japanbaths.com: did not receive HSTS header
-japaneseemoticons.org: did not receive HSTS header
-japanesenames.biz: did not receive HSTS header
-japangids.nl: could not connect to host
-japanwide.net: did not receive HSTS header
-jape.today: could not connect to host
-japlex.com: could not connect to host
-japon-japan.com: did not receive HSTS header
-jaqen.ch: could not connect to host
-jaquishbiomedical.com: did not receive HSTS header
-jar.io: could not connect to host
-jardin-exotique-rennes.fr: did not receive HSTS header
-jardinderline.ch: could not connect to host
-jardiniersduminotaure.fr: could not connect to host
-jardins-utopie.net: did not receive HSTS header
-jaredbates.net: did not receive HSTS header
-jaredeberle.org: did not receive HSTS header
-jario.com.br: could not connect to host
-jarivisual.com: could not connect to host
-jarl.ninja: could not connect to host
-jarnail.ca: did not receive HSTS header
-jaroslavc.eu: could not connect to host
-jaroslavtrsek.cz: did not receive HSTS header
-jarrodcastaing.com: did not receive HSTS header
-jarrodcastaing.com.au: did not receive HSTS header
-jarsater.com: could not connect to host
-jartza.org: could not connect to host
-jasl.works: could not connect to host
-jasmineconseil.com: did not receive HSTS header
-jasminefields.net: did not receive HSTS header
-jasmyn.tk: could not connect to host
-jasonadam.de: did not receive HSTS header
-jasoncosper.com: did not receive HSTS header
-jasonian-photo.com: could not connect to host
-jasonmili.online: could not connect to host
-jasonradin.com: could not connect to host
-jasonrobinson.me: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-jasonroe.me: did not receive HSTS header
-jasonsansone.com: could not connect to host
-jasonwindholz.com: could not connect to host
-jastoria.pl: did not receive HSTS header
-jateng.press: could not connect to host
-jav-collective.com: could not connect to host
-java-board.com: could not connect to host
-javachip.win: could not connect to host
-javalestari.com: could not connect to host
-javan.ga: could not connect to host
-javascriptlab.fr: could not connect to host
-javaweb.site: could not connect to host
-javelinsms.com: could not connect to host
-javiermixdjs.com: could not connect to host
-javik.net: did not receive HSTS header
-javilacat.info: could not connect to host
-jawn.ca: could not connect to host
-jawnelodzkie.org.pl: could not connect to host
-jaxageto.de: did not receive HSTS header
-jayblock.com: did not receive HSTS header
-jaycouture.com: could not connect to host
-jaylen.com.ar: did not receive HSTS header
-jayna.design: could not connect to host
-jaypandit.me: could not connect to host
-jayschulman.com: could not connect to host
-jayscoaching.com: could not connect to host
-jayshao.com: did not receive HSTS header
-jazerxx.com: could not connect to host
-jazzfeet.co.uk: could not connect to host
-jazzinutrecht.info: could not connect to host
-jb159632.com: max-age too low: 0
-jballelectronics.com: did not receive HSTS header
-jbelien.be: did not receive HSTS header
-jbelien.photography: could not connect to host
-jbeta.is: could not connect to host
-jbj.co.uk: did not receive HSTS header
-jbn.mx: could not connect to host
-jbrowndesign.me: could not connect to host
-jcaicedo.tk: could not connect to host
-jccars-occasions.be: could not connect to host
-jcch.de: could not connect to host
-jccrew.org: could not connect to host
-jcf-office.com: did not receive HSTS header
-jcit.xyz: could not connect to host
-jcolideles.com: could not connect to host
-jcom-communication-system.biz: could not connect to host
-jcor.me: could not connect to host
-jcoscia.com: could not connect to host
-jcra.net: could not connect to host
-jcraft.us: could not connect to host
-jcsdevelopment.com: did not receive HSTS header
-jctf.io: could not connect to host
-jcvidroseespelhos.com.br: did not receive HSTS header
-jdav-leipzig.de: could not connect to host
-jdcdirectsales.com: could not connect to host
-jdcdirectsales.com.ph: could not connect to host
-jdcgroup.com.ph: could not connect to host
-jdfk.net: could not connect to host
-jdgonzalez95.com: could not connect to host
-jdh8.org: did not receive HSTS header
-jdoiron.me: did not receive HSTS header
-jdsf.tk: could not connect to host
-je.net.cn: could not connect to host
-jean-remy.ch: could not connect to host
-jeancafe.ddns.net: could not connect to host
-jecho.cn: could not connect to host
-jecurranpc.com: did not receive HSTS header
-jedayoshi.me: could not connect to host
-jedayoshi.tk: did not receive HSTS header
-jeemain.org: could not connect to host
-jeerbl.com: did not receive HSTS header
-jeff.is: could not connect to host
-jeff393.com: could not connect to host
-jeffcasavant.com: did not receive HSTS header
-jeffersonkyattorney.gov: did not receive HSTS header
-jeffersonregan.org: could not connect to host
-jeffhuxley.com: could not connect to host
-jeffmcneill.com: did not receive HSTS header
-jeffreymagee.com: did not receive HSTS header
-jeffrhinelander.com: did not receive HSTS header
-jehovahsays.net: could not connect to host
-jeil-makes.co.kr: could not connect to host
-jelleschneiders.com: did not receive HSTS header
-jellow.nl: did not receive HSTS header
-jelmer.co.uk: could not connect to host
-jemigjordy.nl: did not receive HSTS header
-jemoticons.com: did not receive HSTS header
-jena.space: could not connect to host
-jenjoit.de: could not connect to host
-jenkinscountyga.gov: could not connect to host
-jennedebleser.com: did not receive HSTS header
-jenniferchan.id.au: could not connect to host
-jennifercherniack.com: did not receive HSTS header
-jenniferlucia.com: did not receive HSTS header
-jennifermason.eu: could not connect to host
-jennifertilly.tk: could not connect to host
-jennybeaned.com: did not receive HSTS header
-jens-prangenberg.de: did not receive HSTS header
-jens.hk: could not connect to host
-jensenbanden.no: could not connect to host
-jenssen.org: did not receive HSTS header
-jeparamedia.com: did not receive HSTS header
-jepertinger-itconsulting.de: did not receive HSTS header
-jeremye77.com: did not receive HSTS header
-jeremymade.com: could not connect to host
-jeremyness.com: could not connect to host
-jeremypaul.me: did not receive HSTS header
-jeremywagner.me: did not receive HSTS header
-jeremywinn.xyz: could not connect to host
-jeroenensanne.wedding: could not connect to host
-jeroenvanderwal.nl: did not receive HSTS header
-jeroldirvin.com: could not connect to host
-jerrypau.ca: did not receive HSTS header
-jes.events: did not receive HSTS header
-jesorsenville.com: did not receive HSTS header
-jessevictors.com: could not connect to host
-jessicah.org: could not connect to host
-jessietessiephptrouble.herokuapp.com: did not receive HSTS header
-jesuisformidable.nl: could not connect to host
-jesuslucas.com: did not receive HSTS header
-jet-code.com: did not receive HSTS header
-jetapi.org: could not connect to host
-jetbrains.pw: could not connect to host
-jetlagphotography.com: could not connect to host
-jeton.com: did not receive HSTS header
-jetses.be: did not receive HSTS header
-jetsetcharge.com: could not connect to host
-jetsetpay.com: could not connect to host
-jetzt-elektromobil.de: could not connect to host
-jeuxetcodes.fr: could not connect to host
-jewelers.expert: could not connect to host
-jewellerydesignstore.com: could not connect to host
-jewellerymarvels.com: did not receive HSTS header
-jexler.net: could not connect to host
-jez.nl: could not connect to host
-jf-fotos.de: did not receive HSTS header
-jfmel.com: did not receive HSTS header
-jfmhero.me: could not connect to host
-jfnllc.com: could not connect to host
-jfsa.jp: did not receive HSTS header
-jfx.space: did not receive HSTS header
-jglover.com: could not connect to host
-jh-media.eu: could not connect to host
-jhburton.co.uk: could not connect to host
-jhburton.uk: could not connect to host
-jhcommunitysports.co.uk: could not connect to host
-jhejderup.me: could not connect to host
-jhermsmeier.de: did not receive HSTS header
-jhf.io: did not receive HSTS header
-jhservicos.net.br: could not connect to host
-jhuang.me: could not connect to host
-jhw-profiles.de: did not receive HSTS header
-jia1hao.com: could not connect to host
-jiacl.com: could not connect to host
-jiaidu.com: could not connect to host
-jiangzequn.com: could not connect to host
-jiangzm.com: could not connect to host
-jianjiantv.com: could not connect to host
-jianny.me: could not connect to host
-jianyuan.pro: could not connect to host
-jiaqiang.vip: could not connect to host
-jiatingtrading.com: could not connect to host
-jiazhao.ga: could not connect to host
-jichi.me: could not connect to host
-jie.dance: could not connect to host
-jief.me: could not connect to host
-jieyang2016.com: could not connect to host
-jigsawdevelopments.com: could not connect to host
-jiid.ga: could not connect to host
-jikegu.com: could not connect to host
-jikken.de: could not connect to host
-jimas.eu: did not receive HSTS header
-jimbiproducts.com: could not connect to host
-jimbraaten.com: could not connect to host
-jimenacocina.com: did not receive HSTS header
-jimgao.tk: did not receive HSTS header
-jimizhou.xyz: could not connect to host
-jimmehcai.com: could not connect to host
-jimmycn.com: could not connect to host
-jimmynelson.com: did not receive HSTS header
-jinancy.fr: could not connect to host
-jinanshen.com: could not connect to host
-jinduoduo666.com: could not connect to host
-jinduoduo888.com: could not connect to host
-jingyuesi.com: could not connect to host
-jinliming.ml: did not receive HSTS header
-jinmaguoji.com: could not connect to host
-jinsha1234567.com: could not connect to host
-jinsha12345678.com: could not connect to host
-jinsha168.org: could not connect to host
-jinsha2228.com: could not connect to host
-jinsha2288.net: could not connect to host
-jinsha66669.com: could not connect to host
-jinsha6969.com: could not connect to host
-jinsha8888888.com: could not connect to host
-jinsha99999.com: could not connect to host
-jiosongs.biz: could not connect to host
-jiosongs.com: could not connect to host
-jira.com: did not receive HSTS header
-jirav.io: could not connect to host
-jiretvariedades.com: did not receive HSTS header
-jiripudil.cz: did not receive HSTS header
-jirosworld.com: did not receive HSTS header
-jisaku-homepage.com: did not receive HSTS header
-jisnashville.gov: could not connect to host
-jitlab.org: could not connect to host
-jitsi.org: did not receive HSTS header
-jiveiaktivno.bg: did not receive HSTS header
-jiyue.com: could not connect to host
-jiyue.moe: could not connect to host
-jiyusu.com: did not receive HSTS header
-jiyuu-ni.com: could not connect to host
-jiyuu-ni.net: could not connect to host
-jj5197.co: could not connect to host
-jj6729.co: could not connect to host
-jj6729.com: did not receive HSTS header
-jj6957.co: could not connect to host
-jj9297.co: could not connect to host
-jj9397.com: did not receive HSTS header
-jj9721.com: did not receive HSTS header
-jj9728.co: could not connect to host
-jjf.org.au: did not receive HSTS header
-jjj917.com: did not receive HSTS header
-jjjconnection.com: could not connect to host
-jjjj003.com: did not receive HSTS header
-jjlvk.nl: did not receive HSTS header
-jjmarketing.co.uk: did not receive HSTS header
-jjrstudio.com: did not receive HSTS header
-jjspartytime.co.uk: did not receive HSTS header
-jjsummerboatparty.co.uk: could not connect to host
-jka.io: did not receive HSTS header
-jkb.pics: could not connect to host
-jkbuster.com: could not connect to host
-jkest.cc: could not connect to host
-jkng.eu: could not connect to host
-jko.works: could not connect to host
-jkuvw.xyz: did not receive HSTS header
-jkv-media.cloud: did not receive HSTS header
-jkyuan.tk: could not connect to host
-jl-dns.eu: could not connect to host
-jl-dns.nl: could not connect to host
-jl-dx.com.cn: did not receive HSTS header
-jl-exchange.nl: could not connect to host
-jl-mail.nl: could not connect to host
-jlhmedia.com: did not receive HSTS header
-jlot.org: did not receive HSTS header
-jlpn.eu: could not connect to host
-jlpn.nl: could not connect to host
-jm06.com: did not receive HSTS header
-jm22.com: could not connect to host
-jmalarcon.es: did not receive HSTS header
-jmatt.org: did not receive HSTS header
-jmb.lc: could not connect to host
-jmcleaning.services: could not connect to host
-jmdekker.it: could not connect to host
-jmoreau.ddns.net: could not connect to host
-jmotion.co.uk: did not receive HSTS header
-jmpmotorsport.co.uk: did not receive HSTS header
-jmvbmx.ch: could not connect to host
-jmvdigital.com: did not receive HSTS header
-jmx520.com: max-age too low: 0
-jn1.me: did not receive HSTS header
-jncde.de: could not connect to host
-jncie.de: did not receive HSTS header
-jncip.de: could not connect to host
-joacimeldre.com: could not connect to host
-joakimalgroy.com: could not connect to host
-joaojunior.com: did not receive HSTS header
-joaquimgoliveira.pt: did not receive HSTS header
-job-offer.de: could not connect to host
-jobbuddy.se: did not receive HSTS header
-jobers.ch: did not receive HSTS header
-jobers.pt: did not receive HSTS header
-jobflyapp.com: could not connect to host
-jobmedic.com: did not receive HSTS header
-jobmob.co.il: did not receive HSTS header
-jobs-in-tech.com: could not connect to host
-jobsarkari.com: did not receive HSTS header
-jobshq.com: could not connect to host
-jobtestprep.it: did not receive HSTS header
-jodel.ninja: could not connect to host
-joe-pagan.com: could not connect to host
-joearodriguez.com: could not connect to host
-joebobbriggs.net: did not receive HSTS header
-joecod.es: could not connect to host
-joefixit.co.uk: could not connect to host
-joejohnson.name: did not receive HSTS header
-joelcoustrain.com: did not receive HSTS header
-joeldbolivarc.com: did not receive HSTS header
-joelgonewild.com: did not receive HSTS header
-joemotherfuckingjohnson.com: did not receive HSTS header
-joerg-wellpott.de: did not receive HSTS header
-joerosca.com: did not receive HSTS header
-joeseago.com: did not receive HSTS header
-joesniderman.com: could not connect to host
-joetyson.io: could not connect to host
-joeygitalian.com: could not connect to host
-joeyvilaro.com: could not connect to host
-jof.guru: did not receive HSTS header
-jogi-server.de: could not connect to host
-johand.io: could not connect to host
-johanli.com: did not receive HSTS header
-johannaojanen.com: could not connect to host
-johannes-bugenhagen.de: did not receive HSTS header
-johannesburg-escorts.co.za: could not connect to host
-johanneskonrad.de: did not receive HSTS header
-johnbrownphotography.ch: did not receive HSTS header
-johncardell.com: did not receive HSTS header
-johners.me: could not connect to host
-johngadenne.com.au: could not connect to host
-johngaltgroup.com: did not receive HSTS header
-johnmcc.net: could not connect to host
-johnmorganpartnership.co.uk: did not receive HSTS header
-johnno.be: could not connect to host
-johnnybegood.tk: could not connect to host
-johnrom.com: did not receive HSTS header
-johnrosen.xyz: could not connect to host
-johnsonho.net: could not connect to host
-johntomasowa.com: could not connect to host
-johnverkerk.com: could not connect to host
-joi-dhl.ch: could not connect to host
-joinamericacorps.gov: could not connect to host
-joinhahobby.com.br: could not connect to host
-jointoweb.com: could not connect to host
-jojosplaycentreandcafeteria.co.uk: could not connect to host
-joker.menu: could not connect to host
-jokerice.co.uk: could not connect to host
-joliet.gov: could not connect to host
-jollygoodspudz.ca: could not connect to host
-jomagus.de: could not connect to host
-jomibe.de: did not receive HSTS header
-jomofojo.co: did not receive HSTS header
-jomofojo.com: did not receive HSTS header
-jomp16.tk: could not connect to host
-jonale.net: could not connect to host
-jonandnoraswedding.com: did not receive HSTS header
-jonarcher.info: did not receive HSTS header
-jonas-keidel.de: could not connect to host
-jonas-wenk.de: could not connect to host
-jonasberger.com: did not receive HSTS header
-jonasgroth.se: did not receive HSTS header
-jonathan-apps.com: could not connect to host
-jonathan.ir: could not connect to host
-jonathandowning.uk: did not receive HSTS header
-jonathanj.nl: did not receive HSTS header
-jonathanmassacand.ch: could not connect to host
-jonathansanchez.pro: could not connect to host
-jonathanschle.de: could not connect to host
-jonathanselea.se: did not receive HSTS header
-jonesopolis.xyz: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-jonferwerda.net: could not connect to host
-jonfor.net: could not connect to host
-jongha.me: could not connect to host
-jonglvab.be: did not receive HSTS header
-jonn.me: could not connect to host
-jonnichols.info: could not connect to host
-jonsno.ws: could not connect to host
-joomlant.org: could not connect to host
-joonatoona.me: did not receive HSTS header
-jooto.com: did not receive HSTS header
-jopsens.de: could not connect to host
-jordan-jungk.de: could not connect to host
-jordandirections.com: could not connect to host
-jordankirby.co.uk: could not connect to host
-jordanp.engineer: could not connect to host
-jordanstrustcompany.cn: could not connect to host
-jordanstrustcompany.ru: could not connect to host
-jordhy.com: could not connect to host
-jordiescudero.com: did not receive HSTS header
-jordikroon.nl: could not connect to host
-joretapo.fr: could not connect to host
-jorexenterprise.com: could not connect to host
-jorgemesa.me: could not connect to host
-jorgerosales.org: could not connect to host
-jornadasciberdefensa2016.es: could not connect to host
-jorovik.com: did not receive HSTS header
-jorrit.info: max-age too low: 0
-josahrens.me: could not connect to host
-jose.eti.br: did not receive HSTS header
-joseaveleira.es: did not receive HSTS header
-josecage.com: could not connect to host
-josefjanosec.com: could not connect to host
-josegdigital.com: could not connect to host
-josegerber.ch: did not receive HSTS header
-joseitoda.org: did not receive HSTS header
-josephsniderman.net: could not connect to host
-josericaurte.com: could not connect to host
-joshgrancell.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-joshharkema.com: could not connect to host
-joshhoffer.com: could not connect to host
-joshi.su: could not connect to host
-joshplant.co.uk: could not connect to host
-joshstroup.me: could not connect to host
-joshuadmiller.info: did not receive HSTS header
-joshuajohnson.ca: did not receive HSTS header
-joshuarogers.net: did not receive HSTS header
-joto.de: could not connect to host
-jotpics.com: could not connect to host
-jottit.com: could not connect to host
-jouetspetitechanson.com: could not connect to host
-jouwpaardenbak.nl: could not connect to host
-joworld.net: could not connect to host
-joyceclerkx.com: could not connect to host
-joyceseamone.com: could not connect to host
-joyjohnston.ca: did not receive HSTS header
-joynadvisors.com: did not receive HSTS header
-jpaglier.com: could not connect to host
-jpcrochetapparel.com: could not connect to host
-jpeaches.xyz: could not connect to host
-jpn.parts: did not receive HSTS header
-jptun.com: could not connect to host
-jpvtutoriales.com: did not receive HSTS header
-jqk918.com: could not connect to host
-jr5devdoug.xyz: could not connect to host
-jr5devdouglas.xyz: could not connect to host
-jr5proxdoug.xyz: could not connect to host
-jrchaseify.xyz: could not connect to host
-jreinert.com: could not connect to host
-jrflorian.com: could not connect to host
-jrgold.me: could not connect to host
-jrlopezoficial.com: could not connect to host
-jrmd.io: could not connect to host
-jrvar.com: did not receive HSTS header
-js0204.com: could not connect to host
-js3311.com: could not connect to host
-js88.sg: could not connect to host
-js93029.com: could not connect to host
-jsanders.us: did not receive HSTS header
-jsbevents.nl: could not connect to host
-jsblights.nl: could not connect to host
-jsc7776.com: could not connect to host
-jsdelivr.net: could not connect to host
-jsg-technologies.de: did not receive HSTS header
-jsh173.com: did not receive HSTS header
-jsh318.com: did not receive HSTS header
-jsh517.com: did not receive HSTS header
-jsh799.com: did not receive HSTS header
-jsh916.com: did not receive HSTS header
-jsh917.com: did not receive HSTS header
-jsh918.com: could not connect to host
-jsh920.com: did not receive HSTS header
-jsjyhzy.cc: did not receive HSTS header
-jskier.com: could not connect to host
-jslidong.top: could not connect to host
-jsmetallerie.fr: did not receive HSTS header
-json-viewer.com: did not receive HSTS header
-json2bot.chat: did not receive HSTS header
-jsonsinc.com: could not connect to host
-jss.moe: did not receive HSTS header
-jss6868.cc: could not connect to host
-jstelecom.com.br: did not receive HSTS header
-jsuse.xyz: could not connect to host
-jthackery.com: did not receive HSTS header
-jtl-connect.de: did not receive HSTS header
-jtmar.me: did not receive HSTS header
-ju1ro.de: could not connect to host
-juabcounty.gov: did not receive HSTS header
-jualautoclave.com: did not receive HSTS header
-jualssh.com: could not connect to host
-juandesouza.com: did not receive HSTS header
-juanhub.com: did not receive HSTS header
-jubee.nl: did not receive HSTS header
-jubilerkarat.pl: did not receive HSTS header
-jubileum.online: could not connect to host
-jubileumfotograaf.nl: could not connect to host
-juch.cc: did not receive HSTS header
-juchheim-methode.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-juchit.at: could not connect to host
-judc-ge.ch: could not connect to host
-judge2020.me: did not receive HSTS header
-judytka.cz: did not receive HSTS header
-juegosycodigos.es: could not connect to host
-juelda.com: could not connect to host
-juergen-roehrig.de: did not receive HSTS header
-juergenhecht.de: did not receive HSTS header
-juergmeier.ch: did not receive HSTS header
-juezz.top: did not receive HSTS header
-juiced.gs: did not receive HSTS header
-juka.pp.ua: could not connect to host
-juku-info.top: did not receive HSTS header
-julegoerke.de: did not receive HSTS header
-juliamweber.de: did not receive HSTS header
-julian-kipka.de: did not receive HSTS header
-julian-weigle.de: did not receive HSTS header
-julian-witusch.de: could not connect to host
-juliankirchner.ch: did not receive HSTS header
-julianwallmeroth.de: could not connect to host
-julianweigle.de: did not receive HSTS header
-juliaoantiguidades.com.br: could not connect to host
-juliawebber.co.za: could not connect to host
-julido.de: did not receive HSTS header
-julienpaterne.com: could not connect to host
-julio.jamil.nom.br: could not connect to host
-juliohernandezgt.com: could not connect to host
-jumba.com.au: could not connect to host
-jumbopan.com: could not connect to host
-jumbopan.net: could not connect to host
-jumboquid.co.uk: did not receive HSTS header
-jumbox.xyz: could not connect to host
-jumbster.com: could not connect to host
-jump.bg: did not receive HSTS header
-jumparoundreading.co.uk: could not connect to host
-jumperoos.co.uk: could not connect to host
-jumping-duck.com: did not receive HSTS header
-jumpingdeliege-vip.be: could not connect to host
-jumpman-iphone-design.de: could not connect to host
-junaos.com: did not receive HSTS header
-junaos.xyz: did not receive HSTS header
-junctioncitywisconsin.gov: did not receive HSTS header
-jundimax.com.br: could not connect to host
-junespina.com: did not receive HSTS header
-jungaa.fr: did not receive HSTS header
-junge-selbsthilfe.info: could not connect to host
-jungleculture.co.za: could not connect to host
-junglegoat.xyz: could not connect to host
-juni.io: did not receive HSTS header
-juniwalk.cz: did not receive HSTS header
-junjhome.com: could not connect to host
-junjung.me: could not connect to host
-junoaroma.com: could not connect to host
-junqtion.com: could not connect to host
-junta.pl: did not receive HSTS header
-jupp0r.de: could not connect to host
-jupuglia.com.br: could not connect to host
-juraciimoveis.com.br: could not connect to host
-juridiqueo.com: did not receive HSTS header
-jurijbuga.de: did not receive HSTS header
-juristeo.com: did not receive HSTS header
-jurko.cz: did not receive HSTS header
-jusos-goettingen.de: did not receive HSTS header
-just-a-clanpage.de: could not connect to host
-just-english.online: did not receive HSTS header
-just-pools.co.za: could not connect to host
-justanothercompany.name: could not connect to host
-justbelieverecovery.com: did not receive HSTS header
-justbookhotels.com: did not receive HSTS header
-justiceforfathers.com: did not receive HSTS header
-justiceo.org: did not receive HSTS header
-justin-tech.com: could not connect to host
-justinellingwood.com: could not connect to host
-justinharrison.ca: could not connect to host
-justinlemay.com: could not connect to host
-justinribeiro.com: did not receive HSTS header
-justinrudio.com: did not receive HSTS header
-justlikethat.hosting: did not receive HSTS header
-justmade.com.br: did not receive HSTS header
-justmensgloves.com: could not connect to host
-justmy.website: could not connect to host
-justnaw.co.uk: could not connect to host
-justtalk.site: could not connect to host
-justudin.com: did not receive HSTS header
-justwood.cz: did not receive HSTS header
-justzz.xyz: could not connect to host
-juul.xyz: could not connect to host
-juvenex.co: did not receive HSTS header
-juventusclublugano.ch: could not connect to host
-juventusmania1897.com: could not connect to host
-juwairen.cn: could not connect to host
-juzgalo.com: did not receive HSTS header
-jva-wuerzburg.de: could not connect to host
-jvandenbroeck.com: could not connect to host
-jvlandscapingservices.com: could not connect to host
-jvoice.net: could not connect to host
-jvwdev.nl: could not connect to host
-jw66.cc: could not connect to host
-jwallet.cc: did not receive HSTS header
-jwilsson.me: could not connect to host
-jwimps.com: could not connect to host
-jwolt-lx.com: could not connect to host
-jwplay.ml: could not connect to host
-jwpoore.com: could not connect to host
-jwsoft.nl: did not receive HSTS header
-jwybk.ml: could not connect to host
-jxi.fr: did not receive HSTS header
-jxkangyifu.com: could not connect to host
-jydwz.com: max-age too low: 0
-jyggen.com: did not receive HSTS header
-jym.fit: could not connect to host
-jysk-kornteknik.dk: did not receive HSTS header
-jysperm.me: did not receive HSTS header
-jz585.com: could not connect to host
-jznet.org: could not connect to host
-k-dev.de: could not connect to host
-k-netz.de: did not receive HSTS header
-k-pan.com: could not connect to host
-k-rickroll-g.pw: could not connect to host
-k-tube.com: did not receive HSTS header
-k-wallet.com: could not connect to host
-k0.gg: could not connect to host
-k1cp.com: could not connect to host
-k30365.com: could not connect to host
-k33k00.com: did not receive HSTS header
-k3508.com: could not connect to host
-k38.cc: could not connect to host
-k5197.co: could not connect to host
-k60111.com: did not receive HSTS header
-k60222.com: did not receive HSTS header
-k60333.com: did not receive HSTS header
-k60444.com: did not receive HSTS header
-k60555.com: did not receive HSTS header
-k60666.com: did not receive HSTS header
-k60777.com: did not receive HSTS header
-k60888.com: did not receive HSTS header
-k60999.com: did not receive HSTS header
-k60d.com: could not connect to host
-k6729.co: could not connect to host
-k6729.com: did not receive HSTS header
-k6957.co: could not connect to host
-k6957.com: did not receive HSTS header
-k8079.com: could not connect to host
-k80998.com: could not connect to host
-k81365.com: did not receive HSTS header
-k81818.com: did not receive HSTS header
-k82.org: could not connect to host
-k82365.com: did not receive HSTS header
-k8268.com: could not connect to host
-k8668.com: could not connect to host
-k86988.com: could not connect to host
-k8927.com: could not connect to host
-k8gege.com: could not connect to host
-k8v05.com: could not connect to host
-k9297.co: could not connect to host
-k9728.co: could not connect to host
-ka-clan.com: could not connect to host
-kaanduman.com: could not connect to host
-kaangenc.me: could not connect to host
-kaany.io: could not connect to host
-kaas.wtf: could not connect to host
-kaasbijwijn.nl: did not receive HSTS header
-kaashosting.nl: did not receive HSTS header
-kabaca.design: could not connect to host
-kabinapp.com: could not connect to host
-kaboom.pw: did not receive HSTS header
-kabos.art: could not connect to host
-kabouterbankje.nl: could not connect to host
-kabu-abc.com: could not connect to host
-kabuabc.com: could not connect to host
-kackscharf.de: did not receive HSTS header
-kadioglumakina.com.tr: did not receive HSTS header
-kadmec.com: did not receive HSTS header
-kaela.design: could not connect to host
-kaeru-seitai.com: did not receive HSTS header
-kaginalycloud.com: could not connect to host
-kagucho.net: could not connect to host
-kahopoon.net: could not connect to host
-kaibol.com: could not connect to host
-kaika-facilitymanagement.de: could not connect to host
-kaika-hms.de: did not receive HSTS header
-kainetsoft.com: could not connect to host
-kainz.bayern: could not connect to host
-kainz.be: could not connect to host
-kaisers.de: could not connect to host
-kaiva.cl: could not connect to host
-kaiyuewu.com: could not connect to host
-kaizenjuku.org: did not receive HSTS header
-kajabutik.pl: did not receive HSTS header
-kajlovo.cz: could not connect to host
-kakaomilchkuh.de: did not receive HSTS header
-kaketalk.com: did not receive HSTS header
-kakoo-media.nl: could not connect to host
-kakoo.nl: could not connect to host
-kakoomedia.nl: could not connect to host
-kaktuskola.se: could not connect to host
-kakuch.com: did not receive HSTS header
-kakuto.me: could not connect to host
-kalami.nl: could not connect to host
-kaleidoskop-freiburg.de: did not receive HSTS header
-kalender.goip.de: could not connect to host
-kalifornien-tourismus.de: did not receive HSTS header
-kalilinux.tech: could not connect to host
-kaloix.de: could not connect to host
-kalolina.com: did not receive HSTS header
-kaloni.info: could not connect to host
-kalsbouncies.com: could not connect to host
-kamagraerektion.eu: did not receive HSTS header
-kamalame.co: could not connect to host
-kamatajisyaku.tokyo.jp: could not connect to host
-kambodja.guide: could not connect to host
-kamcvicit.sk: could not connect to host
-kamikano.com: could not connect to host
-kamilmagdziak.pl: did not receive HSTS header
-kamitech.ch: could not connect to host
-kampunginggris-ue.com: could not connect to host
-kana.me: could not connect to host
-kanada.guide: could not connect to host
-kanagawachuo-hospital.jp: could not connect to host
-kanal-schaefer.de: could not connect to host
-kanar.nl: could not connect to host
-kancolle.me: could not connect to host
-kandalife.com: could not connect to host
-kandec.co.jp: did not receive HSTS header
-kandoo.tech: did not receive HSTS header
-kandrahechiceravudu.com: could not connect to host
-kaneisdi.com: did not receive HSTS header
-kaneo-gmbh.de: did not receive HSTS header
-kanetix.ca: did not receive HSTS header
-kanganer.com: could not connect to host
-kangkai.me: could not connect to host
-kangooroule.fr: did not receive HSTS header
-kangzaber.com: could not connect to host
-kaniklani.co.za: did not receive HSTS header
-kanmitao.com: could not connect to host
-kanobu.ru: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-kanotijd.nl: could not connect to host
-kanr.in: could not connect to host
-kanscooking.org: could not connect to host
-kantanmt.com: did not receive HSTS header
-kantorad.io: could not connect to host
-kantorkita.net: did not receive HSTS header
-kantv1.com: could not connect to host
-kanzakiranko.jp: could not connect to host
-kanzlei-myca.de: did not receive HSTS header
-kanzshop.com: could not connect to host
-kaohub.com: could not connect to host
-kaomojis.net: did not receive HSTS header
-kaotik4266.com: could not connect to host
-kap-genial.de: could not connect to host
-kapgy-moto.com: could not connect to host
-kapiorr.duckdns.org: could not connect to host
-kaplatz.is: could not connect to host
-kaplatzis.com: could not connect to host
-kapo.info: could not connect to host
-kappit.dk: could not connect to host
-kapverde.guide: could not connect to host
-kara-fabian.com: could not connect to host
-kara-fabian.de: could not connect to host
-karaface.com: did not receive HSTS header
-karakatoo.com: did not receive HSTS header
-karamna.com: could not connect to host
-karanastic.com: did not receive HSTS header
-karaoketonight.com: could not connect to host
-karatorian.org: did not receive HSTS header
-kardize24.pl: could not connect to host
-kardolocksmith.com: did not receive HSTS header
-karenledger.ca: did not receive HSTS header
-karenwillisholmes.com: did not receive HSTS header
-karhm.com: did not receive HSTS header
-karjala-ski.ru: did not receive HSTS header
-karlin.run: could not connect to host
-karlis-kavacis.id.lv: could not connect to host
-karloskontana.tk: could not connect to host
-karlproctor.co.uk: could not connect to host
-karolak.fr: could not connect to host
-karpanhellas.com: could not connect to host
-kartashev.me: did not receive HSTS header
-karting34.com: did not receive HSTS header
-karuneshjohri.com: could not connect to host
-kasadara.com: did not receive HSTS header
-kashadriskill.com: could not connect to host
-kashbet.com: could not connect to host
-kashdash.ca: could not connect to host
-kashmirobserver.net: did not receive HSTS header
-kasse.pro: did not receive HSTS header
-kastemperaturen.ga: could not connect to host
-katalogakci.cz: did not receive HSTS header
-katalogbutikker.dk: could not connect to host
-katata-kango.ac.jp: did not receive HSTS header
-katcr.co: could not connect to host
-kateduggan.net: could not connect to host
-kathrinbaumannphotography.com: did not receive HSTS header
-kati0.com: could not connect to host
-katiaetdavid.fr: could not connect to host
-katja-nikolic-design.de: could not connect to host
-katja-und-ronny.de: did not receive HSTS header
-katjavoneysmondt.de: did not receive HSTS header
-katoju.co.jp: did not receive HSTS header
-katproxy.al: did not receive HSTS header
-katproxy.online: could not connect to host
-katproxy.site: did not receive HSTS header
-katproxy.tech: could not connect to host
-katproxy.top: could not connect to host
-katrinjanke.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-kattenfun.be: did not receive HSTS header
-kattenfun.nl: did not receive HSTS header
-katthewaffle.fr: could not connect to host
-katyl.info: could not connect to host
-katzen.me: could not connect to host
-katzenbrunnen-test.de: could not connect to host
-katzensklave.me: could not connect to host
-katzrkool.xyz: could not connect to host
-katzspeech.com: did not receive HSTS header
-kaufmanbankruptcylaw.com: did not receive HSTS header
-kauperwood.ovh: could not connect to host
-kauplusprofesional.com: did not receive HSTS header
-kausch.at: could not connect to host
-kausta.me: could not connect to host
-kaverti.com: could not connect to host
-kavik.no: could not connect to host
-kavinvin.me: could not connect to host
-kavorka.me: could not connect to host
-kawaii.io: could not connect to host
-kawaiii.link: could not connect to host
-kawaiiku.com: could not connect to host
-kawaiiku.de: could not connect to host
-kaweus.de: did not receive HSTS header
-kayakabovegroundswimmingpools.com: could not connect to host
-kayant-server.space: could not connect to host
-kaydan.io: could not connect to host
-kayipmurekkep.com: could not connect to host
-kayleen.net: could not connect to host
-kayon.cf: could not connect to host
-kaypasocks.com: could not connect to host
-kayscs.com: could not connect to host
-kazamasion.com: could not connect to host
-kazanasolutions.de: could not connect to host
-kazenojiyu.fr: could not connect to host
-kazmamall.com: did not receive HSTS header
-kazu.click: did not receive HSTS header
-kazuhirohigashi.com: did not receive HSTS header
-kazumi.ooo: could not connect to host
-kb3.net: could not connect to host
-kb3434.com: could not connect to host
-kb709.com: could not connect to host
-kb7373.com: could not connect to host
-kb802.com: could not connect to host
-kb8851.com: could not connect to host
-kb88dc04.com: could not connect to host
-kb88dc05.com: could not connect to host
-kb88dc06.com: could not connect to host
-kb88dc12.com: could not connect to host
-kb88dc17.com: could not connect to host
-kbcso.com: could not connect to host
-kbfl.org: could not connect to host
-kcc.sh: did not receive HSTS header
-kchomemed.com: did not receive HSTS header
-kcluster.io: could not connect to host
-kcptun.com: could not connect to host
-kd-plus.pp.ua: could not connect to host
-kdata.it: did not receive HSTS header
-kdbx.online: could not connect to host
-kdfans.com: did not receive HSTS header
-kdm-online.de: did not receive HSTS header
-kdyby.org: did not receive HSTS header
-keaneokelley.com: could not connect to host
-kearney.io: could not connect to host
-kedibizworx.com: could not connect to host
-kediri.win: could not connect to host
-keditor.biz: could not connect to host
-keechain.io: could not connect to host
-keeckee.ga: did not receive HSTS header
-keeckee.ml: could not connect to host
-keeley.gq: could not connect to host
-keeley.ml: could not connect to host
-keeleysam.me: could not connect to host
-keematdekho.com: could not connect to host
-keepaa.com: could not connect to host
-keepassa.co: could not connect to host
-keepclean.me: could not connect to host
-keepcoalintheground.org: could not connect to host
-keeperapp.com: could not connect to host
-keepflow.io: could not connect to host
-keepmanager.org: could not connect to host
-keeprubyweird.com: did not receive HSTS header
-keevitaja.com: did not receive HSTS header
-keez.cf: could not connect to host
-keezin.ga: could not connect to host
-kefaloniatoday.com: did not receive HSTS header
-keihin-chaplin.jp: did not receive HSTS header
-kein-fidget-spinner-werden.de: could not connect to host
-keithws.net: could not connect to host
-kejar.id: did not receive HSTS header
-kejibot.com: did not receive HSTS header
-kekehouse.net: could not connect to host
-kekgame.com: could not connect to host
-kela.jp: could not connect to host
-kelantanmudah.com: could not connect to host
-kelleymcchesney.us: could not connect to host
-kellyandantony.com: could not connect to host
-kellyssportsbarandgrill.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-kelm.me: could not connect to host
-kelmarsafety.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-kelp.agency: did not receive HSTS header
-kenbillionsyuan.tk: could not connect to host
-kendernet.com: could not connect to host
-kenguntokku.jp: did not receive HSTS header
-kenkoelectric.com: did not receive HSTS header
-kennethaasan.no: could not connect to host
-kennethferguson.com: did not receive HSTS header
-kensparkesphotography.com: did not receive HSTS header
-kensyou.network: did not receive HSTS header
-kentacademiestrust.org.uk: could not connect to host
-kenx5.eu.org: could not connect to host
-keops-spine.us: could not connect to host
-kep-sbt.hu: did not receive HSTS header
-kepler-seminar.de: did not receive HSTS header
-kepsbt.hu: did not receive HSTS header
-kerangalam.com: could not connect to host
-kerem.xyz: could not connect to host
-kerenos.rocks: did not receive HSTS header
-kerforhome.com: did not receive HSTS header
-kerksanders.nl: could not connect to host
-kermadec.blog: could not connect to host
-kermadec.com: could not connect to host
-kermadec.fr: could not connect to host
-kermadec.net: could not connect to host
-kernelmode.io: did not receive HSTS header
-kerner.xyz: could not connect to host
-kernl.us: did not receive HSTS header
-kerrfrequencycombs.org: did not receive HSTS header
-kerryfoodscareers.com: did not receive HSTS header
-kersbergen.nl: did not receive HSTS header
-kersmexico.com: could not connect to host
-kerzyte.net: could not connect to host
-keshausconsulting.com: could not connect to host
-kessel-runners.com: could not connect to host
-kesteren.com: could not connect to host
-kesteren.org: could not connect to host
-ketaminecareclinic.com: did not receive HSTS header
-ketoliv.dk: did not receive HSTS header
-kevin.tw: could not connect to host
-kevindavid.org: could not connect to host
-kevindekoninck.com: could not connect to host
-kevinfoley.cc: could not connect to host
-kevinfoley.org: could not connect to host
-kevingsky.com: could not connect to host
-kevinheslinphoto.com: did not receive HSTS header
-kevinroebert.de: did not receive HSTS header
-kevlar.pw: did not receive HSTS header
-kewego.co.uk: did not receive HSTS header
-kexueboy.com: did not receive HSTS header
-keyerror.com: could not connect to host
-keymach.com: could not connect to host
-keypersonins.com: did not receive HSTS header
-keys.jp: did not receive HSTS header
-keyserver.sexy: could not connect to host
-kf-59.com: could not connect to host
-kf0000.com: could not connect to host
-kf060.com: could not connect to host
-kf1288.com: could not connect to host
-kf2000.vip: could not connect to host
-kf4343g.com: could not connect to host
-kf4427.com: did not receive HSTS header
-kf5414.com: did not receive HSTS header
-kf5424.com: did not receive HSTS header
-kf5454.com: did not receive HSTS header
-kf5656.com: could not connect to host
-kf6639.com: could not connect to host
-kf6868.com: could not connect to host
-kf7337.com: did not receive HSTS header
-kf7joz.com: could not connect to host
-kf8181.com: could not connect to host
-kf8383.com: could not connect to host
-kf8813.com: could not connect to host
-kf8897.com: could not connect to host
-kf9191.com: could not connect to host
-kf9696.com: could not connect to host
-kfassessment.com: did not receive HSTS header
-kfbrussels.be: could not connect to host
-kfm.ink: did not receive HSTS header
-kg-rating.com: could not connect to host
-kg7.pl: could not connect to host
-kgb.us: did not receive HSTS header
-kgregorczyk.pl: could not connect to host
-kgv-schlauroth.de: did not receive HSTS header
-kgxtech.com: did not receive HSTS header
-khachiks.com: max-age too low: 0
-khamphafood.com: did not receive HSTS header
-kheshtar.pl: could not connect to host
-khlee.net: did not receive HSTS header
-khmath.com: did not receive HSTS header
-khohangmadeinvietnam.com: did not receive HSTS header
-khojirdesign.ir: did not receive HSTS header
-khokey.com: could not connect to host
-khosla.uk: did not receive HSTS header
-khwebgo.com: did not receive HSTS header
-ki-on.net: did not receive HSTS header
-kiaka.co: did not receive HSTS header
-kialo.com: did not receive HSTS header
-kiapartsdepartment.com: did not receive HSTS header
-kiapps.ovh: could not connect to host
-kiasystems.com: could not connect to host
-kibbesfusion.com: did not receive HSTS header
-kibea.net: could not connect to host
-kichy.net: max-age too low: 0
-kickass-proxies.org: could not connect to host
-kickass.al: could not connect to host
-kickasstorrents.gq: could not connect to host
-kickerplaza.nl: did not receive HSTS header
-kidbacker.com: could not connect to host
-kiddies.academy: did not receive HSTS header
-kiddieschristianacademy.co.za: did not receive HSTS header
-kidkat.cn: could not connect to host
-kids-ok.com: did not receive HSTS header
-kids2day.in: could not connect to host
-kidsmark.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-kiedys.net: could not connect to host
-kiehls.pt: did not receive HSTS header
-kiel-kind.de: could not connect to host
-kiel-media.de: did not receive HSTS header
-kielderweather.org.uk: did not receive HSTS header
-kielwi.gov: could not connect to host
-kieranweightman.me: could not connect to host
-kiesuwarbeidsrechtadvocaat.nl: could not connect to host
-kiesuwcursus.nl: did not receive HSTS header
-kievkiralikotel.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-kievradio.com: could not connect to host
-kiffmarks.com: could not connect to host
-kikimilyatacado.com.br: could not connect to host
-kikuzuki.org: could not connect to host
-kiladera.be: did not receive HSTS header
-kileahh.fr: could not connect to host
-kill-paff.com: did not receive HSTS header
-killedbynlp.com: could not connect to host
-killerit.in: could not connect to host
-killme.rocks: could not connect to host
-kilometertje.nl: did not receive HSTS header
-kimana.pe: could not connect to host
-kimberg.co.uk: did not receive HSTS header
-kimberlybeautysoapcompany.com: did not receive HSTS header
-kimkhisaigon.com.vn: did not receive HSTS header
-kimo.se: did not receive HSTS header
-kimono-rental-one.com: did not receive HSTS header
-kimpost.org: could not connect to host
-kimscrazeecastles.co.uk: could not connect to host
-kimsufi-jordi.tk: did not receive HSTS header
-kimtran.kim: could not connect to host
-kin-to-kin.ca: did not receive HSTS header
-kin.life: could not connect to host
-kin.pet: could not connect to host
-kina.guide: could not connect to host
-kinderbuecher-kostenlos.de: could not connect to host
-kinderergotherapie-ik.nl: did not receive HSTS header
-kindergarten-neugnadenfeld.tk: could not connect to host
-kinderjugendfreizeitverein.de: did not receive HSTS header
-kinderly.co.uk: did not receive HSTS header
-kinderopvangengeltjes.nl: did not receive HSTS header
-kinderopvangzevenbergen.nl: did not receive HSTS header
-kinderwagen-test24.de: did not receive HSTS header
-kindfotografie.nl: could not connect to host
-kindleworth.com: did not receive HSTS header
-kindlyfire.com: could not connect to host
-kindof.ninja: could not connect to host
-kinecle.com: did not receive HSTS header
-kinepolis-studio.ga: could not connect to host
-kinetic.ventures: could not connect to host
-kineto.space: could not connect to host
-king-henris-castles.co.uk: could not connect to host
-kingbird.me: did not receive HSTS header
-kingclass.cn: could not connect to host
-kingdomcrc.org: did not receive HSTS header
-kingdominnergy.com: could not connect to host
-kingmanhall.org: could not connect to host
-kingnutrition.com.ar: did not receive HSTS header
-kingpincages.com: could not connect to host
-kingqueen.org.uk: did not receive HSTS header
-kingsley.cc: could not connect to host
-kingstake.network: could not connect to host
-kingstclinic.com: could not connect to host
-kingstonga.gov: could not connect to host
-kingtecservices.com: could not connect to host
-kinkdr.com: could not connect to host
-kinmunity.net: could not connect to host
-kinnon.enterprises: did not receive HSTS header
-kinomoto.me: could not connect to host
-kinow.com: did not receive HSTS header
-kintoandar.com: max-age too low: 0
-kintrip.com: did not receive HSTS header
-kintzingerfilm.de: did not receive HSTS header
-kiokoman.eu.org: did not receive HSTS header
-kionetworks.com: did not receive HSTS header
-kipin.fr: did not receive HSTS header
-kipira.com: could not connect to host
-kipriakipita.gr: could not connect to host
-kiraboshi.xyz: could not connect to host
-kirakirasoft.jp: did not receive HSTS header
-kirara.eu: could not connect to host
-kirill.ws: did not receive HSTS header
-kirkforillinois.com: could not connect to host
-kirkforsenate.com: could not connect to host
-kirkify.com: could not connect to host
-kirkpatrickdavis.com: could not connect to host
-kirslis.com: did not receive HSTS header
-kis-toitoidixi.de: could not connect to host
-kisa.io: could not connect to host
-kismy.tk: could not connect to host
-kiss-register.org: could not connect to host
-kissart.net: could not connect to host
-kissesb.net: could not connect to host
-kissflow.com: did not receive HSTS header
-kisstube.tv: could not connect to host
-kisstyle.ru: did not receive HSTS header
-kitabgaul.com: did not receive HSTS header
-kitakemon.com: could not connect to host
-kitashop.com.br: could not connect to host
-kitatec.com.br: could not connect to host
-kitchenaccessories.pro: could not connect to host
-kitchenalley.ca: could not connect to host
-kitchenchaos.de: could not connect to host
-kitegarage.eu: did not receive HSTS header
-kiteschoolamsterdam.nl: could not connect to host
-kitestar.co.uk: could not connect to host
-kitk.at: did not receive HSTS header
-kitsapsolutions.com: could not connect to host
-kitsostech.com: could not connect to host
-kitsta.com: could not connect to host
-kittyhacker101.tk: could not connect to host
-kiumie.com: could not connect to host
-kiwi.com: did not receive HSTS header
-kiwi.global: could not connect to host
-kiwico.com: max-age too low: 0
-kiwihub.org: could not connect to host
-kiwiirc.com: max-age too low: 5256000
-kiwipayment.com: could not connect to host
-kiwipayments.com: could not connect to host
-kiwiplace.com: could not connect to host
-kix.moe: could not connect to host
-kiyo.space: could not connect to host
-kizil.net: could not connect to host
-kizzycode.de: could not connect to host
-kj1391.com: could not connect to host
-kj1397.com: could not connect to host
-kjaermaxi.me: did not receive HSTS header
-kjarni.cc: could not connect to host
-kjg-bachrain.de: could not connect to host
-kjg-ummeln.de: did not receive HSTS header
-kjgmuenster.org: could not connect to host
-kjkmail.de: could not connect to host
-kjoglum.me: could not connect to host
-kk5197.co: could not connect to host
-kk575757.com: could not connect to host
-kk6729.co: could not connect to host
-kk6729.com: did not receive HSTS header
-kk6957.co: could not connect to host
-kk9297.co: could not connect to host
-kk9397.com: did not receive HSTS header
-kk9721.com: did not receive HSTS header
-kk9728.co: could not connect to host
-kkaefer.com: did not receive HSTS header
-kkomputer.net: could not connect to host
-kkull.tv: could not connect to host
-kkws.co: could not connect to host
-kl008888.com: could not connect to host
-klamathrestoration.gov: could not connect to host
-klantenadvies.nl: did not receive HSTS header
-klares-licht.de: could not connect to host
-klasfauseweh.de: could not connect to host
-klatschreime.de: could not connect to host
-klausimas.lt: did not receive HSTS header
-klautshop.com: could not connect to host
-klauwd.com: could not connect to host
-klaxn.org: could not connect to host
-klcreations.co.uk: did not receive HSTS header
-klean-ritekc.com: did not receive HSTS header
-kleberstoff.xyz: could not connect to host
-kleding.website: could not connect to host
-kledingrekken.nl: did not receive HSTS header
-kleertjesvoordelig.nl: could not connect to host
-kleidertauschpartys.de: could not connect to host
-kleinerarchitekturfuehrer.de: did not receive HSTS header
-kleinfein.co: could not connect to host
-kleinhelena.dynv6.net: could not connect to host
-kleinholding.com: did not receive HSTS header
-kleinserienproduktion.com: could not connect to host
-kleinveefokkerij.nl: did not receive HSTS header
-klempin.me: could not connect to host
-klempnershop.eu: did not receive HSTS header
-kletterkater.com: could not connect to host
-kleyer.eu: did not receive HSTS header
-klicke-gemeinsames.de: did not receive HSTS header
-klicktojob.de: could not connect to host
-klif1.nl: did not receive HSTS header
-klikweb.id: could not connect to host
-klimapartner.net: could not connect to host
-klimchuk.by: did not receive HSTS header
-klimchuk.com: did not receive HSTS header
-klingeletest.de: could not connect to host
-klingsundet.no: did not receive HSTS header
-klinkerstreet.com.ua: could not connect to host
-kls-agency.com.ua: did not receive HSTS header
-klseet.com: did not receive HSTS header
-klumba.org: did not receive HSTS header
-klunkergarten.org: could not connect to host
-klupper.com: could not connect to host
-klustekeningen.nl: could not connect to host
-klzwzhi.com: could not connect to host
-km-net.pl: did not receive HSTS header
-kmdev.me: could not connect to host
-kmnsk.eu: did not receive HSTS header
-kmsci.com.ph: did not receive HSTS header
-knaake.net: could not connect to host
-knallfrosch.ddnss.de: could not connect to host
-knarcraft.net: could not connect to host
-knccloud.com: could not connect to host
-kneipi.de: could not connect to host
-kngk-azs.ru: did not receive HSTS header
-kngk-transavto.ru: could not connect to host
-kniga-goda.org: did not receive HSTS header
-kniga.market: could not connect to host
-knigadel.com: could not connect to host
-knightsblog.de: could not connect to host
-knightsbridgegroup.org: could not connect to host
-knightsweep.com: could not connect to host
-kniwweler.com: could not connect to host
-knockendarroch.co.uk: did not receive HSTS header
-knot-store.com: did not receive HSTS header
-knowdebt.org: did not receive HSTS header
-knowledgebuilds.com: could not connect to host
-knowledgeforce.com: could not connect to host
-knowledgesnap.com: could not connect to host
-knowledgesnapsites.com: could not connect to host
-knowlevillagecc.co.uk: could not connect to host
-knownsec.cf: could not connect to host
-knowpanamatours.com: could not connect to host
-knoxcountytn.gov: could not connect to host
-knuckles.tk: could not connect to host
-knutur.is: did not receive HSTS header
-ko.si: did not receive HSTS header
-koalapress.fr: did not receive HSTS header
-kobar.id: could not connect to host
-kobezda.net: could not connect to host
-kobieta.guru: could not connect to host
-koboldcraft.ch: could not connect to host
-koddsson.com: did not receive HSTS header
-kode-it.de: could not connect to host
-kodexplorer.ml: could not connect to host
-kodiaklabs.org: could not connect to host
-kodokushi.fr: could not connect to host
-koelbli.ch: could not connect to host
-koeldezomerdoor.nl: could not connect to host
-koenberkhout.nl: did not receive HSTS header
-koenen-bau.de: did not receive HSTS header
-koenvdheuvel.me: could not connect to host
-koerper-wie-seele.de: did not receive HSTS header
-koerperimpuls.ch: did not receive HSTS header
-koez-mangal.ch: could not connect to host
-koezmangal.ch: could not connect to host
-kogcoder.com: could not connect to host
-koha.be: did not receive HSTS header
-kohparadise.com: could not connect to host
-koi-sama.net: did not receive HSTS header
-koik.io: could not connect to host
-koirala.email: could not connect to host
-koirala.net: did not receive HSTS header
-kokenmetaanbiedingen.nl: could not connect to host
-kokensupport.com: could not connect to host
-kokoiroworks.com: could not connect to host
-kokoushuvila.fi: did not receive HSTS header
-kola-entertainments.de: did not receive HSTS header
-koladeogunleye.com: could not connect to host
-kolania.com: could not connect to host
-kolas.in: could not connect to host
-kolaykaydet.com: did not receive HSTS header
-kolbeck.tk: could not connect to host
-kolitel.com: did not receive HSTS header
-koljakrekow.de: did not receive HSTS header
-kolkataflowermall.com: could not connect to host
-kollawat.me: could not connect to host
-kollect.ie: max-age too low: 7889238
-kolonie-am-stadtpark.de: could not connect to host
-kolorbon.com: did not receive HSTS header
-komall.net: could not connect to host
-kombidorango.com.br: could not connect to host
-komikito.com: could not connect to host
-komiksbaza.pl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-komodolabs.com: did not receive HSTS header
-kompetenzwerft.de: did not receive HSTS header
-kompjoeter.net: could not connect to host
-konata.us: could not connect to host
-kongbaofang.com: could not connect to host
-kongsecuritydata.com: did not receive HSTS header
-konicaprinterdriver.com: could not connect to host
-koninkrijk.net: could not connect to host
-konkai.store: could not connect to host
-konkurs.ba: could not connect to host
-konoe.studio: did not receive HSTS header
-konsertoversikt.no: could not connect to host
-kontakthuman.hu: did not receive HSTS header
-kontaxis.network: could not connect to host
-kontenido.net: did not receive HSTS header
-konventseliten.se: could not connect to host
-koof.win: could not connect to host
-koolerbythelake.org: did not receive HSTS header
-koopjesnel.nl: could not connect to host
-koordinate.net: could not connect to host
-kopio.jp: could not connect to host
-kopular.com: could not connect to host
-korem011-tniad.mil.id: did not receive HSTS header
-kori.ml: did not receive HSTS header
-kornersafe.com: could not connect to host
-korni22.org: did not receive HSTS header
-korobi.io: did not receive HSTS header
-korono.de: did not receive HSTS header
-korsanparti.org: did not receive HSTS header
-kortic.com: did not receive HSTS header
-kosaki.moe: could not connect to host
-kosho.org: did not receive HSTS header
-kosonaudioteca.com: did not receive HSTS header
-kostuumstore.nl: could not connect to host
-kostya.net: did not receive HSTS header
-kotakoo.id: could not connect to host
-kotausaha.com: could not connect to host
-kotelezobiztositas.eu: could not connect to host
-kotomei.moe: could not connect to host
-kotonehoko.net: could not connect to host
-kotonoha.cafe: did not receive HSTS header
-kotorimusic.ga: could not connect to host
-kotovstyle.ru: could not connect to host
-kottur.is: could not connect to host
-koukni.cz: did not receive HSTS header
-kouponboket.com: did not receive HSTS header
-kourpe.online: could not connect to host
-kousaku.jp: could not connect to host
-kouten-jp.com: could not connect to host
-kovaldo.ru: could not connect to host
-kovals.sk: did not receive HSTS header
-kovnsk.net: could not connect to host
-kowabit.de: max-age too low: 2592000
-kowshiksundararajan.com: could not connect to host
-koyaanis.com: did not receive HSTS header
-kozmik.co: could not connect to host
-kozossegireklamozas.hu: could not connect to host
-kp0809.com: could not connect to host
-kpaycoin.com: did not receive HSTS header
-kpdyer.com: did not receive HSTS header
-kpebetka.net: did not receive HSTS header
-kpmgccc.co.nz: did not receive HSTS header
-kpmgpublications.ie: did not receive HSTS header
-kpn-dnssec.com: could not connect to host
-kpntdolive.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-kprog.net: could not connect to host
-kpvpn.com: could not connect to host
-kpx1.de: could not connect to host
-kqqzyl.com: did not receive HSTS header
-kr.cm: did not receive HSTS header
-kraigwalker.com: could not connect to host
-kraiwan.com: did not receive HSTS header
-kraiwon.com: did not receive HSTS header
-kramer-edelstahl.de: did not receive HSTS header
-krampus-fischamend.at: did not receive HSTS header
-krant.nl: did not receive HSTS header
-krasavchik.by: could not connect to host
-krasota.ru: did not receive HSTS header
-krausen.ca: could not connect to host
-krausoft.hu: did not receive HSTS header
-kravelindo-adventure.com: could not connect to host
-krazyboi.com: did not receive HSTS header
-krc.link: could not connect to host
-kream.io: did not receive HSTS header
-kreavis.com: did not receive HSTS header
-kreb.io: could not connect to host
-kredietpaspoort.nl: did not receive HSTS header
-kredigram.com: could not connect to host
-kredita.dk: did not receive HSTS header
-kredite.sale: could not connect to host
-kredite24.de: did not receive HSTS header
-kreditkarte-fuer-backpacker.de: could not connect to host
-kreditzone.ml: could not connect to host
-kreen.org: did not receive HSTS header
-krey.is: could not connect to host
-kreza.de: could not connect to host
-krfuli.com: could not connect to host
-kriegskindernothilfe.de: could not connect to host
-kriegt.es: did not receive HSTS header
-krillz.se: could not connect to host
-kriptosec.com: could not connect to host
-kris.click: did not receive HSTS header
-krishouse.fr: could not connect to host
-krislamoureux.com: could not connect to host
-krist.club: did not receive HSTS header
-kristenpaigejohnson.com: could not connect to host
-kristofferkoch.com: could not connect to host
-krizek.cc: could not connect to host
-krizevackapajdasija.hr: could not connect to host
-kroetenfuchs.de: could not connect to host
-krokodent.de: did not receive HSTS header
-krommo.pe: did not receive HSTS header
-kronaw.it: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-kronnos-gen.com: could not connect to host
-krony.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-kronych.cz: could not connect to host
-kroodle.nl: did not receive HSTS header
-kroyclothing.co.uk: did not receive HSTS header
-kruegerrand-wert.de: did not receive HSTS header
-krukhmer.com: did not receive HSTS header
-krunut.com: did not receive HSTS header
-krupacars.pl: did not receive HSTS header
-krusesec.com: could not connect to host
-kruu.de: could not connect to host
-kruzhki-s-kartinkami.ru: did not receive HSTS header
-krypteia.org: could not connect to host
-kryptomodkingz.com: could not connect to host
-krytykawszystkiego.com: could not connect to host
-krytykawszystkiego.pl: could not connect to host
-ks-89.com: could not connect to host
-ks015.com: could not connect to host
-ks318.com: did not receive HSTS header
-ks410.com: could not connect to host
-ks8.com: could not connect to host
-ksfh-mail.de: could not connect to host
-kshlm.in: did not receive HSTS header
-ksk-agentur.de: did not receive HSTS header
-kspg.tv: did not receive HSTS header
-kstan.me: did not receive HSTS header
-kswcosmetics.com: could not connect to host
-kswriter.com: could not connect to host
-kteen.info: could not connect to host
-ktsofas.gr: did not receive HSTS header
-ktube.yt: could not connect to host
-ku-7.club: could not connect to host
-kuaikan1.com: could not connect to host
-kuaitiyu.org: could not connect to host
-kuanta.net: did not receive HSTS header
-kuba.guide: could not connect to host
-kubanitoscali.com: could not connect to host
-kubica.ch: could not connect to host
-kubierecki.pl: could not connect to host
-kubiwa.net: did not receive HSTS header
-kubusadvocaten.nl: could not connect to host
-kuchenfeelisa.de: did not receive HSTS header
-kuchenschock.de: did not receive HSTS header
-kucheryavenkovn.ru: could not connect to host
-kucom.it: could not connect to host
-kucukayvaz.com: could not connect to host
-kueche-co.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-kuechenplan.online: could not connect to host
-kuechenprofi-group.de: did not receive HSTS header
-kueulangtahunanak.net: could not connect to host
-kugelblitz.co: could not connect to host
-kuko-crews.org: could not connect to host
-kulickovy-pojezd.cz: did not receive HSTS header
-kulopo.com: could not connect to host
-kum.com: did not receive HSTS header
-kumilasvegas.com: could not connect to host
-kummerlaender.eu: did not receive HSTS header
-kundenerreichen.com: could not connect to host
-kundenerreichen.de: could not connect to host
-kunstfehler.at: did not receive HSTS header
-kunstschule-krabax.de: did not receive HSTS header
-kunvn.com: did not receive HSTS header
-kunzesoftware.com.br: could not connect to host
-kuops.com: did not receive HSTS header
-kupdokuchyne.cz: could not connect to host
-kupelne-ptacek.sk: could not connect to host
-kupiec.eu.org: did not receive HSTS header
-kuppingercole.com: did not receive HSTS header
-kura.io: could not connect to host
-kurashino-mall.com: could not connect to host
-kurd-online.tk: could not connect to host
-kurehun.org: could not connect to host
-kurgancity.tk: could not connect to host
-kuro.link: did not receive HSTS header
-kuro346.moe: could not connect to host
-kurofuku.me: could not connect to host
-kurrende.nrw: could not connect to host
-kurrietv.nl: could not connect to host
-kursprogramisty.pl: did not receive HSTS header
-kurszielnull.de: could not connect to host
-kurtmclester.com: could not connect to host
-kurumi.io: could not connect to host
-kurz.pw: could not connect to host
-kurzonline.com.br: could not connect to host
-kusadasiforum.com: did not receive HSTS header
-kuscu.co: could not connect to host
-kushtikidsparties.co.uk: could not connect to host
-kutip.id: could not connect to host
-kuunlamaailm.ee: did not receive HSTS header
-kuwago.io: could not connect to host
-kuzbass-pwl.ru: could not connect to host
-kuzdrowiu24.pl: could not connect to host
-kvestmaster.ru: did not receive HSTS header
-kvn.tf: did not receive HSTS header
-kvt.berlin: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-kwidz.fr: did not receive HSTS header
-kwikmed.eu: could not connect to host
-kwiknews.com: could not connect to host
-kwipi.com: did not receive HSTS header
-kwmr.me: did not receive HSTS header
-kwok.cc: did not receive HSTS header
-kwok.tv: could not connect to host
-kwondratsch.com: could not connect to host
-kxind.cn: could not connect to host
-kxline.com: could not connect to host
-kxway.com: did not receive HSTS header
-kyberna.xyz: could not connect to host
-kybqp.com: could not connect to host
-kybqp.net: could not connect to host
-kykoonn.net: did not receive HSTS header
-kylapps.com: did not receive HSTS header
-kyle.place: could not connect to host
-kylelaker.com: did not receive HSTS header
-kylerwood.com: could not connect to host
-kylescastles.co.uk: could not connect to host
-kylianvermeulen.nl: could not connect to host
-kyliehunt.com: did not receive HSTS header
-kylling.io: did not receive HSTS header
-kymo.org: did not receive HSTS header
-kyobostory-events.com: could not connect to host
-kyochon.fr: could not connect to host
-kyonagashima.com: did not receive HSTS header
-kyoto-sake.net: could not connect to host
-kyoto-tomikawa.jp: did not receive HSTS header
-kyouko.nl: could not connect to host
-kysil.org: could not connect to host
-kyujin-office.net: could not connect to host
-kzjnet.com: could not connect to host
-l-1.xyz: could not connect to host
-l-2.xyz: could not connect to host
-l-3.xyz: could not connect to host
-l-rickroll-i.pw: could not connect to host
-l.me.uk: did not receive HSTS header
-l18.io: could not connect to host
-l3.ee: could not connect to host
-l30365.com: could not connect to host
-l3j.net: could not connect to host
-l456852.com: max-age too low: 0
-l5197.co: could not connect to host
-l6729.co: could not connect to host
-l6729.com: did not receive HSTS header
-l6957.co: could not connect to host
-l6957.com: did not receive HSTS header
-l81365.com: did not receive HSTS header
-l81818.com: did not receive HSTS header
-l82365.com: did not receive HSTS header
-l9.fr: did not receive HSTS header
-l9297.co: could not connect to host
-l9397.com: could not connect to host
-l9721.com: did not receive HSTS header
-l9728.co: could not connect to host
-la-cave-a-nodo.fr: did not receive HSTS header
-la-flora-negra.de: could not connect to host
-la-grande-jaugue.fr: did not receive HSTS header
-la-retraite-info.com: could not connect to host
-la-serendipite.fr: did not receive HSTS header
-la-tourmaline.ch: could not connect to host
-laac.io: could not connect to host
-labaia.info: could not connect to host
-labeled.vn: could not connect to host
-labella-umbrella.com: did not receive HSTS header
-labelleza.com.br: could not connect to host
-labfox.de: did not receive HSTS header
-labibikids.com.br: could not connect to host
-labina.com.tr: did not receive HSTS header
-labms.com.au: did not receive HSTS header
-laboiteanem.fr: could not connect to host
-laboiteapc.fr: did not receive HSTS header
-laboitebio-logique.ca: could not connect to host
-labordata.io: could not connect to host
-laborie.io: could not connect to host
-laboutiquemarocaineduconvoyeur.com: could not connect to host
-laboutiquemarocaineduconvoyeur.ma: could not connect to host
-laboxfaitsoncinema.com: could not connect to host
-labrador-retrievers.com.au: did not receive HSTS header
-labrasaq8.com: did not receive HSTS header
-labs.directory: could not connect to host
-labs.moscow: could not connect to host
-labs.ro: did not receive HSTS header
-labtest.ltd: could not connect to host
-lacarpesaintaubinoise.fr: did not receive HSTS header
-lacasa.fr: could not connect to host
-lacaserita.org: could not connect to host
-lacasseroy.com: could not connect to host
-lacaverne.nl: could not connect to host
-lachosetypo.com: could not connect to host
-lacicloud.net: could not connect to host
-lacigf.org: did not receive HSTS header
-lacledelareussite.com: did not receive HSTS header
-lacledeslan.ninja: could not connect to host
-lacuerba.com: did not receive HSTS header
-lacuevadechauvet.com: did not receive HSTS header
-ladakhtrip.tours: could not connect to host
-ladeboks.dk: could not connect to host
-lady-2.jp: did not receive HSTS header
-ladyanna.de: could not connect to host
-ladybugjam.com: could not connect to host
-ladylikeit.com: could not connect to host
-ladylucks.co.uk: did not receive HSTS header
-ladymakeup.ru: could not connect to host
-ladyofsongstv.com: could not connect to host
-laegernevedlillebaelt.dk: could not connect to host
-laemen.com: did not receive HSTS header
-laemen.nl: could not connect to host
-laeryn.com: could not connect to host
-laeso.es: did not receive HSTS header
-laf.in.net: could not connect to host
-lafamillemusique.fr: did not receive HSTS header
-lafeemam.fr: could not connect to host
-lafkor.de: did not receive HSTS header
-laforetenchantee.ch: could not connect to host
-lafosseobservatoire.be: did not receive HSTS header
-lafr4nc3.xyz: could not connect to host
-lag-gbr.gq: could not connect to host
-lagalerievirtuelle.fr: did not receive HSTS header
-lagarderob.ru: did not receive HSTS header
-lagier.xyz: could not connect to host
-lagodny.eu: could not connect to host
-lagoza.name: could not connect to host
-laguiadelvaron.com: did not receive HSTS header
-lagunacoastrealestate.com: did not receive HSTS header
-lahora.com.ec: did not receive HSTS header
-lai.zone: could not connect to host
-lain.li: did not receive HSTS header
-lainchan.org: did not receive HSTS header
-laisashop.com.br: could not connect to host
-lajijonencadebarbera.com: could not connect to host
-lakarwebb.se: could not connect to host
-lakatrop.com: could not connect to host
-lakeee.com: could not connect to host
-lakefrontlittleelm.com: did not receive HSTS header
-lakehavasucityhomebuyerscredit.com: could not connect to host
-lakehavasucitynews.com: could not connect to host
-lakehavasuhomebuyercredit.com: could not connect to host
-lakehavasuhomes.info: did not receive HSTS header
-lakehavasuhouserentals.com: could not connect to host
-lakehavasuhouses.com: did not receive HSTS header
-lakewoodcomputerservices.com: could not connect to host
-lakhesis.net: did not receive HSTS header
-lalajj.com: could not connect to host
-lalingua.ir: did not receive HSTS header
-laltroweb.it: did not receive HSTS header
-lamafioso.com: could not connect to host
-lamaisondelatransformationculturelle.com: did not receive HSTS header
-lambda-complex.org: could not connect to host
-lambdafive.co.uk: could not connect to host
-lambdaof.xyz: could not connect to host
-lame1337.xyz: could not connect to host
-lamed.se: did not receive HSTS header
-lamiaposta.email: did not receive HSTS header
-lampsh.ml: could not connect to host
-lamtv.com.mx: could not connect to host
-lamunyon.com: did not receive HSTS header
-lanauzedesigns.com: did not receive HSTS header
-lanboll.com: could not connect to host
-lanbyte.se: could not connect to host
-lancashirecca.org.uk: could not connect to host
-lancehoteis.com: did not receive HSTS header
-lancehoteis.com.br: did not receive HSTS header
-lancejames.com: could not connect to host
-lancork.net: could not connect to host
-landell.ml: could not connect to host
-landgoedverkopen.nl: could not connect to host
-landhaus-christmann.de: did not receive HSTS header
-landhuisverkopen.nl: could not connect to host
-landoverhillsmd.gov: could not connect to host
-landscape.canonical.com: max-age too low: 2592000
-landscapelightingpacificpalisades.com: could not connect to host
-landscapingmedic.com: could not connect to host
-langenbach.rocks: could not connect to host
-langendorf-ernaehrung-training.de: could not connect to host
-langendries.eu: did not receive HSTS header
-langguth.io: did not receive HSTS header
-langjp.com: could not connect to host
-langkahteduh.com: could not connect to host
-langotie.com.br: could not connect to host
-lanhhuyet510.tk: could not connect to host
-laniakean.com: did not receive HSTS header
-lansewu.com: could not connect to host
-lansinoh.co.uk: did not receive HSTS header
-lanyang.tk: could not connect to host
-lanzainc.xyz: did not receive HSTS header
-laobox.fr: could not connect to host
-laohei.org: did not receive HSTS header
-laospage.com: could not connect to host
-laozhu.me: could not connect to host
-lapakus.com: could not connect to host
-laparoscopia.com.mx: did not receive HSTS header
-laperfumista.es: could not connect to host
-lapetition.be: could not connect to host
-lapix.com.co: did not receive HSTS header
-laplaceduvillage.net: could not connect to host
-laquack.com: did not receive HSTS header
-laraigneedusoir.com: did not receive HSTS header
-laravelsaas.com: could not connect to host
-larawoodarts.com: could not connect to host
-larch.me: could not connect to host
-larcotravel.com.pe: did not receive HSTS header
-lared.ovh: did not receive HSTS header
-laredsemanario.com: could not connect to host
-larky.top: could not connect to host
-larotayogaming.com: did not receive HSTS header
-larptreff.de: could not connect to host
-larsgujord.no: could not connect to host
-larsmerke.de: did not receive HSTS header
-larvatoken.org: could not connect to host
-lasepiataca.com: could not connect to host
-lasercloud.ml: did not receive HSTS header
-laserfuchs.de: did not receive HSTS header
-lasertechsolutions.com: could not connect to host
-lashstuff.com: did not receive HSTS header
-lasnaves.com: did not receive HSTS header
-lasonorastereo.com: did not receive HSTS header
-lasseleegaard.com: could not connect to host
-lasseleegaard.dk: could not connect to host
-lasseleegaard.net: could not connect to host
-lasseleegaard.org: could not connect to host
-lasst-uns-beten.de: could not connect to host
-lastbutnotyeast.com: could not connect to host
-lastchancetraveler.com: did not receive HSTS header
-lasterhub.me: could not connect to host
-lastharo.com: could not connect to host
-lastrada-minden.de: could not connect to host
-lastweekinaws.com: did not receive HSTS header
-latable-bowling-vire.fr: did not receive HSTS header
-latabledebry.be: could not connect to host
-latabledemontebello.com: could not connect to host
-latamarissiere.eu: did not receive HSTS header
-latanews.com: did not receive HSTS header
-lateliercantaldeco.fr: could not connect to host
-latelierdekathy.com: could not connect to host
-latemodern.com: did not receive HSTS header
-lateral.dog: could not connect to host
-lateralsecurity.com: could not connect to host
-latestbuy.com.au: did not receive HSTS header
-latetrain.cn: could not connect to host
-lathamlabs.com: could not connect to host
-lathamlabs.net: could not connect to host
-lathamlabs.org: could not connect to host
-lathen-wahn.de: did not receive HSTS header
-latiendadelbebefeliz.com: could not connect to host
-latinmusicrecords.com: could not connect to host
-latinoramarecords.com: could not connect to host
-latinosup.com: did not receive HSTS header
-latinosuptv.com: did not receive HSTS header
-latinphone.com: could not connect to host
-latinred.com: could not connect to host
-latintoy.com: did not receive HSTS header
-latitude42technology.com: did not receive HSTS header
-latour-managedcare.ch: could not connect to host
-latrine.cz: did not receive HSTS header
-latus.xyz: could not connect to host
-laufcampus.com: did not receive HSTS header
-laufers.pl: did not receive HSTS header
-laufseminare-laufreisen.com: did not receive HSTS header
-lauftrainer-ausbildung.com: did not receive HSTS header
-laughinggrapepublishing.com: did not receive HSTS header
-launchkey.com: did not receive HSTS header
-laupv.online: could not connect to host
-lauravaindumentaria.com: did not receive HSTS header
-laurel4th.org: did not receive HSTS header
-laurelcountycorrectionsky.gov: could not connect to host
-laurelspaandlash.com: did not receive HSTS header
-laureltv.org: did not receive HSTS header
-laurent-e-levy.com: did not receive HSTS header
-lauritzt.cf: could not connect to host
-lausannelovers.ch: could not connect to host
-lausitzer-widerstand.de: did not receive HSTS header
-laussat.de: could not connect to host
-lavapot.com: did not receive HSTS header
-lavasing.eu.org: could not connect to host
-lavenderx.org: could not connect to host
-laventainnhotel-mailing.com: could not connect to host
-lavine.ch: did not receive HSTS header
-lavishlooksstudio.com.au: could not connect to host
-lavito.cz: could not connect to host
-lavitrine-une-collection.be: did not receive HSTS header
-lavka-konditera.com: did not receive HSTS header
-lavoniaga.gov: did not receive HSTS header
-lavval.com: could not connect to host
-lawbirduk.com: did not receive HSTS header
-lawfirm.tips: did not receive HSTS header
-lawformt.com: max-age too low: 2592000
-lawly.org: did not receive HSTS header
-lawrence-institute.com: could not connect to host
-lawrenceberg.nl: could not connect to host
-lawrencecountyboe-ohio.gov: did not receive HSTS header
-lawrenceklepinger.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-lawyerdigital.co.bw: could not connect to host
-laxatus.com: could not connect to host
-laxiongames.es: could not connect to host
-lay1688.com: max-age too low: 0
-layer8.tk: could not connect to host
-layfully.me: could not connect to host
-laymans911.info: could not connect to host
-lazapateriahandmade.pe: could not connect to host
-lazerus.net: could not connect to host
-lazisbaiturrahman.org: could not connect to host
-lazowik.pl: did not receive HSTS header
-lazulu.com: could not connect to host
-lazytux.de: did not receive HSTS header
-lb366.cc: could not connect to host
-lb369.cc: could not connect to host
-lbls.me: could not connect to host
-lbphacker.pw: could not connect to host
-lbrlh.tk: could not connect to host
-lbrli.tk: could not connect to host
-lbrls.tk: could not connect to host
-lbrt.xyz: could not connect to host
-lc1818.com: could not connect to host
-lc3799.com: could not connect to host
-lc3802.com: could not connect to host
-lc6665.com: could not connect to host
-lc6681.com: could not connect to host
-lc6686.com: could not connect to host
-lc68693.com: could not connect to host
-lc7979g.com: could not connect to host
-lc8.com: could not connect to host
-lc8.life: could not connect to host
-lc8.tv: could not connect to host
-lc8.vc: could not connect to host
-lc80000.com: could not connect to host
-lc8005.com: could not connect to host
-lc8181.com: could not connect to host
-lc859.com: could not connect to host
-lc876.com: could not connect to host
-lc8865.com: could not connect to host
-lc8885.com: could not connect to host
-lc8905.com: could not connect to host
-lc8906.com: could not connect to host
-lc8910.com: could not connect to host
-lc8911.com: could not connect to host
-lc8912.com: could not connect to host
-lc8914.com: could not connect to host
-lc8915.com: could not connect to host
-lc8916.com: could not connect to host
-lc8917.com: could not connect to host
-lc8918.com: could not connect to host
-lc892.com: could not connect to host
-lc8924.com: could not connect to host
-lc8925.com: could not connect to host
-lc8926.com: could not connect to host
-lc8928.com: could not connect to host
-lc8929.com: could not connect to host
-lc8930.com: could not connect to host
-lc897.com: could not connect to host
-lc8c.com: could not connect to host
-lc8dc15.com: could not connect to host
-lc8dc26.com: could not connect to host
-lc8dc28.com: could not connect to host
-lc8md77.com: could not connect to host
-lc9.app: could not connect to host
-lc90000.com: could not connect to host
-lc9108.com: could not connect to host
-lc9256.com: could not connect to host
-lc9852.com: could not connect to host
-lc9862.com: could not connect to host
-lc9899.com: could not connect to host
-lc9900.com: could not connect to host
-lc9910.com: could not connect to host
-lc9920.com: could not connect to host
-lc9930.com: could not connect to host
-lc9940.com: could not connect to host
-lc9950.com: could not connect to host
-lc9999g.com: could not connect to host
-lca.gov: could not connect to host
-lcbizsolutions.com: could not connect to host
-lcdn.ro: could not connect to host
-lcgabogados.com: could not connect to host
-lclarkpdx.com: could not connect to host
-lcrmscp.gov: could not connect to host
-lcti.biz: could not connect to host
-lcx.cc: could not connect to host
-lcy.cat: could not connect to host
-lcybox.com: did not receive HSTS header
-ldarby.me.uk: could not connect to host
-ldcraft.pw: could not connect to host
-ldesignweb.com: could not connect to host
-le-blog.ch: could not connect to host
-le-cameleon.fr: max-age too low: 0
-le-dev.de: did not receive HSTS header
-le-hosting.de: did not receive HSTS header
-le0.me: could not connect to host
-le052.com: could not connect to host
-le0yn.ml: could not connect to host
-le130rb.com: could not connect to host
-le802.com: could not connect to host
-leadership9.com: could not connect to host
-leadgenie.me: could not connect to host
-leadingsalons.com: did not receive HSTS header
-leadpagebuilders.com: could not connect to host
-leadplan.ru: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-leadstart.org: could not connect to host
-leak.media: could not connect to host
-leakedminecraft.net: could not connect to host
-leakreporter.net: could not connect to host
-leaks.directory: could not connect to host
-leanclub.org: could not connect to host
-leandre.cn: could not connect to host
-leaodarodesia.com.br: could not connect to host
-leapday.us: could not connect to host
-leardev.de: did not receive HSTS header
-learn-smart.uk: did not receive HSTS header
-learndev.info: did not receive HSTS header
-learnedhacker.com: could not connect to host
-learnedovo.com: could not connect to host
-learnforestry.com: could not connect to host
-learnfrenchfluently.com: could not connect to host
-learngreenlandic.com: did not receive HSTS header
-learningaboutcarinsurance.com: did not receive HSTS header
-learningorder.com: could not connect to host
-learnpianogreece.com: could not connect to host
-learnsait2.azurewebsites.net: did not receive HSTS header
-learntale.com: could not connect to host
-learnthetruth.tk: could not connect to host
-learntotradethemarket.com: did not receive HSTS header
-learntube.cz: did not receive HSTS header
-leaseit24.com: could not connect to host
-leaseit24.de: could not connect to host
-leaseourthings.com: could not connect to host
-leasit.at: could not connect to host
-leasit.de: could not connect to host
-leavenworthcounty.gov: did not receive HSTS header
-leavesofchangeweekly.org: could not connect to host
-lebal.se: could not connect to host
-lebanonoregon.gov: did not receive HSTS header
-lebedata.com: did not receive HSTS header
-lebosse.me: did not receive HSTS header
-lebrun.org: could not connect to host
-lechaudrondupertuis.ch: could not connect to host
-lecheng.in: could not connect to host
-lecheng2.com: could not connect to host
-lecheng3.com: could not connect to host
-lecheng31.com: could not connect to host
-lecheng7.com: could not connect to host
-lecheng88.net: could not connect to host
-leclaire.com.br: did not receive HSTS header
-lecn2.com: did not receive HSTS header
-lecoinchocolat.com: could not connect to host
-lecourtier.fr: did not receive HSTS header
-led-tl-wereld.nl: did not receive HSTS header
-led.xyz: could not connect to host
-ledcpu.com: could not connect to host
-leddruckalarm.de: could not connect to host
-ledensite.com: could not connect to host
-lederkleren.nl: could not connect to host
-ledgerscope.net: could not connect to host
-ledhouse.sk: did not receive HSTS header
-ledlampor365.se: could not connect to host
-ledshop.mx: did not receive HSTS header
-ledzom.ru: did not receive HSTS header
-leebiblestudycenter.co.uk: could not connect to host
-leebiblestudycenter.com: could not connect to host
-leebiblestudycentre.com: could not connect to host
-leebiblestudycentre.net: could not connect to host
-leebiblestudycentre.org: could not connect to host
-leefindlow.com: could not connect to host
-leegyuho.com: could not connect to host
-leelou.wedding: could not connect to host
-leemac.com.au: did not receive HSTS header
-leen.io: could not connect to host
-leere.me: could not connect to host
-leerkotte.eu: could not connect to host
-leertipp.de: could not connect to host
-leet2.com: could not connect to host
-leetsaber.com: did not receive HSTS header
-leftoye.com: did not receive HSTS header
-lega-dental.com: did not receive HSTS header
-legacylawofwashington.com: did not receive HSTS header
-legal-tender.com: did not receive HSTS header
-legal.farm: could not connect to host
-legaldesk.com: did not receive HSTS header
-legaleus.co.uk: could not connect to host
-legalisepeacebloom.com: could not connect to host
-legalrobot-uat.com: could not connect to host
-legalsen.com: did not receive HSTS header
-legaltechnology.pro: could not connect to host
-legaltip.eu: could not connect to host
-legarage.org: did not receive HSTS header
-legatofmrc.fr: could not connect to host
-legavenue.com.br: did not receive HSTS header
-legendagroup.ch: could not connect to host
-legilimens.de: could not connect to host
-legionminecraft.com: could not connect to host
-legitaxi.com: did not receive HSTS header
-legoutcheznous.com: could not connect to host
-legumefederation.org: did not receive HSTS header
-legymnase.eu: did not receive HSTS header
-lehighmathcircle.org: could not connect to host
-lehrermarktplatz.de: did not receive HSTS header
-lehtinen.xyz: did not receive HSTS header
-leigh.life: did not receive HSTS header
-leilautourdumon.de: could not connect to host
-leiming.co: could not connect to host
-leinir.dk: did not receive HSTS header
-leition.com: could not connect to host
-leitionusercontent.com: could not connect to host
-leiyun.me: could not connect to host
-lel.ovh: did not receive HSTS header
-lelambiental.com.br: did not receive HSTS header
-lelehei.com: could not connect to host
-lellyboi.ml: could not connect to host
-lelongbank.com: did not receive HSTS header
-lelux.email: could not connect to host
-lemat.de: did not receive HSTS header
-leminhduong.com: could not connect to host
-lemondrops.xyz: could not connect to host
-lemonrotools.com: could not connect to host
-lemouillour.fr: could not connect to host
-lemp.io: did not receive HSTS header
-lemuelbriza.com: could not connect to host
-lemuslimpost.com: did not receive HSTS header
-lenczu6.ddns.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-lendahandmissionteams.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-lenders.direct: could not connect to host
-lenget.com: did not receive HSTS header
-lengyelnyelvoktatas.hu: could not connect to host
-lengyelul.hu: could not connect to host
-lengzzz.com: could not connect to host
-lenit.nl: could not connect to host
-lenkunz.me: could not connect to host
-lenn1.de: did not receive HSTS header
-lennarth.com: could not connect to host
-lennartheinrich.de: could not connect to host
-lennier.info: did not receive HSTS header
-lennyfaces.net: did not receive HSTS header
-lennyobez.be: did not receive HSTS header
-lenovogaming.com: could not connect to host
-lentri.com: did not receive HSTS header
-lenzw.de: did not receive HSTS header
-leob.in: could not connect to host
-leodaniels.com: did not receive HSTS header
-leolana.com: could not connect to host
-leolemos.com.br: did not receive HSTS header
-leon-jaekel.com: could not connect to host
-leon.net: did not receive HSTS header
-leonardcamacho.me: could not connect to host
-leonauto.de: could not connect to host
-leonax.net: could not connect to host
-leopold.email: could not connect to host
-leopotamgroup.com: could not connect to host
-leoservicosetc.com.br: could not connect to host
-lepartiecomemoracoes.com.br: could not connect to host
-lepidum.jp: could not connect to host
-lepiquillo.fr: could not connect to host
-lepont.pl: could not connect to host
-leponton-lorient.fr: did not receive HSTS header
-lepourquoiducomment.fr: did not receive HSTS header
-leppis-it.de: could not connect to host
-leprado.com: could not connect to host
-lereporter.ma: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-lerlivros.online: could not connect to host
-lerner.moscow: did not receive HSTS header
-lerp.me: did not receive HSTS header
-les-corsaires.net: could not connect to host
-les-pingouins.com: could not connect to host
-les-voitures-electriques.com: max-age too low: 2592000
-lesbiansslaves.com: could not connect to host
-lesbofight.com: could not connect to host
-lescomptoirsdepierrot.com: could not connect to host
-lescourtiersbordelais.com: did not receive HSTS header
-lesdouceursdeliyana.com: could not connect to host
-lesformations.net: could not connect to host
-lesgitesdefranca.com: did not receive HSTS header
-lesh.eu: could not connect to host
-lesliekearney.com: did not receive HSTS header
-lesperlesdunet.fr: could not connect to host
-lesptitspasdelyne.fr: could not connect to host
-lesquatredauphins.fr: did not receive HSTS header
-lesscloud.com: could not connect to host
-lessets-graphiques.com: could not connect to host
-lessing.consulting: did not receive HSTS header
-letao18.com: could not connect to host
-letempsdunefleur.be: could not connect to host
-leter.io: did not receive HSTS header
-lethbridgecoffee.com: did not receive HSTS header
-letitfly.me: did not receive HSTS header
-letkidsbekids.co.uk: did not receive HSTS header
-letraba.com: could not connect to host
-letras.mus.br: did not receive HSTS header
-letreview.ph: could not connect to host
-lets.ninja: could not connect to host
-letsdocode.com: could not connect to host
-letsgetintouch.com: could not connect to host
-letskick.ru: did not receive HSTS header
-letsmultiplayerplay.com: did not receive HSTS header
-letsnet.org: could not connect to host
-letson.me: could not connect to host
-letstox.com: could not connect to host
-lettland-firma.com: could not connect to host
-letustravel.tk: did not receive HSTS header
-letzchange.org: did not receive HSTS header
-levante.com.au: could not connect to host
-levatc.tk: could not connect to host
-level-10.net: could not connect to host
-level3.xyz: could not connect to host
-level6.me: could not connect to host
-levelaccordingly.com: could not connect to host
-levelcheat.com: could not connect to host
-levelum.com: did not receive HSTS header
-leveluprails.com: did not receive HSTS header
-leventmebel.com: did not receive HSTS header
-leveredge.net: could not connect to host
-levert.ch: could not connect to host
-levittasaude.com.br: did not receive HSTS header
-lewdlist.com: did not receive HSTS header
-lewis.li: did not receive HSTS header
-lewisjuggins.co.uk: did not receive HSTS header
-lexiphanic.co.uk: did not receive HSTS header
-lexoo.co.uk: could not connect to host
-lexpartsofac.com: could not connect to host
-lexxyn.nl: did not receive HSTS header
-leyun.cloud: did not receive HSTS header
-lez-cuties.com: could not connect to host
-lezard-com.fr: did not receive HSTS header
-lezdomsm.com: could not connect to host
-lfaz.org: could not connect to host
-lffweb.ga: could not connect to host
-lfklzw.com: could not connect to host
-lfrconseil.com: could not connect to host
-lfullerdesign.com: could not connect to host
-lg0.site: could not connect to host
-lg21.co: could not connect to host
-lgbt.ventures: could not connect to host
-lgbtventures.com: could not connect to host
-lgcamsps.com: could not connect to host
-lgiswa.com.au: did not receive HSTS header
-lgnsh.fr: could not connect to host
-lgrs.com.au: did not receive HSTS header
-lgsg.us: could not connect to host
-lgts.se: could not connect to host
-lhakustik.se: could not connect to host
-lhalbert.xyz: could not connect to host
-lhasaapso.com.br: could not connect to host
-lheinrich.com: could not connect to host
-lheinrich.de: could not connect to host
-lheinrich.org: could not connect to host
-lhsj28.com: could not connect to host
-lhsj68.com: could not connect to host
-lhsj78.com: could not connect to host
-li756.com: max-age too low: 0
-liaillustr.at: did not receive HSTS header
-liam-is-a-nig.ga: could not connect to host
-liamjack.fr: could not connect to host
-lian-in.net: could not connect to host
-liangbp.com: could not connect to host
-liangyichen.net: did not receive HSTS header
-lianhongrui.com: did not receive HSTS header
-lianwen.kim: could not connect to host
-lianye.in: could not connect to host
-lianye1.cc: could not connect to host
-lianye2.cc: could not connect to host
-lianye3.cc: could not connect to host
-lianye4.cc: could not connect to host
-lianye5.cc: could not connect to host
-lianye6.cc: could not connect to host
-lianyexiuchang.in: could not connect to host
-liaoshuma.com: could not connect to host
-liaozheqi.cn: could not connect to host
-liaronce.win: could not connect to host
-libanco.com: could not connect to host
-libbitcoin.org: could not connect to host
-libdeer.so: could not connect to host
-libertarian-party.com: could not connect to host
-libertas-tech.com: could not connect to host
-libertins.date: did not receive HSTS header
-libertyrp.org: could not connect to host
-libfte.org: did not receive HSTS header
-libnull.com: could not connect to host
-libo766.com: could not connect to host
-librairie-asie.com: did not receive HSTS header
-library.linode.com: did not receive HSTS header
-libraryofcode.us: could not connect to host
-libre.university: could not connect to host
-librechan.net: could not connect to host
-libreduca.com: could not connect to host
-librends.org: could not connect to host
-librerias-he.com.pe: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-libricks.fr: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-librosdescargas.club: could not connect to host
-libruis.com: could not connect to host
-libwebsockets.org: could not connect to host
-libzik.com: could not connect to host
-licence-registry.com: could not connect to host
-liceserv.com: could not connect to host
-lichess4545.com: did not receive HSTS header
-lichess4545.tv: did not receive HSTS header
-lichtletters-huren.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-lickingcounty.gov: did not receive HSTS header
-lickmypussy.us: did not receive HSTS header
-lidl-menubox.ch: could not connect to host
-lidl-selection.at: could not connect to host
-lidlovajogurteka.si: could not connect to host
-lie.as: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-liebach.me: did not receive HSTS header
-liebestarot.at: did not receive HSTS header
-lieblingsholz.de: could not connect to host
-liebt.schule: could not connect to host
-lied8.eu: could not connect to host
-lierrmm.space: could not connect to host
-lietaer.eu: did not receive HSTS header
-life-like.com: did not receive HSTS header
-lifecism.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-lifecoach.tw: did not receive HSTS header
-lifecoachproviders.com: could not connect to host
-lifeenrichmentnc.com: did not receive HSTS header
-lifegrip.com.au: did not receive HSTS header
-lifeguard.aecom.com: did not receive HSTS header
-lifeguatemala.com: could not connect to host
-lifeinitsownway.com: could not connect to host
-lifeinsuranceresource.com: did not receive HSTS header
-lifeinsurances.pro: could not connect to host
-lifeinsurances24.com: could not connect to host
-lifeisabug.com: could not connect to host
-lifekiss.ru: could not connect to host
-lifemarque.co.uk: did not receive HSTS header
-lifenexto.com: could not connect to host
-lifeng.us: did not receive HSTS header
-lifeonplanetjapan.com: did not receive HSTS header
-lifequotes-uk.co.uk: could not connect to host
-lifereset.it: did not receive HSTS header
-lifeskillsdirect.com: did not receive HSTS header
-lifestyle7788.com: could not connect to host
-lifestylecent.com: could not connect to host
-lifestyler.me: could not connect to host
-lifestyletravel.co.za: did not receive HSTS header
-lifetimemoneymachine.com: did not receive HSTS header
-lifeupgame.fr: could not connect to host
-light-up.xyz: did not receive HSTS header
-lightarmory.com: could not connect to host
-lightcloud.com: did not receive HSTS header
-lightdark.xyz: could not connect to host
-lightdream.tech: could not connect to host
-lighthouseinstruments.com: did not receive HSTS header
-lightingpacificpalisades.com: could not connect to host
-lightme.us: could not connect to host
-lightning-ashe.com: did not receive HSTS header
-lightnovelsekai.com: could not connect to host
-lightpaste.com: could not connect to host
-lightpics.net: did not receive HSTS header
-lights.ie: did not receive HSTS header
-lighttherapydevice.com: did not receive HSTS header
-lightupcollective.co.uk: could not connect to host
-lightworx.io: could not connect to host
-lignemalin.com: could not connect to host
-lignemax.com: did not receive HSTS header
-lignenet.com: did not receive HSTS header
-lijero.co: could not connect to host
-like.lgbt: could not connect to host
-likefluence.com: did not receive HSTS header
-likenewhearing.com.au: could not connect to host
-likenosis.com: could not connect to host
-likestudio.com.ua: could not connect to host
-likui.me: could not connect to host
-lila.pink: could not connect to host
-lilaccakeboutique.com: could not connect to host
-lilai18.ph: could not connect to host
-lilai634.com: could not connect to host
-lilai6616.com: could not connect to host
-lilapmedia.com: could not connect to host
-lilismartinis.com: could not connect to host
-lilliangray.co.za: did not receive HSTS header
-lillpopp.eu: did not receive HSTS header
-lilycms.com: could not connect to host
-lilygreen.co.za: could not connect to host
-lilylasvegas.com: could not connect to host
-limalama.eu: could not connect to host
-limeburst.net: did not receive HSTS header
-limelabs.de: did not receive HSTS header
-limelabs.io: did not receive HSTS header
-limeres.com: did not receive HSTS header
-limereslaw.com: did not receive HSTS header
-limeyeti.com: could not connect to host
-limiteddata.co.uk: could not connect to host
-limitget.com: could not connect to host
-limn.me: could not connect to host
-limnt.cn: could not connect to host
-limoairporttoronto.net: could not connect to host
-limodo-shop.de: did not receive HSTS header
-limousineservicezurich.com: did not receive HSTS header
-limpens.net: did not receive HSTS header
-limpido.it: could not connect to host
-limsia.co: could not connect to host
-limsia.com: could not connect to host
-limunana.com: could not connect to host
-lin2018168.com: max-age too low: 0
-linan.blog: did not receive HSTS header
-linan.info: could not connect to host
-linan.me: did not receive HSTS header
-linan.site: could not connect to host
-linasjourney.com: did not receive HSTS header
-linchpin-it.com: did not receive HSTS header
-lincolnboolefoundation.org: could not connect to host
-lincolncountytn.gov: could not connect to host
-lincolnsfh.com: max-age too low: 0
-lincsbouncycastlehire.co.uk: could not connect to host
-lindberg.io: did not receive HSTS header
-lindemann.space: did not receive HSTS header
-lindholmen.club: did not receive HSTS header
-lindsayanderson.com: could not connect to host
-line.red: did not receive HSTS header
-linearaudio.nl: did not receive HSTS header
-lineauniformes.com.br: could not connect to host
-linernotekids.com: could not connect to host
-linestriperdepot.com: did not receive HSTS header
-linext.cn: could not connect to host
-linfamilygc.com: did not receive HSTS header
-lingerie.net.br: did not receive HSTS header
-lingerielovers.com.br: could not connect to host
-lingerieonline.com.br: could not connect to host
-lingros-test.tk: could not connect to host
-lingting.vip: could not connect to host
-linguamilla.com: did not receive HSTS header
-linguaquote.com: did not receive HSTS header
-lingvo-svoboda.ru: did not receive HSTS header
-linhaoyi.com: could not connect to host
-linherest.tk: could not connect to host
-linhua.org: could not connect to host
-link.ba: could not connect to host
-linkage.ph: did not receive HSTS header
-linkages.org: could not connect to host
-linkat4.cz: could not connect to host
-linkk9.com: did not receive HSTS header
-linkonaut.net: could not connect to host
-linksanitizer.com: could not connect to host
-linksextremist.at: could not connect to host
-linkst.co: could not connect to host
-linkstream.live: did not receive HSTS header
-linkthis.ml: could not connect to host
-linkthisstatus.ml: could not connect to host
-linky.tk: could not connect to host
-linkybos.com: could not connect to host
-linkzyovh.com: could not connect to host
-linley.de: could not connect to host
-linmi.cc: did not receive HSTS header
-linncounty-ia.gov: could not connect to host
-linno.me: could not connect to host
-linode.com: did not receive HSTS header
-linorman1997.me: could not connect to host
-linostassi.net: could not connect to host
-linpx.com: could not connect to host
-lintasi.com: could not connect to host
-lintellift.com: did not receive HSTS header
-linusdrop.tips: could not connect to host
-linux-admin-california.com: could not connect to host
-linux-mint.cz: did not receive HSTS header
-linux.army: did not receive HSTS header
-linux.im: could not connect to host
-linux.sb: could not connect to host
-linuxandstuff.de: could not connect to host
-linuxcode.net: could not connect to host
-linuxeyecandy.com: could not connect to host
-linuxfixed.it: could not connect to host
-linuxforyou.com: did not receive HSTS header
-linuxgeek.ro: could not connect to host
-linuxmint.cz: could not connect to host
-linuxmonitoring.net: could not connect to host
-linuxno.com: could not connect to host
-linuxproperties.com: could not connect to host
-linvx.org: could not connect to host
-linxmind.eu: could not connect to host
-lionhosting.nl: could not connect to host
-lionsdeal.com: did not receive HSTS header
-lipighor.xyz: could not connect to host
-lipo.lol: could not connect to host
-liputan4.com: did not receive HSTS header
-liquid.solutions: could not connect to host
-liquidcomm.net: could not connect to host
-liquidradio.pro: could not connect to host
-liquidwarp.net: could not connect to host
-liquimoly.market: did not receive HSTS header
-liquorsanthe.in: could not connect to host
-lirico.ca: could not connect to host
-liris-beautywelt.de: did not receive HSTS header
-lisaco.de: could not connect to host
-lisamortimore.com: did not receive HSTS header
-lisandi.com: did not receive HSTS header
-lisbongold.com: did not receive HSTS header
-lisgade.dk: could not connect to host
-lisieuxarquitetura.com.br: could not connect to host
-lisinphotography.com: could not connect to host
-lisowski-photography.com: could not connect to host
-listach.tk: could not connect to host
-listafirmelor.com: could not connect to host
-listage.ovh: did not receive HSTS header
-listal.com: did not receive HSTS header
-lists.mayfirst.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-litcc.com: could not connect to host
-litcomphonors.com: could not connect to host
-litebitanalytics.eu: could not connect to host
-literaturpreis-bad-wurzach.de: did not receive HSTS header
-litespeed.io: could not connect to host
-litevault.net: did not receive HSTS header
-little-bird-bayreuth.de: did not receive HSTS header
-little.pw: could not connect to host
-littlebirds.cf: could not connect to host
-littleboutiqueshop.com: could not connect to host
-littleboutiqueshop.uk: could not connect to host
-littlecrittersbrewery.com: did not receive HSTS header
-littledisney.ro: did not receive HSTS header
-littlefreelibrary.org: did not receive HSTS header
-littlejumpers.co.uk: did not receive HSTS header
-littlepigcreek.com.au: could not connect to host
-littleqiu.net: could not connect to host
-littleservice.cn: could not connect to host
-littleskin.cn: could not connect to host
-liuboznaiko.eu: did not receive HSTS header
-liud.im: could not connect to host
-liujr.tk: could not connect to host
-liujunyang.com: could not connect to host
-liukang.tech: could not connect to host
-liul.in: could not connect to host
-liupeicheng.top: did not receive HSTS header
-liuxiangling.com: did not receive HSTS header
-liv3ly.com: did not receive HSTS header
-livadm.ml: could not connect to host
-livecards.es: could not connect to host
-livecards.eu: could not connect to host
-livecards.it: could not connect to host
-livechatlady.info: did not receive HSTS header
-livedemo.io: could not connect to host
-livej.am: could not connect to host
-livekaarten.be: could not connect to host
-livekarten.at: could not connect to host
-livekarten.de: could not connect to host
-livekort.no: could not connect to host
-livekortti.fi: could not connect to host
-livela.jp: could not connect to host
-livelexi.com: could not connect to host
-livepaperhelp.com: did not receive HSTS header
-livepath.ch: did not receive HSTS header
-liveperformersmeeting.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-liverewrite.com: could not connect to host
-liverobot8.com: could not connect to host
-liverobot888.com: could not connect to host
-livesearch-fukuoka.com: did not receive HSTS header
-livetube.tv: did not receive HSTS header
-livhao.com: could not connect to host
-liviababynet.com.br: could not connect to host
-livingforreal.com: could not connect to host
-livinghealthywithchocolate.com: did not receive HSTS header
-livingkingsinc.net: did not receive HSTS header
-livinglocalnashville.com: did not receive HSTS header
-livingword.in: did not receive HSTS header
-livnev.me: could not connect to host
-livnev.xyz: could not connect to host
-livolett.de: did not receive HSTS header
-livrariacoad.com.br: could not connect to host
-livrariahugodesaovitor.com.br: could not connect to host
-livres-et-stickers.com: did not receive HSTS header
-livroseuniformes.com.br: could not connect to host
-lixiang.one: could not connect to host
-lixiaojiang.ga: could not connect to host
-lixiaoyu.live: could not connect to host
-lixingcong.com: could not connect to host
-liyang.pro: could not connect to host
-liyin.date: did not receive HSTS header
-liypoi.top: could not connect to host
-lizhi123.net: could not connect to host
-lizhuogui.ga: could not connect to host
-lizzian.uk: could not connect to host
-ljskool.com: did not receive HSTS header
-ljusdalsnaprapatklinik.se: did not receive HSTS header
-ljw.me: did not receive HSTS header
-lkbk.uk: could not connect to host
-lkdpp.lt: did not receive HSTS header
-lkp111138.me: did not receive HSTS header
-ll5197.co: could not connect to host
-ll6729.co: could not connect to host
-ll6729.com: did not receive HSTS header
-ll6957.co: could not connect to host
-ll9297.co: could not connect to host
-ll9397.com: did not receive HSTS header
-ll9721.com: did not receive HSTS header
-ll9728.co: could not connect to host
-llamacuba.com: did not receive HSTS header
-ller.xyz: could not connect to host
-lll.st: could not connect to host
-llsv666.com: max-age too low: 0
-llvm.us: could not connect to host
-llw0x.com: could not connect to host
-lmrcouncil.gov: could not connect to host
-lmtravis.com: could not connect to host
-ln.io: could not connect to host
-lnbeauty.ru: max-age too low: 0
-lndrive.space: could not connect to host
-lnmp.me: did not receive HSTS header
-lnoldan.com: could not connect to host
-lnrsoft.ddns.net: could not connect to host
-lntu.org: could not connect to host
-lnx.li: could not connect to host
-lnyltx.cn: could not connect to host
-loacg.com: did not receive HSTS header
-loadingdeck.com: could not connect to host
-loadso.me: could not connect to host
-loadtraining.com: did not receive HSTS header
-loafbox.com: could not connect to host
-loafhead.me: could not connect to host
-loan-lenders.co.za: could not connect to host
-loancompare.co.za: could not connect to host
-loandolphin.com.au: did not receive HSTS header
-loanreadycredit.com: could not connect to host
-loansonline.today: could not connect to host
-loanstreet.be: did not receive HSTS header
-lobin21.com: could not connect to host
-lobosdomain.no-ip.info: could not connect to host
-lobste.rs: did not receive HSTS header
-locais.org: could not connect to host
-localchum.com: could not connect to host
-localdata.us: did not receive HSTS header
-localdrive.me: could not connect to host
-localegroup.com: did not receive HSTS header
-localhorst.xyz: could not connect to host
-localhost.cat: could not connect to host
-localnetwork.nz: could not connect to host
-localprideart.com: could not connect to host
-localsource.eu: could not connect to host
-location-fichier-email.com: could not connect to host
-locationvoitureallemagne.com: could not connect to host
-locationvoitureangleterre.com: could not connect to host
-locationvoitureaustralie.com: could not connect to host
-locationvoitureautriche.com: could not connect to host
-locationvoiturebelgique.com: could not connect to host
-locationvoiturecorse.net: could not connect to host
-locationvoitureespagne.com: could not connect to host
-locationvoiturefinlande.com: could not connect to host
-locationvoitureirlande.com: could not connect to host
-locationvoitureislande.com: could not connect to host
-locationvoitureitalie.com: could not connect to host
-locationvoiturenorvege.com: could not connect to host
-locationvoiturepaysbas.com: could not connect to host
-locationvoitureportugal.com: could not connect to host
-locationvoituresuede.com: could not connect to host
-locchat.com: could not connect to host
-locker3.com: could not connect to host
-lockify.com: could not connect to host
-lockoutgroup.com: could not connect to host
-lockr.io: did not receive HSTS header
-locksmith-durbannorth.co.za: could not connect to host
-locksmithcarrolltontx.com: did not receive HSTS header
-locksmithhillcrest.co.za: could not connect to host
-locksmithmidrand24-7.co.za: did not receive HSTS header
-locksmithopen.com: did not receive HSTS header
-locksmithrandburg24-7.co.za: could not connect to host
-locksmithsanantoniotexas.com: did not receive HSTS header
-locksmithsbluff.com: could not connect to host
-locksmithservice-houston.com: did not receive HSTS header
-locksport.org.nz: could not connect to host
-locktheirphone.com: could not connect to host
-lockyourcomputer.pw: could not connect to host
-locomocosec.com: did not receive HSTS header
-locomore.com: could not connect to host
-locomotive.ca: did not receive HSTS header
-locomotive.net.br: could not connect to host
-locvis.ru: did not receive HSTS header
-lode.li: could not connect to host
-lodgesdureynou.fr: did not receive HSTS header
-loeildansledoigt.fr: did not receive HSTS header
-loftboard.eu: could not connect to host
-log2n.uk: could not connect to host
-logaldeveloper.com: could not connect to host
-logancountyky.gov: could not connect to host
-logario.com.br: could not connect to host
-logcat.info: could not connect to host
-logfro.de: max-age too low: 0
-logic8.ml: could not connect to host
-logicaladvertising.com: could not connect to host
-logicchen.com: could not connect to host
-logiccircle.ir: did not receive HSTS header
-logicoma.com: could not connect to host
-logicsale.com: did not receive HSTS header
-logicsale.de: did not receive HSTS header
-logicsale.fr: did not receive HSTS header
-logicsale.it: did not receive HSTS header
-logicz.top: could not connect to host
-logimagine.com: did not receive HSTS header
-login.corp.google.com: max-age too low: 7776000 (error ignored - included regardless)
-login.persona.org: could not connect to host
-login.xero.com: did not receive HSTS header
-logingate.hu: could not connect to host
-loginseite.com: could not connect to host
-loginsentinel.eu: did not receive HSTS header
-logistify.com.mx: did not receive HSTS header
-logitank.net: did not receive HSTS header
-logitrack.tk: could not connect to host
-lognot.net: could not connect to host
-logopaediereinhard.de: could not connect to host
-logtalk.pt: did not receive HSTS header
-logymedia.com: could not connect to host
-lohl1kohl.de: did not receive HSTS header
-lohmeyer-it.de: could not connect to host
-loigiai.net: did not receive HSTS header
-loihay.net: could not connect to host
-lojadkstore.com.br: could not connect to host
-lojadocristaozinho.com.br: could not connect to host
-lojahunamarcenaria.com.br: could not connect to host
-lojamulticapmais.com.br: did not receive HSTS header
-lojaprimemed.com.br: could not connect to host
-lojas25online.com.br: could not connect to host
-lojasceletro.com.br: could not connect to host
-lojashowdecozinha.com.br: could not connect to host
-lojasviavento.com.br: could not connect to host
-lojatema.com.br: could not connect to host
-lojavalcapelli.com.br: could not connect to host
-lojavirtualfc.com.br: did not receive HSTS header
-lojavirtualfct.com.br: did not receive HSTS header
-lokalna.net: could not connect to host
-lolcorp.pl: could not connect to host
-lolhax.org: did not receive HSTS header
-loli.bz: could not connect to host
-loli.ee: could not connect to host
-loli.ski: did not receive HSTS header
-loli.vip: could not connect to host
-loliblogs.cf: could not connect to host
-loliblogs.ga: could not connect to host
-loliblogs.gq: could not connect to host
-loliblogs.ml: could not connect to host
-lolico.moe: did not receive HSTS header
-lolicon.info: could not connect to host
-lolicore.ch: could not connect to host
-lolidunno.com: could not connect to host
-lolifamily.cf: could not connect to host
-lolifamily.ga: could not connect to host
-lolifamily.gq: could not connect to host
-lolifamily.ml: could not connect to host
-lolio.tw: could not connect to host
-lolis.stream: could not connect to host
-lolitalechat.com: could not connect to host
-lolivpn.com: could not connect to host
-lollaconcept.com.br: could not connect to host
-lonal.com: could not connect to host
-lonasdigital.com: did not receive HSTS header
-lonay.me: did not receive HSTS header
-lonbali.com: did not receive HSTS header
-londoncalling.co: did not receive HSTS header
-londonindustryshop.com: could not connect to host
-londonkan.jp: could not connect to host
-londonlanguageexchange.com: could not connect to host
-londontaxipr.com: did not receive HSTS header
-lonerwolf.com: did not receive HSTS header
-long-journey.com: did not receive HSTS header
-longboarding-ulm.de: could not connect to host
-longdie88.com: max-age too low: 0
-longma.pw: could not connect to host
-longtaitouwang.com: did not receive HSTS header
-look-at-my.site: could not connect to host
-looka.ch: did not receive HSTS header
-looka.photo: could not connect to host
-lookart.ch: could not connect to host
-lookgadgets.com: did not receive HSTS header
-lookout.com: did not receive HSTS header
-looktothestars.org: did not receive HSTS header
-lookupclose.com: could not connect to host
-lookyman.net: did not receive HSTS header
-lookzook.com: did not receive HSTS header
-loom.no: could not connect to host
-loomis.center: did not receive HSTS header
-looneymooney.com: could not connect to host
-loongsg.xyz: could not connect to host
-loopower.com: could not connect to host
-looptics.eu: did not receive HSTS header
-loovto.net: could not connect to host
-loqyu.co: could not connect to host
-lord.city: could not connect to host
-lordgun.com: did not receive HSTS header
-lorenz-hundler.co: could not connect to host
-lorientlejour.com: did not receive HSTS header
-lormansas.com: could not connect to host
-losebellyfat.pro: could not connect to host
-losingweight.coach: could not connect to host
-losless.fr: did not receive HSTS header
-losmedicamentos.net: did not receive HSTS header
-losrascadoresparagatos.com: could not connect to host
-lostandcash.com: did not receive HSTS header
-lostarq.com: could not connect to host
-lostg.com: did not receive HSTS header
-lostinsecurity.com: could not connect to host
-lostinweb.eu: could not connect to host
-loteamentoabertoamparo.com.br: could not connect to host
-loteamentoabertocapivari.com.br: could not connect to host
-loteamentoabertopiracicaba.com.br: could not connect to host
-loteamentomontereiitu.com.br: could not connect to host
-loteks.de: did not receive HSTS header
-lothuytinhsi.com: could not connect to host
-loto-tele.com: could not connect to host
-lotsencafe.de: did not receive HSTS header
-lotsofbargains.com: did not receive HSTS header
-lottosonline.com: did not receive HSTS header
-lotuscloud.de: could not connect to host
-lotuscloud.org: could not connect to host
-lotuswebsolutions.tk: could not connect to host
-lotw.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-louduniverse.net: did not receive HSTS header
-louiewatch.com: could not connect to host
-louisacountyia.gov: did not receive HSTS header
-louisapolicefoundation.com: could not connect to host
-louisapolicefoundation.org: could not connect to host
-louisvillene.gov: max-age too low: 604800
-louisvillevmug.info: could not connect to host
-love-schna.jp: could not connect to host
-love4musik.com: could not connect to host
-love4taylor.eu.org: could not connect to host
-loveable.de: could not connect to host
-loveai.org: could not connect to host
-loveamber.me: could not connect to host
-loveandadoreboutique.com: could not connect to host
-loveandloyalty.se: could not connect to host
-lovechester.com: could not connect to host
-lovecrystal.co.uk: could not connect to host
-loveislandgames.com: did not receive HSTS header
-lovelens.ch: could not connect to host
-lovelens.li: could not connect to host
-lovelifelovelive.com: could not connect to host
-lovelive-anime.tk: could not connect to host
-lovelive-anime.tokyo: could not connect to host
-lovelive.tools: did not receive HSTS header
-lovelive.us: could not connect to host
-lovelivewiki.com: could not connect to host
-lovelo.store: could not connect to host
-lovelyblogacademy.com: did not receive HSTS header
-lovelychalets-peisey.com: did not receive HSTS header
-lovelycorral.com: did not receive HSTS header
-lovelyfriends.org: did not receive HSTS header
-lovelytimes.net: could not connect to host
-lovemiku.info: could not connect to host
-lovemysafetynet.com: did not receive HSTS header
-loveread-ec.appspot.com: did not receive HSTS header
-loverepair.co.uk: did not receive HSTS header
-loveto.at: could not connect to host
-lovetravel360.com: could not connect to host
-lovevape.co: did not receive HSTS header
-loveyounastya.com: did not receive HSTS header
-lovingbody.yoga: did not receive HSTS header
-lovingpenguin.com: did not receive HSTS header
-lowcarblab.com: did not receive HSTS header
-lowcarbmaven.com: did not receive HSTS header
-lowhangingfruitgrabber.com: could not connect to host
-lowt.us: could not connect to host
-lowtherpavilion.co.uk: did not receive HSTS header
-loxal.net: did not receive HSTS header
-loxis.be: did not receive HSTS header
-loyaltech.ch: could not connect to host
-lpacademy.com.br: could not connect to host
-lpak.nl: could not connect to host
-lpgram.ga: could not connect to host
-lpm-uk.com: could not connect to host
-lqs.me: could not connect to host
-lra-cloud.de: could not connect to host
-lrhsclubs.com: could not connect to host
-lrhstsa.com: did not receive HSTS header
-ls-a.org: did not receive HSTS header
-ls-mapping-team.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-ls-reallife.de: did not receive HSTS header
-ls-rp.es: did not receive HSTS header
-lsal.me: could not connect to host
-lsky.cn: could not connect to host
-lsmarketing.ie: did not receive HSTS header
-lsmpx.com: did not receive HSTS header
-lsp-sports.de: did not receive HSTS header
-lssolutions.ie: could not connect to host
-lstma.com: could not connect to host
-lsvih.com: did not receive HSTS header
-lsws.de: did not receive HSTS header
-lszj.com: could not connect to host
-ltba.org: could not connect to host
-ltbytes.com: could not connect to host
-ltechnologygroup.com: could not connect to host
-ltlec.net: did not receive HSTS header
-ltlec.org: did not receive HSTS header
-ltlec.services: could not connect to host
-ltmw.xyz: could not connect to host
-ltransferts.com: could not connect to host
-ltu.social: could not connect to host
-lty.space: could not connect to host
-lublin.toys: did not receive HSTS header
-lubomirkazakov.com: could not connect to host
-luca.swiss: could not connect to host
-lucakrebs.de: could not connect to host
-lucarautti.com: could not connect to host
-lucas-garte.com: did not receive HSTS header
-lucascobb.com: did not receive HSTS header
-lucascodes.com: could not connect to host
-lucasgaland.com: could not connect to host
-lucaterzini.com: could not connect to host
-lucentioluo.space: could not connect to host
-lucidlogs.com: could not connect to host
-lucidoccult.com: could not connect to host
-lucky28.org: did not receive HSTS header
-luckydog.pw: could not connect to host
-luckyxf.com: could not connect to host
-luclu7.pw: could not connect to host
-lucy.science: could not connect to host
-lucysan.net: could not connect to host
-ludum-polus.xyz: could not connect to host
-ludum.pl: could not connect to host
-ludwig.click: could not connect to host
-ludwig.im: could not connect to host
-lufu.io: could not connect to host
-luganskservers.net: could not connect to host
-lugbb.org: did not receive HSTS header
-lugimax.com: could not connect to host
-lui.pink: did not receive HSTS header
-luis-checa.com: could not connect to host
-luisfariasgrupo.com: could not connect to host
-luisfernandoosorio.com: did not receive HSTS header
-luisgf.es: could not connect to host
-luisv.me: could not connect to host
-luk.photo: could not connect to host
-lukasschick.de: max-age too low: 172800
-lukasunger.cz: could not connect to host
-lukasunger.net: could not connect to host
-lukaszdolan.com: did not receive HSTS header
-lukasztkacz.com: could not connect to host
-lukatz.de: did not receive HSTS header
-lukem.eu: could not connect to host
-lukeng.me: could not connect to host
-lukesutton.info: could not connect to host
-lukonet.com: did not receive HSTS header
-luloboutique.com: did not receive HSTS header
-luludapomerania.com: could not connect to host
-luma.family: could not connect to host
-luma.pink: could not connect to host
-lumacurve.com: did not receive HSTS header
-lumd.me: could not connect to host
-lumer.tech: could not connect to host
-lumi.do: did not receive HSTS header
-lumiere.com: did not receive HSTS header
-luminaires-online.fr: did not receive HSTS header
-luminancy.com: could not connect to host
-lumiwellnessshop.com: did not receive HSTS header
-lunafag.ru: could not connect to host
-lunakit.org: could not connect to host
-lunarichter.de: did not receive HSTS header
-lunarift.com: could not connect to host
-lunarrift.net: could not connect to host
-lunarshark.com: could not connect to host
-luneta.nearbuysystems.com: could not connect to host
-lungta.pro: could not connect to host
-lunight.ml: could not connect to host
-luno.io: could not connect to host
-luodaoyi.com: max-age too low: 0
-luody.info: could not connect to host
-luoe.ml: could not connect to host
-luolikong.vip: could not connect to host
-luom.net: could not connect to host
-luoshifeng.com: could not connect to host
-luoxiao.im: could not connect to host
-luoxingyu.ml: could not connect to host
-luqsus.pl: did not receive HSTS header
-luripump.se: could not connect to host
-luru.xyz: did not receive HSTS header
-lushnikov-alex.ru: could not connect to host
-lusis.net: could not connect to host
-lusoft.cz: could not connect to host
-lust.works: could not connect to host
-lustige-zitate.com: did not receive HSTS header
-lustrumxi.nl: could not connect to host
-lusynth.com: could not connect to host
-luther.fi: could not connect to host
-luthierunatespalermo.com: could not connect to host
-luxe-it.co.uk: could not connect to host
-luxescreenprotector.nl: could not connect to host
-luxfosdecoenterprise.com: could not connect to host
-luxinmo.com: did not receive HSTS header
-luxofit.de: did not receive HSTS header
-luxonetwork.com: could not connect to host
-luxstil.ga: could not connect to host
-luxurytimepieces.net: could not connect to host
-luxus-russen.de: could not connect to host
-luxwatch.com: could not connect to host
-luzeshomologadas.com.br: could not connect to host
-lv5.top: could not connect to host
-lwhate.com: could not connect to host
-lwl12.com: could not connect to host
-lxd.pm: could not connect to host
-lxx77.com: could not connect to host
-lyam.fr: could not connect to host
-lycee-saintjoseph-mesnieres.fr: did not receive HSTS header
-lycetre.com: did not receive HSTS header
-lyclive.com: max-age too low: 0
-lycly.top: could not connect to host
-lydia-und-simon.de: could not connect to host
-lydiagorstein.com: did not receive HSTS header
-lyfbits.com: could not connect to host
-lykai.ca: could not connect to host
-lylares.com: did not receive HSTS header
-lynkos.com: did not receive HSTS header
-lynnmosher.com: could not connect to host
-lyoness.digital: could not connect to host
-lyricfm.com: could not connect to host
-lyscnd.com: could not connect to host
-lysdeau.be: could not connect to host
-lysergion.com: could not connect to host
-lytemedical.com: did not receive HSTS header
-lyuba.fr: could not connect to host
-lyukaacom.ru: could not connect to host
-lz.sb: could not connect to host
-lz898.com: could not connect to host
-lzahq.tech: did not receive HSTS header
-lzh.one: could not connect to host
-lzkill.com: could not connect to host
-lzqii.cn: could not connect to host
-lzzr.me: could not connect to host
-m-ali.xyz: could not connect to host
-m-cont.cz: did not receive HSTS header
-m-edmondson.co.uk: did not receive HSTS header
-m-foda.com: did not receive HSTS header
-m-gaming.tk: could not connect to host
-m-generator.com: could not connect to host
-m-gh.info: could not connect to host
-m-orthodontic.com: did not receive HSTS header
-m-rickroll-v.pw: could not connect to host
-m-warrior.tk: could not connect to host
-m.gparent.org: could not connect to host
-m.nu: did not receive HSTS header
-m0v0.com: could not connect to host
-m0wef.uk: could not connect to host
-m12uno.com: did not receive HSTS header
-m2tc.fr: could not connect to host
-m30365.com: could not connect to host
-m4570.xyz: could not connect to host
-m4rcus.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-m5197.co: could not connect to host
-m60777.com: did not receive HSTS header
-m6729.co: could not connect to host
-m6729.com: did not receive HSTS header
-m6957.co: could not connect to host
-m6957.com: did not receive HSTS header
-m81365.com: did not receive HSTS header
-m81818.com: did not receive HSTS header
-m82365.com: did not receive HSTS header
-m82labs.com: did not receive HSTS header
-m9297.co: could not connect to host
-m9397.com: did not receive HSTS header
-m9721.com: did not receive HSTS header
-m9728.co: could not connect to host
-ma-musique.fr: did not receive HSTS header
-ma-plancha.ch: did not receive HSTS header
-maarten.nyc: could not connect to host
-maartenprovo.be: did not receive HSTS header
-maartenterpstra.xyz: could not connect to host
-maatwerkopruimcoaching.nl: could not connect to host
-mac-torrents.me: could not connect to host
-mac1.net: did not receive HSTS header
-macandtonic.com: did not receive HSTS header
-macaw.nl: did not receive HSTS header
-macbolo.com: could not connect to host
-macchaberrycream.com: could not connect to host
-macchedil.com: did not receive HSTS header
-macdj.tk: could not connect to host
-macedopesca.com.br: did not receive HSTS header
-mach1club.com: did not receive HSTS header
-machbach.net: could not connect to host
-machcz.eu: could not connect to host
-machijun.net: did not receive HSTS header
-machinelearningjavascript.com: could not connect to host
-maciespartyhire.co.uk: could not connect to host
-macinyasha.net: could not connect to host
-macji-raj.si: did not receive HSTS header
-mack.space: could not connect to host
-mackey7.net: could not connect to host
-mackiehouse.ca: did not receive HSTS header
-mackinawil.gov: did not receive HSTS header
-macleodnc.com: did not receive HSTS header
-macosx86.ml: could not connect to host
-macoun.de: max-age too low: 2592000
-macrostudent.com: could not connect to host
-macsandcheesedreams.com: could not connect to host
-macstore.pe: did not receive HSTS header
-macustar.eu: did not receive HSTS header
-mad.ninja: could not connect to host
-madandpissedoff.com: did not receive HSTS header
-madbicicletas.com: could not connect to host
-madcatdesign.de: did not receive HSTS header
-maddin.ga: did not receive HSTS header
-maddistonparentcouncil.co.uk: could not connect to host
-maddistonpsa.co.uk: could not connect to host
-madebyfalcon.co.uk: did not receive HSTS header
-madebymagnitude.com: did not receive HSTS header
-madeglobal.com: did not receive HSTS header
-madeinchezmoi.net: could not connect to host
-madeintucson.org: could not connect to host
-mademoiselle-emma.be: could not connect to host
-mademoiselle-emma.fr: did not receive HSTS header
-maderasbrown.com: could not connect to host
-maderwin.com: did not receive HSTS header
-madesoftware.com.br: could not connect to host
-madgeandpaul.com: could not connect to host
-madgech.com: could not connect to host
-madgeisawesome.com: could not connect to host
-madnetwork.org: could not connect to host
-madokami.net: could not connect to host
-madokami.pw: could not connect to host
-madpeople.net: could not connect to host
-madrecha.com: did not receive HSTS header
-madusecurity.com: could not connect to host
-madwarlock.com: could not connect to host
-mae-berlinistanbul.com: could not connect to host
-mae.sh: did not receive HSTS header
-maekha.in.th: could not connect to host
-maephorncurry.com: did not receive HSTS header
-maerzpa.de: could not connect to host
-mafamane.com: could not connect to host
-mafiareturns.com: max-age too low: 2592000
-magazinedabeleza.net: could not connect to host
-magdeburg.directory: could not connect to host
-magebankin.com: did not receive HSTS header
-magellan-met.ru: could not connect to host
-magenx.com: did not receive HSTS header
-maggie-shaw.co.uk: did not receive HSTS header
-magi.systems: could not connect to host
-magia360.com: did not receive HSTS header
-magicalshuttle.fr: did not receive HSTS header
-magicamulet.me: could not connect to host
-magicball.co: could not connect to host
-magickmoments.co.uk: could not connect to host
-magicspaceninjapirates.de: could not connect to host
-magicvps.md: could not connect to host
-magieamour.com: could not connect to host
-magieblanche.fr: did not receive HSTS header
-magilio.com: could not connect to host
-magnacarebroker.com: could not connect to host
-magnacumlaude.co: could not connect to host
-magnesium-biomed.ch: could not connect to host
-magneticanvil.com: could not connect to host
-magnettracker.com: could not connect to host
-magnoliadoulas.com: could not connect to host
-magodaoferta.com.br: could not connect to host
-magosmedellin.com: could not connect to host
-magyarokegyhelyen.hu: did not receive HSTS header
-mah-nig.ga: could not connect to host
-mahai.me: did not receive HSTS header
-mahamed91.pw: could not connect to host
-mahansexcavating.com: did not receive HSTS header
-mahefa.co.uk: could not connect to host
-mahfouzadedimeji.com: did not receive HSTS header
-maichun.info: could not connect to host
-maik-mahlow.de: could not connect to host
-mail-settings.google.com: did not receive HSTS header (error ignored - included regardless)
-mail.google.com: did not receive HSTS header (error ignored - included regardless)
-mail4geek.com: did not receive HSTS header
-mailchuck.com: could not connect to host
-maildragon.com: could not connect to host
-mailer-dot.de: did not receive HSTS header
-mailgarant.nl: could not connect to host
-mailhost.it: could not connect to host
-mailinabox.ml: could not connect to host
-mailing-femprendedores.com: did not receive HSTS header
-mailing-jbgg.com: could not connect to host
-mailjet.tech: did not receive HSTS header
-maillink.store: could not connect to host
-mailmag.net: did not receive HSTS header
-mailman.ml: could not connect to host
-mailon.ga: did not receive HSTS header
-mailpenny.com: could not connect to host
-main-street-seo.com: did not receive HSTS header
-main-unit.com: did not receive HSTS header
-mainelosap.gov: did not receive HSTS header
-mainframeserver.space: could not connect to host
-maintainerheaven.ch: could not connect to host
-mainzelmaennchen.net: could not connect to host
-maisalto.ind.br: could not connect to host
-maischances.com: did not receive HSTS header
-maisempregonet.com: could not connect to host
-maitemerino.net: could not connect to host
-maitriser-son-stress.com: could not connect to host
-majesticcolorado.com: did not receive HSTS header
-majncloud.tk: could not connect to host
-majormedicalinsurance.online: did not receive HSTS header
-make-pizza.info: could not connect to host
-makeaboldmove.com: did not receive HSTS header
-makedonien.guide: could not connect to host
-makedonija.net.mk: did not receive HSTS header
-makeit-so.de: could not connect to host
-makeitdynamic.com: could not connect to host
-makejusticework.org.uk: did not receive HSTS header
-makelinks.online: could not connect to host
-makem-bounce.co.uk: could not connect to host
-makemejob.com: could not connect to host
-makenaiyo-fx.com: could not connect to host
-makera.ga: could not connect to host
-makerstuff.net: could not connect to host
-makeshiftco.de: could not connect to host
-makeuplove.nl: could not connect to host
-makeyourlaws.org: could not connect to host
-makino.games: did not receive HSTS header
-makogaming.com: could not connect to host
-makropa.com: did not receive HSTS header
-makura.fun: could not connect to host
-malamutedoalasca.com.br: could not connect to host
-maldiverna.guide: could not connect to host
-maleexcel.com: did not receive HSTS header
-malena.com.ua: did not receive HSTS header
-malerversand.de: did not receive HSTS header
-malesbdsm.com: could not connect to host
-malesoowki.blog: could not connect to host
-malfait.nl: could not connect to host
-malgraph.net: could not connect to host
-malibubeachrecoverycenter.com: could not connect to host
-malik.holdings: could not connect to host
-maljaars-fotografie.nl: did not receive HSTS header
-maljaars-media.nl: could not connect to host
-malkaso.com.ua: could not connect to host
-malkoun.com: could not connect to host
-mallhonda.com: could not connect to host
-malmoesport.se: did not receive HSTS header
-malmstroms-co.se: could not connect to host
-malone.link: could not connect to host
-malphisruul.de: could not connect to host
-malpracticeattorney.online: did not receive HSTS header
-malscan.com: could not connect to host
-malscan.org: could not connect to host
-malte-kiefer.de: did not receive HSTS header
-maltes.website: could not connect to host
-malvertise.xyz: could not connect to host
-malvy.kiev.ua: could not connect to host
-malwarekillers.com: could not connect to host
-malwareverse.us: could not connect to host
-malwre.io: could not connect to host
-maly.cz: did not receive HSTS header
-malya.fr: could not connect to host
-mamaasia.info: did not receive HSTS header
-mamabatataya.com: could not connect to host
-mamacobaby.com: could not connect to host
-mamadea.be: did not receive HSTS header
-mamadoma.com.ua: could not connect to host
-mamafit.club: did not receive HSTS header
-mamaison.io: could not connect to host
-mamanura.tk: could not connect to host
-mamastore.eu: could not connect to host
-mamatting.com: did not receive HSTS header
-mamaxi.org: did not receive HSTS header
-mamiecouscous.com: could not connect to host
-mammothmail.com: could not connect to host
-mammothmail.net: could not connect to host
-mammothmail.org: could not connect to host
-mammut.space: could not connect to host
-mamoris-net.jp: did not receive HSTS header
-mamout.xyz: did not receive HSTS header
-mamsds.com: could not connect to host
-manaboutahor.se: could not connect to host
-manage.zenpayroll.com: did not receive HSTS header
-manage4all.com: could not connect to host
-manageall.de: could not connect to host
-managed-varnish.de: could not connect to host
-manageforall.com: could not connect to host
-manageforall.de: could not connect to host
-management-ethics.com: did not receive HSTS header
-managemynetsuite.com: did not receive HSTS header
-manalu.cz: could not connect to host
-manantial.mx: could not connect to host
-manantialdevida1450.com: did not receive HSTS header
-manaonetrading.com: could not connect to host
-manav-it.de: could not connect to host
-manavgabhawala.com: could not connect to host
-manchestercleaner.co.uk: did not receive HSTS header
-mandala-ausmalbilder.de: could not connect to host
-mandanudes.ae: could not connect to host
-mandiblackburnphoto.com: could not connect to host
-mandm.servebeer.com: could not connect to host
-mandor.id: could not connect to host
-mandpress.com: did not receive HSTS header
-mangapoi.com: could not connect to host
-mangazuki.co: did not receive HSTS header
-mangel.io: did not receive HSTS header
-manhassetparkdistrictny.gov: did not receive HSTS header
-maniacoland.com: could not connect to host
-maniadeprazer.com.br: could not connect to host
-maniaiti.nz: could not connect to host
-manicminers.tk: could not connect to host
-manifestbin.com: could not connect to host
-manipulatedtme.com: could not connect to host
-manitaggarwal.com: did not receive HSTS header
-manitasicily.com: did not receive HSTS header
-maniw.com: could not connect to host
-mann-und-maeuse.de: could not connect to host
-mannford.com: did not receive HSTS header
-manningbrothers.com: did not receive HSTS header
-manns-solutions.co.uk: could not connect to host
-manns-solutions.com: did not receive HSTS header
-manns-solutions.ru: could not connect to host
-mannsolutions.co.uk: did not receive HSTS header
-manojsharan.me: could not connect to host
-manova.cz: could not connect to host
-manowarus.com: could not connect to host
-mansarda-life.net: did not receive HSTS header
-mansfieldplacevt.com: did not receive HSTS header
-manshop24.com: could not connect to host
-mansion-note.com: did not receive HSTS header
-mansiontech.cn: did not receive HSTS header
-mantenimientosenjardineriaypiscinasveracruz.com: could not connect to host
-mantra.pictures: could not connect to host
-mantuo.com: did not receive HSTS header
-mantuo.vip: could not connect to host
-mantuo.xyz: could not connect to host
-manududu.com.br: could not connect to host
-manuelahidalgo.org: could not connect to host
-manueldopheide.com: did not receive HSTS header
-manuelrueger.de: could not connect to host
-manure.com: could not connect to host
-manuscript.com: did not receive HSTS header
-manutrol.com.br: did not receive HSTS header
-manwithavan.co.uk: did not receive HSTS header
-manyetikboya.com: could not connect to host
-manyiu.com: could not connect to host
-manzalud.com: could not connect to host
-maomao.blog: could not connect to host
-maomaobt.com: did not receive HSTS header
-maomaofuli.vip: could not connect to host
-maorseo.com: could not connect to host
-maosi.xin: could not connect to host
-maozedong.red: could not connect to host
-maplanetebeaute.fr: did not receive HSTS header
-maple5.com: could not connect to host
-maplehome.tk: could not connect to host
-maplenorth.co: could not connect to host
-mapservices.nl: did not receive HSTS header
-maquena.org: could not connect to host
-maquettage.com: did not receive HSTS header
-maquillage-permanent-tatoo.com: did not receive HSTS header
-maquinariastitan.com: could not connect to host
-maquininhamercadopoint.com.br: could not connect to host
-mara-martinez.de: did not receive HSTS header
-maranatha.pl: did not receive HSTS header
-marcaudefroy.com: could not connect to host
-marcbeije.com: could not connect to host
-marcberman.co: did not receive HSTS header
-marcbuehlmann.com: did not receive HSTS header
-marcceleiro.cat: could not connect to host
-marcelmarnitz.com: could not connect to host
-marcelparra.com: could not connect to host
-marchagen.nl: did not receive HSTS header
-marche-nordic-jorat.ch: could not connect to host
-marchwj.pl: could not connect to host
-marciaimportados.com.br: could not connect to host
-marcianoandtopazio.com: could not connect to host
-marco-kretz.de: did not receive HSTS header
-marco01809.net: could not connect to host
-marcoececilia.it: could not connect to host
-marcofinke.de: could not connect to host
-marcohager.de: could not connect to host
-marcontrol.com: did not receive HSTS header
-marcosteixeira.tk: did not receive HSTS header
-marcschlagenhauf.de: could not connect to host
-marcus-scheffler.com: could not connect to host
-marcush.de: did not receive HSTS header
-marcuskoh.com: could not connect to host
-marcusserver.synology.me: could not connect to host
-mardelcupon.com: could not connect to host
-mare92.cz: could not connect to host
-marek.pro: did not receive HSTS header
-mareklecian.cz: did not receive HSTS header
-marelijah.org: could not connect to host
-margan.ch: could not connect to host
-margaretrosefashions.co.uk: could not connect to host
-margo.ml: did not receive HSTS header
-margots.biz: could not connect to host
-margots.life: could not connect to host
-margots.tech: could not connect to host
-mariacorzo.com: did not receive HSTS header
-mariacristinadoces.com.br: did not receive HSTS header
-mariage-photo.ch: could not connect to host
-mariahandnasty.com: could not connect to host
-marianelaisashi.com: could not connect to host
-mariannematthew.com: could not connect to host
-marianwehlus.de: did not receive HSTS header
-mariaolesen.dk: did not receive HSTS header
-mariasbonitas.com: could not connect to host
-marie-curie.fr: could not connect to host
-marie-en-provence.com: could not connect to host
-marie.club: could not connect to host
-marienschule-sundern.de: did not receive HSTS header
-mariescountymo.gov: did not receive HSTS header
-marietrap.ch: did not receive HSTS header
-marine.gov: could not connect to host
-marinekaplama.com: could not connect to host
-marines-shop.com: did not receive HSTS header
-mariusschulte.de: did not receive HSTS header
-marix.ro: could not connect to host
-marjonruns.nl: did not receive HSTS header
-mark-a-hydrant.com: did not receive HSTS header
-mark-armstrong-gaming.com: could not connect to host
-markayapilandirma.com: could not connect to host
-markcp.me: could not connect to host
-markdescande.com: could not connect to host
-market.android.com: did not receive HSTS header (error ignored - included regardless)
-marketgot.com: could not connect to host
-marketia.ml: could not connect to host
-marketing-advertising.eu: could not connect to host
-marketing-apps.club: did not receive HSTS header
-marketing1-0-1.com: could not connect to host
-marketingdesignu.cz: could not connect to host
-marketingeinnovacion.com: did not receive HSTS header
-marketingforfood.com: could not connect to host
-marketinggenerators.nl: did not receive HSTS header
-marketingromania.ro: did not receive HSTS header
-marketingsuite.tk: could not connect to host
-marketio.co: could not connect to host
-marketlinks.org: did not receive HSTS header
-marketnsight.com: did not receive HSTS header
-markf.io: could not connect to host
-markhenrick.site: did not receive HSTS header
-markholden.guru: could not connect to host
-markiewicz.online: did not receive HSTS header
-markkirkforsenate.com: could not connect to host
-markllego.com: could not connect to host
-marko-fenster24.de: could not connect to host
-markom.rs: did not receive HSTS header
-markorszulak.com: did not receive HSTS header
-markow.io: max-age too low: 7776000
-markrego.com: did not receive HSTS header
-markrobin.de: did not receive HSTS header
-markscastles.co.uk: could not connect to host
-marksill.com: did not receive HSTS header
-marksmanhomes.com: did not receive HSTS header
-marksouthall.com: could not connect to host
-marktboten.de: could not connect to host
-marktplaatshelper.nl: did not receive HSTS header
-markus-dev.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-markusabraham.com: did not receive HSTS header
-markusgran.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-markvanacker.be: could not connect to host
-markxpdesign.ga: could not connect to host
-marlen.cz: could not connect to host
-marleyresort.com: could not connect to host
-marmolrain.cl: did not receive HSTS header
-maroc-bivouac.com: did not receive HSTS header
-marocmail.ma: could not connect to host
-marotero.com: did not receive HSTS header
-marqperso.ch: could not connect to host
-marquepersonnelle.ch: could not connect to host
-marquesgroup.net: max-age too low: 0
-marqueswines.co.uk: could not connect to host
-marriottvetcareers.com: could not connect to host
-marsatapp.com: could not connect to host
-marshallford.me: could not connect to host
-marshut.net: could not connect to host
-marshyplay.live: did not receive HSTS header
-marthasvillemo.gov: could not connect to host
-marti201.ga: could not connect to host
-martialc.be: could not connect to host
-martiert.com: could not connect to host
-martiestrimsalon.nl: could not connect to host
-martijnvhoof.nl: could not connect to host
-martin-arend.de: did not receive HSTS header
-martin-mattel.com: could not connect to host
-martin-smith.info: could not connect to host
-martindimitrov.cz: could not connect to host
-martindoe.pl: did not receive HSTS header
-martinec.co.uk: could not connect to host
-martinestyle.com: could not connect to host
-martineve.com: did not receive HSTS header
-martingansler.de: could not connect to host
-martinkup.cz: did not receive HSTS header
-martinp.no: could not connect to host
-martinrogalla.com: did not receive HSTS header
-martins.im: could not connect to host
-martynhare.co.uk: could not connect to host
-martynhare.uk: could not connect to host
-maru-life.com: did not receive HSTS header
-marumagic.com: could not connect to host
-marustat.ru: could not connect to host
-marvell.cat: could not connect to host
-marvinkeller.de: could not connect to host
-marvnet.cf: could not connect to host
-marvnet.digital: could not connect to host
-marvnet.email: did not receive HSTS header
-marvnet.ga: could not connect to host
-marvnet.gq: could not connect to host
-marvnet.ml: could not connect to host
-marvnet.tk: could not connect to host
-marvnetdigit.al: could not connect to host
-marvnetdigital.cf: could not connect to host
-marvnetdigital.ga: could not connect to host
-marvnetdigital.gq: could not connect to host
-marvnetdigital.ml: could not connect to host
-marvnetdigital.tk: could not connect to host
-marvnetforum.cf: could not connect to host
-marvnetforum.com: did not receive HSTS header
-marvnetforum.ga: could not connect to host
-marvnetforum.gq: could not connect to host
-marvnetforum.ml: could not connect to host
-marvnetforum.tk: could not connect to host
-marxist.party: could not connect to host
-marxmyths.org: could not connect to host
-maryeileen90.party: could not connect to host
-marykshoup.com: could not connect to host
-masa-hou.com: did not receive HSTS header
-masa-yoga.com: did not receive HSTS header
-masa.li: did not receive HSTS header
-masatotaniguchi.jp: could not connect to host
-masautonomo.com: did not receive HSTS header
-masayahost.com: did not receive HSTS header
-mascorazon.com: could not connect to host
-masdillah.com: did not receive HSTS header
-masha.one: did not receive HSTS header
-mashairi.co.ke: could not connect to host
-mashek.net: could not connect to host
-mashnew.com: could not connect to host
-masjidtawheed.net: did not receive HSTS header
-maskice.hr: did not receive HSTS header
-maskt.pw: could not connect to host
-massage-well.ch: could not connect to host
-massagelimaperu.com: did not receive HSTS header
-massagetherapyschoolsinformation.com: did not receive HSTS header
-massar.family: could not connect to host
-massdrop.com: did not receive HSTS header
-massive.tk: did not receive HSTS header
-massivum.de: did not receive HSTS header
-massoni.pl: did not receive HSTS header
-massot.eu: did not receive HSTS header
-masstercurssos.com: could not connect to host
-massvow.com: could not connect to host
-mastafu.info: did not receive HSTS header
-mastah.fr: could not connect to host
-mastd.fr: could not connect to host
-mastd.onl: could not connect to host
-masteragenasia.com: did not receive HSTS header
-masteragenasia.net: did not receive HSTS header
-masterapi.ninja: did not receive HSTS header
-masterhaus.bg: did not receive HSTS header
-masterhelenaroma.com: did not receive HSTS header
-masteringtheterminal.com: did not receive HSTS header
-mastermindbusinesspro.com: did not receive HSTS header
-mastermindcesar.com: could not connect to host
-masternautconnect.com: did not receive HSTS header
-mastersquirrel.xyz: could not connect to host
-masterwayhealth.com: could not connect to host
-mastichor.info: could not connect to host
-mastiffingles.com.br: could not connect to host
-mastimtibetano.com: could not connect to host
-masto.io: did not receive HSTS header
-mastod.life: could not connect to host
-mastodon.blue: could not connect to host
-mastodon.co.nz: could not connect to host
-mastodon.direct: could not connect to host
-mastodon.engineering: could not connect to host
-mastodon.expert: could not connect to host
-mastodon.fun: did not receive HSTS header
-mastodon.my: could not connect to host
-mastodon.org.uk: did not receive HSTS header
-mastodon.pl: did not receive HSTS header
-mastodon.rocks: could not connect to host
-mastodones.club: did not receive HSTS header
-masty.nl: could not connect to host
-masumreza.tk: could not connect to host
-mat99.dk: could not connect to host
-matarrosabierzo.com: could not connect to host
-matcha-iga.jp: could not connect to host
-matchneedle.com: did not receive HSTS header
-matchpointusa.com: did not receive HSTS header
-matdogs.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-mateiko.by: could not connect to host
-matejstrnad.cz: could not connect to host
-maternum.com: could not connect to host
-mateusmeyer.com.br: could not connect to host
-mateuszchyla.pl: could not connect to host
-mateuszpilszek.pl: could not connect to host
-mathalexservice.info: could not connect to host
-mathe.top: could not connect to host
-mathematris.com: could not connect to host
-mathembedded.com: did not receive HSTS header
-matheusmacedo.ddns.net: could not connect to host
-mathias-frank.com: could not connect to host
-mathijskingma.nl: could not connect to host
-mathismoda.com: did not receive HSTS header
-mathsource.ga: could not connect to host
-mathsweek.nz: did not receive HSTS header
-mathsweek.org.nz: did not receive HSTS header
-mathsweek.school.nz: did not receive HSTS header
-mati.gq: could not connect to host
-matillat.ovh: did not receive HSTS header
-matlabjo.ir: could not connect to host
-matmessages.com: did not receive HSTS header
-matomeplus.co: could not connect to host
-matratzentester.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-matrict.com: could not connect to host
-matrimoni.uk: could not connect to host
-matrip.de: could not connect to host
-matriterie-sdv.ro: could not connect to host
-matrix.ac: did not receive HSTS header
-matrixcheats.net: could not connect to host
-matsu-walk.com: could not connect to host
-matsuz.com: could not connect to host
-matt.gd: could not connect to host
-matt.tf: did not receive HSTS header
-mattaki.tk: could not connect to host
-mattandreko.com: did not receive HSTS header
-mattbagley.me: did not receive HSTS header
-mattdbarton.com: could not connect to host
-matterconcern.com: could not connect to host
-mattessons.co.uk: could not connect to host
-matthecat.com: could not connect to host
-matthew-carson.info: could not connect to host
-matthewchapman.co.uk: did not receive HSTS header
-matthewemes.com: did not receive HSTS header
-matthewljiang.com: did not receive HSTS header
-matthewtester.com: did not receive HSTS header
-matthias-wimmer.de: could not connect to host
-matthiasadler.info: did not receive HSTS header
-matthiassteen.be: could not connect to host
-matthiasweiler.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-matthijssen.info: could not connect to host
-matthijsvos.com: did not receive HSTS header
-matthijsvos.org: did not receive HSTS header
-mattia98.org: did not receive HSTS header
-mattisam.com: did not receive HSTS header
-mattknight.io: could not connect to host
-mattressinsider.com: max-age too low: 3153600
-mattrude.com: max-age too low: 2592000
-mattwb65.com: could not connect to host
-matty.digital: did not receive HSTS header
-matway.com: did not receive HSTS header
-matway.net: could not connect to host
-matze.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-maultrom.ml: could not connect to host
-maupiknik.com: could not connect to host
-maur.cz: did not receive HSTS header
-maurice-walker.com: could not connect to host
-mauricioquadradofotografia.com.br: did not receive HSTS header
-maurus-automation.de: did not receive HSTS header
-mausi.co: could not connect to host
-mavisang.cf: could not connect to host
-mavobiz.at: did not receive HSTS header
-mavobiz.de: did not receive HSTS header
-mavoprax.at: did not receive HSTS header
-mavoprax.de: did not receive HSTS header
-mavora.at: did not receive HSTS header
-mavora.de: did not receive HSTS header
-mavotax.at: did not receive HSTS header
-mavotax.de: did not receive HSTS header
-mawe.red: could not connect to host
-mawidabp.com: did not receive HSTS header
-mawidaca.com: did not receive HSTS header
-mawulihotel.com: could not connect to host
-max-apk.com: could not connect to host
-max-mad.com: could not connect to host
-max-phone.com: could not connect to host
-max00365.com: could not connect to host
-max11365.com: did not receive HSTS header
-max1365.com: did not receive HSTS header
-max22365.com: did not receive HSTS header
-max2365.com: did not receive HSTS header
-max33365.com: did not receive HSTS header
-max3365.com: did not receive HSTS header
-max4365.com: did not receive HSTS header
-max44365.com: did not receive HSTS header
-max5365.com: did not receive HSTS header
-max55365.com: did not receive HSTS header
-max6365.com: did not receive HSTS header
-max66365.com: did not receive HSTS header
-max7365.com: did not receive HSTS header
-max77365.com: did not receive HSTS header
-max8365.com: did not receive HSTS header
-max88365.com: did not receive HSTS header
-max9365.com: did not receive HSTS header
-maxbachmann.de: did not receive HSTS header
-maxdev72.freeboxos.fr: could not connect to host
-maxdg.be: did not receive HSTS header
-maxfox.me: could not connect to host
-maxhamon.ovh: could not connect to host
-maxhorvath.com: could not connect to host
-maxi-corp.com: could not connect to host
-maxibanki.ovh: could not connect to host
-maxicore.co.za: could not connect to host
-maxima.at: did not receive HSTS header
-maximdeboiserie.be: could not connect to host
-maximelouet.me: did not receive HSTS header
-maxkeller.io: did not receive HSTS header
-maxmachine.ind.br: could not connect to host
-maxmoda.eu: could not connect to host
-maxmusical.ml: could not connect to host
-maxserver.com: did not receive HSTS header
-maxuniverse.de: did not receive HSTS header
-maxwellflynn.com: did not receive HSTS header
-maya-ro.com: could not connect to host
-maya.mg: could not connect to host
-maybeonline.de: could not connect to host
-maybeul.com: could not connect to host
-maydex.info: could not connect to host
-mayerbrownllz.com: could not connect to host
-maylamtoiden.asia: did not receive HSTS header
-maynardnetworks.com: could not connect to host
-mayoimobiliare.ro: could not connect to host
-mayoristassexshop.com: could not connect to host
-mazda626.net: could not connect to host
-mazepa.ml: could not connect to host
-mazternet.ru: could not connect to host
-mazurlabs.tk: could not connect to host
-mazyun.com: could not connect to host
-mazz-tech.com: could not connect to host
-mb-is.info: did not receive HSTS header
-mbadika.org: did not receive HSTS header
-mbconsultancy.nu: could not connect to host
-mbdrogenbos-usedcars.be: could not connect to host
-mbilker.us: did not receive HSTS header
-mbits.solutions: did not receive HSTS header
-mbmcatering.com: did not receive HSTS header
-mbp.banking.co.at: did not receive HSTS header
-mbsec.net: did not receive HSTS header
-mbweir.com: could not connect to host
-mbwemmel-usedcars.be: could not connect to host
-mbwis.net: could not connect to host
-mc-ruempel-firmen-und-haushaltsaufloesungen.de: did not receive HSTS header
-mc-venture.net: could not connect to host
-mc4free.cc: could not connect to host
-mc81.com: did not receive HSTS header
-mca2017.org: did not receive HSTS header
-mcadmin.net: could not connect to host
-mcard.vn: did not receive HSTS header
-mcb-bank.com: did not receive HSTS header
-mcblain.ca: could not connect to host
-mcc.re: could not connect to host
-mccordworks.com: did not receive HSTS header
-mccurtainems.gov: could not connect to host
-mcdanieldevelopmentservices.com: could not connect to host
-mcdermottautomotive.com: could not connect to host
-mcdona1d.me: could not connect to host
-mcdonalds.design: did not receive HSTS header
-mcdonalds.ru: did not receive HSTS header
-mcdsg.net: could not connect to host
-mcfipvt.com: could not connect to host
-mcga.media: could not connect to host
-mcgavocknissanwichitaparts.com: could not connect to host
-mchopkins.net: could not connect to host
-mchuiji.com: did not receive HSTS header
-mcideas.tk: could not connect to host
-mcinterface.de: did not receive HSTS header
-mcit.gov.ws: did not receive HSTS header
-mcjackk77.com: did not receive HSTS header
-mcjackk77.me: could not connect to host
-mckay-bednar.net: could not connect to host
-mckenry.net: did not receive HSTS header
-mckinley1.com: could not connect to host
-mckinleytk.com: could not connect to host
-mclawyers.com.au: could not connect to host
-mclist.it: could not connect to host
-mclyr.com: could not connect to host
-mcnoobs.pro: could not connect to host
-mcooperlaw.com: did not receive HSTS header
-mcpart.land: could not connect to host
-mcpro.games: could not connect to host
-mcprocdn.com: could not connect to host
-mcqyy.com: could not connect to host
-mcs-kutc.com: did not receive HSTS header
-mcsa-usa.org: could not connect to host
-mcsniper.co: could not connect to host
-mcsnovatamabayan.com: could not connect to host
-mcstaralliance.com: could not connect to host
-mctherealm.net: could not connect to host
-mcuong.tk: could not connect to host
-mczo.net: did not receive HSTS header
-md-student.com: did not receive HSTS header
-md21lc8.com: could not connect to host
-mdazo.net: could not connect to host
-mdbouncycastlehirelondon.co.uk: could not connect to host
-mdclass.id: did not receive HSTS header
-mdcloudpracticesolutions.com: could not connect to host
-mdconnect.asia: could not connect to host
-mdek.at: could not connect to host
-mdfnet.se: did not receive HSTS header
-mdg-online.de: did not receive HSTS header
-mdi-wolfsburg.de: did not receive HSTS header
-mdoering.de: did not receive HSTS header
-mds-paris.com: max-age too low: 2592000
-mdscomp.net: could not connect to host
-mdwftw.com: could not connect to host
-me-center.com: could not connect to host
-me-dc.com: could not connect to host
-me-groups.com: could not connect to host
-meadowviewfarms.org: could not connect to host
-mealcast.ml: could not connect to host
-mealgoo.com: did not receive HSTS header
-meanevo.com: could not connect to host
-meangirl.club: could not connect to host
-measuretwice.com: did not receive HSTS header
-meat-education.com: could not connect to host
-meathealth.com: could not connect to host
-mebio.us: could not connect to host
-mec111.com: did not receive HSTS header
-mecanicadom.com: did not receive HSTS header
-meccano.srl: could not connect to host
-mecenat-cassous.com: did not receive HSTS header
-med-otzyv.ru: could not connect to host
-medallia.io: could not connect to host
-medbreaker.one: did not receive HSTS header
-meddatix.com: could not connect to host
-mede-handover.azurewebsites.net: could not connect to host
-medecine-esthetique-du-calaisis.fr: did not receive HSTS header
-medellinapartamentos.com: could not connect to host
-medhy.fr: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-medi-link.co.il: did not receive HSTS header
-media-access.online: did not receive HSTS header
-media-courses.com: could not connect to host
-media-credit.eu: could not connect to host
-media-service.fr: did not receive HSTS header
-media-soft-pro.ru: could not connect to host
-media101.xyz: could not connect to host
-mediabm.jp: did not receive HSTS header
-mediacru.sh: could not connect to host
-mediadandy.com: did not receive HSTS header
-mediaexpert.fr: did not receive HSTS header
-mediafinancelab.org: could not connect to host
-mediafocus.biz: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-mediagetnews.tk: could not connect to host
-mediagold.it: could not connect to host
-mediahaus.de: did not receive HSTS header
-medialys.ca: could not connect to host
-mediamag.am: max-age too low: 0
-mediamaklumat.com: did not receive HSTS header
-mediamarkt.pl: did not receive HSTS header
-mediarocks.de: did not receive HSTS header
-mediasst.com: could not connect to host
-mediationculturelleclp.ch: could not connect to host
-mediavault.tech: could not connect to host
-mediawikicn.org: could not connect to host
-medic-world.com: could not connect to host
-medicinasaludvida.com: could not connect to host
-medicinesfast.com: could not connect to host
-medicinskavranje.edu.rs: could not connect to host
-medienservice-fritz.de: did not receive HSTS header
-medifab.online: did not receive HSTS header
-medifi.com: did not receive HSTS header
-medinacountyohio.gov: could not connect to host
-medirich.co: could not connect to host
-medisense.tk: could not connect to host
-meditek-dv.ru: could not connect to host
-mediter-simplement.com: did not receive HSTS header
-mediterenopmaandag.nl: did not receive HSTS header
-meditest.in: did not receive HSTS header
-mediumraw.org: did not receive HSTS header
-mediweed.tk: could not connect to host
-medlabmediagroup.com: did not receive HSTS header
-medm-test.com: could not connect to host
-medpost.com: did not receive HSTS header
-medpot.net: did not receive HSTS header
-medrep.pp.ua: could not connect to host
-medsindex.com: did not receive HSTS header
-medstreaming.com: did not receive HSTS header
-medtankers.management: did not receive HSTS header
-medundmed.at: did not receive HSTS header
-medvezhii-ozera.ru: did not receive HSTS header
-medy-me.com: could not connect to host
-meeco.kr: did not receive HSTS header
-meedoennoordkop.nl: could not connect to host
-meedoenzaanstad.nl: did not receive HSTS header
-meehle.com: did not receive HSTS header
-meeko.cc: could not connect to host
-meekru.com: did not receive HSTS header
-meeplegamers.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-meereskunst.de: could not connect to host
-meesteresmisty.nl: could not connect to host
-meet: could not connect to host
-meetfinch.com: could not connect to host
-meetingfriends.ch: did not receive HSTS header
-meetings2.com: did not receive HSTS header
-meetmibaby.co.uk: could not connect to host
-mega-aukcion.ru: could not connect to host
-mega-feeling.de: could not connect to host
-mega-key.eu: could not connect to host
-mega.nz: could not connect to host
-mega1.me: did not receive HSTS header
-megablogging.org: could not connect to host
-megadrol.com: could not connect to host
-megakiste.de: could not connect to host
-megalithe.co: did not receive HSTS header
-megam.host: could not connect to host
-megamarkey.de: did not receive HSTS header
-megapixelweb.com: could not connect to host
-megapixelweb.fr: could not connect to host
-megaplan.ru: did not receive HSTS header
-megaplonk.com: could not connect to host
-megashur.se: could not connect to host
-megasslstore.com: did not receive HSTS header
-megasupportcr.com: did not receive HSTS header
-megasystem.cl: did not receive HSTS header
-megaxhost.com.br: could not connect to host
-meggidesign.com: could not connect to host
-megh.biz: did not receive HSTS header
-megh.tv: could not connect to host
-meghudson.com: could not connect to host
-megustariasaber.com: did not receive HSTS header
-mehmetdursun.av.tr: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-meidens.com: did not receive HSTS header
-meifrench.com: did not receive HSTS header
-meikan.moe: could not connect to host
-meilleur.xyz: could not connect to host
-meimeistartup.com: could not connect to host
-mein-einszueins.de: did not receive HSTS header
-mein-webportal.de: did not receive HSTS header
-meincloudspeicher.de: did not receive HSTS header
-meine-plancha.ch: did not receive HSTS header
-meine-reise-gut-versichert.de: did not receive HSTS header
-meinebo.it: could not connect to host
-meinstartinsleben.com: could not connect to host
-meinstartinsleben.de: could not connect to host
-meiqia.cn: did not receive HSTS header
-meizitang.es: could not connect to host
-meizufans.eu: could not connect to host
-mekatro.tech: could not connect to host
-mekesh.ru: could not connect to host
-mekongeye.com: did not receive HSTS header
-mekongmontessori.com: could not connect to host
-melakaltenegger.at: did not receive HSTS header
-melanfengshui.com: did not receive HSTS header
-melangebrasil.com: could not connect to host
-melaniebernhardt.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-melaniegruber.de: could not connect to host
-melbourneapartments.website: could not connect to host
-melbyjuliapak.com: could not connect to host
-mele.ro: could not connect to host
-melefo.ddns.net: could not connect to host
-melenchatsmelenchiens.fr: could not connect to host
-melento.com: did not receive HSTS header
-melerpaine.com: could not connect to host
-melf.nl: could not connect to host
-melhoresdominios.net: could not connect to host
-melhorproduto.com.br: could not connect to host
-melikoff.es: could not connect to host
-melissaauclaire.com: could not connect to host
-melissagalt.com: could not connect to host
-melissaofficial.tk: could not connect to host
-melitopol.co.ua: did not receive HSTS header
-mellika.ch: could not connect to host
-mellitus.org: could not connect to host
-melodic.com.au: could not connect to host
-melodicprogressivehouse.com: did not receive HSTS header
-melody-lyrics.com: could not connect to host
-melonstudios.net: could not connect to host
-melpomene.me: did not receive HSTS header
-melted.me: could not connect to host
-melted.pw: could not connect to host
-melvinlammerts.nl: could not connect to host
-melvinlow.com: could not connect to host
-memberpress.com: did not receive HSTS header
-members.mayfirst.org: did not receive HSTS header
-membershipnetworksite.com: did not receive HSTS header
-memberstweets.com: could not connect to host
-memdoc.org: could not connect to host
-memeblast.ninja: could not connect to host
-memepasmal.net: did not receive HSTS header
-memepasmal.org: could not connect to host
-memetrash.co.uk: could not connect to host
-memmertusa.com: did not receive HSTS header
-memory-plus-180.com: could not connect to host
-memorycards.ie: could not connect to host
-memorygame.io: did not receive HSTS header
-memorytrace.space: did not receive HSTS header
-menaraannonces.com: could not connect to host
-menchez.me: could not connect to host
-mendozagenevieve.com: could not connect to host
-mengliangyun.xyz: could not connect to host
-mengxin.life: could not connect to host
-menh.vn: could not connect to host
-menhadendefenders.org: did not receive HSTS header
-menkyo-blog.com: did not receive HSTS header
-menntagatt.is: did not receive HSTS header
-menomineemi.gov: did not receive HSTS header
-mensagensperfeitas.com.br: could not connect to host
-menshealthinsurance.com: did not receive HSTS header
-mensmaximus.de: did not receive HSTS header
-mentalhealth.gov: did not receive HSTS header
-mentax.net: did not receive HSTS header
-mentesemprendedoras.net: could not connect to host
-menthix.net: could not connect to host
-mentorbuk.com: did not receive HSTS header
-mentorithm.com: could not connect to host
-mentz.info: did not receive HSTS header
-menu.fyi: could not connect to host
-menudieta.com: did not receive HSTS header
-menudrivetest.com: could not connect to host
-menuel.me: could not connect to host
-menuiserie-berard.com: did not receive HSTS header
-menuonlineordering.com: could not connect to host
-menzaijia.com: could not connect to host
-menzel-motors.com: did not receive HSTS header
-meow.cloud: could not connect to host
-meozcraft.com: could not connect to host
-mephim24h.net: did not receive HSTS header
-mer.gd: could not connect to host
-mercadeolocal.com.ar: did not receive HSTS header
-mercadobitcoin.com.br: did not receive HSTS header
-mercadobitcoin.net: did not receive HSTS header
-mercanix.co.uk: could not connect to host
-merccorp.de: max-age too low: 0
-mercedes-benz-usedcars.be: could not connect to host
-mercedes-benz.io: did not receive HSTS header
-mercercountyohio.gov: could not connect to host
-mercerisland.gov: could not connect to host
-mercier-auto.com: did not receive HSTS header
-mercier-cars.co.uk: did not receive HSTS header
-mercury-studio.com: did not receive HSTS header
-mereckas.com: could not connect to host
-meredithkm.info: did not receive HSTS header
-meremobil.dk: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-mergozzo.com: did not receive HSTS header
-meridianfresno.com: did not receive HSTS header
-meridianstore.com.br: could not connect to host
-merimatka.fi: could not connect to host
-merite.cloud: could not connect to host
-meritz.rocks: could not connect to host
-merloaded.rocks: could not connect to host
-merloat.club: could not connect to host
-mers.one: could not connect to host
-mersinunivercity.com: could not connect to host
-merson.me: could not connect to host
-merzai.co.uk: could not connect to host
-mes-finances.be: did not receive HSTS header
-mes10doigts.ovh: could not connect to host
-mesabi.ga: could not connect to host
-mesami-art.de: could not connect to host
-meshlab.co: did not receive HSTS header
-meshotes.com: max-age too low: 8640000
-meskdeals.com: could not connect to host
-mesmoque.com: did not receive HSTS header
-mesomeds.com: could not connect to host
-messagescelestes.ca: did not receive HSTS header
-mestr.es: did not receive HSTS header
-mesvt.com: could not connect to host
-meta.sc: did not receive HSTS header
-metadatawiki.com: did not receive HSTS header
-metadistribution.com: did not receive HSTS header
-metaether.net: could not connect to host
-metagrader.com: could not connect to host
-metallibrarian.com: could not connect to host
-metallschutz-direkt.de: did not receive HSTS header
-metanic.org: did not receive HSTS header
-metasysteminfo.com: could not connect to host
-metavetted.com: could not connect to host
-meteo-parc.com: could not connect to host
-meteo-r.ovh: could not connect to host
-meteosherbrooke.com: could not connect to host
-meteosky.net: did not receive HSTS header
-meter.md: could not connect to host
-metikam.pl: could not connect to host
-metin2sepeti.com: could not connect to host
-metis.pw: could not connect to host
-metrans-spedition.de: could not connect to host
-metricaid.com: did not receive HSTS header
-metrix-money-ptc.com: could not connect to host
-metrix.design: could not connect to host
-metrolush.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-metron-eging.com: could not connect to host
-metron-networks.com: could not connect to host
-metronews.co.nz: did not receive HSTS header
-metroplex.me: did not receive HSTS header
-metropolisil.gov: did not receive HSTS header
-metz-metropolitain.fr: did not receive HSTS header
-metzgerei-birkenhof.de: did not receive HSTS header
-meu-smartphone.com: did not receive HSTS header
-meu-solutions.com: did not receive HSTS header
-meuautotrac.com.br: did not receive HSTS header
-meubanco7.com.br: could not connect to host
-meuble-house.fr: did not receive HSTS header
-meubleko.com: did not receive HSTS header
-meucosmetico.com.br: could not connect to host
-meuemail.pro: could not connect to host
-meupainel.me: did not receive HSTS header
-meupedido.online: could not connect to host
-meusigno.com: could not connect to host
-mevs.cz: could not connect to host
-mexbt.com: could not connect to host
-mexicanbusinessweb.mx: could not connect to host
-mexicansbook.ru: did not receive HSTS header
-mexicodental.co: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-mexicom.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-mexior.nl: could not connect to host
-meyash.co: max-age too low: 7889238
-meyeraviation.com: could not connect to host
-meyerburger.com: did not receive HSTS header
-mf302.com: did not receive HSTS header
-mf303.com: did not receive HSTS header
-mfacko.cz: did not receive HSTS header
-mfcatalin.com: could not connect to host
-mfedderke.com: could not connect to host
-mfg2020.com.tw: did not receive HSTS header
-mfgod.com: could not connect to host
-mfgusa.com: could not connect to host
-mfiles.pl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-mfpccprod.com: could not connect to host
-mfrsgb45.org: did not receive HSTS header
-mfsquad.com: could not connect to host
-mft.global: could not connect to host
-mfxer.com: could not connect to host
-mfxxx.cn: could not connect to host
-mfz.mk: did not receive HSTS header
-mgdigital.fr: did not receive HSTS header
-mgiay.com: did not receive HSTS header
-mgknet.com: did not receive HSTS header
-mglink.be: did not receive HSTS header
-mgmd.org: could not connect to host
-mgoessel.de: did not receive HSTS header
-mh-bloemen.co.jp: could not connect to host
-mhdsyarif.com: did not receive HSTS header
-mhealthdemocamp.com: could not connect to host
-mhertel.com: did not receive HSTS header
-mhict.nl: could not connect to host
-mhjuma.com: could not connect to host
-mhmfoundationrepair.com: could not connect to host
-mht-travel.com: could not connect to host
-mhx.pw: could not connect to host
-mia.ac: could not connect to host
-miah.top: could not connect to host
-miamaibaum.com: could not connect to host
-miamicityballet.org: did not receive HSTS header
-miamiobgyndreams.com: could not connect to host
-mianbao.ga: could not connect to host
-mianfei-vpn.com: could not connect to host
-miaololi.com: could not connect to host
-miaomiaomiao.live: did not receive HSTS header
-miaonagemi.com: could not connect to host
-miaoubox.com: did not receive HSTS header
-miboulot.com: could not connect to host
-micado-software.com: could not connect to host
-micaiahparker.com: could not connect to host
-micamisetaestampada.com: could not connect to host
-micasamgmt.com: did not receive HSTS header
-micelius.com: could not connect to host
-michael-contento.de: could not connect to host
-michael-schilling.de: did not receive HSTS header
-michael.band: could not connect to host
-michaelband.co: could not connect to host
-michaelcontento.de: could not connect to host
-michaeldemuth.com: did not receive HSTS header
-michaeleichorn.com: could not connect to host
-michaelfitzpatrickruth.com: could not connect to host
-michaelmorpurgo.com: did not receive HSTS header
-michaeln.net: did not receive HSTS header
-michaels-homepage-service.de: could not connect to host
-michaelschule-rheine.de: did not receive HSTS header
-michaelscrivo.com: did not receive HSTS header
-michaelslatkine.com: did not receive HSTS header
-michaelsnoeren.nl: did not receive HSTS header
-michaelsulzer.com: did not receive HSTS header
-michaelsulzer.eu: did not receive HSTS header
-michaelwaite.org: could not connect to host
-michal-kral.cz: could not connect to host
-michalborka.cz: could not connect to host
-michalinastrzyz.xyz: could not connect to host
-michalkral.tk: could not connect to host
-michalp.pl: could not connect to host
-michalpodraza.pl: could not connect to host
-michalvasicek.cz: could not connect to host
-michasfahrschule.com: could not connect to host
-michel.pt: did not receive HSTS header
-michelledonelan.co.uk: did not receive HSTS header
-mico.world: could not connect to host
-micomi.co: could not connect to host
-miconware.de: could not connect to host
-micr.io: did not receive HSTS header
-micro-dv.ru: could not connect to host
-micro-rain-systems.com: did not receive HSTS header
-microblading.pe: could not connect to host
-microcyber.net: could not connect to host
-microdesic.com: could not connect to host
-microfonejts.com.br: could not connect to host
-microlinks.org: did not receive HSTS header
-microlz.com: did not receive HSTS header
-microme.ga: could not connect to host
-micromind.io: could not connect to host
-micromookie.com: could not connect to host
-micropple.net: could not connect to host
-microtalk.org: could not connect to host
-middletowndelcopa.gov: did not receive HSTS header
-midi-ctes.fr: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-midirs.org: could not connect to host
-midislandrealty.com: did not receive HSTS header
-midlandleisuresales.co.uk: did not receive HSTS header
-midlandroofingri.com: did not receive HSTS header
-mido.ga: could not connect to host
-midonet.org: did not receive HSTS header
-midress.club: could not connect to host
-midriversmotorsllc.com: did not receive HSTS header
-midt.io: did not receive HSTS header
-midtowndentistry.com: did not receive HSTS header
-midwestplus.com: did not receive HSTS header
-midweststructuralrepair.com: could not connect to host
-midwestwomenworkers.org: could not connect to host
-midyatsaklibahce.com: did not receive HSTS header
-miegames.com: did not receive HSTS header
-miele-katerini.gr: did not receive HSTS header
-miembarcacion.com: could not connect to host
-miemie.jp: could not connect to host
-mieterschutzkartei.de: could not connect to host
-mieuxvivreadarvoy.fr: could not connect to host
-mifibra.cl: did not receive HSTS header
-miftahulteknik.com: could not connect to host
-migeeks.de: did not receive HSTS header
-mightydicks.io: could not connect to host
-mightydicks.tech: could not connect to host
-mightymillionslottery.com: did not receive HSTS header
-mightymillionsraffle.com: did not receive HSTS header
-migrantskillsregister.org.uk: could not connect to host
-migrator.co: did not receive HSTS header
-miguelgfierro.com: did not receive HSTS header
-miguksaram.com: could not connect to host
-mihgroup.eu.org: could not connect to host
-mihijoesdislexico.es: did not receive HSTS header
-mijn-email.org: could not connect to host
-mijndiad.nl: did not receive HSTS header
-mijngiftshop.nl: did not receive HSTS header
-mijnkredietpaspoort.nl: could not connect to host
-mijnsite.ovh: could not connect to host
-mika.cat: could not connect to host
-mikadesign.se: did not receive HSTS header
-mikaelemilsson.net: could not connect to host
-mikdoss.co: could not connect to host
-mike-estela.com: did not receive HSTS header
-mikeblog.site: could not connect to host
-mikeburns.com: did not receive HSTS header
-mikedugan.org: did not receive HSTS header
-mikeg.de: did not receive HSTS header
-mikegao.net: did not receive HSTS header
-mikegao.org: did not receive HSTS header
-mikegarnett.co.uk: did not receive HSTS header
-mikehilldesign.co.uk: did not receive HSTS header
-mikek.work: did not receive HSTS header
-mikeology.org: could not connect to host
-mikeowens.us: could not connect to host
-mikepair.net: could not connect to host
-mikes.tk: did not receive HSTS header
-mikewest.org: did not receive HSTS header
-mikewritesstuff.com: could not connect to host
-mikeybailey.org: did not receive HSTS header
-mikhirev.ru: could not connect to host
-mikhlevich.ru: could not connect to host
-miki-boras.de: did not receive HSTS header
-mikii.club: could not connect to host
-mikk.cz: could not connect to host
-mikkelvej.dk: could not connect to host
-mikonmaa.fi: could not connect to host
-mikori.sk: did not receive HSTS header
-mikro-inwestycje.co.uk: could not connect to host
-mikroskeem.eu: did not receive HSTS header
-miku.be: could not connect to host
-miku.cloud: could not connect to host
-miku.hatsune.my: did not receive HSTS header
-miku.party: could not connect to host
-miku.ro: could not connect to host
-mikumaycry.com: could not connect to host
-mikumiku.stream: could not connect to host
-mikupic.com: could not connect to host
-mikusa.xyz: could not connect to host
-mikusinec.com: could not connect to host
-mil0.com: could not connect to host
-milang.xyz: could not connect to host
-milatrans.pl: did not receive HSTS header
-milchbuchstabe.de: could not connect to host
-milcoresonline.com: could not connect to host
-milesdewitt.com: could not connect to host
-milesgeek.com: did not receive HSTS header
-milionshop.sk: did not receive HSTS header
-military-portal.cz: did not receive HSTS header
-militaryaviationsafety.gov: did not receive HSTS header
-militaryconsumer.gov: did not receive HSTS header
-milkandcookies.ca: could not connect to host
-millennialbeekeeper.co.uk: could not connect to host
-millibitcoin.jp: could not connect to host
-million5.com: could not connect to host
-million6.com: could not connect to host
-million8.com: could not connect to host
-millionairegames.com: could not connect to host
-millionairessecrets.com: could not connect to host
-millions1.com: could not connect to host
-millions11.com: could not connect to host
-millions13.com: could not connect to host
-millions14.com: could not connect to host
-millions15.com: could not connect to host
-millions16.com: could not connect to host
-millions17.com: could not connect to host
-millions19.com: could not connect to host
-millions20.com: could not connect to host
-millions22.com: could not connect to host
-millions25.com: did not receive HSTS header
-millions26.com: did not receive HSTS header
-millions27.com: did not receive HSTS header
-millions28.com: did not receive HSTS header
-millions29.com: did not receive HSTS header
-millions31.com: could not connect to host
-millions32.com: could not connect to host
-millions33.com: could not connect to host
-millions35.com: could not connect to host
-millions36.com: could not connect to host
-millions37.com: could not connect to host
-millions38.com: could not connect to host
-millions39.com: could not connect to host
-millions40.com: could not connect to host
-millions41.com: did not receive HSTS header
-millions42.com: did not receive HSTS header
-millions43.com: could not connect to host
-millions5.com: could not connect to host
-millions50.com: did not receive HSTS header
-millions51.com: did not receive HSTS header
-millions52.com: did not receive HSTS header
-millions53.com: did not receive HSTS header
-millions55.com: could not connect to host
-millions56.com: did not receive HSTS header
-millions57.com: did not receive HSTS header
-millions58.com: did not receive HSTS header
-millions59.com: did not receive HSTS header
-millions6.com: could not connect to host
-millions60.com: did not receive HSTS header
-millions61.com: did not receive HSTS header
-millions62.com: did not receive HSTS header
-millions63.com: did not receive HSTS header
-millions66.com: could not connect to host
-millions7.com: could not connect to host
-millions70.com: could not connect to host
-millions71.com: could not connect to host
-millions72.com: could not connect to host
-millions77.com: could not connect to host
-millions8.com: could not connect to host
-millions80.com: could not connect to host
-millions81.com: could not connect to host
-millions82.com: could not connect to host
-millions88.com: could not connect to host
-millions9.com: could not connect to host
-millions99.com: could not connect to host
-milnes.org: max-age too low: 2592000
-milonga.tips: could not connect to host
-milsonhypnotherapyservices.com: did not receive HSTS header
-mim.properties: could not connect to host
-mimbeim.com: did not receive HSTS header
-mimm.gov: did not receive HSTS header
-mimobile.website: did not receive HSTS header
-mimoderoupa.pt: could not connect to host
-mimusic.cf: could not connect to host
-min.kiwi: could not connect to host
-minacssas.com: could not connect to host
-minakova.pro: could not connect to host
-mind-moves.es: could not connect to host
-mind.sh: did not receive HSTS header
-mindbodycontinuum.com: could not connect to host
-mindbodytherapymn.com: did not receive HSTS header
-mindcell.no: could not connect to host
-mindcraft.ga: could not connect to host
-mindercasso.nl: could not connect to host
-mindofmedia.dk: did not receive HSTS header
-mindox.com.br: could not connect to host
-mindsetatx.com: did not receive HSTS header
-mindseyesolutions.com: did not receive HSTS header
-mindvalley.com: did not receive HSTS header
-mindwork.space: could not connect to host
-mine.world: could not connect to host
-minecraft-forum.cf: could not connect to host
-minecraft-forum.ga: could not connect to host
-minecraft-forum.gq: could not connect to host
-minecraft-forum.ml: could not connect to host
-minecraft-forums.cf: could not connect to host
-minecraft-forums.ga: could not connect to host
-minecraft-forums.gq: could not connect to host
-minecraft-ok.ru: did not receive HSTS header
-minecraftforum.ch: could not connect to host
-minecraftforums.cf: could not connect to host
-minecraftforums.gq: could not connect to host
-minecraftforums.ml: could not connect to host
-minecraftserverz.com: could not connect to host
-minecraftvoter.com: could not connect to host
-minenash.com: did not receive HSTS header
-mineover.es: could not connect to host
-minepod.fr: did not receive HSTS header
-minetude.com: could not connect to host
-mingy.ddns.net: could not connect to host
-mingyueli.com: could not connect to host
-minhanossasenhora.com.br: could not connect to host
-miniglueck.net: did not receive HSTS header
-minikneet.nl: did not receive HSTS header
-minimaliston.com: could not connect to host
-minimonies.tk: could not connect to host
-minimoo.se: could not connect to host
-minipainting.net: did not receive HSTS header
-minivaro.de: could not connect to host
-minivehicle.tk: could not connect to host
-miniverse.social: could not connect to host
-miniwallaby.com: could not connect to host
-minkondom.nu: could not connect to host
-minload.com: could not connect to host
-minnesotadata.com: could not connect to host
-minnesotamathcorps.org: did not receive HSTS header
-minobar.com: could not connect to host
-minora.io: could not connect to host
-minoris.se: did not receive HSTS header
-mintea-noua.ro: could not connect to host
-mintosherbs.com: could not connect to host
-mintplayer.com: did not receive HSTS header
-mipiaci.co.nz: did not receive HSTS header
-mipiaci.com.au: did not receive HSTS header
-mipla.ch: did not receive HSTS header
-mipueblohoy.com: could not connect to host
-mipymesenlinea.com: could not connect to host
-miragrow.com: did not receive HSTS header
-mirazonline.tk: could not connect to host
-mirazperu.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-mirazperu.tk: could not connect to host
-mireillewendling.com.br: could not connect to host
-mirete.info: did not receive HSTS header
-mirgleich.dnshome.de: could not connect to host
-mirindadomo.ru: did not receive HSTS header
-miroctum.com: did not receive HSTS header
-mirodasilva.be: did not receive HSTS header
-mironized.com: did not receive HSTS header
-mirrorbot.ga: could not connect to host
-mirrorsedgearchive.ga: could not connect to host
-mirrorx.com: could not connect to host
-miruc.co: did not receive HSTS header
-mirucon.com: did not receive HSTS header
-misakastudio.com: could not connect to host
-misconfigured.io: could not connect to host
-miscreant.me: could not connect to host
-misericordiasegrate.org: could not connect to host
-misgluteosperfectos.com: did not receive HSTS header
-misini.fr: could not connect to host
-misiondelosangeles-mailing.com: could not connect to host
-misiru.jp: could not connect to host
-mismart.vn: did not receive HSTS header
-mispromo.com: could not connect to host
-missevent.pl: could not connect to host
-missfuli.com: could not connect to host
-missjoias.com.br: could not connect to host
-misskey.site: could not connect to host
-misskey.xyz: could not connect to host
-missoy.me: could not connect to host
-missrain.tw: could not connect to host
-misssex.de: could not connect to host
-misstika-bijoux.com: could not connect to host
-missycosmeticos.com.br: could not connect to host
-mist.ink: could not connect to host
-mister-cooks.fr: could not connect to host
-mister.hosting: did not receive HSTS header
-mistine.com.cn: could not connect to host
-mistine.net: could not connect to host
-mistinecn.com: did not receive HSTS header
-misura.re: could not connect to host
-misxvenelantro.com: did not receive HSTS header
-mita.me: could not connect to host
-mitabu.net: did not receive HSTS header
-mitarbeiter-pc.de: did not receive HSTS header
-mitchellrenouf.ca: could not connect to host
-mitevi.com: could not connect to host
-mitiad.gq: could not connect to host
-mitigationcommission.gov: could not connect to host
-mitior.net: could not connect to host
-mitm-software.badssl.com: could not connect to host
-mitsign.com: could not connect to host
-mittagonghomestead.com.au: could not connect to host
-mittelunsachlich.de: could not connect to host
-mittenhacks.com: could not connect to host
-mittenofficesystems.com: could not connect to host
-mitya.cz: could not connect to host
-mityinc.com: did not receive HSTS header
-mitylite.com: did not receive HSTS header
-miukimodafeminina.com: could not connect to host
-mivcon.net: could not connect to host
-mivestuariolaboral.com: max-age too low: 4838400
-mivzaklive.co.il: did not receive HSTS header
-mixer.cash: could not connect to host
-mixnshake.com: did not receive HSTS header
-mixrepairs.co.uk: did not receive HSTS header
-mixtape.moe: could not connect to host
-miya.io: could not connect to host
-miyako-kyoto.jp: could not connect to host
-miyasyou.com: did not receive HSTS header
-miyoshi-kikaku.co.jp: could not connect to host
-mizar.im: could not connect to host
-mizd.at: could not connect to host
-mizi.name: could not connect to host
-mizipack.com: did not receive HSTS header
-mizuho-trade.net: did not receive HSTS header
-mizumax.me: could not connect to host
-mjhsc.nl: did not receive HSTS header
-mjlaurindo.pt: could not connect to host
-mjmnagy.info: could not connect to host
-mk-dizajn.com: could not connect to host
-mkacg.com: could not connect to host
-mkakh.com: did not receive HSTS header
-mkakh.xyz: could not connect to host
-mkd.mk: did not receive HSTS header
-mkfilm.ma: did not receive HSTS header
-mkfs.be: could not connect to host
-mkfs.fr: could not connect to host
-mkgraves.com: did not receive HSTS header
-mkie.cf: could not connect to host
-mkkkrc.ru: could not connect to host
-mklenterprisesacademy.com: could not connect to host
-mklenterprisescoaching.com: could not connect to host
-mklpedia.de: could not connect to host
-mkp-deutschland.de: did not receive HSTS header
-mkplay.io: could not connect to host
-mkw.st: could not connect to host
-mlan-server.de: did not receive HSTS header
-mlarte.com: could not connect to host
-mlcambiental.com.br: did not receive HSTS header
-mlcdn.co: did not receive HSTS header
-mlemay.com: did not receive HSTS header
-mlfaw.com: could not connect to host
-mlii.net: could not connect to host
-mllz.com: could not connect to host
-mlm-worldwide.de: did not receive HSTS header
-mlonline.com.mx: could not connect to host
-mlpchan.net: could not connect to host
-mlpepilepsy.org: could not connect to host
-mlpvc-rr.ml: did not receive HSTS header
-mlrslateroofing.com.au: did not receive HSTS header
-mlsrv.de: could not connect to host
-mlxysf.com: did not receive HSTS header
-mm-wife.com: did not receive HSTS header
-mm4447761.com: max-age too low: 0
-mm5197.co: could not connect to host
-mm6729.co: could not connect to host
-mm6729.com: did not receive HSTS header
-mm6957.co: could not connect to host
-mm9297.co: could not connect to host
-mm9397.com: did not receive HSTS header
-mm9721.com: did not receive HSTS header
-mm9728.co: could not connect to host
-mma-acareporting.com: did not receive HSTS header
-mmaps.ddns.net: could not connect to host
-mmarnitz.de: could not connect to host
-mmcalc.jp: could not connect to host
-mmcc.pe: did not receive HSTS header
-mmgazhomeloans.com: could not connect to host
-mmilog.hu: could not connect to host
-mmmaximaliselmeny.hu: could not connect to host
-mmmm.com: could not connect to host
-mmoneko.com: could not connect to host
-mmpaymentsystem.com: did not receive HSTS header
-mmphub.com: could not connect to host
-mmstick.tk: could not connect to host
-mna7e.com: did not receive HSTS header
-mnconsulting.xyz: did not receive HSTS header
-mncr.nl: could not connect to host
-mnec.io: could not connect to host
-mnedc.org: did not receive HSTS header
-mneeb.de: could not connect to host
-mneerup.dk: did not receive HSTS header
-mnemotiv.com: could not connect to host
-mnetworkingsolutions.co.uk: could not connect to host
-mnitro.com: could not connect to host
-mnium.de: could not connect to host
-mnml.jp: did not receive HSTS header
-mnmt.no: did not receive HSTS header
-mnnknz.de: could not connect to host
-mnszone.com: could not connect to host
-mnt9.de: could not connect to host
-mnwt.nl: could not connect to host
-mo3.club: could not connect to host
-moabygg.se: could not connect to host
-moar.so: did not receive HSTS header
-moas.photos: could not connect to host
-mobag.ru: did not receive HSTS header
-mobaircon.com: could not connect to host
-mobi4.tk: could not connect to host
-mobidea.com: did not receive HSTS header
-mobilcom-debitel.de: did not receive HSTS header
-mobile-gesundheit.org: could not connect to host
-mobile.eti.br: could not connect to host
-mobilebay.top: could not connect to host
-mobilecoach.com: did not receive HSTS header
-mobilekey.co: did not receive HSTS header
-mobilemalin.com: did not receive HSTS header
-mobileritelushi.com: could not connect to host
-mobilesector.de: could not connect to host
-mobilethreat.net: could not connect to host
-mobilethreatnetwork.net: could not connect to host
-mobilidadeurbana.ind.br: did not receive HSTS header
-mobilisation-generale.org: could not connect to host
-mobilityworks.eu: did not receive HSTS header
-mobilpass.no: could not connect to host
-mobimalin.com: did not receive HSTS header
-mobisium.com: did not receive HSTS header
-mobiwalk.com: could not connect to host
-mobix5.com: could not connect to host
-mobl.io: could not connect to host
-mobmp4.co: could not connect to host
-mobmp4.com: could not connect to host
-mobmp4.info: could not connect to host
-mobot.sg: did not receive HSTS header
-mobsender.com: did not receive HSTS header
-mobycoders.com: could not connect to host
-mobydog.net: could not connect to host
-mocarps.hk: could not connect to host
-mochilerostailandia.com: could not connect to host
-mochiyuki.net: could not connect to host
-mochoko.com: could not connect to host
-mockmyapp.com: could not connect to host
-mocloud.eu: could not connect to host
-mocloud.win: could not connect to host
-mocsuite.club: could not connect to host
-modafinil.com: did not receive HSTS header
-modafinil.net: did not receive HSTS header
-modafinil.wiki: did not receive HSTS header
-modalrakyat.com: could not connect to host
-modalrakyat.id: did not receive HSTS header
-modaperuimport.com: could not connect to host
-modcasts.video: could not connect to host
-modded-minecraft-server-list.com: could not connect to host
-moddedark.com: could not connect to host
-mode-individuell.de: could not connect to host
-mode-marine.com: could not connect to host
-modecaso.com: could not connect to host
-modehaus-marionk.de: did not receive HSTS header
-model9.io: did not receive HSTS header
-modelcase.co.jp: did not receive HSTS header
-modelisme-voiture-rc.fr: did not receive HSTS header
-modellismo.roma.it: could not connect to host
-modelsclub.org.ua: could not connect to host
-modemagazines.co.uk: could not connect to host
-moderatorenpool.org: did not receive HSTS header
-moderatortv.de: did not receive HSTS header
-moderncoinmart.com: did not receive HSTS header
-modernibytovytextil.cz: did not receive HSTS header
-moderntld.net: could not connect to host
-modistry.com: could not connect to host
-modistryusercontent.com: could not connect to host
-mododo.de: could not connect to host
-modosaude.com.br: could not connect to host
-mods-community.de: could not connect to host
-mods-pic.de: could not connect to host
-modul21.com: did not receive HSTS header
-modul21.eu: could not connect to host
-moduloseltaladro.com: could not connect to host
-modx.io: could not connect to host
-modydev.club: could not connect to host
-moe.best: did not receive HSTS header
-moe.pe: could not connect to host
-moe.wtf: did not receive HSTS header
-moe4sale.in: did not receive HSTS header
-moeali.com: could not connect to host
-moebel-nagel.de: could not connect to host
-moecraft.net: could not connect to host
-moefi.xyz: could not connect to host
-moegirl.org: did not receive HSTS header
-moehrke.cc: could not connect to host
-moeli.org: could not connect to host
-moellers.it: could not connect to host
-moellers.systems: did not receive HSTS header
-moeloli.cc: did not receive HSTS header
-moeloli.pw: could not connect to host
-moelord.org: could not connect to host
-moen.io: did not receive HSTS header
-moenew.top: could not connect to host
-moens.tech: could not connect to host
-moepass.com: could not connect to host
-moeqing.net: could not connect to host
-moevenpick-cafe.com: did not receive HSTS header
-moeyoo.net: could not connect to host
-mofohome.dyndns.org: could not connect to host
-mogooin.com: could not connect to host
-mogry.net: did not receive HSTS header
-mohio.co.nz: did not receive HSTS header
-moho.kr: could not connect to host
-mohs.es: could not connect to host
-moin.jp: could not connect to host
-moitur.com: did not receive HSTS header
-mojapraca.sk: could not connect to host
-mojarada.nl: did not receive HSTS header
-mojefilmy.xyz: could not connect to host
-mojizuri.jp: could not connect to host
-mojkragujevac.net: could not connect to host
-mojomusic.org: could not connect to host
-mok.pw: did not receive HSTS header
-mokadev.com: did not receive HSTS header
-mokeedev.review: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-mokken-fabriek.nl: did not receive HSTS header
-mokote.com: did not receive HSTS header
-mokum-organics.com: could not connect to host
-mold.world: could not connect to host
-molpek.com: could not connect to host
-mols.me: could not connect to host
-molusk.ml: could not connect to host
-momento.co.id: did not receive HSTS header
-momfulfilled.com: could not connect to host
-momjoyas.com: did not receive HSTS header
-mommel.com: did not receive HSTS header
-mommelonline.de: could not connect to host
-momoka.moe: could not connect to host
-mon-mobile.com: did not receive HSTS header
-mona-dress.com: did not receive HSTS header
-mona.lu: could not connect to host
-monalisa.wtf: could not connect to host
-monarca.systems: could not connect to host
-monasterialis.eu: could not connect to host
-monautoneuve.fr: did not receive HSTS header
-mondar.io: could not connect to host
-mondedesnovels.com: could not connect to host
-mondopoint.com: did not receive HSTS header
-mondwandler.de: could not connect to host
-monelephantapois.com: could not connect to host
-moneoci.com.br: could not connect to host
-moneromerchant.com: could not connect to host
-moneseglobal.com: could not connect to host
-moneta-rossii.ru: did not receive HSTS header
-moneycrownmedia.com: could not connect to host
-moneyfactory.gov: did not receive HSTS header
-moneyhouse.de: did not receive HSTS header
-moneylance.ru: did not receive HSTS header
-mongla168.net: could not connect to host
-mongla88.net: could not connect to host
-monicabeckstrom.no: could not connect to host
-monika-sokol.de: did not receive HSTS header
-moninformaticien.ovh: could not connect to host
-moninformaticien.shop: could not connect to host
-monique.io: could not connect to host
-moniquedekermadec.com: could not connect to host
-monitaure.io: could not connect to host
-monitman.com: max-age too low: 0
-monitman.solutions: could not connect to host
-monitorchain.com: did not receive HSTS header
-monitori.ng: could not connect to host
-monitoring.kalisz.pl: could not connect to host
-monitoringd.de: could not connect to host
-monkeyhill.us: could not connect to host
-monobank.no: did not receive HSTS header
-monochrometoys.com: could not connect to host
-monodukuri.cafe: could not connect to host
-monodukuri.com: did not receive HSTS header
-monodzukuri.cafe: could not connect to host
-monokoo.com: max-age too low: 2592000
-mononom.com: could not connect to host
-monospazzole.roma.it: could not connect to host
-monotai.com: did not receive HSTS header
-monothesis.com: could not connect to host
-monotributo.online: did not receive HSTS header
-monotsuku.com: did not receive HSTS header
-monozukuri.cafe: could not connect to host
-monpetitforfait.com: did not receive HSTS header
-monplay.host: could not connect to host
-monsecretariat.pro: could not connect to host
-mont-thabor.fr: could not connect to host
-montagne-tendance.ch: could not connect to host
-montanacures.org: could not connect to host
-montanana.com: did not receive HSTS header
-montand.com: did not receive HSTS header
-montazer.net: could not connect to host
-montenero.pl: did not receive HSTS header
-monteurzimmerfrei.de: could not connect to host
-montgomerysoccer.net: could not connect to host
-montonicms.com: could not connect to host
-montopolis.com: max-age too low: 43200
-moo.pet: did not receive HSTS header
-moobo.co.jp: could not connect to host
-moobo.xyz: could not connect to host
-moodforsex.com: could not connect to host
-moodifiers.com: did not receive HSTS header
-moodzshop.com: could not connect to host
-moojp.co.jp: could not connect to host
-moonagic.io: could not connect to host
-moonlabs.nl: could not connect to host
-moonless.net: could not connect to host
-moonlightcapital.ml: could not connect to host
-moonloupe.com: could not connect to host
-moonrhythm.info: could not connect to host
-moontaj.com: could not connect to host
-moonysbouncycastles.co.uk: could not connect to host
-mooremetrics.com: did not receive HSTS header
-mooretownrancheria-nsn.gov: did not receive HSTS header
-moosbild.com: did not receive HSTS header
-mooselook.de: could not connect to host
-moosemanstudios.com: could not connect to host
-moosmaus.tk: did not receive HSTS header
-moov.is: could not connect to host
-moow.info: did not receive HSTS header
-moowcraft.eu: did not receive HSTS header
-moowdesign.eu: did not receive HSTS header
-mop321.com: max-age too low: 6307200
-moparcraft.com: could not connect to host
-moparcraft.org: could not connect to host
-moparisthebest.biz: could not connect to host
-moparisthebest.info: could not connect to host
-moparscape.org: did not receive HSTS header
-mopedpress.com: could not connect to host
-mopsuite.club: could not connect to host
-mor.cloud: could not connect to host
-mor.gl: could not connect to host
-moreapp.co.uk: could not connect to host
-morenci.ch: could not connect to host
-morepopcorn.co.nz: could not connect to host
-morespacestorage.com.au: did not receive HSTS header
-morethanadream.lv: could not connect to host
-moretti.camp: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-morfitronik.pl: could not connect to host
-morgancounty-al.gov: could not connect to host
-morgancountysheriffal.gov: could not connect to host
-morganestes.com: max-age too low: 0
-morgangallant.com: did not receive HSTS header
-morgansjewelerspv.com: did not receive HSTS header
-morhys.com: could not connect to host
-morningcalculation.com: could not connect to host
-morninglory.com: did not receive HSTS header
-mornings.com: could not connect to host
-moroccomiami.com: could not connect to host
-morotech.com.br: did not receive HSTS header
-morox.top: could not connect to host
-morpheusx.at: could not connect to host
-morpheusxaut.net: could not connect to host
-morphy2k.io: could not connect to host
-morpork.xyz: could not connect to host
-morrodafumacanoticias.com.br: did not receive HSTS header
-mortalincarnation.com: could not connect to host
-morteruelo.net: did not receive HSTS header
-mortgagecentersmo.com: did not receive HSTS header
-mortgagetranslations.gov: could not connect to host
-mosaique-lachenaie.fr: could not connect to host
-moshwire.com: could not connect to host
-moskva.guide: could not connect to host
-mosos.de: did not receive HSTS header
-mosshi.be: could not connect to host
-mosstier.com: did not receive HSTS header
-mostcomfortableworkboots.net: did not receive HSTS header
-mostlikelyto.fail: did not receive HSTS header
-mostlyharmless.at: could not connect to host
-mostlyinfinite.com: did not receive HSTS header
-mostlymuttz.org: did not receive HSTS header
-mostlyoverhead.com: could not connect to host
-mostwuat.com: could not connect to host
-motd.today: did not receive HSTS header
-motherbase.io: could not connect to host
-motherboard.services: could not connect to host
-motherearth.cf: did not receive HSTS header
-motionfreight.com: could not connect to host
-motionpicturesolutions.com: did not receive HSTS header
-motocollection.pl: did not receive HSTS header
-motomorgen.com: could not connect to host
-motorbiketourhanoi.com: could not connect to host
-motorcheck.ie: did not receive HSTS header
-motornomaslo.bg: did not receive HSTS header
-motoroilinfo.com: did not receive HSTS header
-motorzone.od.ua: could not connect to host
-motovio.de: could not connect to host
-motscroises.cc: could not connect to host
-mottvd.com: could not connect to host
-moube.fr: could not connect to host
-moudicat.com: did not receive HSTS header
-moula.com.au: did not receive HSTS header
-moumaobuchiyu.com: could not connect to host
-mountainadventureseminars.com: did not receive HSTS header
-mountainroseherbs.com: did not receive HSTS header
-mountainspringsrentals.ca: could not connect to host
-mountairymd.gov: did not receive HSTS header
-mousemessages.com: did not receive HSTS header
-movabletype.net: did not receive HSTS header
-movahoteis.com.br: could not connect to host
-moveek.com: did not receive HSTS header
-moveisfit.com.br: could not connect to host
-movepin.com: could not connect to host
-movestub.com: could not connect to host
-movewellapp.com: did not receive HSTS header
-movfun.ga: could not connect to host
-movie-cross.net: did not receive HSTS header
-movie4k.fyi: could not connect to host
-movie4k.life: could not connect to host
-movie4kto.site: did not receive HSTS header
-movie4kto.stream: could not connect to host
-movieboost.nl: could not connect to host
-moviedeposit.com: could not connect to host
-moviedollars.com: did not receive HSTS header
-movienang.com: max-age too low: 0
-moviepilot.com: did not receive HSTS header
-moviesabout.net: could not connect to host
-moviespur.info: did not receive HSTS header
-moviko.nz: could not connect to host
-movil.uno: could not connect to host
-moving-pixtures.de: could not connect to host
-moving-target.info: did not receive HSTS header
-movingoklahoma.org: could not connect to host
-movio.ga: could not connect to host
-movlib.org: could not connect to host
-mowalls.net: could not connect to host
-mox.link: could not connect to host
-moyer.pub: did not receive HSTS header
-moyideal.tk: could not connect to host
-moyoo.net: did not receive HSTS header
-moysovet.info: did not receive HSTS header
-moyu.host: did not receive HSTS header
-mozart-game.cz: could not connect to host
-mozartgame.cz: could not connect to host
-mozgb.ru: could not connect to host
-mozillians.org: did not receive HSTS header
-mozoa.net: could not connect to host
-mozzilla.cz: could not connect to host
-mp3donusturucu.com: did not receive HSTS header
-mp3donusturucu.net: did not receive HSTS header
-mp3juices.is: could not connect to host
-mpe.org: did not receive HSTS header
-mpg-universal.com: could not connect to host
-mpg.ovh: could not connect to host
-mphoto.at: could not connect to host
-mpi-sa.fr: did not receive HSTS header
-mpkossen.com: did not receive HSTS header
-mpkshop.com.br: could not connect to host
-mplicka.cz: did not receive HSTS header
-mplusm.eu: did not receive HSTS header
-mpn.poker: did not receive HSTS header
-mpnpokertour.com: did not receive HSTS header
-mpodraza.pl: could not connect to host
-mpreserver.com: could not connect to host
-mpserver12.org: could not connect to host
-mpsgarage.com.au: did not receive HSTS header
-mpu-giessen.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-mpy.ovh: could not connect to host
-mqas.net: could not connect to host
-mr-coffee.net: could not connect to host
-mr-designer-oman.com: did not receive HSTS header
-mr-hosting.com: could not connect to host
-mr-labo.jp: could not connect to host
-mr3.io: could not connect to host
-mrafrohead.com: could not connect to host
-mralonas.cf: could not connect to host
-mrawe.com: could not connect to host
-mrbmafrica.com: could not connect to host
-mrburtbox.com: could not connect to host
-mrcrowley217.com: could not connect to host
-mrdani.net: could not connect to host
-mrdleisure.co.uk: could not connect to host
-mrettich.org: did not receive HSTS header
-mrgasfires.co.uk: did not receive HSTS header
-mrgiveaways.com: did not receive HSTS header
-mrizzio.com: could not connect to host
-mrjbanksy.com: could not connect to host
-mrjooz.com: could not connect to host
-mrketolocksmith.com: did not receive HSTS header
-mrksk.com: could not connect to host
-mrliu.me: could not connect to host
-mrmoregame.de: could not connect to host
-mrnh.tk: could not connect to host
-mrning.com: could not connect to host
-mrpopat.in: did not receive HSTS header
-mrpropop.com: could not connect to host
-mrs-labo.jp: did not receive HSTS header
-mrserge.lv: did not receive HSTS header
-mruganiepodspacja.pl: could not connect to host
-mrvnt.de: did not receive HSTS header
-mrxboxseriesx.com: did not receive HSTS header
-ms-alternativ.de: did not receive HSTS header
-msc-seereisen.net: could not connect to host
-mscenter.cf: could not connect to host
-mschuessler.org: could not connect to host
-msdprojectclearmo.gov: could not connect to host
-mserve.ddns.net: could not connect to host
-msgallery.tk: did not receive HSTS header
-mshemailmarketer.com.au: could not connect to host
-msp66.de: could not connect to host
-mssys.de: did not receive HSTS header
-mstd.tokyo: did not receive HSTS header
-mstdn-tech.jp: could not connect to host
-mstdn.club: could not connect to host
-mstdn.fr: did not receive HSTS header
-mstdn.nl: could not connect to host
-mstiles92.com: could not connect to host
-msv-limpezas.pt: could not connect to host
-msz-fotografie.de: could not connect to host
-mszaki.com: did not receive HSTS header
-mt.me.uk: did not receive HSTS header
-mt4programming.com: max-age too low: 604800
-mtamaki.com: could not connect to host
-mtasts.xyz: could not connect to host
-mtau.com: max-age too low: 2592000
-mtcpuntosalud.com: could not connect to host
-mtd.ovh: could not connect to host
-mtdn.jp: could not connect to host
-mtfgnettoyage.fr: could not connect to host
-mtg-esport.de: did not receive HSTS header
-mtg-tutor.de: did not receive HSTS header
-mtinz.com: could not connect to host
-mtirc.co: could not connect to host
-mtnz.co.za: did not receive HSTS header
-mtr.md: could not connect to host
-mu3on.com: could not connect to host
-muahahahaha.co.uk: did not receive HSTS header
-mud-status.de: did not receive HSTS header
-mudgezero.one: could not connect to host
-mueblesemporium.com: could not connect to host
-muehlemann.net: did not receive HSTS header
-muel.io: could not connect to host
-mueller-gaestehaus.de: did not receive HSTS header
-muenzubi.de: did not receive HSTS header
-muffet.pw: did not receive HSTS header
-muga.space: could not connect to host
-muh.io: could not connect to host
-muhlenbergtwppa.gov: could not connect to host
-mui.jp: did not receive HSTS header
-muitadica.com: could not connect to host
-muitoalemdobolo.com.br: could not connect to host
-muj-svet.cz: could not connect to host
-mujadin.se: did not receive HSTS header
-mujemail.ml: could not connect to host
-mukyu.moe: could not connect to host
-mulaisehat.com: could not connect to host
-mulej.net: could not connect to host
-mulenvo.com: did not receive HSTS header
-mullerimoveisrj.com.br: did not receive HSTS header
-multi-vpn.biz: could not connect to host
-multigamers-net.tk: could not connect to host
-multiplayernow.com: could not connect to host
-multipleservers.com: could not connect to host
-multiplexcy.com: could not connect to host
-multivpn.cn.com: could not connect to host
-multivpn.com.de: could not connect to host
-multivpn.com.ua: could not connect to host
-multivpn.fr: could not connect to host
-multiworldsoftware.com: did not receive HSTS header
-multizone.games: could not connect to host
-multrier.fr: did not receive HSTS header
-muma.ml: could not connect to host
-mumei.space: did not receive HSTS header
-muminkoykiran.com: could not connect to host
-mundismart.com: could not connect to host
-mundoadulto.com.br: did not receive HSTS header
-mundoalpha.com.br: could not connect to host
-mundodapoesia.com: could not connect to host
-mundodoscarbonos.com.br: did not receive HSTS header
-mundogamers.top: could not connect to host
-mundosteampunk.club: could not connect to host
-mundosuiri.ml: could not connect to host
-munecoscabezones.com: did not receive HSTS header
-munfordtn.gov: could not connect to host
-munich-rage.de: did not receive HSTS header
-munirajiwa.com: could not connect to host
-munkiepus.com: did not receive HSTS header
-munpanel.com: did not receive HSTS header
-munrabi.com: could not connect to host
-munuc.org: did not receive HSTS header
-munzee.com: did not receive HSTS header
-muoivancauhoivisao.com: could not connect to host
-muonium.ch: could not connect to host
-murdercube.com: could not connect to host
-murfy.kiwi: could not connect to host
-muriburi.land: could not connect to host
-muriburiland.com: could not connect to host
-murmashi.com: did not receive HSTS header
-murmu.re: could not connect to host
-murodese.org: could not connect to host
-murphycraftbeerfest.com: did not receive HSTS header
-murraycoin.org: could not connect to host
-murraycolin.org: could not connect to host
-murrayrun.com: did not receive HSTS header
-mursu.directory: could not connect to host
-murz.tv: could not connect to host
-murzik.space: could not connect to host
-muscle-tg.com: could not connect to host
-musearchengine.com: could not connect to host
-museloveurania.com: did not receive HSTS header
-museminder2.com: did not receive HSTS header
-museumstreak.com: could not connect to host
-musewearflipflops.com: did not receive HSTS header
-mushfiqweb.com: did not receive HSTS header
-mushman.tk: could not connect to host
-mushroomandfern.com: could not connect to host
-musi.cx: could not connect to host
-musicaconleali.it: did not receive HSTS header
-musicalsoulfood.com: did not receive HSTS header
-musicapara.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-musiccitycats.com: did not receive HSTS header
-musicdemons.com: could not connect to host
-musicsense.cf: could not connect to host
-musiikkiohjelmapalvelu.fi: did not receive HSTS header
-musikkfondene.no: did not receive HSTS header
-musikzug-bookholzberg.de: did not receive HSTS header
-musingsatmidnight.com: could not connect to host
-musique2nuit.com: could not connect to host
-muslimbanter.co.za: could not connect to host
-muspla.com: did not receive HSTS header
-musselsblog.com: could not connect to host
-mustafa.space: could not connect to host
-mustika.cf: could not connect to host
-mustsellacarglobal.com: did not receive HSTS header
-mutamatic.com: could not connect to host
-mutantmonkey.sexy: could not connect to host
-muthai.in.th: could not connect to host
-mutuals.cool: could not connect to host
-mutuelle-obligatoire-pme.fr: did not receive HSTS header
-muusika.fun: could not connect to host
-muusikoiden.net: did not receive HSTS header
-muy.ooo: could not connect to host
-muzgra.in: could not connect to host
-muzi.cz: could not connect to host
-muzykaprzeszladoplay.pl: could not connect to host
-mv-wohnen.de: could not connect to host
-mvanmarketing.nl: did not receive HSTS header
-mvbug.com: could not connect to host
-mvion.fr: max-age too low: 0
-mvnet.com.br: could not connect to host
-mvp-stars.com: did not receive HSTS header
-mvsecurity.nl: could not connect to host
-mvwoensei.com: could not connect to host
-mvwoensel.com: could not connect to host
-mwamitours.com: could not connect to host
-mware-staging.azurewebsites.net: could not connect to host
-mwezi-foundation.org: could not connect to host
-mwezi.org: did not receive HSTS header
-mwohlfarth.de: did not receive HSTS header
-mxawei.cn: could not connect to host
-mxdanggui.org: could not connect to host
-mxihan.xyz: could not connect to host
-mxn8.com: could not connect to host
-mxp.tw: did not receive HSTS header
-my-aftershave-store.co.uk: could not connect to host
-my-amigo.ru: did not receive HSTS header
-my-ccleaner.ru: did not receive HSTS header
-my-cdn.de: could not connect to host
-my-co.ir: did not receive HSTS header
-my-demo.co: could not connect to host
-my-news-portal.ru: could not connect to host
-my-owncloud.com: could not connect to host
-my-pawnshop.com.ua: could not connect to host
-my-photo.me: could not connect to host
-my-plancha.ch: could not connect to host
-my-static-demo-808795.c.cdn77.org: could not connect to host
-my-static-live-808795.c.cdn77.org: could not connect to host
-my-voice.nl: did not receive HSTS header
-my.alfresco.com: could not connect to host
-my.swedbank.se: did not receive HSTS header
-my.xero.com: did not receive HSTS header
-myairshop.gr: could not connect to host
-myandroid.tools: could not connect to host
-myandroidtools.cc: could not connect to host
-myandroidtools.pro: could not connect to host
-myappliancerepairhouston.com: did not receive HSTS header
-myartsway.com: did not receive HSTS header
-myaspenheights.com: did not receive HSTS header
-mybagofcoffee.com: could not connect to host
-mybboard.pl: did not receive HSTS header
-mybeautyjobs.de: could not connect to host
-myblockchain.cloud: could not connect to host
-mybonfire.com: did not receive HSTS header
-mybreastcancerjourney.com: could not connect to host
-mybudget.xyz: could not connect to host
-mybuilderinlondon.co.uk: did not receive HSTS header
-mybus.ro: did not receive HSTS header
-mybusiness.cm: did not receive HSTS header
-mycamda.com: could not connect to host
-mycard.moe: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-mycarwashers.com: could not connect to host
-mychocolateweightloss.com: could not connect to host
-myclasscam.com: did not receive HSTS header
-myclasscam.org: could not connect to host
-myclientsplus.com: did not receive HSTS header
-mycloudsaas.com: did not receive HSTS header
-mycollab.net: could not connect to host
-mycolorado.gov: could not connect to host
-mycompanion.cz: could not connect to host
-myconan.net: did not receive HSTS header
-myconan.tk: could not connect to host
-myconnect.cn: could not connect to host
-mycontrolmonitor.com: could not connect to host
-mycoted.com: did not receive HSTS header
-mycp668.com: could not connect to host
-mycreativeartsconsulting.com: could not connect to host
-mycuco.it: did not receive HSTS header
-mycustomwriting.com: could not connect to host
-myday.eu.com: did not receive HSTS header
-mydeos.com: could not connect to host
-mydigipass.com: could not connect to host
-mydjsongbook.com: max-age too low: 3600
-mydmdi.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-mydnaresults.com: could not connect to host
-mydnatest.com: did not receive HSTS header
-mydomaindesk.com: did not receive HSTS header
-mydreamlifelab.com: could not connect to host
-mydreamshaadi.in: could not connect to host
-mydriversedge.com: did not receive HSTS header
-mydrone.services: did not receive HSTS header
-myebony.cam: could not connect to host
-myedumundo.com: could not connect to host
-myeffect.today: did not receive HSTS header
-myeml.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-myepass.bg: could not connect to host
-myepass.de: could not connect to host
-myfantasysportstalk.com: could not connect to host
-myfappening.org: could not connect to host
-myfdic.gov: could not connect to host
-myfiladelfia.com: did not receive HSTS header
-myfishpalace.at: could not connect to host
-myfloridacfo.gov: could not connect to host
-myfloridadeferredcomp.com: could not connect to host
-myfunworld.de: could not connect to host
-mygalgame.com: could not connect to host
-mygaysitges.com: could not connect to host
-mygedit.info: could not connect to host
-mygedit.net: could not connect to host
-mygedit.org: could not connect to host
-mygeneral.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-mygivingcircle.org: did not receive HSTS header
-mygooder.com: could not connect to host
-mygov.scot: did not receive HSTS header
-mygpsite.com: did not receive HSTS header
-mygreatjob.eu: could not connect to host
-mygreatjobs.de: could not connect to host
-mygrotto.org: could not connect to host
-myhair.asia: did not receive HSTS header
-myhealthreviews.com: did not receive HSTS header
-myhloli.com: did not receive HSTS header
-myhostname.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-myhostvm.com: could not connect to host
-myhotdesign.com: did not receive HSTS header
-myicare.org: could not connect to host
-myinjuryattorney.com: did not receive HSTS header
-myinsuranceauto.com: did not receive HSTS header
-myinsurancesource.com: could not connect to host
-myintimtoys.com: could not connect to host
-myinvite.nl: could not connect to host
-myiocc.org: could not connect to host
-myip.tech: max-age too low: 2592000
-myipaddr.de: max-age too low: 10
-myipv4.de: could not connect to host
-mykarelia.ga: could not connect to host
-mykolab.com: could not connect to host
-mykreuzfahrt.de: could not connect to host
-mylatestnews.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-myleanfactory.de: did not receive HSTS header
-myliveupdates.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-mylkguys.com: could not connect to host
-mylocalsearch.co.uk: did not receive HSTS header
-mymadina.com: did not receive HSTS header
-mymed.de: did not receive HSTS header
-mymed.eu: did not receive HSTS header
-mymp3singer.co: did not receive HSTS header
-mymp3singer.net: could not connect to host
-mymp3singer.site: could not connect to host
-myms.eu: could not connect to host
-mymusiclist.alwaysdata.net: could not connect to host
-myndcoins.com: could not connect to host
-myndcommunication.com: could not connect to host
-mynetblog.com: did not receive HSTS header
-mynetworkingbuddy.com: could not connect to host
-mynewleaf.co: did not receive HSTS header
-mynewselfbariatrics.com: did not receive HSTS header
-myni.io: could not connect to host
-mynigma.org: did not receive HSTS header
-mynortherngarden.com: did not receive HSTS header
-myon.info: did not receive HSTS header
-myonlinedating.club: could not connect to host
-myonlinevehicleinsurance.com: could not connect to host
-myoregon.gov: did not receive HSTS header
-myownconference.cloud: could not connect to host
-myownconference.net: did not receive HSTS header
-mypagella.com: could not connect to host
-mypagella.eu: could not connect to host
-mypagella.it: could not connect to host
-myparfumerie.at: did not receive HSTS header
-myparisiankitchen.com: did not receive HSTS header
-mypcqq.cc: did not receive HSTS header
-mypension.ca: could not connect to host
-myperfecthome.ca: could not connect to host
-myperfumecollection.com: did not receive HSTS header
-myphonebox.de: could not connect to host
-myphotos.ga: could not connect to host
-myproblog.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-myproxy.eu.org: could not connect to host
-mypt3.com: did not receive HSTS header
-mypup.nl: did not receive HSTS header
-myqdu.cn: could not connect to host
-myqdu.com: could not connect to host
-myrealestateschool.com: max-age too low: 0
-myrepublic.co.id: did not receive HSTS header
-myrepublic.id: could not connect to host
-myresearchapp.com: could not connect to host
-myrig.com.ua: did not receive HSTS header
-myrig.io: could not connect to host
-myrig.net: could not connect to host
-myrig.ru: did not receive HSTS header
-myroofandhome.com: did not receive HSTS header
-myrsa.in: did not receive HSTS header
-myruststats.com: could not connect to host
-myrvogna.net: could not connect to host
-mysa.is: could not connect to host
-mysad.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-mysam.net: max-age too low: 86400
-mysber.ru: did not receive HSTS header
-mysecretrewards.com: could not connect to host
-mysectools.org: did not receive HSTS header
-myseo.ga: could not connect to host
-myserv.one: could not connect to host
-myservice.store: could not connect to host
-myseu.cn: did not receive HSTS header
-myshirtsize.com: did not receive HSTS header
-mysize-condooms.nl: could not connect to host
-mysmelly.com: did not receive HSTS header
-mysocialporn.com: could not connect to host
-mysongbird.xyz: did not receive HSTS header
-myspa.asia: did not receive HSTS header
-mystatus24.com: could not connect to host
-mysteriesandmargaritasblogspot.com: could not connect to host
-mystery-science-theater-3000.de: did not receive HSTS header
-mysticplumes.com: did not receive HSTS header
-mystore24.us: could not connect to host
-mystown.org: could not connect to host
-mysupboard.de: did not receive HSTS header
-mytc.fr: could not connect to host
-mythengay.ch: did not receive HSTS header
-mythlogic.com: could not connect to host
-mythslegendscollection.com: did not receive HSTS header
-mytravelblog.de: could not connect to host
-mytravelog.ch: did not receive HSTS header
-mytruecare.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-myulog.net: could not connect to host
-myunicornshops.com: could not connect to host
-myupdatestar.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-myupdatestudio.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-myupdatesystems.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-myvpl.com: could not connect to host
-mywallets.io: could not connect to host
-mywebinar.io: could not connect to host
-mywebmanager.co.uk: could not connect to host
-myweddingaway.co.uk: did not receive HSTS header
-mywomenshealthgroup.com: did not receive HSTS header
-myxbox.gr: max-age too low: 0
-myzhili.com: could not connect to host
-mzh.io: did not receive HSTS header
-mziulu.me: could not connect to host
-mzlog.win: could not connect to host
-mzzj.de: could not connect to host
-n-a.date: did not receive HSTS header
-n-blox.com: did not receive HSTS header
-n-rickroll-e.pw: could not connect to host
-n-soft.info: did not receive HSTS header
-n-x.info: could not connect to host
-n0rm.ru: could not connect to host
-n0s.de: did not receive HSTS header
-n2host.eu: could not connect to host
-n2x.in: could not connect to host
-n30365.com: could not connect to host
-n3ro.io: did not receive HSTS header
-n3ro.net: did not receive HSTS header
-n3twork.net: could not connect to host
-n4l.pw: could not connect to host
-n5118.com: could not connect to host
-n5197.co: could not connect to host
-n64chan.me: did not receive HSTS header
-n6729.co: could not connect to host
-n6729.com: did not receive HSTS header
-n6957.co: could not connect to host
-n6957.com: did not receive HSTS header
-n81365.com: did not receive HSTS header
-n81818.com: did not receive HSTS header
-n82365.com: did not receive HSTS header
-n888ok.com: could not connect to host
-n8ch.net: could not connect to host
-n8ta.com: did not receive HSTS header
-n9297.co: could not connect to host
-n9397.com: did not receive HSTS header
-n9721.com: did not receive HSTS header
-n9728.co: could not connect to host
-na.hn: could not connect to host
-naam.me: could not connect to host
-naano.org: could not connect to host
-naarakah.fr: did not receive HSTS header
-nabbar.com: did not receive HSTS header
-nabru.co.uk: did not receive HSTS header
-nabu-bad-nauheim.de: did not receive HSTS header
-nabytko.cz: could not connect to host
-nac-6.fr: did not receive HSTS header
-nachovni.pp.ua: did not receive HSTS header
-nachtmuziek.info: could not connect to host
-nacktwanderfreunde.de: did not receive HSTS header
-nadaquenosepas.com: could not connect to host
-nadia.pt: could not connect to host
-naga.im: could not connect to host
-nagajanroshiya.info: could not connect to host
-naganithin.me: did not receive HSTS header
-nagaragem.com.br: did not receive HSTS header
-nagata.info: did not receive HSTS header
-naggie.net: could not connect to host
-nagios.by: did not receive HSTS header
-nagoya-kyuyo.com: could not connect to host
-nagrad.tk: could not connect to host
-nahura.com: could not connect to host
-naiaspa.fr: did not receive HSTS header
-naiharngym.com: did not receive HSTS header
-naijaxnet.com.ng: could not connect to host
-nais.me: could not connect to host
-nais0ne.com: did not receive HSTS header
-naive.network: could not connect to host
-naivetube.com: could not connect to host
-najany.de: could not connect to host
-najany.dk: could not connect to host
-najany.fr: could not connect to host
-najany.nl: could not connect to host
-najany.se: could not connect to host
-najfilmy.eu: did not receive HSTS header
-nakada4610.com: could not connect to host
-nakamastreamingcommunity.com: could not connect to host
-nakanishi-paint.com: could not connect to host
-nakedalarmclock.me: could not connect to host
-nakhonidc.com: could not connect to host
-nakitbonus2.com: could not connect to host
-nakladki.su: did not receive HSTS header
-nakliyatsirketi.biz: could not connect to host
-nakuro.de: could not connect to host
-nal.av.tr: could not connect to host
-nalao-company.com: did not receive HSTS header
-nalifornia.com: max-age too low: 0
-nalinux.cz: could not connect to host
-nallon.com.br: could not connect to host
-nalukfitness.com.br: could not connect to host
-namaho.com: could not connect to host
-namalelaki.com: could not connect to host
-namaperempuan.com: could not connect to host
-namazon.org: could not connect to host
-named.ga: did not receive HSTS header
-nameme.xyz: could not connect to host
-namethatbone.com: could not connect to host
-namethissymbol.com: could not connect to host
-nami.bo: could not connect to host
-namikawatetsuji.jp: could not connect to host
-namorico.me: could not connect to host
-namu.com.br: did not receive HSTS header
-namuwikiusercontent.com: could not connect to host
-nan.zone: could not connect to host
-nanami.moe: did not receive HSTS header
-nanderson.me: could not connect to host
-nanfangstone.com: could not connect to host
-nange.co: could not connect to host
-nani.io: could not connect to host
-naniki.co.uk: could not connect to host
-nanofy.org: could not connect to host
-nanogeneinc.com: could not connect to host
-nanogi.ga: could not connect to host
-nanokamo.com: did not receive HSTS header
-nanollet.org: could not connect to host
-nanosingularity.com: could not connect to host
-nanovolt.nl: could not connect to host
-nanrenba.net: could not connect to host
-nansa.ch: could not connect to host
-nanto.eu: did not receive HSTS header
-nanxin.xyz: could not connect to host
-naoar.com: could not connect to host
-naphex.rocks: could not connect to host
-naphogar.com: did not receive HSTS header
-napiki.pl: did not receive HSTS header
-napisynapomniky.cz: did not receive HSTS header
-napkins-wholesale.us: could not connect to host
-napolinissanctparts.com: could not connect to host
-nappynko.com: did not receive HSTS header
-narach.com: did not receive HSTS header
-narada.com.ua: could not connect to host
-narardetval.se: could not connect to host
-narela.com.mx: could not connect to host
-narenderchopra.com: could not connect to host
-naric.com: could not connect to host
-narodniki.com: could not connect to host
-narodsovety.ru: could not connect to host
-narrative.network: could not connect to host
-narviz.com: did not receive HSTS header
-nasaacronyms-beta.com: could not connect to host
-nasaacronyms.com: could not connect to host
-nasarawanewsonline.com: could not connect to host
-nascio.org: did not receive HSTS header
-naseco.se: did not receive HSTS header
-naseehah.ga: could not connect to host
-nashvillesheriff.gov: could not connect to host
-nasme.tk: did not receive HSTS header
-naspro.ru: did not receive HSTS header
-nasr.mobi: could not connect to host
-nasralmabrooka.com: did not receive HSTS header
-nasserver-test.de: did not receive HSTS header
-nassi.me: could not connect to host
-nastoletni.pl: did not receive HSTS header
-nastysclaw.com: could not connect to host
-nataldigital.com: could not connect to host
-natalia-fadeeva.ru: could not connect to host
-natalia.io: did not receive HSTS header
-natalieandjoshua.com: could not connect to host
-natalt.org: did not receive HSTS header
-natan-fourie.fr: max-age too low: 1728000
-nataniel-perissier.fr: could not connect to host
-natarius.tk: could not connect to host
-natatorium.org: did not receive HSTS header
-nate.sh: could not connect to host
-nathan.io: max-age too low: 0
-nathumarket.com.br: could not connect to host
-nationalmall.gov: could not connect to host
-nationalpassportservice.info: could not connect to host
-nationaltaxprep.com: could not connect to host
-nationwiderealtyinvestors.com: did not receive HSTS header
-nationwidevehiclecontracts.co.uk: did not receive HSTS header
-natteravneneibergen.no: did not receive HSTS header
-nattiam.com: did not receive HSTS header
-natur-udvar.hu: could not connect to host
-naturadent.hu: did not receive HSTS header
-natural-progesterone.net: could not connect to host
-naturalcommission.com: could not connect to host
-naturblogg.no: did not receive HSTS header
-nature-et-bio.fr: could not connect to host
-nature-shots.net: could not connect to host
-naturecoaster.com: did not receive HSTS header
-natureword.com: did not receive HSTS header
-natuterra.com.br: could not connect to host
-natuurbehangnederland.nl: could not connect to host
-nauck.org: could not connect to host
-naudles.me: could not connect to host
-naughtytoy.co.uk: did not receive HSTS header
-nav.jobs: did not receive HSTS header
-naval.tf: could not connect to host
-navegos.net: could not connect to host
-naviaddress.io: did not receive HSTS header
-navigate-it-services.de: did not receive HSTS header
-naviteq.eu: could not connect to host
-navitime.me: could not connect to host
-navjobs.com: could not connect to host
-navstivime.cz: did not receive HSTS header
-nawroth.info: could not connect to host
-nax.io: did not receive HSTS header
-nay.moe: could not connect to host
-nazigol.com: did not receive HSTS header
-nazuna.blue: could not connect to host
-nb10000.vip: max-age too low: 0
-nba-croatia.com: could not connect to host
-nba2kqq.com: could not connect to host
-nbb.io: did not receive HSTS header
-nbg-ha.de: could not connect to host
-nbgrooves.de: did not receive HSTS header
-nbis.gov: could not connect to host
-nbl.org.tw: could not connect to host
-nbm.gov: could not connect to host
-nbnnetwork.com: could not connect to host
-nbook.org: did not receive HSTS header
-nbp.com.pk: did not receive HSTS header
-nbrain.de: could not connect to host
-nbriresearch.com: could not connect to host
-nbrown.us: could not connect to host
-nbtparse.org: did not receive HSTS header
-nbur.co.uk: did not receive HSTS header
-nc-network.io: could not connect to host
-nc2c.com: could not connect to host
-nca.ink: could not connect to host
-ncamarquee.co.uk: could not connect to host
-ncaq.net: did not receive HSTS header
-ncc60205.info: could not connect to host
-ncdesigns-studio.com: did not receive HSTS header
-nchristo.com: could not connect to host
-ncic.gg: could not connect to host
-nclvle.co.uk: did not receive HSTS header
-ncm-malerbetrieb.de: did not receive HSTS header
-ncmedicaidplan.gov: could not connect to host
-ncmedicaidplans.gov: did not receive HSTS header
-ncpc.gov: could not connect to host
-ncpw.gov: could not connect to host
-ncrmnt.org: did not receive HSTS header
-ncstep.org: did not receive HSTS header
-nct.org.uk: did not receive HSTS header
-ndatc.com: did not receive HSTS header
-ndhlink.com: could not connect to host
-ndime.com: did not receive HSTS header
-ndmath.club: could not connect to host
-ndpbrn-research.org: could not connect to host
-ndtblog.com: could not connect to host
-ndtmarket.place: could not connect to host
-ndum.ch: could not connect to host
-ne1home.dyndns.org: did not receive HSTS header
-neap.io: could not connect to host
-neapi.com: could not connect to host
-near.st: did not receive HSTS header
-nearbi.com.mx: could not connect to host
-nearbiwa.com: did not receive HSTS header
-nearon.nl: could not connect to host
-neatzy.co.uk: could not connect to host
-neavision.de: could not connect to host
-nebl.cash: could not connect to host
-nebracy.com: could not connect to host
-nebras.ga: did not receive HSTS header
-nebulousenhanced.com: could not connect to host
-nebuluxcapital.com: could not connect to host
-necesitodinero.org: did not receive HSTS header
-nechiactua.com: could not connect to host
-necio.ca: did not receive HSTS header
-nedcf.org.uk: could not connect to host
-nederdraad.org: did not receive HSTS header
-nediyor.com: did not receive HSTS header
-nedwave.com: could not connect to host
-nedys.top: could not connect to host
-needle.net.nz: could not connect to host
-needle.nz: could not connect to host
-needletail.io: did not receive HSTS header
-neeerd.org: did not receive HSTS header
-neels.ch: did not receive HSTS header
-neer.io: could not connect to host
-neet-investor.biz: could not connect to host
-neffat.si: did not receive HSTS header
-neftaly.com: could not connect to host
-neftebitum-kngk.ru: did not receive HSTS header
-neg9.org: could not connect to host
-negativzinsen.info: did not receive HSTS header
-neglecteddiseases.gov: could not connect to host
-negraelinda.com: could not connect to host
-nehalem.gov: did not receive HSTS header
-neilgreen.net: did not receive HSTS header
-neilshealthymeals.com: did not receive HSTS header
-neio.uk: could not connect to host
-nejkasy.cz: did not receive HSTS header
-nejnamc.org: did not receive HSTS header
-neko-life.com: did not receive HSTS header
-neko.li: could not connect to host
-neko.ml: could not connect to host
-nekoku.io: could not connect to host
-nekolove.jp: did not receive HSTS header
-nekomio.com: did not receive HSTS header
-nekox.ml: could not connect to host
-nella-project.org: could not connect to host
-nella.io: could not connect to host
-nellacms.com: could not connect to host
-nellacms.org: could not connect to host
-nellafw.org: could not connect to host
-nemanja.top: could not connect to host
-nemausus.com: did not receive HSTS header
-nemno.de: could not connect to host
-nemovement.org: could not connect to host
-nemplex.win: could not connect to host
-nengzhen.com.cn: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-neoani.me: could not connect to host
-neocoding.com: could not connect to host
-neocyd.com: could not connect to host
-neofelhz.space: could not connect to host
-neofilia.tk: could not connect to host
-neohu.com: could not connect to host
-neojames.me: could not connect to host
-neokobe.city: could not connect to host
-neolink.dk: could not connect to host
-neonisi.com: could not connect to host
-neonnuke.tech: could not connect to host
-neosey.com: could not connect to host
-neotist.com: did not receive HSTS header
-neowa.tk: could not connect to host
-nepageeks.com: did not receive HSTS header
-nephos.xyz: could not connect to host
-neppglobal.top: could not connect to host
-nercp.org.uk: did not receive HSTS header
-nerd42.de: did not receive HSTS header
-nerdbox.cc: did not receive HSTS header
-nerdinator.ddns.net: could not connect to host
-nerdjokes.de: could not connect to host
-nerdoutstudios.tv: could not connect to host
-nerdrockshop.co.uk: did not receive HSTS header
-nerdswithknives.com: did not receive HSTS header
-nerfroute.com: could not connect to host
-neris.io: could not connect to host
-neriumhcp.com: did not receive HSTS header
-nert.gq: could not connect to host
-nerull7.info: could not connect to host
-nesantuoka.lt: could not connect to host
-nesbase.com: could not connect to host
-nesterov.pw: could not connect to host
-nestone.ru: could not connect to host
-net-combo-ja.com: did not receive HSTS header
-net-masters.pl: could not connect to host
-net-navi.cc: did not receive HSTS header
-net-rencontre.com: did not receive HSTS header
-net-share.de: did not receive HSTS header
-net2o.com: did not receive HSTS header
-net2o.de: did not receive HSTS header
-net2o.net: did not receive HSTS header
-net4it.de: did not receive HSTS header
-netba.net: could not connect to host
-netbows.com: could not connect to host
-netbows.es: could not connect to host
-netbox.cc: could not connect to host
-netbrief.ml: could not connect to host
-netde.jp: did not receive HSTS header
-netdego.jp: could not connect to host
-netducks.space: could not connect to host
-netexem.com: did not receive HSTS header
-netexpat.com: did not receive HSTS header
-netherwind.eu: did not receive HSTS header
-nethunter.top: could not connect to host
-netid.de: did not receive HSTS header
-netlilo.com: could not connect to host
-netloanusa.com: could not connect to host
-netmagik.com: did not receive HSTS header
-netnik.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-netolink.ru: could not connect to host
-netresourcedesign.com: could not connect to host
-netsafeid.biz: did not receive HSTS header
-netscaler.expert: could not connect to host
-netsec.cloud: could not connect to host
-netsecma.com: could not connect to host
-netsight.org: could not connect to host
-netsparkercloud.com: did not receive HSTS header
-netsystems.pro: could not connect to host
-nettacompany.com.tr: did not receive HSTS header
-nettefoundation.com: could not connect to host
-nettopower.dk: did not receive HSTS header
-nettoyage.email: could not connect to host
-nettplusultra-rhone.fr: did not receive HSTS header
-netulo.com: could not connect to host
-netvpn.ml: could not connect to host
-netwaf.com: could not connect to host
-network-notes.com: could not connect to host
-networkersdiary.com: could not connect to host
-networkhane.com: did not receive HSTS header
-networking-groups.co.uk: could not connect to host
-networkposting.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-netzbit.de: could not connect to host
-netzona.org: could not connect to host
-netztest.at: did not receive HSTS header
-netzvieh.de: could not connect to host
-netzzwerg4u.de: did not receive HSTS header
-neueonlinecasino2016.com: could not connect to host
-neuhaus-city.de: could not connect to host
-neuralgic.net: could not connect to host
-neuro-plus-100.com: could not connect to host
-neuroandspineconsultants.com: did not receive HSTS header
-neuroethics.com: did not receive HSTS header
-neurogroove.info: did not receive HSTS header
-neuronasdigitales.com: did not receive HSTS header
-neuronfactor.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-neutralvehicle.com: did not receive HSTS header
-nevadafiber.net: could not connect to host
-nevalogic.com: could not connect to host
-neverwetturkey.com: could not connect to host
-neveta.com: could not connect to host
-new: could not connect to host
-new.travel.pl: did not receive HSTS header
-newantiagingcreams.com: could not connect to host
-newbieboss.com: did not receive HSTS header
-newbownerton.xyz: could not connect to host
-newburghhistoryblog.com: did not receive HSTS header
-newcab.de: did not receive HSTS header
-newchance.store: could not connect to host
-newcityinfo.info: could not connect to host
-newcomm.nl: could not connect to host
-newcreamforface.com: could not connect to host
-newdeveloper.download: could not connect to host
-newdirectionsolar.com.au: could not connect to host
-newedivideo.it: could not connect to host
-newfacialbeautycream.com: could not connect to host
-newflavor.design: could not connect to host
-newgenerationplus.org: could not connect to host
-newgraphics.by: did not receive HSTS header
-newhdmovies.io: could not connect to host
-newhopeplacement.com: did not receive HSTS header
-newhoperailroad.com: did not receive HSTS header
-newjianzhi.com: could not connect to host
-newlifehempoil.com: did not receive HSTS header
-newlooknow.com: did not receive HSTS header
-newmovements.net: could not connect to host
-newpathintegratedtherapy.com: did not receive HSTS header
-newpoke.net: did not receive HSTS header
-newportpropertygroup.com: could not connect to host
-newposts.ru: could not connect to host
-news4c.com: did not receive HSTS header
-newsa2.com: could not connect to host
-newsaboutgames.de: could not connect to host
-newserumforskin.com: could not connect to host
-newsquantified.com: max-age too low: 0
-newstarnootropics.com: could not connect to host
-newstone-tech.com: could not connect to host
-newtnote.com: could not connect to host
-newtonhaus.com: could not connect to host
-newtonwarp.com: could not connect to host
-newworldnewlife.tk: could not connect to host
-nexlab.org: did not receive HSTS header
-next-server.eu: could not connect to host
-next47.com: did not receive HSTS header
-nextads.ch: could not connect to host
-nextcloud-miyamoto.spdns.org: did not receive HSTS header
-nextcloud.co.za: did not receive HSTS header
-nextcloud.nerdpol.ovh: could not connect to host
-nextclouddarwinkel.nl: could not connect to host
-nextechoax.com: did not receive HSTS header
-nextend.org: could not connect to host
-nexter.cloud: could not connect to host
-nextgencel.com: did not receive HSTS header
-nexth.de: could not connect to host
-nexth.net: did not receive HSTS header
-nexth.us: could not connect to host
-nexthop.co.th: did not receive HSTS header
-nextlevel-it.co.uk: could not connect to host
-nextme.se: could not connect to host
-nextpages.de: could not connect to host
-nextpost.company: could not connect to host
-nextproject.us: could not connect to host
-nextrec.site: could not connect to host
-nextrobotics.de: did not receive HSTS header
-nextshutter.com: did not receive HSTS header
-nexus-vienna.at: could not connect to host
-nexusbyte.de: could not connect to host
-nexusconnectinternational.eu: could not connect to host
-nexuscorporation.in: could not connect to host
-nezvestice.cz: did not receive HSTS header
-nf4.net: could not connect to host
-nfhome.be: did not receive HSTS header
-nfir.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-nflchan.org: could not connect to host
-nfluence.org: could not connect to host
-nfo.so: did not receive HSTS header
-nfrost.me: could not connect to host
-ng-firewall.com: did not receive HSTS header
-ng-security.com: could not connect to host
-ngiemboon.net: could not connect to host
-ngine.ch: could not connect to host
-nginxconfig.io: did not receive HSTS header
-nginxnudes.com: could not connect to host
-nginxyii.tk: could not connect to host
-ngla.gov: could not connect to host
-nglr.org: could not connect to host
-ngndn.jp: could not connect to host
-ngojclee.com: did not receive HSTS header
-ngt-service.ru: did not receive HSTS header
-ngtoys.com.br: could not connect to host
-nhakhoangocanh.net: could not connect to host
-nhbp-nsn.gov: could not connect to host
-nhccnews.org: could not connect to host
-nhgteam.hu: could not connect to host
-nhhoteljobs.nl: could not connect to host
-nhliberty.org: did not receive HSTS header
-nhsuites.com: did not receive HSTS header
-niallator.com: could not connect to host
-nibiisclaim.com: could not connect to host
-nicaise.ca: did not receive HSTS header
-nice.im: could not connect to host
-niceb5y.net: did not receive HSTS header
-nicesleepo.com: did not receive HSTS header
-nicestresser.fr: could not connect to host
-nickcleans.co.uk: could not connect to host
-nicklord.com: could not connect to host
-nickmertin.ca: did not receive HSTS header
-nicktheitguy.com: could not connect to host
-nickx.cn: did not receive HSTS header
-nicky.io: could not connect to host
-nicn.me: could not connect to host
-nico.one: could not connect to host
-nico.today: could not connect to host
-nicoborghuis.nl: could not connect to host
-nicolaeiotcu.ro: could not connect to host
-nicolaelmer.ch: did not receive HSTS header
-nicolasbettag.me: did not receive HSTS header
-nicolasdutour.com: did not receive HSTS header
-nicolashess.de: did not receive HSTS header
-nicolasklotz.de: did not receive HSTS header
-nicoleoquendo.com: max-age too low: 2592000
-niconico.ooo: could not connect to host
-niconiconi.xyz: could not connect to host
-nicoobook.com: did not receive HSTS header
-nicoobook.net: could not connect to host
-nicorevin.ru: could not connect to host
-nidialozano.com: could not connect to host
-nidux.com: did not receive HSTS header
-niduxcomercial.com: could not connect to host
-niedersetz.de: could not connect to host
-niedrigsterpreis.de: did not receive HSTS header
-nielshoogenhout.be: did not receive HSTS header
-nielshoogenhout.eu: did not receive HSTS header
-nielshoogenhout.nl: did not receive HSTS header
-niemaler.de: could not connect to host
-nien.cf: could not connect to host
-nien.chat: could not connect to host
-nien.com.tw: did not receive HSTS header
-nien.gq: could not connect to host
-nien.taipei: could not connect to host
-nien.tk: could not connect to host
-nienfun.com: could not connect to host
-nietmvwoensel.com: could not connect to host
-nieuwsoverijssel.nl: did not receive HSTS header
-niffler.software: could not connect to host
-nifpnet.nl: could not connect to host
-niftypersonalloans.com.au: could not connect to host
-nifume.com: could not connect to host
-niggemeier.cc: did not receive HSTS header
-nigger.racing: could not connect to host
-night2stay.com: did not receive HSTS header
-nightbutterflies.com: did not receive HSTS header
-nightfirecat.com: could not connect to host
-nightman.info: did not receive HSTS header
-nightsnack.cf: could not connect to host
-nightwinds.tk: could not connect to host
-nightwishchile.tk: could not connect to host
-nigt.cf: could not connect to host
-nihilistan.tk: could not connect to host
-niho.jp: did not receive HSTS header
-nihon-no-sake.net: did not receive HSTS header
-nihtek.in: could not connect to host
-nikao-tech.com: did not receive HSTS header
-niki.ai: did not receive HSTS header
-nikitashevchenko.com: did not receive HSTS header
-nikka.systems: did not receive HSTS header
-nikksno.io: could not connect to host
-niklas.host: could not connect to host
-niklasanderson.com: did not receive HSTS header
-niklaslindblad.se: did not receive HSTS header
-nikobradshaw.com: could not connect to host
-nikolaichik.photo: did not receive HSTS header
-nikolainevalainen.fi: did not receive HSTS header
-nikolasbradshaw.com: could not connect to host
-nikonschool.co.uk: did not receive HSTS header
-niktok.com: did not receive HSTS header
-nikunjcementarticles.com: did not receive HSTS header
-nikz.in: did not receive HSTS header
-nilianwo.com: could not connect to host
-niloxy.com: could not connect to host
-nim-news.com: did not receive HSTS header
-nimeshjm.com: could not connect to host
-nina-laaf.de: did not receive HSTS header
-ninarinaldi.com.br: could not connect to host
-ninchisho-online.com: did not receive HSTS header
-ninebytes.xyz: could not connect to host
-ninesix.cc: did not receive HSTS header
-ninespec.com: could not connect to host
-ning.so: did not receive HSTS header
-ningrui.me: could not connect to host
-ninhs.org: could not connect to host
-ninjan.co: could not connect to host
-ninjaspiders.com: could not connect to host
-ninjasquad.fr: could not connect to host
-ninjio.com: max-age too low: 86400
-ninov.de: did not receive HSTS header
-ninreiei.jp: could not connect to host
-niouininon.eu: did not receive HSTS header
-nippler.org: could not connect to host
-nippombashi.net: could not connect to host
-nippon.fr: did not receive HSTS header
-nipponcareers.com: could not connect to host
-nirada.info: could not connect to host
-nirjharstudio.com: did not receive HSTS header
-nirna.io: did not receive HSTS header
-nirudo.me: could not connect to host
-nishaswonderland.be: did not receive HSTS header
-nishaswonderland.nl: did not receive HSTS header
-nishikino-maki.com: could not connect to host
-nishisbma.com: could not connect to host
-nitaonline.org: did not receive HSTS header
-nitix.games: could not connect to host
-niva.synology.me: could not connect to host
-niveldron.com: could not connect to host
-nivi.ca: did not receive HSTS header
-nix.black: could not connect to host
-nix13.xyz: could not connect to host
-nixien.fr: could not connect to host
-nixmag.net: could not connect to host
-nixne.st: did not receive HSTS header
-nixnet.xyz: did not receive HSTS header
-nixtest.net: could not connect to host
-nixx-gel.cz: could not connect to host
-nizhaoheng.com: could not connect to host
-njujb.com: did not receive HSTS header
-nkadvertising.online: could not connect to host
-nkautoservice.nl: did not receive HSTS header
-nkb.in.th: could not connect to host
-nkforum.pl: did not receive HSTS header
-nklwhx.com: could not connect to host
-nkp-media.de: could not connect to host
-nlayer.info: could not connect to host
-nlfant.eu: did not receive HSTS header
-nll.fi: could not connect to host
-nlrb.gov: did not receive HSTS header
-nmadda.com: could not connect to host
-nmctest.net: did not receive HSTS header
-nmgb.ga: could not connect to host
-nmgb.ml: could not connect to host
-nmsinusdoc.com: did not receive HSTS header
-nmsnj.com: did not receive HSTS header
-nmueller.at: could not connect to host
-nmx.moe: could not connect to host
-nn01.cc: could not connect to host
-nn01.com: could not connect to host
-nn5197.co: could not connect to host
-nn6729.co: could not connect to host
-nn6729.com: did not receive HSTS header
-nn6957.co: could not connect to host
-nn78.com: could not connect to host
-nn9297.co: could not connect to host
-nn9397.com: did not receive HSTS header
-nn9721.com: did not receive HSTS header
-nn9728.co: could not connect to host
-nnkkserver02.ddns.net: could not connect to host
-nnote.net: did not receive HSTS header
-nnya.cat: could not connect to host
-no17sifangjie.cc: could not connect to host
-nobleandlore.com: max-age too low: 0
-noc.wang: could not connect to host
-nocallaghan.com: could not connect to host
-nocit.dk: did not receive HSTS header
-noclegi-online.pl: did not receive HSTS header
-noctinus.tk: could not connect to host
-nodalr.com: could not connect to host
-nodari.com.ar: did not receive HSTS header
-nodariweb.com.ar: could not connect to host
-node-core-app.com: could not connect to host
-nodebb-cn.org: did not receive HSTS header
-nodebrewery.com: could not connect to host
-nodechate.xyz: could not connect to host
-nodecompat.com: did not receive HSTS header
-nodefiles.com: did not receive HSTS header
-nodeflame.com: did not receive HSTS header
-nodefoo.com: could not connect to host
-nodepanel.net: did not receive HSTS header
-nodeselect.com: could not connect to host
-nodesonic.com: could not connect to host
-nodesturut.cl: did not receive HSTS header
-nodetemple.com: could not connect to host
-nodist.club: could not connect to host
-nodum.io: did not receive HSTS header
-noegoph.com: could not connect to host
-noelblog.ga: could not connect to host
-noelssanssoucipensacola.com: did not receive HSTS header
-noesberts-weidmoos.de: did not receive HSTS header
-noexpect.org: could not connect to host
-noez.de: did not receive HSTS header
-nohm.eu: could not connect to host
-noinghene.com: did not receive HSTS header
-noisebridge.social: could not connect to host
-noisetor.net: could not connect to host
-noithat247.com.vn: could not connect to host
-nojestorget.se: did not receive HSTS header
-nojobook.com: could not connect to host
-nojok.es: could not connect to host
-nolag.host: did not receive HSTS header
-nolalove.nl: did not receive HSTS header
-nolanvilletx.gov: could not connect to host
-nolatepayments.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-nolberg.net: could not connect to host
-noleggiobagnichimici.perugia.it: could not connect to host
-nolimits.net.nz: did not receive HSTS header
-nolimitsbook.de: did not receive HSTS header
-nolte-imp.de: did not receive HSTS header
-nolte.work: could not connect to host
-nomik.xyz: could not connect to host
-nomoondev.azurewebsites.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-nomorebytes.de: could not connect to host
-nonametheme.com: could not connect to host
-nonemu.ninja: could not connect to host
-nonx.pro: could not connect to host
-nonzero.io: could not connect to host
-noob-rp.ru: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-noobswhatelse.net: could not connect to host
-noodlecrave.com: did not receive HSTS header
-noodlesandwich.com: did not receive HSTS header
-noodleyum.com: could not connect to host
-noodweer.be: did not receive HSTS header
-nooneshere.co.uk: could not connect to host
-nooranevalainen.fi: did not receive HSTS header
-nootropicpedia.com: could not connect to host
-nootropicsource.com: did not receive HSTS header
-nope.website: could not connect to host
-nopex.no: could not connect to host
-nopol.de: could not connect to host
-norandom.com: could not connect to host
-norb.at: could not connect to host
-nord-restaurant-bar.de: could not connect to host
-norden.eu.org: could not connect to host
-nordic-survival.de: could not connect to host
-nordiccasinocommunity.com: did not receive HSTS header
-nordicess.dk: could not connect to host
-nordlicht.photography: did not receive HSTS header
-nordwal.de: did not receive HSTS header
-noref.tk: could not connect to host
-noret.com: did not receive HSTS header
-norge.guide: could not connect to host
-normalady.com: could not connect to host
-normanschwaneberg.de: did not receive HSTS header
-normantobar.com: could not connect to host
-norrkemi.se: could not connect to host
-north.supply: could not connect to host
-northbayvillage-fl.gov: did not receive HSTS header
-northbrisbaneapartments.com.au: could not connect to host
-northcountykiaparts.com: could not connect to host
-northcutt.com: did not receive HSTS header
-northernhamsterclub.com: could not connect to host
-northernmuscle.ca: could not connect to host
-northernpage.com: did not receive HSTS header
-northumbriagames.co.uk: could not connect to host
-northwest-events.co.uk: could not connect to host
-northwoodsfish.com: could not connect to host
-nosbenevolesontdutalent.com: could not connect to host
-nosecretshop.com: could not connect to host
-nosedoctor.net: could not connect to host
-nosfermiers.com: could not connect to host
-nospoint.cz: could not connect to host
-nosproduitsdequalite.fr: did not receive HSTS header
-nosqlzoo.net: could not connect to host
-nossasenhoradaconceicao.com.br: did not receive HSTS header
-nossasenhoradodesterro.com.br: could not connect to host
-nostosh.eu.org: could not connect to host
-nostraspace.com: could not connect to host
-nosuch.site: could not connect to host
-nosuch.website: could not connect to host
-nosx.tk: could not connect to host
-not-a.link: could not connect to host
-not-equal.me: could not connect to host
-nota-web.com: could not connect to host
-notablog.xyz: could not connect to host
-notadd.io: could not connect to host
-notadd.store: could not connect to host
-notalone.gov: could not connect to host
-notarankastojkovic.me: could not connect to host
-notarobot.fr: did not receive HSTS header
-notarvysocina.cz: did not receive HSTS header
-notboring.co.uk: could not connect to host
-notdienstreform-nordrhein.de: could not connect to host
-note7forever.com: could not connect to host
-notengosuelto.com: did not receive HSTS header
-notenoughtime.de: could not connect to host
-notequal.me: could not connect to host
-notes24x7.com: could not connect to host
-notesforpebble.com: could not connect to host
-noteshare.net: did not receive HSTS header
-noteshare.online: could not connect to host
-notevencode.com: could not connect to host
-nothing.org.uk: could not connect to host
-nothingprivate.ml: max-age too low: 0
-noticia.do: did not receive HSTS header
-noticiasdehumor.com: did not receive HSTS header
-noticiasymas.cl: could not connect to host
-notificami.com: could not connect to host
-notify.moe: did not receive HSTS header
-notinglife.com: could not connect to host
-notjustbitchy.com: did not receive HSTS header
-notonprem.com: could not connect to host
-notoriousdev.com: did not receive HSTS header
-notrecourrier.net: did not receive HSTS header
-nottheonion.net: did not receive HSTS header
-nottori.com: could not connect to host
-notypiesni.sk: did not receive HSTS header
-nou.si: did not receive HSTS header
-noujoumtounes.com: did not receive HSTS header
-nouma.fr: did not receive HSTS header
-nouvelle-vague-saint-cast.fr: did not receive HSTS header
-nova-elearning.com: could not connect to host
-nova-it.pl: did not receive HSTS header
-nova-kultura.org: could not connect to host
-nova.com.hk: did not receive HSTS header
-novacal.ga: could not connect to host
-novaco.in: max-age too low: 3600
-novacraft.me: could not connect to host
-novalite.rs: could not connect to host
-novaopcaofestas.com.br: could not connect to host
-novaorbis.org: could not connect to host
-novatrucking.de: could not connect to host
-novavoidhowl.com: did not receive HSTS header
-novawatch.de: could not connect to host
-novecity.cloud: could not connect to host
-novecity.info: could not connect to host
-novelabs.de: could not connect to host
-novelabs.eu: did not receive HSTS header
-novelshouse.com: could not connect to host
-novelvyretraite.fr: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-novicecamp.com: could not connect to host
-novodiegomaia.com.br: could not connect to host
-novtest.ru: did not receive HSTS header
-nowall.online: could not connect to host
-nowcost.com: could not connect to host
-noworrywp.com: could not connect to host
-nowprotein.com: could not connect to host
-nowremindme.com: could not connect to host
-noxi.ga: could not connect to host
-noys.info: did not receive HSTS header
-nozoe.jp: could not connect to host
-npm.li: could not connect to host
-npol.de: did not receive HSTS header
-npool.org: could not connect to host
-npw.net: did not receive HSTS header
-nq7.pl: did not receive HSTS header
-nqesh.com: could not connect to host
-nqeshreviewer.com: could not connect to host
-nrc-gateway.gov: could not connect to host
-nrdstd.io: could not connect to host
-nrechn.de: could not connect to host
-nrizzio.me: could not connect to host
-nrnjn.xyz: did not receive HSTS header
-nrv-linux.io: could not connect to host
-nrvnastudios.com: could not connect to host
-nsa.lol: could not connect to host
-nsa.wtf: could not connect to host
-nsamail.uk: could not connect to host
-nsbfalconacademy.org: could not connect to host
-nsboutique.com: could not connect to host
-nscai.gov: could not connect to host
-nsdev.cn: did not receive HSTS header
-nsellier.fr: did not receive HSTS header
-nshost.ro: did not receive HSTS header
-nsmail.cn: could not connect to host
-nspeaks.com: did not receive HSTS header
-nsradiology.net: could not connect to host
-nst-maroc.com: could not connect to host
-nstatic.xyz: could not connect to host
-nstremsdoerfer.ovh: did not receive HSTS header
-nstrust.co.uk: did not receive HSTS header
-nstyleintl.ca: did not receive HSTS header
-nsure.us: could not connect to host
-nsweb.solutions: could not connect to host
-nszipline.com: did not receive HSTS header
-nt-catala.com: could not connect to host
-ntbs.pro: could not connect to host
-ntcoss.org.au: did not receive HSTS header
-nth.sh: did not receive HSTS header
-ntpana.com: could not connect to host
-ntse.xyz: could not connect to host
-ntut.net: could not connect to host
-ntwt.us: did not receive HSTS header
-nu-pogodi.net: could not connect to host
-nu3.co.uk: could not connect to host
-nu3.com: could not connect to host
-nu3.dk: could not connect to host
-nu3.fi: could not connect to host
-nu3.fr: max-age too low: 7889238
-nu3.no: could not connect to host
-nu3.se: could not connect to host
-nub-aptech.com: did not receive HSTS header
-nube.ninja: did not receive HSTS header
-nubella.com.au: did not receive HSTS header
-nubeslayer.com: could not connect to host
-nubu.at: could not connect to host
-nuclea.site: could not connect to host
-nuclear-crimes.com: did not receive HSTS header
-nuclearcrimes.com: did not receive HSTS header
-nuclearcrimes1.com: did not receive HSTS header
-nucleuscore.org: could not connect to host
-nucleuspanel.com: could not connect to host
-nudel.ninja: could not connect to host
-nudes.ovh: could not connect to host
-nudestpics.com: did not receive HSTS header
-nuestratecnologia.com: could not connect to host
-nufla.de: could not connect to host
-nugetdependencies.com: could not connect to host
-nuiguru.me: could not connect to host
-nukenet.se: could not connect to host
-nukleosome.com: could not connect to host
-nukute.com: did not receive HSTS header
-nulap.com: did not receive HSTS header
-null-pointer.eu: did not receive HSTS header
-null-sec.ru: could not connect to host
-null.cat: did not receive HSTS header
-null.tips: did not receive HSTS header
-nullchan.org: could not connect to host
-nullpoint.at: did not receive HSTS header
-nullpointer.io: did not receive HSTS header
-nullpro.com: could not connect to host
-nulltime.net: could not connect to host
-numericacu.com: did not receive HSTS header
-numero-di-telefono.it: did not receive HSTS header
-numerossanos.com.ar: did not receive HSTS header
-numis.tech: could not connect to host
-numista.com: did not receive HSTS header
-numm.fr: did not receive HSTS header
-nuos.org: could not connect to host
-nuovamoda.al: could not connect to host
-nup.pw: could not connect to host
-nupef.org.br: did not receive HSTS header
-nuquery.org: could not connect to host
-nurseone.ca: did not receive HSTS header
-nurserybook.co: did not receive HSTS header
-nursingschool.network: could not connect to host
-nurture.be: did not receive HSTS header
-nusku.biz: did not receive HSTS header
-nut.services: could not connect to host
-nutonic-sports.com: did not receive HSTS header
-nutriciametabolics-shop.de: could not connect to host
-nutricuerpo.com: did not receive HSTS header
-nutrieduca.com: could not connect to host
-nutrifyyourself.com: could not connect to host
-nutritionculture.com: did not receive HSTS header
-nutrivisa.com.br: could not connect to host
-nutsandboltsmedia.com: did not receive HSTS header
-nuttyveg.com: could not connect to host
-nuva.hu: could not connect to host
-nuvospineandsports.com: did not receive HSTS header
-nuwaterglobal.com: could not connect to host
-nv.gw: could not connect to host
-nvcogct.gov: did not receive HSTS header
-nve-qatar.com: did not receive HSTS header
-nvlocalbusiness.com: did not receive HSTS header
-nvlop.xyz: did not receive HSTS header
-nwa.xyz: could not connect to host
-nweb.co.nz: could not connect to host
-nwimports.com: did not receive HSTS header
-nwork.media: could not connect to host
-nwr-waffenbuch.de: did not receive HSTS header
-nwshell.com: could not connect to host
-nx42.pw: could not connect to host
-nxt.sh: could not connect to host
-nyanco.space: did not receive HSTS header
-nyanpasu.tv: could not connect to host
-nyatane.com: could not connect to host
-nyazeeland.guide: could not connect to host
-nycroth.com: could not connect to host
-nydnxs.com: did not receive HSTS header
-nyesider.org: could not connect to host
-nyffo.com: did not receive HSTS header
-nyip.co.uk: could not connect to host
-nylonfeetporn.com: did not receive HSTS header
-nyonator.info: could not connect to host
-nyored.com: did not receive HSTS header
-nyphox.net: could not connect to host
-nys-hk.com: could not connect to host
-nysepho.pw: could not connect to host
-nysifclaimcentral.com: could not connect to host
-nystart.no: did not receive HSTS header
-nyushikaikaku.net: did not receive HSTS header
-nyxi.eu: did not receive HSTS header
-nyyu.tk: could not connect to host
-nz.search.yahoo.com: max-age too low: 172800
-nzbr.de: did not receive HSTS header
-nzbs.com: did not receive HSTS header
-nzbs.io: could not connect to host
-nzdmo.govt.nz: could not connect to host
-nzmk.cz: could not connect to host
-nzquakes.maori.nz: could not connect to host
-o-loska.cz: did not receive HSTS header
-o-rickroll-y.pw: could not connect to host
-o0c.cc: could not connect to host
-o0o.one: did not receive HSTS header
-o2careers.co.uk: did not receive HSTS header
-o30365.com: could not connect to host
-o3c.com.br: did not receive HSTS header
-o5197.co: could not connect to host
-o6729.co: could not connect to host
-o6729.com: did not receive HSTS header
-o6957.co: could not connect to host
-o6957.com: did not receive HSTS header
-o81365.com: did not receive HSTS header
-o81818.com: did not receive HSTS header
-o82365.com: did not receive HSTS header
-o8b.club: could not connect to host
-o9297.co: could not connect to host
-o9397.com: did not receive HSTS header
-o9728.co: could not connect to host
-oakandresin.co: could not connect to host
-oaken.duckdns.org: could not connect to host
-oaklands.co.za: did not receive HSTS header
-oaksbloom.com: did not receive HSTS header
-oaktonhouseandgardens.com: could not connect to host
-oaktravel.nl: did not receive HSTS header
-oanalista.com.br: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-oasis.mobi: could not connect to host
-oatycloud.spdns.de: could not connect to host
-oauth-dropins.appspot.com: did not receive HSTS header
-obdolbacca.ru: could not connect to host
-oben.pl: did not receive HSTS header
-oberam.de: could not connect to host
-oberhof.co: could not connect to host
-oberhofjuice.com: could not connect to host
-obioncountytn.gov: did not receive HSTS header
-obistarltd.com: did not receive HSTS header
-obitech.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-objectif-leger.com: did not receive HSTS header
-oblikdom.pro: did not receive HSTS header
-oblikdom.ru: did not receive HSTS header
-oblondata.io: did not receive HSTS header
-obmen-viz.tk: could not connect to host
-obrienlab.com: did not receive HSTS header
-obrobka-zdjec.pl: could not connect to host
-obscuredfiles.com: could not connect to host
-obscureware.xyz: could not connect to host
-observatory.se: did not receive HSTS header
-obsessedwithknives.ru: could not connect to host
-obsidianirc.net: could not connect to host
-obsydian.org: could not connect to host
-obu4alka.ru: did not receive HSTS header
-oc-minecraft.com: could not connect to host
-ocapic.com: could not connect to host
-occmon.net: could not connect to host
-occupymedia.org: could not connect to host
-ocdadmin.com: could not connect to host
-oceancity4sales.com: did not receive HSTS header
-ocelot.help: did not receive HSTS header
-ochaken.cf: could not connect to host
-ochrebridge.com: could not connect to host
-ociaw.com: could not connect to host
-ocloudhost.com: could not connect to host
-ocmeulebeke.be: did not receive HSTS header
-ocponj.gov: did not receive HSTS header
-ocrami.us: did not receive HSTS header
-octa.store: could not connect to host
-octal.es: did not receive HSTS header
-octanio.com: did not receive HSTS header
-octavus.it: did not receive HSTS header
-octo.im: could not connect to host
-octocat.ninja: could not connect to host
-octod.tk: could not connect to host
-octofox.de: did not receive HSTS header
-octohedralpvp.tk: could not connect to host
-octohost.net: could not connect to host
-octomist.com: did not receive HSTS header
-octopus-cs.fr: did not receive HSTS header
-octothorpe.ninja: did not receive HSTS header
-ocwr.gov: did not receive HSTS header
-oddtime.net: could not connect to host
-odense3dprint.dk: could not connect to host
-odeonentertainment.co.uk: could not connect to host
-odin.xxx: could not connect to host
-odinkapital.no: did not receive HSTS header
-odinoffice.no: did not receive HSTS header
-odisealinux.com: did not receive HSTS header
-odonti.com: did not receive HSTS header
-odosblog.de: could not connect to host
-oducs.org: could not connect to host
-odvps.com: did not receive HSTS header
-odysseyandco.com: could not connect to host
-odysseyconservationtrust.com: did not receive HSTS header
-oe8.bet: could not connect to host
-oemspace.net: could not connect to host
-oemspace.nl: could not connect to host
-of2m.fr: did not receive HSTS header
-ofcourselanguages.com: could not connect to host
-ofcss.com: did not receive HSTS header
-ofda.gov: could not connect to host
-ofer.site: could not connect to host
-off-the-clock.us: could not connect to host
-offenedialoge.de: did not receive HSTS header
-offersgame.com: could not connect to host
-offerstone.cl: could not connect to host
-offfbynight.be: did not receive HSTS header
-offgames.io: could not connect to host
-offgames.pro: did not receive HSTS header
-office-morimoto.com: did not receive HSTS header
-office-ruru.com: could not connect to host
-officeclub.com.mx: did not receive HSTS header
-officeprint.co.th: could not connect to host
-official-sensitive.co.uk: could not connect to host
-official-sensitive.com: could not connect to host
-official-sensitive.net: could not connect to host
-official-sensitive.org: could not connect to host
-officiants.wedding: did not receive HSTS header
-offshore-firma.org: could not connect to host
-offshore-unternehmen.com: could not connect to host
-offshorefirma-gruenden.com: could not connect to host
-offtherails.ie: could not connect to host
-oficinadocelular.com.br: could not connect to host
-ofileo.fr: could not connect to host
-ofo2.com: could not connect to host
-ofsetas.lt: could not connect to host
-oganek.ie: could not connect to host
-oganime.com: did not receive HSTS header
-oggw.us: could not connect to host
-ogis.gov: could not connect to host
-oglen.ca: could not connect to host
-ogocare.com: did not receive HSTS header
-ogogoshop.com: could not connect to host
-ogrodywstudniach.pl: did not receive HSTS header
-ohadsoft.com: could not connect to host
-ohari5336.in: did not receive HSTS header
-ohayosoro.me: could not connect to host
-ohioag.gov: could not connect to host
-ohioago.gov: could not connect to host
-ohiobusinesscentral.gov: could not connect to host
-ohiohealthfortune100.com: did not receive HSTS header
-ohiosos.gov: could not connect to host
-ohiostateparks.gov: could not connect to host
-ohiot21.gov: could not connect to host
-ohiotobacco21.gov: could not connect to host
-ohling.org: could not connect to host
-ohma.ga: did not receive HSTS header
-ohmayonnaise.com: could not connect to host
-ohnemusik.com: did not receive HSTS header
-ohohrazi.com: did not receive HSTS header
-ohreally.de: could not connect to host
-oiaio.cn: did not receive HSTS header
-oiepoie.nl: could not connect to host
-oil-heaters.tk: could not connect to host
-oilfieldinjury.attorney: could not connect to host
-oilpaintingsonly.com: could not connect to host
-oinky.ddns.net: could not connect to host
-oirealtor.com: did not receive HSTS header
-oishioffice.com: did not receive HSTS header
-ojanaho.com: did not receive HSTS header
-ojbk.eu: could not connect to host
-ojk.me: could not connect to host
-ojls.co: could not connect to host
-okada-touki.jp: did not receive HSTS header
-okanaganrailtrail.ca: max-age too low: 0
-okane.love: could not connect to host
-okchicas.com: did not receive HSTS header
-okewp.com: could not connect to host
-okhrana.agency: could not connect to host
-okin-jp.net: did not receive HSTS header
-oklahomamoversassociation.org: could not connect to host
-oklahomanotepro.com: could not connect to host
-okok-rent.com: could not connect to host
-okok.rent: could not connect to host
-oktoberfeststore.nl: did not receive HSTS header
-oktomus.com: did not receive HSTS header
-oku-nara.com: did not receive HSTS header
-okuscapital.com: did not receive HSTS header
-okutama.in.th: could not connect to host
-olandiz.com: did not receive HSTS header
-olcso-vps-szerver.hu: could not connect to host
-oldandyounglesbians.us: did not receive HSTS header
-oldcity.tk: could not connect to host
-oldenglishsheepdog.com.br: could not connect to host
-oldnews.news: did not receive HSTS header
-oldonyosafaris.com: could not connect to host
-oldtimer-trifft-flugplatz.de: did not receive HSTS header
-oleron.fr: did not receive HSTS header
-olgui.net: could not connect to host
-olhovirtual.com.br: could not connect to host
-olifant.fr: could not connect to host
-olightstore.com: did not receive HSTS header
-oliode.tk: could not connect to host
-olivejs.com: could not connect to host
-oliveraiedelabastideblanche.fr: did not receive HSTS header
-olivierlemoal.fr: did not receive HSTS header
-olivlabs.com: could not connect to host
-ollehbizev.co.kr: could not connect to host
-olltechjob.com: could not connect to host
-olphseaside.org: could not connect to host
-ols.io: did not receive HSTS header
-olswangtrainees.com: could not connect to host
-olygazoo.com: could not connect to host
-olympe-transport.fr: did not receive HSTS header
-olympicfitness.com.mx: could not connect to host
-omacostudio.com: could not connect to host
-omanlover.org: did not receive HSTS header
-omaosurveys.org: did not receive HSTS header
-omar.yt: did not receive HSTS header
-omarh.net: could not connect to host
-omarsuniagamusic.ga: could not connect to host
-omega-gaming.online: could not connect to host
-omerefe.av.tr: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-omeuanimal.com: did not receive HSTS header
-omgaanmetidealen.com: could not connect to host
-omi-news.fr: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-omie.com.br: did not receive HSTS header
-omifind.com: did not receive HSTS header
-ominto.com: max-age too low: 0
-omise.co: did not receive HSTS header
-ommahpost.com: did not receive HSTS header
-omniasl.com: could not connect to host
-omnilab.tech: did not receive HSTS header
-omnisafira.com: did not receive HSTS header
-omniscimus.net: could not connect to host
-omniti.com: did not receive HSTS header
-omquote.gq: could not connect to host
-omretreats.net: could not connect to host
-omskit.ru: could not connect to host
-omyogarishikesh.com: did not receive HSTS header
-on-te.ch: could not connect to host
-onarto.com: did not receive HSTS header
-onazikgu.com: could not connect to host
-ondiet.biz: could not connect to host
-one---line.com: did not receive HSTS header
-one-pe.com: could not connect to host
-onearth.one: could not connect to host
-oneb4nk.com: could not connect to host
-oneclickjailbreak.com: could not connect to host
-oneclickonejob.com: did not receive HSTS header
-onecloud.lt: did not receive HSTS header
-onecycling.my: could not connect to host
-onecycling.world: could not connect to host
-onedegreehealth.com: did not receive HSTS header
-onedot.nl: max-age too low: 10368000
-onefour.co: did not receive HSTS header
-onefour.ga: could not connect to host
-onegoodthingbyjillee.com: did not receive HSTS header
-onehost.blue: did not receive HSTS header
-onehourloan.com: could not connect to host
-oneidentity.me: could not connect to host
-oneindex.tk: could not connect to host
-oneiros.cc: could not connect to host
-onelawsuit.com: could not connect to host
-oneminutefilm.tv: could not connect to host
-oneminutetomindfulness.com: could not connect to host
-onemusou.com: could not connect to host
-onepluscamps.com: did not receive HSTS header
-onepointsafeband.ca: could not connect to host
-onepointsafeband.com: could not connect to host
-onepopstore.com: could not connect to host
-onesearay.com: could not connect to host
-oneso.win: could not connect to host
-onespiritinc.com: did not receive HSTS header
-onestepfootcare.com: did not receive HSTS header
-onestop-study.com: could not connect to host
-onet.space: could not connect to host
-onetech.it: could not connect to host
-onetly.com: could not connect to host
-onetwosweetatelier.com: could not connect to host
-onewaymail.com: could not connect to host
-onewebdev.info: could not connect to host
-oneworldbank.com: did not receive HSTS header
-onewpst.com: could not connect to host
-onguardonline.gov: did not receive HSTS header
-oniichan.us: could not connect to host
-onionbot.ga: could not connect to host
-onionbot.me: could not connect to host
-onioncloud.org: could not connect to host
-onionplay.live: did not receive HSTS header
-onionplay.org: did not receive HSTS header
-onionsburg.com: could not connect to host
-onkfaktor.de: could not connect to host
-online-biblio.tk: max-age too low: 2628000
-online-bouwmaterialen.nl: did not receive HSTS header
-online-casino.eu: did not receive HSTS header
-online-consulting-corp.com: could not connect to host
-online-consulting-corp.fr: did not receive HSTS header
-online-horoskop.ch: did not receive HSTS header
-online-results.dk: did not receive HSTS header
-online-wetten.de: did not receive HSTS header
-online.marketing: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-online.net.gr: could not connect to host
-onlinebiller.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-onlinebillingform.com: could not connect to host
-onlinecasino.vlaanderen: did not receive HSTS header
-onlinecompliance.org: did not receive HSTS header
-onlinecorners.com: did not receive HSTS header
-onlinedeposit.us: did not receive HSTS header
-onlinefashion.it: could not connect to host
-onlinehashfollow.com: could not connect to host
-onlineinfographic.com: could not connect to host
-onlineinsurancespot.com: did not receive HSTS header
-onlinekasino.de: did not receive HSTS header
-onlinelighting.com.au: did not receive HSTS header
-onlinepollsph.com: could not connect to host
-onlineporno.tv: did not receive HSTS header
-onlineporno.xyz: did not receive HSTS header
-onlineprofecional.com: could not connect to host
-onlinerollout.de: did not receive HSTS header
-onlineschadestaat.nl: did not receive HSTS header
-onlinespielothek.com: could not connect to host
-onlinewetten.de: could not connect to host
-onlinexl.nl: could not connect to host
-only-roses.co.uk: did not receive HSTS header
-only-roses.com: max-age too low: 2592000
-only.sh: could not connect to host
-onlyesb.net: could not connect to host
-onlylebanon.net: did not receive HSTS header
-onlylibya.com: could not connect to host
-onlyshopstation.com: did not receive HSTS header
-onlytrong.cc: did not receive HSTS header
-onlyzero.net: could not connect to host
-onmuvo.com: did not receive HSTS header
-onmyoji.biz: could not connect to host
-onnee.ch: could not connect to host
-ononpay.com: did not receive HSTS header
-onoranze-funebri.biz: could not connect to host
-onovlena.dn.ua: could not connect to host
-onpatient.com: did not receive HSTS header
-onpermit.net: could not connect to host
-onsennuie.fr: did not receive HSTS header
-onshuistrust.co.za: could not connect to host
-onsite4u.de: could not connect to host
-onsitemassageco.com: did not receive HSTS header
-onstud.com: could not connect to host
-ontariocountyny.gov: could not connect to host
-onthe.network: could not connect to host
-ontheboard.com: could not connect to host
-onthecheap.store: could not connect to host
-ontimestamp.com: did not receive HSTS header
-ontsnappingskamer.nl: could not connect to host
-onvirt.de: could not connect to host
-onwie.com: could not connect to host
-onwie.fr: could not connect to host
-onyxwall.com: could not connect to host
-onyxwall.link: could not connect to host
-onyxwall.net: could not connect to host
-oo.edu.rs: could not connect to host
-oo5197.co: could not connect to host
-oo6729.co: could not connect to host
-oo6729.com: did not receive HSTS header
-oo6957.co: could not connect to host
-oo9297.co: could not connect to host
-oo9397.com: did not receive HSTS header
-oo9721.com: did not receive HSTS header
-oo9728.co: could not connect to host
-ooeste.com: could not connect to host
-oogartsennet.nl: could not connect to host
-ooooush.co.uk: could not connect to host
-oopsis.com: could not connect to host
-oopsmycase.com: could not connect to host
-oopsorup.com: could not connect to host
-oortcast.com: could not connect to host
-oosolutions.nl: could not connect to host
-op11.co.uk: could not connect to host
-opadaily.com: could not connect to host
-opcaobolsas.com.br: could not connect to host
-opcionpublicitaria.pe: did not receive HSTS header
-open-ctp.com: could not connect to host
-open-ctp.net: could not connect to host
-open-ctp.org: could not connect to host
-open-domotics.info: could not connect to host
-open-mx.de: could not connect to host
-open-novel.work: could not connect to host
-open-to-repair.fr: max-age too low: 86400
-openacademies.com: did not receive HSTS header
-openas.org: could not connect to host
-openbankproject.com: did not receive HSTS header
-openbsd.id: did not receive HSTS header
-openbsd.rocks: could not connect to host
-openclub24.ru: could not connect to host
-opencluster.at: could not connect to host
-openconcept.no: did not receive HSTS header
-openconnect.com.au: could not connect to host
-opencpes.net: could not connect to host
-openctp.com: could not connect to host
-openctp.net: could not connect to host
-openctp.org: could not connect to host
-opendesk.cc: did not receive HSTS header
-opendoorcounselingpa.com: did not receive HSTS header
-openevic.info: could not connect to host
-opengateway.fr: did not receive HSTS header
-opengg.me: could not connect to host
-openintelligence.uk: did not receive HSTS header
-openiocdb.com: could not connect to host
-openmetals.com: could not connect to host
-openmind-shop.de: did not receive HSTS header
-openmirrors.cf: could not connect to host
-openmirrors.ml: could not connect to host
-openmtbmap.org: did not receive HSTS header
-openpresentes.com.br: could not connect to host
-openpriv.pw: could not connect to host
-openprovider.nl: did not receive HSTS header
-openrainbow.org: could not connect to host
-openresty.com: did not receive HSTS header
-openrtv.com: could not connect to host
-openshift.redhat.com: did not receive HSTS header
-opensourcedmind.eu: could not connect to host
-opensourcehouse.net: could not connect to host
-openspace.xxx: did not receive HSTS header
-opensrd.com: could not connect to host
-openssf.org: could not connect to host
-opentexon.com: could not connect to host
-openverse.com: could not connect to host
-openwaveguide.de: could not connect to host
-openxmpp.com: could not connect to host
-operad.fr: could not connect to host
-operationforever.com: could not connect to host
-operationsafeescape.org: did not receive HSTS header
-operrtel.com: did not receive HSTS header
-opiates.net: did not receive HSTS header
-opim.ca: did not receive HSTS header
-opinion8td.com: did not receive HSTS header
-opinionicentrifuga.it: could not connect to host
-opinionipannolini.it: could not connect to host
-oportho.com.br: did not receive HSTS header
-oportunidadesemfoco.com.br: could not connect to host
-opp.ag: did not receive HSTS header
-oppag.com.br: did not receive HSTS header
-opperwall.net: could not connect to host
-opposer.me: could not connect to host
-oppress.life: could not connect to host
-oprbox.com: could not connect to host
-opsafewinter.net: could not connect to host
-opsbears.com: did not receive HSTS header
-opsnotepad.com: could not connect to host
-opsre.net: could not connect to host
-opstacks.com: could not connect to host
-opstory.com: could not connect to host
-opteamax.eu: did not receive HSTS header
-optenhoefel.de: could not connect to host
-optiekzien.nl: did not receive HSTS header
-optimal-e.com: did not receive HSTS header
-optimised.cloud: could not connect to host
-optimised.io: could not connect to host
-optimisedlabs.co.uk: could not connect to host
-optimisedlabs.com: could not connect to host
-optimisedlabs.info: could not connect to host
-optimisedlabs.net: could not connect to host
-optimisedlabs.uk: could not connect to host
-optimista.soy: could not connect to host
-optimize-jpg.com: could not connect to host
-optimizedlabs.co.uk: could not connect to host
-optimizedlabs.info: could not connect to host
-optimizedlabs.net: could not connect to host
-optimizedlabs.uk: could not connect to host
-optimuscrime.net: could not connect to host
-optisure.de: could not connect to host
-optm.us: could not connect to host
-optmos.at: could not connect to host
-optometriepunt.nl: did not receive HSTS header
-optometryscotland.org.uk: did not receive HSTS header
-optoutday.de: could not connect to host
-optumrxhealthstore.com: could not connect to host
-opunch.org: did not receive HSTS header
-oracaodocredo.com.br: could not connect to host
-oraculum.cz: did not receive HSTS header
-orangefinanse.com.pl: could not connect to host
-orangehattech.com: did not receive HSTS header
-orangekey.tk: did not receive HSTS header
-orangenj.gov: could not connect to host
-orangenuts.in: could not connect to host
-oranges.tokyo: did not receive HSTS header
-orangesquash.org.uk: did not receive HSTS header
-oranic.com: could not connect to host
-orbiosales.com: could not connect to host
-orbitabaja.com: could not connect to host
-orbitcom.de: did not receive HSTS header
-orbitdefence.co.uk: could not connect to host
-orbograph-hrcm.com: could not connect to host
-orchids.co.jp: could not connect to host
-orchidspaper.com: could not connect to host
-orcuyo.com: could not connect to host
-ordekho.com: did not receive HSTS header
-order.one: could not connect to host
-ordereat.fr: could not connect to host
-orderessay.net: did not receive HSTS header
-orderlounge.de: did not receive HSTS header
-ordernow.at: could not connect to host
-orderswift.com: did not receive HSTS header
-ordoh.com: could not connect to host
-ordr.mobi: could not connect to host
-orebolt.cz: did not receive HSTS header
-oref-idf.com: could not connect to host
-oref-idf.net: could not connect to host
-oref-idf.org: could not connect to host
-oregon2020census.gov: max-age too low: 0
-oregonmu.org: could not connect to host
-oreka.online: could not connect to host
-orelavtomaster.ru: could not connect to host
-orfelios.com: could not connect to host
-orfeo-engineering.ch: could not connect to host
-organic-superfood.net: could not connect to host
-organicae.com: did not receive HSTS header
-organicnature.dk: did not receive HSTS header
-organicskincare.com: did not receive HSTS header
-organix.ma: could not connect to host
-orgatech-gmbh.de: did not receive HSTS header
-orgyporngroup.com: could not connect to host
-oricejoc.com: could not connect to host
-orientalart.nl: could not connect to host
-orientravelmacas.com: could not connect to host
-originalsport.com.br: could not connect to host
-origincoffee.com: did not receive HSTS header
-origincoffee.nz: did not receive HSTS header
-orion-universe.com: did not receive HSTS header
-orioncokolada.cz: did not receive HSTS header
-orioncustompcs.com: could not connect to host
-oriondynamic.be: did not receive HSTS header
-orionfcu.com: did not receive HSTS header
-oriongames.eu: did not receive HSTS header
-orionrebellion.com: did not receive HSTS header
-orleika.ml: could not connect to host
-orologidicristina.com: did not receive HSTS header
-orovillelaw.com: could not connect to host
-oroweatorganic.com: could not connect to host
-orro.ro: did not receive HSTS header
-ortaev.tk: could not connect to host
-orthocop.cz: could not connect to host
-orthodocspro.com: did not receive HSTS header
-orthodoxy.lt: did not receive HSTS header
-ortizmario.com: could not connect to host
-ortodonciaian.com: did not receive HSTS header
-ortopedio.pl: did not receive HSTS header
-ortopedistamarcelocosta.com.br: could not connect to host
-orui.com.br: could not connect to host
-orvibo.com.ec: did not receive HSTS header
-orvitdesign.com: could not connect to host
-orxideya.az: did not receive HSTS header
-orz.uno: did not receive HSTS header
-os-chrome.ru: could not connect to host
-osaiyuwu.com: could not connect to host
-osaka-onakura.com: did not receive HSTS header
-oscamp.eu: could not connect to host
-oscarmashauri.com: could not connect to host
-oscarproductions.no: did not receive HSTS header
-oscloud.com: could not connect to host
-oscloud.com.ua: could not connect to host
-oscreen.me: could not connect to host
-oscreen.org: could not connect to host
-oscsdp.cz: could not connect to host
-osdls.gov: did not receive HSTS header
-osereso.tn: could not connect to host
-osha-kimi.com: did not receive HSTS header
-oshanko.de: did not receive HSTS header
-oshell.me: could not connect to host
-oshinagaki.jp: could not connect to host
-osirisrp.online: could not connect to host
-oslfoundation.org: could not connect to host
-osmestres.com: did not receive HSTS header
-osp.cx: could not connect to host
-osprecos.com.br: did not receive HSTS header
-osprecos.pt: did not receive HSTS header
-ospree.me: did not receive HSTS header
-ossan-kobe-gourmet.com: did not receive HSTS header
-ossbinaries.com: could not connect to host
-ostachstore.com: did not receive HSTS header
-ostan-collections.net: did not receive HSTS header
-osteammate.com: could not connect to host
-ostendorf.com: did not receive HSTS header
-osteolaclusaz.com: did not receive HSTS header
-osticketawesome.com: did not receive HSTS header
-osusume-houhou.com: could not connect to host
-oswaldmattgroup.com: did not receive HSTS header
-osworx.net: did not receive HSTS header
-osxentwicklerforum.de: did not receive HSTS header
-ota365.com: did not receive HSTS header
-otako.pl: did not receive HSTS header
-otakucloud.net: did not receive HSTS header
-otakuworld.de: could not connect to host
-otakuyun.com: could not connect to host
-otchecker.com: could not connect to host
-othercode.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-otherkinforum.com: could not connect to host
-othermedia.cc: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-otherstuff.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-otichi.com: did not receive HSTS header
-otinane.eu: could not connect to host
-otmns.net: could not connect to host
-otmo7.com: did not receive HSTS header
-otoblok.com: did not receive HSTS header
-otokonna.com: could not connect to host
-otomobilforumu.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-otrsdemo.hu: did not receive HSTS header
-otsu.beer: could not connect to host
-ottospora.nl: could not connect to host
-otus.ru: did not receive HSTS header
-ouaibe.qc.ca: could not connect to host
-ouimoove.com: did not receive HSTS header
-oumyshop.com: did not receive HSTS header
-ouowo.gq: could not connect to host
-our-box.de: could not connect to host
-our-box.net: could not connect to host
-ourbank.com: did not receive HSTS header
-ourchoice2016.com: could not connect to host
-ouruglyfood.com: could not connect to host
-ourwedding.xyz: did not receive HSTS header
-outdooradventures.pro: could not connect to host
-outdoorchoose.com: did not receive HSTS header
-outdoorhole.com: did not receive HSTS header
-outerlimitsdigital.com: could not connect to host
-outfit-weimar.eu: could not connect to host
-outlines.xyz: did not receive HSTS header
-outplnr.fr: could not connect to host
-outreachbuddy.com: could not connect to host
-outsider.im: could not connect to host
-ouvirmusica.com.br: did not receive HSTS header
-ouxiang.me: could not connect to host
-ovabag.com: did not receive HSTS header
-ovabastecedoraindustrial.com: could not connect to host
-ovenapp.io: did not receive HSTS header
-overalglas.nl: did not receive HSTS header
-overceny.cz: did not receive HSTS header
-overkillshop.com: did not receive HSTS header
-overmark.net: did not receive HSTS header
-override.io: could not connect to host
-overrustle.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-oversight.io: could not connect to host
-overspeed.ddns.net: did not receive HSTS header
-overstappen.nl: did not receive HSTS header
-overstockpromote.com: could not connect to host
-overtrolls.de: did not receive HSTS header
-overture.london: did not receive HSTS header
-overwall.org: could not connect to host
-ovmfinancial.mortgage: could not connect to host
-ovpn.to: could not connect to host
-ovuscloud.de: could not connect to host
-ovwane.com: could not connect to host
-owensmith.website: could not connect to host
-owl-hakkei.com: did not receive HSTS header
-owlandrabbitgallery.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-owlishmedia.com: could not connect to host
-owlscrap.ru: could not connect to host
-owncloud.ch: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-owngeek.com: could not connect to host
-ownmovies.fr: could not connect to host
-ownspec.com: could not connect to host
-owothisdiz.pw: could not connect to host
-oxdl.cn: max-age too low: 5184000
-oxro.co: could not connect to host
-oxro.io: did not receive HSTS header
-oxt.co: could not connect to host
-oxygaming.com: did not receive HSTS header
-oxygenabsorbers.com: did not receive HSTS header
-oxygenit.co.za: did not receive HSTS header
-oxymc.com: did not receive HSTS header
-oxynux.fr: could not connect to host
-oxynux.xyz: could not connect to host
-oxytocin.org: did not receive HSTS header
-oxyx.tk: could not connect to host
-oxzeth3sboard.com: could not connect to host
-oyashirosama.tokyo: could not connect to host
-oyesunn.com: could not connect to host
-oyk19bgxj8ljpete71edj2tes-9i4oai.com: did not receive HSTS header
-oyosoft.fr: could not connect to host
-oyste.in: could not connect to host
-oyunpat.com: did not receive HSTS header
-ozonitron.com: did not receive HSTS header
-ozonitron.de: did not receive HSTS header
-ozonitron.eu: did not receive HSTS header
-ozonytron.com: did not receive HSTS header
-ozonytron.de: did not receive HSTS header
-ozonytron.eu: did not receive HSTS header
-ozoz.cc: did not receive HSTS header
-p-fent.ch: did not receive HSTS header
-p-pc.de: could not connect to host
-p-rickroll-o.pw: could not connect to host
-p-t.io: could not connect to host
-p.ki: did not receive HSTS header
-p.linode.com: could not connect to host
-p0l.de: did not receive HSTS header
-p1984.nl: could not connect to host
-p1c.pw: could not connect to host
-p1cn.com: could not connect to host
-p2av.com: could not connect to host
-p30365.com: could not connect to host
-p333eee.com: could not connect to host
-p333hhh.com: could not connect to host
-p333ppp.com: could not connect to host
-p3in.com: could not connect to host
-p3ter.fr: did not receive HSTS header
-p4g.club: did not receive HSTS header
-p5118.com: could not connect to host
-p5197.co: could not connect to host
-p58101.com: could not connect to host
-p58102.com: could not connect to host
-p58103.com: could not connect to host
-p58104.com: could not connect to host
-p58201.com: could not connect to host
-p58202.com: could not connect to host
-p58203.com: could not connect to host
-p58204.com: could not connect to host
-p58205.com: could not connect to host
-p6729.co: could not connect to host
-p6957.co: could not connect to host
-p81365.com: did not receive HSTS header
-p81818.com: did not receive HSTS header
-p82365.com: did not receive HSTS header
-p8r.de: could not connect to host
-p9120.com: max-age too low: 2592000
-p9121.com: could not connect to host
-p9125.com: max-age too low: 2592000
-p9136.com: max-age too low: 2592000
-p9161.com: max-age too low: 2592000
-p9162.com: could not connect to host
-p9165.com: could not connect to host
-p9167.com: could not connect to host
-p9195.com: max-age too low: 2592000
-p9196.com: max-age too low: 2592000
-p91aa.com: could not connect to host
-p91ab.com: could not connect to host
-p91ac.com: could not connect to host
-p91ad.com: max-age too low: 2592000
-p91ae.com: max-age too low: 2592000
-p91af.com: max-age too low: 2592000
-p91ag.com: max-age too low: 2592000
-p91ah.com: max-age too low: 2592000
-p91aj.com: could not connect to host
-p9297.co: could not connect to host
-p9721.com: did not receive HSTS header
-p9728.co: could not connect to host
-paal.network: could not connect to host
-paarberatung-hn.de: could not connect to host
-paardensportbak.nl: could not connect to host
-pablo.im: could not connect to host
-pabloarteaga.name: could not connect to host
-pablocamino.tk: could not connect to host
-pablorey-art.com: did not receive HSTS header
-pabloroblesminister.com: could not connect to host
-pacco.com.br: did not receive HSTS header
-paceda.nl: could not connect to host
-pachaiyappas.org: could not connect to host
-pacificpalisadeselectric.com: could not connect to host
-pacificpalisadeselectrical.com: could not connect to host
-pacificpalisadeselectrician.com: did not receive HSTS header
-pacificpalisadeslandscapelighting.com: could not connect to host
-pacificpalisadeslighting.com: could not connect to host
-pacifique-web.nc: could not connect to host
-packair.com: did not receive HSTS header
-packer.io: did not receive HSTS header
-packetapp.ru: could not connect to host
-packetcrash.net: could not connect to host
-packlane.com: did not receive HSTS header
-packshot-creator.com: did not receive HSTS header
-pacnetwork.io: could not connect to host
-pacoda.de: could not connect to host
-pactf-flag-4boxdpa21ogonzkcrs9p.com: could not connect to host
-pactocore.org: could not connect to host
-pader-deko.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-padianda.com: did not receive HSTS header
-padovani.de: did not receive HSTS header
-padrepio.in: did not receive HSTS header
-paducaheic.com: could not connect to host
-paestbin.com: could not connect to host
-pagalsongs.world: could not connect to host
-pagalworld.co: did not receive HSTS header
-pagamentosdigitais.pt: could not connect to host
-pagatuarriendo.cl: could not connect to host
-page: could not connect to host
-page-builders.com: max-age too low: 2592000
-pagedesignhub.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-pagedesignpro.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-pagedesignweb.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-pageperform.com: did not receive HSTS header
-pagerate.io: did not receive HSTS header
-pages-tocaven.com: could not connect to host
-pagetoimage.com: could not connect to host
-pagina.com.mx: did not receive HSTS header
-paginapolitica.ro: did not receive HSTS header
-pahnid.com: could not connect to host
-paidikasymeon.gr: did not receive HSTS header
-paigeglass.com: did not receive HSTS header
-paigejulianne.com: did not receive HSTS header
-paincareehr.com: could not connect to host
-painlessproperty.co.uk: did not receive HSTS header
-paino.cloud: could not connect to host
-painosso.org: could not connect to host
-paint-it.pink: could not connect to host
-paintcolorsbysue.com: could not connect to host
-paintingat.com: could not connect to host
-paintsealdirect.com: did not receive HSTS header
-paio2-rec.com: could not connect to host
-paio2.com: could not connect to host
-paisaone.com: could not connect to host
-paizinhovirgula.com: did not receive HSTS header
-pajonzeck.de: could not connect to host
-paket.io: could not connect to host
-paket.ml: could not connect to host
-paketkreditsuzuki.com: did not receive HSTS header
-pakeystonescholars.gov: did not receive HSTS header
-pakke.de: did not receive HSTS header
-pakowanie-polska.pl: could not connect to host
-pakroyalpress.com: did not receive HSTS header
-paku.me: could not connect to host
-palace-bayreuth.de: did not receive HSTS header
-palationtrade.com: could not connect to host
-palawan.jp: could not connect to host
-palazzo.work: could not connect to host
-paleolowcarb.de: did not receive HSTS header
-paleoself.com: could not connect to host
-paleosquawk.com: could not connect to host
-pallas.in: did not receive HSTS header
-pallet.io: could not connect to host
-palmavile.us: could not connect to host
-palmaville.com: could not connect to host
-palmer.im: could not connect to host
-pama.fun: did not receive HSTS header
-pamatv.hk: did not receive HSTS header
-pammbook.com: could not connect to host
-pamplona.tv: could not connect to host
-pan.tips: could not connect to host
-panaceallc.net: could not connect to host
-panama-gbs.com: did not receive HSTS header
-panamaequity.com: did not receive HSTS header
-panamatrippin.com: could not connect to host
-panascais.de: did not receive HSTS header
-panascais.eu: did not receive HSTS header
-panasproducciones.com: could not connect to host
-pandagifts.co: could not connect to host
-pandapsy.com: could not connect to host
-pandemic.group: could not connect to host
-pandit.tech: did not receive HSTS header
-panelomix.net: did not receive HSTS header
-pangci.xyz: could not connect to host
-panicparts.com: max-age too low: 10540800
-panj.ws: could not connect to host
-panjee.com: max-age too low: 0
-panjee.fr: did not receive HSTS header
-panni.me: did not receive HSTS header
-panoma.de: did not receive HSTS header
-panomizer.de: did not receive HSTS header
-panoranordic.net: could not connect to host
-panos.io: did not receive HSTS header
-panoti.com: could not connect to host
-panoxadrez.com.br: did not receive HSTS header
-pansu.space: could not connect to host
-pantallasled.com.mx: did not receive HSTS header
-pantherage.co.uk: could not connect to host
-pantsu.cat: did not receive HSTS header
-pao.ge: could not connect to host
-paolo565.org: did not receive HSTS header
-papakonstantinou.tk: could not connect to host
-papalytics.com: could not connect to host
-papapa-members.club: could not connect to host
-papatest24.de: could not connect to host
-papeda.net: did not receive HSTS header
-papelariadante.com.br: could not connect to host
-paper-driver.biz: did not receive HSTS header
-papercrunch.io: could not connect to host
-paperhoney.by: could not connect to host
-papermasters.com: did not receive HSTS header
-paperwallets.io: could not connect to host
-paperwork.co.za: could not connect to host
-paperworld.online: could not connect to host
-papierniak.net: could not connect to host
-papiweb.ca: did not receive HSTS header
-papotage.net: could not connect to host
-papygeek.com: could not connect to host
-parabhairavayoga.com: could not connect to host
-paradiesgirls.ch: could not connect to host
-paradigi.com.br: did not receive HSTS header
-paradise-engineers.com: could not connect to host
-paradordelgitano.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-paradoxdesigns.org: could not connect to host
-paragon.edu: could not connect to host
-parakranov.ru: did not receive HSTS header
-paranoidcrypto.com: could not connect to host
-parasca7.com: did not receive HSTS header
-paratlantalalkozas.hu: could not connect to host
-parav.xyz: did not receive HSTS header
-paravroum.com: did not receive HSTS header
-pardnoy.com: could not connect to host
-parent5446.us: could not connect to host
-parents-as-allies.com: could not connect to host
-parfum-baza.ru: could not connect to host
-pariga.co.uk: could not connect to host
-paris-cyber.fr: did not receive HSTS header
-paris-store.com: did not receive HSTS header
-parisdimanche.com: did not receive HSTS header
-parishome.jp: could not connect to host
-parisvox.info: did not receive HSTS header
-parithy.net: could not connect to host
-parkfans.net: did not receive HSTS header
-parkhillsbaptist.church: did not receive HSTS header
-parkhost.eu: did not receive HSTS header
-parkingplus.co.il: could not connect to host
-parkr.io: could not connect to host
-parksland.net: did not receive HSTS header
-parksubaruoemparts.com: could not connect to host
-parkwithark.com: could not connect to host
-parleu2016.nl: could not connect to host
-parodybit.net: did not receive HSTS header
-parpaing-paillette.net: could not connect to host
-parroquiasanrafaeldegramalote.com: did not receive HSTS header
-partage.ovh: did not receive HSTS header
-participatorybudgeting.de: did not receive HSTS header
-participatorybudgeting.info: did not receive HSTS header
-particonpsplus.it: could not connect to host
-partijhandel.website: could not connect to host
-partijtjevoordevrijheid.nl: could not connect to host
-partirkyoto.jp: did not receive HSTS header
-partiwatch.com: could not connect to host
-partnerbeam.com: could not connect to host
-partnertaxhub.com: did not receive HSTS header
-partsguysusa.com: could not connect to host
-party-calendar.net: did not receive HSTS header
-partycentrumdebinnenhof.nl: did not receive HSTS header
-partyhaus.ovh: could not connect to host
-partyhelfer.ch: did not receive HSTS header
-partyhireformby.co.uk: could not connect to host
-partyshop.ge: did not receive HSTS header
-partyspecialists.com: did not receive HSTS header
-partyvan.eu: could not connect to host
-partyvan.io: could not connect to host
-partyvan.it: could not connect to host
-partyvan.moe: could not connect to host
-partyvan.nl: could not connect to host
-partyvan.se: could not connect to host
-pasadenasandwich.co: did not receive HSTS header
-pasadenasandwich.com: did not receive HSTS header
-pasadenasandwichcompany.com: did not receive HSTS header
-pascal-bourhis.net: did not receive HSTS header
-pascal-kannchen.de: did not receive HSTS header
-pascovotes.gov: could not connect to host
-pasportaservo.org: did not receive HSTS header
-passfoto-deinfoto.ch: could not connect to host
-passionbyd.com: did not receive HSTS header
-passions-art.com: could not connect to host
-passphrase.today: could not connect to host
-passpilot.co.uk: did not receive HSTS header
-passrhce.com: could not connect to host
-passrhcsa.com: could not connect to host
-passwd.io: did not receive HSTS header
-password.codes: could not connect to host
-password.consulting: could not connect to host
-password.work: could not connect to host
-passwordbox.com: did not receive HSTS header
-passwordrevelator.net: did not receive HSTS header
-passwordscon.com: could not connect to host
-passy.pw: could not connect to host
-pastaf.com: could not connect to host
-pastdream.xyz: could not connect to host
-paste.linode.com: could not connect to host
-pastebin.linode.com: could not connect to host
-pastebin.run: did not receive HSTS header
-pastebin.tw: could not connect to host
-pasteblin.com: could not connect to host
-pastenib.com: could not connect to host
-paster.li: did not receive HSTS header
-pasteros.io: could not connect to host
-pastie.se: could not connect to host
-pastorbelgagroenendael.com.br: could not connect to host
-pastorcanadense.com.br: could not connect to host
-pastordocaucaso.com.br: could not connect to host
-pastorello.cf: could not connect to host
-pastormaremanoabruzes.com.br: could not connect to host
-pastorsuico.com.br: could not connect to host
-pat-edu.org: did not receive HSTS header
-patapwn.com: could not connect to host
-pataua.kiwi: did not receive HSTS header
-paternitydnatest.com: could not connect to host
-paterno-gaming.com: could not connect to host
-patfs.com: did not receive HSTS header
-pathcode.net: did not receive HSTS header
-pathwaytofaith.com: could not connect to host
-patientinsight.net: could not connect to host
-patouille-et-gribouille.fr: could not connect to host
-patriaco.net: did not receive HSTS header
-patrick-omland.de: could not connect to host
-patrick-omland.eu: could not connect to host
-patrick.dark.name: could not connect to host
-patrickbusch.net: could not connect to host
-patrickmcnamara.xyz: did not receive HSTS header
-patrickneuro.de: could not connect to host
-patrickquinn.ca: did not receive HSTS header
-patriotstationatchalfont.com: did not receive HSTS header
-patrykwegrzynek.pl: did not receive HSTS header
-patsch-photography.de: could not connect to host
-patt.us: could not connect to host
-patterson.mp: could not connect to host
-pattonfanatic.com: could not connect to host
-paul-bronski.de: did not receive HSTS header
-paul-kerebel.pro: could not connect to host
-paulandmadge.com: could not connect to host
-paulbrown.ddns.net: could not connect to host
-paulbunyanmls.com: did not receive HSTS header
-paulcloud.fr: could not connect to host
-paulewen.ca: could not connect to host
-paulineetaugustin.fr: did not receive HSTS header
-paulorochago.com.br: could not connect to host
-paulpetersen.dk: did not receive HSTS header
-paulproell.at: did not receive HSTS header
-paulrudge.codes: could not connect to host
-paulshir.com: could not connect to host
-paulshir.is: could not connect to host
-paulw.io: did not receive HSTS header
-paulyang.cn: did not receive HSTS header
-pause-canap.com: did not receive HSTS header
-paveljanda.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-pavelkahouseforcisco.com: did not receive HSTS header
-pavio.org: did not receive HSTS header
-pawelnazaruk.com: could not connect to host
-pawnkingloansmore.com: did not receive HSTS header
-pawsomebox.co.uk: could not connect to host
-paxdei.com.br: could not connect to host
-paxwinkel.nl: did not receive HSTS header
-pay.gigahost.dk: did not receive HSTS header
-pay.ubuntu.com: could not connect to host
-pay8522.com: could not connect to host
-pay888.asia: did not receive HSTS header
-paybook.co.tz: did not receive HSTS header
-payclixpayments.com: did not receive HSTS header
-paydigital.pt: did not receive HSTS header
-payfreez.com: could not connect to host
-paykings.com: did not receive HSTS header
-payload.tech: could not connect to host
-payment-network.com: did not receive HSTS header
-payments-reference.org: could not connect to host
-payments.google.com: did not receive HSTS header (error ignored - included regardless)
-payments.gy: did not receive HSTS header
-paymill.com: did not receive HSTS header
-paymill.de: could not connect to host
-paymon.tj: could not connect to host
-paymongo.me: did not receive HSTS header
-paymyphysician.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-paypod.org: could not connect to host
-payroll.ch: could not connect to host
-payroll.xero.com: did not receive HSTS header
-payrollhive.com: did not receive HSTS header
-paytwopay.com: could not connect to host
-paywait.com: could not connect to host
-payzang.com: did not receive HSTS header
-payzwin.com: could not connect to host
-pb-design.ch: could not connect to host
-pback.se: could not connect to host
-pbapp.net: did not receive HSTS header
-pbbr.com: did not receive HSTS header
-pbcknd.ml: could not connect to host
-pbcomp.com.au: did not receive HSTS header
-pbfashionexhibition.com: could not connect to host
-pbprint.ru: could not connect to host
-pbqs.site: could not connect to host
-pbraunschdash.com: could not connect to host
-pbreen.co.uk: could not connect to host
-pbscreens.com: could not connect to host
-pbytes.com: could not connect to host
-pbz.pw: did not receive HSTS header
-pc-nf.de: did not receive HSTS header
-pc-servis-brno.com: could not connect to host
-pc-tweak.de: did not receive HSTS header
-pc9865.com: max-age too low: 0
-pcat.io: could not connect to host
-pcbricole.fr: could not connect to host
-pccentral.nl: did not receive HSTS header
-pcfeuerwehr.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-pcforum.sk: did not receive HSTS header
-pcfun.net: could not connect to host
-pchax.net: could not connect to host
-pchospital.cc: could not connect to host
-pci-dss.hu: could not connect to host
-pci4.org: did not receive HSTS header
-pcidss.hu: could not connect to host
-pcipac.com: did not receive HSTS header
-pcjsercon.com: max-age too low: 633620
-pcreparatiehardenberg.nl: could not connect to host
-pcs2.gr: did not receive HSTS header
-pcsremodel.com: could not connect to host
-pcvirusclear.com: could not connect to host
-pdamsidoarjo.co.id: could not connect to host
-pdevio.com: could not connect to host
-pdf.yt: could not connect to host
-pdfsearch.org: could not connect to host
-pdkrawczyk.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-pdomo.me: did not receive HSTS header
-pdragt.com: could not connect to host
-pdthings.net: could not connect to host
-pe-bank.co.jp: max-age too low: 604800
-pe-kyousai.jp: could not connect to host
-peaceandwool.com: did not receive HSTS header
-peak-careers.com: did not receive HSTS header
-peakapp.nl: could not connect to host
-pearlcohen.com: did not receive HSTS header
-pearlsenroses.nl: did not receive HSTS header
-peaudorange.net: could not connect to host
-pebblesdemo.com: could not connect to host
-peckcloths.com: did not receive HSTS header
-pecot.fr: did not receive HSTS header
-peddock.com: did not receive HSTS header
-pedidamanosevilla.com: did not receive HSTS header
-pedidosfarma.com.br: could not connect to host
-pedrosluiter.nl: did not receive HSTS header
-peekops.com: could not connect to host
-peelland-fm.tk: could not connect to host
-peen.ch: could not connect to host
-peerherrmann.de: could not connect to host
-peerless.ae: could not connect to host
-peertube.uno: did not receive HSTS header
-peervpn.net: did not receive HSTS header
-pegundugun.tk: could not connect to host
-pehapkari.cz: did not receive HSTS header
-peinard.net: could not connect to host
-peintrenomade.com: did not receive HSTS header
-peirong.me: could not connect to host
-peissen.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-pekkapikkarainen.fi: could not connect to host
-pekkarik.ru: could not connect to host
-peliculasaudiolatinoonline.com: could not connect to host
-peliculasonline1.com: could not connect to host
-peliculator.com: max-age too low: 0
-peliseries24.com: could not connect to host
-pemagrid.org: could not connect to host
-pemberton.at: did not receive HSTS header
-pemborongbangunan.id: could not connect to host
-penablog.com: did not receive HSTS header
-pengi.me: could not connect to host
-pengisatelier.net: could not connect to host
-pengui.uk: could not connect to host
-penguinclientsystem.com: did not receive HSTS header
-pengumuman.id: could not connect to host
-pennyapp.io: did not receive HSTS header
-pennylane.me.uk: did not receive HSTS header
-pensanisso.com: did not receive HSTS header
-penser-electronique.com: did not receive HSTS header
-pension-waldesruh.de: did not receive HSTS header
-pensionecani.milano.it: could not connect to host
-pensionpilot.ca: did not receive HSTS header
-pentagonreviewcenter.com.ph: did not receive HSTS header
-pentano.net: could not connect to host
-penticton.photography: did not receive HSTS header
-penuelaspr.gov: could not connect to host
-people-mozilla.org: could not connect to host
-peoplesbankal.com: did not receive HSTS header
-peoplesguardian.org: could not connect to host
-peperiot.com: did not receive HSTS header
-peperstraat.online: could not connect to host
-pepinierebotanique.com: did not receive HSTS header
-peppelmedi.fi: could not connect to host
-pepper.dog: could not connect to host
-pepperhead.com: did not receive HSTS header
-pepperworldhotshop.de: did not receive HSTS header
-pepsicoemployeepreferencesurvey.com: could not connect to host
-pepwaterproofing.com: did not receive HSTS header
-per-pedes.at: did not receive HSTS header
-pera.gs: could not connect to host
-percloud.ddns.net: could not connect to host
-percyflix.com: could not connect to host
-perdel.cn: could not connect to host
-pereuda.com: could not connect to host
-perfect-radiant-wrinkles.com: could not connect to host
-perfectgift.com: did not receive HSTS header
-perfectionis.me: did not receive HSTS header
-perfectionunite.com: could not connect to host
-perfectseourl.com: did not receive HSTS header
-perfektesgewicht.com: could not connect to host
-performancesantafe.org: did not receive HSTS header
-performaride.com.au: could not connect to host
-performaterm.ro: could not connect to host
-performous.org: did not receive HSTS header
-perfumeaz.com: did not receive HSTS header
-perfumista.vn: did not receive HSTS header
-peridotcapitalpartners.com: could not connect to host
-periodismoactual.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-periscopeliveweb.com: could not connect to host
-perlwork.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-perm-jur.ch: could not connect to host
-perm-juridique.ch: could not connect to host
-permanence-juridique.com: could not connect to host
-permanencejuridique-ge.ch: could not connect to host
-permanencejuridique.com: could not connect to host
-permista.nl: did not receive HSTS header
-pernatie.ru: could not connect to host
-peromsik.com: did not receive HSTS header
-perplex.nl: did not receive HSTS header
-perrau.lt: could not connect to host
-perrone.co: could not connect to host
-perroud.pro: max-age too low: 0
-persiart.shop: could not connect to host
-persjrp.ca: could not connect to host
-persocloud.org: did not receive HSTS header
-persoform.ch: could not connect to host
-personal-injury-attorney.co: could not connect to host
-personalcommunicationsecurity.com: could not connect to host
-personaldatabasen.no: could not connect to host
-personalfunctionaldata.net: could not connect to host
-personalinjurylist.com: could not connect to host
-personalizedtouch.co: could not connect to host
-personcar.com.br: could not connect to host
-personnedisparue.fr: could not connect to host
-persson.im: could not connect to host
-perthdevicelab.com: did not receive HSTS header
-perucasestoril.com.br: did not receive HSTS header
-peruvianphotography.com: could not connect to host
-pervacio.hu: could not connect to host
-pescadorcomunicacao.com: could not connect to host
-pesdacgh.org: did not receive HSTS header
-pestalozzishop.com.br: could not connect to host
-pestkill.info: could not connect to host
-pesto.video: could not connect to host
-pet-life.top: did not receive HSTS header
-pet-nsk.ru: could not connect to host
-pet-tekk.co.uk: could not connect to host
-petangen.se: could not connect to host
-petaouchnok.ch: could not connect to host
-petchart.net: could not connect to host
-peteboc.com: did not receive HSTS header
-peterfolta.net: could not connect to host
-peterkshultz.com: could not connect to host
-petermazur.com: did not receive HSTS header
-peternagy.ie: did not receive HSTS header
-peters.consulting: could not connect to host
-petersmark.com: did not receive HSTS header
-petervanleeuwentweewielers.nl: did not receive HSTS header
-pethelpers.org: did not receive HSTS header
-petit.site: could not connect to host
-petlife.od.ua: could not connect to host
-petplum.com: could not connect to host
-petrkrapek.cz: could not connect to host
-petroscand.eu: could not connect to host
-petrostathis.com: could not connect to host
-petrovsky.pro: could not connect to host
-petrozavodsk.ga: could not connect to host
-pets4life.com.au: did not receive HSTS header
-petsittersservices.com: could not connect to host
-pettitcoat.com: could not connect to host
-petwall.info: could not connect to host
-peuf.shop: could not connect to host
-peuterspeelzaalhoekvanholland.nl: could not connect to host
-pewat.com: could not connect to host
-pewboards.com: could not connect to host
-pexieapp.com: did not receive HSTS header
-peykezamin.ir: did not receive HSTS header
-peytonfarrar.com: did not receive HSTS header
-pfarchimedes-pensioen123.nl: could not connect to host
-pferdeeinstreu-kaufen.com: did not receive HSTS header
-pferdekauf.de: did not receive HSTS header
-pfgshop.com.br: could not connect to host
-pflegedienst-gratia.de: could not connect to host
-pflegesalon-siebke.de: did not receive HSTS header
-pflug.email: did not receive HSTS header
-pfnext.de: did not receive HSTS header
-pfo.io: could not connect to host
-pfolta.net: could not connect to host
-pfonks.com: did not receive HSTS header
-pfssales.com: did not receive HSTS header
-pfudor.tk: could not connect to host
-pgcpbc.com: could not connect to host
-pglandscapingpaving.com: did not receive HSTS header
-pglaum.tk: could not connect to host
-pgmsource.com: could not connect to host
-pgp.guru: could not connect to host
-pgp.lol: could not connect to host
-pgp.network: did not receive HSTS header
-pgpaintanddesign.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-pgpm.io: could not connect to host
-pgtb.be: could not connect to host
-pgwap.com: could not connect to host
-phalconist.com: did not receive HSTS header
-phantasie.cc: could not connect to host
-pharmacyglobalrx.net: could not connect to host
-pharmaquality.com: did not receive HSTS header
-pharynx.nl: could not connect to host
-phasersec.com: could not connect to host
-phattea.tk: could not connect to host
-phcmembers.com: could not connect to host
-phdhub.it: could not connect to host
-phdsupply.com: could not connect to host
-phdwuda.com: could not connect to host
-phen-garcinia.info: could not connect to host
-phenomeno-porto.com: did not receive HSTS header
-phenomeno.nl: did not receive HSTS header
-phenomenoporto.com: did not receive HSTS header
-phenomenoporto.nl: did not receive HSTS header
-phhtc.ir: did not receive HSTS header
-phialo.de: did not receive HSTS header
-phil-phillies.com: could not connect to host
-philadelphiacandies.com: did not receive HSTS header
-philadelphiadancefoundation.org: did not receive HSTS header
-philia.de: did not receive HSTS header
-philipkohn.com: did not receive HSTS header
-philipmordue.co.uk: could not connect to host
-philipp-trulson.de: could not connect to host
-philipp1994.de: did not receive HSTS header
-philippa.cool: could not connect to host
-philippbirkholz.com: could not connect to host
-phillipgoldfarb.com: could not connect to host
-phillippi.me: could not connect to host
-phillipsdistribution.com: did not receive HSTS header
-phillmoore.com: did not receive HSTS header
-phillprice.com: did not receive HSTS header
-phillyinjurylawyer.com: did not receive HSTS header
-philomathiclife.com: could not connect to host
-philonas.net: did not receive HSTS header
-philosophy.moe: could not connect to host
-philpropertygroup.com: could not connect to host
-phippsreporting.com: did not receive HSTS header
-phishing-studie.org: could not connect to host
-phishing.rs: could not connect to host
-phishingusertraining.com: could not connect to host
-phligence.com: could not connect to host
-phocean.net: did not receive HSTS header
-phoebe.co.nz: did not receive HSTS header
-phoenicis.com.ua: did not receive HSTS header
-phoenix.dj: did not receive HSTS header
-phoenixcourt.gov: could not connect to host
-phoenixlogan.com: could not connect to host
-phoenixmunicipalcourt.gov: could not connect to host
-phonefilter.co.uk: could not connect to host
-phonefleet.fr: could not connect to host
-phonenumberinfo.co.uk: could not connect to host
-phongmay24h.com: could not connect to host
-phonix-company.fr: could not connect to host
-phood.be: did not receive HSTS header
-photek.fm: could not connect to host
-photoblogverona.com: could not connect to host
-photoboothpartyhire.co.uk: did not receive HSTS header
-photofilmcamera.com: did not receive HSTS header
-photographersdaydream.com: could not connect to host
-photographyforchange.com: could not connect to host
-photographyforchange.org: could not connect to host
-photomaniastore.com: did not receive HSTS header
-photon.sh: could not connect to host
-photops.fr: could not connect to host
-photosoftware.nl: could not connect to host
-phototag.org: did not receive HSTS header
-phototrio.com: did not receive HSTS header
-php-bach.org: could not connect to host
-phpdistribution.com: did not receive HSTS header
-phperformances.fr: did not receive HSTS header
-phpinfo.in.th: could not connect to host
-phpkari.cz: could not connect to host
-phpower.com: could not connect to host
-phr34kz.pw: could not connect to host
-phra.gs: could not connect to host
-phrasing.me: could not connect to host
-phrazor.com: did not receive HSTS header
-phrive.space: could not connect to host
-phryanjr.com: could not connect to host
-phumin.in.th: did not receive HSTS header
-phunehehe.net: did not receive HSTS header
-phuong.faith: could not connect to host
-phus.lu: did not receive HSTS header
-physicaltherapist.com: did not receive HSTS header
-physicentrix.ca: did not receive HSTS header
-physiobroadbeach.com.au: could not connect to host
-pi-box.ml: could not connect to host
-pi-eng.fr: could not connect to host
-pianetaottica.eu: could not connect to host
-pianetaottica.info: could not connect to host
-pianetaottica.it: could not connect to host
-pianetaottica.net: could not connect to host
-pianetaottica.org: could not connect to host
-pias-button.net: could not connect to host
-piasto.com.cy: could not connect to host
-piatanoua.md: could not connect to host
-pic.sr: could not connect to host
-picallo.es: could not connect to host
-picardiascr.com: could not connect to host
-pickawaycountyohio.gov: could not connect to host
-pickersurvey.org: did not receive HSTS header
-pickme.nl: could not connect to host
-pickmysoap.gr: could not connect to host
-pickr.co: did not receive HSTS header
-pickthestory.com: did not receive HSTS header
-picoauto.com: max-age too low: 0
-picone.com.au: could not connect to host
-picotech.com: max-age too low: 0
-picotronic.biz: could not connect to host
-picsandtours.com: could not connect to host
-picscare.co.uk: could not connect to host
-picshare.nz: could not connect to host
-picster.at: did not receive HSTS header
-pidatacenters.com: did not receive HSTS header
-pidomex.com: did not receive HSTS header
-piedfeed.com: did not receive HSTS header
-pieinsurance.com: did not receive HSTS header
-piekacz.co.uk: could not connect to host
-pieldenaranja.com: did not receive HSTS header
-pieperhome.de: did not receive HSTS header
-piercing-store.com: did not receive HSTS header
-pierreblake.com: did not receive HSTS header
-pierrejeansuau.fr: could not connect to host
-pieterhordijk.com: could not connect to host
-pieterjangeeroms.me: could not connect to host
-pig.name: did not receive HSTS header
-piggott.me.uk: did not receive HSTS header
-pighouse.info: could not connect to host
-pignus.tech: could not connect to host
-pigritia.de: could not connect to host
-piils.fr: did not receive HSTS header
-pikalongwar.com: could not connect to host
-pikeitservices.com.au: did not receive HSTS header
-pikimusic.moe: could not connect to host
-pikmy.com: could not connect to host
-pilesyk.tk: could not connect to host
-pilgermaske.org: did not receive HSTS header
-piligrimname.com: could not connect to host
-piliszek.net: could not connect to host
-pillowandpepper.com: did not receive HSTS header
-pilotcrowd.nl: did not receive HSTS header
-pilvi.space: could not connect to host
-pimg136.com: could not connect to host
-pims.global: did not receive HSTS header
-pimspage.nl: could not connect to host
-pimusiccloud.hopto.org: could not connect to host
-pineapplesapp.com: did not receive HSTS header
-pinebaylibrary.org: could not connect to host
-pinigseu.xyz: could not connect to host
-pinkcasino.co.uk: did not receive HSTS header
-pinkfis.ch: did not receive HSTS header
-pinkhq.com: could not connect to host
-pinkinked.com: could not connect to host
-pinkladyapples.co.uk: did not receive HSTS header
-pinkmango.travel: did not receive HSTS header
-pinkyf.com: could not connect to host
-pinnacle-tex.com: could not connect to host
-pinnacleallergy.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-pinnaclelife.nz: could not connect to host
-pinnacles.com: max-age too low: 0
-pinner.io: did not receive HSTS header
-pinoylinux.org: did not receive HSTS header
-pinpointline.com: did not receive HSTS header
-pinscher.com.br: could not connect to host
-pinter-moebel-shop.de: did not receive HSTS header
-pinup-app.com: could not connect to host
-pioche.ovh: did not receive HSTS header
-pipfrosch.com: could not connect to host
-pipocao.com: did not receive HSTS header
-pippen.io: could not connect to host
-pips.rocks: could not connect to host
-pir9.com: did not receive HSTS header
-piranil.com: did not receive HSTS header
-pirapiserver.ddns.net: could not connect to host
-pirata.ga: could not connect to host
-pirate.trade: could not connect to host
-pirateahoy.eu: could not connect to host
-piratebay.ml: could not connect to host
-piratebayproxy.tf: could not connect to host
-piratebit.tech: could not connect to host
-piratedb.com: could not connect to host
-piratedot.com: could not connect to host
-piratelist.online: could not connect to host
-piratenlogin.de: did not receive HSTS header
-piratepay.io: could not connect to host
-piratepay.ir: could not connect to host
-pirateproxy.pe: could not connect to host
-pirateproxy.sx: did not receive HSTS header
-pirateproxy.tf: could not connect to host
-pirateproxy.vip: could not connect to host
-pirates.click: did not receive HSTS header
-pirati.cz: did not receive HSTS header
-piratte.net: did not receive HSTS header
-pirlitu.com: did not receive HSTS header
-pisexy.me: did not receive HSTS header
-pisidia.de: could not connect to host
-pitch.vip: did not receive HSTS header
-pitfire.io: could not connect to host
-pitonarms.com: did not receive HSTS header
-pitsstop.nu: could not connect to host
-pittaya.com: did not receive HSTS header
-pittmancentertn.gov: could not connect to host
-pittmantraffic.co.uk: did not receive HSTS header
-pittonpreschool.com: did not receive HSTS header
-piubip.com.br: could not connect to host
-piwko.co: could not connect to host
-pix-geeks.com: max-age too low: 2592000
-pixabay.com: did not receive HSTS header
-pixdigital.net: did not receive HSTS header
-pixeame.com: could not connect to host
-pixel-kraft.de: did not receive HSTS header
-pixel.google.com: did not receive HSTS header (error ignored - included regardless)
-pixelbash.de: did not receive HSTS header
-pixelcode.com.au: could not connect to host
-pixelesque.uk: could not connect to host
-pixelfou.com: could not connect to host
-pixelgliders.de: could not connect to host
-pixelhero.co.uk: did not receive HSTS header
-pixelpirat.ch: did not receive HSTS header
-pixelrain.info: could not connect to host
-pixelumin3d.com: could not connect to host
-pixeoapp.com: did not receive HSTS header
-pixi.chat: could not connect to host
-pixi.me: could not connect to host
-pixiv.rip: did not receive HSTS header
-pixulutinho.com.br: could not connect to host
-pizala.de: could not connect to host
-pizzabottle.com: did not receive HSTS header
-pizzacook.ch: did not receive HSTS header
-pizzadoc.ch: could not connect to host
-pizzafunny.com.br: could not connect to host
-pizzalongaway.it: did not receive HSTS header
-pizzamc.eu: could not connect to host
-pj00100.com: did not receive HSTS header
-pj00200.com: did not receive HSTS header
-pj00300.com: did not receive HSTS header
-pj00400.com: did not receive HSTS header
-pj00600.com: did not receive HSTS header
-pj00700.com: did not receive HSTS header
-pj00800.com: did not receive HSTS header
-pj009.com: could not connect to host
-pj00900.com: did not receive HSTS header
-pj1100.cc: did not receive HSTS header
-pj21566.com: could not connect to host
-pj21866.com: could not connect to host
-pj21886.com: could not connect to host
-pj21887.com: could not connect to host
-pj21899.com: could not connect to host
-pj21990.com: could not connect to host
-pj21991.com: could not connect to host
-pj21993.com: could not connect to host
-pj21996.com: could not connect to host
-pj21997.com: could not connect to host
-pj21998.com: could not connect to host
-pj21bb.com: could not connect to host
-pj21c.com: could not connect to host
-pj21f.com: could not connect to host
-pj21i.com: could not connect to host
-pj21j.com: could not connect to host
-pj21k.com: could not connect to host
-pj21m.com: could not connect to host
-pj21o.com: could not connect to host
-pj21p.com: could not connect to host
-pj21q.com: could not connect to host
-pj21r.com: could not connect to host
-pj21tt.com: could not connect to host
-pj21v.com: could not connect to host
-pj21w.com: could not connect to host
-pj21x.com: could not connect to host
-pj21y.com: could not connect to host
-pj539999.com: could not connect to host
-pj881988.com: could not connect to host
-pjax.xyz: could not connect to host
-pjbet.mg: could not connect to host
-pjgj18.com: did not receive HSTS header
-pjili.com: did not receive HSTS header
-pjp.com.mt: did not receive HSTS header
-pjsec.tk: could not connect to host
-pk.cash: could not connect to host
-pk.city: could not connect to host
-pk.cool: could not connect to host
-pk.vin: could not connect to host
-pkautodesign.com: did not receive HSTS header
-pkbjateng.com: could not connect to host
-pkrank.com: could not connect to host
-pkschat.com: could not connect to host
-pksps.com: did not receive HSTS header
-placassinal.com.br: did not receive HSTS header
-placebet.pro: could not connect to host
-placefade.com: could not connect to host
-placollection.org: could not connect to host
-plaettliaktion.ch: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-plainmark.com: did not receive HSTS header
-plaintray.com: could not connect to host
-plakbak.nl: could not connect to host
-plan-immobilier.fr: could not connect to host
-planeexplanation.com: could not connect to host
-planespotterblog.de: did not receive HSTS header
-planet-laas.de: did not receive HSTS header
-planetbeauty.com: did not receive HSTS header
-planete-cocoon.com: did not receive HSTS header
-planete-secu.com: could not connect to host
-planetofwoman.com: did not receive HSTS header
-planetofwomen.net: did not receive HSTS header
-planetravel.co: could not connect to host
-planformation.com: did not receive HSTS header
-planhub.com: did not receive HSTS header
-planktonholland.com: did not receive HSTS header
-planktonholland.nl: did not receive HSTS header
-planningsagenda.nl: did not receive HSTS header
-planolowcarb.com: could not connect to host
-planovivofibra.com.br: did not receive HSTS header
-planpharmacy.com: could not connect to host
-plans3ds.com: did not receive HSTS header
-plant.ml: could not connect to host
-plantdaddie.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-plantrustler.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-planup.fr: could not connect to host
-plaros.ml: could not connect to host
-plass.hamburg: could not connect to host
-plasti-pac.ch: did not receive HSTS header
-plastiflex.it: could not connect to host
-plasvilledescartaveis.com.br: could not connect to host
-platform.lookout.com: could not connect to host
-platinumexpress.com.ar: did not receive HSTS header
-platinumpeek.com: did not receive HSTS header
-platschi.net: could not connect to host
-platterlauncher.com: could not connect to host
-plattner.club: did not receive HSTS header
-play: could not connect to host
-play.google.com: did not receive HSTS header (error ignored - included regardless)
-playdreamcraft.com.br: did not receive HSTS header
-players2gather.com: did not receive HSTS header
-playerscout.net: did not receive HSTS header
-playhappywheelsunblocked.com: could not connect to host
-playingvideojuegos.com: could not connect to host
-playit.rs: could not connect to host
-playkh.com: did not receive HSTS header
-playkinder.com: did not receive HSTS header
-playmaker.io: could not connect to host
-playmaza.live: could not connect to host
-playmei.com: did not receive HSTS header
-playmfe.com: could not connect to host
-playsoundevents.be: did not receive HSTS header
-playsource.co: did not receive HSTS header
-playupnow.com: could not connect to host
-playwhyyza.com: could not connect to host
-playyou.be: could not connect to host
-playzonecastles.co.uk: could not connect to host
-plaza.ph: could not connect to host
-pld-entertainment.co.uk: could not connect to host
-pleasanton-daycare-childcare.com: did not receive HSTS header
-pleasantonca.gov: could not connect to host
-please-deny.me: could not connect to host
-please-uwu.me: could not connect to host
-pleaseuseansnisupportedbrowser.ml: could not connect to host
-pleasure.forsale: could not connect to host
-pleger.tk: could not connect to host
-pleiades.com.tr: did not receive HSTS header
-plen.io: did not receive HSTS header
-plentybetter.com: could not connect to host
-plentybetter.org: could not connect to host
-plevenlab.org: did not receive HSTS header
-plexbpvr.ddns.net: could not connect to host
-plexi.dyndns.tv: could not connect to host
-plexmark.tk: could not connect to host
-plexnet.cz: could not connect to host
-plexpy13.ddns.net: could not connect to host
-plextv.de: could not connect to host
-plexusmd.com: did not receive HSTS header
-plfgr.eu.org: could not connect to host
-plhdb.org: did not receive HSTS header
-plicca.com: did not receive HSTS header
-plichso.de: could not connect to host
-plinc.co: did not receive HSTS header
-plirt.ru: could not connect to host
-plochka.bg: could not connect to host
-plogable.co: could not connect to host
-plombirator.kz: did not receive HSTS header
-plothost.com: did not receive HSTS header
-ploup.net: could not connect to host
-plu-pro.ru: could not connect to host
-pluff.nl: did not receive HSTS header
-plugboard.xyz: could not connect to host
-pluggedhead.com: did not receive HSTS header
-plumbing-arlington.com: did not receive HSTS header
-plumbingboksburg.co.za: did not receive HSTS header
-plumbingman.com.au: did not receive HSTS header
-plumpie.net: could not connect to host
-plumplat.com: could not connect to host
-plurr.me: did not receive HSTS header
-plurr.us: did not receive HSTS header
-plus-digital.net: did not receive HSTS header
-plus-u.com.au: did not receive HSTS header
-plus.sandbox.google.com: did not receive HSTS header (error ignored - included regardless)
-plus1s.site: could not connect to host
-plus1s.tk: could not connect to host
-pluscbdoil.com: did not receive HSTS header
-plushev.com: did not receive HSTS header
-plusminus30.si: did not receive HSTS header
-plussizereviews.com: could not connect to host
-plustech.id: did not receive HSTS header
-plut.org: could not connect to host
-plymouthglassgallery.com: did not receive HSTS header
-plymouthsoftplay.co.uk: did not receive HSTS header
-plzenskybarcamp.cz: did not receive HSTS header
-plzz.de: could not connect to host
-pm13-media.cz: could not connect to host
-pma-iss.com: could not connect to host
-pmac.pt: could not connect to host
-pmbremer.de: could not connect to host
-pmbtf.com: could not connect to host
-pmconference.ch: did not receive HSTS header
-pmctire.com: did not receive HSTS header
-pmemanager.fr: did not receive HSTS header
-pmessage.ch: could not connect to host
-pmgnet.de: did not receive HSTS header
-pmheart.site: could not connect to host
-pmnts.io: could not connect to host
-pmponline.de: did not receive HSTS header
-pms.myiphost.com: could not connect to host
-pmsacorp.com: did not receive HSTS header
-pmsfdev.com: could not connect to host
-pnakosoft.com: could not connect to host
-pnakosoft.com.au: could not connect to host
-pneumonline.be: did not receive HSTS header
-pneusgppremium.com.br: did not receive HSTS header
-pnfc.re: did not receive HSTS header
-pnoec.org.do: could not connect to host
-pnukee.com: could not connect to host
-poba.fr: did not receive HSTS header
-poc.xn--fiqs8s: could not connect to host
-poc060.com: could not connect to host
-poc080.com: could not connect to host
-poc090.com: could not connect to host
-poc100.com: could not connect to host
-poc109.com: could not connect to host
-poc11.com: could not connect to host
-poc116.com: could not connect to host
-poc118.com: could not connect to host
-poc119.com: could not connect to host
-poc120.com: could not connect to host
-poc128.com: could not connect to host
-poc13.com: could not connect to host
-poc15.com: could not connect to host
-poc16.com: could not connect to host
-poc17.com: could not connect to host
-poc18.com: could not connect to host
-poc19.com: could not connect to host
-poc21.com: could not connect to host
-poc211.com: could not connect to host
-poc22.com: could not connect to host
-poc226.com: could not connect to host
-poc228.com: could not connect to host
-poc23.com: could not connect to host
-poc25.com: could not connect to host
-poc26.com: could not connect to host
-poc261.com: could not connect to host
-poc262.com: could not connect to host
-poc27.com: could not connect to host
-poc290.com: could not connect to host
-poc298.com: could not connect to host
-poc31.com: could not connect to host
-poc32.com: could not connect to host
-poc33.com: could not connect to host
-poc35.com: could not connect to host
-poc36.com: could not connect to host
-poc37.com: could not connect to host
-poc38.com: could not connect to host
-poc51.com: could not connect to host
-poc518.com: could not connect to host
-poc52.com: could not connect to host
-poc53.com: could not connect to host
-poc55.com: could not connect to host
-poc56.com: could not connect to host
-poc568.com: could not connect to host
-poc57.com: could not connect to host
-poc58.com: could not connect to host
-poc586.com: could not connect to host
-poc588.com: could not connect to host
-poc59.com: could not connect to host
-poc601.com: could not connect to host
-poc618.com: could not connect to host
-poc63.com: could not connect to host
-poc65.com: could not connect to host
-poc66.com: could not connect to host
-poc661.com: could not connect to host
-poc663.com: could not connect to host
-poc665.com: could not connect to host
-poc668.com: could not connect to host
-poc669.com: could not connect to host
-poc67.com: could not connect to host
-poc68.com: could not connect to host
-poc69.com: could not connect to host
-poc699.com: could not connect to host
-poc7.com: could not connect to host
-poc71.com: could not connect to host
-poc718.com: could not connect to host
-poc72.com: could not connect to host
-poc75.com: could not connect to host
-poc76.com: could not connect to host
-poc768.com: could not connect to host
-poc77.com: could not connect to host
-poc771.com: could not connect to host
-poc772.com: could not connect to host
-poc773.com: could not connect to host
-poc779.com: could not connect to host
-poc78.com: could not connect to host
-poc79.com: could not connect to host
-poc8.com: could not connect to host
-poc816.com: could not connect to host
-poc86.com: could not connect to host
-poc866.com: could not connect to host
-poc88.com: could not connect to host
-poc88.vip: could not connect to host
-poc8811.com: could not connect to host
-poc882.com: could not connect to host
-poc8822.com: could not connect to host
-poc883.com: could not connect to host
-poc8833.com: could not connect to host
-poc885.com: could not connect to host
-poc8855.com: could not connect to host
-poc886.com: could not connect to host
-poc8866.com: could not connect to host
-poc887.com: could not connect to host
-poc8877.com: could not connect to host
-poc888.com: could not connect to host
-poc889.com: could not connect to host
-poc8899.com: could not connect to host
-poc89.com: could not connect to host
-poc899.com: could not connect to host
-poc916.com: could not connect to host
-poc918.com: could not connect to host
-poc965.com: could not connect to host
-poc98.com: could not connect to host
-poc99.com: could not connect to host
-poc992.com: could not connect to host
-poc993.com: could not connect to host
-poc995.com: could not connect to host
-poc996.com: could not connect to host
-poc997.com: could not connect to host
-poc998.com: could not connect to host
-pocakdrops.com: could not connect to host
-pocakking.tk: could not connect to host
-pocket-lint.com: did not receive HSTS header
-pocketcash.com.au: did not receive HSTS header
-pocketfullofapps.com: did not receive HSTS header
-pocketmemories.net: could not connect to host
-pocketsix.com: could not connect to host
-pocloud.homelinux.net: could not connect to host
-pocpok.com: could not connect to host
-pocqipai.com: could not connect to host
-podcast.style: could not connect to host
-podia.com.gr: could not connect to host
-podiumsdiskussion.org: did not receive HSTS header
-podo-podo.com: could not connect to host
-podxappa.com.ua: did not receive HSTS header
-poedgirl.com: did not receive HSTS header
-poeg.cz: did not receive HSTS header
-poezjagala.pl: could not connect to host
-pogs.us: could not connect to host
-poinsot.beer: could not connect to host
-pointcab.vn: could not connect to host
-pointclickcare.com: did not receive HSTS header
-pointeringles.com: could not connect to host
-pointhost.de: could not connect to host
-pointpro.de: did not receive HSTS header
-points-pote.com: could not connect to host
-points4unitedway.com: could not connect to host
-pointsgame.net: did not receive HSTS header
-pointworksacademy.com: could not connect to host
-poirierlavoie.ca: did not receive HSTS header
-poiru.net: did not receive HSTS header
-poitiers-ttacc-86.eu.org: could not connect to host
-pojarnayabezopasnost-gov.ru: did not receive HSTS header
-pokalsocial.de: could not connect to host
-pokeduel.me: could not connect to host
-pokepon.center: could not connect to host
-pokerslab.com: could not connect to host
-pokomichi.com: did not receive HSTS header
-pol-expo.ru: could not connect to host
-pol.in.th: could not connect to host
-polandb2b.directory: could not connect to host
-polar.uk.com: did not receive HSTS header
-polarfisk.com: did not receive HSTS header
-polarityschule.com: did not receive HSTS header
-polarnova.site: did not receive HSTS header
-pole-et-motion.fr: did not receive HSTS header
-pole.net.nz: did not receive HSTS header
-poleartschool.com: could not connect to host
-polen.guide: could not connect to host
-policeiwitness.sg: could not connect to host
-policyreporter.us: could not connect to host
-polimat.org: could not connect to host
-poliscentraal.nl: did not receive HSTS header
-polish.directory: could not connect to host
-polit-it.pro: could not connect to host
-politeiaudesa.org: did not receive HSTS header
-politic.org.ua: could not connect to host
-politicachubut.com.ar: did not receive HSTS header
-politically-incorrect.xyz: could not connect to host
-politiewervingshop.nl: did not receive HSTS header
-politologos.org: could not connect to host
-pollet-ghijs.be: could not connect to host
-pollet-ghys.be: could not connect to host
-pollpodium.nl: could not connect to host
-polly.spdns.org: could not connect to host
-poloniex.co.za: did not receive HSTS header
-polsport.live: did not receive HSTS header
-polychainlabs.com: max-age too low: 0
-polycrypt.us: could not connect to host
-polyfill.io: did not receive HSTS header
-polymathematician.com: could not connect to host
-polymorph.rs: did not receive HSTS header
-polypho.nyc: could not connect to host
-polyr.xyz: could not connect to host
-polytechecosystem.vc: could not connect to host
-pomardaserra.com: could not connect to host
-pomfe.co: did not receive HSTS header
-pomfeed.fr: could not connect to host
-pommetelecom.fr: could not connect to host
-pomozmruczkom.pl: could not connect to host
-pompefunebrilariviera.it: could not connect to host
-pompompoes.com: could not connect to host
-pondof.fish: could not connect to host
-poneytelecom.org: could not connect to host
-ponio.xyz: could not connect to host
-ponpon.tk: could not connect to host
-ponteencima.com: could not connect to host
-ponteus.com: could not connect to host
-pontodogame.com.br: could not connect to host
-pontokay.com.br: could not connect to host
-pontualcomp.com: could not connect to host
-ponxel.com: could not connect to host
-pony.today: could not connect to host
-ponycyclepals.co.uk: could not connect to host
-ponythread.com: did not receive HSTS header
-ponzi.life: could not connect to host
-poochingaround.co.uk: did not receive HSTS header
-pookl.com: could not connect to host
-poolinstallers.co.za: could not connect to host
-poolsandstuff.com: did not receive HSTS header
-poolspondsandwaterscapes.com: could not connect to host
-pooltechthailand.com: max-age too low: 1000
-poon.tech: could not connect to host
-poopchart.net: could not connect to host
-poorstock.com: did not receive HSTS header
-pop3.jp: could not connect to host
-popcorncult.ru: could not connect to host
-popi.se: did not receive HSTS header
-popkins.cf: could not connect to host
-popkins.ga: could not connect to host
-popkins.gq: could not connect to host
-popkins.ml: could not connect to host
-popkins.tk: did not receive HSTS header
-poptimize.net: did not receive HSTS header
-popup-stores.online: could not connect to host
-popupsoftplay.com: could not connect to host
-poris.web.id: did not receive HSTS header
-pormat.cl: did not receive HSTS header
-porn2019.tk: could not connect to host
-pornabee.com: could not connect to host
-pornblog.org: could not connect to host
-porncandi.com: did not receive HSTS header
-pornguin.com: did not receive HSTS header
-porniwi.com: could not connect to host
-pornofilme.top: could not connect to host
-pornoserver.eu: did not receive HSTS header
-pornskyhub.com: did not receive HSTS header
-pornspider.to: could not connect to host
-pornstars.me: did not receive HSTS header
-porondam.lk: did not receive HSTS header
-porpcr.com: could not connect to host
-porschen.fr: could not connect to host
-port.im: did not receive HSTS header
-port.social: could not connect to host
-portablebuildingsales.co.uk: did not receive HSTS header
-portablespeakersfinder.com: could not connect to host
-portagein.gov: did not receive HSTS header
-portalcarapicuiba.com: did not receive HSTS header
-portalcarriers.com: could not connect to host
-portalcentric.net: could not connect to host
-portale-randkowe.pl: did not receive HSTS header
-portalhubnuti.cz: did not receive HSTS header
-portalisapres.cl: could not connect to host
-portalkla.com.br: did not receive HSTS header
-portalm.tk: could not connect to host
-portalmundo.xyz: could not connect to host
-portalplatform.net: could not connect to host
-portaluniversalista.org: could not connect to host
-portalveneza.com.br: did not receive HSTS header
-portalzine.de: did not receive HSTS header
-portchesterny.gov: could not connect to host
-portofacil.com: did not receive HSTS header
-portraitsystem.biz: did not receive HSTS header
-portsmoutheic.com: could not connect to host
-portvincentcaravanpark.com.au: did not receive HSTS header
-pos.co.tz: did not receive HSTS header
-posalji.me: did not receive HSTS header
-poschtiliste.ch: did not receive HSTS header
-poshbeyond.com: did not receive HSTS header
-poshpak.com: max-age too low: 86400
-posijson.stream: could not connect to host
-positiveaffirmationscenter.com: max-age too low: 0
-positivenames.net: could not connect to host
-positivesobrietyinstitute.com: did not receive HSTS header
-posoiu.net: could not connect to host
-post.com.ar: could not connect to host
-postari.ro: did not receive HSTS header
-postbox.life: could not connect to host
-postcardpayment.com: could not connect to host
-postcodegarant.nl: could not connect to host
-posters.win: could not connect to host
-postpot.co.kr: could not connect to host
-postscheduler.org: could not connect to host
-postura-corretta.it: could not connect to host
-posylka.de: did not receive HSTS header
-potatofrom.space: did not receive HSTS header
-potatoheads.net: could not connect to host
-potatron.tech: did not receive HSTS header
-potbox.com: did not receive HSTS header
-potenzmittelblog.info: could not connect to host
-potkani.tk: could not connect to host
-potlytics.com: could not connect to host
-potomania.cz: could not connect to host
-potpourrifestival.de: did not receive HSTS header
-potsdam.directory: could not connect to host
-potsky.com: did not receive HSTS header
-potterscraftcider.com: did not receive HSTS header
-pottreid.com: could not connect to host
-pouets.ovh: could not connect to host
-poupatempo.org: did not receive HSTS header
-pour-la-culture-aulnay.fr: could not connect to host
-pourmesloisirs.com: could not connect to host
-pourmoi.co.uk: did not receive HSTS header
-pourout.org: did not receive HSTS header
-pousadaestreladapraia.com.br: could not connect to host
-poussinooz.fr: could not connect to host
-povertymind.com: could not connect to host
-povitria.net: could not connect to host
-powdersnow.top: did not receive HSTS header
-power-coonies.de: could not connect to host
-power-fit.org: did not receive HSTS header
-power-l.ch: did not receive HSTS header
-power-meter.cc: did not receive HSTS header
-power-of-interest.com: could not connect to host
-power-tools24.com: could not connect to host
-power99press.com: could not connect to host
-powerdent.net.br: could not connect to host
-poweredbypurdy.com: did not receive HSTS header
-powerentertainment.tv: could not connect to host
-powermint.de: did not receive HSTS header
-poweroff.win: could not connect to host
-powerplannerapp.com: could not connect to host
-powerplaywashers.com: could not connect to host
-powerserg.org: did not receive HSTS header
-powersergdatasystems.tk: could not connect to host
-powersergthisisthetunnelfuckyouscott.com: could not connect to host
-powersergthisisthewebsitefuckyouchris.com: could not connect to host
-powersergthisisthewebsitefuckyouscott.com: could not connect to host
-powersergunited.com: could not connect to host
-powersergunited.org: could not connect to host
-powersergusercontent.com: could not connect to host
-powershellmagic.com: could not connect to host
-powershift.ne.jp: did not receive HSTS header
-powertothebuilder.com: did not receive HSTS header
-powerwashingproslosangeles.com: did not receive HSTS header
-powerxequality.com: did not receive HSTS header
-poy-tech.com: could not connect to host
-pozitiffchik.cf: could not connect to host
-pozniak.at: did not receive HSTS header
-pozyczka-bez-zaswiadczen.pl: did not receive HSTS header
-pozytywnyplan.pl: could not connect to host
-pozzitiv.ro: could not connect to host
-pozzo-balbi.com: could not connect to host
-pp5197.co: could not connect to host
-pp6729.co: could not connect to host
-pp6729.com: did not receive HSTS header
-pp6957.co: could not connect to host
-pp9297.co: could not connect to host
-pp9397.com: did not receive HSTS header
-pp9721.com: did not receive HSTS header
-pp9728.co: could not connect to host
-ppembed.com: did not receive HSTS header
-ppiproperties.com: did not receive HSTS header
-ppoou.co.uk: could not connect to host
-pppo.gov: could not connect to host
-ppr-truby.ru: could not connect to host
-ppsvcs2.com: could not connect to host
-pptavmdata.org: could not connect to host
-ppuu.org: did not receive HSTS header
-ppwancai.com: max-age too low: 0
-ppy3.com: could not connect to host
-pqscript.com: could not connect to host
-pr3-space-staging.ga: could not connect to host
-pracowniatkanin.com: did not receive HSTS header
-practixdevelopment.com: did not receive HSTS header
-pracujwunii.pl: did not receive HSTS header
-praderarestaurant.co.uk: could not connect to host
-praiss.net: could not connect to host
-prajwal-koirala.com: could not connect to host
-pranaprinciple.com: did not receive HSTS header
-prashchar.uk: did not receive HSTS header
-prateep.io: could not connect to host
-pratinav.xyz: could not connect to host
-pratopronto.org: could not connect to host
-prattpokemon.com: could not connect to host
-praveenravichandran.xyz: could not connect to host
-praxis-dingeldey.de: could not connect to host
-praxis-odermath.de: did not receive HSTS header
-praxis-research.info: did not receive HSTS header
-prayum.com: could not connect to host
-prazeresdavida.com.br: could not connect to host
-prazynka.pl: could not connect to host
-prdelka.eu: did not receive HSTS header
-pre-lean-consulting.de: did not receive HSTS header
-pre-renewal.com: could not connect to host
-precedecaritas.com.br: could not connect to host
-preci0.com: could not connect to host
-preciosde.es: did not receive HSTS header
-precisedigitalmarketing.com.au: did not receive HSTS header
-precisionaeroimaging.com: could not connect to host
-precisionventures.com: could not connect to host
-prediksisydney.com: could not connect to host
-preexport.com: did not receive HSTS header
-preezzie.com: could not connect to host
-prefis.com: did not receive HSTS header
-prego-shop.de: could not connect to host
-pregono.com: did not receive HSTS header
-preio.cn: could not connect to host
-preis-alarm.info: could not connect to host
-preis-alarm.org: could not connect to host
-prekladysanca.cz: could not connect to host
-prelist.org: did not receive HSTS header
-premaritalsex.info: did not receive HSTS header
-premieravenue.net: did not receive HSTS header
-premiumeuropeankiwi.eu: could not connect to host
-premsarswat.me: could not connect to host
-prepandgo-euro.com: could not connect to host
-prepedia.org: could not connect to host
-preposted.com: did not receive HSTS header
-preprodfan.gov: could not connect to host
-prescriptionrex.com: could not connect to host
-presentesdegrife.com.br: could not connect to host
-presidentials2016.com: could not connect to host
-press-anime-nenkan.com: could not connect to host
-pressakey.de: did not receive HSTS header
-pressenews.net: did not receive HSTS header
-pressento.com: did not receive HSTS header
-pressfreedomfoundation.org: did not receive HSTS header
-presskr.com: did not receive HSTS header
-pressography.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-prestburyscouts.org.uk: could not connect to host
-prestigeeventshire.co.uk: could not connect to host
-prestigesigns.net: did not receive HSTS header
-prestonapp.com: did not receive HSTS header
-pretachique.com.br: did not receive HSTS header
-pretrialservices.gov: did not receive HSTS header
-prettygrouse.com: did not receive HSTS header
-prettyphotoart.de: did not receive HSTS header
-prettytunesapp.com: could not connect to host
-pretwolk.nl: max-age too low: 2592000
-pretzlaff.info: did not receive HSTS header
-prevention-formation.fr: did not receive HSTS header
-preventshare.com: could not connect to host
-preworkout.me: could not connect to host
-prgslab.net: could not connect to host
-priceholic.com: could not connect to host
-pricena.vn: did not receive HSTS header
-pricope-stefan.com: could not connect to host
-pridoc.se: did not receive HSTS header
-prifo.se: could not connect to host
-prihatno.my.id: could not connect to host
-prijsvergelijken.ml: could not connect to host
-prilock.com: did not receive HSTS header
-primecaplending.com: could not connect to host
-primordialsnooze.com: could not connect to host
-primos-tech.com: could not connect to host
-primotiles.co.uk: did not receive HSTS header
-prinbanat.ngo: did not receive HSTS header
-princeagency.com: could not connect to host
-princeofwhales.com: did not receive HSTS header
-princepessa.de: did not receive HSTS header
-princessbackpack.de: could not connect to host
-princessmargaretlotto.com: did not receive HSTS header
-principalsexam.com: could not connect to host
-principalship.net: could not connect to host
-principalstest.ph: could not connect to host
-printerest.io: could not connect to host
-printerinktoutlet.nl: could not connect to host
-printersonline.be: could not connect to host
-printertonerkopen.nl: could not connect to host
-printery.be: could not connect to host
-printexpress.cloud: could not connect to host
-printf.de: did not receive HSTS header
-printserverpa.com: could not connect to host
-priolkar.com: could not connect to host
-prism-communication.com: could not connect to host
-prismacloud.green: could not connect to host
-prismapayments.com: did not receive HSTS header
-pristineevents.co.uk: could not connect to host
-prisync.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-pritalk.com: could not connect to host
-pritchett.xyz: could not connect to host
-privacylabs.io: could not connect to host
-privacymanatee.com: could not connect to host
-privacyrup.net: could not connect to host
-privategiant.com: could not connect to host
-privatepokertour.com: could not connect to host
-privatewolke.com: did not receive HSTS header
-privatstunden.express: could not connect to host
-privcloud.cc: could not connect to host
-privcloud.org: could not connect to host
-privelust.nl: could not connect to host
-privilegevisa.fr: could not connect to host
-privu.me: could not connect to host
-privytime.com: could not connect to host
-prknje.com: did not receive HSTS header
-prmte.com: could not connect to host
-prnt.li: did not receive HSTS header
-pro-esb.net: could not connect to host
-pro-image.de: did not receive HSTS header
-pro-link.eu: did not receive HSTS header
-pro-netz.de: could not connect to host
-pro-zone.com: could not connect to host
-proact-it.co.uk: could not connect to host
-proactive.run: could not connect to host
-probase.ph: could not connect to host
-procens.us: could not connect to host
-proclubs.news: could not connect to host
-procode.gq: could not connect to host
-procrastinatingengineer.co.uk: could not connect to host
-procreditbank-kos.com: did not receive HSTS header
-procreditbank.com.al: did not receive HSTS header
-proculsk.tk: could not connect to host
-prodegree.com: could not connect to host
-prodigia.com: did not receive HSTS header
-prodottogiusto.com: could not connect to host
-prodpad.com: did not receive HSTS header
-productgap.com: could not connect to host
-productliabilityinsurance.online: did not receive HSTS header
-producto8.com: did not receive HSTS header
-productoinnovador.com: did not receive HSTS header
-proeftuinveenweiden.nl: max-age too low: 300
-proemployeeprotection.com: could not connect to host
-proemployeeprotection.net: could not connect to host
-proesb.net: could not connect to host
-proextra.com.br: did not receive HSTS header
-professional.cleaning: could not connect to host
-professionalboundaries.com: did not receive HSTS header
-profhome-shop.com: did not receive HSTS header
-profi-durchgangsmelder.de: did not receive HSTS header
-profilib.top: could not connect to host
-profinetz.de: could not connect to host
-profivps.com: could not connect to host
-profmetod.com: could not connect to host
-proformer.io: could not connect to host
-profpay.com: could not connect to host
-profundr.com: could not connect to host
-profusion.io: could not connect to host
-prog.sh: could not connect to host
-progenitor.space: did not receive HSTS header
-progettograjau.com: could not connect to host
-progg.no: could not connect to host
-progolfjourney.com: could not connect to host
-program-and.work: could not connect to host
-programlama.tk: could not connect to host
-programmingstudent.com: could not connect to host
-programsupport300procent.com: could not connect to host
-progress-technologies.com: could not connect to host
-progressivecfo.co.nz: could not connect to host
-prohostonline.fi: could not connect to host
-proitconsulting.com.au: could not connect to host
-proj.org.cn: could not connect to host
-proj3ct.me: could not connect to host
-project-rune.tech: could not connect to host
-project-sparks.eu: did not receive HSTS header
-project-stats.com: could not connect to host
-project.supply: did not receive HSTS header
-project86fashion.com: could not connect to host
-projectascension.io: did not receive HSTS header
-projectasterk.com: could not connect to host
-projectblackbook.us: did not receive HSTS header
-projectborealisgitlab.site: could not connect to host
-projectcastle.tech: did not receive HSTS header
-projectdp.net: did not receive HSTS header
-projectherogames.xyz: could not connect to host
-projectionpictures.com: did not receive HSTS header
-projectl1b1t1na.tk: could not connect to host
-projectmercury.space: max-age too low: 0
-projectte.ch: could not connect to host
-projecttools.info: did not receive HSTS header
-projectunity.io: could not connect to host
-projectx.top: could not connect to host
-projekt-allianz.de: did not receive HSTS header
-projekt-umbriel.de: could not connect to host
-projektik.cz: did not receive HSTS header
-projetoresecia.com: could not connect to host
-prok.pw: could not connect to host
-prokop.ovh: could not connect to host
-promarketer.net: could not connect to host
-promecon-gmbh.de: did not receive HSTS header
-promedicalapplications.com: could not connect to host
-promesa.net: did not receive HSTS header
-promhadan.com: could not connect to host
-promocao.email: could not connect to host
-promosjungle.com: did not receive HSTS header
-promoteiq.com: did not receive HSTS header
-promovite.com.mx: did not receive HSTS header
-promozione.info: did not receive HSTS header
-pronostic-king.fr: could not connect to host
-pronto-intervento.net: could not connect to host
-prontointerventofognature.roma.it: could not connect to host
-prontolight.com: did not receive HSTS header
-prontomovers.co.uk: could not connect to host
-proobec.cz: did not receive HSTS header
-propactrading.com: could not connect to host
-propagandism.org: did not receive HSTS header
-propepper.net: did not receive HSTS header
-properchels.com: could not connect to host
-propershave.com: could not connect to host
-propertycrawl.com: could not connect to host
-propertyfindercdn.com: could not connect to host
-proplan.co.il: did not receive HSTS header
-propmag.co: could not connect to host
-proposeinspain.net: could not connect to host
-prosenseit.com: could not connect to host
-prosharp.com.au: could not connect to host
-proslimdiets.com: could not connect to host
-prosocialmachines.com: could not connect to host
-prospanek.cz: did not receive HSTS header
-prosperandoemcasa.com.br: did not receive HSTS header
-prosperident.com: could not connect to host
-prosperus.ru: could not connect to host
-prostecheat.xyz: could not connect to host
-prostoporno.life: did not receive HSTS header
-prostoporno.live: did not receive HSTS header
-prostoporno.love: did not receive HSTS header
-prostoporno.net: did not receive HSTS header
-prostoporno.sexy: did not receive HSTS header
-prostoporno.video: did not receive HSTS header
-prostoporno.vip: did not receive HSTS header
-prot.ch: did not receive HSTS header
-proteapower.co.za: could not connect to host
-protecciondelconsumidor.gov: did not receive HSTS header
-proteinnuts.sk: did not receive HSTS header
-proto-online.ru: could not connect to host
-protonpix.com: did not receive HSTS header
-protoxin.net: could not connect to host
-provectus.de: could not connect to host
-providencecmc.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-provisionaldriving.com: could not connect to host
-provisionircd.tk: could not connect to host
-provitacare.com: could not connect to host
-provokator.co.il: did not receive HSTS header
-proweb.solutions: did not receive HSTS header
-proweser.de: did not receive HSTS header
-prowhisky.de: did not receive HSTS header
-proxbox.net: could not connect to host
-proxi.cf: could not connect to host
-proximato.com: could not connect to host
-proximityradio.fr: could not connect to host
-proxmox-airsonic.tk: did not receive HSTS header
-proxybay.al: could not connect to host
-proxybay.club: could not connect to host
-proxybay.eu.org: did not receive HSTS header
-proxybay.top: could not connect to host
-proxydesk.eu: could not connect to host
-proxydesk.net: could not connect to host
-proxyowl.pw: could not connect to host
-proxyportal.me: could not connect to host
-proxyportal.net: did not receive HSTS header
-proxyrox.com: could not connect to host
-proxyweb.us: did not receive HSTS header
-proyecto13.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-proyectosinelec.com: could not connect to host
-proymaganadera.com: did not receive HSTS header
-prplz.io: did not receive HSTS header
-prpsss.com: did not receive HSTS header
-prstatic.com: could not connect to host
-pruikshop.nl: could not connect to host
-pruma.com.br: could not connect to host
-prushka.ml: could not connect to host
-prxio.date: could not connect to host
-prxio.site: could not connect to host
-pryspry.com: did not receive HSTS header
-ps-provider.co.jp: could not connect to host
-ps-qa.com: did not receive HSTS header
-ps-w.ru: did not receive HSTS header
-ps-x.ru: could not connect to host
-ps4all.nl: could not connect to host
-ps5ssd.com: did not receive HSTS header
-psa.gov: did not receive HSTS header
-psauxit.com: could not connect to host
-psb.cloud: could not connect to host
-pscleaningsolutions.co.uk: could not connect to host
-pself.net: could not connect to host
-pseric.site: did not receive HSTS header
-pseudo.coffee: did not receive HSTS header
-psicanalista.milano.it: could not connect to host
-psicoexpansao.com.br: could not connect to host
-psicologia.co.ve: could not connect to host
-psicologoforensebarcelona.com: did not receive HSTS header
-psicologoforensemadrid.com: did not receive HSTS header
-psicosalud.online: could not connect to host
-psncardplus.be: could not connect to host
-psncardplus.com: could not connect to host
-psncardplus.dk: could not connect to host
-psncardplus.nl: could not connect to host
-psncardplus.se: could not connect to host
-psochecker.com: could not connect to host
-pson.ninja: could not connect to host
-psoriasischecker.com: could not connect to host
-pste.pw: did not receive HSTS header
-pstrozniak.com: could not connect to host
-pstudio.me: max-age too low: 0
-psw.academy: could not connect to host
-psw.consulting: could not connect to host
-psxtr.com: could not connect to host
-psychiatrie-betreuung.ch: could not connect to host
-psycho-lobby.com: could not connect to host
-psycho-lobby.fr: could not connect to host
-psycho.space: could not connect to host
-psychologie-hofner.at: could not connect to host
-psychologytests.tk: could not connect to host
-psychometrictest.africa: did not receive HSTS header
-psydix.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-psylab.cc: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-psynapse.net.au: could not connect to host
-ptab2pt.ga: could not connect to host
-pthsec.com: could not connect to host
-ptn.moscow: could not connect to host
-ptonet.com: did not receive HSTS header
-ptr.kr: could not connect to host
-ptrujillo.com: did not receive HSTS header
-pty.gg: could not connect to host
-pub-online.ro: could not connect to host
-pubean.com: could not connect to host
-pubgbattleworld.club: did not receive HSTS header
-pubkey.is: could not connect to host
-publications.qld.gov.au: did not receive HSTS header
-publicidadnovagrass.com.mx: could not connect to host
-publicinquiry.eu: did not receive HSTS header
-publick.net: did not receive HSTS header
-publicspeakingcamps.com: could not connect to host
-publikate.online: could not connect to host
-publimepa.it: could not connect to host
-publishingshack.com: did not receive HSTS header
-pubreviews.com: could not connect to host
-puchunguis.com: did not receive HSTS header
-puentes.info: could not connect to host
-puertasautomaticasgi.com: did not receive HSTS header
-pugilares.com.pl: could not connect to host
-pugliese.fr: could not connect to host
-puhe.se: could not connect to host
-puhka.me: could not connect to host
-puikheid.nl: did not receive HSTS header
-puli.com.br: could not connect to host
-pulizia.milano.it: could not connect to host
-pulledporkheaven.com: could not connect to host
-pulsar.guru: did not receive HSTS header
-pulsedursley.co.uk: did not receive HSTS header
-pulseroot.ga: could not connect to host
-pult.co: could not connect to host
-pumpandcash.com: could not connect to host
-pumpgames.net: could not connect to host
-punchkickinteractive.com: did not receive HSTS header
-punchr-kamikazee.rhcloud.com: could not connect to host
-puneflowermall.com: did not receive HSTS header
-punishment.institute: could not connect to host
-punitsheth.com: could not connect to host
-punkdns.top: could not connect to host
-punknews.org: could not connect to host
-punktpodparcia.pl: did not receive HSTS header
-puntacanalink.com: could not connect to host
-puntoseguro.com: did not receive HSTS header
-puppydns.com: did not receive HSTS header
-puq.moe: could not connect to host
-purahealthyliving.com: could not connect to host
-purbd.com: did not receive HSTS header
-purchasetncrash.gov: did not receive HSTS header
-purecabo.com: did not receive HSTS header
-purefreefrom.co.uk: did not receive HSTS header
-pureholisticliving.me: could not connect to host
-pureitsolutionsllp.com: could not connect to host
-purejewels.com: did not receive HSTS header
-purelunch.co.uk: could not connect to host
-pureluxemedical.com: did not receive HSTS header
-purenvi.ca: did not receive HSTS header
-purewebmasters.com: could not connect to host
-purikore.com: could not connect to host
-purplebricks.com: did not receive HSTS header
-purplegrapegames.com: did not receive HSTS header
-purplehippie.in: did not receive HSTS header
-purpleplains.net: could not connect to host
-purplez.pw: could not connect to host
-purpoz.com.br: could not connect to host
-purpspc.com: could not connect to host
-purrfect-box.co.uk: could not connect to host
-pusatinkubatorbayi.com: did not receive HSTS header
-push.world: did not receive HSTS header
-pushapp.org: did not receive HSTS header
-pushphp.com: could not connect to host
-pushrax.com: did not receive HSTS header
-pushstar.com: max-age too low: 0
-pusichatka.ddns.net: could not connect to host
-put-k-uspekhuy.tk: could not connect to host
-puttymonos.club: could not connect to host
-puzz.gg: could not connect to host
-puzz.me: could not connect to host
-pvagner.tk: did not receive HSTS header
-pwaresume.com: did not receive HSTS header
-pwd.ovh: could not connect to host
-pwe.vision: could not connect to host
-pwfrance.com: could not connect to host
-pwi.agency: could not connect to host
-pwm.jp: could not connect to host
-pwnedpass.tk: could not connect to host
-pwnsdx.pw: could not connect to host
-pwntr.com: did not receive HSTS header
-pwoss.xyz: could not connect to host
-pwt.pw: could not connect to host
-pxio.de: did not receive HSTS header
-pycoder.org: did not receive HSTS header
-pyol.org: could not connect to host
-pyopenssl.org: did not receive HSTS header
-pypi-mirrors.org: did not receive HSTS header
-pypi-status.org: could not connect to host
-pyplo.org: could not connect to host
-pypt.lt: did not receive HSTS header
-pyrios.pro: could not connect to host
-pyrotime.eu: did not receive HSTS header
-pyrrhonism.org: did not receive HSTS header
-pythia.nz: could not connect to host
-pythonic.guru: could not connect to host
-pythonic.training: could not connect to host
-pzme.me: could not connect to host
-q-rickroll-u.pw: could not connect to host
-q-tr.com: did not receive HSTS header
-q123123.com: could not connect to host
-q1q2q3.tk: could not connect to host
-q2.si: did not receive HSTS header
-q30365.com: could not connect to host
-q4profiles-france.com: could not connect to host
-q5118.com: could not connect to host
-q5197.co: could not connect to host
-q6729.co: could not connect to host
-q6729.com: did not receive HSTS header
-q6957.co: could not connect to host
-q6957.com: did not receive HSTS header
-q81365.com: did not receive HSTS header
-q81818.com: did not receive HSTS header
-q82365.com: did not receive HSTS header
-q8mp3.me: did not receive HSTS header
-q9297.co: could not connect to host
-q9397.com: did not receive HSTS header
-q9721.com: did not receive HSTS header
-q9728.co: could not connect to host
-qa-team.xyz: could not connect to host
-qabalah.jp: could not connect to host
-qabel.de: could not connect to host
-qacademy.com.au: did not receive HSTS header
-qadmium.com: could not connect to host
-qadmium.tk: did not receive HSTS header
-qamrulhaque.com: did not receive HSTS header
-qapital.com: did not receive HSTS header
-qaq.sh: could not connect to host
-qazcloud.com: could not connect to host
-qbeing.info: did not receive HSTS header
-qbik.de: did not receive HSTS header
-qbin.io: did not receive HSTS header
-qbnt.ca: could not connect to host
-qc.immo: could not connect to host
-qccqld.org.au: did not receive HSTS header
-qcloud.cz: did not receive HSTS header
-qdqlh.cn: could not connect to host
-qe2homelottery.com: did not receive HSTS header
-qensio.com: could not connect to host
-qforum.org: did not receive HSTS header
-qgblog.org: could not connect to host
-qgr.se: did not receive HSTS header
-qgustavor.tk: did not receive HSTS header
-qicomidadeverdade.com.br: could not connect to host
-qifu.org.cn: could not connect to host
-qingcao.org: did not receive HSTS header
-qingpat.com: could not connect to host
-qingxuan.info: could not connect to host
-qinxi1992.com: could not connect to host
-qionglu.pw: did not receive HSTS header
-qipl.org: could not connect to host
-qipp.com: did not receive HSTS header
-qirinus.com: could not connect to host
-qiu521119.host: could not connect to host
-qiuxian.ddns.net: could not connect to host
-qiwi.be: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-qixxit.de: did not receive HSTS header
-qklshequ.com: could not connect to host
-qkzy.net: could not connect to host
-qldconservation.org: could not connect to host
-qlinksgroup.com: did not receive HSTS header
-qnatek.org: could not connect to host
-qnickx.top: did not receive HSTS header
-qnq.moe: could not connect to host
-qnsgmd.com: could not connect to host
-qoacher.com: could not connect to host
-qonqa.de: did not receive HSTS header
-qoohoot.com: did not receive HSTS header
-qop.io: could not connect to host
-qoqo.us: could not connect to host
-qorm.co.uk: could not connect to host
-qpresentes.com.br: could not connect to host
-qq-navi.com: could not connect to host
-qq5197.co: could not connect to host
-qq52o.me: did not receive HSTS header
-qq6396.com: could not connect to host
-qq6729.co: could not connect to host
-qq6729.com: did not receive HSTS header
-qq6957.co: could not connect to host
-qq885.com: could not connect to host
-qq9297.co: could not connect to host
-qq9397.com: did not receive HSTS header
-qq9721.com: did not receive HSTS header
-qq9728.co: could not connect to host
-qqj.net: did not receive HSTS header
-qqq.gg: could not connect to host
-qqq63.com: could not connect to host
-qqvips.com: could not connect to host
-qqvrsmart.cn: could not connect to host
-qredo.com: did not receive HSTS header
-qrforex.com: did not receive HSTS header
-qrlending.com: could not connect to host
-qrlfinancial.com: could not connect to host
-qswoo.org: could not connect to host
-qto.com: could not connect to host
-qto.org: could not connect to host
-quadron.hu: did not receive HSTS header
-quaedam.org: could not connect to host
-quafe.tech: could not connect to host
-quail.solutions: could not connect to host
-quakerlens.com: could not connect to host
-qualitation.co.uk: did not receive HSTS header
-quality1.com.br: did not receive HSTS header
-qualityedgarsolutions.com: did not receive HSTS header
-qualityology.com: did not receive HSTS header
-quallo.com: did not receive HSTS header
-qualpay.biz: did not receive HSTS header
-quanglepro.com: could not connect to host
-quangngaimedia.com: did not receive HSTS header
-quanjinlong.cn: could not connect to host
-quantacloud.ch: could not connect to host
-quantenteranik.eu: could not connect to host
-quantor.dk: did not receive HSTS header
-quantum-cloud.xyz: could not connect to host
-quantum-ethics.com: could not connect to host
-quantum-lviv.pp.ua: could not connect to host
-quantumcore.cn: could not connect to host
-quantumcourse.org: did not receive HSTS header
-quantumfurball.net: did not receive HSTS header
-quantumtelecom.com.br: could not connect to host
-quantumwebs.co: could not connect to host
-quanwuji.com: could not connect to host
-quanyin.eu.org: did not receive HSTS header
-quarryhillrentals.com: did not receive HSTS header
-quarus.net: could not connect to host
-quchao.com: could not connect to host
-quebecmailbox.com: could not connect to host
-queenbrownie.com.br: could not connect to host
-queenmargaret.ddns.net: could not connect to host
-queens.lgbt: could not connect to host
-queenshaflo.com: could not connect to host
-queer.farm: could not connect to host
-queercinema.ch: could not connect to host
-quehacerencusco.com: did not receive HSTS header
-quelmandataire.fr: did not receive HSTS header
-quemeloquitan.com: could not connect to host
-queminventou.com.br: did not receive HSTS header
-quentinaurat.com: did not receive HSTS header
-queo.com.co: did not receive HSTS header
-querencia.online: did not receive HSTS header
-querkommentar.de: did not receive HSTS header
-quermail.com: did not receive HSTS header
-queryplayground.com: could not connect to host
-questionable.host: could not connect to host
-questions-admin.com: did not receive HSTS header
-questionyu.com: did not receive HSTS header
-questoj.cn: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-questsandrewards.com: could not connect to host
-quic.fr: could not connect to host
-quickandroid.tools: could not connect to host
-quickbookssupportphonenumber.us: did not receive HSTS header
-quickboysvrouwen2.nl: could not connect to host
-quickpayservice.com: could not connect to host
-quietboy.net: did not receive HSTS header
-quietus.gq: could not connect to host
-quikrmovies.to: could not connect to host
-quilmo.com: could not connect to host
-quimsertek.com: could not connect to host
-quintype.com: did not receive HSTS header
-quisido.com: did not receive HSTS header
-quitarlasmanchasde.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-quitimes.com: could not connect to host
-quitsmoking.coach: could not connect to host
-quizionic.com: could not connect to host
-quizl.io: could not connect to host
-quizmemes.org: could not connect to host
-quizogames.com: could not connect to host
-qunzi.la: could not connect to host
-quocdesign.ch: could not connect to host
-quotehex.com: could not connect to host
-quotemaster.co.za: could not connect to host
-quranserver.net: could not connect to host
-qwallet.ca: could not connect to host
-qwans.nl: did not receive HSTS header
-qwant.fr: did not receive HSTS header
-qwaser.fr: could not connect to host
-qwertyatom100.me: could not connect to host
-qwilink.me: could not connect to host
-qxy.ch: did not receive HSTS header
-qxzg.org: could not connect to host
-qxzgssr.xyz: could not connect to host
-qybot.cc: could not connect to host
-qybot.cn: could not connect to host
-r-ay.club: could not connect to host
-r-core.org: could not connect to host
-r-core.ru: could not connect to host
-r-cut.fr: could not connect to host
-r-rickroll-u.pw: could not connect to host
-r0t.co: could not connect to host
-r10n.com: did not receive HSTS header
-r15.me: could not connect to host
-r30365.com: could not connect to host
-r3bl.blog: could not connect to host
-r3bl.me: did not receive HSTS header
-r3nt3r.com: did not receive HSTS header
-r5197.co: could not connect to host
-r6729.co: could not connect to host
-r6729.com: did not receive HSTS header
-r6957.co: could not connect to host
-r6957.com: did not receive HSTS header
-r811.de: could not connect to host
-r81365.com: did not receive HSTS header
-r81818.com: did not receive HSTS header
-r82365.com: did not receive HSTS header
-r9297.co: could not connect to host
-r9397.com: did not receive HSTS header
-r9721.com: did not receive HSTS header
-r9728.co: could not connect to host
-ra.vc: could not connect to host
-ra4wvpn.com: did not receive HSTS header
-raajheshkannaa.com: could not connect to host
-rabbit.wales: could not connect to host
-rabbitvcactus.eu: did not receive HSTS header
-rabota-x.ru: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-rabotayes.ru: could not connect to host
-rabynska.eu: could not connect to host
-racasdecachorro.org: could not connect to host
-raccoon-music.com: did not receive HSTS header
-raceviewequestrian.com: did not receive HSTS header
-rachaelrussell.com: could not connect to host
-rachelchen.me: could not connect to host
-rachelsbouncycastles.co.uk: could not connect to host
-rachida-dati.eu: could not connect to host
-rachurch.net: did not receive HSTS header
-rackblue.com: could not connect to host
-racktear.com: could not connect to host
-racozo.com: did not receive HSTS header
-rad-route.de: could not connect to host
-rada-group.eu: could not connect to host
-radarnext.com: could not connect to host
-raddavarden.nu: could not connect to host
-radicaleducation.net: could not connect to host
-radins.com: did not receive HSTS header
-radioactivenetwork.xyz: could not connect to host
-radioafibra.com.br: could not connect to host
-radioh.no: did not receive HSTS header
-radioheaven.co.kr: did not receive HSTS header
-radiopolarniki.spb.ru: could not connect to host
-radior9.it: could not connect to host
-radiosdeguate.com: did not receive HSTS header
-radiumcode.com: could not connect to host
-radmehrco.com: did not receive HSTS header
-radom-pack.pl: could not connect to host
-radtke.bayern: could not connect to host
-rafaelcz.de: could not connect to host
-raffaelevinci.eu: did not receive HSTS header
-rafsis.com: did not receive HSTS header
-raft.pub: could not connect to host
-rage-overload.ch: could not connect to host
-rage.rip: could not connect to host
-raghavdua.in: could not connect to host
-raghughphotography.tk: could not connect to host
-ragnaroktop.com.br: could not connect to host
-rahadiana.com: could not connect to host
-rahamasin.eu: could not connect to host
-rai-co.net: could not connect to host
-raiblockscommunity.net: did not receive HSTS header
-raidstone.com: could not connect to host
-raidstone.rocks: could not connect to host
-raiffeisenzeitung.at: did not receive HSTS header
-railjob.cn: could not connect to host
-railto.com: did not receive HSTS header
-railwaytech.net: could not connect to host
-railyardurgentcare.com: did not receive HSTS header
-raimixmotoparts.com.br: did not receive HSTS header
-raimondos.com: did not receive HSTS header
-rainbin.com: did not receive HSTS header
-rainbow.pizza: could not connect to host
-rainbowbarracuda.com: could not connect to host
-rainbowsky.ru: did not receive HSTS header
-rainturtle.com: could not connect to host
-raipet.no-ip.biz: could not connect to host
-raito.ooo: could not connect to host
-raito.win: could not connect to host
-raitza.de: could not connect to host
-rajivshah.co.uk: did not receive HSTS header
-rajkapoordas.com: did not receive HSTS header
-rajyogarishikesh.com: did not receive HSTS header
-rakett.org: did not receive HSTS header
-rakugaki.cn: could not connect to host
-ralf-huebscher.de: did not receive HSTS header
-ralph.bike: did not receive HSTS header
-ralphwoessner.com: did not receive HSTS header
-ralvke.rocks: could not connect to host
-rambii.de: could not connect to host
-ramblingrf.tech: could not connect to host
-ramezanloo.com: did not receive HSTS header
-ramitmittal.com: could not connect to host
-ramon-c.nl: could not connect to host
-ramonj.nl: could not connect to host
-ramuel.com: did not receive HSTS header
-rancowar.com: could not connect to host
-randallbollig.com: did not receive HSTS header
-randewoo.ru: did not receive HSTS header
-randomcage.com: did not receive HSTS header
-randomcloud.net: could not connect to host
-randomdysfunctions.com: did not receive HSTS header
-randomhero.cloud: could not connect to host
-randomrepo.com: did not receive HSTS header
-randomwinpicker.de: could not connect to host
-randy.pw: could not connect to host
-ranegroup.hosting: could not connect to host
-rankthespot.com: could not connect to host
-ranktopay.com: did not receive HSTS header
-rannseier.org: did not receive HSTS header
-ranobe.club: could not connect to host
-ranos.org: could not connect to host
-ranson.com.au: could not connect to host
-rantanda.com: could not connect to host
-rante.com: did not receive HSTS header
-rany.duckdns.org: could not connect to host
-rany.int.eu.org: did not receive HSTS header
-rany.io: did not receive HSTS header
-rany.pw: could not connect to host
-ranyeh.co: could not connect to host
-rapdogg.com: could not connect to host
-raphaeladdile.com: could not connect to host
-raphaelmoura.ddns.net: could not connect to host
-raphaelschmid.eu: did not receive HSTS header
-rapidemobile.com: did not receive HSTS header
-rapidflow.io: could not connect to host
-rapidhubs.com: could not connect to host
-rapido.nu: could not connect to host
-rapidplumbingpenrith.com.au: could not connect to host
-rapidresearch.me: could not connect to host
-rapidshit.net: could not connect to host
-rapidthunder.io: could not connect to host
-rappet.de: could not connect to host
-rareative.com: could not connect to host
-rasing.me: could not connect to host
-raspass.me: did not receive HSTS header
-raspberry.us: could not connect to host
-raspberrypi.tv: did not receive HSTS header
-raspberryultradrops.com: did not receive HSTS header
-raspitec.ddns.net: could not connect to host
-rastasorganics.com: did not receive HSTS header
-rastreador.com.es: did not receive HSTS header
-rastreie.net: did not receive HSTS header
-ratajczak.fr: could not connect to host
-rate-esport.de: could not connect to host
-ratelsec.com: could not connect to host
-rathorian.fr: did not receive HSTS header
-ratinq.co: could not connect to host
-rationalops.com: could not connect to host
-rationem.nl: did not receive HSTS header
-ratuseks.com: could not connect to host
-ratuseks.net: could not connect to host
-ratuseks.us: could not connect to host
-raulfraile.net: could not connect to host
-rault.io: did not receive HSTS header
-rautelow.de: could not connect to host
-rautermods.net: did not receive HSTS header
-ravada-vdi.com: could not connect to host
-ravage.fm: could not connect to host
-raveboy.dyndns.org: could not connect to host
-raven.lipetsk.ru: could not connect to host
-ravengergaming.ga: could not connect to host
-ravengergaming.net: could not connect to host
-ravenx.me: could not connect to host
-raviparekh.co.uk: could not connect to host
-ravkr.duckdns.org: could not connect to host
-ravse.dk: could not connect to host
-raw-diets.com: could not connect to host
-rawcode.xyz: could not connect to host
-rawet.se: could not connect to host
-rawoil.com: could not connect to host
-rawr.sexy: could not connect to host
-rawstorieslondon.com: could not connect to host
-raxion.cf: could not connect to host
-raxion.tk: could not connect to host
-rayan-it.ir: did not receive HSTS header
-rayanitco.com: did not receive HSTS header
-raycarruthersphotography.co.uk: could not connect to host
-raydan.space: could not connect to host
-raydobe.me: could not connect to host
-raydolap.web.tr: did not receive HSTS header
-raymii.org: did not receive HSTS header
-raynoonanwindows.ie: did not receive HSTS header
-raytron.org: could not connect to host
-razberry.kr: could not connect to host
-raziskovalec-resnice.com: did not receive HSTS header
-razlaw.name: did not receive HSTS header
-razvanburz.net: could not connect to host
-razvodguru.ru: did not receive HSTS header
-razzolini.com.br: could not connect to host
-rb-china.net: could not connect to host
-rbcservicehub-uat.azurewebsites.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-rbd.events: could not connect to host
-rbhighinc.org: could not connect to host
-rbin.nl: could not connect to host
-rbmafrica.co.za: could not connect to host
-rbose.org: could not connect to host
-rbqcloud.com: could not connect to host
-rbti.me: could not connect to host
-rbtvshitstorm.is: could not connect to host
-rburchell.com: did not receive HSTS header
-rbx-talk.xyz: could not connect to host
-rbxcatalog.com: could not connect to host
-rc-respect.ru: did not receive HSTS header
-rc-rp.com: did not receive HSTS header
-rc4.io: could not connect to host
-rc7.ch: could not connect to host
-rca.ink: could not connect to host
-rca2015.ru: could not connect to host
-rcafox.com: could not connect to host
-rchavez.site: could not connect to host
-rchrdsn.uk: could not connect to host
-rcifsgapinsurance.co.uk: did not receive HSTS header
-rciliberto.com: did not receive HSTS header
-rcmlinx.com: could not connect to host
-rcmpsplib.com: could not connect to host
-rcoliveira.com: could not connect to host
-rcorporation.be: could not connect to host
-rcpcbd.com: could not connect to host
-rcra-uganda.org: did not receive HSTS header
-rcraigmurphy.net: could not connect to host
-rcsolutions.nl: could not connect to host
-rcvd.io: did not receive HSTS header
-rcx.io: could not connect to host
-rdactive.de: could not connect to host
-rdactive.net: could not connect to host
-rdfencingandgates.co.uk: could not connect to host
-rdfz.tech: could not connect to host
-rdns.im: did not receive HSTS header
-rdplumbingsolutions.com.au: did not receive HSTS header
-rdr2-rp-forum.de: did not receive HSTS header
-rdviitd.org: could not connect to host
-rdxsattamatka.mobi: could not connect to host
-rdyrda.fr: could not connect to host
-re-curi.com: did not receive HSTS header
-re-customer.net: could not connect to host
-re-wilding.com: could not connect to host
-reachonline.org: did not receive HSTS header
-reachr.com: could not connect to host
-reactdatepicker.com: did not receive HSTS header
-reactions.studio: did not receive HSTS header
-reactivarte.es: did not receive HSTS header
-reactivelambda.com: could not connect to host
-reactor92.com: could not connect to host
-read.sc: did not receive HSTS header
-reader.ga: could not connect to host
-readify.com.au: did not receive HSTS header
-readingandmath.org: could not connect to host
-readism.io: could not connect to host
-readitify.com: did not receive HSTS header
-readityourself.net: could not connect to host
-readmeeatmedrinkme.com: did not receive HSTS header
-readr.pw: could not connect to host
-readtldr.com: could not connect to host
-readydok.com: did not receive HSTS header
-readytobattle.net: did not receive HSTS header
-readytowear.es: could not connect to host
-readywithresourcestn.gov: could not connect to host
-reagir43.fr: did not receive HSTS header
-reaiaer.com: did not receive HSTS header
-reakyaweso.me: could not connect to host
-real-bits.com: could not connect to host
-real-compare.com: did not receive HSTS header
-realcli.com: could not connect to host
-realcolors.net: could not connect to host
-realfamilyincest.com: could not connect to host
-realfreedom.city: could not connect to host
-realgarant-shop.de: did not receive HSTS header
-realgear.net: did not receive HSTS header
-realhorsegirls.net: could not connect to host
-realhost.name: could not connect to host
-realincest.tv: could not connect to host
-realitea.co.uk: did not receive HSTS header
-realitycrazy.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-really-simple-plugins.com: did not receive HSTS header
-really.ai: could not connect to host
-really.io: could not connect to host
-reallycooljobs.ga: could not connect to host
-reallyreally.io: could not connect to host
-realmic.net: could not connect to host
-realmofespionage.com: could not connect to host
-realnewhomes.com: could not connect to host
-realraghavgupta.com: could not connect to host
-realtoraidan.com: could not connect to host
-realwoo.com: could not connect to host
-reapdrive.net: did not receive HSTS header
-reaper.rip: could not connect to host
-reardenporn.com: could not connect to host
-reath.me: did not receive HSTS header
-rebekaesgabor.online: could not connect to host
-rebel.services: could not connect to host
-rebelrebel.com.au: could not connect to host
-rebootmc.com: did not receive HSTS header
-recard.vn: did not receive HSTS header
-receitas-de-bolos.pt: could not connect to host
-receitasdebacalhau.pt: could not connect to host
-receptionsbook.com: could not connect to host
-recetasdecocinaideal.com: did not receive HSTS header
-recetasfacilesdehacer.com: did not receive HSTS header
-recettecookeo.net: did not receive HSTS header
-rechat.com: did not receive HSTS header
-rechenknaecht.de: could not connect to host
-rechenwerk.net: could not connect to host
-recht-freundlich.de: did not receive HSTS header
-rechtenliteratuurleiden.nl: could not connect to host
-reclamebureau-ultrax.nl: did not receive HSTS header
-recmon.hu: could not connect to host
-recoveryohio.gov: could not connect to host
-recreoviral.com: did not receive HSTS header
-recruitsecuritytraining.co.uk: could not connect to host
-recruitsecuritytraining.com: could not connect to host
-rectoraudiparts.com: could not connect to host
-recuerdafilms.com: did not receive HSTS header
-recuperatucuentaya.com: could not connect to host
-recyclebin.email: could not connect to host
-red-dead.life: did not receive HSTS header
-redactedmedia.org: could not connect to host
-redair.es: could not connect to host
-redar.xyz: could not connect to host
-redcarpets.in: did not receive HSTS header
-redchat.cz: could not connect to host
-redcomet.org: did not receive HSTS header
-redcone.net: could not connect to host
-reddepsicologosdecr.com: could not connect to host
-reddiseals.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-reddited.com: did not receive HSTS header
-rede.ca: did not receive HSTS header
-redelectrical.co.uk: did not receive HSTS header
-redespaulista.com: did not receive HSTS header
-redessantaluzia.com.br: did not receive HSTS header
-redheeler.com.br: could not connect to host
-redhorsemountainranch.com: did not receive HSTS header
-redicabo.de: could not connect to host
-redigest.it: could not connect to host
-redirectman.com: could not connect to host
-redit.com: did not receive HSTS header
-rediverge.com: did not receive HSTS header
-redizoo.com: did not receive HSTS header
-redlatam.org: did not receive HSTS header
-redletter.link: could not connect to host
-redmondoregon.gov: could not connect to host
-redneck-gaming.de: could not connect to host
-redner.cc: did not receive HSTS header
-rednertv.de: did not receive HSTS header
-rednoseday.com: did not receive HSTS header
-redoakmedia.net: did not receive HSTS header
-redpact.com: did not receive HSTS header
-redper.serveminecraft.net: could not connect to host
-redperegrine.com: did not receive HSTS header
-redphi.dedyn.io: could not connect to host
-redporno.cz: did not receive HSTS header
-redports.org: did not receive HSTS header
-redprice.by: could not connect to host
-redra.ws: could not connect to host
-redshell.pw: did not receive HSTS header
-redshield.co: did not receive HSTS header
-redshiftlabs.com.au: did not receive HSTS header
-redsquarelasvegas.com: could not connect to host
-redsquirrelcampsite.co.uk: did not receive HSTS header
-reducerin.ro: did not receive HSTS header
-redwhey.com: could not connect to host
-redwoodpaddle.es: did not receive HSTS header
-redwoodpaddle.pt: did not receive HSTS header
-redy.host: did not receive HSTS header
-redzonedaily.com: could not connect to host
-reemployks.gov: could not connect to host
-reensshop.com: could not connect to host
-reepay.com: did not receive HSTS header
-reeson.at: could not connect to host
-reeson.de: could not connect to host
-reeson.info: could not connect to host
-reeson.org: could not connect to host
-reevoo.com: did not receive HSTS header
-reezer.org: did not receive HSTS header
-referenten.org: did not receive HSTS header
-refficience.com: did not receive HSTS header
-refill-roboter.de: did not receive HSTS header
-refitplanner.com: could not connect to host
-reflectivity.io: did not receive HSTS header
-reflecton.io: could not connect to host
-reflexive-engineering.com: could not connect to host
-reflexive.xyz: could not connect to host
-reforesttheplanet.com: could not connect to host
-reformatreality.com: could not connect to host
-refresh-media.nl: did not receive HSTS header
-refreshingserum.com: could not connect to host
-refuelcollective.com: did not receive HSTS header
-refuelcreative.com.au: did not receive HSTS header
-reg.ru: did not receive HSTS header
-regain.us: did not receive HSTS header
-regaloaks.com: could not connect to host
-regalpaintingfdl.com: could not connect to host
-regalpalms.com: did not receive HSTS header
-regasportshop.it: could not connect to host
-regateoapp.com: could not connect to host
-regenbogenwald.de: did not receive HSTS header
-regendevices.eu: could not connect to host
-reggae-cdmx.com: could not connect to host
-regily.com: did not receive HSTS header
-regime-anticellulite.com: could not connect to host
-regime-maigrir-vite.com: could not connect to host
-regimebonheur.com: could not connect to host
-regimecellulite.com: did not receive HSTS header
-reginagroffy.com: could not connect to host
-regio-salland.nl: could not connect to host
-regionalcoalition.org: did not receive HSTS header
-regionale.org: did not receive HSTS header
-register.gov.uk: did not receive HSTS header
-registertovoteflorida.gov: did not receive HSTS header
-registrar.io: could not connect to host
-regnix.net: could not connect to host
-regoul.com: did not receive HSTS header
-regresionavidaspasadas.com: did not receive HSTS header
-regsec.com: could not connect to host
-regularizaeudora.com.br: could not connect to host
-rehabilitation.network: could not connect to host
-rehabmail.com: did not receive HSTS header
-rehabphilippines.com: could not connect to host
-rehabreviews.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-rehabthailand.nl: could not connect to host
-reher.pro: could not connect to host
-rehobothma.gov: did not receive HSTS header
-rei.codes: could not connect to host
-reic.me: could not connect to host
-reidascuecas.com.br: could not connect to host
-reidsupply.com: did not receive HSTS header
-reignsphere.net: could not connect to host
-reikiqueen.uk: could not connect to host
-reinaertvandecruys.me: could not connect to host
-reineberthe.ch: could not connect to host
-reinhard.codes: did not receive HSTS header
-reinhardtsgermanautorepair.com: did not receive HSTS header
-reinoldus.ddns.net: could not connect to host
-reisekosten-gorilla.com: did not receive HSTS header
-reismil.ch: could not connect to host
-reisslittle.com: could not connect to host
-reisyukaku.org: did not receive HSTS header
-reithguard-it.de: did not receive HSTS header
-rejo.in: could not connect to host
-rejoice1009.com: did not receive HSTS header
-rejsehuskelisten.dk: did not receive HSTS header
-rejushiiplotter.ru: could not connect to host
-rejuvemedspa.com: did not receive HSTS header
-rekonstrukcestatu.cz: did not receive HSTS header
-relates.link: did not receive HSTS header
-relatic.net: could not connect to host
-relayawards.com: could not connect to host
-relaybox.io: could not connect to host
-reldoc.com.mx: did not receive HSTS header
-releasetimes.io: could not connect to host
-reliable-mail.de: could not connect to host
-reliant3sixty.com: could not connect to host
-religiousforums.com: did not receive HSTS header
-relisten.nl: did not receive HSTS header
-rellmusic.com: max-age too low: 0
-relocatefeds.gov: could not connect to host
-relojesseiko.es: did not receive HSTS header
-relvan.com: could not connect to host
-relvan.tech: could not connect to host
-rem.pe: could not connect to host
-rema.site: could not connect to host
-remachadoras.club: did not receive HSTS header
-remain.london: could not connect to host
-remedee.com: did not receive HSTS header
-remedica.fr: could not connect to host
-remedioparaherpes.com: could not connect to host
-remedios-caserospara.com: did not receive HSTS header
-remedioscaserosparalacistitis.com: did not receive HSTS header
-remedium.de: could not connect to host
-remedyrecoverymat.com: could not connect to host
-remedyrehab.com: could not connect to host
-remejeanne.com: could not connect to host
-remembermidi.sytes.net: could not connect to host
-rememberthis.co.za: could not connect to host
-remodela.com.ve: could not connect to host
-remodelingfy.com: could not connect to host
-remodelwithlegacy.com: did not receive HSTS header
-remontpc.cf: could not connect to host
-remonttitekniikka.fi: could not connect to host
-remotestance.com: did not receive HSTS header
-removalcellulite.com: could not connect to host
-removedrepo.com: could not connect to host
-remszeitung.de: did not receive HSTS header
-renascentia.asia: did not receive HSTS header
-rencaijia.com: did not receive HSTS header
-rencontres-erotiques.com: did not receive HSTS header
-rene-guitton.fr: did not receive HSTS header
-renee.today: could not connect to host
-renefloresphotography.com: could not connect to host
-renesauerwein.com: could not connect to host
-renesauerwein.de: could not connect to host
-renewedhopefc.com: could not connect to host
-renewgsa.com: could not connect to host
-rengarenkblog.com: could not connect to host
-renideo.fr: could not connect to host
-renkhosting.com: could not connect to host
-renlong.org: did not receive HSTS header
-rennfire.org: could not connect to host
-renovandoingresos.com: could not connect to host
-renrenss.com: could not connect to host
-renscreations.com: did not receive HSTS header
-rentacarcluj.xyz: could not connect to host
-rentalmed.com.br: did not receive HSTS header
-rentaways.com: could not connect to host
-rentayventadecarpas.com: did not receive HSTS header
-rentbrowser.com: could not connect to host
-rentbrowsertrain.me: could not connect to host
-rentcarassist.com: could not connect to host
-renteater.com: could not connect to host
-rentex.com: did not receive HSTS header
-rentta.fashion: did not receive HSTS header
-renxinge.cn: could not connect to host
-repair.by: did not receive HSTS header
-reparatii-injectoare-buzau.com: did not receive HSTS header
-reparo.pe: did not receive HSTS header
-repex.co.il: could not connect to host
-replace.ninja: could not connect to host
-replaceits.me: could not connect to host
-replacemychina.com: could not connect to host
-replikatelefon.tk: could not connect to host
-report-incident.de: could not connect to host
-report-to.com: did not receive HSTS header
-report-to.io: did not receive HSTS header
-report-uri.io: did not receive HSTS header
-report-url.com: did not receive HSTS header
-report-url.io: did not receive HSTS header
-reported.ly: did not receive HSTS header
-reporturi.com: did not receive HSTS header
-reporturi.io: did not receive HSTS header
-reporturl.com: did not receive HSTS header
-reporturl.io: did not receive HSTS header
-reposaarenkuva.fi: could not connect to host
-reprolife.co.uk: could not connect to host
-reprowesty.com: did not receive HSTS header
-reptilauksjonen.no: could not connect to host
-republicanwhip.gov: did not receive HSTS header
-republicmo.gov: did not receive HSTS header
-repustate.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-reputatiedesigners.nl: did not receive HSTS header
-reqognize.com: did not receive HSTS header
-reqrut.net: did not receive HSTS header
-requena.tv: did not receive HSTS header
-request-trent.com: did not receive HSTS header
-res-kc.com: did not receive HSTS header
-res-rheingau.de: could not connect to host
-res42.com: could not connect to host
-resc.la: could not connect to host
-research.md: could not connect to host
-researchbyaxia.com: did not receive HSTS header
-reseponline.info: did not receive HSTS header
-reserve-online.net: did not receive HSTS header
-reservetonshift.com: could not connect to host
-reservoirtp.fr: did not receive HSTS header
-resfriatech.com.br: did not receive HSTS header
-residentiallocksmithsanantoniotx.com: did not receive HSTS header
-residentialmortgageholdings.com: could not connect to host
-residentsinsurance.co.uk: did not receive HSTS header
-resistav.com: could not connect to host
-resl20.servehttp.com: could not connect to host
-resolvergroup.com.au: did not receive HSTS header
-resoundpro.ca: could not connect to host
-respice.xyz: could not connect to host
-ressos.com: did not receive HSTS header
-restaurace-klokocka.cz: did not receive HSTS header
-restaurant-mangal.ch: could not connect to host
-restaurant-rosengarten.at: could not connect to host
-restaurantemiperu.com: did not receive HSTS header
-restaurantesimonetti.com.br: could not connect to host
-restaurantguru.com: did not receive HSTS header
-restaurantmaan.nl: did not receive HSTS header
-restaurantmangal.ch: could not connect to host
-restchart.com: did not receive HSTS header
-rester-a-domicile.ch: could not connect to host
-rester-autonome-chez-soi.ch: could not connect to host
-restioson.me: could not connect to host
-restopro.nyc: could not connect to host
-restore-aid.com: did not receive HSTS header
-restoreresearchstudy.com: could not connect to host
-resultsdate.news: could not connect to host
-resumeprime.com: did not receive HSTS header
-retcor.net: could not connect to host
-retefrati.it: could not connect to host
-retetenoi.net: could not connect to host
-reth.ch: could not connect to host
-retidurc.fr: did not receive HSTS header
-retireyourpassword.org: did not receive HSTS header
-retogroup.com: could not connect to host
-retro.rocks: could not connect to host
-retrojar.top: could not connect to host
-retronet.nl: could not connect to host
-retropage.co: did not receive HSTS header
-retrowave.eu: did not receive HSTS header
-rets.org.br: did not receive HSTS header
-retube.ga: could not connect to host
-returnofwar.com: could not connect to host
-returnonerror.com: could not connect to host
-returnpath.com: did not receive HSTS header
-reulitz.de: could not connect to host
-reuna.me: could not connect to host
-reussir-ma-fete.fr: could not connect to host
-reuter-shop.com: did not receive HSTS header
-revapost.ch: could not connect to host
-revealglobally.com: did not receive HSTS header
-revelaciones.tv: could not connect to host
-revello.org: did not receive HSTS header
-reverie.pw: could not connect to host
-reverse.design: could not connect to host
-revhost-consulting.fr: did not receive HSTS header
-reviderm-skinmedics-rheinbach.de: did not receive HSTS header
-review.info: could not connect to host
-reviewjust.com: did not receive HSTS header
-reviewmed-215418.appspot.com: did not receive HSTS header
-reviewspedia.org: could not connect to host
-reviewu.ca: could not connect to host
-revistapequenosolhares.com.br: could not connect to host
-revistasomos.com: could not connect to host
-revivalsstores.com: did not receive HSTS header
-revolt.tv: did not receive HSTS header
-revolta-hosting.fr: did not receive HSTS header
-revolucionfemenina.com: could not connect to host
-revolutionhive.com: could not connect to host
-revthefox.co.uk: did not receive HSTS header
-revtut.net: could not connect to host
-revuestarlight.me: could not connect to host
-rewopit.net: could not connect to host
-rewrite3.com: could not connect to host
-rewtherealtor.com: did not receive HSTS header
-rex.st: could not connect to host
-rexhockingkelpies.com.au: did not receive HSTS header
-reyesfernando.com: max-age too low: 0
-reykjavik.guide: could not connect to host
-rezaaryo.id: did not receive HSTS header
-rezendemultimarcas.com.br: could not connect to host
-rezenfitness.com: did not receive HSTS header
-rezexpert.com: did not receive HSTS header
-rezosup.net: could not connect to host
-rezosup.org: could not connect to host
-rf.tn: could not connect to host
-rfeif.org: could not connect to host
-rfitness.dk: did not receive HSTS header
-rftoon.com: could not connect to host
-rfxt.com: did not receive HSTS header
-rgavmf.ru: did not receive HSTS header
-rgservers.com: did not receive HSTS header
-rhapsodhy.hu: could not connect to host
-rhdigital.pro: could not connect to host
-rheijmans.com: could not connect to host
-rheijmans.email: could not connect to host
-rheijmans.xyz: could not connect to host
-rheinturm.nrw: could not connect to host
-rheocube.com: did not receive HSTS header
-rhering.de: could not connect to host
-rheuma-online.de: could not connect to host
-rhnet.at: could not connect to host
-rhodes.ml: could not connect to host
-rhodesianridgeback.com.br: could not connect to host
-rhodosdreef.nl: could not connect to host
-rhondanp.com: did not receive HSTS header
-rhycloud.com: did not receive HSTS header
-rhymc.com: could not connect to host
-rhypehost.com: could not connect to host
-ribeirostore.com.br: did not receive HSTS header
-ribopierre.fr: could not connect to host
-ribs.com: did not receive HSTS header
-ricci-ingenieria.com: could not connect to host
-riceglue.com: did not receive HSTS header
-richamorindonesia.com: did not receive HSTS header
-richardb.me: could not connect to host
-richardfeinbergdds.com: did not receive HSTS header
-richardhering.de: did not receive HSTS header
-richardramos.me: could not connect to host
-richeza.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-richie.link: did not receive HSTS header
-richieheijmans.io: could not connect to host
-richiemail.net: could not connect to host
-richlj.com: did not receive HSTS header
-richmtdriver.com: could not connect to host
-richonrails.com: did not receive HSTS header
-richsiciliano.com: could not connect to host
-richterphilipp.com: could not connect to host
-richtoinfinity.com: did not receive HSTS header
-rickmartensen.nl: could not connect to host
-ricknox.com: could not connect to host
-ricky.capital: could not connect to host
-rickycbenitez.com: did not receive HSTS header
-rico.ovh: could not connect to host
-ricozienke.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-rid-wan.com: could not connect to host
-riddickthemovie.tk: could not connect to host
-riddims.co: did not receive HSTS header
-ride-up.com: did not receive HSTS header
-rideaudiscount.com: did not receive HSTS header
-rideforwade.com: could not connect to host
-rideforwade.net: could not connect to host
-rideforwade.org: could not connect to host
-rideintaxi.com: could not connect to host
-rideways.com: did not receive HSTS header
-rideworks.com: did not receive HSTS header
-ridgelandchurch.org: did not receive HSTS header
-ridingoklahoma.com: could not connect to host
-ridvan-vllasaliu.tk: could not connect to host
-ridwan.co: could not connect to host
-riechsteiner.tech: could not connect to host
-riederle.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-riemer.ml: did not receive HSTS header
-riemzac.com: could not connect to host
-rienasemettre.fr: did not receive HSTS header
-riesenmagnete.de: could not connect to host
-riester.pl: did not receive HSTS header
-rifkivalkry.net: did not receive HSTS header
-rigabeerbike.lv: could not connect to host
-right-to-love.name: did not receive HSTS header
-right2.org: could not connect to host
-rightcapital.com: did not receive HSTS header
-rightfold.io: could not connect to host
-rightpol.com: could not connect to host
-righttoknow.ie: did not receive HSTS header
-rigolitch.fr: did not receive HSTS header
-rijndael.xyz: did not receive HSTS header
-rijnmondeg.nl: did not receive HSTS header
-rika.me: did not receive HSTS header
-rileyevans.co.uk: could not connect to host
-rileyskains.com: could not connect to host
-rimediogiusto.com: could not connect to host
-rincon-nsn.gov: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-rincondenoticas.com: could not connect to host
-ring.com: did not receive HSTS header
-ring0.xyz: did not receive HSTS header
-ringh.am: could not connect to host
-rinj.se: could not connect to host
-rinprom.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-rionewyork.com.br: could not connect to host
-rioxmarketing.com: could not connect to host
-ripple.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-rippleunion.com: could not connect to host
-riptoforex.com: could not connect to host
-riqy86.nl: could not connect to host
-risi-china.com: could not connect to host
-risingsun.red: could not connect to host
-riskcategory.com: could not connect to host
-riskmgt.com.au: could not connect to host
-riskmitigation.ch: did not receive HSTS header
-rissato.com.br: did not receive HSTS header
-ristorantefattoamano.eu: could not connect to host
-ristoviitanen.fi: could not connect to host
-ritaohio.gov: could not connect to host
-riteway.rocks: could not connect to host
-ritewayconcrete.com: could not connect to host
-rithm.ch: did not receive HSTS header
-ritsu-life.com: could not connect to host
-rittis.ru: did not receive HSTS header
-ritualesyamarresdelamor.com: could not connect to host
-ritzlux.com.tw: could not connect to host
-rivagecare.it: did not receive HSTS header
-riverbendessentialoil.com: did not receive HSTS header
-rivermendhealthcenters.com: did not receive HSTS header
-riversideauto.net: did not receive HSTS header
-riversideiowa.gov: did not receive HSTS header
-riverstyxgame.com: could not connect to host
-riverviewcourtapts.com: did not receive HSTS header
-rivlo.com: could not connect to host
-rivy.org: did not receive HSTS header
-rixter.com: could not connect to host
-rixzz.ovh: could not connect to host
-rizoma.tech: could not connect to host
-rizonrice.club: did not receive HSTS header
-rj.gg: could not connect to host
-rjnutrition.consulting: did not receive HSTS header
-rk.mk: could not connect to host
-rk12.de: could not connect to host
-rk6.cz: could not connect to host
-rkc-hygrotherm.de: did not receive HSTS header
-rkkhok.hu: did not receive HSTS header
-rkmantpur.org: did not receive HSTS header
-rkmedia.no: could not connect to host
-rle.me: did not receive HSTS header
-rlnunez.com: could not connect to host
-rmaqequipamentos.com.br: could not connect to host
-rmdlingerie.com.br: did not receive HSTS header
-rme.li: did not receive HSTS header
-rmf.io: could not connect to host
-rmi.com.ar: did not receive HSTS header
-rmit.me: could not connect to host
-rmk.si: could not connect to host
-rmpsolution.de: did not receive HSTS header
-rms-digicert.ne.jp: could not connect to host
-rms.sexy: could not connect to host
-rmsides.com: did not receive HSTS header
-rn29.me: could not connect to host
-rndconceptsourcing.solutions: could not connect to host
-rnt.cl: did not receive HSTS header
-roadfeast.com: could not connect to host
-roadtopgm.com: could not connect to host
-roave.com: did not receive HSTS header
-rob.uk.com: did not receive HSTS header
-robert-foster.com: did not receive HSTS header
-robert-wiek-transporte.de: could not connect to host
-robertabittle.com: could not connect to host
-robertayamashita.com: could not connect to host
-robertayamashita.com.br: could not connect to host
-robertcrain.com.au: did not receive HSTS header
-robertg.me: could not connect to host
-roberto-webhosting.nl: could not connect to host
-robertses.org: could not connect to host
-robertsonsalts.info: could not connect to host
-robi-net.it: could not connect to host
-robin-novotny.com: could not connect to host
-robin.io: did not receive HSTS header
-robinadr.com: did not receive HSTS header
-robinfrancq.ml: could not connect to host
-robinloeffel.ch: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-robinsonstrategy.com: could not connect to host
-robinvdmarkt.nl: could not connect to host
-roboex.net: could not connect to host
-robomonkey.org: could not connect to host
-robot.works: did not receive HSTS header
-roboth.am: could not connect to host
-robotham.org: could not connect to host
-robotics.plus: did not receive HSTS header
-robototes.com: could not connect to host
-robottip.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-robsalmon.me.uk: did not receive HSTS header
-robtatemusic.com: could not connect to host
-robteix.com: did not receive HSTS header
-robtex.net: did not receive HSTS header
-robtex.org: did not receive HSTS header
-robust.ga: could not connect to host
-robuxemporium.com: could not connect to host
-roc.net.au: could not connect to host
-rochcloud.cf: could not connect to host
-rochman.id: did not receive HSTS header
-rockbankland.com.au: could not connect to host
-rockcellar.ch: could not connect to host
-rockenfuerlachenhelfen.de: did not receive HSTS header
-rockerchyc.com: did not receive HSTS header
-rocket-wars.de: did not receive HSTS header
-rocketgnomes.com: could not connect to host
-rocketnet.ml: did not receive HSTS header
-rockeyscrivo.com: did not receive HSTS header
-rockmyshoes.co.uk: did not receive HSTS header
-rocksberg.net: could not connect to host
-rockuse.com.br: did not receive HSTS header
-rockz.io: did not receive HSTS header
-rodab.party: could not connect to host
-rodafe.sk: could not connect to host
-rodarion.pl: could not connect to host
-roddis.net: could not connect to host
-rodehutskors.net: could not connect to host
-rodinneodpoledne2018.cz: could not connect to host
-rodney.id.au: did not receive HSTS header
-rodneybrooksjr.com: could not connect to host
-rodosto.com: did not receive HSTS header
-rodzina-kupiec.eu.org: did not receive HSTS header
-roelbazuin.com: could not connect to host
-roeldevries.me: did not receive HSTS header
-roeleveld.nl: did not receive HSTS header
-roelf.org: did not receive HSTS header
-roeljoyas.com: did not receive HSTS header
-roeper.party: could not connect to host
-roesemann.email: could not connect to host
-rofai.biz: did not receive HSTS header
-roffe.nu: did not receive HSTS header
-roflcopter.fr: did not receive HSTS header
-rofrank.space: could not connect to host
-rogeiro.net: could not connect to host
-roger101.com: did not receive HSTS header
-rogerbertrand.com: could not connect to host
-rogerdat.ovh: could not connect to host
-rogue-e.xyz: could not connect to host
-roguefinancial.com: did not receive HSTS header
-roguetechhub.org: could not connect to host
-rohanbassett.com: could not connect to host
-roketix.co.uk: did not receive HSTS header
-roksolana.be: could not connect to host
-rolandinsh.com: did not receive HSTS header
-rolandlips.com: could not connect to host
-rolandslate.com: did not receive HSTS header
-rolemaster.net: did not receive HSTS header
-roleplayhome.com: could not connect to host
-rolfsbuss.se: did not receive HSTS header
-rollatorweb.nl: did not receive HSTS header
-rollercoasteritalia.it: did not receive HSTS header
-rollingstocks.tk: could not connect to host
-rolliwelt.de: could not connect to host
-rolobio.com: max-age too low: 3600
-rolroer.co.za: could not connect to host
-romaimperator.com: could not connect to host
-romainmuller.xyz: did not receive HSTS header
-romano.guru: could not connect to host
-romans-place.me.uk: did not receive HSTS header
-romantic-quotes.co.uk: could not connect to host
-romanticasfm.com: did not receive HSTS header
-romanticfirstdance.com: did not receive HSTS header
-romanticschemermovie.com: could not connect to host
-romar-bos.nl: could not connect to host
-romastantra.com: could not connect to host
-romeoferraris.com: did not receive HSTS header
-romleg.cf: could not connect to host
-roms.fun: did not receive HSTS header
-romulusapp.com: could not connect to host
-romy.tw: could not connect to host
-ron2k.za.net: did not receive HSTS header
-ronanrbr.com: did not receive HSTS header
-ronbongamis.com: could not connect to host
-rondoniatec.com.br: did not receive HSTS header
-rondreis-planner.nl: did not receive HSTS header
-ronghexx.com: could not connect to host
-ronniemossel.nl: max-age too low: 0
-ronnytito.com: did not receive HSTS header
-ronvandordt.info: did not receive HSTS header
-ronwo.de: could not connect to host
-ronzertnert.xyz: could not connect to host
-roo.ie: could not connect to host
-roohanionlinespiritualhelp.co.uk: did not receive HSTS header
-rool.me: did not receive HSTS header
-roolevoi.ru: did not receive HSTS header
-room-checkin24.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-room2d.com: did not receive HSTS header
-roomguide.info: did not receive HSTS header
-roomongo.com: did not receive HSTS header
-rooselaers.com: could not connect to host
-roosta.xyz: could not connect to host
-roosterpgplus.nl: could not connect to host
-rootbsd.at: could not connect to host
-rootforum.org: did not receive HSTS header
-rootkit.es: did not receive HSTS header
-rootrelativity.com: could not connect to host
-rootsbar.fr: could not connect to host
-rootservice.org: did not receive HSTS header
-rootspersona.com: did not receive HSTS header
-rootwpn.com: could not connect to host
-rop.io: did not receive HSTS header
-roquecenter.org: did not receive HSTS header
-roromendut.online: could not connect to host
-rorymcdaniel.com: could not connect to host
-rosemariefloydballet.com: could not connect to host
-roseofyork.com: did not receive HSTS header
-roseofyorkbooking.com: could not connect to host
-rosetiger.life: could not connect to host
-rosewoodranch.com: did not receive HSTS header
-roshiya.co.in: could not connect to host
-rosihui.com: did not receive HSTS header
-rosimms.com: did not receive HSTS header
-rospa100.com: did not receive HSTS header
-rossclark.com: did not receive HSTS header
-rossen.be: did not receive HSTS header
-rossfrancis.co.uk: did not receive HSTS header
-rossilber.com: did not receive HSTS header
-rosslug.org.uk: could not connect to host
-rostros.eu: could not connect to host
-rotapalor.com: did not receive HSTS header
-rotex1840.de: did not receive HSTS header
-rothnater.ch: did not receive HSTS header
-rotter-dam.nl: did not receive HSTS header
-rotterdamjazz.info: could not connect to host
-rottie.xyz: did not receive HSTS header
-rottipowah.com: did not receive HSTS header
-rotzonline.com: could not connect to host
-rough.nu: could not connect to host
-roundaboutweb.info: did not receive HSTS header
-rous.se: could not connect to host
-rout0r.org: could not connect to host
-routeragency.com: did not receive HSTS header
-routercncperu.com: could not connect to host
-routetracker.co: could not connect to host
-rouvray.org: did not receive HSTS header
-rove3d.com: could not connect to host
-rows.io: did not receive HSTS header
-royal-forest.org: max-age too low: 0
-royal-mangal.ch: could not connect to host
-royal71.com: did not receive HSTS header
-royal72.com: did not receive HSTS header
-royal806.com: did not receive HSTS header
-royal810.com: did not receive HSTS header
-royal811.com: did not receive HSTS header
-royal812.com: did not receive HSTS header
-royal813.com: did not receive HSTS header
-royal816.com: did not receive HSTS header
-royal817.com: did not receive HSTS header
-royal830.com: could not connect to host
-royal850.com: did not receive HSTS header
-royal851.com: did not receive HSTS header
-royal852.com: did not receive HSTS header
-royal855.com: did not receive HSTS header
-royal856.com: did not receive HSTS header
-royal857.com: did not receive HSTS header
-royal859.com: did not receive HSTS header
-royal86.com: did not receive HSTS header
-royal861.com: could not connect to host
-royal862.com: could not connect to host
-royal863.com: could not connect to host
-royal865.com: did not receive HSTS header
-royal867.com: could not connect to host
-royal868.com: did not receive HSTS header
-royal871.com: could not connect to host
-royal872.com: could not connect to host
-royal873.com: could not connect to host
-royal875.com: could not connect to host
-royal876.com: could not connect to host
-royal877.com: did not receive HSTS header
-royal879.com: could not connect to host
-royal88.tech: did not receive HSTS header
-royal881.com: did not receive HSTS header
-royal882.com: did not receive HSTS header
-royal883.com: did not receive HSTS header
-royal885.com: did not receive HSTS header
-royal886.com: did not receive HSTS header
-royal887.com: did not receive HSTS header
-royal888888.com: did not receive HSTS header
-royal889.com: did not receive HSTS header
-royal890.com: could not connect to host
-royal891.com: could not connect to host
-royal892.com: could not connect to host
-royal893.com: could not connect to host
-royal894.com: could not connect to host
-royal895.com: could not connect to host
-royal896.com: did not receive HSTS header
-royal898.com: did not receive HSTS header
-royal899.com: did not receive HSTS header
-royalbeautyclinic.ir: did not receive HSTS header
-royalbuffetdijon.fr: did not receive HSTS header
-royalcitytaxi.ca: could not connect to host
-royalfoxrealtor.com: could not connect to host
-royalhop.co: could not connect to host
-royalpalacenogent.fr: did not receive HSTS header
-royalpub.net: did not receive HSTS header
-royalsignaturecruise.com: could not connect to host
-royalty-market.com: could not connect to host
-royalyule.com: could not connect to host
-royjr.com: did not receive HSTS header
-roys.design: could not connect to host
-royzez.com: could not connect to host
-rozalisbengal.ro: could not connect to host
-rozalynne-dawn.ga: could not connect to host
-rozeapp.nl: could not connect to host
-rp2018.co.uk: could not connect to host
-rpasafrica.com: could not connect to host
-rpauto.ru: could not connect to host
-rpgchan.cf: could not connect to host
-rphl.net: could not connect to host
-rprevost.fr: did not receive HSTS header
-rr.in.th: did not receive HSTS header
-rr105.de: did not receive HSTS header
-rr5197.co: could not connect to host
-rr6729.co: could not connect to host
-rr6729.com: did not receive HSTS header
-rr6957.co: could not connect to host
-rr9297.co: could not connect to host
-rr9397.com: did not receive HSTS header
-rr9721.com: did not receive HSTS header
-rr9728.co: could not connect to host
-rrbts.com: could not connect to host
-rring.me: could not connect to host
-rritv.com: could not connect to host
-rrke.cc: could not connect to host
-rro.rs: could not connect to host
-rrom.me: did not receive HSTS header
-rs-cloud.ddns.net: could not connect to host
-rs-devdemo.host: could not connect to host
-rsajeey.info: could not connect to host
-rsampaio.info: could not connect to host
-rsauget.fr: could not connect to host
-rsblake.net: could not connect to host
-rsearch.co: did not receive HSTS header
-rsf.io: could not connect to host
-rsgcard.com: could not connect to host
-rsi.im: could not connect to host
-rskuipers.com: did not receive HSTS header
-rsldb.com: could not connect to host
-rsm-intern.de: could not connect to host
-rsm-liga.de: did not receive HSTS header
-rsmaps.org: could not connect to host
-rsmmail.com: could not connect to host
-rsships.com: could not connect to host
-rssnews.world: could not connect to host
-rssr.ddns.net: could not connect to host
-rstraining.co.uk: max-age too low: 604800
-rstsecuritygroup.co.uk: could not connect to host
-rt.com: could not connect to host
-rt1314.xyz: did not receive HSTS header
-rtate.ca: could not connect to host
-rtate.se: could not connect to host
-rtc.fun: could not connect to host
-rtd.uk: could not connect to host
-rtd.uk.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-rte.eu: could not connect to host
-rte2fm.ie: could not connect to host
-rtfpessoa.xyz: did not receive HSTS header
-rths.tk: could not connect to host
-rtrinflatables.co.uk: could not connect to host
-rttss.com: could not connect to host
-rtvi.com: did not receive HSTS header
-rtzoeller.com: could not connect to host
-ru-e-business.com: did not receive HSTS header
-rua.cx: did not receive HSTS header
-ruarua.ml: could not connect to host
-rubbereggs.ca: could not connect to host
-rubbix.net: could not connect to host
-rubecodeberg.com: could not connect to host
-ruben.am: could not connect to host
-rubendv.be: did not receive HSTS header
-rubenjromo.com: did not receive HSTS header
-rubenschulz.nl: did not receive HSTS header
-rubi-ka.net: max-age too low: 0
-rubidi.net: did not receive HSTS header
-ruborr.se: did not receive HSTS header
-rubyist.im: max-age too low: 2592000
-rubysecurity.org: did not receive HSTS header
-rubyshop.nl: did not receive HSTS header
-rucnerobene.eu: could not connect to host
-rudel-wot.de: could not connect to host
-rudelune.fr: did not receive HSTS header
-rudeotter.com: did not receive HSTS header
-ruderverein-gelsenkirchen.de: did not receive HSTS header
-rudhaulidirectory.com: did not receive HSTS header
-rueduparticulier.com: did not receive HSTS header
-ruequincampoix.com: did not receive HSTS header
-rufabula-com.appspot.com: did not receive HSTS header
-ruflay.ru: could not connect to host
-rugby.video: could not connect to host
-rugirlfriend.com: could not connect to host
-rugs.ca: did not receive HSTS header
-rugstorene.co.uk: did not receive HSTS header
-ruhr3.de: did not receive HSTS header
-ruht.ro: did not receive HSTS header
-ruig.jp: could not connect to host
-ruigomes.me: did not receive HSTS header
-ruika.ru: could not connect to host
-ruimarques.xyz: could not connect to host
-ruiruigeblog.com: could not connect to host
-ruitersportbak.nl: could not connect to host
-ruja.dk: did not receive HSTS header
-rukhaiyar.com: could not connect to host
-rullzer.com: did not receive HSTS header
-rumenka.tk: could not connect to host
-rummel-platz.de: could not connect to host
-rumoterra.com.br: could not connect to host
-rumtaste.com: could not connect to host
-run-forrest.run: could not connect to host
-runawebinar.nl: could not connect to host
-runcarina.com: could not connect to host
-rundumcolumn.xyz: could not connect to host
-runhardt.eu: could not connect to host
-runnergrapher.com: could not connect to host
-runningandoutdoors.com: did not receive HSTS header
-runschrauger.com: could not connect to host
-runtimepanic.xyz: could not connect to host
-runtl.com: did not receive HSTS header
-runtondev.com: did not receive HSTS header
-ruqu.nl: could not connect to host
-rurs.ml: could not connect to host
-rusadmin.biz: did not receive HSTS header
-rusempire.ru: did not receive HSTS header
-rushmix.com: could not connect to host
-rushmyessay.gq: could not connect to host
-ruskod.net: could not connect to host
-rusl.me: could not connect to host
-rusl.net: did not receive HSTS header
-russianorthodoxchurch.co.uk: did not receive HSTS header
-russmarshall.com: could not connect to host
-russpuss.ru: did not receive HSTS header
-rustbyexample.com: did not receive HSTS header
-rustfanatic.com: did not receive HSTS header
-ruthiehallarsis.com: max-age too low: 300
-ruvinroshan.com: did not receive HSTS header
-ruxit.com: did not receive HSTS header
-rva.gov: did not receive HSTS header
-rvc-france.com: did not receive HSTS header
-rvfu98.com: could not connect to host
-rvg.zone: could not connect to host
-rvolve.net: could not connect to host
-rw-solutions.tech: could not connect to host
-rwanderlust.com: could not connect to host
-rwgamernl.ml: could not connect to host
-rws-cc.com: did not receive HSTS header
-rx-contact.com: could not connect to host
-rxcheck.com: did not receive HSTS header
-rxgroup.io: did not receive HSTS header
-rxprep.com: did not receive HSTS header
-rxt.social: could not connect to host
-rxv.cc: could not connect to host
-ryan-design.com: did not receive HSTS header
-ryancarter.co.uk: did not receive HSTS header
-ryanjarvis.co.uk: did not receive HSTS header
-ryanroberts.co.uk: did not receive HSTS header
-ryanstreur.com: did not receive HSTS header
-rybox.info: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-rychlikoderi.cz: could not connect to host
-rydermais.tk: did not receive HSTS header
-ryejuice.sytes.net: could not connect to host
-rylin.net: could not connect to host
-rylore.com: could not connect to host
-ryssl.com: could not connect to host
-ryssland.guide: could not connect to host
-ryyule.com: could not connect to host
-ryzex.de: could not connect to host
-rzegroup.com: could not connect to host
-s-a.xyz: could not connect to host
-s-d-v.ch: could not connect to host
-s-n-unso.com: did not receive HSTS header
-s-on.li: could not connect to host
-s-rickroll-p.pw: could not connect to host
-s-socks.com: could not connect to host
-s.how: could not connect to host
-s0923.com: could not connect to host
-s0laris.co.uk: could not connect to host
-s1-llc.com: could not connect to host
-s16e.no: did not receive HSTS header
-s1mplescripts.de: could not connect to host
-s1ris.org: did not receive HSTS header
-s2p.moe: could not connect to host
-s30365.com: could not connect to host
-s3cases.com: did not receive HSTS header
-s3n.se: could not connect to host
-s4media.org: could not connect to host
-s5118.com: could not connect to host
-s5197.co: could not connect to host
-s6729.co: could not connect to host
-s6729.com: did not receive HSTS header
-s6957.co: could not connect to host
-s81365.com: did not receive HSTS header
-s81818.com: did not receive HSTS header
-s82365.com: did not receive HSTS header
-s9297.co: could not connect to host
-s9397.com: did not receive HSTS header
-s9721.com: did not receive HSTS header
-s9728.co: could not connect to host
-saabwa.org: could not connect to host
-saah.ae: did not receive HSTS header
-saastopankki.fi: did not receive HSTS header
-sabahattin-gucukoglu.com: could not connect to host
-sabatek.pl: did not receive HSTS header
-sabe.cz: did not receive HSTS header
-sabine-dicklberger-massschneiderei-muenchen.de: did not receive HSTS header
-sabtunes.com: could not connect to host
-saccounty.gov: did not receive HSTS header
-sacharidovejednotky.eu: could not connect to host
-sackers.com: did not receive HSTS header
-saco-ceso.com: could not connect to host
-sacramentocounty.gov: could not connect to host
-sadbox.es: could not connect to host
-sadiejanehair.com: could not connect to host
-sadievilleky.gov: did not receive HSTS header
-saenforcement.agency: could not connect to host
-safari-afrique.com: did not receive HSTS header
-safe.moe: did not receive HSTS header
-safeacs.com: could not connect to host
-safeathomeohio.gov: could not connect to host
-safedevice.net: did not receive HSTS header
-safeex.com: did not receive HSTS header
-safeinfra.nl: could not connect to host
-safelist.eu: did not receive HSTS header
-safeme.ga: could not connect to host
-safemovescheme.co.uk: could not connect to host
-safemt.gov: could not connect to host
-safepay.io: could not connect to host
-safer-networking.org: did not receive HSTS header
-saferedirect.link: could not connect to host
-saferedirectlink.com: could not connect to host
-saferpost.com: could not connect to host
-safesecret.info: did not receive HSTS header
-safetext.me: could not connect to host
-safetyrisk.net: did not receive HSTS header
-safetysign.ir: did not receive HSTS header
-safetyworkkits.co.nz: did not receive HSTS header
-safewings-nh.nl: could not connect to host
-safing.me: could not connect to host
-safnah.com: did not receive HSTS header
-safungerar.se: could not connect to host
-sagarhandicraft.com: did not receive HSTS header
-sagemontchurch.org: did not receive HSTS header
-sageth.com: could not connect to host
-sagracefarms.com: could not connect to host
-sah3.net: could not connect to host
-sahilm.com: did not receive HSTS header
-saidtezel.com: did not receive HSTS header
-saigaocy.me: could not connect to host
-saigonstar.de: could not connect to host
-sailbookers.com: did not receive HSTS header
-sainikbiswas.com: could not connect to host
-saint-astier-triathlon.com: did not receive HSTS header
-saint-sym.fr: did not receive HSTS header
-saintefoy-tarentaise.com: did not receive HSTS header
-saintip.com: did not receive HSTS header
-saintjohnlutheran.church: could not connect to host
-saintmichelqud.com: did not receive HSTS header
-saintsrobotics.com: did not receive HSTS header
-saintw.com: could not connect to host
-sairai.bid: could not connect to host
-saisaweb.com: could not connect to host
-saitoh-atsuko.com: did not receive HSTS header
-saiyasu-search.com: did not receive HSTS header
-sajter.ga: could not connect to host
-sakamichi.moe: could not connect to host
-sakaserver.com: did not receive HSTS header
-sakerhetsbubblan.se: did not receive HSTS header
-sakib.ninja: did not receive HSTS header
-sakurabuff.com: could not connect to host
-sakuracdn.com: could not connect to host
-sakuradata.com: could not connect to host
-sakuraflores.com.br: could not connect to host
-salaervergleich.com: did not receive HSTS header
-sale.sh: did not receive HSTS header
-sale4ru.ru: could not connect to host
-saleaks.org: could not connect to host
-salearnership.co.za: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-salesactivities.de: did not receive HSTS header
-salesblackbelt.coach: could not connect to host
-saleslift.pl: could not connect to host
-salesmachine.io: did not receive HSTS header
-salishseawhalewatching.ca: did not receive HSTS header
-salixcode.com: could not connect to host
-salmo23.com.br: did not receive HSTS header
-salmonrecovery.gov: could not connect to host
-salmos91.com: could not connect to host
-salonestella.it: could not connect to host
-salserocafe.com: could not connect to host
-salserototal.com: could not connect to host
-salt-documentary.blog: could not connect to host
-saltedskies.com: could not connect to host
-saltireconservation.com: did not receive HSTS header
-salto.si: did not receive HSTS header
-saltra.online: could not connect to host
-saludnutrivida.com: could not connect to host
-saludsexualmasculina.org: did not receive HSTS header
-saludsis.mil.co: did not receive HSTS header
-saludyvida.site: could not connect to host
-salvaalocombia.com: could not connect to host
-salvameuba.com: did not receive HSTS header
-salverainha.org: could not connect to host
-salzamt.tk: could not connect to host
-salzerperu.com: could not connect to host
-sam-cousins.com: did not receive HSTS header
-sam88.cc: could not connect to host
-samanthahumphreysstudio.com: did not receive HSTS header
-samanthasicecream.com: could not connect to host
-samariafar.com: did not receive HSTS header
-samaritan.tech: could not connect to host
-samaritansnet.org: could not connect to host
-samba.com.co: did not receive HSTS header
-sambaa.com.br: could not connect to host
-samcentertech.com: did not receive HSTS header
-sametovymesic.cz: could not connect to host
-samgrayson.me: did not receive HSTS header
-samin.tk: could not connect to host
-samitechnic.com: did not receive HSTS header
-saml2.com: could not connect to host
-samlam.ddns.net: could not connect to host
-samlamac.com: could not connect to host
-samlivogarv.dk: did not receive HSTS header
-sammenlignakasser.dk: did not receive HSTS header
-sammyslimos.com: max-age too low: 300
-samnya.cn: did not receive HSTS header
-samp.im: could not connect to host
-sampcup.com: could not connect to host
-sampleappservice.com: could not connect to host
-sampoznay.ru: could not connect to host
-samraskauskas.com: could not connect to host
-samrobertson.co.uk: did not receive HSTS header
-samsen.club: could not connect to host
-samsonova.de: could not connect to host
-samsungphonegenerator.xyz: did not receive HSTS header
-samsungxoa.com: could not connect to host
-samuel-dumont.be: could not connect to host
-samuirehabcenter.com: could not connect to host
-samuraiskye.com: did not receive HSTS header
-samvanderkris.com: could not connect to host
-samyerkes.com: did not receive HSTS header
-san-mian-ka.ml: could not connect to host
-sanalbayrak.com: could not connect to host
-sanandreasstories.com: did not receive HSTS header
-sanasalud.org: did not receive HSTS header
-sanatfilan.com: could not connect to host
-sanatrans.com: did not receive HSTS header
-sancdz.com: did not receive HSTS header
-sandbagexpress.com: did not receive HSTS header
-sandbox.mydigipass.com: could not connect to host
-sanderknape.com: did not receive HSTS header
-sandiegoluxuryhomes.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-sandtonvipcompanions.com: did not receive HSTS header
-sandviks.com: did not receive HSTS header
-sanemind.de: did not receive HSTS header
-sanemind.eu: did not receive HSTS header
-sanguoxiu.com: could not connect to host
-sangwon.io: could not connect to host
-sanhei.ch: did not receive HSTS header
-sanik.my: did not receive HSTS header
-sanikapandit.com: did not receive HSTS header
-sanilodge.com: did not receive HSTS header
-sanjotech.space: could not connect to host
-sanook69.com: did not receive HSTS header
-sanovnikat.com: did not receive HSTS header
-sanpham-balea.org: could not connect to host
-sanqinyinshi.com.cn: could not connect to host
-sanradon.by: did not receive HSTS header
-sansage.com.br: did not receive HSTS header
-sansdev.com: could not connect to host
-sansemea.com: did not receive HSTS header
-santa-fell-from.space: could not connect to host
-santacruzdescargas.tk: could not connect to host
-santafemacas.com.br: did not receive HSTS header
-santamariaretreats.com: max-age too low: 0
-santanderibc.com: did not receive HSTS header
-santanderideas.com: did not receive HSTS header
-santensautomatics.be: did not receive HSTS header
-santi.eu: did not receive HSTS header
-santing.net: could not connect to host
-santmark.com: could not connect to host
-santmark.eu: could not connect to host
-santmark.fi: could not connect to host
-santmark.info: could not connect to host
-santmark.net: could not connect to host
-santmark.org: could not connect to host
-santodomingocg.org: could not connect to host
-santojuken.co.jp: did not receive HSTS header
-santorinibbs.com: did not receive HSTS header
-santoshpandit.com: did not receive HSTS header
-santouri.be: could not connect to host
-sanyasingh.in: did not receive HSTS header
-saobancrafts.com: could not connect to host
-saoneth.pl: could not connect to host
-saotn.org: did not receive HSTS header
-sapereaude.com.pl: did not receive HSTS header
-sapk.fr: could not connect to host
-saposute-s.jp: could not connect to host
-sapphireblue.me: could not connect to host
-sapuncheta.com: did not receive HSTS header
-sarabara.com: max-age too low: 5184000
-sarae.id: did not receive HSTS header
-sarah-beckett-harpist.com: did not receive HSTS header
-sarahboydrealty.com: did not receive HSTS header
-sarahcheyette.com: did not receive HSTS header
-sarahcorliss.com: did not receive HSTS header
-sarahdoyley.com: could not connect to host
-sarahlouisesearle.com: could not connect to host
-sarahsweetlife.com: could not connect to host
-sarahsweger.com: could not connect to host
-sarahvictor.co.uk: did not receive HSTS header
-sarangsemutbandung.com: could not connect to host
-sardegnatirocini.it: could not connect to host
-sargeson.it: did not receive HSTS header
-sarindia.com: could not connect to host
-sarindia.de: could not connect to host
-sarisonproductions.com: did not receive HSTS header
-sarkaariseva.live: could not connect to host
-sarkarikhoj.com: could not connect to host
-sarkarischeme.in: could not connect to host
-sarkisozleri.us: could not connect to host
-sarndipity.com: could not connect to host
-saronno5stelle.it: did not receive HSTS header
-saruwebshop.co.za: could not connect to host
-sas-snowboarding.sk: could not connect to host
-sasanika.org: could not connect to host
-sashka.com.ua: could not connect to host
-saskpension.com: did not receive HSTS header
-sat.rent: could not connect to host
-sat7a-riyadh.com: did not receive HSTS header
-satanichia.moe: could not connect to host
-satisperfectacollections.com: could not connect to host
-sativatunja.com: could not connect to host
-satmep.com: did not receive HSTS header
-satoshicrypt.com: could not connect to host
-satplay.host: could not connect to host
-satragreen.com: could not connect to host
-satrent.com: could not connect to host
-satrent.se: did not receive HSTS header
-satriyowibowo.my.id: could not connect to host
-satsang-uwe.de: did not receive HSTS header
-satsukii.moe: did not receive HSTS header
-sattamatkadpboss.mobi: could not connect to host
-sattaresult.in: could not connect to host
-saturne.tk: could not connect to host
-saturngames.co.uk: did not receive HSTS header
-saucelabs.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-saucyfox.net: did not receive HSTS header
-saudavel.com.vc: could not connect to host
-saudeealimentos.com: could not connect to host
-saudeeconforto.com.br: could not connect to host
-saudeintimadamulher.com.br: could not connect to host
-saudiarabiaevisa.co.uk: did not receive HSTS header
-sauenytt.no: could not connect to host
-sauer-systems.net: did not receive HSTS header
-saumon.xyz: could not connect to host
-saunasandstuff.ca: did not receive HSTS header
-saunasandstuff.com: did not receive HSTS header
-saurel.me: could not connect to host
-savacloud.com: did not receive HSTS header
-savannahtasteexperience.com: did not receive HSTS header
-savantic.io: could not connect to host
-savbus.net: could not connect to host
-save-me-koeln.de: could not connect to host
-save.gov: could not connect to host
-saveaward.gov: could not connect to host
-savebt.net: could not connect to host
-savecashindia.com: did not receive HSTS header
-savekorea.net: max-age too low: 0
-savemoneyonenergy.com: did not receive HSTS header
-savemylicence.co.uk: did not receive HSTS header
-saveora.com: could not connect to host
-saveora.shop: could not connect to host
-savethedogfishfoundation.org: could not connect to host
-saveya.com: did not receive HSTS header
-saveyour.biz: could not connect to host
-savingbytes.com: did not receive HSTS header
-savinggoliath.com: could not connect to host
-savingsstoreonline.ca: did not receive HSTS header
-savisasolutions.co.za: did not receive HSTS header
-savvysuit.com: did not receive HSTS header
-savvytime.com: did not receive HSTS header
-saxojoe.co.uk: could not connect to host
-saxol-group.com: could not connect to host
-say-hanabi.com: could not connect to host
-sayhanabi.com: could not connect to host
-sayori.pw: could not connect to host
-sayprepay.com: could not connect to host
-saytu.co: did not receive HSTS header
-sayver22.com: could not connect to host
-sb-mnn.com: did not receive HSTS header
-sbgroup.dk: could not connect to host
-sbit.com.br: could not connect to host
-sbl001.com: did not receive HSTS header
-sblum.de: did not receive HSTS header
-sbm.cloud: could not connect to host
-sbobetfun.com: could not connect to host
-sbox-archives.com: could not connect to host
-sbox-servers.com: could not connect to host
-sbr.red: did not receive HSTS header
-sbsbaits.com: did not receive HSTS header
-sbsnursery.co.uk: did not receive HSTS header
-sbstattoo.com: could not connect to host
-sby.de: did not receive HSTS header
-sc21.cn: could not connect to host
-sc4le.com: could not connect to host
-scala.click: did not receive HSTS header
-scalacollege.nl: did not receive HSTS header
-scale.milano.it: could not connect to host
-scalive.tv: could not connect to host
-scamblockplus.org: could not connect to host
-scanleasing.net: did not receive HSTS header
-scannabi.com: could not connect to host
-scanwords.cc: could not connect to host
-scanwords.net: could not connect to host
-scanwords.org: could not connect to host
-scbreed.com: did not receive HSTS header
-scentofwine.com: did not receive HSTS header
-sceptique.eu: did not receive HSTS header
-sch44r0n.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-schaafenstrasse.koeln: could not connect to host
-schadegarant.net: could not connect to host
-schaefer-reifen.de: did not receive HSTS header
-schalkoortbv.nl: did not receive HSTS header
-schaper-sport.com: did not receive HSTS header
-scharoth.de: did not receive HSTS header
-schatmeester.be: could not connect to host
-schau-rein.co.at: did not receive HSTS header
-schauer.so: could not connect to host
-schd.io: did not receive HSTS header
-scheduleme.io: could not connect to host
-scheemadigital.com: could not connect to host
-scheidtweiler.de: did not receive HSTS header
-schermreparatierotterdam.nl: did not receive HSTS header
-schgroup.com: did not receive HSTS header
-schimmel-test.info: could not connect to host
-schimmelnagelspecialist.nl: did not receive HSTS header
-schippers-it.nl: did not receive HSTS header
-schlabbi.com: did not receive HSTS header
-schlafguru.com: could not connect to host
-schlossfuchs.de: could not connect to host
-schluesseldienst-hannover24.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-schmelzle.io: could not connect to host
-schmetterlingsapp.at: did not receive HSTS header
-schmid.tv: did not receive HSTS header
-schmidttulskie.de: did not receive HSTS header
-schmitt.ovh: could not connect to host
-schmitt.ws: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-schmitz.link: could not connect to host
-schneeketten-ratgeber.de: did not receive HSTS header
-schneider-electric.tg: could not connect to host
-schnell-abnehmen.tips: could not connect to host
-schnell-gold.com: did not receive HSTS header
-schnellsuche.de: did not receive HSTS header
-schoeck-elektro.de: could not connect to host
-scholarly.com.ph: could not connect to host
-scholarly.ph: could not connect to host
-scholierenvervoerzeeland.nl: did not receive HSTS header
-scholl.io: could not connect to host
-schollbox.de: could not connect to host
-scholledev.com: could not connect to host
-school-b.us: could not connect to host
-school.in.th: could not connect to host
-schoolarchive.net: did not receive HSTS header
-schoolbus.at: did not receive HSTS header
-schooli.io: could not connect to host
-schoolofequineshiatsu.com: did not receive HSTS header
-schoolotzyv.ru: could not connect to host
-schoolsonice.nl: could not connect to host
-schoolstats.de: did not receive HSTS header
-schooltrends.co.uk: did not receive HSTS header
-schoolze.com: did not receive HSTS header
-schoop.me: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-schopenhauer-institut.de: could not connect to host
-schorel.ovh: could not connect to host
-schraebanowicz.net: did not receive HSTS header
-schrauger.run: could not connect to host
-schraugerrun.com: could not connect to host
-schreiber-netzwerk.eu: did not receive HSTS header
-schreibnacht.de: did not receive HSTS header
-schreinerei-wortmann.de: did not receive HSTS header
-schrikdraad.net: did not receive HSTS header
-schrodinger.io: could not connect to host
-schroeder-immobilien-sundern.de: could not connect to host
-schroepfglas-versand.de: did not receive HSTS header
-schroettle.com: did not receive HSTS header
-schsrch.org: could not connect to host
-schuelerzeitung-ideenlos.de: could not connect to host
-schuhbeck.tk: could not connect to host
-schulterglatzen-altenwalde.de: could not connect to host
-schultz.is: max-age too low: 0
-schur-it.de: could not connect to host
-schurkenstaat.net: did not receive HSTS header
-schwarzkopfforyou.de: could not connect to host
-schwarzwaldcon.de: did not receive HSTS header
-schwedenhaus.ag: did not receive HSTS header
-schweiz.guide: could not connect to host
-schweizerbolzonello.net: could not connect to host
-schwetz.net: could not connect to host
-sci-internet.tk: did not receive HSTS header
-scib.tk: could not connect to host
-science-anatomie.com: did not receive HSTS header
-science-questions.org: could not connect to host
-science360.gov: could not connect to host
-scienceathome.org: did not receive HSTS header
-sciencehouse.jp: did not receive HSTS header
-sciencemonster.co.uk: could not connect to host
-scientific.boston: could not connect to host
-scifi.fyi: did not receive HSTS header
-scimage.com: max-age too low: 7776000
-scintillating.stream: could not connect to host
-scionasset.com: did not receive HSTS header
-sciototownship-oh.gov: did not receive HSTS header
-scis.com.ua: did not receive HSTS header
-scitopia.me: could not connect to host
-scivillage.com: did not receive HSTS header
-sckc.stream: did not receive HSTS header
-sclgroup.cc: could not connect to host
-sclns.co: could not connect to host
-scm-2017.org: could not connect to host
-scontogiusto.com: could not connect to host
-scooshonline.co.uk: did not receive HSTS header
-scootfleet.com: could not connect to host
-scopea.fr: max-age too low: 0
-score-savers.com: max-age too low: 10540800
-scores4schools.com: could not connect to host
-scorobudem.ru: could not connect to host
-scorocode.ru: did not receive HSTS header
-scottainslie.me.uk: could not connect to host
-scottdial.com: did not receive HSTS header
-scottferguson.com.au: did not receive HSTS header
-scottgruber.me: did not receive HSTS header
-scottgthomas.com: could not connect to host
-scotthel.me: did not receive HSTS header
-scotthelme.com: did not receive HSTS header
-scottnicol.co.uk: could not connect to host
-scottstorey.co.uk: could not connect to host
-scottynordstrom.org: could not connect to host
-scourt.info: could not connect to host
-scourt.org.ua: could not connect to host
-scoutdb.ch: did not receive HSTS header
-scoutsanbartolome.tk: could not connect to host
-scpartyentertainment.co.uk: could not connect to host
-scra.gov: could not connect to host
-scrambl.is: could not connect to host
-scramble.io: did not receive HSTS header
-scrambler.in: could not connect to host
-scrapdealers.eu: did not receive HSTS header
-scrapings.net: could not connect to host
-scratchandscuffs.co.uk: could not connect to host
-scratchandscuffs.com: could not connect to host
-scratchandscuffs.uk: could not connect to host
-scredible.com: could not connect to host
-screen64.tk: could not connect to host
-screencaster.io: could not connect to host
-screenparadigm.com: could not connect to host
-screenresolution.space: could not connect to host
-screensaversplanet.com: did not receive HSTS header
-scribbler.monster: could not connect to host
-scribbleserver.com: could not connect to host
-scribe.systems: could not connect to host
-scrion.com: could not connect to host
-script.google.com: did not receive HSTS header (error ignored - included regardless)
-scriptenforcer.net: could not connect to host
-scripthost.org: could not connect to host
-scriptict.nl: could not connect to host
-scrisulfacebine.ro: did not receive HSTS header
-scrollstory.com: did not receive HSTS header
-scrtch.fr: could not connect to host
-scruffymen.com: could not connect to host
-scrumbleship.com: did not receive HSTS header
-scs-simulatoren.de: could not connect to host
-sctm.at: could not connect to host
-scuters.club: could not connect to host
-scw.com: did not receive HSTS header
-scw.nz: could not connect to host
-scwilliams.co.uk: could not connect to host
-scwilliams.uk: could not connect to host
-sdayman.com: did not receive HSTS header
-sdfleetmanagement.com: did not receive HSTS header
-sdhmanagementgroup.com: could not connect to host
-sdia.ru: did not receive HSTS header
-sdl-corporatesite-staging.azurewebsites.net: did not receive HSTS header
-sdmoscow.ru: did not receive HSTS header
-sdocast.com: could not connect to host
-sdrive-gutachter.de: did not receive HSTS header
-sdrobs.com: did not receive HSTS header
-sdsl-speedtest.de: could not connect to host
-sdsmanagement.me: could not connect to host
-sduoxminty.cn: could not connect to host
-sdvx.net: did not receive HSTS header
-se7ensins.com: did not receive HSTS header
-sea-godzilla.com: could not connect to host
-seabooty.com: could not connect to host
-seaborn.top: did not receive HSTS header
-seacam-store.com: did not receive HSTS header
-seaminars.fr: did not receive HSTS header
-seamless.no: did not receive HSTS header
-seanchaidh.org: could not connect to host
-seankilgarriff.com: could not connect to host
-seans.cc: could not connect to host
-seanstrout.com: could not connect to host
-seansyardservice.com: did not receive HSTS header
-search: could not connect to host
-searchbrothers.at: did not receive HSTS header
-searchbrothers.ch: did not receive HSTS header
-searchbrothers.co.il: did not receive HSTS header
-searchbrothers.com: did not receive HSTS header
-searchbrothers.de: did not receive HSTS header
-searchbrothers.dk: did not receive HSTS header
-searchbrothers.es: did not receive HSTS header
-searchbrothers.fr: did not receive HSTS header
-searchbrothers.it: did not receive HSTS header
-searchbrothers.nl: did not receive HSTS header
-searchbrothers.ru: did not receive HSTS header
-searchbrothers.uk: did not receive HSTS header
-searchgov.gov.il: did not receive HSTS header
-searx.pw: could not connect to host
-seats2meet.com: did not receive HSTS header
-seatshare.co.uk: did not receive HSTS header
-sebastiaandouma.co.uk: could not connect to host
-sebastian-bair.de: could not connect to host
-sebastian-haeutle.de: did not receive HSTS header
-sebastian-kraus.me: could not connect to host
-sebastian-lutsch.de: could not connect to host
-sebastian-schmidt.me: did not receive HSTS header
-sebastian-tobie.de: could not connect to host
-sebastian.expert: did not receive HSTS header
-sebastianhampl.de: could not connect to host
-sebastianjaworecki.tk: could not connect to host
-sebastianpedersen.com: could not connect to host
-sebastiensenechal.com: did not receive HSTS header
-sebepoznani.eu: could not connect to host
-sebi.cf: could not connect to host
-sec.red: could not connect to host
-sec4share.me: did not receive HSTS header
-sec555.com: did not receive HSTS header
-secandtech.com: could not connect to host
-secanje.nl: did not receive HSTS header
-secard.me: could not connect to host
-secbone.com: did not receive HSTS header
-secboom.com: could not connect to host
-seccast.my: did not receive HSTS header
-seccomp.ru: did not receive HSTS header
-seceye.cn: could not connect to host
-sechat.one: could not connect to host
-secitem.at: could not connect to host
-secitem.de: could not connect to host
-secitem.eu: could not connect to host
-secnet.ga: could not connect to host
-secondary-survivor.com: could not connect to host
-secondary-survivor.help: could not connect to host
-secondary-survivor.net: could not connect to host
-secondarysurvivor.help: could not connect to host
-secondarysurvivorportal.com: could not connect to host
-secondarysurvivorportal.help: could not connect to host
-secondbike.co.uk: did not receive HSTS header
-secondbyte.nl: could not connect to host
-secondnature.bio: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-secondpay.nl: could not connect to host
-secondspace.ca: could not connect to host
-secpoc.online: could not connect to host
-secretar.is: could not connect to host
-secretnation.net: did not receive HSTS header
-secretofanah.com: could not connect to host
-secretpigeon.com: could not connect to host
-secteer.com: did not receive HSTS header
-sectest.ml: could not connect to host
-sectia22.ro: could not connect to host
-sectionw2s.org: did not receive HSTS header
-secumail.nl: did not receive HSTS header
-secumailer.eu: did not receive HSTS header
-secure-automotive-cloud.com: could not connect to host
-secure-automotive-cloud.org: could not connect to host
-secure-games.us: could not connect to host
-secure.chat: could not connect to host
-secure.link: did not receive HSTS header
-securechat4.me: could not connect to host
-securecomms.cz: did not receive HSTS header
-securedevelop.net: could not connect to host
-securedns.zone: could not connect to host
-securefuture.nl: did not receive HSTS header
-secureideas.com: did not receive HSTS header
-secureindia.co: could not connect to host
-securejabber.me: could not connect to host
-securemy.website: could not connect to host
-secureprivacy101.org: could not connect to host
-secureradio.net: could not connect to host
-securesuisse.ch: could not connect to host
-securetasks.net: could not connect to host
-securetheorem.com: did not receive HSTS header
-securetronic.ch: did not receive HSTS header
-securipy.com: could not connect to host
-securiscan.io: did not receive HSTS header
-securita.eu: did not receive HSTS header
-security-carpet.com: could not connect to host
-security-thoughts.org: could not connect to host
-security.google.com: did not receive HSTS header (error ignored - included regardless)
-security.xn--q9jyb4c: could not connect to host
-securityarena.com: could not connect to host
-securitycamerasaustin.net: did not receive HSTS header
-securitycamerascincinnati.com: did not receive HSTS header
-securitycamerasjohnsoncity.com: did not receive HSTS header
-securityglance.com: could not connect to host
-securityindicators.com: could not connect to host
-securityinet.biz: could not connect to host
-securityinet.net: could not connect to host
-securityinet.org.il: could not connect to host
-securitymap.wiki: could not connect to host
-securitysoapbox.com: could not connect to host
-securitytalk.pl: could not connect to host
-securitytestfan.gov: could not connect to host
-securitywatch.co.nz: did not receive HSTS header
-securitywithnick.com: could not connect to host
-securityzap.com: could not connect to host
-securiviera.ch: did not receive HSTS header
-securocloud.com: could not connect to host
-securon.io: could not connect to host
-securoswiss.ch: could not connect to host
-secwise.nl: could not connect to host
-sedesignxtra.com: did not receive HSTS header
-sedeusquiser.net: could not connect to host
-sedomicilier.fr: did not receive HSTS header
-sedrubal.de: could not connect to host
-sedussa.ro: did not receive HSTS header
-sedziapilkarski.pl: did not receive HSTS header
-seedalpha.com: could not connect to host
-seedboxers.net: could not connect to host
-seedsofangelica.net: did not receive HSTS header
-seefirm.com: could not connect to host
-seefunk.net: did not receive HSTS header
-seehimnaked.com: could not connect to host
-seehimnude.com: could not connect to host
-seehisnudes.com: could not connect to host
-seekersmart.com: did not receive HSTS header
-seeks.ru: could not connect to host
-seele.ca: could not connect to host
-seemeasaperson.com: did not receive HSTS header
-seen.life: could not connect to host
-seeonce.co: could not connect to host
-seezeitlodge-bostalsee.de: did not receive HSTS header
-sefinancial.com: did not receive HSTS header
-seg-sys.com: could not connect to host
-segenstore.com: could not connect to host
-segtronix.com: could not connect to host
-segurosdecarroshialeah.org: did not receive HSTS header
-segurosdevidamiami.org: did not receive HSTS header
-segurosmaurobracchieri.com: could not connect to host
-sehablazolano.com: could not connect to host
-sehenderson.com: did not receive HSTS header
-seht.xyz: could not connect to host
-seida.at: could not connect to host
-seiko-dojo.com: could not connect to host
-seiler-bad.de: did not receive HSTS header
-seiryokuzai-ch.com: could not connect to host
-seizoushokoyuubangou.com: did not receive HSTS header
-sekikawa.biz: could not connect to host
-sektor.ro: could not connect to host
-sektor.team: could not connect to host
-sektor.tech: could not connect to host
-selaluberkah.com: could not connect to host
-selco-himejiminami.com: could not connect to host
-selecadm.name: could not connect to host
-selectary.com: could not connect to host
-selectcertifiedautos.com: did not receive HSTS header
-selectruckscalltrackingreports.com: could not connect to host
-selectsplat.com: could not connect to host
-selent.me: could not connect to host
-seleondar.ru: could not connect to host
-selfdefenserx.com: could not connect to host
-selfhosters.com: could not connect to host
-selfie-france.fr: could not connect to host
-selfoutlet.com: did not receive HSTS header
-selfserverx.com: could not connect to host
-selitysvideot.fi: did not receive HSTS header
-selkiemckatrick.com: could not connect to host
-sellercritic.com: did not receive HSTS header
-sellmoretires.com: did not receive HSTS header
-sello.com: did not receive HSTS header
-sellocdn.com: did not receive HSTS header
-sellservs.co.za: could not connect to host
-semaf.at: max-age too low: 10368000
-semakincantik.com: did not receive HSTS header
-semantheme.fr: could not connect to host
-semao.org: could not connect to host
-semen3325.xyz: could not connect to host
-semenkovich.com: did not receive HSTS header
-semenov.su: could not connect to host
-sementes.gratis: could not connect to host
-semianalog.com: could not connect to host
-seminariruumid.ee: did not receive HSTS header
-semmlers.com: did not receive HSTS header
-semmuhely.tk: could not connect to host
-semps-servers.de: could not connect to host
-semrush.com: did not receive HSTS header
-semyonov.su: could not connect to host
-semyonov.us: could not connect to host
-send4x.com: did not receive HSTS header
-sendash.com: did not receive HSTS header
-sendfile.online: could not connect to host
-sendinvoice.nl: did not receive HSTS header
-senedirect.com: could not connect to host
-senemusique.com: did not receive HSTS header
-sengoku-okayama.net: did not receive HSTS header
-sengokulife.com: did not receive HSTS header
-senhorst.com: did not receive HSTS header
-senimag.ro: did not receive HSTS header
-seniorhomepurchaseprogram.com: could not connect to host
-senmonsyoku.top: did not receive HSTS header
-sennase.net: did not receive HSTS header
-senorcontento.com: did not receive HSTS header
-senorporno.com: could not connect to host
-sensavi.ua: did not receive HSTS header
-sense.hamburg: could not connect to host
-sensebridge.com: did not receive HSTS header
-senseict.com.au: did not receive HSTS header
-senseofnumber.co.uk: did not receive HSTS header
-senseye.io: max-age too low: 604800
-sensiblemn.org: could not connect to host
-sensibus.com: did not receive HSTS header
-sensoft-int.com: could not connect to host
-sensoft-int.net: could not connect to host
-sensoft-int.org: could not connect to host
-sensory-brands.com: did not receive HSTS header
-sensound.ml: could not connect to host
-sentic.info: did not receive HSTS header
-sentiments.io: could not connect to host
-sentinelsmotorcycleclub.com: could not connect to host
-sentirmebien.org: could not connect to host
-seo-lagniappe.com: did not receive HSTS header
-seo-nerd.de: max-age too low: 600000
-seo.consulting: did not receive HSTS header
-seo.tl: did not receive HSTS header
-seoarchive.org: could not connect to host
-seobase.pro: did not receive HSTS header
-seobot.com.au: could not connect to host
-seocomposer.com: did not receive HSTS header
-seodefinitivo.com: did not receive HSTS header
-seoenmexico.com.mx: did not receive HSTS header
-seoexperte.berlin: could not connect to host
-seoharish.com: did not receive HSTS header
-seohochschule.de: did not receive HSTS header
-seokay.com: did not receive HSTS header
-seolaba.io: could not connect to host
-seolib.org: could not connect to host
-seomarketingdeals.com: did not receive HSTS header
-seomen.biz: could not connect to host
-seomik.dk: did not receive HSTS header
-seomobo.com: could not connect to host
-seoprovider.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-seoquake.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-seosanantonioinc.com: did not receive HSTS header
-seoscribe.net: could not connect to host
-seosec.xyz: did not receive HSTS header
-seotools.asia: did not receive HSTS header
-seotronix.net: did not receive HSTS header
-seouniversity.org: could not connect to host
-seowarp.net: did not receive HSTS header
-seowordpress.pl: did not receive HSTS header
-sep23.ru: could not connect to host
-sepakbola.win: could not connect to host
-sephr.com: did not receive HSTS header
-sepie.gob.es: did not receive HSTS header
-seppelec.com: did not receive HSTS header
-seputarpengertian.com: could not connect to host
-seq.tf: did not receive HSTS header
-sequatchiecountytn.gov: did not receive HSTS header
-ser-it.pl: could not connect to host
-serafin.tech: could not connect to host
-serathius.ovh: could not connect to host
-serbien.guide: could not connect to host
-serenitycreams.com: did not receive HSTS header
-serfdom.io: did not receive HSTS header
-sergiogas.com.br: did not receive HSTS header
-sergiojimenezequestrian.com: did not receive HSTS header
-sergiosantoro.it: did not receive HSTS header
-sergos.de: could not connect to host
-serije.co: did not receive HSTS header
-seriouss.am: could not connect to host
-serized.pw: could not connect to host
-serkanceyhan.com: could not connect to host
-serkaneles.com: did not receive HSTS header
-serv.site: did not receive HSTS header
-servdiscount.com: did not receive HSTS header
-serve-a.com.au: could not connect to host
-servea.com.au: could not connect to host
-serveatechnologies.com: could not connect to host
-servecrypt.com: could not connect to host
-servecrypt.net: could not connect to host
-servecrypt.ru: could not connect to host
-servemnaction.org: could not connect to host
-server-bg.net: could not connect to host
-server-eye.com: did not receive HSTS header
-server-eye.de: did not receive HSTS header
-server.pk: did not receive HSTS header
-server72a.ddns.net: could not connect to host
-server92.eu: could not connect to host
-server92.tk: could not connect to host
-serveradmin.ovh: could not connect to host
-serveradminz.com: did not receive HSTS header
-serverangels.co.uk: did not receive HSTS header
-serverdensity.io: did not receive HSTS header
-servergno.me: did not receive HSTS header
-serverlauget.no: could not connect to host
-serverlog.net: could not connect to host
-servermonkey.nl: could not connect to host
-serverping.io: did not receive HSTS header
-servers4all.co.uk: did not receive HSTS header
-servettorna.com: did not receive HSTS header
-servfefe.com: could not connect to host
-service-wueste-vodafone.tk: could not connect to host
-serviceair.com.ar: could not connect to host
-servicemagicusa.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-servicemembers.gov: could not connect to host
-serviceslotenmaker.nl: did not receive HSTS header
-servicevie.com: did not receive HSTS header
-serviciodebarralibreparaeventos.com: did not receive HSTS header
-servidoresadmin.com: did not receive HSTS header
-servidoresweb.online: could not connect to host
-serviefectivo.com.co: could not connect to host
-servmaslt.com: could not connect to host
-servpanel.de: did not receive HSTS header
-servu.de: could not connect to host
-servx.org: could not connect to host
-servx.ru: could not connect to host
-serwis-wroclaw.pl: could not connect to host
-serwusik.pl: did not receive HSTS header
-seryo.moe: could not connect to host
-seryo.net: could not connect to host
-seryovpn.com: could not connect to host
-sesha.co.za: could not connect to host
-setfix.de: could not connect to host
-sethoedjo.com: could not connect to host
-setkit.net: could not connect to host
-setsailanddive.com: did not receive HSTS header
-setterirlandes.com.br: could not connect to host
-setuid.de: could not connect to host
-seulean.gq: could not connect to host
-sevenet.pl: did not receive HSTS header
-sevengang.tk: could not connect to host
-sevenhearts.online: could not connect to host
-sevenmatches.com: could not connect to host
-severine-trousselard.com: could not connect to host
-sevinci.ch: could not connect to host
-sevipro.mx: did not receive HSTS header
-sevwebdesign.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-sexaki.com: did not receive HSTS header
-sexar.info: could not connect to host
-sexara.co: could not connect to host
-sexpay.net: could not connect to host
-sexservice.io: could not connect to host
-sexshopfacil.com.br: could not connect to host
-sexshopnet.com.br: could not connect to host
-sexshopsgay.com: did not receive HSTS header
-sextfriend.com: did not receive HSTS header
-sexwork.net: could not connect to host
-seyahatsagliksigortalari.com: could not connect to host
-seyr.it: could not connect to host
-sf3223.com: could not connect to host
-sfashion.si: did not receive HSTS header
-sfcomercio.com.br: could not connect to host
-sfhobbies.com.br: could not connect to host
-sflhidta.gov: could not connect to host
-sfsltd.com: could not connect to host
-sgh.ovh: could not connect to host
-sgovaard.nl: could not connect to host
-sgrmreproduccionapp.azurewebsites.net: could not connect to host
-sgroup-hitoduma.com: did not receive HSTS header
-sgroup-rec.com: did not receive HSTS header
-sgsy.bid: could not connect to host
-sgthotshot.com: could not connect to host
-sgtsnookums.net: could not connect to host
-sh-network.de: could not connect to host
-sh4y.com: could not connect to host
-sh68.cc: could not connect to host
-shaaaaaaaaaaaaa.com: did not receive HSTS header
-shaamrelief.org: could not connect to host
-shadiku.com: did not receive HSTS header
-shadow-socks.net: could not connect to host
-shadow-socks.org: could not connect to host
-shadow-socks.pro: could not connect to host
-shadowguardian507-irl.tk: did not receive HSTS header
-shadowguardian507.tk: could not connect to host
-shadowict.net: did not receive HSTS header
-shadowict.tech: could not connect to host
-shadowmorph.info: did not receive HSTS header
-shadowoftheoldgods.com: could not connect to host
-shadowping.com: could not connect to host
-shadowplus.net: could not connect to host
-shadowrocket.net: could not connect to host
-shadowroket.com: could not connect to host
-shadowshocks.net: could not connect to host
-shadowsocks.gift: could not connect to host
-shadowsocks.live: could not connect to host
-shadowsocks.net: could not connect to host
-shadowsocks.software: could not connect to host
-shadowsocks.vc: could not connect to host
-shadowsocksvpn.com: could not connect to host
-shadowsoks.com: could not connect to host
-shadowstack.de: did not receive HSTS header
-shadowsu.info: could not connect to host
-shadowsu.top: could not connect to host
-shadowsworldonline.co.uk: could not connect to host
-shadsupershop.com: could not connect to host
-shag-shag.ru: could not connect to host
-shagi29.ru: did not receive HSTS header
-shaharyaranjum.com: could not connect to host
-shahbeat.com: could not connect to host
-shahidhashmi.net: could not connect to host
-shahyadmusic.com: could not connect to host
-shainessim.com: could not connect to host
-shaitan.eu: could not connect to host
-shakebox.de: did not receive HSTS header
-shaken-kyoto.jp: could not connect to host
-shakes4u.com: did not receive HSTS header
-shalazine.com: did not receive HSTS header
-shamka.ru: did not receive HSTS header
-shandonsg.co.uk: could not connect to host
-shanekoster.net: did not receive HSTS header
-shanesage.com: could not connect to host
-shanevandermeer.com: could not connect to host
-shang-yu.cn: could not connect to host
-shangzhen.site: could not connect to host
-shankangke.com: could not connect to host
-shannoneichorn.com: did not receive HSTS header
-shanxiapark.com: could not connect to host
-shanyhs.com: could not connect to host
-shaobin.wang: did not receive HSTS header
-shapesedinburgh.co.uk: did not receive HSTS header
-shardsoft.com: could not connect to host
-sharealo.org: could not connect to host
-sharecc.co: could not connect to host
-sharecrypted.com: did not receive HSTS header
-sharedhost.de: could not connect to host
-shareeri.com: could not connect to host
-shareimg.xyz: could not connect to host
-sharelovenotsecrets.com: could not connect to host
-sharemessage.net: could not connect to host
-shareoine.com: did not receive HSTS header
-sharepass.pw: could not connect to host
-sharepic.xyz: did not receive HSTS header
-sharepointdrive.com: could not connect to host
-sharesplitter.com: could not connect to host
-shareworx.net: could not connect to host
-shariahlawcenter.com: could not connect to host
-shariahlawcenter.org: could not connect to host
-sharialawcenter.com: could not connect to host
-sharialawcenter.org: could not connect to host
-sharingcode.com: did not receive HSTS header
-sharkcut.se: could not connect to host
-sharkie.org.za: did not receive HSTS header
-sharks.football: did not receive HSTS header
-sharpe-practice.co.uk: could not connect to host
-sharperedge.pw: could not connect to host
-sharperedgecomputers.com: could not connect to host
-sharpsburg-ga.gov: did not receive HSTS header
-shasso.com: did not receive HSTS header
-shatorin.com: did not receive HSTS header
-shattered-souls.de: did not receive HSTS header
-shauncrowley.co.uk: could not connect to host
-shaundanielz.com: could not connect to host
-shaunharker.com: did not receive HSTS header
-shaunwheelhou.se: could not connect to host
-shav.it: did not receive HSTS header
-shavingks.com: could not connect to host
-shawnbsmith.me: did not receive HSTS header
-shawnh.net: could not connect to host
-shawnstarrcustomhomes.com: could not connect to host
-shawnwilson.info: could not connect to host
-shazbots.org: could not connect to host
-shdsub.xyz: could not connect to host
-sheaf.site: could not connect to host
-sheaspire.com.tw: did not receive HSTS header
-sheekdeveloper.com: could not connect to host
-sheekmedia.com: could not connect to host
-sheilagranger.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-shellcode.com.br: did not receive HSTS header
-shellopolis.com: could not connect to host
-shellot.com: could not connect to host
-shellsec.pw: did not receive HSTS header
-shellshock.eu: could not connect to host
-shellvatore.us: could not connect to host
-shemissed.me: could not connect to host
-shemsconseils.ma: could not connect to host
-shena.co.uk: could not connect to host
-shengbao.org: could not connect to host
-shengrenyu.com: could not connect to host
-shenqi.com: did not receive HSTS header
-shens.ai: could not connect to host
-shentengtu.idv.tw: could not connect to host
-shep.co.il: did not receive HSTS header
-sheratan.web.id: could not connect to host
-shereallyheals.com: did not receive HSTS header
-sheriffmiamicountyks.gov: max-age too low: 2592000
-sheriffpawneecountyne.gov: could not connect to host
-shervik.ga: could not connect to host
-shethbox.com: could not connect to host
-shevronpatriot.ru: did not receive HSTS header
-shh-listen.com: did not receive HSTS header
-shiatsu-institut.ch: did not receive HSTS header
-shibainu.com.br: could not connect to host
-shibe.club: could not connect to host
-shidai88.cc: could not connect to host
-shieldblaze.com: did not receive HSTS header
-shieldcomputer.com: did not receive HSTS header
-shieldfe.com: could not connect to host
-shift.ooo: did not receive HSTS header
-shiftins.com: could not connect to host
-shiftnrg.org: did not receive HSTS header
-shiftplanning.com: did not receive HSTS header
-shiftpsych.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-shiinko.com: could not connect to host
-shiji456.com: max-age too low: 0
-shijij.com: could not connect to host
-shikinobi.com: did not receive HSTS header
-shimonfly.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-shin-inc.jp: did not receive HSTS header
-shindorei.fr: max-age too low: 0
-shinebijoux.com.br: could not connect to host
-shinju.moe: could not connect to host
-shinko-osaka.jp: could not connect to host
-shinobi-fansub.ro: could not connect to host
-shinonome-lab.eu.org: could not connect to host
-shiny.gift: did not receive HSTS header
-shiona.xyz: could not connect to host
-shipinsight.com: did not receive HSTS header
-shipmile.com: did not receive HSTS header
-shippingbo.com: did not receive HSTS header
-shirakaba-cc.com: did not receive HSTS header
-shiroki-k.net: could not connect to host
-shirosaki.org: could not connect to host
-shiseki.top: did not receive HSTS header
-shishamania.de: could not connect to host
-shitfest.info: did not receive HSTS header
-shitposting.life: could not connect to host
-shivammaheshwari.com: could not connect to host
-shivatattvayoga.com: did not receive HSTS header
-shiyouqkl.com: could not connect to host
-shk.im: did not receive HSTS header
-shlemenkov.by: could not connect to host
-shm-forum.org.uk: could not connect to host
-shmibbles.me: could not connect to host
-shmunky.co.uk: did not receive HSTS header
-sho-tanaka.jp: could not connect to host
-shobhanayogsadan.com: did not receive HSTS header
-shocksrv.com: did not receive HSTS header
-shoemuse.com: did not receive HSTS header
-shoes-mori.co.jp: did not receive HSTS header
-shola.ga: could not connect to host
-sholtowu.com: could not connect to host
-shome.de: could not connect to host
-shooshosha.com: could not connect to host
-shootingstarmedium.com: could not connect to host
-shootpooloklahoma.com: could not connect to host
-shop-h2o.net: did not receive HSTS header
-shopcord.co.uk: did not receive HSTS header
-shopdongho.com: did not receive HSTS header
-shopdopastor.com.br: could not connect to host
-shopera.ch: did not receive HSTS header
-shopherbal.co.za: could not connect to host
-shophisway.com: could not connect to host
-shopific.co: could not connect to host
-shopify.com: did not receive HSTS header
-shopjek.com: did not receive HSTS header
-shopods.com: did not receive HSTS header
-shopontarget.com: did not receive HSTS header
-shoposal.com: could not connect to host
-shoppeno5.com: did not receive HSTS header
-shopperexperts.com: could not connect to host
-shoppia.se: did not receive HSTS header
-shoppingreview.org: did not receive HSTS header
-shoppr.dk: could not connect to host
-shoprose.ru: could not connect to host
-shoprsc.com: could not connect to host
-shops.neonisi.com: could not connect to host
-shorewoodmn.gov: could not connect to host
-shortpath.com: could not connect to host
-shortr.li: could not connect to host
-shota.party: could not connect to host
-shotly.net: could not connect to host
-shotpixonline.com.br: did not receive HSTS header
-shouldbetaught.com: could not connect to host
-shoulderpainrelief.online: did not receive HSTS header
-shouldihookupwithmybarista.com: did not receive HSTS header
-show-saratov.ru: did not receive HSTS header
-show-stream.tv: could not connect to host
-showdepiscinas.com.br: did not receive HSTS header
-showf.om: could not connect to host
-showkeeper.tv: did not receive HSTS header
-shownet.tk: could not connect to host
-showroom.cam: could not connect to host
-showroom.de: did not receive HSTS header
-showroom113.ru: could not connect to host
-showslivki.tk: could not connect to host
-shreyansh26.me: could not connect to host
-shrinkhub.com: could not connect to host
-shrt.tv: could not connect to host
-shtorku.com: could not connect to host
-shu-kin.net: did not receive HSTS header
-shuai1122.com: max-age too low: 0
-shukatsu-note.com: could not connect to host
-shukatsu-support.jp: did not receive HSTS header
-shulan.moe: could not connect to host
-shuletime.ml: could not connect to host
-shulker.store: could not connect to host
-shulyaka.org.ru: did not receive HSTS header
-shurita.org: could not connect to host
-shuvo.rocks: could not connect to host
-shuvodeep.de: could not connect to host
-shuzicai.cn: could not connect to host
-shv25.se: could not connect to host
-shwongacc.com: could not connect to host
-shwrm.ch: could not connect to host
-shybynature.com: could not connect to host
-shymeck.pw: could not connect to host
-shymeck.xyz: could not connect to host
-shypp.it: did not receive HSTS header
-shyrydan.es: could not connect to host
-sia.one: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-siamdevsqua.re: could not connect to host
-siamdevsquare.com: could not connect to host
-siamega.com: could not connect to host
-siammedia.co: could not connect to host
-siamojo.com: could not connect to host
-sianimacion.com: could not connect to host
-sianipestcontrolinc.com: max-age too low: 0
-sianjhon.com: could not connect to host
-siao-mei.com: did not receive HSTS header
-sibfk.org: could not connect to host
-sibiutourguide.com: did not receive HSTS header
-sichere-kartenakzeptanz.de: could not connect to host
-siciliadigitale.pro: could not connect to host
-sicilyalacarte.com: did not receive HSTS header
-sicken.eu: could not connect to host
-sicklepod.com: could not connect to host
-siconnect.us: did not receive HSTS header
-sictame-tigf.org: could not connect to host
-sideropolisnoticias.com.br: did not receive HSTS header
-sidmax.ca: could not connect to host
-siduga.com: could not connect to host
-siebens.net: could not connect to host
-sieh.es: did not receive HSTS header
-siemencaes.tk: could not connect to host
-sierpinska.eu: could not connect to host
-sieulog.com: could not connect to host
-siewert-kau.de: did not receive HSTS header
-sifls.com: could not connect to host
-sifreuret.com: could not connect to host
-sigmalux.ltd: could not connect to host
-sigmapramuka.com: could not connect to host
-signaltransmitter.de: did not receive HSTS header
-signdesk.com: did not receive HSTS header
-signere.com: could not connect to host
-signere.no: did not receive HSTS header
-signmycode.com: could not connect to host
-signoracle.com: could not connect to host
-signosquecombinam.com.br: could not connect to host
-signrightsigns.co.uk: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-signsdance.uk: could not connect to host
-signup.ly: could not connect to host
-sigsegv.run: could not connect to host
-sigterm.no: could not connect to host
-sihaizixun.net: could not connect to host
-siikarantacamping.fi: did not receive HSTS header
-sijimi.cn: did not receive HSTS header
-sijmenschoon.nl: did not receive HSTS header
-sikatehtaat.fi: did not receive HSTS header
-sikecikcomel.com: could not connect to host
-siku.pro: could not connect to host
-silentcircle.com: did not receive HSTS header
-silentcircle.org: could not connect to host
-silentlink.io: could not connect to host
-silerfamily.net: did not receive HSTS header
-silicagelpackets.ca: did not receive HSTS header
-siliconchip.me: could not connect to host
-silke-hunde.de: did not receive HSTS header
-silkebeckmann.de: did not receive HSTS header
-silkon.net: did not receive HSTS header
-silqueskineyeserum.com: could not connect to host
-silv.tk: could not connect to host
-silvacor-ziegel.de: max-age too low: 604800
-silver-drachenkrieger.de: did not receive HSTS header
-silverback.is: did not receive HSTS header
-silverfirsdental.com: did not receive HSTS header
-silvergoldbull.ba: could not connect to host
-silvergoldbull.bg: could not connect to host
-silvergoldbull.bj: could not connect to host
-silvergoldbull.cl: could not connect to host
-silvergoldbull.cm: could not connect to host
-silvergoldbull.cn: could not connect to host
-silvergoldbull.co: could not connect to host
-silvergoldbull.co.ao: could not connect to host
-silvergoldbull.co.tz: could not connect to host
-silvergoldbull.com.eg: could not connect to host
-silvergoldbull.com.gh: could not connect to host
-silvergoldbull.com.mt: could not connect to host
-silvergoldbull.dj: could not connect to host
-silvergoldbull.do: could not connect to host
-silvergoldbull.ge: could not connect to host
-silvergoldbull.hr: could not connect to host
-silvergoldbull.id: could not connect to host
-silvergoldbull.kg: could not connect to host
-silvergoldbull.ky: could not connect to host
-silvergoldbull.lk: could not connect to host
-silvergoldbull.md: could not connect to host
-silvergoldbull.mk: could not connect to host
-silvergoldbull.ml: could not connect to host
-silvergoldbull.mw: could not connect to host
-silvergoldbull.my: could not connect to host
-silvergoldbull.ph: could not connect to host
-silvergoldbull.ru: could not connect to host
-silvergoldbull.sn: could not connect to host
-silvergoldbull.tg: could not connect to host
-silvergoldbull.tj: could not connect to host
-silvergoldbull.tn: could not connect to host
-silverhome.ninja: could not connect to host
-silveronline.ml: could not connect to host
-silverpvp.com: could not connect to host
-silverseen.com: did not receive HSTS header
-silverstartup.sk: could not connect to host
-silverswanrecruitment.com: did not receive HSTS header
-silviacataldi.com: could not connect to host
-silviamacallister.com: did not receive HSTS header
-silvistefi.com: could not connect to host
-sim-sim.appspot.com: did not receive HSTS header
-simbast.com: could not connect to host
-simbol.id: could not connect to host
-simbolo.co.uk: could not connect to host
-simccorp.com: could not connect to host
-simfri.com: could not connect to host
-simha.online: could not connect to host
-simhaf.cf: could not connect to host
-simmis.fr: could not connect to host
-simobilklub.si: could not connect to host
-simod.org: could not connect to host
-simon-czech.de: did not receive HSTS header
-simon-pokorny.com: did not receive HSTS header
-simon.butcher.name: max-age too low: 2629743
-simon.lc: did not receive HSTS header
-simongong.net: did not receive HSTS header
-simonpaarlberg.com: did not receive HSTS header
-simonpayne.cz: max-age too low: 7776000
-simonsaxon.com: did not receive HSTS header
-simonschmitt.ch: could not connect to host
-simonshine.dk: did not receive HSTS header
-simotrescu.ro: could not connect to host
-simpan.id: could not connect to host
-simpele-recepten.nl: did not receive HSTS header
-simpeo.fr: could not connect to host
-simpleclassiclife.com: could not connect to host
-simplecrypt.io: could not connect to host
-simplefraud.com: could not connect to host
-simpleindianrecipes.com: did not receive HSTS header
-simplelearner.com: could not connect to host
-simplepractice.com: did not receive HSTS header
-simplepress.uk: did not receive HSTS header
-simplerses.com: could not connect to host
-simplesamlphp.org: did not receive HSTS header
-simplexgame.net: could not connect to host
-simplexsupport.com: did not receive HSTS header
-simpliby.com: did not receive HSTS header
-simply.black: could not connect to host
-simplycloud.de: could not connect to host
-simplyenak.com: did not receive HSTS header
-simplylifetips.com: did not receive HSTS header
-simplyrara.com: did not receive HSTS header
-simplystudio.com: did not receive HSTS header
-simpul.nl: did not receive HSTS header
-sims4hub.ga: could not connect to host
-simtin-net.de: could not connect to host
-simukti.net: did not receive HSTS header
-simumiehet.com: could not connect to host
-simyo.nl: did not receive HSTS header
-sin-nombre-alleria.de: could not connect to host
-sin30.net: could not connect to host
-sinakuhestani.ir: could not connect to host
-sinatrafamily.com: did not receive HSTS header
-sincai666.com: could not connect to host
-sinceschool.com: could not connect to host
-sinclairmoving.com: did not receive HSTS header
-sincron.org: could not connect to host
-sincronizateconlosmilagros.com: did not receive HSTS header
-sinefili.com: could not connect to host
-sinful.pw: did not receive HSTS header
-sinfulforums.net: could not connect to host
-singaporemint.com: did not receive HSTS header
-singee.site: could not connect to host
-singerwang.com: did not receive HSTS header
-singul4rity.com: could not connect to host
-sinkip.com: could not connect to host
-sinktank.de: could not connect to host
-sinn.io: did not receive HSTS header
-sinneserweiterung.de: could not connect to host
-sinon.org: did not receive HSTS header
-sinoscandinavia.se: could not connect to host
-sinosky.org: did not receive HSTS header
-sinsastudio.com: did not receive HSTS header
-sinsojb.me: could not connect to host
-sintesysglobal.com: did not receive HSTS header
-sinupret-extract.com.ua: did not receive HSTS header
-sinusbot.online: could not connect to host
-sion.moe: did not receive HSTS header
-sipal.fr: did not receive HSTS header
-sipsik.net: did not receive HSTS header
-sipyuru.com: could not connect to host
-sipyuru.lk: could not connect to host
-siqi.wang: could not connect to host
-siratalmustaqim.com: could not connect to host
-siriad.com: could not connect to host
-sirius-lee.net: could not connect to host
-siro.gq: could not connect to host
-siroop.ch: did not receive HSTS header
-siscompbolivia.tk: could not connect to host
-siseministeerium.ee: did not receive HSTS header
-sisgopro.com: could not connect to host
-sisiengineers.gq: could not connect to host
-sistemasespecializados.com: did not receive HSTS header
-sistemhane.com: did not receive HSTS header
-sistemlash.com: could not connect to host
-sistemos.net: could not connect to host
-sisterjoeworld.com: did not receive HSTS header
-sistersurprise.de: did not receive HSTS header
-sisver.mx: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-site.mu: could not connect to host
-site.pictures: could not connect to host
-siteage.net: did not receive HSTS header
-sitecloudify.com: could not connect to host
-sitecuatui.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-sitehome.eu: did not receive HSTS header
-sitehost.io: did not receive HSTS header
-sitemaxiphilippe.ch: could not connect to host
-sitennisclub.com: did not receive HSTS header
-siterip.org: could not connect to host
-sites.google.com: did not receive HSTS header (error ignored - included regardless)
-sitesecurityscan.com: did not receive HSTS header
-sitesforward.com: did not receive HSTS header
-sitesource101.com: did not receive HSTS header
-sitesten.com: could not connect to host
-sitesuccessful.com: did not receive HSTS header
-sitsy.ru: did not receive HSTS header
-sittinginoblivion.com: did not receive HSTS header
-sitz.ch: did not receive HSTS header
-siwek.xyz: could not connect to host
-sixcorners.info: did not receive HSTS header
-sixcorners.net: did not receive HSTS header
-sixpackholubice.cz: could not connect to host
-sixtwentyten.com: could not connect to host
-sizingservers.be: did not receive HSTS header
-sizuvip.com: could not connect to host
-sizzle.co.uk: did not receive HSTS header
-sja-se-training.com: could not connect to host
-sjatsh.com: did not receive HSTS header
-sjdtaxi.com: did not receive HSTS header
-sjhyl11.com: could not connect to host
-sjis.me: could not connect to host
-sjsc.fr: did not receive HSTS header
-sjsmith.id.au: max-age too low: 7776000
-sjv4u.ch: did not receive HSTS header
-sjzebs.com: could not connect to host
-sjzget.com: could not connect to host
-sjzybs.com: could not connect to host
-sk-net.cz: did not receive HSTS header
-skala.io: did not receive HSTS header
-skalarwelle.eu: could not connect to host
-skandiabanken.no: did not receive HSTS header
-skante.tk: could not connect to host
-skanvordoff.ru: could not connect to host
-skanword.info: did not receive HSTS header
-skaraborgsassistans.com: did not receive HSTS header
-skarox.com: could not connect to host
-skarox.ee: could not connect to host
-skarox.eu: could not connect to host
-skarox.net: could not connect to host
-skarox.ru: could not connect to host
-skates.guru: did not receive HSTS header
-skateswagger.com: could not connect to host
-skena.lt: did not receive HSTS header
-skepneklaw.com: could not connect to host
-sketchmyroom.com: did not receive HSTS header
-sketchywebsite.net: did not receive HSTS header
-ski-insurance.com.au: did not receive HSTS header
-skia.org: did not receive HSTS header
-skid-berlin.de: max-age too low: 3600
-skidstresser.com: could not connect to host
-skilldetector.com: could not connect to host
-skilletfood.com: did not receive HSTS header
-skillled.com: could not connect to host
-skillout.org: did not receive HSTS header
-skillproxy.com: could not connect to host
-skillproxy.net: could not connect to host
-skillproxy.org: could not connect to host
-skills2serve.org: could not connect to host
-skillseo.com: could not connect to host
-skimming.net: did not receive HSTS header
-skinandglamour.com: did not receive HSTS header
-skinbet.co: could not connect to host
-skincases.co: could not connect to host
-skincontracts.co: did not receive HSTS header
-skingame.co: could not connect to host
-skingames.co: could not connect to host
-skinmarket.co: could not connect to host
-skinpwrd.com: could not connect to host
-skins.net: did not receive HSTS header
-skipton.io: could not connect to host
-skischuleulm.de: did not receive HSTS header
-skk.io: did not receive HSTS header
-skks.cz: did not receive HSTS header
-sklepsamsung.pl: did not receive HSTS header
-sklepwielobranzowymd.com: could not connect to host
-skocia.net: did not receive HSTS header
-skoda-clever-lead.de: could not connect to host
-skoda-im-dialog.de: could not connect to host
-skoda-nurdiebesten.de: did not receive HSTS header
-skoda-service-team-cup.de: did not receive HSTS header
-skogsbruket.fi: did not receive HSTS header
-skogskultur.fi: did not receive HSTS header
-skoilly.cn: did not receive HSTS header
-skoleniphp.cz: did not receive HSTS header
-skolni-system.eu: could not connect to host
-skolnieks.lv: could not connect to host
-skolniweby.cz: could not connect to host
-skoloffwolfe.com: did not receive HSTS header
-skommettiamo.it: did not receive HSTS header
-skomski.org: did not receive HSTS header
-skontakt.cz: did not receive HSTS header
-skontorp-enterprise.no: did not receive HSTS header
-skpdev.net: could not connect to host
-skrimix.tk: could not connect to host
-skryptersi.pl: did not receive HSTS header
-sksdrivingschool.com.au: could not connect to host
-skullbite.me: did not receive HSTS header
-skullhouse.nyc: could not connect to host
-sky-aroma.com: could not connect to host
-sky-universe.net: could not connect to host
-skyasker.cn: could not connect to host
-skyasker.com: could not connect to host
-skyblockrebellion.com: could not connect to host
-skybloom.io: could not connect to host
-skybound.link: did not receive HSTS header
-skyeeverest.tk: could not connect to host
-skyflix.me: could not connect to host
-skyingo.net: could not connect to host
-skyline.link: could not connect to host
-skyline.tw: did not receive HSTS header
-skylocker.net: could not connect to host
-skylocker.nl: could not connect to host
-skyminds.net: did not receive HSTS header
-skynethk.com: could not connect to host
-skynetstores.net: did not receive HSTS header
-skynetz.tk: could not connect to host
-skypeassets.com: could not connect to host
-skypoker.com: did not receive HSTS header
-skyris.co: could not connect to host
-skyrunners.ch: could not connect to host
-skysuite.nl: could not connect to host
-skyvault.io: could not connect to host
-skyveo.ml: could not connect to host
-skyway.capital: did not receive HSTS header
-skyworldserver.ddns.net: could not connect to host
-sl-informatique.fr: did not receive HSTS header
-sl-informatique.ovh: could not connect to host
-sl0.us: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-sl1pkn07.wtf: max-age too low: 2592000
-sl66.cc: could not connect to host
-sl899.com: could not connect to host
-sl998.com: could not connect to host
-slalix.pw: could not connect to host
-slalix.xyz: could not connect to host
-slan.fr: could not connect to host
-slane.cn: could not connect to host
-slaps.be: could not connect to host
-slash-dev.de: did not receive HSTS header
-slash64.co.uk: could not connect to host
-slash64.com: did not receive HSTS header
-slash64.uk: could not connect to host
-slashand.co: could not connect to host
-slashdesign.it: did not receive HSTS header
-slashem.me: did not receive HSTS header
-slatemc.fun: could not connect to host
-slatko.io: could not connect to host
-slattery.co: did not receive HSTS header
-slauber.de: did not receive HSTS header
-slaws.io: could not connect to host
-slc.gd: did not receive HSTS header
-sleep10.com: could not connect to host
-sleeping.town: did not receive HSTS header
-sleepingbaghub.com: did not receive HSTS header
-slever.cz: could not connect to host
-sliceone.com: could not connect to host
-slicketl.com: did not receive HSTS header
-slicss.com: could not connect to host
-slides.zone: could not connect to host
-slidesvideo.com: could not connect to host
-slightfuture.click: could not connect to host
-slightfuture.com: did not receive HSTS header
-slik.ai: did not receive HSTS header
-slimk1nd.nl: could not connect to host
-slimmerbouwen.be: did not receive HSTS header
-slingo.com: did not receive HSTS header
-slingooriginals.com: did not receive HSTS header
-slingoweb.com: could not connect to host
-slip-gaming.tk: could not connect to host
-sliteapp.com: did not receive HSTS header
-slix.io: could not connect to host
-sln.cloud: could not connect to host
-slope.haus: could not connect to host
-slotboss.co.uk: did not receive HSTS header
-slovakiana.sk: did not receive HSTS header
-slovoice.org: could not connect to host
-slowfood.es: did not receive HSTS header
-slowsociety.org: could not connect to host
-slrd-isperih.com: could not connect to host
-slse.ca: max-age too low: 0
-slt24.de: did not receive HSTS header
-sluitkampzeist.nl: could not connect to host
-sluplift.com: could not connect to host
-slycurity.de: could not connect to host
-slysend.com: could not connect to host
-sm-supplements.gr: could not connect to host
-sm2016.ch: could not connect to host
-smaaker.com: did not receive HSTS header
-smablo.com: could not connect to host
-smadav.ml: could not connect to host
-small-panda.com: did not receive HSTS header
-smallcdn.rocks: could not connect to host
-smallchat.nl: could not connect to host
-smalldogbreeds.dog: could not connect to host
-smalldogbreeds.net: did not receive HSTS header
-smallpath.me: could not connect to host
-smallshopit.com: could not connect to host
-smart-cloud.store: could not connect to host
-smart-cp.jp: could not connect to host
-smart-media-gmbh.de: could not connect to host
-smart-mirror.de: did not receive HSTS header
-smart-ov.nl: could not connect to host
-smart-shapes.co.uk: could not connect to host
-smart.vet: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-smartass.space: could not connect to host
-smartbiz.vn: could not connect to host
-smartboleta.com: did not receive HSTS header
-smartbuyelectric.com: could not connect to host
-smartcoin.com.br: could not connect to host
-smarterskies.gov: could not connect to host
-smartest-trading.com: could not connect to host
-smartgridsecurity.com: could not connect to host
-smartgridsecurity.org: could not connect to host
-smarthomedna.com: did not receive HSTS header
-smartietop.com: could not connect to host
-smartit.pro: could not connect to host
-smartlend.se: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-smartmail24.de: did not receive HSTS header
-smartmarketingcoaching.com: did not receive HSTS header
-smartmompicks.com: did not receive HSTS header
-smartofficesandsmarthomes.com: did not receive HSTS header
-smartofficeusa.com: did not receive HSTS header
-smartpass.government.ae: did not receive HSTS header
-smartphone-pliable.wtf: could not connect to host
-smartphone.continental.com: could not connect to host
-smartrade.tech: did not receive HSTS header
-smartrak.co.nz: did not receive HSTS header
-smartrecruit.ro: did not receive HSTS header
-smartresumeservices.com: did not receive HSTS header
-smartsvillage.com: did not receive HSTS header
-smartvideo.io: could not connect to host
-smartvita.com: did not receive HSTS header
-smartwank.com: could not connect to host
-smash-gg.club: could not connect to host
-smbeermen.tk: could not connect to host
-smcasino.net: could not connect to host
-smcasino.org: could not connect to host
-smcbox.com: could not connect to host
-smcquistin.uk: did not receive HSTS header
-smdev.fr: could not connect to host
-smet.us: could not connect to host
-smi-a.me: could not connect to host
-smicompact.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-smictecniservi.com: could not connect to host
-smileandpay.com: did not receive HSTS header
-smileawei.com: could not connect to host
-smiledirectsales.com: could not connect to host
-smileserver.com: could not connect to host
-smilingmiao.com: could not connect to host
-smimea.com: could not connect to host
-smirkingwhorefromhighgarden.pro: could not connect to host
-smit.ee: did not receive HSTS header
-smith.bz: could not connect to host
-smith.is: could not connect to host
-smithchow.com: did not receive HSTS header
-smithcountytxtaxrates.gov: could not connect to host
-smithings.com: could not connect to host
-smittix.co.uk: did not receive HSTS header
-smitug.pw: could not connect to host
-smkn1lengkong.sch.id: did not receive HSTS header
-smksi2.com: could not connect to host
-smksultanismail2.com: could not connect to host
-sml.lc: could not connect to host
-smmcab.ru: could not connect to host
-smmcab.website: could not connect to host
-smmlaba.io: could not connect to host
-smokingblendoils.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-smoothics.at: could not connect to host
-smoothics.com: could not connect to host
-smoothics.eu: could not connect to host
-smoothics.mobi: could not connect to host
-smoothics.net: could not connect to host
-smorgasblog.ie: could not connect to host
-smove.sg: did not receive HSTS header
-smow.com: did not receive HSTS header
-smow.de: did not receive HSTS header
-smplix.com: could not connect to host
-smplr.uk: could not connect to host
-smries.com: could not connect to host
-sms1.ro: could not connect to host
-smsben.cn: could not connect to host
-smsben.com: could not connect to host
-smsben.net: could not connect to host
-smskeywords.co.uk: could not connect to host
-smslodging.com: did not receive HSTS header
-smspodmena.ru: could not connect to host
-smtp.bz: did not receive HSTS header
-smtpdev.com: could not connect to host
-smtvonline.com: did not receive HSTS header
-smuhelper.cn: could not connect to host
-smusg.com: did not receive HSTS header
-smutba.se: did not receive HSTS header
-smys.uk: could not connect to host
-snafarms.com: did not receive HSTS header
-snailing.org: could not connect to host
-snake.dog: could not connect to host
-snakehosting.dk: did not receive HSTS header
-snapappts.com: could not connect to host
-snapchat.com: did not receive HSTS header
-snapfinance.com: did not receive HSTS header
-snapnudes.co: could not connect to host
-snaptier.co: did not receive HSTS header
-snaptools.io: could not connect to host
-snapworks.net: did not receive HSTS header
-snarf.in: could not connect to host
-snazzie.nl: could not connect to host
-sneaker.date: could not connect to host
-sneakers88.it: could not connect to host
-sneed.company: could not connect to host
-sneeuwhoogtes.eu: could not connect to host
-sneezry.com: did not receive HSTS header
-snekchat.moe: could not connect to host
-snelwerk.be: did not receive HSTS header
-sng.my: could not connect to host
-snic.website: could not connect to host
-sniderman.pro: could not connect to host
-sniderman.xyz: could not connect to host
-snight.co: could not connect to host
-snip.host: could not connect to host
-snip.run: could not connect to host
-snod.land: did not receive HSTS header
-snopyta.com: could not connect to host
-snoqualmiefiber.org: could not connect to host
-snoringhq.com: did not receive HSTS header
-snovey.com: did not receive HSTS header
-snow-online.de: could not connect to host
-snowalerts.eu: could not connect to host
-snowcrestdesign.com: could not connect to host
-snowdy.eu: could not connect to host
-snowdy.link: could not connect to host
-snowreport.io: could not connect to host
-snowsubs.moe: could not connect to host
-snowyluma.com: could not connect to host
-snowyluma.me: could not connect to host
-snperformance.gr: did not receive HSTS header
-snughealth.org.uk: did not receive HSTS header
-snus123.com: did not receive HSTS header
-snwaterpolo.com: did not receive HSTS header
-so-comm.fr: did not receive HSTS header
-so-healthy.co.uk: did not receive HSTS header
-soacompanhantes.vip: could not connect to host
-sobabox.ru: could not connect to host
-sobeelectronics.com: could not connect to host
-sobelift.com: did not receive HSTS header
-sobinski.pl: did not receive HSTS header
-soboleva-pr.com.ua: could not connect to host
-soccergif.com: could not connect to host
-soccorso-stradale.org: could not connect to host
-sochic.in: could not connect to host
-soci.ml: could not connect to host
-social-journey.com: could not connect to host
-social-media-strategy.org.uk: could not connect to host
-socialbillboard.com: could not connect to host
-socialcs.xyz: could not connect to host
-socialdj.de: did not receive HSTS header
-socialfacecook.com: could not connect to host
-socialgrowing.cl: did not receive HSTS header
-socialhead.io: did not receive HSTS header
-socialhub.com: did not receive HSTS header
-socialmedia.ro: did not receive HSTS header
-socialprize.com: could not connect to host
-socialspirit.com.br: did not receive HSTS header
-socialtraderpartner.com: could not connect to host
-socialweblearning.com: did not receive HSTS header
-socialworkout.com: could not connect to host
-socialworkout.net: could not connect to host
-socialworkout.org: could not connect to host
-socialworkout.tv: could not connect to host
-socketize.com: could not connect to host
-sockeye.cc: could not connect to host
-socomponents.co.uk: could not connect to host
-sodacore.com: could not connect to host
-sodamakerclub.com: did not receive HSTS header
-sofigeleiascaseiras.com.br: did not receive HSTS header
-sofort.com: did not receive HSTS header
-sofortueberweisung.de: did not receive HSTS header
-softart.club: did not receive HSTS header
-softballrampage.com: could not connect to host
-softballsavings.com: did not receive HSTS header
-softbebe.com: did not receive HSTS header
-softclean.pt: did not receive HSTS header
-softonic.com.br: did not receive HSTS header
-softrobot.se: could not connect to host
-softsecmatheodexelle.be: could not connect to host
-software.rocks: could not connect to host
-softwarebetrieb.de: did not receive HSTS header
-softwarebeveiligingtestdomein.be: could not connect to host
-softwaregeek.nl: did not receive HSTS header
-softwarehardenberg.nl: could not connect to host
-softwaresen.com: did not receive HSTS header
-softwoods.com.au: did not receive HSTS header
-sogeek.me: could not connect to host
-sogravatas.net.br: could not connect to host
-sohncloud.my-router.de: could not connect to host
-soia.ca: could not connect to host
-sojingle.net: did not receive HSTS header
-soju.fi: did not receive HSTS header
-sokche.com: did not receive HSTS header
-sokolka.tv: did not receive HSTS header
-sol.works: could not connect to host
-solanum-games.com: could not connect to host
-solaradventures.icu: could not connect to host
-solarcom.com.br: could not connect to host
-solariiknight.org: did not receive HSTS header
-solariilacheie.ro: could not connect to host
-solarium.gov: could not connect to host
-solarpvoffer.co.uk: did not receive HSTS header
-solartrackerapp.com: could not connect to host
-sold.rip: max-age too low: 2592000
-soldbygold.net: did not receive HSTS header
-soldecom.com: did not receive HSTS header
-sole-software.de: did not receive HSTS header
-sole.gmbh: did not receive HSTS header
-solentes.com.br: could not connect to host
-solesoftware.de: did not receive HSTS header
-solidfuelappliancespares.co.uk: did not receive HSTS header
-solidimage.com.br: could not connect to host
-solidtuesday.com: could not connect to host
-solidus.systems: could not connect to host
-solidwebnetworks.co.uk: did not receive HSTS header
-solinter.com.br: did not receive HSTS header
-solisrey.es: could not connect to host
-soljem.com: did not receive HSTS header
-soll-i.ch: did not receive HSTS header
-solmek.com: did not receive HSTS header
-solomo.pt: could not connect to host
-soloshu.co: could not connect to host
-solosmusic.xyz: could not connect to host
-solsystems.ru: could not connect to host
-soltekla.com: did not receive HSTS header
-solunci-loznica.tk: could not connect to host
-solupredperu.com: did not receive HSTS header
-solus-project.com: could not connect to host
-solutionhoisthire.com.au: did not receive HSTS header
-solutions-teknik.com: did not receive HSTS header
-solutive.fi: could not connect to host
-solve-it.se: did not receive HSTS header
-solve.co.uk: did not receive HSTS header
-solymar.co: could not connect to host
-somcase.com.br: did not receive HSTS header
-some.rip: did not receive HSTS header
-somebodycares.org: did not receive HSTS header
-somersetwellbeing.nhs.uk: could not connect to host
-someserver.cf: could not connect to host
-someshit.xyz: could not connect to host
-something-else.cf: could not connect to host
-somethingnew.xyz: could not connect to host
-somethingsimilar.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-somosabc.com: could not connect to host
-somosnoticia.com.br: max-age too low: 0
-somoyorkies.com: could not connect to host
-somp-rp.su: could not connect to host
-sonafe.info: could not connect to host
-sonerezh.bzh: did not receive HSTS header
-songluck.com: did not receive HSTS header
-songsmp3.co: could not connect to host
-songsmp3.info: could not connect to host
-songsmp3.io: could not connect to host
-songsmp3.live: did not receive HSTS header
-songsmp3.me: could not connect to host
-songsmp3.net: did not receive HSTS header
-songsthatsavedyourlife.com: did not receive HSTS header
-soniadoras.pe: could not connect to host
-soniafauville.com: could not connect to host
-sonialive.com: did not receive HSTS header
-sonic.network: could not connect to host
-soninger.ru: could not connect to host
-sonja-daniels.com: could not connect to host
-sonja-kowa.de: could not connect to host
-sonkonews.com: did not receive HSTS header
-sonomacounty.gov: could not connect to host
-sonyforum.no: did not receive HSTS header
-soobi.org: did not receive HSTS header
-soodwatthanaphon.net: could not connect to host
-soolid.tech: could not connect to host
-soondy.com: did not receive HSTS header
-soothemobilemassage.com.au: did not receive HSTS header
-soph.us: could not connect to host
-sopher.io: did not receive HSTS header
-sophieandtrey.com: did not receive HSTS header
-soply.com: did not receive HSTS header
-soporte.cc: did not receive HSTS header
-soquee.net: could not connect to host
-soraiaschneider.com.br: could not connect to host
-sorellecollection.com.au: could not connect to host
-soren.xyz: could not connect to host
-sorenam.com: did not receive HSTS header
-sorensen-online.com: could not connect to host
-sorex.photo: did not receive HSTS header
-sorinmuntean.ro: did not receive HSTS header
-sortaweird.net: could not connect to host
-sortingwizard.com: could not connect to host
-soruly.com: did not receive HSTS header
-sorx.tech: could not connect to host
-sos.de: did not receive HSTS header
-sosaka.ml: did not receive HSTS header
-sosaka.tk: could not connect to host
-sosecu.red: could not connect to host
-sosesh.shop: could not connect to host
-sosiolog.com: could not connect to host
-sospromotions.com.au: did not receive HSTS header
-sot-te.ch: did not receive HSTS header
-sotadb.info: could not connect to host
-sotai.tk: could not connect to host
-sotavasara.net: did not receive HSTS header
-sotiran.com: could not connect to host
-sotor.de: did not receive HSTS header
-sotthewes.nl: did not receive HSTS header
-sou-co.jp: did not receive HSTS header
-soubriquet.org: could not connect to host
-soucorneteiro.com.br: could not connect to host
-sougi-review.top: did not receive HSTS header
-soulc.ml: could not connect to host
-soulcraft-cracked.de: did not receive HSTS header
-soulcraft.bz: could not connect to host
-soulcrazy.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-soulema.com: could not connect to host
-soulfulglamour.uk: could not connect to host
-souly.cc: could not connect to host
-soundbytemedia.com: did not receive HSTS header
-soundedj.com.br: could not connect to host
-soundhunter.xyz: could not connect to host
-soundonsound.com: did not receive HSTS header
-soundorabilia.com: did not receive HSTS header
-soundsecurity.io: could not connect to host
-souqtajmeel.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-souravsaha.com: max-age too low: 0
-sourcecode.love: could not connect to host
-sourcelair.com: did not receive HSTS header
-sourcely.net: could not connect to host
-southcoastkitesurf.co.uk: did not receive HSTS header
-southernjamusa.com: did not receive HSTS header
-southernlights.cf: could not connect to host
-southernlights.gq: could not connect to host
-southernstructuralsolutions.com: did not receive HSTS header
-southgale.condos: could not connect to host
-southmelbourne.apartments: could not connect to host
-southside-crew.club: could not connect to host
-southsidebargaincenter.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-southwaymotors.com: did not receive HSTS header
-southwesteventhire.co.uk: did not receive HSTS header
-southwindsor-ct.gov: did not receive HSTS header
-southworcestershiregpservices.co.uk: could not connect to host
-soutien-naissance.com: could not connect to host
-souvik.me: did not receive HSTS header
-souyar.de: could not connect to host
-souyar.net: could not connect to host
-souyar.us: could not connect to host
-soved.eu: did not receive HSTS header
-sovereignpcs.com: could not connect to host
-sovereignshare.com: could not connect to host
-sown.dyndns.org: could not connect to host
-sowncloud.de: could not connect to host
-soz6.com: did not receive HSTS header
-sp.rw: could not connect to host
-space-y.cf: could not connect to host
-spacedirectory.org: could not connect to host
-spacedust.xyz: could not connect to host
-spacefish.biz: did not receive HSTS header
-spacehq.org: could not connect to host
-spacelabs.io: could not connect to host
-spacemo.com: did not receive HSTS header
-spacewallpaperhd.com: could not connect to host
-spacountryexplorer.org.au: could not connect to host
-spaggel.nl: could not connect to host
-spakhmer.com: did not receive HSTS header
-spam.lol: could not connect to host
-spanch.cf: could not connect to host
-spanch.ga: could not connect to host
-spanch.gq: could not connect to host
-spanch.ml: could not connect to host
-spanch.tk: could not connect to host
-spanchelele.cf: could not connect to host
-spanchelele.ga: could not connect to host
-spanchelele.gq: could not connect to host
-spanchelele.ml: could not connect to host
-spanchelele.tk: could not connect to host
-spanda.io: could not connect to host
-spangehlassociates.com: did not receive HSTS header
-spanien.guide: could not connect to host
-spar-ni.co.uk: did not receive HSTS header
-sparendirekt.at: could not connect to host
-spark.team: could not connect to host
-sparkbase.cn: could not connect to host
-sparkl.fm: could not connect to host
-sparklatvia.lv: could not connect to host
-sparklingsparklers.com: did not receive HSTS header
-sparkresearch.net: could not connect to host
-sparkwood.org: could not connect to host
-sparkz.no: did not receive HSTS header
-sparprofi.at: could not connect to host
-sparsa.army: could not connect to host
-sparta-solutions.de: could not connect to host
-sparta-trade.com: did not receive HSTS header
-spartaconsulting.fi: did not receive HSTS header
-spartantheatre.org: could not connect to host
-sparxsolutions.be: could not connect to host
-spatzenwerkstatt.de: could not connect to host
-spauted.com: could not connect to host
-spawn.cz: could not connect to host
-spcx.eu: could not connect to host
-spd-pulheim-mitte.de: did not receive HSTS header
-spdysync.com: could not connect to host
-speakingdiligence.com: did not receive HSTS header
-specdver.ru: did not receive HSTS header
-specialedesigns.com: could not connect to host
-specialistnow.com.au: did not receive HSTS header
-specialized-hosting.eu: could not connect to host
-spectre.com.br: could not connect to host
-spectreattack.com: did not receive HSTS header
-spectroom.space: did not receive HSTS header
-spectrosoftware.de: could not connect to host
-speculor.net: could not connect to host
-spedition-transport-umzug.de: could not connect to host
-spedizioni.roma.it: could not connect to host
-spedplus.com.br: did not receive HSTS header
-speed-mailer.com: could not connect to host
-speedboost.de: did not receive HSTS header
-speedcounter.net: could not connect to host
-speeder.cf: could not connect to host
-speeders.cf: could not connect to host
-speeders.ga: could not connect to host
-speeds.vip: could not connect to host
-speedway.com.pl: did not receive HSTS header
-speedyprep.com: did not receive HSTS header
-speidel.com.tr: did not receive HSTS header
-spencerbaer.com: could not connect to host
-spendwise.com.au: could not connect to host
-sperec.fr: did not receive HSTS header
-sperohub.com: could not connect to host
-sperohub.io: could not connect to host
-sperohub.lt: could not connect to host
-sphereblur.com: could not connect to host
-sphinx.network: could not connect to host
-spicydog.tk: did not receive HSTS header
-spicywombat.com: could not connect to host
-spidermail.tk: could not connect to host
-spidernet.tk: could not connect to host
-spiegel21.de: did not receive HSTS header
-spiegels-op-maat.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-spiegels.nl: did not receive HSTS header
-spiel-teppich.de: could not connect to host
-spielcasinos.com: did not receive HSTS header
-spiellawine.de: could not connect to host
-spikeykc.me: could not connect to host
-spilled.ink: did not receive HSTS header
-spillersfamily.net: could not connect to host
-spilogkoder.dk: could not connect to host
-spilsbury.io: could not connect to host
-spinalo.se: did not receive HSTS header
-spindle.com.ph: could not connect to host
-spindrift.com: did not receive HSTS header
-spineandscoliosis.com: did not receive HSTS header
-spinner.dnshome.de: could not connect to host
-spinor.im: could not connect to host
-spira-group.eu: did not receive HSTS header
-spiralschneiderkaufen.de: could not connect to host
-spirit-dev.net: max-age too low: 0
-spirit-of-sahara.de: did not receive HSTS header
-spiritbionic.ro: could not connect to host
-spiritfanfics.com: did not receive HSTS header
-spiritualregression.com.au: did not receive HSTS header
-spisoggrin.dk: could not connect to host
-spitefultowel.com: did not receive HSTS header
-spitfireuav.com: could not connect to host
-spititout.it: could not connect to host
-splash.solar: did not receive HSTS header
-split.is: could not connect to host
-splunk.zone: could not connect to host
-spm.tv: could not connect to host
-spmswiss.com: did not receive HSTS header
-spoketwist.com: did not receive HSTS header
-spokonline.com: could not connect to host
-spon.cz: did not receive HSTS header
-sponsor.network: max-age too low: 10368000
-sponsormatch.eu: did not receive HSTS header
-sponsorowani.pl: did not receive HSTS header
-sponsortobias.com: could not connect to host
-spookyinternet.com: could not connect to host
-sporara.com: could not connect to host
-sporcard.com: did not receive HSTS header
-sportakrobatik.at: could not connect to host
-sportchirp-internal.azurewebsites.net: did not receive HSTS header
-sportflash.info: did not receive HSTS header
-sporthit.ru: could not connect to host
-sportifik.com: did not receive HSTS header
-sportingoods.com.br: could not connect to host
-sportressofblogitude.com: did not receive HSTS header
-sportscollection.com.br: could not connect to host
-sportsmanadvisor.com: could not connect to host
-sportsmole.co.uk: did not receive HSTS header
-sportstraineradvisor.com: could not connect to host
-spot-events.com: could not connect to host
-spoters.co: could not connect to host
-spotifyripper.tk: could not connect to host
-spotlightsrule.com: could not connect to host
-spotsylvaniacounty-va.gov: could not connect to host
-spotsylvaniacountyva.gov: could not connect to host
-spotteredu.com: did not receive HSTS header
-spotterpix.de: did not receive HSTS header
-spotzlight.tk: did not receive HSTS header
-spr.id.au: could not connect to host
-sprayforce.com: did not receive HSTS header
-spreadsheets.google.com: did not receive HSTS header (error ignored - included regardless)
-spreadthenews.eu: could not connect to host
-spree.co.za: did not receive HSTS header
-spresso.me: did not receive HSTS header
-sprigings.com: did not receive HSTS header
-springreizen.nl: did not receive HSTS header
-springsoffthegrid.com: could not connect to host
-sprinklermanohio.com: did not receive HSTS header
-sprint.ml: did not receive HSTS header
-sprk.fitness: could not connect to host
-spro.in: could not connect to host
-sproing.ca: max-age too low: 0
-sproktz.com: could not connect to host
-sproutconnections.com: could not connect to host
-sprueche-zum-valentinstag.de: could not connect to host
-sprueche-zur-geburt.info: could not connect to host
-sprueche-zur-hochzeit.de: could not connect to host
-sprueche-zur-konfirmation.de: could not connect to host
-spt.tf: could not connect to host
-sptr.blog: could not connect to host
-spumanti.dk: did not receive HSTS header
-sputnik1net.org: could not connect to host
-spykedigital.com: could not connect to host
-spyroszarzonis.com: did not receive HSTS header
-sqetsa.com: did not receive HSTS header
-sqkaccountancy.co.uk: did not receive HSTS header
-squaddraft.com: did not receive HSTS header
-square.gs: could not connect to host
-squarelab.it: could not connect to host
-squareonebgc.com.ph: could not connect to host
-squatldf.org: could not connect to host
-squawk.cc: could not connect to host
-squeakie.club: could not connect to host
-squeakql.online: could not connect to host
-squids.space: could not connect to host
-squirtingpussygirl.com: could not connect to host
-squirtlesbians.net: could not connect to host
-sqzryang.com: could not connect to host
-sr-cs.net: did not receive HSTS header
-srcc.fr: could not connect to host
-sreeharis.tk: could not connect to host
-srevilak.net: did not receive HSTS header
-srinivasan.io: could not connect to host
-sritest.io: could not connect to host
-srmaximo.com: could not connect to host
-srna.sk: did not receive HSTS header
-srochnyj-zajm.ga: could not connect to host
-srolim.com: could not connect to host
-srpdb.com: did not receive HSTS header
-srrr.ca: could not connect to host
-srun.in: could not connect to host
-srv.solutions: did not receive HSTS header
-srvc.io: did not receive HSTS header
-srvonfire.com: could not connect to host
-srx.sx: could not connect to host
-ss-free.net: could not connect to host
-ss-x.ru: did not receive HSTS header
-ss.wtf: could not connect to host
-ss5197.co: could not connect to host
-ss6729.co: could not connect to host
-ss6729.com: did not receive HSTS header
-ss6957.co: could not connect to host
-ss9297.co: could not connect to host
-ss9397.com: did not receive HSTS header
-ss9728.co: could not connect to host
-ssc8809.com: max-age too low: 0
-ssccp.am: could not connect to host
-sscd.no: could not connect to host
-ssco.xyz: could not connect to host
-ssconn.com: could not connect to host
-ssdservers.co.uk: did not receive HSTS header
-ssh-keys.online: did not receive HSTS header
-ssh.nu: did not receive HSTS header
-sshd.site: could not connect to host
-sshool.at: could not connect to host
-sshx.top: could not connect to host
-ssl.panoramio.com: did not receive HSTS header
-ssl.rip: could not connect to host
-ssl888.com: could not connect to host
-sslcertificateshop.com: did not receive HSTS header
-ssld.de: did not receive HSTS header
-ssldecoder.org: could not connect to host
-ssldev.net: could not connect to host
-sslzilla.de: did not receive HSTS header
-ssmato.me: could not connect to host
-ssmm88.cc: could not connect to host
-ssn1.ru: did not receive HSTS header
-ssnet.vip: could not connect to host
-sso.to: could not connect to host
-sspanda.com: did not receive HSTS header
-ssrfq.com: could not connect to host
-ssrjiedian.com: did not receive HSTS header
-ssrvpn.tech: could not connect to host
-sss3s.com: could not connect to host
-sstewartgallus.com: did not receive HSTS header
-ssuc.net: could not connect to host
-ssworld.ga: could not connect to host
-st-li.com: could not connect to host
-staack.com: could not connect to host
-stabletoken.com: could not connect to host
-staceyhankeinc.com: did not receive HSTS header
-stackfiles.io: could not connect to host
-stackhub.cc: could not connect to host
-stacklasvegas.com: could not connect to host
-stacktrace.sh: could not connect to host
-stacyscbdoil.com: did not receive HSTS header
-stadionmanager.com: could not connect to host
-stadjerspasonline.nl: could not connect to host
-stadt-apotheke-muensingen.de: did not receive HSTS header
-stadtgartenla.com: could not connect to host
-stadtpapa.de: could not connect to host
-staffhunt.org.uk: did not receive HSTS header
-staffjoy.com: did not receive HSTS header
-staffjoystaging.com: could not connect to host
-stagend.com: did not receive HSTS header
-stagingjobshq.com: did not receive HSTS header
-stahl.xyz: could not connect to host
-stahlfeuer-ofenwerkstatt.de: did not receive HSTS header
-stainternational.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-stakeshare.org: could not connect to host
-stakestrategy.com: could not connect to host
-stalkerhispano.com: max-age too low: 0
-stall-zur-linde.de: did not receive HSTS header
-stalschermer.nl: could not connect to host
-stamboommuller.nl: did not receive HSTS header
-stamboomvanderwal.nl: did not receive HSTS header
-stamonicatourandtravel.com: could not connect to host
-stampederadon.com: could not connect to host
-stanandjerre.org: could not connect to host
-standardssuck.org: did not receive HSTS header
-standingmist.com: did not receive HSTS header
-standuppaddlesports.com.au: did not receive HSTS header
-stang.moe: did not receive HSTS header
-stannahtrapliften.nl: did not receive HSTS header
-star-one.co.uk: could not connect to host
-star-stuff.de: did not receive HSTS header
-star.do: did not receive HSTS header
-starandshield.com: did not receive HSTS header
-starapple.nl: did not receive HSTS header
-starcafe.me: could not connect to host
-stardeeps.net: max-age too low: 0
-stardust-entertainments.co.uk: could not connect to host
-starease.com: could not connect to host
-starfeeling.net: could not connect to host
-starfixreparaciones.com: did not receive HSTS header
-starfm.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-stargarder-jungs.de: did not receive HSTS header
-stargatedesign.com: did not receive HSTS header
-stargatepartners.com: did not receive HSTS header
-starinvestors.in: could not connect to host
-starking.net.cn: could not connect to host
-starmusic.ga: could not connect to host
-starphotoboothsni.co.uk: could not connect to host
-starplatinum.jp: could not connect to host
-starport.com.au: did not receive HSTS header
-starquake.nl: did not receive HSTS header
-starretest.nl: could not connect to host
-starsam80.net: could not connect to host
-starsbattle.net: could not connect to host
-starsing.bid: could not connect to host
-starteesforsale.co.za: did not receive HSTS header
-startergen.com: did not receive HSTS header
-startloop.org: could not connect to host
-startnowmakingmoneyonline.com: did not receive HSTS header
-startsamenvitaal.nu: could not connect to host
-starttraffic.com: did not receive HSTS header
-startup.melbourne: could not connect to host
-startupgenius.org: did not receive HSTS header
-startuplevel.com: could not connect to host
-startuponcloud.com: max-age too low: 2678400
-startuppeople.co.uk: did not receive HSTS header
-startupum.ru: could not connect to host
-starwatches.eu: could not connect to host
-starwins.co.uk: could not connect to host
-stash.ai: did not receive HSTS header
-state-of-body-and-mind.com: could not connect to host
-state-sponsored-actors.net: could not connect to host
-statebuildinggroup.com: did not receive HSTS header
-statementinsertsforless.com: did not receive HSTS header
-stateofexception.io: could not connect to host
-statgram.me: could not connect to host
-static-692b8c32.de: could not connect to host
-static-assets.io: could not connect to host
-static.hosting: could not connect to host
-static.or.at: could not connect to host
-static.today: could not connect to host
-staticisnoise.com: could not connect to host
-staticline.de: did not receive HSTS header
-stationaryjourney.com: did not receive HSTS header
-stationatbuckscounty.com: did not receive HSTS header
-stationatlyndhurst.com: did not receive HSTS header
-stationatwillowgrove.com: did not receive HSTS header
-stationcharlie.com: did not receive HSTS header
-stationnementdenuit.ca: did not receive HSTS header
-status-sprueche.de: could not connect to host
-status.coffee: could not connect to host
-statusbot.io: could not connect to host
-statuschecks.net: could not connect to host
-stav.io: did not receive HSTS header
-stavebnice.net: could not connect to host
-staxflax.tk: could not connect to host
-stay.black: could not connect to host
-stayokhotelscdc-mailing.com: could not connect to host
-stb-strzyzewski.de: did not receive HSTS header
-stcomex.com: could not connect to host
-stdev.org: could not connect to host
-stdev.top: could not connect to host
-steakhaus-zumdorfbrunnen.de: did not receive HSTS header
-stealthpressurewashers.com: did not receive HSTS header
-steampunkrobot.com: did not receive HSTS header
-steamscore.info: could not connect to host
-steborio.pw: could not connect to host
-steckel.cc: did not receive HSTS header
-stedbg.net: could not connect to host
-steelbea.ms: could not connect to host
-steelrhino.co: could not connect to host
-steem.io: did not receive HSTS header
-steenackers.be: did not receive HSTS header
-stefanovski.io: could not connect to host
-stefanweiser.de: did not receive HSTS header
-steffi-in-australien.com: could not connect to host
-stegmaier-immobilien.de: did not receive HSTS header
-steigerplank.com: did not receive HSTS header
-stelinauto.com: did not receive HSTS header
-stellarvale.net: did not receive HSTS header
-stellen.ch: did not receive HSTS header
-stem.is: did not receive HSTS header
-stemapp.io: did not receive HSTS header
-stemsims.com: did not receive HSTS header
-stepbymestudios.co.uk: did not receive HSTS header
-stepbystep3d.com: did not receive HSTS header
-steph-autoecole.ch: did not receive HSTS header
-steph3n.me: could not connect to host
-stephane-huc.net: could not connect to host
-stephanierxo.com: did not receive HSTS header
-stephanos.me: did not receive HSTS header
-stephenandburns.com: did not receive HSTS header
-stephensolis.net: could not connect to host
-stephensolisrey.es: could not connect to host
-steplogictalent.com: could not connect to host
-steponedanceclub.uk: could not connect to host
-sterjoski.com: did not receive HSTS header
-sterlingheights.gov: could not connect to host
-sterlingleads.co.uk: did not receive HSTS header
-sterlitamak.tk: could not connect to host
-stetspa.it: could not connect to host
-steuerberater-essen-steele.com: could not connect to host
-steuerkanzlei-und-wirtschaftsberater-manke.de: could not connect to host
-steuerseminare-graf.de: did not receive HSTS header
-steve.kiwi: could not connect to host
-stevechekblain.win: could not connect to host
-stevemario.com: could not connect to host
-stevemason.tk: did not receive HSTS header
-stevemonteyne.be: could not connect to host
-stevengoodpaster.com: could not connect to host
-stevenhumphrey.uk: did not receive HSTS header
-stevenkwan.me: could not connect to host
-stevenlepen.fr: did not receive HSTS header
-stevenroddis.com: could not connect to host
-stevensheffey.me: could not connect to host
-stevensononthe.net: did not receive HSTS header
-steventruesdell.com: could not connect to host
-stevezheng.tk: could not connect to host
-stewartremodelingadvantage.com: could not connect to host
-stewonet.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-stge.uk: could not connect to host
-stgm.org: did not receive HSTS header
-sthelensoregon.gov: did not receive HSTS header
-stichtingscholierenvervoerzeeland.nl: could not connect to host
-stickerparadise.me: could not connect to host
-sticklerjs.org: could not connect to host
-stickmanventures.com: did not receive HSTS header
-stickmy.cn: could not connect to host
-stickswag.cf: could not connect to host
-stickswag.eu: could not connect to host
-stiebel.co.nz: did not receive HSTS header
-stiebel.com.au: did not receive HSTS header
-stiebelservice.com.au: did not receive HSTS header
-stiebelstore.com.au: did not receive HSTS header
-stiens.de: did not receive HSTS header
-stiffordacademy.org.uk: did not receive HSTS header
-stig.io: did not receive HSTS header
-stiger.me: could not connect to host
-stigroom.com: could not connect to host
-stijncrevits.be: did not receive HSTS header
-stikkie.me: could not connect to host
-stilettomoda.com.br: did not receive HSTS header
-stillblackhat.id: could not connect to host
-stillnessproject.com: did not receive HSTS header
-stillyarts.com: did not receive HSTS header
-stinkytrashhound.com: could not connect to host
-stirlingpoon.net: could not connect to host
-stirlingpoon.xyz: could not connect to host
-stitthappens.com: could not connect to host
-stjameslititz.org: did not receive HSTS header
-stjohnmiami.org: did not receive HSTS header
-stjohnsc.com: could not connect to host
-stkbn.com: could not connect to host
-stkeverneparishcouncil.org.uk: did not receive HSTS header
-stl.news: did not receive HSTS header
-stln.ml: could not connect to host
-stlucasmuseum.org: did not receive HSTS header
-stmarkcharlotte.org: did not receive HSTS header
-stmaryextra.uk: could not connect to host
-stmbgr.com: could not connect to host
-stmosesbookstore.org: did not receive HSTS header
-stn.me.uk: did not receive HSTS header
-stnevis.ru: could not connect to host
-stnl.de: could not connect to host
-sto500.com.ua: could not connect to host
-stocknxt.com: could not connect to host
-stockrow.com: did not receive HSTS header
-stockseyeserum.com: could not connect to host
-stocktout.info: could not connect to host
-stocktrade.de: could not connect to host
-stoeckidsign.de: did not receive HSTS header
-stoffe-monster.de: did not receive HSTS header
-stoffelen.nl: did not receive HSTS header
-stoianlawfirm.com: could not connect to host
-stoick.me: could not connect to host
-stolbart.com: could not connect to host
-stole-my.bike: did not receive HSTS header
-stole-my.tv: could not connect to host
-stolensheep.tk: could not connect to host
-stolkschepen.nl: did not receive HSTS header
-stomadental.com: did not receive HSTS header
-stonecutterscommunity.com: could not connect to host
-stonefusion.org.uk: could not connect to host
-stonemain.eu: could not connect to host
-stonemanbrasil.com.br: could not connect to host
-stonewuu.com: could not connect to host
-stopakwardhandshakes.org: could not connect to host
-stopbreakupnow.org: could not connect to host
-stopjunkmail.co.uk: could not connect to host
-stopwoodfin.org: could not connect to host
-storbritannien.guide: could not connect to host
-store-host.com: did not receive HSTS header
-store10.de: could not connect to host
-storecove.com: did not receive HSTS header
-storeden.com: did not receive HSTS header
-storedieu.com: could not connect to host
-storeprice.co.uk: did not receive HSTS header
-storeprijs.nl: did not receive HSTS header
-storiesofhealth.org: could not connect to host
-storm-family.com: did not receive HSTS header
-storm-family.nl: could not connect to host
-stormhub.org: could not connect to host
-stormwatcher.org: could not connect to host
-stormyyd.com: max-age too low: 0
-storytea.top: could not connect to host
-storzrealty.com: did not receive HSTS header
-stpatricksguild.com: did not receive HSTS header
-stqry.com: could not connect to host
-str0.at: did not receive HSTS header
-str8hd.com: could not connect to host
-str92.com: could not connect to host
-straat.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-straight2porn.com: could not connect to host
-stralingsonzin.com: could not connect to host
-strange.ga: could not connect to host
-strangeplace.net: did not receive HSTS header
-strangescout.me: could not connect to host
-strasweb.fr: did not receive HSTS header
-strategos.co: could not connect to host
-stratuscloudconsulting.cn: did not receive HSTS header
-stratuscloudconsulting.co.uk: did not receive HSTS header
-stratuscloudconsulting.co.za: did not receive HSTS header
-stratuscloudconsulting.com: did not receive HSTS header
-stratuscloudconsulting.in: did not receive HSTS header
-stratuscloudconsulting.info: did not receive HSTS header
-stratuscloudconsulting.org: did not receive HSTS header
-strbt.de: could not connect to host
-strchr.com: did not receive HSTS header
-stream-ing.xyz: could not connect to host
-stream.pub: could not connect to host
-streamblur.net: could not connect to host
-streamdesk.ca: did not receive HSTS header
-streamer.tips: did not receive HSTS header
-streamingargentino.info: did not receive HSTS header
-streamingeverywhere.com: could not connect to host
-streamingmagazin.de: could not connect to host
-streamlineautogroup.com: did not receive HSTS header
-streampleasure.xyz: could not connect to host
-streams.dyndns.org: could not connect to host
-streamthemeeting.com: did not receive HSTS header
-streamzilla.com: did not receive HSTS header
-street-smart-home.de: did not receive HSTS header
-strehl.tk: could not connect to host
-streklhof.at: did not receive HSTS header
-strelitzia02.com: could not connect to host
-stressfreehousehold.com: did not receive HSTS header
-stretchpc.com: could not connect to host
-strictlynormal.com: could not connect to host
-strictlysudo.com: could not connect to host
-strife.tk: could not connect to host
-strikers.cf: could not connect to host
-strila.me: could not connect to host
-stringbeanstudio.com: did not receive HSTS header
-striptizer.tk: could not connect to host
-strming.com: could not connect to host
-stroeercrm.de: could not connect to host
-strommenhome.com: did not receive HSTS header
-strongest-privacy.com: could not connect to host
-strongmail.de: could not connect to host
-strongohio.gov: could not connect to host
-strongtowerpc.com: could not connect to host
-strousberg.de: could not connect to host
-stroyka-iz-brusa.ru: could not connect to host
-strrl.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-structure.systems: could not connect to host
-struxureon.com: did not receive HSTS header
-stsolarenerji.com: could not connect to host
-stuartbaxter.co: could not connect to host
-stuarts.xyz: did not receive HSTS header
-stubbings.eu: could not connect to host
-stuco.co: could not connect to host
-student-scientist.org: did not receive HSTS header
-student.andover.edu: could not connect to host
-studentfintech.com: did not receive HSTS header
-studentloans.gov: did not receive HSTS header
-studentrdh.com: did not receive HSTS header
-studentresearcher.org: did not receive HSTS header
-studentrightsadvocate.org: could not connect to host
-studentskydenik.cz: could not connect to host
-studenttravel.cz: could not connect to host
-studer.su: could not connect to host
-studiemeter.nl: did not receive HSTS header
-studienportal.eu: could not connect to host
-studienservice.de: did not receive HSTS header
-studiereader.nl: did not receive HSTS header
-studinf.xyz: could not connect to host
-studio-fotografico.ru: could not connect to host
-studio-panic.com: could not connect to host
-studio44.fit: did not receive HSTS header
-studiocn.cn: could not connect to host
-studiodentisticosanmarco.it: could not connect to host
-studiodoprazer.com.br: could not connect to host
-studiokilund.se: did not receive HSTS header
-studiopop.com.br: could not connect to host
-studiotrece.com: did not receive HSTS header
-studiozelden.com: did not receive HSTS header
-studisys.net: could not connect to host
-studlan.no: max-age too low: 0
-studport.rv.ua: could not connect to host
-studyabroadstation.com: did not receive HSTS header
-studybay.com: did not receive HSTS header
-studydrive.net: did not receive HSTS header
-studyhub.cf: did not receive HSTS header
-studying-neet.com: could not connect to host
-studytale.com: could not connect to host
-stuffiwouldbuy.com: could not connect to host
-stugb.de: did not receive HSTS header
-stumeta2018.de: could not connect to host
-stumf.si: could not connect to host
-stupidstatetricks.com: could not connect to host
-sturbi.de: did not receive HSTS header
-sturbock.me: did not receive HSTS header
-sturdio.com.br: could not connect to host
-sturge.co.uk: could not connect to host
-stutsmancounty.gov: did not receive HSTS header
-stuttgart-gablenberg.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-stuudium.cloud: could not connect to host
-stuudium.life: could not connect to host
-stuur.nl: did not receive HSTS header
-styel.io: could not connect to host
-stylaq.com: could not connect to host
-stylebajumuslim.com: could not connect to host
-stylenda.com: could not connect to host
-styles.pm: could not connect to host
-stylle.me: could not connect to host
-styloeart.com: could not connect to host
-stylusgroup.pw: did not receive HSTS header
-stytt.com: could not connect to host
-suaraangin.com: could not connect to host
-suave.io: did not receive HSTS header
-subarulegends.com: could not connect to host
-subbing.work: could not connect to host
-subculture.live: did not receive HSTS header
-subeesu.com: could not connect to host
-subhacker.net: could not connect to host
-sublevel.net: did not receive HSTS header
-sublimebits.com: could not connect to host
-sublimetours.com: did not receive HSTS header
-subrain.com: did not receive HSTS header
-subrosa.io: did not receive HSTS header
-subrosr.com: could not connect to host
-subtasks.co: could not connect to host
-subterfuge.io: did not receive HSTS header
-subtitle.rip: could not connect to host
-subtitry.ru: could not connect to host
-subtlelonging.com: did not receive HSTS header
-subwayz.de: did not receive HSTS header
-subzerolosangeles.com: did not receive HSTS header
-subzerotech.co.uk: could not connect to host
-succ.in: could not connect to host
-successwithflora.com: could not connect to host
-succubus.network: could not connect to host
-succubus.xxx: could not connect to host
-suchprogrammer.net: did not receive HSTS header
-suchtv.pk: did not receive HSTS header
-sudo-i.net: could not connect to host
-sudo.im: could not connect to host
-sudo.li: did not receive HSTS header
-sudo.org.au: did not receive HSTS header
-sudocat.me: could not connect to host
-sudosu.fr: could not connect to host
-sudya-dredd.ru: did not receive HSTS header
-suempresa.cloud: could not connect to host
-sufarce.com: could not connect to host
-suffa.ac: did not receive HSTS header
-suffts.de: could not connect to host
-sugarandcloth.com: did not receive HSTS header
-sugarcitycon.com: could not connect to host
-sugarfactory.cz: did not receive HSTS header
-sugarhillsfarm.com: could not connect to host
-sugarlandkarate.net: did not receive HSTS header
-sugarmillmanagement.com: did not receive HSTS header
-sugarsweetorsour.com: did not receive HSTS header
-sugartownfarm.com: could not connect to host
-suite73.org: could not connect to host
-suited21.com: could not connect to host
-suitocracy.com: could not connect to host
-sujatadev.in: could not connect to host
-suko.pe: could not connect to host
-sukoyakapp.com: could not connect to host
-suksesbisnisonline.id: did not receive HSTS header
-sullenholland.nl: could not connect to host
-summa-prefis.com: did not receive HSTS header
-summer.ga: could not connect to host
-summermc.cc: could not connect to host
-summershomes.com: did not receive HSTS header
-summitcountyboe.gov: did not receive HSTS header
-summitmasters.net: could not connect to host
-sumoscout.de: did not receive HSTS header
-sumthing.com: could not connect to host
-sun-leo.co.jp: did not receive HSTS header
-sun.re: could not connect to host
-sunboxstore.jp: did not receive HSTS header
-suncountrymarine.com: could not connect to host
-sundanceusa.com: did not receive HSTS header
-suneilpatel.com: could not connect to host
-sunfeathers.net: could not connect to host
-sunfireshop.com.br: could not connect to host
-sunfulong.blog: could not connect to host
-sunfulong.me: could not connect to host
-sungari.ru: did not receive HSTS header
-suniru.com: did not receive HSTS header
-sunlandsg.vn: did not receive HSTS header
-sunnibangla.com: did not receive HSTS header
-sunnistan.in: could not connect to host
-sunnyfruit.ru: could not connect to host
-sunnylyx.com: could not connect to host
-sunplay.host: could not connect to host
-sunriseafricarelief.com: could not connect to host
-sunset.im: did not receive HSTS header
-sunshinepress.org: did not receive HSTS header
-sunsmartresorts.com: could not connect to host
-sunxchina.com: could not connect to host
-sunyanzi.tk: could not connect to host
-sunyataherb.com: could not connect to host
-suool.net: did not receive HSTS header
-suos.io: could not connect to host
-suourl.com: could not connect to host
-supastuds.com: did not receive HSTS header
-supcoronado.com: did not receive HSTS header
-supcro.com: could not connect to host
-supedi.com: did not receive HSTS header
-supedi.de: did not receive HSTS header
-super-demarche.com: did not receive HSTS header
-super-garciniaslim.com: could not connect to host
-super-o-blog.com: could not connect to host
-super-puper.su: did not receive HSTS header
-super-radiant-skin.com: could not connect to host
-super-ripped-power.com: could not connect to host
-super-slim-coffee.com: could not connect to host
-superbabysitting.ch: could not connect to host
-superbike.tw: could not connect to host
-superbowlkneel.com: could not connect to host
-superbshare.com: could not connect to host
-supercastlesmelbourne.com.au: could not connect to host
-supercastlessouthsydney.com.au: could not connect to host
-supercastlessydney.com.au: could not connect to host
-supercreepsvideo.com: did not receive HSTS header
-superdaddy.club: did not receive HSTS header
-supereight.net: did not receive HSTS header
-superiorfloridavacation.com: could not connect to host
-superklima.ro: did not receive HSTS header
-superlentes.com.br: could not connect to host
-supermae.pt: could not connect to host
-supernatural-fans.tk: could not connect to host
-supernovabrasil.com.br: did not receive HSTS header
-supernt.lt: did not receive HSTS header
-superpase.com: could not connect to host
-supersalescontest.nl: did not receive HSTS header
-superschnappchen.de: could not connect to host
-supersec.es: could not connect to host
-supersecurefancydomain.com: could not connect to host
-supersena.com.br: did not receive HSTS header
-superservers.ml: could not connect to host
-supersole.net: did not receive HSTS header
-supertechcrew.com: did not receive HSTS header
-supertramp-dafonseca.com: did not receive HSTS header
-superuser.fi: did not receive HSTS header
-superwally.org: could not connect to host
-superway.es: could not connect to host
-supes.io: did not receive HSTS header
-supioka.com: could not connect to host
-suplments.co.uk: did not receive HSTS header
-suplments.com: did not receive HSTS header
-suplments.de: did not receive HSTS header
-suplments.fr: did not receive HSTS header
-suplments.it: did not receive HSTS header
-suplments.pt: did not receive HSTS header
-supperclub.es: did not receive HSTS header
-supplementler.com: did not receive HSTS header
-supplypartnersdecolombia.com: did not receive HSTS header
-support4server.de: could not connect to host
-supportfan.gov: could not connect to host
-supportme123.com: did not receive HSTS header
-suppwatch.com: could not connect to host
-suprlink.net: could not connect to host
-supweb.ovh: could not connect to host
-surasak.io: could not connect to host
-surasak.net: could not connect to host
-surasak.org: could not connect to host
-surasak.xyz: could not connect to host
-suraya.online: could not connect to host
-suretone.co.za: could not connect to host
-surfeasy.com: did not receive HSTS header
-surfone-leucate.com: did not receive HSTS header
-surfpacific.com: max-age too low: 300
-surgenet.nl: did not receive HSTS header
-surgenights.com: did not receive HSTS header
-surgiclinic.gr: did not receive HSTS header
-surkatty.org: did not receive HSTS header
-surmountsoft.com: did not receive HSTS header
-suroot.moe: could not connect to host
-surrealcoder.com: could not connect to host
-surtisitio.com: did not receive HSTS header
-suruifu.tk: could not connect to host
-survivalistplanet.com: could not connect to host
-survivalmonkey.com: did not receive HSTS header
-susanbpilates.co: could not connect to host
-susastudentenjobs.de: could not connect to host
-susconam.org: could not connect to host
-suseasky.com: could not connect to host
-sushifrick.de: could not connect to host
-sushikatze.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-sushiwereld.be: did not receive HSTS header
-susoccm.org: did not receive HSTS header
-suspiciousdarknet.xyz: could not connect to host
-sussexwebdesigns.com: could not connect to host
-sussexwebsites.info: could not connect to host
-suste.ch: could not connect to host
-susthx.com: could not connect to host
-suttonbouncycastles.co.uk: could not connect to host
-suurhelsinki.cf: could not connect to host
-suv4.net: could not connect to host
-suvidhaapay.com: could not connect to host
-suwalls.com: did not receive HSTS header
-suzukikazuki.com: could not connect to host
-svadobkajuvi.sk: did not receive HSTS header
-svarovani.tk: could not connect to host
-svartx.com: could not connect to host
-svatba-frantovi.cz: could not connect to host
-svc-sitec.com: did not receive HSTS header
-svdreamcatcher.com: did not receive HSTS header
-sve-hosting.nl: could not connect to host
-svenbacia.me: could not connect to host
-svenjaundchristian.de: could not connect to host
-svenskacasino.com: could not connect to host
-svenskaservern.se: could not connect to host
-svetdrzaku.cz: did not receive HSTS header
-svetjakonadlani.cz: did not receive HSTS header
-svetzitrka.cz: did not receive HSTS header
-svht.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-svisa.nl: did not receive HSTS header
-sviz.pro: could not connect to host
-svj-stochovska.cz: could not connect to host
-svjvn.cz: could not connect to host
-svm-it.eu: did not receive HSTS header
-svmedia.be: did not receive HSTS header
-sw-machines.io: could not connect to host
-swacp.com: could not connect to host
-swaggerdile.com: did not receive HSTS header
-swagsocial.net: could not connect to host
-swaleacademiestrust.org.uk: did not receive HSTS header
-swallsoft.co.uk: could not connect to host
-swallsoft.com: could not connect to host
-swanseapartyhire.co.uk: could not connect to host
-swapadoodle.com: did not receive HSTS header
-swarovski-lov.cz: max-age too low: 0
-swdatlantico.pt: could not connect to host
-swe77.com: could not connect to host
-swe777.com: could not connect to host
-sweep.cards: did not receive HSTS header
-sweet-orr.com: did not receive HSTS header
-sweetlegs.jp: could not connect to host
-sweetstreats.ca: could not connect to host
-sweetvanilla.jp: could not connect to host
-swehack.org: could not connect to host
-swerve-media-testbed-03.co.uk: could not connect to host
-swey.net: could not connect to host
-swfloshatraining.com: could not connect to host
-swift-devedge.de: could not connect to host
-swiftconf.com: did not receive HSTS header
-swiftcrypto.com: could not connect to host
-swiftpk.net: could not connect to host
-swiggy.com: did not receive HSTS header
-swimbee.nl: did not receive HSTS header
-swimming.ca: did not receive HSTS header
-swimmingpoolaccidentattorney.net: could not connect to host
-swimready.net: could not connect to host
-swingerclub.in: could not connect to host
-swiss-cyber-experts.ch: could not connect to host
-swisscannabis.club: could not connect to host
-swissentreprises.ch: could not connect to host
-swissfreshaircan.ch: could not connect to host
-swissmadesecurity.net: did not receive HSTS header
-swisstechtalks.ch: could not connect to host
-swisswebhelp.ch: could not connect to host
-swissxperts.ch: could not connect to host
-switch.moe: did not receive HSTS header
-switchchargers.com: did not receive HSTS header
-swite.com: did not receive HSTS header
-switzerland-family-office.com: did not receive HSTS header
-swj.red: could not connect to host
-swktestserver.tk: could not connect to host
-swmd5c.org: could not connect to host
-swo.re: could not connect to host
-swoffordconstruction.com: did not receive HSTS header
-swordfeng.xyz: could not connect to host
-swordfighting.net: could not connect to host
-swqa.hu: could not connect to host
-swrelay.com: could not connect to host
-swrelay.net: could not connect to host
-swrelay.xyz: could not connect to host
-swu.party: could not connect to host
-swuosa.org: did not receive HSTS header
-sx3.no: could not connect to host
-sx6729.com: could not connect to host
-sx6957.com: could not connect to host
-sxbk.pw: did not receive HSTS header
-sxwancai18.com: max-age too low: 0
-syam.cc: could not connect to host
-syamutodon.xyz: could not connect to host
-syamuwatching.xyz: could not connect to host
-sydgrabber.tk: could not connect to host
-sydneybamboo.com.au: did not receive HSTS header
-syhost.at: did not receive HSTS header
-syhost.ch: did not receive HSTS header
-syhost.de: did not receive HSTS header
-sykl.us: could not connect to host
-sylvaincombe.net: did not receive HSTS header
-sylvangarden.net: could not connect to host
-sylvangarden.org: could not connect to host
-sylvanorder.com: could not connect to host
-symbiose-bien-etre.ch: did not receive HSTS header
-symetria.io: did not receive HSTS header
-symphonos.it: could not connect to host
-symposium.beer: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-synack.uk: could not connect to host
-synackr.com: could not connect to host
-synackr.net: did not receive HSTS header
-synapticconsulting.co.uk: could not connect to host
-synaptickz.me: could not connect to host
-synatra.co: did not receive HSTS header
-syncaddict.net: could not connect to host
-syncappate.com: could not connect to host
-syncclinicalstudy.com: could not connect to host
-syncer.jp: did not receive HSTS header
-syncflare.com: could not connect to host
-syncmylife.net: could not connect to host
-syncserve.net: did not receive HSTS header
-syneic.com: could not connect to host
-synergisticsoccer.com: could not connect to host
-syno.gq: could not connect to host
-syntaxoff.com: could not connect to host
-syntheticmotoroil.org: did not receive HSTS header
-syntheticurinereview.com: did not receive HSTS header
-syobon.org: could not connect to host
-syoier.com: could not connect to host
-syracuseut.gov: did not receive HSTS header
-syriatalk.biz: could not connect to host
-syriatalk.org: did not receive HSTS header
-syrocon.ch: could not connect to host
-sys.tf: could not connect to host
-sysadmin.xyz: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-sysadminstory.com: could not connect to host
-sysdot.blog: did not receive HSTS header
-sysert.tv: could not connect to host
-sysgeek.cn: could not connect to host
-syslogic.io: could not connect to host
-syso.name: could not connect to host
-syspen.space: could not connect to host
-syss.de: did not receive HSTS header
-system-online.cz: could not connect to host
-system12.pl: could not connect to host
-system365.eu: did not receive HSTS header
-systemctl.io: could not connect to host
-systemd.me: could not connect to host
-systemnik.store: could not connect to host
-systemofabrown.com: did not receive HSTS header
-systemonthego.com: could not connect to host
-systemreboot.net: did not receive HSTS header
-systemscoinsminers.tech: could not connect to host
-systemspace.link: could not connect to host
-systemzeit.info: could not connect to host
-systoolbox.net: could not connect to host
-sysystems.cz: could not connect to host
-syt3.net: could not connect to host
-sytk.me: could not connect to host
-syukatsu-net.jp: did not receive HSTS header
-syunpay.cn: could not connect to host
-sywnthkrawft.tk: could not connect to host
-syy.hk: did not receive HSTS header
-sz-ideenlos.de: could not connect to host
-szagun.net: did not receive HSTS header
-szaloneigly.com: did not receive HSTS header
-szaszm.tk: could not connect to host
-szc.me: could not connect to host
-szczot3k.pl: could not connect to host
-szepsegbennedrejlik.hu: could not connect to host
-szerbnyelvkonyv.hu: could not connect to host
-szerelem.love: could not connect to host
-szeretekvajpolni.hu: could not connect to host
-szlovaknyelv.hu: could not connect to host
-szlovennyelv.hu: could not connect to host
-szongott.net: did not receive HSTS header
-szotkowski.info: could not connect to host
-szotkowski.online: could not connect to host
-szunia.com: did not receive HSTS header
-t-complex.space: could not connect to host
-t-ken.xyz: could not connect to host
-t-point.eu: did not receive HSTS header
-t-tz.com: could not connect to host
-t-unit.ru: could not connect to host
-t0dd.eu: could not connect to host
-t2000headphones.com: could not connect to host
-t2000laserpointers.com: could not connect to host
-t23m-navi.jp: did not receive HSTS header
-t30365.com: could not connect to host
-t3dynamics.com: did not receive HSTS header
-t3rror.net: could not connect to host
-t49.com: could not connect to host
-t4c-rebirth.com: could not connect to host
-t4x.org: could not connect to host
-t5118.com: could not connect to host
-t5197.co: could not connect to host
-t6729.co: could not connect to host
-t6957.co: could not connect to host
-t7803.com: could not connect to host
-t7804.com: could not connect to host
-t7810.com: could not connect to host
-t7ys.com: did not receive HSTS header
-t81365.com: did not receive HSTS header
-t81818.com: did not receive HSTS header
-t82365.com: did not receive HSTS header
-t8816.com: could not connect to host
-t88aa.com: did not receive HSTS header
-t88dd.com: did not receive HSTS header
-t88hh.com: did not receive HSTS header
-t88kk.com: could not connect to host
-t88ll.com: could not connect to host
-t88uu.com: did not receive HSTS header
-t88ww.com: could not connect to host
-t88xx.com: did not receive HSTS header
-t88yy.com: could not connect to host
-t9297.co: could not connect to host
-t9721.com: did not receive HSTS header
-t9728.co: could not connect to host
-ta-sports.net: did not receive HSTS header
-taabe.xyz: could not connect to host
-taartenfeesies.nl: could not connect to host
-tab.watch: did not receive HSTS header
-tabernadovinho.com.br: did not receive HSTS header
-tabernastudios.pe: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-taberu-fujitsubo.com: did not receive HSTS header
-tabino.top: did not receive HSTS header
-tabitatsu.jp: did not receive HSTS header
-tabla-periodica.com: could not connect to host
-tachyonapp.com: could not connect to host
-tacklinglife.com: did not receive HSTS header
-tacklog.com: could not connect to host
-tacoma-games.com: did not receive HSTS header
-tacostea.net: did not receive HSTS header
-tacotown.tk: could not connect to host
-tacticalsquare.com: did not receive HSTS header
-tadata.me: could not connect to host
-tadcastercircuit.org.uk: did not receive HSTS header
-tadigitalstore.com: could not connect to host
-tadj-mahalat.com: did not receive HSTS header
-tadlab.cl: did not receive HSTS header
-tafoma.com: did not receive HSTS header
-tag-coin.com: could not connect to host
-tageau.com: did not receive HSTS header
-tagesmutter-in-bilm.de: did not receive HSTS header
-tagesmutter-zwitscherlinge.de: did not receive HSTS header
-tagpay.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-tahakomat.cz: could not connect to host
-tahavu.com: could not connect to host
-tahf.net: could not connect to host
-tahmintr.com: could not connect to host
-tahosalodge.org: did not receive HSTS header
-taichi-jade.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-taidu.news: could not connect to host
-taigamehack.com: could not connect to host
-tailandfur.com: did not receive HSTS header
-tailify.com: did not receive HSTS header
-tailpuff.net: could not connect to host
-tails.com.ar: could not connect to host
-taim.io: could not connect to host
-taipei-101.tk: could not connect to host
-tajemno.net: did not receive HSTS header
-takb.ru: did not receive HSTS header
-takebackyourstate.com: could not connect to host
-takebackyourstate.net: could not connect to host
-takebackyourstate.org: could not connect to host
-takedownthissite.com: could not connect to host
-takeitoffline.co.uk: did not receive HSTS header
-takenbydrone.com.au: did not receive HSTS header
-takinet.kr: could not connect to host
-tako-miyabi.xyz: could not connect to host
-takusan.ru: could not connect to host
-takuyaphotos.com: could not connect to host
-talado.gr: could not connect to host
-talenthero.io: did not receive HSTS header
-talenthub.co.nz: could not connect to host
-talentuar.com: could not connect to host
-tales-of-interia.de: could not connect to host
-talheim-records.ca: could not connect to host
-talk.google.com: did not receive HSTS header (error ignored - included regardless)
-talk.xyz: could not connect to host
-talkgadget.google.com: did not receive HSTS header (error ignored - included regardless)
-talkitup.mx: could not connect to host
-talkitup.online: could not connect to host
-talklifestyle.nl: could not connect to host
-talktobot.com: could not connect to host
-talktodarcy.com: did not receive HSTS header
-talktwincities.com: could not connect to host
-tallr.se: could not connect to host
-tallshoe.com: could not connect to host
-talltreeskv.com.au: did not receive HSTS header
-talon.rip: could not connect to host
-talsi.eu: could not connect to host
-tam-moon.com: could not connect to host
-tam-safe.com: could not connect to host
-tam7t.com: did not receive HSTS header
-tamakyi.club: did not receive HSTS header
-tamaraboutique.com: could not connect to host
-tamashimx.net: did not receive HSTS header
-tamasszabo.net: did not receive HSTS header
-tamchunho.com: could not connect to host
-tamex.xyz: could not connect to host
-tamirson.com: did not receive HSTS header
-tampa.gov: could not connect to host
-tamsweb.de: did not receive HSTS header
-tan90.tw: could not connect to host
-tanchynski.com: could not connect to host
-tandarts-haarlem.nl: did not receive HSTS header
-tandblekningidag.com: could not connect to host
-tandem-trade.ru: could not connect to host
-tandilmap.com.ar: did not receive HSTS header
-tandk.com.vn: did not receive HSTS header
-tangerine.ga: could not connect to host
-tangibilizing.com: could not connect to host
-tangiblesecurity.com: did not receive HSTS header
-tango-cats.de: could not connect to host
-tangsisi.com: could not connect to host
-tangyue.date: could not connect to host
-tangzhao.net: could not connect to host
-taniesianie.pl: did not receive HSTS header
-tankfreunde.de: did not receive HSTS header
-tanner.sh: could not connect to host
-tanshin.xyz: could not connect to host
-tante-bugil.net: could not connect to host
-tantotiempo.de: did not receive HSTS header
-tanz-kreativ.de: could not connect to host
-tanze-jetzt.de: could not connect to host
-taotuba.net: could not connect to host
-taotuba.org: did not receive HSTS header
-taoways.com: did not receive HSTS header
-taozj.org: could not connect to host
-tapakgram.com: did not receive HSTS header
-tapasnandi.in: could not connect to host
-tapestries.tk: could not connect to host
-tapety-na-pulpit.net: did not receive HSTS header
-tapfinder.ca: could not connect to host
-tapka.cz: did not receive HSTS header
-taplamvan.net: could not connect to host
-taplemon.at: could not connect to host
-taplemon.com: could not connect to host
-tappezzeria.roma.it: could not connect to host
-tappublisher.com: did not receive HSTS header
-taqun.club: could not connect to host
-taranis.re: could not connect to host
-tarantul.org.ua: could not connect to host
-taravancil.com: did not receive HSTS header
-tarek.link: could not connect to host
-targaryen.house: could not connect to host
-targetexecutivesearch.com: could not connect to host
-tarhauskielto.fi: did not receive HSTS header
-tarot-cartas.com: max-age too low: 0
-tarots-et-oracles.com: did not receive HSTS header
-tartaros.fi: could not connect to host
-taskin.me: could not connect to host
-taskstats.com: could not connect to host
-tasmansecurity.com: could not connect to host
-tassup.com: could not connect to host
-tasta.ro: did not receive HSTS header
-tastenewwines.com: could not connect to host
-tastic.com: could not connect to host
-tasticfilm.com: could not connect to host
-tastyyy.co: could not connect to host
-tasyacherry-anal.com: could not connect to host
-tatary.tk: could not connect to host
-tateesq.com: did not receive HSTS header
-tatilbus.com: did not receive HSTS header
-tatildukkani.com: did not receive HSTS header
-tatilmix.com: could not connect to host
-tatiloley.com: did not receive HSTS header
-tatort-fanpage.de: could not connect to host
-tatt.io: could not connect to host
-tauchkater.de: could not connect to host
-tauerperfumes.com: did not receive HSTS header
-taunhanh.us: could not connect to host
-tauschen.info: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-taustyle.ru: could not connect to host
-tavoittaja.fi: did not receive HSTS header
-tavopica.lt: did not receive HSTS header
-tawasulav.com: did not receive HSTS header
-taxaudit.com: did not receive HSTS header
-taxbench.com: could not connect to host
-taxi-24std.de: did not receive HSTS header
-taxi-uslu.de: did not receive HSTS header
-taxiindenbosch.nl: did not receive HSTS header
-taxisafmatosinhos.pt: could not connect to host
-taxisantapolagranalacant.com: did not receive HSTS header
-taxmadras.com: could not connect to host
-taxsnaps.co.nz: did not receive HSTS header
-taxspeaker.com: did not receive HSTS header
-tayanamina.com: did not receive HSTS header
-taylorreaume.com: did not receive HSTS header
-tazemama.biz: could not connect to host
-tazj.in: did not receive HSTS header
-tazz.in: could not connect to host
-tbarter.com: did not receive HSTS header
-tbpixel.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-tbrss.com: did not receive HSTS header
-tbys.us: could not connect to host
-tc-bonito.de: did not receive HSTS header
-tcacademy.co.uk: could not connect to host
-tcade.co: could not connect to host
-tcao.info: could not connect to host
-tcb-a.org: could not connect to host
-tcb-b.org: could not connect to host
-tcby45.xyz: could not connect to host
-tccmb.com: could not connect to host
-tcdww.cn: could not connect to host
-tcg-digital.com: did not receive HSTS header
-tcgforum.pl: max-age too low: 2592000
-tchaka.top: could not connect to host
-tcl.ath.cx: did not receive HSTS header
-tcp.expert: did not receive HSTS header
-tcptun.com: could not connect to host
-tcspartner.net: could not connect to host
-tcwebvn.com: could not connect to host
-tda602-secure-login.tk: could not connect to host
-tdelmas.eu: did not receive HSTS header
-tdelmas.ovh: could not connect to host
-tdpblog.site: could not connect to host
-tdro.cf: could not connect to host
-tdsb.cf: could not connect to host
-tdsb.ga: could not connect to host
-tdsb.gq: could not connect to host
-tdsb.ml: could not connect to host
-tdsbhack.cf: could not connect to host
-tdsbhack.ga: could not connect to host
-tdsbhack.gq: could not connect to host
-tdsbhack.ml: could not connect to host
-tdsbhack.tk: could not connect to host
-tdsf.io: could not connect to host
-tea.codes: did not receive HSTS header
-teabagdesign.co.uk: could not connect to host
-teacherph.net: could not connect to host
-teachertool.io: could not connect to host
-teachforcanada.ca: did not receive HSTS header
-teachingcopyright.com: did not receive HSTS header
-teachingcopyright.net: did not receive HSTS header
-teachingcopyright.org: did not receive HSTS header
-teachmeplease.com: did not receive HSTS header
-tealdrones.com: did not receive HSTS header
-teallhaycock.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-team-bbd.com: could not connect to host
-team-pancake.eu: did not receive HSTS header
-team-teasers.com: could not connect to host
-team.house: did not receive HSTS header
-team2fou.cf: could not connect to host
-teamassists.com: did not receive HSTS header
-teambeoplay.co.uk: did not receive HSTS header
-teamblueridge.org: could not connect to host
-teambodyproject.com: did not receive HSTS header
-teamcombat.com: did not receive HSTS header
-teamdaylo.xyz: could not connect to host
-teamdog.pet: did not receive HSTS header
-teamhood.io: did not receive HSTS header
-teamif.io: could not connect to host
-teammathics.com: could not connect to host
-teamnetsol.com: did not receive HSTS header
-teamnorthgermany.de: did not receive HSTS header
-teampoint.cz: could not connect to host
-teamsocial.co: did not receive HSTS header
-teamtmgb.fr: did not receive HSTS header
-teamtravel.co: did not receive HSTS header
-teamusec.de: could not connect to host
-teamzeus.cz: could not connect to host
-teaparty.id: could not connect to host
-tearoy.faith: could not connect to host
-tebieer.com: could not connect to host
-tech-blog.fr: could not connect to host
-tech-director.ru: did not receive HSTS header
-tech-finder.fr: could not connect to host
-tech-mfoda.com: did not receive HSTS header
-tech-professor.ir: could not connect to host
-tech-techno.tk: could not connect to host
-tech55i.com: could not connect to host
-techademy.nl: did not receive HSTS header
-techandtux.de: could not connect to host
-techarea.fr: did not receive HSTS header
-techask.it: could not connect to host
-techbelife.com: could not connect to host
-techbrawl.org: could not connect to host
-techcavern.ml: could not connect to host
-techcentric.com: did not receive HSTS header
-techday.com: did not receive HSTS header
-techelements.co: did not receive HSTS header
-techfactslive.com: did not receive HSTS header
-techforthepeople.org: could not connect to host
-techglover.com: could not connect to host
-techhipster.net: could not connect to host
-techhub.ml: could not connect to host
-techie-show.com: could not connect to host
-techiehall.com: could not connect to host
-techlines.com.co: could not connect to host
-techllage.com: could not connect to host
-techloaner.com: could not connect to host
-techmasters.andover.edu: could not connect to host
-techmatehq.com: could not connect to host
-techmerch.ru: did not receive HSTS header
-technewera.com: did not receive HSTS header
-technicalbrothers.cf: did not receive HSTS header
-technicalforensic.com: could not connect to host
-technicalpenguins.com: max-age too low: 0
-techniclab.ru: could not connect to host
-technifocal.com: could not connect to host
-technikblase.fm: did not receive HSTS header
-technikman.de: did not receive HSTS header
-technikrom.org: could not connect to host
-technistan.in: did not receive HSTS header
-technofirstonline.com: could not connect to host
-technoinfogroup.it: could not connect to host
-technoparcepsilon.fr: did not receive HSTS header
-technosavvyport.com: did not receive HSTS header
-technosuport.com: did not receive HSTS header
-technoswag.ca: could not connect to host
-technotonic.co.uk: did not receive HSTS header
-technotonic.com.au: did not receive HSTS header
-technotronikcanada.ca: could not connect to host
-techpointed.com: could not connect to host
-techpro.net.br: could not connect to host
-techproud.com: did not receive HSTS header
-techreview.link: could not connect to host
-techsharetx.gov: did not receive HSTS header
-techsocial.nl: could not connect to host
-techtoy.store: could not connect to host
-techtrackerpro.com: could not connect to host
-techtraveller.com.au: did not receive HSTS header
-techtuts.info: could not connect to host
-techunit.org: could not connect to host
-techvhow.com: could not connect to host
-techwithcromulent.com: could not connect to host
-techzjc.com: did not receive HSTS header
-tecit.ch: could not connect to host
-tecmarkdig.com: could not connect to host
-tecnicosenlineablanca.com: could not connect to host
-tecnidev.com: did not receive HSTS header
-tecnimas.com.mx: could not connect to host
-tecnimotos.com: did not receive HSTS header
-tecnogaming.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-tecnologino.com: could not connect to host
-tecnopiniones.com: could not connect to host
-tecnosa.es: did not receive HSTS header
-tecture.de: did not receive HSTS header
-tedovo.com: could not connect to host
-tedxkmitl.com: could not connect to host
-tedxodense.com: did not receive HSTS header
-tedxyalesecondaryschool.com: could not connect to host
-tee-idf.net: did not receive HSTS header
-teedb.de: could not connect to host
-teehaus-shila.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-teektalk.org: could not connect to host
-teemo.gg: did not receive HSTS header
-teencounseling.com: did not receive HSTS header
-teeplelaw.com: did not receive HSTS header
-teesypeesy.com: max-age too low: 2592000
-teetje-doko.de: could not connect to host
-tefl.io: did not receive HSTS header
-tegelsensanitaironline.nl: did not receive HSTS header
-tehcrayz.com: could not connect to host
-tehotuotanto.net: did not receive HSTS header
-tehplace.club: could not connect to host
-tehrankey.ir: did not receive HSTS header
-tehranperfume.com: did not receive HSTS header
-tejarat98.com: did not receive HSTS header
-tekingb.org: could not connect to host
-tekiro.com: did not receive HSTS header
-teknogeek.id: could not connect to host
-teknolit.com: did not receive HSTS header
-teknologi.or.id: max-age too low: 36000
-teknotes.co.uk: could not connect to host
-tekshrek.com: did not receive HSTS header
-teksuperior.com: could not connect to host
-tektoria.de: did not receive HSTS header
-tektuts.com: could not connect to host
-tekuteku.jp: did not receive HSTS header
-tel-dithmarschen.de: did not receive HSTS header
-telamon.fr: did not receive HSTS header
-telcotronics.com: could not connect to host
-teldak.pt: could not connect to host
-tele-alarme.ch: could not connect to host
-tele-assistance.ch: could not connect to host
-telealarmevalais.ch: could not connect to host
-teleallarme.ch: could not connect to host
-telecharger-itunes.com: could not connect to host
-telecharger-open-office.com: could not connect to host
-telecharger-winrar.com: could not connect to host
-telefisk.org: did not receive HSTS header
-telefoncek.si: could not connect to host
-telefonnummer.online: could not connect to host
-telefonogratuito.com: did not receive HSTS header
-telefoonnummerinfo.nl: did not receive HSTS header
-telegramdr.com: did not receive HSTS header
-telekollektiv.org: could not connect to host
-telemovi.com: could not connect to host
-telepass.me: could not connect to host
-telepons.com: could not connect to host
-telescam.com: could not connect to host
-teleshop.be: could not connect to host
-teleskell.org: could not connect to host
-telesto.online: could not connect to host
-teletechnology.in: did not receive HSTS header
-teletra.ru: could not connect to host
-telfordwhitehouse.co.uk: did not receive HSTS header
-telibee.com: did not receive HSTS header
-tellcorpassessoria.com.br: did not receive HSTS header
-telugu4u.net: could not connect to host
-temehu.com: did not receive HSTS header
-temp.hopto.org: could not connect to host
-tempcraft.net: could not connect to host
-temperandtantrum.com: did not receive HSTS header
-tempflix.com: could not connect to host
-tempo.co: did not receive HSTS header
-tempodecolheita.com.br: did not receive HSTS header
-tempus-aquilae.de: could not connect to host
-ten-cafe.com: did not receive HSTS header
-tenberg.com: could not connect to host
-tencent.xn--vuq861b: could not connect to host
-tendertool.nl: could not connect to host
-tendomag.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-tenerife-villas.com: max-age too low: 2592000
-tengu.cloud: could not connect to host
-tenispopular.com: could not connect to host
-tenkdigitalt.no: did not receive HSTS header
-tenma.pro: could not connect to host
-tenni.xyz: could not connect to host
-tennisadmin.com: could not connect to host
-tennisapp.org: could not connect to host
-tenseapp.pl: did not receive HSTS header
-tensei-slime.com: did not receive HSTS header
-tensionup.com: could not connect to host
-tent.io: could not connect to host
-tentech.io: did not receive HSTS header
-tenthousandbottoms.com: could not connect to host
-tenthpin.com: did not receive HSTS header
-tentins.com: could not connect to host
-teodio.cl: did not receive HSTS header
-teos.online: could not connect to host
-teoskanta.fi: could not connect to host
-tepautotuning.com: could not connect to host
-teplo-unit.ru: could not connect to host
-teplomash24.ru: could not connect to host
-terabyte-computing.com: could not connect to host
-terabyteharddrive.net: could not connect to host
-tercerapuertoaysen.cl: could not connect to host
-terezalukasova.cz: did not receive HSTS header
-teriiphotography.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-teriyakiweasel.com: did not receive HSTS header
-terlindung.com: did not receive HSTS header
-termax.me: did not receive HSTS header
-terminationsremembered.com: did not receive HSTS header
-terpotiz.net: did not receive HSTS header
-terra-x.net: could not connect to host
-terra.fitness: did not receive HSTS header
-terrace.co.jp: did not receive HSTS header
-terralimno.com: did not receive HSTS header
-terralimno.eu: did not receive HSTS header
-terranova-nutrition.dk: did not receive HSTS header
-terrax.berlin: could not connect to host
-terrax.info: did not receive HSTS header
-terrax.net: could not connect to host
-terrazoo.de: did not receive HSTS header
-terselubung.net: did not receive HSTS header
-teru.com.br: could not connect to host
-terudon.com: could not connect to host
-teslarius.com: could not connect to host
-tesoro.pr: did not receive HSTS header
-tessierashpool.de: could not connect to host
-test-aankoop.be: did not receive HSTS header
-test-achats.be: did not receive HSTS header
-test-allegrodev.pantheonsite.io: did not receive HSTS header
-test-dns.eu: could not connect to host
-test-sev-web.pantheonsite.io: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-test.financial: did not receive HSTS header
-test02.dk: could not connect to host
-test1websiteboost.nl: did not receive HSTS header
-testadren.com: could not connect to host
-testadron.com: could not connect to host
-testandroid.xyz: could not connect to host
-testbawks.com: could not connect to host
-testbirds.cz: could not connect to host
-testbirds.sk: could not connect to host
-testdomain.ovh: could not connect to host
-testlabs.tk: could not connect to host
-testnode.xyz: could not connect to host
-testosterone-complex.com: could not connect to host
-testosteronedetective.com: could not connect to host
-testovaci.ml: could not connect to host
-testsvigilantesdeseguridad.es: could not connect to host
-testvocacional.online: could not connect to host
-tetrafinancial-commercial-business-equipment-financing.com: could not connect to host
-tetrafinancial-energy-mining-equipment-financing.com: could not connect to host
-tetrafinancial-healthcare-medical-equipment-financing.com: could not connect to host
-tetrafinancial-manufacturing-industrial-equipment-financing.com: could not connect to host
-tetrafinancial-news.com: could not connect to host
-tetrafinancial-technology-equipment-software-financing.com: could not connect to host
-tetragir.com: did not receive HSTS header
-tetramax.eu: did not receive HSTS header
-tetsai.com: could not connect to host
-teufel.dk: did not receive HSTS header
-teufelswerk.net: did not receive HSTS header
-teufelsystem.de: could not connect to host
-teuniz.nl: did not receive HSTS header
-teva-li.com: did not receive HSTS header
-texasready.gov: did not receive HSTS header
-textbrawlers.com: could not connect to host
-texte-zur-taufe.de: did not receive HSTS header
-textinmate.com: could not connect to host
-textoplano.xyz: could not connect to host
-textpages.tk: could not connect to host
-textpedia.org: did not receive HSTS header
-textracer.dk: could not connect to host
-teyssedre.ca: did not receive HSTS header
-tezcam.tk: could not connect to host
-tf-network.de: did not receive HSTS header
-tf2stadium.com: did not receive HSTS header
-tf7879.com: could not connect to host
-tfadictivo.com: could not connect to host
-tfcoms-sp-tracker-client.azurewebsites.net: could not connect to host
-tffans.com: did not receive HSTS header
-tfk.fr: could not connect to host
-tfl.lu: did not receive HSTS header
-tgbyte.com: did not receive HSTS header
-tgmkanis.com: did not receive HSTS header
-tgod.co: could not connect to host
-tgr.re: could not connect to host
-th-bl.de: did not receive HSTS header
-th-music-finder.com: could not connect to host
-th3nd.com: could not connect to host
-thackert.myfirewall.org: could not connect to host
-thagki9.com: did not receive HSTS header
-thai.land: could not connect to host
-thaianthro.com: could not connect to host
-thaiboystory.ga: could not connect to host
-thaigirls.xyz: could not connect to host
-thaihostcool.com: did not receive HSTS header
-thailandlongtime.com: did not receive HSTS header
-thailandpropertylistings.com: could not connect to host
-thairehabassociation.com: could not connect to host
-thaiteaw.com: could not connect to host
-thalan.fr: could not connect to host
-thaliagetaway.com.au: did not receive HSTS header
-thalliman.com: could not connect to host
-thallinger.me: could not connect to host
-thalskarth.com: did not receive HSTS header
-thamesfamilydentistry.com: did not receive HSTS header
-thatgudstuff.com: did not receive HSTS header
-thatpodcast.io: did not receive HSTS header
-thatsme.io: did not receive HSTS header
-thatvizsla.life: could not connect to host
-the-arabs.com: could not connect to host
-the-bermanns.com: did not receive HSTS header
-the-busbys.com: could not connect to host
-the-construct.com: could not connect to host
-the-delta.net.eu.org: could not connect to host
-the-earth-yui.net: could not connect to host
-the-finance-blog.com: could not connect to host
-the-gdn.net: did not receive HSTS header
-the-gist.io: could not connect to host
-the-paddies.de: did not receive HSTS header
-the-sky-of-valkyries.com: could not connect to host
-the-spoonfeed.club: could not connect to host
-the-webmaster.com: did not receive HSTS header
-the.ie: could not connect to host
-the1.site: max-age too low: 2592000
-the420vape.org: could not connect to host
-theafleo.gq: could not connect to host
-theagencywithoutaname.com: could not connect to host
-theagilitychallenge.com: did not receive HSTS header
-thealexandertechnique.co.uk: max-age too low: 72000
-theamateurs.net: did not receive HSTS header
-theamp.com: did not receive HSTS header
-theankhlife.com: did not receive HSTS header
-theanticellulitediet.com: could not connect to host
-theapplewiki.com: could not connect to host
-thearcheryguide.com: did not receive HSTS header
-theasianshooters.com: could not connect to host
-theater.cf: did not receive HSTS header
-theavenuegallery.com: did not receive HSTS header
-theazoorsociety.org: could not connect to host
-thebakingclass.com: max-age too low: 60
-thebarbdemariateam.com: did not receive HSTS header
-thebarneystyle.com: did not receive HSTS header
-thebasementguys.com: could not connect to host
-thebeachessportsphysio.com: did not receive HSTS header
-thebeautifulmusic.net: did not receive HSTS header
-thebeginningisnye.com: could not connect to host
-theberkshirescompany.com: could not connect to host
-theberries.tk: could not connect to host
-thebest.ch: could not connect to host
-thebestofthesprings.com: did not receive HSTS header
-thebestpersonin.ml: could not connect to host
-thebestsavingsplan.com: could not connect to host
-thebigfail.net: did not receive HSTS header
-thebiggive.org.uk: did not receive HSTS header
-thebigslow.com: could not connect to host
-thebirthdaysite.co.uk: could not connect to host
-theblackknightsings.com: could not connect to host
-thebluub.com: could not connect to host
-theboss.ch: did not receive HSTS header
-thebouncyman.co.uk: could not connect to host
-thebreakhotel.com: did not receive HSTS header
-thebrotherswarde.com: could not connect to host
-thebte.com: could not connect to host
-thebuffalotavern.com: could not connect to host
-thecandyjam.com: could not connect to host
-thecapitalbank.com: could not connect to host
-thecellulitediet.com: could not connect to host
-thecharlestonwaldorf.com: did not receive HSTS header
-thechavs.xyz: could not connect to host
-thechunk.net: did not receive HSTS header
-theciderlink.com.au: could not connect to host
-theciso.com: could not connect to host
-thecitizens.com: did not receive HSTS header
-theclementinebutchers.com: could not connect to host
-theclimbingunit.com: did not receive HSTS header
-theclinician.com: did not receive HSTS header
-thecloudmigrator.com: could not connect to host
-theclubjersey.com: did not receive HSTS header
-thecodeninja.net: did not receive HSTS header
-thecoffeehouse.xyz: did not receive HSTS header
-thecoffeepod.co.uk: did not receive HSTS header
-thecolumnist.net: could not connect to host
-theconcordbridge.azurewebsites.net: could not connect to host
-thecontentcloud.com: did not receive HSTS header
-thecookiejar.me: could not connect to host
-thecozycastle.com: did not receive HSTS header
-thecr3ative.com: could not connect to host
-thecrew-exchange.com: could not connect to host
-thecrochetcottage.net: could not connect to host
-thecstick.com: could not connect to host
-thecsw.com: did not receive HSTS header
-thecuppacakery.co.uk: did not receive HSTS header
-thecuriouscat.net: could not connect to host
-thecyberaid.com: could not connect to host
-thedailyupvote.com: could not connect to host
-thedarkartsandcrafts.com: could not connect to host
-thedebug.life: could not connect to host
-thedermreport.com: did not receive HSTS header
-thedevilwearswibra.nl: did not receive HSTS header
-thedinnerdetective.com: did not receive HSTS header
-thedisc.nl: could not connect to host
-thedoctorsorders.pub: could not connect to host
-thedom.site: did not receive HSTS header
-thedominatorsclan.com: could not connect to host
-thedreamtravelgroup.co.uk: could not connect to host
-thedrinks.co: did not receive HSTS header
-thedrop.pw: did not receive HSTS header
-thedrunkencabbage.com: could not connect to host
-thedutchmarketers.com: did not receive HSTS header
-thedystance.com: could not connect to host
-theelectricguide.com: could not connect to host
-theelitebuzz.com: could not connect to host
-theender.net: did not receive HSTS header
-theendofzion.com: did not receive HSTS header
-theepankar.com: could not connect to host
-theescapistswiki.com: could not connect to host
-theexpatriate.de: could not connect to host
-thefarbeyond.com: could not connect to host
-thefashionpolos.com: could not connect to host
-thefbstalker.com: could not connect to host
-thefilmcolor.com: could not connect to host
-thefilmphotography.com: did not receive HSTS header
-thefootballanalyst.com: did not receive HSTS header
-thefox.co: did not receive HSTS header
-thefreebirds.in: could not connect to host
-thefrk.xyz: could not connect to host
-thefrozenfire.com: did not receive HSTS header
-thefutureharrills.com: could not connect to host
-thegarage961.co.nz: did not receive HSTS header
-thegcccoin.com: max-age too low: 2592000
-thegemriverside.com.vn: could not connect to host
-theghostlytavern.com: could not connect to host
-thego2swatking.com: could not connect to host
-thegoldregister.co.uk: could not connect to host
-thegospelforgeeks.org: did not receive HSTS header
-thegrape.ro: could not connect to host
-thegreatpakistan.com: could not connect to host
-thegreenfields.se: could not connect to host
-thegreenmanpottery.com: could not connect to host
-thegreens.us: could not connect to host
-thegreenvpn.com: could not connect to host
-thegrs.com: did not receive HSTS header
-theguitarcompany.nl: did not receive HSTS header
-thegvoffice.net: could not connect to host
-thegym.org: did not receive HSTS header
-thehiddenbay.cc: could not connect to host
-thehiddenbay.eu: could not connect to host
-thehiddenbay.fi: could not connect to host
-thehiddenbay.info: could not connect to host
-thehiddenbay.me: did not receive HSTS header
-thehiddenbay.net: could not connect to host
-thehiddenbay.ws: could not connect to host
-thehighersideclothing.com: did not receive HSTS header
-thehistory.me: could not connect to host
-thehivedesign.org: could not connect to host
-thehoopsarchive.com: could not connect to host
-thehopefuture.com: could not connect to host
-thehoryzon.com: could not connect to host
-thehotfix.net: could not connect to host
-thehotness.tech: could not connect to host
-thehouseofgod.org.nz: did not receive HSTS header
-thehowtohome.com: did not receive HSTS header
-theideaskitchen.com.au: could not connect to host
-theimagefile.com: did not receive HSTS header
-theinflatablesne.co.uk: could not connect to host
-theinvisibletrailer.com: could not connect to host
-theissue.com.au: did not receive HSTS header
-thej0lt.com: could not connect to host
-thejacksoninstitute.com.au: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-thejobauction.com: did not receive HSTS header
-thejserver.de: could not connect to host
-thekindplate.ca: max-age too low: 7776000
-thekrewserver.com: did not receive HSTS header
-thelapine.ca: did not receive HSTS header
-thelastbeach.top: could not connect to host
-thelastsurprise.com: could not connect to host
-thelatedcult.com: did not receive HSTS header
-theleap.co.uk: did not receive HSTS header
-thelefthand.org: did not receive HSTS header
-thelinuxspace.com: could not connect to host
-thelittlepeartree.eu: could not connect to host
-themacoaching.nl: could not connect to host
-themadlabengineer.co.uk: could not connect to host
-themadmechanic.net: could not connect to host
-themanufacturingmarketingagency.com: could not connect to host
-themarble.co: could not connect to host
-themathbehindthe.science: could not connect to host
-themeaudit.com: could not connect to host
-themefoxx.com: did not receive HSTS header
-themenmedia.com: could not connect to host
-themesurgeons.net: could not connect to host
-themicrocapital.com: could not connect to host
-themilanlife.com: could not connect to host
-themillerslive.com: did not receive HSTS header
-themimitoof.fr: could not connect to host
-themobilestuffs.com: could not connect to host
-themoderate.xyz: could not connect to host
-themoep.at: max-age too low: 172800
-thenanfang.com: could not connect to host
-thenarcissisticlife.com: did not receive HSTS header
-theneatgadgets.com: could not connect to host
-thenewclassics.com: could not connect to host
-thenexteducation.com: could not connect to host
-thenextstep.events: could not connect to host
-thenib.com: max-age too low: 86400
-thenichecast.com: could not connect to host
-theninehertz.com: did not receive HSTS header
-thenorthschool.org.uk: did not receive HSTS header
-thenovaclinic.com: did not receive HSTS header
-thenrdhrd.nl: could not connect to host
-theo.me: could not connect to host
-theocharis.org: could not connect to host
-theodorejones.info: could not connect to host
-theojones.name: could not connect to host
-theokonst.tk: could not connect to host
-theoldbrewhouse.info: could not connect to host
-theosblog.de: could not connect to host
-theosophic.ga: could not connect to host
-theosophie-afrique.org: could not connect to host
-theoverfly.co: could not connect to host
-thepaffy.de: could not connect to host
-theparoxetine.gq: could not connect to host
-thepartywarehouse.co.uk: did not receive HSTS header
-thepcweb.tk: did not receive HSTS header
-thepeninsulaires.com: did not receive HSTS header
-thepeoplesdata.com: could not connect to host
-thepeoplesdata.org: could not connect to host
-thephonecaseplace.com: did not receive HSTS header
-thepiabo.ovh: could not connect to host
-thepickledhedgehog.com: did not receive HSTS header
-thepiratebay.al: could not connect to host
-thepiratebay.poker: could not connect to host
-thepiratebay.tech: could not connect to host
-theplaidpoodle.com: did not receive HSTS header
-theplaydaysbus.co.uk: could not connect to host
-theposhfudgecompany.co.uk: could not connect to host
-thepostoffice.ro: did not receive HSTS header
-theprincegame.com: could not connect to host
-theprivacysolution.com: could not connect to host
-theproductpoet.com: did not receive HSTS header
-theproject.cf: could not connect to host
-theqjourney.com: did not receive HSTS header
-thequillmagazine.org: could not connect to host
-theragran.co.id: did not receive HSTS header
-therapyroom.rent: did not receive HSTS header
-theresabrant.com: did not receive HSTS header
-therewill.be: could not connect to host
-thermo-recetas.com: did not receive HSTS header
-theroamingnotary.com: did not receive HSTS header
-theruizes.com: did not receive HSTS header
-thesage.cf: did not receive HSTS header
-thesearchnerds.co.uk: did not receive HSTS header
-thesecurityteam.net: could not connect to host
-theseedbox.xyz: could not connect to host
-thesehighsandlows.com: could not connect to host
-theseletarmall.com: could not connect to host
-theserver201.tk: could not connect to host
-theshadestore.com: max-age too low: 10368000
-thesharepointfarm.com: did not receive HSTS header
-theshield.in: did not receive HSTS header
-thesignacademy.co.uk: could not connect to host
-thesimplifiers.com: did not receive HSTS header
-thesled.net: could not connect to host
-thesmokypoet.com: did not receive HSTS header
-thesocialmediacentral.com: could not connect to host
-thesplit.is: could not connect to host
-thestack.xyz: could not connect to host
-thestagchorleywood.co.uk: did not receive HSTS header
-thestandingroomrestaurant.com: did not receive HSTS header
-thestoritplace.com: max-age too low: 0
-thestral.pro: could not connect to host
-thestralbot.com: could not connect to host
-thestudyla.com: did not receive HSTS header
-thestyle.city: did not receive HSTS header
-thetapirsmouth.com: could not connect to host
-thetenscrolls.com: could not connect to host
-thethirdroad.com: did not receive HSTS header
-thetorlock.com: could not connect to host
-thetorrentfunk.com: could not connect to host
-thetotalemaildelivery.com: could not connect to host
-thetravelczar.com: could not connect to host
-thetruthhurvitz.com: did not receive HSTS header
-theunitedstates.io: did not receive HSTS header
-theurbanyoga.com: did not receive HSTS header
-theuucc.org: did not receive HSTS header
-theviewat55th.com: could not connect to host
-thevintagenews.com: did not receive HSTS header
-thevoid.one: could not connect to host
-thevyra.com: could not connect to host
-thewallset.com: could not connect to host
-thewarrencenter.org: did not receive HSTS header
-thewashingmachine.tk: could not connect to host
-thewaxhouse.shop: could not connect to host
-theway2u.com: could not connect to host
-thewebdexter.com: could not connect to host
-thewebfellas.com: did not receive HSTS header
-thewego.com: did not receive HSTS header
-theweilai.com: could not connect to host
-thewhiterabbit.space: could not connect to host
-thewindow.com: could not connect to host
-thewinstonatlyndhurst.com: did not receive HSTS header
-thewoolroom.com.au: did not receive HSTS header
-thewoosh.me: could not connect to host
-theworld.tk: could not connect to host
-thewp.pro: max-age too low: 0
-thexfactorgames.com: did not receive HSTS header
-theyarnhookup.com: could not connect to host
-theyourbittorrent.com: could not connect to host
-thezonders.com: did not receive HSTS header
-thgros.fr: could not connect to host
-thibaultwalle.com: could not connect to host
-thibautcharles.net: did not receive HSTS header
-thierfreund.de: did not receive HSTS header
-thierryhayoz.ch: could not connect to host
-thierrymazue.eu: could not connect to host
-thierrymazue.fr: could not connect to host
-thingsof.org: could not connect to host
-thinkcash.nl: could not connect to host
-thinkclic.fr: did not receive HSTS header
-thinkcoding.de: could not connect to host
-thinkcoding.org: could not connect to host
-thinkdo.jp: could not connect to host
-thinkingplanet.net: did not receive HSTS header
-thinklikeanentrepreneur.com: did not receive HSTS header
-thinkquality.nl: could not connect to host
-thinlyveiledcontempt.com: could not connect to host
-thirdpartytrade.com: could not connect to host
-thirdworld.moe: could not connect to host
-thirty5.net: did not receive HSTS header
-thirtysixseventy.ml: could not connect to host
-thirtyspot.com: could not connect to host
-this-server-will-be-the-death-of-me.com: did not receive HSTS header
-thisisacompletetest.ga: could not connect to host
-thisisforager.com: could not connect to host
-thisisgrey.com: did not receive HSTS header
-thisislaikipia.co.ke: did not receive HSTS header
-thisisthefinalact.com: did not receive HSTS header
-thisistheserver.com: did not receive HSTS header
-thisiswhywemom.com: could not connect to host
-thismumdoesntknowbest.com: could not connect to host
-thiswasalreadymyusername.tk: could not connect to host
-thkb.net: could not connect to host
-thm.vn: did not receive HSTS header
-thomas-bertran.com: did not receive HSTS header
-thomas-fahle.de: did not receive HSTS header
-thomas-ferney.fr: did not receive HSTS header
-thomas-gibertie.fr: did not receive HSTS header
-thomas-grobelny.de: could not connect to host
-thomas-klubert.de: did not receive HSTS header
-thomas-prior.com: could not connect to host
-thomasbnt.fr: did not receive HSTS header
-thomascloud.ddns.net: could not connect to host
-thomasebenrett.de: could not connect to host
-thomasharvey.me: did not receive HSTS header
-thomaskaviani.be: could not connect to host
-thomaskliszowski.fr: did not receive HSTS header
-thomasnet.fr: could not connect to host
-thomasscholz.com: max-age too low: 2592000
-thomasschweizer.net: could not connect to host
-thomasverhelst.be: could not connect to host
-thomaswoo.com: did not receive HSTS header
-thorbis.com: could not connect to host
-thorbiswebsitedesign.com: could not connect to host
-thorgames.nl: did not receive HSTS header
-thorncreek.net: did not receive HSTS header
-thornton-le-moors-ince-elton.org.uk: did not receive HSTS header
-thoroquel.org: could not connect to host
-thorshammare.com: did not receive HSTS header
-thorshammare.org: did not receive HSTS header
-thorshammare.se: did not receive HSTS header
-thoschi.net: did not receive HSTS header
-thot.space: could not connect to host
-thoughtlessleaders.online: could not connect to host
-thoughtsynth.com: could not connect to host
-thoughtsynth.net: could not connect to host
-thoughtsynth.org: could not connect to host
-thousandgreens.com: did not receive HSTS header
-threatcentral.io: could not connect to host
-threebrothersbrewing.com: could not connect to host
-threebulls.be: did not receive HSTS header
-threecrownsllp.com: did not receive HSTS header
-threefantasy.com: could not connect to host
-threepercentrealty.net: did not receive HSTS header
-threv.net: did not receive HSTS header
-thriveapproach.co.uk: did not receive HSTS header
-throughthelookingglasslens.co.uk: could not connect to host
-thrx.net: did not receive HSTS header
-thsc.org: did not receive HSTS header
-thumbsupcandy.com: could not connect to host
-thumbtack.com: did not receive HSTS header
-thundercampaign.com: could not connect to host
-thundercloud.onthewifi.com: could not connect to host
-thuviensoft.net: could not connect to host
-thymiaturtle.de: did not receive HSTS header
-thzone.net: could not connect to host
-ti-js.com: could not connect to host
-ti.blog.br: did not receive HSTS header
-ti780.com: could not connect to host
-tiacollection.com: did not receive HSTS header
-tiagoealine.com.br: did not receive HSTS header
-tiance.me: could not connect to host
-tiantangbt.com: could not connect to host
-tianxicaipiao.com: could not connect to host
-tianxicaipiao.win: could not connect to host
-tianxicp.com: could not connect to host
-tianxing.pro: could not connect to host
-tianxingvpn.pro: could not connect to host
-tiaria.id: could not connect to host
-tibbitshall.ca: could not connect to host
-tibovanheule.site: could not connect to host
-tibovanheule.space: did not receive HSTS header
-tichieru.pw: could not connect to host
-ticketluck.com: did not receive HSTS header
-ticketmates.com.au: did not receive HSTS header
-ticketmaze.com: did not receive HSTS header
-ticketoplichting.nl: did not receive HSTS header
-ticketscol.com: could not connect to host
-ticketsourcebeta.co.uk: could not connect to host
-tickopa.co.uk: could not connect to host
-tickreport.com: did not receive HSTS header
-ticktock.today: could not connect to host
-tictactux.de: could not connect to host
-tidmore.us: could not connect to host
-tidycustoms.net: did not receive HSTS header
-tie-online.org: could not connect to host
-tielecingenieria.com.co: did not receive HSTS header
-tielectric.ch: did not receive HSTS header
-tiemcayxanh.com: did not receive HSTS header
-tiendasmart.com.co: did not receive HSTS header
-tiendavertigo.com: did not receive HSTS header
-tiendschuurstraat.nl: could not connect to host
-tiensnet.com: could not connect to host
-tier-1-entrepreneur.com: could not connect to host
-tiernanx.com: could not connect to host
-tierraprohibida.net: did not receive HSTS header
-tierrarp.com: could not connect to host
-tiffanytravels.com: did not receive HSTS header
-tiger21.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-tigerchef.com: did not receive HSTS header
-tigerfm.tk: did not receive HSTS header
-tigergroup.tk: did not receive HSTS header
-tiggi.pw: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-tightassporntube.com: could not connect to host
-tightlineproductions.com: did not receive HSTS header
-tigit.co.nz: could not connect to host
-tihvin.tk: could not connect to host
-tijo.ch: could not connect to host
-tiki-god.co.uk: could not connect to host
-tikloot.com: did not receive HSTS header
-tikutiku.pl: could not connect to host
-tildebot.com: could not connect to host
-tiledailyshop.com: did not receive HSTS header
-tiles-for-facing.tk: could not connect to host
-tiliaze.be: did not receive HSTS header
-tiliaze.biz: did not receive HSTS header
-tiliaze.eu: could not connect to host
-tiliaze.info: did not receive HSTS header
-tiliaze.net: did not receive HSTS header
-tilient.eu: could not connect to host
-tilkah.com.au: could not connect to host
-tillcraft.com: could not connect to host
-tilta.com: did not receive HSTS header
-timbeilby.com: could not connect to host
-timbuktutimber.com: did not receive HSTS header
-timcamara.com: did not receive HSTS header
-timchanhxe.com: could not connect to host
-timdebruijn.nl: did not receive HSTS header
-timdeneau.com: max-age too low: 0
-time-business.tk: did not receive HSTS header
-time-hotel.cf: could not connect to host
-time-river.xyz: could not connect to host
-timeatlas.com: did not receive HSTS header
-timebox.tk: could not connect to host
-timecd.cn: could not connect to host
-timeforcoffe.eu: could not connect to host
-timeget.ru: did not receive HSTS header
-timelessskincare.co.uk: did not receive HSTS header
-timer.fit: could not connect to host
-timerace.ml: could not connect to host
-timersuite.com: could not connect to host
-timesavingplugins.com: could not connect to host
-timesavingplugins.net: could not connect to host
-timeserver1.de: could not connect to host
-timeserver2.de: could not connect to host
-timeserver3.de: could not connect to host
-timestamp.io: did not receive HSTS header
-timestamp.uk: could not connect to host
-timetab.org: could not connect to host
-timewk.cn: did not receive HSTS header
-timfiedler.net: did not receive HSTS header
-timgame.tk: could not connect to host
-timhieubenh.net: could not connect to host
-timhieuthuoc.com: could not connect to host
-timhjalpen.se: could not connect to host
-timmy.ws: could not connect to host
-timothybjacobs.com: did not receive HSTS header
-timothysykes.com: did not receive HSTS header
-timotrans.de: did not receive HSTS header
-timotrans.eu: did not receive HSTS header
-timowi.net: could not connect to host
-timwhite.io: did not receive HSTS header
-timwittenberg.com: could not connect to host
-tinchbear.xyz: could not connect to host
-tinclip.com: did not receive HSTS header
-tindewen.net: could not connect to host
-tinf15b4.de: could not connect to host
-tink.network: could not connect to host
-tinker.career: could not connect to host
-tinkerbeast.com: could not connect to host
-tinkerboard.org: could not connect to host
-tinlook.com: could not connect to host
-tinyvpn.net: could not connect to host
-tinyvpn.org: could not connect to host
-tiochambita.com: could not connect to host
-tiogacountyny.gov: could not connect to host
-tipbox.is: did not receive HSTS header
-tipiakers.club: could not connect to host
-tipo01.tk: could not connect to host
-tipocloud.cf: could not connect to host
-tipplist.com: could not connect to host
-tipps-fuer-den-haushalt.de: could not connect to host
-tippspiel.cc: could not connect to host
-tipsdebellezaysalud.com: did not receive HSTS header
-tipsyk.ru: could not connect to host
-tiratuki.games: did not receive HSTS header
-tircentrale.net: could not connect to host
-tiredofeating.com: could not connect to host
-tiremoni.ch: could not connect to host
-tirex.media: did not receive HSTS header
-tism.in: could not connect to host
-tiste.org: did not receive HSTS header
-titanlab.de: could not connect to host
-titanleaf.com: could not connect to host
-titanous.com: did not receive HSTS header
-titanplumbingservices.com.au: did not receive HSTS header
-titiansgirlphotography.com: did not receive HSTS header
-titli.fr: could not connect to host
-titser.ph: could not connect to host
-tittarpuls.se: could not connect to host
-titties.ml: could not connect to host
-tivido.nl: could not connect to host
-tjandpals.com: did not receive HSTS header
-tjc.wiki: could not connect to host
-tjcuk.co.uk: did not receive HSTS header
-tjeckien.guide: could not connect to host
-tjenestetorvet.dk: could not connect to host
-tjkcastles.uk: did not receive HSTS header
-tjs.me: could not connect to host
-tjsbouncycastles.co.uk: could not connect to host
-tju.me: could not connect to host
-tkappertjedemetamorfose.nl: did not receive HSTS header
-tkarstens.de: did not receive HSTS header
-tkhw.tk: could not connect to host
-tkn.tokyo: could not connect to host
-tkonstantopoulos.tk: could not connect to host
-tkts.cl: could not connect to host
-tlach.cz: could not connect to host
-tlcdn.net: could not connect to host
-tld.gg: could not connect to host
-tlo.hosting: could not connect to host
-tlo.link: could not connect to host
-tlo.network: could not connect to host
-tls.blue: could not connect to host
-tls.builders: could not connect to host
-tls.li: could not connect to host
-tlsbv.nl: did not receive HSTS header
-tlshost.net: could not connect to host
-tlsrobot.se: could not connect to host
-tm-solutions.eu: could not connect to host
-tm.id.au: did not receive HSTS header
-tmakiguchi.org: did not receive HSTS header
-tmaward.net: could not connect to host
-tmberg.cf: could not connect to host
-tmberg.ga: could not connect to host
-tmberg.gq: could not connect to host
-tmberg.ml: could not connect to host
-tmberg.tk: could not connect to host
-tmc.com.mt: could not connect to host
-tmconnects.com: could not connect to host
-tmcpromotions.co.uk: could not connect to host
-tmd.cool: did not receive HSTS header
-tmdc.ddns.net: could not connect to host
-tmhlive.com: could not connect to host
-tmhr.moe: could not connect to host
-tmi.news: did not receive HSTS header
-tmin.cf: could not connect to host
-tmitchell.io: could not connect to host
-tmonitoring.com: did not receive HSTS header
-tmprod.com: did not receive HSTS header
-tmtradingmorocco.ma: did not receive HSTS header
-tnb-plattform.de: could not connect to host
-tncnanet.com.br: could not connect to host
-tnes.dk: did not receive HSTS header
-tnl.cloud: could not connect to host
-tno.io: did not receive HSTS header
-tnosha.gov: did not receive HSTS header
-tnrealid.gov: did not receive HSTS header
-tnusedoil.gov: could not connect to host
-tnwildlandfire.gov: did not receive HSTS header
-tnwioa.gov: could not connect to host
-to2mbn.org: could not connect to host
-toabetteryou.org: could not connect to host
-toabsentfamily.com: did not receive HSTS header
-tob-rulez.de: could not connect to host
-tobaby.com.br: could not connect to host
-tobacco.gov: could not connect to host
-tobaccore.eu: could not connect to host
-tobaccore.sk: could not connect to host
-tobbro-trans.de: did not receive HSTS header
-tobedo.net: could not connect to host
-tobi-videos.goip.de: could not connect to host
-tobias-bielefeld.de: did not receive HSTS header
-tobias-haenel.de: could not connect to host
-tobias-kluge.com: could not connect to host
-tobias-kluge.de: did not receive HSTS header
-tobias-picha.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-tobias-weidhase.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-tobiasbergius.se: could not connect to host
-tobiasmathes.com: did not receive HSTS header
-tobiasmathes.name: could not connect to host
-tobiasofficial.at: could not connect to host
-tobiaspahlings.de: could not connect to host
-tobiassachs.cf: could not connect to host
-tobiassachs.tk: could not connect to host
-tobiaswiese.work: could not connect to host
-tobis-webservice.de: could not connect to host
-tochi-urikata.net: could not connect to host
-todaciencia.com: could not connect to host
-todaslascafeteras.com: could not connect to host
-toddmissiontx.gov: did not receive HSTS header
-todo.is: did not receive HSTS header
-todobazar.es: could not connect to host
-todocracy.com: could not connect to host
-todoenunaweb.com: could not connect to host
-todoist.com: did not receive HSTS header
-todoist.net: could not connect to host
-todokete.ga: could not connect to host
-todosrv.com: could not connect to host
-todotecnohoy.com: could not connect to host
-toerclub-ing-arnhem.nl: did not receive HSTS header
-toetsplatform.be: could not connect to host
-tofa-koeln.de: could not connect to host
-tofilmhub.com: could not connect to host
-tofu.im: could not connect to host
-togelonlinecommunity.com: could not connect to host
-tohokufd.com: could not connect to host
-tojannah.com: could not connect to host
-tojeto.eu: could not connect to host
-toka.sg: could not connect to host
-tokage.me: could not connect to host
-tokbijouxs.com.br: did not receive HSTS header
-tokenloan.com: did not receive HSTS header
-tokfun.com: could not connect to host
-tokic.hr: could not connect to host
-tokintu.com: could not connect to host
-tokobungaasryflorist.com: did not receive HSTS header
-tokobungadijambi.com: could not connect to host
-tokobungadilampung.com: could not connect to host
-tokobungadipadangflorist.com: could not connect to host
-tokoindo.top: could not connect to host
-tokoone.com: did not receive HSTS header
-tokoplugin.com: could not connect to host
-tokotamz.net: could not connect to host
-tokotimbangandigitalmurah.web.id: did not receive HSTS header
-tokoyo.biz: could not connect to host
-tokumei.co: did not receive HSTS header
-tollfreeproxy.com: could not connect to host
-tollsjekk.no: did not receive HSTS header
-tolud.com: could not connect to host
-tom-maxwell.com: did not receive HSTS header
-tom.run: did not receive HSTS header
-tomandshirley.com: could not connect to host
-tomandsonya.com: max-age too low: 0
-tomashouzvicka.pl: could not connect to host
-tomaspialek.cz: did not receive HSTS header
-tomaw.net: did not receive HSTS header
-tombroker.org: could not connect to host
-tomcort.com: did not receive HSTS header
-tomdudfield.com: did not receive HSTS header
-tomeara.net: could not connect to host
-tomend.es: could not connect to host
-tomevans.io: could not connect to host
-tomfisher.eu: could not connect to host
-tomharling.co.uk: could not connect to host
-tomharris.tech: could not connect to host
-tomik.cloud: could not connect to host
-tomiler.com: could not connect to host
-tomlankhorst.nl: did not receive HSTS header
-tomli.blog: could not connect to host
-tomli.me: could not connect to host
-tommounsey.com: did not receive HSTS header
-tommsy.com: did not receive HSTS header
-tommyads.com: could not connect to host
-tommyweber.de: did not receive HSTS header
-tomoyaf.com: could not connect to host
-toms.ovh: could not connect to host
-tomsdevsn.me: could not connect to host
-tomsk.ml: did not receive HSTS header
-tomudding.com: could not connect to host
-tomy.icu: could not connect to host
-tomyork.net: could not connect to host
-tonburi.jp: could not connect to host
-tone.tw: could not connect to host
-tonerjet.co.uk: could not connect to host
-tonex.nl: could not connect to host
-tongmu.me: could not connect to host
-tonguetechnology.com: could not connect to host
-tonifarres.net: could not connect to host
-tonigallagherinteriors.com: did not receive HSTS header
-toniharant.de: could not connect to host
-tonkinson.com: could not connect to host
-tonnie.nl: did not receive HSTS header
-tonymaster21.me: could not connect to host
-tonytan.cn: could not connect to host
-toolkits.design: could not connect to host
-toolnerds.com: max-age too low: 2592000
-toomanypillows.com: could not connect to host
-toomy.ddns.net: could not connect to host
-toontown.team: could not connect to host
-toopita.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-toorl.com: could not connect to host
-top-autoshop.com.ua: could not connect to host
-top-solar-info.de: could not connect to host
-top-stage.net: could not connect to host
-top10mountainbikes.info: could not connect to host
-top1betting.net: did not receive HSTS header
-top5hosting.co.uk: max-age too low: 0
-topanlage.de: could not connect to host
-toparkinfo.hu: could not connect to host
-topbargains.com.au: did not receive HSTS header
-topbigdeals.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-topbilan.com: did not receive HSTS header
-topbounce.com: did not receive HSTS header
-topbouncycastles.co.uk: could not connect to host
-topbrakes.com: did not receive HSTS header
-topcanadianescorts.com: could not connect to host
-topdeskdev.net: could not connect to host
-topdetoxcleanse.com: could not connect to host
-topdevbox.net: could not connect to host
-topdroneusa.com: could not connect to host
-topeyelashenhancerserumreviews.com: did not receive HSTS header
-topferta.com: could not connect to host
-topkek.ml: could not connect to host
-topmarine.se: did not receive HSTS header
-topnewstoday.org: could not connect to host
-topnotchendings.com: could not connect to host
-topnovini.com: did not receive HSTS header
-toppercan.es: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-toppointrea.com: could not connect to host
-topreit.ru: did not receive HSTS header
-topsailtechnologies.com: could not connect to host
-topservercccam.com: did not receive HSTS header
-topshelf.tech: did not receive HSTS header
-topshelfguild.com: could not connect to host
-topshoptools.com: could not connect to host
-topsteaks-daun.de: did not receive HSTS header
-topstore.me: could not connect to host
-topstore.ph: did not receive HSTS header
-toptheto.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-topurls.tk: did not receive HSTS header
-topvertimai.lt: could not connect to host
-topwin.la: could not connect to host
-topworktops.co.uk: did not receive HSTS header
-topyad.com: did not receive HSTS header
-topyx.com: did not receive HSTS header
-tor2web.org: could not connect to host
-torahanytime.com: did not receive HSTS header
-torbay.ga: could not connect to host
-torbe.es: did not receive HSTS header
-torchl.it: could not connect to host
-toretfaction.net: could not connect to host
-torg-room.ru: could not connect to host
-torkware.com: could not connect to host
-torlock.download: could not connect to host
-toronto-escorts.com: did not receive HSTS header
-torontocorporatelimo.services: could not connect to host
-torontonews.tk: did not receive HSTS header
-torproject.org.uk: could not connect to host
-torproject.ovh: could not connect to host
-torquato.de: did not receive HSTS header
-torrentdownloads.bid: could not connect to host
-torrentgamesps2.info: could not connect to host
-torrentpier.me: did not receive HSTS header
-torrentz.website: could not connect to host
-torrentz2.al: could not connect to host
-tortocan.com: could not connect to host
-tortugalife.de: could not connect to host
-torv.rocks: did not receive HSTS header
-tosainu.com.br: could not connect to host
-tosamja.net: did not receive HSTS header
-tosecure.link: could not connect to host
-toshnix.com: could not connect to host
-toshub.com: could not connect to host
-toskana-appartement.de: did not receive HSTS header
-totalaccess.com.ua: could not connect to host
-totalaccessnicaragua.co: could not connect to host
-totalbeauty.co.uk: did not receive HSTS header
-totaldragonshop.com.br: could not connect to host
-totalemaiildelivery.com: could not connect to host
-totalemaiilldelivery.com: could not connect to host
-totalemaildeliivery.com: could not connect to host
-totalemaildelivery.com: could not connect to host
-totalemaildellivery.com: could not connect to host
-totalemailldeliivery.com: could not connect to host
-totalemailldelivery.com: could not connect to host
-totalhomecareinc.com: could not connect to host
-totallclean.com: could not connect to host
-totalle.com.br: could not connect to host
-totallemaiildelivery.com: could not connect to host
-totallemaildelivery.com: could not connect to host
-totallynotaserver.com: could not connect to host
-totalsystemcare.com: did not receive HSTS header
-totalworkout.fitness: did not receive HSTS header
-totch.de: could not connect to host
-totem-eshop.cz: could not connect to host
-totolabs.com: could not connect to host
-totoro.pub: could not connect to host
-totot.net: could not connect to host
-toucedo.de: could not connect to host
-touch-up-net.com: could not connect to host
-touchbasemail.com: did not receive HSTS header
-touchinformatica.com: did not receive HSTS header
-touchpointidg.us: could not connect to host
-touchscreen-handy.de: did not receive HSTS header
-touchstonefms.co.uk: did not receive HSTS header
-touchsupport.com: did not receive HSTS header
-touchtunesnz.com: did not receive HSTS header
-tougetu.com: could not connect to host
-touhou.cc: did not receive HSTS header
-toulineprestige.com: did not receive HSTS header
-tounyou-raku.com: could not connect to host
-touray-enterprise.ch: could not connect to host
-tourify.me: did not receive HSTS header
-tourispo.com: could not connect to host
-tourpeer.com: did not receive HSTS header
-tours.co.th: max-age too low: 0
-toursandtransfers.it: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-toursencancun.com: could not connect to host
-toursinvietnam.tk: could not connect to host
-toursthatmatter.com: did not receive HSTS header
-toushi-return.xyz: did not receive HSTS header
-tousproducteurs.fr: could not connect to host
-toutenmusic.fr: could not connect to host
-towaway.ru: could not connect to host
-townhousedevelopments.com.au: did not receive HSTS header
-townofhulbertok.gov: did not receive HSTS header
-townofpolk-wi.gov: did not receive HSTS header
-townofruthnc.gov: did not receive HSTS header
-tox.im: did not receive HSTS header
-toxicboot.com: could not connect to host
-toxicip.com: could not connect to host
-toxme.se: did not receive HSTS header
-toymania.de: could not connect to host
-toyotamotala.se: could not connect to host
-tpbcdn.com: could not connect to host
-tpblist.xyz: could not connect to host
-tpbunblocked.org: could not connect to host
-tpci.biz: could not connect to host
-tpe-edu.com: could not connect to host
-tpms4u.at: could not connect to host
-tppdebate.org: did not receive HSTS header
-tpro.co.id: did not receive HSTS header
-tql.plus: could not connect to host
-tr0n.net: could not connect to host
-trabajarenperu.com: did not receive HSTS header
-tracalada.cl: did not receive HSTS header
-tracelight.io: did not receive HSTS header
-tracemyplace.com: did not receive HSTS header
-traces.ml: could not connect to host
-tracetracker.com: did not receive HSTS header
-track.plus: could not connect to host
-track54.com: did not receive HSTS header
-trackdays4fun.com: did not receive HSTS header
-trackdomains.com: could not connect to host
-tracker-gps.ch: could not connect to host
-trackfeed.tokyo: could not connect to host
-trackingstream.com: did not receive HSTS header
-trackmeet.io: did not receive HSTS header
-tracknerd.xyz: could not connect to host
-tracktivity.com.au: could not connect to host
-trade-smart.ru: could not connect to host
-tradedesk.co.za: could not connect to host
-tradelogicintl.com: did not receive HSTS header
-trademan.ky: could not connect to host
-traderjoe-cloud.de: did not receive HSTS header
-tradernet.com: did not receive HSTS header
-tradernet.ru: did not receive HSTS header
-tradeshowfreightservices.com: could not connect to host
-tradexport.cn: did not receive HSTS header
-tradexport.com: did not receive HSTS header
-tradietrove.com.au: did not receive HSTS header
-trading-analytics.com: could not connect to host
-tradingbhavishya.com: did not receive HSTS header
-tradingcentre.com.au: could not connect to host
-tradinghope.com: could not connect to host
-tradingoptioncloud.com: could not connect to host
-tradingrooms.com: could not connect to host
-traditional-knowledge.tk: did not receive HSTS header
-traditionalturk.com: could not connect to host
-traditionsvivantesenimages.ch: could not connect to host
-traefik.io: did not receive HSTS header
-traeningsprojekt.dk: could not connect to host
-traffic.az: did not receive HSTS header
-trafficmgr.cn: could not connect to host
-trafficquality.org: could not connect to host
-traffictigers.com: did not receive HSTS header
-traforet.win: could not connect to host
-traigo.co: did not receive HSTS header
-trailcloud.ink: could not connect to host
-train-track.co.uk: did not receive HSTS header
-traindb.nl: did not receive HSTS header
-trainhorns.us: did not receive HSTS header
-training4girls.ru: could not connect to host
-trainingdigital.cl: did not receive HSTS header
-traininglist.org: could not connect to host
-trainingproviderresults.gov: could not connect to host
-trainings-handschuhe-test.de: could not connect to host
-trainline.io: could not connect to host
-traintimes.be: could not connect to host
-traintimes.ch: could not connect to host
-traintimes.dk: could not connect to host
-traintimes.it: could not connect to host
-traintimes.lu: could not connect to host
-trainut.com: could not connect to host
-traiteur-laporte.fr: could not connect to host
-trakfusion.com: could not connect to host
-trakkr.tk: could not connect to host
-trance-heal.com: could not connect to host
-trance-heal.de: could not connect to host
-trance-heal.me: could not connect to host
-trance.im: did not receive HSTS header
-tranceheal.com: could not connect to host
-tranceheal.de: did not receive HSTS header
-tranceheal.me: could not connect to host
-trancendances.fr: could not connect to host
-trandanhland.com: could not connect to host
-tranglenull.xyz: could not connect to host
-tranos.de: did not receive HSTS header
-tranquillapp.com: could not connect to host
-transbike.es: did not receive HSTS header
-transcendmotor.sg: could not connect to host
-transcricentro.pt: could not connect to host
-transcriptionwave.com: did not receive HSTS header
-transdirect.com.au: did not receive HSTS header
-transdyne.com: did not receive HSTS header
-transferio.nl: did not receive HSTS header
-transfile.fr: could not connect to host
-transformify.org: did not receive HSTS header
-transl8.eu: did not receive HSTS header
-translate-polish.com: did not receive HSTS header
-translate.googleapis.com: did not receive HSTS header (error ignored - included regardless)
-translateblender.ru: could not connect to host
-translatoruk.co.uk: did not receive HSTS header
-transmithe.net: could not connect to host
-transmitit.pl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-transparent.cf: did not receive HSTS header
-transparentcorp.com: did not receive HSTS header
-transportal.sk: could not connect to host
-transsexualpantyhose.com: could not connect to host
-transverify.com: did not receive HSTS header
-trapkitchen.ml: could not connect to host
-tratamentoparacelulite.biz: could not connect to host
-trauertexte.info: could not connect to host
-traumhuetten.de: did not receive HSTS header
-travality.ru: could not connect to host
-travaux-toiture-idf.fr: did not receive HSTS header
-travauxcontact.com: did not receive HSTS header
-travel-kuban.ru: did not receive HSTS header
-travel-to-nature.ch: did not receive HSTS header
-travel.co.za: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-travel1x1.com: did not receive HSTS header
-traveleets.com: could not connect to host
-travelholicworld.com: could not connect to host
-traveling-thailand.info: could not connect to host
-travelingbagsmke.com: did not receive HSTS header
-travelinghacker.com.au: could not connect to host
-travelinsightswriter.com: could not connect to host
-travelling.expert: could not connect to host
-travellsell.com: could not connect to host
-travelmexico42.com: could not connect to host
-travelmyth.ie: did not receive HSTS header
-travelpricecheck.com: max-age too low: 0
-travisec.com: could not connect to host
-travotion.com: could not connect to host
-trazosdearte.com: did not receive HSTS header
-trea98.org: could not connect to host
-treasuredinheritanceministry.com: did not receive HSTS header
-treatment.org: could not connect to host
-treatprostatewithhifu.com: could not connect to host
-tredevlet.com: did not receive HSTS header
-treebaglia.xyz: could not connect to host
-treeby.net: could not connect to host
-treeremovaljohannesburg.co.za: could not connect to host
-treeremovalsboksburg.co.za: did not receive HSTS header
-trees.chat: did not receive HSTS header
-treetopsecurity.com: did not receive HSTS header
-treino.blog.br: could not connect to host
-treinonerd.com: could not connect to host
-treker.us: could not connect to host
-trell.co.in: did not receive HSTS header
-tremoureux.fr: could not connect to host
-trendberry.ru: could not connect to host
-trendfrisuren-bongard.de: could not connect to host
-trendingpulse.com: did not receive HSTS header
-trendisland.de: did not receive HSTS header
-trendyaccessoriesonline.com: could not connect to host
-trendydips.com: could not connect to host
-trentmaydew.com: did not receive HSTS header
-trenztec.ml: could not connect to host
-tretail.net: could not connect to host
-treussart.com: did not receive HSTS header
-trevsanders.co.uk: could not connect to host
-trewe.eu: could not connect to host
-trezy.me: could not connect to host
-trezy.net: could not connect to host
-triadwars.com: did not receive HSTS header
-triageo.com.au: did not receive HSTS header
-trialmock.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-trianglebruins.org: did not receive HSTS header
-trianon.xyz: could not connect to host
-tribalwarsstyles.tk: could not connect to host
-tribistovo.tk: did not receive HSTS header
-tributh.cf: could not connect to host
-tributh.ga: could not connect to host
-tributh.gq: could not connect to host
-tributh.ml: could not connect to host
-trickedguys.com: could not connect to host
-tricks.clothing: did not receive HSTS header
-trictric.eco.br: did not receive HSTS header
-trictriceletrico.com.br: did not receive HSTS header
-triddi.com: could not connect to host
-tridentflood.com: did not receive HSTS header
-tridentmedia.gq: could not connect to host
-tridimage.com: did not receive HSTS header
-trik.es: could not connect to host
-trileg.net: could not connect to host
-trilex.be: did not receive HSTS header
-trilithsolutions.com: did not receive HSTS header
-trilon.eu: did not receive HSTS header
-trim21.cn: could not connect to host
-trimarchimanuele.it: did not receive HSTS header
-trinity.fr.eu.org: could not connect to host
-trinityaffirmations.com: max-age too low: 0
-trinitytechdev.com: could not connect to host
-trink-und-partyspiele.de: could not connect to host
-trior.net: did not receive HSTS header
-tripasia.id: did not receive HSTS header
-tripcombi.com: did not receive HSTS header
-tripdelta.com: did not receive HSTS header
-tripinsider.club: could not connect to host
-triple-mmm.de: max-age too low: 0
-triplekeys.net: did not receive HSTS header
-triplicate.gq: could not connect to host
-tripp.xyz: could not connect to host
-tripseats.com: could not connect to host
-triri.org: did not receive HSTS header
-trisect.eu: could not connect to host
-trish-mcevoy.ru: could not connect to host
-trisportas.lt: did not receive HSTS header
-tristanberger.io: could not connect to host
-tristanfarkas.one: could not connect to host
-triticeaetoolbox.org: did not receive HSTS header
-trix.pw: did not receive HSTS header
-trix360.com: did not receive HSTS header
-trixies-wish.nz: could not connect to host
-trixy.com.br: could not connect to host
-triz.co.uk: could not connect to host
-trizone.com.au: did not receive HSTS header
-troedel-trolle.de: could not connect to host
-troisdorf-gestalten.de: did not receive HSTS header
-trollme.me: could not connect to host
-trollscave.xyz: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-trondelan.no: max-age too low: 0
-tronflix.com: did not receive HSTS header
-tronmeo.com: could not connect to host
-troo.ly: could not connect to host
-tropicaltravelco.com: could not connect to host
-troplo.com: could not connect to host
-trotter.cf: could not connect to host
-trouble-free-employees.com: did not receive HSTS header
-trouter.io: could not connect to host
-trouver-son-chemin.com: could not connect to host
-troykelly.com: did not receive HSTS header
-trpa.gov: could not connect to host
-trpg.wiki: could not connect to host
-trucchibellezza.com: could not connect to host
-truckers-auction.jp: did not receive HSTS header
-truckerswereld.nl: did not receive HSTS header
-truckgpsreviews.com: did not receive HSTS header
-truckstop-magazin.de: could not connect to host
-true.ink: did not receive HSTS header
-trueassignmenthelp.co.uk: could not connect to host
-trueblueessentials.com: did not receive HSTS header
-trueessayhelp.co.uk: could not connect to host
-truejob.com: did not receive HSTS header
-trueminecraft.com: could not connect to host
-trueproxy.net: did not receive HSTS header
-trueseeing.com: could not connect to host
-truessl.shop: could not connect to host
-truestaradvisors.com: could not connect to host
-trufflemonkey.co.uk: could not connect to host
-truhlarstvi-fise.cz: could not connect to host
-trulance.com: did not receive HSTS header
-trumeet.top: did not receive HSTS header
-truncus-encephali.co.uk: could not connect to host
-trunkjunk.co: could not connect to host
-trustedbody.com: did not receive HSTS header
-trustedinnovators.com: could not connect to host
-trustednewssites.com: could not connect to host
-trusteecar.com: did not receive HSTS header
-trustees.org: did not receive HSTS header
-trustmeimfancy.com: could not connect to host
-trustocean.com: did not receive HSTS header
-truthsayer.tk: could not connect to host
-truyencuoi.org: could not connect to host
-truyentranh24.net: did not receive HSTS header
-trybabyschoice.com: could not connect to host
-trybind.com: could not connect to host
-tryfabulousdiet.com: could not connect to host
-tryfabulousskincream.com: could not connect to host
-tryfabulousskinserum.com: could not connect to host
-tryfm.net: did not receive HSTS header
-trygarciniaslimdiet.com: could not connect to host
-tryingtotakeovertheworld.tk: could not connect to host
-trymegadrol.com: could not connect to host
-trynowrinkleseyeserum.com: could not connect to host
-tryoneday.co: could not connect to host
-trypineapple.com: could not connect to host
-tryupdates.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-trywesayyes.com: could not connect to host
-ts-publishers.com: could not connect to host
-ts2.se: could not connect to host
-ts3-dns.com: could not connect to host
-ts3-dns.me: could not connect to host
-ts3-dns.net: could not connect to host
-ts3-legenda.tech: could not connect to host
-ts3.consulting: could not connect to host
-ts5server.eu: could not connect to host
-tsachs.eu: could not connect to host
-tsahf.com: did not receive HSTS header
-tsai.com.de: did not receive HSTS header
-tsaro.io: could not connect to host
-tscqmalawi.info: could not connect to host
-tsdom.net: could not connect to host
-tsecy.com: could not connect to host
-tsgbit.net: could not connect to host
-tsgoc.com: did not receive HSTS header
-tsigaradiko.com: could not connect to host
-tsinnosti.com: did not receive HSTS header
-tsng-stg.tk: did not receive HSTS header
-tsng.co.jp: did not receive HSTS header
-tsrstore.gq: could not connect to host
-tsu-ku-ro.com: could not connect to host
-tsugi.fr: did not receive HSTS header
-tsukeawase.com: did not receive HSTS header
-tsukuba.style: could not connect to host
-tsumegumi.net: could not connect to host
-tsumi.moe: could not connect to host
-tsung.co: did not receive HSTS header
-tsura.org: could not connect to host
-tsurezurematome.ga: could not connect to host
-tsurimap.com: could not connect to host
-tsutsumi-kogyo.jp: could not connect to host
-tsuyuzakihiroyuki.com: could not connect to host
-tsv-1894.de: could not connect to host
-tt0866.com: did not receive HSTS header
-tt2966.com: could not connect to host
-tt3666.com: could not connect to host
-tt5197.co: could not connect to host
-tt6396.com: could not connect to host
-tt6729.co: could not connect to host
-tt6729.com: did not receive HSTS header
-tt6957.co: could not connect to host
-tt9297.co: could not connect to host
-tt9397.com: did not receive HSTS header
-tt9721.com: did not receive HSTS header
-tt9728.co: could not connect to host
-ttackmedical.com.br: could not connect to host
-ttcak.ddns.net: could not connect to host
-ttchan.org: could not connect to host
-ttfin.ch: could not connect to host
-ttfollower.com: did not receive HSTS header
-ttll.de: did not receive HSTS header
-ttp-shop.com.ua: could not connect to host
-ttrade.ga: could not connect to host
-tts.co.nz: did not receive HSTS header
-ttspttsp.com: could not connect to host
-tty.space: could not connect to host
-ttyystudio.com: could not connect to host
-ttz.im: could not connect to host
-tu6.pm: could not connect to host
-tuamoronline.com: could not connect to host
-tuang-tuang.com: could not connect to host
-tuanhstore.com: could not connect to host
-tubedesire.com: could not connect to host
-tubeju.com: could not connect to host
-tubetoon.com: could not connect to host
-tubetooncartoons.com: could not connect to host
-tubex.ga: could not connect to host
-tucidi.net: could not connect to host
-tucker.wales: could not connect to host
-tucnak.eu: could not connect to host
-tudorapido.com.br: could not connect to host
-tudorproject.org: could not connect to host
-tueche.com.ar: did not receive HSTS header
-tueplay.host: could not connect to host
-tufashionista.com: could not connect to host
-tufilo.com: could not connect to host
-tugers.com: did not receive HSTS header
-tugesha.com: could not connect to host
-tuingresoonline.com: could not connect to host
-tula-city.tk: could not connect to host
-tula-news.ga: did not receive HSTS header
-tulasdeportivasbless.com: did not receive HSTS header
-tulpan22.ru: did not receive HSTS header
-tulsameetingroom.com: could not connect to host
-tumarcafe.com: could not connect to host
-tumutanzi.com: did not receive HSTS header
-tunai.id: could not connect to host
-tunca.it: did not receive HSTS header
-tunebitfm.de: could not connect to host
-tunisiapress.tk: could not connect to host
-tunity.be: did not receive HSTS header
-tunochebuena.com: could not connect to host
-tuotteet.org: could not connect to host
-tuou.xyz: could not connect to host
-turciya.cf: did not receive HSTS header
-turingmind.com: did not receive HSTS header
-turismo.cl: did not receive HSTS header
-turismonochile.com: did not receive HSTS header
-turkey-portal.tk: could not connect to host
-turkface.tk: could not connect to host
-turkiet.guide: could not connect to host
-turkiyen.com: could not connect to host
-turkmannews.tk: could not connect to host
-turm-umzuege.de: max-age too low: 3600
-turn-sticks.com: could not connect to host
-turnik-67.ru: could not connect to host
-turniker.ru: could not connect to host
-turnsticks.com: could not connect to host
-turtle.ai: did not receive HSTS header
-turtlehead.tk: did not receive HSTS header
-turtlementors.com: could not connect to host
-turtles.ga: could not connect to host
-tusb.ml: could not connect to host
-tusksol.com: could not connect to host
-tussengelegenwoningverkopen.nl: could not connect to host
-tuthowto.com: could not connect to host
-tutiendaroja.com: could not connect to host
-tutiendarosa.com: could not connect to host
-tutoref.com: did not receive HSTS header
-tutorialcoding.tk: could not connect to host
-tutorialinux.com: could not connect to host
-tutorio.ga: could not connect to host
-tuturulianda.com: could not connect to host
-tuvalie.com: could not connect to host
-tuvangoicuoc.com: could not connect to host
-tuversionplus.com: could not connect to host
-tuxhound.org: could not connect to host
-tuxpeliculas.com: could not connect to host
-tuxrtfm.com: could not connect to host
-tv.search.yahoo.com: could not connect to host
-tvbeugels.nl: did not receive HSTS header
-tvc.red: could not connect to host
-tvcal.net: could not connect to host
-tvdates.info: could not connect to host
-tverdohleb.com: did not receive HSTS header
-tverskaya-outlet.ru: could not connect to host
-tvoia-dietka.tk: could not connect to host
-tvoru.com.ua: did not receive HSTS header
-tvqc.com: did not receive HSTS header
-tvtubeflix.com: could not connect to host
-tvz-materijali.com: could not connect to host
-tw-hosting.de: could not connect to host
-tw2-tools.ga: could not connect to host
-twarog.cc: could not connect to host
-tweakersbadge.nl: could not connect to host
-twee-onder-een-kap-woning-in-alphen-aan-den-rijn-kopen.nl: could not connect to host
-twee-onder-een-kap-woning-in-brielle-kopen.nl: could not connect to host
-twee-onder-een-kap-woning-in-de-friese-meren-kopen.nl: could not connect to host
-twee-onder-een-kap-woning-in-delfzijl-kopen.nl: could not connect to host
-twee-onder-een-kap-woning-in-leeuwarden-kopen.nl: could not connect to host
-twee-onder-een-kap-woning-in-pekela-kopen.nl: could not connect to host
-twee-onder-een-kap-woning-in-rijnwaarden-kopen.nl: could not connect to host
-twee-onder-een-kap-woning-in-sudwest-fryslan-kopen.nl: could not connect to host
-twee-onder-een-kap-woning-in-veendam-kopen.nl: could not connect to host
-twee-onder-een-kap-woning-in-zuidplas-kopen.nl: could not connect to host
-twee-onder-een-kap-woning-in-zwartewaterland-kopen.nl: could not connect to host
-tweedehandslaptophardenberg.nl: could not connect to host
-tweeondereenkapverkopen.nl: could not connect to host
-tweeondereenkapwoningverkopen.nl: could not connect to host
-tweetfinity.com: could not connect to host
-tweetfinityapp.com: could not connect to host
-tweetify.io: could not connect to host
-twelve.rocks: could not connect to host
-twelve.today: could not connect to host
-twelverocks.com: could not connect to host
-twem.ddns.net: could not connect to host
-twentymilliseconds.com: did not receive HSTS header
-twilightcookies.ca: could not connect to host
-twillionmas.com: could not connect to host
-twin-tails.xyz: could not connect to host
-twinkieman.com: could not connect to host
-twinkietotmom.com: did not receive HSTS header
-twinkseason.ca: could not connect to host
-twinkseason.co: could not connect to host
-twinkseason.co.uk: could not connect to host
-twinkseason.com: could not connect to host
-twinkseason.net: could not connect to host
-twinkseason.org: could not connect to host
-twinkseason.xyz: could not connect to host
-twiri.net: could not connect to host
-twist.party: could not connect to host
-twistapp.com: did not receive HSTS header
-twistertoneel.nl: did not receive HSTS header
-twistopay.com: did not receive HSTS header
-twittelzie.nl: could not connect to host
-twitter.ax: could not connect to host
-twocornertiming.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-twodadsgames.com: could not connect to host
-twogo.com: did not receive HSTS header
-twojfaktum.pl: could not connect to host
-twolanedesign.com: could not connect to host
-twolinepassbrewing.com: could not connect to host
-twolivelife.com: could not connect to host
-twonodes.games: did not receive HSTS header
-twopif.net: did not receive HSTS header
-twotube.ie: could not connect to host
-twtimmy.com: could not connect to host
-twtremind.com: could not connect to host
-twun.io: could not connect to host
-twuni.org: did not receive HSTS header
-tx041cap.org: could not connect to host
-txbi.de: could not connect to host
-txclimbers.com: could not connect to host
-txcp01.com: could not connect to host
-txcp02.com: could not connect to host
-txf.pw: could not connect to host
-txpi.nsupdate.info: could not connect to host
-ty513.com: could not connect to host
-ty525.com: could not connect to host
-ty529.com: could not connect to host
-ty561.com: could not connect to host
-ty562.com: could not connect to host
-ty573.com: could not connect to host
-ty583.com: could not connect to host
-ty587.com: could not connect to host
-ty593.com: could not connect to host
-ty5998.com: could not connect to host
-ty613.com: could not connect to host
-ty632.com: did not receive HSTS header
-ty637.com: could not connect to host
-ty650.com: could not connect to host
-ty679.com: could not connect to host
-ty705.com: could not connect to host
-ty715.com: could not connect to host
-ty716.com: could not connect to host
-ty723.com: could not connect to host
-ty736.com: could not connect to host
-ty737.com: could not connect to host
-ty739.com: could not connect to host
-ty750.com: could not connect to host
-ty756.com: could not connect to host
-ty767.com: could not connect to host
-ty783.com: could not connect to host
-ty785.com: could not connect to host
-ty791.com: could not connect to host
-ty793.com: could not connect to host
-ty812.com: could not connect to host
-ty835.com: could not connect to host
-ty853.com: could not connect to host
-ty857.com: could not connect to host
-ty927.com: could not connect to host
-ty935.com: could not connect to host
-ty937.com: could not connect to host
-ty953.com: could not connect to host
-ty962.com: could not connect to host
-ty965.com: could not connect to host
-ty980.com: could not connect to host
-tyc009.cc: could not connect to host
-tycjt.vip: could not connect to host
-tykoon.com: could not connect to host
-tyl.io: did not receive HSTS header
-tyler.coach: could not connect to host
-tylercoach.com: could not connect to host
-tylerfreedman.com: did not receive HSTS header
-tylerharcourt.net: could not connect to host
-tylerharcourt.xyz: could not connect to host
-tylerjharcourt.com: could not connect to host
-tylian.net: max-age too low: 0
-tylyjj.com: max-age too low: 0
-typcn.com: could not connect to host
-type1joe.com: could not connect to host
-type1joe.net: could not connect to host
-type1joe.org: could not connect to host
-typehub.net: could not connect to host
-typeofweb.com: did not receive HSTS header
-typeonejoe.net: could not connect to host
-typeonejoe.org: could not connect to host
-typeria.net: could not connect to host
-typingrevolution.com: could not connect to host
-tyree.tech: could not connect to host
-tyreis.com: could not connect to host
-tyrelius.com: could not connect to host
-tyroproducts.eu: did not receive HSTS header
-tyskland.guide: could not connect to host
-tysye.ca: could not connect to host
-tyumen.ga: could not connect to host
-tzappa.net: could not connect to host
-tzifas.com: could not connect to host
-tziyona.net: could not connect to host
-tzsec.com: could not connect to host
-tzwe.com: could not connect to host
-tzyingshi.com: could not connect to host
-u-master.net: did not receive HSTS header
-u-metals.com: did not receive HSTS header
-u-tokyo.club: did not receive HSTS header
-u0010.com: could not connect to host
-u0020.com: could not connect to host
-u0050.com: could not connect to host
-u0060.com: could not connect to host
-u0070.com: could not connect to host
-u0080.com: could not connect to host
-u0090.com: could not connect to host
-u1100.com: could not connect to host
-u1144.com: could not connect to host
-u175.com: could not connect to host
-u17go.com: max-age too low: 2592000
-u2fanlife.com: could not connect to host
-u30365.com: could not connect to host
-u5197.co: could not connect to host
-u6729.co: could not connect to host
-u6729.com: did not receive HSTS header
-u6957.co: could not connect to host
-u6957.com: did not receive HSTS header
-u81365.com: did not receive HSTS header
-u81818.com: did not receive HSTS header
-u82365.com: did not receive HSTS header
-u9297.co: could not connect to host
-u9397.com: did not receive HSTS header
-u9721.com: did not receive HSTS header
-u9728.co: could not connect to host
-uachemlabs.com: could not connect to host
-uaci.edu.mx: could not connect to host
-uadp.pw: could not connect to host
-uahs.org.uk: did not receive HSTS header
-uareferat.tk: could not connect to host
-ubalert.com: did not receive HSTS header
-uber.com.au: could not connect to host
-uberactivist.com: could not connect to host
-uberbkk.com: could not connect to host
-ubercalculator.com: did not receive HSTS header
-uberfunction.com: did not receive HSTS header
-uberhorny.tk: could not connect to host
-uberifix.ca: did not receive HSTS header
-ubi.gg: could not connect to host
-ubicloud.de: did not receive HSTS header
-ubicv.com: could not connect to host
-ubis.group: could not connect to host
-ublox.com: did not receive HSTS header
-ubntleaks.com: could not connect to host
-uborcare.com: could not connect to host
-uborka-kvartir-moskva.gq: could not connect to host
-ubstudygroups.com: did not receive HSTS header
-ubstudygroups.org: did not receive HSTS header
-ubtce.com: could not connect to host
-ubun.net: could not connect to host
-ubuntuhot.com: did not receive HSTS header
-uc.ac.id: did not receive HSTS header
-uchiha.ml: did not receive HSTS header
-uclanmasterplan.co.uk: did not receive HSTS header
-uclip.club: could not connect to host
-ucmatedeveloper.gq: could not connect to host
-udachnika.ru: did not receive HSTS header
-udancy.com: could not connect to host
-udbhav.me: could not connect to host
-udbina.tk: could not connect to host
-uddate-linthdcp-3345app.com: did not receive HSTS header
-uddate-linthdcp-567app.com: could not connect to host
-uddhabhaldar.com: did not receive HSTS header
-udiutv.no: could not connect to host
-udsocial.com: could not connect to host
-udtunnel.com: could not connect to host
-udvalgte-ordsprog.dk: did not receive HSTS header
-ueba1085.jp: could not connect to host
-uefeng.com: did not receive HSTS header
-uega.net: did not receive HSTS header
-uel-thompson-okanagan.ca: could not connect to host
-uerdingen.info: did not receive HSTS header
-uesociedadlimitada.com: could not connect to host
-ueu.me: could not connect to host
-uex.im: could not connect to host
-ufgaming.com: did not receive HSTS header
-uflixit.com: did not receive HSTS header
-ufo.moe: did not receive HSTS header
-ufoch.com: did not receive HSTS header
-ufotable.uk: could not connect to host
-ugamyd-p1rosd2jcoeg3edh5o1y.com: did not receive HSTS header
-ugcdn.com: could not connect to host
-ugisgutless.com: could not connect to host
-ugo.ninja: could not connect to host
-ugosadventures.com: did not receive HSTS header
-uhappy1.com: could not connect to host
-uhappy11.com: could not connect to host
-uhappy2.com: could not connect to host
-uhappy21.com: could not connect to host
-uhappy22.com: could not connect to host
-uhappy23.com: could not connect to host
-uhappy24.com: could not connect to host
-uhappy25.com: could not connect to host
-uhappy26.com: could not connect to host
-uhappy27.com: could not connect to host
-uhappy28.com: could not connect to host
-uhappy29.com: could not connect to host
-uhappy3.com: could not connect to host
-uhappy30.com: could not connect to host
-uhappy31.com: could not connect to host
-uhappy33.com: could not connect to host
-uhappy50.com: could not connect to host
-uhappy55.com: could not connect to host
-uhappy56.com: did not receive HSTS header
-uhappy57.com: did not receive HSTS header
-uhappy58.com: did not receive HSTS header
-uhappy59.com: did not receive HSTS header
-uhappy6.com: could not connect to host
-uhappy60.com: could not connect to host
-uhappy61.com: could not connect to host
-uhappy62.com: could not connect to host
-uhappy66.com: could not connect to host
-uhappy67.com: could not connect to host
-uhappy69.com: could not connect to host
-uhappy70.com: could not connect to host
-uhappy71.com: could not connect to host
-uhappy72.com: could not connect to host
-uhappy73.com: did not receive HSTS header
-uhappy74.com: did not receive HSTS header
-uhappy75.com: did not receive HSTS header
-uhappy76.com: did not receive HSTS header
-uhappy77.com: could not connect to host
-uhappy78.com: did not receive HSTS header
-uhappy79.com: did not receive HSTS header
-uhappy8.com: could not connect to host
-uhappy80.com: did not receive HSTS header
-uhappy81.com: did not receive HSTS header
-uhappy82.com: did not receive HSTS header
-uhappy83.com: did not receive HSTS header
-uhappy85.com: did not receive HSTS header
-uhappy86.com: did not receive HSTS header
-uhappy88.com: could not connect to host
-uhappy9.com: could not connect to host
-uhappy90.com: did not receive HSTS header
-uhappy99.com: could not connect to host
-uhasseltctf.be: could not connect to host
-uhasseltctf.ga: could not connect to host
-uhasseltodin.be: could not connect to host
-uhm.io: did not receive HSTS header
-uhssl.com: could not connect to host
-uhurl.net: could not connect to host
-uhuru-market.com: did not receive HSTS header
-uicchy.com: could not connect to host
-uitslagensoftware.nl: did not receive HSTS header
-uitvaartvrouwenfriesland.nl: could not connect to host
-uitvaartzorg-heerenveen.nl: could not connect to host
-uitvaartzorgzuidwestfriesland.nl: could not connect to host
-uix.biz: could not connect to host
-ukari.hokkaido.jp: could not connect to host
-ukb.sch.id: did not receive HSTS header
-ukdropshipment.co.uk: did not receive HSTS header
-ukdropshipment.com: did not receive HSTS header
-ukk.dk: did not receive HSTS header
-ukkeyholdingcompany.co.uk: could not connect to host
-ukmortgagecompare.co.uk: could not connect to host
-ukpirate.org: could not connect to host
-ukrgadget.com: could not connect to host
-ulabox.cat: did not receive HSTS header
-ulabox.es: did not receive HSTS header
-ulalau.com: did not receive HSTS header
-ulfberht.fi: did not receive HSTS header
-ulgc.cz: could not connect to host
-ulickaprozivot.cz: could not connect to host
-ullamodaintima.com.br: could not connect to host
-ulmo.dk: could not connect to host
-ulotnefoto.pl: did not receive HSTS header
-ulovdomov.cz: did not receive HSTS header
-ulsters.cf: could not connect to host
-ulti.gq: could not connect to host
-ultimate-garcinia-plus.com: could not connect to host
-ultimate-glow-skin.com: could not connect to host
-ultimate-memoryplus.com: could not connect to host
-ultimate-neuroplus.com: could not connect to host
-ultrasite.tk: could not connect to host
-ultrasteam.net: could not connect to host
-ultratech.software: did not receive HSTS header
-ultrixus.rocks: could not connect to host
-ultros.io: did not receive HSTS header
-uma.vn: did not receive HSTS header
-umaimise.info: did not receive HSTS header
-umassfive.coop: did not receive HSTS header
-umbrellaye.online: could not connect to host
-umbriel.fr: did not receive HSTS header
-umgardi.ca: could not connect to host
-umidev.com: could not connect to host
-umie.cc: did not receive HSTS header
-umkmjogja.com: did not receive HSTS header
-ump45.moe: could not connect to host
-umsolugar.com.br: could not connect to host
-umwandeln-online.de: could not connect to host
-umzug-berlin24.de: did not receive HSTS header
-un.pe: did not receive HSTS header
-unadonna.it: did not receive HSTS header
-unapolegetic.co: did not receive HSTS header
-unart.info: could not connect to host
-unasim.gq: could not connect to host
-unbanthe.net: did not receive HSTS header
-unbelievableplaces.de: could not connect to host
-unblockall.xyz: could not connect to host
-unblockat.tk: could not connect to host
-unblocked-networks.org: could not connect to host
-unblocked.blue: could not connect to host
-unblocked.cx: could not connect to host
-unblocked.date: could not connect to host
-unblocked.faith: could not connect to host
-unblocked.host: did not receive HSTS header
-unblocked.party: could not connect to host
-unblocked.st: could not connect to host
-unblocked.today: could not connect to host
-unblocked.works: could not connect to host
-unblockedall.site: could not connect to host
-unblockedbay.info: could not connect to host
-unblockerproxy.site: could not connect to host
-unblockerproxy.top: could not connect to host
-unblockmy.party: could not connect to host
-unblockmy.tech: could not connect to host
-unblockmy.xyz: could not connect to host
-unblockmyproxy.site: could not connect to host
-unblockthe.site: could not connect to host
-unblockthe.top: could not connect to host
-unblockweb.co: could not connect to host
-unccdesign.club: could not connect to host
-unclegen.xyz: could not connect to host
-undeadbrains.de: could not connect to host
-under30stravelinsurance.com.au: did not receive HSTS header
-undercovercondoms.co.uk: did not receive HSTS header
-underkin.com: could not connect to host
-underskatten.tk: could not connect to host
-undo.co.il: could not connect to host
-undone.me: could not connect to host
-unedouleur.com: could not connect to host
-unferno.tech: did not receive HSTS header
-unfiltered.nyc: could not connect to host
-ungeek.eu: did not receive HSTS header
-ungeek.fr: max-age too low: 2592000
-ungelektro.no: did not receive HSTS header
-ungern.guide: could not connect to host
-unhu.fr: did not receive HSTS header
-unhurriedluxury.com: could not connect to host
-uni-games.com: could not connect to host
-uni2share.com: could not connect to host
-uniaofraternalraulcury.com.br: max-age too low: 0
-unibolsit.com: could not connect to host
-unicefcards.at: did not receive HSTS header
-unicefcards.cz: could not connect to host
-unicefcards.gr: could not connect to host
-unicefcards.sk: could not connect to host
-unicefkaarten.be: did not receive HSTS header
-unicefkepeslapok.hu: could not connect to host
-unicefkort.dk: did not receive HSTS header
-unicefvoscilnice.si: could not connect to host
-unicioushop.com: could not connect to host
-unicmotos.com: could not connect to host
-unicode.gq: could not connect to host
-unicooo.com: could not connect to host
-unicorn.li: could not connect to host
-unicorncloud.org: could not connect to host
-unifei.edu.br: did not receive HSTS header
-unifiednetwork.me: could not connect to host
-uniformebateriasheliar.com.br: could not connect to host
-uniformecomgas.com.br: could not connect to host
-uniformehope.com.br: could not connect to host
-uniformehumboldt.com.br: did not receive HSTS header
-uniformespousoalegre.com.br: could not connect to host
-unikitty-on-tour.com: could not connect to host
-uninet.cf: did not receive HSTS header
-uninutri.com.br: did not receive HSTS header
-uniojeda.ml: could not connect to host
-unionstationapp.com: could not connect to host
-unique-bouncy-castles.co.uk: could not connect to host
-unirenter.ru: did not receive HSTS header
-unison.com: did not receive HSTS header
-unisyssecurity.com: could not connect to host
-united-german-commander.de: did not receive HSTS header
-united-schools.net: could not connect to host
-unitedcyberdevelopment.com: could not connect to host
-unitedstreamers.de: did not receive HSTS header
-unitlabs.net: could not connect to host
-unitrade-425.co.za: did not receive HSTS header
-univerkeys.com: could not connect to host
-univerpack.net: could not connect to host
-universal-happiness.com: could not connect to host
-universalpaymentgateway.com: could not connect to host
-universeinform.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-universeit.mx: could not connect to host
-universidadcatolica.tk: could not connect to host
-universidadvg.edu.mx: could not connect to host
-university4industry.com: did not receive HSTS header
-universityhousemates.co.uk: could not connect to host
-universityhousemates.uk: could not connect to host
-universocaballo.top: could not connect to host
-univstore.win: could not connect to host
-univz.com: could not connect to host
-unixapp.ml: did not receive HSTS header
-unixattic.com: did not receive HSTS header
-unixtime.pro: could not connect to host
-unknownbreakup.com: max-age too low: 2592000
-unknownphenomena.net: could not connect to host
-unleash.pw: could not connect to host
-unlocktechs.com: did not receive HSTS header
-unlogis.ch: could not connect to host
-unmanaged.space: could not connect to host
-unobrindes.com.br: did not receive HSTS header
-unosconotros.com: could not connect to host
-unplugg3r.dk: could not connect to host
-unravel.ie: could not connect to host
-unripple.com: could not connect to host
-unruh.fr: did not receive HSTS header
-uns.ac.id: did not receive HSTS header
-unsacsurledos.com: did not receive HSTS header
-unschoolrules.com: did not receive HSTS header
-unsee.cc: did not receive HSTS header
-unsereins.me: did not receive HSTS header
-unstable.network: could not connect to host
-unstockd.org: could not connect to host
-unsupervised.ca: did not receive HSTS header
-unsystem.net: could not connect to host
-untaianelena.com: did not receive HSTS header
-unterkunft.guru: did not receive HSTS header
-unterschicht.tv: could not connect to host
-unti.me: could not connect to host
-untoldstory.eu: did not receive HSTS header
-unun.fi: did not receive HSTS header
-unwiredbrain.com: could not connect to host
-unwomen.is: did not receive HSTS header
-unworthy.ml: could not connect to host
-unyq.me: could not connect to host
-uonstaffhub.com: could not connect to host
-uoone.com: could not connect to host
-uow.ninja: could not connect to host
-up1.ca: could not connect to host
-upaknship.com: did not receive HSTS header
-upandclear.org: max-age too low: 0
-upboard.jp: could not connect to host
-upcloud.cz: could not connect to host
-update-linthdcp-567app1.com: did not receive HSTS header
-updatehub.io: did not receive HSTS header
-upforshare.com: did not receive HSTS header
-upldr.pw: could not connect to host
-uplinkgame.tk: could not connect to host
-upliving.be: did not receive HSTS header
-upload.cat: could not connect to host
-uploadbro.com: could not connect to host
-upmchealthsecurity.us: could not connect to host
-upnext.io: could not connect to host
-upnorthproperty.com: did not receive HSTS header
-uporoops.com: could not connect to host
-uppfinnarenc.tk: could not connect to host
-upplay.com.br: did not receive HSTS header
-upr-info.org: did not receive HSTS header
-uprotect.it: could not connect to host
-uprouteyou.com: did not receive HSTS header
-upsettunnel.com: could not connect to host
-upsiteseo.com: could not connect to host
-upstats.eu: could not connect to host
-uptakedigital.com.au: max-age too low: 2592000
-uptic.net: did not receive HSTS header
-uptimenotguaranteed.com: could not connect to host
-uptogood.org: did not receive HSTS header
-upupming.site: did not receive HSTS header
-upvoted.net: could not connect to host
-upwardtraining.co.uk: could not connect to host
-upyourfinances.com: could not connect to host
-urantiabookstudygroup.com: did not receive HSTS header
-urantiabookstudygroup.org: did not receive HSTS header
-urantiabookstudygroups.com: did not receive HSTS header
-urantiabookstudygroups.org: did not receive HSTS header
-urantiastudygroup.org: did not receive HSTS header
-urantiastudygroups.com: did not receive HSTS header
-urantiastudygroups.org: did not receive HSTS header
-urban-garden.lt: could not connect to host
-urban-garden.lv: could not connect to host
-urbandance.club: did not receive HSTS header
-urbane-london.com: did not receive HSTS header
-urbangymfirenze.com: could not connect to host
-urbanmelbourne.info: could not connect to host
-urbanmic.com: could not connect to host
-urbansparrow.in: could not connect to host
-urbanstylestaging.com: could not connect to host
-urbansurvival.com: max-age too low: 7776000
-urbanxhome.com: did not receive HSTS header
-urbpic.com: could not connect to host
-urep.us: could not connect to host
-urgences-valais.ch: could not connect to host
-urinedrugtesthq.com: did not receive HSTS header
-urion.com.br: did not receive HSTS header
-uriport.com: could not connect to host
-url.cab: did not receive HSTS header
-url0.eu: did not receive HSTS header
-url1.ga: could not connect to host
-urlachershop.com.br: did not receive HSTS header
-urlaubstipps.eu: could not connect to host
-urlchomp.com: did not receive HSTS header
-urmom.lol: could not connect to host
-urology.wiki: did not receive HSTS header
-uronlinestreams.ga: could not connect to host
-urphp.com: could not connect to host
-ursae.co: could not connect to host
-us-immigration.com: did not receive HSTS header
-usa-10.com: could not connect to host
-usa-10.net: could not connect to host
-usa10sb.com: did not receive HSTS header
-usa250.gov: max-age too low: 300
-usaab.org: did not receive HSTS header
-usabibi.net: did not receive HSTS header
-usacitygames.org: did not receive HSTS header
-usadba.net.ru: could not connect to host
-usafuelservice.com: did not receive HSTS header
-usairlines.us: did not receive HSTS header
-usakitchensandflooring.com: did not receive HSTS header
-usaseanconnect.gov: could not connect to host
-usatomotori.com: did not receive HSTS header
-usbcraft.com: did not receive HSTS header
-usbcurrent.com: did not receive HSTS header
-usbirthcertificate.com: could not connect to host
-usbr.gov: could not connect to host
-usbtypeccompliant.com: could not connect to host
-uscitizenship.info: did not receive HSTS header
-uscntalk.com: could not connect to host
-uscp8.com: could not connect to host
-usdfc.gov: did not receive HSTS header
-usdoscloud.gov: could not connect to host
-use.ci: could not connect to host
-used-in.jp: could not connect to host
-usedesk.ru: did not receive HSTS header
-usedoor.jp: did not receive HSTS header
-usedu.us: could not connect to host
-useevlo.com.br: could not connect to host
-usemusic.com.br: did not receive HSTS header
-user-agent.ga: could not connect to host
-user-new.com: did not receive HSTS header
-user-re.com: did not receive HSTS header
-usercare.com: could not connect to host
-usercompare.tk: could not connect to host
-useresponse.com: did not receive HSTS header
-userify.com: did not receive HSTS header
-userra.gov: could not connect to host
-usidfc.gov: did not receive HSTS header
-usimmigration.us: did not receive HSTS header
-uslab.io: could not connect to host
-usleep.net: could not connect to host
-usparklodging.com: did not receive HSTS header
-uspesnyprvnacek-staging.herokuapp.com: could not connect to host
-uspesnyprvnacek-testing.herokuapp.com: could not connect to host
-usportsgo.com: could not connect to host
-uspsoig.gov: did not receive HSTS header
-usr.nz: did not receive HSTS header
-ussemiquincentennial.gov: max-age too low: 300
-ust.space: did not receive HSTS header
-usu.org.ua: could not connect to host
-usualbeings.com: did not receive HSTS header
-usuluddin.ga: could not connect to host
-ut-addicted.com: did not receive HSTS header
-utahfireinfo.gov: did not receive HSTS header
-utahlocal.net: did not receive HSTS header
-utaiw.com: did not receive HSTS header
-utbosbeekhuuske.tk: could not connect to host
-utdscanner.com: did not receive HSTS header
-uteam.it: could not connect to host
-utilitronium-shockwave.com: could not connect to host
-utilityreport.eu: did not receive HSTS header
-utitreatment.com: did not receive HSTS header
-utleieplassen.no: could not connect to host
-utopiagalaxy.space: could not connect to host
-utopialgb.org.uk: could not connect to host
-utopian-surgery.com: could not connect to host
-utopianconcept.com: did not receive HSTS header
-utopians.dk: could not connect to host
-utox.io: could not connect to host
-uttnetgroup.fr: did not receive HSTS header
-utube.tw: could not connect to host
-utumno.ch: could not connect to host
-utvbloggen.se: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-uu5197.co: could not connect to host
-uu6729.co: could not connect to host
-uu6729.com: did not receive HSTS header
-uu6957.co: could not connect to host
-uu9297.co: could not connect to host
-uu9397.com: did not receive HSTS header
-uu9721.com: did not receive HSTS header
-uu9728.co: could not connect to host
-uuid.cf: could not connect to host
-uuid.fr: did not receive HSTS header
-uuzsama.me: could not connect to host
-uvarov.pw: could not connect to host
-uvolejniku.cz: did not receive HSTS header
-uw1008.com: could not connect to host
-uw2333.com: could not connect to host
-uwe.wtf: did not receive HSTS header
-uwekoetter.com: did not receive HSTS header
-uwesander.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-uwfreelanceopticien.nl: could not connect to host
-uwimonacs.org.jm: did not receive HSTS header
-uwstartups.com: could not connect to host
-uwusergdatasystems.com: could not connect to host
-uxtechnologist.com: did not receive HSTS header
-uxux.pl: could not connect to host
-uygindir.ml: could not connect to host
-uyku-apnesi.com: did not receive HSTS header
-uyym.com: did not receive HSTS header
-uziregister.nl: did not receive HSTS header
-uzmandroid.com: could not connect to host
-uzmandroid.net: could not connect to host
-uzmandroid.top: could not connect to host
-uzpirksana.lv: could not connect to host
-v-desk.ga: could not connect to host
-v-u-z.ru: could not connect to host
-v0rtex.xyz: could not connect to host
-v0tti.com: did not receive HSTS header
-v10006.com: did not receive HSTS header
-v10008.com: did not receive HSTS header
-v12.co.uk: did not receive HSTS header
-v2.pw: did not receive HSTS header
-v2bv.win: could not connect to host
-v2c.tech: did not receive HSTS header
-v2ex.us: could not connect to host
-v2ray6.com: could not connect to host
-v2ray66.com: could not connect to host
-v2ray666.com: could not connect to host
-v3025.com: did not receive HSTS header
-v30365.com: could not connect to host
-v4s.ro: did not receive HSTS header
-v4veedu.com: could not connect to host
-v5017.com: did not receive HSTS header
-v5075.com: did not receive HSTS header
-v5197.co: could not connect to host
-v55530.com: could not connect to host
-v55565.com: did not receive HSTS header
-v5ray.top: could not connect to host
-v5ray.xyz: could not connect to host
-v5wz.com: could not connect to host
-v5xp.com: did not receive HSTS header
-v6004.com: did not receive HSTS header
-v6170.com: did not receive HSTS header
-v66629.com: could not connect to host
-v66635.com: could not connect to host
-v66638.com: could not connect to host
-v6729.co: could not connect to host
-v6957.co: could not connect to host
-v7.cl: could not connect to host
-v700a.com: did not receive HSTS header
-v700b.com: did not receive HSTS header
-v700bb.com: did not receive HSTS header
-v700cc.com: did not receive HSTS header
-v700dd.com: did not receive HSTS header
-v700ee.com: did not receive HSTS header
-v700w.com: did not receive HSTS header
-v789xl.com: could not connect to host
-v800a.com: did not receive HSTS header
-v800b.com: did not receive HSTS header
-v800d.com: did not receive HSTS header
-v800e.com: did not receive HSTS header
-v800f.com: did not receive HSTS header
-v800g.com: did not receive HSTS header
-v800k.com: did not receive HSTS header
-v800n.com: did not receive HSTS header
-v800w.com: did not receive HSTS header
-v800y.com: did not receive HSTS header
-v81365.com: did not receive HSTS header
-v82365.com: did not receive HSTS header
-v88299.com: could not connect to host
-v9037.com: did not receive HSTS header
-v9297.co: could not connect to host
-v9728.co: could not connect to host
-v9728.com: could not connect to host
-v9820.com: could not connect to host
-v9821.com: could not connect to host
-vaaddress.co: could not connect to host
-vaaes.org: did not receive HSTS header
-vaalmarketplace.co.za: could not connect to host
-vaan-arbeidsrecht.nl: could not connect to host
-vacacionesenlinea.com: could not connect to host
-vacationality.com: could not connect to host
-vacationfund.co: could not connect to host
-vacationscostarica.com: did not receive HSTS header
-vaccines.gov: did not receive HSTS header
-vackerbetong.se: could not connect to host
-vaclavambroz.cz: did not receive HSTS header
-vaclavambroz.eu: could not connect to host
-vacuumreviewcenter.com: did not receive HSTS header
-vaddder.com: could not connect to host
-vadennissanofhinesvilleparts.com: could not connect to host
-vadik.me: could not connect to host
-vadodesign.nl: could not connect to host
-vaganciatechnology.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-vagrantbits.com: could not connect to host
-vaincreladyslexie.com: did not receive HSTS header
-vaisselle-nature.fr: did not receive HSTS header
-val-sec.com: could not connect to host
-valaeris.de: did not receive HSTS header
-valbonne-consulting.com: did not receive HSTS header
-valcano-krd.ru: could not connect to host
-valcano.ru: could not connect to host
-valcardiesel.com: could not connect to host
-valecnatechnika.cz: could not connect to host
-valenhub.com: could not connect to host
-valenhub.es: could not connect to host
-valenscaelum.com: could not connect to host
-valentin-dederer.de: could not connect to host
-valentin-ochs.de: could not connect to host
-valentin-sundermann.de: did not receive HSTS header
-valentineapparel.com: could not connect to host
-valentinera.in: did not receive HSTS header
-valeo-it.de: did not receive HSTS header
-valeravi.tk: could not connect to host
-valethound.com: could not connect to host
-valhallacostarica.com: could not connect to host
-valhallamovement.com: did not receive HSTS header
-validatis.com: could not connect to host
-valitron.se: did not receive HSTS header
-valkor.pro: could not connect to host
-valkyrja.xyz: could not connect to host
-valleyridgepta.org: could not connect to host
-valleyshop.ca: could not connect to host
-vallis.net: did not receive HSTS header
-valmagus.com: could not connect to host
-valopv.be: could not connect to host
-valshamar.is: could not connect to host
-valtoaho.com: could not connect to host
-valuechain.me: could not connect to host
-valueofblog.com: could not connect to host
-vamoaeturismo.com.br: could not connect to host
-vamosfalardesaude.pt: could not connect to host
-vampirism.eu: did not receive HSTS header
-vanacht.co.za: did not receive HSTS header
-vanagamsanthai.com: did not receive HSTS header
-vanagamseeds.com: did not receive HSTS header
-vanajahosting.com: did not receive HSTS header
-vandeput.be: did not receive HSTS header
-vanderbiltcisa.org: could not connect to host
-vanderkroon.nl: could not connect to host
-vanderlest.de: did not receive HSTS header
-vanderstraeten.dynv6.net: could not connect to host
-vanderziel.org: could not connect to host
-vanessabalibridal.com: could not connect to host
-vanestack.com: could not connect to host
-vanetv.com: could not connect to host
-vangeluwedeberlaere.be: did not receive HSTS header
-vangore.de: did not receive HSTS header
-vanhaos.com: could not connect to host
-vanitas.xyz: could not connect to host
-vanitynailworkz.com: could not connect to host
-vanlent.net: could not connect to host
-vannaos.com: could not connect to host
-vansieleghem.com: could not connect to host
-vanvoro.us: did not receive HSTS header
-vanwertcountyohio.gov: could not connect to host
-vanwoensel.xyz: could not connect to host
-vapecom-shop.com: could not connect to host
-vapecraftinc.com: did not receive HSTS header
-vapehour.com: could not connect to host
-vapesupplies.com.au: did not receive HSTS header
-vapordepot.jp: could not connect to host
-vaporpunk.space: could not connect to host
-varaeventos.com: did not receive HSTS header
-varden.info: did not receive HSTS header
-varela-electricite.fr: could not connect to host
-varenzeeland.nl: max-age too low: 0
-variable.agency: could not connect to host
-variablyconstant.com: could not connect to host
-variando.fi: did not receive HSTS header
-varicoseveinssolution.com: could not connect to host
-varmepumpe-guide.dk: did not receive HSTS header
-varonahairrestoration.com: did not receive HSTS header
-varshasookt.com: could not connect to host
-varta.io: could not connect to host
-varunpriolkar.com: did not receive HSTS header
-vasa-webstranka.sk: did not receive HSTS header
-vasilisa-volodina.tk: could not connect to host
-vastgoedcultuurfonds.nl: did not receive HSTS header
-vastkustenrunt.se: did not receive HSTS header
-vatelecom.dk: could not connect to host
-vati.pw: could not connect to host
-vatsalyagoel.com: did not receive HSTS header
-vatsim-uk.co.uk: did not receive HSTS header
-vatsim.uk: did not receive HSTS header
-vaud-fleurs.ch: did not receive HSTS header
-vavai.net: did not receive HSTS header
-vavouchers.com: could not connect to host
-vawltstorage.com: could not connect to host
-vayaport.com: could not connect to host
-vazue.com: could not connect to host
-vb-oa.co.uk: did not receive HSTS header
-vbcdn.com: did not receive HSTS header
-vbest.net: could not connect to host
-vbestreviews.com: did not receive HSTS header
-vbhelp.org: could not connect to host
-vbql.me: could not connect to host
-vbulletin-russia.com: could not connect to host
-vbulletinrussia.com: could not connect to host
-vcdn.xyz: could not connect to host
-vcdove.com: could not connect to host
-vcelin-na-doliku.cz: could not connect to host
-vconcept.ch: could not connect to host
-vconcept.me: could not connect to host
-vcr.re: could not connect to host
-vcraftaudio.com: could not connect to host
-vczk.me: could not connect to host
-vdanker.net: could not connect to host
-vdemuzere.be: could not connect to host
-vdhco.be: did not receive HSTS header
-vdio.com: could not connect to host
-vdrpro.com: could not connect to host
-vdzn.net: did not receive HSTS header
-vdzwan.net: did not receive HSTS header
-vebbankir-zajm-onlajn.gq: could not connect to host
-veblen.com: did not receive HSTS header
-vec.ac.nz: did not receive HSTS header
-vechkasov.ru: did not receive HSTS header
-vectro.me: could not connect to host
-vedatkamer.com: could not connect to host
-vega-motor.com.ua: did not receive HSTS header
-vega-rumia.com.pl: did not receive HSTS header
-vega.dyndns.info: could not connect to host
-vegalayer.com: could not connect to host
-vegalengd.com: could not connect to host
-vegane-proteine.com: could not connect to host
-vegangaymer.blog: could not connect to host
-veganopia.org: did not receive HSTS header
-veganosonline.com: could not connect to host
-vegasdocs.com: did not receive HSTS header
-vegepa.com: could not connect to host
-vegetabio.com: did not receive HSTS header
-veggie-treff.de: did not receive HSTS header
-veggiefasting.com: could not connect to host
-veggies.tk: could not connect to host
-veggiesbourg.fr: did not receive HSTS header
-veggiesecret.com: did not receive HSTS header
-vegguide.org: could not connect to host
-vegis.ro: did not receive HSTS header
-veglog.com: could not connect to host
-vegner.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-vehent.org: did not receive HSTS header
-vehicleuplift.co.uk: did not receive HSTS header
-veke.fi: did not receive HSTS header
-vekenz.com: could not connect to host
-velasense.com: could not connect to host
-velib.com: did not receive HSTS header
-velocom.com.ar: did not receive HSTS header
-velonustraduction.com: could not connect to host
-velotyretz.fr: did not receive HSTS header
-vemokin.net: could not connect to host
-vemtorcer.com: did not receive HSTS header
-venalytics.com: could not connect to host
-venclave.com: could not connect to host
-vendserve.eu: could not connect to host
-venicecomputerrepair.com: could not connect to host
-venicefl.gov: could not connect to host
-venicefloridawebsitedesign.com: could not connect to host
-venicerealdeal.com: could not connect to host
-venirextra.com: did not receive HSTS header
-venirideal.com: did not receive HSTS header
-venixplays-stream.ml: could not connect to host
-venje.pro: did not receive HSTS header
-venmos.com: could not connect to host
-venninvestorplatform.com: could not connect to host
-venoom.eu: did not receive HSTS header
-vensl.org: could not connect to host
-ventadecolchones.com: did not receive HSTS header
-venten.ee: did not receive HSTS header
-venturavwparts.com: could not connect to host
-venturebanners.co.uk: did not receive HSTS header
-venturedisplay.co.uk: did not receive HSTS header
-venturepro.com: did not receive HSTS header
-ventures.lgbt: could not connect to host
-ventureslgbt.com: could not connect to host
-ventzke.com: did not receive HSTS header
-venusbymariatash.com: did not receive HSTS header
-vera.bg: did not receive HSTS header
-veraandsteve.date: could not connect to host
-verata.co: did not receive HSTS header
-verdeandco.co.uk: could not connect to host
-vergeaccessories.com: could not connect to host
-vergessen.cn: could not connect to host
-verificaprezzi.it: did not receive HSTS header
-verifiedinvesting.com: could not connect to host
-verifikatorindonesia.com: could not connect to host
-verios.com.br: did not receive HSTS header
-veristor.com: did not receive HSTS header
-verkkopalvelin.fi: did not receive HSTS header
-vermellcollection.com: could not connect to host
-vermogeninkaart.nl: could not connect to host
-vermontcareergateway.org: could not connect to host
-vernonfishandgame.ca: did not receive HSTS header
-vernonhouseofhope.com: did not receive HSTS header
-vernontechnology.com: did not receive HSTS header
-versalhost.com: could not connect to host
-versalhost.nl: could not connect to host
-versfin.net: could not connect to host
-versia.ru: did not receive HSTS header
-versolslapeyre.fr: did not receive HSTS header
-vertigo.com.br: did not receive HSTS header
-verustracking.com: could not connect to host
-verwimp.org: could not connect to host
-very-kids.fr: did not receive HSTS header
-veryhax.de: could not connect to host
-veryhome.com.pe: could not connect to host
-veryimportantusers.com: could not connect to host
-veryyounglesbians.com: did not receive HSTS header
-verzekeringsacties.nl: did not receive HSTS header
-verzick.com: could not connect to host
-vestacp.top: could not connect to host
-vet-planet.com: did not receive HSTS header
-vetdnacenter.com: did not receive HSTS header
-veteransnewsroom.com: did not receive HSTS header
-veteransonline.us: could not connect to host
-vetergysurveys.com: did not receive HSTS header
-veterinaire-cazeres-foucault.fr: could not connect to host
-veterinarian-hospital.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-vethouse.com.ua: did not receive HSTS header
-vetmgmt.com: could not connect to host
-vetpraxis.de: did not receive HSTS header
-veusveus.cat: could not connect to host
-vexsoluciones.com: did not receive HSTS header
-vextraz.co: could not connect to host
-vfn-nrw.de: could not connect to host
-vforvendetta.science: did not receive HSTS header
-vfree.org: could not connect to host
-vgatest.nl: could not connect to host
-vglimg.com: could not connect to host
-vh.net: did not receive HSTS header
-vhasurvey.org: did not receive HSTS header
-vhost.co.id: could not connect to host
-viabemestar.com.br: could not connect to host
-viadeux.com: did not receive HSTS header
-viagusto.pl: could not connect to host
-vialorran.com: could not connect to host
-viato.fr: could not connect to host
-vibgyorrise.com: did not receive HSTS header
-vibrashop.com.br: did not receive HSTS header
-vicenage.com: could not connect to host
-viceversa.xyz: could not connect to host
-viceversa2013.org: could not connect to host
-vicgenesis.me: could not connect to host
-viciousflora.com: could not connect to host
-viciousviscosity.xyz: did not receive HSTS header
-vickshomes.com: did not receive HSTS header
-victordiaz.me: did not receive HSTS header
-victorenxovais.com.br: could not connect to host
-victoreriksson.ch: could not connect to host
-victoreriksson.me: could not connect to host
-victoriaville.ca: did not receive HSTS header
-victornilsson.pw: did not receive HSTS header
-victoroilpress.com: did not receive HSTS header
-victorzambrano.com: did not receive HSTS header
-victusrp.gq: could not connect to host
-vida-it.com: did not receive HSTS header
-vida.es: could not connect to host
-vidadigitalecuador.com: max-age too low: 0
-vidadu.com: could not connect to host
-vidasanayfitness.com: could not connect to host
-vidb.me: could not connect to host
-vidbuchanan.co.uk: did not receive HSTS header
-vidcloud.xyz: could not connect to host
-videnskabsklubben.dk: did not receive HSTS header
-videobola.win: could not connect to host
-videodrome.me: max-age too low: 4838400
-videoload.co: could not connect to host
-videomuz.com: could not connect to host
-videorullen.se: could not connect to host
-videosdiversosdatv.com: could not connect to host
-videot.tk: could not connect to host
-videotogel.net: could not connect to host
-videov.tk: could not connect to host
-vider.ga: could not connect to host
-vidid.net: could not connect to host
-viditut.com: could not connect to host
-vidkovaomara.si: could not connect to host
-vidlyoficial.com: could not connect to host
-vidz.ga: did not receive HSTS header
-viennan.net: did not receive HSTS header
-vierdaagsehotel.nl: could not connect to host
-vieref.eu: could not connect to host
-vierna.ga: could not connect to host
-viethungwork.vn: did not receive HSTS header
-vietnam-lifer.com: could not connect to host
-vietnamchevrolet.net: did not receive HSTS header
-vietnamhost.vn: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-vietnamphotographytours.com: could not connect to host
-vietplan.vn: could not connect to host
-vieux.pro: could not connect to host
-viewflix.win: could not connect to host
-viewmyrecords.com: did not receive HSTS header
-viga.me: could not connect to host
-vigenebio.com: did not receive HSTS header
-vigilanciatotal.com: could not connect to host
-vigilantesporcolombia.org: could not connect to host
-vigilo.cf: could not connect to host
-vigilo.ga: could not connect to host
-vigliano.ovh: did not receive HSTS header
-vigour.us: could not connect to host
-viikko.cf: could not connect to host
-viikko.eu: could not connect to host
-viikko.ga: could not connect to host
-viikko.gq: could not connect to host
-viikko.ml: could not connect to host
-vijos.org: did not receive HSTS header
-vikasbabyworld.de: could not connect to host
-viki.com: did not receive HSTS header
-vikodek.com: did not receive HSTS header
-viktor-machnik.de: could not connect to host
-viktorsvantesson.net: did not receive HSTS header
-vilabiamodas.com.br: could not connect to host
-viladochurrasco.com.br: did not receive HSTS header
-vilafloridacapivari.com.br: could not connect to host
-vilaydin.com: could not connect to host
-vilight.com.br: could not connect to host
-villa-anna-cilento.de: did not receive HSTS header
-villa-bellarte.de: did not receive HSTS header
-villa-toscana.berlin: could not connect to host
-villacarmela.com.br: could not connect to host
-villaella.com: did not receive HSTS header
-villainsclothing.com.au: could not connect to host
-villalaskowa.pl: did not receive HSTS header
-villasenor.online: could not connect to host
-vilnagaon.com: did not receive HSTS header
-vilog.me: could not connect to host
-vimeosucks.nyc: could not connect to host
-vinasec.se: could not connect to host
-vinbet.org: could not connect to host
-vinbet000.com: could not connect to host
-vinbet111.com: could not connect to host
-vinbet222.com: could not connect to host
-vinbet333.com: could not connect to host
-vinbet444.com: could not connect to host
-vinbet555.com: could not connect to host
-vinbet666.com: could not connect to host
-vinbet888.com: could not connect to host
-vincentiliano.tk: could not connect to host
-vincentkooijman.at: did not receive HSTS header
-vincentkooijman.nl: could not connect to host
-vincentoshana.com: did not receive HSTS header
-vincentswordpress.nl: could not connect to host
-vinciconps4.it: could not connect to host
-vinco.ch: did not receive HSTS header
-vincura.io: did not receive HSTS header
-vindafrid.com: could not connect to host
-vineright.com: did not receive HSTS header
-vinesauce.info: could not connect to host
-vinetalk.net: could not connect to host
-vingt.me: could not connect to host
-viniferawineclub.com: did not receive HSTS header
-vinigas.com: could not connect to host
-vinihk.com: did not receive HSTS header
-vinilosdecorativos.net: could not connect to host
-vinkt.eu: did not receive HSTS header
-vinnie.gq: could not connect to host
-vinogradovka.com: did not receive HSTS header
-vinolli.de: could not connect to host
-vinosalmundo.com: did not receive HSTS header
-vintagetrailerbuyers.com: could not connect to host
-vintazh.net: could not connect to host
-vintock.com: could not connect to host
-vinyculture.com: did not receive HSTS header
-vio.no: did not receive HSTS header
-violauotila.fi: did not receive HSTS header
-violenceinterrupted.org: did not receive HSTS header
-violet-letter.delivery: could not connect to host
-viosey.com: could not connect to host
-vioye.com: could not connect to host
-vip-9649.com: could not connect to host
-vip-ssl.com: could not connect to host
-vip380.vip: max-age too low: 0
-vip4553.com: could not connect to host
-vip9649.com: could not connect to host
-vipcp.me: could not connect to host
-viperdns.com: did not receive HSTS header
-vipesball.net: could not connect to host
-viphospitality.se: could not connect to host
-vipi.es: could not connect to host
-viplentes.com.br: did not receive HSTS header
-vipllcnj.com: could not connect to host
-vipmusic.ga: could not connect to host
-vipnettikasinoklubi.com: did not receive HSTS header
-viptamin.eu: did not receive HSTS header
-vipw66.com: could not connect to host
-viqo.pl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-viral8.jp: could not connect to host
-viralboombox.xyz: could not connect to host
-viralify.me: did not receive HSTS header
-viralsouls.in: could not connect to host
-viralsv.com: could not connect to host
-virgiliocervantes.co.uk: did not receive HSTS header
-virginiacrimeanalysisnetwork.org: did not receive HSTS header
-virial.de: did not receive HSTS header
-virtual.hk: did not receive HSTS header
-virtualcitehuallaga.com: could not connect to host
-virtualcloud.ddns.net: could not connect to host
-virtualhealth.com: did not receive HSTS header
-virtualizy.de: did not receive HSTS header
-virtualstrongbox.ca: could not connect to host
-virus.pm: could not connect to host
-visa-shinsei.com: did not receive HSTS header
-visadaifu.com: could not connect to host
-visaexpert.co.za: did not receive HSTS header
-visanhigia.com: could not connect to host
-viserproject.com: could not connect to host
-vishwashantiyoga.com: did not receive HSTS header
-visibleone.com: did not receive HSTS header
-visioflux-premium.com: could not connect to host
-vision-painting.com: did not receive HSTS header
-visionarymedia.nl: could not connect to host
-visiondigitalsog.com: could not connect to host
-visiondirectionaldrilling.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-visionexpress.com: did not receive HSTS header
-visionexpress.ie: did not receive HSTS header
-visionexpresscareers.com: could not connect to host
-visiongamestudios.com: could not connect to host
-visionthroughknowledge.com: could not connect to host
-visiontree-beta.eu: could not connect to host
-visiontree.eu: could not connect to host
-visionviral.com: did not receive HSTS header
-visistruct.com: max-age too low: 2592000
-visitbroadstairs.com: could not connect to host
-vispaleistexel.nl: did not receive HSTS header
-vissanum.com: did not receive HSTS header
-vissersgrootboek.nl: did not receive HSTS header
-vista-calculator.ru: did not receive HSTS header
-vistaalmar.es: max-age too low: 2592000
-vistarait.com: could not connect to host
-visto.cl: could not connect to host
-visualdrone.co: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-visualgrafix.com.mx: could not connect to host
-visualvotes.co.uk: could not connect to host
-vitagenda.nl: could not connect to host
-vitalamin.at: could not connect to host
-vitalamin.ch: could not connect to host
-vitalamin.com: could not connect to host
-vitalamin.de: could not connect to host
-vitalita.cz: did not receive HSTS header
-vitalityscience.com: did not receive HSTS header
-vitalthings.de: could not connect to host
-vitamaxxi.com.br: could not connect to host
-vitamineproteine.com: did not receive HSTS header
-vitaminler.com: did not receive HSTS header
-vitavie.nl: did not receive HSTS header
-vitoye.com: could not connect to host
-vitpeyr.com: could not connect to host
-vitra-vcare.co.uk: did not receive HSTS header
-vitta.me: did not receive HSTS header
-vitzro.kr: did not receive HSTS header
-viva-french.com: did not receive HSTS header
-vivaldi-fr.com: did not receive HSTS header
-vivasports.com.br: could not connect to host
-viveconsalud.club: could not connect to host
-vivediabetes-sanamente.com: could not connect to host
-vivianmaier.cn: could not connect to host
-viviendy.com: did not receive HSTS header
-vivocloud.com: could not connect to host
-vivoregularizafacil.com.br: could not connect to host
-vivoseg.com: could not connect to host
-vivremoinscher.fr: did not receive HSTS header
-viza.io: could not connect to host
-vizeat.com: did not receive HSTS header
-vizierdata.ca: could not connect to host
-vizuul.com: did not receive HSTS header
-vk4wip.org.au: did not receive HSTS header
-vkennke.org: could not connect to host
-vkirichenko.name: could not connect to host
-vkulagin.ru: could not connect to host
-vlakjebak.nl: could not connect to host
-vlamir.dynu.net: could not connect to host
-vlastimilburian.cz: did not receive HSTS header
-vleij.family: could not connect to host
-vleij.se: could not connect to host
-vlogge.com: could not connect to host
-vlora.city: could not connect to host
-vlsk.eu: could not connect to host
-vlsm.se: could not connect to host
-vlzbazar.ru: could not connect to host
-vmc.co.id: did not receive HSTS header
-vmconnected.co.uk: did not receive HSTS header
-vmem.jp: did not receive HSTS header
-vmoagents.com: could not connect to host
-vmrdev.com: could not connect to host
-vmstan.com: did not receive HSTS header
-vmzone.de: could not connect to host
-vncg.org: did not receive HSTS header
-vnology.com: could not connect to host
-vnpay.vn: did not receive HSTS header
-vnpem.org: did not receive HSTS header
-vns1780.com: did not receive HSTS header
-vns3780.com: could not connect to host
-vns5656.com: could not connect to host
-vocab.guru: could not connect to host
-vocalik.com: could not connect to host
-vocalsynth.space: could not connect to host
-voceempaz.com: could not connect to host
-voceinveste.com: did not receive HSTS header
-vochuys.nl: did not receive HSTS header
-vodpay.com: could not connect to host
-vodpay.net: could not connect to host
-vodpay.org: could not connect to host
-vofy.cz: could not connect to host
-vogt.tech: could not connect to host
-voicesuk.co.uk: did not receive HSTS header
-void-it.nl: could not connect to host
-void-zero.com: did not receive HSTS header
-void.to: did not receive HSTS header
-voidark.com: could not connect to host
-voidbot.tk: could not connect to host
-voidi.ca: could not connect to host
-voidnya.com: did not receive HSTS header
-voidpay.net: could not connect to host
-voidpay.org: could not connect to host
-voids.org: could not connect to host
-voidserv.net: could not connect to host
-voidx.top: could not connect to host
-voidzehn.com: did not receive HSTS header
-voilo.club: could not connect to host
-voilodaisuki.club: could not connect to host
-voipkb.com: did not receive HSTS header
-voiro.club: could not connect to host
-voirodaisuki.club: could not connect to host
-vojenshandicap.dk: could not connect to host
-vojtechpavelka.cz: did not receive HSTS header
-vojtekpince.hu: did not receive HSTS header
-vokalsystem.com: did not receive HSTS header
-volatimer.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-volbyzive.cz: could not connect to host
-volcain.io: could not connect to host
-volcanconcretos.com: could not connect to host
-volcano-kazan.ru: could not connect to host
-volcano-spb.ru: could not connect to host
-volcano-ug.ru: could not connect to host
-volcano-vts.ru: could not connect to host
-volcano-x.ru: could not connect to host
-volcano24.ru: could not connect to host
-volcano75.ru: could not connect to host
-volcanov.ru: could not connect to host
-volcrado.com: could not connect to host
-volkden.com: could not connect to host
-volkerwesselswave.nl: did not receive HSTS header
-volksvorschlagpmar.ch: could not connect to host
-volkswurst.de: did not receive HSTS header
-vollmondstollen.de: could not connect to host
-volosnet.tk: could not connect to host
-volta.io: could not connect to host
-voltimax.com: could not connect to host
-voltotc.com: could not connect to host
-voluptueuse.com: did not receive HSTS header
-von-lien-aluprofile.de: did not receive HSTS header
-von-lien-dachrinnen.de: did not receive HSTS header
-von-lien-lichtplatten.de: did not receive HSTS header
-von-lien-profilbleche.de: did not receive HSTS header
-vonavy-cukor.sk: could not connect to host
-vonavycukor.sk: could not connect to host
-vonborstelboerner.de: did not receive HSTS header
-vonedelmann.de: did not receive HSTS header
-vongerlach.at: did not receive HSTS header
-vonski.pl: could not connect to host
-voolik.pw: could not connect to host
-vorangerie.com: could not connect to host
-vorderklier.de: could not connect to host
-vorlicek.de: could not connect to host
-vorlif.org: did not receive HSTS header
-vorte.ga: could not connect to host
-vortexhobbies.com: did not receive HSTS header
-vos-fleurs.ch: could not connect to host
-vos-fleurs.com: could not connect to host
-vosjesweb.nl: could not connect to host
-vosky.fr: could not connect to host
-voss-zaehne.com: could not connect to host
-voss-zaehne.de: could not connect to host
-vostok-zapad54.ru: could not connect to host
-votelevy.gov: could not connect to host
-votemarion.gov: could not connect to host
-votercircle.com: did not receive HSTS header
-voterstartingpoint.uk: could not connect to host
-votewa.gov: max-age too low: 2592000
-votra.ru: did not receive HSTS header
-votre-site-internet.ch: could not connect to host
-vow.vn: did not receive HSTS header
-vowsy.club: could not connect to host
-vox.vg: could not connect to host
-voxographe.com: did not receive HSTS header
-voya.ga: did not receive HSTS header
-voyageofyume.com: could not connect to host
-vpip.net: could not connect to host
-vpl.me: did not receive HSTS header
-vpn-byen.dk: did not receive HSTS header
-vpn.pics: could not connect to host
-vpnet.net: did not receive HSTS header
-vpnhot.com: could not connect to host
-vpntech.net: did not receive HSTS header
-vpnzoom.com: did not receive HSTS header
-vps-szerver-berles.hu: could not connect to host
-vpsao.org: could not connect to host
-vpsmojo.com: did not receive HSTS header
-vpsvz.cloud: could not connect to host
-vpsvz.ninja: could not connect to host
-vqporn.com: did not receive HSTS header
-vrachi.online: did not receive HSTS header
-vractive.pl: could not connect to host
-vranjske.co.rs: could not connect to host
-vratny.space: could not connect to host
-vrcholovka.cz: did not receive HSTS header
-vriendenvoordeel.com: did not receive HSTS header
-vrijstaandhuis-in-alphen-aan-den-rijn-kopen.nl: could not connect to host
-vrijstaandhuis-in-brielle-kopen.nl: could not connect to host
-vrijstaandhuis-in-delfzijl-kopen.nl: could not connect to host
-vrijstaandhuis-in-friesland-kopen.nl: could not connect to host
-vrijstaandhuis-in-laren-kopen.nl: could not connect to host
-vrijstaandhuis-in-leeuwarden-kopen.nl: could not connect to host
-vrijstaandhuis-in-veendam-kopen.nl: could not connect to host
-vrijstaandhuis-in-zeeland-kopen.nl: could not connect to host
-vrijstaandhuis-in-zuid-holland-kopen.nl: could not connect to host
-vrijstaandhuis-in-zuidplas-kopen.nl: could not connect to host
-vrijstaandhuis-in-zwartewaterland-kopen.nl: could not connect to host
-vrijstaandhuisverkopen.nl: could not connect to host
-vrobert.fr: could not connect to host
-vroyaltours.com: did not receive HSTS header
-vrtak-cz.net: did not receive HSTS header
-vrtouring.org: could not connect to host
-vrzl.pro: could not connect to host
-vs303.com: could not connect to host
-vs603.com: could not connect to host
-vs677.com: could not connect to host
-vsamsonov.com: could not connect to host
-vsc-don-stocksport.de: did not receive HSTS header
-vscm888.com: did not receive HSTS header
-vsem-privet.tk: could not connect to host
-vsestiralnie.com: did not receive HSTS header
-vstehn.ru: did not receive HSTS header
-vtipe-vylez.cz: did not receive HSTS header
-vtuber-schedule.info: could not connect to host
-vtuber.art: could not connect to host
-vtuber.land: could not connect to host
-vuasinhly.com: could not connect to host
-vuatruyen.com: did not receive HSTS header
-vucdn.com: could not connect to host
-vuelacaruru.com: could not connect to host
-vulndetect.org: did not receive HSTS header
-vulnerabilities.io: did not receive HSTS header
-vuojolahti.com: did not receive HSTS header
-vuojolahti.fi: did not receive HSTS header
-vuosaarenmontessoritalo.fi: did not receive HSTS header
-vv5197.co: could not connect to host
-vv6729.co: could not connect to host
-vv6729.com: did not receive HSTS header
-vv6957.co: could not connect to host
-vv9297.co: could not connect to host
-vv9397.com: did not receive HSTS header
-vv9721.com: did not receive HSTS header
-vv9728.co: could not connect to host
-vvs.spb.ru: did not receive HSTS header
-vvw-8522.com: could not connect to host
-vvzero.cf: could not connect to host
-vw-touranclub.cz: could not connect to host
-vwhcare.com: did not receive HSTS header
-vwoforangeparts.com: could not connect to host
-vwt-event.nl: could not connect to host
-vww-8522.com: could not connect to host
-vxapps.com: could not connect to host
-vxml.club: could not connect to host
-vxst.org: max-age too low: 2592000
-vxstream-sandbox.com: did not receive HSTS header
-vykup-car.ru: did not receive HSTS header
-vynedmusic.com: did not receive HSTS header
-vyshivanochka.in.ua: could not connect to host
-vysvetluju.cz: could not connect to host
-vytea.com: did not receive HSTS header
-vyvybean.cf: could not connect to host
-vyvygen.com: did not receive HSTS header
-vzce.cn: could not connect to host
-vzk.io: could not connect to host
-vztekloun.cz: could not connect to host
-w-spotlight.appspot.com: could not connect to host (error ignored - included regardless)
-w-ws.ga: could not connect to host
-w00228.com: could not connect to host
-w0115.com: could not connect to host
-w0202w.com: did not receive HSTS header
-w10club.com: could not connect to host
-w1221.com: did not receive HSTS header
-w2gshop.com.br: could not connect to host
-w30365.com: could not connect to host
-w3n.org: could not connect to host
-w3n14izy.cf: could not connect to host
-w3n14izy.ga: could not connect to host
-w3n14izy.gq: could not connect to host
-w3n14izy.ml: could not connect to host
-w3n14izy.tk: could not connect to host
-w4a.fr: could not connect to host
-w4b.in: could not connect to host
-w4xzr.top: could not connect to host
-w4xzr.xyz: could not connect to host
-w5197.co: could not connect to host
-w6603.com: could not connect to host
-w6612.net: could not connect to host
-w66938.com: could not connect to host
-w6729.co: could not connect to host
-w6729.com: did not receive HSTS header
-w6863.com: could not connect to host
-w6957.co: could not connect to host
-w80010.com: could not connect to host
-w81365.com: did not receive HSTS header
-w81818.com: did not receive HSTS header
-w82365.com: did not receive HSTS header
-w84.it: could not connect to host
-w9297.co: could not connect to host
-w9397.com: did not receive HSTS header
-w95.pw: could not connect to host
-w9710.com: could not connect to host
-w9720.com: could not connect to host
-w9721.com: did not receive HSTS header
-w9728.co: could not connect to host
-w9730.com: could not connect to host
-w9740.com: could not connect to host
-w9750.com: could not connect to host
-w97a.com: could not connect to host
-w97app.com: could not connect to host
-w97app2.com: could not connect to host
-w97app3.com: could not connect to host
-w9rld.com: did not receive HSTS header
-wa3368.com: could not connect to host
-wabifoggynuts.com: could not connect to host
-wachter.biz: could not connect to host
-wachtwoordencheck.nl: could not connect to host
-wadvisor.com: could not connect to host
-wafa4hw.com: could not connect to host
-wafni.com: could not connect to host
-wage-feeg.gc.ca: could not connect to host
-waggs.link: could not connect to host
-wagnergroup.com: did not receive HSTS header
-wahhoi.net: did not receive HSTS header
-wahidhasan.com: did not receive HSTS header
-wahlman.org: did not receive HSTS header
-wai-in.com: could not connect to host
-waidu.de: could not connect to host
-waifu-technologies.com: could not connect to host
-waifu.space: could not connect to host
-waikatowebdesigners.com: could not connect to host
-wail.net: could not connect to host
-wains.be: did not receive HSTS header
-wait.jp: could not connect to host
-wait.moe: could not connect to host
-waiterwheels.com: did not receive HSTS header
-waivcollective.com: did not receive HSTS header
-waixingrenfuli7.vip: could not connect to host
-wajtc.com: could not connect to host
-wak.io: could not connect to host
-wakapp.de: could not connect to host
-wakastream.cc: could not connect to host
-wakened.net: did not receive HSTS header
-walentin.co: could not connect to host
-waligorska.pl: could not connect to host
-walkeryoung.ca: could not connect to host
-walkingforhealth.org.uk: did not receive HSTS header
-wallabag.it: did not receive HSTS header
-wallabag.org: did not receive HSTS header
-wallace-group.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-wallacequinn.co.uk: did not receive HSTS header
-wallet.google.com: did not receive HSTS header (error ignored - included regardless)
-wallethub.com: did not receive HSTS header
-wallis-inside.ch: could not connect to host
-wallisdiervoeding.nl: max-age too low: 0
-wallsblog.dk: could not connect to host
-walnutgaming.co.uk: could not connect to host
-walterlynnmosley.com: did not receive HSTS header
-walvi.nl: did not receive HSTS header
-wanashi.com: could not connect to host
-wanban.io: could not connect to host
-wancai666.com: max-age too low: 0
-wancai880.com: max-age too low: 0
-wancai886.com: max-age too low: 0
-wancaibbin.com: max-age too low: 0
-wancaip66.com: max-age too low: 0
-wancaiqe.com: max-age too low: 0
-wancaiqwe5967.com: max-age too low: 0
-wancaiwang8.com: max-age too low: 0
-wanda76.com: could not connect to host
-wanda78.com: could not connect to host
-wanda79.com: could not connect to host
-wanda96.com: could not connect to host
-wanda97.com: could not connect to host
-wanda98.com: could not connect to host
-wandercue.com: did not receive HSTS header
-wang.by: could not connect to host
-wangbangyu.cf: could not connect to host
-wangbangyu.ga: could not connect to host
-wangbangyu.gq: could not connect to host
-wangbangyu.ml: could not connect to host
-wangbangyu.tk: could not connect to host
-wangbin1023.com: max-age too low: 0
-wangejiba.com: did not receive HSTS header
-wangfuhe.com: max-age too low: 0
-wanghuiblog.com: did not receive HSTS header
-wangjiatun.com.tw: could not connect to host
-wangkezun.com: could not connect to host
-wangler-internet.de: did not receive HSTS header
-wangqiliang.org: could not connect to host
-wangqiliang.xn--fiqs8s: could not connect to host
-wangql.cn: could not connect to host
-wangql.net: could not connect to host
-wangwill.me: could not connect to host
-wangyubao.cn: could not connect to host
-wanmen.org: did not receive HSTS header
-wantocode.com: could not connect to host
-wantshow.com.br: could not connect to host
-wanybug.cf: could not connect to host
-wanybug.ga: could not connect to host
-wanybug.gq: could not connect to host
-wanybug.tk: could not connect to host
-wanzenbug.xyz: did not receive HSTS header
-wapgu.cc: could not connect to host
-wapjt.cn: could not connect to host
-wapking.co: did not receive HSTS header
-wapking.live: did not receive HSTS header
-wapt.fr: did not receive HSTS header
-warandpeace.xyz: could not connect to host
-warcraftjournal.org: could not connect to host
-warekon.com: could not connect to host
-warekon.dk: could not connect to host
-warenmedia.com: did not receive HSTS header
-warezaddict.com: could not connect to host
-warezoom.com: could not connect to host
-warhistoryonline.com: did not receive HSTS header
-warlions.info: could not connect to host
-warmcat.com: could not connect to host
-warmestwishes.ca: could not connect to host
-warmservers.com: could not connect to host
-warmsquirrel.com: did not receive HSTS header
-warmtepomp.express: could not connect to host
-warnings.xyz: did not receive HSTS header
-warren.sh: could not connect to host
-warrencreative.com: did not receive HSTS header
-warsentech.com: could not connect to host
-warsonco.com: did not receive HSTS header
-warthog.ml: could not connect to host
-warumsuchen.at: did not receive HSTS header
-warung.host: could not connect to host
-wasatchconstables.com: did not receive HSTS header
-wasatchcrest.com: did not receive HSTS header
-wasgehtheute.in: could not connect to host
-washandfun.com: did not receive HSTS header
-washcowi.gov: could not connect to host
-washcowisco.gov: could not connect to host
-washingtoncountywi.gov: could not connect to host
-wasil.org: did not receive HSTS header
-wassim.is: could not connect to host
-watashi.bid: could not connect to host
-watboeithet.nl: could not connect to host
-watchium.com: could not connect to host
-watchonline.al: could not connect to host
-watchtv-online.pw: could not connect to host
-watchweasel.com: could not connect to host
-waterfedpole.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-waterforlife.net.au: could not connect to host
-waterpoint.com.br: did not receive HSTS header
-waterproofingahmedabad.com: did not receive HSTS header
-waterseal.in: did not receive HSTS header
-watersportmarkt.net: could not connect to host
-waterworkscondos.com: could not connect to host
-watsonhall.uk: could not connect to host
-watsonwork.me: could not connect to host
-wattcontrol.cz: did not receive HSTS header
-wattechweb.com: did not receive HSTS header
-watvindtnederland.com: could not connect to host
-waukeect.com: could not connect to host
-wave-ola.es: could not connect to host
-wavefloatrooms.com: did not receive HSTS header
-wavefrontsystemstech.com: could not connect to host
-waverlypa.gov: did not receive HSTS header
-waverlysecuritycameras.com: did not receive HSTS header
-waverlytn.gov: did not receive HSTS header
-waxlrs.com: could not connect to host
-waycraze.com: could not connect to host
-wayfair.de: max-age too low: 300
-waylandss.com: did not receive HSTS header
-waylaydesign.com: did not receive HSTS header
-waylee.net: did not receive HSTS header
-waynecountyoh.gov: did not receive HSTS header
-wayuanma.com: could not connect to host
-wbcasaverde.co: could not connect to host
-wbit.co.il: did not receive HSTS header
-wbut.ml: could not connect to host
-wbx.support: did not receive HSTS header
-wby.by: could not connect to host
-wby.gd: could not connect to host
-wby.tw: could not connect to host
-wc11122.com: max-age too low: 0
-wc1234.cn: did not receive HSTS header
-wc168cp.com: max-age too low: 0
-wclhtzs.com: max-age too low: 0
-wcsi.com: did not receive HSTS header
-wcw10000.com: max-age too low: 0
-wcw130.com: max-age too low: 0
-wcw179.com: max-age too low: 0
-wcw618.com: max-age too low: 0
-wcw635290.com: max-age too low: 0
-wcw668.com: max-age too low: 0
-wcw9366.com: max-age too low: 0
-wcwcp88.com: max-age too low: 0
-wd627.com: could not connect to host
-wd63.cc: could not connect to host
-wd976.com: could not connect to host
-wdbgroup.co.uk: did not receive HSTS header
-wdj1023.com: max-age too low: 0
-wdrl.info: did not receive HSTS header
-wdt.io: could not connect to host
-we-run-linux.de: could not connect to host
-we-use-linux.de: could not connect to host
-we.serveftp.net: could not connect to host
-we9988.net: could not connect to host
-weadvize.fr: could not connect to host
-wealthcentral.com.au: did not receive HSTS header
-wealthformyhealth.com: did not receive HSTS header
-wear2work.nl: did not receive HSTS header
-wearedisneyland.com: could not connect to host
-wearehackerone.com: could not connect to host
-weareincognito.org: could not connect to host
-wearethreebears.co.uk: did not receive HSTS header
-wearewithyou.org: could not connect to host
-weather-and-climate.com: did not receive HSTS header
-weaverhairextensions.nl: could not connect to host
-web-adminy.co.uk: did not receive HSTS header
-web-advisor.co.uk: could not connect to host
-web-demarche.com: could not connect to host
-web-desing.com.ua: did not receive HSTS header
-web-dl.cc: did not receive HSTS header
-web-fox23.ru: did not receive HSTS header
-web-industry.fr: could not connect to host
-web-insider.net: did not receive HSTS header
-web-kouza.com: did not receive HSTS header
-web-lab.ml: did not receive HSTS header
-web-mail.info: could not connect to host
-web-vision.de: did not receive HSTS header
-web1n.com: did not receive HSTS header
-web4all.fr: did not receive HSTS header
-web4pro.fr: could not connect to host
-webaeon.org: could not connect to host
-webalert.cz: did not receive HSTS header
-webambacht.nl: could not connect to host
-webandwords.com.au: could not connect to host
-webanker.sh: could not connect to host
-webapky.cz: could not connect to host
-webappky.cz: could not connect to host
-webapps.directory: did not receive HSTS header
-webassadors.com: could not connect to host
-webauthority.co.uk: could not connect to host
-webbson.net: could not connect to host
-webbuzz.com.au: did not receive HSTS header
-webbx.se: did not receive HSTS header
-webceo.se: could not connect to host
-webchat.domains: could not connect to host
-webcreation.rocks: could not connect to host
-webdeflect.com: did not receive HSTS header
-webdesign-kronberg.de: did not receive HSTS header
-webdesign-st.de: did not receive HSTS header
-webdesignerinwarwickshire.co.uk: did not receive HSTS header
-webdesignplay.com: could not connect to host
-webdesignssussex.co.uk: could not connect to host
-webdestiny.net: did not receive HSTS header
-webdev-cw.me: could not connect to host
-webdev-quiz.de: did not receive HSTS header
-webdev.mobi: could not connect to host
-webdevops.io: did not receive HSTS header
-webdollarvpn.io: could not connect to host
-webdosh.com: did not receive HSTS header
-webeast.eu: could not connect to host
-webeconomia.it: did not receive HSTS header
-webelement.sk: did not receive HSTS header
-weberjulia.com: did not receive HSTS header
-webetnet.fr: did not receive HSTS header
-webev.ru: did not receive HSTS header
-webfilings-eu-mirror.appspot.com: did not receive HSTS header (error ignored - included regardless)
-webfox.com.br: did not receive HSTS header
-webfronten.dk: did not receive HSTS header
-webgap.me: did not receive HSTS header
-webgeneric.xyz: did not receive HSTS header
-webhackspro.com: could not connect to host
-webhopp.com: could not connect to host
-webhosting4.net: did not receive HSTS header
-webhostingpros.ml: could not connect to host
-webhostplan.info: could not connect to host
-webinator.tk: could not connect to host
-webjobposting.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-webkeks.org: did not receive HSTS header
-webless.com: could not connect to host
-weblogic.pl: did not receive HSTS header
-webm.to: could not connect to host
-webmail.mayfirst.org: did not receive HSTS header
-webmaniabr.com: did not receive HSTS header
-webmax.com.tr: did not receive HSTS header
-webmel.com: did not receive HSTS header
-webministeriet.net: did not receive HSTS header
-webmixseo.com: did not receive HSTS header
-webmr.de: could not connect to host
-webnetmail4u.com: could not connect to host
-webninja.work: could not connect to host
-webnoob.net: could not connect to host
-webnosql.com: could not connect to host
-webogram.org: did not receive HSTS header
-webperformance.ru: could not connect to host
-webplatform.fi: did not receive HSTS header
-webpostingmart.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-webpostingpro.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-webpostingreviews.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-webproject.rocks: did not receive HSTS header
-webproshosting.tk: could not connect to host
-webproxy.pw: could not connect to host
-webpublica.pt: could not connect to host
-webranking.tk: could not connect to host
-webreslist.com: did not receive HSTS header
-websandbox.uk: could not connect to host
-websectools.com: could not connect to host
-webseo.de: did not receive HSTS header
-websitedesign.bg: did not receive HSTS header
-websiteforlease.ca: did not receive HSTS header
-websiterent.ca: could not connect to host
-websites4business.ca: could not connect to host
-websitesabq.com: did not receive HSTS header
-websitesolutionsmedia.com: could not connect to host
-websouthdesign.com: could not connect to host
-webspotter.nl: could not connect to host
-webstationservice.fr: could not connect to host
-webstellung.com: could not connect to host
-webstory.xyz: did not receive HSTS header
-webswitch.io: could not connect to host
-webszolgaltatas.hu: did not receive HSTS header
-webtalis.nl: did not receive HSTS header
-webtar.info: did not receive HSTS header
-webtech.com.br: did not receive HSTS header
-webtechgadgetry.com: could not connect to host
-webtek.nu: could not connect to host
-webthings.com.br: could not connect to host
-webtiles.co.uk: could not connect to host
-webtobesocial.de: could not connect to host
-webuni.hu: did not receive HSTS header
-webutils.io: could not connect to host
-webveloper.com: did not receive HSTS header
-webvisum.de: did not receive HSTS header
-webwolf.co.za: could not connect to host
-webwork.pw: could not connect to host
-webypass.xyz: could not connect to host
-webz.one: could not connect to host
-webzanem.com: could not connect to host
-wecanfindit.co.za: could not connect to host
-wecanvisit.com: could not connect to host
-wedding-m.jp: did not receive HSTS header
-weddingalbumsdesign.com: max-age too low: 2592000
-weddingfantasy.ru: could not connect to host
-weddingibiza.nl: could not connect to host
-weddingofficiantwilmington.com: could not connect to host
-wedestock.com: did not receive HSTS header
-wedos.com: did not receive HSTS header
-wedotrains.club: could not connect to host
-wedplay.host: could not connect to host
-weeblrpress.com: did not receive HSTS header
-weebsr.us: could not connect to host
-weed.ren: could not connect to host
-weedcircles.com: did not receive HSTS header
-weedelec.pl: did not receive HSTS header
-weedlandia.org: could not connect to host
-week.report: could not connect to host
-weeka.cc: did not receive HSTS header
-weekly.fyi: could not connect to host
-weeklycenter.co.jp: did not receive HSTS header
-weems.fr: max-age too low: 0
-wefinanceinc.com: did not receive HSTS header
-weforgood.org.tw: could not connect to host
-wegenaer.nl: could not connect to host
-wegethitched.co.uk: could not connect to host
-weggeweest.nl: could not connect to host
-wegiel24.info: did not receive HSTS header
-wegner.no: could not connect to host
-wegvielfalt.de: could not connect to host
-weicn.org: did not receive HSTS header
-weidehelp.com: did not receive HSTS header
-weideheuvel.org: could not connect to host
-weightreviews.com: could not connect to host
-weiji.ga: could not connect to host
-weiler.xyz: could not connect to host
-weili1111.com: could not connect to host
-weili1120.com: could not connect to host
-weili1121.com: could not connect to host
-weili1122.com: could not connect to host
-weili1123.com: could not connect to host
-weili1127.com: could not connect to host
-weili1128.com: could not connect to host
-weili88888.com: could not connect to host
-weilibet.com: could not connect to host
-weilibet.info: could not connect to host
-weilibet.net: could not connect to host
-weilibet.org: could not connect to host
-weiliyule.com: could not connect to host
-weiliyule.net: could not connect to host
-weiltoast.de: could not connect to host
-weimaraner.com.br: could not connect to host
-weiming.ddns.net: did not receive HSTS header
-weinhandel-preissler.de: could not connect to host
-weiran.org.cn: could not connect to host
-weirdserver.com: could not connect to host
-weizenke.im: could not connect to host
-wejumall.com: did not receive HSTS header
-wekibe.de: could not connect to host
-welby.cat: did not receive HSTS header
-welches-kinderfahrrad.de: could not connect to host
-welcome-werkstatt.com: could not connect to host
-welcome-werkstatt.de: max-age too low: 172800
-welcomehelp.de: could not connect to host
-weldotherm.fr: did not receive HSTS header
-welkers.org: could not connect to host
-wellacapability.com: did not receive HSTS header
-wellandslim.de: did not receive HSTS header
-wellastore.ru: could not connect to host
-wellcareliving.net: could not connect to host
-wellcomp.com.br: could not connect to host
-welldrake.com: could not connect to host
-wellmarts.com: did not receive HSTS header
-wellness.so: could not connect to host
-wellopp.com: did not receive HSTS header
-wellproducedwines.com: could not connect to host
-wellsplasticsurgery.com: did not receive HSTS header
-wellspringcamps.com: did not receive HSTS header
-welovejobs.com: could not connect to host
-welovejudo.com: did not receive HSTS header
-welovemail.com: could not connect to host
-welpo.me: could not connect to host
-welpy.com: could not connect to host
-welsh.com.br: could not connect to host
-weltentreff.com: could not connect to host
-weltmeisterschaft.net: could not connect to host
-wemakebookkeepingeasy.com: could not connect to host
-weme.eu: did not receive HSTS header
-wendabisheng.com: max-age too low: 0
-wendalyncheng.com: did not receive HSTS header
-wendigo.pl: max-age too low: 0
-wendu.me: could not connect to host
-wengebowuguan.com: could not connect to host
-wenode.net: did not receive HSTS header
-wenta-computerservice.net: could not connect to host
-wentu.ml: could not connect to host
-wenz.io: did not receive HSTS header
-wepa.pe: could not connect to host
-wer.sh: did not receive HSTS header
-werbewelt-tv.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-werdeeintimo.de: could not connect to host
-wereldplanner.nl: could not connect to host
-werepairit.com.au: did not receive HSTS header
-werhatunsverraten.eu: could not connect to host
-werkaanonderwijs.nl: did not receive HSTS header
-werken-bij-inwork.nl: could not connect to host
-werkenbijkfc.nl: did not receive HSTS header
-werkeninvledder.nl: could not connect to host
-werkinholland.com: could not connect to host
-werkplaatsoost.nl: did not receive HSTS header
-werkruimtebottendaal.nl: could not connect to host
-werktor.com: did not receive HSTS header
-werktor.net: did not receive HSTS header
-werkz.io: did not receive HSTS header
-werner-schaeffer.de: did not receive HSTS header
-wernerschaeffer.de: did not receive HSTS header
-wertpapiertreuhand.de: did not receive HSTS header
-wes-dev.com: could not connect to host
-wesayyesprogram.com: could not connect to host
-wesleyharris.ca: did not receive HSTS header
-wespeakgeek.co.za: could not connect to host
-wesreportportal.com: could not connect to host
-wessner.co: could not connect to host
-wessner.org: did not receive HSTS header
-west-trans.com.au: did not receive HSTS header
-westcentenaryscouts.org.au: did not receive HSTS header
-westcoastaggregate.com: could not connect to host
-westendzone.com: max-age too low: 0
-westerhoud.nl: did not receive HSTS header
-westhighlandwhiteterrier.com.br: could not connect to host
-westlahair.com: did not receive HSTS header
-westlaketire.pt: did not receive HSTS header
-westlife.cn: did not receive HSTS header
-westlights.net: could not connect to host
-westlinwinds.com: could not connect to host
-westsussexconnecttosupport.org: could not connect to host
-westthorntonlabour.co.uk: did not receive HSTS header
-westtulsa.com: did not receive HSTS header
-westwood.no: did not receive HSTS header
-wetherbymethodist.org.uk: did not receive HSTS header
-wetherbyweather.org.uk: did not receive HSTS header
-wetoxic.com: could not connect to host
-wetpussylipsex.com: could not connect to host
-wettbonus.info: max-age too low: 0
-wettbuero.de: did not receive HSTS header
-wettertoertchen.com: could not connect to host
-wetthost.com: could not connect to host
-wetttipps.com: could not connect to host
-wetttipps.de: could not connect to host
-wevahoo.com: could not connect to host
-wevenues.com: could not connect to host
-wevolver.com: did not receive HSTS header
-wewillfixyouripad.co.uk: did not receive HSTS header
-wewillfixyourpc.co.uk: did not receive HSTS header
-wewillgo.com: could not connect to host
-wewillgo.org: did not receive HSTS header
-wewlad.me: could not connect to host
-wexilapp.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-weyland.tech: could not connect to host
-weynaphotography.com: could not connect to host
-wf-demo-eu.appspot.com: did not receive HSTS header (error ignored - included regardless)
-wfcom-98-wf-www.pantheonsite.io: could not connect to host
-wfsystem.net: did not receive HSTS header
-wftda.com: did not receive HSTS header
-wg-tools.de: could not connect to host
-wg1907.com: max-age too low: 0
-wge-feg.gc.ca: could not connect to host
-wgsi-friesland.nl: did not receive HSTS header
-whanau.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-whanwhy.com: max-age too low: 0
-whatanime.ga: could not connect to host
-whatdevotion.com: did not receive HSTS header
-whateveraspidercan.com: did not receive HSTS header
-whatisl.ovh: could not connect to host
-whatismyipaddress.ca: could not connect to host
-whatismypublicip.com: did not receive HSTS header
-whats.io: could not connect to host
-whatsapp.com: did not receive HSTS header
-whatsapp.net: did not receive HSTS header
-whatsstalk.me: could not connect to host
-whatsupdeco.com: did not receive HSTS header
-whatsyouroffer.co.uk: could not connect to host
-whdpc.gov: could not connect to host
-wheeler.kiwi.nz: could not connect to host
-wheelwide.co.uk: could not connect to host
-wheelwright.org: did not receive HSTS header
-wheezie.be: did not receive HSTS header
-when-release.com: did not receive HSTS header
-when-release.ru: did not receive HSTS header
-when.fm: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-whereisjason.com: could not connect to host
-whereismyorigin.cf: could not connect to host
-whereiszakir.com: could not connect to host
-wherephoto.com: could not connect to host
-wheresben.today: could not connect to host
-whexit.nl: could not connect to host
-whiletrue.run: could not connect to host
-whilsttraveling.com: could not connect to host
-whimtrip.fr: could not connect to host
-whisker.network: could not connect to host
-whiskey.town: did not receive HSTS header
-whisperwashonline.com: did not receive HSTS header
-whistler-transfers.com: did not receive HSTS header
-whiteeagleca.com: did not receive HSTS header
-whitehat.id: could not connect to host
-whitepinetn.gov: did not receive HSTS header
-whiterabbitcakery.com: did not receive HSTS header
-whiteready.it: did not receive HSTS header
-whiteroom.agency: did not receive HSTS header
-whiteshadowimperium.com: could not connect to host
-whitestagforge.com: did not receive HSTS header
-whitesuithacking.com: did not receive HSTS header
-whitewebhosting.co.za: could not connect to host
-whitewebhosting.com: could not connect to host
-whnpa.org: did not receive HSTS header
-who.pm: could not connect to host
-whoclicks.net: could not connect to host
-whoisamitsingh.com: did not receive HSTS header
-whoisapi.online: could not connect to host
-whoiscuter.ml: could not connect to host
-whoiscutest.ml: could not connect to host
-whoisdhh.com: could not connect to host
-whoisthenightking.com: could not connect to host
-whoiswp.com: could not connect to host
-wholelotofbounce.co.uk: could not connect to host
-wholesalecbd.com: could not connect to host
-wholikes.us: could not connect to host
-whoneedstobeprimaried.today: could not connect to host
-whoownsmyavailability.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-whoshotya.de: did not receive HSTS header
-whosyourdaddy.ml: could not connect to host
-whqqq.com: could not connect to host
-whtcsj.com: could not connect to host
-whychoosebob.net.au: could not connect to host
-whysuck.com: could not connect to host
-whythisguy.com: did not receive HSTS header
-wiapply.com: could not connect to host
-wibruje.pl: did not receive HSTS header
-wibuw.com: could not connect to host
-widoj.gov: could not connect to host
-wiebetaaltdat.nl: could not connect to host
-wielrenbond.ml: could not connect to host
-wien52.com: could not connect to host
-wienerwichtelchallenge.at: did not receive HSTS header
-wieninternational.at: could not connect to host
-wifimapa.cz: could not connect to host
-wigelsworth.io: could not connect to host
-wiiaam.com: could not connect to host
-wiiforum.no: did not receive HSTS header
-wiire.me: could not connect to host
-wijnimportjanssen.nl: did not receive HSTS header
-wikibulz.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-wikiclash.info: could not connect to host
-wikilivres.ca: could not connect to host
-wikimilk.org: could not connect to host
-wikipiedi.it: could not connect to host
-wikisports.eu: could not connect to host
-wikiwp.org: could not connect to host
-wiktoriaslife.com: did not receive HSTS header
-wild-emotion-events.de: could not connect to host
-wildbee.org: could not connect to host
-wildboaratvparts.com: did not receive HSTS header
-wildcard.hu: could not connect to host
-wildcardcorp.com: max-age too low: 300
-wildcardfederal.net: could not connect to host
-wildcatdiesel.com.au: did not receive HSTS header
-wilddirections.co.uk: did not receive HSTS header
-wilddog.com: did not receive HSTS header
-wilderky.gov: did not receive HSTS header
-wildlifeadaptationstrategy.gov: could not connect to host
-wildrough.com: did not receive HSTS header
-wildwind.world: could not connect to host
-wildzoopark.com: could not connect to host
-willbarnesphotography.co.uk: could not connect to host
-willcipriano.com: could not connect to host
-willdropphoto.co.uk: could not connect to host
-willeminfo.ch: did not receive HSTS header
-willemsjort.be: did not receive HSTS header
-william.gg: did not receive HSTS header
-william.si: did not receive HSTS header
-williamboundsltd.com: could not connect to host
-williamsapiens.com: could not connect to host
-williamscountyoh.gov: did not receive HSTS header
-williamsflintlocks.com: did not receive HSTS header
-williamtm.design: could not connect to host
-willkommen-fuerstenberg.de: did not receive HSTS header
-willowtree.school: did not receive HSTS header
-willtc.co.uk: could not connect to host
-willywangstory.com.tw: could not connect to host
-willywangstory.org: could not connect to host
-wilsonovi.com: could not connect to host
-wilsonvilleoregon.gov: could not connect to host
-wimbo.nl: did not receive HSTS header
-winaes.com: could not connect to host
-winbignow.click: could not connect to host
-wincasinowin.click: could not connect to host
-winclient.cn: could not connect to host
-winddan.nz: could not connect to host
-windholz.us: could not connect to host
-windows10insider.com: did not receive HSTS header
-windowsforum.com: did not receive HSTS header
-windowstech.it: did not receive HSTS header
-windowwellcovers.com: did not receive HSTS header
-windowwellexperts.com: did not receive HSTS header
-windrunner.se: could not connect to host
-winds.cf: could not connect to host
-windwoodmedia.com: could not connect to host
-windwoodweb.com: could not connect to host
-windycitydubfest.com: did not receive HSTS header
-wine-importer.ru: could not connect to host
-winecodeavocado.com: could not connect to host
-wineonthewall.com: did not receive HSTS header
-winepress.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-winfield.me.uk: did not receive HSTS header
-winfographics.com: did not receive HSTS header
-winged.io: could not connect to host
-wingos.net: could not connect to host
-wingspatagonia.com: could not connect to host
-wingumd.net: could not connect to host
-winner.ua: did not receive HSTS header
-winnersports.co: could not connect to host
-winpack.cf: could not connect to host
-winpack.eu.org: could not connect to host
-winportal.cz: could not connect to host
-winsec.nl: could not connect to host
-winshiplending.com: could not connect to host
-winsufi.biz: could not connect to host
-winter.engineering: did not receive HSTS header
-wintercircle.co: max-age too low: 60
-wintzenterprise.com: did not receive HSTS header
-winwitharval.co.uk: could not connect to host
-wipc.net: did not receive HSTS header
-wipply.com: could not connect to host
-wirc.gr: could not connect to host
-wircon-int.net: could not connect to host
-wireframesoftware.com: did not receive HSTS header
-wirelesswatch.com.au: could not connect to host
-wiretrip.io: could not connect to host
-wirkaufendeinau.to: could not connect to host
-wisak.eu: did not receive HSTS header
-wisdomize.me: could not connect to host
-wisecountytx.gov: did not receive HSTS header
-wiseflat.com: did not receive HSTS header
-wiseloan.com: could not connect to host
-wishcert.com: could not connect to host
-wishesbee.com: could not connect to host
-wishlist.net: could not connect to host
-wism.io: could not connect to host
-wissamnr.be: could not connect to host
-wissl.org: could not connect to host
-witae.com: could not connect to host
-with.de: did not receive HSTS header
-withgoogle.com: did not receive HSTS header (error ignored - included regardless)
-withmy.beer: could not connect to host
-withoutacrystalball.com: could not connect to host
-withustrading.com: did not receive HSTS header
-withyoutube.com: did not receive HSTS header (error ignored - included regardless)
-wittcher.com: could not connect to host
-wittepapaver.nl: could not connect to host
-wittydonut.com: could not connect to host
-wittywomaniyaa.com: did not receive HSTS header
-witzemaschine.com: max-age too low: 0
-wixguide.co: could not connect to host
-wiz.farm: could not connect to host
-wizardmeow.xin: could not connect to host
-wizardspire.com: could not connect to host
-wizznab.tk: could not connect to host
-wj0666.com: could not connect to host
-wjcainc.com: did not receive HSTS header
-wk-cpm.com: could not connect to host
-wk577.com: could not connect to host
-wkennington.com: could not connect to host
-wl.bet: could not connect to host
-wl970.com: could not connect to host
-wl971.com: could not connect to host
-wl972.com: could not connect to host
-wl973.com: could not connect to host
-wl974.com: could not connect to host
-wl975.com: could not connect to host
-wl976.com: could not connect to host
-wl977.com: could not connect to host
-wl978.com: could not connect to host
-wlsme.org: did not receive HSTS header
-wlwlwx.com: could not connect to host
-wlzhiyin.cn: could not connect to host
-wmawri.com: did not receive HSTS header
-wmcns.net: could not connect to host
-wmcuk.net: could not connect to host
-wmfinanz.com: could not connect to host
-wmnrj.com: could not connect to host
-wmoda.com.br: did not receive HSTS header
-wmustore.com: did not receive HSTS header
-wnmm.nl: could not connect to host
-wnnc.co.uk: could not connect to host
-wnsr3970.com: could not connect to host
-wo211997.com: max-age too low: 0
-woah.how: could not connect to host
-woaiuhd.com: could not connect to host
-wobblylang.org: could not connect to host
-wochenentwicklung.com: did not receive HSTS header
-wod-stavby.cz: could not connect to host
-wodboss.com: could not connect to host
-wodice.com: could not connect to host
-wohlraj.net: could not connect to host
-woi.vision: could not connect to host
-woima.fi: did not receive HSTS header
-wojak.xyz: did not receive HSTS header
-wokeai.net: could not connect to host
-woktoss.com: could not connect to host
-wolfdev.fr: did not receive HSTS header
-wolfemg.com: could not connect to host
-wolfenland.net: did not receive HSTS header
-wolfesden.com: could not connect to host
-wolfgang-braun.info: did not receive HSTS header
-wolfgang-kerschbaumer.com: could not connect to host
-wolfgang-kerschbaumer.net: could not connect to host
-wolfram.io: could not connect to host
-wolfvideoproductions.com: did not receive HSTS header
-wolkenspeicher.org: could not connect to host
-wolkjehosting.nl: could not connect to host
-wollekorb.de: could not connect to host
-wollgredel.de: did not receive HSTS header
-wom-en.org: could not connect to host
-womf.org: did not receive HSTS header
-womosale.de: could not connect to host
-wonabo.com: did not receive HSTS header
-wonderbooks.club: could not connect to host
-wonderfall.xyz: could not connect to host
-wondergorilla.com: could not connect to host
-wonderhost.info: could not connect to host
-wondermags.com: could not connect to host
-wondershift.biz: did not receive HSTS header
-wondy.com: could not connect to host
-wongu.tech: did not receive HSTS header
-wooblr.com: could not connect to host
-woodcountywi.gov: could not connect to host
-woodfordcountyky.gov: could not connect to host
-woodmafia.com.au: could not connect to host
-woodminstermanagement.tk: could not connect to host
-woodridgeil.gov: could not connect to host
-woodsmillparkapartmentsstl.com: did not receive HSTS header
-woodworkertip.com: could not connect to host
-woofsbakery.com: could not connect to host
-woomai.net: could not connect to host
-woomu.me: could not connect to host
-wooplagaming.com: could not connect to host
-woording.com: could not connect to host
-wootton95.com: could not connect to host
-wooviet.com: could not connect to host
-wopen.org: could not connect to host
-worcade.net: did not receive HSTS header
-wordadmin.com: could not connect to host
-wordbits.net: did not receive HSTS header
-wordlessecho.com: did not receive HSTS header
-wordnietvindbaar.nl: could not connect to host
-wordpress-experts.net: could not connect to host
-wordpress-test.site: could not connect to host
-wordpresspro.cl: could not connect to host
-wordsofamaster.com: could not connect to host
-work-and-jockel.de: could not connect to host
-workcheck.bz: could not connect to host
-workemy.com: could not connect to host
-workfone.io: could not connect to host
-workforce.co.tz: did not receive HSTS header
-workgrouptech.org: could not connect to host
-workingmachine.info: could not connect to host
-workissime.com: did not receive HSTS header
-workmart.mx: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-workpermit.com.vn: could not connect to host
-workplaces.online: did not receive HSTS header
-workray.com: did not receive HSTS header
-worksofwyoming.org: did not receive HSTS header
-world-education-association.org: could not connect to host
-worldchess.london: could not connect to host
-worldcrafts.org: did not receive HSTS header
-worldeventscalendars.com: could not connect to host
-worldfree4.org: did not receive HSTS header
-worldmeteo.info: did not receive HSTS header
-worldnettps.com: did not receive HSTS header
-worldofterra.net: did not receive HSTS header
-worldofvnc.net: could not connect to host
-worldpeacetechnology.com: could not connect to host
-worldpovertysolutions.org: did not receive HSTS header
-worldsbeststory.com: did not receive HSTS header
-worldsoccerclips.com: could not connect to host
-worldtravelandadventure.com: did not receive HSTS header
-worldwhisperer.net: could not connect to host
-wormholevpn.net: could not connect to host
-wormincorporated.tk: could not connect to host
-worshapp.com: did not receive HSTS header
-worthygo.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-woshiluo.site: could not connect to host
-wot-tudasbazis.hu: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-wotra-register.com: could not connect to host
-woufbox.com: did not receive HSTS header
-wouterbruijning.nl: max-age too low: 2592000
-wow-travel.eu: could not connect to host
-wow202y5.com: could not connect to host
-wowapi.org: could not connect to host
-wowhelp.it: could not connect to host
-wowin58.com: could not connect to host
-wowinvasion.com: did not receive HSTS header
-wowprezi.com: did not receive HSTS header
-woxter.com: did not receive HSTS header
-wp-bullet.com: did not receive HSTS header
-wp-fastsearch.de: could not connect to host
-wp-rescue.com.au: could not connect to host
-wp-securehosting.com: could not connect to host
-wp-site1.com: did not receive HSTS header
-wp-site2.com: did not receive HSTS header
-wp-stack.pro: could not connect to host
-wp6.pw: did not receive HSTS header
-wpabzar.ir: did not receive HSTS header
-wpblog.com.tw: could not connect to host
-wpbook-pacificmall.work: did not receive HSTS header
-wpcarer.pro: could not connect to host
-wpccu.org: did not receive HSTS header
-wpcharged.nz: did not receive HSTS header
-wpcheck.io: could not connect to host
-wpcontrol.se: could not connect to host
-wpdesigner.ir: did not receive HSTS header
-wpdirecto.com: did not receive HSTS header
-wpdublin.com: could not connect to host
-wpexplainer.com: did not receive HSTS header
-wpfast.net: could not connect to host
-wpfortify.com: did not receive HSTS header
-wpg-inc.com: did not receive HSTS header
-wpgoblin.com: could not connect to host
-wphelpwithhomework.tk: could not connect to host
-wphome.org: could not connect to host
-wphostingspot.com: did not receive HSTS header
-wplatin.com: could not connect to host
-wpldn.uk: did not receive HSTS header
-wpletter.de: did not receive HSTS header
-wpmetadatastandardsproject.org: could not connect to host
-wpoptimalizace.cz: could not connect to host
-wprecommend.com: did not receive HSTS header
-wprevs.com: did not receive HSTS header
-wprodevs.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-wpruby.com: did not receive HSTS header
-wpscans.com: did not receive HSTS header
-wpsec.nl: did not receive HSTS header
-wpsono.com: could not connect to host
-wpspeed.nl: could not connect to host
-wptomatic.de: did not receive HSTS header
-wpunpacked.com: could not connect to host
-wpvulndb.com: did not receive HSTS header
-wpyecom.es: could not connect to host
-wpzhiku.com: did not receive HSTS header
-wql.zj.cn: could not connect to host
-wrapit.hu: could not connect to host
-wrapitup.co.uk: did not receive HSTS header
-wrc-results.com: could not connect to host
-wrd48.net: could not connect to host
-wrfu.co.nz: did not receive HSTS header
-wrglzd.com: could not connect to host
-wriedts.de: did not receive HSTS header
-wrightdoumawedding.com: could not connect to host
-wrightselfstorageandremovals.com: did not receive HSTS header
-writeapp.me: did not receive HSTS header
-writeenglishright.com: did not receive HSTS header
-writemyessay.info: did not receive HSTS header
-writepride.com: could not connect to host
-writing-job-online.com: did not receive HSTS header
-wrksheet.com: did not receive HSTS header
-wrldevelopment.com: did not receive HSTS header
-wrn.sh: could not connect to host
-wroffle.com: did not receive HSTS header
-wromeapp.com: could not connect to host
-wrongware.cz: could not connect to host
-wrwg.ca: could not connect to host
-wryoutube.com: did not receive HSTS header
-ws-meca.com: could not connect to host
-ws.net.cn: could not connect to host
-wscore.me: could not connect to host
-wsdcap.com: could not connect to host
-wsor.group: did not receive HSTS header
-wss.com.ve: could not connect to host
-wsscompany.com.ve: could not connect to host
-wssv.ch: could not connect to host
-wsup.social: could not connect to host
-wsv-grafenau.de: did not receive HSTS header
-wsyy.info: could not connect to host
-wt-server3.de: could not connect to host
-wtf.ninja: could not connect to host
-wtfbryan.com: did not receive HSTS header
-wtfismyip.com: did not receive HSTS header
-wtfsec.org: did not receive HSTS header
-wth.in: could not connect to host
-wu6v.com: did not receive HSTS header
-wuav.net: could not connect to host
-wubify.com: did not receive HSTS header
-wubocong.com: did not receive HSTS header
-wubthecaptain.eu: could not connect to host
-wucanyao.com: max-age too low: 0
-wufupay.com: could not connect to host
-wugniu.com: did not receive HSTS header
-wuhengmin.com: could not connect to host
-wuifan.com: did not receive HSTS header
-wulpi.it: did not receive HSTS header
-wumai-p.cn: could not connect to host
-wumai.cloud: could not connect to host
-wumbo.kiwi: could not connect to host
-wundtherapie-schulung.de: could not connect to host
-wunschpreisauto.de: did not receive HSTS header
-wuppertal-2018.de: could not connect to host
-wurzelzwerg.net: could not connect to host
-wusx.club: could not connect to host
-wutianxian.com: could not connect to host
-wuwuwu.me: could not connect to host
-wuxiaobai.win: could not connect to host
-wuyang.ws: did not receive HSTS header
-wuyiwa.net: could not connect to host
-wuyue.photo: could not connect to host
-wvr-law.de: did not receive HSTS header
-wvv-8522.com: could not connect to host
-wvw-8522.com: could not connect to host
-wvw698.com: max-age too low: 2592000
-ww2onlineshop.com: did not receive HSTS header
-ww5197.co: could not connect to host
-ww6396.com: could not connect to host
-ww6729.co: could not connect to host
-ww6729.com: did not receive HSTS header
-ww6957.co: could not connect to host
-ww9397.com: did not receive HSTS header
-ww9721.com: did not receive HSTS header
-ww9728.co: could not connect to host
-wwbsb.xyz: could not connect to host
-wwc.ren: could not connect to host
-wweichen.com.cn: could not connect to host
-wwjd.dynu.net: did not receive HSTS header
-wwv-8522.com: could not connect to host
-www-001133.com: could not connect to host
-www-0385.com: could not connect to host
-www-1116.com: did not receive HSTS header
-www-1117.com: could not connect to host
-www-33445.com: could not connect to host
-www-38978.com: could not connect to host
-www-39988.com: did not receive HSTS header
-www-49889.com: could not connect to host
-www-507.net: could not connect to host
-www-5287.com: could not connect to host
-www-62755.com: could not connect to host
-www-66136.com: could not connect to host
-www-68277.com: could not connect to host
-www-746.com: could not connect to host
-www-7570.com: could not connect to host
-www-771122.com: did not receive HSTS header
-www-8003.com: could not connect to host
-www-80036.com: could not connect to host
-www-8522.am: could not connect to host
-www-86499.com: could not connect to host
-www-8722.com: could not connect to host
-www-88599.com: did not receive HSTS header
-www-8887999.com: could not connect to host
-www-9118.com: did not receive HSTS header
-www-9649.com: could not connect to host
-www-9995.com: could not connect to host
-www-djbet.com: could not connect to host
-www-jinshavip.com: could not connect to host
-www-pj009.com: could not connect to host
-www.apollo-auto.com: did not receive HSTS header
-www.calyxinstitute.org: did not receive HSTS header
-www.captaintrain.com: did not receive HSTS header
-www.cueup.com: could not connect to host
-www.cyveillance.com: could not connect to host
-www.developer.mydigipass.com: could not connect to host
-www.elanex.biz: could not connect to host
-www.g.co: did not receive HSTS header (error ignored - included regardless)
-www.gmail.com: did not receive HSTS header (error ignored - included regardless)
-www.googlemail.com: did not receive HSTS header (error ignored - included regardless)
-www.gpo.gov: did not receive HSTS header
-www.greplin.com: could not connect to host
-www.icann.org: could not connect to host
-www.intercom.io: did not receive HSTS header
-www.jitsi.org: did not receive HSTS header
-www.lastpass.com: did not receive HSTS header
-www.ledgerscope.net: could not connect to host
-www.logentries.com: did not receive HSTS header
-www.makeyourlaws.org: could not connect to host
-www.moneybookers.com: did not receive HSTS header
-www.mydigipass.com: could not connect to host
-www.neonisi.com: could not connect to host
-www.org.gg: could not connect to host
-www.paycheckrecords.com: did not receive HSTS header
-www.raiffeisen.ch: could not connect to host
-www.rme.li: did not receive HSTS header
-www.sandbox.mydigipass.com: could not connect to host
-www.simbolo.co.uk: could not connect to host
-www.surfeasy.com: did not receive HSTS header
-www.zenpayroll.com: did not receive HSTS header
-www3.info: did not receive HSTS header
-www63605.com: could not connect to host
-wwww.is: could not connect to host
-wwww.me.uk: could not connect to host
-wx37.ac.cn: could not connect to host
-wx6688.cc: could not connect to host
-wxukang.cn: did not receive HSTS header
-wxyz.buzz: could not connect to host
-wxzm.sx: could not connect to host
-wy6.org: did not receive HSTS header
-wybar.uk: could not connect to host
-wybmabiity.com: could not connect to host
-wycrow.com: did not receive HSTS header
-wygluszanie.eu: could not connect to host
-wyjmb.com: max-age too low: 0
-wylog.ph: could not connect to host
-wynterhill.co.uk: did not receive HSTS header
-wyomingexiles.com: could not connect to host
-wypemagazine.se: did not receive HSTS header
-wyu.cc: could not connect to host
-wyysoft.tk: could not connect to host
-wyzwaniemilosci.com: could not connect to host
-wzfetish.com.br: could not connect to host
-wzp.ovh: did not receive HSTS header
-x-pertservice.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-x-power-detox.com: could not connect to host
-x-ripped-hd.com: could not connect to host
-x00.me: did not receive HSTS header
-x13.com: could not connect to host
-x1616.tk: could not connect to host
-x1be.win: did not receive HSTS header
-x2c0.net: could not connect to host
-x2w.io: could not connect to host
-x30365.com: could not connect to host
-x3led.com: could not connect to host
-x509.io: could not connect to host
-x509.pub: could not connect to host
-x509.pw: could not connect to host
-x5197.co: could not connect to host
-x58.vip: did not receive HSTS header
-x58f.com: could not connect to host
-x58p.com: could not connect to host
-x58t.com: could not connect to host
-x58v.com: could not connect to host
-x64architecture.com: could not connect to host
-x668.cc: did not receive HSTS header
-x6729.co: could not connect to host
-x6957.co: could not connect to host
-x7715.com: could not connect to host
-x7716.com: could not connect to host
-x7718.com: could not connect to host
-x7plus.com: could not connect to host
-x81365.com: did not receive HSTS header
-x81818.com: did not receive HSTS header
-x82365.com: did not receive HSTS header
-x9016.com: could not connect to host
-x9721.com: did not receive HSTS header
-x9728.co: could not connect to host
-x98t.com: could not connect to host
-xab199.com: could not connect to host
-xanderweaver.com: did not receive HSTS header
-xandocs.com: could not connect to host
-xat.re: did not receive HSTS header
-xavier.is: could not connect to host
-xavierbarroso.com: could not connect to host
-xavierdmello.com: could not connect to host
-xawen.net: did not receive HSTS header
-xb008.com: could not connect to host
-xb1001.com: could not connect to host
-xb115.com: could not connect to host
-xb2002.com: could not connect to host
-xb201.com: could not connect to host
-xb3008.com: could not connect to host
-xb306.com: could not connect to host
-xb3636.com: did not receive HSTS header
-xb380.com: could not connect to host
-xb3888.com: could not connect to host
-xb6008.com: could not connect to host
-xb601.com: could not connect to host
-xb6600.com: could not connect to host
-xb6610.com: could not connect to host
-xb6616.com: could not connect to host
-xb6619.com: could not connect to host
-xb6625.com: could not connect to host
-xb6627.com: could not connect to host
-xb6628.com: could not connect to host
-xb6629.com: could not connect to host
-xb6632.com: could not connect to host
-xb6636.com: could not connect to host
-xb6638.com: could not connect to host
-xb6639.com: could not connect to host
-xb6656.com: could not connect to host
-xb6673.com: could not connect to host
-xb6676.com: could not connect to host
-xb6679.com: could not connect to host
-xb6680.com: could not connect to host
-xb6683.com: could not connect to host
-xb6689.com: could not connect to host
-xb6692.com: could not connect to host
-xb6696.com: could not connect to host
-xb6806.com: could not connect to host
-xb6808.com: could not connect to host
-xb6866.com: could not connect to host
-xb6880.com: could not connect to host
-xb7001.com: could not connect to host
-xb7077.com: could not connect to host
-xb7676.com: could not connect to host
-xb780.com: could not connect to host
-xb8006.com: could not connect to host
-xb8018.com: could not connect to host
-xb836.com: could not connect to host
-xb851.com: could not connect to host
-xb852.com: could not connect to host
-xb853.com: could not connect to host
-xb856.com: could not connect to host
-xb857.com: could not connect to host
-xb859.com: could not connect to host
-xb8606.com: could not connect to host
-xb862.com: could not connect to host
-xb865.com: could not connect to host
-xb871.com: could not connect to host
-xb872.com: could not connect to host
-xb873.com: could not connect to host
-xb8801.com: could not connect to host
-xb8806.com: could not connect to host
-xb8808.com: could not connect to host
-xb8861.com: could not connect to host
-xb891.com: could not connect to host
-xb893.com: could not connect to host
-xb896.com: could not connect to host
-xb9009.com: could not connect to host
-xb901.com: could not connect to host
-xb906.com: could not connect to host
-xb913.com: could not connect to host
-xb917.com: could not connect to host
-xb925.com: could not connect to host
-xb927.com: could not connect to host
-xb935.com: could not connect to host
-xb936.com: could not connect to host
-xb937.com: could not connect to host
-xb951.com: could not connect to host
-xb952.com: could not connect to host
-xb953.com: could not connect to host
-xb957.com: could not connect to host
-xb961.com: could not connect to host
-xb962.com: could not connect to host
-xb963.com: could not connect to host
-xb965.com: could not connect to host
-xb967.com: could not connect to host
-xb971.com: could not connect to host
-xb972.com: could not connect to host
-xb976.com: could not connect to host
-xb980.com: could not connect to host
-xb982.com: could not connect to host
-xb983.com: could not connect to host
-xbc.nz: could not connect to host
-xbind.io: could not connect to host
-xbjt1.com: could not connect to host
-xbjt11.com: could not connect to host
-xbjt2.com: could not connect to host
-xbjt22.com: could not connect to host
-xbjt3.com: could not connect to host
-xbjt33.com: could not connect to host
-xbjt4.com: could not connect to host
-xbjt5.com: could not connect to host
-xbjt55.com: could not connect to host
-xbjt66.com: could not connect to host
-xbjt666.com: could not connect to host
-xbjt7.com: could not connect to host
-xbjt77.com: could not connect to host
-xbjt9.com: could not connect to host
-xbpay88.com: could not connect to host
-xbvip.net: could not connect to host
-xbvip99.com: could not connect to host
-xbyl.xn--fiqs8s: could not connect to host
-xbyl15.com: could not connect to host
-xbyl16.com: could not connect to host
-xbyl17.com: could not connect to host
-xbyl18.com: could not connect to host
-xbyl21.com: could not connect to host
-xbyl23.com: could not connect to host
-xbyl26.com: could not connect to host
-xbyl28.com: could not connect to host
-xbyl39.com: could not connect to host
-xbyl60.com: could not connect to host
-xbyl62.com: could not connect to host
-xbyl63.com: could not connect to host
-xbyl67.com: could not connect to host
-xbyl68.com: could not connect to host
-xbyl69.com: could not connect to host
-xbyl71.com: could not connect to host
-xbyl73.com: could not connect to host
-xbyl78.com: could not connect to host
-xbyl82.com: could not connect to host
-xbyl85.com: could not connect to host
-xbyl86.com: could not connect to host
-xbyl89.com: could not connect to host
-xbyl91.com: could not connect to host
-xc9988.cc: could not connect to host
-xchangeinfo.com: could not connect to host
-xchating.com: could not connect to host
-xcmfu.com: could not connect to host
-xcompany.one: could not connect to host
-xcoop.me: did not receive HSTS header
-xd.fi: did not receive HSTS header
-xd.gov: could not connect to host
-xdavidhu.me: did not receive HSTS header
-xdd.io: could not connect to host
-xehoivn.vn: could not connect to host
-xellos.ga: could not connect to host
-xellos.ml: could not connect to host
-xenesisziarovky.sk: could not connect to host
-xeniox.ch: did not receive HSTS header
-xenolith.eu: did not receive HSTS header
-xenosphere.tk: could not connect to host
-xenotropegames.com: could not connect to host
-xenox-rp.ru: could not connect to host
-xenum.ua: did not receive HSTS header
-xeonlab.com: could not connect to host
-xeonlab.de: could not connect to host
-xerblade.com: did not receive HSTS header
-xett.com: did not receive HSTS header
-xf5888.com: could not connect to host
-xg3n1us.de: did not receive HSTS header
-xgusto.com: could not connect to host
-xh7eee.com: could not connect to host
-xhadius.de: could not connect to host
-xhcmnews.com: could not connect to host
-xhily.com: did not receive HSTS header
-xhotlips.date: could not connect to host
-xi.ht: could not connect to host
-xia100.xyz: could not connect to host
-xiang111.com: max-age too low: 0
-xiangfajia.cn: could not connect to host
-xiangqiushi.com: could not connect to host
-xianguocy.com: could not connect to host
-xianjianruishiyouyiyuan.com: could not connect to host
-xiao094605.com: max-age too low: 0
-xiaobaiwancai.com: max-age too low: 0
-xiaobude.cn: did not receive HSTS header
-xiaody.me: could not connect to host
-xiaofengsky.com: did not receive HSTS header
-xiaohui.love: could not connect to host
-xiaojicdn.com: could not connect to host
-xiaolan.me: could not connect to host
-xiaolanglang.net: could not connect to host
-xiaolvmu.com: could not connect to host
-xiaolvmu.me: could not connect to host
-xiaomao.tk: could not connect to host
-xiaomi.express: did not receive HSTS header
-xiaomionline24.pl: could not connect to host
-xiaoniaoyou.com: did not receive HSTS header
-xiaowu.xyz: could not connect to host
-xiaoxiao.im: could not connect to host
-xiaoyy.org: did not receive HSTS header
-xiaxuejin.cn: could not connect to host
-xiazhaobing.com: max-age too low: 0
-xice.cf: could not connect to host
-xichtsbuch.de: could not connect to host
-xiecongan.org: could not connect to host
-xilegames.com: could not connect to host
-xilkoi.net: did not receive HSTS header
-ximage.me: could not connect to host
-ximens.me: could not connect to host
-xinbiji.cn: could not connect to host
-xinbo010.com: could not connect to host
-xinbo016.com: could not connect to host
-xinbo018.com: could not connect to host
-xinbo019.com: could not connect to host
-xinbo020.com: could not connect to host
-xinbo026.com: could not connect to host
-xinbo028.com: could not connect to host
-xinbo030.com: could not connect to host
-xinbo038.com: could not connect to host
-xinbo050.com: could not connect to host
-xinbo056.com: could not connect to host
-xinbo059.com: could not connect to host
-xinbo060.com: could not connect to host
-xinbo066.com: could not connect to host
-xinbo068.com: could not connect to host
-xinbo069.com: could not connect to host
-xinbo070.com: could not connect to host
-xinbo076.com: could not connect to host
-xinbo078.com: could not connect to host
-xinbo079.com: could not connect to host
-xinbo080.com: could not connect to host
-xinbo086.com: could not connect to host
-xinbo088.com: could not connect to host
-xinbo089.com: could not connect to host
-xinbo090.com: could not connect to host
-xinbo096.com: could not connect to host
-xinbo098.com: could not connect to host
-xinbo099.com: could not connect to host
-xinbo120.com: could not connect to host
-xinbo129.com: could not connect to host
-xinbo130.com: could not connect to host
-xinbo138.com: could not connect to host
-xinbo150.com: could not connect to host
-xinbo156.com: could not connect to host
-xinbo158.com: could not connect to host
-xinbo160.com: could not connect to host
-xinbo170.com: could not connect to host
-xinbo178.com: could not connect to host
-xinbo179.com: could not connect to host
-xinbo180.com: could not connect to host
-xinbo186.com: could not connect to host
-xinbo189.com: could not connect to host
-xinbo190.com: could not connect to host
-xinbo196.com: could not connect to host
-xinbo198.com: could not connect to host
-xinbo200.com: could not connect to host
-xinbo218.com: could not connect to host
-xinbo238.com: could not connect to host
-xinbo256.com: could not connect to host
-xinbo258.com: could not connect to host
-xinbo260.com: could not connect to host
-xinbo266.com: could not connect to host
-xinbo268.com: could not connect to host
-xinbo269.com: could not connect to host
-xinbo270.com: could not connect to host
-xinbo276.com: could not connect to host
-xinbo278.com: could not connect to host
-xinbo279.com: could not connect to host
-xinbo280.com: could not connect to host
-xinbo286.com: could not connect to host
-xinbo290.com: could not connect to host
-xinbo296.com: could not connect to host
-xinbo298.com: could not connect to host
-xinbo299.com: could not connect to host
-xinbo306.com: could not connect to host
-xinbo308.com: could not connect to host
-xinbo316.com: could not connect to host
-xinbo318.com: could not connect to host
-xinbo326.com: could not connect to host
-xinbo338.com: could not connect to host
-xinbo350.com: could not connect to host
-xinbo356.com: could not connect to host
-xinbo359.com: could not connect to host
-xinbo369.com: could not connect to host
-xinbo376.com: could not connect to host
-xinbo378.com: could not connect to host
-xinbo379.com: could not connect to host
-xinbo38.com: could not connect to host
-xinbo380.com: could not connect to host
-xinbo386.com: could not connect to host
-xinbo389.com: could not connect to host
-xinbo390.com: could not connect to host
-xinbo396.com: could not connect to host
-xinbo398.com: could not connect to host
-xinbo399.com: could not connect to host
-xinbo400.com: could not connect to host
-xinbo401.com: could not connect to host
-xinbo406.com: could not connect to host
-xinbo407.com: could not connect to host
-xinbo466.com: could not connect to host
-xinbo468.com: could not connect to host
-xinbo478.com: could not connect to host
-xinbo480.com: could not connect to host
-xinbo496.com: could not connect to host
-xinbo498.com: could not connect to host
-xinbo506.com: could not connect to host
-xinbo508.com: could not connect to host
-xinbo516.com: could not connect to host
-xinbo526.com: could not connect to host
-xinbo528.com: could not connect to host
-xinbo536.com: could not connect to host
-xinbo538.com: could not connect to host
-xinbo556.com: could not connect to host
-xinbo566.com: could not connect to host
-xinbo570.com: could not connect to host
-xinbo576.com: could not connect to host
-xinbo578.com: could not connect to host
-xinbo580.com: could not connect to host
-xinbo586.com: could not connect to host
-xinbo590.com: could not connect to host
-xinbo600.com: could not connect to host
-xinbo608.com: could not connect to host
-xinbo609.com: could not connect to host
-xinbo610.com: could not connect to host
-xinbo676.com: could not connect to host
-xinboyule.com: could not connect to host
-xinex.cz: could not connect to host
-xing.ml: could not connect to host
-xinghuokeji.xin: could not connect to host
-xingiahanvisa.net: did not receive HSTS header
-xingyu1993.cn: could not connect to host
-xinj.com: did not receive HSTS header
-xinlandm.com: could not connect to host
-xinnixwebshop.be: did not receive HSTS header
-xinpujing198.com: could not connect to host
-xinpujing200.com: could not connect to host
-xinpujing518.com: could not connect to host
-xinqinhai.com: could not connect to host
-xiongx.cn: could not connect to host
-xiqi.us: could not connect to host
-xirion.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-xisa.it: could not connect to host
-xivpn.com: could not connect to host
-xiwu.li: could not connect to host
-xjoin.de: could not connect to host
-xkblog.xyz: could not connect to host
-xkngroup.com: could not connect to host
-xlaff.com: could not connect to host
-xlboo.com: did not receive HSTS header
-xldl.ml: could not connect to host
-xlem.cn: could not connect to host
-xlfblog.com: could not connect to host
-xlfilippou.com: could not connect to host
-xliang.co: did not receive HSTS header
-xlinar.com: could not connect to host
-xlui.me: did not receive HSTS header
-xlunastore.com: could not connect to host
-xlyingyuan.com: could not connect to host
-xmerak.com: could not connect to host
-xmflyrk.com: could not connect to host
-xmine128.tk: did not receive HSTS header
-xmiui.com: could not connect to host
-xmlogin288.com: could not connect to host
-xmodule.org: could not connect to host
-xmonk.org: did not receive HSTS header
-xmppwocky.net: could not connect to host
-xmr.my: could not connect to host
-xmr.wiki: could not connect to host
-xms66.top: could not connect to host
-xmtpro.com: did not receive HSTS header
-xmusic.live: could not connect to host
-xn-----8kcgbo2bmdgkdacthvjf.xn--p1ai: could not connect to host
-xn----7sbbagp2bcfwdeee1afm.xn--p1ai: could not connect to host
-xn----7sbfl2alf8a.xn--p1ai: could not connect to host
-xn----7sblrfhjjgq8g.xn--p1ai: could not connect to host
-xn----7sbmucgqdbgwwc5e9b.xn--p1ai: could not connect to host
-xn----8sbjfacqfqshbh7afyeg.xn--80asehdb: did not receive HSTS header
-xn----dtbhcpoeofgcvoic1s.xn--p1ai: could not connect to host
-xn----zmcaltpp1mdh16i.com: could not connect to host
-xn--0kq33cbsi8bk6d417b.com: could not connect to host
-xn--15tx89ctvm.xn--6qq986b3xl: could not connect to host
-xn--1yst51avkr.ga: could not connect to host
-xn--1yst51avkr.xn--6qq986b3xl: could not connect to host
-xn--24-6kch4bfqee.xn--p1ai: could not connect to host
-xn--24-glcia8dc.xn--p1ai: could not connect to host
-xn--3lqp21gwna.cn: could not connect to host
-xn--3lqp21gwna.xn--fiqs8s: could not connect to host
-xn--3lqp21gwna.xn--fiqz9s: could not connect to host
-xn--3lqt7ir4md4tzwa.cn: could not connect to host
-xn--3lqt7ir4md4tzwa.xn--fiqs8s: could not connect to host
-xn--3px.jp: could not connect to host
-xn--4brt03c.xn--io0a7i: could not connect to host
-xn--4dbfsnr.xn--9dbq2a: could not connect to host
-xn--4dbjwf8c.cf: could not connect to host
-xn--4dbjwf8c.ga: could not connect to host
-xn--4dbjwf8c.gq: could not connect to host
-xn--4dbjwf8c.ml: could not connect to host
-xn--4dbjwf8c.tk: could not connect to host
-xn--4kro7fswi.xn--6qq986b3xl: could not connect to host
-xn--5kv19nxn6b.club: could not connect to host
-xn--68jub.pw: could not connect to host
-xn--6cv66l79sp0n0ibo7s9ne.xyz: could not connect to host
-xn--6oqx6c301allufxcm23a7sm.com: could not connect to host
-xn--6qq52xuogcjfw8pwqp.ga: could not connect to host
-xn--6qq62xsogfjfs8p1qp.ga: could not connect to host
-xn--7rvz7ku3ppnr.jp: could not connect to host
-xn--7v8h.cf: could not connect to host
-xn--80aaagmgvmvmcuoq7r.xn--p1ai: did not receive HSTS header
-xn--80aanbkcescrdedmxzcl4pmc.xn--p1acf: could not connect to host
-xn--80ablh1c.online: could not connect to host
-xn--80ac0aqlt.xn--p1ai: could not connect to host
-xn--80adb4aeode.xn--p1ai: could not connect to host
-xn--80ahnefiifo0g.xn--p1ai: could not connect to host
-xn--80anogxed.xn--p1ai: could not connect to host
-xn--80aocgsfei.xn--p1ai: could not connect to host
-xn--88j2fy28hbxmnnf9zlw5buzd.com: did not receive HSTS header
-xn--8dry00a7se89ay98epsgxxq.com: could not connect to host
-xn--8mr166hf6s.xn--fiqs8s: did not receive HSTS header
-xn--8n2am80a.tech: could not connect to host
-xn--90adahrqfmec.xn--p1ai: did not receive HSTS header
-xn--90aroj.xn--p1ai: did not receive HSTS header
-xn--98jm6m.jp: could not connect to host
-xn--9pr52k0p5a.com: could not connect to host
-xn--acompaamientoholistico-pec.com: could not connect to host
-xn--bckerei-trster-5hb11a.de: did not receive HSTS header
-xn--bstlinser-v2a.com: could not connect to host
-xn--c1aehtaetb.xn--p1ai: could not connect to host
-xn--c5w27q.ml: could not connect to host
-xn--cckvb1cwa0c5br5e2d2711k.net: could not connect to host
-xn--circul-gva.cc: could not connect to host
-xn--circul-u3a.cc: could not connect to host
-xn--d1acj9c.xn--90ais: could not connect to host
-xn--datenrettung-mnchen-jbc.com: did not receive HSTS header
-xn--dcko6fsa5b1a8gyicbc.biz: could not connect to host
-xn--dckya4a0bya6x.com: could not connect to host
-xn--dckya4a0bya6x.jp: could not connect to host
-xn--dej-3oa.lv: could not connect to host
-xn--depias-zwa.es: could not connect to host
-xn--die-hrercharts-zpb.de: did not receive HSTS header
-xn--die-zahnrzte-ncb.de: did not receive HSTS header
-xn--dk8haaa.ws: could not connect to host
-xn--dmontaa-9za.com: could not connect to host
-xn--e--0g4aiy1b8rmfg3o.jp: could not connect to host
-xn--e--4h4axau6ld4lna0g.com: could not connect to host
-xn--e--ig4a4c3f6bvc5et632i.com: could not connect to host
-xn--e--k83a5h244w54gttk.xyz: could not connect to host
-xn--e1aoahhqgn.xn--p1ai: could not connect to host
-xn--ecki0cd0bu9a4nsjb.com: could not connect to host
-xn--eckle6c0exa0b0modc7054g7h8ajw6f.com: did not receive HSTS header
-xn--ehq13kgw4e.ml: could not connect to host
-xn--ekr87w7se89ay98ezcs.biz: did not receive HSTS header
-xn--elsignificadodesoar-c4b.com: could not connect to host
-xn--eo5aaa.eu.org: did not receive HSTS header
-xn--fiestadefindeao-crb.com: could not connect to host
-xn--flordepia-s6a.com: could not connect to host
-xn--fp8h58f.ws: could not connect to host
-xn--gi8hwa.tk: could not connect to host
-xn--gmq92k.nagoya: could not connect to host
-xn--hfk-allgu-schwaben-stb.de: could not connect to host
-xn--hmdiseoweb-y9a.com.ar: could not connect to host
-xn--hwt895j.xn--kpry57d: could not connect to host
-xn--int-ru8ea.xn--6qq986b3xl: could not connect to host
-xn--internetlnen-1cb.com: could not connect to host
-xn--j1aoca.xn--p1ai: did not receive HSTS header
-xn--j4h.cf: could not connect to host
-xn--jbs-tna.de: did not receive HSTS header
-xn--jp-6l5cs1yf3ivjsglphyv.net: could not connect to host
-xn--jywq5uqwqxhd2onsij.jp: did not receive HSTS header
-xn--kckd0bd4a8tp27yee2e.com: could not connect to host
-xn--keditr-0xa.biz: could not connect to host
-xn--knstler-n2a.tips: did not receive HSTS header
-xn--kreuzwortrtsel-fib.life: could not connect to host
-xn--l8j9d2b.jp: could not connect to host
-xn--lgb3a8bcpn.cf: could not connect to host
-xn--lgb3a8bcpn.ga: could not connect to host
-xn--lgb3a8bcpn.gq: could not connect to host
-xn--lgb3a8bcpn.ml: could not connect to host
-xn--lna-2000-9za.nu: could not connect to host
-xn--lna-4000-9za.nu: could not connect to host
-xn--ls8hi7a.tk: could not connect to host
-xn--lsupp-mra.net: did not receive HSTS header
-xn--maraa-rta.org: could not connect to host
-xn--matua-n7a.pl: could not connect to host
-xn--mensenges-o1a8c.gq: could not connect to host
-xn--mensengesss-t8a.gq: could not connect to host
-xn--mhringen-65a.de: could not connect to host
-xn--mhsv04avtt1xi.com: could not connect to host
-xn--milchaufschumer-test-lzb.de: could not connect to host
-xn--mllers-wxa.info: did not receive HSTS header
-xn--n8jubz39q0g0afpa985c.com: could not connect to host
-xn--neb-tma3u8u.xyz: could not connect to host
-xn--nf1a578axkh.xn--fiqs8s: did not receive HSTS header
-xn--nrrdetval-v2ab.se: could not connect to host
-xn--o38h.tk: could not connect to host
-xn--o77hka.ga: could not connect to host
-xn--obt757c.com: could not connect to host
-xn--p3t555glxhnwa.com: could not connect to host
-xn--p8jskj.jp: could not connect to host
-xn--pck4e3a2ex597b4ml.xyz: could not connect to host
-xn--pckqk6xk43lunk.net: could not connect to host
-xn--q9ji3c6d.xn--q9jyb4c: did not receive HSTS header
-xn--qckqc0nxbyc4cdb4527err7c.biz: could not connect to host
-xn--qckss0j.tk: could not connect to host
-xn--qckyd1cu698a35zarib.xyz: could not connect to host
-xn--qfun83b.ga: could not connect to host
-xn--r77hya.ga: could not connect to host
-xn--registriertesexualstraftter-ykc.de: could not connect to host
-xn--schlerzeitung-ideenlos-ulc.de: could not connect to host
-xn--sdkwa9azd389v01ya.com: could not connect to host
-xn--seelenwchter-mcb.eu: could not connect to host
-xn--skmotoroptimering-zzb.site: could not connect to host
-xn--spenijmazania-yhc.pl: could not connect to host
-xn--spiraphnix-olb.xyz: could not connect to host
-xn--srenpind-54a.dk: could not connect to host
-xn--svezavaukuu-ulb08i.rs: could not connect to host
-xn--t8j2a3042d.xyz: did not receive HSTS header
-xn--t8j4aa4nkg1h9bwcvud.com: could not connect to host
-xn--t8j4aa4nyhxa7duezbl49aqg5546e264d.net: could not connect to host
-xn--tda.ml: could not connect to host
-xn--thorme-6uaf.ca: could not connect to host
-xn--trdler-xxa.xyz: could not connect to host
-xn--u9jy16ncfao19mo8i.nagoya: could not connect to host
-xn--uort9oqoaj00bv04d.biz: could not connect to host
-xn--uorz58b8p0bpwa.biz: could not connect to host
-xn--v4q.ml: could not connect to host
-xn--v6q426ishax2a.xyz: could not connect to host
-xn--vck8crc010pu14e.biz: could not connect to host
-xn--vck8crc655y34ioha.net: did not receive HSTS header
-xn--vck8crcu789ajtaj92eura.xyz: could not connect to host
-xn--w22a.jp: did not receive HSTS header
-xn--werner-schffer-fib.de: could not connect to host
-xn--whlefamilie-l8a.de: did not receive HSTS header
-xn--wmq.jp: did not receive HSTS header
-xn--woistdermlleimer-rzb.de: could not connect to host
-xn--xdtx3pfzbiw3ar8e7yedqrhui.com: could not connect to host
-xn--xft85up3jca.ga: could not connect to host
-xn--xz1a.jp: could not connect to host
-xn--y-5ga.com: could not connect to host
-xn--y8j2eb5631a4qf5n0h.com: could not connect to host
-xn--y8j5gq14rbdd.net: did not receive HSTS header
-xn--y8jarb5hca.jp: could not connect to host
-xn--yj8h0m.ws: could not connect to host
-xn--ykrp42k.com: could not connect to host
-xn--yoamomisuasbcn-ynb.com: could not connect to host
-xn--yrvp1ac68c.xn--6qq986b3xl: could not connect to host
-xn--zck9a4b352yuua.jp: could not connect to host
-xn--zr9h.cf: could not connect to host
-xn--zr9h.ga: could not connect to host
-xn--zr9h.ml: could not connect to host
-xn--zr9h.tk: could not connect to host
-xng.io: did not receive HSTS header
-xobox.me: could not connect to host
-xoda.pw: could not connect to host
-xoffy.com: could not connect to host
-xom.party: could not connect to host
-xombra.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-xoonth.net: did not receive HSTS header
-xor-a.net: could not connect to host
-xotika.tv: could not connect to host
-xotv.top: could not connect to host
-xpenology-fr.net: could not connect to host
-xperiacode.com: could not connect to host
-xperiacodes.com: could not connect to host
-xpi.fr: did not receive HSTS header
-xpiuat.global: did not receive HSTS header
-xpj.bet: did not receive HSTS header
-xpj.sx: could not connect to host
-xpj567288.com: could not connect to host
-xpj567888.com: could not connect to host
-xpjai.com: max-age too low: 2592000
-xpjcunkuan.com: did not receive HSTS header
-xplore-dna.net: did not receive HSTS header
-xposedornot.com: max-age too low: 2592000
-xpressable.com: could not connect to host
-xpresswifi.network: could not connect to host
-xps2pdf.co.uk: did not receive HSTS header
-xps2pdf.info: could not connect to host
-xq55.com: did not receive HSTS header
-xqin.net: could not connect to host
-xrbox.me: could not connect to host
-xrippedhd.com: could not connect to host
-xroot.org: did not receive HSTS header
-xrope.tk: could not connect to host
-xrp.pw: could not connect to host
-xs74.com: could not connect to host
-xscancun.com: could not connect to host
-xscapers.com: did not receive HSTS header
-xsmobile.de: could not connect to host
-xss.ht: did not receive HSTS header
-xss.name: could not connect to host
-xsstime.nl: could not connect to host
-xstreamable.com: could not connect to host
-xsyds.cn: did not receive HSTS header
-xsz.jp: could not connect to host
-xt.om: could not connect to host
-xtenz.xyz: could not connect to host
-xtips.us: could not connect to host
-xtom.chat: could not connect to host
-xtom.email: could not connect to host
-xtom.io: could not connect to host
-xtom.wiki: could not connect to host
-xtream-hosting.com: did not receive HSTS header
-xtream-hosting.de: could not connect to host
-xtream-hosting.eu: could not connect to host
-xtreamhosting.eu: could not connect to host
-xtremealaskainsulation.com: could not connect to host
-xtremegaming.it: could not connect to host
-xtri.xyz: did not receive HSTS header
-xtrim.ru: did not receive HSTS header
-xts.bike: could not connect to host
-xtzone.be: could not connect to host
-xuanmeishe.net: did not receive HSTS header
-xuanmeishe.top: did not receive HSTS header
-xuehuang666.cn: could not connect to host
-xuexb.com: did not receive HSTS header
-xun3708855.com: could not connect to host
-xunleiyy.com: did not receive HSTS header
-xuntaosms.com: could not connect to host
-xupeng.me: did not receive HSTS header
-xuyh0120.win: did not receive HSTS header
-xvt-blog.tk: could not connect to host
-xwalck.se: could not connect to host
-xx6396.com: could not connect to host
-xx6729.co: could not connect to host
-xx6729.com: did not receive HSTS header
-xx6957.co: could not connect to host
-xx9297.co: could not connect to host
-xx9397.com: could not connect to host
-xx9721.com: could not connect to host
-xx9728.co: could not connect to host
-xxbase.com: could not connect to host
-xxgalgame.com: could not connect to host
-xxx020625.com: could not connect to host
-xxx3dbdsm.com: could not connect to host
-xxxlbox.com: did not receive HSTS header
-xy1919.com: could not connect to host
-xy366.cc: could not connect to host
-xy369.cc: could not connect to host
-xy6729.com: could not connect to host
-xy6957.com: could not connect to host
-xynex.us: could not connect to host
-xyngular-health.com: could not connect to host
-xynta.ch: could not connect to host
-xza.fr: could not connect to host
-xzoneadventure.com: could not connect to host
-y-o-w.com: did not receive HSTS header
-y-s.pw: could not connect to host
-y0bet.com: could not connect to host
-y2bet.com: could not connect to host
-y30365.com: could not connect to host
-y3451.com: could not connect to host
-y3bet.com: could not connect to host
-y4bet.com: could not connect to host
-y5197.co: could not connect to host
-y5bet.com: could not connect to host
-y6729.co: could not connect to host
-y6729.com: did not receive HSTS header
-y68ah.com: could not connect to host
-y68gl.com: could not connect to host
-y68jn.com: could not connect to host
-y68sc.com: could not connect to host
-y68sz.com: could not connect to host
-y6957.co: could not connect to host
-y6bet.com: could not connect to host
-y7091.com: could not connect to host
-y7092.com: could not connect to host
-y7093.com: could not connect to host
-y7bet.com: could not connect to host
-y81365.com: did not receive HSTS header
-y82365.com: did not receive HSTS header
-y89eee.com: could not connect to host
-y89ggg.com: could not connect to host
-y9297.co: could not connect to host
-y9721.com: could not connect to host
-y9728.co: could not connect to host
-yaay.com.br: could not connect to host
-yabbarov.ru: could not connect to host
-yabrt.cn: could not connect to host
-yaccin.com: could not connect to host
-yachts-magazine.com: did not receive HSTS header
-yado-furu.com: did not receive HSTS header
-yafull.com: could not connect to host
-yagi2.com: could not connect to host
-yagihiro.tech: could not connect to host
-yahoo.ax: could not connect to host
-yak-host.tk: could not connect to host
-yakamediaperu.com: did not receive HSTS header
-yalecleaners.com: could not connect to host
-yalla.jp: did not receive HSTS header
-yamamo10.com: could not connect to host
-yamei9911.com: could not connect to host
-yameveo.com: could not connect to host
-yan.lt: could not connect to host
-yanbao.xyz: could not connect to host
-yangcs.net: could not connect to host
-yangmi.blog: could not connect to host
-yanjicg.com: did not receive HSTS header
-yannis.codes: did not receive HSTS header
-yanqiyu.info: could not connect to host
-yanuwa.com: could not connect to host
-yanwei.tech: could not connect to host
-yanwh.xyz: did not receive HSTS header
-yaoidreams.com: did not receive HSTS header
-yapan8.com: could not connect to host
-yaporn.tv: did not receive HSTS header
-yarapilates.com.br: could not connect to host
-yarchives.jp: could not connect to host
-yard-fu.com: could not connect to host
-yardbird.us: could not connect to host
-yarnhookup.com: could not connect to host
-yarogneva.ru: could not connect to host
-yasinaydin.net: did not receive HSTS header
-yasirworkfolio.com: could not connect to host
-yasutomonodokoiko.com: did not receive HSTS header
-yateshomesales.com: did not receive HSTS header
-yaucy.win: could not connect to host
-yawen.tw: did not receive HSTS header
-yawnbox.com: did not receive HSTS header
-yay.cam: could not connect to host
-yayart.club: could not connect to host
-yayoba.com: did not receive HSTS header
-yazaral.com: did not receive HSTS header
-ybos.nl: could not connect to host
-ybt520.com: could not connect to host
-ycaaz.com: did not receive HSTS header
-ycc.wtf: could not connect to host
-ycherbonnel.fr: could not connect to host
-ychong.com: did not receive HSTS header
-ycm2.wtf: could not connect to host
-yd.io: could not connect to host
-yd163.cc: could not connect to host
-yd169.cc: could not connect to host
-ydy.jp: could not connect to host
-yell.ml: could not connect to host
-yello.website: could not connect to host
-yellowcar.website: could not connect to host
-yellowfish.top: could not connect to host
-yellowpages.ee: did not receive HSTS header
-yellowsquid.co.uk: could not connect to host
-yellowsquid.uk: could not connect to host
-yellowstone.nsupdate.info: could not connect to host
-yellowtaillasvegas.com: could not connect to host
-yemalu.com: could not connect to host
-yemekbaz.az: could not connect to host
-yenbainet.tk: could not connect to host
-yenibilgi.net: did not receive HSTS header
-yennhi.co: could not connect to host
-yenniferallulli.com: could not connect to host
-yenniferallulli.de: could not connect to host
-yenniferallulli.es: could not connect to host
-yenniferallulli.moda: could not connect to host
-yenniferallulli.nl: could not connect to host
-yenpape.com: could not connect to host
-yepbitcoin.com: could not connect to host
-yerbasbuenas.tk: could not connect to host
-yesdevnull.net: did not receive HSTS header
-yesfone.com.br: could not connect to host
-yeshu.org: could not connect to host
-yeskx.com: did not receive HSTS header
-yeswecan.co.bw: could not connect to host
-yetanalytics.io: did not receive HSTS header
-yetcore.io: could not connect to host
-yeu.io: could not connect to host
-yeulathich.com: did not receive HSTS header
-yex.nz: could not connect to host
-yeyi.site: could not connect to host
-yezishurb.site: could not connect to host
-yffengshi.ml: could not connect to host
-ygcdyf.com: could not connect to host
-yggdar.ga: could not connect to host
-yh35.net: could not connect to host
-yh64678.com: could not connect to host
-yh66656.com: could not connect to host
-yh66689.com: could not connect to host
-yh88890.com: could not connect to host
-yhb.io: could not connect to host
-yhhh.org: could not connect to host
-yhong.me: could not connect to host
-yhori.xyz: could not connect to host
-yhwj.top: could not connect to host
-yibin0831.com: could not connect to host
-yicivideo.com: could not connect to host
-yicknam.my: could not connect to host
-yiffed.me: could not connect to host
-yiffy.tips: did not receive HSTS header
-yiffy.zone: did not receive HSTS header
-yii2.cc: did not receive HSTS header
-yikzu.cn: could not connect to host
-yiluup.com: did not receive HSTS header
-yimgo.fr: could not connect to host
-yin.roma.it: did not receive HSTS header
-yin8888.tv: did not receive HSTS header
-ying299.com: could not connect to host
-ying299.net: could not connect to host
-yinga.ga: could not connect to host
-yingsuo.ltd: could not connect to host
-yingyj.com: could not connect to host
-yinhe12.net: could not connect to host
-yinulo.com: could not connect to host
-yippie.nl: did not receive HSTS header
-yisin.net: did not receive HSTS header
-yiyueread.com: could not connect to host
-yizhu.com: could not connect to host
-yjsoft.me: could not connect to host
-yjsw.sh.cn: could not connect to host
-ykhut.com: could not connect to host
-ykkme.com: did not receive HSTS header
-ykqpw.com: could not connect to host
-yl8.com: could not connect to host
-ylk.io: could not connect to host
-ylwz.cc: could not connect to host
-ym039.com: could not connect to host
-ym065.com: could not connect to host
-ymblaw.com: did not receive HSTS header
-ynnovasport.be: could not connect to host
-ynode.co: did not receive HSTS header
-ynsn.nl: could not connect to host
-yntongji.com: could not connect to host
-ynxfh.cn: could not connect to host
-yob.vn: could not connect to host
-yobai28.com: did not receive HSTS header
-yobst.tk: could not connect to host
-yocchan1513.net: did not receive HSTS header
-yoga-prive.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-yoga-sky.de: did not receive HSTS header
-yoga.is-an-engineer.com: could not connect to host
-yogabhawnamission.com: did not receive HSTS header
-yogamayanine.com: could not connect to host
-yogatrainingrishikesh.com: did not receive HSTS header
-yogeshbeniwal.com: did not receive HSTS header
-yoibyoin.info: did not receive HSTS header
-yoimise.net: did not receive HSTS header
-yoiyado.info: did not receive HSTS header
-yokeepo.com: could not connect to host
-yokone3-kutikomi.com: could not connect to host
-yolo-csgo.com: could not connect to host
-yolocast.wtf: could not connect to host
-yolocelebs.com: did not receive HSTS header
-yoloprod.fr: could not connect to host
-yoloseo.com: could not connect to host
-yomena.in: could not connect to host
-yomepre.com: could not connect to host
-yonema.com: could not connect to host
-yooguo123.com: could not connect to host
-yooomu.com: could not connect to host
-yopers.com: did not receive HSTS header
-yoplate.com: did not receive HSTS header
-yopuedo.co: did not receive HSTS header
-yorgosbos.nl: did not receive HSTS header
-yorkshireterrier.com.br: could not connect to host
-yorname.ml: could not connect to host
-yoru.me: did not receive HSTS header
-yosheenetwork.fr: could not connect to host
-yoticonnections.com: could not connect to host
-yotilab.com: could not connect to host
-yotilabs.com: could not connect to host
-youareme.ca: did not receive HSTS header
-youcaitian.com: could not connect to host
-youcancraft.de: did not receive HSTS header
-youcanfuckoff.xyz: could not connect to host
-youcanhelp.tk: could not connect to host
-youcontrol.ru: could not connect to host
-youcruit.com: did not receive HSTS header
-youdowell.com: did not receive HSTS header
-youfencun.com: could not connect to host
-youftp.tk: could not connect to host
-yougot.pw: could not connect to host
-youhabitat.es: did not receive HSTS header
-youhacked.me: could not connect to host
-youhs.top: did not receive HSTS header
-youjizz.bz: could not connect to host
-youkok2.com: did not receive HSTS header
-youla.cf: could not connect to host
-youlend.com: did not receive HSTS header
-youlikehookups.com: could not connect to host
-youliketwinks.com: could not connect to host
-youlog.net: did not receive HSTS header
-youlovehers.com: could not connect to host
-youmiracle.com: could not connect to host
-younameit.ru: could not connect to host
-youngandunited.nl: did not receive HSTS header
-youngpeopleunited.co.uk: could not connect to host
-youngsoad.com: did not receive HSTS header
-younl.net: could not connect to host
-youon.tokyo: could not connect to host
-your-dns.run: could not connect to host
-your-greece.ga: could not connect to host
-your-idc.tk: could not connect to host
-your-waterserver.com: could not connect to host
-your28days.com: could not connect to host
-yourbapp.ch: could not connect to host
-yourbittorrent.com: did not receive HSTS header
-yourbonus.click: could not connect to host
-yourcomputer.expert: did not receive HSTS header
-yourconscious.life: could not connect to host
-yourdomain.host: did not receive HSTS header
-youreward.ga: could not connect to host
-yourgadget.ro: could not connect to host
-yourgame.co.il: did not receive HSTS header
-yourhair.net: max-age too low: 0
-youri.me: could not connect to host
-yourlovesong.com.mx: could not connect to host
-yourmemorykeeper.co.uk: did not receive HSTS header
-yoursecondphone.co: did not receive HSTS header
-yourself.today: could not connect to host
-yourstage.nl: could not connect to host
-yourstrongbox.com: could not connect to host
-yourtimetravel.net: did not receive HSTS header
-yourtrainer.com: could not connect to host
-yourtrainingsolutions.com: did not receive HSTS header
-youruseragent.info: could not connect to host
-yourznc.com: could not connect to host
-youshouldbealiberal.com: could not connect to host
-yousite.by: could not connect to host
-yout.com: did not receive HSTS header
-youth2009.org: could not connect to host
-youthovation.org: did not receive HSTS header
-youtsuu-raku.com: could not connect to host
-youtube: could not connect to host
-youtubeviews.ml: could not connect to host
-yp518518.com: could not connect to host
-ypcs.fi: did not receive HSTS header
-ypiresia.fr: could not connect to host
-yrjanheikki.com: did not receive HSTS header
-yryz.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-ys-shop.biz: did not receive HSTS header
-ysicing.me: did not receive HSTS header
-ysicing.net: did not receive HSTS header
-yspa.tv: could not connect to host
-yspeo.biz: did not receive HSTS header
-ysun.xyz: could not connect to host
-ysuna.xyz: could not connect to host
-ysx.me.uk: could not connect to host
-yt656.com: could not connect to host
-yt668899.com: could not connect to host
-ytb.zone: did not receive HSTS header
-ytbmp3.com: did not receive HSTS header
-ytbmp4.com: did not receive HSTS header
-ytcuber.xyz: could not connect to host
-ythyth.com: max-age too low: 2592000
-ytpak.com: could not connect to host
-ytpak.pk: could not connect to host
-ytuquelees.net: could not connect to host
-ytvwld.de: did not receive HSTS header
-yu.vc: did not receive HSTS header
-yu7.jp: did not receive HSTS header
-yuan.nctu.me: could not connect to host
-yuanbaohd.com: did not receive HSTS header
-yuanbenlian.com: did not receive HSTS header
-yuandan.ml: could not connect to host
-yuanjiazhao.tk: could not connect to host
-yuansecard.me: could not connect to host
-yubanmei.com: could not connect to host
-yuce518.com: could not connect to host
-yudan.com.br: could not connect to host
-yude.ml: did not receive HSTS header
-yue2.net: could not connect to host
-yuema.net.cn: could not connect to host
-yuer.sytes.net: could not connect to host
-yuexiangzs.com: could not connect to host
-yufan.me: did not receive HSTS header
-yugege.cf: could not connect to host
-yuhen.ru: did not receive HSTS header
-yuho.vn: could not connect to host
-yui.cat: did not receive HSTS header
-yuka.one: could not connect to host
-yukaction.com: did not receive HSTS header
-yukari.cloud: did not receive HSTS header
-yukbeli.id: did not receive HSTS header
-yuki-portfolio.com: did not receive HSTS header
-yukict.com: could not connect to host
-yukijinji.moe: could not connect to host
-yukiminami.net: could not connect to host
-yukimochi.me: could not connect to host
-yuko.moe: could not connect to host
-yukonrefugees.com: could not connect to host
-yum.beer: could not connect to host
-yum0.cn: could not connect to host
-yumikori.net: could not connect to host
-yumli.net: could not connect to host
-yummyfamilyrecipes.com: could not connect to host
-yummylooks.com: did not receive HSTS header
-yuna.love: could not connect to host
-yuna.tg: could not connect to host
-yunjishou.pro: could not connect to host
-yunpan.blue: could not connect to host
-yunsoupian.vip: could not connect to host
-yuntama.xyz: could not connect to host
-yunzhu.org: could not connect to host
-yuqi.me: could not connect to host
-yurimoens.be: could not connect to host
-yurinet.org: could not connect to host
-yuriykuzmin.com: could not connect to host
-yushi.moe: did not receive HSTS header
-yutabon.com: could not connect to host
-yutang.vn: did not receive HSTS header
-yutangyun.com: could not connect to host
-yutuo.net: did not receive HSTS header
-yuucchi.com: could not connect to host
-yuushou.com: could not connect to host
-yuweiyang.xyz: could not connect to host
-yux.fr: could not connect to host
-yux.io: did not receive HSTS header
-yuxingxin.com: did not receive HSTS header
-yuyu.io: did not receive HSTS header
-yuzei.tk: could not connect to host
-yuzu.tk: did not receive HSTS header
-yuzzamatuzz.co.uk: did not receive HSTS header
-yveshield.com: could not connect to host
-ywei.org: could not connect to host
-yxs.me: did not receive HSTS header
-yy-s.net: could not connect to host
-yy366.cc: could not connect to host
-yy369.cc: could not connect to host
-yy5197.co: could not connect to host
-yy6396.com: could not connect to host
-yy6729.co: could not connect to host
-yy6729.com: did not receive HSTS header
-yy6957.co: could not connect to host
-yy9297.co: could not connect to host
-yy9297.com: could not connect to host
-yy9397.com: could not connect to host
-yy9721.com: could not connect to host
-yy9728.co: could not connect to host
-yya.bid: could not connect to host
-yya.me: did not receive HSTS header
-yya.men: could not connect to host
-yyffqq.tk: could not connect to host
-yyrss.com: could not connect to host
-yyy116.com: could not connect to host
-yyy608.com: could not connect to host
-yzcloud.me: did not receive HSTS header
-yzer.club: could not connect to host
-z-coder.com: could not connect to host
-z-konzept-nutrition.ru: could not connect to host
-z-to-a.com: did not receive HSTS header
-z0rro.net: could not connect to host
-z33.ch: did not receive HSTS header
-z33.co: did not receive HSTS header
-z33d.xyz: did not receive HSTS header
-z3liff.com: could not connect to host
-z3liff.net: could not connect to host
-z4k.de: did not receive HSTS header
-z5197.co: could not connect to host
-z6729.co: could not connect to host
-z6729.com: did not receive HSTS header
-z6957.co: could not connect to host
-z6957.com: did not receive HSTS header
-z8079.com: could not connect to host
-z81365.com: did not receive HSTS header
-z81818.com: did not receive HSTS header
-z8182.com: could not connect to host
-z8193.com: could not connect to host
-z82365.com: did not receive HSTS header
-z8851.com: could not connect to host
-z9297.co: could not connect to host
-z9397.com: could not connect to host
-z9721.com: could not connect to host
-z9728.co: could not connect to host
-zaadnet.ir: did not receive HSTS header
-zaalleatherwear.nl: did not receive HSTS header
-zabavno.mk: did not receive HSTS header
-zabezpecweb.cz: did not receive HSTS header
-zacadam.com: did not receive HSTS header
-zacavi.com.br: could not connect to host
-zacco.com: could not connect to host
-zacco.site: could not connect to host
-zacharopoulos.me: could not connect to host
-zachbolinger.com: could not connect to host
-zachpeters.org: did not receive HSTS header
-zadania.wiki: could not connect to host
-zadieheimlich.com: did not receive HSTS header
-zaem.tv: could not connect to host
-zaffit.com: could not connect to host
-zafirus.name: did not receive HSTS header
-zagluszaczgps.pl: did not receive HSTS header
-zahnarzt-kramer.ch: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-zahnarzt-muenich.de: did not receive HSTS header
-zahnrechner-staging.azurewebsites.net: could not connect to host
-zajm-bez-poruchitelej.cf: could not connect to host
-zajm-bez-spravok.tk: could not connect to host
-zajm-ehkspress.ml: could not connect to host
-zajm-na-kivi.cf: could not connect to host
-zajm-pod-zalog.gq: could not connect to host
-zajmy-contact.cf: could not connect to host
-zajmy-contact.ga: could not connect to host
-zajmy-contact.gq: could not connect to host
-zakelijketaalcursus.nl: could not connect to host
-zalan.do: could not connect to host
-zalaxx.ddns.net: could not connect to host
-zalohovaniburian.cz: could not connect to host
-zalzalac.com: did not receive HSTS header
-zambranopublicidadvideo.com: could not connect to host
-zamis.net: could not connect to host
-zamocosmeticos.com.br: could not connect to host
-zamorano.edu: could not connect to host
-zamos.ru: max-age too low: 0
-zaneweb.org: could not connect to host
-zanzabar.it: could not connect to host
-zanzariere.roma.it: could not connect to host
-zao.fi: could not connect to host
-zaoext.com: could not connect to host
-zaoshanghao-dajia.rhcloud.com: could not connect to host
-zap.yt: could not connect to host
-zapatoshechoamano.pe: could not connect to host
-zapmaster14.com: could not connect to host
-zappos.com: did not receive HSTS header
-zaptan.net: could not connect to host
-zaptan.org: could not connect to host
-zaptan.us: could not connect to host
-zargaripour.com: did not receive HSTS header
-zarmarket.org: could not connect to host
-zarooba.com: could not connect to host
-zavca.com: could not connect to host
-zaympodzalog.ga: could not connect to host
-zayna.eu: did not receive HSTS header
-zbanks.cn: could not connect to host
-zbasenem.pl: did not receive HSTS header
-zbchen.com: could not connect to host
-zberger.com: could not connect to host
-zbetcheck.in: could not connect to host
-zbigniewgalucki.eu: did not receive HSTS header
-zbp.at: did not receive HSTS header
-zby.io: could not connect to host
-zcgram.com: did not receive HSTS header
-zcr.ca: could not connect to host
-zcryp.to: could not connect to host
-zd0808.com: could not connect to host
-zd279.com: could not connect to host
-zd3535.com: could not connect to host
-zd739.com: could not connect to host
-zd8828.com: could not connect to host
-zd8835.com: could not connect to host
-zdrave-konzultace.cz: could not connect to host
-zdravekonzultace.cz: could not connect to host
-zdravesteny.cz: could not connect to host
-zdravotnickasluzba.eu: could not connect to host
-zdravystul.cz: did not receive HSTS header
-zdrowiepaleo.pl: did not receive HSTS header
-zdx.ch: max-age too low: 0
-zeb.fun: could not connect to host
-zebedeescastles.co.uk: could not connect to host
-zebibyte.cn: could not connect to host
-zebrababy.cn: could not connect to host
-zebry.nl: did not receive HSTS header
-zebulon.fr: did not receive HSTS header
-zecrypto.com: could not connect to host
-zeelynk.com: could not connect to host
-zeestraten.nl: did not receive HSTS header
-zeeuw.nl: did not receive HSTS header
-zefiris.org: did not receive HSTS header
-zefu.ca: could not connect to host
-zegriesalmansa.tk: could not connect to host
-zeguigui.com: could not connect to host
-zehdenick-bleibt-bunt.de: could not connect to host
-zeilles.nu: could not connect to host
-zeitoununiversity.org: could not connect to host
-zeitzer-turngala.de: could not connect to host
-zeiw.me: could not connect to host
-zelfmoord.ga: could not connect to host
-zelfrijdendeautos.com: did not receive HSTS header
-zelfstandigemakelaars.net: could not connect to host
-zellari.ru: did not receive HSTS header
-zeloz.xyz: could not connect to host
-zemlova.cz: could not connect to host
-zen-ume.com: could not connect to host
-zenfusion.fr: could not connect to host
-zengdong.ren: could not connect to host
-zenhaiku.com: did not receive HSTS header
-zenics.co.uk: did not receive HSTS header
-zenmate.com.tr: could not connect to host
-zennzimie.be: did not receive HSTS header
-zennzimie.com: did not receive HSTS header
-zeno-dev.com: could not connect to host
-zeno-system.com: did not receive HSTS header
-zenpayroll.com: did not receive HSTS header
-zenram.com: could not connect to host
-zentask.io: could not connect to host
-zentience.dk: could not connect to host
-zentience.net: did not receive HSTS header
-zentience.org: could not connect to host
-zentiweb.nl: did not receive HSTS header
-zentralwolke.de: did not receive HSTS header
-zentrumfuerchemie.de: could not connect to host
-zenus-biometrics.com: did not receive HSTS header
-zenvideocloud.com: could not connect to host
-zenwears.com: could not connect to host
-zeparadox.com: did not receive HSTS header
-zepect.com: did not receive HSTS header
-zepter.ga: could not connect to host
-zera.com.au: could not connect to host
-zerg.uk: could not connect to host
-zero-sum.xyz: could not connect to host
-zero-x-baadf00d.com: could not connect to host
-zerocool.io: could not connect to host
-zeroday.sk: did not receive HSTS header
-zerofox.gq: could not connect to host
-zeroling.com: could not connect to host
-zeroml.ml: could not connect to host
-zerosource.net: could not connect to host
-zerosync.com: could not connect to host
-zerowastesavvy.com: did not receive HSTS header
-zerowastesonoma.gov: did not receive HSTS header
-zertif.info: could not connect to host
-zerudi.com: did not receive HSTS header
-zetadisseny.es: did not receive HSTS header
-zeto365.pl: did not receive HSTS header
-zetrov.pl: did not receive HSTS header
-zeug.co: could not connect to host
-zewtie.com: could not connect to host
-zeytin.pro: could not connect to host
-zezeatolye.com: did not receive HSTS header
-zfly.me: could not connect to host
-zfyl8.com: could not connect to host
-zgan.ga: could not connect to host
-zgndh.com: could not connect to host
-zh-yds.com: could not connect to host
-zh1.li: could not connect to host
-zhang.nz: could not connect to host
-zhang.wtf: could not connect to host
-zhangge.net: did not receive HSTS header
-zhanglizhi.ml: could not connect to host
-zhanglu.xyz: could not connect to host
-zhangruilin.com: did not receive HSTS header
-zhangsir.net: could not connect to host
-zhangyuhao.com: could not connect to host
-zhaochen.xyz: could not connect to host
-zhaoeq.com: could not connect to host
-zhaojin97.cn: could not connect to host
-zhaotongjun.com: max-age too low: 0
-zhattyt.com: could not connect to host
-zhdd.pl: did not receive HSTS header
-zhendingresources.com: could not connect to host
-zhengqiangonglue.com: max-age too low: 0
-zhenmeish.com: could not connect to host
-zhenyan.org: could not connect to host
-zhh.in: could not connect to host
-zhi.ci: could not connect to host
-zhikin.com: could not connect to host
-zhiku8.com: could not connect to host
-zhimajk.com: could not connect to host
-zhina.wiki: could not connect to host
-zhiwei.me: could not connect to host
-zhome.info: could not connect to host
-zhongxigo.com: could not connect to host
-zhongzicili.ws: could not connect to host
-zhou28d88vip.com: did not receive HSTS header
-zhoujiashu.com: could not connect to host
-zhoutiancai.cn: did not receive HSTS header
-zhouzeng1314.com: max-age too low: 0
-zhthings.com: could not connect to host
-zhujicaihong.com: could not connect to host
-zi0r.com: did not receive HSTS header
-zian.online: could not connect to host
-zicklam.com: did not receive HSTS header
-ziegler-family.com: could not connect to host
-zigcore.com.br: could not connect to host
-zihun.club: could not connect to host
-zijung.me: could not connect to host
-zikirakhirzaman.com: could not connect to host
-ziktime.com: did not receive HSTS header
-zilon.com.co: could not connect to host
-zindan.tk: could not connect to host
-zinenapse.info: did not receive HSTS header
-zingpetfood.com: did not receive HSTS header
-zings.eu: could not connect to host
-zip.ch: did not receive HSTS header
-zippy-download.com: could not connect to host
-zippy-download.de: could not connect to host
-zirka24.net: could not connect to host
-zirtue.io: could not connect to host
-zitrone44.de: could not connect to host
-zittingskalender.be: did not receive HSTS header
-zivagold.com: could not connect to host
-zivy-ruzenec.cz: could not connect to host
-ziwa.ir: did not receive HSTS header
-zixo.sk: did not receive HSTS header
-ziyuanabc.xyz: could not connect to host
-ziz.exchange: could not connect to host
-zizcollections.com: could not connect to host
-zizoo.com: did not receive HSTS header
-zjbuilding.com.au: did not receive HSTS header
-zjc3.com: could not connect to host
-zjh6888.com: max-age too low: 0
-zju.tv: could not connect to host
-zjubtv.com: could not connect to host
-zjuqsc.com: could not connect to host
-zjutv.com: could not connect to host
-zjv.me: could not connect to host
-zjyifa.cn: could not connect to host
-zk.com.co: did not receive HSTS header
-zkd.me: could not connect to host
-zkillboard.com: did not receive HSTS header
-zking.ga: could not connect to host
-zkrypt.cc: did not receive HSTS header
-zl-29.com: could not connect to host
-zl-59.com: could not connect to host
-zl-69.com: could not connect to host
-zl-79.com: could not connect to host
-zl-89.com: could not connect to host
-zl0505.com: could not connect to host
-zl071.com: could not connect to host
-zl0909.com: could not connect to host
-zl1212.com: could not connect to host
-zl2020.com: could not connect to host
-zl2020.vip: could not connect to host
-zl3737.com: could not connect to host
-zl4231.com: could not connect to host
-zl4290.com: could not connect to host
-zl8824.com: could not connect to host
-zl883.com: could not connect to host
-zlaty-tyden.cz: did not receive HSTS header
-zlatytyden.cz: did not receive HSTS header
-zlc1994.com: did not receive HSTS header
-zlcp.com: could not connect to host
-zlogic.xyz: did not receive HSTS header
-zlol.lg.ua: did not receive HSTS header
-zlotonews.com: did not receive HSTS header
-zlypi.com: could not connect to host
-zmala.com: could not connect to host
-zmessages.com: did not receive HSTS header
-zmsastro.co.za: could not connect to host
-zmscable.com: did not receive HSTS header
-zmy.im: could not connect to host
-znacite.com: did not receive HSTS header
-znd.jp: could not connect to host
-zning.net.cn: could not connect to host
-zny.pw: could not connect to host
-zocken.com: did not receive HSTS header
-zodgame.fun: did not receive HSTS header
-zodgame.us: did not receive HSTS header
-zoe.vc: did not receive HSTS header
-zohar.link: could not connect to host
-zohar.shop: did not receive HSTS header
-zoi.jp: did not receive HSTS header
-zokster.net: did not receive HSTS header
-zolokar.xyz: could not connect to host
-zonadebolsa.es: did not receive HSTS header
-zone-de-confiance.fr: could not connect to host
-zone403.net: could not connect to host
-zoneminder.com: did not receive HSTS header
-zoners.si: did not receive HSTS header
-zonewatcher.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: ../../../UXP/security/manager/tools/getHSTSPreloadList.js :: processStsHeader :: line 132" data: no]
-zonky.io: could not connect to host
-zontractors.com: could not connect to host
-zoo.city: did not receive HSTS header
-zoo24.de: did not receive HSTS header
-zoofaeth.de: did not receive HSTS header
-zoofit.com.au: could not connect to host
-zookids.uy: did not receive HSTS header
-zoological-gardens.eu: could not connect to host
-zoomcar.pro: did not receive HSTS header
-zoomek.com: could not connect to host
-zoomingin.net: max-age too low: 5184000
-zoommailing.com: did not receive HSTS header
-zoomplumbing.net: did not receive HSTS header
-zooneshop.com: did not receive HSTS header
-zooom2.azurewebsites.net: could not connect to host
-zooparadies.eu: could not connect to host
-zoorigin.com: did not receive HSTS header
-zooxdata.com: could not connect to host
-zopy.com.br: could not connect to host
-zorki.nl: did not receive HSTS header
-zortium.report: could not connect to host
-zorz.info: could not connect to host
-zoznamrealit.sk: did not receive HSTS header
-zozo.com: did not receive HSTS header
-zpy.fun: could not connect to host
-zq789.com: could not connect to host
-zqhong.com: could not connect to host
-zqjs.tk: could not connect to host
-zqstudio.top: could not connect to host
-zqwqz.com: did not receive HSTS header
-zqzx.xyz: could not connect to host
-zr.is: did not receive HSTS header
-zrt.io: did not receive HSTS header
-zry-blog.top: could not connect to host
-zs-ohradni.cz: did not receive HSTS header
-zs6688.cc: could not connect to host
-zsoltbereczki.tk: could not connect to host
-zsrbcs.com: could not connect to host
-zstu.eu: could not connect to host
-ztan.tk: could not connect to host
-ztcaoll222.cn: could not connect to host
-ztytian.com: could not connect to host
-zuan-in.com: could not connect to host
-zuan-in.net: could not connect to host
-zuanqianni.com: could not connect to host
-zubora.co: could not connect to host
-zubro.net: could not connect to host
-zuckerfloh.de: did not receive HSTS header
-zudomc.me: could not connect to host
-zuefle.net: did not receive HSTS header
-zuehlcke.de: could not connect to host
-zuenkov.com: max-age too low: 0
-zug.fr: could not connect to host
-zug.io: did not receive HSTS header
-zuitaotu.com: could not connect to host
-zukix.com: could not connect to host
-zulu7.com: did not receive HSTS header
-zumazar.ru: could not connect to host
-zunda.cafe: could not connect to host
-zunftmarke.de: did not receive HSTS header
-zup.me: could not connect to host
-zupago.com: did not receive HSTS header
-zuppy.pm: could not connect to host
-zurickrelogios.com.br: did not receive HSTS header
-zurret.de: did not receive HSTS header
-zutsu-raku.com: could not connect to host
-zuviel.space: could not connect to host
-zvejonys.lt: did not receive HSTS header
-zvive.com: did not receive HSTS header
-zvncloud.com: did not receive HSTS header
-zvz.im: could not connect to host
-zwalcz-cellulit.com: did not receive HSTS header
-zwb3.de: could not connect to host
-zwembadheeten.nl: did not receive HSTS header
-zx1168.com: could not connect to host
-zx2268.com: could not connect to host
-zxavier.com: did not receive HSTS header
-zxc.science: did not receive HSTS header
-zxe.com.br: could not connect to host
-zxity.co.uk: could not connect to host
-zxity.ltd: could not connect to host
-zxity.uk: could not connect to host
-zxssl.com: did not receive HSTS header
-zxtcode.com: could not connect to host
-zxxcq.com: could not connect to host
-zyf.pw: could not connect to host
-zyger.co.za: did not receive HSTS header
-zygozoon.com: could not connect to host
-zylai.net: could not connect to host
-zymbit.com: did not receive HSTS header
-zync.ca: did not receive HSTS header
-zypgr.com: could not connect to host
-zypr.pw: could not connect to host
-zyrillezuno.com: could not connect to host
-zyso.org: could not connect to host
-zz0036.com: max-age too low: 0
-zz017.com: could not connect to host
-zz074.com: could not connect to host
-zz284.com: could not connect to host
-zz295.com: did not receive HSTS header
-zz5197.co: could not connect to host
-zz606.com: could not connect to host
-zz6729.co: could not connect to host
-zz6729.com: did not receive HSTS header
-zz6957.co: could not connect to host
-zz9397.com: did not receive HSTS header
-zz9721.com: did not receive HSTS header
-zz9728.co: could not connect to host
-zzb510.com: could not connect to host
-zzb6688.com: could not connect to host
-zzb8899.com: could not connect to host
-zzbnet.cn: could not connect to host
-zzw.ca: could not connect to host
diff --git a/security/manager/ssl/nsSTSPreloadList.inc b/security/manager/ssl/nsSTSPreloadList.inc
deleted file mode 100644
index 65f1d5ae56..0000000000
--- a/security/manager/ssl/nsSTSPreloadList.inc
+++ /dev/null
@@ -1,61731 +0,0 @@
-/* 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 is an automatically generated file. If you're not */
-/* nsSiteSecurityService.cpp, you shouldn't be #including it. */
-/*****************************************************************************/
-
-#include <stdint.h>
-const PRTime gPreloadListExpirationTime = INT64_C(1591406347918000);
-
-class nsSTSPreload
-{
- public:
- const char *mHost;
- const bool mIncludeSubdomains;
-};
-
-static const nsSTSPreload kSTSPreloadList[] = {
- { "0--1.de", true },
- { "0-24.com", true },
- { "0-24.net", true },
- { "000321365.com", true },
- { "0007552.com", true },
- { "00100010.net", true },
- { "00130013.net", true },
- { "00150015.net", true },
- { "00160016.net", true },
- { "00168365.com", true },
- { "0017552.com", true },
- { "00180018.net", true },
- { "00190019.net", true },
- { "001yapan.com", false },
- { "00228.am", false },
- { "00228.org", false },
- { "00228ww.com", false },
- { "00228x.com", false },
- { "00228xx.com", false },
- { "00228yy.com", false },
- { "00228z.com", false },
- { "00228zz.com", false },
- { "0022bet.vip", false },
- { "002k8.com", true },
- { "00365t.com", true },
- { "0037552.com", true },
- { "003971.com", true },
- { "00440044.net", true },
- { "0047552.com", true },
- { "00550055.net", true },
- { "0057552.com", true },
- { "0064427.com", true },
- { "0067552.com", true },
- { "0077552.com", true },
- { "008207.com", true },
- { "008251.com", true },
- { "008253.com", true },
- { "008271.com", true },
- { "0086286.com", true },
- { "0087552.com", true },
- { "009597.com", true },
- { "0097552.com", true },
- { "00dani.me", true },
- { "00f.net", true },
- { "01.org", true },
- { "01011970.xyz", true },
- { "010203.ru", true },
- { "010kb.com", true },
- { "010ks.com", true },
- { "010ks.net", true },
- { "01110000011100110111001001100111.com", true },
- { "0117552.com", true },
- { "0123456789365.com", true },
- { "0127552.com", true },
- { "01365t.com", true },
- { "0137552.com", true },
- { "015kb.com", true },
- { "0166z6.com", true },
- { "016kb.com", true },
- { "0177z6.com", true },
- { "0188z6.com", true },
- { "01918.net", true },
- { "0199z6.com", true },
- { "020ks.com", true },
- { "021002.com", true },
- { "0222z6.com", true },
- { "022367.com", true },
- { "022379.com", true },
- { "022391.com", true },
- { "022501.com", true },
- { "022503.com", true },
- { "022507.com", true },
- { "022571.com", true },
- { "022601.com", true },
- { "022609.com", true },
- { "022610.com", true },
- { "022kb.com", true },
- { "022ks.net", true },
- { "02327.net", true },
- { "02365t.com", true },
- { "02375.net", true },
- { "025k8.com", true },
- { "026122.com", true },
- { "02638.net", true },
- { "026kb.com", true },
- { "0288z6.com", true },
- { "029kb.com", true },
- { "02am8.com", true },
- { "03012.net", true },
- { "03018.net", true },
- { "0312z6.com", true },
- { "0313z6.com", true },
- { "0315z6.com", true },
- { "0316z6.com", true },
- { "03170317.com", true },
- { "0317z6.com", true },
- { "0318z6.com", true },
- { "0319z6.com", true },
- { "0335z6.com", true },
- { "0351z6.com", true },
- { "0352z6.com", true },
- { "0353z6.com", true },
- { "0355z6.com", true },
- { "0356z6.com", true },
- { "0357z6.com", true },
- { "0358z6.com", true },
- { "0359z6.com", true },
- { "03637.com", true },
- { "0371z6.com", true },
- { "0372z6.com", true },
- { "0373z6.com", true },
- { "0375z6.com", true },
- { "0377z6.com", true },
- { "038456.com", false },
- { "038899.com", true },
- { "0393gg.com", true },
- { "0393hh.com", true },
- { "0393ii.com", true },
- { "0399z6.com", true },
- { "04365t.com", true },
- { "046569.com", true },
- { "04d.co", true },
- { "050869.com", true },
- { "050ks.com", true },
- { "050media.nl", true },
- { "0510ks.com", true },
- { "0511315.net", true },
- { "0511ks.com", true },
- { "0511z6.com", true },
- { "0512z6.com", true },
- { "0513z6.com", true },
- { "0515z6.com", true },
- { "0516z6.com", true },
- { "0518z6.com", true },
- { "0521z6.com", true },
- { "0523z6.com", true },
- { "0531z6.com", true },
- { "0532z6.com", true },
- { "0535z6.com", true },
- { "05365t.com", true },
- { "0536z6.com", true },
- { "0537z6.com", true },
- { "0539z6.com", true },
- { "0551z6.com", true },
- { "0552z6.com", true },
- { "0553z6.com", true },
- { "0555z6.com", true },
- { "0556z6.com", true },
- { "055kb.com", true },
- { "056675.com", true },
- { "056687.com", true },
- { "056690.com", true },
- { "056697.com", true },
- { "056867.com", true },
- { "056869.com", true },
- { "056875.com", true },
- { "056879.com", true },
- { "056950.com", true },
- { "056976.com", true },
- { "056985.com", true },
- { "056kb.com", true },
- { "0572z6.com", true },
- { "0573wk.com", true },
- { "0573z6.com", true },
- { "057587.com", true },
- { "057596.com", true },
- { "0575z6.com", true },
- { "0576z6.com", true },
- { "0577z6.com", true },
- { "0578z6.com", true },
- { "0579z6.com", true },
- { "058509.com", true },
- { "058596.com", true },
- { "058679.com", true },
- { "058kb.com", true },
- { "0591z6.com", true },
- { "0592z6.com", true },
- { "0593z6.com", true },
- { "0595z6.com", true },
- { "0596z6.com", true },
- { "0598z6.com", true },
- { "0599z6.com", true },
- { "05am8.net", true },
- { "060258.com", true },
- { "060795.com", true },
- { "0607p.com", true },
- { "060870.com", true },
- { "060875.com", true },
- { "06091994.xyz", true },
- { "060s.com", true },
- { "06365t.com", true },
- { "065679.com", true },
- { "065706.com", true },
- { "065790.com", true },
- { "065970.com", true },
- { "065976.com", true },
- { "065l.com", true },
- { "066570.com", true },
- { "066579.com", true },
- { "066590.com", true },
- { "0666z6.com", true },
- { "066705.com", true },
- { "066709.com", true },
- { "066790.com", true },
- { "066816.com", true },
- { "066kb.com", true },
- { "067310.com", true },
- { "067313.com", true },
- { "067360.com", true },
- { "067361.com", true },
- { "06804.com", true },
- { "068697.com", true },
- { "068756.com", true },
- { "068957.com", true },
- { "068kb.com", true },
- { "06918.net", true },
- { "0691ks.com", true },
- { "06lc.net", true },
- { "06se.com", true },
- { "070136.com", true },
- { "070167.com", true },
- { "070183.com", true },
- { "0708p.com", true },
- { "070968.com", true },
- { "070986.com", true },
- { "0711z6.com", true },
- { "0712z6.com", true },
- { "0713z6.com", true },
- { "0715z6.com", true },
- { "0716z6.com", true },
- { "0718z6.com", true },
- { "0719z6.com", true },
- { "071k8.com", true },
- { "0720p.com", true },
- { "0722z6.com", true },
- { "0724ks.com", true },
- { "0728z6.com", true },
- { "0732ks.com", true },
- { "07365t.com", true },
- { "075k8.com", true },
- { "0760ks.com", true },
- { "0763ks.com", true },
- { "0766ks.com", true },
- { "076k8.com", true },
- { "0772z6.com", true },
- { "0773z6.com", true },
- { "0775z6.com", true },
- { "0776z6.com", true },
- { "077768.net", true },
- { "0777z6.com", true },
- { "077810.com", true },
- { "077863.com", true },
- { "077969.com", true },
- { "0779z6.com", true },
- { "077k8.com", true },
- { "078kb.com", true },
- { "0792112.com", true },
- { "0798rcw.com", true },
- { "07am8.com", true },
- { "07d88.com", true },
- { "081115.com", true },
- { "081752.com", true },
- { "081763.com", true },
- { "081769.com", true },
- { "081783.com", true },
- { "081925.com", true },
- { "081927.com", true },
- { "081957.com", true },
- { "081967.com", true },
- { "082157.com", true },
- { "082159.com", true },
- { "082167.com", true },
- { "082173.com", true },
- { "082175.com", true },
- { "082179.com", true },
- { "082187.com", true },
- { "082192.com", true },
- { "082193.com", true },
- { "082195.com", true },
- { "082359.com", true },
- { "08365t.com", true },
- { "083832.com", true },
- { "083903.com", true },
- { "083905.com", true },
- { "083907.com", true },
- { "083912.com", true },
- { "083957.com", true },
- { "083960.com", true },
- { "083962.com", true },
- { "083965.com", true },
- { "083967.com", true },
- { "085851.com", true },
- { "085905.com", true },
- { "085950.com", true },
- { "087010.com", true },
- { "087065.com", true },
- { "0871z6.com", true },
- { "0872z6.com", true },
- { "0873z6.com", true },
- { "087540.com", true },
- { "087569.com", true },
- { "087580.com", true },
- { "0875z6.com", true },
- { "0876z6.com", true },
- { "0877z6.com", true },
- { "08845.cc", true },
- { "0888z6.com", true },
- { "08918.net", true },
- { "089k8.com", true },
- { "08lc.net", true },
- { "09000113.nl", true },
- { "091k8.com", true },
- { "092k8.com", true },
- { "09365t.com", true },
- { "093k8.com", true },
- { "095598.cc", true },
- { "09892.net", true },
- { "098k8.com", true },
- { "0996z6.com", true },
- { "0998z6.com", true },
- { "0999z6.com", true },
- { "09am8.com", true },
- { "09btt.com", true },
- { "09d88.com", true },
- { "0au.de", true },
- { "0c3.de", true },
- { "0chan.pl", true },
- { "0chanru.net", true },
- { "0cp8778.com", true },
- { "0day.agency", true },
- { "0des.com", true },
- { "0ii0.cf", true },
- { "0ik.de", true },
- { "0iz.net", true },
- { "0knowledge.de", false },
- { "0kun.net", true },
- { "0lc8.com", true },
- { "0lc8.net", true },
- { "0paste.com", true },
- { "0q0.eu", true },
- { "0verl0rd.ir", true },
- { "0vo.moe", true },
- { "0wx.cat", true },
- { "0wx.es", true },
- { "0wx.eu", true },
- { "0wx.org", true },
- { "0x.sk", true },
- { "0x0.li", true },
- { "0x00c.de", true },
- { "0x00ff00ff.com", true },
- { "0x15.ca", true },
- { "0x17.de", true },
- { "0x378.net", true },
- { "0x3bb.net", true },
- { "0x41.us", true },
- { "0x52.net", true },
- { "0x7.io", true },
- { "0x7d.com", true },
- { "0x7fffffff.net", true },
- { "0x90.io", true },
- { "0xabe.io", true },
- { "0xaf.tk", true },
- { "0xda.de", true },
- { "0xdc.io", false },
- { "0xdefaced.de", true },
- { "0xfc.de", true },
- { "0xff.se", true },
- { "0xn.de", true },
- { "1-2-3bounce.co.uk", true },
- { "100-downloads.com", true },
- { "10000v.ru", true },
- { "1000minds.com", true },
- { "1000wordsevents.com", true },
- { "1001kartini.com", true },
- { "1001kerstpakketten.com", false },
- { "1004233.com", true },
- { "1007337.com", true },
- { "10086.ru", true },
- { "100k.eu", true },
- { "100kredite.de", true },
- { "100lat.pl", true },
- { "100mani.it", true },
- { "100pounds.co.uk", true },
- { "100up.de", true },
- { "100up.org", true },
- { "100visits.tk", true },
- { "101.qa", true },
- { "101010.pl", true },
- { "1011100.com", true },
- { "10160365.com", true },
- { "101sauna.kz", true },
- { "101sauna.ru", true },
- { "1041263497.rsc.cdn77.org", true },
- { "10430.net", true },
- { "10435.net", true },
- { "10436.net", true },
- { "10438.net", true },
- { "10439.net", true },
- { "10453.net", true },
- { "10495.net", true },
- { "106jamz.com", true },
- { "10774.net", true },
- { "107996.com", false },
- { "10840.net", true },
- { "1088.fun", true },
- { "1091.jp", true },
- { "109k8.com", true },
- { "10hz.de", true },
- { "10k.ag", true },
- { "10milliondollarpage.com", true },
- { "10og.de", true },
- { "10ppm.com", true },
- { "10x.to", true },
- { "10xnation.com", true },
- { "110110110.net", true },
- { "110k8.com", true },
- { "1111365t.com", true },
- { "1112z6.com", true },
- { "111321365.com", true },
- { "111365t.com", true },
- { "1113z6.com", true },
- { "1115z6.com", true },
- { "11168365.com", true },
- { "1116z6.com", true },
- { "1117035.com", true },
- { "1117z6.com", true },
- { "1119z6.com", true },
- { "111ttt.com", true },
- { "111z6.com", true },
- { "111zlong.com", true },
- { "1120340.com", true },
- { "112112112.net", true },
- { "1122z6.com", true },
- { "112app.nl", true },
- { "112hz.com", true },
- { "112it.ro", true },
- { "112z6.com", true },
- { "113113113.net", true },
- { "11321365.com", true },
- { "1133z6.com", true },
- { "11365t.com", true },
- { "113k8.com", true },
- { "113ks.com", true },
- { "113z6.com", true },
- { "114514ss.com", true },
- { "115lc.com", true },
- { "115z6.com", true },
- { "1166z6.com", true },
- { "116ks.com", true },
- { "116lc.com", true },
- { "116z6.com", true },
- { "1177z6.com", true },
- { "117lc.com", true },
- { "117z6.com", true },
- { "118118118.net", true },
- { "1188bet.vip", false },
- { "1188z6.com", true },
- { "118btt.com", true },
- { "118z6.com", true },
- { "1190america.tk", true },
- { "1199bet.vip", false },
- { "1199z6.com", true },
- { "119lc.com", true },
- { "119z6.com", true },
- { "11ag8.com", true },
- { "11lc8.com", true },
- { "11lc8.net", true },
- { "11loc.de", true },
- { "11thstreetcoffee.com", true },
- { "11urss.com", true },
- { "1212873467.rsc.cdn77.org", true },
- { "1212z6.com", true },
- { "1218641649.rsc.cdn77.org", true },
- { "1221z6.com", true },
- { "1222z6.com", true },
- { "122kb.com", true },
- { "123365t.com", true },
- { "1234365.vip", true },
- { "1234365a.com", true },
- { "1234365b.com", true },
- { "1234365c.com", true },
- { "1234365d.com", true },
- { "1234365e.com", true },
- { "1234365f.com", true },
- { "1234365g.com", true },
- { "1234365h.com", true },
- { "1234365i.com", true },
- { "1234365j.com", true },
- { "1234365k.com", true },
- { "1234365l.com", true },
- { "1234365m.com", true },
- { "1234365n.com", true },
- { "1234365o.com", true },
- { "1234365p.com", true },
- { "1234365q.com", true },
- { "1234365s.com", true },
- { "1234365t.com", true },
- { "1234365u.com", true },
- { "1234365v.com", true },
- { "1234365vip.com", true },
- { "1234365w.com", true },
- { "1234365x.com", true },
- { "1234365y.com", true },
- { "1234365z.com", true },
- { "12345678365.com", true },
- { "123456789365.com", true },
- { "1234888.com", true },
- { "1236.be", true },
- { "12365t.com", true },
- { "123666365.com", true },
- { "123apps.net", true },
- { "123bearing.co.uk", true },
- { "123bearing.com", true },
- { "123bearing.eu", true },
- { "123birthdaygreetings.com", true },
- { "123djdrop.com", true },
- { "123midterm.com", true },
- { "123opstalverzekeringen.nl", true },
- { "123roulement.be", true },
- { "123roulement.com", true },
- { "123seo.ml", true },
- { "123termpapers.com", true },
- { "123viajando.com", true },
- { "123writings.com", true },
- { "123z6.com", true },
- { "124133.com", true },
- { "124633.com", true },
- { "1248.ink", true },
- { "125m125.de", true },
- { "12ag8.com", true },
- { "12autoankauf-berlin.de", true },
- { "12l.nl", true },
- { "12thmanrising.com", true },
- { "12train.com", true },
- { "12vpn.net", true },
- { "12zw.com", true },
- { "130.ua", true },
- { "130ks.com", true },
- { "130ks.net", true },
- { "1313z6.com", true },
- { "131934.com", true },
- { "131954.com", true },
- { "131k66.ag", true },
- { "131ks.com", true },
- { "131ks.net", true },
- { "131z6.com", true },
- { "13214.cc", true },
- { "132301.com", true },
- { "132k66.ag", true },
- { "132ks.com", true },
- { "132kv.ch", true },
- { "132z6.com", true },
- { "133294.com", true },
- { "1333z6.com", true },
- { "133492.com", true },
- { "133769.xyz", true },
- { "133846.xyz", true },
- { "133ks.com", true },
- { "133ks.net", true },
- { "133z6.com", true },
- { "134ks.com", true },
- { "134ks.net", true },
- { "135374.com", true },
- { "135416.com", true },
- { "1359826938.rsc.cdn77.org", true },
- { "135ks.com", true },
- { "135z6.com", true },
- { "136814.com", true },
- { "136824.com", true },
- { "136k66.ag", true },
- { "136k66.com", true },
- { "136ks.com", true },
- { "136z6.com", true },
- { "137724.com", true },
- { "137k66.ag", true },
- { "137k66.com", true },
- { "137kb.com", true },
- { "137z6.com", true },
- { "138k66.ag", true },
- { "138z6.com", true },
- { "1391kj.com", true },
- { "1395kj.com", true },
- { "139k66.ag", true },
- { "139z6.com", true },
- { "13ag8.com", true },
- { "141145.com", true },
- { "143533.com", true },
- { "143633.com", true },
- { "143733.com", true },
- { "143933.com", true },
- { "1453914078.rsc.cdn77.org", true },
- { "145433.com", true },
- { "145733.com", true },
- { "145ks.net", true },
- { "146233.com", true },
- { "146433.com", true },
- { "1464424382.rsc.cdn77.org", true },
- { "146533.com", true },
- { "146733.com", true },
- { "1481481.com", true },
- { "1481481.net", true },
- { "1481482.com", true },
- { "1481482.net", true },
- { "1481483.com", true },
- { "1481483.net", true },
- { "1481485.com", true },
- { "1481485.net", true },
- { "1481486.com", true },
- { "149433.com", true },
- { "149733.com", true },
- { "14erc.com", true },
- { "14ercooper.com", true },
- { "14it.de", true },
- { "14x3.de", true },
- { "15-10.com", true },
- { "1511774230.rsc.cdn77.org", true },
- { "151k66.ag", true },
- { "151k66.com", true },
- { "151ks.net", true },
- { "151z6.com", true },
- { "152433.com", true },
- { "152k66.ag", true },
- { "152k66.com", true },
- { "152z6.com", true },
- { "153ks.net", true },
- { "153z.com", false },
- { "153z6.com", true },
- { "154233.com", true },
- { "154633.com", true },
- { "154933.com", true },
- { "155175.com", true },
- { "155k66.ag", true },
- { "155k66.com", true },
- { "155ks.com", true },
- { "155ks.net", true },
- { "155z6.com", true },
- { "156433.com", true },
- { "156k66.com", true },
- { "156ks.net", true },
- { "156z6.com", true },
- { "157k66.com", true },
- { "157ks.com", true },
- { "157ks.net", true },
- { "157z6.com", true },
- { "158k66.ag", true },
- { "158k66.com", true },
- { "158ks.net", true },
- { "158z6.com", true },
- { "1590284872.rsc.cdn77.org", true },
- { "15918.net", true },
- { "159cp.com", true },
- { "159k66.ag", true },
- { "159k66.com", true },
- { "159ks.net", true },
- { "159z6.com", true },
- { "16-qw.tk", true },
- { "1600esplanade.com", true },
- { "16036510.com", true },
- { "16036520.com", true },
- { "16036530.com", true },
- { "16036540.com", true },
- { "16036550.com", true },
- { "16036560.com", true },
- { "16036570.com", true },
- { "16036580.com", true },
- { "16036590.com", true },
- { "160763.com", true },
- { "160887.com", true },
- { "161233.com", true },
- { "162223.com", true },
- { "162229.com", true },
- { "162231.com", true },
- { "162263.com", true },
- { "162jonesrd.ca", true },
- { "163132.com", true },
- { "1644091933.rsc.cdn77.org", true },
- { "1661237.com", true },
- { "1661618.com", true },
- { "1666ks.com", true },
- { "166jk.cc", true },
- { "166ks.net", true },
- { "16836500.com", true },
- { "1683651.com", true },
- { "16836511.com", true },
- { "1683652.com", true },
- { "16836522.com", true },
- { "1683653.com", true },
- { "16836533.com", true },
- { "1683654.com", true },
- { "16836544.com", true },
- { "1683655.com", true },
- { "16836555.com", true },
- { "16836577.com", true },
- { "16836588.com", true },
- { "1683659.com", true },
- { "16836599.com", true },
- { "168365t.com", true },
- { "168bo9.com", true },
- { "168bo9.net", true },
- { "168btt.com", true },
- { "168btt.net", true },
- { "168fff.cc", true },
- { "168z6.com", true },
- { "1698k.com", true },
- { "16ag6.com", true },
- { "16packets.com", true },
- { "16z6.com", true },
- { "16z66.com", true },
- { "170376.com", true },
- { "170386.com", true },
- { "170686.com", true },
- { "170ks.com", true },
- { "171083.com", true },
- { "171ks.com", true },
- { "1720302.com", true },
- { "1720312.com", true },
- { "173940.com", false },
- { "1750studios.com", false },
- { "175k8.com", true },
- { "175ks.com", true },
- { "1768calc.com.au", true },
- { "176f88.com", true },
- { "176ks.net", true },
- { "177603.com", true },
- { "177ks.net", true },
- { "178kb.com", true },
- { "178ks.net", true },
- { "17kpw.cc", true },
- { "17kpw.com", true },
- { "17xile.com", true },
- { "17xrk.com", true },
- { "180btt.com", true },
- { "180k8.com", true },
- { "180ks.net", true },
- { "1811559.com", true },
- { "181k8.com", true },
- { "181ks.net", true },
- { "181z6.com", true },
- { "182162.com", true },
- { "182k8.com", true },
- { "182ks.com", true },
- { "182ks.net", true },
- { "183k8.com", true },
- { "183z6.com", true },
- { "1844329061.rsc.cdn77.org", true },
- { "184kb.com", true },
- { "185k8.com", true },
- { "185ks.com", true },
- { "185z6.com", true },
- { "186ks.com", true },
- { "186z6.com", true },
- { "1876996.com", true },
- { "187z6.com", true },
- { "1888lc.com", true },
- { "188cn-sb.com", true },
- { "188kb.com", true },
- { "188z6.com", true },
- { "189z6.com", true },
- { "18f.gov", true },
- { "18f.gsa.gov", false },
- { "191090.com", true },
- { "1911trust.com", true },
- { "192433.com", true },
- { "192ks.com", true },
- { "1939365.com", true },
- { "1941-45.ru", true },
- { "1972969867.rsc.cdn77.org", true },
- { "197k8.com", true },
- { "1981612088.rsc.cdn77.org", true },
- { "1994.io", true },
- { "19990bb.com", true },
- { "19990cc.com", true },
- { "19990d.com", true },
- { "19990dd.com", true },
- { "19990ee.com", true },
- { "19990ff.com", true },
- { "19990gg.com", true },
- { "19990ii.com", true },
- { "19990jj.com", true },
- { "19990k.com", true },
- { "19990nn.com", true },
- { "19990q.com", true },
- { "19990r.com", true },
- { "19990tt.com", true },
- { "19990uu.com", true },
- { "19990xx.com", true },
- { "19990zz.com", true },
- { "199ks.com", true },
- { "199ks.net", true },
- { "19btt.com", true },
- { "19hundert84.de", false },
- { "19qq.vip", true },
- { "1a-diamantscheiben.de", true },
- { "1a-werkstattgeraete.de", true },
- { "1ab-machinery.com", true },
- { "1ag777.com", true },
- { "1ag88.com", true },
- { "1android.de", true },
- { "1baks.tk", true },
- { "1bet86.com", true },
- { "1blazing.cf", true },
- { "1c-power.ru", true },
- { "1cedibet.com", true },
- { "1chan.pl", true },
- { "1codex.online", true },
- { "1cool.vip", true },
- { "1cover.co.nz", true },
- { "1cover.com.au", true },
- { "1cprosto.tk", true },
- { "1cswd.com", true },
- { "1datatec.com", true },
- { "1e9.nl", true },
- { "1eanda.com", true },
- { "1europlan.nl", true },
- { "1f123.net", true },
- { "1fach-digital.de", true },
- { "1fc0.org", true },
- { "1gp.us", true },
- { "1hc.be", true },
- { "1hourproofreading.com", true },
- { "1in9.net", true },
- { "1it.click", true },
- { "1js.de", false },
- { "1kando.com", false },
- { "1ki174.com", true },
- { "1kmi.co", true },
- { "1lc1.com", true },
- { "1lc8.com", true },
- { "1lc8.net", true },
- { "1ll.uk", true },
- { "1lord1faith.com", true },
- { "1m.duckdns.org", true },
- { "1malaysian.tk", true },
- { "1me.cz", true },
- { "1minutoomenos.com", true },
- { "1montre.fr", true },
- { "1morebounce.co.uk", true },
- { "1net.uk", true },
- { "1oaklasvegas.com", true },
- { "1of16.de", true },
- { "1on1on1.de", true },
- { "1on1on1.tv", true },
- { "1panorama.ru", true },
- { "1password.ca", true },
- { "1password.com", true },
- { "1password.eu", true },
- { "1pw.ca", true },
- { "1px.tv", true },
- { "1r.is", true },
- { "1rs.nl", true },
- { "1sand0s.nl", true },
- { "1se.co", true },
- { "1se2or3.com", true },
- { "1simplesolution.com", true },
- { "1st-bounce.co.uk", true },
- { "1st-community.de", true },
- { "1st2bounce.com", true },
- { "1stcarpetcleaning.co.uk", true },
- { "1stchoicelandscapingwa.com", true },
- { "1stclassbouncycastles.co.uk", true },
- { "1stforfun.co.uk", true },
- { "1stpeninsulabouncers.co.uk", true },
- { "1ticks.com", true },
- { "1voz.org", true },
- { "1vpns.com", true },
- { "1way.faith", true },
- { "1whw.co.uk", true },
- { "1wirelog.de", true },
- { "1wl.uk", true },
- { "1zombie.team", true },
- { "2.wtf", true },
- { "200.network", true },
- { "2000.is", true },
- { "2000meter.no", true },
- { "2001y.me", true },
- { "2002138.com", true },
- { "2012.ovh", true },
- { "2012review.tk", true },
- { "2013review.tk", true },
- { "2015review.tk", true },
- { "20160365.com", true },
- { "2018fifaworldcup.tk", true },
- { "2022class1.ga", true },
- { "202jj.com", true },
- { "204504byse.info", true },
- { "2083236893.com", true },
- { "208garfield.com", true },
- { "20at.com", true },
- { "20denier.com", true },
- { "210k8.com", true },
- { "2132-app.com", true },
- { "2132-vip.com", true },
- { "2132app.com", true },
- { "2132hb.com", true },
- { "2132hd.com", true },
- { "2132kf.com", true },
- { "2132vip.com", true },
- { "2138-vip.com", true },
- { "2138kf.com", true },
- { "2138vip.com", true },
- { "213k8.com", true },
- { "215dy.net", true },
- { "217778.com", true },
- { "218btt.com", true },
- { "21stnc.us", true },
- { "21x9.org", true },
- { "2206p.com", true },
- { "22168365.com", true },
- { "222138vip.com", true },
- { "2222365t.com", true },
- { "2222k8.com", true },
- { "2222k8.net", true },
- { "22245j.com", true },
- { "22256j.com", true },
- { "2227035.com", true },
- { "2227552.com", true },
- { "222k8.com", true },
- { "222k8.net", true },
- { "222tips.com", true },
- { "224918.com", true },
- { "225485.com", true },
- { "2255motion.com", true },
- { "2277bet.com", true },
- { "228668.com", true },
- { "22884.org", false },
- { "22884a.com", false },
- { "22884b.com", false },
- { "22884e.com", false },
- { "22884g.com", false },
- { "22884h.com", false },
- { "2288bet.vip", false },
- { "22918.net", true },
- { "22ag6.com", true },
- { "22delta.com", true },
- { "22i.co.uk", true },
- { "22lc8.com", true },
- { "22lc8.net", true },
- { "22txc.com", true },
- { "230beats.com", true },
- { "233.be", true },
- { "23333.link", true },
- { "2333blog.com", true },
- { "2333z6.com", true },
- { "23365t.com", true },
- { "233blog.com", true },
- { "233boy.com", true },
- { "233hub.com", true },
- { "233hub.net", true },
- { "233hub.org", true },
- { "233ss.net", true },
- { "233try.com", true },
- { "233v2.com", true },
- { "233vps.com", true },
- { "23436565.com", true },
- { "234567365.com", true },
- { "2345678365.com", true },
- { "23456789365.com", true },
- { "234666365.com", true },
- { "234lc.com", true },
- { "235551.com", true },
- { "235u.net", true },
- { "2378.com", true },
- { "238212.com", true },
- { "23lhb.com", true },
- { "24-7.jp", true },
- { "24.ie", true },
- { "245meadowvistaway.com", false },
- { "246060.ru", true },
- { "247medplan.com", true },
- { "247naijabuzz.com", true },
- { "24848168.com", true },
- { "24848188.com", true },
- { "2484822.com", true },
- { "2484833.com", true },
- { "2484855.com", true },
- { "24848588.com", true },
- { "24848678.com", true },
- { "24848918.com", true },
- { "24848a.vip", true },
- { "24848b.vip", true },
- { "24848c.vip", true },
- { "24848d.vip", true },
- { "24848e.vip", true },
- { "24848jj.com", true },
- { "24848kk.com", true },
- { "24848ll.com", true },
- { "24848mm.com", true },
- { "24848nn.com", true },
- { "24848oo.com", true },
- { "24848pp.com", true },
- { "24848qq.com", true },
- { "24848rr.com", true },
- { "24848ss.com", true },
- { "24848tt.com", true },
- { "24848uu.com", true },
- { "24848v.vip", true },
- { "24848vv.com", true },
- { "24848w.vip", true },
- { "24848ww.com", true },
- { "24848x.vip", true },
- { "24848xx.com", true },
- { "24848y.vip", true },
- { "24848yy.com", true },
- { "24848z.vip", true },
- { "24848zz.com", true },
- { "249722.com", true },
- { "24dian30.com", true },
- { "24gazette.ga", true },
- { "24hour-locksmithsanantonio.com", true },
- { "24hourcyclist.co.uk", true },
- { "24hourelectricalservices.co.uk", true },
- { "24hourlocksmithbaltimore.com", true },
- { "24hourlocksmithdallastx.com", true },
- { "24hourlocksmithdetroit.com", true },
- { "24hourlocksmithhoustontx.com", true },
- { "24hourlocksmithshouston.com", true },
- { "24hourlocksmithspring.com", true },
- { "24hoursanantoniolocksmiths.com", true },
- { "24hourscienceprojects.com", true },
- { "24ip.com", true },
- { "24ip.de", true },
- { "24ip.fr", true },
- { "24onlinereview.com", true },
- { "24seven.pk", true },
- { "24timeravis.dk", true },
- { "24zpravy.cz", true },
- { "2502.net", true },
- { "250708.com", true },
- { "2525admin.nl", true },
- { "2555z6.com", true },
- { "255k8.com", true },
- { "256pages.com", false },
- { "2586p.com", true },
- { "258877.com", true },
- { "25may.tk", true },
- { "25north.nl", true },
- { "25percent.me", true },
- { "25reinyan25.net", true },
- { "2600edinburgh.org", true },
- { "2600hq.com", true },
- { "260887.com", true },
- { "263.info", true },
- { "2666z6.com", true },
- { "266k66.com", true },
- { "266z6.com", true },
- { "267221.com", true },
- { "267661.com", true },
- { "26z6.com", true },
- { "27000.best", true },
- { "2718282.net", true },
- { "276112.com", true },
- { "276117.com", true },
- { "2777z6.com", true },
- { "277z6.com", true },
- { "28-industries.com", true },
- { "281116.com", true },
- { "281180.de", true },
- { "281ks.com", true },
- { "282ks.com", true },
- { "28365cn-365.com", true },
- { "285551.com", true },
- { "2858958.com", true },
- { "2888z6.com", true },
- { "288cn-563.com", true },
- { "288game.net", true },
- { "288k8.com", true },
- { "288kb.com", true },
- { "288ks.com", true },
- { "288z6.com", true },
- { "28peaks.com", true },
- { "28spots.net", true },
- { "291.com", true },
- { "291167.xyz", true },
- { "2912.nl", true },
- { "293921.com", true },
- { "2948.ca", true },
- { "2991236.com", true },
- { "2999z6.com", true },
- { "299ks.net", true },
- { "2au.ru", true },
- { "2bas.nl", true },
- { "2bcompany.ch", false },
- { "2bet86.com", true },
- { "2bis10.de", true },
- { "2blazing.cf", true },
- { "2c-b.com", true },
- { "2c-d.com", true },
- { "2c-e.com", true },
- { "2c-t-2.com", true },
- { "2c-t-7.com", true },
- { "2c-t-8.com", true },
- { "2cash.ru", true },
- { "2chan.eu", true },
- { "2chan.jp", true },
- { "2cv-fahrer.de", true },
- { "2evip.com", false },
- { "2fm.ie", true },
- { "2fraud.pro", true },
- { "2gen.com", true },
- { "2gether.fr", true },
- { "2h-nagoya.org", true },
- { "2habc.com", true },
- { "2heartsbookings.co.uk", true },
- { "2hypeenterprises.com", true },
- { "2isk.in", true },
- { "2jhb.com", true },
- { "2kgwf.fi", true },
- { "2krueger.de", true },
- { "2lc8.com", true },
- { "2lc8.net", true },
- { "2li.ch", true },
- { "2lovebirdsblog.com", true },
- { "2manydots.nl", true },
- { "2mb.solutions", true },
- { "2melo.fr", true },
- { "2monkeysandme.com", true },
- { "2nains.ch", true },
- { "2nerds1bit.com", true },
- { "2nics.net", true },
- { "2pay.fr", true },
- { "2programmers.net", true },
- { "2rsc.com", true },
- { "2rsc.net", true },
- { "2stv.net", false },
- { "2th.me", true },
- { "2travel8.world", true },
- { "2ulcceria.nl", true },
- { "2wheel.com", false },
- { "2y.fi", true },
- { "2y3x.com", true },
- { "3-dot-careapp1-146314.appspot.com", true },
- { "30019.com", true },
- { "3006789.com", false },
- { "3007337.com", true },
- { "300m.com", false },
- { "301.technology", true },
- { "301355.com", true },
- { "30160365.com", true },
- { "301ks.com", true },
- { "302422.com", true },
- { "303312.com", true },
- { "303422.com", true },
- { "30365.vip", true },
- { "30375511.com", true },
- { "30375544.com", true },
- { "30375566.com", true },
- { "3040519.com", true },
- { "304122.com", true },
- { "304322.com", true },
- { "304622.com", true },
- { "3056999.com", true },
- { "309422.com", true },
- { "30bet365.com", true },
- { "30hzcollective.com", true },
- { "310422.com", true },
- { "311186.com", true },
- { "311191.com", true },
- { "313422.com", true },
- { "314022.com", true },
- { "314122.com", true },
- { "314322.com", true },
- { "314522.com", true },
- { "314622.com", true },
- { "314633.com", true },
- { "314922.com", true },
- { "316433.com", true },
- { "319422.com", true },
- { "319xpj.com", false },
- { "31du.cn", true },
- { "31klabs.com", true },
- { "320281.net", true },
- { "321132.com", true },
- { "321live.nl", true },
- { "3222z6.com", true },
- { "324022.com", true },
- { "324122.com", true },
- { "324133.com", true },
- { "324522.com", true },
- { "324533.com", true },
- { "324922.com", true },
- { "325422.com", true },
- { "325552.com", true },
- { "326422.com", true },
- { "326433.com", true },
- { "329422.com", true },
- { "32bet365.com", true },
- { "32h.de", true },
- { "33138app.com", true },
- { "33138vip.com", true },
- { "33168365.com", true },
- { "3322z6.com", true },
- { "333321365.com", true },
- { "3333365t.com", true },
- { "333365t.com", true },
- { "3333k8.com", true },
- { "3333k8.net", true },
- { "3333ylc.cc", true },
- { "3333z6.com", true },
- { "33365t.com", true },
- { "3337035.com", true },
- { "3344981.com", true },
- { "3344982.com", true },
- { "3344983.com", true },
- { "3344985.com", true },
- { "3344986.com", true },
- { "3345.com", true },
- { "3358m.com", true },
- { "335a.cc", true },
- { "3366z6.com", true },
- { "3369p.com", true },
- { "338393.com", true },
- { "3389p.com", true },
- { "338sa.com", true },
- { "33am8.com", true },
- { "33btt.net", true },
- { "33jiasu.com", true },
- { "33kb88.com", true },
- { "33lc8.com", true },
- { "33lc8.net", true },
- { "33weishang.com", true },
- { "34-restaurant.co.uk", true },
- { "340422.com", true },
- { "340622.com", true },
- { "340922.com", true },
- { "341422.com", true },
- { "341433.com", true },
- { "341533.com", true },
- { "341633.com", true },
- { "341733.com", true },
- { "341922.com", true },
- { "342022.com", true },
- { "342033.com", true },
- { "342133.com", true },
- { "342633.com", true },
- { "342733.com", true },
- { "342922.com", true },
- { "342933.com", true },
- { "343022.com", true },
- { "343622.com", true },
- { "34365t.com", true },
- { "343722.com", true },
- { "343922.com", true },
- { "34536565.com", true },
- { "345678365.com", true },
- { "345lc.com", true },
- { "346022.com", true },
- { "346033.com", true },
- { "346122.com", true },
- { "346233.com", true },
- { "346322.com", true },
- { "346422.com", true },
- { "346522.com", true },
- { "346533.com", true },
- { "346722.com", true },
- { "346922.com", true },
- { "3473-wiki.de", true },
- { "348233.com", true },
- { "348433.com", true },
- { "348533.com", true },
- { "349022.com", true },
- { "349033.com", true },
- { "349233.com", true },
- { "349433.com", true },
- { "349533.com", true },
- { "350422.com", true },
- { "350533.com", true },
- { "35089y.com", true },
- { "35089y1.com", true },
- { "35089y2.com", true },
- { "351113.com", true },
- { "351365.com", true },
- { "3518k.com", true },
- { "354022.com", true },
- { "354233.com", true },
- { "354622.com", true },
- { "354633.com", true },
- { "354922.com", true },
- { "354933.com", true },
- { "355ks.com", true },
- { "356433.com", true },
- { "357maelai.co", true },
- { "360-staffing.com", true },
- { "360hosting.com.au", true },
- { "360live.fr", true },
- { "360rail.nl", true },
- { "360vrs.com", true },
- { "361116.com", true },
- { "361171.com", true },
- { "361173.com", true },
- { "361183.com", true },
- { "363331.com", true },
- { "365.asia", true },
- { "365.systems", true },
- { "36525.hk", true },
- { "36533c.com", true },
- { "36533d.com", true },
- { "36533e.com", true },
- { "36533f.com", true },
- { "36533g.com", true },
- { "36533h.com", true },
- { "36533i.com", true },
- { "36533j.com", true },
- { "36533k.com", true },
- { "36533l.com", true },
- { "36533m.com", true },
- { "36533n.com", true },
- { "36533o.com", true },
- { "36533p.com", true },
- { "36533q.com", true },
- { "36533r.com", true },
- { "36533s.com", true },
- { "36533t.com", true },
- { "36533u.com", true },
- { "36533v.com", true },
- { "3655053.com", true },
- { "36554ll.com", true },
- { "36554mm.com", true },
- { "365600dl.com", true },
- { "365654321.com", true },
- { "36565f.com", true },
- { "3657654321.com", true },
- { "36594a.com", true },
- { "36594b.com", true },
- { "36594c.com", true },
- { "3659801.com", false },
- { "365cn-288.com", true },
- { "365daysreview.com", true },
- { "365electricalvn.com", true },
- { "365iosapp.com", true },
- { "365propertybuyer.co.uk", false },
- { "365sb-cn.com", true },
- { "365skulls.com", true },
- { "365y0.com", true },
- { "365y00.com", true },
- { "365y1.com", true },
- { "365y11.com", true },
- { "365y2.com", true },
- { "365y22.com", true },
- { "365y3.com", true },
- { "365y33.com", true },
- { "365y5.com", true },
- { "365y55.com", true },
- { "365y6.com", true },
- { "365y66.com", true },
- { "365y7.com", true },
- { "365y77.com", true },
- { "365y9.com", true },
- { "365y99.com", true },
- { "365yapan.com", false },
- { "365ypw.com", false },
- { "365yuwen.com", true },
- { "365zg.com", true },
- { "366k66.com", true },
- { "366z6.com", true },
- { "367553.com", true },
- { "367556.com", true },
- { "36ag8.com", true },
- { "36bobines.com", true },
- { "370422.com", true },
- { "371422.com", true },
- { "371687.com", true },
- { "371cloud.com", false },
- { "3733366.xyz", true },
- { "373422.com", true },
- { "373816.com", true },
- { "374933.com", true },
- { "375422.com", true },
- { "375ks.com", true },
- { "376557.com", true },
- { "377625.com", true },
- { "377632.com", true },
- { "377813.com", true },
- { "377ks.com", true },
- { "378553.com", true },
- { "378901.com", true },
- { "378902.com", true },
- { "378ks.com", true },
- { "37987.com", false },
- { "37987d.com", false },
- { "37987e.com", false },
- { "37987f.com", false },
- { "37987g.com", false },
- { "37zk.com", true },
- { "37zw.com", true },
- { "380111333.com", true },
- { "380111444.com", true },
- { "380111666.com", true },
- { "380222000.com", true },
- { "380222222.com", true },
- { "380222444.com", true },
- { "380222555.com", true },
- { "380222666.com", true },
- { "380222777.com", true },
- { "380222888.com", true },
- { "380222999.com", true },
- { "3803300.com", true },
- { "380422.com", true },
- { "3806600.com", true },
- { "3807722.com", true },
- { "380805.com", true },
- { "3808833.com", true },
- { "3809955.com", true },
- { "381115.com", true },
- { "382225.com", true },
- { "387763.com", true },
- { "3886aa.com", true },
- { "388z6.com", true },
- { "38irkutsk.tk", true },
- { "390422.com", true },
- { "390933.com", true },
- { "391119.com", true },
- { "392422.com", true },
- { "393422.com", true },
- { "394022.com", true },
- { "394122.com", true },
- { "394322.com", true },
- { "394522.com", true },
- { "394622.com", true },
- { "394922.com", true },
- { "3957e.com", true },
- { "3957h.com", true },
- { "3957i.com", true },
- { "3957j.com", true },
- { "3957k.com", true },
- { "3957l.com", true },
- { "3957m.com", true },
- { "3957n.com", true },
- { "3957o.com", true },
- { "3957p.com", true },
- { "3957q.com", true },
- { "3957r.com", true },
- { "3957s.com", true },
- { "3957t.com", true },
- { "3957u.com", true },
- { "3957v.com", true },
- { "3957w.com", true },
- { "3957x.com", true },
- { "3957y.com", true },
- { "3957z.com", true },
- { "396301.com", true },
- { "396302.com", true },
- { "396303.com", true },
- { "396304.com", true },
- { "396305.com", true },
- { "3963bb.com", true },
- { "3963cc.com", true },
- { "3963dd.com", true },
- { "3963ee.com", true },
- { "3963ff.com", true },
- { "396422.com", true },
- { "398.info", true },
- { "398kb.com", true },
- { "399ks.com", true },
- { "399z6.com", true },
- { "39w66.com", true },
- { "3aandl.com", true },
- { "3aexpert.com.ua", true },
- { "3ags.de", true },
- { "3b.pm", true },
- { "3bet86.com", true },
- { "3bigking.com", true },
- { "3blazing.cf", true },
- { "3c-d.de", true },
- { "3cbalance.pl", true },
- { "3countiescastlehire.co.uk", true },
- { "3d-animator.net", true },
- { "3d-fotoservice.de", true },
- { "3d1t0r4.com", false },
- { "3danimation.tk", true },
- { "3dcollective.es", true },
- { "3de5.nl", true },
- { "3deeplearner.com", true },
- { "3dgep.com", true },
- { "3djuegos.com", true },
- { "3dmedium.de", true },
- { "3dmusiclab.nl", true },
- { "3dnovedades.com", true },
- { "3do3dont.com", true },
- { "3dprinterwiki.org", true },
- { "3dprintinggear.net", true },
- { "3dreactions.com", true },
- { "3dsupplies.be", true },
- { "3elife.vn", true },
- { "3gdh.vip", true },
- { "3haeuserprojekt.org", true },
- { "3haueserprojekt.org", true },
- { "3james.com", true },
- { "3k188.com", true },
- { "3k288.com", true },
- { "3k788.com", true },
- { "3k878.com", true },
- { "3k988.com", true },
- { "3lc8.com", true },
- { "3logic.ru", true },
- { "3mbo.de", true },
- { "3n5b.com", true },
- { "3niu1.com", true },
- { "3niu6.com", true },
- { "3niusurl.com", true },
- { "3niuurl.com", true },
- { "3pestki.org", true },
- { "3plusdesign.gr", true },
- { "3pm.tw", true },
- { "3prn.com", true },
- { "3queens.cz", true },
- { "3queens.io", true },
- { "3r.org.uk", true },
- { "3rsee.com", true },
- { "3s-datasolution.de", true },
- { "3s-datasolutions.de", true },
- { "3s-ddns.de", true },
- { "3s-dns.de", true },
- { "3s-hosting.de", true },
- { "3s-mail.de", true },
- { "3sdatasolution.de", true },
- { "3sdatasolutions.de", true },
- { "3sddns.de", true },
- { "3sdns.de", true },
- { "3shosting.de", true },
- { "3smail.de", true },
- { "3tribes.co.uk", true },
- { "3typen.tv", true },
- { "3v4l.org", true },
- { "3w-solutions.fr", true },
- { "3xbit.com.br", true },
- { "4-it.de", true },
- { "4000milestare.com", true },
- { "4000sf.com", true },
- { "400k8.com", true },
- { "40160365.com", true },
- { "4025c.com", false },
- { "4025d.com", false },
- { "4025f.com", false },
- { "4025g.com", false },
- { "4025h.com", false },
- { "4025i.com", false },
- { "4025j.com", false },
- { "4025k.com", false },
- { "4025l.com", false },
- { "4025n.com", false },
- { "4025p.com", false },
- { "4025q.com", false },
- { "4025s.com", false },
- { "4025t.com", false },
- { "4025u.com", false },
- { "4025v.com", false },
- { "4025w.com", false },
- { "4025x.com", false },
- { "4025y.com", false },
- { "403.ch", true },
- { "404notfound.com.br", true },
- { "40666888.com", false },
- { "406811.com", true },
- { "406833.com", true },
- { "4096b.com", true },
- { "40acts.org.uk", true },
- { "40percentpapermache.com", true },
- { "41199.com", true },
- { "411film.com", true },
- { "411movie.com", true },
- { "411quest.com", true },
- { "41studio.com", true },
- { "41where.com", true },
- { "42.tools", true },
- { "420.nerdpol.ovh", true },
- { "420java.com", true },
- { "420screen.com", true },
- { "420weedcenter.com", true },
- { "4233065.com", true },
- { "4233068.com", true },
- { "4233069.com", true },
- { "4233070.com", true },
- { "4251365.com", true },
- { "427138.com", true },
- { "428northampton.com", true },
- { "42l.fr", true },
- { "432666365.com", true },
- { "432web.net", true },
- { "4351365.com", true },
- { "437138.com", true },
- { "437844.com", true },
- { "439050.com", true },
- { "43klive.com", true },
- { "44-k.com", true },
- { "440887.com", true },
- { "44168365.com", true },
- { "441jj.com", false },
- { "441jz.com", true },
- { "442887.com", true },
- { "442jz.com", true },
- { "44365t.com", true },
- { "443887.com", true },
- { "443jz.com", true },
- { "4447035.com", true },
- { "4447552.com", true },
- { "444887.com", true },
- { "4455bet.vip", false },
- { "445887.com", true },
- { "451365.com", true },
- { "45365t.com", true },
- { "4551365.com", true },
- { "4562030.com", true },
- { "4562040.com", true },
- { "456365t.com", true },
- { "456666365.com", true },
- { "459022.com", true },
- { "45b.org", true },
- { "463855.com", true },
- { "4661049.com", true },
- { "46d88.com", true },
- { "4706666.com", true },
- { "4716666.com", true },
- { "4726666.com", true },
- { "4756666.com", true },
- { "4761.cc", true },
- { "4762.cc", true },
- { "4776070.com", true },
- { "4786666.com", true },
- { "47d88.com", true },
- { "48365365cn.com", true },
- { "48365cn-365.com", true },
- { "486138.com", true },
- { "487511.com", true },
- { "487522.com", true },
- { "487866.com", true },
- { "48d88.com", true },
- { "491mhz.net", true },
- { "492977.com", true },
- { "492y.com", true },
- { "497773.com", true },
- { "499ks.com", true },
- { "499ks.net", true },
- { "49dollaridahoregisteredagent.com", true },
- { "4best.tk", true },
- { "4bet86.com", true },
- { "4c-haircare.com", true },
- { "4cavaleiros.com.br", true },
- { "4dillusion.tk", true },
- { "4dpredict.com", true },
- { "4dropping.com", true },
- { "4everproxy.com", true },
- { "4evip.com", false },
- { "4eyes.ch", true },
- { "4fit.ro", true },
- { "4g-server.eu", false },
- { "4garage.com.br", true },
- { "4gnews.pt", true },
- { "4hmediaproductions.com", true },
- { "4host.ch", true },
- { "4investors.de", true },
- { "4kpi.eu", true },
- { "4lock.com.br", true },
- { "4mm.org", true },
- { "4monar.com", true },
- { "4obgyne.com", true },
- { "4pillarsit.com", true },
- { "4played.de", true },
- { "4played.vip", true },
- { "4plebs.moe", true },
- { "4project.co.il", true },
- { "4smart.cz", true },
- { "4th-ave-studio.com", true },
- { "4thdc.com", true },
- { "4u.services", false },
- { "4u2ore.net", true },
- { "4vector.com", true },
- { "4vf.de", true },
- { "4vio.com", true },
- { "4wrd.cc", true },
- { "4x.fi", true },
- { "4x4-27mc.nl", true },
- { "4x4.lk", true },
- { "4x4coatingen.nl", true },
- { "4xlabs.co", true },
- { "50.pe", true },
- { "500k8.com", true },
- { "500promokodov.ru", true },
- { "501117.com", true },
- { "50160365.com", true },
- { "5017801.com", false },
- { "5017802.com", false },
- { "5017803.com", false },
- { "5017804.com", false },
- { "5017805.com", false },
- { "502312.com", true },
- { "504122.com", true },
- { "504322.com", true },
- { "504622.com", true },
- { "504922.com", true },
- { "505343.com", false },
- { "5055990.com", false },
- { "506422.com", true },
- { "508kb.com", true },
- { "50milli.com", true },
- { "50north.de", true },
- { "50plusnet.nl", true },
- { "50ten40.com", true },
- { "5132app.com", true },
- { "5132hb.com", true },
- { "5132hd.com", true },
- { "5132vip.com", true },
- { "51365a.com", true },
- { "51365aa.com", true },
- { "51365b.com", true },
- { "51365bb.com", true },
- { "51365c.com", true },
- { "51365cc.com", true },
- { "51365d.com", true },
- { "51365dd.com", true },
- { "51365ee.com", true },
- { "513maximus.site", true },
- { "513x.cc", true },
- { "514122.com", true },
- { "514522.com", true },
- { "514922.com", true },
- { "515422.com", true },
- { "516422.com", true },
- { "516btt.com", true },
- { "516btt.net", true },
- { "516ks.com", true },
- { "518.com.tw", true },
- { "51877.net", true },
- { "5188900.com", true },
- { "518k8.com", true },
- { "519422.com", true },
- { "5197.com", true },
- { "51acg.eu.org", true },
- { "51cls.tw", true },
- { "51guaq.com", true },
- { "51tiaojiu.com", true },
- { "52002a.com", true },
- { "52002b.com", true },
- { "52002d.com", true },
- { "52002e.com", true },
- { "52002f.com", true },
- { "52002g.com", true },
- { "52002h.com", true },
- { "52002i.com", true },
- { "52002j.com", true },
- { "52002k.com", true },
- { "52002l.com", true },
- { "52002m.com", true },
- { "52002n.com", true },
- { "52002o.com", true },
- { "52002p.com", true },
- { "52002q.com", true },
- { "52002r.com", true },
- { "52002s.com", true },
- { "52002t.com", true },
- { "52002u.com", true },
- { "52002v.com", true },
- { "52002w.com", true },
- { "52002x.com", true },
- { "52002y.com", true },
- { "52051.com", true },
- { "52062a.com", true },
- { "52062b.com", true },
- { "52062c.com", true },
- { "52062g.com", true },
- { "52062h.com", true },
- { "52062n.com", true },
- { "52062o.com", true },
- { "52062q.com", true },
- { "52062s.com", true },
- { "52062v.com", true },
- { "52062w.com", true },
- { "52062x.com", true },
- { "52062y.com", true },
- { "52062z.com", true },
- { "5214889.com", true },
- { "524022.com", true },
- { "524622.com", true },
- { "524922.com", true },
- { "525.info", true },
- { "5287.com", true },
- { "529kb.com", true },
- { "52dashboard.com", true },
- { "52kb365.com", true },
- { "52ncp.net", true },
- { "52sykb.com", true },
- { "5310899.com", true },
- { "5310899.net", true },
- { "531422.com", true },
- { "532441.com", true },
- { "532445.com", true },
- { "534122.com", true },
- { "534622.com", true },
- { "534922.com", true },
- { "535kb.com", true },
- { "536422.com", true },
- { "5364b.com", true },
- { "5364c.com", true },
- { "5364d.com", true },
- { "5364jc.com", true },
- { "536kb.com", true },
- { "53ningen.com", true },
- { "540922.com", true },
- { "541022.com", true },
- { "5414app.com", true },
- { "5414hd.com", true },
- { "5414vip.com", true },
- { "541622.com", true },
- { "541651.com", true },
- { "541722.com", true },
- { "541922.com", true },
- { "5424app.com", true },
- { "5424hd.com", true },
- { "5424vip.com", true },
- { "5454app.com", true },
- { "5454hd.com", true },
- { "5454pk.com", true },
- { "545922.com", true },
- { "546802.com", true },
- { "54below.com", true },
- { "54lsj.cc", true },
- { "552z6.com", true },
- { "55365t.com", true },
- { "5539z.com", true },
- { "553z6.com", true },
- { "5557035.com", true },
- { "5557552.com", true },
- { "555btt.com", true },
- { "555kb.com", true },
- { "555w.org", true },
- { "555wfcp.com", true },
- { "556021.com", true },
- { "556777.cc", true },
- { "556z6.com", true },
- { "557z6.com", true },
- { "558btt.net", true },
- { "558z6.com", true },
- { "559z6.com", true },
- { "55d88.com", true },
- { "55ks.app", true },
- { "55lc8.com", true },
- { "56365t.com", true },
- { "565kb.com", true },
- { "5663.cc", true },
- { "5663.co", true },
- { "56695.com", true },
- { "566k66.com", true },
- { "566ks.com", true },
- { "566z6.com", true },
- { "56736565.com", true },
- { "567667.cc", true },
- { "572kb.com", true },
- { "575kb.com", true },
- { "5763.org", true },
- { "576422.com", true },
- { "577z6.com", true },
- { "5781.org", true },
- { "578637.com", true },
- { "5792.org", true },
- { "579422.com", true },
- { "5795111.com", true },
- { "579533.com", true },
- { "5795444.com", true },
- { "5795885.com", true },
- { "5795886.com", true },
- { "5795887.com", true },
- { "5796.org", true },
- { "5797.org", true },
- { "581kb.com", true },
- { "583422.com", true },
- { "585422.com", true },
- { "585kb.com", true },
- { "586422.com", true },
- { "5889k.com", true },
- { "588k8.com", true },
- { "588z6.com", true },
- { "58d88.com", true },
- { "58w66.com", true },
- { "58xiangka.com", true },
- { "591422.com", true },
- { "592227.com", true },
- { "592422.com", true },
- { "5930593.com", true },
- { "594022.com", true },
- { "594622.com", true },
- { "595422.com", true },
- { "595ks.com", true },
- { "596422.com", true },
- { "59759vip.com", true },
- { "59759z.com", true },
- { "5981168.com", true },
- { "5981655.com", true },
- { "5981668.com", true },
- { "5981669.com", true },
- { "5981677.com", true },
- { "5981688.com", true },
- { "5981699.com", true },
- { "5981800.com", true },
- { "5981811.com", true },
- { "5981822.com", true },
- { "5981833.com", true },
- { "5981855.com", true },
- { "5981866.com", true },
- { "5981877.com", true },
- { "5981899.com", true },
- { "5981918.com", true },
- { "5981s.com", true },
- { "5981t.com", true },
- { "5981v.com", true },
- { "5981w.com", true },
- { "598598598.net", true },
- { "59859h.vip", true },
- { "59859j.vip", true },
- { "59859k.vip", true },
- { "59859l.vip", true },
- { "59859y.vip", true },
- { "59859z.vip", true },
- { "598877.com", true },
- { "59937.com", true },
- { "5997891.com", true },
- { "599980.com", true },
- { "599ks.com", true },
- { "59rus.tk", true },
- { "5agks.com", true },
- { "5apps.com", true },
- { "5bet86.com", true },
- { "5c1fd0f31022cbc40af9f785847baaf9.space", true },
- { "5ccapitalinvestments.com", true },
- { "5chat.it", true },
- { "5dm.tv", true },
- { "5eki.jp", true },
- { "5francs.com", true },
- { "5gb.space", true },
- { "5goglobal.com", true },
- { "5i.gs", true },
- { "5ilg.com", true },
- { "5k66.ag", true },
- { "5kraceforals.com", true },
- { "5lc8.com", true },
- { "5lc8.net", true },
- { "5percentperweek.com", true },
- { "5stars.tv", true },
- { "5thchichesterscouts.org.uk", true },
- { "5y.fi", true },
- { "5yeb.com", true },
- { "6004233.com", true },
- { "60062b.cc", true },
- { "60062h.cc", true },
- { "60062i.cc", true },
- { "600k8.com", true },
- { "60160365.com", true },
- { "602422.com", true },
- { "602yb.com", true },
- { "603yb.com", true },
- { "604122.com", true },
- { "604322.com", true },
- { "604522.com", true },
- { "604622.com", true },
- { "605422.com", true },
- { "606422.com", true },
- { "606722.com", true },
- { "608885.com", true },
- { "608vets.com", true },
- { "609422.com", true },
- { "611121.com", true },
- { "611125.com", true },
- { "611135.com", true },
- { "611165.com", true },
- { "611195.com", true },
- { "6132-app.com", true },
- { "6132-hd.com", true },
- { "6132-vip.com", true },
- { "6132app.com", true },
- { "6132hb.com", true },
- { "6132hd.com", true },
- { "6132kf.com", true },
- { "6132pk.com", true },
- { "6132vip.com", true },
- { "614022.com", true },
- { "614322.com", true },
- { "614922.com", true },
- { "616578.com", true },
- { "616728.com", true },
- { "616758.com", true },
- { "616798.com", true },
- { "616f88.com", true },
- { "616xin.com", true },
- { "61730123.com", true },
- { "618btt.com", true },
- { "619kb.com", true },
- { "61ag8.com", true },
- { "61z6.com", true },
- { "620207.com", true },
- { "621422.com", true },
- { "621kb.com", true },
- { "622283.com", true },
- { "622812.com", true },
- { "622z6.com", true },
- { "62314.cc", true },
- { "623kb.com", true },
- { "624022.com", true },
- { "624122.com", true },
- { "624322.com", true },
- { "624522.com", true },
- { "624922.com", true },
- { "625kb.com", true },
- { "626422.com", true },
- { "630422.com", true },
- { "631422.com", true },
- { "633362.com", true },
- { "633663.cc", true },
- { "633663.net", true },
- { "633kb.com", true },
- { "633z6.com", true },
- { "634022.com", true },
- { "634322.com", true },
- { "634622.com", true },
- { "634922.com", true },
- { "635422.com", true },
- { "636422.com", true },
- { "639422.com", true },
- { "6396000.com", true },
- { "63960000.com", true },
- { "63961111.com", true },
- { "639611111.com", true },
- { "6396222.com", true },
- { "63962222.com", true },
- { "639622222.com", true },
- { "6396333.com", true },
- { "63963333.com", true },
- { "639633333.com", true },
- { "6396444.com", true },
- { "63964444.com", true },
- { "639644444.com", true },
- { "63965555.com", true },
- { "639655555.com", true },
- { "639666666.com", true },
- { "63967777.com", true },
- { "639677777.com", true },
- { "63968888.com", true },
- { "639688888.com", true },
- { "63969999.com", true },
- { "639699999.com", true },
- { "6396aaa.com", true },
- { "6396bbb.com", true },
- { "6396eee.com", true },
- { "6396ggg.com", true },
- { "6396iii.com", true },
- { "6396jjj.com", true },
- { "6396ooo.com", true },
- { "6396qqq.com", true },
- { "6396rrr.com", true },
- { "6396sss.com", true },
- { "6396ttt.com", true },
- { "6396vvv.com", true },
- { "6396www.com", true },
- { "6396xxx.com", true },
- { "6396zzz.com", true },
- { "63gaming.com", true },
- { "640622.com", true },
- { "640722.com", true },
- { "640922.com", true },
- { "641022.com", true },
- { "641322.com", true },
- { "641422.com", true },
- { "641522.com", true },
- { "641622.com", true },
- { "641722.com", true },
- { "641822.com", true },
- { "641922.com", true },
- { "642022.com", true },
- { "642322.com", true },
- { "642422.com", true },
- { "642722.com", true },
- { "642822.com", true },
- { "642922.com", true },
- { "643022.com", true },
- { "643122.com", true },
- { "643722.com", true },
- { "643922.com", true },
- { "645022.com", true },
- { "645122.com", true },
- { "645322.com", true },
- { "645722.com", true },
- { "645822.com", true },
- { "645922.com", true },
- { "646022.com", true },
- { "646322.com", true },
- { "646722.com", true },
- { "647630.xyz", true },
- { "649022.com", true },
- { "649622.com", true },
- { "649722.com", true },
- { "649822.com", true },
- { "64d88.com", true },
- { "64stacks.com", true },
- { "65131a.com", false },
- { "65131b.com", false },
- { "65131c.com", false },
- { "65131d.com", false },
- { "65131e.com", false },
- { "65131f.com", false },
- { "65131g.com", false },
- { "65131h.com", false },
- { "65131i.com", false },
- { "65131j.com", false },
- { "65131k.com", false },
- { "65131l.com", false },
- { "65131m.com", false },
- { "65131n.com", false },
- { "65131o.com", false },
- { "65131p.com", false },
- { "65131q.com", false },
- { "65131r.com", false },
- { "65131s.com", false },
- { "65131t.com", false },
- { "65131u.com", false },
- { "65131v.com", false },
- { "65131w.com", false },
- { "65131x.com", false },
- { "65131y.com", false },
- { "65131z.com", false },
- { "651422.com", true },
- { "652422.com", true },
- { "652kb.com", true },
- { "655591.com", true },
- { "6556a.com", true },
- { "6556b.com", true },
- { "6556c.com", true },
- { "6556d.com", true },
- { "6556f.com", true },
- { "6556g.com", true },
- { "6556h.com", true },
- { "6556j.com", true },
- { "6556k.com", true },
- { "6556m.com", true },
- { "6556x.com", true },
- { "6556z.com", true },
- { "655ks.com", true },
- { "655z6.com", true },
- { "659422.com", true },
- { "659ks.com", true },
- { "65d88.com", true },
- { "66.tn", true },
- { "661326.com", true },
- { "6616.fun", true },
- { "66168365.com", true },
- { "6618.fun", true },
- { "6619k.com", true },
- { "661z6.com", true },
- { "662607.xyz", true },
- { "662k66.com", true },
- { "662z6.com", true },
- { "663365666.com", true },
- { "663365777.com", true },
- { "663365888.com", true },
- { "663365a.vip", true },
- { "663365b.vip", true },
- { "663365c.vip", true },
- { "663365d.vip", true },
- { "663365e.vip", true },
- { "663365f.vip", true },
- { "663365g.vip", true },
- { "663365h.vip", true },
- { "663365i.com", true },
- { "663365i.vip", true },
- { "663365j.com", true },
- { "663365k.com", true },
- { "663365l.com", true },
- { "663365m.com", true },
- { "663365n.com", true },
- { "663365o.com", true },
- { "663365p.com", true },
- { "663365q.com", true },
- { "663365r.com", true },
- { "663365s.com", true },
- { "663365t.com", true },
- { "663365u.com", true },
- { "663365v.com", true },
- { "663365w.com", true },
- { "663365x.com", true },
- { "663365y.com", true },
- { "663365z.com", true },
- { "663z6.com", true },
- { "6652566.com", true },
- { "6658.fun", true },
- { "665z6.com", true },
- { "666111bet.com", true },
- { "66619991.com", true },
- { "666222bet.com", true },
- { "666333bet.com", true },
- { "666365app.com", true },
- { "666365ios.com", true },
- { "666365iosapp.com", true },
- { "666365t.com", true },
- { "666555bet.com", true },
- { "666668722.com", true },
- { "6667035.com", true },
- { "666888bet.com", true },
- { "66689j.com", true },
- { "6669255.com", false },
- { "666999bet.com", true },
- { "666am8.com", true },
- { "666k66.com", true },
- { "666k8.com", true },
- { "666k8.net", true },
- { "666omg.com", true },
- { "6677bet.vip", false },
- { "667z6.com", true },
- { "6685m.com", true },
- { "668825.vip", true },
- { "6689m.com", true },
- { "668am8.com", true },
- { "668k8.com", true },
- { "668k8.net", true },
- { "668ks.com", true },
- { "668z6.com", true },
- { "669z6.com", true },
- { "66ag9.com", true },
- { "66agks.com", true },
- { "66b.com", true },
- { "66d88.net", true },
- { "66k66.ag", true },
- { "66lc8.com", true },
- { "66lc8.net", true },
- { "670102.com", true },
- { "670422.com", true },
- { "670633.com", true },
- { "671422.com", true },
- { "672422.com", true },
- { "6729dns.com", false },
- { "6729dz.com", false },
- { "673422.com", true },
- { "676422.com", true },
- { "676812.com", true },
- { "677z6.com", true },
- { "67836565.com", true },
- { "678365t.com", true },
- { "67877777.com", false },
- { "678z6.com", true },
- { "679422.com", true },
- { "67y7.com", true },
- { "680422.com", true },
- { "6810app.com", true },
- { "6830521.com", true },
- { "6848.com", true },
- { "6863070.com", false },
- { "688libo.com", true },
- { "688z6.com", true },
- { "68hvip.com", true },
- { "690422.com", true },
- { "691422.com", true },
- { "692422.com", true },
- { "693422.com", true },
- { "694322.com", true },
- { "694622.com", true },
- { "694922.com", true },
- { "698kb.com", true },
- { "6997896.com", true },
- { "699z6.com", true },
- { "69butterfly.com", true },
- { "69fps.gg", true },
- { "69games.xxx", true },
- { "69ks.com", true },
- { "69wasted.net", true },
- { "6bet86.com", true },
- { "6dec.gc.ca", true },
- { "6k66.ag", true },
- { "6k662.ag", true },
- { "6k663.ag", true },
- { "6k666.ag", true },
- { "6k666.cc", true },
- { "6k669.ag", true },
- { "6lc8.com", true },
- { "6lc8.net", true },
- { "6lo.zgora.pl", true },
- { "6upagent.com", true },
- { "7.plus", true },
- { "700.az", true },
- { "7007337.com", true },
- { "700k8.com", true },
- { "701135.com", true },
- { "70160365.com", true },
- { "70365365.com", false },
- { "704233.com", true },
- { "7045.com", true },
- { "704533.com", true },
- { "7045h.com", true },
- { "704633.com", true },
- { "705994.com", true },
- { "70872.com", false },
- { "709129.com", true },
- { "70d88.com", true },
- { "712433.com", true },
- { "712kb.com", true },
- { "713367.com", true },
- { "713387.com", true },
- { "713433.com", true },
- { "71365365.com", false },
- { "714133.com", true },
- { "714533.com", true },
- { "714633.com", true },
- { "715433.com", true },
- { "716176.com", true },
- { "716227.com", true },
- { "716331.com", true },
- { "718113.com", true },
- { "718227.com", true },
- { "718337.com", true },
- { "718433.com", true },
- { "718552.com", true },
- { "718772.com", true },
- { "719433.com", true },
- { "721167.com", true },
- { "721172.com", true },
- { "7214.cc", true },
- { "722201.com", true },
- { "722z6.com", true },
- { "724233.com", true },
- { "726127.com", true },
- { "726162.com", true },
- { "726176.com", true },
- { "726217.com", true },
- { "726221.com", true },
- { "726433.com", true },
- { "728433.com", true },
- { "729433.com", true },
- { "72hours2sold.com", true },
- { "730433.com", true },
- { "731433.com", true },
- { "731716.com", true },
- { "732433.com", true },
- { "73365365.com", false },
- { "7337006.com", true },
- { "7337007.com", true },
- { "7337app.com", true },
- { "7337dh.com", true },
- { "7337dz.com", true },
- { "733z6.com", true },
- { "735433.com", true },
- { "736371.com", true },
- { "736381.com", true },
- { "736433.com", true },
- { "738433.com", true },
- { "739433.com", true },
- { "740833.com", true },
- { "741833.com", true },
- { "742833.com", true },
- { "743833.com", true },
- { "74d88.com", true },
- { "7552001.com", true },
- { "7552002.com", true },
- { "7552005.com", true },
- { "7552006.com", true },
- { "7552008.com", true },
- { "7552009.com", true },
- { "7552010.com", true },
- { "7552011.com", true },
- { "7552012.com", true },
- { "7552013.com", true },
- { "755a.cc", true },
- { "755z6.com", true },
- { "756337.com", true },
- { "75d88.com", true },
- { "762.ch", false },
- { "762116.com", true },
- { "763137.com", true },
- { "76365365.com", false },
- { "7654321c.com", false },
- { "765666365.com", true },
- { "76668.com", true },
- { "7666898.com", true },
- { "76669.com", true },
- { "76678.com", true },
- { "766k66.com", true },
- { "767kb.com", true },
- { "76956.com", true },
- { "769k.com", true },
- { "76z66.com", true },
- { "77018aa.com", false },
- { "77018bb.com", false },
- { "77018cc.com", false },
- { "77018dd.com", false },
- { "77018vip.com", false },
- { "77168365.com", true },
- { "77177.de", true },
- { "772z6.com", true },
- { "773z6.com", true },
- { "7748229.xyz", true },
- { "775018.com", true },
- { "775z6.com", true },
- { "776z6.com", true },
- { "777234567.com", false },
- { "777365t.com", true },
- { "7776365.com", true },
- { "7777k8.com", true },
- { "777coin.com", true },
- { "778z6.com", true },
- { "779z6.com", true },
- { "77lc8.com", true },
- { "77zxdy.com", true },
- { "781671.com", true },
- { "781683.com", true },
- { "783631.com", true },
- { "78365app.com", false },
- { "78365b.com", false },
- { "78365bb.com", false },
- { "78365c.com", false },
- { "78365cc.com", false },
- { "78365dd.com", false },
- { "78365ee.com", false },
- { "783lab.com", true },
- { "787637.com", true },
- { "7878365.com", false },
- { "787kb.com", true },
- { "7885765.com", true },
- { "7888813.com", true },
- { "7888815.com", true },
- { "7888821.com", true },
- { "7891553.com", true },
- { "7891997.com", true },
- { "7893.net", true },
- { "78936565.com", true },
- { "789365t.com", true },
- { "7894.net", true },
- { "789451.com", false },
- { "790security.co.za", true },
- { "793ww.com", true },
- { "797715.com", true },
- { "799ks.com", true },
- { "799z6.com", true },
- { "7bet86.com", true },
- { "7careconnect.com", true },
- { "7delights.com", true },
- { "7delights.in", true },
- { "7g31.com", true },
- { "7geese.com", true },
- { "7graus.pt", true },
- { "7k66.ag", true },
- { "7k66.vip", true },
- { "7kicks.com", true },
- { "7l00p.com", true },
- { "7lb.de", true },
- { "7lc8.com", true },
- { "7milesglobal.com", true },
- { "7minutemiles.com", true },
- { "7pets.net", true },
- { "7plus.com.au", true },
- { "7proxies.com", true },
- { "7sdre.am", true },
- { "7th-heaven.me", true },
- { "7thcircledesigns.com", true },
- { "7win.am", true },
- { "8007337.com", true },
- { "8008d88.com", true },
- { "8012d88.com", true },
- { "8015d88.com", true },
- { "80160365.com", true },
- { "8028d.com", true },
- { "8029d.com", true },
- { "803001.com", true },
- { "80365365.com", false },
- { "804322.com", true },
- { "80630.com", true },
- { "80651a.com", true },
- { "80651c.com", true },
- { "8065d.com", true },
- { "806kb.com", true },
- { "8078d.com", true },
- { "8080883.com", true },
- { "80887.cc", true },
- { "809088.cc", true },
- { "809422.com", true },
- { "80993.net", true },
- { "809kb.com", true },
- { "80bin.com", true },
- { "8102d88.com", true },
- { "811121.com", true },
- { "811z6.com", true },
- { "812221.com", true },
- { "8128d.com", true },
- { "8129d.com", true },
- { "8130d88.com", true },
- { "81365365.com", false },
- { "814022.com", true },
- { "8153d.com", true },
- { "8156d.com", true },
- { "816jz.com", true },
- { "8170d.com", true },
- { "8173d.com", true },
- { "81818app.com", true },
- { "81818b.com", true },
- { "81818c.com", true },
- { "81818e.com", true },
- { "81818f.com", true },
- { "81818g.com", true },
- { "81818h.com", true },
- { "81818i.com", true },
- { "81818j.com", true },
- { "81818k.com", true },
- { "81818l.com", true },
- { "81818n.com", true },
- { "81818o.com", true },
- { "81818p.com", true },
- { "81818q.com", true },
- { "81818r.com", true },
- { "81818s.com", true },
- { "81818u.com", true },
- { "81818w.com", true },
- { "81818x.com", true },
- { "81818y.com", true },
- { "8186d.com", true },
- { "8187d.com", true },
- { "8189196.com", true },
- { "8189d.com", true },
- { "818z6.com", true },
- { "8190d.com", true },
- { "819kb.com", true },
- { "81d88.com", true },
- { "8202d.com", true },
- { "8206d.com", true },
- { "8207d88.com", true },
- { "8208d.com", true },
- { "8211p.com", true },
- { "8213p.com", true },
- { "8214p.com", true },
- { "8215p.com", true },
- { "8216p.com", true },
- { "8225.com", true },
- { "8226d.com", true },
- { "8227d88.com", true },
- { "8228d88.com", true },
- { "822z6.com", true },
- { "8230d88.com", true },
- { "8238d.com", true },
- { "8239d.com", true },
- { "827774.com", true },
- { "82781111.com", true },
- { "82783333.com", true },
- { "82784444.com", true },
- { "82785555.com", true },
- { "82786666.com", true },
- { "82789999.com", true },
- { "8278a.com", true },
- { "8278a.net", true },
- { "8278aaa.com", true },
- { "8278b.com", true },
- { "8278b.net", true },
- { "8278bb.com", true },
- { "8278bbb.com", true },
- { "8278c.net", true },
- { "8278ccc.com", true },
- { "8278d.com", true },
- { "8278d.net", true },
- { "8278ddd.com", true },
- { "8278e.net", true },
- { "8278ee.com", true },
- { "8278f.net", true },
- { "8278ff.com", true },
- { "8278fff.com", true },
- { "8278g.com", true },
- { "8278g.net", true },
- { "8278gg.com", true },
- { "8278ggg.com", true },
- { "8278h.net", true },
- { "8278hh.com", true },
- { "8278hhh.com", true },
- { "8278i.net", true },
- { "8278ii.com", true },
- { "8278iii.com", true },
- { "8278j.net", true },
- { "8278jj.com", true },
- { "8278k.com", true },
- { "8278kk.com", true },
- { "8278l.com", true },
- { "8278ll.com", true },
- { "8278m.com", true },
- { "8278mm.com", true },
- { "8278nn.com", true },
- { "8278oo.com", true },
- { "8278pp.com", true },
- { "8278qq.com", true },
- { "8278rr.com", true },
- { "8278ss.com", true },
- { "8278tt.com", true },
- { "8278w.com", true },
- { "8278ww.com", true },
- { "8278y.com", true },
- { "8278yy.com", true },
- { "82ag88.com", true },
- { "833792.com", true },
- { "833z6.com", true },
- { "8371p.com", true },
- { "8373p.com", true },
- { "8376p.com", true },
- { "8378p.com", true },
- { "8387p.com", true },
- { "8396p.com", true },
- { "842844.com", true },
- { "847773.com", true },
- { "8522club.com", true },
- { "8522ph.com", true },
- { "8522tw.com", true },
- { "8522usa.com", true },
- { "856kb.com", true },
- { "8602012.com", true },
- { "8602013.com", true },
- { "8602014.com", true },
- { "8602015.com", true },
- { "8602016.com", true },
- { "8602017.com", true },
- { "8602018.com", true },
- { "8602019.com", true },
- { "8602020.com", true },
- { "8602021.com", true },
- { "86086011.com", true },
- { "86086022.com", true },
- { "86086033.com", true },
- { "86086044.com", true },
- { "86086055.com", true },
- { "86086066.com", true },
- { "86086077.com", true },
- { "86086099.com", true },
- { "861365.com", true },
- { "861365.vip", true },
- { "861365a.com", true },
- { "861365b.com", true },
- { "861365c.com", true },
- { "861365d.com", true },
- { "861365e.com", true },
- { "861365f.com", true },
- { "861365g.com", true },
- { "861365h.com", true },
- { "861365i.com", true },
- { "861365j.com", true },
- { "861365k.com", true },
- { "861365l.com", true },
- { "861365m.com", true },
- { "861365n.com", true },
- { "861365o.com", true },
- { "861365q.com", true },
- { "861365r.com", true },
- { "861365s.com", true },
- { "861365t.com", true },
- { "861365u.com", true },
- { "861365v.com", true },
- { "861365vip.com", true },
- { "861365w.com", true },
- { "861365x.com", true },
- { "861365y.com", true },
- { "861365z.com", true },
- { "861kb.com", true },
- { "86286286.com", true },
- { "86499.com", true },
- { "866300.vip", true },
- { "866305.vip", true },
- { "866308.vip", true },
- { "866k66.com", true },
- { "866z6.com", true },
- { "868z6.com", true },
- { "869kb.com", true },
- { "86btt.com", true },
- { "86metro.ru", true },
- { "86z66.com", true },
- { "8722am.com", true },
- { "8722cn.com", true },
- { "8722hk.com", true },
- { "8722ph.com", true },
- { "8722tw.com", true },
- { "8722usa.com", true },
- { "87365365.com", false },
- { "877027.com", true },
- { "877791.com", true },
- { "877z6.com", true },
- { "878365aa.com", false },
- { "878365app.com", false },
- { "878365b.com", false },
- { "878365bb.com", false },
- { "878365c.com", false },
- { "878365cc.com", false },
- { "878365cn.com", true },
- { "878365d.com", false },
- { "878365dd.com", false },
- { "878365ee.com", false },
- { "878365ii.com", false },
- { "878365jj.com", false },
- { "878365ll.com", false },
- { "878365mm.com", false },
- { "878365nn.com", false },
- { "878989.com", true },
- { "87ag9.com", true },
- { "88-line.com", true },
- { "88-line.net", true },
- { "8800ks.com", true },
- { "8801ks.com", true },
- { "8802ks.com", true },
- { "8802p.com", true },
- { "8806d.com", true },
- { "8809ks.com", true },
- { "881-line.com", true },
- { "881-line.net", true },
- { "8812ks.com", true },
- { "8815d.com", true },
- { "88168365.com", true },
- { "8816d.com", true },
- { "8818ks.com", true },
- { "8819ks.com", true },
- { "881z6.com", true },
- { "8826d.com", true },
- { "8828ks.com", true },
- { "882kb.com", true },
- { "882z6.com", true },
- { "8830ks.com", true },
- { "88365.net", true },
- { "88365t.com", true },
- { "8839ks.com", true },
- { "883z6.com", true },
- { "8850d88.com", true },
- { "88522am.com", true },
- { "885287.com", true },
- { "8858ks.com", true },
- { "8859ks.com", true },
- { "885kb.com", true },
- { "885z6.com", true },
- { "8860d.com", true },
- { "8861ks.com", true },
- { "8862d.com", true },
- { "8868ks.com", true },
- { "8869ks.com", true },
- { "886k66.com", true },
- { "886k8.com", true },
- { "886k8.net", true },
- { "886z6.com", true },
- { "887.ag", true },
- { "8871d.com", true },
- { "8872d.com", true },
- { "88740a.com", true },
- { "88740b.com", true },
- { "88740g.com", true },
- { "8875d.com", true },
- { "8876d.com", true },
- { "8879d.com", true },
- { "887k66.com", true },
- { "887z6.com", true },
- { "8881234j.com", true },
- { "888234j.com", true },
- { "8882ks.com", true },
- { "8883456j.com", true },
- { "888345j.com", true },
- { "8884567j.com", true },
- { "888456j.com", true },
- { "88851333.com", true },
- { "888567j.com", true },
- { "8885ks.com", true },
- { "8886789j.com", true },
- { "8886ks.com", true },
- { "8888209.com", true },
- { "888888722.com", true },
- { "88889822.com", true },
- { "8888esb.com", true },
- { "8888yule8888.com", true },
- { "888am8.com", true },
- { "888am8.net", true },
- { "888funcity.com", true },
- { "888funcity.net", true },
- { "888k66.com", true },
- { "8890d.com", true },
- { "8890ks.com", true },
- { "8891d.com", true },
- { "8891ks.com", true },
- { "8892d.com", true },
- { "8892ks.com", true },
- { "8895d.com", true },
- { "8895ks.com", true },
- { "8897d.com", true },
- { "889vip2.com", true },
- { "889vip3.com", true },
- { "889vip4.com", true },
- { "889vip5.com", true },
- { "889w889.com", true },
- { "889w889.net", true },
- { "889z6.com", true },
- { "88btt.net", true },
- { "88djl.cc", true },
- { "88home9.com", true },
- { "88kash.com", true },
- { "88kb88.com", true },
- { "88lc8.net", true },
- { "88lc88.com", true },
- { "88lc88.net", true },
- { "88lecheng.com", true },
- { "88wewin.com", true },
- { "88yule11.com", true },
- { "88yule112.com", true },
- { "88yule113.com", true },
- { "88yule12.com", true },
- { "88yule13.com", true },
- { "88yule15.com", true },
- { "88yule16.com", true },
- { "88yule3.com", true },
- { "88yule5.com", true },
- { "88yule6.com", true },
- { "88yule7.com", true },
- { "88yule9.com", true },
- { "8900d.com", true },
- { "8901178.com", true },
- { "8901178.net", true },
- { "8906d.com", true },
- { "8907d.com", true },
- { "8908d.com", true },
- { "8910899.com", true },
- { "8910899.net", true },
- { "8914499.com", true },
- { "8917168.com", true },
- { "8917168.net", true },
- { "8917818.com", true },
- { "8917818.net", true },
- { "8919d.com", true },
- { "8920d.com", true },
- { "8921d.com", true },
- { "8925d.com", true },
- { "8926d.com", true },
- { "89365t.com", true },
- { "89386a.com", true },
- { "89386b.com", true },
- { "89386c.com", true },
- { "89386d.com", true },
- { "89386e.com", true },
- { "89386l.com", true },
- { "8938885.com", true },
- { "8951889.net", true },
- { "897774.com", true },
- { "898z6.com", true },
- { "8992088.com", true },
- { "8992088.net", true },
- { "899ks.com", true },
- { "899z6.com", true },
- { "89btt.com", true },
- { "8ag8.org", true },
- { "8ag88.com", true },
- { "8balls.nl", true },
- { "8bet86.com", true },
- { "8e8z.com", true },
- { "8k66.vip", true },
- { "8lc8.net", true },
- { "8maerz.at", true },
- { "8me.nl", true },
- { "8o8wave.com", true },
- { "8t8.eu", true },
- { "8tech.com.hk", true },
- { "8thportsmouth.org.uk", true },
- { "8tuffbeers.com", true },
- { "8win.am", true },
- { "8xx888.com", true },
- { "8xxbet.net", true },
- { "8yabo.com", true },
- { "8yun.ga", true },
- { "9-11commission.gov", true },
- { "9005424.com", true },
- { "9007337.com", true },
- { "900823.com", false },
- { "9009019.com", false },
- { "900k8.com", true },
- { "901543.com", true },
- { "903422.com", true },
- { "905422.com", true },
- { "9090819.com", true },
- { "90920.cn", true },
- { "90r.jp", true },
- { "9108.fun", true },
- { "911.gov", true },
- { "911216.xyz", true },
- { "9118.com", true },
- { "9118.hk", true },
- { "911commission.gov", true },
- { "912422.com", true },
- { "913422.com", true },
- { "914122.com", true },
- { "915kb.com", true },
- { "918.com", true },
- { "9180.fun", true },
- { "9180nn.com", true },
- { "9180tt.com", true },
- { "9180vv.com", true },
- { "9180xx.com", true },
- { "9180yy.com", true },
- { "9180zz.com", true },
- { "91816.net", true },
- { "9186.fun", true },
- { "9186119.com", true },
- { "9189.fun", true },
- { "91891849.com", true },
- { "91891854.com", true },
- { "91891856.com", true },
- { "91891878.com", true },
- { "918aac.com", true },
- { "918aait.co", true },
- { "918aak.com", true },
- { "918ac.com", true },
- { "918agr.co", true },
- { "918ajj.com", true },
- { "918akk.com", true },
- { "918amj.co", true },
- { "918att.com", true },
- { "918axx.com", true },
- { "918ayy.com", true },
- { "918bbm.co", true },
- { "918bbt.com", true },
- { "918bby.co", true },
- { "918bby.com", true },
- { "918bcf.co", true },
- { "918bcw.co", true },
- { "918bis.co", true },
- { "918bit.co", true },
- { "918btt.com", true },
- { "918btt.net", true },
- { "918btty.com", true },
- { "918bttz.com", true },
- { "918byy.com", true },
- { "918ca.com", true },
- { "918cca.com", true },
- { "918cce.com", true },
- { "918ccq.com", true },
- { "918ch.com", true },
- { "918cr.com", true },
- { "918ctt.com", true },
- { "918dc04.com", true },
- { "918dc16.com", true },
- { "918dc19.com", true },
- { "918dda.com", true },
- { "918ddj.com", true },
- { "918ddo.com", true },
- { "918ddx.com", true },
- { "918dxx.com", true },
- { "918ee.com", true },
- { "918eej.com", true },
- { "918ej.com", true },
- { "918ev.com", true },
- { "918ffa.com", true },
- { "918fq.com", true },
- { "918fr.com", true },
- { "918fv.com", true },
- { "918gd.com", true },
- { "918hr.com", true },
- { "918hu.com", true },
- { "918hw.com", true },
- { "918ia.com", true },
- { "918iz.com", true },
- { "918ji.com", true },
- { "918kissinw.com", true },
- { "918kx.com", true },
- { "918mc.com", true },
- { "918md10.com", true },
- { "918md16.com", true },
- { "918md25.com", true },
- { "918mf.com", true },
- { "918nc.com", true },
- { "918nd.com", true },
- { "918nn.com", true },
- { "918nu.com", true },
- { "918ny.com", true },
- { "918pt.com", true },
- { "918qa.com", true },
- { "918qg.com", true },
- { "918qs.com", true },
- { "918rw.com", true },
- { "918sn.com", true },
- { "918ta.com", true },
- { "918tj.com", true },
- { "918tr.com", true },
- { "918tw.com", true },
- { "918uh.com", true },
- { "918vb.com", true },
- { "918ve.com", true },
- { "918vi.com", true },
- { "918wa.com", true },
- { "918we.com", true },
- { "918wo.com", true },
- { "918wq.com", true },
- { "918ww.com", true },
- { "918xe.com", true },
- { "918xn.com", true },
- { "918yy.net", true },
- { "918zm.com", true },
- { "918zv.com", true },
- { "918zw.com", true },
- { "919422.com", true },
- { "91d27.com", true },
- { "91d52.com", true },
- { "91d57.com", true },
- { "91d58.com", true },
- { "91fldz.com", true },
- { "91travel.info", true },
- { "91z6.com", true },
- { "922z6.com", true },
- { "924122.com", true },
- { "924322.com", true },
- { "924622.com", true },
- { "926422.com", true },
- { "927774.com", true },
- { "929349.com", true },
- { "92url.com", true },
- { "931422.com", true },
- { "932422.com", true },
- { "933325.com", true },
- { "933z6.com", true },
- { "934122.com", true },
- { "937774.com", true },
- { "939394.org", true },
- { "9397.com", false },
- { "9397dh.com", false },
- { "9397hd.com", false },
- { "9397l.com", false },
- { "9397mm.com", false },
- { "93ag8.com", true },
- { "93jc.cn", true },
- { "941988.cn", true },
- { "943022.com", true },
- { "9449-27a1-22a1-e0d9-4237-dd99-e75e-ac85-2f47-9d34.de", true },
- { "946022.com", true },
- { "946422.com", true },
- { "949022.com", true },
- { "949122.com", true },
- { "949622.com", true },
- { "949722.com", true },
- { "9499459.com", false },
- { "9499aaaa.com", false },
- { "9499bbbb.com", false },
- { "9499cccc.com", false },
- { "9499dc.com", false },
- { "9499dddd.com", false },
- { "9499eeee.com", false },
- { "9499ffff.com", false },
- { "9499gggg.com", false },
- { "9499good.com", false },
- { "9499hhhh.com", false },
- { "9499iiii.com", false },
- { "9499jjj.com", false },
- { "9499jjjj.com", false },
- { "9499kkkk.com", false },
- { "9499l.com", false },
- { "9499llll.com", false },
- { "9499love.com", false },
- { "9499nnnn.com", false },
- { "9499oooo.com", false },
- { "9499pppp.com", false },
- { "9499qqqq.com", false },
- { "9499rrrr.com", false },
- { "9499ssss.com", false },
- { "9499ttt.com", false },
- { "9499tttt.com", false },
- { "9499uuuu.com", false },
- { "9499vvvv.com", false },
- { "9499wwww.com", false },
- { "9499xxx.com", false },
- { "9499xxxx.com", false },
- { "9499yyyy.com", false },
- { "9499zzzz.com", false },
- { "94imk.com", true },
- { "955z6.com", true },
- { "95am8.com", true },
- { "96002.com", false },
- { "962312.com", true },
- { "96678.com", false },
- { "966k66.com", true },
- { "966kb.com", true },
- { "966ks.com", true },
- { "966z6.com", true },
- { "9679693.com", true },
- { "967you.com", true },
- { "9681909.com", true },
- { "9696178.com", true },
- { "9696178.net", true },
- { "96z66.com", true },
- { "9721.com", false },
- { "9721dh.com", false },
- { "9721hd.com", false },
- { "9721mm.com", false },
- { "9721yy.com", false },
- { "972422.com", true },
- { "97735.com", true },
- { "97736.com", true },
- { "97737.com", true },
- { "97738.com", true },
- { "97739.com", true },
- { "977hghg.com", true },
- { "977kb.com", true },
- { "977z6.com", true },
- { "9788876.com", true },
- { "9800.cc", true },
- { "9822.am", true },
- { "9822am.com", true },
- { "9822cn.com", true },
- { "9822hk.com", true },
- { "9822ph.com", true },
- { "9822tw.com", true },
- { "9822usa.com", true },
- { "984.ch", true },
- { "985kb.com", true },
- { "988wh.com", true },
- { "988z6.com", true },
- { "989z6.com", true },
- { "98d88.com", true },
- { "98lc98.net", true },
- { "99123j.com", true },
- { "9918883.com", true },
- { "991z6.com", true },
- { "992z6.com", true },
- { "99365t.com", true },
- { "993z6.com", true },
- { "99456j.com", true },
- { "9950p.com", true },
- { "99599.fi", true },
- { "99599.net", true },
- { "995z6.com", true },
- { "9968909.com", false },
- { "99789j.com", true },
- { "997z6.com", true },
- { "998081.com", true },
- { "9988551.com", false },
- { "9988959.com", false },
- { "9988ty.com", true },
- { "998k66.com", true },
- { "998sa.com", true },
- { "998z6.com", true },
- { "999321365.com", true },
- { "999365t.com", true },
- { "9997035.com", true },
- { "99989796.net", true },
- { "9998k8.com", true },
- { "99999822.com", true },
- { "999998722.com", true },
- { "9999k8.net", true },
- { "999btt.net", true },
- { "999k66.com", true },
- { "999salon.co", true },
- { "999salon.com", true },
- { "99agks.com", true },
- { "99billionaire.com", true },
- { "99d88.com", true },
- { "99kb88.com", true },
- { "99naturalfoods.de", true },
- { "99qp.org", true },
- { "99rst.org", true },
- { "99spokes.com", true },
- { "9ag88.com", true },
- { "9bet86.com", true },
- { "9bingo.net", true },
- { "9box.jp", true },
- { "9elements.com", true },
- { "9farm.com", true },
- { "9fvip.net", true },
- { "9h.pl", true },
- { "9iwan.net", true },
- { "9jabase.com.ng", true },
- { "9jk7opa.com", true },
- { "9k223.com", true },
- { "9k226.com", true },
- { "9k227.com", true },
- { "9k228.com", true },
- { "9k229.com", true },
- { "9k233.com", true },
- { "9k235.com", true },
- { "9k236.com", true },
- { "9k237.com", true },
- { "9k238.com", true },
- { "9k239.com", true },
- { "9k252.com", true },
- { "9k253.com", true },
- { "9k255.com", true },
- { "9k256.com", true },
- { "9k257.com", true },
- { "9k258.com", true },
- { "9k259.com", true },
- { "9k265.com", true },
- { "9k266.com", true },
- { "9k267.com", true },
- { "9k268.com", true },
- { "9k269.com", true },
- { "9k272.com", true },
- { "9k273.com", true },
- { "9k275.com", true },
- { "9k276.com", true },
- { "9k277.com", true },
- { "9k278.com", true },
- { "9k279.com", true },
- { "9k283.com", true },
- { "9k285.com", true },
- { "9k287.com", true },
- { "9k289.com", true },
- { "9k292.com", true },
- { "9k295.com", true },
- { "9k296.com", true },
- { "9k297.com", true },
- { "9k298.com", true },
- { "9k299.com", true },
- { "9k322.com", true },
- { "9k325.com", true },
- { "9k328.com", true },
- { "9k332.com", true },
- { "9k335.com", true },
- { "9k336.com", true },
- { "9k338.com", true },
- { "9k362.com", true },
- { "9k363.com", true },
- { "9k366.com", true },
- { "9k368.com", true },
- { "9k372.com", true },
- { "9k373.com", true },
- { "9k375.com", true },
- { "9k376.com", true },
- { "9k378.com", true },
- { "9k383.com", true },
- { "9k385.com", true },
- { "9k386.com", true },
- { "9k388.com", true },
- { "9k398.com", true },
- { "9k566.com", true },
- { "9k573.com", true },
- { "9k577.com", true },
- { "9k589.com", true },
- { "9k625.com", true },
- { "9k627.com", true },
- { "9k629.com", true },
- { "9k632.com", true },
- { "9k637.com", true },
- { "9k657.com", true },
- { "9k659.com", true },
- { "9k672.com", true },
- { "9k677.com", true },
- { "9k679.com", true },
- { "9k683.com", true },
- { "9k687.com", true },
- { "9k693.com", true },
- { "9k696.com", true },
- { "9k822.com", true },
- { "9k825.com", true },
- { "9k828.com", true },
- { "9k829.com", true },
- { "9k832.com", true },
- { "9k837.com", true },
- { "9k838.com", true },
- { "9k852.com", true },
- { "9k857.com", true },
- { "9k858.com", true },
- { "9k862.com", true },
- { "9k866.com", true },
- { "9k867.com", true },
- { "9k868.com", true },
- { "9k869.com", true },
- { "9k873.com", true },
- { "9k882.com", true },
- { "9k886.com", true },
- { "9k895.com", true },
- { "9k897.com", true },
- { "9k898.com", true },
- { "9kb.xyz", true },
- { "9kopb.ru", true },
- { "9lc9.com", true },
- { "9pkfz.com", true },
- { "9point6.com", true },
- { "9riddles.com", true },
- { "9to5notes.in", true },
- { "9uelle.jp", true },
- { "9ungnir.xyz", true },
- { "9vx.org", true },
- { "9yw.me", true },
- { "a-1basements.com", true },
- { "a-1indianawaterproofing.com", true },
- { "a-allard.be", true },
- { "a-care.net", true },
- { "a-invest.de", true },
- { "a-msystems.com", true },
- { "a-oben.org", true },
- { "a-tes-cotes.com", true },
- { "a-wife.net", true },
- { "a-ztransmission.com", true },
- { "a00228.com", false },
- { "a0print.nl", true },
- { "a1bouncycastlehire.com", true },
- { "a1demolitionhauling.com", true },
- { "a1jumpandbounce.co.uk", true },
- { "a1post.bg", true },
- { "a1scuba.com", true },
- { "a1towgrant.com", true },
- { "a210.online", true },
- { "a22z.xyz", true },
- { "a291.cc", true },
- { "a2a.me", true },
- { "a2a.net", true },
- { "a2ch.ru", true },
- { "a2nutrition.com.au", true },
- { "a2os.club", true },
- { "a2os.xyz", true },
- { "a30.tokyo", false },
- { "a30365.com", true },
- { "a36533.com", true },
- { "a36594.com", true },
- { "a365vip1.com", true },
- { "a365vip2.com", true },
- { "a365vip3.com", true },
- { "a365vip5.com", true },
- { "a365vip9.com", true },
- { "a3m.gmbh", true },
- { "a3mobile.com", true },
- { "a4sound.com", true },
- { "a66.la", true },
- { "a6619.com", true },
- { "a6621.com", true },
- { "a6623.com", true },
- { "a6627.com", true },
- { "a6631.com", true },
- { "a6651.com", true },
- { "a6652.com", true },
- { "a6657.com", true },
- { "a6659.com", true },
- { "a6671.com", true },
- { "a6672.com", true },
- { "a6673.com", true },
- { "a6675.com", true },
- { "a6682.com", true },
- { "a6683.com", true },
- { "a6687.com", true },
- { "a6691.com", true },
- { "a6692.com", true },
- { "a6695.com", true },
- { "a7035.com", true },
- { "a77018.com", false },
- { "a7m2.me", true },
- { "a88fc.com", true },
- { "aa-tour.ru", true },
- { "aa00228.com", false },
- { "aa4888.com", true },
- { "aaa-racing.com", true },
- { "aaa-racing.net", true },
- { "aaa-racing.uk", true },
- { "aaainfosystems.com", true },
- { "aaapl.com", true },
- { "aaapo.com.br", true },
- { "aabanet.com.br", true },
- { "aaben-bank.dk", true },
- { "aabenbank.dk", true },
- { "aabenjaminjewelry.com", true },
- { "aacs-design.com", true },
- { "aadv.com.br", true },
- { "aalalbayt.com", true },
- { "aalalbayt.net", true },
- { "aalstmotors-usedcars.be", false },
- { "aaltocapital.com", true },
- { "aamwa.com", true },
- { "aandkevents.co.uk", true },
- { "aanmpc.com", true },
- { "aanwp.com", true },
- { "aaomidi.com", true },
- { "aapar.nl", true },
- { "aarailfan.com", true },
- { "aardvarksoep.nl", true },
- { "aarklendoia.com", true },
- { "aarkue.eu", true },
- { "aaron-russell.co.uk", true },
- { "aaron-schaal.de", true },
- { "aaronburt.co.uk", true },
- { "aaronhorler.com", true },
- { "aaronhorler.com.au", true },
- { "aaronkimmig.de", true },
- { "aaronroyle.com", true },
- { "aaronsilber.me", true },
- { "aarquiteta.com.br", true },
- { "aartsplastics.nl", true },
- { "aarwer.com", true },
- { "aarwer.jp", true },
- { "aasvets.co.uk", true },
- { "aatf.us", true },
- { "aati.be", true },
- { "aati.info", true },
- { "aattrans.com", true },
- { "aavienna.com", true },
- { "ab-photography.nl", true },
- { "ab288.com", true },
- { "ab2888.cn", true },
- { "ab28s.com", true },
- { "ab2web.com", true },
- { "ab91corp.com", true },
- { "abaapplianceservice.com", true },
- { "abaaustin.com", true },
- { "ababyco.com.hr", true },
- { "abacross.com", true },
- { "abacusbouncycastle.co.uk", true },
- { "abacusfi.com", true },
- { "abacustech.co.jp", true },
- { "abandonedmines.gov", true },
- { "abashevo.ml", true },
- { "abateroad66.it", true },
- { "abbadabbabouncycastles.co.uk", true },
- { "abbeyok.com", true },
- { "abbeyvetspets.co.uk", true },
- { "abbottscastles.co.uk", true },
- { "abbruch-star.de", true },
- { "abbtw.com", true },
- { "abc-rz.de", true },
- { "abc.li", true },
- { "abcbouncycastlessurrey.co.uk", true },
- { "abcbouncyfactory.co.uk", true },
- { "abcdreamusa.com", true },
- { "abcempreendimentos.com.br", true },
- { "abcheck.se", true },
- { "abckam.com", true },
- { "abcode.ml", true },
- { "abcorporate-aviation.com", true },
- { "abcorporate-aviation.fr", true },
- { "abcpartyhire.com", true },
- { "abcstudio.com.au", true },
- { "abctowinghelp.com", true },
- { "abdel.me", true },
- { "abdelaliezzyn.be", true },
- { "abdl.link", true },
- { "abdulawal.tk", true },
- { "abdullahavci.com", true },
- { "abdullahavci.com.tr", true },
- { "abdullahavci.net.tr", true },
- { "abdullahzubayerofficial.ml", true },
- { "abdulrahman.eu", true },
- { "abdulwahaab.ca", true },
- { "abdurrahmangazidis.tk", true },
- { "abdurrehman.tk", true },
- { "abe-elektro.de", true },
- { "abe-medical.jp", true },
- { "abeilles-idapi.fr", false },
- { "abelbarretto.tk", true },
- { "abellis-formation.com", true },
- { "abelrubio.me", true },
- { "abelsflooringandtile.com", true },
- { "abenteuer-ahnenforschung.de", true },
- { "abeontech.com", true },
- { "aberdeencastles.co.uk", true },
- { "aberdeenjudo.co.uk", true },
- { "aberon.pl", true },
- { "abetterdeath.com", true },
- { "abeus.com", true },
- { "abg.ninja", true },
- { "abhaldus.ee", true },
- { "abhisharma.me", true },
- { "abhishekkabdijain.tk", true },
- { "abi95oha.de", true },
- { "abiapp.net", true },
- { "abibruce.co.uk", true },
- { "abidinginhesed.com", true },
- { "abigisp.com", true },
- { "abilitycaresoftware.com", true },
- { "abilitymatters.co.uk", true },
- { "abilityone.gov", true },
- { "abilma.com", true },
- { "abilymp06.net", true },
- { "abinyah.com", true },
- { "abiscrane.com", true },
- { "abitech.tk", true },
- { "abitidalavoro.roma.it", true },
- { "abitidasposa.roma.it", true },
- { "abiturma.de", true },
- { "abjay.com", true },
- { "ableprop.net", true },
- { "abloomnova.net", true },
- { "abmackenzie.com", true },
- { "abmc.gov", true },
- { "abminiplex.in", true },
- { "abmledger.ca", true },
- { "abmtax.ca", true },
- { "abn-consultants.ie", true },
- { "abnehmen.com", true },
- { "aboces.org", true },
- { "abogadocriminalorlando.com", true },
- { "abogadoperu.com", true },
- { "abogadosescobarysanchez.es", true },
- { "abolicionistas.com", true },
- { "abolition.net", true },
- { "abolitionism.ca", true },
- { "abolitionism.co.uk", true },
- { "abolitionism.com", true },
- { "abolitionism.in", true },
- { "abolitionism.net", true },
- { "abolitionism.us", true },
- { "abolitionist-project.com", true },
- { "abolitionist-society.com", true },
- { "abolitionist.ca", true },
- { "abolitionist.co.uk", true },
- { "abolitionist.com", true },
- { "abolitionist.in", true },
- { "abolitionist.net", true },
- { "abolitionist.us", true },
- { "abolitionistparty.com", true },
- { "abolitionistproject.com", true },
- { "abolitionistsociety.com", true },
- { "abolitionniste.com", true },
- { "abolizionista.com", true },
- { "abona24.de", true },
- { "abonilla.com", true },
- { "aborla.net", true },
- { "abos.eu", false },
- { "abouncycastleman.co.uk", true },
- { "about-bangladesh.tk", true },
- { "about-ti.me", true },
- { "aboutasia.nl", true },
- { "abouthrm.nl", true },
- { "aboutict.nl", true },
- { "aboutlegal.nl", true },
- { "aboutmedia.nl", true },
- { "aboutmyproperty.ca", true },
- { "aboutpublishers.nl", true },
- { "aboutshakil.tk", true },
- { "aboutspice.com", true },
- { "aboutyou.at", true },
- { "aboutyou.be", true },
- { "aboutyou.ch", true },
- { "aboutyou.de", true },
- { "aboutyou.nl", true },
- { "aboveaverageplumbing.com", true },
- { "abox-kb.com", true },
- { "abpis.hr", true },
- { "abracadabra.co.jp", false },
- { "abrah.am", true },
- { "abrahametalero.tk", true },
- { "abrightspark.gq", true },
- { "abrikos.group", true },
- { "abristolgeek.co.uk", true },
- { "abrition.com", true },
- { "abseits.org", true },
- { "absolem.cc", false },
- { "absolutcruceros.com", true },
- { "absoluteautobody.com", true },
- { "absolutedouble.co.uk", true },
- { "absolutelyinflatables.co.uk", true },
- { "absoluterush.net", true },
- { "absolutewebdesigns.com", true },
- { "absolutviajes.com", true },
- { "abstechs.ae", true },
- { "abstimmen.online", true },
- { "abstractbarista.net", true },
- { "abstraction21.com", true },
- { "absturztau.be", true },
- { "absturztaube.ch", true },
- { "absynthe-inquisition.fr", true },
- { "abth.tk", true },
- { "abthorpe.org", true },
- { "abulanov.com", true },
- { "abundanteconomy.com", true },
- { "abundent.com", true },
- { "abuse.ch", true },
- { "abuse.fi", true },
- { "abuse.io", true },
- { "abusive-host.tk", true },
- { "abvent.net", true },
- { "abvlbasketviganello.ch", false },
- { "abyssproject.net", true },
- { "ac-admin.pl", true },
- { "ac-cosmetics.nl", true },
- { "ac-epmservices.com", true },
- { "ac.milan.it", true },
- { "ac0g.dyndns.org", true },
- { "aca-creative.co.uk", true },
- { "acacia-gardens.co.uk", true },
- { "academiadebomberosonline.com", true },
- { "academica.nl", true },
- { "academichealthscience.net", true },
- { "academie-de-police.ch", false },
- { "academie-essentiel.ch", true },
- { "academie-musique-nice.com", false },
- { "academkin.com", true },
- { "academus.io", true },
- { "academy-awards.ml", true },
- { "academytv.com.au", true },
- { "acampar.com.br", true },
- { "acaptureservices.com", true },
- { "acara-yoga.de", true },
- { "acareer.in", true },
- { "acat.io", true },
- { "acatec.de", true },
- { "acbrussels-used.be", false },
- { "accademia24.it", true },
- { "accademiaditruccoblog.it", true },
- { "accademiapugilistica.it", true },
- { "accelaway.com", true },
- { "acceleratenetworks.com", true },
- { "accelerateyourworld.org", true },
- { "accelsnow.com", true },
- { "accentthailand.com", true },
- { "acceptancerecoverycenter.com", true },
- { "acces-elevation.fr", true },
- { "accesloges.com", true },
- { "accesoriosviaje.com", true },
- { "accessacab.co.uk", true },
- { "accessauto-occasions.be", false },
- { "accessgaragedoors.com", true },
- { "accessibility.gov", true },
- { "accessibilityguidelines.com", true },
- { "accessibletravelclub.com", true },
- { "accesskeycloning.com", true },
- { "accessoirescheveuxchic.com", true },
- { "accessoripersmartphone.it", true },
- { "acchicocchi.com", true },
- { "accionistaprincipiante.com", true },
- { "accme.co", true },
- { "accoladescreens.com.au", true },
- { "accord-application.com", true },
- { "accordiondoor.com", true },
- { "account.bbc.com", true },
- { "account4u.nl", true },
- { "accounts.firefox.com", true },
- { "accounts.google.com", true },
- { "accpl.co", true },
- { "accpodcast.com", true },
- { "accreditamento.net", true },
- { "accrosoft.com", true },
- { "accs.org.au", true },
- { "accudraftpaintbooths.com", true },
- { "accurateautobodywa.com", true },
- { "accuritconsulting.com", true },
- { "accutint.com", true },
- { "acdcbrasil.net", true },
- { "ace.one", true },
- { "acealters.com", false },
- { "aceanswering.com", true },
- { "acecerts.co.uk", true },
- { "acecolleges.edu.au", true },
- { "acefreightco.com", true },
- { "acegroup.com.sg", true },
- { "aceinflatables.com", true },
- { "aceinstituteonline.com", true },
- { "aceitedelcampo.com", true },
- { "acelpb.com", true },
- { "acem.org.au", true },
- { "acemobileforce.com", true },
- { "acemypaper.com", true },
- { "acendealuz.com.br", true },
- { "acerentalandsales.com", true },
- { "acerislaw.com", true },
- { "acessoeducacao.com", true },
- { "acfun.eu.org", true },
- { "acg.social", true },
- { "acg.vc", true },
- { "acgtalktw.com", true },
- { "achalay.org", false },
- { "achat-volets-roulants.fr", true },
- { "achieveinternet.com", true },
- { "achiksongs.tk", true },
- { "achromatisch.de", true },
- { "achterblog.de", true },
- { "achterstieg.dedyn.io", true },
- { "achtzehn.de", true },
- { "achtzehn.eu", true },
- { "achtzig20.de", true },
- { "achwo.de", true },
- { "acihotel.vn", true },
- { "aciksite.com", true },
- { "acinq.co", true },
- { "ackermann.ch", true },
- { "ackis.duckdns.org", true },
- { "acl.gov", true },
- { "aclandia.fr", true },
- { "aclu.org", false },
- { "acmegamer.com", true },
- { "acmi.fr", true },
- { "acneintelligence.com", true },
- { "acodess.com", true },
- { "aconnor.xyz", true },
- { "acordes.online", true },
- { "acorncastles.co.uk", true },
- { "acorncredentialing.com", true },
- { "acourse.io", false },
- { "acousti-tech.com", true },
- { "acousticalsolutions.com", true },
- { "acoustics.network", true },
- { "acoustics.tech", true },
- { "acoustique-tardy.com", false },
- { "acperu.ch", false },
- { "acpica.org", true },
- { "acquaparrucchieri.it", true },
- { "acquire.media", true },
- { "acquisition.gov", true },
- { "acrepairgeorgetown.com", true },
- { "acrepairhutto.com", true },
- { "acrepairroundrocktx.com", true },
- { "acrevalue.com", true },
- { "acronis.com", true },
- { "acronis.org", true },
- { "acrosstheblvd.com", true },
- { "acroyoga-nuernberg.de", true },
- { "acrylbilder-acrylmalerei.de", true },
- { "acrylicwifi.com", true },
- { "acsbbs.org", true },
- { "acsc.gov.au", true },
- { "acscbasket.com", true },
- { "acsemb.org", true },
- { "acsports.ca", true },
- { "act-safety.nl", true },
- { "actc.org.uk", true },
- { "actgruppe.de", false },
- { "actheater.com", true },
- { "acticu.com", true },
- { "actiefgeld.nl", false },
- { "action-verite.fr", true },
- { "actioncleaningnd.com", true },
- { "actioncoachignite.co.za", true },
- { "actionfinancialservices.net", true },
- { "actionmadagascar.ch", false },
- { "actionsack.com", true },
- { "actionverb.com", true },
- { "activatemyiphone.com", true },
- { "activateudid.com", true },
- { "active.hu", false },
- { "active247.info", true },
- { "activeaerogels.com", true },
- { "activeexcavator.com", true },
- { "activefootandankle.com", true },
- { "activehire.co.uk", true },
- { "activeleisure.ie", true },
- { "activephoto.se", true },
- { "activespaceautomation.com", true },
- { "activespacetech.com", true },
- { "activityeventhire.co.uk", true },
- { "activityhub.cloud", true },
- { "activityhub.xyz", true },
- { "actom.cc", true },
- { "actonwoodworks.com", true },
- { "actors-cafe.net", true },
- { "actserv.co.ke", true },
- { "actualadmins.com", true },
- { "actualidadblog.com", true },
- { "actualidadecommerce.com", true },
- { "actualidadgadget.com", true },
- { "actualidadiphone.com", true },
- { "actualidadkd.com", true },
- { "actualidadliteratura.com", true },
- { "actualidadmotor.com", true },
- { "actualidadviajes.com", true },
- { "actualsolutions.am", true },
- { "acubens.org", true },
- { "acudire.es", true },
- { "acuica.co.uk", false },
- { "acul.me", true },
- { "aculocity.com", true },
- { "acumed-diagnostic.com", true },
- { "acunetix.com", true },
- { "acupuntura.coach", true },
- { "acupuntura.doctor", true },
- { "acupuntura.institute", true },
- { "acupunturavalencia.xyz", true },
- { "acus.gov", true },
- { "acutewealthadvisors.com", true },
- { "acwcerts.co.uk", true },
- { "acwi.gov", true },
- { "acy.com", true },
- { "acyfxasia.com", true },
- { "ad-notam.asia", true },
- { "ad-notam.ch", true },
- { "ad-notam.co.uk", true },
- { "ad-notam.com", true },
- { "ad-notam.de", true },
- { "ad-notam.fr", true },
- { "ad-notam.it", true },
- { "ad-notam.pt", true },
- { "ad-notam.us", true },
- { "ad4msan.com", true },
- { "ad4msan.win", true },
- { "ada.gov", true },
- { "adaera.com", true },
- { "adagia.eu", true },
- { "adalis.org", true },
- { "adam-ant.co.uk", true },
- { "adam-kostecki.de", true },
- { "adam.lgbt", true },
- { "adamas-magicus.ru", true },
- { "adamdixon.co.uk", true },
- { "adamdorman.com", true },
- { "adamfontenot.com", true },
- { "adamgibbins.com", true },
- { "adamh.us", true },
- { "adamkostecki.de", true },
- { "adamlee.com", true },
- { "adamoutler.com", true },
- { "adams.dk", true },
- { "adamsasphaltpaving.com", true },
- { "adamstas.com", true },
- { "adamyuan.xyz", true },
- { "adappt.co.uk", true },
- { "adapptlabs.com", true },
- { "adapt-elektronik.com", true },
- { "adapt.de", true },
- { "adaptablesecurity.org", true },
- { "adapti.de", true },
- { "adaptiv.ltd", true },
- { "adaptiveicons.com", true },
- { "adaptivemechanics.edu.au", true },
- { "adarixconsultores.com", true },
- { "adasbench.com", true },
- { "adativos.com.br", true },
- { "adawolfa.cz", true },
- { "adayinthelifeof.nl", true },
- { "adblockextreme.com", true },
- { "adblockextreme.net", true },
- { "adblockextreme.org", true },
- { "adc64.com", true },
- { "adceuta.tk", true },
- { "adcnvs.com", true },
- { "addcrazy.com", true },
- { "adderall.space", true },
- { "addictedtolength.co.uk", true },
- { "addictic.fr", true },
- { "addictionresource.com", true },
- { "addictively.com", true },
- { "addiko.net", true },
- { "addiko.rs", true },
- { "addisoncrump.info", true },
- { "addnewsite.tk", true },
- { "addnine.com", true },
- { "addo-addo.com", true },
- { "addon.watch", true },
- { "addtoany.com", true },
- { "adduono.com", true },
- { "addvalue-renovations.co.uk", true },
- { "adelaidecc.com.au", true },
- { "adelebeals.com", true },
- { "adelightfulglow.com", true },
- { "adelina.com.br", true },
- { "adeline.mobi", true },
- { "adentalsolution.com", true },
- { "adept-elearning.com", true },
- { "adept.org.pl", true },
- { "adevel.eu", true },
- { "adex.network", true },
- { "adf-safetytools.com", true },
- { "adf.rocks", true },
- { "adftrasporti.it", true },
- { "adhd-inattentive.com", true },
- { "adhesivelaundry.co.uk", true },
- { "adhgroup.ug", true },
- { "adhocracy.plus", true },
- { "adi.com.au", true },
- { "adi.net.au", true },
- { "adidasrunningpartners.com", true },
- { "adiehard.party", false },
- { "adimaja.com", true },
- { "adimplere.com.br", true },
- { "adinariversloveschool.com", true },
- { "adingenierie.fr", true },
- { "adinternational.com.au", true },
- { "adiprospero.it", true },
- { "aditibhatia.com", true },
- { "adjagu.org", true },
- { "adlerneves.com", true },
- { "adlerneves.com.br", true },
- { "adlerosn.com", true },
- { "adlerosn.com.br", true },
- { "adlershop.ch", true },
- { "adlignum.se", true },
- { "adme.co.il", true },
- { "admin-serv.net", true },
- { "admin.fedoraproject.org", true },
- { "admin.google.com", true },
- { "admin.stg.fedoraproject.org", true },
- { "admind.at", true },
- { "adminforge.de", true },
- { "administracionessaez.es", true },
- { "administratie-smits.nl", true },
- { "administratiekantoorblom.nl", true },
- { "administrator.de", true },
- { "administratorserwera.pl", true },
- { "adminless.ovh", true },
- { "adminlinux.pl", true },
- { "admino.cz", true },
- { "adminrezo.fr", true },
- { "admody.com", true },
- { "admongo.gov", true },
- { "adnexa.it", true },
- { "adnolesh.com", true },
- { "adoll.ml", true },
- { "adollarseo.com", true },
- { "adomani-italia.com", true },
- { "adonai.eti.br", true },
- { "adonis.hosting", true },
- { "adonis.media", true },
- { "adoniscabaret.co.uk", true },
- { "adonisgrup.ro", true },
- { "adontenchambers.com", true },
- { "adoptionlink.co.uk", true },
- { "adoptionpregnancycenter.com", true },
- { "adoptionpregnancycenter.net", true },
- { "adorade.ro", true },
- { "adorecricket.com", true },
- { "adorewe.com", true },
- { "adorno-gymnasium.de", true },
- { "adoucisseur.shop", true },
- { "adpkdsim.org", true },
- { "adr.gov", true },
- { "adra.com", true },
- { "adrafinil.wiki", true },
- { "adrans.com", true },
- { "adrenalin.od.ua", true },
- { "adrenalin.travel", true },
- { "adrian.web.id", true },
- { "adrianbechtold.de", true },
- { "adriancitu.com", true },
- { "adriancostin.ro", true },
- { "adrianmejias.com", true },
- { "adrianoansaldi.it", true },
- { "adrianobarbosa.xyz", true },
- { "adriatic.hr", true },
- { "adriatrans.ga", true },
- { "adrienjacquierbret.com", true },
- { "adrienkohlbecker.com", true },
- { "adriennesmiles.com", true },
- { "adrup.com", true },
- { "adsamcik.com", true },
- { "adsbouncycastles.co.uk", true },
- { "adsbtc.org", true },
- { "adsib.gob.bo", true },
- { "adsl2meg.fr", true },
- { "adsviews.gq", true },
- { "adswoo.com", true },
- { "adtelligent.com", true },
- { "adtgroup.com", true },
- { "adultforum.gr", true },
- { "adultwebcams1.com", true },
- { "adurra.com", true },
- { "aduvi.de", true },
- { "adv-f1.ru", true },
- { "adv.cr", true },
- { "advaith.fun", true },
- { "advance.hr", true },
- { "advanced-fleet-services.com", true },
- { "advanced-scribes.com", true },
- { "advanced.info", false },
- { "advanceddieselspokane.com", true },
- { "advancedelectricalservicesqld.com.au", true },
- { "advancedendoscopycenter.net", true },
- { "advancedoneroofing.com", true },
- { "advancedprotectionkey.com", true },
- { "advancedprotectionsecuritykey.com", true },
- { "advancedsurgicalconsultantsllc.com", true },
- { "advancedurologyswla.com", true },
- { "advancedwriters.com", true },
- { "advanceworx.com", true },
- { "advancis.net", true },
- { "advantagehomeexteriors.com", true },
- { "advantagemechanicalinc.com", true },
- { "advantis.tk", true },
- { "advara.com", true },
- { "advatech-solutions.com", true },
- { "advenacs.com", true },
- { "advenacs.com.au", true },
- { "advens.com", true },
- { "advens.fr", true },
- { "advento.bg", true },
- { "adventry.tk", true },
- { "adventure-inn.com", true },
- { "adventurealpinetreks.com", true },
- { "adventurecreators.com", true },
- { "adventuredrives.com", false },
- { "adventureforest.co.nz", true },
- { "adventureforest.nz", true },
- { "adventuregamers.com", true },
- { "adventurenow.nl", true },
- { "adventures.com", true },
- { "adventureswithlillie.ca", true },
- { "adventurousway.com", true },
- { "adventus.space", true },
- { "advertis.biz", true },
- { "adveszker.hu", true },
- { "advisercentre.com.au", true },
- { "advocate-europe.eu", true },
- { "advocoeurdehaan.nl", true },
- { "advogatech.com.br", true },
- { "advokat-malinovskii.ml", true },
- { "advokat-romanov.com", true },
- { "advokat-vvp.com.ua", true },
- { "advokaty-yuristy.tk", true },
- { "advtran.com", true },
- { "adware.pl", false },
- { "adwokatkosterka.pl", true },
- { "adwokatzdunek.pl", true },
- { "adxperience.com", true },
- { "adzuna.at", true },
- { "adzuna.ca", true },
- { "adzuna.co.nz", true },
- { "adzuna.co.za", true },
- { "adzuna.com", true },
- { "adzuna.com.au", true },
- { "adzuna.com.br", true },
- { "adzuna.de", true },
- { "adzuna.fr", true },
- { "adzuna.in", true },
- { "adzuna.it", true },
- { "adzuna.nl", true },
- { "adzuna.pl", true },
- { "adzuna.ru", true },
- { "adzuna.sg", true },
- { "ae-construction.co.uk", true },
- { "ae-dir.com", true },
- { "ae-dir.org", true },
- { "ae86.dog", true },
- { "ae86.plus", true },
- { "ae86b.com", true },
- { "ae86c.com", true },
- { "ae86dj.com", true },
- { "ae86dy.com", true },
- { "ae86zx.com", true },
- { "aeb.io", true },
- { "aebian.org", true },
- { "aecexpert.fr", true },
- { "aecis.org", true },
- { "aedollon.com", true },
- { "aefcleaning.com", true },
- { "aegee-utrecht.nl", true },
- { "aegisalarm.co.uk", true },
- { "aegisalarm.com", true },
- { "aegisalarms.co.uk", true },
- { "aegisalarms.com", true },
- { "aegisinsight.com", true },
- { "aegrel.ee", true },
- { "aeh5134.cc", true },
- { "aehe.us", true },
- { "aei.co.uk", true },
- { "aeksistem.com", true },
- { "aelurus.com", true },
- { "aenterprise.info", true },
- { "aeon.co", true },
- { "aeonct.org", true },
- { "aeradesign.com", true },
- { "aerandir.fr", true },
- { "aergia.eu", true },
- { "aerisnetwork.com", true },
- { "aerlux.md", true },
- { "aero-pioneer.com", true },
- { "aero.parts", true },
- { "aeroacademia.com.mx", true },
- { "aeroalbrook.com", true },
- { "aerobasegroup.com", true },
- { "aerobotz.com", true },
- { "aeronautix.com", true },
- { "aeronote.net", true },
- { "aeropole.de", true },
- { "aeropole.eu", true },
- { "aerosimexperience.com", true },
- { "aerospace-schools.com", true },
- { "aerotechcoatings.com", true },
- { "aertel.ie", true },
- { "aes-freundeskreis.de", true },
- { "aessencia.com.br", true },
- { "aesthetikpiercing.de", true },
- { "aesthetx.com", true },
- { "aesvalanalys.com", true },
- { "aeternus.tech", true },
- { "aetherc0r3.eu", true },
- { "aetherlink.de", true },
- { "aevar.io", true },
- { "aextron.com", true },
- { "aextron.de", true },
- { "aextron.org", true },
- { "af.link", true },
- { "afadvantage.gov", true },
- { "afashion.com.au", true },
- { "afavre.io", true },
- { "afbtoto.com", true },
- { "afcompany.it", true },
- { "afcurgentcarelyndhurst.com", true },
- { "affaire.com", true },
- { "affairefacile.net", true },
- { "affarsnatverk.nu", true },
- { "affektblog.de", true },
- { "affichagepub3.com", true },
- { "affiliates.trade", true },
- { "affiliatetest.azurewebsites.net", true },
- { "affilie.de", true },
- { "affinity.co", true },
- { "affinitysync.com", true },
- { "affissioni.roma.it", true },
- { "affittacamere.roma.it", true },
- { "affittialmare.it", true },
- { "affittisalento.it", true },
- { "affordableazdivorce.com", false },
- { "affordableenvironmental.net", true },
- { "affordablehealthquotesforyou.com", true },
- { "affordableinsurancenow.com", true },
- { "affordablemudjacking.com", true },
- { "affordablepapers.com", true },
- { "affordableracingparts.com.au", true },
- { "affpass.com", true },
- { "affping.com", true },
- { "affsquare.com", true },
- { "afgaim.com", true },
- { "afghan.dating", true },
- { "afgn.com.ua", true },
- { "afi-business-consulting.com", true },
- { "aficards.com", true },
- { "aficionados.com.br", true },
- { "afilio.de", true },
- { "afinadoronline.com.br", true },
- { "afinaudio.com", true },
- { "afinterio.com", true },
- { "aflebedevo.tk", true },
- { "afmtevents.com", true },
- { "afonso.io", true },
- { "afp548.com", true },
- { "afrakib.com", true },
- { "afri.cc", true },
- { "africa.dating", true },
- { "africalebanon.tk", true },
- { "african-bay.de", true },
- { "africanhosting.ml", true },
- { "africanimpact.com", true },
- { "africantourer.com", true },
- { "afrikmag.com", true },
- { "afrodigital.uk", true },
- { "afslankspecialist.nl", true },
- { "after.digital", true },
- { "afterdwi.info", true },
- { "afterhate.fr", true },
- { "afterpay.com", true },
- { "afterschoolprogramsoflancaster.org", true },
- { "aftonpravdan.nu", true },
- { "afva.net", true },
- { "afwd.international", true },
- { "ag-2.net", true },
- { "ag-3.net", true },
- { "ag-33.net", true },
- { "ag-777.com", true },
- { "ag0.app", true },
- { "ag000.com", true },
- { "ag01.la", true },
- { "ag0101g.com", true },
- { "ag011.net", true },
- { "ag018.cc", true },
- { "ag0202a.com", true },
- { "ag022.net", true },
- { "ag06.la", true },
- { "ag066.vip", true },
- { "ag0707a.com", true },
- { "ag08.la", true },
- { "ag09.la", true },
- { "ag11.net", true },
- { "ag123.la", true },
- { "ag130.net", true },
- { "ag138.com", true },
- { "ag13842.com", true },
- { "ag1386.com", true },
- { "ag1515a.com", true },
- { "ag155.net", true },
- { "ag158.cc", true },
- { "ag1588.com", true },
- { "ag1601.com", true },
- { "ag1603.com", true },
- { "ag1604.com", true },
- { "ag1607.com", true },
- { "ag166.com", true },
- { "ag173168.com", true },
- { "ag18ks.com", true },
- { "ag2017.cc", true },
- { "ag2020a.com", true },
- { "ag271.com", true },
- { "ag2786.com", true },
- { "ag285.com", true },
- { "ag2855.com", true },
- { "ag288.vip", true },
- { "ag2886.com", true },
- { "ag2897.com", true },
- { "ag2978.com", true },
- { "ag3.la", true },
- { "ag3115.com", true },
- { "ag3117.com", true },
- { "ag3119.com", true },
- { "ag3232g.com", true },
- { "ag33.la", true },
- { "ag388.vip", true },
- { "ag3916.com", true },
- { "ag3917.com", true },
- { "ag393.com", true },
- { "ag3953.com", true },
- { "ag4141a.com", true },
- { "ag4848g.com", true },
- { "ag4949g.com", true },
- { "ag5152.com", true },
- { "ag5159.com", true },
- { "ag5326.com", true },
- { "ag5358.com", true },
- { "ag5392.com", true },
- { "ag5519.com", true },
- { "ag556.com", true },
- { "ag5623.com", true },
- { "ag5657.com", true },
- { "ag5662.com", true },
- { "ag5688.com", true },
- { "ag5758.com", true },
- { "ag5761.com", true },
- { "ag5852.com", true },
- { "ag5856.com", true },
- { "ag5862.com", true },
- { "ag5876.com", true },
- { "ag58ks.com", true },
- { "ag5917.com", true },
- { "ag5933.com", true },
- { "ag5936.com", true },
- { "ag5939.com", true },
- { "ag5951.com", true },
- { "ag5952.com", true },
- { "ag5967.com", true },
- { "ag6.com", true },
- { "ag6.im", true },
- { "ag6.pub", true },
- { "ag6.pw", true },
- { "ag6.us", true },
- { "ag6.vip", true },
- { "ag600.la", true },
- { "ag6005.com", true },
- { "ag6016.com", true },
- { "ag6033.com", true },
- { "ag6037.com", true },
- { "ag6072.com", true },
- { "ag6086.com", true },
- { "ag618.la", true },
- { "ag6215.com", true },
- { "ag6225.com", true },
- { "ag6262g.com", true },
- { "ag6272.com", true },
- { "ag6283.com", true },
- { "ag6291.com", true },
- { "ag6298.com", true },
- { "ag6306.com", true },
- { "ag660.com", true },
- { "ag66321.com", true },
- { "ag66567.com", true },
- { "ag666.vip", true },
- { "ag66668.com", true },
- { "ag6675.com", true },
- { "ag6676.com", true },
- { "ag6819.com", true },
- { "ag6825.com", true },
- { "ag68ks.com", true },
- { "ag69000.com", true },
- { "ag698.com", true },
- { "ag6995.com", true },
- { "ag7.la", true },
- { "ag700.com", true },
- { "ag72.vip", true },
- { "ag7273.com", true },
- { "ag77.la", true },
- { "ag77.win", true },
- { "ag77655.com", true },
- { "ag7811.com", true },
- { "ag7822.com", true },
- { "ag8-game.com", true },
- { "ag8.email", true },
- { "ag8.im", true },
- { "ag8.live", true },
- { "ag8.us", true },
- { "ag8.vip", true },
- { "ag800.com", true },
- { "ag806.tv", true },
- { "ag80808.com", true },
- { "ag80880.com", true },
- { "ag81117.com", true },
- { "ag81119.com", true },
- { "ag81122.com", true },
- { "ag81125.com", true },
- { "ag81163.com", true },
- { "ag81191.com", true },
- { "ag812.com", true },
- { "ag812.tv", true },
- { "ag81211.com", true },
- { "ag81213.com", true },
- { "ag81215.com", true },
- { "ag81268.com", true },
- { "ag81275.com", true },
- { "ag81277.com", true },
- { "ag81279.com", true },
- { "ag81325.com", true },
- { "ag81362.com", true },
- { "ag81393.com", true },
- { "ag81399.com", true },
- { "ag81568.com", true },
- { "ag816.com", true },
- { "ag81611.com", true },
- { "ag81613.com", true },
- { "ag818.cc", true },
- { "ag818.net", true },
- { "ag8181g.com", true },
- { "ag81879.com", true },
- { "ag81881.com", true },
- { "ag819.tv", true },
- { "ag81912.com", true },
- { "ag81917.com", true },
- { "ag81933.com", true },
- { "ag81939.com", true },
- { "ag82001.com", true },
- { "ag82006.com", true },
- { "ag82007.com", true },
- { "ag82011.vip", true },
- { "ag82015.com", true },
- { "ag82018.cc", true },
- { "ag82018.com", true },
- { "ag82022.cc", true },
- { "ag821.com", true },
- { "ag82135.com", true },
- { "ag8218.com", true },
- { "ag822.com", true },
- { "ag82225.com", true },
- { "ag82226.com", true },
- { "ag82287.com", true },
- { "ag8400.com", true },
- { "ag8500.com", true },
- { "ag855.net", true },
- { "ag860.com", true },
- { "ag8600.com", true },
- { "ag865.com", true },
- { "ag87777.com", true },
- { "ag8778.net", true },
- { "ag878.com", true },
- { "ag88-guide.com", true },
- { "ag880.com", true },
- { "ag88001.com", true },
- { "ag88008.com", true },
- { "ag88018.com", true },
- { "ag88028.com", true },
- { "ag88056.com", true },
- { "ag88058.com", true },
- { "ag88068.com", true },
- { "ag8808.com", true },
- { "ag88080.com", true },
- { "ag88081.com", true },
- { "ag88086.com", true },
- { "ag88089.com", true },
- { "ag88090.com", true },
- { "ag88094.com", true },
- { "ag88098.com", true },
- { "ag88110.com", true },
- { "ag88158.com", true },
- { "ag88220.com", true },
- { "ag8829.com", true },
- { "ag88309.com", true },
- { "ag8850.com", true },
- { "ag88518.com", true },
- { "ag88550.com", true },
- { "ag8856.com", true },
- { "ag8859.com", true },
- { "ag88618.com", true },
- { "ag887.com", true },
- { "ag8876.com", true },
- { "ag88777.com", true },
- { "ag88777.net", true },
- { "ag8879.com", true },
- { "ag88798.com", true },
- { "ag88799.com", true },
- { "ag888.ag", true },
- { "ag88801.com", true },
- { "ag88818.com", true },
- { "ag888818.com", true },
- { "ag889.com", true },
- { "ag8890.com", true },
- { "ag88905.com", true },
- { "ag88906.com", true },
- { "ag88910.com", true },
- { "ag88988.com", true },
- { "ag88dc22.com", true },
- { "ag88ks.com", true },
- { "ag89000.com", true },
- { "ag891.com", true },
- { "ag898.cc", true },
- { "ag899.com", true },
- { "ag89951.com", true },
- { "ag89ks.com", true },
- { "ag8vip.com", true },
- { "ag9.com", true },
- { "ag9.im", true },
- { "ag9.vip", true },
- { "ag9005.com", true },
- { "ag905.com", true },
- { "ag908.com", true },
- { "ag9100.com", true },
- { "ag918.ag", true },
- { "ag918.cc", true },
- { "ag918.co", true },
- { "ag918.top", true },
- { "ag92018.com", true },
- { "ag9532.com", true },
- { "ag955.net", true },
- { "ag96.win", true },
- { "ag961.com", true },
- { "ag9621.com", true },
- { "ag9623.com", true },
- { "ag966.net", true },
- { "ag978.com", true },
- { "ag9792.com", true },
- { "ag9793.com", true },
- { "ag98.tv", true },
- { "ag9800.com", true },
- { "ag9815.com", true },
- { "ag983.com", true },
- { "ag98ks.com", true },
- { "ag992.com", true },
- { "ag9931.com", true },
- { "ag995.com", true },
- { "ag9973.com", true },
- { "ag998.com", true },
- { "ag9ks.com", true },
- { "ag9vip.com", true },
- { "agaa35.com", true },
- { "agaa41.com", true },
- { "agagent.vip", true },
- { "agahi90.ir", true },
- { "agalliasis.ch", false },
- { "agamsecurity.ch", false },
- { "agatajanik.de", true },
- { "agate.pw", true },
- { "agaveandpine.com", true },
- { "agds.pw", true },
- { "age-encryption.org", true },
- { "agechecker.net", true },
- { "agefriendlyri.org", true },
- { "agemfis.com", true },
- { "agence-wazacom.fr", true },
- { "agences-cegee.fr", true },
- { "agencesaintpierre.fr", true },
- { "agencia.barcelona", true },
- { "agencia.cat", true },
- { "agencia.pro", true },
- { "agenciacorujadesign.com.br", true },
- { "agenciafiscal.pe", true },
- { "agencyalacarte.com", true },
- { "agencyinmotion.com", true },
- { "agencytsunami.com", true },
- { "agenda-loto.net", false },
- { "agenda21senden.de", true },
- { "agendaspectacles.fr", true },
- { "agendatelefonica.com.br", false },
- { "agent-grow.com", true },
- { "agentprocessing.com", true },
- { "agentrisk.com", true },
- { "agentur-pottkinder.de", true },
- { "agenux.org", true },
- { "agenziaimmobiliarezeta.it", true },
- { "agfmedia.com", true },
- { "agg097.com", true },
- { "agg66.com", true },
- { "agg77.com", true },
- { "agg88.com", true },
- { "agh6p.com", true },
- { "aghayeva-edler.de", true },
- { "agiapelagia.com", true },
- { "agibank.com.br", true },
- { "agic-geneve.ch", true },
- { "agilebits.com", true },
- { "agilecraft.com", true },
- { "agileui.com", true },
- { "agiley.se", true },
- { "agilicus.ca", true },
- { "agilicus.com", true },
- { "agilizing.us", true },
- { "agilob.net", true },
- { "aging.gov", true },
- { "aginion.net", true },
- { "agk.co.com", true },
- { "agks0.com", true },
- { "agks006.com", true },
- { "agks008.com", true },
- { "agks02.com", true },
- { "agks06.com", true },
- { "agks08.com", true },
- { "agks1.com", true },
- { "agks11.com", true },
- { "agks111.com", true },
- { "agks113.com", true },
- { "agks12.com", true },
- { "agks13.com", true },
- { "agks131.com", true },
- { "agks133.com", true },
- { "agks138.com", true },
- { "agks150.com", true },
- { "agks168.com", true },
- { "agks18.com", true },
- { "agks188.com", true },
- { "agks19.com", true },
- { "agks2.com", true },
- { "agks3.com", true },
- { "agks4.com", true },
- { "agks666.com", true },
- { "agks68.com", true },
- { "agks8.com", true },
- { "agks88.com", true },
- { "agks89.com", true },
- { "agks9.com", true },
- { "agks96.com", true },
- { "agks98.com", true },
- { "agks988.com", true },
- { "agks99.com", true },
- { "agks998.com", true },
- { "agktest1.ga", true },
- { "aglc6.com", true },
- { "aglc88.com", true },
- { "aglh.com", true },
- { "agliamici.it", true },
- { "aglucky.com", true },
- { "agm2525.com", true },
- { "agm4545.com", true },
- { "agm8383.com", true },
- { "agnesk.blog", true },
- { "agonswim.com", true },
- { "agoodmind.com", true },
- { "agoravox.fr", true },
- { "agoravox.it", true },
- { "agoravox.tv", true },
- { "agouraelectrical.com", true },
- { "agouraelectrician.com", true },
- { "agouraexteriorlighting.com", true },
- { "agourahillselectric.com", true },
- { "agourahillselectrical.com", true },
- { "agourahillselectrician.com", true },
- { "agourahillsexteriorlighting.com", true },
- { "agourahillslandscapelighting.com", true },
- { "agourahillslighting.com", true },
- { "agourahillsoutdoorlighting.com", true },
- { "agouralandscapelighting.com", true },
- { "agouralighting.com", true },
- { "agouraoutdoorlighting.com", true },
- { "agowa338.de", true },
- { "agproducts.co.uk", true },
- { "agpsn.com", true },
- { "agr.asia", true },
- { "agrarking.com", true },
- { "agrarking.de", true },
- { "agrarshop4u.de", true },
- { "agrekov.ru", true },
- { "agremo.com", true },
- { "agreor.com", true },
- { "agrichamber.com.ua", true },
- { "agriculture-schools.com", true },
- { "agrios.de", true },
- { "agriquads.nl", true },
- { "agrobaza.com.ua", true },
- { "agroconsultoraplus.com", true },
- { "agroline.by", true },
- { "agroplas.cf", true },
- { "agropotter.com.ua", true },
- { "agroxxi.ru", false },
- { "agroyard.com.ua", true },
- { "agsb.ch", false },
- { "agscinemas.com", true },
- { "agslot777.com", true },
- { "agsogou.com", true },
- { "agsun6.com", true },
- { "aguarani.com.br", true },
- { "aguiascarecas.org", true },
- { "agung-furniture.com", true },
- { "agvip1000.com", true },
- { "agvip168.com", true },
- { "agvip1888.com", true },
- { "agvip2001.com", true },
- { "agvip2008.com", true },
- { "agvip2013.com", true },
- { "agvip88.com", true },
- { "agvip8800.com", true },
- { "agvip986.com", true },
- { "agwa.name", true },
- { "agwin2.com", true },
- { "agwin7.com", true },
- { "agwin777.com", true },
- { "agwin8.com", true },
- { "agwin9.com", true },
- { "agworkers.com", true },
- { "agy.cl", true },
- { "agyacht.club", true },
- { "ahawkesrealtors.com", true },
- { "ahd.com", false },
- { "ahegao.ca", true },
- { "ahfazahmed.net", true },
- { "ahj.no", true },
- { "ahkubiak.ovh", false },
- { "ahlaejaba.com", true },
- { "ahlstrom-filters.com", true },
- { "ahlz.sk", true },
- { "ahmad.works", true },
- { "ahmedcharles.com", true },
- { "ahmerjamilkhan.org", true },
- { "ahmetozer.org", true },
- { "ahollamby.com", true },
- { "ahosi.com", true },
- { "ahoy.travel", true },
- { "ahoyconference.com", true },
- { "ahtuxpk.ru", true },
- { "ahughes03.com", true },
- { "ahxxm.com", false },
- { "ai-cuisine.fr", true },
- { "ai-english.jp", true },
- { "ai-media.tv", true },
- { "ai-soft.co.jp", true },
- { "ai.gov", true },
- { "aianipid.ee", true },
- { "aiasesoriainmobiliaria.com", true },
- { "aiat.net", true },
- { "aibenzi.com", true },
- { "aid-web.ch", true },
- { "aidanapple.com", true },
- { "aidanmitchell.co.uk", true },
- { "aidanmitchell.uk", true },
- { "aidanmontare.net", true },
- { "aidanpr.com", true },
- { "aidanpr.net", true },
- { "aidarikako.com", true },
- { "aiden.cool", true },
- { "aiden.link", false },
- { "aidhan.net", true },
- { "aidi-ahmi.com", true },
- { "aidmycomputer.com", true },
- { "aids.gov", true },
- { "aie.de", true },
- { "aievaluare.ro", true },
- { "aifriccampbell.com", true },
- { "aigcev.org", true },
- { "aigenpul.se", true },
- { "aigner-club.com", true },
- { "aigner-club.de", true },
- { "aignerimage.de", true },
- { "aignermunich.com", true },
- { "aignermunich.de", true },
- { "aignermunich.jp", true },
- { "aiinsurance.io", true },
- { "aiinsurance.xyz", true },
- { "aijsk.com", true },
- { "aikenpromotions.com", true },
- { "aiki.de", true },
- { "aiki.do", true },
- { "aiki.tk", false },
- { "aikido-club-limburg.de", true },
- { "aikido-kiel.de", true },
- { "aikido-linz.at", true },
- { "aikido-wels.at", true },
- { "ailitonia.com", true },
- { "aimare-web.tk", true },
- { "aimax.com", true },
- { "aimd.tech", true },
- { "aimeeandalec.com", true },
- { "aimgroup.co.tz", true },
- { "aimi-salon.com", true },
- { "aimiastestseries.com", true },
- { "aimotive.com", true },
- { "aimstoreglobal.com", true },
- { "ainfographie.com", true },
- { "ainvest.de", true },
- { "ainzu.net", true },
- { "aiois.com", true },
- { "aipbarcelona.com", true },
- { "aipi.de", true },
- { "air-craftglass.com", true },
- { "air-shots.ch", false },
- { "air-techniques.fr", true },
- { "air-we-go.co.uk", true },
- { "airanyumi.net", true },
- { "airbnb.ae", true },
- { "airbnb.at", true },
- { "airbnb.be", true },
- { "airbnb.biz", true },
- { "airbnb.ca", true },
- { "airbnb.cat", true },
- { "airbnb.ch", true },
- { "airbnb.cl", true },
- { "airbnb.cn", true },
- { "airbnb.co.cr", true },
- { "airbnb.co.id", true },
- { "airbnb.co.il", true },
- { "airbnb.co.in", true },
- { "airbnb.co.kr", true },
- { "airbnb.co.nz", true },
- { "airbnb.co.uk", true },
- { "airbnb.co.ve", true },
- { "airbnb.com", true },
- { "airbnb.com.ar", true },
- { "airbnb.com.au", true },
- { "airbnb.com.bo", true },
- { "airbnb.com.br", true },
- { "airbnb.com.bz", true },
- { "airbnb.com.cn", true },
- { "airbnb.com.co", true },
- { "airbnb.com.ec", true },
- { "airbnb.com.gt", true },
- { "airbnb.com.hk", true },
- { "airbnb.com.hn", true },
- { "airbnb.com.hr", true },
- { "airbnb.com.kh", true },
- { "airbnb.com.mt", true },
- { "airbnb.com.my", true },
- { "airbnb.com.ni", true },
- { "airbnb.com.pa", true },
- { "airbnb.com.pe", true },
- { "airbnb.com.ph", true },
- { "airbnb.com.py", true },
- { "airbnb.com.sg", true },
- { "airbnb.com.sv", true },
- { "airbnb.com.tr", true },
- { "airbnb.com.tw", true },
- { "airbnb.com.ua", true },
- { "airbnb.com.vn", true },
- { "airbnb.cz", true },
- { "airbnb.de", true },
- { "airbnb.dk", true },
- { "airbnb.es", true },
- { "airbnb.fi", true },
- { "airbnb.fr", true },
- { "airbnb.gr", true },
- { "airbnb.gy", true },
- { "airbnb.hu", true },
- { "airbnb.ie", true },
- { "airbnb.is", true },
- { "airbnb.it", true },
- { "airbnb.jp", true },
- { "airbnb.la", true },
- { "airbnb.lu", true },
- { "airbnb.mx", true },
- { "airbnb.nl", true },
- { "airbnb.no", true },
- { "airbnb.pl", true },
- { "airbnb.pt", true },
- { "airbnb.ru", true },
- { "airbnb.se", true },
- { "airbnb.tools", true },
- { "airbnbchina.cn", true },
- { "airbnbopen.com", true },
- { "airborne-inflatables.co.uk", true },
- { "airbossofamerica.com", true },
- { "airbrake.io", true },
- { "aircomms.com", true },
- { "airconditioning-sandton.co.za", true },
- { "airconrandburg.co.za", true },
- { "airconsalberton.co.za", true },
- { "airconsfourways.co.za", true },
- { "airconsmidrand.co.za", true },
- { "airductclean.com", false },
- { "airductcleaninggrandprairie.com", true },
- { "airductcleaningirving.com", true },
- { "airdur.eu", true },
- { "aireaseleaks.org", true },
- { "airetvie.com", true },
- { "airfax.io", true },
- { "airfocused.com", true },
- { "airhart.me", true },
- { "airhelp.com", true },
- { "airhorn.de", true },
- { "airi-tabei.com", true },
- { "airicy.com", true },
- { "airikai.com", true },
- { "airlibre-parachutisme.com", true },
- { "airlinesreservation.org", true },
- { "airmail.cc", false },
- { "airmash.online", true },
- { "airmaxinflatables.com", true },
- { "airpbx.com", true },
- { "airplay-inflatable-hire.co.uk", true },
- { "airplayradio.nl", true },
- { "airport-charlotte.com", true },
- { "airportal.cn", false },
- { "airrestoration.ch", true },
- { "airship.com", true },
- { "airslate.com", true },
- { "airsnore.com", true },
- { "airsoft.ch", true },
- { "airswap.io", true },
- { "airtable.com", true },
- { "airtec-france.fr", true },
- { "airtimerewards.co.uk", false },
- { "airtoolaccessoryo.com", true },
- { "airventilation.ca", true },
- { "airvpn.org", true },
- { "airvuz.com", true },
- { "airwaystorage.net", true },
- { "airweb.top", true },
- { "airwolf.tk", true },
- { "airwolfthemes.com", true },
- { "airwrenchei.com", true },
- { "airy.host", true },
- { "ais.fashion", true },
- { "aisance-co.com", true },
- { "aisi316l.net", true },
- { "aistockcharts.com", true },
- { "aistrope.com", true },
- { "ait.com.ar", true },
- { "aiticon.com", true },
- { "aitosoftware.com", true },
- { "aitrust.ro", true },
- { "aiva.ai", true },
- { "aivan.ai", true },
- { "aivd.lol", true },
- { "aiwansky.com", true },
- { "aiwosq.cn", true },
- { "aizxxs.com", true },
- { "aizxxs.net", true },
- { "aj-foster.com", true },
- { "aja.de", true },
- { "ajarope.com", true },
- { "ajaxed.net", true },
- { "ajaxtime.tk", true },
- { "ajbenet.com", true },
- { "ajbouncycastles.co.uk", true },
- { "ajdiaz.me", true },
- { "ajeventhire.co.uk", true },
- { "ajfite.com", true },
- { "ajgroup-me.com", false },
- { "ajhstamps.co.uk", true },
- { "ajiaojr.info", true },
- { "ajiaojr.io", true },
- { "ajiaojr.me", true },
- { "ajiaojr.net", true },
- { "ajiboye.com", true },
- { "ajl.io", true },
- { "ajnah.net", true },
- { "ajnasz.hu", true },
- { "ajs5.com", true },
- { "ajsb85.com", true },
- { "ajt.io", true },
- { "ajtatum.com", true },
- { "ajwebsolutions.com", true },
- { "ak-varazdin.hr", true },
- { "ak-webit.de", true },
- { "ak47-miyamoto.spdns.org", true },
- { "aka.ms", true },
- { "akaal.pw", true },
- { "akachanikuji.com", true },
- { "akademeia.moe", true },
- { "akademie-frankfurt.de", true },
- { "akalashnikov.ru", true },
- { "akamon.ac.jp", true },
- { "akaoma.com", true },
- { "akasha.world", true },
- { "akashdsouza.now.sh", true },
- { "akay.me", true },
- { "akdusekbudil.cz", true },
- { "akeenext.com", true },
- { "akeenshort.com", true },
- { "akerboom.family", true },
- { "akerboom.org", true },
- { "akfoundationindia.com", true },
- { "akhabar.tk", true },
- { "akhealthconnection.com", false },
- { "akhomesforyou.com", true },
- { "akihito.com", true },
- { "akijo.de", true },
- { "akinix.com", true },
- { "akiym.com", true },
- { "akj.io", true },
- { "akkade.be", true },
- { "akkbouncycastles.co.uk", true },
- { "akostecki.de", true },
- { "akoww.de", false },
- { "akoya.fi", true },
- { "akplates.org", true },
- { "akr.io", true },
- { "akr.services", true },
- { "akrep.com", true },
- { "akropolis-ravensburg.de", true },
- { "aksehir.bel.tr", true },
- { "akselinurmio.fi", true },
- { "akshi.in", true },
- { "aktin.cz", true },
- { "aktin.sk", true },
- { "aktion-vielfalt.ch", true },
- { "aktiv-naturheilmittel.at", false },
- { "aktiv-naturheilmittel.ch", true },
- { "aktiv-naturheilmittel.de", true },
- { "aktivace.eu", true },
- { "aktive-arbeitslose.at", true },
- { "aktivierungscenter.de", true },
- { "akuislam.com", true },
- { "akukas.com", true },
- { "akuston.eu", true },
- { "akutun.cl", true },
- { "akvitens.com.ua", true },
- { "akvorrat.at", true },
- { "al-f.net", true },
- { "al3abmizo.com", true },
- { "alab.space", true },
- { "alabamaag.gov", true },
- { "alabamacoastalradiology.com", true },
- { "alabamadebtrelief.org", true },
- { "alaboard.com", true },
- { "alabordage.fr", true },
- { "alacriti.com", true },
- { "alacritylaw.com", true },
- { "aladdin.ie", true },
- { "aladdinschools.appspot.com", true },
- { "aladintechnologies.tk", true },
- { "alainbaechlerphotography.ch", false },
- { "alainfrancois.eu", true },
- { "alainfrancois.nl", true },
- { "alainmargot.ch", false },
- { "alainodea.com", true },
- { "alainwolf.ch", true },
- { "alainwolf.net", true },
- { "alair.cn", false },
- { "alalivre.cf", true },
- { "alamo-analytics.com", true },
- { "alamowellnessalliance.com", true },
- { "alana.com.ua", true },
- { "alanberger.me.uk", true },
- { "aland.co.uk", true },
- { "alandoyle.com", true },
- { "alanhua.ng", true },
- { "alaninkenya.org", true },
- { "alantica.ga", true },
- { "alarelleimpresiones.com", true },
- { "alargarlavida.com", true },
- { "alarmat.pl", true },
- { "alarmcomplete.co.uk", true },
- { "alarna.de", true },
- { "alasdelalma.com.co", true },
- { "alaskabuylocal.org", true },
- { "alaskafishinglodges.net", true },
- { "alaskajewelry.com", true },
- { "alastairs-place.net", true },
- { "alatkesehatan.tk", true },
- { "alaturkaonline.com", true },
- { "alaunus.com", true },
- { "alb-flirt.de", true },
- { "albagora.nl", true },
- { "albalatedelarzobispo.tk", true },
- { "albanesi.it", true },
- { "albanycountydems.com", true },
- { "albatrosswear.com", true },
- { "albbounce.co.uk", true },
- { "albergolafiorita.com", true },
- { "albersdruck.de", true },
- { "albert-yu.com", true },
- { "albertathome.org", true },
- { "albertcuyp-markt.amsterdam", true },
- { "albertforfuture.de", true },
- { "albertinum-goettingen.de", true },
- { "alberts-blatt.de", true },
- { "albilaga.id", true },
- { "albion2.org", true },
- { "albionfaeries.org.uk", true },
- { "alboweb.nl", true },
- { "albstaedter-kids-cup.de", true },
- { "alca31.com", false },
- { "alcamilo.cloudns.cc", true },
- { "alcatelonetouch.us", true },
- { "alchemy-media-marketing.com", true },
- { "alchemy.gr", true },
- { "alchemyvfx.com", true },
- { "alchimic.ch", false },
- { "alco-united.com", true },
- { "alcobendas.tk", true },
- { "alcoholapi.com", true },
- { "alcolecapital.com", true },
- { "alcouponest.com", true },
- { "alcubillas.tk", true },
- { "aldiabcs.com", true },
- { "aldien.com.br", true },
- { "aldomedia.com", true },
- { "aldorr.net", false },
- { "aldous-huxley.com", true },
- { "alea.xyz", true },
- { "alecpap.com", true },
- { "alecpapierniak.com", true },
- { "alecrust.com", true },
- { "aleftinka.tk", true },
- { "alejarod.com", true },
- { "alek.in", true },
- { "aleksib.fi", true },
- { "alela.fr", true },
- { "alentadoras.com", true },
- { "aleph.land", true },
- { "alertboxx.com", true },
- { "alertonline.nl", true },
- { "alerts.sg", true },
- { "alertwire.com", true },
- { "alesia-formation.fr", true },
- { "alessandrobasi.it", true },
- { "alessandroonline.com.br", true },
- { "alessandrotravel.com", true },
- { "alessandroz.ddns.net", true },
- { "aletm.it", true },
- { "alevi.tk", true },
- { "alex-n.net", true },
- { "alex-ross.co.uk", true },
- { "alex4386.us", true },
- { "alex97000.de", true },
- { "alexander-beck.eu", true },
- { "alexandercanton.com", true },
- { "alexanderneng.de", true },
- { "alexanderschimpf.de", true },
- { "alexandra-schulze.de", true },
- { "alexandrastorm.com", true },
- { "alexandreguarita.com.br", true },
- { "alexbaker.org", true },
- { "alexberts.ch", true },
- { "alexcoman.com", true },
- { "alexdaniel.org", true },
- { "alexey-shamara.ru", true },
- { "alexeykopytko.com", true },
- { "alexfabian.myftp.org", true },
- { "alexgaynor.net", true },
- { "alexgebhard.com", true },
- { "alexglover.co.uk", true },
- { "alexhalderman.com", true },
- { "alexhd.de", true },
- { "alexisabarca.com", true },
- { "alexiskoustoulidis.com", true },
- { "alexjett.com", true },
- { "alexlambertz.de", true },
- { "alexlouden.com", true },
- { "alexmerkel.com", true },
- { "alexmerkel.me", true },
- { "alexmerkel.xyz", true },
- { "alexmroberts.net", true },
- { "alexn.org", true },
- { "alexpnixon.com", true },
- { "alexpotter.net", true },
- { "alexs.de", true },
- { "alexsandrasverden.cf", true },
- { "alexschroeder.ch", true },
- { "alexsergeyev.com", true },
- { "alexsexton.com", true },
- { "alextaffe.com", true },
- { "alextjam.es", true },
- { "alextsang.net", true },
- { "alexvetter.de", true },
- { "alexwardweb.com", true },
- { "alexyang.me", true },
- { "alfa-host.ml", true },
- { "alfa-tech.su", true },
- { "alfacharlie.co", true },
- { "alfadlmedical.com", true },
- { "alfadlmedical.net", true },
- { "alfaperfumes.com.br", true },
- { "alfaproweb.fr", true },
- { "alfastone.com.ua", true },
- { "alfavit.cf", true },
- { "alforto.nl", true },
- { "alfratehotelcampiglio.it", true },
- { "alfred-figge.de", true },
- { "alfredapp.com", true },
- { "alftrain.com", true },
- { "algeriepart.com", true },
- { "alghanimcatering.com", true },
- { "algoentremanos.com", true },
- { "algolia.com", true },
- { "algoritmus-uspechu.cz", true },
- { "algoritmususpechu.cz", true },
- { "algustionesa.com", true },
- { "aliacraft.net", true },
- { "aliancapelobrasil.rio.br", true },
- { "aliantsoft.pl", true },
- { "aliaswp.com", true },
- { "alibamu.com", true },
- { "alibamu.org", true },
- { "alibangash.com", true },
- { "alice-memorial.de", true },
- { "alice-noutore.com", true },
- { "alice.tw", true },
- { "alicemaywebdesign.com.au", true },
- { "alicestudio.it", true },
- { "alicetone.net", true },
- { "aliefirfany.com", true },
- { "alieke.design", true },
- { "alien.bz", true },
- { "alien6.com", true },
- { "alienation.biz", false },
- { "alienstat.com", true },
- { "alighierirescaldina.it", true },
- { "alignrs.com", true },
- { "alikulov.me", true },
- { "alimentsduquebecaumenu.com", true },
- { "alinasmusicstudio.com", true },
- { "alinbu.net", true },
- { "alineonline.tk", true },
- { "aliorange.com", true },
- { "alisondavenport.ga", true },
- { "alisonisrealestate.com", true },
- { "alisonlitchfield.com", true },
- { "alistairstowing.com", true },
- { "alitec.it", true },
- { "aliv.biz", true },
- { "alix-board.de", true },
- { "alize-theatre.ch", false },
- { "aliziolaw.com", true },
- { "aljaspod.ch", true },
- { "aljaspod.com", true },
- { "aljaspod.hu", true },
- { "aljaspod.net", true },
- { "aljaspod.org", true },
- { "aljweb.com", true },
- { "alkacoin.net", true },
- { "alkami.com", true },
- { "alkamitech.com", true },
- { "alkemi-si.fr", true },
- { "alko-centr.ru", true },
- { "alko-stop.ml", true },
- { "alkopedia.tk", true },
- { "alkor.tk", true },
- { "alkusin.net", true },
- { "all-connect.net", false },
- { "all-fashion-schools.com", true },
- { "all-markup-news.com", true },
- { "all-things.tk", true },
- { "all4hardware4u.de", true },
- { "all878.com", true },
- { "allaboutfunuk.com", true },
- { "allaboutgreg.net", true },
- { "allaboutreligions.tk", true },
- { "allaboutswing.co.uk", true },
- { "allaboutswing.com", true },
- { "allactioneventhire.co.uk", true },
- { "allamericanmuslim.com", true },
- { "allamericatrans.com", true },
- { "allangirvan.net", true },
- { "allanta.be", true },
- { "allarmi.roma.it", true },
- { "allbenjoy.de", true },
- { "allbestcbdoil.com", true },
- { "allbetgame.cn", true },
- { "allbetgaming.com", true },
- { "allbigdicks.com", true },
- { "allbounceandplay.co.uk", true },
- { "allbouncesurrey.co.uk", true },
- { "allbrandbrand.com", true },
- { "allbursaries.co.za", true },
- { "allbusiness.com", true },
- { "allcapa.org", true },
- { "allcarecorrectionalpharmacy.com", true },
- { "allcarepharmacy.com", true },
- { "allcarespecialty.pharmacy", true },
- { "allcinema.net", true },
- { "allcleaningservice.org", true },
- { "allcleanservices.ca", true },
- { "allcloud.com", true },
- { "allcountyins.com", true },
- { "allcovered.nl", true },
- { "allcoveredbyac.com", true },
- { "alldewall.de", true },
- { "alle-zonvakanties.nl", true },
- { "alle.bg", true },
- { "allemoz.com", true },
- { "allemoz.fr", true },
- { "allenarchive.com", true },
- { "allenscaravans.co.uk", true },
- { "allensun.org", true },
- { "allentertainment.de", true },
- { "allenwillis.ga", true },
- { "allerstorfer.at", true },
- { "alles-nur-ge.cloud", true },
- { "alleskomtgoed.org", true },
- { "allfaucet.ml", true },
- { "allfoodrecipes.ga", true },
- { "allforyou.at", true },
- { "allfundsconnect.com", true },
- { "allgaragefloors.com", true },
- { "allgosts.ru", true },
- { "allgovernmentjobs.in", true },
- { "allgreenturf.com.au", true },
- { "allhard.org", true },
- { "allhomemueble.com", true },
- { "allhsa.com", true },
- { "alliance-psychiatry.com", true },
- { "allianceexpressmail.com", true },
- { "alliances-globalsolutions.com", false },
- { "allied.sh", true },
- { "alliedfrozenstorage.com", true },
- { "alliedpavers.com", true },
- { "allinagency.com", true },
- { "allincoin.shop", true },
- { "allinone-ranking150.com", true },
- { "allinsuranceinformation.com", true },
- { "allis.studio", true },
- { "allitcrm.sytes.net", true },
- { "alljamin.com", true },
- { "allladyboys.com", true },
- { "allmajestic.com", true },
- { "allmousepads.com", true },
- { "allnovosibirsk.tk", true },
- { "allns.fr", true },
- { "allo-credit.ch", false },
- { "allo-luxembourg.tk", true },
- { "allofthestops.com", true },
- { "allontanamentovolatili.it", true },
- { "allontanamentovolatili.milano.it", true },
- { "allopurinol300mg.ml", true },
- { "alloutsec.com", true },
- { "alloverthehill.com", true },
- { "allphaseclean.com", true },
- { "allplayer.tk", true },
- { "allpointsblog.com", true },
- { "allpointsheating.com", true },
- { "allproptonline.com", true },
- { "allpussynow.com", true },
- { "allrad-buck.de", true },
- { "allright.tk", true },
- { "allroundpvp.net", true },
- { "allroundtechnology.com", true },
- { "allroundtechnology.nl", true },
- { "allsaints.church", true },
- { "allsearch.io", true },
- { "allseasonswaterproofing.com", true },
- { "allsoulinc.com", true },
- { "allsoulmobile.com", true },
- { "allsoultech.com", true },
- { "allspinecare.com", true },
- { "allstakesupply.com.au", true },
- { "allstarautokiaparts.com", true },
- { "allstarcashforcars.com", true },
- { "allstarquilts.com", true },
- { "allsun.online", true },
- { "allsurpl.us", true },
- { "allsync.com", true },
- { "allsync.nl", false },
- { "allteach.co.uk", true },
- { "allterrainfence.com", true },
- { "allthecryptonews.com", true },
- { "alltherooms.com", true },
- { "alltherooms.es", true },
- { "allthethings.co.nz", true },
- { "allthings.me", true },
- { "allthingswild.co.uk", true },
- { "alltubedownload.net", true },
- { "allurebikerental.com", true },
- { "allurescarves.com", true },
- { "alluvion.studio", true },
- { "allweatherlandscaping.net", true },
- { "almaatlantica.com", true },
- { "almamet.com", true },
- { "almanssur.com", true },
- { "almatinki.com", true },
- { "almavios.com", false },
- { "almeeraloyalty.com", true },
- { "almenrausch-pirkhof.de", true },
- { "almisnedrm.com", true },
- { "almostobjective.com", true },
- { "almusbahperfume.com", true },
- { "almut-zielonka.de", true },
- { "alodocuratelemensagem.com.br", true },
- { "aloesoluciones.com.ar", true },
- { "alohapartyevents.co.uk", true },
- { "alonas.cf", true },
- { "alonas.ga", true },
- { "alonas.gq", true },
- { "alonas.ml", true },
- { "alonas.tk", true },
- { "alonetone.com", true },
- { "alov.blog", true },
- { "alp.od.ua", true },
- { "alpca.org", true },
- { "alpencam.com", true },
- { "alpencams.com", true },
- { "alpencams.net", true },
- { "alpengreis.ch", true },
- { "alpertron.com.ar", true },
- { "alpes-deis-tools.com", true },
- { "alpha-ag.ru", true },
- { "alpha-bet.com.ua", true },
- { "alpha-force.net", false },
- { "alpha-premium.com", true },
- { "alpha-shop.gr", true },
- { "alpha.ch", true },
- { "alpha88uat.com", true },
- { "alphaantileak.net", true },
- { "alphabetsigns.com", true },
- { "alphabouncycastles.co.uk", true },
- { "alphachat.net", true },
- { "alphadefense.co.za", true },
- { "alphaetomega3d.fr", true },
- { "alphafiduciaryservices.ch", false },
- { "alphainflatablehire.com", true },
- { "alphamedphysicians.com", true },
- { "alphanodes.com", true },
- { "alphapengu.in", true },
- { "alphaperfumes.com.br", true },
- { "alphapoker.ru", true },
- { "alpharail.se", true },
- { "alpharoofga.com", true },
- { "alpharotary.com", true },
- { "alphasall.com", true },
- { "alphasib.ru", true },
- { "alphassl.de", true },
- { "alphatrash.de", true },
- { "alphavote-avex.com", true },
- { "alphavote.com", true },
- { "alphera.nl", true },
- { "alphie.me", true },
- { "alphipneux.fr", true },
- { "alpine-holiday.de", true },
- { "alpinechaletrental.com", true },
- { "alpinehighlandrealty.com", true },
- { "alpineplumbingandrooter.com", true },
- { "alpinepubliclibrary.org", true },
- { "alpinestarmassage.com", true },
- { "alplogopedia.it", true },
- { "alquds.edu", true },
- { "alquiaga.com", true },
- { "alrait.com", true },
- { "alre-outillage.fr", true },
- { "als-japan.com", true },
- { "alsops.cf", true },
- { "alstertouch.com", true },
- { "alstertouch.de", true },
- { "alt-three.com", true },
- { "alt.org", true },
- { "altair.fi", true },
- { "altapina.com", false },
- { "altaplana.be", true },
- { "altaynews.kz", true },
- { "altco.group", true },
- { "altedirect.com", true },
- { "alteiria.fr", true },
- { "alter-news.fr", true },
- { "alteralife.eu", true },
- { "alteraro.org", true },
- { "alteria.xyz", true },
- { "alternador.com.br", true },
- { "alternative.bike", true },
- { "alternative.hosting", true },
- { "alternativebit.fr", true },
- { "alternativehosting.com", true },
- { "alternativeinternet.ca", true },
- { "alternativet.party", true },
- { "alternativetomeds.com", true },
- { "alternatiwa.tk", true },
- { "alternatyv.ch", true },
- { "alterspalter.de", true },
- { "altertek.org", true },
- { "altes-sportamt.de", true },
- { "altesses.eu", true },
- { "altestore.com", true },
- { "altijdleroy.nl", true },
- { "altijdleroy.online", true },
- { "altiup.com", true },
- { "altkremsmuensterer.at", true },
- { "altmaestrat.es", true },
- { "altmann-systems.de", true },
- { "altoa.cz", true },
- { "altonblom.com", true },
- { "altopartners.com", true },
- { "altopia.com", true },
- { "altorise.com", true },
- { "altospam.com", true },
- { "altphotos.com", true },
- { "altrui.st", true },
- { "altsdigital.com", true },
- { "altstipendiaten.de", true },
- { "altunbas.info", true },
- { "aluminium-express.ru", true },
- { "alumni-kusa.jp", true },
- { "alupferd.de", true },
- { "aluroof.eu", true },
- { "alushta-vostorg.tk", true },
- { "alvaiazere.net", true },
- { "alvcs.com", true },
- { "alvicom.hu", true },
- { "alvimedika.com.ua", true },
- { "alvosec.com", true },
- { "alwa.fi", true },
- { "alwayshowher.tk", true },
- { "alwayslookingyourbest.com", true },
- { "alwaysmine.fi", true },
- { "alwayswanderlust.com", true },
- { "alxlegal.com", true },
- { "alxu.ca", true },
- { "alxyjc.net", true },
- { "alyanak.ca", true },
- { "alyoung.com", true },
- { "alza.at", true },
- { "alza.co.uk", true },
- { "alza.cz", true },
- { "alza.de", true },
- { "alza.hu", true },
- { "alza.sk", true },
- { "alzashop.com", true },
- { "alziamoiltetto.it", true },
- { "am-dd.com", true },
- { "am-executive-consulting.com", true },
- { "am-globalgroup.com", true },
- { "am156.com", true },
- { "am22i6xaf1m2a5m9k.xyz", true },
- { "am2s.fr", true },
- { "am6118.com", true },
- { "am615.am", true },
- { "am8.ag", true },
- { "am8.com", true },
- { "am8009.com", true },
- { "am8028.com", true },
- { "am8136.com", true },
- { "am88.ag", true },
- { "am8866m.com", true },
- { "am8895.com", true },
- { "ama.ne.jp", true },
- { "amaderelectronics.com", true },
- { "amadoraslindas.com", true },
- { "amagdic.com", true },
- { "amagical.net", false },
- { "amaiz.com", true },
- { "amalficoastransfers.it", true },
- { "amalfilapiazzetta.it", true },
- { "amalfipositanoboatrental.com", true },
- { "amalfirock.it", true },
- { "amalfitabula.it", true },
- { "amanatrustbooks.org.uk", true },
- { "amandadamsphotography.com", true },
- { "amandahamilton.tk", true },
- { "amandasage.ca", true },
- { "amanduscommunication.com", true },
- { "amani-kinderdorf.de", true },
- { "amaranthinewanderlust.com", true },
- { "amardham.org", true },
- { "amaresq.com", true },
- { "amarreconbrujeria.com", true },
- { "amarresconvudu.com", true },
- { "amarresimposibles.com", true },
- { "amarresperuanos.com", true },
- { "amarresydominio.com", true },
- { "amartinz.at", true },
- { "amateri.com", true },
- { "amateurpornhours.com", true },
- { "amateurradionotes.com", true },
- { "amateurvoicetalent.com", true },
- { "amati.solutions", true },
- { "amato.tk", true },
- { "amatsuka.com", true },
- { "amauf.de", true },
- { "amautorepairwa.com", true },
- { "amazetimberfurniture.com.au", true },
- { "amazili-communication.com", true },
- { "amazing-castles.co.uk", true },
- { "amazingraymond.com", true },
- { "amazingraymond.com.au", true },
- { "amb.tf", true },
- { "amb8.net", true },
- { "ambacoin.io", true },
- { "ambassify.com", true },
- { "ambassify.eu", true },
- { "amberalert.gov", true },
- { "amberglowleisure.co.uk", true },
- { "amberlightleisure.com", true },
- { "amberoad.tk", true },
- { "amberwiz.com", true },
- { "ambholding-usedcars.be", false },
- { "ambiente.one", true },
- { "ambiq.nl", true },
- { "ambra.net.au", true },
- { "ambra.net.nz", true },
- { "ambulanza.roma.it", true },
- { "ambulari.cz", true },
- { "amcangroup.com", true },
- { "amcfirst.com", true },
- { "amchainitiative.org", true },
- { "amcs.website", true },
- { "amdm.ru", true },
- { "amdouglas.com", true },
- { "amechancez.work", true },
- { "ameego.com", true },
- { "ameego.it", true },
- { "ameego.net", true },
- { "ameego.nl", true },
- { "ameego.org", true },
- { "ameeradubai.com", true },
- { "amees.me", false },
- { "ameeventos.pt", true },
- { "ameliemarieintokyo.com", true },
- { "amello.de", true },
- { "amendine.fr", true },
- { "ameninalaceira.com.br", true },
- { "america.gov", true },
- { "americafamilylawcenter.org", true },
- { "americagambles.com", true },
- { "american-school-search.com", true },
- { "american.dating", true },
- { "americanartwarehouse.com", true },
- { "americandetour.com", true },
- { "americanflooring.co", true },
- { "americanfoundationbr.com", true },
- { "americanindiannursing.com", true },
- { "americanmediainstitute.com", true },
- { "americanreservations.us", true },
- { "americans.cam", true },
- { "americansforcommunitydevelopment.org", true },
- { "americanunicornparty.tk", true },
- { "americanwater.lk", true },
- { "americasbasementcontractor.com", true },
- { "americasdirector.com", true },
- { "americkykongres.cz", true },
- { "americoadvogados.com.br", true },
- { "americorps.gov", true },
- { "ameriikanpoijat.org", true },
- { "amerika-forum.de", true },
- { "amerimex.cc", true },
- { "amerion.nl", true },
- { "ameriondental.nl", true },
- { "amesgen.de", true },
- { "amethystdevelopment.co.uk", true },
- { "amf.to", true },
- { "amforst-ha.ddns.net", true },
- { "amforst.ddns.net", true },
- { "amg-microwave.com", true },
- { "amh-entertainments.co.uk", true },
- { "ami-de-bastanes.fr", true },
- { "amianto.roma.it", true },
- { "amica-travel.com", true },
- { "amica.it", true },
- { "amicalecanyon.ch", false },
- { "amiciperlatesta.it", true },
- { "amifoundation.net", true },
- { "amigosencanada.com", true },
- { "amigucrochet.com", true },
- { "amikootours.com", true },
- { "amineptine.com", true },
- { "amion.com.ua", true },
- { "amionvpn.com", true },
- { "amir-heinisch.de", true },
- { "amirasyraf.com", true },
- { "amirautos.com", false },
- { "amirmahdy.com", true },
- { "amitabhsirkiclasses.org.in", true },
- { "amitpatra.com", false },
- { "amj74-informatique.fr", true },
- { "amjinc.ca", true },
- { "amleather.pl", true },
- { "amm6e.com", true },
- { "ammanagingdirectors.com", true },
- { "amministratore.biz", true },
- { "amministratore.roma.it", true },
- { "amministratorecondominio.roma.it", true },
- { "ammobrand.com", true },
- { "amnesty-bf.org", true },
- { "amnesty.org.au", true },
- { "amnesy.fr", true },
- { "amobileway.co.uk", true },
- { "amoozesh98.com", true },
- { "amoozesh98.ir", true },
- { "amorgos-aegialis.com", true },
- { "amorgosrentandgo.gr", true },
- { "amorim.ca", true },
- { "amoryurgentcare.com", true },
- { "amosng.com", true },
- { "amoxil.cf", true },
- { "amper.kharkov.ua", true },
- { "amperaa.net", true },
- { "ampersandnbspsemicolon.com", true },
- { "ampgroep.nl", true },
- { "amphetamines.org", true },
- { "amphost.tk", true },
- { "amplead.com", true },
- { "ampleroads.com", true },
- { "ampproject.com", true },
- { "ampproject.org", true },
- { "amputated.tk", true },
- { "amrcaustin.com", true },
- { "amrcla.com", true },
- { "amrff.com", false },
- { "amruta.org", true },
- { "ams-web-qa.azurewebsites.net", true },
- { "ams.co.rs", true },
- { "amsel305nc.ddnss.de", true },
- { "amsfoodhk.com", true },
- { "amstelveentje.nl", true },
- { "amsterdamian.com", true },
- { "amt-taxfrance.com", true },
- { "amtsinfo.in", true },
- { "amuq.net", true },
- { "amuraimpianti.it", true },
- { "amusa.cl", true },
- { "amv.su", true },
- { "amvip9.com", true },
- { "amymabel.com", true },
- { "amyria.jp", true },
- { "amyyeung.com", true },
- { "amzmall.com", true },
- { "amzn.rocks", true },
- { "an7hrax.se", true },
- { "anabolickdieta.ga", true },
- { "anabolics.tk", true },
- { "anachristinarodriguez.com", true },
- { "anacreon.de", true },
- { "anadiyogacentre.com", true },
- { "anageorgia.com", true },
- { "anagramma.tk", true },
- { "anaiscoachpersonal.es", true },
- { "anaisfae.art", true },
- { "anakin.ca", true },
- { "analgesia.net", true },
- { "analisi-logica.it", true },
- { "analisilaica.it", true },
- { "analogist.net", true },
- { "analteengirls.net", true },
- { "analytics-shop.com", true },
- { "analyticsinmotion.com", true },
- { "analyticum.at", true },
- { "analyticum.com", true },
- { "analyticum.de", true },
- { "analyticum.eu", true },
- { "analyticum.net", true },
- { "anamelikian.com", true },
- { "anandchowdhary.com", true },
- { "anankecosmetics.com", true },
- { "ananswer.org", true },
- { "anantshri.info", true },
- { "ananyoo.com", true },
- { "anarchistischegroepnijmegen.nl", false },
- { "anarcho-copy.org", true },
- { "anarhija.tk", true },
- { "anarkhe.net", true },
- { "anasahr.be", true },
- { "anastasia-shamara.ru", true },
- { "anatoray.com", true },
- { "anayarealm.com", true },
- { "anblik.com", true },
- { "ance.lv", false },
- { "ancestramil.fr", true },
- { "anchev.net", true },
- { "anchorit.gov", true },
- { "anchovy.nz", false },
- { "anciennes-automobiles.fr", true },
- { "anciens.org", true },
- { "ancientnorth.com", true },
- { "ancientnorth.nl", true },
- { "ancolies-andre.com", false },
- { "anconaswine.com", true },
- { "and-stuff.nl", true },
- { "and.com", true },
- { "andalusierondreizen.nl", true },
- { "andariegocusco.com", true },
- { "andarpersassi.it", true },
- { "andel.info", false },
- { "anders.hamburg", true },
- { "andersonpowerservices.com", true },
- { "andersonshatch.com", true },
- { "andesnevadotours.com", true },
- { "andiplusben.com", true },
- { "anditi.com", true },
- { "andre-lategan.com", true },
- { "andre-otto.com", true },
- { "andrea-kiaora.de", true },
- { "andrea-m.me", true },
- { "andrea-wirthensohn.at", false },
- { "andreaassenti.it", true },
- { "andreaboero.it", true },
- { "andreadraghetti.it", true },
- { "andreagobetti.com", true },
- { "andreagourmet.it", true },
- { "andreamcnett.com", true },
- { "andreariccitraduzioni.it", true },
- { "andreas-kluge.eu", true },
- { "andreasfeusi.ch", true },
- { "andreasjanker.de", true },
- { "andreaskrasa.com", true },
- { "andreaslicht.nl", true },
- { "andreasolsson.se", true },
- { "andree.cloud", true },
- { "andrehansen.de", true },
- { "andrehazeswinactie.nl", true },
- { "andrei-nakov.org", true },
- { "andreina-atencio.com", true },
- { "andrelauzier.com", true },
- { "andreoliveira.io", true },
- { "andrespaz.com", true },
- { "andresrios.nl", true },
- { "andreundnina.de", true },
- { "andrew.fi", true },
- { "andrew.london", true },
- { "andrewbdesign.com", false },
- { "andrewbennett.ltd", true },
- { "andrewdaws.io", true },
- { "andrewensley.com", true },
- { "andrewimeson.com", true },
- { "andrewin.ru", true },
- { "andrewisidoro.co.uk", true },
- { "andrewjphotography.com", true },
- { "andrewlarson.org", true },
- { "andrewmichaud.com", true },
- { "andrewmichaud.me", true },
- { "andrewpeng.net", true },
- { "andrewprokos.com", true },
- { "andrewpucci.com", true },
- { "andrewrgoss.com", true },
- { "andrewryno.com", true },
- { "andrewsun.com", true },
- { "andrewtasso.com", true },
- { "andrewtchin.com", true },
- { "andrewwiggins.ca", true },
- { "andrey.red", true },
- { "andrey1p.ru", true },
- { "andreyjuravlev.ga", true },
- { "andreypopp.com", true },
- { "andreysmirnov.tk", true },
- { "andrianova.ml", true },
- { "andrisilberschmidt.ch", true },
- { "andro2id.com", true },
- { "andro4all.com", true },
- { "android.re", true },
- { "androide.com", true },
- { "androidhry.cz", true },
- { "androidkatalog.cz", true },
- { "androidnovinky.cz", true },
- { "androidservicetool.com", true },
- { "androidsis.com", true },
- { "androidtamer.com", true },
- { "androidtcpdump.com", true },
- { "androidtelefony.cz", true },
- { "androidzone.me", true },
- { "andromeda.se", true },
- { "andromedacenter.com", true },
- { "androticsdirect.com", true },
- { "androtix.com", true },
- { "andruvision.cz", true },
- { "andsat.org", true },
- { "andschwa.com", false },
- { "anduril.de", true },
- { "anduril.eu", true },
- { "andybrett.com", true },
- { "andyc.cc", true },
- { "andycrockett.io", true },
- { "andys-place.co.uk", true },
- { "andyson.at", true },
- { "andysroom.dynu.net", true },
- { "andyt.eu", true },
- { "andzia.art.pl", true },
- { "anedot-sandbox.com", true },
- { "anedot.com", true },
- { "anedot.space", true },
- { "anedot.xyz", true },
- { "aneebahmed.com", true },
- { "anekdot-pr.tk", true },
- { "anepsa.com.mx", true },
- { "aneslix.com", false },
- { "anetaben.nl", true },
- { "anewbite.com", true },
- { "anextraordinaryday.net", true },
- { "angehardy.com", true },
- { "angelcorpus.tk", true },
- { "angelesydemonios.es", true },
- { "angeletakis.net", true },
- { "angelicare.co.uk", true },
- { "angelikasolorzano.cloud", true },
- { "angelinahair.com", true },
- { "angeljmadrid.com", true },
- { "angeloanan.xyz", true },
- { "angelok.ru", true },
- { "angelremigene.com", false },
- { "angelspabeauty.co.uk", true },
- { "angepsychedelices.tk", true },
- { "angiejones.com", true },
- { "angiewickes.com", true },
- { "anginf.de", true },
- { "angkasa.net.id", true },
- { "anglersconservation.net", true },
- { "anglictina-sojcak.cz", true },
- { "anglictinasojcak.cz", true },
- { "anglingactive.co.uk", true },
- { "anglirl.eu.org", true },
- { "angora.me", true },
- { "angrido.com", true },
- { "angristan.fr", true },
- { "angristan.xyz", true },
- { "angrysnarl.com", true },
- { "angryteeth.net", true },
- { "angular-software.at", true },
- { "angularjs.org", false },
- { "angusmak.com", true },
- { "anhaffen.lu", true },
- { "anhqv.es", true },
- { "ani-man.de", true },
- { "anicam.fr", true },
- { "animaemundi.be", false },
- { "animal-liberation.com", true },
- { "animal-rights.com", true },
- { "animalconnect.org.za", true },
- { "animalistic.io", true },
- { "animalliberation.tk", true },
- { "animaltesting.fr", true },
- { "animalz.tk", true },
- { "anime-culture.com", true },
- { "anime-rg.com", true },
- { "anime-tip.com", true },
- { "anime.my", false },
- { "anime1.me", true },
- { "anime1.moe", true },
- { "anime1.pw", true },
- { "animeai.com", true },
- { "animebits.moe", true },
- { "animeclub.in.ua", true },
- { "animecracks.com", true },
- { "animedon.tk", true },
- { "animefire.net", true },
- { "animefluxxx.com", true },
- { "animehf.com", true },
- { "animeinsights.net", true },
- { "animem.es", true },
- { "animemotivation.com", true },
- { "animeone.me", true },
- { "animes-portal.info", true },
- { "animesharp.com", true },
- { "animetriad.com", true },
- { "animojis.es", true },
- { "animorphsfanforum.com", true },
- { "anipassion.com", false },
- { "anirvalle.com", true },
- { "anitaalbersen.nl", true },
- { "anitaxcph.dk", true },
- { "anivar.net", true },
- { "aniviasport.store", true },
- { "aniwhen.com", true },
- { "anjara.eu", true },
- { "anjocerdena.com", true },
- { "anjoola.com", true },
- { "ankane.org", true },
- { "ankaraevdenevenakliyat.name.tr", true },
- { "ankarakart.com.tr", true },
- { "ankaraotokiralama.tk", true },
- { "ankaraprofesyonelwebtasarim.com", true },
- { "ankaraseo.name.tr", true },
- { "ankarauzmanlarnakliyat.com", true },
- { "ankitha.in", true },
- { "ankitpati.in", true },
- { "ankiuser.net", true },
- { "ankiweb.net", true },
- { "ankya9.com", true },
- { "anleitung-deutsch-lernen.de", true },
- { "anleitung-zum-flechten.de", true },
- { "anleitung-zum-haekeln.de", true },
- { "anleitung-zum-schreiben.de", true },
- { "anleitung-zum-schweissen.de", true },
- { "anleitung-zum-toepfern.de", true },
- { "anna.info", true },
- { "annabelcinemas.com", true },
- { "annaenemma.nl", true },
- { "annafiore.com.br", true },
- { "annalitvinova.pro", true },
- { "annangela.moe", true },
- { "annarokina.com", true },
- { "annawagner.pl", true },
- { "annawang.com.au", true },
- { "annedaniels.co.uk", true },
- { "anneeden.de", true },
- { "annejan.com", true },
- { "anneliesonline.nl", true },
- { "annema.biz", true },
- { "annemakeslovelycandles.co.uk", true },
- { "annetta.com", true },
- { "annettewindlin.ch", true },
- { "annevankesteren.nl", true },
- { "annexorien.com", true },
- { "anney-life.com", true },
- { "anniversary-cruise.com", true },
- { "annmariewaltsphotography.com", true },
- { "annonasoftware.com", true },
- { "annoyingasfuk.com", true },
- { "anns.eu", true },
- { "annuaire-auto-ecole.com", true },
- { "annuaire-jcb.com", true },
- { "annuaire-photographe.fr", false },
- { "annunciationbvmchurch.org", true },
- { "anodas.lt", true },
- { "anohana.org", true },
- { "anojan.com", true },
- { "anon-next.de", true },
- { "anonaddy.com", true },
- { "anonaddy.me", true },
- { "anoncom.net", true },
- { "anoncrypto.org", true },
- { "anoneko.com", true },
- { "anongoth.pl", true },
- { "anons.fr", false },
- { "anonser.tk", true },
- { "anonym-surfen.de", true },
- { "anonym-surfen.online", true },
- { "anonyme-spieler.at", true },
- { "anonymster.com", true },
- { "anora.ai", true },
- { "anoracdn.net", true },
- { "anoretics.com", true },
- { "anotherfatgeek.net", true },
- { "anothervps.com", true },
- { "anouncer.ga", true },
- { "anowicki.pl", true },
- { "anquankongjian.com", true },
- { "ans-delft.nl", true },
- { "ans-ge.ch", false },
- { "ansas.eu", true },
- { "ansas.net", true },
- { "ansdell.net", true },
- { "ansermet.net", false },
- { "ansgar-sonntag.de", true },
- { "ansgarsonntag.de", true },
- { "anshar.eu", true },
- { "ansibeast.net", true },
- { "ansichtssache.at", true },
- { "ansogning-sg.dk", true },
- { "anstaskforce.gov", true },
- { "antabuse.ga", true },
- { "antalyaescortyaren.tk", true },
- { "antama.eu", true },
- { "antama.nl", true },
- { "antanavagefarbiarz.com", true },
- { "antani.cloud", true },
- { "antarcti.co", true },
- { "antarees.net", true },
- { "antaresmedia.com.py", true },
- { "antcas.com", false },
- { "antennajunkies.com", true },
- { "antennista.bari.it", true },
- { "antennista.catania.it", true },
- { "antennista.it", true },
- { "antennista.milano.it", true },
- { "antennista.pavia.it", true },
- { "antennista.roma.it", true },
- { "antennista.tv", true },
- { "antennistaroma.it", true },
- { "antennisti.milano.it", true },
- { "antennisti.roma.it", true },
- { "antfarm.cf", true },
- { "antfie.com", true },
- { "antha.com", true },
- { "anthisis.tv", true },
- { "anthony.codes", true },
- { "anthonychampagne.fr", true },
- { "anthonychampagne.me", true },
- { "anthonyellis.com", true },
- { "anthonyfontanez.com", true },
- { "anthonygaidot.fr", true },
- { "anthonyloop.com", true },
- { "anthonyvadala.me", true },
- { "anthropoid.ca", true },
- { "anti-bible.com", true },
- { "anti-nsa.tk", true },
- { "anti-radar.org", true },
- { "antiaz.com", true },
- { "anticopyright.com", true },
- { "antiekboerderijgraafland.nl", true },
- { "antifilter.network", true },
- { "antihistory.cf", true },
- { "antihype.space", true },
- { "antik-trodelmarkt.de", true },
- { "antikvariat.ru", true },
- { "antikvarius.ro", true },
- { "antilaserpriority.com", true },
- { "antimine.me", true },
- { "antincendio.it", true },
- { "antincendio.roma.it", true },
- { "antipolygraph.org", true },
- { "antique-pedalcars.ch", true },
- { "antirepressionbayarea.com", true },
- { "antispamcloud.dk", true },
- { "antispeciesism.com", true },
- { "antispeciesist.com", true },
- { "antivirusprotection.reviews", true },
- { "antizon.net", true },
- { "antocom.com", true },
- { "antoinedeschenes.com", true },
- { "antoineelizabe.com", true },
- { "antoinemary.com", true },
- { "antonchen.com", true },
- { "antonimos.com.br", true },
- { "antonin.one", true },
- { "antonio-gartenbau.de", true },
- { "antonjuulnaber.dk", true },
- { "antonoff.tk", true },
- { "antonok.com", true },
- { "antota.lt", true },
- { "antragsgruen.de", true },
- { "antroposboutique.it", true },
- { "antroposofica.com.br", true },
- { "antvklik.com", true },
- { "antyblokada.pl", true },
- { "antyfake.pl", true },
- { "anulowano.pl", true },
- { "anunturitv.ro", true },
- { "anvartay.com", false },
- { "anvorte.com", false },
- { "anwalt.us", true },
- { "anwaltsindex.com", true },
- { "anxietyspace.com", true },
- { "anxiolytics.com", true },
- { "any-download.cf", true },
- { "any-download.ga", true },
- { "any-download.gq", true },
- { "any-download.ml", true },
- { "anyad.at", true },
- { "anyi.in", true },
- { "anyilin.cn", true },
- { "anymetrix.io", true },
- { "anyon.com", true },
- { "anypeer.net", true },
- { "anyquestions.govt.nz", true },
- { "anystack.xyz", true },
- { "anyways.at", true },
- { "anzacparkeast.com", true },
- { "anzeiger.ag", true },
- { "ao-dev.com", true },
- { "ao2.it", true },
- { "aoa.gov", true },
- { "aoadatacommunity.us", true },
- { "aod-tech.com", true },
- { "aoe9.com", true },
- { "aoeuaoeu.com", true },
- { "aofusa.net", true },
- { "aoil.gr", true },
- { "aokae.com", true },
- { "aopedeure.nl", true },
- { "aopsy.de", true },
- { "aori.com", true },
- { "aorosora.com", true },
- { "aosc.io", false },
- { "aostacarnavals.it", true },
- { "aotearoa.maori.nz", true },
- { "aotearoafreepress.com", true },
- { "aotearoaleaks.org", true },
- { "aoyamacc.co.jp", true },
- { "ap-swiss.ch", false },
- { "apa-canal.ro", true },
- { "apache-portal.com", true },
- { "apachehaus.de", false },
- { "apachelounge.com", true },
- { "apachezone.com", true },
- { "apadmi.com", true },
- { "apadvantage.com", true },
- { "apalancamiento.trade", true },
- { "apart-hotel-weimar.de", true },
- { "apartmanicg.me", true },
- { "apartment-in-rijeka.com", true },
- { "apartmentregister.com.au", true },
- { "apasaja.tech", true },
- { "apbank.ch", true },
- { "apbox.de", true },
- { "apc.ec", true },
- { "apcemporium.co.uk", true },
- { "apdfawl.com", true },
- { "apdx.com", true },
- { "apef.ch", false },
- { "apercloud.es", true },
- { "apertis.org", false },
- { "aperture-science.net", true },
- { "apertureimaging.com", true },
- { "aperturelabs.tk", true },
- { "aperturesciencelabs.de", true },
- { "apervita.net", true },
- { "apex.to", true },
- { "apexfacades.com.au", true },
- { "apexitsolutions.ca", true },
- { "apgw.jp", true },
- { "aphelion-design.jp", true },
- { "aphelionentertainment.com", true },
- { "aphelis.net", true },
- { "api-connect.com", false },
- { "api.biz.tr", true },
- { "api.cloudflare.com", false },
- { "api.intercom.io", true },
- { "api.lookout.com", false },
- { "api.recurly.com", true },
- { "api.simple.com", false },
- { "api.xero.com", false },
- { "apicruz.com", true },
- { "apila.care", true },
- { "apimon.de", true },
- { "apination.com", true },
- { "apio.systems", true },
- { "apiplus.fr", true },
- { "apirest.top", true },
- { "apis.google.com", true },
- { "apisvida.com.br", true },
- { "apisyouwonthate.com", true },
- { "apitodemestre.com.br", true },
- { "apk.li", true },
- { "apk4fun.com", true },
- { "apkclash.com", true },
- { "apkpokemongo.gq", true },
- { "aplazame.com", true },
- { "aplikaceproandroid.cz", true },
- { "aplpackaging.co.uk", true },
- { "aplu.fr", true },
- { "aplus-usa.net", true },
- { "aplusdownload.com", true },
- { "apluswaterservices.com", true },
- { "apm.com.tw", true },
- { "apmg-certified.com", true },
- { "apn-dz.org", true },
- { "apn-einstellungen.de", true },
- { "apobot.de", true },
- { "apocalypseboard.tk", true },
- { "apocalypsemud.org", true },
- { "apod.com.au", true },
- { "apod.ml", true },
- { "apogeephoto.com", true },
- { "apollo-auto.com", true },
- { "apoly.de", true },
- { "apometria.site", true },
- { "aponkral.com", true },
- { "aponkral.com.tr", true },
- { "aponkral.net", true },
- { "aponkral.org", true },
- { "aporia.io", true },
- { "aposke.com", true },
- { "aposke.net", true },
- { "aposke.org", true },
- { "apostalegal.com", true },
- { "apostalegal.pt", true },
- { "apothecarydouglasville.com", true },
- { "apotheek-ict.nl", true },
- { "apotheke55.de", true },
- { "apothes.is", true },
- { "app-2132.com", true },
- { "app-2138.com", true },
- { "app-6132.com", true },
- { "app-at.work", true },
- { "app-scope.com", true },
- { "app.lookout.com", true },
- { "app.recurly.com", true },
- { "app.simpletax.ca", true },
- { "app.yinxiang.com", false },
- { "app2132.com", true },
- { "app2138.com", true },
- { "app2get.de", true },
- { "app33138.com", true },
- { "app5132.com", true },
- { "app5414.com", true },
- { "app5424.com", true },
- { "app5454.com", true },
- { "app6132.com", true },
- { "app666365.com", true },
- { "app6810.com", true },
- { "app7337.com", true },
- { "appagility.co.nz", true },
- { "appapi.link", true },
- { "apparelfashionwiki.com", true },
- { "appartement-andrea.at", true },
- { "appartement-evolene.net", false },
- { "appartementhaus-badria.de", true },
- { "appartementmarsum.nl", true },
- { "appassionata.ru", true },
- { "appbet43.com", true },
- { "appbydl.com", true },
- { "appcuarium.com", true },
- { "appelaprojets.fr", true },
- { "appelboomdefilm.nl", true },
- { "appengine.google.com", true },
- { "appers.co", true },
- { "appfarm.io", true },
- { "appgeek.com.br", true },
- { "appharbor.com", true },
- { "appify.org", true },
- { "appizia.com", true },
- { "applaudit.com", true },
- { "applegun.com", true },
- { "applemon.com", true },
- { "appleoosa.com", true },
- { "applesencia.com", true },
- { "appletree.is", true },
- { "applian.jp", true },
- { "appliancepronwi.com", true },
- { "application-travel.us.com", true },
- { "applicationmanager.gov", true },
- { "applied-privacy.net", true },
- { "apply-esta.us.com", true },
- { "apply-eta.org", true },
- { "apply-visa.us.com", true },
- { "apply.eu", true },
- { "appmeas.co.uk", true },
- { "appmobi.com", true },
- { "appmobile.io", true },
- { "appninjas.com", true },
- { "apponic.com", true },
- { "appraf.com", true },
- { "apprank.in", true },
- { "apprendre-le-russe-avec-ania.fr", true },
- { "apprenticeship.gov", true },
- { "apprenticeships.gov", true },
- { "approbo.com", true },
- { "approval-workflow.com", true },
- { "approvedtreecare.com", true },
- { "apps.co", true },
- { "apps.facebook.com", false },
- { "apps.fedoraproject.org", true },
- { "apps.stg.fedoraproject.org", true },
- { "apps4inter.net", false },
- { "appsaraby.com", true },
- { "appscloudplus.com", true },
- { "appsdisosa.com", true },
- { "appseccalifornia.org", false },
- { "appsforlondon.com", true },
- { "appt.ch", false },
- { "apptesters.com", true },
- { "appuals.com", true },
- { "appub.co.jp", true },
- { "appui-de-fenetre.fr", true },
- { "appveyor.com", true },
- { "appworld.ga", true },
- { "appzoojoo.be", true },
- { "apretatuercas.es", true },
- { "aprikaner.de", true },
- { "aprogend.com.br", true },
- { "aproposcomputing.com", true },
- { "aprovpn.com", true },
- { "aprr.org", true },
- { "aprsdroid.org", true },
- { "aprz.de", true },
- { "apsa.paris", true },
- { "apsscientific.com", true },
- { "apstudynotes.org", true },
- { "apswater.com", true },
- { "aptekakolska.pl", true },
- { "aptitude9.com", true },
- { "aptitudetests.org", true },
- { "aptumseguros.mx", true },
- { "apu-board.de", true },
- { "apunkt.dk", true },
- { "apustaja.org", true },
- { "apuyou.io", true },
- { "apv-ollon.ch", true },
- { "apviz.io", true },
- { "apwide.com", true },
- { "apyha.com", true },
- { "aqarategypt.com", true },
- { "aqsiq.net", true },
- { "aqua-bucht.de", true },
- { "aqua-ferra.co.uk", true },
- { "aqua-fitness-nacht.de", true },
- { "aqua-fotowelt.de", true },
- { "aquabio.ch", false },
- { "aquabyte.co.uk", true },
- { "aquadecor.cf", true },
- { "aquadonis.ch", false },
- { "aquagarden.com.pl", true },
- { "aquahomo.com", true },
- { "aquaist.com", true },
- { "aqualife.com.gr", true },
- { "aqualifeprojects.com", true },
- { "aqualysis.nl", true },
- { "aquamarin.icu", true },
- { "aquapoint.kiev.ua", true },
- { "aquarden.com", true },
- { "aquarden.dk", true },
- { "aquariu.ms", true },
- { "aquarium-supplement.net", true },
- { "aquaselect.eu", true },
- { "aquasun.pl", true },
- { "aquaterm72.ru", true },
- { "aquaundine.net", true },
- { "aquavitaedayspa.com.au", true },
- { "aquila.co.uk", true },
- { "aquitainebrasserie.com.au", true },
- { "ar-informatique.ch", false },
- { "arab.dating", true },
- { "arabic-shirts.com", true },
- { "arablovepet.com", true },
- { "arabsexi.info", true },
- { "arachina.com", true },
- { "arackiralama.name.tr", true },
- { "aracusbienestar.com", true },
- { "arados.de", true },
- { "aragon.fun", true },
- { "arai21.net", true },
- { "aral.ml", true },
- { "araleeniken.com", true },
- { "aramido.de", true },
- { "aramloebmd.com", true },
- { "aranchhomes.com", true },
- { "aranycsillag.net", true },
- { "araratour.com", true },
- { "araro.ch", false },
- { "ararrl.com", true },
- { "ararrl.net", true },
- { "araseifudousan.com", true },
- { "araxis.com", true },
- { "arbavere.ee", true },
- { "arbeitsch.eu", true },
- { "arbeitskreis-asyl-eningen.de", true },
- { "arbeitslosenverwaltung.de", true },
- { "arbejdsdag.dk", true },
- { "arbitrarion.com", true },
- { "arbitrary.ch", true },
- { "arboleda-hurtado.com", true },
- { "arcadeencasa.com", true },
- { "arcadio.fr", true },
- { "arcaik.net", true },
- { "arcanist.games", true },
- { "arcbouncycastles.co.uk", true },
- { "arcenergy.co.uk", true },
- { "archaeoadventures.com", true },
- { "archambault.paris", true },
- { "archauthority.com", true },
- { "archbishop.ga", true },
- { "archeologicatoscana.it", true },
- { "archeryaid.com", true },
- { "archframe.net", true },
- { "archimedicx.com", true },
- { "archina.ir", true },
- { "archined.nl", true },
- { "archit.in", true },
- { "architectryan.com", true },
- { "architecture-colleges.com", true },
- { "architectureandgovernance.com", true },
- { "architecturequote.com", true },
- { "architectus.ga", true },
- { "archival-services.gov.ge", true },
- { "archive.gov.ge", true },
- { "archivero.es", true },
- { "archivesdelavieordinaire.ch", true },
- { "archivium.biz", true },
- { "archivosmercury.com", true },
- { "archivosstl.com", true },
- { "archiweb.pl", false },
- { "archlinux.de", true },
- { "archlinux.org", true },
- { "arcinapoli.it", true },
- { "arcismant.com.br", true },
- { "arclandholdings.com.au", true },
- { "arco.lu", true },
- { "arcobalabs.ca", true },
- { "arcogb.co", true },
- { "arcovix.com", true },
- { "arcridge.ca", true },
- { "arctic.gov", true },
- { "arctica.io", true },
- { "arcticbit.net", true },
- { "arcticwolf.com", true },
- { "arctus-security.com", true },
- { "arcueil-cachan.fr", false },
- { "arcusnova.de", true },
- { "ardadanal.com", true },
- { "ardor.noip.me", true },
- { "ardtrade.ru", true },
- { "area.ge", true },
- { "area4pro.com", true },
- { "areacinquentaeum.tk", true },
- { "areaclienti.net", false },
- { "areafiftylan.nl", true },
- { "areatrend.com", true },
- { "areavipbrasil.com.br", true },
- { "areis.pt", true },
- { "arekatieandchrisgettingmarried.com", true },
- { "arekatieandchrisgettingmarried.today", true },
- { "arekatieandchrismarriedyet.com", true },
- { "arena-lemgo.de", true },
- { "arenda247.by", true },
- { "arendburgers.nl", true },
- { "arenlor.com", true },
- { "arenlor.info", true },
- { "arenns.com", true },
- { "areqgaming.com", true },
- { "ares-trading.de", true },
- { "aresanel.com", true },
- { "arethsu.se", true },
- { "arex-corp.com", true },
- { "arfad.ch", false },
- { "arganaderm.ch", false },
- { "argb.de", true },
- { "argecord.com", true },
- { "argekultur.at", true },
- { "argonium.com.au", true },
- { "argot.com", true },
- { "argovpay.com", true },
- { "argrafiche.it", true },
- { "argumentative-essay.gq", true },
- { "argyrakis.gr", true },
- { "arheh.com", true },
- { "arhitekti.hr", true },
- { "ariacreations.net", true },
- { "ariadermspa.com", true },
- { "arian.io", true },
- { "arias.re", true },
- { "ariba.info", true },
- { "aridhia.com", true },
- { "ariege-pyrenees.net", true },
- { "arielpereira.tk", true },
- { "arieswdd.com", true },
- { "arigato-java.download", true },
- { "arijitdg.net", true },
- { "arikar.eu", true },
- { "arilto.com", true },
- { "arima.co.ke", true },
- { "arinde.ee", true },
- { "arionta.com", true },
- { "arise19.com", true },
- { "arisechurch.com", true },
- { "ariseconference.org.nz", true },
- { "aristocrates.co", true },
- { "aritec-la.com", true },
- { "arithmetic.ga", true },
- { "arivo.com.br", true },
- { "ariyaoil.ir", true },
- { "arjan.nl", true },
- { "arjandejong.eu", true },
- { "arjanenthijs.nl", true },
- { "arjansteevels.nl", true },
- { "arjanvaartjes.net", true },
- { "arjunasdaughter.pub", true },
- { "arjweb.co.uk", true },
- { "arkacrao.org", true },
- { "arkadelphia.gov", false },
- { "arkadiyt.com", true },
- { "arkantos.agency", true },
- { "arkenco.cl", true },
- { "arkhvoid.xyz", true },
- { "arktalentsolutions.com.mx", true },
- { "arkulagunak.com", false },
- { "arlaperu.com", true },
- { "arlen.tv", true },
- { "arlenarmageddon.com", true },
- { "arletalibrary.com", true },
- { "arlingtonelectric.com", true },
- { "arlingtonwine.net", true },
- { "arm-host.com", true },
- { "arm.gov", true },
- { "armadale.wa.gov.au", true },
- { "armadaquadrat.com", true },
- { "armageddonstuff.com", true },
- { "armandsdiscount.com", true },
- { "armanozak.com", true },
- { "armansfinejewellery.com", true },
- { "armansfinejewellery.com.au", true },
- { "armarinhovirtual.com.br", true },
- { "armbrust.me", true },
- { "armcar.ga", true },
- { "armedpoet.com", true },
- { "armeniaweb.tk", true },
- { "armensc.com", true },
- { "armil.it", true },
- { "armin-cme.de", true },
- { "arminpech.de", true },
- { "arminsure.com", true },
- { "armor.ai", true },
- { "armpads.nl", true },
- { "armstrongsengineering.com", true },
- { "armtopnews.tk", true },
- { "army24.cz", true },
- { "armyprodej.cz", true },
- { "arnaudardans.com", true },
- { "arnaudb.net", true },
- { "arnaudfeld.de", true },
- { "arnaudlanna.com", true },
- { "arnesegers.be", true },
- { "arnevankauter.com", true },
- { "arniescastles.co.uk", true },
- { "arno-klein.com", true },
- { "arno-klein.de", true },
- { "arno-klein.eu", true },
- { "arno-klein.fr", true },
- { "arno-klein.it", true },
- { "arno-klein.net", true },
- { "arnoklein.eu", true },
- { "arnoklein.fr", true },
- { "arnoklein.it", true },
- { "arnoldkontz-occasions.lu", false },
- { "arnonerba.com", true },
- { "arnor.org", true },
- { "arnoudraeven.nl", true },
- { "arnoudvandalen.nl", true },
- { "arnove.fr", true },
- { "arnove.net", true },
- { "arnsmedia.nl", false },
- { "arod.tk", true },
- { "arogov.com", true },
- { "arokha.com", true },
- { "aromacos.ch", true },
- { "aron.host", true },
- { "aroonchande.com", false },
- { "arooshi.website", true },
- { "aros.pl", true },
- { "arose.io", true },
- { "around-cms.de", true },
- { "arox.eu", true },
- { "arpatutorial.com", true },
- { "arpnet.co.jp", true },
- { "arqueo-ecuatoriana.ec", true },
- { "arquitet.com.br", true },
- { "arquitetura.pt", true },
- { "arrakis.se", true },
- { "arraudi.eu", true },
- { "arrazane.com.br", true },
- { "arresttracker.com", true },
- { "arrive.by", true },
- { "arrmaforum.com", true },
- { "arroba.digital", true },
- { "arrow-analytics.nl", true },
- { "arrow-api.nl", true },
- { "arrowfastener.com", true },
- { "arrowheadaddict.com", true },
- { "arrowwebprojects.nl", true },
- { "ars-online.pl", true },
- { "arschkrebs.org", true },
- { "arsindecor.com", true },
- { "arslankaynakmetal.com", true },
- { "arsplus.ru", false },
- { "arswb.men", true },
- { "art-auction.jp", true },
- { "art-dolls.com.ua", true },
- { "art-et-culture.ch", false },
- { "art-et-tonneaux.fr", true },
- { "art-news.tk", true },
- { "art-pix.com", true },
- { "art-pix.de", true },
- { "art-pix.net", true },
- { "art-shinbi.com", true },
- { "artacadia.org", true },
- { "artboja.com", true },
- { "artc.at", true },
- { "artcar24.ru", true },
- { "arteaga.co.uk", true },
- { "arteaga.eu", true },
- { "arteaga.me", true },
- { "arteaga.tech", true },
- { "arteaga.uk", true },
- { "arteaga.xyz", true },
- { "artebel.com.br", true },
- { "artecat.ch", true },
- { "artedellavetrina.it", true },
- { "artedona.com", true },
- { "artefakt.es", true },
- { "artefeita.com.br", true },
- { "arteinstudio.it", true },
- { "artelt.com", true },
- { "artemis.re", true },
- { "artera.spb.ru", true },
- { "arterienundvenen.ch", true },
- { "arterydb.ru", true },
- { "artesacraloreto.it", true },
- { "arteseideias.com.pt", true },
- { "arteshow.ch", false },
- { "artfabrics.com", true },
- { "artforum.sk", true },
- { "artfullyelegant.com", true },
- { "arthan.me", true },
- { "arthermitage.org", true },
- { "arthritisrheumaticdiseases.com", true },
- { "arthurdejong.org", true },
- { "arthurlaw.ca", true },
- { "arthuryidi.com", true },
- { "arti-islam.tk", true },
- { "articu.no", true },
- { "artifact.spb.ru", true },
- { "artifexnet.com", true },
- { "artificialgrassandlandscaping.com", true },
- { "artificialplants.tk", true },
- { "artigianociao.jp", true },
- { "artigoos.com", true },
- { "artikel9.com", true },
- { "artimpact.ch", true },
- { "artioml.net", true },
- { "artionet.ch", true },
- { "artis-game.net", true },
- { "artisan-cheminees-poeles-design.fr", false },
- { "artisan-emmanuel.fr", true },
- { "artisansoftaste.com", true },
- { "artistagenda.com", true },
- { "artistcorporation.com", true },
- { "artistedeparis.fr", true },
- { "artistrunwebsite.com", true },
- { "artitbe.net", true },
- { "artiwear.com.tw", true },
- { "artj.jp", true },
- { "artlabdentistry.com", true },
- { "artlantis.nl", true },
- { "artleading.ru", true },
- { "artlifeisgood.com", true },
- { "artlogo.biz", true },
- { "artlogo.cz", true },
- { "artlogo.sk", true },
- { "artmarketingnews.com", true },
- { "artmoney.com", true },
- { "artofcode.co.uk", true },
- { "artofhappyliving.com", true },
- { "artofmonitoring.com", false },
- { "artofwhere.com", true },
- { "artozoul.fr", true },
- { "artplasticsurgeons.com", true },
- { "artrapid.com", true },
- { "artratio.net", true },
- { "artroot.jp", true },
- { "artroscopiaperlosport.it", true },
- { "arts.gov", true },
- { "artsacademics.org", true },
- { "artschmidtoptical.com", true },
- { "artsmarket.ca", true },
- { "artspac.es", true },
- { "arttel-media.ru", true },
- { "arturli.be", true },
- { "arturopinto.com.mx", true },
- { "arturszalak.com", true },
- { "artweby.cz", true },
- { "artworxbathrooms.com.au", true },
- { "arty.name", true },
- { "artycoz.fr", true },
- { "artyengine.com", true },
- { "arubasunsetbeach.com", true },
- { "arufu.dk", true },
- { "arunjoshua.com", true },
- { "arveron.ch", false },
- { "arvid.io", true },
- { "arvindhariharan.com", true },
- { "arvindhariharan.me", true },
- { "arvutiladu.ee", true },
- { "arweth.com", true },
- { "arx-libertatis.org", true },
- { "arx.vg", true },
- { "arx8x.net", true },
- { "arxell.com", true },
- { "aryalaroca.de", true },
- { "aryan-nation.com", true },
- { "aryasenna.net", true },
- { "arzid.com", true },
- { "arzinfo.pw", true },
- { "as200753.com", true },
- { "as200753.net", true },
- { "as44222.net", true },
- { "as5158.com", true },
- { "as8423.net", true },
- { "asaabforever.com", true },
- { "asabacortoscaseros.tk", true },
- { "asadatec.de", true },
- { "asafaweb.com", true },
- { "asafilm.co", true },
- { "asakoh.co.jp", true },
- { "asana.com", true },
- { "asananutrition.co.uk", true },
- { "asandu.eu", true },
- { "asanger.biz", true },
- { "asaphomeinspect.com", true },
- { "asart.bg", true },
- { "asato-jewelry.com", true },
- { "asbestosthedarkarts.com", true },
- { "asbito.de", true },
- { "ascension.run", true },
- { "ascent360.com", true },
- { "ascgathering.com", true },
- { "aschismatic.com", true },
- { "asciitable.tips", true },
- { "asciiwwdc.com", true },
- { "asdchieti.tk", true },
- { "asdwfwqd.com", true },
- { "asdyx.de", true },
- { "asegem.es", true },
- { "asenno.com", true },
- { "asesoriaglobalenseguros.com.mx", true },
- { "aseth.de", true },
- { "asexualitat.cat", true },
- { "asfaleianet.gr", true },
- { "asgapps.co.za", true },
- { "asgrd.org", true },
- { "ashenm.ml", true },
- { "ashessin.com", true },
- { "ashlarimoveis.com.br", true },
- { "ashley.net.in", true },
- { "ashleyedisonuk.com", true },
- { "ashleykaryl.com", true },
- { "ashleymadison.com", true },
- { "ashleythouret.com", true },
- { "ashlocklawgroup.com", true },
- { "ashmportfolio.com", true },
- { "ashmyra.com", true },
- { "ashridgetrees.co.uk", true },
- { "ashtonbromleyceramics.co.uk", true },
- { "ashtonc.ca", true },
- { "ashtonwealth.com", true },
- { "ashutoshmishra.org", true },
- { "asia-gazette.com", true },
- { "asia.dating", true },
- { "asiaflash.com", true },
- { "asiaheavens.com", true },
- { "asialeonding.at", true },
- { "asian-industry.eu", true },
- { "asianspa.co.uk", true },
- { "asianwebcams.webcam", true },
- { "asiasmi.tk", true },
- { "asiba.com.au", true },
- { "asiinc-tex.com", true },
- { "asile-colis.fr", true },
- { "asilo.roma.it", true },
- { "asinetasima.com", true },
- { "ask1.org", true },
- { "askcaisse.com", true },
- { "askcascade.com", true },
- { "asker-massasje.no", true },
- { "askeustache.com", true },
- { "askexpert.in", true },
- { "askizzy.org.au", true },
- { "askkaren.gov", true },
- { "askme-events.vip", false },
- { "askvg.com", true },
- { "askwhy.cz", true },
- { "askwhy.eu", true },
- { "asmanyasgiven.com", true },
- { "asmbsurvey.com", true },
- { "asmdz.com", true },
- { "asmeets.nl", true },
- { "asmood.net", true },
- { "asmrbuluo.com", true },
- { "asnhgh.biz", true },
- { "asokan.org", true },
- { "asp.net", true },
- { "aspargesgaarden.no", true },
- { "aspcl.ch", true },
- { "aspectuw.com.au", true },
- { "asperger-ag.ch", true },
- { "asperti.com", true },
- { "aspformacion.com", true },
- { "aspiescentral.com", true },
- { "aspiradorasbaratas.net", true },
- { "aspirantum.com", true },
- { "aspirateur-anti-pollution.fr", true },
- { "aspires.co.jp", true },
- { "aspireuniversal.com", true },
- { "aspirevc-prod.com", true },
- { "aspirevc.com", true },
- { "aspisdata.com", true },
- { "asprion.org", true },
- { "asproni.it", true },
- { "asps.biz", true },
- { "asr.cloud", true },
- { "asr.li", true },
- { "asr.rocks", true },
- { "asr.solar", true },
- { "asr9k.de", true },
- { "asra.gr", true },
- { "asryflorist.com", true },
- { "assaabloygaragedoors.ca", true },
- { "asseenfromthesidecar.org", true },
- { "assemblage.gq", true },
- { "assemble-together.org", true },
- { "assemblytechnicianjobs.com", true },
- { "assemblywithoutthewalls.org", true },
- { "assempsaibiza.com", true },
- { "assertion.de", true },
- { "assessoriati.com.br", true },
- { "assetsman-assetsvalue.com", true },
- { "assguidesporrentruy.ch", false },
- { "assign-it.co.uk", true },
- { "assignacii.ml", true },
- { "assis.partners", true },
- { "assistel.com", true },
- { "assistenciamultitec.com.br", true },
- { "associatedwomenshealthcare.com", true },
- { "associationhorizon.tk", true },
- { "associazionelbn.it", false },
- { "assodigitale.it", true },
- { "asspinter.me", true },
- { "assumptionpj.org", true },
- { "assuredspc.com", true },
- { "astal.rs", true },
- { "astaninki.com", true },
- { "astarbouncycastles.co.uk", true },
- { "astarmathsandphysics.com", true },
- { "astaxanthin-sport.de", true },
- { "astaxanthin.de", true },
- { "astec-informatica.com", true },
- { "astengox.com", true },
- { "astenotarili.online", false },
- { "asticon.de", true },
- { "astifan.online", true },
- { "astral-imperium.com", true },
- { "astroalloys.com.au", true },
- { "astrobriga.es", true },
- { "astrociencia.tk", true },
- { "astrojunkies.com", true },
- { "astroloeches.tk", true },
- { "astrologjia.com", true },
- { "astrology42.com", true },
- { "astrong.pl", true },
- { "astroscopy.ch", false },
- { "astrosnail.pt.eu.org", true },
- { "astrovandalistas.cc", true },
- { "astucewebmaster.com", true },
- { "astural.org", false },
- { "astutikhonda.com", true },
- { "asua.ca", true },
- { "asuclassfinder.com", true },
- { "asun.co", true },
- { "asurbernardo.com", true },
- { "asurepay.cc", false },
- { "asustreiber.de", true },
- { "asvsa.ch", false },
- { "asws.nl", true },
- { "asyikbelanja.com", true },
- { "asylbarn.no", true },
- { "asystent-dzierzawy.pl", true },
- { "at.search.yahoo.com", false },
- { "at5.nl", true },
- { "at7s.me", true },
- { "atab.se", true },
- { "atacadocervejeiro.com.br", true },
- { "atacadodesandalias.com.br", true },
- { "atahualpa.com", true },
- { "atallo.com", true },
- { "atallo.es", true },
- { "ataton.ch", false },
- { "atayia.com", true },
- { "atbwebservices.co.uk", true },
- { "atc.cuneo.it", true },
- { "atchleyjazz.com", true },
- { "atchleyjazz.org", true },
- { "atchleylab.org", true },
- { "atcom.cl", true },
- { "atds.ch", false },
- { "ateamsport.dk", true },
- { "atease-salon.jp", true },
- { "atedificacion.com", true },
- { "ateli.com", true },
- { "atelier-coiffure.ch", false },
- { "atelier-des-apprentissages.com", true },
- { "atelier-naruby.cz", true },
- { "atelieracbaby.com.br", true },
- { "atelieraphelion.com", true },
- { "atelierbw.com", true },
- { "ateliercoquelicot.fr", true },
- { "atelierdefrancais.ch", false },
- { "atelierdeloulou.fr", true },
- { "atelierdesflammesnoires.fr", true },
- { "atelierfantazie.sk", true },
- { "atelierhsn.com", true },
- { "ateliernaruby.cz", true },
- { "atelierssud.ch", false },
- { "atelierverbeelding.nl", true },
- { "atencionbimbo.com", false },
- { "aterlectric.com", true },
- { "aterskapa-data.se", true },
- { "atf.gov", true },
- { "atfstudios.tk", true },
- { "atgoetschel.ch", false },
- { "atgseed.co.uk", true },
- { "atgseed.uk", true },
- { "ath0.org", false },
- { "atheist-faq.com", true },
- { "atheist-refugees.com", true },
- { "atheistfrontier.com", true },
- { "atheit.com", true },
- { "athekiu.com", true },
- { "athemis.de", true },
- { "athenadynamics.com", true },
- { "athenaneuro.com", true },
- { "atheoryofchange.com", true },
- { "athlin.de", true },
- { "athomedeco.fr", true },
- { "atigerseye.com", true },
- { "atimbertownservices.com", true },
- { "atis-ars.ru", true },
- { "atishchenko.com", true },
- { "atisoft.biz", true },
- { "atisoft.com.tr", true },
- { "atisoft.net", true },
- { "atisoft.net.tr", true },
- { "atisoft.web.tr", true },
- { "atitude.com", true },
- { "ativapsicologia.com.br", true },
- { "atl-paas.net", true },
- { "atlantacompa-international.co.uk", true },
- { "atlantareroof.com", true },
- { "atlantaspringroll.com", true },
- { "atlantichomes.com.au", true },
- { "atlanticmarina.com", true },
- { "atlanticmenshealth.com", true },
- { "atlanticpediatricortho.com", true },
- { "atlanticyellowpages.com", true },
- { "atlantis-kh.noip.me", true },
- { "atlantischild.hu", true },
- { "atlantiswaterproofing.com", true },
- { "atlas-heritage.com", true },
- { "atlas-multimedia.de", true },
- { "atlasauthority.com", true },
- { "atlasbrown.com", true },
- { "atlascoffeeclub.com", true },
- { "atlascultural.com", true },
- { "atlasdev.nl", true },
- { "atlasone.us", true },
- { "atlassignsandplaques.com", true },
- { "atletika.hu", true },
- { "atlseccon.com", true },
- { "atmalta.com", true },
- { "atmind.nl", true },
- { "atmmantenimiento.co", true },
- { "atnis.com", true },
- { "ato4sound.com", true },
- { "atolm.net", true },
- { "atom-china.org", true },
- { "atom.solutions", true },
- { "atom86.net", true },
- { "atomism.com", true },
- { "atorcidabrasileira.com.br", true },
- { "atplonline.co", true },
- { "atpnutrition.com", true },
- { "atrafloor.com", true },
- { "atraining.ru", true },
- { "atraverscugy.ch", false },
- { "atrevillot.com", true },
- { "atrias.net", true },
- { "atrinik.org", true },
- { "atsoftware.de", true },
- { "attac.us", true },
- { "atte.fi", true },
- { "attendanceondemand.com", true },
- { "attendantdesign.com", false },
- { "attendu.cz", true },
- { "attengo.ga", true },
- { "attention.horse", true },
- { "attentionpleats.com.tw", true },
- { "attilavandervelde.nl", true },
- { "attinderdhillon.com", true },
- { "attitudes-bureaux.fr", true },
- { "attogtech.com", true },
- { "attorney.org.il", true },
- { "attractant.com", true },
- { "attuned.se", true },
- { "attwood.org", true },
- { "attwoodmarshall.com.au", true },
- { "atviras.lt", false },
- { "atvirtual.at", true },
- { "atvsafety.gov", true },
- { "atwonline.org", true },
- { "atxchirocoverage.com", true },
- { "atyourprice.net", true },
- { "atypicom.es", true },
- { "atypicom.fr", true },
- { "atypicom.it", true },
- { "atypicom.pt", true },
- { "atzenchefin.de", true },
- { "atzzz.com", true },
- { "au2pb.org", true },
- { "aubergegilly.ch", false },
- { "aubg.org", false },
- { "aubio.org", true },
- { "aubonheurdeshuiles.fr", true },
- { "aubonmanger.fr", false },
- { "aubreysnider.com", true },
- { "auburnmedicalservices.com", true },
- { "auburnperio.com", true },
- { "aucarresainteloi.com", true },
- { "aucielrose.com", true },
- { "aucklandcastles.co.uk", true },
- { "aucospa.com", true },
- { "aucubin.de", true },
- { "audiclubbahrain.com", true },
- { "audiencealchemy.co", true },
- { "audiencedefolie.com", true },
- { "audiense.com", false },
- { "audio-detector.com", true },
- { "audiobookboo.com", true },
- { "audiobookstudio.com", true },
- { "audioboom.com", true },
- { "audiohub.com", true },
- { "audiohub.de", true },
- { "audiohub.fr", true },
- { "audiolibri.org", true },
- { "audiolot.com", true },
- { "audiomaze.com", true },
- { "audiophile.ch", false },
- { "audiophix.com", true },
- { "audiorecording.me", true },
- { "audiorental.net", true },
- { "audioschoolonline.com", true },
- { "audiotechniker.de", true },
- { "audiovoodoo.pl", true },
- { "audirsq3.de", true },
- { "audisto.com", true },
- { "auditmatrix.com", true },
- { "auditos.com", true },
- { "audits.io", true },
- { "auditsquare.com", true },
- { "audreyhossepian.fr", true },
- { "audreyjudson.com", true },
- { "auenhof-agrar.de", true },
- { "auerbach-verlag.de", true },
- { "auf-feindgebiet.de", true },
- { "auf-nach-mallorca.info", true },
- { "aufwecken.dynu.net", true },
- { "augehost.com", true },
- { "augen-seite.de", true },
- { "augenlaser-chemnitz.de", true },
- { "augenlaser-dresden.de", true },
- { "augenlasercenter-dresden.de", true },
- { "augenlaserzentrum-dresden.com", true },
- { "augenlaserzentrum-dresden.eu", true },
- { "augesen.tk", true },
- { "augiero.it", true },
- { "augredutemps.ca", true },
- { "augur.us", true },
- { "august-don.site", true },
- { "augustian-life.cz", true },
- { "augustiner-kantorei-erfurt.de", true },
- { "augustiner-kantorei.de", true },
- { "aukaraoke.su", true },
- { "auksnest.ca", true },
- { "aulasvirtualesperu.com", true },
- { "aulica-conseil.com", true },
- { "aulo.in", false },
- { "aumentada.net", true },
- { "aumilieudumonde.gf", true },
- { "aunali1.com", true },
- { "auntie-eileens.com.au", true },
- { "auntiesnorkel.com", true },
- { "auntmia.com", true },
- { "aunto.xyz", true },
- { "aupaysdesanes.com", true },
- { "auplidespages.fr", true },
- { "aura7chakr.com", true },
- { "aurelieburn.fr", true },
- { "aurelienaltarriba.fr", true },
- { "auricblue.com", true },
- { "auriko-games.de", true },
- { "aurnik.com", true },
- { "auroraassociationofrealtors.com", true },
- { "auroraofficefurniture.com.au", true },
- { "auroware.com", true },
- { "aus-ryugaku.info", true },
- { "ausec.ch", false },
- { "auskunftsbegehren.at", true },
- { "auspicacious.org", true },
- { "ausschreibungen-suedtirol.it", true },
- { "aussiefunadvisor.com", true },
- { "aussiemilfs.com", true },
- { "aussieseoadelaide.com.au", true },
- { "aussieseobrisbane.com.au", true },
- { "aussieservicedown.com", true },
- { "aussiestoresonline.com", true },
- { "aussiestories.dk", true },
- { "austenplumbing.com", true },
- { "austin-pearce.com", true },
- { "austin-security-cameras.com", true },
- { "austincardiac.com", true },
- { "austinchase.com", true },
- { "austinheap.com", false },
- { "austinlockout.com", true },
- { "austintxacrepairtoday.com", true },
- { "austinuniversityhouse.com", true },
- { "australian.dating", true },
- { "australianairbrushedtattoos.com.au", true },
- { "australianattractions.com.au", true },
- { "australianimmigrationadvisors.com.au", true },
- { "australiantemporarytattoos.com", true },
- { "australiantemporarytattoos.com.au", true },
- { "australien-tipps.info", true },
- { "austromorph.space", true },
- { "auszeit-lanzarote.com", true },
- { "auszeit-walsrode.de", true },
- { "auszeit.bio", true },
- { "autenticoperfumes.com.br", true },
- { "auth.adult", true },
- { "auth.mail.ru", true },
- { "authcom.ca", true },
- { "authenticate.computer", true },
- { "authenticationhub.io", true },
- { "authenticwoodcraft.com", true },
- { "authinfo-bestellen.de", true },
- { "authinity.com", true },
- { "authland.com", false },
- { "author24.biz", true },
- { "author24.info", true },
- { "authoritysolutions.com", true },
- { "autismewoerden.nl", true },
- { "auto-anleitung.de", true },
- { "auto-dealership-news.com", true },
- { "auto-i-dat.ch", true },
- { "auto-motor-i-sport.pl", true },
- { "auto-none.com", true },
- { "auto-plus.tn", true },
- { "auto-res.ru", true },
- { "auto-skills.ru", true },
- { "auto.nl", true },
- { "auto1.fi", true },
- { "autoauctionsohio.com", true },
- { "autoauctionsvirginia.com", true },
- { "autobarn.co.nz", true },
- { "autobedrijfgarant.nl", true },
- { "autobella-hurtownia.pl", true },
- { "autobelle.it", true },
- { "autobourcier.com", true },
- { "autocadperfmon.azurewebsites.net", true },
- { "autocartruck.com", true },
- { "autoccaz.fr", true },
- { "autocontrol.online", true },
- { "autocorner.com", true },
- { "autocrypt.org", true },
- { "autodalmacija.com", true },
- { "autodidactic.ai", true },
- { "autodidacticstudios.com", true },
- { "autodidacticstudios.net", true },
- { "autodius.com", true },
- { "autoelettricaperbambini.com", true },
- { "autoentrepreneurinfo.com", true },
- { "autoeshop.eu", true },
- { "autofficina.roma.it", true },
- { "autoglass.com.my", true },
- { "autohomehub.com", true },
- { "autohut.ca", true },
- { "autoi.ch", true },
- { "autokeyinaustin.com", true },
- { "autokeyreplacementsanantonio.com", true },
- { "autoklub.cz", true },
- { "autokovrik-diskont.ru", true },
- { "autolawetawroclaw.pl", true },
- { "autoledky.sk", true },
- { "autolider.org", true },
- { "automagischeberegening.nl", true },
- { "automatethis.com.au", true },
- { "automatic.com", true },
- { "automationpro.me", true },
- { "automentesszolnok.hu", true },
- { "automotivegroup-usedcars.be", false },
- { "automotivemechanic.org", true },
- { "automy.de", true },
- { "autonewssite.com", true },
- { "autonoleggio.milano.it", true },
- { "autoosijek.com", true },
- { "autopapo.com.br", true },
- { "autopark-ost-fichtner.de", true },
- { "autoparts.im", true },
- { "autoparts.sh", true },
- { "autoparts.wf", true },
- { "autopaulito.pt", true },
- { "autopower.gr", true },
- { "autoprice.info", false },
- { "autoproshouston.com", true },
- { "autorama.cf", true },
- { "autorando.com", true },
- { "autoreinigung-noack.de", true },
- { "autorepairseattle.com", true },
- { "autorijschooljohanbos.nl", true },
- { "autorijschoolrichardschut.nl", true },
- { "autorijschoolstorm.nl", true },
- { "autosaan.ro", true },
- { "autosalesmachine.net", true },
- { "autoschadeschreuder.nl", true },
- { "autoschool.ga", true },
- { "autoscuola.roma.it", true },
- { "autoshinka72.ru", true },
- { "autoshopsolutions.com", true },
- { "autoshun.org", true },
- { "autoskola.hr", true },
- { "autoskolaplzen.cz", true },
- { "autoskole.hr", true },
- { "autospurghi.milano.it", true },
- { "autospurgo.com", true },
- { "autospurgo.it", true },
- { "autospurgo.milano.it", true },
- { "autostodulky.cz", true },
- { "autoteplo.org", true },
- { "autoterminus-used.be", false },
- { "autoto.hr", true },
- { "autotransportquoteservices.com", true },
- { "autotyreprest.ro", true },
- { "autouncle.at", true },
- { "autouncle.co.uk", true },
- { "autouncle.com", true },
- { "autouncle.de", true },
- { "autouncle.dk", true },
- { "autouncle.fi", true },
- { "autouncle.fr", true },
- { "autouncle.it", true },
- { "autouncle.pl", true },
- { "autouncle.pt", true },
- { "autouncle.ro", true },
- { "autouncle.se", true },
- { "autoverzekeringafsluiten.com", true },
- { "autovesti.cf", true },
- { "autowerkstatt-puchheim.de", true },
- { "autowise.dk", true },
- { "autres-talents.fr", true },
- { "autshir.com", true },
- { "auvidos.ru", true },
- { "aux-arts-de-la-table.com", true },
- { "auxiliame.com", true },
- { "auxille.com", true },
- { "av-yummy.com", true },
- { "av01.tv", true },
- { "ava-creative.de", false },
- { "ava-software.at", true },
- { "avaaz.org", true },
- { "avabouncehire.co.uk", true },
- { "avacariu.me", true },
- { "avaeon.com", true },
- { "available.direct", true },
- { "availablecastles.com", true },
- { "avalon-island.ru", true },
- { "avalon-rpg.com", true },
- { "avalonbelltown.com", true },
- { "avalyuan.com", true },
- { "avancen.com", true },
- { "avanet.com", true },
- { "avangvpn.ga", true },
- { "avanovum.de", true },
- { "avantitualatin.com", true },
- { "avarcom.tk", true },
- { "avarty.com", true },
- { "avatardiffusion.com", true },
- { "avcd.cz", true },
- { "ave.zone", true },
- { "aveapps.com", false },
- { "aveclunettesoleil.fr", true },
- { "avedesk.org", false },
- { "avelinodiaz.gal", true },
- { "avengersonlinemovie.ga", true },
- { "aventurische-allianz.de", true },
- { "avenuedesbebes.com", true },
- { "avepol.cz", true },
- { "avepol.eu", true },
- { "averageinspired.com", true },
- { "averam.net", true },
- { "averen.co.uk", true },
- { "avernis.de", true },
- { "avexon.com", true },
- { "avgindiantech.com", true },
- { "avhwelding.com", true },
- { "avi12.com", true },
- { "avia-krasnoyarsk.ru", true },
- { "avia-ufa.ru", true },
- { "aviasalon.spb.ru", true },
- { "aviationmilitaire.tk", true },
- { "aviationstrategies.aero", true },
- { "aviationstrategy.aero", true },
- { "aviationweather.gov", true },
- { "aviconverter.tk", true },
- { "avidmode-dev.com", true },
- { "avidmode-staging.com", true },
- { "avidmode.com", true },
- { "avinilo.com", true },
- { "avisofi-credit-immobilier.fr", true },
- { "aviteng.cloud", true },
- { "aviteng.com", true },
- { "avivamiento-radio.com", true },
- { "avivaplasticsurgery.com", true },
- { "avlhostel.com", true },
- { "avm-multimedia.com", true },
- { "avmoo.com", true },
- { "avmrc.nl", true },
- { "avmup.com", true },
- { "avnet.ws", true },
- { "avocad.studio", true },
- { "avocode.com", true },
- { "avonture.be", true },
- { "avonvets.co.uk", true },
- { "avova.de", true },
- { "avpres.net", false },
- { "avptp.org", true },
- { "avqueen.cn", true },
- { "avrora-nov.ru", true },
- { "avsox.com", true },
- { "avtecmedia.com", true },
- { "avticket.ru", false },
- { "avtobania.pro", true },
- { "avtoforex.ru", true },
- { "avtogara-isperih.com", true },
- { "avtomarket.ru", true },
- { "avtosept.by", true },
- { "avtovokzaly.ru", true },
- { "avv.li", true },
- { "avvaterra.ch", true },
- { "avvcorda.com", false },
- { "avvocato.bologna.it", true },
- { "aw.gov.pl", true },
- { "aw.net", true },
- { "await.one", true },
- { "awakengr.com", true },
- { "awangardaszkola.pl", true },
- { "awardplatform.com", true },
- { "awardsplatform.com", true },
- { "awaremi-tai.com", true },
- { "awaresec.com", true },
- { "awaresec.no", true },
- { "awarify.io", true },
- { "awarify.me", true },
- { "awaro.net", true },
- { "awaygroundguide.com", true },
- { "awbouncycastlehire.com", true },
- { "awesomebouncycastles.co.uk", true },
- { "awesomenamegenerator.com", true },
- { "awic.ca", true },
- { "awk.tw", true },
- { "awksolutions.com", true },
- { "awlgolf.com", true },
- { "awningcanopyus.com", true },
- { "awningsaboveus.com", true },
- { "awningsatlantaga.com", true },
- { "awningsydney.ga", true },
- { "awomansplacenj.com", true },
- { "awplasticsurgery.com", true },
- { "awsbs.de", true },
- { "awsmdev.de", true },
- { "awsnuke.com", true },
- { "awsome-books.co.uk", true },
- { "awsumchan.org", true },
- { "awxg.com", true },
- { "ax25.org", true },
- { "axa.de", true },
- { "axel-fischer.net", true },
- { "axel-voss.eu", false },
- { "axelname.ru", true },
- { "axelteichmann.net", true },
- { "axelvoss.eu", false },
- { "axiomeosteopathie.ca", true },
- { "axiomer.com", true },
- { "axishw.com", true },
- { "axispara-bg.com", true },
- { "axon-toumpa.gr", true },
- { "axone-computers.fr", false },
- { "axonholdingse.eu", true },
- { "axre.de", true },
- { "axrec.de", true },
- { "ay-net.jp", true },
- { "ayahya.me", false },
- { "ayanomimi.com", true },
- { "aycasac.com", true },
- { "aycomba.de", true },
- { "ayecode.ca", true },
- { "ayesh.me", true },
- { "aykutcevik.com", true },
- { "aylak.com", true },
- { "aylesburycastlehire.co.uk", true },
- { "aymerick-dupouey.fr", true },
- { "aymerick.fr", true },
- { "aymericlagier.com", true },
- { "ayothemes.com", true },
- { "ayporealestate.com", true },
- { "aypotech.com", true },
- { "ayrop.com", true },
- { "ayrshirebouncycastlehire.co.uk", true },
- { "ayselonia.onl", true },
- { "ayudacloud.com", true },
- { "ayudalabs.com", true },
- { "ayudapreview.com", true },
- { "ayudaprogramacion.net", true },
- { "ayumi.network", true },
- { "ayumindev.net", true },
- { "ayumix3.xyz", true },
- { "ayurveda-mantry.com", false },
- { "ayvalikgezgini.com", true },
- { "ayyz66.cc", true },
- { "az-moga.bg", true },
- { "az.net.au", true },
- { "az.search.yahoo.com", false },
- { "az1b2y3cx.com", true },
- { "azabani.com", true },
- { "azadliq.info", true },
- { "azadliq.online", true },
- { "azarus.ch", true },
- { "azazy.net", false },
- { "azerinews.tk", true },
- { "azertyjobs.com", true },
- { "azh-kunden.de", true },
- { "aziende.com.ar", true },
- { "azimut.fr", true },
- { "azithromycine.gq", true },
- { "azlk-team.ru", true },
- { "azlo.com", false },
- { "aznews.site", true },
- { "azora.cf", true },
- { "azort.com", true },
- { "azotobacter.nl", true },
- { "azpeach.com", true },
- { "azpogomap.com", true },
- { "azrazalea.net", true },
- { "azrhymes.com", true },
- { "azsgeniedev.azurewebsites.net", true },
- { "azso.pro", true },
- { "azsupport.com", true },
- { "aztraslochi.it", true },
- { "aztrix.me", true },
- { "aztummytuck.com", true },
- { "aztv.cc", true },
- { "azuki.cloud", true },
- { "azukie.com", true },
- { "azurecrimson.com", true },
- { "azuriasky.com", true },
- { "azuriasky.net", true },
- { "azzorti.com", true },
- { "azzurrapelletterie.it", true },
- { "b-b-law.com", true },
- { "b-cyclesshop.ch", false },
- { "b-honey.gr", true },
- { "b-landia.net", true },
- { "b-performance.de", true },
- { "b-root-force.de", true },
- { "b-services.net", false },
- { "b-tree.be", true },
- { "b0000.co", false },
- { "b00228.com", false },
- { "b00de.ga", true },
- { "b0305.com", true },
- { "b0306.com", true },
- { "b0307.com", true },
- { "b0309.com", true },
- { "b03aa.com", true },
- { "b03bb.com", true },
- { "b03cc.com", true },
- { "b0618.com", true },
- { "b0618.net", true },
- { "b0868.com", true },
- { "b0868.net", true },
- { "b0hr.ai", true },
- { "b0k.org", true },
- { "b0rk.com", true },
- { "b1111.co", false },
- { "b131000.com", true },
- { "b1758.net", true },
- { "b1768.com", true },
- { "b1768.net", true },
- { "b1788.com", true },
- { "b1788.net", true },
- { "b1c1l1.com", true },
- { "b2486.com", true },
- { "b2486.net", true },
- { "b2bmuzikbank.com", true },
- { "b303.me", true },
- { "b30365.com", true },
- { "b36594.com", true },
- { "b4bouncycastles.co.uk", true },
- { "b4ckbone.de", true },
- { "b4lint.hu", true },
- { "b4z.eu", true },
- { "b5189.com", true },
- { "b5189.net", true },
- { "b5289.com", true },
- { "b5902.com", true },
- { "b5903.com", true },
- { "b5904.com", true },
- { "b5905.com", true },
- { "b5906.com", true },
- { "b5907.com", true },
- { "b5908.com", true },
- { "b5910.com", true },
- { "b5989.net", true },
- { "b5dev.com", true },
- { "b62h.com", true },
- { "b64.club", true },
- { "b67701.com", true },
- { "b67702.com", true },
- { "b67703.com", true },
- { "b67704.com", true },
- { "b67705.com", true },
- { "b67772.com", true },
- { "b67773.com", true },
- { "b67774.com", true },
- { "b67775.com", true },
- { "b68.xyz", true },
- { "b70301.com", false },
- { "b70302.com", false },
- { "b70303.com", false },
- { "b70304.com", false },
- { "b70305.com", false },
- { "b7035.com", true },
- { "b70881.com", false },
- { "b70882.com", false },
- { "b70883.com", false },
- { "b70884.com", false },
- { "b70885.com", false },
- { "b70991.com", false },
- { "b70992.com", false },
- { "b70993.com", false },
- { "b70994.com", false },
- { "b70995.com", false },
- { "b72.com", true },
- { "b72.net", true },
- { "b7306.com", true },
- { "b73app.com", true },
- { "b73bb.com", true },
- { "b73dd.com", true },
- { "b73ee.com", true },
- { "b73ff.com", true },
- { "b767.net", true },
- { "b77018.com", false },
- { "b789.co", false },
- { "b83.tv", true },
- { "b83aa.com", true },
- { "b83bb.com", true },
- { "b83cc.com", true },
- { "b83dd.com", true },
- { "b83ee.com", true },
- { "b83ff.com", true },
- { "b83gg.com", true },
- { "b83hh.com", true },
- { "b83ii.com", true },
- { "b83jj.com", true },
- { "b83kk.com", true },
- { "b8591.com", true },
- { "b8591.net", true },
- { "b86255.com", false },
- { "b889b.com", true },
- { "b88vip2.com", true },
- { "b88vip3.com", true },
- { "b88vip4.com", true },
- { "b88vip5.com", true },
- { "b8979.com", true },
- { "b8979.net", true },
- { "b899365.com", true },
- { "b89aa.com", true },
- { "b89bb.com", true },
- { "b89cc.com", true },
- { "b89dd.com", true },
- { "b89ee.com", true },
- { "b89ff.com", false },
- { "b89gg.com", false },
- { "b89hh.com", false },
- { "b89ii.com", true },
- { "b89jj.com", true },
- { "b8a.me", true },
- { "b9018.com", true },
- { "b9018.net", true },
- { "b9108.com", true },
- { "b9108.net", true },
- { "b9110.com", true },
- { "b9110.net", true },
- { "b9112.com", true },
- { "b9112.net", true },
- { "b911gt.com", true },
- { "b911gt.net", true },
- { "b91688.info", true },
- { "b91688.net", true },
- { "b91688.org", true },
- { "b9175.com", true },
- { "b9175.net", true },
- { "b9258.com", true },
- { "b9258.net", true },
- { "b9318.com", true },
- { "b9318.net", true },
- { "b9418.com", true },
- { "b9418.net", true },
- { "b9428.com", true },
- { "b9428.net", true },
- { "b9453.net", true },
- { "b9468.com", true },
- { "b9468.net", true },
- { "b9488.com", true },
- { "b9488.net", true },
- { "b9498.net", true },
- { "b9518.com", true },
- { "b9518.info", true },
- { "b9518.net", true },
- { "b9518.org", true },
- { "b9528.com", true },
- { "b9538.com", true },
- { "b9538.net", true },
- { "b9598.net", true },
- { "b960.com", true },
- { "b9618.com", true },
- { "b9658.net", true },
- { "b9758.com", true },
- { "b9758.net", true },
- { "b979333.com", true },
- { "b979555.com", true },
- { "b979666.com", true },
- { "b979999.com", true },
- { "b9818.com", true },
- { "b9818.net", true },
- { "b9858.com", true },
- { "b9858.net", true },
- { "b9880.com", true },
- { "b99011.com", true },
- { "b99022.com", true },
- { "b99118.com", true },
- { "b9920.com", true },
- { "b99218.com", true },
- { "b99318.com", true },
- { "b99418.com", true },
- { "b9948.com", true },
- { "b9948.net", true },
- { "b99518.com", true },
- { "b9960.com", true },
- { "b99618.com", true },
- { "b99718.com", true },
- { "b99818.com", true },
- { "b99918.com", true },
- { "b9999ff.com", true },
- { "b9999hh.com", true },
- { "b9999ii.com", true },
- { "b9999jj.com", true },
- { "b9999ll.com", true },
- { "b9999mm.com", true },
- { "b9999nn.com", true },
- { "b9999pp.com", true },
- { "b9999qq.com", true },
- { "b9999ww.com", true },
- { "b9999zz.com", true },
- { "b99iosapp.com", true },
- { "b9best.cc", true },
- { "b9best.net", true },
- { "b9king.cc", true },
- { "b9king.com", true },
- { "b9king.net", true },
- { "b9winner.cc", true },
- { "ba47.net", true },
- { "baac-dewellmed.com", true },
- { "baalsworld.de", true },
- { "baanpingchan.com", true },
- { "baas-becking.biology.utah.edu", true },
- { "baazee.de", true },
- { "babacasino.net", true },
- { "babai.ru", true },
- { "babblenotes.com", true },
- { "babeleo.com", true },
- { "bablodel.biz", true },
- { "bablodel.com", true },
- { "babounet.com", true },
- { "babsbibs.com", true },
- { "baby-bath-tub.com", true },
- { "baby-care.ir", true },
- { "baby-digne.com", false },
- { "babybedding.com", true },
- { "babyboom.pl", true },
- { "babybuddah.ga", true },
- { "babycamapp.com", true },
- { "babyfotograf-schweiz.ch", true },
- { "babymasaze.cz", true },
- { "babyphototime.com", true },
- { "babypibu.com", true },
- { "bacaneriahlg.com", true },
- { "bacanora.tk", true },
- { "bachata.info", true },
- { "baches-piscines.com", true },
- { "bachmannyachts.com", true },
- { "bachmatt-baar.ch", true },
- { "bachweid-baar.ch", true },
- { "baciu.ch", false },
- { "backeby.eu", true },
- { "background-checks-systems.com", true },
- { "background-checks.asia", true },
- { "background-checks.biz", true },
- { "background-checks.mobi", true },
- { "backgroundchecks.online", true },
- { "backgroundscreenersofamerica.com", true },
- { "backlinkbase.com", true },
- { "backmitra.com", true },
- { "backmitra.mx", true },
- { "backmitra.nl", true },
- { "backmountaingas.com", true },
- { "backpacker.dating", true },
- { "backpackingtours.com", true },
- { "backpainandsciaticahouston.com", true },
- { "backscattering.de", false },
- { "backschues.com", true },
- { "backschues.de", true },
- { "backschues.net", true },
- { "backseatbandits.com", true },
- { "backsideverbier.ch", false },
- { "backtest.org", true },
- { "backtheeffup.com", true },
- { "backup-kurumsal.com", true },
- { "backupassist.de", true },
- { "backupcloud.ru", true },
- { "baconismagic.ca", true },
- { "bacontreeconsulting.com", true },
- { "bacsmegye.hu", true },
- { "bacterias.mx", false },
- { "bactrim-antibiotic.ml", true },
- { "bacula.jp", true },
- { "bad-wurzach.de", true },
- { "bad.pet", true },
- { "badam.co", true },
- { "badanka.com", true },
- { "badanteinfamiglia.it", true },
- { "badaparda.com", true },
- { "badblock.fr", true },
- { "badcreditcarsfinance.co.uk", true },
- { "badedesign.no", true },
- { "badf00d.de", true },
- { "badgersystems.de", true },
- { "badges.fedoraproject.org", true },
- { "badges.stg.fedoraproject.org", true },
- { "badgirlsbible.com", true },
- { "badgr.io", true },
- { "badhusky.com", false },
- { "badkamermarkt.nl", true },
- { "badmania.fr", true },
- { "badmintonadvisor.com", true },
- { "badmintonbible.com", true },
- { "badodds.ga", true },
- { "badoo.com", true },
- { "badoo.de", true },
- { "badoo.eu", true },
- { "badoo.us", true },
- { "badrequest.me", true },
- { "baeder-luboss.de", true },
- { "baer.im", true },
- { "baer.one", true },
- { "baer.space", true },
- { "bag.bg", true },
- { "bageez.us", true },
- { "bagelcraft.net", true },
- { "bageluncle.com", true },
- { "baggy.me.uk", true },
- { "bagheera.me.uk", true },
- { "baglu.com", false },
- { "bagnichimici.roma.it", true },
- { "bagsofbounce.co.uk", true },
- { "bagspecialist.nl", true },
- { "bagwrap.com", true },
- { "bah.im", false },
- { "bahaiprayers.io", true },
- { "bahana.net", true },
- { "bahnbonus-praemienwelt.de", true },
- { "bahnenimbild.de", true },
- { "bahnenimbild.eu", true },
- { "bahnhelden.de", true },
- { "bahninrotweissrot.at", true },
- { "bahnmagazine.de", true },
- { "bahrevaran.ir", true },
- { "baidu-s.com", true },
- { "baiduo.com", true },
- { "baifubao.com", true },
- { "baiker.info", true },
- { "baildonbouncycastles.co.uk", true },
- { "baileebee.com", true },
- { "baileybae.com", true },
- { "bailleux.be", true },
- { "bailonga.com", true },
- { "baitaplamvan.com", true },
- { "baitcon.com", true },
- { "baithe.co.za", true },
- { "baiyu.blog", true },
- { "bajic.ch", true },
- { "baka-gamer.net", true },
- { "baka.org.cn", true },
- { "bakermen.com", true },
- { "bakersafari.co", true },
- { "bakersfieldhomeoffer.com", true },
- { "bakerviewdentalcentre.com", true },
- { "bakeup.be", true },
- { "bakibal.com", true },
- { "bakingstone.com", true },
- { "bakkerij-janschrieks.nl", true },
- { "bakkerinjebuurt.be", true },
- { "bakongcondo.com", true },
- { "bakxnet.com", true },
- { "balade-commune.ch", false },
- { "baladecommune.ch", false },
- { "balafon.cloud", true },
- { "balaganlimited.cf", true },
- { "balancascia.com.br", true },
- { "balance7.jp", true },
- { "balanceado.com", true },
- { "balancedbrawl.net", true },
- { "balancenaturalhealthclinic.ca", true },
- { "balaskas.gr", true },
- { "balboa.io", true },
- { "balboa.org.uk", true },
- { "balcaonet.com.br", true },
- { "balcarek.pl", true },
- { "balconnr.com", true },
- { "balconsverdun.com", false },
- { "baleen.us", true },
- { "balia.de", true },
- { "balicekzdravi.cz", false },
- { "balikonos.cz", true },
- { "balinese.dating", true },
- { "balist.es", true },
- { "balivillassanur.com", true },
- { "balkancrystals.com", true },
- { "balkanpharmstore.com", true },
- { "balkonien.org", true },
- { "ball-bizarr.de", true },
- { "ballarin.cc", true },
- { "ballast.tk", true },
- { "ballejaune.com", true },
- { "balletcenterofhouston.com", true },
- { "ballettstudio-ost.de", true },
- { "ballinw.com", true },
- { "ballisticdetailing.com", true },
- { "ballmerpeak.org", true },
- { "ballonsportclub-erlangen.de", true },
- { "ballotapi.com", true },
- { "ballothero.com", true },
- { "ballparkbuns.com", false },
- { "ballroom.info", true },
- { "balmeo.co.uk", true },
- { "balmofgilead.org.uk", true },
- { "baloch-intelligence.tk", true },
- { "balsallcommonbouncycastles.co.uk", true },
- { "balsamaiso.es", true },
- { "balslev.io", true },
- { "balter.com", true },
- { "balthazarlondon.com", true },
- { "balticer.de", true },
- { "balticmed.pl", true },
- { "balticnetworks.com", true },
- { "bamaagahi.ir", true },
- { "bamanshop.com", false },
- { "bamboehof.nl", true },
- { "bamboorelay.com", true },
- { "bambumania.com.br", true },
- { "bamily.rocks", true },
- { "bananabandy.com", true },
- { "bananacloud.fr", false },
- { "banananet.work", true },
- { "bananice.moe", true },
- { "bancacrs.it", true },
- { "bancastato.ch", true },
- { "bancobai.ao", true },
- { "bancoctt.pt", true },
- { "bancodeloja.fin.ec", true },
- { "bancomap.ch", true },
- { "bancor.network", true },
- { "bancosdominicanos.net", true },
- { "bandagastrica.es", true },
- { "bandeira1.com.br", true },
- { "bandeiraimoveisitu.com.br", true },
- { "bandeirasnacionais.com", true },
- { "banderas-mundo.es", true },
- { "bandiere-mondo.it", true },
- { "bandiga.it", true },
- { "bandito.re", true },
- { "bandolino-bewind.nl", true },
- { "bandolino.nl", true },
- { "banes.ch", true },
- { "banfun.org", true },
- { "bangdream.ga", true },
- { "bangkok-dark-night.com", true },
- { "bangkok.dating", true },
- { "bangkokcity.de", true },
- { "bangkokcookingclass.com", true },
- { "banglarfont.com", true },
- { "banglets.com", true },
- { "bangorfederal.com", true },
- { "banguilacoquette.com", true },
- { "bangumi.co", true },
- { "bangzhu88.com", true },
- { "banham.co.uk", false },
- { "banham.com", true },
- { "banjostringiz.com", true },
- { "bank-yahav.co.il", true },
- { "bank.barclays.co.uk", true },
- { "bank.simple.com", false },
- { "banka.space", true },
- { "bankanswers.gov", true },
- { "bankapp.se", true },
- { "bankapply.eu", true },
- { "bankbranchlocator.com", true },
- { "bankee.us", true },
- { "banketbesteld.nl", true },
- { "bankheadvegetables.com", true },
- { "bankin.com", true },
- { "bankinter.pt", true },
- { "bankio.se", true },
- { "banknet.gov", true },
- { "bankofdenton.com", true },
- { "bankpolicies.com", true },
- { "bankruptcy.ky", true },
- { "banksaround.com", true },
- { "banksiaparkcottages.com.au", true },
- { "bankstownapartments.com.au", true },
- { "bankvanbreda.be", true },
- { "banlinhdanong.com", true },
- { "bannermarquees.ie", true },
- { "bannerworld.co.uk", true },
- { "bannsecurity.com", true },
- { "banquevanbreda.be", true },
- { "bantaihost.com", true },
- { "bao-in.com", true },
- { "bao-in.net", true },
- { "baofengtech.com", true },
- { "baogiathicongnoithat.com", true },
- { "baokhangfood.com", true },
- { "baopublishing.it", true },
- { "baoxue1.com", true },
- { "baoxue2.com", true },
- { "baoxue3.com", true },
- { "baoxue5.com", true },
- { "baoxue6.com", true },
- { "baoxue7.com", true },
- { "baoxue8.com", true },
- { "baoxue9.com", true },
- { "bapha.be", true },
- { "baptisteplanckaert.tk", true },
- { "bar-harcourt.com", true },
- { "bar.pl", true },
- { "barabrume.fr", true },
- { "barakayu.com", true },
- { "barans2239.com", true },
- { "baranyavar.hu", true },
- { "barao.tk", true },
- { "baravalle.com", true },
- { "baraxolka.ru", true },
- { "barbaderespeito.com.br", true },
- { "barbara-fuchs-gruene-fuerth.de", true },
- { "barbarabowersrealty.com", true },
- { "barbarafabbri.com", true },
- { "barbarafeldman.com", true },
- { "barbarians.com", false },
- { "barbate.fr", true },
- { "barbe-n-blues.fr", true },
- { "barbiere.it", true },
- { "barbu.family", true },
- { "barburas.com", true },
- { "barca-movie.jp", true },
- { "barcats.co.nz", true },
- { "barcats.com", true },
- { "barcats.com.au", true },
- { "barcel.com.mx", true },
- { "barcelonabagels.cat", true },
- { "barcelonapremium.es", true },
- { "barcelonapremiummini.es", true },
- { "barcelonawinewalk.com", true },
- { "barclays.net", true },
- { "bardes.org", true },
- { "bardiharborow.com", true },
- { "bardiharborow.tk", true },
- { "baresquare.com", true },
- { "barganhanaweb.ml", true },
- { "bariatrica.es", true },
- { "bariatricsurgerysmg.com", true },
- { "bariseau-mottrie.be", false },
- { "barisi.me", true },
- { "baristador.com", true },
- { "barkassen15.se", true },
- { "barkerjr.xyz", true },
- { "barkingaboutbusiness.com", true },
- { "barkstop.net", true },
- { "barlex.pl", true },
- { "barlotta.net", true },
- { "barnakstudio.com", true },
- { "barnakstudio.ir", true },
- { "barnettville.com", true },
- { "barneveldcentrum.nl", true },
- { "barneydavey.com", true },
- { "barnfotografistockholm.se", true },
- { "barnhardt4berks.com", true },
- { "barnstead-water.com", true },
- { "barnvets.co.uk", true },
- { "baroloboys.de", true },
- { "baron14.be", true },
- { "baronspices.com", true },
- { "barpodsosnami.pl", true },
- { "barracuda.com.tr", true },
- { "barrera.io", true },
- { "barriofut.com", true },
- { "barrydenicola.com", true },
- { "bars.kh.ua", true },
- { "barsashop.com.br", true },
- { "barsgroup.com", true },
- { "bart-f.com", true },
- { "barta.me", true },
- { "bartbania.com", true },
- { "bartel.ws", true },
- { "bartelt.name", true },
- { "barter.vg", true },
- { "barter4crypto.com", true },
- { "barth.services", true },
- { "bartkramer.nl", false },
- { "bartlamboo.nl", true },
- { "bartolomebellido.com", true },
- { "bartula.de", true },
- { "bartzutow.xyz", true },
- { "baruch.me", true },
- { "bas.co.jp", true },
- { "bascht.com", true },
- { "base-autonome-durable.com", false },
- { "base-n.ru", true },
- { "basebalance.net", true },
- { "baseballsavings.com", true },
- { "baseconvert.com", true },
- { "basedos.com", true },
- { "baseerapp.com", true },
- { "basel-gynaecology.com", true },
- { "basel-gynaekologie.ch", true },
- { "baselang.com", true },
- { "basementdoctor.com", false },
- { "basementdoctornorthwest.com", true },
- { "basementfinishingohio.com", true },
- { "basementwaterproofingdesmoines.com", true },
- { "basementwaterproofingwi.com", true },
- { "baseweb.design", true },
- { "bashing-battlecats.com", true },
- { "bashkirlife.tk", true },
- { "bashstreetband.co.uk", true },
- { "basicapparel.de", true },
- { "basicattentiontoken.org", true },
- { "basics.net", true },
- { "basilsys.com", true },
- { "basisbedarf.de", true },
- { "basketball-brannenburg.de", true },
- { "basketforex.com", true },
- { "baskibu.com", true },
- { "basnoslovno.ru", true },
- { "basonlinemarketing.nl", true },
- { "basradio.tk", true },
- { "bass-pro.ru", true },
- { "bassblog.net", true },
- { "bassment.ph", true },
- { "bassresource.com", true },
- { "bassrhymeposse.tk", true },
- { "bassrider.eu", true },
- { "bassys.com.co", true },
- { "bastardandpoors.com", true },
- { "bastelzauberwelt.de", true },
- { "bastide-viens.com", true },
- { "bastolino.de", true },
- { "bastter.com", true },
- { "basw.eu", true },
- { "baswag.de", true },
- { "baswetter.photography", true },
- { "basyspro.net", true },
- { "bat909.com", true },
- { "bat909.net", true },
- { "bat9vip.com", true },
- { "bat9vip.net", true },
- { "batcave.tech", true },
- { "batch.com", true },
- { "batch.engineering", true },
- { "baterioverolety.cz", true },
- { "bati-alu.fr", true },
- { "batiburrillo.net", true },
- { "batipresta.ch", false },
- { "batiskaf.ua", true },
- { "batistareisfloresonline.com.br", true },
- { "batitrakya.org", true },
- { "batolis.com", true },
- { "batook.org", true },
- { "batteryboys.ca", true },
- { "batteryboys.com", true },
- { "batterystaple.pw", true },
- { "battle-game.com", true },
- { "battleboxx.com", false },
- { "battleguard.net", true },
- { "battlerealms.cc", true },
- { "batuhanbensoy.com.tr", true },
- { "batvip9.net", true },
- { "bauer.network", true },
- { "bauernmarkt-fernitz.at", true },
- { "baufi24.de", true },
- { "baugeldspezi.de", true },
- { "baugelitt.eu", true },
- { "baugemeinschaftbernstein.de", true },
- { "bauingenieur24.de", true },
- { "baumannfabrice.com", true },
- { "baumkuchen-aus-dresden.de", true },
- { "baur.de", true },
- { "bausep.de", true },
- { "bauthier-occasions.be", false },
- { "bautied.de", true },
- { "bautizodelucia.com", true },
- { "bauunternehmen-herr.de", true },
- { "bavarianhiker.de", true },
- { "bavaroparadise.com", true },
- { "bavarovillage.com", true },
- { "bavartec.de", true },
- { "bawbby.com", true },
- { "bayareaenergyevents.com", true },
- { "baychimo.com", true },
- { "bayden.com", true },
- { "bayer-stefan.com", true },
- { "bayer-stefan.de", true },
- { "bayer.earth", true },
- { "bayerhazard.de", true },
- { "bayerstefan.com", true },
- { "bayerstefan.de", true },
- { "bayerstefan.eu", true },
- { "bayherbalist.com", true },
- { "bayilelakiku.com", true },
- { "bayltd.com", true },
- { "bayly.eu", true },
- { "baymard.com", true },
- { "bayportbotswana.com", true },
- { "bayportghana.com", true },
- { "bayporttanzania.com", true },
- { "bayportuganda.com", true },
- { "baypromoteam.co.uk", true },
- { "bayraklar.info", true },
- { "baystreet.com.mt", true },
- { "baytalebaa.com", true },
- { "baytownent.com", true },
- { "baytv.it", true },
- { "baywatch.io", true },
- { "bayz.de", true },
- { "baza-gai.com.ua", true },
- { "bazaarbhaav.com", true },
- { "bazaarcompass.com", true },
- { "bazaclub.ru", true },
- { "bazari.com.pl", true },
- { "bazos.at", true },
- { "bazos.cz", true },
- { "bazos.pl", true },
- { "bazos.sk", true },
- { "bazziergraphik.com", true },
- { "bb057.com", true },
- { "bb087.com", true },
- { "bb882.com", true },
- { "bbalposticino.it", true },
- { "bbbff.net", true },
- { "bbc67.fr", true },
- { "bbcastles.com", true },
- { "bbcomcdn.com", true },
- { "bbforums.com", true },
- { "bbgeschenke.ch", false },
- { "bbimarketing.com", true },
- { "bbinsure.com", true },
- { "bbka.org.uk", true },
- { "bbkworldwide.jp", true },
- { "bbld.de", true },
- { "bblove.me", true },
- { "bblsa.ch", false },
- { "bbmagnagrecia.it", true },
- { "bbnx.net", true },
- { "bbs8080.net", true },
- { "bbsec.xyz", true },
- { "bbswin9.cc", true },
- { "bbuio.com", false },
- { "bbw.dating", true },
- { "bbwcs.co.uk", true },
- { "bbwsexclips.com", true },
- { "bbxin9.com", true },
- { "bbxin9.net", true },
- { "bbyouthco.com", true },
- { "bc-bd.org", false },
- { "bc-diffusion.com", true },
- { "bcansw.com.au", true },
- { "bcbulle.ch", false },
- { "bcdiesel.ca", true },
- { "bcdonadio.com", true },
- { "bcdonadio.com.br", true },
- { "bcdonadio.org", true },
- { "bceventhire.co.uk", true },
- { "bch7al.ma", false },
- { "bchep.com", true },
- { "bck-koethen.de", true },
- { "bck-lelystad.nl", true },
- { "bckaccompressoroz.com", true },
- { "bclogandtimberbuilders.com", true },
- { "bclrk.us", true },
- { "bcmainland.ca", true },
- { "bcmhire.co.uk", true },
- { "bcoffices.com.mx", true },
- { "bcrook.com", true },
- { "bcswampcabins.com", true },
- { "bd-media.tk", true },
- { "bd2positivo.com", true },
- { "bda-boulevarddesairs.com", false },
- { "bdbxml.net", true },
- { "bdd.fi", true },
- { "bdikaros-network.net", true },
- { "bdpestsolutionsstlouis.com", true },
- { "bdsmwiki.hu", true },
- { "bdtopshop.com", true },
- { "be-a-password.ninja", true },
- { "be-ka-tec.de", true },
- { "be-real.life", false },
- { "be-up-developpement.com", true },
- { "be-webdesign.com", true },
- { "be.search.yahoo.com", false },
- { "be2cloud.de", true },
- { "be4lead.com", true },
- { "be9458.com", true },
- { "be958.com", true },
- { "be958.net", true },
- { "bea.gov", true },
- { "beacham.online", true },
- { "beachcitycastles.com", true },
- { "beachmarketing.co.uk", true },
- { "beachpoint.tk", true },
- { "beadare.com", true },
- { "beadare.nl", true },
- { "beaglesecurity.com", true },
- { "bealpha.pl", true },
- { "beam-to.me", true },
- { "beambdi.com", true },
- { "beanbagaa.com", true },
- { "beanilla.com", true },
- { "beansgalore.com.au", true },
- { "bearcms.com", true },
- { "bearded.sexy", true },
- { "bearden.io", true },
- { "beardic.cn", true },
- { "beardsome.me", true },
- { "beargoggleson.com", true },
- { "bearingworks.com", true },
- { "bearlakelife.com", true },
- { "beastiejob.com", true },
- { "beastowner.li", true },
- { "beatfeld.de", true },
- { "beatnikbreaks.com", true },
- { "beatrice-nightscout.herokuapp.com", true },
- { "beatrice-raws.org", true },
- { "beatrizaebischer.ch", false },
- { "beatuprobot.net", true },
- { "beaumelcosmetiques.fr", true },
- { "beaute-eternelle.ch", false },
- { "beauty-expert.co", true },
- { "beauty-form.ir", true },
- { "beauty-italy.ru", true },
- { "beauty24.de", true },
- { "beautyandfashionadvice.com", true },
- { "beautybh.com", true },
- { "beautycarepack.com.ng", true },
- { "beautycon.ir", true },
- { "beautyevent.fr", true },
- { "beautyinweb.net", true },
- { "beautykat.ru", true },
- { "beautyseasons.ru", true },
- { "beaver-creek.ga", true },
- { "beaverdamautos.com", true },
- { "beavertales.ca", true },
- { "bebe2luxe.es", true },
- { "bebe2luxe.fr", true },
- { "bebecar.com", true },
- { "bebef.de", true },
- { "bebefofuxo.com.br", true },
- { "bebemamae.com", true },
- { "bebes.uno", true },
- { "bebest.gov", false },
- { "beboldpr.com", true },
- { "beccaanne.photography", true },
- { "bech32.net", true },
- { "beckerantiques.com", true },
- { "beckijayes.family", true },
- { "becleverwithyourcash.com", true },
- { "become-lucky.com", true },
- { "becomeabricklayer.com.au", true },
- { "becquerelgroup.com", true },
- { "becs.ch", false },
- { "becydog.cz", true },
- { "bedacdn.com", true },
- { "bedamedia.com", true },
- { "bedandbreakfast.dk", true },
- { "bedandbreakfasteuropa.com", true },
- { "bedandbreakfasthoekvanholland.com", true },
- { "beddentotaal.nl", true },
- { "bedding.ro", true },
- { "bedels.nl", true },
- { "bednar.co", true },
- { "bedrijvencentrum-maartenslaan.nl", true },
- { "bedrijvencentrum-malberg.nl", true },
- { "bedrocklinux.org", true },
- { "bedste10.dk", true },
- { "bedtimeflirt.com", true },
- { "bee-creative.nl", true },
- { "bee-line.org.uk", true },
- { "bee-removal-dublin.com", true },
- { "beehive.govt.nz", true },
- { "beehive42.com", true },
- { "beehive42.eu", true },
- { "beehive42.net", true },
- { "beehive42.nl", true },
- { "beehive42.org", true },
- { "beehosting.pro", true },
- { "beelen.fr", true },
- { "beelit.com", true },
- { "beeming.net", true },
- { "beer9.com", true },
- { "beercast.co.uk", true },
- { "beeremovalspretoria.co.za", true },
- { "beergazetteer.com", true },
- { "beerians.com", true },
- { "beerians.info", true },
- { "beerjet.bg", true },
- { "beerjet.cz", true },
- { "beerjet.ro", true },
- { "beerjet.sk", true },
- { "beerjetcz.cz", true },
- { "beermedlar.com", true },
- { "beers.my", true },
- { "beersconf.com", true },
- { "beestation13.com", true },
- { "beeswarmrehoming.com.au", true },
- { "beeswax-orgone.com", true },
- { "beethoveninlove.com", true },
- { "beetman.net", true },
- { "beeutifulparties.co.uk", true },
- { "beexfit.com", false },
- { "beezkneezcastles.co.uk", true },
- { "beeznest.com", true },
- { "befoodsafe.gov", true },
- { "beforesunrise.de", true },
- { "beforeyoueatoc.com", true },
- { "beframed.ch", false },
- { "befreewifi.info", true },
- { "befundonline.de", true },
- { "begabungsfoerderung.info", true },
- { "begbie.com", true },
- { "beginner.nl", true },
- { "beginwp.top", true },
- { "behamepresrdce.sk", true },
- { "behamzdarma.cz", true },
- { "behar-selimi.tk", true },
- { "behead.de", true },
- { "beherit.pl", true },
- { "behindertenagentur.de", true },
- { "behna24hodin.cz", true },
- { "behoerden-online-dienste.de", true },
- { "behoreal.cz", true },
- { "bei18.com", true },
- { "beichtgenerator.de", true },
- { "beijesweb.nl", true },
- { "beijing.dating", true },
- { "beijinglug.club", true },
- { "beimchristoph.de", true },
- { "beinad.com", true },
- { "beinad.ru", true },
- { "beisance.com", true },
- { "beitmidrashrambam.com", true },
- { "bejarano.io", true },
- { "bekolite.com", true },
- { "bel-snegirek.ru", true },
- { "belacapa.com.br", true },
- { "belafonte.co", true },
- { "belanglos.de", true },
- { "belani.eu", true },
- { "belanja.express", true },
- { "belarto.be", true },
- { "belarto.de", true },
- { "belarto.fr", true },
- { "belarto.it", true },
- { "belarto.nl", true },
- { "belarto.pl", true },
- { "belastingmiddeling.nl", true },
- { "belavis.com", true },
- { "belebey.city", true },
- { "beleggingspanden-financiering.nl", true },
- { "belegit.org", true },
- { "belezashopping.com.br", true },
- { "belfastbounce.co.uk", true },
- { "belfastlocks.com", true },
- { "belfasttechservices.co.uk", true },
- { "belfastvibes.com", true },
- { "belfor-probleme.de", true },
- { "belfordroxo.net.br", true },
- { "belge.rs", true },
- { "belgers.com", true },
- { "belgicaservices.be", true },
- { "belgie-postcodes.be", true },
- { "belgraver.email", true },
- { "belgraver.eu", true },
- { "belgraver.xyz", true },
- { "belhopro.be", true },
- { "belics.com", true },
- { "belien-tweedehandswagens.be", false },
- { "believablebook.com", false },
- { "believersweb.org", true },
- { "belkamfish.com", true },
- { "bell.id.au", true },
- { "bella.network", true },
- { "bellaaroma.com.tw", true },
- { "bellabrowbydesign.com", true },
- { "bellaklein.de", true },
- { "bellamodeling.com", true },
- { "bellebakes.blog", true },
- { "bellevueowners.tk", true },
- { "bellezzasenzalimiti.it", true },
- { "bellinghamdetailandglass.com", true },
- { "belllegal.com.au", true },
- { "belloy.ch", false },
- { "belloy.net", false },
- { "bellware.io", false },
- { "belly-button-piercings.com", true },
- { "bellyandbrain.amsterdam", true },
- { "belmontgoessolar.org", true },
- { "belouga.org", true },
- { "belquant.cf", true },
- { "beltar.nl", true },
- { "belug.de", true },
- { "belvoirbouncycastles.co.uk", true },
- { "bembee.tk", true },
- { "bemcorp.de", true },
- { "bemindly.com", true },
- { "bemsoft.pl", true },
- { "ben-energy.com", false },
- { "ben2.co.il", true },
- { "benabrams.it", true },
- { "benary.org", true },
- { "benatherton.com", true },
- { "benazir-reaction.tk", true },
- { "benbalter.com", true },
- { "benbozsa.ca", true },
- { "benc.io", true },
- { "benceskorka.com", true },
- { "benchling.com", true },
- { "benchmarkmonument.com", true },
- { "benchstoolo.com", true },
- { "bencorby.com", true },
- { "bendemaree.com", true },
- { "bendingtheending.com", true },
- { "bendix.co", true },
- { "bendostore.com", true },
- { "bendyworks.com", true },
- { "beneathvt.com", true },
- { "benedict-balzer.de", true },
- { "benedictoaguilar.tech", true },
- { "benediktgeissler.de", true },
- { "benefits.gov", true },
- { "benefitshub.io", true },
- { "benefitshub.xyz", true },
- { "benepiscinas.com.br", true },
- { "benetcasablancas.tk", true },
- { "benewpro.com", true },
- { "bengalurugifts.com", true },
- { "bengisureklam.com", true },
- { "benhaney.com", true },
- { "benhartmann.de", true },
- { "benhavenarchives.org", true },
- { "benjamin-hering.com", true },
- { "benjamin-mary.herokuapp.com", true },
- { "benjamin.pe", true },
- { "benjaminblack.net", true },
- { "benjamindietrich.com", true },
- { "benjamindietrich.de", true },
- { "benjaminjurke.com", true },
- { "benjaminkopelke.com", true },
- { "benjamins.com", true },
- { "benjaminvasel.de", true },
- { "benjii.me", true },
- { "benjijaldoner.nl", true },
- { "benleemd.com", true },
- { "benmack.net", true },
- { "benmatthews.com.au", true },
- { "benmillett.us", false },
- { "bennet.org", true },
- { "bennettsbouncycastlehire.co.uk", true },
- { "bennettshire.co.uk", true },
- { "benni1.eu", true },
- { "bennierobinson.com", true },
- { "benno.frl", true },
- { "bennygommers.nl", true },
- { "benoniplumber24-7.co.za", true },
- { "benriya.shiga.jp", true },
- { "bensbouncycastles.co.uk", true },
- { "benschnarr.com", true },
- { "benscobie.com", true },
- { "benshoof.org", true },
- { "bensinflatables.co.uk", true },
- { "bensokol.com", true },
- { "bensoy.com", true },
- { "benstevinson.com", true },
- { "bentertain.de", true },
- { "bentinata.com", true },
- { "bentley.blog", true },
- { "bentley.link", true },
- { "bentongroup.co.uk", true },
- { "bentonweatherstone.co.uk", true },
- { "bentrask.com", true },
- { "benu.cz", true },
- { "benvds.com", true },
- { "benzi.io", true },
- { "benzina.cn", true },
- { "beoordelingen.be", true },
- { "bepayd.com", true },
- { "beplephan.com", true },
- { "bepsvpt.me", true },
- { "bequ1ck.com", true },
- { "bequiia.com", true },
- { "berakad.com", true },
- { "beranovi.com", true },
- { "beraten-entwickeln-steuern.de", true },
- { "berati.tv", true },
- { "beratungswelt.dvag", true },
- { "berdu.id", true },
- { "bereaplumber.co.za", true },
- { "bereginy.com.ua", true },
- { "berend.tk", true },
- { "berger-chiro.com", true },
- { "bergevoet-fa.nl", false },
- { "bergfex.at", true },
- { "bergfex.com", true },
- { "berghuus.ch", true },
- { "berglust-pur.de", true },
- { "bergman-gmbh.de", true },
- { "bergmanbeachproperties.com", true },
- { "bergstoneware.com", true },
- { "berichtsheft-vorlage.de", true },
- { "berikod.ru", true },
- { "beris.us", true },
- { "beritanow.tk", true },
- { "berkat-luqs.ddns.net", true },
- { "berksabstract.com", true },
- { "berksarl.org", true },
- { "berksnetworking.com", true },
- { "berlin-cuisine.com", true },
- { "berlin-flirt.de", true },
- { "berlin.dating", true },
- { "berluga.com", true },
- { "bermeitinger.eu", true },
- { "bermytraq.bm", true },
- { "bern.bz", true },
- { "berna.fr", true },
- { "bernar.do", true },
- { "bernardcontainers.be", false },
- { "bernardgo.com", true },
- { "bernat.ch", true },
- { "bernat.im", true },
- { "bernbrucher.com", true },
- { "bernbrucher.de", true },
- { "bernd-leitner-fotodesign.com", true },
- { "bernd-leitner-fotodesign.de", true },
- { "bernd-leitner.de", true },
- { "berndbousard.com", true },
- { "berndklaus.at", true },
- { "bernexskiclub.ch", true },
- { "bernhard-seidenspinner.de", true },
- { "bernhardkau.de", true },
- { "bernhardluginbuehl.ch", true },
- { "bernhardluginbuehl.com", true },
- { "bernieware.de", true },
- { "bernmail.ch", true },
- { "berra.se", true },
- { "berruezoabogados.com", true },
- { "berrus.com", true },
- { "berrypay.com", true },
- { "bersotavocats.fr", false },
- { "berst.cz", true },
- { "berthabailey.com", true },
- { "bertholdsson.com", true },
- { "bertold.org", true },
- { "bertoliniodontoiatria.it", true },
- { "bertrand.bio", true },
- { "bertrandkeller.info", true },
- { "bertsmithvwparts.com", true },
- { "beryl.net", true },
- { "bescoutednow.com", true },
- { "bescover.com", true },
- { "besensi.com", true },
- { "beserberg.tk", true },
- { "besole.ch", true },
- { "bespoiled.nl", true },
- { "bespokebathrooms.com.au", true },
- { "bespokemortgages.co.uk", true },
- { "bespokestraps.com", true },
- { "best-accounting-schools.com", true },
- { "best-art-colleges.com", true },
- { "best-baptist-colleges.com", true },
- { "best-beauty-schools.com", true },
- { "best-book.gq", true },
- { "best-business-colleges.com", true },
- { "best-catholic-colleges.com", true },
- { "best-community-colleges.com", true },
- { "best-culinary-colleges.com", true },
- { "best-education-schools.com", true },
- { "best-engineering-colleges.com", true },
- { "best-essay-service.com", true },
- { "best-graduate-programs.com", true },
- { "best-hvac-schools.com", true },
- { "best-lutheran-colleges.com", true },
- { "best-management-schools.com", true },
- { "best-marketing-schools.com", true },
- { "best-music-colleges.com", true },
- { "best-nursing-colleges.com", true },
- { "best-pharmacy-schools.com", true },
- { "best-tickets.co.uk", true },
- { "best-trucking-schools.com", true },
- { "best-wallpaper.net", true },
- { "best10websitebuilders.com", true },
- { "best2pay.net", true },
- { "best66.me", true },
- { "bestattungen-kammerer.de", true },
- { "bestattungshaus-kammerer.de", true },
- { "bestautoinsurance.com", true },
- { "bestbatteriesonline.com", true },
- { "bestboot.cf", true },
- { "bestbrokerindia.com", true },
- { "bestbuyzone.com", true },
- { "bestcarscyprus.com", true },
- { "bestcivilattorneys.com", true },
- { "bestcrossbowguide.com", true },
- { "bestdating.today", true },
- { "bestdownloadscenter.com", true },
- { "bestechgadgets.tk", true },
- { "bestedeal.nl", true },
- { "bestehostingproviders.nl", true },
- { "bestesb.com", true },
- { "bestessayhelp.com", true },
- { "bestfotostudio.com", true },
- { "bestfriendsequality.org", true },
- { "bestgiftever.ca", true },
- { "bestguessonline.com", true },
- { "besthemes.tk", true },
- { "besthost.cz", true },
- { "besti.it", true },
- { "bestinbarter.com", true },
- { "bestinshowing.com", true },
- { "bestinver.es", false },
- { "bestjumptrampolines.be", true },
- { "bestkenmoredentists.com", true },
- { "bestmedsmmj.com", true },
- { "bestmodels.ua", true },
- { "bestmotherfucking.website", true },
- { "bestofbooks.gq", true },
- { "bestoliveoils.com", true },
- { "bestpartyhire.com", true },
- { "bestpig.fr", true },
- { "bestplumbing.com", true },
- { "bestporngirls.com", true },
- { "bestpractice.domains", true },
- { "bestprint.vn", true },
- { "bestproductsaudit.com", true },
- { "bestshoesmix.com", true },
- { "bestsingingbowls.com", true },
- { "besttrade.tk", true },
- { "bestvideoeffects.net", true },
- { "bestwarezone.com", true },
- { "bestwebcams.ml", true },
- { "bestwebsite.gallery", true },
- { "bet-99.cc", true },
- { "bet-99.com", true },
- { "bet-99.net", true },
- { "bet01vip.com", false },
- { "bet02vip.com", false },
- { "bet03vip.com", false },
- { "bet04vip.com", false },
- { "bet05vip.com", false },
- { "bet064.com", true },
- { "bet074.com", true },
- { "bet10vip.com", false },
- { "bet166111.com", true },
- { "bet166222.com", true },
- { "bet166333.com", true },
- { "bet166444.com", true },
- { "bet166555.com", true },
- { "bet166777.com", true },
- { "bet166888.com", true },
- { "bet1668888.com", true },
- { "bet166b.com", true },
- { "bet166bbb.com", true },
- { "bet166c.com", true },
- { "bet166ddd.com", true },
- { "bet166eee.com", true },
- { "bet166fff.com", true },
- { "bet166hhh.com", true },
- { "bet166tt.com", true },
- { "bet166uu.com", true },
- { "bet166ww.com", true },
- { "bet166xx.com", true },
- { "bet166yy.com", true },
- { "bet168wy.com", true },
- { "bet168wy.net", true },
- { "bet261.com", true },
- { "bet333111.com", true },
- { "bet333123.com", true },
- { "bet333222.com", true },
- { "bet333345.com", true },
- { "bet333444.com", true },
- { "bet333456.com", true },
- { "bet333555.com", true },
- { "bet333567.com", true },
- { "bet333666.com", true },
- { "bet333678.com", true },
- { "bet333789.com", true },
- { "bet333999.com", true },
- { "bet333h.com", true },
- { "bet333i.com", true },
- { "bet333j.com", true },
- { "bet333k.com", true },
- { "bet333l.com", true },
- { "bet333m.com", true },
- { "bet333o.com", true },
- { "bet333p.com", true },
- { "bet333r.com", true },
- { "bet333s.com", true },
- { "bet333t.com", true },
- { "bet333u.com", true },
- { "bet333v.com", true },
- { "bet333w.com", true },
- { "bet333x.com", true },
- { "bet333y.com", true },
- { "bet33app.com", true },
- { "bet3602.com", true },
- { "bet3607.com", true },
- { "bet3639.com", true },
- { "bet365cn-casino.com", true },
- { "bet365cn-game.com", true },
- { "bet365cn-keno.com", true },
- { "bet365cn-livecasino.com", true },
- { "bet365cn-poker.com", true },
- { "bet365cn-sports.com", true },
- { "bet365cn-vegas.com", true },
- { "bet365cnq.com", true },
- { "bet365cnr.com", true },
- { "bet365cns.com", true },
- { "bet365cnt.com", true },
- { "bet365cnu.com", true },
- { "bet365cnv.com", true },
- { "bet365cnw.com", true },
- { "bet365cnx.com", true },
- { "bet365cny.com", true },
- { "bet365cnz.com", true },
- { "bet3app.com", true },
- { "bet43a.com", true },
- { "bet43app.com", true },
- { "bet43b.com", true },
- { "bet43c.com", true },
- { "bet43d.com", true },
- { "bet43e.com", true },
- { "bet43f.com", true },
- { "bet43g.com", true },
- { "bet43h.com", true },
- { "bet43i.com", true },
- { "bet43j.com", true },
- { "bet43k.com", true },
- { "bet43l.com", true },
- { "bet43m.com", true },
- { "bet43n.com", true },
- { "bet43o.com", true },
- { "bet43p.com", true },
- { "bet43q.com", true },
- { "bet43r.com", true },
- { "bet43s.com", true },
- { "bet43t.com", true },
- { "bet43u.com", true },
- { "bet43v.com", true },
- { "bet43w.com", true },
- { "bet43x.com", true },
- { "bet43y.com", true },
- { "bet43z.com", true },
- { "bet44401.com", true },
- { "bet44402.com", true },
- { "bet44403.com", true },
- { "bet44404.com", true },
- { "bet44405.com", true },
- { "bet44406.com", true },
- { "bet44407.com", true },
- { "bet44409.com", true },
- { "bet5119.com", true },
- { "bet5234.com", true },
- { "bet567111.com", true },
- { "bet567222.com", true },
- { "bet567333.com", true },
- { "bet567444.com", true },
- { "bet567555.com", true },
- { "bet5678.cc", true },
- { "bet5678.com", true },
- { "bet5678a.com", true },
- { "bet5678b.com", true },
- { "bet5678c.com", true },
- { "bet5678e.com", true },
- { "bet5678f.com", true },
- { "bet5678g.com", true },
- { "bet5757.com", true },
- { "bet5868.com", true },
- { "bet599.com", true },
- { "bet66669999.com", true },
- { "bet666888.vip", true },
- { "bet721.com", true },
- { "bet7234.com", true },
- { "bet819.com", true },
- { "bet820.com", true },
- { "bet86ah.com", true },
- { "bet86am.com", true },
- { "bet86bj.com", true },
- { "bet86cq.com", true },
- { "bet86fj.com", true },
- { "bet86gd.com", true },
- { "bet86gs.com", true },
- { "bet86gx.com", true },
- { "bet86gz.com", true },
- { "bet86hb.com", true },
- { "bet86hlj.com", true },
- { "bet86hn.com", true },
- { "bet86jl.com", true },
- { "bet86js.com", true },
- { "bet86jx.com", true },
- { "bet86ln.com", true },
- { "bet86nmg.com", true },
- { "bet86nx.com", true },
- { "bet86qh.com", true },
- { "bet86sc.com", true },
- { "bet86sd.com", true },
- { "bet86sh.com", true },
- { "bet86sx.com", true },
- { "bet86tj.com", true },
- { "bet86tw.com", true },
- { "bet86xg.com", true },
- { "bet86xj.com", true },
- { "bet86xz.com", true },
- { "bet86yn.com", true },
- { "bet86zj.com", true },
- { "bet916.com", true },
- { "bet9bet9.net", true },
- { "betaal.my", true },
- { "betaclouds.net", true },
- { "betaprofiles.com", true },
- { "betaworx.de", true },
- { "betaworx.eu", true },
- { "betb73.com", true },
- { "betcn-mart.com", true },
- { "betecnet.de", true },
- { "betgo9.cc", true },
- { "bethanypeds.com", true },
- { "betheredge.us", true },
- { "bethpage.net", true },
- { "beticalia.com", true },
- { "betimely.com", true },
- { "betmobilenigeria.com", true },
- { "betobaccofree.gov", true },
- { "betolerant.fr", true },
- { "betonbit.com", true },
- { "betonmarkets.info", true },
- { "betor.cz", true },
- { "betpamm.com", true },
- { "betrifft-mich-dsgvo.ch", true },
- { "bets.gg", true },
- { "betseybuckheit.com", true },
- { "betsharpangles.com", true },
- { "betshoot.com", true },
- { "betsyshilling.com", true },
- { "bett1.at", true },
- { "bett1.ch", true },
- { "bett1.de", true },
- { "bett1.fr", true },
- { "bett1.pl", true },
- { "bettaline.com.au", true },
- { "bettashoerepairs.com.au", true },
- { "better-bounce.co.uk", true },
- { "better.com", true },
- { "better.fyi", true },
- { "betterbabyshop.com.au", true },
- { "betterbladders.com", true },
- { "bettercareclinic.co.uk", true },
- { "bettercleaningcompany.co.uk", true },
- { "betterconsult.com", true },
- { "bettercrypto.org", true },
- { "betterna.me", true },
- { "betterscience.org", true },
- { "bettersecurity.co", true },
- { "bettersocialmedia.co.uk", true },
- { "bettertest.it", true },
- { "bettertime.de", true },
- { "bettertime.jetzt", true },
- { "betterweb.fr", true },
- { "betterworldinternational.org", true },
- { "bettflaschen.ch", true },
- { "bettingbusiness.ru", true },
- { "bettingsider.dk", true },
- { "bettmer.at", true },
- { "bettmer.de", true },
- { "bettolinokitchen.com", true },
- { "bettrlifeapp.com", true },
- { "betty-baloo.com", true },
- { "bettyweber.com", true },
- { "betulashop.ch", true },
- { "betwalker.com", true },
- { "betwin9.com", true },
- { "betwin9.net", true },
- { "betza.online", true },
- { "beulen.email", true },
- { "beulen.link", true },
- { "beulen.pro", true },
- { "beuteugeu.com", true },
- { "bevedo.cz", true },
- { "bevedo.sk", true },
- { "beveiligingscamerawestland.nl", true },
- { "beveiligingsupdate.nl", true },
- { "bevelbeer.com", true },
- { "bevelpix.com", true },
- { "beverhof.nl", true },
- { "beverlyinternational.com", true },
- { "bevhills.com", true },
- { "bevinco2020.com", true },
- { "bevnut.com", true },
- { "bewegigsruum.ch", true },
- { "bewegtes-lagern.at", true },
- { "bewegtes-lagern.ch", true },
- { "bewegtes-lagern.com", true },
- { "bewegtes-lagern.de", true },
- { "bewegteslagern.ch", true },
- { "bewegteslagern.com", true },
- { "bewegteslagern.de", true },
- { "bewegungsfluss.com", false },
- { "bewerbungsfibel.de", true },
- { "bewertet.de", true },
- { "bewonderen.com", true },
- { "bexleycastles.co.uk", true },
- { "beybiz.com", true },
- { "beyerautomation.com", true },
- { "beyerm.de", true },
- { "beyond-infinity.org", false },
- { "beyondalderaan.net", true },
- { "beyondbounce.co.uk", true },
- { "beyondboxgifts.com", true },
- { "beyondordinarylife.com", true },
- { "beyondpricing.com", true },
- { "beyondtodaymediagroup.com", true },
- { "beyondweb.net", true },
- { "beyours.be", true },
- { "bez-energie.de", true },
- { "bezahlbare-praemien.ch", true },
- { "bezlampowe.pl", true },
- { "bezlepkovamatka.cz", true },
- { "bezposrednio.net.pl", true },
- { "bezzia.com", true },
- { "bf5.ru", true },
- { "bfam.tv", true },
- { "bfanis.ir", true },
- { "bfdz.ink", true },
- { "bfem.gov", true },
- { "bfh.science", true },
- { "bfkcloud.ddns.net", true },
- { "bfob.gg", true },
- { "bforb.sk", true },
- { "bfp-mail.de", true },
- { "bfpg.org", true },
- { "bfw-online.de", true },
- { "bgbaby.net", true },
- { "bgemi.net", true },
- { "bgfashion.net", true },
- { "bghope.com", true },
- { "bghost.xyz", true },
- { "bgkoleda.bg", true },
- { "bglsingles.de", true },
- { "bgmn.me", true },
- { "bgp.space", true },
- { "bgr34.cz", true },
- { "bgs-game.com", true },
- { "bgtoyou.com", true },
- { "bguidinger.com", true },
- { "bh-oberland.de", true },
- { "bh.sb", true },
- { "bhat.vn", true },
- { "bhavansvidyamandir.tk", true },
- { "bhaweshkumar.com", true },
- { "bhglamour.com", true },
- { "bhi.consulting", true },
- { "bhimarmyofficial.com", true },
- { "bhodisoft.com", true },
- { "bhrenovations.com", true },
- { "bhserralheria.com.br", true },
- { "bhtelecom.ba", true },
- { "bhuntr.com", true },
- { "bhxch.moe", true },
- { "bhyn.ca", true },
- { "bi.search.yahoo.com", false },
- { "bi1gif.radio", true },
- { "bi8cku.club", true },
- { "bia2takhfif.com", true },
- { "biaggeo.com", true },
- { "biancapulizie.it", true },
- { "biancazapatka.com", true },
- { "biapinheiro.com.br", true },
- { "biasmath.es", true },
- { "biathloncup.ru", true },
- { "bibica.net", true },
- { "bible-maroc.com", true },
- { "biblesignposts.com", true },
- { "bibliaon.com", true },
- { "bibliatodo.com", true },
- { "biblioblog.fr", true },
- { "bibliobus.ch", true },
- { "bibliology.org", true },
- { "bibliomarkt.ch", true },
- { "biblionaut.net", true },
- { "biblionix.com", true },
- { "biblioporn.com", true },
- { "bibliotecadeseguranca.com.br", true },
- { "bibliotekasnow.org", true },
- { "bibliotherapie-existentiale.com", true },
- { "biboumail.fr", true },
- { "bibuch.com", true },
- { "bicecontracting.com", true },
- { "bicha.net", true },
- { "bicicletassym.com", true },
- { "bicifanaticos.com", true },
- { "bicycleframeiz.com", true },
- { "bicycleuniverse.com", true },
- { "bidadari.my", true },
- { "biddl.com", true },
- { "biddle.co", true },
- { "bidman.cz", true },
- { "bidman.eu", true },
- { "bidu.com.br", true },
- { "bie08.com", true },
- { "bie35.com", true },
- { "bie79.com", true },
- { "biec.moe", true },
- { "biegal.ski", true },
- { "biegner-technik.de", true },
- { "biehlsoft.info", true },
- { "bielefailed.de", true },
- { "bien-etre-sante.info", true },
- { "bienestarfacial.com", true },
- { "bienestarinmobiliarioyaliadas.com", true },
- { "bienhacerlimpiezas.es", true },
- { "bienici.com", true },
- { "bienoubien.org", true },
- { "bienvenidoamerica.com", true },
- { "biergaizi.info", true },
- { "bierochs.org", true },
- { "bierwebshop.be", true },
- { "bieser.ch", true },
- { "biester.pro", true },
- { "bifm.de", true },
- { "bifrost.cz", true },
- { "big-andy.co.uk", true },
- { "big-bounce.co.uk", true },
- { "big-office.lviv.ua", true },
- { "big-tits-video.ru", true },
- { "bigbank.ee", true },
- { "bigbendcoffeeroasters.com", true },
- { "bigbendguide.com", true },
- { "bigbluedoor.net", true },
- { "bigboris.tk", true },
- { "bigbouncebouncycastles.co.uk", true },
- { "bigbouncetheory.co.uk", true },
- { "bigbounceuk.com", true },
- { "bigcakes.dk", true },
- { "bigclassaction.com", true },
- { "bigdinosaur.org", true },
- { "bigdiscounts.tk", true },
- { "bigfatbetty.com", true },
- { "biggerpicture.agency", true },
- { "biggles.io", true },
- { "bighouse-events.co.uk", true },
- { "bigideasnetwork.com", true },
- { "bigio.com.br", true },
- { "biglou.com", false },
- { "biglu.eu.org", true },
- { "bigorbitgallery.org", true },
- { "bigpicture-learning.com", true },
- { "bigprintinglasvegas.com", true },
- { "bigsam.us", true },
- { "bigserp.com", true },
- { "bigshopper.com", true },
- { "bigshopper.nl", true },
- { "bigsisterchannel.com", true },
- { "bigskylifestylerealestate.com", true },
- { "bigskymontanalandforsale.com", true },
- { "bigudi.ee", true },
- { "bihub.io", true },
- { "biilo.com", true },
- { "bijancompany.com", true },
- { "bijouxcherie.com", true },
- { "bijuteriicualint.ro", true },
- { "bike-kurse.ch", true },
- { "bike-shack.com", true },
- { "bikebristol.com", true },
- { "bikehistory.org", true },
- { "biker.dating", true },
- { "bikhof.com", true },
- { "bikiniseli.com", true },
- { "bikkelbroeders.com", false },
- { "bikkelbroeders.nl", false },
- { "bilalic.com", true },
- { "bilalkilic.de", true },
- { "bilbayt.com", true },
- { "bilder-designs.de", true },
- { "bildiri.ci", true },
- { "bildkomponist.de", true },
- { "bildschirmflackern.de", true },
- { "bildungshaus-arnach.de", true },
- { "biletvkrym.ga", true },
- { "biletyplus.by", true },
- { "biletyplus.ua", true },
- { "bilgo.com", true },
- { "bilibili.link", true },
- { "bilibili.sh", true },
- { "bilimoe.com", true },
- { "bilke.org", true },
- { "billaud.eu.org", true },
- { "billcompare.ga", true },
- { "billfazz.com", true },
- { "billgradywebdesign.com", true },
- { "billhartzer.com", true },
- { "billiardmaster.com.ua", true },
- { "billigastehemsidan.se", true },
- { "billiger-mietwagen.de", true },
- { "billigerfinder.de", true },
- { "billigpoker.dk", true },
- { "billin.net", true },
- { "billionaire365.com", true },
- { "billionairemailinglist.com", true },
- { "billionbooksbaby.org", true },
- { "billkochman.com", true },
- { "billogr.am", true },
- { "billogram.be", true },
- { "billogram.ch", true },
- { "billogram.co", true },
- { "billogram.co.uk", true },
- { "billogram.com", true },
- { "billogram.de", true },
- { "billogram.es", true },
- { "billogram.eu", true },
- { "billogram.fi", true },
- { "billogram.fr", true },
- { "billogram.io", true },
- { "billogram.it", true },
- { "billogram.me", true },
- { "billogram.net", true },
- { "billogram.nl", true },
- { "billogram.nu", true },
- { "billogram.org", true },
- { "billogram.se", true },
- { "billogramcontent.com", true },
- { "billograminternal.com", true },
- { "billogramstatic.com", true },
- { "billogramtest.com", true },
- { "billopay.com", true },
- { "billopay.de", true },
- { "billopay.se", true },
- { "billpro.com", false },
- { "billy.pictures", true },
- { "billyoh.com", true },
- { "billywig.stream", true },
- { "biltullen.com", true },
- { "bim.physio", true },
- { "bimacitizen.com", true },
- { "bimbo.com", false },
- { "bimbo.com.ar", false },
- { "bimbobakeriesusa.com", false },
- { "bimbole.it", true },
- { "bimibroccoli.co.uk", true },
- { "bimibroccoli.com", true },
- { "bimibroccoli.dk", true },
- { "bimibroccoli.it", true },
- { "bimibroccoli.nl", true },
- { "bimibroccoli.se", true },
- { "bimibrocoli.es", true },
- { "bimibrocoli.fr", true },
- { "bimibrokkoli.de", true },
- { "bimmerlabs.com", true },
- { "bin92.com", true },
- { "bin95.com", true },
- { "bina.az", true },
- { "binans.com", true },
- { "binans.com.tr", true },
- { "binans.net", true },
- { "binaries.fr", true },
- { "binary.house", true },
- { "binaryappdev.com", true },
- { "binarycreations.scot", true },
- { "binarydream.fi", true },
- { "binaryrebel.net", true },
- { "binarystud.io", true },
- { "binbin9.com", true },
- { "binbin9.net", true },
- { "binding-problem.com", true },
- { "bing.com", true },
- { "bingobank.org", true },
- { "binhex.net", true },
- { "binhp.com", true },
- { "biniou.net", true },
- { "binkconsulting.be", true },
- { "binnenmeer.de", true },
- { "binoqlo.com", true },
- { "binsp.net", true },
- { "bintach.com", true },
- { "binti.com", true },
- { "bintooshoots.com", true },
- { "bio-disinfestazione.it", true },
- { "bio-feed.org", true },
- { "bio-place.com", true },
- { "bio24.si", true },
- { "bioamtw.com", true },
- { "bioastin.de", true },
- { "bioatelier.it", true },
- { "biobuttons.ch", true },
- { "biocal.eu", true },
- { "biocal.nl", true },
- { "biocheminee.com", true },
- { "biocrafting.net", true },
- { "biodiagnostiki.clinic", true },
- { "biodieseldata.com", true },
- { "biodots.at", true },
- { "biodots.eu", true },
- { "biodots.info", true },
- { "biodots.it", true },
- { "bioedilizia.roma.it", true },
- { "bioemprendiendo.com", true },
- { "bioemsan.cz", true },
- { "bioequivalence.design", true },
- { "bioetco.ch", true },
- { "bioexploratorium.pl", true },
- { "biofattorietoscane.it", true },
- { "biogaspuxin.es", true },
- { "biogecho.ch", false },
- { "biogecho.swiss", false },
- { "biogeist.de", true },
- { "biogiardinaggio.it", true },
- { "biographywiki.net", true },
- { "biohappiness.com", true },
- { "bioharmony.ca", true },
- { "biointelligence-explosion.com", true },
- { "biokal-labsystems.eu", true },
- { "biokal-labsystems.nl", true },
- { "biokal.com", true },
- { "biokal.eu", true },
- { "biokal.nl", true },
- { "bioknowme.com", true },
- { "biol.moscow", true },
- { "biol.spb.ru", true },
- { "biolack.cf", true },
- { "bioleev.sklep.pl", true },
- { "bioligo.ch", false },
- { "biolika.ua", true },
- { "biolmarket.ru", true },
- { "biologis.ch", true },
- { "biology-colleges.com", true },
- { "biomax-mep.com.br", true },
- { "biomed-hospital.ch", true },
- { "biomed.ch", true },
- { "biomin.co.uk", true },
- { "biomodra.cz", true },
- { "bionezis.com", true },
- { "bionicman.name", true },
- { "bionima.com", true },
- { "biopsychiatry.com", true },
- { "bioresonanz-ibiza.com", true },
- { "biosafe.ch", false },
- { "biosalts.it", true },
- { "biosbits.org", true },
- { "biosearch.tk", true },
- { "bioshine.com.sg", true },
- { "biosignalanalytics.com", true },
- { "biosphere.cc", true },
- { "biospw.com", true },
- { "biotechware.com", true },
- { "biotecommunity.com", true },
- { "biotera.cl", true },
- { "biotin.ch", true },
- { "biowtage.gq", true },
- { "birbaumer.li", true },
- { "birchbarkfurniture.com", true },
- { "birchbarkfurniture.fr", true },
- { "birdbrowser.com", true },
- { "birdie.pt", true },
- { "birdiehosting.nl", true },
- { "birdslabel.com", true },
- { "birdymanbestreviews.com", true },
- { "birgerschwarz.de", false },
- { "birgit-rydlewski.de", true },
- { "birkenstab.de", true },
- { "birkenwasser.de", true },
- { "birminghamsunset.com", true },
- { "birsinghdhami.com.np", true },
- { "birthday-to-you.com", true },
- { "birthdaytip.com", true },
- { "birzan.org", true },
- { "bisa-sis.net", true },
- { "biscuitcute.com.br", true },
- { "biser.online", true },
- { "bishopp.com.au", true },
- { "bishoptx.com", true },
- { "bismarck-tb.de", true },
- { "bison.co", true },
- { "bisq.community", true },
- { "bisq.network", true },
- { "bistrocean.com", true },
- { "bistroservice.de", true },
- { "bistrotdelagare.fr", true },
- { "bit-cloud.de", true },
- { "bit-rapid.com", true },
- { "bit-sentinel.com", true },
- { "bit-service-aalter.be", true },
- { "bit.biz.tr", true },
- { "bit8.com", true },
- { "bitaccelerate.com", true },
- { "bitbank.cc", true },
- { "bitbeans.de", true },
- { "bitbox.me", true },
- { "bitbucket.com", true },
- { "bitbucket.io", true },
- { "bitbucket.org", true },
- { "bitburner.de", true },
- { "bitchigo.com", true },
- { "bitclusive.de", true },
- { "bitcoin-fauset.cf", true },
- { "bitcoin-india.net", true },
- { "bitcoin.asia", true },
- { "bitcoin.ch", true },
- { "bitcoin.co.nz", true },
- { "bitcoin.de", true },
- { "bitcoin.im", true },
- { "bitcoin.info", true },
- { "bitcoin.ninja", true },
- { "bitcoin.org", true },
- { "bitcoin.us", true },
- { "bitcoinbitcoin.com", true },
- { "bitcoinbot.tk", true },
- { "bitcoincasinos.pro", true },
- { "bitcoincore.org", true },
- { "bitcoinemprendedor.com", true },
- { "bitcoinfees.net", true },
- { "bitcoingambling.pro", true },
- { "bitcoinindia.com", true },
- { "bitcoinrealestate.com.au", true },
- { "bitcointhefts.com", true },
- { "bitcoinx.ro", true },
- { "bitcork.io", true },
- { "bitcorner.de", true },
- { "bitcqr.io", true },
- { "bitech-ec.com", true },
- { "bitenose.com", true },
- { "bitex.la", true },
- { "bitfasching.de", false },
- { "bitfehler.net", true },
- { "bitfuse.net", true },
- { "bitgain-leverage.com", true },
- { "bitgild.com", true },
- { "bitgo.com", true },
- { "bitgrapes.com", true },
- { "bitguerrilla.com", true },
- { "bithausen.io", true },
- { "bither.net", true },
- { "bithir.co.uk", true },
- { "bititrain.com", true },
- { "bitjunkiehosting.com", true },
- { "bitking-trading.com", true },
- { "bitlo.com", true },
- { "bitlo.com.tr", true },
- { "bitlo.io", true },
- { "bitlo.org", true },
- { "bitmag.ml", true },
- { "bitmainwarranty.com", true },
- { "bitmart.com", true },
- { "bitmask.me", true },
- { "bitmidi.com", true },
- { "bitminter.com", true },
- { "bitok.com", true },
- { "bitpumpe.net", true },
- { "bitref.com", true },
- { "bitrefill.com", true },
- { "bitrefill.info", true },
- { "bitrush.nl", true },
- { "bits-hr.de", true },
- { "bitsafe.com.my", true },
- { "bitsalt.com", true },
- { "bitski.com", true },
- { "bitskins.co", true },
- { "bitskrieg.net", true },
- { "bitsler.ie", true },
- { "bitso.com", true },
- { "bitsoffreedom.nl", true },
- { "bitstage.uk", true },
- { "bitstep.ca", true },
- { "bitstorm.nl", true },
- { "bitstorm.org", true },
- { "bitsy.com", true },
- { "bitsync.nl", true },
- { "bitten.pw", true },
- { "bittersweetcandybowl.com", true },
- { "bittylicious.com", true },
- { "bitvest.io", true },
- { "bitvps.com", true },
- { "bitwarden.com", true },
- { "bitwolk.nl", true },
- { "bitxel.com.co", false },
- { "biurokarier.edu.pl", true },
- { "biuropulawy.pl", true },
- { "bixbydevelopers.com", true },
- { "bixservice.com", true },
- { "biyori.moe", true },
- { "biyou-homme.com", true },
- { "biz-architect.com", true },
- { "biz-secrety.gq", true },
- { "biz-secrety.ml", true },
- { "biz-seecrets.gq", true },
- { "biz4x.com", true },
- { "bizcash.co.za", true },
- { "bizeasesupport.com", true },
- { "bizeau.ch", true },
- { "bizedge.co.nz", true },
- { "bizgo.nl", true },
- { "bizlatinhub.com", true },
- { "biznes-sekrety.gq", true },
- { "biznes-sekrety.tk", true },
- { "biznesinfo.pl", true },
- { "biznesonline.info", true },
- { "biznet.tk", true },
- { "bizniskatalog.mk", true },
- { "biznpro.ru", true },
- { "bizpare.com", true },
- { "bizpay.su", true },
- { "bizstarter.cz", true },
- { "biztera.com", true },
- { "biztok.eu", true },
- { "biztouch.work", true },
- { "bizzdesign.cloud", true },
- { "bizzdesign.com", true },
- { "bizzit.se", true },
- { "bjarnerest.de", true },
- { "bjfuli.com", true },
- { "bjl5689.com", true },
- { "bjl5689.net", true },
- { "bjl688.cc", true },
- { "bjoe2k4.de", true },
- { "bjolanta.pl", true },
- { "bjornhelmersson.se", true },
- { "bjornjohansen.no", true },
- { "bjs.com.au", true },
- { "bjs.gov", true },
- { "bjsbouncycastles.com", true },
- { "bjut.photos", true },
- { "bk-wife.com", true },
- { "bkentertainments.co.uk", true },
- { "bkhpilates.co.uk", true },
- { "bkkf.at", true },
- { "bkositspartytime.co.uk", true },
- { "bkt.to", true },
- { "bkulup.com", true },
- { "bl00.se", true },
- { "bl4ckb0x.biz", true },
- { "bl4ckb0x.com", true },
- { "bl4ckb0x.de", true },
- { "bl4ckb0x.eu", true },
- { "bl4ckb0x.info", true },
- { "bl4ckb0x.net", true },
- { "bl4ckb0x.org", true },
- { "blaargh.com", true },
- { "blaauwgeers.pro", true },
- { "blaauwgeers.travel", true },
- { "blabber.im", true },
- { "blablacar.co.uk", true },
- { "blablacar.com.tr", true },
- { "blablacar.com.ua", true },
- { "blablacar.de", true },
- { "blablacar.es", true },
- { "blablacar.fr", true },
- { "blablacar.hr", true },
- { "blablacar.hu", true },
- { "blablacar.in", true },
- { "blablacar.it", true },
- { "blablacar.mx", true },
- { "blablacar.nl", true },
- { "blablacar.pl", true },
- { "blablacar.pt", true },
- { "blablacar.ro", true },
- { "blablacar.rs", true },
- { "blablacar.ru", true },
- { "black-holes.org", true },
- { "black-khat.com", true },
- { "black-magic-love-spells.com", true },
- { "black-mail.nl", true },
- { "black-raven.fr", true },
- { "black.dating", true },
- { "black.host", true },
- { "black1ce.com", true },
- { "blackandpony.de", true },
- { "blackbag.nl", true },
- { "blackbam.at", true },
- { "blackberryforums.be", true },
- { "blackbird-whitebird.com", true },
- { "blackboxconnections.com", true },
- { "blackcat.ca", true },
- { "blackcatinformatics.ca", true },
- { "blackcatinformatics.com", true },
- { "blackdown.de", true },
- { "blackdragoninc.org", true },
- { "blackedbyte.com", true },
- { "blackevent.be", true },
- { "blackfire.io", true },
- { "blackgamelp.de", true },
- { "blackgate.org", true },
- { "blackhat.dk", true },
- { "blackhawkup.com", true },
- { "blackhelicopters.net", true },
- { "blackhillsinfosec.com", true },
- { "blackhost.org", true },
- { "blackilli.de", true },
- { "blackjackballroomcasino.info", true },
- { "blackl.net", true },
- { "blacklightparty.be", true },
- { "blackmagickwitch.com", true },
- { "blackmagicshaman.com", true },
- { "blackminds.tk", true },
- { "blackmonday.gr", true },
- { "blacknetwork.eu", true },
- { "blacknova.io", true },
- { "blackoutzone.tk", true },
- { "blackpapermoon.de", true },
- { "blackphoenix.de", true },
- { "blackroadphotography.de", true },
- { "blackroot.eu", true },
- { "blackscytheconsulting.com", true },
- { "blackseals.net", true },
- { "blacksheepsw.com", true },
- { "blackspark.tk", true },
- { "blackstrapsecurity.com", true },
- { "blackstump.xyz", true },
- { "blackteam.org", true },
- { "blacktown.eu", true },
- { "blacktownbuildingsupplies.com.au", true },
- { "blacktubes.cf", true },
- { "blackyau.cc", true },
- { "blackys-chamber.de", false },
- { "blackzebra.audio", true },
- { "blaindalefarms.com", true },
- { "blaise.io", true },
- { "blakecoin.org", true },
- { "blakekhan.com", true },
- { "blakezone.com", true },
- { "blanboom.org", true },
- { "blancodent.com", true },
- { "blankersfamily.com", true },
- { "blanket.technology", true },
- { "blasorchester-runkel.de", true },
- { "blastentertainment.co.nz", true },
- { "blastentertainment.com.au", true },
- { "blastersklan.com", true },
- { "blaudev.es", true },
- { "blauerhunger.de", true },
- { "blaulicht-giessen.de", true },
- { "blaumedia.com", true },
- { "blautiefe.de", true },
- { "blauwwit.be", true },
- { "blayne.me", false },
- { "blayneallan.com", false },
- { "blazing.cz", true },
- { "blblblblbl.fr", true },
- { "bleaching-tipps.de", true },
- { "blechbuexn.de", true },
- { "bleche-onlineshop.at", true },
- { "bleche-onlineshop.de", true },
- { "blechinger.io", true },
- { "blechschmidt.saarland", true },
- { "blenderinsider.com", true },
- { "blenderrecipereviews.com", true },
- { "blending.kr", true },
- { "blendle.com", true },
- { "blendle.nl", true },
- { "blendr.com", true },
- { "blendstudios.com", true },
- { "blenheimears.com", true },
- { "blenneros.net", false },
- { "blessedgeeks.org", true },
- { "blessedgeeks.social", true },
- { "blessedguy.com", true },
- { "blewebprojects.com", true },
- { "blichmann.eu", true },
- { "blideobames.com", true },
- { "blidz.com", true },
- { "blieque.co.uk", true },
- { "bliesekow.net", true },
- { "blijfbij.com", true },
- { "blijfbij.eu", true },
- { "blikund.swedbank.se", true },
- { "blindpigandtheacorn.com", true },
- { "blinds.media", true },
- { "blindsjoburg.com", true },
- { "bling9.com", true },
- { "bling999.cc", true },
- { "bling999.com", true },
- { "bling999.net", true },
- { "blingsparkleshine.com", true },
- { "blingwang.cn", true },
- { "blinkdrivex.com", true },
- { "blinking.link", true },
- { "blio.tk", true },
- { "blip.website", true },
- { "blissdrive.com", true },
- { "blissjoe.com", true },
- { "blissplan.com", true },
- { "blivawesome.dk", true },
- { "blivvektor.dk", true },
- { "blixtv.com", true },
- { "blizhost.com", true },
- { "blizhost.com.br", true },
- { "blkbx.eu", true },
- { "blm.gov", true },
- { "blm69.cc", true },
- { "blo-melchiorshausen.de", true },
- { "blobemoji.com", true },
- { "blobfolio.com", true },
- { "blobs.gg", true },
- { "blocher.ch", true },
- { "blochoestergaard.com", true },
- { "block-this.com", true },
- { "block65.com", true },
- { "blockchain.com", true },
- { "blockchain.info", true },
- { "blockchain.poker", true },
- { "blockchainced.com", true },
- { "blockchaindaigakko.jp", true },
- { "blockchainmagazine.net", true },
- { "blockclique.io", true },
- { "blockedyourcar.com", true },
- { "blockedyourcar.net", true },
- { "blockedyourcar.org", true },
- { "blockmetry.com", true },
- { "blocktab.io", true },
- { "blockwatch.cc", true },
- { "blockxit.de", true },
- { "bloemenbesteld.nl", true },
- { "bloemendal.me", true },
- { "blog-garage.com", true },
- { "blog-grupom2.es", true },
- { "blog-investimenti.it", true },
- { "blog.linode.com", false },
- { "blog.lookout.com", false },
- { "blog.torproject.org", false },
- { "blogaid.net", true },
- { "bloganchoi.com", true },
- { "blogaram.tk", true },
- { "blogarts.net", true },
- { "blogauto.cz", true },
- { "blogbooker.com", true },
- { "blogcast.com", true },
- { "blogcosmeticsurgeon.ga", true },
- { "blogdefarmacia.com", true },
- { "blogdelosjuguetes.com", true },
- { "blogdieconomia.it", true },
- { "blogdimoda.com", true },
- { "blogdimotori.it", true },
- { "bloggermumofthreeboys.com", true },
- { "blogging-life.com", true },
- { "bloggingtipsfornewblogger.com", true },
- { "bloggytalky.com", true },
- { "bloginbeeld.nl", true },
- { "blogit.fi", true },
- { "blognews.cf", true },
- { "blognone.com", true },
- { "blogofapps.com", true },
- { "blogpress.co.il", true },
- { "blogredmachine.com", true },
- { "blogreen.org", true },
- { "blogsdna.com", true },
- { "blogsked.com", true },
- { "blogthedayaway.com", true },
- { "blogthetindung.com", true },
- { "blogtroterzy.pl", true },
- { "blok56.nl", true },
- { "blomberg.name", true },
- { "bloobet.com", true },
- { "bloodhunt.eu", true },
- { "bloodpop.tk", true },
- { "bloodsports.org", true },
- { "bloody.pw", true },
- { "bloom-avenue.com", true },
- { "bloomscape.com", true },
- { "bloondl.com", true },
- { "blopezabogado.es", true },
- { "blrjmt.com", true },
- { "bltc.co.uk", true },
- { "bltc.com", true },
- { "bltc.net", true },
- { "bltc.org", true },
- { "bltc.org.uk", true },
- { "bltdirect.com", true },
- { "blubbablasen.de", true },
- { "blubberladen.de", true },
- { "blubop.fr", true },
- { "blue-gmbh-erfahrungen.de", true },
- { "blue-gmbh.de", true },
- { "blue-leaf81.net", true },
- { "blue-nijmegen.nl", true },
- { "blue42.net", true },
- { "blueangel.org.tw", true },
- { "bluebie.com", true },
- { "blueblou.com", true },
- { "bluebnc.com", true },
- { "bluecanvas.io", true },
- { "bluecrazii.nl", true },
- { "blued.moe", true },
- { "bluedeck.org", true },
- { "blueeyedmaid.co.uk", true },
- { "bluefrag.com", true },
- { "bluefuzz.nl", true },
- { "bluegifts.ro", true },
- { "bluehelixmusic.com", true },
- { "bluehillhosting.com", true },
- { "blueimp.net", true },
- { "bluekrypt.com", true },
- { "blueliquiddesigns.com.au", true },
- { "bluemail24.com", true },
- { "bluemanhoop.com", true },
- { "bluemarmalade.co.uk", true },
- { "bluemeteor.co", true },
- { "bluemoonrescue.org", true },
- { "bluemoonroleplaying.com", true },
- { "bluemosh.com", true },
- { "bluemtnrentalmanagement.ca", true },
- { "bluenailsstudio.nl", true },
- { "bluenote9.com", true },
- { "blueoakart.com", true },
- { "blueperil.de", true },
- { "bluepoint.me", true },
- { "bluepostbox.de", true },
- { "blueprintrealtytn.com", true },
- { "bluepromocode.com", true },
- { "bluerootsmarketing.com", true },
- { "blueskycoverage.com", true },
- { "blueskydigitalstrategy.com", true },
- { "blueskyinsure.com", true },
- { "bluesoap.com.au", true },
- { "bluestardiabetes.com", true },
- { "bluestarroofing.com", true },
- { "bluestoneconstruction.com", true },
- { "bluesuncamping.com", true },
- { "bluesunhotels.com", true },
- { "blueswandaily.com", true },
- { "bluesync.co", true },
- { "bluetexservice.com", true },
- { "bluetomatographics.com", true },
- { "bluetoothspecialist.ga", true },
- { "bluewavewebdesign.com", true },
- { "bluex.im", true },
- { "bluex.info", true },
- { "bluex.net", true },
- { "bluex.org", true },
- { "bluffplumber.co.za", true },
- { "blui.xyz", true },
- { "bluiandaj.ml", true },
- { "bluimedia.com", true },
- { "bluinet.com", true },
- { "blumando.de", true },
- { "blumenfeldart.com", true },
- { "blumiges-fischbachtal.de", false },
- { "bluntandsnakes.com", true },
- { "blupig.net", true },
- { "blurringexistence.net", true },
- { "blusens.com", true },
- { "blusmurf.net", true },
- { "blutopia.xyz", false },
- { "blw.moe", true },
- { "blyat.science", true },
- { "blyth.me.uk", true },
- { "blythwood.com", true },
- { "blzrk.com", true },
- { "bmbfiltration.com", true },
- { "bmcorp.online", true },
- { "bmhglobal.com.au", true },
- { "bmk-kramsach.at", true },
- { "bmoattachments.org", true },
- { "bmone.net", true },
- { "bmros.com.ar", false },
- { "bmw-motorradclub-seefeld.de", true },
- { "bn4t.me", true },
- { "bnbsinflatablehire.co.uk", true },
- { "bnck.me", true },
- { "bngs.pl", true },
- { "bnin.org", true },
- { "bnjscastles.co.uk", true },
- { "bnty.net", true },
- { "bnzblowermotors.com", true },
- { "bo1689.net", true },
- { "bo4tracker.com", true },
- { "bo9club.cc", true },
- { "bo9club.com", true },
- { "bo9club.net", true },
- { "bo9fun.com", true },
- { "bo9fun.net", true },
- { "bo9game.com", true },
- { "bo9game.net", true },
- { "bo9king.net", true },
- { "boardgamegeeks.de", true },
- { "boards.ie", true },
- { "boardspot.com", true },
- { "boat-engines.eu", true },
- { "boats.com", true },
- { "boattrader.com", true },
- { "boattrader.com.au", true },
- { "bob-dylan.tk", true },
- { "bobaly.es", true },
- { "bobandducky.com", true },
- { "bobaobei.net", true },
- { "bobasy.pl", true },
- { "bobazar.com", false },
- { "bobbyblueplumbing.com", true },
- { "bobbyhensley.com", true },
- { "bobcoffee.com.br", true },
- { "bobcopeland.com", true },
- { "bobigames.com", true },
- { "bobkidbob.com", true },
- { "bobkoetsier.nl", true },
- { "bobnbounce.ie", true },
- { "bobnbouncedublin.ie", true },
- { "bobobox.net", true },
- { "bobstenancycleaning.co.uk", true },
- { "bobstronomie.fr", true },
- { "bocamo.it", true },
- { "bocawa.es", true },
- { "boccabell.com", true },
- { "bochantinobgyn.com", true },
- { "bochs.info", true },
- { "bockenauer.at", true },
- { "bocreation.fr", true },
- { "bodagratis.com", true },
- { "bodas.com.mx", true },
- { "bodasgratis.com", true },
- { "bodemplaten4x4.nl", true },
- { "bodhi.fedoraproject.org", true },
- { "bodin.cz", true },
- { "bodis.nl", true },
- { "bodsch.com", true },
- { "bodybuilding.com", true },
- { "bodybuildingworld.com", true },
- { "bodyconshop.com", true },
- { "bodygearguide.com", true },
- { "bodymusclejournal.com", true },
- { "bodypainter.pl", true },
- { "bodypainting.waw.pl", true },
- { "bodyshopnews.net", true },
- { "bodyweb.com.br", true },
- { "bodyworksautorebuild.com", true },
- { "boeddhashop.nl", true },
- { "boerdam.nl", true },
- { "boernecancerfonden.dk", true },
- { "boese.one", true },
- { "boevik.ml", true },
- { "bogdancornianu.com", true },
- { "bogdanepureanu.ro", true },
- { "bogena.com.ua", true },
- { "bogner.sh", true },
- { "bogs-consulting.de", true },
- { "bogurl.com", true },
- { "bohaishibei.com", true },
- { "bohan.co", true },
- { "bohramt.de", true },
- { "boimmobilier.ch", false },
- { "boiseonlinemall.com", true },
- { "boisewaldorf.org", true },
- { "bojiu99.cc", true },
- { "bokadoktorn-test.net", true },
- { "bokadoktorn.se", true },
- { "boke112.com", true },
- { "bokka.com", true },
- { "bokkeriders.com", true },
- { "boksburgplumber24-7.co.za", true },
- { "bokutake.com", true },
- { "bol.io", true },
- { "bolalocobrews.co.uk", true },
- { "bolamarela.com.br", true },
- { "bolamarela.pt", true },
- { "boldmediagroup.com", true },
- { "bolektro.de", true },
- { "boleyn.su", true },
- { "bolgarka.kz", true },
- { "bolgarnyelv.hu", true },
- { "bolgarus.ru", true },
- { "bolico.de", true },
- { "bolivar80.com", true },
- { "bologna-disinfestazioni.it", true },
- { "bolovegna.it", true },
- { "bolsashidrosolubles.com", true },
- { "bolt.cm", false },
- { "bolt.com", true },
- { "boltbeat.com", true },
- { "bolte.org", true },
- { "boltenergy.ca", true },
- { "boltmobile.ca", true },
- { "bomb.codes", true },
- { "bombe-lacrymogene.fr", true },
- { "bomboniere.roma.it", true },
- { "bomhard.de", true },
- { "bomhard.net", true },
- { "bomhard.org", true },
- { "bonaccorso.eu", true },
- { "bonaemi.ga", true },
- { "bonami.cz", true },
- { "bonami.hu", true },
- { "bonami.pl", true },
- { "bonami.ro", true },
- { "bonami.sk", true },
- { "bonawehouse.co.uk", true },
- { "bonbonmania.com", false },
- { "bonchaboncha.com.tw", true },
- { "bondagefetishstore.com", true },
- { "bondank.com", true },
- { "bondarenko.dn.ua", true },
- { "bondingwithbaby.ca", true },
- { "bondlink.com", true },
- { "bondskampeerder.nl", true },
- { "bonebunny.de", true },
- { "boneko.de", true },
- { "bonesserver.com", true },
- { "bonfi.net", true },
- { "bongbabyhouse.com", true },
- { "bongbabyhouse.vn", true },
- { "bongloy.com", true },
- { "bongo.cat", true },
- { "bongocams.webcam", true },
- { "bongoo.fr", true },
- { "bonifatius-friedrich.de", true },
- { "bonifatiusfriedrich.de", true },
- { "bonito.pl", true },
- { "bonn.digital", true },
- { "bonnant-associes.ch", false },
- { "bonnant-partners.ch", false },
- { "bonnieradvocaten.nl", true },
- { "bonnyprints.at", true },
- { "bonnyprints.ch", true },
- { "bonnyprints.es", true },
- { "bonnyprints.fr", true },
- { "bonprix.co.uk", true },
- { "bonsaimedia.nl", true },
- { "bonsi.net", true },
- { "bonsi.org", true },
- { "bonus.ca", true },
- { "bonus.net.nz", true },
- { "bonus.pl", true },
- { "bonusov.tk", true },
- { "bonussource.com", true },
- { "bonux.co", true },
- { "boodmo.com", true },
- { "book-in-hotel.com", true },
- { "bookameeting.se", true },
- { "booker.ly", true },
- { "bookingapp.be", true },
- { "bookingapp.nl", true },
- { "bookingslog.com", true },
- { "bookingtool.net", true },
- { "bookingworldspeakers.com", true },
- { "bookluk.com", true },
- { "bookmein.in", true },
- { "booknowmytrip.com", true },
- { "bookofdenim.com", true },
- { "books.co.ua", true },
- { "booksearch.jp", true },
- { "bookshopofindia.com", true },
- { "booksinthefridge.at", true },
- { "bookslibrarybooks.gq", true },
- { "booktoan.com", true },
- { "booktracker-org.appspot.com", true },
- { "bookwave.art", true },
- { "bookwormex.com", true },
- { "bookzaga.com", true },
- { "bool.be", true },
- { "boombv.com", false },
- { "boomfestival.org", true },
- { "boomkins.net", true },
- { "boomshelf.com", true },
- { "boomshelf.org", true },
- { "boonbox.com", true },
- { "booox.cc", true },
- { "booox.info", true },
- { "booox.net", true },
- { "booox.org", true },
- { "boop.pro", true },
- { "booplab.com", false },
- { "booquiz.com", true },
- { "boosinflatablegames.co.uk", true },
- { "boosman.nu", true },
- { "boosmanpoolservice.com", true },
- { "boost.ink", true },
- { "booter.pw", true },
- { "bootina.com", true },
- { "bootjp.me", false },
- { "bootsschule-weiss.de", true },
- { "bopiweb.com", true },
- { "bopp.org", true },
- { "borahan.net", true },
- { "borba-umov.tk", true },
- { "borchers.ninja", true },
- { "bordadoenpedreria.com", true },
- { "borderless360.com", true },
- { "bordes.me", true },
- { "bordo.com.au", true },
- { "boreacr.com", true },
- { "boredhousewifeconfessions.cf", true },
- { "borein.cf", true },
- { "boreo.si", true },
- { "boresmail.ru", true },
- { "borisenko.by", true },
- { "borja.io", true },
- { "born2bounce.co.uk", true },
- { "bornandgrazed.com", true },
- { "borneodictionary.com", true },
- { "bornfiber.dk", true },
- { "bornhack.dk", true },
- { "bornreality.tk", true },
- { "borowski.pw", true },
- { "borrelpartybus.nl", true },
- { "borriquillacuenca.tk", true },
- { "borysek.net", true },
- { "borysenko.se", true },
- { "bosattondskap.tk", true },
- { "boschsplit.co", true },
- { "boschveldtuin.nl", true },
- { "boscoyacht.ch", false },
- { "boscq.fr", true },
- { "bosekarmelitky.cz", true },
- { "boskeopolis-stories.com", true },
- { "boss.az", true },
- { "bossbabe.com", true },
- { "boston-sailing.com", true },
- { "bostonadvisors.com", true },
- { "bostonaoii.com", true },
- { "bosufitness.cz", true },
- { "bosun.io", true },
- { "bot-manager.pl", true },
- { "botcamp.org", true },
- { "botcore.ai", true },
- { "botezdepoveste.ro", true },
- { "botguard.net", true },
- { "bothellwaygarage.net", true },
- { "botmastery.com", true },
- { "botmedia.cf", true },
- { "botnam.com", true },
- { "botserver.de", true },
- { "bottineauneighborhood.org", true },
- { "bottinquebec.com", true },
- { "bottke.berlin", true },
- { "bottle.li", true },
- { "bottledstories.de", true },
- { "bou.cloud", true },
- { "bou.ke", false },
- { "bouah.net", true },
- { "bouchard-mathieux.com", true },
- { "bouchonville-knifemaker.com", true },
- { "boudah.pl", true },
- { "bougeret.fr", true },
- { "boughariosbros.com", true },
- { "boukoubengo.com", true },
- { "bouldercolorado.gov", true },
- { "boulderlibrary.org", true },
- { "boulderswap.com", true },
- { "boulzicourt.fr", true },
- { "bounce-a-mania.co.uk", true },
- { "bounce-a-roo.co.uk", true },
- { "bounce-abouts.com", true },
- { "bounce-n-go.co.uk", true },
- { "bounce-on.co.uk", true },
- { "bounce-r-us.co.uk", true },
- { "bounce-xtreme.co.uk", true },
- { "bounce4fun.co.uk", true },
- { "bounce4fun.ie", true },
- { "bounce4kidz.com", true },
- { "bounce4less.ie", true },
- { "bouncea-bout.com", true },
- { "bounceaboutandplay.co.uk", true },
- { "bounceaboutnewark.co.uk", true },
- { "bounceaboutsussex.co.uk", true },
- { "bouncealotcastlehire.co.uk", true },
- { "bouncealotnorthwest.co.uk", true },
- { "bounceandwobble.co.uk", true },
- { "bounceapp.com", true },
- { "bouncearoundevents.co.uk", true },
- { "bouncearoundsheffield.co.uk", true },
- { "bounceawaycastles.com", true },
- { "bouncebackcastles.co.uk", true },
- { "bouncebookings.com.au", true },
- { "bouncecrazy.ie", true },
- { "bouncejumpboston.co.uk", true },
- { "bouncekingdom.co.uk", true },
- { "bouncemaniaevents.co.uk", true },
- { "bouncemaniainflatables.co.uk", true },
- { "bouncemonkeys.co.uk", true },
- { "bouncenortheast.co.uk", true },
- { "bouncenpaint.co.uk", true },
- { "bouncepartycastles.com", true },
- { "bounceroosevents.co.uk", true },
- { "bouncers-bouncycastlehire.co.uk", true },
- { "bouncesouthwales.co.uk", true },
- { "bouncesquad.co.uk", true },
- { "bouncetasticuk.co.uk", true },
- { "bounceunlimited.co.uk", true },
- { "bouncewrightcastles.co.uk", true },
- { "bouncincastles.co.uk", true },
- { "bouncingbairnsinflatables.co.uk", true },
- { "bouncingbeansinflatables.co.uk", true },
- { "bouncingbobsinflatables.co.uk", true },
- { "bouncingbuddiesleicester.co.uk", true },
- { "bouncinghigher.co.uk", true },
- { "bouncingscotland.com", true },
- { "bouncy-castles-surrey.co.uk", true },
- { "bouncybaileys.co.uk", true },
- { "bouncyball.eu", true },
- { "bouncyballs.org", true },
- { "bouncybouncyboocastlehire.co.uk", true },
- { "bouncycastle.net.au", true },
- { "bouncycastlehire-norwich.com", true },
- { "bouncycastlehire-sheffield.co.uk", true },
- { "bouncycastlehire.co.uk", true },
- { "bouncycastlehireauckland.co.nz", true },
- { "bouncycastlehirebarnstaple.co.uk", true },
- { "bouncycastlehirebexley.co.uk", true },
- { "bouncycastlehirechelmsford.org.uk", true },
- { "bouncycastlehirehull.co.uk", true },
- { "bouncycastlehireinglasgow.co.uk", true },
- { "bouncycastlehirelouth.co.uk", true },
- { "bouncycastlehiremalvern.co.uk", true },
- { "bouncycastlehireoldham.co.uk", true },
- { "bouncycastlehirestroud.co.uk", true },
- { "bouncycastlehiresurrey.co.uk", true },
- { "bouncycastlehiretameside.co.uk", true },
- { "bouncycastlehirewinchester.co.uk", true },
- { "bouncycastleman.co.uk", true },
- { "bouncycastlemangloucestershire.co.uk", true },
- { "bouncycastleparade.com", true },
- { "bouncycastlesgalway.com", true },
- { "bouncycastleshire.co.uk", true },
- { "bouncycastleshireleeds.co.uk", true },
- { "bouncycastlesin.co.uk", true },
- { "bouncycastlesinderby.co.uk", true },
- { "bouncycastlesisleofwight.co.uk", true },
- { "bouncycastlessheerness.co.uk", true },
- { "bouncydays.co.uk", true },
- { "bouncygiggles.com.au", true },
- { "bouncyhigher.co.uk", true },
- { "bouncyhousecastlehire.co.uk", true },
- { "bouncykingdom.co.uk", true },
- { "bouncykings.co.uk", true },
- { "bouncykingsnortheast.co.uk", true },
- { "bouncymacs.co.uk", true },
- { "bouncyrainbows.co.uk", true },
- { "bouncytime.co.uk", true },
- { "bound2bounce.co.uk", true },
- { "boundarybrighton.com", true },
- { "boundaryford.com", true },
- { "boundaryvets.co.uk", true },
- { "bounouh.tk", true },
- { "bountyfactory.io", true },
- { "bourasse.fr", true },
- { "bourgeoisdoorco.com", true },
- { "bournefun.co.uk", true },
- { "bourseauxservices.com", true },
- { "boutiquedecanetas.com.br", true },
- { "boutiqueguenaelleverdin.com", true },
- { "boutoncoupdepoing.fr", true },
- { "bouw.live", true },
- { "bouwbedrijfvandortbv.nl", true },
- { "bouzouada.com", true },
- { "bouzouks.net", true },
- { "bovenwebdesign.nl", true },
- { "bowdens.me", true },
- { "bowedwallcrackrepair.com", true },
- { "boweryandvine.com", true },
- { "bowlcake.fr", true },
- { "bowling.com", true },
- { "bownty.co.uk", true },
- { "bownty.es", true },
- { "bownty.fr", true },
- { "bownty.it", true },
- { "bownty.nl", true },
- { "bowntycdn.net", true },
- { "bowtie.com.hk", true },
- { "boxcritters.wiki", true },
- { "boxcryptor.com", false },
- { "boxdropcc.com", true },
- { "boxintense.com", true },
- { "boxlink.de", true },
- { "boxpirates.to", true },
- { "boxspringbett-160x200.de", true },
- { "boxt.com.au", true },
- { "boxvergelijker.nl", true },
- { "boyfriendcookbook.com", true },
- { "boyhost.cn", true },
- { "boyinglanguage.com", true },
- { "boykovo.tk", true },
- { "boysontech.com", true },
- { "boz.nl", false },
- { "bozhok.tk", true },
- { "bozit.com.au", true },
- { "bpa.gov", true },
- { "bpaste.net", true },
- { "bpastudies.org", true },
- { "bphostels.com", true },
- { "bpo.ovh", true },
- { "bpol-forum.de", true },
- { "bpreguica.com.br", true },
- { "bps.vc", true },
- { "bpvboekje.nl", true },
- { "bqp.io", false },
- { "bqr.ch", false },
- { "br.search.yahoo.com", false },
- { "br3in.nl", false },
- { "br7.ru", true },
- { "braams.nl", true },
- { "braathe.no", true },
- { "brabank.no", true },
- { "brabank.se", true },
- { "bracho.xyz", true },
- { "brachotelborak.com", true },
- { "bracknellvets.co.uk", true },
- { "bradbrockmeyer.com", true },
- { "bradenanderin.com", true },
- { "bradfordhottubhire.co.uk", true },
- { "bradfordmascots.co.uk", true },
- { "bradkovach.com", true },
- { "bradler.net", false },
- { "bradlinder.org", true },
- { "bradypatterson.com", true },
- { "braeunlich-gmbh.com", true },
- { "brage.info", true },
- { "brahmins.com", true },
- { "braiampeguero.xyz", true },
- { "brailsford.xyz", true },
- { "brain-club.info", true },
- { "brain-force.ch", true },
- { "brainboxai.com", true },
- { "braineet.com", true },
- { "brainobeat.com", true },
- { "brainserve.ch", false },
- { "brainserve.com", false },
- { "brainserve.swiss", false },
- { "brainshare.tk", true },
- { "brainsik.net", true },
- { "brainstobrand.com", true },
- { "braintreegateway.com", true },
- { "brainvoyagermusic.com", true },
- { "brainwav.es", true },
- { "brainwork.space", true },
- { "brainyapp.net", true },
- { "braithwaites.ltd", true },
- { "brakemanpro.com", true },
- { "brakpanplumber24-7.co.za", true },
- { "bralnik.com", true },
- { "bramhallsamusements.com", true },
- { "bramois.tk", true },
- { "bramstaps.nl", true },
- { "bramvanaken.be", true },
- { "bramygrozy.pl", true },
- { "bran.land", true },
- { "branch-bookkeeper.com", true },
- { "branchenbuch-potsdam.com", true },
- { "branchtrack.com", true },
- { "brandand.co.uk", true },
- { "brandfolder.com", true },
- { "brandingclic.com", true },
- { "brandingclick.com", true },
- { "brandingcoapps.com", true },
- { "brandondivorcelawyer.com", true },
- { "brandonforce.com", true },
- { "brandonhubbard.com", true },
- { "brandonlin.me", true },
- { "brandonlui.com", true },
- { "brandonsample.com", true },
- { "brandonwalker.me", true },
- { "brandpit.nl", true },
- { "brandrocket.dk", true },
- { "brandstead.com", true },
- { "brandtrapselfie.nl", true },
- { "brandweerbarboek.nl", true },
- { "brandweerfraneker.nl", true },
- { "brandweertrainingen.nl", true },
- { "brandweeruitgeest.nl", true },
- { "brandwidth.com", true },
- { "branno.org", true },
- { "branode.com", false },
- { "bransive.com.au", true },
- { "branw.xyz", true },
- { "brasal.ma", true },
- { "brasalcosmetics.com", true },
- { "brashear.me", true },
- { "brasildxn.com.br", true },
- { "brasileiro.ca", false },
- { "brasserie-mino.fr", true },
- { "brasserie-twins.be", true },
- { "brasserie-twins.com", true },
- { "bratteng.me", true },
- { "bratteng.solutions", true },
- { "bratteng.xyz", true },
- { "bratunaconline.tk", true },
- { "bratvanov.com", true },
- { "brau-ingenieur.de", true },
- { "braudoktor.de", true },
- { "brauingenieur.de", true },
- { "braunsteinpc.com", true },
- { "braunwarth.info", true },
- { "brava.bg", true },
- { "brave-foods.ch", false },
- { "brave-foods.com", false },
- { "brave.com", true },
- { "bravebaby.com.au", true },
- { "bravebooks.berlin", true },
- { "bravica.tk", true },
- { "bravobet.et", true },
- { "bravor.pe", true },
- { "brazenfol.io", true },
- { "brazilian.dating", true },
- { "brazilianbikinishop.com", true },
- { "braziliex.com", true },
- { "brazillens.com", true },
- { "brazoriabar.org", true },
- { "brb.city", true },
- { "brck.nl", true },
- { "brd.ro", true },
- { "bread.fish", true },
- { "bread.red", true },
- { "breadandlife.org", true },
- { "breadofgod.org", true },
- { "breadpirates.chat", true },
- { "breakcraft.tk", true },
- { "breakerlink.com", true },
- { "breakingtech.fr", true },
- { "breakingtech.it", true },
- { "breakout.careers", true },
- { "breaky.de", true },
- { "breard.tf", true },
- { "breathedreamgo.com", true },
- { "breathingblanket.com", true },
- { "brecht.ch", true },
- { "breckle.com.ua", true },
- { "brecknell.biz", true },
- { "brecknell.com", true },
- { "brecknell.info", true },
- { "brecknell.name", true },
- { "brecknell.net", true },
- { "brecknell.org", true },
- { "breda.computer", true },
- { "breest.net", true },
- { "breeyn.com", true },
- { "brefy.com", true },
- { "brege.org", true },
- { "bregnedal.dk", true },
- { "bregnedalsystems.dk", true },
- { "breitband.bz.it", true },
- { "breizh.pm", true },
- { "brejoc.com", true },
- { "brelahotelberulia.com", true },
- { "bremen-restaurants.de", true },
- { "bremensaki.com", true },
- { "bremerfriedensforum.de", true },
- { "brenbarnes.com", true },
- { "brenbarnes.com.au", true },
- { "brendanbatliner.com", true },
- { "brendansbits.com", true },
- { "brentacampbell.com", true },
- { "brentnewbury.com", true },
- { "bressier.fr", true },
- { "brest-news.tk", true },
- { "bretcarmichael.com", true },
- { "bretech.net", true },
- { "brettabel.com", true },
- { "brettcornwall.com", true },
- { "brettlawyer.com", true },
- { "brettpostin.com", true },
- { "bretzner.fr", false },
- { "brevboxar.se", true },
- { "brewercollinsleadership.com", true },
- { "brewsouth.com", true },
- { "brewspark.co", true },
- { "brewvo.com", true },
- { "breyerslakeshoreresort.com", true },
- { "breyerslakesideresort.com", true },
- { "breyersresort.com", true },
- { "breznet.com", true },
- { "brgins.com", true },
- { "brguk.com", true },
- { "brian-gordon.name", true },
- { "brianalaway.com", true },
- { "brianalawayconsulting.com", true },
- { "briandwells.com", true },
- { "brianfoshee.com", true },
- { "briangosnell.com", true },
- { "brianjohnson.co.za", true },
- { "brianlehfeld.com", true },
- { "brianpagan.net", true },
- { "brianroadifer.com", true },
- { "briansemrau.com", true },
- { "briansmith.org", true },
- { "briantkatch.com", true },
- { "brianvalente.tk", true },
- { "brianwalther.com", true },
- { "brianwesaala.com", false },
- { "brianwilson.tk", true },
- { "brianwylie.com", true },
- { "briarproject.org", true },
- { "brickadia.com", true },
- { "brickftp.com", true },
- { "brickheroes.com", false },
- { "bricksmateriales.com.ar", true },
- { "brickstreettrio.com", true },
- { "brickvortex.com", false },
- { "brickweb.co.uk", true },
- { "bricolajeux.ch", false },
- { "brid.gy", false },
- { "bridalfabrics.co.uk", true },
- { "bridalfabrics.com", true },
- { "bridalfabrics.fr", true },
- { "bridalfabrics.ru", true },
- { "bridalshoes.com", true },
- { "bridalweddingshow.ga", true },
- { "bride-forever.com", true },
- { "bridgedigest.tk", true },
- { "bridgedirectoutreach.com", true },
- { "bridgeforcefinancial.com", true },
- { "bridgeglobalmarketing.com", true },
- { "bridgement.com", true },
- { "bridgercanyonfiremt.gov", false },
- { "bridgetroll.org", true },
- { "bridgevest.com", false },
- { "bridholm.se", true },
- { "bridltaceng.com", true },
- { "brie.tech", true },
- { "briefassistant.com", true },
- { "briefhansa.de", true },
- { "briefkasten-welt.com", true },
- { "briefvorlagen-papierformat.de", true },
- { "brier.me", true },
- { "brighouse-leisure.co.uk", true },
- { "brightday.bz", true },
- { "brightendofleasecleaning.com.au", true },
- { "brightonbank.com", false },
- { "brightonbouncycastles.net", true },
- { "brightonchilli.org.uk", true },
- { "brightpool-markets.com", true },
- { "brightside.com", true },
- { "brightworkcreative.com", true },
- { "brigidaarie.com", true },
- { "brigittaseasons.com", true },
- { "brigittefontaine.tk", true },
- { "brilalux.pe", true },
- { "brilliantbouncyfun.co.uk", true },
- { "brilliantproductions.co.nz", true },
- { "brillio.com", true },
- { "brimspark.systems", true },
- { "brindesgrafica.com.br", true },
- { "brindice.com.br", true },
- { "bring-heaven.com", true },
- { "bringingbackthesweatervest.com", true },
- { "brinkbem.com", true },
- { "brinksurl.com", true },
- { "brio-shop.ch", true },
- { "brioukraine.store", true },
- { "brisbanelogistics.com.au", true },
- { "brisignshop.com.au", true },
- { "brisq.design", true },
- { "bristebein.com", true },
- { "bristolandwestonsuperbounce.com", true },
- { "brit-thoracic.org.uk", true },
- { "britanniacateringyeovil.co.uk", true },
- { "britanniapandi.com", true },
- { "britelocate.com", true },
- { "britishbeef.com", true },
- { "britishbookmakers.co.uk", true },
- { "britishgroupsg.com", true },
- { "britishmeat.com", true },
- { "britishpearl.com", true },
- { "britishsciencefestival.org", true },
- { "britishscienceweek.org", true },
- { "britishsfaward.org", true },
- { "britishsnoring.co.uk", true },
- { "britneyclause.com", true },
- { "brittanyferriesnewsroom.com", true },
- { "britton-photography.com", true },
- { "brizawen.com", true },
- { "brk.dk", true },
- { "brk.st", true },
- { "brmsalescommunity.com", true },
- { "brnojebozi.cz", true },
- { "bro.hk", true },
- { "broadbandchoices.co.uk", true },
- { "broadbandnd.com", true },
- { "broadsheet.com.au", true },
- { "broadwayvets.co.uk", true },
- { "broadyexpress.com.au", true },
- { "brockmeyer.net", true },
- { "brockmeyer.org", true },
- { "brodowski.cc", true },
- { "brody.digital", true },
- { "brody.ninja", true },
- { "broe.ie", true },
- { "broersma.com", true },
- { "brojagraphics.de", true },
- { "brokenhands.io", true },
- { "brokernotes.co", true },
- { "brols.eu", true },
- { "brompton-cocktail.com", true },
- { "bronetb2b.com.br", true },
- { "bronevichok.ru", true },
- { "broodbesteld.nl", true },
- { "broodingblogger.com", true },
- { "brookes.xyz", true },
- { "brooklyncosmetics.net", true },
- { "brooklynentdoc.com", true },
- { "brooklynrealestateblog.com", true },
- { "brosay-legko.ml", true },
- { "brossmanit.com", true },
- { "brouillard.ch", false },
- { "brouskat.be", true },
- { "brouwerijdeblauweijsbeer.nl", true },
- { "brovelton.com", true },
- { "brownchair.org", true },
- { "brownesgas.com", true },
- { "brownfieldstsc.org", true },
- { "brownforces.desi", true },
- { "brownforces.org", true },
- { "brownihc.com", true },
- { "brownsgroup.com", true },
- { "browntowncountryclub.com", true },
- { "brownwolfstudio.com", true },
- { "browse-tutorials.com", true },
- { "browsemycity.com", true },
- { "browserleaks.com", true },
- { "brrr.fr", true },
- { "bru6.de", true },
- { "brubank.com", true },
- { "brubankv1-staging.azurewebsites.net", true },
- { "brucebenes.com", true },
- { "brucekovner.com", true },
- { "brucemartin.net", true },
- { "brucherlaw.lu", true },
- { "bruck.me", true },
- { "bruckmuehler-kanu-club.de", true },
- { "bruckner.li", true },
- { "brudkista.nu", true },
- { "brudkista.se", true },
- { "brudkistan.nu", true },
- { "brudkistan.se", true },
- { "brugerklub.info", true },
- { "bruijns.org", true },
- { "brujoincaperuano.com", true },
- { "brujonegroperuano.com", true },
- { "brunchandmatch.be", true },
- { "brunick.de", false },
- { "brunn.email", true },
- { "brunner.ninja", true },
- { "brunohenc.from.hr", true },
- { "brunolt.nl", true },
- { "brunoproduit.ch", false },
- { "brunoramos.com", true },
- { "brunoramos.org", true },
- { "brunoreno.be", true },
- { "brush.ninja", true },
- { "brushcreekyachts.com", true },
- { "brusselsexpoloft.ga", true },
- { "brusselsexpostudio.ga", true },
- { "brutecloud.com", true },
- { "bruun.co", true },
- { "bry.do", false },
- { "bryanarmijomd.com", true },
- { "bryandesrosiers.com", true },
- { "bryanfalchuk.com", true },
- { "bryankaplan.com", true },
- { "bryanphilton.com", true },
- { "bryanquigley.com", true },
- { "bryansmith.net", true },
- { "bryansmith.tech", true },
- { "brycecanyon.net", true },
- { "brycecanyonnationalpark.com", true },
- { "bryggebladet.dk", true },
- { "brzy-svoji.cz", true },
- { "bs-network.net", true },
- { "bs.to", true },
- { "bs12v.ru", true },
- { "bsa157.org", true },
- { "bsaft.ml", true },
- { "bsapack564.org", true },
- { "bsatroop794.org", true },
- { "bsc-rietz.at", true },
- { "bscc.support", true },
- { "bscquimicos.com.br", true },
- { "bsd-box.net", true },
- { "bsdes.net", true },
- { "bsdfreak.dk", true },
- { "bsdio.com", true },
- { "bsdlab.com", true },
- { "bsdracing.ca", true },
- { "bsdunix.xyz", true },
- { "bsee.gov", true },
- { "bserved.de", true },
- { "bsg.ro", false },
- { "bsgamanet.ro", false },
- { "bsgcredit.ro", true },
- { "bsidesf.com", true },
- { "bsidesf.org", true },
- { "bsidessf.com", true },
- { "bsimyanmar.com", true },
- { "bsmn.ga", true },
- { "bso-buitengewoon.nl", true },
- { "bsociabl.com", true },
- { "bsp-southpool.com", true },
- { "bsquared.org", true },
- { "bssolvfagen-pre-storeswa-wap.azurewebsites.net", true },
- { "bsstainless.com", true },
- { "bstoked.net", true },
- { "bsw-solution.de", true },
- { "bszoft.hu", true },
- { "bt123.xyz", true },
- { "bt3655.com", true },
- { "bt3657.com", true },
- { "bt3658.com", true },
- { "bta.lv", false },
- { "bta00.com", true },
- { "bta55.com", true },
- { "btc-alpha.com", true },
- { "btc-doge.ga", true },
- { "btcarmory.com", true },
- { "btcbenthuizen.nl", true },
- { "btcbolsa.com", true },
- { "btcpop.co", true },
- { "bte365app.com", true },
- { "bteapp.com", true },
- { "bthub.site", true },
- { "bthub.xyz", true },
- { "btio.pw", false },
- { "btmstore.com.br", true },
- { "btnissanparts.com", true },
- { "btopc.jp", true },
- { "btorrent.xyz", true },
- { "btsapem.com", true },
- { "btshe.net", true },
- { "btsmoments.com", true },
- { "btsoft.eu", true },
- { "btsou.org", true },
- { "btsow.com", false },
- { "btsybt.com", true },
- { "btt0101.com", true },
- { "btt0303.com", true },
- { "btt0505.com", true },
- { "btt0606.com", true },
- { "btt0707.com", true },
- { "btt0707a.com", true },
- { "btt1111.com", true },
- { "btt1212.com", true },
- { "btt1313.com", true },
- { "btt138g.com", true },
- { "btt2020.com", true },
- { "btt2121.com", true },
- { "btt213.com", true },
- { "btt216.com", true },
- { "btt219.com", true },
- { "btt221.com", true },
- { "btt225.com", true },
- { "btt2323a.com", true },
- { "btt2525.com", true },
- { "btt256.com", true },
- { "btt263.com", true },
- { "btt268.com", true },
- { "btt269g.com", true },
- { "btt2929a.com", true },
- { "btt301.com", true },
- { "btt302.com", true },
- { "btt303.com", true },
- { "btt305.com", true },
- { "btt306.com", true },
- { "btt307.com", true },
- { "btt308.com", true },
- { "btt309.com", true },
- { "btt312.com", true },
- { "btt317.com", true },
- { "btt319.com", true },
- { "btt3311.com", true },
- { "btt332.com", true },
- { "btt350.com", true },
- { "btt351.com", true },
- { "btt352.com", true },
- { "btt353.com", true },
- { "btt3535.com", true },
- { "btt355.com", true },
- { "btt358.com", true },
- { "btt359.com", true },
- { "btt361.com", true },
- { "btt362.com", true },
- { "btt368.com", true },
- { "btt371.com", true },
- { "btt372.com", true },
- { "btt373.com", true },
- { "btt375.com", true },
- { "btt376.com", true },
- { "btt378.com", true },
- { "btt379.com", true },
- { "btt381.com", true },
- { "btt381g.com", true },
- { "btt529g.com", true },
- { "btt583g.com", true },
- { "btt6262a.com", true },
- { "btt6363a.com", true },
- { "btt645g.com", true },
- { "btt686.com", true },
- { "btt6868.com", true },
- { "btt7272a.com", true },
- { "btt7676.com", true },
- { "btt775.com", true },
- { "btt7878.com", true },
- { "btt8.me", true },
- { "btt818g.com", true },
- { "btt829.com", true },
- { "btt830g.com", true },
- { "btt8787a.com", true },
- { "btt88818.com", true },
- { "btt889g.com", true },
- { "btt891.com", true },
- { "btt8989a.com", true },
- { "btt907.com", true },
- { "btt9090.com", true },
- { "btt918958.com", true },
- { "btt932g.com", true },
- { "btt945g.com", true },
- { "btt9898.com", true },
- { "btt996.com", true },
- { "btta15.com", true },
- { "btta16.com", true },
- { "btta26.com", true },
- { "btta30.com", true },
- { "bttc.co.uk", true },
- { "btth.pl", true },
- { "btth.tv", true },
- { "bttna.com", true },
- { "bttorj45.com", true },
- { "bttp7.com", true },
- { "bttt333.com", true },
- { "bttt999.com", true },
- { "bttyulecheng0.com", true },
- { "bttyulecheng7.com", true },
- { "bu-dun.com", true },
- { "buayacorp.com", true },
- { "bubblegumblog.com", true },
- { "bubblespetspa.com", true },
- { "bubblin.io", true },
- { "bubblinghottubs.co.uk", true },
- { "bubulazi.com", false },
- { "bubulazy.com", true },
- { "bucek.cz", true },
- { "buch-angucken.de", true },
- { "buchhaltung-muehelos.de", true },
- { "buchwegweiser.com", true },
- { "buck-hydro.de", true },
- { "buckelewrealtygroup.com", true },
- { "bucketlist.co.ke", true },
- { "buckscountyobgyn.com", true },
- { "buckypaper.com", true },
- { "buddhismedia.com", true },
- { "buddhismus.net", true },
- { "buddie5.com", true },
- { "buddlycrafts.com", true },
- { "buddycompany.net", true },
- { "buddyme.me", true },
- { "buddytop.com", true },
- { "buddyworks.net", true },
- { "budeanu.com", true },
- { "budget.gov", true },
- { "budgetalk.com", true },
- { "budgetboats.net", true },
- { "budgetcastlehire.co.uk", true },
- { "budgetlob.gov", true },
- { "budgetlovers.nl", true },
- { "budgiesballoons.com", true },
- { "budntod.com", true },
- { "budolangnau.ch", true },
- { "budolfs.de", true },
- { "budowle.pl", true },
- { "bueltge.de", true },
- { "buena-vista.cz", true },
- { "buena.me", true },
- { "bueny.com", true },
- { "bueny.net", true },
- { "buerger-lenke.de", true },
- { "bueromoebel-experte.de", true },
- { "bueroplus.de", true },
- { "bueroschwarz.design", true },
- { "bueroshop24.de", true },
- { "buettgens.net", true },
- { "buffaloautomation.com", true },
- { "buffaloturf.com.au", true },
- { "buffashe.com", false },
- { "buffup.media", true },
- { "buffus.cz", true },
- { "bug.blue", true },
- { "bug.ee", true },
- { "bugcrowd.com", true },
- { "bugs.chromium.org", true },
- { "bugsmashed.com", true },
- { "bugteam.cn", true },
- { "bugwie.com", true },
- { "bugzil.la", true },
- { "bugzilla.mozilla.org", true },
- { "buhayprincipal.com", true },
- { "build.chromium.org", true },
- { "buildbytes.com", true },
- { "buildhoscaletraingi.com", true },
- { "buildingbitcoin.org", true },
- { "buildingclouds.de", true },
- { "buildingpoint.pt", true },
- { "builditsolutions.net", true },
- { "buildkite.com", true },
- { "buildmorebuslanes.com", true },
- { "buildplease.com", true },
- { "builtory.my", true },
- { "builtvisible.com", true },
- { "builtwith.com", true },
- { "buissonchardin.fr", true },
- { "buitenposter.nl", true },
- { "bukalapak.com", true },
- { "bukiskola.hu", true },
- { "bukivallalkozasok.hu", true },
- { "bukkenfan.jp", true },
- { "bulario.com", true },
- { "bulario.net", true },
- { "bularmas.com", true },
- { "bulgarianwine.com", true },
- { "bulkcandystore.com", true },
- { "bulktshirtsjohannesburg.co.za", true },
- { "bulkwholesalesweets.co.uk", true },
- { "bulldog-hosting.de", false },
- { "bulledair-savons.ch", false },
- { "bullettags.com", true },
- { "bullseyemetrics.com", true },
- { "bullshitmail.nl", true },
- { "bullterrier.nu", true },
- { "bulvar.tk", true },
- { "bulwarkcrypto.com", true },
- { "bulwarkhost.com", true },
- { "bumble.com", true },
- { "bumilangkawi.com", true },
- { "bund-von-theramore.de", true },
- { "bundespolizei-forum.de", true },
- { "bundesverband-krisenintervention.de", true },
- { "bundesverbandkrisenintervention.de", true },
- { "bundito.com", true },
- { "bungabuket.com", true },
- { "bungaspa.com", true },
- { "bungee.pw", true },
- { "bunix.de", true },
- { "bunkyo-life.com", true },
- { "bunny-rabbits.com", true },
- { "bunny.parts", true },
- { "bunnydiamond.de", true },
- { "bunzy.ca", true },
- { "buongiornolatina.it", true },
- { "buonventosbt.eu", true },
- { "bupropion.com", true },
- { "burakogun.com", true },
- { "burakogun.com.tr", true },
- { "burakogun.net", true },
- { "burakogun.net.tr", true },
- { "burakogun.org", true },
- { "burbankdental.com", true },
- { "burcevo.info", true },
- { "burchfabrics.com", true },
- { "bureaugoodwork.nl", true },
- { "burg-hohnstein.com", true },
- { "burgernet.nl", true },
- { "burgers.io", true },
- { "burghardt.pl", true },
- { "buri.be", true },
- { "burialinsurancenetwork.com", true },
- { "burienergy.com", true },
- { "buriramradio.com", true },
- { "burke.services", true },
- { "burkhardt.at", true },
- { "burkow.ru", true },
- { "burlapsac.ca", true },
- { "burlingtonhs.com", true },
- { "burncorp.org", true },
- { "burnerfitness.com", true },
- { "burnhamonseabouncycastles.co.uk", true },
- { "burningbird.net", true },
- { "burningflipside.com", false },
- { "burningmarket.de", true },
- { "burntfish.com", true },
- { "burnworks.com", true },
- { "buronwater.com", true },
- { "burotec-sarl.com", true },
- { "burr.is", true },
- { "bursaries-southafrica.co.za", true },
- { "burtrum.family", true },
- { "burtrum.me", true },
- { "burtrum.name", true },
- { "burtrum.org", true },
- { "burzcast.ro", true },
- { "burzmali.com", true },
- { "burzum.ch", true },
- { "buscandolosmejores.com", true },
- { "buscasimple.com", true },
- { "buselefante.tk", true },
- { "bushbaby.com", true },
- { "bushfirerecovery.gov.au", true },
- { "busindre.com", true },
- { "business-garden.com", true },
- { "business-secreti.gq", true },
- { "business-secreti.tk", true },
- { "business.facebook.com", false },
- { "business.gov", true },
- { "businesscentermarin.ch", false },
- { "businessesdirectory.eu", true },
- { "businessfactors.de", true },
- { "businessloanconnection.org", false },
- { "businessmarketingblog.org", true },
- { "businesspartner.tk", true },
- { "businesswebadmin.com", true },
- { "busold.ws", true },
- { "busphotos.tk", true },
- { "bustabit.com", true },
- { "bustadice.com", true },
- { "bustany.org", true },
- { "buster.me.uk", true },
- { "busuttil.org.uk", true },
- { "buswiki.ml", true },
- { "butarque.es", true },
- { "butikvip.ru", true },
- { "butlerfm.dk", true },
- { "butter.horse", true },
- { "butteramotors.com", true },
- { "buttgun-tattoo.de", true },
- { "buttoned.io", true },
- { "buttonizer.pro", true },
- { "buttonline.ch", true },
- { "butts-are.cool", true },
- { "butz.cloud", true },
- { "butzies.ddnss.org", true },
- { "buurtpreventiefraneker.nl", true },
- { "buxum-communication.ch", false },
- { "buy-an-essay.gq", true },
- { "buy-essay-online.ga", true },
- { "buy-lasix-without-a-doctor-s-prescription.ga", true },
- { "buy-los-angeles-auto-insurance.com", true },
- { "buy-out.jp", true },
- { "buy-zofran.ga", true },
- { "buyaccessible.gov", true },
- { "buyamerican.gov", false },
- { "buybutton.store", true },
- { "buycccam.tv", true },
- { "buycoins.top", true },
- { "buycurious.co.uk", true },
- { "buydiflucan.ml", true },
- { "buydissertations.com", true },
- { "buyerdocs.com", true },
- { "buyessay.org", true },
- { "buyessays.net", true },
- { "buyinginvestmentproperty.com", true },
- { "buylasix.ml", true },
- { "buylevaquin.tk", true },
- { "buypapercheap.net", true },
- { "buyplore.com", true },
- { "buyrogaine.ga", true },
- { "buyseo.store", true },
- { "buysildenafil.ml", true },
- { "buysoft.co.uk", true },
- { "buytermpaper.com", true },
- { "buyusa.gov", true },
- { "buzz.tools", true },
- { "buzzcontent.com", true },
- { "buzzprint.it", true },
- { "bvalle.com", true },
- { "bvbmedia.nl", true },
- { "bvgt.org", true },
- { "bviphotovideo.com", true },
- { "bvl.aero", true },
- { "bvprecords.com", true },
- { "bvsa.co.za", true },
- { "bw.codes", true },
- { "bwanglab.com", true },
- { "bwasoimoveis.net", true },
- { "bwcscorecard.org", true },
- { "bwfc.nl", true },
- { "bwgjms.com", true },
- { "bwgjms.net", true },
- { "bwgjms.org", true },
- { "bwh1.net", false },
- { "bwhbwh.com", true },
- { "bwhbwh.net", true },
- { "bwilkinson.co.uk", true },
- { "bwin18.cc", true },
- { "bwin58.cc", true },
- { "bwl-earth.club", true },
- { "bws16.de", true },
- { "bwserhoscaletrainaz.com", true },
- { "bx-n.de", true },
- { "bxdj2.com", true },
- { "bxdj3.com", true },
- { "bxdj4.com", true },
- { "bxdj5.com", true },
- { "bxdj6.com", true },
- { "bxdj666.com", true },
- { "bxdj7.com", true },
- { "bxdj8.com", true },
- { "bxdj88.com", true },
- { "bxdj888.com", true },
- { "bxdj9.com", true },
- { "bxp40.at", true },
- { "bxzx1.com", true },
- { "bxzx2.com", true },
- { "bxzx3.com", true },
- { "bxzx4.com", true },
- { "bxzx5.com", true },
- { "bxzx6.com", true },
- { "bxzx7.com", true },
- { "bxzx9.com", true },
- { "by-robyn.nl", true },
- { "byange.pro", true },
- { "byanjushka.com", true },
- { "byatte.com", true },
- { "byaustere.com", true },
- { "bycrates.com", true },
- { "byeskille.no", true },
- { "byggonline.ga", true },
- { "bygningsregistrering.dk", true },
- { "byhenryvera.com", true },
- { "byjus.com", true },
- { "byjuschennai.com", true },
- { "byket.lviv.ua", true },
- { "byluthier.com", true },
- { "bymark.co", true },
- { "bymike.co", true },
- { "bynder.com", true },
- { "bynumlaw.net", true },
- { "bypass.sh", true },
- { "bypetula.cz", true },
- { "byrko.cz", true },
- { "byrnesagency.com", true },
- { "byronkg.us", true },
- { "byrtz.de", true },
- { "bytanchan.com", true },
- { "byte-time.com", true },
- { "byte.nl", true },
- { "byte128.com", true },
- { "bytearts.net", false },
- { "bytebucket.org", true },
- { "bytecode.no", true },
- { "bytedigital.es", true },
- { "byteflies.com", true },
- { "bytegoing.com", true },
- { "bytejail.com", true },
- { "bytelog.org", false },
- { "bytema.cz", true },
- { "bytema.eu", true },
- { "bytema.re", true },
- { "bytema.sk", true },
- { "bytemix.cloud", true },
- { "bytepen.com", true },
- { "bytes.co", true },
- { "bytes.fyi", true },
- { "bytesatwork.de", true },
- { "byteshark.org", true },
- { "bytesign.de", true },
- { "bytesizedalex.com", true },
- { "bytesund.biz", true },
- { "byteswave.cl", true },
- { "bytesystems.com", true },
- { "byteterrace.com", true },
- { "bytheglass.gr", true },
- { "bytheswordinc.com", true },
- { "bythisverse.com", true },
- { "bytrain.net", true },
- { "byuu.net", true },
- { "byuu.org", true },
- { "byvshie.com", true },
- { "bywin9.com", true },
- { "byxong.com", true },
- { "bzh.tf", true },
- { "bzsparks.com", false },
- { "bztech.com.br", true },
- { "bzv-fr.eu", true },
- { "c-3.moe", true },
- { "c-aeroconsult.com", true },
- { "c-ma-copro.com", true },
- { "c-rtx.com", true },
- { "c-shock.org", true },
- { "c-webdesign.net", true },
- { "c-world.co.uk", true },
- { "c.cc", true },
- { "c00ke.com", true },
- { "c0rporation.com", true },
- { "c2design.it", true },
- { "c2lab.net", true },
- { "c30365.com", true },
- { "c35.design", true },
- { "c36533.com", true },
- { "c36594.com", true },
- { "c3kidspace.de", true },
- { "c3sign.de", false },
- { "c3softworks.com", true },
- { "c3vo.de", true },
- { "c3w.at", true },
- { "c3wien.at", true },
- { "c3woc.de", false },
- { "c4539.com", true },
- { "c4k3.net", true },
- { "c5h8no4na.net", true },
- { "c678.top", true },
- { "c7dn.com", true },
- { "c86255.com", false },
- { "ca-key.de", true },
- { "ca.gparent.org", true },
- { "ca.search.yahoo.com", false },
- { "ca5.de", true },
- { "caai.cc", true },
- { "caaps.org.au", true },
- { "caarecord.org", true },
- { "caasd.org", true },
- { "cabaal.net", true },
- { "cabaladada.org", true },
- { "cabarave.com", true },
- { "cabecera-descendimiento.tk", true },
- { "cabelgrano.tk", true },
- { "cabezadelcaballo.tk", true },
- { "cabforum.org", true },
- { "cabineritten.nl", true },
- { "cabinet-life.fr", false },
- { "cabinetfurnituree.com", true },
- { "cablemod.com", true },
- { "cablesandkits.com", true },
- { "cabooneconstruction.com", true },
- { "cabotfinancial.co.uk", true },
- { "cabuna.hr", true },
- { "cacao-chocolate.com", true },
- { "cacao.supply", true },
- { "cacaolalina.com", true },
- { "cacaumidade.com.br", true },
- { "cachacacha.com", true },
- { "cachchoi138bet.com", true },
- { "cachedview.nl", true },
- { "cachetur.no", true },
- { "cackette.com", true },
- { "cacrm.com", true },
- { "cactuspedia.ga", true },
- { "cactusyaktopus.com", true },
- { "cad-noerdlingen.de", true },
- { "cadams.io", true },
- { "caddyfashionshop.com", true },
- { "cadenceconstruction.com", true },
- { "cadep2019.com", true },
- { "cadetsge.ch", false },
- { "cadifit.ga", true },
- { "cadmail.nl", true },
- { "cadman.pw", true },
- { "cadmanlaw.ca", true },
- { "cadmanlaw.com", true },
- { "cadmax.pro", true },
- { "cadmechanic.com", true },
- { "cadooz.com", true },
- { "cadorama.fr", true },
- { "cadoth.net", true },
- { "cadra.nl", true },
- { "cadre.com", true },
- { "cadsys.net", true },
- { "cadusilva.com", true },
- { "caesarkabalan.com", true },
- { "caetanobenet.es", true },
- { "caetanoflotas.es", true },
- { "caetanoformula.es", true },
- { "caetanoformulacadiz.es", true },
- { "caetanoformulagalicia.es", true },
- { "caetanomotorsmalaga.es", true },
- { "caetanoreicomsa.es", true },
- { "cafe-pauline.de", true },
- { "cafedelahalle.com", true },
- { "cafedupont.be", true },
- { "cafedupont.co.uk", true },
- { "cafedupont.de", true },
- { "cafedupont.nl", true },
- { "cafeimsueden.de", true },
- { "cafejulian.com", true },
- { "cafelandia.net", true },
- { "cafenix.tk", true },
- { "cafeobscura.nl", true },
- { "caferagazzi.de", true },
- { "cafericoy.com", true },
- { "cafermin.com", true },
- { "cafeterasbaratas.net", true },
- { "caffeinatedcode.com", true },
- { "caffeinefiend.org", true },
- { "cafled.org", true },
- { "cainhosting.com", false },
- { "cais.de", true },
- { "caizx.com", false },
- { "caja-pdf.es", true },
- { "cajalosandes.cl", true },
- { "cajio.ru", true },
- { "cake-n-go.com", true },
- { "cakearific.com", true },
- { "cakeoffencesact.uk", true },
- { "cakesbyzoey.com", true },
- { "cakestart.net", true },
- { "caketoindia.com", true },
- { "cakingandbaking.com", true },
- { "cakirlarshipyard.com", true },
- { "calaad.net", true },
- { "calabasaselectric.com", true },
- { "calabasaselectrical.com", true },
- { "calabasaselectrician.com", true },
- { "calabasasexteriorlighting.com", true },
- { "calabasaslandscapelighting.com", true },
- { "calabasaslighting.com", true },
- { "calabasasoutdoorlighting.com", true },
- { "calaborlawnews.com", true },
- { "calafont.cat", false },
- { "calandrahosting.tk", true },
- { "calaverasmedicalcannabis.com", true },
- { "calbertsen.dk", true },
- { "calcedge.com", true },
- { "calcinacci.com", true },
- { "calcioragusa.tk", true },
- { "calcoolator.pl", true },
- { "calculadoraconversor.com", true },
- { "calcularis.ch", true },
- { "calculateaspectratio.com", true },
- { "calculates.org", true },
- { "calculator-imt.com", true },
- { "calculator.tf", true },
- { "calcworkshop.com", true },
- { "caldersoldas.com.br", true },
- { "caldervets.co.uk", true },
- { "caldoletto.com", true },
- { "calebthompson.io", true },
- { "calehoo.com", true },
- { "calendar.cf", false },
- { "calendar.google.com", true },
- { "calendarr.com", true },
- { "calendarsnow.com", true },
- { "calendly.com", true },
- { "calendriergn.ch", true },
- { "calenfil.com", true },
- { "caletka.cz", true },
- { "calgoty.com", true },
- { "calibra.com", true },
- { "calibreapp.com", false },
- { "calibso.net", true },
- { "calichines.com", true },
- { "caliderumba.com", true },
- { "californiamusicacademy.com", true },
- { "californiawomensmedicalclinic.com", true },
- { "calitateavietii-ardeal.ro", true },
- { "calixte-concept.fr", true },
- { "call-centervko.kz", true },
- { "call.me", true },
- { "callanan.nl", true },
- { "callear.org", true },
- { "callerstrom.se", true },
- { "callhub.io", true },
- { "callmewhatever.com", true },
- { "callqa.center", true },
- { "calltoar.ms", true },
- { "calltothepen.com", true },
- { "callumsilcock.com", true },
- { "callumsilcock.me", true },
- { "calluro.hr", true },
- { "calmtech.com", true },
- { "calomel.org", true },
- { "calonmahasiswa.com", true },
- { "calotte-academy.com", true },
- { "calposa.ml", true },
- { "calprut.com", true },
- { "calrotaract.org", true },
- { "calucon.de", true },
- { "calverleyparish.church", true },
- { "calvin.my", true },
- { "calvinallen.net", false },
- { "calyxinstitute.org", true },
- { "calzadonline1-latam.com", true },
- { "calzadonline1.com", true },
- { "camago.dk", true },
- { "camara360grados.com", true },
- { "camaradivisas.com", true },
- { "camaras.uno", true },
- { "camarilloelectric.com", true },
- { "camarilloelectrical.com", true },
- { "camarilloexteriorlighting.com", true },
- { "camarillolandscapelighting.com", true },
- { "camarillolighting.com", true },
- { "camarillooutdoorlighting.com", true },
- { "camashop.de", true },
- { "camastowncar.com", true },
- { "camberford.com", true },
- { "cambier.org", true },
- { "cambodiainfo.tk", true },
- { "cambodian.dating", true },
- { "cambreaconsulting.com", true },
- { "cambridge-examen.nl", true },
- { "cambridge-security.com", true },
- { "cambridgeanalytica.cz", true },
- { "cambridgebouncers.co.uk", true },
- { "cambridgesecuritygroup.org", true },
- { "cambuslangharriers.org", true },
- { "camcapital.com", true },
- { "camclips.pro", true },
- { "camconn.cc", true },
- { "camdesign.pl", true },
- { "cameo-membership.uk", true },
- { "cameo.ee", true },
- { "cameramark.nl", true },
- { "cameraslyphotography.tk", true },
- { "cameraviva.com.br", true },
- { "camerweb.es", true },
- { "camilastore.com.br", true },
- { "camilomodzz.net", true },
- { "camisetasmalwee.com.br", true },
- { "camolist.com", true },
- { "camp-pleinsoleil.ch", true },
- { "campaign-ad.com", true },
- { "campaignhelpdesk.org", true },
- { "campaignlake.com", true },
- { "campaignwiki.org", true },
- { "campamentos.info", true },
- { "campbellapplianceheatingandair.com", true },
- { "campbellkennedy.co.uk", true },
- { "campcambodia.org", true },
- { "camperdays.de", true },
- { "camperlist.com", true },
- { "campermanaustralia.com", true },
- { "campertrailerfinance.com.au", true },
- { "camperverzekerd.nl", true },
- { "campfiretails.org", true },
- { "camping-aupigeonnier.fr", true },
- { "camping-le-pasquier.com", true },
- { "camping-seilershof.de", true },
- { "campinghuntingshooting.com", true },
- { "campingshop.pl", true },
- { "campingskyhooks.com", true },
- { "campistry.net", true },
- { "campmackinaw.com", true },
- { "campo-salado.com", true },
- { "campsoulfestival.com", true },
- { "camptuk.org", true },
- { "campula.cz", true },
- { "campus-discounts.com", true },
- { "campus-finance.com", true },
- { "campusdrugprevention.gov", false },
- { "campusfit.co", true },
- { "campuswire.com", true },
- { "campvana.com", true },
- { "campwabashi.org", true },
- { "camshowdir.com", true },
- { "camshowdir.to", true },
- { "camshowhive.to", true },
- { "camshowhub.com", true },
- { "camshowhub.to", true },
- { "camshowplace.to", true },
- { "camshowstorage.com", true },
- { "camshowstorage.to", true },
- { "camshowverse.com", true },
- { "camshowverse.to", true },
- { "camsky.de", false },
- { "canada.ind.br", true },
- { "canadaabroad.com", true },
- { "canadabread.com", false },
- { "canadaradon.com", true },
- { "canadasmotorcycle.ca", true },
- { "canadian.dating", true },
- { "canadianatheists.ca", true },
- { "canadianatheists.com", true },
- { "canadianoutdoorequipment.com", true },
- { "canadiantouristboard.com", true },
- { "canalecontracting.com", true },
- { "canariculturacolor.com", true },
- { "canarymod.net", true },
- { "canavilage.com", true },
- { "canavillage.net", true },
- { "canavillagepuntacana.com", true },
- { "canavillageresidences.com", true },
- { "canberraoutletcentre.com.au", true },
- { "cancerdata.nhs.uk", true },
- { "candaceplayforth.com", true },
- { "candelec.com", false },
- { "candeo-books.nl", true },
- { "candex.com", true },
- { "candguchocolat.com", true },
- { "candicecity.com", true },
- { "candidasa.com", true },
- { "candidateexperiencemarketing.nl", true },
- { "candidatlibre.net", true },
- { "candidaturedunprix.com", true },
- { "candinya.com", true },
- { "candinya.me", true },
- { "cando.eu", true },
- { "canfazz.com", true },
- { "cangku.in", true },
- { "canglong.net", true },
- { "canhas.report", true },
- { "canhazip.com", true },
- { "canhq.tk", true },
- { "cani-compostelle.fr", true },
- { "canihavesome.coffee", true },
- { "canine-mobility.com", true },
- { "caniuse.email", true },
- { "canker.org", true },
- { "cannabis-marijuana.com", true },
- { "cannabiscare.ca", true },
- { "cannabislegality.info", true },
- { "cannabismd.com", true },
- { "cannacards.ca", true },
- { "cannacun.com", true },
- { "cannaffiliate.com", true },
- { "cannagoals.com", true },
- { "cannahealth.com", true },
- { "cannoli.london", true },
- { "cannyfoxx.me", true },
- { "canobag.es", true },
- { "canopycleaningmelbourne.com.au", true },
- { "canopytax.com", true },
- { "cant.at", true },
- { "cantatio.ch", false },
- { "canterbury.ws", true },
- { "canterburybouncycastlehire.co.uk", true },
- { "cantik.co", true },
- { "cantonroadjewelry.com", true },
- { "cantosdisidentes.tk", true },
- { "canttboardpachmarhi.org", true },
- { "canva-dev.com", true },
- { "canva.cn", true },
- { "canva.com", true },
- { "canvas-gift.com", true },
- { "canx.org", true },
- { "canyonshoa.com", true },
- { "canyoupwn.me", true },
- { "cao.gov", true },
- { "cao.la", true },
- { "caodo.cf", true },
- { "caoliu.tech", true },
- { "caoshan60.com", true },
- { "capachitos.cl", true },
- { "capacityproject.org", true },
- { "capalsa.com", true },
- { "capbig.com", true },
- { "capeannpediatrics.com", true },
- { "capebretonpiper.com", true },
- { "caph.info", true },
- { "caphane.com", true },
- { "caphefin.com", true },
- { "capillary.io", true },
- { "capimlimaoflores.com.br", true },
- { "capitainebaggy.ch", false },
- { "capital-match.com", true },
- { "capitalcap.com", true },
- { "capitalcollections.org.uk", true },
- { "capitalibre.com", true },
- { "capitalism.party", true },
- { "capitalist.cf", true },
- { "capitalmediaventures.co.uk", true },
- { "capitalonecardservice.com", true },
- { "capitalp.jp", true },
- { "capitalquadatv.org.nz", true },
- { "capitolpathways.org", true },
- { "caplinbouncycastles.co.uk", true },
- { "capper.de", true },
- { "caprice-holdings.co.uk", true },
- { "caprichosdevicky.com", true },
- { "caps.is", true },
- { "capsogusto.com", true },
- { "capstansecurity.co.uk", true },
- { "capstansecurity.com", true },
- { "capstoneinsights.com", true },
- { "captain-dandelion.com", true },
- { "captainark.net", true },
- { "captainfit.in", true },
- { "captainsfarm.in", true },
- { "captivationtheory.com", true },
- { "capturapp.com", false },
- { "capture-app.com", true },
- { "captured-symphonies.com", true },
- { "capuchinox.com", true },
- { "caputodesign.com", true },
- { "car-forums.com", true },
- { "car-spaw-rac.fr", true },
- { "car.info", true },
- { "car24.de", true },
- { "car24portal.de", true },
- { "caraccio.li", true },
- { "carapax.net", true },
- { "carassure.de", true },
- { "carauctionnetwork.com", true },
- { "carauctionsalabama.com", true },
- { "carauctionscarolina.com", true },
- { "carauctionsgeorgia.com", true },
- { "carauctionsillinois.com", true },
- { "caravanserail.info", true },
- { "carbon-designz.com", true },
- { "carbon-project.org", true },
- { "carbon.coop", true },
- { "carbon12.org", true },
- { "carbon12.software", true },
- { "carboneselectricosnettosl.info", false },
- { "carbonnel.me", true },
- { "carbono.uy", true },
- { "carbontv.com", true },
- { "carburetorcycleoi.com", true },
- { "carbuyersbrisbane.com.au", true },
- { "carcani.com", true },
- { "carcloud.ch", true },
- { "card-cashing.com", true },
- { "cardano.eco", true },
- { "cardanoinvestment.com", true },
- { "cardcaptorsakura.jp", true },
- { "carddreams.be", true },
- { "carddreams.de", true },
- { "carddreams.es", true },
- { "carddreams.nl", true },
- { "cardexchangesolutions.com", true },
- { "cardiagnostics.tk", true },
- { "cardideas.xyz", true },
- { "cardingforum.co", true },
- { "cardioagainstcancer.nl", true },
- { "cardios.srv.br", true },
- { "cardjit.su", true },
- { "cardoni.net", true },
- { "cardozovargas.com", true },
- { "cardranking.jp", true },
- { "cardrecovery.fr", true },
- { "cardsolutionsbh.com.br", true },
- { "cardxl.be", true },
- { "cardxl.de", true },
- { "cardxl.fr", true },
- { "cardxl.nl", true },
- { "care4all.com", true },
- { "careeapp.com", true },
- { "career.support", true },
- { "careeroptionscoach.com", true },
- { "careertransformed.com", true },
- { "carefulcolor.com", true },
- { "caremad.io", true },
- { "carepan.ga", true },
- { "carepassport.com", true },
- { "carespan.clinic", true },
- { "caretta.co.uk", true },
- { "careyshop.cn", true },
- { "carezone.com", false },
- { "carezzaperu.com", true },
- { "carfinancehelp.com", true },
- { "carfinans.ru", true },
- { "carfraemill.co.uk", true },
- { "cargobas.com", true },
- { "cargoguard.com", true },
- { "cargomaps.com", true },
- { "cargorestraintsystems.com.au", true },
- { "cargosapiens.com.br", true },
- { "carhunters.cz", true },
- { "caribbean.dating", true },
- { "caribbeanexams.com", true },
- { "caribougrill.com", true },
- { "caribuku.tk", true },
- { "carigami.fr", true },
- { "caringladies.org", true },
- { "carinthia.eu", true },
- { "carisenda.com", true },
- { "carium.com", true },
- { "carkeysanantonio.com", true },
- { "carlavitalesteticista.com", true },
- { "carlgo11.com", true },
- { "carlife-at.jp", true },
- { "carlili.fr", true },
- { "carlingfordapartments.com.au", true },
- { "carlinmack.com", true },
- { "carlitoxxpro.com", true },
- { "carlmjohnson.net", false },
- { "carlobiagi.de", true },
- { "carlocksmith--dallas.com", true },
- { "carlocksmithbaltimore.com", true },
- { "carlocksmithcarrollton.com", true },
- { "carlocksmithellicottcity.com", true },
- { "carlocksmithfallbrook.com", true },
- { "carlocksmithkey.com", true },
- { "carlocksmithlewisville.com", true },
- { "carlocksmithmesquite.com", true },
- { "carlocksmithtucson.com", true },
- { "carlosabarbamd.com", true },
- { "carlosfelic.io", true },
- { "carlosjeurissen.com", true },
- { "carlosjeurissen.nl", true },
- { "carlosmfalves.eu", true },
- { "carlot-j.com", true },
- { "carls-fallout-4-guide.com", true },
- { "carltontownfc.tk", true },
- { "carmatworld.co.uk", true },
- { "carmelglenane.com", true },
- { "carmelrise.co.uk", true },
- { "carmeni.tk", true },
- { "carmenluz.fr", true },
- { "carmineforsheriff.com", true },
- { "carnaticalifornia.com", true },
- { "carnet-du-voyageur.com", true },
- { "carnildo.com", true },
- { "carnivorousplants.co.uk", true },
- { "caroes.be", true },
- { "caroffer.ch", true },
- { "carol-lambert.com", true },
- { "carolcappelletti.com", true },
- { "carolcestas.com", true },
- { "caroli.com", true },
- { "caroli.name", true },
- { "caroli.net", true },
- { "carolicious.tk", true },
- { "carolina.cz", true },
- { "carolinaallergyandasthma.com", true },
- { "carolinaclimatecontrolsc.com", true },
- { "carolinaoliveira.tk", true },
- { "carolinapainandspine.com", true },
- { "carolineball.com", true },
- { "carolineeball.com", true },
- { "carolinehanania.com", true },
- { "carontetourist.hr", true },
- { "carontetouristisoleminori.it", true },
- { "carousel.ga", true },
- { "carpet---cleaning.com", true },
- { "carpetandhardwoodflooringpros.com", true },
- { "carpetcleaning-cypress.com", true },
- { "carpetcleaningtomball.com", true },
- { "carplus.es", true },
- { "carplus.net", true },
- { "carpuya.ga", true },
- { "carrabiners.tk", true },
- { "carrando.com", true },
- { "carre-lutz.com", true },
- { "carriedin.com", true },
- { "carrierplatform.com", true },
- { "carringtonrealtygroup.com", true },
- { "carroattrezzimilanodaluiso.it", true },
- { "carroceriascarluis.com", true },
- { "cars4salecy.com", true },
- { "carshippingcarriers.com", true },
- { "carson-aviation-adventures.com", true },
- { "carson-matthews.co.uk", true },
- { "carsoug.com", true },
- { "carspneu.cz", true },
- { "cartegrise.xyz", true },
- { "carteirasedistintivos.com.br", true },
- { "carterdan.net", true },
- { "carterstad.se", true },
- { "cartertonscouts.org.nz", true },
- { "cartes-voyance.fr", true },
- { "cartesentreprises-unicef.fr", true },
- { "carthedral.com", true },
- { "cartierplan.ga", false },
- { "carto.la", true },
- { "cartongesso.roma.it", true },
- { "cartooncastles.ie", true },
- { "cartouche24.eu", true },
- { "cartucce24.it", true },
- { "cartwrightrealestate.com", true },
- { "carusorealestate.com", true },
- { "carwashdruten.nl", true },
- { "carwellness-hinkelmann.de", true },
- { "cas-chauxdefonds.ch", true },
- { "casa-app.de", true },
- { "casa-due-pur.com", true },
- { "casa-due-pur.de", true },
- { "casa-due.com", true },
- { "casa-laguna.net", true },
- { "casa-lunch-break.de", true },
- { "casa-lunchbreak.de", true },
- { "casa-mea-inteligenta.ro", true },
- { "casaasia.cat", true },
- { "casaasia.es", true },
- { "casaasia.eu", true },
- { "casabella.com.tw", true },
- { "casabouquet.com", true },
- { "casacazoleiro.com", true },
- { "casacochecurro.com", true },
- { "casadasportasejanelas.com", true },
- { "casadoarbitro.com.br", true },
- { "casadopulpo.com", true },
- { "casadowifi.com.br", true },
- { "casalindamex.com", true },
- { "casalribeiro.com", true },
- { "casalunchbreak.de", true },
- { "casamariposaspi.com", true },
- { "casamarrom.com.br", true },
- { "casamentos.com.br", true },
- { "casapalla.com.br", true },
- { "casasuara.com", true },
- { "casavacanze.estate", true },
- { "casbuijs.nl", true },
- { "casc.cz", true },
- { "cascadesjobcorpscca.com", true },
- { "cascavelle.fr", true },
- { "cascavelle.nl", true },
- { "case-vacanza-salento.com", true },
- { "casecoverkeygi.com", true },
- { "casecurity.org", true },
- { "caseificio.roma.it", true },
- { "caseof.fr", true },
- { "cases.lu", true },
- { "caseycapitalpartners.com", true },
- { "cash-4x4.com", true },
- { "cash.me", true },
- { "cash.nyc", true },
- { "cashati.com", true },
- { "cashbook.co.tz", true },
- { "cashbot.cz", true },
- { "cashbot.sk", true },
- { "cashenvoy.com", true },
- { "cashfazz.com", true },
- { "cashflowstrategist.com", true },
- { "cashforcarremovalsipswich.com.au", true },
- { "cashmaxtexas.com", true },
- { "cashontime.com", true },
- { "cashplk.com", true },
- { "casian.ir", true },
- { "casino-cash-flow.com", true },
- { "casino-cash-flow.com.ru", true },
- { "casino-cash-flow.info", true },
- { "casino-cash-flow.pro", true },
- { "casino-cash-flow.ru", true },
- { "casino-cash-flow.su", true },
- { "casino-cashflow.ru", true },
- { "casinocash-flow.ru", true },
- { "casinocashflow.pro", true },
- { "casinocashflow.ru", true },
- { "casinocashflow.su", true },
- { "casinocashflow.xyz", true },
- { "casinochecking.com", true },
- { "casinoguide.dk", true },
- { "casinolegal.pt", true },
- { "casinolistings.com", true },
- { "casinoluck.com", true },
- { "casinomucho.com", true },
- { "casinomucho.org", true },
- { "casinomucho.se", true },
- { "casinoportugal.pt", true },
- { "casinorewards.info", true },
- { "casinorobots.com", true },
- { "casinosblockchain.io", true },
- { "casinotokelau.tk", true },
- { "casio-caisses-enregistreuses.fr", true },
- { "casio.bg", true },
- { "casjenprome.cz", true },
- { "casperfirm.com", true },
- { "casperpanel.com", true },
- { "caspicards.com", true },
- { "cassimo.com", false },
- { "castbulletassoc.org", false },
- { "castelannenberg.com", true },
- { "castellet.tk", true },
- { "castelnuovo.xyz", true },
- { "castiana.xyz", true },
- { "castible.de", true },
- { "castle-engine.io", true },
- { "castlecapers.com.au", true },
- { "castleking.net", true },
- { "castlekingdomstockport.co.uk", true },
- { "castlekingkent.co.uk", true },
- { "castlepointanime.com", true },
- { "castles-in-the-sky.co.uk", true },
- { "castles4kidz.com", true },
- { "castlesrus-kent.com", true },
- { "castleswa.com.au", true },
- { "castrillodelavega.tk", true },
- { "cat.net", true },
- { "cat73.org", true },
- { "cat93.com", true },
- { "catalog-underwear.tk", true },
- { "catalog.beer", true },
- { "catalogobiblioteca.com", true },
- { "catalogobiblioteca.net", true },
- { "catalogosvirtualesonline.com", true },
- { "catalyconv.com", true },
- { "catalystapp.co", true },
- { "catbold.space", true },
- { "catbull.com", true },
- { "catchcrabs.com", true },
- { "catchers.cc", true },
- { "catchhimandkeephim.com", true },
- { "catchief.com", true },
- { "catchkol.com", true },
- { "catcoxx.de", true },
- { "catenacondos.com", true },
- { "caterbing.com", true },
- { "catering-xanadu.cz", true },
- { "cateringgoes.nl", true },
- { "cateringvanhetland.nl", true },
- { "catfooddispensersreviews.com", true },
- { "catgirl.science", true },
- { "catharinesomerville.com", true },
- { "catharisme.eu", false },
- { "cathcartandwinn.com", true },
- { "catherinejf.com", true },
- { "catherinejflee.com", true },
- { "catherinesarasin.com", true },
- { "catherinesofpartick.co.uk", false },
- { "catholic8964.org", true },
- { "catholics.dating", true },
- { "catholicteacherresources.com", true },
- { "cathosa.nl", true },
- { "cathouse.me", true },
- { "cathy.best", true },
- { "cathy.guru", true },
- { "cathy.legal", true },
- { "cathy.lgbt", true },
- { "cathy.link", true },
- { "cathy.website", true },
- { "cathyfitzpatrick.com", true },
- { "cathyjf.ca", true },
- { "cathyjf.com", true },
- { "cathyjf.net", true },
- { "cathyjf.org", true },
- { "cathyjfitzpatrick.com", true },
- { "catiadecastro.com", true },
- { "cativa.net", true },
- { "catl.st", true },
- { "catlovingcare.com", true },
- { "catmoose.ca", true },
- { "catmoz.fr", true },
- { "catprincess.com.tw", true },
- { "catram.org", true },
- { "catus.moe", true },
- { "catveteran.com", true },
- { "catvsmice.com", true },
- { "caudo.net", true },
- { "caudohay.com", true },
- { "caughtredhanded.co.nz", true },
- { "caulfieldeastapartments.com.au", true },
- { "caulfieldracecourseapartments.com.au", true },
- { "cav.ac", true },
- { "cavac.at", true },
- { "cavaleirocity.com.br", true },
- { "cave-vet-specialists.co.uk", true },
- { "cavenderhill.com", true },
- { "cavern.tv", true },
- { "cavzodiaco.com.br", true },
- { "caxalt.com", true },
- { "caycehouse.com", true },
- { "caylercapital.com", true },
- { "cazaviajes.es", true },
- { "cazes.info", true },
- { "cb-crochet.com", true },
- { "cb1388.com", true },
- { "cb1588.com", true },
- { "cbbank.com", true },
- { "cbc-hire.co.uk", true },
- { "cbcf.info", true },
- { "cbd-oil.shop", true },
- { "cbd.casa", true },
- { "cbd.supply", true },
- { "cbdmarket.space", true },
- { "cbecrft.net", true },
- { "cbin168.com", true },
- { "cbin9.com", true },
- { "cbintermountainrealty.com", true },
- { "cbnainital.org.in", true },
- { "cbr-rcb.ca", true },
- { "cbr-xml-daily.ru", true },
- { "cbsdeheidevlinder.nl", true },
- { "cbt.tj", true },
- { "cbw.sh", true },
- { "cc-customer.de", true },
- { "cc00228.com", false },
- { "cc8822.cc", true },
- { "cc98.eu.org", true },
- { "ccblicense.com", true },
- { "ccc-ch.ch", true },
- { "ccc-cloud.de", true },
- { "cccwien.at", true },
- { "ccelectricaldrafting.ca", true },
- { "cceputnam360.com", true },
- { "ccgx.de", true },
- { "cclasabana.com.co", true },
- { "ccli.com", true },
- { "ccoooss.com", true },
- { "ccparishwilmington.org", true },
- { "ccprwebsite.org", true },
- { "ccr.ovh", true },
- { "ccriderlosangeles.com", true },
- { "ccsae.org", true },
- { "ccsistema.com", true },
- { "cctv-supraveghere.ro", true },
- { "cctvsecurityjohannesburg.co.za", true },
- { "cctvview.info", true },
- { "ccu.plus", true },
- { "cd-shopware.de", true },
- { "cd-sport.com", true },
- { "cd.search.yahoo.com", false },
- { "cd5k.net", true },
- { "cda-aigle.ch", true },
- { "cdasenegal.com", true },
- { "cdasiaonline.com", false },
- { "cdbf.ch", false },
- { "cdbtech.com", true },
- { "cdburnerxp.se", true },
- { "cdda.ch", false },
- { "cdepot.eu", true },
- { "cdf.wiki", true },
- { "cdigitale.com", true },
- { "cdkeykopen.com", true },
- { "cdkeyprices.com", true },
- { "cdkeyworld.de", true },
- { "cdlinares.tk", true },
- { "cdmdisinfestazioni.it", true },
- { "cdn.ampproject.org", true },
- { "cdn6.de", true },
- { "cdncompanies.com", true },
- { "cdnjs.com", true },
- { "cdns.cloud", true },
- { "cdnsys.net", true },
- { "cdnya.com", true },
- { "cdom.de", true },
- { "cdsdigital.de", true },
- { "cdshining.com", true },
- { "cdt.org", false },
- { "cdu-gebhardshain.de", true },
- { "cdvl.org", true },
- { "ce-agentur.de", false },
- { "ce-pimkie.fr", true },
- { "ce-webdesign.de", true },
- { "ceanimalhealth.com", true },
- { "cebz.org", true },
- { "cecame.ch", true },
- { "ceciliacolombara.com", true },
- { "cecilwalker.com.au", false },
- { "cedarcitydining.com", true },
- { "cedarslodge.com", true },
- { "cedehb.be", true },
- { "cedricbonhomme.org", true },
- { "cedriccassimo.ch", false },
- { "cedriccassimo.com", false },
- { "cedricwalter.ch", true },
- { "ceebee.com", true },
- { "ceefaastresources.com", true },
- { "cefinco.org", true },
- { "cegss.org.gt", true },
- { "ceiba.com.co", true },
- { "ceiling.cloud", true },
- { "ceiphr.com", false },
- { "cejhon.cz", false },
- { "celadas.tk", true },
- { "celcomhomefibre.com.my", true },
- { "cele.bi", true },
- { "celebmasta.com", true },
- { "celebphotos.blog", true },
- { "celebrasianconference.com", true },
- { "celebrityhealthcritic.com", true },
- { "celebrityphotos.blog", true },
- { "celebritypics.club", true },
- { "celebritypics.co", true },
- { "celebrityscope.net", true },
- { "celebritytopnews.tk", true },
- { "celectro-pro.com", true },
- { "celestebonito.pt", true },
- { "celestialisms.com", true },
- { "celiac.com", true },
- { "celiendev.ch", false },
- { "celine-patisserie.fr", true },
- { "cell-lookup.com", true },
- { "cellartracker.com", true },
- { "cellebrite.com", true },
- { "celliberate.co.uk", true },
- { "celltek-server.de", false },
- { "celltesequ.com", true },
- { "celltick.com", true },
- { "celsoazevedo.com", true },
- { "celtadigital.com", true },
- { "celti.ie.eu.org", true },
- { "celti.name", true },
- { "cementscience.com", true },
- { "ceml.ch", true },
- { "cenatorium.pl", true },
- { "cendata.co.uk", true },
- { "cennelley.com", true },
- { "cennelly.com", true },
- { "censurfridns.dk", true },
- { "censurfridns.nu", true },
- { "censys.io", true },
- { "centaur.de", true },
- { "centella.tw", true },
- { "centennialradon.com", true },
- { "centennialrewards.com", true },
- { "centennialseptic.com", true },
- { "center-elite.ml", true },
- { "centermk.ru", true },
- { "centerpereezd.ru", false },
- { "centerperson.org", true },
- { "centerpoint.ovh", true },
- { "centio.bg", true },
- { "centos.cz", true },
- { "centos.tips", true },
- { "centralconvergence.com", true },
- { "centraldoencanador.com.br", true },
- { "centralebigmat.eu", true },
- { "centralegedimat.eu", true },
- { "centralheating.hu", true },
- { "centraljerseyrcca.com", true },
- { "centralmissourifoundationrepair.com", true },
- { "centralpaellera.com", true },
- { "centralpoint.be", false },
- { "centralpoint.nl", false },
- { "centralstatecu.org", true },
- { "centrationgame.com", true },
- { "centreagree.com", true },
- { "centredaccueil.fr", false },
- { "centrederessourcement.com", true },
- { "centreoeil.ch", false },
- { "centrepointorguk-dev.azurewebsites.net", true },
- { "centrobill.com", true },
- { "centrodeesteticarecife.com", true },
- { "centrojovencuenca.es", true },
- { "centrolavoro.org", true },
- { "centroperugia.gr", true },
- { "centrosocialferrel.pt", true },
- { "centrum-edukacji.tk", true },
- { "centrumhodinek.cz", true },
- { "centrumpieknairelaksu.pl", true },
- { "centruvechisv.ro", true },
- { "centsay.info", true },
- { "centsay.io", true },
- { "centsay.net", true },
- { "centsay.org", true },
- { "centsiwallet.com", true },
- { "centum.no", true },
- { "centumail.com", true },
- { "centura.de", true },
- { "centurialeonina.com", true },
- { "centurion-consulting.net", true },
- { "centurion-consulting.tech", true },
- { "centurioninfosec.com", true },
- { "centurioninfosec.com.sg", true },
- { "centurioninfosec.hk", true },
- { "centurioninfosec.sg", true },
- { "centurionunderground.com", true },
- { "centurykiaparts.com", true },
- { "centurystonedental.com", true },
- { "ceopedia.org", true },
- { "cepek4d.com", true },
- { "ceramixcoating.nl", true },
- { "ceramiya.com", true },
- { "cerastar.com", true },
- { "cerber.us", true },
- { "cerberis.com", true },
- { "cerberusinformatica.it", true },
- { "cerena-silver.ru", true },
- { "ceres-corp.org", true },
- { "cerivo.co.uk", true },
- { "cermak.photos", true },
- { "cernac.cz", true },
- { "cerpus-course.com", true },
- { "cert.ee", true },
- { "cert.govt.nz", true },
- { "certaintelligence.com", true },
- { "certbus.com", true },
- { "certcenter.com", true },
- { "certchannel.com", true },
- { "certevia.com", true },
- { "certfa.com", true },
- { "certible.com", true },
- { "certificatedetails.com", true },
- { "certificatetools.com", false },
- { "certificato-prevenzione-incendi.it", true },
- { "certificazione.it", true },
- { "certificazioni-energetiche.it", true },
- { "certifiednurses.org", true },
- { "certifix.eu", true },
- { "certisoncologysolutions.com", true },
- { "certnazionale.it", true },
- { "certspotter.com", true },
- { "certspotter.org", true },
- { "cervejista.com", true },
- { "ces-ltd.co.uk", true },
- { "cesarparedespacora.com", true },
- { "cesdb.com", true },
- { "cesipagano.com", true },
- { "ceska-polygraficka.cz", true },
- { "ceskaexpedice.org", true },
- { "ceskepivnesety.sk", true },
- { "ceskepivnisety.cz", true },
- { "ceso-saco.com", true },
- { "cesobaly.cz", true },
- { "cestasedelicias.com.br", true },
- { "cetamol.com", true },
- { "ceu.edu", false },
- { "ceverett.io", true },
- { "cevin.at", true },
- { "cevo.com.hr", true },
- { "cezdent.com", true },
- { "cf-ide.de", true },
- { "cfan.space", true },
- { "cfc-swc.gc.ca", true },
- { "cfda.gov", true },
- { "cfdcre5.org", true },
- { "cfh.com", true },
- { "cfigura.com", true },
- { "cflsystems.com", false },
- { "cfno.org", true },
- { "cfo.gov", true },
- { "cfotech.asia", true },
- { "cfotech.co.nz", true },
- { "cfotech.com.au", true },
- { "cfpa-formation.fr", true },
- { "cfrq.ca", true },
- { "cfsh.tk", true },
- { "cftc.gov", true },
- { "cftcarouge.com", false },
- { "cfxdesign.com", true },
- { "cg-goerlitz.de", true },
- { "cg-systems.hu", true },
- { "cg.al", true },
- { "cg.search.yahoo.com", false },
- { "cga.best", true },
- { "cgal.org", true },
- { "cgan.de", true },
- { "cgbassurances.ch", false },
- { "cgcookiemarkets.com", true },
- { "cgeceia.cf", true },
- { "cgf-charcuterie.com", true },
- { "cgknieuwpoort.nl", true },
- { "cgnparts.com", true },
- { "cgp.moe", true },
- { "cgpe.com", false },
- { "cgsmart.com", true },
- { "cgurtner.ch", true },
- { "ch-laborit.fr", true },
- { "ch.bzh", true },
- { "ch.search.yahoo.com", false },
- { "ch47f.com", true },
- { "chabad360.me", true },
- { "chabaudparfum.com", true },
- { "chabert-provence.fr", true },
- { "chabik.com", true },
- { "chaboisseau.net", true },
- { "chad.ch", true },
- { "chadlenz.ca", true },
- { "chadpugsley.com", true },
- { "chadstoneapartments.com.au", true },
- { "chaffeyconstruction.com", true },
- { "chaifeng.com", true },
- { "chainels.com", true },
- { "chainge-re.com", true },
- { "chaip.org", true },
- { "chairsgb.com", true },
- { "chaisystems.net", true },
- { "chaletdemontagne.org", true },
- { "chaletmanager.com", true },
- { "chaletpierrot.ch", false },
- { "chaleur.com", true },
- { "challengerinvestors.tk", true },
- { "chalupalokovka.cz", true },
- { "chambion.ch", false },
- { "champagneandcoconuts.com", true },
- { "champdogs.co.uk", true },
- { "champdogs.com", true },
- { "champicreuse.fr", true },
- { "championcastles.ie", true },
- { "champions.co", true },
- { "championsofpowerfulliving.com", true },
- { "championweb.co.nz", false },
- { "championweb.com", false },
- { "championweb.com.au", false },
- { "championweb.com.sg", false },
- { "championweb.nz", false },
- { "championweb.sg", false },
- { "champonthis.de", true },
- { "chamsochoa.com", true },
- { "chancekorte.com", true },
- { "chancekorte.net", true },
- { "change-coaching-gmbh.ch", true },
- { "changeanalytics.io", true },
- { "changeanalytics.us", true },
- { "changemywifipassword.com", true },
- { "changes.jp", true },
- { "changesfor.life", true },
- { "changinglivestoday.org", true },
- { "channellife.co.nz", true },
- { "channellife.com.au", true },
- { "channelsurf.tv", false },
- { "channydraws.com", true },
- { "chantalguggenbuhl.ch", false },
- { "chanz.com", true },
- { "chaos-games.org", true },
- { "chaos.run", true },
- { "chaoscastles.co.uk", true },
- { "chaoschemnitz.de", true },
- { "chaosdorf.de", true },
- { "chaosfield.at", true },
- { "chaosorchestra.com", true },
- { "chaospott.de", true },
- { "chaoswars.ddns.net", true },
- { "chaoswebs.net", true },
- { "chaoxi.in", true },
- { "chaoxi.org", true },
- { "chaoxi.tech", true },
- { "chapek9.com", true },
- { "chapelfordbouncers.co.uk", true },
- { "chapelhousevet.co.uk", true },
- { "chapelle.co.uk", true },
- { "chapiteauxduleman.fr", true },
- { "chaplain.co", true },
- { "charbonnel.eu", true },
- { "charcoal-se.org", true },
- { "charcoalvenice.com", true },
- { "charge.co", false },
- { "chargify.com", true },
- { "charisma.ai", true },
- { "charitylog.co.uk", true },
- { "charlenew.xyz", true },
- { "charles-darwin.com", true },
- { "charlesbwise.com", true },
- { "charlespitonltd.com", true },
- { "charlesrogers.co.uk", true },
- { "charlestonfacialplastic.com", true },
- { "charlie.im", true },
- { "charlie4change.com", true },
- { "charliedillon.com", true },
- { "charliegarrod.com", true },
- { "charliehr.com", true },
- { "charlierogers.co.uk", true },
- { "charlierogers.com", true },
- { "charlotteomnes.com", true },
- { "charlottesvillegolfcommunities.com", true },
- { "charlottesvillehorsefarms.com", true },
- { "charlotteswimmingpoolbuilder.com", true },
- { "charlylou.de", true },
- { "charmander.me", true },
- { "charmanterelefant.at", true },
- { "charmingsaul.com", true },
- { "charmyadesara.com", true },
- { "charset.org", true },
- { "charta-digitale-vernetzung.de", true },
- { "charteroak.org", true },
- { "chartkick.com", true },
- { "chartpen.com", true },
- { "chartsy.de", true },
- { "chasafilli.ch", true },
- { "chascrazycreations.com", true },
- { "chasetrails.co.uk", true },
- { "chat-house-adell.com", true },
- { "chat-porc.eu", true },
- { "chat.cz", true },
- { "chataberan.cz", true },
- { "chatbelgie.eu", true },
- { "chateau-de-lisle.fr", true },
- { "chateaudestrainchamps.com", false },
- { "chatforskning.no", true },
- { "chatgrape.com", true },
- { "chathund.de", true },
- { "chatnederland.eu", true },
- { "chatromania.ro", true },
- { "chatswoodprestige.com.au", true },
- { "chatsworthelectrical.com", true },
- { "chattanoogaface.com", true },
- { "chattergalerie.eu", true },
- { "chattergallery.com", true },
- { "chattersworld.nl", true },
- { "chattingorcheating.com", true },
- { "chatu.io", true },
- { "chatu.me", true },
- { "chatucomputers.com", true },
- { "chaturbate.com", true },
- { "chaturbate.com.tw", true },
- { "chaturbates.org", true },
- { "chatxp.com", true },
- { "chatzimanolis.com", true },
- { "chatzimanolis.gr", true },
- { "chauffage-budget.fr", true },
- { "chaurocks.com", true },
- { "chaussenot.net", true },
- { "chaussurerunning.fr", true },
- { "chaussuresmarche.fr", true },
- { "chavetaro.com", true },
- { "chawa.jp", true },
- { "chazalet.fr", false },
- { "chbs.me", true },
- { "chch.it", true },
- { "chcheaptech.nz", true },
- { "chcoc.gov", true },
- { "chcsct.com", true },
- { "chcuscojungle.com", true },
- { "chd-expert.fr", true },
- { "cheap-colleges.com", true },
- { "cheap-life-insurance-quote.com", true },
- { "cheapcaribbean.com", true },
- { "cheapessay.net", true },
- { "cheapestgamecards.at", true },
- { "cheapestgamecards.co.uk", true },
- { "cheapestgamecards.com", true },
- { "cheapgeekts.com", false },
- { "cheapgoa.com", true },
- { "cheapiesystems.com", true },
- { "cheapsmall.tk", true },
- { "cheapsslrenewal.com", true },
- { "cheapsslsecurity.com.au", true },
- { "cheapsslsecurity.com.ph", true },
- { "cheapticket.in", true },
- { "cheapwritinghelp.com", true },
- { "cheapwritingservice.com", true },
- { "cheatengine.pro", true },
- { "cheater.best", true },
- { "cheatsupreme.com", true },
- { "cheazey.net", true },
- { "cheazey.org", true },
- { "check.torproject.org", false },
- { "checkandreportlive.com", true },
- { "checkblau.de", true },
- { "checkmatewebsolutions.com", true },
- { "checkmin.cf", true },
- { "checkmyessay.com", true },
- { "checkmyhttps.net", true },
- { "checkout.google.com", true },
- { "checkpoint-tshirt.com", true },
- { "checkra.in", true },
- { "checkrent.ir", true },
- { "checkspf.net", true },
- { "checktech.group", true },
- { "checktype.com", true },
- { "checkui.com", true },
- { "checkwebsiteonline.com", true },
- { "checkyourmath.com", true },
- { "checkyourprivilege.org", true },
- { "checkyourreps.org", true },
- { "checos.co.uk", true },
- { "cheddarpayments.com", true },
- { "cheekycharliessoftplay.co.uk", true },
- { "cheekymonkeysinflatables.co.uk", true },
- { "cheela.org", true },
- { "cheem.co.uk", true },
- { "cheeseemergency.co.uk", true },
- { "cheetahwerx.com", true },
- { "cheezflix.uk", true },
- { "chefcuisto.com", true },
- { "chefkoch.de", true },
- { "chefpablito.tk", true },
- { "chefz.co", true },
- { "chehalemgroup.com", true },
- { "cheladmin.ru", true },
- { "chelpogoda.tk", true },
- { "chelseafs.co.uk", true },
- { "cheltenhambouncycastles.co.uk", true },
- { "cheltik.ru", true },
- { "chelyaba.tk", true },
- { "chemco.mu", true },
- { "chemicalpharm.com", true },
- { "chemiphys.com", false },
- { "chemistry-schools.com", true },
- { "chemolak.pl", true },
- { "chenapartment.com", true },
- { "cheneypartners.com", true },
- { "chengbet.net", true },
- { "chengfayun.com", true },
- { "chengxindong.com", true },
- { "chenky.com", true },
- { "chenna.me", true },
- { "chennien.com", true },
- { "chenqinghua.com", true },
- { "chentianyi.cn", true },
- { "chenx2210.xyz", true },
- { "chenzhekl.me", true },
- { "chenzhipeng.com.cn", true },
- { "cheque-transitionactive.fr", true },
- { "cheraghestan.com", true },
- { "cherhenri.com", true },
- { "cherie-belle.com", true },
- { "chernyak.id.au", true },
- { "cherry-green.ch", true },
- { "cherrybread.net", true },
- { "cherryonit.com", false },
- { "cherrywoodtech.com", true },
- { "chertseybouncycastles.co.uk", true },
- { "chesapeakebaychristmas.com", true },
- { "chess.com", true },
- { "chessboardao.com", true },
- { "chesskid.com", true },
- { "chesspoint.ch", true },
- { "chestercountypediatrics.com", true },
- { "chestercountyroboticsurgery.com", true },
- { "chesterfieldplaceapartmentsstl.com", true },
- { "chetanrana.me", true },
- { "chetwood.se", true },
- { "chevy37.com", true },
- { "chevymotor-occasions.be", false },
- { "chewey.de", true },
- { "chewey.org", true },
- { "chewingucand.com", true },
- { "chez-oim.org", true },
- { "chezbernard.tk", true },
- { "chfr.search.yahoo.com", false },
- { "chhlin.com", true },
- { "chhory.com", true },
- { "chhy.at", true },
- { "chiangmaimontessori.com", true },
- { "chianti2002.jp", true },
- { "chiaseeds24.com", true },
- { "chiavistello.it", true },
- { "chiboard.co", true },
- { "chiboost.net", true },
- { "chibr.eu", true },
- { "chic-leather.com", true },
- { "chicagobreastaugdrs.com", true },
- { "chicagoemergencyclosings.com", true },
- { "chicagofinancesupperclub.com", true },
- { "chicagolug.org", false },
- { "chicback.com", true },
- { "chicisimo.com", true },
- { "chicjrajeevalochana.com", true },
- { "chicofc.tk", true },
- { "chicolawfirm.com", true },
- { "chicourologist.com", true },
- { "chicurrichi.com", true },
- { "chiemgauflirt.de", true },
- { "chif16.at", true },
- { "chifumi.net", true },
- { "chika.kr", false },
- { "chikazawa.info", true },
- { "chilbert.co", true },
- { "childcare.gov", true },
- { "childcounseling.org", true },
- { "childcustodylegalaid.org", true },
- { "childhr.org.au", true },
- { "childno.de", true },
- { "childrenandmedia.org.au", true },
- { "childrenfirstalways.org", true },
- { "childreninadversity.gov", true },
- { "childrens-room.com", true },
- { "childrenschoicepearland.com", true },
- { "childrensentertainmentleicester.co.uk", true },
- { "childrensfurniture.co.uk", true },
- { "childstats.gov", true },
- { "childvisitationassistance.org", true },
- { "chiledogphoto.com", true },
- { "chilihosting.eu", true },
- { "chilikin.pro", true },
- { "chilimath.com", false },
- { "chilio.net", true },
- { "chilliwackchurchofgod.com", true },
- { "chima.net", true },
- { "chima.us", true },
- { "chimeratool.com", true },
- { "chimerity.com", true },
- { "chimm.cc", true },
- { "chimpanzee.net", true },
- { "chimpmatic.com", true },
- { "china-online-news.tk", true },
- { "chinahighlights.ru", true },
- { "chinasa.net", true },
- { "chinaspaceflight.com", true },
- { "chinefrancophonie.fr", true },
- { "chinesemedicine.be", true },
- { "chineserecipes.xyz", true },
- { "ching.tv", true },
- { "chinookdigital.ca", true },
- { "chinwag.im", true },
- { "chinwag.org", true },
- { "chip.pl", true },
- { "chipcore.com", false },
- { "chipdig.com", true },
- { "chipollinko.com.ua", true },
- { "chippy.ch", false },
- { "chipset.no", true },
- { "chiralsoftware.com", true },
- { "chireiden.net", true },
- { "chiro-neuchatel.ch", false },
- { "chiropractic.gr", true },
- { "chiropraktik-riemann.de", true },
- { "chiropraticien-neuchatel.ch", false },
- { "chiropratique-neuchatel.ch", false },
- { "chirosphere.ch", false },
- { "chirpstory.com", true },
- { "chirr.space", true },
- { "chiru.no", true },
- { "chirurgoplastico.roma.it", true },
- { "chisago-isantidfl.com", true },
- { "chit.search.yahoo.com", false },
- { "chita.com.br", true },
- { "chitoku.jp", false },
- { "chizipoms.com", true },
- { "chk-ccs.com", true },
- { "chksite.com", true },
- { "chl.la", true },
- { "chliine.ch", true },
- { "chlo-products.biz", true },
- { "chlo-products.net", true },
- { "chloes.gr", true },
- { "chloescastles.co.uk", true },
- { "chlth.com", true },
- { "chmielarz.it", true },
- { "chmsoft.com.ua", true },
- { "chmsoft.ru", true },
- { "chocgu.com", true },
- { "chocodecor.com.br", true },
- { "chocolah.com.au", false },
- { "chocolat.work", true },
- { "chocolatesandhealth.com", true },
- { "chocolatier-tristan.ch", false },
- { "chocolytech.info", true },
- { "chocope-peru.tk", true },
- { "chodaczek.pl", true },
- { "chomp.life", true },
- { "chook.as", true },
- { "choootto.net", true },
- { "choosemypc.net", true },
- { "chopchat.com", true },
- { "chopperdesign.com", true },
- { "chordify.net", true },
- { "chorpinkpoemps.de", true },
- { "chosenplaintext.org", true },
- { "choservices.com", true },
- { "chourishi-shigoto.com", true },
- { "chovancova.sk", true },
- { "choyri.com", true },
- { "chpwmedicare.org", true },
- { "chr1sbin.works", true },
- { "chris-siedler.at", true },
- { "chrisahrweileryoga.com", true },
- { "chrisaitch.com", true },
- { "chrisbryant.me.uk", true },
- { "chrisburnell.com", true },
- { "chriscampdesigns.com", true },
- { "chriscarey.com", true },
- { "chriscutts.uk", true },
- { "chrisdecairos.ca", true },
- { "chrisgieger.com", true },
- { "chrisirwin.ca", true },
- { "chrislane.com", true },
- { "chrismarker.org", true },
- { "chrismathys.com", true },
- { "chrismcclendon.com", true },
- { "chrismckee.co.uk", true },
- { "chrismorgan.info", true },
- { "chrismurrayfilm.com", true },
- { "chrisnekarda.com", true },
- { "chrisplankhomes.com", true },
- { "chrispstreet.com", true },
- { "chrisseoguy.com", true },
- { "chrisshort.net", true },
- { "chrissmiley.co.uk", true },
- { "chrisspencercreative.com", true },
- { "chrisspencermusic.com", true },
- { "christadelphians.eu", true },
- { "christec.net", true },
- { "christensenplace.us", true },
- { "christiaanconover.com", true },
- { "christian-fischer.pictures", true },
- { "christian-folini.ch", true },
- { "christian-gredig.de", true },
- { "christian-host.com", true },
- { "christian-liebel.com", true },
- { "christian-oette.de", true },
- { "christian-stadelmann.de", true },
- { "christianadventurecamps.org", true },
- { "christianblog.ml", true },
- { "christianbsl.com", true },
- { "christiancleva.com", true },
- { "christiancoleman.info", true },
- { "christiandiscourse.net", true },
- { "christianfaq.org", true },
- { "christianforums.com", true },
- { "christiangehring.org", true },
- { "christianhamacher.de", true },
- { "christianillies.de", true },
- { "christianliebel.com", true },
- { "christianlis.org.uk", true },
- { "christianlis.uk", true },
- { "christianmoore.me", true },
- { "christianoliff.com", true },
- { "christianr.me", true },
- { "christianrasch.de", true },
- { "christians.dating", true },
- { "christianscholz.de", false },
- { "christianwitts.tech", true },
- { "christiehawkes.com", true },
- { "christiesantiques.com", true },
- { "christineandcie.fr", true },
- { "christineblachford.com", true },
- { "christineprayon.de", true },
- { "christmascard.be", true },
- { "christmaspartyhire.co.uk", true },
- { "christoph-conrads.name", true },
- { "christopher-simon.de", true },
- { "christopher.sh", false },
- { "christopherandcharlotte.uk", true },
- { "christopherburg.com", true },
- { "christopherd.me", true },
- { "christopherkennelly.com", true },
- { "christopherstocks.online", true },
- { "christophertruncer.com", true },
- { "christophsackl.de", true },
- { "christthekingparish.net", true },
- { "christtheredeemer.us", true },
- { "chriswald.com", true },
- { "chriswarrick.com", true },
- { "chriswells.io", true },
- { "chriswilding.co.uk", true },
- { "chrisx.xyz", true },
- { "chromaitaly.com", true },
- { "chromcraft-revington.com", true },
- { "chrome-devtools-frontend.appspot.com", true },
- { "chrome.com", false },
- { "chrome.google.com", true },
- { "chromebookchart.com", true },
- { "chromebooksforwork.com", true },
- { "chromereporting-pa.googleapis.com", true },
- { "chromiumbugs.appspot.com", true },
- { "chromiumcodereview.appspot.com", false },
- { "chromopho.be", true },
- { "chroniclesofgeorge.com", true },
- { "chronograph.pe", true },
- { "chronology.no", true },
- { "chronosgroup.eu", true },
- { "chronoshop.cz", true },
- { "chrpaul.de", true },
- { "chrstn.eu", true },
- { "chrxw.com", true },
- { "chrysanthos.net", true },
- { "chrystajewelry.com", true },
- { "chrystus.pl", true },
- { "chshealthcare.co.uk", true },
- { "chshouyu.com", true },
- { "chsterz.de", true },
- { "chtsi.uk", true },
- { "chuchote-moi.fr", true },
- { "chuck.ovh", false },
- { "chuill.com", true },
- { "chukwunyere-chambers.org", true },
- { "chun.pro", true },
- { "chun.si", true },
- { "chunche.net", true },
- { "chungsir.com.pa", true },
- { "chunk.science", true },
- { "chupadelfrasco.com", true },
- { "chupanhcotrang.com", true },
- { "chuppa.com.au", true },
- { "churchofsaintbenedict.com", true },
- { "churchofsaintrocco.org", true },
- { "churchofscb.org", true },
- { "churchthemes.com", true },
- { "churchwebcanada.ca", true },
- { "churchwebsupport.com", true },
- { "churningtracker.com", true },
- { "chus-plongee.fr", true },
- { "chwilrank.pl", true },
- { "chyen.cc", true },
- { "chytraauta.cz", true },
- { "chziyue.com", true },
- { "ci-fo.org", true },
- { "ci-suite.com", true },
- { "ciagutek.pl", true },
- { "cialde.it", true },
- { "cialisonlinee.com", true },
- { "ciancode.com", true },
- { "cianmawhinney.me", true },
- { "ciat.no", false },
- { "cibdol.com", true },
- { "cibercactus.com", true },
- { "cichlid-world.com", true },
- { "cichol.com", true },
- { "ciclimattio.com", true },
- { "cidadedossonhos.org", true },
- { "cidbot.com", true },
- { "ciderclub.com", true },
- { "cidersus.com.ec", true },
- { "cie-theatre-montfaucon.ch", false },
- { "cielly.com", true },
- { "cierreperimetral.com", true },
- { "cifapme.net", true },
- { "cifop-numerique.fr", true },
- { "cig-dem.com", false },
- { "cigar-cartel.com", true },
- { "cigarterminal.com", false },
- { "cihar.com", true },
- { "ciicutini.ro", true },
- { "cikeblog.com", true },
- { "cilacapnews.ml", true },
- { "cilloc.be", true },
- { "cima-idf.fr", true },
- { "cimbalino.org", true },
- { "cimballa.com", true },
- { "cimfax.com", true },
- { "cimtools.net", true },
- { "cinafilm.com", true },
- { "cine-music.de", true },
- { "cine.to", true },
- { "cinefilzonen.se", true },
- { "cinema.paris", true },
- { "cinemarxism.com", true },
- { "cinemasetfree.com", true },
- { "cinematherapy.org", true },
- { "cinemixer.club", true },
- { "cinemysticism.com", true },
- { "cinenote.link", true },
- { "cineplex.my", true },
- { "cineworld.co.in", true },
- { "cinexmachina.com", true },
- { "ciniticket.com", true },
- { "cinkciarz.pl", true },
- { "cinq-elements.com", false },
- { "cinsects.de", true },
- { "cintactimber.com", true },
- { "cio-ciso-interchange.org", true },
- { "cio-cisointerchange.org", true },
- { "cio.go.jp", false },
- { "cio.gov", false },
- { "cioscloud.com", true },
- { "cipartyhire.co.uk", true },
- { "cipher.team", true },
- { "cipherboy.com", true },
- { "cipherli.st", false },
- { "ciphersuite.info", true },
- { "ciphrex.com", true },
- { "cipri.com", true },
- { "cipri.net", true },
- { "cipri.nl", true },
- { "cipri.org", true },
- { "cipria.no", true },
- { "cipy.com", true },
- { "cir.is", true },
- { "circady.com", true },
- { "circara.com", true },
- { "circle-people.com", true },
- { "circu.ml", true },
- { "circulatedigital.com", true },
- { "circulosocial77.com", true },
- { "circumstances.ir", true },
- { "circus-maximus.de", true },
- { "ciri.com.co", true },
- { "cirrus0.de", true },
- { "cirruslab.ch", true },
- { "cirurgicagervasio.com.br", true },
- { "cirurgicalucena.com.br", true },
- { "cirurgicavirtual.com.br", true },
- { "cirvapp.com", true },
- { "cisa.gov", true },
- { "ciscodude.net", true },
- { "cisoaid.com", true },
- { "cisofy.com", true },
- { "cispeo.org", true },
- { "ciss.ltd", true },
- { "cissa.org.au", true },
- { "cissofitness.com", true },
- { "cisum-cycling.com", true },
- { "cisy.me", true },
- { "citace.com", true },
- { "citacepro.com", true },
- { "citas-adultas.com", true },
- { "citationranker.com", true },
- { "citcuit.in", true },
- { "citfin.cz", true },
- { "cities.cl", true },
- { "citimarinestore.com", true },
- { "citizenkevin.com", true },
- { "citizensbankal.com", true },
- { "citizenscience.gov", false },
- { "citizenscience.org", true },
- { "citizensgbr.org", true },
- { "citizensleague.org", true },
- { "citizing.org", true },
- { "citrusui.me", true },
- { "citsc.de", true },
- { "cittadesign.com", false },
- { "citton.com.br", true },
- { "city-walks.info", true },
- { "citybeat.de", true },
- { "citycreek.studio", true },
- { "citydance.ee", true },
- { "cityfloorsupply.com", true },
- { "citykohviteek.ee", true },
- { "citylift.com.ua", true },
- { "citylights.eu", true },
- { "citymoobel.ee", true },
- { "cityoftitans.com", true },
- { "cityoftitansmmo.com", true },
- { "citypro.tk", true },
- { "cityradiusmaps.com", true },
- { "citysportapp.com", false },
- { "citywidealarms.com", true },
- { "citywisdom.tk", true },
- { "cityworksonline.com", true },
- { "civey.com", true },
- { "civicamente.cl", true },
- { "civicforum.pl", true },
- { "civics.us", true },
- { "civilbikes.com", true },
- { "civilg20.org", true },
- { "civillines.nl", true },
- { "civiltoday.com", true },
- { "civmob.com", true },
- { "cj-espace-vert.fr", true },
- { "cj-jackson.com", true },
- { "cjbeckert.com", false },
- { "cjdby.net", true },
- { "cjdpenterprises.com", true },
- { "cjdpenterprises.com.au", true },
- { "cjean.fr", true },
- { "cjenni.ch", true },
- { "cjey.me", true },
- { "cjhzp.net", true },
- { "cjpsrilanka.lk", true },
- { "cjr.host", true },
- { "cjsounds.com", true },
- { "ck.cx", true },
- { "ckenel.com", true },
- { "ckenell.com", true },
- { "ckenelley.com", true },
- { "ckenelly.com", true },
- { "ckenely.com", true },
- { "ckennel.com", true },
- { "ckenneley.com", true },
- { "ckennell.com", true },
- { "ckennelley.com", true },
- { "ckennelly.com", true },
- { "ckennely.com", true },
- { "ckleemann.de", true },
- { "cklie.de", true },
- { "ckliemann.com", true },
- { "ckliemann.net", true },
- { "ckna.ca", true },
- { "ckostecki.de", true },
- { "ckp.ie", true },
- { "ckp.io", true },
- { "ckpl.us", true },
- { "cktennis.com", true },
- { "ckventura.sk", true },
- { "cl.search.yahoo.com", false },
- { "claimconnect.com", true },
- { "claimconnect.us", true },
- { "claimflights.at", true },
- { "claimflights.co.uk", false },
- { "claimflights.com", false },
- { "claimflights.de", false },
- { "claimflights.it", false },
- { "claimflights.pl", false },
- { "claimflights.ro", false },
- { "claimjeidee.be", true },
- { "claimnote.com", true },
- { "claimspharmacy.services", true },
- { "clairegold.com", true },
- { "clairelefort-architectes.com", true },
- { "clairescastles.co.uk", true },
- { "clairette-de-die-lantheaume.fr", true },
- { "claitec.com", true },
- { "clan-hosting.tk", true },
- { "clan-wars.ml", true },
- { "clan-zone.dk", true },
- { "clanebouncycastles.com", true },
- { "clanrose.org.uk", true },
- { "clanwarz.com", true },
- { "clare3dx.com", true },
- { "claretvillans.com", true },
- { "clarkelectricalservices.com.au", true },
- { "clarkwinkelmann.com", true },
- { "clase3.tk", true },
- { "clash.lol", true },
- { "class.com.au", true },
- { "classdojo.com", true },
- { "classic-yacht-charters.com", true },
- { "classicalpilates.ca", true },
- { "classicfg.com.au", true },
- { "classics.io", true },
- { "classictheatrecumbria.co.uk", true },
- { "classpoint.cz", true },
- { "classroom.google.com", true },
- { "classroomconductor.com", true },
- { "classroomcountdown.co.nz", true },
- { "classteaching.com.au", true },
- { "claster.it", true },
- { "claude.me", true },
- { "claude.photo", true },
- { "claudeleveille.com", true },
- { "claudia-makeup.com", true },
- { "claudia-urio.com", false },
- { "claudiney.eti.br", true },
- { "claudiney.id", true },
- { "claudiney.info", true },
- { "claudiolemos.com", true },
- { "claumarservice.com", true },
- { "claus-bahr.de", true },
- { "clauseriksen.net", true },
- { "clausewitz-gesellschaft.de", true },
- { "clav1d.com", true },
- { "clawe.de", true },
- { "clawhammer.dk", true },
- { "clayandcottonkirkwood.com", true },
- { "claygregory.com", true },
- { "clayprints.com", true },
- { "clazzrooms.com", true },
- { "cldejessey.com", true },
- { "cldinc.com", true },
- { "cldly.com", true },
- { "clean-mailbox.com", true },
- { "cleanapproachnw.com", true },
- { "cleanbrowsing.org", true },
- { "cleandetroit.org", true },
- { "cleandogsnederland.nl", true },
- { "cleango.pl", true },
- { "cleanhouse2000.us", true },
- { "cleaningservicejulai.com", true },
- { "cleaningsolutionn.com", true },
- { "cleanplanet.co.jp", true },
- { "clearance365.co.uk", true },
- { "clearblueday.co.uk", true },
- { "clearbooks.co.uk", true },
- { "clearbookscdn.uk", true },
- { "clearbreezesecuritydoors.com.au", true },
- { "clearip.com", true },
- { "clearlinux.org", true },
- { "clearpay.co.uk", true },
- { "clearsense.com", true },
- { "clearspringinsurance.com", true },
- { "clearview-creative.com", true },
- { "clearvoice.com", true },
- { "clearvoice1.com", true },
- { "clearwaterbidets.com", false },
- { "cleary.xyz", true },
- { "clemency.com", true },
- { "clemens-bartz.de", true },
- { "clemensbartz.de", true },
- { "clemenscompanies.com", true },
- { "clement-beaufils.fr", true },
- { "cles-asso.fr", true },
- { "cles.jp", true },
- { "cleveille.com", true },
- { "clevermatch.com", true },
- { "cleveroad.com", true },
- { "clevertarget.ru", true },
- { "clevisto.com", true },
- { "clevvi.com.au", true },
- { "cleysense.com", true },
- { "clica.net", true },
- { "clicandfioul.com", true },
- { "clicheshishalounge.co.uk", true },
- { "click-licht.de", true },
- { "click2order.co.uk", true },
- { "clickalphaville.com.br", true },
- { "clickbasin.co.uk", true },
- { "clickclickphish.com", true },
- { "clickempresarialgroup.com", true },
- { "clickenergy.com.au", true },
- { "clickingmad.com", true },
- { "clien.net", true },
- { "client.coach", false },
- { "clientboss.com", true },
- { "clientcms.co.uk", true },
- { "clientesendemanda.com", true },
- { "clientportal.com", true },
- { "clientsecure.me", true },
- { "cliffbreak.de", true },
- { "cliffburton.tk", true },
- { "clifflu.net", true },
- { "cliffyb.com", true },
- { "climaprecio.es", true },
- { "climateinteractive.org", true },
- { "climatestew.com", true },
- { "climatgate.tk", true },
- { "climatizzatore.roma.it", true },
- { "clindoeilmontagne.com", false },
- { "clinicaarques.es", true },
- { "clinicadentalados.com", true },
- { "clinicadentalvinateros.es", true },
- { "clinicainfinitydental.com", true },
- { "clinicalrehabilitation.info", true },
- { "clinicaltrialpodcast.com", true },
- { "clinicaltrials.gov", true },
- { "clinicamiracueto.com", true },
- { "clinicasmedicas.com.br", true },
- { "clinicminds.com", true },
- { "clinicos.cl", true },
- { "cliniko.com", true },
- { "clinique-ser.ca", true },
- { "cliniquevethuy.be", true },
- { "clintonlibrary.gov", true },
- { "clio.health", true },
- { "clip.ovh", true },
- { "clipchamp.com", true },
- { "clipclip.com", true },
- { "clippingpathsupport.com", true },
- { "clippings.com", true },
- { "cliqz.com", true },
- { "clive.io", true },
- { "clmde.de", true },
- { "clnc.to", true },
- { "clnlboard.co.uk", true },
- { "clnnet.ch", true },
- { "clo.me", true },
- { "clockcaster.com", true },
- { "clocklab.design", true },
- { "clockworksms.com", true },
- { "clomid100mg.ga", true },
- { "cloneuniverse.com", true },
- { "clorophilla.net", true },
- { "closecross.com", true },
- { "closeli.cn", true },
- { "closelinksecurity.co.uk", true },
- { "closelinksecurity.com", true },
- { "closetemail.com", true },
- { "closoltech.com", true },
- { "cloud-screen.com", true },
- { "cloud-surfer.net", false },
- { "cloud.bugatti", true },
- { "cloud.fail", true },
- { "cloud.google.com", true },
- { "cloud.gov", true },
- { "cloud10.io", true },
- { "cloud255.com", true },
- { "cloud42.ch", false },
- { "cloud9bouncycastlehire.com", true },
- { "cloud9vets.co.uk", true },
- { "cloudapps.digital", true },
- { "cloudboard.fr", true },
- { "cloudbolin.es", true },
- { "cloudbrothers.info", true },
- { "cloudcaprice.net", true },
- { "cloudcert.org", true },
- { "cloudcite.net", true },
- { "cloudcloudcloud.cloud", true },
- { "cloudclouds.com", true },
- { "cloudcrux.net", true },
- { "clouddesk.co.uk", true },
- { "clouddog.com.br", true },
- { "cloudeezy.com", true },
- { "cloudey.net", true },
- { "cloudfiles.at", true },
- { "cloudflare-dns.com", true },
- { "cloudflare.com", true },
- { "cloudflareonazure.com", true },
- { "cloudhoreca.com", true },
- { "cloudia.org", true },
- { "cloudily.com", true },
- { "cloudindex.io", true },
- { "cloudix.cf", true },
- { "cloudkeep.nl", true },
- { "cloudlessdreams.com", false },
- { "cloudlight.biz", false },
- { "cloudninelandscapedesign.com", true },
- { "cloudnote.cc", true },
- { "cloudns.net", true },
- { "cloudofertas.com.br", true },
- { "cloudoptimizedsmb.com", true },
- { "cloudoptimus.com", true },
- { "cloudpengu.in", true },
- { "cloudpipes.com", true },
- { "cloudpole.de", true },
- { "cloudsavvyit.com", true },
- { "cloudse.co.uk", true },
- { "cloudsecurityalliance-europe.org", true },
- { "cloudsecurityalliance.org", true },
- { "cloudsecurityalliancelabs.com", true },
- { "cloudsecuritycongress.org", true },
- { "cloudservice.io", true },
- { "cloudservices.nz", false },
- { "cloudsign.jp", true },
- { "cloudspace-analytics.com", true },
- { "cloudspire.net", true },
- { "cloudsters.nl", false },
- { "cloudtocloud.tk", true },
- { "cloudtropia.de", true },
- { "cloudturing.chat", true },
- { "cloudup.com", true },
- { "cloudzentechnologies.com", true },
- { "clouz.de", true },
- { "cloveros.ga", true },
- { "clovertwo.com", true },
- { "clownday.co.uk", true },
- { "clownindeklas.nl", true },
- { "cloxy.com", true },
- { "cloze.com", true },
- { "clsfoundationrepairandwaterproofing.com", true },
- { "clsimage.com", true },
- { "clsoft.ch", true },
- { "clu-in.org", true },
- { "club-adulti.ro", true },
- { "club-climate.com", true },
- { "club-creole.com", true },
- { "club-dieta.ru", true },
- { "club-duomo.com", true },
- { "club-eclipse.tk", true },
- { "club-jose.com", true },
- { "club-leondehuanuco.tk", true },
- { "club-premiere.com", true },
- { "club-slow.jp", true },
- { "club-yy.com", true },
- { "club.zj.cn", true },
- { "club103.ch", false },
- { "club10x.com", true },
- { "clubapk.com", true },
- { "clubatleticonacionalpotosi.tk", true },
- { "clubcorsavenezuela.com", false },
- { "clubdelzapato.com", true },
- { "clubdeportivocieza.tk", true },
- { "clubefiel.com.br", true },
- { "clubegolfpt.com", true },
- { "clubempleos.com", true },
- { "clubeohara.com", true },
- { "cluberiks.ga", true },
- { "clubfamily.de", true },
- { "clubmarina.store", true },
- { "clubmini.jp", true },
- { "clubnoetig-ink2g.de", true },
- { "clubon.com.tw", true },
- { "clubon.space", true },
- { "clubportside.nl", true },
- { "clubtamarugal.tk", true },
- { "cluster.biz.tr", true },
- { "cluster446.fr", true },
- { "clusterfuck.nz", true },
- { "clutch.ua", true },
- { "clwrota.com", true },
- { "cm-loures.pt", true },
- { "cmacacias.ch", true },
- { "cmadeangelis.it", true },
- { "cmavs.com", true },
- { "cmc.pt", true },
- { "cmcressy.ch", true },
- { "cmdline.org", true },
- { "cme-colleg.de", true },
- { "cmfaccounting.com", false },
- { "cmgacheatcontrol.com", true },
- { "cmillrehab.com", true },
- { "cmlachapelle.ch", true },
- { "cmlancy.ch", true },
- { "cmlignon.ch", true },
- { "cmn-group.com", true },
- { "cmn-groupe.com", true },
- { "cmngroup.com", true },
- { "cmngroupe.com", true },
- { "cmplainpalais.ch", true },
- { "cmpsc.uk", true },
- { "cmshangu.com", true },
- { "cmskakuyasu.info", true },
- { "cmskeyholding.co.uk", true },
- { "cmskeyholding.com", true },
- { "cmsua.ca", true },
- { "cmv.gr", true },
- { "cmylife.nl", true },
- { "cn.search.yahoo.com", false },
- { "cn8522.com", true },
- { "cna5.cc", true },
- { "cna5.net", true },
- { "cna5.org", true },
- { "cnam-idf.fr", true },
- { "cnbibo.com", true },
- { "cnbs.ch", true },
- { "cnc-lehrgang.de", true },
- { "cncado.net", true },
- { "cncbazar365.com", true },
- { "cncrans.ch", false },
- { "cncs.gov.pt", true },
- { "cni-certing.it", true },
- { "cnitdog.com", true },
- { "cnre.eu", true },
- { "cnss.io", true },
- { "cnvt.fr", true },
- { "cnymenshealth.com", true },
- { "co-founder-stuttgart.de", true },
- { "co.search.yahoo.com", false },
- { "co50.com", true },
- { "coa.one", true },
- { "coachbakery.com", true },
- { "coachezmoi.ch", false },
- { "coachfederation.ro", true },
- { "coaching-harmonique.fr", true },
- { "coaching-impulse.ch", false },
- { "coaching-park.fr", true },
- { "coachsystem.ru", true },
- { "coalitionministries.org", true },
- { "coalpointcottage.com", true },
- { "coastalurgentcarebatonrouge.com", true },
- { "coastalurgentcarebossier.com", true },
- { "coastalurgentcaregonzales.com", true },
- { "coastalurgentcarehouma.com", true },
- { "coastalurgentcareruston.com", true },
- { "coastalurgentcarethibodaux.com", true },
- { "coastline.net.au", true },
- { "coastmedicalservice.com", true },
- { "coathangastrangla.com", true },
- { "coathangastrangler.com", true },
- { "coathangerstrangla.com", true },
- { "coathangerstrangler.com", true },
- { "coatsandcocktails.org", true },
- { "cobalt.io", true },
- { "cobaltgp.com", true },
- { "cobaltis.co.uk", true },
- { "cobracastles.co.uk", true },
- { "cocaine.ninja", true },
- { "cocalc.com", true },
- { "cocareonline.com", true },
- { "coccolebenessere.it", true },
- { "cocinoyo.com", true },
- { "cock.li", false },
- { "cockfile.com", true },
- { "cockybot.com", true },
- { "coco-line.ch", true },
- { "cocoa-job.jp", true },
- { "cocoamexico.com", true },
- { "cocodroid.com", true },
- { "coconutoil24.com", true },
- { "cocoscastles.co.uk", true },
- { "cocounty.org", true },
- { "cocquyt-usedcars.be", false },
- { "coda.io", true },
- { "coda.moe", true },
- { "coda.today", true },
- { "coda.world", true },
- { "codabix.com", true },
- { "codabix.de", true },
- { "code-maze.com", true },
- { "code-poets.co.uk", true },
- { "code-vikings.de", true },
- { "code-well.com", true },
- { "code.facebook.com", false },
- { "code.fm", true },
- { "code.google.com", true },
- { "code.taxi", true },
- { "code123.eu", true },
- { "code4.hk", true },
- { "code67.com", true },
- { "codeandpeace.com", true },
- { "codeandsupply.co", true },
- { "codebitel.com", true },
- { "codebrahma.com", false },
- { "codebrew.com.au", true },
- { "codedelarouteenligne.fr", true },
- { "codedo.info", true },
- { "codedump.net", true },
- { "codedynasty.com", true },
- { "codeeclipse.com", true },
- { "codeferm.com", true },
- { "codefordus.nrw", true },
- { "codeguard.xyz", true },
- { "codehz.one", true },
- { "codeidea.ga", true },
- { "codein.ca", false },
- { "codeine.co.uk", true },
- { "codeit.guru", true },
- { "codeit.us", true },
- { "codejots.com", true },
- { "codelei.fr", true },
- { "codelyoko.club", true },
- { "codemill.se", true },
- { "codemonster.eu", true },
- { "codenode.io", true },
- { "codeofthenorth.com", true },
- { "codepoints.net", true },
- { "codepref.com", true },
- { "codereview.appspot.com", false },
- { "codereview.chromium.org", false },
- { "coderscripts.com", true },
- { "coderware.co.uk", true },
- { "codes.pk", true },
- { "codesgroup.tk", true },
- { "codesport.io", true },
- { "codespromo.be", true },
- { "codestudies.net", true },
- { "codetheworld.com", true },
- { "codetipi.com", true },
- { "codetripping.net", true },
- { "codeux.com", true },
- { "codeux.info", true },
- { "codeux.net", true },
- { "codevat.com", true },
- { "codeventure.de", true },
- { "codeversetech.com", true },
- { "codexpert.my", true },
- { "codexpo.net", true },
- { "codeyellow.nl", true },
- { "codific.com", true },
- { "codigodelbonusbet365.com", true },
- { "codigomillonario.com", true },
- { "coding-minds.com", true },
- { "coding.lv", true },
- { "codingblog.org", true },
- { "codingforspeed.com", true },
- { "codinginfinity.me", true },
- { "codingrobots.com", true },
- { "codista.com", true },
- { "cododigital.co.uk", true },
- { "codxg.org", true },
- { "codyevanscomputer.com", true },
- { "codymoniz.com", true },
- { "codyqx4.com", true },
- { "coecho.net", true },
- { "coeus.cloud", true },
- { "cofbev.com", true },
- { "coffee-machine.reviews", true },
- { "coffee-mamenoki.jp", true },
- { "coffee-up.it", true },
- { "coffeeandteabrothers.com", true },
- { "coffeestain.ltd", true },
- { "cogala.eu", true },
- { "cogeneration-energy.com", true },
- { "cogent.cc", true },
- { "cogitoltd.com", true },
- { "cognicom-gaming.com", true },
- { "cognitip.com", true },
- { "cognitivecomputingconsortium.com", true },
- { "cognitohq.com", true },
- { "coiffeurschnittstelle.ch", true },
- { "coiffeurty.com", true },
- { "coigach-assynt.org", true },
- { "coignieresentransition.fr", true },
- { "coimmvest.com", true },
- { "coin-quest.net", true },
- { "coin.dance", true },
- { "coin.space", true },
- { "coinapult.com", true },
- { "coinbase.com", true },
- { "coincealed.com", true },
- { "coinchat.im", true },
- { "coincircle.com", true },
- { "coincoin.eu.org", true },
- { "coincolors.co", true },
- { "coinf.it", true },
- { "coinflux.com", true },
- { "coingate.com", true },
- { "coinlist.co", false },
- { "coinloan.io", true },
- { "coinmewallet.com", true },
- { "coinroom.com", true },
- { "coinsmat.com", true },
- { "coinsuggest.com", true },
- { "coinsz.co", true },
- { "cointosh.jp", true },
- { "coinvex.org", true },
- { "coinx.pro", true },
- { "coisasdemulher.org", true },
- { "cojam.ru", true },
- { "cojo.eu", true },
- { "cokebar.info", true },
- { "coker.com.au", true },
- { "cokomi.com", true },
- { "col-head.com", true },
- { "col.la", true },
- { "cola-host.tk", true },
- { "colaborativa.tv", true },
- { "colabug.com", true },
- { "coladv.com", true },
- { "colantonio.homelinux.net", true },
- { "colchonesmoon.com", true },
- { "colcomm.com", true },
- { "coldawn.com", false },
- { "coldcardwallet.com", true },
- { "coldfff.com", true },
- { "coldiario.com", true },
- { "coldlasers.org", true },
- { "coldren.org", true },
- { "coldstreamcreekfarm.com", true },
- { "colectivointerconductual.com", true },
- { "colemak.com", true },
- { "colengo.com", true },
- { "colf.online", true },
- { "colibris.xyz", true },
- { "colinchartier.com", true },
- { "colincogle.name", true },
- { "colinespinas.com", true },
- { "colinsnaith.co.uk", true },
- { "colinstark.ca", true },
- { "collab.ddnss.org", true },
- { "collabora-office.com", true },
- { "collabora.ca", true },
- { "collabora.co.kr", true },
- { "collabora.co.uk", true },
- { "collabora.com", true },
- { "collabora.kr", true },
- { "collabora.ninja", true },
- { "collabora.social", true },
- { "collabora.uk", true },
- { "collaboracloudsuite.com", true },
- { "collaboraoffice.co.uk", true },
- { "collaboraoffice.com", true },
- { "collaborativehealthpsychology.com", true },
- { "collabornation.net", true },
- { "collaction.hk", true },
- { "collada.org", true },
- { "collectdocs.com", true },
- { "collectiblebeans.com", true },
- { "collectorknives.net", true },
- { "collectorsystems.com", true },
- { "collegegirlhd.com", true },
- { "collegenavigator.gov", true },
- { "collegephysicsanswers.com", true },
- { "collegeprospectsofcentralindiana.com", true },
- { "collegereligionandphilosophy.com", true },
- { "collegesexvid.com", true },
- { "collegestationhomes.com", true },
- { "collinel-hossari.com", true },
- { "collinelhossari.com", true },
- { "collinklippel.com", true },
- { "collinmbarrett.com", true },
- { "colloquy.mobi", true },
- { "cololi.moe", true },
- { "colombiajeans.co", true },
- { "colombian.dating", true },
- { "colombianas.webcam", true },
- { "colonize.africa", true },
- { "color01.net", true },
- { "colorblindprogramming.com", true },
- { "colorcodedlyrics.com", true },
- { "colorectalcompounding.com", true },
- { "colorfuldots.com", true },
- { "colorhexa.com", true },
- { "coloristcafe.com", true },
- { "colorlib.com", false },
- { "colorpicker.fr", true },
- { "colors3d.com", true },
- { "colorsbycarin.com", true },
- { "colossal-events.co.uk", true },
- { "colourfulcastles.co.uk", true },
- { "colourmanagementpro.com", true },
- { "colpacpackaging.com", true },
- { "colson-occasions.be", false },
- { "coltellisurvival.com", true },
- { "columbushydroxide.com", true },
- { "columbushydroxide.net", true },
- { "columbushydroxide.org", true },
- { "columbuswines.com", true },
- { "com-in.de", true },
- { "com.cc", true },
- { "comalia.com", true },
- { "comarkinstruments.net", true },
- { "combigo.com", true },
- { "combineconquer.com", true },
- { "combron.be", true },
- { "combron.co.uk", true },
- { "combron.com", true },
- { "combron.nl", true },
- { "combustibilaspen.ro", true },
- { "comcenter.com", true },
- { "comcol.nl", true },
- { "comdotgame.com", true },
- { "comdurav.com", true },
- { "come2cook.com", true },
- { "comeals.com", true },
- { "comedimagrire.it", true },
- { "comedyhuis.nl", true },
- { "comeoishii.com", true },
- { "comercialbelzunces.com", true },
- { "comercialroxana.com", true },
- { "comercialtpv.com", true },
- { "comercialtrading.eu", true },
- { "comerford.net", true },
- { "comestoarra.com", true },
- { "cometcache.com", true },
- { "cometonovascotia.ca", true },
- { "comff.net", true },
- { "comfintouch.com", true },
- { "comflores.com.br", true },
- { "comfortmastersinsulation.com", true },
- { "comfortsolutionsair.com", true },
- { "comhack.com", true },
- { "comicbank.org", true },
- { "comicsans.tk", true },
- { "comicspornos.com", true },
- { "comicspornow.com", true },
- { "comicspornoxxx.com", true },
- { "comicwiki.dk", true },
- { "comiteaintriathlon.fr", true },
- { "comiteexpertes.gc.ca", true },
- { "comlipa.gq", true },
- { "comm.cx", true },
- { "commania.co.kr", true },
- { "commco.nl", true },
- { "commechezvous.ch", false },
- { "commercesend.com", true },
- { "commercezen.com", true },
- { "commercial-academy.fr", true },
- { "commercialcleaningbrisbane.com.au", true },
- { "commeunamour.com", true },
- { "commissaris-vraagbaak.nl", true },
- { "commissionagenda.com", true },
- { "commitsandrebases.com", true },
- { "commlabindia.com", true },
- { "common.io", true },
- { "commoncode.com.au", true },
- { "commoncode.io", false },
- { "commoncore4kids.com", true },
- { "commons-mayflower.tk", true },
- { "commonsenseamericanpolitics.com", true },
- { "communalconsulting.org", true },
- { "communiques.info", true },
- { "communiquons.org", true },
- { "communist-party.tk", true },
- { "communitychurchafrica.co.za", true },
- { "communitycodeofconduct.com", true },
- { "communityhealthservices.co.uk", true },
- { "communitymanagertorrejon.com", true },
- { "communote.net", true },
- { "commure.com", true },
- { "como-se-escribe.com", true },
- { "comoculosdesol.pt", true },
- { "comocurarlagastritis24.online", true },
- { "comocurarlagastritistratamientonatural.com", true },
- { "comodo.nl", true },
- { "comodormirmasrapido.com", true },
- { "comodosslstore.com", true },
- { "comogene.com", true },
- { "comohacerblog.net", true },
- { "comohacerpara.com", true },
- { "comoimportar.net", true },
- { "comopuededejardefumar.net", true },
- { "comoquitarlacaspa24.com", true },
- { "comosecarabarriga.net", true },
- { "comoseduzir.net", true },
- { "comosefazisto.com.br", true },
- { "comoviajarcontumascota.com", true },
- { "comp2go.com.au", true },
- { "compactchess.cc", true },
- { "compagnia-buffo.de", false },
- { "compalliance.com", true },
- { "companion-web.net", true },
- { "comparatif-moto.fr", true },
- { "compareinsurance.com.au", true },
- { "comparelegalforms.com", true },
- { "comparemymobile.com", true },
- { "comparesoft.com", true },
- { "comparetheproject.com", true },
- { "comparewatch.com", true },
- { "comparexcloudcenter.com", true },
- { "compartirtrenmesaave.com", true },
- { "compassdirectportal.com", true },
- { "compassfinance.com", true },
- { "compassintladv.com", true },
- { "compassionaterelease.com", true },
- { "compassleaf.com", true },
- { "compasslos.com", true },
- { "compdermcenter.com", true },
- { "compeat.com", true },
- { "competencyassessment.ca", true },
- { "competitor.com", true },
- { "comphare.nl", true },
- { "compilenix.org", true },
- { "completesecurityessex.co.uk", true },
- { "completesecurityessex.com", true },
- { "completionist.me", true },
- { "complexart.ro", true },
- { "complexcoral.ro", true },
- { "complexorganization.com", true },
- { "complexorganizations.com", true },
- { "compliance-management.ch", false },
- { "compliance-systeme.de", true },
- { "compliancedictionary.com", true },
- { "compliancerisksoftware.co.uk", true },
- { "compliantbusinessprocessing.com", true },
- { "componentshop.co.uk", true },
- { "compositedevtec.tk", true },
- { "compostatebien.com.ar", true },
- { "compoundingrxusa.com", true },
- { "comprarcarteras.online", true },
- { "comprarimpresoras-3d.com", true },
- { "comprarparaguas.online", true },
- { "comprauncelular.com", true },
- { "compreair.com", true },
- { "compreautomacao.com.br", true },
- { "compree.com", true },
- { "comptablevilledequebec.com", true },
- { "comptrollerofthecurrency.gov", true },
- { "comptu.com", true },
- { "compubench.com", true },
- { "compucorner.mx", true },
- { "compunetwor.com", true },
- { "compuplast.cz", true },
- { "computec.ch", true },
- { "computehealth.com", true },
- { "computer-acquisti.com", true },
- { "computer-science-schools.com", true },
- { "computerassistance.co.uk", true },
- { "computerbase.de", true },
- { "computercamaccgi.com", true },
- { "computercraft.net", true },
- { "computeremergency.com.au", false },
- { "computerhilfe-feucht.de", true },
- { "computerinfobits.com", true },
- { "computernetwerkwestland.nl", true },
- { "computersystems.guru", false },
- { "computingsociety.co.uk", true },
- { "computop.com", true },
- { "computron.ga", true },
- { "comschool.com.br", true },
- { "comumlab.org", true },
- { "comunal.co", true },
- { "comunic.io", true },
- { "comunidadmontepinar.es", true },
- { "comuniondelucia.com", true },
- { "comvos.de", true },
- { "comw.cc", true },
- { "con-con.nl", true },
- { "conalcorp.com", true },
- { "conalpedis.tk", true },
- { "conatus.ai", true },
- { "conaudisa.com", false },
- { "concept-web.ch", false },
- { "concerto.amsterdam", true },
- { "concerts-metal.ch", false },
- { "concertsenboite.fr", true },
- { "concertsto.com", true },
- { "concetrabajos.cl", true },
- { "conciencia.fit", true },
- { "concilio.com", true },
- { "conciliumnotaire.ca", true },
- { "concordiagaming.com", true },
- { "concordsoftwareleasing.com", true },
- { "concretelevelingsystems.com", true },
- { "concreterepairatlanta.com", true },
- { "concreterepairconcreteraising.com", true },
- { "concursos.com.br", true },
- { "concursosabertos.com.br", true },
- { "concursuri.biz", true },
- { "condecom.com.br", true },
- { "condepenalba.com", false },
- { "condesaelectronics.com", true },
- { "condolencemessages.net", true },
- { "condominiosi.it", true },
- { "condominioweb.com", true },
- { "condosforcash.com", true },
- { "condroz-motors.be", false },
- { "conectadev.com", true },
- { "conectumfinanse.pl", true },
- { "conejovalleyelectrical.com", true },
- { "conejovalleyelectrician.com", true },
- { "conejovalleyexteriorlighting.com", true },
- { "conejovalleylandscapelighting.com", true },
- { "conejovalleylighting.com", true },
- { "conejovalleyoutdoorlighting.com", true },
- { "conexiontransporte.com", true },
- { "conference-expert.eu", true },
- { "confiancefoundation.org", true },
- { "config.schokokeks.org", false },
- { "confiscate.ga", true },
- { "confiwall.de", true },
- { "conforama.es", true },
- { "conforama.pt", true },
- { "conformax.com.br", true },
- { "confrerie-rp.fr", true },
- { "conftree.com", true },
- { "confusion-band.ch", true },
- { "confygo.com", true },
- { "congafasdesol.com", true },
- { "congineer.com", true },
- { "congobunkering.com", false },
- { "conju.cat", true },
- { "conjugacao.com.br", true },
- { "conkret.mobi", true },
- { "conmedapps.com", true },
- { "conn.cx", true },
- { "connect-ed.network", true },
- { "connect-me.com", true },
- { "connect.dating", true },
- { "connect.facebook.net", true },
- { "connecta.store", true },
- { "connectedcare.md", true },
- { "connectfss.com", true },
- { "connectingrentals.com", true },
- { "connectingrentalsofbethel.com", true },
- { "connectionplanet.nl", true },
- { "connectionstrings.com", true },
- { "connectivia.it", true },
- { "connectmath.com", true },
- { "connectme.com.mx", true },
- { "connectmy.car", true },
- { "connectnet247.com", true },
- { "connecto-data.com", true },
- { "connectum.eu", true },
- { "conner.work", true },
- { "connexas.eu", true },
- { "connexfilter.com", true },
- { "connexion.health", true },
- { "connexionht.com", true },
- { "connext.de", true },
- { "connictro.de", true },
- { "connorcordell.co.uk", true },
- { "connorhatch.com", true },
- { "connyduck.at", true },
- { "conocchialidasole.it", true },
- { "conociendosalama.com", true },
- { "conorboyd.info", true },
- { "conory.com", true },
- { "conotoxia.com", true },
- { "conquer-addiction.org", true },
- { "conrad-kostecki.de", true },
- { "conradboraboranuiresort.com", true },
- { "conradcartagena.com", true },
- { "conradkostecki.de", true },
- { "conradsautotransmissionrepair.com", true },
- { "consagracionamariasantisima.org", true },
- { "consciente.ch", true },
- { "consciente.ngo", true },
- { "consciente.ong", true },
- { "consciouschoices.net", true },
- { "consegnafioridomicilio.net", true },
- { "consegne.it", true },
- { "consejosdenutricion.com", true },
- { "consensoprivacy.it", true },
- { "consertodecelulares.com.br", true },
- { "conservativenewsandviews.com", true },
- { "consideredgifts.com", true },
- { "consilium-vitae.ch", true },
- { "consiliumvitae.ch", true },
- { "console-tribe.com", true },
- { "console.rest", true },
- { "consoleuniverse.tk", true },
- { "consommateuraverti.com", true },
- { "consonare.de", true },
- { "constant-rough.de", true },
- { "consteval.org", true },
- { "constexpr.org", true },
- { "constinit.org", true },
- { "construct.net", true },
- { "constructieve.nl", true },
- { "construction-colleges.com", true },
- { "construction-student.co.uk", true },
- { "construred.tk", true },
- { "consul.io", true },
- { "consulenza.pro", true },
- { "consulenzanobiliare.com", true },
- { "consultation.biz.tr", true },
- { "consultimator.com", true },
- { "consultimedia.de", true },
- { "consulting-cloud.com", true },
- { "consultingconnection.co", true },
- { "consultinghero.es", true },
- { "consultoresrey.cl", true },
- { "consultoriadeseguranca.com.br", true },
- { "consultoriosodontologicos.com.br", true },
- { "consultpetkov.com", true },
- { "consulvation.com", true },
- { "consumeractionlawgroup.com", true },
- { "consumerfiles.com", true },
- { "consumersentinel.gov", true },
- { "consuwijzer.nl", true },
- { "contabilidadebrooklin.com.br", true },
- { "contact.inc", true },
- { "contactaffix.com", true },
- { "contaquanto.com.br", true },
- { "contemplativeeducation.org", true },
- { "content-api-dev.azurewebsites.net", false },
- { "contentcoms.co.uk", true },
- { "contenthosting.com.br", true },
- { "contentmarathon.com", true },
- { "contentpass.net", true },
- { "contentq.nl", true },
- { "contessa32experience.com", true },
- { "conti-profitlink.co.uk", true },
- { "continuum.memorial", true },
- { "continuumrecoverycenter.com", true },
- { "contouring.fr", true },
- { "contrabass.net", true },
- { "contractormountain.com", true },
- { "contractorswestga.com", true },
- { "contractwriters.com", true },
- { "contrasentido.net", true },
- { "contraspin.co.nz", true },
- { "contrastecolombia.com", true },
- { "contratatupoliza.com", true },
- { "contratti.it", true },
- { "contributor.google.com", false },
- { "controlambientalbogota.com", true },
- { "controlautocom.com.br", true },
- { "controlbooth.com", true },
- { "controle.net", true },
- { "controleer-maar-een-ander.nl", true },
- { "controlewiki.be", true },
- { "controllertech.com", true },
- { "controlvoltage.cc", true },
- { "contunda.de", true },
- { "conungranodesal.com", true },
- { "conv2pdf.com", true },
- { "convergencela.com", true },
- { "convergnce.com", true },
- { "conversationsri.ga", true },
- { "conversiepartners.nl", true },
- { "conversiones.com", true },
- { "convert.im", true },
- { "convertimg.com", true },
- { "convexset.org", true },
- { "coochiehacks.io", true },
- { "cookescastles.co.uk", true },
- { "cookicons.co", true },
- { "cookie4.com", true },
- { "cookieandkate.com", true },
- { "cookiecrook.com", true },
- { "cooking-sun.com", true },
- { "cookingcrusade.com", true },
- { "cookinglife.nl", false },
- { "cookingperfected.com", true },
- { "cookmedical.com", false },
- { "cookwithmanali.com", true },
- { "cool-parties.co.uk", true },
- { "cool-wallpapers.jp", true },
- { "cool.haus", true },
- { "cool110.tk", true },
- { "cool110.xyz", true },
- { "coolattractions.co.uk", true },
- { "coolbitx.com", true },
- { "coolcamping.com", true },
- { "coolcomputers.info", true },
- { "cooldan.com", true },
- { "coole-fete.de", true },
- { "coolgifs.de", true },
- { "cooljv.com", true },
- { "coolmoda.com.ua", true },
- { "coolprylar.se", true },
- { "coolshirt.tk", true },
- { "coomonte.tk", true },
- { "coon.fr", true },
- { "coonawarrawines.com.au", true },
- { "coondesign.ch", true },
- { "coonelnel.net", true },
- { "coore.jp", true },
- { "coorpacademy.com", true },
- { "copan.com.br", true },
- { "copdfoundation.org", true },
- { "copenhagenoptimization.com", true },
- { "copleylawfirm.com", true },
- { "copperandtileroofing.com", true },
- { "copperheados.com", true },
- { "coppidesentupidora.com.br", true },
- { "copplaw.com", true },
- { "coptel.cz", true },
- { "coptkm.cz", true },
- { "copycaught.com", true },
- { "copycaught.net", true },
- { "copycaught.org", true },
- { "copycenter.cf", true },
- { "copycrafter.net", true },
- { "copydz.com", true },
- { "copyengine.co", true },
- { "copypoison.com", true },
- { "copyright-watch.org", true },
- { "copyrightcoins.com", true },
- { "copyrightcoins.help", true },
- { "copyrightcoinsnews.com", true },
- { "copyshrug.ca", true },
- { "copywriting-on-demand.tk", true },
- { "coralreef.blue", true },
- { "corbi.net.au", true },
- { "cordejong.nl", true },
- { "corder.tech", true },
- { "cordeydesign.ch", false },
- { "cordis.io", true },
- { "cordlessdog.com", true },
- { "cordobaaldia.com.mx", true },
- { "core-collective.co.uk", true },
- { "core-concepts.de", false },
- { "core-networks.de", true },
- { "core.mx", true },
- { "core.org.pt", true },
- { "corecodec.com", true },
- { "corehealthberks.com", true },
- { "coreless-stretchfilm.com", true },
- { "corelia.net", true },
- { "corepartners.com.ua", true },
- { "coresolutions.ca", true },
- { "coreum.ca", true },
- { "corevetconnect.co.uk", true },
- { "coreyjmahler.com", true },
- { "corgi.party", true },
- { "coribi.com", true },
- { "corinastefan.ro", true },
- { "corintech.net", true },
- { "coriolis.ch", true },
- { "corisu.co", true },
- { "corkedwinebar.com", true },
- { "corkerscrisps.co.uk", true },
- { "corksoncolumbus.com", true },
- { "corl3ss.com", true },
- { "corleoncatering.com", true },
- { "corlija.com", true },
- { "cornelia-schiemann.de", true },
- { "cornercircle.co.uk", true },
- { "cornergarage.coop", true },
- { "cornerstone.network", true },
- { "cornerstonecmc.org", true },
- { "cornfestgiethoorn.nl", true },
- { "corniche.com", true },
- { "corningcu.org", true },
- { "cornitek.tk", true },
- { "cornmachine.com", true },
- { "cornodo.com", true },
- { "cornsoyexpo.org", true },
- { "corona-academy.com", true },
- { "corona-renderer.cloud", true },
- { "corona-renderer.com", true },
- { "coronersconnect.co.uk", true },
- { "coropiacere.org", true },
- { "corp.goog", true },
- { "corpfin.net", true },
- { "corpio.nl", true },
- { "corpkitnw.com", true },
- { "corpoflow.nl", true },
- { "corporateclash.net", true },
- { "corporatecomputingsolutions.com", true },
- { "corporateinfluencers.com", true },
- { "corpulant.coffee", true },
- { "corpulantcoffee.com", true },
- { "corpulent.coffee", true },
- { "corpulentcoffee.com", true },
- { "corpuschristisouthriver.org", true },
- { "corpusslayer.com", true },
- { "corrbee.com", true },
- { "correctiv.org", true },
- { "correctlydesign.com", true },
- { "correctpaardbatterijnietje.nl", true },
- { "correotemporal.org", true },
- { "corrick.io", true },
- { "corriel.com", true },
- { "corrupted.io", true },
- { "corruptos.tk", true },
- { "corsa-b.uk", true },
- { "corscanplus.com", true },
- { "corsicalaw.com", true },
- { "corsihaccpsicurezzalavoro.it", true },
- { "corsisicurezza.it", true },
- { "corso-antincendio.org", true },
- { "corsomassaggi.it", true },
- { "corsorspp.roma.it", true },
- { "cortealcastello.it", true },
- { "cortexitrecruitment.com", true },
- { "cortexx.nl", true },
- { "cortis-consulting.ch", true },
- { "corvax.kiev.ua", true },
- { "corvee.com", true },
- { "coryadum.com", true },
- { "corytyburski.com", false },
- { "cosasque.com", true },
- { "cosciamoos.com", true },
- { "cosec.cn", true },
- { "cosirex.com", true },
- { "cosmechic.fr", true },
- { "cosmekaitori.jp", true },
- { "cosmeticappraisal.com", true },
- { "cosmeticasimple.com", true },
- { "cosmetify.com", true },
- { "cosmetique-totale.nl", true },
- { "cosmic-os.org", true },
- { "cosmicnavigator.com", true },
- { "cosmicworlds.com", true },
- { "cosmicworlds.mobi", true },
- { "cosmodacollection.com", true },
- { "cosmofunnel.com", true },
- { "cosmohit.ua", true },
- { "cosmos-software.tk", true },
- { "cosmundi.de", true },
- { "cosplayer.com", true },
- { "cospol.ch", false },
- { "costablancavoorjou.com", true },
- { "costarellos.com", true },
- { "costco.co.jp", true },
- { "costco.co.kr", true },
- { "costco.co.uk", true },
- { "costco.com.au", true },
- { "costco.com.mx", true },
- { "costco.com.tw", true },
- { "costco.is", true },
- { "costcoinsider.com", true },
- { "costinstefan.eu", true },
- { "costreportdata.com", false },
- { "costulessdirect.com", true },
- { "coteax.com", true },
- { "coteibem.com.br", true },
- { "coteries.com", false },
- { "cotoacc.com", true },
- { "cotonmusic.ch", false },
- { "cotswoldflatroofing.com", true },
- { "cotwe-ge.ch", false },
- { "cou.re", true },
- { "cougar.dating", true },
- { "coughlan.de", true },
- { "counselingfw.com", true },
- { "counsellingtime.com", true },
- { "counstellor.com", false },
- { "countdowntrader.com", true },
- { "counter-team.ch", false },
- { "counterenlol.com", true },
- { "countermail.com", false },
- { "countermats.net", true },
- { "countersolutions.co.uk", true },
- { "countetime.com", true },
- { "country-creativ.de", true },
- { "countrybrewer.com.au", true },
- { "countryfrog.uk", true },
- { "countryhouseresort.com", true },
- { "countrylife.cz", true },
- { "countryoutlaws.ca", true },
- { "countrysidemarquees.co.uk", true },
- { "countrysmile.org", true },
- { "countybankdel.com", true },
- { "countyjailinmatesearch.com", true },
- { "coupestanley.com", true },
- { "couponbates.com", true },
- { "couponcodesme.com", true },
- { "couponlo.net", true },
- { "cour4g3.me", true },
- { "couragefound.org", true },
- { "couriergrey.com", true },
- { "couriersrs.com", true },
- { "coursables.com", true },
- { "courseconfidence.com", true },
- { "coursera.org", true },
- { "courseworkbank.info", true },
- { "couvreur-hinault.fr", true },
- { "covbounce.co.uk", true },
- { "coveredinspiders.com", true },
- { "covershousing.nl", true },
- { "covert.sh", true },
- { "covoiturage.fr", true },
- { "covuro.com", true },
- { "covve.com", false },
- { "covybrat.cz", true },
- { "cowbird.org", true },
- { "coweo.cz", true },
- { "coworking-luzern.ch", true },
- { "cowsay.blog", true },
- { "coxcapitalmanagement.com", true },
- { "coxxs.me", true },
- { "coya.tw", true },
- { "cozmoyachts.com", true },
- { "cozo.me", true },
- { "cozumel-activities.com", true },
- { "cozyeggdesigns.com", true },
- { "cp-st-martin.be", true },
- { "cpaexamguy.com", true },
- { "cpars.gov", true },
- { "cpasperdu.com", true },
- { "cpbanq.com", true },
- { "cpcheats.co", true },
- { "cpchur.ch", true },
- { "cpd-education.co.uk", true },
- { "cpdhealthcare.com", true },
- { "cpe-colleg.de", true },
- { "cpegypt.tk", true },
- { "cphpvb.net", true },
- { "cpilot.cz", true },
- { "cplus.me", true },
- { "cplusplus.se", true },
- { "cppan.org", true },
- { "cppaste.org", true },
- { "cpqcol.gov.co", true },
- { "cpsa.co.uk", true },
- { "cpsc.gov", true },
- { "cpsecureapp.com", true },
- { "cpsq.fr", true },
- { "cpsurvey.com", true },
- { "cptoon.com", true },
- { "cpu.biz.tr", true },
- { "cpvmatch.eu", true },
- { "cpy.pt", true },
- { "cqn.ch", false },
- { "cqvradio.ddns.net", true },
- { "cr.search.yahoo.com", false },
- { "cr8haven.com", true },
- { "cra-bank.com", true },
- { "cra-search.net", true },
- { "craazzyman21.at", true },
- { "crabrave.space", true },
- { "crackcat.de", true },
- { "cracker.in.th", true },
- { "crackheros.site", true },
- { "crackle.io", true },
- { "crackload.net", true },
- { "crackorsquad.in", true },
- { "crackslut.eu", true },
- { "cracksnet.tk", true },
- { "crackstation.net", true },
- { "cradlepointecm.com", true },
- { "craft-beer.life", true },
- { "craft-me-in.com", true },
- { "craftandbuild.de", true },
- { "craftcms.com", true },
- { "crafted.cat", true },
- { "crafters.co.jp", true },
- { "craftinghand.com", true },
- { "craftinginredlipstick.com", true },
- { "craftist.de", true },
- { "craftshiponline.tk", true },
- { "craftsmandruggets.com", true },
- { "craftsmany.net", true },
- { "crafttalk.tk", true },
- { "craftyguy.net", true },
- { "craftyphotons.net", true },
- { "crag.com.tw", true },
- { "craig-mullins.com", true },
- { "craigbates.co.uk", false },
- { "craigdavis.ga", true },
- { "craigfrancis.co.uk", true },
- { "craigleclaireteam.com", true },
- { "craigrouse.com", true },
- { "craigwfox.com", true },
- { "cralarm.de", true },
- { "cramersoft.com", true },
- { "cranberry-tee.de", true },
- { "crandall.io", true },
- { "cranenburgh.nl", true },
- { "cranforddental.com", true },
- { "cranioo.nl", true },
- { "cranshafengin.com", true },
- { "crapmail.tk", true },
- { "crapouill.es", true },
- { "crashboy.ws", true },
- { "cratss.co.uk", true },
- { "crawfordcountytcc.org", true },
- { "crawler.ninja", true },
- { "crawleybouncycastles.co.uk", true },
- { "crawlspaceandbasementsolutions.com", true },
- { "crazy-bulks.com", true },
- { "crazy-cat.net", true },
- { "crazy-coders.com", true },
- { "crazybulk.co.uk", true },
- { "crazybulk.com", true },
- { "crazybulk.de", true },
- { "crazybulk.fr", true },
- { "crazycastles.ie", true },
- { "crazycraftland.net", true },
- { "crazycube.fr", true },
- { "crazydomains.ae", true },
- { "crazydomains.co.nz", true },
- { "crazydomains.co.uk", true },
- { "crazydomains.com.au", true },
- { "crazydomains.in", true },
- { "crazygifts.cf", true },
- { "crazymarvin.com", true },
- { "crazymeeshu.com", true },
- { "crazynoisybizarre.town", true },
- { "crazypaul.com", true },
- { "crazypowered.com", true },
- { "crazyvisitors.com", true },
- { "crbug.com", true },
- { "crc-bank.com", true },
- { "crc-search.com", true },
- { "crcd.com.ua", true },
- { "crdmendoza.net", true },
- { "crea-etc.net", false },
- { "crea-th.at", true },
- { "crea-that.fr", true },
- { "crea.bg", true },
- { "creamcastles.co.uk", true },
- { "creampiepornvids.com", true },
- { "creamsoft.com", true },
- { "creamyfox.com", true },
- { "creared.edu.co", true },
- { "creareup.com", true },
- { "createbeing.com", true },
- { "createcos.com", true },
- { "creategyx.ga", true },
- { "creatic.co", true },
- { "creatieven.com", true },
- { "creationsgate.com", true },
- { "creative-thinking.ro", true },
- { "creative-wave.fr", true },
- { "creativeangles.in", true },
- { "creativecaptiv.es", true },
- { "creativecenter.pro", true },
- { "creativecommons.gr", true },
- { "creativecommons.org", true },
- { "creativeconceptsvernon.com", true },
- { "creativedigital.co.nz", true },
- { "creativeglassgifts.com.au", true },
- { "creativeground.com.au", true },
- { "creativeideasagency.com", true },
- { "creativeimagery.com.au", true },
- { "creativeink.de", true },
- { "creativekkids.com", true },
- { "creativelaw.eu", true },
- { "creativeliquid.com", true },
- { "creativesectors.tk", true },
- { "creativesurvey.com", true },
- { "creativeweb.biz", true },
- { "creativewolf.net", true },
- { "creativosonline.org", true },
- { "creatixx-network.de", false },
- { "creatleencoaching.com", true },
- { "creators-design.com", true },
- { "creators.direct", true },
- { "creatorswave.com", true },
- { "creatujoya.com", true },
- { "crebita.de", true },
- { "crecman.fr", true },
- { "credex.bg", true },
- { "credigo.se", true },
- { "credit-10.com", true },
- { "credit-default-swaps.tk", true },
- { "creditdigital.uk", true },
- { "creditif.tk", true },
- { "creditkarma.com", true },
- { "credito360.pt", true },
- { "creditor.tk", true },
- { "creditorapido.pt", true },
- { "creditos-rapidos.com", true },
- { "creditozen.es", true },
- { "creditozen.mx", true },
- { "creditproautos.com", false },
- { "creditscoretalk.com", true },
- { "creeks-coworking.com", true },
- { "creep.im", true },
- { "creepypastas.com", true },
- { "creer-une-boutique-en-ligne.com", true },
- { "creermonsite-wp.com", true },
- { "crefelder.com", true },
- { "crem.in", false },
- { "cremepassion.de", true },
- { "crena.ch", true },
- { "crepa.ch", false },
- { "cretdupuy.com", false },
- { "creteangle.com", true },
- { "cretica.no", true },
- { "creusalp.ch", false },
- { "crewplanner.eu", true },
- { "crgalvin.com", true },
- { "crgm.net", true },
- { "cribcore.com", true },
- { "cricklewood.condos", true },
- { "criena.com", true },
- { "criena.net", true },
- { "crime-lawyers.com", true },
- { "crimebarta.com", true },
- { "crimefreeliving.com", true },
- { "crimesolutions.gov", true },
- { "crimevictims.gov", true },
- { "criminal-attorney.ru", true },
- { "criminal.enterprises", true },
- { "crimsonconnect.co.uk", true },
- { "crinesdanzantes.be", true },
- { "criptocert.com", true },
- { "criptoinvest.pt", true },
- { "criptolog.com", true },
- { "criptomonedas365.com", true },
- { "criptomoneylite.tk", true },
- { "criscitos.it", true },
- { "crisisactual.com", true },
- { "crisisnextdoor.gov", true },
- { "crismatthews.com", true },
- { "crisp.chat", true },
- { "crisp.email", true },
- { "crisp.help", true },
- { "crisp.im", true },
- { "crisp.watch", true },
- { "crispinusphotography.com", true },
- { "criss.com.ua", true },
- { "cristalstandards.com", false },
- { "cristarta.com", true },
- { "cristau.org", true },
- { "cristianonascimento.ml", true },
- { "critical.today", false },
- { "criticalgenesis.tk", true },
- { "criticalsurveys.co.uk", true },
- { "critterguard.org", true },
- { "crizin.io", true },
- { "crizk.com", true },
- { "crlna.com", true },
- { "crm.onlime.ch", false },
- { "crm114d.com", true },
- { "croceverdevb.it", true },
- { "crochetnerd.com", true },
- { "croco.vision", true },
- { "crocuscoaching.co.uk", true },
- { "croisedanslemetro.com", true },
- { "croixblanche-haguenau.fr", false },
- { "cromefire.myds.me", true },
- { "cromosomax.com", true },
- { "cromwellvets.co.uk", true },
- { "cronberg.ch", true },
- { "cronenberg.cc", true },
- { "cronix.cc", true },
- { "cronologie.de", true },
- { "cronometer.com", true },
- { "cronoscentral.be", true },
- { "cropdiagnosis.com", true },
- { "crosbug.com", true },
- { "cross-culture.tk", true },
- { "cross-led-sign.com", true },
- { "cross-view.com", true },
- { "cross.lol", true },
- { "crossborderreturns.com", true },
- { "crossedwires.net", true },
- { "crossfiremovies.tk", true },
- { "crossfitblackwater.com", true },
- { "crossformer.com", true },
- { "crosslifenutrition.co.uk", false },
- { "crossnet.io", true },
- { "crossorig.in", true },
- { "crossoverit.com", true },
- { "crosspeakoms.com", true },
- { "crossroads-gmbh.ch", true },
- { "crossway.nl", true },
- { "crosswords123.com", true },
- { "crowcloud.com", true },
- { "crowd.supply", true },
- { "crowdbox.net", true },
- { "crowdcloud.be", true },
- { "crowds.ro", true },
- { "crowdsim3d.com", true },
- { "crowdstack.com", true },
- { "crowdsupply.com", true },
- { "crowleymarine.com", true },
- { "crownaffairs.ch", true },
- { "crownbouncycastlehire.co.uk", true },
- { "crowncastles.co.uk", true },
- { "crownmarqueehire.co.uk", true },
- { "crownpoint.com", true },
- { "crownsterling.io", true },
- { "crows.io", true },
- { "crowter.li", true },
- { "croydonapartments.com.au", true },
- { "croydonbouncycastles.co.uk", true },
- { "crrev.com", true },
- { "crsmsodry.cz", true },
- { "crsoresina.it", true },
- { "crstat.ru", true },
- { "crt.sh", true },
- { "crtalleres.com", true },
- { "crucibleofworlds.com", true },
- { "cruicky.uk", true },
- { "cruisemoab.com", true },
- { "crumbcontrol.com", true },
- { "crunchrapps.com", true },
- { "crunchy.rocks", true },
- { "crustytoothpaste.net", true },
- { "crute.me", true },
- { "cruzitoproducciones.gq", true },
- { "crvegas.com", true },
- { "crvv.me", true },
- { "cry-sys.de", true },
- { "cry.nu", false },
- { "cryoblaster.com", true },
- { "cryothanasia.com", true },
- { "crypt.is-by.us", true },
- { "cryptearth.de", true },
- { "crypted.chat", true },
- { "crypteianetworks.com", true },
- { "cryptex.net", true },
- { "cryptex.pw", true },
- { "cryptizy.com", true },
- { "crypto.cat", false },
- { "crypto.graphics", true },
- { "crypto.is", false },
- { "cryptobin.co", true },
- { "cryptocon.org", true },
- { "cryptodigitalgroup.com", true },
- { "cryptoegg.ca", true },
- { "cryptofan.org", true },
- { "cryptofox.nl", true },
- { "cryptofrog.co", true },
- { "cryptography.ch", true },
- { "cryptoguidemap.com", true },
- { "cryptoholic.co", true },
- { "cryptoisnotacrime.org", true },
- { "cryptojacks.io", true },
- { "cryptojourney.com", true },
- { "cryptology.ch", true },
- { "cryptomail.nl", true },
- { "cryptomkt.com", true },
- { "cryptonom.org", true },
- { "cryptonym.com", true },
- { "cryptool.org", true },
- { "cryptoparty.at", true },
- { "cryptoparty.tv", true },
- { "cryptopartyutah.org", true },
- { "cryptopaste.org", true },
- { "cryptophobia.nl", true },
- { "cryptorival.com", true },
- { "cryptoseb.pw", true },
- { "cryptoshot.pw", true },
- { "cryptract.co", true },
- { "crys.cloud", true },
- { "crys.email", true },
- { "crys.hu", true },
- { "crys.me", true },
- { "crys.ovh", true },
- { "crys.pw", true },
- { "crys.tv", true },
- { "crystal-zone.com", true },
- { "crystalchandelierservices.com", true },
- { "crystalgrid.net", true },
- { "crystaloscillat.com", true },
- { "crystalroad.net", true },
- { "crystalzoneshop.com", true },
- { "crystone.me", true },
- { "cs-algeria.tk", true },
- { "cs.money", true },
- { "csaapac.org", true },
- { "csabg.org", true },
- { "csacongress.com", true },
- { "csacongress.org", true },
- { "csacongress.us", true },
- { "csca.me", true },
- { "cscau.com", true },
- { "cscdn.net", true },
- { "csci571.com", true },
- { "csd-slovenije.si", true },
- { "cselzer.com", true },
- { "csfcloud.com", true },
- { "csfd.cz", true },
- { "csgf.fun", true },
- { "csgf.ru", true },
- { "csgo.su", true },
- { "csgomtr.com", true },
- { "csgoswap.com", true },
- { "csharpmarc.net", true },
- { "cshub.nl", true },
- { "csi.lk", true },
- { "csinterstargeneve.ch", false },
- { "csirt.ee", true },
- { "csjministriesfoundation.org", true },
- { "cskentertainment.co.uk", true },
- { "cslaboralistas.pe", true },
- { "cslbuild.com", true },
- { "csmainframe.com", true },
- { "csodaorszagovoda.hu", true },
- { "csosa.gov", true },
- { "csp.ch", false },
- { "cspeti.hu", true },
- { "cspvalidator.org", true },
- { "csrichter.com", true },
- { "css-tricks.tk", true },
- { "css.direct", false },
- { "cssai.eu", true },
- { "cssaunion.com", true },
- { "cstanley.net", true },
- { "cstb.ch", false },
- { "cstp-marketing.com", true },
- { "cstrong.nl", true },
- { "csu.st", true },
- { "csust.net", true },
- { "csuw.net", true },
- { "csvalpha.nl", true },
- { "csvplot.com", true },
- { "cswarzone.com", true },
- { "cswebi.net", true },
- { "cswgmbh.de", true },
- { "csy.hu", true },
- { "ct.search.yahoo.com", false },
- { "ctc-transportation.com", true },
- { "ctcom-peru.com", true },
- { "ctcue.com", true },
- { "ctes.cz", true },
- { "ctf-albstadt.de", true },
- { "ctf.link", true },
- { "ctir.gov.br", true },
- { "ctkwwri.org", true },
- { "ctliu.com", true },
- { "ctmrepository.com", true },
- { "ctnguyen.de", true },
- { "ctnguyen.net", true },
- { "ctns.de", false },
- { "ctoin.tw", true },
- { "ctomp.io", false },
- { "ctor.ch", true },
- { "ctpe.net", true },
- { "ctrl.blog", true },
- { "ctrl.gr", true },
- { "cttso.gov", true },
- { "cu247secure.ie", true },
- { "cuacamaungon.com", true },
- { "cuatroymedia.com", true },
- { "cub-bouncingcastles.co.uk", true },
- { "cubaal.com", true },
- { "cubanchino.tk", true },
- { "cube.builders", true },
- { "cubebot.io", true },
- { "cubebuilders.net", true },
- { "cubecart-demo.co.uk", true },
- { "cubecart-hosting.co.uk", true },
- { "cubecraft.net", true },
- { "cubecraftcdn.com", true },
- { "cubekrowd.net", true },
- { "cubeo.xyz", true },
- { "cubeperformancecentre.com.au", true },
- { "cubesugar.info", true },
- { "cubetech.co.jp", true },
- { "cubia.de", true },
- { "cubia3.com", true },
- { "cubia4.com", true },
- { "cubiest.com", true },
- { "cubigames.tk", true },
- { "cubile.xyz", true },
- { "cubing.net", true },
- { "cublick.com", true },
- { "cubos.io", true },
- { "cubsbestteaminbaseball.com", true },
- { "cubua.com", true },
- { "cubyhome.com", true },
- { "cuchichi.es", true },
- { "cuckoo.ee", true },
- { "cuckoopalace.cn", true },
- { "cuddlecomfort.com", true },
- { "cuddlingyaks.com", true },
- { "cudoo.de", true },
- { "cueca.com.br", true },
- { "cuecasonline.com.br", true },
- { "cuegee.com", true },
- { "cuentamecomopaso.es", true },
- { "cuentasmutualamr.org.ar", true },
- { "cuetoems.com", true },
- { "cuff-links.nl", true },
- { "cuibonobo.com", true },
- { "cuio.net", true },
- { "cuir-lipari.fr", true },
- { "cuitandokter.com", true },
- { "culan.dk", true },
- { "cultiv.nl", true },
- { "cultofd50.org", true },
- { "cultofperf.org.uk", true },
- { "cultura10.com", true },
- { "culturabrasilia.tk", true },
- { "culturalparadiso.tk", true },
- { "culturedcode.com", true },
- { "culturelivresque.fr", true },
- { "cultureshift.co", true },
- { "culturesouthwest.org.uk", true },
- { "culturess.com", true },
- { "culturoquiz.com", true },
- { "cumberlandrivertales.com", true },
- { "cuminas.com", true },
- { "cuminas.jp", true },
- { "cumnock.name", true },
- { "cumnock.org", true },
- { "cumplegenial.com", true },
- { "cumseface.eu", true },
- { "cumshots-video.ru", true },
- { "cuoc.org.uk", true },
- { "cup.al", true },
- { "cupcake.pt", true },
- { "cupclub.com", true },
- { "cupdunarea.ro", true },
- { "cupoane-reducere.net", true },
- { "cupom.net", true },
- { "cur.by", true },
- { "curacao-firma.com", true },
- { "curacaodiveguide.com", true },
- { "curamail.co.uk", true },
- { "curbside.com", true },
- { "cureatr.com", true },
- { "curieux.digital", false },
- { "curio-shiki.com", true },
- { "curiosity-driven.org", true },
- { "curlify.com", true },
- { "curlybracket.co.uk", true },
- { "curontwerptoolgroenbeton.nl", true },
- { "currency-strength.com", true },
- { "current-usa.com", true },
- { "currentlystreaming.com", true },
- { "currynissanmaparts.com", true },
- { "cursocatolico.com", true },
- { "cursomente.online", true },
- { "cursos-trabajadores.net", true },
- { "cursos.com", true },
- { "cursosemmaus.es", true },
- { "cursosforex.com", true },
- { "cursosgratuitos.pe", true },
- { "cursosingles.com", true },
- { "cursossena.co", true },
- { "cursosypostgrados.com", true },
- { "cursuri-de-actorie.ro", true },
- { "curtacircuitos.com.br", false },
- { "curtis-smith.me.uk", true },
- { "curtislinville.net", true },
- { "curtissmith.me.uk", true },
- { "curva.co", false },
- { "curvemedia.co", true },
- { "curveprotect.com", true },
- { "curveprotect.cz", true },
- { "curveprotect.net", true },
- { "curveprotect.org", true },
- { "curvissa.co.uk", true },
- { "custer.tk", true },
- { "custodian.nl", true },
- { "custodyxchange.com", true },
- { "customdissertation.com", true },
- { "customessaystation.gq", true },
- { "customfitbymj.net", true },
- { "customizeyoursink.com", true },
- { "custompapers.com", true },
- { "customradio.tk", true },
- { "customsportsocks.com", true },
- { "customwebsitesplus.com", true },
- { "customwritings.com", true },
- { "customwritten.com", true },
- { "cutieland.to", true },
- { "cutlinks.ml", true },
- { "cutmylink.gq", true },
- { "cutner.co", true },
- { "cuvva.co", true },
- { "cuvva.co.uk", true },
- { "cuvva.com", true },
- { "cuvva.eu", true },
- { "cuvva.io", true },
- { "cuvva.it", true },
- { "cuvva.me", true },
- { "cuvva.net", true },
- { "cuvva.org", true },
- { "cuvva.uk", true },
- { "cuvva.us", true },
- { "cuxpool.net", true },
- { "cvazquez.es", true },
- { "cvc.digital", true },
- { "cvchomes.com", true },
- { "cvcoders.com", true },
- { "cve-le-carrousel.ch", false },
- { "cviip.ca", true },
- { "cviip.com", true },
- { "cvj.me", true },
- { "cvl.ch", false },
- { "cvlibrary.co.uk", true },
- { "cvmatch.me", true },
- { "cvmu.jp", true },
- { "cvo-group.com", true },
- { "cvr.dk", true },
- { "cvtemplatemaster.com", true },
- { "cvtshop.com.br", true },
- { "cvutdecin.cz", true },
- { "cvv.cn", true },
- { "cw.center", true },
- { "cwaclub.tk", true },
- { "cwbrtrust.ca", true },
- { "cwc.gov", true },
- { "cwgaming.co.uk", true },
- { "cwmart.in", true },
- { "cwrau.com", true },
- { "cwrau.de", true },
- { "cwrau.info", true },
- { "cwrau.io", true },
- { "cwrau.me", true },
- { "cwrau.name", true },
- { "cwrau.rocks", true },
- { "cwrau.tech", true },
- { "cwrcoding.com", true },
- { "cwwise.com", true },
- { "cx100.io", true },
- { "cxadd.com", true },
- { "cyanghost.com", true },
- { "cyanhexagon.com", true },
- { "cyber-core.co.uk", true },
- { "cyber-travel.com", true },
- { "cyber-yaroslavl.tk", true },
- { "cyber.je", true },
- { "cyberatlantis.com", true },
- { "cybercareers.gov", true },
- { "cybercat-tver.tk", true },
- { "cybercrew.cc", true },
- { "cybercrew.rocks", true },
- { "cybercrime-forschung.de", true },
- { "cybercrime.gov", true },
- { "cybercustodian.com", true },
- { "cyberdean.fr", true },
- { "cyberdev.cf", true },
- { "cyberdiscoverycommunity.uk", true },
- { "cyberduck.io", true },
- { "cyberfamily.network", true },
- { "cyberforensics.com", true },
- { "cyberfrancais.ro", true },
- { "cybergame-host.tk", true },
- { "cybergroup.cf", true },
- { "cyberhazard.eu", true },
- { "cyberhipsters.nl", true },
- { "cyberianhusky.com", false },
- { "cyberium-planet.cf", true },
- { "cyberlab.team", true },
- { "cyberlegal.co", true },
- { "cybermaniac.tk", true },
- { "cyberme.sh", true },
- { "cybermotives.com", true },
- { "cybernetivdigital.com", true },
- { "cyberogism.com", true },
- { "cyberonesol.com", true },
- { "cyberoptic.de", true },
- { "cyberpathogen.me", true },
- { "cyberpcforum.com", true },
- { "cyberphaze.com", true },
- { "cyberphoenix.tk", true },
- { "cyberpubonline.com", true },
- { "cybersafesolutions.com", true },
- { "cyberscan.io", true },
- { "cybersecurite-info.fr", true },
- { "cybersecurity.gr", true },
- { "cybersecurity.run", true },
- { "cybersecuritychallenge.be", false },
- { "cyberseguranca.com.br", true },
- { "cybershark.space", true },
- { "cybersins.com", true },
- { "cybersmart.co.uk", true },
- { "cybersmartdefence.com", true },
- { "cybersound.tk", true },
- { "cyberspect.com", true },
- { "cyberspect.io", true },
- { "cyberstatus.de", true },
- { "cybertrash.xyz", true },
- { "cybertu.be", true },
- { "cyberwars.dk", true },
- { "cyberwire.nl", true },
- { "cyberxpert.nl", true },
- { "cybozu.cn", true },
- { "cybozu.com", true },
- { "cycledownunder.com", true },
- { "cycleluxembourg.lu", true },
- { "cyclinggoodso.com", true },
- { "cyclonebikes.com.ua", true },
- { "cyclonedesign.ca", true },
- { "cyclowiz.com", true },
- { "cydetec.com", true },
- { "cyfly.org", true },
- { "cygnan.com", true },
- { "cygnatus.com", true },
- { "cygnius.net", true },
- { "cykelbanor.se", true },
- { "cyl6.com", true },
- { "cylindehea.com", true },
- { "cylindricity.com", true },
- { "cyllos.me", true },
- { "cynicaloptimist.me", true },
- { "cyon.ch", true },
- { "cyph.audio", true },
- { "cyph.com", true },
- { "cyph.healthcare", true },
- { "cyph.im", true },
- { "cyph.io", true },
- { "cyph.me", true },
- { "cyph.video", true },
- { "cyph.ws", true },
- { "cyphar.com", true },
- { "cypherpunk.at", true },
- { "cypherpunk.observer", true },
- { "cypressinheritancesaga.com", true },
- { "cypresslegacy.com", true },
- { "cyprus-company-service.com", true },
- { "cyrano-books.com", true },
- { "cysec.biz", true },
- { "cysmo.de", true },
- { "cytat.tk", true },
- { "cytech.com.tr", true },
- { "cythereaxxx.com", true },
- { "cyumus.com", true },
- { "cz.ma", true },
- { "czakey.net", true },
- { "czaw.org", true },
- { "czbix.com", true },
- { "czbtm.com", true },
- { "czc.cz", true },
- { "czech.is", true },
- { "czechvirus.cz", true },
- { "czerno.com", true },
- { "czk.mk", true },
- { "czprothz.tk", true },
- { "czwartybrat.pl", true },
- { "czzs.org", true },
- { "d-20.fr", true },
- { "d-consultant.ru", true },
- { "d-designerin.de", true },
- { "d-eisenbahn.com", true },
- { "d-macindustries.com", true },
- { "d-parts.de", true },
- { "d-parts24.de", true },
- { "d-training.de", true },
- { "d-vision-web.com", true },
- { "d.nr", true },
- { "d00228.com", false },
- { "d00d.de", true },
- { "d0g.cc", true },
- { "d0m41n.name", true },
- { "d0xq.com", true },
- { "d2.gg", true },
- { "d2ph.com", true },
- { "d30365.com", true },
- { "d36533.com", true },
- { "d3a.xyz", true },
- { "d3lab.net", true },
- { "d3xt3r01.tk", true },
- { "d42.no", true },
- { "d4b.in.ua", true },
- { "d4done.com", true },
- { "d4fx.de", true },
- { "d4rkdeagle.tk", true },
- { "d4x.de", true },
- { "d64.nl", true },
- { "d66.ag", true },
- { "d66.nl", true },
- { "d6c5yfulmsbv6.cloudfront.net", true },
- { "d7035.com", true },
- { "d7215.com", true },
- { "d8.ag", true },
- { "d8.io", true },
- { "d8118.com", true },
- { "d8228.com", true },
- { "d8778.com", true },
- { "d8787.net", true },
- { "d88.ag", true },
- { "d88.cc", false },
- { "d88.cn.com", true },
- { "d88.com", true },
- { "d881.net", true },
- { "d8811.net", true },
- { "d88111.com", true },
- { "d8812.com", true },
- { "d8813.com", true },
- { "d8814.com", true },
- { "d8816.net", true },
- { "d8817.com", true },
- { "d8819.com", true },
- { "d8824.com", true },
- { "d88322.com", true },
- { "d88333.com", true },
- { "d8834.com", true },
- { "d8842.com", true },
- { "d8843.com", true },
- { "d8845.com", true },
- { "d8847.com", true },
- { "d8850.net", true },
- { "d88522.com", true },
- { "d8853.com", true },
- { "d8854.com", true },
- { "d8859.com", true },
- { "d886.net", true },
- { "d8860.net", true },
- { "d8861.com", true },
- { "d8864.com", true },
- { "d8870.net", true },
- { "d8872.net", true },
- { "d8874.com", true },
- { "d8878.com", true },
- { "d888.ag", true },
- { "d888.co", true },
- { "d888.me", true },
- { "d88818.com", true },
- { "d88870.com", true },
- { "d88877.com", true },
- { "d88882.com", true },
- { "d8890.net", true },
- { "d8897.com", true },
- { "d8898.com", true },
- { "d88988.com", true },
- { "d88998.com", true },
- { "d88agent.com", true },
- { "d88dc05.com", true },
- { "d88md03.com", true },
- { "d88md24.com", true },
- { "d88md29.com", true },
- { "d8998.com", true },
- { "d9c.eu", true },
- { "daaje-und-andre.de", true },
- { "daallexx.eu", true },
- { "dabasstacija.lv", true },
- { "dabuttonfactory.com", true },
- { "daceurope.co.uk", true },
- { "dachb0den.net", true },
- { "dachbleche24-shop.de", true },
- { "dachdecker-ranzenberger.de", true },
- { "dachdeckermeister-egon-weiss.de", true },
- { "dachtechnik-windschuettl.de", true },
- { "daciaforum.nl", true },
- { "daciamodellen.nl", true },
- { "dadadani.xyz", true },
- { "dadafterforty.be", true },
- { "daddybio.com", true },
- { "dado.fr", true },
- { "dado.me", true },
- { "dado.virtual.museum", true },
- { "dadosch.de", true },
- { "dadrian.io", true },
- { "dadstersgroup.com", true },
- { "daduke.org", true },
- { "daemen.org", true },
- { "daemon-hentai.tk", true },
- { "daemwool.ch", true },
- { "daevel.com", true },
- { "daevel.fr", true },
- { "daevel.net", true },
- { "dafe2021.ee", true },
- { "dafont.com", true },
- { "dafricapress.com", true },
- { "daftarhajiumroh.com", true },
- { "dafyddcrosby.com", true },
- { "dag-hebergement.fr", true },
- { "dag-konsult.com", true },
- { "dagensannonser.se", true },
- { "dagmarhamalova.cz", true },
- { "dagrs.se", true },
- { "dahlberg.cologne", true },
- { "dahobo.tk", true },
- { "dai94.com", true },
- { "daibetter.com", true },
- { "daidr.me", true },
- { "daie-inc.com", true },
- { "daigakujuken-plus.com", true },
- { "daikoz.com", true },
- { "dailybits.be", true },
- { "dailyblogged.com", true },
- { "dailychristianpodcast.com", true },
- { "dailydote.com", true },
- { "dailyemailinboxing.com", true },
- { "dailyenglishchallenge.com", true },
- { "dailyhealthguard.com", true },
- { "dailykos.com", true },
- { "dailynewsclubs.ga", true },
- { "dailyrenewblog.com", true },
- { "dailyrover.com", true },
- { "dailyroverr.com", true },
- { "dailysuperheroes.com", true },
- { "dailyxenang.com", true },
- { "daimafengzi.com", true },
- { "dairyshrine.org", true },
- { "daisakuikeda.org", true },
- { "daisidaniels.co.uk", true },
- { "daisy-peanut.com", true },
- { "daisypeanut.com", true },
- { "daiwan.cool", true },
- { "dajiadu.net", true },
- { "dajiadu8.com", true },
- { "dajiale.org", true },
- { "dak.org", true },
- { "dakin.nyc", true },
- { "dakindesign.com", true },
- { "dakinnyc.com", true },
- { "daknob.net", true },
- { "dakota-spain.tk", true },
- { "dakotasjoint.com", true },
- { "dakshm.in", true },
- { "daktarisys.com", true },
- { "dal.net.sa", true },
- { "daladubbeln.se", true },
- { "dalaran.city", true },
- { "dalb.in", true },
- { "dalcomseo.com", true },
- { "dale-west.com", true },
- { "dalek.co.nz", true },
- { "dalfsennet.nl", true },
- { "dalianbbq.com", true },
- { "dalingk.com", true },
- { "dallaslu.com", true },
- { "dallasmenshealth.com", true },
- { "dalliard.ch", false },
- { "dallmeier.net", true },
- { "dalmatiersheusden.be", true },
- { "damaged.org", true },
- { "damasexpress.com", true },
- { "damedrogy.cz", true },
- { "damejidlo.cz", true },
- { "dameocio.com", true },
- { "damghaem.ir", true },
- { "damianus.hr", true },
- { "damianuv-blog.cz", true },
- { "damicris.ro", true },
- { "damienoreilly.org", true },
- { "daminiphysio.ca", true },
- { "damip.net", true },
- { "damirsystems.com", true },
- { "damjanovic.it", true },
- { "dammekens.be", true },
- { "damngoodpepper.com", false },
- { "damonline.dk", true },
- { "dampedia.com", true },
- { "dampt.tk", true },
- { "dan-bureau.com", true },
- { "dan-bureau.dk", true },
- { "dan.me.uk", true },
- { "danads.com", true },
- { "danajamin.com", true },
- { "danalytics.com.pe", true },
- { "danamica.dk", true },
- { "danandrum.com", true },
- { "danarozmarin.com", true },
- { "danbaldwinart.com", true },
- { "danbergen.com", true },
- { "danburycampervans.co.uk", true },
- { "danca.com", true },
- { "dance-colleges.com", true },
- { "danceylove.net", true },
- { "danchen.org", true },
- { "dancingcubs.co.uk", true },
- { "danclassroom.com", true },
- { "dandenongroadapartments.com.au", true },
- { "dandia.ro", true },
- { "danel.ski", true },
- { "danelska.pl", true },
- { "danelski.pl", true },
- { "danfromit.co.uk", true },
- { "danfromit.com", true },
- { "dangr.zone", true },
- { "danhalliday.com", true },
- { "danholloway.online", true },
- { "danhotels.co.il", true },
- { "danhotels.com", true },
- { "daniel-baumann.ch", true },
- { "daniel-cholewa.de", true },
- { "daniel-kulbe.de", true },
- { "daniel-leblanc.tk", true },
- { "daniel-milnes.co.uk", true },
- { "daniel-milnes.uk", true },
- { "daniel-ruf.de", true },
- { "daniel-wildhaber.ch", true },
- { "danielalvarez.net", true },
- { "danielas.boutique", true },
- { "daniele.tech", true },
- { "danielehniss.de", true },
- { "danielepestilli.com", true },
- { "danielgorr.de", true },
- { "danielgray.email", true },
- { "danielgray.me", true },
- { "danielguttfreundphd.net", true },
- { "danielhinterlechner.eu", true },
- { "danielhochleitner.de", true },
- { "danieliancu.com", true },
- { "danieljamesscott.org", true },
- { "danieljball.co.uk", true },
- { "danieljstevens.com", true },
- { "danielkanchev.com", true },
- { "danielkoster.nl", true },
- { "danielluisrodriguezs.com", true },
- { "danielmartin.de", true },
- { "danielmiessler.com", true },
- { "danielmoch.com", true },
- { "danielmorell.com", true },
- { "danielmostertman.com", true },
- { "danielnaaman.com", true },
- { "danielparker.com.au", true },
- { "danielpenno.com", true },
- { "danielpeukert.cz", true },
- { "danielran.com", true },
- { "danielrozenberg.com", true },
- { "danielsblog.org", true },
- { "danielsfirm.com", true },
- { "danielstach.cz", true },
- { "danielsteiner.net", true },
- { "danielstiner.me", true },
- { "danielthompson.info", true },
- { "danieltollot.de", true },
- { "danielvanassen.nl", true },
- { "danielvoogsgerd.nl", true },
- { "danielwildhaber.ch", true },
- { "danifabi.eu", true },
- { "danilapisarev.com", true },
- { "danilov-abrosimov.org.ua", true },
- { "danjesensky.com", true },
- { "dank.ninja", true },
- { "dankim.de", false },
- { "danla.nl", true },
- { "danmaby.com", true },
- { "danmarksbedstefredagsbar.dk", true },
- { "danmarksflyttemand.dk", true },
- { "danmassarano.com", true },
- { "danminkevitch.com", false },
- { "danna-salary.com", true },
- { "danndorf.com", false },
- { "dannhanks.com", true },
- { "dannicholas.net", true },
- { "danny-tittel.de", true },
- { "dannycairns.com", true },
- { "dannygaidateraelgar.com", true },
- { "dannyjota.tk", true },
- { "dannystevens.co.uk", true },
- { "danonsecurity.com", true },
- { "danotage.tv", true },
- { "danoz.net", true },
- { "danpiel.net", true },
- { "dansage.co", true },
- { "dansaunders.me", true },
- { "dansdiscounttools.com", true },
- { "dansedesalonsaintave.fr", true },
- { "danselibre.net", true },
- { "danselibre.org", true },
- { "danseressen.nl", true },
- { "dansk8bit.dk", true },
- { "danskefilm.dk", true },
- { "danskoferie.dk", true },
- { "danskoya.com", true },
- { "danslan.org", true },
- { "danstillman.com", true },
- { "dante.com", true },
- { "dantransports.fr", true },
- { "danw.io", true },
- { "danwin1210.me", true },
- { "danwise.online", true },
- { "danwolff.se", true },
- { "danyabanya.com", true },
- { "danzac.com", true },
- { "danzka.tk", true },
- { "dao.spb.su", true },
- { "daop.co.uk", true },
- { "daoro.net", false },
- { "daphne.informatik.uni-freiburg.de", true },
- { "daphnes-restaurant.co.uk", true },
- { "dapianw.com", true },
- { "dapim.co.il", true },
- { "dapoxetinagenerico.cf", true },
- { "dapperdom.net", true },
- { "daracokorilo.com", true },
- { "darani.ch", true },
- { "daravk.ch", true },
- { "darc-mak.de", true },
- { "darchoods.net", false },
- { "darcymarshall.com", true },
- { "dare.deals", true },
- { "dareyou.be", true },
- { "darf.nl", true },
- { "darfurwall.org", true },
- { "dariaburger.de", true },
- { "daridarkom.fr", true },
- { "darinkotter.com", true },
- { "darioclip.com", true },
- { "darioturchetti.me", true },
- { "dark-archive.com", true },
- { "dark-crystal.tk", true },
- { "dark-infection.de", true },
- { "dark-nova.me", true },
- { "dark-nova.tk", true },
- { "dark-vision.cz", true },
- { "dark.fail", true },
- { "dark.ninja", true },
- { "darkag.ovh", true },
- { "darkcards.xyz", true },
- { "darkcores.net", true },
- { "darkengine.io", true },
- { "darkengine.net", true },
- { "darkenluster.space", true },
- { "darkeststar.org", true },
- { "darkfire.ch", true },
- { "darklang.com", true },
- { "darklaunch.com", true },
- { "darkleia.com", true },
- { "darknessflickers.com", false },
- { "darknetlive.com", true },
- { "darknight.blog", true },
- { "darkrisks.com", true },
- { "darkserver.fedoraproject.org", true },
- { "darkserver.stg.fedoraproject.org", true },
- { "darkshop.nl", true },
- { "darkskymap.com", true },
- { "darktime.ru", true },
- { "darkwater.info", true },
- { "darkx.me", true },
- { "darlenejacques.com", true },
- { "darmgesundheit.ch", true },
- { "darom.jp", true },
- { "darshnam.com", true },
- { "dartcode.org", true },
- { "dartetdemetiers.fr", true },
- { "darth-sonic.de", true },
- { "darwinkel.net", true },
- { "darwinsearch.org", true },
- { "darylcrouse.com", true },
- { "darylcumbo.net", true },
- { "das-forum24.de", true },
- { "das-mediale-haus.de", true },
- { "das-sommercamp.de", true },
- { "dasgeestig.nl", true },
- { "dashadmit123.com", true },
- { "dashdrive.net", true },
- { "dashlane.com", true },
- { "dashnearby.com", true },
- { "dasignsource.com", true },
- { "dasinternetluegt.at", true },
- { "dassolutions.eu", true },
- { "dasteichwerk.at", true },
- { "dasug.de", true },
- { "dat4u.de", true },
- { "data-captive.com", true },
- { "data-detox.de", true },
- { "data-jt.de", true },
- { "data-wing.ga", false },
- { "data.bayern", true },
- { "data.gov", true },
- { "data.govt.nz", true },
- { "data.haus", true },
- { "data.world", true },
- { "data3w.nl", true },
- { "databionix.com", true },
- { "databutlr.com", true },
- { "databutlr.net", true },
- { "datacalle.com", true },
- { "datacaptive.com", true },
- { "datacenternews.asia", true },
- { "datacenternews.us", true },
- { "datacentrenews.eu", true },
- { "datacommissioner.gov.au", true },
- { "datadit.hu", true },
- { "datadraugen.no", true },
- { "datadyne.technology", true },
- { "dataformers.at", true },
- { "datagrail.io", true },
- { "dataharvest.at", true },
- { "datahive360.com", true },
- { "datahjalp.nu", true },
- { "datajobs.ai", true },
- { "datakick.org", true },
- { "datakl.com", true },
- { "datalife.gr", true },
- { "datalysis.ch", false },
- { "dataman.ml", true },
- { "dataprivacysolution.com", true },
- { "datapun.ch", true },
- { "dataregister.info", true },
- { "datart.fr", true },
- { "datasafeassurance.co.uk", true },
- { "datascience.cafe", true },
- { "datascience.ch", false },
- { "dataskydd.net", false },
- { "dataspace.pl", true },
- { "datasubject.com", true },
- { "datasubjects.com", true },
- { "datasupport-stockholm.se", true },
- { "datasupport.one", true },
- { "dataswamp.org", true },
- { "datatekniikka.fi", false },
- { "datatekniker.nu", true },
- { "datateknologsektionen.se", false },
- { "datatree.nl", true },
- { "datatruckers.com", true },
- { "datatruckers.email", true },
- { "datatruckers.eu", true },
- { "datatruckers.net", true },
- { "datatruckers.nl", true },
- { "datatruckers.org", true },
- { "datatypes.net", true },
- { "datax-cloud.de", true },
- { "datecougarslocal.com", true },
- { "datelah.com", true },
- { "datememe.com", true },
- { "datenendlager.org", true },
- { "datengrab.xyz", true },
- { "datenkeks.de", true },
- { "dateno1.com", true },
- { "datenreiter.org", true },
- { "datensalat.info", true },
- { "datenschutz-consult.de", true },
- { "datenschutz-gruenwald.de", true },
- { "datenschutz-individuell.de", true },
- { "datenschutz-isny.de", true },
- { "datenschutz-leutkirch.de", true },
- { "datenschutz-oberschwaben.de", true },
- { "datenschutz-ravensburg.de", true },
- { "datenschutz-wangen.de", true },
- { "datenschutz-weingarten.de", true },
- { "datenschutzgrundverordnung.de", true },
- { "datenschutztag.org", true },
- { "datenschutzzentrum.de", true },
- { "datenwerkstatt.net", true },
- { "datewon.net", true },
- { "dating.wedding", true },
- { "datingsrit.tk", true },
- { "datisstom.nl", true },
- { "datmancrm.com", true },
- { "datometry.com", true },
- { "dator-test.se", true },
- { "datorhjalp-stockholm.se", true },
- { "datorhjalptaby.se", true },
- { "datorservice-stockholm.se", true },
- { "datumou-osusume.com", true },
- { "datumplus.co.uk", true },
- { "datumstudio.jp", true },
- { "daubecity.de", true },
- { "daubehosting.de", true },
- { "daunatotala.ro", true },
- { "dautuvang.net", true },
- { "dave-pearce.com", true },
- { "daveaglick.com", true },
- { "davecardwell.com", true },
- { "davedevries.nl", true },
- { "davelage.com", true },
- { "davelynes.com", true },
- { "daveoc64.co.uk", true },
- { "daveops.net", true },
- { "davepage.me.uk", true },
- { "davepearce.com", true },
- { "davepermen.net", true },
- { "davescomputertips.com", true },
- { "davesharpe.com", true },
- { "davesinclair.com.au", true },
- { "davetempleton.com", true },
- { "davethom.net", true },
- { "davevelopment.net", true },
- { "davewardle.com", true },
- { "davewood.com.au", true },
- { "david-corry.com", true },
- { "david-edu.com", true },
- { "david-hinschberger.me", true },
- { "david-jeffery.co.uk", true },
- { "david-merkel.de", true },
- { "david-pearce.com", true },
- { "david-reess.de", true },
- { "david-schiffmann.de", true },
- { "david.kitchen", true },
- { "davidadrian.org", true },
- { "davidandersson.se", true },
- { "davidandrewcoaching.com", true },
- { "davidbranco.me", true },
- { "davidbrookes.me", true },
- { "davidbuckell.com", true },
- { "daviddejori.com", true },
- { "davidelstob.com", true },
- { "davidfetveit.com", true },
- { "davidfindlay.org", true },
- { "davidfrancoeur.com", true },
- { "davidgouveia.net", true },
- { "davidgow.net", true },
- { "davidgreig.uk", true },
- { "davidgroup.co.id", true },
- { "davidgrudl.com", true },
- { "davidhanle.com", true },
- { "davidje13.com", true },
- { "davidkeane.com", true },
- { "davidkennardphotography.com", true },
- { "davidking.xyz", true },
- { "davidlamprea.com", true },
- { "davidlamprea.eu", true },
- { "davidlane.io", false },
- { "davidlindekilde.dk", true },
- { "davidlyness.com", true },
- { "davidmcevoy.org.uk", true },
- { "davidmessenger.co.uk", true },
- { "davidmn.org", true },
- { "davidpearce.com", true },
- { "davidpearce.org", true },
- { "davidpescarolo.it", true },
- { "davidschadlich.com", true },
- { "davidschlachter.com", true },
- { "davidschubert.com", true },
- { "davidsimner.me.uk", true },
- { "davidsopas.com", true },
- { "davidtiffany.com", true },
- { "davidundetiwan.com", true },
- { "davidzeegers.nl", true },
- { "davidzimmerman3.com", true },
- { "davie3.com", true },
- { "davisdieselandautorepair.com", true },
- { "davo-usedcars.be", false },
- { "davy-server.com", true },
- { "daw.nz", true },
- { "dawgs.ga", true },
- { "dawnbringer.eu", true },
- { "dawnbringer.net", true },
- { "dawnofeden.net", true },
- { "dawoud.org", true },
- { "dawson-floridavilla.co.uk", true },
- { "dax.guide", true },
- { "daxpatterns.com", true },
- { "daxterfellowesservers.com", true },
- { "daycontactlens.com", true },
- { "daygametraining.com", true },
- { "daylightpirates.org", true },
- { "daymprove.life", true },
- { "dayofdays.be", true },
- { "dayofthegirl.gc.ca", true },
- { "daysgolfclub.net", true },
- { "daysinnaustin.com", true },
- { "daysoftheyear.com", true },
- { "dayswithnostabbings.ca", true },
- { "dayuse-hotels.it", true },
- { "dayuse.co.uk", true },
- { "dayuse.com", true },
- { "dayuse.cz", true },
- { "dayuse.es", true },
- { "dayuse.fr", true },
- { "dayuse.pt", true },
- { "dayuse.se", true },
- { "dazz.it", true },
- { "dazzit.ca", true },
- { "dazzit.com", true },
- { "dazzit.io", true },
- { "dazzit.net", true },
- { "dazzit.org", true },
- { "dazzit.xyz", true },
- { "db-works.nl", true },
- { "db.ci", true },
- { "dbaron.org", true },
- { "dbas.cz", true },
- { "dbcartography.com", true },
- { "dbentertainment.co.uk", true },
- { "dbgamestudio.com", true },
- { "dblcastles.co.uk", true },
- { "dbldub.net", true },
- { "dbmiller.org", true },
- { "dbmteam.com", true },
- { "dborcard.com", false },
- { "dbpkg.com", true },
- { "dbplanview.com", true },
- { "dbq.com", true },
- { "dbrand.com", true },
- { "dbrgn.ch", true },
- { "dbtsai.com", false },
- { "dc-acupuncture.com", true },
- { "dc-elektro.com", true },
- { "dc-elektro.de", true },
- { "dc-elektro.eu", true },
- { "dc-occasies.be", false },
- { "dc-solution.de", false },
- { "dc1.com.br", true },
- { "dc562.org", true },
- { "dcain.me", true },
- { "dcave.net", true },
- { "dcbouncycastles.co.uk", true },
- { "dcc.cat", true },
- { "dcc.moe", true },
- { "dccwiki.com", true },
- { "dcdestetica.it", true },
- { "dcdn.lt", true },
- { "dcepler.net", true },
- { "dchatelain.ch", false },
- { "dchest.org", true },
- { "dckd.nl", true },
- { "dclaisse.fr", true },
- { "dcmapping.net", true },
- { "dcmarvelunited.com", true },
- { "dcmediahosting.com", true },
- { "dcmt.co", true },
- { "dcpower.eu", true },
- { "dcrdev.com", true },
- { "dcw.io", true },
- { "dcyph.de", true },
- { "dd.art.pl", true },
- { "dd.center", true },
- { "dd00228.com", false },
- { "dd118d.com", true },
- { "dd11d.net", true },
- { "dd202d.com", true },
- { "dd207d.com", true },
- { "dd209d.com", true },
- { "dd211d.com", true },
- { "dd215d.com", true },
- { "dd44d.net", true },
- { "ddatsh.com", true },
- { "ddays2008.org", true },
- { "dddmelbourne.com", true },
- { "ddel.de", true },
- { "dden.ca", true },
- { "ddepot.us", true },
- { "ddhosted.com", true },
- { "ddjlawtampa.com", true },
- { "ddkkitchens.com", true },
- { "ddns-test.de", true },
- { "ddnsweb.com", false },
- { "ddoser.cn", false },
- { "ddosguard.cf", true },
- { "ddosolitary.org", true },
- { "ddracepro.net", true },
- { "dds.mil", true },
- { "dds.pe", true },
- { "ddsmatchsouthwest.com", true },
- { "de-gucci.com", true },
- { "de-kramers.nl", true },
- { "de-mail.info", true },
- { "de-medici.nl", true },
- { "de-mossadeq.tk", true },
- { "de-rwa.de", true },
- { "de.search.yahoo.com", false },
- { "de8468.com", true },
- { "dead-letter.email", true },
- { "deadbeef.ninja", true },
- { "deadc0de.re", true },
- { "deadmorose.ru", true },
- { "deadpulse.com", true },
- { "deadroot.tk", true },
- { "deaf.dating", true },
- { "deaf.eu.org", true },
- { "deal-runners.cf", true },
- { "deal30.fr", true },
- { "dealapp.nl", true },
- { "dealbanana.at", true },
- { "dealbanana.be", true },
- { "dealbanana.ch", true },
- { "dealbanana.co.uk", true },
- { "dealbanana.com", true },
- { "dealbanana.de", true },
- { "dealbanana.fi", true },
- { "dealbanana.fr", true },
- { "dealbanana.it", true },
- { "dealbanana.se", true },
- { "dealbx.com", true },
- { "dealcruiser.nl", true },
- { "dealdump.nl", true },
- { "dealerbrindes.com.br", true },
- { "dealerselectric.com", true },
- { "dealerwriter.com", true },
- { "dealinflatables.co.uk", true },
- { "dealosa.com", true },
- { "dealsale.com", true },
- { "dealspotr.com", true },
- { "dealszone.net", true },
- { "deamuseum.org", true },
- { "deanandnatalia.co.za", true },
- { "deanbank.com", true },
- { "deanjerkovich.com", true },
- { "deanmorgan.org", true },
- { "deano-s.co.uk", true },
- { "deanosplace.net", true },
- { "deanpearce.net", true },
- { "deantiguos.es", true },
- { "dearfcc.com", true },
- { "dearfcc.net", true },
- { "dearfcc.org", true },
- { "dearktiel.nl", true },
- { "dearnevalleybouncycastles.co.uk", true },
- { "death.social", true },
- { "deathofspring.com", false },
- { "deathorglory.cc", true },
- { "deathsdomain.com", true },
- { "deathy.ro", true },
- { "deautomaat.nl", true },
- { "deavel.com", true },
- { "deavel.fr", true },
- { "deavel.net", true },
- { "debatereport.com", true },
- { "debbyefurd.com", true },
- { "debie-usedcars.be", false },
- { "debierhandel.nl", true },
- { "debigare.com", true },
- { "debitterballetjes.tk", true },
- { "debron-ot.nl", true },
- { "debrusoft.ch", true },
- { "debtrecycling.com.au", true },
- { "debuemon.com", true },
- { "debuis.nl", true },
- { "debzsh.tk", true },
- { "dec6.gc.ca", true },
- { "decal-times.com", true },
- { "decalquai.ch", false },
- { "decarrouseloss.nl", true },
- { "decaturwomensports.com", true },
- { "dechat.nl", true },
- { "dechetor.fr", true },
- { "decidio.cc", true },
- { "decimatechnologies.eu", true },
- { "decipe.com", true },
- { "decis.fr", true },
- { "decisivetactics.com", true },
- { "deck.academy", true },
- { "deckenplatten.org", true },
- { "declarationlocationmeublee.com", true },
- { "deco-parisienne.fr", true },
- { "decock-usedcars.be", false },
- { "decode.ga", true },
- { "decofiori.com", true },
- { "decologisticsgh.com", true },
- { "decompiled.de", true },
- { "deconsolas.tk", true },
- { "deconstructind.ro", true },
- { "decoora.com", true },
- { "decor-d.com", true },
- { "decor-live.ru", true },
- { "decor-prazdnik.ru", true },
- { "decorarmicasa.com", true },
- { "decoratingadvice.co.uk", true },
- { "decorativeconcretewa.com.au", true },
- { "decorativeflooring.com", true },
- { "decoratore.roma.it", true },
- { "decoratrix.com", true },
- { "decorestilo.com.br", true },
- { "decorotti.com.tr", true },
- { "decosoftware.com", true },
- { "decrousaz-ceramique.ch", false },
- { "decrypto.net", true },
- { "decs.es", true },
- { "dede.ml", true },
- { "dedelta.net", true },
- { "dedg3.com", true },
- { "dedge.org", true },
- { "dedicatedtowomenobgyn.com", true },
- { "dedmoroz.ga", true },
- { "dedmorozrzn.ru", false },
- { "dedoho.pw", false },
- { "dedoles.at", true },
- { "dedoles.com", true },
- { "dedoles.cz", true },
- { "dedoles.de", true },
- { "dedoles.hu", true },
- { "dedoles.pl", true },
- { "dedoles.ro", true },
- { "dedoles.sk", true },
- { "deduijventil.nl", true },
- { "dee.pe", true },
- { "dee.su", true },
- { "deechtebakkers.nl", true },
- { "deegeeinflatables.co.uk", true },
- { "deejayladen.de", true },
- { "deelmijnreis.nl", true },
- { "deelodge.art", true },
- { "deemlove.com", true },
- { "deep-chess.com", true },
- { "deep-labs.com", true },
- { "deep.club", true },
- { "deepbluecrafting.co.uk", true },
- { "deepblueemail.com", true },
- { "deepcode.io", true },
- { "deephill.com", true },
- { "deepinnov.com", true },
- { "deepinsight.io", true },
- { "deeplink-medical.com", true },
- { "deepserve.info", true },
- { "deepsouthsounds.com", true },
- { "deepspace.dedyn.io", true },
- { "deepspace4.com", true },
- { "deerfieldapartmentsstl.com", true },
- { "deerwoodrvpark.com", true },
- { "def-pos.ru", true },
- { "defamiliehagen.com", true },
- { "defantasia.cl", true },
- { "defcon.org", true },
- { "defcongroups.org", true },
- { "defeestboek.nl", true },
- { "defendas.com", true },
- { "defendbearbutte.org", true },
- { "defender-pro.com", true },
- { "defendersz.com", true },
- { "defendinnovation.org", true },
- { "defendtheweb.net", true },
- { "defensivefirearmsinstruction.org", true },
- { "defero.io", true },
- { "defesa.gov.br", true },
- { "defesaaereanaval.com.br", true },
- { "deffo.com.au", true },
- { "defiant.com", true },
- { "defiantrust.com", true },
- { "defibrillateur.co", true },
- { "define-atheism.com", true },
- { "define-atheist.com", true },
- { "defineatheism.com", true },
- { "defineatheist.com", true },
- { "definingterms.com", true },
- { "definitely.cn", true },
- { "definitions360.com", true },
- { "defis-franciliens.fr", true },
- { "deflect.ca", true },
- { "deflumeri.com", true },
- { "deflumeriker.com", true },
- { "defont.nl", true },
- { "defreitas.no", true },
- { "deftek.com", true },
- { "defterikebir.tk", true },
- { "deftig-und-fein.de", true },
- { "deftnerd.com", true },
- { "defunct-engineers.ml", true },
- { "defuse.ca", true },
- { "defxing.net", true },
- { "degata.com", true },
- { "degeberg.com", true },
- { "degeberg.dk", true },
- { "degeeks.xyz", true },
- { "degen-elektrotechnik.de", true },
- { "degeneracy.xyz", true },
- { "degestamptepot.nl", true },
- { "degit.de", true },
- { "degoeiewebsite.cf", true },
- { "degoticapunk.xyz", true },
- { "degoulet.net", true },
- { "degracetechnologie.com", true },
- { "degradarium.com", true },
- { "degressif.com", true },
- { "degroupage.info", true },
- { "dehopre.com", true },
- { "deidee.nl", true },
- { "deimos.gq", true },
- { "dein-baumdienst.de", true },
- { "dein-trueffel.de", true },
- { "deinballon.de", true },
- { "deine-gitarre.com", true },
- { "deinelakaien.tk", true },
- { "deinfoto.ch", true },
- { "deitti.net", true },
- { "dejandayoff.com", true },
- { "dejongonline.eu", true },
- { "dejting-sidor.com", true },
- { "dejure.org", false },
- { "dejw.cz", true },
- { "dekasegi-kansai.com", true },
- { "dekasegi-supportcenter.com", true },
- { "dekasiba.com", true },
- { "dekel.co.il", true },
- { "dekeurslagers.nl", true },
- { "dekko.io", true },
- { "dekonix.ru", true },
- { "dekruifschalkwijk.nl", true },
- { "dekulk.nl", true },
- { "del-ex.de", true },
- { "delahrzolder.nl", true },
- { "delam.site", true },
- { "delbecqvo.be", false },
- { "deleenheir.be", true },
- { "deleidscheflesch.nl", true },
- { "delfi.lt", true },
- { "delfic.org", true },
- { "delhionlinegifts.com", true },
- { "deliacreates.com", true },
- { "deliandiver.org", true },
- { "deliberatedigital.com", true },
- { "deliciisanatoase.ro", true },
- { "deliciousmedia.co.uk", true },
- { "deliciousmedia.net", true },
- { "delicioustable.com", true },
- { "delicon.jp", true },
- { "delid.cz", true },
- { "delijan24.ir", true },
- { "delio.tk", true },
- { "dellacasapizzasemassas.com.br", true },
- { "delogo.nl", true },
- { "delopt.co.in", true },
- { "delorenzi.dk", true },
- { "deloretta.com", true },
- { "delosgaia.nl", true },
- { "delpark.de", true },
- { "delphia.ai", true },
- { "delphia.com", true },
- { "delphine.dance", true },
- { "delta-data.ch", true },
- { "delta-host.ml", true },
- { "delta-smart.ch", true },
- { "delta.ru", true },
- { "delta23.de", false },
- { "deltaacademy.org", true },
- { "deltadata.ch", true },
- { "deltafinanceiro.com", true },
- { "deltafinanceiro.com.br", true },
- { "deltaloja.com.br", true },
- { "deltanio.nl", true },
- { "deltaonlineguards.com", true },
- { "deltaservers.blog.br", true },
- { "deltaservers.com.br", true },
- { "deltasigmachi.org", true },
- { "deltatutoriais.com.br", true },
- { "deltav.ml", false },
- { "deltava.org", true },
- { "deltawolf.tk", true },
- { "deltna.com", true },
- { "deluxe-dubai.com", true },
- { "demadryn.com", true },
- { "demarle.ch", false },
- { "demastglazenwasserij.nl", true },
- { "demedx.at", true },
- { "dementiacaring.com.au", true },
- { "dementiapraecox.de", true },
- { "dementieva-pennetta.tk", true },
- { "demeyere-usedcars.be", false },
- { "demfloro.ru", true },
- { "demibaguette.com", true },
- { "demicrofonos.com", true },
- { "demijn.nl", true },
- { "demilletech.net", true },
- { "demiranda.com", true },
- { "demirdokum.tk", true },
- { "demmer.one", true },
- { "demo.swedbank.se", true },
- { "demo9.ovh", true },
- { "democracy-news.tk", true },
- { "democracychronicles.com", true },
- { "democracydirect.com", true },
- { "democracyineurope.eu", true },
- { "democraziaineuropa.eu", true },
- { "demolandia.net", true },
- { "demomanca.com", true },
- { "demonbuster.tk", true },
- { "demongey.com", true },
- { "demoniak.ch", false },
- { "demonwav.com", true },
- { "demonwolfdev.com", true },
- { "demopanel.tk", true },
- { "demotivatorbi.ru", true },
- { "dempsters.ca", false },
- { "demuzere.be", true },
- { "denabot.pw", true },
- { "denaehula.com", true },
- { "denali.net", false },
- { "denardbrewing.com", true },
- { "denariu.net", true },
- { "denatured.tk", true },
- { "denbkh.ru", false },
- { "dencel.lv", true },
- { "dendelft.nl", true },
- { "denegmnogo.tk", true },
- { "denejki.tk", true },
- { "dengivdom.tk", true },
- { "dengode.eu", true },
- { "denhotels.com", true },
- { "denimtoday.com", true },
- { "denince.net", true },
- { "denis-martinez.photos", true },
- { "denisadinu.com", true },
- { "denisewakeman.com", true },
- { "denistruffaut.fr", false },
- { "deniszczuk.pl", true },
- { "deniz.uk", true },
- { "denizdesign.co.uk", true },
- { "denkeandersblog.de", true },
- { "denkmalagentur.ch", true },
- { "denkmalsetzung.at", true },
- { "denkubator.de", true },
- { "denninger.jp", true },
- { "dennisang.com", true },
- { "dennisdoes.net", false },
- { "dennisforbes.ca", true },
- { "dennishzg.com", true },
- { "denniskoot.nl", true },
- { "dennismurphy.biz", true },
- { "dennisvandenbos.nl", true },
- { "dennogumi.org", true },
- { "denous.nl", true },
- { "denta-ua.com", true },
- { "dental-cloud.eu", true },
- { "dental-colleges.com", true },
- { "dentallaborgeraeteservice.de", true },
- { "dentechnica.co.uk", true },
- { "dentistesdarveauetrioux.com", true },
- { "dentistglasgow.com", true },
- { "dentistryateastpiedmont.com", true },
- { "dentrassi.de", true },
- { "dentystabirmingham.co.uk", true },
- { "denuevestore.com", true },
- { "denverbph.com", true },
- { "denvergospelhall.org", true },
- { "denvernews.ml", true },
- { "denwauranailab.com", true },
- { "denydarko.tk", true },
- { "deontology.com", true },
- { "depaco.com", true },
- { "depannage-traceur.fr", true },
- { "deparis.me", true },
- { "departmentofdefense.tk", true },
- { "departmentofoncology.com", true },
- { "departureboard.io", true },
- { "depeces.com", true },
- { "depechemode-live.com", true },
- { "depedclub.net", true },
- { "depedclub.ph", true },
- { "depedresources.ph", true },
- { "depedsurigaodelnorte.com", true },
- { "depedtambayan.net", true },
- { "depedtayo.ph", true },
- { "depelos.co", true },
- { "depelteau.com", true },
- { "dependablehvacrefrigeration.com", true },
- { "depicus.com", true },
- { "depleteduranium.tk", true },
- { "depone.net", true },
- { "depop.com", true },
- { "depositart.com", true },
- { "depositomerci.it", true },
- { "depositomobili.it", true },
- { "depot24.nl", true },
- { "depotsquarekerrville.com", true },
- { "depotter-usedcars.be", false },
- { "deprecate.de", true },
- { "deprobe.pro", true },
- { "depthe.gr", true },
- { "der-bank-blog.de", true },
- { "der-fliesenzauberer.de", true },
- { "der-gardinenmann.de", true },
- { "der-lan.de", true },
- { "der-rohrstock.club", true },
- { "der-rudi.eu", true },
- { "der-windows-papst.de", true },
- { "derattizzazione.name", true },
- { "derattizzazioni.biz", true },
- { "derattizzazioni.milano.it", true },
- { "derattizzazioni.org", true },
- { "derbuntering.de", true },
- { "derbybouncycastles.com", true },
- { "derco.com.co", true },
- { "derdewereldrommelmarkt.nl", true },
- { "dereddingsklos.nl", true },
- { "dereferenced.net", true },
- { "derehamcastles.co.uk", true },
- { "derekbooth.co.uk", true },
- { "derekheld.com", true },
- { "derekkent.com", true },
- { "derekseaman.com", false },
- { "derekseaman.studio", false },
- { "derenderkeks.me", true },
- { "derf.fr", true },
- { "derf.red", true },
- { "derf.us", true },
- { "dergeilstestammderwelt.de", true },
- { "derhil.de", true },
- { "derival.co.za", true },
- { "derivedata.com", true },
- { "derkuki.de", true },
- { "dermaldistinction.com", true },
- { "dermapuur.nl", true },
- { "dermato.floripa.br", true },
- { "dermatologie-morges.ch", false },
- { "dermediq.nl", true },
- { "dermopigmentista.it", true },
- { "dermot.org.uk", true },
- { "dermscc.com", true },
- { "dermsf.com", true },
- { "deroo.org", true },
- { "derp.army", true },
- { "derp.chat", true },
- { "derpibooru.org", true },
- { "derpy.pp.ua", true },
- { "derre.fr", true },
- { "derreichesack.com", true },
- { "derw.pw", true },
- { "des-hommes-et-des-clous.com", true },
- { "desafiomovilidadsustentable.com", true },
- { "desagaz.com", true },
- { "desanta.top", true },
- { "desarrollando.web.ve", true },
- { "descargar-apk.org", true },
- { "desec.io", true },
- { "desentupidorademais.com.br", true },
- { "desentupidorapernambucana.com.br", true },
- { "deseosvip.tk", true },
- { "desertbloomplasticsurgery.com", true },
- { "desertmedaesthetics.com", true },
- { "desertsounds.org", true },
- { "desheng28.com", true },
- { "deshevle-net.com", true },
- { "deshobi.cloud", true },
- { "design-in-bad.eu", true },
- { "design-tooning.de", true },
- { "design-your-life.info", true },
- { "designed-cybersecurity.com", true },
- { "designedcybersecurity.com", true },
- { "designer-drug.com", true },
- { "designera.se", true },
- { "designerchad.com", true },
- { "designgears.com", true },
- { "designgraphic.fr", true },
- { "designhuddle.com", true },
- { "designrhome.com", true },
- { "designs.codes", true },
- { "designsbyjanith.com", true },
- { "designskin.ch", false },
- { "designville.cz", true },
- { "designville.sk", true },
- { "desila.jp", true },
- { "desish.cf", true },
- { "deskaservices.com", true },
- { "deskdesign.nl", true },
- { "deskeen.fr", true },
- { "desklite.gr", true },
- { "desktopd.eu.org", false },
- { "desktopfx.net", false },
- { "deskture.com", true },
- { "desmaakvanplanten.be", true },
- { "desormiers.com", true },
- { "despachomariscal.com", true },
- { "desperate.solutions", true },
- { "despertadoronline.com.es", true },
- { "despinavandi.gr", true },
- { "desplats.com.ar", true },
- { "despora.de", true },
- { "dessinemoilademocratie.ch", false },
- { "destakbrasilbrindes.com.br", true },
- { "destech.nl", true },
- { "destroymc.net", true },
- { "destyntek.com", true },
- { "desu.ne.jp", true },
- { "desuchan.eu", true },
- { "desuchan.org", true },
- { "desynced.rocks", true },
- { "det-te.ch", true },
- { "detalhecomercio.com.br", true },
- { "detalika.ru", true },
- { "detalyedesigngroup.com", true },
- { "detao.org", true },
- { "detecmon.com", true },
- { "detecte-fuite.ch", false },
- { "detecte.ch", false },
- { "detectefuite.ch", false },
- { "detectify.com", true },
- { "detectivedesk.com.au", true },
- { "deteken.be", true },
- { "detekenmuze.nl", true },
- { "determapp.de", true },
- { "dethemium.com", true },
- { "deti-online.com", true },
- { "detki.cf", true },
- { "detki24.ru", true },
- { "detodojuegos.com", true },
- { "detoxetmoi.com", true },
- { "detreannamaria.tk", true },
- { "detroit-english.de", true },
- { "detroitzoo.org", true },
- { "detuinmuze.nl", true },
- { "detyobuv.tk", true },
- { "detype.nl", true },
- { "deu.sh", true },
- { "deude.de", true },
- { "deukie.nl", true },
- { "deumavan.ch", true },
- { "deurenfabriek.nl", true },
- { "deutsch-vietnamesisch-dolmetscher.com", true },
- { "deutsche-tageszeitungen.de", true },
- { "deutschebusiness.com", true },
- { "deutscher-bericht.de", true },
- { "deutscher-rollenspielpreis.de", true },
- { "deutscheshoponline.com", true },
- { "deutschland-dsl.de", true },
- { "dev-aries.com", true },
- { "dev-brandywineglobal.com", true },
- { "dev-greavesindia.pantheonsite.io", true },
- { "dev-gutools.co.uk", true },
- { "dev-pmcc.net", true },
- { "dev-tek.de", true },
- { "dev.moe", true },
- { "devagency.fr", true },
- { "devalps.eu", true },
- { "devbean.net", true },
- { "devcf.com", true },
- { "devcoins.org", true },
- { "devconf.nl", true },
- { "devcore.pl", true },
- { "devdeb.com", true },
- { "devel.cz", true },
- { "develop.cool", true },
- { "developer.android.com", true },
- { "developer.moe", true },
- { "developerdan.com", true },
- { "developermail.io", false },
- { "developers.facebook.com", false },
- { "developfx.com", false },
- { "developmentaid.org", true },
- { "developmentsites.melbourne", true },
- { "develops.co.il", true },
- { "develux.net", true },
- { "deviant.email", true },
- { "devicom.mx", true },
- { "devildog.tk", true },
- { "devillers-occasions.be", false },
- { "devils-co.tk", true },
- { "devils-point.de", true },
- { "devilshakerz.com", true },
- { "deviltraxxx.de", true },
- { "devinfo.net", false },
- { "devinite.com", true },
- { "devirc.net", true },
- { "devlamvzw.org", false },
- { "devlatron.net", true },
- { "devlinjurister.se", true },
- { "devlogr.com", true },
- { "devmode.fm", true },
- { "devnull.zone", true },
- { "devolution.ws", true },
- { "devops-survey.com", true },
- { "devops.pf", true },
- { "devopsish.com", true },
- { "devpp.com.br", true },
- { "devragu.com", true },
- { "devries.one", true },
- { "devsjournal.com", true },
- { "devsrvr.ru", true },
- { "devstaff.gr", true },
- { "devstores.io", false },
- { "devswag.io", true },
- { "devtea.cz", true },
- { "devtoys.ru", true },
- { "devtty.org", true },
- { "devzero.io", true },
- { "dewaard.de", true },
- { "dewalch.net", true },
- { "dewapress.com", true },
- { "dewinter.com", true },
- { "dewitteprins.nl", true },
- { "dewolden.nl", false },
- { "dex.top", true },
- { "dexalo.de", true },
- { "dexigner.com", true },
- { "dexonservicedeskws.azurewebsites.net", true },
- { "deyanadeco.com", true },
- { "deyute.com", true },
- { "dez-online.de", true },
- { "dezeregio.nl", true },
- { "dezet-ev.de", true },
- { "dezmembrariromania.ro", true },
- { "dezzoroofing.co.za", true },
- { "df1nif.de", true },
- { "df1paw.de", true },
- { "df5105.com", true },
- { "dfafacts.gov", true },
- { "dfagent.com", true },
- { "dfc52.com", true },
- { "dfctaiwan.org", true },
- { "dfektlan.no", true },
- { "dfl.mn", false },
- { "dflcares.com", true },
- { "dfmn.berlin", true },
- { "dfranke.com", true },
- { "dgangsta.net", true },
- { "dgbouncycastlehire.com", true },
- { "dgeex.eu", true },
- { "dgitup.com", true },
- { "dgportals.co.uk", true },
- { "dgpot.com", true },
- { "dgt-portal.de", true },
- { "dgtakano.co.jp", true },
- { "dgx.io", true },
- { "dh7337.com", true },
- { "dhakawebhost.com", true },
- { "dharveydev.com", true },
- { "dhautefeuille.eu", true },
- { "dhauwer.nl", true },
- { "dhaynes.xyz", true },
- { "dhconcept.ch", false },
- { "dheart.net", true },
- { "dhedegaard.dk", true },
- { "dhelixnet.de", true },
- { "dhemant.de", true },
- { "dhhs.gov", true },
- { "dhinflatables.co.uk", true },
- { "dhirendrayadav.com", true },
- { "dhit.pl", true },
- { "dhlinux.org", true },
- { "dhome.at", true },
- { "dia-de.com", true },
- { "dia.com.br", true },
- { "diabetessucks.net", true },
- { "diabhal-staff.com", true },
- { "diabhal-staff.it", true },
- { "diablocarpet.com", true },
- { "diablovalleytech.com", true },
- { "diaconat.ch", false },
- { "diadiemdangsong.com", true },
- { "diadorafitness.it", true },
- { "diagnoseo.com", true },
- { "diagnoseo.pl", true },
- { "diagnoseo.se", true },
- { "dialapicnic.co.za", true },
- { "dialoegue.com", true },
- { "diamant.family", true },
- { "diamant.nyc", true },
- { "diamante.ro", true },
- { "diamantovaburza.cz", true },
- { "diamgroup.pl", true },
- { "diamond-hairstyle.dk", true },
- { "diamondrose.co.za", false },
- { "diamondsleepsolutions.com", true },
- { "diamondyacca.co.uk", true },
- { "diamondyze.nl", true },
- { "diamorphine.com", true },
- { "dianadrive.com", true },
- { "dianefriedli.ch", false },
- { "diario-egipto.com", true },
- { "diariocibao.com", true },
- { "diariodearaxa.com.br", true },
- { "diarionoticia.pe", true },
- { "diariorealidad.com", true },
- { "diariosurnoticias.com", true },
- { "diaroma.it", true },
- { "diarynote.jp", true },
- { "diasdasemana.com", true },
- { "diasp.org", true },
- { "diatrofi-ygeia.gr", true },
- { "diba.org.cn", true },
- { "dibal.ua", true },
- { "dibiphp.com", true },
- { "dibrunolab.com", true },
- { "diccionariodedudas.com", true },
- { "diccionarqui.com", true },
- { "dice.tokyo", true },
- { "dicelab-rhul.org", true },
- { "dicelab.co.uk", true },
- { "dicesites.com", true },
- { "dicio.com.br", true },
- { "dicionario.org", true },
- { "dicionariodegirias.com.br", true },
- { "dicionariodelatim.com.br", true },
- { "dicionariodenomesproprios.com.br", true },
- { "dicionariodesimbolos.com.br", true },
- { "dicionarioetimologico.com.br", true },
- { "dicionariofinanceiro.com", true },
- { "dicionariopopular.com", true },
- { "dicionarios.cc", true },
- { "dick.red", true },
- { "dickord.cloud", true },
- { "dickpics.ru", true },
- { "dicksakowicz.com", true },
- { "dicoding.com", true },
- { "dicoeste.com", true },
- { "dictionaryofnumbers.com", true },
- { "dictionarypro.net", true },
- { "dictzone.com", true },
- { "didacte.com", true },
- { "didaktik4you.de", true },
- { "didche.net", false },
- { "diddens.de", true },
- { "dideeducacion.com", true },
- { "didefamilia.com", true },
- { "didesalud.com", true },
- { "didierghez.com", true },
- { "didierlaumen.be", true },
- { "die-bergfuehrer.de", true },
- { "die-blahuts.de", true },
- { "die-borts.ch", true },
- { "die-gruenen-teufel.de", true },
- { "die-machons.de", true },
- { "die-partei-reutlingen.de", true },
- { "die-pizzabaeckerei.de", true },
- { "die-pleners.de", true },
- { "die-seide.de", true },
- { "die-seiler.de", true },
- { "die-sinlosen.de", true },
- { "diebestengutscheine.de", true },
- { "diebestenvpn.de", true },
- { "diebetriebsraete.de", true },
- { "diedrich.co", true },
- { "dieecpd.org", true },
- { "diegelernten.de", true },
- { "diegerbers.de", true },
- { "diegocoy.com", true },
- { "diegogelin.com", false },
- { "diegorbaquero.com", true },
- { "diehl.io", true },
- { "diekperaiwseis.gr", true },
- { "diem-project.org", true },
- { "diemattels.at", true },
- { "dienchaninstitute.com", true },
- { "diendorfer.space", true },
- { "dienmayplus.vn", true },
- { "dienstplan.cc", true },
- { "dienstplan.one", true },
- { "dierabenmutti.de", true },
- { "dieradvies.nl", true },
- { "dierenartsdeconinck.be", true },
- { "dierencompleet.nl", true },
- { "dieselanimals.lt", true },
- { "dieselgalleri.com", true },
- { "diesicheremail.de", true },
- { "diesteppenreiter.de", true },
- { "dietbrand.eu", true },
- { "dieterglas.de", true },
- { "dietergreven.de", false },
- { "dieterstinglhamber.me", false },
- { "diethood.com", true },
- { "dieti-natura.com", true },
- { "dieti.net", true },
- { "dietlein.tech", true },
- { "dietlin.com", true },
- { "dietrich.cx", true },
- { "dieumfrage.com", true },
- { "diferenca.com", true },
- { "different.cz", true },
- { "differenta.ro", true },
- { "differentgirleveryday.ml", true },
- { "diffnow.com", true },
- { "diffuzehr.com.au", true },
- { "difoosion.com", true },
- { "difusordeambientes.com.br", true },
- { "digchip.info", true },
- { "digchips.com", true },
- { "digcit.org", true },
- { "digdata.de", true },
- { "dighans.com", true },
- { "digiarc.net", true },
- { "digibull.email", true },
- { "digibull.link", true },
- { "digicasso.nl", true },
- { "digicode.hu", true },
- { "digicy.cloud", true },
- { "digideli.ee", true },
- { "digidroom.be", true },
- { "digilicious.com", true },
- { "digimaat.agency", true },
- { "digimagical.com", true },
- { "digimedia.cd", false },
- { "digioccumss.ddns.net", true },
- { "digipolis.gent", true },
- { "digipost.no", true },
- { "digirechnung.de", true },
- { "digired.ro", true },
- { "digit.ec", true },
- { "digitai.net", true },
- { "digital-compounds.com", true },
- { "digital-eastside.de", true },
- { "digital-insurance-engine.com", true },
- { "digital-insurance-engine.de", true },
- { "digital-insurance-platform.com", true },
- { "digital-insurance-platform.de", true },
- { "digital-liberal.ch", true },
- { "digital-sculpture.org", true },
- { "digital-sign.com.cn", true },
- { "digital.gov", false },
- { "digital.govt.nz", true },
- { "digital1st.co.uk", true },
- { "digitalagencynetwork.com", true },
- { "digitalakatsuki.com", true },
- { "digitalallies.co.uk", true },
- { "digitalarchitecture.com", true },
- { "digitalarchives.tw", true },
- { "digitalbitbox.com", true },
- { "digitalblood.eu", true },
- { "digitalch.ng", true },
- { "digitalchurch.ng", true },
- { "digitalcitizen.life", true },
- { "digitalcitizen.ro", true },
- { "digitalcraftmarketing.co.uk", true },
- { "digitalcronies.com", true },
- { "digitaldeli.com", true },
- { "digitaldeli.org", true },
- { "digitaldeli.tv", true },
- { "digitaldeli.us", true },
- { "digitaldeliarchive.com", true },
- { "digitaldem.it", true },
- { "digitalehandtekeningen.nl", true },
- { "digitaleoverheid.nl", false },
- { "digitaleplus.fr", true },
- { "digitaletanker.com", true },
- { "digitalfoster.org", true },
- { "digitalframe.nl", true },
- { "digitalfury.co.uk", true },
- { "digitalfuturenow.com", true },
- { "digitalgeckos.com", true },
- { "digitalgov.gov", true },
- { "digitalhabit.at", true },
- { "digitalhabitat.io", true },
- { "digitalhealth.gov.au", true },
- { "digitalid-sandbox.com", true },
- { "digitalid.com", true },
- { "digitalid.com.au", true },
- { "digitalliteracy.gov", true },
- { "digitalpiloten.org", true },
- { "digitalposition.com", true },
- { "digitalprimate.my", true },
- { "digitalpuppy.co.uk", true },
- { "digitalradio.ie", true },
- { "digitalredshirts.com", true },
- { "digitalrights.center", true },
- { "digitalrights.fund", true },
- { "digitalskillswap.com", true },
- { "digitalsurge.io", true },
- { "digitaltcertifikat.dk", true },
- { "digitaltrust.ae", true },
- { "digitalunite.de", true },
- { "digitec.ch", true },
- { "digitecgalaxus.ch", true },
- { "digitkon.com", true },
- { "digitreads.com", true },
- { "digminecraft.com", true },
- { "digpath.co.uk", true },
- { "digwp.com", true },
- { "dihesan.com", true },
- { "dijitaller.com", true },
- { "dijkmanmuziek.nl", false },
- { "dikiaap.id", true },
- { "dilberkebab.co.uk", true },
- { "dildoexperten.se", true },
- { "diletec.com.br", true },
- { "dilibel.be", true },
- { "dilichen.fr", true },
- { "diligo.ch", false },
- { "dillewijnzwapak.nl", true },
- { "dillonkorman.com", true },
- { "dimagrimentoincorso.it", true },
- { "dimanet.fr", true },
- { "dimanss47.net", true },
- { "dime-staging.com", true },
- { "dime.io", true },
- { "dimeponline.com.br", true },
- { "dimez.ru", true },
- { "dimiskovska.de", true },
- { "dimitrihomes.com", true },
- { "dimitrovi.tk", true },
- { "dimmersagourahills.com", true },
- { "dimmerscalabasas.com", true },
- { "dimmersdosvientos.com", true },
- { "dimmershiddenhills.com", true },
- { "dimmerslakesherwood.com", true },
- { "dimmersnewburypark.com", true },
- { "dimmersoakpark.com", true },
- { "dimmersthousandoaks.com", true },
- { "dimmerswestlakevillage.com", true },
- { "dimo-analytics.fr", true },
- { "dimo-crm.fr", true },
- { "dimo-dematerialisation.com", true },
- { "dimo-tresorerie.fr", true },
- { "dimomaint-sav.fr", true },
- { "dimomaint.com", true },
- { "dimomaint.de", true },
- { "dimomaint.es", true },
- { "dimomaint.it", true },
- { "dimomaint.nl", true },
- { "dimomaint.pt", true },
- { "dimonb.com", true },
- { "dimosoftware.fr", true },
- { "din-hkd.jp", true },
- { "dinepont.fr", true },
- { "dinerroboticurology.com", true },
- { "dingsbums.shop", true },
- { "dinheirolucrar.com", true },
- { "dinkommunikasjon.no", true },
- { "dinmtb.dk", true },
- { "dinocarrozzeria.com", true },
- { "dinstec.cl", true },
- { "dintrafic.net", true },
- { "diodeled.com", true },
- { "diodo.me", true },
- { "dionysos-ios.gr", true },
- { "dipalma.me", true },
- { "dipdaq.com", true },
- { "dipling.de", true },
- { "diplomatiq.org", true },
- { "diplona.de", true },
- { "dipro.id", true },
- { "dipulse.it", true },
- { "dir2epub.com", true },
- { "dir2epub.org", true },
- { "dirba.io", true },
- { "direct-sel.com", true },
- { "direct.cz", true },
- { "directed.ir", true },
- { "directelectricalltd.co.uk", true },
- { "directfinance.cz", true },
- { "directhomeremodelinginc.com", true },
- { "directlendingsolutions.com", true },
- { "directlinkfunding.co.uk", true },
- { "directnews.be", true },
- { "directorioz.com", true },
- { "directorydashboard.ga", true },
- { "directorydisc.ga", true },
- { "directoryhub.io", true },
- { "directreal.sk", true },
- { "directspa.fr", true },
- { "directvacations.com", true },
- { "directveilig.nl", true },
- { "direktvermarktung-schmitzberger.at", true },
- { "diriya.lk", true },
- { "dirk-dogs.tk", true },
- { "dirk-weise.de", true },
- { "dirkdoering.de", true },
- { "dirkjonker.nl", true },
- { "dirko.net", true },
- { "dirkwolf.de", true },
- { "dirtinmyshoes.com", true },
- { "dirtygeek.ovh", true },
- { "dirtyherri.de", true },
- { "dirtyincest.com", true },
- { "dirtyprettyartwear.com", true },
- { "dirtytiles.xyz", true },
- { "disa.uk", true },
- { "disability.gov", true },
- { "disabilitydischarge.com", true },
- { "disabled-world.com", true },
- { "disabled.dating", true },
- { "disabuse.cf", true },
- { "disadattamentolavorativo.it", true },
- { "disanteimpianti.com", false },
- { "disboard.org", true },
- { "disc.uz", true },
- { "discarica.bari.it", true },
- { "discarica.bologna.it", true },
- { "discarica.firenze.it", true },
- { "discarica.it", true },
- { "discarica.milano.it", true },
- { "discarica.napoli.it", true },
- { "discarica.roma.it", true },
- { "disch.com.de", true },
- { "dischempharmacie.com", true },
- { "disciples.io", true },
- { "discodery.com", true },
- { "discofitta.com", true },
- { "disconformity.net", true },
- { "disconnect.tk", true },
- { "discord.gg", true },
- { "discord.gift", true },
- { "discord4j.com", true },
- { "discordapp.com", true },
- { "discordbee.com", true },
- { "discordia.me", true },
- { "discordservers.com", true },
- { "discount24.de", true },
- { "discountlumberspokane.com", true },
- { "discounto.de", true },
- { "discountpokale.at", false },
- { "discountpokale.de", true },
- { "discover-shaken.com", true },
- { "discoverelement.com", true },
- { "discoverthreejs.com", true },
- { "discoverucluelet.com", true },
- { "discoveryaima.com", true },
- { "discoveryballoon.org", true },
- { "discrypt.ca", true },
- { "discus-communications.dk", true },
- { "dise-online.de", true },
- { "disinclined.org", true },
- { "disinfesta.it", true },
- { "disinfestando.info", true },
- { "disinfestatore.roma.it", true },
- { "disinfestatori.com", true },
- { "disinfestazione.brescia.it", true },
- { "disinfestazione.torino.it", true },
- { "disinfestazione.venezia.it", true },
- { "disinfestazione.verona.it", true },
- { "disinfestazione24.it", true },
- { "disinfestazioneblatte.it", true },
- { "disinfestazionecimici.napoli.it", true },
- { "disinfestazionecimici.roma.it", true },
- { "disinfestazioni-sardegna.org", true },
- { "disinfestazioni-umbria.it", true },
- { "disinfestazioni.bari.it", true },
- { "disinfestazioni.bergamo.it", true },
- { "disinfestazioni.cagliari.it", true },
- { "disinfestazioni.caserta.it", true },
- { "disinfestazioni.catania.it", true },
- { "disinfestazioni.co", true },
- { "disinfestazioni.firenze.it", true },
- { "disinfestazioni.genova.it", true },
- { "disinfestazioni.gorizia.it", true },
- { "disinfestazioni.info", true },
- { "disinfestazioni.milano.it", true },
- { "disinfestazioni.napoli.it", true },
- { "disinfestazioni.net", true },
- { "disinfestazioni.padova.it", true },
- { "disinfestazioni.rimini.it", true },
- { "disinfestazioni.torino.it", true },
- { "disinfestazioni.treviso.it", true },
- { "disinfestazioni.udine.it", true },
- { "disinfestazioni.venezia.it", true },
- { "disinfestazioni.verona.it", true },
- { "disinfestazioni24.it", true },
- { "disinfestazionivespe.milano.it", true },
- { "disinisharing.com", true },
- { "disk.do", true },
- { "diskbit.com", true },
- { "diskbit.nl", true },
- { "disking.co.uk", true },
- { "dismail.de", true },
- { "displayenergycertificate.co.uk", true },
- { "displaysfas.com", true },
- { "disposable.link", true },
- { "disproweb.com", true },
- { "disroot.org", true },
- { "disrupters.ch", false },
- { "disruptiveadvertising.com", true },
- { "dissertationhelp.com", true },
- { "dissidence.ovh", true },
- { "dissieux.com", true },
- { "dist-it.com", true },
- { "dist.torproject.org", false },
- { "distancelove.ml", true },
- { "disti.com", true },
- { "distillery.com", true },
- { "distinguishedprisoner.com", true },
- { "distortmotion.com", true },
- { "distracteddriving.gov", true },
- { "distratus.com", true },
- { "distribuidoracristal.com.br", true },
- { "distribuidoraplus.com", true },
- { "distribuidorveterinario.es", true },
- { "distributore.it", true },
- { "distributori.roma.it", true },
- { "district.sg", true },
- { "districtcapital.com", true },
- { "distro.fr", true },
- { "ditec.sk", true },
- { "diti.me", true },
- { "dities.tk", true },
- { "div.im", true },
- { "diva.nl", true },
- { "divari.nl", true },
- { "divcoder.com", true },
- { "dive-japan.com", true },
- { "divegearexpress.com", true },
- { "diveidc.com", true },
- { "divelement.ro", true },
- { "diveplan.org", true },
- { "diversifiedproduct.com", true },
- { "diversityflags.com", true },
- { "diversityflags.com.au", true },
- { "diversityflags.nz", true },
- { "diversitywatch.asia", true },
- { "diversitywatch.co.nz", true },
- { "diversitywatch.com.au", true },
- { "divewithfrank.com", true },
- { "divi-experte.de", true },
- { "divinasaiamodas.com.br", true },
- { "divinegames.studio", true },
- { "divineglowinghealth.com", false },
- { "divinemercyparishvld.com", true },
- { "diving.photo", true },
- { "divingforlife.org", true },
- { "divisuite.com", true },
- { "divjak.at", true },
- { "divorciosmurcia.com", true },
- { "divup.com", true },
- { "diwei.vip", true },
- { "dixibox.com", true },
- { "diyanet.nl", true },
- { "diybook.at", true },
- { "diycc.org", true },
- { "diygeek.com", true },
- { "diyibo.com", true },
- { "diymediahome.org", true },
- { "diyosun.com", false },
- { "diytechguides.com", true },
- { "diyvideoeditor.com", true },
- { "dizayner.tk", true },
- { "dizzythewizard.co.uk", true },
- { "dj-leszwolle.nl", true },
- { "dj-x.info", true },
- { "dj3dub.com", true },
- { "djangobirthday.com", true },
- { "djangoproject.com", true },
- { "djangosnippets.org", true },
- { "djanpana.com", true },
- { "djbbouncycastles.co.uk", true },
- { "djbobbytables.com", true },
- { "djboekingskantoor.nl", true },
- { "djc.me", true },
- { "djcursuszwolle.nl", true },
- { "djdavid98.art", true },
- { "djdeepstate.com", true },
- { "djfantum.com", true },
- { "djfrenchy.com", true },
- { "dji-ars.pl", true },
- { "djipanov.com", true },
- { "djitsolutions.com", true },
- { "djl188.cc", true },
- { "djleon.net", true },
- { "djlinux.cz", true },
- { "djlnetworks.co.uk", true },
- { "djlove.tk", true },
- { "djmarian.com", true },
- { "djmox.in", true },
- { "djsbouncycastlehire.com", true },
- { "djslash.tk", true },
- { "djurklinikenangelholm.se", true },
- { "djvintagevinyl.com", true },
- { "djvintagevinyl.nl", true },
- { "djwaynepryke.com", true },
- { "dk-kromeriz.cz", true },
- { "dk.com", true },
- { "dk.search.yahoo.com", false },
- { "dkcomputers.com.au", true },
- { "dkds.us", true },
- { "dkstage.com", true },
- { "dkwedding.gr", true },
- { "dl.google.com", true },
- { "dlaspania.pl", true },
- { "dlde.ru", true },
- { "dldl.fr", true },
- { "dleet.com", true },
- { "dlfsymposium.nl", true },
- { "dlitz.net", true },
- { "dll4free.com", true },
- { "dlld.com", true },
- { "dlld.org", true },
- { "dlld.us", true },
- { "dlscomputers.com.au", true },
- { "dlui.xyz", true },
- { "dlunch.net", true },
- { "dlyatepla.ml", true },
- { "dlz149.me", true },
- { "dlzz.net", true },
- { "dm.lookout.com", false },
- { "dm.mylookout.com", false },
- { "dm4productions.com", true },
- { "dm7ds.de", true },
- { "dmaglobal.com", true },
- { "dmailshop.ro", true },
- { "dmarc.dk", true },
- { "dmarc.tech", true },
- { "dmarcian.com", true },
- { "dmatrix.xyz", true },
- { "dmcw.de", true },
- { "dmd.lv", true },
- { "dmdd.org.uk", true },
- { "dmfj.io", true },
- { "dmhtwebordering.com", true },
- { "dmi.es", true },
- { "dmilb.org", true },
- { "dmitriid.com", true },
- { "dmitry.sh", true },
- { "dmmedya.com", true },
- { "dmmkenya.co.ke", false },
- { "dmmultionderhoud.nl", true },
- { "dmn.sh", true },
- { "dmoj.ca", true },
- { "dmparish.com", true },
- { "dmxledlights.com", true },
- { "dn3s.me", true },
- { "dn42.us", true },
- { "dna.li", true },
- { "dnacloud.pl", true },
- { "dnakids.co.uk", true },
- { "dnalounge.com", true },
- { "dnapizza.com", true },
- { "dnc.org.nz", true },
- { "dndtools.net", true },
- { "dnlr.tech", true },
- { "dnmlab.it", true },
- { "dnns.no", true },
- { "dnoid.to", true },
- { "dnplegal.com", true },
- { "dns-check.nl", true },
- { "dns-control.eu", true },
- { "dns-swiss.ch", true },
- { "dns.google.com", true },
- { "dns.sb", true },
- { "dns8.online", true },
- { "dnsaio.com", true },
- { "dnscrawler.com", true },
- { "dnscrypt-blacklist.tk", true },
- { "dnscrypt.info", true },
- { "dnscrypt.nl", true },
- { "dnscurve.io", true },
- { "dnshallinta.fi", true },
- { "dnsipv6.srv.br", true },
- { "dnskeep.com", true },
- { "dnskeeper.com", true },
- { "dnsman.se", true },
- { "dnsmate.net", true },
- { "dnsrate.com", true },
- { "dnssecandipv6.se", true },
- { "dnstwister.report", true },
- { "do-pro.net", true },
- { "do-prod.com", false },
- { "do.gd", true },
- { "do.search.yahoo.com", false },
- { "do13.net", true },
- { "do67.de", true },
- { "do67.net", true },
- { "dobbshvac.com", true },
- { "dobraprace.cz", false },
- { "dobre-programy.xyz", true },
- { "dobreoknaszczecin.pl", true },
- { "dobreprogramy.pro", true },
- { "dobrisan.ro", true },
- { "doc-baza.ru", true },
- { "doc.ai", true },
- { "doc.python.org", true },
- { "doc.to", false },
- { "doc8643.com", true },
- { "docabo.ch", true },
- { "docassure.de", true },
- { "docbox.ch", true },
- { "docdoc.ru", true },
- { "docemeldoces.com", true },
- { "doceo.com", true },
- { "dockerbook.com", false },
- { "dockerup.net", true },
- { "dockflow.com", true },
- { "dockstarter.com", true },
- { "dockysearch.com", true },
- { "docline.gov", true },
- { "docloh.de", true },
- { "docloudu.info", true },
- { "docmed360.com", true },
- { "docplexus.com", true },
- { "docs.google.com", false },
- { "docs.python.org", true },
- { "docs.tw", true },
- { "doctafit.com", true },
- { "docteurcardin.com", false },
- { "doctor-locks.co.uk", true },
- { "doctor.dating", true },
- { "doctor360.com.au", true },
- { "doctorcalefon.com", true },
- { "doctorfox.co.uk", true },
- { "doctornaima.ml", true },
- { "doctorperu.com", true },
- { "doctorwho.cz", true },
- { "doctorxdentist.com", true },
- { "docu.io", true },
- { "docubox.info", true },
- { "docucopies.com", true },
- { "docudanang.com.vn", false },
- { "documaniatv.com", true },
- { "docupaymentuat.xyz", true },
- { "docusearch.com", true },
- { "dodikod.tk", true },
- { "dodopri.com", true },
- { "doenjoylife.com", false },
- { "doeren.com", true },
- { "doerz.com", true },
- { "does.one", true },
- { "doesburg-comp.nl", true },
- { "doesinfotech.com", true },
- { "dofux.org", true },
- { "dogadayiz.net", true },
- { "dogan.ch", false },
- { "dogandoganay.com", true },
- { "dogcat.vn", true },
- { "dogcontrol.ca", true },
- { "dogear.ch", true },
- { "dogforum.de", true },
- { "dogfriendly.co.uk", true },
- { "doggedbyirs.com", true },
- { "doggo.cloud", true },
- { "doggo.dance", true },
- { "doggo.email", true },
- { "doggroomingcourse.com", true },
- { "dogmap.jp", true },
- { "dogodki.today", true },
- { "dogoo.com", true },
- { "dogpawstudio.com", true },
- { "dogrescuegreece.nl", true },
- { "dogsdailylife.com", true },
- { "dogurai.com", true },
- { "dogvolution.com", true },
- { "dogwalkeru.com", true },
- { "dogworld.com.br", true },
- { "dohanews.co", true },
- { "doi.org", true },
- { "doihavetoputonpants.com", true },
- { "doinaruscior.eu", true },
- { "doitauto.de", true },
- { "doitexperience.com", true },
- { "dojozendebourges.fr", true },
- { "dokee.cn", true },
- { "dokelio-idf.fr", true },
- { "dokhuyenmaigiatot.com", true },
- { "doki.space", false },
- { "dokipy.no", true },
- { "dokkanashop.com", true },
- { "doko.pl", true },
- { "dokuboard.com", true },
- { "dolcesalatoweb.it", true },
- { "dolci-delizie.de", true },
- { "dolciariasimonini.com", true },
- { "dolciterapie.com", true },
- { "doli.se", true },
- { "dolice.net", true },
- { "dolinathome.com", true },
- { "doll.ml", true },
- { "dollchan.org", true },
- { "dollemore.com", true },
- { "dollhousetoyo.com", true },
- { "dolorism.com", true },
- { "dolph.de", true },
- { "doma.in", true },
- { "domacikavarna.cz", true },
- { "domadillo.com", true },
- { "domain-ermittlung.de", true },
- { "domain-skachat.cf", true },
- { "domain-speicher.com", true },
- { "domain-speicher.de", true },
- { "domain001.info", true },
- { "domainedemiolan.ch", false },
- { "domainevanina.fr", true },
- { "domainexpress.de", false },
- { "domainforfree.gq", true },
- { "domainkauf.de", true },
- { "domainoo.com", true },
- { "domains.google.com", true },
- { "domainsilk.com", true },
- { "domainspeicher.com", true },
- { "domainspeicher.one", true },
- { "domainstaff.com", true },
- { "domakidis.com", true },
- { "domarkperu.com", true },
- { "domaxpoker.com", true },
- { "domein-direct.com", true },
- { "domein-direct.nl", true },
- { "domeindns.nl", true },
- { "domenaru.ga", true },
- { "domenic.me", true },
- { "domenicam.com", true },
- { "domesticcleaners.co.uk", true },
- { "domfee.com", true },
- { "domhaase.me", true },
- { "domhos.tk", true },
- { "domian.cz", true },
- { "domicile-clean.fr", true },
- { "dominationgame.co.uk", true },
- { "dominctheroofguy.com", true },
- { "dominicandfelixroco.tk", true },
- { "dominicself.co.uk", true },
- { "dominictaylor.co.uk", true },
- { "dominik-bergmann.de", true },
- { "dominik.st", true },
- { "dominikaner-vechta.de", true },
- { "dominionedge.com", true },
- { "dominionregistries.domains", true },
- { "dominique-haas.fr", false },
- { "dominoknihy.cz", true },
- { "dominomatrix.com", true },
- { "domjh.com", true },
- { "dommascate.com.br", true },
- { "domob.eu", true },
- { "domodeco.fr", true },
- { "domodedovo.travel", true },
- { "domop.cc", true },
- { "domop.net", true },
- { "domop.org", true },
- { "domowe-potrawy.pl", true },
- { "domprojects.com", true },
- { "domscripting.com", true },
- { "domster.com", true },
- { "domus-global.com", true },
- { "domus-global.cz", true },
- { "domwkwiatach.pl", true },
- { "domyassignments.com", true },
- { "domycasestudy.com", true },
- { "domycoursework.com", true },
- { "domycreativewritings.com", true },
- { "domydissertations.com", true },
- { "domyessay.net", true },
- { "domyessays.com", true },
- { "domyhomework123.com", true },
- { "domyhomeworks.net", true },
- { "domyiadaptacje.pl", true },
- { "domynetwork.com", true },
- { "domypapers.com", true },
- { "domyresearchpaper.com", true },
- { "domyreview.net", true },
- { "domyspeech.com", true },
- { "domytermpaper.com", true },
- { "domythesis.net", true },
- { "domyzitrka.cz", true },
- { "domznak.ru", true },
- { "donabeneko.jp", true },
- { "donaldjenkins.com", true },
- { "donaldm.co.uk", true },
- { "donaldtrump.ga", true },
- { "donateabox.org", true },
- { "donateaday.net", true },
- { "donatus.nl", true },
- { "donboscogroep.nl", true },
- { "dondiabolo.com", true },
- { "donfelino.tk", false },
- { "dongxuwang.com", true },
- { "donia-almla3b.com", true },
- { "donjusto.nl", true },
- { "donkennedyandsons.com", true },
- { "donkeytrekkingkefalonia.com", true },
- { "donnaandscottmcelweerealestate.com", true },
- { "donnabrothers.com", true },
- { "donnachie.net", true },
- { "donnajeanbooks.com", true },
- { "donner-reuschel.de", true },
- { "donnons.org", false },
- { "donnoval.ru", false },
- { "donotcallgov.com", true },
- { "donotlink.it", true },
- { "donovankraag.nl", true },
- { "donpanda.cz", true },
- { "donpomodoro.com.co", true },
- { "donsremovals.com.au", true },
- { "dont.re", true },
- { "dont.watch", true },
- { "dontbeevil.com", true },
- { "dontbubble.me", true },
- { "dontcageus.org", true },
- { "donthedragonwilson.com", true },
- { "dontpayfull.com", true },
- { "dontstopcoffee.com", true },
- { "donttrust.me", true },
- { "donutcompany.co.jp", true },
- { "dooby.fr", true },
- { "dooleylabs.com", true },
- { "dooleytackaberry.com", true },
- { "doomoo.com", true },
- { "doomsworld.com", true },
- { "doomtech.net", true },
- { "doomus.me", true },
- { "doooooops.com", true },
- { "doop.im", true },
- { "doordecor.bg", true },
- { "doorflow.com", true },
- { "doorgate.pt", true },
- { "doorhandlese.com", true },
- { "doorshingekit.com", true },
- { "doorswest.net", true },
- { "doortim.nl", true },
- { "dopesoft.de", true },
- { "dophys.top", true },
- { "doppeleinhorn.de", true },
- { "doppler.com", true },
- { "dopsi.ch", true },
- { "dor-tak.com", true },
- { "dor-tak.ru", true },
- { "dora.moe", true },
- { "doradocomputer.com", true },
- { "doradoscampeon.tk", true },
- { "doramamusic.gq", true },
- { "dordtpas.nl", true },
- { "dorfbaeck.at", true },
- { "dorfbrunnen.eu", false },
- { "dorfpark-falkenburg.de", true },
- { "dorfzittig.de", true },
- { "doriangirod.ch", false },
- { "dorianharmans.nl", true },
- { "dorianmuthig.com", true },
- { "doridian.com", true },
- { "doridian.de", true },
- { "doridian.org", true },
- { "dormirmucho.com", true },
- { "dormitengernyikaland.hu", true },
- { "dormiu.com", true },
- { "dormiu.com.br", true },
- { "dornhecker.me", true },
- { "dorogaminina.tk", true },
- { "dorpshuis-dwarsgracht.nl", true },
- { "dorpshuiskesteren.nl", true },
- { "dorsetentertainments.co.uk", true },
- { "dorth.nl", true },
- { "dos.cafe", true },
- { "dosenbierrepublik.com", true },
- { "dosenkiwi.at", true },
- { "dosje.org", true },
- { "doska.by", true },
- { "doska.ru", true },
- { "dossplumbing.co.za", false },
- { "dostalsecurity.com", true },
- { "dostav.tk", true },
- { "dostlar.fr", true },
- { "dosug.so", true },
- { "dosvientoselectric.com", true },
- { "dosvientoselectrical.com", true },
- { "dosvientoselectrician.com", true },
- { "dosvientosexteriorlighting.com", true },
- { "dosvientoslandscapelighting.com", true },
- { "dosvientoslighting.com", true },
- { "dosvientosoutdoorlighting.com", true },
- { "doswap.com", true },
- { "dosyauzantisi.com", true },
- { "dot42.no", true },
- { "dotacni-parazit.cz", true },
- { "dotbigbang.com", true },
- { "dotbox.org", true },
- { "dotcircle.co", true },
- { "dotcomtest02-single.azurewebsites.net", true },
- { "dotesports.com", true },
- { "dotgov.gov", true },
- { "dothebangthingsalon.com", true },
- { "dothydesign.com", true },
- { "dotjesper.com", true },
- { "dotjesper.dk", true },
- { "dotjesper.net", true },
- { "dotjs.party", true },
- { "dotkniseandroida.cz", true },
- { "dotkod.pl", true },
- { "dotneko.net", true },
- { "dotnetdocs.ir", true },
- { "dotphoto.com", true },
- { "dotplex.com", true },
- { "dotplex.de", true },
- { "dotrox.net", true },
- { "dotshule.ug", true },
- { "dotsiam.co.th", true },
- { "dotsiam.com", true },
- { "dotsiam.in.th", true },
- { "dottore.roma.it", true },
- { "dottormarc.it", true },
- { "douai.me", true },
- { "doubleaste.com", true },
- { "doubleavineyards.com", true },
- { "doubleglazingmasters.com.au", true },
- { "doubleglazingmelbourne.com", true },
- { "doubleup.com.au", true },
- { "doubtaboutwill.org", true },
- { "douceurcarlet.com", true },
- { "doucheba.gs", false },
- { "doughseeker.com", true },
- { "douglascountybar.com", true },
- { "douglascountyfilmtrail.com", true },
- { "dougley.com", true },
- { "dougsautobody.com", true },
- { "doujinshi.info", true },
- { "doujinspot.com", true },
- { "douzer.de", true },
- { "douzer.earth", true },
- { "douzer.industries", true },
- { "dovenzorgmalawi.nl", true },
- { "dovermotion.com", true },
- { "dovizborsa.com", true },
- { "dowell.media", true },
- { "dowellconsulting.com", true },
- { "dowhatmakegood.de", true },
- { "dowling.nz", true },
- { "download-knigi.gq", true },
- { "download.dk", true },
- { "downloadaja.com", true },
- { "downloadfiles.cf", true },
- { "downloadgamemods.com", true },
- { "downloadgram.com", true },
- { "downloadhindimovie.com", true },
- { "downloads.zdnet.com", true },
- { "downloadsoftwaregratisan.com", true },
- { "downrightcute.com", true },
- { "downtimerobot.nl", true },
- { "downtownautospecialists.com", true },
- { "downtownsuiteliving.com", true },
- { "downunderporn.com", true },
- { "dox-box.eu", true },
- { "doxal.ro", true },
- { "doxepin1.gq", true },
- { "doxycyclineprices.cf", true },
- { "doyleshamrock.com", true },
- { "doyoucheck.com", false },
- { "doyouedc.com", true },
- { "doyoutax.com", false },
- { "doypacky.cz", false },
- { "doze-cloud.tech", true },
- { "dozecloud.com", true },
- { "dp.cx", true },
- { "dpd.com.pl", true },
- { "dpecuador.com", true },
- { "dpellegrini.com", true },
- { "dperson.net", true },
- { "dpfsolutionsfl.com", true },
- { "dpg.no", true },
- { "dphipartner.com", true },
- { "dpi-design.de", true },
- { "dpim.org.my", true },
- { "dpisecuretests.com", true },
- { "dpm-ident.de", false },
- { "dponetwork.nl", true },
- { "dposit.com", true },
- { "dposit.email", true },
- { "dposit.eu", true },
- { "dposit.net", true },
- { "dposit.org", true },
- { "dprb.biz", true },
- { "dps.srl", true },
- { "dpsg-hohenlinden.de", true },
- { "dpsg-roden.de", false },
- { "dpwsweeps.co.uk", true },
- { "dr-becarelli-philippe.chirurgiens-dentistes.fr", true },
- { "dr-klotz.info", true },
- { "dr-knirr.de", true },
- { "dr-marlen-nystroem.de", true },
- { "dr-moldovan.de", true },
- { "dr-nystroem.de", true },
- { "dr-peter-jahn.de", true },
- { "dr-schlamminger.de", true },
- { "dr-schmutzer.de", true },
- { "dr-schuessler.de", true },
- { "dr-stoetter.de", true },
- { "dr-www.de", true },
- { "dr.mg", true },
- { "dr2dr.ca", true },
- { "draadloos-besturen.nl", true },
- { "draadloze-noodstop.nl", true },
- { "drabadir.com", true },
- { "drabim.org", true },
- { "drach.xyz", true },
- { "drachenleder.de", true },
- { "dracisvet.cz", true },
- { "dracoon.com", true },
- { "dracoon.de", true },
- { "dracoon.team", true },
- { "dracox.com", true },
- { "dracula.city", true },
- { "draemar.com", true },
- { "draftguru.com.au", true },
- { "dragcave.net", true },
- { "dragfiles.com", true },
- { "draghetti.it", true },
- { "draghive.com", true },
- { "dragon-chem.eu", true },
- { "dragon-hearts.co.uk", true },
- { "dragon.nu", true },
- { "dragoncave.me", true },
- { "dragonclean.gr", true },
- { "dragonheartsrpg.com", true },
- { "dragonkin.net", true },
- { "dragonprogrammer.com", true },
- { "dragonreal.estate", true },
- { "dragonschool.org", true },
- { "dragonsunited.at", true },
- { "dragonsunited.ch", true },
- { "dragonsunited.de", true },
- { "dragonsunited.eu", true },
- { "dragonsunited.info", true },
- { "dragonsunited.net", true },
- { "dragonsunited.org", true },
- { "dragontours.net", true },
- { "dragonwolfpackaquaria.com", true },
- { "dragowebdesign.com", true },
- { "draintechnorthwest.net", true },
- { "drainwllc.com", true },
- { "drake.partners", true },
- { "drakecommercial.com", true },
- { "drakeluce.com", true },
- { "drakenson.de", true },
- { "drakfot.se", true },
- { "drakoacademy.org", true },
- { "draliabadi.com", true },
- { "dramaticpeople.com", true },
- { "dramyalderman.com", true },
- { "dranderle.com", true },
- { "drandrewarnold.com", true },
- { "dranik.ga", true },
- { "dranous.com", true },
- { "drapeauxdespays.fr", true },
- { "dras.hu", true },
- { "drastik.cz", true },
- { "dratini0.hu", true },
- { "draugr.de", true },
- { "draw.uy", true },
- { "drawesome.uy", true },
- { "drawtwo.gg", true },
- { "drawvesly.ovh", true },
- { "drawxp.com", true },
- { "draycotthotel.com", true },
- { "drbresnick.com", true },
- { "drbriones.com", true },
- { "drcarolynquist.com", true },
- { "drchrislivingston.com", true },
- { "drchristophepanthier.com", true },
- { "drcourtney.com", true },
- { "drcp.tokyo", true },
- { "drdegenhart.de", true },
- { "drdenisvincenzi.com.br", true },
- { "drdipilla.com", true },
- { "dream-pools.cf", true },
- { "dreamboxpro.com", true },
- { "dreamcrack.tk", true },
- { "dreamcraft.su", true },
- { "dreamday-with-dreamcar.de", true },
- { "dreamdestine.com", true },
- { "dreamdivers.com", true },
- { "dreamhack.com", true },
- { "dreamhostremixer.com", true },
- { "dreamhouses.com", true },
- { "dreamingwolf.sk", true },
- { "dreamlandmagic.com", true },
- { "dreamlordpress.it", true },
- { "dreamlux.cz", true },
- { "dreamlux.sk", true },
- { "dreammaker-nw.com", true },
- { "dreammakerutah.com", true },
- { "dreamof.net", false },
- { "dreamrae.net", true },
- { "dreamsforabetterworld.com.au", true },
- { "dreamstream.nl", true },
- { "dreamstream.tv", true },
- { "dreamstream.video", true },
- { "dreamstudio.com", true },
- { "dreamswelcome.com", true },
- { "dreamsxxl.com", true },
- { "dreamwork.financial", true },
- { "dreamz-staging.zone", true },
- { "dreamz.com", true },
- { "dreatho.com", true },
- { "dreemurr.com", true },
- { "drei01.com", true },
- { "drei01.de", true },
- { "drei01.technology", true },
- { "dreid.org", true },
- { "drendermobilyaservisi.com", true },
- { "dresden-kaffee-24.de", true },
- { "dresden-kaffeeroesterei.de", true },
- { "dresdener-mandelstollen.de", true },
- { "dresdens-pfefferkuchenprinzessin.de", true },
- { "dresdner-kaffeeroesterei.de", true },
- { "dresdner-mandelstollen.de", true },
- { "dresdner-stollen-von-reimann.de", false },
- { "dresdner-stollen.shop", true },
- { "dress-cons.com", true },
- { "dressify.in", true },
- { "dressingmaternity.fr", true },
- { "drevo-door.cz", false },
- { "drevoline.com.ua", true },
- { "drew.beer", true },
- { "drew.life", true },
- { "drew.red", true },
- { "drewapianostudio.com", true },
- { "drewlearns.com", true },
- { "drewsilcock.co.uk", true },
- { "drewzar.com", true },
- { "drexelwood.com", true },
- { "dreyfussplasticsurgery.com", true },
- { "drezzy.it", true },
- { "drgeadsdavinci.com", true },
- { "drgerthplasticsurgery.com", true },
- { "drghomi.com", true },
- { "drglassgyn.com", true },
- { "drgn.li", true },
- { "drgn.no", true },
- { "drgrace.ca", true },
- { "drhathazi.hu", true },
- { "drheibel.com", true },
- { "drherndonent.com", true },
- { "drhildebrand.net", true },
- { "drhoseyni.com", true },
- { "drhyler.com", true },
- { "drianpublishing.tk", true },
- { "driesjtuver.nl", true },
- { "driestwegkerk.nl", true },
- { "driftdude.nl", true },
- { "driftingruby.com", true },
- { "drighes.com", true },
- { "drikuansvarligt.dk", true },
- { "drillingsupply.info", true },
- { "drillingsupplystore.com", true },
- { "drillion.net", true },
- { "drillshackresort.com", true },
- { "drilon.be", true },
- { "drinkcontrolapp.com", true },
- { "drinkgas-jihlava.cz", true },
- { "drinkgo.vn", true },
- { "drinkrebellious.com", true },
- { "driv.io", true },
- { "drive.google.com", false },
- { "drivedavis.com", true },
- { "driveexport.com", true },
- { "driven2shine.eu", true },
- { "drivenbyperspective.com", true },
- { "drivenes.net", true },
- { "driver.ru", true },
- { "driverless.id", true },
- { "driverprofiler.co.uk", true },
- { "driverscollection.com", true },
- { "drivetonortheast.com", true },
- { "drivinghorror.com", true },
- { "drivinhors.com", true },
- { "drivya.com", true },
- { "drizz.com.br", false },
- { "drjacquesmalan.com", true },
- { "drjoe.ca", true },
- { "drjosebarrera.com", true },
- { "drjuanitacollier.com", false },
- { "drjulianneil.com", true },
- { "drkhsh.at", false },
- { "drkmtrx.xyz", true },
- { "drlandis.com", true },
- { "drlangsdon.com", true },
- { "drlinkcheck.com", true },
- { "drmayakato.com", true },
- { "drmcdaniel.com", true },
- { "drms.us", true },
- { "drmtransit.com", true },
- { "drogariasantoantonio.pt", true },
- { "drogavista.com.br", true },
- { "droid101.com", true },
- { "droidandy.com", true },
- { "droidapp.nl", true },
- { "droidchart.com", true },
- { "droidee.com", true },
- { "droidgyan.com", true },
- { "droidhere.com", true },
- { "dromax.hu", true },
- { "dromotique.com", true },
- { "drone-it.net", false },
- { "dronebl.org", true },
- { "droneland.nl", true },
- { "dronepilotgeorgia.com", true },
- { "dronepit.dk", true },
- { "dronesz.co", true },
- { "droni.cz", true },
- { "dronografia.es", true },
- { "dronova-art.ru", true },
- { "drop.com", true },
- { "dropbox.com", true },
- { "dropboxer.net", true },
- { "droperplus.com", true },
- { "dropistic.com", true },
- { "droplen.com", true },
- { "droppia.io", true },
- { "dropq.nl", true },
- { "dropscloud.spdns.de", true },
- { "dropshare.cloud", true },
- { "dropshell.net", true },
- { "droso.dk", true },
- { "drown.photography", true },
- { "drpetersenobgynal.com", true },
- { "drpetervoigt.ddns.net", true },
- { "drpetervoigt.de", true },
- { "drphillipsmwc.com", true },
- { "drpico.com.au", true },
- { "drpil.nl", true },
- { "drrachellemeaux.com", true },
- { "drradin.com", true },
- { "drrhonda.com", true },
- { "drrr.chat", true },
- { "drrr.com", true },
- { "drrr.wiki", true },
- { "drsajjadian.com", true },
- { "drsamuelkoo.com", true },
- { "drschlarb.eu", true },
- { "drsheri.com", true },
- { "drsturgeonfreitas.com", true },
- { "drsubbio.com", true },
- { "drthalhammer.at", true },
- { "drtimmarch.com", true },
- { "drtimothybradley.com", true },
- { "drtimothysteel.com.au", true },
- { "drtimothysteeljournal.com", true },
- { "drtimothysteelnetwork.com", true },
- { "drtimothysteelresults.com", true },
- { "drtimothysteelscholarship.com.au", true },
- { "drtimothysteelvideos.com", true },
- { "drtristanberry.com", true },
- { "druckerei-huesgen.de", true },
- { "drugs.com", true },
- { "drumbe.at", true },
- { "drumlines.org", true },
- { "drummondframing.com", true },
- { "drunkendropkes.tk", true },
- { "drunkscifi.com", true },
- { "drupal-expert.it", true },
- { "drupal.org", true },
- { "drupalspb.org", false },
- { "drusantia.net", true },
- { "drusillas.co.uk", true },
- { "druwe.net", false },
- { "drvaidyas.com", true },
- { "drwang.group", true },
- { "drweissbrot.net", true },
- { "drybjed.net", true },
- { "drycleancoalition.org", true },
- { "drycreekphoto.com", true },
- { "drydrydry.com", true },
- { "dryerventcleaningarlington.com", true },
- { "dryerventcleaningcarrollton.com", true },
- { "dryjersey.com", true },
- { "dryudha.site", true },
- { "drywallresponse.gov", true },
- { "ds.lol", true },
- { "ds138.cc", true },
- { "ds28s.com", true },
- { "ds67.de", true },
- { "dsaengineering.com", true },
- { "dsancomics.com", true },
- { "dsanraffleshangbai.xyz", true },
- { "dsayce.com", true },
- { "dsble.de", true },
- { "dsbutler.de", true },
- { "dscharrer.com", true },
- { "dschwarzachtaler.de", true },
- { "dsebastien.net", true },
- { "dsektionen.se", false },
- { "dsgarms.com", true },
- { "dsgholsters.com", true },
- { "dsgnet.hu", true },
- { "dsgvo-addon.eu", true },
- { "dsgvo-analyse.de", true },
- { "dsgvo.name", true },
- { "dsh.io", true },
- { "dshield.org", true },
- { "dsimons.tk", true },
- { "dsm5.com", true },
- { "dsmjs.com", true },
- { "dsmnet.org", true },
- { "dso-izlake.si", true },
- { "dsol.hu", true },
- { "dspace.pl", true },
- { "dspropertyservicesltd.co.uk", true },
- { "dsreal.de", true },
- { "dstamou.de", true },
- { "dsteiner.at", true },
- { "dstvinstallkemptonpark.co.za", true },
- { "dstvsandton.co.za", true },
- { "dstvsouthafrica.com", true },
- { "dsuinnovation.com", true },
- { "dt688.net", true },
- { "dtbouncycastles.co.uk", true },
- { "dtbw.eu", true },
- { "dtbw.net", true },
- { "dtbw.org", true },
- { "dtdsh.com", true },
- { "dtg-fonds.com", true },
- { "dtg-fonds.de", true },
- { "dtg-fonds.net", true },
- { "dtgmns.com", true },
- { "dtinel.org", true },
- { "dtivandortbv.nl", true },
- { "dtleague.eu", true },
- { "dtmbnl.com", true },
- { "dtmbx.com", true },
- { "dtmbx.email", true },
- { "dtmbx.eu", true },
- { "dtmbx.net", true },
- { "dtmbx.nl", true },
- { "dtmbx.org", true },
- { "dtmf.io", true },
- { "dtmlnp.com", true },
- { "dtngny.com", true },
- { "dtnx.email", true },
- { "dtnx.eu", true },
- { "dtnx.net", true },
- { "dtnx.org", true },
- { "dtnxny.com", true },
- { "dtoweb.be", true },
- { "dtp-mstdn.jp", false },
- { "dtuaarsfest.dk", true },
- { "dtx.sk", true },
- { "du-alex.ru", true },
- { "dualascent.com", true },
- { "duarteeleiteconsultoria.com.br", true },
- { "dub.cz", true },
- { "dubaizone.cf", true },
- { "dubbingkursus.dk", true },
- { "dubbningshemsidan.se", true },
- { "dubious-website.com", true },
- { "dublin-traceroute.net", true },
- { "duboisinternational.com", true },
- { "duboisinvestissements.com", true },
- { "dubrava.tk", true },
- { "dubrovskiy.net", true },
- { "dubrovskiy.pro", true },
- { "dubstep.fr", true },
- { "dubtrack.fm", true },
- { "dubyou.tw", true },
- { "ducadu.com", true },
- { "duch.cloud", true },
- { "duckbase.com", true },
- { "duckblade.com", true },
- { "duckcorp.org", true },
- { "duckduck.horse", true },
- { "duckduckstart.com", true },
- { "duckfam.us", true },
- { "duckinc.net", true },
- { "ducksify.com", true },
- { "ducksoft.fi", true },
- { "duct.me", true },
- { "due-diligence-security.com", true },
- { "duelingaces.com", true },
- { "duernberg.at", true },
- { "duesee.org", true },
- { "duesterhus.eu", true },
- { "dufrei.com", true },
- { "dug.net.pl", true },
- { "duggtec.com", true },
- { "dugunedavet.com", true },
- { "duh.se", true },
- { "duijf.info", true },
- { "duijf.io", true },
- { "duijfathome.nl", true },
- { "duitang.com", true },
- { "dukan-recepty.ru", true },
- { "dukatek.cz", true },
- { "dukeandduchessdrivingschool.co.uk", true },
- { "dukegat.de", false },
- { "dukers-baelemans.nl", true },
- { "dukun.de", true },
- { "dulcinela.es", true },
- { "dulei.si", true },
- { "dullapp.com", true },
- { "dum.moe", true },
- { "dumax.xyz", true },
- { "dumb-laws.net.ru", true },
- { "dumbeartech.com", true },
- { "dumberger-bau.de", true },
- { "dumboverflow.com", true },
- { "dumino.bg", true },
- { "duncancmt.com", true },
- { "duncanfamilytrust.org", true },
- { "duncanmoffat.com", true },
- { "duncanwinfrey.com", true },
- { "duncm.com", true },
- { "dungdev.net", true },
- { "dungeon-bbs.de", true },
- { "dungeoncity.com", true },
- { "dunklau.fr", true },
- { "dunkle-seite.org", true },
- { "dunmanelectric.com", true },
- { "dunyahalleri.com", true },
- { "duobus.nl", true },
- { "duoquadragintien.fr", true },
- { "duoyin.com", true },
- { "dupisces.com.tw", true },
- { "duplicazionechiavi.it", true },
- { "duploclique.pt", false },
- { "dupree.co", true },
- { "durand.tf", true },
- { "duranthon.eu", true },
- { "durastill-distiller.com", true },
- { "durbanlocksmiths.co.za", true },
- { "durcal.tk", true },
- { "durdle.com", true },
- { "dureuil.info", true },
- { "durfteparticiperen.nl", true },
- { "durgatopos.it", true },
- { "duria.de", true },
- { "duriaux-dentiste.ch", false },
- { "duriemas.com", true },
- { "durin-art.com", true },
- { "durys.be", true },
- { "dusmomente.com", true },
- { "dustandsand.com", false },
- { "dustpla.net", true },
- { "dustplanet.de", true },
- { "dustri.org", true },
- { "dusty.gr", true },
- { "dustygroove.com", true },
- { "dustyspokesbnb.ca", true },
- { "dustywilson.com", true },
- { "dutch.desi", true },
- { "dutchassistancedogs.nl", true },
- { "dutchessuganda.com", true },
- { "dutchfoodie.nl", true },
- { "dutchforkrunners.com", true },
- { "dutchrank.nl", true },
- { "dutchsailors.com", true },
- { "dutchwanderers.nl", true },
- { "dutchweballiance.nl", true },
- { "dutkoteam.com", true },
- { "dutrac.co.id", true },
- { "dutyfreeinformation.com", true },
- { "duval.paris", true },
- { "duvalo.eu", true },
- { "duvalo.info", true },
- { "duvalo.net", true },
- { "duvalo.org", true },
- { "duvalo.sk", true },
- { "duxi-s-feromonami.ga", true },
- { "dv189.com", true },
- { "dvbris.co.uk", true },
- { "dvbris.com", true },
- { "dvdinmotion.com", true },
- { "dvdland.com.au", true },
- { "dvhosting.be", true },
- { "dvipadmin.com", true },
- { "dvlot.ru", true },
- { "dvnatura.ch", false },
- { "dvorupotocnych.sk", true },
- { "dvwc.org", true },
- { "dvx.cloud", true },
- { "dwarf.com.tw", true },
- { "dwgf.xyz", true },
- { "dwi-sued.de", true },
- { "dwood.store", true },
- { "dworzak.ch", true },
- { "dwscdv3.com", true },
- { "dwtm.ch", true },
- { "dwworld.co.uk", true },
- { "dwz-solutions.com", true },
- { "dx-revision.com", true },
- { "dxgl.info", true },
- { "dxgl.org", true },
- { "dxm.no-ip.biz", true },
- { "dxmpay.com", true },
- { "dxzsj.cn", true },
- { "dybuster.at", true },
- { "dybuster.ch", true },
- { "dybuster.com", true },
- { "dybuster.de", true },
- { "dybuster.es", true },
- { "dybuster.it", true },
- { "dybuster.se", true },
- { "dycoa.com", true },
- { "dyeager.org", true },
- { "dyktig.as", true },
- { "dyktig.no", true },
- { "dylangattey.com", true },
- { "dylankatz.com", true },
- { "dylanknoll.ca", true },
- { "dylanscott.com.au", true },
- { "dylanspcrepairs.com", true },
- { "dylmye.me", false },
- { "dylnuge.com", true },
- { "dym.asia", true },
- { "dym.bz", true },
- { "dym2012.com", true },
- { "dym2013.com", true },
- { "dym2014.com", true },
- { "dym2017.com", true },
- { "dymdajce.ovh", true },
- { "dymersion.com", true },
- { "dymfbbs.com", true },
- { "dymmovie.com", true },
- { "dymowski.de", false },
- { "dyn.im", true },
- { "dynaloop.net", false },
- { "dynamicdesignuk.com", true },
- { "dynamicnet.net", false },
- { "dynamics-365.no", true },
- { "dynamics365.no", true },
- { "dynamicsnetwork.net", true },
- { "dynamicsretailnotes.com", true },
- { "dynamofanforum.de", true },
- { "dynapptic.com", true },
- { "dynastic.co", true },
- { "dynastyarena.com", true },
- { "dynastybullpen.com", true },
- { "dynastycalculator.com", true },
- { "dynastycentral.com", true },
- { "dynastychalkboard.com", true },
- { "dynastyclubhouse.com", true },
- { "dynastycrate.com", true },
- { "dynastyduel.com", true },
- { "dynastyfan.com", true },
- { "dynastygoal.com", true },
- { "dynastylocker.com", true },
- { "dynastyredline.com", true },
- { "dyncdn.me", true },
- { "dyneco.io", true },
- { "dynn.be", false },
- { "dynocc.xyz", true },
- { "dynorphin.com", true },
- { "dynorphins.com", true },
- { "dynts.pro", true },
- { "dynx.pl", true },
- { "dyremyhr.no", true },
- { "dyrenesverden.no", true },
- { "dyrkar.com", true },
- { "dyrstad.net", true },
- { "dys-coaching.com", true },
- { "dyscalculia-blog.com", true },
- { "dysthymia.com", true },
- { "dyyn.de", true },
- { "dz7337.com", true },
- { "dzar.nsupdate.info", true },
- { "dzeina.ch", false },
- { "dzet.de", true },
- { "dziaduch.pl", true },
- { "dziary.com", true },
- { "dziekonski.com", true },
- { "dziscover.com", true },
- { "dziura.me", true },
- { "dziurdzia.pl", true },
- { "dzivniekubriviba.lv", true },
- { "dzndk.com", true },
- { "dznn.nl", true },
- { "dzomo.org", true },
- { "dzsi.bi", false },
- { "dzsibi.com", true },
- { "dzsula.hu", true },
- { "dzu.fund", true },
- { "dzu.me", true },
- { "dzu.works", true },
- { "dzus.tk", true },
- { "dzworld.com", true },
- { "dzyszla.pl", true },
- { "dzytdl.com", true },
- { "e-account.by", true },
- { "e-bap.net", true },
- { "e-beyond.de", true },
- { "e-bikesdirect.co.uk", true },
- { "e-biografias.net", true },
- { "e-bookshelf.de", true },
- { "e-borneoshop.com", true },
- { "e-briancon.com", true },
- { "e-coexist.com", true },
- { "e-colle.info", true },
- { "e-cottage.com.br", true },
- { "e-diabolo.tk", true },
- { "e-emploi.be", true },
- { "e-enterprise.gov", false },
- { "e-id.ee", true },
- { "e-klempir.cz", true },
- { "e-lambre.com", true },
- { "e-learningbs.com", true },
- { "e-m1.com", true },
- { "e-mandataires.fr", true },
- { "e-michiganinsurance.com", true },
- { "e-node.net", true },
- { "e-privat.info", true },
- { "e-ptn.com", true },
- { "e-referendum.cz", true },
- { "e-speak24.pl", true },
- { "e-standardstore.org", true },
- { "e-sushi.net", true },
- { "e-teachers.me", true },
- { "e-tech-solution.com", true },
- { "e-tech-solution.net", true },
- { "e-techsolution.com", true },
- { "e-techsolutions.net", true },
- { "e-tonery.cz", true },
- { "e-traceur-france.fr", true },
- { "e-tresor.at", true },
- { "e-tune-mt.net", true },
- { "e-typ.eu", true },
- { "e-verify.gov", true },
- { "e-webos.com", true },
- { "e-worksmedia.com", false },
- { "e.mail.ru", true },
- { "e1488.com", true },
- { "e15r.co", true },
- { "e2a.cn", true },
- { "e2feed.com", true },
- { "e30.ee", true },
- { "e30365.com", true },
- { "e36533.com", true },
- { "e4.chat", true },
- { "e52888.com", true },
- { "e52888.net", true },
- { "e59888.com", true },
- { "e59888.net", true },
- { "e5tv.hu", true },
- { "e6e.io", true },
- { "e7035.com", true },
- { "e7d.io", true },
- { "e7fun.net", true },
- { "e901.com", false },
- { "e9582.com", true },
- { "e965.ru", true },
- { "e9721.com", false },
- { "ea-lateleassistance.com", true },
- { "ea2drocks.com", true },
- { "eacero.com", true },
- { "ead-italia.it", true },
- { "eagar.com.au", true },
- { "eagle.net", true },
- { "eagleindustriesltd.com", true },
- { "eaglemessaging.com", true },
- { "eaglemoe.com", true },
- { "eaglenation.net", true },
- { "eaglewreck.info", true },
- { "eaglexiang.org", true },
- { "eagleyecs.com", true },
- { "eaimty.com", true },
- { "ealadel.com", true },
- { "ealev.de", true },
- { "eallion.com", false },
- { "eapestudioweb.com", true },
- { "earfolds.com", true },
- { "earl.org.uk", true },
- { "earlybetter.com", true },
- { "earlyyearshub.com", true },
- { "earmarks.gov", true },
- { "earn.com", true },
- { "earn99.co", true },
- { "earningthatis.tk", true },
- { "earthava.com", true },
- { "earthcorporation.cf", true },
- { "earthsolidarity.org", true },
- { "earthspundesigns.com", true },
- { "earthsystemprediction.gov", true },
- { "earticleblog.com", true },
- { "easew.com", true },
- { "easez.net", true },
- { "eashwar.com", true },
- { "eason-yang.com", true },
- { "eastarm.net", true },
- { "eastbaycontractor.com", true },
- { "eastblue.org", true },
- { "easterncapebirding.co.za", true },
- { "eastlothianbouncycastles.co.uk", true },
- { "eastmaintech.com", true },
- { "eastmanbusinessinstitute.com", true },
- { "eastmidlandsstargazers.org.uk", true },
- { "eastnorschool.co.uk", true },
- { "eastping.com", true },
- { "eastplan.co.kr", true },
- { "eastsidecottages.co.uk", true },
- { "eastsideroofingcontractor.com", true },
- { "eaststudios.net", true },
- { "eastwesttmc.com.au", true },
- { "eastwind.cloud", true },
- { "eastyorkshirebuses.co.uk", true },
- { "easy-rpg.org", false },
- { "easy-vn.com", true },
- { "easy2bathe.co.uk", true },
- { "easyadsnbanners.tk", false },
- { "easycoding.org", true },
- { "easyconstat.com", true },
- { "easycontentplan.com", true },
- { "easycosmetic.ch", true },
- { "easycredit.se", true },
- { "easydumpsterrental.com", true },
- { "easyeditcms.com", true },
- { "easyeigo.com", true },
- { "easyfiles.ch", true },
- { "easyfiles.gq", true },
- { "easyhaul.com", true },
- { "easylogics.tk", true },
- { "easymotionskin-japan.jp", true },
- { "easynm.cn", true },
- { "easyocm.hu", true },
- { "easypay.bg", true },
- { "easypayments.pro", true },
- { "easypets.fr", false },
- { "easypv.ch", true },
- { "easyroad.fr", true },
- { "easyshare.gq", true },
- { "easyslide.be", true },
- { "easystore.co", true },
- { "easytechguides.com", true },
- { "easytube.ga", true },
- { "easyweenies.com", true },
- { "easywin.ml", true },
- { "easywio.com", true },
- { "eat-sleep-code.com", true },
- { "eatery.co.il", true },
- { "eatmebudapest.hu", true },
- { "eaton-works.com", true },
- { "eatry.io", true },
- { "eatsleeprepeat.net", true },
- { "eatson.com", true },
- { "eatz-and-treatz.com", true },
- { "eaucube.com", true },
- { "eaugenethomas.cf", true },
- { "eauxdespleiades.ch", false },
- { "eazyproject.net", true },
- { "eb-net.de", true },
- { "eb7.jp", true },
- { "ebaby.bg", true },
- { "ebankcbt.com", true },
- { "ebanking.indovinabank.com.vn", true },
- { "ebankingabersicher.ch", true },
- { "ebankingbutsecure.ch", true },
- { "ebankingentoutesecurite.ch", true },
- { "ebankingmasicuro.ch", true },
- { "ebas.ch", true },
- { "ebashim.tk", true },
- { "ebataw.com", true },
- { "ebaymotorssucks.com", true },
- { "ebenda.org", true },
- { "ebenezersbarnandgrill.com", true },
- { "ebermannstadt.de", false },
- { "ebertlang.com", true },
- { "eberwe.in", true },
- { "ebest.co.jp", true },
- { "ebill.pl", true },
- { "ebiografia.com", true },
- { "ebiografias.com.br", true },
- { "ebisi.be", true },
- { "ebizarts.com", true },
- { "eblog.cf", true },
- { "eblog.ink", true },
- { "eboardsolutions.com", true },
- { "eboek.info", true },
- { "ebola-hosting.cz", true },
- { "ebonyriddle.com", true },
- { "eboocker.de", true },
- { "ebookabc.tk", true },
- { "ebooki.eu.org", true },
- { "ebooklib.club", true },
- { "ebooknetworking.net", true },
- { "ebooks-pdf.cf", true },
- { "ebooksgratuits.org", true },
- { "eboutic.ch", true },
- { "eboyer.com", true },
- { "ebpglobal.com", false },
- { "ebrnd.de", true },
- { "ebteam.ir", true },
- { "eburg.ml", true },
- { "ebuyclub.com", true },
- { "ec-current.com", true },
- { "ec.mine.nu", true },
- { "ecardoo.com", true },
- { "ecardoo.de", true },
- { "ecardoo.net", true },
- { "ecardoo.org", true },
- { "ecbt.co.il", true },
- { "ecchidreams.com", true },
- { "eccma.org", true },
- { "ecco-verde.com", false },
- { "ecdn.cz", true },
- { "ecfnorte.com.br", true },
- { "echarity.ae", true },
- { "echarlascartas.es", true },
- { "echidna-rocktools.eu", true },
- { "echinus.solutions", true },
- { "echo-in.info", true },
- { "echo-n.nz", true },
- { "echo-security.co", true },
- { "echo.co.uk", true },
- { "echoanalytics.com", true },
- { "echobridgepartners.com", true },
- { "echodio.com", true },
- { "echoesfromantiquity.com", true },
- { "echofoxtrot.co", true },
- { "echoit.net", true },
- { "echoit.net.au", true },
- { "echoit.services", true },
- { "echopaper.com", true },
- { "echorecovery.org", true },
- { "echosim.io", true },
- { "echosixmonkey.com", true },
- { "echosnature.fr", true },
- { "echosystem.fr", true },
- { "echoworld.ch", false },
- { "echternach-immobilien.de", true },
- { "ecigfind.com", true },
- { "ecir.pro", true },
- { "ecir.ru", true },
- { "ecirtam.net", true },
- { "eciso.io", true },
- { "eckel.co", true },
- { "eckstein.tech", true },
- { "eclectiv.com", true },
- { "eclipse.ws", true },
- { "eclipseforum.tk", true },
- { "eclypsium.io", false },
- { "ecmatching.com", true },
- { "ecnetworker.com", true },
- { "eco-derattizzazione.it", true },
- { "eco-flowplumbing.com", true },
- { "eco-repair.be", true },
- { "eco-solu.co.jp", true },
- { "eco-work.it", true },
- { "eco2u.ru", true },
- { "ecobagsmauritius.com", true },
- { "ecobee.com", false },
- { "ecobergerie.fr", true },
- { "ecobin.nl", true },
- { "ecoccinelles.ch", false },
- { "ecoccinelles.com", false },
- { "ecococon.fr", true },
- { "ecocreativity.org", true },
- { "ecocuisinedesign.com", true },
- { "ecodedi.com", true },
- { "ecodesign-labo.jp", true },
- { "ecodesigns.nl", true },
- { "ecodigital.social", true },
- { "ecofabrica.com.br", true },
- { "ecofac-bs.com", true },
- { "ecoformeurope.com", true },
- { "ecogen.com.au", true },
- { "ecogen.net.au", true },
- { "ecoheatcool.co.uk", true },
- { "ecohostingservices.uk", true },
- { "ecole-attalens.ch", false },
- { "ecoledusabbat.org", false },
- { "ecolemathurincordier.com", false },
- { "ecologica.it", true },
- { "ecombustibil.ro", true },
- { "ecomia.dk", true },
- { "ecomonline.ru", true },
- { "ecomycie.com", true },
- { "economiafinanzas.com", true },
- { "economias.pt", true },
- { "economic-sanctions.com", true },
- { "economics-colleges.com", true },
- { "economie2.alsace", true },
- { "economiefidu.ch", false },
- { "economies.ch", false },
- { "econsorzio.com", true },
- { "econsumer.gov", true },
- { "ecorp.cc", true },
- { "ecos-ev.de", true },
- { "ecos.srl", true },
- { "ecoshare.info", true },
- { "ecosm.com.au", true },
- { "ecosound.ch", false },
- { "ecostruxureit.com", true },
- { "ecosystem.atlassian.net", true },
- { "ecosystemmanager-uat1.azurewebsites.net", true },
- { "ecotransfer.bio", true },
- { "ecotur.org", true },
- { "ecovision.com.br", true },
- { "ecpannualmeeting.com", true },
- { "ecpic.gov", true },
- { "ecr-test-backoffice-app.azurewebsites.net", true },
- { "ecr-test-partnapp.azurewebsites.net", true },
- { "ecrandouble.ch", false },
- { "ecriminalrecords.com", true },
- { "ecrownoffire.com", true },
- { "ecsupplyinc.com", true },
- { "ecuadorbienesraices.com", true },
- { "ecuatask.com", true },
- { "ecxforum.com", true },
- { "ed-studios.tk", true },
- { "ed.gs", true },
- { "edailystar.com", true },
- { "edanni.io", true },
- { "edapt.org.uk", true },
- { "edas.info", false },
- { "edcaptain.com", true },
- { "edd-miles.com", true },
- { "eddesign.ch", true },
- { "eddmil.es", true },
- { "eddokloosterman.com", true },
- { "eddyn.net", true },
- { "edeals.co", true },
- { "edeals.co.com", true },
- { "edeals.com.co", true },
- { "edeca.net", true },
- { "edefrutos.me", true },
- { "edehsa.com", true },
- { "edelweiss-pinzolo.com", true },
- { "eden-eu.com", true },
- { "eden-project-insight.tk", true },
- { "eden.co.uk", true },
- { "edenmal.net", true },
- { "edenming.info", true },
- { "edesseglabor.hu", true },
- { "edfinancial.com", true },
- { "edgarz.tk", true },
- { "edgeservices.co.uk", true },
- { "edgetalk.net", true },
- { "edh.email", true },
- { "edhesive.com", true },
- { "edholm.pub", true },
- { "edi-gate.com", true },
- { "edi-gate.de", true },
- { "edibarcode.com", true },
- { "edicct.com", true },
- { "edify.space", false },
- { "edilservizi.it", true },
- { "edilservizivco.it", true },
- { "edinburghsportsandoutdoorlearning.com", true },
- { "edincmovie.com", true },
- { "edisa.xyz", true },
- { "ediscomp.sk", true },
- { "edisongroup.ru", true },
- { "edisonlee55.com", true },
- { "edisonluiz.com", true },
- { "edisonnissanparts.com", true },
- { "edisonprint.ru", true },
- { "edisontent.ru", true },
- { "edit.co.uk", true },
- { "edit.yahoo.com", false },
- { "edited.de", true },
- { "edition-bambou.com", false },
- { "edition-sonblom.de", true },
- { "editionsnoiretrouge.com", true },
- { "editorakanope.com.br", true },
- { "edlinger.at", true },
- { "edlinger.mobi", true },
- { "edlinus.cn", true },
- { "edmm.jp", true },
- { "edmodo.com", true },
- { "edmoncu.com", true },
- { "edmundcelis.com", true },
- { "edp-collaborative.com", true },
- { "edplan.io", true },
- { "edragneainpuscarie.ro", true },
- { "edrosd.cf", true },
- { "edsby.com", true },
- { "edservicing.com", true },
- { "edshogg.co.uk", true },
- { "edsm.net", true },
- { "edstem.org", true },
- { "edstep.com", true },
- { "edtech-hub.com", true },
- { "edtech.ee", true },
- { "edtechwebb.com", true },
- { "edu-kingdom.com", true },
- { "edu6.cloud", true },
- { "eduart.tk", true },
- { "edubase.net", true },
- { "educa2.es", true },
- { "educacionvirtual.com.ar", true },
- { "educaestado.com", true },
- { "educatek.es", true },
- { "educateyourskin.com", true },
- { "educationevolving.org", true },
- { "educationfutures.com", true },
- { "educationmalaysia.co.uk", true },
- { "educative.io", true },
- { "educativetech.com", true },
- { "eductf.org", true },
- { "edugundavetiyesi.com", true },
- { "eduid.se", false },
- { "edukador.com", true },
- { "edumaster.pro", true },
- { "edunet.gq", true },
- { "eduroam.no", true },
- { "eduroam.uy", true },
- { "edusanjal.com", true },
- { "edusercontent.com", true },
- { "eduvpn.no", true },
- { "edv-kohls.de", true },
- { "edv-lehrgang.de", true },
- { "edv-ringhofer.de", true },
- { "edv-schmittner.de", true },
- { "edvgarbe.de", true },
- { "edvmesstec.de", true },
- { "edwardsgrounds.co.uk", true },
- { "edwardsnowden.com", true },
- { "edwardspeyer.com", true },
- { "edwellbrook.com", true },
- { "edwinmattiacci.com", true },
- { "edwinyrkuniversity.de", true },
- { "edxg.de", false },
- { "edxn.de", true },
- { "edyhenry.tk", true },
- { "edyou.eu", true },
- { "edyou.org", true },
- { "edzilla.info", true },
- { "ee00228.com", false },
- { "ee362.com", true },
- { "ee367.com", true },
- { "ee371.com", true },
- { "ee372.com", true },
- { "ee373.com", true },
- { "ee396.com", true },
- { "ee397.com", true },
- { "ee575.com", true },
- { "ee735.com", true },
- { "ee736.com", true },
- { "ee951.com", true },
- { "ee973.com", true },
- { "eebt.hu", true },
- { "eeeeeeeeee.de", true },
- { "eelcapone.nl", true },
- { "eellak.gr", true },
- { "eelsden.net", true },
- { "eelzak.nl", true },
- { "eemcevn.com", true },
- { "eentertain.com.my", true },
- { "eentweevijf.be", true },
- { "eenvren.com", true },
- { "eenvxing.com", true },
- { "eer.io", true },
- { "eerstejaarsweekend.nl", true },
- { "eery.de", true },
- { "eesti.xyz", true },
- { "eet.nu", true },
- { "eewna.org", true },
- { "ef-georgia.org", true },
- { "ef.gy", true },
- { "efaas.nl", true },
- { "efag.com", true },
- { "efcross.com", true },
- { "eff.org", true },
- { "effdocs.com", true },
- { "effe.ch", false },
- { "effective-altruist.com", true },
- { "effectivecoffee.com", true },
- { "effectivepapers.com", true },
- { "effex.ru", true },
- { "effinfun.com", true },
- { "efflam.net", true },
- { "effortlesshr.com", true },
- { "eficsolar.com", true },
- { "efinity.io", true },
- { "efipsactiva.com", true },
- { "eflorashop.be", true },
- { "eflorashop.ch", true },
- { "eflorashop.co.uk", true },
- { "eflorashop.com", true },
- { "eflorashop.de", true },
- { "eflorashop.es", true },
- { "eflorashop.fr", true },
- { "eflorashop.it", true },
- { "eflorashop.mx", true },
- { "eflorashop.net", true },
- { "eflorashop.us", true },
- { "efmcredentialing.org", true },
- { "efoood.org", true },
- { "eft.boutique", true },
- { "egablo.black", true },
- { "egarden.it", true },
- { "egb.at", false },
- { "egbc.ca", true },
- { "egeozcan.com", true },
- { "eges.eu", true },
- { "egg-ortho.ch", true },
- { "eggblast.com", true },
- { "eggendorfer.at", true },
- { "eggendorfer.be", true },
- { "eggendorfer.biz", true },
- { "eggendorfer.ch", true },
- { "eggendorfer.co.uk", true },
- { "eggendorfer.de", true },
- { "eggendorfer.info", true },
- { "eggendorfer.it", true },
- { "eggendorfer.li", true },
- { "eggendorfer.name", true },
- { "eggendorfer.net", true },
- { "eggendorfer.online", true },
- { "eggendorfer.org", true },
- { "eggendorfer.pro", true },
- { "eggendorfer.rocks", true },
- { "eggendorfer.tv", true },
- { "eggendorfer.uk", true },
- { "eggendorfer.us", true },
- { "eggendorfer.wine", true },
- { "eggert.org", false },
- { "egglestonyouthcenter.org", true },
- { "egiftcards.be", true },
- { "egles.eu", true },
- { "eglisedenantes.fr", true },
- { "ego4u.com", true },
- { "ego4u.de", true },
- { "egold-keeper.com", true },
- { "egomaniaque.tk", true },
- { "egonix.de", true },
- { "egov4.ch", true },
- { "egovernment-podcast.com", true },
- { "egres.xyz", true },
- { "egrojsoft.info", true },
- { "egrp365.ru", true },
- { "egsl.pro", true },
- { "egw-ceramica.de", true },
- { "egweb.tv", true },
- { "ehaccp.it", true },
- { "ehazi.hu", true },
- { "ehbsecuritydavy.be", true },
- { "ehbssl.com", true },
- { "ehcommerce.com", true },
- { "ehcommerce.org", true },
- { "ehealth.gov.au", true },
- { "eheliche-disziplin.schule", true },
- { "ehipaa.com", true },
- { "ehlacademy.org", true },
- { "ehmsen.nu", true },
- { "ehmtheblueline.com", true },
- { "ehne.de", true },
- { "ehomusicgear.com", true },
- { "ehorizon.jp", true },
- { "ehrenburg.info", true },
- { "ehub.cz", true },
- { "ehub.hu", true },
- { "ehub.pl", true },
- { "ehub.sk", true },
- { "ei-bo.org", true },
- { "eichel.eu", true },
- { "eichinger-stelzl.de", true },
- { "eichler.work", true },
- { "eickemeyer.nl", true },
- { "eickhof.co", true },
- { "eickhof.us", true },
- { "eickhofcolumbaria.com", true },
- { "eidelpes.info", true },
- { "eigenpul.se", true },
- { "eigenpulse.com", true },
- { "eighty-aid.com", true },
- { "eightysoft.de", true },
- { "eigpropertyauctions.co.uk", true },
- { "eihaikyo.com", true },
- { "eikentafels.nl", true },
- { "eikerposten.no", true },
- { "eikounoayumi.jp", true },
- { "eilhan.com", true },
- { "eimacs.com", true },
- { "eimmigration.com", true },
- { "eine-andere-welt.org", true },
- { "einfachbahn.de", true },
- { "einheft.info", true },
- { "einheizpreis.de", true },
- { "einkaufi.de", true },
- { "einrichtwerk.de", true },
- { "einrichtwerk.shop", true },
- { "einsatzstellenverwaltung.de", true },
- { "einser.com", true },
- { "einsteinathome.org", true },
- { "einsurancetraining.com", true },
- { "eintageinzug.de", true },
- { "eintragsservice24.de", true },
- { "eion.io", true },
- { "eioperator.com", false },
- { "eirastudios.co.uk", false },
- { "eirb.fr", true },
- { "eirik.eu", true },
- { "eisaev.ru", true },
- { "eisblau.org", true },
- { "eisen-biomed.ch", true },
- { "eisenbahnfreunde-lengerich.de", true },
- { "eisenhowerlibrary.gov", true },
- { "eiskratzer-bedrucken.de", true },
- { "eiti.online", true },
- { "eiyoushi-shigoto.com", true },
- { "ej.uz", true },
- { "ejdv-anmeldung.de", true },
- { "ejelectrical-qld.com.au", true },
- { "ejkhosting.nl", true },
- { "ejkmedia.nl", true },
- { "ejkmuseum.nl", true },
- { "ejknet.nl", true },
- { "ejkwebdesign.nl", true },
- { "ek-networks.de", false },
- { "ekaigotenshoku.com", true },
- { "ekalisch.de", true },
- { "ekaplast.com.pl", true },
- { "ekati.ru", true },
- { "ekb-avia.ru", true },
- { "ekd.de", true },
- { "ekedc.com", true },
- { "ekedp.com", true },
- { "ekimaeseitai.com", true },
- { "ekimma.com", true },
- { "eklepka.com", true },
- { "eklitzke.org", true },
- { "ekogroszekpieklo.pl", true },
- { "ekokontakt.cz", true },
- { "ekonbenefits.com", true },
- { "ekostecki.de", true },
- { "ekouniejow.pl", true },
- { "ekranos.me", true },
- { "ekre.club", true },
- { "eksisozluk.com", true },
- { "ekspoint-mods.ru", true },
- { "ekvastra.in", true },
- { "ekyu.moe", true },
- { "ekz-crosstour.ch", true },
- { "ekzarta.ru", true },
- { "ekzcrosstour.ch", true },
- { "el-cell.com", true },
- { "el-hossari.com", true },
- { "el-news.de", true },
- { "elaboratefiction.com", true },
- { "eladgames.com", true },
- { "eladlak-ingatlan.com", true },
- { "eladvardi.co.il", true },
- { "elagplus.com", true },
- { "elaheze.com", false },
- { "elainerock.com", true },
- { "elainesearer.com", true },
- { "elaon.de", true },
- { "elarmariodelucia.com", true },
- { "elars.de", true },
- { "elb500ttl.nl", true },
- { "elbetech.net", true },
- { "elblogdegoyo.mx", true },
- { "elbohlyart.com", true },
- { "elburgozagalicos.com", true },
- { "elcambiador.es", true },
- { "elcin.tk", true },
- { "eldapoint.co.uk", true },
- { "eldercare.gov", true },
- { "elderjustice.gov", true },
- { "eldertons.co.uk", true },
- { "eldevo.com", true },
- { "eldoradocylinders.com", true },
- { "eldrid.ge", true },
- { "eldritchfiction.net", true },
- { "electerious.com", true },
- { "electionsbycounty.com", true },
- { "electionsdatabase.com", true },
- { "electr0sheep.com", true },
- { "electragirl.com", true },
- { "electras.cf", true },
- { "electric-vault.co.uk", true },
- { "electricagoura.com", true },
- { "electricagourahills.com", true },
- { "electrical-schools.com", true },
- { "electricalagoura.com", true },
- { "electricalagourahills.com", true },
- { "electricalcalabasas.com", true },
- { "electricalcamarillo.com", true },
- { "electricalconejovalley.com", true },
- { "electricaldosvientos.com", true },
- { "electricalfencingbedfordview.co.za", true },
- { "electricalfencingedenvale.co.za", true },
- { "electricalhiddenhills.com", true },
- { "electricallakesherwood.com", true },
- { "electricalmalibu.com", true },
- { "electricalmoorpark.com", true },
- { "electricalnewburypark.com", true },
- { "electricaloakpark.com", true },
- { "electricalsimivalley.com", true },
- { "electricalthousandoaks.com", true },
- { "electricalwestlakevillage.com", true },
- { "electriccalabasas.com", true },
- { "electriccamarillo.com", true },
- { "electriccitysf.com", true },
- { "electricconejovalley.com", true },
- { "electricdosvientos.com", true },
- { "electricfencealberton.co.za", true },
- { "electricfencebenoni.co.za", true },
- { "electricfenceboksburg.co.za", true },
- { "electricfencemidrand.co.za", true },
- { "electricfenceroodepoort.co.za", true },
- { "electricfencesandton.co.za", true },
- { "electricfencingballito.co.za", true },
- { "electricfencinggillitts.co.za", true },
- { "electricfencinghillcrest.co.za", true },
- { "electricfencingkloof.co.za", true },
- { "electricfencingpinetown.co.za", true },
- { "electricgatemotorgermiston.co.za", true },
- { "electricgatemotorglenvista.co.za", true },
- { "electricgatemotorrandburg.co.za", true },
- { "electricgatemotorsalberton.co.za", true },
- { "electricgatemotorsballito.co.za", true },
- { "electricgatemotorskemptonpark.co.za", true },
- { "electricgatemotorsroodepoort.co.za", true },
- { "electricgatemotorsumhlanga.co.za", true },
- { "electrichiddenhills.com", true },
- { "electrichome.fr", false },
- { "electrician-umhlangaridge.co.za", true },
- { "electricianagoura.com", true },
- { "electricianagourahills.com", true },
- { "electriciancalabasas.com", true },
- { "electriciancamarillo.com", true },
- { "electricianconejovalley.com", true },
- { "electriciandosvientos.com", true },
- { "electricianhiddenhills.com", true },
- { "electriciankemptonpark24-7.co.za", true },
- { "electricianlakesherwood.com", true },
- { "electricianlalucia.co.za", true },
- { "electricianmalibu.com", true },
- { "electricianmoorpark.com", true },
- { "electriciannewburypark.com", true },
- { "electricianoakpark.com", true },
- { "electriciansimivalley.com", true },
- { "electricianthousandoaks.com", true },
- { "electricianwestlakevillage.com", true },
- { "electricimagination.co.uk", true },
- { "electriclakesherwood.com", true },
- { "electricmalibu.com", true },
- { "electricmoorpark.com", true },
- { "electricnewburypark.com", true },
- { "electricoakpark.com", true },
- { "electricsimivalley.com", true },
- { "electricthousandoaks.com", true },
- { "electricwestlakevillage.com", true },
- { "electro-pak.com.pk", true },
- { "electrocardiographe.net", true },
- { "electrocomplect.com.ua", true },
- { "electroforum.tk", true },
- { "electrolivefest.spb.ru", true },
- { "electromagnetism.gq", true },
- { "electronic-ignition-system.com", true },
- { "electronicafacil.net", true },
- { "electronicayseguridadmonserrate.com", true },
- { "electronicfasteners.com", false },
- { "electronicssrit.tk", true },
- { "electroniko.cf", true },
- { "electrostatics.com", true },
- { "electrotainment.com", true },
- { "electroworld.cz", true },
- { "electrum.org", true },
- { "elefantebrasil.com.br", true },
- { "elegance-sm.com", true },
- { "eleganceperfumes.com.br", true },
- { "elegantlatex.tk", true },
- { "eleicoes2014.com.br", true },
- { "eleicoes2016.com.br", true },
- { "eleicoes2018.com", true },
- { "elekharris.com", true },
- { "elektrische-zahnbuerste24.de", true },
- { "elektro-adam.de", true },
- { "elektro-diehm.de", true },
- { "elektro-doerr.com", true },
- { "elektro-hammes.net", true },
- { "elektro-hofmann-gmbh.de", true },
- { "elektro-hornetz.de", true },
- { "elektro-kahlen.de", true },
- { "elektro-koehl.de", true },
- { "elektro-liebeskind.de", true },
- { "elektro-metz.de", true },
- { "elektro-pfeiffer.de", true },
- { "elektro-praha10.cz", true },
- { "elektro-rossbach.de", true },
- { "elektro-roth.de", true },
- { "elektro-stock.de", true },
- { "elektro-woerdehoff.de", true },
- { "elektrobusch.com", true },
- { "elektrofinke.de", true },
- { "elektrokarges.de", true },
- { "elektrometz.de", true },
- { "elektronickakancelar.cz", true },
- { "elektropartner.nu", true },
- { "elektropost.org", true },
- { "elektrotango.tk", true },
- { "elektrotechnik-heisel.de", true },
- { "elektrotechnik-kaetzel.de", true },
- { "elektrownie-tanio.net", true },
- { "elemental.software", true },
- { "elementalsoftware.net", true },
- { "elementalsoftware.org", true },
- { "elementarewatson.it", true },
- { "elementarty.com", true },
- { "elementarywave.com", true },
- { "elementblend.com", true },
- { "elements.guide", true },
- { "elementshop.co.uk", true },
- { "elena-baykova.ru", true },
- { "elenapulizieroma.it", true },
- { "elenatranslations.nl", true },
- { "elenta.lt", true },
- { "elephantia.cf", true },
- { "elephants.net", true },
- { "elepover.com", true },
- { "eletesstilus.hu", true },
- { "eletminosegert.ro", true },
- { "eletor.com", true },
- { "eletor.pl", true },
- { "eletrochape.com.br", true },
- { "elettricista-roma.it", true },
- { "elettricista-roma.org", true },
- { "elettricista.roma.it", true },
- { "eleusis-zur-verschwiegenheit.de", true },
- { "elevationcreative.net", true },
- { "elevationtech.co.za", true },
- { "elevatoraptitudetest.com", true },
- { "elexprimidor.com", true },
- { "elexwong.com", true },
- { "elfe.de", true },
- { "elfnon.com", true },
- { "elforno.gr", true },
- { "elfring.eu", true },
- { "elfuerteclamor.org", true },
- { "elfussports.com", true },
- { "elgalponazo.com.ar", true },
- { "elgenero.com", true },
- { "elglobo.com.mx", false },
- { "elgosblanc.com", true },
- { "elgrecohotel.gr", true },
- { "elgringosrentals.com", true },
- { "elguadia.faith", true },
- { "elguillatun.cl", true },
- { "elhamadimi.com", true },
- { "elherraderoloscabos.com", true },
- { "elhorizontal.com", true },
- { "elhossari.com", true },
- { "elian-art.de", true },
- { "eliaskordelakos.com", true },
- { "eliasong.com", true },
- { "elibom.com", true },
- { "elicite.com", true },
- { "elie.net", true },
- { "eliezermarcano.com", true },
- { "elifesciences.org", true },
- { "eligibilis.com", true },
- { "eligible.com", true },
- { "eligibleapi.com", true },
- { "eligrey.com", true },
- { "elijahgrey.com", true },
- { "elikers.ml", true },
- { "elimer.com.ve", true },
- { "eline168.com", true },
- { "elinevanhaaften.nl", true },
- { "elinvention.ovh", true },
- { "eliott.be", true },
- { "elipsyum.com", true },
- { "elisa.ee", false },
- { "elisabeth-kostecki.de", true },
- { "elisabeth-strunz.de", true },
- { "elisabethbegle.at", true },
- { "elisabethcasanova.ch", true },
- { "elisabethkostecki.de", true },
- { "elisabethrene.com", true },
- { "elite-design.tk", true },
- { "elite-nakhodka.tk", true },
- { "elite-porno.ru", true },
- { "elite-tools.tk", true },
- { "elite12.de", true },
- { "elitebasementsohio.com", true },
- { "elitedns.info", true },
- { "elitegameservers.net", true },
- { "elitel.nl", true },
- { "elitelatinas.com", true },
- { "elitepainmanagement.com", true },
- { "elitsa.gr", true },
- { "elixi.re", true },
- { "elixir.bzh", true },
- { "elizabethbuitrago.com", true },
- { "elizabethrominski.com", true },
- { "elizeugomes.com.br", true },
- { "eljef.me", true },
- { "elkim.cz", true },
- { "elkoy.org", true },
- { "ell888.com", true },
- { "ella-kwikmed.com", false },
- { "ellak.gr", true },
- { "ellatotal.com", true },
- { "elldus.de", true },
- { "elle-weine.de", true },
- { "ellegaard.dk", true },
- { "ellemental.me", true },
- { "ellencorddry.com", true },
- { "ellevit.ch", false },
- { "ellhofen-peccioli.de", true },
- { "elliot.cat", true },
- { "elliquiy.com", true },
- { "ellisamusements.co.uk", true },
- { "ellisleisure.co.uk", true },
- { "ellsinger.me", true },
- { "elmarchive.ir", true },
- { "elmermx.ch", true },
- { "elmot24.pl", true },
- { "elmresan.ir", true },
- { "elo-forum.org", true },
- { "elobservadordiario.com", true },
- { "elodrias.de", true },
- { "elon-musk.ml", true },
- { "elonaspitze.de", true },
- { "elosuite.com", true },
- { "elpo.net", true },
- { "elpoderdelespiritu.org", true },
- { "elprint.com", true },
- { "elradix.eu", true },
- { "elranchofeliz.org", true },
- { "elriacdn.com", true },
- { "elrinconderovica.com", true },
- { "elshou.com", true },
- { "elsignificadodesonar.com", true },
- { "elskling.no", true },
- { "elstopstelten.nl", false },
- { "elsuccionador.com", true },
- { "elsvanderlugt.nl", true },
- { "eltern-verein.ch", true },
- { "elternbeiratswahl.online", true },
- { "elternforum-birmensdorf.ch", true },
- { "elternverein-utzenstorf.ch", true },
- { "eltip.click", true },
- { "eltlaw.com", true },
- { "eltonpastilha.me", true },
- { "eluhome.de", true },
- { "elvendrim.xyz", true },
- { "elviraszabo.com", true },
- { "elvispresley.net", true },
- { "elvn.tokyo", false },
- { "elwave.org", true },
- { "elwebkala.com", true },
- { "elwix.com", true },
- { "elyasweb.com", true },
- { "elycoin.io", true },
- { "elysiandigital.co", true },
- { "elysiria.fr", true },
- { "elysiumware.com", true },
- { "em-biotek.cz", true },
- { "emaging-productions.fr", true },
- { "emaging.fr", true },
- { "email.repair", true },
- { "emailconfiguration.com", true },
- { "emailhunter.co", true },
- { "emailmeform.com", true },
- { "emailprivacytester.com", true },
- { "emaily.eu", true },
- { "emalm.ml", true },
- { "emanuel.photography", true },
- { "emanuelduss.ch", true },
- { "emanueleanastasio.com", true },
- { "emanuelemazzotta.com", true },
- { "emarketingmatters.com", true },
- { "emasex.es", true },
- { "embassycargo.eu", true },
- { "embebelo.com", true },
- { "emberlife.com", true },
- { "embodiaacademy.com", true },
- { "embodiaapp.com", true },
- { "embonus.dk", true },
- { "embox.net", true },
- { "embracecontext.com", true },
- { "embraceni.org", true },
- { "embroideryexpress.co.uk", true },
- { "embsaypreschool.co.uk", true },
- { "emby.cloud", true },
- { "emby.live", true },
- { "emcspotlight.com", true },
- { "emdrupholm.dk", true },
- { "emecew.com", true },
- { "emeliefalk.se", true },
- { "emeliemai.com", true },
- { "ememsei.com", true },
- { "emeraldcityswagger.com", true },
- { "emeraldcoasturgentcare.com", true },
- { "emeraldislerealty.com", true },
- { "emergency-federal-register.gov", true },
- { "emergencycommand.us", true },
- { "emergesydney.com.au", true },
- { "emero.de", true },
- { "emersoncanada.ca", true },
- { "emex.ro", true },
- { "emi.im", true },
- { "emielraaijmakers.nl", true },
- { "emigratieplanner.com", true },
- { "emil-dein-baecker.de", true },
- { "emil-reimann.com", true },
- { "emil.click", true },
- { "emil.one", true },
- { "emiliendevos.be", true },
- { "emilio.media", true },
- { "emiliops.com", true },
- { "emils-1910.de", true },
- { "emilstahl.com", true },
- { "emilstahl.dk", true },
- { "emilvarga.com", true },
- { "emily.moe", true },
- { "emilybellydance.com.au", true },
- { "emilyjohnson.ga", true },
- { "emilypennock.com", true },
- { "emirabiz.com", false },
- { "emirefek.net", true },
- { "emirichardson.com", true },
- { "emisia.com", true },
- { "emkode.pl", true },
- { "emkrivoy.com", true },
- { "emmagarland.com", true },
- { "emmagraystore.com", true },
- { "emmaliddell.com", true },
- { "emmamillernovels.com", true },
- { "emmastree.com", true },
- { "emme3abbigliamento.it", true },
- { "emmiwelentain.com", true },
- { "emmynet.de", true },
- { "emobilityforum.org", true },
- { "emoforum.tk", true },
- { "emoji.bzh", false },
- { "emolafarm.com", true },
- { "emond-usedcars.net", false },
- { "emote.bot", true },
- { "emotebot.com", true },
- { "emotionalmente.com", true },
- { "emotive.productions", true },
- { "emoxie.com", false },
- { "empathogen.com", true },
- { "empathogens.com", true },
- { "empathy.ca", true },
- { "empatico.org", true },
- { "empatico.xyz", true },
- { "emperola.com", true },
- { "emperor-penguin.com", true },
- { "emperor-penguins.com", true },
- { "empherino.net", true },
- { "empire-univ.com", true },
- { "emploi-collectivites.fr", false },
- { "employeeexpress.gov", true },
- { "employeemanual.com.au", true },
- { "employer.gov", true },
- { "employer411.com", true },
- { "employment-applicant.com", true },
- { "emporikonathenshotel.com", true },
- { "emporiodascalcinhas.com.br", true },
- { "emporiodosperfumes.com.br", true },
- { "emporioonline.com.br", true },
- { "emporiopatanegra.com.br", true },
- { "empower.net", true },
- { "empoweraces.com", true },
- { "empowerdb.com", true },
- { "empoweren.com", false },
- { "empowersimcoe.ca", true },
- { "emprechtinger.com", true },
- { "emprego.pt", true },
- { "empregosrj.com", true },
- { "empreinte.ca", true },
- { "empresasguia.es", true },
- { "emptybox.org", true },
- { "empyrean-advisors.com", true },
- { "emrah.io", true },
- { "emreaydinfan.tk", true },
- { "emresaglam.com", true },
- { "emrullahsahin.com", true },
- { "ems.gov", true },
- { "emsa-casm.ca", true },
- { "emsliespharmacy.com.au", true },
- { "emulator.ml", true },
- { "emultiagent.pl", true },
- { "emvoice.net", true },
- { "emvoiceapp.com", true },
- { "emw3.com", true },
- { "emyr.net", true },
- { "emzi0767.com", true },
- { "en-booster.jp", true },
- { "en-crypt.me", true },
- { "en-este.link", true },
- { "en-maktoob.search.yahoo.com", false },
- { "en0.io", true },
- { "en4rab.co.uk", true },
- { "enaah.de", true },
- { "enalean.com", true },
- { "enamae.net", true },
- { "enanto.com", true },
- { "enbecom.net", true },
- { "enbulleiugnen.com", true },
- { "encanttemais.com.br", true },
- { "encfs.win", true },
- { "encircleapp.com", true },
- { "encnet.de", true },
- { "encode.host", true },
- { "encodecloud.net", true },
- { "encontra-me.org", true },
- { "encontroespiritadeinverno.com.br", true },
- { "encoro.org", true },
- { "encountercss.com", true },
- { "encouragemarketing.com", true },
- { "encredible.de", false },
- { "encredible.org", false },
- { "encretplomb.ch", false },
- { "encrypted.google.com", true },
- { "encryptmy.site", true },
- { "encryptmysite.net", true },
- { "encuentraprecios.es", true },
- { "encycarpedia.com", true },
- { "endbox.email", true },
- { "endeal.nl", true },
- { "ender.co.at", true },
- { "ender.fr", true },
- { "ender.moe", true },
- { "enderbycamping.com", true },
- { "enderle.cloud", true },
- { "endingthedocumentgame.gov", true },
- { "endlessdiy.ca", true },
- { "endlessvideo.com", true },
- { "endlesswebsite.tk", true },
- { "endoftenancycleaninglondon.co.uk", true },
- { "endoftennancycleaning.co.uk", true },
- { "endpointsystems.com", true },
- { "enduranceday.be", true },
- { "endurogp.org", true },
- { "endustriyelfirinlar.com", true },
- { "endviolence.gc.ca", true },
- { "endzeit-architekten.com", false },
- { "eneamarcantoni.com", true },
- { "eneko.com", true },
- { "enekogarrido.com", true },
- { "energie-sante.ch", false },
- { "energiekeurplus.nl", true },
- { "energija-visiems.lt", true },
- { "energy-drink-magazin.de", true },
- { "energy-healings.com", true },
- { "energy-in-balance.eu", true },
- { "energy-infra.nl", true },
- { "energy-initiative.com", true },
- { "energy-robotics.com", true },
- { "energy.gov", true },
- { "energyaupair.se", true },
- { "energybank.com.br", true },
- { "energycodes.gov", true },
- { "energydrinkblog.de", true },
- { "energyefficientservices.com", true },
- { "energyelephant.com", true },
- { "energygenie.com.au", true },
- { "energyled.com.br", true },
- { "energysolutionstech.com", true },
- { "energystar.gov", true },
- { "enersolelectrical.com.au", true },
- { "enerypa.tk", true },
- { "enet-navigator.de", true },
- { "enfantsdelarue.ch", true },
- { "enflow.nl", true },
- { "enforcement-trends-dev.azurewebsites.net", true },
- { "enforcement-trends-test.azurewebsites.net", true },
- { "enforcement-trends.azurewebsites.net", true },
- { "eng-erlangen.de", true },
- { "engagelogic.com", true },
- { "enganches.es", true },
- { "engarde.net", true },
- { "engaugetools.com", true },
- { "engelke-optik.de", false },
- { "engelsholm.dk", true },
- { "engelwerbung.com", true },
- { "engg.ca", true },
- { "engie-laadpalen.nl", true },
- { "engiedev.net", true },
- { "engima.nl", true },
- { "engineeringbigdata.com", true },
- { "enginepit.com", true },
- { "enginsight.com", true },
- { "engione.com", true },
- { "engl-server.de", true },
- { "engl-systems.de", true },
- { "englishbulgaria.net", true },
- { "englishcast.com.br", true },
- { "englishforums.com", true },
- { "englishlol.com", true },
- { "englishphonopass.com", true },
- { "englishstudio.com", true },
- { "englishtofrench.eu", true },
- { "englishtype.com", false },
- { "engvid.com", true },
- { "engweld.co.uk", true },
- { "enigma.swiss", false },
- { "enitso.de", true },
- { "enity.tk", true },
- { "enixgaming.com", true },
- { "eniziolab.com", true },
- { "enjin.io", true },
- { "enjin.zone", true },
- { "enjincoin.io", true },
- { "enjinwallet.io", true },
- { "enjinx.cn", true },
- { "enjinx.io", true },
- { "enjoy-drive.com", true },
- { "enjoymondayofficial.com", true },
- { "enjoytech.fr", true },
- { "enlight.no", true },
- { "enlightenedhr.com", true },
- { "enlilrosse.com", true },
- { "ennea-mediation.fr", true },
- { "enness.co.uk", true },
- { "ennori.jp", true },
- { "enodais.gr", true },
- { "enoisdaturma.tk", true },
- { "enorekcah.com", true },
- { "enot32.ru", true },
- { "enotecastore.it", true },
- { "enotefile.com", true },
- { "enpasenerji.com.tr", true },
- { "enquos.com", true },
- { "enrack.tk", true },
- { "enrich.email", true },
- { "enrico-caruso.it", true },
- { "enrique-monroy.tk", true },
- { "enrique.wtf", true },
- { "enriquepiraces.com", true },
- { "enrollapp.com", true },
- { "ensage.io", true },
- { "ensemble-rubato.de", true },
- { "ensembling.com", true },
- { "ensley.tech", true },
- { "ensons.de", true },
- { "ensured.com", true },
- { "ensured.nl", true },
- { "ensurtec.com", true },
- { "ent-london.com", true },
- { "entabe.jp", true },
- { "entactogen.com", true },
- { "entactogens.com", true },
- { "enter.eco", true },
- { "entercenter.ru", true },
- { "entersoftsecurity.com", true },
- { "entertainmentblog.tk", true },
- { "entertainmentformitzvahs.com", true },
- { "enthasso.gr", true },
- { "entheogens.com", true },
- { "enthusiaformazione.com", true },
- { "entorangecounty.com", true },
- { "entradaweb.cl", true },
- { "entrainr.com", true },
- { "entrecieletpierres.com", false },
- { "entrezdansladanse.fr", true },
- { "entropia.de", false },
- { "entropy.su", true },
- { "entrup.io", true },
- { "entryboss.cc", true },
- { "entrypoint.sh", true },
- { "entwickler.land", true },
- { "enuchi.jp", true },
- { "enuygun.com", true },
- { "envant.co.uk", true },
- { "envescent.com", true },
- { "enviaya.com.mx", true },
- { "envide.no", true },
- { "enviro-umweltservice.de", true },
- { "enviroli.co.uk", true },
- { "enviroli.com", true },
- { "enviroli.org.uk", true },
- { "enviroli.uk", true },
- { "environmental-colleges.com", true },
- { "enviroprobasements.com", true },
- { "envman.io", true },
- { "envoie.moi", true },
- { "envoker.nl", true },
- { "envoyez.moi", true },
- { "envoypresents.com", true },
- { "envygeeks.io", true },
- { "enwikipedia.tk", true },
- { "enxadahost.com", true },
- { "enzoic.com", true },
- { "eocservices.co.uk", true },
- { "eoitek.com", true },
- { "eola.co", true },
- { "eon.tech", true },
- { "eonhive.com", true },
- { "eons.io", true },
- { "eonwavesstudio.com", true },
- { "eooe.me", true },
- { "eoonglobalresources.jp", true },
- { "eopugetsound.org", false },
- { "eos-utvalget.no", true },
- { "eosol.de", true },
- { "eosol.net", true },
- { "eosolutions.co", true },
- { "eoy.cz", true },
- { "ep-cortex.com", true },
- { "ep-plus.jp", true },
- { "epa.com.es", true },
- { "epagos.com.ar", true },
- { "epal.pt", true },
- { "epassafe.com", true },
- { "epawnatl.com", true },
- { "epay.bg", true },
- { "epcreport.net", true },
- { "epdeveloperchallenge.com", true },
- { "eperniagaan.com", true },
- { "ephesusbreeze.com", true },
- { "epi-lichtblick.de", true },
- { "epi.one", false },
- { "epic-vistas.com", true },
- { "epic-vistas.de", true },
- { "epicbouncycastles.co.uk", true },
- { "epiccdn.net", true },
- { "epicdowney.com", true },
- { "epicentar.mk", true },
- { "epicenter.ga", true },
- { "epicenter.work", true },
- { "epicenter.works", true },
- { "epicentre.works", true },
- { "epicfail.be", true },
- { "epichouse.net", false },
- { "epicinflatables.co.uk", true },
- { "epickitty.co.uk", true },
- { "epiclub.com.au", true },
- { "epicsoft.de", true },
- { "epicvistas.com", true },
- { "epicvistas.de", true },
- { "epicwalnutcreek.com", true },
- { "epidastudio.com", true },
- { "epidauros.be", true },
- { "epigrafes-led-farmakeia.gr", true },
- { "epikomagazine.com", false },
- { "epilepsiyle.com", true },
- { "epilis.gr", true },
- { "epinesdeparadis.com", true },
- { "epiphanyofourlordchurch.com", true },
- { "epiphyte.network", true },
- { "episkevh-plaketas.gr", true },
- { "epistas.com", true },
- { "epistas.de", true },
- { "epiteugma.com", true },
- { "epitome.cc", true },
- { "epitome.games", true },
- { "epizentrum.work", true },
- { "epizentrum.works", true },
- { "epmcentroitalia.it", true },
- { "epoker6.com", true },
- { "epolitiker.com", true },
- { "epos-distributor.co.uk", true },
- { "epos.az", true },
- { "eposbirmingham.co.uk", true },
- { "eposbrighton.co.uk", true },
- { "eposbristol.co.uk", true },
- { "eposcardiff.co.uk", true },
- { "eposig.net", true },
- { "eposkent.co.uk", true },
- { "eposleeds.co.uk", true },
- { "eposleicester.co.uk", true },
- { "eposliverpool.co.uk", true },
- { "eposlondon.co.uk", true },
- { "epossheffield.co.uk", true },
- { "eposswansea.co.uk", true },
- { "epost.pub", true },
- { "epostplus.li", true },
- { "eposyork.co.uk", true },
- { "eppelblei.lu", true },
- { "eppelduerferjugend.lu", true },
- { "eppelpress.lu", true },
- { "eppione.com", true },
- { "epreskripce.cz", true },
- { "eprezto.com", true },
- { "eprojectfreetv.com", true },
- { "epsi.io", true },
- { "epsmil.it", true },
- { "epspolymer.com", true },
- { "epublibre.org", true },
- { "epvin.com", true },
- { "epyonsuniverse.net", true },
- { "eq-serve.com", true },
- { "eqassociates.com", true },
- { "eqibank.com", true },
- { "eqiware.com", true },
- { "equabanking.cz", true },
- { "equalcloud.com", true },
- { "equidam.com", true },
- { "equifaxobjection.com", true },
- { "equinecoaching.ca", true },
- { "equinetherapy.ca", true },
- { "equinox.io", true },
- { "equip-test.com", true },
- { "equipandoloja.net.br", true },
- { "equipedefrance.tv", false },
- { "equipoweb.info", true },
- { "equippers.de", true },
- { "equisecu.com", true },
- { "equk.co.uk", true },
- { "er-mgmt.com", true },
- { "er.tl", true },
- { "er1s.xyz", true },
- { "era.fi", true },
- { "eradigital.net", true },
- { "eradoom.net", true },
- { "erasmo.info", true },
- { "erasmusplusrooms.com", true },
- { "erasure.tk", true },
- { "erate.fi", true },
- { "erath.fr", false },
- { "erdethamburgeronsdag.no", true },
- { "erektion1.gq", true },
- { "erethon.com", true },
- { "erf-neuilly.com", true },
- { "erfolgsmaschine.ch", true },
- { "ergaomnes.cz", true },
- { "ergo-open.de", true },
- { "ergobyte.eu", true },
- { "ergobyte.gr", true },
- { "ergodark.com", true },
- { "ergonova.fr", true },
- { "ergovita.com.br", true },
- { "ergowish.com", true },
- { "ericabrahamsen.net", true },
- { "ericairwin.com", true },
- { "ericdiao.com", true },
- { "erichoekstra.com", true },
- { "erichoekstra.nl", true },
- { "erichogue.ca", true },
- { "erichorstmanshof.nl", true },
- { "erick.blog", true },
- { "ericksonvasquez.com", true },
- { "ericleuthardt.com", true },
- { "ericoc.com", true },
- { "erics.site", true },
- { "ericsilva.org", true },
- { "ericspeidel.de", true },
- { "erictgilmour.ca", true },
- { "ericvaughn-flam.com", true },
- { "eridanus.uk", true },
- { "eridas.ml", true },
- { "erigrid.eu", true },
- { "eriix.org", true },
- { "erik-stomp.de", true },
- { "erikapsicologia.com", true },
- { "erikatanithphotography.co.uk", true },
- { "erikheemskerk.nl", true },
- { "erikhubers.nl", true },
- { "erikkruithof.nl", true },
- { "eriksen.im", true },
- { "erikseth.de", true },
- { "erikw.me", true },
- { "erikwalther.eu", true },
- { "erinaceinae.com", true },
- { "eringmaguire.com", true },
- { "erinn.io", true },
- { "erisrenee.com", true },
- { "eristajanmutka.com", true },
- { "erisys.net", true },
- { "erkaelderbarenaaben.dk", true },
- { "erkenntniswen.de", true },
- { "erkiss.live", true },
- { "erlebnisarchaeologie-bayern.de", true },
- { "ernal.net", true },
- { "ernearmetx.com", true },
- { "ernest.ly", true },
- { "ernsteisprung.ch", true },
- { "ero-video.net", true },
- { "ero.ink", false },
- { "erodvd.com", false },
- { "eromon.net", true },
- { "eron.info", true },
- { "eropics.org", true },
- { "eroticlist.com", true },
- { "erp-band.ru", true },
- { "erp.band", true },
- { "erpax.com", true },
- { "erpband.ru", true },
- { "erpcargo.com", false },
- { "erpelstolz.at", true },
- { "erperium.nl", true },
- { "erpiv.com", true },
- { "errietta.me", true },
- { "errolstambler.com", true },
- { "error.fail", true },
- { "error418.nl", true },
- { "errortools.com", true },
- { "ers35.com", true },
- { "ersa-shop.com", true },
- { "ershiwo.com", true },
- { "ersinbiltekin.tk", true },
- { "ersinerce.com", true },
- { "erstehilfeprodukte.at", true },
- { "ert.ovh", true },
- { "erty.stream", true },
- { "eru.im", false },
- { "eru.moe", true },
- { "erudicia.com", true },
- { "erudicia.de", true },
- { "erudicia.es", true },
- { "erudicia.fr", true },
- { "erudicia.it", true },
- { "erudicia.nl", true },
- { "erudicia.se", true },
- { "erudicia.uk", true },
- { "erudikum.cz", true },
- { "eruga.es", true },
- { "ervaarjapan.nl", true },
- { "ervinthagod.xyz", true },
- { "erwanlepape.com", true },
- { "erwin.saarland", true },
- { "erwinpaal.nl", true },
- { "erwinschmaeh.ch", true },
- { "erwinwensveen.nl", true },
- { "erythroxylum-coca.com", true },
- { "es-geenen.de", true },
- { "es-tools.at", true },
- { "es-tools.com", true },
- { "es-tools.de", true },
- { "es-trade.biz", true },
- { "es.search.yahoo.com", false },
- { "es888.net", true },
- { "es9999.net", true },
- { "esagente.com", true },
- { "esailinggear.com", true },
- { "esalesclub.com", true },
- { "esalesdata.com", true },
- { "esamievalori.com", true },
- { "esample.info", true },
- { "esb-in.net", true },
- { "esb-top.com", true },
- { "esb-top.net", true },
- { "esb168168.com", true },
- { "esb168168.info", true },
- { "esb168168.net", true },
- { "esb168168.org", true },
- { "esb1688.biz", true },
- { "esb1688.com", true },
- { "esb1688.info", true },
- { "esb1688.net", true },
- { "esb1688.org", true },
- { "esb1711.com", true },
- { "esb1711.net", true },
- { "esb1788.com", true },
- { "esb1788.net", true },
- { "esb1788.org", true },
- { "esb2013.com", true },
- { "esb2013.net", true },
- { "esb2099.com", true },
- { "esb2099.net", true },
- { "esb258.net", true },
- { "esb325.com", true },
- { "esb325.net", true },
- { "esb333.net", true },
- { "esb336.com", true },
- { "esb433.com", true },
- { "esb518.com", true },
- { "esb553.com", true },
- { "esb555.biz", true },
- { "esb555.cc", true },
- { "esb5889.com", true },
- { "esb6.net", true },
- { "esb677.net", true },
- { "esb777.biz", true },
- { "esb777.org", true },
- { "esb886.com", true },
- { "esb888.net", true },
- { "esb9527.com", true },
- { "esb9588.com", true },
- { "esb9588.info", true },
- { "esb9588.net", true },
- { "esb9588.org", true },
- { "esb999.org", true },
- { "esba11.com", true },
- { "esball-in.com", true },
- { "esball-in.net", true },
- { "esball.bz", true },
- { "esball.cc", true },
- { "esball.mx", true },
- { "esball.online", true },
- { "esball.org", true },
- { "esball.win", true },
- { "esball.ws", true },
- { "esball518.com", true },
- { "esball518.info", true },
- { "esball518.net", true },
- { "esball518.org", true },
- { "esballs.com", true },
- { "esbbon.com", true },
- { "esbbon.net", true },
- { "esbfun.com", true },
- { "esbfun.net", true },
- { "esbgood.com", true },
- { "esbin.net", true },
- { "esbjon.com", true },
- { "esbjon.net", true },
- { "esbm4.net", true },
- { "esbm5.net", true },
- { "esc.chat", true },
- { "esc.gov", true },
- { "escael.org", true },
- { "escalesensorielle.com", true },
- { "escandille.com", false },
- { "escapeforyou.com", true },
- { "escapeplaza.de", true },
- { "escaperoomdoctor.com", true },
- { "escaperoompsl.com", true },
- { "escaperoomsolutions.com", true },
- { "escapetalk.nl", true },
- { "escavador.com", true },
- { "esclear.de", true },
- { "escobarservice7000.com", true },
- { "escontact.ch", false },
- { "escortbee.com", true },
- { "escortbruxelles.be", true },
- { "escortgigolo.com", true },
- { "escortlareryaman.com", true },
- { "escortlistings.ca", true },
- { "escortlistings.ph", true },
- { "escortsforu.com", true },
- { "escortslittleblackbook.com", true },
- { "escovator-records.tk", true },
- { "escritoriodearte.com", false },
- { "escuelabiblica.com", true },
- { "escyr.top", true },
- { "esdacademy.eu", false },
- { "esdenera.com", true },
- { "esdiscuss.org", true },
- { "eseances.ch", true },
- { "esehospitalsabanagrande.com", true },
- { "eservices-greece.com", true },
- { "eseth.de", true },
- { "esfiledecrypter.com", true },
- { "esg-abi2001.de", true },
- { "esgen.org", true },
- { "esgr.in", true },
- { "esher.ac.uk", true },
- { "eshigami.com", true },
- { "eshop-prices.com", true },
- { "eshspotatoes.com", true },
- { "esigmbh.de", true },
- { "esigtorg.ru", true },
- { "esim.cz", true },
- { "esite.ch", true },
- { "eskapi.fr", true },
- { "eskdale.net", true },
- { "eskriett.com", false },
- { "eslint.org", false },
- { "esmart.ru", true },
- { "esmejor.tk", true },
- { "esmoney.cc", true },
- { "esmoney.me", true },
- { "esoa.net", true },
- { "esoko.eu", true },
- { "esolcourses.com", true },
- { "esolitos.com", true },
- { "eson.eu", true },
- { "esono.de", true },
- { "esoteric.website", true },
- { "esoterikerforum.de", true },
- { "esovita.de", true },
- { "espace-caen.fr", false },
- { "espace-habitat-francais.fr", true },
- { "espace.network", true },
- { "espacelanguetokyo.fr", true },
- { "espacetemps.ch", true },
- { "espacetheosophie.fr", true },
- { "espacio-cultural.com", true },
- { "espaciosdelalma.com", true },
- { "espanol.search.yahoo.com", false },
- { "espci.fr", true },
- { "especialistagoogleadwords.com.br", true },
- { "especificosba.com.ar", true },
- { "espehus.dk", true },
- { "esperantio.tk", true },
- { "espgg.org", true },
- { "espherapromocional.com.br", true },
- { "espigol.org", true },
- { "espiragen.com", true },
- { "espiritugay.com", true },
- { "espirituracer.com", true },
- { "esport-agency.fr", true },
- { "espritrait.com", false },
- { "espyder.net", true },
- { "esquirou-trieves.fr", false },
- { "esrhd.com", true },
- { "esrinfo.com", true },
- { "esroradio.com", true },
- { "essay-writing-topics-fce.tk", true },
- { "essayace.co.uk", true },
- { "essaybrand.com", true },
- { "essaychecker.com", true },
- { "essaydirectory.com", false },
- { "essayforsale.net", true },
- { "essayforum.com", false },
- { "essayhave.com", true },
- { "essayjob.com", true },
- { "essaylib.com", true },
- { "essaymaker.gq", true },
- { "essaynews.com", true },
- { "essaypro.net", true },
- { "essays.me", true },
- { "essayscam.org", false },
- { "essayshark.com", true },
- { "essaytalk.com", true },
- { "essaywriting.biz", true },
- { "essenalablog.de", true },
- { "essencespresso.es", true },
- { "essenerbaeder.de", true },
- { "essentta.com", true },
- { "essex.cc", true },
- { "essextimbercraft.co.uk", true },
- { "essite.net", true },
- { "esslm.sk", true },
- { "essoduke.org", true },
- { "essteebee.ch", false },
- { "est-it.de", true },
- { "est-keyman.de", true },
- { "estada.ch", true },
- { "estadoreclamos.com", true },
- { "estafallando.es", true },
- { "estafallando.mx", true },
- { "estahl.dk", true },
- { "estaleiro.org", true },
- { "estalinas.com", true },
- { "estallidodigital.cl", true },
- { "estaryshop.com.br", true },
- { "estcequejailaflemme.fr", false },
- { "estcequonmetenprodaujourdhui.info", true },
- { "esteam.se", true },
- { "estedafah.com", true },
- { "estefan.dyndns.org", true },
- { "estela-artes.com", true },
- { "esteladigital.com", true },
- { "esteriliza-me.org", true },
- { "esterilizacion-perros.es", true },
- { "esteticanorte.com.br", true },
- { "estetici.com", true },
- { "estetista.net", true },
- { "esthe-zukan.com", true },
- { "estherlew.is", true },
- { "estilopack-loja.com.br", true },
- { "estimulantesbrasil.com", true },
- { "estintori.roma.it", true },
- { "estoic.net", true },
- { "estonoentraenelexamen.com", true },
- { "estoppels.com", true },
- { "estudiaenrusia.com", true },
- { "estudiarparaser.com", true },
- { "estudiaryaprenderingles.com", true },
- { "estudioaguiar.com.br", true },
- { "estufitas.com", true },
- { "esuretynew.azurewebsites.net", true },
- { "esyoil.com", true },
- { "et-inf.de", true },
- { "eta.cz", true },
- { "etaes.eu", true },
- { "etajerka-spb.ru", true },
- { "etajerka.spb.ru", true },
- { "etalktome.com", true },
- { "etaoinwu.com", true },
- { "etaoinwu.win", true },
- { "etasigmaphi.org", true },
- { "etath.com", true },
- { "etax.com.au", true },
- { "etaxigraz.com", true },
- { "etaxintuit.com", true },
- { "etccooperative.org", true },
- { "etch.co", true },
- { "etda.or.th", true },
- { "etduvindemoselle.fr", true },
- { "etech-solution.com", true },
- { "etech-solution.net", true },
- { "etech-solutions.com", true },
- { "etechsolution.net", true },
- { "eteesheet.com", true },
- { "eternal-warriors.de", true },
- { "eternalabyss.int.eu.org", true },
- { "eternalparking.com", true },
- { "eternalparking.eu", true },
- { "eternalparking.net", true },
- { "eternalparking.org", true },
- { "eternalsymbols.com", true },
- { "eternit.roma.it", true },
- { "eth0.nl", true },
- { "eth1.fi", true },
- { "etha.nz", true },
- { "ethack.org", true },
- { "ethanchin.com", false },
- { "ethanjones.me", true },
- { "ethanlew.is", true },
- { "ethelbrooks.com", true },
- { "ethelbrooks.es", true },
- { "ethercalc.org", true },
- { "etherpad.nl", true },
- { "ethers.news", true },
- { "ethicalconsumer.org", true },
- { "ethicaldata.co.uk", true },
- { "ethicalescorts.com", true },
- { "ethicallogistics.com", true },
- { "ethicalpolitics.org", true },
- { "ethicsburg.gov", true },
- { "ethika.com", true },
- { "ethil-faer.fr", true },
- { "ethiopian.dating", true },
- { "ethitter.com", true },
- { "etienne.cc", true },
- { "etiennes.work", true },
- { "etiquetaunica.com.br", true },
- { "etkarle.de", true },
- { "etna.com.br", true },
- { "etnis.id", true },
- { "etnoria.com", true },
- { "etoile-usedcars.com", false },
- { "etre-soi.ch", false },
- { "etre-vivant.fr", false },
- { "etrecosmeticderm.com", true },
- { "etresmant.es", true },
- { "etrker.com", true },
- { "ets2mp.de", true },
- { "etskinner.com", true },
- { "etskinner.net", true },
- { "etudesbibliques.fr", false },
- { "etudesbibliques.net", false },
- { "etudesbibliques.org", false },
- { "eturist.si", true },
- { "etutsplus.com", true },
- { "etv.cx", true },
- { "etwalldentalpractice.co.uk", true },
- { "etyd.org", true },
- { "eu-darlehen-finanzierung.de", true },
- { "eu-datenbank.de", true },
- { "eu-gamers.com", true },
- { "eu-stellenangebot.de", true },
- { "euaggelion.blog.br", true },
- { "euanbarrett.com", true },
- { "euc.world", true },
- { "euchre.us", true },
- { "eugenekay.com", true },
- { "eugenetech.org", true },
- { "eugeniocorso.com", true },
- { "eujuicers.bg", true },
- { "eujuicers.com", true },
- { "eujuicers.com.hr", true },
- { "eujuicers.com.ua", true },
- { "eujuicers.cz", true },
- { "eujuicers.de", true },
- { "eujuicers.es", true },
- { "eujuicers.fr", true },
- { "eujuicers.hu", true },
- { "eujuicers.it", true },
- { "eujuicers.pl", true },
- { "eujuicers.pt", true },
- { "eujuicers.ro", true },
- { "eujuicers.rs", true },
- { "eujuicers.ru", true },
- { "eujuicers.si", true },
- { "eujuicers.sk", true },
- { "eulenschmiede.de", true },
- { "eulessplumbers.com", true },
- { "euman.ml", true },
- { "eumananc.ro", true },
- { "eumr.org", true },
- { "euporos.ch", true },
- { "eureka.archi", true },
- { "eurmarketing.com", true },
- { "euro-construction.co.uk", true },
- { "euroalter.com", true },
- { "eurocars2000.es", true },
- { "eurocenterobuda.hu", true },
- { "eurocertificazione.it", true },
- { "eurocomcompany.cz", true },
- { "eurocons.ro", true },
- { "euroconthr.ro", true },
- { "eurodentaire.com", true },
- { "euroexpres.info", true },
- { "euroflora.com", true },
- { "euroflora.mobi", true },
- { "eurofrank.eu", true },
- { "eurogarden-parts.de", true },
- { "eurogarden.be", true },
- { "eurogarden.nl", true },
- { "euroherp.com", true },
- { "eurolocarno.es", true },
- { "euronic.fi", true },
- { "europa.jobs", true },
- { "europainchemnitz.de", true },
- { "europalettenkaufen.de", true },
- { "europareise2010.de", true },
- { "europarts-sd.com", true },
- { "europastudien-chemnitz.de", true },
- { "european-agency.org", true },
- { "european-hospital.ga", true },
- { "european-hospital.ml", true },
- { "european-hospital.tk", true },
- { "europeancupinline.eu", true },
- { "europeanstudies-chemnitz.de", true },
- { "europeantimberconnectors.ca", true },
- { "europeantransportmanagement.com", true },
- { "europeanwineresource.com", true },
- { "europeos.es", true },
- { "europetravelservice.co.uk", true },
- { "europop.com", true },
- { "eurora.de", true },
- { "eurorecambios24.com", true },
- { "euroroad17.dk", true },
- { "euroscot.de", true },
- { "euroshop.or.at", true },
- { "euroshop.tk", true },
- { "euroskano.nl", true },
- { "eurotop.net.pl", true },
- { "eurotramp.com", true },
- { "eurousa.us", true },
- { "eurovision.ie", true },
- { "eurowaage.de", true },
- { "eurseo.com", true },
- { "eusarse.tk", true },
- { "eusolar.cloud", true },
- { "euterpiaradio.ch", true },
- { "eutiximo.com", true },
- { "eutotal.com", true },
- { "euwid-energie.de", true },
- { "euwid.de", true },
- { "ev-menden.de", true },
- { "ev-zertifikate.de", true },
- { "eva-briegel-fanpage.tk", true },
- { "eva-select.com", true },
- { "eva.cz", true },
- { "eva42.com", true },
- { "evaalordiah.tk", true },
- { "evadental.institute", true },
- { "evafojtova.cz", true },
- { "evailoil.ee", true },
- { "evailoil.eu", true },
- { "evalesc.com", true },
- { "evamachkova.cz", true },
- { "evamathil.de", true },
- { "evamira.com", true },
- { "evanfiddes.com", true },
- { "evangelicalmagazine.com", true },
- { "evangelosm.com", true },
- { "evansdesignstudio.com", false },
- { "evanwang0.com", true },
- { "evapp.org", true },
- { "evaria-network.fr", true },
- { "evasioncreole.com", true },
- { "evasovova.cz", true },
- { "evavolfova.cz", true },
- { "evdenevenakliyatankara.name.tr", true },
- { "eve-online-com.ru", true },
- { "eve-raynon.fr", true },
- { "eve-ua.com", true },
- { "eveadmin.azurewebsites.net", false },
- { "eveil-et-savoirs.com", true },
- { "evelienzorgt.nl", true },
- { "evelyndayman.com", true },
- { "evenementenhoekvanholland.nl", true },
- { "event-blick.de", true },
- { "event-fullyyours.com", true },
- { "event4fun.no", true },
- { "eventaro.com", true },
- { "eventblog2017.tk", true },
- { "eventerlebnis.ch", true },
- { "eventide.space", true },
- { "eventim-business.com", true },
- { "eventim-business.de", true },
- { "eventive.org", true },
- { "eventnexus.co.uk", true },
- { "eventosbgp.com", true },
- { "eventosenmendoza.com.ar", true },
- { "eventosformativos.tk", true },
- { "eventprazdnik.ru", true },
- { "events-hire.co.uk", true },
- { "eventservicestockholm.se", true },
- { "eventsframe.com", true },
- { "eventtech.com", false },
- { "evenwallet.com", true },
- { "eveonline.com", true },
- { "ever.sale", true },
- { "everain.me", true },
- { "everberg.tk", true },
- { "everettsautorepair.com", true },
- { "everfine.com.tw", true },
- { "evergarden.cn", true },
- { "evergladesrestoration.gov", true },
- { "everglow.co.jp", true },
- { "everglowtrading.com", true },
- { "evergreenmichigan.com", true },
- { "everhome.de", true },
- { "everify.gov", true },
- { "everitoken.io", true },
- { "everling.lu", true },
- { "everlong.org", true },
- { "evermarkstudios.com", true },
- { "evernaut.com", true },
- { "everpcpc.com", true },
- { "evertonarentwe.com", true },
- { "everwaking.com", false },
- { "every-day-life.com", false },
- { "everyday.eu.org", true },
- { "everydaylatestnews.com", true },
- { "everydayrituals.ca", true },
- { "everydaytherich.com", true },
- { "everyfad.com", true },
- { "everykidoutdoors.gov", false },
- { "everything-everywhere.com", true },
- { "everythingaccess.com", true },
- { "everythingstech.com", true },
- { "everytrycounts.gov", false },
- { "eveshamglass.co.uk", true },
- { "eveswell.com", true },
- { "evexia.xyz", true },
- { "eviction.cf", true },
- { "evidence-based.review", true },
- { "evidencebased.net", true },
- { "evidenceusa.com.br", true },
- { "evidencija.ba", true },
- { "evileden.com", true },
- { "evilla.ru", false },
- { "evilmartians.com", true },
- { "evilnerd.de", true },
- { "evion.nl", true },
- { "evisa.us.com", true },
- { "evlear.com", true },
- { "evlorin.com", true },
- { "evnt.team", true },
- { "evntage.com", true },
- { "evobox.store", true },
- { "evoco.vc", true },
- { "evodation.com", true },
- { "evodation.org", true },
- { "evodia-spirits.de", true },
- { "evohomecare.com", true },
- { "evok.com.co", false },
- { "evokewonder.com", true },
- { "evolutionbiote.com", true },
- { "evolutioninflatables.co.uk", true },
- { "evolutionlending.co.uk", true },
- { "evolutionpets.com", true },
- { "evolvetechnologies.co.uk", true },
- { "evolvingsouls.com", true },
- { "evolvingthoughts.net", true },
- { "evomada.com", true },
- { "evomon.com", true },
- { "evony.eu", true },
- { "evosyn.com", true },
- { "evotec.pl", true },
- { "evotec.xyz", true },
- { "evoting-test.ch", false },
- { "evoting.ch", true },
- { "evowrap.co.uk", true },
- { "evpro.lt", true },
- { "evrial.com", true },
- { "evrica.me", true },
- { "evrodim.company", true },
- { "evromandie.ch", true },
- { "evrotrust.com", true },
- { "evsinemasistemleri.tk", true },
- { "evtasima.name.tr", true },
- { "evthing.se", true },
- { "evtripping.com", true },
- { "evtscan.io", true },
- { "evyn.eu", true },
- { "ewa-hayward.co.uk", true },
- { "ewaf.club", true },
- { "ewaipiotr.pl", true },
- { "ewanm89.co.uk", true },
- { "ewanm89.com", true },
- { "ewanm89.uk", true },
- { "ewar.lt", false },
- { "ewc.co.jp", true },
- { "ewcd.co.jp", true },
- { "ewe2.ninja", true },
- { "ewesparky.com", true },
- { "ewhitehat.com", true },
- { "ewie.name", true },
- { "ewinstore.com", true },
- { "ewritingservice.com", true },
- { "ewsfeed.com", true },
- { "ewtl.es", true },
- { "ewus.de", true },
- { "ex-deli.jp", true },
- { "exablue.de", true },
- { "exactlyinfinite.com", true },
- { "exactphilosophy.net", true },
- { "exadime.net", true },
- { "exagoni.com.au", true },
- { "exagoni.com.my", true },
- { "examedge.com", true },
- { "examika.ru", true },
- { "example.eu.org", true },
- { "exampleessays.com", true },
- { "exams9.com", true },
- { "examsite.tk", true },
- { "examticket.tk", true },
- { "exaplac.com", true },
- { "exarpy.com", true },
- { "exatmiseis.net", false },
- { "exbolivo.com", true },
- { "excaliburtitle.com", false },
- { "exceed.global", true },
- { "exceedagency.com", true },
- { "excel-mechanical.com", true },
- { "excel-utbildning.nu", true },
- { "excelkurs.one", true },
- { "excelkursdirekt.eu", true },
- { "excellence-eventos.com", true },
- { "excelsiorcomics.com.br", true },
- { "exceltechdubai.com", true },
- { "exceltechoman.com", true },
- { "excentos.com", true },
- { "excerp.tech", true },
- { "excess-baggage.com", true },
- { "excessamerica.com", true },
- { "excesssecurity.com", false },
- { "exchangers.top", true },
- { "exchaser.com", true },
- { "excitoninteractive.com", true },
- { "exclusivebeautystudio.com.au", true },
- { "exclusivebouncycastles.co.uk", true },
- { "excursionescaribe.com", true },
- { "exdamo.de", true },
- { "exe-boss.tech", true },
- { "execbar.com", true },
- { "exechip.com", true },
- { "execution.biz.tr", true },
- { "exegese.ch", true },
- { "exegol.co.uk", true },
- { "exeintel.com", true },
- { "exekutori.com", true },
- { "exerforge.com", true },
- { "exeria.de", true },
- { "exexcarriers.com", true },
- { "exgaywatch.com", true },
- { "exgen.io", true },
- { "exiahost.com", true },
- { "existest.com", true },
- { "exit9wineandliquor.com", true },
- { "exitooutdoor.com", true },
- { "exl-english.com", true },
- { "exmart.ng", true },
- { "exmoe.com", true },
- { "exnce.com", true },
- { "exocen.com", true },
- { "exon.io", true },
- { "exordiumconcepts.com", true },
- { "exoscale.ch", true },
- { "exoscale.com", true },
- { "exoten-spezialist.de", true },
- { "exoticads.com", true },
- { "exoticaz.to", true },
- { "exozwiki.com", false },
- { "exp.de", true },
- { "expancio.com", false },
- { "expanda.org", false },
- { "expanddigital.media", true },
- { "expandeco.com", true },
- { "expansion-lidl.es", true },
- { "expatfinancial.com.hk", true },
- { "expatfire.com", true },
- { "expatmortgage.uk", true },
- { "expe.voyage", true },
- { "expeditiegrensland.nl", true },
- { "experens.com", true },
- { "experienceoutdoors.org.uk", true },
- { "experienceoz.com.au", true },
- { "experimentator.cz", true },
- { "experise.fr", true },
- { "expert-korovin.ru", true },
- { "expert-voronezh.tk", true },
- { "expert.cz", true },
- { "experteasy.com.au", true },
- { "expertisematrix.com", true },
- { "expertofficefitouts.com.au", true },
- { "expertpaintersvt.com", true },
- { "expertpakistani.com", true },
- { "expertpanel.gc.ca", true },
- { "expertsluzby.cz", true },
- { "expertsverts.com", true },
- { "expertvagabond.com", true },
- { "expertviolinteacher.com", true },
- { "expicore.com", true },
- { "expii.com", true },
- { "expiscor.solutions", true },
- { "explicate.org", true },
- { "explodie.org", true },
- { "explodingcamera.com", true },
- { "exploflex.com.br", true },
- { "exploit-db.com", true },
- { "exploit.cz", true },
- { "exploit.party", true },
- { "exploit.ph", true },
- { "exploited.cz", true },
- { "exploithe.net", true },
- { "exploitit.com.au", true },
- { "exploodo.rocks", true },
- { "explorebigideas.com", true },
- { "exploredouglascountyga.com", true },
- { "exploremonero.com", true },
- { "exploretsp.gov", true },
- { "exploringmorocco.tours", true },
- { "expo-larionov.org", true },
- { "expoort.com", true },
- { "expoort.es", true },
- { "expoort.fr", true },
- { "expoort.it", true },
- { "expopro24.ru", true },
- { "exporta.cz", true },
- { "expouniverse.tk", true },
- { "express-hosting.org", true },
- { "express-shina.ru", true },
- { "express-vpn.com", true },
- { "express-vyvoz.ru", true },
- { "express1040.com", true },
- { "expressemotion.net", true },
- { "expresshosting.org", true },
- { "expressioncoffins.com.au", true },
- { "expressmarket.ru", true },
- { "expresstinte.de", true },
- { "expromo.eu", true },
- { "expxkcd.com", true },
- { "exs.lv", true },
- { "exsanio.de", true },
- { "exside.com", true },
- { "exsora.com", true },
- { "extensia.it", true },
- { "extensibility.biz.tr", true },
- { "extensiblewebmanifesto.org", true },
- { "extensiblewebsummit.org", true },
- { "extensionciglia.roma.it", true },
- { "extensionschallenge.com", true },
- { "extensiontree.com", true },
- { "exteriorlightingagoura.com", true },
- { "exteriorlightingagourahills.com", true },
- { "exteriorlightingcalabasas.com", true },
- { "exteriorlightingcamarillo.com", true },
- { "exteriorlightingconejovalley.com", true },
- { "exteriorlightingdosvientos.com", true },
- { "exteriorlightinghiddenhills.com", true },
- { "exteriorlightinglakesherwood.com", true },
- { "exteriorlightingmalibu.com", true },
- { "exteriorlightingmoorpark.com", true },
- { "exteriorlightingnewburypark.com", true },
- { "exteriorlightingoakpark.com", true },
- { "exteriorlightingsimivalley.com", true },
- { "exteriorlightingthousandoaks.com", true },
- { "exteriorlightingwestlakevillage.com", true },
- { "exteriorroofwindowguttercleaning.com", true },
- { "extinctionrebellion.de", true },
- { "extintormadrid.com", true },
- { "extmatrix.com", false },
- { "extradesktops.com", false },
- { "extradiely.sk", true },
- { "extradivers-worldwide.com", true },
- { "extratorrent.cool", true },
- { "extrawdw.net", true },
- { "extreemhost.nl", true },
- { "extreme-gaming.de", true },
- { "extreme-gaming.us", true },
- { "extreme-players.com", true },
- { "extreme-players.de", true },
- { "extreme-stock.com", true },
- { "extreme.co.th", true },
- { "extremebros.com", true },
- { "exvs.org", true },
- { "exxelmedia.de", true },
- { "exxoncannabis.com", true },
- { "exxpozed-image.de", true },
- { "exxpozed.ch", true },
- { "exxpozed.co.uk", true },
- { "exxpozed.com", true },
- { "exxpozed.de", true },
- { "exxpozed.eu", true },
- { "exxvip.com", true },
- { "exyplis.com", true },
- { "eye-encounters.com", true },
- { "eyebrowsmicroblading.co.uk", true },
- { "eyecandy.gr", true },
- { "eyedesignuniversity.com", true },
- { "eyeglasses.com", false },
- { "eyelashconcept.com", true },
- { "eyeonid.com", true },
- { "eyep.me", true },
- { "eyes-berg.com", false },
- { "eyesandearsrescue.org", true },
- { "eyetooth.ga", true },
- { "eynio.com", true },
- { "eyona.com", true },
- { "eyps.net", true },
- { "eyrelles-tissus.com", true },
- { "eythorsson.com", true },
- { "eyy.co", true },
- { "ezakazivanje.rs", true },
- { "ezdog.press", true },
- { "ezequiel-garzon.net", false },
- { "ezesec.com", true },
- { "ezftrs.com", true },
- { "ezgif.com", true },
- { "ezhik-din.ru", true },
- { "ezik-ido.tk", true },
- { "eziwine.com", true },
- { "eznetworks.com.br", true },
- { "ezrohi.ru", true },
- { "eztvtorrent.com", true },
- { "f-droid.org", true },
- { "f-hd.net", true },
- { "f-thie.de", true },
- { "f-u-c-k.wien", true },
- { "f00.fr", true },
- { "f00f.org", true },
- { "f0x.es", true },
- { "f1318.com", true },
- { "f1318.net", true },
- { "f13cybertech.cz", true },
- { "f1classement.com", false },
- { "f1distribution.com", true },
- { "f1fever.co.uk", true },
- { "f1fever.net", true },
- { "f1minute.com", true },
- { "f1nal-lap.be", true },
- { "f2h.io", true },
- { "f30365.com", true },
- { "f36533.com", true },
- { "f36594.com", true },
- { "f3nws.com", true },
- { "f43.me", true },
- { "f51365.com", true },
- { "f5nu.com", true },
- { "f7035.com", true },
- { "f8003.com", true },
- { "f8007.com", true },
- { "f8036.com", true },
- { "f88-line.com", true },
- { "f88-line.net", true },
- { "f88288.com", true },
- { "f88da.com", true },
- { "f88fine.com", true },
- { "f88good.com", true },
- { "f88line.com", true },
- { "f88line.net", true },
- { "f88ll.com", true },
- { "f88qin.com", true },
- { "f88vip102.com", true },
- { "f88vip103.com", true },
- { "f88vip104.com", true },
- { "f88vip105.com", true },
- { "f88vip106.com", true },
- { "f88vip19.com", true },
- { "f88vip2.com", true },
- { "f88vip20.com", true },
- { "f88vip21.com", true },
- { "f88vip22.com", true },
- { "f88vip23.com", true },
- { "f88vip3.com", true },
- { "f88vip4.com", true },
- { "f88vip5.com", true },
- { "f88vip6.com", true },
- { "f88yule1.com", true },
- { "f88yule111.com", true },
- { "f88yule122.com", true },
- { "f88yule3.com", true },
- { "f88yule5.com", true },
- { "f88yule6.com", true },
- { "f88yule7.com", true },
- { "f88yule8.com", true },
- { "f88yule9.com", true },
- { "f8906.com", true },
- { "f8908.com", true },
- { "f8921.com", true },
- { "f8cp0.com", true },
- { "f8cp1.com", true },
- { "f8cp2.com", true },
- { "f8cp3.com", true },
- { "f8cp4.com", true },
- { "f8cp5.com", true },
- { "f8cp6.com", true },
- { "f8cp7.com", true },
- { "f8cp8.com", true },
- { "f8cp9.com", true },
- { "f8s.co", true },
- { "f9marketing.com", true },
- { "fa-works.com", true },
- { "fa158k.com", true },
- { "fabbro.roma.it", true },
- { "faber.org.ru", true },
- { "fabian-fingerle.de", true },
- { "fabian-klose.com", true },
- { "fabian-klose.de", true },
- { "fabian-klose.net", true },
- { "fabianackle.ch", true },
- { "fabianbeiner.com", true },
- { "fabianbeiner.de", false },
- { "fabianegli.ch", true },
- { "fabiankaindl.de", false },
- { "fabiankoeppen.com", true },
- { "fabien-hebuterne.fr", true },
- { "fabienne-roux.org", true },
- { "fabiobier.com", true },
- { "fabiocicerchia.it", true },
- { "fabjansisters.eu", true },
- { "fabled.com", true },
- { "fableforge.nl", true },
- { "fableheartmedia.com", true },
- { "fabriceleroux.com", false },
- { "fabrika.com.br", true },
- { "fabriziocavaliere.it", true },
- { "fabriziorocca.it", true },
- { "fabse.net", true },
- { "fabservicos.com.br", true },
- { "fabslabour.uk", true },
- { "fabulosa.com.br", true },
- { "fac.fi", true },
- { "faca.gov", true },
- { "facai666.cc", true },
- { "facai888.cc", true },
- { "facanabota.com", true },
- { "facanabota.com.br", true },
- { "facarospauls.com", true },
- { "facchinaggio.milano.it", true },
- { "facchinaggio.roma.it", true },
- { "facciadastile.it", true },
- { "face-fashion.de", true },
- { "face-mania.com", true },
- { "facealacrise.fr", true },
- { "facebook-atom.appspot.com", true },
- { "facebook.com", false },
- { "facebydrh.com", true },
- { "facebylouise.co.uk", true },
- { "facedack.com", true },
- { "facekungfu.com", true },
- { "facemaze.io", true },
- { "facemd.net", true },
- { "facepainting.gr", true },
- { "faceresources.org", true },
- { "facesdr.com", true },
- { "fach-journalist.de", true },
- { "fachmann-umzuege.de", true },
- { "fachschaftslisten.at", true },
- { "fachschaftslisten.org", true },
- { "fachversand-hennes.de", true },
- { "facialexercising.com", true },
- { "facil.services", false },
- { "faciledireto.com.br", true },
- { "facilities.fr", true },
- { "facility-service-muenchen.de", true },
- { "facingbipolar.com", false },
- { "fackovec.cz", true },
- { "factbytefactbox.com", true },
- { "factor.cc", false },
- { "factorio.tools", true },
- { "factoriotools.com", true },
- { "factoriotools.net", true },
- { "factoriotools.org", true },
- { "factorit.fr", true },
- { "factslider.tk", true },
- { "facturama.pt", true },
- { "factuur.pro", true },
- { "factuursturen.be", true },
- { "factuursturen.nl", true },
- { "factys.es", true },
- { "facua.org", true },
- { "facucosta.com.ar", true },
- { "faderweb.de", true },
- { "fadilus.com", true },
- { "fady.vn", true },
- { "faehler.de", true },
- { "faelix.net", true },
- { "faeservice.eu", true },
- { "fafa018.com", true },
- { "fafa066.com", true },
- { "fafa106.com", true },
- { "fafro.eu", true },
- { "faggut.gg", true },
- { "fahmed.de", true },
- { "fahrenwal.de", false },
- { "fahrenwalde.de", false },
- { "fahrschule-laux.de", true },
- { "fahrwerk.io", true },
- { "fai.gov", true },
- { "faidanoi.it", true },
- { "faidatefacile.it", true },
- { "failforward.tech", true },
- { "failover.de", true },
- { "failover.eu", true },
- { "failoverplan.it", true },
- { "fairbairnrealty.com", true },
- { "fairedeseconomies.info", true },
- { "fairgolfteams.com", true },
- { "fairgreenlimited.com", true },
- { "fairleighcrafty.com", true },
- { "fairmarketing.com", true },
- { "fairplay.im", true },
- { "fairr.de", true },
- { "fairr.online", true },
- { "fairssl.dk", true },
- { "fairssl.se", true },
- { "fairviewmotel-simcoe.com", true },
- { "fairwayhomeloans.mortgage", true },
- { "fairyth.tk", true },
- { "faithcentercogop.net", true },
- { "faithfuladvisor.com", true },
- { "faithgrowth.com", true },
- { "faithindemocracy.eu", true },
- { "faithleaks.org", true },
- { "faithwatch.org", true },
- { "faixaazul.com", true },
- { "faizan.net", true },
- { "faizan.xyz", true },
- { "faizanullah.com", true },
- { "fajode.net", true },
- { "fake-show.ga", true },
- { "faked.org", true },
- { "fakeduckpond.com", true },
- { "fakeemergency.com", true },
- { "fakerli.com", true },
- { "fakes-ru.tk", true },
- { "fakt.tk", true },
- { "fakti.bg", true },
- { "faktotum.tech", false },
- { "fakturi.com", true },
- { "fakturoid.cz", true },
- { "falaeapp.org", true },
- { "falaowang.com", true },
- { "falasteenjobs.com", true },
- { "falbros.com", true },
- { "falcema.com", true },
- { "falconvintners.com", true },
- { "falcoz.co", true },
- { "faldoria.de", true },
- { "falegname-roma.it", true },
- { "falegname.roma.it", true },
- { "falegnameria.milano.it", true },
- { "fall.es", true },
- { "fall.ga", true },
- { "fallenangeldrinks.co.uk", true },
- { "fallenangeldrinks.com", true },
- { "fallenangelspirits.co.uk", true },
- { "fallenangelspirits.com", true },
- { "fallenmoons.nl", true },
- { "fallenmystic.com", true },
- { "fallin.space", true },
- { "falling.se", true },
- { "fallofthecitadel.com", true },
- { "falsterhus.de", true },
- { "falsterhus.dk", true },
- { "falsum.net", true },
- { "fam-borsch.de", true },
- { "fam-kreibich.de", true },
- { "fam-stemmer.de", false },
- { "fam-weyer.de", true },
- { "famcloud.de", true },
- { "fameng.nl", true },
- { "familiaperez.net", false },
- { "familie-keil.de", true },
- { "familie-kruithof.nl", true },
- { "familie-kupschke.de", true },
- { "familie-leu.ch", true },
- { "familie-monka.de", true },
- { "familie-mueller.com.de", true },
- { "familie-poeppinghaus.de", true },
- { "familie-remke.de", true },
- { "familie-sprink.de", false },
- { "familiearchivaris.nl", true },
- { "familieholme.de", true },
- { "familienportal.de", true },
- { "familiereimann.com", true },
- { "familjenfrodlund.se", true },
- { "familjenm.se", true },
- { "familleseux.net", true },
- { "familleshilton.com", true },
- { "familylawhotline.org", true },
- { "familyparties.co.uk", true },
- { "familyreal.ru", true },
- { "familyrecipe.co.uk", true },
- { "familytreehq.com", true },
- { "familyworld.gr", true },
- { "famion.eu", false },
- { "famousbirthdays.com", true },
- { "famoushostels.com", true },
- { "famvangelder.nl", true },
- { "famvsomeren.nl", true },
- { "fan.gov", true },
- { "fan4all.de", true },
- { "fan8hd.com", true },
- { "fanactu.com", true },
- { "fanatical.com", true },
- { "fanatik.io", true },
- { "fanboi.ch", true },
- { "fanbot.co", true },
- { "fancy.org.uk", true },
- { "fancygaming.dk", true },
- { "fancypantsfit.com", true },
- { "fandler.cz", true },
- { "fandomservices.com", true },
- { "fanfareunion.ch", false },
- { "fangs.ink", true },
- { "fanjingbo.com", true },
- { "fanjingbo.me", true },
- { "fanjoe.be", true },
- { "fanohus.de", true },
- { "fanohus.dk", true },
- { "fansale.de", true },
- { "fansided.com", true },
- { "fantasiapainter.com", true },
- { "fantasiatravel.hr", true },
- { "fantasmesexuel.info", true },
- { "fantasticcleaners.com.au", true },
- { "fantasticcleanersbristol.co.uk", true },
- { "fantastichandymanmelbourne.com.au", true },
- { "fantastici.de", true },
- { "fantasticservices.com", true },
- { "fantasticservicesgroup.com", true },
- { "fantasticservicesgroup.com.au", true },
- { "fantasy-judo.com", true },
- { "fantasybet.co", true },
- { "fantasycastles.co.uk", true },
- { "fantasydrop.com", true },
- { "fantasyescortsbirmingham.co.uk", true },
- { "fantasymina.de", true },
- { "fantasypartyhire.com.au", true },
- { "fantasyspectrum.com", true },
- { "fantgames.com", true },
- { "fantraxhq.com", true },
- { "fanyina.cn", true },
- { "fanyina.com", true },
- { "fanysehy-prof.com", true },
- { "fanz.pro", true },
- { "fapcoholic.com", true },
- { "fapiis.gov", true },
- { "fapp.tube", true },
- { "fapplepie.com", true },
- { "faq.ie", true },
- { "fara.gov", true },
- { "faradome.ws", true },
- { "faradrive.ir", true },
- { "farallonesrentacar.com", true },
- { "farberplasticsurgery.com", true },
- { "farcecrew.de", true },
- { "farces.com", false },
- { "faretrotter.com", true },
- { "farfallapets.com.br", true },
- { "farfetchos.com", true },
- { "fargtorget.se", true },
- { "farhadexchange.com", true },
- { "farhood.org", true },
- { "farid.is", true },
- { "farizhan.com", true },
- { "farleybrass.com.au", true },
- { "farleysworlds.com", true },
- { "farmacia-lloret.com", true },
- { "farmaciacorvi.it", true },
- { "farmaciadejaime.es", true },
- { "farmaspeed.it", true },
- { "farmer.dating", true },
- { "farmers.gov", false },
- { "farmkazuto.com", true },
- { "farmmaximizer.com", true },
- { "farodeluz.ca", true },
- { "faroebusinessreport.com", true },
- { "faroes.net", true },
- { "faroes.org", true },
- { "farsil.eu", true },
- { "fart.wtf", true },
- { "farzli.com", false },
- { "fascat.com", true },
- { "faschingmd.com", true },
- { "fascia.fit", true },
- { "fashion-stoff.de", true },
- { "fashion.bg", true },
- { "fashion.net", true },
- { "fashion24.de", true },
- { "fashiondays.bg", true },
- { "fashiondays.hu", true },
- { "fashiondays.ro", true },
- { "fashioneditor.gr", true },
- { "fashionlistify.tk", true },
- { "fashiontrendsetter.com", true },
- { "fashionunited.be", true },
- { "fashionunited.cl", true },
- { "fashionunited.com", true },
- { "fashionunited.com.ar", true },
- { "fashionunited.de", true },
- { "fashionunited.fi", true },
- { "fashionunited.hk", true },
- { "fashionunited.hu", true },
- { "fashionunited.ie", true },
- { "fashionunited.lu", true },
- { "fashionunited.mx", true },
- { "fashionunited.nl", true },
- { "fashionunited.no", true },
- { "fashionunited.nz", true },
- { "fashionunited.pl", true },
- { "fashionunited.se", true },
- { "fashionusa.gq", true },
- { "fashionweekweb.com", true },
- { "fashionxmas.gq", true },
- { "faspirits.co.uk", true },
- { "faspirits.com", true },
- { "fassaden-selleng.de", true },
- { "fassadenverkleidung24.de", true },
- { "fassi-sport.it", true },
- { "fast-cargo.ml", true },
- { "fast-events.eu", true },
- { "fast-pro.co.jp", true },
- { "fastblit.com", true },
- { "fastcash.com.br", true },
- { "fastcomcorp.com", true },
- { "fastcommerce.org", true },
- { "fastconfirm.com", true },
- { "fastconv.com", true },
- { "fastforwardsociety.nl", true },
- { "fasthost.com.br", true },
- { "fastighetsekonomi.com", true },
- { "fastinviter.com", true },
- { "fastknigi.ml", true },
- { "fastlike.co", true },
- { "fastmail.com", false },
- { "fastonline.ro", true },
- { "fastos.com", true },
- { "fastos.de", true },
- { "fastpeoplesearch.com", true },
- { "fastpresence.com", true },
- { "fastserv.pl", true },
- { "faststage.ch", true },
- { "fasturl.ml", true },
- { "fastvistorias.com.br", true },
- { "fastworx.com", true },
- { "fatecdevday.com.br", true },
- { "fateitalia.it", true },
- { "fatherhood.gov", true },
- { "fathers4equalrights.org", true },
- { "fatidique.com", true },
- { "fatiguesyndrome.com", true },
- { "fatihingemisi.com", true },
- { "fatimamoldes.com.br", true },
- { "fatmixx.com", true },
- { "fatowltees.com", true },
- { "fatpeople.lol", true },
- { "fattailcall.com", false },
- { "fatturegeko.eu", true },
- { "fattyink.com", true },
- { "faucetbox.com", false },
- { "faultlines.org", true },
- { "faunahotel.cl", true },
- { "fauvettes.be", true },
- { "fauwater.com", true },
- { "fauxcams.com", true },
- { "favalart.com", true },
- { "favedog.com", true },
- { "favorai.com", true },
- { "fawong.com", true },
- { "faxvorlagen-druckvorlagen.de", true },
- { "faydali.org", true },
- { "fayntic.com", true },
- { "fazzfinancial.com", true },
- { "fb-feed.net", true },
- { "fb-lab.de", true },
- { "fb.gg", true },
- { "fb.me", true },
- { "fbcdn.net", true },
- { "fbi.gov", true },
- { "fbigame.com", true },
- { "fbiic.gov", true },
- { "fbijobs.gov", true },
- { "fbo.gov", false },
- { "fboerman.nl", true },
- { "fbrief.org", true },
- { "fbsbx.com", true },
- { "fbtholdings.com", true },
- { "fburl.com", true },
- { "fbvstore.com", true },
- { "fbwgynplus.com", true },
- { "fbwgynplus.com.au", true },
- { "fc.media", true },
- { "fc8882.com", true },
- { "fc8882.net", true },
- { "fca-tools.com", true },
- { "fcapollo.tk", true },
- { "fcbarcelona.cz", true },
- { "fcburk.de", true },
- { "fcdn.nl", true },
- { "fcforum.net", true },
- { "fcic.gov", true },
- { "fcingolstadt.de", true },
- { "fcosinus.com", true },
- { "fcprovadia.com", true },
- { "fcsic.gov", true },
- { "fdalawboston.com", true },
- { "fdaregs.com", true },
- { "fdevs.ch", true },
- { "fdicig.gov", true },
- { "fdicoig.gov", true },
- { "fdis.net.cn", true },
- { "fdlibre.eu", true },
- { "fdlpl.org", true },
- { "fdm.ro", true },
- { "fdms.gov", true },
- { "fdp-brig-glis.ch", true },
- { "fdpbrig.ch", true },
- { "fdremodelingatlanta.com", true },
- { "fdresearch.ca", true },
- { "fdworlds.com", true },
- { "fe-data.nl", true },
- { "feandc.com", true },
- { "feastr-dev.de", true },
- { "feastr.de", true },
- { "feastr.io", true },
- { "feat.agency", true },
- { "featherweightlabs.com", true },
- { "feb.gov", true },
- { "febeditora.com.br", true },
- { "fed-shashek.spb.ru", true },
- { "fedcenter.gov", true },
- { "fedemo.top", true },
- { "federaljobs.gov", true },
- { "federalreserve.gov", true },
- { "federalreserveconsumerhelp.gov", true },
- { "federatedbank.com", true },
- { "fedjobs.gov", true },
- { "fedorahosted.org", true },
- { "fedorapeople.org", true },
- { "fedoraproject.org", true },
- { "fedpartnership.gov", true },
- { "fedramp.gov", false },
- { "fedshirevets.gov", true },
- { "fedux.com.ar", true },
- { "fedvan.com", true },
- { "feedbin.com", false },
- { "feedfall.com", true },
- { "feedhq.org", true },
- { "feedkovacs.hu", true },
- { "feedough.com", true },
- { "feeeei.com", true },
- { "feel-events.com", true },
- { "feel.aero", true },
- { "feelgood-workouts.de", true },
- { "feelgood.com.tw", true },
- { "feelingmassage.nl", true },
- { "feelmom.com", true },
- { "feelnet.top", true },
- { "feeltennis.net", true },
- { "feen.us", true },
- { "feepod.com", true },
- { "feetpa.ws", true },
- { "fefelovalex.ru", true },
- { "fegame.eu", true },
- { "fegame.mobi", true },
- { "fegame.net", true },
- { "fegame.nl", true },
- { "fegc-wgec.gc.ca", true },
- { "fegli.gov", true },
- { "fehngarten.de", true },
- { "feigling.net", false },
- { "feildel.fr", true },
- { "feilen.de", true },
- { "feilestrokestown.com", true },
- { "feisim.com", true },
- { "feisim.org", true },
- { "feistore.com.tw", true },
- { "feistyduck.com", true },
- { "feixiang.eu.org", true },
- { "feiya.ng", true },
- { "fejervar.hu", true },
- { "fejes.house", true },
- { "fekir.info", true },
- { "feld.design", true },
- { "feld.saarland", true },
- { "feldbogenclub-hamburg.de", true },
- { "feldhousen.com", true },
- { "felett.es", true },
- { "feli.games", true },
- { "felicifia.org", true },
- { "feline.ro", true },
- { "felinepc.com", true },
- { "felistirnavia.sk", true },
- { "felix-hirner.de", true },
- { "felixaufreisen.de", true },
- { "felixbarta.de", true },
- { "felixbrand.de", true },
- { "felixcrux.com", true },
- { "felixkaaman.com", true },
- { "felixklenner.de", true },
- { "felixqu.com", true },
- { "felixsanz.com", true },
- { "felixseele.de", true },
- { "felsing.net", true },
- { "feltons.me", true },
- { "femastudios.com", true },
- { "feminina.pt", true },
- { "feministreview.cf", true },
- { "feministspectrum.org", true },
- { "feministwiki.org", true },
- { "femmes-women.gc.ca", true },
- { "femmes.gc.ca", true },
- { "femmesaupluriel.com", true },
- { "femtomind.com", true },
- { "feng-hhcm.com", true },
- { "feng-in.com", true },
- { "feng-in.net", true },
- { "feng.si", true },
- { "fengchuiyudaqu.ml", true },
- { "fengyi.tel", true },
- { "fenhl.net", true },
- { "fenichelar.com", true },
- { "fenom.com", true },
- { "fenster-bank.at", true },
- { "fenster-bank.de", true },
- { "feragon.net", true },
- { "ferc.gov", true },
- { "ferestre-bucuresti.ro", true },
- { "ferfer.ga", true },
- { "fergtm.com", true },
- { "feriehus-danmark.no", true },
- { "ferien-netzwerk.de", true },
- { "ferienchalet-wallis.ch", true },
- { "ferienhaeuser-krummin.de", true },
- { "ferienhaus-danemark-hund.de", true },
- { "ferienhaus-danemark-privat.de", true },
- { "ferienhaus-laesoe.de", true },
- { "ferienhaus-polchow-ruegen.de", false },
- { "ferienhaus-urlaub-danemark.de", true },
- { "ferienhausprovence.ch", true },
- { "ferienstpeter.de", true },
- { "ferienwohnung-hafeninsel-stralsund.de", true },
- { "ferienwohnung-wiesengrund.eu", true },
- { "ferieservice.dk", true },
- { "feriespotter.dk", true },
- { "ferlc.org", true },
- { "ferm-rotterdam.nl", true },
- { "fermabel.com.br", true },
- { "fernandes.org", true },
- { "fernandob.com", true },
- { "fernandobarata.pt", true },
- { "fernandobarillas.com", true },
- { "fernandomiguel.net", true },
- { "fernland.com.au", true },
- { "feross.net", true },
- { "feross.org", true },
- { "ferprobolivia.com", true },
- { "ferrada.org", false },
- { "ferrariadvisor.it", true },
- { "ferret.zone", true },
- { "ferreteriaxerez.com", true },
- { "ferriswheelofficial.us", true },
- { "ferrolatino.ch", true },
- { "ferrone.ru", true },
- { "ferrousmoon.com", true },
- { "ferry.tw", true },
- { "ferticare.pt", true },
- { "fertigasi.com", true },
- { "fertila.de", true },
- { "festaprylar.se", true },
- { "festesuniversitaries.tk", true },
- { "festival-tipps.com", true },
- { "festival-transform.com", true },
- { "festivaldimouamaroussiou.gr", true },
- { "festivaljapon.com", true },
- { "festivalpopayan.tk", true },
- { "festx.co.za", true },
- { "fetch.co.uk", true },
- { "fetchease.com", true },
- { "fetishbazar.cz", true },
- { "fetishblend.com", true },
- { "fetlife.com", true },
- { "feudalisten.de", true },
- { "feuerfestival.org", true },
- { "feuerhaken.org", true },
- { "feuerloescher-arten.de", true },
- { "feuerloescher-test.de", true },
- { "feuerwehr-coesfeld.de", true },
- { "feuerwehr-gebirge.de", true },
- { "feuerwehr-heiligenberg.de", true },
- { "feuerwehr-illmensee.de", true },
- { "feuerwehr-mehring.de", true },
- { "feuerwehr-offenbach-bieber.de", false },
- { "feuerwehr-vechta.de", true },
- { "feuerwerksmanufaktur.de", true },
- { "feuetgloire.com", false },
- { "fever.ch", true },
- { "fewo-hafeninsel-stralsund.de", true },
- { "fewo-thueringer-wald.de", true },
- { "fewo32.de", true },
- { "feybiblia.com", true },
- { "ff-bad-hoehenstadt.de", true },
- { "ff-koenigstein-opf.de", true },
- { "ff-obersunzing-niedersunzing.de", true },
- { "ff14-mstdn.xyz", false },
- { "ff326.com", true },
- { "ff396.com", true },
- { "ff612.com", true },
- { "ff675.com", true },
- { "ff769.com", true },
- { "ff861.com", true },
- { "ff916.com", true },
- { "ff956.com", true },
- { "ff965.com", true },
- { "ff967.com", true },
- { "ff976.com", true },
- { "ffb.gov", false },
- { "ffbans.org", true },
- { "ffbsee.de", true },
- { "fff-du.de", true },
- { "fffinfo.de", true },
- { "ffg.berlin", true },
- { "ffiec.gov", true },
- { "ffis.me", true },
- { "ffkoenigsberg.de", true },
- { "ffmradio.de", true },
- { "ffmv.de", true },
- { "ffp-survey.com", true },
- { "ffprofile.com", true },
- { "ffrev.de", true },
- { "ffsociety.nl", true },
- { "ffta.eu", true },
- { "ffvideo.xyz", true },
- { "ffw-zeven.de", true },
- { "ffzeven.de", true },
- { "fgsv-heureka.de", true },
- { "fgsv-kongress.de", true },
- { "fh-x.de", true },
- { "fh14.com", true },
- { "fh70.com", true },
- { "fhar.be", true },
- { "fhba.com.au", true },
- { "fhconseil.fr", false },
- { "fhdhelp.de", false },
- { "fhdhilft.de", false },
- { "fheuschen.de", true },
- { "fhfaoig.gov", true },
- { "fhinds.co.uk", true },
- { "fhservices.com.au", true },
- { "fi.google.com", true },
- { "fi.search.yahoo.com", false },
- { "fiam.me", true },
- { "fiareapp.red", false },
- { "fiasgo.dk", true },
- { "fiasgo.i.ng", true },
- { "fibo-forex.org", true },
- { "fibra.click", true },
- { "fibretv.co.nz", true },
- { "fibretv.tv", true },
- { "fibroarrendacaseton.mx", true },
- { "fibromuebles.com", true },
- { "fichier-pdf.fr", true },
- { "fickweiler.nl", true },
- { "fidanza.eu", true },
- { "fidelis-it.ch", true },
- { "fidelis-it.net", true },
- { "fidhouriet.ch", true },
- { "fidias.com.br", true },
- { "fidoo.com", true },
- { "fiduciaire-azur.com", false },
- { "fiduciaire-ratio.ch", false },
- { "fidz.com.sg", true },
- { "fieggen.eu", true },
- { "fieggen.net", true },
- { "fieldelite.com", true },
- { "fieldexpert.eu", true },
- { "fieldwork-paysage.com", false },
- { "fierscleaning.nl", true },
- { "fiery.me", true },
- { "fierykitchen.pl", true },
- { "fietsvierdaagsen.nl", true },
- { "fifacup.ga", true },
- { "fifautstore.com", true },
- { "fifei.de", true },
- { "fifichachnil.paris", true },
- { "fifr.nl", true },
- { "fiftynorth.eu", true },
- { "fiftyonetielt.be", true },
- { "fight215.com", true },
- { "fight215.org", true },
- { "figinstitute.org", true },
- { "figliasons.com", true },
- { "figshare.com", true },
- { "figura.cz", true },
- { "figurasdelinguagem.com.br", true },
- { "figure.nz", true },
- { "fiix.io", true },
- { "fijnewoensdag.nl", true },
- { "fikriwildannugraha.com", true },
- { "fikst.com", true },
- { "fil-tec-rixen.com", true },
- { "filanthropystar.org", true },
- { "filaretihairlove.gr", true },
- { "file-cloud.eu", true },
- { "file-pdf.it", true },
- { "filebox.one", true },
- { "filecloud.fun", true },
- { "filecopa.com", true },
- { "filedesc.com", true },
- { "filehash.de", true },
- { "filehippo.com", true },
- { "filejet.io", true },
- { "files.com", true },
- { "files.from-me.org", true },
- { "fileservicios.com.ar", true },
- { "filestar.io", true },
- { "filestartest.io", true },
- { "filesuffix.com", true },
- { "filetransfer.one", true },
- { "filezilla-project.org", true },
- { "filhin.es", true },
- { "filhodohomem.com", true },
- { "fili.com", true },
- { "filidorwiese.nl", true },
- { "filiio.com", true },
- { "filingsmadeeasy.com", true },
- { "filip-prochazka.com", false },
- { "filippo.io", true },
- { "filli-it.ch", true },
- { "fillmysuitca.se", true },
- { "fillo.sk", true },
- { "film-colleges.com", true },
- { "film-op-tv.nl", true },
- { "film-storyboards.fr", true },
- { "film-tutorial.com", true },
- { "filmarchiv-sachsen.de", true },
- { "filmatiporno.xxx", true },
- { "filmcrewdb.com", true },
- { "filme-onlines.com", true },
- { "filmers.net", true },
- { "filmpronet.in", true },
- { "filmreviewonline.com", true },
- { "filmserver.de", true },
- { "filmsite-studio.com", true },
- { "filmwallpapers.ml", true },
- { "filoo.de", true },
- { "filstop.com", true },
- { "filterlists.com", true },
- { "filtershekanha.com", true },
- { "filtr.me", true },
- { "fimfiction.net", true },
- { "fimozin.ga", true },
- { "fimp.pt", true },
- { "fimsquad.com", true },
- { "finagosolo.com", true },
- { "final-expense-quotes.com", true },
- { "finalrewind.org", true },
- { "finalx.nl", true },
- { "finance-colleges.com", true },
- { "finance-news.ga", true },
- { "financejobs.ch", true },
- { "financialfreedomaus.com", true },
- { "finansa.no", true },
- { "finanskredirehberi.com", true },
- { "finanstilsynet.dk", true },
- { "finanziero.de", true },
- { "finch.am", true },
- { "find-job-in.com", true },
- { "find-mba.com", true },
- { "finda.ae", true },
- { "findaffordablehousing.ca", true },
- { "findapinball.com", true },
- { "findautoloan.ml", true },
- { "findelahistoria.com", true },
- { "findheim.at", true },
- { "findingkorea.com", false },
- { "findingtheuniverse.com", true },
- { "finditez.com", true },
- { "findlocalproduce.co.uk", true },
- { "findrejsepartner.dk", true },
- { "findsingledating.ml", true },
- { "findstorenearme.ca", true },
- { "findstorenearme.co.uk", true },
- { "findstorenearme.us", true },
- { "findtreatment.gov", false },
- { "findyourtrainer.com", true },
- { "findyourvoice.ca", true },
- { "finefriends.nl", true },
- { "finefriends.social", true },
- { "finefriendsapp.com", true },
- { "finehealth.ru", false },
- { "finenet.com.tw", true },
- { "finestrabatalera.tk", true },
- { "finestreview.cf", true },
- { "finestrina.net", true },
- { "finewineonline.com", true },
- { "finexo.ch", true },
- { "finext.cz", true },
- { "finflix.net", true },
- { "finform.ch", true },
- { "fini-de-jouer.ch", false },
- { "finilaviolence.gc.ca", true },
- { "finisron.in", true },
- { "finkelstein.fr", true },
- { "finkmartin.com", true },
- { "finlito.tk", true },
- { "finn-thorben.me", true },
- { "finn.io", true },
- { "finnclass.cz", true },
- { "finnwea.com", true },
- { "finotax.com", true },
- { "finprison.net", true },
- { "fins.money", true },
- { "finsecurity.eu", true },
- { "finsprings.org", true },
- { "fintandunleavy.com", false },
- { "fintexaddis.com", true },
- { "fintry.ca", true },
- { "finvantage.com", true },
- { "finwe.info", true },
- { "finzy.com", true },
- { "fionafuchs.de", true },
- { "fionamcbride.com", true },
- { "fioristionline.it", true },
- { "fioristionline.net", true },
- { "fioritic.com", true },
- { "fioulmarket.fr", true },
- { "fir3net.com", true },
- { "firc.de", true },
- { "fire-schools.com", true },
- { "firebaseio.com", true },
- { "firebirdrangecookers.com", true },
- { "firebounty.com", true },
- { "fireboxfood.com", true },
- { "firebrandchurch.com", true },
- { "firecareandsecurity.co.uk", true },
- { "firecore.com", true },
- { "firecry.org", true },
- { "firefense.com", true },
- { "firefighters.dating", true },
- { "firefly-iii.org", true },
- { "fireflyiii.spdns.org", true },
- { "fireglow.de", true },
- { "firegoby.jp", true },
- { "fireleadership.gov", true },
- { "firemist.com", true },
- { "firemudfm.com", true },
- { "firenews.cf", true },
- { "firenza.org", true },
- { "fireorbit.de", false },
- { "fireportal.cz", true },
- { "fireportal.sk", true },
- { "firerain.me", true },
- { "fireshellsecurity.team", true },
- { "firesofheaven.org", true },
- { "firestuff.org", true },
- { "firetotheprisons.org", true },
- { "fireworksshowvr.com", true },
- { "firexfly.com", true },
- { "firma-cerny.cz", true },
- { "firma-offshore.com", true },
- { "firmajulegaver.dk", true },
- { "firmament.space", true },
- { "firmapi.com", true },
- { "firmen-assekuranz.de", true },
- { "firmenwerbung-vermarktung.de", true },
- { "firmware.science", true },
- { "first-house.no", true },
- { "first.org", true },
- { "first4it.com", true },
- { "firstbooks.ml", true },
- { "firstchoicebouncycastlehire.co.uk", true },
- { "firstchoicecandy.com", true },
- { "firstchoicefriseur.at", true },
- { "firstclasscastles.com", true },
- { "firstclassleisure.co.uk", true },
- { "firstcoastteaco.com", true },
- { "firstcolonyengraving.com", true },
- { "firstderm.com", true },
- { "firstdorsal.eu", true },
- { "firstdry.com.br", true },
- { "firstfinca.de", true },
- { "firstmall.de", true },
- { "firstnet.gov", true },
- { "firstnetworksouth.com", true },
- { "firstq.xyz", true },
- { "firstrays.com", true },
- { "firstversionist.com", true },
- { "firstwebring.tk", true },
- { "firtreetechnology.co.uk", true },
- { "fischer-immoteam.de", true },
- { "fischer-kundendienst.de", true },
- { "fischers.cc", true },
- { "fiscoeconti.it", true },
- { "fish-hook.ru", true },
- { "fish-n-chips.uk", true },
- { "fish4dogs.com", true },
- { "fishbattle.io", true },
- { "fishbattle.net", true },
- { "fishermailbox.net", true },
- { "fishermansbendcorporation.com.au", true },
- { "fishermansbendtownhouses.com.au", true },
- { "fishexport.eu", true },
- { "fishgen.no", true },
- { "fishlanestudios.com", true },
- { "fishoilsafety.com", true },
- { "fishserver.net", true },
- { "fishtacos.blog", true },
- { "fishycam.com", true },
- { "fisinfomanagerdr.com", true },
- { "fisiobox.eu", true },
- { "fisioterapista.roma.it", true },
- { "fiskalnepretor.pl", true },
- { "fit-4u.ch", false },
- { "fit-mit-nina.com", true },
- { "fit365.jp", false },
- { "fitchconnect.com", true },
- { "fite.family", true },
- { "fitequilibrio.com.br", true },
- { "fitkram.cz", true },
- { "fitness-challenge.co.uk", true },
- { "fitness.gov", true },
- { "fitnessunder50.com", true },
- { "fito.tk", true },
- { "fitrecepty.info", true },
- { "fittelo.cz", true },
- { "fittingperfetto.it", true },
- { "fitzsim.org", true },
- { "fivestartrader.com", true },
- { "fivethirtyeight.com", true },
- { "fiveyearsahead.com", true },
- { "fix.mk", true },
- { "fixatom.com", true },
- { "fixed.supply", true },
- { "fixed.tech", true },
- { "fixedtodayplumbing.com.au", true },
- { "fixel.express", true },
- { "fixfm.tk", true },
- { "fixforce.nl", true },
- { "fixlasvegas.com", true },
- { "fixmyalarmpanel.co.uk", true },
- { "fixmycomputerdude.com", true },
- { "fiyatgrafik.com", true },
- { "fizadvocaten.nl", true },
- { "fiziktedavi.name.tr", true },
- { "fizjoterapia.uk", true },
- { "fizyoterapi.name.tr", true },
- { "fizz.buzz", false },
- { "fizzgi.gs", true },
- { "fj.search.yahoo.com", false },
- { "fj.simple.com", false },
- { "fjordboge.dk", true },
- { "fkfev.de", true },
- { "fkosquad.moe", true },
- { "fkraiem.org", true },
- { "fktpm.ru", false },
- { "flaemig42.de", false },
- { "flagburningworld.com", true },
- { "flagfox.net", true },
- { "flaggorvarlden.se", true },
- { "flagi-panstw.pl", true },
- { "flagistrany.ru", true },
- { "flagpedia.asia", true },
- { "flagpedia.net", true },
- { "flagshop.jp", true },
- { "flagspot.net", false },
- { "flairfindr.com", true },
- { "flam3d.be", true },
- { "flam3d.nl", true },
- { "flam3d.org", true },
- { "flamero.fi", true },
- { "flamet.eu", true },
- { "flameworked.com", true },
- { "flamingkeys.com", true },
- { "flamingowomenspavilion.com", true },
- { "flamme-von-anor.de", true },
- { "flana.com", true },
- { "flanga.io", true },
- { "flangaapis.com", true },
- { "flapoverspeed.com", true },
- { "flare.cloud", true },
- { "flashback.org", true },
- { "flashbeing.com", true },
- { "flashcomp.cz", true },
- { "flashgamedev.tk", true },
- { "flashgot.net", true },
- { "flass.lu", true },
- { "flassetlocators.com", true },
- { "flat.io", true },
- { "flatbellyreview.com", true },
- { "flatbook.one", true },
- { "flatmail.pl", true },
- { "flatmatehub.com.au", true },
- { "flatpackmates.co.uk", true },
- { "flauschig.net", true },
- { "flavinus.fr", true },
- { "flaviu.co.uk", true },
- { "flavo.io", true },
- { "flawlesscowboy.xyz", true },
- { "flealab.it", true },
- { "fleep.io", true },
- { "fleesty.dynv6.net", true },
- { "fleet-group.com", true },
- { "fleet-search.com", true },
- { "fleetcomplete.com", true },
- { "fleetcor.at", true },
- { "fleetcor.ch", true },
- { "fleetcor.cz", true },
- { "fleetcor.de", true },
- { "fleetcor.fr", true },
- { "fleetcor.hu", true },
- { "fleetcor.lu", true },
- { "fleetcor.nl", true },
- { "fleetcor.pl", true },
- { "fleetcor.sk", true },
- { "fleetcorcards.be", true },
- { "fleetsmith.com", true },
- { "fleetssl.com", true },
- { "fleetyards.net", true },
- { "flehm.de", true },
- { "fleisch.club", true },
- { "flers-agglo.fr", true },
- { "flerstourisme.fr", true },
- { "fletcherdigital.com", true },
- { "fletchto99.com", true },
- { "fletemaritimo.online", true },
- { "flets-ms.com", true },
- { "fleurenplume.fr", true },
- { "fleursdujour.ph", true },
- { "fleuryfleury.com", true },
- { "flexfunding.com", true },
- { "fleximaal.com", true },
- { "fleximal.com", true },
- { "fleximus.org", false },
- { "flexport.com", true },
- { "flexstart.me", true },
- { "flfl.de", true },
- { "fliacuello.com.ar", true },
- { "flibusta.appspot.com", true },
- { "flieger-funk-runde.de", true },
- { "fliesen-waldschmidt.de", true },
- { "flight.school", true },
- { "flightdeckfriend.com", true },
- { "flightmedx.com", true },
- { "flightschoolbooking.com", true },
- { "flightschoolcandidates.gov", true },
- { "flightschoolusa.com", true },
- { "fliino.com", true },
- { "fliino.eu", true },
- { "fliino.info", true },
- { "fliino.net", true },
- { "fliino.org", true },
- { "flinch.io", true },
- { "flip.kim", true },
- { "flip.lease", true },
- { "flipmusic.tk", true },
- { "flipneus.net", true },
- { "flipphotography.ga", true },
- { "flipsidevr.com", true },
- { "fliptable.org", true },
- { "flirt-norden.de", true },
- { "flirtee.net", true },
- { "flirtfaces.de", true },
- { "flixcheck.de", true },
- { "flmortgagebank.com", true },
- { "floaternet.com", true },
- { "floating-holidays.co.uk", true },
- { "flockbox.club", true },
- { "flocktofedora.org", true },
- { "floersheimer-openair.de", true },
- { "floffi.media", true },
- { "floify.com", true },
- { "flokinet.is", true },
- { "flokkr.com", true },
- { "flonharmonymassage.space", true },
- { "floobits.com", true },
- { "floodsmart.gov", true },
- { "floogulinc.com", true },
- { "floorballphilippines.tk", true },
- { "flooringnightmares.com", true },
- { "flooringsourcetx.com", true },
- { "floort.net", false },
- { "floqast.com", true },
- { "floraclick.net", true },
- { "floraexpress.it", true },
- { "florafiora.com.br", false },
- { "florausa.net", true },
- { "floravan.com", true },
- { "floravino.de", true },
- { "florence.uk.net", true },
- { "florenceapp.co.uk", true },
- { "florenciasabio.com", true },
- { "florent-tatard.fr", true },
- { "florian-bachelet.fr", true },
- { "florian-knorn.com", true },
- { "florian-lefevre.fr", true },
- { "florian-thie.de", true },
- { "florian2833z.de", true },
- { "floriankarmen.com", true },
- { "floriankeller.de", true },
- { "florianmitrea.uk", true },
- { "florianschmitt.ca", true },
- { "floriantanner.ch", true },
- { "florida-immigration.com", true },
- { "floridafabrication.net", true },
- { "floridahomesinvest.com", true },
- { "floridamainmovers.com", true },
- { "floridasexhealth.com", true },
- { "floridawaterapparel.net", true },
- { "floridaweightlossdoctors.com", true },
- { "florinlungu.it", true },
- { "florismouwen.com", false },
- { "floristik-online.com", true },
- { "floristmou.com", true },
- { "florisvdk.net", true },
- { "floriswesterman.nl", true },
- { "flosch.at", false },
- { "floskelwolke.de", true },
- { "flossexanten.de", true },
- { "flourishtogether.com", true },
- { "flow.su", true },
- { "flowcom.de", true },
- { "flowersquito.com", true },
- { "flowinity.com", true },
- { "flowinvoice.com", true },
- { "flowreader.com", true },
- { "flra.gov", true },
- { "fluffy.moe", true },
- { "fluffycloud.de", true },
- { "fluggesellschaft.de", true },
- { "fluglektuere.com", true },
- { "flugrecht.de", true },
- { "flugschule-usa.de", true },
- { "fluidmeterusa.com", true },
- { "fluidpicturesinc.com", true },
- { "fluids.ac.uk", true },
- { "fluitbeurt.nl", true },
- { "flukethoughts.com", true },
- { "flumble.nl", true },
- { "flunschi.goip.de", true },
- { "fluoxetine.net", true },
- { "flushlife.com", true },
- { "fluteandpianoteaching.co.uk", true },
- { "flux.healthcare", true },
- { "fluxfingers.net", true },
- { "fluxforge.com", true },
- { "fluxi.fi", true },
- { "fluxoid.com", true },
- { "flw365365.com", true },
- { "fly-en-drive.nl", true },
- { "fly.moe", true },
- { "flyadrenaline.com", true },
- { "flyavantar.com", true },
- { "flyawaybirds.ga", true },
- { "flyboyfpv.com", true },
- { "flydrivesicilie.nl", true },
- { "flyer.tools", true },
- { "flygon.pink", true },
- { "flying-dudes.de", true },
- { "flyinghigh.co.jp", true },
- { "flyinglocksmiths.com", true },
- { "flyingpackets.net", true },
- { "flyingrub.me", true },
- { "flymns.fr", true },
- { "flynn.io", true },
- { "flyp.me", true },
- { "flypenge.dk", true },
- { "flyserver.co.il", false },
- { "flyswoop.com", true },
- { "flyt.online", true },
- { "flytoadventures.com", true },
- { "flywus.com", true },
- { "fm.ie", true },
- { "fmbilder.se", true },
- { "fmcs.gov", true },
- { "fmdance.cl", true },
- { "fmeventcentre.com", true },
- { "fminsight.net", true },
- { "fmodoux.biz", false },
- { "fmussatmd.com", true },
- { "fnanen.net", true },
- { "fnbnokomis.com", true },
- { "fnbot.shop", true },
- { "fneon.eu", true },
- { "fnh-expert.net", true },
- { "fnof.ch", true },
- { "fnordserver.eu", true },
- { "fnpro.eu", true },
- { "foair.me", true },
- { "foairbus.fr", false },
- { "foairbussas.fr", false },
- { "focanamoda.com.br", true },
- { "focanocliente.com.br", true },
- { "focusmark.jp", false },
- { "focusministries1.org", true },
- { "focuspointtechnologies.com", true },
- { "foej-aktiv.de", true },
- { "foej.net", true },
- { "foerster.gmbh", true },
- { "fogway.net", true },
- { "foia.gov", true },
- { "foiaonline.gov", true },
- { "foixet.com", true },
- { "fojing.com", true },
- { "fojt.cz", true },
- { "fojtova.cz", true },
- { "fojtovi.cz", true },
- { "fokan.be", true },
- { "fokan.ch", true },
- { "fokep.no", true },
- { "fokus.ag", true },
- { "fol.tf", true },
- { "folar.ga", true },
- { "folio.no", true },
- { "foliumbiosciences.com", true },
- { "foliumfinance.com", true },
- { "foljeton.dk", true },
- { "folk.as", true },
- { "folkofolk.se", true },
- { "follandviolins.com", true },
- { "follower98.ir", true },
- { "followmystaff.com", true },
- { "followthatpage.com", true },
- { "followthedog.co.uk", true },
- { "foluomeng.net", true },
- { "folv.es", true },
- { "folwark.krakow.pl", true },
- { "fomopop.com", true },
- { "fonamperu.org.pe", true },
- { "fondationwiggli.ch", true },
- { "fondy.ru", true },
- { "fondy.ua", true },
- { "fonga.ch", true },
- { "fonline.tk", true },
- { "fono.jp", true },
- { "fonolo.com", true },
- { "fonseguin.ca", true },
- { "font-converter.net", true },
- { "fonte-trading.com", true },
- { "fontedoprazer.com", true },
- { "fontein.de", true },
- { "fontela.es", true },
- { "fontlibrary.org", true },
- { "fonts4free.net", true },
- { "fonzone.it", true },
- { "foo.fo", true },
- { "foo.hamburg", true },
- { "food4healthybones.com", true },
- { "foodboy.com", true },
- { "foodev.de", true },
- { "foodlist.net", true },
- { "foodloader.net", true },
- { "foodsafety.gov", true },
- { "foodsafetyjobs.gov", true },
- { "foodsoul.pro", true },
- { "foodwise.marketing", true },
- { "foolip.org", true },
- { "foolwealth.com", true },
- { "foonly.fi", true },
- { "foorack.com", true },
- { "fooster.io", true },
- { "foot.fr", true },
- { "footagecrate.com", true },
- { "footballforum.de", true },
- { "footballsrit.tk", true },
- { "for.care", false },
- { "foray-jero.me", true },
- { "forbidden-mods.de", true },
- { "force4racing.co.uk", true },
- { "force4racing.com", true },
- { "forcelink.eu", true },
- { "forcelink.nl", true },
- { "forcelinkamerica.com", true },
- { "forcelinkamerica.nl", true },
- { "forcerakodo.hu", true },
- { "forcewave.com", true },
- { "ford-mustang.tk", true },
- { "ford-shop.by", true },
- { "ford.com.au", true },
- { "ford.com.br", true },
- { "ford.com.cn", true },
- { "ford.mx", true },
- { "fordlibrarymuseum.gov", true },
- { "fordsync.com", true },
- { "foreachcode.com", true },
- { "forecastcity.com", true },
- { "foreclosureattorneyhouston.com", true },
- { "forefrontcloud.com", true },
- { "foregroundweb.com", true },
- { "foreign-language-colleges.com", true },
- { "foreignxchange.com.au", true },
- { "forellenpark.com", true },
- { "forensicsoftware.biz", true },
- { "forento.be", true },
- { "foresightbusinessservices.co.uk", true },
- { "forestraven.net", true },
- { "forevergreens.us", true },
- { "foreverssl.com", true },
- { "foreversummertime.com", true },
- { "foreverydream.com", true },
- { "forewordreviews.com", true },
- { "forex-giants.com", true },
- { "forex.ee", true },
- { "forex7.co", true },
- { "forexarby.com", true },
- { "forexchef.de", true },
- { "forexcity.cf", true },
- { "forexee.com", true },
- { "forfeit.ga", true },
- { "forfeiture.gov", true },
- { "forfunssake.co.uk", true },
- { "forge-goerger.eu", false },
- { "forgotten-legends.org", true },
- { "form3w.nl", true },
- { "formacionyestudios.com", true },
- { "formalgrammar.tk", true },
- { "formality.one", true },
- { "forman.store", true },
- { "formapi.io", true },
- { "format-paysage.ch", false },
- { "formation-assureur.com", true },
- { "formation-mac.ch", false },
- { "formationseeker.com", true },
- { "formi9.com", true },
- { "formio.nl", true },
- { "formsbyair.com", true },
- { "formsmarts.com", true },
- { "formula-ot.ru", true },
- { "formulacionquimica.com", true },
- { "formulastudent.de", true },
- { "fornoreason.net.au", true },
- { "fornwall.net", true },
- { "foroaranda.com", true },
- { "forokd.com", true },
- { "forrestheller.com", true },
- { "forro.info", true },
- { "forsaleinedmonton.ca", true },
- { "forself.me", true },
- { "forsi.xyz", true },
- { "forstbetrieb-hennecke.de", true },
- { "forstprodukte.de", true },
- { "fortdodgeradio.com", true },
- { "forteggz.nl", true },
- { "forthetoys.com", true },
- { "forthewin.rocks", true },
- { "forthvalleykeswick.co.uk", true },
- { "fortnine.ca", true },
- { "fortress.no", true },
- { "fortress.sk", true },
- { "fortuna-apotheke-lahnstein.de", true },
- { "fortuna.co.ua", true },
- { "forty-two.nl", true },
- { "forty8creates.com", true },
- { "fortygordy.com", true },
- { "fortytwo.cloud", true },
- { "forum-4.com", true },
- { "forum-batteries.com", true },
- { "forum-bonn.de", true },
- { "forum-egypte.tk", true },
- { "forum-noginska.tk", true },
- { "forum-tutorapide.ml", true },
- { "forum.quantifiedself.com", false },
- { "forumcarriocity.tk", true },
- { "forumdimo.fr", true },
- { "forumirc.net", true },
- { "forumpakistan.tk", true },
- { "forumstandaardisatie.nl", true },
- { "forvisualdesign.com", false },
- { "forward-fly-fishing.ch", false },
- { "foryourhealthybody.com", true },
- { "fos-apps.org", true },
- { "fos-games.org", true },
- { "fosaudit.com", true },
- { "foscamcanada.com", true },
- { "fosdem.org", true },
- { "fosgreece.com", true },
- { "fossboxen.com", true },
- { "fossboxen.net", true },
- { "fossboxen.org", true },
- { "fossdaily.xyz", true },
- { "fossforward.com", true },
- { "fossilfreeyale.org", true },
- { "fosterpark.ca", true },
- { "fotella.com", true },
- { "fotl.ua", true },
- { "foto-janvanaefst.nl", true },
- { "foto-leistenschneider.de", true },
- { "foto-leitner.com", true },
- { "foto-leitner.de", true },
- { "foto-robitsch.at", true },
- { "foto-roma.ru", true },
- { "foto.by", true },
- { "fotoblog.nrw", true },
- { "fotobodyart.nl", true },
- { "fotoboxvysocina.cz", true },
- { "fotofaerie.net", true },
- { "fotoflits.net", true },
- { "fotofon.tk", true },
- { "fotografechristha.nl", true },
- { "fotografiadellalucerossa.com", true },
- { "fotografiamakro.pl", true },
- { "fotohome.dk", true },
- { "fotokomorkomania.pl", true },
- { "fotoleitner.com", true },
- { "fotoleitner.de", true },
- { "fotonjan.com", true },
- { "fotopalacedigitalstudio.tk", true },
- { "fotostravestisbr.com", true },
- { "fotostudio-leitner.com", true },
- { "fotostudio-leitner.de", true },
- { "fotostudio-schweiz.ch", true },
- { "fotowolfy.com", true },
- { "fougner.co", true },
- { "found.website", true },
- { "foundationrepairnebraska.com", true },
- { "foundationspecialistmi.com", true },
- { "foundchurch.co.uk", true },
- { "founded.ml", true },
- { "founderio.net", true },
- { "foundsounds.me", true },
- { "fourashesgolfcentre.co.uk", true },
- { "fourashesgolfcentre.com", true },
- { "fourdesignstudio.com", true },
- { "fourfourcrew.com", true },
- { "fourmies.fr", true },
- { "fournarisopenday.com", true },
- { "fournisseur-des-collectivites.com", true },
- { "fourscore.ga", true },
- { "foursight.io", true },
- { "fourwaysplumber24-7.co.za", true },
- { "fourxone.com", true },
- { "fowlsmurf.net", true },
- { "fox.my", false },
- { "foxeffect.com", true },
- { "foxesare.sexy", true },
- { "foxghoul.com", true },
- { "foxhillshotel.com", true },
- { "foxo.blue", true },
- { "foxontheinter.net", true },
- { "foxphotography.ch", false },
- { "foxquill.com", false },
- { "foxroy.com", true },
- { "foxscribbler.com", true },
- { "foxstreetcomms.co.za", false },
- { "foxtrotfm.tk", true },
- { "foxycredit.com", true },
- { "fozzie.co.uk", true },
- { "fozzie.space", true },
- { "fpasca.com", true },
- { "fpc.gov", false },
- { "fpersona.com", true },
- { "fpgamania.com", true },
- { "fps73.ru", true },
- { "fpsclasico.de", true },
- { "fpsv.de", true },
- { "fpy.cz", true },
- { "fr.search.yahoo.com", false },
- { "fr33tux.org", true },
- { "frack.nl", false },
- { "fracreazioni.it", true },
- { "fracturedperspective.com", true },
- { "fraesentest.de", true },
- { "frag.works", true },
- { "fragdenstaat.de", true },
- { "fragmentspuren.de", true },
- { "fragstore.net", true },
- { "fraho.eu", true },
- { "frail.gq", true },
- { "framapiaf.org", false },
- { "framboise314.fr", true },
- { "framer.com", true },
- { "framezdakkapellen.nl", true },
- { "fran.cr", true },
- { "france-hotellerie-restauration.com", true },
- { "france-news.cf", true },
- { "francepandi.fr", true },
- { "francesca-and-lucas.com", true },
- { "francescopalazzo.com", true },
- { "francescopandolfibalbi.it", true },
- { "francescoyatesfansite.com", true },
- { "francetraceur.fr", true },
- { "franchini.email", true },
- { "franchini.engineer", true },
- { "franchisehive.com", true },
- { "francinebelanger.network", true },
- { "francisli.net", false },
- { "francisplaza.com", true },
- { "franckgirard.net", true },
- { "francois-occasions.be", false },
- { "francoisbelangerboisclair.com", true },
- { "francoise-paviot.com", true },
- { "francoisharvey.ca", true },
- { "francoislepage.com", false },
- { "francoz.me", true },
- { "frandor.co.uk", true },
- { "frank.fyi", true },
- { "frankbellamy.co.uk", true },
- { "frankellawfirm.com", true },
- { "franken-lehrmittel.de", true },
- { "frankenhost.de", true },
- { "frankenlehrmittel.de", true },
- { "frankieburkeactor.tk", true },
- { "frankieistanbul.com", true },
- { "frankierfachmann.de", true },
- { "frankierstar.de", true },
- { "frankinteriordesign.co.uk", true },
- { "frankl.in", true },
- { "franklinmagic.com", true },
- { "frankopol-sklep.pl", true },
- { "frankslaughterinsurance.com", true },
- { "frankyan.com", true },
- { "frantic1048.com", true },
- { "frantorregrosa.me", true },
- { "franz-vatter.de", true },
- { "franz.beer", true },
- { "franziska-pascal.de", true },
- { "franziskaherbert.de", true },
- { "franzknoll.de", true },
- { "fraplaster.com", true },
- { "frappant.cc", true },
- { "frappant.net", true },
- { "frasch-umzuege.de", true },
- { "fraselab.ru", true },
- { "frasesconemocion.com", true },
- { "frasesdodia.com", true },
- { "frasesdodia.net", true },
- { "frasesparaface.com.br", true },
- { "frasesytarjetas.com", true },
- { "fratelliscarrone.com", true },
- { "frattaroli.org", true },
- { "frau-inge.de", true },
- { "frau-pusteblu.me", true },
- { "frau-sucht-bauer.de", true },
- { "fraudmarc.com", true },
- { "frauen-etappenrennen.de", true },
- { "frauenarzt-niendorf.de", false },
- { "frauenarzt-zinke.de", true },
- { "frauenlob.rocks", true },
- { "fraufries.de", true },
- { "fraurichter.net", true },
- { "fraye.net", true },
- { "frazell.net", true },
- { "frbracch.it", true },
- { "frc.gov", true },
- { "frdl.ch", false },
- { "freaksites.dk", true },
- { "freaksports.com.au", true },
- { "frebib.co.uk", true },
- { "frebib.com", true },
- { "frebib.net", true },
- { "freddieleeman.nl", true },
- { "fredericcote.com", true },
- { "frederik-braun.com", false },
- { "frederikshavn.net", true },
- { "frederikvig.com", true },
- { "fredhook.tk", true },
- { "fredloya.com", true },
- { "fredriksslaktforskning.se", true },
- { "fredriksslekt.se", true },
- { "freds4buildings.com", true },
- { "fredsmith.net", true },
- { "fredsmith.org", true },
- { "fredsmith.us", true },
- { "fredvoyage.fr", true },
- { "free-bitco.ml", true },
- { "free-generate.tk", true },
- { "free-sex-sites.com", true },
- { "free-ss.site", true },
- { "free.com.tw", true },
- { "free8hd.com", true },
- { "freeaf.gq", true },
- { "freebarrettbrown.org", true },
- { "freebcard.com", true },
- { "freebegames.tk", true },
- { "freebetoffers.co.uk", true },
- { "freebies.id", true },
- { "freebookmakersbetsandbonuses.com.au", true },
- { "freeboson.org", true },
- { "freebsdbrasil.com.br", true },
- { "freebus.org", true },
- { "freecloud.at", true },
- { "freecodezilla.com", true },
- { "freedev.cz", true },
- { "freedom.nl", false },
- { "freedom.press", true },
- { "freedom35.org", true },
- { "freedomdujour.com", true },
- { "freedomfinance.se", true },
- { "freedomflotilla.org", true },
- { "freedomhk.info", true },
- { "freedomhkg.info", true },
- { "freedomhkg.net", true },
- { "freedomhkg.org", true },
- { "freedomonline.bg", true },
- { "freedomrahoitus.fi", true },
- { "freedomtoolkit.com", true },
- { "freeenglishhelp.com", true },
- { "freeexampapers.com", true },
- { "freefilesync.org", true },
- { "freefinancialhelp.net", true },
- { "freeform4u.de", true },
- { "freegame-mugen.jp", true },
- { "freegovernmentcellphoneguide.com", true },
- { "freegutters.com", true },
- { "freeiconspng.com", true },
- { "freeinfos.fr", true },
- { "freeinoutboard.com", true },
- { "freejeremy.net", true },
- { "freekdevries.nl", true },
- { "freeks.com.br", true },
- { "freelance-webdesigner.jp", true },
- { "freelance.boutique", true },
- { "freelance.nl", true },
- { "freelancecollab.com", true },
- { "freelanceessaywriters.com", true },
- { "freelancehunt.com", true },
- { "freelancejobs.org.uk", true },
- { "freelauri.com", true },
- { "freelifer.jp", true },
- { "freemanlogistics.com", true },
- { "freemans.com", true },
- { "freeministryresources.org", true },
- { "freemomhugs.org", true },
- { "freemotion.tk", true },
- { "freemyipod.org", true },
- { "freenetproject.org", true },
- { "freeonplate.com", true },
- { "freepastlife.com", true },
- { "freepnglogos.com", true },
- { "freepublicprofile.com", true },
- { "freertomorrow.com", true },
- { "freeshell.de", true },
- { "freeshkre.li", true },
- { "freesitemapgenerator.com", true },
- { "freesms-online.de", true },
- { "freesnowden.is", true },
- { "freesoft-board.to", true },
- { "freesoftlab.com", true },
- { "freesolitaire.win", true },
- { "freesourcestl.org", true },
- { "freespot.mobi", true },
- { "freessl.tech", true },
- { "freesslcertificate.me", true },
- { "freestylesolutions.com", true },
- { "freetaxusa.com", true },
- { "freetext.org", true },
- { "freethetv.ie", true },
- { "freetrung.tk", true },
- { "freetsa.org", true },
- { "freevision.co", true },
- { "freevst.ir", true },
- { "freeweibo.com", true },
- { "freewerkt.nl", true },
- { "freewillfilm.com", true },
- { "freewoodfactory.com", true },
- { "freeyourmusic.com", true },
- { "freezemea.com", true },
- { "freezion.com", true },
- { "freie-software.net", true },
- { "freiewaehler-verden.de", true },
- { "freifahrt.de", true },
- { "freifall.tk", true },
- { "freifunk-burgaltendorf.de", true },
- { "freifunk-essen.de", true },
- { "freifunk-luenen.de", true },
- { "freimeldungen.de", true },
- { "freims.cc", true },
- { "freitasul.com.br", true },
- { "freitasul.io", true },
- { "freiwuppertal.de", true },
- { "freiwurst.net", true },
- { "freizeitbad-riff.de", true },
- { "freizeitplaza.de", true },
- { "frenchcreekcog.org", true },
- { "frenchmac.com", true },
- { "frenchmusic.fr", true },
- { "frequencebanane.ch", false },
- { "frequentflyerapp.com", true },
- { "fresh-hotel.org", true },
- { "fresh-networks.net", true },
- { "fresh.co.il", true },
- { "fresh4.co.uk", true },
- { "freshair.com.br", true },
- { "freshbean.club", true },
- { "freshbooks.com", true },
- { "freshdns.nl", true },
- { "freshempire.gov", true },
- { "freshers9.com", true },
- { "fretscha.com", true },
- { "frettirnar.is", true },
- { "fretworksec.com", true },
- { "freundinnen-ausflug.de", true },
- { "freundinnen-kurzurlaub.de", true },
- { "freundinnen-urlaub.de", true },
- { "freundinnenausflug.de", true },
- { "frforms.com", true },
- { "friarsonbase.com", true },
- { "fricassea.com", true },
- { "frickelboxx.de", true },
- { "frickelmeister.de", true },
- { "fridarestaurantemexicano.com", true },
- { "fridaysforfuture-bremen.de", true },
- { "fridolinka.cz", true },
- { "friedberg2020.de", true },
- { "friederes.lu", true },
- { "friederloch.de", true },
- { "friedrich-foto-art.de", true },
- { "friedsamphotography.com", true },
- { "friedstechnology.com", true },
- { "friedstechnology.nl", true },
- { "friedstechnology.online", true },
- { "friedzombie.com", true },
- { "friedzombie.nl", true },
- { "friedzombie.online", true },
- { "friendlycleaners.co.uk", true },
- { "friendlysiberia.com", true },
- { "friendowment.us", true },
- { "friends24.cz", true },
- { "friendshipismagicsquad.com", true },
- { "friendsofgfwpc.org", true },
- { "friendsofparks.org", true },
- { "friet.org", true },
- { "frietbesteld.nl", true },
- { "frietzombie.nl", true },
- { "friezy.ru", true },
- { "frigi.ch", false },
- { "frign.de", true },
- { "frigolit.net", true },
- { "friller.com.au", true },
- { "frillip.com", true },
- { "fringeintravel.com", true },
- { "frinkiac.com", true },
- { "frino.de", true },
- { "frippz.se", true },
- { "friseur-foerder.de", true },
- { "friss.com", true },
- { "fritz-koehne-schule.de", true },
- { "fritzrepair.com", true },
- { "frizo.com", true },
- { "frizzless.com", true },
- { "fro.se", true },
- { "frob.nl", true },
- { "frode.win", true },
- { "froehliche-hessen.de", true },
- { "frogatto.com", true },
- { "frogeye.fr", true },
- { "froggitt.com", true },
- { "frogical.nl", true },
- { "froh.co.jp", true },
- { "frolova.org", true },
- { "fromager.net", true },
- { "fromscratch.rocks", true },
- { "fromtheboxoffice.com", true },
- { "fromtinythings.com", true },
- { "fronteers.nl", false },
- { "frontier-ad.co.jp", true },
- { "frontiers.nl", true },
- { "frontline.cloud", true },
- { "frontlinemessenger.com", true },
- { "froogo.co.uk", true },
- { "fropky.com", true },
- { "frosoku.com", true },
- { "frostprotection.co.uk", true },
- { "frostwarning.com", true },
- { "frosty.sk", true },
- { "frothy.coffee", true },
- { "frovi.co.uk", true },
- { "frownonline.co.uk", true },
- { "frozen-geek.net", true },
- { "frozen-solid.net", true },
- { "frozenfutures.com", true },
- { "frozenjam.com", true },
- { "frozensector.com", true },
- { "frpg.gov", true },
- { "frprn.com", true },
- { "frprn.es", true },
- { "frprn.xxx", true },
- { "frsra.ml", true },
- { "frtib.gov", true },
- { "frtn.com", true },
- { "frtrains.com", false },
- { "fruchthof24.de", true },
- { "fruchtikus.net", true },
- { "fruend-hausgeraeteshop.de", true },
- { "frugalfamilyhome.com", true },
- { "frugro.be", true },
- { "fruit-farm.tk", true },
- { "fruition.co.jp", true },
- { "fruitscale.com", true },
- { "fruityten.co.uk", true },
- { "frusky.de", true },
- { "frutasyvejetales.com", true },
- { "fruxprivatebank.net", true },
- { "fryergroup.com", true },
- { "fs-g.org", true },
- { "fs-maistadt.de", true },
- { "fs257.com", true },
- { "fsavc.org.uk", true },
- { "fsbn.eu", true },
- { "fsbnh.bank", true },
- { "fsbpaintrock.com", true },
- { "fsbturton.com", true },
- { "fsch2009.com", true },
- { "fsck.jp", false },
- { "fsckd.com", true },
- { "fscott.de", true },
- { "fsd.gov", true },
- { "fsfxpackages.com", true },
- { "fsg.one", true },
- { "fsgeek.ca", true },
- { "fsk.fo", true },
- { "fskounoike.com", true },
- { "fsky.info", true },
- { "fsm2016.org", true },
- { "fsps.ch", true },
- { "fsty.uk", true },
- { "fsvoboda.cz", true },
- { "fsvt.ch", false },
- { "ft.com", false },
- { "ftang.de", true },
- { "ftc.gov", false },
- { "ftccomplaintassistant.gov", true },
- { "ftcefile.gov", true },
- { "ftdev.in", true },
- { "ftexchange.com", true },
- { "fthat.link", true },
- { "ftl13.com", true },
- { "ftmc.tk", true },
- { "ftnpower.com", true },
- { "ftptest.net", true },
- { "ftrsecure.com", true },
- { "ftrucks.com.au", true },
- { "ftv.re", true },
- { "ftx.com", true },
- { "ftx.io", true },
- { "fu-li88.com", true },
- { "fu-li88.net", true },
- { "fuantaishenhaimuli.net", true },
- { "fuckav.ru", true },
- { "fuckcie.com", true },
- { "fucklife.ch", true },
- { "fucknazis.tk", true },
- { "fuckup.dk", true },
- { "fuckz.net", true },
- { "fudie.net", true },
- { "fudubank.vn", true },
- { "fuechschen.org", true },
- { "fuelingyourdreams.com", false },
- { "fuerstenfelder-immobilien.de", true },
- { "fuglede.dk", true },
- { "fuite.ch", false },
- { "fuitedeau.ch", false },
- { "fuites.ch", false },
- { "fujianshipbuilding.com", true },
- { "fujiwaraqol.com", true },
- { "fujiwarashinzo.com", true },
- { "fukakukeiba.com", true },
- { "fukata.org", true },
- { "fukikaeru.com", true },
- { "fukt.ca", true },
- { "fukuiedu.com", true },
- { "fukushima-fun.com", true },
- { "fulfilmentcrowd.com", true },
- { "fulgenzis.com", true },
- { "fulige.top", true },
- { "fuliwang.info", true },
- { "fuliwang.us", true },
- { "full-race.com", true },
- { "fullautomotivo.com.br", true },
- { "fullbundle.com", true },
- { "fullcirclestudio.nl", true },
- { "fullerlife.org.uk", true },
- { "fullfilez.com", true },
- { "fullhost.com", true },
- { "fullhub.ru", true },
- { "fullmatch.net", true },
- { "fullstacknotes.com", false },
- { "fumblers.ca", true },
- { "fumerolles.ch", false },
- { "fumo.se", false },
- { "fun-bounce.co.uk", true },
- { "fun-fan.biz", true },
- { "fun-tasia.co.uk", true },
- { "fun4kidzbouncycastles.co.uk", true },
- { "fun4ubouncycastles.co.uk", true },
- { "fun888city.com", true },
- { "fun888city.net", true },
- { "fun88city.com", true },
- { "funadvisor.ca", true },
- { "funadvisorfrance.com", true },
- { "funatic.nl", true },
- { "funbuynet.com.br", true },
- { "funcabinrentals.com", true },
- { "funchestra.at", false },
- { "functional.cc", true },
- { "functions-online.com", true },
- { "fundacionfranciscofiasco.org", true },
- { "fundamentalsofaccounting.org", true },
- { "fundavi.jp", true },
- { "fundayltd.com", true },
- { "fundays.nl", true },
- { "fundchan.com", true },
- { "fundeego.com", false },
- { "fundingrainbows.com", true },
- { "fundkyapp.com", true },
- { "fundmylegalclaim.co.uk", true },
- { "fundort.ch", true },
- { "funds.ddns.net", true },
- { "funerare-cazacu.com", true },
- { "funfactorleeds.co.uk", true },
- { "funfair.io", true },
- { "funfoodco.co.uk", true },
- { "funfun.com.br", true },
- { "funfunmstdn.tokyo", true },
- { "fungomoscow.cf", true },
- { "funhouse-inflatables.co.uk", true },
- { "funidelia-tr.com", true },
- { "funidelia.at", true },
- { "funidelia.be", true },
- { "funidelia.bg", true },
- { "funidelia.ca", true },
- { "funidelia.ch", true },
- { "funidelia.cl", true },
- { "funidelia.co", true },
- { "funidelia.co.il", true },
- { "funidelia.co.nz", true },
- { "funidelia.co.uk", true },
- { "funidelia.com", true },
- { "funidelia.com.ar", true },
- { "funidelia.com.au", true },
- { "funidelia.com.br", true },
- { "funidelia.com.ua", true },
- { "funidelia.cz", true },
- { "funidelia.de", true },
- { "funidelia.dk", true },
- { "funidelia.ee", true },
- { "funidelia.es", true },
- { "funidelia.fi", true },
- { "funidelia.fr", true },
- { "funidelia.gr", true },
- { "funidelia.hk", true },
- { "funidelia.hr", true },
- { "funidelia.hu", true },
- { "funidelia.id", true },
- { "funidelia.ie", true },
- { "funidelia.in", true },
- { "funidelia.is", true },
- { "funidelia.it", true },
- { "funidelia.kr", true },
- { "funidelia.lt", true },
- { "funidelia.lu", true },
- { "funidelia.lv", true },
- { "funidelia.mx", true },
- { "funidelia.my", true },
- { "funidelia.nl", true },
- { "funidelia.no", true },
- { "funidelia.ph", true },
- { "funidelia.pt", true },
- { "funidelia.ro", true },
- { "funidelia.rs", true },
- { "funidelia.ru", true },
- { "funidelia.se", true },
- { "funidelia.sg", true },
- { "funidelia.si", true },
- { "funidelia.sk", true },
- { "funinbeds.org.uk", true },
- { "funken-networks.de", true },
- { "funkfamily.org", true },
- { "funkfernbedienung-industrie.de", true },
- { "funknotaus.de", true },
- { "funktionel.co", true },
- { "funktionevents.co.uk", true },
- { "funktionsverket.se", true },
- { "funkydealz.no", true },
- { "funmountaincanyon.com", true },
- { "funniestclip.com", true },
- { "funnybikini.com", true },
- { "funnychristianjokes.tk", true },
- { "funoverip.net", true },
- { "funprode.org", true },
- { "funsochi.ru", true },
- { "funspins.com", true },
- { "funtime-inflatables.co.uk", true },
- { "funtime.com.ua", true },
- { "funtime.kiev.ua", true },
- { "funtimeentertainment.co.uk", true },
- { "funtimesbouncycastles.co.uk", true },
- { "funyirotraktor.hu", true },
- { "fur.red", true },
- { "furca.ca", true },
- { "furcdn.net", true },
- { "furgetmeknot.org", true },
- { "furgo.love", true },
- { "furigana.info", true },
- { "furkancaliskan.com", true },
- { "furkot.com", true },
- { "furkot.de", true },
- { "furkot.es", true },
- { "furkot.fr", true },
- { "furkot.it", true },
- { "furkot.pl", true },
- { "furlan.co", false },
- { "furlog.it", false },
- { "furnfurs.com", true },
- { "furnishedproperty.com.au", true },
- { "furniturezoneboone.com", true },
- { "furries-united.de", true },
- { "furry.bot", true },
- { "furry.cat", true },
- { "furry.cool", true },
- { "furry.dk", true },
- { "furrytech.network", true },
- { "furukogarasusha.com", true },
- { "fusa-miyamoto.jp", true },
- { "fusechange.org", true },
- { "fuselight.nl", true },
- { "fuseos.net", true },
- { "fuseyahoken.com", true },
- { "fusionapps.com", true },
- { "fusionapps.net", true },
- { "fusionetics.plus", true },
- { "fusiongaming.de", true },
- { "fussball-xxl.de", true },
- { "fussell.io", true },
- { "fuszara.pl", true },
- { "futa.moe", false },
- { "futaba-works.com", true },
- { "futbol-tv.tk", true },
- { "futbolvivo.tv", true },
- { "futureaudiographics.com", true },
- { "futurefastforward.com", true },
- { "futurefive.asia", true },
- { "futurefive.co.nz", true },
- { "futurefive.com.au", true },
- { "futurefund.com", true },
- { "futuregrowthva.com", true },
- { "futurenda.com", true },
- { "futuressm.com", true },
- { "futurestyletiling.com.au", true },
- { "futurezone.at", true },
- { "fuuko.net", true },
- { "fuwafuwa.moe", true },
- { "fuyu.moe", true },
- { "fuzenet.net", true },
- { "fuzoku.jp", true },
- { "fuzzing-project.org", true },
- { "fvap.gov", true },
- { "fveevaete.com", true },
- { "fwdx.net", true },
- { "fwest.ovh", true },
- { "fwest98.nl", true },
- { "fwest98.ovh", true },
- { "fws.gov", true },
- { "fwz.me", true },
- { "fx-rating.com", true },
- { "fx-rk.com", true },
- { "fx5.de", true },
- { "fxislamic.com", true },
- { "fxmarketing.com.au", true },
- { "fxmarketing.net.au", true },
- { "fxmotion.ir", true },
- { "fxopen.co.uk", true },
- { "fxopen.com", true },
- { "fxopen.com.au", true },
- { "fxopen.com.br", true },
- { "fxopen.com.mx", true },
- { "fxopen.my", true },
- { "fxopen.ru", true },
- { "fxp.co.il", true },
- { "fxseo.com.au", true },
- { "fxsshiwo.cn", true },
- { "fxtalk.cn", true },
- { "fxthai.com", true },
- { "fxtrade-lab.com", true },
- { "fxweb.co", true },
- { "fxwebsites.com.au", true },
- { "fxwebsites.net.au", true },
- { "fxwebstudio.net.au", true },
- { "fyfywka.com", true },
- { "fyksen.me", true },
- { "fyn.nl", true },
- { "fyner.lt", true },
- { "fyol.xyz", false },
- { "fyretrine.com", true },
- { "fysesbjerg.dk", true },
- { "fysio-ict.nl", true },
- { "fysiomassageoosterhout.nl", true },
- { "fysiotherapie-ict.nl", true },
- { "fysiotherapieapeldoornzuid.nl", true },
- { "fysiotherapieholtenbroek.nl", true },
- { "fysiovdberg.nl", true },
- { "fyss.ga", true },
- { "fysuite.com", true },
- { "fytcart.com", true },
- { "fytorio-pasxalis.gr", true },
- { "fzbrweb.cz", true },
- { "fzdm.com", true },
- { "fzhyzamt.com", true },
- { "g-ds.de", true },
- { "g-fruit.gr", true },
- { "g-lab.xyz", true },
- { "g-m-w.eu", true },
- { "g-p-design.com", true },
- { "g-rom.net", true },
- { "g.co", false },
- { "g0158.com", true },
- { "g0881.com", true },
- { "g0man.com", true },
- { "g1.ie", true },
- { "g10e.ch", true },
- { "g116688.com", true },
- { "g22-livechat.com", true },
- { "g2jp.uk", true },
- { "g2links.com", true },
- { "g2pla.net", true },
- { "g2ship.com", true },
- { "g2soft.net", true },
- { "g365.vip", false },
- { "g36533.com", true },
- { "g3d.ro", true },
- { "g3dev.ch", false },
- { "g3homefoods.com", true },
- { "g4w.co", true },
- { "g51365.com", true },
- { "g7035.com", true },
- { "g7yy.com", true },
- { "g818city.com", true },
- { "g8energysolutions.co.uk", true },
- { "ga-2.it", true },
- { "ga-part.ru", true },
- { "gaaz.fr", true },
- { "gabe.house", true },
- { "gabe565.com", true },
- { "gabeb1920.com", true },
- { "gabecook.com", true },
- { "gabinetejuridicotecnologicojuandemeseguer.es", true },
- { "gabinetpsychoterapii.krakow.pl", true },
- { "gabiocs.com", true },
- { "gablesportsga.com", true },
- { "gabriel.to", true },
- { "gabriele.tips", true },
- { "gabrielgn.com.br", true },
- { "gabriella.cf", true },
- { "gabrielsteens.nl", true },
- { "gabryjeluk.tk", true },
- { "gachimuchi.ru", true },
- { "gachiyase.com", true },
- { "gachter.name", false },
- { "gaci88play.com", true },
- { "gad.co.id", true },
- { "gadabit.pl", true },
- { "gaddini.it", true },
- { "gadgetadvisor.com", true },
- { "gadgetflip.com", true },
- { "gadgethacks.com", true },
- { "gadgetstock.ir", true },
- { "gae123.com", true },
- { "gaelico.tk", true },
- { "gaengler.com", true },
- { "gaestehaus-leipzig.de", true },
- { "gaestehaus-monika.com", true },
- { "gaetanosonline.com", true },
- { "gaetantremois.fr", true },
- { "gafa.vn", true },
- { "gaff-rig.co.uk", true },
- { "gaflooring.com", true },
- { "gafunds.com", true },
- { "gaganenterprises.in", true },
- { "gagliarducci.it", true },
- { "gagnerplusdargent.info", true },
- { "gagniard.org", true },
- { "gagor.pl", true },
- { "gagramore.cf", true },
- { "gagygnole.ch", false },
- { "gaiavanderzeyp.com", true },
- { "gaigelama.com", true },
- { "gaines-sodiamex.fr", true },
- { "gainins.com", true },
- { "gaio-automobiles.fr", true },
- { "gaireg.de", true },
- { "gaitandmobility.com", true },
- { "gaitrehabilitation.com", true },
- { "gaitresearch.com", true },
- { "gajas18.com", true },
- { "gajowniczek.eu", true },
- { "gakdigital.com", true },
- { "gakki.photos", true },
- { "gaku-architect.com", true },
- { "galacg.me", true },
- { "galak.ch", false },
- { "galaktika-znakomstv.tk", true },
- { "galaltosalento.it", true },
- { "galanight.cz", true },
- { "galax.us", true },
- { "galaxus.at", true },
- { "galaxus.ch", true },
- { "galaxus.com", true },
- { "galaxus.de", true },
- { "galaxus.eu", true },
- { "galaxus.fr", true },
- { "galaxy.edu.pe", true },
- { "galaxymusicpromo.com", true },
- { "galaxyplex.tk", true },
- { "galaxyscientific.com", true },
- { "galeriakobylarz.pl", true },
- { "galeriarr.pl", true },
- { "galeries.photo", false },
- { "galganoboutique.com", true },
- { "galighticus.com", true },
- { "galilahiskye.com", true },
- { "galileanhome.org", true },
- { "galinas-blog.de", true },
- { "galinos.gr", true },
- { "galj.info", true },
- { "galle.cz", true },
- { "galleoncloud.net", true },
- { "galleonwaymedical.com.au", true },
- { "gallerify.eu", true },
- { "galletasgabi.com.mx", false },
- { "galleyfoods.com", true },
- { "gallicrooster.com", true },
- { "gallifreyapp.co.uk", true },
- { "gallifreypermaculture.com.au", true },
- { "gallmeyer-consulting.com", true },
- { "gallun-shop.com", true },
- { "galoserver.org", true },
- { "galpaoap.com.br", true },
- { "galvingao.com", true },
- { "gamberorosso.menu", true },
- { "gamberorotto.com", true },
- { "gambetti.fr", true },
- { "gambitnash.co.uk", true },
- { "gambitnash.com", true },
- { "gambitprint.com", true },
- { "gambler.ru", true },
- { "gamblerhealing.com", true },
- { "gamblernd.com", true },
- { "gambling-business.club", true },
- { "gamblinghero.com", true },
- { "gamcore.com", true },
- { "game-files.net", false },
- { "game-topic.ru", true },
- { "game4less.com", true },
- { "game7.de", true },
- { "game818play.com", true },
- { "game88city.com", true },
- { "game88city.net", true },
- { "game88play.com", true },
- { "game88yule.com", true },
- { "gameanalytics.com", true },
- { "gameblabla.nl", true },
- { "gamebrott.com", true },
- { "gamecard-shop.nl", true },
- { "gamechefpummarola.eu", true },
- { "gamechurch.de", true },
- { "gameclue.jp", true },
- { "gamecollector.be", true },
- { "gameconservation.org.uk", true },
- { "gameconsole.co.nz", true },
- { "gamedevelopers.pl", true },
- { "gamegear.club", true },
- { "gamegix.com", true },
- { "gameharbor.duckdns.org", true },
- { "gameindustry.eu", true },
- { "gameisbest.jp", true },
- { "gamejobs.co", true },
- { "gamekaitori.jp", true },
- { "gamekeepers.cz", true },
- { "gamemodding.com", true },
- { "gamenerd.net", true },
- { "gameofbooks.de", true },
- { "gamepad.com.br", true },
- { "gameplaysforkids.com", true },
- { "gamepreorders.com", true },
- { "gamepres.org", true },
- { "gamer-portal.com", true },
- { "gamercredo.com", true },
- { "gamereactor.asia", true },
- { "gamereactor.cn", true },
- { "gamereactor.de", true },
- { "gamereactor.dk", true },
- { "gamereactor.es", true },
- { "gamereactor.eu", true },
- { "gamereactor.fi", true },
- { "gamereactor.fr", true },
- { "gamereactor.it", true },
- { "gamereactor.no", true },
- { "gamereactor.pt", true },
- { "gamereactor.se", true },
- { "gamerepublic.hu", true },
- { "gameres.com", true },
- { "gamerezo.com", true },
- { "gamerspost.ga", true },
- { "gamerzdot.com", true },
- { "games2kids.net", true },
- { "games4theworld.org", true },
- { "gamesaviour.com", true },
- { "gamesdepartment.co.uk", true },
- { "gameserver-admin.ga", true },
- { "gameserver-sponsor.me", true },
- { "gameshogun.xyz", true },
- { "gameshowchallenge.ie", true },
- { "gamesided.com", true },
- { "gamesme.cn", true },
- { "gamesplanet.com", true },
- { "gamesputnik.ru", true },
- { "gametube.website", true },
- { "gamewinninggoal.com", true },
- { "gamilab.com", true },
- { "gamilab.no", true },
- { "gamingexodus.com", true },
- { "gamingmedley.com", true },
- { "gamingmonitortest.com", true },
- { "gamingroomaccessories.com", true },
- { "gamingterritory.com", true },
- { "gamingtilltheend.cf", true },
- { "gamingx.tk", true },
- { "gamingzoneservers.com", true },
- { "gamishou.fr", true },
- { "gamismu.com", true },
- { "gamivo.com", true },
- { "gammaphibeta.tk", true },
- { "gampa.be", true },
- { "ganado.org", true },
- { "ganaenergia.com", true },
- { "ganaenergia.es", true },
- { "ganapati.fr", true },
- { "ganasoku.net", true },
- { "gancedo.com.es", true },
- { "gandalfservice.com", true },
- { "gandalfthefeline.com", true },
- { "gandgliquors.com", true },
- { "ganggalbichler.at", true },
- { "ganodermatiendaonline.com", true },
- { "ganpris.online", true },
- { "gansleit.com", false },
- { "gantt-chart.com", true },
- { "ganzgraph.de", true },
- { "ganztagplus.de", true },
- { "gao.ci", true },
- { "gao.rocks", true },
- { "gaodebo.com", true },
- { "gaos.org", true },
- { "gaozj.com", true },
- { "gapdirect.com", true },
- { "gapfa.org", false },
- { "gaphag.ddns.net", true },
- { "garage-leone.com", false },
- { "garagedejan.ch", true },
- { "garagedoorrepaircedarhilltx.com", true },
- { "garagedoorrepairingsanjose.com", true },
- { "garageenginuity.com", true },
- { "garagegoossens.be", true },
- { "garagesmart.com.au", true },
- { "garagevanhulle-used.be", false },
- { "garanteasy.com", true },
- { "garazskapuszereles.hu", true },
- { "garbomuffin.com", true },
- { "garbott.co.uk", true },
- { "garcia-franco.com", true },
- { "garciagerman.com", true },
- { "garda-see.mobi", true },
- { "gardedenfantspourtous.fr", true },
- { "garden4less.co.uk", true },
- { "gardengameshireuk.com", true },
- { "gardeningdirect.co.uk", true },
- { "gardensandgifts.com", true },
- { "gardensquaredental.co.uk", true },
- { "gardenstate.tech", true },
- { "gardikagigih.com", true },
- { "gardis.ua", true },
- { "garduri-electrice-animale.ro", true },
- { "garethbowker.com", true },
- { "garethkirk.com", true },
- { "garethrhugh.es", true },
- { "gargazon.net", true },
- { "garnuchbau.de", true },
- { "garonna.com.ua", true },
- { "garotos.gq", true },
- { "garron.net", true },
- { "garrowmediallc.com", true },
- { "garsio.com", true },
- { "gartenbaur.de", true },
- { "gartenplanung-brendes.de", true },
- { "garwoh.de", true },
- { "garycarmell.com", true },
- { "garycwaite.com", true },
- { "garyjones.co.uk", true },
- { "garyrh.com", true },
- { "garystallman.com", true },
- { "garyswine.com", true },
- { "garywhittington.com", true },
- { "gashalot.com", true },
- { "gasinstallationsjohannesburg.co.za", true },
- { "gaspapp.com", true },
- { "gastauftritt.net", true },
- { "gastoudererenda.nl", true },
- { "gastrobox.com.co", true },
- { "gastromedicalcenter.com.br", true },
- { "gastronom.ga", true },
- { "gastrotiger.at", true },
- { "gastrotiger.de", true },
- { "gate2home.com", true },
- { "gateaucreation.fr", true },
- { "gatekiller.co.uk", true },
- { "gatewaybridal.com", true },
- { "gatewayclub.com.au", true },
- { "gathegi.ga", true },
- { "gathermycrew.org.au", true },
- { "gathu.co.ke", true },
- { "gauche.com", true },
- { "gaudeamus-folklor.cz", true },
- { "gaudere.co.jp", true },
- { "gaussianwaves.com", true },
- { "gauthier.dk", true },
- { "gavin.sh", true },
- { "gavlix.se", true },
- { "gavr.me", true },
- { "gavr.space", true },
- { "gavr.xyz", true },
- { "gaw.sh", true },
- { "gay-personal-ads.com", true },
- { "gay-sissies.com", true },
- { "gaya-sa.org", true },
- { "gayauthors.org", true },
- { "gaycc.cc", true },
- { "gaymerconnect.net", true },
- { "gaymerx.com", true },
- { "gaymerx.net", true },
- { "gaymerx.org", true },
- { "gaypirateassassins.com", true },
- { "gaysexpositions.guide", true },
- { "gaytorrent.ru", true },
- { "gayukai.net", true },
- { "gazellegames.net", true },
- { "gazete.org", true },
- { "gazette.govt.nz", true },
- { "gazizov.tk", true },
- { "gb-repair.com", true },
- { "gboys.net", false },
- { "gbs-uk.com", true },
- { "gbthatcher.com", true },
- { "gc-mc.de", true },
- { "gc.de", true },
- { "gc.gy", true },
- { "gc.ru.net", true },
- { "gcbit.dk", true },
- { "gcfadvisors.com", true },
- { "gchc.com", true },
- { "gchq.lol", true },
- { "gcode.space", true },
- { "gcoded.de", true },
- { "gcs-ventures.com", true },
- { "gcsepod.com", true },
- { "gd88.cc", true },
- { "gda.fr", true },
- { "gdb-tutorial.net", true },
- { "gdesemena.ru", true },
- { "gdgrzeszow.pl", true },
- { "gdiary.net", true },
- { "gdngs.de", true },
- { "gdoce.es", false },
- { "gdpr-pohotovost.cz", true },
- { "gdpr.fr", true },
- { "gdraco.com", true },
- { "gdv.me", true },
- { "gdz-spishy.com", true },
- { "ge3k.net", false },
- { "gealot.com", true },
- { "gear4you.shop", true },
- { "gearallnews.com", true },
- { "gearbot.rocks", true },
- { "gearboxhero.com", true },
- { "gearfinder.nl", true },
- { "gearset.com", true },
- { "gearwise.se", true },
- { "geaskb.nl", true },
- { "geba-online.de", true },
- { "gebaeudebilanzierung.de", true },
- { "gebn.co.uk", true },
- { "gebn.uk", true },
- { "geboortestoeltje.com", true },
- { "geborgen-wachsen.de", true },
- { "gebruikershandleiding.com", true },
- { "gecem.org", true },
- { "gechr.io", true },
- { "geckler-ee.de", false },
- { "geder.at", true },
- { "gedlingcastlehire.co.uk", true },
- { "gedlingtherapy.co.uk", true },
- { "geecrat.com", true },
- { "geek-hub.de", true },
- { "geek.ch", true },
- { "geekabit.nl", true },
- { "geekandi.com", true },
- { "geekariom.com", true },
- { "geekbundle.org", true },
- { "geekclubbooks.com", true },
- { "geekeries.org", true },
- { "geeklair.net", true },
- { "geeklan.co.uk", true },
- { "geekles.net", true },
- { "geekobyte.com", true },
- { "geekpad.com", true },
- { "geeks.berlin", true },
- { "geeks.one", false },
- { "geeksandthecity.fr", true },
- { "geekshirts.cz", true },
- { "geekstreet.fr", true },
- { "geektier.com", true },
- { "geektopia.es", true },
- { "geekwhack.org", true },
- { "geekwithabudget.com", true },
- { "geekwu.org", true },
- { "geekyquiz.com", true },
- { "geekz.sk", true },
- { "geekzone.co.nz", true },
- { "geekzone.fr", true },
- { "geeq.ch", true },
- { "geerdsen.net", true },
- { "geertdegraaf.nl", true },
- { "geertswei.nl", true },
- { "gefolge.org", true },
- { "gegeco.ch", false },
- { "geh.li", true },
- { "gehas-wein-shop.de", false },
- { "gehatrans.de", true },
- { "gehirn.co.jp", true },
- { "gehirn.jp", true },
- { "gehopft.de", true },
- { "gehreslaw.com", true },
- { "gehrke.cloud", true },
- { "gehrke.in", true },
- { "gehsicht.de", true },
- { "geico.com", true },
- { "geigenbauer.in", false },
- { "geiser-family.ch", true },
- { "geisser-elektronikdata.de", true },
- { "geitenijs.com", true },
- { "gelaendermanufaktur.de", true },
- { "gelb-computer.de", true },
- { "geld-im-blick.de", true },
- { "geld24.nl", true },
- { "geldimblick.de", true },
- { "geleenbeekdal.nl", true },
- { "geleia-real.com", true },
- { "gelis.ch", true },
- { "gelog-software.de", false },
- { "gelonghui.com", true },
- { "geloofindemocratie.nl", true },
- { "gelpinhos.pt", true },
- { "gelsey.com", true },
- { "geluidsstudio.com", true },
- { "geluk.io", true },
- { "gelukkigehonden.nl", true },
- { "geluleminceur.fr", true },
- { "gem-info.fr", true },
- { "gemails.eu", true },
- { "gemeentestein.nl", true },
- { "gemeinderatswahl2020.de", true },
- { "gemeinsam-ideen-verwirklichen.de", true },
- { "gemelen.net", true },
- { "gemonite.com", true },
- { "gemquery.com", true },
- { "gemstn.com", true },
- { "gemstonz.org", true },
- { "genbars.jp", true },
- { "genbright.com", true },
- { "genchev.io", true },
- { "gencmedya.com", true },
- { "gender-summit.com", true },
- { "genderidentiteit.nl", true },
- { "gendrin.com", true },
- { "gendundrupa.ch", true },
- { "gene-drive.com", true },
- { "gene-drives.com", true },
- { "genealogiegazet.nl", true },
- { "genealogieonline.nl", true },
- { "genealogiewerkbalk.nl", true },
- { "genealorand.com", true },
- { "geneau.net", true },
- { "genehightower.com", true },
- { "genehome.com.au", true },
- { "genemon.at", true },
- { "genen.ga", true },
- { "generador-electrico.com", true },
- { "general-anaesthesia.com", true },
- { "general-anaesthetics.com", true },
- { "general-anesthesia.com", true },
- { "general-plast.com", true },
- { "generalinsuranceservices.com", true },
- { "generationr.nl", true },
- { "generator.creditcard", true },
- { "generic.cx", true },
- { "genericdevelopment.nl", true },
- { "generujdata.cz", true },
- { "genesiseureka.com", true },
- { "genesismachina.ca", true },
- { "genesistrading.com", true },
- { "genesysmi.com", true },
- { "genetargetsolutions.com.au", true },
- { "genetidyne.com", true },
- { "genevachauffeur.com", true },
- { "geneve-naturisme.ch", false },
- { "genevoise-entretien.ch", true },
- { "genfaerd.dk", true },
- { "genioideal.com", true },
- { "geniush.ovh", true },
- { "geniushost.in", true },
- { "geniusteacher.in", true },
- { "gennerator.com", true },
- { "genocidediary.org", true },
- { "genodeftest.de", true },
- { "genome.gov", false },
- { "genomedia.jp", true },
- { "genomequestlive.com", true },
- { "genometrik.de", true },
- { "genosse-einhorn.de", true },
- { "genossenwiese.ch", true },
- { "genoveve.de", true },
- { "gensend.com", true },
- { "gensenwedding.jp", true },
- { "genshiken-itb.org", true },
- { "gensicke.de", true },
- { "genslerapps.com", true },
- { "genslerwisp.com", true },
- { "gensokyo.re", true },
- { "gensonline.eu", true },
- { "gentapps.com", true },
- { "gentcdn.com", true },
- { "gentledance.ch", true },
- { "gentledance.net", true },
- { "gentlemens-life.de", true },
- { "gentlent.co", true },
- { "gentlent.com", true },
- { "gentlent.info", true },
- { "gentlent.net", true },
- { "gentlent.org", true },
- { "gentlent.us", true },
- { "gentlentapis.com", true },
- { "gentoo-blog.de", true },
- { "gentz.rocks", true },
- { "genunlimited.tk", true },
- { "genusshotel-riegersburg.at", true },
- { "genxnotes.com", true },
- { "geocar.com", true },
- { "geocompass.at", true },
- { "geoffnussmd.com", true },
- { "geoffsec.org", true },
- { "geofox.org", true },
- { "geography-schools.com", true },
- { "geohoney.com", true },
- { "geoip.fedoraproject.org", true },
- { "geoip.stg.fedoraproject.org", true },
- { "geojs.io", true },
- { "geology-schools.com", true },
- { "geomac.gov", true },
- { "geometra.roma.it", true },
- { "geometra24.it", true },
- { "geomonkeys.com", true },
- { "geoponika.gr", true },
- { "geoport.al", true },
- { "georadar-algerie.com", true },
- { "george-brighton.co.uk", true },
- { "george-orwell.com", true },
- { "georgebeverlysheamemorial.org", true },
- { "georgeblack.me", true },
- { "georgebrighton.co.uk", true },
- { "georgecolgrove.com", true },
- { "georgekaraoglanis.tk", true },
- { "georgemaschke.net", true },
- { "georgepancescu.ro", true },
- { "georgesand.be", true },
- { "georgewatson.me", true },
- { "georgewbushlibrary.gov", true },
- { "georgiaautoglass.net", true },
- { "georgiadance.com", true },
- { "georgiaglassrepair.com", true },
- { "georgiastuartyoga.co.uk", false },
- { "georgiaurologist.com", true },
- { "georgioskontaxis.com", true },
- { "georgioskontaxis.net", true },
- { "georgioskontaxis.org", true },
- { "georgmayer.eu", true },
- { "geoscope.ch", false },
- { "gepgroup.gr", true },
- { "gepps.de", true },
- { "geraintwhite.co.uk", true },
- { "gerald-zojer.com", true },
- { "geraldoazevedo.com.br", true },
- { "geraldsonrealty.com", true },
- { "gerardinden.nl", true },
- { "gerardozamudio.mx", true },
- { "gerbang-singkolo.ga", true },
- { "gerbyte.co.uk", true },
- { "gerbyte.com", true },
- { "geri.be", true },
- { "gerinet.pl", true },
- { "germandarknes.net", true },
- { "germanicvs.tk", true },
- { "germanmasterpainters.nz", true },
- { "germanssky.de", true },
- { "germantrip.tk", true },
- { "germanytravel.ga", true },
- { "germanytravelguide.ml", true },
- { "germfr.ee", true },
- { "germistonplumber24-7.co.za", true },
- { "germistonrubbleremovals.co.za", true },
- { "gernert-server.de", true },
- { "gero.io", true },
- { "geroiplavska.tk", true },
- { "gerritcodereview.com", true },
- { "gervais-avocat.fr", true },
- { "gerwinvanderkamp.nl", true },
- { "ges-bo.de", true },
- { "gesamenvat.nl", true },
- { "geschaeftsideen-ebook.de", true },
- { "geschichtscheck.de", true },
- { "geschmacksache.online", true },
- { "geschwinder.net", true },
- { "gesditel.es", false },
- { "geseduc.cl", true },
- { "gesevi.com", true },
- { "gesica.cloud", true },
- { "gesmav-trier.de", true },
- { "gesnex.com", true },
- { "gessettirotti.it", true },
- { "gestionadministrativevirtuelle.ca", true },
- { "gestionadministrativevirtuelle.ch", true },
- { "gestionadministrativevirtuelle.com", true },
- { "gestionrocamar.es", true },
- { "gestlifes.com", true },
- { "gestormensajeria.com", true },
- { "gestsal.com", true },
- { "gestus.co", true },
- { "gesundheitmassage.com", true },
- { "gesundheitswelt24.de", true },
- { "get-baaam.com", true },
- { "get-california-real-estate.com", true },
- { "get-erp.ru", true },
- { "get-it-live.com", true },
- { "get-it-live.de", true },
- { "get-maurice.com", true },
- { "get-on.bid", true },
- { "get-quick-bits-fast-2018.pw", true },
- { "get.how", true },
- { "get2getha.org", true },
- { "getacrane.co.uk", true },
- { "getalitools.ru", true },
- { "getbookked.com", true },
- { "getbooks.co.il", true },
- { "getboubou.com", true },
- { "getbox.me", true },
- { "getbreadcrumbs.com", true },
- { "getbrowink.com", true },
- { "getbutterfly.com", true },
- { "getcalc.com", true },
- { "getcard.cc", true },
- { "getcertified.pro", true },
- { "getcheapinsurancenow.info", true },
- { "getcloak.com", false },
- { "getcreditscore.com.au", true },
- { "getdash.io", true },
- { "getdeveloper.de", true },
- { "getdownon.it", true },
- { "geteduroam.no", true },
- { "geterp.ru", true },
- { "geteventbox.com", true },
- { "getfedora.org", true },
- { "getfirstalert.com", true },
- { "getflorence.co.uk", true },
- { "getgeek.es", true },
- { "getgeek.se", true },
- { "gethome.ru", true },
- { "gethow.org", true },
- { "gethttpsforfree.com", true },
- { "getidmcc.com", true },
- { "getimgs.com", true },
- { "getinphase.com", true },
- { "getintopc.com", true },
- { "getintra.org", true },
- { "getitlive.de", true },
- { "getjms.com", true },
- { "getlawyered.com.au", true },
- { "getmango.com", true },
- { "getmdl.io", true },
- { "getmerch.eu", true },
- { "getmonero.cz", true },
- { "getmovil.com", true },
- { "getnib.com", true },
- { "getnikola.com", true },
- { "getonyx.com", true },
- { "getpagespeed.com", true },
- { "getpaidclub.tk", true },
- { "getpanelapp.com", true },
- { "getpei.com", true },
- { "getpromo.cf", true },
- { "getpublii.com", true },
- { "getrambling.com", true },
- { "getsecure.nl", true },
- { "getsensibill.com", true },
- { "getsetbounce.co.uk", true },
- { "getsmartaboutdrugs.gov", false },
- { "getsport.mobi", true },
- { "getteamninja.com", true },
- { "getthefriendsyouwant.com", true },
- { "getthejob.pt", true },
- { "getticker.com", true },
- { "gettok.com", true },
- { "gettopquality.com", true },
- { "getupandbounce.co.uk", true },
- { "getvdownloader.com", true },
- { "getwemap.com", true },
- { "getwhelp.com", true },
- { "getwisdom.io", true },
- { "getwork.tk", true },
- { "getyour.nz", true },
- { "getyourlifestraight.com", true },
- { "geus-okna.eu", true },
- { "gevelreinigingtiel.nl", true },
- { "gevme.com", true },
- { "geyduschek.be", true },
- { "gezinnenhilton.com", true },
- { "gezondetips.nl", true },
- { "gezondheidszorg-ict.nl", true },
- { "gezondheidszorg-it.nl", true },
- { "gf-franken.de", true },
- { "gf5fcalc.com", true },
- { "gfac.ru", true },
- { "gfahnen.de", true },
- { "gfast.ru", true },
- { "gfcleisure.co.uk", true },
- { "gfe.li", true },
- { "gfedating.com", true },
- { "gfelite.de", true },
- { "gfestival.fo", true },
- { "gfk-kunststoff-luebben.de", true },
- { "gflame.de", true },
- { "gforce.ninja", true },
- { "gfoss.eu", true },
- { "gfourmis.co", true },
- { "gfronline.tk", true },
- { "gfw.moe", true },
- { "gfw.ro", true },
- { "gfxbench.com", true },
- { "gfxworld.tk", true },
- { "ggbet.me", true },
- { "ggdcpt.com", true },
- { "gginin.today", true },
- { "ggismo.com", true },
- { "ggiveilig.nl", true },
- { "ggl-luzern.ch", false },
- { "ggma.co.uk", true },
- { "ggmmontascale.it", true },
- { "ggp2.com", true },
- { "ggs-marschallstrasse.de", true },
- { "ggs.jp", true },
- { "ggservers.com", true },
- { "ggx.us", true },
- { "gh-sandanski.com", true },
- { "ghaglund.se", true },
- { "ghcpl.in", true },
- { "gheestore.in", true },
- { "ghettonetflix.de", true },
- { "ghfip.com.au", true },
- { "ghini.com", true },
- { "ghislainphu.fr", true },
- { "ghostcir.com", true },
- { "ghostpin.ga", true },
- { "ghowell.io", true },
- { "ghull.email", true },
- { "ghuntley.com", false },
- { "giac.net", true },
- { "giac.org", true },
- { "giacchettaauto.it", true },
- { "giacomopelagatti.it", true },
- { "giakki.eu", false },
- { "giancarlomarino.com", true },
- { "giannademartini.com", true },
- { "gianproperties.com", true },
- { "giant-panda.com", true },
- { "giant-tortoise.com", true },
- { "gianttree.de", true },
- { "giaoxudongtri.com", true },
- { "giaphaco.com", true },
- { "giardinaggio.milano.it", true },
- { "giardinaggio.napoli.it", true },
- { "giardinaggio.roma.it", true },
- { "giardiniblog.it", true },
- { "giardiniere.bologna.it", true },
- { "giardiniere.milano.it", true },
- { "giardiniere.roma.it", true },
- { "giardinoperfetto.com", true },
- { "gichigamigames.com", true },
- { "giebel.it", true },
- { "gielectrical.com.au", true },
- { "giemall.com", true },
- { "gierds.de", true },
- { "gieschke.de", true },
- { "giethoorn.com", true },
- { "gietvloer-wand.nl", true },
- { "gietvloergarant.nl", false },
- { "gifino.fr", true },
- { "giftcard.net", true },
- { "giftedconsortium.com", true },
- { "giftking.nl", false },
- { "giftlist.guru", true },
- { "giftofsquare.net", true },
- { "giftofsquare.org", true },
- { "gifts365.co.uk", true },
- { "giftsofsquare.com", true },
- { "giftsofsquare.net", true },
- { "giftsofsquare.org", true },
- { "giftya.com", true },
- { "gifudodo.com", true },
- { "gig-raiffeisen.de", true },
- { "giga.nl", true },
- { "gigabitz.pw", true },
- { "gigantism.com", true },
- { "gigasoft.tk", true },
- { "gigawattz.com", true },
- { "giggletotz.co.uk", true },
- { "gigin.eu", true },
- { "gigin.me", true },
- { "gigis-pizzeria.de", true },
- { "gigis.cloud", true },
- { "giglink.club", true },
- { "gigolodavid.be", true },
- { "gigs.guide", true },
- { "gigseekr.com", true },
- { "gijsbertus.com", true },
- { "gijswesterman.nl", true },
- { "gikovatelojavirtual.com.br", true },
- { "gileadpac.com", true },
- { "giliamor.com", true },
- { "gillfamily.de", true },
- { "gillmanandsoame.co.uk", true },
- { "gillyscastles.co.uk", true },
- { "gilnet.be", false },
- { "gim-app.tk", true },
- { "gimme.money", true },
- { "gimnazjum-miloslaw.tk", true },
- { "gina-architektur.design", true },
- { "ginabaum.com", true },
- { "ginen.xyz", true },
- { "gingersutton.com", true },
- { "ginionusedcars.be", false },
- { "ginja.co.th", true },
- { "ginnasterling.com", true },
- { "ginnegappen.nl", true },
- { "ginniemae.gov", true },
- { "gino-gelati.de", true },
- { "ginza-luce.net", true },
- { "ginza-viola.com", true },
- { "ginzadelunch.jp", true },
- { "ginzaj.com", true },
- { "gioielleriamolena.com", true },
- { "giordano.com", true },
- { "giovannarossi.tk", true },
- { "gipelpsb.fr", true },
- { "gipfelbuch.gr", true },
- { "gippert-klein.de", true },
- { "giraffeduck.com", true },
- { "giraffenland.de", true },
- { "giraffes.org", true },
- { "giri.co", true },
- { "girlan.net", true },
- { "girlinthetiara.com", true },
- { "girlsforum.com", true },
- { "girlz.jp", true },
- { "girsa.org", true },
- { "girvas.ru", true },
- { "gisac.org", true },
- { "gisauto.ru", true },
- { "gisher.news", true },
- { "gisher.org", true },
- { "gisher.video", true },
- { "gishiko.net", true },
- { "gistr.io", true },
- { "git.ac.cn", true },
- { "git.market", false },
- { "git.sb", true },
- { "git.tt", true },
- { "gitecolombedesbois.com", true },
- { "gitep.org.uk", true },
- { "gites-alizea.com", true },
- { "gitesdeshautescourennes.com", true },
- { "github.com", true },
- { "githubapp.com", true },
- { "githubber.com", true },
- { "githubber.tv", true },
- { "gitla.in", true },
- { "gittigidiyor.com", true },
- { "gittr.ch", true },
- { "gitube.cn", true },
- { "giuem.com", true },
- { "giunchi.net", true },
- { "giuseppemacario.men", true },
- { "givastar.com", true },
- { "give.net", true },
- { "give2charity.co", true },
- { "give2charityapp.com", true },
- { "giveamericahope.org", true },
- { "giveasquare.com", true },
- { "giveasquare.net", true },
- { "giveasquare.org", true },
- { "giveattheoffice.org", false },
- { "giveaways.ph", true },
- { "givemylife.gq", true },
- { "given2.com", true },
- { "givepenny.com", true },
- { "givingnexus.org", false },
- { "givingtools.com", true },
- { "gixtools.com", true },
- { "gixtools.net", true },
- { "gizmo.ovh", true },
- { "gj-bochum.de", true },
- { "gjcampbell.co.uk", true },
- { "gjengset.com", true },
- { "gjspunk.de", false },
- { "gkasper.de", true },
- { "gkb2020.ch", true },
- { "gkoenig-innenausbau.de", true },
- { "gkralik.eu", true },
- { "gkstyle.net", true },
- { "gku-winterling.de", true },
- { "gkv-gorinchem.nl", true },
- { "gl.search.yahoo.com", false },
- { "glaciernursery.com", true },
- { "gladdy.uk", true },
- { "gladdymedia.co.uk", true },
- { "gladdymedia.com", true },
- { "gladdymedia.uk", true },
- { "gladiac.duckdns.org", true },
- { "gladwellentertainments.co.uk", true },
- { "gladysstrickland.com", true },
- { "glahcks.com", true },
- { "glamcosmetic.ch", true },
- { "glamguru.co.il", true },
- { "glamira.de", true },
- { "glammybabes.com", true },
- { "glamour4you.de", true },
- { "glamourdaze.com", true },
- { "glamouria.com.br", true },
- { "glamur-video.com", true },
- { "glasdon.com", true },
- { "glasen-hardt.de", true },
- { "glasfaser-im-hanseviertel.de", true },
- { "glasgestaltung.biz", true },
- { "glasner.photo", true },
- { "glass.google.com", true },
- { "glasschmuck-millefiori.de", true },
- { "glassemployees.com", true },
- { "glassexpertswa.com", true },
- { "glassochchoklad.se", true },
- { "glassrainbowtrust.org.je", true },
- { "glassrom.pw", true },
- { "glasweld.com", true },
- { "glavsudexpertiza.ru", true },
- { "glazedmag.fr", true },
- { "glcastlekings.co.uk", true },
- { "gleanview.com", true },
- { "glebov.tk", true },
- { "gleich-aluminium-shop.de", true },
- { "glenberviegolfclub.com", true },
- { "glencarbide.com", true },
- { "glendarraghbouncycastles.co.uk", true },
- { "glenhuntlyapartments.com.au", true },
- { "glenshere.com", true },
- { "glexia.com", true },
- { "glidestep.com", true },
- { "glidingshop.cz", true },
- { "glidingshop.de", true },
- { "glidingshop.eu", true },
- { "gliihc.net", true },
- { "glimhome.com", true },
- { "glit.sh", true },
- { "glitzafricafashionweek.com", true },
- { "glitzerstuecke.de", true },
- { "glixee.com", true },
- { "glk.partners", true },
- { "glloq.org", false },
- { "gloalerts.com", true },
- { "global-adult-webcams.com", true },
- { "global-monitoring.com", true },
- { "global-office.com", false },
- { "global-qanoon.gq", true },
- { "global-village.koeln", true },
- { "global1.gg", true },
- { "globalbano.com", true },
- { "globalchokepoints.org", true },
- { "globalcomix.com", true },
- { "globaleaks.org", true },
- { "globalepsilon.com", true },
- { "globalesm.com", true },
- { "globalfuture.eu", true },
- { "globalgovernancewatch.org", true },
- { "globalhealth.gov", true },
- { "globalhealthstrategiesnetwork.com", true },
- { "globalhealthstrategiesnetwork.info", true },
- { "globalhealthstrategiesnetwork.net", true },
- { "globalhealthstrategiesnetwork.org", true },
- { "globalinvestigations.co.uk", true },
- { "globalipaction.ch", true },
- { "globalisierung-fakten.de", true },
- { "globalitac.com", true },
- { "globalizationpedia.com", true },
- { "globalnewsdaily.cf", true },
- { "globalonetechnology.com", true },
- { "globalprojetores.com.br", true },
- { "globalresearchcouncil.org", true },
- { "globalresistancecorporation.com", true },
- { "globalshippinglimited.ga", true },
- { "globaltiendat.com", true },
- { "globalwitness.org", false },
- { "globalzone.tk", true },
- { "globecollege.nl", true },
- { "globelink-group.com", true },
- { "globetalent.nl", true },
- { "globologic.com", true },
- { "glocalworks.jp", true },
- { "gloeckle-gruppe.de", true },
- { "glofox.com", true },
- { "glolighting.co.za", true },
- { "gloneta.com", false },
- { "glont.net", true },
- { "gloryholefucking.com", true },
- { "glosiko.cn", true },
- { "glosiko.com", true },
- { "glosiko.com.cn", true },
- { "glosiko.net", true },
- { "glosiko.org", true },
- { "glosons.com", true },
- { "glotech.co.uk", true },
- { "glotechkitchens.co.uk", true },
- { "glotechrepairs.co.uk", true },
- { "gloucestershiregospelpartnership.org.uk", true },
- { "glovementor.com", true },
- { "glpepper.com", true },
- { "glueck-im-norden.de", true },
- { "gluecksgriff-taschen.de", true },
- { "glueckskindter.de", true },
- { "gluedtomusic.com", true },
- { "gluhov-ss.ru", true },
- { "gluit.de", true },
- { "glutenfreeandtasty.com", true },
- { "glutenfreehomemaker.com", true },
- { "glutenfreelife.co.nz", true },
- { "glutenfreevr.com", true },
- { "glyfadacoaststudio.gr", true },
- { "glykofridis.nl", true },
- { "glyptodon.com", true },
- { "glyxins.com", true },
- { "gm-net.jp", true },
- { "gm.search.yahoo.com", false },
- { "gmacedo.com", true },
- { "gmail.com", false },
- { "gmao.com", true },
- { "gmbh-kiekin.de", true },
- { "gmc.uy", true },
- { "gmcbm.net", true },
- { "gmccar.it", true },
- { "gmcd.co", true },
- { "gmdu.net", true },
- { "gmeet.at", true },
- { "gmeet.io", true },
- { "gmenhq.com", true },
- { "gmind.ovh", true },
- { "gmod.de", true },
- { "gmpark.dk", true },
- { "gmpartsdb.com", true },
- { "gmplab.com", true },
- { "gmslparking.co.uk", true },
- { "gmta.nl", true },
- { "gmtplus.co.za", true },
- { "gmuh.fr", true },
- { "gmw-ingenieurbuero.de", true },
- { "gmx.at", true },
- { "gmx.ch", true },
- { "gmx.co.uk", true },
- { "gmx.com", true },
- { "gmx.de", true },
- { "gmx.es", true },
- { "gmx.fr", true },
- { "gmx.net", true },
- { "gn00.com", true },
- { "gnax.jp", false },
- { "gnetwork.eu", true },
- { "gnezdo.tk", true },
- { "gnfrazier.me", true },
- { "gnilebein.de", true },
- { "gnk.io", true },
- { "gnmlive.com", true },
- { "gnucashtoqif.us", true },
- { "gnylf.com", true },
- { "go-away.xyz", true },
- { "go-datasecurity.de", true },
- { "go-dutch.eu", true },
- { "go-embedded.de", true },
- { "go-girlonly.shop", true },
- { "go-indochine.com", true },
- { "go-kuwait.tk", true },
- { "go-life.com.tw", true },
- { "go-mail.me", true },
- { "go-propiedades.cl", true },
- { "go-srx.tk", true },
- { "go-wild.co.uk", true },
- { "go-zh.org", true },
- { "go.exchange", true },
- { "go.microsoft.com", true },
- { "go2archive.nl", true },
- { "go2people-websites.nl", true },
- { "go2ubl.nl", true },
- { "go6.si", true },
- { "go6lab.si", true },
- { "go889w.com", true },
- { "goalbookapp.com", true },
- { "goanalyse.co.uk", true },
- { "goand.run", true },
- { "goarmy.eu", true },
- { "goatcloud.com", true },
- { "goaudits.com", true },
- { "gobarrelroll.com", true },
- { "gobiz.com.my", true },
- { "goblackcat.com", true },
- { "gobouncy.co.uk", true },
- { "gobouncy.com", true },
- { "gobytedesign.co.uk", true },
- { "goc4wraps.com", true },
- { "gocardless.com", true },
- { "gocher.me", true },
- { "gochu.se", true },
- { "gocleanerslondon.co.uk", true },
- { "god-clan.hu", true },
- { "god-esb.com", true },
- { "godall.tk", true },
- { "godan.tech", true },
- { "godattributes.com", true },
- { "godaxen.tv", true },
- { "godbo9.cc", true },
- { "godbo9.net", true },
- { "godclan.hu", true },
- { "goddard.id.au", true },
- { "goddg.com", true },
- { "godesb.com", true },
- { "godesigner.ru", true },
- { "godruoyi.com", true },
- { "godsofhell.com", true },
- { "godsofhell.de", true },
- { "goeb.eu", true },
- { "goeb.org", true },
- { "goededoelkerstkaarten.nl", true },
- { "goedverzekerd.net", true },
- { "goehler-baumpflege.de", true },
- { "goemail.me", true },
- { "goerres2014.de", true },
- { "goetemp.de", true },
- { "goettinger-biergarten.de", true },
- { "goettinger-katzenschutz.de", true },
- { "goetzinger-web.de", true },
- { "goffrie.com", true },
- { "goflo.net", true },
- { "gofoiayourself.org", true },
- { "gogle-analytics.com", true },
- { "gogleapis.com", true },
- { "gogoodyear.eu", true },
- { "gogroopie.com", true },
- { "gogroopie.ie", true },
- { "gogrow.com", true },
- { "gogs.ca", true },
- { "gogsat.com", true },
- { "gohon.org", true },
- { "goingreen.com.au", true },
- { "gokhana.com", true },
- { "gokhankesici.com", true },
- { "gokmenguresci.com", true },
- { "golang.org", true },
- { "golang.zone", true },
- { "golangnews.com", true },
- { "goldandgopher.com", true },
- { "goldclubcasino.com", true },
- { "goldcoast-plumbing.com.au", true },
- { "goldcoastasian.com", true },
- { "goldcoasthypnotherapyhypnosis.com.au", true },
- { "goldcoastphotographycourses.com", true },
- { "goldcoaststumpbusters.com", true },
- { "golden-kamuy.com", true },
- { "goldenage.tk", true },
- { "goldendawnapersonalaffair.com", true },
- { "goldenhillsoftware.com", true },
- { "goldenhost.ca", true },
- { "goldenhostmyanmar.com", true },
- { "goldenplate.com.sg", true },
- { "goldenqueenbee.com", true },
- { "goldenruleemail.com", true },
- { "goldenyacca.co.uk", true },
- { "goldfmromania.ro", true },
- { "goldmark.com.au", false },
- { "goldpreisfinder.at", true },
- { "goldsecurity.com", true },
- { "goldships.com", true },
- { "goldsilver.org.ua", true },
- { "goldskysecurity.com", true },
- { "goldstein.tel", true },
- { "goldsteinlawgroup.com", true },
- { "goldytechspecialists.com", true },
- { "golf18network.com", true },
- { "golf18staging.com", true },
- { "golfhausmallorca.com", true },
- { "golfscape.com", true },
- { "golighthouse.com", true },
- { "golik.net.pl", false },
- { "golnet.hu", true },
- { "golosok.ml", true },
- { "golser-schuh.at", true },
- { "golser.info", true },
- { "golsportsoccer.com", true },
- { "golvlyftarna.se", true },
- { "gomasy.jp", true },
- { "gomasy.net", true },
- { "gomedium.com", true },
- { "gomel.chat", true },
- { "gomel.city", true },
- { "gomelchat.com", true },
- { "gomelphoto.com", true },
- { "gommista.roma.it", true },
- { "gomu.ca", true },
- { "gon45.com", true },
- { "gondelvaartdwarsgracht.nl", true },
- { "gondola-parkinson.com", true },
- { "gongjianwei.com", true },
- { "gongjuhao.com", true },
- { "gonumbers.ru", true },
- { "gonx.dk", false },
- { "goo.gl", false },
- { "gooby.co", false },
- { "gooch.io", true },
- { "good-tips.pro", true },
- { "gooday.life", true },
- { "goodcreds.com", true },
- { "goodfor.us", true },
- { "goodgame.lt", true },
- { "goodhealthtv.com", true },
- { "goodiesoft.hu", true },
- { "goodmood.co.uk", true },
- { "goodmood.fr", true },
- { "goodmoodsocken.de", true },
- { "goodquote.gq", false },
- { "goodshepherdmv.com", true },
- { "goodsleep.pet", true },
- { "goodth.ink", true },
- { "goodtrip.kr", true },
- { "goodvibesblog.com", true },
- { "google", true },
- { "google-analytics.com", true },
- { "googleandroid.cz", true },
- { "googlehits.com", true },
- { "googlemail.com", false },
- { "googlepinyin.com", true },
- { "googleplex.com", true },
- { "googleshortcuts.org", true },
- { "googlesource.com", true },
- { "goolnk.com", true },
- { "goombi.fr", true },
- { "goonersworld.co.uk", true },
- { "goonfleet.com", true },
- { "gooseberries.ch", true },
- { "gooty.ru", true },
- { "goover.de", true },
- { "goow.in", true },
- { "goozp.com", true },
- { "goparity.com", true },
- { "gopayz.com.my", true },
- { "gophoto.it", true },
- { "gopnikman.cf", true },
- { "gopostore.com", true },
- { "goproinspectiongroup.com", true },
- { "gopwhip.gov", false },
- { "goquiq.com", true },
- { "goquiqstatus.com", true },
- { "gordeijnsbouw.nl", true },
- { "gordon-reid.com", true },
- { "gordonchevy.com", true },
- { "gordonscouts.com.au", true },
- { "gordy.fr", true },
- { "gordyf.com", true },
- { "gordyforty.com", true },
- { "gorgeconnect.com", true },
- { "gorgias.me", true },
- { "gorky.media", true },
- { "gorlani.com", true },
- { "gorlani.net", true },
- { "gorn.ch", true },
- { "gornergrat-kulm.ch", true },
- { "gorodabakan.ml", true },
- { "gorodrostov.tk", true },
- { "gorpg.club", true },
- { "gosaavd.tk", true },
- { "gosccs.com", true },
- { "gosforthdentalsurgery.co.uk", true },
- { "goshawkdb.io", true },
- { "goshin-group.co.jp", true },
- { "goshow.tv", true },
- { "gosnipe.com", true },
- { "gosolockpicks.com", true },
- { "gospelites.com", true },
- { "gospelvestcination.de", true },
- { "gospicers.ca", true },
- { "gospomedley.com.ng", true },
- { "gosportweather.co.uk", true },
- { "gosq.co", true },
- { "gosq.com", true },
- { "gossiplolly.com", true },
- { "gostaffer.com", true },
- { "gostargazing.co.uk", true },
- { "gosti-dom.ga", true },
- { "gosu.pro", true },
- { "goswak.com", true },
- { "goszakupki.tk", true },
- { "got-tty.de", true },
- { "goteborgsklassikern.se", true },
- { "gotech.com.eg", false },
- { "gothamlimo.com", true },
- { "gothic.dating", true },
- { "gotirupati.com", false },
- { "gotmalk.org", false },
- { "goto.google.com", true },
- { "goto.msk.ru", true },
- { "goto.world", true },
- { "goto10.se", true },
- { "gotomi.info", false },
- { "gotowebsites.info", true },
- { "gotoxy.at", true },
- { "gotrail.fr", true },
- { "gotravel.us", true },
- { "gotscrapcar.com", true },
- { "gottcar.com", true },
- { "gottcode.org", false },
- { "goudenharynck.be", true },
- { "goudt.nl", true },
- { "gouforit.com", true },
- { "gougeaway.tk", true },
- { "gouldcooksey.com", true },
- { "goup.co", true },
- { "goup.com.tr", true },
- { "gourgouli.com", true },
- { "gourmetfestival.de", true },
- { "gourmetspalencia.com", true },
- { "gourmetvitamins.ga", true },
- { "gov.tc", true },
- { "gov.uk", false },
- { "governmentjobs.gov", true },
- { "governorhub.com", true },
- { "govisitcostarica.co.cr", true },
- { "govisitcostarica.com", true },
- { "govloans.gov", true },
- { "govtrack.us", true },
- { "govype.com", true },
- { "gow220.ru", true },
- { "gowancommunications.com", true },
- { "gowervets.co.uk", true },
- { "gowildrodeo.co.uk", true },
- { "gowin9.com", true },
- { "gowin9.net", true },
- { "gowithflo.de", true },
- { "gozaars.com", true },
- { "gozadera.es", true },
- { "gpalabs.com", true },
- { "gpcp.org", true },
- { "gpdimaranathasiantar.org", false },
- { "gpfitness.com.br", true },
- { "gpgscoins.com", true },
- { "gpl-elite.store", true },
- { "gplans.us", true },
- { "gplvilla.com", true },
- { "gpm.ltd", true },
- { "gpna.org", true },
- { "gpolanco.com", true },
- { "gprs.uk.com", true },
- { "gps-fleettracking.ga", true },
- { "gpsblackbox.com", true },
- { "gpsolarpanels.com", true },
- { "gpsvideocanada.com", true },
- { "gpswebsoft.ml", true },
- { "gpu.nu", false },
- { "gpz500s.tk", true },
- { "gqjx.fun", true },
- { "gqmstore.com.br", true },
- { "gqyyingshi.com", true },
- { "gqyys.com", true },
- { "gqyyy.cc", true },
- { "gr.search.yahoo.com", false },
- { "gr8engineer2b.com", true },
- { "gra2.com", true },
- { "grabacabpa.com", true },
- { "grabadolasermonterrey.com", true },
- { "grabatt.de", true },
- { "grace-wan.com", true },
- { "gracebaking.com", false },
- { "gracedays.org", true },
- { "gracethrufaith.com", true },
- { "gracetini.com", true },
- { "graddient.com", true },
- { "gradecam.com", false },
- { "gradienthosting.co.uk", true },
- { "gradients.com", true },
- { "gradualgram.com", true },
- { "graeber.com", true },
- { "graecum.org", true },
- { "graf-igor.ch", true },
- { "graf.re", true },
- { "grafcaps.com", true },
- { "grafe.com", true },
- { "graffen.dk", true },
- { "grafia.ink", true },
- { "graficasantana.com.br", true },
- { "grafik.gq", true },
- { "grafittikontroll.cf", true },
- { "grafmag.pl", true },
- { "grafoteka.pl", true },
- { "graft.community", true },
- { "graft.observer", true },
- { "grahamarthur.com", true },
- { "grahambaker.ca", true },
- { "grahamcarruthers.co.za", true },
- { "grahamcluley.com", true },
- { "grahamleeonline.com", true },
- { "grahamsgifts.com", true },
- { "grailians.com", true },
- { "grailify.com", true },
- { "graingert.co.uk", true },
- { "graliv.net", false },
- { "grammysgrid.com", true },
- { "grand-city38.ru", true },
- { "grand-sity.ru", true },
- { "grandcafecineac.nl", true },
- { "grandcafetwist.nl", true },
- { "grandcapital.cn", true },
- { "grandcapital.id", true },
- { "grandcapital.net", true },
- { "grandcapital.ru", true },
- { "grandcastles.co.uk", true },
- { "grandchene.ch", false },
- { "grande.coffee", true },
- { "grandeto.com", true },
- { "grandisco.tk", true },
- { "grandjunctionbrewing.com", true },
- { "grandpadusercontent.com", true },
- { "grandwailea.com", true },
- { "grandworldnghiduong.com", false },
- { "granfort.es", false },
- { "graniteind.com", true },
- { "grannyshouse.de", true },
- { "grantcooper.com", true },
- { "grantmorrison.net", true },
- { "grantpark.org", true },
- { "grantplatform.com", true },
- { "grantsmasters.com", true },
- { "grantsplatform.com", true },
- { "graonatural.com.br", true },
- { "grapee.jp", true },
- { "grapeintentions.com", true },
- { "grapevine.is", true },
- { "graph.org", true },
- { "graphcommons.com", true },
- { "graphene.software", true },
- { "grapheneos.org", true },
- { "graphic-schools.com", true },
- { "graphic-shot.com", true },
- { "graphicbuffet.co.th", true },
- { "graphobyte.com", true },
- { "grapholio.net", true },
- { "grasmark.com", true },
- { "graspingtech.com", true },
- { "grasscity.com", true },
- { "grassenberg.de", true },
- { "grasshoppervape.com", true },
- { "grasso.io", true },
- { "grassreinforcement.com.au", true },
- { "gratis.market", true },
- { "gratisgamecards.nl", true },
- { "gratisonlinespel.tk", true },
- { "gratisrollenspieltag.de", true },
- { "gratiswifivoorjegasten.nl", true },
- { "gratitudeabundancepassion.com", true },
- { "grattan.co.uk", true },
- { "graumeier.de", true },
- { "graviola.es", true },
- { "gravitascreative.net", true },
- { "gravito.nl", false },
- { "gravityformspdfextended.com", true },
- { "gravitypdf.com", true },
- { "grawe-blog.at", true },
- { "grayclub.co.il", true },
- { "grayhatter.com", true },
- { "grayiron.io", true },
- { "grayrectangle.com", true },
- { "grayson.sh", true },
- { "graz2020.com", true },
- { "grazitti.com", true },
- { "grc.com", false },
- { "greatagain.gov", true },
- { "greaterlowellpediatrics.com", true },
- { "greaterreadingyp.org", true },
- { "greatestwebsiteonearth.com", true },
- { "greatfire.org", true },
- { "greathairtransplants.com", true },
- { "greatislandarts.ca", true },
- { "greatlakeside.de", true },
- { "greatlifeinsurancegroup.com", true },
- { "greatnetsolutions.com", true },
- { "greatscott.media", true },
- { "greatskillchecks.com", true },
- { "greatwebdesign.uk", true },
- { "greboid.com", true },
- { "greek-kitchen.co", true },
- { "greek.dating", true },
- { "greekmusic.academy", true },
- { "greekplots.com", true },
- { "greeks.tk", true },
- { "green-anarchy.tk", true },
- { "green-attitude.be", true },
- { "green-aura.ru", true },
- { "green-care.nl", true },
- { "green-light.cf", true },
- { "green-light.co.nz", true },
- { "green-light.ga", true },
- { "green-light.gq", true },
- { "green-light.ml", true },
- { "green-techno.ru", true },
- { "greenaddress.it", true },
- { "greenangels.com.ua", true },
- { "greenapproach.ca", true },
- { "greencircleplantnursery.com.au", true },
- { "greencircleplantnursery.net.au", true },
- { "greendrive.tk", true },
- { "greendvorik.com.ua", true },
- { "greener.pl", true },
- { "greengates.co.uk", true },
- { "greengorych.ru", true },
- { "greenhats.de", true },
- { "greenliv.pl", true },
- { "greenlungs.net", true },
- { "greenmachines.com", true },
- { "greenoutdoor.dk", false },
- { "greenpanda.de", true },
- { "greenpark.uz", true },
- { "greenpartyofnewmilford.org", true },
- { "greenpathscience.com", true },
- { "greenpaws.ee", true },
- { "greenpeace-magazin.de", true },
- { "greenpeace.berlin", true },
- { "greenponik.com", true },
- { "greenroach.ru", true },
- { "greenrushdaily.com", true },
- { "greensad36.ru", true },
- { "greensborosecuritycameras.com", true },
- { "greensdictofslang.com", true },
- { "greensidevetpractice.co.uk", true },
- { "greenstreethammers.com", true },
- { "greentea.ml", true },
- { "greenteamtwente.nl", true },
- { "greenwithdecor.com", true },
- { "greenytimes.com", true },
- { "greg.red", true },
- { "gregbrimble.com", true },
- { "greger.me", true },
- { "gregmarziomedia-dev.com", true },
- { "gregmarziomedia.com", true },
- { "gregmc.ru", true },
- { "gregmilton.com", true },
- { "gregmote.com", true },
- { "gregoirow.be", false },
- { "gregorians.org", true },
- { "gregorkofler.com", true },
- { "gregory-thibault.com", true },
- { "gregorydorrifourt.fr", true },
- { "gregorykelleher.com", true },
- { "gregoryrealestategroup.com", true },
- { "gregorywiest.com", true },
- { "greice.de", true },
- { "greiner-it.de", true },
- { "greinerj.de", true },
- { "grekiskagudar.tk", true },
- { "grenadiercorps-kaarst.de", true },
- { "grenadiere-kaarst.de", true },
- { "grenadierkorps-kaarst.de", true },
- { "grenadierkorps.de", true },
- { "grendel.no", true },
- { "grenlandkiropraktor.no", true },
- { "grepmaste.rs", false },
- { "grepular.com", true },
- { "gresak.io", true },
- { "greta-birkner.de", true },
- { "grexx.today", true },
- { "greybazar.com", true },
- { "greybeards.ca", true },
- { "greymattertechs.com", true },
- { "greyrectangle.com", true },
- { "greysky.me", true },
- { "greyskymedia.com", true },
- { "greysolutions.it", true },
- { "greywizard.com", true },
- { "greywolf.cz", true },
- { "grh.am", true },
- { "gricargo.com", true },
- { "grid.studio", true },
- { "gridpack.org", true },
- { "gridtennis.net", true },
- { "griechische-pfoetchen.de", true },
- { "grieg-gaarden.no", true },
- { "grieg.no", false },
- { "griegfoundation.no", true },
- { "grieglogistics.no", true },
- { "griegshipbrokers.com", true },
- { "griegshipbrokers.no", true },
- { "griesser2.de", true },
- { "griffinsrfc.tk", true },
- { "grifomarchetti.com", true },
- { "grillen-darf-nicht-gesund-sein.de", true },
- { "grillfocused.com", true },
- { "grilllness.com", true },
- { "grillteller42.de", true },
- { "grimcalc.com", true },
- { "grimm-gastrobedarf.de", true },
- { "grimm.cz", true },
- { "grimneko.de", true },
- { "grimstveit.no", true },
- { "grinnellplanes.com", true },
- { "grinnellplans.com", true },
- { "grippe-impftermin.de", false },
- { "griswoldplumbingct.com", true },
- { "griswoldwellwaterct.com", true },
- { "gritte.ch", true },
- { "grizz.gdn", true },
- { "grizzlys.com", true },
- { "groenaquasolutions.nl", true },
- { "groentebesteld.nl", true },
- { "groepjam-usedcars.be", false },
- { "grokandtonic.com", true },
- { "grokker.com", true },
- { "groklearning.com", true },
- { "grolimur.ch", true },
- { "gronau-it-cloud-computing.de", true },
- { "grondius.com", true },
- { "groomershop.ru", false },
- { "groomscroft.co.uk", true },
- { "groomscroft.com", true },
- { "grootinadvies.nl", true },
- { "groovefetish.com", true },
- { "groovydisk.com", true },
- { "groovygoldfish.org", true },
- { "gropp.org", true },
- { "gross.business", true },
- { "grossberger-ge.org", false },
- { "grossiste-en-ligne.com", true },
- { "groszek.pl", true },
- { "groth.im", true },
- { "groth.xyz", true },
- { "grothoff.org", true },
- { "grottenthaler.eu", true },
- { "grouindev.net", true },
- { "groundengenharia.com", true },
- { "groundmc.net", true },
- { "groundsdirect.com", true },
- { "groundspan.com", true },
- { "groundthumpingmotors.com", true },
- { "groundthumpingmotors.net", true },
- { "groundthumpinmotors.com", true },
- { "groundthumpinmotors.net", true },
- { "group4layers.net", true },
- { "groupe-neurologique-nord.lu", true },
- { "groupeatrium.net", true },
- { "groupem6.fr", true },
- { "groupescr.fr", true },
- { "groupghistelinck-cars.be", false },
- { "grouphomes.com.au", false },
- { "groupme.com", true },
- { "groupramirez.com", true },
- { "groups.google.com", true },
- { "groupseslogistic.com", true },
- { "grove-archiv.de", true },
- { "growik.com", true },
- { "growingallthings.co.uk", true },
- { "growingsmiles.co.uk", true },
- { "growit.events", true },
- { "growth-rocket.com", true },
- { "growwithdaylight.co.uk", true },
- { "growy.ch", false },
- { "grrmmll.com", true },
- { "grsecurity.net", true },
- { "gruble.de", true },
- { "gruebebraeu.ch", true },
- { "gruenderlehrstuhl.de", true },
- { "gruenderwoche-dresden.de", true },
- { "gruene-im-rvr.de", true },
- { "gruene-wattenscheid.de", true },
- { "gruenes-wp.de", true },
- { "gruenprint.de", true },
- { "gruenstreifen-ev.de", true },
- { "gruhn.email", true },
- { "grumpy.fr", true },
- { "grumpygamers.com", true },
- { "grumpyseb.com", true },
- { "grundlage.com.ua", true },
- { "grundschule-mittelbuch.de", true },
- { "grunwaldzki.center", true },
- { "grunwasser.fr", true },
- { "grupdedansa.tk", true },
- { "gruper.mk", true },
- { "grupoalpi.com", true },
- { "grupoattia.com", true },
- { "grupodatco.com", true },
- { "grupog2i.com", true },
- { "grupoharbour.com", true },
- { "grupoinassa.com", true },
- { "grupomakben.com", false },
- { "grupomedlegal.com", true },
- { "grupoproabienesraices.com.mx", true },
- { "gruselgrotte.com", true },
- { "gruslic.org.mx", true },
- { "gruver.de", true },
- { "gruwa.net", true },
- { "gruzoperevozki.ml", true },
- { "grwebdesigns.gr", true },
- { "gs1pt.org", true },
- { "gs93.de", true },
- { "gsaj114.net", true },
- { "gsbolivia.com", true },
- { "gse.space", true },
- { "gsimagebank.co.uk", true },
- { "gslink.me", true },
- { "gsmsale.nl", true },
- { "gsmsecurity.net", true },
- { "gsoc.se", true },
- { "gsrc.io", true },
- { "gst.name", true },
- { "gst.priv.at", true },
- { "gt-himmel.com", true },
- { "gt-network.de", true },
- { "gta-arabs.com", true },
- { "gtacty.co", true },
- { "gtaforum.nl", true },
- { "gtagames.nl", true },
- { "gtd.cloud", true },
- { "gtdgo.com", false },
- { "gtlaun.ch", true },
- { "gtlfsonlinepay.com", true },
- { "gtmetrix.com", true },
- { "gtn-pravda.ru", true },
- { "gtoepfer.de", true },
- { "gtopala.com", true },
- { "gtopala.net", true },
- { "gtour.info", false },
- { "gtravers-basketmaker.co.uk", true },
- { "gtupgrade.eu", true },
- { "gtxmail.de", true },
- { "guadagnare.info", true },
- { "guadalgrass.com", true },
- { "guancha.org", true },
- { "guanyembadalona.org", true },
- { "guanyu.ml", true },
- { "guanzhong.ca", true },
- { "guardian360.nl", true },
- { "guardianportal.us", true },
- { "gubagoo.com", true },
- { "gubagoo.io", true },
- { "guberniya.net", true },
- { "gudini.net", true },
- { "gudrunfit.dk", true },
- { "guegan.de", true },
- { "guenthereder.at", true },
- { "guepardoinvest.com.br", true },
- { "guerard.info", true },
- { "guercioarchitecture.com", true },
- { "guerrilla.technology", true },
- { "guesthouse-namaste.com", true },
- { "guevener.de", true },
- { "gueze-ardeche.fr", true },
- { "gueze-sas.fr", true },
- { "guffr.it", true },
- { "guge.ch", true },
- { "gugs.tk", true },
- { "guhei.net", true },
- { "guhenry3.tk", true },
- { "guiacursos.online", true },
- { "guiadamassagem.site", true },
- { "guiaextra.com", true },
- { "guiaswow.com", true },
- { "guichet-entreprises.fr", true },
- { "guichet-qualifications.fr", true },
- { "guid2steamid.com", true },
- { "guidebook.co.tz", true },
- { "guideline.gov", false },
- { "guidelines.gov", false },
- { "guideo.ch", false },
- { "guidepointsecurity.com", true },
- { "guidesacademe.com", true },
- { "guidesorbetiere.com", true },
- { "guidethailande.tk", true },
- { "guidetoiceland.is", false },
- { "guilde-dissection.com", true },
- { "guildofmusicsupervisors.co.uk", true },
- { "guillaume-briand.fr", true },
- { "guillaumematheron.fr", true },
- { "guillaumeperrin.io", true },
- { "guillemaud.me", false },
- { "guillen.tk", true },
- { "guim.co.uk", true },
- { "guineapigmustach.es", true },
- { "guitarangel.tk", true },
- { "gujun-sky.com", true },
- { "gulchuk.com", true },
- { "gulcinulutuna.com", true },
- { "gulfstream.ru", true },
- { "gulleyperformancecenter.com", true },
- { "gulshankumar.net", true },
- { "gumeyamall.jp", true },
- { "gumi.ca", true },
- { "gummientchen.net", true },
- { "gun321.com", true },
- { "gunauc.net", true },
- { "gunbrig.com", true },
- { "gunerds.com.br", true },
- { "gunlukburc.net", true },
- { "gunnarhafdal.com", true },
- { "gunstatus.net", true },
- { "gununsesi.info", true },
- { "gununsesi.org", true },
- { "gunwatch.co.uk", true },
- { "gunworld.com.au", true },
- { "gunz.net", true },
- { "guodong.net", true },
- { "guogetv.com", true },
- { "guoke.com", true },
- { "guolaw.ca", true },
- { "guoliang.me", true },
- { "guozeyu.com", true },
- { "gupfen.ch", true },
- { "guphi.net", true },
- { "gurmel.ru", true },
- { "guru-naradi.cz", true },
- { "gurucomi.com", true },
- { "gurunpa.com", true },
- { "gururi.com", true },
- { "gus.host", true },
- { "gusmiller.org", true },
- { "gustaff.de", true },
- { "gut8er.com.de", true },
- { "gute-schulen-porta.de", true },
- { "gutieli.com", true },
- { "gutools.co.uk", true },
- { "gutschein-spezialist.de", true },
- { "gutscheinemagic.de", true },
- { "gutscheineplus.de", true },
- { "gutscheingeiz.de", true },
- { "guus-thijssen.nl", true },
- { "guyeskens.be", true },
- { "guyfletcher.com", true },
- { "guys-reviews.ml", true },
- { "guysauto.com", true },
- { "guytarrant.co.uk", true },
- { "guzdek.co", true },
- { "guzelforum.tk", true },
- { "guzlewski.pl", true },
- { "gv-neumann.de", true },
- { "gv-salto.nl", true },
- { "gvatas.in", true },
- { "gveh.de", true },
- { "gvi-timing.ch", false },
- { "gvitebsk.cf", true },
- { "gvitiming.ch", false },
- { "gvobgyn.ca", true },
- { "gvoetbaldagenalcides.nl", true },
- { "gvt2.com", true },
- { "gvt3.com", true },
- { "gvwgroup.cloud", true },
- { "gvwgroup.com", true },
- { "gvwparts.com", true },
- { "gw2efficiency.com", true },
- { "gw2treasures.com", true },
- { "gw2zone.net", true },
- { "gw66.cc", true },
- { "gwbet99.cc", true },
- { "gwhois.org", true },
- { "gwo24.pl", true },
- { "gwsec.co.uk", true },
- { "gwthub.com", true },
- { "gwynfryncottages.com", true },
- { "gxlrx.net", true },
- { "gxmyqy.net", true },
- { "gxpconsultora.com", true },
- { "gyas.nl", true },
- { "gycis.me", true },
- { "gymagine.ch", true },
- { "gymbunny.de", true },
- { "gymhero.me", true },
- { "gymjp.com", true },
- { "gymkirchenfeld.ch", true },
- { "gymlife.fr", true },
- { "gymnaserenens.ch", false },
- { "gymnasium-hittfeld.de", true },
- { "gymnastic.ga", true },
- { "gymnastikfitness.se", true },
- { "gymnchod.cz", true },
- { "gympap.de", true },
- { "gympass.com", true },
- { "gynaecology.co", true },
- { "gynem.de", true },
- { "gynoguide.com", true },
- { "gypsyreel.com", true },
- { "gyre.ch", false },
- { "gyrenens.ch", false },
- { "gyroscopicinvesting.com", true },
- { "gyu-raku.jp", true },
- { "gyulakerezsi.ro", true },
- { "gz-architekten.de", true },
- { "gz-benz.com", true },
- { "gz-bmw.com", true },
- { "gza.jp", true },
- { "gzom.ru", true },
- { "h-ealthy.net", true },
- { "h-jo.net", true },
- { "h-server.myfirewall.org", true },
- { "h001.ru", true },
- { "h09.eu", true },
- { "h10l.com", true },
- { "h11.io", true },
- { "h1ctf.com", true },
- { "h1z1swap.com", true },
- { "h24.org", true },
- { "h2b.me", true },
- { "h2s-design.de", true },
- { "h2ssafety.com", true },
- { "h2u.tv", true },
- { "h365.vip", false },
- { "h36533.com", true },
- { "h36594.com", true },
- { "h3artbl33d.nl", true },
- { "h3x.net", true },
- { "h3z.jp", true },
- { "h404bi.com", true },
- { "h4kl4b.rs", true },
- { "h51365.com", true },
- { "h678.top", true },
- { "h6852.com", true },
- { "h6853.com", true },
- { "h6895.com", false },
- { "h6913.com", true },
- { "h9386.com", false },
- { "ha-kunamatata.de", true },
- { "ha.com", true },
- { "ha3.eu", true },
- { "ha6.ru", true },
- { "haarigerrattenarsch.com", true },
- { "haarlemsesaxofoonschool.nl", true },
- { "haarstudiok99.nl", true },
- { "haavard.me", true },
- { "haazen.xyz", true },
- { "habarisoft.com", true },
- { "habbstars.org", true },
- { "haberer.me", true },
- { "habernet.tk", true },
- { "habitable.ga", true },
- { "habitat-domotique.fr", true },
- { "habitatetbatiment.fr", true },
- { "habr.com", true },
- { "habtium.es", true },
- { "hac2er.net", true },
- { "hacc.top", true },
- { "haccp.bergamo.it", true },
- { "haccp.milano.it", true },
- { "haccp.roma.it", true },
- { "hacertest.com", true },
- { "hacettepeteknokent.com.tr", true },
- { "hachre.de", false },
- { "hack.club", true },
- { "hackademix.net", true },
- { "hackadena.com", true },
- { "hackanders.com", true },
- { "hackattack.com", true },
- { "hackbarth.guru", true },
- { "hackbeil.name", true },
- { "hackdown.org", true },
- { "hackendoz.com", true },
- { "hackenkunjeleren.nl", true },
- { "hackenturet.dk", true },
- { "hacker.club", true },
- { "hacker.holiday", true },
- { "hacker.im", true },
- { "hacker.one", true },
- { "hacker1.com", true },
- { "hacker101.com", true },
- { "hackerchai.com", true },
- { "hackerco.com", true },
- { "hackereyes.com", true },
- { "hackerflare.com", true },
- { "hackergateway.com", true },
- { "hackernet.se", true },
- { "hackerone-ext-content.com", true },
- { "hackerone-user-content.com", true },
- { "hackerone.at", true },
- { "hackerone.blog", true },
- { "hackerone.com", true },
- { "hackerone.events", true },
- { "hackerone.live", true },
- { "hackerone.net", true },
- { "hackerone.org", true },
- { "hackgins.com", true },
- { "hackingand.coffee", false },
- { "hackingdh.com", true },
- { "hackingvision.com", true },
- { "hackintosh.eu", true },
- { "hackmd.io", true },
- { "hackmeifyoucan.site", true },
- { "hackmeimfamo.us", true },
- { "hackreone.com", true },
- { "hacksoc.co.uk", true },
- { "hackthat.tk", true },
- { "hackthissite.org", true },
- { "hacktivis.me", true },
- { "hacktober.dk", true },
- { "hackworx.com", false },
- { "hadaly.fr", true },
- { "haderecker.me", true },
- { "hadleighswimmingclub.co.uk", true },
- { "hadleyluker.com", true },
- { "hadouk.in", true },
- { "hadrons.org", true },
- { "hads0m.tech", true },
- { "hady.fr", true },
- { "haeckdesign.com", true },
- { "haefligermedia.ch", true },
- { "haehnel.xyz", true },
- { "haemka.de", true },
- { "haens.li", true },
- { "haerwu.biz", true },
- { "hafer.tech", true },
- { "haferman.net", true },
- { "haferman.org", true },
- { "hafniatimes.com", true },
- { "hag27.com", true },
- { "hagbergmedia.se", true },
- { "haggeluring.su", true },
- { "hagiati.gr", true },
- { "hagueaustralia.com.au", true },
- { "haha-raku.com", true },
- { "haha.nl", true },
- { "haiboxu.com", true },
- { "hailstorm.nl", true },
- { "haindlmuehle.eu", true },
- { "haineshilton.com", true },
- { "hair-guide.net", true },
- { "haircode.gr", true },
- { "haircrazy.com", true },
- { "haircutideas.gq", true },
- { "hairfitwolvega.nl", true },
- { "hairpins.tk", true },
- { "hairplaybychenellekay.com", false },
- { "hairraisingphotobooths.co.uk", true },
- { "haitaka.cc", true },
- { "haixihui.cn", true },
- { "hajekj.com", true },
- { "hajekj.cz", true },
- { "hajekj.net", true },
- { "haju.fi", true },
- { "haka.se", true },
- { "hakaru.org", true },
- { "hakase.pw", true },
- { "hakatabijin-mind.com", true },
- { "hake.me", true },
- { "hakimova.tk", true },
- { "hakkariradyo.tk", true },
- { "hakkasan.com", true },
- { "hakkasannightclub.com", true },
- { "halacs.hu", true },
- { "halbich.design", true },
- { "half.host", true },
- { "halfhosting.de", true },
- { "halihali.me", true },
- { "halilweb.tk", true },
- { "halilyagcioglu.tk", true },
- { "halitopuroprodutos.com.br", true },
- { "halkirkbouncycastles.co.uk", true },
- { "hallaminternet.com", true },
- { "hallcouture.com", true },
- { "hallelujahsoftware.com", true },
- { "hallhireforevents.co.uk", true },
- { "hallhuber.com", true },
- { "halliday.work", true },
- { "halligladen.de", true },
- { "hallmarkestates.ca", true },
- { "hallme.com", true },
- { "hallopstyling.com", true },
- { "halls.hu", true },
- { "hallspumpandwellservice.net", true },
- { "hallucinogen.com", true },
- { "hallucinogens.org", true },
- { "halo.fr", true },
- { "halocredit.pl", true },
- { "haltegame.com", true },
- { "halyul.com", true },
- { "hamacho-kyudo.com", true },
- { "hamali.bg", true },
- { "hamamatsu-kotsu.co.jp", true },
- { "hamarimarriage.tk", true },
- { "hambassadors.org", true },
- { "hamburg40grad.de", true },
- { "hamburgerbesteld.nl", true },
- { "hamburgobgyn.com", true },
- { "hamcocc.com", true },
- { "hamcram.io", true },
- { "hamiltonlinen.com", true },
- { "hamiltonmedical.nl", true },
- { "hamiltonweather.ca", true },
- { "hamiltonzinelibrary.cf", true },
- { "hammer-schnaps.com", true },
- { "hammer-sms.com", true },
- { "hammercast.fm", true },
- { "hammerpondkennels.co.uk", true },
- { "hampl.tv", true },
- { "hampshiretechservices.co.uk", true },
- { "hamsystems.eu", true },
- { "hamyarpet.com", true },
- { "hana-groupsac.com", true },
- { "hana.ondemand.com", true },
- { "hanakaraku.com", true },
- { "hanazono.tokyo", true },
- { "hanbing.it", true },
- { "hancocklawfl.com", true },
- { "handbrake.fr", true },
- { "handcraft.eu.org", true },
- { "handgelenkbandage-test.de", true },
- { "handknit.com.np", true },
- { "handleidingkwijt.com", true },
- { "handwerk-digital-steinfurt.de", true },
- { "handy-reparatur-berlin.com", true },
- { "handymanbypolli.com", true },
- { "handymanlondonplease.co.uk", true },
- { "handynummer-info.ch", true },
- { "handynummer.online", true },
- { "handysex.live", true },
- { "handyticket.de", true },
- { "hanfox.co.uk", false },
- { "hanfverband-erfurt.de", true },
- { "hangar.hosting", true },
- { "hangarbox.de", true },
- { "hangcapnach.com", true },
- { "hangerphant.com", true },
- { "hangout", true },
- { "hangouts.google.com", true },
- { "hangtenseo.com", true },
- { "hangw.xyz", true },
- { "hankoreas.com", true },
- { "hankr.com", true },
- { "hanksacservice.com", true },
- { "hannah.link", true },
- { "hannahi.com", true },
- { "hannasecret.de", true },
- { "hannes.paris", true },
- { "hannoluteijn.nl", true },
- { "hannover.de", true },
- { "hannywbarek.com", true },
- { "hanpenblog.com", true },
- { "hansahome.ddns.net", true },
- { "hansbijster.nl", true },
- { "hanschventures.com", true },
- { "hansen-kronshagen.de", true },
- { "hansen.hn", true },
- { "hansgoes.it", true },
- { "hansgoes.nl", true },
- { "hansgoesit.nl", true },
- { "hansminten.com", true },
- { "hansmund.com", true },
- { "hansolrella.com", true },
- { "hansonian.com", true },
- { "hansvaneijsden.com", true },
- { "hansvaneijsden.nl", true },
- { "hanteln-fitness.de", true },
- { "hantse.com", true },
- { "hanu.la", true },
- { "hanxv.pw", true },
- { "hanyibo.com", true },
- { "hanyingw.com", true },
- { "hanzubon.jp", true },
- { "hao-zhang.com", true },
- { "hao6.ag", true },
- { "hao8.ag", true },
- { "haocq3.com", true },
- { "haogoodair.ca", true },
- { "haorenka.org", true },
- { "haozhang.org", true },
- { "haozhexie.com", true },
- { "haozhuanfa.com", true },
- { "hapheemraadssingel.nl", true },
- { "haplogroup.org", true },
- { "happist.com", true },
- { "happy-life-food.de", true },
- { "happyagain.de", true },
- { "happyagain.se", true },
- { "happyandrelaxeddogs.com", true },
- { "happyandrelaxeddogs.eu", true },
- { "happybirthdaywisher.com", true },
- { "happybounce.co.uk", true },
- { "happybrush.de", true },
- { "happycarb.de", true },
- { "happychat.io", true },
- { "happychungus.tk", true },
- { "happycoder.net", true },
- { "happydoq.ch", false },
- { "happygadget.me", true },
- { "happyglacons.com", true },
- { "happyheartsabode.com", true },
- { "happykidscastles.co.uk", true },
- { "happylearning.com", true },
- { "happylifestyle.com", true },
- { "happyretail.co", true },
- { "happyteamlabs.com", true },
- { "happyukgo.com", true },
- { "hapsana.nl", true },
- { "haptemic.com", true },
- { "harabar.ml", true },
- { "harald-d.dyndns.org", true },
- { "harald-pfeiffer.de", true },
- { "haramainbd.com", true },
- { "harapecorita.com", true },
- { "harbor-light.net", true },
- { "hardcoen.com", true },
- { "hardcore-bodybuilding.nl", true },
- { "hardeman.nu", true },
- { "hardenize.com", true },
- { "hardertimes.com", true },
- { "hardfloorcleaninglondon.co.uk", true },
- { "hardforum.com", true },
- { "hardh.at", true },
- { "hardhat.io", true },
- { "hardrain980.com", true },
- { "hardrock.tk", true },
- { "hardtfrieden.de", true },
- { "hardwareschotte.de", true },
- { "harelmallac.com", true },
- { "harelmallacglobal.com", true },
- { "hargamobilmu.com", true },
- { "haribilalic.com", true },
- { "harilova.fr", true },
- { "harington.fr", true },
- { "harion.fr", true },
- { "harisht.me", false },
- { "harititan.com", true },
- { "haritsa.co.id", true },
- { "harjitbhogal.com", true },
- { "harley-davidson-live.com", true },
- { "harleyclassifieds.com", true },
- { "harmoney.co.nz", true },
- { "harmoney.com", true },
- { "harmoney.com.au", true },
- { "harmonyplace.com", true },
- { "harms.io", true },
- { "harmsboone.org", true },
- { "harnov.dk", true },
- { "haroldsharpe.com", true },
- { "harpoo.jp", false },
- { "harptechnologies.com", true },
- { "harringtonca.com", true },
- { "harrisandharris.com.au", true },
- { "harrisconsulting.ie", true },
- { "harrisonm.com", true },
- { "harrisonswebsites.com", true },
- { "harrymclaren.co.uk", true },
- { "harrysmallbones.co.uk", true },
- { "harrysqnc.co.uk", true },
- { "harschnitz.nl", false },
- { "harshee.ml", true },
- { "hartie95.de", true },
- { "hartkampforkids.nl", true },
- { "hartleighclyde.com.au", true },
- { "hartlep.email", true },
- { "hartlieb.me", true },
- { "hartzer.com", true },
- { "haruhi.org.ua", true },
- { "harukakikuchi.com", true },
- { "harukawa.moe", true },
- { "haruue.moe", true },
- { "harvarddharma.org", true },
- { "harvestapp.com", true },
- { "harvestcookrepeat.com", true },
- { "harvester.fr", true },
- { "harveyauzorst.com", true },
- { "harveyplum.com", true },
- { "harveysautoservice.net", true },
- { "has-no-email-set.de", false },
- { "has.report", true },
- { "hasandeniz.uk", true },
- { "haschrebellen.de", true },
- { "hasecuritysolutions.com", true },
- { "haselsteiner.me", true },
- { "hash-archive.org", true },
- { "hash.army", true },
- { "hash.works", true },
- { "hashcashconsultants.com", true },
- { "hashcat.net", true },
- { "hashemian.com", true },
- { "hashi.dk", true },
- { "hashiconf.com", false },
- { "hashicorp.com", false },
- { "hashimah.ca", true },
- { "hashimoto-jimusho.com", true },
- { "hashinteractive.com", true },
- { "hashish.net", true },
- { "hashiura.jp", true },
- { "hashru.nl", true },
- { "hashtagpatriot.com", true },
- { "hashworks.net", true },
- { "hashxp.org", true },
- { "hasilocke.de", true },
- { "haskett.ca", true },
- { "haskovec.com", true },
- { "hasselbach-dellwig.de", true },
- { "hasseplatslageri.se", true },
- { "hassra.org.uk", true },
- { "hastyllc.com", true },
- { "hatachan.site", true },
- { "hatarisecurity.co.ke", true },
- { "hatcher.cloud", true },
- { "hatpakha.com", true },
- { "hatter.ink", true },
- { "hatul.info", true },
- { "haucke.xyz", true },
- { "hauller.ch", true },
- { "hauntedhouserecords.co.uk", true },
- { "hauora.fyi", true },
- { "hauora.net", true },
- { "hauora.tech", true },
- { "haus-garten-test.de", true },
- { "haus-henne.de", true },
- { "haushaltsaufloesunghannover.de", true },
- { "haushenne.de", true },
- { "hausjugo.de", true },
- { "haustechnik-breu.de", true },
- { "hausundhof.com", true },
- { "hautaka.com", true },
- { "hautarztzentrum.ch", true },
- { "hauteslatitudes.com", false },
- { "havarijna-sluzba-bratislava.sk", true },
- { "havasigabor.hu", true },
- { "havasuinsurance.com", true },
- { "have.jp", true },
- { "haveabounce.co.uk", true },
- { "havedicewillsave.com", true },
- { "haveforeningen-enghaven.dk", true },
- { "havefunbiking.com", true },
- { "haveibeenpwned.com", true },
- { "havellab.de", true },
- { "havelland-obstler.de", true },
- { "havencyber.com", true },
- { "havenstrategies.com", true },
- { "havernbenefits.com", true },
- { "haverstack.com", true },
- { "havetherelationshipyouwant.com", true },
- { "hawaar.com", true },
- { "hawaiianchoice.com", true },
- { "hawaiiforbernie.com", true },
- { "hawaiioceanproject.com", true },
- { "hawaiiwho.com", true },
- { "hawickvets.co.uk", true },
- { "hawkargentina.com", true },
- { "hawkeyeinsight.com", true },
- { "hawkinsonkiaparts.com", true },
- { "hawkofgeorgia.com", true },
- { "hawkon.dk", true },
- { "hawksguild.com", true },
- { "hawksracing.de", true },
- { "hax.to", true },
- { "haxdroid.com", true },
- { "haxo.nl", false },
- { "hayai.space", true },
- { "hayashi-rin.net", true },
- { "hayden.ru", true },
- { "haydenbleasel.com", true },
- { "haydenjames.io", true },
- { "hayfordoleary.com", true },
- { "hayl.me.uk", true },
- { "haynes-davis.com", false },
- { "hayobethlehem.nl", true },
- { "hayonik.com", true },
- { "haystackrenovation.com.au", true },
- { "hayvid.com", true },
- { "haz.cat", true },
- { "hazelglow.com", true },
- { "hazelhof.nl", true },
- { "hazeltime.com", true },
- { "hazeover.com", true },
- { "hazmijardin.es", true },
- { "hb8522.com", true },
- { "hbaa.ml", true },
- { "hbcm70.fr", true },
- { "hbcu-colleges.com", true },
- { "hbelectricsolutions.com", true },
- { "hbkonsult.com", true },
- { "hboeck.de", true },
- { "hbpowell.com", true },
- { "hbudd.com", true },
- { "hbweb.io", true },
- { "hcbj.io", true },
- { "hcie.pl", false },
- { "hcscrusaders.com", true },
- { "hd-6132.com", true },
- { "hd-gaming.com", true },
- { "hd-iptv.co", true },
- { "hd-offensive.at", false },
- { "hd-only.org", true },
- { "hd-outillage.com", true },
- { "hd2132.com", true },
- { "hd5132.com", true },
- { "hd5414.com", true },
- { "hd5424.com", true },
- { "hd6132.com", true },
- { "hd7337.com", true },
- { "hdbits.org", true },
- { "hdc.cz", true },
- { "hdcenter.cc", true },
- { "hdeaves.uk", true },
- { "hdf.world", true },
- { "hdfgroup.org", true },
- { "hdguru.com", true },
- { "hdhoang.space", true },
- { "hdkandsons.com", true },
- { "hdm.io", true },
- { "hdnastudio.com", true },
- { "hdrsource.com", true },
- { "hdrtranscon.com", true },
- { "hds-lan.de", true },
- { "hdv.paris", true },
- { "hdwallpapers.net", true },
- { "he.kg", true },
- { "heaaart.com", true },
- { "head.ru", true },
- { "headforcloud.com", true },
- { "headjapan.com", true },
- { "headlinepublishing.be", true },
- { "healike.hk", true },
- { "healingourskin.com", true },
- { "health-booster.com", false },
- { "health-iq.com.au", true },
- { "health-plan-news.com", true },
- { "health.gov", true },
- { "health.graphics", true },
- { "health24world.ml", true },
- { "healthand-beautynews.net", true },
- { "healthandskinbeauty.com", true },
- { "healthcare.gov", false },
- { "healthcarereviews.tk", true },
- { "healthcaresuccess.com", true },
- { "healthcultureexpo.com", true },
- { "healthdata.gov", true },
- { "healtheffectsofasbestos.com", true },
- { "healthfinder.gov", true },
- { "healthfoam.com", true },
- { "healthgames.co.uk", true },
- { "healthiercompany.com", true },
- { "healthiergenerations.co.uk", true },
- { "healthit.gov", true },
- { "healthplansamerica.org", true },
- { "healthstar-dev.io", true },
- { "healthstar.io", true },
- { "healththoroughfare.com", true },
- { "healthworksmarden.com.au", true },
- { "healthy-map.com", true },
- { "healthyhomesofmichigan.com", true },
- { "healthypeople.gov", true },
- { "healthyspirituality.org", true },
- { "healthystyle.tk", true },
- { "healthysuperhuman.com", true },
- { "healthyteame.com", true },
- { "heapkeeper.org", true },
- { "heardcountyathletics.com", true },
- { "hearfool.cc", true },
- { "hearmeraw.uk", true },
- { "heartbeat24.de", true },
- { "heartbound.wiki", true },
- { "heartcomms.com.au", true },
- { "hearthstonehungary.hu", true },
- { "heartlandbiomed.com", true },
- { "heartmdinstitute.com", true },
- { "heartsintrueharmony.com", true },
- { "hearttruth.gov", true },
- { "heartview.com.br", true },
- { "heartwoodart.com", true },
- { "hearty.eu.org", true },
- { "hearty.me", true },
- { "hearty.sg", true },
- { "hearty.tw", true },
- { "heartycorp.com", true },
- { "heartycraft.com", true },
- { "heatershop.co.uk", true },
- { "heathersmithcommercial.com", true },
- { "heatingandairconditioningdallastx.com", true },
- { "heavensattic.co.uk", true },
- { "heavensinferno.net", true },
- { "heavyequipments.org", true },
- { "hebamme-cranio.ch", true },
- { "hebamme-ebersberg.de", true },
- { "hebbet.de", true },
- { "hebel-intern.de", true },
- { "hebikhiv.nl", true },
- { "hebingying.cn", true },
- { "hec-espace-entreprise.ch", false },
- { "hec.global", true },
- { "heckelektro.de", true },
- { "heckerundknopp.de", true },
- { "hedge.fi", true },
- { "hedgeschool.ie", true },
- { "hedonism.org", true },
- { "hedonistic-imperative.com", true },
- { "hedonistic.org", true },
- { "hedonium.com", true },
- { "hedweb.co.uk", true },
- { "hedweb.com", true },
- { "hedweb.net", true },
- { "hedweb.org", true },
- { "hedys.de", true },
- { "heello.es", true },
- { "hefengautoparts.com", true },
- { "heftkaufen.de", true },
- { "hegartymaths.com", true },
- { "hegdahl.tk", true },
- { "hegen.com.pl", false },
- { "hegen.cz", false },
- { "hegen.sk", false },
- { "hegenshop.de", true },
- { "heh.ee", true },
- { "heha.co", false },
- { "heiaheia.com", true },
- { "heid.ws", true },
- { "heiden-wir-helfen.de", true },
- { "heidisheroes.org", true },
- { "heighton.com.au", true },
- { "heightselectrical.com.au", true },
- { "heijdel.nl", true },
- { "heijmans.blog", true },
- { "heijmans.cloud", true },
- { "heijmans.email", true },
- { "heijmans.io", true },
- { "heijmans.network", true },
- { "heijmans.one", true },
- { "heijmans.pm", true },
- { "heijmans.xyz", true },
- { "heikegastmann.com", true },
- { "heikohessenkemper.de", true },
- { "heiland.io", true },
- { "heiliger-gral.info", true },
- { "heilpraxis-bgl.de", true },
- { "heimatverein-eitensheim.de", true },
- { "heimdallr.nl", true },
- { "heimonen.eu", true },
- { "heinemeier.dk", true },
- { "heinenhopman.ro", true },
- { "heino-peters.de", true },
- { "heinpost.nl", false },
- { "heinzelmann.co", true },
- { "heiraten-gardasee.de", true },
- { "heiraten-venedig.de", true },
- { "heissluft-fritteuse.com", true },
- { "heistheguy.com", true },
- { "heitepriem.info", true },
- { "heitland-it.de", true },
- { "heiwa-valve.co.jp", false },
- { "hekat.sk", true },
- { "helber-it-services.de", true },
- { "helbreath.tk", true },
- { "helden-spielen.de", true },
- { "heldenhalde.de", true },
- { "helderneves.pt", true },
- { "heldtech.services", true },
- { "heldundsexgott.de", true },
- { "heleendebruyne.be", true },
- { "helenaknowledge.com", true },
- { "helenekurtz.com", true },
- { "helenkellersimulator.org", true },
- { "helensmithpr.co.uk", true },
- { "helfordriversc.co.uk", true },
- { "helgaschultz.de", true },
- { "helichat.de", true },
- { "helifreak.club", true },
- { "helijobs.net", true },
- { "helikon.ro", true },
- { "heliosnet.com", true },
- { "heliosvoting.org", true },
- { "helix.am", true },
- { "helkyn.eu", true },
- { "helkyn.fr", true },
- { "helkyn.org", true },
- { "hell.sh", true },
- { "hella-secure.com", true },
- { "hellboundhackers.org", true },
- { "hellenicagora.co.uk", true },
- { "hellenicmusicacademy.com", true },
- { "hellerarko.de", true },
- { "hellersgas.com", true },
- { "helloacm.com", true },
- { "helloafrica.ga", true },
- { "hellobrian.me", true },
- { "hellocyber.co.uk", true },
- { "hellolocalmedia.com.au", true },
- { "hellomedian.com", true },
- { "hellomookie.com", true },
- { "hellomouse.net", true },
- { "hellosalmon.com", true },
- { "hellovillam.com", true },
- { "helloworldhost.com", false },
- { "hellsgamers.pw", true },
- { "hellsh.com", true },
- { "helm-pokale.at", true },
- { "helm-pokale.de", true },
- { "helm-trophy.com", true },
- { "help.simpletax.ca", true },
- { "help207.me", true },
- { "helpconnect.com.au", true },
- { "helpfulhealthinsurance.com", true },
- { "helpkoil.com", true },
- { "helppc.com.ua", true },
- { "helpscoutdocs.com", true },
- { "helpstarloja.com.br", true },
- { "helptasker.com", true },
- { "helptasker.net", true },
- { "helptasker.ru", true },
- { "helpwithadoption.com", true },
- { "helpwithinsomnia.org", false },
- { "helpwithmybank.gov", true },
- { "helsenorge.no", true },
- { "helseogmassasje.no", true },
- { "helsinki.dating", true },
- { "helvella.de", true },
- { "hematoonkologia.pl", true },
- { "hemdal.se", true },
- { "hemkoll.nu", true },
- { "hemnet.se", true },
- { "hemp.je", false },
- { "hems.si", true },
- { "hemtest.com", true },
- { "hen.ne.ke", true },
- { "hendric.us", false },
- { "hendrickx.be", true },
- { "hendrik.li", true },
- { "hendrinortier.nl", true },
- { "heng555.com", true },
- { "hengroenet.de", true },
- { "hengstumone.com", true },
- { "henkboelman.com", true },
- { "henke-home.eu", true },
- { "henker.net", true },
- { "henkrensing.nl", true },
- { "henkverlinde.com", false },
- { "henley-computer-repairs.co.uk", true },
- { "henleybouncycastles.co.uk", true },
- { "henlich.de", true },
- { "hennastories.com", true },
- { "hennastories.org", true },
- { "hennecke-forstbetrieb.de", true },
- { "henneke.me", true },
- { "hennes-haan.de", true },
- { "hennes-shop.de", true },
- { "hennesshop.de", true },
- { "hennies.org", true },
- { "henningkerstan.de", true },
- { "henningkerstan.org", true },
- { "hennymerkel.com", true },
- { "henrik-bondtofte.dk", true },
- { "henrikjuvonen.fi", true },
- { "henrikwelk.de", true },
- { "henrilammers.nl", true },
- { "henry.gg", true },
- { "henryocallaghan.com", true },
- { "henrysautodetail.com", true },
- { "hentaigogo.com", true },
- { "hentaipornography.com", true },
- { "hentaiz.net", true },
- { "hentamanga.tk", true },
- { "hentavfall.no", true },
- { "hentschke-bau.de", true },
- { "hentschke-betonfertigteilwerk.de", true },
- { "hentschke-invest.de", true },
- { "henzenhoning.nl", true },
- { "hepla.de", true },
- { "heppler.net", true },
- { "heptafrogs.de", true },
- { "heraldik-wiki.de", true },
- { "herba-belgie.be", true },
- { "herberichfamily.com", true },
- { "herbert.io", true },
- { "herbertjanvandinther.nl", true },
- { "herbhuang.com", true },
- { "herbolarigranvida.com", true },
- { "herbsupplements.co.uk", true },
- { "herbweb.net", true },
- { "herbweb.org", true },
- { "herd-kaufen.com", true },
- { "herds.eu", true },
- { "herdserv.de", true },
- { "herecsrymy.cz", true },
- { "heren.fashion", true },
- { "heretic-guild.com", true },
- { "hereticle.com", true },
- { "heritagebaptistchurch.com.ph", true },
- { "heritagecoffee.co.uk", true },
- { "herkam.pl", true },
- { "herkel.email", true },
- { "herkelmedia.com", true },
- { "herkelmedia.de", true },
- { "herlynlingerie.com", true },
- { "hermanbrouwer.nl", true },
- { "hermes-net.de", true },
- { "herminghaus24.de", true },
- { "hermiu.com", true },
- { "herni-kupony.cz", true },
- { "herocentral.de", true },
- { "heroco.xyz", true },
- { "herofil.es", true },
- { "herohirehq.co.uk", true },
- { "heroiclove.com", true },
- { "heroicpixel.com", true },
- { "heroku.com", true },
- { "heromuster.com", true },
- { "herpes-no.com", true },
- { "herranzramia.com", false },
- { "herrenmuehle-wein.de", true },
- { "herrfirm.com", true },
- { "herringboneeats.com", true },
- { "herringsresidence.be", true },
- { "herrkaschke.com", true },
- { "herrschaftlich-durch-dresden.de", true },
- { "herrsmith.com", true },
- { "herrtxbias.net", false },
- { "hersdorf-eifel.de", true },
- { "hertsbouncycastles.com", true },
- { "hertz.bj", true },
- { "herz-und-gemuet.de", true },
- { "herzfuersoziales.at", true },
- { "herzig.cc", true },
- { "herzogglass.com", true },
- { "herzwacht.de", true },
- { "hes.com.cy", true },
- { "hesaplama.net", true },
- { "hessen-liebe.de", true },
- { "hesslag.com", true },
- { "hestia-systeme.be", true },
- { "hestia-systeme.com", true },
- { "hestia-systeme.eu", true },
- { "hestia-systeme.fr", true },
- { "hesyifei.com", true },
- { "hetene.nl", true },
- { "hethakhout.nl", true },
- { "hethely.ch", true },
- { "hetmer.cz", true },
- { "hetushu.com", true },
- { "hetwalhalla.nl", true },
- { "heute-kaufen.de", true },
- { "heute.training", true },
- { "heutger.net", true },
- { "hevertonfreitas.com.br", true },
- { "hex.nl", true },
- { "hexagon-e.com", true },
- { "hexapt.com", true },
- { "hexcode.in", true },
- { "hexed.it", true },
- { "hexhu.net", true },
- { "hexiaohu.cn", true },
- { "hexieshe.com", true },
- { "hexo.io", false },
- { "hexony.com", true },
- { "hexr.org", true },
- { "hexsafe.io", true },
- { "hexstream.net", true },
- { "hexstream.xyz", true },
- { "hexstreamsoft.com", true },
- { "hexxagon.com", true },
- { "heyboldface.com", true },
- { "heywood.cloud", true },
- { "hf51.nl", true },
- { "hg.gg", true },
- { "hg.python.org", true },
- { "hg0086.la", true },
- { "hg661.cc", true },
- { "hgbet.com", true },
- { "hgc369.com", true },
- { "hghanbarimd.com", true },
- { "hgmaranatha.nl", true },
- { "hgpowerglue.nl", true },
- { "hguandl.com", true },
- { "hgw168.com", true },
- { "hh-medic.com", true },
- { "hh-wolke.dedyn.io", true },
- { "hhgdo.de", true },
- { "hhh1080.com", true },
- { "hhhdb.com", true },
- { "hhidr.org", true },
- { "hhl.de", true },
- { "hhmmmm.de", true },
- { "hhs.gov", true },
- { "hhtoners.com.br", true },
- { "hibari.moe", true },
- { "hiccupsandjuice.co.uk", true },
- { "hickorywinecellar.com", true },
- { "hicl.org", true },
- { "hicoria.com", true },
- { "hicts.nl", true },
- { "hiczp.com", true },
- { "hidbo.de", true },
- { "hiddenhillselectric.com", true },
- { "hiddenhillselectrical.com", true },
- { "hiddenhillselectrician.com", true },
- { "hiddenhillsexteriorlighting.com", true },
- { "hiddenhillslandscapelighting.com", true },
- { "hiddenhillslighting.com", true },
- { "hiddenhillsoutdoorlighting.com", true },
- { "hiddenimage.ml", true },
- { "hiddenmalta.net", true },
- { "hiddenpalms.tk", true },
- { "hide.me", true },
- { "hideallip.com", true },
- { "hideouswebsite.com", true },
- { "hidroshop.com.br", true },
- { "hidroshoping.com.br", true },
- { "hieisuki.ga", true },
- { "hielscher.com", true },
- { "hierer.com", true },
- { "hieu.com.au", true },
- { "hif88.com", true },
- { "hifala.de", true },
- { "hiffo.de", true },
- { "hifumi.us", true },
- { "hig.gov", true },
- { "higgstools.org", true },
- { "highair.net", true },
- { "highcorkett.com", true },
- { "highdesertroboticsurgery.com", true },
- { "highenergy.ro", true },
- { "higherpress.org", true },
- { "highinthemid80s.com", true },
- { "highkick.jp", true },
- { "highlandparkcog.org", true },
- { "highlegshop.com", true },
- { "highlevelwoodlands.com", true },
- { "highriskpay.com", true },
- { "highspeed-arnsberg.de", true },
- { "highspeedinternet.my", true },
- { "highstreethomes.com.au", true },
- { "hightechreviews.ga", true },
- { "hightimes.com", true },
- { "highwaytohoell.de", true },
- { "hiimodel.com", true },
- { "hik-cloud.com", true },
- { "hikawa.top", true },
- { "hike.pics", true },
- { "hikerone.com", true },
- { "hikikomori-sos.site", true },
- { "hikingguy.com", true },
- { "hilahdih.cz", true },
- { "hilalnews.ga", true },
- { "hilarious.ga", true },
- { "hilaryhutler.com", true },
- { "hilchenba.ch", true },
- { "hildebrand.group", true },
- { "hilden.ws", true },
- { "hiledge.com", true },
- { "hilfe-bei-krebs-vechta.de", true },
- { "hilfreiche-server.tips", true },
- { "hilhorst-uitvaartverzorging.nl", true },
- { "hillcrestswimclub.com", true },
- { "hillebrand.io", true },
- { "hillier-swift.co.uk", true },
- { "hillsandsaunders.co.uk", true },
- { "hillsandsaunders.com", true },
- { "hillsboroccpa.org", true },
- { "hillstrak.com.au", true },
- { "hillstrakwpg.com.au", true },
- { "hilltopcellar.com", true },
- { "hilnu.com", true },
- { "hiltonarubabeachservices.com", true },
- { "hiltonhylandluxurycondos.com", true },
- { "hiltonsydney.com.au", true },
- { "himalaya-masala.at", true },
- { "himecorazon.com", true },
- { "himekomi.com", true },
- { "himiku.com", true },
- { "himpler.com", true },
- { "hin10.com", true },
- { "hinaryazan.com", true },
- { "hinata-hidetoshi.com", true },
- { "hindu-temple.tk", true },
- { "hingston.org", true },
- { "hintergrundbewegung.de", true },
- { "hinterhofbu.de", true },
- { "hinterposemuckel.de", true },
- { "hiparish.org", true },
- { "hipeople.com.br", true },
- { "hipercultura.com", true },
- { "hiperusera.es", true },
- { "hipnos.net", true },
- { "hippies.com.br", true },
- { "hippomovers.com", true },
- { "hippopotamuses.org", true },
- { "hips.com", true },
- { "hipstercat.fr", false },
- { "hiqfranchise.co.uk", true },
- { "hiqhub.co.uk", false },
- { "hiqonline.co.uk", true },
- { "hirakatakoyou.org", true },
- { "hirake55.com", true },
- { "hiratake.xyz", true },
- { "hireabouncycastle.net", true },
- { "hirel.gq", true },
- { "hiresteve.ca", true },
- { "hirevets.gov", true },
- { "hirevo.eu", true },
- { "hirevue.com", true },
- { "hirezzportal.com", true },
- { "hiromuogawa.com", true },
- { "hirotaka.org", true },
- { "hisbrucker.net", true },
- { "hisgifts.com.au", true },
- { "hisnet.de", true },
- { "hispadent.com.do", true },
- { "hispania-valencia.com", true },
- { "hispanic.dating", true },
- { "hisregistries.com", true },
- { "hisregistries.net", true },
- { "hisregistries.org", true },
- { "histkult.tk", true },
- { "histoire-cite.ch", false },
- { "histoiresdecontenu.com", false },
- { "histoiresdemotos.fr", true },
- { "historia-arte.com", true },
- { "historiasdepueblo.es", true },
- { "historischhout.nl", true },
- { "history-schools.com", true },
- { "history.google.com", false },
- { "history.gov", true },
- { "hitandhealth.nl", true },
- { "hitchpin.com", true },
- { "hitechgr.eu", true },
- { "hitechnologystore.com", true },
- { "hiteco.com", true },
- { "hiteshchandwani.com", true },
- { "hitflow.fr", true },
- { "hitflow.net", true },
- { "hitfront.com", true },
- { "hithardnews.com", true },
- { "hititgunesi-tr.com", true },
- { "hitmanstat.us", true },
- { "hitn.at", true },
- { "hitoapi.cc", false },
- { "hitocom.net.br", true },
- { "hitokoto-mania.com", true },
- { "hitokoto.cn", false },
- { "hitomecha.com", true },
- { "hitrost.com", true },
- { "hitsbola.club", true },
- { "hitter-lauzon.com", true },
- { "hitter.family", true },
- { "hitterfamily.com", true },
- { "hittop.tk", true },
- { "hiv-symptome.de", true },
- { "hiv.gov", true },
- { "hivatalinfo.hu", true },
- { "hiveopolis.eu", true },
- { "hiverlune.net", true },
- { "hiwannz.com", true },
- { "hiwiki.tk", true },
- { "hiyacar.co.uk", true },
- { "hiyobi.me", true },
- { "hiyoko-shokutaku.com", true },
- { "hiyuki2578.net", false },
- { "hizzacked.xxx", true },
- { "hj-mosaiques.be", true },
- { "hj.rs", true },
- { "hjartasmarta.se", true },
- { "hjelpemiddeldatabasen.no", true },
- { "hjertingfysioterapi.dk", true },
- { "hjort.land", true },
- { "hjortland.org", true },
- { "hjphoto.co.uk", true },
- { "hk.search.yahoo.com", false },
- { "hkas.org.hk", true },
- { "hkbsurgery.com", true },
- { "hkdobrev.com", true },
- { "hklbgd.org", true },
- { "hkmap.co", true },
- { "hkmap.com", true },
- { "hkmap.live", true },
- { "hkmap.net", true },
- { "hkr.at", true },
- { "hks-projekt.at", true },
- { "hks.pw", true },
- { "hktech.com", true },
- { "hkustmbajp.com", true },
- { "hl8id.vip", true },
- { "hl8th.vip", true },
- { "hlavacek.us", true },
- { "hlavi.hu", true },
- { "hledejlevne.cz", true },
- { "hlegrandbeautysupply.com", true },
- { "hlfh.space", true },
- { "hlinformatics.nl", true },
- { "hloe0xff.ru", true },
- { "hlsmandarincentre.com", true },
- { "hlucas.de", true },
- { "hlx66.cc", true },
- { "hlx86.cc", true },
- { "hly0928.com", true },
- { "hlz.mn", true },
- { "hm1ch.com", true },
- { "hm1ch.ovh", true },
- { "hm773.org", true },
- { "hmhotelec.com", false },
- { "hmnd.io", true },
- { "hmoegirl.com", true },
- { "hmri.org.au", true },
- { "hms-waldmann.de", true },
- { "hmsseahawk.com", true },
- { "hn.search.yahoo.com", false },
- { "hn75.de", true },
- { "hnfertilizermachine.com", true },
- { "hnn.net.br", true },
- { "hnonline.sk", true },
- { "hnyp.hu", true },
- { "ho188.net", true },
- { "ho518.net", true },
- { "ho568.com", true },
- { "ho918.net", true },
- { "hoaas.no", true },
- { "hoahau.org", true },
- { "hoarding.me", true },
- { "hoathienthao.com", true },
- { "hoathienthao.vn", true },
- { "hobby-drechselei.de", true },
- { "hobby-freizeit.de", true },
- { "hoberg.ch", true },
- { "hochhaus.us", true },
- { "hochoukikikiraku.com", true },
- { "hochyi.com", true },
- { "hochzeitsfotograf-deinfoto.ch", true },
- { "hochzeitsplanerin-hamburg.de", true },
- { "hockeyworldwide.com", true },
- { "hodgephotography.com", true },
- { "hodler.shop", true },
- { "hoe.re", true },
- { "hoeft-autolackierung.de", true },
- { "hoekvanholland.eu", true },
- { "hoeren.club", true },
- { "hoesnelwasik.nl", true },
- { "hoevenstein.nl", false },
- { "hoewler.ch", false },
- { "hof-mulin.ch", true },
- { "hofapp.de", true },
- { "hofauer.de", true },
- { "hoffmancorporation.com", true },
- { "hoffmann-fliesen-design.de", true },
- { "hoffnungberlin.de", true },
- { "hoffnungdeutschland.de", true },
- { "hofiprojekt.cz", true },
- { "hoflerlawfirm.com", true },
- { "hofstaetter.io", true },
- { "hogarthdavieslloyd.com", true },
- { "hoge.se", true },
- { "hogepad.com", true },
- { "hogl.dk", true },
- { "hogrebe.de", true },
- { "hogwarts.io", true },
- { "hohenleimbach.de", true },
- { "hohenpoelz.de", true },
- { "hohm.in", true },
- { "hoiquanadida.com", true },
- { "hoish.in", false },
- { "hoken-wakaru.jp", true },
- { "hokenselect.jp", true },
- { "hokioisecurity.com", true },
- { "hokusya.com", true },
- { "holacannx.com", true },
- { "holacbdoils.com", true },
- { "holadinero.es", true },
- { "holadinero.mx", true },
- { "holboxwhalesharktours.com", false },
- { "holdengreene.com", true },
- { "holebedeljek.hu", true },
- { "holidayacademy.co.uk", true },
- { "holidaylocal.ga", true },
- { "holidaysportugal.eu", true },
- { "holisticacupuncture.com.au", true },
- { "holistichealer.in", true },
- { "holisticon.de", true },
- { "holland-sailing.de", true },
- { "hollandsdiep.nl", true },
- { "hollermann.eu", true },
- { "hollowpoint.xyz", true },
- { "hollowrap.com", true },
- { "hollyforrest.ca", true },
- { "hollyforrestphotography.ca", true },
- { "hollywoodstars.tk", true },
- { "hollywoodsurvey.org", true },
- { "holmesian.org", true },
- { "holo.ovh", true },
- { "holofono.com", true },
- { "holofox.ru", true },
- { "holoxplor.space", true },
- { "holtackersleather.be", true },
- { "holtslander.ca", true },
- { "holunderbluetentee.de", true },
- { "holvonix.com", true },
- { "holycrossphl.org", true },
- { "holycrossverobeach.org", true },
- { "holydragoon.jp", true },
- { "holyfamilyphilly.org", true },
- { "holyfamilyrussell.org", true },
- { "holyghost-church.org", true },
- { "holygrail.games", true },
- { "holyhiphopdatabase.com", true },
- { "holymartyrschurch.org", true },
- { "holyriders.cf", true },
- { "holyspiritpalmyra.com", true },
- { "holyspiritweb.org", true },
- { "holyszko.com", true },
- { "holytransaction.com", true },
- { "holywhite.com", true },
- { "holz.nu", true },
- { "holzheizer-forum.de", true },
- { "holzheizerforum.de", true },
- { "holzschutz-holzbearbeitung.de", true },
- { "holzspielzeug-shop.ch", true },
- { "holzstueckwerk.de", true },
- { "holzundgarten.de", true },
- { "holzvergaser-forum.de", true },
- { "homatism.com", true },
- { "hombresconestilo.com", true },
- { "home-sud-renovation.com", false },
- { "homeable.io", true },
- { "homeandliving.it", true },
- { "homebank.kg", true },
- { "homebasedsalons.com.au", true },
- { "homebrewshop.be", true },
- { "homecareassociatespa.com", true },
- { "homecareinterio.com", true },
- { "homecaring.com.au", true },
- { "homecheck.gr", true },
- { "homedentist.cl", true },
- { "homeehome.com", true },
- { "homegardeningforum.com", true },
- { "homegardenresort.nl", true },
- { "homegreenmark.com", true },
- { "homehunting.pt", true },
- { "homeimagician.com.au", true },
- { "homelab.farm", true },
- { "homelabalert.com", true },
- { "homeland.ie", true },
- { "homemdeferro.net", true },
- { "homeodynamics.com", true },
- { "homeoesp.org", true },
- { "homeogenium.com", false },
- { "homepage.shiga.jp", true },
- { "homeporn.stream", true },
- { "homeportal.cz", true },
- { "homeprivate.de", true },
- { "homeprivate.net", true },
- { "homeseller.com", true },
- { "homeserver-kp.de", true },
- { "homeshowoff.com", true },
- { "homesteadandprepper.com", true },
- { "homesteadfarm.org", true },
- { "homeworkacers.com", true },
- { "homeyou.com", true },
- { "hommeatoutfaire.be", false },
- { "homoo.social", true },
- { "homophobia.tk", true },
- { "homophoni.com", true },
- { "hompus.nl", false },
- { "homs.design", true },
- { "homunyan.com", true },
- { "hon-matsuba.co.jp", true },
- { "honda-centrum.cz", true },
- { "hondart.cz", true },
- { "hondenoppasfraneker.nl", true },
- { "honey.beer", true },
- { "honey.is", true },
- { "honeybadger.io", false },
- { "honeybrooklibrary.org", true },
- { "honeycomb.com.vn", true },
- { "honeycome.net", true },
- { "honeycreeper.com", true },
- { "honeyhaw.com", true },
- { "honeypot.net", true },
- { "honeyspot.de", true },
- { "hong.io", true },
- { "hongbomiao.com", true },
- { "hongki.tk", true },
- { "hongoi.com", true },
- { "hongorw.tk", true },
- { "hongosdemexico.tk", true },
- { "honkion.net", true },
- { "honoka-seitai.jp", true },
- { "honovere.de", true },
- { "hontoir.eu", true },
- { "hoofdredacteuren.nl", true },
- { "hoogeveen.nl", false },
- { "hooghiemstrazelf.nl", true },
- { "hookbin.com", true },
- { "hookshotdesign.com", true },
- { "hookupndate.com", true },
- { "hookxlab.org", false },
- { "hoon.tk", true },
- { "hoooc.com", true },
- { "hooowl.com", true },
- { "hoop.la", true },
- { "hoopertechnicalsolutions.com", true },
- { "hooplessinseattle.com", true },
- { "hoopshabit.com", true },
- { "hooray.beer", true },
- { "hoorig.de", true },
- { "hoorr.com", true },
- { "hoowhen.cn", true },
- { "hopconseils.ch", false },
- { "hopconseils.com", false },
- { "hopecbd.com", true },
- { "hopemeet.me", true },
- { "hopeofmyheart.com", true },
- { "hopesanddreams.org.uk", true },
- { "hopeworld.pro", true },
- { "hoplongtech.com", true },
- { "hoponmedia.de", true },
- { "hopps.me", true },
- { "hoppyx.com", true },
- { "hopzone.net", true },
- { "horaceli.com", true },
- { "horackova.info", true },
- { "horairetrain.be", true },
- { "horairetrain.ch", true },
- { "horairetrain.fr", true },
- { "horairetrain.lu", true },
- { "horclan.tk", true },
- { "hord.ca", true },
- { "horecaapparatuurkobezuijen.nl", true },
- { "horecatiger.eu", true },
- { "horeco.com", true },
- { "horeizai.net", true },
- { "horgenberg.com", true },
- { "horizon.ne.jp", true },
- { "horizonhomes-samui.com", true },
- { "horizonlawncare.tk", true },
- { "horizzon.cloud", true },
- { "horn.co", true },
- { "hornertranslations.com", true },
- { "horo.moe", true },
- { "horochx.org", true },
- { "horodance.dk", true },
- { "horrell.ca", true },
- { "horror-forum.de", true },
- { "horrormovies.gr", true },
- { "horsehunter.co.uk", true },
- { "horsky.me", true },
- { "horstmanshof.eu", true },
- { "horti-it.com", true },
- { "horton-brasses.com", true },
- { "hory.me", true },
- { "horza.org", true },
- { "hoshimaq.com.br", true },
- { "hoshimaquinas.com.br", true },
- { "hoshinplan.com", true },
- { "hoshisato.com", true },
- { "hosiery.tk", true },
- { "hosiet.me", true },
- { "hosmussynergie.nl", false },
- { "hosoi-tax.com", true },
- { "hospitalhomelottery.org", true },
- { "hospitality-colleges.com", true },
- { "hostadvice.com", true },
- { "hostallacasamia.com", true },
- { "hostco.nl", true },
- { "hostcoz.com", true },
- { "hosteasy.nl", false },
- { "hostedghost.eu", true },
- { "hostedghost.net", true },
- { "hostedghost.nl", true },
- { "hostedtalkgadget.google.com", true },
- { "hosteleriauno.es", true },
- { "hosteons.com", true },
- { "hostfission.com", true },
- { "hostiberi.com", true },
- { "hostico.ro", true },
- { "hostinecpodlipou.cz", true },
- { "hosting-swiss.ch", true },
- { "hostingactive.it", true },
- { "hostingalternative.com", false },
- { "hostingdirectory.ga", true },
- { "hostinghelp.guru", true },
- { "hostinginnederland.nl", true },
- { "hostinglogin.net", true },
- { "hostingphp.ch", true },
- { "hostingpunt.be", true },
- { "hostingsolutions.cz", true },
- { "hostix.de", true },
- { "hostme.co.il", true },
- { "hostmijnpagina.nl", true },
- { "hostmodern.com.au", true },
- { "hostmywebsite.online", true },
- { "hostpoint.ch", true },
- { "hostwinds.com", true },
- { "hosuronline.com", true },
- { "hot-spa.ch", false },
- { "hotcandlestick.com", true },
- { "hotchillibox.com", true },
- { "hotcoin.io", true },
- { "hotdates18.com.au", true },
- { "hotdates18.fi", true },
- { "hotel-alan.hr", true },
- { "hotel-kontorhaus-stralsund.de", true },
- { "hotel-kontorhaus.de", true },
- { "hotel-le-vaisseau.ch", true },
- { "hotel-rosner.at", true },
- { "hotel-schiller.de", true },
- { "hotelamgarnmarkt.at", false },
- { "hotelbonacabol.com", true },
- { "hotelbretagne.dk", true },
- { "hotelcoliber.pl", true },
- { "hotelconsulado.com.br", true },
- { "hotelcorporate.codes", true },
- { "hotelcorporatecodes.com", true },
- { "hotelelaphusabrac.com", true },
- { "hoteles4you.com", true },
- { "hotelesenpuertoescondido.com", true },
- { "hotelevergrandpalace.in", true },
- { "hotelevershine.com", true },
- { "hotelflow.com.br", true },
- { "hotelident.de", true },
- { "hotelindraprasth.biz", true },
- { "hotelkaj.hr", true },
- { "hotelmap.com", true },
- { "hotelmarinaadria.com", true },
- { "hotelmonal.in", true },
- { "hotelnatrajp.com", true },
- { "hotelneptundalmatien.com", true },
- { "hotelpalmas.com.br", true },
- { "hotelpostaorvieto.it", true },
- { "hotelpresident.co.in", true },
- { "hotelpromo.codes", true },
- { "hotels-insolites.com", true },
- { "hotels3d.com", true },
- { "hotels4teams.com", true },
- { "hotelsinbuxton.com", true },
- { "hotelsinformer.com", true },
- { "hotelsinncoventry.com", true },
- { "hotelsolinebrela.com", true },
- { "hotelsrit.tk", true },
- { "hotelstanford.com.co", true },
- { "hotelvalena.com", true },
- { "hotelvillaluisa.de", true },
- { "hotesb.com", true },
- { "hothbricks.com", false },
- { "hotjuice.com", true },
- { "hotmann.de", true },
- { "hotnewhiphop.com", true },
- { "hoton.in", true },
- { "hotornot.com", true },
- { "hotplate.co.nz", true },
- { "hotrowordpress.com", true },
- { "hottaro.com", true },
- { "hottheme.net", true },
- { "hotting.nl", true },
- { "hottubspasnewcastle.co.uk", true },
- { "hotvideosgalleries.com", true },
- { "houby-studio.eu", true },
- { "houhuayuan.com", true },
- { "houraiteahouse.net", true },
- { "house-scape.com", true },
- { "house-sparrow.com", true },
- { "houseandgarden.co.uk", true },
- { "houseboydesigns.com", true },
- { "housekeeperlondon.co.uk", true },
- { "houselocal.co.uk", true },
- { "houseofherbs.gr", true },
- { "houseofhouston.com", true },
- { "houseofpertijs.com", true },
- { "houser.lu", true },
- { "housese.at", true },
- { "housingloan.jp", true },
- { "housingneedz.com", true },
- { "houstonapartmentinsiders.com", true },
- { "houstonauthorizedrepair.com", true },
- { "houstonendodontics.com", true },
- { "houstongaragedoorsrepair.com", true },
- { "houstonlockout.com", true },
- { "houtinee.com", true },
- { "hoverboardbarato.com", true },
- { "how-old.info", true },
- { "how-to-simply.com", true },
- { "how2dev.tools", true },
- { "howa-n.net", true },
- { "howbehealthy.com", true },
- { "howellaccounts.co.uk", true },
- { "howgoodwasmysex.com", true },
- { "howieisawesome.com", true },
- { "howlongtobeatsteam.com", true },
- { "howmanymilesfrom.com", true },
- { "howmanypeoplearethereinthe.world", true },
- { "howmanypeoplearethereintheworld.com", true },
- { "howonce.cn", true },
- { "howonce.com", true },
- { "howonce.com.cn", true },
- { "howonce.net", true },
- { "howonce.org", true },
- { "howsecureismypassword.net", true },
- { "howsmyssl.com", true },
- { "howsmytls.com", true },
- { "howsyourhealth.org", true },
- { "howtogeek.com", true },
- { "howtogosolar.org", true },
- { "howtolaser.com", true },
- { "howtomovetheneedle.com", true },
- { "howtorunfasterandlonger.com", true },
- { "howtoteachviolin.com", true },
- { "howtotech.de", true },
- { "howtutu.click", true },
- { "howtutu.com", true },
- { "howtutu.email", true },
- { "howtutu.eu", true },
- { "howtutu.info", true },
- { "howtutu.link", true },
- { "howtutu.net", true },
- { "howtutu.org", true },
- { "hoxo.fr", true },
- { "hozana.si", false },
- { "hp-lexicon.org", true },
- { "hp-work.net", true },
- { "hp42.de", true },
- { "hpac-portal.com", true },
- { "hpage.com", true },
- { "hpbn.co", true },
- { "hpic.net", true },
- { "hpisavageforum.com", true },
- { "hpkp-faq.de", true },
- { "hplace.com.br", true },
- { "hps.digital", true },
- { "hps.hu", true },
- { "hpsdigital.hu", true },
- { "hpvtimmerwerken.nl", true },
- { "hq77.ru", true },
- { "hqon.com.br", true },
- { "hqq.tv", true },
- { "hqsmartpanel.com", true },
- { "hquest.pro.br", true },
- { "hqy.moe", true },
- { "hr-praemien-santander.de", true },
- { "hr-tech.shop", true },
- { "hr28.co.uk", true },
- { "hraesvelg.net", true },
- { "hrafnkellbaldurs.com", true },
- { "hranicka.cz", true },
- { "hrbanen.nl", true },
- { "hrbatypes.cz", true },
- { "hrbl.lc", true },
- { "hrbrt.nl", true },
- { "hrcrew.com.au", true },
- { "hrdns.de", false },
- { "hrebecek.cz", true },
- { "href.one", true },
- { "hrjfeedstock.org", true },
- { "hrltech.com.br", true },
- { "hrmg.agency", true },
- { "hrna.moe", true },
- { "hro.to", true },
- { "hrobert.hu", true },
- { "hroling.nl", true },
- { "hroschyk.cz", true },
- { "hrpregnancy.com", true },
- { "hrsa.gov", true },
- { "hrtech.shop", true },
- { "hrumka.net", true },
- { "hrw66.cc", true },
- { "hryniewski.net", true },
- { "hryx.net", true },
- { "hs-arbeitsschutz.de", true },
- { "hs-group.net", true },
- { "hsappstatic.net", true },
- { "hschen.top", false },
- { "hscorp.de", true },
- { "hsg-kreuzberg.de", true },
- { "hsimrall.com", true },
- { "hsivonen.com", true },
- { "hsivonen.fi", true },
- { "hsivonen.iki.fi", true },
- { "hsiwen.com", true },
- { "hsjccconference.ca", true },
- { "hsmr.cc", true },
- { "hsn-tsn.com", true },
- { "hsn.com", true },
- { "hspinc.ca", true },
- { "hsr.gov", false },
- { "hsts.eu", true },
- { "hsts.me", true },
- { "hsts.ovh", true },
- { "hstsfail.appspot.com", true },
- { "hstspreload.appspot.com", true },
- { "hstspreload.com", true },
- { "hstspreload.de", true },
- { "hstspreload.org", true },
- { "hstudio.tk", true },
- { "hsturan.com", true },
- { "hszemi.de", true },
- { "ht.mk", true },
- { "htaccessbook.com", true },
- { "htaps.com", true },
- { "htb.click", true },
- { "htb.co.uk", true },
- { "htbplc.co.uk", true },
- { "htcvina.com", true },
- { "hte.ovh", true },
- { "hti.digital", true },
- { "htmanager.fr", true },
- { "html.moe", true },
- { "html5.org", true },
- { "html5media.info", true },
- { "htmlacademy.ru", true },
- { "htmlvalidator.com", true },
- { "htmlyse.com", true },
- { "htsure.ma", false },
- { "http-2.com", true },
- { "http2.eu", true },
- { "http2.pro", true },
- { "http3.ch", true },
- { "http3.pro", true },
- { "https-rulesets.org", true },
- { "https.dk", true },
- { "https.jetzt", true },
- { "https4all.org", true },
- { "httpsecured.net", true },
- { "httpsiseasy.com", true },
- { "httpsispisseasy.com", true },
- { "httpsnow.com", true },
- { "httpsnow.org", true },
- { "httpstest.com", true },
- { "httpstest.eu", true },
- { "httpstest.nl", true },
- { "httpswatch.ca", true },
- { "httpswatch.com", true },
- { "httpswatch.eu", true },
- { "httpswatch.nl", true },
- { "hu-a-u.com", true },
- { "hu.search.yahoo.com", false },
- { "hua-chuan.com.tw", true },
- { "hua-chuan.tw", true },
- { "hua-in.com", true },
- { "hua-in.net", true },
- { "hua-li88.com", true },
- { "hua-li88.net", true },
- { "huabantxt.com", true },
- { "huabanxs.com", true },
- { "huabianwa.com", true },
- { "huagati.com", true },
- { "huahinpropertylisting.com", true },
- { "huai123.org", true },
- { "huang-haitao.com", true },
- { "huang.nu", true },
- { "huangh.com", true },
- { "huangjiaint.com", true },
- { "huangjingjing.com", true },
- { "huangqifu.com", true },
- { "huangzenghao.cn", true },
- { "huaqian.art", true },
- { "huashan.co.uk", true },
- { "huaxingui.com", true },
- { "huaxueba.com", true },
- { "hub.org.ua", true },
- { "hub385.com", true },
- { "hubapi.com", true },
- { "hubchain.com", true },
- { "hubchain.com.br", true },
- { "hubchain.fr", true },
- { "hubchain.io", true },
- { "hubchain.org", true },
- { "huber-informatik.de", true },
- { "hubitt.com", true },
- { "hubspot.com", true },
- { "hubspot.de", true },
- { "hubspot.es", true },
- { "hubspot.fr", true },
- { "hubspot.jp", true },
- { "huchet.me", true },
- { "hudebnibazarmixer.cz", true },
- { "hudobniny.net", true },
- { "hudrydum.cz", true },
- { "hudsonfaceandeye.com", true },
- { "huduser.gov", true },
- { "huendeleskopfhuette.de", true },
- { "huersch.com", true },
- { "hues-in-lee.de", true },
- { "huffduffer.com", true },
- { "hugi.is", true },
- { "huglen.info", true },
- { "hugo.pro", true },
- { "hugolegrand.fr", true },
- { "hugolynx.fr", false },
- { "hugonote.cf", true },
- { "hugonote.ga", true },
- { "hugonote.gq", true },
- { "hugonote.ml", true },
- { "hugonote.ovh", true },
- { "hugonote.tk", true },
- { "huguesblanchard.paris", true },
- { "huguesditciles.com", false },
- { "huh.gdn", true },
- { "huh.today", false },
- { "hui-in.com", true },
- { "hui-in.net", true },
- { "huihui.moe", true },
- { "huimiquan.com", true },
- { "huininga.com", true },
- { "huininga.nl", true },
- { "huininga.org", true },
- { "huipc.com", true },
- { "huirongis.me", true },
- { "huisartsen-ict.nl", true },
- { "huisartsenpraktijkheemraadssingel.nl", true },
- { "huisartsenpraktijksonmezer.nl", true },
- { "huisartsenpraktijkzonnehoed.nl", true },
- { "huisjeboompje-baby.nl", true },
- { "huislaw.com", true },
- { "huislijn.nl", true },
- { "huissier-vosges.com", true },
- { "huitaodang.com", true },
- { "huizenvlees.nl", true },
- { "hulaginswoodworking.com", true },
- { "hulet.tech", true },
- { "hulldevs.net", true },
- { "hullseals.space", true },
- { "hulpbijmarketing.nl", true },
- { "hulpmiddelenshop.nl", true },
- { "human-clone.com", true },
- { "humanenrich.com", true },
- { "humanesources.com", true },
- { "humanidad.tk", true },
- { "humanit.com.au", true },
- { "humanity.com", true },
- { "humaniza.com.mx", true },
- { "humanlocation.net", true },
- { "humans.io", false },
- { "humansense.nl", true },
- { "humanzee.com", true },
- { "humass.nl", true },
- { "humblebee.at", true },
- { "humblebee.be", true },
- { "humblebee.co.uk", true },
- { "humblebee.cz", true },
- { "humblebee.dk", true },
- { "humblebee.es", true },
- { "humblebee.eu", true },
- { "humblebee.fr", true },
- { "humblebee.gr", true },
- { "humblebee.hu", true },
- { "humblebee.ie", true },
- { "humblebee.it", true },
- { "humblebee.nz", true },
- { "humblebee.pl", true },
- { "humblebee.uk", true },
- { "humblebee.us", true },
- { "humblebeeshop.ca", true },
- { "humblebeeshop.com.au", true },
- { "humbledot.com", true },
- { "humboldthomeguide.com", true },
- { "humboldtmfg.com", true },
- { "humeur.de", true },
- { "humexe.com", true },
- { "humio.com", true },
- { "humitat-stop.com", true },
- { "hummy.tv", true },
- { "humpchies.com", true },
- { "humpen.se", true },
- { "humppakone.com", true },
- { "hund.io", true },
- { "hundeverwaltung.de", true },
- { "hundhausen.de", true },
- { "hundter.com", true },
- { "hunger.im", true },
- { "huniverse.co", true },
- { "hunqz.com", true },
- { "hunstoncanoeclub.co.uk", true },
- { "hunt.gs", true },
- { "huntcraft.ru", true },
- { "hunter-read.com", true },
- { "hunter.io", true },
- { "hunterkehoe.com", true },
- { "huntertechsolution.com", true },
- { "huntexpired.com", true },
- { "huntingdonbouncers.co.uk", true },
- { "huntingdonlifesciences.com", true },
- { "huntshomeinspections.com", false },
- { "huntsmansecurity.com", true },
- { "huntsvillecottage.ca", true },
- { "huntyourshitaround.com", true },
- { "huoduan.com", true },
- { "huonit.com.au", true },
- { "huotuyouxi.com", true },
- { "huoyankan.com", true },
- { "hup.hu", false },
- { "huracanvillegas.com", true },
- { "hurbascooter.com", true },
- { "hurd.is", true },
- { "hurleyhomestead.com", true },
- { "huroji.com", false },
- { "hurricanelabs.com", true },
- { "hurtigtinternet.dk", true },
- { "husakbau.at", true },
- { "hushfile.it", true },
- { "husic.net", false },
- { "husk.house", true },
- { "huskyeye.de", true },
- { "huskyinc.us", false },
- { "husqvarnamoped.se", true },
- { "hussam.eu.org", true },
- { "hustlehope.com", true },
- { "huurwoordenaar.nl", true },
- { "huutonauru.net", true },
- { "huwcbjones.co.uk", true },
- { "huxcoconstruction.com", true },
- { "huxley.net", true },
- { "huynhviet.com", true },
- { "huyvu.nl", true },
- { "huzu.com", true },
- { "hv-huset.no", true },
- { "hvdbox.de", true },
- { "hvenetworks.net", true },
- { "hvgg.de", true },
- { "hvh.no", true },
- { "hvmk.nl", true },
- { "hvrint.de", true },
- { "hvt.com.au", true },
- { "hvtuananh.com", true },
- { "hw923.com", true },
- { "hwag-pb.de", true },
- { "hwlibre.com", true },
- { "hwsw.io", true },
- { "hwx8.com", true },
- { "hwxvip.com", true },
- { "hx53.de", true },
- { "hx77.cc", true },
- { "hxp.io", true },
- { "hy88win.com", true },
- { "hyatt.com", true },
- { "hybridworx.com", true },
- { "hybridworx.de", true },
- { "hybridworx.eu", true },
- { "hybridworx.net", true },
- { "hybridworx.org", true },
- { "hybrydowe-samochody.pl", true },
- { "hybula.com", true },
- { "hycken.com", true },
- { "hyckenberg.com", true },
- { "hyderabadonlinegifts.com", true },
- { "hydrante.ch", false },
- { "hydrazin.pw", true },
- { "hydro17.com", true },
- { "hydrographicsocietybenelux.eu", true },
- { "hydroponicglobal.com.au", true },
- { "hydroturbine.info", false },
- { "hydrozone.fr", true },
- { "hyec.jp", true },
- { "hygieneproclean.co.nz", true },
- { "hygo.com", true },
- { "hyhy1.com", true },
- { "hyhy2.com", true },
- { "hyhy7.com", true },
- { "hyhy80.com", true },
- { "hyhy81.com", true },
- { "hyhy82.com", true },
- { "hyhy83.com", true },
- { "hyhy85.com", true },
- { "hyhy89.com", true },
- { "hyhy98.com", true },
- { "hyk.me", true },
- { "hylemorphica.org", true },
- { "hyncice.com", true },
- { "hynek.me", true },
- { "hyparia.fr", true },
- { "hyparia.org", true },
- { "hype.ru", true },
- { "hyper-text.org", true },
- { "hyper.ai", true },
- { "hyper.lol", true },
- { "hyperalgesia.com", true },
- { "hyperd.sh", true },
- { "hyperion.io", true },
- { "hyperreal.biz", true },
- { "hypersomnia.com", true },
- { "hyperstack.org", true },
- { "hyperthymia.com", true },
- { "hyperv.fr", true },
- { "hypnose-hennigsdorf.de", true },
- { "hypnovir.us", true },
- { "hypolineweb.de", true },
- { "hypotecnicentrum.cz", true },
- { "hypotheca.ca", true },
- { "hypothecairelening.net", true },
- { "hypotheekbond.nl", true },
- { "hypothes.is", true },
- { "hypothyroidmom.com", true },
- { "hyr.mn", false },
- { "hysemmarket.com", true },
- { "hysh.jp", true },
- { "hysolate.com", true },
- { "hytale.com", true },
- { "hytopcp168.com", true },
- { "hyundai.no", true },
- { "hyundaisrilanka.lk", true },
- { "hyvanilmankampaamo.fi", true },
- { "hyvinvointineuvoja.fi", true },
- { "hyyen.com", true },
- { "hztgzz.com", true },
- { "i--b.com", true },
- { "i-0v0.in", true },
- { "i-connect.ie", true },
- { "i-geld.de", true },
- { "i-house.gq", true },
- { "i-hoz.ru", true },
- { "i-logic.co.jp", false },
- { "i-make.com", true },
- { "i-make.fr", true },
- { "i-meto.com", true },
- { "i-office.com.vn", true },
- { "i-proswiss.com", false },
- { "i-red.info", true },
- { "i-sports.cz", true },
- { "i-verbi.it", true },
- { "i-voting.pl", true },
- { "i00.eu", true },
- { "i0day.com", true },
- { "i1314.gdn", true },
- { "i2gether.org.uk", true },
- { "i2verify.com", true },
- { "i36533.com", true },
- { "i36594.com", true },
- { "i51365.com", true },
- { "i5y.co.uk", true },
- { "i5y.org", true },
- { "i7.io", true },
- { "i7sas.tk", true },
- { "i879.com", true },
- { "i95.me", false },
- { "i9s.in", true },
- { "ia.cafe", true },
- { "ia.net", true },
- { "iaco.li", true },
- { "iactu.info", true },
- { "iaeste.no", true },
- { "iaeste.or.jp", true },
- { "iaf.gov", true },
- { "iahemobile.net", true },
- { "iainsimms.co.uk", true },
- { "iainsimms.com", true },
- { "iainsimms.me", true },
- { "iaitouzi.com", true },
- { "ialis.me", true },
- { "ialps.cn", true },
- { "iam.lc", true },
- { "iam.soy", true },
- { "iamanewme.com", true },
- { "iambozboz.co.uk", true },
- { "iamhansen.xyz", true },
- { "iamhealthystore.com", true },
- { "iamjoshellis.com", true },
- { "iamlife.com", true },
- { "iamlizu.com", true },
- { "iamtheib.me", true },
- { "iamtonyarthur.com", true },
- { "iamusingtheinter.net", false },
- { "iamwill.io", true },
- { "iamwoodbeard.com", true },
- { "ian678.com", true },
- { "ian678.tk", true },
- { "ianbrault.com", true },
- { "iancu.io", true },
- { "iancu.me", true },
- { "iandouglasscott.com", true },
- { "iane-ccs.com", true },
- { "ianix.com", true },
- { "ianjmoriarty.com", true },
- { "ianklug.com", true },
- { "iankmusic.com", true },
- { "ianmooreis.me", true },
- { "ianmoriarty.com.au", true },
- { "iansyst.co.uk", true },
- { "ianwalsh.org", false },
- { "iap.network", false },
- { "ias-gruppe.net", true },
- { "ias.ua", true },
- { "iassess.eu", true },
- { "iatfei.com", true },
- { "iautodily.cz", true },
- { "iavian.com", true },
- { "iba.gov.au", true },
- { "ibacktraced.it", true },
- { "ibadboy.net", true },
- { "ibaq.nl", true },
- { "ibauruapan.com.mx", true },
- { "ibavaro.com", true },
- { "ibb.co", true },
- { "ibcl.us", true },
- { "ibcmed.com", true },
- { "ibcmed.net", true },
- { "ibcmed.org", true },
- { "ibe.de", false },
- { "ibeep.com", true },
- { "iberiaversicherungen.com", true },
- { "ibericaderedes.es", true },
- { "ibericarbenet.es", true },
- { "ibericarcuzco.es", true },
- { "ibericarcuzcomini.es", true },
- { "ibericarformula.es", true },
- { "ibericarmotors.es", true },
- { "ibericarmotorsmalaga.es", true },
- { "ibericarmovilcentro.es", true },
- { "ibericarmovilsur.es", true },
- { "ibericarreicomsa.es", true },
- { "ibericartechnik.es", true },
- { "iberion.pl", true },
- { "ibestproduct.com", true },
- { "ibestreview.com", true },
- { "ibex-lb.com", true },
- { "ibexcore.com", true },
- { "ibhgospel.com", true },
- { "ibi.mt", true },
- { "ibidyoupeace.com", true },
- { "ibigawamizueco.com", true },
- { "ibiki-boushi-makura.net", true },
- { "ibin.co", true },
- { "ibiz.mk", true },
- { "iblackfriday.ro", true },
- { "ibloggospel.com", true },
- { "iblowdry.com", true },
- { "ibodyiq.com", true },
- { "ibps-recruitment.in", true },
- { "ibrainmedicine.org", true },
- { "ibraphotography.com", true },
- { "ibrom.eu", true },
- { "ibugone.com", true },
- { "ibuki.run", true },
- { "ibwc.gov", true },
- { "ibykos.com", true },
- { "ic-lighting.com.au", true },
- { "ic1technologies.com", true },
- { "ic3.gov", true },
- { "icafecash.com", true },
- { "icanhas.report", true },
- { "icanhasht.ml", true },
- { "icanhazpass.com", true },
- { "icarlos.net", true },
- { "icc.kharkov.ua", true },
- { "iccorporateinteriors.com.au", true },
- { "iccpublisher.com", true },
- { "icdp.org.ua", true },
- { "ice.xyz", true },
- { "iceandfiremechanical.com", true },
- { "iceberg.academy", false },
- { "icebound.cc", true },
- { "icecontrol.ro", true },
- { "icecutethings.com", true },
- { "icelandic.cf", true },
- { "icelandicasian.com", true },
- { "icetiger.eu", true },
- { "icetravellers.com", true },
- { "icetwister.com", true },
- { "icewoman.net", true },
- { "ich-hab-die-schnauze-voll-von-der-suche-nach-ner-kurzen-domain.de", true },
- { "ich-tanke.de", true },
- { "icharme.fr", true },
- { "ichasco.com", true },
- { "ichbinein.org", true },
- { "ichbinkeinreh.de", true },
- { "ichinghero.com", true },
- { "ichitaso.com", true },
- { "iclinic.ua", true },
- { "icmhd.ch", false },
- { "icmp2018.org", true },
- { "icmshoptrend.com", true },
- { "icobench.com", true },
- { "icodeconnect.com", true },
- { "icoh.it", true },
- { "iconomi.net", true },
- { "icpc.pp.ua", true },
- { "icq-project.net", true },
- { "ict-crew.nl", true },
- { "ict-radar.com", true },
- { "ict-radar.nl", true },
- { "ictbaneninnederland.nl", true },
- { "ictbiz.com.au", true },
- { "ictcareer.ch", true },
- { "ictindia.in", true },
- { "ictoniolopisa.it", true },
- { "ictradar.com", true },
- { "ictussistemas.com.br", true },
- { "ictvanafmorgen.nl", true },
- { "icy.aq", true },
- { "icyapril.com", true },
- { "icymint.me", true },
- { "icynet.eu", true },
- { "icyrock.com", true },
- { "iczc.cz", true },
- { "id-blog.ch", false },
- { "id.atlassian.com", false },
- { "id.mayfirst.org", false },
- { "id.search.yahoo.com", false },
- { "id3global.com", true },
- { "idaeus.eu", true },
- { "idahoansforliberty.net", true },
- { "idar-oberstein.de", false },
- { "idarv.com", true },
- { "idaspis.com", true },
- { "idatha.de", true },
- { "idblab.tk", true },
- { "iddns.net", true },
- { "ideageek.net", true },
- { "ideal-envelopes.co.uk", false },
- { "idealcontabilidade.net", true },
- { "idealimplant.com", true },
- { "idealize.ml", true },
- { "idealog.id", true },
- { "idealsegurancaeletronica.com.br", true },
- { "idealtruss.com", true },
- { "idealtruss.com.tw", true },
- { "idealwhite.space", true },
- { "ideamiapublicidad.com", true },
- { "ideashop.com", true },
- { "ideatarmac.com", true },
- { "ideaweb.de", true },
- { "idee-lq.at", true },
- { "idee-lq.ch", true },
- { "idee-lq.com", true },
- { "idee-lq.de", true },
- { "idee-lq.net", true },
- { "ideiasefinancas.com.br", true },
- { "idenamaislami.com", true },
- { "idensys.nl", true },
- { "ident-clinic.be", true },
- { "identassist.com", true },
- { "identigraf.center", true },
- { "identityexperts.co.uk", true },
- { "identitytheft.gov", true },
- { "idered.net", true },
- { "idesoft.cloud", true },
- { "idesoft.com", true },
- { "idesoft.eu", true },
- { "idesoft.net", true },
- { "idesoft.org", true },
- { "idesoftinnovacion.com", true },
- { "idesoftinnovacion.es", true },
- { "idexxpublicationportal.com", true },
- { "idgard.de", false },
- { "idgateway.co.uk", true },
- { "idhosts.co.id", true },
- { "idkidknow.com", true },
- { "idlethoughtsandramblings.com", true },
- { "idlewildflowers.com", true },
- { "idmanagement.gov", true },
- { "idmobile.co.uk", true },
- { "idoc24.com", true },
- { "idodiandina.com", true },
- { "idolf.dk", true },
- { "idolish7.fun", false },
- { "idolknow.com", true },
- { "idontplaydarts.com", true },
- { "idoparadoxon.hu", true },
- { "idratherbequilting.com", true },
- { "idraulico-roma.it", true },
- { "idraulico-roma.org", true },
- { "idraulico.roma.it", true },
- { "idrissi.eu", true },
- { "idroserviceweb.com", true },
- { "idrycleaningi.com", true },
- { "idtheft.gov", true },
- { "idubaj.cz", true },
- { "idunno.org", true },
- { "idvl.de", true },
- { "idxforza.com", true },
- { "idyl.fr", true },
- { "idysse.com", true },
- { "ie.search.yahoo.com", false },
- { "iea-annex61.org", true },
- { "iedison.vip", true },
- { "ieeedeis.org", true },
- { "ieeesb.nl", true },
- { "ieeesbe.nl", true },
- { "ieeespmb.org", true },
- { "iegat.com", true },
- { "ieji.de", true },
- { "iemb.tk", true },
- { "ienakanote.com", false },
- { "ient.me", true },
- { "ies-italia.it", true },
- { "ies911.com", true },
- { "iesonline.co.in", true },
- { "ieval.ro", true },
- { "ievgenialehner.com", true },
- { "iexpert99.com", true },
- { "ifacservice.be", true },
- { "ifamily.top", false },
- { "ifan.ws", true },
- { "ifbagro.in", true },
- { "ifconfig.se", true },
- { "ifelse.io", true },
- { "ifengge.cn", true },
- { "ifgcdn.com", true },
- { "ifibe.com", true },
- { "ifightsurveillance.com", true },
- { "ifightsurveillance.net", true },
- { "ifightsurveillance.org", true },
- { "ifiveglobal.com", true },
- { "ifixe.ch", false },
- { "iflyi.me", true },
- { "ifoa.it", true },
- { "ifolder.ga", true },
- { "ifort.fr", true },
- { "ifosep.fr", false },
- { "ifoss.me", true },
- { "ifsac.org", true },
- { "ifsclist.com", true },
- { "ifsr.de", true },
- { "ift.cx", true },
- { "iftarsaati.org", true },
- { "iftrue.de", false },
- { "ifttl.com", true },
- { "ifxd.bid", true },
- { "ig.com", true },
- { "ig.me", true },
- { "iga-semi.jp", true },
- { "igap.pt", true },
- { "igarage.nl", true },
- { "igdn.de", true },
- { "igeh-immo.at", true },
- { "igglabs.com", true },
- { "iggprivate.com", true },
- { "iggsoft.com", true },
- { "iggsoftware.com", true },
- { "ighl.de", true },
- { "igiftcards.de", true },
- { "igiftcards.nl", true },
- { "igimusic.com", false },
- { "igk.nz", true },
- { "igkabel.cf", true },
- { "igkabel.ga", true },
- { "igkabel.gq", true },
- { "igkabel.ml", true },
- { "igkabel.tk", true },
- { "iglobus.cz", true },
- { "iglosujemy.pl", true },
- { "igmus.org", true },
- { "ignace72.eu", true },
- { "ignacjanskiednimlodziezy.pl", true },
- { "ignat-mag.com", true },
- { "ignatij.tk", true },
- { "ignation.me", true },
- { "ignatovich.by", true },
- { "ignatovich.me", true },
- { "ignet.gov", true },
- { "ignitedlocal.com", true },
- { "ignitelocal.com", true },
- { "ignition.gg", true },
- { "igondola.net", true },
- { "igorandandre.com", true },
- { "igorrealestate.com", true },
- { "igorw.org", true },
- { "igotoffer.com", false },
- { "igramfollower.com", true },
- { "igramming.com", true },
- { "igrarium.com.ua", false },
- { "igrivi.com", true },
- { "iguana.com.ec", false },
- { "igva.or.kr", true },
- { "ih8sn0w.com", true },
- { "iha6.com", true },
- { "ihacker.cn", true },
- { "ihacker.net", true },
- { "ihacklabs.com", false },
- { "ihasco.co.uk", true },
- { "ihcprofile.com", true },
- { "ihearmedical.com", true },
- { "ihempz.cz", true },
- { "ihkk.net", true },
- { "ihls.stream", true },
- { "ihmphila.org", true },
- { "ihoey.com", true },
- { "ihollaback.org", true },
- { "ihorizon.jp", true },
- { "ihostup.net", true },
- { "ihotel.io", true },
- { "ihre-pflege-sachsen.de", true },
- { "ihredls.de", true },
- { "ihrhost.com", true },
- { "ihtdenisjaccard.com", true },
- { "ihuan.me", true },
- { "ii74.com", true },
- { "ii918.com", true },
- { "iiax.net", true },
- { "iiax.org", true },
- { "iic.kharkov.ua", true },
- { "iiet.pl", true },
- { "iiit.pl", true },
- { "iikd.de", true },
- { "iimarckus.org", true },
- { "iin.fm", true },
- { "iinf.in", true },
- { "iinfin.org", true },
- { "iinix.com", true },
- { "iiong.com", true },
- { "iitowns.ir", true },
- { "iix.se", true },
- { "ijazjewelers.com", true },
- { "ijinus.com", true },
- { "ijm.io", true },
- { "ijnokmpl.cf", true },
- { "ijohan.nl", true },
- { "ijsbaanwitten.nl", true },
- { "ijsblokjesvormen.nl", true },
- { "ijsclubdwarsgracht.nl", true },
- { "ijsclubtilburg.nl", true },
- { "ijsclubwanneperveen.nl", true },
- { "ijunohana.jp", true },
- { "ik-life.com", false },
- { "ikachalife.com", true },
- { "ikarate.ru", true },
- { "ikari-san.tk", true },
- { "ikaria.com.gr", true },
- { "ikeacareers.co.uk", true },
- { "ikebukuro-shame.com", true },
- { "ikedaquotes.org", true },
- { "ikespta.com", true },
- { "ikeyless.com", true },
- { "ikfloreer.nu", true },
- { "ikigaiweb.com", true },
- { "ikiler.com", true },
- { "ikinokori-marketing.com", true },
- { "ikisser.de", true },
- { "ikk.me", true },
- { "ikkatsu-satei.jp", true },
- { "ikke-coach.nl", true },
- { "ikkev.de", true },
- { "ikkoku.de", true },
- { "iklive.org", false },
- { "iknet.top", true },
- { "ikparis.com", true },
- { "ikraenglish.com", false },
- { "iksi.cc", true },
- { "ikud-seminare.de", true },
- { "ikud.de", true },
- { "ikulist.me", true },
- { "ikvts.de", true },
- { "ikwilthepiratebay.org", true },
- { "ikx.me", true },
- { "ila.fi", true },
- { "ilab.health", true },
- { "ilacrehberi.com", true },
- { "ilamparas.at", true },
- { "ilamparas.co.uk", true },
- { "ilamparas.com", true },
- { "ilamparas.com.co", true },
- { "ilamparas.com.ve", true },
- { "ilamparas.mx", true },
- { "ilard.fr", true },
- { "ilazycat.com", true },
- { "ilbiscottificiodipamparato.it", true },
- { "ilc510.com", true },
- { "ilc518.com", true },
- { "ilc519.com", true },
- { "ilc520.com", true },
- { "ilc525.com", true },
- { "ilc528.com", true },
- { "ilc552.com", true },
- { "ilc553.com", true },
- { "ilc568.com", true },
- { "ilc583.com", true },
- { "ilc588.com", true },
- { "ilc66.com", true },
- { "ilc999.com", true },
- { "ilctucson.com", true },
- { "ildomani.it", true },
- { "ile-kalorii.pl", true },
- { "ile-sapporo.jp", true },
- { "ilektronika-farmakeia-online.gr", true },
- { "ilemonrain.com", true },
- { "iletisimmakinesi.com", true },
- { "ilformichiere.com", true },
- { "ilfumoshop.ru", true },
- { "ilg.ink", true },
- { "ilgiornaledelticino.ch", true },
- { "ilhan.name", true },
- { "iliastsi.net", true },
- { "iligang.cn", true },
- { "iligang.com", true },
- { "iligang.com.cn", true },
- { "iligang.link", true },
- { "iligang.net", true },
- { "iligang.net.cn", true },
- { "iligang.xin", true },
- { "iliz-kafe.fr", true },
- { "ilkeakyildiz.com", false },
- { "illambias.ch", false },
- { "illange.info", true },
- { "illavobuempliz.ch", true },
- { "illegalpornography.com", true },
- { "illegalpornography.me", true },
- { "illerzell.de", true },
- { "illich.cz", true },
- { "illicitart.ca", true },
- { "illicitdigital.com", true },
- { "illinoiscaselaw.com", true },
- { "illorenese.fr", true },
- { "illsley.org", true },
- { "illumed.net", true },
- { "illuminatiofficial.vip", true },
- { "illuminationis.com", true },
- { "illuminatisocietyworldwide.org", true },
- { "illusionephemere.com", false },
- { "illusionunlimited.com", true },
- { "illustrate.biz", true },
- { "illuxat.com", true },
- { "ilmainensanakirja.fi", true },
- { "ilmataat.ee", true },
- { "ilmiobusinessonline.it", true },
- { "ilmiogiardiniere.it", true },
- { "ilmuk.org", false },
- { "iloft.xyz", true },
- { "ilonewolfs.com", true },
- { "ilookz.nl", true },
- { "ilove.fish", true },
- { "ilove588.com", true },
- { "ilove618.com", true },
- { "ilove918.com", true },
- { "iloveherb.ru", true },
- { "ilovelwy.com", true },
- { "ilovemychi.com", true },
- { "ilovesamara.tk", true },
- { "ilovestickers.gr", true },
- { "ilovethiscampsite.com", true },
- { "iloveyoutoo.tk", true },
- { "ilrg.com", true },
- { "iltec-prom.ru", true },
- { "iltec.ru", true },
- { "ilug-ktm.tk", true },
- { "ilumantio.tk", true },
- { "ilweb.es", true },
- { "ilya.pp.ua", true },
- { "im-a.cricket", true },
- { "im-c-shop.com", true },
- { "im-haus-sonnenschein.de", true },
- { "im-in.space", true },
- { "im2net.com", true },
- { "im4h.de", true },
- { "im4h.eu", true },
- { "im4h.info", true },
- { "im66.net", true },
- { "imacs.org", true },
- { "image-drive.de", true },
- { "image.hosting", true },
- { "image.tf", false },
- { "imagebin.ca", true },
- { "imagecurl.com", true },
- { "imagecurl.org", true },
- { "imagefu.com", true },
- { "imagerive.ch", false },
- { "imageshare.web.id", true },
- { "imagevillage.ir", true },
- { "imaginair.es", true },
- { "imaginary.ca", true },
- { "imaginary.stream", true },
- { "imaginationpathway.com", true },
- { "imagine-programming.com", true },
- { "imaginelab.club", true },
- { "imaginetricks.com", true },
- { "imagr.io", true },
- { "imanageproducts.co.uk", true },
- { "imanageproducts.uk", true },
- { "imanesdeviaje.com", true },
- { "imanolbarba.net", true },
- { "imap2imap.de", true },
- { "imaple.org", true },
- { "imawhale.com", true },
- { "imaxinaria.org", true },
- { "imbdagency.com", true },
- { "imbianchino.roma.it", true },
- { "imcassociation.com", true },
- { "imcreative.ro", true },
- { "imcsi.cn", true },
- { "imcsx.co", true },
- { "imdemos.com", true },
- { "ime-a-tolerancia-eredmenye.club", true },
- { "ime.moe", true },
- { "imed.com.pt", true },
- { "imed.pt", true },
- { "imedes.de", true },
- { "imedia.com.sg", true },
- { "imediafly.com", true },
- { "imedikament.de", true },
- { "imeds.pl", true },
- { "imex-dtp.com", true },
- { "imforza.com", true },
- { "img.com.ru", true },
- { "img.mg", true },
- { "img.ovh", true },
- { "img.ren", true },
- { "imgaa.com", true },
- { "imgal.vin", true },
- { "imgbb.com", true },
- { "imgbu.com", true },
- { "imgg.es", true },
- { "imgul.net", true },
- { "imgup.co", true },
- { "imguploaden.nl", true },
- { "imgx.eu.org", true },
- { "imhua.com", true },
- { "imi-rhapsody.eu", false },
- { "iminshell.com", false },
- { "imirhil.fr", true },
- { "imisa.com.mx", true },
- { "imitza.com", false },
- { "imjad.cn", true },
- { "imjo.in", true },
- { "imjustcreative.com", true },
- { "imkerei-contento.de", false },
- { "imkerei-freilinger.de", false },
- { "imkereicontento.de", false },
- { "imkerverein-moenchswald.de", true },
- { "imkerverenigingzaanstreek.nl", true },
- { "imkindofabigdeal.com", true },
- { "imlec.net", true },
- { "imlhx.com", true },
- { "immanuellutheranmedia.org", true },
- { "immaterium.de", true },
- { "immatix.xyz", true },
- { "immedia.net", true },
- { "immedicohospitalario.es", true },
- { "immense.ly", true },
- { "immersa.co.uk", true },
- { "immersion-pictures.com", true },
- { "immigrantdad.com", true },
- { "immivest.com", true },
- { "immo-agentur.com", false },
- { "immo-passion.net", false },
- { "immobilien-badlippspringe.de", true },
- { "immobilien-in-istanbul.de", true },
- { "immobilien-marschner-stiftung.de", true },
- { "immobilien-zirm.de", true },
- { "immobiliengutachter-holland.de", true },
- { "immobilier-nice.fr", true },
- { "immobilier92.net", true },
- { "immobiza.com", false },
- { "immortal-pc.info", true },
- { "immortal.run", true },
- { "immortec.com", true },
- { "immovit.be", true },
- { "imobile3.com", true },
- { "imoe.xyz", true },
- { "imokuri123.com", true },
- { "imolights.com", true },
- { "imolights.net", true },
- { "imolog.cl", true },
- { "imoney.tw", true },
- { "imouto.my", false },
- { "imoveisavenda.rio.br", true },
- { "impact-fluids.com", true },
- { "impact.health.nz", true },
- { "impactcalifornia.com", true },
- { "impacter.eu", true },
- { "impactingsports.com", true },
- { "impactparcels.co.uk", true },
- { "impactparcels.com", true },
- { "impactpub.ch", false },
- { "impakho.com", true },
- { "impas.se", true },
- { "impelup.com", true },
- { "impera.at", true },
- { "imperial-legrand.com", true },
- { "imperialmiami.com", true },
- { "imperiodigital.online", true },
- { "imperiumglass.com.au", true },
- { "imphotep.net", true },
- { "impiantistica.org", true },
- { "implantica.com", true },
- { "impns.org", true },
- { "imponet.com.ar", true },
- { "import-shopping.de", true },
- { "importsagt.com", true },
- { "importsign.com", true },
- { "impossible.co", true },
- { "impossible.org", true },
- { "impossiblefitness.com", true },
- { "impossiblehq.com", true },
- { "impossiblenutrition.com", true },
- { "impossiblex.com", true },
- { "impotsimple.ca", true },
- { "imppac-schmuck.de", true },
- { "imppac.de", true },
- { "imprendo.co", true },
- { "imprendo.pro", true },
- { "impresa-di-pulizie.milano.it", true },
- { "impresa-di-pulizie.org", true },
- { "impresa-pulizie.it", true },
- { "impresadipulizie.roma.it", true },
- { "impresadipulizieantonella.com", true },
- { "impresaedile.roma.it", true },
- { "impresapulizia.milano.it", true },
- { "impresapulizie.firenze.it", true },
- { "impresapuliziebergamo.it", true },
- { "imprezzor.com", true },
- { "imprimante-3d-store.fr", true },
- { "improfestival.ee", true },
- { "improklinikken.dk", true },
- { "improv.ee", true },
- { "improved-madness.de", true },
- { "improvenerg.com", true },
- { "impyus.com", true },
- { "imququ.com", true },
- { "imreh.net", true },
- { "imrunner.com", true },
- { "imrunner.ru", true },
- { "ims-sargans.ch", true },
- { "imscompany.com", true },
- { "imstocker.com", true },
- { "imwalking.de", true },
- { "imwjc.xyz", true },
- { "imy.rs", true },
- { "imydl.com", true },
- { "imydl.tech", true },
- { "imyjy.cn", true },
- { "imyrs.cn", true },
- { "imyunya.com", true },
- { "imyz.tw", true },
- { "in-depthgame.reviews", true },
- { "in-depthoutdoors.com", true },
- { "in-flames.com", true },
- { "in.search.yahoo.com", false },
- { "in.xero.com", false },
- { "in1000worten.de", true },
- { "in10tion.com", false },
- { "in2-comms.com", true },
- { "inabox.ro", true },
- { "inait.ai", true },
- { "inalvittile.cf", true },
- { "inanam.tk", true },
- { "inanyevent.london", true },
- { "inares.org", true },
- { "inbitcoin.it", true },
- { "inbound.menu", true },
- { "inbound.tk", true },
- { "inbounder.io", false },
- { "inbox.google.com", true },
- { "inboxceo.com", true },
- { "inbulgaria.info", true },
- { "incarceratedwombats.com", true },
- { "incarna.co", true },
- { "incert.cn", true },
- { "incertint.com", true },
- { "inche-ali.com", true },
- { "inchenaim.com", true },
- { "inchidi.id", true },
- { "incigma.com", false },
- { "incisivea.com", true },
- { "includesubdomains.preloaded.test", true },
- { "includesubdomains2.preloaded.test", true },
- { "inclusion.tn", true },
- { "inclusiv.nl", true },
- { "incoherent.ch", true },
- { "income.wiki", true },
- { "incommon.io", true },
- { "incompliance.de", true },
- { "inconcerts.de", true },
- { "incore.nl", true },
- { "incosi.com", true },
- { "incowrimo.org", true },
- { "incparadise.net", true },
- { "incrementation.net", true },
- { "incrom.com", true },
- { "incy.io", true },
- { "ind.ie", true },
- { "indasun.com", true },
- { "indecipherable.info", true },
- { "independencerecovery.com", true },
- { "independenttravelcats.com", true },
- { "index-mp3.com", true },
- { "indexcesmad.cz", true },
- { "indexer.net", true },
- { "indexmarket.ml", true },
- { "indexsalaire.be", true },
- { "indiaflowermall.com", true },
- { "indiafm.tk", true },
- { "indialocaltours.com", true },
- { "indian-elephant.com", true },
- { "indianaberry.com", true },
- { "indianafoundationpros.com", true },
- { "indianamoldrepairpros.com", true },
- { "indianapolisnews.ml", true },
- { "indianareflux.com", true },
- { "indianawaterdamagerepairpros.com", true },
- { "indianerschmuck24.de", true },
- { "indiansmartpanel.com", true },
- { "indianvisa.online", true },
- { "indiapur.com", true },
- { "indiatrademarkwatch.com", true },
- { "indiayogastudio.net", true },
- { "indie.dog", true },
- { "indiecongdr.it", true },
- { "indievelopment.nl", true },
- { "indigartbeading.ca", true },
- { "indigartbeading.com", true },
- { "indigoblack.com.au", true },
- { "indigobooks.gq", true },
- { "indigoinflatables.com", true },
- { "indigojewelers.com", true },
- { "indigolawnscape.net", true },
- { "indigosakura.com", true },
- { "indigostudios.com", true },
- { "indigotreeservice.com", true },
- { "indio.co.jp", true },
- { "inditip.com", true },
- { "inditoot.com", true },
- { "individualizedwellness.net", true },
- { "indochina.io", true },
- { "indogermanstartup.com", true },
- { "indoor-kletterwald.de", true },
- { "indoorcomfortteam.com", true },
- { "indoorpaintball.co.uk", true },
- { "indospot.tk", true },
- { "indota.hu", true },
- { "indovinabank.com.vn", true },
- { "indrebuild.com", true },
- { "indusap.com", true },
- { "industriafranchini.com", true },
- { "industrial-remote-control.com", true },
- { "industriemeister.io", true },
- { "industryperspectives.com", true },
- { "indybay.org", true },
- { "ineardisplay.com", false },
- { "ineed.coffee", false },
- { "ineffect.net", true },
- { "inefin.tk", true },
- { "inegol.mobi", true },
- { "inesfinc.es", true },
- { "inesta.nl", true },
- { "inet.se", true },
- { "inethost.eu", true },
- { "inetpub.cn", true },
- { "inetserver.eu", true },
- { "inetsoftware.de", true },
- { "inewroom.com", true },
- { "inf-fusion.ca", true },
- { "inf0sec.nl", true },
- { "infans.be", true },
- { "inference.biz.tr", true },
- { "infermiere.roma.it", true },
- { "inff.info", true },
- { "inffin-portal.de", true },
- { "inficom.org", true },
- { "infihow.com", true },
- { "infinipharm.com", true },
- { "infinitescript.com", true },
- { "infinitiofallentownparts.com", true },
- { "infinitioflynnwoodparts.com", true },
- { "infinitomaisum.com", true },
- { "infinity-uitvaartzorg.nl", true },
- { "infinity3dengine.com", true },
- { "infinitybas.com", true },
- { "infinitybc.se", true },
- { "infinityepos.co.uk", true },
- { "infinityvr.net", true },
- { "infirmiere-canadienne.com", true },
- { "infirmieredevie.ch", false },
- { "infivalle.gov.co", true },
- { "inflatablehire-scotland.co.uk", true },
- { "inflatablesny.com", true },
- { "inflatadays.co.uk", true },
- { "inflatamania.com", true },
- { "inflated.cloud", true },
- { "inflatiecalculator.nl", true },
- { "inflationstation.net", true },
- { "inflexsys.com", true },
- { "influo.com", true },
- { "infmed.com", true },
- { "info-beamer.com", true },
- { "info-bolivia.tk", true },
- { "info-o-zbozi.cz", true },
- { "info-screen-usercontent.me", true },
- { "info-screen.me", true },
- { "info-screw.com", true },
- { "infoamin.com", true },
- { "infobae.com", true },
- { "infobot.email", true },
- { "infobot.eu", true },
- { "infobot.nl", true },
- { "infobrain.net", true },
- { "infocoin.es", true },
- { "infocommsociety.com", true },
- { "infocon.org", true },
- { "infocus.company", true },
- { "infocusvr.net", true },
- { "infodesigners.eu", true },
- { "infodesk.at", true },
- { "infodiscus.com", true },
- { "infofamouspeople.com", true },
- { "infogram.com", true },
- { "infogym.com", true },
- { "infohub.com.ua", true },
- { "infoland.ml", true },
- { "infomax.gr", true },
- { "infomegastore.com", true },
- { "infomir.eu", true },
- { "infomisto.com", true },
- { "infomundord.com", true },
- { "infopico.com", true },
- { "infopier.sg", true },
- { "infoprofuse.com", true },
- { "infoprosnetwork.co", true },
- { "infoprosnetwork.com", true },
- { "infor-allaitement.be", true },
- { "informace-zbozi.cz", true },
- { "informat.ga", true },
- { "informatiebeveiliging.nl", true },
- { "informatiger.net", true },
- { "informatik-handwerk.de", true },
- { "informationrx.org", true },
- { "informations-echafaudages.com", true },
- { "informhealth.com", true },
- { "informnapalm.org", true },
- { "informspb.tk", true },
- { "infosec-handbook.eu", true },
- { "infosec.exchange", false },
- { "infosec.wiki", true },
- { "infosecchicago.com", true },
- { "infosectalks.com", true },
- { "infosectekniques.com", true },
- { "infosective.org", true },
- { "infosenior.ch", true },
- { "infosexual.com", true },
- { "infosubasta.es", true },
- { "infotainworld.com", true },
- { "infotune.nl", true },
- { "infovb.org", true },
- { "infovision-france.com", true },
- { "infra.beer", true },
- { "infra.land", true },
- { "infraball.com", true },
- { "infrabeep.com", true },
- { "infrabeta.com", true },
- { "infrabind.com", true },
- { "infrabold.com", true },
- { "infrabond.com", true },
- { "infraboom.com", true },
- { "infraclass.com", true },
- { "infraclip.com", true },
- { "infracron.com", true },
- { "infradart.com", true },
- { "infradeep.com", true },
- { "infradisk.com", true },
- { "infradrop.com", true },
- { "infraedifice.com", true },
- { "infrafile.com", true },
- { "infrafind.com", true },
- { "infrafire.com", true },
- { "infraflip.com", true },
- { "infraflux.com", true },
- { "infrafuse.com", true },
- { "infrafusion.com", true },
- { "infraget.com", true },
- { "infralira.com", true },
- { "infralist.com", true },
- { "infraloon.com", true },
- { "inframake.com", true },
- { "inframeet.com", true },
- { "inframenu.com", true },
- { "inframetro.com", true },
- { "inframint.com", true },
- { "infraname.com", true },
- { "infranest.com", true },
- { "infranium.com", true },
- { "infranium.eu", true },
- { "infranium.info", true },
- { "infranium.net", true },
- { "infranium.org", true },
- { "infranotes.com", true },
- { "infranoto.com", true },
- { "infranox.com", true },
- { "infrapass.com", true },
- { "infrapeer.com", true },
- { "infrapilot.com", true },
- { "infraping.com", true },
- { "infrapirtis.lt", true },
- { "infraplot.com", true },
- { "infrarank.com", true },
- { "infrarank.net", true },
- { "infraredradiant.com", true },
- { "infrarot-thermometer.info", true },
- { "infraspin.com", true },
- { "infratank.com", true },
- { "infratask.com", true },
- { "infrathink.com", true },
- { "infratrip.com", true },
- { "infravibe.com", true },
- { "infravideo.com", true },
- { "infravoce.com", true },
- { "infrazine.com", true },
- { "ing-buero-junk.de", true },
- { "ing89.cc", true },
- { "ing89.com", true },
- { "ingadesign.it", true },
- { "ingatlanjogaszok.hu", true },
- { "ingber.com", true },
- { "inge-r.nl", true },
- { "inge.ec", true },
- { "ingeeibach.de", true },
- { "ingeni.ink", true },
- { "ingenias.es", true },
- { "ingenius.ws", true },
- { "ingermany.ml", true },
- { "ingestion.life", true },
- { "ingi.ga", true },
- { "ingjobs.ch", true },
- { "inglebycakes.co.uk", true },
- { "inglesencanada.cf", true },
- { "inglesnarede.com.br", true },
- { "ingo-schlueter.de", true },
- { "ingolonde.pw", true },
- { "ingoschlueter.de", true },
- { "ingressfs.pl", true },
- { "ingridvandamme.nl", true },
- { "inhaltsangabe.de", true },
- { "inhouseents.co.uk", true },
- { "iniby.com", true },
- { "inima.org", true },
- { "inishbofin.ie", true },
- { "init.blog", true },
- { "initiative-digitalisierung-kmu.de", true },
- { "initramfs.io", true },
- { "initrd.net", true },
- { "injapan.nl", true },
- { "injigo.com", false },
- { "injurylawyer.com", true },
- { "ink.horse", true },
- { "inkable.com.au", true },
- { "inkbunny.net", true },
- { "inkdrop.co.za", true },
- { "inkeliz.com", true },
- { "inkerotic.com", true },
- { "inkhor.se", true },
- { "inkomensafhankelijkehuurverhoging.nl", true },
- { "inkopers.org", true },
- { "inksay.com", true },
- { "inkspire.co.uk", true },
- { "inkthreadable.co.uk", true },
- { "inkurz.de", true },
- { "inlabo.de", true },
- { "inline-sport.cz", true },
- { "inlinea.ch", true },
- { "inlineskating.ga", true },
- { "inlink.ee", true },
- { "inlt.com", true },
- { "inmaps.xyz", true },
- { "inmatefinancial.com", true },
- { "inmateintake.com", true },
- { "inmatesupport.org", true },
- { "inmedic.pl", true },
- { "inmedsm.com", true },
- { "inmigracion-florida.com", true },
- { "inmobillium.fr", true },
- { "inmueblescartagena.com.co", true },
- { "innerfence.com", true },
- { "innerlightcrystals.co.uk", true },
- { "innermostparts.org", true },
- { "innersafe.com", true },
- { "innico.cf", true },
- { "inno.ch", false },
- { "innocenceseekers.net", true },
- { "innogen.fr", true },
- { "innohb.com", true },
- { "innolabfribourg.ch", true },
- { "innoraft.com", true },
- { "innot.net", true },
- { "innotas.com", true },
- { "innoteil.com", true },
- { "innoteknology.com", true },
- { "innotel.com.au", true },
- { "innovairservices.ch", true },
- { "innovamag.com", true },
- { "innovaptor.at", true },
- { "innovaptor.com", true },
- { "innovate-indonesia.com", true },
- { "innovation-photography.co.uk", true },
- { "innovation-workshop.ro", true },
- { "innovation.gov", false },
- { "innovationacademy.uk", true },
- { "innover.se", true },
- { "innovomuebles.com", true },
- { "innovum.cz", true },
- { "innsalzachsingles.de", true },
- { "innvisiondesign.net", true },
- { "innwan.com", true },
- { "inoa8.com", true },
- { "inocelda.com", true },
- { "inodari.com", true },
- { "inoio.de", true },
- { "inondation.ch", false },
- { "inovatec.com", true },
- { "inovatecapi.com", true },
- { "inovatecsystems.com", true },
- { "inovitec.eu", false },
- { "inoxdesign.fr", true },
- { "inoxdesign.pro", true },
- { "inoxmavang.net", true },
- { "inpas.co.uk", true },
- { "inpatec.com", true },
- { "inpdp.tk", true },
- { "inpector.de", true },
- { "inphi.com", true },
- { "inprotec.com.co", true },
- { "input.pt", true },
- { "inputmodes.com", true },
- { "inquant.de", true },
- { "ins-kreativ.de", true },
- { "ins.to", true },
- { "ins1gn1a.com", true },
- { "inscomers.net", false },
- { "inscribe.ai", true },
- { "inscripcionessena.com", true },
- { "insecret.co.ua", true },
- { "insecret.com.ua", true },
- { "insecret.trade", true },
- { "insecure.org.je", true },
- { "insegne.roma.it", true },
- { "insertcoins.net", true },
- { "insertwh.at", true },
- { "inserzioniticino.ch", true },
- { "insgesamt.net", true },
- { "inshapenutrition.com.br", true },
- { "insho.fashion", true },
- { "inshop.hu", true },
- { "insiberia.tk", true },
- { "inside19.com", true },
- { "insideaudit.com", true },
- { "insidebedroom.com", true },
- { "insideevs.com", true },
- { "insideevs.fr", true },
- { "insidesolutions.nl", true },
- { "insidethefirewall.tk", true },
- { "insights.is", true },
- { "insignificant.space", true },
- { "insinuator.net", true },
- { "insistel.com", true },
- { "insomniasec.com", true },
- { "inspiratienodig.nl", true },
- { "inspired-creations.co.za", true },
- { "inspired-lua.org", true },
- { "inspiredlife.fun", true },
- { "inspiredrealtyinc.com", true },
- { "inspiresurgery.com", true },
- { "inspirez-vous-sophro.com", true },
- { "insside.net", true },
- { "insta-drive.com", true },
- { "instachina.ru", true },
- { "instafind.nl", true },
- { "instafuckfriend.com", true },
- { "instagc.com", true },
- { "instagram-atom.appspot.com", true },
- { "instagram.com", false },
- { "instagrammernews.com", true },
- { "instagramtweet.com", true },
- { "instahub.net", true },
- { "installatietechniekgresnigt.nl", true },
- { "installgentoo.net", true },
- { "instamojo.com", true },
- { "instant-clearance-sale.co.uk", true },
- { "instant-thinking.de", true },
- { "instant.io", true },
- { "instantdomainsearch.com", true },
- { "instantkhabar.com", true },
- { "instantmoron.com", true },
- { "instava.cz", true },
- { "instawierszyki.pl", true },
- { "instead.com.au", true },
- { "insteagle.com", true },
- { "instela.com", true },
- { "instelikes.com.br", true },
- { "instics.com", true },
- { "institut-confucius-montpellier.org", true },
- { "institut-uthyl.com", true },
- { "institutmaupertuis.hopto.org", true },
- { "institutogiuseppe.com", true },
- { "institutogiuseppe.com.ar", true },
- { "institutointersistemico.com.br", true },
- { "institutolancaster.com", true },
- { "institutomaritimocolombiano.com", true },
- { "instrumart.ru", false },
- { "insult.es", true },
- { "insurance321.com", true },
- { "insuranceonlinenow.com", true },
- { "insurediy.com.sg", true },
- { "insuremyworkcomp.com", true },
- { "insureon.com", true },
- { "int64software.com", true },
- { "intafe.co.jp", true },
- { "intakesync.com", true },
- { "intal.info", true },
- { "intarweb.ca", true },
- { "intasky.cz", true },
- { "intasky.sk", true },
- { "integ.jp", true },
- { "integralblue.com", true },
- { "integralkk.com", true },
- { "integralsalud.xyz", true },
- { "integrata.de", true },
- { "integratedmedicalonline.com", true },
- { "integratemyschool.com", true },
- { "integrateur-web-paris.com", true },
- { "integritet.com.se", true },
- { "integrity.gov", true },
- { "integrityglobal.com", true },
- { "integrityokc.com", true },
- { "integrityoklahoma.com", true },
- { "integromat.com", true },
- { "integroof.com", true },
- { "integsystem.com", true },
- { "intelhost.cl", true },
- { "intelhost.com", true },
- { "intelhost.com.ar", true },
- { "intelhost.com.br", true },
- { "intelhost.com.co", true },
- { "intelhost.com.mx", true },
- { "intelhost.com.pe", true },
- { "inteli.com.pl", true },
- { "intellar.com", true },
- { "intellectdynamics.com", true },
- { "intelliance.eu", true },
- { "intelligence-explosion.com", true },
- { "intelligenetics.com", true },
- { "intelligentcontacts.com", true },
- { "intellihr.io", true },
- { "intellimatica.se", true },
- { "intellimax.ir", true },
- { "intellinetixvibration.com", true },
- { "intellitonic.com", true },
- { "intelly.nl", true },
- { "intelly365.nl", true },
- { "intencje.pl", true },
- { "intensify.pictures", true },
- { "intensivpflege-sachsen.de", true },
- { "intentanalytica.com", true },
- { "inter-corporate.com", true },
- { "interaktiva.fi", true },
- { "interallied.org", true },
- { "interasistmen.se", true },
- { "interchanges.io", true },
- { "interconlarp.org", true },
- { "intercrosse.tk", true },
- { "interflores.com.br", true },
- { "interfug.de", true },
- { "intergozd.si", true },
- { "interiery-waters.cz", true },
- { "interimages.fr", true },
- { "interior-design-colleges.com", true },
- { "interiordesignsconcept.com", true },
- { "interisaudit.com", true },
- { "interlijn.nl", true },
- { "interlingvo.biz", true },
- { "intermax.nl", true },
- { "intermedinet.nl", true },
- { "interminsk.tk", true },
- { "intern-base.com", true },
- { "internalkmc.com", true },
- { "international-arbitration-attorney.com", true },
- { "international-friends.net", true },
- { "internationalfashionjobs.com", true },
- { "internationalschool.it", true },
- { "internationalstudentassociation.com", true },
- { "internationaltalento.it", true },
- { "internect.co.za", true },
- { "internet-aukcion.info", true },
- { "internet-meesters.nl", true },
- { "internet-pornografie.de", false },
- { "internet-software.eu", true },
- { "internet-tv4u.tk", true },
- { "internet42.tk", true },
- { "internetaanbieders.eu", true },
- { "internetbank.swedbank.se", true },
- { "internetbugbounty.com", true },
- { "internetbusiness-howto.com", true },
- { "internetcom.jp", true },
- { "internetfonden.se", true },
- { "internetinhetbuitengebied.nl", true },
- { "internetk.tk", true },
- { "internetloansdirect.com", true },
- { "internetmagaz.tk", true },
- { "internetmedia.si", true },
- { "internetmuseum.se", true },
- { "internetnz.nz", true },
- { "internetofdon.gs", true },
- { "internetoffensive.fail", true },
- { "internetofinsecurethings.com", true },
- { "internetovehazardnihry.cz", true },
- { "internetpro.me", true },
- { "internetstaff.com", true },
- { "internetstiftelsen.se", true },
- { "internettradie.com.au", true },
- { "internetzentrale.net", true },
- { "internetzonei.com", true },
- { "internewscast.com", true },
- { "internex.at", true },
- { "interparcel.com", true },
- { "interphoto.by", true },
- { "interpol.gov", true },
- { "interracial.dating", true },
- { "interseller.io", true },
- { "interssl.com", true },
- { "interstateautomotiveinc.com", true },
- { "interstateremovalists.sydney", true },
- { "intertime.services", true },
- { "interviewme.pl", true },
- { "interways.de", true },
- { "intheater.de", true },
- { "inthepicture.com", true },
- { "inthouse.cloud", true },
- { "intimznakomstvo.tk", true },
- { "intita.com", true },
- { "intmissioncenter.org", false },
- { "into-the-mountain.com", true },
- { "inton.biz", true },
- { "intoparking.com", true },
- { "intoparking.fi", true },
- { "intpforum.com", true },
- { "intr0.cf", true },
- { "intracdf.net", true },
- { "intrack.net.au", true },
- { "intradayseasonals.com", true },
- { "intranet.dvag", true },
- { "intraobes.com", true },
- { "intrasoft.com.au", true },
- { "intraxia.com", true },
- { "intrepy.com", true },
- { "intrigue3d.com", true },
- { "intrixgroup.com", true },
- { "intrixlifestyle.com", true },
- { "intropickup.ru", true },
- { "introspectivemarketresearch.com", true },
- { "introverted.ninja", true },
- { "intvonline.com", true },
- { "intxt.net", true },
- { "inu.codes", true },
- { "inu.nl", true },
- { "inumcoeli.com.br", true },
- { "inup.jp", true },
- { "inusasha.de", true },
- { "inuyasha-petition.tk", true },
- { "invadelabs.com", true },
- { "invalida.ru", true },
- { "invasion.com", true },
- { "invasivespeciesinfo.gov", true },
- { "inventaire.ch", false },
- { "inventionsteps.com.au", true },
- { "inventix.nl", true },
- { "inventoryimages.co.uk", true },
- { "inventoryimages.com", true },
- { "inventtatte.com", true },
- { "inventtheworld.com.au", true },
- { "inventum.cloud", true },
- { "inverselink-user-content.com", true },
- { "investactiv.tk", true },
- { "investarholding.nl", true },
- { "investigatore.it", true },
- { "investigatore.roma.it", true },
- { "investigatore.torino.it", true },
- { "investigazionimoretti.it", true },
- { "investinturkey.com.tr", true },
- { "investinweed.com", true },
- { "investor-academy.jp", true },
- { "investor.gov", true },
- { "investoren-beteiligung.de", true },
- { "investorforms.com", true },
- { "investpay.ru", true },
- { "investuji.net", true },
- { "invetep.sk", true },
- { "invidio.us", true },
- { "invinoaustria.com", true },
- { "invinoaustria.cz", true },
- { "invioinc.com", true },
- { "inviosolutions.com", true },
- { "invisible-college.com", true },
- { "invisiverse.com", true },
- { "invitacionesytarjetas.gratis", true },
- { "invitescene.com", true },
- { "invitethemhome.com", true },
- { "invkao.com", true },
- { "invoiced.com", true },
- { "involic.com", true },
- { "invsky.com", true },
- { "invuite.com.au", true },
- { "inwao.com", true },
- { "inwebo.com", true },
- { "inwestcorp.se", true },
- { "inyourcornerinsurance.com", true },
- { "inyourowntime.info", true },
- { "inyourowntime.zone", true },
- { "inyr.hu", true },
- { "inzdr.com", true },
- { "inzelabs.com", true },
- { "inzernettechnologies.com", true },
- { "ioactive.com", true },
- { "iocheck.com", true },
- { "iochen.com", true },
- { "iocurrents.com", true },
- { "iofort.com", true },
- { "ioliver.co.uk", true },
- { "iomedia.ch", true },
- { "iompost.com", true },
- { "iomstamps.com", true },
- { "iondrey.cf", true },
- { "iondrey.fr", true },
- { "iondrey.ga", true },
- { "iondrey.gq", true },
- { "iondrey.ml", true },
- { "iondrey.tk", true },
- { "ione.net.nz", true },
- { "ionlabs.kr", true },
- { "ionplesalexandru.com", true },
- { "ionspin.com", true },
- { "ionutnechita.ro", true },
- { "ionutnica.ro", true },
- { "ionx.co.uk", true },
- { "ioover.net", true },
- { "iop.intuit.com", false },
- { "iosartstudios.gr", true },
- { "iosecurity.co.za", true },
- { "ioslo.net", true },
- { "iosnoops.com", true },
- { "iossifovlab.com", true },
- { "iostream.by", true },
- { "iotac.xyz", true },
- { "iotorq.com", true },
- { "iotsys.in", true },
- { "iowaent.com", true },
- { "iowaschoolofbeauty.com", true },
- { "iowen.cn", true },
- { "ip-address.me", true },
- { "ip-hahn.de", true },
- { "ip-life.net", true },
- { "ip-tanz.com", true },
- { "ip.sb", true },
- { "ip3office.com", false },
- { "ip40.com", true },
- { "ip6.li", true },
- { "ipadkaitori.jp", true },
- { "ipal.im", true },
- { "ipal.name", true },
- { "ipal.pl", true },
- { "ipal.tel", true },
- { "ipanchev.com", true },
- { "iparkki.com", true },
- { "ipcareers.net", true },
- { "ipcyb.com", true },
- { "ipemcomodoro.com.ar", true },
- { "iperconnessi.it", true },
- { "ipfire.org", true },
- { "ipfirebox.de", true },
- { "ipfs.io", true },
- { "ipggroup.com", true },
- { "iphonekaitori.tokyo", true },
- { "iphoneunlock.nu", true },
- { "ipinfo.tw", true },
- { "iplantom.com", true },
- { "iplaycraft.ru", true },
- { "iplayradio.net", false },
- { "ipleak.net", true },
- { "ipledgeonline.org", false },
- { "iplist.cc", true },
- { "ipmonitoring.hu", true },
- { "ipo-times.jp", true },
- { "ipoisk.com.ua", true },
- { "ipokabu.net", true },
- { "ipomue.com", false },
- { "ipop.gr", true },
- { "iposm.net", true },
- { "ippawards.com", false },
- { "ipplans.com", true },
- { "ippo-juku.com", true },
- { "iprcenter.gov", true },
- { "ipresent.com", true },
- { "iprice.co.id", true },
- { "iprice.hk", true },
- { "iprice.my", true },
- { "iprice.ph", true },
- { "iprice.sg", true },
- { "iprice.vn", true },
- { "ipricethailand.com", true },
- { "iprim.ru", true },
- { "ipripojeni.cz", true },
- { "iproducemusic.com", true },
- { "ips-consult.nl", true },
- { "ips-ihre-pflege-sachsen.de", true },
- { "ips-sachsen.de", true },
- { "ipschool.spb.ru", true },
- { "ipsec.pl", true },
- { "ipsecurelink.com", true },
- { "ipso.paris", true },
- { "ipsum.dk", true },
- { "ipswitch.com.tw", true },
- { "iptops.com", true },
- { "iptvmaxx.com", true },
- { "iptvzoom.xyz", true },
- { "ipty.de", true },
- { "ipv4.cf", true },
- { "ipv4.co.il", true },
- { "ipv4.gr", true },
- { "ipv4.rip", true },
- { "ipv6-adresse.dk", true },
- { "ipv6-handbuch.de", true },
- { "ipv6.jetzt", false },
- { "ipv6vpn.net", true },
- { "ipvbook.com", true },
- { "iqboxy.com", true },
- { "iqos.ru", true },
- { "iqratunisie.com", true },
- { "iqsecurity.eu", true },
- { "iqskinclinics.com", true },
- { "iqsmn.org", true },
- { "iqtechportal.com", true },
- { "ir1s.com", false },
- { "irajsingh.tk", true },
- { "iramellor.com", true },
- { "irandex.ga", true },
- { "iranfilmcity.tk", true },
- { "iranian.lgbt", true },
- { "iranianholiday.com", true },
- { "iranjeunesse.com", true },
- { "iranonline.tk", true },
- { "iranturkey.info", true },
- { "iranwiki.ovh", true },
- { "iraqinews.ga", true },
- { "irasandi.com", true },
- { "irayo.net", true },
- { "irc-results.com", true },
- { "ircica.org", true },
- { "ircmett.de", true },
- { "ird.nz", true },
- { "ireaco.com", true },
- { "ireef.tv", true },
- { "ireland.gq", true },
- { "irelandondemand.ie", true },
- { "iren.ch", true },
- { "irenkuhn.ch", true },
- { "irequi.re", true },
- { "ireviewi.com", true },
- { "irf2.pl", true },
- { "irfan.id", true },
- { "irgendeine.cloud", true },
- { "irgit.pl", true },
- { "iridiumbrowser.de", true },
- { "irina-beauty.de", true },
- { "irioka.be", true },
- { "iriomote.com", true },
- { "iris-design.info", true },
- { "iris-insa.com", true },
- { "irish.dating", true },
- { "irishsessions.ch", true },
- { "irisjieun.com", true },
- { "irismq.fr", true },
- { "irkfap.com", true },
- { "irkutsk38.tk", true },
- { "irland-firma.com", true },
- { "irlfp.com", true },
- { "irmag.ru", true },
- { "irmgard-woelfle.de", true },
- { "irmgardkoch.com", true },
- { "irodorinet.com", true },
- { "iroise.ch", true },
- { "ironcarnival.com", true },
- { "ironfistdesign.com", true },
- { "ironfittings.com.br", true },
- { "ironhide.de", true },
- { "ironmountainsolutions.com", true },
- { "ironpeak.be", true },
- { "ironraven.ml", true },
- { "ironycats.net", true },
- { "irrewilse.se", true },
- { "irrigadorbucal.com", true },
- { "irritant.net", true },
- { "iruarts.ch", true },
- { "iruca.co", true },
- { "irvingramo.com", true },
- { "irxoo.com", true },
- { "iryodatumoguide.com", true },
- { "iryogakkai.jp", true },
- { "is-a-furry.org", true },
- { "is-rocket.science", true },
- { "is-socket.tk", true },
- { "isa357.com", true },
- { "isa5417.com", true },
- { "isaaccomputerscience.org", true },
- { "isaacdgoodman.com", false },
- { "isaackabel.cf", true },
- { "isaackabel.ga", true },
- { "isaackabel.gq", true },
- { "isaackabel.ml", true },
- { "isaackabel.tk", true },
- { "isaackhor.com", true },
- { "isaacman.tech", true },
- { "isaacmorneau.com", true },
- { "isaacpartnership.co.uk", true },
- { "isaacphysics.org", true },
- { "isaaczais.com", true },
- { "isab.top", true },
- { "isabelaflores.com", true },
- { "isabellavandijk.nl", true },
- { "isabelle-delpech.com", true },
- { "isabellehogarth.co.uk", true },
- { "isabelmurillo-ordonez.com", true },
- { "isakssons.com", true },
- { "isamay.es", true },
- { "isamiok.com", true },
- { "isaob.com", true },
- { "isara.com", true },
- { "isaropiping.fr", true },
- { "isavings.com", true },
- { "isayoga.de", true },
- { "isbaseballstillon.com", true },
- { "isbc-telecom.ru", true },
- { "isbengrumpy.com", true },
- { "iscert.org", true },
- { "iscontrol.com.mx", true },
- { "isdn.jp", true },
- { "isecrets.se", true },
- { "iservicio.mx", true },
- { "isg-tech.com", true },
- { "isgp-studies.com", false },
- { "ishamf.com", true },
- { "ishet.al", true },
- { "ishigurodo.com", true },
- { "ishiharaken.com", true },
- { "ishimen.co.jp", true },
- { "ishotagency.com", true },
- { "isidore.uk", true },
- { "isif-ostewg.org", true },
- { "isigmaonline.org", true },
- { "isil.fi", true },
- { "isimonbrown.co.uk", true },
- { "isincheck.com", true },
- { "isiso.com.tr", true },
- { "isitchristmas.com", true },
- { "isitcoffeetime.com", true },
- { "isitdoneyet.gov", true },
- { "isitef.com", true },
- { "iskaron.de", true },
- { "iskaz.rs", true },
- { "iskconnews.org", true },
- { "iskogen.nu", true },
- { "iskultur.com.tr", true },
- { "islam.si", true },
- { "islamabadcourt.tk", true },
- { "islamicarchitecturalheritage.com", true },
- { "islamicmarkets.com", true },
- { "islamicnews.tk", true },
- { "islamnewss.tk", true },
- { "island.studio", true },
- { "islandhosting.com", true },
- { "islandmapstore.com", true },
- { "islandsbanki.is", true },
- { "islavolcan.cl", true },
- { "isletech.net", true },
- { "isliada.org", true },
- { "islightdown.today", true },
- { "ismat.com", true },
- { "ismena.bg", true },
- { "ismywebsitepenalized.com", true },
- { "isn.cz", true },
- { "isocom.eu", true },
- { "isognattori.com", true },
- { "isolta.com", true },
- { "isolta.de", true },
- { "isolta.ee", true },
- { "isolta.fi", true },
- { "isolta.lv", true },
- { "isolta.se", true },
- { "isonet.fr", true },
- { "isopres.de", true },
- { "isotope.gov", true },
- { "isotopes.gov", true },
- { "isovideo.com", true },
- { "isowosi.com", true },
- { "ispfontela.es", true },
- { "ispmedipv6.se", true },
- { "israel-in-color.com", true },
- { "israelbiblicalstudies.com", true },
- { "israelbizreg.com", true },
- { "israelil-leumi.co.il", true },
- { "israelil-leumidev.azurewebsites.net", true },
- { "israelnewswire.tk", true },
- { "israelportalk.ml", true },
- { "isreedyinthe.uk", true },
- { "isreedyinthe.us", true },
- { "isreedyintheuk.com", true },
- { "issa.org.pl", false },
- { "issasfrissa.se", true },
- { "issforum.org", true },
- { "issio.net", true },
- { "issue.watch", true },
- { "issues.email", true },
- { "istanbul.systems", true },
- { "istdas.lol", true },
- { "istdieweltschonuntergegangen.de", true },
- { "isteinbaby.de", true },
- { "isterfaslur.com", true },
- { "istheapplestoredown.com", true },
- { "istheapplestoredown.de", true },
- { "istheinternetdown.com", true },
- { "istheinternetonfire.com", true },
- { "isthephone.com", true },
- { "istheservicedown.co.uk", true },
- { "istheservicedown.com", true },
- { "istheservicedowncanada.com", true },
- { "isthnew.com", true },
- { "istitutoricci.it", true },
- { "istitutovivaldi.it", true },
- { "istogether.com", true },
- { "istormsolutions.co.uk", true },
- { "istorrent.is", true },
- { "istschonsolangeinrente.de", true },
- { "istsi.org", true },
- { "isusemasa.com", false },
- { "isv.online", true },
- { "isvbscriptdead.com", true },
- { "isvsecwatch.org", true },
- { "iswapgh.com", true },
- { "isync2.me", true },
- { "isz.no", true },
- { "iszy.cc", true },
- { "it-academy.sk", true },
- { "it-boss.ro", true },
- { "it-faul.de", true },
- { "it-fernau.com", true },
- { "it-inside.ch", true },
- { "it-jobbank.dk", true },
- { "it-journal.de", true },
- { "it-kron.de", true },
- { "it-maker.eu", true },
- { "it-meneer.nl", true },
- { "it-rotter.de", true },
- { "it-schamans.de", true },
- { "it-service24.at", true },
- { "it-service24.ch", true },
- { "it-service24.com", true },
- { "it-shamans.de", true },
- { "it-shamans.eu", true },
- { "it-stack.de", true },
- { "it-support-nu.se", true },
- { "it-support-stockholm.se", true },
- { "it-support.one", true },
- { "it-supportistockholm.se", true },
- { "it-supportnu.se", true },
- { "it-swarm.net", true },
- { "it-tekniker.nu", true },
- { "it-ti.me", true },
- { "it-uws.com", false },
- { "it-world.eu", true },
- { "it-zt.at", true },
- { "it.search.yahoo.com", false },
- { "it1b.com", true },
- { "it4sure.nl", true },
- { "itactiq.com", true },
- { "itactiq.info", true },
- { "itaiferber.net", true },
- { "italbavaro.com", true },
- { "italia-store.com", true },
- { "italiachegioca.com", true },
- { "italian.dating", true },
- { "italianisiert.de", true },
- { "italianshoemanufacturers.com", true },
- { "italiansrent.com", true },
- { "italiataxi.ru", true },
- { "italiatopnews.tk", true },
- { "italieflydrive.nl", true },
- { "italiensk-tolk.dk", true },
- { "italik.co.uk", true },
- { "italserrande.it", true },
- { "italserver.com", true },
- { "italyinspires.com", true },
- { "itamservices.nl", true },
- { "itap.gov", true },
- { "itaporanga.se.gov.br", true },
- { "itb-online.co.uk", true },
- { "itbox.cl", true },
- { "itbrief.co.nz", true },
- { "itbrief.com.au", true },
- { "itcbuerobedarf.de", true },
- { "itchy.nl", true },
- { "itconsulting-wolfinger.de", true },
- { "itcs.services", true },
- { "itdaan.com", true },
- { "itdashboard.gov", true },
- { "itdata.ro", true },
- { "itdoneproperly.com", true },
- { "itdutchie.com", true },
- { "itecor.net", false },
- { "iteecafe.hu", true },
- { "iteha.de", true },
- { "iteli.eu", true },
- { "itemcreator.tk", true },
- { "itemmc.com", true },
- { "itemorder.com", true },
- { "itemstore.ir", true },
- { "iternalnetworks.com", true },
- { "iterror.co", true },
- { "itesign.de", true },
- { "itezu.ml", true },
- { "itfh.eu", true },
- { "itfix.cz", true },
- { "itfly.xyz", false },
- { "itgoesup.com", true },
- { "itgoesupent.com", true },
- { "itgoesupentertainment.com", true },
- { "ithakama.com", true },
- { "ithakama.cz", true },
- { "ithenrik.com", true },
- { "ithinc.net", true },
- { "ithink.cf", true },
- { "ithink.ml", true },
- { "ithjalpforetag.se", true },
- { "ithot.ro", true },
- { "itidying.com", true },
- { "itikon.com", true },
- { "itilo.de", true },
- { "itis.gov", true },
- { "itis4u.ch", true },
- { "itisyourmoney.co.uk", true },
- { "itkaufmann.at", true },
- { "itkonsultstockholm.se", true },
- { "itm-c.de", true },
- { "itmax.ua", true },
- { "itmedicinai.lt", true },
- { "itmindscape.com", true },
- { "itmustbee.com", true },
- { "itn.co.uk", true },
- { "itneeds.tech", true },
- { "itnota.com", true },
- { "itnow.ng", true },
- { "itochan.jp", true },
- { "itooky.com", true },
- { "itpanda.pl", true },
- { "itpro.ua", true },
- { "itraffic.tk", true },
- { "itraveille.fr", true },
- { "itreallyaddsup.com", true },
- { "itring.pl", false },
- { "itruss.com.tw", true },
- { "its-gutachten.de", true },
- { "its.gov", true },
- { "its420somewhere.com", true },
- { "itsabouncything.com", true },
- { "itsallaboutplumbing.com", true },
- { "itsallsotireso.me", true },
- { "itsaw.de", true },
- { "itsayardlife.com", true },
- { "itsblue.de", true },
- { "itsburning.nl", true },
- { "itschromeos.com", true },
- { "itsdcdn.com", true },
- { "itsecblog.de", true },
- { "itsecguy.com", true },
- { "itseeze.com", true },
- { "itseovn.com", true },
- { "itsevident.com", true },
- { "itsfitlab.com", true },
- { "itsgoingdown.org", false },
- { "itshka.rv.ua", true },
- { "itsig-faq.de", true },
- { "itsmyparty.ie", true },
- { "itsnotquitethehilton.com", false },
- { "itsok.de", true },
- { "itspartytimeonline.co.uk", true },
- { "itspersonaltraining.nl", true },
- { "itsquiet.org", true },
- { "itsryan.com", true },
- { "itsstefan.eu", true },
- { "itstatic.tech", true },
- { "itsuitsyou.co.za", true },
- { "itsuki.nl", true },
- { "itsundef.in", true },
- { "itsupportnacka.se", true },
- { "itsv.at", true },
- { "itswincer.com", true },
- { "itsynergy.co.uk", true },
- { "ittgame.tk", true },
- { "itvaatlik.ee", true },
- { "itzap.com.au", true },
- { "itzer.de", true },
- { "itzkavin.tk", true },
- { "iubuniversity.tk", true },
- { "iurisnow.com", false },
- { "iuyos.com", true },
- { "ivahbbiz.tk", true },
- { "ivan1874.dynu.net", true },
- { "ivanaleksandrov.com", true },
- { "ivanbenito.com", true },
- { "ivanboi.com", true },
- { "ivancacic.com", false },
- { "ivanderevianko.com", true },
- { "ivanmeade.com", true },
- { "ivanovolive.ru", true },
- { "ivaoru.org", true },
- { "ivendi.com", true },
- { "ivetazivot.cz", true },
- { "ivfausland.de", true },
- { "ivfmeds.com", true },
- { "ivig.com.br", true },
- { "ivisitorinsurance.com", true },
- { "ivo.co.za", true },
- { "ivocopro.com", true },
- { "ivocotec.com", true },
- { "ivocotec.de", true },
- { "ivolunteer.com.ph", true },
- { "ivopetkov.com", true },
- { "ivor.io", true },
- { "ivor.is", true },
- { "ivorvanhese.com", true },
- { "ivorvanhese.nl", true },
- { "ivoryandgrace.com", true },
- { "ivpn.net", true },
- { "ivre.rocks", true },
- { "ivsign.net", true },
- { "ivusn.cz", true },
- { "ivvl.ru", true },
- { "ivy-league-colleges.com", true },
- { "ivy.show", true },
- { "iwader.co.uk", true },
- { "iwalton.com", true },
- { "iwanttoliveinabunker.com", true },
- { "iwascoding.com", true },
- { "iwascoding.de", true },
- { "iwashealthy.com", true },
- { "iwatchcops.com", true },
- { "iwatchcops.org", true },
- { "iwatt.sk", true },
- { "iwch.tk", true },
- { "iwd.gc.ca", true },
- { "iwell.de", true },
- { "iwizerunek.pl", true },
- { "iww.me", true },
- { "ixds.org", true },
- { "ixio.cz", true },
- { "ixit.cz", true },
- { "ixquick-proxy.com", true },
- { "ixquick.co.uk", true },
- { "ixquick.com", true },
- { "ixquick.de", true },
- { "ixquick.eu", true },
- { "ixquick.fr", true },
- { "ixquick.info", true },
- { "ixquick.nl", true },
- { "ixuexi.tech", true },
- { "iyassu.com", true },
- { "iyc.web.tr", true },
- { "iycharter.com", false },
- { "iyn.me", true },
- { "iyouewo.com", true },
- { "iz8mbw.net", true },
- { "izamulhakeem.tk", true },
- { "izavel.com", true },
- { "izmirescort.tk", true },
- { "izntz.com", true },
- { "izodiacsigns.com", true },
- { "izolpoznan.pl", true },
- { "izs8.com", true },
- { "izt.tech", false },
- { "izttech.com", true },
- { "izuba.info", false },
- { "izumi-ryokan.com", true },
- { "izumi.tv", true },
- { "izuna.info", true },
- { "izxxs.com", true },
- { "izxxs.net", true },
- { "izxzw.net", true },
- { "izzys.casa", true },
- { "j-k-fischer-verlag.de", true },
- { "j-l.pw", true },
- { "j-navi.com", true },
- { "j-ph.ovh", true },
- { "j-robertson.com", true },
- { "j-sheekey.co.uk", true },
- { "j0bs.org", true },
- { "j0e.com", true },
- { "j0hndball.com", true },
- { "j0rj.com", true },
- { "j0s.at", true },
- { "j0s.eu", true },
- { "j15h.nu", true },
- { "j1879.com", true },
- { "j1visahealthinsurance.com", true },
- { "j2h.de", true },
- { "j32663.com", false },
- { "j32664.com", false },
- { "j32665.com", false },
- { "j32771.com", false },
- { "j32772.com", false },
- { "j32773.com", false },
- { "j32774.com", false },
- { "j32775.com", false },
- { "j3349.com", true },
- { "j36533.com", true },
- { "j36594.com", true },
- { "j3e.de", true },
- { "j51365.com", true },
- { "j5563.com", true },
- { "j5573.com", true },
- { "j5lx.de", true },
- { "j5lx.eu", true },
- { "j5lx.io", true },
- { "j605.tk", true },
- { "j8846.com", true },
- { "j8hs.com", true },
- { "j9504.com", true },
- { "j9507.com", true },
- { "j9508.com", true },
- { "j9511.com", true },
- { "j9514.com", true },
- { "j9515.com", true },
- { "j9516.com", true },
- { "j95app.com", true },
- { "j95cc.com", true },
- { "j95dd.com", true },
- { "j95ee.com", true },
- { "j95ios.com", true },
- { "j95ss.com", true },
- { "j95xx.com", true },
- { "j95zz.com", true },
- { "j9943.com", true },
- { "ja-gps.com.au", true },
- { "ja-hypnose.de", true },
- { "ja-no-me.ru", true },
- { "ja-publications.agency", true },
- { "ja-zur-gs.de", true },
- { "jaakkohannikainen.fi", true },
- { "jaalits.com", true },
- { "jaamaa.com", true },
- { "jaarvistech.com", true },
- { "jaba.hosting", true },
- { "jababu.cz", true },
- { "jabbari.io", true },
- { "jabber.at", true },
- { "jabber.uk", true },
- { "jabberd.org", true },
- { "jabberfr.org", true },
- { "jabbers.one", true },
- { "jabberzac.org", true },
- { "jaberg-rutschi.ch", true },
- { "jabergrutschi.ch", true },
- { "jability.ovh", true },
- { "jabjab.de", true },
- { "jacarandafinance.com.au", true },
- { "jacekowski.org", true },
- { "jacik.cz", true },
- { "jack-p2.tech", true },
- { "jackal-cogito.tk", true },
- { "jackassofalltrades.org", true },
- { "jackdawphoto.co.uk", true },
- { "jackf.me", true },
- { "jackflet.ch", true },
- { "jackgreenrealty.com", true },
- { "jackhoodtransportation.com", true },
- { "jackingsolutions.com", true },
- { "jackpothappy.com", true },
- { "jackrussel.tk", true },
- { "jacksanalytics.com", true },
- { "jacksball.com", true },
- { "jackson-quon.com", true },
- { "jackson.jp", true },
- { "jacksonhu.com", true },
- { "jacksorrell.com", true },
- { "jackspub.net", true },
- { "jackwozny.com", true },
- { "jackyliao.me", true },
- { "jackyliao123.tk", true },
- { "jacobamunch.com", true },
- { "jacobi-server.de", true },
- { "jacobian.org", true },
- { "jacobjangles.com", true },
- { "jacobs-implantate.at", true },
- { "jacobsenarquitetura.com", true },
- { "jacquesdedixmude.eu", true },
- { "jacuzziprozone.com", true },
- { "jadchaar.me", true },
- { "jadesong.net", true },
- { "jadopado.com", true },
- { "jaduniv.cf", true },
- { "jaeger.link", true },
- { "jaegerlacke.de", true },
- { "jaepinformatica.com", true },
- { "jaetech.org", true },
- { "jagbouncycastles.co.uk", true },
- { "jagerman.com", true },
- { "jagido.de", true },
- { "jaguarlandrover-asse.be", false },
- { "jaguarlandrover-occasions.be", false },
- { "jaguarwong.xyz", true },
- { "jahanaisamu.com", true },
- { "jahner.xyz", true },
- { "jahofmann.de", false },
- { "jaiestate.com", true },
- { "jailbreakingisnotacrime.org", true },
- { "jailfood.ga", true },
- { "jaimesotelo.com", true },
- { "jaingynecology.com", true },
- { "jairbehr.com.br", true },
- { "jaisiam.co.th", true },
- { "jaispirit.com", true },
- { "jaitnetworking.com", false },
- { "jaja.wtf", true },
- { "jajsemjachym.cz", true },
- { "jak-na-les.cz", true },
- { "jakarta.dating", true },
- { "jakdelatseo.cz", true },
- { "jake.eu.org", true },
- { "jake.ml", true },
- { "jake.nom.za", true },
- { "jakecurtis.de", true },
- { "jakereynolds.co", true },
- { "jakerullman.com", true },
- { "jakeslab.tech", true },
- { "jakewestrip.com", true },
- { "jakob-server.tk", true },
- { "jakobejitblokaci.cz", true },
- { "jakobkrigovsky.com", true },
- { "jakobs.systems", true },
- { "jakobssystems.net", true },
- { "jakpremyslet.cz", true },
- { "jakse.fr", true },
- { "jakubklimek.com", true },
- { "jakubsindelar.cz", true },
- { "jakubtopic.cz", true },
- { "jakubvrba.cz", true },
- { "jala.co.jp", true },
- { "jaleo.cn", true },
- { "jalogisch.de", true },
- { "jaluzelemoderne.ro", true },
- { "jamaat.hk", true },
- { "jamalfi.bio", true },
- { "jamcyberinc.com", true },
- { "james-bell.co.uk", true },
- { "james-loewen.com", true },
- { "jamesachambers.com", true },
- { "jamesaimonetti.com", true },
- { "jamesbillingham.com", true },
- { "jameschorlton.co.uk", true },
- { "jamesdorf.com", true },
- { "jamesedition.com", true },
- { "jamesgreenfield.com", true },
- { "jameshemmings.co.uk", true },
- { "jameshost.net", true },
- { "jameshunt.us", false },
- { "jamesj.me", false },
- { "jamesjboyer.com", true },
- { "jamesmarsh.net", true },
- { "jamesmilazzo.com", true },
- { "jamesrobertson.io", true },
- { "jamesross.name", true },
- { "jamessmith.me.uk", true },
- { "jamestmartin.me", true },
- { "jamestown.de", false },
- { "jamesturnerstickley.com", true },
- { "jameswarp.com", true },
- { "jamesxu.com", true },
- { "jamhost.org", true },
- { "jamie-read-photography.com", true },
- { "jamie.ie", true },
- { "jamielinux.com", true },
- { "jamiemagee.co.uk", true },
- { "jamiemagee.dk", true },
- { "jamieweb.net", true },
- { "jamieweb.org", true },
- { "jamiewebb.net", true },
- { "jammucake.com", true },
- { "jammysplodgers.co.uk", true },
- { "jamon.ca", true },
- { "jamonsilva.com", true },
- { "jamstatic.fr", true },
- { "jan-and-maaret.de", true },
- { "jan-bucher.ch", true },
- { "jan-gerd.com", true },
- { "jan-hill.com", true },
- { "jan-reiss.de", true },
- { "jan-roenspies.de", true },
- { "jan-von.de", true },
- { "jan.gl", true },
- { "janata.net", true },
- { "janaundgeorgsagenja.eu", true },
- { "janbrodda.de", true },
- { "jandev.de", true },
- { "jane.com", true },
- { "janehamelgardendesign.co.uk", true },
- { "janelauhomes.com", true },
- { "janelle-jamer.tk", true },
- { "janellequintana.tk", true },
- { "janeweeber.com", true },
- { "janey.cf", true },
- { "janeymac.com", true },
- { "jangl.com", true },
- { "janhermann.cz", true },
- { "janhuelsmann.com", true },
- { "jani.media", true },
- { "janiat.com", true },
- { "janik.xyz", false },
- { "janikrabe.com", true },
- { "janjoris.nl", true },
- { "jankamp.com", true },
- { "janker.me", true },
- { "jann.is", true },
- { "jannekekaasjager.nl", true },
- { "jannyrijneveld.nl", true },
- { "janokacer.sk", true },
- { "janome.club", true },
- { "janome.com.ua", true },
- { "janostheil.de", true },
- { "janschaumann.de", true },
- { "janterpstra.eu", true },
- { "jantinaboelens.nl", true },
- { "janv.it", true },
- { "janvari.com", true },
- { "janvaribalint.com", true },
- { "janw.me", true },
- { "jaot.info", true },
- { "japanese-cuisine.com", true },
- { "japanesemotorsports.net", true },
- { "japaniac.de", false },
- { "japanphilosophy.com", false },
- { "japanrail.nl", true },
- { "japansm.com", true },
- { "japantravel.tk", true },
- { "japanwatches.xyz", true },
- { "japonyol.net", true },
- { "jaramilloconstrucciones.pe", true },
- { "jardineriaon.com", true },
- { "jaredfernandez.com", true },
- { "jaredfraser.com", true },
- { "jarmala.lt", true },
- { "jarmandental.com", true },
- { "jarmatys.pl", true },
- { "jarniashop.se", true },
- { "jarods.org", true },
- { "jaroku.com", true },
- { "jarondl.net", true },
- { "jarrah-alsilawi.com", true },
- { "jarrettgraham.com", true },
- { "jarroba.com", true },
- { "jas-team.net", true },
- { "jashvaidya.com", true },
- { "jasmijnwagenaar.nl", true },
- { "jasminlive.cam", true },
- { "jasnowidzkajowi.pl", true },
- { "jasonamorrow.com", true },
- { "jasonbassford.com", true },
- { "jasongerber.ch", false },
- { "jasonsplecoscichlids.com", true },
- { "jasonwei.nctu.me", true },
- { "jasper.link", true },
- { "jasperhammink.com", true },
- { "jasperhuttenmedia.com", true },
- { "jasperpatterson.me", true },
- { "jaspersreef.com", true },
- { "jaspven.net", true },
- { "jastrow.me", true },
- { "jaszbereny-vechta.eu", true },
- { "javaexpert.tk", true },
- { "javamilk.com", true },
- { "javanguiano.mx", true },
- { "javaxxz.com", true },
- { "javelin.cc", true },
- { "javfree.me", true },
- { "javhdmovies.com", true },
- { "javierburgos.net", true },
- { "javierflorescastillero.es", true },
- { "javierlorente.es", true },
- { "javiermascherano.tk", true },
- { "javiscoffee.com", true },
- { "jawo2008.pl", true },
- { "jaxfstk.com", true },
- { "jaxxnet.co.uk", true },
- { "jaxxnet.org", true },
- { "jaybrokers.com", true },
- { "jayceeprints.com", true },
- { "jayden.tech", true },
- { "jayf.de", true },
- { "jayfreestone.com", false },
- { "jayharkess.uk", true },
- { "jaylineko.com", true },
- { "jaymecd.rocks", true },
- { "jayrl.com", true },
- { "jaysaw.me", true },
- { "jaytx.com", true },
- { "jayxon.com", true },
- { "jayxu.com", true },
- { "jazminguaramato.com", true },
- { "jazz-alliance.com", true },
- { "jazz-alliance.org", true },
- { "jazzanet.com", true },
- { "jazzncheese.com", true },
- { "jazzy-feet.com", true },
- { "jazzy.id.au", true },
- { "jazzy.pro", true },
- { "jazzysumi.com", true },
- { "jb0.de", true },
- { "jb138.cc", true },
- { "jbbd.fr", true },
- { "jbc88.cc", true },
- { "jbdesignfoundations.com", true },
- { "jbholdings.co.uk", true },
- { "jblackweb.com", true },
- { "jbradaric.me", true },
- { "jbridal.com.au", true },
- { "jbs-jardins.ch", false },
- { "jbsinternational.com", true },
- { "jbt-stl.com", true },
- { "jcadg.com", true },
- { "jcai.dk", true },
- { "jcaicedo.com", true },
- { "jcb.com", true },
- { "jcbgolfandcountryclub.com", true },
- { "jch.xyz", true },
- { "jchn.be", true },
- { "jci.cc", true },
- { "jclynne.com", true },
- { "jcontspoord.nl", true },
- { "jcsesecuneta.com", true },
- { "jctf.team", true },
- { "jcus.co", true },
- { "jcwodan.nl", true },
- { "jcyz.cf", true },
- { "jd-group.co.uk", true },
- { "jd1.de", true },
- { "jd777.vip", true },
- { "jdassets.com", true },
- { "jdc.io", true },
- { "jdd888.cc", true },
- { "jdefreitas.com", true },
- { "jdegbau.com", true },
- { "jdheysupplies.co.uk", true },
- { "jdjohnsonmedia.com", true },
- { "jdjohnsonwaterproofing.com", true },
- { "jdm.elk.pl", true },
- { "jdm.pl", true },
- { "jdmgarage.com.au", true },
- { "jdncr.com", true },
- { "jdoi.pw", true },
- { "jdpleisure.co.uk", true },
- { "jdproofing.com", true },
- { "jdscastlehire.co.uk", true },
- { "jdtic.com", true },
- { "jdubya.info", true },
- { "je-vends.fr", false },
- { "je2050.de", true },
- { "jean-luc.org", true },
- { "jeancardeno.com", true },
- { "jeandanielfaessler.ch", true },
- { "jeankygourmet.com", true },
- { "jeanmarieayer.ch", true },
- { "jeannecalment.com", true },
- { "jeannelucienne.fr", true },
- { "jeanneret-combustibles.ch", false },
- { "jeans-shopping.tk", true },
- { "jeansdiscounter.de", true },
- { "jebengotai.com", true },
- { "jec-dekrone.be", true },
- { "jecjacshop.com", true },
- { "jed.site", true },
- { "jeda.ch", true },
- { "jedayoshi.com", true },
- { "jedcg.com", true },
- { "jedepannetonordi.fr", true },
- { "jedipedia.net", true },
- { "jediweb.com.au", true },
- { "jedmud.com", true },
- { "jedwarddurrett.com", true },
- { "jeec.ist", true },
- { "jeep4ik.com", true },
- { "jeepeg.com", true },
- { "jeeran.com", true },
- { "jeeranservices.com", true },
- { "jeff.forsale", true },
- { "jeffcloninger.net", true },
- { "jeffersonregan.co.uk", true },
- { "jeffersonregan.com", true },
- { "jeffersonregan.net", true },
- { "jeffhaferman.com", true },
- { "jeffpenchoff.com", true },
- { "jeffreyhaferman.com", true },
- { "jeffri.me", true },
- { "jeffsanders.com", true },
- { "jefftickle.com", true },
- { "jeffwebb.com", true },
- { "jefrydco.id", true },
- { "jefsweden.eu", true },
- { "jehelpdesk.nl", true },
- { "jej.cz", true },
- { "jej.sk", true },
- { "jekhar.com", true },
- { "jelena-adeli.com", true },
- { "jelenkovic.rs", true },
- { "jelewa.de", true },
- { "jell.ie", true },
- { "jelle.pro", true },
- { "jellebo.dk", true },
- { "jelleluteijn.com", true },
- { "jelleluteijn.eu", true },
- { "jelleluteijn.net", true },
- { "jelleluteijn.nl", true },
- { "jelleluteijn.pro", true },
- { "jelleraaijmakers.nl", true },
- { "jelly.cz", true },
- { "jellybeanbooks.com.au", true },
- { "jellyfish.co", true },
- { "jellyfloral.com", true },
- { "jellypepper.com", true },
- { "jellysquid.me", true },
- { "jelmer.uk", true },
- { "jelmoli-shop.ch", true },
- { "jem.gov", true },
- { "jemangeducheval.com", true },
- { "jembatankarir.com", true },
- { "jemefaisdesamis.com", true },
- { "jennethaarfotografie.nl", true },
- { "jennierobinson.com", true },
- { "jenniferengerwingaantrouwen.nl", true },
- { "jennifersauer.nl", true },
- { "jenniwiltz.com", true },
- { "jennysarl.ch", true },
- { "jennythebaker.com", true },
- { "jenolson.net", true },
- { "jenprace.cz", true },
- { "jensdesmeyter.be", true },
- { "jenslody.de", true },
- { "jensrex.dk", true },
- { "jeproteste.info", true },
- { "jeps.fi", true },
- { "jeremiahbenes.com", true },
- { "jeremy-chen.org", true },
- { "jeremy.hu", true },
- { "jeremybentham.com", true },
- { "jeremybloomfield.co.uk", true },
- { "jeremyc.ca", false },
- { "jeremycantu.com", true },
- { "jeremycrews.com", true },
- { "jeremynally.com", true },
- { "jeremytcd.com", true },
- { "jeremywinn.com", true },
- { "jeretec.com.br", true },
- { "jericamacmillan.com", true },
- { "jering.tech", true },
- { "jerisandoval.tk", true },
- { "jermann.biz", true },
- { "jeroendeneef.com", true },
- { "jeroendev.one", true },
- { "jerome.to", true },
- { "jerret.de", true },
- { "jerrysretailstores.com", true },
- { "jerrywang.website", true },
- { "jerryweb.org", true },
- { "jerryyu.ca", true },
- { "jerseybikehire.co.uk", true },
- { "jerseyink.net", true },
- { "jerseyjumpingbeans.co.uk", true },
- { "jerseylvi2013.org", true },
- { "jerseyplantsdirect.com", true },
- { "jerusalempersonals.ml", true },
- { "jesec.cn", true },
- { "jesec.io", true },
- { "jesecharlie.com", true },
- { "jesiensredniowiecza.pl", true },
- { "jesscharlie.com", true },
- { "jesse-charlie.com", true },
- { "jesse-charlie.net", true },
- { "jesse-charlie.org", true },
- { "jesse3.com", true },
- { "jesseblum.com", true },
- { "jessecharley.com", true },
- { "jessecharli.com", true },
- { "jessecharlie.co", true },
- { "jessecharlie.com", true },
- { "jessecharlie.info", true },
- { "jessecharlie.net", true },
- { "jessecharlie.org", true },
- { "jessecharlienaser.com", true },
- { "jesseerbach.com", true },
- { "jessekaufman.com", true },
- { "jessem.fr", true },
- { "jessenaser.com", true },
- { "jessenaser.net", true },
- { "jessenaser.org", true },
- { "jesseonline.tk", true },
- { "jessesjumpingcastles.co.uk", true },
- { "jessgranger.com", true },
- { "jessica-weller.de", true },
- { "jessicabenedictus.nl", false },
- { "jessicaevrard.com", true },
- { "jessicahrehor.com", true },
- { "jessicharlie.com", true },
- { "jessiecharlie.com", true },
- { "jessycharlie.com", true },
- { "jesters-court.net", true },
- { "jesuisadmin.fr", true },
- { "jesuisunpapageek.fr", true },
- { "jesuscnasistente.com", true },
- { "jesusthegoodshepherd.org", true },
- { "jesusvasquez.tk", true },
- { "jesusvazquez.online", true },
- { "jet-stream.fr", true },
- { "jetbbs.com", true },
- { "jetfirenetworks.com", true },
- { "jetflex.de", true },
- { "jetkittens.co.uk", true },
- { "jetsetboyz.net", true },
- { "jetsieswerda.nl", true },
- { "jetswhiteout.com", true },
- { "jettlarue.com", true },
- { "jettshome.org", true },
- { "jetwhiz.com", true },
- { "jeurissen.co", true },
- { "jeuxerotiques.net", true },
- { "jewadvert.ml", true },
- { "jeweet.net", true },
- { "jewishboyscouts.com", true },
- { "jewishquotations.com", true },
- { "jezeravillage.com", true },
- { "jezibaba.info", true },
- { "jf-beco.pt", true },
- { "jf-igrejanovadosobral.pt", true },
- { "jf886.cc", true },
- { "jfbst.net", true },
- { "jfgselbitztal.tk", true },
- { "jfr.im", true },
- { "jfreitag.de", false },
- { "jftw.org", true },
- { "jfvaccountants.nl", true },
- { "jg-skid.me", true },
- { "jgid.de", true },
- { "jgke.fi", true },
- { "jgoguen.ca", true },
- { "jgoldgroup.com", true },
- { "jgonzalezm.com", true },
- { "jgregory.co.uk", true },
- { "jgwb.de", true },
- { "jgwb.eu", true },
- { "jhalderm.com", true },
- { "jhaveri.net", true },
- { "jhe.li", true },
- { "jhill.de", true },
- { "jhollandtranslations.com", true },
- { "jhw3d.com", true },
- { "jhwestover.com", true },
- { "ji0vwl.net", true },
- { "jiahao.codes", true },
- { "jiangxu.site", true },
- { "jianji.de", true },
- { "jianshu.com", true },
- { "jianwei.wang", true },
- { "jianyuan.art", true },
- { "jiaty.com", true },
- { "jiayi.eu.org", true },
- { "jiayi.life", true },
- { "jicaivvip.com", true },
- { "jichi.io", true },
- { "jichi000.win", true },
- { "jiexi6.com", true },
- { "jif.gc.ca", true },
- { "jigsawplanet.com", true },
- { "jiji.co.ke", true },
- { "jiji.co.tz", true },
- { "jiji.com.gh", true },
- { "jiji.ke", true },
- { "jiji.ng", true },
- { "jiji.ug", true },
- { "jijistatic.com", true },
- { "jimbutlerkiaparts.com", true },
- { "jimcoggeshall.com", true },
- { "jimdorf.com", true },
- { "jime-hlavou.cz", true },
- { "jimeaton.com", true },
- { "jimfranke.com", true },
- { "jimfranke.nl", true },
- { "jimkimmel.com", true },
- { "jimmiestore.com", true },
- { "jimmycai.com", true },
- { "jimmycarterlibrary.gov", true },
- { "jimmyroura.ch", false },
- { "jimsefton.com", true },
- { "jimshaver.net", true },
- { "jimslop.nl", true },
- { "jinbijin.nl", true },
- { "jinbo123.com", false },
- { "jinbowiki.org", true },
- { "jinduoduo369.com", true },
- { "jing-in.com", true },
- { "jing-in.net", true },
- { "jing.su", true },
- { "jingbo.fan", true },
- { "jingjo.com.au", true },
- { "jingyunbank.com", true },
- { "jinja.ai", true },
- { "jinkuru.net", true },
- { "jino-jossy.appspot.com", true },
- { "jino.gq", true },
- { "jinshuju.net", true },
- { "jintaiyang123.org", true },
- { "jiogo.com", true },
- { "jirav.com", true },
- { "jiripik.com", true },
- { "jisai.net.cn", true },
- { "jischool.org", true },
- { "jisha.site", true },
- { "jitterbit.com", true },
- { "jittruckparts.com", true },
- { "jiu99shipin.com", true },
- { "jix.im", true },
- { "jixun.moe", true },
- { "jjhampton.com", true },
- { "jjj.blog", true },
- { "jjphospitalaria.com", true },
- { "jjspartyhire.co.uk", true },
- { "jjvanoorschot.nl", true },
- { "jk-entertainment.biz", true },
- { "jkbfabrics.com", true },
- { "jkbizsolutions.org", true },
- { "jkchocolate.com", true },
- { "jkdhn.me", true },
- { "jkg.tw", true },
- { "jki.io", true },
- { "jkinteriorspa.com", true },
- { "jkland.com", true },
- { "jkrippen.com", true },
- { "jkvov.com", true },
- { "jldp.org", true },
- { "jldrenergysaver.com", true },
- { "jlink.nl", true },
- { "jlkhosting.com", true },
- { "jloh.codes", true },
- { "jlponsetto.com", true },
- { "jlr-luxembourg.com", false },
- { "jltcsecuritygroup.com", true },
- { "jltctech.com", true },
- { "jm-bea.net", true },
- { "jmarciniak.it", true },
- { "jmbeautystudio.se", true },
- { "jmbelloteau.com", true },
- { "jmbmexico.com", true },
- { "jmcataffo.com", true },
- { "jmce.eu", true },
- { "jmdiesel.com", true },
- { "jmedved.com", true },
- { "jmentertainment.co.uk", true },
- { "jmfjltd.com", true },
- { "jmisern.com", true },
- { "jmk.hu", true },
- { "jmkrecords.fr", true },
- { "jmlogistica.com", true },
- { "jmorahan.net", true },
- { "jmpb.hu", true },
- { "jmsjms.cc", true },
- { "jmsjms.me", true },
- { "jmsjms.org", true },
- { "jmsjms.top", true },
- { "jmsjms.xyz", true },
- { "jmsolodesigns.com", true },
- { "jmssg.jp", true },
- { "jmstfv.com", true },
- { "jmsystems.sk", true },
- { "jmwap.com", true },
- { "jmzo.nl", true },
- { "jnjdj.com", true },
- { "jnm-art.com", true },
- { "jnordell.com", true },
- { "jnssnfotografie.nl", true },
- { "jnsz.hu", true },
- { "joa-ebert.com", true },
- { "joanjensen.net", true },
- { "joanofarcmtcarmel.org", true },
- { "joaoaugusto.net", false },
- { "joaobautista.com", true },
- { "joaopenteado.com", true },
- { "joaosampaio.com.br", true },
- { "job-chocolat.jp", true },
- { "job-ofertas.info", true },
- { "job-uber.com", true },
- { "job.biz.tr", true },
- { "jobalicious.nl", true },
- { "jobastudio.nl", true },
- { "jobatus.com.br", true },
- { "jobatus.es", true },
- { "jobatus.it", true },
- { "jobatus.mx", true },
- { "jobatus.pt", true },
- { "jobbidag.se", true },
- { "jobbkk.com", true },
- { "jobbsafari.no", true },
- { "jobbsafari.se", true },
- { "jobcorpsy2y.com", true },
- { "jobfury.com", true },
- { "jobify.in", true },
- { "jobindex.dk", true },
- { "jobit.gr", true },
- { "joblab.com.ua", false },
- { "joblife.co.za", true },
- { "jobmi.com", true },
- { "jobmiplayground.com", true },
- { "jobs.at", true },
- { "jobs.ch", true },
- { "jobs.su", true },
- { "jobs4sales.ch", true },
- { "jobseekeritalia.it", true },
- { "jobsindemedia.nl", true },
- { "jobsisbrown.com", true },
- { "jobsnet.eu", true },
- { "jobsuchmaschine.ch", true },
- { "jobtarget.com", true },
- { "jobtread.com", true },
- { "jobty.net", true },
- { "jobwinner.ch", true },
- { "jobzninja.com", true },
- { "jocelynjenkins.com", true },
- { "jockbusuttil.co.uk", true },
- { "jockbusuttil.com", true },
- { "jockbusuttil.uk", true },
- { "jocusvenlo.nl", true },
- { "jodaniels.photography", true },
- { "jodbush.com", true },
- { "jodlajodla.si", true },
- { "joduska.me", true },
- { "jodyboucher.com", false },
- { "jodyshop.com", true },
- { "joe262.com", true },
- { "joebiden.com", true },
- { "joedavison.me", true },
- { "joedeblasio.com", true },
- { "joedinardo.com", true },
- { "joedoyle.us", true },
- { "joefixit.co", true },
- { "joehenry.co.uk", true },
- { "joejacobs.me", true },
- { "joel.coffee", true },
- { "joeldrapper.com", true },
- { "joelfries.com", true },
- { "joelj.org", true },
- { "joelle.me", true },
- { "joelleandpeter.co.uk", true },
- { "joellimberg.com", true },
- { "joellombardo.com", false },
- { "joelmarkhamphotography.com.au", true },
- { "joelmunch.com", true },
- { "joelnichols.uk", true },
- { "joelotu.com", true },
- { "joelving.dk", true },
- { "joepitt.co.uk", false },
- { "joergschneider.com", true },
- { "joernwendland.de", true },
- { "joerss.at", true },
- { "joeskup.com", true },
- { "joespaintingpgh.com", true },
- { "joestead.codes", false },
- { "joetsutj.com", true },
- { "joetyson.me", true },
- { "joeyfelix.com", true },
- { "joeyhoer.com", true },
- { "joeysmith.com", true },
- { "joeyvanvenrooij.nl", true },
- { "jogjacar.com", true },
- { "jogosdeanimais.org", true },
- { "jogwitz.de", true },
- { "johan-koffeman.tk", true },
- { "johannes-bauer.com", true },
- { "johannes-sprink.de", false },
- { "johannes-zinke.de", true },
- { "johannes.io", true },
- { "johannes.wtf", true },
- { "johannesen.tv", true },
- { "johannfritsche.de", true },
- { "johanpeeters.com", true },
- { "johansf.tech", true },
- { "johego.org", true },
- { "johlmike.com", true },
- { "johnaltamura.com", true },
- { "johnathanhasty.com", true },
- { "johnball.co", true },
- { "johnbeil.com", true },
- { "johnberan.com", true },
- { "johnblackbourn.com", true },
- { "johnbpodcast.com", true },
- { "johncam.tk", true },
- { "johncook.ltd.uk", true },
- { "johndball.co", true },
- { "johndball.com", true },
- { "johndball.info", true },
- { "johndball.net", true },
- { "johndball.org", true },
- { "johndeisher.com", true },
- { "johnfulgenzi.com", true },
- { "johngallias.com", true },
- { "johngmchenrymd.com", true },
- { "johnguant.com", true },
- { "johnhancocknypensions.com", true },
- { "johnhancockpensions.com", true },
- { "johnhgaunt.com", true },
- { "johnkastler.net", true },
- { "johnkraal.com", true },
- { "johnmcintosh.pro", true },
- { "johnmh.me", true },
- { "johnmichel.org", true },
- { "johnnybet.com", true },
- { "johnnybetstaging.com", true },
- { "johnnybsecure.com", true },
- { "johnpenny.info", true },
- { "johnpenny.uk", true },
- { "johnroach.io", true },
- { "johnroberts.me", true },
- { "johnrockefeller.net", true },
- { "johnrosen.top", true },
- { "johnrosewicz.com", true },
- { "johnsanchez.io", true },
- { "johnsegovia.com", true },
- { "johnsongenealogy.net", true },
- { "johnvanhese.nl", true },
- { "johnyytb.be", true },
- { "joinhonor.com", true },
- { "jointotem.com", true },
- { "joinus-outfits.nl", true },
- { "jokedalderup.nl", true },
- { "jokequebec.com", true },
- { "jokesbykids.com", true },
- { "jokewignand.nl", true },
- { "jolee.ro", true },
- { "jolfamarket.com", true },
- { "joliettech.com", true },
- { "jolinebrussel.nl", true },
- { "joljeugdstad.nl", true },
- { "jollausers.de", true },
- { "jolle.io", true },
- { "jollykidswobbleworld.co.uk", true },
- { "jolo.software", true },
- { "jolokia.ch", true },
- { "jomo.tv", true },
- { "jomsolat.tk", true },
- { "jonahburke.com", true },
- { "jonahperez.com", true },
- { "jonas-thelemann.de", true },
- { "jonas.me", true },
- { "jonasherkel.de", true },
- { "jonaskarlssonfoto.se", true },
- { "jonaskjodt.com", true },
- { "jonaskoeritz.de", true },
- { "jonasled.de", true },
- { "jonasmoeller.de", true },
- { "jonaswitmer.ch", true },
- { "jonathancarter.org", true },
- { "jonathandupree.com", true },
- { "jonathanha.as", true },
- { "jonathanlara.com", true },
- { "jonathanphoto.fr", true },
- { "jonathanreyes.com", false },
- { "jonathanscott.me", true },
- { "jonblankenship.com", true },
- { "jondarby.com", true },
- { "jondevin.com", true },
- { "jondowdle.com", false },
- { "jonesfor.men", true },
- { "jonespayne.com", false },
- { "jong030.nl", true },
- { "jongbloed.nl", true },
- { "jongcaxent.tk", true },
- { "jongcs.com", true },
- { "jongpay.com", true },
- { "jongtonghapkido.tk", true },
- { "jonilar.com", true },
- { "jonincharacter.com", true },
- { "jonirrings.com", true },
- { "jonkermedia.nl", false },
- { "jonlabelle.com", true },
- { "jonlu.ca", true },
- { "jonnasbeauty.com", true },
- { "jonny5.ru", true },
- { "jonnybarnes.uk", true },
- { "jonnystoten.com", true },
- { "jonoalderson.com", true },
- { "jonohewitt.com", true },
- { "jonola.com", true },
- { "jonpads.com", true },
- { "jonpavelich.com", true },
- { "jons.org", true },
- { "jonscaife.com", true },
- { "jonssheds.direct", true },
- { "joodari.fi", true },
- { "jooksms.com", true },
- { "jooksuratas.ee", true },
- { "joomla-leipzig.com", true },
- { "joompress.biz", true },
- { "joona.pw", true },
- { "joorshin.ir", true },
- { "joostbovee.nl", true },
- { "joostrijneveld.nl", true },
- { "joostvanderlaan.nl", true },
- { "jopl.org", true },
- { "joran.org", true },
- { "jorcus.com", true },
- { "jordandevelopment.com", true },
- { "jordanhamilton.me", false },
- { "jordankmportal.com", true },
- { "jordanprogrammer.tk", true },
- { "jordans.co.uk", true },
- { "jordanscorporatelaw.com", true },
- { "jordanstrustcompany.com", true },
- { "jordibelgraver.email", true },
- { "jordibelgraver.eu", true },
- { "jordibelgraver.xyz", true },
- { "jordywijman.nl", true },
- { "jorganicsolutions.com", true },
- { "jorgeto.ddns.net", true },
- { "jorisdalderup.nl", true },
- { "jornalalerta.com.br", true },
- { "jorsev.com", true },
- { "josc.com.au", true },
- { "joscares.com", true },
- { "jose-alexand.re", true },
- { "jose-latino.tk", true },
- { "jose-lesson.com", true },
- { "jose-manuel-benito-alvarez.tk", true },
- { "josealonsodds.com", true },
- { "joseenriquegonzalez.tk", true },
- { "joseetesser.nl", true },
- { "josef-lotz.de", true },
- { "josefernandomorilloardila.tk", true },
- { "josefottosson.se", true },
- { "joseluishenriquez.cl", true },
- { "josemikkola.fi", true },
- { "josepbel.com", true },
- { "josephbarela.com", true },
- { "josephbleroy.com", true },
- { "josephgeorge.com.au", true },
- { "josephquinaucho.com", true },
- { "josephre.es", false },
- { "josephsniderman.com", true },
- { "josephsniderman.org", true },
- { "josephv.website", true },
- { "joshdiamant.com", true },
- { "joshgilson.com", true },
- { "joshharmon.me", true },
- { "joshics.in", false },
- { "joshjanzen.com", true },
- { "joshlovephotography.co.uk", true },
- { "joshrickert.com", true },
- { "joshruppe.com", true },
- { "joshschmelzle.com", true },
- { "joshtriplett.org", true },
- { "joshua-kuepper.de", true },
- { "joshua.bio", true },
- { "joshuadiamant.com", true },
- { "joshuamessick.com", true },
- { "joshuameunier.com", true },
- { "josien.net", true },
- { "josoansi.de", true },
- { "jouons-aux-echecs.be", true },
- { "jourdain.pro", true },
- { "journaldesvoisins.com", true },
- { "journales.com", true },
- { "journalism-schools.com", true },
- { "journalof.tech", true },
- { "journeedesfilles.gc.ca", true },
- { "journeyfitness.com", true },
- { "journeyfriday.rocks", true },
- { "journeying.ca", true },
- { "journeyof1000hops.com", true },
- { "journeytoascension.com", true },
- { "journeytomastery.net", true },
- { "joustsec.ca", true },
- { "joustsec.com", true },
- { "joustsecurity.com", true },
- { "jouwtechnischecoach.nl", true },
- { "jovani.com", false },
- { "jovenescontraelaburrimiento.tk", true },
- { "jovic.hamburg", true },
- { "jovisa.com.tw", true },
- { "joyful.house", true },
- { "joyfulexpressions.gallery", true },
- { "joyfulhealthyeats.com", true },
- { "joyinverse.com", true },
- { "joyofcookingandbaking.com", true },
- { "joyofhaskell.com", true },
- { "joyousisle.com", true },
- { "joyqi.com", true },
- { "joysinventingblog.com", true },
- { "jpbe-network.de", true },
- { "jpbe.de", true },
- { "jpbike.cz", false },
- { "jpdeharenne.be", false },
- { "jpeg.io", true },
- { "jpgangbang.com", true },
- { "jphandjob.com", true },
- { "jplennard.com", true },
- { "jplesbian.com", true },
- { "jpm-inc.jp", true },
- { "jpmelos.com", true },
- { "jpmelos.com.br", true },
- { "jpmguitarshop.com.br", true },
- { "jpod.cc", true },
- { "jpoirierlavoie.ca", true },
- { "jppcadvertising.com", true },
- { "jpph.org", true },
- { "jpprivatehiretaxis.co.uk", true },
- { "jpralves.net", true },
- { "jproxx.com", true },
- { "jps-selection.co.uk", true },
- { "jps-selection.com", true },
- { "jps-selection.eu", true },
- { "jpshop.ru", true },
- { "jpsinflatables.co.uk", true },
- { "jpslconsulting.ca", true },
- { "jpst.it", true },
- { "jquery.wtf", true },
- { "jrabasco.me", true },
- { "jrc9.ca", false },
- { "jrcmo.com", true },
- { "jreb.nl", true },
- { "jreiff.de", true },
- { "jrjuristen.nl", true },
- { "jross.me", true },
- { "jrstehlik.com", true },
- { "jrstehlik.cz", true },
- { "jrt.ovh", true },
- { "jrtapsell.co.uk", true },
- { "jrxpress.com", true },
- { "js-web.eu", true },
- { "js636.com", true },
- { "js637.com", true },
- { "js638.com", true },
- { "js6868.cc", true },
- { "js80651.com", true },
- { "js86.de", true },
- { "js8855.com", true },
- { "jsbentertainment.nl", true },
- { "jschoi.org", true },
- { "jschumacher.info", true },
- { "jsd-cog.org", true },
- { "jsdelivr.com", true },
- { "jselby.net", true },
- { "jsent.co.uk", true },
- { "jsfloydlaw.com", true },
- { "jsheekeyatlanticbar.co.uk", true },
- { "jshub.com", true },
- { "jsidefox.de", true },
- { "jsjohnsononline.com", true },
- { "jsk26.ru", true },
- { "jskoelliken.ch", true },
- { "jsme.cz", true },
- { "jsnfwlr.com", true },
- { "jsnfwlr.io", true },
- { "json.download", true },
- { "jsproxy.tk", false },
- { "jsteward.moe", true },
- { "jstore.ch", true },
- { "jswebbdevelopment.com", true },
- { "jsxc.ch", true },
- { "jtcat.com", true },
- { "jtcjewelry.com", true },
- { "jtconsultancy.sg", true },
- { "jtl-pos.com", true },
- { "jtl-software.com", true },
- { "jtl-software.de", false },
- { "jtp.id", true },
- { "jts3servermod.com", true },
- { "jtslay.com", true },
- { "jttech.se", true },
- { "ju.io", true },
- { "juan23.edu.uy", true },
- { "juanfrancisco.tech", true },
- { "juanjovega.com", true },
- { "juanmazzetti.com", true },
- { "juanxt.ddns.net", true },
- { "jubobs.com", true },
- { "jucca-nautica.si", true },
- { "jucktehkeinen.de", true },
- { "jucocauca.tk", true },
- { "judge2020.com", true },
- { "judoprodeti.cz", true },
- { "judosaintdenis.fr", true },
- { "judybai.me", true },
- { "juef.space", true },
- { "juegosycodigos.mx", true },
- { "juegosyolimpicos.com", true },
- { "juergen-elbert.de", true },
- { "juergenklieber.de", true },
- { "juergenspecht.com", true },
- { "juergenspecht.de", true },
- { "jugendfeuerwehr-vechta.de", true },
- { "jugendhackt.org", true },
- { "jugendsuenden.info", true },
- { "jugh.de", true },
- { "jugwallonie.be", true },
- { "juhakoho.com", true },
- { "juice.codes", true },
- { "juk.life", false },
- { "juku-wing.jp", true },
- { "jule-spil.dk", true },
- { "julenlanda.com", false },
- { "julesroovers.nl", true },
- { "julestern.com", true },
- { "julia-clarete.tk", true },
- { "julia-thonig.de", true },
- { "juliaknightly.com", true },
- { "julian-miller.de", true },
- { "julian-post.de", true },
- { "julian-uphoff.de", true },
- { "julianbroadway.com", true },
- { "juliangonggrijp.com", true },
- { "julianickel.de", true },
- { "julianmeyer.de", true },
- { "juliansimioni.com", true },
- { "julianskitchen.ch", false },
- { "julianvmodesto.com", true },
- { "julianxhokaxhiu.com", true },
- { "juliazeengardendesign.co.uk", true },
- { "julibear.com", true },
- { "julibon.com", true },
- { "julico.nl", true },
- { "julie-and-stevens-wedding.com", true },
- { "juliedecubber.com", true },
- { "juliekoubova.net", true },
- { "juliekproperties.com", true },
- { "juliemaurel.fr", true },
- { "julienc.io", true },
- { "juliendoco.com", true },
- { "julienschmidt.com", true },
- { "julienstalder.ch", true },
- { "julientartarin.com", true },
- { "julius-zoellner.de", true },
- { "juliuseskola.org", true },
- { "jullensgroningen.com", true },
- { "julm.de", true },
- { "jultube.de", true },
- { "jumeirashoes.com", true },
- { "jump-zone.co.uk", true },
- { "jump.wtf", true },
- { "jump4funinflatables.co.uk", true },
- { "jumpandbounce.co.uk", true },
- { "jumpandjivechildrensparties.co.uk", true },
- { "jumparoundbouncycastles.co.uk", true },
- { "jumparty.co.uk", true },
- { "jumpbuttonnorth.com", true },
- { "jumpeasy.com.au", true },
- { "jumpin-jax.co.uk", true },
- { "jumpinchat.com", true },
- { "jumpingbee.co.uk", true },
- { "jumpingcastlesonline.com.au", true },
- { "jumpingjacksbouncycastles.co.uk", true },
- { "jumpinjaes.co.uk", true },
- { "jumpinmonkeys.co.uk", true },
- { "jumpintogreenerpastures.com", true },
- { "jumpnplay.co.uk", true },
- { "jumprun.com", true },
- { "jundongwu.com", true },
- { "junethack.net", true },
- { "jungesforumkonstanz.de", true },
- { "junggesellmuc.de", true },
- { "jungidee.at", true },
- { "jungleadventuretours.net", true },
- { "jungleducks.ca", true },
- { "junglejackscastles.co.uk", true },
- { "junglememories.co.uk", true },
- { "junglevet.fr", true },
- { "junglist.org", true },
- { "jungyonghwa.tk", true },
- { "junias-fenske.de", true },
- { "juniorhandball.com", true },
- { "juniperroots.ca", true },
- { "junjun-web.net", true },
- { "junkdrome.org", true },
- { "junkfoodcafe.com", true },
- { "juno.co.uk", true },
- { "junodownload.com", true },
- { "juozasveza.lt", true },
- { "jupiterchiropractic.com", true },
- { "juppy.tk", true },
- { "jura-reiseschutz.de", true },
- { "juragan.ga", true },
- { "jurassicbarkharrogate.co.uk", true },
- { "jurassicgolf.nl", true },
- { "jurassicworldfilmen.cf", true },
- { "juridoc.com.br", true },
- { "juristique.fr", true },
- { "juristique.info", true },
- { "juristique.org", true },
- { "juristique.us", true },
- { "jurojin.net", true },
- { "jurriaan.ninja", true },
- { "just-heberg.fr", true },
- { "just-keep-swimming.tk", true },
- { "just-vet-and-drive.fr", true },
- { "just-webdesign-berlin.de", true },
- { "just2trade.com", true },
- { "just3preety.com", true },
- { "justacoupleofclarkes.co.uk", true },
- { "justbelieverecoverypa.com", true },
- { "justbookexcursions.com", true },
- { "justbooktransfers.com", true },
- { "justboom.co", true },
- { "justbouncecastles.co.uk", true },
- { "justcalm.tk", true },
- { "justchunks.net", true },
- { "justeducationonline.com", true },
- { "justgalak.com", true },
- { "justgalak.org", true },
- { "justice.gov", true },
- { "justice4assange.com", true },
- { "justimports.com.br", true },
- { "justin-p.me", true },
- { "justinfreid.com", true },
- { "justinho.com", true },
- { "justinmuturifoundation.org", true },
- { "justinstandring.com", true },
- { "justknigi.gq", true },
- { "justmysocks.xyz", true },
- { "justmysocks8.com", true },
- { "justninja.com", true },
- { "justonce.net", true },
- { "justpaste.it", true },
- { "justquoteme.ga", true },
- { "justsmart.io", true },
- { "justsome.info", true },
- { "justthinktwice.gov", false },
- { "justupdate.me", true },
- { "justyy.com", true },
- { "juszczak.io", true },
- { "juszkiewicz.com.pl", true },
- { "jutella.de", false },
- { "jutlander-netbank.dk", true },
- { "jutlander.dk", true },
- { "juttaheitland.com", true },
- { "juusujanar.eu", false },
- { "juwelierstoopman.nl", true },
- { "juweliervanwillegen.nl", true },
- { "juxin08.com", true },
- { "juyunce.com", true },
- { "jvanerp.nl", true },
- { "jvbouncycastlehire.co.uk", true },
- { "jvdham.nl", true },
- { "jvdz.nl", true },
- { "jvega.me", true },
- { "jvlfinance.cz", true },
- { "jvn.com", true },
- { "jvphotoboothhire.co.uk", true },
- { "jvrproductions.com", true },
- { "jvsticker.com", true },
- { "jw.fail", true },
- { "jw1.ca", true },
- { "jw77.cc", true },
- { "jwatt.org", true },
- { "jwatt.uk", true },
- { "jwchords.org", true },
- { "jwe.nl", true },
- { "jwhite.network", true },
- { "jwilsson.com", true },
- { "jwjwjw.com", true },
- { "jwmmarketing.com", true },
- { "jwnotifier.org", true },
- { "jwod.gov", true },
- { "jwr.me", true },
- { "jwschuepfheim.ch", true },
- { "jwtv2.com", true },
- { "jwz.org", true },
- { "jxir.de", true },
- { "jxltom.com", true },
- { "jxm.in", true },
- { "jydemarked.dk", true },
- { "jyk.me", true },
- { "jyoba.co.jp", true },
- { "jyoti-fairworks.org", true },
- { "jyrilaitinen.fi", true },
- { "jyvaskylantykkimies.fi", true },
- { "jzbk.org", true },
- { "jzcapital.co", true },
- { "jzgj088.com", true },
- { "jzwebdesign.ie", true },
- { "k-bone.com", true },
- { "k-homes.net", true },
- { "k-jtan.ca", true },
- { "k-plant.com", true },
- { "k-pture.com", false },
- { "k-sails.com", true },
- { "k-scr.me", true },
- { "k-system.de", true },
- { "k10.ag", true },
- { "k10.app", true },
- { "k10.best", true },
- { "k1024.org", true },
- { "k123123.com", true },
- { "k1958.com", false },
- { "k1chn.com", true },
- { "k234234.com", true },
- { "k258059.net", true },
- { "k2mts.org", true },
- { "k36533.com", true },
- { "k36594.com", true },
- { "k3nny.fr", true },
- { "k4law.com", true },
- { "k4r.ru", true },
- { "k51365.com", true },
- { "k66.ag", true },
- { "k663.ag", true },
- { "k663.vip", true },
- { "k665.vip", true },
- { "k666.ag", true },
- { "k666.co", true },
- { "k6666.ag", true },
- { "k66666.ag", true },
- { "k6668.ag", true },
- { "k667.ag", true },
- { "k668.ag", true },
- { "k668.vip", true },
- { "k6688.ag", true },
- { "k669.ag", true },
- { "k66wang.com", true },
- { "k66win.com", true },
- { "k7azx.com", true },
- { "k8-1.com", true },
- { "k8-2.com", true },
- { "k8-facai.com", true },
- { "k8.com", true },
- { "k8002.com", true },
- { "k80039.com", true },
- { "k801.co", true },
- { "k801.com", true },
- { "k8013.com", true },
- { "k8023.com", true },
- { "k8029.com", true },
- { "k8031.com", true },
- { "k8032.com", true },
- { "k8037.com", true },
- { "k8039.com", true },
- { "k805.com", true },
- { "k805.net", true },
- { "k8052.com", true },
- { "k8053.com", true },
- { "k80608.com", true },
- { "k8062.com", true },
- { "k8063.com", true },
- { "k8067.com", true },
- { "k807.com", true },
- { "k807.net", true },
- { "k8071.com", true },
- { "k8073.com", true },
- { "k8075.com", true },
- { "k8082.com", true },
- { "k8083.com", true },
- { "k8084.com", true },
- { "k8086.com", true },
- { "k809.net", true },
- { "k8097.com", true },
- { "k8098.com", true },
- { "k8100.com", true },
- { "k8102.com", true },
- { "k8103.com", true },
- { "k8105.com", true },
- { "k8106.com", true },
- { "k8107.com", true },
- { "k8109.com", true },
- { "k811.co", true },
- { "k811.com", true },
- { "k8111.com", true },
- { "k81111.com", true },
- { "k811111.com", true },
- { "k8121.com", true },
- { "k8125.com", true },
- { "k8158.com", true },
- { "k816.com", true },
- { "k816.net", true },
- { "k81788.com", true },
- { "k818.co", true },
- { "k819.com", true },
- { "k819.net", true },
- { "k821.net", true },
- { "k82222.com", true },
- { "k82222.net", true },
- { "k8268.net", true },
- { "k8270.com", true },
- { "k829.com", true },
- { "k82999.com", true },
- { "k831.com", true },
- { "k83333.com", true },
- { "k8336.com", true },
- { "k8368.com", true },
- { "k8368.net", true },
- { "k8370.com", true },
- { "k8403.com", true },
- { "k8421.com", true },
- { "k8427.com", true },
- { "k8432.com", true },
- { "k8437.com", true },
- { "k846.com", true },
- { "k8463.com", true },
- { "k8487.com", true },
- { "k85.app", true },
- { "k851.co", true },
- { "k851.com", true },
- { "k852.co", true },
- { "k852.com", true },
- { "k8524.com", true },
- { "k8533.com", true },
- { "k8578.com", true },
- { "k86.app", true },
- { "k860.co", true },
- { "k86188.com", true },
- { "k865.co", true },
- { "k865.com", true },
- { "k865.net", true },
- { "k86666.com", true },
- { "k8668.net", true },
- { "k86681.com", true },
- { "k86690.com", true },
- { "k867.co", true },
- { "k867.com", true },
- { "k86788.com", true },
- { "k86810.com", true },
- { "k86813.com", true },
- { "k86814.com", true },
- { "k86830.com", true },
- { "k86833.com", true },
- { "k86834.com", true },
- { "k86835.com", true },
- { "k86836.com", true },
- { "k86837.com", true },
- { "k86838.com", true },
- { "k86839.com", true },
- { "k86848.com", true },
- { "k86849.com", true },
- { "k86851.com", true },
- { "k86852.com", true },
- { "k86853.com", true },
- { "k86854.com", true },
- { "k86855.com", true },
- { "k86856.com", true },
- { "k86869.com", true },
- { "k86870.com", true },
- { "k86871.com", true },
- { "k86880.com", true },
- { "k86887.com", true },
- { "k869.co", true },
- { "k86913.com", true },
- { "k86914.com", true },
- { "k86915.com", true },
- { "k86916.com", true },
- { "k86917.com", true },
- { "k86918.com", true },
- { "k86920.com", true },
- { "k86921.com", true },
- { "k86922.com", true },
- { "k86923.com", true },
- { "k86924.com", true },
- { "k86925.com", true },
- { "k86926.com", true },
- { "k86927.com", true },
- { "k86928.com", true },
- { "k86929.com", true },
- { "k86930.com", true },
- { "k86931.com", true },
- { "k86932.com", true },
- { "k8694.com", true },
- { "k86965.com", true },
- { "k86966.com", true },
- { "k86967.com", true },
- { "k86989.com", true },
- { "k86990.com", true },
- { "k86991.com", true },
- { "k87.app", true },
- { "k87017.com", true },
- { "k87018.com", true },
- { "k87019.com", true },
- { "k87020.com", true },
- { "k87021.com", true },
- { "k87022.com", true },
- { "k87023.com", true },
- { "k87024.com", true },
- { "k87025.com", true },
- { "k87026.com", true },
- { "k87027.com", true },
- { "k87028.com", true },
- { "k87067.com", true },
- { "k87071.com", true },
- { "k87072.com", true },
- { "k87073.com", true },
- { "k87074.com", true },
- { "k87075.com", true },
- { "k87076.com", true },
- { "k87077.com", true },
- { "k87078.com", true },
- { "k87079.com", true },
- { "k87080.com", true },
- { "k87081.com", true },
- { "k87082.com", true },
- { "k87083.com", true },
- { "k87084.com", true },
- { "k87100.com", true },
- { "k87119.com", true },
- { "k87120.com", true },
- { "k87121.com", true },
- { "k87126.com", true },
- { "k87127.com", true },
- { "k87128.com", true },
- { "k87129.com", true },
- { "k87130.com", true },
- { "k87131.com", true },
- { "k87132.com", true },
- { "k87133.com", true },
- { "k87134.com", true },
- { "k87135.com", true },
- { "k87136.com", true },
- { "k87137.com", true },
- { "k87138.com", true },
- { "k87183.com", true },
- { "k87288.com", true },
- { "k873.co", true },
- { "k873.com", true },
- { "k8736.com", true },
- { "k875.co", true },
- { "k8771.com", true },
- { "k87777.com", true },
- { "k8780.com", true },
- { "k8804.com", true },
- { "k88101.com", true },
- { "k88102.com", true },
- { "k88103.com", true },
- { "k88105.com", true },
- { "k88106.com", true },
- { "k88107.com", true },
- { "k88109.com", true },
- { "k88110.com", true },
- { "k88112.com", true },
- { "k88113.com", true },
- { "k88115.com", true },
- { "k88116.com", true },
- { "k88117.com", true },
- { "k88120.com", true },
- { "k88121.com", true },
- { "k88122.com", true },
- { "k88125.com", true },
- { "k88126.com", true },
- { "k88127.com", true },
- { "k88128.com", true },
- { "k88129.com", true },
- { "k88130.com", true },
- { "k88131.com", true },
- { "k88132.com", true },
- { "k88133.com", true },
- { "k88135.com", true },
- { "k88137.com", true },
- { "k88139.com", true },
- { "k88151.com", true },
- { "k88152.com", true },
- { "k88153.com", true },
- { "k88201.com", true },
- { "k88205.com", true },
- { "k88207.com", true },
- { "k88208.com", true },
- { "k88210.com", true },
- { "k88213.com", true },
- { "k88214.com", true },
- { "k88233.com", true },
- { "k88236.com", true },
- { "k88237.com", true },
- { "k88238.com", true },
- { "k88239.com", true },
- { "k88250.com", true },
- { "k88251.com", true },
- { "k88252.com", true },
- { "k88253.com", true },
- { "k88255.com", true },
- { "k88256.com", true },
- { "k88257.com", true },
- { "k88258.com", true },
- { "k88259.com", true },
- { "k88260.com", true },
- { "k88261.com", true },
- { "k88262.com", true },
- { "k88263.com", true },
- { "k88265.com", true },
- { "k88267.com", true },
- { "k88268.com", true },
- { "k88269.com", true },
- { "k88270.com", true },
- { "k88271.com", true },
- { "k88272.com", true },
- { "k88273.com", true },
- { "k88275.com", true },
- { "k88276.com", true },
- { "k88277.com", true },
- { "k88285.com", true },
- { "k88398.com", true },
- { "k88399.com", true },
- { "k884.co", true },
- { "k885.co", true },
- { "k886.co", true },
- { "k88601.com", true },
- { "k88602.com", true },
- { "k88603.com", true },
- { "k88605.com", true },
- { "k88606.com", true },
- { "k88607.com", true },
- { "k88608.com", true },
- { "k88609.com", true },
- { "k8861.com", true },
- { "k88635.com", true },
- { "k88636.com", true },
- { "k88637.com", true },
- { "k88638.com", true },
- { "k88639.com", true },
- { "k88650.com", true },
- { "k88651.com", true },
- { "k88652.com", true },
- { "k88653.com", true },
- { "k88655.com", true },
- { "k88656.com", true },
- { "k88657.com", true },
- { "k88658.com", true },
- { "k88659.com", true },
- { "k88660.com", true },
- { "k88661.com", true },
- { "k88662.com", true },
- { "k88663.com", true },
- { "k88665.com", true },
- { "k88667.com", true },
- { "k88668.com", true },
- { "k88670.com", true },
- { "k88671.com", true },
- { "k88672.com", true },
- { "k88673.com", true },
- { "k88675.com", true },
- { "k88676.com", true },
- { "k88677.com", true },
- { "k88679.com", true },
- { "k88680.com", true },
- { "k88681.com", true },
- { "k88682.com", true },
- { "k88683.com", true },
- { "k88684.com", true },
- { "k88685.com", true },
- { "k88686.com", true },
- { "k888.ag", true },
- { "k88801.com", true },
- { "k88870.com", true },
- { "k88881.com", true },
- { "k88890.com", true },
- { "k88891.com", true },
- { "k889.co", true },
- { "k8892.com", true },
- { "k89.app", true },
- { "k89188.com", true },
- { "k89388.com", true },
- { "k8955.com", true },
- { "k8974.com", true },
- { "k8994.com", true },
- { "k89999.com", true },
- { "k8cf002.com", true },
- { "k8cf003.com", true },
- { "k8cf005.com", true },
- { "k8cf006.com", true },
- { "k8cf007.com", true },
- { "k8dc01.com", true },
- { "k8dc13.com", true },
- { "k8dc17.com", true },
- { "k8md01.com", true },
- { "k8md12.com", true },
- { "k8n.de", true },
- { "k8r.eu", true },
- { "k8slot.com", true },
- { "k8top.com", true },
- { "k8v02.com", true },
- { "k8v03.com", true },
- { "k8v04.com", true },
- { "k8v06.com", true },
- { "k8v07.com", true },
- { "k8v08.com", true },
- { "k8v09.com", true },
- { "k8v12.com", true },
- { "k8v13.com", true },
- { "k8v14.com", true },
- { "k8v15.com", true },
- { "k8v16.com", true },
- { "k8v17.com", true },
- { "k8v19.com", true },
- { "k8v20.com", true },
- { "k8v21.com", true },
- { "k8v23.com", true },
- { "k8v24.com", true },
- { "k8v25.com", true },
- { "k8v26.com", true },
- { "k8v27.com", true },
- { "k8v29.com", true },
- { "k8v30.com", true },
- { "k8vn001.com", true },
- { "k8vn002.com", true },
- { "k8vn003.com", true },
- { "k8vn005.com", true },
- { "k8vn006.com", true },
- { "k8vn007.com", true },
- { "k8vn008.com", true },
- { "k8vn009.com", true },
- { "k8vn010.com", true },
- { "k8vn011.com", true },
- { "k8vn9999.com", true },
- { "k9swx.com", true },
- { "kaamoscreations.com", true },
- { "kaanhaa.com", true },
- { "kaasbesteld.nl", true },
- { "kaatha-kamrater.se", true },
- { "kaatsen.tk", true },
- { "kab-s.de", true },
- { "kabachok.tk", true },
- { "kabal-invasion.com", true },
- { "kabarlinux.id", true },
- { "kabartani.com", true },
- { "kabashop.com.br", true },
- { "kabellegger.nl", true },
- { "kabeltv.co.nz", true },
- { "kabeuchi.com", true },
- { "kabinett.cz", true },
- { "kabukpsikoloji.com", true },
- { "kabulpress.org", true },
- { "kabus.org", true },
- { "kacgal.com", true },
- { "kachelfm.nl", true },
- { "kachlikova2.cz", true },
- { "kack.website", true },
- { "kadenba.ch", true },
- { "kadhambam.in", true },
- { "kado-ya.jp", true },
- { "kadro.com.pl", true },
- { "kadvi.tk", true },
- { "kafeh-jazan.com", true },
- { "kafel-ufa.tk", true },
- { "kaffau.com", true },
- { "kaffeekrone.de", true },
- { "kaffeeringe.de", true },
- { "kafoom.de", true },
- { "kagicomb.org", true },
- { "kagitreklam.com", true },
- { "kaheim.de", true },
- { "kai-ratzeburg.de", true },
- { "kai-ruecker.tk", true },
- { "kai.cool", false },
- { "kaibo.cz", true },
- { "kaibo.eu", true },
- { "kaidoblogi.eu", true },
- { "kaifa.gs", true },
- { "kaifa199.com", true },
- { "kaigojj.com", true },
- { "kaikei7.com", true },
- { "kaileymslusser.com", true },
- { "kaioken.bar", true },
- { "kais08.com", true },
- { "kais68.com", true },
- { "kais98.com", true },
- { "kaisab.com", true },
- { "kaisev.net", true },
- { "kaishi.ag", true },
- { "kaishi002.com", true },
- { "kaishi555.com", true },
- { "kaishi999.com", true },
- { "kaitol.click", true },
- { "kaitori-goods.shop", true },
- { "kaiusaltd.com", true },
- { "kaivac-emea.com", true },
- { "kaiwu.xyz", true },
- { "kaizencraft.ga", true },
- { "kaizenreporting.com", true },
- { "kaizeronion.com", true },
- { "kajak.land", true },
- { "kajakswaderki.pl", true },
- { "kak-pohudet-legko.ml", true },
- { "kaka.farm", true },
- { "kakacon.nz", true },
- { "kakao-karten.de", true },
- { "kakaravaara.fi", true },
- { "kakie-gobocha.jp", true },
- { "kakie-kolesa.ru", true },
- { "kakolightingmuseum.or.jp", true },
- { "kalakarclub.com", true },
- { "kalamos-psychiatrie.be", true },
- { "kalamos.tk", true },
- { "kalashcards.com", true },
- { "kalashnikov.ml", true },
- { "kalastus.com", true },
- { "kaleidlink.com", true },
- { "kaleidokollection.com.au", true },
- { "kaleidoscope.co.uk", true },
- { "kalender.com", true },
- { "kalevlamps.co.uk", true },
- { "kalex.nl", true },
- { "kalhufvudet.se", true },
- { "kaliaa.fi", true },
- { "kaliajoyas.com", true },
- { "kalian.cz", true },
- { "kaliboairport.tk", true },
- { "kaligrafievreni.com", true },
- { "kaliningrad.gq", true },
- { "kalisch.eu", true },
- { "kalkulacka-havarijni.cz", true },
- { "kall.is", true },
- { "kallies-net.de", true },
- { "kalmar.com", true },
- { "kalmykphilly.org", true },
- { "kalombo.ru", true },
- { "kalprajsolutions.com", true },
- { "kalsa.ga", true },
- { "kaltenbrunner.it", true },
- { "kalterersee.ch", true },
- { "kalugadeti.ru", true },
- { "kalwak.cr", true },
- { "kalwestelectric.com", true },
- { "kalyanmatka.guru", true },
- { "kam-serwis.pl", true },
- { "kamata-shinkyu-seikotsu.jp", true },
- { "kameari-za.space", true },
- { "kamen-master.ru", true },
- { "kameng.com", true },
- { "kamengapp.com", true },
- { "kamikaichimaru.com", false },
- { "kamikatse.net", true },
- { "kamildrozd.tk", true },
- { "kamilmajewski.pl", true },
- { "kaminbau-laub.de", true },
- { "kamisato-ent.com", true },
- { "kamixa.se", true },
- { "kamp-kisten.nl", true },
- { "kamppailusali.fi", true },
- { "kamranmirhazar.com", true },
- { "kamui.co.uk", true },
- { "kamuniang.org", true },
- { "kan3.de", true },
- { "kana-mono.biz", true },
- { "kanaete-uranai.com", true },
- { "kanag.pl", true },
- { "kanal-tv-haensch.de", true },
- { "kandhamal.org", true },
- { "kandianshang.com", true },
- { "kandofu.com", true },
- { "kanecastles.com", true },
- { "kanehusky.com", false },
- { "kangaroo-bouncycastle.co.uk", true },
- { "kangarooislandholidayaccommodation.com.au", true },
- { "kangaroojacks.co.uk", true },
- { "kangaroos.org", true },
- { "kangaroovalleykayaks.com.au", true },
- { "kangaroovalleymuseum.com", true },
- { "kangaroovalleyolives.com.au", true },
- { "kangaroovalleyshow.org.au", true },
- { "kangaroovalleywoodcrafts.com.au", true },
- { "kangutingo.com", true },
- { "kanis.ag", true },
- { "kanis.me", true },
- { "kankimaru.com", true },
- { "kanna.cf", true },
- { "kannchen.de", true },
- { "kanootours.com", true },
- { "kanope.com.br", true },
- { "kanpian369.com", true },
- { "kansaiyamamoto.jp", true },
- { "kant1.tk", true },
- { "kantankye.nl", true },
- { "kantoportraits.com", true },
- { "kantorosobisty.pl", true },
- { "kanuvu.de", true },
- { "kanyingba.com", true },
- { "kanzashi.com", true },
- { "kanzlei-gaengler.de", true },
- { "kanzlei-oehler.com", true },
- { "kanzlei-sixt.de", true },
- { "kap.pe", true },
- { "kapelya.gq", true },
- { "kapler.family", true },
- { "kappershuis-meppel.nl", true },
- { "kappharn.com", true },
- { "kappie.xyz", true },
- { "kapsalonlinds.nl", true },
- { "kapseli.net", true },
- { "kaptadata.com", true },
- { "kaptamedia.com", true },
- { "kaputtzich.duckdns.org", true },
- { "karabas.com", true },
- { "karabijnhaken.nl", false },
- { "karachi.dating", true },
- { "karalane.com", true },
- { "karamomo.net", true },
- { "karanjthakkar.com", true },
- { "karanlyons.com", true },
- { "karantholdings.ga", true },
- { "karapuzz.tk", true },
- { "karasik.by", true },
- { "karateka.org", true },
- { "karateka.ru", true },
- { "karatekit.co.uk", true },
- { "karawanken-tunnel.de", true },
- { "kareltrans.tk", true },
- { "karewan.ovh", true },
- { "karger.com", true },
- { "kargl.net", true },
- { "karguine.in", true },
- { "karimsaadati.tk", true },
- { "karina.gd", true },
- { "karinwerner.com", true },
- { "karit.nz", true },
- { "kariyam.com", true },
- { "karlbowden.com", true },
- { "karlic.net", true },
- { "karlloch.de", true },
- { "karlsmithmn.org", true },
- { "karlzotter.com", true },
- { "karmaassurance.ca", true },
- { "karmabaker.com", true },
- { "karmaflux.com", true },
- { "karmaful.de", true },
- { "karmainsurance.ca", true },
- { "karmaplatform.com", true },
- { "karmaspa.se", true },
- { "karn.nu", true },
- { "karneid.info", true },
- { "karo.pc.pl", true },
- { "karodos.pl", true },
- { "karopapier.de", true },
- { "karopc.com.pl", true },
- { "karopc.pl", true },
- { "karoverwaltung.de", true },
- { "karrot.world", true },
- { "karrselfstorage.com", true },
- { "karsofsystems.com", true },
- { "karsten-voigt.de", true },
- { "karta-paliwowa.pl", true },
- { "kartacha.com", true },
- { "kartar.net", false },
- { "kartatopia.com", true },
- { "kartbird.com", true },
- { "kartec.com", true },
- { "karten-verlag.de", true },
- { "kartikmohta.com", true },
- { "kartina.io", true },
- { "kartoffel-tobi.de", true },
- { "kartonmodellbau.org", true },
- { "karula.org", true },
- { "karupp-did.net", true },
- { "kas.ie", true },
- { "kaseban.com", true },
- { "kasei.im", true },
- { "kashbet.net", true },
- { "kashflowcoupon.co.uk", true },
- { "kashflowpromocode.co.uk", true },
- { "kashinavi.com", true },
- { "kashis.com.au", true },
- { "kashrutbaking.com", true },
- { "kasiafricagroup.org", true },
- { "kasinobonus.com", true },
- { "kasko.io", true },
- { "kaskocdn.com", true },
- { "kaskocloud.com", true },
- { "kaskodev.com", true },
- { "kaskojs.com", true },
- { "kaskoqa.com", true },
- { "kasnoffskinclinic.com", true },
- { "kasperstad.dk", true },
- { "kassa.at", true },
- { "kassa.expert", true },
- { "kassa.fr", true },
- { "kassarsoap.com", true },
- { "kasse.at", true },
- { "kastankaoffice.cz", true },
- { "kastelruth.biz", true },
- { "kastgroup.com", true },
- { "kastorsky.ru", false },
- { "kasual.id", true },
- { "kat.marketing", true },
- { "katagena.com", true },
- { "kataiszilveszter.hu", true },
- { "katalog-serverov.ga", true },
- { "katalog-tovarov.tk", true },
- { "katalogbajugamismu.com", true },
- { "katalogkapsli.pl", true },
- { "katapult.es", true },
- { "katarsisuib.no", true },
- { "katcleaning.com.au", false },
- { "katedra.de", true },
- { "katekligys.com", true },
- { "katemihalikova.cz", true },
- { "katericke.com", true },
- { "katex.org", true },
- { "kateysagal.tk", true },
- { "kathardt.de", true },
- { "kathegiraldo.com", true },
- { "katherineswynford.tk", true },
- { "kathleendeisher.com", true },
- { "kathy.best", true },
- { "kathy.lgbt", true },
- { "kathy.link", true },
- { "kati-raumplaner.de", true },
- { "katiechai.xyz", true },
- { "katieriker.com", true },
- { "katieskandy.co.uk", true },
- { "katieskastles.co.uk", true },
- { "katio.net", true },
- { "kativa.it", true },
- { "katka.info", true },
- { "katnunn.co.uk", true },
- { "kato-yane.com", true },
- { "katom.com", true },
- { "katscastles.co.uk", true },
- { "katsiavarasorthopedics.gr", true },
- { "katsunet.com", true },
- { "kattelans.eu", true },
- { "katyusha.net", true },
- { "kau-boys.com", true },
- { "kau-boys.de", true },
- { "kaufberatung.community", true },
- { "kaufkraftkiel.de", true },
- { "kavatasygarety.tk", true },
- { "kavovary-kava.cz", true },
- { "kawaii.su", true },
- { "kawaiicon.org", true },
- { "kawiarnia.xyz", true },
- { "kay.la", true },
- { "kayit.co.uk", true },
- { "kayo.digital", true },
- { "kaysis.gov.tr", false },
- { "kazakov.lt", true },
- { "kazancci.com", true },
- { "kazand.lt", true },
- { "kazandaemon.ru", true },
- { "kazek.com.pl", true },
- { "kazekprzewozy.pl", true },
- { "kazumi.ro", true },
- { "kazvel.com", true },
- { "kazy111.info", true },
- { "kb0101.com", true },
- { "kb0283.com", true },
- { "kb036.com", true },
- { "kb0404.com", true },
- { "kb0505.com", true },
- { "kb059.com", true },
- { "kb0606.com", true },
- { "kb0707.com", true },
- { "kb09.net", true },
- { "kb096.com", true },
- { "kb1313.com", true },
- { "kb1515.com", true },
- { "kb1717.com", true },
- { "kb2626.com", true },
- { "kb283.com", true },
- { "kb2929.com", true },
- { "kb3232.com", true },
- { "kb3535.com", true },
- { "kb3636.com", true },
- { "kb367.com", true },
- { "kb3939.com", true },
- { "kb415.com", true },
- { "kb4242.com", true },
- { "kb4393.com", true },
- { "kb4545.com", true },
- { "kb458.com", true },
- { "kb4747.com", true },
- { "kb481.com", true },
- { "kb486.com", true },
- { "kb5050.com", true },
- { "kb506.com", true },
- { "kb5252.com", true },
- { "kb545.com", true },
- { "kb5454.com", true },
- { "kb5648.com", true },
- { "kb5656.com", true },
- { "kb5959.com", true },
- { "kb6464.com", true },
- { "kb6565.com", true },
- { "kb6767.com", true },
- { "kb702.com", true },
- { "kb7272.com", true },
- { "kb7474.com", true },
- { "kb750.com", true },
- { "kb756.com", true },
- { "kb7676.com", true },
- { "kb787.com", true },
- { "kb8.ag", true },
- { "kb8.best", true },
- { "kb8383.com", true },
- { "kb840.com", true },
- { "kb848.com", true },
- { "kb8484.com", true },
- { "kb8585.com", true },
- { "kb88.ag", true },
- { "kb88.best", true },
- { "kb88.com", true },
- { "kb88.us", true },
- { "kb8800.com", true },
- { "kb8803.com", true },
- { "kb881.cc", true },
- { "kb8815.com", true },
- { "kb8818.com", true },
- { "kb8819.com", true },
- { "kb882.cc", true },
- { "kb8820.com", true },
- { "kb883.cc", true },
- { "kb8830.com", true },
- { "kb8835.com", true },
- { "kb8837.com", true },
- { "kb8838.com", true },
- { "kb8839.com", true },
- { "kb8841.com", true },
- { "kb8843.com", true },
- { "kb8844.com", true },
- { "kb8848.com", true },
- { "kb8849.com", true },
- { "kb8852.com", true },
- { "kb8853.com", true },
- { "kb8854.com", true },
- { "kb8856.com", true },
- { "kb8857.com", true },
- { "kb8859.com", true },
- { "kb8860.com", true },
- { "kb8863.com", true },
- { "kb8864.com", true },
- { "kb8867.com", true },
- { "kb8871.com", true },
- { "kb8872.com", true },
- { "kb8874.com", true },
- { "kb8875.com", true },
- { "kb8878.com", true },
- { "kb888.ag", true },
- { "kb8880.com", true },
- { "kb88818.com", true },
- { "kb8882.com", true },
- { "kb8885.com", true },
- { "kb8889.com", true },
- { "kb8890.com", true },
- { "kb8892.com", true },
- { "kb8897.com", true },
- { "kb88dc15.com", true },
- { "kb88dc23.com", true },
- { "kb88dc25.com", true },
- { "kb88dc26.com", true },
- { "kb88dc27.com", true },
- { "kb88dc30.com", true },
- { "kb88md12.com", true },
- { "kb88md26.com", true },
- { "kb88md27.com", true },
- { "kb890.com", true },
- { "kb9292.com", true },
- { "kb9494.com", true },
- { "kb957.com", true },
- { "kb965.com", true },
- { "kb9696.com", true },
- { "kb9797.com", true },
- { "kb991.com", true },
- { "kb9988.com", true },
- { "kba-online.de", true },
- { "kbb-ev.de", true },
- { "kbbouncycastlehire.co.uk", true },
- { "kbc.be", true },
- { "kbcequitas.hu", true },
- { "kbet168.com", true },
- { "kbit.dk", true },
- { "kbjorklu.com", true },
- { "kbk4t.com", true },
- { "kbleventhire.co.uk", true },
- { "kbsinflatablekingdom.co.uk", true },
- { "kbst.se", true },
- { "kbterapicenter.se", true },
- { "kc-holzfaeller.de", true },
- { "kc1hbk.com", true },
- { "kc3.moe", true },
- { "kc5mpk.com", true },
- { "kcire.me", true },
- { "kcliner.com", true },
- { "kcmicapital.com", true },
- { "kcolford.com", false },
- { "kcshipping.co.uk", true },
- { "kcsordparticipation.org", true },
- { "kd.net.nz", true },
- { "kdcp.pw", true },
- { "kdex.de", true },
- { "kdistech.nz", true },
- { "kdw.cloud", true },
- { "ke.fo", true },
- { "ke7tlf.us", true },
- { "keakon.net", true },
- { "keane.space", true },
- { "kearnsmotorcar.com", true },
- { "keaysmillwork.com", true },
- { "keb.com.au", true },
- { "keb.net.au", true },
- { "kebabbesteld.nl", true },
- { "kebabbruce.com", false },
- { "kebhanamyanmar.com", true },
- { "kebidanan.id", true },
- { "kecht.at", true },
- { "kedarastudios.com", true },
- { "kedv.es", true },
- { "kee.pm", true },
- { "keeley.net", true },
- { "keeleysam.com", true },
- { "keelove.net", true },
- { "keengamer.com", true },
- { "keepa.com", true },
- { "keepdecor.com", true },
- { "keeperklan.com", false },
- { "keepersecurity.com", true },
- { "keepingtheplot.co.uk", true },
- { "keepiteasy.eu", true },
- { "keepitsecure24.com", true },
- { "keepleft.gr", true },
- { "keepsight.org.au", true },
- { "keesslop.nl", true },
- { "keestalkstech.com", true },
- { "keevault.pm", true },
- { "keeweb.info", true },
- { "keezyavaleri.com", true },
- { "keganthorrez.com", true },
- { "kegelschiene.net", true },
- { "kehlenbach.net", true },
- { "keian.tk", true },
- { "keifel.de", true },
- { "keilycosmetics.com", true },
- { "kein-design.de", true },
- { "keinefilterblase.de", true },
- { "keisaku.org", true },
- { "keishiando.com", true },
- { "keithlomax.com", true },
- { "keke-shop.ch", true },
- { "kekku.li", true },
- { "keksi.io", true },
- { "kelapagading.co.id", true },
- { "keldan.fo", true },
- { "kelderwijnen.nl", true },
- { "kelgtermans-usedcars.be", false },
- { "kelheor.space", true },
- { "kelis.fr", true },
- { "keller-aarau.ch", true },
- { "keller-sports.be", true },
- { "kellerlan.org", true },
- { "kelleycurran.com", true },
- { "kellimacconnell.com", true },
- { "kellygrenard.com", true },
- { "kellyskastles.co.uk", true },
- { "kelsa.io", true },
- { "kelsall39.com", true },
- { "kemand.com", true },
- { "kemerovo.gq", true },
- { "kemerovo.ml", true },
- { "kemerovo.tk", true },
- { "kemerovo42.tk", true },
- { "kemmerer-net.de", true },
- { "kempkens.io", true },
- { "kempo-sissach.ch", true },
- { "kemptown.co.uk", true },
- { "kemptown.com", true },
- { "kemptown.net", true },
- { "ken.fm", true },
- { "kenalsworld.com", true },
- { "kenbonny.net", true },
- { "kendermore.it", true },
- { "kengilmour.com", false },
- { "kenia-vakantie.nl", true },
- { "keniff.gq", true },
- { "kenkou-kitakyusyu.jp", true },
- { "kennedy.ie", true },
- { "kennedyinsurancesolutions.com", true },
- { "kenners.org", true },
- { "kennethandersen.com", true },
- { "kennethlim.me", true },
- { "kenneths.org", true },
- { "kenny-peck.com", true },
- { "kennynet.co.uk", true },
- { "keno.im", true },
- { "kenokallinger.at", true },
- { "kenoschwalb.com", false },
- { "kenrogers.co", false },
- { "kens.pics", true },
- { "kensbouncycastles.co.uk", true },
- { "kenscustomfloors.com", true },
- { "kentdalevets.co.uk", true },
- { "kentec.net", false },
- { "kenterlis.gr", true },
- { "kenvix.com", true },
- { "kenyons.info", true },
- { "keoliz.com", true },
- { "keops-spine.fr", true },
- { "kepkonyvtar.hu", true },
- { "keponews.com", true },
- { "keralit.nl", true },
- { "keramed.ga", true },
- { "kerameion.com", true },
- { "kerebro.com", true },
- { "kerijacoby.com", true },
- { "kernel-error.de", true },
- { "kernel-panik.me", true },
- { "kernel.nz", true },
- { "kernelpanics.nl", true },
- { "kernelprogrammer.com", true },
- { "kernet.com.ar", true },
- { "kernkompas.nl", true },
- { "kerrnel.com", true },
- { "kerrydavisguitars.tk", true },
- { "kerstkaart.nl", true },
- { "kersvers.agency", true },
- { "kerus.net", true },
- { "kesef.org.il", true },
- { "keskeces.com", true },
- { "kessawear.com", true },
- { "kesslerwine.com", true },
- { "ketamine.co.uk", true },
- { "ketoconazole.gq", true },
- { "ketosecology.co.uk", true },
- { "ketotadka.com", true },
- { "kettinggeleider.be", true },
- { "kettlebellkrusher.com", true },
- { "kettlemetalbbq.com", true },
- { "kettner.com", true },
- { "keutel.net", true },
- { "kevchia.com", true },
- { "kevertje.net", true },
- { "kevin-darmor.eu", true },
- { "kevin-ta.com", true },
- { "kevinapease.com", true },
- { "kevinbowers.me", true },
- { "kevinbusse.de", true },
- { "kevincox.ca", false },
- { "kevincramer.net", true },
- { "kevindienst.blog", true },
- { "kevinfumbles.com", true },
- { "kevinhill.nl", true },
- { "kevinhq.com", true },
- { "kevinkla.es", true },
- { "kevinlocke.name", true },
- { "kevinmeijer.nl", true },
- { "kevinmoreland.com", true },
- { "kevinmorssink.nl", true },
- { "kevinpatel.com", true },
- { "kevinpirnie.com", false },
- { "kevinquintero.co", false },
- { "kevinrandles.com", false },
- { "kevinratcliff.com", true },
- { "kevinrousseeuw.be", true },
- { "kevinvanderperren.tk", true },
- { "kevyn.lu", true },
- { "kexino.com", true },
- { "key-form.fr", true },
- { "key2swipe.com", true },
- { "keybase.io", true },
- { "keybored.co", true },
- { "keybored.me", true },
- { "keycdn.com", true },
- { "keycenter.com.br", true },
- { "keycontainers.co.za", true },
- { "keyex.com.br", true },
- { "keygen.sh", true },
- { "keygens.pro", true },
- { "keyhani.tk", true },
- { "keyholdingservices.co.uk", true },
- { "keyhomechecker.com", true },
- { "keyihao.cn", true },
- { "keyinfo.io", true },
- { "keylaserinstitute.com", true },
- { "keylength.com", true },
- { "keymaster.lookout.com", false },
- { "keymicrosystems.com", true },
- { "keynes.id.au", true },
- { "keyphotojs.cf", true },
- { "keys247.co.uk", true },
- { "keysofart.com", true },
- { "keysso.net", true },
- { "keystoneok.com", false },
- { "keysupport.org", true },
- { "keywalker.co.jp", true },
- { "keywebdesign.nl", true },
- { "keyworth-meadow.tk", true },
- { "kf-slot.com", true },
- { "kf0000g.com", true },
- { "kf005.com", true },
- { "kf006.com", true },
- { "kf009.com", true },
- { "kf0101.com", true },
- { "kf016.com", true },
- { "kf020.com", true },
- { "kf026.com", true },
- { "kf030.com", true },
- { "kf0606g.com", true },
- { "kf068.com", true },
- { "kf0808.com", true },
- { "kf086.com", true },
- { "kf098.com", true },
- { "kf099.com", true },
- { "kf0q.com", true },
- { "kf108.com", true },
- { "kf117.com", true },
- { "kf130.com", true },
- { "kf1313.com", true },
- { "kf172.com", true },
- { "kf188.com", true },
- { "kf196.com", true },
- { "kf199.com", true },
- { "kf200.vip", true },
- { "kf201988.com", true },
- { "kf2020g.com", true },
- { "kf2121g.com", true },
- { "kf2132.com", true },
- { "kf2138.com", true },
- { "kf2222g.com", true },
- { "kf260.com", true },
- { "kf268.com", true },
- { "kf282.com", true },
- { "kf2828.com", true },
- { "kf296.com", true },
- { "kf3131g.com", true },
- { "kf319.com", true },
- { "kf327.com", true },
- { "kf3333g.com", true },
- { "kf338.com", true },
- { "kf355.com", true },
- { "kf356.com", true },
- { "kf388.com", true },
- { "kf3u.com", true },
- { "kf4040.com", true },
- { "kf5201314.com", true },
- { "kf5252.com", true },
- { "kf5288.com", true },
- { "kf5858.com", true },
- { "kf5858g.com", true },
- { "kf588.com", true },
- { "kf6132.com", true },
- { "kf6161.com", true },
- { "kf6161g.com", true },
- { "kf618.com", true },
- { "kf6262.com", true },
- { "kf633.com", true },
- { "kf6464.com", true },
- { "kf6565.com", true },
- { "kf6622.com", true },
- { "kf6623.com", true },
- { "kf6625.com", true },
- { "kf6626.com", true },
- { "kf6627.com", true },
- { "kf6628.com", true },
- { "kf6631.com", true },
- { "kf6633.com", true },
- { "kf6635.com", true },
- { "kf6636.com", true },
- { "kf6637.com", true },
- { "kf6638.com", true },
- { "kf6666g.com", true },
- { "kf66888.com", true },
- { "kf680.com", true },
- { "kf6800.com", true },
- { "kf6801.com", true },
- { "kf6802.com", true },
- { "kf6803.com", true },
- { "kf6805.com", true },
- { "kf6806.com", true },
- { "kf6807.com", true },
- { "kf6808.com", true },
- { "kf6809.com", true },
- { "kf6811.com", true },
- { "kf6812.com", true },
- { "kf6813.com", true },
- { "kf6815.com", true },
- { "kf6816.com", true },
- { "kf6817.com", true },
- { "kf6818.com", true },
- { "kf6819.com", true },
- { "kf6820.com", true },
- { "kf6821.com", true },
- { "kf6822.com", true },
- { "kf6823.com", true },
- { "kf6825.com", true },
- { "kf6826.com", true },
- { "kf6827.com", true },
- { "kf6828.com", true },
- { "kf6829.com", true },
- { "kf6830.com", true },
- { "kf6831.com", true },
- { "kf6835.com", true },
- { "kf688.com", true },
- { "kf707.com", true },
- { "kf7171.com", true },
- { "kf7272.com", true },
- { "kf759.com", true },
- { "kf7676.com", true },
- { "kf7676g.com", true },
- { "kf77.app", true },
- { "kf772.com", true },
- { "kf780.com", true },
- { "kf7979.com", true },
- { "kf7979g.com", true },
- { "kf820.com", true },
- { "kf826.com", true },
- { "kf8282g.com", true },
- { "kf846.com", true },
- { "kf848.com", true },
- { "kf8484g.com", true },
- { "kf8611.com", true },
- { "kf8612.com", true },
- { "kf8613.com", true },
- { "kf8615.com", true },
- { "kf8616.com", true },
- { "kf8617.com", true },
- { "kf8619.com", true },
- { "kf8621.com", true },
- { "kf8622.com", true },
- { "kf8623.com", true },
- { "kf8625.com", true },
- { "kf8626.com", true },
- { "kf8627.com", true },
- { "kf8628.com", true },
- { "kf8629.com", true },
- { "kf8631.com", true },
- { "kf8632.com", true },
- { "kf8635.com", true },
- { "kf8636.com", true },
- { "kf8637.com", true },
- { "kf8638.com", true },
- { "kf8639.com", true },
- { "kf8651.com", true },
- { "kf8652.com", true },
- { "kf8653.com", true },
- { "kf8655.com", true },
- { "kf8656.com", true },
- { "kf8657.com", true },
- { "kf8658.com", true },
- { "kf8659.com", true },
- { "kf8686.com", true },
- { "kf8787g.com", true },
- { "kf8801.com", true },
- { "kf8803.com", true },
- { "kf8805.com", true },
- { "kf8809.com", true },
- { "kf8810.com", true },
- { "kf8812.com", true },
- { "kf8817.com", true },
- { "kf8819.com", true },
- { "kf8820.com", true },
- { "kf8821.com", true },
- { "kf8825.com", true },
- { "kf8828.com", true },
- { "kf8830.com", true },
- { "kf8835.com", true },
- { "kf8850.com", true },
- { "kf8851.com", true },
- { "kf8857.com", true },
- { "kf8858.com", true },
- { "kf8865.com", true },
- { "kf88666.com", true },
- { "kf8867.com", true },
- { "kf8868.com", true },
- { "kf8869.com", true },
- { "kf8871.com", true },
- { "kf8872.com", true },
- { "kf8873.com", true },
- { "kf8876.com", true },
- { "kf8878.com", true },
- { "kf8879.com", true },
- { "kf8891.com", true },
- { "kf8892.com", true },
- { "kf8895.com", true },
- { "kf8896.com", true },
- { "kf8949.com", true },
- { "kf8950.com", true },
- { "kf8951.com", true },
- { "kf8952.com", true },
- { "kf8953.com", true },
- { "kf8954.com", true },
- { "kf8955.com", true },
- { "kf8956.com", true },
- { "kf8957.com", true },
- { "kf8958.com", true },
- { "kf908.com", true },
- { "kf909.com", true },
- { "kf955.com", true },
- { "kf968.com", true },
- { "kf9797.com", true },
- { "kf981.com", true },
- { "kf997.com", true },
- { "kfa6.com", true },
- { "kfassessment.eu", true },
- { "kff7.com", true },
- { "kffs.ru", true },
- { "kfirba.me", true },
- { "kfkf999.com", true },
- { "kfo.com.br", true },
- { "kforesund.se", true },
- { "kfv-kiel.de", false },
- { "kfz-hantschel.de", true },
- { "kfz-service-wachtmann.de", true },
- { "kgcarpetandupholsterycleaning.com", true },
- { "kgm-irm.be", true },
- { "kgnk.ru", true },
- { "kgt10.ru", true },
- { "kha.com", true },
- { "khaganat.net", true },
- { "khairul-zamri.com", false },
- { "khakasiya.ml", true },
- { "khakasiya.tk", true },
- { "khakassia.cf", true },
- { "khakassia.ga", true },
- { "khakassia.gq", true },
- { "khakassia.tk", true },
- { "khaledgarbaya.net", false },
- { "khaneh-memar.com", true },
- { "khanovaskola.cz", true },
- { "khas.co.uk", true },
- { "khasiatmanfaat.com", true },
- { "khedmatazma.com", true },
- { "khetmaal.com", true },
- { "khetzal.info", true },
- { "kheyrabady.com", true },
- { "khg-orchester.de", true },
- { "khipu.com", true },
- { "khmb.ru", false },
- { "khmh.co.uk", true },
- { "khojhealth.com", true },
- { "khorne.me", true },
- { "khoury-dulla.ch", true },
- { "khouryalexandre.com", false },
- { "khramtsov.org", true },
- { "khs1994.com", true },
- { "khslaw.com", true },
- { "khudothiswanpark.vn", true },
- { "khushiandjoel.com", true },
- { "ki-management.ch", true },
- { "kiadoapartman.hu", true },
- { "kiahalchemy.com", true },
- { "kiahoriane.com", true },
- { "kiano.net", true },
- { "kiarayoga.com", true },
- { "kibibit.net", true },
- { "kibriscicek.net", true },
- { "kick-in.nl", true },
- { "kickasscanadians.ca", true },
- { "kickedmycat.com", true },
- { "kickingpixels.com.au", true },
- { "kickstart.com.pk", false },
- { "kicou.info", false },
- { "kiczela.eu", true },
- { "kidaptive.com", true },
- { "kiddieschristian.academy", true },
- { "kiddyboom.ua", true },
- { "kidneydonation.com", true },
- { "kids-castles.com", true },
- { "kids-world.dk", true },
- { "kidsareatrip.com", true },
- { "kidsclub.photos", true },
- { "kidsdaysout.co.uk", true },
- { "kidsdinefree.com", true },
- { "kidsforsavingearth.org", true },
- { "kidsinwoods-interfacesouth.org", true },
- { "kidsneversleep.com", false },
- { "kidspaper.nl", true },
- { "kidsphysiotherapy.co.uk", true },
- { "kidsplay-plymouth.co.uk", true },
- { "kidsplaybouncycastles.co.uk", true },
- { "kidswallstickers.com.au", true },
- { "kidtoyshop.ru", true },
- { "kidzpartiesllp.co.uk", true },
- { "kidzsmile.co.uk", true },
- { "kiebel.de", true },
- { "kiekin.org", true },
- { "kiekko.pro", true },
- { "kieran.de", true },
- { "kieran.ie", true },
- { "kieranjones.uk", true },
- { "kieskundig.nl", true },
- { "kiesmedia.com", true },
- { "kiesuwkerstkaart.nl", true },
- { "kigmbh.com", true },
- { "kii91.com", true },
- { "kiinteistot-lidl.fi", true },
- { "kiir.net", true },
- { "kiisu.club", true },
- { "kik.ee", true },
- { "kikbb.com", true },
- { "kiki-voice.jp", true },
- { "kiknudes.co", true },
- { "kiku.pw", true },
- { "kilbi-reussbuehl.ch", true },
- { "kilianvalkhof.com", true },
- { "kiliframework.org", true },
- { "kill.trade", true },
- { "killaraapartments.com.au", true },
- { "killdeer.com", true },
- { "killerkink.net", true },
- { "killerrobots.com", true },
- { "killymoonbouncycastles.com", true },
- { "kilo-files.tk", true },
- { "kilobyte22.de", true },
- { "kilogram.nl", true },
- { "kimai.cloud", true },
- { "kimamass.com", true },
- { "kimathilegal.com", true },
- { "kimbal.co.uk", true },
- { "kimberleythomson.tk", true },
- { "kimdumaine.com", true },
- { "kimiadaro.ir", true },
- { "kimiris.com", true },
- { "kimis.gr", true },
- { "kimisia.net", true },
- { "kimitang.com", true },
- { "kimkuhlmanphoto.com", true },
- { "kimkyzcrs.com", true },
- { "kimmel.com", false },
- { "kimmel.in", true },
- { "kimochi.info", true },
- { "kimotodental.com", true },
- { "kimsnagelstudio.nl", true },
- { "kimtstore.com", true },
- { "kinaesthetics-forschung.net", true },
- { "kinautas.com", true },
- { "kindconcentrates.com", false },
- { "kinderarzt-berlin-zia.de", true },
- { "kinderbasar-luhe.de", true },
- { "kinderchor-bayreuth.de", true },
- { "kinderkleding.news", true },
- { "kinderopvangthuis.nl", true },
- { "kinderpneumologie.ch", true },
- { "kindertagespflege-rasselbande-halle.de", true },
- { "kindertherapie-wesel.de", true },
- { "kinderzahn-bogenhausen.de", true },
- { "kindesfreude.ch", true },
- { "kindlezs.com", true },
- { "kine-duthil.fr", true },
- { "kinepolis-studio.be", true },
- { "kinerd.me", true },
- { "kinesiomed-cryosauna.gr", true },
- { "kinetiq.com", true },
- { "kinfolkcoffee.com", true },
- { "king-of-the-castles.com", true },
- { "kingant.net", true },
- { "kinganywhere.eu", true },
- { "kingdoms.gg", true },
- { "kingfast.eu.org", true },
- { "kingiescastles.co.uk", true },
- { "kingjamesbibleonline.org", true },
- { "kingjamesgospel.com", true },
- { "kinglier.ga", true },
- { "kingnascholing.nl", true },
- { "kingofshooting.com", true },
- { "kingofthecastlecoventry.co.uk", true },
- { "kingofthecastlesentertainments.co.uk", true },
- { "kingofthecastlesouthwales.co.uk", true },
- { "kingofthecastlesrhyl.co.uk", true },
- { "kingsblueblue.com", true },
- { "kingsfoot.com", true },
- { "kingsgateseptic.com", true },
- { "kingshome.gr", true },
- { "kingsofkauffman.com", true },
- { "kingsvilletexas.com", true },
- { "kingtreeexperts.com", true },
- { "kingwoodtxlocksmith.com", true },
- { "kini24.ru", true },
- { "kinkcafe.net", true },
- { "kinkenonline.com", true },
- { "kinkyhookup.com", true },
- { "kinmunity.com", true },
- { "kinnikinnick.com", true },
- { "kinniyaonlus.com", false },
- { "kino-doma.tk", true },
- { "kinocheck.de", true },
- { "kinodrom.kiev.ua", true },
- { "kinodrom.tk", true },
- { "kinohled.cz", true },
- { "kinomagia.cf", true },
- { "kinos.nl", true },
- { "kinosha.tk", true },
- { "kinoshki.ga", true },
- { "kinothek.at", true },
- { "kinovsem.ml", true },
- { "kinozal-tv.appspot.com", true },
- { "kinozone.tk", true },
- { "kinshipnd.com", true },
- { "kinsights.com", false },
- { "kinsmenhomelottery.com", true },
- { "kintana.ovh", true },
- { "kintawifi.com", true },
- { "kintone.com", true },
- { "kintore.tv", true },
- { "kinualive.com", true },
- { "kiocloud.com", true },
- { "kiomara.com", true },
- { "kionetworks.es", true },
- { "kiot.eu", true },
- { "kiousis.me", true },
- { "kip-ribbetjes-bestellen.be", true },
- { "kipa.at", true },
- { "kipiradio.com", true },
- { "kippenbart.gq", true },
- { "kipsu.com", true },
- { "kipwells32.com", true },
- { "kiragameforum.net", true },
- { "kirainmoe.com", true },
- { "kiraku.co", true },
- { "kirbear.com", true },
- { "kirche-sankt-augustin.de", true },
- { "kirchen-im-web.de", false },
- { "kirchenchor-olzheim.de", true },
- { "kirchengemeinde-markt-erlbach.de", true },
- { "kirchhoff-getraenke.de", true },
- { "kircp.com", true },
- { "kirei.se", true },
- { "kireilign.com", true },
- { "kirgistan.tk", true },
- { "kirig.ph", true },
- { "kirikira.moe", true },
- { "kirill.fr", true },
- { "kirillaristov.com", true },
- { "kirillpokrovsky.de", true },
- { "kirinas.com", true },
- { "kirinuki.jp", true },
- { "kirkae.com", true },
- { "kirkforcongress.com", true },
- { "kirklandtriallawyer.com", true },
- { "kirkovsky.com", true },
- { "kirkwood-smith.com", true },
- { "kirkwoodfence.com", true },
- { "kiro-ku.com", true },
- { "kiropraktorvard.se", true },
- { "kirov.ml", true },
- { "kirovcity.tk", true },
- { "kirovgrad.tk", true },
- { "kirrie.pe.kr", true },
- { "kirsch-gestaltung.de", true },
- { "kirschbaum.me", true },
- { "kirscrb.ru", true },
- { "kirstenbos.ca", true },
- { "kirstin-peters.de", true },
- { "kirwandigital.com", true },
- { "kisallatorvos.hu", true },
- { "kisel.org", true },
- { "kisiselveri.com", true },
- { "kiskeedeesailing.com", true },
- { "kisma.de", true },
- { "kisser.name", true },
- { "kissesb.com", true },
- { "kissgyms.com", true },
- { "kisskiss.ch", true },
- { "kissmycreative.com", true },
- { "kissoft.ro", true },
- { "kita-freie-schule.de", true },
- { "kita-sun.com", true },
- { "kitabmimpi.com", true },
- { "kitabnamabayi.com", true },
- { "kitacoffee.com", true },
- { "kitchen-profi.by", true },
- { "kitchen-profi.com.ua", true },
- { "kitchen-profi.kz", true },
- { "kitchenpad.biz", true },
- { "kitchenpad.co.uk", true },
- { "kitchenpad.info", true },
- { "kitchenpad.net", true },
- { "kitchenpad.org", true },
- { "kitchenpad.us", true },
- { "kitchenpadtimer.com", true },
- { "kitchenpunx.com", false },
- { "kitchenwarestore.xyz", true },
- { "kiteadventure.nl", true },
- { "kiteschooledam.nl", true },
- { "kiteschoolijmuiden.nl", true },
- { "kiteschoolkatwijk.nl", true },
- { "kiteschoolnoordwijk.nl", true },
- { "kiteschoolschellinkhout.nl", true },
- { "kiteschoolwijkaanzee.nl", true },
- { "kiteschoolzandvoort.nl", true },
- { "kitevalley.tk", true },
- { "kitpartners.com", true },
- { "kitseliit.ee", true },
- { "kittmedia.com", true },
- { "kittpress.com", true },
- { "kittymagician.com", true },
- { "kivitelezesbiztositas.hu", true },
- { "kiwee.eu", true },
- { "kiwi-bird.xyz", true },
- { "kiwi.digital", true },
- { "kiwi.wiki", true },
- { "kiwibird.tokyo", true },
- { "kiwiflowershop.com.ua", true },
- { "kiwitastic.com", true },
- { "kiyotatsu.com", true },
- { "kizomba.info", true },
- { "kizzedbykelz.com", true },
- { "kj-prince.com", true },
- { "kj1396.net", true },
- { "kjaer.io", true },
- { "kjarrval.is", true },
- { "kjchernov.info", true },
- { "kjellner.com", true },
- { "kjelltitulaer.com", true },
- { "kjellvn.net", true },
- { "kjfaudio.com", true },
- { "kjmedia.dk", true },
- { "kjnotes.com", true },
- { "kk-neudorf-duissern.de", false },
- { "kk.in.th", true },
- { "kk.sb", true },
- { "kkcinemas.in", true },
- { "kki.org", true },
- { "kkovacs.eu", true },
- { "kkr-bridal.net", true },
- { "kks-karlstadt.de", true },
- { "kksg.com", true },
- { "kkutu.xyz", true },
- { "kkyy.me", true },
- { "kkzxak47.com", true },
- { "kl-diaetist.dk", true },
- { "klaasmeijerbodems.nl", true },
- { "klabnik.cz", true },
- { "klabnikova.cz", true },
- { "klacki.de", true },
- { "klaim.us", true },
- { "klanggut.at", true },
- { "klapib.ee", true },
- { "klarika.com", true },
- { "klarmobil-empfehlen.de", true },
- { "klassika.tk", true },
- { "klauke-enterprises.com", true },
- { "klausbrinch.dk", false },
- { "klausen.dk", true },
- { "klauswissmann.com", true },
- { "klaver.it", true },
- { "klaw.xyz", true },
- { "klaxon.me", true },
- { "kle.cz", true },
- { "kleaning.by", true },
- { "klebeband.eu", true },
- { "klebetape.de", true },
- { "kleidermarkt-vintage.de", true },
- { "kleim.fr", true },
- { "kleinblogje.nl", false },
- { "kleine-dingen.nl", true },
- { "kleine-strandburg-heringsdorf.de", true },
- { "kleine-strandburg.com", true },
- { "kleine-strolche-lich.de", true },
- { "kleine-viecherei.de", true },
- { "kleineanfragen.de", true },
- { "kleinestrandburg-heringsdorf.de", true },
- { "kleinestrandburg-usedom.de", true },
- { "kleineviecherei.de", true },
- { "kleinhaneveld.tk", true },
- { "kleinreich.de", true },
- { "kleinsys.com", true },
- { "kleintransporte.net", true },
- { "klemkow.net", true },
- { "klemkow.org", true },
- { "klempin.net", true },
- { "klempin.se", true },
- { "kleor.com", true },
- { "kleppe.co", true },
- { "kleteckova.cz", true },
- { "klev.su", true },
- { "kli.is", true },
- { "klickstdu.com", true },
- { "kliemann.me", true },
- { "klil.co.il", true },
- { "klimaloven.no", true },
- { "klimapartner.de", true },
- { "klimmzugstange-fitness.de", true },
- { "klingenundmesser.com", true },
- { "klinik-fuer-aesthetische-zahnheilkunde.de", true },
- { "klinikac.co.id", false },
- { "klinkenberg.ws", true },
- { "klishyn.com", true },
- { "klitmoeller.de", true },
- { "klitmoeller.dk", true },
- { "kliu.io", true },
- { "klm-huisjes.nl", true },
- { "klmhouses.com", true },
- { "klocast.com", true },
- { "klocker-ausserlechner.com", true },
- { "klocksnack.se", false },
- { "kloclabs.com", true },
- { "kloia.com", true },
- { "klop.info", true },
- { "klose.family", true },
- { "klosko.net", true },
- { "kloudboy.com", true },
- { "klssn.com", true },
- { "klu.io", true },
- { "klub.tk", true },
- { "klubxanadu.cz", true },
- { "kluck.me", true },
- { "klugemedia.de", true },
- { "klusbedrijfdupau.nl", true },
- { "klustermedia.com", true },
- { "klusweb-merenwijk.nl", true },
- { "klva.cz", true },
- { "kmashworth.co.uk", true },
- { "kmkz.jp", true },
- { "kmucsu.com", true },
- { "kn007.net", true },
- { "kn40la.com", true },
- { "kn4ivj.com", true },
- { "kn4ola.com", true },
- { "knab-networks.com", true },
- { "knapp.noip.me", true },
- { "knapp.servehttp.com", true },
- { "knautiluz.net", true },
- { "kncg.pw", true },
- { "kndkv.com", true },
- { "kndrd.io", true },
- { "kneblinghausen.de", true },
- { "knechtology.com", true },
- { "knegten-agilis.com", true },
- { "kneli.co.il", true },
- { "knep.me", true },
- { "kneppe.me", true },
- { "knetterbak.nl", true },
- { "kngk-group.ru", true },
- { "kngk.org", true },
- { "kngkng.com", true },
- { "knightsbridge.net", true },
- { "knightsbridgewine.com", true },
- { "knihovnajablonne.cz", true },
- { "knip.ch", true },
- { "knispel-online.de", true },
- { "knitfarious.com", true },
- { "knmv.nl", true },
- { "knnet.ch", true },
- { "knoji.com", true },
- { "knop.info", false },
- { "knowarth.com", true },
- { "knowledgehook.com", true },
- { "knowyourday.ai", true },
- { "knoxvilleimplants.com", true },
- { "knrt.de", true },
- { "knrt.eu", true },
- { "knthost.com", true },
- { "knulla.me", true },
- { "knulle.me", true },
- { "knurps.de", true },
- { "knuterikskare.no", true },
- { "knuthildebrandt.de", false },
- { "knygos.lt", true },
- { "ko-sys.com", true },
- { "koalas.org", true },
- { "koba.jp", true },
- { "kobejet.com", true },
- { "kobofarm.com", true },
- { "koboldmalade.fr", true },
- { "kobolya.hu", true },
- { "kobudo49.fr", true },
- { "kochbar.de", true },
- { "kocherev.org", true },
- { "kochereva.com", true },
- { "kochhar.net", true },
- { "kochinke.com", true },
- { "kochinke.us", true },
- { "kocka.cf", true },
- { "kocka.tech", true },
- { "kockanakocko.si", true },
- { "kodak-ism.com", true },
- { "kodamail.com", true },
- { "kodden.com.br", true },
- { "kode.ch", false },
- { "kodenia.com", true },
- { "kodify.net", true },
- { "kodkollen.com", true },
- { "kodkollen.se", true },
- { "kodomo.live", true },
- { "koe.hn", true },
- { "koebbes.de", true },
- { "koecollege.com", true },
- { "koeeusa.org", true },
- { "koef.nl", true },
- { "koehlhoff.de", true },
- { "koehn.com", true },
- { "koelnmafia.de", true },
- { "koenigsbrunner-tafel.de", true },
- { "koenleemans.nl", true },
- { "koenrh.com", true },
- { "koenrh.net", true },
- { "koenrh.nl", true },
- { "koenrouwhorst.com", true },
- { "koenrouwhorst.nl", true },
- { "koenzk.nl", true },
- { "koerperkult.ch", true },
- { "koertner-muth.com", true },
- { "koertner-muth.de", true },
- { "koethen-markt.de", true },
- { "koetjesenkanker.nl", true },
- { "koffie-enzo.com", true },
- { "koffkindom.ru", true },
- { "koflegend.com", true },
- { "kofler.info", true },
- { "kogak.ninja", true },
- { "kogax.com", true },
- { "kogi.fr", true },
- { "kogro.de", true },
- { "kogudesi.com", true },
- { "kohlchan.net", true },
- { "kohlistkool.tk", true },
- { "koho.fi", true },
- { "kohoutsautomotive.com", true },
- { "kohsandra.com", false },
- { "kohu.nz", true },
- { "koi-lexikon.de", true },
- { "koicenter-thuine.de", true },
- { "koifish.org", true },
- { "koineuno.com", true },
- { "koji-tsujitani.net", true },
- { "kojip.com", true },
- { "kojy.fr", true },
- { "koka-shop.de", true },
- { "koketteriet.se", true },
- { "koki.cl", true },
- { "kokobaba.com", true },
- { "kokomo.xyz", true },
- { "kokomu.com", true },
- { "kokona.ch", true },
- { "kokosnusswasser.de", true },
- { "kokumoto.com", true },
- { "kolania.de", true },
- { "kolania.net", true },
- { "kolaprestaurant.com", true },
- { "kolbeinsson.se", true },
- { "kolcsey.eu", true },
- { "kolibrikapp.com", true },
- { "kolibrisolutions.nl", true },
- { "kolin.org", true },
- { "kolizaskrap.bg", true },
- { "kolja-engelmann.de", true },
- { "kolkinn.no", true },
- { "kollega.it", true },
- { "kollegamenti.it", true },
- { "kollross.io", true },
- { "kolmann.at", true },
- { "kolmann.eu", true },
- { "kolpingsfamilie-vechta-maria-frieden.de", true },
- { "kolrami.com", true },
- { "koluke.co", true },
- { "koluke.com", true },
- { "komelin.com", false },
- { "komenamanda.de", true },
- { "kometia.com", true },
- { "komfort.kh.ua", true },
- { "komicloud.com", true },
- { "komidoc.com", true },
- { "kominfo.go.id", true },
- { "kominfo.net", false },
- { "kominki-sauny.pl", true },
- { "komintek.ru", true },
- { "komischkeszeug.de", true },
- { "kommaer.dk", true },
- { "kommune42.org", true },
- { "kommunermeddnssec.se", true },
- { "kommunermedipv6.se", true },
- { "kommx.de", true },
- { "komoju.com", true },
- { "komok.co.uk", true },
- { "komp247.pl", true },
- { "kompetenzkurs.de", true },
- { "komplet.sk", true },
- { "kon-sil.de", true },
- { "konarentals.net", true },
- { "kondi.net", true },
- { "kondomshop.org", true },
- { "kondou-butsudan.com", true },
- { "konfekcjonowanie.com", true },
- { "kongar.org", true },
- { "kongress-hostessen.de", true },
- { "koniecfica.sk", false },
- { "konijntjes.nl", true },
- { "konings.it", false },
- { "koningskwartiertje.nl", true },
- { "konklone.com", true },
- { "konkursita.ru", true },
- { "konosuke.jp", true },
- { "konplott.shop", true },
- { "konpyuta.nl", true },
- { "konst.se", true },
- { "konstanz.tk", true },
- { "konstructdigital.com", true },
- { "konsul.tk", true },
- { "kontaxis.org", true },
- { "kontorhaus-stralsund.de", true },
- { "kontrolapovinnosti.cz", true },
- { "konveer.com.ua", true },
- { "konventa.net", true },
- { "konyaescortsiteler.net", true },
- { "konyalian.com", true },
- { "konzertheld.de", true },
- { "koodaklife.com", true },
- { "koode.mx", true },
- { "koodimasin.ee", true },
- { "koodimasin.eu", true },
- { "kooer.org", true },
- { "kooibeds.com", true },
- { "koolauwomenshealthcare.com", true },
- { "kooli.ee", true },
- { "koolikatsed.ee", true },
- { "koolitee.ee", true },
- { "kooliveeb.ee", true },
- { "koop-bremen.de", true },
- { "kooponline.eu", true },
- { "koot.nl", true },
- { "kooxdiving.com", true },
- { "koozal.de", true },
- { "kopfgeld.tk", true },
- { "kopfkrieg.org", true },
- { "kopfootdoctor.com", true },
- { "kopfundseele.de", true },
- { "kopidingin.xyz", true },
- { "kopjethee.nl", true },
- { "koplancpa.com", true },
- { "koplax-online.com", true },
- { "kopplin.family", true },
- { "koptev.ru", true },
- { "kopteva.ru", true },
- { "korancode.tk", true },
- { "korbel-loziska.cz", true },
- { "korben.info", true },
- { "kordamed.ee", true },
- { "korea-dpr.org", true },
- { "korea.dating", true },
- { "koreaboo.com", true },
- { "koreaninhd.com", true },
- { "koreanrandom.com", true },
- { "koreanrandom.ru", true },
- { "koretech.nl", true },
- { "korfbalinformatie.nl", true },
- { "korinar.com", true },
- { "koriyoukai.net", true },
- { "kornrunner.net", true },
- { "korob-ok.com.ua", true },
- { "korobkovsky.ru", false },
- { "koroknaimedical.hu", true },
- { "koroleva.ml", true },
- { "korosiprogram.hu", true },
- { "korp.fr", true },
- { "korrelzout.nl", true },
- { "kortgebyr.dk", true },
- { "korund.tk", true },
- { "korup.com", true },
- { "koryfi.com", true },
- { "kos4all.com", true },
- { "kos9078.com", true },
- { "koscielniak-nieruchomosci.pl", true },
- { "kosherjava.com", true },
- { "kosinc.org", true },
- { "kosmos.org.tw", true },
- { "kosmosfestival.tk", true },
- { "kost-magazin.de", true },
- { "kostal.com", true },
- { "kostecki.com", true },
- { "kostecki.org", true },
- { "kostecki.tel", true },
- { "kostya.ws", true },
- { "kosuzu.moe", true },
- { "kother.org", true },
- { "kotilinkki.fi", true },
- { "kotitesti.fi", true },
- { "kotke.ru", true },
- { "kotly-marten.com.ua", true },
- { "kotmale.com", true },
- { "kotobox.net", true },
- { "kotois.com", true },
- { "kotonozaka.xyz", true },
- { "kotori.love", true },
- { "kotuwa.tk", true },
- { "kouki-food.com", true },
- { "koumakan.cc", true },
- { "koumuwin.com", true },
- { "koupons.nl", true },
- { "koushinjo.org", true },
- { "kov.space", true },
- { "kovachica.tk", true },
- { "koval.io", true },
- { "kovehitus.ee", true },
- { "kovspace.com", true },
- { "kovuthehusky.com", true },
- { "kowalmik.tk", true },
- { "kowalstwo.com.pl", true },
- { "kowarschick.de", true },
- { "koyo.kr", true },
- { "kozawa.tokyo", true },
- { "kozlekedes.info", true },
- { "kozuch.biz", true },
- { "kp0808.cc", true },
- { "kpfanworld.com", true },
- { "kpforme.org", true },
- { "kpinvest.eu", true },
- { "kplasticsurgery.com", true },
- { "kplnet.net", true },
- { "kpmgclientcollab.co.nz", true },
- { "kpnthings.com", true },
- { "kpop.re", true },
- { "kpopsource.com", true },
- { "kprem.com", true },
- { "kpumuk.info", true },
- { "kr.search.yahoo.com", false },
- { "kr0n.dk", true },
- { "krachtinverbinding.nl", true },
- { "kradalby.no", true },
- { "kraft.blog", true },
- { "kraft.im", true },
- { "kraftfleisch.de", true },
- { "kraftpc.com", true },
- { "kraftzeiten.de", true },
- { "krag.be", true },
- { "kraga.sk", true },
- { "kraken.io", true },
- { "kraken.site", true },
- { "krakozyabra.gq", true },
- { "kralik.io", true },
- { "kralovskapradelna.cz", true },
- { "kralovstvimap.cz", true },
- { "kram.nz", true },
- { "krambeutel.de", true },
- { "kramsj.uk", true },
- { "krang.org.uk", true },
- { "kranjnakolo.ml", true },
- { "krankenpflege-haushaltshilfe.de", true },
- { "krasnodar-avia.ru", true },
- { "krasnodar-pravoved.ru", true },
- { "krasnodar24.tk", true },
- { "krasovsky.me", true },
- { "kratochvilovi.net", true },
- { "krautomat.com", true },
- { "kravmagaangers.fr", true },
- { "kraynik.com", true },
- { "krayx.com", true },
- { "krazykastles.co.uk", true },
- { "krazykoolkastles.com", true },
- { "krazyphotobooths.co.uk", true },
- { "kreationnext.com", false },
- { "kreativbande.com", true },
- { "kreativelabs.ch", false },
- { "kreativklinik.at", true },
- { "kreativoweb.tk", true },
- { "kreativstrecke.de", true },
- { "kreatorbus.com", true },
- { "kredit-abzocke.com", true },
- { "kreditkacs.cz", true },
- { "kreditkoll.nu", true },
- { "kredytzen.pl", true },
- { "krehl.io", true },
- { "kremalicious.com", true },
- { "kresimir-blazevic.tk", true },
- { "krestanskydarek.cz", true },
- { "kretschmann.consulting", true },
- { "kreuzpfadfinder.de", true },
- { "kreuzwortraetsellosungen.com", true },
- { "kreyolgym.fr", true },
- { "kriechel.de", true },
- { "krikorianconstruction.com", true },
- { "krimikiosk.de", true },
- { "krinetzki.de", true },
- { "kringloopwinkelsteenwijk.nl", true },
- { "krinnovations.ie", true },
- { "kriptokereso.com", true },
- { "kriptoworld.hu", true },
- { "krise-chance.ch", true },
- { "krisenintervention-deutschland.de", true },
- { "kriseninterventiondeutschland.de", true },
- { "krisftp.fr", true },
- { "krishnenduayur.org", true },
- { "krishofer.com", true },
- { "kriskras99.nl", true },
- { "krismurray.co.uk", true },
- { "krisstarkey.co.uk", true },
- { "kristall-energie.at", true },
- { "kristiehill.com", true },
- { "kristikala.nl", true },
- { "kristinbailey.com", true },
- { "kristofba.ch", true },
- { "kristofdv.be", true },
- { "kritikahotels.com", true },
- { "kritikawebu.cz", true },
- { "kritikos.io", true },
- { "krizevci.info", true },
- { "krmela.com", true },
- { "krmeni.cz", false },
- { "kroell.net", true },
- { "krokedil.se", true },
- { "kromamoveis.com.br", true },
- { "kromax.it", true },
- { "kromonos.net", true },
- { "kronopolo.com", true },
- { "kroon.email", true },
- { "kropkait.pl", true },
- { "krossakorven.tk", true },
- { "krovatka.tk", true },
- { "kroy.io", true },
- { "krrn.de", false },
- { "krsaustralia.com.au", true },
- { "krsn.de", true },
- { "krsvrs.nl", true },
- { "krti.com.ua", true },
- { "krug-munroe.wedding", true },
- { "krugersdorpplumber24-7.co.za", true },
- { "kruin.net", true },
- { "kruisselbrink.com", true },
- { "kruk.co", true },
- { "krumberconsulting.com", true },
- { "krumpf.de", true },
- { "krup.com.ua", true },
- { "krupa.net.pl", false },
- { "kruselegal.com.au", true },
- { "krusic22.com", true },
- { "krutka.cz", true },
- { "kry.no", true },
- { "kry.se", true },
- { "kryglik.com", true },
- { "krypsys.com", true },
- { "krypt.com", true },
- { "kryptera.se", true },
- { "krypto-geld.eu", true },
- { "kryptologie.tk", true },
- { "kryptomech.com", true },
- { "kryptux.xyz", true },
- { "kryx.de", true },
- { "krzyzowki123.pl", true },
- { "ks-watch.de", true },
- { "ks009.com", true },
- { "ks0098.com", true },
- { "ks016.com", true },
- { "ks0168.com", true },
- { "ks017.com", true },
- { "ks0188.com", true },
- { "ks023.com", true },
- { "ks0288.com", true },
- { "ks038.com", true },
- { "ks0388.com", true },
- { "ks05.cc", true },
- { "ks051.com", true },
- { "ks053.com", true },
- { "ks0550.com", true },
- { "ks0558.com", true },
- { "ks0566.com", true },
- { "ks0577.com", true },
- { "ks058.com", true },
- { "ks0588.com", true },
- { "ks059.com", true },
- { "ks0599.com", true },
- { "ks06.cc", true },
- { "ks061.com", true },
- { "ks0618.com", true },
- { "ks062.com", true },
- { "ks063.com", true },
- { "ks065.com", true },
- { "ks0660.com", true },
- { "ks0668.com", true },
- { "ks068.com", true },
- { "ks0688.com", true },
- { "ks0718.com", true },
- { "ks0766.com", true },
- { "ks0768.com", true },
- { "ks0770.com", true },
- { "ks0776.com", true },
- { "ks0778.com", true },
- { "ks078.com", true },
- { "ks0788.com", true },
- { "ks080.com", true },
- { "ks081.com", true },
- { "ks0816.com", true },
- { "ks082.com", true },
- { "ks0855.com", true },
- { "ks0858.com", true },
- { "ks086.com", true },
- { "ks0877.com", true },
- { "ks0878.com", true },
- { "ks0886.com", true },
- { "ks093.com", true },
- { "ks096.com", true },
- { "ks0977.com", true },
- { "ks098.com", true },
- { "ks0990.com", true },
- { "ks0996.com", true },
- { "ks10.ag", true },
- { "ks10.vip", true },
- { "ks105.com", true },
- { "ks15.net", true },
- { "ks1519.com", true },
- { "ks16.cc", true },
- { "ks16.net", true },
- { "ks1608.com", true },
- { "ks161.com", true },
- { "ks162.com", true },
- { "ks18.cc", true },
- { "ks182.com", true },
- { "ks191.com", true },
- { "ks20.vip", true },
- { "ks200.vip", true },
- { "ks2000.vip", true },
- { "ks202.com", true },
- { "ks2020.vip", true },
- { "ks204.com", true },
- { "ks206.com", true },
- { "ks208.com", true },
- { "ks2099.com", true },
- { "ks257.com", true },
- { "ks262.com", true },
- { "ks28.cc", true },
- { "ks28.net", true },
- { "ks281.com", true },
- { "ks2888.com", true },
- { "ks2888.net", true },
- { "ks291.com", true },
- { "ks299.net", true },
- { "ks30.vip", true },
- { "ks308.com", true },
- { "ks32.cc", true },
- { "ks329.com", true },
- { "ks330.com", true },
- { "ks335.com", true },
- { "ks335.net", true },
- { "ks337.net", true },
- { "ks339.net", true },
- { "ks36.net", true },
- { "ks3636.com", true },
- { "ks3737.com", true },
- { "ks380.com", true },
- { "ks381.com", true },
- { "ks388.com", true },
- { "ks3888.com", true },
- { "ks3939.com", true },
- { "ks40.vip", true },
- { "ks50.vip", true },
- { "ks5000.com", true },
- { "ks502.com", true },
- { "ks503.com", true },
- { "ks509.com", true },
- { "ks515.com", true },
- { "ks516.com", true },
- { "ks531.com", true },
- { "ks539.com", true },
- { "ks541.com", true },
- { "ks549.com", true },
- { "ks55.net", true },
- { "ks571.com", true },
- { "ks58.net", true },
- { "ks5808.com", true },
- { "ks5888.com", true },
- { "ks5888.net", true },
- { "ks597.com", true },
- { "ks60.vip", true },
- { "ks600.com", true },
- { "ks6008.com", true },
- { "ks608.com", true },
- { "ks610.com", true },
- { "ks6225.com", true },
- { "ks628.com", true },
- { "ks629.com", true },
- { "ks635.com", true },
- { "ks636.com", true },
- { "ks637.com", true },
- { "ks641.com", true },
- { "ks6522.com", true },
- { "ks6525.com", true },
- { "ks6533.com", true },
- { "ks6535.com", true },
- { "ks657.com", true },
- { "ks66.la", true },
- { "ks6600.com", true },
- { "ks6601.com", true },
- { "ks6602.com", true },
- { "ks6603.com", true },
- { "ks6605.com", true },
- { "ks6607.com", true },
- { "ks6609.com", true },
- { "ks6612.com", true },
- { "ks6615.com", true },
- { "ks6617.com", true },
- { "ks6618.com", true },
- { "ks6619.com", true },
- { "ks6620.com", true },
- { "ks6621.com", true },
- { "ks6623.com", true },
- { "ks6625.com", true },
- { "ks6626.com", true },
- { "ks6627.com", true },
- { "ks6628.com", true },
- { "ks6629.com", true },
- { "ks6630.com", true },
- { "ks6631.com", true },
- { "ks6632.com", true },
- { "ks6635.com", true },
- { "ks6637.com", true },
- { "ks6638.com", true },
- { "ks6650.com", true },
- { "ks6651.com", true },
- { "ks6652.com", true },
- { "ks6653.com", true },
- { "ks6656.com", true },
- { "ks6657.com", true },
- { "ks6658.com", true },
- { "ks6659.com", true },
- { "ks6665.com", true },
- { "ks6670.com", true },
- { "ks6671.com", true },
- { "ks668.com", true },
- { "ks6681.com", true },
- { "ks6685.com", true },
- { "ks6686.com", true },
- { "ks6687.com", true },
- { "ks6733.com", true },
- { "ks6735.com", true },
- { "ks6799.com", true },
- { "ks68.net", true },
- { "ks680.com", true },
- { "ks6800.com", true },
- { "ks6805.com", true },
- { "ks6806.com", true },
- { "ks6807.com", true },
- { "ks6808.com", true },
- { "ks6809.com", true },
- { "ks681.com", true },
- { "ks6810.com", true },
- { "ks6812.com", true },
- { "ks6813.com", true },
- { "ks6815.com", true },
- { "ks6816.com", true },
- { "ks6817.com", true },
- { "ks6819.com", true },
- { "ks6820.com", true },
- { "ks6821.com", true },
- { "ks6822.com", true },
- { "ks6823.com", true },
- { "ks6825.com", true },
- { "ks6826.com", true },
- { "ks6827.com", true },
- { "ks6828.com", true },
- { "ks6829.com", true },
- { "ks6830.com", true },
- { "ks6831.com", true },
- { "ks6832.com", true },
- { "ks6833.com", true },
- { "ks6835.com", true },
- { "ks6836.com", true },
- { "ks6837.com", true },
- { "ks6838.com", true },
- { "ks6839.com", true },
- { "ks6850.com", true },
- { "ks6851.com", true },
- { "ks6852.com", true },
- { "ks6853.com", true },
- { "ks6857.com", true },
- { "ks6860.com", true },
- { "ks6861.com", true },
- { "ks6862.com", true },
- { "ks6863.com", true },
- { "ks6867.com", true },
- { "ks6870.com", true },
- { "ks6871.com", true },
- { "ks6880.com", true },
- { "ks6887.com", true },
- { "ks695.com", true },
- { "ks698.com", true },
- { "ks6998.com", true },
- { "ks7.vip", true },
- { "ks70.vip", true },
- { "ks7272.com", true },
- { "ks7373.com", true },
- { "ks8.ag", true },
- { "ks8.net", true },
- { "ks80.vip", true },
- { "ks806.com", true },
- { "ks8086.com", true },
- { "ks81.cc", true },
- { "ks8126.com", true },
- { "ks8127.com", true },
- { "ks86.cc", true },
- { "ks86.net", true },
- { "ks8600.com", true },
- { "ks8787.com", true },
- { "ks88.ag", true },
- { "ks88.best", true },
- { "ks88.com", true },
- { "ks88.org", true },
- { "ks8802.com", true },
- { "ks8805.com", true },
- { "ks8812.com", true },
- { "ks8819.com", true },
- { "ks8825.com", true },
- { "ks883.com", true },
- { "ks8831.com", true },
- { "ks8851.com", true },
- { "ks8852.com", true },
- { "ks8860.com", true },
- { "ks888.ag", true },
- { "ks888.la", true },
- { "ks8881.com", true },
- { "ks8882.com", true },
- { "ks8883.com", true },
- { "ks8892.com", true },
- { "ks8895.com", true },
- { "ks89.cc", true },
- { "ks89.net", true },
- { "ks8915.com", true },
- { "ks90.vip", true },
- { "ks902.com", true },
- { "ks905.com", true },
- { "ks907.com", true },
- { "ks912.com", true },
- { "ks921.com", true },
- { "ks9211.com", true },
- { "ks9393.com", true },
- { "ks958.com", true },
- { "ks98.cc", true },
- { "ks9888.com", true },
- { "ks996.com", true },
- { "ksbet.ag", true },
- { "kscarlett.com", true },
- { "kschv-rdeck.de", true },
- { "kselenia.ee", true },
- { "ksero.center", true },
- { "ksero.wroclaw.pl", true },
- { "ksham.net", true },
- { "ksmmmo.org.tr", true },
- { "ksoc.com", true },
- { "ksopp.si", true },
- { "ksradio.it", true },
- { "kssk.de", true },
- { "kst-dlvr.tk", true },
- { "kst-service.tk", true },
- { "kstr.us", true },
- { "ksukelife.com", true },
- { "ksvip10.com", true },
- { "kt-events.de", true },
- { "kt-zoe.com", true },
- { "kt3i.com", true },
- { "ktbnetbank.com", true },
- { "kthnxbai.xyz", true },
- { "ktm-troxler.de", true },
- { "ktmclubitalia.it", true },
- { "kts-thueringen.de", true },
- { "ktsee.eu.org", true },
- { "ktuluweb.tk", true },
- { "ktw.lv", true },
- { "kuadey.com", true },
- { "kuaimen.bid", true },
- { "kuaiyaojing.com", true },
- { "kualiti.net", true },
- { "kualo.co.uk", true },
- { "kualo.com", true },
- { "kualo.in", true },
- { "kuaza.com", true },
- { "kub.hr", true },
- { "kubabrussel.be", true },
- { "kubeico.com", true },
- { "kubkprf.ru", true },
- { "kublis.ch", true },
- { "kuchen-am-stiel.de", true },
- { "kucloud.win", true },
- { "kucnibudzet.com", true },
- { "kudinilam.tk", true },
- { "kuditel.net", true },
- { "kudo.co.id", true },
- { "kuechenserver.de", true },
- { "kuechenserver.org", true },
- { "kuehndel.org", true },
- { "kuehnel-bs.de", true },
- { "kuehnel-online.eu", true },
- { "kuemmerlin.eu", true },
- { "kuemmling.eu", true },
- { "kuhn-elektrotechnik.de", true },
- { "kuhne-electronic.de", true },
- { "kuhnelautorepair.com", true },
- { "kuhnerts.eu", true },
- { "kujadin.de", true },
- { "kukal.cz", true },
- { "kukeri-karlovo.tk", true },
- { "kuketz-blog.de", true },
- { "kuketz-security.de", true },
- { "kuketz-suche.de", true },
- { "kukoon.de", false },
- { "kulde.net", true },
- { "kulinaristi.fi", true },
- { "kulivps.com", true },
- { "kulpakko.com", true },
- { "kulthist.tk", true },
- { "kultmobil.se", true },
- { "kultsar.com", true },
- { "kulturmel.ch", true },
- { "kuma.es", true },
- { "kumachan.biz", true },
- { "kumalog.com", true },
- { "kumasanda.jp", true },
- { "kumpulannamabayi.com", true },
- { "kunaldesai.blog", true },
- { "kunda.ovh", true },
- { "kundo.se", true },
- { "kungerkueken.de", true },
- { "kunow.ml", true },
- { "kunra.de", true },
- { "kunstdrucke-textildruck.de", true },
- { "kunsthandel-augustus-rex.de", true },
- { "kunstkieken.nl", true },
- { "kunstundunrat.de", true },
- { "kunvarji.com", true },
- { "kuoruan.com", true },
- { "kup-sluzbu.cz", true },
- { "kupaa.ink", true },
- { "kupferschmids.ch", true },
- { "kupferstichshop.com", true },
- { "kupibilet.ru", true },
- { "kupiclub.com", true },
- { "kupid.com", true },
- { "kupidom2.com", true },
- { "kupiewszystkieauta.pl", true },
- { "kupimlot.ru", true },
- { "kupinska.pl", true },
- { "kupislivki.tk", true },
- { "kupleno.com", true },
- { "kuponydoher.cz", true },
- { "kupriy-coach.ru", true },
- { "kupschke.net", true },
- { "kupsluzbu.cz", true },
- { "kupu.maori.nz", true },
- { "kurdishphotography.tk", true },
- { "kuretru.com", true },
- { "kurhotel-am-reischberg.de", true },
- { "kurido-anime.tk", true },
- { "kurierwilenski.lt", true },
- { "kurniadwin.to", true },
- { "kuroha.co.uk", true },
- { "kuroinu.jp", true },
- { "kuroisalva.xyz", false },
- { "kurona.ga", true },
- { "kuronekogaro.com", true },
- { "kurschies.de", true },
- { "kurserne.dk", true },
- { "kursk-otoplenie.ru", true },
- { "kurswahl-online.de", true },
- { "kursypolska.pl", true },
- { "kurtschlatzer.com", true },
- { "kuruma-ex.jp", true },
- { "kurungkurawal.id", true },
- { "kuruppa.xyz", true },
- { "kusasa.biz", true },
- { "kuscheln.com", true },
- { "kuschku.de", true },
- { "kusdaryanto.web.id", true },
- { "kusochi.eu", true },
- { "kustod.io", true },
- { "kutinsoft.com", true },
- { "kutny.cz", true },
- { "kutsankaplan.com", true },
- { "kuttler.eu", true },
- { "kutus.ee", true },
- { "kuwaitsatellite.co", true },
- { "kuwichitagastro.com", true },
- { "kuwichitaim.com", true },
- { "kuznica.tk", true },
- { "kvadratnimeter.si", true },
- { "kvalita-1a.cz", true },
- { "kvalitetsaktiepodden.se", true },
- { "kvalitnitesneni.cz", true },
- { "kvantel.no", true },
- { "kvcc.com.au", true },
- { "kvest-v-moskve.ga", true },
- { "kvestiks.ru", true },
- { "kvetinymilt.cz", true },
- { "kvetinyumarkety.cz", true },
- { "kvhile.com", true },
- { "kvilt.dk", true },
- { "kvnsport.ru", true },
- { "kvpc.com.au", true },
- { "kwadraadtevredenheid.nl", true },
- { "kwat.chat", true },
- { "kwbresidential.com", true },
- { "kwcolville.com", true },
- { "kweb.ml", true },
- { "kwedo.com", true },
- { "kwench.com", true },
- { "kwickshop.co.nz", true },
- { "kwoll.de", true },
- { "kwyxz.org", true },
- { "kx197.com", true },
- { "kxah35.com", true },
- { "kxnrl.com", true },
- { "kybi.sk", true },
- { "kycisrael.com", true },
- { "kydara.com", true },
- { "kyivstar-internet.com.ua", true },
- { "kyledrake.net", true },
- { "kylegutschow.com", true },
- { "kylejohnson.io", true },
- { "kylianvermeulen.com", true },
- { "kylie-pomada.tk", true },
- { "kylinj.com", false },
- { "kynaston.org.uk", true },
- { "kynastonwedding.co.uk", true },
- { "kyoko.org", true },
- { "kyosaku.org", true },
- { "kyoto-k9.com", false },
- { "kyoto-mic.com", true },
- { "kyoto-tomoshibi.jp", true },
- { "kyotokitsune.com", true },
- { "kyprexxo.com", true },
- { "kyras-castles.co.uk", true },
- { "kyrylych.tk", true },
- { "kys.host", true },
- { "kysseo.fr", true },
- { "kyunyuki.com", true },
- { "kyusyu.org", true },
- { "kyy.me", false },
- { "kz.search.yahoo.com", false },
- { "kzar.co.uk", true },
- { "kzmhk.cz", true },
- { "kzsdabas.hu", true },
- { "l-atelier-c.com", true },
- { "l-lab.org", true },
- { "l0re.com", true },
- { "l0v0l.com", true },
- { "l10n.site", true },
- { "l17r.eu", true },
- { "l214.com", true },
- { "l2guru.ru", true },
- { "l2l.vn", true },
- { "l33te.net", true },
- { "l36533.com", true },
- { "l36594.com", true },
- { "l4n-clan.de", true },
- { "l51365.com", true },
- { "l66.io", true },
- { "l7plumbing.com.au", true },
- { "l7world.com", true },
- { "la-baldosa.fr", false },
- { "la-bolle.fr", false },
- { "la-compagnie-des-elfes.fr", true },
- { "la-fenice-neheim.de", true },
- { "la-ganiere.com", true },
- { "la-kaz-a-velo.fr", true },
- { "la-laitonnerie.com", true },
- { "la-maison.ch", false },
- { "la-maison.eu", true },
- { "la-manufacture-du-nettoyage.com", true },
- { "la-paco.tk", true },
- { "la-petite-entreprise.com", true },
- { "laab.gv.at", true },
- { "laan247.dk", true },
- { "laanius.dk", true },
- { "laatikko.io", true },
- { "laatjeniethackmaken.nl", true },
- { "lab-water-filters.com", true },
- { "labandadelamente.tk", true },
- { "labande-annonce.fr", true },
- { "labanochjonas.se", true },
- { "labanote.com", true },
- { "labanskoller.se", true },
- { "labanskollermark.se", true },
- { "labastidedesaromes.com", false },
- { "labavn.com", true },
- { "labavn.org", true },
- { "labcenter.com", true },
- { "labcoat.jp", true },
- { "labelfactory.nl", true },
- { "labfilter.com", true },
- { "labiblioafronebrulepas.com", false },
- { "lablnet.tk", true },
- { "labobooks.com", true },
- { "laboiteare.fr", true },
- { "laboratoriodemarketingb3.com", true },
- { "labortogether.com", true },
- { "labouncycastlehire.co.uk", true },
- { "labourreedevergheas.fr", true },
- { "laboutiquedejuliette.com", true },
- { "labrat.mobi", false },
- { "labsys.xyz", true },
- { "labtechsupplyco.com", true },
- { "labwater.com", true },
- { "labworks.org", true },
- { "laby.life", true },
- { "laby.me", true },
- { "lacaey.se", true },
- { "lacantine.xyz", true },
- { "lacasadelours.fr", true },
- { "lacaveducinquantenaire.com", true },
- { "laceleste.it", true },
- { "lacentral.com", false },
- { "lacetsfun.com", true },
- { "lacetsroses.ch", true },
- { "laceysfarm.ie", true },
- { "lachainedesentrepreneurs.fr", true },
- { "lachawoj.de", true },
- { "lachlan-harris.com", true },
- { "lachlan.com", true },
- { "lachlanallison.com", true },
- { "lachyoga-schwieberdingen.de", true },
- { "lackierereischmitt.de", true },
- { "laclaque.ch", false },
- { "lacledeslan.com", true },
- { "lacledeslan.org", true },
- { "lacledor.ch", false },
- { "laclefdor.ch", false },
- { "lacoast.gov", true },
- { "lacochinacounselor.com", true },
- { "lacocina.nl", true },
- { "lacoquette.gr", true },
- { "lacyc3.eu", true },
- { "lada-event.com.ua", true },
- { "lada-granta.tk", true },
- { "lada-plus.tk", true },
- { "ladadate.com", true },
- { "ladanmokhtari.tk", true },
- { "ladbroke.net", false },
- { "ladenzeile.at", true },
- { "ladenzeile.de", true },
- { "ladiesofvietnam.net", true },
- { "ladislavbrezovnik.com", true },
- { "lado.ltd", true },
- { "ladocs.tk", true },
- { "ladotech.cn", true },
- { "ladotech.com", true },
- { "ladraiglaan.com", true },
- { "ladymakeup.com.ua", true },
- { "ladymakeup.eu", true },
- { "ladyofhopeparish.org", true },
- { "laencina.tk", true },
- { "laermschmiede.de", true },
- { "laestacionmontevideo.com", true },
- { "laextra.mx", true },
- { "lafansite.tk", true },
- { "lafantasticatravel.com", true },
- { "lafayette-rushford.com", true },
- { "lafcheta.info", true },
- { "lafema.de", true },
- { "lafermegourmande.fr", true },
- { "lafillepolyvalente.ca", true },
- { "lafillepolyvalente.com", true },
- { "lafka.org", true },
- { "laflash.com", true },
- { "lagaia.com.br", true },
- { "lagazzettadigitale.it", true },
- { "lagerauftrag.info", true },
- { "lagit.in", true },
- { "laglab.org", false },
- { "lagout.org", true },
- { "lagrange.cloud", true },
- { "lagriffeduservice.fr", true },
- { "lagsoftware.com", true },
- { "laguinguette.fr", true },
- { "lagunakitchenandbath.com", true },
- { "lahacker.net", true },
- { "lahipotesisgaia.com", true },
- { "lahnau-akustik.de", true },
- { "lai.is", true },
- { "laibcoms.com", true },
- { "laimut.com", true },
- { "lain.at", true },
- { "laindonleisure.co.uk", true },
- { "laissezparler.fr", true },
- { "lajkatheme.com", true },
- { "lak-berlin.de", true },
- { "lake-bonavista.ca", true },
- { "lakeandriverrestoration.com", true },
- { "lakedavid.com.au", true },
- { "lakehavasuwebsites.com", true },
- { "lakelandbank.com", true },
- { "lakeoswegotowncar.com", true },
- { "lakersview.com", true },
- { "lakesherwoodelectric.com", true },
- { "lakesherwoodelectrical.com", true },
- { "lakesherwoodelectrician.com", true },
- { "lakesherwoodexteriorlighting.com", true },
- { "lakesherwoodlandscapelighting.com", true },
- { "lakesherwoodlighting.com", true },
- { "lakesherwoodoutdoorlighting.com", true },
- { "lakeshowlife.com", true },
- { "lakeview.photography", true },
- { "lakewoodcityglass.com", true },
- { "lakiernictwo.auto.pl", true },
- { "lakkt.de", true },
- { "lakonia.com.br", true },
- { "lakorntoday.com", true },
- { "lalalab.com", true },
- { "lalaloe.be", true },
- { "lalaya.fr", true },
- { "laled.ch", false },
- { "lalegria.tk", true },
- { "lalucepulsata.it", true },
- { "lalucioledigitale.com", true },
- { "lalunaonlinebr.com", true },
- { "lalunecreative.com", true },
- { "lalyre-corcelles.ch", false },
- { "lamakat.de", true },
- { "lamaletarural.es", true },
- { "lamapoll.de", true },
- { "lamargheritalruoto.it", true },
- { "lamasacre.tk", true },
- { "lambangcapgiare.com", true },
- { "lambauer.com", true },
- { "lambda.dance", true },
- { "lambda.sx", true },
- { "lambertshealthcare.co.uk", true },
- { "lambertz.xyz", true },
- { "lamboo.be", true },
- { "lamchannang.com", true },
- { "lamclam.site", true },
- { "lamconnect.com", true },
- { "lamdav.com", true },
- { "lamikvah.org", true },
- { "laminine.info", true },
- { "laminsaho.tk", true },
- { "lammersmarketing.com", true },
- { "lamnea.se", true },
- { "lamnhom.com.vn", true },
- { "lamontre.ru", true },
- { "lamp.re", false },
- { "lamp24.se", true },
- { "lampade.it", true },
- { "lampara.es", true },
- { "lampegiganten.dk", true },
- { "lampegiganten.no", true },
- { "lampen24.be", true },
- { "lampen24.nl", true },
- { "lampenwelt.at", true },
- { "lampenwelt.ch", true },
- { "lampenwelt.de", true },
- { "lampposthomeschool.com", true },
- { "lampy.pl", true },
- { "lamujerquesoy.com", false },
- { "lamunyonfoundationrepair.com", true },
- { "lan.biz.tr", true },
- { "lan4.life", true },
- { "lana.swedbank.se", true },
- { "lanahallen.com", true },
- { "lanbroa.eu", true },
- { "lancelafontaine.com", true },
- { "lancelhoff.com", true },
- { "lancemanion.com", true },
- { "lancers.jp", true },
- { "lanceyip.com", true },
- { "lancyvbc.ch", false },
- { "land.nrw", false },
- { "landassessmentservices.com", true },
- { "landbetweenthelakes.us", true },
- { "landchecker.com.au", true },
- { "landegge.nl", true },
- { "landflair-magazin.de", false },
- { "landhaus-havelse.de", true },
- { "landinfo.no", true },
- { "landingear.com", true },
- { "landlordy.com", true },
- { "landofelves.net", false },
- { "landoncreekapartments.com", true },
- { "landsbankinn.com", true },
- { "landsbref.is", true },
- { "landscape-photography.org", true },
- { "landscapelightingagoura.com", true },
- { "landscapelightingagourahills.com", true },
- { "landscapelightingcalabasas.com", true },
- { "landscapelightingcamarillo.com", true },
- { "landscapelightingconejovalley.com", true },
- { "landscapelightingdosvientos.com", true },
- { "landscapelightinghiddenhills.com", true },
- { "landscapelightinglakesherwood.com", true },
- { "landscapelightingmalibu.com", true },
- { "landscapelightingmoorpark.com", true },
- { "landscapelightingnewburypark.com", true },
- { "landscapelightingoakpark.com", true },
- { "landscapelightingsimivalley.com", true },
- { "landscapelightingthousandoaks.com", true },
- { "landscapelightingwestlakevillage.com", true },
- { "landscapephotography.org.au", true },
- { "landyparts.nl", true },
- { "lanetix.com", true },
- { "lanforalla.se", true },
- { "lang-php.com", true },
- { "langadeduero.tk", true },
- { "langapi.com", true },
- { "langatang.com", true },
- { "langbein.org", true },
- { "langduytinh.com", true },
- { "langgasse-baar.ch", true },
- { "langhun.me", true },
- { "langkawihomestay.net", true },
- { "langkawitrip.com", true },
- { "langleyporter.com", true },
- { "langsam-dator.se", true },
- { "langstreckensaufen.de", true },
- { "languagecourse.net", true },
- { "languageterminal.com", true },
- { "langworth.com", true },
- { "langzijn.nl", true },
- { "lanna.io", true },
- { "lannainnovation.com", true },
- { "lannamontessori.com", true },
- { "lannatefl.com", true },
- { "lanodan.eu", true },
- { "lanostrasalute.it", true },
- { "lanparty.si", true },
- { "lanre.org", true },
- { "lanroamer.de", true },
- { "lansechensilu.com", true },
- { "lanselot.com", true },
- { "lansoftware.eu", true },
- { "lanternalauth.com", true },
- { "lanternhealth.org", true },
- { "lantian.pub", true },
- { "lanturtle.com", true },
- { "lanuovariviera.it", true },
- { "lanzalex.com", true },
- { "lanzamientovirtual.es", true },
- { "lanzarote-online.info", true },
- { "laobayy.com", true },
- { "laoliang.ml", true },
- { "laopcionb.net", true },
- { "laoriginalfm.com", true },
- { "laos.dating", true },
- { "lapacho-tee.de", true },
- { "lapageamelkor.org", true },
- { "lapassiondutrading.com", false },
- { "lapatio.dk", true },
- { "lapcameradongnai.com", true },
- { "lapcamerahochiminh.com", true },
- { "lapelpinsandcoins.com", true },
- { "lapicena.eu", true },
- { "lapidge.net", true },
- { "laplacesicherheit.de", true },
- { "laplanetebleue.com", true },
- { "lapolla.com", true },
- { "lapolvora.ga", true },
- { "laportedufutur.org", true },
- { "lapotagere.ch", false },
- { "lapparente-aise.ch", false },
- { "lappari.com", false },
- { "laprensadelasagradafamilia.org", true },
- { "lapseofsanity.net", true },
- { "lapshore.com", true },
- { "laqueuedevache.be", true },
- { "lara.photography", true },
- { "larabergmann.de", true },
- { "laracode.eu", true },
- { "laraeph.com", true },
- { "laramewa.tk", true },
- { "laranara.se", true },
- { "laranjada.org", true },
- { "larasm.tk", true },
- { "laraveldirectory.com", true },
- { "larbertbaptist.org", true },
- { "lareclame.fr", true },
- { "larepublicacultural.es", true },
- { "lares.com", true },
- { "larete.ch", true },
- { "largeandhighquality.com", true },
- { "largescaleforums.com", true },
- { "largeviewer.com", true },
- { "lariposte.org", true },
- { "lariscus.eu", true },
- { "larondinedisinfestazione.com", true },
- { "larpkalender.ch", true },
- { "larraz.es", true },
- { "larryandprisca.it", true },
- { "larryli.cn", true },
- { "larrysalibra.com", true },
- { "lars-ewald.com", true },
- { "lars-kusch.de", true },
- { "lars-mense.de", true },
- { "lars-minecraft.de", true },
- { "lars.cloud", true },
- { "lars.moi", true },
- { "larsklene.nl", true },
- { "larsklint.com", true },
- { "larsnittve.tk", true },
- { "larsson-ornmark.se", true },
- { "lartduportrait.fr", true },
- { "laruga.co.uk", true },
- { "lasabina.it", true },
- { "lasabubillas.es", true },
- { "lasalle.wa.edu.au", true },
- { "lasarmas.com", true },
- { "lasavonnerieducroisic.fr", true },
- { "lascana.co.uk", true },
- { "lasdelgadas.tk", true },
- { "lasept.com.ua", true },
- { "lasercareestetica.com.br", true },
- { "lasereyess.net", true },
- { "laserhealthsolutions.com", true },
- { "laserpc.net", true },
- { "laserplaza.de", true },
- { "laserplaza.net", true },
- { "lasersandbacon.com", true },
- { "lask.in", true },
- { "laskas.pl", true },
- { "lasowy.com", true },
- { "laspequenassemillas.com", true },
- { "lasranas.es", true },
- { "lasrecetascocina.com", true },
- { "lassesworld.com", true },
- { "lassesworld.se", true },
- { "lassovideos.com", true },
- { "last-strike.org", true },
- { "lastcraft.ru", true },
- { "lastpass.com", false },
- { "lasuzefc.fr", true },
- { "lasvegasescortmagazine.com", true },
- { "lasvegasgfegirls.com", true },
- { "lat.sk", true },
- { "latabaccheria.net", true },
- { "late.am", false },
- { "latecnosfera.com", true },
- { "latedeals.co.uk", true },
- { "latenitefilms.com", false },
- { "laterremotodealcorcon.tk", true },
- { "latestdeals.co.uk", true },
- { "latiendauno.com", true },
- { "latiendawapa.com", true },
- { "latino.dating", true },
- { "latitudesign.com", false },
- { "latremebunda.com", true },
- { "lattyware.co.uk", true },
- { "lattyware.com", true },
- { "latvijashipoteka.lv", true },
- { "laubacher.io", true },
- { "lauchundei.at", true },
- { "laudableapps.com", true },
- { "laudablesites.com", true },
- { "laudwein.fr", true },
- { "lauensteiner.de", false },
- { "laufpix.de", true },
- { "lauftreff-himmelgeist.de", true },
- { "laukstein.com", true },
- { "launayflorian.net", true },
- { "launch-subtitle.com", true },
- { "launcher-minecraft.com", true },
- { "launchgroup.com.au", true },
- { "launchmylifend.com", true },
- { "launchpad-app2.com", true },
- { "launchpadder2.com", true },
- { "lauraandwill.wedding", false },
- { "laurable.com", true },
- { "lauraenvoyage.fr", true },
- { "laurajeandesigns.com", true },
- { "laurakashiwase.com", true },
- { "lauralep.sy", true },
- { "lauralinde.de", true },
- { "lauraofrank.com", true },
- { "lauraohagan.com", true },
- { "laurasplacefamilysupport.org.au", true },
- { "laurelblack.com", true },
- { "laurenball.com", true },
- { "laurencball.com", true },
- { "laurenceplouffe.com", true },
- { "laurenlobue.com", true },
- { "laurensvanderblom.nl", true },
- { "lauresta.lt", true },
- { "lauresta.lv", true },
- { "lauriemilne.com", true },
- { "laurineprice.com", true },
- { "lauriuc.sk", true },
- { "lausannedentiste.ch", false },
- { "laut.digital", true },
- { "lauxzahnheilkunde.de", true },
- { "lauzon-hitter.com", true },
- { "lavabit.com", true },
- { "lavabit.no", true },
- { "lavaggista.it", true },
- { "lavalite.de", true },
- { "lavalon.tk", true },
- { "lavamob.com", true },
- { "lavanderia.roma.it", true },
- { "lavaux.lv", true },
- { "laviedalex.ovh", true },
- { "lavinaec.com", true },
- { "lavinya.net", true },
- { "lavita.de", true },
- { "lavitaura.com", true },
- { "lavoieducoeur.be", true },
- { "lavoiepharmd.com", true },
- { "lavolte.net", true },
- { "lavozdelamusicachilena.tk", true },
- { "lavril.fr", true },
- { "law-colleges.com", true },
- { "law-iku.pro", true },
- { "law-peters.de", true },
- { "law-profile.com", true },
- { "law.co.il", true },
- { "law22.com", true },
- { "lawabidingcactus.com", true },
- { "lawda.ml", true },
- { "lawlessenglish.com", true },
- { "lawlessfrench.com", true },
- { "lawlessrepublic.com", true },
- { "lawlessspanish.com", true },
- { "lawn-seeds.com", true },
- { "lawnuk.com", true },
- { "lawrencemurgatroyd.com", true },
- { "lawrencewhiteside.com", true },
- { "lawservice.com.ua", true },
- { "lawyer.cf", true },
- { "lawyerkf.com", true },
- { "lawyermidrand.co.za", true },
- { "layazc.com", true },
- { "laylo.io", true },
- { "laylo.nl", true },
- { "layordesign.co.uk", true },
- { "layoutsatzunddruck.de", true },
- { "lazau.com", true },
- { "lazer.cf", true },
- { "lazerengravingpros.com", true },
- { "lazistance.com", true },
- { "lazo.futbol", true },
- { "lazurit.com", true },
- { "lazyboston.com", true },
- { "lazyclock.com", true },
- { "lazyframe.com", true },
- { "lazyhelp.com", true },
- { "lazytux.org", true },
- { "lb-toner.de", true },
- { "lb266.net", true },
- { "lbarrios.es", true },
- { "lbayer.com", true },
- { "lbc-podcast.tk", true },
- { "lbc.gr", true },
- { "lbda.net", true },
- { "lbgconsultores.com", true },
- { "lbihrhelpdesk.com", true },
- { "lbmblaasmuziek.nl", true },
- { "lbs-logics.com", true },
- { "lbsistemas.com.mx", true },
- { "lbux.org", true },
- { "lc-cs.com", false },
- { "lc-promiss.de", true },
- { "lc-suites.gr", true },
- { "lc0101.com", true },
- { "lc0188.com", true },
- { "lc040.com", true },
- { "lc0404g.com", true },
- { "lc044.com", true },
- { "lc0606g.com", true },
- { "lc0808.com", true },
- { "lc08080.com", true },
- { "lc10086.com", true },
- { "lc1010g.com", true },
- { "lc1212g.com", true },
- { "lc1313.com", true },
- { "lc1414.com", true },
- { "lc1588.com", true },
- { "lc1616.com", true },
- { "lc1616g.com", true },
- { "lc171.com", true },
- { "lc1717.com", true },
- { "lc18.fun", true },
- { "lc18.ph", true },
- { "lc18.vip", true },
- { "lc1800.com", true },
- { "lc1818.net", true },
- { "lc1904.com", true },
- { "lc204.com", true },
- { "lc2121g.com", true },
- { "lc221.com", true },
- { "lc2222g.com", true },
- { "lc2323g.com", true },
- { "lc2424.com", true },
- { "lc245.com", true },
- { "lc2500.com", true },
- { "lc2525.com", true },
- { "lc2727.com", true },
- { "lc2828.com", true },
- { "lc287.com", true },
- { "lc3131.com", true },
- { "lc3131g.com", true },
- { "lc3232g.com", true },
- { "lc3434g.com", true },
- { "lc3708.com", true },
- { "lc3709.com", true },
- { "lc3710.com", true },
- { "lc3711.com", true },
- { "lc3712.com", true },
- { "lc3713.com", true },
- { "lc3714.com", true },
- { "lc3715.com", true },
- { "lc3716.com", true },
- { "lc3717.com", true },
- { "lc3718.com", true },
- { "lc3719.com", true },
- { "lc3720.com", true },
- { "lc3723.com", true },
- { "lc3724.com", true },
- { "lc3725.com", true },
- { "lc3726.com", true },
- { "lc3727.com", true },
- { "lc3728.com", true },
- { "lc3729.com", true },
- { "lc3731.com", true },
- { "lc3732.com", true },
- { "lc3733.com", true },
- { "lc3736.com", true },
- { "lc3738.com", true },
- { "lc3739.com", true },
- { "lc3741.com", true },
- { "lc3742.com", true },
- { "lc3743.com", true },
- { "lc3744.com", true },
- { "lc3745.com", true },
- { "lc3746.com", true },
- { "lc3747.com", true },
- { "lc3748.com", true },
- { "lc3751.com", true },
- { "lc3752.com", true },
- { "lc3757.com", true },
- { "lc3759.com", true },
- { "lc3760.com", true },
- { "lc3763.com", true },
- { "lc3772.com", true },
- { "lc3774.com", true },
- { "lc3776.com", true },
- { "lc3778.com", true },
- { "lc3779.com", true },
- { "lc3780.com", true },
- { "lc3781.com", true },
- { "lc3782.com", true },
- { "lc3783.com", true },
- { "lc3793.com", true },
- { "lc3794.com", true },
- { "lc3795.com", true },
- { "lc3798.com", true },
- { "lc3801.com", true },
- { "lc3838g.com", true },
- { "lc389.com", true },
- { "lc3939.com", true },
- { "lc432.com", true },
- { "lc4343g.com", true },
- { "lc460.com", true },
- { "lc50000.com", true },
- { "lc5081.com", true },
- { "lc5188.net", true },
- { "lc530.com", true },
- { "lc5353.com", true },
- { "lc5454.com", true },
- { "lc5454g.com", true },
- { "lc555.net", true },
- { "lc5555g.com", true },
- { "lc5668.com", true },
- { "lc58588.com", true },
- { "lc5998.com", true },
- { "lc6.fun", true },
- { "lc60000.com", true },
- { "lc6060.com", true },
- { "lc6161.com", true },
- { "lc6161g.com", true },
- { "lc6262.com", true },
- { "lc6363.com", true },
- { "lc6363g.com", true },
- { "lc6464.com", true },
- { "lc6565g.com", true },
- { "lc6601.com", true },
- { "lc6602.com", true },
- { "lc6603.com", true },
- { "lc6605.com", true },
- { "lc6607.com", true },
- { "lc6609.com", true },
- { "lc6621.com", true },
- { "lc6623.com", true },
- { "lc6625.com", true },
- { "lc6626.com", true },
- { "lc6627.com", true },
- { "lc6629.com", true },
- { "lc6631.com", true },
- { "lc6632.com", true },
- { "lc6635.com", true },
- { "lc6636.com", true },
- { "lc6637.com", true },
- { "lc6638.com", true },
- { "lc6639.com", true },
- { "lc6651.com", true },
- { "lc6652.com", true },
- { "lc6653.com", true },
- { "lc6656.com", true },
- { "lc6657.com", true },
- { "lc6659.com", true },
- { "lc6662.com", true },
- { "lc6663.com", true },
- { "lc6666g.com", true },
- { "lc6667.com", true },
- { "lc6668.com", true },
- { "lc6669.com", true },
- { "lc6683.com", true },
- { "lc6698.com", true },
- { "lc6767.com", true },
- { "lc68.net", true },
- { "lc6800.com", true },
- { "lc6801.com", true },
- { "lc6802.com", true },
- { "lc6803.com", true },
- { "lc6805.com", true },
- { "lc6806.com", true },
- { "lc6807.com", true },
- { "lc6808.com", true },
- { "lc6809.com", true },
- { "lc6810.com", true },
- { "lc6811.com", true },
- { "lc6812.com", true },
- { "lc6813.com", true },
- { "lc6815.com", true },
- { "lc6816.com", true },
- { "lc6817.com", true },
- { "lc68686.com", true },
- { "lc68688.com", true },
- { "lc6868g.com", true },
- { "lc68690.com", true },
- { "lc68692.com", true },
- { "lc68694.com", true },
- { "lc68695.com", true },
- { "lc68696.com", true },
- { "lc68697.com", true },
- { "lc68698.com", true },
- { "lc68699.com", true },
- { "lc6880.com", true },
- { "lc68880.com", true },
- { "lc68881.com", true },
- { "lc68882.com", true },
- { "lc68884.com", true },
- { "lc68888.com", true },
- { "lc690.com", true },
- { "lc7.fun", true },
- { "lc7171g.com", true },
- { "lc7373.com", true },
- { "lc7575.com", true },
- { "lc7676.com", true },
- { "lc7676g.com", true },
- { "lc777.net", true },
- { "lc7979.com", true },
- { "lc8.fun", true },
- { "lc8.live", true },
- { "lc8003.com", true },
- { "lc8020.com", true },
- { "lc8023.com", true },
- { "lc8032.com", true },
- { "lc8033.com", true },
- { "lc8036.com", true },
- { "lc8038.com", true },
- { "lc8050.com", true },
- { "lc8052.com", true },
- { "lc818.net", true },
- { "lc8282.com", true },
- { "lc8383g.com", true },
- { "lc8585g.com", true },
- { "lc861.com", true },
- { "lc862.com", true },
- { "lc863.com", true },
- { "lc869.com", true },
- { "lc871.com", true },
- { "lc873.com", true },
- { "lc875.com", true },
- { "lc8787.com", true },
- { "lc879.com", true },
- { "lc88.fun", true },
- { "lc8812.com", true },
- { "lc8813.com", true },
- { "lc8815.com", true },
- { "lc8816.com", true },
- { "lc8817.com", true },
- { "lc8819.com", true },
- { "lc8820.com", true },
- { "lc8823.com", true },
- { "lc8825.com", true },
- { "lc8826.com", true },
- { "lc8835.com", true },
- { "lc8836.com", true },
- { "lc8838.com", true },
- { "lc8839.com", true },
- { "lc8841.com", true },
- { "lc88508.com", true },
- { "lc8856.com", true },
- { "lc8859.com", true },
- { "lc8861.com", true },
- { "lc8862.com", true },
- { "lc8863.com", true },
- { "lc8866.com", true },
- { "lc8868.net", true },
- { "lc8869.com", true },
- { "lc8870.com", true },
- { "lc8874.com", true },
- { "lc8878.com", true },
- { "lc8881.com", true },
- { "lc8882.com", true },
- { "lc8887.com", true },
- { "lc8888g.com", true },
- { "lc8890.com", true },
- { "lc8891.com", true },
- { "lc8892.com", true },
- { "lc8893.com", true },
- { "lc8896.com", true },
- { "lc8898.net", true },
- { "lc8900.com", true },
- { "lc891.com", true },
- { "lc8913.com", true },
- { "lc8920.com", true },
- { "lc8921.com", true },
- { "lc8922.com", true },
- { "lc8923.com", true },
- { "lc8927.com", true },
- { "lc893.com", true },
- { "lc8931.com", true },
- { "lc8932.com", true },
- { "lc8934.com", true },
- { "lc8935.com", true },
- { "lc8936.com", true },
- { "lc895.com", true },
- { "lc896.com", true },
- { "lc8a.com", true },
- { "lc8dc04.com", true },
- { "lc8dc08.com", true },
- { "lc8dc10.com", true },
- { "lc8dc11.com", true },
- { "lc8dc12.com", true },
- { "lc8dc13.com", true },
- { "lc8dc14.com", true },
- { "lc8dc16.com", true },
- { "lc8dc17.com", true },
- { "lc8dc20.com", true },
- { "lc8dc21.com", true },
- { "lc8dc22.com", true },
- { "lc8dc24.com", true },
- { "lc8dc27.com", true },
- { "lc8dc29.com", true },
- { "lc8guidance.com", true },
- { "lc8md00.com", true },
- { "lc8md01.com", true },
- { "lc8md02.com", true },
- { "lc8md03.com", true },
- { "lc8md08.com", true },
- { "lc8md11.com", true },
- { "lc8md26.com", true },
- { "lc8md28.com", true },
- { "lc8md30.com", true },
- { "lc8md31.com", true },
- { "lc8md33.com", true },
- { "lc8md35.com", true },
- { "lc8md55.com", true },
- { "lc8md88.com", true },
- { "lc9090.com", true },
- { "lc9251.com", true },
- { "lc9253.com", true },
- { "lc9292.com", true },
- { "lc9393g.com", true },
- { "lc9494.com", true },
- { "lc9494g.com", true },
- { "lc9797.com", true },
- { "lc98.net", true },
- { "lc9938.com", true },
- { "lc9939.com", true },
- { "lc9960.com", true },
- { "lc9968.com", true },
- { "lc9986.com", true },
- { "lca-pv.de", true },
- { "lcacommons.gov", true },
- { "lcars-sv.info", true },
- { "lcdf.education", true },
- { "lce-events.com", true },
- { "lcgaj.com", true },
- { "lcv.psc.br", true },
- { "lcvip4.com", true },
- { "lcvip5.com", true },
- { "lcvip7.com", true },
- { "lcvip8.net", true },
- { "lcvip9.com", true },
- { "lcy.im", false },
- { "lcy.moe", true },
- { "ld-begunjscica.si", true },
- { "ld66999.com", true },
- { "ld6999.com", true },
- { "ldjb.jp", true },
- { "ldm2468.com", true },
- { "ldsun.com", true },
- { "ldts.es", true },
- { "le-bar.org", true },
- { "le-caprice.co.uk", true },
- { "le-controle-parental.fr", true },
- { "le-creux-du-van.ch", false },
- { "le-drive-de-just-vet.fr", true },
- { "le-fumoir.com", true },
- { "le-h.de", false },
- { "le-page.info", false },
- { "le-palantir.com", true },
- { "le-traiteur-parisien.fr", false },
- { "le-upfitter.com", true },
- { "le056.com", true },
- { "le23.fr", true },
- { "le42mars.fr", true },
- { "le518.net", true },
- { "leadbook.ru", true },
- { "leadbox.cz", true },
- { "leadership-conference.net", true },
- { "leadinfo.com", true },
- { "leadquest.nl", true },
- { "leaf-consulting.de", true },
- { "leafandseed.co.uk", true },
- { "leafans.tk", false },
- { "leafinote.com", true },
- { "leafland.co.nz", true },
- { "leafletdistributionmanchester.com", true },
- { "leakforums.net", true },
- { "leakplay.com", true },
- { "leamsigc.com", false },
- { "leandromoreno.co", true },
- { "leankit.com", true },
- { "leanplando.com", true },
- { "leap-it.be", false },
- { "leapandjump.co.uk", true },
- { "leapworks.io", true },
- { "learncrypto.live", true },
- { "learncrypto.show", true },
- { "learncrypto.vip", true },
- { "learnflakes.net", true },
- { "learnhowtoplayguitar.tk", true },
- { "learning-id.com", true },
- { "learningis1.st", true },
- { "learningladderacademy.net", true },
- { "learninglaw.com", true },
- { "learningman.top", true },
- { "learningselfreliance.com", true },
- { "learnlux.com", true },
- { "learnplayground.com", true },
- { "learntohack.me", true },
- { "leaseplan.com", true },
- { "leastsignificantbit.de", true },
- { "leatam.fr", true },
- { "leatherfurnitureexpo.com", true },
- { "leathersofacleaning.co.uk", true },
- { "leatherwill.com.ua", true },
- { "leatherwood.nl", true },
- { "leaving.africa", true },
- { "lebalcondesraspes.com", true },
- { "lebanesearmy.gov.lb", true },
- { "lebanonbitcoin.com", true },
- { "lebarmy.gov.lb", true },
- { "lebeachvillage.com", true },
- { "lebendige-heilkunst.de", true },
- { "lebens-fluss.at", true },
- { "lebensraum-fitness-toenisvorst.de", true },
- { "lebensraum-kurse.ch", true },
- { "lebihan.pl", true },
- { "leblanc.io", true },
- { "lebourgeo.is", true },
- { "lecannabis.com", true },
- { "lecannabiste.com", true },
- { "lecannabiste.uk", true },
- { "lecatal.ca", true },
- { "lecheng08.com", true },
- { "lecheng518.com", true },
- { "lecheng5288.com", true },
- { "lecheng5888.com", true },
- { "lecheng66.com", true },
- { "lecheng88.com", true },
- { "lecheng888.com", true },
- { "lecheng98.com", true },
- { "lecheng98.net", true },
- { "lecheng988.com", true },
- { "leclubnestlereunion.re", true },
- { "lectricecorrectrice.com", true },
- { "led-jihlava.cz", true },
- { "ledburyvets.co.uk", true },
- { "leddingplasticsurgery.com", true },
- { "ledecologie.com.br", true },
- { "ledeguisement.com", true },
- { "lederer-it.com", true },
- { "ledlight.com", true },
- { "ledlights.ca", true },
- { "ledscontato.com.br", true },
- { "ledspadova.eu", true },
- { "ledspalluto.de", true },
- { "ledwereld.nl", true },
- { "lee-fuller.co.uk", true },
- { "leeaaronsrealestate.com", true },
- { "leeannescreations.com", true },
- { "leebiblestudycentre.co.uk", true },
- { "leeclemens.net", false },
- { "leedev.org", true },
- { "leekspin.ml", true },
- { "leelaylay.com", true },
- { "leemachinetools.com", true },
- { "leemankuiper.nl", true },
- { "leendebroekertfonds.nl", true },
- { "leerliga.de", true },
- { "leesilvey.com", true },
- { "leesyal.org", true },
- { "leetcode.com", true },
- { "leetcode.net", true },
- { "leetgamers.asia", true },
- { "leevealdc.com", true },
- { "leeyoungaeph.tk", true },
- { "lefcoaching.nl", false },
- { "lefebvristes.com", true },
- { "lefebvristes.fr", true },
- { "leflibustier.ru", true },
- { "lefonddeloeil.com", false },
- { "left-baggage.co.uk", true },
- { "leftbankdesign.net", true },
- { "leftbrainsolutions.com.au", true },
- { "leftclick.be", true },
- { "leftclick.cloud", true },
- { "leftclick.es", true },
- { "leftclick.eu", true },
- { "leftclick.fr", true },
- { "leftclick.nl", true },
- { "legabot.fr", true },
- { "legacyiohs.org", true },
- { "legaillart.fr", true },
- { "legalatlanta.com", true },
- { "legalband.club", true },
- { "legalcontrol.info", true },
- { "legalforms.ng", true },
- { "legalinmotion.es", true },
- { "legalplace.fr", true },
- { "legalrobot.com", true },
- { "legalsearch.nl", true },
- { "legalsoftware.net", true },
- { "legend-v.life", true },
- { "legendary-royale.net", true },
- { "legendcatz.com", true },
- { "legendesdechine.ch", false },
- { "legendofkrystal.com", true },
- { "legends-game.ru", false },
- { "legible.es", true },
- { "legion.ge", true },
- { "legioniv.org", true },
- { "legiscontabilidade.com.br", true },
- { "legit.nz", true },
- { "legjobblogo.hu", true },
- { "legland.fr", true },
- { "legnami24.it", true },
- { "legoutdesplantes.be", true },
- { "legrandvtc.fr", true },
- { "legumeinfo.org", true },
- { "legyenkianegykereked.hu", true },
- { "lehighvalleypeds.com", true },
- { "lehmitz-weinstuben.de", true },
- { "lehouerou.net", true },
- { "lehti-tarjous.net", true },
- { "leibniz-gymnasium-altdorf.de", true },
- { "leideninternationalreview.com", true },
- { "leighneithardt.com", true },
- { "leignier.org", true },
- { "leilonorte.com", true },
- { "leipzig.photo", true },
- { "leipziger-triathlon.de", true },
- { "leisure-blog.com", true },
- { "leisure-supplies-show.co.uk", true },
- { "leisurepools.com.au", true },
- { "leiyinan.com", true },
- { "lejardindesmesanges.fr", true },
- { "lektier.cf", true },
- { "lelac-capfrance.com", false },
- { "lele13.cn", true },
- { "lelo.com.pl", true },
- { "lelubre.info", true },
- { "lelux.fi", true },
- { "lelux.site", true },
- { "lemagauto.fr", true },
- { "lemarcheelagrandeguerra.it", true },
- { "lemazol.fr", true },
- { "lemilane.it", true },
- { "lemni.top", true },
- { "lemoine.at", true },
- { "lemondenumerique.com", true },
- { "lemonlawnow.com", true },
- { "lemonop.com", true },
- { "lemonparty.co", true },
- { "lemonrockbiketours.com", true },
- { "lemonthy.com", true },
- { "lenafonster.se", true },
- { "lenagroben.de", true },
- { "lenalio.fr", true },
- { "lenaneva.ru", false },
- { "lence.net", true },
- { "lencia.ga", true },
- { "lendingclub.com", true },
- { "lenguajedeprogramacion.com", true },
- { "lenidh.de", true },
- { "leninalbertop.com.ve", true },
- { "lenn-blaschke.com", true },
- { "lenostech.gr", true },
- { "lenou.nl", true },
- { "lenovovietnam.net", true },
- { "lenr-forum.com", true },
- { "lensdoctor.com", true },
- { "lenspirations.com", true },
- { "lensual.space", true },
- { "lentivo.com", true },
- { "lenuagebauche.org", true },
- { "lenyip.com", true },
- { "lenyip.me", true },
- { "lenyip.works", true },
- { "leoandpeto.com", true },
- { "leochedibracchio.com", true },
- { "leodraxler.at", true },
- { "leola.cz", true },
- { "leola.sk", true },
- { "leominstercu.com", false },
- { "leomwilson.com", true },
- { "leon-tec.co.jp", true },
- { "leon-tech.com", true },
- { "leon.wtf", true },
- { "leonardocremonesi.it", true },
- { "leonbuitendam.nl", true },
- { "leondenard.com", true },
- { "leonklingele.de", true },
- { "leonmahler.consulting", true },
- { "leontiekoetter.de", true },
- { "leontyev.tk", true },
- { "leonvermunt.nl", true },
- { "leopoldina.net", false },
- { "leoservicos.etc.br", true },
- { "leoservicosetc.com", true },
- { "leoservicosetc.email", true },
- { "leoservicosetc.live", true },
- { "leoservicosetc.net", true },
- { "leoservicosetc.online", true },
- { "leoservicosetc.org", true },
- { "leoservicosetc.rio.br", true },
- { "leoservicosetc.store", true },
- { "leoservicosetc.world", true },
- { "leovanna.co.uk", true },
- { "leowkahman.com", true },
- { "lep.gov", true },
- { "lepenetapeti.com", true },
- { "lepsos.com", false },
- { "lequerceagriturismo.com", true },
- { "lequest.dk", true },
- { "lequocthai.com", true },
- { "lerasenglish.com", true },
- { "lerefugedujambon.com", true },
- { "leretour.ch", false },
- { "lerku.com", true },
- { "lermer.nl", true },
- { "lernenamsee.ch", true },
- { "lernerspersonalinjury.ca", true },
- { "lernorteuropa.com", true },
- { "lernorteuropa.de", true },
- { "lernorteuropa.eu", true },
- { "lernplattform-akademie.de", true },
- { "leruevintage.com", true },
- { "les-ateliers-de-melineo.be", false },
- { "les-explos.com", true },
- { "les-inoxydables.com", true },
- { "lesacredescouleurs.fr", true },
- { "lesaffre.es", true },
- { "lesalpinistes.com", true },
- { "lesancheslibres.fr", true },
- { "lesarts.com", true },
- { "lesberger.ch", false },
- { "lesbi-porno-video.ru", true },
- { "lesbianlovers.tk", true },
- { "lesbrillantsdaristide.com", true },
- { "lesconteursavis.org", true },
- { "lescrapdesfilles.fr", true },
- { "leseditionsbraquage.com", true },
- { "lesfilmsavivre.com", true },
- { "lesgarianes.com", true },
- { "lesgoodnews.fr", true },
- { "leshervelines.com", true },
- { "leshok.tk", true },
- { "lesjardinsdubanchet.fr", true },
- { "lesmamy.ch", false },
- { "lesmontagne.net", true },
- { "lesnet.co.uk", true },
- { "lespagesweb.ch", false },
- { "lespecialiste-pradelexcellence.com", true },
- { "lesplatanes.ch", false },
- { "lespoesiesdheloise.fr", true },
- { "lespret.nl", true },
- { "lesptitstutos.fr", true },
- { "lesquerda.cat", false },
- { "lessentieldanthony.fr", true },
- { "lessis.moe", true },
- { "lesterchan.net", true },
- { "lesterrassesdusoleil.ch", false },
- { "lesummeira.is", true },
- { "lesyndicat.info", false },
- { "leszonderstress.nl", true },
- { "letaman.tk", true },
- { "letdownloads.tk", true },
- { "letemps.ch", true },
- { "letempsdujasmin.fr", true },
- { "letertrefleuri.com", true },
- { "lethosdesigns.co.uk", true },
- { "lethosdesigns.com", true },
- { "leticia.ml", true },
- { "letni-kurzy.cz", true },
- { "leto12.xyz", true },
- { "letranif.net", true },
- { "lets-bounce.com", true },
- { "lets-go-acoustic.de", true },
- { "lets-ktai.jp", true },
- { "lets.nu", true },
- { "letsbounceuk.com", true },
- { "letsbrand.com", true },
- { "letsdebug.net", true },
- { "letsencrypt-for-cpanel.com", true },
- { "letsflyinto.space", true },
- { "letsgame.nl", true },
- { "letsgetchecked.com", true },
- { "letsgowhilewereyoung.com", true },
- { "letsorganise.uk", true },
- { "letspartyrugby.co.uk", true },
- { "letsprint3d.net", true },
- { "letssackcancer.org", true },
- { "letstalkcounseling.com", true },
- { "letterbox-online.de", true },
- { "letterdance.de", true },
- { "letteringinstitute.com", true },
- { "lettersblogatory.com", true },
- { "lettings101.org", true },
- { "lettori.club", true },
- { "lettres-motivation.net", true },
- { "leuchtmann.ch", true },
- { "leuenhagen.com", true },
- { "leulu.com", true },
- { "leumi-how-to.co.il", true },
- { "leutgeb.xyz", true },
- { "leuthardtfamily.com", true },
- { "lev103.com", true },
- { "levans.fr", true },
- { "levante.net.nz", true },
- { "level-10.de", true },
- { "level9hvac.com", true },
- { "levelonetrainingandfitness.com", true },
- { "levels.one", true },
- { "levels3d.com", true },
- { "leveluplv.com", true },
- { "leveluprankings.com", true },
- { "levendwater.org", true },
- { "levensbron.nl", true },
- { "leventismotors.com.ng", true },
- { "leveragedtokens.com", true },
- { "leverj.io", true },
- { "levermann.eu", true },
- { "leviaan.nl", true },
- { "leviathan-studio.com", true },
- { "levidromelist.com", true },
- { "levineteamestates.com", true },
- { "levinus.de", true },
- { "levis.fun", true },
- { "leviscop.com", true },
- { "leviscop.de", true },
- { "levshamaster.org", true },
- { "lew.im", true },
- { "lewdawson.com", true },
- { "lewdgamer.com", true },
- { "lewiatan.opole.pl", true },
- { "lewiscollard.com", true },
- { "lewisdatasecurity.com", true },
- { "lewislaw.com", true },
- { "lewisllewellyn.me", true },
- { "lewismcyoutube.uk", true },
- { "lexautoservice.nl", true },
- { "lexblog.com", true },
- { "lexdigital.pl", true },
- { "lexic.co", true },
- { "lexico.pt", true },
- { "lexicography.online", true },
- { "lexikon24.tk", true },
- { "lexitravels.com", true },
- { "lexpierce.social", true },
- { "lexway.pk", true },
- { "leybelsgarden.cf", true },
- { "leymaritima.com", true },
- { "lfashion.eu", true },
- { "lfgss.com", true },
- { "lfyhokk.tk", true },
- { "lg-waps.go.jp", true },
- { "lg-waps.jp", true },
- { "lg.gz.cn", true },
- { "lg2.com", true },
- { "lgbt-colleges.com", true },
- { "lgbt.io", true },
- { "lgbtq.cool", true },
- { "lgbusiness.es", true },
- { "lghfinancialstrategy.ch", false },
- { "lgpecasoriginais.com.br", true },
- { "lgygf.com", true },
- { "lhajn.cz", true },
- { "lhamaths.online", true },
- { "lhconsult.tk", false },
- { "lhero.org", true },
- { "lhgavarain.com", true },
- { "lhost.su", true },
- { "lhp-creation.com", true },
- { "lhp-creation.fr", true },
- { "lhr.wiki", true },
- { "li-ke.co.jp", true },
- { "li.gz.cn", true },
- { "li.search.yahoo.com", false },
- { "li680.com", true },
- { "lialion.de", true },
- { "liam-w.com", true },
- { "liam-w.io", true },
- { "liamelliott.me", true },
- { "liamlin.me", true },
- { "lian-in.com", true },
- { "liandongyoupin.com", true },
- { "liang-li88.com", true },
- { "liang-li88.net", true },
- { "lianglongcredit.com", true },
- { "liangxingai.com", true },
- { "liaronce.com", true },
- { "liautard.fr", true },
- { "lib64.net", true },
- { "libble.eu", true },
- { "libbywinberginteriors.com.au", true },
- { "liberapay.com", true },
- { "liberation2020.com", true },
- { "liberationist.org", true },
- { "liberationschool.org", true },
- { "liberdademg.com.br", true },
- { "liberhk.com", true },
- { "liberhk.info", true },
- { "liberhk.net", true },
- { "liberhk.org", true },
- { "liberta-me.org", true },
- { "libertas.co.jp", true },
- { "liberty-city.tk", true },
- { "liberty-med.ru", true },
- { "libertyachts.com", false },
- { "libertytereconoce.com", true },
- { "libertywines.co.uk", true },
- { "libertywines.ie", true },
- { "libgame.com", true },
- { "libmpq.org", true },
- { "libo766.net", true },
- { "liborburda.cz", true },
- { "libportal.cf", true },
- { "libra.com", true },
- { "librairiezbookstore.com", true },
- { "librarium.tk", true },
- { "library-quest.com", true },
- { "libraryextension.com", true },
- { "libraryofcode.org", true },
- { "librarytools.com", false },
- { "libravatar.org", true },
- { "librazy.org", true },
- { "libre-innovation.org", true },
- { "libre-service.de", true },
- { "libre.cr", true },
- { "libreboot.org", true },
- { "librebox.de", true },
- { "librehk.com", true },
- { "librehk.info", true },
- { "librehk.net", true },
- { "librehk.org", true },
- { "libreho.st", true },
- { "librelamp.com", true },
- { "libremail.nl", true },
- { "libreoffice-from-collabora.com", true },
- { "libreofficefromcollabora.com", true },
- { "libreria-ouroboros.tk", true },
- { "librervac.org", true },
- { "librespeed.org", true },
- { "librisulibri.it", true },
- { "librofilia.com", true },
- { "libscode.com", true },
- { "libskia.so", true },
- { "libsodium.org", true },
- { "libstock.si", true },
- { "liceo.cn", true },
- { "lichess.org", true },
- { "lichform.com", true },
- { "lichtmetzger.de", false },
- { "lichtspot.de", true },
- { "lichttechnik-tumler.com", true },
- { "lichttraeumer.de", true },
- { "lickthesalt.com", true },
- { "licloud.homeip.net", true },
- { "lida-vets.co.uk", true },
- { "lidavidm.me", true },
- { "lidel.org", true },
- { "lideradigital.com", true },
- { "liderwalut.pl", false },
- { "lidl-blumen.de", true },
- { "lidl-foto.it", true },
- { "lidl-fotos.at", true },
- { "lidl-fotos.de", true },
- { "lidl-gewinnspiel.de", true },
- { "lidl-holidays.com", true },
- { "lidl-immobilien.de", true },
- { "lidl-shop.be", true },
- { "lidl-shop.cz", true },
- { "lidl-shop.nl", true },
- { "lidl-shop.sk", true },
- { "lidl-sklep.pl", true },
- { "lidl-stikeez.si", true },
- { "lidl-tour.ro", true },
- { "lidl-vins.fr", true },
- { "lidlonline.es", true },
- { "lidogr.com", true },
- { "lidong.me", true },
- { "lidow.eu", true },
- { "lidtkemotors.com", true },
- { "liduan.net", false },
- { "liebel.org", true },
- { "lieberwirth.biz", true },
- { "liehuojun.com", true },
- { "liemen.net", true },
- { "lienhardtconstruction.fr", true },
- { "lieren4x4.nl", true },
- { "lierohell.tk", true },
- { "lieuu.com", false },
- { "lifanov.com", true },
- { "life-emotions.pt", true },
- { "life-in-hell.tk", true },
- { "life-time.nl", true },
- { "life29.com", true },
- { "lifeartstudios.net", true },
- { "lifebetweenlives.com.au", true },
- { "lifeboxhealthcare.co.uk", true },
- { "lifeeducationqld.org.au", true },
- { "lifefoto.de", true },
- { "lifeinhex.com", true },
- { "lifeinsurancepro.org", true },
- { "lifekirov.tk", true },
- { "lifelenz.com", true },
- { "lifematenutrition.com", true },
- { "lifemcserver.com", true },
- { "lifemstyle.com", true },
- { "lifeqa.net", true },
- { "lifesafety.com.br", true },
- { "lifesavvy.com", true },
- { "lifesavvymedia.com", true },
- { "lifeset.pp.ua", true },
- { "lifesharing.gr", true },
- { "lifeslonglist.com", true },
- { "lifestorage.com", true },
- { "lifestylediet.space", true },
- { "lifestylefinancial.ca", true },
- { "lifestylefoto.cz", true },
- { "lifetimeexteriors-us.com", true },
- { "lifetoolscdc.com", true },
- { "lifetree.network", true },
- { "lifewithdyna.com", true },
- { "lifi.digital", true },
- { "lifi.is", true },
- { "lift-wise.com", true },
- { "liftie.info", true },
- { "liftmastercloud.com", true },
- { "liftoff.rocks", true },
- { "ligadosgames.com", true },
- { "light-vision.com.ua", true },
- { "light.mail.ru", true },
- { "lightbox.co", true },
- { "lightcraftmc.tk", true },
- { "lightfoot.co.uk", true },
- { "lighthouseglobal.com", true },
- { "lighting-centres.co.uk", true },
- { "lightingagoura.com", true },
- { "lightingagourahills.com", true },
- { "lightingcalabasas.com", true },
- { "lightingconejovalley.com", true },
- { "lightingdosvientos.com", true },
- { "lightinghiddenhills.com", true },
- { "lightinglakesherwood.com", true },
- { "lightingmalibu.com", true },
- { "lightingmoorpark.com", true },
- { "lightingnewburypark.com", true },
- { "lightingoakpark.com", true },
- { "lightingsimivalley.com", true },
- { "lightingthousandoaks.com", true },
- { "lightingwestlakevillage.com", true },
- { "lightning-wallet.com", true },
- { "lightning.community", true },
- { "lightning.engineering", true },
- { "lightningwirelabs.com", true },
- { "lightography.com", true },
- { "lights.co.uk", true },
- { "lightscale.com", true },
- { "lightsfromspace.com", true },
- { "lightsheep.no", false },
- { "lightspeed.com", false },
- { "lightspeedta.co", true },
- { "lighttp.com", true },
- { "lightweighthr.com", true },
- { "lightyear.no", true },
- { "ligmadrive.com", true },
- { "lignesante.com", true },
- { "lignite.com", true },
- { "lignoma.com", true },
- { "ligonier.com", true },
- { "lihaul.dnsalias.net", true },
- { "lije-creative.com", true },
- { "lijncoaching.nl", true },
- { "lijstje.be", true },
- { "lijstje.nl", true },
- { "likc.me", true },
- { "likeablehub.com", true },
- { "likeabox.de", true },
- { "likebee.gr", true },
- { "likegeeks.com", true },
- { "likehifi.de", true },
- { "likemovies.de", true },
- { "likeometer.co", true },
- { "likere.com", true },
- { "likesforinsta.com", true },
- { "lilai107.com", true },
- { "lilai116.com", true },
- { "lilai2211.com", true },
- { "lilai3366.com", true },
- { "lilai6677.com", true },
- { "lilai838.com", true },
- { "lilai8866.com", true },
- { "lilai9966.com", true },
- { "lilianejuchli.ch", true },
- { "liliang13.com", true },
- { "lilith-magic.com", true },
- { "liljohnsanitary.net", true },
- { "lillepuu.com", true },
- { "lilliputpreschool.co.nz", true },
- { "lilomatrixcorner.fr", true },
- { "lilosaludable.com", true },
- { "lilpwny.com", true },
- { "lily-bearing.com", true },
- { "lily-inn.com", true },
- { "lilyfarmfreshskincare.com", true },
- { "lilysbouncycastles.com", true },
- { "lilysgrill.com", true },
- { "lilyvet.com", true },
- { "lim-light.com", true },
- { "limap.ch", true },
- { "limasartes.com.br", true },
- { "limawi.io", true },
- { "limbaido.tk", true },
- { "limberg.me", true },
- { "limbo.services", true },
- { "limit.xyz", true },
- { "limitededitioncomputers.com", true },
- { "limitededitionsolutions.com", true },
- { "limitlessinteractive.com", true },
- { "limitxyz.com", true },
- { "limo.pl", true },
- { "limoshka.ru", true },
- { "limpid.nl", true },
- { "limstash.com", true },
- { "limstash.me", true },
- { "limules.ch", true },
- { "limx.win", true },
- { "lin.fi", true },
- { "linafernandez.com.co", true },
- { "linaklein.de", true },
- { "lincdavis.com", true },
- { "lince-bonares.tk", true },
- { "lincnaarzorg.nl", true },
- { "lincoln.com.cn", true },
- { "lincoln.mx", true },
- { "lincolnfinewines.com", true },
- { "lincolnpedsgroup.com", true },
- { "lincolnwayflorist.com", true },
- { "lincore.ru", true },
- { "lindajahn.de", true },
- { "lindalap.fi", true },
- { "lindaolsson.com", true },
- { "linden.me", true },
- { "lindeskar.se", true },
- { "lindgrenracing.tk", true },
- { "lindnerhof-taktik.de", true },
- { "lindnerhof.info", true },
- { "lindo.ru", true },
- { "lindon.pw", true },
- { "lindquistnet.us", true },
- { "lindsaygorski.com", true },
- { "lindskogen.se", true },
- { "lindy.co", false },
- { "line-wise.com", true },
- { "line.biz", true },
- { "line.co.nz", false },
- { "lineageos.org", true },
- { "linearaudio.net", true },
- { "linearmap.com", true },
- { "lineshop.ml", true },
- { "linestep.jp", true },
- { "linge-ma.ro", true },
- { "lingerie.com.br", true },
- { "lingeriesilhouette.com", true },
- { "lingotaxi.com", true },
- { "linguatrip.com", true },
- { "link-net.ga", true },
- { "link-sanitizer.com", true },
- { "link2serve.com", true },
- { "link9.net", true },
- { "linkdr.uk", true },
- { "linkedinbackground.com", true },
- { "linkedpipes.com", true },
- { "linkenheil.org", true },
- { "linklocker.co", true },
- { "linkmaker.co.uk", true },
- { "linkmauve.fr", true },
- { "linko-pomoika.tk", true },
- { "linkopia.com", true },
- { "linksphotograph.com", true },
- { "linkstagr.am", true },
- { "linkthis.me", true },
- { "linktio.com", true },
- { "linkuva.tk", true },
- { "linkwheel.tk", true },
- { "linkycat.com", true },
- { "linkyou.top", true },
- { "linnaeusgroup.co.uk", true },
- { "linnetinfotech.in", true },
- { "linonin.tk", true },
- { "linosky.ch", true },
- { "linost.com", true },
- { "linqhost.nl", true },
- { "linss.com", true },
- { "lintelliftdks.com", true },
- { "lintelliftusa.com", true },
- { "lintmx.com", true },
- { "linux-audit.com", true },
- { "linux-florida.com", true },
- { "linux-help.org", true },
- { "linux-mint-czech.cz", true },
- { "linux-taganrog.tk", true },
- { "linux-vme.org", true },
- { "linux.cn", true },
- { "linux.conf.au", true },
- { "linux.farm", true },
- { "linux.fi", true },
- { "linux.pizza", true },
- { "linux3.org", true },
- { "linuxadictos.com", true },
- { "linuxbabe.com", true },
- { "linuxbg.eu", true },
- { "linuxbierwanderung.com", true },
- { "linuxchick.se", true },
- { "linuxcommand.ru", true },
- { "linuxdashboard.com", true },
- { "linuxdays.cz", true },
- { "linuxforum.ch", true },
- { "linuxforwindows.com", true },
- { "linuxgiggle.com", true },
- { "linuxhilux.com", true },
- { "linuxhostsupport.com", true },
- { "linuxincluded.com", true },
- { "linuxiuvat.de", true },
- { "linuxlounge.net", true },
- { "linuxos.org", true },
- { "linuxsecurity.expert", true },
- { "linx.net", true },
- { "linzgau.de", true },
- { "linzyjx.com", true },
- { "lion7.de", true },
- { "lionlyrics.com", true },
- { "lipacom.ga", true },
- { "lipartydepot.com", true },
- { "lipaslovanska.cz", true },
- { "lipex.com", true },
- { "lipighor.com", true },
- { "lipoabaltimore.org", true },
- { "lipobattery.pl", true },
- { "lippu1.fi", true },
- { "lipthink.com", true },
- { "liqd.net", true },
- { "liqueur.wiki", true },
- { "liquid.cz", true },
- { "liquidhost.co", true },
- { "liquidinternet.co", true },
- { "liquipedia.net", true },
- { "liquor.my", true },
- { "liress.gq", true },
- { "lirion.de", true },
- { "lirlandais.ch", false },
- { "lirnberger.com", true },
- { "lis.koeln", true },
- { "lisadelbo.tk", true },
- { "lisahh-jayne.com", true },
- { "lisamccorrie.com", true },
- { "lisanzauomo.com", true },
- { "lisasc.gq", true },
- { "lisasworkshop.co.uk", true },
- { "lisburnhottubnbounce.co.uk", true },
- { "liscieperfetti.com", true },
- { "lisius.ga", true },
- { "liskgdt.net", true },
- { "lislan.org.uk", true },
- { "lisowski-development.com", false },
- { "lissabon.guide", true },
- { "lissajouss.tk", true },
- { "lissauer.com", true },
- { "list-gymnasium.de", true },
- { "listahu.org", true },
- { "listekdo.fr", true },
- { "listen.dk", true },
- { "lister-kirchweg.de", true },
- { "listisima.com", true },
- { "listiu.com", true },
- { "listminut.be", true },
- { "lists.fedoraproject.org", true },
- { "lists.stg.fedoraproject.org", true },
- { "listsothebysrealtyhk.com", true },
- { "listyourinfo.com", true },
- { "litarvan.com", true },
- { "litchidova.nl", true },
- { "litebit.de", true },
- { "litebit.eu", true },
- { "litebit.nl", true },
- { "litebitcdn.eu", true },
- { "litebits.com", true },
- { "litecache.de", true },
- { "litemind.com", false },
- { "litepanels-parts.com", true },
- { "literaki123.pl", true },
- { "literarymachin.es", true },
- { "literature-schools.com", true },
- { "litfin.name", true },
- { "lithan.com", true },
- { "lithesalar.se", true },
- { "lithianissaneugeneparts.com", true },
- { "litsovet.com", true },
- { "little-brother.eu", true },
- { "little-cake.com", true },
- { "little-news.gq", true },
- { "little.recipes", true },
- { "littlebestfriend.de", true },
- { "littlebites.co.nz", true },
- { "littleblackfish.se", true },
- { "littleboutiqueshop.co.uk", true },
- { "littledev.nl", true },
- { "littleduck.xyz", true },
- { "littlefairy.no", true },
- { "littlefamilyadventure.com", true },
- { "littlegreece.ae", true },
- { "littlelife.co.uk", true },
- { "littlelucifercafe.tk", true },
- { "littlenina.nz", false },
- { "littlenlargeevents.co.uk", true },
- { "littleprincessandmascotparties.co.uk", true },
- { "littleredpenguin.com", true },
- { "littleredsbakeshop.com", true },
- { "littlericket.me", true },
- { "littles.moe", true },
- { "littlescallywagsplay.co.uk", true },
- { "littleswitch.co.jp", true },
- { "littlewatcher.com", true },
- { "littleyokohamakennel.tk", true },
- { "liturgical.net", true },
- { "liturkey.tk", true },
- { "litvideoserver.de", true },
- { "litz.ca", true },
- { "litzenberger.ca", true },
- { "liu0hy.cn", true },
- { "liubliu.co.uk", true },
- { "liudon.org", true },
- { "liuliuya.com.tw", true },
- { "liulo.cf", true },
- { "liuqiao.best", true },
- { "liuqiao.eu.org", true },
- { "liuqiao.ga", true },
- { "liv3d.stream", true },
- { "livada.fr", true },
- { "livaniaccesorios.com", true },
- { "live4k.media", false },
- { "live8811.com", true },
- { "live8899.cn", true },
- { "live8899.co", true },
- { "live8899.net", true },
- { "live9922.com", true },
- { "livebandphotos.com", true },
- { "livebetterwith.com", true },
- { "livebythesun.de", true },
- { "livecards.co.uk", true },
- { "livecchi.cloud", true },
- { "livechat-ag777.com", true },
- { "livedesign.at", true },
- { "livedesign24.de", true },
- { "liveflightapp.com", true },
- { "liveforspeed.se", true },
- { "livehomecams.co.uk", true },
- { "liveint.org", true },
- { "liveitlogical.in", true },
- { "livejasmin.dk", true },
- { "livejh.tk", true },
- { "livekaarten.nl", true },
- { "livekort.com", true },
- { "livekort.dk", true },
- { "livekort.se", true },
- { "livekortti.com", true },
- { "livelifewithintent.com", true },
- { "livelink.tk", true },
- { "livelondon.fr", true },
- { "livenewsrussia.tk", true },
- { "liveregistratie.nl", true },
- { "liverider.co.jp", true },
- { "livesheep.com", true },
- { "liveslides.com", true },
- { "livesure.com", true },
- { "livetopknigi.gq", true },
- { "livetoride.co.za", true },
- { "livfcshop.com", true },
- { "livi.co", true },
- { "livi.co.uk", true },
- { "livi.fr", true },
- { "living-space.co.nz", true },
- { "living-with-outlook-2010.com", true },
- { "living.digital", true },
- { "living.video", true },
- { "living24.de", true },
- { "livingafrugallife.com", true },
- { "livinginhimalone.com", true },
- { "livingspace.co.nz", true },
- { "livingworduk.org", true },
- { "livive.com", true },
- { "livogeva.dk", true },
- { "livresetmanuscrits.com", true },
- { "livv168.com", true },
- { "livv88.com", true },
- { "lixtick.com", true },
- { "liz-fry.com", true },
- { "liz.ee", true },
- { "lizardsystems.com", true },
- { "lizheng.de", true },
- { "lizhi.io", true },
- { "lizmooredestinationweddings.com", true },
- { "liztattoo.se", true },
- { "lizzaran.io", true },
- { "lizzwood.com", true },
- { "lizzythepooch.com", true },
- { "ljason.cn", true },
- { "ljc.ro", true },
- { "ljoonal.xyz", true },
- { "ljs.io", true },
- { "ljskatt.no", true },
- { "lk-hardware.cz", true },
- { "lk1.bid", true },
- { "lkellar.org", true },
- { "lknw.de", true },
- { "lkw-servis.sk", true },
- { "ll.gr", true },
- { "ll8807.com", true },
- { "ll8819.com", true },
- { "llamasweet.tech", true },
- { "llandudnochristmasfayre.co.uk", true },
- { "llbcpa.com", true },
- { "lldy88.com", true },
- { "llemoz.com", true },
- { "llgj888.com", true },
- { "llgw8.com", true },
- { "llm-guide.com", true },
- { "llnl.gov", true },
- { "lloyd-day.me", true },
- { "llslb.com", false },
- { "lm-landscapes.co.uk", true },
- { "lm-pumpen.de", false },
- { "lm1628.com", true },
- { "lm228.cn", true },
- { "lm228.com", true },
- { "lm338.cn", true },
- { "lm338.com", true },
- { "lmasqueen.com", true },
- { "lmbyrne.co.uk", true },
- { "lmbyrne.com", true },
- { "lmddgtfy.net", true },
- { "lmdexpresstransport.com", true },
- { "lmh-style.com", true },
- { "lmintlcx.com", true },
- { "lmmi.nl", true },
- { "lmmtfy.io", true },
- { "lms-luch.ru", true },
- { "lmsptfy.com", true },
- { "lmsuitespagna.it", true },
- { "lmtls.me", true },
- { "lmtm.eu", true },
- { "lmvsci.gov", true },
- { "lng-17.org", true },
- { "lnhequipmentltd.com", true },
- { "lnhydy.cn", true },
- { "load-ev.de", true },
- { "loader.to", true },
- { "loader.us.com", true },
- { "loadlow.me", true },
- { "loadwallet.com", true },
- { "loanaway.ca", true },
- { "loanmatch.sg", true },
- { "loansharkpro.com", true },
- { "loanstreet.nl", true },
- { "lob-assets-staging.com", true },
- { "lob-assets.com", true },
- { "lob-staging.com", true },
- { "lob.com", true },
- { "lobivia.de", true },
- { "lobosdomain.hopto.org", true },
- { "lobsangstudio.com", true },
- { "lobstr.co", true },
- { "loca-voiture.fr", true },
- { "locabir.cf", true },
- { "local360.net", true },
- { "localbandz.com", true },
- { "localbitcoins.com", true },
- { "localblitz.com", true },
- { "localblock.co.za", true },
- { "localbouncycastle.com", true },
- { "localcryptopremium.com", true },
- { "locald.at", true },
- { "localdecor.com.br", true },
- { "localethereum.com", true },
- { "localexpert.realestate", true },
- { "localhorst.duckdns.org", true },
- { "localhost.ee", true },
- { "locallhost.me", true },
- { "localnet.site", true },
- { "localpov.com", true },
- { "localsearch.homes", true },
- { "localseo.ltd", true },
- { "localseo.repair", true },
- { "localseorepair.co", true },
- { "localseorepair.design", true },
- { "localseorepair.digital", true },
- { "localseorepair.life", true },
- { "localseorepair.ltd", true },
- { "localseorepair.net", true },
- { "localseorepair.network", true },
- { "localseorepair.rocks", true },
- { "localseorepair.services", true },
- { "localseorepair.world", true },
- { "localspot.pl", true },
- { "localtownhouses.ga", true },
- { "locapos.com", true },
- { "location-appartement-dakar.com", true },
- { "locationfontaine.fr", true },
- { "locatorplus.gov", true },
- { "locauxrama.fr", true },
- { "lock.me", true },
- { "lock23.ca", true },
- { "lockaby.org", true },
- { "locker.email", true },
- { "locker.plus", true },
- { "lockerroomstories.com", true },
- { "locklock.com.br", true },
- { "locklockbrasil.com.br", true },
- { "lockme.at", true },
- { "lockme.ch", true },
- { "lockme.de", true },
- { "lockme.pl", true },
- { "locknlock.com.br", true },
- { "locknlockbrasil.com.br", true },
- { "lockpick.nl", true },
- { "lockpicks.se", true },
- { "lockr.jp", true },
- { "locksmith--richmond.com", true },
- { "locksmith--sanantoniotx.com", true },
- { "locksmith-pasadenatx.com", true },
- { "locksmith-sanantonio-tx.com", true },
- { "locksmith-springtx.com", true },
- { "locksmithbalchsprings.com", true },
- { "locksmithballito.com", true },
- { "locksmithbluff.co.za", true },
- { "locksmithdearborn.com", true },
- { "locksmithdickinson-tx.com", true },
- { "locksmithdriftwood.com", true },
- { "locksmithdrippingspringstx.com", true },
- { "locksmithedmonds.com", true },
- { "locksmithforcarshoustontx.com", true },
- { "locksmithfourways24-7.co.za", true },
- { "locksmithfriendswoodtexas.com", true },
- { "locksmithgarland-tx.com", true },
- { "locksmithgrapevinetx.com", true },
- { "locksmithhumbletx.com", true },
- { "locksmithindurban.co.za", true },
- { "locksmithlakewaytx.com", true },
- { "locksmithlivoniami.com", true },
- { "locksmithmadisonheights.com", true },
- { "locksmithmesquitetexas.com", true },
- { "locksmithmesquitetx.com", true },
- { "locksmithmissouricity.com", true },
- { "locksmithresidentialspringtx.com", true },
- { "locksmithsammamishwa.com", true },
- { "locksmithsbuda.com", true },
- { "locksmithscottsdaleaz.com", true },
- { "locksmithseattleco.com", true },
- { "locksmithservice-cypress.com", true },
- { "locksmithservice-humble.com", true },
- { "locksmithsinsanantoniotx.com", true },
- { "locksmithspring.com", true },
- { "locksmithspringtx.com", true },
- { "locksmithssanmarcostx.com", true },
- { "locksmithstaffordtx.com", true },
- { "locksmithswestville.com", true },
- { "locksmiththewoodlands.com", true },
- { "lockwoodchristmastreefarm.com", true },
- { "locomotionds.com", true },
- { "locoserver.net", true },
- { "locurimunca.co", true },
- { "locus-dashboard.com", true },
- { "locus-dashboard.eu", true },
- { "locusmap.eu", true },
- { "lodash.com", false },
- { "loddeke.eu", true },
- { "lodewijkict.nl", true },
- { "lodus.io", true },
- { "loenshotel.de", true },
- { "loew.de", true },
- { "loforo.com", true },
- { "lofstad.se", true },
- { "lofttravel.com", true },
- { "logactiond.org", true },
- { "loganmarchione.com", true },
- { "loganparkneighborhood.org", true },
- { "logbook.ch", true },
- { "logbot.info", true },
- { "logement-saisonnier.com", true },
- { "logement.com", true },
- { "logentries.com", false },
- { "logexplorer.net", true },
- { "logfile.at", true },
- { "logfile.ch", true },
- { "logibow.com", true },
- { "logicaccountingsolutions.com", true },
- { "logical-invest.com", true },
- { "logicdream.tk", true },
- { "logiciel-entreprise-seurann.fr", true },
- { "logicio.ch", false },
- { "logicio.de", false },
- { "logicio.net", false },
- { "logicne-hise.si", true },
- { "logico.ar", true },
- { "login.corp.google.com", true },
- { "login.gov", false },
- { "login.launchpad.net", true },
- { "login.ooo", true },
- { "login.raiffeisen.ch", true },
- { "login.sapo.pt", true },
- { "login.ubuntu.com", true },
- { "login.yahoo.com", false },
- { "logitel.de", true },
- { "logo-vogtland.de", true },
- { "logoesun.com", true },
- { "logoglo.com", true },
- { "logojoes.net", true },
- { "logopedistalanni.it", true },
- { "logophiliapress.com", true },
- { "logopoeia.com", true },
- { "logostock.jp", true },
- { "logsnitch.com", true },
- { "logtalk.org", true },
- { "logtenberg.eu", true },
- { "logtywardrobe.com", true },
- { "logue.be", true },
- { "logze.nl", true },
- { "lohanaflores.com.br", true },
- { "loheprobado.com", true },
- { "lohmeier.it", true },
- { "lohmeyer.cc", true },
- { "lohr.net", true },
- { "lohvinau.by", true },
- { "loic.gr", true },
- { "loichot.ch", false },
- { "loisircreatif.net", true },
- { "loisirsdouville.com", true },
- { "lojadamimo.com.br", true },
- { "lojadanidrea.com.br", true },
- { "lojadarenda.com.br", true },
- { "lojadewhisky.com.br", true },
- { "lojadoanime.com", true },
- { "lojadoarcomprimido.com.br", true },
- { "lojadoprazer.com.br", true },
- { "lojadosomautomotivo.com.br", true },
- { "lojafazendoarte.com.br", true },
- { "lojafilipaper.com.br", true },
- { "lojamagicalx.com", true },
- { "lojamascate.com.br", true },
- { "lojamoleco.com.br", true },
- { "lojapos.eu", true },
- { "lojaprojetoagua.com.br", true },
- { "lojastec.com.br", true },
- { "lojaterrazul.com.br", true },
- { "lojavisamed.com.br", true },
- { "lojix.com", false },
- { "lojj.pt", true },
- { "lok.space", true },
- { "lokaal.org", true },
- { "lokal-speisen.de", true },
- { "loker.id", true },
- { "loket.nl", true },
- { "lolas-vip.com", true },
- { "lolaseuropeancafe.com", true },
- { "lolcloud.ru", true },
- { "lolcow.farm", true },
- { "loli.com", true },
- { "loli.net", true },
- { "loli.pet", true },
- { "loli.today", true },
- { "loli.tube", true },
- { "loli.world", true },
- { "lolibrary.org", true },
- { "lolic.xyz", true },
- { "lolicon.eu", true },
- { "lolkot.ru", true },
- { "lolly.cc", true },
- { "lolnames.gg", true },
- { "lolpatrol.de", true },
- { "lolpatrol.wtf", true },
- { "loma.ml", true },
- { "lomaem-nsk.ru", true },
- { "lomayko.ml", true },
- { "lombri-agro.com", true },
- { "lomerhouse.com", true },
- { "lommeregneren.dk", true },
- { "lommyfleet.com", true },
- { "lon-so.com", true },
- { "lona.io", true },
- { "lonavla.tk", true },
- { "london-mafia.tk", true },
- { "london-transfers.com", true },
- { "london.dating", true },
- { "londongallery.net", true },
- { "londongynaecologist.co", true },
- { "londonindustry.it", true },
- { "londonkeyholdingcompany.co.uk", true },
- { "londonlegaltranslation.ae", true },
- { "londonpropertymatch.com", true },
- { "londonseedcentre.co.uk", true },
- { "lonelyhaoss.com", true },
- { "lonelypawn.com", true },
- { "lonelystoner.design", false },
- { "lonelytweets.com", true },
- { "lonelyworld.co.uk", true },
- { "lonesomecosmonaut.com", true },
- { "lonestarlandandcommercial.com", true },
- { "long008.com", true },
- { "long116.com", true },
- { "long139.com", true },
- { "long18.cc", true },
- { "long226.com", true },
- { "long228.com", true },
- { "long266.com", true },
- { "long288.com", true },
- { "long388.com", true },
- { "long510.com", true },
- { "long510.net", true },
- { "long566.net", true },
- { "long688.com", true },
- { "long788.com", true },
- { "long8.com", true },
- { "long8039.com", true },
- { "long8097.com", true },
- { "long918.com", true },
- { "long988.com", true },
- { "longboard-vergleich.com", true },
- { "longboat.io", true },
- { "longhaircareforum.com", true },
- { "longhorn-imports.com", true },
- { "longhorn.id.au", true },
- { "longma168.cn", true },
- { "longma168.com", true },
- { "longstride.net", true },
- { "longtermcare.gov", true },
- { "lonniec.com", true },
- { "lonniemason.net", true },
- { "lonny.ee", true },
- { "lonwan.ru", true },
- { "look.co.il", true },
- { "lookagain.co.uk", true },
- { "lookasik.eu", true },
- { "lookastic.co.uk", true },
- { "lookastic.com", true },
- { "lookastic.de", true },
- { "lookastic.es", true },
- { "lookastic.fr", true },
- { "lookastic.mx", true },
- { "lookastic.ru", true },
- { "lookatmysco.re", true },
- { "lookbetweenthelines.com", true },
- { "looker.wang", false },
- { "lookingstores.fr", false },
- { "lookup-dns.net", true },
- { "loonbedrijfdenboer.nl", true },
- { "loonylatke.com", true },
- { "loopback.kr", true },
- { "loopstart.org", true },
- { "looseleafsecurity.com", true },
- { "loothole.com", true },
- { "lopes.com.br", true },
- { "loposchokk.com", true },
- { "loqu8.com", true },
- { "loquo.com", true },
- { "loqyu.com", true },
- { "lor.kharkov.ua", true },
- { "lord.sh", true },
- { "lordjevington.co.uk", true },
- { "lore-seeker.cards", true },
- { "lore.azurewebsites.net", true },
- { "loremipsum.info", true },
- { "lorenadumitrascu.ro", true },
- { "lorenzocampagna.myqnapcloud.com", true },
- { "lorenzocompeticion.com", true },
- { "loreofthenorth.com", true },
- { "loreofthenorth.nl", true },
- { "loricozengeller.com", true },
- { "lorimullins.com", true },
- { "lorisfnotary.com", true },
- { "loritaboegl.de", true },
- { "lornabenes.com", true },
- { "losangelestown.com", true },
- { "losaucas.tk", true },
- { "loshogares.mx", true },
- { "losreyesdeldescanso.com.ar", true },
- { "loss.no", true },
- { "lossaicos.tk", true },
- { "lost.host", true },
- { "lost.report", true },
- { "lostandfound.mu", true },
- { "lostinfood.co.uk", true },
- { "lostinlegends.com", true },
- { "lostkeys.co.uk", true },
- { "lostsandal.com", true },
- { "lostsandal.io", true },
- { "lostserver.com", true },
- { "lostwithdan.com", true },
- { "lotc.cc", true },
- { "lothlorien.ca", false },
- { "lotl.ru", true },
- { "lotn.mobi", true },
- { "lotn.nl", true },
- { "lotnonline.com", true },
- { "lotnonline.nl", true },
- { "lotro-wiki.com", true },
- { "lottodatabase.com", true },
- { "lottoland.pt", true },
- { "lottospielen24.org", false },
- { "lotz.li", true },
- { "lou-castelet.com", false },
- { "lou.ist", true },
- { "lou.lt", true },
- { "louange-reconvilier.ch", false },
- { "loucanfixit.com", true },
- { "louerunhacker.fr", true },
- { "louiscap.co", true },
- { "louisdefunes.tk", true },
- { "louisemisellinteriors.co.uk", true },
- { "louisvillecarguys.com", true },
- { "louisvillefibroids.com", true },
- { "louiza.tk", true },
- { "loukas-stoltz.fr", true },
- { "loune.net", true },
- { "loungecafe.net", true },
- { "loungecafe.org", true },
- { "loungepapillon.com", true },
- { "louremedi.fr", true },
- { "louwlemmer.com", true },
- { "love-books.ga", true },
- { "love-sent.com", true },
- { "love-spells-tarot.com", true },
- { "love4taylor.me", true },
- { "lovebeingsexy.co.uk", true },
- { "lovebigisland.com", true },
- { "lovebo9.com", true },
- { "lovebo9.net", true },
- { "loveismystyle.tk", true },
- { "loveisourweapon.com", true },
- { "lovejms.com", true },
- { "lovelovenavi.jp", true },
- { "loveluna.com", true },
- { "lovemanagementaccounts.co.uk", true },
- { "lovemen.cc", true },
- { "lovemomiji.com", true },
- { "lovemybubbles.com", true },
- { "loveni.me", true },
- { "lovenwishes.com", true },
- { "loveph.one", true },
- { "lover-bg.com", true },
- { "loverepublic.ru", true },
- { "loverngifts.com", true },
- { "loveskin.co", true },
- { "lovesmagical.com", false },
- { "lovesove.com", true },
- { "lovessentials.com", true },
- { "lovesupremefestival.com", true },
- { "loveweddingphotosandfilm.co.uk", true },
- { "loveysa.ch", false },
- { "lovg.ren", true },
- { "lovingearth.co", true },
- { "lovingthermo.com", true },
- { "lovink.net", true },
- { "lovizaim.ru", true },
- { "low-diets.com", true },
- { "lowbidders.com", true },
- { "lowcost.to", true },
- { "lowcostvehicleinsurance.com", true },
- { "lowcostwire.com.au", true },
- { "lowend.cn", true },
- { "lowerpricefinder.com", true },
- { "lowestpriceremovals.com.au", true },
- { "lowmagnitude.com", true },
- { "lowratelocksmith.com", true },
- { "lowsec.space", true },
- { "lowsidetna.com", true },
- { "lowson.ca", true },
- { "loxal.org", true },
- { "loyaleco.it", true },
- { "loyaltyondemand.club", true },
- { "loyaltyondemand.eu", true },
- { "loyisa.cn", true },
- { "lp-support.nl", true },
- { "lpmkonji.cf", true },
- { "lprcommunity.co.za", true },
- { "lps.in.ua", true },
- { "lpt-nebreziny.eu", true },
- { "lq.hr", true },
- { "lrdo.net", true },
- { "lriese.ch", true },
- { "lrs.lt", true },
- { "lrssystems.com", true },
- { "lrumeq.com", true },
- { "ls-alarm.de", true },
- { "ls-modcompany.com", true },
- { "lsbricks.com", true },
- { "lsc-dillingen.de", true },
- { "lsc.gov", true },
- { "lsc.moe", true },
- { "lsh1688.com", true },
- { "lshiy.com", true },
- { "lsiq.io", true },
- { "lsl.eu", true },
- { "lsmentor.com", true },
- { "lspdonline.gq", true },
- { "lsquo.com", true },
- { "lsscreens.de", true },
- { "lstlx.com", true },
- { "lswim.com", true },
- { "lsy.cn", true },
- { "lsys.ac", true },
- { "lt.search.yahoo.com", false },
- { "ltaake.com", true },
- { "ltcwaterwijk.nl", true },
- { "ltecode.com", true },
- { "ltheinrich.de", true },
- { "ltib.com.au", true },
- { "ltlec.cn", true },
- { "ltlec.com", true },
- { "ltls.org", true },
- { "ltn-tom-morel.fr", true },
- { "ltprtz.co.uk", true },
- { "lts-tec.de", true },
- { "ltservers.net", true },
- { "lu.search.yahoo.com", false },
- { "luan.ma", true },
- { "luav.org", true },
- { "lubar.me", true },
- { "lubbockyounglawyers.org", true },
- { "lubersacr.com", true },
- { "lubot.net", true },
- { "luc-oberson.ch", false },
- { "luca-steeb.com", true },
- { "lucacastelnuovo.nl", true },
- { "lucade.ddns.net", true },
- { "lucafontana.net", true },
- { "lucafrancesca.me", true },
- { "lucasbergen.ca", true },
- { "lucascantor.com", true },
- { "lucasdamasceno.com", true },
- { "lucasem.com", true },
- { "lucasgymnastics.com", true },
- { "lucasit.com", true },
- { "lucaslarson.net", true },
- { "lucassoler.com.ar", false },
- { "luce.life", true },
- { "luchscheider.de", false },
- { "luchthavenmaastricht.nl", true },
- { "lucid-light.de", true },
- { "lucid-reality.ch", true },
- { "lucidframeworks.com", true },
- { "lucidlight.de", true },
- { "lucidlink.com", true },
- { "lucie-parizkova.cz", true },
- { "lucie.jp", true },
- { "lucielavickova.com", true },
- { "lucille-thomas.fr", true },
- { "luck9988.com", true },
- { "lucklesslovelocks.com", true },
- { "lucky-frog.co.uk", true },
- { "luckycasino.se", true },
- { "luckycastles.co.uk", true },
- { "luckyfrog.hk", true },
- { "luckystorevn.com", true },
- { "luclu7.fr", true },
- { "lucorautopartes.com", true },
- { "lucschiltz.com", true },
- { "luctam.com", true },
- { "lucybles.com", true },
- { "lucyhancock.tech", true },
- { "lucymontebello-arte.com", true },
- { "lucyparsonslabs.com", true },
- { "lucz.co", true },
- { "luda.me", true },
- { "ludek.biz", true },
- { "ludikovsky.name", true },
- { "ludofantasy.fr", true },
- { "ludogue.net", true },
- { "ludolust.tk", true },
- { "ludothek-burgdorf.ch", true },
- { "ludovic-frank.fr", true },
- { "ludovic-muller.fr", true },
- { "ludwiggrill.de", true },
- { "ludwigjohnson.se", true },
- { "ludwigpro.net", true },
- { "luedeke-bremen.eu", true },
- { "lueersen.homedns.org", true },
- { "luehne.de", true },
- { "luelistan.net", true },
- { "luenwarneke.com", true },
- { "luera1959.de", true },
- { "lueurexterne-audiovisuel.com", false },
- { "lueurexterne.com", false },
- { "luffyhair.com", true },
- { "luftbild-siegerland.de", true },
- { "luftreiniger.biz", true },
- { "luginbuehl.be", true },
- { "luginbuehl.eu", true },
- { "lugui.in", true },
- { "luisa-birkner.de", true },
- { "luiscapelo.info", true },
- { "luismaier.de", true },
- { "luissotodesign.com", true },
- { "luisyr.com", true },
- { "luizkowalski.net", true },
- { "luizlopes.com", false },
- { "luk.earth", true },
- { "lukas-gorr.de", true },
- { "lukas-meixner.com", true },
- { "lukas-schauer.de", true },
- { "lukas.im", true },
- { "lukas2511.de", true },
- { "lukasberan.com", true },
- { "lukasberan.cz", true },
- { "lukasfunk.com", true },
- { "lukasrod.cz", true },
- { "lukasschauer.de", true },
- { "lukaswiden.com", true },
- { "lukaszuk.net", true },
- { "lukaszuk.pl", true },
- { "lukaszwojcik.com", true },
- { "lukaszwojcik.net", true },
- { "luke.ch", true },
- { "luke6887.me", true },
- { "lukeistschuld.de", true },
- { "lukem.net", true },
- { "lukeng.net", true },
- { "lukersallamericanstorage.com", true },
- { "lukesbouncycastlehire.com", true },
- { "lukestebbing.com", true },
- { "lukezweb.tk", true },
- { "lukin.ga", true },
- { "lukmanulhakim.id", true },
- { "lukull-pizza.de", true },
- { "lulua.pl", true },
- { "lumbercartel.ca", true },
- { "lumen.sh", true },
- { "lumenapp.com", true },
- { "lumenbrowser.com", true },
- { "lumi.pw", true },
- { "lumierewithinspirato.com", true },
- { "luminaire.fr", true },
- { "luminary.pl", true },
- { "lumindigital.com", true },
- { "lumitop.com", true },
- { "lummi-nsn.gov", true },
- { "lumminary.com", true },
- { "lumomongoose.com", true },
- { "lumoria.eu", true },
- { "lums.se", true },
- { "lunalove.de", true },
- { "lunanova.moe", true },
- { "lunapps.com", true },
- { "lunar6.ch", false },
- { "lunares.pl", true },
- { "lunarflake.com", true },
- { "lunarlog.com", true },
- { "lunarsoft.net", true },
- { "lunartail.nl", true },
- { "lunasqu.ee", true },
- { "lunatic.red", true },
- { "lunazacharias.com", true },
- { "lunchbunch.me", true },
- { "lundberghealthadvocates.com", true },
- { "lune-indigo.ch", false },
- { "lunepieters.co.za", true },
- { "lunidea.ch", false },
- { "lunidea.com", false },
- { "lunis.net", true },
- { "lunite.net", true },
- { "lunivertdelyne.fr", true },
- { "lunix.io", true },
- { "luoe.me", true },
- { "luoh.cc", true },
- { "luoh.me", true },
- { "luohua.im", true },
- { "luongvu.com", true },
- { "luowu.cc", true },
- { "lupa.cz", true },
- { "lupecode.com", true },
- { "lupinencyclopedia.com", true },
- { "lupinenorthamerica.com", true },
- { "lushan.me", true },
- { "lusis.fr", true },
- { "lusitom.com", true },
- { "luso-livros.net", true },
- { "lustin.fr", true },
- { "lustrum.ch", true },
- { "luteijn.biz", true },
- { "luteijn.cloud", true },
- { "luteijn.email", true },
- { "luteijn.pro", true },
- { "lutoma.org", true },
- { "luu.moe", true },
- { "luukdebruincv.nl", false },
- { "luukklene.nl", true },
- { "luukuton.fi", true },
- { "luuppi.fi", true },
- { "luv-scent.com", true },
- { "luv.asn.au", true },
- { "luv2watchmycam.com", true },
- { "luvare.com", true },
- { "luvbridal.com.au", true },
- { "luvhacks.com", true },
- { "luvplay.co.uk", true },
- { "luvscent.com", true },
- { "lux-house.tk", true },
- { "luxcraft.eng.br", true },
- { "luxecalendar.com", true },
- { "luxeturf.com.au", true },
- { "luxhome.tk", true },
- { "luxsci.com", true },
- { "luxur.is", true },
- { "luxury-inside.vn", true },
- { "luxurydistribution.cz", true },
- { "luxurynsight.net", false },
- { "luxuryweddingsindonesia.com", true },
- { "luxusnivoucher.cz", true },
- { "luxusnyvoucher.sk", true },
- { "luxvacuos.net", true },
- { "luyckx.net", true },
- { "luzat.com", true },
- { "luzfaltex.com", true },
- { "luzi-type.ch", true },
- { "lv.search.yahoo.com", false },
- { "lv0.it", true },
- { "lvcshu.com", true },
- { "lvftw.com", true },
- { "lvguitars.com", true },
- { "lvmoo.com", true },
- { "lvrsystems.com", true },
- { "lvtrafficticketguy.com", true },
- { "lw-addons.net", true },
- { "lwl.moe", true },
- { "lwsl.ink", true },
- { "lx-blog.cn", true },
- { "lxai.net", true },
- { "lxd.cc", true },
- { "lxx4380.com", true },
- { "lyax.be", true },
- { "lycly.me", true },
- { "lydudlejning.net", true },
- { "lyfebotanicals.com", true },
- { "lyftrideestimate.com", true },
- { "lykope.com", true },
- { "lymia.moe", true },
- { "lyna.ml", true },
- { "lynero.dk", true },
- { "lyness.io", true },
- { "lyness.uk", true },
- { "lyngvaer.no", true },
- { "lynnejeancleaning.com", true },
- { "lynnellneri.com", true },
- { "lynnlaytonnissanparts.com", true },
- { "lynsec.com", true },
- { "lynthium.com", true },
- { "lynx.nl", true },
- { "lynxbroker.de", true },
- { "lynxpro.nl", true },
- { "lynxriskmanager.com", true },
- { "lyon-interactive.com", true },
- { "lyon-synergie.com", true },
- { "lyonl.com", true },
- { "lyonslawlink.com", true },
- { "lyrenhex.com", true },
- { "lyrical-nonsense.com", true },
- { "lyricfm.ie", true },
- { "lyriksidan.ga", true },
- { "lys.ch", false },
- { "lysbed.com", true },
- { "lyst.co.uk", true },
- { "lyteclinic.com", true },
- { "lyuda.tk", true },
- { "lyuly.com", true },
- { "lyx.dk", true },
- { "lzcreation.com", true },
- { "lzwc.nl", true },
- { "m-16.ml", true },
- { "m-22.com", true },
- { "m-beshr.tk", true },
- { "m-chemical.com.hk", true },
- { "m-epigrafes.gr", true },
- { "m-hydravlika.com.ua", true },
- { "m-idea.jp", true },
- { "m-kleinert.de", true },
- { "m-kugpn.ru", true },
- { "m-mail.fr", true },
- { "m-monitor.pl", true },
- { "m-net.de", true },
- { "m-office.pl", true },
- { "m-ses.fr", true },
- { "m-team.cc", true },
- { "m.facebook.com", true },
- { "m.mail.ru", true },
- { "m.me", true },
- { "m0t0k1ch1.com", true },
- { "m132.eu", true },
- { "m134.eu", true },
- { "m1gun.tk", true },
- { "m23cal.eu", true },
- { "m2epro.com", true },
- { "m2h-fiscaliste.fr", true },
- { "m2il.co", true },
- { "m2os.com", true },
- { "m2tm.fr", true },
- { "m3-gmbh.de", true },
- { "m36533.com", true },
- { "m36594.com", true },
- { "m3e30.com", true },
- { "m3windowsanddoors.com", true },
- { "m4all.gr", true },
- { "m4g.ru", true },
- { "m51365.com", true },
- { "m6pub.fr", true },
- { "m8593.com", true },
- { "ma-eir.nl", true },
- { "ma-maison-container.fr", true },
- { "ma-maison-ossature-bois.fr", true },
- { "ma-ze-linux.tk", true },
- { "ma2t.com", true },
- { "maaret.de", true },
- { "maartenderaedemaeker.be", true },
- { "maartenvandekamp.nl", true },
- { "maatwerkzorgcoaching.nl", true },
- { "maaya.jp", true },
- { "maayogashram.com", true },
- { "mabankonline.com", true },
- { "mabulledu.net", true },
- { "mac-i-tea.ch", false },
- { "mac-service-stockholm.se", true },
- { "mac-servicen.se", true },
- { "mac-support.nu", true },
- { "mac-support.se", true },
- { "mac-world.pl", true },
- { "mac.biz.tr", true },
- { "mac.osaka.jp", true },
- { "macangus-wainwright.com", true },
- { "macaos.com", true },
- { "macappstudio.com", true },
- { "macaroonshindig.tk", true },
- { "macaws.org", true },
- { "macbay.net", true },
- { "macbook.es", true },
- { "macedonian-hotels.com", false },
- { "macedonian-hotels.com.mk", true },
- { "macedonian-hotels.mk", true },
- { "maceinturecuir.com", true },
- { "maces-net.de", true },
- { "macgeneral.de", false },
- { "macgenius.com", true },
- { "mach-politik.ch", true },
- { "macha.cloud", true },
- { "macha.love", true },
- { "machbach.com", true },
- { "machetewp.com", true },
- { "machidaclip.com", true },
- { "machikka.com", false },
- { "machine.email", true },
- { "machinebazar.com", true },
- { "machinerysafety101.com", true },
- { "machinetransport.com", true },
- { "machon.biz", true },
- { "macht-elektro.de", true },
- { "machtweb.de", true },
- { "machu-picchu.nl", true },
- { "macil.tech", true },
- { "macker.io", true },
- { "mackeysack.com", true },
- { "macksproductions.in", true },
- { "maclemon.at", true },
- { "macleod.io", true },
- { "macnemo.de", true },
- { "macnetwork.eu", false },
- { "macnetwork.fr", false },
- { "macnetwork.net", false },
- { "macnugget.org", true },
- { "maco.org.uk", true },
- { "macon.de", true },
- { "maconnerie-dcs.ch", true },
- { "macosxfilerecovery.com", true },
- { "macpress.com.br", true },
- { "macreosolutions.com", true },
- { "macros.co.jp", true },
- { "macroseo.tk", true },
- { "macsupportnacka.se", true },
- { "macsupportstockholm.se", true },
- { "mactools.com.co", true },
- { "macx.cc", true },
- { "madae.nl", true },
- { "madamegarage.nl", true },
- { "madars.org", false },
- { "madbin.com", true },
- { "madbouncycastles.co.uk", true },
- { "maddi.biz", true },
- { "maddistonevangelical.co.uk", true },
- { "maddreefer.com", true },
- { "made-in-earth.co.jp", true },
- { "made-to-usb.com", true },
- { "madebydusk.com", true },
- { "madebyshore.com", true },
- { "madeinolive.com", false },
- { "madeinrussia.com", true },
- { "madeinstudio3.com", true },
- { "madeira.gov.pt", true },
- { "madeitwor.se", true },
- { "madeloc.com", true },
- { "mademoe.com", true },
- { "mademoiselledemargaux.com", true },
- { "mader.jp", true },
- { "maderasyacabados.net", true },
- { "madewithopendata.org", true },
- { "madhyrecords.com", true },
- { "madin.ru", true },
- { "madirc.net", true },
- { "madisoncountyhelps.com", true },
- { "madisonent-facialplasticsurgery.com", true },
- { "madisonsquarerealestate.com", true },
- { "madix.cl", true },
- { "madmar.ee", true },
- { "madmax-store.gr", true },
- { "madoka.nu", true },
- { "madpsy.uk", true },
- { "madrants.net", true },
- { "madreacqua.org", true },
- { "madreluna.it", true },
- { "madreshoy.com", true },
- { "madridagency.com", true },
- { "madridartcollection.com", true },
- { "madscientistwebdesign.com", true },
- { "madskauts.tk", true },
- { "madsstorm.dk", true },
- { "madtec.de", true },
- { "maduradas.info", true },
- { "maduradas.net", true },
- { "maedchenflohmarkt.at", true },
- { "maedchenflohmarkt.de", true },
- { "maeln.com", true },
- { "maelstrom-fury.eu", true },
- { "maelstrom.ninja", true },
- { "maeplasticsurgery.com", true },
- { "maesinox.be", true },
- { "maewongaming.tk", true },
- { "maff.co.uk", true },
- { "maff.scot", true },
- { "mafia-penguin.club", true },
- { "mafia.network", true },
- { "mafiaforum.de", true },
- { "mafiapenguin.club", true },
- { "mafiasi.de", true },
- { "mafworld.com", true },
- { "magaconnection.com", true },
- { "magasindejouets.com", true },
- { "magasinsalledebain.be", true },
- { "magasinsalledebain.fr", true },
- { "magasinsalledebains.be", true },
- { "magasinsalledebains.fr", true },
- { "magasinsenfrance.com", true },
- { "magazilla.ga", true },
- { "magazin3513.com", true },
- { "magazinecards.ga", true },
- { "magazinedotreino.com.br", true },
- { "magdic.eu", true },
- { "magebit.com", true },
- { "magebrawl.com", true },
- { "magenda.sk", true },
- { "magentaize.net", true },
- { "magentapinkinteriors.co.uk", true },
- { "magentoeesti.eu", true },
- { "magepro.fr", true },
- { "magestionfinanciere.com", true },
- { "magewell.nl", true },
- { "maggie.com", true },
- { "maggot.cf", true },
- { "magi-cake.com", true },
- { "magic-cards.info", true },
- { "magic-chair.co.uk", true },
- { "magic-cheerleading.tk", true },
- { "magic-photo-events.fr", true },
- { "magicafacil.com", true },
- { "magical-secrets.com", true },
- { "magical.rocks", true },
- { "magicbeanschool.com", true },
- { "magicbroccoli.de", true },
- { "magicbullets.com", true },
- { "magiccards.info", true },
- { "magicdaysomagh.co.uk", true },
- { "magicdlp.com", true },
- { "magicjudges.org", true },
- { "magiclen.org", true },
- { "magicnethosting.com", true },
- { "magicomotor.com", true },
- { "magicroom.it", true },
- { "magicskillet.com", true },
- { "magicsms.pl", true },
- { "magicstay.com", true },
- { "magictable.com", true },
- { "magicvodi.at", true },
- { "magisternegi.tk", true },
- { "magnate.co", true },
- { "magnatronic.com.br", true },
- { "magnes.priv.pl", true },
- { "magnesy-neodymowe.com.pl", true },
- { "magnesy-neodymowe.pl", true },
- { "magnesy-tanio.net", true },
- { "magnesy.de", true },
- { "magnesy.net.pl", true },
- { "magnesy.priv.pl", true },
- { "magnetgaming.com", true },
- { "magneticattraction.com.au", true },
- { "magnetoscopio.tk", true },
- { "magnetoterapiapertutti.com", true },
- { "magnetpass.uk", true },
- { "magnets.jp", true },
- { "magnificatwellnesscenter.com", true },
- { "magnificentdata.com", true },
- { "magniflood.com", true },
- { "magnoliastrong.com", true },
- { "magnumwallet.co", true },
- { "magnunbaterias.com.br", true },
- { "magonote-nk.com", true },
- { "magravsitalia.com", true },
- { "magtapp.com", true },
- { "magu.kz", true },
- { "maguire.email", true },
- { "maguire.tk", true },
- { "magwin.co.uk", true },
- { "magyarepitok.hu", true },
- { "mahadulmuneer.org", true },
- { "mahalaraibanda.ro", true },
- { "mahalux.com", true },
- { "mahalux.cz", true },
- { "mahatmayoga.org", true },
- { "mahawi.sk", true },
- { "mahjong-navi.com", true },
- { "mahjong.org", true },
- { "mahjongrush.com", true },
- { "mahler.io", true },
- { "mahrer.net", true },
- { "maiaimobiliare.ro", true },
- { "maidenliput.fi", true },
- { "maidoty.net", true },
- { "maiebanatulfruncea.com", true },
- { "maiet.net", true },
- { "maigesellschaft-lammersdorf.de", true },
- { "maijia800.com", true },
- { "maikolfish.it", true },
- { "maikoloc.com", true },
- { "mail-de.jp", true },
- { "mail-rotter.de", true },
- { "mail-settings.google.com", true },
- { "mail.com", true },
- { "mail.de", true },
- { "mail.google.com", true },
- { "mail.storage", true },
- { "mail.yahoo.com", false },
- { "mail180.com", true },
- { "mail4you.in", true },
- { "mailbox.mg", true },
- { "mailbox.org", true },
- { "mailbro.de", true },
- { "mailer.site", true },
- { "mailfence.com", true },
- { "mailflank.com", true },
- { "mailgun.com", true },
- { "mailhardener.com", true },
- { "mailinabox.email", true },
- { "mailinaitor.tk", true },
- { "mailingproduct.tk", true },
- { "mailjunky.de", true },
- { "maillady-susume.com", true },
- { "mailmaid.de", true },
- { "mailmaster.tk", true },
- { "mailmerc.com", true },
- { "mailnara.co.kr", true },
- { "mailsend.ml", true },
- { "mailstart.ga", true },
- { "mailtelligent.com", true },
- { "mailto.space", true },
- { "mailtobiz.tk", true },
- { "mailtrap.io", false },
- { "mailum.org", false },
- { "mailwala.tk", true },
- { "mailxpress.ga", true },
- { "main-freedom.ru", true },
- { "mainechiro.com", true },
- { "mainhattan-handwerker.de", true },
- { "mainlined.org", true },
- { "mainone.net", true },
- { "mainquest.org", true },
- { "mainston.com", true },
- { "maintenance-traceur-hp.fr", true },
- { "maioresemelhores.com", true },
- { "mairie-sornay.fr", true },
- { "maisallianz.com", true },
- { "maisan.best", true },
- { "maisapanama.com", true },
- { "maiscelular.com.br", true },
- { "maisgasolina.com", true },
- { "maisie.nl", true },
- { "maison-haimard.fr", true },
- { "maisondoree.be", true },
- { "maisonpaulmier.fr", true },
- { "maispa.com", true },
- { "maisretorno.com", true },
- { "maisvitaminas.com.br", true },
- { "maisy.io", true },
- { "maitheme.com", true },
- { "maiti.info", true },
- { "maitrise-orthopedique.com", true },
- { "majahoidja.ee", true },
- { "majameer.com", true },
- { "majaweb.cz", true },
- { "majemedia.com", false },
- { "majesnix.org", true },
- { "majid.info", true },
- { "majkassab.com", true },
- { "majkassab.net", true },
- { "majkassab.org", true },
- { "majkl.me", true },
- { "majkl.xyz", true },
- { "majkl578.cz", true },
- { "majkyto.cz", true },
- { "majlovesreg.one", true },
- { "majolka.com", true },
- { "majorpaintingco.com", true },
- { "majorpussycum.com", true },
- { "makaleci.com", true },
- { "makalu.me", true },
- { "make-your-own-song.com", true },
- { "makechanges.com.au", true },
- { "makedin.net", true },
- { "makefoodrecipes.com", true },
- { "makepro.net", true },
- { "maker.to", true },
- { "makerdao.com", true },
- { "makermiles.com", true },
- { "makermiles.net", true },
- { "makermiles.org", true },
- { "makersatwork.com", true },
- { "maketheneighborsjealous.com", true },
- { "makeurbiz.com", true },
- { "maki-chan.de", true },
- { "makinen.ru", true },
- { "makita-online.kz", true },
- { "makkusu.photo", true },
- { "makkyon.com", true },
- { "maklerinfo.biz", true },
- { "makos.jp", true },
- { "makowitz.cz", true },
- { "maksoud-karim.net", true },
- { "maktoob.search.yahoo.com", false },
- { "maku.edu.tr", true },
- { "malachiteauth.com", true },
- { "maladie-autoimmune.fr", true },
- { "malariaadvice.gq", true },
- { "malash.me", false },
- { "malasuk.com", true },
- { "malaysia.search.yahoo.com", false },
- { "malaysian.dating", true },
- { "malaysianews.ml", true },
- { "malcolmellis.com", true },
- { "maldives.cx", true },
- { "malediven.biz", true },
- { "maleevcues.com", true },
- { "malenaamatomd.com", true },
- { "malenyflorist.com.au", true },
- { "maleperformancepills.com", true },
- { "maler-marschalleck.de", true },
- { "malermeister-haussmann.de", true },
- { "malezan.com", true },
- { "maliar.fr", true },
- { "malibu-electric.com", true },
- { "malibuelectrical.com", true },
- { "malibuexteriorlighting.com", true },
- { "malibulingerie.com", true },
- { "malibumodas.com.br", true },
- { "malik.id", true },
- { "malikussa.id", true },
- { "malikussaid.com", true },
- { "malikzinad.com", true },
- { "malinaclub.com", true },
- { "malinheadview.ie", true },
- { "mall.cz", true },
- { "mall.hr", true },
- { "mall.hu", true },
- { "mall.pl", true },
- { "mall.sk", true },
- { "mallach.net", true },
- { "mallonline.com.br", true },
- { "malnex.de", true },
- { "malond.com", true },
- { "malta-firma.com", true },
- { "maltasite.tk", true },
- { "maltaultrastifo.tk", true },
- { "maltegegner.de", true },
- { "malufs.com.br", true },
- { "malwar.ee", true },
- { "malwar.eu", true },
- { "malware.watch", true },
- { "malwareinvestigator.gov", true },
- { "malwaretips.com", true },
- { "malwr.ee", true },
- { "malyshata.com", true },
- { "malysvet.net", false },
- { "mamabepo.com", true },
- { "mamaisondefamille.info", true },
- { "mamamoet.ru", true },
- { "mamanakormit.tk", true },
- { "mamanecesitaungintonic.com", true },
- { "mamasorganizedchaos.com", true },
- { "mambas.cn", true },
- { "mame.cl", true },
- { "mammals.net", true },
- { "mammaw.com", true },
- { "mammooc.org", true },
- { "mammothlakesmls.net", true },
- { "mamospienas.lt", true },
- { "mamot.fr", false },
- { "mamtapark.tk", true },
- { "mamuko.nl", true },
- { "man-stuff.co.uk", true },
- { "man3s.jp", false },
- { "mana.ee", true },
- { "manach.net", true },
- { "manage.cm", true },
- { "manage4all.de", true },
- { "manageathome.co.uk", true },
- { "managedhosting.de", true },
- { "managedservicesraleighnc.com", true },
- { "management-companie.ro", true },
- { "managementboek.nl", true },
- { "managementfeedback.com", true },
- { "managementforstartups.com", false },
- { "manageprefs.com", true },
- { "manageprojects.com", false },
- { "manager-efficacement.com", true },
- { "manager.linode.com", false },
- { "managewp.org", true },
- { "managr.net", true },
- { "manasakcijas.lv", true },
- { "manatees.com.au", true },
- { "manatees.net", true },
- { "manawill.jp", true },
- { "manawithtea.com", true },
- { "mancrates.com", true },
- { "mandalevydesigns.com", true },
- { "mandarinpediatrics.com", true },
- { "mandcbouncycastlehire.co.uk", true },
- { "mandediary.com", true },
- { "mandela-effect-wiki.tk", true },
- { "mandilabeachhotel.com", true },
- { "mandynamic.gr", true },
- { "maneggio.milano.it", true },
- { "manelli.fr", true },
- { "maneql.co.jp", true },
- { "maneql.info", true },
- { "manesht.ir", true },
- { "manfredgruber.net", true },
- { "manfredi.io", true },
- { "manfredimatteo.com", true },
- { "manfredschafer.ch", true },
- { "mangabank.net", true },
- { "mangabank.org", true },
- { "mangaboxes.ml", true },
- { "mangahigh.com", true },
- { "mangareactor.tk", true },
- { "mangaristica.com", false },
- { "mangaworld.gq", true },
- { "mangnhuapvc.com.vn", true },
- { "mangotwoke.co.uk", true },
- { "manhattanchoralensemble.org", true },
- { "manhole.club", true },
- { "manhuagui.com", true },
- { "mani.tw", true },
- { "manicbouncycastles.co.uk", true },
- { "manicode.com", true },
- { "manicur-salon.tk", true },
- { "manicuradegel.com", true },
- { "manicuradegel.es", true },
- { "manilaprinciples.org", true },
- { "maniorpedi.com", true },
- { "maniosglass.gr", true },
- { "manipil.ch", true },
- { "manipurmatka.net", true },
- { "manito.kr", true },
- { "manja-und-martin.de", true },
- { "manjaro.ru", true },
- { "mankans.com", false },
- { "mankier.com", true },
- { "mankomarketing.com", true },
- { "manmeetgill.com", true },
- { "manneguiden.no", true },
- { "mannheimbloggt.tk", true },
- { "mannschafft.ch", true },
- { "manoirdecontres.com", true },
- { "manonamission.de", true },
- { "manonandre-avocat.fr", true },
- { "manoro.de", true },
- { "mansdell.net", true },
- { "mansfeld.pl", true },
- { "manshatech.com", true },
- { "manski.net", true },
- { "mansora.net", true },
- { "mantabiofuel.com", true },
- { "mantachiepharmacy.com", true },
- { "mantenimientoimpresoras.com", true },
- { "manti.by", true },
- { "mantor.org", false },
- { "mantul.top", true },
- { "manualidadeson.com", true },
- { "manuall.co.uk", true },
- { "manuall.cz", true },
- { "manuall.de", true },
- { "manuall.dk", true },
- { "manuall.es", true },
- { "manuall.fi", true },
- { "manuall.fr", true },
- { "manuall.info.tr", true },
- { "manuall.it", true },
- { "manuall.jp", true },
- { "manuall.kr", true },
- { "manuall.no", true },
- { "manuall.pl", true },
- { "manuall.pt", true },
- { "manuall.ro", true },
- { "manuall.se", true },
- { "manualscollection.com", true },
- { "manuel-herrmann.de", true },
- { "manuel-schefczyk.de", true },
- { "manuel7espejo.com", true },
- { "manuelguerra.pt", true },
- { "manueli.de", true },
- { "manuelpinto.in", false },
- { "manuelraimo.cf", true },
- { "manufacturing.gov", false },
- { "manufacturinginmexico.org", true },
- { "manufacturingusa.com", false },
- { "manuscripteditorial.com", true },
- { "manuscriptlink.com", true },
- { "manusiasosial.tk", true },
- { "manutd.org.np", true },
- { "manuth.life", true },
- { "manwish.cn", true },
- { "manylots.ru", true },
- { "manyue.org", true },
- { "maoi.re", true },
- { "maomihz.com", true },
- { "maone.net", true },
- { "maorx.cn", true },
- { "maosensanguentadasdejesus.net", true },
- { "maowtm.org", true },
- { "map-patho.com", true },
- { "map4erfurt.de", true },
- { "map4jena.de", true },
- { "mapado.ru", true },
- { "mapasmundi.com.br", true },
- { "mapblender.com", true },
- { "mapchange.org", true },
- { "mapeo.io", true },
- { "maplebgm.cc", true },
- { "maplegate.info", true },
- { "mapletime.com", true },
- { "mappingfutures.org", true },
- { "mapresidentielle.fr", true },
- { "mapstack.org", true },
- { "maquinariaspesadas.org", true },
- { "maquinasdecoserplus.com", true },
- { "mar-eco.no", true },
- { "marabumadrid.com", false },
- { "marabunta.io", true },
- { "marakovits.net", true },
- { "marandu.com.ar", false },
- { "maransurology.com", true },
- { "marble.com", true },
- { "marbledentalcentre.ca", true },
- { "marblemosaics.ga", true },
- { "marbogardenlidkoping.se", true },
- { "marbree.eu", true },
- { "marbrerie-segur.fr", true },
- { "marc-beninca.fr", true },
- { "marc-hammer.de", true },
- { "marc-hoffrichter.de", true },
- { "marc-schlagenhauf.de", true },
- { "marcaixala.me", true },
- { "marcanhoury.com", true },
- { "marcberndtgen.de", true },
- { "marcceleiro.com", true },
- { "marceau.ovh", true },
- { "marcel-preuss.de", true },
- { "marcel-veronetzki.de", true },
- { "marcel-waldvogel.ch", true },
- { "marcelabarrozo.tk", true },
- { "marcelinofranchini.com", true },
- { "marcelinofranchini.eu", true },
- { "marcelinofranchini.info", true },
- { "marcelinofranchini.net", true },
- { "marcelinofranchini.org", true },
- { "marceljeannin.com", true },
- { "marcelkooiman.com", true },
- { "marcelofernandez.tk", true },
- { "marcelpreuss.de", true },
- { "marcelsiegert.com", true },
- { "marcelwaldvogel.ch", true },
- { "marcelwiedemeier.com", true },
- { "marcelwolf.coach", true },
- { "marcgoertz.de", true },
- { "marche-contre-monsanto.ch", false },
- { "marcheslep.org.uk", true },
- { "marchhappy.tech", false },
- { "marchukov.com", true },
- { "marclay.co.uk", true },
- { "marco-burmeister.de", true },
- { "marco-goltz.de", true },
- { "marco-hegenberg.net", true },
- { "marco-polo-reisen.com", true },
- { "marco-reitmeier.de", true },
- { "marcobicca.com", true },
- { "marcocasoni.com", true },
- { "marcoherten.com", true },
- { "marcoklomp.nl", true },
- { "marcopolo-restaurant.com", true },
- { "marcoreitmeier.de", true },
- { "marcoslater.com", true },
- { "marcotics.nl", true },
- { "marcus.pw", true },
- { "marcusds.ca", true },
- { "marcusstafford.com", true },
- { "mareamoda.com", true },
- { "marechal-company.com", true },
- { "marek.su", true },
- { "marex.host", true },
- { "margagriesser.de", true },
- { "margatroid.com", true },
- { "margaux-perrin.com", true },
- { "margays.de", true },
- { "margecommunication.com", false },
- { "margo-co.ch", false },
- { "margolis.gq", true },
- { "margotlondon.co.uk", true },
- { "marguerite-maison.fr", true },
- { "maria-galland.cz", true },
- { "mariaaguirrevalarezo.com", true },
- { "mariafernanda.com.br", true },
- { "mariage-protestant.ch", true },
- { "mariagealamontagne.com", true },
- { "mariagiovannaluini.it", true },
- { "mariaheidemann.nl", true },
- { "marianatherapy.com", true },
- { "marianhoenscheid.de", true },
- { "mariannenan.nl", true },
- { "mariannethijssen.nl", true },
- { "mariapietropola.com", true },
- { "mariasandoli.com.br", true },
- { "mariasavchenko.com", true },
- { "mariasilverbutterfly.com", true },
- { "mariatash.com", true },
- { "maridonlaw.com", true },
- { "marie-elisabeth.dk", true },
- { "marie-pettenbeck-schule.de", true },
- { "mariehane.com", true },
- { "mariemiramont.fr", true },
- { "mariendistel-tee.de", true },
- { "mariereichl.cz", true },
- { "marijnfidder.nl", true },
- { "marijuanajobscannabiscareers.com", true },
- { "marikafranke.de", true },
- { "marilsnijders.nl", true },
- { "marilynhartman.com", true },
- { "marilynmartin.com.au", true },
- { "marilynstreats.com", true },
- { "marin-business-center.ch", false },
- { "marin-dom.ru", false },
- { "marin-tullet.com", false },
- { "marina-tsvetaeva.ml", true },
- { "marinat2012.de", true },
- { "marinazarza.es", true },
- { "marinbusinesscenter.ch", false },
- { "marinela.com.mx", false },
- { "marinelausa.com", false },
- { "marinershousecalstock.com", true },
- { "maringalazer.com.br", true },
- { "marioabela.com", true },
- { "mariogeckler.de", false },
- { "mariposah.ch", true },
- { "marisamorby.com", false },
- { "marisasitaliankitchen.com", true },
- { "mariskavankasbergen.nl", true },
- { "maritim.go.id", false },
- { "maritimeseafoods.com", true },
- { "mariushubatschek.de", true },
- { "marivalemotions.com", true },
- { "mariviolin.com", true },
- { "marjeta-gurtner.ch", true },
- { "marjoleindens.be", true },
- { "marjorie-wiki.de", true },
- { "marjoriecarvalho.com.br", true },
- { "mark-dietzer.de", true },
- { "mark-semmler.de", true },
- { "mark1998.com", true },
- { "markaconnor.com", true },
- { "markandev.com", true },
- { "markandrosalind.co.uk", true },
- { "markantoffice.com", true },
- { "markbiesheuvel.nl", true },
- { "markdain.net", true },
- { "markel.com.es", true },
- { "markepps.com", true },
- { "market-vanna.ru", true },
- { "market.android.com", true },
- { "marketespace.fr", false },
- { "marketgrid.ml", true },
- { "marketgrid.tk", true },
- { "marketindex.com.au", true },
- { "marketing-2.de", true },
- { "marketingbrandingnews.com", true },
- { "marketingbrandingnews.net", true },
- { "marketingco.nl", true },
- { "marketingconverts.com", true },
- { "marketingpalace.tk", true },
- { "marketingprofesszorok.hu", true },
- { "marketingtrendnews.com", true },
- { "marketingvirtuales.com", true },
- { "marketingypublicidaddigital.com.mx", true },
- { "marketizare.ro", true },
- { "marketking.ga", true },
- { "marketplacestrategy.com", true },
- { "marketsearch.ga", true },
- { "marketvalue.gq", true },
- { "markfisher.photo", true },
- { "markfordelegate.com", true },
- { "markhaehnel.de", true },
- { "markhoodphoto.com", true },
- { "markhoodwrites.com", true },
- { "markido.com", true },
- { "markitzeroday.com", true },
- { "markkirkforillinois.com", true },
- { "marklauman.ca", true },
- { "markoglou.com.gr", true },
- { "markri.nl", true },
- { "markridgwell.co.uk", true },
- { "markridgwell.com", true },
- { "markridgwellcom.appspot.com", true },
- { "markshroyer.com", true },
- { "marksm.it", true },
- { "marksmit.co", true },
- { "markspres.org", true },
- { "markstevenkirk.com", true },
- { "markstickley.co.uk", true },
- { "markt-heiligenstadt.de", false },
- { "marktcontact.com", true },
- { "marktgorman.com", true },
- { "marktguru.at", true },
- { "marktguru.de", true },
- { "marktissink.nl", true },
- { "markup-ua.com", true },
- { "markus-blog.de", false },
- { "markus-keppeler.de", true },
- { "markus-musiker.de", true },
- { "markus-ullmann.de", true },
- { "markusehrlicher.de", true },
- { "markusjanzen.de", true },
- { "markusjochim.de", true },
- { "markuskeppeler.de", true },
- { "markuskeppeler.no-ip.biz", true },
- { "markusritzmann.ch", true },
- { "markusueberallassetmanagement.de", true },
- { "markusueberallconsulting.de", true },
- { "markusweimar.de", true },
- { "marl.fr", true },
- { "marliesfens.nl", true },
- { "marloncommunications.com", true },
- { "marlonlosurdopictures.com", true },
- { "marlosoft.net", true },
- { "marmaluot.com", true },
- { "marmista.roma.it", true },
- { "marmolesromero.com", true },
- { "marmotte.love", true },
- { "marmuif.fr", true },
- { "marocemploi.co", true },
- { "maroismasso.com", true },
- { "marolu.one", true },
- { "maroquineriepirlot.be", false },
- { "maroussia.tk", true },
- { "marpa-wohnen.de", true },
- { "marrai.de", true },
- { "marriage-shrine.jp", true },
- { "marriageawareness.com", true },
- { "marrickvilleapartments.com.au", true },
- { "marron-dietrecipe.com", true },
- { "mars.army", true },
- { "mars.navy", true },
- { "marsanvet.com", true },
- { "marsbleapp.com", true },
- { "marseillekiteclub.com", true },
- { "marshallscastles.com", true },
- { "marshallwilson.com", true },
- { "marshmallow.co", true },
- { "marshmallow.com", true },
- { "marsikelektro.cz", true },
- { "martasibaja.com", true },
- { "martel-innovate.com", true },
- { "martelange.ovh", true },
- { "martellosecurity.com", true },
- { "martemeo-wetterau.de", true },
- { "marten-buer.de", true },
- { "martensmxservice.nl", true },
- { "martensson.io", false },
- { "martialarts-wels.at", true },
- { "martian.community", true },
- { "martian.tk", true },
- { "martide.com", true },
- { "martijn.site", true },
- { "martijnhielema.nl", true },
- { "martijnvanderzande.nl", true },
- { "martin-loewer.de", true },
- { "martin-renze.de", true },
- { "martin-weil.de", true },
- { "martin.vet", true },
- { "martinbaileyphotography.com", true },
- { "martinboerhof.nl", true },
- { "martincernac.cz", true },
- { "martine.nu", true },
- { "martinelias.cz", true },
- { "martineweitweg.de", true },
- { "martinfranc.eu", false },
- { "martinhaunschmid.com", true },
- { "martinho.tk", true },
- { "martinkus.eu", true },
- { "martinmuc.de", true },
- { "martinreed.net", true },
- { "martinvillalba.com", true },
- { "martinvillalba.com.ar", true },
- { "martinvillalba.info", true },
- { "martinvillalba.net", true },
- { "martinvillalba.org", true },
- { "martonmihaly.hu", true },
- { "marufmusic.tk", true },
- { "maruhoi.com", true },
- { "marulaweb.com", true },
- { "marvaco.ga", true },
- { "marvelmoviemarathon.com", true },
- { "marvelousdesigners.com", true },
- { "marvin.rocks", true },
- { "marvinschopf.com", true },
- { "marvman.me", true },
- { "marvnet.de", true },
- { "marvnet.design", true },
- { "marvnetdigital.com", true },
- { "marvnetdigital.de", true },
- { "marxists.org", true },
- { "marycliffpress.com", true },
- { "maryeclark.com", true },
- { "maryhaze.net", true },
- { "maryjaneroach.com", true },
- { "maryjruggles.com", true },
- { "marykatrinaphotography.com", true },
- { "marylandbasementandcrawlspacewaterproofing.com", true },
- { "marylandtraditions.org", true },
- { "maryluzturismo.co", true },
- { "marzio.co.za", true },
- { "masalaband.tk", true },
- { "masarik.sh", true },
- { "masarn.com", true },
- { "masaze-hanka.cz", true },
- { "mascosolutions.com", true },
- { "mascotarios.org", true },
- { "masdemariette.com", true },
- { "masdemexico.com", true },
- { "maseni.com", true },
- { "maservant.net", true },
- { "mashandco.it", true },
- { "mashandco.tv", true },
- { "mashcape.com", true },
- { "masiniunelte.store.ro", true },
- { "maskim.fr", true },
- { "maskinkultur.com", true },
- { "maslin.io", true },
- { "masqueradecostumes.tk", true },
- { "masrur.org", true },
- { "mass.pt", true },
- { "massaboutique.com", true },
- { "massage-colleges.com", true },
- { "massage-vitalite.fr", true },
- { "massage4u.net", true },
- { "massageandwellbeing.com", true },
- { "massagecoolangatta.com.au", true },
- { "massagecupping.com", true },
- { "massagetainha-hanoi.com", true },
- { "massconsultores.com", true },
- { "masse.org", true },
- { "massflix.com", true },
- { "massfone.com", true },
- { "masshiro.blog", true },
- { "masshvac.com", true },
- { "massotherapeutique.com", true },
- { "masta.ch", false },
- { "mastdi.eu", true },
- { "mastellone.us", true },
- { "mastepinnelaand.nl", true },
- { "master-net.org", true },
- { "master-tmb.ru", true },
- { "mastercardpac.com", true },
- { "masterdemolitioninc.com", true },
- { "masterdigitale.com", true },
- { "masterdrilling.com", true },
- { "masterkitchen.com.br", true },
- { "masterofallscience.com", true },
- { "masterofbytes.ch", true },
- { "masterpassword.org", true },
- { "masterpc.co.uk", true },
- { "masterplc.com", true },
- { "masterplumber.coach", true },
- { "masters.black", true },
- { "mastersadistancia.com", true },
- { "mastersthesiswriting.com", true },
- { "masterstuff.de", true },
- { "masterton.com.au", true },
- { "mastodon.at", true },
- { "mastodon.host", true },
- { "mastodon.top", true },
- { "mastodon.uno", true },
- { "mat.tt", true },
- { "matanz.de", true },
- { "matatabimix.com", true },
- { "matatall.com", true },
- { "match.audio", true },
- { "matchatea24.com", true },
- { "matchboxdesigngroup.com", true },
- { "matchlessdentist.com", true },
- { "matchmadeinstubton.com", true },
- { "matchmuchach.net", true },
- { "matchupmagic.com", true },
- { "mate.vn", true },
- { "matebalazs.hu", true },
- { "matejgroma.com", true },
- { "matel.org", true },
- { "matematikkulubu.tk", true },
- { "matematyka.wiki", true },
- { "materassi.roma.it", true },
- { "materiaischiquinho.com.br", true },
- { "material-ui.com", true },
- { "material-world-fuyouhin.com", true },
- { "materialism.com", true },
- { "materialyinzynierskie.pl", true },
- { "maternalsafety.org", true },
- { "mateuszmajewski.com", true },
- { "matex-tokyo.co.jp", true },
- { "matgodt.no", true },
- { "math-coaching.com", true },
- { "math-colleges.com", true },
- { "math.hamburg", true },
- { "mathematik.rocks", true },
- { "matheo-schefczyk.de", true },
- { "mathers.ovh", true },
- { "mathes.berlin", true },
- { "mathhire.org", true },
- { "mathiasbynens.be", true },
- { "mathiasgarbe.de", true },
- { "mathiaswagner.org", true },
- { "mathieuguimond.com", true },
- { "mathieui.net", true },
- { "mathis.com.tr", true },
- { "mathiteia.com", true },
- { "maths.network", true },
- { "mathsai.com", true },
- { "mathspace.co", true },
- { "mathys.io", true },
- { "matijakolaric.com", true },
- { "matildajaneclothing.com", true },
- { "matipl.pl", true },
- { "matjaz.it", true },
- { "matlss.com", true },
- { "matocmedia.com", true },
- { "matok.me.uk", true },
- { "matome-surume.com", true },
- { "matomeathena.com", true },
- { "matoutepetiteboutique.com", true },
- { "matridiana.com", true },
- { "matrieux.dk", true },
- { "matrimonio.com.pe", true },
- { "matrixglobalsms.com", true },
- { "matrixim.cc", true },
- { "matrixmedia.ro", true },
- { "matrixreq.com", true },
- { "matsu-semi.com", true },
- { "matt-brooks.com", true },
- { "matt-royal.com.cy", true },
- { "matt-royal.gr", true },
- { "matt.re", true },
- { "matt.wiki", true },
- { "mattadams.info", true },
- { "mattandyana.com", true },
- { "mattari-app.com", true },
- { "mattatoio.eu", true },
- { "mattberryman.org", true },
- { "mattbsg.xyz", true },
- { "mattcarr.net", false },
- { "mattcoles.io", true },
- { "mattconstruction.com", true },
- { "mattcorp.com", true },
- { "mattcronin.co.uk", true },
- { "matteobrenci.com", true },
- { "matteomarescotti.it", true },
- { "mattersource.com", true },
- { "mattferderer.com", true },
- { "mattfin.ch", true },
- { "mattforster.ca", true },
- { "matthew-cash.com", true },
- { "matthewcollins.me", true },
- { "matthewfells.com", true },
- { "matthewgrow.com", true },
- { "matthewj.ca", true },
- { "matthewkenny.co.uk", true },
- { "matthewkerley.com", true },
- { "matthewohare.com", true },
- { "matthewprenger.com", true },
- { "matthewsaeger.com", true },
- { "matthewsetter.com", true },
- { "matthey.nl", true },
- { "matthi.coffee", true },
- { "matthi3u.xyz", true },
- { "matthias-muenzner.de", true },
- { "matthiasbeck.com", true },
- { "matthiasmueller.me", true },
- { "matthiasott.com", true },
- { "matthiasschwab.de", true },
- { "matthieuchedidweb.tk", true },
- { "matthieuschlosser.fr", true },
- { "mattiascibien.net", false },
- { "mattlaks.com", true },
- { "mattli.us", true },
- { "mattmccutchen.net", true },
- { "mattmcshane.com", true },
- { "mattonline.me", true },
- { "mattprojects.com", true },
- { "matts.wiki", true },
- { "matts.world", true },
- { "mattwservices.co.uk", true },
- { "matucloud.de", true },
- { "matuslab.net", true },
- { "matviet.vn", true },
- { "matze.co", true },
- { "mau.chat", true },
- { "mau.life", true },
- { "mauerwerk.online", true },
- { "mauerwerkstag.info", true },
- { "mauiticketsforless.com", true },
- { "mauldincookfence.com", true },
- { "maunium.net", true },
- { "mauracher.cc", true },
- { "mauran.me", false },
- { "maureencsmith.ca", true },
- { "mauricedb.nl", true },
- { "mauriceje.ga", true },
- { "mauricioquadradoconsultor.com.br", true },
- { "mauricioquadradocontador.com.br", true },
- { "maurovacca.com", true },
- { "maury-moteurs.com", true },
- { "mauwis.ro", true },
- { "maveeranpasupathi.tk", true },
- { "mavenclinic.com", true },
- { "mavensecurity.com", true },
- { "mavenvets.co.uk", true },
- { "maveris.com", true },
- { "mawai.com.tw", true },
- { "mawo.olkusz.pl", true },
- { "mawrex.tech", true },
- { "max-it.fr", true },
- { "max-moeglich.de", true },
- { "max-went.pl", true },
- { "max.gov", true },
- { "max0365.com", true },
- { "maxb.fm", true },
- { "maxbeenen.de", true },
- { "maxbruckner.de", true },
- { "maxbruckner.org", true },
- { "maxchan.info", true },
- { "maxclean.ml", true },
- { "maxedgymequipment.com", true },
- { "maxh.me.uk", true },
- { "maxhoechtl.at", true },
- { "maxiglobal.net", true },
- { "maxiglobal.pt", true },
- { "maximdens.be", true },
- { "maximeferon.fr", true },
- { "maximilian-graf.de", true },
- { "maximilian-greger.com", true },
- { "maximilian-staedtler.de", true },
- { "maximiliankaul.de", true },
- { "maximiliankrieg.de", true },
- { "maximind.sg", true },
- { "maxims-travel.com", true },
- { "maxinesbydennees.com", true },
- { "maxipcalls.com", false },
- { "maxiservak.ml", true },
- { "maxisito.it", true },
- { "maxkaul.de", true },
- { "maxlaumeister.com", true },
- { "maxmatthe.ws", true },
- { "maxmilton.com", true },
- { "maxmind.com", true },
- { "maxmobiles.ru", true },
- { "maxmuen.de", true },
- { "maxp.info", true },
- { "maxpl0it.com", true },
- { "maxr1998.de", true },
- { "maxrandolph.com", true },
- { "maxrider.tk", true },
- { "maxtruxa.com", true },
- { "maxundlara.at", true },
- { "maxverboom.nl", true },
- { "maxwaellenergie.de", true },
- { "maxwell-english.co.jp", false },
- { "maxwellmoore.co.uk", true },
- { "may24.tw", true },
- { "mayaimplant.com", true },
- { "mayavi.co.in", true },
- { "mayblossom.net", true },
- { "maydn.org", true },
- { "mayhutmuibep.com", true },
- { "mayito.tk", true },
- { "mayomarquees.com", true },
- { "mayopartyhire.com", true },
- { "mayorcahill.com", true },
- { "mayper.net", false },
- { "maypolevilla.co.uk", true },
- { "mayre-idol.tk", true },
- { "mayrhofer.eu.org", false },
- { "maysambotros.tk", true },
- { "maytalkhao.com", true },
- { "maywoodpark.com", true },
- { "mazavto.ml", true },
- { "mazda-mps.de", true },
- { "mazda-thermote.com", false },
- { "mazdaofgermantown.com", true },
- { "maze.design", false },
- { "maze.fr", false },
- { "mazenjobs.com", true },
- { "mazi.io", true },
- { "mazloum.adv.br", true },
- { "mazzotta.me", true },
- { "mb-demo.net", true },
- { "mb-server.de", true },
- { "mb300sd.com", true },
- { "mb300sd.net", true },
- { "mbaasy.com", true },
- { "mbaestlein.de", true },
- { "mbainflatables.co.uk", true },
- { "mbanq.com", true },
- { "mbardot.com", true },
- { "mbasic.facebook.com", false },
- { "mbc.asn.au", true },
- { "mbcars.be", false },
- { "mbclegal.org", true },
- { "mbda.gov", true },
- { "mbed.com", true },
- { "mbedcloud.com", true },
- { "mbedcloudintegration.net", true },
- { "mbeo.ch", false },
- { "mbetb73.com", true },
- { "mbinf.de", false },
- { "mbk.net.pl", true },
- { "mblankhorst.nl", true },
- { "mble.mg", true },
- { "mbr-net.de", true },
- { "mbrooks.info", true },
- { "mbs-journey.com", true },
- { "mbski.se", true },
- { "mbsr-barmstedt.de", true },
- { "mbsync4supply.com", true },
- { "mbte365.com", true },
- { "mburaks.com", true },
- { "mburns.duckdns.org", true },
- { "mbusi.com", true },
- { "mc-jobs.net", true },
- { "mc-pub.org", true },
- { "mc-web.se", true },
- { "mc007.xyz", true },
- { "mcatnnlo.org", true },
- { "mcblain.com", true },
- { "mccannbristol.co.uk", true },
- { "mcconciergerie.com", true },
- { "mccoolesredlioninn.com", true },
- { "mccordscvs.com", true },
- { "mccordsvillelocksmith.com", true },
- { "mccrackon.com", true },
- { "mcculloughjchris.com", true },
- { "mcdonalds.be", true },
- { "mcduff.ga", true },
- { "mce.eu", true },
- { "mce.nyc", true },
- { "mce55.eu", true },
- { "mcea-hld.jp", true },
- { "mceconferencecentre.eu", true },
- { "mcfarlow.sk", true },
- { "mcfedries.com", true },
- { "mcfi.mu", true },
- { "mcfx.us", true },
- { "mcgaccountancy.co.uk", true },
- { "mcgovernance.com", true },
- { "mchan.us", true },
- { "mchel.net", true },
- { "mchost.no", true },
- { "mchristopher.com", true },
- { "mcivor.me", true },
- { "mcjars.com", true },
- { "mckendry.com", true },
- { "mckendry.consulting", true },
- { "mckernan.in", false },
- { "mckinley.school", true },
- { "mcl.de", false },
- { "mcl.gg", true },
- { "mclinflatables.co.uk", true },
- { "mclmotors.co.uk", true },
- { "mclouds.ru", true },
- { "mcmillansedationdentistry.com", false },
- { "mcmillanskiclub.com.au", true },
- { "mcneill.io", true },
- { "mcnext.net", true },
- { "mcon.se", true },
- { "mcpaoffice.com", true },
- { "mcpebox.com", true },
- { "mcplayman.de", true },
- { "mcrn.jp", true },
- { "mcsinflatables.co.uk", true },
- { "mcsports.es", true },
- { "mcsrvstat.us", true },
- { "mctitan.net", true },
- { "mctools.org", true },
- { "mcuexchange.com", true },
- { "mcukhost.co.uk", true },
- { "mcuuid.net", true },
- { "mcversions.net", true },
- { "mcvs.net", true },
- { "mcwrapper.com", true },
- { "mcynews.com", true },
- { "mcyukon.com", true },
- { "md-clinica.com.ua", true },
- { "md10lc8.com", true },
- { "md11lc8.com", true },
- { "md12lc8.com", true },
- { "md13lc8.com", true },
- { "md15lc8.com", true },
- { "md16lc8.com", true },
- { "md17lc8.com", true },
- { "md19lc8.com", true },
- { "md1lc8.com", true },
- { "md24lc8.com", true },
- { "md33lc8.com", true },
- { "md34lc8.com", true },
- { "md35lc8.com", true },
- { "md38lc8.com", true },
- { "md43lc8.com", true },
- { "md44lc8.com", true },
- { "md45lc8.com", true },
- { "md46lc8.com", true },
- { "md52lc8.com", true },
- { "md56lc8.com", true },
- { "md5file.com", true },
- { "md5hashing.net", true },
- { "md5lc8.com", true },
- { "md8lc8.com", true },
- { "md9lc8.com", true },
- { "mdaemon.de", true },
- { "mdbug.de", true },
- { "mdcghana.org", true },
- { "mdcloudps.com", true },
- { "mdewendt.de", true },
- { "mdf-bis.com", false },
- { "mdhosting.co.uk", true },
- { "mdihi.com", true },
- { "mdinvest.nz", true },
- { "mdir.tk", true },
- { "mdiv.pl", true },
- { "mdkhorshedalam.com", true },
- { "mdkr.nl", true },
- { "mdlayher.com", true },
- { "mdma.net", true },
- { "mdmed.clinic", true },
- { "mdosch.de", true },
- { "mdpparish.com", true },
- { "mdpraha.cz", true },
- { "mdrsp.de", true },
- { "mdrthmcs.io", true },
- { "mdsave.com", true },
- { "mdtorelli.it", true },
- { "mdx.no", true },
- { "mdxdave.de", true },
- { "mdxn.org", true },
- { "mdzservers.com", true },
- { "me-news.tk", true },
- { "me-soft.nl", true },
- { "me.net.nz", true },
- { "me7878.com", true },
- { "meadowfen.farm", true },
- { "meadowfenfarm.com", true },
- { "meadstats.com", true },
- { "meamod.com", false },
- { "meany.xyz", true },
- { "meap.xyz", true },
- { "measureyourpenis.today", true },
- { "meat.org.uk", true },
- { "meayne.ddns.net", true },
- { "mebaneattorney.com", true },
- { "mebanesteakhouse.com", true },
- { "mec010.com", true },
- { "mec020.com", true },
- { "mec021.com", true },
- { "mec022.com", true },
- { "mec023.com", true },
- { "mec024.com", true },
- { "mec025.com", true },
- { "mec027.com", true },
- { "mec028.com", true },
- { "mec029.com", true },
- { "mec0310.com", true },
- { "mec0311.com", true },
- { "mec0312.com", true },
- { "mec0313.com", true },
- { "mec0314.com", true },
- { "mec0315.com", true },
- { "mec0316.com", true },
- { "mec0317.com", true },
- { "mec0318.com", true },
- { "mec0319.com", true },
- { "mec0335.com", true },
- { "mec0350.com", true },
- { "mec0351.com", true },
- { "mec0352.com", true },
- { "mec0353.com", true },
- { "mec0354.com", true },
- { "mec0355.com", true },
- { "mec0356.com", true },
- { "mec0357.com", true },
- { "mec0358.com", true },
- { "mec0359.com", true },
- { "mec0370.com", true },
- { "mec0371.com", true },
- { "mec0372.com", true },
- { "mec0373.com", true },
- { "mec0374.com", true },
- { "mec0375.com", true },
- { "mec0376.com", true },
- { "mec0377.com", true },
- { "mec0378.com", true },
- { "mec0379.com", true },
- { "mec0391.com", true },
- { "mec0392.com", true },
- { "mec0393.com", true },
- { "mec0394.com", true },
- { "mec0395.com", true },
- { "mec0396.com", true },
- { "mec0398.com", true },
- { "mec0410.com", true },
- { "mec0411.com", true },
- { "mec0412.com", true },
- { "mec0413.com", true },
- { "mec0414.com", true },
- { "mec0415.com", true },
- { "mec0416.com", true },
- { "mec0419.com", true },
- { "mec0421.com", true },
- { "mec0429.com", true },
- { "mec0431.com", true },
- { "mec0432.com", true },
- { "mec0433.com", true },
- { "mec0434.com", true },
- { "mec0435.com", true },
- { "mec0436.com", true },
- { "mec0437.com", true },
- { "mec0438.com", true },
- { "mec0439.com", true },
- { "mec0440.com", true },
- { "mec0450.com", true },
- { "mec0451.com", true },
- { "mec0452.com", true },
- { "mec0453.com", true },
- { "mec0454.com", true },
- { "mec0455.com", true },
- { "mec0456.com", true },
- { "mec0457.com", true },
- { "mec0458.com", true },
- { "mec0459.com", true },
- { "mec0470.com", true },
- { "mec0471.com", true },
- { "mec0472.com", true },
- { "mec0473.com", true },
- { "mec0474.com", true },
- { "mec0475.com", true },
- { "mec0476.com", true },
- { "mec0477.com", true },
- { "mec0478.com", true },
- { "mec0479.com", true },
- { "mec0482.com", true },
- { "mec0483.com", true },
- { "mec0510.com", true },
- { "mec0511.com", true },
- { "mec0512.com", true },
- { "mec0513.com", true },
- { "mec0514.com", true },
- { "mec0515.com", true },
- { "mec0516.com", true },
- { "mec0517.com", true },
- { "mec0518.com", true },
- { "mec0519.com", true },
- { "mec0523.com", true },
- { "mec0530.com", true },
- { "mec0531.com", true },
- { "mec0532.com", true },
- { "mec0533.com", true },
- { "mec0534.com", true },
- { "mec0535.com", true },
- { "mec0536.com", true },
- { "mec0537.com", true },
- { "mec0538.com", true },
- { "mec0539.com", true },
- { "mec0550.com", true },
- { "mec0551.com", true },
- { "mec0552.com", true },
- { "mec0553.com", true },
- { "mec0554.com", true },
- { "mec0555.com", true },
- { "mec0556.com", true },
- { "mec0557.com", true },
- { "mec0558.com", true },
- { "mec0559.com", true },
- { "mec0561.com", true },
- { "mec0562.com", true },
- { "mec0563.com", true },
- { "mec0564.com", true },
- { "mec0565.com", true },
- { "mec0566.com", true },
- { "mec0570.com", true },
- { "mec0571.com", true },
- { "mec0572.com", true },
- { "mec0573.com", true },
- { "mec0574.com", true },
- { "mec0575.com", true },
- { "mec0576.com", true },
- { "mec0577.com", true },
- { "mec0578.com", true },
- { "mec0579.com", true },
- { "mec0580.com", true },
- { "mec0591.com", true },
- { "mec0592.com", true },
- { "mec0593.com", true },
- { "mec0594.com", true },
- { "mec0595.com", true },
- { "mec0596.com", true },
- { "mec0597.com", true },
- { "mec0598.com", true },
- { "mec0599.com", true },
- { "mec0660.com", true },
- { "mec0661.com", true },
- { "mec0662.com", true },
- { "mec0663.com", true },
- { "mec0691.com", true },
- { "mec0692.com", true },
- { "mec0701.com", true },
- { "mec0710.com", true },
- { "mec0711.com", true },
- { "mec0712.com", true },
- { "mec0713.com", true },
- { "mec0714.com", true },
- { "mec0715.com", true },
- { "mec0716.com", true },
- { "mec0717.com", true },
- { "mec0718.com", true },
- { "mec0719.com", true },
- { "mec0722.com", true },
- { "mec0724.com", true },
- { "mec0728.com", true },
- { "mec0730.com", true },
- { "mec0731.com", true },
- { "mec0732.com", true },
- { "mec0733.com", true },
- { "mec0734.com", true },
- { "mec0735.com", true },
- { "mec0736.com", true },
- { "mec0737.com", true },
- { "mec0738.com", true },
- { "mec0739.com", true },
- { "mec0743.com", true },
- { "mec0744.com", true },
- { "mec0745.com", true },
- { "mec0746.com", true },
- { "mec0751.com", true },
- { "mec0752.com", true },
- { "mec0753.com", true },
- { "mec0754.com", true },
- { "mec0755.com", true },
- { "mec0756.com", true },
- { "mec0757.com", true },
- { "mec0758.com", true },
- { "mec0759.com", true },
- { "mec0760.com", true },
- { "mec0762.com", true },
- { "mec0763.com", true },
- { "mec0765.com", true },
- { "mec0766.com", true },
- { "mec0768.com", true },
- { "mec0769.com", true },
- { "mec0770.com", true },
- { "mec0771.com", true },
- { "mec0772.com", true },
- { "mec0773.com", true },
- { "mec0774.com", true },
- { "mec0775.com", true },
- { "mec0776.com", true },
- { "mec0777.com", true },
- { "mec0778.com", true },
- { "mec0779.com", true },
- { "mec0790.com", true },
- { "mec0791.com", true },
- { "mec0792.com", true },
- { "mec0793.com", true },
- { "mec0794.com", true },
- { "mec0795.com", true },
- { "mec0796.com", true },
- { "mec0797.com", true },
- { "mec0798.com", true },
- { "mec0799.com", true },
- { "mec0810.com", true },
- { "mec0811.com", true },
- { "mec0812.com", true },
- { "mec0813.com", true },
- { "mec0814.com", true },
- { "mec0816.com", true },
- { "mec0817.com", true },
- { "mec0818.com", true },
- { "mec0819.com", true },
- { "mec0826.com", true },
- { "mec0827.com", true },
- { "mec0830.com", true },
- { "mec0831.com", true },
- { "mec0832.com", true },
- { "mec0833.com", true },
- { "mec0834.com", true },
- { "mec0835.com", true },
- { "mec0836.com", true },
- { "mec0837.com", true },
- { "mec0838.com", true },
- { "mec0839.com", true },
- { "mec0840.com", true },
- { "mec0851.com", true },
- { "mec0852.com", true },
- { "mec0853.com", true },
- { "mec0854.com", true },
- { "mec0855.com", true },
- { "mec0856.com", true },
- { "mec0857.com", true },
- { "mec0858.com", true },
- { "mec0859.com", true },
- { "mec0870.com", true },
- { "mec0871.com", true },
- { "mec0872.com", true },
- { "mec0873.com", true },
- { "mec0874.com", true },
- { "mec0875.com", true },
- { "mec0876.com", true },
- { "mec0877.com", true },
- { "mec0878.com", true },
- { "mec0879.com", true },
- { "mec0881.com", true },
- { "mec0883.com", true },
- { "mec0886.com", true },
- { "mec0887.com", true },
- { "mec0888.com", true },
- { "mec0890.com", true },
- { "mec0891.com", true },
- { "mec0898.com", true },
- { "mec0899.com", true },
- { "mec0910.com", true },
- { "mec0911.com", true },
- { "mec0912.com", true },
- { "mec0913.com", true },
- { "mec0914.com", true },
- { "mec0915.com", true },
- { "mec0916.com", true },
- { "mec0917.com", true },
- { "mec0919.com", true },
- { "mec0930.com", true },
- { "mec0931.com", true },
- { "mec0932.com", true },
- { "mec0933.com", true },
- { "mec0934.com", true },
- { "mec0935.com", true },
- { "mec0936.com", true },
- { "mec0937.com", true },
- { "mec0938.com", true },
- { "mec0941.com", true },
- { "mec0943.com", true },
- { "mec0951.com", true },
- { "mec0952.com", true },
- { "mec0953.com", true },
- { "mec0954.com", true },
- { "mec0971.com", true },
- { "mec0972.com", true },
- { "mec0973.com", true },
- { "mec0974.com", true },
- { "mec0975.com", true },
- { "mec0976.com", true },
- { "mec0977.com", true },
- { "mec0991.com", true },
- { "mec222.com", true },
- { "mec333.com", true },
- { "mec444.com", true },
- { "mec555.com", true },
- { "mec825.com", true },
- { "mec888.com", true },
- { "mec999.com", true },
- { "mecanicoautomotriz.org", true },
- { "mecaniquemondor.com", true },
- { "mechanics-schools.com", true },
- { "mechanus.io", true },
- { "mechaspartans6648.com", true },
- { "mechbattlegrounds.com", true },
- { "mechmk1.me", true },
- { "mechok.ru", true },
- { "med-colleges.com", true },
- { "med-line.cf", true },
- { "med-post.biz", true },
- { "med-post.co", true },
- { "med-post.com", true },
- { "med-post.net", true },
- { "med-post.org", true },
- { "med-postclinic.com", true },
- { "med-postdoctor.com", true },
- { "med-postdoctors.com", true },
- { "med-postemergency.com", true },
- { "med-posthealth.com", true },
- { "med-postmedical.com", true },
- { "med-postphysicians.com", true },
- { "med-postwellness.com", true },
- { "med.tips", true },
- { "med360.at", true },
- { "medalofvalor.gov", true },
- { "medasset.gr", true },
- { "medba.se", true },
- { "medbreaker-friends.at", true },
- { "medcir.com.br", true },
- { "medcorfu.gr", true },
- { "medcrowd.com", true },
- { "meddelare.com", true },
- { "meddigital.com", false },
- { "meddin.com", true },
- { "medecinchinois.be", true },
- { "medeinos.lt", true },
- { "medeurope.info", true },
- { "medexpress.co.uk", true },
- { "medguide-bg.com", true },
- { "medi.com.br", true },
- { "media-instance.ru", true },
- { "media-library.co.uk", true },
- { "media-pi.com", true },
- { "media-serwis.com", true },
- { "media-store.ir", true },
- { "mediaarea.net", true },
- { "mediabackoffice.co.jp", true },
- { "mediablaster.com", true },
- { "mediabogen.net", true },
- { "mediabookdb.de", true },
- { "mediaburst.co.uk", true },
- { "mediacloud.me", true },
- { "mediadex.be", true },
- { "mediafamous.com", true },
- { "mediafart.fr", true },
- { "mediafly.com", true },
- { "mediagenic.ch", false },
- { "mediagrand.net", true },
- { "mediajurnal.com", true },
- { "medialab.nrw", true },
- { "mediapart.fr", true },
- { "mediapath.gr", true },
- { "mediarithmics.com", true },
- { "mediarithmics.io", true },
- { "mediaselection.eu", true },
- { "mediathekview.de", true },
- { "mediation-mv.de", true },
- { "mediatorzy.waw.pl", true },
- { "mediaukkies.nl", true },
- { "mediawijsheid.nl", true },
- { "mediawijzer.net", true },
- { "mediawiki.org", true },
- { "mediawin.pl", true },
- { "medical-assistant-colleges.com", true },
- { "medicalabroad.org", false },
- { "medicalcountermeasures.gov", true },
- { "medicaltools.de", true },
- { "medicare-providers.net", true },
- { "medicarecoveragefinder.com", true },
- { "medicareful.com", true },
- { "medicareinfo.org", true },
- { "medichat.ml", true },
- { "medicine.com", true },
- { "medicinia.com.br", true },
- { "mediciventures.com", true },
- { "medicm.jp", true },
- { "medicocompetente.it", true },
- { "medicoleads.com", true },
- { "medicoresponde.com.br", true },
- { "medicsz.co", true },
- { "medictools.de", true },
- { "medienweite.de", true },
- { "medifirst.de", true },
- { "medigap-quote.net", true },
- { "medik8.com.cy", true },
- { "medikalakademi.com.tr", true },
- { "medikuma.com", true },
- { "medino.com", true },
- { "medinside.ch", true },
- { "medinside.li", true },
- { "medinsider.ch", true },
- { "medinsider.li", true },
- { "medirota.com", true },
- { "meditadvisors.com", true },
- { "meditarenargentina.org", true },
- { "meditation-rennes.org", true },
- { "meditel.nl", true },
- { "medium.com", true },
- { "medivox.tk", true },
- { "medja.net", true },
- { "medlineplus.gov", true },
- { "medo64.com", true },
- { "medovea.ru", true },
- { "medpeer.co.jp", true },
- { "medpeer.jp", true },
- { "medpics.com", true },
- { "medpost.biz", true },
- { "medpost.co", true },
- { "medpost.info", true },
- { "medpost.me", true },
- { "medpost.mobi", true },
- { "medpost.tv", true },
- { "medpost.us", true },
- { "medpostcare.com", true },
- { "medpostclinic.com", true },
- { "medpostdoctor.com", true },
- { "medpostdoctors.com", true },
- { "medpostemergency.com", true },
- { "medpostexpresscare.com", true },
- { "medposthealth.com", true },
- { "medposthealthcare.com", true },
- { "medpostimmediatecare.com", true },
- { "medpostmedical.com", true },
- { "medpostphysicians.com", true },
- { "medposturgentcare.biz", true },
- { "medposturgentcare.co", true },
- { "medposturgentcare.com", true },
- { "medposturgentcare.info", true },
- { "medposturgentcare.net", true },
- { "medposturgentcare.org", true },
- { "medpostwalkincare.com", true },
- { "medpostwellness.com", true },
- { "medsblalabs.com", true },
- { "medschat.com", true },
- { "medsourcelabs.com", true },
- { "medstatix.co", true },
- { "medtalents.ch", true },
- { "medtehnika.ua", true },
- { "medtip.de", true },
- { "medunovi.com", true },
- { "medusa.wtf", true },
- { "meduza.io", true },
- { "medvedikorenka.cz", true },
- { "medvedivka.tk", true },
- { "medvedkovo-hovrino.ru", true },
- { "medvet.com.es", true },
- { "medwaybouncycastlehire.co.uk", true },
- { "medyotan.ga", true },
- { "meedoenhartvanwestbrabant.nl", false },
- { "meekhak.com", true },
- { "meerman.nl", true },
- { "meermantechnischburo.nl", true },
- { "meerutcake.com", true },
- { "meet.google.com", true },
- { "meetawesomepeople.net", true },
- { "meetbot.fedoraproject.org", true },
- { "meetfranz.com", true },
- { "meetingapplication.com", true },
- { "meetingmanage.nl", true },
- { "meetingmanager.ovh", true },
- { "meetmygoods.com", true },
- { "meetscompany.jp", true },
- { "meeusen-usedcars.be", false },
- { "meevo.ca", true },
- { "meeztertom.nl", true },
- { "meg-a-bounce.co.uk", true },
- { "mega-byte.nl", true },
- { "mega-loteria.com", true },
- { "mega.co.nz", true },
- { "megabounce.co.uk", true },
- { "megabounceni.co.uk", true },
- { "megabouncingcastles.com", true },
- { "megaelettrostimolatore.com", true },
- { "megaflix.nl", true },
- { "megaflowers.ru", true },
- { "megagifs.de", true },
- { "megaherz.tk", true },
- { "megainflatables.co.uk", true },
- { "megakoncert90.cz", true },
- { "megamisja.pl", true },
- { "megamp3.eu", true },
- { "meganandmarc.us", true },
- { "meganreel.com", true },
- { "meganruggiero.com", true },
- { "megapixel.cz", true },
- { "megapl.ru", true },
- { "megaplan.cz", true },
- { "megaportal.ga", true },
- { "megarex.jp", true },
- { "megaron.at", true },
- { "megatravel.com.mx", true },
- { "megauction.tk", true },
- { "megawarez.org", true },
- { "megawebsite.tk", true },
- { "megaxchange.com", true },
- { "megaxchange.org", true },
- { "megayachts.world", true },
- { "meginajums1.space", true },
- { "mego.cloud", true },
- { "megumico.net", true },
- { "megztosidejos.lt", true },
- { "meh.is", true },
- { "mehalick.com", true },
- { "mehdibouchema.be", true },
- { "mehdimassage.com", true },
- { "meherbaba.sk", true },
- { "meherpurnews.com", true },
- { "mehhh.xyz", true },
- { "mehibo.tk", true },
- { "mehmetakif.edu.tr", true },
- { "mehmetince.net", true },
- { "mehode.com", true },
- { "mehostdd.com", false },
- { "mehr-schulferien.de", true },
- { "mehrleben.at", true },
- { "mehrnevesht.com", true },
- { "mehrwert.de", true },
- { "mehvix.com", true },
- { "meia.ir", true },
- { "meidev.co", true },
- { "meierhofer.net", true },
- { "meikampf.de", true },
- { "meiksbar.de", true },
- { "meillard-auto-ecole.ch", true },
- { "meilleur.info", true },
- { "meilleursavis.fr", true },
- { "meilleursjeuxporno.fr", true },
- { "meilleurstrucs.com", true },
- { "mein-domizil.at", true },
- { "mein-gehalt.at", true },
- { "mein-kuechenhelfer.de", true },
- { "mein-muehlhausen.bayern", true },
- { "mein-tortenladen.de", true },
- { "meinbetriebsrat24.de", true },
- { "meincenter-meinemeinung.de", true },
- { "meincoach.at", true },
- { "meine-cloud-online.de", true },
- { "meine-email-im.net", true },
- { "meine-finanzanalyse.de", true },
- { "meine-immofinanzierung.de", true },
- { "meineit.dvag", true },
- { "meinephbern.ch", true },
- { "meinewolke.pw", true },
- { "meinezwangsversteigerung.de", true },
- { "meinheizstrom.de", true },
- { "meintragebaby.de", true },
- { "meinv.asia", true },
- { "meiobit.com", true },
- { "meiodomato.com.br", true },
- { "meiqia.com", true },
- { "meisterlabs.com", true },
- { "meistertask.com", true },
- { "meitan.gz.cn", true },
- { "mekaleskirit.tk", true },
- { "mekanika.com.my", true },
- { "mekatrotekno.com", true },
- { "mekesh.com", true },
- { "mekesh.net", true },
- { "meklon.net", true },
- { "melania-voyance.fr", false },
- { "melanieschweiger.com", true },
- { "melatonin.fun", true },
- { "melbourne.dating", true },
- { "melcher.it", true },
- { "melchizedek-forum.de", true },
- { "melda-agustin.tk", true },
- { "melda.ru", true },
- { "meldcode-assistent.nl", true },
- { "meldpuntemma.nl", true },
- { "melearning.university", false },
- { "melhoresdominios.com", true },
- { "melhoresmarcasdenotebook.com.br", true },
- { "meliggemert.nl", true },
- { "melihacar.com.tr", true },
- { "melillaorienta.es", true },
- { "melina-schefczyk.de", true },
- { "meliowebweer.nl", true },
- { "melissaadkins.com", true },
- { "melissameuwszen.nl", true },
- { "meliyb.ga", true },
- { "mellonne.com", true },
- { "melnessgroup.com", true },
- { "melnikov.ch", true },
- { "melodict.com", true },
- { "melodiouscode.co.uk", true },
- { "melodiouscode.com", true },
- { "melodiouscode.net", true },
- { "melodiouscode.uk", true },
- { "melodrom.de", true },
- { "melodyjane.com", true },
- { "meloniecharm.com", true },
- { "melopie.com", true },
- { "melosyne.com", true },
- { "melosyne.de", true },
- { "melosyne.net", true },
- { "melosyne.org", true },
- { "meltzow.net", true },
- { "membercents.com", true },
- { "memberhk.com", true },
- { "members-arbourlake.com", true },
- { "members-only-shopping.com", true },
- { "members.nearlyfreespeech.net", false },
- { "membersense.com", true },
- { "membershipservices.org.uk", true },
- { "meme-photostudio.com.tw", true },
- { "meme.fi", true },
- { "meme.institute", true },
- { "memememememememe.me", true },
- { "memento-mori.cf", true },
- { "memes.nz", true },
- { "memesbee.com", true },
- { "memind.net", true },
- { "memiux.com", true },
- { "memo-linux.com", true },
- { "memo.ee", true },
- { "memo2ch.com", true },
- { "memoire-resistance-ariege.fr", true },
- { "memoirmedie.dk", true },
- { "memoriadeunaciudadzccm2019.com", true },
- { "memorind.com", true },
- { "memoryex.net", true },
- { "mempool.de", true },
- { "memrise.com", true },
- { "menanwc.org", true },
- { "menden.com", true },
- { "mendipbouncycastles.co.uk", true },
- { "mendy.jp", true },
- { "menielias.com", true },
- { "menn.tk", true },
- { "mennace.com", true },
- { "menno.me", true },
- { "menole.com", true },
- { "menole.de", true },
- { "menole.net", true },
- { "menotag.com", true },
- { "mens-v.com", true },
- { "mensagemaniversario.com.br", true },
- { "mensagemdaluz.com", true },
- { "mensagensaniversario.com.br", true },
- { "mensagensdeconforto.com.br", true },
- { "mensarena.gr", true },
- { "mensch-peter.me", true },
- { "mentalcalculations.tk", true },
- { "mentalcraft.tk", true },
- { "mentalhealthmn.org", true },
- { "mentaltraining-fuer-musiker.ch", true },
- { "mentecuriosa.net", true },
- { "menthiere.fr", true },
- { "mentiq.az", true },
- { "mentita.de", true },
- { "mentup.com.br", true },
- { "menzietti.it", true },
- { "meo.de", true },
- { "meodihoang.com", true },
- { "meow.plus", true },
- { "mepambalaj.com", true },
- { "mephedrone.org", true },
- { "meps.net", true },
- { "merakiclub.com", true },
- { "merakilp.com", true },
- { "meralda.eu", true },
- { "meralda.net", true },
- { "meralda.org", true },
- { "meraldamulder.com", true },
- { "meraldamulder.eu", true },
- { "meraldamulder.net", true },
- { "meraldamulder.org", true },
- { "meran.in", true },
- { "meransuedtirol.com", true },
- { "meraseo.com", true },
- { "mercadohype.tk", true },
- { "mercadoleal.com.br", true },
- { "mercadopago.com", true },
- { "mercadosex.com.br", true },
- { "mercamaris.es", true },
- { "mercari.com", true },
- { "mercatoitticosbt.it", true },
- { "mercedes-benz-arena-stuttgart.de", true },
- { "mercedes-benz-kiev.com", true },
- { "mercedes-ig.de", true },
- { "mercedobem.com.br", true },
- { "merchant-automotive.com", true },
- { "merchant.agency", true },
- { "merchcity.com", true },
- { "mercici.com", true },
- { "mercredifiction.io", true },
- { "mercury.photo", true },
- { "mercuryamericas.com", false },
- { "merdacz.pl", true },
- { "meremeti-online.gr", true },
- { "merenbach.com", true },
- { "merenita.com", true },
- { "merenita.eu", true },
- { "merenita.net", true },
- { "merenita.nl", true },
- { "meric-graphisme.info", true },
- { "meridanas.me", true },
- { "meridianenvironmental.com", true },
- { "meridianmetals.com", true },
- { "meridianoshop.com.br", true },
- { "merkel.li", true },
- { "merkel.me", true },
- { "merlet.eu", true },
- { "merlin-memorial.de", true },
- { "merlinsoap.com", true },
- { "merojob.com", true },
- { "meronberry.jp", true },
- { "merpay.com", true },
- { "merson.org", true },
- { "merson.tv", true },
- { "mertak.cz", true },
- { "mertarauh.com", true },
- { "mertcangokgoz.com", true },
- { "meruri.com", true },
- { "merza.is", true },
- { "mes-bouquins.fr", true },
- { "mesappros.com", true },
- { "mescaline.com", true },
- { "mescaline.org", true },
- { "mesec.cz", true },
- { "mesh.gov", true },
- { "mesh.org.ua", true },
- { "meshok.info", true },
- { "mesicka.com", false },
- { "meskiukas.tk", true },
- { "mesotheliomacentre.tk", true },
- { "messagescelestes-archives.ca", true },
- { "messagevortex.com", true },
- { "messagevortex.net", true },
- { "messdorferfeld.de", true },
- { "messenger.co.tz", true },
- { "messenger.com", false },
- { "messengerwebbrands.com", true },
- { "messer24.ch", true },
- { "messymom.com", true },
- { "mestazitrka.cz", true },
- { "mesvision.com", true },
- { "meta-db.com", true },
- { "meta-word.com", true },
- { "meta4.be", true },
- { "metachris.com", true },
- { "metacoda.com", true },
- { "metacode.biz", true },
- { "metacompliance.com", true },
- { "metacortex.cf", true },
- { "metadata.be", true },
- { "metadedi.net", true },
- { "metafurquest.net", true },
- { "metaglyphics.com", true },
- { "metainnovative.net", true },
- { "metakari.one", true },
- { "metal-rock.tk", true },
- { "metalartbylaser.com.au", true },
- { "metalempire.tk", true },
- { "metaljournal.tk", true },
- { "metaljunkiez.com", true },
- { "metalliran.tk", true },
- { "metallobaza.ml", true },
- { "metallomania.it", true },
- { "metallosajding.ru", true },
- { "metalu.ch", false },
- { "metanic.services", true },
- { "metanodo.com", true },
- { "metanumbers.com", true },
- { "metapeen.nl", true },
- { "metasquare.com.au", true },
- { "metasquare.nyc", true },
- { "metasurfforecast.com", true },
- { "metasyntactic.xyz", true },
- { "metaurl.io", true },
- { "metaword.com", true },
- { "metaword.net", true },
- { "metaword.org", true },
- { "metebalci.com", false },
- { "meteenonline.nl", true },
- { "meteobox.co", true },
- { "meteobox.cz", true },
- { "meteobox.de", true },
- { "meteobox.es", true },
- { "meteobox.fr", true },
- { "meteobox.mx", true },
- { "meteobox.pl", true },
- { "meteobox.sk", true },
- { "meteobox.tk", true },
- { "meteocat.net", true },
- { "meteorapp.space", true },
- { "meteorites-for-sale.com", true },
- { "meteorologiaenred.com", true },
- { "meteosmit.it", true },
- { "meterhost.com", true },
- { "methamphetamine.co.uk", true },
- { "method.com", true },
- { "methodfactory.com", true },
- { "methylone.com", true },
- { "metod.photo", true },
- { "metric.ai", true },
- { "metricmutt.com", true },
- { "metro-lawn-care.com", true },
- { "metro-web.net", true },
- { "metroairvirtual.com", true },
- { "metrobriefs.com", true },
- { "metrocarremovals.com", true },
- { "metrodemaracaibo.tk", true },
- { "metrodetroitmommy.com", true },
- { "metrolaut.de", true },
- { "metron-online.com", true },
- { "metronaut.de", true },
- { "metropop.ch", false },
- { "metrorealestatepros.com", true },
- { "metsasta.com", true },
- { "mettekopp.dk", true },
- { "metzgermark.com", true },
- { "meugamer.com", true },
- { "meujeitodigital.com.br", false },
- { "meurisse.org", true },
- { "mevanshop.com", false },
- { "mevo.xyz", true },
- { "mevsim.com", true },
- { "mexican.dating", true },
- { "mexicanjokes.net", true },
- { "mexico.rs", true },
- { "mexico.sh", true },
- { "mexicotopescorts.com", true },
- { "meys.io", true },
- { "mezedokamomata.tk", true },
- { "mezinfo.tk", true },
- { "mezzehuis.be", true },
- { "mf-fischer.de", true },
- { "mfen.de", true },
- { "mfischer-it.de", true },
- { "mfits.co.uk", true },
- { "mflodin.se", true },
- { "mfxbe.de", true },
- { "mgae.com", true },
- { "mgcraft.net", true },
- { "mgdigitalmarketing.com.au", true },
- { "mghw.ch", true },
- { "mgi.gov", true },
- { "mgiljum.com", true },
- { "mgmultiservicessrl.it", true },
- { "mgonline.tk", true },
- { "mgrossklaus.de", false },
- { "mgrt.net", true },
- { "mgsdb.com", true },
- { "mgsisk.com", true },
- { "mgtbaas.eu", true },
- { "mgvideo.com.au", true },
- { "mhabdullah.tk", true },
- { "mhadot.com", true },
- { "mhalfter.de", true },
- { "mhand.org", true },
- { "mhatero.com", true },
- { "mhatlaw.com", true },
- { "mhcdesignstudio.com", true },
- { "mheistermann.de", true },
- { "mhermans.nl", true },
- { "mhf.gc.ca", true },
- { "mhi.web.id", true },
- { "mhonline.fr", true },
- { "mhtdesign.net", true },
- { "mhurologytriad.org", true },
- { "mi-beratung.de", true },
- { "mi-so-ji.com", true },
- { "mi1k.cn", true },
- { "mi80.com", true },
- { "mi92.ru", true },
- { "mia.tw", true },
- { "miacordeonstereo.com", true },
- { "miadennees.com", true },
- { "miagexport.com", true },
- { "mialquilerdecoches.com", true },
- { "miamiaquatours.com", true },
- { "miaomiao.eu.org", true },
- { "miaowo.org", true },
- { "miapuntes.com", true },
- { "miasarafina.de", true },
- { "miasonne.com", true },
- { "miavierra.org", true },
- { "mibh.de", true },
- { "mibuiin.com", true },
- { "mica.ml", true },
- { "micalodeal.ch", false },
- { "micbase.com", true },
- { "michadenheijer.com", true },
- { "michael-schefczyk.de", true },
- { "michael-steinhauer.eu", true },
- { "michaelasawyer.com", true },
- { "michaelband.com", true },
- { "michaelbeer.co.uk", true },
- { "michaelcullen.name", true },
- { "michaeldg.be", true },
- { "michaelhrehor.com", true },
- { "michaelismold.com", true },
- { "michaelizquierdo.com", true },
- { "michaeljacksonforsale.com", true },
- { "michaeljdennis.com", true },
- { "michaelklos.nl", true },
- { "michaelkuchta.me", true },
- { "michaell.io", true },
- { "michaell.xyz", true },
- { "michaelleibundgut.com", true },
- { "michaelloveys.com", true },
- { "michaelpelletterie.it", true },
- { "michaelpfrommer.de", true },
- { "michaelpfrommer.pub", true },
- { "michaelschmidt.ch", true },
- { "michaelschubert.com", true },
- { "michaelsweater.com", true },
- { "michaeltaboada.me", true },
- { "michaeltroger.com", true },
- { "michaeltruskowski.com", true },
- { "michaelwermeester.com", true },
- { "michal-klabnik.com", true },
- { "michal-klabnik.cz", true },
- { "michal-s.net", true },
- { "michal-spacek.com", true },
- { "michal-spacek.cz", true },
- { "michaldudek.it", true },
- { "michalis.xyz", true },
- { "michalklabnik.com", true },
- { "michalklabnik.cz", true },
- { "michalspacek.com", true },
- { "michalspacek.cz", true },
- { "michalwiglasz.cz", true },
- { "michaonline.de", true },
- { "michel-wein.de", true },
- { "michele.ga", true },
- { "michele.ml", true },
- { "michellavat.com", true },
- { "michelletmc.com", true },
- { "michelskovbo.dk", true },
- { "michelwolf.ch", true },
- { "michiganstateuniversityonline.com", true },
- { "michiganunionoptout.com", true },
- { "michilaw.com", true },
- { "michmexguides.com.mx", true },
- { "michu.pl", true },
- { "mickelvaessen.com", true },
- { "mickgrimesgamingpodcast.co.uk", true },
- { "micluz.shop", true },
- { "micoff.tk", true },
- { "miconcinemas.com", true },
- { "micontractortraining.com", true },
- { "micopal.com", true },
- { "micr0lab.org", true },
- { "micra.org.uk", true },
- { "microbiote-insectes-vecteurs.group", true },
- { "microco.sm", true },
- { "microcomploja.com.br", true },
- { "microdots.de", true },
- { "microjournal.xyz", true },
- { "microjovem.pt", true },
- { "microlog.org", true },
- { "micromata.de", true },
- { "micromegas.com.ua", true },
- { "microneedlingstudio.se", true },
- { "micropigpets.com", true },
- { "microsoftaffiliates.azurewebsites.net", true },
- { "microsoftedgeinsider.com", true },
- { "microvb.com", true },
- { "microwavezone.com", true },
- { "microwesen.de", true },
- { "microzubr.com", true },
- { "micsell.com", true },
- { "midair.io", true },
- { "midamericapiering.com", true },
- { "midart.ro", true },
- { "midasjewellery.com.au", true },
- { "midcarolinaregionalairport.com", true },
- { "midcarolinaregionalairport.org", true },
- { "middletonshoppingcentre.co.uk", true },
- { "midgawash.com", true },
- { "midiaid.de", true },
- { "midistop.org", true },
- { "midkam.ca", true },
- { "midlandgate.de", true },
- { "midlandsfundays.co.uk", true },
- { "midlandslotus.co.uk", true },
- { "midlandsphotobooths.co.uk", true },
- { "midnight-gaming-community.tk", true },
- { "midnight-visions.de", true },
- { "midnightmango.co.uk", true },
- { "midnightmango.de", true },
- { "midnightmechanism.com", true },
- { "midrandplumber24-7.co.za", true },
- { "midrandrubbleremovals.co.za", true },
- { "midstatebasement.com", true },
- { "midterm.us", true },
- { "midwayrecovery.com", true },
- { "midweb.ro", false },
- { "midwestbloggers.org", true },
- { "miegl.com", true },
- { "miegl.cz", true },
- { "mieldemexico.us", true },
- { "miemus.eu", true },
- { "mieresabadus.ro", true },
- { "mierloiu.ro", true },
- { "mietwohnungen-vermietung.com", true },
- { "mieuxgrandir.ch", false },
- { "mifarmaciaenbarcelona.com", true },
- { "miffy.me", true },
- { "mig5.net", true },
- { "miggy.org", true },
- { "mightybit.co", true },
- { "mightysighty.com", true },
- { "miguel.pw", true },
- { "migueldemoura.com", true },
- { "migueldominguez.ch", false },
- { "miguelgaton.es", true },
- { "miguelito.tk", true },
- { "miguelkertsman.com", true },
- { "miguelmartinez.ch", false },
- { "miguelmenendez.pro", true },
- { "miguelmoura.com", true },
- { "miguia.tv", true },
- { "mihalicka.com", true },
- { "mihgroup.net", true },
- { "mihnea.net", true },
- { "mijailovic.net", true },
- { "mijam.xyz", true },
- { "mijcorijneveld.nl", true },
- { "mijn-financien.be", true },
- { "mijn.computer", true },
- { "mijnbeijesweb.nl", true },
- { "mijnetz.nl", false },
- { "mijngeldcoach.nl", true },
- { "mijnkantoor.net", true },
- { "mijnkerstkaarten.be", true },
- { "mijnkinderkleding.com", true },
- { "mijnkwadraad.nl", true },
- { "mijnnaamdag.nl", true },
- { "mijnpartijhandel.nl", true },
- { "mijnreisoverzicht.nl", true },
- { "mijnstembureau.nl", true },
- { "mijntelefoonboek.com", true },
- { "mijntransacties.nl", true },
- { "mika.moe", true },
- { "mikadoe.nl", true },
- { "mikaeljansson.net", true },
- { "mikaelvesavuori.se", true },
- { "mikakalathil.ca", true },
- { "mikakalevi.com", true },
- { "mikalikes.men", true },
- { "mike-bland.com", true },
- { "mike-burns.com", true },
- { "mike-et-pascale-sanger.com", true },
- { "mike2k.de", true },
- { "mikeandersondj.com", true },
- { "mikebelanger.ca", true },
- { "mikebutcher.ca", true },
- { "mikecameronyyc.com", true },
- { "mikecapson.com", true },
- { "mikecb.org", true },
- { "mikechasejr.tk", true },
- { "mikedhoore.be", true },
- { "mikegerwitz.com", true },
- { "mikeguy.co.uk", true },
- { "mikehamburg.com", true },
- { "mikeklidjian.com", true },
- { "mikekreuzer.com", true },
- { "mikemooresales.com", true },
- { "mikeprocopio.com", true },
- { "mikerichards.gallery", true },
- { "mikerichards.photography", true },
- { "mikerichards.photos", true },
- { "mikerichards.pictures", true },
- { "mikerichardsphotography.com", true },
- { "mikesystems.tk", true },
- { "miketabor.com", true },
- { "miketheuer.com", true },
- { "mikethiessen.net", true },
- { "mikevesch.com", true },
- { "mikewillia.ms", true },
- { "mikewrites.online", true },
- { "miki.it", true },
- { "mikkei.space", true },
- { "mikkelladegaard.dk", false },
- { "mikkelscheike.com", true },
- { "mikkonen.bio", true },
- { "miklagard.dk", true },
- { "miklcct.com", true },
- { "mikmik.co.il", true },
- { "miknight.com", true },
- { "mikropixel.de", true },
- { "mikywow.eu", true },
- { "milahendri.com", true },
- { "milakirschner.de", true },
- { "milan-news.ml", true },
- { "milania.de", true },
- { "milanstephan.de", false },
- { "milavica.tk", true },
- { "milcahsmusings.com", true },
- { "milcarteles.com", true },
- { "mileme.com", true },
- { "milenaria.es", true },
- { "milesapart.dating", true },
- { "milfhubs.com", true },
- { "milfpornograph.com", true },
- { "milhoazul.com.br", true },
- { "milieuland.com", true },
- { "militaryonesource.mil", true },
- { "militarysrit.tk", true },
- { "milkaalpesiutazas.hu", true },
- { "milkagyengedseg.hu", true },
- { "milkameglepetes.hu", true },
- { "milkandbourbons.com", true },
- { "milkingit.co.uk", true },
- { "milkingit.net", true },
- { "milkmoovement.io", true },
- { "milktea.info", false },
- { "milkypond.org", true },
- { "mill.ml", true },
- { "milldyke.com", true },
- { "milldyke.nl", true },
- { "millefleurs.eu", true },
- { "millennium-thisiswhoweare.net", true },
- { "millenniumstem.org", true },
- { "millenniumweb.com", false },
- { "milleron.net", true },
- { "milleron.xyz", true },
- { "millersminibarns.com", true },
- { "millerwalker.com", true },
- { "millettable.com", true },
- { "millhousenchurch.com", true },
- { "millionen-von-sonnen.de", true },
- { "millipore-alternative.com", true },
- { "millistream.com", true },
- { "mim.am", true },
- { "mimavision.ddns.net", true },
- { "mimemo.io", true },
- { "mimemoriadepez.com", true },
- { "mimeo.digital", true },
- { "mimithedog.com", true },
- { "mimmog.it", true },
- { "mimocad.io", true },
- { "mimolo.de", true },
- { "mimovrste.com", true },
- { "min-datorsupport.se", true },
- { "min-sky.no", true },
- { "minaio.tk", true },
- { "minakov.pro", true },
- { "minami.xyz", true },
- { "minamo.io", true },
- { "minandolacorrupcion.mx", true },
- { "minapin.com", true },
- { "minaprine.com", true },
- { "mind-books.gq", true },
- { "mind-box.ch", false },
- { "mind-hochschul-netzwerk.de", true },
- { "mindatasupport.nu", true },
- { "mindatasupport.se", true },
- { "mindatorsupport.se", true },
- { "mindbounce.com", true },
- { "mindcms.nl", true },
- { "mindcoding.ro", true },
- { "minddrive.cf", true },
- { "mindfactory.de", true },
- { "mindhunter.info", true },
- { "mindleaking.org", true },
- { "mindmax.fi", true },
- { "mindmeister.com", true },
- { "mindmusic.online", true },
- { "mindoktor.se", false },
- { "mindorbs.com", true },
- { "mindstretchers.co.uk", true },
- { "mine-craftlife.com", true },
- { "mine-pixl.de", true },
- { "mine260309.me", false },
- { "minebier.dk", true },
- { "minecraft-forum.eu", true },
- { "minecraft-server.eu", true },
- { "minecraft.gen.tr", true },
- { "minecraftforum.de", true },
- { "minecraftforum.ovh", true },
- { "minecraftjson.com", false },
- { "minecraftstal.com", true },
- { "minehattan.de", true },
- { "minehub.de", true },
- { "minei.me", true },
- { "minepack.net", true },
- { "minepay.net", true },
- { "minepic.org", true },
- { "minerstat.com", true },
- { "minerva2015.it", true },
- { "minervacars.com", true },
- { "minesouls.fr", true },
- { "minetracker.dk", true },
- { "minez-nightswatch.com", false },
- { "minfin.gov.ua", true },
- { "mingky.net", true },
- { "mingkyaa.com", true },
- { "mingming.info", true },
- { "mingram.net", true },
- { "mingtreerealty.com", true },
- { "mingwah.ch", false },
- { "minh.at", false },
- { "minhng99.cloud", true },
- { "minhyukpark.com", true },
- { "mini-piraten.de", true },
- { "mini2.fi", true },
- { "miniaturepets.net", true },
- { "minibaggerverleih-aulendorf.de", true },
- { "minibrewery.cf", true },
- { "minican.net", true },
- { "miniclip.com", true },
- { "minigames.com", true },
- { "minigolf-reisinger.com", true },
- { "minigolfandgames.co.uk", true },
- { "minikidz.es", true },
- { "minikin.tk", true },
- { "minikneet.com", true },
- { "minilions.fr", true },
- { "minimal-apps.de", true },
- { "minimalistbaker.com", true },
- { "minimalmx.io", true },
- { "minimaltimer.com", true },
- { "minimayhemsoftplay.co.uk", true },
- { "minimbah.com.au", true },
- { "minimvc.com", true },
- { "mining.diamonds", true },
- { "miniskipper.at", true },
- { "minisoft4u.ir", true },
- { "ministeriumfuerinternet.de", true },
- { "minitruckin.net", true },
- { "minitrucktalk.com", true },
- { "miniwaplus.com", true },
- { "mink-coat.tk", true },
- { "minkymoon.jp", true },
- { "minmaxgame.com", true },
- { "minnesotakinkyyouth.org", true },
- { "minnesotareadingcorps.org", true },
- { "minnit.chat", true },
- { "minor.news", true },
- { "minoritywhip.gov", false },
- { "minorshadows.net", true },
- { "minpingvin.dk", true },
- { "minschuns.ch", true },
- { "mintclass.com", true },
- { "minton.systems", true },
- { "mintrak2.com", true },
- { "mintse.com", true },
- { "minu.link", true },
- { "minube.co.cr", true },
- { "minutashop.ru", true },
- { "minux.info", true },
- { "mio-ip.ch", true },
- { "mionerve.com", true },
- { "mionerve.org", true },
- { "mipapo.de", true },
- { "mipasevip.com", true },
- { "mipnet.cl", true },
- { "miproximopaso.org", true },
- { "mir-faktov.tk", true },
- { "mir-multimedia.tk", true },
- { "mir-pressy.ga", true },
- { "mir.pe", true },
- { "mirabalphoto.es", true },
- { "miragg.cf", true },
- { "miraheze.org", true },
- { "miraidenshi.com", true },
- { "miraiex.com", false },
- { "miramar-obgyn.com", true },
- { "miramar.ca", true },
- { "miravelli.ro", true },
- { "mircarfinder.ru", true },
- { "mirch.com", true },
- { "mireiaseuba.com", true },
- { "mirepublic.co.nz", true },
- { "mireservaonline.es", true },
- { "mirfire.com", false },
- { "mirjamderijk.nl", true },
- { "mirknighechek.tk", true },
- { "mirkofranz.de", true },
- { "mirkvartir.tk", true },
- { "mirokon.tk", true },
- { "mironet.cz", true },
- { "miroslavbaka.cz", true },
- { "mirrordream.net", true },
- { "mirrorsedgearchive.de", true },
- { "mirshak.com", false },
- { "mirtes.cz", true },
- { "mirtouf.fr", true },
- { "misakacloud.net", true },
- { "misakatang.cn", false },
- { "misakiya.co.jp", true },
- { "misanci.cz", true },
- { "misclick.nl", true },
- { "misfit-media.com", true },
- { "mishkan-israel.net", true },
- { "mishkovskyi.net", true },
- { "misinstrumentos.com", true },
- { "miskatonic.org", true },
- { "misoji-resist.com", true },
- { "misp-project.org", true },
- { "miss-alisa.com", true },
- { "miss-inventory.co.uk", true },
- { "miss-platinum.net", true },
- { "miss.com.tw", true },
- { "miss.sh", true },
- { "missaocadastrobv.com.br", true },
- { "missblisshair.com.au", true },
- { "missdream.org", true },
- { "misseguf.dk", true },
- { "missguidedus.com", true },
- { "mission-orange.de", true },
- { "missionpuppy.nl", true },
- { "missionsgemeinde.de", true },
- { "missip.nl", true },
- { "missivystorm.com", true },
- { "misskey.jp", true },
- { "missmaid.co.uk", true },
- { "missmaid.com", true },
- { "missualready.com", true },
- { "missyou.link", true },
- { "mist79.ru", true },
- { "mistacms.com", true },
- { "mistaken.pl", true },
- { "mister-matthew.de", true },
- { "misterandersson.com", true },
- { "misterseguros.com.br", true },
- { "mistlake.net", true },
- { "mistreaded.com", true },
- { "mistybox.com", true },
- { "misupport.dk", true },
- { "misuzu.moe", true },
- { "mit-dem-rad-zur-arbeit.de", true },
- { "mit-dem-rad-zur-uni.de", true },
- { "mit-uns.org", true },
- { "mitarbeitermotivation-anleitungen.de", true },
- { "mitchellhandymanservices.co.uk", true },
- { "mitchelmore.ca", true },
- { "mitdip-mit-group-ch.azurewebsites.net", true },
- { "mitfx.com", true },
- { "mithgol.tk", true },
- { "miticobikes.com", true },
- { "mitnetz-gas.de", true },
- { "mitnetz-strom.de", true },
- { "mitratech.com.br", true },
- { "mitrax.com.br", true },
- { "mitre10.com.au", false },
- { "mitrecaasd.org", true },
- { "mitremai.org", true },
- { "mitrostudios.com", true },
- { "mitsonnenbrillen.de", true },
- { "mitsubishi-club.ge", true },
- { "mitsukabose.com", true },
- { "mittagonggardencentre.com.au", true },
- { "mittbolan.se", true },
- { "mittelalter-lexikon.de", true },
- { "mittwoch-nacht.net", true },
- { "mitzpettel.com", true },
- { "miui-germany.de", true },
- { "mivm.cn", true },
- { "mivzak.im", true },
- { "mivzakim.biz", true },
- { "mivzakim.cf", true },
- { "mivzakim.ga", true },
- { "mivzakim.gq", true },
- { "mivzakim.info", true },
- { "mivzakim.ml", true },
- { "mivzakim.mobi", true },
- { "mivzakim.net", true },
- { "mivzakim.org", true },
- { "mivzakim.tk", true },
- { "mivzakim.tv", true },
- { "miweb.cr", false },
- { "miwebmadrid.es", true },
- { "mix-channel.ml", true },
- { "mix-recruit.jp", true },
- { "mixedreality.football", true },
- { "mixedrecipe.com", true },
- { "mixify.ga", true },
- { "mixinglight.com", true },
- { "mixmister.com", true },
- { "mixmix.tk", true },
- { "mixposure.com", true },
- { "mixtafrica.com", true },
- { "mixx.com.hk", true },
- { "miyanaga.tech", true },
- { "miyatakaikei.com", true },
- { "miyatore.com", true },
- { "miyugirls.com", true },
- { "mizoey.se", true },
- { "mizque.ch", true },
- { "mizternational.com", true },
- { "mizu.coffee", true },
- { "mizucoffee.net", true },
- { "mizuhobank.co.id", true },
- { "mj420.com", true },
- { "mjacobson.net", true },
- { "mjanja.ch", true },
- { "mjasm.org", true },
- { "mjbulgaria.com", true },
- { "mjdmetal.com", true },
- { "mjec.net", true },
- { "mjforan.com", true },
- { "mjjlab.com", true },
- { "mjmedia.co.za", true },
- { "mjniessen.com", true },
- { "mjpak.com.au", true },
- { "mjproduction.ee", true },
- { "mjrlegends.com", true },
- { "mjs-domy.pl", true },
- { "mjsacco-dwi.com", true },
- { "mjsacco.com", true },
- { "mjscustomcreations.com.au", true },
- { "mjt.me.uk", true },
- { "mk89.de", true },
- { "mkaciuba.com", false },
- { "mkalisch.de", true },
- { "mkbet.tk", true },
- { "mkbouncycastles.co.uk", true },
- { "mkbouncyhire.co.uk", true },
- { "mkcert.org", true },
- { "mkchandler.com", true },
- { "mkes.com", true },
- { "mkg-chirurgie-bruchsal.de", true },
- { "mkg-scherer.de", true },
- { "mkg-wiebelskirchen.de", true },
- { "mkhsoft.eu", true },
- { "mkimage.com", false },
- { "mkinteriores.com.br", true },
- { "mkjl.ml", false },
- { "mkk.de", true },
- { "mklenterprises.com", true },
- { "mkm.szczecin.pl", true },
- { "mkoppmann.at", true },
- { "mkpdeepclean.com", true },
- { "mkpef.org", true },
- { "mksac.co.uk", true },
- { "mksdarchitects.com", true },
- { "mkse.com", true },
- { "mkset.ru", false },
- { "mkt.com", true },
- { "mktdigital.info", true },
- { "mktemp.org", true },
- { "mktenlared.com", true },
- { "mkuznets.com", true },
- { "mladamoda.sk", true },
- { "mlathrom.com", true },
- { "mlcnfriends.com", true },
- { "mlmjam.com", true },
- { "mlohr.com", true },
- { "mlp.ee", true },
- { "mlpvector.club", true },
- { "mlsha.cn", true },
- { "mlstav.sk", true },
- { "mlundberg.se", true },
- { "mlwr.ee", true },
- { "mlytics.com", true },
- { "mm13.at", true },
- { "mm404.com", true },
- { "mm88game.com", true },
- { "mma-records.de", true },
- { "mmalisz.com", true },
- { "mmaps.org", true },
- { "mmassemblyline.de", true },
- { "mmbb.org", true },
- { "mmbhof.org", true },
- { "mmgal.com", true },
- { "mmhome.fr", true },
- { "mmichaelb.pw", true },
- { "mminsco.com", true },
- { "mml.cx", true },
- { "mmmarco.com", true },
- { "mmmm.mn", true },
- { "mmogah.com", true },
- { "mmonit.com", true },
- { "mmprojects.nl", true },
- { "mms.is", true },
- { "mmsmotor.com.hk", true },
- { "mmt.my", true },
- { "mmucha.de", true },
- { "mmwb.nl", true },
- { "mmxblog.com", true },
- { "mnatechnologies.com.au", true },
- { "mnc.moda", true },
- { "mnciitbhu.me", true },
- { "mncloud.de", true },
- { "mnd.sc", true },
- { "mne.moe", true },
- { "mnemonic.ninja", true },
- { "mneti.ru", true },
- { "mnguyen.io", true },
- { "mnienamel.com", true },
- { "mnlfnet.com", true },
- { "mnml.art", true },
- { "mns.co.jp", true },
- { "mns.jp", true },
- { "mnsure.org", true },
- { "mnt-tech.fr", true },
- { "mo-journal.com", true },
- { "mo-mochizuki.com", true },
- { "mo.nl", true },
- { "mo2021.de", true },
- { "moa.moe", true },
- { "moabpapier.de", true },
- { "moahmo.com", true },
- { "moarcookies.com", true },
- { "moas.design", true },
- { "mobal.com", true },
- { "mobi2go.com", true },
- { "mobifinans.ru", true },
- { "mobil-bei-uns.de", true },
- { "mobila-chisinau.md", true },
- { "mobilcom-debitel-empfehlen.de", true },
- { "mobile-holzofenpizza.de", true },
- { "mobile.united.com", false },
- { "mobile.usaa.com", false },
- { "mobile360.ph", true },
- { "mobileague.ml", true },
- { "mobilebingoclub.co.uk", true },
- { "mobilebooster.tk", true },
- { "mobilecasinoclub.co.uk", true },
- { "mobilecontractcomparison.com", true },
- { "mobilelooper.com", true },
- { "mobilemedics.com", true },
- { "mobileread.com", true },
- { "mobiletraff.co", true },
- { "mobiletry.com", true },
- { "mobilewikiserver.com", true },
- { "mobilinnov.it", true },
- { "mobility-events.ch", true },
- { "mobilux.lv", true },
- { "mobinst.ml", true },
- { "mobio.net", true },
- { "mobiproj.com", true },
- { "mobisaar-cloud.de", true },
- { "mobius.network", true },
- { "mobizma.com", true },
- { "mobobe.com", true },
- { "mobsitin.tk", true },
- { "mobtop.ml", true },
- { "moburst.com", true },
- { "moc.ac", true },
- { "moca-2080.com", true },
- { "mochizuki.moe", true },
- { "mockerel.com", true },
- { "mocking-bird.org", true },
- { "mocknen.net", true },
- { "mococo.co.uk", true },
- { "mod.af", true },
- { "moda-donna.cf", true },
- { "modaexecutiva.com.br", true },
- { "modafo.com", true },
- { "modalogi.com", true },
- { "modav.org", true },
- { "modbom.com.tw", true },
- { "modcover.com", true },
- { "modderday.com", true },
- { "modding-forum.com", true },
- { "modding-welt.com", true },
- { "moddiy.com", true },
- { "mode-hautnah.de", true },
- { "model.earth", true },
- { "modelclub-draveil.eu", true },
- { "modelcube.com", true },
- { "modeldimension.com", true },
- { "modeldoll.tk", true },
- { "modelemax.pl", true },
- { "modelisme-rc.net", true },
- { "modell-lq.net", true },
- { "modelservis.cz", true },
- { "modelspoor-projecten.nl", true },
- { "modelspoorprojecten.nl", true },
- { "modemaille.com", false },
- { "modemchild.net", true },
- { "modeportaal.nl", true },
- { "moderatoren.org", true },
- { "modern-family.tv", true },
- { "modern-gaming.ga", true },
- { "modernapprenticeships.org", true },
- { "modernautorepairs.com", true },
- { "moderncommercialrealestate.com", true },
- { "moderniknihovna.cz", true },
- { "modhay.com", true },
- { "modifiedmind.com", true },
- { "modmountain.com", true },
- { "modnitsa.info", true },
- { "modonor.dk", true },
- { "modscrew.com", true },
- { "modul8infinity.co", true },
- { "module.market", true },
- { "modulex-gmbh.de", true },
- { "modusawperandi.com", true },
- { "moe-max.jp", true },
- { "moebel-vergleichen.com", true },
- { "moechel.com", true },
- { "moeclue.com", true },
- { "moefactory.com", true },
- { "moegi.ml", true },
- { "moego.me", true },
- { "moekes.amsterdam", true },
- { "moeking.me", true },
- { "moenew.us", true },
- { "moesif.com", true },
- { "moetrack.com", true },
- { "mofidmed.com", true },
- { "mogica.tk", true },
- { "moha-swiss.com", false },
- { "mohamedhosting.tk", true },
- { "mohanmekap.com", true },
- { "mohela.com", true },
- { "mohitchahal.com", true },
- { "mohot.com", true },
- { "mohot.fit", true },
- { "mohr-maschinenservice.de", true },
- { "mohritz.co", true },
- { "moipourtoit.ch", true },
- { "moipourtoit.com", true },
- { "moipourtoit.org", true },
- { "moisesbarrio.es", true },
- { "mojaknjiznica.com", false },
- { "mojavenissanofbarstowparts.com", true },
- { "mojeco2.cz", true },
- { "mojefedora.cz", true },
- { "mojekonsultacje.pl", true },
- { "mojilitygroup.com", true },
- { "mojitoparty-articlespara.website", true },
- { "mojizuri.com", true },
- { "mojleksikon.com", true },
- { "mojnet.eu", true },
- { "mojnet.net", true },
- { "mojoco.co.za", true },
- { "mojt.net", true },
- { "mojzis.com", true },
- { "mojzis.cz", true },
- { "mojzisova.com", true },
- { "mokeedev.com", true },
- { "mokhan.ca", true },
- { "mokhtarmial.com", false },
- { "moki.org.pl", true },
- { "molb.org", true },
- { "moldova-online.ml", true },
- { "moldovanka.tk", true },
- { "moldovawall.tk", true },
- { "molecularbiosystems.org", true },
- { "molekula.hr", true },
- { "moleskinestudio.com", true },
- { "molinero.xyz", true },
- { "mollaretsmeningitis.org", true },
- { "molleron.net", true },
- { "mollie.com", true },
- { "molodost.ga", true },
- { "molokai.org", true },
- { "moltapor.tk", true },
- { "molti.hu", true },
- { "moltina.com", true },
- { "molun.net", true },
- { "molunerfinn.com", true },
- { "molwick.com", true },
- { "momentsofimpact.info", true },
- { "momentum.photos", true },
- { "momentumcoach.se", true },
- { "momentumdash.com", true },
- { "momentumdesign.website", true },
- { "momirfarooq.com", true },
- { "momo0v0.club", true },
- { "momobako.com", true },
- { "momocogames.com", true },
- { "momocrats.com", true },
- { "momove.nl", true },
- { "momozeit.de", true },
- { "momsays.co.za", true },
- { "momstableonline.com", true },
- { "momut.org", true },
- { "momy-genealogie.info", true },
- { "mon-a-lisa.com", true },
- { "mon-butin.fr", true },
- { "mon-partage.fr", true },
- { "mon-trafic.com", false },
- { "mon22.ch", false },
- { "mona-antenna.com", true },
- { "monachatdeco.com", false },
- { "monaco-automaten.de", true },
- { "monad.io", true },
- { "monakasatmasr.com", true },
- { "monalyse.com", true },
- { "monarchcleanersnc.com", true },
- { "monarchpartnersgroup.com", true },
- { "monarcjuexpo.ch", true },
- { "monbudget.org", false },
- { "moncoach.ch", false },
- { "mondedie.fr", true },
- { "mondial-movers.nl", true },
- { "mondo-it.ch", true },
- { "mondonet.org", false },
- { "mondzorgaanzee.nl", true },
- { "moneni.com", true },
- { "monerogamez.com", true },
- { "monetki.net", true },
- { "monetus.com.br", true },
- { "money-fast.ga", true },
- { "moneybird.com", true },
- { "moneybird.nl", true },
- { "moneychangersoftware.com", true },
- { "moneycredit.eu", true },
- { "moneyfortitude.com", true },
- { "moneygo.se", true },
- { "moneypark.ch", true },
- { "moneyreal.tk", true },
- { "moneytoday.se", true },
- { "mongolbox.tk", true },
- { "mongolie.net", true },
- { "mongolieenfrance.fr", true },
- { "mongooselock.com.ua", true },
- { "monicajean.photography", true },
- { "moniquemunhoz.com.br", true },
- { "monitorbox.jp", true },
- { "monitord.at", true },
- { "monitzer.com", true },
- { "monix.io", true },
- { "monkatos.org", true },
- { "monkay.de", true },
- { "monkeybusiness.agency", true },
- { "monkeyfaqs.com", true },
- { "monkeysorce.tk", true },
- { "monkeytek.ca", true },
- { "monlabs.com", true },
- { "monlissagebresilien.com", true },
- { "monloyer.quebec", true },
- { "monnyonle.hu", true },
- { "mono.cafe", true },
- { "mono0x.net", true },
- { "monobunt.at", true },
- { "monodejuegos.shop", true },
- { "monolithapps.com", true },
- { "monolithic.tk", true },
- { "monolithindustries.com", true },
- { "monolithinteractive.com", true },
- { "monopoly-one.com", true },
- { "monoworks.co.jp", true },
- { "monpc-pro.fr", false },
- { "monpermismoto.com", true },
- { "monpermisvoiture.com", true },
- { "monpetitherboriste.com", true },
- { "monpetitmobile.com", true },
- { "monroe27.com", true },
- { "monsieurbureau.com", true },
- { "monsieurdecapage.com", true },
- { "monsieursavon.ch", false },
- { "monsitemoncommerce.com", true },
- { "monsterandfox.co.uk", true },
- { "monstermashentertainments.co.uk", true },
- { "monsterx.cn", true },
- { "montack.de", true },
- { "montage-kaika.de", false },
- { "montanasky.tv", true },
- { "montanteaesthetics.com", true },
- { "montanwerk.de", true },
- { "montarfotoaki.com", true },
- { "montas.io", true },
- { "montemanik.com", true },
- { "montenegro-yacht.com", true },
- { "montessori.edu.vn", true },
- { "montgomeryfirm.com", true },
- { "monthlyfukuoka.com", true },
- { "montpreveyres.ch", false },
- { "montrain.com", true },
- { "montrain.fr", true },
- { "montrealcatadoptions.com", true },
- { "montredeal.fr", true },
- { "montsaintaignan.fr", true },
- { "montychristie.com", true },
- { "monwarez.ovh", true },
- { "monzo.com", true },
- { "monzo.me", true },
- { "monzo.tk", true },
- { "moo.la", true },
- { "moobl.io", true },
- { "moodfoods.com", true },
- { "moolah.rocks", true },
- { "moon.fish", true },
- { "moonagic.com", true },
- { "moonbench.xyz", true },
- { "moonbot.io", true },
- { "moonboys.de", true },
- { "moonchart.co.uk", true },
- { "moondrop.org", true },
- { "moonkin.eu", true },
- { "moonlightdesign.org", true },
- { "moonmelo.com", true },
- { "moonraptor.co.uk", false },
- { "moonraptor.com", false },
- { "moonrhythm.io", false },
- { "moonsault.de", true },
- { "moonshyne.org", true },
- { "moonue.com", true },
- { "moonvpn.org", true },
- { "moonwolfwiccanschool.tk", true },
- { "moorelawfirmaz.com", true },
- { "moorewelliver.com", true },
- { "moorfunevents.co.uk", true },
- { "moorparkelectrical.com", true },
- { "moorparkelectrician.com", true },
- { "moorparkexteriorlighting.com", true },
- { "moorparklandscapelighting.com", true },
- { "moorparklighting.com", true },
- { "moorparkoutdoorlighting.com", true },
- { "moort.be", true },
- { "moosikapp.tk", true },
- { "moosmann-moehrle.de", true },
- { "moot-info.co.za", true },
- { "moovablestorage.com", true },
- { "moove-it.com", true },
- { "mooveo.co", true },
- { "moparcraft.net", true },
- { "moparisthebest.com", true },
- { "moparisthebest.net", true },
- { "moparisthebest.org", true },
- { "moparscape.net", true },
- { "mopedreifen.de", false },
- { "mopie.de", true },
- { "mople71.cz", true },
- { "mopliangxing.com", true },
- { "moplx.com", true },
- { "moppeleinhorn.de", true },
- { "mopxing.com", true },
- { "mora.pl", true },
- { "moraffpritchard.com", true },
- { "moraldehornuez.tk", true },
- { "morbatex.com", true },
- { "morbiceramicindustry.com", true },
- { "morbitzer.de", true },
- { "morbius.cz", true },
- { "morbotron.com", true },
- { "morchstore.com", true },
- { "mordrum.com", true },
- { "more-hikkoshi.com", true },
- { "more-terrain.de", true },
- { "moreal.co", true },
- { "morecreativelife.com", true },
- { "moreniche.com", true },
- { "morepablo.com", true },
- { "morepay.cn", true },
- { "moresw.com", true },
- { "morethanautodealers.com", true },
- { "morethancode.be", true },
- { "morethandigital.info", true },
- { "morgan-insurance.com", true },
- { "morgandesort.com", true },
- { "morgansleisure.co.uk", true },
- { "morganwilder.com", true },
- { "morgner.com", true },
- { "moritz-baestlein.de", true },
- { "moritzkornher.de", true },
- { "moritztremmel.de", true },
- { "moriz.de", true },
- { "moriz.net", true },
- { "mormon-colleges.com", true },
- { "mormonleaks.io", true },
- { "morningbird.eu", true },
- { "morningcurve.com", false },
- { "morningstar.moe", true },
- { "morningtime.cloud", true },
- { "moroccanews.tk", true },
- { "moroccotodaynews.ga", true },
- { "moron-mu.com", true },
- { "morozko.gq", true },
- { "morris.computer", true },
- { "morrisby.com", true },
- { "morritosfelices.com", true },
- { "morse-ti.net", true },
- { "mortengamstpedersen.tk", true },
- { "mortgagecalculator.biz", true },
- { "mortis.eu", true },
- { "morvo.mx", true },
- { "mosaic-design.ru", true },
- { "mosaicadvisors.com", true },
- { "mosaicmarble.com", true },
- { "mosboutique.it", true },
- { "moscatalogue.net", true },
- { "moscow-moscow.tk", true },
- { "moscow-new.cf", true },
- { "moscow.dating", true },
- { "moscowlove.tk", true },
- { "moseleyelectronics.com", true },
- { "moseracctg.com", true },
- { "mosfet.cz", true },
- { "mosin.org", true },
- { "moskeedieren.nl", true },
- { "mosnews.tk", true },
- { "moso.io", true },
- { "mosquitojoe.com", true },
- { "mossaino.de", true },
- { "mosscade.com", true },
- { "mostafabanaei.cf", true },
- { "mostbelehuzunk.hu", true },
- { "mosternaut.com", true },
- { "mosttaza.com", true },
- { "motcha.be", true },
- { "motd.ch", true },
- { "motekforce.link", true },
- { "motekforcelink.com", true },
- { "motekforcelink.eu", true },
- { "motekforcelink.net", true },
- { "motekforcelink.nl", true },
- { "motekmedical.com", true },
- { "motekmedical.eu", true },
- { "motekmedical.nl", true },
- { "motekrysen.com", true },
- { "moteksystems.com", true },
- { "moteksystems.net", true },
- { "motezazer.fr", true },
- { "mothereff.in", false },
- { "mothership.de", true },
- { "motherwell.tech", true },
- { "motichi.cf", true },
- { "motifstudio.com.ua", true },
- { "motionless.nl", true },
- { "motionvideos.uk", true },
- { "motiv-rechts.tk", true },
- { "motivational-babes.com", true },
- { "motiweb.fr", true },
- { "motlife.net", false },
- { "motmplus.com", true },
- { "motoactionimola.it", true },
- { "motoclubentresemana.tk", true },
- { "motocyklovedily.cz", true },
- { "motodb.co.uk", true },
- { "motodb.eu", true },
- { "motodb.net", true },
- { "motodb.uk", true },
- { "motogb.net", true },
- { "motohell.com", true },
- { "motojato.com.br", true },
- { "motoland.ml", true },
- { "motonauticaibiza.com", true },
- { "motor-agro.com", true },
- { "motor-agro.com.ua", true },
- { "motor-agro.kz", true },
- { "motor-agro.ru", true },
- { "motor-forum.nl", true },
- { "motor1.com", true },
- { "motoreflex.com", true },
- { "motorialab.com", false },
- { "motornaolja.com", true },
- { "motorpointarenacardiff.co.uk", true },
- { "motorring.ru", true },
- { "motorsplus.com", false },
- { "motorsportdiesel.com", true },
- { "motoryachtclub-radolfzell.de", true },
- { "motoscascos.com", true },
- { "motosikletevi.com", true },
- { "motospaya.com", true },
- { "motostorie.blog", true },
- { "mototax.ch", true },
- { "motovated.co.nz", false },
- { "motowilliams.com", true },
- { "motransportinfo.com", true },
- { "motshop.tk", true },
- { "motstats.co.uk", true },
- { "mott.pe", true },
- { "motto-iikoto.com", true },
- { "motun.ga", true },
- { "mouche.fr", true },
- { "moucloud.cn", true },
- { "moulinaparoles.ca", true },
- { "mouniresidences.com", true },
- { "mountain-rock.ru", true },
- { "mountainactivitysection.org.uk", true },
- { "mountainbatchers.de", true },
- { "mountainchalet.blue", true },
- { "mountaintree.eu", true },
- { "mountainutilities.eu", true },
- { "mountbatten.cz", true },
- { "mountknowledge.nl", true },
- { "mountpost.tk", true },
- { "mousepotato.uk", true },
- { "moutiezhaller.com", true },
- { "mov-square.jp", true },
- { "movacare.de", true },
- { "move-out-cleaning.co.uk", true },
- { "move.mil", true },
- { "moveltix.net", true },
- { "movember.com", false },
- { "movementdanceacademy.it", true },
- { "movewellnesslab.com", true },
- { "movie-infos.net", true },
- { "movie1000.com", true },
- { "moviefreeze.com", true },
- { "movieguys.org", true },
- { "moviesetc.net", true },
- { "moviestrendingnow.com", true },
- { "movilcelular.es", true },
- { "moviltronix.com", true },
- { "movimento-terra.it", true },
- { "movinglogistics.nl", false },
- { "movingtohttps.com", true },
- { "moviro.net", true },
- { "moy.cat", true },
- { "moylen.eu", true },
- { "mozartgroup.hu", true },
- { "mozektevidi.net", true },
- { "mozilla-hispano.org", true },
- { "mozilla.cz", true },
- { "mozzez.de", true },
- { "mp3gratuiti.com", true },
- { "mpa-pro.fr", true },
- { "mpac.ca", false },
- { "mpath.health", true },
- { "mpc-hc.org", true },
- { "mpcompliance.com", true },
- { "mpetroff.net", true },
- { "mpgaming.pro", true },
- { "mpgu.tk", true },
- { "mphwinkel.nl", true },
- { "mpintaamalabanna.it", true },
- { "mpkrachtig.nl", true },
- { "mplanetphl.fr", false },
- { "mplant.io", true },
- { "mpodraza.eu", true },
- { "mpoonamchandpearls.com", true },
- { "mprsco.eu", true },
- { "mpsoundcraft.com", true },
- { "mpu-beratungsstellen.com", true },
- { "mpu-ibbi.de", true },
- { "mpu-vorbereitung.com", true },
- { "mpu-vorbereitung.com.de", true },
- { "mpublicidad.com", true },
- { "mqbeauty.com.tw", true },
- { "mr-anderson.org", true },
- { "mr-bills.com", true },
- { "mr-moulding-knives.com", true },
- { "mr-nachhilfe.de", true },
- { "mr-wolf.nl", false },
- { "mraag.xyz", true },
- { "mralonas.ga", true },
- { "mralonas.gq", true },
- { "mralonas.ml", true },
- { "mralonas.tk", true },
- { "mrandmrsparrot.gr", true },
- { "mrazek.biz", true },
- { "mrbounce.com", true },
- { "mrbouncescrazycastles.co.uk", true },
- { "mrbouncycastle.com", true },
- { "mrbuckykat.com", true },
- { "mrca-sharp.com", false },
- { "mrcoolevents.com", true },
- { "mrd.ninja", true },
- { "mrdatenschutz.de", true },
- { "mrdayman.com", true },
- { "mredsanders.net", true },
- { "mremallin.ca", true },
- { "mrevolution.eu", true },
- { "mrhc.ru", true },
- { "mrhookupsd.com", true },
- { "mrichard333.com", true },
- { "mricspatial.com", true },
- { "mrinalpurohit.in", true },
- { "mrjhnsn.com", true },
- { "mrjo.sh", true },
- { "mrjones.org", true },
- { "mrkapowski.com", true },
- { "mrknee.gr", true },
- { "mrkrabat.de", true },
- { "mrlove.tk", true },
- { "mrmad.com.tw", true },
- { "mrmanner.eu", true },
- { "mrmemory.co.uk", true },
- { "mrnathanpowell.com", true },
- { "mrnh.de", true },
- { "mrnonz.com", true },
- { "mrnordic.com", true },
- { "mrprintables.com", true },
- { "mrs-shop.com", true },
- { "mrsbairds.com", false },
- { "mrschristine.com", true },
- { "mrsheep.win", true },
- { "mrsiding.net", true },
- { "mrsk.me", true },
- { "mrstat.co.uk", true },
- { "mrston.ml", true },
- { "mrstuudio.ee", true },
- { "mrtunnel.club", true },
- { "mruczek.ga", true },
- { "mrv.li", true },
- { "mrvnt.co", true },
- { "mrx.one", false },
- { "mrxn.net", true },
- { "ms-australia.de", true },
- { "ms-ch.ch", true },
- { "ms-host.fr", true },
- { "msa-aesch.ch", true },
- { "msafiri.co", true },
- { "msc-corps.de", true },
- { "mscc.mu", true },
- { "mscc.org", true },
- { "msch.pw", true },
- { "msebera.cz", true },
- { "mservers.cz", true },
- { "msh100.uk", true },
- { "msha.gov", true },
- { "msi-zlin.cz", true },
- { "msiegmund.com", true },
- { "msieursvp.fr", true },
- { "msize48.ch", true },
- { "msmails.de", true },
- { "msnhdd.info", true },
- { "msnr.net", true },
- { "msoll.de", true },
- { "msoll.eu", true },
- { "msopopop.cn", true },
- { "mspsocial.net", true },
- { "msquadrat.de", true },
- { "msroot.de", true },
- { "mssora.com", true },
- { "mstdn.blue", true },
- { "mstdn.io", true },
- { "mstdn.onl", false },
- { "msuna.net", true },
- { "msx.org", true },
- { "mszavodumiru.cz", true },
- { "mt-bank.jp", true },
- { "mt-tech.fi", true },
- { "mt.search.yahoo.com", false },
- { "mt1016.com", true },
- { "mt2414.com", true },
- { "mta.fail", true },
- { "mta.org.ua", true },
- { "mtane0412.com", true },
- { "mtasa.com", true },
- { "mtasa.hu", true },
- { "mtauburnassociates.com", true },
- { "mtb.wtf", true },
- { "mtcq.jp", true },
- { "mtd.org", true },
- { "mte.sk", true },
- { "mtechprecisioninc.com", true },
- { "mteleport.net", true },
- { "mtgeni.us", true },
- { "mtgenius.com", true },
- { "mtgsuomi.fi", true },
- { "mthode.org", true },
- { "mthopebank.com", true },
- { "mthrbrd.com", true },
- { "mthrbrd.net", true },
- { "mths.be", false },
- { "mticareportal.com", true },
- { "mtiryaki.com", true },
- { "mtjholding.ee", true },
- { "mtlconcerts.com", true },
- { "mtltransport.com", true },
- { "mtludlow.co.uk", true },
- { "mtouch.facebook.com", false },
- { "mtravelers.net", true },
- { "mtrip.com", true },
- { "mtrock.ru", true },
- { "mts-energia.eu", true },
- { "mts-server.com", true },
- { "mtsolar.es", true },
- { "mu.search.yahoo.com", false },
- { "mu105.cc", true },
- { "muabannhanh.com", false },
- { "mubase.dk", true },
- { "mubiflex.nl", true },
- { "muchohentai.com", true },
- { "muchotrolley.tk", true },
- { "muckingabout.eu", true },
- { "muckrack.com", true },
- { "mucmail.de", true },
- { "mudanzasacuna.com.co", true },
- { "mudaomundo.org", true },
- { "mudasobwa.tk", true },
- { "mudbenesov.cz", true },
- { "mudcomplex.ga", true },
- { "mudcrab.us", false },
- { "mudit.xyz", false },
- { "muelhau.pt", true },
- { "muell-weg.de", true },
- { "muenchberger.com", true },
- { "muffs.ru", true },
- { "mufibot.net", true },
- { "muganworld.com", true },
- { "mugen.technology", true },
- { "muguayuan.com", true },
- { "muhabbet.org", true },
- { "muhcow.dk", true },
- { "muilties.com", true },
- { "mujerfutura.com", true },
- { "muk-kobetsu.com", true },
- { "mukilteodentalarts.com", true },
- { "mukilteoeuropeanautorepair.com", true },
- { "muku-flooring.com", true },
- { "mulaccosmetics.com", true },
- { "mulail.com", true },
- { "mulheres18.com", true },
- { "muling.lu", true },
- { "mulk.hopto.org", true },
- { "mullen.net.au", true },
- { "mullens-usedcars.be", false },
- { "mullinsfarms.com", true },
- { "muloft.com", true },
- { "multibit.org", true },
- { "multibomasm.com.br", true },
- { "multiclinicacardio.com.br", true },
- { "multicomhost.com", true },
- { "multicore.cl", true },
- { "multicorpbra.com", true },
- { "multigamecard.com", true },
- { "multigeist.de", true },
- { "multikalender.de", false },
- { "multilogik.com", true },
- { "multimatte.com", true },
- { "multimed-solutions.com", true },
- { "multimed.krakow.pl", true },
- { "multimedia-pool.com", true },
- { "multimediapc.de", true },
- { "multirep.ch", false },
- { "multiroom-streaming.de", true },
- { "multischool.tk", true },
- { "multisite.ovh", true },
- { "multitec.nl", true },
- { "multitek.no", true },
- { "multitenantlaravel.com", true },
- { "multiterm.org", true },
- { "multitheftauto.com", true },
- { "multiupload.us", true },
- { "multixa.net", true },
- { "multixvideo.com", true },
- { "mum.ceo", true },
- { "mumablue.com", true },
- { "mumakil.fi", false },
- { "mumbaionlinegifts.com", true },
- { "mummyandmephotography.com", true },
- { "mumolabs.com", true },
- { "munch.me", true },
- { "munchcorp.com", true },
- { "mundoarabe.com.br", true },
- { "mundoconejos.com", true },
- { "mundodasmensagens.com", true },
- { "mundokinderland.com.br", true },
- { "mundolarraz.es", true },
- { "mundomagicotv.com", true },
- { "mundoperfecto.net", true },
- { "mundoperros.es", true },
- { "mundotortugas.com", true },
- { "mundschenk.at", true },
- { "mundtec.com.br", true },
- { "munduch.cz", true },
- { "munduch.eu", true },
- { "munera.ca", true },
- { "munich-eventlocations.de", true },
- { "munki.org", true },
- { "munkibuilds.org", true },
- { "muntproever.nl", true },
- { "munwr.com", true },
- { "munzlocal10.org.nz", true },
- { "muot.tv", false },
- { "muqu.co", true },
- { "mur-vegetal-interieur.fr", true },
- { "murakami-sah.com", true },
- { "mural.co", true },
- { "muralswallpaper.co.uk", true },
- { "muralswallpaper.com", true },
- { "murashun.jp", true },
- { "muratatifsayar.com.tr", true },
- { "muratore-roma.it", true },
- { "murfy.nz", true },
- { "murgi.de", true },
- { "murmansk.cf", true },
- { "murmashi.ru", true },
- { "murof.com.br", true },
- { "murray.xyz", true },
- { "murraya.cn", true },
- { "murster.tw", true },
- { "musa.gallery", true },
- { "musasdanet.com", true },
- { "muscleangels.com", true },
- { "musclecarresearch.com", true },
- { "muscolinomusic.com", true },
- { "muscularbabes.net", true },
- { "museclef.com", true },
- { "musedash.moe", true },
- { "musehelix.com", true },
- { "muserver.io", true },
- { "muses-success.info", true },
- { "musettishop.com", true },
- { "museumwaalsdorp.nl", true },
- { "mush-room.co.jp", true },
- { "mushel.ddns.net", true },
- { "mushikabu.net", true },
- { "music-is-my-life.de", true },
- { "music-project.eu", true },
- { "music-world.pl", true },
- { "music.amazon.com", true },
- { "musica.com", true },
- { "musicalive.nl", true },
- { "musicall.com", true },
- { "musicalschwarzenburg.ch", true },
- { "musicasbr.com.br", true },
- { "musicchris.de", true },
- { "musicfactory.ml", true },
- { "musicfromgod.com", true },
- { "musicgamegalaxy.de", true },
- { "musician.dating", true },
- { "musicindustrydb.org", true },
- { "musicinsiderdigest.com", true },
- { "musickhouseleveling.com", true },
- { "musicompare.com", true },
- { "musicradio.ga", true },
- { "musicschoolonline.com", true },
- { "musicstudio.pro", true },
- { "musicvideo.club", true },
- { "musicwear.cz", true },
- { "musicworkout.de", true },
- { "musik-mentaltraining.ch", true },
- { "musiker.tk", true },
- { "musikholics.com", true },
- { "musiktag2020.ch", true },
- { "musikverein-elten.de", true },
- { "musikzentrale.net", true },
- { "musings.tech", true },
- { "musketiers.tk", true },
- { "musketonhaken.nl", false },
- { "muskokavoltz.ca", true },
- { "muslim.singles", true },
- { "musmann.io", true },
- { "muspla.com.br", true },
- { "mussalains.com", true },
- { "musta.ch", true },
- { "mustard.co.uk", true },
- { "mustasj.no", true },
- { "mustat.com", true },
- { "muster-folien.de", true },
- { "muster-schablonen.de", true },
- { "mustertexte-musterbewerbung.de", true },
- { "musthavesforreal.com", true },
- { "musthinsider.com", true },
- { "muszic.co", true },
- { "mutantmonkey.in", true },
- { "mutantmonkey.info", true },
- { "mutualmoney.ml", true },
- { "mutuelle.fr", true },
- { "muuglu.es", true },
- { "muunnin.net", true },
- { "muurlingoogzorg.nl", true },
- { "muwatenraqamy.org", true },
- { "muz2u.ru", true },
- { "muzeumkomiksu.eu", true },
- { "muzhijy.com", true },
- { "muzikantine.nl", true },
- { "muzykanawesele.info", true },
- { "mv-schnuppertage.de", true },
- { "mvandek.nl", true },
- { "mvbits.com", true },
- { "mvccp.co.za", true },
- { "mvisioncorp.com", true },
- { "mvistatic.com", true },
- { "mvno.io", true },
- { "mvorisek.com", true },
- { "mvorisek.cz", true },
- { "mvpinfo.ga", true },
- { "mvpower.pt", true },
- { "mw.search.yahoo.com", false },
- { "mwainc.org", true },
- { "mwalz.com", true },
- { "mwavuli.co.ke", true },
- { "mwba.org", true },
- { "mwe.st", true },
- { "mwlcouriers.com", true },
- { "mww.moe", true },
- { "mx-quad.fr", true },
- { "mx.org.ua", true },
- { "mx.search.yahoo.com", false },
- { "mx5international.com", true },
- { "mxcrs.com", true },
- { "mxdvl.com", true },
- { "mxes.net", true },
- { "my-best-wishes.com", true },
- { "my-bratsk.tk", true },
- { "my-contract.ch", false },
- { "my-contract.info", false },
- { "my-contract.net", false },
- { "my-dns.co.il", true },
- { "my-ebook.es", true },
- { "my-floor.com", true },
- { "my-gode.fr", true },
- { "my-goldfinger.com", true },
- { "my-host.ovh", true },
- { "my-hps.de", true },
- { "my-ip.work", true },
- { "my-new-bikini.de", true },
- { "my-nextcloud.at", true },
- { "my-profile.org", true },
- { "my-sex-cam.com", true },
- { "my-stuff-online.com", true },
- { "my-tunisia.tk", true },
- { "my-web.xyz", true },
- { "my-webcloud.at", true },
- { "my.onlime.ch", false },
- { "my.usa.gov", true },
- { "my4g.net", true },
- { "my4thtelco.com.sg", true },
- { "my4thtelco.sg", true },
- { "myabcm.com", true },
- { "myaccount.google.com", false },
- { "myactivity.google.com", false },
- { "myadpost.com", true },
- { "myadself.com", true },
- { "myaggic.com", true },
- { "myalliancechurch.com", true },
- { "myamend.com", false },
- { "myamihealth.com", true },
- { "myamity.info", true },
- { "myammo.com", true },
- { "myammo.ru", true },
- { "myanimelist.net", true },
- { "myapexcard.com", true },
- { "myarcade.org", true },
- { "mybasementdoctor.com", true },
- { "mybathroom.tk", true },
- { "mybauingenieur24.de", true },
- { "mybb.com", true },
- { "mybb.de", true },
- { "mybestmattress.com", true },
- { "mybestwebsitebuilder.com", true },
- { "mybicc.org", true },
- { "mybillie.com", true },
- { "mybloggedlife.com", true },
- { "mybodylife.com", true },
- { "mybon.at", false },
- { "myboothang.com", true },
- { "mybuildingcertifier.com.au", true },
- { "mybusiness.wien", true },
- { "mycaelis.fr", true },
- { "mycakeangel.com", true },
- { "mycam.gq", true },
- { "mycamshowhub.com", true },
- { "mycamshowhub.to", true },
- { "mycareersfuture.sg", true },
- { "mycarinsurance123.com", true },
- { "mycc.be", true },
- { "mychamberlain.co.nz", true },
- { "mychamberlain.com", true },
- { "mychamberlain.com.au", true },
- { "mychamberlain.eu", true },
- { "mychemromance.tk", true },
- { "mycinema.pro", true },
- { "mycircleworks.com", true },
- { "myclgnotes.com", true },
- { "myclinicalstudybuddy.com", true },
- { "mycloud-system.com", true },
- { "mycodes.com.au", true },
- { "mycofairtrade.com", false },
- { "mycoldjet.com", true },
- { "mycompanysite.host", true },
- { "myconf.com", true },
- { "myconf.es", true },
- { "myconf.uk", true },
- { "myconsulting.ch", false },
- { "mycookrecetas.com", true },
- { "mycounterstrike.ru", true },
- { "mycoupons.com", true },
- { "mycr.eu", true },
- { "mycreativenook.com", true },
- { "mycreditcardcenter.com", true },
- { "mycreditunion.gov", true },
- { "mycrowdstack.com", true },
- { "mycrypnet.io", true },
- { "mycrypto.com", true },
- { "mycrystalgrove.com", true },
- { "mydais.org", true },
- { "mydarkstar.net", true },
- { "mydatadoneright.eu", true },
- { "mydaywebapp.com", true },
- { "mydebian.in.ua", true },
- { "mydentalhealth.com.au", true },
- { "mydentalplan.gr", true },
- { "mydenverhomesource.com", true },
- { "mydevolo.com", true },
- { "mydevolo.de", true },
- { "mydevops.cloud", true },
- { "mydigitalweek.com", true },
- { "mydna.bio", true },
- { "mydnshost.co.uk", true },
- { "mydoc.fr", true },
- { "mydocserve.com", true },
- { "mydoxod.tk", true },
- { "mydroneservices.ca", true },
- { "mydroneservices.com", true },
- { "mydsacontabilidad.com", true },
- { "myduffyfamily.com", true },
- { "myeasybooking.de", true },
- { "myeberspaecher.com", true },
- { "myecms.com", true },
- { "myedcreview.cf", true },
- { "myediblefood.com", true },
- { "myeditclub.ml", true },
- { "myedu.ga", true },
- { "myeisenbahn.de", true },
- { "myekon.com", true },
- { "myeriri.com", true },
- { "myesk.rs", true },
- { "myessaygeek.com", true },
- { "myetherwallet.com", true },
- { "myexams.nl", true },
- { "myf.cloud", true },
- { "myfae.eu", true },
- { "myfavorite.com.tw", true },
- { "myfedloan.org", true },
- { "myfirenet.com", false },
- { "myforfaitmobile.com", true },
- { "myfortdodge.com", true },
- { "myfreemp3.click", true },
- { "myfrenchtattoo.fr", true },
- { "myfursona.com", true },
- { "myg21.com", true },
- { "mygadgetguardian.lookout.com", false },
- { "mygallery.homelinux.net", true },
- { "mygameconsole.tk", true },
- { "mygate.at", false },
- { "mygear.live", true },
- { "mygedit.com", true },
- { "mygeotrip.com", true },
- { "mygest.me", true },
- { "mygigabitnation.com", true },
- { "mygignation.com", true },
- { "mygirlfriendshouse.com", true },
- { "mygnmr.com", true },
- { "mygoldennetwork.com", true },
- { "mygomel.tk", true },
- { "mygreatlakes.org", true },
- { "mygreatwebsite.co.uk", true },
- { "mygreenrecipes.com", true },
- { "mygretchen.de", true },
- { "mygrodno.tk", true },
- { "mygymer.ch", true },
- { "myhatsuden.jp", true },
- { "myhealthyday.com", true },
- { "myhmz.bid", true },
- { "myhollywoodnews.com", true },
- { "myhome-24.pl", true },
- { "myhomeworkpapers.com", true },
- { "myhoor.ga", true },
- { "myhuthwaite.com", true },
- { "myibidder.com", true },
- { "myimds.com", true },
- { "myimmitracker.com", true },
- { "myinsiderplus.com", true },
- { "myinsurancelife.com", true },
- { "myinternist.com", true },
- { "myjarofhope.com", true },
- { "myjudo.net", true },
- { "myjumparoo.co.uk", true },
- { "myjumpsuit.de", true },
- { "myjuvelirika.ru", true },
- { "myki.co", true },
- { "mykontool.de", true },
- { "mykumedir.com", true },
- { "mykursumlija.tk", true },
- { "mylawyer.be", true },
- { "mylegacyvip.com", true },
- { "mylennonbuddy.com", true },
- { "mylennonbuddy.info", true },
- { "mylennonbuddy.net", true },
- { "mylennonbuddy.org", true },
- { "mylife360mag.com", true },
- { "mylifeabundant.com", true },
- { "mylifeinsurancechoices.info", true },
- { "myliftmaster.com", true },
- { "myliftmaster.eu", true },
- { "mylight.tk", true },
- { "mylittlechat.ru", true },
- { "mylms.nl", true },
- { "myloan.hk", true },
- { "myloanmanager.com", true },
- { "myloneworkers.com", true },
- { "mylookout.com", false },
- { "mylotto.co.nz", true },
- { "mylstrom.com", true },
- { "mylucknursinghome.com", true },
- { "mymall.co.jp", true },
- { "mymb.pm", true },
- { "mymedz.nl", true },
- { "mymerlin.co.nz", true },
- { "mymerlin.com.au", true },
- { "mymixtapez.com", true },
- { "mymkphotography.com", true },
- { "mymommyworld.com", true },
- { "mymonture.com", true },
- { "mymotherlandstuffs.cn", true },
- { "mymotor.nl", true },
- { "mymsr.de", true },
- { "mymun.com", true },
- { "mymun.net", true },
- { "mymx.lu", true },
- { "myna.go.jp", true },
- { "mynameistavis.com", true },
- { "mynaturalmood.es", true },
- { "myndcoin.com", true },
- { "myndighetermeddnssec.se", true },
- { "myndighetermedipv6.se", true },
- { "mynewsspot.com", true },
- { "mynext.events", true },
- { "mynextmove.org", true },
- { "mynn.io", true },
- { "mynook.info", false },
- { "myoddlittleworld.com", true },
- { "myodysi.com", true },
- { "myofficeconnect.co.uk", true },
- { "myonline.hu", true },
- { "myonline.store", true },
- { "myopd.in", true },
- { "myoptimalbrain.com", true },
- { "myoptumhealthcomplexmedical.com", true },
- { "myoptumhealthparentsteps.com", true },
- { "myotopie.de", false },
- { "myoueb.fr", true },
- { "myoukochou.com", true },
- { "myownconference.com", true },
- { "myownconference.com.ua", true },
- { "myownconference.pl", true },
- { "myownconference.ru", true },
- { "myowndisk.com", true },
- { "myowndisk.net", true },
- { "mypaperdone.com", true },
- { "mypaperwriter.com", true },
- { "mypartnernews.com", true },
- { "mypartybynoelia.es", true },
- { "mypay.fr", true },
- { "mypayoffloan.com", true },
- { "mypenza.tk", true },
- { "myperks.in", true },
- { "mypfp.co.uk", true },
- { "myphamaplus.org", true },
- { "myphamthemis.com", true },
- { "myphotonics.ml", true },
- { "myphotoshopbrushes.com", true },
- { "mypillcard.com", true },
- { "mypizza-bremen.de", true },
- { "myplaceonline.com", true },
- { "myplaystation.nl", false },
- { "mypnu.net", true },
- { "myportal.ga", true },
- { "mypress.mx", true },
- { "myprintcard.de", true },
- { "mypromoshop.com.au", true },
- { "myprotime.eu", true },
- { "myptsite.com", false },
- { "mypvhc.com", true },
- { "myqbusiness.com", true },
- { "myqservices.com", true },
- { "myraboats.tk", true },
- { "myrandomtips.com", true },
- { "myraytech.net", false },
- { "myrealestatemate.com.au", true },
- { "myred.net", true },
- { "myref.net", true },
- { "myrekber.co.id", true },
- { "myremotelogin.ddns.net", true },
- { "myrent.quebec", true },
- { "myrepubic.net", true },
- { "myrepubiic.net", true },
- { "myrepublc.net", true },
- { "myrepublic.asia", true },
- { "myrepublic.cf", true },
- { "myrepublic.cloud", true },
- { "myrepublic.com.cn", true },
- { "myrepublic.com.hk", true },
- { "myrepublic.com.kh", true },
- { "myrepublic.com.lk", true },
- { "myrepublic.com.my", true },
- { "myrepublic.com.ph", true },
- { "myrepublic.com.tw", true },
- { "myrepublic.eu.com", true },
- { "myrepublic.ga", true },
- { "myrepublic.gq", true },
- { "myrepublic.icu", true },
- { "myrepublic.in", true },
- { "myrepublic.limited", true },
- { "myrepublic.lk", true },
- { "myrepublic.ml", true },
- { "myrepublic.mobi", true },
- { "myrepublic.my", true },
- { "myrepublic.net", true },
- { "myrepublic.net.au", true },
- { "myrepublic.nz", true },
- { "myrepublic.ph", true },
- { "myrepublic.rocks", true },
- { "myrepublic.run", true },
- { "myrepublic.tk", true },
- { "myrepublic.tv", true },
- { "myrepublic.tw", true },
- { "myrepublic.us.com", true },
- { "myrepublic.xyz", true },
- { "myrepublicau.com", true },
- { "myrepublicaus.com", true },
- { "myrepublicbroadband.com.au", true },
- { "myrepublicfibre.com.au", true },
- { "myrepublicgroup.com", true },
- { "myrepublicinternet.com.au", true },
- { "myrepublicltd.com", true },
- { "myrepublicmy.com", true },
- { "myrepublicnz.com", true },
- { "myrepublicsg.com", true },
- { "myrepublictelecom.com", true },
- { "myrepubllc.net", true },
- { "myresearchtoolbox.net", true },
- { "myresidence.de", true },
- { "myrevery.com", true },
- { "myreviews.ga", true },
- { "myrewardspoints.com", true },
- { "myriadof.com", true },
- { "myrig.com", true },
- { "myrnabiondo.com.br", true },
- { "myrotvorets.center", true },
- { "myrotvorets.news", true },
- { "myrp.co", true },
- { "mysasiedzi.bialystok.pl", true },
- { "myschoolphoto.org", true },
- { "myseatime.com", true },
- { "myself5.de", true },
- { "myservicearl.com", true },
- { "mysexycard.com", true },
- { "mysexydate24.com", true },
- { "myshopdisplay.com", true },
- { "mysignal.com", true },
- { "mysockfactory.ch", true },
- { "mysockfactory.com", true },
- { "mysocrat.com", true },
- { "mysoundtalks.com", false },
- { "myspicer.com", true },
- { "mysql-real-escape-string.xyz", true },
- { "mysqldump-secure.org", true },
- { "myssl.com", true },
- { "mystaffonline.com", true },
- { "mystagic.cloud", true },
- { "mysteriouscode.io", true },
- { "mysteryblog.de", true },
- { "mysterydata.com", true },
- { "mysterymind.ch", false },
- { "mysterysear.ch", true },
- { "mysteryshow.site", true },
- { "mystia.org", true },
- { "mystic-welten.de", true },
- { "mysticconsult.com", true },
- { "mystickphysick.com", true },
- { "mysticrs.tk", true },
- { "mystorymonster.com", true },
- { "mystudy.me", true },
- { "mystudycart.com", true },
- { "myswissmailaddress.com", false },
- { "myte.ch", true },
- { "mytfg.de", true },
- { "mythemeshop.com", false },
- { "mythen-fonds.ch", true },
- { "mythenfonds.ch", true },
- { "mythicdelirium.com", true },
- { "mythoughtmachine.com", true },
- { "mytime.fr", true },
- { "mytime.gl", true },
- { "myting.net", true },
- { "mytntware.com", true },
- { "mytraiteurs.com", true },
- { "mytrinity.com.ua", true },
- { "mytripcar.co.uk", true },
- { "mytripcar.com", true },
- { "mytripcar.de", true },
- { "mytripcar.es", true },
- { "mytripcar.fr", true },
- { "mytrustadviser.com", true },
- { "mytty.net", true },
- { "mytuleap.com", false },
- { "mytun.com", true },
- { "myunox.com", true },
- { "myusagepayments.com", true },
- { "myvacompany.com", true },
- { "myvalleymarketing.com", true },
- { "myvegan.menu", true },
- { "myvirtualserver.com", true },
- { "myvitalhealthsolutions.com.au", true },
- { "mywari.com", true },
- { "myweatherbuzz.com", true },
- { "mywebpanel.eu", true },
- { "mywebpanel.nl", true },
- { "myweddingreceptionideas.com", true },
- { "mywetpussycams.com", true },
- { "mywindscreen.my", true },
- { "mywiwe.com.au", true },
- { "myworkinfo.com", false },
- { "myworth.com.au", true },
- { "myxnr.com", true },
- { "myxxxsite.tk", true },
- { "myyubikey.net", true },
- { "myyubikey.org", true },
- { "myzina.cz", false },
- { "mz-mz.net", true },
- { "mza.com", true },
- { "mzb.company", true },
- { "mzcsgo.top", true },
- { "mzitu.com", true },
- { "mzlive.eu", true },
- { "mzmtech.com", true },
- { "mznet.de", true },
- { "mzorn.photography", true },
- { "mzstatic.cc", true },
- { "n-design-service.de", true },
- { "n-design.de", true },
- { "n-gram.it", true },
- { "n-linear.org", true },
- { "n-m.lu", true },
- { "n-man.info", true },
- { "n-pix.com", false },
- { "n-un.de", false },
- { "n0099.cf", true },
- { "n0paste.tk", false },
- { "n0psled.nl", true },
- { "n26.com", true },
- { "n2diving.net", true },
- { "n36533.com", true },
- { "n36594.com", true },
- { "n3domains.com.au", true },
- { "n4v.eu", true },
- { "n6a.net", true },
- { "n7.education", true },
- { "n8mgt.com", true },
- { "n8nvi.com", true },
- { "n8solutions.host", true },
- { "n8solutions.net", true },
- { "n8solutions.us", true },
- { "na-kipre.tk", true },
- { "na-school.nl", true },
- { "naahgluck.de", true },
- { "naamlint.nl", true },
- { "nabaleka.com", true },
- { "nabankco.com", true },
- { "nabeez.cf", true },
- { "naberiusmedia.com", true },
- { "nabidkamajetku.cz", true },
- { "nabidkydnes.cz", true },
- { "nabokov.tk", true },
- { "nabytek-valmo.cz", true },
- { "nabytokalva.sk", true },
- { "nacfit.com", true },
- { "nachrichten-heute.net", true },
- { "nachsendeauftrag.net", true },
- { "nachsenden.info", true },
- { "nacin.com", true },
- { "nacktetatsachen.at", false },
- { "nacocu.cf", true },
- { "nacyklo.cz", true },
- { "nad-r.com", true },
- { "nadejeproninu.cz", true },
- { "nadelholzkulturen.de", true },
- { "naders.com", true },
- { "nadex.com", true },
- { "nadiafourcade-photographie.fr", true },
- { "nadine-birkner.de", true },
- { "nadine-chaudier.net", true },
- { "nadjabenaissa.tk", true },
- { "nadji.ga", true },
- { "nadlerdentistry.com", true },
- { "nadoske.info", true },
- { "nadsandgams.com", true },
- { "nadyaolcer.fr", true },
- { "naemnuk.tk", true },
- { "nafod.net", true },
- { "nafoods.com", true },
- { "naga-semi.com", true },
- { "nagashi.ma", false },
- { "nagato.tk", true },
- { "nagaya.biz", true },
- { "nagb.gov", true },
- { "nagb.org", true },
- { "nagel-dentaltechnik.de", true },
- { "nageler.org", true },
- { "nagelfam.com", true },
- { "nagoonline.com", true },
- { "nah.nz", true },
- { "nah.re", true },
- { "nahman.tk", true },
- { "nahouw.net", true },
- { "nai-job.jp", true },
- { "naia.me", true },
- { "naiaokami.me", true },
- { "naide.ee", true },
- { "naidonline.org", true },
- { "naifcare.cz", true },
- { "nailattitude.ch", false },
- { "nailchiodo.com", true },
- { "nailsalon-aztplus.com", true },
- { "nailsart.roma.it", true },
- { "nailsforyoustouffville.ca", true },
- { "nailshop.gq", true },
- { "nailtodayminneapolis.com", true },
- { "nairobibusinessreview.com", true },
- { "najedlo.sk", true },
- { "naji-astier.com", true },
- { "naka.io", true },
- { "nakalabo.jp", true },
- { "nakama.tv", true },
- { "nakandya.com", false },
- { "nakayama.industries", true },
- { "nakayama.systems", true },
- { "nakayamaresearch.com", true },
- { "nakedinkas.com", true },
- { "nakedtruthbeauty.com", true },
- { "nakene.com", true },
- { "nakim.cf", true },
- { "nakin.tk", true },
- { "nakliyat.name.tr", true },
- { "nakliyatsirketi.biz.tr", true },
- { "nakluky.cz", true },
- { "nako.no", true },
- { "nalenders.com", true },
- { "nalepky-na-zed.cz", true },
- { "nalepte.cz", true },
- { "nalexandru.xyz", true },
- { "nalsai.de", true },
- { "namaanakperempuan.net", true },
- { "namacindia.com", true },
- { "namazvakitleri.com.tr", true },
- { "namegrep.com", true },
- { "nameid.org", true },
- { "namepros.com", true },
- { "nameproscdn.com", true },
- { "namereel.com", true },
- { "nameshield.com", true },
- { "nameshield.net", true },
- { "namethatporn.com", true },
- { "nametiles.co", true },
- { "nami.exchange", true },
- { "nami.trade", true },
- { "naminam.de", true },
- { "namrs.net", true },
- { "namskra.is", true },
- { "namu.games", true },
- { "namu.la", true },
- { "namu.live", true },
- { "namu.moe", true },
- { "namu.news", true },
- { "namu.wiki", true },
- { "namus.gov", true },
- { "nan.ci", true },
- { "nan.cm", true },
- { "nan.ge", true },
- { "nan0.cloud", true },
- { "nanaimoneighbourhoods.ca", true },
- { "nanarose.ch", false },
- { "nanch.com", true },
- { "nancytelford.com", true },
- { "nancyzone.tk", true },
- { "nandex.org", true },
- { "nandito.tk", true },
- { "nange.cn", true },
- { "nanisiyou.com", true },
- { "nanjiyy.com", true },
- { "nankiseamansclub.com", true },
- { "nannycoupons.com", true },
- { "nannytax.ca", true },
- { "nano.voting", true },
- { "nanodynelabs.com", true },
- { "nanogramme.fr", false },
- { "nanopixel.ch", true },
- { "nanotechnologist.com", true },
- { "nanotechnologysolutions.com.au", true },
- { "nanotechtorsion.com", true },
- { "nanowallet.io", true },
- { "nanpuyue.com", true },
- { "nanshy.com", false },
- { "nanubo.com", true },
- { "nanubo.de", true },
- { "naomiheji.com", true },
- { "napcae.de", true },
- { "napisdata.us", true },
- { "napkins-wholesale.co.za", true },
- { "napkins-wholesale.com", true },
- { "napkins-wholesale.in", true },
- { "napkins-wholesale.nz", true },
- { "napkins-wholesale.uk", true },
- { "naplata.mk", true },
- { "napominanie.ml", true },
- { "naql.om", true },
- { "naradiebosch.sk", true },
- { "naradiehusqvarna.sk", true },
- { "naradiemakita.sk", true },
- { "narakenkoland.net", true },
- { "naralogics.com", true },
- { "narazaka.net", true },
- { "nardininaturopathic.com", true },
- { "narfation.org", true },
- { "nargele.eu", true },
- { "nargileh.nl", true },
- { "narindal.ch", true },
- { "naro.se", true },
- { "naroska.name", true },
- { "narrabeenlakesbikehire.com", true },
- { "narrativasdigitais.pt", true },
- { "narrative.org", true },
- { "narrenverein-wolkenschieber.de", true },
- { "narthollis.net", false },
- { "naruto-best.tk", true },
- { "nasbi.pl", true },
- { "nasbnation.com", false },
- { "naschenweng.info", true },
- { "naschenweng.me", true },
- { "nashdistribution.com", true },
- { "nashikmatka.com", true },
- { "nashira.cz", true },
- { "nashuaradiology.com", true },
- { "nashvillebasements.com", true },
- { "nashvillelidsurgery.com", true },
- { "nashzhou.me", true },
- { "nasladko.cz", true },
- { "naslovi.net", true },
- { "nasmocopati.com", true },
- { "nasosvdom.com.ua", true },
- { "nasrsolar.com", true },
- { "nastrojka-pianino.spb.ru", true },
- { "nastycomics.eu", true },
- { "nataez.tk", true },
- { "natalia-in-quebec.tk", true },
- { "nataliedawnhanson.com", true },
- { "natanaelys.com", false },
- { "natariusadvokat.ga", true },
- { "natasabekvalac.tk", true },
- { "natashki.tk", true },
- { "natation-nsh.com", false },
- { "natchmatch.com", true },
- { "nateandxtina.wedding", true },
- { "nategreen.org", true },
- { "natehobi.com", true },
- { "natenom.com", true },
- { "natenom.de", true },
- { "natenom.name", true },
- { "natevolker.com", true },
- { "natgeofreshwater.com", true },
- { "nathaliebaron.ch", false },
- { "nathaliebaroncoaching.ch", false },
- { "nathaliedijkxhoorn.com", true },
- { "nathaliedijkxhoorn.nl", true },
- { "nathaliesadventure.eu", true },
- { "nathan.ovh", true },
- { "nathanaeldawe.com", true },
- { "nathanbarry.com", true },
- { "nathancheek.com", false },
- { "nathankonopinski.com", true },
- { "nathanmfarrugia.com", true },
- { "nathansmetana.com", true },
- { "nation-contracting.com.hk", true },
- { "nationalaustriabank.com", true },
- { "nationalbank.gov", true },
- { "nationalbanknet.gov", true },
- { "nationalcashoffer.com", true },
- { "nationalcentereg.org", true },
- { "nationalcprfoundation.com", true },
- { "nationalcrimecheck.com.au", true },
- { "nationalcybersecuritysociety.org", true },
- { "nationalhomequotes.com", true },
- { "nationalmap.gov", true },
- { "nationalpriorities.org", true },
- { "nationalresourcedirectory.gov", true },
- { "nationalservice.gov", true },
- { "nationaltrails.ru", true },
- { "nationslending.com", true },
- { "nativeonestop.gov", true },
- { "natives-team.ch", false },
- { "nativitynj.org", true },
- { "nativs.ch", false },
- { "natlec.ch", true },
- { "natlec.com", true },
- { "natmal.net", true },
- { "natropie.pl", true },
- { "natsumihoshino.com", true },
- { "natuerlichabnehmen.ch", true },
- { "natur-care.com", true },
- { "natur.com", true },
- { "natura-sense.com", true },
- { "naturalbeautyhacks.com", true },
- { "naturalbijou.com", true },
- { "naturalcosmetics.cf", true },
- { "naturaleza.com.ar", true },
- { "naturalezafengshui.com", true },
- { "naturalfit.co.uk", true },
- { "naturalhealthcures.net", true },
- { "naturalkitchen.co.uk", true },
- { "naturalspacesdomes.com", true },
- { "naturaum.de", true },
- { "natureclaim.com", true },
- { "natureflo.net", true },
- { "naturelk.org", true },
- { "naturesbest.co.uk", true },
- { "natureshive.org", true },
- { "naturesorganichaven.com", true },
- { "naturheilpraxis-grauer.de", true },
- { "naturheilpraxis-oida.de", true },
- { "naturheilpraxis-p-grote.de", true },
- { "naturline.com", true },
- { "naturtint.co.uk", true },
- { "natusvita.com.br", true },
- { "natverkstekniker.se", true },
- { "naude.co", true },
- { "naughty.audio", true },
- { "nauris.fi", true },
- { "nausicaahotel.it", true },
- { "naut.ca", true },
- { "nautiljon.com", true },
- { "nautsch.de", true },
- { "navalarchitect.tk", true },
- { "navaneethnagesh.com", true },
- { "navarralanparty.org", true },
- { "navarrogear.com", true },
- { "navdeep.ca", true },
- { "navenlle.com", true },
- { "navienna.com", true },
- { "navient.com", true },
- { "navigator.ca", true },
- { "navlnachekg.cz", true },
- { "navroopsahdev.in", true },
- { "navstevnik.sk", true },
- { "navycs.com", true },
- { "nawir.de", true },
- { "nay.sk", true },
- { "nayahe.ru", true },
- { "nayami64.xyz", true },
- { "nayanaas.com", true },
- { "nayefalebrahim.com", true },
- { "nayr.us", true },
- { "nazarenoviso.tk", true },
- { "nazbol.tk", true },
- { "nazevfirmy.cz", true },
- { "nazimogluinsaat.com", true },
- { "nazukebanashi.com", true },
- { "nb.zone", true },
- { "nb01.com", true },
- { "nb6.de", true },
- { "nba-2k.com", true },
- { "nba-officecenter.hu", true },
- { "nba.christmas", true },
- { "nba.com.de", true },
- { "nba.de.com", true },
- { "nba.download", true },
- { "nba.gd", true },
- { "nba.gs", true },
- { "nba.gy", true },
- { "nba.hosting", true },
- { "nba.im", true },
- { "nba.live", true },
- { "nba.lu", true },
- { "nba.moe", true },
- { "nba.trade", true },
- { "nba.vc", true },
- { "nba.vg", true },
- { "nba2.com", true },
- { "nba2k.blog", true },
- { "nba2k.cc", true },
- { "nba2k.cn", true },
- { "nba2k.co", true },
- { "nba2k.com.cn", true },
- { "nba2k.download", true },
- { "nba2k.live", true },
- { "nba2k.net", true },
- { "nba2k.online", true },
- { "nba2k.tw", true },
- { "nba2kcn.com", true },
- { "nba2kmods.com", true },
- { "nba2kmt.com", true },
- { "nba2kmy.team", true },
- { "nba2kol.com", true },
- { "nba2konline.com", true },
- { "nba2konlinex.com", true },
- { "nba2kx.com", true },
- { "nba669.com", true },
- { "nba686.com", true },
- { "nbad.al", true },
- { "nbadancers.com", true },
- { "nbade.com", true },
- { "nbafile.com", true },
- { "nbagirls.com", true },
- { "nbaim.com", true },
- { "nbaimg.com", true },
- { "nbalive.cn", true },
- { "nbalivecn.com", true },
- { "nbalivex.com", true },
- { "nbari.com", true },
- { "nbask.com", true },
- { "nbasky.com", true },
- { "nbaspot.com", true },
- { "nbavc.com", true },
- { "nbavg.com", true },
- { "nbayouxi.com", true },
- { "nbclinic.co.uk", true },
- { "nbhorsetraining.com", true },
- { "nbib.gov", true },
- { "nbrii.com", true },
- { "nc-beautypro.fr", true },
- { "nc-formation.fr", true },
- { "ncands.net", true },
- { "ncarmine.com", true },
- { "ncascade.com", true },
- { "ncc-efm.com", true },
- { "ncc-efm.org", true },
- { "ncc-qualityandsafety.org", true },
- { "nccemail.net", true },
- { "nccfa.org", true },
- { "ncdc.pt", true },
- { "ncea.net.au", true },
- { "ncgt.se", true },
- { "nch.link", true },
- { "nchangfong.com", true },
- { "nchponline.org", true },
- { "ncjrs.gov", true },
- { "nclf.net", true },
- { "ncli-design.com", true },
- { "ncloud.freeddns.org", true },
- { "ncpimd001.spdns.de", true },
- { "ncrypt.at", true },
- { "ncsc.gov.uk", true },
- { "nctx.co.uk", true },
- { "ncu.world", true },
- { "ncua.gov", true },
- { "ndarville.com", true },
- { "ndbt.com", true },
- { "ndcpolipak.com", true },
- { "ndeoffshore.com", true },
- { "nder.be", true },
- { "ndfa.net", true },
- { "ndfirefighter.com", true },
- { "ndphp.org", true },
- { "ndpigskin.com", true },
- { "nds-helicopter.de", true },
- { "ndvr.com", true },
- { "ndx.ee", true },
- { "ndy.sex", true },
- { "ne-on.org", true },
- { "nea.gov", true },
- { "nealvorusphd.com", true },
- { "neanderthalia.tk", true },
- { "nearby.in.th", true },
- { "neartothesky.com", true },
- { "neasahourigan.com", false },
- { "neat-patch.de", true },
- { "neatlife.co.uk", true },
- { "neatous.cz", true },
- { "neatous.net", true },
- { "neave.tv", true },
- { "neaz.tk", true },
- { "neba.io", true },
- { "nebelhauch.de", true },
- { "nebelheim.de", true },
- { "nebenbeiblog.ch", true },
- { "nebohost.tk", true },
- { "neboley.cf", true },
- { "nebra.io", true },
- { "nebul.at", true },
- { "nebula.exchange", true },
- { "nebulae.co", true },
- { "nebuso.com", true },
- { "necessaryandproportionate.net", true },
- { "necessaryandproportionate.org", true },
- { "neckbeard.xyz", true },
- { "necord.com", true },
- { "necormansir.com", true },
- { "necromantia.tk", true },
- { "nectardigit.com", true },
- { "nectarleaf.com", true },
- { "nectir-staging.com", true },
- { "nectir.co", true },
- { "nedcdata.org", true },
- { "nederland.media", true },
- { "nederlands-vastgoedfonds.nl", true },
- { "nedermisp.nl", true },
- { "nediapp.com", true },
- { "nedim-accueil.fr", true },
- { "nedlinin.com", true },
- { "nednex.com", true },
- { "nedraconsult.ru", true },
- { "nedzadalibegovic.com", true },
- { "neecist.org", true },
- { "needemand.com", true },
- { "needfire.ga", true },
- { "needrom.com", true },
- { "needstyle.ru", true },
- { "neel.ch", true },
- { "neemdetijd.nl", true },
- { "neemzy.org", true },
- { "neev.tech", true },
- { "neferology.com", true },
- { "nefertitis.cz", true },
- { "neflabs.com", true },
- { "nefro-cme.de", true },
- { "neftis.es", true },
- { "negai.moe", true },
- { "negativecurvature.net", true },
- { "negativeentropy.org", true },
- { "negocios-imatore.com", true },
- { "negoya-shokai.info", true },
- { "negril.com", true },
- { "neheim-huesten.de", true },
- { "nehoupat.cz", true },
- { "nehrp.gov", true },
- { "nehta.gov.au", true },
- { "nei.st", true },
- { "neighborhoodelectricwa.com", true },
- { "neighborshop.de", true },
- { "neil-barrett.com", true },
- { "neil-barrett.uk", true },
- { "neildaniels.com", true },
- { "neilfarrington.com", true },
- { "neillans.co.uk", true },
- { "neillans.com", true },
- { "neilpatel.com", true },
- { "neilsonmarketing.com", true },
- { "neilwynne.com", true },
- { "nejenpneu.cz", true },
- { "nejlevnejsi-parapety.cz", true },
- { "nejmaklerka.cz", true },
- { "nejprivlac.cz", true },
- { "neko-nyan-nuko.com", true },
- { "neko-nyan.org", true },
- { "nekodex.net", true },
- { "nekomimi.pl", true },
- { "nekomimirouter.com", true },
- { "nekorektni.cz", true },
- { "nekosc.com", true },
- { "nekowa.moe", true },
- { "nekretnine-lidl.hr", true },
- { "nekusoul.de", true },
- { "nelflex.com.br", true },
- { "nelhage.com", true },
- { "nellen.it", true },
- { "nellyarias.com", true },
- { "nellydallois.fr", true },
- { "nemcd.com", true },
- { "nemecl.eu", true },
- { "nemez.net", true },
- { "nemiroth.net", true },
- { "nemo.run", true },
- { "nemopan.com", true },
- { "nemopret.dk", true },
- { "nemplex.com", true },
- { "nems.no", true },
- { "nemumu.com", true },
- { "nemunai.re", true },
- { "nemzetizaszlok.hu", true },
- { "neneko.moe", true },
- { "nenkin-kikin.jp", true },
- { "neno.io", true },
- { "neo-novarion.com", true },
- { "neo2k.dk", true },
- { "neo2shyalien.eu", false },
- { "neobits.nl", true },
- { "neochan.net", true },
- { "neochan.ru", true },
- { "neocities.org", true },
- { "neoclick.io", true },
- { "neodigital.bg", true },
- { "neodrive.ch", true },
- { "neoedresources.org", true },
- { "neoeliteconsulting.com", true },
- { "neojo.org", true },
- { "neoko.fr", true },
- { "neolaudia.es", true },
- { "neonataleducationalresources.org", true },
- { "neonatalgoldenhours.org", true },
- { "neonknight.ch", true },
- { "neons.org", true },
- { "neophilus.net", true },
- { "neos.co.jp", true },
- { "neosdesignstudio.co.uk", true },
- { "neostralis.com", true },
- { "neotiv.com", true },
- { "neoverso.tk", true },
- { "neowin.net", true },
- { "neowlan.net", true },
- { "neoxcrf.com", true },
- { "neoz.com.br", true },
- { "nepal-evolution.org", true },
- { "nepezzano13.com", true },
- { "nephelion.org", true },
- { "nephology.net.au", true },
- { "nephy.jp", true },
- { "nepovolenainternetovahazardnihra.cz", true },
- { "nepozitkova.cz", true },
- { "nepremicninar.com", true },
- { "nepremicnine-lidl.si", true },
- { "nepremicnine.click", true },
- { "nepremicnine.net", true },
- { "nepustil.net", false },
- { "nerdca.st", true },
- { "nerdherd.fun", true },
- { "nerdhouse.io", true },
- { "nerdin.space", true },
- { "nerdmind.de", true },
- { "nerdpol.ch", true },
- { "nerdpol.org", true },
- { "nerds-gegen-stephan.de", true },
- { "nerdtime.de", true },
- { "nerdwallet.com", true },
- { "nerdydev.net", true },
- { "nereustech.com", true },
- { "neriumrx.com", true },
- { "neroshana.com", true },
- { "nerot.eu", true },
- { "nerpa-club.ru", true },
- { "nertus.ua", true },
- { "nerv.com.au", true },
- { "nerven.se", true },
- { "nesabamedia.com", true },
- { "nesolabs.com", true },
- { "nesolabs.de", true },
- { "nestedquotes.ca", false },
- { "nestor.nu", true },
- { "neswec.org.uk", true },
- { "net-safe.info", true },
- { "net4visions.at", true },
- { "net4visions.de", true },
- { "netamia.com", true },
- { "netapps.de", true },
- { "netbank.com.au", true },
- { "netbears.com", true },
- { "netbears.ro", true },
- { "netbox.org", true },
- { "netbrewventures.com", true },
- { "netbulls.io", true },
- { "netbuzz.ru", true },
- { "netchameleon.com", true },
- { "netcials.in", true },
- { "netcombne.ch", true },
- { "netconnect.at", true },
- { "netcoolusers.org", true },
- { "netd.at", true },
- { "netdex.co", true },
- { "netdiode.com", true },
- { "netdiode.eu", true },
- { "netdiode.net", true },
- { "netdiode.org", true },
- { "netera.se", true },
- { "neteraser.de", true },
- { "netexpatcommunity.com", false },
- { "netfabb.com", true },
- { "netface.com.br", true },
- { "netfeeds.eu", true },
- { "netferie.de", true },
- { "netferie.dk", true },
- { "netferie.no", true },
- { "netfirmtextile.com", true },
- { "netflixlife.com", true },
- { "netfog.de", true },
- { "netfolio.pt", true },
- { "netfoundry.io", true },
- { "netframe.net", true },
- { "netfs.pl", true },
- { "netfuture.ch", true },
- { "netfxharmonics.com", true },
- { "netgaming.de", true },
- { "netguide.co.nz", true },
- { "nethack.ninja", true },
- { "nethackwiki.com", true },
- { "nethask.ru", true },
- { "nethealth.ga", true },
- { "nethorizon.cn", true },
- { "nethostingtalk.com", true },
- { "nethruster.com", true },
- { "nethui.nz", true },
- { "netki.com", true },
- { "netlentes.com.br", true },
- { "netliste.com", true },
- { "netlocal.ru", true },
- { "netmagicas.com.br", true },
- { "netmeister.org", true },
- { "netnea.com", true },
- { "netnodes.net", true },
- { "netolink.co.il", true },
- { "netolink.com", true },
- { "netpenge.tk", true },
- { "netrabota.tk", true },
- { "netraising.com", false },
- { "netrelay.email", true },
- { "netrewrite.com", true },
- { "netrider.net.au", false },
- { "netrogue.ninja", true },
- { "netronix.be", true },
- { "netsearch.ga", true },
- { "netsigna.de", true },
- { "netsite.dk", true },
- { "netsoins.org", true },
- { "netsoj.nl", true },
- { "netsparker.com", true },
- { "netsparker.com.tr", true },
- { "netspeedia.net", true },
- { "netsphere.cz", true },
- { "nettamente.com", true },
- { "nette.org", true },
- { "nettegeschenke.de", true },
- { "nettgiro.no", true },
- { "nettia.fi", true },
- { "nettilamppu.fi", true },
- { "netto-service.ch", false },
- { "nettools.link", true },
- { "nettx.co.uk", true },
- { "netube.org", true },
- { "netvizura.co.uk", true },
- { "netwarc.eu", true },
- { "netwarc.nl", true },
- { "netweaver.uk", true },
- { "networg.com", true },
- { "networg.cz", true },
- { "networg.pl", true },
- { "network-midlands.co.uk", true },
- { "network-midlands.uk", true },
- { "network23.nl", true },
- { "networkdiode.com", true },
- { "networkdiode.eu", true },
- { "networkdiode.net", true },
- { "networkdiode.org", true },
- { "networking4all.com", true },
- { "networkingnexus.net", true },
- { "networkingphoenix.com", true },
- { "networkmas.com", true },
- { "networkmidlands.co.uk", true },
- { "networkmidlands.uk", true },
- { "networkmon.net", true },
- { "networkofarts.com", true },
- { "networksolutionsconsultant.com", true },
- { "networth.at", true },
- { "networx-online.de", true },
- { "netz-yokohama.co.jp", true },
- { "netz0.com", true },
- { "netzfabrik.com", true },
- { "netzfrauen.org", true },
- { "netzklad.de", true },
- { "netzwerk-lq.com", true },
- { "netzwerkwerk.de", true },
- { "neuber.uno", true },
- { "neuflizeobc.net", true },
- { "neumarkcb.com", true },
- { "neurabyte.com", true },
- { "neurexcellence.com", true },
- { "neurobiology.com", true },
- { "neurochip.com", true },
- { "neurocny.cloud", true },
- { "neurolab.no", true },
- { "neuronus.com.br", true },
- { "neuropatia-periferica.com", true },
- { "neuropharmacology.com", true },
- { "neurostimtms.com", true },
- { "neurotransmitter.net", true },
- { "neurozentrum-zentralschweiz.ch", true },
- { "neusoft.ren", true },
- { "neutralox.com", true },
- { "neuwal.com", true },
- { "neva.li", true },
- { "nevadafiber.com", true },
- { "never.pet", true },
- { "nevergirl.tk", true },
- { "nevergreen.io", true },
- { "neverguess.ca", true },
- { "nevermore.fi", true },
- { "neverwasinparis.com", true },
- { "nevivur.net", true },
- { "nevntech.com", true },
- { "nevolution.me", true },
- { "nevoxo.com", true },
- { "nevychova.cz", true },
- { "new-black-order.com", true },
- { "new-boiler-prices.co.uk", true },
- { "new-jersey-online-casinos.com", true },
- { "new-ms.com", true },
- { "new-process.ch", true },
- { "new-process.com", true },
- { "new-process.de", true },
- { "new-process.eu", true },
- { "new-smile.cf", true },
- { "new-tuning.tk", true },
- { "new-vip.com", true },
- { "new-web-studio.com", true },
- { "newaccess.ch", true },
- { "newaygotowing.com", true },
- { "newbernpost539.com", true },
- { "newblogr.com", true },
- { "newborncryptocoin.com", true },
- { "newbrunswick.today", true },
- { "newbrunswicktoday.com", true },
- { "newburybouncycastles.co.uk", true },
- { "newburyparkelectric.com", true },
- { "newburyparkelectrical.com", true },
- { "newburyparkelectrician.com", true },
- { "newburyparkexteriorlighting.com", true },
- { "newburyparklandscapelighting.com", true },
- { "newburyparkoutdoorlighting.com", true },
- { "newcitygas.ca", true },
- { "newcityinfo.ch", false },
- { "newcitystudio.ch", false },
- { "newcloudwhodis.com", true },
- { "newcontext.com", true },
- { "newday.host", true },
- { "newdimensioninterlock.com", true },
- { "newearth.press", true },
- { "newendsoft.com", true },
- { "newenglandworkinjury.com", true },
- { "newfangledscoop.com", true },
- { "newfiepedia.ca", true },
- { "newflora.ru", true },
- { "newfordmustang.com.au", true },
- { "newforms.nl", true },
- { "newfoundland-labradorflora.ca", true },
- { "newgrowbook.com", true },
- { "newguidance.ch", false },
- { "newhamyoungbloods.co.uk", false },
- { "newillusion.tk", true },
- { "newimage.io", true },
- { "newind.info", true },
- { "newinf.at", true },
- { "newinternet.media", true },
- { "newizv.ru", false },
- { "newkaliningrad.ru", true },
- { "newknd.com", true },
- { "newlifeband.de", true },
- { "newline.online", true },
- { "newlovers.ga", true },
- { "newlovers.gq", true },
- { "newlynamed.com", true },
- { "newlytricks.ml", true },
- { "newmall.org", true },
- { "newmanwebsolutions.com", true },
- { "newmarketbouncycastlehire.co.uk", true },
- { "newmed.com.br", true },
- { "newmediaone.net", true },
- { "newmusicjackson.org", true },
- { "newodesign.com", true },
- { "neworiflame.tk", true },
- { "neworleansmenshealth.com", true },
- { "newparadigmventures.net", false },
- { "newquilters.com", true },
- { "newreleases.io", true },
- { "news-novoros.cf", true },
- { "news-srilanka.tk", true },
- { "news-sy.cf", true },
- { "news-technology.ml", true },
- { "news-trendlab.com", true },
- { "news123.ga", true },
- { "news12elite.tk", true },
- { "news47ell.com", true },
- { "news53today.tk", true },
- { "news54.tk", true },
- { "newsall.gr", true },
- { "newsarmenia.tk", true },
- { "newsbali.tk", true },
- { "newsbusiness.cf", true },
- { "newscultural.tk", true },
- { "newsdiff.eu", true },
- { "newsdiff.nl", true },
- { "newsdiffs.eu", true },
- { "newsgroups.io", true },
- { "newshell.it", true },
- { "newsinkansas.ml", true },
- { "newsinpolitics.ga", true },
- { "newsireland.tk", true },
- { "newsletteralerts.com", true },
- { "newsmotor.info", true },
- { "newsnew2020.com", true },
- { "newsound.vn", true },
- { "newspaper-myapp.herokuapp.com", true },
- { "newspiritfilms.com", true },
- { "newspsychology.com", true },
- { "newstargeted.com", true },
- { "newsuk.tk", true },
- { "newsuzbekistan.tk", true },
- { "newsvideo.tk", true },
- { "newsvoice.com", true },
- { "newsyslog.org", true },
- { "newtekstil.ga", true },
- { "newtonproject.org", true },
- { "newtons-erben.space", true },
- { "newtrackon.com", true },
- { "newvehicle.com", true },
- { "newyorkcoffeejobs.com", true },
- { "newyorkhiltonmidtown.com", true },
- { "newyorknews.tk", true },
- { "nex.li", true },
- { "nex.sx", true },
- { "nexcoda.io", true },
- { "nexd.com", true },
- { "nexgeneration-solutions.com", true },
- { "nexicafiles.com", true },
- { "next-idea.co", true },
- { "next-taxi.ru", false },
- { "next-web.ad.jp", false },
- { "next176.sk", true },
- { "next24.io", true },
- { "nextbranders.com", true },
- { "nextcairn.com", true },
- { "nextcloud.at", true },
- { "nextcloud.com", true },
- { "nextcloud.de", true },
- { "nextcloud.li", false },
- { "nextcloud.org", true },
- { "nextcom.digital", true },
- { "nextevolution.co.uk", true },
- { "nextfm.tk", true },
- { "nextgen-life-insurance.com", true },
- { "nextgen.sk", true },
- { "nextgenthemes.com", true },
- { "nextgreatmess.com", true },
- { "nextiot.de", true },
- { "nextiva.com", true },
- { "nextmbta.com", true },
- { "nextnely.com", true },
- { "nextnowagency.com", true },
- { "nextos.com", true },
- { "nextrend.co", true },
- { "nextstart-staging.azurewebsites.net", true },
- { "nextstart.azurewebsites.net", true },
- { "nextstep-labs.gr", true },
- { "nextwab.com", true },
- { "nexus-exit.de", true },
- { "nexwebsites.com", true },
- { "nexxus-sistemas.net.br", true },
- { "neyer-lorenz.de", true },
- { "nezrouge-est-vaudois.ch", false },
- { "nezrouge-geneve.ch", false },
- { "nf9q.com", true },
- { "nfam.de", true },
- { "nfe-elektro.de", true },
- { "nfl.ddns.net", true },
- { "nfl.dedyn.io", true },
- { "nfl.duckdns.org", true },
- { "nflmocks.com", true },
- { "nfls.io", true },
- { "nflsic.org", true },
- { "nfltshirt.com", true },
- { "nfpors.gov", true },
- { "nframe.io", true },
- { "nfsec.pl", true },
- { "nfz.moe", true },
- { "ng-musique.com", true },
- { "ng911services.com", true },
- { "ngasembaru.com", true },
- { "ngc.gov", false },
- { "ngetik.id", true },
- { "nghe.net", true },
- { "ngi.eu", true },
- { "nginxconfig.com", true },
- { "ngmx.com", true },
- { "ngmx.net", true },
- { "ngmx.org", true },
- { "ngospelmedia.net", true },
- { "ngt.gr", true },
- { "nguru.net", true },
- { "nguyencucthanh.com", true },
- { "nguyendiep.com", true },
- { "nguyenhongson.me", true },
- { "nguyenminhhung.com", false },
- { "ngvf.de", true },
- { "ngx.hk", true },
- { "ngxpkg.com", true },
- { "nhakhoabella.com", true },
- { "nhanlucnhatban.com", true },
- { "nhchalton.com", true },
- { "nhdsilentheroes.org", true },
- { "nhglobalpartners.com", true },
- { "nhimf.org", true },
- { "nhnieuws.nl", true },
- { "nhome.ba", true },
- { "nhsolutions.be", false },
- { "nhv-vintagelemans.com", true },
- { "nhw.ovh", true },
- { "ni-mate.com", true },
- { "ni.search.yahoo.com", false },
- { "niadd.com", true },
- { "niagara.ru", false },
- { "niagarafalls.ca", true },
- { "niagarafallsmuseums.ca", true },
- { "niagaraschoice.org", true },
- { "nibb13.tech", true },
- { "nibletllc.com", true },
- { "nibo.blog", true },
- { "nibouw.nl", true },
- { "nic.ads", true },
- { "nic.android", true },
- { "nic.app", true },
- { "nic.boo", true },
- { "nic.cal", true },
- { "nic.channel", true },
- { "nic.chrome", true },
- { "nic.dad", true },
- { "nic.day", true },
- { "nic.dclk", true },
- { "nic.dev", true },
- { "nic.docs", true },
- { "nic.drive", true },
- { "nic.eat", true },
- { "nic.esq", true },
- { "nic.fly", true },
- { "nic.foo", true },
- { "nic.gbiz", true },
- { "nic.gle", true },
- { "nic.gmail", true },
- { "nic.goog", true },
- { "nic.google", true },
- { "nic.gov", true },
- { "nic.guge", true },
- { "nic.hangout", true },
- { "nic.here", true },
- { "nic.how", true },
- { "nic.ing", true },
- { "nic.meet", true },
- { "nic.meme", true },
- { "nic.mov", true },
- { "nic.new", true },
- { "nic.nexus", true },
- { "nic.page", true },
- { "nic.play", true },
- { "nic.prod", true },
- { "nic.prof", true },
- { "nic.rsvp", true },
- { "nic.soy", true },
- { "nic.xn--q9jyb4c", true },
- { "nic.youtube", true },
- { "nic.zip", true },
- { "nicastrosalvatore.tk", true },
- { "nice.ch", true },
- { "niceguyit.biz", true },
- { "nicesco.re", true },
- { "nicestudio.co.il", false },
- { "nicetaninaka.com", true },
- { "nichesite.gq", true },
- { "nichi.co", true },
- { "nichijou.com", true },
- { "nicholasperkins.io", true },
- { "nicholaspruss.com", true },
- { "nicholasquigley.com", true },
- { "nicholasrhodes.co.uk", true },
- { "nicholasruddick.com", true },
- { "nicholaswilliams.net", true },
- { "nicht-blau.de", true },
- { "nichteinschalten.de", false },
- { "nichthelfer.de", true },
- { "nicic.gov", true },
- { "nick-slowinski.de", true },
- { "nickcraver.com", true },
- { "nickdekruijk.nl", true },
- { "nickfrost.rocks", true },
- { "nickguyver.com", true },
- { "nickhitch.co.uk", true },
- { "nickkallis.com", true },
- { "nickloose.de", true },
- { "nickmchardy.com", true },
- { "nickmorri.com", true },
- { "nickmorris.name", true },
- { "nickplotnek.co.uk", true },
- { "nickrickard.co.uk", true },
- { "nicks-autos.com", true },
- { "nickscomputers.nl", true },
- { "nickserv.eu", true },
- { "nickserve.com", true },
- { "nickserve.eu", true },
- { "nickserve.net", true },
- { "nickserve.nl", true },
- { "nickserve.org", true },
- { "nickstories.de", true },
- { "niclasreich.de", true },
- { "niclewis.me", true },
- { "nico.st", true },
- { "nicochinese.com", true },
- { "nicocourts.com", true },
- { "nicogrosser.de", true },
- { "nicoknibbe.nl", true },
- { "nicoladixonrealestate.com", true },
- { "nicolaiteglskov.dk", true },
- { "nicolajanedesigns.co.uk", true },
- { "nicolaottomano.it", true },
- { "nicolas-dumermuth.com", true },
- { "nicolas-hoffmann.net", false },
- { "nicolas-hoizey.com", true },
- { "nicolas-simond.ch", true },
- { "nicolas-simond.com", true },
- { "nicolascornet.com", true },
- { "nicolasfriedli.ch", true },
- { "nicolasiung.me", true },
- { "nicolaspecher.com", true },
- { "nicolaszambetti.ch", true },
- { "nicolaw.uk", true },
- { "nicolemathew.com", true },
- { "nicoleta-prestescu.tk", true },
- { "nicolettajennings.com", true },
- { "nicoobank.com", true },
- { "nicsezcheckfbi.gov", true },
- { "nicul.in", true },
- { "nidhoeggr.duckdns.org", true },
- { "nidro.de", true },
- { "nidsuber.ch", true },
- { "niederalt.com", true },
- { "niederohmig.de", true },
- { "niekbrekelmans.nl", true },
- { "nielsbohr.ai", true },
- { "nien.co", true },
- { "nien.com", true },
- { "nien.eu.org", true },
- { "nien.org", true },
- { "nienkeslop.nl", true },
- { "nierenpraxis-dr-merkel.de", true },
- { "nierenpraxis-merkel.de", true },
- { "niers.land", true },
- { "nieselregen.com", true },
- { "niess.space", true },
- { "niesstar.com", false },
- { "nietzsche.com", true },
- { "nieuwpoort.tk", true },
- { "nieuwsberichten.eu", true },
- { "nieuwsfiets.nu", true },
- { "nieuwslagmaat.nl", true },
- { "nifc.gov", true },
- { "niftiestsoftware.com", true },
- { "nigelwakefield.com", true },
- { "nigensha.co.jp", true },
- { "niggo.eu", true },
- { "night2stay.cn", true },
- { "night2stay.de", true },
- { "night2stay.fr", true },
- { "night2stay.ru", true },
- { "nightfirec.at", true },
- { "nightmoose.org", true },
- { "nightscapesoutdoorlighting.com", true },
- { "nightsi.de", true },
- { "nightstand.io", true },
- { "nihaarpstars.com", true },
- { "niituva.ga", true },
- { "nij.gov", true },
- { "nijiero-ch.com", false },
- { "nijikata.com", true },
- { "nijm.nl", true },
- { "nijniy-novgorod.tk", true },
- { "nika-travel.ga", true },
- { "nikandcara.com", true },
- { "nikavandenbos.nl", true },
- { "nikifoth.io", true },
- { "nikimix.com", false },
- { "nikitenko.tk", true },
- { "nikitin.photo", true },
- { "nikkasystems.com", true },
- { "nikkila.me", true },
- { "nikklassen.ca", true },
- { "niklas.pw", true },
- { "niklasbabel.com", true },
- { "niklasstinkt.com", true },
- { "nikolahost.tk", true },
- { "nikolai-schmidt.tk", true },
- { "nikomo.fi", false },
- { "nikoninframe.co.uk", true },
- { "nikonlibrary.co.uk", true },
- { "nikonnps.co.uk", true },
- { "nikonpromotions.co.uk", true },
- { "nikpool.com", true },
- { "nil.gs", true },
- { "nil.mx", true },
- { "nila.store", true },
- { "nilahue.com", true },
- { "niles.xyz", true },
- { "nilgirispice.co.uk", true },
- { "nimanranch.com", true },
- { "nimbo.com.au", true },
- { "nimidam.com", true },
- { "nina-woerz.tk", true },
- { "ninaforever.com", true },
- { "ninaundandre.de", true },
- { "ninchat.com", true },
- { "ninebennink.com", true },
- { "ninepints.co", true },
- { "ninetailed.ninja", true },
- { "ninetaillabs.com", true },
- { "ninetaillabs.xyz", true },
- { "ninfora.com", true },
- { "ningbo.co.uk", true },
- { "ningwei.net", true },
- { "ninja-galerie.de", true },
- { "ninja-skillz.com", true },
- { "ninjaworld.co.uk", true },
- { "ninkt.com", true },
- { "ninmegam.gq", true },
- { "ninofink.com", true },
- { "nintendohill.com", true },
- { "ninth.cat", true },
- { "ninthfloor.org", true },
- { "ninverse.com", true },
- { "niourk.com", true },
- { "nipax.cz", true },
- { "nipe-systems.de", true },
- { "nipit.biz", true },
- { "nippangift.com", true },
- { "nippel.tk", true },
- { "nipplefucking.com", true },
- { "nippon-oku.com", true },
- { "nipponkempoph.tk", true },
- { "nipponnews.tk", true },
- { "niqex.com", true },
- { "nirhub.ru", true },
- { "nirjonmela.com", true },
- { "nirjonmela.net", true },
- { "nirvanashop.com", true },
- { "niscats.com", true },
- { "nishimebistro.cz", true },
- { "nissanofbismarckparts.com", true },
- { "nist.tech", true },
- { "nitifilter.com", true },
- { "nitrix.me", true },
- { "nitrohorse.com", false },
- { "nitrokey.com", true },
- { "nitropanel.com", true },
- { "nitropur.com", true },
- { "nitropur.de", true },
- { "nitrous-networks.com", true },
- { "nitschinger.at", true },
- { "nitter.net", true },
- { "niu.moe", false },
- { "niumactive.it", true },
- { "nivelul2.ro", true },
- { "nivoit.cf", true },
- { "nixnet.email", true },
- { "nixnet.services", true },
- { "nixnetmail.com", true },
- { "nixonlibrary.gov", true },
- { "niyawe.de", true },
- { "niyazpoyilan.com", false },
- { "niyen.com", true },
- { "niyen.eu", true },
- { "niyen.net", true },
- { "niyen.org", true },
- { "nja.id.au", true },
- { "njast.net", true },
- { "njcareers.org", true },
- { "njguardtraining.com", true },
- { "njilc.com", true },
- { "njpjanssen.nl", true },
- { "njprimary.com", true },
- { "nkapliev.org", true },
- { "nkbwnx.com", true },
- { "nkinka.de", true },
- { "nkio.de", true },
- { "nkjwmn.com", true },
- { "nkjwrs.com", true },
- { "nkorolev.tk", true },
- { "nkp.bg", true },
- { "nksky.cn", true },
- { "nl-comunistas.tk", true },
- { "nl-ix.net", true },
- { "nl-xs.com", true },
- { "nl.search.yahoo.com", false },
- { "nl3ehv.nl", true },
- { "nlagstage.in", true },
- { "nlap.ca", false },
- { "nlbewustgezond.nl", true },
- { "nlc.org.au", true },
- { "nlegall.fr", true },
- { "nllboard.co.uk", true },
- { "nlleisure.co.uk", true },
- { "nlm.gov", true },
- { "nlpdiscovery.ro", true },
- { "nlt.by", false },
- { "nmd.so", true },
- { "nmmlp.org", true },
- { "nmnd.de", true },
- { "nmontag.com", true },
- { "nms-thoracic-surgery.com", true },
- { "nn-vol.ga", true },
- { "nn.cz", true },
- { "nna774.net", true },
- { "nnews.tk", true },
- { "nnnow.com", true },
- { "no-ice.be", true },
- { "no-ice.nl", true },
- { "no-ip.cz", true },
- { "no-real.tk", true },
- { "no-xice.com", false },
- { "no.search.yahoo.com", false },
- { "noagendahr.org", true },
- { "noah-witt.com", true },
- { "noahenco.nl", true },
- { "noahjacobson.com", true },
- { "noahmodas.com.br", true },
- { "noahsaso.com", true },
- { "noahwitt.me", true },
- { "nob.ro", true },
- { "nobilefoods.com", true },
- { "nobitakun.com", true },
- { "nobledust.com", true },
- { "nobleparkapartments.com.au", true },
- { "nobly.de", true },
- { "nobodyplex.gq", true },
- { "nobreaks.ca", true },
- { "nobreinox.com.br", true },
- { "noc.org", true },
- { "nocks.com", true },
- { "noclegiwchecinach.pl", true },
- { "nocloud.website", true },
- { "nocmd.com", true },
- { "nocommentsallowed.com", true },
- { "nocturnus.tk", true },
- { "nodecdn.net", true },
- { "nodecraft.com", true },
- { "nodeedge.com", true },
- { "nodejs.de", true },
- { "nodelab-it.de", true },
- { "nodelia.com", true },
- { "nodesec.cc", true },
- { "nodespin.com", true },
- { "nodevops.com", true },
- { "noeatnosleep.me", true },
- { "noedidacticos.com", true },
- { "noelclaremont.com", true },
- { "noellabo.jp", true },
- { "noellimpag.me", true },
- { "noematic.space", true },
- { "noemax.com", true },
- { "noeontheend.com", true },
- { "noexec.org", true },
- { "nofrillsdns.com", true },
- { "noga4you.de", true },
- { "nogerondier.eu", true },
- { "nogetime.com", true },
- { "noglobalwarrants.org", true },
- { "nogradhont.hu", true },
- { "nohats.ca", true },
- { "nohkan.fr", false },
- { "nohttps.org", true },
- { "nohup.se", true },
- { "nohup.xyz", true },
- { "noiglosujemy.com.pl", true },
- { "noiglosujemy.pl", true },
- { "noima.com", true },
- { "noincludesubdomains.preloaded.test", false },
- { "noise.agency", true },
- { "noisetrap.cz", true },
- { "noisky.cn", true },
- { "noisyfox.cn", true },
- { "noites.pt", true },
- { "nokia.la", true },
- { "nokono.com", true },
- { "nokya.tk", true },
- { "nolaviz.org", true },
- { "noleggio-bagni-chimici.it", true },
- { "noleggioimbarcazioni.it", true },
- { "noleggiolimousine.roma.it", true },
- { "noma-film.com", true },
- { "nomadichome.com", true },
- { "nomadichome.org", true },
- { "nomadichomes.com", true },
- { "nomadichomes.org", true },
- { "nomadicrootsco.com", true },
- { "nomadproject.io", true },
- { "nomagic.software", true },
- { "nomaster.cc", true },
- { "nomenclator.org", true },
- { "nomesbiblicos.com", true },
- { "nomial.co.uk", true },
- { "nomifensine.com", true },
- { "nomsy.net", true },
- { "nomzamo.spdns.org", true },
- { "noname-ev.de", true },
- { "noncombatant.org", true },
- { "nonglamfarm.vn", true },
- { "nontonfilem.ml", true },
- { "noob-box.net", true },
- { "nooben.com", true },
- { "noobow.me", true },
- { "noobsrus.co.uk", true },
- { "noobsunited.de", true },
- { "noobunbox.net", true },
- { "noodles.net.nz", false },
- { "noodplan.co.za", true },
- { "noomist.com", true },
- { "noon-entertainments.com", true },
- { "noonan.family", true },
- { "noop.ch", true },
- { "noop.com.au", true },
- { "noordsee.de", true },
- { "noordwesthoekrit.nl", true },
- { "noorsolidarity.com", false },
- { "noortronic.com", true },
- { "noosxe.com", true },
- { "nootronerd.com", true },
- { "nootropic.com", true },
- { "noovell.com", true },
- { "nooverviewavailable.com", true },
- { "nopaincenter.ro", true },
- { "nopajam.tk", true },
- { "nopaste.xyz", true },
- { "nopaynocure.com", true },
- { "nophelet.com", true },
- { "norad.sytes.net", true },
- { "noradevot.com", true },
- { "norala.tk", true },
- { "noranowak.com", true },
- { "norapiero.com", true },
- { "norbertschneider-music.com", true },
- { "nord-sud.be", true },
- { "nordfinck.de", true },
- { "nordicirc.com", true },
- { "nordicsrit.tk", true },
- { "nordinfo.fi", true },
- { "nordlichter-brv.de", true },
- { "nordlocker.com", true },
- { "nordmoregatebilklubb.com", true },
- { "nordnetz-hamburg.de", true },
- { "nordpass.com", true },
- { "nordsec.com", true },
- { "nordseeblicke.de", true },
- { "nordstromheating.com", true },
- { "nordvestkysten.de", true },
- { "nordvestkysten.dk", true },
- { "nordvpn.com", true },
- { "nordvpnteams.com", true },
- { "nordwaldzendo.de", true },
- { "noreply.mx", true },
- { "norestfortheweekend.com", true },
- { "norfolkgardencare.co.uk", true },
- { "norichanmama.com", true },
- { "noriel.ro", true },
- { "normaculta.com.br", true },
- { "norman-preusser-gmbh.de", true },
- { "normanbauer.com", true },
- { "normandgascon.com", true },
- { "normankranich.de", true },
- { "normansolutions.co.uk", true },
- { "normapro.es", true },
- { "norml.fr", true },
- { "noroshi-burger.com", true },
- { "norrlandsbilverkstad.se", true },
- { "norrliden.de", true },
- { "norsewars.com", true },
- { "norskpensjon.no", true },
- { "northampton-vets.co.uk", true },
- { "northatlantalaw.net", true },
- { "northbengaltourism.com", true },
- { "northbridgecre.com", true },
- { "northcoastlabs.com", true },
- { "northconsulting.fr", true },
- { "northcreekresort.com", true },
- { "northcreekresortblue.ca", true },
- { "northdakotahealthnetwork.com", true },
- { "northdevonbouncycastles.co.uk", true },
- { "northeastcdc.org", true },
- { "northeastrodeo.co.uk", true },
- { "northebridge.com", true },
- { "northern-lakes.com", true },
- { "northerngate.net", true },
- { "northernpowertrain.com", true },
- { "northernselfstorage.co.za", true },
- { "northfieldyarn.com", true },
- { "northkoreainsider.tk", true },
- { "northokanaganbookkeeping.com", true },
- { "northpointoutdoors.com", true },
- { "northpole.dance", true },
- { "northpost.is", true },
- { "northridgeelectrical.com", true },
- { "northrose.net", true },
- { "northscottsdaleloan.com", true },
- { "northtexasvasectomy.com", true },
- { "northwoodstudios.org", true },
- { "norys-escape.de", true },
- { "nos-medias.fr", true },
- { "nos-oignons.net", true },
- { "noscript.net", true },
- { "noscura.nl", true },
- { "noseastumismo.com", true },
- { "nosecrets.ch", true },
- { "noslite.nl", true },
- { "nossasenhora.net", true },
- { "nossasenhoradopranto.pt", true },
- { "nostalgimidi.se", true },
- { "nostalgische-attracties.nl", true },
- { "nostraforma.com", false },
- { "nosuch.blog", true },
- { "noswap.com", true },
- { "nosyu.pe.kr", true },
- { "nota.moe", true },
- { "notablepeeps.com", true },
- { "notabug.org", true },
- { "notacooldomain.com", true },
- { "notadd.com", true },
- { "notallmine.net", true },
- { "notar-glagowski.com", true },
- { "notar-glagowski.de", true },
- { "notar-peikert.com", true },
- { "notare-marktplatz24.info", true },
- { "notariusz-bialystok.com", true },
- { "notariuszprzybylowicz.pl", true },
- { "notariuszsych.pl", true },
- { "notarkrauss.de", true },
- { "notcompletelycorrect.com", true },
- { "note64.com", true },
- { "noteboat.net", true },
- { "notecoffee.tw", true },
- { "notedinstyle.co.uk", true },
- { "notenarchiv.eu", true },
- { "notepad.nz", true },
- { "noteskeeper.ru", true },
- { "nothinfancy.ca", true },
- { "nothing.net.nz", true },
- { "noticaballos.com", true },
- { "noticiasdetv.com", true },
- { "notifications.net", true },
- { "notigatos.es", true },
- { "notilus.fr", true },
- { "notilus.it", true },
- { "notjustvacs.com", true },
- { "notmybox.com", true },
- { "notmyserver.com", true },
- { "notnize.net", true },
- { "notnl.com", true },
- { "notofilia.com", true },
- { "notora.tech", true },
- { "nototema.com", true },
- { "notsafefor.work", true },
- { "nottres.com", true },
- { "nou.vn", true },
- { "nou9ta.tk", true },
- { "noudjalink.nl", true },
- { "nougat-anduze.fr", true },
- { "nourishandnestle.com", true },
- { "noustique.com", true },
- { "noustramits.com", true },
- { "nousyukum.com", true },
- { "nouveauhosting.com.au", true },
- { "nova-dess.ch", false },
- { "nova-wd.org.uk", true },
- { "nova.live", true },
- { "novabench.com", true },
- { "novacoaching.nl", true },
- { "novacoast.com", false },
- { "novadermis.es", true },
- { "novafreixo.pt", true },
- { "novaiguacu.net.br", true },
- { "novak.cf", true },
- { "novanetwork.ml", true },
- { "novascan.net", true },
- { "novawave.ca", true },
- { "nove.city", true },
- { "noveciti.com", true },
- { "novecity.com", true },
- { "novecity.it", true },
- { "novecity.org", true },
- { "novecitymail.com", true },
- { "novel543.com", true },
- { "novelfeed.com", true },
- { "novelinglife.net", false },
- { "novema.jp", true },
- { "novengi.mu", true },
- { "novfishing.ru", true },
- { "novgorod-avia.ru", true },
- { "novichok.ml", true },
- { "novilaw.com", true },
- { "novilidery.com", true },
- { "novinhabucetuda.com", true },
- { "novinivo.com", true },
- { "novinkihd.tk", true },
- { "novinminer.com", true },
- { "novobi.com", true },
- { "novogradnje.si", true },
- { "novojet.cl", true },
- { "novokuznetsk.tk", true },
- { "novonegoc.io", true },
- { "novoregalos.com", true },
- { "novoresume.com", false },
- { "novorossiysk.tk", true },
- { "novorussiya.tk", true },
- { "novoselie.ga", true },
- { "novosibavia.ru", true },
- { "novotoznanie.com", true },
- { "novurania.com", true },
- { "novysvit.com.ua", true },
- { "now.sh", true },
- { "now101atm.tk", true },
- { "nowarning.cc", true },
- { "nowhere.dk", true },
- { "nowitzki.me", true },
- { "nowitzki.network", true },
- { "nowlas.org", false },
- { "nowloading.co", true },
- { "nowzuwan.org", false },
- { "noxlogic.nl", true },
- { "noxx.global", true },
- { "noxx.solutions", true },
- { "noydeen.com", true },
- { "noyocenter.org", true },
- { "np-edv.at", true },
- { "np.search.yahoo.com", false },
- { "np39.de", true },
- { "npaccel.com", true },
- { "npath.de", true },
- { "npbeta.com", true },
- { "npchosting.com", true },
- { "npcrcss.org", true },
- { "npdigital.com", true },
- { "nphrm.com", true },
- { "npmcdn.com", true },
- { "npod.me", true },
- { "npregion.org", true },
- { "npsas.org", true },
- { "nr-sputnik.ru", true },
- { "nrd.gov", true },
- { "nrd.li", true },
- { "nrev.ch", false },
- { "nriol.net", true },
- { "nrkn.fr", true },
- { "nrsmart.com", true },
- { "nrsweb.org", true },
- { "nrthcdn.me", true },
- { "nrvc.net", true },
- { "nrvn.cc", false },
- { "ns-frontier.com", true },
- { "ns2servers.pw", true },
- { "nsa.ovh", true },
- { "nsadns.uk", true },
- { "nsapwn.com", true },
- { "nsboston.org", true },
- { "nscnet.jp", true },
- { "nscondominios.pt", true },
- { "nsfw-story.com", true },
- { "nshipster.cn", true },
- { "nshipster.co.kr", true },
- { "nshipster.com", true },
- { "nshipster.es", true },
- { "nsine.be", true },
- { "nsm.ee", true },
- { "nsm.stat.no", true },
- { "nsnsp.org", true },
- { "nso.ie", true },
- { "nsofficeinteriors.com", true },
- { "nsoft.nu", true },
- { "nsp.ua", true },
- { "nspawn.org", true },
- { "nstd.net", true },
- { "nstinvoiceqa.com", true },
- { "nstnet.org", true },
- { "nsworks.com", true },
- { "ntags.org", true },
- { "ntcp.ph", true },
- { "nte.email", true },
- { "nti.de", true },
- { "ntia.gov", true },
- { "ntlabs.org", true },
- { "ntotten.com", true },
- { "ntppool.org", false },
- { "ntsb.gov", true },
- { "ntx360grad-fallakte.de", true },
- { "ntzlaw.com", true },
- { "ntzwrk.org", true },
- { "nu3tion.com", true },
- { "nu3tion.cz", true },
- { "nuacht.ie", true },
- { "nualgiponds.com", true },
- { "nuamooreaindonesia.com", true },
- { "nubehogar.nsupdate.info", true },
- { "nuclea.id", true },
- { "nuclearcat.com", true },
- { "nucleosynth.space", true },
- { "nudeimg.com", true },
- { "nudevotion.com", true },
- { "nudge.ai", true },
- { "nuel.cl", true },
- { "nuevaimagenpublicidad.es", true },
- { "nuffield.nl", true },
- { "nugmanov.net", true },
- { "nuipogoda.ru", true },
- { "nuits-franciliennes.fr", true },
- { "null-life.com", true },
- { "nullday.de", true },
- { "nulle-part.org", true },
- { "nullonerror.org", true },
- { "nullroute.com", true },
- { "nullscripts.tk", true },
- { "nullwebscripts.com", true },
- { "nullxsec.net", true },
- { "nully.xyz", true },
- { "numarasorgulama.tel", true },
- { "numatic.co.uk", true },
- { "numbercult.net", true },
- { "numbermunchers.net", true },
- { "numberoneshoes.co.nz", true },
- { "numberzero.org", true },
- { "numbrz.co.uk", true },
- { "numericall.gq", true },
- { "numerik-games.ch", false },
- { "numeritelefonici.it", true },
- { "numero-aleatorio.com", true },
- { "numero1.ch", false },
- { "numerologist.com", true },
- { "numo.co", true },
- { "numwave.nl", true },
- { "nunesgh.com", true },
- { "nunnenmacher.net", true },
- { "nunnun.jp", true },
- { "nunoleiria.com", true },
- { "nunomoura.com", true },
- { "nuntiicaelo.in.ua", true },
- { "nunu.io", true },
- { "nuoha.com", true },
- { "nuovaelle.it", true },
- { "nuovavetro.com", true },
- { "nuquery.com", true },
- { "nur.berlin", true },
- { "nureg.club", true },
- { "nureg.net", true },
- { "nureg.xyz", true },
- { "nuriacamaras.com", true },
- { "nurmio.fi", true },
- { "nursejj.com", true },
- { "nursemom.ca", true },
- { "nurseregistry.com", true },
- { "nurses.dating", true },
- { "nuryahan.com.br", true },
- { "nusaceningan.io", false },
- { "nusatrip-api.com", true },
- { "nussadoclub.org", true },
- { "nut-dev.com", true },
- { "nutbot.co.uk", true },
- { "nutextonline.com", true },
- { "nutikell.com", true },
- { "nutleyeducationalfoundation.org", true },
- { "nutleyef.org", true },
- { "nutpanda.com", true },
- { "nutra-creations.com", true },
- { "nutradian.com", true },
- { "nutrafitsuplementos.com.br", true },
- { "nutralivbio.com", true },
- { "nutrashop.fr", true },
- { "nutri-spec.me", true },
- { "nutricaovegana.com", true },
- { "nutridieta.com", true },
- { "nutripedia.gr", true },
- { "nutrishop.com", true },
- { "nutrition.gov", true },
- { "nutritionalsupplement.co.uk", true },
- { "nutrizionista.roma.it", true },
- { "nuvechtdal.nl", true },
- { "nuverabusiness.com", true },
- { "nuveratechtrends.com", true },
- { "nuvini.com", true },
- { "nuxer.fr", true },
- { "nvfoundation.com", true },
- { "nvl-game.tokyo", true },
- { "nvmo.org", true },
- { "nvoip.com.br", true },
- { "nvq.nl", true },
- { "nvr.bz", true },
- { "nvtc.gov", true },
- { "nwautorebuild.com", true },
- { "nwbc.gov", true },
- { "nwea.nl", true },
- { "nwerc.party", true },
- { "nwgh.org", false },
- { "nwh.nz", true },
- { "nwitt.us", true },
- { "nwk1.com", true },
- { "nwmd.nl", false },
- { "nwperformanceandoffroad.com", true },
- { "nwra.com", true },
- { "nwradio.tk", true },
- { "nwtrb.gov", true },
- { "nwuss.okinawa", true },
- { "nwwc.dk", true },
- { "nwwnetwork.net", true },
- { "nxcd.com.br", true },
- { "nxgn.io", true },
- { "nxinfo.ch", false },
- { "nxit.ca", true },
- { "nxtgenbroadband.in", true },
- { "nxth.io", true },
- { "nya.as", true },
- { "nyadora.com", true },
- { "nyadora.moe", true },
- { "nyan.it", true },
- { "nyan.kim", true },
- { "nyan.stream", true },
- { "nyansparkle.com", true },
- { "nyantec.com", true },
- { "nybiz.nyc", false },
- { "nycfilmcrew.com", true },
- { "nyconcretelifting.com", true },
- { "nycoyote.org", true },
- { "nycrerc.com", true },
- { "nydig.com", true },
- { "nyerjachioval.hu", true },
- { "nyerjakekszekkel.hu", true },
- { "nyerjanegroval.hu", true },
- { "nyerjenaheraval.hu", true },
- { "nyhaoyuan.net", true },
- { "nyiad.edu", true },
- { "nyip.edu", true },
- { "nylasercenter.com.pl", true },
- { "nylevemusic.com", true },
- { "nyloc.de", true },
- { "nymity.com", true },
- { "nymphetomania.net", true },
- { "nynex.net", true },
- { "nyoliveoil.com", true },
- { "nyoronfansubs.org", true },
- { "nyphox.ovh", true },
- { "nysis.fr", true },
- { "nysis.net", true },
- { "nysis.org", true },
- { "nysteak5.com", true },
- { "nystudio107.com", true },
- { "nytrafficticket.com", true },
- { "nyzed.com", true },
- { "nzelaweb.com", true },
- { "nzstudy.ac.nz", true },
- { "nzws.me", false },
- { "o-aconsult.com", true },
- { "o-results.ch", true },
- { "o-s.no", true },
- { "o-sp.com", true },
- { "o15y.com", true },
- { "o2oxy.cn", true },
- { "o2ss.com", true },
- { "o3.wf", true },
- { "o36533.com", true },
- { "o36594.com", true },
- { "o3ptitschats.fr", true },
- { "o3wallet.com", true },
- { "o5.cx", false },
- { "o6asan.com", true },
- { "o9721.com", false },
- { "o98.com", true },
- { "o98.net", true },
- { "oacloud.nl", true },
- { "oadeo.com", true },
- { "oahpmdata.net", true },
- { "oaic.gov.au", true },
- { "oakbarnvets.com", true },
- { "oakesfam.net", true },
- { "oakface.club", true },
- { "oakface.com.au", true },
- { "oakington.info", false },
- { "oakparkelectrical.com", true },
- { "oakparkexteriorlighting.com", true },
- { "oakparklandscapelighting.com", true },
- { "oakparklighting.com", true },
- { "oakparkmedicalcentre.ga", true },
- { "oakparkoutdoorlighting.com", true },
- { "oakshield.nl", true },
- { "oakslighting.co.uk", true },
- { "oaktree-realtors.com", true },
- { "oakwood-park.tk", true },
- { "oasiristorantebagno.it", true },
- { "oasis-conference.org.nz", false },
- { "oasis9.net", true },
- { "oasisdabeleza.com.br", true },
- { "oasisim.net", false },
- { "oasisorthodontics.com.au", true },
- { "oatmealdome.me", true },
- { "oauth.how", true },
- { "obamalibrary.gov", true },
- { "obamawhitehouse.gov", true },
- { "obasigeorge.com", true },
- { "obdchekautomotriz.co", true },
- { "obec-krakovany.cz", true },
- { "oberhof-hotel.de", true },
- { "oberhofdrinks.com", true },
- { "obermeiers.eu", true },
- { "oberoi.de", true },
- { "obesidadlavega.com", true },
- { "obfuscate.xyz", true },
- { "obg-global.com", true },
- { "obgalslancaster.com", true },
- { "obgynmiamifl.com", true },
- { "object.earth", true },
- { "objectif-securite.ch", true },
- { "objectif-terre.ch", false },
- { "objectorientedsolutions.com", true },
- { "objekt-textil.ch", false },
- { "objetperso.fr", true },
- { "oblast45.ru", false },
- { "obligacjekk.pl", true },
- { "obliviate.io", true },
- { "obmen-vizitami.ml", true },
- { "obnalichka.ga", true },
- { "oboeta.com", true },
- { "obono.at", true },
- { "obozrevatel.tk", true },
- { "obra.com.br", true },
- { "obrienswine.ie", true },
- { "obs.group", true },
- { "obscur.us", true },
- { "observer.name", true },
- { "obsessharness.com", true },
- { "obsproject.com", true },
- { "obtima.org", true },
- { "obuchowicz.pl", true },
- { "obud.cz", true },
- { "obxlistings.com", true },
- { "obyvateleceska.cz", true },
- { "obzor-znakomstv.tk", true },
- { "obzoroff.asia", true },
- { "obzoroff.info", true },
- { "oc-sa.ch", false },
- { "ocachik.com.br", true },
- { "ocad.com.au", true },
- { "ocalaflwomenshealth.com", true },
- { "ocarupo.com", true },
- { "occ.gov", true },
- { "occenterprises.org", true },
- { "occentus.net", true },
- { "occonnections.org", true },
- { "occultisme.tk", true },
- { "occupational-therapy-colleges.com", true },
- { "ocd2016.com", true },
- { "oceanbreezehomes.com", true },
- { "oceandns.eu", true },
- { "oceandns.net", true },
- { "oceandns.nl", true },
- { "oceanlogisticgroup.com", true },
- { "oceanlord.me", true },
- { "oceanofapk.com", true },
- { "oceanspraymiami.com", false },
- { "oceanvisuals.com", true },
- { "ocenka-nedv.ml", true },
- { "ocenovani-inspekce.cz", true },
- { "ocf.io", true },
- { "ocg-card.com", true },
- { "ochrepoint.com.au", true },
- { "ochsenfeld.co", true },
- { "ochsundjunior.ch", true },
- { "ochsundjunior.swiss", true },
- { "ocim.ch", false },
- { "ocimumcdn.net", true },
- { "ockendenhemming.co.uk", true },
- { "oclausen.com", true },
- { "ocni-ambulance-most.cz", true },
- { "ocnjapartment.com", true },
- { "ocodo.ru", true },
- { "ocolere.ch", true },
- { "ocotg.com", true },
- { "ocrn.nl", true },
- { "ocsigroup.fr", true },
- { "octagongroup.co", true },
- { "octane.net.au", true },
- { "octarineparrot.com", true },
- { "octav.name", true },
- { "octava.ua", false },
- { "octaviosimon.com", true },
- { "octobered.com", true },
- { "octocaptcha.com", true },
- { "octolopagon.games", true },
- { "octopoos.com", true },
- { "octopoos.org", true },
- { "octopus-agents.com", true },
- { "octopuslab.fr", true },
- { "octosniff.net", true },
- { "octothorpe.club", true },
- { "octovpn.com", true },
- { "oculus.com", true },
- { "ocupat.ro", true },
- { "od-cure.com", true },
- { "odacyeux.fr", true },
- { "odatakao.com", true },
- { "odden.io", true },
- { "oddmuse.org", true },
- { "oddnumber.ca", true },
- { "oddsandevens.ca", true },
- { "oddsandevensbookkeeping.ca", true },
- { "ode.red", true },
- { "odegua.com", true },
- { "odejdamoda.tk", true },
- { "odensc.me", true },
- { "odesenvolvedor.net", true },
- { "odhosc.ca", true },
- { "odifi.com", true },
- { "odinseye.net", true },
- { "odolbeau.fr", true },
- { "odontologia-online.com", true },
- { "odoo.co.th", true },
- { "odpikedoslike.com", true },
- { "odtu.lu", true },
- { "odysea.cat", true },
- { "odyssey44.com", true },
- { "odysseyofthemind.eu", true },
- { "odysseytraining.com.au", true },
- { "odzyskaniedomeny.pl", true },
- { "oe-boston.com", true },
- { "oe0fcdncxjpdd05b.myfritz.net", true },
- { "oe2018.gov.pt", true },
- { "oe2019.gov.pt", true },
- { "oec-music.com", false },
- { "oegd.at", true },
- { "oeh.ac.at", true },
- { "oeilpouroeilcreations.fr", true },
- { "oeko-bundesfreiwilligendienst-sh.de", true },
- { "oeko-bundesfreiwilligendienst.de", true },
- { "oeko-jahr-jubilaeum.de", true },
- { "oeko-jahr.de", true },
- { "oelbilder-oelmalerei.de", true },
- { "oelsner.net", true },
- { "oemwolf.com", true },
- { "oenings.eu", true },
- { "oepsbanaan.nl", true },
- { "oes.org.gt", true },
- { "oessi.eu", true },
- { "ofcampuslausanne.ch", false },
- { "ofertasadsl.com", true },
- { "ofertaviva.com.br", true },
- { "ofertino.es", true },
- { "ofertolino.fr", true },
- { "offandonagain.org", true },
- { "offbyinfinity.com", true },
- { "offcasesstore.com", true },
- { "offenekommune.de", true },
- { "offenes-deutschland.de", true },
- { "offensity.com", true },
- { "offerhome.com", true },
- { "offermann-koeln.de", true },
- { "offertegiuste.com", true },
- { "offertenet.nl", true },
- { "offgridauto.com", true },
- { "offgridhub.com", true },
- { "office-discount.at", true },
- { "office-discount.de", true },
- { "office-furniture-direct.co.uk", true },
- { "officefundays.co.uk", true },
- { "officeinteriors.co.nz", true },
- { "officemovepro.com", true },
- { "officevibe.com", true },
- { "officezoneonline.com", true },
- { "officina.roma.it", true },
- { "officium.tech", true },
- { "offlimo.com", true },
- { "offroadeq.com", true },
- { "offroadhoverboard.net", true },
- { "offshoot.ie", true },
- { "offshoot.rentals", false },
- { "offshore.digital", true },
- { "offshoremarineparts.com", false },
- { "offtopica.uk", true },
- { "ofggolf.com", true },
- { "ofisescort.tk", true },
- { "oflow.me", true },
- { "ofrion.lu", true },
- { "oftamedic.com", false },
- { "oftn.org", true },
- { "ogamerezine.tk", true },
- { "oge.ch", false },
- { "ogfarms.in", true },
- { "oghost.ir", true },
- { "ogkw.de", true },
- { "ogo-knigi.ml", true },
- { "oguya.ch", true },
- { "ogyaa.jp", true },
- { "oh-leg.com", true },
- { "ohai.su", true },
- { "ohartl.de", true },
- { "ohbabybean.com", true },
- { "ohchouette.com", true },
- { "ohd.dk", true },
- { "oheila.com", true },
- { "ohentpay.com", true },
- { "ohhere.xyz", true },
- { "ohioflockcote.com", true },
- { "ohiooutside.com", true },
- { "ohm.sg", true },
- { "ohm2013.org", true },
- { "ohmy.ca", true },
- { "ohmyunix.com", true },
- { "ohne-name.de", true },
- { "ohnonotme.com", true },
- { "ohol.se", true },
- { "ohome.io", true },
- { "ohoreviews.com", true },
- { "ohsocool.org", true },
- { "ohsohairy.co.uk", true },
- { "ohsweetart.com", true },
- { "ohya8.com", true },
- { "ohyooo.com", true },
- { "oi-wiki.org", true },
- { "oiahe.org.uk", true },
- { "oic-ci.gc.ca", true },
- { "oil-ecn.ru", true },
- { "oimexico.tk", true },
- { "oisd.nl", true },
- { "oita-homes.com", true },
- { "ojaioliveoil.com", true },
- { "ojdip.net", true },
- { "ojeremy.com", true },
- { "ojojz.com", true },
- { "ojomovies.com", true },
- { "ojp.gov", true },
- { "ok118.com", true },
- { "ok3on.cz", true },
- { "ok7779.com", true },
- { "okad-center.de", true },
- { "okad.de", true },
- { "okad.eu", true },
- { "okaidi.es", true },
- { "okaidi.fr", true },
- { "okakuro.org", true },
- { "okashi.me", true },
- { "okasurfbali.com", true },
- { "okay.cf", true },
- { "okay.coffee", true },
- { "okayloser.com", true },
- { "okaz.de", true },
- { "okazoo.eu", true },
- { "okburrito.com", true },
- { "okchousebuyer.com", true },
- { "okeeferanch.ca", true },
- { "okib.ca", true },
- { "okinawa-mag.net", true },
- { "okkhor52.com", true },
- { "oklahomafibroids.com", true },
- { "okmx.cloud", true },
- { "okmx.de", true },
- { "okmyanmartravels.com", true },
- { "okna-tm.kz", true },
- { "okna-vek.com.ua", true },
- { "okonetwork.org.uk", true },
- { "okonto.com", true },
- { "okoris.net", true },
- { "okotoksbeach.ca", true },
- { "okpo.tk", true },
- { "okqubit.net", true },
- { "oksafe-t.org", true },
- { "oktayincesuturizm.com", true },
- { "oktime.cz", true },
- { "okukan.com.au", true },
- { "okulistiyoruz.tk", true },
- { "okurapictures.com", true },
- { "okusiassociates.com", true },
- { "okviz.com", true },
- { "okwu.cz", true },
- { "olafnorge.de", true },
- { "olafvantol.nl", true },
- { "olafwalther.de", true },
- { "olanderflorist.com", true },
- { "olasouris.com", false },
- { "olastrafford.org", true },
- { "olback.net", true },
- { "olbat.net", true },
- { "olcayanar.com", true },
- { "olcbrookhaven.org", true },
- { "oldaine.tk", true },
- { "oldbkcom.tk", true },
- { "oldbrookinflatables.co.uk", true },
- { "oldbrookmarqueehire.co.uk", true },
- { "oldchaphome.nl", true },
- { "older-racer.com", true },
- { "oldfieldmusic.tk", true },
- { "oldiesmusicguide.tk", true },
- { "oldita.ru", true },
- { "oldking.net", true },
- { "oldliverpoolrailways.tk", true },
- { "oldno07.com", true },
- { "oldoakflorist.com", true },
- { "oldpc.com.ua", true },
- { "oldprop.com", true },
- { "oldriver.tk", true },
- { "oldroutetwo.com", true },
- { "oldschool-criminal.com", true },
- { "oldschool.wiki", true },
- { "oldsticker.com", true },
- { "oldstmary.com", true },
- { "oldtimerparts.de", true },
- { "oldtimerreifen-moeller.de", true },
- { "oleam.org", true },
- { "olecoin.io", true },
- { "olegon.ru", true },
- { "olegrpg.in.ua", true },
- { "olegs.be", true },
- { "oleksii.name", true },
- { "olenergie.com", true },
- { "olenergie.fr", true },
- { "olenergies.com", true },
- { "olenergies.eu", true },
- { "olenergies.fr", true },
- { "oleodecopayba.com.br", true },
- { "oles-hundehaus.de", true },
- { "olesaradio.tk", true },
- { "olfnewcastle.com", true },
- { "olfsecane.org", true },
- { "olgcc.net", true },
- { "olgiati.org", false },
- { "olgun.eu", true },
- { "olhcparish.net", true },
- { "olibomb.cc", true },
- { "olightstore.ro", true },
- { "olinux.fr", true },
- { "olitham.com", true },
- { "olive.my", true },
- { "olivemultispecialist.com", true },
- { "oliveoil.bot", true },
- { "oliveoilschool.org", true },
- { "oliveoiltest.com", true },
- { "oliveoiltimes.com", true },
- { "oliver-wiedemann.net", true },
- { "oliverah.com", true },
- { "oliverclausen.com", true },
- { "oliverdunk.com", false },
- { "oliverfaircliff.com", true },
- { "olivernaraki.com", true },
- { "oliverniebuhr.de", true },
- { "oliverschmid.space", true },
- { "oliverspringer.eu", true },
- { "oliverst.com", true },
- { "olivia-smith.com", true },
- { "olivier-rochet.com", true },
- { "olivierberardphotographe.com", true },
- { "olivierpieters.be", true },
- { "oliviervaillancourt.com", true },
- { "olizeite.ch", false },
- { "ollie.io", true },
- { "ollieowlsblog.com", true },
- { "ollies.cloud", true },
- { "ollies.cz", true },
- { "olliespage.com", true },
- { "olliespage.net", true },
- { "olliespage.uk", true },
- { "ollning.com", true },
- { "ollo.ga", true },
- { "olmari.fi", true },
- { "olmc-nutley.org", true },
- { "olmcjc.com", true },
- { "olmcnewark.com", true },
- { "olmik.net", true },
- { "olmmcc.tk", true },
- { "olmsted.io", true },
- { "olofsson.cc", true },
- { "ololmke.org", true },
- { "olomercy.com", true },
- { "olopp.org", true },
- { "olqoa.org", true },
- { "olschurch.com", true },
- { "olsh-hilltown.com", true },
- { "olsonproperties.com", true },
- { "olymp-arts.world", false },
- { "olympeakgaming.tv", true },
- { "olympiads.ca", true },
- { "olympic-research.com", true },
- { "om.yoga", true },
- { "om1.com", true },
- { "omaedu.ro", true },
- { "omahmebel.com", true },
- { "omangrid.com", true },
- { "omanko.porn", false },
- { "omarsamarah.tk", true },
- { "omega-marijuana.com", true },
- { "omegahosting.net", true },
- { "omegarazer.ca", true },
- { "omegathermoproducts.nl", true },
- { "omenprinting.com.au", true },
- { "omeopatiadinamica.it", true },
- { "omertabeyond.com", true },
- { "omertabeyond.net", true },
- { "ometepeislandinfo.com", true },
- { "omexcables.com", true },
- { "omf.link", true },
- { "omfg.exposed", true },
- { "omgbouncycastlehire.co.uk", true },
- { "omicron3069.com", true },
- { "omitech.co.uk", true },
- { "ommcitalflex.com", true },
- { "omniaclubs.com", true },
- { "omniasig.ro", true },
- { "omniatv.com", true },
- { "omnibnk.cl", true },
- { "omnibot.tv", true },
- { "omnifurgone.it", true },
- { "omnigon.network", true },
- { "omnimoto.it", true },
- { "omnisiens.se", true },
- { "omniteck.com", true },
- { "omnitrack.org", true },
- { "omniverse.ru", true },
- { "omny.info", true },
- { "omoide-hitokoto.com", true },
- { "omorashi.org", false },
- { "omori.ch", true },
- { "omoteura.com", true },
- { "omranic.com", true },
- { "omronwellness.com", true },
- { "omsdieppe.fr", true },
- { "omshivalab.com", true },
- { "omsk-web.ml", true },
- { "omsknews.tk", true },
- { "omskrock.com", true },
- { "omskweb.tk", true },
- { "omtleden.nl", true },
- { "on-targettrainingcourses.com", true },
- { "on-tech.co.uk", true },
- { "on-the-wave.com", true },
- { "on-this.link", true },
- { "on.tax", true },
- { "on2it.net", true },
- { "on9.link", true },
- { "ona.io", true },
- { "onaboat.se", true },
- { "onahonavi.com", true },
- { "onair.ovh", true },
- { "onbuzzer.com", false },
- { "oncalltech.net", true },
- { "once.eu.org", true },
- { "onceuponabow.org", true },
- { "onceuponarainbow.co.uk", true },
- { "oncf.asso.fr", true },
- { "onchol.com", false },
- { "oncodedesign.com", true },
- { "oncotarget.ru", true },
- { "ond-inc.com", true },
- { "ond-inc.jp", true },
- { "ondcp.gov", true },
- { "onde.xyz", true },
- { "ondeapostar.pt", true },
- { "onderwijstransparant.nl", true },
- { "ondevamosjantar.com", true },
- { "ondrej.org", true },
- { "ondrejbudin.cz", true },
- { "ondrejhoralek.cz", true },
- { "one-news.net", true },
- { "one-resource.com", true },
- { "one-s.co.jp", true },
- { "one-tab.com", true },
- { "one2edit.com", true },
- { "one6688.com", true },
- { "oneartyminute.com", true },
- { "oneazcu.com", false },
- { "onebestdeal.com", true },
- { "onebigcow.com", true },
- { "oneclic.ch", false },
- { "oneclickroot.com", true },
- { "onedottwelve.co.jp", false },
- { "onedottwelve.com", false },
- { "onedrive.com", false },
- { "onedrive.live.com", false },
- { "onee3.org", true },
- { "oneearthapp.com", true },
- { "oneheartbali.church", false },
- { "oneiroi.co.uk", true },
- { "oneless.tk", true },
- { "onelifenutrition.co.uk", true },
- { "onelinkmmp.net", true },
- { "onemeter.com", true },
- { "onemid.net", true },
- { "onemoonmedia.de", true },
- { "onenetcdn.com", true },
- { "oneononeonone.de", true },
- { "oneononeonone.tv", true },
- { "onepercentrentals.com", true },
- { "onepersona.io", true },
- { "onepointzero.com", true },
- { "oneprediction.com", true },
- { "oneshotmediakc.com", true },
- { "onesports.cz", true },
- { "onestacked.club", true },
- { "onestacked.tk", true },
- { "onestasolar.com", true },
- { "onestopcastles.co.uk", true },
- { "onestpasdesanges.fr", true },
- { "onetcenter.org", true },
- { "onetcodeconnector.org", true },
- { "onetime.info", true },
- { "onetonline.org", true },
- { "onetouchrevealplus.com", true },
- { "onetwentyseven001.com", true },
- { "oneway.ga", true },
- { "oneweb.hu", true },
- { "onezero24.net", true },
- { "onfarma.it", true },
- { "ongea.io", true },
- { "ongiaenegogoa.com", true },
- { "onhistory.co.uk", true },
- { "onhub1.com", true },
- { "oni.nl", true },
- { "onice.ch", true },
- { "onionplay.eu", true },
- { "onionplay.net", true },
- { "onionscan.org", true },
- { "onionyst.com", true },
- { "oniria.ch", false },
- { "onix.eu.com", true },
- { "onixcco.com.br", true },
- { "onkentessegertdij.hu", true },
- { "onlfait.ch", false },
- { "online-backup.se", true },
- { "online-calculator.com", true },
- { "online-eikaiwa-guide.com", true },
- { "online-health-insurance.com", true },
- { "online-lernprogramme.de", true },
- { "online-pr.at", true },
- { "online-scene.com", true },
- { "online-stopwatch.com", true },
- { "online-textil.com", true },
- { "online-textil.cz", true },
- { "online-textil.sk", true },
- { "online.swedbank.se", true },
- { "online24.pt", true },
- { "onlineautodealered.com", true },
- { "onlinecasinobluebook.com", true },
- { "onlinecasinolisboa.com", true },
- { "onlinecasinoselite.org", true },
- { "onlinecensorship.org", true },
- { "onlinecollegeessay.com", true },
- { "onlinedemo.hu", true },
- { "onlinehaircuts.com", true },
- { "onlinekmc.com", true },
- { "onlinekocunuz.com", true },
- { "onlinelegalmarketing.com", true },
- { "onlinelegalmedia.com", true },
- { "onlineltctraining.com", true },
- { "onlinemagento.com", true },
- { "onlinemarketingmuscle.com", true },
- { "onlinemarketingtraining.co.uk", true },
- { "onlinemoviewatch.org", true },
- { "onlinepokerspelen.be", true },
- { "onlineradio.pp.ua", true },
- { "onlinesports.tk", true },
- { "onlinestoresite.com.au", true },
- { "onlinesystem.jp", true },
- { "onlinetextil.cz", true },
- { "onlineth.com", false },
- { "onlinevergidanismani.com", true },
- { "onlinevisa.ru", true },
- { "onlineweblearning.com", true },
- { "onload.pt", true },
- { "only-fragrances.com", false },
- { "onlycrumbsremain.co.uk", true },
- { "onlyesb.com", true },
- { "onlysim.nl", true },
- { "onmaps.de", true },
- { "onmarketbookbuilds.com", true },
- { "onnaguse.com", true },
- { "onoelixir.gr", true },
- { "onoranzefunebri.roma.it", true },
- { "onore.org", true },
- { "onpay.io", true },
- { "onpointplugins.com", true },
- { "onqproductions.com", true },
- { "onrr.gov", true },
- { "ons.ca", true },
- { "onsgenoegen-waz.nl", true },
- { "onsinscrit.com", true },
- { "onspring.com", true },
- { "onsudoku.com", true },
- { "ontdekhetzelf.nu", true },
- { "onthebriteside.com", true },
- { "onthegosystems.com", true },
- { "onthehook.ru", true },
- { "ontheten.org", true },
- { "ontogenese.net", true },
- { "ontopoflove.nl", true },
- { "ontourmarketing.at", true },
- { "ontrio.cz", true },
- { "ontsc.com", true },
- { "ontservice.com", true },
- { "ontstoppingsdienst123.be", true },
- { "onurer.net", true },
- { "onvey.io", true },
- { "onviga.de", true },
- { "onvisible.website", true },
- { "onvori.com", true },
- { "onvori.de", true },
- { "onvousment.fr", true },
- { "onysix.net", true },
- { "onyxcts.com", true },
- { "onyxfireinc.com", true },
- { "onyxgen.duckdns.org", true },
- { "onyxmoon.me", true },
- { "onzerelaties.net", true },
- { "oo918.com", true },
- { "oodlessoftplay.co.uk", true },
- { "oogami.name", true },
- { "ooharttemplates.com", true },
- { "ookjesprookje.nl", true },
- { "oolsa.net", true },
- { "oomepu.com", true },
- { "ooo-santal.ml", true },
- { "ooonja.de", true },
- { "oosm.org", true },
- { "oosoo.org", true },
- { "ooyo.be", true },
- { "op3racional.eu", true },
- { "op3y.com", true },
- { "opale-concept.com", true },
- { "opalesurfcasting.net", true },
- { "oparl.org", true },
- { "opatut.de", false },
- { "opbedbugcanines.com", true },
- { "opcare.co.uk", true },
- { "opcenter.de", true },
- { "opcionpublicitaria.com", true },
- { "ope.ee", true },
- { "opel-focken.de", true },
- { "open-banking-access.uk", true },
- { "open-bs.com", true },
- { "open-bs.ru", true },
- { "open-desk.org", true },
- { "open-freax.fr", false },
- { "open-future.be", true },
- { "open-gaming.net", true },
- { "open-infrastructure.net", true },
- { "open-letters.de", true },
- { "open-mesh.org", true },
- { "open-sauce-recipes.co.uk", true },
- { "open-source.gr", true },
- { "open.film", true },
- { "open.gl", true },
- { "open.ru", true },
- { "openacte.ch", false },
- { "openai.community", true },
- { "openarch.nl", true },
- { "openbayes.blog", true },
- { "openbayes.com", true },
- { "openbayesstatus.com", true },
- { "openbeecloud.com", true },
- { "openblox.org", true },
- { "opencad.io", true },
- { "opencaves.io", true },
- { "opencircuit.nl", true },
- { "openclima.com", true },
- { "openconf.uk", true },
- { "opencpes.com", true },
- { "opencpes.info", true },
- { "opencpes.io", true },
- { "opencpes.org", true },
- { "opencrm.co.uk", true },
- { "opendata.cz", true },
- { "opendataincubator.eu", true },
- { "opendecide.com", true },
- { "openfir.st", true },
- { "openfitapi-falke.azurewebsites.net", true },
- { "opengovpartnership.de", true },
- { "openhistory.de", true },
- { "openings.ninja", true },
- { "openitforum.pl", true },
- { "openjur.de", true },
- { "openkim.org", true },
- { "openkvk.nl", true },
- { "openmail.ml", true },
- { "opennippon.com", true },
- { "opennippon.ru", true },
- { "openpictures.ch", true },
- { "openquery.com.au", true },
- { "openrainbow.com", true },
- { "openrainbow.net", true },
- { "openre.site", true },
- { "openrealestate.co", true },
- { "openreel.com", true },
- { "openresearch.amsterdam", true },
- { "openreview.net", true },
- { "openroademail.com", true },
- { "openrtm.org", true },
- { "openruhr.de", true },
- { "openscreen.lu", true },
- { "openshippers.com", true },
- { "opensource-cms.nl", true },
- { "opensource-training.de", true },
- { "opensourcesurvey.org", true },
- { "openspa.webhop.info", true },
- { "openssl.org", true },
- { "openstakes.com", true },
- { "openstandia.jp", true },
- { "openstem.com.au", true },
- { "openstreetmap.is", true },
- { "openstreetmap.lu", true },
- { "openstreetmap.org", true },
- { "opentrack.info", true },
- { "opentrash.org", true },
- { "opentuition.com", true },
- { "openvz.org", true },
- { "openwifi.gr", true },
- { "openwireless.org", true },
- { "openwrt-dist.tk", true },
- { "operanavigation.ro", true },
- { "operationkiwi.work", true },
- { "operr.com", true },
- { "operrbilling.com", true },
- { "operrgroup.com", true },
- { "operrhealth.com", true },
- { "opexterminating.com", true },
- { "opfin.com", true },
- { "ophis-phosphoros.com", true },
- { "opiates.ca", true },
- { "opic.gov", true },
- { "opin.me", true },
- { "opinio.fr", true },
- { "opinionitech.com", true },
- { "opioids.co.uk", true },
- { "opioids.com", true },
- { "opioids.gov", true },
- { "opioneers.ga", true },
- { "opium.io", true },
- { "oplata.uz", true },
- { "oplatki-charistia.pl", true },
- { "oplop.appspot.com", true },
- { "opnaarsalto.be", true },
- { "opncld.com", true },
- { "opoleo.com", true },
- { "oposiciones.com.es", true },
- { "oposicionesapolicialocal.es", true },
- { "oposicionescorreos.com.es", true },
- { "oposicionescorreos.es", true },
- { "oposicionescorreos.info", true },
- { "oposicionesdejusticia.org", true },
- { "oposicionesertzaintza.com.es", true },
- { "oposicionesprofesores.tk", true },
- { "oposicionesycursos.com", true },
- { "opp.moe", true },
- { "oppada.com", true },
- { "oppaiti.me", true },
- { "oppejoud.ee", true },
- { "opportunis.me", true },
- { "opportunity.de", true },
- { "opportunityliu.top", true },
- { "oppositionsecurity.com", true },
- { "oppwa.com", true },
- { "opq.pw", true },
- { "opraab.ga", true },
- { "oprechtgezegd.nl", true },
- { "oprueba.com", true },
- { "opryshok.com", true },
- { "ops-com.com", true },
- { "ops.com.pl", true },
- { "opskiwi.work", true },
- { "opsmate.com", false },
- { "opti-net.at", true },
- { "opticaltest.com", true },
- { "opticasocialvision.com", true },
- { "opticsboss.com", true },
- { "optiekdemeester.be", true },
- { "optigear.nl", true },
- { "optik-trosdorff.de", true },
- { "optiker-gilde.de", true },
- { "optimall.tk", true },
- { "optimalrehab.se", true },
- { "optimalsetup.com", true },
- { "optimaner.pl", true },
- { "optimist.bg", true },
- { "optimo.com.tr", true },
- { "optimumterapia.pl", true },
- { "optimumwebdesigns.com", true },
- { "optimus.io", true },
- { "optizym.de", true },
- { "opture.ch", true },
- { "opure.ru", true },
- { "opus-codium.fr", true },
- { "opus-consulting.no", true },
- { "opvakantie-noorwegen.nl", true },
- { "opvakantie-zweden.nl", true },
- { "oqpo.ru", true },
- { "oqwebdesign.com", true },
- { "orablanket.co.nz", true },
- { "oralb.co.uk", true },
- { "orang-utans.com", true },
- { "orangecat.tw", true },
- { "orangecomputers.com", true },
- { "orangefab.asia", true },
- { "orangejetpack.com", true },
- { "orangelandgaming.com", true },
- { "orangenbaum.at", true },
- { "orangewombat.com", true },
- { "orangtua.tk", true },
- { "orangutan-appeal.org.uk", true },
- { "orangutan.org", true },
- { "oranjee.net", false },
- { "orbeimaginario.com", true },
- { "orbital3.com", true },
- { "orbitalcommerce.com.br", true },
- { "orbitcleaning.com.au", true },
- { "orbits.ga", true },
- { "orbu.net", true },
- { "orca.pet", true },
- { "orcada.co", true },
- { "orcahq.com", true },
- { "orcamoney.com", true },
- { "orcawiki.nl", true },
- { "orchardnh.org", true },
- { "orchideenettoyage.com", true },
- { "orchidlive.com", true },
- { "orchidsforum.com", true },
- { "orcsnet.com", true },
- { "ordbokpro.se", true },
- { "orde.red", true },
- { "ordermore.cloud", true },
- { "ordermygear.com", true },
- { "ordevanoranjenassau.nl", true },
- { "ordina.tk", true },
- { "ordoro.com", true },
- { "ore.cool", true },
- { "oreadstudios.com", true },
- { "orel-sait.tk", true },
- { "orembaeviajes.tur.ar", true },
- { "oreshinya.xyz", true },
- { "oreskylaw.com", true },
- { "oreto.de", false },
- { "orf-digitalsatkarte.at", false },
- { "orf-kartentausch.at", false },
- { "organica.co.za", true },
- { "organisatieteam.nl", true },
- { "organisationsberatung-jacobi.de", true },
- { "organise.earth", true },
- { "orgasmium.com", true },
- { "orged.de", true },
- { "orgoniteindonesia.com", true },
- { "orgsyn.in", true },
- { "orhideous.name", true },
- { "orians.eu", true },
- { "oribia.net", true },
- { "orienttime.com.tw", true },
- { "oriflamesamara.tk", true },
- { "oriflameszepsegkozpont.hu", true },
- { "orifonline.ro", true },
- { "origami.to", true },
- { "origamika.com", true },
- { "origamitutorials.com", true },
- { "origin8delicafes.com", true },
- { "original-christstollen.com", true },
- { "original-christstollen.de", true },
- { "originalabsinthe.com", true },
- { "originalmockups.com", true },
- { "originalniknihy.cz", true },
- { "originpc.com", false },
- { "orikadabra.nl", true },
- { "orikos.tk", true },
- { "orikum.org", true },
- { "orimex-mebel.ru", true },
- { "orionfinancialservices.com", true },
- { "oriontravel.co", true },
- { "orkestar-krizevci.hr", true },
- { "orkiv.com", false },
- { "orlandobalbas.com", true },
- { "orlandoprojects.com", true },
- { "orleika.io", true },
- { "ormer.nl", true },
- { "ornsyn.no", true },
- { "ornua.com", true },
- { "oro.roma.it", true },
- { "orocojuco.com", true },
- { "orologeria.roma.it", true },
- { "oroscopodelmese.it", true },
- { "orphee-beaute.com", true },
- { "orpheus.network", true },
- { "orrs.de", true },
- { "ortho-europe.com", true },
- { "ortho-graz.at", true },
- { "orthograph.ch", true },
- { "orthotictransfers.com", true },
- { "ortlepp.eu", true },
- { "ortopertutti.it", true },
- { "oruggt.is", true },
- { "orum.in", true },
- { "orwell1984.today", true },
- { "oryva.com", true },
- { "os-s.net", true },
- { "os-t.de", true },
- { "os24.cz", true },
- { "osac.gov", true },
- { "osacrypt.studio", true },
- { "osagenation-nsn.gov", true },
- { "osakeannit.fi", true },
- { "osano.com", true },
- { "osbi.pl", true },
- { "osborn.io", true },
- { "osborneinn.com", true },
- { "osburn.com", true },
- { "oscarvk.ch", true },
- { "osci.io", true },
- { "oscillation-services.fr", true },
- { "osepideasthatwork.org", true },
- { "oses.mobi", true },
- { "osez-l-odyssee.fr", true },
- { "oshayr.com", true },
- { "oshea.cc", true },
- { "oshrc.gov", true },
- { "osielnava.com", true },
- { "osimmo.fr", true },
- { "osirium.com", true },
- { "oskrba.net", true },
- { "oskrba.online", true },
- { "oskuro.net", true },
- { "osla.org", true },
- { "oslinux.net", true },
- { "osm.is", true },
- { "osm.ovh", true },
- { "osmani-gebaeudereinigung.de", true },
- { "osmanlitorunu.com", true },
- { "osmdroid.net", true },
- { "osmosis.org", true },
- { "osmre.gov", true },
- { "osnova.cz", true },
- { "osobliwydom.pl", true },
- { "osolutionscorp.com", true },
- { "osom.finance", true },
- { "osomagicmountain.com", true },
- { "osomjournal.org", true },
- { "ospf.sk", true },
- { "osrs.wiki", true },
- { "osszekotatermeszettel.hu", true },
- { "ostankino.tk", true },
- { "ostechnix.com", true },
- { "osteendiner.com", true },
- { "osteopathe-palaiseau.com", true },
- { "osterkraenzchen.de", true },
- { "osterlensyd.se", true },
- { "ostgotamusiken.se", true },
- { "osti.gov", true },
- { "ostimwebyazilim.com", true },
- { "osto.us", true },
- { "ostr.io", true },
- { "ostrov8.com", true },
- { "ostylelimo.com", true },
- { "osuarez3.com", true },
- { "osuszanie-krakow.pl", true },
- { "osuszanie-radom.pl", true },
- { "osuszanie-warszawa.pl", true },
- { "oswaldlabs.com", true },
- { "oswalds.co.uk", true },
- { "oswaldsmillaudio.com", true },
- { "oswbouncycastles.co.uk", true },
- { "osx86spain.com", true },
- { "oszri.hu", true },
- { "otakubox.de", true },
- { "otakurepublic.com", true },
- { "otakurumi.de", true },
- { "otdelka56.ml", true },
- { "otdyh-v-abhazii.tk", true },
- { "otellio.com", true },
- { "otellio.de", true },
- { "otellio.it", true },
- { "otemplario.pt", true },
- { "other98.com", true },
- { "otherlandlabs.com", true },
- { "oticasaopaulo.com.br", true },
- { "oticasvisao.net.br", true },
- { "otisko.com", true },
- { "otiumtech.com", true },
- { "otixz.com", true },
- { "otocenterfelix.com.br", true },
- { "otokiralama.name.tr", true },
- { "otoma.tk", true },
- { "otooil.com", true },
- { "otoplastik.ml", true },
- { "otoplenie-ufa.ml", true },
- { "otorrino.pt", true },
- { "otoy.com", true },
- { "otoya.space", false },
- { "otprema.hr", true },
- { "otpsmart.com.ua", true },
- { "otpusk.com", true },
- { "otr.ie", true },
- { "otrm.de", true },
- { "ots.gov", true },
- { "otsfreestyle.jp", true },
- { "ottoproject.io", false },
- { "ottoversand.at", true },
- { "ottxz.com", true },
- { "otus-magnum.com", true },
- { "otvaracie-hodiny.sk", true },
- { "otvertka.kz", true },
- { "otya.me", true },
- { "otzyvy2.ru", true },
- { "ouattara.ch", true },
- { "ouest-annonces.com", true },
- { "ouestfrance-auto.pro", true },
- { "ouestsolutions.com", true },
- { "ouglor.com", true },
- { "ouin.land", true },
- { "oulunjujutsu.com", true },
- { "ounage.de", true },
- { "ourai.ws", true },
- { "ourcloud.at", true },
- { "ourdocuments.gov", true },
- { "ourevents.net", true },
- { "ourfavorite-kakamigahara.jp", true },
- { "ourladymountcarmel.net", true },
- { "ourladyofcalvary.org", true },
- { "ourladyoftheassumptionchurch.org", true },
- { "ourladyqueenofmartyrs.org", true },
- { "ourls.win", true },
- { "ourmaster.org", true },
- { "ourocg.cn", true },
- { "ourworldindata.org", true },
- { "oussoren-vinetomatoes.com", true },
- { "out-of-scope.de", true },
- { "outdoorfurniture.ie", true },
- { "outdoorimagingportal.com", true },
- { "outdoorlightingagoura.com", true },
- { "outdoorlightingagourahills.com", true },
- { "outdoorlightingcalabasas.com", true },
- { "outdoorlightingconejovalley.com", true },
- { "outdoorlightingdosvientos.com", true },
- { "outdoorlightinghiddenhills.com", true },
- { "outdoorlightinglakesherwood.com", true },
- { "outdoorlightingmalibu.com", true },
- { "outdoorlightingmoorpark.com", true },
- { "outdoorlightingnewburypark.com", true },
- { "outdoorlightingoakpark.com", true },
- { "outdoorlightingsimivalley.com", true },
- { "outdoorlightingthousandoaks.com", true },
- { "outdoorlightingwestlakevillage.com", true },
- { "outdoormixfestival.com", true },
- { "outdoorstop.net", true },
- { "outdoortrip.com", true },
- { "outetc.com", true },
- { "outfunnel.com", true },
- { "outgress.com", true },
- { "outincanberra.com.au", true },
- { "outingexpert.com", true },
- { "outinjersey.net", true },
- { "outka.xyz", true },
- { "outline.ski", true },
- { "outline.vn", true },
- { "outlookonthedesktop.com", true },
- { "outnow.ch", true },
- { "outoftheboxfitness.com", true },
- { "outpostinfo.com", true },
- { "outshinesolutions.nl", true },
- { "outsideconnections.com", true },
- { "outsiders.paris", false },
- { "outstack.vote", true },
- { "outstandingpromotion.com", true },
- { "outurnate.com", true },
- { "outwesthunts.com", true },
- { "ouwerling.tk", true },
- { "ovelhaostra.com", false },
- { "overamsteluitgevers.nl", true },
- { "overclockers.ge", true },
- { "overframe.gg", true },
- { "overijsselsemerentocht.nl", true },
- { "overlandireland.ie", true },
- { "overlord.network", true },
- { "overnetfaq.tk", true },
- { "overnightglasses.com", true },
- { "overpb.gq", true },
- { "overps.cf", true },
- { "overs.jp", true },
- { "overs.top", true },
- { "overseamusic.de", true },
- { "oversight.garden", true },
- { "oversight.gov", true },
- { "overstap.deals", true },
- { "overstemmen.nl", true },
- { "overthecloud.it", true },
- { "overthinkingit.com", true },
- { "overwatchss.club", true },
- { "overzicht.pro", true },
- { "overzicht.ws", true },
- { "oveweddings.com", true },
- { "ovirt.org", true },
- { "ovisy.com", true },
- { "ovix.co", true },
- { "ovnrain.com", true },
- { "ovodev.com", true },
- { "ovpn.com", true },
- { "ovvy.net", false },
- { "owapi.net", true },
- { "owbt.pl", true },
- { "owddm.com", true },
- { "owennelson.co.uk", true },
- { "owensordinarymd.com", true },
- { "owid.cloud", true },
- { "owl-square.com", true },
- { "owl-stat.ch", false },
- { "owl.net", true },
- { "own3d.ch", true },
- { "ownagepranks.com", true },
- { "ownc.at", true },
- { "owncloud.help", true },
- { "owner.pw", true },
- { "ownian.com", true },
- { "ownmay.com", false },
- { "owntournament.org", true },
- { "oxanababy.com", true },
- { "oxborrow.ca", true },
- { "oxelie.com", false },
- { "oxfordbio.com", true },
- { "oxfordurgentclinic.com", true },
- { "oxia.me", true },
- { "oxiame.eu", true },
- { "oxidemusic.com", true },
- { "oximo.lviv.ua", true },
- { "oxo.cloud", true },
- { "oxsec.co.uk", true },
- { "oxygin.net", false },
- { "oxymail.ru", true },
- { "oxz.me", true },
- { "oyosoft.net", true },
- { "oysterworldwide.com", true },
- { "oyungg.net", true },
- { "oyunmadeni.tk", true },
- { "oz-style.com", true },
- { "ozalp.dk", true },
- { "ozark.be", true },
- { "ozarktrailcooler.com", true },
- { "ozli.ga", true },
- { "oznamovacipovinnost.cz", true },
- { "ozonstyle.ga", true },
- { "ozvolvo.org", true },
- { "p-0.me", true },
- { "p-damda.com", true },
- { "p-mint.jp", true },
- { "p-p.site", true },
- { "p-s-b.com", true },
- { "p-soc.com.br", true },
- { "p-store.net", true },
- { "p1979.com", true },
- { "p1group.com", true },
- { "p1ratrulezzz.me", true },
- { "p22.co", true },
- { "p2d.ru", true },
- { "p333a.net", true },
- { "p333aa.com", true },
- { "p333aaa.com", true },
- { "p333b.com", true },
- { "p333b.net", true },
- { "p333bb.com", true },
- { "p333bbb.com", true },
- { "p333c.com", true },
- { "p333c.net", true },
- { "p333cc.com", true },
- { "p333ccc.com", true },
- { "p333d.com", true },
- { "p333d.net", true },
- { "p333ddd.com", true },
- { "p333e.com", true },
- { "p333e.net", true },
- { "p333ee.com", true },
- { "p333f.com", true },
- { "p333f.net", true },
- { "p333ff.com", true },
- { "p333fff.com", true },
- { "p333g.com", true },
- { "p333g.net", true },
- { "p333ggg.com", true },
- { "p333h.com", true },
- { "p333h.net", true },
- { "p333hh.com", true },
- { "p333i.com", true },
- { "p333i.net", true },
- { "p333ii.com", true },
- { "p333iii.com", true },
- { "p333j.com", true },
- { "p333j.net", true },
- { "p333jj.com", true },
- { "p333jjj.com", true },
- { "p333k.com", true },
- { "p333kk.com", true },
- { "p333kkk.com", true },
- { "p333l.com", true },
- { "p333ll.com", true },
- { "p333lll.com", true },
- { "p333m.com", true },
- { "p333mm.com", true },
- { "p333mmm.com", true },
- { "p333n.com", true },
- { "p333nn.com", true },
- { "p333nnn.com", true },
- { "p333o.com", true },
- { "p333oo.com", true },
- { "p333ooo.com", true },
- { "p333q.com", true },
- { "p333qq.com", true },
- { "p333qqq.com", true },
- { "p333r.com", true },
- { "p333rr.com", true },
- { "p333rrr.com", true },
- { "p333s.com", true },
- { "p333sss.com", true },
- { "p333t.com", true },
- { "p333ttt.com", true },
- { "p333u.com", true },
- { "p333v.com", true },
- { "p333w.com", true },
- { "p333x.com", true },
- { "p333y.com", true },
- { "p333z.com", true },
- { "p365.vip", false },
- { "p36533.com", true },
- { "p36594.com", true },
- { "p4chivtac.com", true },
- { "p5on.net", true },
- { "p5r.uk", true },
- { "p888010.com", false },
- { "pa-w.de", true },
- { "pa.search.yahoo.com", false },
- { "paardenhulp.nl", true },
- { "paardenpro.nl", true },
- { "paas-inf.net", true },
- { "paass.net", true },
- { "paazmaya.fi", true },
- { "pablo.io", true },
- { "pablo.scot", true },
- { "pablo.sh", true },
- { "pabloalbertoazar.com", true },
- { "pabloarteaga.co.uk", true },
- { "pabloarteaga.com", true },
- { "pabloarteaga.com.es", true },
- { "pabloarteaga.es", true },
- { "pabloarteaga.eu", true },
- { "pabloarteaga.info", true },
- { "pabloarteaga.me", true },
- { "pabloarteaga.net", true },
- { "pabloarteaga.nom.es", true },
- { "pabloarteaga.org", true },
- { "pabloarteaga.science", true },
- { "pabloarteaga.tech", true },
- { "pabloarteaga.uk", true },
- { "pabloarteaga.xyz", true },
- { "pablofain.com", true },
- { "pablovaldiviesoar.com", true },
- { "pabuzo.vn", true },
- { "pacalzheimer.com", true },
- { "pacaom.com", true },
- { "pacatlantic.com", true },
- { "pacch.io", true },
- { "pacchioni.me", true },
- { "paccolat.name", true },
- { "pace.car", true },
- { "pacecounsel.com", true },
- { "paced.me", true },
- { "pacelink.de", true },
- { "pacifco.com", true },
- { "pacificarperu.com", true },
- { "pacificautobody.net", true },
- { "pacificbeachpub.com", true },
- { "pacificcashforcars.com.au", true },
- { "pacificgynsurgicalgroup.com", true },
- { "pacificintegration.ca", true },
- { "pacificpuke.com", true },
- { "pacificspraydry.com", true },
- { "pacifictilkin-occasions.be", false },
- { "pack-haus.de", true },
- { "pack.io", true },
- { "packagingproject.management", true },
- { "packagist.jp", true },
- { "packagist.org", false },
- { "packaware.com", true },
- { "packetdigital.com", true },
- { "packetlinux.com", true },
- { "packetoverflow.com", true },
- { "pact2017.nl", true },
- { "pactandoconlamoda.com", true },
- { "pactf.com", true },
- { "pacxodka.ru", true },
- { "padam-group.com", true },
- { "padberx-marketing-consultants.de", true },
- { "paddy.rocks", true },
- { "padelbox.de", true },
- { "padeoe.com", true },
- { "padkit.org", true },
- { "padpilot.co", true },
- { "padron.com.es", true },
- { "padshah.tk", true },
- { "padzilla.com", true },
- { "paediatricdata.eu", true },
- { "paedlink.ca", true },
- { "paesi.info", true },
- { "paf-events.ch", false },
- { "pagalsongs.com", true },
- { "pagalworld.com", true },
- { "pagalworld.info", true },
- { "pagalworld.io", true },
- { "pagalworld.la", true },
- { "pagalworld.live", true },
- { "pagalworld.me", true },
- { "pagalworld.org", true },
- { "pagamentosonline.pt", true },
- { "page-rank1.com", true },
- { "pageantsnews.com", false },
- { "pageboard.fr", true },
- { "pagecdn.io", true },
- { "pagefulloflies.io", true },
- { "pagenstedt.de", true },
- { "pagerduty.com", true },
- { "pagespeedtweaks.com", true },
- { "pagewizz.com", true },
- { "pagiamtzis.com", true },
- { "pagina394.com.br", true },
- { "paginamaravillosa.tk", true },
- { "paginaweb4u.com", true },
- { "pagliucadb.ddns.net", true },
- { "paguponku.com", true },
- { "pagure.io", true },
- { "pagure.org", true },
- { "pahealthbilling.com", true },
- { "pahlawanpulsa.com", true },
- { "pahub.io", true },
- { "paichai.space", false },
- { "paiementdp.com", true },
- { "paindata.dk", true },
- { "painefamily.co.uk", true },
- { "paintball-ljubljana.si", true },
- { "paintball-shop.sk", true },
- { "paintbrush.ga", true },
- { "paintersgc.com.au", true },
- { "paintingindurban.co.za", true },
- { "paipuman.jp", true },
- { "paisleyandsparrow.com", true },
- { "pajadam.me", true },
- { "pajuvuo.fi", true },
- { "pakaranggrek.com", true },
- { "paketbox-systems.at", true },
- { "paketo.cz", true },
- { "paketo.sk", true },
- { "paketwatch.de", false },
- { "pakho.xyz", true },
- { "pakingas.lt", true },
- { "pakistan24.tk", true },
- { "pakistani.dating", true },
- { "pakitow.fr", true },
- { "paknetworking.org", true },
- { "paktolos.net", true },
- { "palabr.as", true },
- { "palapadev.com", true },
- { "palariviera.com", true },
- { "palary.work", true },
- { "palatetotable.com", true },
- { "palatin.at", true },
- { "palaubluetours.com", true },
- { "palava.tv", true },
- { "palavalbasket.it", true },
- { "palavatv.com", true },
- { "palazzo.link", true },
- { "palazzotalamo.it", true },
- { "palebluedot.de", true },
- { "palembal.fr", true },
- { "palenque.tk", true },
- { "paleo.io", true },
- { "paleodietfoodlist.com", true },
- { "paleodietrecipes.com", true },
- { "paleorecipepro.com", true },
- { "paleoso.com", true },
- { "palermoantagonista.tk", true },
- { "palermopride.it", true },
- { "palessit.com", true },
- { "palestra.roma.it", true },
- { "paletdecor.com.ua", true },
- { "palladium46.com", true },
- { "palletflow.com", true },
- { "palli.ch", false },
- { "palmaprop.com", true },
- { "palmbeachcuisine.com", true },
- { "palmbeachwebsitehosting.com", true },
- { "palmen-apotheke.de", true },
- { "palner.eu", true },
- { "palomardisplays.com", true },
- { "pamaniqu.nl", true },
- { "pamc.tk", true },
- { "pamm.tk", true },
- { "pamsorel.co.za", true },
- { "pan.digital", true },
- { "panamarealestatebrokers.com", true },
- { "panamatravel.tk", true },
- { "panangelium.tk", true },
- { "panasca.is", true },
- { "panascais.at", true },
- { "panascais.ch", true },
- { "panascais.co", true },
- { "panascais.com", true },
- { "panascais.cz", true },
- { "panascais.es", true },
- { "panascais.fi", true },
- { "panascais.fr", true },
- { "panascais.host", true },
- { "panascais.info", true },
- { "panascais.io", true },
- { "panascais.me", true },
- { "panascais.net", true },
- { "panascais.network", true },
- { "panascais.nl", true },
- { "panascais.org", true },
- { "panascais.pl", true },
- { "panascais.pt", true },
- { "panascais.pw", true },
- { "panascais.ru", true },
- { "panascais.site", true },
- { "panascais.tech", true },
- { "panascais.us", true },
- { "panascais.zone", true },
- { "panavision.com", true },
- { "panaxis.biz", true },
- { "panaxis.ch", true },
- { "panaxis.li", true },
- { "panda-community.com", true },
- { "panda.tf", true },
- { "pandahut.net", true },
- { "pandaltd.nl", false },
- { "pandemicflu.gov", true },
- { "pandiora.pw", true },
- { "pandithaya.tk", true },
- { "pandkonijn.nl", true },
- { "pandoraflora.com", true },
- { "pandorasprom.co.uk", true },
- { "panduan-hamil.tk", true },
- { "pandymic.com", true },
- { "paneldewelopera.pl", true },
- { "paneldoorsolutions.com", true },
- { "paneu.de", true },
- { "panevo.com", true },
- { "pangoly.com", true },
- { "panhandlemenshealth.com", true },
- { "panic.tk", true },
- { "panier-legumes.bio", true },
- { "panino.gr", true },
- { "paninohome.com", true },
- { "paniodpolskiego.eu", false },
- { "paniyanovska.ua", true },
- { "panjiva.com", true },
- { "panlex.org", true },
- { "panmetro.com", true },
- { "pano-guru.com", true },
- { "pano.ie", true },
- { "panopy.co", true },
- { "panopy.me", true },
- { "panoramahurtowni.pl", true },
- { "panoramichq.com", true },
- { "panpa.ca", true },
- { "panpsychism.com", true },
- { "panpsychist.com", true },
- { "pantallasled.mx", true },
- { "pantallasyescenarios.com", false },
- { "panthenolplus.co.uk", true },
- { "panthenolplus.com", true },
- { "pantheoncrafters.com", true },
- { "panthi.lk", true },
- { "panthur.com.au", false },
- { "pantographe.info", false },
- { "pantou.org", false },
- { "pants-off.xyz", true },
- { "pantsu.club", true },
- { "panzdravi.cz", true },
- { "panzer72.ru", true },
- { "paolodemichele.it", true },
- { "paolotagliaferri.com", true },
- { "pap.la", false },
- { "papa---mama.tk", true },
- { "papa-webzeit.de", true },
- { "papabearsautocenter.com", true },
- { "papadopoulos.me", true },
- { "papakatsu-life.com", true },
- { "paparazzie.de", true },
- { "papaya.me.uk", true },
- { "papayame.com", true },
- { "papayapythons.com", true },
- { "papelcraft.co.uk", true },
- { "papelpack.cl", true },
- { "paper-republic.org", true },
- { "paper.sc", true },
- { "paperlesssolutionsltd.com.ng", true },
- { "papermuseum.jp", true },
- { "paperplatefun.com", true },
- { "papersmart.net", true },
- { "papertracker.net", true },
- { "paperturn.com", true },
- { "paperwritinghelp.net", true },
- { "paperwritten.com", true },
- { "papiermakerijdehoop.nl", true },
- { "papiermeteenverhaal.nl", true },
- { "papierniczy.eu", true },
- { "papillon-events.be", true },
- { "papion.it", true },
- { "pappasappar.se", true },
- { "paprikas.fr", true },
- { "par-allel.ru", true },
- { "paraborsa.net", true },
- { "parachute70.com", false },
- { "parachuteteam.co.uk", true },
- { "paracomer.es", true },
- { "paradais-sphynx.com", true },
- { "paradependentesquimicos.com.br", true },
- { "paradies-baar.ch", true },
- { "paradigma-med.ru", true },
- { "paradise-engineer.com", true },
- { "paradise-engineering.com", true },
- { "paradise-travel.net", true },
- { "paradiselost.com", true },
- { "paradiseprivatehospital.com", true },
- { "paradisestore.org", true },
- { "paragonie.com", false },
- { "paragonremodeling.com", true },
- { "paragontasarim.com", true },
- { "paragreen.net", true },
- { "parallaxsite.com", true },
- { "paramaquetas.com", true },
- { "paramountelectronics.co.uk", true },
- { "paranoidandroid.tk", true },
- { "paranoidmode.com", true },
- { "paranoidpenguin.net", true },
- { "paranoxer.hu", true },
- { "parareflex.fr", true },
- { "parasitologyclub.org", true },
- { "parasosto.fi", true },
- { "paratlan.hu", true },
- { "paratxt.org", true },
- { "parcbotanique.com", true },
- { "parcelbroker.co.uk", false },
- { "parchcraftaustralia.com", true },
- { "parckwart.de", true },
- { "parcon.it", true },
- { "parcoursup-nouvelle-caledonie.fr", true },
- { "parcoursup.fr", true },
- { "pareachat.com", true },
- { "paremvasi.net", true },
- { "parentelement.com", true },
- { "parentinterview.com", true },
- { "parentsandzebrasunited.com", true },
- { "parentsintouch.co.uk", true },
- { "parfum-selbermachen.de", true },
- { "parfumer.tk", true },
- { "parfumerie-de-grasse.fr", false },
- { "pari.cz", true },
- { "parisackerman.com", true },
- { "parisbloom.com", true },
- { "parisderriere.fr", true },
- { "parisescortgirls.com", true },
- { "parisfranceparking.com", true },
- { "parisfranceparking.de", true },
- { "parisfranceparking.fr", true },
- { "parisfranceparking.nl", true },
- { "parisprovincedemenagements.fr", true },
- { "parkeerbordenhuren.be", true },
- { "parkefficient.de", true },
- { "parkercs.tech", true },
- { "parkeren.in", true },
- { "parkerforum.cf", true },
- { "parkerforum.tk", true },
- { "parkerplumbingcompany.com.au", true },
- { "parkers.co.uk", true },
- { "parket.gq", true },
- { "parketdoska.ua", true },
- { "parkettdielen.net", true },
- { "parkinginparis.fr", true },
- { "parkingparisnord.fr", true },
- { "parkinsplasticsurgery.com", true },
- { "parkrocker.com", true },
- { "parkrunstats.servehttp.com", true },
- { "parkscandles.com", true },
- { "parkvetgroup.com", true },
- { "parkviewmotorcompany.com", true },
- { "parkwayminyan.org", true },
- { "parlamento.gub.uy", true },
- { "parleamonluc.fr", true },
- { "parleur.net", true },
- { "parltrack.org", true },
- { "parmels.com.br", true },
- { "parnassys.net", true },
- { "parnizaziteksasko.cz", true },
- { "parodesigns.com", true },
- { "paroisses-theix-surzur.com", true },
- { "parolu.io", true },
- { "parquettista.milano.it", true },
- { "parquettista.roma.it", true },
- { "parrilladasparaeventos.com", true },
- { "parrocchiadimeana.tk", true },
- { "parrocchiamontevecchia.it", true },
- { "parry.org", true },
- { "pars.work", true },
- { "parsdev.ir", true },
- { "parsemail.org", true },
- { "parser.nu", true },
- { "parsonsfamilyhomes.com", true },
- { "parsuv.ir", true },
- { "part-of-that-world.com", true },
- { "part.la", true },
- { "partage-noir.fr", true },
- { "parteaga.com", true },
- { "parteaga.net", true },
- { "partecipa.tn.it", true },
- { "partenopei.net", true },
- { "parthkolekar.me", true },
- { "partii.tk", true },
- { "partin.nl", true },
- { "partiono.com", true },
- { "partner.sh", true },
- { "partnercardservices.com", true },
- { "partnermobil.de", true },
- { "partnersofprc.com", true },
- { "partnerwerk.de", true },
- { "partoenagua.org", true },
- { "partou.de", true },
- { "partridge.tech", true },
- { "parts4phone.com", false },
- { "partsestore.com", true },
- { "partshop.be", true },
- { "parturi-manner.fi", false },
- { "partusedtyres.net", true },
- { "party-and-play.co.uk", true },
- { "party-kneipe-bar.com", true },
- { "party-time-inflatables-durham.co.uk", true },
- { "partyausstatter24.de", true },
- { "partybounceplay.co.uk", true },
- { "partycentrumopenhuis.nl", true },
- { "partyhireisleofwight.co.uk", true },
- { "partyhireliverpool.co.uk", true },
- { "partypearl.de", true },
- { "partyrocksbounce.co.uk", true },
- { "partyschnaps.com", true },
- { "partyspaces.co.uk", true },
- { "partytime-uk.co.uk", true },
- { "partytimeltd.ie", true },
- { "partytownireland.co.uk", true },
- { "partytownmarquees.co.uk", true },
- { "partyyy.io", true },
- { "partyzone.ie", true },
- { "parvaneh.fr", true },
- { "parys.org", true },
- { "pasadenapooch.org", true },
- { "pasalt.com", true },
- { "pasarella.eu", true },
- { "pasarkoin.co", true },
- { "pascal-bourhis.com", true },
- { "pascal-wittmann.de", true },
- { "pascal90.de", true },
- { "pascalchristen.ch", true },
- { "pascaline-jouis.fr", true },
- { "pascalleguern.com", true },
- { "pascalmathis.com", true },
- { "pascalmathis.me", true },
- { "pascalmathis.net", true },
- { "pascualinmuebles.com", true },
- { "pasearch.nl", true },
- { "pashminacachemire.com", true },
- { "pasito.se", true },
- { "pasnederland.tk", true },
- { "pasquinelli-truebag.ch", true },
- { "pass.org.my", true },
- { "passabook.com", true },
- { "passau-webdesign.com", true },
- { "passbolt.com", true },
- { "passcod.name", true },
- { "passengertravelportal.com", true },
- { "passfilesafe.com", true },
- { "passfindr.com", true },
- { "passhojao.com", true },
- { "passieposse.nl", true },
- { "passionandbalance.com", true },
- { "passionate.org.nz", true },
- { "passionatefoodie.co.uk", true },
- { "passionatehorsemanship.com", true },
- { "passionatelife.com.au", true },
- { "passiondesigns.web.id", true },
- { "passionebenessere.com", true },
- { "passionfiat.fr", true },
- { "passionpictures.eu", true },
- { "passmefaster.net", true },
- { "passover-fun.com", true },
- { "passport.yandex.by", true },
- { "passport.yandex.com", true },
- { "passport.yandex.com.tr", true },
- { "passport.yandex.kz", true },
- { "passport.yandex.ru", true },
- { "passport.yandex.ua", true },
- { "passports.govt.nz", true },
- { "passporttrails.com", true },
- { "passthepopcorn.me", true },
- { "passumpsicbank.com", true },
- { "passvanille-reservation.fr", true },
- { "passvau.lt", true },
- { "passwd.one", true },
- { "passwd.org", true },
- { "password-checker.de", true },
- { "passwordhashing.com", true },
- { "passwordkeeperbooks.com", true },
- { "passwords.google.com", false },
- { "passwordscon.org", true },
- { "passwordsecurity.info", true },
- { "passworks.io", true },
- { "pasta-factory.co.il", true },
- { "pastaenprosecco.nl", true },
- { "paste.fedoraproject.org", true },
- { "paste.gg", true },
- { "paste.to", true },
- { "pastebin.co.za", true },
- { "pasteht.ml", true },
- { "pasternok.org", true },
- { "pasticcerialorenzetti.com", true },
- { "pastimeproject.com", true },
- { "pasztor.at", true },
- { "patatbesteld.nl", true },
- { "pataterosviajeros.com", true },
- { "patbatesremodeling.com", false },
- { "patchofabsence.com", true },
- { "patchyvideo.com", true },
- { "patdorf.com", true },
- { "patechmasters.com", true },
- { "patentados.com", true },
- { "patentchallenges.com", true },
- { "patentfamily.de", true },
- { "pathagoras.com", true },
- { "pathsha.re", true },
- { "patika-biztositas.hu", true },
- { "patikabiztositas.hu", true },
- { "patineteselectricosbaratos.net", true },
- { "patioroof.cf", true },
- { "patlis.com", true },
- { "patric-lenhart.de", true },
- { "patriciaandpaul.com", true },
- { "patriciaramos.pt", true },
- { "patrick-othmer.de", true },
- { "patrick-robrecht.de", true },
- { "patrick.my-gateway.de", true },
- { "patrick21.ch", true },
- { "patrickaudley.ca", true },
- { "patrickaudley.com", true },
- { "patrickbrosi.de", true },
- { "patrickcurl.com", true },
- { "patrickhoefler.net", true },
- { "patricklynch.xyz", true },
- { "patrickschneider.me", true },
- { "patrikgarten.de", true },
- { "patriksima.cz", true },
- { "patriksimek.cz", true },
- { "patrikzk.eu", true },
- { "patrocinio.com.br", true },
- { "patrol-x.com", true },
- { "patryk.cf", true },
- { "patrz.eu", true },
- { "patsyforyou.ch", false },
- { "patsytoforyou.ch", false },
- { "pattayafruitgarden.tk", true },
- { "pattuka.com", true },
- { "pattyliao.com", true },
- { "patystation.com", true },
- { "paudley.ca", true },
- { "paudley.com", true },
- { "paudley.org", true },
- { "paul-barton.co.uk", true },
- { "paul-online.tech", true },
- { "paul-sitarz.com", true },
- { "paul.reviews", true },
- { "pauladamsmith.com", true },
- { "paulalutz.com", false },
- { "paulbdelaat.nl", true },
- { "paulbramhall.uk", true },
- { "paulchen.at", false },
- { "paulcoldren.org", true },
- { "paulcooper.me.uk", true },
- { "pauld.codes", true },
- { "pauld.digital", true },
- { "paulerhof.com", true },
- { "paulgerberrealtors.com", true },
- { "paulinewesterman.nl", true },
- { "paullockaby.com", true },
- { "paulmarc.org", true },
- { "paulmeier.com", false },
- { "pauloalcobianeves.pt", true },
- { "paulocolacino.tk", true },
- { "paulomonteiro.pt", true },
- { "paulov.com", true },
- { "paulov.info", true },
- { "paulov.ru", true },
- { "paulrobertlloyd.com", true },
- { "paulrotter.de", true },
- { "paulschreiber.com", true },
- { "paulscustomauto.com", true },
- { "paulsitarz.com", true },
- { "paulsnar.lv", true },
- { "paulswartz.net", true },
- { "paulus-foto.pl", true },
- { "paulward.net", true },
- { "paulwatabe.com", true },
- { "paulwendelboe.com", true },
- { "pauly-stahlhandel.com", true },
- { "pauly-stahlhandel.de", true },
- { "pauspam.net", true },
- { "pautadiaria.com", true },
- { "pavamtio.cz", true },
- { "pavando.com", false },
- { "pavelfojt.cz", true },
- { "pavelfucik.com", true },
- { "pavelfucik.cz", true },
- { "pavelfucik.eu", true },
- { "pavelitus.tk", true },
- { "pavelrebrov.com", true },
- { "pavelstriz.cz", true },
- { "pavernosmatao.tk", true },
- { "paw.cloud", true },
- { "paw.pt", true },
- { "pawel-international.com", true },
- { "pawelurbanek.com", true },
- { "pawgearlab.com", true },
- { "pawserv.pw", true },
- { "pawspuppy.com", false },
- { "pawsr.us", true },
- { "pawsru.org", true },
- { "paxchecker.com", true },
- { "paxer.com", true },
- { "paxerahealth.com", true },
- { "pay-online.in", true },
- { "pay.gov", true },
- { "paya.cat", true },
- { "payboy.biz", true },
- { "payboy.rocks", true },
- { "paybro.eu", true },
- { "payexpresse.com", true },
- { "payfazz.com", true },
- { "payjunction.com", true },
- { "payjunctionlabs.com", true },
- { "paylike.io", true },
- { "paylike.se", true },
- { "payloc.io", true },
- { "payme.uz", true },
- { "payment-express.net", true },
- { "payment.ac.cn", true },
- { "paymentaccuracy.gov", true },
- { "payments.google.com", true },
- { "paymerang.com", true },
- { "paymongo.com", true },
- { "paynet.com.co", true },
- { "payoff.com", true },
- { "paypal.com", true },
- { "paypaq.com", true },
- { "paypro.nl", false },
- { "payps.ru", true },
- { "payroll.myftp.org", true },
- { "paysbuy.net", true },
- { "paysera.com", true },
- { "payslipview.com", true },
- { "payssaintgilles.fr", false },
- { "paystack.com", true },
- { "paytm.in", true },
- { "paytonmoledor.com", true },
- { "payupay.ru", true },
- { "pazerandepstein.com", true },
- { "pb.ax", false },
- { "pbcables.tk", true },
- { "pbdigital.org", true },
- { "pborn.eu", true },
- { "pbosquet.com", false },
- { "pbourhis.me", true },
- { "pbr.so", true },
- { "pbrb.gov", false },
- { "pbren.com", true },
- { "pbrumby.com", true },
- { "pbwebdev.com", true },
- { "pbz.im", true },
- { "pc-rescue.me", false },
- { "pc-warriors.com", true },
- { "pc28yc.com", true },
- { "pcatv.org", true },
- { "pcbmarketing.gq", true },
- { "pcccthicongcungcap.com", true },
- { "pcdbank.com", true },
- { "pcdn.cf", true },
- { "pcdocjim.com", true },
- { "pcel.com", true },
- { "pcexpress.tk", true },
- { "pcf-frankfurt.de", true },
- { "pcf92.fr", true },
- { "pcgamingfreaks.at", true },
- { "pchancs.com", true },
- { "pchelpforum.net", true },
- { "pci-e.net", true },
- { "pciconcursos.com.br", true },
- { "pcisecuritystandards.org", true },
- { "pcissc.org", true },
- { "pckurzypd.sk", true },
- { "pclaeuft.de", true },
- { "pclob.gov", true },
- { "pcloud.com", true },
- { "pcmkrembangan.or.id", true },
- { "pcmobile.tech", true },
- { "pcmr.info", true },
- { "pcnotdienst-oldenburg-rastede.de", true },
- { "pcprkolo.pl", true },
- { "pcr24.ru", true },
- { "pcrab.ml", true },
- { "pcrabme.com", true },
- { "pcrypt.org", true },
- { "pcsetting.com", true },
- { "pctonic.net", true },
- { "pctrouble.net", true },
- { "pculiar.com", true },
- { "pcunderground.com.ar", true },
- { "pcw.gov.ph", true },
- { "pdc.wales", true },
- { "pdf-archive.com", true },
- { "pdfconvert.me", true },
- { "pdfget.com", true },
- { "pdfmint.com", true },
- { "pdfpassword.org", true },
- { "pdfpasswort.de", true },
- { "pdfresizer.com", true },
- { "pdfsearches.com", true },
- { "pdox.net", true },
- { "pdxdeli.com", true },
- { "pdxtowncar.net", true },
- { "pe-bank.jp", true },
- { "pe.search.yahoo.com", false },
- { "peabodytile.com", true },
- { "peaceandjava.com", true },
- { "peacedivorce.com", true },
- { "peaceispossible.cc", true },
- { "peacekeeper.tk", true },
- { "peaceloveandlabor.com", true },
- { "peakhomeloan.com", true },
- { "peakslead.com", true },
- { "peaksloth.com", true },
- { "peakvets.co.uk", true },
- { "peanutbase.org", true },
- { "peanutproductionsnyc.com", true },
- { "pear2pear.de", true },
- { "pearbloom.com", true },
- { "pearcom.co.uk", true },
- { "pearlsonly.ca", true },
- { "pearlsonly.com", true },
- { "pearlsonly.com.au", true },
- { "pearlsonly.de", true },
- { "peatsbeast.com", false },
- { "peawo.com", true },
- { "pebbleparents.com", false },
- { "pebblepointapartmentsstl.com", true },
- { "pebbles.net.in", true },
- { "pebmarketing.nl", true },
- { "pecheneg.tk", true },
- { "pechonova.com", true },
- { "pecker-johnson.com", true },
- { "peda.net", true },
- { "pedago.it", true },
- { "pedaleuse.be", true },
- { "pedalsbarcelona.com", true },
- { "peddy.dyndns.org", true },
- { "pediatersucha.sk", true },
- { "pedicurean.nl", true },
- { "pedicureduiven.nl", true },
- { "pedigreetechnologies.com", true },
- { "pedikura-vitu.cz", true },
- { "pedimanie.cz", true },
- { "pedimoda.com.br", true },
- { "pedro.com.es", true },
- { "pedrosaurus.com", true },
- { "pedroventura.com", false },
- { "peeekaaabooo.com", true },
- { "peekier.com", true },
- { "peenor.xyz", true },
- { "peep.gq", true },
- { "peepsfoundation.org", false },
- { "peer.travel", true },
- { "peerbanking.com.au", true },
- { "peercraft.at", true },
- { "peercraft.be", true },
- { "peercraft.biz", true },
- { "peercraft.ch", true },
- { "peercraft.cn", true },
- { "peercraft.co.uk", true },
- { "peercraft.com", true },
- { "peercraft.de", true },
- { "peercraft.dk", true },
- { "peercraft.es", true },
- { "peercraft.eu", true },
- { "peercraft.fr", true },
- { "peercraft.info", true },
- { "peercraft.it", true },
- { "peercraft.net", true },
- { "peercraft.nl", true },
- { "peercraft.org", true },
- { "peercraft.pl", true },
- { "peercraft.pt", true },
- { "peercraft.se", true },
- { "peercraft.us", true },
- { "peerigon.com", true },
- { "peername.com", true },
- { "peernode.net", true },
- { "peers.cloud", true },
- { "peertube.social", true },
- { "peerweb.com", true },
- { "peetah.com", true },
- { "peeters.io", true },
- { "peev.io", true },
- { "pefricea.com", true },
- { "pegas-studio.net", true },
- { "peifi.de", false },
- { "peippo.at", true },
- { "pekarstvivetvrzi.cz", true },
- { "pekinet.com", true },
- { "pekkapleppanen.fi", true },
- { "pekoe.se", true },
- { "pelachim.com.br", true },
- { "pelanucto.cz", true },
- { "pelican.ie", true },
- { "pelion.com", true },
- { "pellet.pordenone.it", true },
- { "pelletizermill.com", true },
- { "pelletsprice.com", true },
- { "pelopogrund.com", false },
- { "pelopoplot.com", false },
- { "pelosanimais.org", true },
- { "pelotonimports.com", true },
- { "peluqueriaalcobendas.com", true },
- { "peluqueriaalcobendas.es", true },
- { "pems.gov.au", true },
- { "pen-sec.de", true },
- { "penaugustin.com", true },
- { "pencepay.com", true },
- { "pencil2d.org", true },
- { "pencillab.cn", true },
- { "penconsultants.com", true },
- { "pendriveapps.com", true },
- { "pendrivelinux.com", true },
- { "penetrationstest.se", true },
- { "penfold.fr", true },
- { "pengepung.com", true },
- { "penguinbits.net", true },
- { "penguindrum.moe", true },
- { "penguinprotocols.com", true },
- { "penguinworld.co", true },
- { "penholder.ga", true },
- { "peniarth.cymru", true },
- { "peninsuladoctor.com", true },
- { "penispumpen.se", true },
- { "pennergold.net", true },
- { "pennington.io", true },
- { "pennyparkerpaper.com", true },
- { "penrithapartments.com.au", true },
- { "pens.com", true },
- { "pensacolawinterfest.org", true },
- { "pensador.com", true },
- { "pensador.info", true },
- { "pensioenfonds-ey.nl", true },
- { "pension-am-alten-waschhaus.de", true },
- { "pensionecani.roma.it", true },
- { "pensioner-1000.tk", true },
- { "pensiunea-paco.ro", true },
- { "pensiunealido.ro", true },
- { "penslabyrinth.com", true },
- { "pentagram.me", true },
- { "pentamexicali.tk", true },
- { "pentandra.com", true },
- { "pentatec.de", true },
- { "pentechealth.com", false },
- { "pentest.blog", true },
- { "pentest.nl", true },
- { "pentesterlab.com", true },
- { "pentestit.com", true },
- { "pentofun.ch", true },
- { "pentoo.ch", true },
- { "pentools.org", true },
- { "penz.media", true },
- { "penza-on-line.tk", true },
- { "penza-today.tk", true },
- { "penzaonline.cf", true },
- { "penzionvzahrade.cz", true },
- { "peoplelikemeapp.com", true },
- { "peoplescu.com", true },
- { "peoplesdecade.org", true },
- { "pepeelektro.sk", true },
- { "pepegym.cz", true },
- { "pepemodelismo.com.br", true },
- { "pepfar.gov", false },
- { "pepgrid.net", true },
- { "pepime.com", true },
- { "pepkey.net", true },
- { "peplog.nl", true },
- { "pepme.net", true },
- { "pepperandpartner.com", true },
- { "pepstaff.net", true },
- { "pequenosfavoritos.com.br", false },
- { "per-olsson.se", true },
- { "perala.me", true },
- { "peraparker.cz", true },
- { "perceptivemeded.com", true },
- { "percolate.com", true },
- { "percraft.com", true },
- { "percy.io", true },
- { "perd.re", true },
- { "pereceh.eu.org", true },
- { "perecraft.com", true },
- { "peredoz.tk", true },
- { "perevedi.org", true },
- { "perevedut.cf", true },
- { "perevirka.net", true },
- { "perewall.tk", true },
- { "perez-marrero.com", true },
- { "perezdecastro.org", true },
- { "perf1.com", true },
- { "perfect-carstyle.de", true },
- { "perfect-privacy.com", true },
- { "perfect.in.th", true },
- { "perfectbalance.tech", true },
- { "perfectcloud.org", true },
- { "perfectfocuseyecare.com", true },
- { "perfectgarden.es", true },
- { "perfectoparty.co.uk", true },
- { "perfectsnap.co.uk", true },
- { "perfectstreaming.systems", true },
- { "perfektesgewicht.de", true },
- { "perfmatters.io", true },
- { "perfmed.ro", true },
- { "performancegate.com", true },
- { "performancehealth.com", false },
- { "performancepiers.com", true },
- { "performing-art-schools.com", true },
- { "performio.co", true },
- { "perfumes.com.br", true },
- { "perfumestudio.in", true },
- { "perini.com.au", true },
- { "periodex.co", true },
- { "periodic-drinking.com", true },
- { "periscope.tv", true },
- { "perishablepress.com", true },
- { "perka.com", true },
- { "perlbanjo.com", true },
- { "perm-avia.ru", true },
- { "perm4.com", true },
- { "permaculture.cf", true },
- { "permaculture.co.uk", true },
- { "permajackofstlouis.com", true },
- { "permaseal.net", true },
- { "permeance108.com", true },
- { "permis-apoints.com", true },
- { "permiscoderoute.fr", true },
- { "permisecole.com", true },
- { "permistheorique.be", true },
- { "permistheoriqueenligne.be", true },
- { "perniciousgames.com", false },
- { "perot.me", true },
- { "perpetual.ga", true },
- { "perpetualemotion.com", true },
- { "perron.ml", true },
- { "perroquet-passion.ch", false },
- { "pers-hr.tk", true },
- { "persefonne.com", true },
- { "persephone.gr", true },
- { "persiennkompaniet.se", true },
- { "personadecoded.com", true },
- { "personal-genome.com", true },
- { "personalidadmagnetica.com", true },
- { "personalityjunkie.com", true },
- { "personalitymax.com", true },
- { "personaljokes.ml", true },
- { "personalnames.net.ru", true },
- { "personaltrainer-senti.de", true },
- { "personskadeadvokater.no", true },
- { "personvernnemnda.no", true },
- { "perspectivum.com", true },
- { "perspektivwechsel-coaching.de", true },
- { "persson.me", true },
- { "perthhillsarmadale.com.au", true },
- { "perthtrains.net", true },
- { "perubusca.nl", true },
- { "perulinks.tk", true },
- { "perun.wiki", true },
- { "pervoklass.cf", true },
- { "perzeidi.hr", true },
- { "pescadorcomunicacao.com.br", true },
- { "pescco.com.br", true },
- { "pestcontrol.co.uk", true },
- { "pestici.de", true },
- { "pestpilis.hu", true },
- { "pet-hotel-mura.net", true },
- { "petabits.de", true },
- { "petalkr.com", true },
- { "petbooking.it", true },
- { "petburial.cf", true },
- { "petcarvers.com", true },
- { "petdesign.pet", true },
- { "petech.ro", true },
- { "petelew.is", true },
- { "peter-hurtenbach.de", false },
- { "peter-r.co.uk", true },
- { "peter.org.ua", true },
- { "peterandjoelle.co.uk", true },
- { "peterbarrett.ca", true },
- { "peterboers.info", true },
- { "peterborgapps.com", true },
- { "peterboweycomputerservices.com.au", true },
- { "peterbruceharvey.com", true },
- { "peterdavehello.org", true },
- { "peterfiorella.com", true },
- { "peterheery.me", true },
- { "peterhons.com.au", true },
- { "peterhuetz.at", true },
- { "peterhuetz.com", true },
- { "peterjin.org", true },
- { "peterjohnson.io", true },
- { "peterkrivanek.com", true },
- { "peterlew.is", true },
- { "petermaar.com", true },
- { "peterslavik.com", true },
- { "petersontoscano.com", true },
- { "petervaldesii.com", false },
- { "petervaldesii.io", false },
- { "petfa.ga", true },
- { "petherwick.co.uk", true },
- { "petherwick.com", true },
- { "petherwicks.co.uk", true },
- { "petherwicks.com", true },
- { "pethood.com.au", true },
- { "pethub.com", true },
- { "petit-archer.com", true },
- { "petite-maison.ch", true },
- { "petitsfrenchies.com", true },
- { "petitu.mx", true },
- { "petja.me", false },
- { "petlife.vet", true },
- { "petmall.bg", true },
- { "petnow.gr", true },
- { "peto.nl", true },
- { "petofiprogram.hu", true },
- { "petos.tk", true },
- { "petplus.com", true },
- { "petpost.co.nz", false },
- { "petpower.eu", true },
- { "petr.as", true },
- { "petrachuk.ru", true },
- { "petrasestakova.cz", true },
- { "petravdbos.nl", true },
- { "petresort.pt", true },
- { "petroleum-schools.com", true },
- { "petrologisticsllc.com", true },
- { "petrotranz.com", true },
- { "petrotrustlibya.com", true },
- { "petrovich.pro", true },
- { "petrovitch.tk", true },
- { "petrsvec.cz", true },
- { "petrucciresidential.com", true },
- { "petruzz.net", true },
- { "petschnighof.at", true },
- { "petstoredog.com", true },
- { "petto.com.co", true },
- { "peturnashes.ga", true },
- { "petwatchersnj.com", true },
- { "pew.ninja", true },
- { "pewnews.org", true },
- { "pex.digital", false },
- { "pexxi.eu", true },
- { "peyote.com", true },
- { "peyote.org", true },
- { "pf.dk", true },
- { "pfa.or.jp", true },
- { "pfadfinder-aurich.de", true },
- { "pfadfinder-grossauheim.de", true },
- { "pfarre-kremsmuenster.at", true },
- { "pfarreiengemeinschaft-neuerburg.de", true },
- { "pfcafeen.dk", true },
- { "pfd-nz.com", false },
- { "pfefferkuchen-shop.de", true },
- { "pfefferkuchenprinzessin-dresden.de", true },
- { "pferdesportclub-chiemgau.de", true },
- { "pfeuffer-elektro.de", true },
- { "pfft.net", true },
- { "pfk.org.pl", true },
- { "pflan.dk", true },
- { "pflanzen-shop.ch", true },
- { "pflanzenshop-emsland.de", true },
- { "pfmeasure.com", true },
- { "pfotentour-berlin.de", true },
- { "pfrost.me", true },
- { "pfstaging.xyz", true },
- { "pg-forum.de", true },
- { "pg-mana.net", true },
- { "pgh-art.com", true },
- { "pgmann.cf", true },
- { "pgnetwork.net", true },
- { "pgpmail.cc", true },
- { "pgregg.com", true },
- { "ph-blog.de", true },
- { "ph.search.yahoo.com", false },
- { "ph3r3tz.net", true },
- { "phantastikon.de", true },
- { "phantomfund.ml", true },
- { "pharma-display.com", true },
- { "pharmaabsoluta.com.br", true },
- { "pharmaboard.de", true },
- { "pharmaboard.org", true },
- { "pharmaceuticalcannabis.org", true },
- { "pharmacieplusfm.ch", false },
- { "pharmacistinfo.ru", true },
- { "pharmacy.org.pk", true },
- { "pharmapolitics.com", true },
- { "pharmasana.co.uk", true },
- { "pharmasana.de", true },
- { "pharmasana.ru", true },
- { "pharmica.co.uk", true },
- { "pharmica.uk", true },
- { "pharside.dyndns.org", true },
- { "pharynks.com", true },
- { "phasme-2016.com", true },
- { "phaux.uno", true },
- { "phbits.com", true },
- { "phc-sa.com", true },
- { "phcimages.com", true },
- { "phcnetworks.net", false },
- { "phcorner.net", true },
- { "pheasantrunpress.com", true },
- { "phellowseven.com", true },
- { "phelx.de", true },
- { "phenixairsoft.com", true },
- { "phenq.com", true },
- { "pheramoan.com", true },
- { "pheramoans.com", true },
- { "phero.com", true },
- { "pheroforce.com", true },
- { "pherologie.com", true },
- { "pherology.com", true },
- { "pheromeon.com", true },
- { "pheromeons.com", true },
- { "pheromoans.com", true },
- { "pheromoen.com", true },
- { "pheromoens.com", true },
- { "pheromonez.com", true },
- { "pheronome.com", true },
- { "pheronomes.com", true },
- { "pheros.com", true },
- { "pheroz.com", true },
- { "phget.com", true },
- { "phi-works.com", true },
- { "phibureza.com", true },
- { "phil-dirt.com", true },
- { "phil.red", true },
- { "phil.tw", true },
- { "philadelphia.com.mx", true },
- { "philanima.com", true },
- { "philarmonic-abaza.tk", true },
- { "phildonaldson.com", true },
- { "phileas-psychiatrie.be", true },
- { "philia-sa.com", false },
- { "philipdb.com", true },
- { "philipdb.nl", true },
- { "philipdeussen.com", true },
- { "philipdeussen.de", true },
- { "philiperiksson.se", true },
- { "philipkobelt.ch", true },
- { "philipp-winkler.de", true },
- { "philippbirkholz.de", true },
- { "philippe-metayer-platrier.fr", true },
- { "philippe-mignotte.fr", true },
- { "philippebonnard.fr", true },
- { "philipperoose.be", false },
- { "philippestudiopro.com", true },
- { "philippheenen.de", false },
- { "philippinedroneassociation.org", true },
- { "philippinegreenparty.tk", true },
- { "philippinenewsvanguard.tk", true },
- { "philippkeschl.at", true },
- { "philipssupportforum.com", true },
- { "philipzhan.tk", true },
- { "phillippe-lemarc.ch", true },
- { "philna.sh", true },
- { "philo.shop", true },
- { "philosoftware.com.br", true },
- { "philosophers.tk", true },
- { "philosopherswool.com", true },
- { "philosophy-colleges.com", true },
- { "philosophyguides.org", true },
- { "philphonic.de", true },
- { "phils1990.com", true },
- { "philslab.cloud", true },
- { "philslab.ninja", true },
- { "philsown.de", true },
- { "philsturgeon.uk", true },
- { "philux.ch", false },
- { "phinphanatic.com", true },
- { "phive.eu", true },
- { "phoenixnest.ltd", true },
- { "phoenixnow.org", true },
- { "phoenixurbanspaces.com", true },
- { "phographer.com", true },
- { "pholder.com", true },
- { "phone-service-center.de", true },
- { "phone888.cn", true },
- { "phonedoc.it", true },
- { "phonemore.com", true },
- { "phonenumber-info.co.uk", true },
- { "phonenumberfind.tk", true },
- { "phonetikos.com", true },
- { "phongthuyanthinh.vn", false },
- { "phongthuyhoangmanh.vn", true },
- { "phongthuytaitam.vn", true },
- { "phormance.com", true },
- { "phosagro.biz", false },
- { "phosagro.com", false },
- { "phosagro.ru", false },
- { "phosphene.io", true },
- { "photistic.org", true },
- { "photo-castings.com", true },
- { "photo-livesearch.com", true },
- { "photo-paysage.com", true },
- { "photo.org.il", true },
- { "photoancestry.com", true },
- { "photoartelle.com", true },
- { "photobooth.id", true },
- { "photodeal.fr", true },
- { "photographe-reims.com", false },
- { "photographerforwedding.tk", true },
- { "photography-workshops.net", true },
- { "photolessya.by", true },
- { "photomodelcasting.com", true },
- { "photosafari.com.my", true },
- { "photosafaribg.com", true },
- { "photosaloncontest.com", true },
- { "photosgaia.ch", true },
- { "photoshop-tipps-und-tricks.de", true },
- { "phototravel.uk", true },
- { "photoutils.com", true },
- { "phoxden.net", true },
- { "phoxmeh.com", true },
- { "php-developer.org", true },
- { "php-tuning.de", true },
- { "php.watch", true },
- { "phparcade.com", true },
- { "phpartners.org", true },
- { "phpbbchinese.com", true },
- { "phpcrudgenerator.com", true },
- { "phpdorset.co.uk", true },
- { "phpfashion.com", true },
- { "phpkoru.com", true },
- { "phpliteadmin.org", true },
- { "phpmyadmin.net", true },
- { "phpmynewsletter.com", true },
- { "phpprime.com", true },
- { "phpsecure.info", true },
- { "phpstan.org", true },
- { "phpunit.de", true },
- { "phuductms.com", true },
- { "phuket-idc.com", true },
- { "phuket-idc.de", true },
- { "phuket-nash.ga", true },
- { "phukienchanh.com", true },
- { "phulyshop.com", true },
- { "phuoctran.com", true },
- { "phuoctran.com.vn", true },
- { "phuoctran.me", true },
- { "phuoctran.org", true },
- { "phuoctran.vn", true },
- { "phurl.de", true },
- { "phurl.io", true },
- { "phyley.com", true },
- { "phyllischerry.com", true },
- { "physicalism.com", true },
- { "physicalist.com", true },
- { "physicpezeshki.com", false },
- { "physics-schools.com", true },
- { "physik.hu", true },
- { "physiobiggerawaters.com.au", true },
- { "physiotherapie-seiwald.de", true },
- { "physiovesenaz.ch", false },
- { "pi-control.de", true },
- { "pi-dash.com", true },
- { "pi-net.dedyn.io", true },
- { "pi-supply.com", true },
- { "pi3kum.com", true },
- { "pianetaottica.com", false },
- { "pianetatatuaggi.it", true },
- { "pianomover.co.uk", true },
- { "pianos.de", true },
- { "pianyigou.com", true },
- { "piata.com.br", true },
- { "piataborrachas.com.br", true },
- { "piatabrasil.com.br", true },
- { "piatatem.com.br", true },
- { "piatika.com", true },
- { "piazzafrancesco.com", true },
- { "piboubes.me", true },
- { "pic.gov", false },
- { "pic2map.com", true },
- { "picchietti.io", true },
- { "piccirello.com", true },
- { "piccolo-parties.co.uk", true },
- { "pick.aw", true },
- { "pick150.hu", true },
- { "picka.gift", true },
- { "pickabrain.fr", true },
- { "pickaw.click", true },
- { "pickaw.com", true },
- { "pickaw.link", true },
- { "pickelhaubes.com", true },
- { "picklinik.id", true },
- { "pickormix.co.uk", true },
- { "picksin.club", true },
- { "pickupenc.ru", true },
- { "piclect.com", true },
- { "picom365.com", true },
- { "piconepress.com", true },
- { "picr.ws", true },
- { "picsto.re", true },
- { "pictorial.com.sg", true },
- { "pictoriastudios.com", true },
- { "pictorista.com", true },
- { "pictr.nl", true },
- { "picture.team", true },
- { "pictureguy.de", true },
- { "picturingjordan.com", true },
- { "pidginhost.com", true },
- { "pidibagrik.cz", true },
- { "pidjipi.com", true },
- { "pidmanager.de", true },
- { "pie-express.xxx", true },
- { "pieces-or.com", true },
- { "piedrasblancas.gov", true },
- { "piekacz.eu.org", true },
- { "piekacz.net", true },
- { "piekacz.tel", true },
- { "piektraining.com", true },
- { "pieland.eu", true },
- { "piem.org", true },
- { "piening.ddns.net", true },
- { "piepermail.nl", true },
- { "pieq.eu", true },
- { "pieq.eu.org", true },
- { "pier1url.com", true },
- { "pier28.com", true },
- { "piercing.hu", true },
- { "piercraft.com", true },
- { "pierre-denoblens.net", true },
- { "pierre-schmitz.com", true },
- { "pierreau.fr", true },
- { "pierrefv.com", false },
- { "pierreterrien.fr", true },
- { "pierreyvesdick.fr", true },
- { "pierrickdeniel.fr", true },
- { "pieter-verweij.nl", true },
- { "pieterbamps.tk", true },
- { "pieterbos.nl", true },
- { "pieterdev.net", true },
- { "pietermaene.be", false },
- { "pietz.uk", true },
- { "pif.email", true },
- { "piferdal.pt", true },
- { "piffer.ind.br", true },
- { "pigb.net", true },
- { "pigliadesigns.com", true },
- { "pijuice.com", true },
- { "pijusmagnificus.com", true },
- { "pik.bzh", true },
- { "pikafederation.ca", true },
- { "pikboxstore.com", true },
- { "piken.eu", true },
- { "pikio.pl", true },
- { "pilani.ch", false },
- { "pilarguineagil.com", true },
- { "pilatescenteraz.com", true },
- { "pilatespt.nl", true },
- { "pildat.org", true },
- { "pileofgarbage.net", true },
- { "pill.id", true },
- { "pillitteriobgyn.com", true },
- { "pillowfort.pub", true },
- { "pilot-colleges.com", true },
- { "pilotgrowth.com", true },
- { "pilsoncontracting.com", true },
- { "pilvi.pw", true },
- { "pilvin.pl", true },
- { "pimanta.com", true },
- { "pimhaarsma.nl", true },
- { "pimhaarsmamedia.nl", true },
- { "pimichi.com", true },
- { "pimpmymac.ru", true },
- { "pimpmypaper.com", true },
- { "pimpmyperf.fr", false },
- { "pimylifeup.com", true },
- { "pin.net.au", true },
- { "pinceaux.org", true },
- { "pinchuk.tk", true },
- { "pincodeit.com", true },
- { "pincong.rocks", true },
- { "pindanutjes.be", false },
- { "pinellaslaser.com", true },
- { "pinemountainnursery.com.au", true },
- { "pinemountbaptistchurch.org", true },
- { "pinetopazrealestate.com", true },
- { "pingworks.com", true },
- { "pingworks.de", true },
- { "pingworks.eu", true },
- { "pingworks.net", true },
- { "pinhadigital.com", true },
- { "pinheirofrio.pt", true },
- { "pinimg.com", true },
- { "pinkapple.com", true },
- { "pinkbike.com", true },
- { "pinkbikecycle.com", true },
- { "pinkbuff.com", true },
- { "pinkerton.io", true },
- { "pinklecfest.org", true },
- { "pinklittlenotebook.com", true },
- { "pinkoi.com", true },
- { "pinksec.com.au", true },
- { "pinkwalk.co.nz", true },
- { "pinkylam.me", true },
- { "pinnaclelife.co.nz", true },
- { "pinnakl.com", true },
- { "pinot.it", true },
- { "pinoydailytvshow.net", true },
- { "pinoyonlinetv.com", true },
- { "pinoytech.ph", true },
- { "pinpayments.com", true },
- { "pinpointengineer.co.uk", true },
- { "pinpromosisemarang.com", true },
- { "pinskupakki.fi", true },
- { "pinster.com", true },
- { "pinterest.at", true },
- { "pinterest.co.uk", true },
- { "pinterest.com", true },
- { "pinterest.de", true },
- { "pinterest.engineering", true },
- { "pinterest.ie", true },
- { "pinterest.info", true },
- { "pinterest.jp", true },
- { "pinterjann.is", true },
- { "pintiaux.com", true },
- { "pintosbeeremovals.co.za", true },
- { "pintoselectricfencing.co.za", true },
- { "pintoselectrician.co.za", true },
- { "pintosplumbing.co.za", true },
- { "pioneer-car.eu", true },
- { "pioneer-rus.ru", true },
- { "pionieren.tk", true },
- { "pipenav.gq", true },
- { "pipenny.net", true },
- { "pipeuro.com", true },
- { "pippenainteasy.com", true },
- { "pipscprd.ca", true },
- { "piraeuspress.gr", true },
- { "piramalglassusa.com", true },
- { "piranhaattack.tk", true },
- { "piraten-basel.ch", true },
- { "piraten-bv-nord.de", true },
- { "pirateparty.org.uk", true },
- { "pirateproxy.bet", true },
- { "pirateproxy.cam", true },
- { "pirateproxy.cat", true },
- { "pirateproxy.cc", true },
- { "pirateproxy.ch", true },
- { "pirateproxy.gdn", true },
- { "pirateproxy.id", true },
- { "pirateproxy.ist", true },
- { "pirateproxy.la", true },
- { "pirateproxy.lat", true },
- { "pirateproxy.one", true },
- { "pirateproxy.onl", true },
- { "pirateproxy.pl", true },
- { "pirateproxy.pw", true },
- { "pirateproxy.red", true },
- { "pirateproxy.sh", true },
- { "pirateproxy.tv", true },
- { "pirateproxy.vc", true },
- { "pirateproxy.vet", true },
- { "pirates-comic.com", true },
- { "piratesbrewcoffee.net", true },
- { "piratesforums.co", true },
- { "pircher.co.uk", true },
- { "pircher.tk", true },
- { "pires.ovh", true },
- { "pirman.es", true },
- { "piroleikki.co.jp", true },
- { "pirscapital.com", true },
- { "piruchita.com", true },
- { "pirxpilot.me", true },
- { "pis.eu.com", true },
- { "pisanpeikot.tk", true },
- { "piscine.roma.it", true },
- { "piseach.be", true },
- { "pisf.in", true },
- { "pishifu.org", true },
- { "piskenfuerwehr.de", true },
- { "pisquettes.fr", true },
- { "pissblau.com", true },
- { "pissflaps.co.uk", true },
- { "pistonkandidatu.tk", true },
- { "pistonpowered.com", true },
- { "pisupp.ly", true },
- { "pitaiabank.com", true },
- { "pitaiatrade.com", true },
- { "pitbooks.ga", true },
- { "pitbullsecuritysolutions.ca", true },
- { "pitchup.com", true },
- { "pitchupp.com", true },
- { "pitot-rs.org", true },
- { "pitoufi.fr", true },
- { "pitshift.com", true },
- { "piu.moe", true },
- { "piucellulare.it", true },
- { "pivbar.tk", true },
- { "pivniraj.com", true },
- { "pivotaltracker.com", true },
- { "pivotanimation.org", true },
- { "pivotanimation.tk", true },
- { "pivovarcunak.cz", true },
- { "pix5.de", true },
- { "pixael.com", true },
- { "pixe2019.org", true },
- { "pixel.facebook.com", false },
- { "pixel.google.com", true },
- { "pixelabs.fr", true },
- { "pixelcatproductions.net", true },
- { "pixelcomunicacion.com", true },
- { "pixelcubed.com", true },
- { "pixelecommerce.com", true },
- { "pixelmedianetwork.com", true },
- { "pixelminers.net", true },
- { "pixelsquared.us", true },
- { "pixelurbia.com", true },
- { "pixelution.at", true },
- { "pixelz.cc", true },
- { "pixiin.com", true },
- { "pixiv.cat", true },
- { "pixiv.moe", true },
- { "pixivimg.me", true },
- { "pixlfox.com", true },
- { "pixloc.fr", true },
- { "pixshop.fr", true },
- { "pizza-calzone.com", true },
- { "pizza-show.fr", true },
- { "pizzabesteld.nl", true },
- { "pizzafest.ddns.net", true },
- { "pizzagigant.hu", true },
- { "pizzahut.ru", true },
- { "pizzariapartiupizza.com.br", true },
- { "pizzeria-mehrhoog.de", true },
- { "pizzeriaamadeus.hr", true },
- { "pizzeriacolore.com", true },
- { "pizzeriasmallorca.com", true },
- { "pj11018.com", false },
- { "pj21299.com", false },
- { "pj21399.com", false },
- { "pj21499.com", false },
- { "pj21599.com", false },
- { "pj21677.com", false },
- { "pj21678.com", false },
- { "pj21877.com", false },
- { "pj21992.com", false },
- { "pj21994.com", false },
- { "pj21995.com", false },
- { "pj21aa.com", false },
- { "pj21g.com", false },
- { "pj21gg.com", false },
- { "pj21kk.com", false },
- { "pj21n.com", false },
- { "pj21s.com", false },
- { "pj21t.com", false },
- { "pj21z.com", false },
- { "pj4488.cc", false },
- { "pj5588.cc", true },
- { "pjentertainments.co.uk", true },
- { "pjgj16.com", true },
- { "pjleisure.co.uk", true },
- { "pjo.no", true },
- { "pjshop.cf", true },
- { "pjuu.com", false },
- { "pjylb.com", true },
- { "pk.search.yahoo.com", false },
- { "pk.wiki", true },
- { "pk6132.com", true },
- { "pk8.com", true },
- { "pk8k.com", true },
- { "pk9.com", true },
- { "pkbjateng.or.id", true },
- { "pkdhungthinh.com", true },
- { "pkeus.de", true },
- { "pkgt.de", false },
- { "pkirwan.com", true },
- { "pkisolutions.com", true },
- { "pkov.cz", true },
- { "pkphotobooths.co.uk", true },
- { "pkvitality.com", true },
- { "pl-cours.ch", false },
- { "pl-trans.tk", true },
- { "pl.search.yahoo.com", false },
- { "placasonline.com.br", true },
- { "placedaffiliate.com", true },
- { "placedapps.com", true },
- { "placedsupport.com", true },
- { "placehold.co", true },
- { "placeitsf.com", true },
- { "placepugs.com", true },
- { "placeralplato.com", true },
- { "placker.com", true },
- { "plae.com.au", true },
- { "plage-les-pirates.fr", false },
- { "plagiarismcheck.org", true },
- { "plainbulktshirts.co.za", true },
- { "plainjs.com", true },
- { "plaintech.net.au", true },
- { "plaintextpledge.com", true },
- { "plaintextpledge.email", true },
- { "plaintextpledge.eu", true },
- { "plaintextpledge.net", true },
- { "plaintextpledge.org", true },
- { "plaisirdumouvement.com", true },
- { "plaisirs-coquins.com", true },
- { "plan-it-events.de", true },
- { "planboardapp.com", true },
- { "planbox.info", true },
- { "plandegralba.net", true },
- { "planecon.nz", true },
- { "planer.me", true },
- { "planet-work.com", true },
- { "planet.live", true },
- { "planeta-deti.org", true },
- { "planeta-remontika.ga", true },
- { "planetadeti.org", true },
- { "planetanim.fr", true },
- { "planetarian.moe", true },
- { "planetarydesign.com", true },
- { "planetasuboficial.com.br", true },
- { "planetau2.com", true },
- { "planetbreath.ch", false },
- { "planetchiropracticga.com", true },
- { "planete-lira.fr", true },
- { "planeteroliste.com", true },
- { "planeteroliste.fr", true },
- { "planetknauer.net", true },
- { "planetloisirs.com", true },
- { "planetofthegames.tv", true },
- { "planetpowershell.com", true },
- { "planetromeo.com", true },
- { "planetromeofoundation.org", true },
- { "planetsoftware.com.au", true },
- { "planettimer.com", true },
- { "planify.io", false },
- { "planisys.net", true },
- { "planitz.com", true },
- { "planitz.net", true },
- { "planitz.org", true },
- { "planktonforhealth.co.uk", true },
- { "planlos.net", true },
- { "planmemberpartners.com", true },
- { "plannedlink.com", true },
- { "planosylicencias.de", true },
- { "planrow.com", true },
- { "plant-gift.jp", true },
- { "plantarportugal.org", true },
- { "plantarum.com.br", true },
- { "plantastique.ch", false },
- { "planteforum.no", true },
- { "plantekno.com", true },
- { "plantes.ch", true },
- { "plantron.gr", true },
- { "plantroon.com", true },
- { "plantsupplement.co.uk", true },
- { "planujemywesele.pl", true },
- { "planungsregion-abw.de", true },
- { "planview.com", true },
- { "plaque-funeraire.fr", true },
- { "plaque-immatriculation-auto.com", true },
- { "plassmann.ws", true },
- { "plastdesign.com.ua", true },
- { "plastic-id.com", true },
- { "plasticbags.co.uk", true },
- { "plasticosbiobasados.com", true },
- { "plasticstare.com", true },
- { "plasticsurgerynola.com", true },
- { "plasticsurgeryservices.com", true },
- { "plastischechirurgie-linz.at", true },
- { "plastovelehatko.cz", true },
- { "plateformecandidature.com", true },
- { "platform161.com", true },
- { "platform39.com", true },
- { "platformadmin.com", true },
- { "platformlms.org", true },
- { "platinapump.com", true },
- { "platomania.eu", true },
- { "platomania.nl", true },
- { "platten-nach-mass.de", true },
- { "platter.ga", true },
- { "platypiduses.com", true },
- { "plavdoma.com.ua", true },
- { "play-casino-japan.com", true },
- { "play-charades.com", true },
- { "play-the-furyu.com", true },
- { "play.cash", true },
- { "play.google.com", true },
- { "playandwin.co.uk", true },
- { "playanka.com", true },
- { "playawaycastles.co.uk", true },
- { "playcollect.net", true },
- { "playdaysparties.co.uk", true },
- { "playelephant.com", true },
- { "playerdb.co", true },
- { "playfinder.com", true },
- { "playinfinity.com", true },
- { "playinfinityvr.com", true },
- { "playlisten.radio.br", true },
- { "playmytime.com", true },
- { "playnation.io", true },
- { "playnow.com", true },
- { "playnuganug.com", true },
- { "playocean.net", true },
- { "playpirates.com", true },
- { "playreal.city", true },
- { "playsawdust.com", true },
- { "playsharp.com", true },
- { "playsnake.org", true },
- { "playsprout.industries", true },
- { "playstationtrophies.org", true },
- { "playtictactoe.org", true },
- { "playtimebouncycastles.co.uk", true },
- { "playtopia.com", true },
- { "playtopia.fr", true },
- { "playtopia.nl", true },
- { "playtopia.no", true },
- { "playtzolk.in", true },
- { "playviolinmusic.com", true },
- { "plazasummerlin.com", true },
- { "plcgurus.net", true },
- { "pldx.org", true },
- { "pleasantonmobilenotary.com", true },
- { "pleasure-science.com", true },
- { "plegro.com", true },
- { "pleier-it.de", false },
- { "pleier.it", false },
- { "pleine-conscience.ch", false },
- { "plekker.be", true },
- { "plenigo.com", true },
- { "plenkanaotrez.ml", true },
- { "plesse.pl", true },
- { "plexa.de", true },
- { "plexhome13.ddns.net", true },
- { "plezantforum.net", true },
- { "plgr.cc", true },
- { "pliosoft.com", true },
- { "plissee-experte.de", true },
- { "plitu.de", true },
- { "plixer.com", true },
- { "plny.eu", true },
- { "plob.org", true },
- { "ploegleiderbhv.nl", true },
- { "ploi.io", true },
- { "plokko.com", true },
- { "plongee-phuket.fr", true },
- { "plot.ly", true },
- { "plotbubble.com", true },
- { "ploxel.com", true },
- { "plr4wp.com", true },
- { "plsboop.me", true },
- { "pluga.co", true },
- { "plugcubed.net", false },
- { "plugin-planet.com", true },
- { "pluginfactory.io", true },
- { "plugins-telechargement.com", true },
- { "pluginsetemaswp.com", true },
- { "pluginsloaded.com", true },
- { "pluimveeplanner.nl", true },
- { "plumber-in-sandton.co.za", true },
- { "plumbercincoranch.com", true },
- { "plumberlewisvilletexas.com", true },
- { "plumbermountedgecombe.co.za", true },
- { "plumberumhlangarocks.co.za", true },
- { "plumbingandheatingspecialistnw.com", true },
- { "plumbingbenoni.co.za", true },
- { "plumbingcentral.com.au", true },
- { "plumbingglenvista.co.za", true },
- { "plumbingkingsllc.com", true },
- { "plumbingofmesquite.com", true },
- { "plumlocosoft.com", true },
- { "plumnet.ch", true },
- { "plur.com.au", true },
- { "plural.cafe", true },
- { "plus-5.com", true },
- { "plus-aliance.ru", true },
- { "plus-immo-neuf.fr", true },
- { "plus.google.com", false },
- { "plus.sandbox.google.com", true },
- { "plus15.ml", true },
- { "pluslink.co.jp", true },
- { "plusmobile.fr", true },
- { "plusreed.com", true },
- { "plusstreamfeed.appspot.com", true },
- { "pluta.net", true },
- { "pluth.org", true },
- { "plutiedev.com", true },
- { "pluto.life", true },
- { "plutokorea.com", true },
- { "plutopia.ch", true },
- { "plymouthbouncycastles.co.uk", true },
- { "plz.report", true },
- { "plzdontpwn.me", true },
- { "plzh4x.me", true },
- { "pm-onboarding-external-dev.azurewebsites.net", true },
- { "pm-partners-management-dev.azurewebsites.net", true },
- { "pm.link", true },
- { "pm.me", true },
- { "pm13.cz", true },
- { "pm13.org", true },
- { "pm25.im", true },
- { "pmaene.be", false },
- { "pmalaty.com", true },
- { "pmarbeid.nl", true },
- { "pmarques.info", true },
- { "pmartin.tech", true },
- { "pmbc.org", true },
- { "pmbsteelbuildings.com", true },
- { "pmcc.net", true },
- { "pmccrystal.com", true },
- { "pmcfarland.space", true },
- { "pmcorganometallix.com", true },
- { "pmcouvrie.com", true },
- { "pmcvinyladditives.com", true },
- { "pmf.gov", true },
- { "pmg-offshore-company.com", true },
- { "pmg-p4p.de", true },
- { "pmg-purchase.com", true },
- { "pmg-purchase.net", true },
- { "pmi.gov", true },
- { "pmklaassen.com", true },
- { "pmnaish.co.uk", true },
- { "pmoreau.org", true },
- { "pmp-art.com", true },
- { "pmp6.fr", true },
- { "pmsf.eu", true },
- { "pmt-documenten.nl", true },
- { "pn.id.lv", true },
- { "pnawrocki.com", true },
- { "pneu01.fr", true },
- { "pneu74.fr", true },
- { "pneuhaus-lemp.ch", true },
- { "pnimmobilier.ch", false },
- { "pnnl.gov", true },
- { "pnona.cz", true },
- { "pnsc.is", true },
- { "pnut.io", false },
- { "po.net", true },
- { "po0k.ie", true },
- { "pocatellonissanparts.com", true },
- { "pochaneko.com", true },
- { "pochoden-praha.cz", true },
- { "pocitacezababku.cz", true },
- { "pocketfruity.com", true },
- { "pocketinsure.com", true },
- { "pocketpasta.com", true },
- { "pocze.ch", true },
- { "podcrto.si", true },
- { "poddr.co", true },
- { "podemos.info", true },
- { "podipod.com", true },
- { "podlibre.org", true },
- { "podobovo.if.ua", true },
- { "podroof.com", true },
- { "podroof.com.au", true },
- { "podshrink.de", true },
- { "podsvojostreho.net", true },
- { "poe.digital", true },
- { "poed.net.au", true },
- { "poemerx.com", true },
- { "poemerx.net", true },
- { "poemlife.com", true },
- { "poemwall.ml", true },
- { "poetenblog.tk", true },
- { "poetry.ge", true },
- { "poezja.com.pl", true },
- { "poffenhouse.ddns.net", true },
- { "pogera.com", true },
- { "pogetback.pl", true },
- { "pogoswine.com", true },
- { "pogotowiekomputeroweolsztyn.pl", true },
- { "pogrebisky.net", true },
- { "pohlednice-tap.cz", true },
- { "pohlmann.io", true },
- { "poinsot.info", true },
- { "pointaction.com", true },
- { "pointforwardinc.net", true },
- { "pointiswunderland.de", true },
- { "pointmaquininha.com", true },
- { "pointsixtyfive.com", true },
- { "pointum.com", true },
- { "pointzip.ml", true },
- { "poisk.kharkov.ua", true },
- { "pojdnafp.cz", true },
- { "pojer.me", true },
- { "pokazy-iluzji.pl", true },
- { "poke.blue", true },
- { "pokedex.mobi", true },
- { "pokefarm.com", true },
- { "pokeforest.io", true },
- { "pokeinthe.io", true },
- { "pokeli.de", true },
- { "pokemonargentina.tk", true },
- { "pokemondb.net", true },
- { "pokemongochamp.com", true },
- { "pokemongostatus.org", true },
- { "pokemonguide.tk", true },
- { "pokemonlab.com", true },
- { "pokemonsimulator.com", true },
- { "pokemontabletopadventures.com", true },
- { "pokemori.jp", true },
- { "poker4all.tk", true },
- { "pokeram.ml", true },
- { "pokerking.club", true },
- { "pokl.cz", true },
- { "pokoleniebar.ru", true },
- { "pokrowcecardo.pl", true },
- { "polaire.org", true },
- { "polan.tk", true },
- { "polanda.com", true },
- { "polar-baer.com", true },
- { "polarauto.pt", true },
- { "pole-emotion.ch", false },
- { "poleacademie.com", false },
- { "poles4pilots.com", true },
- { "polestar.com.tw", true },
- { "police-schools.com", true },
- { "policereferencecheck.com", true },
- { "policesromandesrecrutement.ch", true },
- { "policyreporter.com", false },
- { "polimer39.ml", true },
- { "polinet.de", true },
- { "polis.or.at", true },
- { "polis.to", false },
- { "polis812.ru", true },
- { "polish-dictionary.com", true },
- { "polish-flag.com", true },
- { "polish-translations.com", true },
- { "polish-translator.com", true },
- { "polish-translator.net", true },
- { "polish-translators.net", true },
- { "polishforums.com", false },
- { "polishmarriage.org", true },
- { "polishtranslation.com", true },
- { "polishwomen.com", true },
- { "polisipati.tk", true },
- { "polit.im", true },
- { "political-science-schools.com", true },
- { "politicsandnews.cf", true },
- { "politicsnews.ga", true },
- { "politiezoneriho.be", true },
- { "politik-bei-uns.de", true },
- { "politsei.ee", true },
- { "politvesti.tk", true },
- { "polki.com", true },
- { "pollendine.co.uk", true },
- { "polletmera.com", false },
- { "pollev.com", true },
- { "polleverywhere.com", true },
- { "polliconstruction.com", true },
- { "pollingplace.uk", true },
- { "pollybarks.com", true },
- { "polog.tk", true },
- { "pologalileo.eu", true },
- { "polomack.eu", true },
- { "poloniainfo.com", true },
- { "polska-robota.com.ua", true },
- { "polskiemalzenstwo.org", true },
- { "polskienewsy.tk", true },
- { "polybius.io", true },
- { "polycoise.com", true },
- { "polycraftual.co.uk", true },
- { "polyfluoroltd.com", false },
- { "polygamer.net", true },
- { "polygraphi.ae", true },
- { "polymake.org", true },
- { "polynomapp.com", true },
- { "polypane.rocks", true },
- { "polypet.com.sg", true },
- { "polytarian.com", true },
- { "polytekniskforening.dk", true },
- { "pomar.club", true },
- { "pomdoc.com", true },
- { "pomegranate.productions", true },
- { "pomelo-paradigm.com", true },
- { "pommedepain.fr", true },
- { "pomockypredeti.sk", true },
- { "pomocniczy.eu.org", true },
- { "pomorskibereg.ml", true },
- { "pompeii.tickets", true },
- { "pompiers-martigny.ch", false },
- { "pompoco.info", true },
- { "pomsinoz.com", true },
- { "pomtom.co.nz", true },
- { "poncho-bedrucken.de", true },
- { "ponere.dz", true },
- { "poneypourtous.com", false },
- { "ponga.se", true },
- { "ponio.org", true },
- { "ponnau.com", true },
- { "pony-cl.co.jp", true },
- { "pony.tf", true },
- { "ponychan.net", true },
- { "ponydesignclub.nl", true },
- { "ponyfoo.com", true },
- { "poodleassassin.com", true },
- { "poodlefan.net", true },
- { "poolmans.se", true },
- { "poolsafely.gov", true },
- { "poolsafety.gov", true },
- { "pooltools.net", true },
- { "poolvilla-margarita.net", true },
- { "poon.io", true },
- { "poopjournal.rocks", true },
- { "poopr.ru", true },
- { "poopthereitisla.com", true },
- { "poorclarepa.org", true },
- { "pop-corn.ro", true },
- { "pop.dk", true },
- { "popcat.ru", true },
- { "popcornpalacefundraising.com", true },
- { "popcultureshack.com", true },
- { "popeyes.com", false },
- { "popinga.it", true },
- { "popitsnack.com", true },
- { "popjudge.ml", true },
- { "popmagz.com", true },
- { "popova.tk", true },
- { "popoway.cloud", true },
- { "popoway.me", true },
- { "popoway9.ml", true },
- { "poppetsphere.de", true },
- { "poppincurls.com", true },
- { "populardogs.gq", true },
- { "population-ethics.com", true },
- { "popupbazaar.tk", true },
- { "popvitrin.com", true },
- { "poquiloco.com", true },
- { "poquvi.net", true },
- { "porchdaydreamer.com", true },
- { "porcore.com", true },
- { "porelcorazon.com", true },
- { "porelsam.ml", true },
- { "porevo.tk", true },
- { "porg.es", true },
- { "porinnuotiopojat.tk", true },
- { "pork.org.uk", true },
- { "porkel.de", true },
- { "porkyx.com", true },
- { "porn7.net", true },
- { "porn77.info", true },
- { "pornagent.de", true },
- { "pornalpha.com", true },
- { "pornbay.eu", true },
- { "pornbay.org", true },
- { "porncompanions.com", true },
- { "porndragon.net", true },
- { "pornfacefinder.com", false },
- { "pornflare.net", true },
- { "pornforwomentube.com", true },
- { "porngay.co", true },
- { "pornhubhd.biz", true },
- { "pornimg.net", true },
- { "pornjunkiesxxx.com", true },
- { "pornleg.com", true },
- { "pornless.biz", true },
- { "pornloupe.com", true },
- { "pornmax.net", true },
- { "pornmega.net", true },
- { "pornmixed.com", true },
- { "porno-gif.ru", true },
- { "porno-stars-video.ru", true },
- { "pornofilmovi.us", true },
- { "pornohub.su", true },
- { "pornolab.su", true },
- { "pornolarizlehd.com", true },
- { "pornomens.be", true },
- { "pornopark.nl", true },
- { "pornovk.xxx", true },
- { "pornport.org", true },
- { "pornshop.biz", true },
- { "pornsocket.com", true },
- { "pornstop.net", true },
- { "pornsuper.net", true },
- { "pornteddy.com", true },
- { "pornultra.net", true },
- { "porny.xyz", true },
- { "pors-sw.cz", true },
- { "porsi.pt", true },
- { "port443.hamburg", false },
- { "port443.se", true },
- { "port5060.net", true },
- { "port67.org", true },
- { "port80.hamburg", false },
- { "portable-games.tk", true },
- { "portafoliodenegocios.com.mx", true },
- { "portailevangelique.ca", true },
- { "portal-books.ga", true },
- { "portal-ru.tk", true },
- { "portal.tirol.gv.at", true },
- { "portalaltadefinicao.com", true },
- { "portaleldense.tk", true },
- { "portalexpressservices.com", true },
- { "portaltudoaver.com", true },
- { "portalz.xyz", true },
- { "portamiinpista.it", false },
- { "portatiles-baratos.net", true },
- { "porte.roma.it", true },
- { "portercup.com", true },
- { "porterranchelectrical.com", true },
- { "portesmagistral.com", true },
- { "portiaweb.org.uk", true },
- { "portierato.it", true },
- { "portofala.pt", true },
- { "portofrotterdam.com", false },
- { "portosonline.pl", true },
- { "portsdebalears.gob.es", true },
- { "portsmouthbouncycastles.co.uk", true },
- { "portsolent.com", true },
- { "portugal-a-programar.pt", true },
- { "portugalsko.net", true },
- { "porybox.com", true },
- { "posaunenchor-senden.de", true },
- { "posbank.co.uk", true },
- { "posbich.net", true },
- { "poseidonwaterproofing.com", true },
- { "poshcastles.co.uk", true },
- { "poshlashes.se", true },
- { "poshsecurity.com", true },
- { "positionus.io", true },
- { "positive.com.cy", true },
- { "positiverbeitrag.net", true },
- { "positiverbeitrag.org", true },
- { "positivos.tk", true },
- { "poslusny.com", true },
- { "posobota.cz", true },
- { "post-darwinian.com", true },
- { "post-darwinism.com", true },
- { "post.icu", true },
- { "post.io", true },
- { "post.monster", true },
- { "post4me.at", true },
- { "postal.dk", true },
- { "postal3.es", true },
- { "postandfly.com", true },
- { "postawnasiebie.pl", true },
- { "postblue.info", true },
- { "postcode.nl", true },
- { "postcodeswag.co.uk", true },
- { "postcodeswag.com", true },
- { "postcodeswag.uk", true },
- { "postdarwinian.com", true },
- { "postdarwinism.com", true },
- { "postdeck.de", true },
- { "posteo.de", true },
- { "posterspy.com", true },
- { "postfalls-naturopathic.com", true },
- { "postfinance.ch", true },
- { "postimages.org", true },
- { "postimg.cc", true },
- { "postmatescode.com", true },
- { "postmistress.email", true },
- { "postmusicologia.tk", true },
- { "postn.eu", true },
- { "postoffices.co.in", true },
- { "postoyanstvo.cf", true },
- { "postsubmeta.net", true },
- { "posttigo.com", true },
- { "posyperfume.com", true },
- { "potatiz.com", true },
- { "potato.im", true },
- { "potatopro.com", true },
- { "potatotee.com", true },
- { "potature.it", true },
- { "potature.org", true },
- { "potature.rimini.it", true },
- { "potature.roma.it", true },
- { "potbar.com", true },
- { "potentialproject.com", false },
- { "poterepersonale.it", true },
- { "potgrowersunion.com", true },
- { "pothe.com", true },
- { "pothe.de", true },
- { "potionlabs.de", true },
- { "potolok-brest.tk", true },
- { "potolok.am", true },
- { "potomac.cf", true },
- { "potomacurology.com", true },
- { "potreningu.pl", true },
- { "potterperfect.tk", true },
- { "pottersheartministry.org", true },
- { "potterybroker.ga", true },
- { "pottshome.co.uk", true },
- { "potworowski.de", true },
- { "potz.tk", true },
- { "potzwonen.nl", true },
- { "poudlard.fr", true },
- { "poundgatepark.co.uk", true },
- { "poundwholesale.co.uk", true },
- { "pourlesenfants.info", true },
- { "pouwels-oss.nl", true },
- { "povarchik.com", true },
- { "povareschka.ru", true },
- { "povesham.tk", true },
- { "povmacrostabiliteit.nl", true },
- { "pow-s.com", true },
- { "pow.jp", true },
- { "powch.com", true },
- { "powelljones.co.uk", true },
- { "power-flowengineer.com", true },
- { "powerball.shop", true },
- { "powerbi.istanbul", true },
- { "powerblanket.com", true },
- { "powercloud.technology", true },
- { "poweredbyiris.nl", true },
- { "powerfortunes.com", true },
- { "powergok.com", true },
- { "powerinboxperformance.com", true },
- { "powerlifting.tk", true },
- { "powermeter.at", true },
- { "powerplantmall.com", true },
- { "powerpointschool.com", true },
- { "powersaleskc.com", true },
- { "powersergdatasystems.com", true },
- { "powersergdynamic.com", true },
- { "powersergemployeesonly.com", true },
- { "powersergholdings.com", true },
- { "powerwellness-korecki.de", true },
- { "pozarevac.tk", true },
- { "pozd.tk", true },
- { "pozemedicale.org", true },
- { "pozharnyi.tk", true },
- { "pozitiffchik.ml", true },
- { "pozitive.pl", true },
- { "pozlife.net", true },
- { "poznaj-siebie.pl", true },
- { "poznajrynek.pl", true },
- { "pp-server.com", true },
- { "pp3345.net", true },
- { "ppcrestaurants.com", true },
- { "ppipe.net", true },
- { "pplsoft.nl", true },
- { "pplsvc.com", true },
- { "ppmathis.ch", true },
- { "ppmathis.com", true },
- { "ppmoon.com", true },
- { "ppoozl.com", true },
- { "ppro.com", true },
- { "ppy.la", true },
- { "ppy.sh", true },
- { "pqgruber.com", true },
- { "pr-news.spb.ru", true },
- { "pr.search.yahoo.com", false },
- { "pr1sm.com", true },
- { "pr2studio.com", true },
- { "pr3.space", true },
- { "prac.to", true },
- { "pracevjihlave.cz", true },
- { "pracownia-porta.pl", true },
- { "practicalbytes.de", true },
- { "practicalhomes.com.au", true },
- { "practicallabs.com", true },
- { "practicalprogrammer.tech", true },
- { "practiceflow.nl", true },
- { "practicepanther.com", true },
- { "practisforms.com", true },
- { "practo.com", true },
- { "practodev.com", true },
- { "pradeek.tk", true },
- { "prado.it", true },
- { "praeparation-keppner.de", true },
- { "praerien-racing.com", true },
- { "praetzlich-hamburg.de", true },
- { "pragata.id", true },
- { "pragma-solution.com", true },
- { "pragmatist.nl", true },
- { "prague-swim.cz", true },
- { "praguemakeover.com", true },
- { "praguepsychology.com", true },
- { "praguepsychology.cz", true },
- { "pragueswim.cz", true },
- { "praha-9.eu", true },
- { "prajwalkoirala.com", true },
- { "prakhar.uk", true },
- { "prakharprasad.com", true },
- { "praktijkdevecht.nl", true },
- { "praktijkpassepartout.nl", true },
- { "praktiker.hu", true },
- { "praladofuturo.blog", true },
- { "praleria.com", true },
- { "pranita-schals.de", true },
- { "pranita.cz", true },
- { "pranita.sk", true },
- { "pranksearch.ml", true },
- { "prankstercompany.com", true },
- { "pratemarkets.com", true },
- { "praticienmedecinechinoise.be", true },
- { "pratorotoli.it", true },
- { "pravaha-elixirs.com", true },
- { "pravnisistem.rs", true },
- { "pravo911.tk", true },
- { "pravoslavie.tk", true },
- { "pravoslavnayarus.tk", true },
- { "pravosudie.tk", true },
- { "prawnikdlaanglii.co.uk", true },
- { "praxino.de", false },
- { "praxis-familienglueck.de", true },
- { "praxistipp24.com", true },
- { "prayercentric.com", true },
- { "prayerrequest.com", true },
- { "prc.gov", true },
- { "precedencemedia.com", true },
- { "precept.uk.com", true },
- { "preciouslife.fr", true },
- { "preciscx.com", true },
- { "preciseassemblies.com", true },
- { "precision-tops.com", true },
- { "precision.st", true },
- { "precisionclan.com", true },
- { "precisiondigital-llc.com", true },
- { "precisionhealthpilot.org", true },
- { "precisionhockey.net", true },
- { "precisionicerinks.com", true },
- { "precisionmachineservice.com", true },
- { "precisionvaccinations.com", true },
- { "precode.eu", true },
- { "predkosci.pl", true },
- { "predoiu.ro", true },
- { "predskazanie.tk", true },
- { "preference.ga", true },
- { "preferredreverse.com", true },
- { "prefix.eu", true },
- { "prefontaine.name", true },
- { "pregunteleakaren.gov", true },
- { "preigu.de", true },
- { "preis-reifen.de", true },
- { "preisser-it.de", true },
- { "preisser.it", true },
- { "preissler.co.uk", true },
- { "preload.link", true },
- { "preloaded-hsts.badssl.com", true },
- { "preludes.org", true },
- { "prelved.com", true },
- { "prelved.es", true },
- { "prelved.fi", true },
- { "prelved.fr", true },
- { "prelved.it", true },
- { "prelved.nl", true },
- { "prelved.pl", true },
- { "prelved.se", true },
- { "prematureacceleration.club", true },
- { "preme.name", true },
- { "premierbb.com", true },
- { "premierbouncycastles.co.uk", true },
- { "premierdisco.co.uk", true },
- { "premiereco.com.sg", true },
- { "premieresloges.ca", false },
- { "premierevents.ie", true },
- { "premierheart.com", true },
- { "premierjewelersjax.com", true },
- { "premiermaldives.com", true },
- { "premiermortgageservices.com", true },
- { "premierrange.co.uk", true },
- { "premiership-predictors.co.uk", true },
- { "premioambiente.it", true },
- { "premiovapozicovna.sk", true },
- { "premised.land", true },
- { "premium-computer.fr", true },
- { "premiumcredit.am", true },
- { "premiumdeal.org", true },
- { "premiumhosting.com.hr", true },
- { "premiumiptvplus.com", true },
- { "premiumplusiptv.com", true },
- { "premiumweb.co.id", true },
- { "premiumwebdesign.it", true },
- { "premkumar.net", true },
- { "premtech.nl", true },
- { "prenatalgeboortekaartjes.nl", true },
- { "prepadefi.fr", true },
- { "prepagosyescortforyou.com", true },
- { "prepaid-cards.xyz", true },
- { "prepaid-voip.nl", true },
- { "prepaidgirl.com", true },
- { "prepaidkredietkaart.be", true },
- { "prepare-job-hunting.com", true },
- { "preparetheword.com", true },
- { "prepavesale.fr", true },
- { "prepfba.com", true },
- { "prepperswill.com", true },
- { "presbee.com", true },
- { "presbvm.org", true },
- { "presbyterian-colleges.com", true },
- { "prescotonline.co.uk", true },
- { "presdesdunes.com", true },
- { "present-m.com", true },
- { "presentationmedia.com", true },
- { "preserveourhillcountry.org", true },
- { "president.bg", true },
- { "presidentdirectory.ga", true },
- { "presidentialserviceawards.org", true },
- { "presidio.gov", true },
- { "prespanok.sk", true },
- { "pressakey.com", true },
- { "presscenter.jp", true },
- { "presscuozzo.com", true },
- { "presseagrume.net", true },
- { "pressertech.com", true },
- { "presses.ch", false },
- { "pressplayandrelax.com", true },
- { "pressrush.com", true },
- { "pressspace2hack.com", true },
- { "pressspacetohack.com", true },
- { "pressup.it", true },
- { "pressureradio.com", true },
- { "prestige-car-location.ch", false },
- { "prestige-portal.com", true },
- { "prestigebouncycastles.co.uk", true },
- { "prestigerepairs.com.au", true },
- { "prestigesoundandlight.co.uk", true },
- { "prestonandsons.com.au", true },
- { "prestonbrant.com", true },
- { "prestonetwork.eu", true },
- { "prethost.com", true },
- { "pretix.eu", true },
- { "pretor.com.pl", true },
- { "pretor.eu", true },
- { "pretor.pl", true },
- { "pretorcup.pl", true },
- { "pretty.hu", true },
- { "prettycities.ga", true },
- { "prettygirlcheats.com", true },
- { "pretzelx.com", true },
- { "prevenir.ch", false },
- { "preventfalls.com", true },
- { "preview-it-now.com", true },
- { "previousmagazine.com", true },
- { "prexxorvita.com", true },
- { "prgrmmr.nl", true },
- { "pricegg.com", true },
- { "priceremoval.net", true },
- { "pricesim.com", true },
- { "pricesniffer.co", true },
- { "prideindomination.com", true },
- { "pridnestrovye.gq", true },
- { "prielwurmjaeger.de", true },
- { "primaconsulting.net", true },
- { "primaflorafloristaccrington.co.uk", true },
- { "primalbase.com", true },
- { "primalinea.pro", true },
- { "primalshop.dk", true },
- { "primananda.com", true },
- { "primates.com", true },
- { "primecursos.com.br", true },
- { "primeequityproperties.com", true },
- { "primegiftindia.com", true },
- { "primelogistics.cf", true },
- { "primetrial.co.uk", true },
- { "primetrialfree.co.uk", true },
- { "primglaz.ru", true },
- { "primoloyalty.com", true },
- { "primopan.org", true },
- { "primorus.lt", true },
- { "princefamilylaw.co.uk", true },
- { "princelishan.com", true },
- { "princelishan.com.tw", true },
- { "princesparktouch.com", true },
- { "princessefoulard.com", true },
- { "princetonnassaupediatrics.com", true },
- { "princezna.club", true },
- { "principalstest.com", true },
- { "principalstest.review", true },
- { "principaltoolbox.com", true },
- { "principia-journal.de", true },
- { "principia-magazin.de", true },
- { "principia-online.de", true },
- { "princovi.cz", true },
- { "prinice.org", true },
- { "printeknologies.com", true },
- { "printerleasing.be", true },
- { "printerpoint.co.in", true },
- { "printfn.com", false },
- { "printler.com", true },
- { "printmet.com", true },
- { "printmet.ru", true },
- { "printmijn3dmodel.be", true },
- { "printus.de", true },
- { "prior-it.be", true },
- { "priorite-education.com", true },
- { "priorityelectric-agourahills.com", true },
- { "priorityelectric-calabasas.com", true },
- { "priorityelectric-camarillo.com", true },
- { "priorityelectric-dosvientos.com", true },
- { "priorityelectric-hiddenhills.com", true },
- { "priorityelectric-lakesherwood.com", true },
- { "priorityelectric-malibu.com", true },
- { "priorityelectric-moorpark.com", true },
- { "priorityelectric-newburypark.com", true },
- { "priorityelectric-oakpark.com", true },
- { "priorityelectric-simivalley.com", true },
- { "priorityelectric-thousandoaks.com", true },
- { "priorityelectric-westlakevillage.com", true },
- { "priorityelectric.biz", true },
- { "priorityelectric.info", true },
- { "priorityelectric.mobi", true },
- { "priorityelectric.net", true },
- { "priorityessays.com", true },
- { "priorityfakes.com", true },
- { "prioritylawyers.com.au", true },
- { "prioritynissannewportnewsparts.com", true },
- { "prismacloud.com", true },
- { "prismacloud.xyz", true },
- { "prisminfosys.com", true },
- { "prismintl.org", true },
- { "pristal.eu", true },
- { "pristinegreenlandscaping.com", true },
- { "pritchi.tk", true },
- { "priv.gc.ca", true },
- { "priv.im", true },
- { "privacy-week-vienna.at", true },
- { "privacy-week.at", true },
- { "privacy.com", true },
- { "privacybadger.org", true },
- { "privacybydesign.foundation", true },
- { "privacychick.com", true },
- { "privacychick.io", true },
- { "privacyforjournalists.org.au", true },
- { "privacyget.tk", true },
- { "privacyinsights.nl", true },
- { "privacyinternational.org", true },
- { "privacynow.eu", true },
- { "privacyscore.org", true },
- { "privacytools.io", true },
- { "privacyweek.at", true },
- { "privacyweek.de", true },
- { "privacyweek.eu", true },
- { "privacyweek.wien", true },
- { "privacyweekvienna.at", true },
- { "privaday.de", false },
- { "privasphere.com", true },
- { "private-diary-taka.com", true },
- { "privatebanks.uk", true },
- { "privatebin.info", true },
- { "privatecapsecurity.org", true },
- { "privateger.me", true },
- { "privateideas.de", true },
- { "privateimarketing.com", true },
- { "privatemediaserver.tech", true },
- { "privatenebula.eu", true },
- { "privatepropertymallorca.com", true },
- { "privateservice.cz", true },
- { "privatestatic.com", false },
- { "privatevoid.net", true },
- { "privatfrei.de", true },
- { "privatislauga.lt", true },
- { "privatpatient-krankenhaus.de", true },
- { "privc.io", true },
- { "privea.fr", true },
- { "priverify.com", true },
- { "privorot-taro.com", true },
- { "privy-staging.com", true },
- { "privy.com", true },
- { "prix-pneus.fr", true },
- { "prizehometickets.com.au", true },
- { "prizelink.com.au", true },
- { "prjktruby.com", false },
- { "prknje.co", true },
- { "prlved.co.uk", true },
- { "prnav.com", true },
- { "pro-ben.sk", true },
- { "pro-bike.ro", true },
- { "pro-clean.org", true },
- { "pro-co.at", true },
- { "pro-esb.com", true },
- { "pro-kemerovo.ml", true },
- { "pro-lq.at", true },
- { "pro-lq.ch", true },
- { "pro-lq.com", true },
- { "pro-lq.de", true },
- { "pro-lq.hu", true },
- { "pro-lq.it", true },
- { "pro-lq.net", true },
- { "pro-lq.ro", true },
- { "pro-mile.pl", true },
- { "pro-taucher.com", true },
- { "pro-taucher.de", true },
- { "pro-wiert.pl", true },
- { "pro100systems.com.ua", true },
- { "proactivenews.ml", true },
- { "proactivestructuresolutions.com", true },
- { "proadvanced.com", true },
- { "proastec.com.br", true },
- { "probano.com", true },
- { "probazen.com", true },
- { "probely.com", true },
- { "probiv.biz", true },
- { "probiv.cc", true },
- { "procabinetrefinishers.com", true },
- { "procar-rheinland.de", true },
- { "procarservices.com", true },
- { "procarswoking.com", true },
- { "procensus.com", true },
- { "procert.ch", false },
- { "procesadorafenix.com.mx", true },
- { "processesinmotion.com", true },
- { "procharter.com", true },
- { "procinorte.net", true },
- { "proclassifieds.in", true },
- { "proclib.org", true },
- { "procrastinatingengineer.uk", true },
- { "procrastinationland.com", true },
- { "proctorauth.com", true },
- { "proctorio.com", true },
- { "proctorio.net", true },
- { "prodampro.ru", true },
- { "prodatalabs.com", true },
- { "prodct.info", true },
- { "prodentalsantacruz.es", true },
- { "prodesigntools.com", true },
- { "prodietix.cz", true },
- { "prodigyhq.io", true },
- { "prodinger.com", true },
- { "prodsim.ninja", true },
- { "producentbalustrad.pl", true },
- { "producepromotions.com", true },
- { "producertools.io", true },
- { "productbarcodes.com", true },
- { "productboard.com", true },
- { "productdesignsoftware.com.au", true },
- { "production.vn", true },
- { "productionscime.com", true },
- { "productlondon.com", true },
- { "productosfitness.com", true },
- { "productpeo.pl", true },
- { "products4more.at", true },
- { "products88.com", true },
- { "productsblockbuster.com", true },
- { "productsbrandleader.com", true },
- { "productscastle.com", true },
- { "productsmansion.com", true },
- { "produkt.cf", true },
- { "produkttest-online.com", true },
- { "produra.nl", true },
- { "prodwa.re", true },
- { "prodware.fr", true },
- { "prodware.nl", true },
- { "proeflokaalbakker.nl", true },
- { "proefteksten.nl", false },
- { "proesb.com", true },
- { "proeski.com", true },
- { "proevlifecycle.eu", true },
- { "prof-toplivo.ru", true },
- { "prof.ch", false },
- { "profection.biz", true },
- { "profession.email", true },
- { "professionalbeautyshop.it", true },
- { "professionallawyer.tk", true },
- { "professors.ee", true },
- { "profidea.cz", true },
- { "profile.tf", true },
- { "profiles.google.com", true },
- { "profiservis.info", true },
- { "profitablewebprojects.com", true },
- { "profitopia.de", true },
- { "profits.fund", true },
- { "profloorstl.com", true },
- { "profootballnetwork.com", true },
- { "profritual.ru", true },
- { "profsaranya.com", true },
- { "proft.eu", true },
- { "profumeria.roma.it", true },
- { "profuntime.tk", true },
- { "profvideo.kharkov.ua", true },
- { "progarm.org", true },
- { "progaudio.be", true },
- { "progenda.be", true },
- { "progeon.nl", true },
- { "progeste.pt", true },
- { "proggersession.com", true },
- { "proggersession.de", true },
- { "progiscad.com", false },
- { "prognoshealth.com", true },
- { "prograce.info", true },
- { "programador-web-freelance.es", true },
- { "programadorwp.com", true },
- { "programarya.com", true },
- { "programistka.com", true },
- { "programmaticmagic.com", true },
- { "programmatv.tk", true },
- { "programme-phenix.com", true },
- { "programming-solutions.tk", true },
- { "programsareproofs.com", true },
- { "programtracker.net", true },
- { "programyburian.cz", true },
- { "progresivoptic.ro", true },
- { "progreso.pl", true },
- { "progress-linux.org", true },
- { "progress.photos", true },
- { "progressive.work", true },
- { "progressiveplanning.com", true },
- { "progressnet.nl", true },
- { "progresswww.nl", true },
- { "prohrcloud.com", true },
- { "proibidoler.com", true },
- { "proimpact.it", true },
- { "project-novis.org", true },
- { "projectarmy.net", false },
- { "projectbotticelli.com", true },
- { "projectemail.co", true },
- { "projectforge.org", true },
- { "projectfreehosting.ga", true },
- { "projectgrimoire.com", true },
- { "projectinnovation.org", true },
- { "projectlinuseasttn.org", true },
- { "projectmailext.co", true },
- { "projectmaka.io", true },
- { "projectmakeit.com", true },
- { "projectnom.com", true },
- { "projectobs.com", true },
- { "projectsafechildhood.gov", true },
- { "projectsecretidentity.com", true },
- { "projectsecretidentity.org", true },
- { "projectxparis.com", true },
- { "projectxyz.eu", true },
- { "projektarbeit-projektplanung.de", true },
- { "projektzentrisch.de", true },
- { "projest.ch", false },
- { "projet-fly.ch", true },
- { "projet-saara.com", true },
- { "prolan.pw", true },
- { "prolearningcentre.com", true },
- { "proledwall.nl", true },
- { "prolinos.de", true },
- { "prolinq.in", true },
- { "promax.nl", true },
- { "promedyczny.pl", true },
- { "prometheanfire.net", true },
- { "prometheanfire.org", true },
- { "promexbol.com.bo", true },
- { "promiflash.de", true },
- { "promisesaplus.com", true },
- { "prommontag.com", true },
- { "promo-brille.at", true },
- { "promo-brille.ch", true },
- { "promo-brille.de", true },
- { "promo-computers.nl", true },
- { "promo-matelas.com", true },
- { "promobo.fr", true },
- { "promocjedladzieci.pl", true },
- { "promocodius.com", true },
- { "promodafinil.com", true },
- { "promodance.cz", true },
- { "promods.cn", true },
- { "promods.download", true },
- { "promods.net", true },
- { "promods.store", true },
- { "promods.web.tr", true },
- { "promoglisse.com", true },
- { "promohulp.nl", true },
- { "promolover.com", true },
- { "promopony.com", true },
- { "promoqueen.nl", true },
- { "promorder.ru", true },
- { "promoscuola.net", true },
- { "promotech.pro", true },
- { "promoterms.com.au", true },
- { "promotioncentre.co.uk", true },
- { "promtechosnastka.ru", true },
- { "promuovi.tv", true },
- { "prontocleaners.co.uk", true },
- { "prontointerventoimmediato.it", true },
- { "prontossl.com", true },
- { "proofwiki.org", true },
- { "proos.nl", true },
- { "proovn.com", true },
- { "propagandablog.de", true },
- { "propagationtools.com", true },
- { "propanesale.cf", true },
- { "propelgrowth.com", true },
- { "propermatches.com", true },
- { "properticons.com", true },
- { "property-catalogue.eu", true },
- { "propertyauctionaction.co.uk", true },
- { "propertyflare.com", true },
- { "propertygroup.pl", true },
- { "propertyinside.id", true },
- { "propertyone.mk", true },
- { "propertysales-almeria.com", true },
- { "propertysold.ca", true },
- { "prophiler.de", true },
- { "propipesystem.com", true },
- { "propiteer.com", true },
- { "proporcer.tk", true },
- { "proposalonline.com", true },
- { "propr.no", true },
- { "proprietairesmaisons.fr", true },
- { "propseller.com", true },
- { "propshub.com", true },
- { "prosafilosofica.com.br", true },
- { "proseandleprechauns.com", true },
- { "prosecomgdl.com", true },
- { "proseo4u.com", true },
- { "proservices.vip", true },
- { "proshow.com.ua", true },
- { "prosony.es", true },
- { "prospecto.com.au", true },
- { "prospecto.ee", true },
- { "prospecto.hr", true },
- { "prospecto.lt", true },
- { "prosperbot.com", true },
- { "prosperfit.com", true },
- { "prosperity-textile.com", true },
- { "prosperontheweb.com", true },
- { "prosperops.com", true },
- { "prospo.co", true },
- { "prostitutki-narvskaja.ga", true },
- { "prosto-dengi.tk", true },
- { "prostohobby.ru", true },
- { "prostoskidki.ml", true },
- { "prostye-recepty.com", true },
- { "prosurveillancegear.com", true },
- { "protech.ge", true },
- { "proteco.sk", true },
- { "protectedpayments.net", true },
- { "protectedreport.com", true },
- { "protectem.de", true },
- { "protectionformula.com.ua", true },
- { "protectoraanimalesalicante.org", true },
- { "protectorlando.com", true },
- { "protectr.de", false },
- { "protectwrap.ml", true },
- { "protege.moi", true },
- { "protegetudescanso.com", true },
- { "proteh.com.ua", true },
- { "protein-riegel-test.de", true },
- { "protek.tk", true },
- { "protempore.fr", true },
- { "proteogenix-products.com", true },
- { "proteogenix.science", true },
- { "proteus-eretes.nl", true },
- { "proteus-tech.com", true },
- { "protic.online", true },
- { "protic.pt", true },
- { "protiksana.gr", true },
- { "protobetatest.com", true },
- { "protocol.ai", true },
- { "protocol.co.il", true },
- { "protogenbrainbooster.tk", true },
- { "protonmail.ch", true },
- { "protonmail.com", true },
- { "protonvpn.com", true },
- { "prototypefund.de", true },
- { "prototyping-computer.ml", true },
- { "protracks.ca", true },
- { "proudplus.com", true },
- { "proust.ch", false },
- { "proust.media", false },
- { "proustmedia.de", false },
- { "provakil.com", true },
- { "prove-uru.co.uk", true },
- { "prove.no", true },
- { "provent.io", true },
- { "provereno-rabotaet.gq", true },
- { "provereno-rabotaet.tk", true },
- { "provide-your-image.de", true },
- { "providential.be", true },
- { "providentins.com", true },
- { "providerlijst.com", true },
- { "providerlijst.ml", true },
- { "providerlijst.nl", true },
- { "provinciaotlavoro.it", true },
- { "provision-isr.nl", true },
- { "provitec.com", true },
- { "provitec.de", true },
- { "provlas.se", true },
- { "prowebcenter.com", false },
- { "prowindow.sk", true },
- { "prowise.com", true },
- { "prowise.me", true },
- { "prowpcare.com", true },
- { "proximoconcurso.com.br", true },
- { "proxirealtime.com", true },
- { "proxybay.bet", true },
- { "proxybay.bz", true },
- { "proxybay.cc", true },
- { "proxybay.co", true },
- { "proxybay.info", true },
- { "proxybay.ist", true },
- { "proxybay.la", true },
- { "proxybay.lat", true },
- { "proxybay.ltd", true },
- { "proxybay.one", true },
- { "proxybay.red", true },
- { "proxybay.tv", true },
- { "proxyportal.eu", true },
- { "proxyportal.org", true },
- { "proyectafengshui.com", true },
- { "proyectosx.net", true },
- { "prpferrara.it", true },
- { "prpr.cloud", true },
- { "prsnlafk.com", true },
- { "prt.in.th", true },
- { "prtimes.com", true },
- { "prtpe.com", true },
- { "prtscloud.ddns.net", true },
- { "pru.com.hk", true },
- { "pru.hk", true },
- { "pruna.org", true },
- { "prvcy.one", true },
- { "prvikvadrat.hr", true },
- { "prvnirodinna.cz", true },
- { "prylarprylar.se", true },
- { "prynhawn.com", true },
- { "prynhawn.net", true },
- { "prynhawn.org", true },
- { "prytkov.com", true },
- { "przemas.pl", true },
- { "przerabianiezdjec.pl", true },
- { "ps-sale.ru", true },
- { "ps2911.com", true },
- { "psa-travel-care.com", true },
- { "psabrowse.com", true },
- { "psasines.pt", true },
- { "psb1.org", true },
- { "psb1911.com", true },
- { "psb4ukr.org", true },
- { "psbarrett.com", true },
- { "psc.gov", true },
- { "pschierl.com", true },
- { "pscp.tv", true },
- { "pscr.gov", false },
- { "psdreams.com", true },
- { "psdsfn.com", true },
- { "psdsuc.com", true },
- { "pseek.com", true },
- { "pservicer.com.mx", true },
- { "pseta.ru", true },
- { "psg-calw.de", true },
- { "psg.bg", true },
- { "pshostpk.com", true },
- { "psici.eu", true },
- { "psicologajanainapresotto.com.br", true },
- { "psicologasandrabernal.es", true },
- { "psicologo-especialista-barcelona.com", true },
- { "psicologo-infantil-barcelona.com", true },
- { "psihotest.tk", true },
- { "psinergy.info", true },
- { "psinergyhealth.com", true },
- { "psinergytech.com", true },
- { "psitarz.com", true },
- { "psixotest.tk", true },
- { "psixotesty.tk", true },
- { "psm.org.ph", true },
- { "psono.pw", true },
- { "pspbar.com", true },
- { "pssgcsim.org", true },
- { "pst.moe", true },
- { "psu.je", true },
- { "psw-consulting.de", true },
- { "psw-group.de", true },
- { "psw-training.de", true },
- { "psw.net", true },
- { "psyao.ch", false },
- { "psychedelia.com", true },
- { "psychedelics.org", true },
- { "psychiatrie-ricany.cz", true },
- { "psychic-healer-mariya-i-petrova-boyankinska-b-borovan-bg.com", true },
- { "psychintervention.com", true },
- { "psychiq.com", true },
- { "psychoactive.com", true },
- { "psychoco.net", false },
- { "psychologbruksela.be", true },
- { "psychologi.cf", true },
- { "psychometrictest.ca", true },
- { "psychopathtest.com", true },
- { "psychopersonnalite.com", true },
- { "psychotechnique.africa", true },
- { "psychotechnique.be", true },
- { "psychotechnique.ch", true },
- { "psychotechniquetest.fr", true },
- { "psychotherapie-kp.de", true },
- { "psychotherapy-vienna.com", true },
- { "psycolleges.com", true },
- { "psylab.re", true },
- { "psylab.vip", true },
- { "psytrance-pro.com", true },
- { "pt-d.ru", true },
- { "pt-server.de", true },
- { "pt.im", true },
- { "ptal.eu", true },
- { "ptasiepodroze.eu", true },
- { "ptbi.org.pl", true },
- { "ptbx.co", true },
- { "ptcbooks.gq", true },
- { "pteceng.com", true },
- { "pterodactyl.org.cn", true },
- { "pterodactylus.cz", true },
- { "ptfiber.com", true },
- { "ptfiber.ru", true },
- { "ptfiber.spb.ru", true },
- { "ptgoldensun.com", true },
- { "ptk-svarka.ru", true },
- { "ptm.ro", true },
- { "ptmarquees.ie", true },
- { "ptmp.net", true },
- { "ptrbrs.nl", true },
- { "ptrl.ws", true },
- { "ptron.org", true },
- { "ptrt.xyz", true },
- { "ptupapers.tk", true },
- { "puac.de", true },
- { "pubclub.com", true },
- { "pube.tk", true },
- { "pubg-tournament.com", true },
- { "pubi.me", true },
- { "pubkit.io", true },
- { "publanda.nl", true },
- { "publi-all.be", true },
- { "public-g.de", true },
- { "public-measures.com", true },
- { "public-projects.com", true },
- { "public-projects.de", true },
- { "public-vocals.de", true },
- { "publicard.es", true },
- { "publiccarauctionscalifornia.com", true },
- { "publicholidays.im", true },
- { "publicintegrity.org", true },
- { "publicintelligence.net", true },
- { "publicrea.com", true },
- { "publicsuffix.org", true },
- { "publiq.space", true },
- { "publishedpaper.ga", true },
- { "publisherservices.co", true },
- { "publivate.ca", true },
- { "pubmire.com", false },
- { "pubreview.com.au", true },
- { "pucchi.net", true },
- { "pucogid.ga", true },
- { "pucssa.org", true },
- { "puddis.de", true },
- { "pudro.com", true },
- { "puer.eu.org", true },
- { "puestifiestas.mx", true },
- { "puestosdeferia.mx", true },
- { "puetter.eu", true },
- { "pugetsoundspas.com", true },
- { "puggan.se", true },
- { "pugovka72.ru", true },
- { "puissancemac.ch", false },
- { "puiterwijk.org", true },
- { "pukeking.com", true },
- { "pukfalkenberg.dk", true },
- { "pukkapilatesandpt.com", true },
- { "pulcinella.tk", true },
- { "pulizia.roma.it", true },
- { "pulizieuffici.milano.it", true },
- { "pulizievap.it", true },
- { "pulpproject.org", true },
- { "pulser.stream", true },
- { "pulsnitzer-lebkuchen-shop.de", true },
- { "pulsnitzer-lebkuchen.de", true },
- { "pulsnitzer-lebkuchen.shop", true },
- { "pulsnitzer-pfefferkuchen-shop.de", true },
- { "pulsnitzer-pfefferkuchen.shop", true },
- { "pulsr.ml", true },
- { "pump19.eu", true },
- { "pumperszene.com", true },
- { "pumpn.net", true },
- { "punchadragon.com", true },
- { "punchlinetheatre.co.uk", true },
- { "punchlinetheatre.com", true },
- { "punchunique.com", true },
- { "punematka.com", true },
- { "punikonta.de", true },
- { "punjabprime.com", true },
- { "punkapoule.fr", true },
- { "punkart.tk", true },
- { "puntacananetwork.com", true },
- { "puntacanatransporte.com", true },
- { "puntaprop.com", true },
- { "puntasiho.com", true },
- { "puntcunts.com", true },
- { "punte-juwelier.nl", true },
- { "puntoestadodemexico.com", true },
- { "puntonium.hu", true },
- { "pupboss.com", true },
- { "pupok.cf", true },
- { "puppet.pl", true },
- { "pupset.net", true },
- { "pupsikstudio.com", true },
- { "puralps.ch", true },
- { "puravida-estate.com", true },
- { "purchasescooters.ga", true },
- { "pure-gmbh.com", true },
- { "pure-host.de", true },
- { "purecbdvapors.com", true },
- { "puredayshop.com.tw", true },
- { "puredns.org", true },
- { "purefkh.xyz", false },
- { "purepest.com", true },
- { "purevapeofficial.com", true },
- { "purexis.ch", true },
- { "puripia.com", true },
- { "purityclothing.co.uk", true },
- { "purple.tech", true },
- { "purplebooth.co.uk", false },
- { "purplebricks.co.uk", true },
- { "purplebricks.com.au", true },
- { "purplebricksplc.com", true },
- { "purplemet.com", true },
- { "purplemoon.ch", true },
- { "purplemoon.mobi", true },
- { "purplepr.bg", true },
- { "purplestar.ch", true },
- { "purplestar.com", true },
- { "purplestar.mobi", true },
- { "purpletech.com.br", true },
- { "purplewindows.net", true },
- { "purplscientific.com", true },
- { "purrfectboudoir.com", true },
- { "purrfectcams.com", true },
- { "purrfectlove.net", true },
- { "purrfectmembersclub.com", true },
- { "purrfectswingers.com", true },
- { "pursuedtirol.com", true },
- { "pursuehappiness.tk", true },
- { "pursuingoutdoors.com", true },
- { "puryearlaw.com", true },
- { "pusehusetkattehotell.no", true },
- { "pusehusetmalvik.no", true },
- { "pushers.com.mx", true },
- { "pushoflove.com", true },
- { "pushpanel.io", true },
- { "pussr.com", true },
- { "pussylickingnow.com", true },
- { "put.moe", true },
- { "put.re", true },
- { "putana.gq", true },
- { "putany.tk", true },
- { "putanypitera.ml", true },
- { "putasdelporno.com", true },
- { "putatara.net", true },
- { "puteulanus.xyz", true },
- { "putin.red", true },
- { "putman-it.nl", true },
- { "putnamcollision.com", true },
- { "putney.io", true },
- { "putomani.rs", true },
- { "putrawijayatours.com", true },
- { "putrock.be", true },
- { "puxlit.net", true },
- { "puyallupnissanparts.com", true },
- { "puyblanc.info", true },
- { "puzzlage.com", true },
- { "puzzle-welt.ch", true },
- { "puzzlegames.com", true },
- { "puzzlepoint.ch", true },
- { "pv-paderborn-now.de", true },
- { "pvamg.org", true },
- { "pvc-stolarija.co", false },
- { "pvcvoordeel.nl", false },
- { "pvda.nl", true },
- { "pvhe.pl", true },
- { "pvmotorco.com", true },
- { "pvpcraft.ca", true },
- { "pvpctutorials.de", true },
- { "pvpheroes.no", true },
- { "pvphs98.com", true },
- { "pvtschlag.com", true },
- { "pwdsafe.com", false },
- { "pwg-see.de", true },
- { "pwnies.dk", true },
- { "pwolk.com", true },
- { "pxetech.com", true },
- { "pxgamer.xyz", true },
- { "pxl-mailtracker.com", true },
- { "pxl.cl", true },
- { "pxx.io", true },
- { "py-amf.org", true },
- { "py.search.yahoo.com", false },
- { "pya.org.tr", true },
- { "pybtex.org", true },
- { "pycrc.org", true },
- { "pycrypto.org", true },
- { "pycycle.info", true },
- { "pygarage.com", false },
- { "pyhello.world", true },
- { "pylon.bot", true },
- { "pymenetica.com", true },
- { "pymescentro.net", true },
- { "pymesvalencia.es", true },
- { "pymeup.org", true },
- { "pypa.io", true },
- { "pypi.io", true },
- { "pypi.org", true },
- { "pypi.python.org", true },
- { "pyramid-it.co.uk", true },
- { "pyrenees.io", true },
- { "pyro.works", true },
- { "pyroballpcbs.com", true },
- { "pyrohandel.de", true },
- { "pyrotechnologie.de", true },
- { "pysays.net", true },
- { "pyspace.org", true },
- { "python-hyper.org", true },
- { "python.org", false },
- { "pythonatrix.com", true },
- { "pytradebot.com.br", true },
- { "pyzlnar.com", true },
- { "pzpittsburgh.com", true },
- { "pzsearch.nl", true },
- { "q-inn.com", true },
- { "q-inn.nl", true },
- { "q-m.design", true },
- { "q-m.space", true },
- { "q-technologies.com.au", true },
- { "q01.us", true },
- { "q1000.nl", true },
- { "q365.vip", false },
- { "q36594.com", true },
- { "q88588.com", false },
- { "q8igh228tq.tk", true },
- { "qa-brandywineglobal.com", true },
- { "qa.fedoraproject.org", true },
- { "qa.stg.fedoraproject.org", true },
- { "qaconstrucciones.com", true },
- { "qambarraza.com", true },
- { "qani.me", true },
- { "qaq.cloud", true },
- { "qarea.com", true },
- { "qarto.com", true },
- { "qaz.cloud", true },
- { "qaz.link", true },
- { "qbiju.com.br", true },
- { "qbiltrade.com", true },
- { "qbtechs.com", true },
- { "qbus.pl", false },
- { "qc.search.yahoo.com", false },
- { "qcbrna.qa", true },
- { "qccareerschool.com", false },
- { "qcdesignschool.com", false },
- { "qceventplanning.com", false },
- { "qclt.com", true },
- { "qcmakeupacademy.com", false },
- { "qcmlw.com", true },
- { "qcstudentcenter.com", true },
- { "qcstyleacademy.com", false },
- { "qctravelschool.com", true },
- { "qcuarto.com.py", true },
- { "qdabogados.com", true },
- { "qdon.space", true },
- { "qdrat.ml", true },
- { "qdstationary.co.uk", true },
- { "qdstationery.co.uk", true },
- { "qe-lab.at", true },
- { "qed.ai", true },
- { "qedcon.org", false },
- { "qei.org.au", true },
- { "qelectrotech.org", true },
- { "qetesh.de", true },
- { "qetic.co.jp", true },
- { "qewc.com", true },
- { "qhse-professionals.nl", true },
- { "qi0.de", true },
- { "qianalysis.com", true },
- { "qianmo.com", true },
- { "qiannews.net", true },
- { "qianqiao.me", true },
- { "qiaohong.org", true },
- { "qicsystems.com", true },
- { "qifu.me", true },
- { "qihl.gg", true },
- { "qiliang.wang", true },
- { "qingly.me", true },
- { "qingpei.me", true },
- { "qionouu.cn", true },
- { "qipei8.com", true },
- { "qis.fr", true },
- { "qitarabutrans.com", true },
- { "qiuby.de", true },
- { "qiuri.org", false },
- { "qivonline.pt", true },
- { "qixi.biz", true },
- { "qkka.org", true },
- { "qkmortgage.com", true },
- { "ql.tc", true },
- { "qlarititech.io", true },
- { "qlcvea.com", true },
- { "qlcvea.it", true },
- { "qldcarwreckers.com.au", true },
- { "qldconservation.org.au", true },
- { "qldformulaford.org", true },
- { "qliving.com", true },
- { "qlix.pl", true },
- { "qlrace.com", false },
- { "qm-marzahnnordwest.de", true },
- { "qmee.com", true },
- { "qnected.nl", true },
- { "qnome.eu", true },
- { "qochealth.com", true },
- { "qoml.net", true },
- { "qonto.eu", true },
- { "qoor.io", false },
- { "qoptalk.com", true },
- { "qosmoschools.edu.my", true },
- { "qotw.net", true },
- { "qp666d.com", true },
- { "qpaypro.com", true },
- { "qpcna.org", true },
- { "qponverzum.hu", true },
- { "qq6177.com", true },
- { "qq6177.net", true },
- { "qqiao.me", true },
- { "qqq6.com", true },
- { "qqq67.com", true },
- { "qqrss.com", true },
- { "qr-city.org", true },
- { "qr.cl", true },
- { "qr1.at", true },
- { "qr70.com", true },
- { "qrara.net", true },
- { "qrbird.com", true },
- { "qrcontagion.com", true },
- { "qrd.by", true },
- { "qristianuliarkhi.ge", true },
- { "qrpatrol.com", true },
- { "qrpth.eu", true },
- { "qruiser.com", true },
- { "qryo.nl", true },
- { "qrz.one", true },
- { "qscloud.de", true },
- { "qtacairsoft.com", true },
- { "qtl.me", true },
- { "qtmsheep.com", true },
- { "qtn.net", true },
- { "qto.net", true },
- { "qtpass.org", true },
- { "qtpower.co.uk", true },
- { "qtpower.net", true },
- { "qtpower.org", true },
- { "qttransformation.com", true },
- { "qtvr.com", true },
- { "qtxh.net", true },
- { "quackerswaterproofing.com", true },
- { "quadra.srl", true },
- { "quagga.me", true },
- { "quaggan.co", true },
- { "quai10.org", false },
- { "qualbe.com", true },
- { "qualiacomputers.com", true },
- { "qualite-ecole-et-formation.ch", false },
- { "quality-life.gr", true },
- { "qualityhomesystems.com", true },
- { "qualityhvacservices.com", true },
- { "qualityofcourse.com", true },
- { "qualitypropertycare.co.uk", true },
- { "qualitywaterproofing.com", true },
- { "qualpay.com", true },
- { "qualtrics.com", true },
- { "qualyven.com", true },
- { "quant-labs.de", true },
- { "quantaloupe.tech", true },
- { "quanterra.ch", false },
- { "quantifiedcommerce.com", true },
- { "quantolytic.de", true },
- { "quantoras.com", true },
- { "quanttydesignweb.com.br", true },
- { "quantum-evolution.jp", true },
- { "quantum-mechanics.com", true },
- { "quantum2.xyz", true },
- { "quantumcrypto.nl", true },
- { "quantumfinance.com.au", true },
- { "quantumpair.net", true },
- { "quareal.ru", true },
- { "quarim.cz", true },
- { "quarkdose.de", true },
- { "quarterfull.com", true },
- { "quarticon.com", true },
- { "quartix.com", true },
- { "quasarelectronics.co.uk", true },
- { "quasiproxy.com", true },
- { "quasseldroid.info", true },
- { "quatrefoiscent.fr", true },
- { "quatulo.net", true },
- { "quaxio.com", true },
- { "quay.net", true },
- { "qubes-os.org", true },
- { "qubhockey.tk", true },
- { "qubyte.codes", true },
- { "que-debo-regalar.es", true },
- { "quebajelagasolina.com", true },
- { "quebec.casa", true },
- { "quecomo.cl", true },
- { "quedos.com.au", true },
- { "queenbeer.com", true },
- { "queencomplex.net", true },
- { "queene.eu", true },
- { "queensfactory.it", true },
- { "queensrdapartments.com.au", true },
- { "queer.party", true },
- { "queercoders.com", false },
- { "queextensiones.com", true },
- { "queirozmiotto.adv.br", true },
- { "queirozmiotto.com.br", true },
- { "quelle-catalog.tk", true },
- { "quelle.at", true },
- { "quelle.ch", true },
- { "quelle.de", true },
- { "quelleformation.net", true },
- { "quemadoresdegrasa.org", true },
- { "quemmeliga.com", true },
- { "quenecesitopara.com", true },
- { "quenotejodan.cl", true },
- { "quentin-sauvetre.fr", true },
- { "quentinchevre.ch", true },
- { "quera.ir", true },
- { "querenciavirtual.com.br", true },
- { "queropescar.net", true },
- { "query-massage.com", false },
- { "queryquinton.com", true },
- { "questdairy.com", true },
- { "question.com", true },
- { "questionscafe.org", true },
- { "questsocial.it", true },
- { "quevisiongrafica.com", true },
- { "quhyu.xyz", true },
- { "quic.network", true },
- { "quic.stream", true },
- { "quichante.com", true },
- { "quiche-quic.cf", true },
- { "quickassortments.com", true },
- { "quickformspro.com", true },
- { "quickinfosystem.com", true },
- { "quickrelations.de", true },
- { "quicksell.store", true },
- { "quicksupplies.us", true },
- { "quieoltre.it", true },
- { "quieroserbombero.org", true },
- { "quieroserdoula.com", true },
- { "quieroserdoula.es", true },
- { "quieroserdoula.org", true },
- { "quiet-waters.org", true },
- { "quietapple.org", true },
- { "quik.legal", true },
- { "quikchange.net", true },
- { "quikpay.com.au", true },
- { "quimatic.com.br", true },
- { "quinmedia.tk", true },
- { "quinoa24.com", true },
- { "quintenbraakman.com", true },
- { "quintenbraakman.nl", true },
- { "quintenehb.be", true },
- { "quinterorealestate.com", true },
- { "quintessa.org", true },
- { "quiq-api.com", true },
- { "quiq-cdn.com", true },
- { "quiq-uri.com", true },
- { "quiq-url.com", true },
- { "quiq.com", true },
- { "quiq.us", true },
- { "quiqd.com", true },
- { "quiqstatus.com", true },
- { "quiqurl.com", true },
- { "quiqurls.com", true },
- { "quire.io", true },
- { "quirkytravelguy.com", true },
- { "quiz4math.gr", true },
- { "quizhub.co", true },
- { "quizz.biz", true },
- { "qul.link", true },
- { "qunix.net", true },
- { "quote.gq", false },
- { "quotedtale.com", true },
- { "quoteidiot.com", true },
- { "quotev.com", true },
- { "quovadisaustria.com", true },
- { "quppa.net", true },
- { "quprop.com", true },
- { "quranliveonline.com", true },
- { "qurplus.nl", true },
- { "quuck.eu", true },
- { "quuck.nl", true },
- { "quuz.org", true },
- { "qvg.company", true },
- { "qvggroup.com", true },
- { "qvq.cloud", true },
- { "qwant.com", true },
- { "qwantjunior.com", true },
- { "qwd.no", true },
- { "qwdqwd.de", true },
- { "qwe7002.com", true },
- { "qwertee.com", true },
- { "qwerty.work", true },
- { "qwikdash.com", true },
- { "qwq.moe", true },
- { "qwq2333.top", true },
- { "qx.fi", true },
- { "qx.se", true },
- { "qxzg.xyz", true },
- { "qzhou.ddns.net", true },
- { "r-ay.cn", true },
- { "r-rwebdesign.com", true },
- { "r-t-b.fr", true },
- { "r102.ch", true },
- { "r18.moe", true },
- { "r1a.eu", true },
- { "r1ch.net", true },
- { "r1h3.nl", true },
- { "r2d2pc.com", true },
- { "r33.space", true },
- { "r36533.com", true },
- { "r36594.com", true },
- { "r3s1stanc3.me", true },
- { "r3t.io", true },
- { "r40.us", true },
- { "r6-team.ru", true },
- { "r7.com.au", true },
- { "r7h.at", true },
- { "ra-joergensen.de", true },
- { "ra-jurochnik.de", false },
- { "ra-micro-koeln.de", true },
- { "ra-schaal.de", true },
- { "ra.co.ke", true },
- { "ra3y.xyz", true },
- { "raadgiverborsen.com", true },
- { "raah.co", true },
- { "raailto.com", true },
- { "raaynk.com", true },
- { "raballder.tk", true },
- { "rabbit.finance", true },
- { "rabbitcallcenter.com", true },
- { "rabbitfinance.com", true },
- { "rabbitinternet.com", true },
- { "rabica.de", true },
- { "rabis.co", true },
- { "rabitfordarcy.org", true },
- { "rabotaescort.com", false },
- { "racaliz.tk", true },
- { "raccoltarifiuti.com", true },
- { "raccoon.fun", true },
- { "racermaster.xyz", true },
- { "racesimscoring.com", true },
- { "raceviewcycles.com", true },
- { "racevinyl.es", true },
- { "racheldiensthuette.de", true },
- { "rachelmoorelaw.com", true },
- { "rachelreagan.com", true },
- { "racing-planet.cz", true },
- { "racius.com", true },
- { "rackerlab.com", true },
- { "raclet.co.uk", true },
- { "raconconsulting.co.uk", true },
- { "racoo.net", true },
- { "racunovodstvo-prina.si", true },
- { "radar.sx", true },
- { "radaravia.ru", true },
- { "radarbanyumas.co.id", true },
- { "radarequation.com", true },
- { "radartatska.se", true },
- { "radartek.com", true },
- { "radcube.hu", true },
- { "radegundisfest.de", true },
- { "radfieldhomecare.co.uk", true },
- { "radfieldhomecarefranchising.co.uk", true },
- { "radiantweb.co.za", true },
- { "radicaldream.tk", true },
- { "radicalepil-haguenau.fr", true },
- { "radicaloptimism.org", true },
- { "radicalsub.com.br", true },
- { "radio-brest.tk", true },
- { "radio-pulsar.eu", true },
- { "radio-utopie.de", true },
- { "radio1.ie", true },
- { "radioborges.tk", true },
- { "radiobox.net", true },
- { "radiocartel.tk", true },
- { "radiocommande-industrielle.fr", true },
- { "radiocommg.com.br", true },
- { "radiocomsaocarlos.com.br", true },
- { "radiodeutsch.com", true },
- { "radiodiagonal.tk", true },
- { "radioduepuntozero.it", true },
- { "radioelectronic.tk", true },
- { "radiofmimagen.net", true },
- { "radioheteroglossia.com", true },
- { "radiohub.ru", true },
- { "radioilusion.es", true },
- { "radioldpr.ru", true },
- { "radiolla.com", true },
- { "radiom.fr", true },
- { "radiomercure.net", true },
- { "radiomodem.dk", true },
- { "radiomontebianco.it", true },
- { "radionrg.tk", true },
- { "radiopharereims.tk", true },
- { "radiopleer.net", true },
- { "radioradicchio.it", true },
- { "radiorainbow.tk", true },
- { "radiosendungen.com", true },
- { "radiowakeup.tk", true },
- { "radiozetta.tk", true },
- { "radis-adopt.com", true },
- { "radiumone.io", true },
- { "radiumtree.com", true },
- { "radixsalon.tk", true },
- { "radlina.com", true },
- { "radomir-online.ru", true },
- { "radondetectionandcontrol.com", true },
- { "radreisetraumtreibstoff.de", true },
- { "radyabkhodro.net", true },
- { "radyn.com", true },
- { "radyodinle.mobi", true },
- { "radyodinle.us", true },
- { "radzikow.ski", true },
- { "raeder-test.azurewebsites.net", true },
- { "raelto.com", true },
- { "raeu.me", true },
- { "raeven.nl", true },
- { "raevinnd.com", true },
- { "raewardfresh.co.nz", true },
- { "rafaelmagalhaesweb.com", true },
- { "rafas.com.tr", true },
- { "rafey.xyz", true },
- { "raffaellaosti.com", true },
- { "raffleoftheday.com", true },
- { "raffleshospital.co.id", false },
- { "rafleatherdesign.com", true },
- { "rafsurveys.co.uk", true },
- { "rafting-japan.com", true },
- { "ragasto.nl", true },
- { "rage4.com", true },
- { "raghuspeaks.com", true },
- { "raginggaming.ga", true },
- { "ragingserenity.com", true },
- { "ragu.co.uk", true },
- { "rahulpnath.com", true },
- { "raid-runners.fr", true },
- { "raidemeraude.com", true },
- { "raidensnakesden.co.uk", true },
- { "raidensnakesden.com", true },
- { "raidensnakesden.net", true },
- { "raidstone.net", true },
- { "raiffeisen-kosovo.com", true },
- { "raiffeisenleasing-kosovo.com", true },
- { "raiilto.com", true },
- { "raiito.com", true },
- { "rail-o-rama.nl", true },
- { "rail-to.com", true },
- { "rail24.nl", true },
- { "rail360.nl", true },
- { "railbird.nl", true },
- { "railduction.eu", true },
- { "railgun.ac", true },
- { "railgun.com.cn", true },
- { "raillto.com", true },
- { "railorama.nl", true },
- { "railot.com", true },
- { "railpassie.nl", true },
- { "railto-sucks.com", true },
- { "railto.cm", true },
- { "railto.co", true },
- { "railto.com.de", true },
- { "railto.com.se", true },
- { "railto.exchange", true },
- { "railto.llc", true },
- { "railto.net", true },
- { "railto.org", true },
- { "railtocom.com", true },
- { "railtoe.com", true },
- { "railtoexchange.com", true },
- { "railtoh.com", true },
- { "railtollc.com", true },
- { "railtoo.com", true },
- { "railtosucks.com", true },
- { "railtow.com", true },
- { "railtp.com", true },
- { "railtto.com", true },
- { "railvideo.co.uk", true },
- { "railvideo.net", true },
- { "railvideo.nl", true },
- { "rain.bz", true },
- { "rainbow-web.com", true },
- { "rainbowbay.org", true },
- { "rainbowflowers.co.uk", true },
- { "rainbowinflatables.co.uk", true },
- { "rainbowloompattern.com", true },
- { "rainbowloompatterns.com", true },
- { "rainbowsmoothies.win", true },
- { "rainbowstore.com.au", true },
- { "rainbowstore.com.ua", true },
- { "rainbowswingers.net", true },
- { "raincoat.systems", true },
- { "rainel.at", true },
- { "rainforest.engineering", true },
- { "raingoc.com", true },
- { "rainiv.com", true },
- { "rainmanzone.com", true },
- { "rainpaper.com", true },
- { "rainstormsinjuly.co", true },
- { "rainville.me", true },
- { "rainway.com", true },
- { "rainway.io", true },
- { "raisecorp.com", true },
- { "raiseyourflag.com", true },
- { "raissarobles.com", true },
- { "raistrick.it", true },
- { "raitlo.com", true },
- { "raivis.com", true },
- { "rajaealhoceima.tk", true },
- { "rajasatour.id", true },
- { "rak-business-service.com", true },
- { "raketa.travel", true },
- { "raketaro.de", true },
- { "raketenwolke.de", true },
- { "raku.bzh", true },
- { "rakugokai.net", true },
- { "raleto.com", true },
- { "ralfs-zusizone.de", true },
- { "ralimtek.com", false },
- { "ralix.net", true },
- { "rallto.com", true },
- { "rally-base.com", true },
- { "rally-base.cz", true },
- { "rally-base.eu", true },
- { "rally-results.eu", true },
- { "rally-vysledky.cz", true },
- { "rallybase.cz", true },
- { "rallybase.eu", true },
- { "rallycycling.com", true },
- { "rallypodium.be", true },
- { "raltha.com", true },
- { "ram-it.nl", true },
- { "ram.nl", true },
- { "rama.ovh", true },
- { "ramarka.de", true },
- { "rambedjeans.com", true },
- { "rambo.codes", true },
- { "ramdigital.xyz", true },
- { "ramirezpeluqueria.com", true },
- { "ramitan.com", true },
- { "rammstein-portugal.com", true },
- { "rammsteinzone.tk", true },
- { "rampestyuma.com", true },
- { "ramrecha.com", false },
- { "ramsaver.com.br", true },
- { "ramsdensforcash.co.uk", true },
- { "ramsdensplc.com", true },
- { "ramsor-gaming.de", true },
- { "ramtechmodular.com", true },
- { "ran-drunken.tk", true },
- { "ranalawassociates.com", true },
- { "ranasinha.com", true },
- { "randc.org", true },
- { "randolf.ca", true },
- { "random-samplings.org", true },
- { "random.org", true },
- { "randomadversary.com", true },
- { "randombit.eu", false },
- { "randomcategory.com", true },
- { "randomcode.org", true },
- { "randomdata.sh", true },
- { "randomkoalafacts.com", true },
- { "randomprecision.co.uk", true },
- { "randomquotesapp.com", true },
- { "randomsearching.ml", true },
- { "randomserver.pw", true },
- { "randstalker.ovh", true },
- { "ranfurlychambers.co.nz", true },
- { "rangde.org", true },
- { "rangercollege.edu", true },
- { "rangsmo.se", true },
- { "rank-net.de", true },
- { "rankgiants.com", true },
- { "ranking-deli.jp", true },
- { "rannamoisaaiasalong.ee", true },
- { "ranthambhorenationalpark.net", true },
- { "ranwest.com", true },
- { "rany.eu.org", true },
- { "ranyeh.com", true },
- { "ranzbak.nl", true },
- { "raoul-kieffer.net", true },
- { "rap4ever.org", true },
- { "rapenroer.com", true },
- { "rapenroer.nl", true },
- { "raphael.li", true },
- { "raphaelcasazza.ch", false },
- { "raphrfg.com", true },
- { "rapidapp.io", true },
- { "rapidoo.com.br", true },
- { "rapidstone.com", true },
- { "raportdnia.pl", true },
- { "rapport.link", true },
- { "rapportdecoracoes.com.br", true },
- { "raptorsrapture.com", true },
- { "rapwoyska.tk", true },
- { "raqoo.jp", true },
- { "raquelmolinacases.tk", true },
- { "raraflora.com.au", true },
- { "rarece.cf", true },
- { "rarename.tk", true },
- { "raryosu.info", true },
- { "rasagiline.com", true },
- { "rascahan.org", true },
- { "rascals-castles.co.uk", true },
- { "rascals.ga", true },
- { "rascalscastles.co.uk", true },
- { "rascalscastlesdoncaster.co.uk", true },
- { "rasebo.ro", true },
- { "raspberid.com.es", true },
- { "raspii.tech", true },
- { "rassadacvetov.com", true },
- { "rasset.ie", true },
- { "rassro.sk", true },
- { "rastabooks.ga", true },
- { "rasty.cz", true },
- { "ratajczak.one", true },
- { "ratd.net", true },
- { "ratebridge.com", true },
- { "ratelimited.me", true },
- { "ratgeber-guide.de", true },
- { "rathbonesonline.com", true },
- { "rathgeb.org", true },
- { "rationalcreation.com", true },
- { "rationalism.com", true },
- { "ratirl.be", true },
- { "rattattees.com", true },
- { "rattenkot.io", true },
- { "ratujemyzwierzaki.net", true },
- { "ratul.me", true },
- { "raucris.ro", true },
- { "raulrivero.es", true },
- { "rauros.net", true },
- { "rauschenbach.de", true },
- { "ravanalk.com", true },
- { "ravchat.com", true },
- { "ravelin.com", true },
- { "raven.dog", true },
- { "ravencoin.com", true },
- { "ravencoin.org", true },
- { "ravenger.net", true },
- { "ravenrockrp.com", true },
- { "ravensbuch.de", true },
- { "ravhaaglanden.org", true },
- { "ravindran.me", true },
- { "ravis.org", true },
- { "rawcbd.shop", true },
- { "rawdamental.com", true },
- { "rawdutch.nl", true },
- { "rawinfosec.com", true },
- { "rawpearls.com", true },
- { "rawsec.net", true },
- { "ray-home.de", true },
- { "ray-works.de", true },
- { "raya.io", true },
- { "rayadventure.com", true },
- { "raydius.de", true },
- { "raydolapfiyat.com", true },
- { "rayfalling.com", true },
- { "rayiris.com", true },
- { "raykitchenware.com", true },
- { "raymcbride.com", true },
- { "raymd.de", true },
- { "raymondelooff.nl", true },
- { "raynersorchard.com.au", true },
- { "raynis.net", true },
- { "raysei.com", true },
- { "raystark.com", true },
- { "raywin168.com", true },
- { "raywin168.net", true },
- { "raywin88.net", true },
- { "rayworks.de", true },
- { "raza.gr", true },
- { "razalabs.com", true },
- { "razalabs.gr", true },
- { "razborpoletov.cf", true },
- { "razborpoletov.ml", true },
- { "razborpoletov.tk", true },
- { "razeencheng.com", true },
- { "razgon.ga", true },
- { "razrabo.tk", true },
- { "razrsec.uk", true },
- { "razvlekuha.cf", true },
- { "razvlekuhablog.tk", true },
- { "rbensch.com", true },
- { "rbflote.lv", true },
- { "rbh.co.uk", true },
- { "rbiacademylms.org", true },
- { "rbltracker.com", true },
- { "rblx.red", true },
- { "rbmland.com", true },
- { "rbnet.xyz", true },
- { "rbran.com", true },
- { "rbs.com", true },
- { "rbt.sx", true },
- { "rbtvshitstorm.de", true },
- { "rbuddenhagen.com", true },
- { "rbunews.tk", true },
- { "rbx.com", true },
- { "rc-offi.net", true },
- { "rc-shop.ch", true },
- { "rca.fr", true },
- { "rcd.cz", true },
- { "rcdocuments.com", true },
- { "rcgoncalves.pt", true },
- { "rcjescrow.uk", true },
- { "rclaywilliamsdo.com", true },
- { "rclsm.net", true },
- { "rcmstream.com", true },
- { "rcmurphy.com", true },
- { "rcnitrotalk.com", true },
- { "rcpdesign.cl", true },
- { "rcraigmurphy.com", true },
- { "rct.sk", true },
- { "rct.uk", true },
- { "rctalk.com", true },
- { "rdap.co.il", true },
- { "rdcdesign.com", true },
- { "rddjapan.info", true },
- { "rdfproject.it", true },
- { "rdh.asia", true },
- { "rdjb2b.com", true },
- { "rdl.at", true },
- { "rdmc.fr", true },
- { "rdmrotterdam.nl", true },
- { "rdmtaxservice.com", true },
- { "rdns.cc", false },
- { "rdr2natives.com", true },
- { "rdv-cni.fr", true },
- { "rdv-prefecture.com", true },
- { "re-crawl.com", true },
- { "re-engines.com", true },
- { "re-inspect.com", true },
- { "re-security.com", true },
- { "reach-on.de", true },
- { "reachhead.com", true },
- { "reachout-ghana.com", true },
- { "reachrss.com", true },
- { "reaconverter.com", true },
- { "react-db.com", true },
- { "reactions.ai", false },
- { "reactive-press.com", true },
- { "reactivemarkets.com", true },
- { "reactpwa.com", true },
- { "readabilitychecker.com", true },
- { "reades.co.uk", true },
- { "reades.uk", true },
- { "readify.net", true },
- { "readifycloud.com", true },
- { "readingrats.de", true },
- { "readmusiccoleman.com", true },
- { "readonly.de", true },
- { "readouble.com", false },
- { "reads.wang", false },
- { "ready4bf.tk", true },
- { "readybetwin.com", true },
- { "readyrowan.com", true },
- { "readyrowan.org", true },
- { "readysell.net", true },
- { "readytongue.com", true },
- { "reaganlibrary.gov", true },
- { "reaksi.id", true },
- { "real-digital.co.uk", true },
- { "real-it.nl", true },
- { "real-neo.me", true },
- { "realcapoeira.ru", true },
- { "realestate-in-uruguay.com", true },
- { "realestate-lidl.at", true },
- { "realestate-lidl.be", true },
- { "realestate-lidl.bg", true },
- { "realestate-lidl.ch", true },
- { "realestate-lidl.co.uk", true },
- { "realestate-lidl.com", true },
- { "realestate-lidl.cz", true },
- { "realestate-lidl.dk", true },
- { "realestate-lidl.fr", true },
- { "realestate-lidl.gr", true },
- { "realestate-lidl.it", true },
- { "realestate-lidl.lt", true },
- { "realestate-lidl.lu", true },
- { "realestate-lidl.lv", true },
- { "realestate-lidl.pl", true },
- { "realestate-lidl.pt", true },
- { "realestate-lidl.ro", true },
- { "realestate-lidl.rs", true },
- { "realestate-lidl.se", true },
- { "realestate-lidl.sk", true },
- { "realestatecentralcoast.info", true },
- { "realestatemarketingblog.org", true },
- { "realestateonehowell.com", true },
- { "realestateradioshow.com", true },
- { "realfood.space", true },
- { "realgogo.com", true },
- { "realhypnosistraining.com.au", true },
- { "reality.news", true },
- { "reality0ne.com", false },
- { "reall.uk", true },
- { "reallifeforums.com", true },
- { "realloc.me", true },
- { "really-simple-ssl.com", true },
- { "reallytrusted.com", true },
- { "reallywild.tk", true },
- { "realm-of-shade.com", true },
- { "realme.govt.nz", true },
- { "realmofaesir.com", true },
- { "realmofespionage.xyz", true },
- { "realneo.me", true },
- { "realoteam.ddns.net", true },
- { "realpaella.com", true },
- { "realpropertyprofile.gov", true },
- { "realtygroup-virginia.com", true },
- { "realtyink.net", true },
- { "realum.com", true },
- { "realum.de", true },
- { "realum.eu", true },
- { "realum.net", true },
- { "realvnc.help", true },
- { "realwaycome.com", true },
- { "realwildart.com", true },
- { "realworldholidays.co.uk", true },
- { "ream.lu", true },
- { "reancos.report", true },
- { "reanimated.eu", true },
- { "reath.xyz", true },
- { "reavaninc.com", true },
- { "reaven.nl", true },
- { "rebane2001.com", true },
- { "rebeagle.com", true },
- { "rebeccawendlandt.com", true },
- { "rebelbranding.nl", true },
- { "rebelessex.com", true },
- { "rebelko.de", true },
- { "rebellionbrewing.com.au", true },
- { "rebelonline.nl", true },
- { "rebelz.se", true },
- { "rebirthia.me", true },
- { "reboxetine.com", true },
- { "reboxonline.com", true },
- { "rebtoor.com", true },
- { "reby.cf", true },
- { "reby.ga", true },
- { "reby.gq", true },
- { "reby.tk", true },
- { "recalls.gov", true },
- { "recantoshop.com", true },
- { "recantoshop.com.br", true },
- { "recapp.ch", true },
- { "recaptcha-demo.appspot.com", true },
- { "recebersms.com", true },
- { "receptionpoint.com", true },
- { "recetin.com", true },
- { "recettemedievale.fr", true },
- { "recherchegruppe.tk", true },
- { "recht.us", true },
- { "rechtsanwaeltin-vollmer.de", true },
- { "rechtsanwalt-koeppen-feucht.de", true },
- { "rechtschreibpruefung24.de", true },
- { "recipea.com", true },
- { "recipeapproved.ca", true },
- { "recipesmadeeasy.co.uk", true },
- { "recipex.ru", true },
- { "recipeyak.com", true },
- { "reckontalk.com", true },
- { "reclametoolz.nl", true },
- { "reclusiam.net", true },
- { "reco-studio.de", true },
- { "recoba3d.com", true },
- { "recolic.net", true },
- { "recolic.org", true },
- { "recommended.reviews", true },
- { "recompiled.org", false },
- { "recon-networks.com", true },
- { "reconexion.life", true },
- { "recordmeeting.jp", true },
- { "recoveringspirit.com", true },
- { "recoveryonline.org", true },
- { "recoveryunplugged.com", true },
- { "recoveryunpluggedtreatment.com", true },
- { "recrea.pl", true },
- { "recreatieftotaal.nl", true },
- { "recreation.gov", true },
- { "recruit.net", true },
- { "recruitmade.jp", true },
- { "recruitnow.nl", true },
- { "rectecforum.com", true },
- { "recuperodatiraidfastec.it", true },
- { "recurly.com", true },
- { "recurrentmeningitis.org", true },
- { "recursionrecursion.co.uk", true },
- { "recursosdeautoayuda.com", true },
- { "recycling.tk", true },
- { "recyclingisland.com", true },
- { "red-button.hu", true },
- { "red-dead-rp.de", true },
- { "red-t-shirt.ru", true },
- { "red-trigger.net", true },
- { "red031000.com", true },
- { "red2fred2.com", true },
- { "redable.hosting", true },
- { "redable.nl", true },
- { "redactieco.nl", true },
- { "redb.cz", true },
- { "redballoonsecurity.com", true },
- { "redburn.com", true },
- { "redcarpetmonday.com", true },
- { "redcatrampageforum.com", true },
- { "redchip.com.au", true },
- { "redcoded.com", true },
- { "redcorus.com", true },
- { "redd.it", true },
- { "reddevilarmada.com", true },
- { "reddingo.at", true },
- { "reddingo.be", true },
- { "reddingo.ch", true },
- { "reddingo.com", true },
- { "reddingo.com.au", true },
- { "reddingo.de", true },
- { "reddingo.es", true },
- { "reddingo.eu", true },
- { "reddingo.fr", true },
- { "reddingo.it", true },
- { "reddingo.jp", true },
- { "reddingo.nl", true },
- { "reddingo.nz", true },
- { "reddingsbrigade-zwolle.nl", true },
- { "reddingsbrigadeveghel.nl", true },
- { "reddit.com", true },
- { "reddit2kindle.com", true },
- { "reddraggone9.com", true },
- { "reddyai.com", true },
- { "rede-reim.de", true },
- { "rede-t.com", true },
- { "redecsirt.pt", true },
- { "redeemingbeautyminerals.com", true },
- { "redeshoprural.com.br", true },
- { "redeyeguatemala.tk", true },
- { "redflare.com.au", true },
- { "redfox-infosec.de", true },
- { "redfoxmarketiing.com", true },
- { "redgatesoftware.co.uk", true },
- { "redgoose.ca", true },
- { "redgravity.net", true },
- { "redhandedsecurity.com.au", true },
- { "redhawkwa.com", true },
- { "redheadfuck.com", true },
- { "redicals.com", true },
- { "redinational.com", true },
- { "redion.me", true },
- { "redir.me", true },
- { "redirect.fedoraproject.org", true },
- { "redirect.stg.fedoraproject.org", true },
- { "rediske.me", true },
- { "redivis.com", true },
- { "redjuice.co.uk", true },
- { "redkiwi.nl", true },
- { "redleslie.com", true },
- { "redlinelap.com", true },
- { "redlink.de", true },
- { "redmangallpsychologists.com.au", true },
- { "redmind.se", true },
- { "redmondtea.com", true },
- { "redmoon.cloud", true },
- { "redmore.me", true },
- { "redneragenturen.org", true },
- { "rednsx.org", true },
- { "rednumberone.com", true },
- { "redpatronus.com", true },
- { "redpen.gr", true },
- { "redray.org", true },
- { "redrowcareers.co.uk", true },
- { "redscan.com", true },
- { "redsequence.com", true },
- { "redshoeswalking.net", true },
- { "redsicom.com", true },
- { "redstarpictures.tk", true },
- { "redstarsurf.com", true },
- { "redstoner.com", true },
- { "redteam-pentesting.de", true },
- { "redunion.tk", true },
- { "redwater.co.uk", true },
- { "redwaterhost.com", true },
- { "redweek.com", true },
- { "redwiki.tk", true },
- { "redworks.nl", true },
- { "reecewindows.com", true },
- { "reed-sensor.com", true },
- { "reedloden.com", true },
- { "reedyforkfarm.com", true },
- { "reeftrip.com", true },
- { "reegle.com", true },
- { "reening.net", true },
- { "rees-carter.net", true },
- { "reesmichael1.com", true },
- { "reevaappliances.co.uk", true },
- { "reeves-family.com", true },
- { "ref1oct.nl", true },
- { "refactor.zone", false },
- { "refer.codes", true },
- { "referat.club", true },
- { "referat.me", true },
- { "referdell.com", true },
- { "refinansiering.no", true },
- { "refinedroomsllc.com", true },
- { "refjob.jp", true },
- { "reflectiondentallasvegas.com", true },
- { "reflectores.net", true },
- { "refletindosaude.com.br", true },
- { "reflets.info", true },
- { "reflexions.co", true },
- { "reflexionspain.tk", true },
- { "refluxogastroesofagico.ga", true },
- { "refood-cascaiscpr.eu", true },
- { "reformation.financial", true },
- { "refreshcartridges.co.uk", true },
- { "refreshliving.us", true },
- { "refrigeracionpeinado.com.mx", true },
- { "refu.net", true },
- { "refundo.cz", true },
- { "refundo.sk", true },
- { "reg.place", true },
- { "regalcapitalwi.com", true },
- { "regalopublicidad.com", true },
- { "regalosymuestrasgratis.com", true },
- { "reganclassics.co.uk", true },
- { "reganclassics.com", true },
- { "reganparty.com", true },
- { "regar42.fr", false },
- { "regata2015.tk", true },
- { "regazofotografia.com", true },
- { "regeneo.cz", true },
- { "regeneracjalamp.eu", true },
- { "regenerapoint.it", true },
- { "regenerescence.com", true },
- { "regenpod.com", true },
- { "regensburg-repariert.de", true },
- { "reginaclinic.jp", true },
- { "reginfo.gov", true },
- { "regiobeveland.nl", true },
- { "region-vologda.tk", true },
- { "regionalbasementandcrawlspacerepair.com", true },
- { "regionalgrowth.com", true },
- { "regiosalland.nl", true },
- { "regiovertrieb.de", false },
- { "regis.tech", true },
- { "regisearch.co.uk", true },
- { "register.to", true },
- { "registerex.me", true },
- { "registerforevent.co.uk", true },
- { "registerra.nl", true },
- { "registr.io", true },
- { "registrarplus.net", true },
- { "registrarplus.nl", true },
- { "registry.google", true },
- { "registryplus.net", true },
- { "registryplus.nl", true },
- { "regmyr.se", true },
- { "regnr.info", true },
- { "regolithmedia.com", true },
- { "regon.hu", true },
- { "regraph.de", true },
- { "regularflolloping.com", true },
- { "regulations.gov", true },
- { "reha-honpo.jp", true },
- { "rehabili-shigoto.com", true },
- { "rehabthailand.com", true },
- { "rehabthailand.org", true },
- { "rei.ki", true },
- { "reichardt-home.goip.de", true },
- { "reichel-steinmetz.de", true },
- { "reichelt-cloud.de", true },
- { "reichl-online.net", true },
- { "reiciunas.lt", true },
- { "reidasbombas.com", true },
- { "reifr.net", true },
- { "reiki-france.fr", true },
- { "reilly.io", true },
- { "reimaginebelonging.de", true },
- { "reimaginebelonging.org", true },
- { "reimann.me", true },
- { "reimers.de", true },
- { "rein.kr", true },
- { "reinaertvandecruys.com", true },
- { "reinaldudras.ee", true },
- { "reinaldudrasfamily.ee", true },
- { "reinascba.com.ar", true },
- { "reindersfoodfashion.nl", true },
- { "reinencaressa.be", true },
- { "reinfer.io", true },
- { "reinhardtsgrimma.de", true },
- { "reinhart-auto.cz", true },
- { "reinierjonker.nl", true },
- { "reinotools.com", true },
- { "reinout.nu", true },
- { "reinouthoornweg.nl", true },
- { "reinventetoi.com", false },
- { "reinventfit.ro", true },
- { "reirei.cc", true },
- { "reisenbauer.ee", true },
- { "reiseversicherung-werner-hahn.de", true },
- { "reishunger.de", true },
- { "reissnehme.com", true },
- { "reitmeier.me", true },
- { "reitoracle.com", true },
- { "reitstall-goettingen.de", true },
- { "reittherapie-tschoepke.de", true },
- { "rejahrehim.com", true },
- { "rejects.email", true },
- { "rejido.tk", true },
- { "rekisuta.com", true },
- { "reklamjog.hu", true },
- { "rekorsanat.com.tr", true },
- { "rekurasi.com", true },
- { "relaispourlavie.net", true },
- { "relax.hn", true },
- { "relaxdom.net", true },
- { "relaxhavefun.com", true },
- { "relaxpointhyncice.cz", true },
- { "release-monitoring.org", true },
- { "releasepoint.com", true },
- { "releasingarchive.org", true },
- { "reliablemaids.co.uk", true },
- { "reliableremovals-blackpool.co.uk", true },
- { "reliancebank.bank", true },
- { "relitas.cz", true },
- { "relojeriajoyeria.com", true },
- { "relojes-online.com", true },
- { "relsak.cz", true },
- { "rem0te.net", true },
- { "remaimodern.org", true },
- { "remambo.jp", true },
- { "remarketable.org", true },
- { "remax.at", true },
- { "remeb.de", true },
- { "remedi.tokyo", true },
- { "remedionaturales.com", true },
- { "rememberthemilk.com", false },
- { "remetall.cz", true },
- { "remi-saurel.com", true },
- { "remiafon.com", true },
- { "remilner.co.uk", true },
- { "remini.cz", true },
- { "reminisceaudio.com", true },
- { "remirampin.com", true },
- { "remissan.com", true },
- { "remitano.com", true },
- { "remmik.com", true },
- { "remny.com", true },
- { "remodeus.com", true },
- { "remonline.ru", true },
- { "remont-kvartirvmoskve.ga", true },
- { "remont-naushnikov.tk", true },
- { "remont-p.com", true },
- { "remont-warszawa.pl", true },
- { "remonti.info", true },
- { "remotedesktop.corp.google.com", true },
- { "remoteham.com", true },
- { "remoteoffice.ga", true },
- { "remoteutilities.com", true },
- { "remptmotors.com", true },
- { "remrol.ru", true },
- { "rena.cloud", true },
- { "renaissanceplasticsurgery.net", true },
- { "renanoliveira.design", true },
- { "renaultclubticino.ch", false },
- { "rendall.tv", true },
- { "render.com", true },
- { "renderloop.com", true },
- { "rene-eizenhoefer.de", true },
- { "rene-schwarz.com", true },
- { "rene-stolp.de", true },
- { "renearends.nl", true },
- { "renedekoeijer.com", true },
- { "renehsz.com", true },
- { "reneleu.ch", true },
- { "renem.net", false },
- { "renemayrhofer.com", false },
- { "reneschmidt.de", true },
- { "renewablefreedom.org", true },
- { "renewablemaine.org", true },
- { "renewed.technology", true },
- { "renewmedispa.com", true },
- { "renewpfc.com", true },
- { "renezuo.com", true },
- { "renkenlaw.com", true },
- { "renlen.nl", true },
- { "rennes-bachata.com", true },
- { "rennes-danse-africaine.com", true },
- { "rennes-danses-en-ligne.com", true },
- { "rennes-hip-hop.com", true },
- { "rennes-lindy-hop.com", true },
- { "rennes-reggaeton.com", true },
- { "rennes-rock-6-temps.com", true },
- { "rennes-tango.com", true },
- { "rennes-yoga.com", true },
- { "renoovodesign.ltd", true },
- { "renov8sa.co.za", true },
- { "renovablesverdes.com", true },
- { "renovum.es", true },
- { "renrenche.com", false },
- { "rens.nu", true },
- { "rensa-datorn.se", true },
- { "rent-a-c.io", true },
- { "rent-a-coder.de", true },
- { "rentacaramerica.com", true },
- { "rentandamiosycasetas.com", true },
- { "rentandgo.it", true },
- { "rentasweb.gob.ar", true },
- { "renthelper.us", true },
- { "rentinsingapore.com.sg", true },
- { "rentourhomeinprovence.com", true },
- { "rentsbg.com", true },
- { "renuo.ch", true },
- { "renyiyou.com", true },
- { "reorz.com", false },
- { "reox.at", false },
- { "repaik.com", true },
- { "repairguy.dk", true },
- { "repairit.support", true },
- { "repalcateia.com.br", true },
- { "repaper.org", true },
- { "reparacionesdecalefones.com", true },
- { "reparacionmovilesmurcia.com", true },
- { "reparizy.com", true },
- { "repauto.com.ua", true },
- { "repceszentgyorgy.hu", true },
- { "repin.in.ua", true },
- { "replenology.com", true },
- { "repliksword.com", true },
- { "repo.ml", true },
- { "repology.org", true },
- { "report-uri.com", true },
- { "report2psb.online", true },
- { "reportband.gov", true },
- { "reporting.gov", true },
- { "reproduciblescience.org", true },
- { "reproductive-revolution.com", true },
- { "reproductiverevolution.com", true },
- { "reprogramming-predators.com", true },
- { "reprogrammingpredators.com", true },
- { "reprozip.org", true },
- { "repsltd.co.uk", true },
- { "repsomelt.com", true },
- { "reptrax.com", true },
- { "reptv.online", true },
- { "republic.gr", true },
- { "republicanleader.gov", false },
- { "republicghana.com", true },
- { "republictelecom.net", true },
- { "republique.org", true },
- { "repuestosmedellin.com", true },
- { "repugnant-conclusion.com", true },
- { "repugnantconclusion.com", true },
- { "reputationweaver.com", true },
- { "requestr.co.uk", true },
- { "requezmc.net", true },
- { "require.software", false },
- { "reroboto.com", true },
- { "reroboto.eu", true },
- { "reroboto.net", true },
- { "reroboto.org", true },
- { "resama.eu", true },
- { "resanebartar.tk", true },
- { "resch.io", true },
- { "rescms-secure.com", true },
- { "rescuer.gq", true },
- { "resdon.cn", true },
- { "research-panel.jp", true },
- { "research.facebook.com", false },
- { "researchchempro.nl", true },
- { "researchgate.net", true },
- { "researchstory.com", true },
- { "reseausyndic.ca", true },
- { "reservar-un-hotel.com", true },
- { "reserve-duchenier.com", true },
- { "reshka.ga", true },
- { "residence-donatello.be", true },
- { "residence-simoncelli.com", true },
- { "residentiallocksmithdallas.com", true },
- { "resilientlives.com", true },
- { "resilienzatropical.it", true },
- { "resine.roma.it", true },
- { "resinflooringcompany.com", true },
- { "resist.ca", true },
- { "resize2fs.de", true },
- { "resnickandnash.com", true },
- { "resolve-portal.it", true },
- { "resolvefa.co.uk", true },
- { "resolvefa.com", true },
- { "resolving.com", true },
- { "resoplus.ch", false },
- { "resort-islands.net", true },
- { "resortafroditatucepi.com", true },
- { "resortohshima.com", true },
- { "resorts.ru", true },
- { "resourceconnect.com", true },
- { "resourceguruapp.com", true },
- { "resources.flowfinity.com", true },
- { "resourcesmanagementcorp.com", true },
- { "respectmyprivacy.eu", true },
- { "respectmyprivacy.net", true },
- { "respectmyprivacy.nl", true },
- { "respecttheflame.com", true },
- { "respiranto.de", true },
- { "respon.jp", false },
- { "responer.com", true },
- { "respons.je", true },
- { "respons.me", true },
- { "respons.mobi", true },
- { "respons.us", true },
- { "respons.ws", true },
- { "responscode.eu", true },
- { "responscode.info", true },
- { "responscode.mobi", true },
- { "responscode.nl", true },
- { "responsecode.info", true },
- { "responsecode.mobi", true },
- { "responsecode.nl", true },
- { "responsepartner.com", true },
- { "responsibledisclosure.nl", false },
- { "responsive-shop.com", true },
- { "responsivepaper.com", true },
- { "respostas.com.br", true },
- { "resqdesk.com", true },
- { "ressl.ch", true },
- { "ressupply.com", true },
- { "restaurant-de-notenkraker.be", true },
- { "restaurant-eatenjoy.be", true },
- { "restaurant-fujiyama.fr", true },
- { "restaurant-oregano.de", true },
- { "restaurantedonono.com.br", true },
- { "restaurantepepeyestrella.es", true },
- { "restauranttester.at", true },
- { "restauriedili.roma.it", true },
- { "restoran-radovce.me", true },
- { "restoran.cf", true },
- { "restorethegulf.gov", true },
- { "restoringhopeberks.org", true },
- { "restoruns.com", true },
- { "restoruns.xyz", true },
- { "restrealitaet.de", true },
- { "restrito.org", true },
- { "resultsatretail.com", true },
- { "resume4dummies.com", true },
- { "resumelab.com", true },
- { "resumeprofessionalwriters.com", true },
- { "resumeshoppe.com", true },
- { "resursedigitale.ro", true },
- { "resveratrolsupplement.co.uk", true },
- { "retailcybersolutions.com", true },
- { "retailing.cf", true },
- { "retefarmaciecostadamalfi.it", true },
- { "retetop95.it", true },
- { "reticket.me", true },
- { "reticon.de", true },
- { "retinacv.es", true },
- { "retireearlyandtravel.com", true },
- { "retirementsolutionva.com", true },
- { "retirest.com", true },
- { "retmig.dk", true },
- { "reto.ch", false },
- { "reto.com", false },
- { "reto.io", true },
- { "retokromer.ch", false },
- { "retornaz.com", true },
- { "retornaz.eu", true },
- { "retornaz.fr", true },
- { "retractableawningssydney.com.au", true },
- { "retraitebysaulsplace.nl", true },
- { "retro-game.org", true },
- { "retro.camp", true },
- { "retro.sx", true },
- { "retroarms.com", true },
- { "retroarms.cz", true },
- { "retrocdn.net", true },
- { "retrofitlab.com", true },
- { "retroity.net", true },
- { "retropack.org", true },
- { "retroride.cz", true },
- { "retroroundup.com", true },
- { "retrotown.ws", true },
- { "retrotracks.net", true },
- { "retrovideospiele.com", true },
- { "rettig.xyz", false },
- { "retzer.me", true },
- { "reucon.com", true },
- { "reupo.com", true },
- { "reussirsavie.info", true },
- { "reut42.de", true },
- { "reuter-profishop.de", true },
- { "reuter.de", true },
- { "reuzenplaneten.nl", true },
- { "revamed.com", false },
- { "revampweb-development.azurewebsites.net", true },
- { "revampweb-staging.azurewebsites.net", true },
- { "revapost.fr", true },
- { "revayd.net", true },
- { "revealdata.com", true },
- { "revensoftware.com", true },
- { "reverencestudios.com", true },
- { "reverseaustralia.com", true },
- { "reversecanada.com", true },
- { "reverseloansolutions.com", true },
- { "reverselookupphone.us", true },
- { "reversesouthafrica.com", true },
- { "review.jp", true },
- { "reviewbestseller.com", true },
- { "reviewcenter.in", true },
- { "reviewgeek.com", true },
- { "reviewinteriors.com.au", true },
- { "reviewninja.net", true },
- { "reviews.anime.my", false },
- { "revirt.global", true },
- { "revisionnotes.xyz", true },
- { "revisit.date", true },
- { "revisores.pt", true },
- { "revisoronline.ml", true },
- { "revista-programar.info", true },
- { "revistabifrontal.com", true },
- { "revistadiscover.com", true },
- { "revitalisierungs-akademie.de", true },
- { "revivalinhisword.com", true },
- { "revivalprayerfellowship.com", true },
- { "revivemoment.com", true },
- { "reviveplumbingmelbourne.com.au", true },
- { "revivingtheredeemed.org", true },
- { "revizor-online.gq", true },
- { "revizor-online.tk", true },
- { "revlect.com", true },
- { "revolutionaryaim-vienna.tk", true },
- { "revolware.com", true },
- { "revworld.org", true },
- { "rewardingexcellence.com", true },
- { "rex.tc", true },
- { "rexdf.net", true },
- { "rexfinland.fi", true },
- { "rexskz.info", true },
- { "rexxworld.com", true },
- { "reyna.cc", true },
- { "reyrubi.com", true },
- { "rezept-planer.de", true },
- { "rezio.io", true },
- { "rezka-burenie.cf", true },
- { "rezultant.ru", true },
- { "rezun.cloud", true },
- { "rfid-basis.de", true },
- { "rfid-grundlagen.de", true },
- { "rfid-schutz.de", true },
- { "rfid-schutz.org", true },
- { "rfid-sicherheit.com", true },
- { "rfxanalyst.com", true },
- { "rga.sh", true },
- { "rgbinnovation.com", true },
- { "rgbpty.com", true },
- { "rgcomportement.fr", false },
- { "rggraphics.mx", true },
- { "rgiohio.com", true },
- { "rgpdkit.io", true },
- { "rgraph.net", true },
- { "rgz.ee", true },
- { "rhaegal.me", true },
- { "rhamzeh.com", true },
- { "rhaniegghe.be", true },
- { "rhaniegghesoftwaresecurity.be", true },
- { "rhd-instruments.com", true },
- { "rhd-instruments.de", true },
- { "rhees.nl", true },
- { "rheijmans.io", true },
- { "rheijmans.nl", true },
- { "rhein-liebe.de", true },
- { "rheinneckarmetal.com", true },
- { "rhese.net", true },
- { "rhetorical.ml", false },
- { "rhetthenckel.com", true },
- { "rhevelo.com", true },
- { "rhhfoamsystems.com", true },
- { "rhinecho.com", true },
- { "rhinelander.ca", true },
- { "rhinobase.net", false },
- { "rhinoceroses.org", true },
- { "rhodenmanorcattery.co.uk", true },
- { "rhodos.fr", true },
- { "rhodri.io", true },
- { "rhowell.io", true },
- { "rhubarb.land", true },
- { "rhumblineadvisers.com", true },
- { "rhyme.com", true },
- { "rhymeswithmogul.com", true },
- { "rhymix.org", true },
- { "rhynl.io", true },
- { "riajenaka.com", true },
- { "riaki.net", true },
- { "rial.space", true },
- { "riaucybersolution.net", false },
- { "riba-lov.ga", true },
- { "ribella.net", true },
- { "ribtours.co", true },
- { "ricardo.nu", true },
- { "ricardobalk.nl", true },
- { "ricardojsanchez.com.ar", true },
- { "ricardopq.com", true },
- { "ricardotaakehb.tk", true },
- { "ricaribeiro.com.br", true },
- { "ricaud.me", true },
- { "riccardopiccioni.it", true },
- { "riccy.org", true },
- { "rice.id.au", true },
- { "riceadvice.info", true },
- { "richadams.me", true },
- { "richardbloomfield.blog", true },
- { "richardcrosby.co.uk", true },
- { "richardharpur.com", true },
- { "richardhicks.us", true },
- { "richardinesrolltop.com", true },
- { "richardjgreen.net", true },
- { "richardlangham.plumbing", true },
- { "richardlangworth.com", true },
- { "richardlevinmd.com", true },
- { "richardlugten.nl", true },
- { "richardrblocker.net", true },
- { "richardschut.nl", true },
- { "richardson.cam", true },
- { "richardson.engineering", true },
- { "richardson.pictures", true },
- { "richardson.software", true },
- { "richardson.systems", true },
- { "richardson.tw", true },
- { "richardstonerealestate.com", true },
- { "richardvd.nl", true },
- { "richardwarrender.com", true },
- { "richbutler.co.uk", true },
- { "richcat.tw", true },
- { "richecommecresus.com", true },
- { "richelelahaise.nl", true },
- { "richeyweb.com", true },
- { "richie.cloud", true },
- { "richie.fi", true },
- { "richie.network", true },
- { "richie.one", true },
- { "richie.pm", true },
- { "richieheijmans.cloud", true },
- { "richieheijmans.com", true },
- { "richieheijmans.email", true },
- { "richieheijmans.eu", true },
- { "richieheijmans.network", true },
- { "richieheijmans.nl", true },
- { "richieheijmans.one", true },
- { "richieheijmans.xyz", true },
- { "richlj.net", true },
- { "richviajero.com", true },
- { "ricketyspace.net", true },
- { "ricki-z.com", true },
- { "rickmakes.com", true },
- { "rickrongen.nl", true },
- { "rickscastles.co.uk", true },
- { "ricksfamilycarpetcleaning.com", true },
- { "rickvanderzwet.nl", true },
- { "rickweijers.nl", true },
- { "rickyromero.com", true },
- { "ricobaldegger.ch", true },
- { "ricochet.im", true },
- { "ricomp.com.br", true },
- { "ricordisiciliani.it", true },
- { "ricoydesign.com", true },
- { "ridadihouse.com", true },
- { "riddimsworld.com", true },
- { "riddler.com.ar", true },
- { "rideapart.com", true },
- { "rident-estetic.ro", true },
- { "rides-japan.jp", true },
- { "rideyourdamn.bike", true },
- { "ridgarou.no-ip.org", true },
- { "ridhaan.co", true },
- { "ridingboutique.de", true },
- { "rido.ml", true },
- { "riesenweber.id.au", true },
- { "riesheating.com", true },
- { "rievo.net", true },
- { "riffelhaus.ch", true },
- { "riffreporter.de", true },
- { "rift.pictures", true },
- { "rigabeerbike.com", true },
- { "riggosrag.com", true },
- { "righettod.eu", true },
- { "righini.ch", false },
- { "rightbrain.training", true },
- { "rightlaw.nz", true },
- { "rightmovecanada.com", true },
- { "rightnetworks.com", true },
- { "rightoncorpus.com", true },
- { "rightreview.co.uk", true },
- { "rights.ninja", true },
- { "rightsolutionplumbing.com.au", true },
- { "rightstuff.link", false },
- { "righttobuy.gov.uk", true },
- { "rigintegrity.com", true },
- { "rigsalesaustralia.com", true },
- { "riho.moe", true },
- { "riight.online", true },
- { "riimihaku.fi", true },
- { "rijk-catering.nl", false },
- { "rijschoolrichardschut.nl", true },
- { "rijschoolsafetyfirst.nl", true },
- { "rijsinkunst.nl", true },
- { "rik.onl", true },
- { "riklewis.com", true },
- { "riku.pw", true },
- { "rikunori.com.tw", true },
- { "rikuras.cl", true },
- { "rile5.com", true },
- { "rilish.cf", true },
- { "rimax.vn", true },
- { "rimcountrymuseum.org", true },
- { "rime.com.hr", true },
- { "rimeto.io", true },
- { "rimkereso.hu", true },
- { "rimo.site", true },
- { "rimorrecherche.nl", true },
- { "ringingliberty.com", true },
- { "ringjewellery.co.uk", true },
- { "ringofglory.gq", true },
- { "ringtune.ir", true },
- { "rinkhill.com", true },
- { "rinsepimp.com", true },
- { "rinvex.com", true },
- { "rinzler.io", true },
- { "rio-weimar.de", true },
- { "riograndesurgeons.com", true },
- { "rioxmarketing.pt", true },
- { "rioxmarketing.us", true },
- { "rip-sport.cz", true },
- { "ripa.io", true },
- { "ripaton.fr", true },
- { "ripcorddesign.com", true },
- { "ripcordsandbox.com", true },
- { "ripley.red", true },
- { "ripmixmake.org", true },
- { "ripp-it.com", true },
- { "riproduzionichiavi.it", true },
- { "riptidetech.io", true },
- { "ripuree.com", true },
- { "ris-bad-wurzach.de", true },
- { "ris.fi", true },
- { "risada.nl", true },
- { "risaphuketproperty.com", false },
- { "riscascape.net", true },
- { "rischard.org", true },
- { "rise-technologies.com", true },
- { "rise.global", true },
- { "riselab.com.ua", true },
- { "riseup.net", true },
- { "rishabh.me", true },
- { "rishikeshyoga.in", true },
- { "risiinfo.com", true },
- { "risoscotti.es", true },
- { "risounokareshi.com", true },
- { "risparmiare.info", true },
- { "ristioja.ee", true },
- { "ristisanat.fi", true },
- { "ristoarea.it", true },
- { "ristorantefattoamano.it", true },
- { "ristorantelittleitaly.com", true },
- { "ristorantesamarkand.it", true },
- { "ristrutturazioneappartamenti.milano.it", true },
- { "ristrutturazioneappartamento.roma.it", true },
- { "ristrutturazioniappartamentinapoli.it", true },
- { "risxx.com", true },
- { "rit.space", true },
- { "ritel.nl", true },
- { "ritirocalcinacci.viterbo.it", true },
- { "rittau.biz", true },
- { "rittau.org", true },
- { "rivaforum.de", true },
- { "rivalsa.cn", true },
- { "rivastation.de", true },
- { "riverbanktearooms.co.uk", true },
- { "riverbendroofingnd.com", true },
- { "riverford.co.uk", true },
- { "rivermist.com.au", true },
- { "riveroacessorios.com", true },
- { "riveroflifegifts.com", true },
- { "riverotravel.cl", true },
- { "riverridgecc.com", true },
- { "rivers.gov", true },
- { "riversidebaptistchurch.net", true },
- { "riversideradio.nl", true },
- { "riversmeet.co.uk", true },
- { "riverviewurologic.com", true },
- { "riverweb.gr", true },
- { "rivierasaints.ch", false },
- { "riviere.pro", true },
- { "rivingtongreenwich.co.uk", true },
- { "rivoflor.it", true },
- { "rivus.net", true },
- { "riwick.com", false },
- { "rix.ninja", true },
- { "riyono.com", true },
- { "rizarus.com", true },
- { "rizospastis.gr", true },
- { "rj-onderneemt.nl", true },
- { "rjan.nl", true },
- { "rjrplay.com", true },
- { "rkbegraafplaats.com", true },
- { "rkfp.cz", true },
- { "rkmns.edu.in", true },
- { "rlahaise.nl", true },
- { "rlalique.com", true },
- { "rld.org", true },
- { "rlds.ch", false },
- { "rleeden.servehttp.com", true },
- { "rleh.de", true },
- { "rlove.org", true },
- { "rm-it.de", true },
- { "rmb.li", true },
- { "rmc.edu", true },
- { "rmcbs.de", true },
- { "rmdscreen.com", true },
- { "rmeuropean.com", true },
- { "rmm-i.com", true },
- { "rmmanfredi.com", true },
- { "rmrig.org", true },
- { "rmstudio.tw", true },
- { "rmsupply.nl", true },
- { "rnag.ie", true },
- { "rnbjunk.com", true },
- { "rngmeme.com", true },
- { "rnoax.com", true },
- { "ro.search.yahoo.com", false },
- { "roach.nz", true },
- { "roachesofficial.com", true },
- { "roaddoc.de", true },
- { "roadguard.nl", false },
- { "roadtochina.tk", true },
- { "roadtripusa.tk", true },
- { "roalogic.com", true },
- { "roamfreun.tk", true },
- { "roams.es", true },
- { "roams.mx", true },
- { "roar.com.br", true },
- { "rob006.net", true },
- { "robandjanine.com", true },
- { "robbiecrash.me", true },
- { "robbinsgaragedoorwenatchee.com", true },
- { "robbysmets.be", true },
- { "robdavidson.network", true },
- { "robert-flynn.de", true },
- { "robert-reisemobil.de", true },
- { "robertattfield.com", true },
- { "robertbln.com", true },
- { "robertglastra.com", true },
- { "roberthurlbut.com", true },
- { "robertkotlermd.com", true },
- { "robertkrueger.de", true },
- { "robertlysik.com", true },
- { "robertnankervis.com", true },
- { "robertnemec.com", true },
- { "robertoentringer.com", false },
- { "robertof.ovh", true },
- { "robertopazeller.ch", true },
- { "robertoullan.tk", true },
- { "robertreiser.photography", true },
- { "robertrijnders.nl", true },
- { "robertsmits.be", false },
- { "robgorman.ie", true },
- { "robhorstmanshof.nl", true },
- { "robicue.com", true },
- { "robigalia.org", false },
- { "robin.co.kr", true },
- { "robin.info", true },
- { "robinevandenbos.nl", true },
- { "robinflikkema.nl", true },
- { "robinhoodbingo.com", true },
- { "robinlinden.eu", true },
- { "robinsonyu.com", true },
- { "robinwill.de", true },
- { "robinwinslow.uk", true },
- { "robison.pro", true },
- { "robisonweb.net", true },
- { "robjager-fotografie.nl", true },
- { "robocop.no", true },
- { "robodeal.cc", true },
- { "robodeidentidad.gov", true },
- { "robohash.org", true },
- { "robokits.co.in", true },
- { "robot.car", true },
- { "robotattack.org", true },
- { "robotenmihogar.com", true },
- { "robotkvarnen.se", true },
- { "robots-ju.ch", true },
- { "robotsbigdata.com", true },
- { "robotstxt.com", true },
- { "robpol86.com", true },
- { "robspc.repair", true },
- { "robspeed.rocks", true },
- { "robsutter.com", true },
- { "robtex.com", true },
- { "robu.in", true },
- { "robud.info", true },
- { "robustac.com", true },
- { "rochakhand-knitcraft.com.np", true },
- { "rochesterglobal.com", true },
- { "rocis.gov", true },
- { "rocka.me", true },
- { "rockagogo.com", true },
- { "rockcanyonbank.com", true },
- { "rockefellergroup.info", true },
- { "rockernj.com", true },
- { "rocket-resume.com", true },
- { "rocketevents.com.au", true },
- { "rocketmill.co.uk", true },
- { "rocketr.net", true },
- { "rocketsandtutus.com", true },
- { "rockfax.com", true },
- { "rockfordtow.com", true },
- { "rockfordtowing.com", true },
- { "rockinronniescastles.co.uk", true },
- { "rockitinflatables.co.uk", true },
- { "rocknwater.com", true },
- { "rockpesado.com.br", true },
- { "rockslideengineering.com", true },
- { "rockthebabybump.com", true },
- { "rockymountainspice.com", true },
- { "rockypest.com.au", true },
- { "rocmartialartsacademy.com", true },
- { "rocsole.com", true },
- { "rocssti.net", true },
- { "rod.run", false },
- { "rodchapman.com", true },
- { "rodelstein.eu", true },
- { "rodeobull.biz", true },
- { "rodeohire.com", true },
- { "rodeoimport.com", true },
- { "rodeosales.co.uk", true },
- { "rodest.net", true },
- { "rodevlaggen.nl", true },
- { "rodichi.net", true },
- { "rodinka.tk", true },
- { "rodinnebyvanie.eu", true },
- { "rodkidesings.com", true },
- { "rodolfo.gs", true },
- { "rodomonte.org", true },
- { "rodrigoacevedo.com.uy", true },
- { "rodrigocarvalho.blog.br", true },
- { "rody-design.com", true },
- { "rodykossen.com", true },
- { "roeckx.be", true },
- { "roed.gg", true },
- { "roeden.dk", true },
- { "roeitijd.nl", false },
- { "roelenscitynews.ml", true },
- { "roelhollander.eu", true },
- { "roelof.io", true },
- { "roelsworld.eu", true },
- { "roemhild.de", true },
- { "roerstaafjes.nl", true },
- { "rofl.com.ua", true },
- { "rogagym.com", true },
- { "rogard.fr", true },
- { "rogerhub.com", true },
- { "rogerkunz.ch", true },
- { "rogerriendeau.ca", true },
- { "rogersaam.ch", false },
- { "rogersnowing.cn", true },
- { "rogersremovals.co.uk", true },
- { "rogersvilleumc.org", true },
- { "rognhaugen.no", true },
- { "rogoff.xyz", true },
- { "roguefortgame.com", true },
- { "roguenation.space", true },
- { "roguenetworks.me", true },
- { "roguerocket.com", true },
- { "roguesignal.net", true },
- { "roh.one", true },
- { "rohde.de", true },
- { "rohedaten.de", true },
- { "rohitagr.com", true },
- { "rohlik.cz", true },
- { "rohrle.com", true },
- { "roi.ovh", true },
- { "rointe.online", true },
- { "roircop.info", true },
- { "roiscroll.com", true },
- { "roisu.org", true },
- { "roka9.de", true },
- { "rokass.nl", true },
- { "rokki.ch", true },
- { "roko-foto.de", true },
- { "rokort.dk", true },
- { "rokudenashi.de", true },
- { "roland.io", true },
- { "rolandlips.nl", true },
- { "rolandoredi.com", true },
- { "rolandozarate.tk", true },
- { "rolandreed.cn", true },
- { "rolandszabo.com", true },
- { "rolandvanipenburg.com", true },
- { "rolecontj.com", true },
- { "roleplaybdsm.com", true },
- { "roll-bakery.com.tw", true },
- { "rolleyes.org", true },
- { "rollforadventure.com.au", true },
- { "rollingbarge.com", true },
- { "rolob.io", true },
- { "rolodato.com", true },
- { "roma-servizi.it", true },
- { "romab.com", true },
- { "romacoffee.co.nz", true },
- { "romail.ml", true },
- { "romain-arias.fr", true },
- { "romaindepeigne.fr", true },
- { "romainlapoux.com", true },
- { "romainlapoux.fr", true },
- { "roman-pavlik.cz", true },
- { "roman.systems", true },
- { "romancloud.com", true },
- { "romancoinsforsale.org", false },
- { "romande-entretien.ch", true },
- { "romanian.cam", true },
- { "romanmichel.de", true },
- { "romanpavlodar.kz", true },
- { "romantelychko.com", true },
- { "romantica-hotel.de", true },
- { "romanticschemer.com", true },
- { "romanticsexshopguatemala.com", true },
- { "romanticvillas.com.au", false },
- { "romapa.com", true },
- { "romarin.es", true },
- { "romaservicegroup.it", true },
- { "romatrip.it", true },
- { "rome.dating", true },
- { "rommelhuntermusic.tk", true },
- { "rommelwood.de", true },
- { "romo-holidays.de", true },
- { "romo-holidays.dk", true },
- { "romsey.org", true },
- { "romtex.co.uk", true },
- { "romun.net", true },
- { "ronan-hello.fr", true },
- { "ronbyrne.com", true },
- { "roncallijets.net", true },
- { "rondommen.nl", true },
- { "rondouin.fr", true },
- { "rondreis-amerika.be", true },
- { "rondreis-schotland.nl", true },
- { "ronem.com.au", true },
- { "roninf.ch", true },
- { "roninitconsulting.com", true },
- { "ronniegane.kiwi", true },
- { "ronnylindner.de", true },
- { "ronomon.com", true },
- { "ronsguideservice.com", true },
- { "ronvil.com", true },
- { "roodfruit.studio", true },
- { "roodhealth.co.uk", true },
- { "roof.ai", false },
- { "roofconsultants-inc.com", true },
- { "roofer.cf", true },
- { "roofingandconstructionllc.com", true },
- { "roofingomaha.com", true },
- { "roofsandbasements.com", true },
- { "rook-playz.net", true },
- { "rookiehpc.com", true },
- { "rookvrij.nl", true },
- { "room-composite.com", true },
- { "room208.org", true },
- { "room3b.eu", true },
- { "roombase.nl", true },
- { "roomee.tk", true },
- { "roomhub.jp", true },
- { "roomkey.com", true },
- { "roomlab.cl", true },
- { "roomsatevents.eu", true },
- { "rooneytours.nl", true },
- { "roopakv.com", true },
- { "roopakvenkatakrishnan.com", true },
- { "roosabels.nl", false },
- { "root-books.gq", true },
- { "root-books.ml", true },
- { "root-couture.de", true },
- { "root-space.eu", true },
- { "root.bg", true },
- { "root.cz", true },
- { "root.eu.org", true },
- { "root.vg", true },
- { "rootcamp.net", true },
- { "rootcommand.com", true },
- { "rootear.com", true },
- { "rootedlifemontessori.com", true },
- { "rootetsy.com", true },
- { "rootie.de", true },
- { "rootkea.me", true },
- { "rootlair.com", true },
- { "rootonline.de", true },
- { "rootpigeon.com", true },
- { "roots-example-project.com", true },
- { "roots.io", true },
- { "rootsandrain.com", true },
- { "rootscope.co.uk", false },
- { "rootsskininstitute.com", true },
- { "rootstation.de", true },
- { "rootswitch.com", false },
- { "rootusers.com", true },
- { "rootze.com", true },
- { "ropd.info", true },
- { "rory.best", true },
- { "roryneville.com", true },
- { "rosa-spain.tk", true },
- { "rosabellas.co.uk", true },
- { "rosahijab.com", true },
- { "rosalindgreenllc.com", true },
- { "rosalindturner.co.uk", true },
- { "rosaquest.ru", true },
- { "rosbass.ru", true },
- { "rosbiznes.tk", true },
- { "rose-prism.org", true },
- { "rosebankplumber24-7.co.za", true },
- { "roseberyvenues.co.uk", true },
- { "rosecrance.org", true },
- { "rosehosting.reviews", true },
- { "roseitsolutions.co.uk", true },
- { "roseitsolutions.uk", true },
- { "roseliere.ch", false },
- { "roseliere.com", false },
- { "roseluna.com", true },
- { "rosenheim-wladiwostok.de", true },
- { "rosenheimsingles.de", true },
- { "rosenkeller.org", true },
- { "roseon.net", true },
- { "roseparkhouse.com", true },
- { "rosesciences.com", true },
- { "rosevillefacialplasticsurgery.com", true },
- { "roshhashanahfun.com", true },
- { "rosi-royal.com", true },
- { "rosiervandenbosch.nl", true },
- { "roslynpad.net", true },
- { "rosnertexte.at", true },
- { "rosrabota.tk", true },
- { "rosset.me", true },
- { "rosset.net", true },
- { "rossfrance.com", true },
- { "rossiworld.com", true },
- { "rossmacphee.com", true },
- { "rossome.org", true },
- { "rosstroj-balashiha.ml", true },
- { "rosswilson.co.uk", true },
- { "rostclub.ro", true },
- { "rostov-avia.ru", true },
- { "rot47.net", true },
- { "rotamap.net", true },
- { "rotaractclubtucuman.tk", true },
- { "rotate4all.com", true },
- { "rotek.at", true },
- { "roten.email", true },
- { "rothbruederlein.tk", true },
- { "rothe.io", true },
- { "rothkranz.net", true },
- { "rothwellgornthomes.com", true },
- { "rotkreuzshop.de", true },
- { "rotol.me", true },
- { "rotring.com", true },
- { "rottamazioni.it", true },
- { "rottweil-hilft.de", true },
- { "rotunneling.net", true },
- { "rouair.com", true },
- { "rougechocolat.fr", true },
- { "roughcopy.com.au", true },
- { "roughgrain.com", true },
- { "roughtime.se", true },
- { "roulettecarnival.com", true },
- { "roulinfo.ch", false },
- { "roulons-autrement.com", true },
- { "rounda.it", true },
- { "roundaboutweb.net", true },
- { "roundcube.mayfirst.org", false },
- { "roundrock-locksmith.com", true },
- { "roundtablekzn.co.za", true },
- { "roundtheme.com", false },
- { "roundtoprealestate.com", true },
- { "roussos.cc", true },
- { "roussosmanos.gr", true },
- { "route-wird-berechnet.de", true },
- { "routerclub.ru", true },
- { "roverglobal.ga", true },
- { "rovota.com", true },
- { "rowancasting.com", true },
- { "rowancasting.ie", true },
- { "rowancounty911.com", true },
- { "rowancounty911.org", true },
- { "rowancountyairport.com", true },
- { "rowancountync.gov", true },
- { "rowankaag.nl", true },
- { "rowanpubliclibrary.com", true },
- { "rowansheriff.com", true },
- { "rowansheriff.org", true },
- { "rowantransit.com", true },
- { "rowantransit.org", true },
- { "rowlog.com", true },
- { "roxburytech.tk", true },
- { "roxiesbouncycastlehire.co.uk", true },
- { "roxtri.cz", true },
- { "roy-buehring.de", true },
- { "roya-holding.com", true },
- { "royal-rangers.de", true },
- { "royal818.com", true },
- { "royal833.com", true },
- { "royal88.com", true },
- { "royal929.com", true },
- { "royalacademy.org.uk", true },
- { "royalasianescorts.co.uk", true },
- { "royalaubar.com", true },
- { "royalbluewa3.cc", true },
- { "royalcavaliers.tk", true },
- { "royaleagletourism.com", true },
- { "royalfitnesschennai.in", true },
- { "royalkitchensandfurniture.co.ug", true },
- { "royalmarinesassociation.org.uk", true },
- { "royalmech.tk", true },
- { "royalnissanparts.com", true },
- { "royaloz.ma", true },
- { "royalpainters.co", true },
- { "royalpratapniwas.com", true },
- { "royalrangers.fi", true },
- { "royalstylefit.com", true },
- { "royaltube.net", true },
- { "royalvortex.co", true },
- { "royaume-smoke.com", true },
- { "royceandsteph.com", true },
- { "roycewilliams.net", true },
- { "roygerritse.nl", true },
- { "roystowingrockford.com", true },
- { "royveenendaal.com", true },
- { "rozar.eu", true },
- { "rozhodce.cz", true },
- { "rpadonline.com", true },
- { "rpadovani.com", false },
- { "rpattisonroofing.co.uk", true },
- { "rpgcampaign.website", true },
- { "rpgmaker.es", true },
- { "rpherbig.com", true },
- { "rphyncice.cz", true },
- { "rpine.net", true },
- { "rpmdrivingschool.com.au", true },
- { "rpoplus.nl", true },
- { "rps-auto.com", true },
- { "rpus.co", true },
- { "rpy.xyz", true },
- { "rq-labo.jp", true },
- { "rraesthetics.com", true },
- { "rrailto.com", true },
- { "rrbt.eu", true },
- { "rrbt.net", true },
- { "rrbts.org", true },
- { "rrdesignsuisse.com", false },
- { "rrg-partner.ch", false },
- { "rrssww.space", true },
- { "rrudnik.com", true },
- { "rrvmz.cf", true },
- { "rrwolfe.com", true },
- { "rs-aktuell.net", true },
- { "rs-maschinenverleih.de", true },
- { "rs-solution.ch", true },
- { "rs.wiki", true },
- { "rs200.org", true },
- { "rs2ap33.com", true },
- { "rsa-erp.com", true },
- { "rsanahuano.com", true },
- { "rsap.ca", true },
- { "rsarchive.net", true },
- { "rsarchive.org", true },
- { "rscturmoil.com", true },
- { "rsdisedezzari.it", true },
- { "rsec.kr", true },
- { "rsingermd.com", true },
- { "rsl.gd", true },
- { "rslnd.com", true },
- { "rsmith.io", true },
- { "rsp-blogs.de", true },
- { "rsquare.nl", true },
- { "rsridentassist.com", true },
- { "rss.sh", false },
- { "rssfeedblast.com", true },
- { "rssfeedonline.tk", true },
- { "rssl.me", true },
- { "rssr.se", true },
- { "rsttraining.co.uk", true },
- { "rswebsols.com", true },
- { "rswow.ru", true },
- { "rsync.eu", false },
- { "rt22.ch", true },
- { "rtcx.net", true },
- { "rte.mobi", true },
- { "rte.radio", true },
- { "rte1.ie", true },
- { "rteaertel.ie", true },
- { "rtechservices.io", true },
- { "rteguide.ie", true },
- { "rteinternational.ie", true },
- { "rtejr.ie", true },
- { "rtenews.eu", true },
- { "rteone.ie", true },
- { "rteplayer.co.uk", true },
- { "rteplayer.com", true },
- { "rteplayer.ie", true },
- { "rteplayer.org", true },
- { "rtesport.eu", true },
- { "rteworld.com", true },
- { "rtfch.ru", true },
- { "rtgnews.cf", true },
- { "rtho.me", true },
- { "rthsoftware.cn", false },
- { "rtmoran.org", true },
- { "rtrappman.com", true },
- { "rtsak.com", true },
- { "rtsr.ch", false },
- { "rttvip.com", true },
- { "rttvvip.com", true },
- { "rtveen.nl", true },
- { "rtwcourse.com", true },
- { "ru-music.com", false },
- { "ru-sprachstudio.ch", true },
- { "ru.search.yahoo.com", false },
- { "ruaneattorneys.com", true },
- { "ruanmi.de", true },
- { "rubbaduckee.tk", true },
- { "rubberfurs.org", true },
- { "rubberlegscastles.co.uk", true },
- { "rubbermaidoutlet.com", true },
- { "rubbleremovalhillcrest.co.za", true },
- { "rubbleremovalsbenoni.co.za", true },
- { "rubblerock.com", true },
- { "rubenbaer.ch", true },
- { "rubenbarbero.com", true },
- { "rubenbrito.net", true },
- { "rubenkruisselbrink.nl", true },
- { "rubenmamo.com", true },
- { "rubenpeeters.ml", true },
- { "rubenroy.com", true },
- { "rubenruiz.org", true },
- { "rubens.cloud", true },
- { "rubia.ca", true },
- { "rubidium.ml", true },
- { "rubixstudios.com.au", true },
- { "rublacklist.net", true },
- { "ruby-auf-schienen.de", true },
- { "rubyist.today", true },
- { "rubylabs.am", true },
- { "rubymartin.com.au", true },
- { "rubymediagroup.com", true },
- { "rubyonline.tk", true },
- { "rubyquincunx.com", true },
- { "rubyquincunx.org", true },
- { "rubytune.com", false },
- { "ruchka-mashinka.gq", true },
- { "rucksack-rauf-und-weg.de", true },
- { "ruckzuck-privatpatient.de", true },
- { "ruconsole.com", true },
- { "rud.is", true },
- { "rudating.tk", true },
- { "rudd-o.com", true },
- { "ruddick.org.uk", true },
- { "ruddick.uk", true },
- { "rudewiki.com", true },
- { "rudloff.pro", true },
- { "rudnikas.com", true },
- { "rudolph.life", true },
- { "rudolphmarketing.com", true },
- { "rudrastyh.com", true },
- { "rue-de-la-vieille.fr", true },
- { "ruediger-voigt.eu", true },
- { "ruedigervoigt.de", true },
- { "rueduverre.com", true },
- { "rueegger.me", true },
- { "rueg.eu", true },
- { "ruerte.net", true },
- { "ruexpert.cf", true },
- { "ruf888.com", true },
- { "rufartabs.ml", true },
- { "ruffbeatz.com", true },
- { "ruffinstorage.com", true },
- { "ruffnecks.tk", true },
- { "rugcleaninglondon.co.uk", true },
- { "rugeley-vets.co.uk", true },
- { "rugk.dedyn.io", true },
- { "rugsandmore.co.nz", true },
- { "ruh-veit.de", true },
- { "ruha.co.in", true },
- { "ruhnke.cloud", true },
- { "ruhproject.kz", true },
- { "ruhrmobil-e.de", true },
- { "ruhrnalist.de", true },
- { "ruicore.cn", true },
- { "ruiming.me", false },
- { "ruin.one", true },
- { "ruitershoponline.nl", true },
- { "ruk.ca", true },
- { "rukminicarrentals.com", true },
- { "ruknguk.tk", true },
- { "rulu.co", true },
- { "rulu.tv", true },
- { "rulutv.com", true },
- { "rumahminimalisoi.com", true },
- { "rumartinez.es", true },
- { "rumbasguayaquil.com", true },
- { "rumlager.de", true },
- { "rummage4property.co.uk", true },
- { "rummey.co.uk", true },
- { "rumplesinflatables.co.uk", true },
- { "rumtaste.de", true },
- { "run-it-direct.co.uk", true },
- { "run4gameplay.net", true },
- { "runagain.ch", false },
- { "runame.ml", true },
- { "rundesign.it", true },
- { "runebet.com", true },
- { "runefake.com", true },
- { "runescape.wiki", true },
- { "runetracker.org", true },
- { "runfitcoaching.com", true },
- { "rungutan.com", true },
- { "runicspells.com", true },
- { "runklesecurity.com", true },
- { "runner.az", true },
- { "runningrabb.it", true },
- { "runreport.fr", true },
- { "runrocknroll.com", true },
- { "runvs.io", true },
- { "ruobiyi.com", true },
- { "ruobr.ru", true },
- { "ruoskachile.tk", true },
- { "rupeevest.com", true },
- { "rupostel.com", true },
- { "ruquay.com", true },
- { "ruralink.com.ar", true },
- { "ruralsoba.com", true },
- { "ruralsuppliesdirect.co.uk", true },
- { "ruri.io", true },
- { "rusdigisolutions.com", true },
- { "rusexmany.ml", true },
- { "rushball.net", true },
- { "rushiiworks.com", true },
- { "rushpoppershop.co.uk", true },
- { "rushter.com", true },
- { "rushyo.com", true },
- { "rusi-ns.ca", true },
- { "ruska-modra.cz", true },
- { "ruskamodra.cz", true },
- { "rusmolotok.ru", true },
- { "russelljohn.net", true },
- { "russellupevents.co.uk", true },
- { "russia-rp.tk", true },
- { "russia.dating", true },
- { "russia.wtf", true },
- { "russiaeconomy.org", true },
- { "russiahunting.tk", true },
- { "russian-page.tk", true },
- { "russianbearsmotorsport.tk", true },
- { "russianbristol.tk", true },
- { "russianescortsmumbai.com", false },
- { "russianpunkrock.tk", true },
- { "russianrandom.com", true },
- { "russianrandom.ru", true },
- { "russstudios.com", true },
- { "russt.me", true },
- { "rust-lang.codes", true },
- { "rust.cf", true },
- { "rust.mn", true },
- { "rustable.com", true },
- { "rustfu.rs", true },
- { "rusticpathways.com.au", true },
- { "rustikalwallis.ch", true },
- { "rustls.com", true },
- { "rustls.org", true },
- { "rustpedia.net", true },
- { "rustyrambles.com", true },
- { "rusxakep.com", true },
- { "rutgerschimmel.nl", true },
- { "ruthbarrettmusic.com", true },
- { "ruthbellgrahammemorial.org", true },
- { "ruthmontenegro.com", false },
- { "rutiger.com", true },
- { "rutika.ru", true },
- { "rutracker.appspot.com", true },
- { "rutten.me", false },
- { "ruudkoot.nl", true },
- { "ruurdboomsma.nl", true },
- { "ruwhof.net", true },
- { "ruya.com", true },
- { "ruyatabirleri.com", true },
- { "ruzaevka.tk", true },
- { "ruzzll.com", true },
- { "rv-jpshop.com", true },
- { "rva-asbestgroep.nl", true },
- { "rvdbict.nl", true },
- { "rvender.cz", true },
- { "rvfit.dk", true },
- { "rvnoel.net", false },
- { "rvoigt.eu", true },
- { "rvpoweroutlet.com", true },
- { "rvsa2bevestigingen.nl", true },
- { "rvsa4bevestigingen.nl", true },
- { "rvsbevestigingen.nl", true },
- { "rvsuitlaatdelen.nl", true },
- { "rw-invest.com", true },
- { "rw.search.yahoo.com", false },
- { "rw2.de", true },
- { "rwky.net", true },
- { "rws-vertriebsportal.de", true },
- { "rwx.ovh", true },
- { "rwx.work", true },
- { "rxbn.de", true },
- { "rxbusiness.com", true },
- { "rxguide.nl", true },
- { "rxight.com", true },
- { "rxyz.rocks", true },
- { "ryabinushka.tk", true },
- { "ryan-gehring.com", true },
- { "ryan-goldstein.com", true },
- { "ryan.cafe", true },
- { "ryanbritton.com", true },
- { "ryanfamily.net.au", true },
- { "ryanhowell.io", true },
- { "ryankearney.com", false },
- { "ryanmcdonough.co.uk", false },
- { "ryanparman.com", true },
- { "ryansmithphotography.com", true },
- { "ryanteck.uk", true },
- { "ryazan-region.ru", true },
- { "rylandgoldman.com", true },
- { "rynekpierwotny.pl", true },
- { "rynkebo.dk", true },
- { "ryois.me", true },
- { "rys.pw", true },
- { "rythm.es", true },
- { "ryu22e.org", true },
- { "ryuanerin.kr", true },
- { "ryuu.es", true },
- { "ryzhov.me", true },
- { "rzegocki.pl", true },
- { "rzentarzewski.net", true },
- { "s-c.se", true },
- { "s-cubed.net", true },
- { "s-gong.com", true },
- { "s-huset.dk", true },
- { "s-ip-media.de", true },
- { "s-kanbanya.com", true },
- { "s-mainte.com", true },
- { "s-pegasus.com", true },
- { "s-pro.io", true },
- { "s-s-paint.com", true },
- { "s-u.pw", true },
- { "s-yuz.com", true },
- { "s007.co", true },
- { "s10y.eu", true },
- { "s1128.com", true },
- { "s13d.fr", true },
- { "s2i.ch", true },
- { "s2member.com", true },
- { "s2t.net", true },
- { "s36533.com", true },
- { "s36594.com", true },
- { "s3cur3.it", true },
- { "s3dservices.io", true },
- { "s3gfault.com", true },
- { "s3robertomarini.it", true },
- { "s404.de", true },
- { "s44.eu", true },
- { "s4db.net", true },
- { "s4q.me", true },
- { "s4tips.com", true },
- { "s4ur0n.com", true },
- { "s550.cc", true },
- { "s551.cc", true },
- { "s552.cc", true },
- { "s553.cc", true },
- { "s554.cc", true },
- { "s556.cc", true },
- { "s557.cc", true },
- { "s558.cc", true },
- { "s559.cc", true },
- { "s64.cz", true },
- { "s6o.de", true },
- { "s88.com", true },
- { "s8a.us", true },
- { "s92.cloud", true },
- { "s92.io", true },
- { "s92.me", true },
- { "s95.de", true },
- { "sa-mp.ro", true },
- { "sa.net", true },
- { "sa68.cc", true },
- { "sa88.cc", true },
- { "saabpartsdistribution.com", true },
- { "saalfrank.at", true },
- { "saalfrank.de", true },
- { "saamhorigheidsfonds.nl", false },
- { "saas.de", true },
- { "saatchiart.com", true },
- { "saathi.asia", true },
- { "saba-piserver.info", true },
- { "sabbat-wildfire.tk", true },
- { "sabbottlabs.com", true },
- { "sabedinovski.tk", true },
- { "saberhortifruti.com.br", true },
- { "sabghijewelers.com", true },
- { "sabians.tk", true },
- { "sabine-forschbach.de", true },
- { "sabkappers.nl", true },
- { "sabrinajoias.com.br", true },
- { "sabrinajoiasprontaentrega.com.br", true },
- { "sabworldtricks.tk", true },
- { "sac.moe", true },
- { "sacadura.pt", true },
- { "sacaentradas.com", true },
- { "sacaleches.net", true },
- { "saccani.net", true },
- { "sachk.com", true },
- { "sachse.info", true },
- { "sacians.tk", true },
- { "sackmesser.ch", true },
- { "saclier.at", true },
- { "sacprincesse.com", true },
- { "sacred-knights.net", true },
- { "sacredheart-cliftonheights.net", true },
- { "sacrome.com", true },
- { "sad-berezka.ru", true },
- { "sadbox.org", true },
- { "sadbox.xyz", true },
- { "sadeghian.us", true },
- { "sadev.co.za", true },
- { "sadhana.cz", true },
- { "sadhawkict.org", true },
- { "sadiejewellery.co.uk", true },
- { "sadkodesign.com.ua", true },
- { "sadmansh.com", true },
- { "sadou.kyoto.jp", true },
- { "sadoun.com", true },
- { "sadsu.com", true },
- { "saechsischer-christstollen.shop", true },
- { "saeder-krupp.de", true },
- { "saengsook.com", true },
- { "saengsuk.com", true },
- { "saevor.com", true },
- { "saf.earth", true },
- { "safar.sk", true },
- { "safara.host", true },
- { "safarimasaimara.com", true },
- { "safaritenten.nl", true },
- { "safc.tk", true },
- { "safcstore.com", true },
- { "safearth.training", true },
- { "safebaseflorida.com", true },
- { "safebasements.com", true },
- { "safebasementsnorthdakota.com", true },
- { "safebasementsofindiana.com", true },
- { "safebuyerscheme.co.uk", true },
- { "safecar.gov", false },
- { "safefreehost.gq", true },
- { "safegold.ca", true },
- { "safegroup.pl", true },
- { "safeguardcommerce.com", true },
- { "safeguardhosting.ca", true },
- { "safehero.com", true },
- { "safeitup.se", true },
- { "safejourney.education", true },
- { "safematix.com", true },
- { "safenetwork.it", true },
- { "safeocs.gov", true },
- { "safercar.gov", true },
- { "saferequest.net", true },
- { "saferproduct.gov", true },
- { "saferproducts.gov", true },
- { "safersurfing.eu", false },
- { "safertruck.gov", true },
- { "safescan.com", true },
- { "safesoundcounselingllc.com", true },
- { "safestore.io", true },
- { "safethishome.com", true },
- { "safetycloud.me", true },
- { "safetymp3.com", true },
- { "safetynames.com", true },
- { "safetynetwork.me", true },
- { "safetyrange.com", true },
- { "safetysite.tips", true },
- { "safeui.com", false },
- { "safevault.org", true },
- { "safewaysecurityscreens.com.au", true },
- { "safire.ac.za", true },
- { "sagaenterprizes.com", true },
- { "sagagardencentre.co.uk", true },
- { "sagan.tk", true },
- { "sagargandecha.com.au", false },
- { "sagedocumentmanager.com", true },
- { "sagenesykkel.com", true },
- { "sagerus.com", true },
- { "saggiocc.com", true },
- { "sagitta.hr", true },
- { "saglikhaber.tk", true },
- { "sagnette.xyz", true },
- { "sahajbooks.com", true },
- { "sahar.io", true },
- { "saharacloud.com", true },
- { "saharmassachi.com", true },
- { "sahb.dk", true },
- { "sahibinden.com", true },
- { "sahkotyot.eu", true },
- { "said.id", true },
- { "said.it", true },
- { "said.my.id", true },
- { "saier.me", true },
- { "saifonvillas.com", true },
- { "saifoundation.in", true },
- { "saigaocy.moe", true },
- { "saigonflowers.com", true },
- { "saikarra.com", true },
- { "saikou.moe", true },
- { "saikouji.tokushima.jp", true },
- { "sail-nyc.com", true },
- { "sailanitours.com", true },
- { "sailing-yacht.club", true },
- { "sailingonward.com", true },
- { "sailormoonevents.org", true },
- { "sailormoongallery.org", true },
- { "sailormoonlibrary.org", true },
- { "sailwiz.com", true },
- { "saimatravels.in", true },
- { "saimoe.moe", true },
- { "saimoe.org", true },
- { "sainetworks.net", true },
- { "sainformatica.com.es", true },
- { "sainshand.tk", true },
- { "saint-bernard-gouesch.fr", true },
- { "saint-cyril.com", true },
- { "saint-peterburg.tk", true },
- { "saint-petersburg.cf", true },
- { "saint-petersburg.gq", true },
- { "saint-petersburg.ml", true },
- { "saintaardvarkthecarpeted.com", true },
- { "saintanne.net", true },
- { "saintanthonylakin.org", true },
- { "saintanthonyscorner.com", true },
- { "sainteugenechurch.net", true },
- { "sainteugeneschurch.com", true },
- { "saintfrancescabrini.net", true },
- { "saintfrancisdesales.net", true },
- { "sainth.de", true },
- { "sainthedwig-saintmary.org", true },
- { "sainthelena-centersquare.net", true },
- { "sainthelenas.org", true },
- { "saintisidorecyo.com", true },
- { "saintjamestheapostle.org", true },
- { "saintjohn-bocaraton.com", true },
- { "saintjosephschurch.net", true },
- { "saintleochurch.net", true },
- { "saintmarkchurch.net", true },
- { "saintmaryna.com", true },
- { "saintmaryscathedral-trenton.org", true },
- { "saintpatrick-norristown.net", true },
- { "saintpeterchurch.net", true },
- { "saintpetersburg.cf", true },
- { "saintpetersburg.ga", true },
- { "saintpetersburg.gq", true },
- { "saintphilipneri.org", true },
- { "saintpius.net", true },
- { "saintpolycarp.org", true },
- { "sainzderozas.com", true },
- { "saipariwar.com", true },
- { "saiputra.com", true },
- { "sairadio.net", true },
- { "saisecure.net", true },
- { "sait.at", true },
- { "saitapovan.com", true },
- { "saito-koken.co.jp", true },
- { "saitrance.com", true },
- { "saitv.org", true },
- { "saityvkaluge.ru", true },
- { "saiyans.com.ve", true },
- { "sajamstudija.info", true },
- { "sajdowski.de", true },
- { "sajjadzaidi.com", true },
- { "sajtoskal.hu", false },
- { "sajtr.ga", true },
- { "sakaki.anime.my", false },
- { "sakenohana.com", true },
- { "sakerhetskopiering.nu", true },
- { "sakostacloud.de", true },
- { "saksonski-szlak-parowozow.pl", true },
- { "sakura-paris.org", true },
- { "sakura.zone", true },
- { "sakuracommunity.com", true },
- { "sakuraplay.com", true },
- { "sakuraz.net", true },
- { "saladgo.id", true },
- { "salaire-minimum.com", true },
- { "salaminos.no-ip.org", true },
- { "salamon-it.de", false },
- { "salandalairconditioning.com", true },
- { "salariominimo.com.co", true },
- { "salde.net", true },
- { "saleduck.at", true },
- { "saleduck.ch", true },
- { "saleduck.co.id", true },
- { "saleduck.co.th", true },
- { "saleduck.com.my", true },
- { "saleduck.com.ph", true },
- { "saleduck.com.sg", true },
- { "saleduck.com.vn", true },
- { "saleduck.dk", true },
- { "saleduck.fi", true },
- { "saleduck.se", true },
- { "saledump.nl", true },
- { "salemedia.pro", true },
- { "salensmotors-usedcars.be", false },
- { "salentocab.com", true },
- { "salesflare.com", true },
- { "saletzki.de", true },
- { "salexy.kz", true },
- { "salidaswap.com", true },
- { "salland1.nl", true },
- { "salle-quali.fr", false },
- { "sallydowns.name", true },
- { "salmanravoof.com", true },
- { "salmododia.net", true },
- { "salmonella.co.uk", true },
- { "salmonvision.com.tw", true },
- { "salnet.wf", true },
- { "salon-claudia.ch", true },
- { "salon-hinata.biz", true },
- { "salon-minipli.de", true },
- { "salon.io", false },
- { "salon1.ee", true },
- { "salonasymetria.com", true },
- { "salonasymetria.pl", true },
- { "salonderecepcionessjl.com", true },
- { "salonsantebienetre.ch", true },
- { "salrosadohimalaia.com", true },
- { "salsa-straubing.de", true },
- { "saltaranuncios.com", true },
- { "saltbythesea.com", true },
- { "saltedfish.network", true },
- { "saltercane.com", false },
- { "saltstack.cz", true },
- { "saltsugarlove.de", true },
- { "saltyfish.tech", true },
- { "salud.top", false },
- { "saluddecalidad.com", true },
- { "saludmas.site", true },
- { "saluels.servemp3.com", true },
- { "salutethefish.com", true },
- { "salutethegrains.com", true },
- { "salutethepig.com", true },
- { "salva.re", true },
- { "salvadorinfantil.tk", true },
- { "salvagedfurnitureparlour.com", true },
- { "salvandoalocombia.com", true },
- { "sam-football.fr", true },
- { "sam66.cc", true },
- { "samalderson.co.uk", true },
- { "samanacafe.com", true },
- { "samandcatonline.tk", true },
- { "samandej.ir", true },
- { "samandroscosrestaurant.com", true },
- { "samanthasgeckos.com", true },
- { "samappleton.com", true },
- { "samara-avia.ru", true },
- { "samaritainsmeyrin.ch", false },
- { "samatva-yogalaya.com", true },
- { "samba.org", true },
- { "sambaash.com", true },
- { "sambeso.net", true },
- { "sambot22.tk", true },
- { "sambuchanan.tk", true },
- { "sambus.com", true },
- { "samdev.io", true },
- { "samdrewtakeson.com", true },
- { "samegoal.com", true },
- { "samegoal.org", true },
- { "samel.de", true },
- { "samenwerkingsportaal.nl", true },
- { "samenwerkingsportaal.tk", true },
- { "samesound.ru", true },
- { "sameworks.com", true },
- { "samfreaks.de", true },
- { "samhuri.net", true },
- { "samiamelikian.com.br", true },
- { "samifar.in", true },
- { "samindgroup.com", true },
- { "samiratv.tk", true },
- { "samisoft.ir", true },
- { "samiysok.cf", true },
- { "samizdat.cz", true },
- { "samkelleher.com", true },
- { "samkoandmikotoywarehouse.com", true },
- { "saml-gateway.org", true },
- { "samlaw.co.nz", true },
- { "sammamish--locksmith.com", true },
- { "sammyjohnson.com", true },
- { "sammyservers.com", true },
- { "sammyservers.net", true },
- { "samodding.com", true },
- { "samorazvitie.ru", true },
- { "samotorsporttyres.com.au", true },
- { "sampaguide.com", true },
- { "sampatjewelers.com", true },
- { "sample-site.click", true },
- { "samplefashion.nl", true },
- { "samri.pt", true },
- { "sams.wtf", true },
- { "samsebe.tk", true },
- { "samshouseofspaghetti.net", true },
- { "samtalen.nl", true },
- { "samuelebencini.it", true },
- { "samuelkeeley.com", true },
- { "samuellaulhau.fr", false },
- { "samui-samui.de", false },
- { "samuidiving.net", true },
- { "samusil.org", true },
- { "samvanderkris.xyz", true },
- { "samwilberforce.com", true },
- { "samwrigley.co.uk", true },
- { "samwu.tw", true },
- { "samystic.com", true },
- { "san.ac.th", true },
- { "sana-store.com", true },
- { "sana-store.cz", true },
- { "sana-store.sk", true },
- { "sanabproperties.com", true },
- { "sanael.net", true },
- { "sanalaile.tk", true },
- { "sanantoniolocksmithinc.com", true },
- { "sanantoniolocksmithtx.com", true },
- { "sanasport.cz", true },
- { "sanasport.sk", true },
- { "sanates.cz", true },
- { "sanatorii-sverdlovskoy-oblasti.ru", true },
- { "sanatorionosti.com.ar", true },
- { "sanbornteam.com", true },
- { "sancaktepehaber.tk", true },
- { "sanctum.geek.nz", true },
- { "sanctumwealth.com", true },
- { "sand-islets.de", true },
- { "sand-stoneinc.com", true },
- { "sand66.cc", true },
- { "sand66.com", true },
- { "sandalj.com", true },
- { "sandboxfp.com", true },
- { "sandburner.net", true },
- { "sander.sh", true },
- { "sanderdorigo.nl", true },
- { "sanderkoenders.eu", true },
- { "sanderkoenders.nl", true },
- { "sanderpoppe.com", true },
- { "sanderstech.solutions", true },
- { "sandervanderstap.nl", true },
- { "sandervankasteel.nl", false },
- { "sandgatebaysidedental.com.au", true },
- { "sandhaufen.tk", true },
- { "sandiegoopticas.com", true },
- { "sandiegotown.com", true },
- { "sandmanintel.com", true },
- { "sandmarc.cz", true },
- { "sandor.wtf", true },
- { "sandr0.tk", true },
- { "sandra-perlbach.de", true },
- { "sandrabernardo.com", true },
- { "sandrainden.nl", true },
- { "sandraindenfotografie.nl", true },
- { "sandrocorapi.com", true },
- { "sandrolittke.de", true },
- { "sandrproperty.com", true },
- { "sandstroh.network", true },
- { "sandtears.com", true },
- { "sandtohand.com", true },
- { "sandton-plumbing.co.za", true },
- { "sandtonescorts.com", true },
- { "sandtonplumber24-7.co.za", true },
- { "sandwichcouncil.tk", true },
- { "sandyrobsonhypnotherapy.co.uk", true },
- { "sanepsychologen.nl", true },
- { "sanex.ca", true },
- { "sanfranciscopersonalinjuryattorney.us", true },
- { "sangen.ml", true },
- { "sanglierhurlant.fr", true },
- { "sangyoui.health", true },
- { "sanierungskonzept.pro", true },
- { "sanipousse.com", true },
- { "sanitairwinkel.be", true },
- { "sanitairwinkel.com", true },
- { "sanitairwinkel.nl", true },
- { "sanix.org", true },
- { "sanjosecolorectal.com", true },
- { "sanketsu.ml", false },
- { "sanluisdequillota.tk", true },
- { "sanmuding.com", true },
- { "sannefoltz.com", true },
- { "sannesfotklinikk.no", true },
- { "sanogym.com", true },
- { "sanovnik.at", true },
- { "sanpei-design.com", true },
- { "sanqianssr.com", true },
- { "sans-hotel.com", true },
- { "sanskritiyoga.com", true },
- { "sansonehowell.com", true },
- { "santaijia.com", false },
- { "santamonicapost123.org", true },
- { "santegra.tk", true },
- { "santevie.ch", false },
- { "santi-club.de", true },
- { "santiagogarza.co", true },
- { "santibanezdetera.tk", true },
- { "santippolito-borgo.tk", true },
- { "santjoandevilassar.tk", true },
- { "santo.fi", true },
- { "sanvitolocapobus.com", true },
- { "sanych-msk.ru", true },
- { "saol.eu", true },
- { "saorsa.fr", true },
- { "saorsat.com", true },
- { "saorsat.ie", true },
- { "saorsat.net", true },
- { "saorsat.tv", true },
- { "saorview.com", true },
- { "saorview.ie", true },
- { "saorview.net", true },
- { "saorviewconnect.ie", true },
- { "saorviewconnected.ie", true },
- { "sap-inc.co.jp", true },
- { "sapac.es", true },
- { "sapancavillalari.com", true },
- { "sapibatam.com", true },
- { "sapien-ci.com", true },
- { "sapience.com", true },
- { "sapindus.pl", true },
- { "sapiperelining.com.au", true },
- { "saplumbers.com.au", true },
- { "sapphi.st", true },
- { "sapphirepearl.com.sg", true },
- { "sapphireservicesga.com", true },
- { "sapporobeer.com", true },
- { "sapprendre.ch", false },
- { "saprima.de", false },
- { "sapuseven.com", true },
- { "saputra.org", true },
- { "saq.com", true },
- { "sarah-jane.nl", true },
- { "sarahbeckettharpist.com", true },
- { "sarahjanecreates.co.uk", true },
- { "sarahlicity.co.uk", true },
- { "sarahlicity.me.uk", true },
- { "sarahplusdrei.de", true },
- { "sarahsecret.de", true },
- { "sarahwellington.com", true },
- { "sarahwikeley.co.uk", true },
- { "saraleebread.com", false },
- { "sarariman.com", true },
- { "sarasotadentistry.com", true },
- { "sarasotaroboticurology.com", true },
- { "sarasturdivant.com", true },
- { "saratov24.tk", true },
- { "saratovlive.tk", true },
- { "saratovnews.ml", true },
- { "saratovtime.tk", true },
- { "sarbash.ee", true },
- { "sard.ro", true },
- { "sardacompost.it", true },
- { "sardinianvillas.co.uk", true },
- { "sardinianvillas.com", true },
- { "sardinianvillas.ru", true },
- { "sarella.org", true },
- { "sarhua.tk", true },
- { "sarink.eu", true },
- { "sarjakuvakauppa.fi", true },
- { "sarkisianbuilders.com", true },
- { "sarkoziadam.hu", true },
- { "sarny.at", true },
- { "saro.me", true },
- { "saronikos.city", true },
- { "saronikos.guide", true },
- { "saropa.com", true },
- { "sarpsb.org", true },
- { "sartoria.roma.it", true },
- { "sarumtechnologies.com", true },
- { "sascha.io", true },
- { "sascha.is", true },
- { "saschaeggenberger.ch", true },
- { "saschaeggenberger.com", true },
- { "sash.pw", true },
- { "sashaokun.com", true },
- { "sashascollections.com", true },
- { "sashleighaust.com", true },
- { "sasioglu.co.uk", true },
- { "saskadoodle.com", true },
- { "sasquatt.com.br", true },
- { "sasrobotics.xyz", true },
- { "sassandbelle.co.uk", true },
- { "sassandbelle.com", true },
- { "sassandbelletrade.co.uk", true },
- { "sassandbelletrade.com", true },
- { "sastd.com", true },
- { "sasyabapi.com", true },
- { "sat-kw.net", true },
- { "sat4all.com", true },
- { "satai.dk", true },
- { "satal.in", true },
- { "satania.moe", true },
- { "satanspowers.tk", true },
- { "satario.vn", true },
- { "satellite-prof.com", true },
- { "satellites.hopto.me", true },
- { "satellitetv-deal.com", true },
- { "satimagingcorp.com", true },
- { "satinn.pl", true },
- { "satmali.az", true },
- { "satmd.de", true },
- { "satoshinumbers.com", true },
- { "satserwis.xyz", true },
- { "sattamatkamobi.mobi", false },
- { "sattaresult.net", true },
- { "saturn.pl", true },
- { "satyanarayana.xyz", true },
- { "saudenoclique.com.br", true },
- { "sauerbrey.eu", true },
- { "sauerland-schnittgruen.de", true },
- { "saulchristie.com", true },
- { "saulsplace.com", true },
- { "saulsplacehealth.com", true },
- { "saulsplacewebdesign.com", true },
- { "saultdefencelaw.ca", true },
- { "saulvanderbijl.com", true },
- { "saumon-de-france.com", false },
- { "saumon-france.com", false },
- { "saumondefrance.fr", false },
- { "saumonfrance.fr", false },
- { "saunafahrten.ch", true },
- { "saunahats.eu", true },
- { "saunas.fr", true },
- { "saunatime.jp", true },
- { "sauvagebridge.nl", true },
- { "savaari.com", true },
- { "savageorgiev.com", true },
- { "savanna.io", true },
- { "savatha.tk", true },
- { "savbus.com", true },
- { "savbus.ws", true },
- { "save-me-aachen.de", true },
- { "savebees.org", true },
- { "savecrypto.org", true },
- { "savejobsshoplocal.com", true },
- { "saveoney.ca", true },
- { "saveonkitchens.com", true },
- { "savetheinternet.eu", true },
- { "saveusfromavril.tk", true },
- { "savic.com", false },
- { "saviezvousque.net", true },
- { "savilleassessment.com", true },
- { "savin.ga", true },
- { "savingrecipe.com", true },
- { "savingsoftheyear.com", true },
- { "savingsomegreen.com", true },
- { "savorvip.ir", true },
- { "sawyerroofing.com", true },
- { "saxeandthecity.com", true },
- { "saxis.dk", true },
- { "saxojoe.de", true },
- { "saxoncreative.com", true },
- { "saxonsink.com", true },
- { "saxotex.de", true },
- { "saxowert.de", true },
- { "saxwereld.nl", true },
- { "say-it-loud.com", true },
- { "sayrodigital.com", true },
- { "sayura.net", true },
- { "saz.sh", true },
- { "saz9001.com", true },
- { "sazavafest.cz", true },
- { "sazuz.cz", true },
- { "sb-group.dk", true },
- { "sb-sd.org", true },
- { "sb-tuning.ru", true },
- { "sb.im", true },
- { "sb.sb", true },
- { "sb0.io", true },
- { "sbanken.no", true },
- { "sbaten.nl", true },
- { "sbblog.cn", true },
- { "sbbz-bad-wurzach.de", true },
- { "sbcargo.com", true },
- { "sbconstrucciones.com", true },
- { "sber.us", true },
- { "sberbank.ch", true },
- { "sberna-fotofast.cz", true },
- { "sbf888.com", true },
- { "sbiewald.de", true },
- { "sbir.gov", true },
- { "sbirecruitment.co.in", true },
- { "sbivc.jp", true },
- { "sbo-dresden.de", true },
- { "sbrouwer.org", true },
- { "sbrownbourne.com", true },
- { "sbsavings.bank", true },
- { "sbscyber.com", true },
- { "sbsrv.ml", true },
- { "sbssoft.ru", true },
- { "sbytes.info", true },
- { "sc-artworks.co.uk", false },
- { "sc019.com", true },
- { "sc5.jp", true },
- { "scaarus.com", true },
- { "scaffalature.roma.it", true },
- { "scaffoldhireeastrand.co.za", true },
- { "scaffoldhirefourways.co.za", true },
- { "scaffoldhiremidrand.co.za", true },
- { "scaffoldhirerandburg.co.za", true },
- { "scaffoldhiresandton.co.za", true },
- { "scag9.com", true },
- { "scalaire.com", true },
- { "scalaire.fr", true },
- { "scale.roma.it", true },
- { "scalesbiolab.com", true },
- { "scaling.solutions", true },
- { "scallywagsbouncycastles.co.uk", true },
- { "scallywagskids.co.uk", true },
- { "scalpel.com", true },
- { "scan.co.uk", true },
- { "scan2key.com", true },
- { "scandalindo.ml", true },
- { "scandicom.fi", true },
- { "scandinavia.dating", true },
- { "scandinaviancorner.tk", true },
- { "scangeo.net", true },
- { "scanmailx.com", true },
- { "scanpay.dk", true },
- { "scapdoors.ca", true },
- { "scarabcoder.com", true },
- { "scarafaggio.it", true },
- { "scarinex.tk", true },
- { "scatsbouncingcastles.ie", true },
- { "scatters.com", true },
- { "scatterscasino.com", true },
- { "scbdh.org", true },
- { "sccd.co.uk", true },
- { "sccimo.com", true },
- { "scde.ventures", true },
- { "sceenfox.de", true },
- { "scelec.com.au", true },
- { "scenari-community.org", true },
- { "scenari.eu", true },
- { "scenari.ovh", true },
- { "scenariossecuritygroup.com", true },
- { "scenastu.pl", true },
- { "scene.mx", true },
- { "scenester.tv", true },
- { "scenicbyways.info", true },
- { "scepticism.com", true },
- { "scevity.com", true },
- { "scfpensante.ca", true },
- { "schachburg.de", true },
- { "schachtelhalm-tee.de", true },
- { "schack.dk", true },
- { "schadevergoedingen.eu", true },
- { "schaffensdrang.at", true },
- { "schafgarbe-tee.de", true },
- { "schafzwitschern.blog", false },
- { "schamlosharmlos.de", true },
- { "schastie.ml", true },
- { "schat.top", true },
- { "schatzibaers.de", true },
- { "schawe.me", true },
- { "schbebtv.fr", true },
- { "scheervergelijker.nl", true },
- { "schefczyk.com", true },
- { "schefczyk.de", true },
- { "schefczyk.eu", true },
- { "schefczyk.net", true },
- { "scheidingspuntlansingerland.nl", true },
- { "scheidsrechtersinfo.nl", true },
- { "scheinerhaus.at", true },
- { "scheinlichter.de", true },
- { "schellebelle.tk", true },
- { "schellenberger.biz", true },
- { "schellevis.net", true },
- { "schemingmind.com", true },
- { "schenkes.de", false },
- { "scherfke.de", true },
- { "schermkapot.nl", true },
- { "scheuchenstuel.at", true },
- { "schiau.co", true },
- { "schier.info", true },
- { "schil.li", true },
- { "schildbach.de", true },
- { "schillers-friedberg.de", true },
- { "schipholwatch.nl", true },
- { "schippendale.de", true },
- { "schizoids.net", true },
- { "schizomatrix.tk", true },
- { "schlachter.ca", true },
- { "schlaf.guru", true },
- { "schlagenhauf.info", true },
- { "schlagma.de", false },
- { "schlarb.eu", true },
- { "schlarp.com", true },
- { "schlechtewitze.com", true },
- { "schlick.network", true },
- { "schlick.wedding", true },
- { "schlossereieder.at", true },
- { "schluesseldienst-berlin.de", true },
- { "schlueter-software.de", true },
- { "schmaeh-coaching.ch", true },
- { "schmatloch.cloud", true },
- { "schmelle.me", false },
- { "schmidthomes.com", true },
- { "schmidtlohwasser.de", true },
- { "schmidtplasticsurgery.com", true },
- { "schmitt-etienne.fr", true },
- { "schmitt-max.com", true },
- { "schmuggelware.de", false },
- { "schnapke.name", true },
- { "schneckenhilfe.de", false },
- { "schnegg.name", false },
- { "schneidr.de", true },
- { "schneids.me", true },
- { "schnellno.de", true },
- { "schnitzel-und-co.de", true },
- { "schnouki.net", true },
- { "schnuckenhof-wesseloh.de", true },
- { "schnyder-werbung.ch", true },
- { "schoeller.click", true },
- { "schoenstatt-fathers.link", true },
- { "schoenstatt-fathers.us", true },
- { "schoenstatt.link", true },
- { "schoepski.de", true },
- { "schoknecht.net", true },
- { "schoknecht.one", true },
- { "schoko-ferien.de", true },
- { "schokoferien.de", true },
- { "schokofoto.de", true },
- { "schokokeks.org", true },
- { "schokoladensouffle.eu", true },
- { "scholar.group", true },
- { "scholar.site", true },
- { "scholareducation.tk", true },
- { "scholarnet.cn", true },
- { "scholarshipplatform.com", true },
- { "scholarshipsplatform.com", true },
- { "scholarstyle.com", false },
- { "scholieren.com", true },
- { "scholtensupport.nl", true },
- { "scholz-kallies.de", true },
- { "schonstedt.com", true },
- { "schont.org", true },
- { "school-register.co.za", true },
- { "schoolantwoorden.tk", true },
- { "schoolcafe.com", true },
- { "schoolofphilosophy.org.au", true },
- { "schoolroom.ga", true },
- { "schoolsafety.gov", true },
- { "schorelweb.nl", true },
- { "schorers.org", true },
- { "schoring.com", true },
- { "schottenland.de", true },
- { "schrader-institute.de", true },
- { "schrauger.com", true },
- { "schrauger.info", true },
- { "schrauger.net", true },
- { "schrauger.org", true },
- { "schreibers.ca", true },
- { "schreinerei-jahreis.de", true },
- { "schreinerei-schweikl.de", true },
- { "schrenkinzl.at", true },
- { "schritt4fit.de", true },
- { "schrodingersscat.com", true },
- { "schrodingersscat.org", true },
- { "schroepfi.de", true },
- { "schrolm.de", true },
- { "schsrch.xyz", true },
- { "schtiehve.duckdns.org", true },
- { "schubergphilis.com", true },
- { "schubertgmbh-ingelheim.de", true },
- { "schuetzen-ehrenbreitstein.de", true },
- { "schuhbedarf.de", true },
- { "schuhwerkstatt.at", true },
- { "schuhzoo.de", true },
- { "schul-bar.de", true },
- { "schulderinsky.de", true },
- { "schule.wtf", true },
- { "schuler.st", true },
- { "schulfotograf-deinfoto.ch", true },
- { "schull.ch", false },
- { "schultzflorists.com", true },
- { "schumanandmonnet.eu", true },
- { "schunako.ch", true },
- { "schuppentier.org", true },
- { "schutterijschinveld.nl", true },
- { "schutz-vor-schmutz.de", true },
- { "schutznetze24.de", false },
- { "schutzwerk.com", true },
- { "schwabenhaus-ka.de", true },
- { "schwalliers.com", true },
- { "schwano-dent.at", true },
- { "schwarz-gelbe-fuechse.de", true },
- { "schwarzegar.de", true },
- { "schwarzenberg.tk", true },
- { "schwarzer.it", true },
- { "schwarzer.wang", true },
- { "schwarzes-muenchen.de", true },
- { "schwarzhenri.ch", false },
- { "schwarztrade.cz", true },
- { "schwarzwald-flirt.de", true },
- { "schweingehabt.expert", true },
- { "schweizerbanken.tk", true },
- { "schwerkraftlabor.de", true },
- { "schwinabart.com", true },
- { "schwinger.me", true },
- { "schwinnbike.ru", true },
- { "schwuppengrillen.de", false },
- { "scicomm.xyz", true },
- { "science-network.ch", true },
- { "science-texts.de", true },
- { "science.gov", true },
- { "sciencebase.gov", true },
- { "scienceexploits.com", true },
- { "scienceminnesota.com", true },
- { "scienceofpeople.com", true },
- { "sciencesolutions.eu", true },
- { "sciencetram.tk", true },
- { "sciencex.com", true },
- { "scigov.xyz", true },
- { "sciguyryan.com", true },
- { "scijinks.gov", true },
- { "scilifebiosciences.com", true },
- { "scintilla.nl", true },
- { "scip.ch", true },
- { "scislowcy.pl", true },
- { "scistarter.com", true },
- { "scitheory.com", true },
- { "scitopia.net", true },
- { "scity88.com", true },
- { "scoach475k.net", true },
- { "scohetal.de", true },
- { "scolasti.co", true },
- { "scom.org.uk", true },
- { "scoolcode.com", true },
- { "scoop6.co.uk", true },
- { "scootaloo.co.uk", true },
- { "scooter-experts.com", true },
- { "scooterinaustralia.tk", true },
- { "scooterservis.com", true },
- { "scorp13.com", true },
- { "scottdunn.com", true },
- { "scottgalvin.com", true },
- { "scotthelme.co.uk", true },
- { "scotthelmesucks.com", true },
- { "scottipc.com", true },
- { "scottishcca.co.uk", true },
- { "scottishcu.org", true },
- { "scottishseniorsgolf.com", true },
- { "scottlanderkingman.com", true },
- { "scottmay.id.au", true },
- { "scottrae.me.uk", true },
- { "scotts-restaurant.com", true },
- { "scottseditaacting.com", true },
- { "scottshorter.com.au", true },
- { "scottspainting.com", true },
- { "scouting-wageningen.nl", true },
- { "scoutingridderkerk.nl", true },
- { "scoutingtheworld.co.uk", true },
- { "scoutingtungelroy.nl", true },
- { "scoutnet.de", true },
- { "scouttrails.com", true },
- { "scp-079.org", true },
- { "scp-trens.notaires.fr", true },
- { "scp500.com", true },
- { "scpi-is.fr", true },
- { "scpslgame.com", true },
- { "scqpw.com", true },
- { "scrabble-solver.com", true },
- { "scrabble123.co.uk", true },
- { "scrabble123.com", true },
- { "scrabble123.de", true },
- { "scrabble123.fr", true },
- { "scrabble123.pl", true },
- { "scrambox.com", true },
- { "scramget.com", true },
- { "scramsoft.com", true },
- { "scrap.photos", true },
- { "scrap.tf", true },
- { "scrapbookdecorations.ga", true },
- { "scratchzeeland.nl", true },
- { "scrayos.net", true },
- { "screefox.de", true },
- { "screen-fox.de", true },
- { "screenfax.de", true },
- { "screenfox.de", true },
- { "screenfox.eu", true },
- { "screenfox.info", true },
- { "screenfox.net", true },
- { "screenlight.tv", true },
- { "screenmachine.com", true },
- { "screenpublisher.com", true },
- { "screentocloud.com", true },
- { "scripo-bay.com", true },
- { "script.google.com", true },
- { "scripter.co", true },
- { "scriptgates.ru", true },
- { "scriptic.xyz", true },
- { "scriptjunkie.us", true },
- { "scriptomania.tk", true },
- { "scriptslug.com", true },
- { "scriptum.gr", true },
- { "scrivito.com", true },
- { "scrod.me", true },
- { "scroll.in", true },
- { "scrumplex.net", true },
- { "scrumpus.com", true },
- { "scrumstack.co.uk", true },
- { "scryfall.com", true },
- { "scsd.si", true },
- { "scswam.com", false },
- { "sctiger.me", true },
- { "sctiger.ml", true },
- { "sctrainingllc.com", true },
- { "scubadiving-phuket.com", true },
- { "scubaland.hu", true },
- { "scul.net", true },
- { "sculpture.support", true },
- { "sculpturos.com", true },
- { "scungioborst.com", true },
- { "scuolaguidalame.ch", false },
- { "scuolamazzini.livorno.it", true },
- { "scurtam.tk", true },
- { "sd.af", true },
- { "sd4u.be", true },
- { "sda.one", true },
- { "sdcardrecovery.de", true },
- { "sdebitati.it", true },
- { "sdeu.fr", true },
- { "sdg-tracker.org", true },
- { "sdgllc.com", true },
- { "sdho.org", true },
- { "sdis-trib.fr", true },
- { "sdn.cz", true },
- { "sdns.fr", true },
- { "sds-marburg.de", true },
- { "sdsi.us", true },
- { "sdsk.one", true },
- { "sdsmt.engineering", true },
- { "sduconnect.nl", true },
- { "sdvigpress.org", false },
- { "sdxcentral.com", true },
- { "sdyzmun.club", true },
- { "se-booster.com", true },
- { "se-live.org", true },
- { "se-theories.org", true },
- { "se.com", true },
- { "se.gg", true },
- { "se.search.yahoo.com", false },
- { "se86.us", true },
- { "seabehind.me", true },
- { "seabrooklocksmith.com", true },
- { "seac.me", true },
- { "seachef.it", true },
- { "seadus.ee", true },
- { "seaelba.com", true },
- { "seafood.co.nz", true },
- { "seaholmwines.com", true },
- { "sealaw.com", true },
- { "sealbaker.com", true },
- { "sealoffantasy.de", true },
- { "sealtitebasement.com", true },
- { "seamester.com", true },
- { "seamoo.se", true },
- { "seamus.party", true },
- { "sean-wright.com", true },
- { "seandawson.info", true },
- { "seanholcroft.co.uk", true },
- { "seanrodda.com", true },
- { "seanstaffiery.com", true },
- { "seaplayhomes.com", true },
- { "search-job-in.com", true },
- { "search-one.de", true },
- { "search.gov", true },
- { "search.yahoo.com", false },
- { "searchcandy.nl", true },
- { "searchcandy.uk", true },
- { "searchdatalogy.com", true },
- { "searchforbeer.com", true },
- { "searchfox.org", true },
- { "searchmore.dk", true },
- { "searchpartners.dk", true },
- { "searchshops.com", true },
- { "seareytraining.com", true },
- { "searsucker.com", true },
- { "searx.be", true },
- { "searx.one", true },
- { "searx.rocks", true },
- { "searx.ru", true },
- { "searx.run", true },
- { "searx.xyz", true },
- { "seasidestudios.co.uk", true },
- { "season.moe", true },
- { "seasons-vintage.com", true },
- { "seasons.nu", false },
- { "seatbeltpledge.com", true },
- { "seattle-life.net", true },
- { "seattledevicerepair.com", true },
- { "seattlefabrication.com", true },
- { "seattlemesh.net", true },
- { "seattleprivacy.org", true },
- { "seattleshadeandawning.com", true },
- { "seattlewalkinbathtubs.com", true },
- { "seavancouver.com", true },
- { "seaviewkohchang.com", true },
- { "seb-mgl.de", true },
- { "seb-net.com", true },
- { "sebald.com", true },
- { "sebald.org", true },
- { "sebandroid.com", true },
- { "sebascelis.com", true },
- { "sebastiaandouma.com", true },
- { "sebastiaanwijnimport.nl", true },
- { "sebastian-janich.de", true },
- { "sebastian-kuhnert.de", true },
- { "sebastian-walla.com", true },
- { "sebastianblade.com", true },
- { "sebastianboegl.de", true },
- { "sebastianungureanu.com", true },
- { "sebastiaperis.com", true },
- { "sebasveeke.nl", true },
- { "seberova.cz", true },
- { "sebi.org", true },
- { "sebjacobs.com", true },
- { "seblod.com", true },
- { "sebster.com", true },
- { "seby.io", true },
- { "sec-mails.de", true },
- { "sec-research.com", true },
- { "sec-wiki.com", true },
- { "sec.ec", true },
- { "sec.gd", true },
- { "sec.gov", true },
- { "sec30.com", true },
- { "sec3ure.co.uk", true },
- { "sec455.com", true },
- { "sec530.com", true },
- { "secapp.fi", true },
- { "seccom.ch", false },
- { "secctexasgiving.org", false },
- { "secgui.de", true },
- { "sech.me", true },
- { "secinto.at", true },
- { "secinto.com", true },
- { "secnews.gr", true },
- { "secomo.org", true },
- { "second-life-partner-ichien.com", true },
- { "secondchancejobsforfelons.com", true },
- { "secondmileservice.com", true },
- { "seconfig.sytes.net", true },
- { "secoseal.de", true },
- { "secpatrol.de", true },
- { "secretagentclub.tk", true },
- { "secretary-schools.com", true },
- { "secrethub.io", true },
- { "secretpanties.com", true },
- { "secretsdujeu.com", true },
- { "secretserveronline.com", true },
- { "secretum.tech", true },
- { "secrium.io", true },
- { "sectelligence.nl", true },
- { "sectember.com", true },
- { "sectember.events", true },
- { "secthirty.com", true },
- { "sectio-aurea.org", true },
- { "section-31.org", true },
- { "section.io", true },
- { "section215.com", true },
- { "section508.gov", true },
- { "section77.de", true },
- { "sector.zone", true },
- { "sector5.xyz", true },
- { "sectun.com", true },
- { "secumailer.com", true },
- { "secumailer.nl", true },
- { "secundity.nl", true },
- { "secur3.us", true },
- { "securai.de", true },
- { "secure-computing.net", true },
- { "secure-graphic.de", true },
- { "secure-gw.de", true },
- { "secure-server-hosting.com", true },
- { "secure.advancepayroll.com.au", true },
- { "secure.co.hu", true },
- { "secure.facebook.com", false },
- { "securecloudplatform.nl", true },
- { "securedrop.org", true },
- { "secureenduserconnection.se", true },
- { "secureesolutions.com", true },
- { "securefiletransfer.nl", true },
- { "securegovernment.us", true },
- { "secureheaders.com", true },
- { "secureim.de", true },
- { "securelect-inspection.com", true },
- { "securelogin.nu", true },
- { "securemailbox.com", true },
- { "securemantra.net", true },
- { "securemessage.nl", true },
- { "securemind.ch", true },
- { "securenets.nl", true },
- { "secureobscure.com", true },
- { "secureonline.co", true },
- { "securepress.io", true },
- { "securesense.nl", true },
- { "securesystems.de", true },
- { "securethe.news", true },
- { "securetrustbank.com", true },
- { "securevideo.com", true },
- { "securewebcomputing.com", true },
- { "secureworks.com", true },
- { "secureyourerp.nl", true },
- { "securi-tay.co.uk", true },
- { "securify.nl", true },
- { "securist.nl", true },
- { "securitelandry.com", true },
- { "security-24-7.com", true },
- { "security-brokers.com", true },
- { "security.gives", true },
- { "security.google.com", true },
- { "security.love", true },
- { "security.pl", true },
- { "security201.co.uk", true },
- { "security201.com", true },
- { "securitybrief.asia", true },
- { "securitybrief.co.nz", true },
- { "securitybrief.com.au", true },
- { "securitybrief.eu", true },
- { "securitybsides.pl", false },
- { "securitydriver.com", true },
- { "securityescrownews.com", true },
- { "securityfest.com", true },
- { "securitygladiators.com", true },
- { "securityhandbook.cz", true },
- { "securityheaders.com", true },
- { "securityheaders.io", true },
- { "securityheaders.nl", true },
- { "securitykey.co", true },
- { "securitypluspro.com", true },
- { "securityprimes.in", true },
- { "securitypuppy.com", true },
- { "securityrussia.com", true },
- { "securitysense.co.uk", true },
- { "securitysnobs.com", false },
- { "securitystreak.com", true },
- { "securitytrails.com", true },
- { "securitywithoutborders.org", true },
- { "securview.ch", true },
- { "secutrans.com", true },
- { "secuvera.de", false },
- { "secvault.io", true },
- { "secwall.me", true },
- { "secyourity.se", true },
- { "sedlakovalegal.com", true },
- { "sedlex.fr", true },
- { "sedmicka.sk", false },
- { "sedoexpert.nl", true },
- { "sedoexperts.nl", true },
- { "see.asso.fr", true },
- { "see.wtf", true },
- { "seedandleisure.co.uk", true },
- { "seedboite.ovh", true },
- { "seedcoworking.es", true },
- { "seedisclaimers.com", true },
- { "seedno.de", true },
- { "seednode.co", true },
- { "seekfirstthekingdom.ca", true },
- { "seekthe.net", true },
- { "seemeagain.com", true },
- { "seemomclick.com", true },
- { "seerainer.com", true },
- { "seewang.me", true },
- { "seewhatididhere.com", true },
- { "seewines.com", true },
- { "seeworkdone.com", true },
- { "sefru.de", true },
- { "seg-leipzig.org", true },
- { "segaretro.org", true },
- { "segitz.de", true },
- { "segmetic.com", true },
- { "segnalabullo.com", true },
- { "segnalabullo.eu", true },
- { "segnalabullo.it", true },
- { "segnidisegni.eu", true },
- { "seguimosganando.com", true },
- { "segulink.com", true },
- { "seguridadconsumidor.gov", true },
- { "seguridadsistem.tech", true },
- { "seguridadsistemtienda.tech", true },
- { "seguridadysaludeneltrabajo.com.co", true },
- { "seguros-de-salud-y-vida.com", true },
- { "segurosbalboa.com.ec", false },
- { "segurosocial.gov", false },
- { "seguroviagem.srv.br", false },
- { "sehd.top", true },
- { "sehnenweh.org", true },
- { "seibert.ninja", true },
- { "seibu-kikaku.co.jp", true },
- { "seicochimica.it", true },
- { "seidel-immobilienberatung.de", true },
- { "seifried.org", true },
- { "seikatu-navi.com", true },
- { "seinfeldquote.com", true },
- { "seirei.ne.jp", true },
- { "seisansei.net", true },
- { "seishinchuo-lawoffice.com", true },
- { "seitai-nabejun.jp", true },
- { "seitai-taiyou.com", true },
- { "seitenwaelzer.de", true },
- { "sejageek.com", true },
- { "sek.ai", true },
- { "sekainokokki.jp", true },
- { "sekfung.me", true },
- { "sekisonn.com", true },
- { "sekoya.org", true },
- { "sektor41.com", true },
- { "sekurak.pl", true },
- { "selber-coden.de", true },
- { "selbys.net.au", true },
- { "selcusters.nl", true },
- { "seldax.com", true },
- { "selea.se", true },
- { "selebrita.ml", true },
- { "selected-properties.com", false },
- { "selectel.com", false },
- { "selectel.ru", true },
- { "selectionengine.ca", true },
- { "selectionengine.com", true },
- { "selectionengine.net", true },
- { "selectionengine.org", true },
- { "selectra.pt", true },
- { "selegiline.com", true },
- { "selekzo.com", true },
- { "self-business.tk", true },
- { "self-evident.org", true },
- { "self-xss.info", true },
- { "selfassess.govt.nz", true },
- { "selfdestruct.net", true },
- { "selfici.com", true },
- { "selfici.cz", true },
- { "selfiehome.cz", true },
- { "selfishness.com", true },
- { "selfloath.in", true },
- { "selfmade4u.de", true },
- { "selfrealize.ga", true },
- { "selfretire.cf", true },
- { "selfycheck.it", true },
- { "selimcerkezi.tk", true },
- { "sellajoch.com", true },
- { "sellcoins.top", true },
- { "selldorado.com", true },
- { "selldurango.com", true },
- { "sellguard.pl", true },
- { "sellingsherpa.com", true },
- { "sellme.biz", true },
- { "sellmymobile.com", true },
- { "sellmyphone.co.uk", true },
- { "sellorbuy.uk", true },
- { "sellorbuy.us", true },
- { "selltous.com.au", true },
- { "sellwithsquare.com", true },
- { "selo-cer.tk", true },
- { "seloc.org", true },
- { "seltendoof.de", true },
- { "semacode.com", true },
- { "semaflex.it", true },
- { "semantica.cz", false },
- { "semaphore-studios.com", true },
- { "sembyotic.com", true },
- { "semdynamics.com", true },
- { "semenov.ml", true },
- { "semerkhet.com", true },
- { "semesur.com", true },
- { "seminariosvip.com", true },
- { "seminariruum.ee", true },
- { "seminarraum-isny.de", true },
- { "semiocast.com", true },
- { "semiotical.com", false },
- { "semiotika.tk", true },
- { "semiread.com", true },
- { "semjonov.de", true },
- { "semobr.cf", true },
- { "semops.gq", true },
- { "semox.de", true },
- { "semplicementelight.com", true },
- { "semps-2fa.de", true },
- { "semps-threema.de", true },
- { "semps.de", true },
- { "semriscos.pt", true },
- { "semsec.net", true },
- { "sen.bo", true },
- { "senarius.de", true },
- { "sendai-sisters.com", true },
- { "sendaiouji.com", true },
- { "sendbox.cz", true },
- { "sender.services", true },
- { "sendingbee.com", true },
- { "sendmeback.de", false },
- { "sendonce.io", true },
- { "sendthisfile.com", true },
- { "sendtrix.nl", true },
- { "sendway.com", true },
- { "sendya.me", true },
- { "sendzik.eu", true },
- { "senego.com", true },
- { "senekalstorageman.co.za", true },
- { "senergyconsultants.com", true },
- { "senhost.tk", true },
- { "seniorem.eu", true },
- { "seniorhost.net", true },
- { "seniors.singles", true },
- { "senjukannonreiki.com", true },
- { "senmendai-reform.com", true },
- { "senneeeraerts.be", true },
- { "senobio.com", true },
- { "sens2lavie.com", true },
- { "sensebridge.net", true },
- { "senseonline.co.il", true },
- { "sensepixel.com", true },
- { "senshot.com", true },
- { "senshudo.tv", true },
- { "sensivo.eu", true },
- { "sensor-dream.ru", true },
- { "sensorville.com.br", true },
- { "sensualism.com", true },
- { "sensuality-models.com", true },
- { "sentandsecure.com", true },
- { "sentencing.net", true },
- { "sentenza.tk", true },
- { "sentidosdelatierra.org", true },
- { "sentinel.gov", true },
- { "sentinelproject.io", true },
- { "sentry.io", true },
- { "sentry.nu", true },
- { "sentworks.com", true },
- { "senu.pro", true },
- { "senzaparole.de", true },
- { "seo-analyse.com", true },
- { "seo-dr-it.com", true },
- { "seo-forum.nu", true },
- { "seo-linz.at", true },
- { "seo-obmen.tk", true },
- { "seo-phpbb.cf", true },
- { "seo-piar.tk", true },
- { "seo-portal.de", true },
- { "seo-reality.cf", true },
- { "seo-website.ru", true },
- { "seo.london", true },
- { "seoagentur2go.de", true },
- { "seoankara.name.tr", true },
- { "seobutler.com", true },
- { "seodayo.com", true },
- { "seoexpert.com.br", true },
- { "seogeek.nl", true },
- { "seohackers.fr", true },
- { "seohouston.com", true },
- { "seoinc.com", true },
- { "seoium.com", true },
- { "seojames.com", true },
- { "seolab.amsterdam", true },
- { "seolabuitest.azurewebsites.net", true },
- { "seolotsen.de", true },
- { "seomarketing.bg", true },
- { "seomaton.com", true },
- { "seomaton.org", true },
- { "seon.me", true },
- { "seoonline.cf", true },
- { "seorus.cf", true },
- { "seoserfing.tk", true },
- { "seosof.com", true },
- { "seoul.dating", true },
- { "seovision.se", true },
- { "seoviziti50.tk", true },
- { "seowebexpert.co.uk", true },
- { "seowerkz.com", true },
- { "seowork.tk", true },
- { "seozel.tk", true },
- { "sepalandseed.com", true },
- { "septakkordeon.de", true },
- { "septentrionalist.org", true },
- { "septfinance.ch", false },
- { "septicrepairspecialists.com", true },
- { "septonol.tk", true },
- { "septs.blog", true },
- { "sequachee.com", true },
- { "sequencing.com", true },
- { "sequiturs.com", true },
- { "sera.jp", true },
- { "seraph.tokyo", true },
- { "serban.ro", true },
- { "serbanpaun.ro", true },
- { "serbianclimbing.com", false },
- { "serdarwork.com", true },
- { "sereema.com", true },
- { "serele.fr", true },
- { "serenaden.at", true },
- { "serenascreations.com", true },
- { "serenavilage.net", true },
- { "serenavillage.net", true },
- { "serenavillageresidence.com", true },
- { "serendeputy.com", true },
- { "serf.io", true },
- { "serfas.gr", true },
- { "serge-design.ch", true },
- { "sergeemond.ca", true },
- { "sergefonville.nl", true },
- { "sergeyreznikov.com", true },
- { "sergije-stanic.me", true },
- { "sergio.me", true },
- { "sergiozygmunt.com", true },
- { "serialexperiments.co.uk", true },
- { "serienstream.to", true },
- { "seriesdatv.pt", true },
- { "seriesfeed.com", true },
- { "serigraphs.co.uk", true },
- { "serinamusic.com", true },
- { "seriousaboutsecurity.com", true },
- { "seriousclimbing.com", true },
- { "serkanyarbas.com", true },
- { "serkanyarbas.com.tr", true },
- { "sermasvital.com", true },
- { "sernate.com", true },
- { "serotiuk.com", false },
- { "serpenteq.com", true },
- { "serpic.photo", true },
- { "serrande.roma.it", true },
- { "serrano-chris.ch", false },
- { "serrature.roma.it", true },
- { "seru.eu", true },
- { "servcom.net.au", true },
- { "servepublic.com", true },
- { "servepublic.org", true },
- { "server-daten.de", true },
- { "server-essentials.com", true },
- { "serveradium.com", true },
- { "serverco.com", true },
- { "serverd.de", true },
- { "serverexpose.com", true },
- { "serverfrog.de", true },
- { "serverhost.no", true },
- { "serverhunter.com", true },
- { "servermacher.de", true },
- { "servermaster.sk", true },
- { "serverninja.tk", true },
- { "serveroffline.net", false },
- { "serverpedia.de", true },
- { "serversfrom.space", true },
- { "serversftw.com", true },
- { "serverstuff.info", true },
- { "serversuit.com", true },
- { "servertastic.com", true },
- { "servertutorial.eu", true },
- { "servethecity-karlsruhe.de", true },
- { "servetten-groothandel.nl", true },
- { "serveur.nl", true },
- { "serveursminecraft.org", true },
- { "servgate.jp", true },
- { "service.gov.uk", true },
- { "servicebeaute.fr", true },
- { "serviceboss.de", true },
- { "serviceinconstanta.ro", true },
- { "servicerequesthub.io", true },
- { "servicestechnologiquesam.ca", true },
- { "serviciales.com", true },
- { "servicios-electricos.com", true },
- { "servida.ch", true },
- { "servietten-grosshandel.at", true },
- { "servietten-grosshandel.be", true },
- { "servietten-grosshandel.ch", true },
- { "servietten-grosshandel.de", true },
- { "serviettenhaus.de", true },
- { "serviettes-et-plus.com", true },
- { "servilletas-de-papel.es", true },
- { "servilletas-de-papel.mx", true },
- { "servingbaby.com", true },
- { "servious.org", true },
- { "servitek.de", true },
- { "serviziourgente.it", true },
- { "servo.org", true },
- { "servtraq-staging.azurewebsites.net", true },
- { "servtraqazure.com", true },
- { "serw.org", true },
- { "serwetki-papierowe.pl", true },
- { "seryox.com", true },
- { "sesam-biotech.com", true },
- { "sesamecare.com", true },
- { "sesrdcem.cz", true },
- { "sessile-oak.co.uk", true },
- { "session.bbc.co.uk", true },
- { "session.bbc.com", true },
- { "sessionslogning.dk", true },
- { "sesslerimmo.ch", true },
- { "sestra.in", true },
- { "sesturizm.com.tr", true },
- { "setasgourmet.es", true },
- { "setenforce.one", true },
- { "setesat.com.br", true },
- { "setevik.tk", true },
- { "sethcaplan.com", true },
- { "sethjust.com", true },
- { "sethlmatarassomd.com", true },
- { "sethriedel.com", true },
- { "sethvargo.com", true },
- { "setphaserstostun.org", false },
- { "setptusa.com", true },
- { "settberg.de", true },
- { "settimanadellascienza.it", true },
- { "settleapp.co", true },
- { "setuid.io", true },
- { "setuid0.kr", true },
- { "setuplog.io", true },
- { "setxrm.com", true },
- { "seutens.be", true },
- { "seutens.eu", true },
- { "seva.fashion", true },
- { "sevastopol.tk", true },
- { "sevathian.com", true },
- { "seven-purple.com", true },
- { "sevencooks.com", true },
- { "sevenhillsapartments.com.au", true },
- { "sevenicealimentos.com.br", true },
- { "seventwentynine.com", true },
- { "severntrentinsuranceportal.com", true },
- { "sevilinux.es", true },
- { "sevocomm.com", true },
- { "sevsey.ru", true },
- { "sewa.nu", true },
- { "sewafineseam.com", true },
- { "sewamobilperdana.com", true },
- { "sewatec.com", true },
- { "sewfarsewgood.co.uk", true },
- { "sewfarsewgood.uk", true },
- { "sewing-machines.com.ua", true },
- { "sewing-world.ru", true },
- { "sewinginsight.com", true },
- { "sewoo.co.uk", true },
- { "sex-education.com", true },
- { "sex-sex-cam.com", true },
- { "sex5.com", true },
- { "sexdocka.nu", true },
- { "sexedquickies.com", true },
- { "sexedrescue.com", true },
- { "sexflare.net", true },
- { "sexgarage.de", true },
- { "sexmobil.de", true },
- { "sexocomgravidas.com", true },
- { "sexologist.cf", true },
- { "sexonosalao.com", true },
- { "sexoyrelax.com", true },
- { "sexplicit.co.uk", true },
- { "sextop1.pro", true },
- { "sexy-store.nl", true },
- { "sexyblonds.net", true },
- { "sexyfish.com", true },
- { "sexyfotosvandep.nl", true },
- { "sexymassageoil.com", true },
- { "sexytagram.com", true },
- { "seyfarth.de", true },
- { "seyhanlar.com", true },
- { "seyr.me", true },
- { "sfa.sk", true },
- { "sfaparish.org", true },
- { "sfaturiit.ro", true },
- { "sfbao.com", true },
- { "sfdev.ovh", true },
- { "sfg-net.com", true },
- { "sfg-net.eu", true },
- { "sfg-net.net", true },
- { "sfg-net.org", true },
- { "sfg-nordholz.de", true },
- { "sfil.fr", true },
- { "sfile.eu", true },
- { "sfirat-haomer.com", true },
- { "sfleisure.com", true },
- { "sfo-fog.ch", false },
- { "sfpebblesstones.com", true },
- { "sft-framework.org", true },
- { "sftool.gov", true },
- { "sfvonline.nl", true },
- { "sg-elektro.de", true },
- { "sg.search.yahoo.com", false },
- { "sg1.tech", true },
- { "sgb.co", true },
- { "sgcaccounts.co.uk", true },
- { "sgcy.vip", true },
- { "sgdementia.ca", true },
- { "sggame990.com", true },
- { "sgi.org", true },
- { "sgitc.de", true },
- { "sglibellen.de", true },
- { "sglorch.me", false },
- { "sglynp.com", true },
- { "sgombero.it", true },
- { "sgrossi.it", true },
- { "sgrub.xyz", true },
- { "sgs-systems.de", true },
- { "sgs.camera", true },
- { "sgs.systems", true },
- { "sgsp.nl", true },
- { "sgtcodfish.com", true },
- { "sgtt.ch", false },
- { "sgutranscripts.org", true },
- { "sh-heppelmann.de", true },
- { "sh0rt.zone", true },
- { "sh0shin.org", true },
- { "sh0uld.net", true },
- { "sh11.pp.ua", true },
- { "sha.bi", true },
- { "sha2017.org", true },
- { "shaadithailand.com", true },
- { "shabiwangyou.com", true },
- { "shachang.com", true },
- { "shad.waw.pl", true },
- { "shadedesign.cz", true },
- { "shadesofgrayadr.com", true },
- { "shadesofgraylaw.com", true },
- { "shadex.net", true },
- { "shadigee.org", true },
- { "shadikhan.tk", true },
- { "shadowcp.eu", true },
- { "shadowfight2.tk", true },
- { "shadowkingdomrecords.com", true },
- { "shadowkitsune.net", true },
- { "shadowlurker.com.au", true },
- { "shadowsing.com", true },
- { "shadowsocks.com", true },
- { "shadowsocks.com.au", true },
- { "shadowsocks.com.hk", true },
- { "shadowsocks.fr", false },
- { "shadowsocks.la", true },
- { "shadowsocks.se", true },
- { "shadowsocks.to", true },
- { "shadowsocks.wiki", true },
- { "shadowvolt.net", true },
- { "shadwe.com", true },
- { "shadynook.net", true },
- { "shahar.cc", false },
- { "shahpurjat.xyz", true },
- { "shahrsazan.tk", true },
- { "shahzaibm.com", true },
- { "shaicoleman.com", true },
- { "shajol.com", true },
- { "shakan.ch", false },
- { "shaken110.com", true },
- { "shakerwebdesign.net", true },
- { "shakespearevet.com", true },
- { "shakingthehabitual.com", true },
- { "shakthifacility.com", true },
- { "shaloc.site", true },
- { "shalott.org", true },
- { "shalyapin.by", true },
- { "sham-group.fr", true },
- { "shamans.ga", true },
- { "shamara.info", true },
- { "shampoo63.ru", true },
- { "shan.io", false },
- { "shan.si", true },
- { "shanahanstrategy.com", true },
- { "shanefagan.com", true },
- { "shanesofos.com", true },
- { "shanesofos.info", true },
- { "shanetully.com", true },
- { "shanewadleigh.com", true },
- { "shanhay.tk", true },
- { "shanju.tk", true },
- { "shannapeeples.com", true },
- { "shanoviyam.in", true },
- { "shansen-online.de", true },
- { "shanshushu.com", true },
- { "shansing.cn", true },
- { "shansing.com", true },
- { "shansing.net", true },
- { "shansing.space", true },
- { "shapediver.com", true },
- { "shapin.tv", true },
- { "sharanyamunsi.net", true },
- { "shard.vc", true },
- { "sharedgoals.co", true },
- { "shareeri.xyz", true },
- { "sharefox.eu", true },
- { "sharefox.nl", true },
- { "sharejoy.cn", false },
- { "sharekey.com", false },
- { "shareoffice.ch", true },
- { "sharer.link", true },
- { "sharerotic.com", true },
- { "sharescope.co.uk", false },
- { "shareselecttools.com", true },
- { "sharevari.com", true },
- { "shareworks.com", true },
- { "sharik-msk.ga", true },
- { "sharik.ml", true },
- { "sharing-kyoto.com", true },
- { "sharingphotos.co", false },
- { "sharisharpe.com", true },
- { "shark.cat", true },
- { "shark5060.net", true },
- { "sharking.gq", true },
- { "sharpe.systems", true },
- { "sharu.me", true },
- { "sharvey.ca", true },
- { "shaun.net", true },
- { "shaunandamyswedding.com", true },
- { "shaunc.com", true },
- { "shavegazette.com", true },
- { "shavit.space", true },
- { "shawiah.tk", true },
- { "shawnalucey.com", true },
- { "shawnhogan.com", true },
- { "shawnow.com", true },
- { "shawnwilkerson.com", true },
- { "shawnz.org", true },
- { "shaytan.tk", true },
- { "shazzlemd.com", true },
- { "shazzlepro.com", true },
- { "shcode.de", true },
- { "shdw.cc", true },
- { "she.tw", true },
- { "shearcomfort.com", true },
- { "shearin.pro", true },
- { "sheaspire.com", true },
- { "shechipin.ml", true },
- { "shee.org", true },
- { "sheehyinfinitioftysonsparts.com", true },
- { "sheenveininstitutestl.com", true },
- { "sheepfriends.com", true },
- { "sheepproductions.com", true },
- { "sheerchain.com", true },
- { "sheet.host", true },
- { "sheffield-wednesday-fc.tk", true },
- { "shehaal.com", true },
- { "shehata.com", true },
- { "sheilasdrivingschool.com", true },
- { "shejutu.com", true },
- { "shek.zone", true },
- { "shekareyehospital.com", true },
- { "shelbymunsch.com", true },
- { "shelehov.tk", true },
- { "shelfordsandstaplefordscouts.org.uk", true },
- { "shelfplanner.com", true },
- { "shelike.me", true },
- { "shellcon.io", true },
- { "shellday.cc", true },
- { "shelleystoybox.com", true },
- { "shellfire.de", true },
- { "shellgame.io", true },
- { "shellj.me", true },
- { "shellta.com", true },
- { "shellta.net", true },
- { "sheltieplanet.com", true },
- { "shelvacu.com", true },
- { "shenderman.ml", true },
- { "shenghaiautoparts.com", true },
- { "shenghaiautoparts.net", true },
- { "shenpei.net", true },
- { "shenyuqi.com", false },
- { "shepherdsfriendly.co.uk", true },
- { "sherbers.de", true },
- { "sheremetka.com", true },
- { "shermantank.biz", true },
- { "sherpa.blog", true },
- { "sherpnortheast.com", true },
- { "sherrikehoetherapy.com", true },
- { "sherrikelley.com", true },
- { "sherut.net", true },
- { "shevet-achim.tk", true },
- { "shft.cl", true },
- { "shfzzz.org", true },
- { "shg-pornographieabhaengigkeit.de", false },
- { "shgroup.xyz", true },
- { "shgt.jp", true },
- { "shgw186.com", false },
- { "shh.sh", true },
- { "shiawasedo.co.jp", true },
- { "shibbydex.com", true },
- { "shibuya-rin.kr", true },
- { "shichibukai.net", true },
- { "shico.org", true },
- { "shielddagger.com", true },
- { "shielder.it", true },
- { "shieldofachilles.in", true },
- { "shifaat.com", true },
- { "shift-record.com", true },
- { "shift-to.co.jp", true },
- { "shift.email", true },
- { "shiftdevices.com", true },
- { "shiftj.is", true },
- { "shiftleft.org", true },
- { "shiftsixth.com", true },
- { "shiga1.jp", true },
- { "shigaben.or.jp", true },
- { "shiganmartialarts.com", true },
- { "shihadwiki.com", true },
- { "shiji.info", true },
- { "shijing.me", true },
- { "shikimori.org", true },
- { "shikiryu.com", true },
- { "shilpaonline.tk", true },
- { "shimi.blog", true },
- { "shimi.guru", true },
- { "shimi.net", true },
- { "shimmy1996.com", true },
- { "shimo.im", true },
- { "shin-yo.de", true },
- { "shinghoi.com", true },
- { "shinglereplacementlv.com", true },
- { "shining.gifts", true },
- { "shiningbright.co.id", true },
- { "shinnyosangha.org", false },
- { "shinomiya.group", false },
- { "shinsyo.com", true },
- { "shintoism.com", true },
- { "shinuytodaati.co.il", true },
- { "shinyuu.net", true },
- { "shipard.com", true },
- { "shipard.cz", true },
- { "shipcloud.io", true },
- { "shipito.kg", true },
- { "shipmonk.com", true },
- { "shippercenter.info", true },
- { "shippinglabel.de", true },
- { "shiqi.ca", true },
- { "shiqi.lol", true },
- { "shiqi.one", true },
- { "shiqi.online", true },
- { "shiqi.se", true },
- { "shiqi.tv", true },
- { "shiqi1.com", true },
- { "shiqishidai.cc", true },
- { "shiqisifu.cc", true },
- { "shirao.jp", true },
- { "shiresvets.com", true },
- { "shirevirtual.tk", true },
- { "shiriforum.tk", true },
- { "shiroanime.es", true },
- { "shirt2go.shop", true },
- { "shirtsdelivered.com", true },
- { "shirtsofholland.com", true },
- { "shishadenbosch.nl", true },
- { "shishkin.us", true },
- { "shishlik.net", true },
- { "shitagi-shop.com", true },
- { "shitbeast.institute", true },
- { "shitcountries.org", true },
- { "shitmybradsays.com", false },
- { "shitnikovo.tk", true },
- { "shitposts.se", true },
- { "shitproductions.org", true },
- { "shitsta.in", true },
- { "shiva-temple.tk", true },
- { "shivamber.com", true },
- { "shivammathur.com", true },
- { "shivamohanam.com", true },
- { "shixuen.com", true },
- { "shkololo.ml", true },
- { "shlmail.info", true },
- { "shock.ee", true },
- { "shockercityservices.com", true },
- { "shodan.io", true },
- { "shoejitsu.co", true },
- { "shoemakerywc.com", true },
- { "shoeracks.uk", true },
- { "shoestringeventing.co.uk", true },
- { "shokola.com", true },
- { "shokureach.jp", true },
- { "shooter.dog", true },
- { "shop-hellsheadbangers.com", true },
- { "shop-s.net", true },
- { "shop-slivki.tk", true },
- { "shop4d.com", true },
- { "shopadvies.nl", true },
- { "shopalike.cz", true },
- { "shopalike.dk", true },
- { "shopalike.es", true },
- { "shopalike.fi", true },
- { "shopalike.fr", true },
- { "shopalike.hu", true },
- { "shopalike.it", true },
- { "shopalike.nl", true },
- { "shopalike.pl", true },
- { "shopalike.se", true },
- { "shopalike.sk", true },
- { "shopandworld.net", false },
- { "shopapi.cz", true },
- { "shoparbonne.co.uk", true },
- { "shopatkei.com", true },
- { "shopbakersnook.com", true },
- { "shopcoupon.co.za", true },
- { "shopcoupons.co.id", true },
- { "shopcoupons.my", true },
- { "shopcoupons.ph", true },
- { "shopcoupons.sg", true },
- { "shopfazz.com", true },
- { "shopfinale.com", true },
- { "shopific.com", true },
- { "shopifycloud.com", true },
- { "shopikal.com", true },
- { "shopkini.com", true },
- { "shoplandia.co", true },
- { "shopmacher.de", true },
- { "shopminut.com", true },
- { "shoponlinedeals.tk", true },
- { "shopperexpertss.com", true },
- { "shopping24.de", true },
- { "shoppingandreviews.it", true },
- { "shoppingicarai.com", true },
- { "shoppingvrimini.ru", true },
- { "shopregional.com.br", true },
- { "shopstart.dk", true },
- { "shopstasy.com", true },
- { "shoptec.sk", true },
- { "shopteq.hu", true },
- { "shoptio.cz", true },
- { "shopunilever.com", true },
- { "shopwebhue.com", true },
- { "shorebreaksecurity.com", true },
- { "shorehamfort.co.uk", true },
- { "shorifart.com", true },
- { "short-biography.com", false },
- { "short-term-plans.com", true },
- { "short.cm", true },
- { "short.wtf", true },
- { "shortcut.pw", true },
- { "shortdiary.me", true },
- { "shorten.ninja", true },
- { "shoshin-aikido.de", true },
- { "shoshin.technology", true },
- { "shossain.tk", true },
- { "shost.ga", true },
- { "shota-sekkotsuin.com", true },
- { "shota.soy", true },
- { "shota.vip", true },
- { "shotbow.net", true },
- { "shotsleeve.com", true },
- { "shouttag.com", true },
- { "shovonhasan.com", true },
- { "showbits.net", true },
- { "shower.im", true },
- { "showersnet.com", true },
- { "showfom.sb", true },
- { "showmax.com", true },
- { "showmethegadgets.com", true },
- { "showmethemoney.ru", true },
- { "showpassword.net", false },
- { "showroom.co.uk", true },
- { "showroom.uk", true },
- { "showsonar.com", true },
- { "shoxmusic.net", false },
- { "shrapnel.ga", true },
- { "shred.ch", false },
- { "shredoptics.ch", false },
- { "shredriteservices.com", true },
- { "shrelief.org", true },
- { "shrike.me", false },
- { "shrimpcam.pw", true },
- { "shrinidhiclinic.in", true },
- { "shrub.ca", true },
- { "shrug.ml", false },
- { "shsh.host", true },
- { "sht.life", true },
- { "shtaiman.com", true },
- { "shtaiman.net", true },
- { "shtaiman.org", true },
- { "shtaketnik-metall.ru", true },
- { "shtaketniki.kz", true },
- { "shtaketniki.ru", true },
- { "shteiman.com", true },
- { "shteiman.net", true },
- { "shteiman.org", true },
- { "shu-fu.net", true },
- { "shuax.com", true },
- { "shuffleradio.nl", true },
- { "shugo.net", true },
- { "shugua.com.tw", true },
- { "shuhacksoc.co.uk", true },
- { "shunliandongli.com", true },
- { "shuomingshu88.com", true },
- { "shura.eu.org", true },
- { "shuro.de", true },
- { "shuset.dk", true },
- { "shushu.media", true },
- { "shutter-shower.com", true },
- { "shutupbabyiknowit.party", true },
- { "shux.pro", true },
- { "shyuka.me", true },
- { "si-benelux.nl", true },
- { "si.to", true },
- { "si2b.fr", true },
- { "siaggiusta.com", true },
- { "siamericas.com", true },
- { "siamrehab.com", true },
- { "siamsnus.com", true },
- { "sianbryn.co.uk", true },
- { "siava.ru", true },
- { "siberas.de", true },
- { "siberia.gq", true },
- { "siberiactiva.com", true },
- { "siberkulupler.com", true },
- { "sibertakvim.com", true },
- { "sibrenvasse.nl", true },
- { "siccardisport.it", true },
- { "sice-si.org", true },
- { "sich-fight.club", true },
- { "siciliadisinfestazioni.it", true },
- { "siciliamconsulting.com", true },
- { "sicilianbalm.com", true },
- { "siciliapulizie.it", true },
- { "sickplanet.cf", true },
- { "sicurezza24.info", true },
- { "sicurezzalavoro24.com", true },
- { "sicurled.com", true },
- { "sicz.de", true },
- { "siddigsami.com", true },
- { "sideleau.com", true },
- { "sidelka-tver.ru", true },
- { "sidema.be", true },
- { "sidemount-forum.com", true },
- { "sidemount-tauchen.com", true },
- { "sidepodcast.com", true },
- { "sidepodcastdaily.com", true },
- { "sidepodcastextra.com", true },
- { "sideshowbarker.net", true },
- { "sidi-smotri.ru", true },
- { "sidium.de", true },
- { "sidnicio.us", true },
- { "sidonge.com", true },
- { "sidongkim.com", true },
- { "sidpod.ru", true },
- { "sidsun.com", true },
- { "siecledigital.fr", true },
- { "siegemund-frankfurt.de", true },
- { "siel.nl", true },
- { "sielsystems.nl", true },
- { "sientemendoza.com.ar", true },
- { "siepomaga.net", true },
- { "sierpinska.co", true },
- { "sierramusic.tk", true },
- { "sietejefes.com.ar", true },
- { "sieumod.com", true },
- { "sieuthithangmay.com", true },
- { "sift-tool.org", false },
- { "sifuondemand.com", true },
- { "sig6.org", true },
- { "siga.com", true },
- { "sigabrt.org", true },
- { "sigcafe.net", true },
- { "siggerudklatreklubb.no", true },
- { "siggi.io", true },
- { "sight-sound.com", true },
- { "sightcure.jp", true },
- { "sighup.nz", true },
- { "sigismonda.ch", false },
- { "sigma-signalisation.com", true },
- { "sigma957.net", true },
- { "sigmalux.sarl", true },
- { "sigmasensors.com.br", true },
- { "sigmaweb.co.uk", true },
- { "sign.dog", true },
- { "sign.io", true },
- { "signaconsultoria.com.br", true },
- { "signage.red", true },
- { "signal.org", false },
- { "signaletique-inox.fr", true },
- { "signalmaps.co.uk", true },
- { "signaturechannel.com", true },
- { "signaturedallas.com", true },
- { "significados.com", true },
- { "significados.com.br", true },
- { "significantbanter.com", true },
- { "signing-milter.org", false },
- { "signix.net", true },
- { "signpath.io", true },
- { "signtul.com", false },
- { "sigsrv.net", true },
- { "sigterm.sh", true },
- { "sigurnost.online", true },
- { "siikaflix.tv", true },
- { "siirtutkusu.com", false },
- { "sijbesmaverhuizingen.nl", true },
- { "sik-it.nl", true },
- { "sikademy.com", true },
- { "sikaranbrotherhood.tk", true },
- { "sikayetvar.com", false },
- { "sikevux.se", true },
- { "sikko.biz", true },
- { "siku-shop.ch", true },
- { "silashes.com", true },
- { "silashes.ru", true },
- { "silaslova-ekb.ru", true },
- { "silent-clean.de", true },
- { "silent-yachts.com", true },
- { "silentexplosion.de", true },
- { "silentkernel.fr", true },
- { "silentundo.org", true },
- { "silesianlawyer.pl", true },
- { "silesianus.pl", true },
- { "silica-project.com", true },
- { "silica-project.jp", true },
- { "silicanetworks.com", true },
- { "silicon-north.com", true },
- { "silicon-vision.com", true },
- { "silkebaekken.no", true },
- { "silken-madame.tk", true },
- { "sillisalaatti.fi", true },
- { "sillysnapz.co.uk", true },
- { "silo.org.br", true },
- { "siloportem.net", true },
- { "silsha.me", true },
- { "silv.me", true },
- { "silver-heart.co.uk", true },
- { "silverartcollector.com", true },
- { "silverblog.org", true },
- { "silverbowflyshop.com", true },
- { "silverdragonart.com", true },
- { "silvergoldbull.be", true },
- { "silvergoldbull.by", true },
- { "silvergoldbull.ca", true },
- { "silvergoldbull.co.il", true },
- { "silvergoldbull.co.no", true },
- { "silvergoldbull.co.uk", true },
- { "silvergoldbull.com", true },
- { "silvergoldbull.com.ar", true },
- { "silvergoldbull.com.au", true },
- { "silvergoldbull.cr", true },
- { "silvergoldbull.cz", true },
- { "silvergoldbull.de", true },
- { "silvergoldbull.ec", true },
- { "silvergoldbull.ee", true },
- { "silvergoldbull.es", true },
- { "silvergoldbull.fi", true },
- { "silvergoldbull.gd", true },
- { "silvergoldbull.gl", true },
- { "silvergoldbull.gr", true },
- { "silvergoldbull.gt", true },
- { "silvergoldbull.hk", true },
- { "silvergoldbull.hn", true },
- { "silvergoldbull.hu", true },
- { "silvergoldbull.in", true },
- { "silvergoldbull.is", true },
- { "silvergoldbull.it", true },
- { "silvergoldbull.kr", true },
- { "silvergoldbull.li", true },
- { "silvergoldbull.lt", true },
- { "silvergoldbull.lv", true },
- { "silvergoldbull.ma", true },
- { "silvergoldbull.nz", true },
- { "silvergoldbull.pl", true },
- { "silvergoldbull.pt", true },
- { "silvergoldbull.qa", true },
- { "silvergoldbull.rs", true },
- { "silvergoldbull.se", true },
- { "silvergoldbull.si", true },
- { "silvergoldbull.sv", true },
- { "silvergoldbull.tt", true },
- { "silvergoldbull.tw", true },
- { "silvergoldbull.uy", true },
- { "silvergoldbull.uz", true },
- { "silvergoldbull.ws", true },
- { "silverkingalaska.com", true },
- { "silverlinkz.net", true },
- { "silvernight.social", true },
- { "silvershadow.cc", true },
- { "silverspottrading.com", true },
- { "silvertorrents.cf", true },
- { "silverwind.io", true },
- { "silvesrom.ro", true },
- { "silvester-mitterschida.de", true },
- { "silvine.xyz", true },
- { "silvobeat.blog", true },
- { "silvobeat.com", true },
- { "sim-karten.net", true },
- { "sim-minaoshi.jp", true },
- { "sim-mobile.ml", true },
- { "sim-usa.mobi", true },
- { "sim4seed.org", true },
- { "simam.de", true },
- { "simark.ca", true },
- { "simbamail.de", true },
- { "simbeton.nl", true },
- { "simcoecurlingclub.ca", true },
- { "simcongroup.ir", true },
- { "simeonoff.ninja", true },
- { "simetal.ch", false },
- { "simfdr.com", true },
- { "simfed.org", true },
- { "simivalleyelectrical.com", true },
- { "simivalleyexteriorlighting.com", true },
- { "simivalleylandscapelighting.com", true },
- { "simivalleylighting.com", true },
- { "simivalleyoutdoorlighting.com", true },
- { "simkova-reality.cz", true },
- { "simlau.net", true },
- { "simmtronic.com", true },
- { "simnovo.net", true },
- { "simoesgoulart.com.br", true },
- { "simon-agozzino.fr", true },
- { "simon-hofmann.org", true },
- { "simon-mueller.de", true },
- { "simon3k.moe", true },
- { "simonastallone.com", true },
- { "simonberard.garden", true },
- { "simonbondo.dk", true },
- { "simoncommunity.org.uk", true },
- { "simoncook.org", true },
- { "simonevans.uk", true },
- { "simonfischer.info", true },
- { "simonhirscher.de", true },
- { "simonholst.dk", true },
- { "simonkjellberg.com", true },
- { "simonkjellberg.se", true },
- { "simonlyabonnement.nl", true },
- { "simonmaddox.com", true },
- { "simonmanuel.com", true },
- { "simonreich.de", true },
- { "simonsmh.cc", true },
- { "simonspeich.ch", true },
- { "simonsreich.de", true },
- { "simonssh.ddns.net", true },
- { "simontaite.com", true },
- { "simonweil.com", true },
- { "simonwessel.net", true },
- { "simonwoodside.com", true },
- { "simosol.de", true },
- { "simosol.dk", true },
- { "simpbx.net", true },
- { "simpel.be", true },
- { "simpeo.org", true },
- { "simphony.cz", true },
- { "simpip.com", true },
- { "simple.com", false },
- { "simplecmsdemo.com", true },
- { "simplecoding.click", true },
- { "simplecontacts.com", true },
- { "simplecryptoconvert.com", true },
- { "simplednscrypt.org", true },
- { "simplegoodhealth.com", true },
- { "simpleinout.com", true },
- { "simpleinvoices.io", true },
- { "simpleit.services", true },
- { "simplelinux.tk", true },
- { "simplemining.net", true },
- { "simpleprojects.net", true },
- { "simplertrading.com", true },
- { "simpleshirts.us", true },
- { "simpletax.ca", true },
- { "simplewire.de", true },
- { "simplia.cz", true },
- { "simplicitypvp.net", true },
- { "simplidesigns.nl", true },
- { "simplifyengineering.co.uk", true },
- { "simplifylivelove.com", true },
- { "simplixos.org", true },
- { "simplosoft.co.uk", true },
- { "simply.scot", true },
- { "simplycateringequipment.co.uk", true },
- { "simplycharlottemason.com", true },
- { "simplyfixit.co.uk", true },
- { "simplyhelen.de", true },
- { "simplyml.com", true },
- { "simplymozzo.se", true },
- { "simplyowners.net", true },
- { "simplyregister.net", true },
- { "simplysmartgardening.com", true },
- { "simplytiles.com", true },
- { "simpte.com", true },
- { "simrail.nl", true },
- { "simsimi.ml", true },
- { "simsnieuws.nl", true },
- { "simulfund.com", true },
- { "simulise.com", true },
- { "simulping.com", true },
- { "simyayayinlari.com", true },
- { "sin-el-fil.com", true },
- { "sin.swiss", false },
- { "sinalizeweb.com.br", false },
- { "sinanaydemir.com.tr", true },
- { "sinaryuda.web.id", true },
- { "sinavyo.ml", true },
- { "sincemydivorce.com", true },
- { "sinclairinat0r.com", true },
- { "sincordones.net", true },
- { "sindarina.com", true },
- { "sindarina.eu", true },
- { "sindarina.net", true },
- { "sinde.ru", true },
- { "sindicatoburgos.org", true },
- { "sindlerova.com", true },
- { "sindlerova.cz", true },
- { "sindominio.net", true },
- { "sinergy.ch", false },
- { "sinews.tk", true },
- { "sinfonietta-meridiana.de", true },
- { "sinfully.gq", true },
- { "sinfulthrills.co.uk", true },
- { "singapurfirma.com", true },
- { "singel.ch", true },
- { "singer.ru", true },
- { "singhpackersmovers.com", true },
- { "single-in-stuttgart.de", true },
- { "singleproduction.com", true },
- { "singles-aus-hamburg.de", true },
- { "singles-berlin.de", true },
- { "singleuse.link", true },
- { "singlu10.org", false },
- { "sinhnhatbaby.com", true },
- { "sinluzvenezuela.tk", true },
- { "sinmik.com", true },
- { "sinnersprojects.ro", true },
- { "sinog.si", true },
- { "sinomod.com", true },
- { "sinonimos.com.br", true },
- { "sinonimosonline.com", true },
- { "sinonimosonline.com.br", true },
- { "sinquin.eu", true },
- { "sinronet.com", true },
- { "sint-joris.nl", true },
- { "sintaxis.org", true },
- { "sinterama.biz", true },
- { "sinuelovirtual.com.br", true },
- { "sinusitis-bronchitis.ch", true },
- { "sioeckes.hu", true },
- { "siogyumolcs.hu", true },
- { "sion-colony.tk", true },
- { "sion.info", true },
- { "sipa.nc", true },
- { "sipa.pf", true },
- { "sipc.org", true },
- { "sipstix.co.za", true },
- { "sirandorung.tk", true },
- { "siraweb.org", true },
- { "sirbouncealotcastles.co.uk", true },
- { "sirbouncelot.co.uk", true },
- { "sirchuk.net", true },
- { "sircon.no", true },
- { "sirena.co.jp", true },
- { "sirencallofficial.com", true },
- { "sirenslove.com", true },
- { "sirg.fr", true },
- { "sirihouse.com", true },
- { "siriuspup.com", true },
- { "sirtaptap.com", true },
- { "sirtuins.com", true },
- { "sirvoy.ca", true },
- { "sirvoy.co.nz", true },
- { "sirvoy.co.uk", true },
- { "sirvoy.co.za", true },
- { "sirvoy.com", true },
- { "sirvoy.com.au", true },
- { "sirvoy.de", true },
- { "sirvoy.dk", true },
- { "sirvoy.es", true },
- { "sirvoy.fi", true },
- { "sirvoy.fr", true },
- { "sirvoy.ie", true },
- { "sirvoy.jp", true },
- { "sirvoy.nl", true },
- { "sirvoy.no", true },
- { "sirvoy.se", true },
- { "sis.net.sa", true },
- { "siscompt.com", true },
- { "siselectrom.com", true },
- { "sisirbatu.tk", true },
- { "sismit.com", true },
- { "sismit.es", true },
- { "sissden.eu", true },
- { "sisseastumine.ee", true },
- { "sistel.es", true },
- { "sistem-maklumat.com", true },
- { "sistem-maklumat.com.my", true },
- { "sistemy48.ru", false },
- { "sistimiki-anaparastasi.gr", true },
- { "sistov.it", true },
- { "sisu.ai", true },
- { "sisv.eu", true },
- { "sisver.host", true },
- { "sit-brn.ru", true },
- { "sit.ec", true },
- { "sit.moe", true },
- { "sitahk.org", true },
- { "sitak.fi", true },
- { "sitanleta.de", true },
- { "sitatravel.gr", true },
- { "sitc.sk", true },
- { "site-helper.com", true },
- { "site-ua.tk", true },
- { "site2002.tk", true },
- { "sitebuilderreport.com", true },
- { "sitecentre.com.au", true },
- { "sitedebelezaemoda.com.br", true },
- { "sitedrive.fi", true },
- { "sitefactory.com.br", true },
- { "sitehoster.org", true },
- { "sitekatalog.tk", true },
- { "sitelmexico.com", true },
- { "sitemai.eu", true },
- { "sitempro.com.mx", true },
- { "sitenv.org", true },
- { "siterencontre.me", true },
- { "sites.google.com", true },
- { "sitesdesign.tk", true },
- { "sitesko.de", true },
- { "sitevandaag.nl", true },
- { "siteweb-seo.fr", true },
- { "sithijaya.tk", true },
- { "sitischu.com", true },
- { "sitiweb.nl", true },
- { "sito-online.ch", true },
- { "sittogether.club", true },
- { "sittogether.tw", true },
- { "siulam-wingchun.org", true },
- { "siusto.com", true },
- { "sivale.mx", true },
- { "sivers.org", true },
- { "sivyerge.com", true },
- { "siw64.com", true },
- { "six-o-one.com", true },
- { "sixcolors.lu", true },
- { "sixnines.net", true },
- { "sj-leisure.com", true },
- { "sjaakgilsingfashion.nl", true },
- { "sjamaan.nl", false },
- { "sjbwoodstock.org", true },
- { "sjd.is", false },
- { "sjdaws.com", true },
- { "sjenkins.net", true },
- { "sjleisure.co.uk", true },
- { "sjnp.org", true },
- { "sjoorm.com", true },
- { "sjorsvanweert.nl", true },
- { "sjrcommercialfinance.co.uk", true },
- { "sjttt.com", true },
- { "sjwheel.net", true },
- { "sjyachting.com", true },
- { "sk.tl", true },
- { "sk33t.cf", true },
- { "sk33t.ga", true },
- { "sk33t.gq", true },
- { "sk33t.ml", true },
- { "sk33t.tk", true },
- { "skagen-feriebolig.dk", true },
- { "skaginn.tv", true },
- { "skaiman.ga", true },
- { "skalar.sk", true },
- { "skalec.org", true },
- { "skalis-portage.com", true },
- { "skatclub-beratzhausen.de", true },
- { "skateaustria.at", true },
- { "skatesins.ch", true },
- { "skatingchina.com", true },
- { "skatn.de", true },
- { "skazka.ml", true },
- { "skazka.ru", true },
- { "skday.com", true },
- { "skedda.com", true },
- { "skedr.io", false },
- { "skeeley.com", true },
- { "skei.org", true },
- { "skelleypiano.com", true },
- { "skepticalsports.com", true },
- { "skeriv.com", true },
- { "sketch.jpn.com", true },
- { "sketchbox.tk", true },
- { "skgzberichtenbox.nl", true },
- { "skhaz.io", true },
- { "skhire.co.uk", true },
- { "skhoop.cz", true },
- { "skiblandford.com", true },
- { "skid.church", true },
- { "skiddle.com", true },
- { "skifairview.com", true },
- { "skifttiljutlanderbank.dk", true },
- { "skigebied.nl", true },
- { "skigebiete-test.de", true },
- { "skiingnewsletter.cf", true },
- { "skiinstructor.services", true },
- { "skiley.net", true },
- { "skill.moe", true },
- { "skillmoe.at", true },
- { "skilloutlook.com", true },
- { "skills2services.com", true },
- { "skillside.net", true },
- { "skin-cosmetic.eu", true },
- { "skincare-note.com", true },
- { "skincareagent.cf", true },
- { "sking.io", true },
- { "skinmodo.com", true },
- { "skinseries.cf", true },
- { "skinstyleglobal.com", true },
- { "skipbounce.com", true },
- { "skipfault.com", true },
- { "skippy.dog", true },
- { "skirts.tk", true },
- { "skischule-wildewiese.de", true },
- { "skizzen-zeichnungen.de", true },
- { "skjt.co.jp", true },
- { "skk.moe", true },
- { "sklep-majster.pl", true },
- { "sklepvoip.tel", true },
- { "sklotechnik.cz", true },
- { "sknclinics.co.uk", true },
- { "skol.bzh", true },
- { "skolagatt.is", true },
- { "skolakrizik.cz", true },
- { "skolappar.nu", true },
- { "skolebil.dk", true },
- { "skolem.de", true },
- { "skolnilogin.cz", true },
- { "skooks.fr", false },
- { "skoolergraph.azurewebsites.net", true },
- { "skorepova.info", true },
- { "skorovsud.ru", true },
- { "skorpil.cz", true },
- { "skortekaas.nl", false },
- { "skory.us", true },
- { "skpk.de", true },
- { "skpracta.info", true },
- { "skpracta.tk", true },
- { "skram.de", true },
- { "skremovals.co.uk", true },
- { "sktan.com", true },
- { "sktorrent.org", true },
- { "sku-partei.de", true },
- { "skuizy.ddns.net", true },
- { "skulblaka.ch", true },
- { "skulblaka.cloud", true },
- { "skuldwyrm.no", true },
- { "skullnet.co.uk", true },
- { "skutry-levne.cz", true },
- { "skutry.cz", true },
- { "skux.ch", true },
- { "skwile-cafe.com", true },
- { "skwitko.com", true },
- { "skwlkrs.com", true },
- { "skxpl.eu.org", true },
- { "sky-coach.com", true },
- { "sky-coach.nl", true },
- { "sky-live.fr", true },
- { "sky-torch.com", true },
- { "skyanchor.com", false },
- { "skyartsfake.com", true },
- { "skyautorental.com", true },
- { "skybloom.com", true },
- { "skyblue.co.jp", true },
- { "skycmd.net", true },
- { "skyderby.ru", true },
- { "skydiverapp.com", true },
- { "skydiverecuador.com", true },
- { "skydragoness.com", true },
- { "skydrive.live.com", false },
- { "skyem.co.uk", false },
- { "skyfone.cz", true },
- { "skyger.cz", true },
- { "skylarker.org", true },
- { "skylgenet.nl", true },
- { "skylightcreative.com.au", true },
- { "skylinertech.com", true },
- { "skylineservers.com", true },
- { "skyloisirs.ch", false },
- { "skyn3t.in", true },
- { "skynet-research.us", true },
- { "skynet233.ch", false },
- { "skynet800.goip.de", true },
- { "skynetnetwork.eu.org", true },
- { "skynetstores.ae", true },
- { "skyntalent.com", true },
- { "skyoy.com", true },
- { "skype.com", true },
- { "skypech.com", true },
- { "skypefr.com", true },
- { "skyportcloud.com", true },
- { "skyquid.co.uk", true },
- { "skyros.us", true },
- { "skys-entertainment.com", true },
- { "skyscanner.com", true },
- { "skyscanner.gg", true },
- { "skyscanner.net", true },
- { "skyscanner.pt", true },
- { "skyscanner.ru", true },
- { "skyscapecanopies.com", true },
- { "skyscnr.com", true },
- { "skysoftbg.com", true },
- { "skytec.host", true },
- { "skywalkers.net", true },
- { "skywt.cn", true },
- { "skyynet.de", true },
- { "skyzimba.com.br", true },
- { "sl-bildermacher.de", true },
- { "slab.com", false },
- { "slack-files.com", true },
- { "slack.com", true },
- { "sladic.si", false },
- { "slainvet.net", true },
- { "slamdjapan.com", true },
- { "slamix.nl", true },
- { "slangbellor.com", true },
- { "slanterns.net", true },
- { "slapen17.nl", true },
- { "slash32.co.uk", true },
- { "slashcam.de", true },
- { "slashcrypto.org", true },
- { "slate.to", true },
- { "slatemc.com", true },
- { "slaughter.com", true },
- { "slaughterhouse.fr", true },
- { "slavasoloviev.com", true },
- { "slavasveta.info", true },
- { "sld08.com", true },
- { "sldlcdn.com", true },
- { "sleep-go.info", true },
- { "sleepawaycampseries.tk", true },
- { "sleepet.tw", true },
- { "sleeplessbeastie.eu", true },
- { "sleepmap.de", true },
- { "sleeps.jp", true },
- { "sleepstar.co.uk", true },
- { "sleepstar.com.mt", true },
- { "sleepstar.de", true },
- { "sleepstar.fr", true },
- { "sleestak.net", true },
- { "sleio.com", true },
- { "slepsluzbabeograd.org", true },
- { "sletat.ru", true },
- { "slevermann.de", true },
- { "slevomat.cz", true },
- { "slicklines.co.uk", true },
- { "slidebatch.com", true },
- { "slim-planet.com", true },
- { "slim-slender.com", true },
- { "slimspots.com", true },
- { "slink.hr", true },
- { "slipknot-site.tk", true },
- { "sliptrickrecords.com", true },
- { "slite.com", true },
- { "slneighbors.org", true },
- { "slo-net.net", true },
- { "slo-tech.com", true },
- { "sloancom.com", true },
- { "sloanestreetdeli.com", true },
- { "sloanrealtygroup.com", true },
- { "slobrowink.com", true },
- { "slogan.tk", true },
- { "sloneczni.pl", true },
- { "slonep.net", true },
- { "slopeedge.com", true },
- { "slopeedge.net", true },
- { "slotarazzi.com", true },
- { "slotcar.com", false },
- { "slotfara.com", true },
- { "slotfara.net", true },
- { "slothless.com", true },
- { "sloths.org", true },
- { "slotlist.info", true },
- { "slotmad.com", true },
- { "slovenskycestovatel.sk", true },
- { "slow.social", true },
- { "slow.zone", false },
- { "slowb.ro", true },
- { "slowcookingperfected.com", true },
- { "slowgames.xyz", true },
- { "slownik123.pl", true },
- { "slowsocial.email", true },
- { "slowsocial.eu", true },
- { "slowsocial.net", true },
- { "slowsocial.org", true },
- { "slpm.com", true },
- { "slpower.com", true },
- { "slrpancreaticsurgery.org", true },
- { "sluciaconstruccion.com", true },
- { "sluhockey.com", true },
- { "sluimann.de", true },
- { "slunecnice.cz", true },
- { "sluo.org", true },
- { "slusham.com", true },
- { "slushpool.com", true },
- { "slutty-girls.cf", true },
- { "slvh.fr", true },
- { "slwilde.ca", true },
- { "slxh.eu", true },
- { "slxh.nl", true },
- { "slymak.com", true },
- { "slytech.ch", false },
- { "slyvon.com", true },
- { "sm-kyoushitsu.com", true },
- { "sm.link", true },
- { "sm.ms", true },
- { "sma-gift.com", true },
- { "smackhappy.com", true },
- { "smakassen.no", true },
- { "smakoszwegrzynka.pl", true },
- { "smaksbanken.no", true },
- { "smallbytedesign.co", true },
- { "smallcloudsolutions.co.za", true },
- { "smalldata.tech", true },
- { "smalle-voet.de", true },
- { "smallhadroncollider.com", true },
- { "smalltalkconsulting.com", true },
- { "smaltimento-rifiuti.com", true },
- { "smaltimento-rifiuti.org", true },
- { "smaltimento.caserta.it", true },
- { "smaltimento.milano.it", true },
- { "smaltimento.napoli.it", true },
- { "smaltimento.roma.it", true },
- { "smaltimento.salerno.it", true },
- { "smaltimentoamianto.campania.it", true },
- { "smaltimentoamianto.frosinone.it", true },
- { "smaltimentoamianto.latina.it", true },
- { "smaltimentorifiuti.firenze.it", true },
- { "smaltimentorifiuti.livorno.it", true },
- { "smaltimentorifiuti.milano.it", true },
- { "smaltimentorifiuti.napoli.it", true },
- { "smaltimentorifiuti.prato.it", true },
- { "smaltimentorifiuti.roma.it", true },
- { "smaltimentorifiuti.veneto.it", true },
- { "smamunir.is", true },
- { "smares.de", true },
- { "smarntrading.com", true },
- { "smart-informatics.com", true },
- { "smart-wohnen.net", true },
- { "smart.gov", true },
- { "smartacademy.ge", true },
- { "smartacademy.pro", true },
- { "smartairkey.com", true },
- { "smartandcom.ch", false },
- { "smartandhappychild.ro", false },
- { "smartass0027.com", true },
- { "smartcheck.gov", true },
- { "smartcleaningcenter.nl", true },
- { "smartcover.tk", true },
- { "smartcpa.ca", true },
- { "smartdb.jp", true },
- { "smartedg.io", true },
- { "smartfit.cz", true },
- { "smartftp.com", true },
- { "smartgrid.gov", true },
- { "smarthdd.com", true },
- { "smarthealthinnovationlab.com", true },
- { "smarthinking.nl", true },
- { "smarthouse.de", true },
- { "smartime.com.ar", true },
- { "smartjoin.style", true },
- { "smartleads.tk", true },
- { "smartlink.sk", true },
- { "smartlocksmith.com", true },
- { "smartlogreturns.com", true },
- { "smartlogstock.com", true },
- { "smartlogtower.com", true },
- { "smartlybuy.com", true },
- { "smartmachine.com", true },
- { "smartmeal.ru", true },
- { "smartmessages.net", true },
- { "smartminibushire.co.uk", true },
- { "smartmomsmartideas.com", true },
- { "smartmones.com", true },
- { "smartpanelsmm.com", true },
- { "smartpatika.hu", true },
- { "smartpheromones.com", true },
- { "smartphone-blog.de", true },
- { "smartphonechecker.co.uk", true },
- { "smartphones-baratos.com", true },
- { "smartphonesolution.tk", true },
- { "smartplace.ro", true },
- { "smartpolicingplatform.com", true },
- { "smartproductguide.com", true },
- { "smartpti.net", true },
- { "smartrise.us", true },
- { "smartservices.nl", true },
- { "smartshiftme.com", true },
- { "smartship.co.jp", true },
- { "smartshoppers.es", true },
- { "smartsitio.com", true },
- { "smartsparrow.com", true },
- { "smartstep.pt", true },
- { "smartthursday.hu", true },
- { "smartweb.ge", true },
- { "smartwoodczech.cz", true },
- { "smartwritingservice.com", true },
- { "smartwurk.nl", false },
- { "smatch.com", true },
- { "smb445.com", true },
- { "smcj.xyz", true },
- { "smdavis.us", true },
- { "smdcn.net", true },
- { "smdtk.com", true },
- { "sme-gmbh.net", true },
- { "smeetsengraas.com", true },
- { "smelly.cloud", true },
- { "smesitel-online.ru", true },
- { "smeso.it", true },
- { "smexpt.com", true },
- { "smh.me", true },
- { "smiatek.name", true },
- { "smiblog.tk", true },
- { "smilecon.cf", true },
- { "smilenwa.com", true },
- { "smilesatlakewood.com", true },
- { "smilessoftplay.co.uk", true },
- { "smileytechguy.com", true },
- { "smileywoodflooring.com", true },
- { "smime.io", true },
- { "smimea.info", true },
- { "smipty.cn", true },
- { "smipty.com", true },
- { "smit.com.ua", true },
- { "smith.co", false },
- { "smithandcanova.co.uk", false },
- { "smithchung.eu", true },
- { "smithf.red", true },
- { "smithsanchez.com", true },
- { "smits.frl", true },
- { "smkw.com", false },
- { "smlk.org", true },
- { "smm.im", true },
- { "smmpanelweb.com", true },
- { "smokeandmirrors.agency", true },
- { "smokefree.gov", true },
- { "smokefreerowan.org", true },
- { "smokeping.pl", true },
- { "smokeus.dk", true },
- { "smokinghunks.com", true },
- { "smoo.st", true },
- { "smoothcomp.com", true },
- { "smoothgesturesplus.com", true },
- { "smoothiecriminals.com", true },
- { "smoothtalker.com", true },
- { "smoqerhome.ddns.net", true },
- { "smrtrpck.com", true },
- { "sms-go.ru", true },
- { "sms-pro.tk", true },
- { "sms.storage", true },
- { "sms72.tk", true },
- { "smsappointment.com", true },
- { "smsbrana.cz", true },
- { "smsinger.com", true },
- { "smsk.email", true },
- { "smsk.io", true },
- { "smskmail.com", true },
- { "smsprivacy.org", true },
- { "smspujcka24.eu", true },
- { "smtenants.cn", true },
- { "smtp.in.th", true },
- { "smtparish.org", true },
- { "smuncensored.com", true },
- { "smuns.ch", true },
- { "smutek.net", true },
- { "smvcm.com", true },
- { "smx.net.br", true },
- { "sn0int.com", true },
- { "snabbare-dator.se", true },
- { "snabbit-support.nu", true },
- { "snabbit-support.se", true },
- { "snabblim.tk", true },
- { "snackbesteld.nl", true },
- { "snafu.cz", true },
- { "snakafya.com", true },
- { "snap.com", true },
- { "snapappointments.com", true },
- { "snapintegrations.net", true },
- { "snapserv.ch", true },
- { "snapserv.net", true },
- { "snargol.com", true },
- { "snatch-note.tk", true },
- { "snatch.com.ua", true },
- { "snazel.co.uk", true },
- { "sncdn.com", true },
- { "sndbouncycastles.co.uk", true },
- { "snea-kers.tk", true },
- { "sneak.berlin", true },
- { "sneakersmexs.com", true },
- { "sneakpod.de", true },
- { "sneakycode.net", true },
- { "sneakynote.com", true },
- { "sneakypaw.com", true },
- { "sneberger.cz", false },
- { "sneed.it", true },
- { "sneedit.com", true },
- { "sneedit.de", true },
- { "snegozaderzhatel.ru", true },
- { "snel4u.nl", true },
- { "snelbv.nl", true },
- { "snelshops.nl", true },
- { "snelwebshop.nl", true },
- { "snelxboxlivegold.nl", true },
- { "snerith.com", true },
- { "snfdata.com", false },
- { "sngeo.com", true },
- { "sngnews.tk", true },
- { "snh48live.org", true },
- { "sniderman.eu.org", true },
- { "sniderman.org", true },
- { "sniderman.us", true },
- { "sniep.net", true },
- { "sniffing.gq", true },
- { "snille.com", true },
- { "snipermarkettiming.com", true },
- { "snipl.io", true },
- { "snippet.host", true },
- { "snippet.wiki", false },
- { "snipr.gg", true },
- { "snizl.com", true },
- { "snj.pt", true },
- { "snl.no", true },
- { "sno-kingroofing-gutters.com", true },
- { "snoerendevelopment.nl", true },
- { "snohomishsepticservice.com", true },
- { "snoopyfacts.com", true },
- { "snoot.club", true },
- { "snopyta.org", true },
- { "snortfroken.net", true },
- { "snote.io", true },
- { "snoupon.com", true },
- { "snoutsandpaws.com", true },
- { "snow-online.com", true },
- { "snow-service.it", true },
- { "snow.dog", true },
- { "snowalerts.nl", true },
- { "snowboardforum.tk", true },
- { "snowchamps.nl", true },
- { "snowdy.dk", true },
- { "snowhaze.ch", true },
- { "snowhaze.com", true },
- { "snoworld.one", true },
- { "snowpak.com", true },
- { "snowparties.com", true },
- { "snowpaws.de", true },
- { "snowplane.net", true },
- { "snowraven.de", true },
- { "snowrippers.ro", false },
- { "snowy.land", true },
- { "snroth.de", true },
- { "snrub.co", true },
- { "snsirius.cf", true },
- { "sntravel.co.uk", true },
- { "snuff.porn", true },
- { "snuverma.com", true },
- { "snwsjz.com", true },
- { "sny.no", true },
- { "so.is-a-cpa.com", true },
- { "soakgames.com", true },
- { "soap-teco.com", true },
- { "soapitup.com.au", true },
- { "soaringdownsouth.com", true },
- { "soaringtoglory.com", true },
- { "sobakasite.tk", true },
- { "sobaya-gohei.com", true },
- { "sobczakdesign.de", true },
- { "sobeau.com", true },
- { "sobersys.com", true },
- { "sobie.ch", true },
- { "sobieray.dyndns.org", true },
- { "soblaznenie.ru", true },
- { "soblaznenie2.ru", true },
- { "sobotkama.eu", true },
- { "sobreporcentagem.com", true },
- { "soc.net", true },
- { "socal-babes.com", true },
- { "socaliente.fr", true },
- { "soccers.fr", true },
- { "socheat.net", true },
- { "sochi-sochno.ru", true },
- { "sochionline.tk", true },
- { "sociability.dk", true },
- { "social-events.net", false },
- { "social-media-strategies.it", true },
- { "social-work-colleges.com", true },
- { "socialair.tk", true },
- { "socialclimb.com", true },
- { "socialhams.net", true },
- { "socialief.com", true },
- { "socializam.com", true },
- { "socializam.ro", true },
- { "sociallyunited.net", true },
- { "socialmarketingday.nl", true },
- { "socialmedia-manager.gr", true },
- { "socialnitro.com", true },
- { "socialnous.co", true },
- { "socialrank.com", true },
- { "socialsecurity.gov", false },
- { "socialsecurityhelpcenters.com", true },
- { "socialstrata.com", true },
- { "socialsurvivalist.net", true },
- { "socialtrends.pl", true },
- { "socialz.nl", true },
- { "sociedadsostenible.tk", true },
- { "societe-chablaisienne-de-revetements.com", true },
- { "societe-chablaisienne-de-revetements.fr", true },
- { "societyhilldance.com", true },
- { "sociobiology.com", true },
- { "sociology-schools.com", true },
- { "sociopathy.org", true },
- { "sockeye.io", true },
- { "sockfetish.net", true },
- { "sockscap64.com", true },
- { "socoastal.com", true },
- { "socost.net", true },
- { "socreates.cn", true },
- { "soczu.duckdns.org", true },
- { "sodadigital.com.au", true },
- { "sodafilm.de", true },
- { "sodexam.pro", true },
- { "sodi.nl", true },
- { "sodiao.cc", true },
- { "sodo.top", true },
- { "sodomojo.com", true },
- { "soe-server.com", true },
- { "sofa-rockers.org", true },
- { "sofabedshop.de", true },
- { "sofaclean.co.uk", true },
- { "sofacleanerslondon.co.uk", true },
- { "soffit.com", true },
- { "sofgen.com", true },
- { "sofiadaoutza.gr", true },
- { "sofiaestado.com", true },
- { "sofialobocera.com", true },
- { "sofiavanmoorsel.com", true },
- { "sofiawestergren.com", true },
- { "sofiesteinfeld.de", true },
- { "sofoco.us", true },
- { "sofortimplantate-muenchen.de", true },
- { "soft41.ru", true },
- { "softandbouncy.co.uk", true },
- { "softanka.com", true },
- { "softbit.pt", true },
- { "softblinds.co.uk", true },
- { "softchin.ir", true },
- { "softcreatr.com", true },
- { "softcreatr.de", false },
- { "softfay.com", true },
- { "softlan.com.py", true },
- { "softly.sk", true },
- { "softonic.com", true },
- { "softonic.jp", true },
- { "softonic.pl", true },
- { "softplay4hire.co.uk", true },
- { "softplaynation.co.uk", true },
- { "softprayog.in", true },
- { "softskills.tech", true },
- { "softtennis-zenei.com", true },
- { "softw.net", true },
- { "software-search.com", true },
- { "softwarecloud.ml", true },
- { "softwaredesign.foundation", false },
- { "softwarepara.net", true },
- { "softwaresecurityandradefernando.be", true },
- { "softwarevoortherapeuten.nl", true },
- { "softwaylancing.com", true },
- { "softweb-dev.de", true },
- { "softwerk-edv.de", true },
- { "softwing.de", true },
- { "softwsabri.be", true },
- { "sogola.com", true },
- { "sogravatas.com.br", true },
- { "sogutma.com.tr", true },
- { "sohamroy.me", true },
- { "sointelcom.com.co", true },
- { "sojournindica.com", true },
- { "sojournsaffairs.com", true },
- { "sokaissues.info", true },
- { "sokak-sanati.tk", true },
- { "soket.ee", true },
- { "sokietech.com", true },
- { "sokkenhoek.nl", true },
- { "soko.nl", true },
- { "sokolkarvina.cz", true },
- { "sokouchousa.net", true },
- { "sol-3.de", false },
- { "sol-computers.es", true },
- { "sol24.net", true },
- { "solacyre.ch", false },
- { "solar-aydinlatma.com", true },
- { "solar-ec.com", true },
- { "solar-floodlight.ca", true },
- { "solar-systems.ca", true },
- { "solar-window.ca", true },
- { "solarfever.ga", true },
- { "solarloon.com", true },
- { "solarplan-berlin.de", true },
- { "solarstrom.net", true },
- { "soldarizona.ga", true },
- { "solden.be", true },
- { "soldesduck.be", true },
- { "soldesduck.ch", true },
- { "soldierangels.tk", true },
- { "soldout-app.com", false },
- { "sole-erdwaermetauscher.de", true },
- { "soledadpenades.com", true },
- { "soleil.space", true },
- { "solemare-hotel.it", true },
- { "solentbasketball.co.uk", true },
- { "solentbubblesandbounce.co.uk", true },
- { "solepurposetest.com", true },
- { "soleria.eu", true },
- { "soleus.nu", false },
- { "solfegiator.ch", false },
- { "soli.cafe", true },
- { "solicafe.at", true },
- { "solidarita-kosovo.net", true },
- { "solidnetwork.org", true },
- { "solidrop.net", true },
- { "solidshield.com", true },
- { "solidsteel.tk", true },
- { "solihullcarnival.co.uk", true },
- { "solihullinflatables.com", true },
- { "solihulllionsclub.org.uk", true },
- { "solihullpcrepairs.co.uk", true },
- { "solipym.net", true },
- { "solit.systems", true },
- { "solitairenetwork.com", true },
- { "solitaryride.com", true },
- { "solmek.co.uk", true },
- { "sologoc.com", true },
- { "sologstrand.com", true },
- { "sologstrand.dk", true },
- { "sologstrand.nl", true },
- { "sologstrand.no", true },
- { "sologstrand.se", true },
- { "soloinfo.it", true },
- { "solomisael.com", true },
- { "solomonsklash.io", true },
- { "solonotizie24.it", true },
- { "soloparati.cf", true },
- { "solos.im", true },
- { "solsocog.de", true },
- { "solucionespicadelly.com", true },
- { "solucionupsperu.com", true },
- { "solulan.com", true },
- { "solutions-marquagedelignes.com", true },
- { "solutiontestbank.com", true },
- { "solvation.de", true },
- { "solved.tips", true },
- { "solvemethod.com", true },
- { "solvewebmedia.com", true },
- { "solvingproblems.com.au", true },
- { "solvops.com", true },
- { "solxsys.com", true },
- { "solyplaya.info", true },
- { "soma.com.au", true },
- { "somaini.li", true },
- { "somali-derp.com", true },
- { "somaliagenda.com", true },
- { "somaliaonline.com", true },
- { "somanao.com", true },
- { "sombemerchant.com", true },
- { "somecrazy.com", true },
- { "somefe.pt", true },
- { "somehsara.tk", true },
- { "someog.com", true },
- { "somersetscr.nhs.uk", true },
- { "somethingsketchy.net", true },
- { "somethingsomething.work", true },
- { "soml.best", true },
- { "sommefeldt.com", true },
- { "sommeilsante.com", true },
- { "sommerhusudlejning.com", true },
- { "somnomedics.eu", true },
- { "somogyivar.hu", true },
- { "somosbrujas.com", true },
- { "somoshuemul.cl", true },
- { "sompani.com", true },
- { "somuchbetterwithage.com", true },
- { "somweyr.de", true },
- { "son-onlajn.tk", true },
- { "son-tolkovatel.gq", true },
- { "sona-gaming.com", true },
- { "sonacupalova.cz", true },
- { "sonaraamat.com", true },
- { "sonarqube.com", false },
- { "sonate.jetzt", true },
- { "sonavankova.cz", true },
- { "sondebase.com", true },
- { "sonderfloral.com", true },
- { "sondergaard.de", true },
- { "sonderkomission.ch", true },
- { "sondersobk.dk", true },
- { "songdew.com", true },
- { "songesdeplumes.fr", true },
- { "songshuzuoxi.com", true },
- { "songsmp3.com", true },
- { "songsmp3.cool", true },
- { "songsmp3.online", true },
- { "songsterr.com", true },
- { "songtianyi.com", true },
- { "songun.ml", true },
- { "songyang.cn", true },
- { "songzhuolun.com", true },
- { "sonia.ai", true },
- { "sonia.com", true },
- { "sonia.com.au", true },
- { "soniaai.com", true },
- { "soniaferrer.tk", true },
- { "sonic.studio", true },
- { "sonicdoe.com", true },
- { "sonicrainboom.rocks", true },
- { "sonicseo.co.uk", true },
- { "sonictonic.cloud", true },
- { "sonix.dk", true },
- { "sonixonline.com", true },
- { "sonnenta.de", true },
- { "sonneundstrand.de", true },
- { "sonodrom.tk", true },
- { "sonoecoracao.com.br", true },
- { "sonofsunart.com", true },
- { "sonomacountywriterscamp.com", true },
- { "sony-psvita.ru", true },
- { "sonyunlock.nu", true },
- { "soohealthy.nl", true },
- { "soomee.be", true },
- { "soomee1.be", true },
- { "soontm.de", true },
- { "soontm.net", true },
- { "soopure.nl", true },
- { "soora.jp", true },
- { "sooscreekdental.com", true },
- { "soph.jp", true },
- { "sophiaandmatt.co.uk", true },
- { "sophiahatstudio.com", true },
- { "sophiakligys.com", true },
- { "sophiebbeauty.co.uk", true },
- { "sopo.me", true },
- { "soprabalao.com.br", true },
- { "soptq.me", false },
- { "sor.so", true },
- { "soraharu.com", true },
- { "sorakumo.jp", true },
- { "sorcix.com", true },
- { "sorenstudios.com", true },
- { "sorever.online", true },
- { "sorincocorada.ro", true },
- { "sormeyli.com", true },
- { "sorrowfulunfounded.com", true },
- { "sort.land", true },
- { "sortesim.com.br", true },
- { "soruly.moe", true },
- { "sorz.org", true },
- { "sos-elettricista.it", true },
- { "sos-fabbro.it", true },
- { "sos-falegname.it", true },
- { "sos-idraulico.it", true },
- { "sos-muratore.it", true },
- { "sos.vg", true },
- { "sos.yt", true },
- { "sosko.in.rs", true },
- { "soslsd.org", true },
- { "sosoftplay.co.uk", true },
- { "sospeed.net", true },
- { "sostacancun.com", true },
- { "sosteam.jp", true },
- { "sosteric.si", true },
- { "sot.blue", true },
- { "sot.red", true },
- { "sotar.us", true },
- { "sotayhoctap.com", true },
- { "sotaytienganh.com", true },
- { "soterdev.com", true },
- { "sotoasobi.net", true },
- { "sottilealimentos.com.br", true },
- { "soufastnet.com.br", true },
- { "souked.com", true },
- { "souki.cz", true },
- { "soukodou.jp", true },
- { "soul-source.co.uk", true },
- { "soulcasa.com.br", true },
- { "souletter.com", true },
- { "souleymanecamara.com", true },
- { "soulike.tech", true },
- { "soulmate.dating", true },
- { "soulmating.de", true },
- { "soulogic.com", true },
- { "soulshinecreators.com", true },
- { "soumikghosh.com", true },
- { "soumya.xyz", true },
- { "soumya92.me", true },
- { "sounavholidays.com", true },
- { "sound.as", true },
- { "soundabout.nl", true },
- { "soundclick.com", true },
- { "soundeo.com", true },
- { "soundeo.net", true },
- { "soundforsound.co.uk", true },
- { "soundgasm.net", true },
- { "soundprotectionllc.com", true },
- { "sounds-familiar.info", true },
- { "soundscrate.com", true },
- { "soundtruckandautorepair.com", true },
- { "soundtube.tk", true },
- { "soundviz.fr", true },
- { "soungui.cm", true },
- { "soungui.com", true },
- { "soungui.net", true },
- { "soupbuahtaza.id", true },
- { "soupcafe.org", true },
- { "sour.is", true },
- { "sourcebox.be", true },
- { "sourcecode.tw", true },
- { "sourceway.de", true },
- { "sourcitec.com", false },
- { "sourdough.vc", true },
- { "souris.ch", false },
- { "sous-surveillance.net", false },
- { "souspind.com.br", true },
- { "southafrican.dating", true },
- { "southambouncycastle.co.uk", true },
- { "southamerican.dating", true },
- { "southbankregister.com.au", true },
- { "southbendflooring.com", true },
- { "southcountyplumbing.com", true },
- { "southdakotahealthnetwork.com", true },
- { "southeastradiology.com", true },
- { "southeastvalleyurology.com", true },
- { "southernlights.xyz", true },
- { "southernmost.us", true },
- { "southernsurgicalga.com", true },
- { "southernutahinfluencers.com", true },
- { "southflanewsletter.com", true },
- { "southlakenissanparts.com", true },
- { "southlandurology.com", true },
- { "southmill.com", true },
- { "southmorangtownhouses.com.au", true },
- { "southpointcollision.com", true },
- { "southside-crew.com", true },
- { "southside-digital.co.uk", true },
- { "southside-tuning-day.de", true },
- { "southsideshowdown.com", true },
- { "southwestrda.org.uk", true },
- { "souzanabellydance.com", true },
- { "sovendus.com", true },
- { "sovendus.de", true },
- { "soverin.net", false },
- { "sowlutions.com", true },
- { "soybase.org", true },
- { "soydemac.com", true },
- { "soyfanonline.com", true },
- { "soyladani.com", true },
- { "soyvigilante.com", true },
- { "sozai-good.com", true },
- { "sozialstation-ritterhude.de", true },
- { "sozialy.com", true },
- { "sozon.ca", true },
- { "sp-sites.com.au", true },
- { "sp.com.pl", true },
- { "sp8ce.co", true },
- { "space-inc.co.jp", true },
- { "space-it.de", true },
- { "spaceanimalnutrition.com", true },
- { "spaceapi.io", true },
- { "spacebaseapp.com", true },
- { "spacebear.ee", true },
- { "spacebestnews.tk", true },
- { "spacecaps.xyz", true },
- { "spacedots.net", true },
- { "spacehighway.ms", true },
- { "spacehighways.net", true },
- { "spacehost.de", true },
- { "spacestation13.com", true },
- { "spaceunique.de", true },
- { "spaceunique.eu", true },
- { "spacinov.com", true },
- { "spacivox.com", true },
- { "spackova.cz", true },
- { "spaconnection.com", true },
- { "spaenny.tf", true },
- { "spaghettiphreakers.tk", true },
- { "spaghettiwesterns.tk", true },
- { "spahireleeds.co.uk", true },
- { "spaid.xyz", false },
- { "spakurort.eu", true },
- { "spaldingwall.com", true },
- { "spalnobelyo.com", true },
- { "spamdrain.com", true },
- { "spamloco.net", true },
- { "spamwc.de", true },
- { "spanier.es", true },
- { "spanishfox.com", true },
- { "spanjeflydrive.nl", true },
- { "spanner.works", true },
- { "spanyolul.hu", true },
- { "sparanoid.com", true },
- { "sparanoidstatus.com", true },
- { "sparkar.com", true },
- { "sparkasse.de", true },
- { "sparkforautism.org", true },
- { "sparklebastard.com", true },
- { "sparklesdelivery.com", true },
- { "sparklesvt.com", true },
- { "sparklingessentials.ga", true },
- { "sparklingloungecampiglio.it", true },
- { "sparkstack.co", true },
- { "sparmedo.de", true },
- { "sparta-en.org", true },
- { "spartacuslife.com", true },
- { "spartaermelo.nl", true },
- { "spartancoin.ooo", true },
- { "spartatowing.com", true },
- { "sparumzuege.de", true },
- { "spasicilia.it", true },
- { "spaysy.com", true },
- { "spaziobenedetti.com.br", true },
- { "spaziopervoi.com.br", true },
- { "spazturtle.co.uk", true },
- { "spazzacamino.roma.it", true },
- { "spbet99.com", true },
- { "spboot.net", true },
- { "spd-porta-westfalica.eu", true },
- { "spdepartamentos.com.br", true },
- { "spdf.net", true },
- { "spdillini.com", true },
- { "spe.org.co", true },
- { "speak-polish.com", true },
- { "speakersbusiness.com", true },
- { "spearfishingmx.com", true },
- { "specdrones.us", true },
- { "speciale.cf", true },
- { "specialproperties.com", true },
- { "specialtyalloys.ca", true },
- { "speciesism.com", true },
- { "spectrum-markets.com", true },
- { "spectrum.gov", true },
- { "spectrumelectrical-brisbane.com.au", true },
- { "spediscifiori.com", true },
- { "speech-balloon.com", true },
- { "speechdrop.net", true },
- { "speechmate.com", true },
- { "speechmore.ml", true },
- { "speechndraw.com", false },
- { "speeddate.it", false },
- { "speeder.best", true },
- { "speeder.im", true },
- { "speederss.best", true },
- { "speedof.me", true },
- { "speedracer.ca", true },
- { "speedsportofhull.co.uk", true },
- { "speedtailors.com", true },
- { "speedtemplate.de", true },
- { "speedtest-russia.com", true },
- { "speedwaybusinesspark.com", true },
- { "speedwp.ch", true },
- { "speedychat.it", true },
- { "speedyjanes.com", true },
- { "speeltoneel.nl", true },
- { "speerpunt.info", true },
- { "speets.ca", true },
- { "speich.net", true },
- { "speights-law.com", true },
- { "spek.tech", true },
- { "speletrodomesticos.com.br", true },
- { "spellcheck24.net", true },
- { "spellcheckci.com", true },
- { "spellchecker.net", true },
- { "spellic.com", true },
- { "speme-design.com", true },
- { "spenglerei-shop.de", true },
- { "spenny.tf", true },
- { "sperandii.it", true },
- { "spero.solutions", true },
- { "sperrstun.de", true },
- { "spesys-services.fr", true },
- { "speventos.es", true },
- { "spewingmews.moe", true },
- { "spha.info", true },
- { "sphacks.io", true },
- { "sphardy.com", true },
- { "sphere-realty.com", true },
- { "sphericalvision.cz", true },
- { "sphido.org", false },
- { "spicejungle.com", true },
- { "spicemoney.com", true },
- { "spicydog.org", true },
- { "spicymatch.com", true },
- { "spidercrabs.tk", true },
- { "spideroak.com", true },
- { "spiders.org.ua", true },
- { "spielezar.ch", true },
- { "spielland.ch", true },
- { "spielmit.com", true },
- { "spieltexte.de", true },
- { "spiet.nl", true },
- { "spiff.eu", true },
- { "spiga.ch", false },
- { "spikar.gr", true },
- { "spikejeon.tk", true },
- { "spikelands.com", true },
- { "spilka-dyplomativ.tk", true },
- { "spillforum.no", true },
- { "spillmaker.no", false },
- { "spilnu.dk", true },
- { "spinalien.net", false },
- { "spingenie.com", true },
- { "spins.fedoraproject.org", true },
- { "spinspin.wtf", true },
- { "spira.kiev.ua", true },
- { "spirella-shop.ch", true },
- { "spirit-hunters-germany.de", false },
- { "spirit55555.dk", true },
- { "spiritous.cf", true },
- { "spiritual.dating", true },
- { "spiritualife.net", true },
- { "spiritualites.ch", true },
- { "spiritualityrise.com", true },
- { "spiroduct.gr", true },
- { "spisbilligt.dk", true },
- { "spitfiredialers.com", true },
- { "spittank.info", true },
- { "spittersberger.recipes", true },
- { "splarty.net", true },
- { "splendidspoon.com", true },
- { "splendorservizi.it", true },
- { "splikity.com", true },
- { "splintermail.com", true },
- { "splitdna.com", true },
- { "splitreflection.com", true },
- { "splnk.net", true },
- { "sploch.com", true },
- { "splopp.com", true },
- { "splunk.net", true },
- { "spmax.design", true },
- { "spmax.top", true },
- { "spnitalianfestival.com", true },
- { "spodelime.com", true },
- { "spofia.nu", true },
- { "spokaneexteriors.com", true },
- { "spokanepolebuildings.com", true },
- { "spokeo.com", true },
- { "spokesly.com", true },
- { "spoluck.ca", true },
- { "spolwind.de", true },
- { "spom.net", true },
- { "sponc.de", true },
- { "spongepowered.org", true },
- { "spontex.org", true },
- { "spoofhaus.com", true },
- { "spookbook.net", true },
- { "spookquest.com", true },
- { "spoopy.link", true },
- { "spoorcam.nl", true },
- { "sporemasters.com", true },
- { "sporki.fun", true },
- { "spornkuller.de", true },
- { "sport-decouverte.com", true },
- { "sport-in-sundern.de", true },
- { "sport-potreby.cz", true },
- { "sport-potreby.sk", true },
- { "sport-socken.net", true },
- { "sportabee.com", false },
- { "sportbetuwe.nl", false },
- { "sportboot.mobi", true },
- { "sportchirp.com", true },
- { "sporter.com", true },
- { "sportingpontenova.es", true },
- { "sportmundschutz-info.de", true },
- { "sportnesia.com", true },
- { "sportovnidum.cz", true },
- { "sportpal.net", true },
- { "sportparks.com", true },
- { "sportparks.org", true },
- { "sports-colleges.com", true },
- { "sports-online.cf", true },
- { "sports-sites.ml", true },
- { "sports.dating", true },
- { "sportsdrobe.com", true },
- { "sportsjaw.com", true },
- { "sportsmansblog.com", true },
- { "sportstreetstyle.com", true },
- { "sportswear.by", true },
- { "sportticino.ch", true },
- { "sporttomorrow.com", true },
- { "sporttown.it", true },
- { "sportugalia.ru", true },
- { "sportvereine.online", true },
- { "sportxt.ru", true },
- { "spot-lumiere-led.com", true },
- { "spot.su", true },
- { "spot9.com", true },
- { "spotfake.news", true },
- { "spotlabs.uk", true },
- { "spotrebitelskecentrum.sk", true },
- { "spotsee.io", true },
- { "spotswoodvet.com", true },
- { "spottedpenguin.co.uk", true },
- { "spotty.tech", true },
- { "spotupload.com", true },
- { "spotworld.co", true },
- { "spotypal.com", true },
- { "sppin.fr", true },
- { "sprachenlernen24.org", true },
- { "sprachfreudehoch3.de", true },
- { "sprax2013.de", true },
- { "spreadsheetgear.com", true },
- { "spreadsheets.google.com", true },
- { "spreed.me", true },
- { "spreenauto.com", true },
- { "spricknet.de", true },
- { "springboardsandmore.com", true },
- { "springerundpartner.de", true },
- { "springfield-ohio-post.com", true },
- { "springhillmaine.com", true },
- { "springhow.com", true },
- { "springtxcarpetcleaning.com", true },
- { "sprintkitchen.com", true },
- { "spritmonitor.de", true },
- { "spritsail.io", true },
- { "spron.in", true },
- { "sprossenwand.de", true },
- { "sproutways.com", true },
- { "sprucecreekclubs.com", true },
- { "sprucecreekgcc.com", true },
- { "spruijtparket.nl", true },
- { "sps-lehrgang.de", true },
- { "spsidahoinc.com", true },
- { "spslawoffice.com", true },
- { "spsnewengland.org", true },
- { "spstaticfiles.com", true },
- { "spt.re", true },
- { "spteam.net", true },
- { "sptk.org", true },
- { "spuffin.com", true },
- { "spufpowered.com", true },
- { "spur.com.br", true },
- { "spurghi.roma.it", true },
- { "spydar007.com", true },
- { "spydar007.net", true },
- { "spydar007.wiki", true },
- { "spydersec.com", true },
- { "spyfone.com", true },
- { "spyprofit.ru", true },
- { "sqap.pt", true },
- { "sqclick.com", true },
- { "sqdll.com", true },
- { "sqills.com", true },
- { "sql-und-xml.de", true },
- { "sql.bi", true },
- { "sqlapius.net", true },
- { "sqlbi.com", true },
- { "sqlfeatures.com", false },
- { "sqlwrapper.com", true },
- { "sqprod.co", true },
- { "sqr-training.com", true },
- { "sqreemtech.com", true },
- { "sqroot.eu", true },
- { "sqsd.xyz", true },
- { "squadlinx.com", true },
- { "squadronprotectiveservices.net", true },
- { "square-gaming.org", true },
- { "square-src.de", false },
- { "square.com", true },
- { "square.com.mx", true },
- { "square.engineering", true },
- { "square.it", true },
- { "square.ly", true },
- { "square.mx", true },
- { "square.site", true },
- { "squarefootllcconstruction.com", true },
- { "squareforums.com", true },
- { "squaregift.com", true },
- { "squaregift.net", true },
- { "squaregift.org", true },
- { "squareinstallments.com", true },
- { "squareinvite.com", true },
- { "squareinvoices.com", true },
- { "squaremktg.com", true },
- { "squaremktgstaging.com", true },
- { "squareoffer.com", true },
- { "squareregister.com", true },
- { "squaresolutions.com", true },
- { "squarestagingexternal.com", true },
- { "squareup.com", true },
- { "squareupsandbox.com", true },
- { "squattra.com", true },
- { "squeezemetrics.com", true },
- { "squido.ch", true },
- { "squidparty.com", true },
- { "squirex2.com", true },
- { "sr-33.com", true },
- { "sr33.com", true },
- { "sr88.co.uk", true },
- { "sr88.me.uk", true },
- { "srae.me.uk", true },
- { "srandom.com", true },
- { "sranje.rocks", true },
- { "srb.help", true },
- { "srbija-nekretnine.org", false },
- { "src-el-main.com", true },
- { "src.fedoraproject.org", true },
- { "srchub.org", true },
- { "srcprivatesecurity.com", true },
- { "srdmarketingservice.com", true },
- { "srfloki.com", true },
- { "srife.net", true },
- { "srigc.com", true },
- { "srihash.org", false },
- { "srilankan-hope-for-children.nl", true },
- { "srimakc.com", true },
- { "sriravana.tk", true },
- { "sritalaska.tk", true },
- { "sritcities.tk", true },
- { "srithunters.tk", true },
- { "sritidaho.tk", true },
- { "sritspanish.tk", true },
- { "sritvermont.tk", true },
- { "srkarra.com", true },
- { "srkb.net", true },
- { "sro.center", true },
- { "srochnozaim.gq", true },
- { "srpx.de", true },
- { "srqpedals.com", true },
- { "srrdb.com", true },
- { "srroddy.com", true },
- { "srsforward.email", true },
- { "srsfwd.com", true },
- { "srsfwd.email", true },
- { "srsfwd.eu", true },
- { "srsfwd.net", true },
- { "srsfwd.org", true },
- { "srv.so", true },
- { "ss-news.tk", true },
- { "ss.com", true },
- { "ss.lazio.it", true },
- { "ss.lt", true },
- { "ss.lv", true },
- { "ss.systems", true },
- { "ss.ua", true },
- { "ss09.com", true },
- { "ss64.com", true },
- { "ss64.org", true },
- { "ss88.uk", true },
- { "ss9188.com", true },
- { "ss9288.com", true },
- { "ss9721.com", false },
- { "ssa.gov", false },
- { "ssab.gov", true },
- { "ssbgportal.net", true },
- { "ssbkk.ru", true },
- { "ssbrm.ch", true },
- { "ssc.vg", true },
- { "ssc8689.com", true },
- { "ssc8689.net", true },
- { "ssccp.in", true },
- { "sschd.cc", true },
- { "ssdax.com", true },
- { "ssdpalermo.it", true },
- { "ssenberg.nl", true },
- { "ssfbank.no", true },
- { "ssh-vault.com", true },
- { "ssky.cn", true },
- { "ssl-zertifikate.de", true },
- { "ssl.do", true },
- { "ssl.google-analytics.com", true },
- { "ssl.md", true },
- { "ssl24.pl", true },
- { "ssl247.co.uk", true },
- { "ssl247.com.mx", true },
- { "ssl247.de", true },
- { "ssl247.dk", true },
- { "sslbrain.com", true },
- { "sslcertificaten.nl", true },
- { "sslcheck.nl", true },
- { "sslmate.com", true },
- { "sslok.com", false },
- { "sslping.com", true },
- { "sslpoint.com", true },
- { "ssls.cz", true },
- { "sslsecurity.ooo", true },
- { "sslsurvey.de", true },
- { "ssmca.com", true },
- { "ssmic.com", true },
- { "ssmpuc.com", true },
- { "ssmut.be", true },
- { "ssone.ee", true },
- { "sspanel.host", true },
- { "ssr.llc", true },
- { "ssready.io", true },
- { "ssready.org", true },
- { "ssrr.xyz", true },
- { "sssldurban.co.za", true },
- { "sssppp.gq", true },
- { "sstaging.com", true },
- { "ssuiteoffice.com", true },
- { "ssuitesoft.com", true },
- { "st-bede.org", true },
- { "st-innovationcup.com", true },
- { "st-kilian-markt-erlbach.de", true },
- { "st-news.de", true },
- { "st-shakyo.jp", true },
- { "st-steuern.de", true },
- { "st-tir-pln.fr", true },
- { "st42.fr", true },
- { "staatschutz.at", true },
- { "staatsschutz.at", true },
- { "staatsschutzgesetz.at", true },
- { "stabilimento.it", true },
- { "stable.network", true },
- { "stablelib.com", true },
- { "stackpath.com", true },
- { "stackptr.com", true },
- { "stackunderflow.com", true },
- { "staddlestonesbowness.co.uk", true },
- { "stadiumexperience.com", true },
- { "stadlwirt.at", true },
- { "stadm.com", false },
- { "stadsbos013.nl", true },
- { "stadsbygd.info", true },
- { "stadtbauwerk.at", false },
- { "stadtbuecherei-bad-wurzach.de", true },
- { "stadterneuerung-hwb.de", true },
- { "stadtkapelle-oehringen.de", true },
- { "stadtplan-ilmenau.de", true },
- { "stadtundbaum.de", true },
- { "staer.ro", true },
- { "staff.direct", true },
- { "staffexcellence.com", true },
- { "staffordlabour.org.uk", true },
- { "stage-recuperation-points-bordeaux.com", true },
- { "stage-recuperation-points-lille.com", true },
- { "stage-recuperation-points-lyon.com", true },
- { "stage-recuperation-points-marseille.com", true },
- { "stage-recuperation-points-montpellier.com", true },
- { "stage-recuperation-points-nantes.com", true },
- { "stage-recuperation-points-nice.com", true },
- { "stage-recuperation-points-paris.com", true },
- { "stage-recuperation-points-reims.com", true },
- { "stage-recuperation-points-rennes.com", true },
- { "stage-recuperation-points-strasbourg.com", true },
- { "stage-recuperation-points-toulouse.com", true },
- { "stage.wepay.com", false },
- { "stage4.ch", true },
- { "stageirites.com", true },
- { "stageirites.fr", true },
- { "stageirites.org", true },
- { "stagelectrical.com.au", true },
- { "stagemaster.cz", true },
- { "stagespediatrics.com", true },
- { "stahlfors.com", true },
- { "stainedglass.net.au", true },
- { "stainhaufen.de", true },
- { "stair.ch", true },
- { "stairfallgames.com", true },
- { "stairlin.com", true },
- { "stajka.tk", true },
- { "staklim-malang.info", true },
- { "stako.jp", true },
- { "staktrace.com", true },
- { "stal-rulon.ru", true },
- { "stalder.work", true },
- { "staljedevledder.nl", true },
- { "stalker-eyes.ga", true },
- { "stalker-shop.com", true },
- { "stalkerteam.pl", true },
- { "stalkr.net", true },
- { "stalkthe.net", true },
- { "stamboomforum.nl", true },
- { "stamboomgids.nl", true },
- { "stameystreet.com", true },
- { "stamkassa.nl", true },
- { "stammtisch.domains", true },
- { "stamparmakarije.me", true },
- { "stampsbar.co.uk", true },
- { "standagainstspying.org", true },
- { "standard.co.uk", true },
- { "standardequipment.com", true },
- { "standards.gov", true },
- { "standartgost.ru", true },
- { "standheizung-shop.de", true },
- { "stangeland.tk", true },
- { "stanmed24.pl", true },
- { "stannri.org", true },
- { "stanron.com", true },
- { "stansweather.net", true },
- { "stantabler.com", true },
- { "stanthony-hightstown.net", true },
- { "stanthonymaryclaret.org", true },
- { "staparishgm.org", true },
- { "stapvoorstapduurzaam.nl", true },
- { "star-citizen.wiki", true },
- { "star-clean.it", true },
- { "star-darom.co.il", true },
- { "star-killer.net", true },
- { "star.garden", true },
- { "star.watch", true },
- { "starb.in", true },
- { "starbaese.de", true },
- { "starcoachservices.ca", true },
- { "starcomproj.com", true },
- { "stardam.net", true },
- { "stardanceacademy.net", true },
- { "stardawg.co.uk", true },
- { "starease.net", true },
- { "stareplanymiast.pl", true },
- { "starfishconstruction.com", true },
- { "starflix.uk", true },
- { "starfriend.ru", true },
- { "stargate365.com", true },
- { "stargatelrp.co.uk", true },
- { "stargazer.de", true },
- { "stariders.com", true },
- { "starina.ru", true },
- { "starinc.xyz", true },
- { "starka.st", true },
- { "starkbim.com", true },
- { "starkvilleurgentcareclinic.com", true },
- { "starlightentertainmentdevon.co.uk", true },
- { "starlim.co.in", true },
- { "starlim.org", true },
- { "starlux.cz", true },
- { "starmtech.fr", true },
- { "starorusing.com", true },
- { "starover.tk", true },
- { "starpeak.org", true },
- { "starpoles.com", true },
- { "starreview.tk", true },
- { "starryvoid.com", true },
- { "starsandmanifolds.xyz", true },
- { "starsguru.com", true },
- { "starskim.cn", true },
- { "starsoft.io", true },
- { "starstreak.net", false },
- { "startablog.tv", true },
- { "startachim.eu", true },
- { "startaninflatablebusiness.com", true },
- { "startanull.ru", true },
- { "startersiteweb.com", true },
- { "startlab.sk", true },
- { "startle.cloud", true },
- { "startle.studio", true },
- { "startlemusic.com", true },
- { "startliste.info", true },
- { "startmail.com", true },
- { "startpage.com", true },
- { "startpage.info", true },
- { "startrek.in", true },
- { "startstunter.com", true },
- { "starttls-everywhere.org", true },
- { "starttraffic.uk", true },
- { "startupisland.tw", true },
- { "startupstack.tech", true },
- { "startw.cf", true },
- { "starvizyon.com", true },
- { "stasiniewicz.com", true },
- { "stassi.ch", true },
- { "stastka.ch", true },
- { "stat.ink", true },
- { "statecollegemortgages.com", true },
- { "static-myfxee-808795.c.cdn77.org", true },
- { "static-myfxoau-808795.c.cdn77.org", true },
- { "static-myfxouk-808795.c.cdn77.org", true },
- { "static.wepay.com", false },
- { "statically.io", true },
- { "staticfury.com", true },
- { "stationa.ch", false },
- { "stationary-traveller.eu", true },
- { "stationcharlie.co.za", true },
- { "statistik-seminare.de", true },
- { "statistikian.com", true },
- { "statnevlajky.sk", true },
- { "statnivlajky.cz", true },
- { "statofus.com", true },
- { "stats.do", true },
- { "stats.g.doubleclick.net", true },
- { "statusboard.eu", true },
- { "statuscode.ch", true },
- { "statusmachine.com", true },
- { "statuswatch.io", true },
- { "stau-a.de", true },
- { "stavanger.kommune.no", true },
- { "stavnager.net", true },
- { "stavros.ovh", true },
- { "staycurrent.eu", true },
- { "staycurrent.nl", true },
- { "stayme.cz", true },
- { "stayokay.com", true },
- { "stayschemingco.com", true },
- { "stb-lemke.de", true },
- { "stb-schefczyk.de", true },
- { "stb-timmler.de", true },
- { "stb.gov", true },
- { "stbarnabashospice.co.uk", true },
- { "stbartholomewmanchester.org", true },
- { "stbennett.org", true },
- { "stbl.org", true },
- { "stbridgeteastfalls.org", true },
- { "stc-istok.com.ua", true },
- { "stcable.net", true },
- { "stcatharine-stmargaret.org", true },
- { "stceciliakearny.org", true },
- { "stclairvet.co.uk", true },
- { "stclementmatawan.org", true },
- { "stclementreligioused.org", true },
- { "stcplasticsurgery.com", true },
- { "std-home-test.com", true },
- { "stderr.cc", true },
- { "stdrc.cc", false },
- { "steakovercooked.com", true },
- { "stealingheather.com", true },
- { "stealsaga.net", true },
- { "stealthmodel.fi", true },
- { "steam-rewards.tk", true },
- { "steam-route-saxony.com", true },
- { "steamdb.info", true },
- { "steamerrors.com", true },
- { "steamgifts.com", true },
- { "steamhours.com", false },
- { "steamosaic.com", true },
- { "steampress.io", true },
- { "steamsprays.tk", true },
- { "steamstat.us", true },
- { "steamtrades.com", true },
- { "steamwhale.com", true },
- { "stebenkov.tk", true },
- { "stebet.net", true },
- { "stedb.eu", true },
- { "steef389.eu", true },
- { "steel-roses.de", true },
- { "steelbeasts.org", true },
- { "steelephys.com.au", true },
- { "steelmounta.in", true },
- { "steelpoint.com.pl", true },
- { "steelsoldiers.com", true },
- { "steemit.com", true },
- { "steemyy.com", true },
- { "steeple-claydon.org", true },
- { "steering-wheel.tk", true },
- { "steerty.com", true },
- { "steevels.nl", true },
- { "stefan-bayer.eu", true },
- { "stefan-rothe.ch", true },
- { "stefan-schlueter.de", true },
- { "stefan-schmid.com", true },
- { "stefan.de", true },
- { "stefanbayer.de", true },
- { "stefancosma.xyz", true },
- { "stefanengineering.com", true },
- { "stefanfriedli.ch", true },
- { "stefanknobel.ch", true },
- { "stefanorossi.it", true },
- { "stefanvanburen.xyz", false },
- { "stefanvd.net", true },
- { "stefanviehbacher.de", true },
- { "stefany.eu", true },
- { "stefchapman.tk", true },
- { "steffenmeister.com", true },
- { "steffentreeservice.com", true },
- { "steffi-knorn.de", true },
- { "stefpastoor.nl", true },
- { "stehlik.co.uk", true },
- { "stehlik.sk", true },
- { "steidlewirt.de", true },
- { "steigerlegal.ch", true },
- { "steinbergmedia.de", true },
- { "steiner.sh", true },
- { "steinibox.de", true },
- { "steklein.de", true },
- { "stekosouthamerica.com", true },
- { "stelfox.net", true },
- { "steliosmanousakis.gr", true },
- { "stella-artis-ensemble.at", true },
- { "stella-shop.eu", true },
- { "stellarguard.me", true },
- { "stellarium-gornergrat.ch", true },
- { "stellarx.com", true },
- { "stellatusstudios.com", true },
- { "stelleninserate.de", true },
- { "stellenticket.de", true },
- { "stellmacher.name", true },
- { "stembureauledenindenhaag.nl", true },
- { "stemcellclinic.club", true },
- { "stemcellclinic.design", true },
- { "stemcellclinic.digital", true },
- { "stemcellclinic.life", true },
- { "stemcellclinic.live", true },
- { "stemcellclinic.ltd", true },
- { "stemcellclinic.network", true },
- { "stemcellclinic.online", true },
- { "stemcellclinic.services", true },
- { "stemcellclinic.store", true },
- { "stemcellclinic.tech", true },
- { "stemcellclinic.vip", true },
- { "stemcellclinic.website", true },
- { "stemcellclinic.world", true },
- { "stemkit4kids.com", true },
- { "stemmayhem.com", true },
- { "stenaro.ch", true },
- { "stenhojmedia.dk", true },
- { "stening.co", true },
- { "steno.nl", true },
- { "stenzhorn-cloud.de", true },
- { "step2web-cms.info", true },
- { "stepanvanek.cz", true },
- { "steph.ninja", true },
- { "stephan-matthiesen.de", true },
- { "stephanao.tk", true },
- { "stephaniecalahan.com", true },
- { "stephaniedeady.ie", true },
- { "stephanieleonidasfan.tk", true },
- { "stephanieschreiber.com", true },
- { "stephansurgicalarts.com", true },
- { "stephencreilly.com", true },
- { "stephengeorge.co.uk", true },
- { "stephenhaunts.com", true },
- { "stephenhorler.com.au", true },
- { "stephenj.co.uk", true },
- { "stephenjvoiceovers.com", true },
- { "stephenlam.ca", true },
- { "stephenperreira.com", true },
- { "stephenreescarter.com", true },
- { "stephenreescarter.net", true },
- { "stephenschrauger.com", true },
- { "stephenschrauger.info", true },
- { "stephenschrauger.net", true },
- { "stephenschrauger.org", true },
- { "stephenskory.com", true },
- { "stephensol.is", true },
- { "stephensolis.com", true },
- { "stephsolis.net", true },
- { "stephspace.net", true },
- { "stephycom.com", true },
- { "steponedanceclub.co.uk", true },
- { "steppingoutinstyleonline.com", true },
- { "stepstone.dk", true },
- { "stepsweb.com", true },
- { "ster-enzo.nl", true },
- { "sterchi-fromages.ch", false },
- { "stereo.lu", true },
- { "stereochro.me", false },
- { "sterlinx.de", true },
- { "stern-freunde.de", true },
- { "stern.koeln", true },
- { "sternadel.pl", true },
- { "sternen-sitzberg.ch", true },
- { "sternenbund.info", true },
- { "sternplastic.com", true },
- { "sternsinus.com", true },
- { "sterohouse.com", true },
- { "stesti.cz", true },
- { "stetson.edu", true },
- { "steuer-voss.de", true },
- { "steuerberater-bayreuth.com", true },
- { "steuerberater-hopfner.de", true },
- { "steuerkanzlei-edel.de", true },
- { "steuern-recht-wirtschaft.de", true },
- { "steuertipps-sonderausgaben.de", true },
- { "steveborba.com", true },
- { "stevebuck.tk", true },
- { "stevecostar.com", true },
- { "stevedesmond.ca", true },
- { "stevedoggett.com", true },
- { "stevegellerhomes.com", true },
- { "stevegrav.es", true },
- { "stevehaid.com", true },
- { "stevejobsfollowers.tk", true },
- { "steven-bennett.com", true },
- { "steven-klix.de", true },
- { "stevenapate.com", true },
- { "stevenbolgartersnakes.com", true },
- { "stevengrech.com", true },
- { "stevenkendypierre.com", true },
- { "stevenpilger.com", true },
- { "stevens.se", false },
- { "stevenselectricllc.com", true },
- { "steventress.com", true },
- { "stevenuniverse.xyz", true },
- { "stevenwooding.com", true },
- { "stevenz.net", true },
- { "stevenz.science", true },
- { "stevenz.xyz", true },
- { "stevepacheco.com", true },
- { "stevereedmp.co.uk", true },
- { "stevesdrivingschooltyneside.com", true },
- { "stevezheng.cf", true },
- { "stewartswines.com", true },
- { "stewpolley.com", false },
- { "steyaert.be", false },
- { "stfrancisnaugatuck.org", true },
- { "stfw.info", true },
- { "stgabrielavondalepa.org", true },
- { "stgabrielstowepa.org", true },
- { "stgeorgecomfortinn.com", true },
- { "stgeorgegolfing.com", true },
- { "stghv.com", true },
- { "sth.sh", true },
- { "sthenryrc.org", true },
- { "stian.net", true },
- { "stichtingdemuziekkamer.nl", true },
- { "stichtingliab.nl", true },
- { "stichtingsticky.nl", true },
- { "stick2bike.de", true },
- { "stickandpoketattookit.com", true },
- { "stickeramoi.com", true },
- { "stickergiant.com", true },
- { "stickertuningfetzt.de", true },
- { "stickies.io", true },
- { "stickstueb.de", true },
- { "sticky.ai", true },
- { "stickypassword.com", true },
- { "stickyricelove.com", true },
- { "stiebel-eltron.co.nz", true },
- { "stiebel-eltron.com.au", true },
- { "stiebelmedia.co.nz", true },
- { "stiebelmedia.com.au", true },
- { "stiff.wang", true },
- { "stift-kremsmuenster.at", true },
- { "stiftemaskinen.no", true },
- { "stiftung-lq.ch", true },
- { "stiftung-lq.com", true },
- { "stiftung-lq.net", true },
- { "stiftunglq.com", true },
- { "stigharder.com", true },
- { "stigviewer.com", true },
- { "stijnbelmans.be", true },
- { "stijndv.com", true },
- { "stijnodink.nl", true },
- { "stikic.me", true },
- { "stilartmoebel.de", true },
- { "stilecop.com", true },
- { "stiliankasimov.com", true },
- { "stilingavonia.lt", true },
- { "stilmobil.se", true },
- { "stilsvadba.tk", true },
- { "stiltmedia.com", true },
- { "stimmgabel.lu", true },
- { "stin.hr", true },
- { "stina-vino.hr", true },
- { "stinaspiegelberg.com", true },
- { "stingraybook.com", true },
- { "stinkefingereinhorn.de", true },
- { "stinsky.com", true },
- { "stintup.com", true },
- { "stipsan.me", true },
- { "stirblaut.de", true },
- { "stirling.co", true },
- { "stirlingpoon.com", true },
- { "stisaac.org", true },
- { "stisidores.org", true },
- { "stitch.money", true },
- { "stitchfiddle.com", true },
- { "stitchinprogress.com", true },
- { "stivesbouncycastlehire.co.uk", true },
- { "stjohncamden.com", true },
- { "stjohnin.com", true },
- { "stjohnnepomucene.com", true },
- { "stjohnsottsville.org", true },
- { "stjoseph-stcatherine.org", true },
- { "stjosephri.org", true },
- { "stjosephsoswego.com", true },
- { "stjosephspringcity.com", true },
- { "stjosephtheworker.net", true },
- { "stjscatholicchurch.org", true },
- { "stjustin.org", true },
- { "stkevin-stbenedict.org", true },
- { "stkildaosteopathy.com.au", true },
- { "stleonardmn.org", true },
- { "stlouisinsuranceco.com", true },
- { "stlouisnativeflute.com", true },
- { "stlu.de", true },
- { "stluciastar.com", true },
- { "stlukenh.org", true },
- { "stlukesbrandon.org", true },
- { "stm-net.de", true },
- { "stma.is", true },
- { "stmariagoretti.net", true },
- { "stmarkseagirt.com", true },
- { "stmarthachurch.com", true },
- { "stmarysnutley.org", true },
- { "stmaryswestwarwick.org", true },
- { "stmatthewri.org", true },
- { "stmattsparish.com", true },
- { "stmichaellvt.com", true },
- { "stmichaelunion.org", true },
- { "stmlearning.com", true },
- { "stmohrael.org", true },
- { "stmsolutions.pl", true },
- { "stmsouthcoventry.com", true },
- { "stneotsbouncycastlehire.co.uk", true },
- { "stock-solution.de", true },
- { "stockholmpride.org", true },
- { "stockpile.com", true },
- { "stockportpyramid.co.uk", true },
- { "stockstuck.com", true },
- { "stocktrader.com", true },
- { "stocp.org", true },
- { "stodieck.com", true },
- { "stoebermehl.at", true },
- { "stoerevrouwensporten.nl", true },
- { "stoffelnet.de", true },
- { "stoicatedy.ovh", true },
- { "stoildaaliyski.com", true },
- { "stoinov.com", true },
- { "stokl.com.au", true },
- { "stokvistrading.nl", true },
- { "stolarka.tk", true },
- { "stolin.info", true },
- { "stolina.de", false },
- { "stolkpotplanten.nl", true },
- { "stollen-wurm.de", true },
- { "stollenwurm.de", true },
- { "stolpi.is", false },
- { "stomt.com", true },
- { "stoneagehealth.com.au", true },
- { "stonearm.com", true },
- { "stonechatjewellers.ie", true },
- { "stonedwarf5.net", true },
- { "stonedworms.de", false },
- { "stoneedgeconcrete.com", true },
- { "stonegateapartmentsstl.com", true },
- { "stonehammerhead.org", true },
- { "stonehurstcap.com", true },
- { "stoneproperty.ie", true },
- { "stonesfamilyrestaurant.com", true },
- { "stonetribute.tk", true },
- { "stony.com", true },
- { "stonystratford.org", true },
- { "stoomstichting.nl", true },
- { "stop-activ.ga", true },
- { "stopbullying.gov", true },
- { "stopforumspam.com", true },
- { "stopfraud.gov", true },
- { "stoplossoff.tk", true },
- { "stopoverconnections.com", true },
- { "stoppage.cf", true },
- { "stopthethyroidmadness.com", true },
- { "stopthinkconnect.jp", true },
- { "stopyhrdinu.cz", true },
- { "storageideas.uk", true },
- { "stordbatlag.no", true },
- { "storedsafe.com", true },
- { "storefront.gq", true },
- { "storeit.co.uk", true },
- { "storeplus.ml", true },
- { "storey-lines.com", true },
- { "storgaarddieu.com", true },
- { "storiesbysign.com", true },
- { "storillo.com", true },
- { "storingdesk.com", true },
- { "stormboost.cz", true },
- { "stormhub.ml", true },
- { "stormi.io", true },
- { "stormingbrain.com", true },
- { "stormylegions.tk", true },
- { "stortiservices.com", true },
- { "storvann.net", true },
- { "storvann.no", true },
- { "storycollective.film", true },
- { "storycollective.nl", true },
- { "storyland.ie", true },
- { "storyoneforty.com", true },
- { "storysift.news", true },
- { "storytell.com", true },
- { "storytellingforbusiness.com.au", true },
- { "storytime.hu", true },
- { "stoutassociates.com", true },
- { "stouter.nl", true },
- { "stoxford.com", true },
- { "stpatrickbayshore.org", true },
- { "stpatrickkennettsquare.org", true },
- { "stpatrickri.org", true },
- { "stpatricks-pelham.com", true },
- { "stpatsschool.org", true },
- { "stpaulcatholicchurcheastnorriton.net", true },
- { "stphilipneripreschool.com", true },
- { "straatderzotten.nl", true },
- { "strafensau.de", true },
- { "strafvollzugsgesetze.de", true },
- { "strahlende-augen.info", true },
- { "straightnude.com", true },
- { "strajnar.si", true },
- { "straka.name", true },
- { "strandbyfysio.dk", true },
- { "strandedinotter.space", true },
- { "strandhaus-claassen.de", true },
- { "strandhaus-hinter-der-duene.de", true },
- { "strandom.ru", true },
- { "strandschnuppern.de", true },
- { "strangelandrecording.com", true },
- { "strangelandrecordingstudios.com", true },
- { "strangelandsoundstage.com", true },
- { "strangelane.com", true },
- { "strangelanerecords.com", true },
- { "strangemusicbox.com", true },
- { "strangemusichollywood.com", true },
- { "strangemusicinc.com", true },
- { "strangemusicinc.net", true },
- { "strangevip.com", true },
- { "strangeways.ca", false },
- { "strangeworksinc.com", true },
- { "strangeworldmerch.com", true },
- { "strangeworldmerchandising.com", true },
- { "straphael-holyangels.com", true },
- { "strate.io", true },
- { "strategiccapital.com", true },
- { "strategiclivingblog.com", true },
- { "strategie-zone.de", true },
- { "stratforge.com", true },
- { "strathewerd.de", true },
- { "strathspeycrown.com", true },
- { "stratmann-b.de", true },
- { "stratuscloud.co.za", true },
- { "stratuscloudconsulting.net", true },
- { "straubis.org", true },
- { "strauser.com", true },
- { "stravers.shoes", true },
- { "strawberries.tk", true },
- { "strawberry-laser.gr", true },
- { "strd.co", true },
- { "streamchan.org", true },
- { "streamelements.com", true },
- { "streaming-download.net", true },
- { "streaminginternacional.net", true },
- { "streamkit.gg", true },
- { "streampanel.net", true },
- { "streamspouredout.com", true },
- { "streathamfoodfestival.com", true },
- { "streemprn.xyz", true },
- { "streepjesenstipjes.nl", true },
- { "street-medics.fr", true },
- { "street-tek.com", true },
- { "streetboards.lt", true },
- { "streetdancecenter.com", true },
- { "streetlightdata.com", true },
- { "streetmarket.ru", true },
- { "streets.mn", true },
- { "streetshirts.co.uk", true },
- { "streetspotr.com", true },
- { "streetview.wien", true },
- { "strefapi.com", true },
- { "strelnicesmirice.cz", true },
- { "stremio.com", true },
- { "strengthinyoufitness.com", true },
- { "strengthroots.com", true },
- { "stretchmarkdestroyer.com", true },
- { "stretchmyan.us", true },
- { "striata.com", true },
- { "striata.mobi", true },
- { "striata.org", true },
- { "striatadev.com", true },
- { "strick-welt.de", true },
- { "stricted.net", true },
- { "strictlyguitar.de", true },
- { "strijkshop.be", true },
- { "stringtoolbox.com", true },
- { "stripe.com", true },
- { "stripe.network", true },
- { "stripecdn.com", true },
- { "striped.horse", true },
- { "stripehype.com", true },
- { "strippersondemand.com", true },
- { "strivephysmed.com", false },
- { "strl-tunis.tk", true },
- { "strm.hu", true },
- { "strm.pl", true },
- { "strobeltobias.de", true },
- { "strobeto.de", true },
- { "strobotti.com", true },
- { "stroccounioncity.org", true },
- { "stroeder.com", true },
- { "stroeerdigital.de", true },
- { "stroginohelp.ru", true },
- { "stroifenix.ru", true },
- { "stroimvse.ml", true },
- { "stroiproect.tk", true },
- { "stroke-of-luck.com", true },
- { "stromaci.sk", true },
- { "stromak.cz", true },
- { "stromkomfort.cz", true },
- { "stromzivota.sk", true },
- { "strongpassword.club", true },
- { "strongrandom.com", false },
- { "strongsalpinesucculents.com", true },
- { "strongtieinsurance.com", true },
- { "stronku-gaming.de", true },
- { "stroomacties.nl", true },
- { "strosemausoleum.com", true },
- { "stroseoflima.com", true },
- { "strotmann.de", true },
- { "strousberg.net", true },
- { "strozik.de", true },
- { "structuralfix.com", true },
- { "structurally.net", true },
- { "strugee.net", true },
- { "strydom.me.uk", true },
- { "ststanislaus.com", true },
- { "ststanstrans.org", true },
- { "stt.wiki", true },
- { "sttammanyurology.com", true },
- { "sttg.com.au", true },
- { "stthomasbrigantine.org", true },
- { "sttl-topographie.com", true },
- { "stuartbeard.com", true },
- { "stuartbell.co.uk", true },
- { "stuartbell.uk", true },
- { "stuartcrawford.co.nz", true },
- { "stuarteggerton.com", true },
- { "stuartmorris.id.au", true },
- { "stuartmorris.me", true },
- { "stuartmorris.name", true },
- { "stuartmorris.tel", true },
- { "stuckateur-bruno.de", false },
- { "stucki-bagger.ch", true },
- { "stucydee.nl", true },
- { "studay.fr", true },
- { "studenckiemetody.pl", true },
- { "student-eshop.cz", true },
- { "student-eshop.sk", true },
- { "studentaid.gov", true },
- { "studenterguiden.dk", true },
- { "studentfinancecountdown.com", true },
- { "studentforums.biz", true },
- { "studenti.tk", true },
- { "studentklinikk.no", true },
- { "studentpop.com", true },
- { "studentse.fr", true },
- { "studenttenant.com", true },
- { "studiebegeleiding-haegeman.be", true },
- { "studiekort.se", true },
- { "studiekortet.com", true },
- { "studiekortet.eu", true },
- { "studiekortet.net", true },
- { "studiekortet.nu", true },
- { "studiekortet.org", true },
- { "studiekortet.se", true },
- { "studio-637.com", true },
- { "studio-abok.com", true },
- { "studio-architetto.com", true },
- { "studio-happyvalley.com", true },
- { "studio-n.pl", true },
- { "studio-satellite.com", true },
- { "studio413.net", true },
- { "studio678.com", true },
- { "studioadevents.com", true },
- { "studioavvocato.roma.it", true },
- { "studioavvocato24.it", true },
- { "studiobergaminloja.com.br", true },
- { "studiobrandano.com", true },
- { "studiodentisticomasi.com", true },
- { "studiodewit.nl", true },
- { "studiodpe.com", true },
- { "studiogavioli.com", true },
- { "studiogears.com", true },
- { "studiograou.com", true },
- { "studiohelder.fr", false },
- { "studiohomebase.amsterdam", true },
- { "studiokicca.com", true },
- { "studiolegalepaternostro.it", true },
- { "studiomarcella.com", true },
- { "studionowystyl.pl", true },
- { "studiopirrate.com", true },
- { "studioproapp.com", true },
- { "studioriehl.com", true },
- { "studioscherp.nl", true },
- { "studiosql.ml", true },
- { "studiostawki.com", true },
- { "studiostudio.net", true },
- { "studiosus-gruppenreisen.com", true },
- { "studiosus.com", true },
- { "studiotheatrestains.fr", true },
- { "studiotres.com.br", true },
- { "studiovaud.com", false },
- { "studiovictorialimited.com", true },
- { "studioxii.com", true },
- { "studipad.de", true },
- { "studipro-formation.fr", true },
- { "studipro-marketing.fr", true },
- { "studium.cz", true },
- { "study-support-beans.com", true },
- { "studyin.jp", true },
- { "studyportal.net", true },
- { "studyspy.ac.nz", true },
- { "studytactics.com", true },
- { "stuermer.me", true },
- { "stuetzredli.ch", true },
- { "stuff-fibre.co.nz", true },
- { "stuffi.fr", true },
- { "stugor-danmark.com", true },
- { "stuka-art.de", true },
- { "stumeta.de", true },
- { "stumeta2019.de", true },
- { "stuntmen.xyz", true },
- { "stupendous.net", false },
- { "stupidest.org", true },
- { "stupidthoughts.tk", true },
- { "stupino-stroy.cf", true },
- { "stutelage.com", true },
- { "stuudium-mail.ee", true },
- { "stuudium.com", true },
- { "stuudium.net", true },
- { "stuudium.org", true },
- { "stuudium.pro", true },
- { "stuvel.eu", true },
- { "stuvus.de", true },
- { "stuvus.uni-stuttgart.de", true },
- { "stview.me", true },
- { "stw-group.at", true },
- { "stygium.net", false },
- { "stylebeat.tk", true },
- { "styleci.io", true },
- { "stylecollective.us", true },
- { "styledandcomposed.com", true },
- { "styledbysally.com.au", true },
- { "styleelite.tk", true },
- { "styleetvieperfumes.com", true },
- { "styletron.org", true },
- { "stylett.ru", true },
- { "stylewish.me", true },
- { "stypr.com", true },
- { "su1ph3r.io", true },
- { "suaudeau.fr", true },
- { "suaudeau.org", true },
- { "suayslim.com", true },
- { "sub-net.at", true },
- { "sub.media", true },
- { "subastasdecarros.net", true },
- { "subdev.org", true },
- { "subdimension.org", true },
- { "subdivider.tk", true },
- { "subjektzentrisch.de", true },
- { "sublocale.com", true },
- { "submedia.tv", true },
- { "submelon.tech", true },
- { "subohm.com", true },
- { "suborbital.io", true },
- { "subrad.io", true },
- { "subsistence.wiki", true },
- { "substitutealert.com", true },
- { "suburban-landscape.net", true },
- { "suburbaninfinitioftroyparts.com", true },
- { "suburbansites.com", true },
- { "subven.com", true },
- { "subversive-tech.com", true },
- { "succesprojekter.dk", true },
- { "successdeliv.com", true },
- { "successemails.ml", true },
- { "sucessclick.gq", true },
- { "suche.org", true },
- { "suchem.com", true },
- { "suchmaschinen-werkstatt.de", true },
- { "suckmyan.us", false },
- { "sucretown.net", true },
- { "sudametrica.tk", true },
- { "sudanell.tk", true },
- { "sudanindependent.com", true },
- { "sudanindependent.net", true },
- { "sudaraka.org", false },
- { "sudmotor-occasions.be", false },
- { "sudo.ws", true },
- { "sudokian.io", true },
- { "sudosaveclimate.com", true },
- { "sudoschool.com", true },
- { "suecaunitedfc.tk", true },
- { "suelyonjones.com", true },
- { "suessdeko.de", true },
- { "suevia-ka.de", true },
- { "suffix.ru", true },
- { "sufix.cz", true },
- { "sugarbrother.com", false },
- { "sugarlandurology.com", true },
- { "sugarpiano.com", true },
- { "sugarshin.net", true },
- { "sugatime.tk", true },
- { "suggea.com", true },
- { "suggestim.ch", false },
- { "sugos.ml", true },
- { "suhaildawood.com", true },
- { "suicide.gq", true },
- { "suisui.stream", true },
- { "suitesapp.com", true },
- { "sujal.com", true },
- { "sujblog.com", true },
- { "sujoydhar.in", true },
- { "suka.moe", true },
- { "suke3.jp", true },
- { "sukherchador.org", true },
- { "suki.moe", true },
- { "sukiu.net", true },
- { "sukoyaka-labo.com", true },
- { "sukrie.net", true },
- { "suksit.com", true },
- { "sulabs.org", true },
- { "sulavius.tech", true },
- { "sulek.eu", true },
- { "sulian.me", true },
- { "suluvir.com", true },
- { "sulytics-tool.com", true },
- { "sumatphoto.com", true },
- { "sumatrabarat.ml", true },
- { "sumatrautara.ml", true },
- { "sumatriptan365.tk", true },
- { "sumcrevillent.tk", true },
- { "sumguy.com", true },
- { "sumiko.moe", true },
- { "sumit.me", true },
- { "sumitchahal.com", true },
- { "summa.eu", false },
- { "summarized.gq", true },
- { "summerbo.at", true },
- { "summercampthailand.com", true },
- { "summit-level.ru", true },
- { "summitbankofkc.com", true },
- { "summiteyekc.com", true },
- { "summitlighthousela.org", true },
- { "summusglobal.com", true },
- { "sun-beach.com.ua", true },
- { "sun-wellness-online.com.vn", true },
- { "sun1218.com", true },
- { "sun1245.com", true },
- { "sun1338.com", true },
- { "sun1345.com", true },
- { "sun1378.com", true },
- { "sun668.asia", true },
- { "sun668.co", true },
- { "sunbritetv.com", true },
- { "sunbury.xyz", true },
- { "sunchasercats.com", true },
- { "suncity288.com", true },
- { "suncity288.net", true },
- { "suncity8118.cn", true },
- { "suncity8118.com", true },
- { "suncity818.cn", true },
- { "suncity818.com", true },
- { "suncity818.net", true },
- { "suncity8338.cn", true },
- { "suncity8338.com", true },
- { "suncity858.cn", true },
- { "suncity858.com", true },
- { "suncity8668.com", true },
- { "suncity8998.com", true },
- { "sundaycooks.com", true },
- { "sundayfundayjapan.com", true },
- { "sundragon.se", true },
- { "sunfiregold.com", true },
- { "sunfox.cz", true },
- { "sungreen.info", true },
- { "sunhaoxiang.net", true },
- { "sunjaydhama.com", true },
- { "sunjiutuo.com", true },
- { "sunlit.cloud", true },
- { "sunn.ie", true },
- { "sunny.co.uk", true },
- { "sunnysidechurchofchrist.org", true },
- { "sunnysideups.co", true },
- { "sunoikisis.org", true },
- { "sunpig.com.my", true },
- { "sunpig.com.sg", true },
- { "sunpig.fit", true },
- { "sunpig.my", true },
- { "sunpig.sg", true },
- { "sunred.info", true },
- { "sunred.org", true },
- { "sunrichtec.com", true },
- { "sunsdesign.net", true },
- { "sunsetdentalhenderson.com", true },
- { "sunsetwx.com", true },
- { "sunshilin.tk", true },
- { "sunshine-cleaners.com.au", true },
- { "sunshinecoastplumbingcompany.com.au", true },
- { "sunshinelife.tk", true },
- { "sunshinesf.org", true },
- { "sunsong.org", true },
- { "sunsquare.cz", true },
- { "sunstar.bg", true },
- { "sunwolf.studio", true },
- { "suomenkielisetnettikasinot.com", true },
- { "suomika.pl", true },
- { "supa.sexy", true },
- { "supedio.com", true },
- { "super-erotica.ru", true },
- { "superaficionados.com", true },
- { "superbart.nl", true },
- { "superbdistribute.com", true },
- { "superbestpalsclub.tk", true },
- { "superbintel.com", true },
- { "superbomsupermercado.com.br", true },
- { "superbouncebouncycastles.com", true },
- { "supercalorias.com", true },
- { "supercarrot.tk", true },
- { "supercastlesadelaide.com.au", true },
- { "supercastlesbrisbane.com.au", true },
- { "supercastlessunshinecoast.com.au", true },
- { "supercentenarian.com", true },
- { "supercharged.co.uk", true },
- { "supercinebattle.fr", true },
- { "superdrillers.tk", true },
- { "superdroni.com", true },
- { "superenduro.net", true },
- { "superglidewardrobes.co.uk", true },
- { "supergmtransport.com.au", true },
- { "superguide.com.au", true },
- { "superhappiness.com", true },
- { "superhappyfun.club", true },
- { "superhome.com.au", true },
- { "superidropulitrice.com", true },
- { "superiordetail.tk", true },
- { "superlandnetwork.de", true },
- { "superlisa.nl", true },
- { "supermagna.tk", true },
- { "supermarx.nl", true },
- { "supermercadosdia.com.ar", true },
- { "supermercato24.it", true },
- { "supermil.ch", true },
- { "supermustang.tk", true },
- { "supern0va.net", false },
- { "supernaut.info", true },
- { "superpi.noip.me", true },
- { "supersahnetorten.de", true },
- { "supersandro.de", true },
- { "supersonnig-festival.de", true },
- { "supersonnigfestival.de", true },
- { "superstargossip.com", true },
- { "superstarhost.tk", true },
- { "supersteosbouncycastles.com", true },
- { "superstropdas.nl", true },
- { "supersu.kr", true },
- { "superswingtrainer.com", true },
- { "supertasker.org", true },
- { "supertrade.tk", true },
- { "supertutorial.com.br", true },
- { "supervets.com.au", true },
- { "supervisionassist.com", true },
- { "supeuro.com", true },
- { "supmil.net", true },
- { "supplies24.at", true },
- { "supplies24.es", true },
- { "supplynation.org.au", true },
- { "support-ticino.ch", true },
- { "support.mayfirst.org", false },
- { "supportdesk.nu", true },
- { "supportericking.org", true },
- { "supra.tf", true },
- { "supracube.com", true },
- { "suprem.biz", false },
- { "suprem.ch", false },
- { "supremestandards.com", true },
- { "supremumseo.pl", true },
- { "supriville.com.br", true },
- { "sur-v.com", true },
- { "suranganet.tk", true },
- { "surasak.tk", true },
- { "sure-it.de", true },
- { "surefit-oms.com", true },
- { "surefleet.com.au", true },
- { "surfnetkids.com", true },
- { "surfnetparents.com", true },
- { "surfocal.com", true },
- { "surgeholdinggroup.com", true },
- { "surgeongeneral.gov", true },
- { "surgicalassociateswny.com", true },
- { "suricate.ru", true },
- { "surnet.io", true },
- { "surnganet.tk", true },
- { "suroil.com", true },
- { "surpreem.com", true },
- { "surreyheathyc.org.uk", false },
- { "surthriveak.com", true },
- { "suruifu.com", true },
- { "survature.com", true },
- { "surveer.com", true },
- { "surveil.site", true },
- { "surveillance104.com", true },
- { "surveyhealthcare.com", true },
- { "surveymill.co.uk", true },
- { "survivebox.fr", true },
- { "survivingmesothelioma.com", true },
- { "susanbpilates.com", true },
- { "susann-kerk.de", true },
- { "susanna-komischke.de", true },
- { "susanvelez.com", true },
- { "susc.org.uk", true },
- { "suseki.ga", true },
- { "sush.us", true },
- { "sushi.roma.it", true },
- { "sushibesteld.nl", true },
- { "susosudon.com", true },
- { "suspect.id", true },
- { "suspension-shop.com", true },
- { "sussexheart.com", true },
- { "sustainability.gov", true },
- { "sustainabilityknowledgegroup.com", true },
- { "sustainabilitysociety.hk", true },
- { "sustainoss.org", true },
- { "sustc.ac.cn", true },
- { "sustsol.com", true },
- { "sutas.market", true },
- { "suts.co.uk", true },
- { "suttacentral.net", true },
- { "suuria.de", true },
- { "suzi3d.com", true },
- { "suziekovner.com", true },
- { "suzikogsm.tk", true },
- { "suzukikenichi.com", true },
- { "suzukimarinepress.com", true },
- { "sv-bachum-bergheim.de", true },
- { "sv-schody.cz", true },
- { "sv-turm-hohenlimburg.de", true },
- { "sv.search.yahoo.com", false },
- { "sv1880-lichtenau.de", true },
- { "svager.cz", true },
- { "svak-gutachter.de", true },
- { "svanstrom.com", true },
- { "svanstrom.org", true },
- { "svantner.sk", true },
- { "svarnyjunak.cz", true },
- { "svatbamisiaviti.tk", true },
- { "svc-sitec.com.mx", true },
- { "svc-sitec.mx", true },
- { "svc-sitec.org", true },
- { "svc1.xyz", true },
- { "svdb.co", false },
- { "svdesign.su", true },
- { "svedalataxi.com", true },
- { "sveinerik.org", true },
- { "svendubbeld.nl", true },
- { "sveneckelmann.de", true },
- { "svenluijten.com", false },
- { "svenmuller.nl", true },
- { "svennd.be", true },
- { "svenskapsalmer.se", true },
- { "svenskmediabevakning.se", true },
- { "svetandroida.cz", true },
- { "svetila.com", true },
- { "svetlilo.com", true },
- { "svia.nl", true },
- { "svijet-medija.hr", true },
- { "svinformatica.es", true },
- { "svm-basketball.de", true },
- { "svo-intranet.de", true },
- { "svobodnyblog.cz", true },
- { "svodjapan.info", true },
- { "svorcikova.cz", true },
- { "svorkmofotball.tk", true },
- { "svpoa.org.uk", true },
- { "svrx.one", true },
- { "svsb-live.azurewebsites.net", false },
- { "svtr.de", true },
- { "sw-servers.net", true },
- { "sw33tp34.com", true },
- { "swaenenburg.be", true },
- { "swagfuli.com", true },
- { "swagger.london", true },
- { "swallowgateway.com", true },
- { "swankism.com", true },
- { "swansdoor.org", true },
- { "swap.gg", true },
- { "swapfin.com", true },
- { "swaptaxdata.com", true },
- { "swarfarm.com", true },
- { "swarlys-server.de", true },
- { "swat4stats.com", true },
- { "swatee.com", true },
- { "swattransport.ae", true },
- { "sway-cdn.com", true },
- { "sway.com", true },
- { "swaz.co.uk", true },
- { "swc-cfc.gc.ca", true },
- { "swcloud.io", true },
- { "swd.agency", true },
- { "swdiscount.ru", true },
- { "sweak.net", true },
- { "sweat-shirts.tk", true },
- { "swedentelugucommunity.com", true },
- { "swedishhost.com", true },
- { "swedishhost.se", true },
- { "sweep-me.net", true },
- { "sweepay.ch", false },
- { "sweepy.pw", true },
- { "sweet-as.co.uk", true },
- { "sweet-spatula.com", true },
- { "sweetbabyjesus.com", true },
- { "sweetbridge.com", true },
- { "sweetcalculus.ru", true },
- { "sweetdata.io", true },
- { "sweetenedcondensed.com", true },
- { "sweetgood.de", true },
- { "sweethomesnohomishrenovations.com", true },
- { "sweets-mimatsu.com", true },
- { "sweetspot.co.kr", true },
- { "sweetydecor.ru", true },
- { "sweharris.org", true },
- { "swetrust.com", true },
- { "swfmax.com", true },
- { "swgenetx.com", true },
- { "swhw.io", true },
- { "swi.sytes.net", true },
- { "swid.co.uk", true },
- { "swiftbonds.com", true },
- { "swiftcashforcars.com.au", true },
- { "swiftcom.co.za", true },
- { "swifteh.net", true },
- { "swiftpak.co.uk", true },
- { "swiftpcbassembly.com", true },
- { "swiftqueue.com", true },
- { "swilly.org", true },
- { "swimminglessons.com.sg", true },
- { "swimwear365.co.uk", true },
- { "swindontennisclub.azurewebsites.net", true },
- { "swindontennisclub.org", true },
- { "swineson.me", true },
- { "swing-belleville.de", true },
- { "swingmonkey.com", true },
- { "swingtimeinthegardens.com", true },
- { "swingular.com", true },
- { "swipedon.com", true },
- { "swipetv.ie", true },
- { "swiss-apartments.com", true },
- { "swiss-connection.net", false },
- { "swiss-vanilla.ch", true },
- { "swiss-vanilla.com", true },
- { "swisscypher.com", true },
- { "swissdojo.ch", false },
- { "swisselement365.com", false },
- { "swisservers.com", true },
- { "swissid.ch", true },
- { "swissinternationalva.com", true },
- { "swissj.com", true },
- { "swisslinux.org", true },
- { "swisstacticaldevelopment.ch", true },
- { "swisstechassociation.ch", true },
- { "swissurf.tk", true },
- { "swissvanilla.ch", true },
- { "swissvanilla.com", true },
- { "swit.io", true },
- { "switch-trader.com", true },
- { "switcheo.exchange", true },
- { "switcheo.rocks", true },
- { "swivells.com", true },
- { "swkdevserver.tk", true },
- { "swlabs.org", true },
- { "swmlink.com", true },
- { "swn-nec.de", true },
- { "swrpgitems.com", true },
- { "swtun.com", true },
- { "swvaux.com", true },
- { "swxtd.com", true },
- { "swy.cz", true },
- { "swyn.net", true },
- { "swynwyr.com", true },
- { "sx8.ovh", true },
- { "sxistolithos.gr", true },
- { "sy-anduril.de", true },
- { "sy24.ru", true },
- { "syajvo.if.ua", false },
- { "syakonavi.com", true },
- { "sycamorememphis.org", true },
- { "sycca.com", true },
- { "sychov.pro", true },
- { "sydney-sehen.com", true },
- { "sydney.dating", true },
- { "sydneychillies.com.au", true },
- { "sydneyexperiences.com", true },
- { "sydneyhelicopters.com.au", true },
- { "sydneylawnandturf.com.au", true },
- { "syenar.net", true },
- { "syezd.com.au", true },
- { "syha.org.uk", true },
- { "sykepleien.no", false },
- { "sylaps.com", true },
- { "syleam.in", true },
- { "sylfie.net", true },
- { "syllogi.xyz", true },
- { "sylvainboudou.com", true },
- { "sylvaindurand.fr", true },
- { "sylvaindurand.org", true },
- { "sylvaloir.fr", true },
- { "sylvan.me", true },
- { "sylve.ch", false },
- { "sym01.com", true },
- { "symb.ch", false },
- { "symbiose-com.ch", false },
- { "symbiose-immobilier.ch", false },
- { "symbiose.com", true },
- { "symbiosecom.ch", false },
- { "symbo.tech", true },
- { "symdevinc.com", true },
- { "symeda.de", true },
- { "symeonchen.com", true },
- { "symetrix.tk", true },
- { "symfora-meander.nl", true },
- { "symlnk.de", true },
- { "sympletrade.com", true },
- { "symplexia.com.br", true },
- { "sympmarc.com", true },
- { "sympraxisconsulting.com", true },
- { "symptome-erklaert.de", true },
- { "synabi.com", true },
- { "synackrst.net", true },
- { "synapsepain.com", true },
- { "sync-it.no", true },
- { "synccentre.com", true },
- { "syncevolution.org", true },
- { "synchrocube.com", true },
- { "synchrolarity.com", true },
- { "synchronicity.cz", true },
- { "synchronyse.com", true },
- { "synchtu.be", false },
- { "syncmindglobal.com", true },
- { "syncplay.pl", true },
- { "syncrise.co.jp", true },
- { "synd.io", true },
- { "syneart.com", true },
- { "synecek11.cz", true },
- { "synedat.com", true },
- { "synergyfitness.com.au", true },
- { "synergyflare.com", true },
- { "synergyworkingdogclub.com", true },
- { "synerionagile.com", true },
- { "synfin.org", true },
- { "synicalsyntax.com", true },
- { "synony.me", true },
- { "synotna.eu", true },
- { "synrestaccounting.com", true },
- { "syntaxnightmare.com", true },
- { "syntheticgrassliving.com.au", true },
- { "synthetik.com", true },
- { "synthv.fun", true },
- { "syogainenkin119.com", true },
- { "syonix.ru", true },
- { "syplasticsurgery.com", true },
- { "syquel-systems.de", true },
- { "sys-tm.com", true },
- { "sys21.info", true },
- { "sysadm.guru", true },
- { "sysadmins.ro", true },
- { "syscoon.com", true },
- { "sysctl.se", true },
- { "sysdb.io", true },
- { "sysgap-gsci.com", true },
- { "syskit.com", true },
- { "sysmike.de", true },
- { "sysrq.tech", false },
- { "systea.fr", true },
- { "systea.net", true },
- { "system-admin-girl.com", true },
- { "system-m.de", false },
- { "system.cf", true },
- { "system.is", true },
- { "system4travel.com", true },
- { "systemadmin.uk", true },
- { "systematic-momo.com", true },
- { "systematic-momo.dk", true },
- { "systemausfall.org", true },
- { "systemchile.com", true },
- { "systemd.ch", false },
- { "systemd.eu.org", true },
- { "systemdynamics.net", true },
- { "systemeprod.fr", false },
- { "systemintegra.ru", true },
- { "systemisbusy.info", true },
- { "systemli.org", true },
- { "systemups.com", true },
- { "systemweb.no", true },
- { "systime.dk", true },
- { "syswiki.org", true },
- { "syuez.com", true },
- { "syuez.org", true },
- { "syy.im", true },
- { "syzdev.com", true },
- { "syzygy-tables.info", true },
- { "sz-lessgym-kamenz.de", true },
- { "szafkirtv.pl", true },
- { "szamitogepdepo.com", true },
- { "szasz.me", true },
- { "szclsya.me", true },
- { "szechenyi2020.hu", true },
- { "szentistvanpt.sk", true },
- { "szeptylasu.eu", true },
- { "szetowah.org.hk", true },
- { "szkolajazdykaleta.pl", true },
- { "szs.space", true },
- { "sztoriboljeles.hu", true },
- { "szuecs.net", true },
- { "szurgot.eu", true },
- { "szww99.cc", true },
- { "szybkiebieganie.pl", true },
- { "szymczak.at", true },
- { "szyndler.ch", true },
- { "szzsivf.com", true },
- { "t-hawk.com", true },
- { "t-m.me", true },
- { "t-net.org.hu", true },
- { "t-nice.com", true },
- { "t-pc.org", true },
- { "t-shirts4less.nl", true },
- { "t-stonegroup.com", true },
- { "t.facebook.com", false },
- { "t00228.com", false },
- { "t00ts.com", true },
- { "t060.com", true },
- { "t070.com", true },
- { "t0ny.name", true },
- { "t1208.com", false },
- { "t1209.com", false },
- { "t12u.com", true },
- { "t1316.com", false },
- { "t1317.com", false },
- { "t1318.com", false },
- { "t1319.com", false },
- { "t2181.com", false },
- { "t2182.com", false },
- { "t2183.com", false },
- { "t2881.com", false },
- { "t2i.nl", true },
- { "t3.ie", true },
- { "t36533.com", true },
- { "t36594.com", true },
- { "t39.com", true },
- { "t3hty.fr", true },
- { "t449.com", true },
- { "t47.io", true },
- { "t4c.link", true },
- { "t4cc0.re", true },
- { "t4w.me", true },
- { "t51365.com", true },
- { "t5880.com", false },
- { "t5881.com", false },
- { "t59970.com", true },
- { "t59971.com", true },
- { "t59972.com", true },
- { "t59973.com", true },
- { "t59974.com", true },
- { "t59981.com", true },
- { "t59982.com", true },
- { "t59983.com", true },
- { "t59984.com", true },
- { "t59985.com", true },
- { "t59986.com", true },
- { "t6354.com", false },
- { "t6360.com", false },
- { "t6364.com", false },
- { "t6370.com", false },
- { "t6371.com", false },
- { "t6381.com", false },
- { "t68000.com", true },
- { "t6801.com", true },
- { "t6810.com", true },
- { "t68100.com", true },
- { "t6820.com", true },
- { "t68200.com", true },
- { "t6830.com", true },
- { "t68300.com", true },
- { "t68400.com", true },
- { "t6850.com", true },
- { "t68500.com", true },
- { "t6860.com", true },
- { "t68600.com", true },
- { "t6870.com", true },
- { "t68700.com", true },
- { "t6880.com", false },
- { "t68800.com", true },
- { "t6881.com", false },
- { "t68900.com", true },
- { "t68app.com", true },
- { "t7009.com", false },
- { "t7035.com", true },
- { "t7119.com", false },
- { "t776633.com", false },
- { "t7802.com", false },
- { "t7805.com", false },
- { "t7807.com", false },
- { "t7808.com", false },
- { "t7809.com", false },
- { "t7880.com", false },
- { "t7e.de", false },
- { "t8003.com", false },
- { "t8006.com", false },
- { "t8070.com", false },
- { "t8110.com", false },
- { "t8119.com", false },
- { "t8250.com", false },
- { "t8803.com", true },
- { "t8805.com", true },
- { "t8807.com", true },
- { "t8809.com", true },
- { "t8815.com", true },
- { "t8817.com", true },
- { "t8819.com", true },
- { "t8830.com", true },
- { "t88gg.com", true },
- { "t88jj.com", true },
- { "t88mm.com", true },
- { "t88nn.com", true },
- { "t88oo.com", true },
- { "t88ss.com", true },
- { "t88vip0.com", true },
- { "t88vip1.com", true },
- { "t88vip2.com", true },
- { "t88vip3.com", true },
- { "t88vip4.com", true },
- { "t88vip5.com", true },
- { "t88vip6.com", true },
- { "t88vip7.com", true },
- { "t9i.in", true },
- { "ta-65.com", true },
- { "ta-nuth.nl", true },
- { "ta-soest.nl", true },
- { "ta65.com", true },
- { "taabe.net", true },
- { "taalcursusvolgen.nl", true },
- { "taalmeisje.nl", true },
- { "taanishsaifu.gq", true },
- { "taartbesteld.nl", true },
- { "tabacundo.tk", true },
- { "tabarnak.ga", true },
- { "tabegamisama.com", true },
- { "tabhui.com", true },
- { "tabi-news.com", true },
- { "tabi-runrun.com", true },
- { "tabithawebb.co.uk", true },
- { "tableandhearth.com", true },
- { "tabledusud.be", true },
- { "tabledusud.nl", true },
- { "tablemagnet.com", true },
- { "tableres.com", true },
- { "tablerocksbestrealtors.com", true },
- { "tablescraps.com", true },
- { "tablet.facebook.com", false },
- { "tabletd.com", true },
- { "tabletsbaratasya.com", true },
- { "tableturnrms.com", true },
- { "tablotv.com", false },
- { "taborsky.cz", true },
- { "tac-volley.com", false },
- { "tachi.uk", true },
- { "tackleyourfeelings.com", true },
- { "tacomafia.net", true },
- { "tactical.zone", true },
- { "tacticalavocado.com", true },
- { "tacticalvote.co.uk", true },
- { "tadalafilindia.gq", true },
- { "tadamstudio.ca", true },
- { "taddiestales.com", true },
- { "tadeo.ca", true },
- { "tadiranbatteries.de", true },
- { "tadjikistan.tk", true },
- { "tadluedtke.com", true },
- { "tadtadya.com", true },
- { "tadu.de", true },
- { "taffe-elec.com", true },
- { "tagabrand.co.uk", true },
- { "tagderinspiration.ch", true },
- { "tagdocumentary.com", true },
- { "taggedpdf.com", false },
- { "taggigkaktus.tk", true },
- { "taginet.com", true },
- { "taglioepiega.com", true },
- { "taglioepiega.eu", true },
- { "taglioepiega.it", true },
- { "tagnull.de", true },
- { "tagtoys.com", true },
- { "taguette.com", true },
- { "taguette.fr", true },
- { "taguette.org", true },
- { "tagungsraum-usedom.de", true },
- { "tagungsraum-zinnowitz.de", true },
- { "tagungsstaette-usedom.de", true },
- { "tagungsstaette-zinnowitz.de", true },
- { "taherian.me", true },
- { "tahhan-tech.com", true },
- { "tai-in.com", true },
- { "tai-in.net", true },
- { "taichichuanyang.com", true },
- { "taihesy.tk", true },
- { "taiklus.lt", true },
- { "tail.id.lv", true },
- { "tail.ml", true },
- { "tails.boum.org", true },
- { "tailwag.party", true },
- { "taimane.com", true },
- { "taiphanmem.net", true },
- { "taishokudaiko.com", true },
- { "taishon.nagoya", true },
- { "taitmacleod.com", true },
- { "taiwan.dating", true },
- { "taiwanhotspring.net", true },
- { "taiwania.capital", true },
- { "taiwania.vc", true },
- { "taiwaniacapital.com", true },
- { "taiwaniacapital.com.tw", true },
- { "taiwaniacapital.tw", true },
- { "taiwantour.info", true },
- { "taiyouko-hatuden.net", true },
- { "taizegroep.nl", true },
- { "tajper.pl", true },
- { "tajr.shop", true },
- { "take1give1.com", false },
- { "takeaimnow.org", true },
- { "takemoto-ped.com", true },
- { "taken.cf", true },
- { "taken.pl", true },
- { "takeomi.jp", true },
- { "takeshifujimoto.com", false },
- { "taki.sh", true },
- { "taki.to", true },
- { "takipone.com", true },
- { "takk.pl", true },
- { "takkaaaaa.com", true },
- { "takkguitar.net", true },
- { "taktak.co.uk", true },
- { "takuhai12.com", true },
- { "takumi-s.net", true },
- { "takuto.de", false },
- { "talendipank.ee", true },
- { "talentcast.nl", true },
- { "talentcast.org", true },
- { "talentos.pt", true },
- { "talentwall.io", true },
- { "taler.net", true },
- { "talesbazaar.com", true },
- { "talichi.com", true },
- { "talideon.com", false },
- { "talis-bs.com", true },
- { "talk.google.com", true },
- { "talkaboutdesign.com", true },
- { "talkgadget.google.com", true },
- { "talking12.com", true },
- { "talkingmoose.net", true },
- { "talkmojang.club", true },
- { "talkreal.net", true },
- { "talktech.com", true },
- { "talkwithyourbaby.org", true },
- { "tallcraft.com", true },
- { "talldude.net", true },
- { "tallgrasslegal.com", true },
- { "tallinnsec.ee", true },
- { "tallinnsex.ee", true },
- { "tallship.cz", true },
- { "tallyfy.com", true },
- { "talroo.com", true },
- { "talun.de", true },
- { "talusan.tk", true },
- { "talxis.com", true },
- { "tamada.expert", true },
- { "tamarimolhem.com", true },
- { "tambayology.com", true },
- { "tambo.es", true },
- { "tambov.tk", true },
- { "tambre.ee", true },
- { "tamersunion.org", true },
- { "tamindir.com", true },
- { "tammy.pro", true },
- { "tamoxifen-citrate.ml", true },
- { "tampabaybusinesslistings.com", true },
- { "tampabayhometours.info", true },
- { "tampacific.net", true },
- { "tampacific.vn", true },
- { "tamposign.fr", true },
- { "tamriel-rebuilt.org", true },
- { "tamtowild.com", true },
- { "tanacio.com", true },
- { "tancredi.nl", true },
- { "tandakutip.com", true },
- { "tandarts-ict.nl", true },
- { "tandartsen-ict.nl", true },
- { "tandartszilverschoon.nl", true },
- { "tandemexhibits.com", true },
- { "tandempartnerships.com", true },
- { "tandoanh.vn", true },
- { "tandzorg.link", true },
- { "tangel.me", true },
- { "tangemann.org", true },
- { "tangle-teezer.net", true },
- { "tangledmeditations.com", true },
- { "tango-ouest.com", false },
- { "tangoalpha.co.uk", true },
- { "tanhit.com", true },
- { "taniafitness.co.uk", true },
- { "taniafitness.com", true },
- { "tanie-uslugi-ksiegowe.pl", true },
- { "taniku-succulent.com", true },
- { "tankpassen-vergelijken.nl", true },
- { "tanks.je", true },
- { "tankski.co.uk", true },
- { "tannenhof-moelln.de", true },
- { "tannerdewitt.com", true },
- { "tannerryan.ca", true },
- { "tannerwilliamson.com", true },
- { "tannerwj.com", true },
- { "tanovar.com", true },
- { "tansuya.jp", true },
- { "tantalos.nl", true },
- { "tantei100.net", true },
- { "tantetilli.de", false },
- { "tanto259.name", true },
- { "tantravoorlichting.nl", true },
- { "tanveersingh.tk", true },
- { "tanyanama.com", true },
- { "tanyatate.xyz", true },
- { "tanz.info", true },
- { "tanzhijun.com", true },
- { "tanzo.io", true },
- { "taoaworld.com", true },
- { "taoburee.com", true },
- { "taotic.eu", true },
- { "taowa.ca", true },
- { "tapchiphaidep.info", true },
- { "tapissier-schall.fr", true },
- { "taprix.org", true },
- { "tapsnapp.co", true },
- { "taptoweb.com", true },
- { "taquilla.com", true },
- { "tar-mag.com", true },
- { "tara.ai", true },
- { "tarakan-klopik.tk", true },
- { "taranagar.tk", true },
- { "tarasecurity.co.uk", true },
- { "tarasecurity.com", true },
- { "tarasevich.by", true },
- { "tarba-schluesseldienst-duesseldorf.de", true },
- { "tardis.io", true },
- { "tarek.wtf", true },
- { "tarfin.com", true },
- { "targetbuilding.com", true },
- { "targetx.pl", true },
- { "targimieszkaniowe.net", true },
- { "tarife.at", true },
- { "tariff.cc", true },
- { "tarija.tk", true },
- { "tarik.io", true },
- { "tarkov-database.com", true },
- { "tarmexico.com", true },
- { "taron.top", true },
- { "tarotistasvidentes.es", true },
- { "tarotsgratuits.com", true },
- { "tarsan.cz", true },
- { "tartaneagle.org.uk", true },
- { "tartanhamedshop.com.br", true },
- { "taruntarun.net", false },
- { "tarzanka.ml", true },
- { "tas.best", true },
- { "tas2580.net", false },
- { "tasadar.net", true },
- { "tasadordecoches.com", true },
- { "tasarimgazetesi.com", true },
- { "tascuro.com", true },
- { "taskhorizon.audio", true },
- { "taskotron.fedoraproject.org", true },
- { "taskotron.stg.fedoraproject.org", true },
- { "tasks.org", true },
- { "taskstream.com", true },
- { "taskulu.com", true },
- { "taskulu.ir", true },
- { "taskutark.ee", true },
- { "taskworld.com", true },
- { "tasogarenoinori.net", true },
- { "tass.nu", true },
- { "tastycake.net", false },
- { "tastystakes.com", true },
- { "tat2grl85.com", true },
- { "tatara.ne.jp", true },
- { "tatard.fr", true },
- { "tateishi-ip.com", true },
- { "tathanhson.com", false },
- { "tatiana-kpb.tk", true },
- { "tatildekirala.com", true },
- { "tatler.com", true },
- { "tato.noip.me", true },
- { "tatsidou.gr", true },
- { "tattoo-art.tk", true },
- { "tattoo.dating", true },
- { "tattooli.com", true },
- { "tattvaayoga.com", true },
- { "tatuantes.com", true },
- { "taubin.cc", true },
- { "tauedu.org", true },
- { "tauflight.com", true },
- { "taunusstein.net", true },
- { "tauran.net", true },
- { "tauriscia.tk", true },
- { "tavolaquadrada.com.br", true },
- { "tavsys.net", true },
- { "tax-brain.net", true },
- { "tax-guard.com", true },
- { "taxaroo.com", true },
- { "taxationweb.co.uk", true },
- { "taxce.com", true },
- { "taxedesejour-airbnb.fr", true },
- { "taxhawk.com", true },
- { "taxhunter.com.au", true },
- { "taxi-chamonix.fr", false },
- { "taxi-collectif.ch", false },
- { "taxi-domzale.tk", true },
- { "taxi-edessas.gr", true },
- { "taxi-jihlava.cz", true },
- { "taxi-legroux.com", true },
- { "taxi-puck.pl", true },
- { "taxi-waregem.be", true },
- { "taxi-zakaz.ml", true },
- { "taxicab4you.com", true },
- { "taxichic.com", true },
- { "taxicollectif.ch", false },
- { "taxid-k.be", true },
- { "taximinvody.ml", true },
- { "taxis-collectifs.ch", false },
- { "taxisaeropuertomadrid.com", true },
- { "taxiscollectifs.ch", false },
- { "taxlab.co.nz", true },
- { "taxo.fi", true },
- { "taxpackagesupport.com", true },
- { "taxsquirrel.com", true },
- { "taylorfry.com.au", true },
- { "taylorgalleries.com", true },
- { "taylorpearson.me", false },
- { "taylors-castles.co.uk", true },
- { "taylorshillsamoan.org", true },
- { "taylorstauss.com", true },
- { "tazarelax.es", true },
- { "tb-devel.de", true },
- { "tb-itf.de", true },
- { "tba.bm", true },
- { "tbb2020.com", true },
- { "tbbvip1.com", true },
- { "tbejos.com", true },
- { "tbfocus.com", true },
- { "tbitc.ch", true },
- { "tbonejs.org", true },
- { "tbpchan.cz", true },
- { "tbrindus.ca", true },
- { "tbs-certificates.co.uk", true },
- { "tbspace.de", true },
- { "tbtech.cz", true },
- { "tbuchloh.de", true },
- { "tc-st-leonard.ch", false },
- { "tc.nz", true },
- { "tcdw.net", true },
- { "tcf.org", true },
- { "tcgpraktijk.nl", true },
- { "tcgrepublic.com", true },
- { "tchannels.tv", true },
- { "tche.digital", true },
- { "tchealers.com", true },
- { "tchebb.me", true },
- { "tchebotarev.com", true },
- { "tchnics.de", true },
- { "tchoukball.ch", false },
- { "tchverheul.nl", true },
- { "tcit.fr", true },
- { "tcj.ir", true },
- { "tcksolutions.com", true },
- { "tcl.sh", true },
- { "tclb.ga", true },
- { "tcmwellnessclinic.com", true },
- { "tcnapplications.com", true },
- { "tcpride.org", true },
- { "tcpweb.net", true },
- { "tcvvip.com", true },
- { "tcwis.com", true },
- { "tdchrom.com", false },
- { "tddos.pw", true },
- { "tdfbfoundation.org", true },
- { "tdr.today", true },
- { "tdrcartuchos.com.br", true },
- { "tdrs.info", true },
- { "tdsinflatables.co.uk", true },
- { "tdstoragebay.com", true },
- { "tdude.co", true },
- { "tdvg.nl", true },
- { "tdyx-china.com.cn", true },
- { "tea-empire.co.uk", true },
- { "tea.in.th", true },
- { "teachbiz.net", true },
- { "teachercreatedmaterials.com", true },
- { "teacherph.com", true },
- { "teacherpowered.org", true },
- { "teachersasap.info", true },
- { "teachmeplease.ru", true },
- { "teachpeople.org", true },
- { "teachwithouttears.com", true },
- { "teahut.net", true },
- { "tealdotsinanorangeworld.com", true },
- { "team-azerty.com", true },
- { "team-io.net", true },
- { "team005helpdesk.ddns.net", true },
- { "team3482.com", true },
- { "teamacadia.org", true },
- { "teambeam.at", true },
- { "teambeam.ch", true },
- { "teambeam.com", true },
- { "teambeam.de", true },
- { "teambim.eu", true },
- { "teambition.com", true },
- { "teamfilm.tk", true },
- { "teamkoncert.pl", true },
- { "teamliquid.com", true },
- { "teamliquidpro.com", true },
- { "teammateworld.com", true },
- { "teamninjaapp.com", true },
- { "teamnissannorthparts.com", true },
- { "teampaddymurphy.ch", true },
- { "teampaddymurphy.ie", true },
- { "teamrevolution.tk", true },
- { "teams.microsoft.com", true },
- { "teamsimplythebest.com", true },
- { "teamspeak-serverlist.xyz", true },
- { "teamsuccess.io", true },
- { "teamtouring.net", true },
- { "teamtrack.uk", true },
- { "teamup.com", true },
- { "teamup.rocks", true },
- { "teamupturn.com", true },
- { "teamupturn.org", true },
- { "teamwpsekure.com", true },
- { "teamx-gaming.de", true },
- { "tearoomlints.be", true },
- { "tease.email", true },
- { "teasenetwork.com", true },
- { "teaser-trailer.com", true },
- { "teatr-dva-kryla.ru", true },
- { "teatrarium.com", true },
- { "teazer.tk", true },
- { "teb-akademia.pl", true },
- { "tebebo.com", true },
- { "tebodental.com", true },
- { "teboorthodontics.com", true },
- { "tec3000.ch", false },
- { "tecart-cloud.de", true },
- { "tecart-system.de", true },
- { "tecartcrm.de", true },
- { "tecfleet.com", true },
- { "tech-banker.com", false },
- { "tech-blogger.net", true },
- { "tech-clips.com", false },
- { "tech-essential.com", true },
- { "tech-info.jp", true },
- { "tech-leaders.jp", true },
- { "tech-ninja.de", true },
- { "tech-rat.com", true },
- { "tech-seminar.jp", true },
- { "tech-value.eu", true },
- { "tech-zealots.com", true },
- { "tech4arab.net", true },
- { "tech4greece.gr", true },
- { "techableme.com", true },
- { "techace.jp", true },
- { "techamigo.in", true },
- { "techaraby.com", true },
- { "techassist.io", false },
- { "techaulogy.com", true },
- { "techbrown.com", true },
- { "techcentral.my", false },
- { "techcenturion.com", true },
- { "techchip.com", true },
- { "techcracky.com", true },
- { "techcu.lt", true },
- { "techcultivation.de", false },
- { "techcultivation.net", false },
- { "techcultivation.org", false },
- { "techdatapark.com", true },
- { "techday.asia", true },
- { "techday.co.nz", true },
- { "techday.com.au", true },
- { "techday.eu", true },
- { "techday.network", true },
- { "techdirt.com", true },
- { "techdroid.eu", true },
- { "techendeavors.com", true },
- { "techfishnews.com", true },
- { "techformator.pl", true },
- { "techgadgetry.in", true },
- { "techhappy.ca", true },
- { "techinet.pl", true },
- { "techinsurance.com", true },
- { "techjobplaybook.nyc", true },
- { "techjoe.co", true },
- { "techlovers.com", true },
- { "techlr.de", true },
- { "techmagus.icu", true },
- { "techmajesty.com", true },
- { "techmanstan.com", true },
- { "techmasters.io", true },
- { "techmoviles.com", true },
- { "techmunchies.net", true },
- { "techni-grav.com", true },
- { "technic3000.com", true },
- { "technicabv.nl", true },
- { "technicallyeasy.net", true },
- { "technicaloffice.gr", true },
- { "technicalproblem.tk", true },
- { "technicalramblings.com", true },
- { "technicalsystemsprocessing.com", true },
- { "technik-boeckmann.de", true },
- { "technochat.in", true },
- { "technogps.com", true },
- { "technogroup.cz", true },
- { "technokicks.com", true },
- { "technologie-innovation.fr", true },
- { "technology.cx", true },
- { "technologyhound.org", true },
- { "technologysi.com", true },
- { "technorely.com", true },
- { "technosapien.ml", true },
- { "technoscoots.com", true },
- { "technosorcery.net", true },
- { "technospeakco.com", true },
- { "technowise.tk", true },
- { "techold.ru", false },
- { "techorbiter.com", true },
- { "techosmarcelo.com.ar", true },
- { "techpilipinas.com", true },
- { "techpit.us", true },
- { "techpivot.net", true },
- { "techpoint.org", true },
- { "techraptor.net", true },
- { "techserve.ml", true },
- { "techshift.eu", true },
- { "techshift.nl", true },
- { "techshift.se", true },
- { "techsmartstore.com", true },
- { "techsolvency.com", true },
- { "techsys.cz", true },
- { "techsystemsa.com", true },
- { "techtalks.no", true },
- { "techtrader.ai", true },
- { "techtrader.io", true },
- { "techusers.de", true },
- { "techvalue.gr", true },
- { "techview.link", true },
- { "techviewforum.com", true },
- { "techvrse.com", true },
- { "techwalker.cf", true },
- { "techwayz.com", true },
- { "techwhisperer.ca", true },
- { "techwords.io", true },
- { "techy360.com", true },
- { "techzero.cn", true },
- { "techzhou.com", true },
- { "teckgeekz.com", true },
- { "teckids.org", true },
- { "tecknobox.fr", true },
- { "tecma.com", true },
- { "tecnaa.com", true },
- { "tecnasa.com", true },
- { "tecne.ws", true },
- { "tecnicoelettrodomestici.roma.it", true },
- { "tecnikan.com.ar", true },
- { "tecnoarea.com.ar", true },
- { "tecnoblog.net", true },
- { "tecnobrasilloja.com.br", true },
- { "tecnocomp-systems.com", true },
- { "tecnodritte.it", true },
- { "tecnogazzetta.it", true },
- { "tecnologiasurbanas.com", true },
- { "tecon.co.at", true },
- { "tecyt.com", true },
- { "ted.do", true },
- { "tedb.us", true },
- { "teddy.ch", true },
- { "teddybradford.com", true },
- { "teddykatz.com", true },
- { "teddylu.info", true },
- { "teddyss.com", false },
- { "tedsdivingsystem.com", true },
- { "teeautomat-teemaschine.de", true },
- { "teemperor.de", true },
- { "teemulintula.fi", true },
- { "teen-porno-video.ru", true },
- { "teenerotic.net", true },
- { "teengirl.pub", true },
- { "teenportal.net", true },
- { "teenpussypornvid.com", true },
- { "teensexgo.com", true },
- { "teensybows.hu", true },
- { "teeqq.com", true },
- { "teetoptens.com", true },
- { "teeworlds-friends.de", true },
- { "teextee.com", true },
- { "tefek.cz", true },
- { "teganlaw.ca", true },
- { "teganlaw.com", true },
- { "tege-elektronik.hu", true },
- { "tegel-schoonmaken.nl", true },
- { "tehden.com", true },
- { "tehniss.rs", true },
- { "tehrabbitt.com", false },
- { "tehranlittmann.com", true },
- { "teichroeb.net", true },
- { "teixobactin.com", true },
- { "teka.ro", true },
- { "tekingb.com", true },
- { "teknemodus.com.au", true },
- { "teknik.io", true },
- { "tekniksnack.se", true },
- { "tekniskakustik.se", true },
- { "tekno.de", true },
- { "teknoforums.com", true },
- { "teknoroit.com", true },
- { "tekstschrijvers.net", true },
- { "tektouch.net", true },
- { "telamon.eu", true },
- { "telco.at", true },
- { "telcodb.net", true },
- { "tele-online.com", true },
- { "tele-points.net", true },
- { "telecamera.pro", false },
- { "telecomwestland.nl", true },
- { "teledivi.com", true },
- { "telefon.report", true },
- { "telefonabonnement.dk", true },
- { "telefonkonferenz.ch", true },
- { "telefonni-ustredna.cz", true },
- { "telefonseelsorge-paderborn.de", true },
- { "telefoon.nl", true },
- { "telefoonabonnement.nl", true },
- { "telegenisys.com", true },
- { "telegra.ph", true },
- { "telegram-sms.com", true },
- { "telegram.hk", true },
- { "telegram.org", true },
- { "telehealthventures.com", false },
- { "telekothonbd.com", true },
- { "teleogistic.net", true },
- { "telephonedirectories.us", true },
- { "telephoni-cdma.tk", true },
- { "telepok.com", true },
- { "teleport.com.br", true },
- { "teleportweb.com.br", true },
- { "teleradio.tk", true },
- { "telestepina.ru", true },
- { "teletexto.com", true },
- { "teletxt.me", true },
- { "televizeseznam.cz", true },
- { "televotia.ch", true },
- { "telework.gov", true },
- { "telford.codes", true },
- { "telhabrasil.com.br", true },
- { "telling.xyz", true },
- { "tellingua.com", false },
- { "tellthemachines.com", true },
- { "tellusaboutus.com", true },
- { "telly.site", true },
- { "tellygames.com", true },
- { "tellyourtale.com", true },
- { "telnet.dk", true },
- { "teloo.pl", true },
- { "telos-analytics.com", true },
- { "telsu.fi", true },
- { "teltru.com", true },
- { "tem.li", true },
- { "temariogratis.com", true },
- { "temariopolicianacional.es", true },
- { "temariosdeoposiciones.es", true },
- { "tematicas.org", true },
- { "temdu.com", true },
- { "temizmama.com", true },
- { "temnacepel.cz", true },
- { "temp.pm", true },
- { "tempa.com.ua", true },
- { "tempdomain.ml", true },
- { "tempdomain.tk", true },
- { "templars.army", true },
- { "template-parks.com", true },
- { "templateinvaders.com", true },
- { "templetattoo.co.za", true },
- { "templete.tk", true },
- { "templum.com.br", true },
- { "tempmail.ninja", true },
- { "temporarysanity.tk", true },
- { "temtekco.com", true },
- { "tenable.com.au", true },
- { "tenber.ge", true },
- { "tenbos.ch", true },
- { "tendance-et-accessoires.com", true },
- { "tende.roma.it", true },
- { "tendermaster.com.ua", true },
- { "tenderplan.ru", true },
- { "tenderstem.co.uk", true },
- { "tenelco.net", true },
- { "tenenz.com", true },
- { "tenfeetsquare.net", true },
- { "tenisservis.eu", true },
- { "tenkofx.com", true },
- { "tenniscourtsjoburg.com", true },
- { "tennismindgame.com", true },
- { "tennisportal.com.ua", true },
- { "tenno.tools", true },
- { "tenpo-iku.com", true },
- { "tenpolab.com", true },
- { "tenshoku-hanashi.com", true },
- { "tenta.com", true },
- { "tentabrowser.com", true },
- { "tentacletank.com", true },
- { "tentations-voyages.com", false },
- { "tenthousandcoffees.com", true },
- { "tenyx.de", true },
- { "tenzer.dk", true },
- { "teodorpravicky.com", true },
- { "teoleonie.com", false },
- { "tepid.org", true },
- { "tepitus.de", true },
- { "teplofom.ru", true },
- { "teplohod.kharkov.ua", true },
- { "teq-automotive.com", true },
- { "tequilazor.com", true },
- { "terabyte.services", true },
- { "terabyteit.co.uk", true },
- { "teracloud.at", true },
- { "teramind.co", true },
- { "teranacreative.com", true },
- { "teraservice.eu", true },
- { "terass.com", true },
- { "terengganudaily.tk", true },
- { "teriyakisecret.com", true },
- { "termbackti.me", true },
- { "terme.viterbo.it", true },
- { "termee.com", true },
- { "termin-online.com", true },
- { "terminalhrd.com", true },
- { "terminalvelocity.co.nz", true },
- { "termino.eu", true },
- { "terminsrakning.se", true },
- { "termitinitus.org", true },
- { "termografiranje.si", true },
- { "termoidraulica.roma.it", true },
- { "termoidraulico.roma.it", true },
- { "termux.com", true },
- { "terra-24.ru", true },
- { "terra.by", true },
- { "terrab.de", false },
- { "terracloud.de", false },
- { "terracom.gr", true },
- { "terraelectronica.ru", true },
- { "terraform.io", true },
- { "terragni-sarasin.ch", true },
- { "terrainator.com", true },
- { "terraluna.space", true },
- { "terranova.fi", true },
- { "terrapay.com", true },
- { "terrasoverkappingvillage.be", true },
- { "terrastaffinggroup.com", false },
- { "terraweb.net", true },
- { "terres-et-territoires.com", true },
- { "terresmagiques.com", false },
- { "terrorbilly.com", true },
- { "terrorblast.tk", true },
- { "terrty.net", true },
- { "terrybutler.co.uk", true },
- { "terryjohnsononline.com", true },
- { "tervemaja.ee", true },
- { "tes.com", true },
- { "tesche.biz", true },
- { "teschenhausen.com", true },
- { "tescoirelandpayslips.com", true },
- { "tescolide.cz", true },
- { "tescoludia.sk", true },
- { "tesdrole.tk", true },
- { "teskalabs.com", true },
- { "teslamagician.com", true },
- { "tessai.ga", true },
- { "tesseractinitiative.org", true },
- { "test-greavesindia.pantheonsite.io", true },
- { "test-iq.gq", true },
- { "test-online.tk", true },
- { "test-school.ml", true },
- { "test-textbooks.com", true },
- { "test.de", true },
- { "test.support", true },
- { "tested.email", true },
- { "testeri.fi", true },
- { "testeveonline.com", true },
- { "testforce.tk", true },
- { "testfra.me", true },
- { "testgeomed.ro", true },
- { "testingbot.com", true },
- { "testmx.email", true },
- { "testmx.eu", true },
- { "testmx.org", true },
- { "testmy.net", true },
- { "testomato.com", true },
- { "testoon.com", true },
- { "testpornsite.com", true },
- { "testsuite.org", true },
- { "testthis.cf", true },
- { "testuje.net", true },
- { "tetedelacourse.ch", true },
- { "teto.nu", true },
- { "tetr.io", true },
- { "tetraetc.com", true },
- { "tetraktus.org", true },
- { "tetrarch.co", true },
- { "tetsai.net", true },
- { "tetsugakunomichi.jp", true },
- { "tetsumaki.net", true },
- { "teulon.eu", true },
- { "teusink.eu", true },
- { "tewarilab.co.uk", true },
- { "tewkesburybouncycastles.co.uk", true },
- { "tewkesburyyoga.com", true },
- { "texasabrasiveblasting.com", true },
- { "texasbluesalley.com", true },
- { "texasholdemevents.net", true },
- { "texashomesandland.com", true },
- { "texasllcpros.com", false },
- { "texasonesource.com", true },
- { "texaspaintingandgutters.com", true },
- { "texasparkinglotstriping.com", true },
- { "texastwostepdivorce.com", true },
- { "texasurodoc.com", true },
- { "texasvolunteerattorneys.org", true },
- { "texaswinetrail.com", true },
- { "texby.com", true },
- { "texhnolyze.net", true },
- { "texiafinishing.com", true },
- { "texier.mx", true },
- { "text-shirt.com", false },
- { "textburst.com", true },
- { "texteditor.co", true },
- { "texter-linz.at", true },
- { "texter.at", true },
- { "texterseo.at", true },
- { "texterseo.de", true },
- { "textonly.email", true },
- { "textpattern.com", true },
- { "textualapp.com", true },
- { "textundblog.de", true },
- { "texture.net.au", true },
- { "texus.me", true },
- { "texy.info", true },
- { "teysens.com", true },
- { "tezwifi.com", true },
- { "tf2b.com", true },
- { "tf2calculator.com", true },
- { "tfb.az", true },
- { "tferdinand.net", true },
- { "tfg-bouncycastles.com", true },
- { "tfle.xyz", true },
- { "tflite.com", true },
- { "tfnapps.de", true },
- { "tfreeman.org", true },
- { "tfx.com.br", true },
- { "tfx.pt", true },
- { "tfxstartup.com", true },
- { "tfxstartup.com.br", true },
- { "tgamobility.co.uk", true },
- { "tgb.org.uk", true },
- { "tgbabyzoo.com", true },
- { "tgbyte.de", true },
- { "tgexport.eu", true },
- { "tgo3333.com", false },
- { "tgo4444.com", false },
- { "tgo5555.com", false },
- { "tgtv.tn", true },
- { "tgtw.cc", true },
- { "tgui.eu", true },
- { "tgui.net", true },
- { "tgw.com", true },
- { "tgwork.com", true },
- { "th.search.yahoo.com", false },
- { "thablubb.de", true },
- { "thaedal.net", true },
- { "thai.dating", true },
- { "thai369.com", true },
- { "thaicurry.net", true },
- { "thaicyberpoint.com", true },
- { "thaiforest.ch", false },
- { "thaiforexfamily.com", true },
- { "thaihomecooking.com", true },
- { "thaihong.co.th", true },
- { "thaihotmodels.tk", true },
- { "thailandpharmacy.net", true },
- { "thailandpropertylisting.com", true },
- { "thaimega.club", true },
- { "thaiportal.gq", true },
- { "thaiwaterbirds.com", true },
- { "thajskyraj.com", true },
- { "thalgo-cz.cz", true },
- { "thalhammer.it", true },
- { "thalia.nu", true },
- { "thalita-reload.com", true },
- { "thallgordleyrealtor.com", true },
- { "thalmann.fr", false },
- { "thambaru.com", true },
- { "thanatoid.net", true },
- { "thanhthinhbui.com", true },
- { "thanhtrungmobile.vn", true },
- { "thaqfni.com", true },
- { "tharuka-app.de", true },
- { "tharuka.com", true },
- { "tharuka.de", true },
- { "thatdarkplace.com", true },
- { "thatguyalex.com", true },
- { "thatquiz.org", true },
- { "thatshayini-sivananthan.fr", true },
- { "thavmacode.gr", true },
- { "thc-stadvdzon.nl", true },
- { "thca.ca", true },
- { "thcdev.de", true },
- { "thconsulting.co.uk", true },
- { "thcpbees.co.uk", true },
- { "the-alan-parsons-project.com", true },
- { "the-archimedeans.org.uk", true },
- { "the-archive.ml", true },
- { "the-azad.com", true },
- { "the-big-bang-theory.com", true },
- { "the-body-shop.hu", false },
- { "the-digitale.com", false },
- { "the-fermenter.com", true },
- { "the-forgotten.net", true },
- { "the-hemingway-code.de", true },
- { "the-jeuxflash.com", true },
- { "the-kuusatu.com", true },
- { "the-medium-dolphore.com", false },
- { "the-mystery.org", true },
- { "the-nash-education-program.com", true },
- { "the-pack.nl", true },
- { "the-pcca.org", true },
- { "the-red.pp.ua", true },
- { "the-train.de", true },
- { "the-trophy-company.com", true },
- { "the-woods.org.uk", true },
- { "the-zenti.de", true },
- { "the1way.net", true },
- { "the2f.de", true },
- { "the3musketeers.biz", true },
- { "the51news.ga", true },
- { "the5th.nl", true },
- { "the8rules.co.uk", true },
- { "thea-team.net", true },
- { "theaccountingcompanyleeds.co.uk", true },
- { "theactuary.ninja", true },
- { "theadelaideshow.com.au", true },
- { "theadultswiki.com", true },
- { "theafleo.ga", true },
- { "thealchemistatelier.com", true },
- { "theallmanteam.com", true },
- { "thealonas.cf", true },
- { "thealonas.ga", true },
- { "thealonas.gq", true },
- { "thealonas.ml", true },
- { "thealonas.tk", true },
- { "theandroidsoul.com", true },
- { "theangelfishfoundation.org", true },
- { "theantarticx.com", true },
- { "theantisocialengineer.com", true },
- { "theappliancedepot.co.uk", false },
- { "theaps.net", true },
- { "theartistjournal.ca", true },
- { "theasianshooter.com", true },
- { "theastrocoach.com", true },
- { "theaterreichenhall.tk", true },
- { "theatre-schools.com", true },
- { "theaustinsevenworkshop.com", true },
- { "theaviationagency.com", true },
- { "theawesomemuse.com", true },
- { "thebabypassport.com", true },
- { "thebacteriafight.gq", true },
- { "thebakers.com.br", false },
- { "thebakery2go.de", true },
- { "thebannerstore.com", true },
- { "thebarrens.nu", true },
- { "thebarrypatch.com", true },
- { "thebasebk.org", true },
- { "thebasicstudio.com", true },
- { "thebcm.co.uk", true },
- { "thebeardedrapscallion.com", true },
- { "thebeginningviolinist.com", true },
- { "thebestfun.co.uk", true },
- { "thebestlaos.ga", true },
- { "thebigbitch.nl", true },
- { "thebigdatacompany.com", true },
- { "thebiglaskowski.com", true },
- { "thebigwave.de", true },
- { "thebikeinsurer.co.uk", true },
- { "thebimhub.com", true },
- { "thebinarys.com", true },
- { "thebirchwoods.com", true },
- { "thebit.link", true },
- { "theblackboard.gr", true },
- { "theblacklock.com", true },
- { "theblondeabroad.com", true },
- { "theblueroofcottage.ca", true },
- { "theboatmancapital.com", true },
- { "theboats.agency", true },
- { "theboats.club", true },
- { "theboats.com", true },
- { "theboats.de", true },
- { "theboats.online", true },
- { "theboats.pro", true },
- { "theboats.site", true },
- { "thebodyprinciple.com", true },
- { "thebonerking.com", true },
- { "thebotanicalstore.com.au", true },
- { "theboulders.com", true },
- { "thebouncedepartment.co.uk", true },
- { "theboxofcarlos.com", true },
- { "thebrainfactory.eu", true },
- { "thebreakroom.org", true },
- { "thebridalcollection.com", true },
- { "thebrightons.co.uk", true },
- { "thebrightons.uk", true },
- { "thebroadcastknowledge.com", true },
- { "thebulletin.io", true },
- { "thebusinessofgoodfilm.com", true },
- { "thebuttongame.io", true },
- { "thecamels.org", true },
- { "thecameradivision.com", true },
- { "thecandidforum.com", true },
- { "thecarolingconnection.com", true },
- { "thecarpenters.tk", true },
- { "thecavalries.com", true },
- { "thechallenge.fit", true },
- { "thechargertimes.com", true },
- { "thecherryship.ch", false },
- { "theclonker.de", true },
- { "thecloudshelter.com", true },
- { "thecluster.xyz", true },
- { "thecoffeecamp.com", true },
- { "thecompany.pl", true },
- { "thecomparativist.com", true },
- { "thecondobuyers.com", true },
- { "theconverter.net", true },
- { "thecr3ative.tk", true },
- { "thecraftingstrider.net", true },
- { "thecrazytravel.com", true },
- { "thecreativeedgeinc.com", true },
- { "thecrescentchildcarecenter.com", true },
- { "thecskr.in", true },
- { "thecuriousdev.com", true },
- { "thecurvyfashionista.com", true },
- { "thecustomdroid.com", true },
- { "theda.co.za", true },
- { "thedailyshirts.com", true },
- { "thedanceacademybuckscounty.com", true },
- { "thedark1337.com", true },
- { "thedarkfusion.tk", true },
- { "thederminstitute.com", true },
- { "thedhs.com", true },
- { "thediamondcenter.com", true },
- { "thediaryofadam.com", true },
- { "thedigitaleconomist.com", true },
- { "thediscovine.com", true },
- { "thedocumentrefinery.com", true },
- { "thedronechart.com", true },
- { "thedroneely.com", true },
- { "thedword.xyz", true },
- { "theedisoncapital.com", true },
- { "theeducationchannel.info", true },
- { "theeducationdirectory.org", true },
- { "theeffingyogablog.com", true },
- { "theeighthbit.com", false },
- { "theel0ja.info", true },
- { "theel0ja.ovh", true },
- { "theemasphere.com", true },
- { "theencounter.nu", true },
- { "theentertainmentcontractor.com", true },
- { "theepiclounge.com", true },
- { "theepicsponge.co.uk", true },
- { "theeverycompany.com", true },
- { "theeyeopener.com", true },
- { "thefairieswantmedead.com", true },
- { "thefamilygarrison.com", true },
- { "thefanimatrix.net", true },
- { "thefasterweb.com", true },
- { "thefengshuioffice.com", true },
- { "theferrarista.com", false },
- { "thefestivals.uk", true },
- { "thefizz.uk", true },
- { "theflightsdesk.com", true },
- { "theflowerbasketonline.com", true },
- { "theflowershopdeddington.com", true },
- { "theflyingbear.net", false },
- { "thefnafarchive.org", true },
- { "thefoodellers.com", true },
- { "thefootinstitutela.com", true },
- { "theforkedspoon.com", true },
- { "thefranknews.com", true },
- { "thefreebay.tk", true },
- { "thefreemail.com", true },
- { "thefriedzombie.com", true },
- { "thefriedzombie.nl", true },
- { "thefriedzombie.online", true },
- { "thefrk.pw", true },
- { "thefuckingtide.com", true },
- { "thefuelcardpeople.co.uk", true },
- { "thefunfirm.co.uk", true },
- { "thefurnitureco.uk", true },
- { "thefurniturefamily.com", true },
- { "thefusion.net.in", true },
- { "thefussyeater.ie", true },
- { "thegarrowcompany.com", true },
- { "thegatheringocala.com", true },
- { "thegaucompany.healthcare", true },
- { "thegeekdiary.com", true },
- { "thegerwingroup.com", true },
- { "thegioidulich.com.vn", true },
- { "thegioinano.com", true },
- { "thegreatcommissionpodcast.com", true },
- { "thegreatplains.com", true },
- { "thegreenpark.co.uk", true },
- { "thegroovecartel.com", true },
- { "thegrowhouse.ca", true },
- { "thehackerblog.com", true },
- { "thehairrepublic.net", true },
- { "thehairstandard.com", true },
- { "thehamiltoncoblog.com", true },
- { "thehardylawfirm.com", true },
- { "thehasty.com", true },
- { "thehaxbys.co.uk", true },
- { "theheatingoilclub.co.uk", true },
- { "thehobincompany.com", true },
- { "thehoff.ddnss.de", true },
- { "thehomeicreate.com", true },
- { "thehonorguard.org", true },
- { "thehookup.be", true },
- { "thehub.ai", false },
- { "thehullbeekeeper.co.uk", true },
- { "theidiotboard.com", true },
- { "theig.co", true },
- { "theilluminatisociety.org", true },
- { "theillustrationstudio.com.au", true },
- { "theimaginationagency.com", true },
- { "theinboxpros.com", true },
- { "theindiantrip.com", false },
- { "theinflatables-ni.co.uk", true },
- { "theinitium.com", false },
- { "theinnerprism.com", true },
- { "theintercept.com", true },
- { "theinternationalgeekconspiracy.eu", true },
- { "theissen.io", true },
- { "theitsage.com", false },
- { "thejimmyw.uk", true },
- { "thejoneshub.com", true },
- { "thejunkfiles.com", true },
- { "thekev.in", true },
- { "thekeytobusiness.co.uk", true },
- { "thekiddz.com", true },
- { "thekingofhate.com", false },
- { "theknockout.tk", true },
- { "thekodester.ca", true },
- { "thekonsulthub.tk", true },
- { "thekovnerfoundation.org", true },
- { "thekuwayama.net", true },
- { "thelaimlife.com", true },
- { "thelakedistrict.tk", true },
- { "thelanscape.com", true },
- { "thelbc.io", true },
- { "thelearningenterprise.co.uk", true },
- { "thelegionshirley.co.uk", true },
- { "thelencystore.com", true },
- { "thelevelman.com", true },
- { "thelicagency.com", true },
- { "thelifeofmala.com", true },
- { "thelinuxtree.net", true },
- { "thelittlecraft.com", true },
- { "thelittlejewel.com", true },
- { "thelocals.ru", true },
- { "thelonelyones.co.uk", true },
- { "thelonious.nl", true },
- { "thelostyankee.com", true },
- { "thelounge.chat", true },
- { "themallards.info", true },
- { "themarshallproject.org", true },
- { "themaster.site", true },
- { "themasterplan.com.au", true },
- { "themathscentre.com", true },
- { "themattresswarehouse.co.za", true },
- { "themecraft.studio", true },
- { "themegteam.com", true },
- { "themenzentrisch.de", true },
- { "themerchandiser.net", false },
- { "themeridianway.com", true },
- { "themiddle.co", true },
- { "themigraineinstitute.com", true },
- { "theminiacs.com", true },
- { "themist.cz", true },
- { "themoneyconverter.com", true },
- { "themonkeytrail.co.uk", true },
- { "themonthly.com.au", true },
- { "themostexpensiveworkofart.com", true },
- { "themusecollaborative.org", true },
- { "themusic.cloud", true },
- { "themusicinnoise.net", true },
- { "thenerdic.com", true },
- { "thenest.se", true },
- { "thenetw.org", true },
- { "thenextasset.com", true },
- { "thenexwork.com", true },
- { "thenine.info", true },
- { "theninenine.com", true },
- { "thenocman.com", true },
- { "thenowheremen.com", true },
- { "theo-andreou.org", true },
- { "theobg.co", true },
- { "theobora.fr", true },
- { "theobromos.fr", true },
- { "theoc.co", true },
- { "theocg.co", true },
- { "theocratic.cf", true },
- { "theodeboer.nl", true },
- { "theodorahome.co", true },
- { "theodorahome.com.br", true },
- { "theofleck.com", false },
- { "theojellis.com", true },
- { "theokouzelis.com", true },
- { "theolivetreerestaurants.com", true },
- { "theologyz.com", true },
- { "theonegroup.co.uk", true },
- { "theonethaimassage.de", true },
- { "theoosmetalart.nl", true },
- { "theoptechnation.com", true },
- { "theoriginalbit.com", true },
- { "theoriginalmarkz.com", true },
- { "theorioncorrelation.com", true },
- { "theory-test-online.co.uk", true },
- { "theory.org", true },
- { "theoscure.eu", true },
- { "theoutline.com", true },
- { "theoutsiders.stream", true },
- { "thepartner.co.uk", true },
- { "thepartydoctors.co.uk", true },
- { "thepasteb.in", true },
- { "thepathsofdiscovery.com", true },
- { "thepaulagcompany.com", false },
- { "thepavilionbanbury.co.uk", true },
- { "thepaymentscompany.com", true },
- { "thepb.in", true },
- { "theperry.group", true },
- { "thepharm.co.nz", true },
- { "thephp.cc", true },
- { "thepieslicer.com", true },
- { "thepillclub.com", true },
- { "thepiratesociety.org", true },
- { "theplasticsurgerycenterofnashville.com", true },
- { "theplayspot.co.uk", true },
- { "theploughharborne.co.uk", true },
- { "thepoplarswines.com.au", true },
- { "thepriorybandbsyresham.co.uk", true },
- { "theprojectx.tk", true },
- { "thepromisemusic.com", true },
- { "theptclist.tk", true },
- { "thepurplemaids.com", true },
- { "theralino.de", true },
- { "theramo.re", true },
- { "therandombits.com", false },
- { "therapiemi.ch", true },
- { "therapyclient.com", true },
- { "therapyconnects.co.uk", true },
- { "therapynotes.com", true },
- { "therapypartner.com", true },
- { "therapyportal.com", true },
- { "therapysxm.com", false },
- { "therealchamps.com", true },
- { "therealcost.gov", true },
- { "thereaper.net.au", true },
- { "theredsgazette.tk", true },
- { "theregoesbrian.com", true },
- { "thereisnocloud.fr", true },
- { "therepublicofliverpool.com", true },
- { "theresa-mayer.eu", true },
- { "therevenge.me", true },
- { "therhetorical.ml", false },
- { "thermalbad-therme.de", true },
- { "thermalflowtech.com", true },
- { "thermia.co.nz", true },
- { "thermia.com.au", true },
- { "thermique.ch", false },
- { "thermity.com", true },
- { "thermolamina.nl", true },
- { "thermorecetas.com", true },
- { "thermowood-bkh.ru", true },
- { "theroks.com", false },
- { "theroyalmarinescharity.org.uk", true },
- { "therudeworkout.com", true },
- { "therugswarehouse.co.uk", true },
- { "theruleslawyer.net", true },
- { "therumfordcitizen.com", true },
- { "therworth.com", true },
- { "therworth.eu", true },
- { "therworth.net", true },
- { "therworth.org", true },
- { "thesalonthing.com", false },
- { "thesandboxchicago.com", true },
- { "thesanta.biz", true },
- { "thesarogroup.com", true },
- { "thesassynut.com", true },
- { "thesaturdaypaper.com.au", true },
- { "thesaurus.net", true },
- { "theschool.jp", true },
- { "thescientists.nl", true },
- { "thesecondsposts.com", false },
- { "thesecurityvault.com", true },
- { "theseed.io", true },
- { "theseoframework.com", true },
- { "theseoplatform.co.uk", true },
- { "theseosystem.com", true },
- { "theserviceyouneed.com", true },
- { "thesession.org", false },
- { "thesetwohands864.com", true },
- { "theshaker.com.au", true },
- { "thesharedbrain.ch", false },
- { "thesharedbrain.com", false },
- { "theshine.pl", false },
- { "theshopally.com", false },
- { "theshots.cz", true },
- { "thesignalco.com.au", true },
- { "thesimplewebcompany.com", true },
- { "thesisgeek.com", true },
- { "thesishelp.net", true },
- { "theskingym.co.uk", true },
- { "thesmallbusinesswebsiteguy.com", true },
- { "thesmokingcuban.com", true },
- { "thesnellvilledentist.com", false },
- { "thesoundstageatstrangeland.com", true },
- { "thesplashlab.com", true },
- { "thesslonline.com", true },
- { "thesslstore.com", true },
- { "thestatementjewelry.com", true },
- { "thestationatwillowgrove.com", true },
- { "thesteamrooms.com", true },
- { "thesteins.org", false },
- { "thestockoasis.com", true },
- { "thestoneage.de", true },
- { "thestory.ie", true },
- { "thestoryshack.com", true },
- { "thestrategyagency.com.au", true },
- { "thestreamable.com", true },
- { "thestudioslucan.com", true },
- { "thestylebouquet.com", true },
- { "thesunshinecoasttourcompany.com.au", true },
- { "thesuppercircle.com", true },
- { "theswimdoctors.com", true },
- { "theswissbay.ch", true },
- { "theta.eu.org", true },
- { "thetassos.com", true },
- { "thetechbasket.com", true },
- { "thetechieflutist.com", true },
- { "thethoughttrainer.com", true },
- { "thethreadofhope.org", true },
- { "thethreadsmiths.com.tw", true },
- { "thethreepercent.marketing", true },
- { "thetiedyelab.com", true },
- { "thetinylife.com", true },
- { "thetipo01.tk", true },
- { "thetomatosoup.com", true },
- { "thetomharling.com", true },
- { "thetopmovie.gq", true },
- { "thetradinghall.com", false },
- { "thetravelhack.com", true },
- { "thetree.ro", true },
- { "thetrendspotter.net", true },
- { "thetuco.fr", true },
- { "thetuxkeeper.de", false },
- { "thetvtraveler.com", true },
- { "thetwistedrabbit.com", true },
- { "theundefeated.com", true },
- { "thevacweb.com", true },
- { "thevalentineconstitution.com", true },
- { "thevalueofarchitecture.com", true },
- { "thevanishedvoyager.ml", true },
- { "theveils.net", true },
- { "thevenueofhollywood.com", true },
- { "thevenuevr.com", true },
- { "theverybusyoffice.co.uk", true },
- { "thevgg.com", false },
- { "theviolenceofdevelopment.com", true },
- { "thevirtualbookkeepers.com", true },
- { "thevisasofoz.com", true },
- { "thevoya.ga", false },
- { "thewagesroom.co.uk", true },
- { "thewayofthedojo.com", true },
- { "thewebflash.com", true },
- { "thewebsitedoctors.co.uk", true },
- { "thewebsitemarketingagency.com", true },
- { "thewehmeiers.com", true },
- { "thewhitehat.club", true },
- { "thewhitneypaige.com", true },
- { "thewizardsmanse.com", true },
- { "thewoodkid.com.au", true },
- { "theworkingeye.nl", true },
- { "theworldbattle.com", true },
- { "theworldexchange.com", true },
- { "theworldexchange.net", true },
- { "theworldexchange.org", true },
- { "theworldsend.eu", true },
- { "thexme.de", true },
- { "theyakshack.co.uk", true },
- { "theycallmefox.net", true },
- { "theyear199x.org", true },
- { "theyearinpictures.co.uk", true },
- { "theyosh.nl", false },
- { "thezero.org", true },
- { "thezillersathenshotel.com", true },
- { "thiagohersan.com", true },
- { "thienteakee.com", true },
- { "thiepcuoidep.com", true },
- { "thiepxinh.net", true },
- { "thierry-daellenbach.com", false },
- { "thierrybasset.ch", false },
- { "thietbithoathiem.net", true },
- { "thietkegianhangtttm.com", true },
- { "thijmenmathijs.nl", true },
- { "thijs.amsterdam", true },
- { "thijs.fr", true },
- { "thijsbekke.nl", true },
- { "thijsenarjan.nl", true },
- { "thijsslop.com", true },
- { "thijsslop.eu", true },
- { "thijsslop.nl", true },
- { "thijsvanderveen.net", true },
- { "thilobuchholz.de", true },
- { "thimbros.tk", true },
- { "thinair.co", true },
- { "thinairsolutions.com", true },
- { "thincats.com", true },
- { "thinegen.de", true },
- { "thing.vn", false },
- { "thing4everyone.com", true },
- { "thingies.site", true },
- { "thingsandcode.com", true },
- { "thingsimplied.com", false },
- { "thingswithstuff.llc", false },
- { "think-asia.org", true },
- { "think-pink.info", true },
- { "think-positive-watches.de", true },
- { "thinkbot.de", true },
- { "thinkheaddesign.com", true },
- { "thinkindifferent.net", true },
- { "thinkingandcomputing.com", true },
- { "thinkingliberty.com", true },
- { "thinkmarketing.ca", true },
- { "thinkrealty.com", true },
- { "thinktac.com", true },
- { "thinktux.net", true },
- { "thirdbearsolutions.com", true },
- { "thirdgenphoto.co.uk", true },
- { "thirdwaverevenue.com", true },
- { "thiry-automobiles.net", false },
- { "thisbrownman.com", true },
- { "thiscloudiscrap.com", false },
- { "thiscode.works", true },
- { "thisdot.site", true },
- { "thisfreelife.gov", true },
- { "thisgrowth.com", true },
- { "thisishugo.com", true },
- { "thisistechtoday.com", true },
- { "thisistranquility.life", true },
- { "thismatter.com", true },
- { "thisoldearth.com", true },
- { "thisphone.us", true },
- { "thisserver.dontexist.net", true },
- { "thistleandleaves.com", true },
- { "thitruongsi.com", true },
- { "thmail.ml", true },
- { "thmpartners.com", true },
- { "thoe.xyz", true },
- { "thoitrangsikimanh.com", true },
- { "tholcomb.com", true },
- { "thole.org", true },
- { "thom4s.info", true },
- { "thomalaudan.de", true },
- { "thomas-sammut.com", true },
- { "thomas-schmittner.de", true },
- { "thomas-steel.com", true },
- { "thomas-suchon.fr", true },
- { "thomas.computer", true },
- { "thomas.love", false },
- { "thomasbeckers.be", true },
- { "thomasbreads.com", false },
- { "thomascauquil.fr", true },
- { "thomasduerlund.com", true },
- { "thomasduerlund.dk", true },
- { "thomasecookedds.com", true },
- { "thomasetsophie.fr", true },
- { "thomaseyck.com", true },
- { "thomasfoster.co", true },
- { "thomashunter.name", false },
- { "thomaskoscheck.de", true },
- { "thomasmcfly.com", true },
- { "thomasmerritt.de", true },
- { "thomaspluschris.com", true },
- { "thomassen.sh", true },
- { "thomastestor.tk", true },
- { "thomastimepieces.com.au", true },
- { "thomasvochten.com", true },
- { "thomien.de", true },
- { "thompsonfamily.cloud", true },
- { "thomsons.com", true },
- { "thomsonscleaning.co.uk", true },
- { "thomspooren.nl", true },
- { "thomwiggers.nl", true },
- { "thooka.com", true },
- { "thor.edu", true },
- { "thor.re", true },
- { "thoroughbreddiesel.com", true },
- { "thorsten-schaefer.com", false },
- { "thorstenschaefer.name", true },
- { "thosci.com", true },
- { "thotpublicidad.com", true },
- { "thouni.de", true },
- { "thouqi.com", true },
- { "thousandoakselectrical.com", true },
- { "thousandoaksexteriorlighting.com", true },
- { "thousandoakslandscapelighting.com", true },
- { "thousandoakslighting.com", true },
- { "thousandoaksoutdoorlighting.com", true },
- { "thoxyn.com", true },
- { "thpay.com", true },
- { "threatcon.io", true },
- { "threatmarket.com", true },
- { "threatmonitor.io", true },
- { "threatnix.io", true },
- { "threatworking.com", true },
- { "threedpro.me", true },
- { "threefours.net", false },
- { "threelions.ch", true },
- { "threema.ch", true },
- { "threexxx.ch", true },
- { "threit.de", true },
- { "thriftdiving.com", true },
- { "thrillernyc.com", true },
- { "thriveafterabuse.com", true },
- { "thriveta.com", true },
- { "thriveweb.com.au", true },
- { "thrivewellnesshub.co.za", true },
- { "throttlerz.in", true },
- { "throughtheglass.photo", true },
- { "throwaway.link", true },
- { "throwmails.com", true },
- { "throwpass.com", true },
- { "thrush.com", true },
- { "thrw.ml", true },
- { "thsc.us", true },
- { "thscpac.org", true },
- { "thsecurity.cz", true },
- { "thues.eu", true },
- { "thuisverpleging-meerdael.be", true },
- { "thullbery.com", true },
- { "thummer.net", true },
- { "thunderfield-boat.co.uk", true },
- { "thunderkeys.net", true },
- { "thundr.eu", true },
- { "thunraz.com", true },
- { "thuongtravel.com", true },
- { "thurn.net", true },
- { "thusoy.com", true },
- { "thuthuatios.com", true },
- { "thutucxuatnhapkhau.net", true },
- { "thuviensoft.com", true },
- { "thuybich.com", true },
- { "thuyetphapmoi.com", true },
- { "thw-bernburg.de", true },
- { "thwiki.cc", true },
- { "thxandbye.de", true },
- { "thycotic.ru", true },
- { "thyngster.com", true },
- { "thynx.io", true },
- { "thyrex.fr", true },
- { "ti-pla.net", true },
- { "ti-planet.org", true },
- { "tiagonunes.pt", true },
- { "tiagosimao.com", true },
- { "tiaki.org", true },
- { "tiamarcia.com.br", true },
- { "tian123.com", true },
- { "tian888.com", true },
- { "tianbaobo05.com", true },
- { "tianbaobo06.com", true },
- { "tianbaobo07.com", true },
- { "tianbaobo08.com", true },
- { "tianbaobo09.com", true },
- { "tianeptine.com", true },
- { "tianshili.me", true },
- { "tib1.com", true },
- { "tibicinagarricola.com", true },
- { "tibipg.com", true },
- { "ticfleet.com", true },
- { "ticinoscout.ch", true },
- { "ticketassist.nl", true },
- { "ticketcity.com", true },
- { "ticketdriver.com", true },
- { "ticketpro.ca", false },
- { "ticketpro.com.my", true },
- { "ticketrunway.com", true },
- { "ticketslover.com", true },
- { "ticketsmate.com", true },
- { "ticketsource.co.uk", true },
- { "ticketsource.eu", true },
- { "ticketsource.io", true },
- { "ticketsource.us", true },
- { "ticketsvergleichen.de", true },
- { "tickettailor.com", true },
- { "tickit.ca", false },
- { "tid.jp", true },
- { "tidy.chat", true },
- { "tidych.at", true },
- { "tiekoetter.com", true },
- { "tiendadecosplay.es", true },
- { "tiendadolca.com", true },
- { "tiendaengeneral.com", true },
- { "tiendafetichista.com", true },
- { "tiener-herentals.be", true },
- { "tiens-ib.cz", true },
- { "tierarzt-karlsruhe-durlach.de", true },
- { "tierarztpraxis-bogenhausen.de", true },
- { "tierarztpraxis-illerwinkel.de", true },
- { "tierarztpraxis-weinert.de", true },
- { "tiergear.com.au", true },
- { "tieronegraphics.com", true },
- { "tierradeayala.com", true },
- { "ties.com", true },
- { "tiew.pl", true },
- { "tifan.net", true },
- { "tifaware.com", true },
- { "tiffanywatson.xyz", true },
- { "tiffnix.com", true },
- { "tigerdile.com", true },
- { "tigerfishingzambia.com", true },
- { "tigernode.com", true },
- { "tigernode.net", true },
- { "tigerscu.org", true },
- { "tiggeriffic.com", true },
- { "tiglitub.com", true },
- { "tiihosen.fi", true },
- { "tiim.technology", true },
- { "tijden.nu", true },
- { "tik.edu.ee", true },
- { "tik.help", true },
- { "tilde.institute", true },
- { "tilde.link", true },
- { "tildes.net", true },
- { "tildesnyder.com", true },
- { "tilesbay.com", true },
- { "tilikum.io", true },
- { "till.im", true },
- { "tillberg.us", true },
- { "tilleysbouncycastles.co.uk", true },
- { "tillseasyscore.com", true },
- { "tillwalldrug.com", true },
- { "tilman.ninja", true },
- { "tilosp.de", true },
- { "tiltedwindmillcrafts.com", true },
- { "tim-demisch.de", true },
- { "timacdonald.me", true },
- { "timatooth.com", true },
- { "timawesomeness.com", true },
- { "timbarlotta.com", true },
- { "timberkel.com", true },
- { "timbers.space", true },
- { "timbishopartist.com", true },
- { "timbrado.com", true },
- { "timbrust.de", true },
- { "timco.cloud", true },
- { "timdoug.com", true },
- { "time-craft.su", true },
- { "time.gov", true },
- { "time.sh", true },
- { "time100.ru", true },
- { "time2060.ru", true },
- { "time22.com", true },
- { "time2choose.com", true },
- { "timeai.io", true },
- { "timebutler.de", true },
- { "timeclub24.ru", true },
- { "timeglass.de", true },
- { "timeless-photostudio.com", true },
- { "timeless-spirit.com", true },
- { "timelimit.io", true },
- { "timelockstash.com", true },
- { "timelyapp.com", true },
- { "timeserver0.de", true },
- { "timetastic.co.uk", true },
- { "timetech.io", true },
- { "timetotrade.com", true },
- { "timetrade.com", true },
- { "timewasters.nl", true },
- { "timeworld.su", true },
- { "timi-matik.hu", true },
- { "timich.ga", true },
- { "timing.com.br", true },
- { "timjk.de", false },
- { "timmersgems.com", true },
- { "timmi6790.de", true },
- { "timmy.im", true },
- { "timmyrs.de", true },
- { "timnash.co.uk", true },
- { "timonengelke.de", true },
- { "timoso.de", true },
- { "timothy.tk", true },
- { "timowi.de", true },
- { "timoxbrow.com", true },
- { "timroes.de", true },
- { "timsayedmd.com", true },
- { "timseverien.com", true },
- { "timtaubert.de", true },
- { "timtelfer.com", true },
- { "timtj.ca", true },
- { "timvandekamp.nl", true },
- { "timvivian.ca", true },
- { "timweb.ca", true },
- { "timwestdesigns.com", true },
- { "timx.uk", true },
- { "timysewyn.be", false },
- { "tina-zander.de", true },
- { "tina.media", true },
- { "tinapoethe.com", true },
- { "tinastahlschmidt.de", true },
- { "tindallriley.co.uk", true },
- { "tinekevanurk.nl", true },
- { "tinf.de", true },
- { "tinfoilsecurity.com", false },
- { "tinfoleak.com", true },
- { "tinhbotnghegold.com", true },
- { "tinhchattrangda.vn", true },
- { "tinkerers-trunk.co.za", true },
- { "tinkertry.com", true },
- { "tinlc.org", true },
- { "tinminnow.me", true },
- { "tinnhanhvietnam.tk", true },
- { "tinte24.de", true },
- { "tintencenter.com", true },
- { "tintenfix.net", true },
- { "tintenfux.de", true },
- { "tintenland.de", true },
- { "tintenprofi.de", true },
- { "tintoria.roma.it", true },
- { "tiny.ee", true },
- { "tinycat99.click", true },
- { "tinycrm.pl", true },
- { "tinyhousefinance.com.au", true },
- { "tinylan.com", true },
- { "tinyppt.com", true },
- { "tinyspeck.com", true },
- { "tinyssh.com", true },
- { "tinyssh.org", true },
- { "tinytownsoftplay.co.uk", true },
- { "tinyurl.com", true },
- { "tio.run", true },
- { "tipaki.gr", true },
- { "tipe.io", true },
- { "tiplanet.org", true },
- { "tipoftheday.tips", true },
- { "tippytoad.com", true },
- { "tipranks.com", true },
- { "tips4india.tk", true },
- { "tipsacademicos.com", true },
- { "tipsmake.com", true },
- { "tipsport.cz", true },
- { "tipstersweb.com", true },
- { "tipsypresent.com", true },
- { "tipulnagish.co.il", true },
- { "tir-mauperthuis.fr", true },
- { "tirionnetwork.de", true },
- { "tirlins.com", true },
- { "tiroler-kupferschmiede.com", true },
- { "tirs4ne.ch", false },
- { "tirteafuera.tk", true },
- { "tirupatinightwear.co.in", true },
- { "tis.ph", true },
- { "tischlerei-klettke.de", true },
- { "tisgroup.com.my", true },
- { "tishopsv.com", true },
- { "tissot-mayenfisch.com", false },
- { "tissus-paris.com", true },
- { "tisvapo.it", true },
- { "tit-cdn.de", true },
- { "tit-dev.de", true },
- { "tit-dns.de", true },
- { "tit-mail.de", true },
- { "tit.systems", true },
- { "titanandco.com", true },
- { "titandirect.co.uk", true },
- { "titansized.com", true },
- { "titantax.com", true },
- { "titanwaterproofing.com.au", true },
- { "titelseite.ch", true },
- { "titouan.co", false },
- { "tittelbach.at", true },
- { "titusetcompagnies.net", false },
- { "tiwag.at", true },
- { "tixeconsulting.com", true },
- { "tixel.com", true },
- { "tixify.com", true },
- { "tixio.de", true },
- { "tjampoer.com", true },
- { "tjian.info", true },
- { "tjl.rocks", true },
- { "tjp.ch", false },
- { "tjxxzy.com", true },
- { "tk-its.net", true },
- { "tk-smart.ru", true },
- { "tk2net.com", true },
- { "tkacz.pro", true },
- { "tkanemoto.com", true },
- { "tkat.ch", true },
- { "tkbuilders.net", true },
- { "tkcafe.net", true },
- { "tkgpm.com", true },
- { "tkirch.de", true },
- { "tkjg.fi", true },
- { "tkmr-gyouseishosi.com", true },
- { "tkn.me", true },
- { "tkrn.de", true },
- { "tksainc.com", true },
- { "tkusano.jp", true },
- { "tkw01536.de", false },
- { "tl.gg", true },
- { "tlca.org", true },
- { "tlcnet.info", true },
- { "tld-list.com", true },
- { "tldtattoo.com", true },
- { "tlehseasyads.com", true },
- { "tleng.de", true },
- { "tlo.xyz", true },
- { "tloxygen.com", true },
- { "tls-proxy.de", true },
- { "tls.care", true },
- { "tls1914.org", true },
- { "tlthings.net", true },
- { "tlumaczenie.com", true },
- { "tlyphed.net", true },
- { "tlys.de", false },
- { "tm-t.ca", true },
- { "tm80plus.com", true },
- { "tmachinery.cz", true },
- { "tmadev.com.au", true },
- { "tmas.dk", true },
- { "tmbergtmberg.cf", true },
- { "tmbergtmberg.ga", true },
- { "tmbergtmberg.gq", true },
- { "tmbergtmberg.ml", true },
- { "tmbergtmberg.tk", true },
- { "tmcjobs.com", true },
- { "tmcreationweb.com", true },
- { "tmdb.biz", true },
- { "tmf.ru", true },
- { "tmf22.ru", true },
- { "tmhanoi.com", true },
- { "tmheatingcooling.com", true },
- { "tmi-products.eu", true },
- { "tmi-produkter.se", true },
- { "tmm.cx", true },
- { "tmpraider.net", true },
- { "tmpsantos.com.br", true },
- { "tmsdiesel.com", true },
- { "tmtopup.com", true },
- { "tn-bb.com", true },
- { "tn0.club", true },
- { "tncentro.com", true },
- { "tnd.com.ar", true },
- { "tndentalwellness.com", true },
- { "tniad.mil.id", false },
- { "tnonline.net", true },
- { "tnrf.eu", true },
- { "tntmobi.com", true },
- { "tntware.com", true },
- { "tnwgrc.com", true },
- { "to-med.ru", true },
- { "to-riktari.gr", true },
- { "toad.ga", true },
- { "toast.al", false },
- { "tobaccolocker.com", true },
- { "tobefree.eu", true },
- { "tober-cpag.de", true },
- { "tobevictorious.com", true },
- { "tobi-mayer.de", true },
- { "tobi-server.goip.de", true },
- { "tobiaalberti.com", true },
- { "tobias-bauer.de", true },
- { "tobias-bauer.eu", true },
- { "tobias-bauer.fr", true },
- { "tobias-bauer.net", true },
- { "tobias-kleinmann.de", true },
- { "tobias.gr", true },
- { "tobias4.ddns.net", true },
- { "tobiasbrunner.net", true },
- { "tobiasconradi.com", true },
- { "tobiase.de", true },
- { "tobiasfischer.info", true },
- { "tobiashorvath.com", true },
- { "tobiashorvath.de", true },
- { "tobiaskorf.de", true },
- { "tobiassachs.de", true },
- { "tobiassattler.com", true },
- { "tobiaswiese.com", true },
- { "tobiaswiese.eu", true },
- { "tobiaswiese.net", true },
- { "tobiaswiese.org", true },
- { "tobiefornerod.ch", true },
- { "tobiemilford.com", true },
- { "tobimi.com", true },
- { "tobis-rundfluege.de", true },
- { "tobis.cloud", true },
- { "tobischo.de", true },
- { "tobisworld.ch", true },
- { "tobyalden.com", true },
- { "tobyx.cc", true },
- { "tobyx.co", true },
- { "tobyx.com", true },
- { "tobyx.de", true },
- { "tobyx.eu", true },
- { "tobyx.is", true },
- { "tobyx.me", true },
- { "tobyx.net", true },
- { "tobyx.org", true },
- { "tocaro.im", true },
- { "tocasoft.co.uk", true },
- { "toccoig.com", true },
- { "todacarreira.com", true },
- { "todamateria.com.br", true },
- { "todapolitica.com", true },
- { "todasaslojas.com.br", true },
- { "todaymeow.com", true },
- { "todaysbestinsurance.com", true },
- { "todayupdates.ga", true },
- { "toddcullumresearch.com", true },
- { "toddexler.com", true },
- { "toddfry.com", true },
- { "toddlerleaf.com", true },
- { "toddmath.com", true },
- { "todo-anime.com", true },
- { "todoereaders.com", true },
- { "todoescine.com", true },
- { "todon.fr", true },
- { "todoporjesus.net", true },
- { "todoscheduler.de", true },
- { "todoscheduler.org", true },
- { "todoscomciro.com", true },
- { "toeightycountries.com", true },
- { "toekomstperspectief.be", true },
- { "toerschaatsenknsb.nl", true },
- { "toerschaatsenoverijssel.nl", true },
- { "toest.bg", true },
- { "tofe.io", true },
- { "tofliving.nl", true },
- { "togech.jp", true },
- { "togetter.com", true },
- { "togtider.dk", true },
- { "toheb.de", false },
- { "tohfalaya.com", true },
- { "tohochofu-sportspark.com", true },
- { "tohofc.co.jp", true },
- { "tohokinemakan.tk", true },
- { "toihoctiengtrung.com", true },
- { "toila.best", true },
- { "toiletable.com", true },
- { "toirereform.com", true },
- { "tokaido-kun.jp", true },
- { "tokaido.com", true },
- { "tokainafb.net", true },
- { "tokainakurasi.net", true },
- { "tokenmarket.net", true },
- { "tokens.net", true },
- { "tokinoha.net", true },
- { "tokio.fi", true },
- { "tokitover.com", true },
- { "tokka.com", true },
- { "tokke.dk", true },
- { "tokkee.org", true },
- { "tokky.be", true },
- { "tokky.eu", true },
- { "tokky.fr", true },
- { "tokototech.com", true },
- { "tokugai.com", true },
- { "tokyo-onkyo.jp", true },
- { "tokyo-powerstation.com", true },
- { "tokyo.dating", true },
- { "tokyoadultguide.com", true },
- { "tokyobarbershop.com", true },
- { "tokyomakino.com", true },
- { "tokyotimeline.com", true },
- { "tokyovipper.com", true },
- { "tolboe.com", true },
- { "toldositajuba.com", true },
- { "tolerance-zero.tk", true },
- { "toleressea.fr", true },
- { "toles-sur-mesure.fr", true },
- { "tolle-wolke.de", true },
- { "tollerunterricht.com", true },
- { "tolmaidis.com", true },
- { "tolnavar.hu", true },
- { "tom-geiger.de", true },
- { "tom-kunze.de", true },
- { "tom-kurka.cz", true },
- { "tom.horse", true },
- { "tom.je", true },
- { "tom.ro", true },
- { "tom94.net", true },
- { "tomabrafix.de", true },
- { "tomahawk.ca", true },
- { "tomandmara.com", true },
- { "tomandsonya.net", true },
- { "tomandsonya.org", true },
- { "tomarnarede.pt", true },
- { "tomartv.pt", true },
- { "tomashouzvicka.com", true },
- { "tomasjacik.cz", true },
- { "tomaskavalek.cz", false },
- { "tomasmoberg.org", true },
- { "tomaspatera.cz", true },
- { "tomasvecera.cz", true },
- { "tomasz.com", true },
- { "tomaszdwornicki.net", true },
- { "tomatenaufdenaugen.de", true },
- { "tomatis-nantes.com", true },
- { "tomaz.eu", true },
- { "tombaker.me", true },
- { "tomberek.info", true },
- { "tomboy.org", true },
- { "tombrossman.com", true },
- { "tombu.biz", true },
- { "tombu.info", true },
- { "tombu.org", true },
- { "tombu.xyz", true },
- { "tomd.ai", true },
- { "tomershemesh.me", true },
- { "tomgaechter.ch", true },
- { "tomharling.uk", true },
- { "tomi.cc", true },
- { "tomica.me", false },
- { "tomik.fun", true },
- { "tomjans.nl", true },
- { "tomjepp.uk", true },
- { "tomjn.com", true },
- { "tomkempers.nl", true },
- { "tomkunze.de", true },
- { "tomlowenthal.com", true },
- { "tomm.yt", true },
- { "tommic.eu", true },
- { "tommihynynen.com", true },
- { "tommy-bordas.fr", false },
- { "tommyemo.com", true },
- { "tommyemo.net", true },
- { "tommymoya.tv", true },
- { "tomnatt.com", true },
- { "tomo.gr", false },
- { "tomoradexpert.ro", true },
- { "tomorrowmuseum.com", true },
- { "tomosm.net", true },
- { "tomravinmd.com", true },
- { "tomrei.com", true },
- { "tomrichards.net", true },
- { "tomschlick.com", true },
- { "tomsherakmshope.org", true },
- { "tomsoft.hr", true },
- { "tomspdblog.com", true },
- { "tomssl.com", true },
- { "tomstew.art", true },
- { "tomthorogood.co.uk", true },
- { "tomthorogood.uk", false },
- { "tomticket.com", true },
- { "tomudding.nl", true },
- { "tomvanlaer.be", true },
- { "tomvote.com", true },
- { "tomvst.net", true },
- { "tomwassenberg.com", true },
- { "tomwassenberg.nl", true },
- { "tomwellington.design", true },
- { "tomwilson.io", true },
- { "tonabor.ru", true },
- { "tonage.de", true },
- { "tonalaw.com", true },
- { "tonarinoliusan.com", true },
- { "toncusters.nl", true },
- { "tondles.com", true },
- { "tonegidoarchief.nl", true },
- { "toner24.at", true },
- { "toner24.co.uk", true },
- { "toner24.es", true },
- { "toner24.fr", true },
- { "toner24.it", true },
- { "toner24.nl", true },
- { "toner24.pl", true },
- { "tonerdepot.de", true },
- { "tonerjet.at", true },
- { "tonerklick.de", true },
- { "tonerkurier.de", true },
- { "tonermaus.de", true },
- { "tonermonster.de", true },
- { "tonex.de", true },
- { "tongli.eu.org", true },
- { "tonight.de", true },
- { "tonkayagran.com", true },
- { "tonkayagran.ru", true },
- { "tonkinwilsonvillenissanparts.com", true },
- { "tonnycat.com", true },
- { "tonnygaric.com", true },
- { "tono.us", true },
- { "tonorosario.tk", true },
- { "tonsit.com", true },
- { "tonsit.org", true },
- { "tontonnews.net", true },
- { "tonyarcieri.com", true },
- { "tonymanning.com", true },
- { "tonytan.io", true },
- { "tonytron.com.br", true },
- { "tonyw.xyz", true },
- { "tonywebster.com", true },
- { "too.gy", true },
- { "toobug.net", true },
- { "tool.lu", true },
- { "toolbox-bodensee.de", true },
- { "toolbox.ninja", false },
- { "toolineo.de", true },
- { "toolroomrecords.com", true },
- { "tools.pro", true },
- { "toolsense.io", true },
- { "toolset.com", true },
- { "toolshero.com", true },
- { "toolspain.tk", true },
- { "toom.io", true },
- { "toomy.pri.ee", true },
- { "toon.style", true },
- { "toonpool.com", true },
- { "toonsburgh.com", true },
- { "toontownrewritten.com", true },
- { "toool.nl", true },
- { "toool.nyc", true },
- { "toool.org", true },
- { "toopopular.ga", true },
- { "toot.center", true },
- { "toothdoc.ca", true },
- { "toothpique.tk", true },
- { "tooti.biz", true },
- { "top-esb.com", true },
- { "top-frog.com", true },
- { "top-mining.tk", true },
- { "top-obaly.cz", true },
- { "top-opakowania.pl", true },
- { "top-rensner.de", true },
- { "top-russian.tk", true },
- { "top-zdrave.bg", true },
- { "top10media.tk", true },
- { "top2servers.tv", true },
- { "top4shop.de", true },
- { "top6casinos.com", true },
- { "top9.fr", true },
- { "topanimecharacters.com", true },
- { "topappandroid.com", true },
- { "topaxi.ch", true },
- { "topaxi.codes", true },
- { "topbestsellerproduct.com", true },
- { "topcarehvac.ca", true },
- { "topciderska-crkva.rs", true },
- { "topclassfun.ie", true },
- { "topdesk.net", true },
- { "topdogsinflatables.co.uk", true },
- { "topeducationhelp.co", true },
- { "topekafoundationpros.com", true },
- { "topeng-emas.com", true },
- { "topesb.com", true },
- { "topfivepercent.co.uk", true },
- { "topgshop.ru", true },
- { "tophat.studio", true },
- { "tophr.kz", true },
- { "topicalnet.de", true },
- { "topicdesk.com", true },
- { "topicit.net", true },
- { "topirishcasinos.com", true },
- { "topjobs.ch", true },
- { "topknot.gq", true },
- { "topkorea.ml", true },
- { "toplist.cz", true },
- { "toplist.eu", true },
- { "toplist.sk", true },
- { "topmmogames.org", true },
- { "topnotepad.com", true },
- { "topodin.com", true },
- { "toponlinecasinosites.co.uk", true },
- { "topophile.net", true },
- { "topprice.ua", true },
- { "topproductidea.com", true },
- { "topproductsanalysis.com", true },
- { "toprelatos.com", true },
- { "topservercccam.tv", true },
- { "topshelfcommercial.com", true },
- { "topspin.tk", true },
- { "topsteroidsonline.com", true },
- { "toptec.net.br", true },
- { "toptenthebest.com", true },
- { "toptexture.com", true },
- { "toptranslation.com", true },
- { "topvision.se", true },
- { "topwindowcleaners.co.uk", true },
- { "topwoodltd.co.uk", true },
- { "topyachts-shop.com.ua", true },
- { "topyachts.com.ua", true },
- { "tor.us", true },
- { "toracon.org", true },
- { "torchantifa.org", true },
- { "toreni.us", true },
- { "toretame.jp", true },
- { "torfbahn.de", true },
- { "torlinnhe.com", true },
- { "torlock.com", true },
- { "torlock.host", true },
- { "torlock.icu", true },
- { "torlock.pw", true },
- { "torlock2.com", true },
- { "tormakristof.eu", true },
- { "tormentedradio.com", false },
- { "tormox.ml", true },
- { "torn1.se", true },
- { "tornadotwistar.com", true },
- { "torneobottacin.it", true },
- { "torngalaxy.com", true },
- { "torogroups.com", true },
- { "torontoaccesscontrol.com", true },
- { "torontostarts.com", true },
- { "toros.co", true },
- { "toros2.com", true },
- { "torproject.org", false },
- { "torprojects.com", true },
- { "torrance.gq", true },
- { "torreconta.pt", true },
- { "torremarsalou.com", true },
- { "torrent.fedoraproject.org", true },
- { "torrent.is", true },
- { "torrent.tm", true },
- { "torrentfunk.com", true },
- { "torrentfunk.host", true },
- { "torrentfunk.icu", true },
- { "torrentfunk.pw", true },
- { "torrentfunk2.com", true },
- { "torrentgalaxy.to", true },
- { "torrenttop100.net", true },
- { "torrentz2.eu", true },
- { "torresdocaribe.com.br", true },
- { "torresdocariberesidence.com.br", true },
- { "torresshop.es", true },
- { "torresygutierrez.com", true },
- { "torretzalam.com", true },
- { "torservers.net", true },
- { "torsquad.com", true },
- { "torsten-schmitz.net", true },
- { "torstens-buecherecke.de", true },
- { "torstensenf.de", true },
- { "torte.roma.it", true },
- { "tortoises-turtles.com", true },
- { "tortugan.com.br", true },
- { "tosatopsicologabologna.com", true },
- { "toscer.me", false },
- { "toschool.com.br", true },
- { "toshen.com", true },
- { "toshkov.com", true },
- { "tosolini.info", true },
- { "tosostav.cz", true },
- { "tosteberg.se", true },
- { "tostu.de", true },
- { "totaku.ru", false },
- { "totalbike.com.br", true },
- { "totalcarcheck.co.uk", true },
- { "totalchecklist.com", true },
- { "totalclean.co.uk", true },
- { "totalforcegym.com", false },
- { "totalhost.gq", true },
- { "totallylegitimatehosting.ru", true },
- { "totalofficeclean.co.uk", true },
- { "totalpackers.com", true },
- { "totalpahire.com", true },
- { "totalparts.com.au", true },
- { "totalprint.hu", true },
- { "totalsport-bg.com", true },
- { "totaltriathlon.com", true },
- { "totalwebmedia.nl", true },
- { "totem-international.com", true },
- { "totobetty.com", true },
- { "totodil.es", true },
- { "tottoya.com", true },
- { "totvs.com", true },
- { "toucan-informatique.fr", true },
- { "touch.facebook.com", false },
- { "touch.mail.ru", true },
- { "touchdown.co", true },
- { "touchezlebouddha.com", true },
- { "touchka.ga", true },
- { "touchoflife.in", true },
- { "touchscreentills.com", true },
- { "touchstone.io", true },
- { "touchtable.nl", true },
- { "touchweb.fr", true },
- { "touchwoodtrees.com.au", true },
- { "toudum.com", true },
- { "tough.email", true },
- { "toughlife.info", true },
- { "touhou.ac.cn", true },
- { "touhou.fm", true },
- { "touhou.tw", true },
- { "touhouwiki.net", true },
- { "toujour.top", true },
- { "toujours-actif.com", true },
- { "tourdatenarchiv.de", true },
- { "tourdewestwoud.nl", true },
- { "tourgest.net", true },
- { "tourism-exegetai.tk", true },
- { "tourismwithme.com", true },
- { "tournamentmgr.com", true },
- { "tournevis.ch", false },
- { "tourtransferitaly.it", true },
- { "tourtrektrip.com", true },
- { "tourx.co.nz", true },
- { "tous-travaux.ch", true },
- { "toushi-exe.com", true },
- { "toushi-shakkin.com", true },
- { "touslesdrivers.com", true },
- { "tout-a-fait.fr", true },
- { "tout-art.ch", true },
- { "toutart.ch", true },
- { "toutelathailande.fr", true },
- { "toutmonexam.fr", true },
- { "toutvendre.be", true },
- { "toutvendre.ch", true },
- { "toutvendre.cm", true },
- { "toutvendre.es", true },
- { "toutvendre.fr", true },
- { "toutvendre.lu", true },
- { "toutvendre.pics", true },
- { "toutvendre.uk", true },
- { "toutvendre.us", true },
- { "tovaglioli-di-carta.it", true },
- { "tovare.com", true },
- { "tovarypochtoj.tk", true },
- { "toverland-tickets.nl", true },
- { "tovp.org", true },
- { "towandalibrary.org", true },
- { "towellconstruction.ca", true },
- { "tower.land", true },
- { "townandcountryus.com", true },
- { "townhouseregister.com.au", true },
- { "townofbridgewater.ca", true },
- { "townofmineral.net", true },
- { "towsonpediatrics.com", true },
- { "towsonroofers.com", true },
- { "towtruck.website", true },
- { "towywebdesigns.uk", true },
- { "towzone.co.uk", true },
- { "tox21.gov", false },
- { "toxoproject.com", true },
- { "toycu.de", true },
- { "toymagazine.com.br", true },
- { "toyokawa-fan.com", true },
- { "toyopac.com", true },
- { "toyota-kinenkan.com", true },
- { "toys-robots.cf", true },
- { "toyschina.cf", true },
- { "toysperiod.com", true },
- { "toysplace.ml", true },
- { "tozdev.com", true },
- { "tp-iryuubun.com", true },
- { "tp-kabushiki.com", true },
- { "tp-kyouyufudousan.com", true },
- { "tp-law.jp", true },
- { "tpark.jp", true },
- { "tpastream.com", true },
- { "tpbproxy.co", true },
- { "tpidg.us", true },
- { "tpolemis.com", true },
- { "tpp.chat", true },
- { "tppleague.me", false },
- { "tpress.tk", true },
- { "tpro.rocks", true },
- { "tproger.ru", true },
- { "tq.rs", true },
- { "tqdev.com", true },
- { "tqm1.sk", true },
- { "tr.search.yahoo.com", false },
- { "traas.org", true },
- { "trabajaenvitamina.cl", true },
- { "trabbel.org", true },
- { "trace.guru", true },
- { "trace.moe", true },
- { "traceheatinguk.co.uk", true },
- { "traceroute.guru", true },
- { "traceroute.link", true },
- { "traceroute.network", true },
- { "tracesteps.ga", true },
- { "tracetracker.no", true },
- { "tracewind.top", true },
- { "tracfinancialservices.com", true },
- { "tracinsurance.com", true },
- { "trackchair.com", true },
- { "tracker.com.ar", true },
- { "trackersimulator.org", true },
- { "trackeye.dk", true },
- { "trackify.tk", true },
- { "tracking-app.tk", true },
- { "tracking.best", true },
- { "trackrecordpro.co.uk", true },
- { "tracksa.com.ar", true },
- { "trackyourlogs.com", true },
- { "tractorfan.nl", true },
- { "tractorpumps.com", true },
- { "trad-n-vo.com", true },
- { "tradavenue.com", true },
- { "trade-arcade.com", true },
- { "trade-platform.tk", true },
- { "trade.gov", true },
- { "trade.gov.uk", true },
- { "trade247.exchange", true },
- { "tradebotcompany.ml", true },
- { "tradecloud.sg", true },
- { "tradeinvent.co.uk", true },
- { "tradeonfx.com", true },
- { "traderbot.com.br", true },
- { "traderinside.ga", true },
- { "tradersclub.com.br", true },
- { "tradesafe.co.za", true },
- { "tradesmance.com", true },
- { "tradie.com", true },
- { "tradik.com", true },
- { "tradinews.com", true },
- { "tradinews.fr", true },
- { "tradinghelper.be", true },
- { "tradingview.com", true },
- { "traditions.nl", true },
- { "traditionskapperscollege.nl", true },
- { "tradlost-natverk.se", true },
- { "tradreams.com", true },
- { "traducir.win", true },
- { "trafarm.ro", true },
- { "trafas.nl", true },
- { "traff1k.net", true },
- { "trafficmanager.com", true },
- { "trafficmanager.ltd", true },
- { "trafficmanager.xxx", true },
- { "trafficmgr.net", true },
- { "trafficologyblueprint.com", true },
- { "trafficpixel.tk", true },
- { "trafficsafetymarketing.gov", true },
- { "traffixdevices.com", true },
- { "trafic-wap.tk", true },
- { "traficmusik.net", true },
- { "tragmi.ch", true },
- { "traha.org", true },
- { "trailerparty.com", true },
- { "trailforks.com", true },
- { "trainex.org", true },
- { "trainhornforums.com", true },
- { "trainiac.com.au", true },
- { "traininghamburg.de", true },
- { "trainingswiese.at", true },
- { "trainline.at", true },
- { "trainline.cn", true },
- { "trainline.com.br", true },
- { "trainline.com.pt", true },
- { "trainline.cz", true },
- { "trainline.de", true },
- { "trainline.dk", true },
- { "trainline.es", true },
- { "trainline.eu", true },
- { "trainline.fr", true },
- { "trainline.it", true },
- { "trainline.nl", true },
- { "trainline.no", true },
- { "trainline.pl", true },
- { "trainline.se", true },
- { "trainmagazine.be", true },
- { "trainmagazine.de", true },
- { "trainmagazine.nl", true },
- { "trainme.nl", true },
- { "trainoclock.com", true },
- { "trainplaza.be", true },
- { "trainplaza.net", true },
- { "trainplaza.nl", true },
- { "trainsgoodplanesbad.com", false },
- { "traintimes.fi", true },
- { "traintimes.ie", true },
- { "traintimes.nl", true },
- { "traintimes.se", true },
- { "trainyourtribe.com.au", true },
- { "traista.ru", true },
- { "traiteurpapillonevents.be", true },
- { "trajano.net", true },
- { "trajectfoto.nl", true },
- { "trajectvideo.nl", true },
- { "tramclub-basel.ch", true },
- { "tramikshop.ml", true },
- { "tran.pw", true },
- { "tranceattic.com", true },
- { "trancehost.com", true },
- { "trancetronic.com", true },
- { "trangcongnghe.com", true },
- { "trangell.com", true },
- { "tranquillity.se", true },
- { "transacid.de", true },
- { "transappealrights.com", true },
- { "transcend.org", true },
- { "transcontrol.com.ua", true },
- { "transdevbus.co.uk", true },
- { "transes.com.tr", true },
- { "transeshairtransplant.com", true },
- { "transette.com", true },
- { "transfer.pw", true },
- { "transferbags.com", true },
- { "transfers.com.jm", true },
- { "transfers.do", true },
- { "transfers.mx", true },
- { "transferserver.at", true },
- { "transfersummit.com", true },
- { "transfersw.com", true },
- { "transferwiseturkiye.com.tr", true },
- { "transfigurewizard.com", true },
- { "transformaniatime.com", true },
- { "transformations-magazin.com", true },
- { "transforumation.com", true },
- { "transfurrmation.town", true },
- { "transgendergedenkdag.nl", true },
- { "transgenderinfo.nl", true },
- { "transgendernetwerk.nl", true },
- { "transgendernetwerk.org", true },
- { "transglobaltravel.com", true },
- { "transhumanism.co.uk", true },
- { "transhumanist.co.uk", true },
- { "transhumanist.com", true },
- { "transhumanist.net", true },
- { "transhumanist.org", true },
- { "transhumanist.uk", true },
- { "transitmoe.io", true },
- { "transitownplaza.com", true },
- { "transitpoint.us", true },
- { "translate.googleapis.com", true },
- { "translationge.com", true },
- { "transmarttouring.com", true },
- { "transmisjeonline.pl", true },
- { "transmute.review", true },
- { "transnexus.com", true },
- { "transoil.co.uk", true },
- { "transpak-cn.com", true },
- { "transparentpng.com", true },
- { "transporta.it", true },
- { "transporterlock.com", true },
- { "transservice.net.ua", true },
- { "transumption.com", true },
- { "transvolando.es", true },
- { "trappednerve.org", true },
- { "trashnothing.com", true },
- { "traslocare.roma.it", true },
- { "traslocatore.roma.it", true },
- { "traslochi-trasporti-facchinaggio.it", true },
- { "trasloco.milano.it", true },
- { "trastornoevitacion.com", true },
- { "trastornolimite.com", true },
- { "tratamentoparacelulite.net", true },
- { "tratamientodelvitiligo.es", true },
- { "trattamenti.biz", true },
- { "trattamento-cotto.it", true },
- { "trattamentocotto.roma.it", true },
- { "trauer-beileid.de", true },
- { "trauerbegleitung-kudla.de", true },
- { "traumaheilung.net", true },
- { "traumprojekt.com", true },
- { "traumwerker.com", true },
- { "traut.cloud", true },
- { "travador.com", true },
- { "travel-dealz.de", true },
- { "travel2macedonia.com", true },
- { "travel2macedonia.com.mk", true },
- { "travel2macedonia.mk", true },
- { "travel365.it", true },
- { "travelamm.com", true },
- { "travelarmenia.org", true },
- { "travelassist.us.com", true },
- { "travelbuddiesperu.com", true },
- { "travelemy.com", true },
- { "travelepoch.com", true },
- { "travelerofcharleston.com", true },
- { "travelexbiz.com", true },
- { "travelexinternational.com", true },
- { "travelfield.org", true },
- { "travelinc.pk", true },
- { "travelinsurance.co.nz", true },
- { "travellers.dating", true },
- { "travellovers.fr", true },
- { "travelogue.jp", true },
- { "travelphilippines.tk", true },
- { "travelphoto.cc", true },
- { "travelrefund.com", true },
- { "travelround.io", true },
- { "travelshack.com", true },
- { "travelsuperapp.com", true },
- { "traveltomachupichu.com", true },
- { "travelus.nl", true },
- { "travelvisit.cf", true },
- { "travelwithbender.com", true },
- { "travelwithsearats.com", true },
- { "travelzoneshop.com", true },
- { "traverse.com.ua", true },
- { "travi.org", true },
- { "travis.nl", true },
- { "travisf.net", true },
- { "travisforte.io", true },
- { "travisfranck.com", true },
- { "travler.net", true },
- { "trazodononline.gq", true },
- { "trbanka.com", true },
- { "treaslockbox.gov", true },
- { "treasuredandloved.co.uk", true },
- { "treasuredandloved.com", true },
- { "treatmentforkennelcough.com", true },
- { "trebarov.cz", true },
- { "trebek.club", true },
- { "trebnie.nl", true },
- { "trechosemilhas.com.br", true },
- { "tree0.xyz", true },
- { "treefelling-durban.co.za", true },
- { "treehole.life", true },
- { "treehouse.pub", true },
- { "treehousebydesign.com", true },
- { "treehouseresort.nl", true },
- { "treeline.tech", true },
- { "treeoilpot.com", true },
- { "treeschat.com", true },
- { "treestarmarketing.com", true },
- { "treeworkbyjtec.com", true },
- { "treezone.net", true },
- { "trefcon.cz", true },
- { "trefle.io", true },
- { "trefpuntdemeent.nl", true },
- { "treinaweb.com.br", false },
- { "treinmagazine.be", true },
- { "treinmagazine.nl", true },
- { "treintijden.com", true },
- { "trek-planet.ru", true },
- { "trekfriend.com", true },
- { "trekinafrica.com", true },
- { "trekking-friends.ch", true },
- { "trelki.de", true },
- { "trelloparea.com", true },
- { "treml-sturm.com", true },
- { "trendingdeals.ga", true },
- { "trendingeducation.tk", true },
- { "trendparty.net", true },
- { "trendreportdeals.com", true },
- { "trendsettersre.com", true },
- { "trendus.no", true },
- { "trendycrowds.com", true },
- { "trendykids.cz", true },
- { "trenorario.it", true },
- { "trenta.io", true },
- { "trentonmakesnews.com", true },
- { "tresmaistres.com.br", true },
- { "tresor.it", true },
- { "tresorit.com", true },
- { "tresorsecurity.com", true },
- { "tretkowski.de", true },
- { "trezor.io", true },
- { "trhastane.com", true },
- { "triage.ai", true },
- { "triage.clinic", true },
- { "triage.com", true },
- { "triage.md", true },
- { "triageclinic.com", true },
- { "trialandsuccess.nl", true },
- { "trialcentralnet.com", true },
- { "trials.tk", true },
- { "triangle-energie.com", true },
- { "trianglecastles.co.uk", true },
- { "trianglelawngames.com", true },
- { "tribac.de", true },
- { "tribaldos.com", false },
- { "tribaljusticeandsafety.gov", true },
- { "tribe.rs", false },
- { "tribetrails.com", true },
- { "tribly.de", true },
- { "tribut.de", true },
- { "tributh.net", true },
- { "tributh.tk", true },
- { "tricare.mil", true },
- { "tricefy4.com", true },
- { "trichdanhay.com", true },
- { "triciaree.com", true },
- { "trickgsm.com", true },
- { "trickle.works", true },
- { "trico-pigmentazione.it", true },
- { "tricountyathome.com", true },
- { "trident-online.de", true },
- { "triefenbach.com", true },
- { "triefenbach.eu", true },
- { "trietment.com", true },
- { "trigardon-rg.de", true },
- { "triggeredpaintz.com", true },
- { "trigraph.net", true },
- { "trigular.de", true },
- { "trillian.im", true },
- { "trilliumvacationrentals.ca", true },
- { "triluxds.com", true },
- { "trim-a-slab.com", true },
- { "trimage.org", true },
- { "trinary.ca", false },
- { "trindonball.com", true },
- { "trineco.com", true },
- { "trineco.fi", true },
- { "tringavillasyala.com", true },
- { "trinitasgyor.hu", true },
- { "trinitycore.org", true },
- { "trinitycorporateservices.com", true },
- { "trinityradioandvideo.org", true },
- { "trinnes.net", true },
- { "trio.online", true },
- { "triop.se", true },
- { "triozon.hu", true },
- { "triphop.com", true },
- { "triplethreatband.tk", true },
- { "tripolistars.com", true },
- { "tripout.tech", true },
- { "trippen.travel", true },
- { "tripsided.com", true },
- { "tripsinc.com", true },
- { "tripsvia.com", true },
- { "tripsweet.com", true },
- { "trisect.uk", true },
- { "trisolaris.co.uk", true },
- { "tristanhager.i234.me", true },
- { "trit.pro", true },
- { "tritiumdisposal.com", true },
- { "trixati.org.ua", true },
- { "trixexpressweb.nl", true },
- { "trixiebooru.org", true },
- { "trkpuls.tk", true },
- { "trockendock.ch", true },
- { "troedelhannes.at", true },
- { "troi.de", true },
- { "troiaconsultoria.com.br", true },
- { "troianet.com.br", true },
- { "trollingeffects.org", true },
- { "trollmoa.se", true },
- { "trollope-apollo.com", true },
- { "trommelwirbel.com", true },
- { "tronlaserarena.cz", true },
- { "troomcafe.com", true },
- { "troop89medfield.org", true },
- { "troopaid.info", true },
- { "trophee-discount.com", true },
- { "trophies.de", true },
- { "trophy-discount.com", true },
- { "trophy-solution.com", true },
- { "tropicalserver.com", false },
- { "trosell.net", true },
- { "trosinenko.com", true },
- { "trotec.com", true },
- { "trotina.cz", true },
- { "troubles.ru", true },
- { "trousers.co.uk", true },
- { "trouweninoverijssel.nl", true },
- { "trovaprezzi.it", true },
- { "troxal.com", true },
- { "troyfawkes.com", true },
- { "troyhunt.com", true },
- { "troyhuntstress.com", true },
- { "troyhuntstressed.com", true },
- { "troyhuntsucks.com", true },
- { "trs.tn", true },
- { "trtruijens.com", true },
- { "tru.ltd", true },
- { "trucchibellezza.it", true },
- { "truccoshop.com", true },
- { "truckersmp.com", true },
- { "truckshina-plus.com.ua", true },
- { "trucosdescargas.com", true },
- { "trueachievements.com", true },
- { "truebluedriver.com", true },
- { "truecosmeticbeauty.com", false },
- { "trueduality.net", true },
- { "truehempculture.com.au", true },
- { "truekey.com", true },
- { "truelovesakuya.info", true },
- { "truendo.com", true },
- { "truentumvet.it", true },
- { "trueopenlove.org", true },
- { "truerizm.ru", true },
- { "truesplendid.net", true },
- { "truesteamachievements.com", true },
- { "truestor.com", true },
- { "trueteaching.com", true },
- { "truetraveller.com", true },
- { "truetrophies.com", true },
- { "truewateraustralia.com", true },
- { "trueweb.es", true },
- { "trufflepig-forensics.com", true },
- { "truly-madly-happiness.de", true },
- { "trumanlibrary.gov", true },
- { "trumanlibrary.org", true },
- { "trumtrimun.com", true },
- { "trungvien.vn", true },
- { "trunk-show.net", true },
- { "truong.fi", true },
- { "truqu.com", true },
- { "truserve.org", true },
- { "trusitio.com", true },
- { "trustcase.com", true },
- { "trustednetworks.nl", true },
- { "trustfield.ch", false },
- { "trusthook.tk", true },
- { "trustnet.co.il", true },
- { "trustserv.de", true },
- { "truthdancer.com", true },
- { "truthmessages.pw", true },
- { "truthserum.co", true },
- { "trutopoffer.com", true },
- { "truvisory.com", true },
- { "truyenfull.net", true },
- { "truyenfull.vn", true },
- { "trw-reseller.com", true },
- { "try2admin.pw", true },
- { "try2services.cm", true },
- { "try2services.vc", true },
- { "trybooking.com", true },
- { "trycaviar.com", true },
- { "tryhard.cz", true },
- { "tryhexadecimal.com", true },
- { "tryitonline.net", true },
- { "tryndraze.com", true },
- { "trynta.com", true },
- { "trynta.net", true },
- { "tryplo.ca", true },
- { "tryplo.com", true },
- { "tryplo.io", true },
- { "tryplo.net", true },
- { "tryplo.org", true },
- { "tryplo.xyz", true },
- { "tryprime.co.uk", true },
- { "tryti.me", true },
- { "trz.cz", true },
- { "trzepak.pl", true },
- { "tsa-sucks.com", true },
- { "tsab.moe", true },
- { "tsatestprep.com", true },
- { "tschuermans.be", true },
- { "tscinsurance.com", true },
- { "tsedryk.ca", true },
- { "tsgkc1.com", true },
- { "tshirtscapetown.com", true },
- { "tsicons.com", true },
- { "tsironis-olivenoel.de", true },
- { "tslcontractors.co.uk", true },
- { "tsmgroup2.biz", true },
- { "tsmn.com.au", true },
- { "tspdrits.xyz", true },
- { "tsriggingequipment.com", true },
- { "tsrv.pw", false },
- { "tss.am", true },
- { "tstrubberstamp.com", false },
- { "tsueri.cloud", true },
- { "tsukhani.com", true },
- { "tsuki.moe", true },
- { "tsumegumi.com", true },
- { "tsumi.it", true },
- { "tsunami-alarm-system.com", true },
- { "tsunami.gov", true },
- { "tsundere.moe", true },
- { "tsurai.work", true },
- { "tsutawal.com", true },
- { "tszwww.com", true },
- { "tt0766.com", true },
- { "tt0966.com", true },
- { "tt2866.com", true },
- { "tt3699.com", true },
- { "tt3766.com", true },
- { "tt3999.com", true },
- { "tt7199.com", true },
- { "tt7299.com", true },
- { "tt7399.com", true },
- { "tt8166.com", true },
- { "tt8266.com", true },
- { "tt8366.com", true },
- { "tt918.com", true },
- { "tt9799.com", true },
- { "ttbonline.gov", true },
- { "ttc-birkenfeld.de", true },
- { "ttcaarberg.ch", true },
- { "ttcf.ca", true },
- { "ttclub.fr", true },
- { "ttdsevaonline.com", true },
- { "ttlet.com", true },
- { "tts-assessments.com", true },
- { "ttsoft.pl", true },
- { "ttsweb.org", true },
- { "ttt.tt", true },
- { "ttuwiki.ee", true },
- { "ttuwiki.org", true },
- { "ttwoee.com", true },
- { "ttwt.com", true },
- { "tty1.net", true },
- { "tu-immoprojekt.at", true },
- { "tualiadaenlimpieza.com", true },
- { "tuasaude.com", true },
- { "tubanten.nl", true },
- { "tube.tools", true },
- { "tube8.es", true },
- { "tube8.fr", true },
- { "tubebegana.com", true },
- { "tubejack.nl", true },
- { "tubepro.de", true },
- { "tubepro.net", true },
- { "tubs4fun.co.uk", true },
- { "tubul.net", true },
- { "tucepihotelalga.com", true },
- { "tuchile.cl", true },
- { "tucny.com", true },
- { "tucocoon.com", true },
- { "tucsonfcu.com", true },
- { "tucsonpcrepair.com", true },
- { "tucuxi.org", true },
- { "tudienchinhta.com", true },
- { "tudiennhakhoa.com", true },
- { "tudineroasi.com", true },
- { "tudosobrehost.com.br", true },
- { "tuestilo.nl", true },
- { "tuev-hessen.de", true },
- { "tuffclassified.com", true },
- { "tuffmail.com", true },
- { "tuffmail.net", true },
- { "tuffsruffs.se", true },
- { "tugafm.eu.org", true },
- { "tuimprenta.com.ar", true },
- { "tuincentersnaet.be", true },
- { "tuingereedschappen.net", false },
- { "tuitle.com", true },
- { "tuja.hu", true },
- { "tujunfang.com", true },
- { "tukdesigns.com", true },
- { "tulenceria.es", true },
- { "tully.co.uk", true },
- { "tulsaworkshop.org", true },
- { "tulumplayarealestate.com", true },
- { "tumagiri.net", true },
- { "tumblenfun.com", true },
- { "tumblr.com", true },
- { "tumedico.es", true },
- { "tumelum.de", true },
- { "tunaut.com", true },
- { "tune-web.de", true },
- { "tunefish-entertainment.de", true },
- { "tuneotune.com", true },
- { "tuner.cloud", true },
- { "tuning-parts24.de", true },
- { "tuning-werkstatt-nuernberg.de", true },
- { "tuning.energy", true },
- { "tuningblog.eu", false },
- { "tunnelbear.com", true },
- { "tunnelblick.net", true },
- { "tunnelstore.net", true },
- { "tunnelventilation.pro", true },
- { "tunnelwatch.com", true },
- { "tunsbergwhiskyfestival.no", true },
- { "tuntitili.fi", true },
- { "tuoicay.vn", true },
- { "tupa-germania.ru", true },
- { "tupass.pw", true },
- { "tupeuxpastest.ch", false },
- { "tupianku.com", true },
- { "tupizm.com", true },
- { "tuppenceworth.ie", true },
- { "turbomag.pl", true },
- { "turbosuflantecluj.ro", true },
- { "turdnagel.com", true },
- { "turf-experts.com", true },
- { "turi.space", true },
- { "turigum.com", true },
- { "turiscar.pt", true },
- { "turismodubrovnik.com", true },
- { "turismonochile.com.br", true },
- { "turkish.dating", true },
- { "turkishhackers.tk", true },
- { "turkmistress.tk", true },
- { "turkrock.com", true },
- { "turl.pl", true },
- { "turnaroundforum.de", true },
- { "turncircles.com", true },
- { "turnierplanung.com", true },
- { "turnoffthelights.com", true },
- { "turnoffthelights.video", true },
- { "turnonsocial.com", true },
- { "turnout.rocks", true },
- { "turpinpesage.fr", true },
- { "tursiae.org", true },
- { "turtleduckstudios.com", true },
- { "turtlepay.io", true },
- { "turtlepwr.com", true },
- { "turuncu-sepet.com", true },
- { "turunculevye.com", true },
- { "turystyczny-system.pl", true },
- { "tus-kikishinkyo.jp", true },
- { "tuscanyleather.it", true },
- { "tusharwalaskar.com", true },
- { "tusi.co", true },
- { "tusmedicamentos.com", true },
- { "tussier.com", true },
- { "tutanota.com", true },
- { "tutdevki.tk", true },
- { "tuto-craft.com", true },
- { "tutoragency.org", true },
- { "tutorat-tect.org", true },
- { "tutorcruncher.com", true },
- { "tutorialdb.tk", true },
- { "tutorialehtml.com", true },
- { "tutorialseo.com.br", true },
- { "tutorme.com", true },
- { "tuts4you.com", true },
- { "tuttimundi.org", false },
- { "tutu.green", true },
- { "tutu.ro", true },
- { "tuwaner.com", true },
- { "tuxcloud.net", true },
- { "tuxflow.de", false },
- { "tuxie.com", true },
- { "tuxlife.net", true },
- { "tuxone.ch", true },
- { "tuxpi.com", true },
- { "tuxplace.nl", true },
- { "tuxsoul.com", true },
- { "tuxsrv.com", true },
- { "tuxtimo.me", true },
- { "tuxz.net", true },
- { "tuza.com.au", true },
- { "tuzaginside.com", true },
- { "tuzagtcs.com", true },
- { "tuzaijidi.com", true },
- { "tv-programme.be", true },
- { "tv-programme.com", true },
- { "tv-sports.fr", true },
- { "tvaerialsmanchester.com", true },
- { "tvbaratas.net", true },
- { "tvcmarketing.com", true },
- { "tver-msk.ru", true },
- { "tves.gob.ve", true },
- { "tvhshop.be", true },
- { "tvipper.com", true },
- { "tvlanguedoc.com", true },
- { "tvleaks.se", true },
- { "tvlplus.net", true },
- { "tvnow.de", true },
- { "tvoe-delo24.ru", true },
- { "tvoyaknighka.ga", true },
- { "tvoysad.ru", true },
- { "tvplusiptv.com", true },
- { "tvquot.es", true },
- { "tvs-virtual.cz", true },
- { "tvseries.info", true },
- { "tvsheerenhoek.nl", true },
- { "tvteam.nl", true },
- { "tvtion.com", true },
- { "tvzahist.com.ua", true },
- { "tvzr.com", false },
- { "tw.search.yahoo.com", false },
- { "twainhartehotels.com", true },
- { "twaka.com", true },
- { "twalter.de", true },
- { "twatspot.com", true },
- { "twb.berlin", true },
- { "twd2.me", true },
- { "twd2.net", false },
- { "twdreview.com", true },
- { "twdtulelo.hu", true },
- { "tweak.group", true },
- { "tweakers.com.au", true },
- { "tweakers.net", true },
- { "tweaktown.com", true },
- { "twelvecolonies.tk", true },
- { "twelvecornerspediatrics.com", true },
- { "twenty71.com", true },
- { "twentyfournow.com", true },
- { "twilleys.com", true },
- { "twincitynissantxparts.com", true },
- { "twinztech.com", true },
- { "twisata.com", true },
- { "twist.com", true },
- { "twistdevelopment.co.uk", true },
- { "twisted-brains.org", true },
- { "twistedwave.com", true },
- { "twistfix.co.uk", true },
- { "twisto.cz", true },
- { "twisto.pl", true },
- { "twit-guide.com", true },
- { "twitchplaysleaderboard.info", true },
- { "twitcker.com", true },
- { "twitter.com", false },
- { "twitterdriver.io", true },
- { "twitteroauth.com", true },
- { "twizzkidzinflatables.co.uk", true },
- { "twlan.org", true },
- { "twlitek.com.tw", true },
- { "twmartin.codes", true },
- { "twobitbusker.com", true },
- { "twodrinksaway.com", true },
- { "twoef.co.uk", true },
- { "twofactorauth.org", true },
- { "twoguyswhoblog.com", true },
- { "twohandson.com", true },
- { "twohuo.com", true },
- { "twojapogoda.pl", true },
- { "tworaz.net", true },
- { "twtr.email", true },
- { "twwd.de", true },
- { "tx299.com", true },
- { "tx577.com", true },
- { "txcap.org", true },
- { "txdivorce.org", true },
- { "txi.su", true },
- { "txlocksmiththewoodlands.com", true },
- { "txlrs.org", true },
- { "txm.pl", true },
- { "txtecho.com", true },
- { "txtfile.eu", true },
- { "txurologist.com", true },
- { "ty7788.cc", true },
- { "tyc001.cc", true },
- { "tyc923.com", false },
- { "tyche.io", true },
- { "tycho.org", true },
- { "tycom.cz", true },
- { "tycyc88.com", true },
- { "tycycles.co.uk", true },
- { "tykeplay.com", true },
- { "tyler.rs", true },
- { "tylerdavies.net", true },
- { "tylerharcourt.org", true },
- { "tylermade.net", true },
- { "tyleromeara.com", true },
- { "tylerschmidtke.com", true },
- { "tylervigario.com", true },
- { "typeblog.net", true },
- { "typeclasses.com", true },
- { "typecodes.com", true },
- { "typeof.pw", true },
- { "typeonejoe.com", true },
- { "typewolf.com", true },
- { "typewritten.net", true },
- { "typing.com", true },
- { "typist.tech", true },
- { "typo3.com", true },
- { "tyrannize.us", true },
- { "tyres-price.com", true },
- { "tyroremotes.co.uk", true },
- { "tyroremotes.es", true },
- { "tyroremotes.eu", true },
- { "tyroremotes.fr", true },
- { "tyroremotes.nl", true },
- { "tyroremotes.no", true },
- { "tyroremotes.pt", true },
- { "tyroremotes.se", true },
- { "tysonspersonalinjurylawyer.com", true },
- { "tysox.de", true },
- { "tytocare.com", true },
- { "tytod.com", true },
- { "tyuo-keibi.co.jp", true },
- { "tyva.gq", true },
- { "tyva.ml", true },
- { "tzermias.gr", true },
- { "tzonevrakis.gr", true },
- { "u-chan.com", true },
- { "u-grow.gr", true },
- { "u-he.com", true },
- { "u-martfoods.com", true },
- { "u-page.nl", true },
- { "u.nu", true },
- { "u00228.com", false },
- { "u03.fr", true },
- { "u29dc.com", true },
- { "u2fsecuritykeys.com", true },
- { "u32i64.cf", true },
- { "u36533.com", true },
- { "u36594.com", true },
- { "u4mh-dev-accesscontroller.azurewebsites.net", true },
- { "u4mh-dev-portal.azurewebsites.net", true },
- { "u5.re", true },
- { "u51365.com", true },
- { "u5b.de", false },
- { "u5r.nl", true },
- { "u9yy.net", true },
- { "ua-blacklist.info", true },
- { "ua.search.yahoo.com", false },
- { "uae-company-service.com", true },
- { "ualove.tk", true },
- { "uangteman.com", true },
- { "uasmi.com", true },
- { "uastrategy.org", true },
- { "uat-activesg.com", true },
- { "uat-mypfp.co.uk", true },
- { "uatgootax.ru", false },
- { "ub3rk1tten.com", false },
- { "ub889.com", true },
- { "ubanquity.com", false },
- { "ubcani.com", true },
- { "uberboxen.net", true },
- { "uberestimator.com", true },
- { "uberi.fi", true },
- { "ubermail.me", true },
- { "uberpromocodes.us", true },
- { "ubertt.org", true },
- { "uberwald.de", true },
- { "uberwald.ws", true },
- { "ubezpieczenia-poznan.com", true },
- { "ubezpieczeniepsa.com", true },
- { "ubicaciones-vitamina.cl", true },
- { "ubiminds.com", true },
- { "ubineering.de", true },
- { "ubis.company", true },
- { "ubiurbe.com", true },
- { "ublaboo.org", true },
- { "uboratz.org", true },
- { "uborka-812.ru", true },
- { "ubunlog.com", true },
- { "ubuntu18.com", true },
- { "ubytovanihyncice.cz", true },
- { "ucac.nz", false },
- { "ucangiller.com", true },
- { "ucasa.org.au", true },
- { "ucb.com", true },
- { "ucc.edu.gh", true },
- { "ucch.be", false },
- { "uccisme.net.ua", true },
- { "ucdap.com", true },
- { "ucfirst.nl", true },
- { "uchargeapp.com", true },
- { "ucibt.com", true },
- { "uclf.de", true },
- { "ucmjlawyers.com", true },
- { "ucnedu.org", true },
- { "ucngame.com", true },
- { "ucppe.org", true },
- { "ucrdatatool.gov", true },
- { "uctarna.online", true },
- { "uddi.ng", true },
- { "uddin.io", true },
- { "udid.fyi", true },
- { "udien.tk", true },
- { "udiregelverk.no", true },
- { "udo-luetkemeier.de", true },
- { "udomain.net", true },
- { "udp.sh", false },
- { "udruga-point.hr", true },
- { "udvoukocek.eu", true },
- { "ueberdosis.io", true },
- { "ueberwachungspaket.at", true },
- { "uedaviolin.com", true },
- { "ueni.com", true },
- { "uestc.icu", true },
- { "uevan.com", true },
- { "uf-ace.com", true },
- { "ufacesign.in", true },
- { "ufanisi.mx", true },
- { "ufindme.at", true },
- { "ufo-blogger.com", true },
- { "ufob.edu.br", true },
- { "ufocentre.com", true },
- { "ufplanets.com", true },
- { "ufroo.com", true },
- { "ugb-verlag.de", true },
- { "ugeek.tk", true },
- { "uggedal.com", true },
- { "uglycat.com", true },
- { "uglycat.eu", true },
- { "uglycat.net", true },
- { "uglycat.org", true },
- { "ugolsibiri.ru", true },
- { "ugrod.ru", true },
- { "ugtdigiteldocumentos.es", true },
- { "ugx-mods.com", true },
- { "ugy.es", true },
- { "uhc.gg", true },
- { "uhlhosting.ch", true },
- { "uhrenlux.de", true },
- { "ui8.net", true },
- { "uiberlay.cz", true },
- { "uid0.pl", true },
- { "uiop.link", true },
- { "uiterwijk.org", true },
- { "uitgeverij-deviant.nl", true },
- { "uj2008.com", true },
- { "ujiyasu.com", true },
- { "ujob.com.cn", true },
- { "ujvary.eu", true },
- { "uk.dating", true },
- { "uk.search.yahoo.com", false },
- { "ukbc.london", true },
- { "ukchemicalresearch.org", false },
- { "ukclimbing.com", true },
- { "ukdefencejournal.org.uk", true },
- { "ukhas.net", true },
- { "ukhillwalking.com", true },
- { "ukitbs.com", true },
- { "ukmeetandgreet.com", true },
- { "ukooku.com", true },
- { "ukozliku.cz", true },
- { "ukpropertyrescue.com", true },
- { "ukr.media", true },
- { "ukrainians.ch", true },
- { "ukrapak.com.ua", true },
- { "ukriate.com", true },
- { "ukrigging.net", true },
- { "ukrn.io", true },
- { "ukrnet.co.uk", true },
- { "ukrobmen.net", true },
- { "uksb.net", true },
- { "uktw.co.uk", true },
- { "ukuchordnamer.com", true },
- { "ukulelejim.com", true },
- { "ukutabs.com", true },
- { "ukwct.org.uk", true },
- { "ulabox.com", true },
- { "uldsh.de", true },
- { "uleenucks.de", true },
- { "ulen.me", true },
- { "uli-eckhardt.de", true },
- { "ulitroyo.com", true },
- { "ullah.se", true },
- { "ulli.ml", true },
- { "ulmer-schneesport.de", true },
- { "ulovelc88.com", true },
- { "ulrichs.ch", true },
- { "ulrik.moe", true },
- { "ultima-ratio.at", true },
- { "ultimate-fireworks.tk", true },
- { "ultimate-uk.com", true },
- { "ultimateanu.com", true },
- { "ultimateappreviews.co", true },
- { "ultimatebabyshowergifts.ga", true },
- { "ultimatemafia.net", true },
- { "ultimatepaleoguide.com", true },
- { "ultrabeautycream.com", true },
- { "ultrafine.cf", true },
- { "ultramax.biz", true },
- { "ultramookie.com", true },
- { "ultraporn.biz", true },
- { "ultrapure-water.com", true },
- { "ultrasdesign.co.uk", true },
- { "ultraseopro.com", true },
- { "ultratechlp.com", true },
- { "ultrautoparts.com.au", true },
- { "ultravip.com.br", true },
- { "ultspo.net", true },
- { "ulys.ch", true },
- { "um-sachsen-pictures.de", true },
- { "umail2.com", true },
- { "umanityracing.com", true },
- { "umartina.eu", true },
- { "umasstransit.org", true },
- { "umbertheprussianblue.com", true },
- { "umbricht.li", true },
- { "umcpc.org", true },
- { "umenlisam.com", true },
- { "umisonoda.com", true },
- { "umity.com.ua", true },
- { "umlcode.com", true },
- { "ummati.com", true },
- { "ummiabi.id", true },
- { "umniy-dom.tk", true },
- { "umount.net", true },
- { "umsapi.com", true },
- { "umzuege-berlin.com", true },
- { "umzuege-hannover.net", true },
- { "umzuege-wolfsburg.de", true },
- { "umzug-braunschweig24.de", true },
- { "umzugsunternehmenberlin.eu", true },
- { "un-framed.co.za", true },
- { "un-instantpoursoi.com", true },
- { "un-zero-un.fr", true },
- { "un.fo", true },
- { "unapp.me", true },
- { "unatco.noip.me", true },
- { "unausa.com.br", true },
- { "unblock-zh.org", true },
- { "unblocked.at", true },
- { "unblocked.bet", true },
- { "unblocked.bid", true },
- { "unblocked.cam", true },
- { "unblocked.dk", true },
- { "unblocked.earth", true },
- { "unblocked.gdn", true },
- { "unblocked.ink", true },
- { "unblocked.krd", true },
- { "unblocked.lat", true },
- { "unblocked.lc", true },
- { "unblocked.live", true },
- { "unblocked.llc", true },
- { "unblocked.ltda", true },
- { "unblocked.mx", true },
- { "unblocked.nz", true },
- { "unblocked.one", true },
- { "unblocked.pet", true },
- { "unblocked.pl", true },
- { "unblocked.pro", true },
- { "unblocked.pub", true },
- { "unblocked.sh", true },
- { "unblocked.uno", true },
- { "unblocked.vc", true },
- { "unblocked.vet", true },
- { "unblocked.vip", true },
- { "unblocked.win", true },
- { "unblockit.biz", true },
- { "unblockit.ca", true },
- { "unbolt.cf", true },
- { "unboundmoney.com", true },
- { "unboxed.cf", true },
- { "unboxforteams.work", true },
- { "uncarved.com", true },
- { "unccelearn.org", true },
- { "uncensoreddns.dk", true },
- { "uncensoreddns.org", true },
- { "unclebens-specials.gr", true },
- { "undeadpirates.net", true },
- { "undecidable.de", true },
- { "undeductive.media", true },
- { "undef.in", false },
- { "underbridgeleisure.co.uk", true },
- { "undercovercondoms.com", true },
- { "underfloorheating-uk.co.uk", true },
- { "undergrounder.ga", true },
- { "undergroundremains.de", true },
- { "underlined.fr", true },
- { "undernet.uy", false },
- { "undertow.ga", true },
- { "underwearoffer.com", true },
- { "underwoodpatents.com", true },
- { "undev.co", true },
- { "undp.lt", true },
- { "unece-deta.eu", true },
- { "unefleur.be", true },
- { "unefuite.ch", false },
- { "unerosesurlalune.fr", false },
- { "unexpected.nu", true },
- { "unexpectedcompany.com", true },
- { "unfallrechtler.de", true },
- { "unfc.nl", true },
- { "unfuddle.cn", true },
- { "unga.dk", true },
- { "ungaeuropeer.se", true },
- { "ungegamere.dk", true },
- { "unghie.com", true },
- { "unibag.cl", true },
- { "unibo.com", true },
- { "unibusreputation.com", true },
- { "unicef-karten.at", true },
- { "unicef.pl", true },
- { "unicefcards.it", true },
- { "unicefcards.nl", true },
- { "unicefcestitke.rs", true },
- { "unicefkaarten.nl", true },
- { "unicefkartkidlafirm.pl", true },
- { "unicode.website", true },
- { "unicolabo.jp", true },
- { "unicorn-systems.net", true },
- { "unicorn.io", true },
- { "unicorn.melbourne", true },
- { "unicorndesign.ninja", true },
- { "unicorntooling.eu", true },
- { "unicredit.ba", true },
- { "unicredit.ro", true },
- { "unicreditbank.hu", true },
- { "unicreditbank.rs", true },
- { "unicreditbank.ru", false },
- { "unideck.com.ua", true },
- { "unidevgroup.ru", true },
- { "unidostransportes.com.br", true },
- { "unidrogas.com", false },
- { "unieducar.org.br", true },
- { "uniekglas.nl", true },
- { "unifashion.ro", true },
- { "unifestal.com", true },
- { "uniform-agri.com", true },
- { "unijob.com.br", true },
- { "unik.bg", true },
- { "unikalo.com", true },
- { "unikoingold.com", true },
- { "unikrn.com", true },
- { "unikrn.space", true },
- { "unila.edu.br", true },
- { "unimbalr.com", true },
- { "unionlife-net.com", true },
- { "unionplat.ru", true },
- { "unionreports.gov", true },
- { "unionstreetskateboards.com", true },
- { "uniontestprep.com", true },
- { "unipart.digital", false },
- { "unipig.de", true },
- { "uniprimebr.com.br", false },
- { "uniq.site", true },
- { "uniqsys.eu", true },
- { "unique-pathways.ch", false },
- { "unique-pathways.com", false },
- { "unique-tutorials.info", true },
- { "uniquepathways.ch", false },
- { "unit7jazz.com", true },
- { "unit7jazz.org", true },
- { "unite-ka.de", true },
- { "uniteasia.org", true },
- { "united-coders.com", true },
- { "united.com", false },
- { "unitedadmins.com", true },
- { "unitedarmyofentropia.tk", true },
- { "unitedbaby.fr", true },
- { "unitedfitness.com.au", true },
- { "unitedkingdoms-guild.com", true },
- { "unitedmatrix.org", true },
- { "unitedprovinces.nl", true },
- { "unitedpsychological.com", true },
- { "unitel2000.de", true },
- { "unitir.gq", true },
- { "unityconsciousnessbooks.com", true },
- { "unityvox.com", true },
- { "uniuni.info", true },
- { "univate.berlin", true },
- { "univercite.ch", false },
- { "univeril.com", false },
- { "universal-edge.com", true },
- { "universal-tutorial.com", true },
- { "universal-village.org", true },
- { "universal.at", true },
- { "universalcarpetinc.com", true },
- { "universalcarremote.com", true },
- { "universe.horse", true },
- { "universidadperu.com", true },
- { "universogay.com", true },
- { "universoscuola.it", true },
- { "universovalve.net", true },
- { "universrumbacongolaise.com", true },
- { "univet-veterinaire.com", false },
- { "univetnature.org", false },
- { "univitale.fr", false },
- { "unix.se", true },
- { "unixadm.org", true },
- { "unixforum.org", true },
- { "unixfox.eu", true },
- { "unixhost.ga", true },
- { "unixtime.date", true },
- { "unkn0wncat.net", true },
- { "unknown-player.com", true },
- { "unknown.kyoto", false },
- { "unkrn.com", true },
- { "unlax.com", true },
- { "unli.xyz", true },
- { "unlock-my-sprint.mobi", true },
- { "unlockauthority.com", true },
- { "unlockblackberryfree.co.uk", true },
- { "unlocken.nl", true },
- { "unlocks.co.uk", true },
- { "unlockscheveningen.nl", true },
- { "unlocktalent.gov", true },
- { "unluco.com", true },
- { "unmarkdocs.co", true },
- { "unmonito.red", true },
- { "unn-edu.info", true },
- { "unnamed.download", true },
- { "uno-pizza.ru", true },
- { "uno.fi", true },
- { "uno.uk", true },
- { "unoccupyabq.org", true },
- { "unp.me", true },
- { "unpaismejor.es", true },
- { "unpkg.com", true },
- { "unpleasant.tk", true },
- { "unpluggedjuice.dk", true },
- { "unpossible.xyz", true },
- { "unpr.dk", true },
- { "unquote.li", false },
- { "unrealircd.org", true },
- { "unrelated.net.au", true },
- { "uns.vn", true },
- { "unseen.is", true },
- { "unseen.tw", true },
- { "unser-gartenforum.de", true },
- { "unsourirealecole.fr", true },
- { "unstablewormhole.ltd", true },
- { "unstamps.org", true },
- { "unstoppableunits.com", true },
- { "unsuspicious.click", true },
- { "unterhaltungsbox.com", true },
- { "unternehmensbewertung.pro", true },
- { "unternehmer-radio.de", true },
- { "unternehmerrat-hagen.de", true },
- { "untethereddog.com", true },
- { "untilyouarrive.com", true },
- { "unusedrooms.com", true },
- { "unusualhatclub.com", true },
- { "unveiledgnosis.com", true },
- { "unx.dk", true },
- { "unxcoconsulting.com", true },
- { "unxicdellum.cat", true },
- { "uotomizu.com", true },
- { "up-ai.com", true },
- { "up-stage.info", true },
- { "up-stage.jp", true },
- { "up2mark.com", true },
- { "up2mark.de", true },
- { "up2staff.com", true },
- { "upacores.com", true },
- { "upakweship.ca", true },
- { "upakweship.com", true },
- { "upakweship.eu.com", true },
- { "upakweship.uk.com", true },
- { "upandrunningtutorials.com", true },
- { "upawg.ca", true },
- { "upay.ru", true },
- { "upbad.com", true },
- { "upbatangan.tk", true },
- { "upbeatrobot.com", true },
- { "upbeatrobot.email", true },
- { "upbeatrobot.eu", true },
- { "upbeatrobot.net", true },
- { "upbeatrobot.nl", true },
- { "upbeatrobot.org", true },
- { "upbtrbt.com", true },
- { "upbtrbt.eu", true },
- { "upbtrbt.net", true },
- { "upbtrbt.nl", true },
- { "upbtrbt.org", true },
- { "upcambio.com", true },
- { "upd.jp", true },
- { "upengo.com", true },
- { "upgamerengine.com", true },
- { "upgamerengine.com.br", true },
- { "upgamerengine.net", true },
- { "upgauged.com", true },
- { "upgradedpoints.com", true },
- { "upguard.com", true },
- { "uphabit.io", true },
- { "upholsterycleanerslondon.co.uk", true },
- { "upholsterydesign.com.au", true },
- { "uphuntingland.com", true },
- { "upitnik.rs", true },
- { "uplaqui.com.br", true },
- { "uplead.com", true },
- { "uplinklabs.net", true },
- { "upload.facebook.com", false },
- { "uploadbeta.com", true },
- { "uplotnitel.online", true },
- { "uplr.it", true },
- { "upmon.com", true },
- { "upperbeaconsfield.org.au", true },
- { "uppercap.com", true },
- { "upperroommission.ca", true },
- { "upplevelse.com", true },
- { "upr.com.ua", true },
- { "upr.si", true },
- { "uprint.it", true },
- { "upropay.com", true },
- { "uprospr.com", true },
- { "upscope.io", true },
- { "upstart.com", true },
- { "uptechbrasil.com.br", true },
- { "uptimed.com", true },
- { "uptodateinteriors.com", true },
- { "uptoon.jp", true },
- { "uptoplay.ovh", true },
- { "uptownlocators.com", true },
- { "uptownvintagecafe.com", true },
- { "uptrends.com", true },
- { "uptrends.de", true },
- { "upturn.org", true },
- { "upundit.com", true },
- { "upwork.com", true },
- { "ur-lauber.de", true },
- { "ur.nl", true },
- { "ur2.pw", true },
- { "urabain.com", true },
- { "uradisam.rs", true },
- { "uraimo.com", true },
- { "ural-emal.ga", true },
- { "uraniborg.net", true },
- { "uranius.eu", true },
- { "urb-budex.pl", true },
- { "urbackups.com", true },
- { "urbalex.ch", false },
- { "urban-culture.fr", true },
- { "urban.melbourne", true },
- { "urbancreators.dk", true },
- { "urbanemc.net", true },
- { "urbanesecurity.com", true },
- { "urbanfi.sh", true },
- { "urbanguerillas.de", true },
- { "urbanhotbed.eu", true },
- { "urbanietz-immobilien.de", true },
- { "urbanindustriecoiffure-auray.fr", true },
- { "urbannewsservice.com", true },
- { "urbanwaters.gov", false },
- { "urbanwildlifealliance.org", false },
- { "urbanxdevelopment.com", true },
- { "urbest.io", true },
- { "urbexdk.nl", true },
- { "urbexing.eu", true },
- { "urbizoroofing.com", true },
- { "urcentral.com", true },
- { "urcentral.eu", true },
- { "urcentral.net", true },
- { "urcentral.nl", true },
- { "urcentral.org", true },
- { "ureka.org", true },
- { "urfix.com", true },
- { "urgentcaresouthaven.com", true },
- { "uriports.com", true },
- { "uripura.de", true },
- { "urist1011.ru", true },
- { "urkult.se", true },
- { "url.fi", true },
- { "url.fm", true },
- { "url.rw", false },
- { "urlakite.com", true },
- { "urlaub-busreisen.de", true },
- { "urlaub-leitner.at", true },
- { "urlfly.tk", true },
- { "urlgot.com", true },
- { "urlscan.io", true },
- { "urlsimple.tk", true },
- { "urltell.com", true },
- { "urltodomain.com", true },
- { "urnes.org", true },
- { "urologyoklahoma.com", true },
- { "urown.net", true },
- { "urrestarazuserranoabogados.com", true },
- { "ursa-minor-beta.org", true },
- { "urspringer.de", true },
- { "ursuslibris.hu", true },
- { "urth.org", true },
- { "uruguay-experience.com", true },
- { "urukproject.org", true },
- { "us-10.com", true },
- { "us.marketing", true },
- { "usa-10.us", true },
- { "usa-greencard.eu", true },
- { "usa-reisetipps.net", true },
- { "usa-viagra.com", true },
- { "usaa.com", false },
- { "usaautoaz.com", true },
- { "usabackground.com", true },
- { "usability.com.gr", true },
- { "usability.gov", true },
- { "usaestaonline.com", true },
- { "usage.be", true },
- { "usagexchange.com", true },
- { "usagm.gov", true },
- { "usajobs.com", true },
- { "usajobs.gov", true },
- { "usalearning.gov", true },
- { "usamdt.com", true },
- { "usamultimeters.com", true },
- { "usapublicrecords.com", true },
- { "usarp.org", true },
- { "usastaffing.gov", true },
- { "usawireguard.com", true },
- { "usb-lock-rp.com", true },
- { "usbevents.co.uk", true },
- { "uscis.gov", true },
- { "uscloud.nl", true },
- { "uscpaservices.com", true },
- { "usctt.org", true },
- { "uscurrency.gov", true },
- { "usd.de", false },
- { "usdoj.gov", true },
- { "usds.gov", true },
- { "use.be", true },
- { "usebean.com", true },
- { "username.nz", true },
- { "userstation.net", true },
- { "usetypo3.com", true },
- { "useyourloaf.com", true },
- { "usgande.com", true },
- { "ushandbookapp.com", true },
- { "ushare.ch", true },
- { "ushealthpharma.com", true },
- { "usitcolours.bg", true },
- { "usjunkyardsnearme.com", true },
- { "uskaria.com", true },
- { "uslugi-voronezh.tk", true },
- { "usmammy.com.tw", true },
- { "usmiddleclass.net", true },
- { "usmint.gov", true },
- { "usninosnikrcni.eu", true },
- { "usnti.com", true },
- { "uspaacc.com", true },
- { "uspesnyprvnacek.cz", true },
- { "uspesnyprvnacek.herokuapp.com", true },
- { "usphs.gov", true },
- { "ussm.gov", false },
- { "ussst.org", true },
- { "ussuka.com", false },
- { "ustaywell.com", true },
- { "ustensiles-cuisine.boutique", true },
- { "ustr.gov", false },
- { "ustugov.kiev.ua", true },
- { "ustugova.kiev.ua", true },
- { "usuan.net", true },
- { "usweme.info", true },
- { "uswitch.com", true },
- { "utahblackplate.com", true },
- { "utahblackplates.com", true },
- { "utahcanyons.org", true },
- { "utahfanclub.org", true },
- { "utahhomes-realestate.com", true },
- { "utahhydrographics.com", true },
- { "utahrealestatepodcast.com", true },
- { "utahtravelcenter.com", true },
- { "utavatu.mk", true },
- { "utazas-nyaralas.info", true },
- { "utazine.com", true },
- { "utcast-mate.com", true },
- { "utdsgda.com", true },
- { "uteasybooki.com", true },
- { "utensil.org", true },
- { "utepils.de", true },
- { "utevai.tk", true },
- { "utgifter.no", true },
- { "utiars.com", true },
- { "uticagravel.com", true },
- { "utilia.tools", true },
- { "utilitarian.com", true },
- { "utilitarian.net", true },
- { "utilitarian.org", true },
- { "utilitarianism.com", true },
- { "utilitarianism.org", true },
- { "utilitarismo.com", true },
- { "utilitronium.com", true },
- { "utilityapi.com", true },
- { "utonia.ch", true },
- { "utopianhomespa.com", true },
- { "utopianrealms.org", true },
- { "utopicestudios.com", true },
- { "utorg.com.ua", true },
- { "utrace.me", true },
- { "utrantor.org", true },
- { "utterberry.io", true },
- { "utugnn.ru", true },
- { "utw.me", true },
- { "utwente.io", true },
- { "utzon.net", true },
- { "uuit.nl", true },
- { "uurl.ga", true },
- { "uv.uy", true },
- { "uvenuse.cz", true },
- { "uvocorp.com", true },
- { "uvpress.com", true },
- { "uvseh.com", true },
- { "uvtcinemas.com", true },
- { "uvx.io", true },
- { "uwac.co.uk", false },
- { "uwat.cf", true },
- { "uwe-arzt.de", true },
- { "uwe-r.com", true },
- { "uwe.training", true },
- { "uwelilienthal.de", true },
- { "uwmarktspecialist.nl", true },
- { "uwsoftware.be", true },
- { "uwu.lgbt", true },
- { "uwvloereruit.nl", true },
- { "ux-designers.nl", true },
- { "ux-solution.de", true },
- { "uxdesignerjobs.nl", true },
- { "uxp-it.nl", true },
- { "uxsto.com", true },
- { "uxtag.com", true },
- { "uxteam.com", true },
- { "uy.search.yahoo.com", false },
- { "uyen.party", true },
- { "uz.search.yahoo.com", false },
- { "uzay.org", true },
- { "uzayliyiz.biz", true },
- { "uzaymedya.com.tr", true },
- { "uzbekkizlari.tk", true },
- { "uzbektumblers.tk", true },
- { "uze-mobility.at", true },
- { "uze-mobility.ch", true },
- { "uze-mobility.co", true },
- { "uze-mobility.com", true },
- { "uze-mobility.group", true },
- { "uze-mobility.info", true },
- { "uze-mobility.io", true },
- { "uze-mobility.net", true },
- { "uze-mobility.org", true },
- { "uze-store.com", true },
- { "uze.mobi", true },
- { "uzemobility.com", true },
- { "uzemobility.de", true },
- { "uzemobility.eu", true },
- { "uzemobility.org", true },
- { "uzhas-uzhasny.ml", true },
- { "uzsvm.cz", true },
- { "uzzamari.com", true },
- { "v-bank.com", true },
- { "v-d-p.net", true },
- { "v-horus.com", true },
- { "v-novosibirske.tk", true },
- { "v-spin.cz", true },
- { "v-tek.fi", true },
- { "v05666.com", true },
- { "v06999.com", true },
- { "v0ctor.me", true },
- { "v0v.cc", true },
- { "v1.dk", true },
- { "v1081.com", true },
- { "v12555.com", true },
- { "v139.com", true },
- { "v1951.com", false },
- { "v1sit0r.ru", true },
- { "v2bv.net", true },
- { "v2cn.win", true },
- { "v2ex.com", true },
- { "v2x.sk", true },
- { "v33v33.com", true },
- { "v36533.com", true },
- { "v36594.com", true },
- { "v44v44.com", true },
- { "v51365.com", true },
- { "v55510.com", false },
- { "v55520.com", false },
- { "v55v55.com", true },
- { "v6021.com", true },
- { "v6350.com", true },
- { "v637.com", false },
- { "v6506.com", true },
- { "v66.ag", true },
- { "v666.ag", true },
- { "v66618.com", false },
- { "v66619.com", false },
- { "v6752.com", true },
- { "v67555.com", true },
- { "v6791.com", true },
- { "v68777.com", true },
- { "v76555.com", true },
- { "v78555.com", true },
- { "v88.ag", true },
- { "v88158.com", true },
- { "v88559.com", false },
- { "v88656.com", false },
- { "v88799.com", false },
- { "v888.ag", true },
- { "v9823.com", false },
- { "v9831.com", false },
- { "va-reitartikel.com", true },
- { "va.gov", false },
- { "va11hal.la", true },
- { "va1der.ca", true },
- { "vabusinesses.org", true },
- { "vacancyfiller.com", true },
- { "vacati0n.tk", true },
- { "vacation-croatia.com", true },
- { "vaccineskill.biz", true },
- { "vaccinestats.net", true },
- { "vacontractortraining.com", true },
- { "vacuumpump.co.id", true },
- { "vademekum.com", true },
- { "vadennissanofhiltonheadparts.com", true },
- { "vaeplatform.com", true },
- { "vaew.com", true },
- { "vagabond.fr", true },
- { "vagabondgal.com", true },
- { "vagaerg.com", true },
- { "vagaerg.net", true },
- { "vagmour.eu", true },
- { "vagpartsdb.com", true },
- { "vagrantcloud.com", true },
- { "vagrantup.com", true },
- { "vagueetvent.com", true },
- { "vahoshop.cz", true },
- { "vaindil.com", true },
- { "vaioswolke.xyz", false },
- { "vairuok.lt", true },
- { "vakaconsulting.com", true },
- { "vakantiedetective.nl", true },
- { "vakantiehuisschellinkhout.nl", true },
- { "vakantiehuizen-denemarken.nl", true },
- { "vakantienet.nl", true },
- { "vakuutuskanava.fi", true },
- { "valaphee.com", true },
- { "valasi.eu", true },
- { "valcansell.com", true },
- { "valdicass.com", true },
- { "valek.net", true },
- { "valemountchamber.com", true },
- { "valemountmuseum.ca", true },
- { "valenciadevops.me", true },
- { "valencianisme.tk", true },
- { "valencianistas.tk", true },
- { "valeniidemunte.tk", true },
- { "valentin.ml", true },
- { "valentinarosamilia.ch", true },
- { "valentinarosamilia.com", true },
- { "valentinberclaz.com", true },
- { "valentineforpresident.com", true },
- { "valentinesongs.com", true },
- { "valentinoduval.fr", true },
- { "valentinritz.com", false },
- { "valeriansaliou.name", true },
- { "valescaind.com.br", true },
- { "valiant.finance", true },
- { "validator.nu", true },
- { "validbrands.com", true },
- { "valika.ee", true },
- { "valimised.ee", true },
- { "valkohalla.dk", true },
- { "valkohattu.fi", true },
- { "valkova.net", true },
- { "valledeleresma.tk", true },
- { "vallei-veluwe.nl", true },
- { "valleyautofair.com", true },
- { "valleyautoloan.com", true },
- { "valleycode.net", true },
- { "valleydalecottage.com.au", true },
- { "valleystories.ga", true },
- { "vallutaja.eu", true },
- { "valokuva-albumi.fi", true },
- { "valordolarblue.com.ar", true },
- { "valordotrabalho.com.br", true },
- { "valorem-tax.ch", false },
- { "valoremtax.ch", false },
- { "valoremtax.com", false },
- { "valorin.net", true },
- { "valorizofficial.com", true },
- { "valsk.is", false },
- { "valskis.lt", true },
- { "valtlai.fi", true },
- { "valtool.uk", true },
- { "valudo.st", true },
- { "valuecashhomes.com", true },
- { "valuecashoffers.com", true },
- { "valuehost.com.br", true },
- { "valuemyhome.co.uk", true },
- { "valuemyhome.uk", true },
- { "valuemywebsite.net", true },
- { "valueng.com", true },
- { "valueseed.net", true },
- { "valutienda.com", true },
- { "valuuttamuunnin.com", true },
- { "valverdedelcamino.net", true },
- { "valx.jp", true },
- { "vam-podarok.tk", true },
- { "vamosbets.com", true },
- { "vamosbien.com", true },
- { "vampire-studios.tk", true },
- { "vampire142.fr", true },
- { "vampyrium.net", false },
- { "van11y.net", true },
- { "vanbinnenuit.nl", true },
- { "vancityconcerts.com", true },
- { "vancoevents.com", true },
- { "vancouverchess.com", true },
- { "vancouvercosmeticsurgery.ca", true },
- { "vancouverwatowncar.com", true },
- { "vancouverwebsitedesigns.com", true },
- { "vandalfsen.me", true },
- { "vandenbroeck-usedcars.be", false },
- { "vanderkley.it", true },
- { "vanderkrieken.org", true },
- { "vandermeer.frl", true },
- { "vanderrijt.nl", false },
- { "vandijkmaatwerk.nl", true },
- { "vandommelenart.com", true },
- { "vandorenscholars.org", true },
- { "vandortbv.nl", true },
- { "vandortgroep.nl", true },
- { "vandrielschoenen.nl", true },
- { "vandyhacks.org", true },
- { "vaneigenkweek.be", true },
- { "vanessarivas.com", true },
- { "vaneurology.com", true },
- { "vangoghcoaching.nl", true },
- { "vanhoudt-usedcars.be", false },
- { "vanhoutte.be", false },
- { "vanhove.biz", true },
- { "vaniola.com", true },
- { "vanlaanen.com", false },
- { "vanmalland.com", true },
- { "vannaos.net", true },
- { "vanohaker.ru", true },
- { "vanouwerkerk.net", true },
- { "vanspa.vn", true },
- { "vanss.org", true },
- { "vanstoftotleven.nl", true },
- { "vantagepointpreneed.com", true },
- { "vantien.com", true },
- { "vantru.is", true },
- { "vanuithartenziel.nl", true },
- { "vanwa.ch", true },
- { "vanwunnik.com", true },
- { "vap.llc", true },
- { "vape-hit.in", true },
- { "vapecrunch.com", true },
- { "vapeking.co.za", true },
- { "vapekingusa.com", true },
- { "vapensiero.co.uk", true },
- { "vaperion.me", true },
- { "vaperolles.ch", false },
- { "vapesense.co.uk", true },
- { "vapex.pl", true },
- { "vaphone.co", true },
- { "vapingdaily.com", true },
- { "vapor.cloud", false },
- { "vapteke.ru", true },
- { "varcare.jp", true },
- { "varda.nl", true },
- { "vardenafilhcl.gq", true },
- { "vareillefoundation.fr", false },
- { "vareillefoundation.org", false },
- { "varghese.de", true },
- { "variable.dk", true },
- { "variag-group.ru", true },
- { "variag-montazh.ru", true },
- { "varimedoma.com", true },
- { "variomedia.de", true },
- { "varizh.by", true },
- { "varjo.tk", true },
- { "varlex.cl", true },
- { "varshathacker.com", true },
- { "varvy.com", true },
- { "varyrentacar.com", true },
- { "varztupasaulis.com", true },
- { "varztupasaulis.eu", true },
- { "varztupasaulis.lt", true },
- { "varztupasaulis.net", true },
- { "vasastansbygg.se", true },
- { "vascomm.co.id", true },
- { "vase-eroticke-povidky.cz", true },
- { "vasel.de", true },
- { "vasel.eu", true },
- { "vashel.us", true },
- { "vasheradio.tk", true },
- { "vasileruscior.ro", true },
- { "vasilikieleftheriou.com", true },
- { "vaskulitis-info.de", true },
- { "vasports.com.au", true },
- { "vastenotaris.nl", true },
- { "vastgoed-lidl.nl", true },
- { "vasyharan.com", true },
- { "vat-eu.com", true },
- { "vat.direct", true },
- { "vatav.tk", true },
- { "vato.nl", true },
- { "vats.im", true },
- { "vattulainen.fi", true },
- { "vauceri.hr", true },
- { "vaughanrisher.com", true },
- { "vault.investments", true },
- { "vault21.net", true },
- { "vault81.de", true },
- { "vaultproject.io", false },
- { "vaur.fr", true },
- { "vave.men", true },
- { "vavel.com", true },
- { "vawebsite.co", true },
- { "vawlt.io", true },
- { "vawomenshealth.com", true },
- { "vaxxwatch.org", true },
- { "vaygren.com", true },
- { "vazovia.com", true },
- { "vb.media", true },
- { "vbazile.com", true },
- { "vbestproduct.com", true },
- { "vbestseller.com", true },
- { "vbezhenar.com", true },
- { "vbh2o.com", true },
- { "vbsoft.cz", true },
- { "vbwinery.com", true },
- { "vc.gg", false },
- { "vcacursus.nl", true },
- { "vcam.org", true },
- { "vcanederland.nl", true },
- { "vccmurah.net", true },
- { "vcf.gov", true },
- { "vch.moe", true },
- { "vchelyabinske.tk", true },
- { "vcientertainment.com", false },
- { "vcm.ru", true },
- { "vcmi.download", true },
- { "vconstruct.com", true },
- { "vcps.com", true },
- { "vcsjones.codes", true },
- { "vcsjones.com", true },
- { "vcti.cloud", true },
- { "vctor.net", true },
- { "vd42.net", true },
- { "vda.li", true },
- { "vdbongard.com", true },
- { "vdcomp.cz", false },
- { "vdesc.com", true },
- { "vdisk24.de", true },
- { "vdlp.nl", true },
- { "vdmeij.com", true },
- { "vdo-webshop.nl", true },
- { "vdownloader.com", true },
- { "ve.search.yahoo.com", false },
- { "ve3oat.ca", true },
- { "veblr.com", true },
- { "vecchiofornobarletta.it", true },
- { "vecerkaracing.cz", true },
- { "vechainstats.com", true },
- { "vecherka.tk", true },
- { "vecozo.nl", true },
- { "vectomatic.org", true },
- { "vector.solutions", true },
- { "vectordtg.com", true },
- { "vectormagnetics.com", true },
- { "vectortrack.com.au", true },
- { "vectorwish.com", true },
- { "vedatkarabacak.av.tr", true },
- { "vedev.io", true },
- { "vedma-praktik.com", true },
- { "veg-leiden.nl", true },
- { "veg.lv", true },
- { "vega-rumia.pl", true },
- { "vegalitarian.org", true },
- { "vegan-pratique.fr", true },
- { "veganism.co.uk", true },
- { "veganism.com", true },
- { "veganmasterrace.com", true },
- { "veganrecipereviews.com", true },
- { "vegasluxuryestates.com", true },
- { "vegavio.com", true },
- { "vegekoszyk.pl", true },
- { "vegetalvalley.org", true },
- { "vegetariantokyo.net", true },
- { "vegetarier-sind-moerder.tk", true },
- { "vegetus.ua", true },
- { "veggie-einhorn.de", true },
- { "vegoresto.fr", true },
- { "vegtelenchat.tk", true },
- { "vehiclematsuk.com", true },
- { "vehicletransportservices.co", true },
- { "veiergangvermut.dk", true },
- { "veii.de", true },
- { "veil-framework.com", true },
- { "veilofsecurity.com", true },
- { "veincenterbrintonlake.com", true },
- { "veit.zone", true },
- { "vejersferie.de", true },
- { "vejersferie.dk", true },
- { "vektlofting.tk", true },
- { "velacartagena.tk", true },
- { "velassoltas.pt", true },
- { "velen.io", true },
- { "velikijhutir.cherkassy.ua", true },
- { "veliovgroup.com", true },
- { "vellingetaxi.se", true },
- { "velocityfiber.com", true },
- { "veloroute.hamburg", true },
- { "velosipedi.tk", true },
- { "velvetia.no", true },
- { "vendermicasarapido.com.mx", true },
- { "vendi.it", true },
- { "vendigital.com", true },
- { "venditorepoa.com.br", true },
- { "vendorconnect.nyc", true },
- { "vendreacheter.be", true },
- { "vendreacheter.net", true },
- { "veneerssandiego.com", true },
- { "venenum.org", true },
- { "venetkaarsenovart.com", true },
- { "venev.name", true },
- { "venezianischemasken.com", true },
- { "vengriya.tk", true },
- { "venlafaxine.gq", true },
- { "venmail.net", true },
- { "venstar.com", true },
- { "ventajasdesventajas.com", true },
- { "ventassantillan.com", true },
- { "ventesprivees-fr.com", true },
- { "venti-athens.gr", true },
- { "ventilateurs-plafond.com", true },
- { "ventizo.com", true },
- { "ventnose.com", true },
- { "ventriloservers.biz", true },
- { "venturum.com", true },
- { "venturum.de", true },
- { "venturum.eu", true },
- { "venturum.net", true },
- { "venuedriver.com", true },
- { "venusbeautyproducts.in", true },
- { "venzagroup.com", true },
- { "veply.com", true },
- { "ver.ma", true },
- { "veramagazine.jp", true },
- { "verasani.ch", true },
- { "verasani.com", true },
- { "verberne.nu", true },
- { "verbier-lechable.com", true },
- { "verbmaestro.com", true },
- { "verboom.co.nz", true },
- { "verbzilla.com", true },
- { "verdensflag.dk", true },
- { "verdict.gg", true },
- { "verduccies.com", true },
- { "verdugosxerecistas.tk", true },
- { "veredadelaestrella.tk", true },
- { "verein-kiekin.de", true },
- { "verein-zur-pflege-der-geselligkeit.de", true },
- { "vereinlandwege.de", true },
- { "vereinscheck.de", true },
- { "vereinswahl.online", true },
- { "verfassungsklage.at", true },
- { "verge.capital", true },
- { "vergelijksimonly.nl", true },
- { "veri2.com", true },
- { "verifalia.com", true },
- { "verified.eu", true },
- { "verifiedjoseph.com", true },
- { "verifiny.com", true },
- { "verifygroup.com", true },
- { "verifyos.com", true },
- { "verifyyourip.com", true },
- { "veriny.tf", true },
- { "veriomed.com", true },
- { "veritafineviolins.com", true },
- { "veritas-data.de", true },
- { "veritasinvestmentwealth.com", true },
- { "verizonconnect.com", false },
- { "verizonguidelines.com", true },
- { "verkeersschoolrichardschut.nl", true },
- { "verlag-lq.at", true },
- { "verlag-lq.ch", true },
- { "verlag-lq.com", true },
- { "verlag-lq.de", true },
- { "verlag-lq.net", true },
- { "verlagdrkovac.de", false },
- { "verlaglq.com", true },
- { "verliebt-in-bw.de", true },
- { "verliebt-in-niedersachsen.de", true },
- { "verliefde-jongens.nl", true },
- { "verloskundigepraktijktolmiea.nl", true },
- { "vermeerdealers.com", true },
- { "vermiliontaxiservice.com", true },
- { "vermuetje.nl", true },
- { "vernaeve-usedcars.be", false },
- { "vernis-marins.com", true },
- { "vernonatvclub.ca", true },
- { "vernonchan.com", true },
- { "vernonfigureskatingclub.com", true },
- { "vernonfilmsociety.bc.ca", true },
- { "vernonsecureselfstorage.ca", true },
- { "vernonspeedskatingclub.com", true },
- { "vernonwintercarnival.com", true },
- { "veronic.hu", true },
- { "veronicaphotography.com", true },
- { "veronique-schmitz.de", true },
- { "verrerie-mousseline.org", false },
- { "verry.org", true },
- { "vers.one", true },
- { "versagercloud.de", true },
- { "versbesteld.nl", true },
- { "verschoren.com", true },
- { "verschurendegroot.nl", true },
- { "verses.space", true },
- { "versicherungen-blog.net", true },
- { "versicherungen-werner-hahn.de", true },
- { "verspai.de", true },
- { "verstka.cf", true },
- { "verstraetenusedcars.be", false },
- { "versuschat.com", true },
- { "vertebrates.com", true },
- { "verteilergetriebe.info", true },
- { "verticesedge.com", true },
- { "verticrew.com", true },
- { "vertigo-rec.com", true },
- { "vertigo.name", false },
- { "vertner.net", true },
- { "vertretungsplan.io", true },
- { "vertrieb-strategie.de", true },
- { "vervewellness.co.nz", true },
- { "verwandlung.org", true },
- { "verwayen.com", true },
- { "veryapt.com", true },
- { "verybin.com", true },
- { "veryhappy.ru", true },
- { "verymelon.de", true },
- { "verymetal.nl", true },
- { "veryssl.com", true },
- { "veryswing.com", true },
- { "verzekeringencambier.be", true },
- { "ves.vn.ua", true },
- { "vesaviljanen.fi", true },
- { "vescudero.net", true },
- { "veslosada.com", true },
- { "vespacascadia.com", true },
- { "vestasib.ru", true },
- { "vestberry.com", true },
- { "vestd.com", true },
- { "vestibtech.com", true },
- { "vestingbar.nl", true },
- { "vestlundbolargen.tk", true },
- { "vestum.ru", true },
- { "vet4life.co.uk", true },
- { "vetar.ro", true },
- { "vetbits.com", false },
- { "vetcard.info", true },
- { "veteranreservecorps.com", true },
- { "veterinario.milano.it", true },
- { "veterinario.roma.it", true },
- { "veterinarioaltea.com", true },
- { "veterinary-colleges.com", true },
- { "veteriner.name.tr", true },
- { "vetforum.co", true },
- { "vetinte.eu", true },
- { "vetnet.info", true },
- { "veto.fish", true },
- { "vetofish.com", true },
- { "vets.gov", true },
- { "vettenburg.eu", true },
- { "vetustainversion.com", true },
- { "veverusak.cz", true },
- { "vezirecenzii.ro", true },
- { "vfdworld.com", true },
- { "vfmc.vic.gov.au", true },
- { "vg-store.ir", true },
- { "vgchat.us", true },
- { "vgcheat.com", true },
- { "vgerak.com", true },
- { "vglist.co", true },
- { "vgolos.zt.ua", true },
- { "vgorcum.com", true },
- { "vgropp.de", true },
- { "vhrca.com", true },
- { "vhs-bad-wurzach.de", true },
- { "vhummel.nl", true },
- { "vi.photo", true },
- { "via-shire-krug.ru", true },
- { "via.blog.br", true },
- { "viablog.com.br", true },
- { "viacation.co", true },
- { "viacdn.org", true },
- { "viafinance.cz", false },
- { "viaggio-in-cina.it", true },
- { "viaggivistos.com.br", true },
- { "viajandoporelmundo.com.ar", true },
- { "viajaramsterdam.com", true },
- { "viaje-a-china.com", true },
- { "vialibido.com.br", true },
- { "viantours.com", true },
- { "viaprinto.de", true },
- { "viasinc.com", false },
- { "vibgyorhigh.com", true },
- { "vibgyyor.com", true },
- { "vibrant-america.com", true },
- { "vibrato1-kutikomi.com", true },
- { "vicenez.agency", true },
- { "vicentee.com", true },
- { "vichiya.com", true },
- { "vician.cz", true },
- { "vicianovi.cz", true },
- { "vicicode.com", true },
- { "vicioanimal.pt", true },
- { "vicious.space", true },
- { "vicjuris.com", true },
- { "vicjuwelen-annelore.be", true },
- { "vickyflipfloptravels.com", true },
- { "victora.com", true },
- { "victorblomberg.se", true },
- { "victorcanera.com", true },
- { "victorcarrasco.tk", true },
- { "victorcarwasher.com", true },
- { "victoreriksson.co", true },
- { "victoreriksson.com", true },
- { "victoreriksson.es", true },
- { "victoreriksson.eu", true },
- { "victoreriksson.info", true },
- { "victoreriksson.net", true },
- { "victoreriksson.nu", true },
- { "victoreriksson.org", true },
- { "victoreriksson.se", true },
- { "victoreriksson.us", true },
- { "victoreriksson.xyz", true },
- { "victorfiller.com", true },
- { "victorgbustamante.com", true },
- { "victorhawk.com", true },
- { "victorhorta.tk", true },
- { "victoriaartist.ru", true },
- { "victoriastudio.ru", true },
- { "victorjacobs.com", false },
- { "victornet.de", true },
- { "victorpelletmill.com", true },
- { "victorricemill.com", true },
- { "victorunix.com", true },
- { "victory.radio", true },
- { "victoryalliance.us", true },
- { "vicugna.nl", true },
- { "vicyu.com", true },
- { "vid-immobilien.de", true },
- { "vidady.com", true },
- { "vidarity.com", true },
- { "vidassemfronteiras.com", true },
- { "vidbooster.com", false },
- { "vide-greniers.org", false },
- { "video-adult-clips-mobile.com", true },
- { "videobrochuresmarketing.com", true },
- { "videogamecoupons.com", true },
- { "videogamer.com", true },
- { "videogamesartwork.com", true },
- { "videograb.ml", true },
- { "videojuegos.com", true },
- { "videokaufmann.at", true },
- { "videolabsinc.com", true },
- { "videomail.io", true },
- { "videopornoitaliana.com", true },
- { "videoseriesbiblicas.com", true },
- { "videoseyredin.net", true },
- { "videosjust.work", true },
- { "videoskaseros.com", true },
- { "videosparatodos.com", true },
- { "videospornogratis.pt", true },
- { "videosqr.com", true },
- { "videosxgays.com", true },
- { "videoueberwachung-set.de", true },
- { "videownload.com", true },
- { "videozv.tk", true },
- { "vidiobokep.xyz", true },
- { "vidiproject.com", true },
- { "vidister.de", true },
- { "vidracariaespelhosbh.com.br", true },
- { "vieaw.com", true },
- { "vieclam24h.vn", false },
- { "viekelis.lt", false },
- { "viemeister.com", true },
- { "viemontante.be", false },
- { "viennadancecrew.at", true },
- { "viepixel.at", true },
- { "vierpfeile.de", true },
- { "vierpluseins.wtf", true },
- { "vietnam-tours.tk", true },
- { "vietnamese.dating", true },
- { "vietnamluxurytravelagency.com", true },
- { "vietnamphotoblog.com", false },
- { "vietnamwomenveterans.org", true },
- { "view-page-source.com", true },
- { "viewbook.com", true },
- { "viewbykrian.com", true },
- { "viewey.com", true },
- { "viewing.nyc", true },
- { "viewmythoughts.com", true },
- { "viewsea.com", true },
- { "viflores.com", true },
- { "vifranco.cl", true },
- { "vifsoft.com", true },
- { "vigilanciaysalud.com", true },
- { "vigilantnow.com", true },
- { "vigira.com.ar", true },
- { "vigliano.com", true },
- { "vignaud.fr", true },
- { "vignoblesdeletat.ch", true },
- { "vigo-krankenversicherung.de", true },
- { "vigo-tarife.de", true },
- { "vigorspa.it", true },
- { "vigoxatelier.tech", true },
- { "vigrey.com", true },
- { "vijay-international.com", true },
- { "vijoe.org", true },
- { "vijverbenodigdheden.nl", true },
- { "vik.im", true },
- { "vikalbino.com.br", true },
- { "vikalpgupta.com", true },
- { "vikapaula.com", true },
- { "vikashkumar.me", true },
- { "vikaviktoria.com", true },
- { "viking-style.ru", true },
- { "vikings.net", true },
- { "vikramkulkarni.com", true },
- { "viktorbarzin.me", true },
- { "viktorprevaric.eu", true },
- { "viku.fi", true },
- { "vila-eden.cz", true },
- { "vildlaithailand.cf", true },
- { "viljatori.fi", true },
- { "villa-eden.cz", true },
- { "villa-gockel.de", true },
- { "villa-luna.it", true },
- { "villa-romantica-zillertal.at", true },
- { "villablino.tk", true },
- { "villach.at", true },
- { "villadelprado.tk", true },
- { "villafiore.com.br", true },
- { "villagecardshop.co.uk", true },
- { "villagecenterpediatrics.com", true },
- { "villagemagazines.co.uk", true },
- { "villagenscamuria.it", true },
- { "villagephysicians.com", true },
- { "villageunique.com.br", true },
- { "villagockel.de", true },
- { "villakarma.at", true },
- { "villalmanzo.tk", true },
- { "villamariaamalfi.it", true },
- { "villasfinistere.fr", true },
- { "villasforsale-bali.com", true },
- { "villasoasissanur.com", true },
- { "villavaltava.fi", true },
- { "villaville.com", true },
- { "villawirz.it", true },
- { "ville-aime.fr", true },
- { "villehardouin.fr", true },
- { "villek.fi", true },
- { "villekaaria.eu", true },
- { "villenavedornon.fr", true },
- { "villenvinkit.com", true },
- { "villerez.fr", true },
- { "villesalonen.fi", true },
- { "villu.ga", true },
- { "viltsu.net", true },
- { "vim.cx", true },
- { "vima.ch", false },
- { "vimeo.com", true },
- { "vinagro.sk", true },
- { "vinahost.vn", true },
- { "vinarstvimodryhrozen.cz", true },
- { "vinc.me", true },
- { "vincent-haupert.de", true },
- { "vincentcox.com", false },
- { "vincentpancol.com", true },
- { "vincentwathelet.be", true },
- { "vincible.space", true },
- { "vinciladislessia.it", true },
- { "vincitraining.com", true },
- { "vindafrid.nu", true },
- { "vindafrid.se", true },
- { "vindipoker.dk", true },
- { "vinetech.co.nz", true },
- { "vinhodragao.com.br", true },
- { "vinicius.sl", true },
- { "vinifriuli.sk", true },
- { "vinistas.com", true },
- { "vinit.tk", true },
- { "vinktwebdesign.nl", false },
- { "vinmmo.com", true },
- { "vinner.com.au", true },
- { "vinnyandchristina.com", true },
- { "vinnyvidivici.com", true },
- { "vinodoc.cz", true },
- { "vinokurov.tk", true },
- { "vinoshipper.com", true },
- { "vinovum.net", true },
- { "vinsation.com", true },
- { "vintagebandfestival.org", true },
- { "vintagecarparts.co.uk", true },
- { "vintagecaskandbarrel.com", true },
- { "vintagejeeps.net", true },
- { "vintagemakeupguide.com", true },
- { "vintageportgifts.co.uk", true },
- { "vintagesouthernpicks.com", true },
- { "vinticom.ch", false },
- { "vinzite.com", false },
- { "viocleannettoyage.com", true },
- { "violarenate.com", true },
- { "violetraven.co.uk", true },
- { "violin4fun.nl", true },
- { "vionicbeach.com", true },
- { "vionicshoes.co.uk", true },
- { "vionicshoes.com", true },
- { "vip-2132.com", true },
- { "vip-2138.com", true },
- { "vip-6132.com", true },
- { "vip-moda.ga", true },
- { "vip.de", true },
- { "vip00228.com", false },
- { "vip11018.com", false },
- { "vip2132.com", true },
- { "vip22884.com", false },
- { "vip22994.com", false },
- { "vip33138.com", true },
- { "vip5132.com", true },
- { "vip5414.com", true },
- { "vip5424.com", true },
- { "vip6132.com", true },
- { "vip7337.com", true },
- { "vip77018.com", false },
- { "vip8522.com", true },
- { "vip918.net", true },
- { "vipam8.com", true },
- { "vipcards.top", true },
- { "vipd88.net", true },
- { "vipesball.cc", true },
- { "vipesball.info", true },
- { "vipesball.me", true },
- { "vipf88.com", true },
- { "vipfitter.com", true },
- { "viphackers.tk", true },
- { "viplc0.com", true },
- { "viplc08.com", true },
- { "viplc1.com", true },
- { "viplc2.com", true },
- { "viplc3.com", true },
- { "viplc4.com", true },
- { "viplc5.com", true },
- { "viplc6.com", true },
- { "viplc66.net", true },
- { "viplc68.com", true },
- { "viplc7.com", true },
- { "viplc98.com", true },
- { "vipmdh.com.ua", true },
- { "vipom.com.ua", true },
- { "viporiflame.tk", true },
- { "vippclub.be", true },
- { "vips.pl", true },
- { "viptamol.com", true },
- { "vipw6608.com", true },
- { "vir-tec.eu", false },
- { "vir.vn", true },
- { "vir2.me", true },
- { "viraljobs.ga", true },
- { "viraloffer.ga", true },
- { "viralpop.it", false },
- { "viralted.ml", true },
- { "viraltube.my", true },
- { "viralvids.gq", true },
- { "virgontech.tk", true },
- { "virgopolymer.com", true },
- { "viridis-milites.cz", true },
- { "viris.si", true },
- { "virite.net", true },
- { "virostack.com", true },
- { "virtit.fr", true },
- { "virtualbrands.com", true },
- { "virtualbrestby.tk", true },
- { "virtualcommodities.org", true },
- { "virtualcomputer.ml", true },
- { "virtuality4d.com", true },
- { "virtuallifestyle.nl", true },
- { "virtualmemento.tk", true },
- { "virtualmt2.pl", true },
- { "virtualsanity.com", true },
- { "virtualspeech.com", true },
- { "virtualvaults.com", true },
- { "virtualvitrine.com", true },
- { "virtubox.net", true },
- { "virtubox.xyz", true },
- { "virtuebags.com", true },
- { "virtueinfo.com", true },
- { "virtuewisdomfund.com", true },
- { "virtus-group.com", true },
- { "virtusaero.com", true },
- { "virtwen.com", true },
- { "virvum.ch", true },
- { "visalist.io", true },
- { "visalogy.com", true },
- { "visaop.com", true },
- { "visapourailleurs.fr", false },
- { "visarewardprogramplatform.com", true },
- { "visartdecor.com.ua", true },
- { "visasofoz.com", true },
- { "visatitans.ae", true },
- { "visatitans.ca", true },
- { "visatitans.com", true },
- { "visaya.com.co", true },
- { "viscoelastico.com.br", true },
- { "viscopic.com", true },
- { "viseum.co.uk", true },
- { "visibox.nl", true },
- { "visikom.de", true },
- { "visiondetails.ru", true },
- { "visionduweb.fr", true },
- { "visionnissancanandaiguaparts.com", true },
- { "visionofcolour.com", true },
- { "visionxcreative.gq", true },
- { "visit-montenegro.com", true },
- { "visit-thailand.tk", true },
- { "visitbeulah.com", true },
- { "visitcambridgeshirefens.org", true },
- { "visiter-tunis.tk", true },
- { "visitkangaroovalley.com.au", true },
- { "visitmaine.com", true },
- { "visitorguard.com", true },
- { "visitorslist.com", true },
- { "visitrainscounty.com", true },
- { "vismaconnect.nl", true },
- { "visor.ph", true },
- { "vista-research-group.com", true },
- { "vistacampus.gov", true },
- { "vistastylebuilder.com", false },
- { "vistb.me", true },
- { "vistec-support.de", true },
- { "vistodeturista.com.br", true },
- { "visual-cockpit.com", true },
- { "visual-concept.net", true },
- { "visual-design.cf", true },
- { "visualgnome.com", true },
- { "visualideas.org", true },
- { "visualizing.info", true },
- { "visualmarketingdeals.com", true },
- { "visualmasters.nl", true },
- { "visualproyectos.co", true },
- { "visudira.com", true },
- { "visuri.de", true },
- { "visvolunteers.com", true },
- { "visware.com", true },
- { "vitahook.pw", true },
- { "vital-tel.co.uk", true },
- { "vitalastin-sport.de", true },
- { "vitalia.cz", true },
- { "vitalismaatjes.nl", true },
- { "vitalium-therme.de", true },
- { "vitaliyshepotkov.tk", true },
- { "vitalthrills.com", true },
- { "vitalware.com", true },
- { "vitalyzhukphoto.com", true },
- { "vitamina.cl", true },
- { "vitamina.com", true },
- { "vitaminmovie.ga", true },
- { "vitanyi.de", true },
- { "vitapingu.de", true },
- { "vitastic.nl", true },
- { "vitavista.health", true },
- { "vitavista.io", true },
- { "vitkausk.as", true },
- { "vitkutny.cz", true },
- { "vitlproducts.com", true },
- { "vitra-showrooms.co.uk", true },
- { "vitrade.de", true },
- { "vitrado.de", true },
- { "vitsoft.by", true },
- { "viva2000.com", true },
- { "vivaio.roma.it", true },
- { "vivaiocolombo.com", true },
- { "vivalajack.de", true },
- { "vivaldi.club", true },
- { "vivaldi.com", true },
- { "vivaldi.net", true },
- { "vivatv.com.tw", true },
- { "vive.link", true },
- { "vivemedialab.com", true },
- { "vivendi.de", true },
- { "viveport.biz", true },
- { "viveport.co", true },
- { "viveport.com", true },
- { "viveport.io", true },
- { "viveport.life", true },
- { "viveportal.com", true },
- { "viveportchina.com", true },
- { "vivesaludableconomnilife.com", true },
- { "vivianadavila.com", true },
- { "vivid-academy.com", true },
- { "vividinflatables.co.uk", true },
- { "viviennevandenbos.nl", true },
- { "vivirenelmundo.com", true },
- { "vivo.sx", true },
- { "vivo.vn", true },
- { "vivoitaliankitchen.com", true },
- { "vivy.com", true },
- { "vixonline.com.br", true },
- { "vixrapedia.org", true },
- { "viyf.org", true },
- { "vize.ai", false },
- { "vizedia.ga", true },
- { "vizija-nepremicnine.si", true },
- { "vizion.com", true },
- { "vizionnetwork.co.uk", true },
- { "vizzboard.com", true },
- { "vjeff.com", true },
- { "vjeff.net", true },
- { "vjhfoundation.org", true },
- { "vjpatel.me", true },
- { "vk-k.com", true },
- { "vkarpaty.tk", true },
- { "vkino.com", false },
- { "vkirienko.com", true },
- { "vkox.com", true },
- { "vksportphoto.com", true },
- { "vkstream.tk", true },
- { "vkwebsite.ru", true },
- { "vl-grafikdesign.de", true },
- { "vladimir-chanaev.pro", true },
- { "vladimir.ml", true },
- { "vladimiroff.org", true },
- { "vladislavstoyanov.com", true },
- { "vladsfads.com", true },
- { "vlaggen-landen.nl", true },
- { "vlajo.org", true },
- { "vlakem.net", true },
- { "vlcentre.org", true },
- { "vleesbesteld.nl", true },
- { "vleij.com", false },
- { "vleo.me", true },
- { "vliegensvlug.online", true },
- { "vliegensvlug.services", true },
- { "vlndc.org", true },
- { "vloeck.de", true },
- { "vlovgr.se", true },
- { "vlqnc.com", true },
- { "vlvvl.com", true },
- { "vm-0.com", true },
- { "vm-co.ch", false },
- { "vm0.eu", true },
- { "vmagz.ir", true },
- { "vmautorajkot.com", true },
- { "vmf365.tk", true },
- { "vmgirls.com", true },
- { "vmhydro.ru", false },
- { "vmis.nl", true },
- { "vmoe.info", true },
- { "vmug.pl", true },
- { "vn.search.yahoo.com", false },
- { "vnctdj.fr", true },
- { "vnd.cloud", true },
- { "vndb.org", true },
- { "vneftekamske.tk", true },
- { "vnetboard.com", true },
- { "vnfs-team.com", true },
- { "vnministries.org", true },
- { "vnovosibirske.tk", true },
- { "vns377a.com", false },
- { "vns377b.com", false },
- { "vns377c.com", false },
- { "vns377d.com", false },
- { "vns377e.com", false },
- { "vns377f.com", false },
- { "vns377g.com", false },
- { "vns377h.com", false },
- { "vns377i.com", false },
- { "vns377j.com", false },
- { "vns5020.com", true },
- { "vns6610.com", true },
- { "vns89386.com", true },
- { "vnsr112233.com", false },
- { "vnvisa.center", true },
- { "vnvisa.ru", true },
- { "vocaloid.my", true },
- { "vocalviews.com", true },
- { "vocationnetwork.org", true },
- { "vocescruzadasbcs.mx", true },
- { "vocus.aero", true },
- { "vocustest.aero", true },
- { "voda.org.ru", true },
- { "vodb.me", true },
- { "vodb.org", true },
- { "vodicak.info", true },
- { "vodicaknapocitac.sk", true },
- { "voedselbankmoerwijk.nl", true },
- { "voetbalclubinfo.tk", true },
- { "voevm.at", true },
- { "vofy.tech", true },
- { "vogelbus.ch", true },
- { "vogler.name", true },
- { "vogue.cz", true },
- { "voice-of-design.com", true },
- { "voicebrew.com", true },
- { "voicr.nl", true },
- { "voicu.ch", false },
- { "voidancerecords.com", true },
- { "voidbot.ai", true },
- { "voidcore.org", true },
- { "voidma.in", true },
- { "voidpay.com", true },
- { "voidptr.eu", true },
- { "voidshift.com", true },
- { "voipdigit.nl", true },
- { "voipsun.com", true },
- { "voix-bien-etre.com", false },
- { "vokativy.cz", true },
- { "vokeapp.com", true },
- { "vokieciupamokos.lt", true },
- { "vokurka.net", true },
- { "volatile.pw", true },
- { "volatilesystems.org", true },
- { "volatilethunk.com", true },
- { "volchara.tk", true },
- { "volga.us", true },
- { "volgavibes.ru", false },
- { "voliere-info.nl", false },
- { "volker-gropp.de", true },
- { "volkergropp.de", true },
- { "volkerwesselstransfer.nl", false },
- { "vollans.id.au", false },
- { "voloevents.com", true },
- { "voloskova.ru", true },
- { "volqanic.com", true },
- { "voltahurt.pl", true },
- { "volto.io", true },
- { "volubilisplus.fr", true },
- { "volunteeringmatters.org.uk", true },
- { "volvipress.gr", true },
- { "volvoconnect.com", true },
- { "vomitb.in", true },
- { "vonauw.com", false },
- { "vonimus.com", true },
- { "vonkuenheim.de", true },
- { "vonniehudson.com", true },
- { "vonpawn.com", true },
- { "vontainment.com", true },
- { "voodoochile.at", true },
- { "voodoocomedy.com", true },
- { "voodooshaman.com", true },
- { "voordeuren-opmaat.nl", true },
- { "voorjou.com", true },
- { "vop.li", true },
- { "vorbrodt.blog", true },
- { "vorkbaard.nl", true },
- { "vorlage-musterbriefe.de", true },
- { "vorlage-mustervertrag.de", true },
- { "vorlagen-geburtstagsgruesse.de", true },
- { "vorm2.com", true },
- { "vorodevops.com", true },
- { "vorsco.com", true },
- { "voruswebsites.com", true },
- { "vos-systems.com", true },
- { "vos-systems.es", true },
- { "vos-systems.eu", true },
- { "vos-systems.net", true },
- { "vos-systems.org", true },
- { "vosgym.jp", true },
- { "voshod.org", true },
- { "vosn.de", true },
- { "voss-klinik.com", true },
- { "vosselaer.com", true },
- { "vossenack.nrw", true },
- { "vosser.de", true },
- { "vostronet.com", true },
- { "vote2019.appspot.com", true },
- { "vote4.hk", true },
- { "votehamiltoncountyohio.gov", true },
- { "votemate.org", true },
- { "votemoore.us", true },
- { "voter-info.uk", true },
- { "votesandymurman.com", true },
- { "votocek.cz", true },
- { "votockova.cz", true },
- { "votoot.com", true },
- { "votre-avenir.com", false },
- { "votre-hotel.com", true },
- { "vouchinsurance.sg", true },
- { "vovkamagazine.tk", true },
- { "vovladikavkaze.ru", true },
- { "vox.de", true },
- { "voxfilmeonline.net", true },
- { "voxml.com", true },
- { "voxpopuli.com", true },
- { "voyage-martinique.fr", true },
- { "voyageforum.com", true },
- { "voyagesaufildespages.be", false },
- { "voyageschine.com", true },
- { "voyagesdetective.fr", true },
- { "voyagewonders.com", true },
- { "vozami.com", true },
- { "vozhatik.cf", true },
- { "vpc-display.com", true },
- { "vpinball.com", true },
- { "vpn.black", true },
- { "vpn.ht", true },
- { "vpnmag.fr", true },
- { "vpnpro.com", true },
- { "vpnservice.nl", true },
- { "vponline.com.br", true },
- { "vprotect.ga", true },
- { "vpsboard.com", true },
- { "vpsdream.dk", true },
- { "vpsport.ch", true },
- { "vpsproj.dynu.net", true },
- { "vpsrussia.com", true },
- { "vpsvz.co.uk", true },
- { "vpsvz.com", true },
- { "vpsvz.io", true },
- { "vpsvz.net", true },
- { "vpswebs.tk", true },
- { "vqcymsa.com", true },
- { "vqebizconsulting.com", true },
- { "vqeg.org", true },
- { "vragenvanproust.nl", true },
- { "vrandopulo.ru", true },
- { "vrba.org", true },
- { "vrcinvestigations.com", true },
- { "vrcprofile.com", true },
- { "vreeman.com", true },
- { "vremyachko.tk", true },
- { "vremyapervyih-hd.tk", true },
- { "vretmaskin.se", true },
- { "vreviewbestseller.com", true },
- { "vrgamecritic.com", true },
- { "vrgametrailers.net", true },
- { "vriesdonkow.be", false },
- { "vrifox.cc", true },
- { "vrij-links.nl", true },
- { "vrijgezellen-feest.com", true },
- { "vrijgezellenfeestzwolle.com", true },
- { "vrikshamindia.com", true },
- { "vrjetpackgame.com", true },
- { "vrlaid.com", false },
- { "vrnhn.nl", true },
- { "vroedvrouwella.be", true },
- { "vrostove.tk", true },
- { "vrpornmovies.net", true },
- { "vrsystem.com.br", true },
- { "vs106.com", true },
- { "vs107.com", true },
- { "vs301.com", true },
- { "vs302.com", true },
- { "vs313.com", true },
- { "vs601.com", true },
- { "vs680.com", true },
- { "vsactivity.com", true },
- { "vsaratove.tk", true },
- { "vscale.io", true },
- { "vschafer.com", true },
- { "vscodownloader.net", true },
- { "vsd.sk", true },
- { "vse-potolki.ml", true },
- { "vsean.net", true },
- { "vsec.co.il", true },
- { "vseomedia.com", false },
- { "vserus.com", true },
- { "vserver-preis-vergleich.de", true },
- { "vsesrazu-raiffeisen.ru", true },
- { "vsestoki.com", true },
- { "vsl.de", true },
- { "vsoy.co.th", true },
- { "vspin.cz", true },
- { "vsportage.com", true },
- { "vssnederland.nl", true },
- { "vstavropole.tk", true },
- { "vsund.de", true },
- { "vsx.ch", true },
- { "vtaxi.se", true },
- { "vtbs.moe", true },
- { "vthebest9.com", true },
- { "vtt-hautsdefrance.fr", true },
- { "vttnordisere.fr", true },
- { "vtul.io", true },
- { "vtupro.com", true },
- { "vuakhuyenmai.vn", true },
- { "vubey.yt", true },
- { "vuilelakens.be", true },
- { "vulcancycling.ga", true },
- { "vuldb.com", true },
- { "vulgar-teens.tk", true },
- { "vuljespaarpot.nl", true },
- { "vulndetect.com", true },
- { "vulnerability.ch", true },
- { "vulners.com", true },
- { "vulns.sexy", true },
- { "vulnscan.org", true },
- { "vulpine.club", true },
- { "vulpr.com", true },
- { "vulyk-medu.com.ua", true },
- { "vunn.com", true },
- { "vuotila.eu", true },
- { "vuvanhon.com", true },
- { "vux.li", true },
- { "vuzi.fr", true },
- { "vv1234.cn", true },
- { "vvactivia.nl", true },
- { "vvave.net", true },
- { "vvdbronckhorst.nl", true },
- { "vveactiefbeheer.nl", true },
- { "vvild.at", true },
- { "vvoip.org.uk", true },
- { "vvsochenergiteknik.se", true },
- { "vvtv.cc", true },
- { "vvvvbrest.tk", true },
- { "vvzero.com", true },
- { "vvzero.me", true },
- { "vwbusje.com", false },
- { "vwfsrentacar.co.uk", true },
- { "vwh-kunden.de", true },
- { "vwittich.de", true },
- { "vwo.com", false },
- { "vwsoft.de", true },
- { "vx.hn", true },
- { "vxz.me", true },
- { "vybeministry.org", true },
- { "vyber-odhadce.cz", true },
- { "vyberodhadce.cz", true },
- { "vygeja.lt", true },
- { "vyplnto.cz", true },
- { "vysko.cz", true },
- { "vyskocil.eu", true },
- { "vysokoe.tk", true },
- { "vyvod-iz-zapoya.online", true },
- { "vyvygen.org", true },
- { "vyzner.cz", true },
- { "vz.al", true },
- { "vzemisite.com", true },
- { "vzis.org", true },
- { "w-architectes.com", true },
- { "w-p-k.de", true },
- { "w-spotlight.appspot.com", true },
- { "w-surgeryhospital.com", true },
- { "w-w-auto.de", true },
- { "w.wiki", true },
- { "w0102.com", true },
- { "w0185.com", true },
- { "w0191.com", true },
- { "w0195.com", true },
- { "w0198.com", true },
- { "w1717w.com", true },
- { "w1n73r.de", true },
- { "w2design.eu", true },
- { "w2n.me", true },
- { "w3330.com", true },
- { "w365.vip", false },
- { "w36533.com", true },
- { "w36594.com", true },
- { "w3app.nl", true },
- { "w3ctag.org", true },
- { "w3d.io", true },
- { "w3punkt.de", true },
- { "w3scan.nl", true },
- { "w4.no", true },
- { "w4040w.com", true },
- { "w4eg.de", true },
- { "w4nvu.org", true },
- { "w4solutions.de", true },
- { "w4tec.de", true },
- { "w50.co.uk", false },
- { "w5050w.com", true },
- { "w51365.com", true },
- { "w567567.com", false },
- { "w5gfe.org", true },
- { "w61516.com", true },
- { "w61616.com", true },
- { "w66136.com", true },
- { "w66161.com", true },
- { "w661616.com", true },
- { "w6619.com", true },
- { "w66191.com", true },
- { "w663w.com", true },
- { "w6648.com", true },
- { "w666.ag", true },
- { "w66655.com", true },
- { "w66828.com", true },
- { "w668686.com", true },
- { "w668866.net", true },
- { "w668899.com", true },
- { "w668989.com", true },
- { "w66918.com", true },
- { "w66hao.net", true },
- { "w66w66.com", false },
- { "w678678.com", false },
- { "w682w.com", true },
- { "w6969.com", true },
- { "w7355.com", true },
- { "w789789.com", false },
- { "w7k.de", true },
- { "w8093.com", true },
- { "w8094.com", true },
- { "w81519.com", true },
- { "w8605.com", true },
- { "w8609.com", true },
- { "w8620.com", true },
- { "w8626.com", true },
- { "w8628.com", true },
- { "w888.ag", true },
- { "w888011.com", true },
- { "w888022.com", false },
- { "w888033.com", false },
- { "w888044.com", false },
- { "w888055.com", true },
- { "w888077.com", false },
- { "w888088.com", false },
- { "w888099.com", false },
- { "w889-line.com", true },
- { "w889-line.net", true },
- { "w889889.com", true },
- { "w889889.net", true },
- { "w889vip.com", true },
- { "w88info.com", true },
- { "w88info.win", true },
- { "w88xinxi.com", true },
- { "w8less.nl", true },
- { "w9196.com", true },
- { "wa-stromerzeuger.de", false },
- { "wa.io", true },
- { "wa.me", true },
- { "wa7sh-seo.com", true },
- { "waaifu.com", true },
- { "waalderhofje.nl", true },
- { "waaw.tv", true },
- { "wabatam.com", true },
- { "wacky-science.com", true },
- { "wacky.one", true },
- { "wadidi.com", true },
- { "wadsworth.gallery", true },
- { "waehlefamilie.de", true },
- { "waelisch.de", true },
- { "waelti.xxx", true },
- { "waermekabine.org", true },
- { "waf.ninja", true },
- { "waf.sexy", true },
- { "wafelland.be", true },
- { "waffenversand-klausing.de", true },
- { "wafuton.com", true },
- { "wagenmanswonen.nl", true },
- { "wageverify.com", true },
- { "wagonyard.com", true },
- { "wagyu-bader.de", true },
- { "wahlen-bad-wurzach.de", true },
- { "wahrnehmungswelt.de", true },
- { "wahrnehmungswelten.de", true },
- { "wai-in.net", true },
- { "waidfrau.de", true },
- { "waifu-technologies.moe", true },
- { "waigel.org", true },
- { "waimanu.io", true },
- { "waits.io", true },
- { "waiwaisw.com", true },
- { "wajs1.com", true },
- { "wajs2.com", true },
- { "waka-mono.com", true },
- { "waka168.com", true },
- { "waka168.net", true },
- { "waka88.com", true },
- { "waka88.net", true },
- { "wakamiyasumiyosi.com", true },
- { "wakandasun.com", true },
- { "wakatime.com", true },
- { "wakf123.com", true },
- { "wakf123.net", true },
- { "wakf456.com", true },
- { "wakf456.net", true },
- { "wakhanyeza.org", true },
- { "wakiminblog.com", true },
- { "wala-floor.de", true },
- { "waldgourmet.de", true },
- { "waldur.nl", true },
- { "waldvogel.family", true },
- { "walent.in", true },
- { "walk.onl", true },
- { "walkera-fans.de", true },
- { "walkhighlandsandislands.com", true },
- { "walkhisway.co.za", true },
- { "walkingandcycling.org.uk", true },
- { "walkingrehabilitation.com", true },
- { "walkman.cloud", true },
- { "walkman.io", true },
- { "walksedona.com", true },
- { "walksfourpaws.co.uk", true },
- { "wallabet.fr", true },
- { "wallabies.org", true },
- { "wallacehigh.org.uk", true },
- { "wallet.google.com", true },
- { "wallet.pp.ua", true },
- { "walletconnector.cz", true },
- { "walletnames.com", true },
- { "wallinger-online.at", false },
- { "wallingford.cc", true },
- { "wallisch.pro", true },
- { "wallmarketing.cz", true },
- { "wallpaperup.com", true },
- { "walls.de", true },
- { "walls.io", true },
- { "wallsauce.com", true },
- { "walltime.info", true },
- { "wallumai.com.au", true },
- { "wallysmasterblaster.com.au", true },
- { "walma.re", true },
- { "walnus.com", true },
- { "walnutgaming.com", true },
- { "walnutis.net", false },
- { "walpu.ski", true },
- { "walpuski.com", true },
- { "walravensax.nl", true },
- { "walruscode.com", true },
- { "walruses.org", true },
- { "walshbanks.com", true },
- { "waltellis.com", true },
- { "walter.lc", true },
- { "waltercedric.ch", true },
- { "waltercedric.com", true },
- { "waltzmanplasticsurgery.com", true },
- { "wammu.eu", true },
- { "wanda.ch", true },
- { "wandelreizen.eu", true },
- { "wander.al", true },
- { "wandervoll.ch", true },
- { "wanderzoom.co", true },
- { "wandystan.eu", true },
- { "wane.co", true },
- { "wanekat.fr", true },
- { "wanghongfuli.com", true },
- { "wangjun.me", true },
- { "wangqiliang.cn", true },
- { "wangqiliang.com", true },
- { "wangqr.org", true },
- { "wangqr.tk", true },
- { "wangriwu.com", true },
- { "wangshengze.com", true },
- { "wangtanzhang.com", true },
- { "wangyue.blog", true },
- { "wangzhe100.xyz", true },
- { "wangzuan168.cc", true },
- { "wanlieyan.cc", true },
- { "wanlieyan.com", true },
- { "wannapopularnews.cf", true },
- { "wannaridecostarica.com", true },
- { "wanybug.cn", true },
- { "wanybug.com", true },
- { "wanyingge.com", true },
- { "waonui.io", true },
- { "wapa.gov", true },
- { "wapazewddamcdocmanui6001.azurewebsites.net", true },
- { "wapazewrdamcdocmanui6001.azurewebsites.net", true },
- { "wapenon.com", true },
- { "waplumber.com.au", true },
- { "wapnews.tk", true },
- { "wapoolandspa.com", true },
- { "wapspaces.tk", true },
- { "waqood.tech", true },
- { "wardow.com", true },
- { "wardslager.com", true },
- { "warebouncycastles.co.uk", true },
- { "warekit.io", true },
- { "warenits.at", false },
- { "warfield.org.uk", true },
- { "wargameexclusive.com", true },
- { "warhaggis.com", true },
- { "waroengkoe-shop.com", true },
- { "waroengkopigazebo.net", true },
- { "warofelements.de", true },
- { "warp-radio.com", true },
- { "warp-radio.net", true },
- { "warp-radio.tv", true },
- { "warr.ath.cx", true },
- { "warrantynowvoid.com", true },
- { "warringtonkidsbouncycastles.co.uk", true },
- { "warschild.org", true },
- { "warsh.moe", true },
- { "wartimecontracting.gov", true },
- { "wartorngalaxy.com", true },
- { "warupu.com", true },
- { "wasabiwallet.co", true },
- { "wasabiwallet.io", true },
- { "waschmaschinen-dienst.de", true },
- { "waschpark-hantschel.de", true },
- { "wasd.ms", true },
- { "wasema.com", true },
- { "wasfestes.de", true },
- { "wasgigant.nl", true },
- { "wash-house.tk", true },
- { "washabich.ch", true },
- { "washburnenglishschool.tk", true },
- { "washingtonregisteredagent.io", true },
- { "washingtonviews.com", true },
- { "washoedems.org", true },
- { "wasi-net.de", true },
- { "wasielewski.com.de", true },
- { "waskesiuapparel.com", true },
- { "waslh.com", true },
- { "wasserburg.dk", true },
- { "wasserspucker.de", true },
- { "wassibauer.com", true },
- { "wasteman.com", true },
- { "wasticker.ru", true },
- { "wastrel.ch", true },
- { "watch-wiki.org", true },
- { "watchcow.org", false },
- { "watchesonwrist.com", true },
- { "watchface.watch", true },
- { "watchfreeonline.co.uk", true },
- { "watchhentai.co", true },
- { "watchinventory.com", true },
- { "watchlol.live", true },
- { "watchmetech.com", true },
- { "watchmoviesgallery.com", true },
- { "watchparts-and-tools-okayama.co.jp", true },
- { "watchstyle.com", true },
- { "water-addict.com", true },
- { "water-polo.tk", true },
- { "waterbrook.com.au", true },
- { "waterdogsmokedfish.com", true },
- { "waterdrop.tk", true },
- { "waterheaterdallastx.com", true },
- { "waterheaterirvingtx.com", true },
- { "waterheaterleaguecity.com", true },
- { "waterleeftinbeek.nl", true },
- { "watermonitor.gov", true },
- { "wateroutlook.com", true },
- { "watersb.org", true },
- { "waterschaplimburg.nl", true },
- { "waterside-residents.org.uk", true },
- { "waterslide-austria.at", true },
- { "watertorenstraat.tk", true },
- { "watertrails.io", true },
- { "watervillewomenscare.com", true },
- { "watfordjc.uk", true },
- { "watoo.tech", true },
- { "watthasawang.com", true },
- { "wattmaedchen.de", true },
- { "wattnow.io", true },
- { "watzijnmijnkerntalenten.nl", true },
- { "wav-productions.com", true },
- { "wav.tv", true },
- { "wave.is", true },
- { "wave.red", true },
- { "wavengine.com", true },
- { "wavesboardshop.com", true },
- { "waveum.com", true },
- { "wawak.pl", true },
- { "wawapuquy.com", true },
- { "waxdramatic.com", true },
- { "wayfairertravel.com", true },
- { "waynefranklin.com", true },
- { "wayohoo.com", true },
- { "wayohoo.net", true },
- { "waytofreedom.tk", true },
- { "waytt.cf", true },
- { "wb2288.cc", true },
- { "wb256.com", true },
- { "wb6668.net", true },
- { "wba.or.at", true },
- { "wbca.ca", true },
- { "wbci.us", false },
- { "wbcme.co.uk", true },
- { "wbinnssmith.com", true },
- { "wblautomotive.com", true },
- { "wblinks.com", true },
- { "wbt-solutions.ch", true },
- { "wbt-solutions.net", true },
- { "wbudd.com", true },
- { "wbuhs.ac.in", true },
- { "wbuntu.com", true },
- { "wbvb.nl", true },
- { "wca.link", true },
- { "wcbook.ru", false },
- { "wck.com", true },
- { "wcn.life", false },
- { "wcosmeticsurgery.com", true },
- { "wcrca.org", true },
- { "wcscmp.com", true },
- { "wcwcg.net", true },
- { "wd36.cc", true },
- { "wdbflowersevents.co.uk", true },
- { "wdic.org", true },
- { "wdmcheng.cn", true },
- { "wdmg.com.ua", true },
- { "wdodelta.nl", true },
- { "wdol.gov", false },
- { "wdt.cz", false },
- { "we-bb.com", true },
- { "we168168.com", true },
- { "we5688.net", true },
- { "we6668.net", true },
- { "we88fun.com", true },
- { "we8hd.com", true },
- { "weacceptbitcoin.gr", true },
- { "wealthadvisorsmf.com", true },
- { "wealthcreationsolutions.ga", true },
- { "wealthprojector.com", true },
- { "wealthprojector.com.au", true },
- { "wealthreport.com.au", true },
- { "wealthsetsyoufree.com", true },
- { "wealthsimple.com", true },
- { "wear-referrals.co.uk", true },
- { "wearandcare.net", true },
- { "weare1inspirit.com", true },
- { "wearebase.com", true },
- { "wearebfi.co.uk", true },
- { "wearefrantic.com", true },
- { "wearegenki.com", true },
- { "wearepapermill.co", true },
- { "wearepapermill.com", true },
- { "wearetuzag.com", true },
- { "wearvr.com", true },
- { "weather-schools.com", true },
- { "weather.gov", true },
- { "weather.gov.mo", true },
- { "weatherbuzzmedia.com", true },
- { "weathermyway.rocks", true },
- { "weavers.space", true },
- { "web-art.cz", true },
- { "web-design.co.il", true },
- { "web-format.tk", true },
- { "web-hotel.gr", true },
- { "web-jive.com", true },
- { "web-odyssey.com", true },
- { "web-redacteuren.nl", true },
- { "web-siena.it", true },
- { "web-smart.com", true },
- { "web-studio-kzo.ml", true },
- { "web-test.gq", true },
- { "web-wakakusa.jp", true },
- { "web-wave.jp", true },
- { "web.bzh", true },
- { "web.cc", false },
- { "web.de", true },
- { "web2033.com", true },
- { "web2ldap.de", true },
- { "web2screen.tv", true },
- { "web404.net", true },
- { "webaccio.com", true },
- { "webadiccion.net", true },
- { "webadicta.net", true },
- { "webadicto.net", true },
- { "webaholic.co.in", true },
- { "webais.ru", true },
- { "webandmore.de", true },
- { "webandsun.com", true },
- { "webanyti.me", true },
- { "webart-factory.de", true },
- { "webartex.ru", true },
- { "webarxsecurity.com", true },
- { "webbiz.co.uk", true },
- { "webbricks.ru", true },
- { "webcam-model.tk", true },
- { "webcamtoy.com", true },
- { "webcaptive.com", true },
- { "webcaptive.net", true },
- { "webcasinos.com", true },
- { "webcatchers.nl", false },
- { "webcatechism.com", false },
- { "webce.de", true },
- { "webcheck.pt", true },
- { "webclimbers.ch", false },
- { "webcloud.io", true },
- { "webclymber.com", true },
- { "webcollect.org.uk", true },
- { "webcontentspinning.com", true },
- { "webconverge.nl", true },
- { "webcookies.org", true },
- { "webcreativa.tk", true },
- { "webcreatortool.com", true },
- { "webcrm.com", true },
- { "webcurtaincall.com", true },
- { "webdemaestrias.com", true },
- { "webdesign-note.jp", true },
- { "webdesigneauclaire.com", true },
- { "webdesignersinchennai.tk", true },
- { "webdesigngc.com", true },
- { "webdesignlabor.ch", true },
- { "webdesignplayground.io", true },
- { "webdesignsandiego.com", false },
- { "webdev.solutions", true },
- { "webdevinsider.pl", true },
- { "webdevxp.com", true },
- { "webdig.pt", true },
- { "webdl.org", true },
- { "webduck.nl", false },
- { "webeau.com", true },
- { "webeditors.com", true },
- { "webergrillrestaurant.com", true },
- { "webers-webdesign.de", true },
- { "webexample.win", true },
- { "webexp.biz", true },
- { "webexpertsdirect.com.au", true },
- { "webfilings-eu-mirror.appspot.com", true },
- { "webfilings-eu.appspot.com", true },
- { "webfilings-mirror-hrd.appspot.com", true },
- { "webfilings.appspot.com", true },
- { "webfixers.nl", true },
- { "webgap.io", false },
- { "webgarten.ch", true },
- { "webgears.com", true },
- { "webgeneric.com", true },
- { "webgeneric.in", true },
- { "webharvest.gov", true },
- { "webhelyesarcu.hu", true },
- { "webhoffmann.de", true },
- { "webhooks.stream", true },
- { "webhost.guide", true },
- { "webhostingshop.ca", true },
- { "webhostingspace.net", true },
- { "webhostingzzp.nl", true },
- { "webhotelli.website", true },
- { "webhotels.tk", true },
- { "webhotelsoversigt.dk", true },
- { "webia.in.th", true },
- { "webies.ro", true },
- { "webinfotech.com.np", true },
- { "webini.co", true },
- { "webinnovation.ie", true },
- { "webinstit.net", true },
- { "webionite.com", true },
- { "webkam-sex.com", true },
- { "webkef.com", true },
- { "webkindergarten.net", true },
- { "weblagring.se", true },
- { "weblate.com", true },
- { "weblate.cz", true },
- { "weblate.org", true },
- { "webleedpixels.com", false },
- { "weblegion.de", true },
- { "webliberty.ru", true },
- { "weblights.ml", true },
- { "webline.ch", true },
- { "weblogzwolle.nl", true },
- { "webmail.ee", true },
- { "webmail.gigahost.dk", false },
- { "webmail.info", false },
- { "webmail.onlime.ch", false },
- { "webmail.schokokeks.org", false },
- { "webmail.xalqbank.az", true },
- { "webmandesign.eu", true },
- { "webmarketing.hr", true },
- { "webmaster-infographiste-lyon.fr", true },
- { "webmaster16.ml", true },
- { "webmediaprint.at", true },
- { "webmediums.com", true },
- { "webmedpharmacy.co.uk", true },
- { "webmenedzser.hu", true },
- { "webmetering.at", true },
- { "webminders.it", true },
- { "webmotelli.fi", true },
- { "webnames.ca", true },
- { "webnetforce.net", true },
- { "webnexty.com", true },
- { "webpagetest.org", true },
- { "webpc.com.ua", true },
- { "webpcstudio.com", true },
- { "webperformance.io", true },
- { "webpinoytambayan.net", true },
- { "webpinoytv.info", true },
- { "webpixelia.com", true },
- { "webplace4u.nl", true },
- { "webpubsub.com", true },
- { "webqualitat.com.br", true },
- { "webrabbit.at", true },
- { "webrebels.org", false },
- { "webrentcars.com", false },
- { "webreport.fr", true },
- { "webrox.be", true },
- { "websa.nl", true },
- { "webscale.nl", false },
- { "websecurity.is", true },
- { "webseitendesigner.com", false },
- { "webseitenserver.com", true },
- { "websenat.de", true },
- { "webservertalk.com", true },
- { "webshan.ir", true },
- { "webshaped.de", true },
- { "websharks.org", true },
- { "website-engineering.co.za", true },
- { "website-traffic.shop", true },
- { "websiteboost.nl", true },
- { "websitecyber.com", true },
- { "websitedesignersmalappuram.ga", true },
- { "websitedesignprice.ga", true },
- { "websiteenergizers.com", false },
- { "websiteforstudents.com", true },
- { "websiteguider.com", true },
- { "websitelia.com", true },
- { "websitemarketers.tk", true },
- { "websiteout.ca", true },
- { "websiteout.net", true },
- { "websitepromotion.ml", true },
- { "websitesdallas.com", true },
- { "websiteservice.pro", true },
- { "websitesmiths.com", true },
- { "websize.me", true },
- { "webslake.com", true },
- { "websmartmedia.co.uk", true },
- { "webspiral.jp", true },
- { "webspire.tech", true },
- { "webstaff.xyz", true },
- { "webstart.nl", true },
- { "webstijlen.nl", true },
- { "webstore.be", false },
- { "webstu.be", true },
- { "webstudio-n.com", true },
- { "webstylemedia.com", true },
- { "websvetaines.lt", true },
- { "webtasarim.pw", true },
- { "webtaxi.cf", true },
- { "webtex.limited", true },
- { "webtheapp.com", true },
- { "webtoro.com", true },
- { "webtorrent.io", true },
- { "webtrees.net", true },
- { "webtrek.ch", true },
- { "webtrh.cz", true },
- { "webtropia.com", false },
- { "webukhost.com", true },
- { "webwednesday.nl", true },
- { "webwelearn.com", true },
- { "webwinkelexploitatie.nl", true },
- { "webwinkelwestland.nl", true },
- { "webwit.nl", true },
- { "webworkshop.ltd", true },
- { "webx5.pro", true },
- { "webxr.today", true },
- { "webyazilimankara.com", true },
- { "webzoly.com", true },
- { "wechatify.com", true },
- { "wecho.net", true },
- { "weck.alsace", true },
- { "wecleanbins.com", true },
- { "wecobble.com", true },
- { "wed.pw", true },
- { "weddingdays.tv", true },
- { "weddingenvelopes.co.uk", true },
- { "weddingsbynoon.co.uk", true },
- { "weddingwire.ca", true },
- { "weddingwire.com", true },
- { "weddywood.ru", false },
- { "wedenth.com", true },
- { "wedg.uk", true },
- { "wedohair.co", true },
- { "wedovapes.co.uk", true },
- { "weebl.me", true },
- { "weeblr.com", true },
- { "weecarepreschool.ca", true },
- { "weedlife.com", true },
- { "weedupdate.com", true },
- { "weedworthy.com", true },
- { "weedypedia.de", true },
- { "weekdone.com", true },
- { "weekendcandy.com", true },
- { "weekendinitaly.com", true },
- { "weekly-residence.com", true },
- { "weeklydcoupgen.com", true },
- { "weeknummers.be", true },
- { "weeknummers.nl", true },
- { "weekvandemediawijsheid.nl", true },
- { "weemake.fr", false },
- { "weemakers.fr", false },
- { "weepycat.com", true },
- { "weerda.fr", true },
- { "weerstationgiethoorn.nl", true },
- { "weerstatistieken.nl", true },
- { "wefitboilers.com", true },
- { "wefound.com.tw", true },
- { "wegerecht.org", true },
- { "wegonnagetsued.org", true },
- { "wegotcookies.com", true },
- { "wegrzynek.org", true },
- { "wegrzynek.pl", true },
- { "wehmeier.family", true },
- { "wehostdnn.com", true },
- { "weibomiaopai.com", true },
- { "weidmannfibertechnology.com", false },
- { "weien.org", true },
- { "weigelia.nl", true },
- { "weightlossoutcome.com", true },
- { "weihnachten-schenken.de", true },
- { "weiling.clinic", true },
- { "weils.net", true },
- { "weimz.com", true },
- { "wein.cc", true },
- { "wein.co.kr", true },
- { "weinbergerlawgroup.com", true },
- { "weinboxbuilders.co.nz", true },
- { "weinundsein.com", true },
- { "weirdesigns.com", true },
- { "weirdgloop.org", true },
- { "weissborn.me", true },
- { "weissdorntee.de", true },
- { "weisse-liste.de", true },
- { "weissman.agency", true },
- { "weiterbildung-vdz.de", true },
- { "weitergedacht.eu", true },
- { "weitsolutions.nl", true },
- { "weknowhowtodoit.com", true },
- { "welcomescuba.com", true },
- { "welcometoscottsdalehomes.com", true },
- { "weld.io", true },
- { "weldwp.com", true },
- { "welfareness.icu", true },
- { "weliway.com", true },
- { "well-around-the-world.com", true },
- { "wella-download-center.de", true },
- { "wellbeing360.com.au", true },
- { "wellcom.co.il", true },
- { "wellcomemdhealth.com", true },
- { "wellensteyn.ru", true },
- { "weller.pm", true },
- { "wellgreece.com", true },
- { "wellist.com", true },
- { "wellness-bonbon.de", true },
- { "wellness-gutschein.de", true },
- { "wellnesscheck.net", true },
- { "wellnessever.com", true },
- { "wellnesshotel-weimar.de", true },
- { "wellsolveit.com", false },
- { "wellspringsga.com", true },
- { "wellsprung.net", true },
- { "welltycoon.com", true },
- { "welovecatsandkittens.com", true },
- { "weloveliving.it", true },
- { "welovemaira.com", true },
- { "welp-mail.de", true },
- { "welshccf.org.uk", true },
- { "welt-flaggen.de", true },
- { "welteneroberer.de", true },
- { "weltengilde.de", true },
- { "weltenhueter.de", true },
- { "weltverschwoerung.de", true },
- { "welzijnkoggenland.nl", true },
- { "wem.hr", true },
- { "wemajin.com", true },
- { "wemakeit.mx", true },
- { "wemakemenus.com", true },
- { "wemakeonlinereviews.com", true },
- { "wemovemountains.co.uk", true },
- { "wen-in.com", true },
- { "wen-in.net", true },
- { "wenceslas.org.uk", true },
- { "wenchieh.com", true },
- { "wendepunkt-betreuung.de", true },
- { "wendlberger.net", true },
- { "wenge-murphy.com", true },
- { "wenger-shop.ch", true },
- { "wenhelpdesk.tk", true },
- { "wenjs.me", true },
- { "wenjulebu.cc", true },
- { "wensing-und-koenig.de", true },
- { "wenta.de", true },
- { "wepay.com", false },
- { "wepay.in.th", true },
- { "wepay.vn", true },
- { "wepbiz.com", true },
- { "weplaynaked.dk", true },
- { "wer-kommt-her.de", true },
- { "werally.com", true },
- { "werbe-markt.de", true },
- { "werbe-sonnenbrillen.de", true },
- { "werbeagentur.de", true },
- { "werbedesign-tauber.de", true },
- { "werbefotograf-leitner.de", true },
- { "werbefotografie-leitner.de", true },
- { "werbetopshop.de", true },
- { "werbezentrum-stiebler.de", true },
- { "werbik.at", true },
- { "wercat.net", true },
- { "werd.pw", true },
- { "werehub.org", true },
- { "wereldkoffie.eu", true },
- { "wereoutthere.nl", true },
- { "werk-34.de", true },
- { "werkemotion.com", true },
- { "werkenbijdfzs.nl", true },
- { "werkenbijsherpa.nl", true },
- { "werkenbijwierda.nl", true },
- { "werkeninwesterveld.nl", true },
- { "werkenvoorphiladelphia.nl", true },
- { "werkgroepderdewereld.nl", true },
- { "werkgroeppaleisparkhetloo.nl", true },
- { "werkinc.de", true },
- { "werkkrew.xyz", true },
- { "werkslimreisslim.nl", true },
- { "werkstattkinder.de", true },
- { "wermeester.com", true },
- { "wermuttee.de", true },
- { "werner-ema.de", true },
- { "werpo.com.ar", true },
- { "wertheimer-burgrock.de", true },
- { "wervingenselectieamsterdam.nl", true },
- { "werwolf-live.de", true },
- { "werxus.eu", true },
- { "wesecom.com", true },
- { "wesell.asia", true },
- { "weserv.nl", true },
- { "wesleycabus.be", true },
- { "wesleywarnell.com", true },
- { "wesoco.de", true },
- { "west-contemporary.com", true },
- { "west-nerica.de", true },
- { "west-raptors.tk", true },
- { "west-wind.net", true },
- { "westcanal.net", true },
- { "westcarrollton.org", true },
- { "westcentralaor.org", true },
- { "westcoastcastles.com", true },
- { "westcoastheatingair.com", true },
- { "westcoastmarineadvisor.com", true },
- { "westcoastmotors.co.uk", true },
- { "westcode.de", true },
- { "westcommunitycu.org", true },
- { "westcountrystalking.com", true },
- { "westendwifi.net", true },
- { "westernfrontierins.com", true },
- { "westernpadermatologist.com", true },
- { "westernparts.com", true },
- { "westeros.hu", true },
- { "westhillselectrical.com", true },
- { "westhotel.com.au", true },
- { "westlakevillageelectric.com", true },
- { "westlakevillageelectrical.com", true },
- { "westlakevillageelectrician.com", true },
- { "westlakevillageexteriorlighting.com", true },
- { "westlakevillagelandscapelighting.com", true },
- { "westlakevillagelighting.com", true },
- { "westlakevillageoutdoorlighting.com", true },
- { "westlandplacestudios.com", true },
- { "westlinntowncar.com", true },
- { "westmead.org", true },
- { "westmeadapartments.com.au", true },
- { "westmidlandsbouncycastlehire.co.uk", true },
- { "westmidlandsinflatables.co.uk", true },
- { "westmidlandslettings.com", true },
- { "westondenning.com", true },
- { "westpointrealtors.com", true },
- { "westside-pediatrics.com", true },
- { "westsuburbanbank.com", true },
- { "wesupportthebadge.org", true },
- { "weswitch4u.com", true },
- { "wetofu.top", true },
- { "wetravel.company", true },
- { "wetrepublic.com", true },
- { "wetter.de", true },
- { "wevg.org", true },
- { "wew881.com", true },
- { "wew882.com", true },
- { "wew888.com", true },
- { "wewin88.com", true },
- { "wewin88.net", true },
- { "wewin889.com", true },
- { "wewitro.de", true },
- { "wewitro.net", true },
- { "wexfordbouncycastles.ie", true },
- { "weydu.eu", true },
- { "weyhmueller.de", true },
- { "weyland-yutani.org", true },
- { "weymouthslowik.com", true },
- { "wezartt.com", true },
- { "wezl.net", true },
- { "wf-bigsky-master.appspot.com", true },
- { "wf-demo-eu.appspot.com", true },
- { "wf-demo-hrd.appspot.com", true },
- { "wf-dogfood-hrd.appspot.com", true },
- { "wf-hosting.de", true },
- { "wf-pentest.appspot.com", true },
- { "wf-staging-hr.appspot.com", true },
- { "wf-training-hrd.appspot.com", true },
- { "wf-training-master.appspot.com", true },
- { "wf-trial-hrd.appspot.com", true },
- { "wfcp1010.com", true },
- { "wfh.ovh", true },
- { "wfh.se", true },
- { "wforum.nl", true },
- { "wfschicago.com", true },
- { "wft-portfolio.nl", true },
- { "wg-smue.de", true },
- { "wg-steubenstrasse.de", true },
- { "wg3k.us", false },
- { "wgcaobgyn.com", true },
- { "wgcp.com", true },
- { "wgdp.gov", true },
- { "wgec-fegc.gc.ca", true },
- { "wgom.org", true },
- { "wgplatform.co.uk", true },
- { "wgraphics.ru", true },
- { "wgtrm.com", true },
- { "wh-guide.de", true },
- { "wh36.net", true },
- { "wh966.com", true },
- { "whafs.de", true },
- { "what-wood.servehttp.com", true },
- { "what.tf", true },
- { "whatagreatwebsite.net", true },
- { "whatarepatentsfor.com", true },
- { "whatclinic.co.uk", true },
- { "whatclinic.com", true },
- { "whatclinic.com.ph", true },
- { "whatclinic.de", true },
- { "whatclinic.ie", true },
- { "whatclinic.ru", true },
- { "whatisapassword.com", true },
- { "whatismycountry.com", true },
- { "whatismyip.net", false },
- { "whatismyipv6.info", true },
- { "whatisthe.cloud", true },
- { "whatisthebestflag.com", true },
- { "whatnot.ai", true },
- { "whatsahoy.com", true },
- { "whatsmychaincert.com", true },
- { "whatsthisword.com", true },
- { "whatsupgold.com.tw", true },
- { "whatsupoutdoor.com", false },
- { "whatthefile.info", true },
- { "whatthingsweigh.com", true },
- { "whattodo.com", true },
- { "whattominingrigrentals.com", true },
- { "whatusb.com", true },
- { "whatwebcando.today", true },
- { "whatwg.org", true },
- { "whd-guide.de", true },
- { "wheatbagslove.com.au", true },
- { "wheatgra.in", true },
- { "wheatley.nl", true },
- { "wheelsmaestro.com", true },
- { "wheelwork.org", false },
- { "where2trip.com", true },
- { "whereapp.social", true },
- { "wheredoi.click", true },
- { "wheresbuzz.com.au", true },
- { "wheretogomyanmar.com", true },
- { "whey-protein.ch", true },
- { "whi.tw", true },
- { "whichgender.today", true },
- { "whing.org", true },
- { "whipnic.com", true },
- { "whirlpool-luboss.de", true },
- { "whirlpool.net.au", true },
- { "whisky-circle.info", true },
- { "whisky.my", true },
- { "whiskygentle.men", true },
- { "whiskyglazen.nl", false },
- { "whiskynerd.ca", true },
- { "whisp.ly", false },
- { "whispeer.de", true },
- { "whisperinghoperanch.org", true },
- { "whisperlab.org", true },
- { "whistleb.com", true },
- { "whistleblower.gov", true },
- { "whistleblowing.it", true },
- { "whitby-brewery.com", true },
- { "white-ibiza.com", true },
- { "whitealps.at", false },
- { "whitealps.be", false },
- { "whitealps.ch", false },
- { "whitealps.de", false },
- { "whitealps.fr", false },
- { "whitealps.net", false },
- { "whitebear.cloud", true },
- { "whitebirdclinic.org", true },
- { "whitefm.ch", false },
- { "whitehathackers.com.br", true },
- { "whitehats.nl", true },
- { "whitehouse.gov", true },
- { "whitehouse.org", true },
- { "whitehouseconferenceonaging.gov", true },
- { "whitehousedrugpolicy.gov", true },
- { "whiteink.com", true },
- { "whitejaguars.com", true },
- { "whiteknightsafelockinc.com", true },
- { "whitelabelcashback.nl", true },
- { "whitelabeltickets.com", false },
- { "whitemountainnaturalcreations.com", true },
- { "whitepack.ru", false },
- { "whitepen.tk", true },
- { "whitepharmacy.co.uk", true },
- { "whiterabbit.group", true },
- { "whiterabbit.org", true },
- { "whiterose.goip.de", true },
- { "whitesoxbestteaminbaseball.com", true },
- { "whitespace.se", true },
- { "whitevpn.cz", true },
- { "whitewinterwolf.com", true },
- { "whitkirk.com", true },
- { "whitkirkartsguild.com", true },
- { "whitkirkchurch.org.uk", true },
- { "whittome.com", true },
- { "whitworth.nyc", true },
- { "whizdomcenter.com", true },
- { "whizzzbang.co.uk", true },
- { "whm.gc.ca", true },
- { "whmcs.hosting", true },
- { "who-calledme.com", true },
- { "whoami.eu.org", true },
- { "whoami.io", true },
- { "whocalld.com", true },
- { "whocalled.us", true },
- { "whocalledme.xyz", true },
- { "whocybered.me", true },
- { "whodatdish.com", true },
- { "whoimg.com", false },
- { "whojoo.com", true },
- { "wholesomeharvestbread.com", false },
- { "whollyskincare.com", true },
- { "whonix.org", true },
- { "whorepresentsme.us", true },
- { "whotracks.me", true },
- { "whoturgled.com", true },
- { "whowherewhen.net", true },
- { "whqtravel.org", false },
- { "whs-music.org", true },
- { "whta.eu", true },
- { "whta.se", true },
- { "whub.io", true },
- { "why-brexit.uk", true },
- { "why918.com", true },
- { "whymps.com", true },
- { "whynohttps.com", true },
- { "whyopencomputing.ch", false },
- { "whyopencomputing.com", false },
- { "whysoslow.co.uk", true },
- { "whytls.com", true },
- { "whyworldhot.com", true },
- { "whyz1722.tk", true },
- { "wiagencies.com", true },
- { "wibbe.link", true },
- { "wiberg.nu", true },
- { "wibness.com", true },
- { "wicharypawel.com", true },
- { "wichitafoundationpros.com", true },
- { "wick-machinery.com", true },
- { "wickelfischfrance.fr", true },
- { "wickerliving.com", true },
- { "wickrath.net", true },
- { "wicksandwonders.com.au", true },
- { "wicontractortraining.com", true },
- { "wideboxmacau.com", false },
- { "widecontrol.it", true },
- { "widegab.com", false },
- { "wideinfo.org", true },
- { "widejeans.tk", true },
- { "widely.io", true },
- { "widemann.de", true },
- { "widememory.com", true },
- { "widgetmaker.co.uk", true },
- { "widmer.bz", true },
- { "widsl.de", true },
- { "wiebel.org", true },
- { "wieckiewicz.org", true },
- { "wiedmeyer.de", true },
- { "wiedu.net", true },
- { "wiegedaten.de", true },
- { "wiehenkrug.de", true },
- { "wiek.net", true },
- { "wieloswiat.pl", true },
- { "wien52.at", true },
- { "wieneck-bauelemente.de", true },
- { "wiener.hr", true },
- { "wienergyjobs.com", true },
- { "wieobensounten.de", true },
- { "wifi-hack.com", true },
- { "wifi-names.com", true },
- { "wificafehosting.com", true },
- { "wificonnect.cc", true },
- { "wifimask.com", true },
- { "wifimb.cz", true },
- { "wifipineapple.com", true },
- { "wifirst.net", true },
- { "wifree.lv", true },
- { "wigggle.it", true },
- { "wigle.net", true },
- { "wigmore-hall.org.uk", true },
- { "wiimotion.de", true },
- { "wijaya.net", true },
- { "wijaya2u.com", true },
- { "wijnbesteld.nl", true },
- { "wijnlandkroatie.nl", true },
- { "wijnservices.nl", false },
- { "wijwillendit.nl", true },
- { "wijzijnwolf.nl", true },
- { "wiki-books.ga", true },
- { "wiki-play.ru", true },
- { "wiki.python.org", true },
- { "wikibooks.org", true },
- { "wikibuy.com", true },
- { "wikidata.org", true },
- { "wikidsystems.com", false },
- { "wikihow.com", true },
- { "wikihow.com.tr", true },
- { "wikihow.cz", true },
- { "wikihow.fitness", true },
- { "wikihow.it", true },
- { "wikihow.jp", true },
- { "wikihow.life", true },
- { "wikihow.mom", true },
- { "wikihow.pet", true },
- { "wikihow.tech", true },
- { "wikihow.vn", true },
- { "wikijugos.com", true },
- { "wikileaks.ch", true },
- { "wikileaks.com", true },
- { "wikileaks.org", true },
- { "wikilinux.xyz", true },
- { "wikimedia.org", true },
- { "wikimediafoundation.org", true },
- { "wikinews.org", true },
- { "wikipedia.com", true },
- { "wikipedia.org", true },
- { "wikiquote.org", true },
- { "wikisorg.tk", true },
- { "wikisource.org", true },
- { "wikiversity.org", true },
- { "wikiversus.com", true },
- { "wikivisually.com", true },
- { "wikivoyage.org", true },
- { "wikizip.ga", true },
- { "wikpa.com", true },
- { "wiktionary.org", true },
- { "wiktor-imbierski.com", true },
- { "wilane.org", true },
- { "wilcodeboer.me", true },
- { "wild-turtles.com", true },
- { "wildanalysis.ga", true },
- { "wildandisle.com", true },
- { "wildandwonderfulbodycare.com", true },
- { "wildandwonderfulketo.com", true },
- { "wildberries.cf", true },
- { "wildbirds.dk", true },
- { "wildcatproductions.biz", true },
- { "wildcraft.com", true },
- { "wilddogdesign.co.uk", true },
- { "wildercerron.com", true },
- { "wildewood.ca", true },
- { "wildfirechain.xyz", true },
- { "wildfoxlady.com", true },
- { "wildfoxosteopathy.com", true },
- { "wildnisfamilie.net", true },
- { "wildtrip.blog", true },
- { "wildwildtravel.com", true },
- { "wildzoopark.co.uk", true },
- { "wilf1rst.com", true },
- { "wilgo.ga", true },
- { "wilhelm-nathan.de", true },
- { "wili.li", true },
- { "wiliquet.net", false },
- { "wilkinsondigital.com", true },
- { "wilkushka.com", true },
- { "wilkushka.net", true },
- { "willberg.bayern", true },
- { "willekeinden.nl", true },
- { "willems-kristiansen.dk", true },
- { "willfarrell.ca", true },
- { "willi-graf-gymnasium.de", true },
- { "willi-graf-os.de", true },
- { "willi-roth-holzbau.ch", true },
- { "williamboulton.co.uk", true },
- { "williamfeely.info", true },
- { "williamjohngauthier.net", true },
- { "williamle.com", true },
- { "williampuckering.com", true },
- { "williamscomposer.com", true },
- { "williamshomeheat.co.uk", true },
- { "williamsonshore.com", true },
- { "williamsportmortgages.com", true },
- { "williamsroom.com", true },
- { "williamsvillepediatriccenter.com", true },
- { "williamtai.moe", true },
- { "williamtm.com", true },
- { "williamvds.me", true },
- { "williejackson.com", true },
- { "willnorris.com", true },
- { "willow.technology", true },
- { "willowbrook.co.uk", true },
- { "willowdalechurch.ca", true },
- { "wills.co.tt", true },
- { "willstamper.name", true },
- { "willstocks.co.uk", true },
- { "willtc.uk", true },
- { "willvision.com", true },
- { "willywangstory.com", true },
- { "wiloca.it", true },
- { "wils.jp", true },
- { "wilseyrealty.com", true },
- { "wimachtendienk.com", true },
- { "wimpernforyou.de", true },
- { "win365.com", true },
- { "win7stylebuilder.com", false },
- { "win88-line.com", true },
- { "win88-line.net", true },
- { "winall8.com", true },
- { "winancreekbarn.com", true },
- { "winbuzzer.com", true },
- { "wincasinosmoney.com", true },
- { "winch-center.de", true },
- { "winckelmann2020.com", true },
- { "wind.moe", false },
- { "windelnkaufen24.de", true },
- { "windforme.com", true },
- { "windictus.net", true },
- { "windmillart.net", true },
- { "windmyroof.com", true },
- { "windowcleaningexperts.net", true },
- { "windowreplacement.net", true },
- { "windows-support.nu", true },
- { "windows-support.se", true },
- { "windows311.org", true },
- { "windowsdoors.it", true },
- { "windowseatwanderer.com", true },
- { "windowslatest.com", true },
- { "windowsnerd.com", true },
- { "windowsnoticias.com", true },
- { "windscribe.com", true },
- { "windsock-app.com", true },
- { "windsorite.ca", true },
- { "windsorspi.com", true },
- { "wine-route.net", true },
- { "wine-tapa.com", true },
- { "winebid.com", true },
- { "wineparis.com", true },
- { "wineworksonline.com", true },
- { "winfieldchen.me", true },
- { "wing-tsun.ga", true },
- { "wingchunboxtribe.com", true },
- { "winghill.com", true },
- { "wingify.com", true },
- { "wingmin.net", true },
- { "wingsofacow.com", true },
- { "winhistory-forum.net", true },
- { "winkelcentrumputten.nl", true },
- { "winmodels.org", true },
- { "winmodels.ru", true },
- { "winner-ua.com", true },
- { "winningattitudeawards.org", true },
- { "winphonemetro.com", true },
- { "winsome.world", true },
- { "winsposure.com", true },
- { "wint.global", true },
- { "winter-auszeit.de", true },
- { "winter-elektro.de", true },
- { "winterbergwebcams.com", true },
- { "wintercam.nl", true },
- { "wintercorn.com", true },
- { "winterfeldt.de", true },
- { "winterhavenobgyn.com", true },
- { "winterhillbank.com", true },
- { "wintermeyer-consulting.de", true },
- { "wintermeyer.de", true },
- { "winterschoen.nl", true },
- { "wintersportscompany.com", true },
- { "wintodoor.com", true },
- { "winwares.com", true },
- { "wiocha.pl", true },
- { "wippie.se", true },
- { "wipswiss.ch", true },
- { "wir-bewegen.sh", true },
- { "wir-machen-druck.de", true },
- { "wire.com", true },
- { "wiredmedia.co.uk", true },
- { "wireheading.com", true },
- { "wirekeep.com", true },
- { "wireless-emergency-stop.com", true },
- { "wireshark.org", true },
- { "wireshocks.com", true },
- { "wiretime.de", true },
- { "wirhabenspass.de", true },
- { "wirkstoffreich.de", true },
- { "wirkungs-forschung.at", true },
- { "wirkungs-forschung.ch", true },
- { "wirkungs-forschung.com", true },
- { "wirkungs-forschung.de", true },
- { "wirkungs-forschung.net", true },
- { "wirralbouncycastles.co.uk", true },
- { "wirsberg-studios.de", true },
- { "wirsol.com", true },
- { "wiruji.com", true },
- { "wis.no", true },
- { "wisak.me", true },
- { "wisal.org", true },
- { "wischu.com", true },
- { "wisedog.eu", false },
- { "wiseradiology.com.au", true },
- { "wishingyou.co.uk", true },
- { "wiskundeonderzoek.tk", true },
- { "wismile.lu", true },
- { "wispapp.com", false },
- { "wisper.net.au", true },
- { "wispmaeksmusic.tk", true },
- { "wispsuperfoods.com", true },
- { "wispyon.com", true },
- { "wiss.co.uk", true },
- { "wisv.ch", true },
- { "wisweb.no", true },
- { "wit-creations.fr", true },
- { "wit.ai", true },
- { "witch-spells.com", true },
- { "with-environment.com", true },
- { "with-planning.co.jp", true },
- { "wither.cf", true },
- { "withextraveg.net", true },
- { "withgoogle.com", true },
- { "withheld.xyz", true },
- { "withinsecurity.com", true },
- { "withsunglasses.co.uk", true },
- { "withyoutube.com", true },
- { "witneywaterpolo.org.uk", true },
- { "witt-international.co.uk", true },
- { "witte.cloud", true },
- { "wittgen-kfz-technik.de", true },
- { "wittu.fi", true },
- { "witway.nl", false },
- { "wivoc.nl", true },
- { "wiz.at", true },
- { "wiz.biz", true },
- { "wizadjournal.com", true },
- { "wizardbouncycastles.co.uk", true },
- { "wizardschool.tk", true },
- { "wizathon.com", true },
- { "wizbot.tk", true },
- { "wizzair.com", true },
- { "wizzley.com", true },
- { "wizzr.nl", true },
- { "wjb.marketing", true },
- { "wjbolles.com", true },
- { "wjci.com", true },
- { "wje-online.de", true },
- { "wjg.ca", true },
- { "wjg.dk", true },
- { "wjg.se", true },
- { "wjglerum.nl", false },
- { "wjm2038.me", true },
- { "wjr.io", true },
- { "wjsh.com", true },
- { "wk99.net", true },
- { "wkhs.com", true },
- { "wkv.com", true },
- { "wkz.io", true },
- { "wlaws.com", true },
- { "wlci.gov", true },
- { "wlilai.com", true },
- { "wlmhtrecoverycollege.co.uk", true },
- { "wlog.it", true },
- { "wlt.ca", false },
- { "wltix.com", false },
- { "wlx678.com", true },
- { "wlx678a.com", true },
- { "wlx678b.com", true },
- { "wlx678c.com", true },
- { "wlx678d.com", true },
- { "wm-access.com", true },
- { "wm-access.de", true },
- { "wm-talk.net", false },
- { "wmaccess.com", true },
- { "wmaccess.de", true },
- { "wmccancercenter.com", true },
- { "wmcroboticsurgery.com", true },
- { "wmfusercontent.org", true },
- { "wmkowa.de", true },
- { "wmsndorgen.cf", true },
- { "wmsndorgen.ga", true },
- { "wmsndorgen.gq", true },
- { "wmsndorgen.ml", true },
- { "wmsndorgen.tk", true },
- { "wnmed.com.au", true },
- { "wnu.com", true },
- { "wnuq.best", true },
- { "wo2forum.nl", true },
- { "wobble.ninja", true },
- { "wobblywotnotz.co.uk", true },
- { "wobker.co", true },
- { "woblex.cz", true },
- { "wochennummern.de", true },
- { "wodinaz.com", true },
- { "wodka-division.de", true },
- { "wofflesoft.com", true },
- { "wofford-ecs.org", false },
- { "woffs.de", true },
- { "wofox.com", true },
- { "wogo.org", true },
- { "woheni.de", true },
- { "wohlgemuth.rocks", true },
- { "wohlpa.de", true },
- { "wohnbegleitung.ch", true },
- { "wohnsitz-ausland.com", true },
- { "wois.info", true },
- { "wojciechowka.pl", true },
- { "wojciechszyjka.pl", true },
- { "wokinghammotorhomes.com", true },
- { "wolfachtal-alpaka.de", true },
- { "wolfarth.info", true },
- { "wolfcrow.com", true },
- { "wolfermann.org", true },
- { "wolferstetterkeller.de", true },
- { "wolfgang-kerschbaumer.at", true },
- { "wolfgang-kloke.de", true },
- { "wolfgang-ziegler.com", true },
- { "wolfhowl.me", true },
- { "wolfie.ovh", false },
- { "wolflambert.tk", true },
- { "wolfsden.cz", true },
- { "wolfshuegelturm.de", true },
- { "wolftain.com", true },
- { "wolfteam.tk", true },
- { "wolfwings.us", true },
- { "wolfy.design", true },
- { "wolfy1339.com", true },
- { "wolke7.wtf", true },
- { "wolkenbauer.com", true },
- { "wolkoopjes.nl", true },
- { "wollongongbaptist.hopto.org", true },
- { "wollwerk.org", true },
- { "wolszon.me", true },
- { "woltlab-demo.com", true },
- { "wolvesvtc.com", true },
- { "womb.city", true },
- { "wombatalla.com.au", true },
- { "wombatnet.com", true },
- { "wombats.net", true },
- { "wombere.org", true },
- { "womcom.nl", true },
- { "women-femmes.gc.ca", true },
- { "women-only.net", false },
- { "women.gc.ca", true },
- { "womensalespros.com", true },
- { "womensbiz.tk", true },
- { "womenshairlossproject.com", true },
- { "womenshealthadvocate.org", true },
- { "womensmedassoc.com", true },
- { "womenswellnessobgyn.com", true },
- { "woms.top", true },
- { "wonderbill.com", true },
- { "wonderbits.net", true },
- { "wondercris.com", true },
- { "wonderfuleducation.eu", true },
- { "wonderfuleducation.nl", true },
- { "wonderfulworldofwalliams.tk", true },
- { "wonderhowto.com", true },
- { "wonderlab.ml", true },
- { "wonderland.com.ua", true },
- { "wonderlandmovies.de", true },
- { "wondium.nl", true },
- { "wonghome.net", true },
- { "woningverfspuiten.nl", true },
- { "wooc.org", true },
- { "wood-crafted.co.uk", true },
- { "wood-crafted.uk", true },
- { "woodbornekitchens.co.uk", true },
- { "woodbornekitchens.com", true },
- { "woodbury.io", true },
- { "woodcat.net", true },
- { "woodcoin.org", true },
- { "woodenson.com", true },
- { "woodev.us", true },
- { "woodinvillesepticservice.net", true },
- { "woodlandboys.com", true },
- { "woodlandhillselectrical.com", true },
- { "woodlandsmetro.church", false },
- { "woodlandsvale.uk", true },
- { "woodlandwindows.com", true },
- { "woodminsterrealty.com", true },
- { "woodomat.com", true },
- { "woodreface.com", true },
- { "woodsidepottery.ca", true },
- { "woodstocksupply.com", true },
- { "woodwo.se", true },
- { "woodwormtreatment.com", true },
- { "woodyworld.com", true },
- { "woof.gq", true },
- { "woohay.com", true },
- { "woohooyeah.nl", true },
- { "woonboulevardvolendam.nl", true },
- { "woontegelwinkel.nl", true },
- { "woopie.com", true },
- { "woorocket.com", true },
- { "wootware.co.za", true },
- { "wopplan.de", true },
- { "wopr.network", true },
- { "wops.cc", true },
- { "worca.de", true },
- { "worcade.com", true },
- { "worcesterbouncycastlehire.co.uk", true },
- { "worcesterbouncycastles.co.uk", true },
- { "worcesterfestival.co.uk", true },
- { "worcesterpethydrotherapy.com", true },
- { "worcestervets.co.uk", true },
- { "worcestervetsreferrals.com", true },
- { "word-grabber.com", true },
- { "wordcounter.net", true },
- { "wordfence.com", true },
- { "wordher.com", true },
- { "wordops.eu", true },
- { "wordops.io", true },
- { "wordops.net", true },
- { "wordplay.one", true },
- { "wordpress.com", false },
- { "wordpressarequipa.com", true },
- { "wordpressfly.com", true },
- { "wordpressp.com", true },
- { "wordpresssetup.org", true },
- { "wordregistrar.ga", true },
- { "words.codes", true },
- { "wordsmart.it", true },
- { "wordspy.com", true },
- { "wordxtra.net", true },
- { "worf.in", true },
- { "worio.co", true },
- { "work-in-progress.website", true },
- { "workahealthic.de", true },
- { "workathomenoscams.com", true },
- { "workcelerator.com", true },
- { "workcloud.jp", true },
- { "workcost.me", true },
- { "worker.gov", true },
- { "workeria-personal.de", true },
- { "workingclassmedia.com", true },
- { "workinghardinit.work", true },
- { "workinginsync.co.uk", true },
- { "workingon.tech", true },
- { "workinnorway.no", true },
- { "worklinepc.com", true },
- { "worklizard.com", true },
- { "worknrby.com", true },
- { "workoptions.com", true },
- { "workplace.com", true },
- { "workplace.tools", true },
- { "workraw.com", true },
- { "works-ginan.jp", true },
- { "workshop.men", true },
- { "workshopengine.com.au", true },
- { "workshopszwolle.nl", true },
- { "workshopzwolle.com", true },
- { "worksitevr.com", true },
- { "worksmarter.tv", true },
- { "workthings.de", true },
- { "workupapp.com", true },
- { "world-in-my-eyes.com", true },
- { "world-lolo.com", true },
- { "worldcarding.tk", true },
- { "worldcareers.dk", true },
- { "worldcigars.com.br", true },
- { "worldcubeassociation.org", true },
- { "worlddeafarchitecture.com", true },
- { "worldessays.com", true },
- { "worldix.ml", true },
- { "worldmeetings.com", true },
- { "worldofarganoil.com", true },
- { "worldofbelia.de", true },
- { "worldoflegion.ml", true },
- { "worldofparties.co.uk", true },
- { "worldofwobble.co.uk", true },
- { "worldonwheels.com.au", true },
- { "worldrecipes.eu", true },
- { "worldsfree4u.ga", true },
- { "worldsgreatestazuredemo.com", true },
- { "worldsinperil.it", true },
- { "worldsladultplace.info", true },
- { "worldstone777.com", true },
- { "worldsy.com", true },
- { "worldtalk.de", true },
- { "worldvisa.tk", true },
- { "worldvisionsummerfest.com", true },
- { "worldwaterprojects.com", true },
- { "wormate.io", true },
- { "wormbytes.ca", true },
- { "wormdisk.net", true },
- { "wormhol.org", true },
- { "worongarymedical.com.au", true },
- { "worst.horse", false },
- { "wort-suchen.de", true },
- { "wort.lu", true },
- { "woshiluo.com", true },
- { "wossl.com", true },
- { "wossl.net", true },
- { "wot-zadrot.com", true },
- { "woti.dedyn.io", true },
- { "wotsunduk.ru", true },
- { "wotzadrot.com", true },
- { "woudenberg.nl", false },
- { "woudenbergsedrukkerij.nl", true },
- { "wound-doc.co.uk", true },
- { "woutergeraedts.nl", true },
- { "wouterslop.com", true },
- { "wouterslop.eu", true },
- { "wouterslop.nl", true },
- { "wow-foederation.de", true },
- { "wow-screenshots.net", true },
- { "wowaffixes.info", true },
- { "wowbouncycastles.co.uk", true },
- { "wowgenial.com", true },
- { "wowi-ffo.de", true },
- { "wowin88.com", true },
- { "wowjs.co.uk", true },
- { "wowjs.org", true },
- { "wowjs.uk", true },
- { "wowlove.tk", true },
- { "wownmedia.com", true },
- { "wp-cloud.fi", false },
- { "wp-france.com", true },
- { "wp-master.org", true },
- { "wp-mix.com", true },
- { "wp-tao.com", true },
- { "wp-webagentur.de", true },
- { "wpac.de", false },
- { "wpandup.org", true },
- { "wpbeter.nl", true },
- { "wpboot.com", true },
- { "wpbox.cc", true },
- { "wpcanban.com", false },
- { "wpcc.io", true },
- { "wpccu-cdn.org", true },
- { "wpcdn.bid", true },
- { "wpcs.pro", true },
- { "wpdivitheme.nl", true },
- { "wpenhance.com", true },
- { "wpexplorer.com", true },
- { "wpformation.com", true },
- { "wpherc.com", true },
- { "wphlive.tv", true },
- { "wphosting.ovh", true },
- { "wphostingblog.nl", true },
- { "wplibrary.net", true },
- { "wplistings.pro", true },
- { "wpmeetup-berlin.de", true },
- { "wpml.org", true },
- { "wpmu-tutorials.de", true },
- { "wpno.com", false },
- { "wpnuvem.com", true },
- { "wpostats.com", false },
- { "wppeeps.com", true },
- { "wpresscoder.com", true },
- { "wpsermons.com", true },
- { "wpserp.com", true },
- { "wpsharks.com", true },
- { "wpsitemovers.com", true },
- { "wpsmackdown.com", true },
- { "wpsnelheid.nl", true },
- { "wpthaiuser.com", true },
- { "wptorium.com", true },
- { "wptotal.com", true },
- { "wpturnedup.com", true },
- { "wpwebshop.com", true },
- { "wq.ro", true },
- { "wr.su", true },
- { "wrap.in.ua", true },
- { "wrara.org", true },
- { "wrathofgeek.com", true },
- { "wrdcfiles.ca", true },
- { "wrdx.io", true },
- { "wrenwrites.com", true },
- { "wrestling.net.au", true },
- { "wrgms.com", true },
- { "wristreview.com", true },
- { "write-right.net", true },
- { "writeandedit-for-you.com", true },
- { "writecustomessay.com", true },
- { "writemyessay.today", true },
- { "writemyessays.com", true },
- { "writemyestimate.com", true },
- { "writemypaperhub.com", true },
- { "writemytermpapers.com", true },
- { "writeoff.me", true },
- { "writepro.net", true },
- { "writer24.ru", true },
- { "writereditor.com", true },
- { "writers-club.tk", true },
- { "writing-expert.com", true },
- { "writingcities.net", true },
- { "writingtoserve.net", true },
- { "writtenworld.bg", true },
- { "writtit.com", true },
- { "wrmea.org", true },
- { "wrong.wang", true },
- { "wrozbyonline.pl", true },
- { "wrp-timber-mouldings.co.uk", true },
- { "wrp.gov", true },
- { "wsa.poznan.pl", true },
- { "wsadek.ovh", true },
- { "wsave.be", true },
- { "wsb-immo.at", true },
- { "wsb.pl", true },
- { "wsbhvac.com", true },
- { "wscales.com", false },
- { "wscbiolo.id", true },
- { "wsdcapital.com", true },
- { "wselektro.de", true },
- { "wsetech.com", true },
- { "wsgvet.com", true },
- { "wsl.sh", true },
- { "wsldp.com", true },
- { "wso01.com", true },
- { "wsp-center.com", true },
- { "wsspalluto.de", true },
- { "wstudio.ch", false },
- { "wstx.com", true },
- { "wsv-pfeffingen.de", true },
- { "wtfnope.org", true },
- { "wtp.co.jp", true },
- { "wtpdive.jp", true },
- { "wtpmj.com", true },
- { "wtprecife.com.br", true },
- { "wtup.net", true },
- { "wtw.io", true },
- { "wucke13.de", true },
- { "wuerfel.wf", true },
- { "wuerfelmail.de", true },
- { "wug.fun", true },
- { "wug.jp", true },
- { "wug.news", true },
- { "wuji.cz", true },
- { "wulala.us", true },
- { "wulfrun-invicta.tk", true },
- { "wumbo.cf", true },
- { "wumbo.co.nz", true },
- { "wumbo.ga", true },
- { "wumbo.gq", true },
- { "wumbo.ml", true },
- { "wumbo.tk", true },
- { "wunder.io", true },
- { "wunderkarten.de", true },
- { "wunderlist.com", true },
- { "wundernas.ch", true },
- { "wundi.net", true },
- { "wunschzettel.de", true },
- { "wuppertaler-kurrende.com", false },
- { "wuppertaler-kurrende.de", true },
- { "wutianyi.com", true },
- { "wuxiaohen.com", true },
- { "wuz.it", true },
- { "wuzigackl.de", false },
- { "wvg.myds.me", true },
- { "wvpbs.ml", true },
- { "wvpventures.com", true },
- { "ww-design.ch", true },
- { "ww00228.com", false },
- { "ww0512.com", true },
- { "ww8989.com", true },
- { "ww9297.co", true },
- { "wweforums.net", true },
- { "wwgc2011.se", true },
- { "wwin818.com", true },
- { "wwmm.ru", true },
- { "wwtext.com", true },
- { "wwv-8722.com", true },
- { "wwvip88.com", true },
- { "www-8225.com", true },
- { "www-8522.com", true },
- { "www-9822.com", true },
- { "www-pheromone.com", true },
- { "www-pheromones.com", true },
- { "www-railto.com", true },
- { "www.aclu.org", false },
- { "www.airbnb.com", true },
- { "www.amazon.ca", true },
- { "www.amazon.cn", true },
- { "www.amazon.co.jp", true },
- { "www.amazon.co.uk", true },
- { "www.amazon.com", true },
- { "www.amazon.com.au", true },
- { "www.amazon.com.br", true },
- { "www.amazon.com.mx", true },
- { "www.amazon.de", true },
- { "www.amazon.es", true },
- { "www.amazon.fr", true },
- { "www.amazon.it", true },
- { "www.amazon.nl", true },
- { "www.banking.co.at", false },
- { "www.braintreepayments.com", false },
- { "www.capitainetrain.com", false },
- { "www.cloudflare.com", false },
- { "www.cnet.com", true },
- { "www.dropbox.com", true },
- { "www.dropcam.com", false },
- { "www.edu.tw", true },
- { "www.entropia.de", false },
- { "www.eternalgoth.co.uk", true },
- { "www.etsy.com", true },
- { "www.evernote.com", false },
- { "www.facebook.com", false },
- { "www.fastmail.com", true },
- { "www.ft.com", true },
- { "www.g.co", false },
- { "www.gamesdepartment.co.uk", true },
- { "www.getcloak.com", false },
- { "www.gmail.com", false },
- { "www.googlemail.com", false },
- { "www.gov.pl", true },
- { "www.gov.uk", false },
- { "www.govt.nz", true },
- { "www.grc.com", false },
- { "www.healthcare.gov", false },
- { "www.heliosnet.com", true },
- { "www.honeybadger.io", false },
- { "www.hyatt.com", true },
- { "www.irccloud.com", false },
- { "www.linode.com", false },
- { "www.lookout.com", false },
- { "www.messenger.com", true },
- { "www.mylookout.com", false },
- { "www.noisebridge.net", true },
- { "www.opsmate.com", true },
- { "www.paypal.com", false },
- { "www.python.org", true },
- { "www.re", true },
- { "www.rememberthemilk.com", true },
- { "www.sb", true },
- { "www.simple.com", false },
- { "www.techrepublic.com", true },
- { "www.theguardian.com", true },
- { "www.therapynotes.com", true },
- { "www.tinfoilsecurity.com", false },
- { "www.torproject.org", false },
- { "www.tumblr.com", false },
- { "www.twitter.com", false },
- { "www.united.com", true },
- { "www.usaa.com", false },
- { "www.viasinc.com", false },
- { "www.vino75.com", false },
- { "www.wepay.com", false },
- { "www.wordpress.com", false },
- { "www.zdnet.com", true },
- { "www00228a.com", false },
- { "www00228b.com", false },
- { "www00228d.com", false },
- { "www00228e.com", false },
- { "www68277.com", true },
- { "wwweb.be", true },
- { "wwwindows.co.uk", true },
- { "wwwpheromone.com", true },
- { "wwwrailto.com", true },
- { "wwwwnews.tk", true },
- { "wxcafe.net", true },
- { "wxdisco.com", true },
- { "wxforums.com", true },
- { "wxh.jp", true },
- { "wxhbts.com", true },
- { "wxkxsw.com", true },
- { "wxlog.cn", true },
- { "wxster.com", true },
- { "wxw.moe", false },
- { "wy188.cc", true },
- { "wyam.io", true },
- { "wyatttauber.com", true },
- { "wyckoff.pro", true },
- { "wyckoff.vip", true },
- { "wyczaruj.pl", true },
- { "wyday.com", true },
- { "wygibanki.pl", true },
- { "wygodnie.pl", true },
- { "wyhpartnership.co.uk", true },
- { "wyhuesli.ch", true },
- { "wyldfiresignage.com", true },
- { "wyo.cam", true },
- { "wyomingurology.com", true },
- { "wyrickstaxidermy.com", true },
- { "wyrihaximus.net", true },
- { "wyrimaps.net", true },
- { "wyssmuller.ch", false },
- { "wysz.com", true },
- { "wywabmnie.pl", true },
- { "wyydsb.cn", true },
- { "wyydsb.com", true },
- { "wyydsb.xin", true },
- { "wyzphoto.nl", true },
- { "wzilverschoon.nl", true },
- { "wzrd.in", true },
- { "wzxaini9.com", true },
- { "wzyboy.org", true },
- { "x-6.pl", true },
- { "x-charge.uk", true },
- { "x-iweb.ru", true },
- { "x-lan.be", true },
- { "x-minus.me", true },
- { "x-one.co.jp", true },
- { "x.io", true },
- { "x.st", true },
- { "x001.org", true },
- { "x00701.com", true },
- { "x00708.com", true },
- { "x00738.com", true },
- { "x00776.com", true },
- { "x00786.com", true },
- { "x0r.be", true },
- { "x10006.com", false },
- { "x10007.com", false },
- { "x10008.com", false },
- { "x17.cafe", true },
- { "x2816.com", false },
- { "x2d2.de", false },
- { "x3515.com", false },
- { "x3618.com", false },
- { "x36533.com", true },
- { "x36594.com", true },
- { "x378.ch", true },
- { "x3789.com", false },
- { "x3801.com", true },
- { "x3802.com", true },
- { "x3803.com", true },
- { "x3804.com", true },
- { "x3805.com", true },
- { "x3807.com", true },
- { "x3815.com", true },
- { "x3816.com", true },
- { "x3828.com", true },
- { "x3927.com", false },
- { "x5901.com", true },
- { "x5902.com", true },
- { "x5903.com", true },
- { "x5904.com", true },
- { "x5905.com", true },
- { "x5906.com", true },
- { "x5907.com", true },
- { "x5908.com", true },
- { "x59088.com", true },
- { "x5910.com", true },
- { "x59288.com", true },
- { "x59388.com", true },
- { "x59488.com", true },
- { "x59588.com", true },
- { "x59688.com", true },
- { "x59788.com", true },
- { "x59888.com", true },
- { "x59988.com", true },
- { "x69.biz", true },
- { "x69x.net", true },
- { "x6r3p2yjg1g6x7iu.myfritz.net", true },
- { "x7008.com", false },
- { "x7713.com", false },
- { "x7719.com", false },
- { "x7782.com", false },
- { "x7785.com", false },
- { "x7795.com", false },
- { "x77dd.com", false },
- { "x77ee.com", false },
- { "x77hh.com", false },
- { "x77jj.com", false },
- { "x77kk.com", false },
- { "x77mm.com", false },
- { "x77nn.com", false },
- { "x77pp.com", false },
- { "x77qq.com", false },
- { "x77tt.com", false },
- { "x77ww.com", false },
- { "x9015.com", false },
- { "x9017.com", false },
- { "x9297.co", true },
- { "x9701.com", false },
- { "x9718.com", false },
- { "x98d.com", true },
- { "x98e.com", true },
- { "x98f.com", true },
- { "x98g.com", true },
- { "x98h.com", true },
- { "x98i.com", true },
- { "x98k.com", true },
- { "x98l.com", true },
- { "x98m.com", true },
- { "x98n.com", true },
- { "x98o.com", true },
- { "x98p.com", true },
- { "x98q.com", true },
- { "x98r.com", true },
- { "x98s.com", true },
- { "x98w.com", true },
- { "x98y.com", true },
- { "x98z.com", true },
- { "x993.com", true },
- { "xa.search.yahoo.com", false },
- { "xa1.uk", true },
- { "xab123.com", true },
- { "xab4.com", true },
- { "xab456.com", true },
- { "xab678.com", true },
- { "xab678a.com", true },
- { "xab678b.com", true },
- { "xab678c.com", true },
- { "xab678d.com", true },
- { "xab789.com", true },
- { "xab799.com", true },
- { "xab899.com", true },
- { "xaba.tk", true },
- { "xacker.tk", true },
- { "xaffit.com", true },
- { "xahbspl.com", true },
- { "xakepctbo.tk", true },
- { "xamax.co.uk", true },
- { "xanadu-auto.cz", true },
- { "xanadu-catering.cz", true },
- { "xanadu-golf.cz", true },
- { "xanadu-taxi.cz", true },
- { "xanadu-trans.cz", true },
- { "xanderbron.tech", true },
- { "xanhdecor.com", true },
- { "xanimalcaps.com", true },
- { "xants.de", true },
- { "xanyl.de", true },
- { "xarangallomangallo.tk", true },
- { "xatr0z.org", false },
- { "xav.ie", true },
- { "xaver.su", true },
- { "xavita.uk", true },
- { "xaxax.ru", true },
- { "xb052.com", true },
- { "xb053.com", true },
- { "xb056.com", true },
- { "xb057.com", true },
- { "xb058.com", true },
- { "xb83studio.ch", true },
- { "xbb.hk", true },
- { "xbb.li", true },
- { "xbdmov.com", true },
- { "xbertschy.com", true },
- { "xblau.com", true },
- { "xboxachievements.com", true },
- { "xboxdownloadthat.com", true },
- { "xboxlivegoldshop.nl", true },
- { "xboxonex.shop", true },
- { "xbrl.online", true },
- { "xbrlsuccess.appspot.com", true },
- { "xbt.co", true },
- { "xbtce.com", true },
- { "xbtmusic.org", false },
- { "xceedgaming.com", true },
- { "xcentricmold.com", true },
- { "xcharge.uk", true },
- { "xcler8.com", true },
- { "xclirion-support.de", true },
- { "xcorpsolutions.com", true },
- { "xcraftsumulator.ru", true },
- { "xcvb.xyz", true },
- { "xd.cm", true },
- { "xdawn.cn", true },
- { "xdeftor.com", true },
- { "xdos.io", true },
- { "xdown.org", true },
- { "xdtag.com", true },
- { "xdty.org", true },
- { "xecure.zone", true },
- { "xecureit.com", true },
- { "xeedbeam.me", true },
- { "xeerpa.com", true },
- { "xega.org", true },
- { "xehost.com", true },
- { "xeiropraktiki.gr", true },
- { "xelesante.jp", true },
- { "xemcloud.net", true },
- { "xendo.net", true },
- { "xenical.tk", true },
- { "xenomedia.nl", true },
- { "xenon.cloud", true },
- { "xenoncloud.net", true },
- { "xenophile.name", true },
- { "xenoworld.de", true },
- { "xentho.net", true },
- { "xentox.com", true },
- { "xerbo.net", false },
- { "xerdeso.tk", true },
- { "xerezdeportivo.tk", true },
- { "xerhost.de", false },
- { "xerkus.pro", true },
- { "xerownia.eu", true },
- { "xeryus.nl", true },
- { "xetown.com", true },
- { "xfce.space", true },
- { "xfcy.me", true },
- { "xfd3.de", true },
- { "xferion.com", false },
- { "xfive.de", true },
- { "xfix.pw", true },
- { "xfrag-networks.com", true },
- { "xfzhao.com", true },
- { "xgadget.de", true },
- { "xgame.com.tr", true },
- { "xgclan.com", true },
- { "xgn.es", true },
- { "xgwap.com", true },
- { "xgzepto.cn", true },
- { "xh7ooo.com", true },
- { "xh7ppp.com", true },
- { "xh7qqq.com", true },
- { "xh7rrr.com", true },
- { "xh7sss.com", true },
- { "xh7ttt.com", true },
- { "xh7uuu.com", true },
- { "xh7www.com", true },
- { "xh7xxx.com", true },
- { "xh7zzz.com", true },
- { "xhmikosr.io", true },
- { "xho.me", true },
- { "xia.de", true },
- { "xiamenshipbuilding.com", true },
- { "xiamuzi.com", true },
- { "xiangblog.com", true },
- { "xiangweiqing.co.uk", true },
- { "xiangwenquan.me", true },
- { "xiaocg.xyz", true },
- { "xiaojiyoupin.com", true },
- { "xiaololi.best", true },
- { "xiaolong.link", true },
- { "xiaomi.eu", true },
- { "xiaoneijun.cn", true },
- { "xiaoneimao.cn", true },
- { "xiaoxia.li", true },
- { "xiaoyu.net", true },
- { "xiashali.me", true },
- { "xicreative.net", true },
- { "xie38.com", true },
- { "xie91.com", true },
- { "xier.ch", true },
- { "xif.at", true },
- { "xifrem.com", true },
- { "xight.org", true },
- { "xignsys.com", true },
- { "xilef.org", true },
- { "xilo.net", true },
- { "ximble.com", true },
- { "ximbo.net", false },
- { "ximes.com", true },
- { "xin-in.com", true },
- { "xin-in.net", true },
- { "xinetwork.net", false },
- { "xing-in.net", true },
- { "xingganfuli.com", true },
- { "xinnermedia.nl", true },
- { "xinnixdeuren-shop.be", true },
- { "xinsane.com", true },
- { "xinsto.com", true },
- { "xinu.xyz", true },
- { "xinuspeed.com", true },
- { "xinuspeedtest.com", true },
- { "xinuurl.com", true },
- { "xinxin.pl", true },
- { "xinyitour.tw", true },
- { "xiphwork.de", true },
- { "xiumu.org", true },
- { "xiyu.it", false },
- { "xjd.vision", true },
- { "xjf6.com", true },
- { "xjjeeps.com", true },
- { "xjpvictor.info", true },
- { "xkcd.pw", true },
- { "xkviz.net", true },
- { "xkwy2018.cn", true },
- { "xlan.be", true },
- { "xlange.com", true },
- { "xlink.com.pl", true },
- { "xloud.cf", true },
- { "xluxes.jp", true },
- { "xm.digital", true },
- { "xmag.pl", true },
- { "xmedius.ca", true },
- { "xmedius.com", true },
- { "xmedius.eu", true },
- { "xmenrevolution.com", true },
- { "xmgspace.me", true },
- { "xmlbeam.org", true },
- { "xmpp.dk", true },
- { "xmr.to", true },
- { "xmv.cz", true },
- { "xmyy.com", true },
- { "xn-----6kcbjcgl1atjj7aadbkxfxfe7a9yia.xn--p1ai", true },
- { "xn-----7kcbhdpr0asllefq0bjk.com", true },
- { "xn----7sbabrwauchevq0ba.xn--p1ai", true },
- { "xn----7sbarcdvrtr1be.org", true },
- { "xn----7sbbgbr0arxb4a4exa.com.ua", true },
- { "xn----7sbbq5b0a1c.com", true },
- { "xn----8hcdn2ankm1bfq.com", true },
- { "xn----9sbkdigdao0de1a8g.com", true },
- { "xn----ncfb.ws", true },
- { "xn---35-6cdk1dnenygj.xn--p1ai", true },
- { "xn--0iv967ab7w.xn--rhqv96g", true },
- { "xn--0kq33cz5c8wmwrqqw1d.com", true },
- { "xn--12c3bpr6bsv7c.com", true },
- { "xn--12cg9bnm5ci2ag9hbcs17a.com", true },
- { "xn--13-6kc0bufl.xn--p1ai", true },
- { "xn--158h.ml", false },
- { "xn--2sxs9ol7o.com", true },
- { "xn--3st814ec8r.cn", true },
- { "xn--3stv82k.hk", true },
- { "xn--3stv82k.tw", true },
- { "xn--48jwg508p.net", true },
- { "xn--4pv80kkz8auzf.jp", true },
- { "xn--57h.ml", false },
- { "xn--5dbkjqb0d.com", true },
- { "xn--5dbkjqb0d.net", true },
- { "xn--6o8h.cf", true },
- { "xn--6x6a.life", true },
- { "xn--79q87uvkclvgd56ahq5a.net", true },
- { "xn--7ca.co", true },
- { "xn--7or43h.jp", true },
- { "xn--7xa.google.com", true },
- { "xn--80a8aqs.biz.ua", true },
- { "xn--80aafaxhj3c.xn--p1ai", true },
- { "xn--80abwhtbgbedcy6h.com", true },
- { "xn--80acghh.xn--p1ai", true },
- { "xn--80adbevek3air0ee9b8d.com", true },
- { "xn--80adbvdjzhptl1be6j.com", true },
- { "xn--80aebbkaqx6at.xn--p1ai", true },
- { "xn--80aejljbfwxn.xn--p1ai", true },
- { "xn--80ageukloel.xn--p1ai", true },
- { "xn--80ahclcaoccacrhfebi0dcn5c1jh.xn--p1ai", true },
- { "xn--80aihgal0apt.xn--p1ai", true },
- { "xn--80akjfhoqm2h2a.xn--p1ai", true },
- { "xn--80ancacgircb8q.xn--p1ai", true },
- { "xn--80azelb.xn--p1ai", true },
- { "xn--8bi.gq", false },
- { "xn--90accgba6bldkcbb7a.xn--p1acf", true },
- { "xn--90acjfgylpnm.xn--90ais", true },
- { "xn--90aij9af3f.com.ua", true },
- { "xn--95q32l0t6b9cb17l.cn", true },
- { "xn--9xa.fun", true },
- { "xn--agncia-4ua.cat", true },
- { "xn--allgu-biker-o8a.de", true },
- { "xn--anyd-7na.at", true },
- { "xn--aviao-dra1a.pt", true },
- { "xn--b3c4f.xn--o3cw4h", true },
- { "xn--babassul-t4a.de", true },
- { "xn--bachblten-tee-1ob.de", true },
- { "xn--baron-bonzenbru-elb.com", true },
- { "xn--bcher-bestseller-jzb.com", true },
- { "xn--bcherbestseller-zvb.com", true },
- { "xn--bckerei-wohlgemuth-ltb.de", true },
- { "xn--ben-bank-8za.dk", true },
- { "xn--benbank-dxa.dk", true },
- { "xn--bersetzung-8db.cc", true },
- { "xn--berwachungspaket-izb.at", true },
- { "xn--birkenblttertee-7kb.de", true },
- { "xn--brneruhr-0za.ch", true },
- { "xn--brombeerblttertee-zqb.de", true },
- { "xn--bucheckernl-0fb.de", true },
- { "xn--c1adqibibm8i.com", true },
- { "xn--cck4ax91r.com", true },
- { "xn--cck7f515h.com", true },
- { "xn--cckdrt0kwb4g3cnh.com", true },
- { "xn--cctsgy36bnvprwpekc.com", true },
- { "xn--cfa.site", true },
- { "xn--chrysanthemenbltentee-nic.de", true },
- { "xn--cisowcy-pjb5t.pl", true },
- { "xn--detrkl13b9sbv53j.com", true },
- { "xn--detrkl13b9sbv53j.org", true },
- { "xn--dmonenjger-q5ag.net", true },
- { "xn--dragni-g1a.de", true },
- { "xn--dtursfest-72a.dk", true },
- { "xn--durhre-yxa.de", true },
- { "xn--dviz-5qa.com", true },
- { "xn--e1aaavheew.xn--p1ai", true },
- { "xn--e1aaavheewr.xn--p1ai", true },
- { "xn--e1adlfhcdo7h.xn--p1ai", true },
- { "xn--eebao6b.com", true },
- { "xn--eebao6b.net", true },
- { "xn--ehqw04eq6e.jp", true },
- { "xn--erban-e9b.ro", true },
- { "xn--erklderbarenben-slbh.dk", true },
- { "xn--et8h.cf", false },
- { "xn--ex-1b4auld4fn3u3ck2069g.com", true },
- { "xn--f9jh4f4b4993b66s.tokyo", true },
- { "xn--familie-pppinghaus-l3b.de", true },
- { "xn--feuerlscher-arten-4zb.de", true },
- { "xn--fiqwix98h.jp", true },
- { "xn--fischereiverein-mnsterhausen-i7c.de", true },
- { "xn--frankierknig-djb.de", true },
- { "xn--fs5ak3f.com", true },
- { "xn--gfrr-7qa.li", true },
- { "xn--gfrrli-yxa.ch", true },
- { "xn--ggle-qoaa.com", true },
- { "xn--grnderlehrstuhl-0vb.de", true },
- { "xn--gstehaus-leipzig-vnb.de", true },
- { "xn--heidebltentee-2ob.de", true },
- { "xn--heilendehnde-ocb.de", true },
- { "xn--hgbk4a00a.com", true },
- { "xn--hibiskusbltentee-szb.de", true },
- { "xn--hllrigl-90a.at", true },
- { "xn--i2ru8q2qg.com", true },
- { "xn--ikketenkpdet-1cb.no", true },
- { "xn--imker-in-nrnberg-szb.de", true },
- { "xn--ionunica-29c.ro", true },
- { "xn--irr.xn--fiqs8s", true },
- { "xn--is8h6d.gq", false },
- { "xn--j8se.com", true },
- { "xn--jda.tk", true },
- { "xn--jp8hx8f.ws", true },
- { "xn--kda.tk", true },
- { "xn--kkcon-fwab.nz", true },
- { "xn--kl-oja.is", true },
- { "xn--klmek-0sa.com", true },
- { "xn--krpto-lva.de", true },
- { "xn--ktha-kamrater-pfba.se", true },
- { "xn--l8js6h476m.xn--q9jyb4c", true },
- { "xn--labanskllermark-ftb.se", true },
- { "xn--lavendelblten-tee-c3b.de", true },
- { "xn--lckwg.net", true },
- { "xn--lnakuten-9za.com", true },
- { "xn--love-un4c7e0d4a.com", true },
- { "xn--lsaupp-iua.se", true },
- { "xn--lskieradio-3gb44h.pl", true },
- { "xn--lt9h.cf", true },
- { "xn--lti-3qa.lv", true },
- { "xn--manuela-stsser-psb.de", true },
- { "xn--maracujal-77a.de", true },
- { "xn--martnvillalba-zib.com", true },
- { "xn--martnvillalba-zib.net", true },
- { "xn--mein-kchenhelfer-ozb.de", true },
- { "xn--mentaltraining-fr-musiker-uwc.ch", true },
- { "xn--mgbbh2a9fub.xn--ngbc5azd", false },
- { "xn--mgbmmp7eub.com", true },
- { "xn--mgbpkc7fz3awhe.com", true },
- { "xn--mgbuq0c.net", true },
- { "xn--mgi-qla.life", true },
- { "xn--mntsamling-0cb.dk", true },
- { "xn--myrepubic-wub.net", true },
- { "xn--myrepublc-x5a.net", true },
- { "xn--n8j7dygrbu0c31a5861bq8qb.com", true },
- { "xn--n8jp5083dnzs.net", true },
- { "xn--n8jtcugp92n4wc738f.net", true },
- { "xn--nidar-tib.org", true },
- { "xn--nide-loa.ee", true },
- { "xn--oiqt18e8e2a.eu.org", true },
- { "xn--p8j9a0d9c9a.xn--q9jyb4c", true },
- { "xn--pascal-klsch-cjb.de", true },
- { "xn--pbt947am3ab71g.com", true },
- { "xn--pckm3a1bi21a.com", true },
- { "xn--pe-bka.ee", true },
- { "xn--pn1am9c.com", true },
- { "xn--pq1a637b.xn--6qq986b3xl", true },
- { "xn--prfontaine-c7a.name", true },
- { "xn--prt783d.xn--6qq986b3xl", true },
- { "xn--q9jb1h5dvcspke3218b9mn4p0c.com", true },
- { "xn--r8jzaf7977b09e.com", true },
- { "xn--rb-fka.it", true },
- { "xn--rdiger-kuhlmann-zvb.de", true },
- { "xn--reisebro-herrsching-bbc.de", true },
- { "xn--ritmller-95a.de", true },
- { "xn--rlcus7b3d.xn--xkc2dl3a5ee0h", true },
- { "xn--roselire-60a.ch", false },
- { "xn--roselire-60a.com", false },
- { "xn--rosenbltentee-2ob.de", true },
- { "xn--rt-cja.eu", true },
- { "xn--rt-cja.ie", true },
- { "xn--rtter-kva.eu", true },
- { "xn--ruanmller-u9a.com", true },
- { "xn--s-0fa.fi", true },
- { "xn--s-1gaa.fi", true },
- { "xn--schcke-yxa.de", true },
- { "xn--schpski-c1a.de", true },
- { "xn--schsischer-christstollen-qbc.shop", true },
- { "xn--schwarzkmmeloel-6vb.de", true },
- { "xn--solidaritt-am-ort-yqb.de", true },
- { "xn--strandhaus-hinter-der-dne-1wc.de", true },
- { "xn--sz8h.ml", true },
- { "xn--t-oha.lv", true },
- { "xn--t8j4aa4nzg3a5euoxcwee.xyz", true },
- { "xn--t8jo9k1b.com", true },
- { "xn--tagungssttte-usedom-owb.de", true },
- { "xn--tagungssttte-zinnowitz-84b.de", true },
- { "xn--tigreray-i1a.org", true },
- { "xn--u8jvc1drbz972aywbk0by95ffo1aqm1c.com", true },
- { "xn--u8jwd.ga", true },
- { "xn--u9j0ia6hb7347cg8wavz0avb0e.com", true },
- { "xn--u9j920h4sbt5ex10f.online", true },
- { "xn--u9jv84l7ea468b.com", true },
- { "xn--uasacrilicas-9gb.net", true },
- { "xn--uist1idrju3i.jp", true },
- { "xn--uisz44m.online", true },
- { "xn--ukasik-2db.pl", true },
- { "xn--underux-0za.eu", true },
- { "xn--v-wfa35g.ro", true },
- { "xn--wby9t.xyz", false },
- { "xn--weidenrschen-tee-swb.de", true },
- { "xn--wq9h.ml", false },
- { "xn--z1tq4ldt4b.com", true },
- { "xn--zettlmeil-n1a.de", true },
- { "xn--zsr042b.fun", true },
- { "xn5.de", true },
- { "xnaas.info", true },
- { "xnativi.pl", true },
- { "xnet-x.net", true },
- { "xninja.xyz", true },
- { "xnode.org", true },
- { "xntrik.wtf", true },
- { "xnu.kr", true },
- { "xo.tc", true },
- { "xoan.cf", true },
- { "xoh.at", true },
- { "xolotto.com", true },
- { "xolphin.nl", true },
- { "xombitgames.com", true },
- { "xombitmusic.com", true },
- { "xone.cz", false },
- { "xonn.de", true },
- { "xoommit.com", true },
- { "xor.cat", true },
- { "xormatic.com", true },
- { "xotictrends.com", true },
- { "xp-ochrona.pl", true },
- { "xp.nsupdate.info", true },
- { "xp2.de", true },
- { "xpa.be", true },
- { "xpbytes.com", true },
- { "xpd.se", true },
- { "xperidia.com", true },
- { "xpertcube.com", true },
- { "xpj000444.com", true },
- { "xpj000555.com", true },
- { "xpj000666.com", true },
- { "xpj090.com", true },
- { "xpj100.com", true },
- { "xpj567088.com", false },
- { "xpj567388.com", false },
- { "xpj678678.com", true },
- { "xpj90.com", true },
- { "xpj909.me", true },
- { "xpjbeting.com", true },
- { "xpjcs.com", true },
- { "xpjiosapp.com", true },
- { "xpletus.nl", true },
- { "xpoc.pro", true },
- { "xpods.sg", true },
- { "xpornoizle.net", true },
- { "xqk7.com", true },
- { "xr.cx", true },
- { "xr1s.me", true },
- { "xrg.cz", true },
- { "xrockx.de", true },
- { "xrp.pp.ua", true },
- { "xrptoolkit.com", true },
- { "xrwracing-france.com", true },
- { "xs00228.com", false },
- { "xs2a.no", true },
- { "xsapp.co", true },
- { "xsec.me", true },
- { "xserownia.com.pl", true },
- { "xserownia.eu", true },
- { "xserownia.net", true },
- { "xserownia.pl", true },
- { "xslim.com.br", true },
- { "xss.sk", true },
- { "xssi.uk", true },
- { "xsteam.eu", true },
- { "xsuper.net", true },
- { "xtaboo3d.com", true },
- { "xtarget.ru", true },
- { "xtom.africa", true },
- { "xtom.al", true },
- { "xtom.amsterdam", true },
- { "xtom.ax", true },
- { "xtom.be", true },
- { "xtom.bg", true },
- { "xtom.by", true },
- { "xtom.ch", true },
- { "xtom.co.uk", true },
- { "xtom.com", true },
- { "xtom.com.de", true },
- { "xtom.com.ee", true },
- { "xtom.com.hk", true },
- { "xtom.cz", true },
- { "xtom.de", true },
- { "xtom.ee", true },
- { "xtom.es", true },
- { "xtom.eu", true },
- { "xtom.fi", true },
- { "xtom.fo", true },
- { "xtom.fr", true },
- { "xtom.ge", true },
- { "xtom.gmbh", true },
- { "xtom.gr", true },
- { "xtom.hr", true },
- { "xtom.hu", true },
- { "xtom.im", true },
- { "xtom.is", true },
- { "xtom.it", true },
- { "xtom.je", true },
- { "xtom.li", true },
- { "xtom.limited", true },
- { "xtom.london", true },
- { "xtom.lt", true },
- { "xtom.ltd", true },
- { "xtom.lu", true },
- { "xtom.lv", true },
- { "xtom.md", true },
- { "xtom.me", true },
- { "xtom.mk", true },
- { "xtom.moscow", true },
- { "xtom.nl", true },
- { "xtom.no", true },
- { "xtom.nu", true },
- { "xtom.paris", true },
- { "xtom.pl", true },
- { "xtom.ro", true },
- { "xtom.ru", true },
- { "xtom.si", true },
- { "xtom.sk", true },
- { "xtom.su", true },
- { "xtom.support", true },
- { "xtom.uk", true },
- { "xtrainsights.com", true },
- { "xtravans.com", true },
- { "xtremebouncepartyhire.com.au", true },
- { "xtremecoatingtechnologies.com", true },
- { "xtrememidlife.nl", true },
- { "xtronics.com", true },
- { "xts3636.net", true },
- { "xtu2.com", true },
- { "xuab.net", true },
- { "xuan-li88.com", true },
- { "xuan-li88.net", true },
- { "xubo666.com", true },
- { "xuc.me", true },
- { "xucha.ml", true },
- { "xueanquan.com", true },
- { "xuedianshang.com", true },
- { "xuehao.net.cn", true },
- { "xuehao.tech", true },
- { "xujan.com", true },
- { "xuming.studio", true },
- { "xunn.io", true },
- { "xuntier.ch", true },
- { "xuonggiaynu.vn", true },
- { "xurl.gq", true },
- { "xuwei.de", true },
- { "xvii.pl", true },
- { "xviimusic.com", true },
- { "xwaretech.info", true },
- { "xwf.fyi", true },
- { "xx0r.eu", true },
- { "xxffo.com", true },
- { "xxiz.com", true },
- { "xxxbunker.com", true },
- { "xxxladyboysporn.com", true },
- { "xxxoopz.com", true },
- { "xxxred.net", true },
- { "xxxsuper.net", true },
- { "xy6161.com", true },
- { "xy6262.com", true },
- { "xy6363.com", true },
- { "xy7171.com", true },
- { "xy7272.com", true },
- { "xy7373.com", true },
- { "xybabyshop.com", true },
- { "xyenon.bid", true },
- { "xyfun.net", false },
- { "xyj22.com", true },
- { "xylerfox.ca", true },
- { "xyloefarmoges.gr", true },
- { "xywing.com", true },
- { "xyz.blue", true },
- { "xyzulu.hosting", true },
- { "xyzyz.xyz", true },
- { "xyzzyyyz.com", true },
- { "xzclip.cn", true },
- { "xzibits.com", true },
- { "xzy.es", false },
- { "y11n.net", true },
- { "y2g.me", true },
- { "y3650.com", true },
- { "y36500.com", true },
- { "y3651.com", true },
- { "y36511.com", true },
- { "y3653.com", true },
- { "y36533.com", true },
- { "y3654.com", true },
- { "y3656.com", true },
- { "y36577.com", true },
- { "y36594.com", true },
- { "y68aa.com", true },
- { "y68cc.com", true },
- { "y68dd.com", true },
- { "y68ee.com", true },
- { "y68ff.com", true },
- { "y68gg.com", true },
- { "y68hh.com", true },
- { "y68ii.com", true },
- { "y68jj.com", true },
- { "y68ll.com", true },
- { "y68oo.com", true },
- { "y68pp.com", true },
- { "y68qq.com", true },
- { "y68rr.com", true },
- { "y68tt.com", true },
- { "y68uu.com", true },
- { "y68yy.com", true },
- { "y68zz.com", true },
- { "y70101.com", false },
- { "y70102.com", false },
- { "y70103.com", false },
- { "y70104.com", false },
- { "y70105.com", false },
- { "y70301.com", false },
- { "y70302.com", false },
- { "y70303.com", false },
- { "y888.ag", true },
- { "y890000.com", true },
- { "y891111.com", true },
- { "y893333.com", true },
- { "y894444.com", true },
- { "y896666.com", true },
- { "y897777.com", true },
- { "y89b.com", true },
- { "y89c.com", true },
- { "y89ccc.com", true },
- { "y89dd.com", true },
- { "y89e.com", true },
- { "y89ee.com", true },
- { "y89fff.com", true },
- { "y89g.com", true },
- { "y89hhh.com", true },
- { "y89i.net", true },
- { "y89iii.com", true },
- { "y89j.com", true },
- { "y89j.net", true },
- { "y89jj.com", true },
- { "y89l.com", true },
- { "y89m.com", true },
- { "y89s.com", true },
- { "y89v.com", true },
- { "y89zz.com", true },
- { "ya.mk", true },
- { "yabuisha.jp", true },
- { "yachigoya.com", true },
- { "yachta.kiev.ua", true },
- { "yachtcita.com", true },
- { "yachtfolio.com", true },
- { "yachtfolio1.com", true },
- { "yachting-home.com", true },
- { "yachtlettering.com", true },
- { "yachtmarket.com.ua", true },
- { "yacineboumaza.fr", true },
- { "yacobo.com", true },
- { "yafuoku.ru", true },
- { "yageys.com", true },
- { "yagmursoft.tk", true },
- { "yagoda-malina.tk", true },
- { "yahan.tv", true },
- { "yaharu.ru", true },
- { "yahvehyireh.com", true },
- { "yak-soap.co", true },
- { "yak.is", true },
- { "yakmade.com", true },
- { "yakmail.tech", true },
- { "yakmoo.se", true },
- { "yalacoins.com", true },
- { "yalcinkaya.ninja", false },
- { "yallamotor.com", true },
- { "yalook.com", true },
- { "yama.su", true },
- { "yamadaya.tv", true },
- { "yamaken.jp", false },
- { "yamal-online.ml", true },
- { "yamashita-clinic.org", true },
- { "yame2.com", true },
- { "yamei1188.com", true },
- { "yamei2233.com", true },
- { "yamei8866.com", true },
- { "yamei98.com", true },
- { "yamei99.com", true },
- { "yamei9922.com", true },
- { "yamei9955.com", true },
- { "yamilafeinart.de", true },
- { "yamm.io", true },
- { "yana-co.ir", true },
- { "yanaduday.com", true },
- { "yanbohon.com", true },
- { "yandere.moe", true },
- { "yangfamily.tw", true },
- { "yangjingwen.cn", true },
- { "yangjingwen.com", true },
- { "yangmaodang.org", true },
- { "yangruixin.com", true },
- { "yanik.info", true },
- { "yann.tw", true },
- { "yanngraf.ch", false },
- { "yanngraf.com", false },
- { "yannic.world", false },
- { "yannick.cloud", true },
- { "yannickb.de", true },
- { "yanniclandsmann.de", true },
- { "yannik-buerkle.de", true },
- { "yannikbloscheck.com", true },
- { "yannyann.site", true },
- { "yanovich.net", true },
- { "yans.io", true },
- { "yanservices.be", true },
- { "yantox.com", true },
- { "yantrasthal.com", true },
- { "yao-in.com", true },
- { "yao-in.net", true },
- { "yao28.com", true },
- { "yap26.cc", true },
- { "yapan008.com", false },
- { "yapan1.com", false },
- { "yapan10.com", false },
- { "yapan11.com", false },
- { "yapan2.com", false },
- { "yapan22.com", false },
- { "yapan222.com", false },
- { "yapan3.com", false },
- { "yapan33.com", false },
- { "yapan333.com", false },
- { "yapan365.net", false },
- { "yapan4.com", false },
- { "yapan44.com", false },
- { "yapan444.com", false },
- { "yapan5.com", false },
- { "yapan55.com", false },
- { "yapan555.com", false },
- { "yapan6.com", false },
- { "yapan66.com", false },
- { "yapan666.com", false },
- { "yapan7.com", false },
- { "yapan77.com", false },
- { "yapan777.com", false },
- { "yapan888.com", false },
- { "yapan9.com", false },
- { "yapan99.com", false },
- { "yapan999.com", false },
- { "yapanwang.com", false },
- { "yapbreak.fr", true },
- { "yapeal.ch", true },
- { "yappy.com", true },
- { "yarcom.ru", false },
- { "yardesign.tk", true },
- { "yardley.digital", true },
- { "yarnsub.com", true },
- { "yarravilletownhouses.com.au", true },
- { "yaru.one", true },
- { "yaseminuzumcu.com", true },
- { "yashik.tv", true },
- { "yashinstore.com", true },
- { "yassine-ayari.com", true },
- { "yatai18.com", true },
- { "yatesun.com", true },
- { "yatorie.net", true },
- { "yatstudios.com", true },
- { "yatsuenpoon.com", true },
- { "yauatcha.com", true },
- { "yaup.tk", true },
- { "yavin4.cf", true },
- { "yavorivanov.com", true },
- { "yawen.me", true },
- { "yaws.cf", true },
- { "yaxim.org", true },
- { "yayl888.com", true },
- { "yayou.ag", true },
- { "ybdh88.com", true },
- { "ybin.me", true },
- { "ybresson.com", true },
- { "ybsul.com", true },
- { "ybti.net", true },
- { "ybvip789.com", true },
- { "ybzhao.com", true },
- { "ycbmdevelopment.com", true },
- { "ycbmstaging.com", true },
- { "ych.art", true },
- { "ychon.com", true },
- { "yclan.net", true },
- { "ycnrg.org", true },
- { "ycwt.com", true },
- { "ydiversa.com", true },
- { "ydraulikos.top", true },
- { "ydyy99.com", true },
- { "yeah-shop.com.ua", true },
- { "yeahwu.com", true },
- { "yeapdata.com", true },
- { "yearli.com", true },
- { "yecl.net", true },
- { "yeesker.com", true },
- { "yellowhawk.nl", true },
- { "yellowparachute.com", true },
- { "yellowtree.co.za", true },
- { "yellsy.com", true },
- { "yelon.hu", true },
- { "yelp.at", true },
- { "yelp.be", true },
- { "yelp.ca", true },
- { "yelp.ch", true },
- { "yelp.cl", true },
- { "yelp.co.jp", true },
- { "yelp.co.nz", true },
- { "yelp.co.uk", true },
- { "yelp.com", true },
- { "yelp.com.ar", true },
- { "yelp.com.au", true },
- { "yelp.com.br", true },
- { "yelp.com.hk", true },
- { "yelp.com.mx", true },
- { "yelp.com.ph", true },
- { "yelp.com.sg", true },
- { "yelp.com.tr", true },
- { "yelp.com.tw", true },
- { "yelp.cz", true },
- { "yelp.de", true },
- { "yelp.dk", true },
- { "yelp.es", true },
- { "yelp.fi", true },
- { "yelp.fr", true },
- { "yelp.ie", true },
- { "yelp.it", true },
- { "yelp.my", true },
- { "yelp.nl", true },
- { "yelp.no", true },
- { "yelp.pl", true },
- { "yelp.pt", true },
- { "yelp.se", true },
- { "yemektarifleri.com", true },
- { "yemenlink.tk", true },
- { "yeniexpo.com", true },
- { "yep-pro.ch", false },
- { "yeptechnology.store", true },
- { "yert.pink", true },
- { "yes.com", true },
- { "yes35.ru", true },
- { "yesh.lk", true },
- { "yesiammaisey.me", true },
- { "yesildiyetisyen.com", true },
- { "yesod.in", true },
- { "yesogovinpetcare.com", true },
- { "yesornut.com", true },
- { "yestees.com", true },
- { "yesteryear-chronicle.cf", true },
- { "yeswehack.com", true },
- { "yeti.gq", true },
- { "yetii.net", true },
- { "yetzt.me", false },
- { "yex.trade", true },
- { "yf128.cc", true },
- { "yfengs.moe", true },
- { "ygm.org.uk", true },
- { "ygobbs.com", true },
- { "ygrene.com", true },
- { "ygreneworks.com", true },
- { "yh12366.com", true },
- { "yh56787.com", true },
- { "yh599.cc", true },
- { "yh811.com", true },
- { "yh98768.com", true },
- { "yhanthydech.com", true },
- { "yhaupenthal.org", true },
- { "yhe.me", true },
- { "yhenke.de", true },
- { "yhfou.com", true },
- { "yhndnzj.com", true },
- { "yhrd.org", true },
- { "yibei-original.com", true },
- { "yicipick.com", true },
- { "yiff.forsale", true },
- { "yify.online", true },
- { "yigujin.cn", true },
- { "yihouse.tw", true },
- { "yijia.support", true },
- { "yikeyong.com", true },
- { "yinduyy.com", true },
- { "yinfor.com", true },
- { "ying518.vip", true },
- { "yingatech.com", true },
- { "yinglinda.love", true },
- { "yinlei.org", true },
- { "yipingguo.com", true },
- { "yiyuanzhong.com", true },
- { "yiz96.com", true },
- { "yjst.cn", true },
- { "ykn.fr", true },
- { "yksityisyydensuoja.fi", true },
- { "yl366.cc", true },
- { "yl369.cc", true },
- { "ylde.de", true },
- { "ylilauta.org", true },
- { "ylinternal.com", true },
- { "ym063.com", true },
- { "ym087.com", true },
- { "ym181.com", true },
- { "ym198.com", true },
- { "ym516.com", true },
- { "ym966.com", true },
- { "ymarion.de", true },
- { "ymatyt.com", true },
- { "ymoah.nl", true },
- { "ymtsonline.org", true },
- { "yn.org.nz", true },
- { "yoa.st", true },
- { "yoast.com", true },
- { "yoba.co.uk", true },
- { "yobai-grouprec.jp", true },
- { "yobasystems.co.uk", true },
- { "yobify.com", true },
- { "yocto.xyz", true },
- { "yodababy.com.tw", true },
- { "yoelelbaz.ch", true },
- { "yoga-alliance-teacher-training.com", true },
- { "yoga-bad-toelz.de", true },
- { "yoga-in-aying.de", true },
- { "yoga-school.xyz", true },
- { "yoga-zentrum-narayani.de", true },
- { "yogacentric.co.uk", true },
- { "yogadeux.nl", true },
- { "yogaemmental.ch", true },
- { "yogahealsinc.org", true },
- { "yogamarlene.ch", true },
- { "yogamaya9.com", true },
- { "yogamea.school", true },
- { "yogamexico.net", true },
- { "yogananda-roma.org", true },
- { "yogaprague.com", true },
- { "yogaschoolrishikesh.com", true },
- { "yogaschule-herzraum.de", true },
- { "yogshrihealing.com", true },
- { "yohanesmario.com", true },
- { "yoitoko.city", true },
- { "yoitsu.moe", true },
- { "yokoda.okinawa", true },
- { "yokohama-legaloffice.jp", true },
- { "yolandgao.me", true },
- { "yolo.jetzt", true },
- { "yolobert.de", true },
- { "yoloboatrentals.com", true },
- { "yolocamgirls.com", true },
- { "yolops.net", true },
- { "yoloyolo.top", true },
- { "yombo.net", true },
- { "yomi.moe", true },
- { "yon.co.il", true },
- { "yongbin.org", true },
- { "yoogirls.com", true },
- { "yoonas.com", true },
- { "yooooex.com", true },
- { "yooptopian.com", true },
- { "yoppoy.com", true },
- { "yoramvandevelde.net", true },
- { "yorcom.nl", false },
- { "yorcool.nl", true },
- { "yordanisp.tk", true },
- { "yorkieloverdiy.com", true },
- { "yorkshiredalesinflatables.co.uk", true },
- { "yorkshiregardensheds.co.uk", true },
- { "yorkshireinflatables.co.uk", true },
- { "yornik.nl", true },
- { "yosakoinight.com", true },
- { "yosbeda.com", true },
- { "yoshibaworks.com", true },
- { "yoshitsugu.net", true },
- { "yosida-dental.com", true },
- { "yosida95.com", true },
- { "yospos.org", true },
- { "yotta-zetta.com", true },
- { "yotubaiotona.net", true },
- { "you.com.br", true },
- { "you2you.fr", true },
- { "youber.cz", true },
- { "youc.ir", true },
- { "youcanmakeit.at", true },
- { "youdamom.com", true },
- { "youdungoofd.com", true },
- { "yougee.ml", true },
- { "youhavewords.com", true },
- { "youhua.ru", true },
- { "youkaryote.com", true },
- { "youkaryote.org", true },
- { "youked.com", true },
- { "youmonit.me", true },
- { "youms.de", true },
- { "youneedfame.com", true },
- { "young-brahmousin.com", true },
- { "young-sheldon.com", true },
- { "youngauthentic.cf", true },
- { "youngdogs.org", true },
- { "youngfree.cn", true },
- { "youngmodelsagency.tk", true },
- { "youngsook.com", true },
- { "youngsook.org", true },
- { "youngvoicesmatter.org", true },
- { "youpark.no", true },
- { "youpickfarms.org", true },
- { "your-erotic-stories.com", true },
- { "your-forum.tk", true },
- { "your-out.com", true },
- { "youracnepro.com", true },
- { "youran.me", false },
- { "yourantiquarian.com", false },
- { "yourazbraces.com", true },
- { "yourbetterkitchen.com", true },
- { "yourbittorrent.host", true },
- { "yourbittorrent.icu", true },
- { "yourbittorrent.pw", true },
- { "yourbittorrent2.com", true },
- { "yourbodyknows.dk", true },
- { "yourbodyknows.is", true },
- { "yourbusinesscommunity.co.uk", true },
- { "yourcareerhost.com", true },
- { "yourciso.com", true },
- { "yourcleaningcompany.net", true },
- { "yourcopywriter.it", true },
- { "yourdailyalerts.net", true },
- { "youreallyneedthis.co", true },
- { "youregeeks.com", true },
- { "yourforex.org", true },
- { "yourfriendlytech.com", true },
- { "yourfuntrivia.com", true },
- { "yourfuturestrategy.com.au", true },
- { "yourgames.tv", true },
- { "yourikeakitcheninstaller.com", true },
- { "yourkrabivilla.com", true },
- { "yourlanguages.de", true },
- { "yourloan.gq", true },
- { "yourmagicstory.tk", true },
- { "yourname.xyz", true },
- { "yourneighborhub.com", true },
- { "youronly.one", true },
- { "yourpalmbeachcountyrealtor.com", true },
- { "yourpersonalfrance.com", true },
- { "yourpocketbook.uk", true },
- { "yourscotlandtour.co.uk", true },
- { "yourskin.nl", true },
- { "yourstake.org", true },
- { "yourticketbooking.com", true },
- { "yourtime.tv", true },
- { "yousei.ne.jp", true },
- { "youth.gov", true },
- { "youthink.jp", true },
- { "youthrules.gov", true },
- { "youtous.me", true },
- { "youtube.com", true },
- { "youtubedownloader.com", true },
- { "youtubekids.com", true },
- { "youtuberis.lt", true },
- { "youwatchporn.com", true },
- { "youyoulemon.com", true },
- { "yovko.net", true },
- { "yoxall.me.uk", true },
- { "yoyoost.duckdns.org", true },
- { "yoyoost.ga", true },
- { "ypart.eu", true },
- { "ypfr.fr", true },
- { "ypid.de", true },
- { "yplanapp.com", true },
- { "yporti.net", true },
- { "ypse.com.br", true },
- { "yqjf68.com", true },
- { "yr166166.com", true },
- { "yr8.com", true },
- { "yrx.me", true },
- { "ys633.cc", true },
- { "ys6888.cc", true },
- { "ysicorp.com", true },
- { "yslbeauty.com", true },
- { "ystream.tv", true },
- { "yt220.com", true },
- { "yt605.com", true },
- { "yt606.com", true },
- { "yt629.com", true },
- { "yt653.com", true },
- { "yt675.com", true },
- { "yt818.com", true },
- { "yt835.com", true },
- { "yt839.com", true },
- { "yt881.com", true },
- { "yt892.com", true },
- { "yt962.com", true },
- { "yt972.com", true },
- { "ytcount.com", true },
- { "ytec.ca", true },
- { "ytreza.fr", true },
- { "ytsdownload.com", true },
- { "ytx588.com", true },
- { "yu-mug.jp", true },
- { "yuan.ga", false },
- { "yuanben.io", true },
- { "yuanjiazhao.com", true },
- { "yubi.co", true },
- { "yubicloud.io", true },
- { "yubico.ae", true },
- { "yubico.at", true },
- { "yubico.be", true },
- { "yubico.biz", true },
- { "yubico.cloud", true },
- { "yubico.co.in", true },
- { "yubico.co.kr", true },
- { "yubico.co.uk", true },
- { "yubico.com", true },
- { "yubico.com.ar", true },
- { "yubico.cz", true },
- { "yubico.dk", true },
- { "yubico.es", true },
- { "yubico.fi", true },
- { "yubico.in", true },
- { "yubico.info", true },
- { "yubico.io", true },
- { "yubico.mobi", true },
- { "yubico.mx", true },
- { "yubico.net", true },
- { "yubico.online", true },
- { "yubico.org", true },
- { "yubico.pe", true },
- { "yubico.se", true },
- { "yubico.sg", true },
- { "yubico.tv", true },
- { "yubico.uk", true },
- { "yubico.us", true },
- { "yubicodemo.com", true },
- { "yubikey.ae", true },
- { "yubikey.asia", true },
- { "yubikey.at", true },
- { "yubikey.cl", true },
- { "yubikey.co", true },
- { "yubikey.co.uk", true },
- { "yubikey.com", true },
- { "yubikey.com.ar", true },
- { "yubikey.com.au", true },
- { "yubikey.dk", true },
- { "yubikey.fi", true },
- { "yubikey.io", true },
- { "yubikey.mx", true },
- { "yubikey.org", true },
- { "yubikey.pe", true },
- { "yubikey.se", true },
- { "yubikey.sg", true },
- { "yubikey.uk", true },
- { "yubikey.us", true },
- { "yubikeys.net", true },
- { "yubikeys.org", true },
- { "yubikeyservices.eu", true },
- { "yubiking.com", true },
- { "yue.la", true },
- { "yugami-lab.com", true },
- { "yugasun.com", true },
- { "yugodi.com", true },
- { "yuhangq.me", true },
- { "yuhindo.com", true },
- { "yuimarukitchen.com", true },
- { "yuisyo.ml", true },
- { "yukari.cafe", true },
- { "yuki-nagato.com", true },
- { "yuki.xyz", true },
- { "yukimochi.com", true },
- { "yukimochi.io", true },
- { "yukimochi.jp", true },
- { "yukimochi.net", true },
- { "yukonconnector.com", true },
- { "yukonlip.com", true },
- { "yukontec.com", true },
- { "yukoslibrary.ga", true },
- { "yukozimo.com", true },
- { "yule.hk", true },
- { "yuleyule88game.com", true },
- { "yulliaschool.co.il", true },
- { "yulsn.com", true },
- { "yumeconcert.com", true },
- { "yumepolo.com", true },
- { "yumiandryan.com", true },
- { "yuncaioo.com", true },
- { "yunhu365.com", true },
- { "yunity.org", true },
- { "yunloc.com", true },
- { "yunzhu.li", false },
- { "yura.cf", true },
- { "yuricarlenzoli.it", true },
- { "yurikirin.me", true },
- { "yurisviridov.com", true },
- { "yusa.me", true },
- { "yusu.org", true },
- { "yusukesakai.com", true },
- { "yutakato.net", true },
- { "yuuki0xff.jp", true },
- { "yuuta.moe", true },
- { "yuvaindia.co.in", true },
- { "yuvibrands.com", true },
- { "yuwei.org", true },
- { "yuweiji.com", true },
- { "yuxiangyuan.com", true },
- { "yuxuan.org", true },
- { "yuyantang.club", true },
- { "yuyiyang.eu.org", true },
- { "yuyo.com", true },
- { "yuzu-tee.de", true },
- { "yuzulia.com", true },
- { "yuzurisa.com", true },
- { "yvb.moe", true },
- { "yvesx.com", true },
- { "yvonnehaeusser.de", true },
- { "yvonnethomet.ch", true },
- { "yvonnewilhelmi.com", true },
- { "ywyz.tech", true },
- { "yxbet43.com", true },
- { "yxt521.com", true },
- { "yxzero.xyz", true },
- { "yy6.ag", true },
- { "yy8.ag", true },
- { "yyc.city", true },
- { "yycbike.info", true },
- { "yyr.im", true },
- { "yyyy.xyz", true },
- { "yz86.cc", true },
- { "yzal.io", true },
- { "yzarul.com", true },
- { "yzh8.cc", true },
- { "yzh8.net", true },
- { "yzh8.vip", true },
- { "yzimroni.net", true },
- { "z-cert.nl", true },
- { "z-latko.info", true },
- { "z-vector.com", true },
- { "z.ai", true },
- { "z.tl", true },
- { "z1.ag", true },
- { "z10.ag", true },
- { "z1h.de", true },
- { "z2.ag", true },
- { "z30365.com", true },
- { "z36533.com", true },
- { "z36594.com", true },
- { "z3u5.net", true },
- { "z4-forum.com", true },
- { "z4.ag", true },
- { "z5.ag", true },
- { "z6.ag", true },
- { "z6.com", true },
- { "z6121.com", true },
- { "z6151.com", true },
- { "z6181.com", true },
- { "z6182.com", true },
- { "z6192.com", true },
- { "z6218.com", true },
- { "z6252.com", true },
- { "z6278.com", true },
- { "z6281.com", true },
- { "z6285.com", true },
- { "z6289.com", true },
- { "z6323.com", true },
- { "z6325.com", true },
- { "z6353.com", true },
- { "z6359.com", true },
- { "z6371.com", true },
- { "z6372.com", true },
- { "z6373.com", true },
- { "z6375.com", true },
- { "z6381.com", true },
- { "z6382.com", true },
- { "z6385.com", true },
- { "z6398.com", true },
- { "z6512.com", true },
- { "z6519.com", true },
- { "z6523.com", true },
- { "z6527.com", true },
- { "z6529.com", true },
- { "z6537.com", true },
- { "z6539.com", true },
- { "z6571.com", true },
- { "z6573.com", true },
- { "z6579.com", true },
- { "z6581.com", true },
- { "z6587.com", true },
- { "z6591.com", true },
- { "z6592.com", true },
- { "z66.ag", true },
- { "z6616.com", true },
- { "z666.ag", true },
- { "z6727.com", true },
- { "z6751.com", true },
- { "z6753.com", true },
- { "z6757.com", true },
- { "z6758.com", true },
- { "z6759.com", true },
- { "z6791.com", true },
- { "z6798.com", true },
- { "z6812.com", true },
- { "z6813.com", true },
- { "z6817.com", true },
- { "z6823.com", true },
- { "z6827.com", true },
- { "z6829.com", true },
- { "z6837.com", true },
- { "z6851.com", true },
- { "z6852.com", true },
- { "z6853.com", true },
- { "z6857.com", true },
- { "z6871.com", true },
- { "z6873.com", true },
- { "z6881.com", true },
- { "z6882.com", true },
- { "z6883.com", true },
- { "z6891.com", true },
- { "z6893.com", true },
- { "z6895.com", true },
- { "z6897.com", true },
- { "z6912.com", true },
- { "z6925.com", true },
- { "z6wang.com", true },
- { "z7.ag", true },
- { "z8.ag", true },
- { "z8017.com", true },
- { "z8023.com", true },
- { "z8078.com", true },
- { "z8106.com", true },
- { "z8109.com", true },
- { "z8132.com", true },
- { "z8168.com", true },
- { "z8171.com", true },
- { "z88.ag", true },
- { "z8857.com", true },
- { "z8861.com", true },
- { "z8862.com", true },
- { "z8870.com", true },
- { "z8871.com", true },
- { "z8872.com", true },
- { "z888.ag", true },
- { "z8907.com", true },
- { "z8908.com", true },
- { "z8909.com", true },
- { "z8917.com", true },
- { "z9.ag", true },
- { "z99944x.xyz", true },
- { "za.search.yahoo.com", false },
- { "za12bxc3.com", true },
- { "zaagbaak.nl", true },
- { "zabbix.tips", true },
- { "zabszk.net", true },
- { "zabukovnik.net", true },
- { "zacarias.com.ar", true },
- { "zacchaeus.co.uk", true },
- { "zach.codes", true },
- { "zacharopoulos.eu", true },
- { "zacharopoulos.org", false },
- { "zacharydubois.me", true },
- { "zacharyschneider.ca", true },
- { "zacharyschneider.com", true },
- { "zacharyseguin.ca", true },
- { "zachaysan.com", true },
- { "zachborboa.com", true },
- { "zachgibbens.org", true },
- { "zachschneider.ca", true },
- { "zackiarfan.ml", true },
- { "zaclys.com", false },
- { "zadrot.tk", true },
- { "zadroweb.com", true },
- { "zaffke.co", true },
- { "zaghyr.org", true },
- { "zagruz.tk", true },
- { "zahe.me", true },
- { "zahnaerzte-bohne.de", false },
- { "zahnarzt-drvogel-rosenheim.de", true },
- { "zahnarzt-drvogel.de", true },
- { "zahnarzt-duempten.de", true },
- { "zahnarzt-hofer.de", true },
- { "zahnarztpraxis-rusch.de", true },
- { "zahnmedizinzentrum.com", true },
- { "zahrowski.com", true },
- { "zaidan.de", true },
- { "zaidan.eu", true },
- { "zaidanfood.com", true },
- { "zaidanfood.eu", true },
- { "zaidanlebensmittelhandel.de", true },
- { "zaija.tk", true },
- { "zaim15min.cf", true },
- { "zaimdengi.tk", true },
- { "zaimexpress.cf", true },
- { "zaixsp.com", true },
- { "zaizaia.cc", true },
- { "zajazd.biz", true },
- { "zajm-pod-raspisku.cf", true },
- { "zajmy-contact.tk", true },
- { "zakariya.blog", true },
- { "zakaz.cf", true },
- { "zakcutner.uk", true },
- { "zakelijkgoedengelsleren.nl", true },
- { "zakladam.cz", true },
- { "zakmccrac.de", true },
- { "zakojifarm.jp", true },
- { "zakonu.net.ru", true },
- { "zakr.es", true },
- { "zakrentus-ostrus.space", true },
- { "zakspartiesandevents.com", true },
- { "zala.ml", true },
- { "zalamea.ph", true },
- { "zaledia.com", true },
- { "zaloghaz.ro", false },
- { "zaltv.com", true },
- { "zalure.com", true },
- { "zalvus.com", true },
- { "zamalektoday.com", true },
- { "zambianewsforum.tk", true },
- { "zamenim.tk", true },
- { "zamow.co", true },
- { "zandcell.com", true },
- { "zander.dk", true },
- { "zandra.cf", true },
- { "zanellidesigns.co.uk", true },
- { "zanjirzanane-shanbeghazan.ir", true },
- { "zanshinkankarate.com", true },
- { "zanthra.com", true },
- { "zanzo.cz", true },
- { "zap-mag.ru", true },
- { "zapier.com", true },
- { "zappbuildapps.com", true },
- { "zappingarahal.tk", true },
- { "zapreaders.cf", true },
- { "zaprefy.com", true },
- { "zarabiaj.com", true },
- { "zaracraft.tk", true },
- { "zaraweb.net", true },
- { "zarbis.tk", true },
- { "zarfinakber.com", true },
- { "zargescases.co.uk", true },
- { "zaruhi.ml", true },
- { "zary.me", true },
- { "zatsepin.by", true },
- { "zaufanatrzeciastrona.pl", true },
- { "zavec.com.ec", false },
- { "zavedu.org", true },
- { "zavetaji.lv", true },
- { "zawo-electric.de", true },
- { "zbib.org", true },
- { "zbp16888.com", true },
- { "zbrane-doplnky.cz", true },
- { "zbtcmu.com", true },
- { "zbut.bg", true },
- { "zby.xyz", true },
- { "zbyga.cz", true },
- { "zbyte.it", true },
- { "zcarot.com", true },
- { "zcarrot.com", true },
- { "zcon.nl", true },
- { "zcore.org", true },
- { "zcrypto.ml", true },
- { "zcwtl.com", false },
- { "zczc.cz", true },
- { "zd1313.com", true },
- { "zd1515.com", true },
- { "zd1717.com", true },
- { "zd202.com", true },
- { "zd203.com", true },
- { "zd205.com", true },
- { "zd206.com", true },
- { "zd207.com", true },
- { "zd208.com", true },
- { "zd209.com", true },
- { "zd232.com", true },
- { "zd235.com", true },
- { "zd236.com", true },
- { "zd237.com", true },
- { "zd239.com", true },
- { "zd252.com", true },
- { "zd253.com", true },
- { "zd257.com", true },
- { "zd258.com", true },
- { "zd259.com", true },
- { "zd262.com", true },
- { "zd265.com", true },
- { "zd267.com", true },
- { "zd270.com", true },
- { "zd2727.com", true },
- { "zd275.com", true },
- { "zd276.com", true },
- { "zd280.com", true },
- { "zd282.com", true },
- { "zd283.com", true },
- { "zd286.com", true },
- { "zd287.com", true },
- { "zd289.com", true },
- { "zd290.com", true },
- { "zd293.com", true },
- { "zd295.com", true },
- { "zd297.com", true },
- { "zd302.com", true },
- { "zd303.com", true },
- { "zd305.com", true },
- { "zd306.com", true },
- { "zd307.com", true },
- { "zd3232.com", true },
- { "zd3939.com", true },
- { "zd4848.com", true },
- { "zd6.ag", true },
- { "zd623.com", true },
- { "zd625.com", true },
- { "zd627.com", true },
- { "zd629.com", true },
- { "zd632.com", true },
- { "zd635.com", true },
- { "zd637.com", true },
- { "zd6464.com", true },
- { "zd652.com", true },
- { "zd653.com", true },
- { "zd6565.com", true },
- { "zd657.com", true },
- { "zd659.com", true },
- { "zd66.ag", true },
- { "zd673.com", true },
- { "zd675.com", true },
- { "zd692.com", true },
- { "zd693.com", true },
- { "zd697.com", true },
- { "zd723.com", true },
- { "zd725.com", true },
- { "zd726.com", true },
- { "zd729.com", true },
- { "zd732.com", true },
- { "zd735.com", true },
- { "zd736.com", true },
- { "zd752.com", true },
- { "zd753.com", true },
- { "zd756.com", true },
- { "zd7575.com", true },
- { "zd759.com", true },
- { "zd762.com", true },
- { "zd763.com", true },
- { "zd792.com", true },
- { "zd793.com", true },
- { "zd795.com", true },
- { "zd796.com", true },
- { "zd8.ag", true },
- { "zd802.com", true },
- { "zd803.com", true },
- { "zd805.com", true },
- { "zd806.com", true },
- { "zd807.com", true },
- { "zd809.com", true },
- { "zd823.com", true },
- { "zd825.com", true },
- { "zd826.com", true },
- { "zd827.com", true },
- { "zd829.com", true },
- { "zd88.ag", true },
- { "zd8829.com", true },
- { "zd8832.com", true },
- { "zd8836.com", true },
- { "zd8853.com", true },
- { "zd8863.com", true },
- { "zd8869.com", true },
- { "zd8882.com", true },
- { "zd8883.com", true },
- { "zd8898.com", true },
- { "zd9090.com", true },
- { "zdbl.de", true },
- { "zdenekpasek.cz", true },
- { "zdenekspacek.cz", true },
- { "zdenekvecera.cz", true },
- { "zdorovayasimya.com", true },
- { "zdravotnikurzy.cz", true },
- { "zdrojak.cz", true },
- { "zdymak.by", true },
- { "ze3kr.com", true },
- { "zeadaniel.com", true },
- { "zeal-and.jp", true },
- { "zeal-interior.com", true },
- { "zealworks.jp", true },
- { "zeanweb.tk", true },
- { "zebbra.ro", true },
- { "zebranolemagicien.net", true },
- { "zeckenhilfe.de", false },
- { "zecuur.nl", true },
- { "zedeko.pl", true },
- { "zeds-official.com", true },
- { "zeebrieshoekvanholland.nl", true },
- { "zeel.com", true },
- { "zeetoppers.nl", true },
- { "zehkae.net", true },
- { "zehrailkeakyildiz.com", false },
- { "zeibekiko-souvlaki.gr", true },
- { "zeidlertechnik.de", true },
- { "zeihsel.com", true },
- { "zeilenmethans.nl", true },
- { "zeilenwind.com", true },
- { "zeit.co", true },
- { "zeit.sh", true },
- { "zeitpunkt-kulturmagazin.de", true },
- { "zekesnider.com", true },
- { "zekinteractive.com", true },
- { "zell-mbc.com", true },
- { "zemlyaki.ga", true },
- { "zen-diez.de", true },
- { "zen-solutions.io", true },
- { "zen-zone.tk", true },
- { "zena.cx", false },
- { "zenassociates.com", true },
- { "zenavita.com", true },
- { "zenchain.com", true },
- { "zenevents.ro", true },
- { "zenghx.tk", true },
- { "zenideen.com", true },
- { "zenideen.net", true },
- { "zenidees.com", true },
- { "zenithmedia.ca", true },
- { "zenk-security.com", true },
- { "zenlogic.com", true },
- { "zenluxuryliving.com", true },
- { "zenofa.co.id", true },
- { "zenown.com", true },
- { "zenti.cloud", true },
- { "zentraler-kreditausschuss.de", true },
- { "zenvite.com", true },
- { "zenways.io", true },
- { "zeocax.com", false },
- { "zephyrbk.com", true },
- { "zephyrbookkeeping.com", true },
- { "zephyretcoraline.com", true },
- { "zeplin.io", true },
- { "zepter.gq", true },
- { "zer0-day.pw", true },
- { "zer0.de", false },
- { "zermatterhof.ch", true },
- { "zero-knigi.ml", true },
- { "zeroanarchy.com", true },
- { "zerobajt.pl", true },
- { "zerobounce.net", true },
- { "zerocash.msk.ru", true },
- { "zerocz.eu", false },
- { "zerofy.de", true },
- { "zerolab.org", true },
- { "zeromedia.co.id", true },
- { "zeronet.io", true },
- { "zeropoint.bg", true },
- { "zeropush.com", true },
- { "zerosector.io", true },
- { "zeroseteatacado.com.br", true },
- { "zerossl.com", true },
- { "zerotoone.de", true },
- { "zerox-security.online", true },
- { "zertitude.com", true },
- { "zeryn.net", true },
- { "zespia.tw", true },
- { "zestadionu.pl", true },
- { "zestylemon.co.uk", true },
- { "zeta.hk", true },
- { "zetamode.com", true },
- { "zetasystem.jp", true },
- { "zetorzeszow.pl", false },
- { "zettaplan.ru", true },
- { "zettlmeissl.de", true },
- { "zety.com", true },
- { "zety.es", true },
- { "zety.fr", true },
- { "zeus.gent", true },
- { "zeusec.co.jp", true },
- { "zevelev.net", true },
- { "zeyi.fan", true },
- { "zf1898.com", true },
- { "zfast.com.br", true },
- { "zfg.li", true },
- { "zfj.hk", true },
- { "zfj.la", true },
- { "zfree.co.nz", true },
- { "zfxhzc.blog", true },
- { "zg-dyw.net", true },
- { "zgrep.org", true },
- { "zh.search.yahoo.com", false },
- { "zhabababa.gq", true },
- { "zhainanyouhuo.com", true },
- { "zhan.moe", true },
- { "zhang-hao.com", true },
- { "zhang.fm", true },
- { "zhang.ge", true },
- { "zhangcheng.org", true },
- { "zhangfangzhou.com", true },
- { "zhanghao.me", true },
- { "zhanghao.org", true },
- { "zhangheda.cf", true },
- { "zhangshuqiao.org", true },
- { "zhangsidan.com", true },
- { "zhangwendao.com", true },
- { "zhangxuhu.com", true },
- { "zhaofeng.li", true },
- { "zhaopage.com", true },
- { "zhaostephen.com", true },
- { "zhaoxixiangban.cc", true },
- { "zhcexo.com", true },
- { "zhen-chen.com", true },
- { "zhendre.com", true },
- { "zhenggangzhao.org", true },
- { "zhengjie.com", true },
- { "zhengzihan.com", true },
- { "zhenic.ir", true },
- { "zhenn.fr", true },
- { "zhestokiemechtyi.tk", true },
- { "zhih.me", true },
- { "zhihe.in", true },
- { "zhihua-lai.com", true },
- { "zhiin.net", true },
- { "zhima.io", true },
- { "zhimingwang.org", true },
- { "zhina.org", true },
- { "zhis.eu", true },
- { "zhis.ltd", true },
- { "zhitanska.com", true },
- { "zhivoj-dom.ru", true },
- { "zhiyuan.cloud", true },
- { "zhl123.cn", true },
- { "zhl123.com", true },
- { "zhost.io", true },
- { "zhouba.cz", true },
- { "zhoushuo.me", false },
- { "zhovner.com", true },
- { "zhuihoude.com", true },
- { "zhuji.com", true },
- { "zhuji.com.cn", true },
- { "zhuji5.com", true },
- { "zhujiceping.com", true },
- { "zhuktrans.msk.ru", true },
- { "zhurnalyu.ga", true },
- { "zhy.us", true },
- { "zi.is", true },
- { "zi5.net", true },
- { "zidanpainting.com", true },
- { "ziegler-heizung-frankfurt.de", true },
- { "zielonakarta.com", true },
- { "ziemlich-zackig.de", true },
- { "ziemlichzackig.de", true },
- { "ziendo.com", true },
- { "zifb.in", true },
- { "zifoapptest.com", true },
- { "zigarn.com", true },
- { "zigi.io", true },
- { "zigottos.fr", true },
- { "zigzagmart.com", true },
- { "zihao.me", false },
- { "zii.bz", true },
- { "zijemvedu.sk", true },
- { "zijinbor.com", true },
- { "zikinf.com", true },
- { "ziledelaultimagafaavioricai.ro", true },
- { "zillertaleralpen.net", true },
- { "zilore.com", true },
- { "zilsen.com", true },
- { "zilv.life", true },
- { "zima.io", true },
- { "zimaoxy.com", true },
- { "zimiao.moe", true },
- { "zimmer-voss.de", true },
- { "zimtoel.de", true },
- { "zinabnews.tk", true },
- { "zinchenko.gq", true },
- { "zindec.com", true },
- { "zingarastore.com", true },
- { "zingjerijk.nl", true },
- { "zinglix.xyz", true },
- { "zinniamay.com", true },
- { "zinniazorgverlening.nl", true },
- { "zinnowitzer-ferienwohnung.de", true },
- { "zinoui.com", true },
- { "ziondrive.com.br", true },
- { "zionnationalpark.net", true },
- { "zionsvillelocksmiths.com", true },
- { "zipextractor.com", true },
- { "zipfworks.com", true },
- { "zipkey.de", true },
- { "zircode.com", true },
- { "ziroh.be", true },
- { "ziroux.net", true },
- { "zirrka.de", true },
- { "zirtek.ie", true },
- { "zirtual.com", true },
- { "zistemo.com", true },
- { "zitronengras-tee.de", true },
- { "zitseng.com", true },
- { "zivava.ge", true },
- { "zivver.be", true },
- { "zivver.com", true },
- { "zivver.de", true },
- { "zivver.eu", true },
- { "zivver.info", true },
- { "zivver.nl", true },
- { "zivver.uk", true },
- { "zivyruzenec.cz", true },
- { "zixiao.wang", true },
- { "zixin.com", true },
- { "zizibook.ml", true },
- { "zjateaucafe.be", true },
- { "zjy7722.ml", true },
- { "zk.gd", true },
- { "zk9.nl", true },
- { "zklokotskehory.cz", true },
- { "zkontrolujsiauto.cz", true },
- { "zkwolf.top", true },
- { "zkzone.net", true },
- { "zl0101.com", true },
- { "zl016.com", true },
- { "zl0303.com", true },
- { "zl056.com", true },
- { "zl0606.com", true },
- { "zl0iu.com", true },
- { "zl0sz.com", true },
- { "zl5151.com", true },
- { "zl6.ag", true },
- { "zl6565.com", true },
- { "zl66.ag", true },
- { "zl666.ag", true },
- { "zl6767.com", true },
- { "zl6xw.com", true },
- { "zl7070.com", true },
- { "zl7373.com", true },
- { "zl7979.com", true },
- { "zl8.ag", true },
- { "zl8282.com", true },
- { "zl850.com", true },
- { "zl8585.com", true },
- { "zl861.com", true },
- { "zl8686.com", true },
- { "zl88.ag", true },
- { "zl8849.com", true },
- { "zl8862.com", true },
- { "zl888.ag", true },
- { "zl9191.com", true },
- { "zl9292.com", true },
- { "zl9696.com", true },
- { "zl9814.com", true },
- { "zl9889.com", true },
- { "zl9898.com", true },
- { "zlatakus.cz", true },
- { "zlatan-ibrahimovic.tk", true },
- { "zlatom.ru", true },
- { "zlatosnadno.cz", true },
- { "zlavomat.sk", true },
- { "zlhuodong.vip", true },
- { "zlima12.com", true },
- { "zlonov.ru", true },
- { "zlotykameleon.tk", true },
- { "zloybot.tk", true },
- { "zmarta.de", true },
- { "zmarta.dk", true },
- { "zmarta.fi", true },
- { "zmarta.no", true },
- { "zmarta.org", true },
- { "zmarta.se", true },
- { "zmartagroup.com", true },
- { "zmartagroup.fi", true },
- { "zmartagroup.no", true },
- { "zmartagroup.se", true },
- { "zmiguel.me", true },
- { "znaj.ua", true },
- { "znakcomstva.ru", true },
- { "znakomim.cf", true },
- { "znanie-sila.tk", true },
- { "znanje.gq", true },
- { "znation.nl", true },
- { "znbr.com", true },
- { "zngay.com", true },
- { "znhglobalresources.com", true },
- { "znich.tk", true },
- { "znidar.org", true },
- { "znn.co.jp", true },
- { "znti.de", true },
- { "zoarcampsite.uk", true },
- { "zobraz.cz", true },
- { "zobworks.com", true },
- { "zoccarato.ovh", true },
- { "zochowskiplasticsurgery.com", true },
- { "zocial.life", true },
- { "zockenbiszumumfallen.de", true },
- { "zodiacohouses.com", true },
- { "zodian-research.ro", true },
- { "zoedale.co.uk", true },
- { "zoeller.me", true },
- { "zoepolitics.cf", true },
- { "zof.kh.ua", true },
- { "zofran-medication.cf", true },
- { "zofrancost.ga", true },
- { "zofranprice.ga", true },
- { "zoftbaby.com", true },
- { "zohair.xyz", true },
- { "zohar.wang", true },
- { "zohra.ninja", true },
- { "zoigl.club", true },
- { "zoisfinefood.com", true },
- { "zoisfinefood.fr", true },
- { "zojadravai.com", true },
- { "zok-ambicija.tk", true },
- { "zoki.art", true },
- { "zoko.tk", true },
- { "zollernalbtour.de", true },
- { "zollihood.ch", true },
- { "zoloftmedication.gq", true },
- { "zoloftpills.tk", true },
- { "zoloftprice.cf", true },
- { "zolotoy-standart.com.ua", true },
- { "zolushka-1950.tk", true },
- { "zom.bi", true },
- { "zombie-40th.com", true },
- { "zombie.cam", true },
- { "zombiesecured.com", true },
- { "zombmage.tk", true },
- { "zomerschoen.nl", true },
- { "zomiac.pp.ua", true },
- { "zonadigital.co", true },
- { "zonaperu.tk", true },
- { "zondervanacademic.com", true },
- { "zone39.com", true },
- { "zonecb.com", true },
- { "zonehomesolutions.com", true },
- { "zonemaster.fr", true },
- { "zonemaster.net", true },
- { "zonesec.org", true },
- { "zonglovani.info", true },
- { "zonky.cz", true },
- { "zonky.de", true },
- { "zonkysetkani.cz", true },
- { "zooforum.tk", true },
- { "zoohaus.de", true },
- { "zooish.net", true },
- { "zook.systems", true },
- { "zoola.io", true },
- { "zoolaboo.de", true },
- { "zoom.earth", true },
- { "zooom.azurewebsites.net", true },
- { "zoop.ml", false },
- { "zooplankton.no", true },
- { "zootime.net", true },
- { "zootime.org", true },
- { "zoowiki.us", true },
- { "zoptiks.com", true },
- { "zopyx.com", true },
- { "zor.com", true },
- { "zorasvobodova.cz", true },
- { "zorgclustertool.nl", true },
- { "zorgenvoorandrea.be", true },
- { "zorig.ch", true },
- { "zorium.org", true },
- { "zormeloandassociates.com", true },
- { "zorntt.fr", true },
- { "zorrobei.cf", false },
- { "zoso.ro", true },
- { "zotero.org", true },
- { "zoubaa.de", true },
- { "zouk.info", true },
- { "zouyaoji.top", true },
- { "zovirax-cream.ml", true },
- { "zowe.ru", true },
- { "zowedo.com", true },
- { "zoyride.com", true },
- { "zozzle.co.uk", true },
- { "zp.do", true },
- { "zp25.ninja", true },
- { "zravyobrazky.cz", true },
- { "zravypapir.cz", true },
- { "zrhdwz.cn", true },
- { "zrinski.tk", true },
- { "zrniecka-pre-sny.sk", true },
- { "zrnieckapresny.sk", true },
- { "zrs-meissen.de", true },
- { "zs-reporyje.cz", true },
- { "zscales.com", false },
- { "zselicivt.hu", true },
- { "zserver.fr", true },
- { "zskomenskeho.cz", true },
- { "zskomenskeho.eu", true },
- { "zsolti.hu", true },
- { "zsoltsandor.me", true },
- { "zsq.im", true },
- { "zstgmnachod.cz", true },
- { "zten.org", true },
- { "ztickerz.nl", true },
- { "ztk.im", true },
- { "ztsns.com", true },
- { "zubar.bg", true },
- { "zubel.it", false },
- { "zubr.net", true },
- { "zug-anwalt.de", false },
- { "zugfahrplan.com", true },
- { "zughilfen-test.de", true },
- { "zuiacg.cc", true },
- { "zuiacg.com", true },
- { "zuim.de", true },
- { "zula.africa", true },
- { "zulu.ro", true },
- { "zum-baur.de", true },
- { "zum-ziegenhainer.de", true },
- { "zumberak.tk", true },
- { "zumtaedanceschool.co.za", true },
- { "zumub.com", true },
- { "zund-app.com", true },
- { "zundapp.one", true },
- { "zundapp529.nl", true },
- { "zundappachterhoek.nl", true },
- { "zunlong0.com", true },
- { "zuolan.me", false },
- { "zupago.pe", true },
- { "zupit.it", true },
- { "zupzup.org", true },
- { "zuralski.net", true },
- { "zurgl.com", false },
- { "zurlin.de", true },
- { "zusjesvandenbos.nl", true },
- { "zusterjansen.nl", true },
- { "zuzannastrycharska.pl", true },
- { "zuzumba.es", true },
- { "zverskij-site.tk", true },
- { "zvps.uk", true },
- { "zvxr.net", true },
- { "zwartendijkstalling.nl", true },
- { "zwergenfeste.ch", true },
- { "zwergenfreiheit.at", true },
- { "zwerimex.com", true },
- { "zwierslanguagetraining.nl", true },
- { "zwilla.de", true },
- { "zwk.de", true },
- { "zwollemag.nl", true },
- { "zwollemagazine.nl", true },
- { "zwy.ch", false },
- { "zx6rninja.de", true },
- { "zx7r.de", true },
- { "zxfiles.tk", true },
- { "zy.md", true },
- { "zy.si", true },
- { "zybbo.com", true },
- { "zyciedlazwierzat.pl", true },
- { "zyciedogorynogami.pl", true },
- { "zydronium.com", true },
- { "zydronium.nl", true },
- { "zyellowbox.com", true },
- { "zylai.com", true },
- { "zymmm.com", true },
- { "zypern-firma.com", true },
- { "zyria.de", true },
- { "zyul.ddns.net", true },
- { "zyzardx.com", true },
- { "zyzsdy.com", true },
- { "zz342.com", true },
- { "zz772.com", true },
- { "zz9297.co", true },
- { "zz993.com", true },
- { "zzekj.net", true },
- { "zzpd.nl", false },
- { "zzpwoerden.nl", true },
- { "zzsec.org", true },
-};
diff --git a/security/manager/ssl/nsSiteSecurityService.cpp b/security/manager/ssl/nsSiteSecurityService.cpp
index 1b7f06a470..fa2619414d 100644
--- a/security/manager/ssl/nsSiteSecurityService.cpp
+++ b/security/manager/ssl/nsSiteSecurityService.cpp
@@ -25,19 +25,9 @@
#include "mozilla/Logging.h"
#include "prnetdb.h"
#include "prprf.h"
-#include "PublicKeyPinningService.h"
#include "ScopedNSSTypes.h"
#include "SharedCertVerifier.h"
-// A note about the preload list:
-// When a site specifically disables HSTS by sending a header with
-// 'max-age: 0', we keep a "knockout" value that means "we have no information
-// regarding the HSTS state of this host" (any ancestor of "this host" can still
-// influence its HSTS status via include subdomains, however).
-// This prevents the preload list from overriding the site's current
-// desired HSTS status.
-#include "nsSTSPreloadList.inc"
-
using namespace mozilla;
using namespace mozilla::psm;
@@ -96,123 +86,30 @@ SiteHSTSState::ToString(nsCString& aString)
}
////////////////////////////////////////////////////////////////////////////////
-static bool
-stringIsBase64EncodingOf256bitValue(nsCString& encodedString) {
- nsAutoCString binaryValue;
- nsresult rv = mozilla::Base64Decode(encodedString, binaryValue);
- if (NS_FAILED(rv)) {
- return false;
- }
- if (binaryValue.Length() != SHA256_LENGTH) {
- return false;
- }
- return true;
-}
-SiteHPKPState::SiteHPKPState()
- : mExpireTime(0)
- , mState(SecurityPropertyUnset)
- , mIncludeSubdomains(false)
-{
-}
-
-SiteHPKPState::SiteHPKPState(nsCString& aStateString)
- : mExpireTime(0)
- , mState(SecurityPropertyUnset)
- , mIncludeSubdomains(false)
-{
- uint32_t hpkpState = 0;
- uint32_t hpkpIncludeSubdomains = 0; // PR_sscanf doesn't handle bools.
- const uint32_t MaxMergedHPKPPinSize = 1024;
- char mergedHPKPins[MaxMergedHPKPPinSize];
- memset(mergedHPKPins, 0, MaxMergedHPKPPinSize);
-
- if (aStateString.Length() >= MaxMergedHPKPPinSize) {
- SSSLOG(("SSS: Cannot parse PKPState string, too large\n"));
- return;
- }
-
- int32_t matches = PR_sscanf(aStateString.get(), "%lld,%lu,%lu,%s",
- &mExpireTime, &hpkpState,
- &hpkpIncludeSubdomains, mergedHPKPins);
- bool valid = (matches == 4 &&
- (hpkpIncludeSubdomains == 0 || hpkpIncludeSubdomains == 1) &&
- ((SecurityPropertyState)hpkpState == SecurityPropertyUnset ||
- (SecurityPropertyState)hpkpState == SecurityPropertySet ||
- (SecurityPropertyState)hpkpState == SecurityPropertyKnockout));
-
- SSSLOG(("SSS: loading SiteHPKPState matches=%d\n", matches));
- const uint32_t SHA256Base64Len = 44;
-
- if (valid && (SecurityPropertyState)hpkpState == SecurityPropertySet) {
- // try to expand the merged PKPins
- const char* cur = mergedHPKPins;
- nsAutoCString pin;
- uint32_t collectedLen = 0;
- mergedHPKPins[MaxMergedHPKPPinSize - 1] = 0;
- size_t totalLen = strlen(mergedHPKPins);
- while (collectedLen + SHA256Base64Len <= totalLen) {
- pin.Assign(cur, SHA256Base64Len);
- if (stringIsBase64EncodingOf256bitValue(pin)) {
- mSHA256keys.AppendElement(pin);
- }
- cur += SHA256Base64Len;
- collectedLen += SHA256Base64Len;
- }
- if (mSHA256keys.IsEmpty()) {
- valid = false;
- }
- }
- if (valid) {
- mState = (SecurityPropertyState)hpkpState;
- mIncludeSubdomains = (hpkpIncludeSubdomains == 1);
- } else {
- SSSLOG(("%s is not a valid SiteHPKPState", aStateString.get()));
- mExpireTime = 0;
- mState = SecurityPropertyUnset;
- mIncludeSubdomains = false;
- if (!mSHA256keys.IsEmpty()) {
- mSHA256keys.Clear();
- }
- }
-}
+const uint64_t kSixtyDaysInSeconds = 60 * 24 * 60 * 60;
-SiteHPKPState::SiteHPKPState(PRTime aExpireTime,
- SecurityPropertyState aState,
- bool aIncludeSubdomains,
- nsTArray<nsCString>& aSHA256keys)
- : mExpireTime(aExpireTime)
- , mState(aState)
- , mIncludeSubdomains(aIncludeSubdomains)
- , mSHA256keys(aSHA256keys)
+static bool
+HostIsIPAddress(const char *hostname)
{
+ PRNetAddr hostAddr;
+ return (PR_StringToNetAddr(hostname, &hostAddr) == PR_SUCCESS);
}
-void
-SiteHPKPState::ToString(nsCString& aString)
+nsAutoCString CanonicalizeHostname(const char* hostname)
{
- aString.Truncate();
- aString.AppendInt(mExpireTime);
- aString.Append(',');
- aString.AppendInt(mState);
- aString.Append(',');
- aString.AppendInt(static_cast<uint32_t>(mIncludeSubdomains));
- aString.Append(',');
- for (unsigned int i = 0; i < mSHA256keys.Length(); i++) {
- aString.Append(mSHA256keys[i]);
+ nsAutoCString canonicalizedHostname(hostname);
+ ToLowerCase(canonicalizedHostname);
+ while (canonicalizedHostname.Length() > 0 &&
+ canonicalizedHostname.Last() == '.') {
+ canonicalizedHostname.Truncate(canonicalizedHostname.Length() - 1);
}
+ return canonicalizedHostname;
}
-////////////////////////////////////////////////////////////////////////////////
-
-const uint64_t kSixtyDaysInSeconds = 60 * 24 * 60 * 60;
-
nsSiteSecurityService::nsSiteSecurityService()
- : mMaxMaxAge(kSixtyDaysInSeconds)
- , mUsePreloadList(true)
- , mUseStsService(true)
+ : mUseStsService(true)
, mPreloadListTimeOffset(0)
- , mHPKPEnabled(false)
{
}
@@ -233,48 +130,25 @@ nsSiteSecurityService::Init()
return NS_ERROR_NOT_SAME_THREAD;
}
- mMaxMaxAge = mozilla::Preferences::GetInt(
- "security.cert_pinning.max_max_age_seconds", kSixtyDaysInSeconds);
- mozilla::Preferences::AddStrongObserver(this,
- "security.cert_pinning.max_max_age_seconds");
- mUsePreloadList = mozilla::Preferences::GetBool(
- "network.stricttransportsecurity.preloadlist", true);
- mozilla::Preferences::AddStrongObserver(this,
- "network.stricttransportsecurity.preloadlist");
- mHPKPEnabled = mozilla::Preferences::GetBool(
- "security.cert_pinning.hpkp.enabled", false);
- mozilla::Preferences::AddStrongObserver(this,
- "security.cert_pinning.hpkp.enabled");
mUseStsService = mozilla::Preferences::GetBool(
"network.stricttransportsecurity.enabled", true);
mozilla::Preferences::AddStrongObserver(this,
"network.stricttransportsecurity.enabled");
- mProcessPKPHeadersFromNonBuiltInRoots = mozilla::Preferences::GetBool(
- "security.cert_pinning.process_headers_from_non_builtin_roots", false);
- mozilla::Preferences::AddStrongObserver(this,
- "security.cert_pinning.process_headers_from_non_builtin_roots");
mPreloadListTimeOffset = mozilla::Preferences::GetInt(
"test.currentTimeOffsetSeconds", 0);
mozilla::Preferences::AddStrongObserver(this,
"test.currentTimeOffsetSeconds");
mSiteStateStorage =
mozilla::DataStorage::Get(NS_LITERAL_STRING("SiteSecurityServiceState.txt"));
- mPreloadStateStorage =
- mozilla::DataStorage::Get(NS_LITERAL_STRING("SecurityPreloadState.txt"));
bool storageWillPersist = false;
- bool preloadStorageWillPersist = false;
nsresult rv = mSiteStateStorage->Init(storageWillPersist);
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
- rv = mPreloadStateStorage->Init(preloadStorageWillPersist);
- if (NS_WARN_IF(NS_FAILED(rv))) {
- return rv;
- }
// This is not fatal. There are some cases where there won't be a
// profile directory (e.g. running xpcshell). There isn't the
// expectation that site information will be presisted in those cases.
- if (!storageWillPersist || !preloadStorageWillPersist) {
+ if (!storageWillPersist) {
NS_WARNING("site security information will not be persisted");
}
@@ -295,7 +169,7 @@ nsSiteSecurityService::GetHost(nsIURI* aURI, nsACString& aResult)
return rv;
}
- aResult.Assign(PublicKeyPinningService::CanonicalizeHostname(host.get()));
+ aResult.Assign(CanonicalizeHostname(host.get()));
if (aResult.IsEmpty()) {
return NS_ERROR_UNEXPECTED;
}
@@ -311,9 +185,6 @@ SetStorageKey(nsAutoCString& storageKey, nsCString& hostname, uint32_t aType)
case nsISiteSecurityService::HEADER_HSTS:
storageKey.AppendLiteral(":HSTS");
break;
- case nsISiteSecurityService::HEADER_HPKP:
- storageKey.AppendLiteral(":HPKP");
- break;
default:
NS_ASSERTION(false, "SSS:SetStorageKey got invalid type");
}
@@ -340,11 +211,9 @@ nsSiteSecurityService::SetHSTSState(uint32_t aType,
return NS_OK;
}
- // If max-age is zero, the host is no longer considered HSTS. If the host was
- // preloaded, we store an entry indicating that this host is not HSTS, causing
- // the preloaded information to be ignored.
+ // If max-age is zero, the host is no longer considered HSTS.
if (maxage == 0) {
- return RemoveState(aType, aSourceURI, flags, true);
+ return RemoveState(aType, aSourceURI, flags);
}
MOZ_ASSERT((aHSTSState == SecurityPropertySet ||
@@ -372,8 +241,7 @@ nsSiteSecurityService::SetHSTSState(uint32_t aType,
}
NS_IMETHODIMP
-nsSiteSecurityService::RemoveState(uint32_t aType, nsIURI* aURI,
- uint32_t aFlags, bool force = false)
+nsSiteSecurityService::RemoveState(uint32_t aType, nsIURI* aURI, uint32_t aFlags)
{
// Child processes are not allowed direct access to this.
if (!XRE_IsParentProcess()) {
@@ -381,8 +249,7 @@ nsSiteSecurityService::RemoveState(uint32_t aType, nsIURI* aURI,
}
// Only HSTS is supported at the moment.
- NS_ENSURE_TRUE(aType == nsISiteSecurityService::HEADER_HSTS ||
- aType == nsISiteSecurityService::HEADER_HPKP,
+ NS_ENSURE_TRUE(aType == nsISiteSecurityService::HEADER_HSTS,
NS_ERROR_NOT_IMPLEMENTED);
nsAutoCString hostname;
@@ -393,34 +260,14 @@ nsSiteSecurityService::RemoveState(uint32_t aType, nsIURI* aURI,
mozilla::DataStorageType storageType = isPrivate
? mozilla::DataStorage_Private
: mozilla::DataStorage_Persistent;
- // If this host is in the preload list, we have to store a knockout entry
- // if it's explicitly forced to not be HSTS anymore
- if (force && GetPreloadListEntry(hostname.get())) {
- SSSLOG(("SSS: storing knockout entry for %s", hostname.get()));
- SiteHSTSState siteState(0, SecurityPropertyKnockout, false);
- nsAutoCString stateString;
- siteState.ToString(stateString);
- nsAutoCString storageKey;
- SetStorageKey(storageKey, hostname, aType);
- rv = mSiteStateStorage->Put(storageKey, stateString, storageType);
- NS_ENSURE_SUCCESS(rv, rv);
- } else {
- SSSLOG(("SSS: removing entry for %s", hostname.get()));
- nsAutoCString storageKey;
- SetStorageKey(storageKey, hostname, aType);
- mSiteStateStorage->Remove(storageKey, storageType);
- }
+ SSSLOG(("SSS: removing entry for %s", hostname.get()));
+ nsAutoCString storageKey;
+ SetStorageKey(storageKey, hostname, aType);
+ mSiteStateStorage->Remove(storageKey, storageType);
return NS_OK;
}
-static bool
-HostIsIPAddress(const char *hostname)
-{
- PRNetAddr hostAddr;
- return (PR_StringToNetAddr(hostname, &hostAddr) == PR_SUCCESS);
-}
-
NS_IMETHODIMP
nsSiteSecurityService::ProcessHeader(uint32_t aType,
nsIURI* aSourceURI,
@@ -431,11 +278,6 @@ nsSiteSecurityService::ProcessHeader(uint32_t aType,
bool* aIncludeSubdomains,
uint32_t* aFailureResult)
{
- // Child processes are not allowed direct access to this.
- if (!XRE_IsParentProcess()) {
- MOZ_CRASH("Child process: no direct access to nsISiteSecurityService::ProcessHeader");
- }
-
if (aFailureResult) {
*aFailureResult = nsISiteSecurityService::ERROR_UNKNOWN;
}
@@ -457,11 +299,6 @@ nsSiteSecurityService::UnsafeProcessHeader(uint32_t aType,
bool* aIncludeSubdomains,
uint32_t* aFailureResult)
{
- // Child processes are not allowed direct access to this.
- if (!XRE_IsParentProcess()) {
- MOZ_CRASH("Child process: no direct access to nsISiteSecurityService::UnsafeProcessHeader");
- }
-
return ProcessHeaderInternal(aType, aSourceURI, aHeader, nullptr, aFlags,
aMaxAge, aIncludeSubdomains, aFailureResult);
}
@@ -479,9 +316,8 @@ nsSiteSecurityService::ProcessHeaderInternal(uint32_t aType,
if (aFailureResult) {
*aFailureResult = nsISiteSecurityService::ERROR_UNKNOWN;
}
- // Only HSTS and HPKP are supported at the moment.
- NS_ENSURE_TRUE(aType == nsISiteSecurityService::HEADER_HSTS ||
- aType == nsISiteSecurityService::HEADER_HPKP,
+ // Only HSTS is supported at the moment.
+ NS_ENSURE_TRUE(aType == nsISiteSecurityService::HEADER_HSTS,
NS_ERROR_NOT_IMPLEMENTED);
if (aMaxAge != nullptr) {
@@ -529,10 +365,6 @@ nsSiteSecurityService::ProcessHeaderInternal(uint32_t aType,
rv = ProcessSTSHeader(aSourceURI, aHeader, aFlags, aMaxAge,
aIncludeSubdomains, aFailureResult);
break;
- case nsISiteSecurityService::HEADER_HPKP:
- rv = ProcessPKPHeader(aSourceURI, aHeader, aSSLStatus, aFlags, aMaxAge,
- aIncludeSubdomains, aFailureResult);
- break;
default:
MOZ_CRASH("unexpected header type");
}
@@ -548,9 +380,6 @@ ParseSSSHeaders(uint32_t aType,
uint64_t& maxAge,
nsTArray<nsCString>& sha256keys)
{
- // Strict transport security and Public Key Pinning have very similar
- // Header formats.
-
// "Strict-Transport-Security" ":" OWS
// STS-d *( OWS ";" OWS STS-d OWS)
//
@@ -562,26 +391,6 @@ ParseSSSHeaders(uint32_t aType,
// includeSubDomains = [ "includeSubDomains" ]
//
- // "Public-Key-Pins ":" OWS
- // PKP-d *( OWS ";" OWS PKP-d OWS)
- //
- // ; PKP directive
- // PKP-d = maxAge / includeSubDomains / reportUri / pin-directive
- //
- // maxAge = "max-age" "=" delta-seconds v-ext
- //
- // includeSubDomains = [ "includeSubDomains" ]
- //
- // reportURi = "report-uri" "=" quoted-string
- //
- // pin-directive = "pin-" token "=" quoted-string
- //
- // the only valid token currently specified is sha256
- // the quoted string for a pin directive is the base64 encoding
- // of the hash of the public key of the fingerprint
- //
-
- // The order of the directives is not significant.
// All directives must appear only once.
// Directive names are case-insensitive.
// The entire header is invalid if a directive not conforming to the
@@ -593,8 +402,6 @@ ParseSSSHeaders(uint32_t aType,
NS_NAMED_LITERAL_CSTRING(max_age_var, "max-age");
NS_NAMED_LITERAL_CSTRING(include_subd_var, "includesubdomains");
- NS_NAMED_LITERAL_CSTRING(pin_sha256_var, "pin-sha256");
- NS_NAMED_LITERAL_CSTRING(report_uri_var, "report-uri");
nsSecurityHeaderParser parser(aHeader);
nsresult rv = parser.Parse();
@@ -649,29 +456,7 @@ ParseSSSHeaders(uint32_t aType,
directive->mValue.get()));
return nsISiteSecurityService::ERROR_INVALID_INCLUDE_SUBDOMAINS;
}
- } else if (aType == nsISiteSecurityService::HEADER_HPKP &&
- directive->mName.Length() == pin_sha256_var.Length() &&
- directive->mName.EqualsIgnoreCase(pin_sha256_var.get(),
- pin_sha256_var.Length())) {
- SSSLOG(("SSS: found pinning entry '%s' length=%d",
- directive->mValue.get(), directive->mValue.Length()));
- if (!stringIsBase64EncodingOf256bitValue(directive->mValue)) {
- return nsISiteSecurityService::ERROR_INVALID_PIN;
- }
- sha256keys.AppendElement(directive->mValue);
- } else if (aType == nsISiteSecurityService::HEADER_HPKP &&
- directive->mName.Length() == report_uri_var.Length() &&
- directive->mName.EqualsIgnoreCase(report_uri_var.get(),
- report_uri_var.Length())) {
- // We don't support the report-uri yet, but to avoid unrecognized
- // directive warnings, we still have to handle its presence
- if (foundReportURI) {
- SSSLOG(("SSS: found two report-uri directives"));
- return nsISiteSecurityService::ERROR_MULTIPLE_REPORT_URIS;
- }
- SSSLOG(("SSS: found report-uri directive"));
- foundReportURI = true;
- } else {
+ } else {
SSSLOG(("SSS: ignoring unrecognized directive '%s'",
directive->mName.get()));
foundUnrecognizedDirective = true;
@@ -681,194 +466,6 @@ ParseSSSHeaders(uint32_t aType,
}
nsresult
-nsSiteSecurityService::ProcessPKPHeader(nsIURI* aSourceURI,
- const char* aHeader,
- nsISSLStatus* aSSLStatus,
- uint32_t aFlags,
- uint64_t* aMaxAge,
- bool* aIncludeSubdomains,
- uint32_t* aFailureResult)
-{
- if (aFailureResult) {
- *aFailureResult = nsISiteSecurityService::ERROR_UNKNOWN;
- }
- if (!mHPKPEnabled) {
- SSSLOG(("SSS: HPKP disabled: not processing header '%s'", aHeader));
- if (aMaxAge) {
- *aMaxAge = 0;
- }
- if (aIncludeSubdomains) {
- *aIncludeSubdomains = false;
- }
- return NS_OK;
- }
-
- SSSLOG(("SSS: processing HPKP header '%s'", aHeader));
- NS_ENSURE_ARG(aSSLStatus);
-
- const uint32_t aType = nsISiteSecurityService::HEADER_HPKP;
- bool foundMaxAge = false;
- bool foundIncludeSubdomains = false;
- bool foundUnrecognizedDirective = false;
- uint64_t maxAge = 0;
- nsTArray<nsCString> sha256keys;
- uint32_t sssrv = ParseSSSHeaders(aType, aHeader, foundIncludeSubdomains,
- foundMaxAge, foundUnrecognizedDirective,
- maxAge, sha256keys);
- if (sssrv != nsISiteSecurityService::Success) {
- if (aFailureResult) {
- *aFailureResult = sssrv;
- }
- return NS_ERROR_FAILURE;
- }
-
- // after processing all the directives, make sure we came across max-age
- // somewhere.
- if (!foundMaxAge) {
- SSSLOG(("SSS: did not encounter required max-age directive"));
- if (aFailureResult) {
- *aFailureResult = nsISiteSecurityService::ERROR_NO_MAX_AGE;
- }
- return NS_ERROR_FAILURE;
- }
-
- // before we add the pin we need to ensure it will not break the site as
- // currently visited so:
- // 1. recompute a valid chain (no external ocsp)
- // 2. use this chain to check if things would have broken!
- nsAutoCString host;
- nsresult rv = GetHost(aSourceURI, host);
- NS_ENSURE_SUCCESS(rv, rv);
- nsCOMPtr<nsIX509Cert> cert;
- rv = aSSLStatus->GetServerCert(getter_AddRefs(cert));
- NS_ENSURE_SUCCESS(rv, rv);
- NS_ENSURE_TRUE(cert, NS_ERROR_FAILURE);
- UniqueCERTCertificate nssCert(cert->GetCert());
- NS_ENSURE_TRUE(nssCert, NS_ERROR_FAILURE);
-
- mozilla::pkix::Time now(mozilla::pkix::Now());
- UniqueCERTCertList certList;
- RefPtr<SharedCertVerifier> certVerifier(GetDefaultCertVerifier());
- NS_ENSURE_TRUE(certVerifier, NS_ERROR_UNEXPECTED);
- // We don't want this verification to cause any network traffic that would
- // block execution. Also, since we don't have access to the original stapled
- // OCSP response, we can't enforce this aspect of the TLS Feature extension.
- // This is ok, because it will have been enforced when we originally connected
- // to the site (or it's disabled, in which case we wouldn't want to enforce it
- // anyway).
- CertVerifier::Flags flags = CertVerifier::FLAG_LOCAL_ONLY |
- CertVerifier::FLAG_TLS_IGNORE_STATUS_REQUEST;
- if (certVerifier->VerifySSLServerCert(nssCert,
- nullptr, // stapledOCSPResponse
- nullptr, // sctsFromTLSExtension
- now, nullptr, // pinarg
- host.get(), // hostname
- certList,
- false, // don't store intermediates
- flags)
- != mozilla::pkix::Success) {
- return NS_ERROR_FAILURE;
- }
-
- CERTCertListNode* rootNode = CERT_LIST_TAIL(certList);
- if (CERT_LIST_END(rootNode, certList)) {
- return NS_ERROR_FAILURE;
- }
- bool isBuiltIn = false;
- mozilla::pkix::Result result = IsCertBuiltInRoot(rootNode->cert, isBuiltIn);
- if (result != mozilla::pkix::Success) {
- return NS_ERROR_FAILURE;
- }
-
- if (!isBuiltIn && !mProcessPKPHeadersFromNonBuiltInRoots) {
- if (aFailureResult) {
- *aFailureResult = nsISiteSecurityService::ERROR_ROOT_NOT_BUILT_IN;
- }
- return NS_ERROR_FAILURE;
- }
-
- // If maxAge == 0, we remove dynamic HPKP state for this host. Due to
- // architectural constraints, if this host was preloaded, any future lookups
- // will use the preloaded state (i.e. we can't store a "this host is not HPKP"
- // entry like we can for HSTS).
- if (maxAge == 0) {
- return RemoveState(aType, aSourceURI, aFlags);
- }
-
- // clamp maxAge to the maximum set by pref
- if (maxAge > mMaxMaxAge) {
- maxAge = mMaxMaxAge;
- }
-
- bool chainMatchesPinset;
- rv = PublicKeyPinningService::ChainMatchesPinset(certList, sha256keys,
- chainMatchesPinset);
- if (NS_FAILED(rv)) {
- return rv;
- }
- if (!chainMatchesPinset) {
- // is invalid
- SSSLOG(("SSS: Pins provided by %s are invalid no match with certList\n", host.get()));
- if (aFailureResult) {
- *aFailureResult = nsISiteSecurityService::ERROR_PINSET_DOES_NOT_MATCH_CHAIN;
- }
- return NS_ERROR_FAILURE;
- }
-
- // finally we need to ensure that there is a "backup pin" ie. There must be
- // at least one fingerprint hash that does NOT validate against the verified
- // chain (Section 2.5 of the spec)
- bool hasBackupPin = false;
- for (uint32_t i = 0; i < sha256keys.Length(); i++) {
- nsTArray<nsCString> singlePin;
- singlePin.AppendElement(sha256keys[i]);
- rv = PublicKeyPinningService::ChainMatchesPinset(certList, singlePin,
- chainMatchesPinset);
- if (NS_FAILED(rv)) {
- return rv;
- }
- if (!chainMatchesPinset) {
- hasBackupPin = true;
- }
- }
- if (!hasBackupPin) {
- // is invalid
- SSSLOG(("SSS: Pins provided by %s are invalid no backupPin\n", host.get()));
- if (aFailureResult) {
- *aFailureResult = nsISiteSecurityService::ERROR_NO_BACKUP_PIN;
- }
- return NS_ERROR_FAILURE;
- }
-
- int64_t expireTime = ExpireTimeFromMaxAge(maxAge);
- SiteHPKPState dynamicEntry(expireTime, SecurityPropertySet,
- foundIncludeSubdomains, sha256keys);
- SSSLOG(("SSS: about to set pins for %s, expires=%ld now=%ld maxAge=%lu\n",
- host.get(), expireTime, PR_Now() / PR_USEC_PER_MSEC, maxAge));
-
- rv = SetHPKPState(host.get(), dynamicEntry, aFlags, false);
- if (NS_FAILED(rv)) {
- SSSLOG(("SSS: failed to set pins for %s\n", host.get()));
- if (aFailureResult) {
- *aFailureResult = nsISiteSecurityService::ERROR_COULD_NOT_SAVE_STATE;
- }
- return rv;
- }
-
- if (aMaxAge != nullptr) {
- *aMaxAge = maxAge;
- }
-
- if (aIncludeSubdomains != nullptr) {
- *aIncludeSubdomains = foundIncludeSubdomains;
- }
-
- return foundUnrecognizedDirective
- ? NS_SUCCESS_LOSS_OF_INSIGNIFICANT_DATA
- : NS_OK;
-}
-
-nsresult
nsSiteSecurityService::ProcessSTSHeader(nsIURI* aSourceURI,
const char* aHeader,
uint32_t aFlags,
@@ -937,17 +534,11 @@ nsSiteSecurityService::IsSecureURI(uint32_t aType, nsIURI* aURI,
uint32_t aFlags, bool* aCached,
bool* aResult)
{
- // Child processes are not allowed direct access to this.
- if (!XRE_IsParentProcess() && aType != nsISiteSecurityService::HEADER_HSTS) {
- MOZ_CRASH("Child process: no direct access to nsISiteSecurityService::IsSecureURI for non-HSTS entries");
- }
-
NS_ENSURE_ARG(aURI);
NS_ENSURE_ARG(aResult);
- // Only HSTS and HPKP are supported at the moment.
- NS_ENSURE_TRUE(aType == nsISiteSecurityService::HEADER_HSTS ||
- aType == nsISiteSecurityService::HEADER_HPKP,
+ // Only HSTS is supported at the moment.
+ NS_ENSURE_TRUE(aType == nsISiteSecurityService::HEADER_HSTS,
NS_ERROR_NOT_IMPLEMENTED);
nsAutoCString hostname;
@@ -969,47 +560,16 @@ nsSiteSecurityService::IsSecureURI(uint32_t aType, nsIURI* aURI,
return IsSecureHost(aType, hostname.get(), aFlags, aCached, aResult);
}
-int STSPreloadCompare(const void *key, const void *entry)
-{
- const char *keyStr = (const char *)key;
- const nsSTSPreload *preloadEntry = (const nsSTSPreload *)entry;
- return strcmp(keyStr, preloadEntry->mHost);
-}
-
-// Returns the preload list entry for the given host, if it exists.
-// Only does exact host matching - the user must decide how to use the returned
-// data. May return null.
-const nsSTSPreload *
-nsSiteSecurityService::GetPreloadListEntry(const char *aHost)
-{
- PRTime currentTime = PR_Now() + (mPreloadListTimeOffset * PR_USEC_PER_SEC);
- if (mUsePreloadList && currentTime < gPreloadListExpirationTime) {
- return (const nsSTSPreload *) bsearch(aHost,
- kSTSPreloadList,
- mozilla::ArrayLength(kSTSPreloadList),
- sizeof(nsSTSPreload),
- STSPreloadCompare);
- }
-
- return nullptr;
-}
-
NS_IMETHODIMP
nsSiteSecurityService::IsSecureHost(uint32_t aType, const char* aHost,
uint32_t aFlags, bool* aCached,
bool* aResult)
{
- // Child processes are not allowed direct access to this.
- if (!XRE_IsParentProcess() && aType != nsISiteSecurityService::HEADER_HSTS) {
- MOZ_CRASH("Child process: no direct access to nsISiteSecurityService::IsSecureHost for non-HSTS entries");
- }
-
NS_ENSURE_ARG(aHost);
NS_ENSURE_ARG(aResult);
- // Only HSTS and HPKP are supported at the moment.
- NS_ENSURE_TRUE(aType == nsISiteSecurityService::HEADER_HSTS ||
- aType == nsISiteSecurityService::HEADER_HPKP,
+ // Only HSTS is supported at the moment.
+ NS_ENSURE_TRUE(aType == nsISiteSecurityService::HEADER_HSTS,
NS_ERROR_NOT_IMPLEMENTED);
// set default in case if we can't find any STS information
@@ -1023,38 +583,14 @@ nsSiteSecurityService::IsSecureHost(uint32_t aType, const char* aHost,
return NS_OK;
}
- /* An IP address never qualifies as a secure URI. */
+ // An IP address never qualifies as a secure URI.
if (HostIsIPAddress(aHost)) {
return NS_OK;
}
- if (aType == nsISiteSecurityService::HEADER_HPKP) {
- RefPtr<SharedCertVerifier> certVerifier(GetDefaultCertVerifier());
- if (!certVerifier) {
- return NS_ERROR_FAILURE;
- }
- if (certVerifier->mPinningMode ==
- CertVerifier::PinningMode::pinningDisabled) {
- return NS_OK;
- }
- bool enforceTestMode = certVerifier->mPinningMode ==
- CertVerifier::PinningMode::pinningEnforceTestMode;
- return PublicKeyPinningService::HostHasPins(aHost, mozilla::pkix::Now(),
- enforceTestMode, *aResult);
- }
-
- // Holepunch chart.apis.google.com and subdomains.
- nsAutoCString host(PublicKeyPinningService::CanonicalizeHostname(aHost));
- if (host.EqualsLiteral("chart.apis.google.com") ||
- StringEndsWith(host, NS_LITERAL_CSTRING(".chart.apis.google.com"))) {
- if (aCached) {
- *aCached = true;
- }
- return NS_OK;
- }
-
- const nsSTSPreload *preload = nullptr;
-
+ // Canonicalize the passed host name
+ nsAutoCString host(CanonicalizeHostname(aHost));
+
// First check the exact host. This involves first checking for an entry in
// site security storage. If that entry exists, we don't want to check
// in the preload list. We only want to use the stored value if it is not a
@@ -1086,21 +622,11 @@ nsSiteSecurityService::IsSecureHost(uint32_t aType, const char* aHost,
}
}
- // If the entry is expired and not in the preload list, we can remove it.
- if (expired && !GetPreloadListEntry(host.get())) {
+ // If the entry is expired we can remove it.
+ if (expired) {
mSiteStateStorage->Remove(storageKey, storageType);
}
}
- // Finally look in the preloaded list. This is the exact host,
- // so if an entry exists at all, this host is HSTS.
- else if (GetPreloadListEntry(host.get())) {
- SSSLOG(("%s is a preloaded STS host", host.get()));
- *aResult = true;
- if (aCached) {
- *aCached = true;
- }
- return NS_OK;
- }
SSSLOG(("no HSTS data for %s found, walking up domain", host.get()));
const char *subdomain;
@@ -1144,23 +670,11 @@ nsSiteSecurityService::IsSecureHost(uint32_t aType, const char* aHost,
}
}
- // If the entry is expired and not in the preload list, we can remove it.
- if (expired && !GetPreloadListEntry(subdomain)) {
+ // If the entry is expired we can remove it.
+ if (expired) {
mSiteStateStorage->Remove(storageKey, storageType);
}
}
- // This is an ancestor, so if we get a match, we have to check if the
- // preloaded entry includes subdomains.
- else if ((preload = GetPreloadListEntry(subdomain)) != nullptr) {
- if (preload->mIncludeSubdomains) {
- SSSLOG(("%s is a preloaded STS host", subdomain));
- *aResult = true;
- if (aCached) {
- *aCached = true;
- }
- break;
- }
- }
SSSLOG(("no HSTS data for %s found, walking up domain", subdomain));
}
@@ -1172,155 +686,9 @@ nsSiteSecurityService::IsSecureHost(uint32_t aType, const char* aHost,
NS_IMETHODIMP
nsSiteSecurityService::ClearAll()
{
- // Child processes are not allowed direct access to this.
- if (!XRE_IsParentProcess()) {
- MOZ_CRASH("Child process: no direct access to nsISiteSecurityService::ClearAll");
- }
-
return mSiteStateStorage->Clear();
}
-NS_IMETHODIMP
-nsSiteSecurityService::ClearPreloads()
-{
- // Child processes are not allowed direct access to this.
- if (!XRE_IsParentProcess()) {
- MOZ_CRASH("Child process: no direct access to nsISiteSecurityService::ClearPreloads");
- }
-
- return mPreloadStateStorage->Clear();
-}
-
-bool entryStateNotOK(SiteHPKPState& state, mozilla::pkix::Time& aEvalTime) {
- return state.mState != SecurityPropertySet || state.IsExpired(aEvalTime) ||
- state.mSHA256keys.Length() < 1;
-}
-
-NS_IMETHODIMP
-nsSiteSecurityService::GetKeyPinsForHostname(const char* aHostname,
- mozilla::pkix::Time& aEvalTime,
- /*out*/ nsTArray<nsCString>& pinArray,
- /*out*/ bool* aIncludeSubdomains,
- /*out*/ bool* aFound) {
- // Child processes are not allowed direct access to this.
- if (!XRE_IsParentProcess()) {
- MOZ_CRASH("Child process: no direct access to nsISiteSecurityService::GetKeyPinsForHostname");
- }
-
- NS_ENSURE_ARG(aFound);
- NS_ENSURE_ARG(aHostname);
-
- if (!mHPKPEnabled) {
- SSSLOG(("HPKP disabled - returning 'pins not found' for %s",
- aHostname));
- *aFound = false;
- return NS_OK;
- }
-
- SSSLOG(("Top of GetKeyPinsForHostname for %s", aHostname));
- *aFound = false;
- *aIncludeSubdomains = false;
- pinArray.Clear();
-
- nsAutoCString host(PublicKeyPinningService::CanonicalizeHostname(aHostname));
- nsAutoCString storageKey;
- SetStorageKey(storageKey, host, nsISiteSecurityService::HEADER_HPKP);
-
- SSSLOG(("storagekey '%s'\n", storageKey.get()));
- mozilla::DataStorageType storageType = mozilla::DataStorage_Persistent;
- nsCString value = mSiteStateStorage->Get(storageKey, storageType);
-
- // decode now
- SiteHPKPState foundEntry(value);
- if (entryStateNotOK(foundEntry, aEvalTime)) {
- // not in permanent storage, try now private
- value = mSiteStateStorage->Get(storageKey, mozilla::DataStorage_Private);
- SiteHPKPState privateEntry(value);
- if (entryStateNotOK(privateEntry, aEvalTime)) {
- // not in private storage, try dynamic preload
- value = mPreloadStateStorage->Get(storageKey,
- mozilla::DataStorage_Persistent);
- SiteHPKPState preloadEntry(value);
- if (entryStateNotOK(preloadEntry, aEvalTime)) {
- return NS_OK;
- }
- foundEntry = preloadEntry;
- } else {
- foundEntry = privateEntry;
- }
- }
- pinArray = foundEntry.mSHA256keys;
- *aIncludeSubdomains = foundEntry.mIncludeSubdomains;
- *aFound = true;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsSiteSecurityService::SetKeyPins(const char* aHost, bool aIncludeSubdomains,
- int64_t aExpires, uint32_t aPinCount,
- const char** aSha256Pins,
- bool aIsPreload,
- /*out*/ bool* aResult)
-{
- // Child processes are not allowed direct access to this.
- if (!XRE_IsParentProcess()) {
- MOZ_CRASH("Child process: no direct access to nsISiteSecurityService::SetKeyPins");
- }
-
- NS_ENSURE_ARG_POINTER(aHost);
- NS_ENSURE_ARG_POINTER(aResult);
- NS_ENSURE_ARG_POINTER(aSha256Pins);
-
-
- if (!mHPKPEnabled) {
- SSSLOG(("SSS: HPKP disabled: not setting pins"));
- *aResult = false;
- return NS_OK;
- }
-
- SSSLOG(("Top of SetPins"));
-
- nsTArray<nsCString> sha256keys;
- for (unsigned int i = 0; i < aPinCount; i++) {
- nsAutoCString pin(aSha256Pins[i]);
- SSSLOG(("SetPins pin=%s\n", pin.get()));
- if (!stringIsBase64EncodingOf256bitValue(pin)) {
- return NS_ERROR_INVALID_ARG;
- }
- sha256keys.AppendElement(pin);
- }
- SiteHPKPState dynamicEntry(aExpires, SecurityPropertySet,
- aIncludeSubdomains, sha256keys);
- // we always store data in permanent storage (ie no flags)
- nsAutoCString host(PublicKeyPinningService::CanonicalizeHostname(aHost));
- return SetHPKPState(host.get(), dynamicEntry, 0, aIsPreload);
-}
-
-nsresult
-nsSiteSecurityService::SetHPKPState(const char* aHost, SiteHPKPState& entry,
- uint32_t aFlags, bool aIsPreload)
-{
- SSSLOG(("Top of SetPKPState"));
- nsAutoCString host(aHost);
- nsAutoCString storageKey;
- SetStorageKey(storageKey, host, nsISiteSecurityService::HEADER_HPKP);
- bool isPrivate = aFlags & nsISocketProvider::NO_PERMANENT_STORAGE;
- mozilla::DataStorageType storageType = isPrivate
- ? mozilla::DataStorage_Private
- : mozilla::DataStorage_Persistent;
- nsAutoCString stateString;
- entry.ToString(stateString);
-
- nsresult rv;
- if (aIsPreload) {
- rv = mPreloadStateStorage->Put(storageKey, stateString, storageType);
- } else {
- rv = mSiteStateStorage->Put(storageKey, stateString, storageType);
- }
- NS_ENSURE_SUCCESS(rv, rv);
- return NS_OK;
-}
-
//------------------------------------------------------------
// nsSiteSecurityService::nsIObserver
//------------------------------------------------------------
@@ -1337,18 +705,10 @@ nsSiteSecurityService::Observe(nsISupports *subject,
}
if (strcmp(topic, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) == 0) {
- mUsePreloadList = mozilla::Preferences::GetBool(
- "network.stricttransportsecurity.preloadlist", true);
mUseStsService = mozilla::Preferences::GetBool(
"network.stricttransportsecurity.enabled", true);
mPreloadListTimeOffset =
mozilla::Preferences::GetInt("test.currentTimeOffsetSeconds", 0);
- mHPKPEnabled = mozilla::Preferences::GetBool(
- "security.cert_pinning.hpkp.enabled", false);
- mProcessPKPHeadersFromNonBuiltInRoots = mozilla::Preferences::GetBool(
- "security.cert_pinning.process_headers_from_non_builtin_roots", false);
- mMaxMaxAge = mozilla::Preferences::GetInt(
- "security.cert_pinning.max_max_age_seconds", kSixtyDaysInSeconds);
}
return NS_OK;
diff --git a/security/manager/ssl/nsSiteSecurityService.h b/security/manager/ssl/nsSiteSecurityService.h
index c14543684f..9395cd092f 100644
--- a/security/manager/ssl/nsSiteSecurityService.h
+++ b/security/manager/ssl/nsSiteSecurityService.h
@@ -17,10 +17,10 @@
class nsIURI;
class nsISSLStatus;
-// {16955eee-6c48-4152-9309-c42a465138a1}
+// 91ea3803-9c79-45d9-97bf-88bc80269236
#define NS_SITE_SECURITY_SERVICE_CID \
- {0x16955eee, 0x6c48, 0x4152, \
- {0x93, 0x09, 0xc4, 0x2a, 0x46, 0x51, 0x38, 0xa1} }
+ { 0x91ea3803, 0x9c79, 0x45d9, \
+ { 0x97, 0xbf, 0x88, 0xbc, 0x80, 0x26, 0x92, 0x36 } }
/**
* SecurityPropertyState: A utility enum for representing the different states
@@ -39,40 +39,6 @@ enum SecurityPropertyState {
};
/**
- * SiteHPKPState: A utility class that encodes/decodes a string describing
- * the public key pins of a site.
- * HPKP state consists of:
- * - Expiry time (PRTime (aka int64_t) in milliseconds)
- * - A state flag (SecurityPropertyState, default SecurityPropertyUnset)
- * - An include subdomains flag (bool, default false)
- * - An array of sha-256 hashed base 64 encoded fingerprints of required keys
- */
-class SiteHPKPState
-{
-public:
- SiteHPKPState();
- explicit SiteHPKPState(nsCString& aStateString);
- SiteHPKPState(PRTime aExpireTime, SecurityPropertyState aState,
- bool aIncludeSubdomains, nsTArray<nsCString>& SHA256keys);
-
- PRTime mExpireTime;
- SecurityPropertyState mState;
- bool mIncludeSubdomains;
- nsTArray<nsCString> mSHA256keys;
-
- bool IsExpired(mozilla::pkix::Time aTime)
- {
- if (aTime > mozilla::pkix::TimeFromEpochInSeconds(mExpireTime /
- PR_MSEC_PER_SEC)) {
- return true;
- }
- return false;
- }
-
- void ToString(nsCString& aString);
-};
-
-/**
* SiteHSTSState: A utility class that encodes/decodes a string describing
* the security state of a site. Currently only handles HSTS.
* HSTS state consists of:
@@ -110,8 +76,6 @@ public:
void ToString(nsCString &aString);
};
-class nsSTSPreload;
-
class nsSiteSecurityService : public nsISiteSecurityService
, public nsIObserver
{
@@ -139,23 +103,10 @@ private:
nsresult ProcessSTSHeader(nsIURI* aSourceURI, const char* aHeader,
uint32_t flags, uint64_t* aMaxAge,
bool* aIncludeSubdomains, uint32_t* aFailureResult);
- nsresult ProcessPKPHeader(nsIURI* aSourceURI, const char* aHeader,
- nsISSLStatus* aSSLStatus, uint32_t flags,
- uint64_t* aMaxAge, bool* aIncludeSubdomains,
- uint32_t* aFailureResult);
- nsresult SetHPKPState(const char* aHost, SiteHPKPState& entry, uint32_t flags,
- bool aIsPreload);
-
- const nsSTSPreload *GetPreloadListEntry(const char *aHost);
- uint64_t mMaxMaxAge;
- bool mUsePreloadList;
bool mUseStsService;
int64_t mPreloadListTimeOffset;
- bool mHPKPEnabled;
- bool mProcessPKPHeadersFromNonBuiltInRoots;
RefPtr<mozilla::DataStorage> mSiteStateStorage;
- RefPtr<mozilla::DataStorage> mPreloadStateStorage;
};
#endif // __nsSiteSecurityService_h__
diff --git a/security/manager/ssl/tests/unit/test_pinning.js b/security/manager/ssl/tests/unit/test_pinning.js
deleted file mode 100644
index f181820029..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning.js
+++ /dev/null
@@ -1,266 +0,0 @@
-// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this
-// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-//
-// For all cases, the acceptable pinset includes only certificates pinned to
-// Test End Entity Cert (signed by issuer testCA). Other certificates
-// are issued by otherCA, which is never in the pinset but is a user-specified
-// trust anchor. This test covers multiple cases:
-//
-// Pinned domain include-subdomains.pinning.example.com includes subdomains
-// - PASS: include-subdomains.pinning.example.com serves a correct cert
-// - PASS: good.include-subdomains.pinning.example.com serves a correct cert
-// - FAIL (strict): bad.include-subdomains.pinning.example.com serves a cert
-// not in the pinset
-// - PASS (mitm): bad.include-subdomains.pinning.example.com serves a cert not
-// in the pinset, but issued by a user-specified trust domain
-//
-// Pinned domain exclude-subdomains.pinning.example.com excludes subdomains
-// - PASS: exclude-subdomains.pinning.example.com serves a correct cert
-// - FAIL: exclude-subdomains.pinning.example.com serves an incorrect cert
-// (TODO: test using verifyCertNow)
-// - PASS: sub.exclude-subdomains.pinning.example.com serves an incorrect cert
-
-"use strict";
-
-do_get_profile(); // must be called before getting nsIX509CertDB
-const certdb = Cc["@mozilla.org/security/x509certdb;1"]
- .getService(Ci.nsIX509CertDB);
-
-function add_clear_override(host) {
- add_test(function() {
- let certOverrideService = Cc["@mozilla.org/security/certoverride;1"]
- .getService(Ci.nsICertOverrideService);
- certOverrideService.clearValidityOverride(host, 8443);
- run_next_test();
- });
-}
-
-function test_strict() {
- // In strict mode, we always evaluate pinning data, regardless of whether the
- // issuer is a built-in trust anchor. We only enforce pins that are not in
- // test mode.
- add_test(function() {
- Services.prefs.setIntPref("security.cert_pinning.enforcement_level", 2);
- run_next_test();
- });
-
- // Normally this is overridable. But, since we have pinning information for
- // this host, we don't allow overrides.
- add_prevented_cert_override_test(
- "unknownissuer.include-subdomains.pinning.example.com",
- Ci.nsICertOverrideService.ERROR_UNTRUSTED,
- SEC_ERROR_UNKNOWN_ISSUER);
- add_clear_override("unknownissuer.include-subdomains.pinning.example.com");
-
- // Issued by otherCA, which is not in the pinset for pinning.example.com.
- add_connection_test("bad.include-subdomains.pinning.example.com",
- MOZILLA_PKIX_ERROR_KEY_PINNING_FAILURE);
-
- // Check that using a FQDN doesn't bypass pinning.
- add_connection_test("bad.include-subdomains.pinning.example.com.",
- MOZILLA_PKIX_ERROR_KEY_PINNING_FAILURE);
- // For some reason this is also navigable (see bug 1118522).
- add_connection_test("bad.include-subdomains.pinning.example.com..",
- MOZILLA_PKIX_ERROR_KEY_PINNING_FAILURE);
-
- // These domains serve certs that match the pinset.
- add_connection_test("include-subdomains.pinning.example.com",
- PRErrorCodeSuccess);
- add_connection_test("good.include-subdomains.pinning.example.com",
- PRErrorCodeSuccess);
- add_connection_test("exclude-subdomains.pinning.example.com",
- PRErrorCodeSuccess);
-
- // This domain serves a cert that doesn't match the pinset, but subdomains
- // are excluded.
- add_connection_test("sub.exclude-subdomains.pinning.example.com",
- PRErrorCodeSuccess);
-
- // This domain's pinset is exactly the same as
- // include-subdomains.pinning.example.com, serves the same cert as
- // bad.include-subdomains.pinning.example.com, but it should pass because
- // it's in test_mode.
- add_connection_test("test-mode.pinning.example.com",
- PRErrorCodeSuccess);
- // Similarly, this pin is in test-mode, so it should be overridable.
- add_cert_override_test("unknownissuer.test-mode.pinning.example.com",
- Ci.nsICertOverrideService.ERROR_UNTRUSTED,
- SEC_ERROR_UNKNOWN_ISSUER);
- add_clear_override("unknownissuer.test-mode.pinning.example.com");
-}
-
-function test_mitm() {
- // In MITM mode, we allow pinning to pass if the chain resolves to any
- // user-specified trust anchor, even if it is not in the pinset.
- add_test(function() {
- Services.prefs.setIntPref("security.cert_pinning.enforcement_level", 1);
- run_next_test();
- });
-
- add_connection_test("include-subdomains.pinning.example.com",
- PRErrorCodeSuccess);
- add_connection_test("good.include-subdomains.pinning.example.com",
- PRErrorCodeSuccess);
-
- // Normally this is overridable. But, since we have pinning information for
- // this host, we don't allow overrides (since building a trusted chain fails,
- // we have no reason to believe this was issued by a user-added trust
- // anchor, so we can't allow overrides for it).
- add_prevented_cert_override_test(
- "unknownissuer.include-subdomains.pinning.example.com",
- Ci.nsICertOverrideService.ERROR_UNTRUSTED,
- SEC_ERROR_UNKNOWN_ISSUER);
- add_clear_override("unknownissuer.include-subdomains.pinning.example.com");
-
- // In this case, even though otherCA is not in the pinset, it is a
- // user-specified trust anchor and the pinning check succeeds.
- add_connection_test("bad.include-subdomains.pinning.example.com",
- PRErrorCodeSuccess);
-
- add_connection_test("exclude-subdomains.pinning.example.com",
- PRErrorCodeSuccess);
- add_connection_test("sub.exclude-subdomains.pinning.example.com",
- PRErrorCodeSuccess);
- add_connection_test("test-mode.pinning.example.com", PRErrorCodeSuccess);
- add_cert_override_test("unknownissuer.test-mode.pinning.example.com",
- Ci.nsICertOverrideService.ERROR_UNTRUSTED,
- SEC_ERROR_UNKNOWN_ISSUER);
- add_clear_override("unknownissuer.test-mode.pinning.example.com");
-}
-
-function test_disabled() {
- // Disable pinning.
- add_test(function() {
- Services.prefs.setIntPref("security.cert_pinning.enforcement_level", 0);
- run_next_test();
- });
-
- add_connection_test("include-subdomains.pinning.example.com",
- PRErrorCodeSuccess);
- add_connection_test("good.include-subdomains.pinning.example.com",
- PRErrorCodeSuccess);
- add_connection_test("bad.include-subdomains.pinning.example.com",
- PRErrorCodeSuccess);
- add_connection_test("exclude-subdomains.pinning.example.com",
- PRErrorCodeSuccess);
- add_connection_test("sub.exclude-subdomains.pinning.example.com",
- PRErrorCodeSuccess);
- add_connection_test("test-mode.pinning.example.com", PRErrorCodeSuccess);
-
- add_cert_override_test("unknownissuer.include-subdomains.pinning.example.com",
- Ci.nsICertOverrideService.ERROR_UNTRUSTED,
- SEC_ERROR_UNKNOWN_ISSUER);
- add_clear_override("unknownissuer.include-subdomains.pinning.example.com");
- add_cert_override_test("unknownissuer.test-mode.pinning.example.com",
- Ci.nsICertOverrideService.ERROR_UNTRUSTED,
- SEC_ERROR_UNKNOWN_ISSUER);
- add_clear_override("unknownissuer.test-mode.pinning.example.com");
-}
-
-function test_enforce_test_mode() {
- // In enforce test mode, we always enforce all pins, even test pins.
- add_test(function() {
- Services.prefs.setIntPref("security.cert_pinning.enforcement_level", 3);
- run_next_test();
- });
-
- // Normally this is overridable. But, since we have pinning information for
- // this host, we don't allow overrides.
- add_prevented_cert_override_test(
- "unknownissuer.include-subdomains.pinning.example.com",
- Ci.nsICertOverrideService.ERROR_UNTRUSTED,
- SEC_ERROR_UNKNOWN_ISSUER);
- add_clear_override("unknownissuer.include-subdomains.pinning.example.com");
-
- // Issued by otherCA, which is not in the pinset for pinning.example.com.
- add_connection_test("bad.include-subdomains.pinning.example.com",
- MOZILLA_PKIX_ERROR_KEY_PINNING_FAILURE);
-
- // These domains serve certs that match the pinset.
- add_connection_test("include-subdomains.pinning.example.com",
- PRErrorCodeSuccess);
- add_connection_test("good.include-subdomains.pinning.example.com",
- PRErrorCodeSuccess);
- add_connection_test("exclude-subdomains.pinning.example.com",
- PRErrorCodeSuccess);
-
- // This domain serves a cert that doesn't match the pinset, but subdomains
- // are excluded.
- add_connection_test("sub.exclude-subdomains.pinning.example.com",
- PRErrorCodeSuccess);
-
- // This domain's pinset is exactly the same as
- // include-subdomains.pinning.example.com, serves the same cert as
- // bad.include-subdomains.pinning.example.com, is in test-mode, but we are
- // enforcing test mode pins.
- add_connection_test("test-mode.pinning.example.com",
- MOZILLA_PKIX_ERROR_KEY_PINNING_FAILURE);
- // Normally this is overridable. But, since we have pinning information for
- // this host (and since we're enforcing test mode), we don't allow overrides.
- add_prevented_cert_override_test(
- "unknownissuer.test-mode.pinning.example.com",
- Ci.nsICertOverrideService.ERROR_UNTRUSTED,
- SEC_ERROR_UNKNOWN_ISSUER);
- add_clear_override("unknownissuer.test-mode.pinning.example.com");
-}
-
-function check_pinning_telemetry() {
- let service = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry);
- let prod_histogram = service.getHistogramById("CERT_PINNING_RESULTS")
- .snapshot();
- let test_histogram = service.getHistogramById("CERT_PINNING_TEST_RESULTS")
- .snapshot();
- // Because all of our test domains are pinned to user-specified trust
- // anchors, effectively only strict mode and enforce test-mode get evaluated
- equal(prod_histogram.counts[0], 4,
- "Actual and expected prod (non-Mozilla) failure count should match");
- equal(prod_histogram.counts[1], 4,
- "Actual and expected prod (non-Mozilla) success count should match");
- equal(test_histogram.counts[0], 2,
- "Actual and expected test (non-Mozilla) failure count should match");
- equal(test_histogram.counts[1], 0,
- "Actual and expected test (non-Mozilla) success count should match");
-
- let moz_prod_histogram = service.getHistogramById("CERT_PINNING_MOZ_RESULTS")
- .snapshot();
- let moz_test_histogram =
- service.getHistogramById("CERT_PINNING_MOZ_TEST_RESULTS").snapshot();
- equal(moz_prod_histogram.counts[0], 0,
- "Actual and expected prod (Mozilla) failure count should match");
- equal(moz_prod_histogram.counts[1], 0,
- "Actual and expected prod (Mozilla) success count should match");
- equal(moz_test_histogram.counts[0], 0,
- "Actual and expected test (Mozilla) failure count should match");
- equal(moz_test_histogram.counts[1], 0,
- "Actual and expected test (Mozilla) success count should match");
-
- let per_host_histogram =
- service.getHistogramById("CERT_PINNING_MOZ_RESULTS_BY_HOST").snapshot();
- equal(per_host_histogram.counts[0], 0,
- "Actual and expected per host (Mozilla) failure count should match");
- equal(per_host_histogram.counts[1], 2,
- "Actual and expected per host (Mozilla) success count should match");
- run_next_test();
-}
-
-function run_test() {
- // Ensure that static pinning works when HPKP is disabled.
- Services.prefs.setBoolPref("security.cert_pinning.hpkp.enabled", false);
-
- add_tls_server_setup("BadCertServer", "bad_certs");
-
- // Add a user-specified trust anchor.
- addCertFromFile(certdb, "bad_certs/other-test-ca.pem", "CTu,u,u");
-
- test_strict();
- test_mitm();
- test_disabled();
- test_enforce_test_mode();
-
- add_test(function () {
- check_pinning_telemetry();
- });
- run_next_test();
-}
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic.js b/security/manager/ssl/tests/unit/test_pinning_dynamic.js
deleted file mode 100644
index 7333ad6b3e..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic.js
+++ /dev/null
@@ -1,247 +0,0 @@
-/* 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/. */
-"use strict";
-
-// The purpose of this test is to create a site security service state file
-// and see that the site security service reads it properly.
-
-function writeLine(aLine, aOutputStream) {
- aOutputStream.write(aLine, aLine.length);
-}
-
-var gSSService = null;
-var gSSSStateSeen = false;
-var gPreloadStateSeen = false;
-
-var profileDir = do_get_profile();
-var certdb;
-
-function certFromFile(cert_name) {
- return constructCertFromFile("test_pinning_dynamic/" + cert_name + ".pem");
-}
-
-function loadCert(cert_name, trust_string) {
- let cert_filename = "test_pinning_dynamic/" + cert_name + ".pem";
- addCertFromFile(certdb, cert_filename, trust_string);
- return constructCertFromFile(cert_filename);
-}
-
-function checkOK(cert, hostname) {
- return checkCertErrorGeneric(certdb, cert, PRErrorCodeSuccess,
- certificateUsageSSLServer, {}, hostname);
-}
-
-function checkFail(cert, hostname) {
- return checkCertErrorGeneric(certdb, cert, MOZILLA_PKIX_ERROR_KEY_PINNING_FAILURE,
- certificateUsageSSLServer, {}, hostname);
-}
-
-const NON_ISSUED_KEY_HASH = "KHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN=";
-const PINNING_ROOT_KEY_HASH = "VCIlmPM9NkgFQtrs4Oa5TeFcDu6MWRTKSNdePEhOgD8=";
-
-function run_test() {
- Services.prefs.setBoolPref("security.cert_pinning.hpkp.enabled", true);
- Services.prefs.setIntPref("security.cert_pinning.enforcement_level", 2);
-
- let stateFile = profileDir.clone();
- stateFile.append(SSS_STATE_FILE_NAME);
- // Assuming we're working with a clean slate, the SSS_STATE file shouldn't
- // exist until we create it.
- ok(!stateFile.exists(),
- "State file should not exist when working with a clean slate");
- let outputStream = FileUtils.openFileOutputStream(stateFile);
- let now = (new Date()).getTime();
- writeLine(`a.pinning2.example.com:HPKP\t0\t0\t${now + 100000},1,0,${PINNING_ROOT_KEY_HASH}\n`, outputStream);
- writeLine(`b.pinning2.example.com:HPKP\t0\t0\t${now + 100000},1,1,${PINNING_ROOT_KEY_HASH}\n`, outputStream);
-
- outputStream.close();
-
- let preloadFile = profileDir.clone();
- preloadFile.append(PRELOAD_STATE_FILE_NAME);
- ok(!preloadFile.exists(),
- "Preload file should not exist when working with a clean slate");
-
- outputStream = FileUtils.openFileOutputStream(preloadFile);
- writeLine(`a.preload.example.com:HPKP\t0\t0\t${now + 100000},1,1,${PINNING_ROOT_KEY_HASH}\n`, outputStream);
- outputStream.close();
-
- Services.obs.addObserver(checkStateRead, "data-storage-ready", false);
- do_test_pending();
- gSSService = Cc["@mozilla.org/ssservice;1"]
- .getService(Ci.nsISiteSecurityService);
- notEqual(gSSService, null,
- "SiteSecurityService should have initialized successfully using" +
- " the generated state file");
-}
-
-function checkDefaultSiteHPKPStatus() {
- ok(gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HPKP,
- "a.pinning2.example.com", 0),
- "a.pinning2.example.com should have HPKP status");
- ok(!gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HPKP,
- "x.a.pinning2.example.com", 0),
- "x.a.pinning2.example.com should not have HPKP status");
- ok(gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HPKP,
- "b.pinning2.example.com", 0),
- "b.pinning2.example.com should have HPKP status");
- ok(gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HPKP,
- "x.b.pinning2.example.com", 0),
- "x.b.pinning2.example.com should have HPKP status");
-}
-
-function checkStateRead(aSubject, aTopic, aData) {
- if (aData == SSS_STATE_FILE_NAME) {
- gSSSStateSeen = true;
- } else if (aData == PRELOAD_STATE_FILE_NAME) {
- gPreloadStateSeen = true;
- } else {
- throw new Error("Observed data should either be the Site Security " +
- "Service state file name or the preload file name");
- }
-
- if (!gSSSStateSeen || !gPreloadStateSeen) {
- return;
- }
-
- notEqual(gSSService, null, "SiteSecurityService should be initialized");
-
- // Initializing the certificate DB will cause NSS-initialization, which in
- // turn initializes the site security service. Since we're in part testing
- // that the site security service correctly reads its state file, we have to
- // make sure it doesn't start up before we've populated the file
- certdb = Cc["@mozilla.org/security/x509certdb;1"]
- .getService(Ci.nsIX509CertDB);
-
- loadCert("pinningroot", "CTu,CTu,CTu");
- loadCert("badca", "CTu,CTu,CTu");
-
- // the written entry is for a.pinning2.example.com without subdomains
- // and b.pinning2.example.com with subdomains
- checkFail(certFromFile('a.pinning2.example.com-badca'), "a.pinning2.example.com");
- checkOK(certFromFile('a.pinning2.example.com-pinningroot'), "a.pinning2.example.com");
- checkOK(certFromFile('x.a.pinning2.example.com-badca'), "x.a.pinning2.example.com");
- checkOK(certFromFile('x.a.pinning2.example.com-pinningroot'), "x.a.pinning2.example.com");
-
- checkFail(certFromFile('b.pinning2.example.com-badca'), "b.pinning2.example.com");
- checkOK(certFromFile('b.pinning2.example.com-pinningroot'), "b.pinning2.example.com");
- checkFail(certFromFile('x.b.pinning2.example.com-badca'), "x.b.pinning2.example.com");
- checkOK(certFromFile('x.b.pinning2.example.com-pinningroot'), "x.b.pinning2.example.com");
-
- checkDefaultSiteHPKPStatus();
-
-
- // add includeSubdomains to a.pinning2.example.com
- gSSService.setKeyPins("a.pinning2.example.com", true,
- new Date().getTime() + 1000000, 2,
- [NON_ISSUED_KEY_HASH, PINNING_ROOT_KEY_HASH]);
- checkFail(certFromFile('a.pinning2.example.com-badca'), "a.pinning2.example.com");
- checkOK(certFromFile('a.pinning2.example.com-pinningroot'), "a.pinning2.example.com");
- checkFail(certFromFile('x.a.pinning2.example.com-badca'), "x.a.pinning2.example.com");
- checkOK(certFromFile('x.a.pinning2.example.com-pinningroot'), "x.a.pinning2.example.com");
- checkFail(certFromFile('b.pinning2.example.com-badca'), "b.pinning2.example.com");
- checkOK(certFromFile('b.pinning2.example.com-pinningroot'), "b.pinning2.example.com");
- checkFail(certFromFile('x.b.pinning2.example.com-badca'), "x.b.pinning2.example.com");
- checkOK(certFromFile('x.b.pinning2.example.com-pinningroot'), "x.b.pinning2.example.com");
-
- ok(gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HPKP,
- "a.pinning2.example.com", 0),
- "a.pinning2.example.com should still have HPKP status after adding" +
- " includeSubdomains to a.pinning2.example.com");
- ok(gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HPKP,
- "x.a.pinning2.example.com", 0),
- "x.a.pinning2.example.com should now have HPKP status after adding" +
- " includeSubdomains to a.pinning2.example.com");
-
- // Now setpins without subdomains
- gSSService.setKeyPins("a.pinning2.example.com", false,
- new Date().getTime() + 1000000, 2,
- [NON_ISSUED_KEY_HASH, PINNING_ROOT_KEY_HASH]);
- checkFail(certFromFile('a.pinning2.example.com-badca'), "a.pinning2.example.com");
- checkOK(certFromFile('a.pinning2.example.com-pinningroot'), "a.pinning2.example.com");
- checkOK(certFromFile('x.a.pinning2.example.com-badca'), "x.a.pinning2.example.com");
- checkOK(certFromFile('x.a.pinning2.example.com-pinningroot'), "x.a.pinning2.example.com");
-
- checkFail(certFromFile('b.pinning2.example.com-badca'), "b.pinning2.example.com");
- checkOK(certFromFile('b.pinning2.example.com-pinningroot'), "b.pinning2.example.com");
- checkFail(certFromFile('x.b.pinning2.example.com-badca'), "x.b.pinning2.example.com");
- checkOK(certFromFile('x.b.pinning2.example.com-pinningroot'), "x.b.pinning2.example.com");
-
- checkDefaultSiteHPKPStatus();
-
- // failure to insert new pin entry leaves previous pin behavior
- throws(() => {
- gSSService.setKeyPins("a.pinning2.example.com", true,
- new Date().getTime() + 1000000, 1, ["not a hash"]);
- }, /NS_ERROR_ILLEGAL_VALUE/, "Attempting to set an invalid pin should fail");
- checkFail(certFromFile('a.pinning2.example.com-badca'), "a.pinning2.example.com");
- checkOK(certFromFile('a.pinning2.example.com-pinningroot'), "a.pinning2.example.com");
- checkOK(certFromFile('x.a.pinning2.example.com-badca'), "x.a.pinning2.example.com");
- checkOK(certFromFile('x.a.pinning2.example.com-pinningroot'), "x.a.pinning2.example.com");
-
- checkFail(certFromFile('b.pinning2.example.com-badca'), "b.pinning2.example.com");
- checkOK(certFromFile('b.pinning2.example.com-pinningroot'), "b.pinning2.example.com");
- checkFail(certFromFile('x.b.pinning2.example.com-badca'), "x.b.pinning2.example.com");
- checkOK(certFromFile('x.b.pinning2.example.com-pinningroot'), "x.b.pinning2.example.com");
-
- checkDefaultSiteHPKPStatus();
-
- // Incorrect size results in failure
- throws(() => {
- gSSService.setKeyPins("a.pinning2.example.com", true,
- new Date().getTime() + 1000000, 2, ["not a hash"]);
- }, /NS_ERROR_XPC_NOT_ENOUGH_ELEMENTS_IN_ARRAY/,
- "Attempting to set a pin with an incorrect size should fail");
-
- // Ensure built-in pins work as expected
- ok(!gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HPKP,
- "nonexistent.example.com", 0),
- "Not built-in nonexistent.example.com should not have HPKP status");
- ok(gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HPKP,
- "include-subdomains.pinning.example.com", 0),
- "Built-in include-subdomains.pinning.example.com should have HPKP status");
-
- gSSService.setKeyPins("a.pinning2.example.com", false, new Date().getTime(),
- 1, [NON_ISSUED_KEY_HASH]);
-
- // Check that a preload pin loaded from file works as expected
- checkFail(certFromFile("a.preload.example.com-badca"), "a.preload.example.com");
- checkOK(certFromFile("a.preload.example.com-pinningroot"), "a.preload.example.com");
-
- // Check a dynamic addition works as expected
- // first, it should succeed with the badCA - because there's no pin
- checkOK(certFromFile('b.preload.example.com-badca'), "b.preload.example.com");
- // then we add a pin, and we should get a failure (ensuring the expiry is
- // after the test timeout)
- gSSService.setKeyPins("b.preload.example.com", false,
- new Date().getTime() + 1000000, 2,
- [NON_ISSUED_KEY_HASH, PINNING_ROOT_KEY_HASH], true);
- checkFail(certFromFile('b.preload.example.com-badca'), "b.preload.example.com");
-
- do_timeout(1250, checkExpiredState);
-}
-
-function checkExpiredState() {
- checkOK(certFromFile('a.pinning2.example.com-badca'), "a.pinning2.example.com");
- checkOK(certFromFile('a.pinning2.example.com-pinningroot'), "a.pinning2.example.com");
- checkOK(certFromFile('x.a.pinning2.example.com-badca'), "x.a.pinning2.example.com");
- checkOK(certFromFile('x.a.pinning2.example.com-pinningroot'), "x.a.pinning2.example.com");
-
- checkFail(certFromFile('b.pinning2.example.com-badca'), "b.pinning2.example.com");
- checkOK(certFromFile('b.pinning2.example.com-pinningroot'), "b.pinning2.example.com");
- checkFail(certFromFile('x.b.pinning2.example.com-badca'), "x.b.pinning2.example.com");
- checkOK(certFromFile('x.b.pinning2.example.com-pinningroot'), "x.b.pinning2.example.com");
- checkPreloadClear();
-}
-
-function checkPreloadClear() {
- // Check that the preloaded pins still work after private data is cleared
- gSSService.clearAll();
- checkFail(certFromFile('b.preload.example.com-badca'), "b.preload.example.com");
-
- // Check that the preloaded pins are cleared when we clear preloads
- gSSService.clearPreloads();
- checkOK(certFromFile('b.preload.example.com-badca'), "b.preload.example.com");
-
- do_test_finished();
-}
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/a.pinning2.example.com-badca.pem b/security/manager/ssl/tests/unit/test_pinning_dynamic/a.pinning2.example.com-badca.pem
deleted file mode 100644
index 102a3bbda5..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/a.pinning2.example.com-badca.pem
+++ /dev/null
@@ -1,18 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIC3TCCAcegAwIBAgIUXdB7LgBGZoRV1UmEFcsOhMigpB0wCwYJKoZIhvcNAQEL
-MBAxDjAMBgNVBAMMBWJhZGNhMCIYDzIwMTUxMTI4MDAwMDAwWhgPMjAxODAyMDUw
-MDAwMDBaMBoxGDAWBgNVBAMMD3Rlc3QgZW5kLWVudGl0eTCCASIwDQYJKoZIhvcN
-AQEBBQADggEPADCCAQoCggEBAMF1xlJmCZ93CCpnkfG4dsN/XOU4sGxKzSKxy9Rv
-plraKt1ByMJJisSjs8H2FIf0G2mJQb2ApRw8EgJExYSkxEgzBeUTjAEGzwi+moYn
-YLrmoujzbyPF2YMTud+vN4NF2s5R1Nbc0qbLPMcG680wcOyYzOQKpZHXKVp/ccW+
-ZmkdKy3+yElEWQvFo+pJ/ZOx11NAXxdzdpmVhmYlR5ftQmkIiAgRQiBpmIpD/uSM
-5oeB3SK2ppzSg3UTH5MrEozihvp9JRwGKtJ+8Bbxh83VToMrNbiTD3S6kKqLx2Fn
-JCqx/W1iFA0YxMC4xo/DdIRXMkrX3obmVS8dHhkdcSFo07sCAwEAAaMlMCMwIQYD
-VR0RBBowGIIWYS5waW5uaW5nMi5leGFtcGxlLmNvbTALBgkqhkiG9w0BAQsDggEB
-AAKhpX2t/Bz9//u1DYyLZ6dLSJt121Vb58s8gQvI/7n6MdUP1IniQLbtPW+7wnV0
-6LYagJQ11ZUJMxYUs6lB91yhwAO9NoN4QJWWB0i23DoZ6cg4dHmYKmQQ/HRndwm+
-EATkJSnBAk8O2xmIm8CXbJ0W0lvaXEjzRfeoiEjQ0/THeo4hXvGOMPm31d+r4ji5
-/u2+9jrpTII0kjCwFjqC97lPID14s9QRMqMB1CCV6fgT19EGYi9I7H6mnyukkmfX
-9wOhLHSk6A2l5+5eJrZYXLOhcS31VBd54sb1Vvg+Bp05HMYjo051JcRlvxoIUsHT
-JQDn8QrzwZBDBh4Pie3AwOM=
------END CERTIFICATE----- \ No newline at end of file
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/a.pinning2.example.com-badca.pem.certspec b/security/manager/ssl/tests/unit/test_pinning_dynamic/a.pinning2.example.com-badca.pem.certspec
deleted file mode 100644
index f365b8a182..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/a.pinning2.example.com-badca.pem.certspec
+++ /dev/null
@@ -1,5 +0,0 @@
-issuer:badca
-subject:test end-entity
-issuerKey:alternate
-subjectKey:alternate
-extension:subjectAlternativeName:a.pinning2.example.com
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/a.pinning2.example.com-pinningroot.pem b/security/manager/ssl/tests/unit/test_pinning_dynamic/a.pinning2.example.com-pinningroot.pem
deleted file mode 100644
index 2439b5775a..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/a.pinning2.example.com-pinningroot.pem
+++ /dev/null
@@ -1,18 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIC4zCCAc2gAwIBAgIUPQgjdPeWdWy/0oKRi+5Lr7JJorMwCwYJKoZIhvcNAQEL
-MBYxFDASBgNVBAMMC3Bpbm5pbmdyb290MCIYDzIwMTUxMTI4MDAwMDAwWhgPMjAx
-ODAyMDUwMDAwMDBaMBoxGDAWBgNVBAMMD3Rlc3QgZW5kLWVudGl0eTCCASIwDQYJ
-KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMF1xlJmCZ93CCpnkfG4dsN/XOU4sGxK
-zSKxy9RvplraKt1ByMJJisSjs8H2FIf0G2mJQb2ApRw8EgJExYSkxEgzBeUTjAEG
-zwi+moYnYLrmoujzbyPF2YMTud+vN4NF2s5R1Nbc0qbLPMcG680wcOyYzOQKpZHX
-KVp/ccW+ZmkdKy3+yElEWQvFo+pJ/ZOx11NAXxdzdpmVhmYlR5ftQmkIiAgRQiBp
-mIpD/uSM5oeB3SK2ppzSg3UTH5MrEozihvp9JRwGKtJ+8Bbxh83VToMrNbiTD3S6
-kKqLx2FnJCqx/W1iFA0YxMC4xo/DdIRXMkrX3obmVS8dHhkdcSFo07sCAwEAAaMl
-MCMwIQYDVR0RBBowGIIWYS5waW5uaW5nMi5leGFtcGxlLmNvbTALBgkqhkiG9w0B
-AQsDggEBAFUlxnwpxOFbSxtsBthWu6xmDxeFAzP+u5YOfuKeiIGnAx70k8ODQufJ
-Vm1rXvKtN5r8jR6AZh/hdA+tGhnu4+pGi9/aqWnaF1FEs2mW0saUV8atQZwNGRBO
-E9FXdAHA8WmGIfRf8TOuWpmEWejjJt5Zsfs+V3ARIxjCrVE7ixyfJ/hYpmthLtYJ
-5vgp0iiPjzorKeFnqooLVAfzeayRX0bE5H79NISIWq4CN/9J50ZFkRORURlANU95
-2Dcuw416b3BGrWVmWlKWOpA6NZ+Rj+AI+z9UTDpqCczTfMXMabX4EveW1GKMMYiA
-eLD8SY4VQ4403eaCp6rxYFrCNOeDczs=
------END CERTIFICATE----- \ No newline at end of file
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/a.pinning2.example.com-pinningroot.pem.certspec b/security/manager/ssl/tests/unit/test_pinning_dynamic/a.pinning2.example.com-pinningroot.pem.certspec
deleted file mode 100644
index aef72ce391..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/a.pinning2.example.com-pinningroot.pem.certspec
+++ /dev/null
@@ -1,4 +0,0 @@
-issuer:pinningroot
-subject:test end-entity
-subjectKey:alternate
-extension:subjectAlternativeName:a.pinning2.example.com
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/a.preload.example.com-badca.pem b/security/manager/ssl/tests/unit/test_pinning_dynamic/a.preload.example.com-badca.pem
deleted file mode 100644
index 2a157d8e6a..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/a.preload.example.com-badca.pem
+++ /dev/null
@@ -1,18 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIC3DCCAcagAwIBAgIUKUG7kBZ72CvuLQ0uPfjKHLkKDQAwCwYJKoZIhvcNAQEL
-MBAxDjAMBgNVBAMMBWJhZGNhMCIYDzIwMTUxMTI4MDAwMDAwWhgPMjAxODAyMDUw
-MDAwMDBaMBoxGDAWBgNVBAMMD3Rlc3QgZW5kLWVudGl0eTCCASIwDQYJKoZIhvcN
-AQEBBQADggEPADCCAQoCggEBAMF1xlJmCZ93CCpnkfG4dsN/XOU4sGxKzSKxy9Rv
-plraKt1ByMJJisSjs8H2FIf0G2mJQb2ApRw8EgJExYSkxEgzBeUTjAEGzwi+moYn
-YLrmoujzbyPF2YMTud+vN4NF2s5R1Nbc0qbLPMcG680wcOyYzOQKpZHXKVp/ccW+
-ZmkdKy3+yElEWQvFo+pJ/ZOx11NAXxdzdpmVhmYlR5ftQmkIiAgRQiBpmIpD/uSM
-5oeB3SK2ppzSg3UTH5MrEozihvp9JRwGKtJ+8Bbxh83VToMrNbiTD3S6kKqLx2Fn
-JCqx/W1iFA0YxMC4xo/DdIRXMkrX3obmVS8dHhkdcSFo07sCAwEAAaMkMCIwIAYD
-VR0RBBkwF4IVYS5wcmVsb2FkLmV4YW1wbGUuY29tMAsGCSqGSIb3DQEBCwOCAQEA
-tx5YO8uvYac92scnMEswv4ZIslou8UYV/2mtxA+MaXf/g+MizOKeZgTI1+b9hR48
-IDOgvrqPCbn1hKY6gb2gtRI1mC5dg9T8EYEXcC1TM+ncY/l4SZUjfMhzY2iOf62x
-jhDqMMt4V5uaHUxVmJQI82X5qpxH3yJ3WOC87iGZNfMB8MSbLM3lxor9OHeTlTHQ
-vPb/r7cLW+ikxirDGyBBvThkvDA/8qyN5Qp6Ae1BiPeEMoScNf3fChvNV6Jyb8g8
-e9q0LnTlTuVgaDWtg7PVOxeiI+wf3Jhv9uqXQLX8JHZDKebLbQEkNcbR4DK/8wsP
-uFhj0j8DY6+/YZbcF7Jgfw==
------END CERTIFICATE----- \ No newline at end of file
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/a.preload.example.com-badca.pem.certspec b/security/manager/ssl/tests/unit/test_pinning_dynamic/a.preload.example.com-badca.pem.certspec
deleted file mode 100644
index c1cb36576c..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/a.preload.example.com-badca.pem.certspec
+++ /dev/null
@@ -1,5 +0,0 @@
-issuer:badca
-subject:test end-entity
-issuerKey:alternate
-subjectKey:alternate
-extension:subjectAlternativeName:a.preload.example.com
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/a.preload.example.com-pinningroot.pem b/security/manager/ssl/tests/unit/test_pinning_dynamic/a.preload.example.com-pinningroot.pem
deleted file mode 100644
index 5fa43f0526..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/a.preload.example.com-pinningroot.pem
+++ /dev/null
@@ -1,18 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIC4jCCAcygAwIBAgIURV3mf9Dz42lALe31OAm2SYbpFaEwCwYJKoZIhvcNAQEL
-MBYxFDASBgNVBAMMC3Bpbm5pbmdyb290MCIYDzIwMTUxMTI4MDAwMDAwWhgPMjAx
-ODAyMDUwMDAwMDBaMBoxGDAWBgNVBAMMD3Rlc3QgZW5kLWVudGl0eTCCASIwDQYJ
-KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMF1xlJmCZ93CCpnkfG4dsN/XOU4sGxK
-zSKxy9RvplraKt1ByMJJisSjs8H2FIf0G2mJQb2ApRw8EgJExYSkxEgzBeUTjAEG
-zwi+moYnYLrmoujzbyPF2YMTud+vN4NF2s5R1Nbc0qbLPMcG680wcOyYzOQKpZHX
-KVp/ccW+ZmkdKy3+yElEWQvFo+pJ/ZOx11NAXxdzdpmVhmYlR5ftQmkIiAgRQiBp
-mIpD/uSM5oeB3SK2ppzSg3UTH5MrEozihvp9JRwGKtJ+8Bbxh83VToMrNbiTD3S6
-kKqLx2FnJCqx/W1iFA0YxMC4xo/DdIRXMkrX3obmVS8dHhkdcSFo07sCAwEAAaMk
-MCIwIAYDVR0RBBkwF4IVYS5wcmVsb2FkLmV4YW1wbGUuY29tMAsGCSqGSIb3DQEB
-CwOCAQEATOA0bbfg81JieQkTzr4oxBqPuFamtLSAsLpbKakikYQo2znMGNnHV7Xe
-uxMGMhCIPRsiJ6jj6ZTQJNqQRKzXWEiBgREsarmJxA53ITIcO2cK2rqyetNAAwzZ
-oViENmK3tLA5KT2VC9IGgMXdSE7IfXn+5yCdpKZ2ohwtkYHNkCbQIU+4KaCPa/dB
-yAelZZPE0mVHJLkd5HoOsFmjFOBQuOkn9/AAOmkgBZIk1Dp833ywn/mnwLZdVsdV
-+TjqWKenDJXxhO2+aCCtZbUVxKMn0TACpAA+rhjS5vigCyIZh7V4rxki9UXaOfVq
-EVy4rFlRIYYtXV40HavDZoPgxuCHDw==
------END CERTIFICATE----- \ No newline at end of file
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/a.preload.example.com-pinningroot.pem.certspec b/security/manager/ssl/tests/unit/test_pinning_dynamic/a.preload.example.com-pinningroot.pem.certspec
deleted file mode 100644
index 5c18653145..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/a.preload.example.com-pinningroot.pem.certspec
+++ /dev/null
@@ -1,4 +0,0 @@
-issuer:pinningroot
-subject:test end-entity
-subjectKey:alternate
-extension:subjectAlternativeName:a.preload.example.com
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/b.pinning2.example.com-badca.pem b/security/manager/ssl/tests/unit/test_pinning_dynamic/b.pinning2.example.com-badca.pem
deleted file mode 100644
index cffb37c1f0..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/b.pinning2.example.com-badca.pem
+++ /dev/null
@@ -1,18 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIC3TCCAcegAwIBAgIUV89JsAhywp3graSGqjeSpMzd1B0wCwYJKoZIhvcNAQEL
-MBAxDjAMBgNVBAMMBWJhZGNhMCIYDzIwMTUxMTI4MDAwMDAwWhgPMjAxODAyMDUw
-MDAwMDBaMBoxGDAWBgNVBAMMD3Rlc3QgZW5kLWVudGl0eTCCASIwDQYJKoZIhvcN
-AQEBBQADggEPADCCAQoCggEBAMF1xlJmCZ93CCpnkfG4dsN/XOU4sGxKzSKxy9Rv
-plraKt1ByMJJisSjs8H2FIf0G2mJQb2ApRw8EgJExYSkxEgzBeUTjAEGzwi+moYn
-YLrmoujzbyPF2YMTud+vN4NF2s5R1Nbc0qbLPMcG680wcOyYzOQKpZHXKVp/ccW+
-ZmkdKy3+yElEWQvFo+pJ/ZOx11NAXxdzdpmVhmYlR5ftQmkIiAgRQiBpmIpD/uSM
-5oeB3SK2ppzSg3UTH5MrEozihvp9JRwGKtJ+8Bbxh83VToMrNbiTD3S6kKqLx2Fn
-JCqx/W1iFA0YxMC4xo/DdIRXMkrX3obmVS8dHhkdcSFo07sCAwEAAaMlMCMwIQYD
-VR0RBBowGIIWYi5waW5uaW5nMi5leGFtcGxlLmNvbTALBgkqhkiG9w0BAQsDggEB
-ABevzhH9/hjTBgTtUk4ytZX0A7Tu0DR5F9ooFnlUwzupHFihO+9NzEoCSIvCy3L9
-+i3LbkaiUWEHQItLjIg+aice13ZkuMp+DeZ+D/YR9ulxyY1QBYeZLQj/gSdkj/fK
-uDm0Izgt8OBsgP+KFX2c2cGZyOcXmFFAwSfkLz7p2qzrmuM7r5ploNpxeHBUIxUW
-jJzSFeQMfy5wflcKDBY+PDejzN9Ik4weRyERsckVgmZSJXuodb8xgYkNPvl/GOVJ
-o+eDw+E3uOsdBIDrsyb+bcQTG7nBkQoSqG8M0610h0OqFhksfv/0HcB/wfW8VdU+
-+C4+tR2KfvqTCm3T6gzRWX8=
------END CERTIFICATE----- \ No newline at end of file
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/b.pinning2.example.com-badca.pem.certspec b/security/manager/ssl/tests/unit/test_pinning_dynamic/b.pinning2.example.com-badca.pem.certspec
deleted file mode 100644
index 5aa8aaa5ec..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/b.pinning2.example.com-badca.pem.certspec
+++ /dev/null
@@ -1,5 +0,0 @@
-issuer:badca
-subject:test end-entity
-issuerKey:alternate
-subjectKey:alternate
-extension:subjectAlternativeName:b.pinning2.example.com
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/b.pinning2.example.com-pinningroot.pem b/security/manager/ssl/tests/unit/test_pinning_dynamic/b.pinning2.example.com-pinningroot.pem
deleted file mode 100644
index 791f64b4ce..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/b.pinning2.example.com-pinningroot.pem
+++ /dev/null
@@ -1,18 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIC4zCCAc2gAwIBAgIUVQNTrx+mRE96ggRLuZeFm+9uBdcwCwYJKoZIhvcNAQEL
-MBYxFDASBgNVBAMMC3Bpbm5pbmdyb290MCIYDzIwMTUxMTI4MDAwMDAwWhgPMjAx
-ODAyMDUwMDAwMDBaMBoxGDAWBgNVBAMMD3Rlc3QgZW5kLWVudGl0eTCCASIwDQYJ
-KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMF1xlJmCZ93CCpnkfG4dsN/XOU4sGxK
-zSKxy9RvplraKt1ByMJJisSjs8H2FIf0G2mJQb2ApRw8EgJExYSkxEgzBeUTjAEG
-zwi+moYnYLrmoujzbyPF2YMTud+vN4NF2s5R1Nbc0qbLPMcG680wcOyYzOQKpZHX
-KVp/ccW+ZmkdKy3+yElEWQvFo+pJ/ZOx11NAXxdzdpmVhmYlR5ftQmkIiAgRQiBp
-mIpD/uSM5oeB3SK2ppzSg3UTH5MrEozihvp9JRwGKtJ+8Bbxh83VToMrNbiTD3S6
-kKqLx2FnJCqx/W1iFA0YxMC4xo/DdIRXMkrX3obmVS8dHhkdcSFo07sCAwEAAaMl
-MCMwIQYDVR0RBBowGIIWYi5waW5uaW5nMi5leGFtcGxlLmNvbTALBgkqhkiG9w0B
-AQsDggEBAHYCfQaolF6z4IicBDTEQQVfYi4A3BcCNLTdInQlal/DHNytNRufM5TB
-ccNpau5U9e10NBYWbMqRUBb/7wtYE4O7jhEWxjaHBOz5KTYLv8hjEc2wcHXfhlYM
-QKmxOnA7SguSNYBdfXywav//ssLmDnB06nc2vv5NaKvIWbUv3HvfM8oRAr+NICUs
-UMcIb+hjY+u/qrnOeFJxXzeqPYKMa7H+33baRgy7xnL95PxAwkz0XL8vcMFupTX5
-dL5HsSKku23C0BoE6pK39TVh758fQjCAnD+QRTH/o+dfE2sIFpRiyszdXGmh2IRR
-gMSy+gJbH+zh0D9ncL0Kev0PyEuBYR4=
------END CERTIFICATE----- \ No newline at end of file
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/b.pinning2.example.com-pinningroot.pem.certspec b/security/manager/ssl/tests/unit/test_pinning_dynamic/b.pinning2.example.com-pinningroot.pem.certspec
deleted file mode 100644
index 17f22dab5e..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/b.pinning2.example.com-pinningroot.pem.certspec
+++ /dev/null
@@ -1,4 +0,0 @@
-issuer:pinningroot
-subject:test end-entity
-subjectKey:alternate
-extension:subjectAlternativeName:b.pinning2.example.com
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/b.preload.example.com-badca.pem b/security/manager/ssl/tests/unit/test_pinning_dynamic/b.preload.example.com-badca.pem
deleted file mode 100644
index 4ef23a2c2e..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/b.preload.example.com-badca.pem
+++ /dev/null
@@ -1,18 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIC3DCCAcagAwIBAgIUf2T4BVvxeCgWVp/FL3tCFNjuZYQwCwYJKoZIhvcNAQEL
-MBAxDjAMBgNVBAMMBWJhZGNhMCIYDzIwMTUxMTI4MDAwMDAwWhgPMjAxODAyMDUw
-MDAwMDBaMBoxGDAWBgNVBAMMD3Rlc3QgZW5kLWVudGl0eTCCASIwDQYJKoZIhvcN
-AQEBBQADggEPADCCAQoCggEBAMF1xlJmCZ93CCpnkfG4dsN/XOU4sGxKzSKxy9Rv
-plraKt1ByMJJisSjs8H2FIf0G2mJQb2ApRw8EgJExYSkxEgzBeUTjAEGzwi+moYn
-YLrmoujzbyPF2YMTud+vN4NF2s5R1Nbc0qbLPMcG680wcOyYzOQKpZHXKVp/ccW+
-ZmkdKy3+yElEWQvFo+pJ/ZOx11NAXxdzdpmVhmYlR5ftQmkIiAgRQiBpmIpD/uSM
-5oeB3SK2ppzSg3UTH5MrEozihvp9JRwGKtJ+8Bbxh83VToMrNbiTD3S6kKqLx2Fn
-JCqx/W1iFA0YxMC4xo/DdIRXMkrX3obmVS8dHhkdcSFo07sCAwEAAaMkMCIwIAYD
-VR0RBBkwF4IVYi5wcmVsb2FkLmV4YW1wbGUuY29tMAsGCSqGSIb3DQEBCwOCAQEA
-okmxK2NDRYWSAn6b1YZpLiZnoaNrM0HXHY6fkARY/9EiAApvNPxT663EKtTZn27a
-JtwXP2zzlYQDRc9cxa1zBX9Tp+0sn5aqokqzoVWx4VIe/emzi9FDf3lgaYewHLez
-RINv3kUZmqlw6tmMQxjd51UGyvNsi52+gcet1cPr5kBzGQv/q7iNs/lcetL3+KQF
-klJ3PfI4VjFwRRYNhScxiRczklPVDySvxSNw+csUxNRunFLXIi3+WqQzYhw7R8ga
-ASwozTfvVAUySOmDipCZZXAHFtlpBr6vAllfD9v8hAsrE7Bkivafr+i5HMD3DtJE
-4ZedqFCkTkqKvd0fMIbOIA==
------END CERTIFICATE----- \ No newline at end of file
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/b.preload.example.com-badca.pem.certspec b/security/manager/ssl/tests/unit/test_pinning_dynamic/b.preload.example.com-badca.pem.certspec
deleted file mode 100644
index 9901ead60e..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/b.preload.example.com-badca.pem.certspec
+++ /dev/null
@@ -1,5 +0,0 @@
-issuer:badca
-subject:test end-entity
-issuerKey:alternate
-subjectKey:alternate
-extension:subjectAlternativeName:b.preload.example.com
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/b.preload.example.com-pinningroot.pem b/security/manager/ssl/tests/unit/test_pinning_dynamic/b.preload.example.com-pinningroot.pem
deleted file mode 100644
index c6ea38a123..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/b.preload.example.com-pinningroot.pem
+++ /dev/null
@@ -1,18 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIC4jCCAcygAwIBAgIUI5rdRX/x0w0bDx6hQhc8ZhGLfqQwCwYJKoZIhvcNAQEL
-MBYxFDASBgNVBAMMC3Bpbm5pbmdyb290MCIYDzIwMTUxMTI4MDAwMDAwWhgPMjAx
-ODAyMDUwMDAwMDBaMBoxGDAWBgNVBAMMD3Rlc3QgZW5kLWVudGl0eTCCASIwDQYJ
-KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMF1xlJmCZ93CCpnkfG4dsN/XOU4sGxK
-zSKxy9RvplraKt1ByMJJisSjs8H2FIf0G2mJQb2ApRw8EgJExYSkxEgzBeUTjAEG
-zwi+moYnYLrmoujzbyPF2YMTud+vN4NF2s5R1Nbc0qbLPMcG680wcOyYzOQKpZHX
-KVp/ccW+ZmkdKy3+yElEWQvFo+pJ/ZOx11NAXxdzdpmVhmYlR5ftQmkIiAgRQiBp
-mIpD/uSM5oeB3SK2ppzSg3UTH5MrEozihvp9JRwGKtJ+8Bbxh83VToMrNbiTD3S6
-kKqLx2FnJCqx/W1iFA0YxMC4xo/DdIRXMkrX3obmVS8dHhkdcSFo07sCAwEAAaMk
-MCIwIAYDVR0RBBkwF4IVYi5wcmVsb2FkLmV4YW1wbGUuY29tMAsGCSqGSIb3DQEB
-CwOCAQEAg2VdHBLmFLJ03N9VT4uUrnpjuYY9bsvPJF2JCk9817nxBbeMf+Qn0C/o
-OeoQnZRqsaFbKZ80JXmh/j4RO6T/aaQUMpk+NXrdSPddy2B3eUByF/NJqipV3M2a
-CRNWUUVF+msjRWwbzJafju2nEZcD4d4cUkHHYAaRRxAHH3ylEvWmdv/brgfAPCPH
-WDVaCMc3OXgHkyrLAfkMKSYTNPJ7DJn/BXET5tCzqYGRUgRnME4ON2Mmp19lsdig
-dIFbm76wg6l5M+s9pqiYzODUxJXUOd6BkAR5pqB9WyIRVfBr5LGT72nv00LHVcSm
-hnsti9nAtFdJx4E1lJilrnQwu0q4Iw==
------END CERTIFICATE----- \ No newline at end of file
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/b.preload.example.com-pinningroot.pem.certspec b/security/manager/ssl/tests/unit/test_pinning_dynamic/b.preload.example.com-pinningroot.pem.certspec
deleted file mode 100644
index 6f5807700d..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/b.preload.example.com-pinningroot.pem.certspec
+++ /dev/null
@@ -1,4 +0,0 @@
-issuer:pinningroot
-subject:test end-entity
-subjectKey:alternate
-extension:subjectAlternativeName:b.preload.example.com
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/badca.pem b/security/manager/ssl/tests/unit/test_pinning_dynamic/badca.pem
deleted file mode 100644
index 9443a4c913..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/badca.pem
+++ /dev/null
@@ -1,17 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICyzCCAbWgAwIBAgIUXQevdaeXMieCrG6ZqhI2yfACBq4wCwYJKoZIhvcNAQEL
-MBAxDjAMBgNVBAMMBWJhZGNhMCIYDzIwMTUxMTI4MDAwMDAwWhgPMjAxODAyMDUw
-MDAwMDBaMBAxDjAMBgNVBAMMBWJhZGNhMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
-MIIBCgKCAQEAwXXGUmYJn3cIKmeR8bh2w39c5TiwbErNIrHL1G+mWtoq3UHIwkmK
-xKOzwfYUh/QbaYlBvYClHDwSAkTFhKTESDMF5ROMAQbPCL6ahidguuai6PNvI8XZ
-gxO53683g0XazlHU1tzSpss8xwbrzTBw7JjM5AqlkdcpWn9xxb5maR0rLf7ISURZ
-C8Wj6kn9k7HXU0BfF3N2mZWGZiVHl+1CaQiICBFCIGmYikP+5Izmh4HdIramnNKD
-dRMfkysSjOKG+n0lHAYq0n7wFvGHzdVOgys1uJMPdLqQqovHYWckKrH9bWIUDRjE
-wLjGj8N0hFcyStfehuZVLx0eGR1xIWjTuwIDAQABox0wGzAMBgNVHRMEBTADAQH/
-MAsGA1UdDwQEAwIBBjALBgkqhkiG9w0BAQsDggEBAHitWfZzPxR/UWEKQgz9zzm2
-NXszG7nV82w8qfC9pq8mU3f7eqbHJ2HNFkZzttJsH9DNl30OK2Y5IVLUiZHckz2e
-OFUyxK0tBCCBYd79FiK4BgP/Ys/7LK+4UaDhbRQP//MGuofwjsrNxgPgtkNaeKtF
-EXKCuDrHoa4ua7afrkUWKzPZ6JbDOEjJIyuJ3ISI0Q20Oc3ERxGwG1SQ1EldgWBr
-0dJJWBHZtNpIVvSm1dRfjMYtSrBoUXwbn6kDrdk4T98OHnFP0V0KW4j4umLHK7Gi
-OSAwvWtir3fSJaLJClTCFe1XoNvJnQ53PJs0JR26mAixV2VuylStO2KlbYy7fOc=
------END CERTIFICATE----- \ No newline at end of file
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/badca.pem.certspec b/security/manager/ssl/tests/unit/test_pinning_dynamic/badca.pem.certspec
deleted file mode 100644
index 311bbb3f8f..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/badca.pem.certspec
+++ /dev/null
@@ -1,6 +0,0 @@
-issuer:badca
-subject:badca
-issuerKey:alternate
-subjectKey:alternate
-extension:basicConstraints:cA,
-extension:keyUsage:keyCertSign,cRLSign
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/moz.build b/security/manager/ssl/tests/unit/test_pinning_dynamic/moz.build
deleted file mode 100644
index eb8b582f52..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/moz.build
+++ /dev/null
@@ -1,26 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-# Temporarily disabled. See bug 1256495.
-#test_certificates = (
-# 'badca.pem',
-# 'a.pinning2.example.com-badca.pem',
-# 'a.pinning2.example.com-pinningroot.pem',
-# 'a.preload.example.com-badca.pem',
-# 'a.preload.example.com-pinningroot.pem',
-# 'b.pinning2.example.com-badca.pem',
-# 'b.pinning2.example.com-pinningroot.pem',
-# 'b.preload.example.com-badca.pem',
-# 'b.preload.example.com-pinningroot.pem',
-# 'x.a.pinning2.example.com-badca.pem',
-# 'x.a.pinning2.example.com-pinningroot.pem',
-# 'x.b.pinning2.example.com-badca.pem',
-# 'x.b.pinning2.example.com-pinningroot.pem',
-# 'pinningroot.pem',
-#)
-#
-#for test_certificate in test_certificates:
-# GeneratedTestCertificate(test_certificate)
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/pinningroot.pem b/security/manager/ssl/tests/unit/test_pinning_dynamic/pinningroot.pem
deleted file mode 100644
index 9a041991a1..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/pinningroot.pem
+++ /dev/null
@@ -1,18 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIC1zCCAcGgAwIBAgIUMwSUmBShbg5sMNZSTiPd5Tb1udkwCwYJKoZIhvcNAQEL
-MBYxFDASBgNVBAMMC3Bpbm5pbmdyb290MCIYDzIwMTUxMTI4MDAwMDAwWhgPMjAx
-ODAyMDUwMDAwMDBaMBYxFDASBgNVBAMMC3Bpbm5pbmdyb290MIIBIjANBgkqhkiG
-9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuohRqESOFtZB/W62iAY2ED08E9nq5DVKtOz1
-aFdsJHvBxyWo4NgfvbGcBptuGobya+KvWnVramRxCHqlWqdFh/cc1SScAn7NQ/we
-adA4ICmTqyDDSeTbuUzCa2wO7RWCD/F+rWkasdMCOosqQe6ncOAPDY39ZgsrsCSS
-pH25iGF5kLFXkD3SO8XguEgfqDfTiEPvJxbYVbdmWqp+ApAvOnsQgAYkzBxsl62W
-YVu34pYSwHUxowyR3bTK9/ytHSXTCe+5Fw6naOGzey8ib2njtIqVYR3uJtYlnauR
-CE42yxwkBCy/Fosv5fGPmRcxuLP+SSP6clHEMdUDrNoYCjXtjQIDAQABox0wGzAM
-BgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjALBgkqhkiG9w0BAQsDggEBADNuQnKg
-y8zWnKlfBq/50UOtdSlvevg6u6tsUTvay2kVgB8BRTvm76aw4yOLgk84eHHkrX5c
-TqdutWh2JZarUWbO7JnPTdDE2CAkDh1smSe9L/XJENbgVXleg/VYLgnfnuSQCCnK
-WjjExcorX6IKDks1ZoBJ1HIvBzMRMWzIQgBL9B2Y1V05lgfn0bwZD+TjUJBmN1w0
-NTaPgrxE7FWZ2CTcowrYRKEEDAUX4cTFoce5YMwALCgW59KfVQfQdHaiCCcdNbfi
-qSQGZu+59JrrasmgK9VTahukYWcaQCz8HBCasdknGodLAzThuWMkjXU3D2IZYl15
-GfE5yrRFop/89xo=
------END CERTIFICATE----- \ No newline at end of file
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/pinningroot.pem.certspec b/security/manager/ssl/tests/unit/test_pinning_dynamic/pinningroot.pem.certspec
deleted file mode 100644
index 86500e16b2..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/pinningroot.pem.certspec
+++ /dev/null
@@ -1,4 +0,0 @@
-issuer:pinningroot
-subject:pinningroot
-extension:basicConstraints:cA,
-extension:keyUsage:keyCertSign,cRLSign
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/x.a.pinning2.example.com-badca.pem b/security/manager/ssl/tests/unit/test_pinning_dynamic/x.a.pinning2.example.com-badca.pem
deleted file mode 100644
index e4b6e72c02..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/x.a.pinning2.example.com-badca.pem
+++ /dev/null
@@ -1,18 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIC3zCCAcmgAwIBAgIUe11LKIzCrdnRTgrLsfuGMoOpL1QwCwYJKoZIhvcNAQEL
-MBAxDjAMBgNVBAMMBWJhZGNhMCIYDzIwMTUxMTI4MDAwMDAwWhgPMjAxODAyMDUw
-MDAwMDBaMBoxGDAWBgNVBAMMD3Rlc3QgZW5kLWVudGl0eTCCASIwDQYJKoZIhvcN
-AQEBBQADggEPADCCAQoCggEBAMF1xlJmCZ93CCpnkfG4dsN/XOU4sGxKzSKxy9Rv
-plraKt1ByMJJisSjs8H2FIf0G2mJQb2ApRw8EgJExYSkxEgzBeUTjAEGzwi+moYn
-YLrmoujzbyPF2YMTud+vN4NF2s5R1Nbc0qbLPMcG680wcOyYzOQKpZHXKVp/ccW+
-ZmkdKy3+yElEWQvFo+pJ/ZOx11NAXxdzdpmVhmYlR5ftQmkIiAgRQiBpmIpD/uSM
-5oeB3SK2ppzSg3UTH5MrEozihvp9JRwGKtJ+8Bbxh83VToMrNbiTD3S6kKqLx2Fn
-JCqx/W1iFA0YxMC4xo/DdIRXMkrX3obmVS8dHhkdcSFo07sCAwEAAaMnMCUwIwYD
-VR0RBBwwGoIYeC5hLnBpbm5pbmcyLmV4YW1wbGUuY29tMAsGCSqGSIb3DQEBCwOC
-AQEAgdFC/SwBLRp6A+n3znR+sEuU8UvmbgbXp7pIFVh6cbC6lNF0nXk9ywPeIWyh
-B7TCn3YHj4uc/PbvzRj9Py0gQLXcimKpmLoxclV5g1uTAydgXPiPulv/kaL9NOME
-lm88pyQeDwfEkUz7VijabIzFRTEVRmOudb8mX4SuzjhxsdzSMjffpae335beJ4Im
-lxgJgMsuJdEoK0WyG5nlBhVdzrT/kwdiwULeVNV//UHid1YZy56G5Lo22Hgd4wT3
-1W3LXQelBdHhee7Hf7mg4rjCUPulFAr8qBLdywf1Hnu1o7rXUcn46PLwKLOWJPOM
-SKpiqRKqvzlrzLaHPejfT0IMrw==
------END CERTIFICATE----- \ No newline at end of file
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/x.a.pinning2.example.com-badca.pem.certspec b/security/manager/ssl/tests/unit/test_pinning_dynamic/x.a.pinning2.example.com-badca.pem.certspec
deleted file mode 100644
index ad8636d431..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/x.a.pinning2.example.com-badca.pem.certspec
+++ /dev/null
@@ -1,5 +0,0 @@
-issuer:badca
-subject:test end-entity
-issuerKey:alternate
-subjectKey:alternate
-extension:subjectAlternativeName:x.a.pinning2.example.com
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/x.a.pinning2.example.com-pinningroot.pem b/security/manager/ssl/tests/unit/test_pinning_dynamic/x.a.pinning2.example.com-pinningroot.pem
deleted file mode 100644
index ed58de3236..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/x.a.pinning2.example.com-pinningroot.pem
+++ /dev/null
@@ -1,18 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIC5TCCAc+gAwIBAgIUefEeE+Sj5fBSec+97B6UmZFQEncwCwYJKoZIhvcNAQEL
-MBYxFDASBgNVBAMMC3Bpbm5pbmdyb290MCIYDzIwMTUxMTI4MDAwMDAwWhgPMjAx
-ODAyMDUwMDAwMDBaMBoxGDAWBgNVBAMMD3Rlc3QgZW5kLWVudGl0eTCCASIwDQYJ
-KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMF1xlJmCZ93CCpnkfG4dsN/XOU4sGxK
-zSKxy9RvplraKt1ByMJJisSjs8H2FIf0G2mJQb2ApRw8EgJExYSkxEgzBeUTjAEG
-zwi+moYnYLrmoujzbyPF2YMTud+vN4NF2s5R1Nbc0qbLPMcG680wcOyYzOQKpZHX
-KVp/ccW+ZmkdKy3+yElEWQvFo+pJ/ZOx11NAXxdzdpmVhmYlR5ftQmkIiAgRQiBp
-mIpD/uSM5oeB3SK2ppzSg3UTH5MrEozihvp9JRwGKtJ+8Bbxh83VToMrNbiTD3S6
-kKqLx2FnJCqx/W1iFA0YxMC4xo/DdIRXMkrX3obmVS8dHhkdcSFo07sCAwEAAaMn
-MCUwIwYDVR0RBBwwGoIYeC5hLnBpbm5pbmcyLmV4YW1wbGUuY29tMAsGCSqGSIb3
-DQEBCwOCAQEAT2fxisiLJvVdFTba07a2Pc6UHBE+O0tOaLfMmHx/ET2FZdd9sLTL
-X2f+hQCmXEBQ7Au2eYTew8hTyXYGYFauMJNk+XHHUIaSOhmnYTccye4d6j5bXRCp
-7zA1qPlReCDLjp7o/34whkvngvdgdLYf60EkBO/NJfj+zsR1JTVfyVzIKXl6veLz
-0xKicBAq9vS0Yqq10japVYKKqAw6gDpbNkSAd3xsl4+EbMRq+BnMB4W2anw1gM/e
-hV11JQVA/MREtmUiTkvJFF6chHVCn5aL7JzVM2miZjZC8Ix59LUBoyO3SrxgrzZw
-xeYuwoDhzTCrcFxn8gdKNajbGHuW5ekQpg==
------END CERTIFICATE----- \ No newline at end of file
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/x.a.pinning2.example.com-pinningroot.pem.certspec b/security/manager/ssl/tests/unit/test_pinning_dynamic/x.a.pinning2.example.com-pinningroot.pem.certspec
deleted file mode 100644
index 260f2184ba..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/x.a.pinning2.example.com-pinningroot.pem.certspec
+++ /dev/null
@@ -1,4 +0,0 @@
-issuer:pinningroot
-subject:test end-entity
-subjectKey:alternate
-extension:subjectAlternativeName:x.a.pinning2.example.com
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/x.b.pinning2.example.com-badca.pem b/security/manager/ssl/tests/unit/test_pinning_dynamic/x.b.pinning2.example.com-badca.pem
deleted file mode 100644
index dc24247e8b..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/x.b.pinning2.example.com-badca.pem
+++ /dev/null
@@ -1,18 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIC3zCCAcmgAwIBAgIUYcTc5Pz7KlQldGOO+KzbuBdf8TswCwYJKoZIhvcNAQEL
-MBAxDjAMBgNVBAMMBWJhZGNhMCIYDzIwMTUxMTI4MDAwMDAwWhgPMjAxODAyMDUw
-MDAwMDBaMBoxGDAWBgNVBAMMD3Rlc3QgZW5kLWVudGl0eTCCASIwDQYJKoZIhvcN
-AQEBBQADggEPADCCAQoCggEBAMF1xlJmCZ93CCpnkfG4dsN/XOU4sGxKzSKxy9Rv
-plraKt1ByMJJisSjs8H2FIf0G2mJQb2ApRw8EgJExYSkxEgzBeUTjAEGzwi+moYn
-YLrmoujzbyPF2YMTud+vN4NF2s5R1Nbc0qbLPMcG680wcOyYzOQKpZHXKVp/ccW+
-ZmkdKy3+yElEWQvFo+pJ/ZOx11NAXxdzdpmVhmYlR5ftQmkIiAgRQiBpmIpD/uSM
-5oeB3SK2ppzSg3UTH5MrEozihvp9JRwGKtJ+8Bbxh83VToMrNbiTD3S6kKqLx2Fn
-JCqx/W1iFA0YxMC4xo/DdIRXMkrX3obmVS8dHhkdcSFo07sCAwEAAaMnMCUwIwYD
-VR0RBBwwGoIYeC5iLnBpbm5pbmcyLmV4YW1wbGUuY29tMAsGCSqGSIb3DQEBCwOC
-AQEAd6HusXqftFBpSUzivIY6icTZ95+wY+xIOsf1QOgyzZ/CDx4Tly+rgue2xSNT
-59FmnFvh8jW202K8TykamsAX20A8ArzubNoc/+soA752YEvrMmOgWjmH2arqTfqg
-zcfNdgUDESwnOoy123F+PkT3rRDXwINzCwftxhKbvmqhO6YENteqyWWmSZoMClsJ
-xtm+bmPN+m26k6zMMYWzIu2HIXI3CgqOmJltfyqea02Y58S1+XlajrcewPpC17xD
-r5a1sizecCFrmV0ssbK8wvEYo9Xs+PNj8Vhi1DUwGjtnjrYn/WQ6v/luMEEO7EMD
-b3BbEziS3Pqej2JyprUKqOjv1g==
------END CERTIFICATE----- \ No newline at end of file
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/x.b.pinning2.example.com-badca.pem.certspec b/security/manager/ssl/tests/unit/test_pinning_dynamic/x.b.pinning2.example.com-badca.pem.certspec
deleted file mode 100644
index 592bdcc583..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/x.b.pinning2.example.com-badca.pem.certspec
+++ /dev/null
@@ -1,5 +0,0 @@
-issuer:badca
-subject:test end-entity
-issuerKey:alternate
-subjectKey:alternate
-extension:subjectAlternativeName:x.b.pinning2.example.com
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/x.b.pinning2.example.com-pinningroot.pem b/security/manager/ssl/tests/unit/test_pinning_dynamic/x.b.pinning2.example.com-pinningroot.pem
deleted file mode 100644
index 642135994a..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/x.b.pinning2.example.com-pinningroot.pem
+++ /dev/null
@@ -1,18 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIC5TCCAc+gAwIBAgIUNXGolw8M2HU/gP4dOSMD2bdTQ+MwCwYJKoZIhvcNAQEL
-MBYxFDASBgNVBAMMC3Bpbm5pbmdyb290MCIYDzIwMTUxMTI4MDAwMDAwWhgPMjAx
-ODAyMDUwMDAwMDBaMBoxGDAWBgNVBAMMD3Rlc3QgZW5kLWVudGl0eTCCASIwDQYJ
-KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMF1xlJmCZ93CCpnkfG4dsN/XOU4sGxK
-zSKxy9RvplraKt1ByMJJisSjs8H2FIf0G2mJQb2ApRw8EgJExYSkxEgzBeUTjAEG
-zwi+moYnYLrmoujzbyPF2YMTud+vN4NF2s5R1Nbc0qbLPMcG680wcOyYzOQKpZHX
-KVp/ccW+ZmkdKy3+yElEWQvFo+pJ/ZOx11NAXxdzdpmVhmYlR5ftQmkIiAgRQiBp
-mIpD/uSM5oeB3SK2ppzSg3UTH5MrEozihvp9JRwGKtJ+8Bbxh83VToMrNbiTD3S6
-kKqLx2FnJCqx/W1iFA0YxMC4xo/DdIRXMkrX3obmVS8dHhkdcSFo07sCAwEAAaMn
-MCUwIwYDVR0RBBwwGoIYeC5iLnBpbm5pbmcyLmV4YW1wbGUuY29tMAsGCSqGSIb3
-DQEBCwOCAQEAevN1gW64H2kCjW5W4wbQFkJIITjcdEUsw+8GPzDuBDJCvgGirhOi
-ArBie8Bz+JlqzgNCXSe6pFVLoNfLosG5xksLwHljEit/7gFQ5twFazdg7dwPXs9Z
-MIV2iv3vHmKYTFTcjfw07UWy0rHHt6EH+zXqpZFtFkJHqSgngKxAHgQlvSKeyynM
-albu5YAX/hzJ7TyAVGxVN8uxnvYqPbLCy3wKf9ILFiDer6B9pE4Ii+dUyUbqVQFZ
-tY2ac1474nkcfj3uj5qbV0TTpd9EL9HMvixTnoUrT3bqkRX7orvL4gXpnJJyRjvC
-/LvTh/Vt1mYKkNLc/ruOj7WfUUC0SJIDzQ==
------END CERTIFICATE----- \ No newline at end of file
diff --git a/security/manager/ssl/tests/unit/test_pinning_dynamic/x.b.pinning2.example.com-pinningroot.pem.certspec b/security/manager/ssl/tests/unit/test_pinning_dynamic/x.b.pinning2.example.com-pinningroot.pem.certspec
deleted file mode 100644
index 7e6d33d509..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_dynamic/x.b.pinning2.example.com-pinningroot.pem.certspec
+++ /dev/null
@@ -1,4 +0,0 @@
-issuer:pinningroot
-subject:test end-entity
-subjectKey:alternate
-extension:subjectAlternativeName:x.b.pinning2.example.com
diff --git a/security/manager/ssl/tests/unit/test_pinning_header_parsing.js b/security/manager/ssl/tests/unit/test_pinning_header_parsing.js
deleted file mode 100644
index 0dcf6993b6..0000000000
--- a/security/manager/ssl/tests/unit/test_pinning_header_parsing.js
+++ /dev/null
@@ -1,147 +0,0 @@
-/* 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/. */
-"use strict";
-
-// The purpose of this test is to check that parsing of HPKP headers
-// is correct.
-
-var profileDir = do_get_profile();
-const certdb = Cc["@mozilla.org/security/x509certdb;1"]
- .getService(Ci.nsIX509CertDB);
-var gSSService = Cc["@mozilla.org/ssservice;1"]
- .getService(Ci.nsISiteSecurityService);
-
-function certFromFile(cert_name) {
- return constructCertFromFile("test_pinning_dynamic/" + cert_name + ".pem");
-}
-
-function loadCert(cert_name, trust_string) {
- let cert_filename = "test_pinning_dynamic/" + cert_name + ".pem";
- addCertFromFile(certdb, cert_filename, trust_string);
- return constructCertFromFile(cert_filename);
-}
-
-function checkFailParseInvalidPin(pinValue) {
- let sslStatus = new FakeSSLStatus(
- certFromFile('a.pinning2.example.com-pinningroot'));
- let uri = Services.io.newURI("https://a.pinning2.example.com", null, null);
- throws(() => {
- gSSService.processHeader(Ci.nsISiteSecurityService.HEADER_HPKP, uri,
- pinValue, sslStatus, 0);
- }, /NS_ERROR_FAILURE/, `Invalid pin "${pinValue}" should be rejected`);
-}
-
-function checkPassValidPin(pinValue, settingPin, expectedMaxAge) {
- let sslStatus = new FakeSSLStatus(
- certFromFile('a.pinning2.example.com-pinningroot'));
- let uri = Services.io.newURI("https://a.pinning2.example.com", null, null);
- let maxAge = {};
-
- // setup preconditions for the test, if setting ensure there is no previous
- // state, if removing ensure there is a valid pin in place.
- if (settingPin) {
- gSSService.removeState(Ci.nsISiteSecurityService.HEADER_HPKP, uri, 0);
- } else {
- // add a known valid pin!
- let validPinValue = "max-age=5000;" + VALID_PIN1 + BACKUP_PIN1;
- gSSService.processHeader(Ci.nsISiteSecurityService.HEADER_HPKP, uri,
- validPinValue, sslStatus, 0);
- }
- try {
- gSSService.processHeader(Ci.nsISiteSecurityService.HEADER_HPKP, uri,
- pinValue, sslStatus, 0, maxAge);
- ok(true, "Valid pin should be accepted");
- } catch (e) {
- ok(false, "Valid pin should have been accepted");
- }
-
- // check that maxAge was processed correctly
- if (settingPin && expectedMaxAge) {
- ok(maxAge.value == expectedMaxAge, `max-age value should be ${expectedMaxAge}`);
- }
-
- // after processing ensure that the postconditions are true, if setting
- // the host must be pinned, if removing the host must not be pinned
- let hostIsPinned = gSSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HPKP,
- "a.pinning2.example.com", 0);
- if (settingPin) {
- ok(hostIsPinned, "Host should be considered pinned");
- } else {
- ok(!hostIsPinned, "Host should not be considered pinned");
- }
-}
-
-function checkPassSettingPin(pinValue, expectedMaxAge) {
- return checkPassValidPin(pinValue, true, expectedMaxAge);
-}
-
-function checkPassRemovingPin(pinValue) {
- return checkPassValidPin(pinValue, false);
-}
-
-const MAX_MAX_AGE_SECONDS = 100000;
-const GOOD_MAX_AGE_SECONDS = 69403;
-const LONG_MAX_AGE_SECONDS = 2 * MAX_MAX_AGE_SECONDS;
-const NON_ISSUED_KEY_HASH1 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
-const NON_ISSUED_KEY_HASH2 = "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ=";
-const PINNING_ROOT_KEY_HASH = "VCIlmPM9NkgFQtrs4Oa5TeFcDu6MWRTKSNdePEhOgD8=";
-const MAX_AGE_ZERO = "max-age=0;";
-const VALID_PIN1 = `pin-sha256="${PINNING_ROOT_KEY_HASH}";`;
-const BACKUP_PIN1 = `pin-sha256="${NON_ISSUED_KEY_HASH1}";`;
-const BACKUP_PIN2 = `pin-sha256="${NON_ISSUED_KEY_HASH2}";`;
-const BROKEN_PIN1 = "pin-sha256=\"jdjsjsjs\";";
-const GOOD_MAX_AGE = `max-age=${GOOD_MAX_AGE_SECONDS};`;
-const LONG_MAX_AGE = `max-age=${LONG_MAX_AGE_SECONDS};`;
-const INCLUDE_SUBDOMAINS = "includeSubdomains;";
-const REPORT_URI = "report-uri=\"https://www.example.com/report/\";";
-const UNRECOGNIZED_DIRECTIVE = "unreconized-dir=12343;";
-
-function run_test() {
- Services.prefs.setBoolPref("security.cert_pinning.hpkp.enabled", true);
- Services.prefs.setIntPref("security.cert_pinning.enforcement_level", 2);
- Services.prefs.setIntPref("security.cert_pinning.max_max_age_seconds", MAX_MAX_AGE_SECONDS);
- Services.prefs.setBoolPref("security.cert_pinning.process_headers_from_non_builtin_roots", true);
-
- loadCert("pinningroot", "CTu,CTu,CTu");
- loadCert("badca", "CTu,CTu,CTu");
-
- checkFailParseInvalidPin("max-age=INVALID");
- // check that incomplete headers are failure
- checkFailParseInvalidPin(GOOD_MAX_AGE);
- checkFailParseInvalidPin(VALID_PIN1);
- checkFailParseInvalidPin(REPORT_URI);
- checkFailParseInvalidPin(UNRECOGNIZED_DIRECTIVE);
- checkFailParseInvalidPin(VALID_PIN1 + BACKUP_PIN1);
- checkFailParseInvalidPin(GOOD_MAX_AGE + VALID_PIN1);
- checkFailParseInvalidPin(GOOD_MAX_AGE + VALID_PIN1 + BROKEN_PIN1);
- // next ensure a backup pin is present
- checkFailParseInvalidPin(GOOD_MAX_AGE + VALID_PIN1 + VALID_PIN1);
- // next section ensure duplicate directives result in failure
- checkFailParseInvalidPin(GOOD_MAX_AGE + GOOD_MAX_AGE + VALID_PIN1 + BACKUP_PIN1);
- checkFailParseInvalidPin(GOOD_MAX_AGE + VALID_PIN1 + BACKUP_PIN1 + INCLUDE_SUBDOMAINS + INCLUDE_SUBDOMAINS);
- checkFailParseInvalidPin(GOOD_MAX_AGE + VALID_PIN1 + BACKUP_PIN1 + REPORT_URI + REPORT_URI);
- checkFailParseInvalidPin("thisisinvalidtest");
- checkFailParseInvalidPin("invalid" + GOOD_MAX_AGE + VALID_PIN1 + BACKUP_PIN1);
-
- checkPassRemovingPin("max-age=0"); //test removal without terminating ';'
- checkPassRemovingPin(MAX_AGE_ZERO);
- checkPassRemovingPin(MAX_AGE_ZERO + VALID_PIN1);
-
- checkPassSettingPin(GOOD_MAX_AGE + VALID_PIN1 + BACKUP_PIN1, GOOD_MAX_AGE_SECONDS);
- checkPassSettingPin(LONG_MAX_AGE + VALID_PIN1 + BACKUP_PIN1, MAX_MAX_AGE_SECONDS);
-
- checkPassRemovingPin(VALID_PIN1 + MAX_AGE_ZERO + VALID_PIN1);
- checkPassSettingPin(GOOD_MAX_AGE + VALID_PIN1 + BACKUP_PIN1);
- checkPassSettingPin(GOOD_MAX_AGE + VALID_PIN1 + BACKUP_PIN2);
- checkPassSettingPin(GOOD_MAX_AGE + VALID_PIN1 + BACKUP_PIN2 + INCLUDE_SUBDOMAINS);
- checkPassSettingPin(VALID_PIN1 + GOOD_MAX_AGE + BACKUP_PIN2 + INCLUDE_SUBDOMAINS);
- checkPassSettingPin(VALID_PIN1 + GOOD_MAX_AGE + BACKUP_PIN2 + REPORT_URI + INCLUDE_SUBDOMAINS);
- checkPassSettingPin(INCLUDE_SUBDOMAINS + VALID_PIN1 + GOOD_MAX_AGE + BACKUP_PIN2);
- checkPassSettingPin(GOOD_MAX_AGE + VALID_PIN1 + BACKUP_PIN1 + UNRECOGNIZED_DIRECTIVE);
-
- Services.prefs.clearUserPref("security.cert_pinning.hpkp.enabled");
- Services.prefs.clearUserPref("security.cert_pinning.enforcement_level");
- Services.prefs.clearUserPref("security.cert_pinning.max_max_age_seconds");
- Services.prefs.clearUserPref("security.cert_pinning.process_headers_from_non_builtin_roots");
-}
diff --git a/security/manager/ssl/tests/unit/test_sts_holepunch.js b/security/manager/ssl/tests/unit/test_sts_holepunch.js
deleted file mode 100644
index b7e6431484..0000000000
--- a/security/manager/ssl/tests/unit/test_sts_holepunch.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/* 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/.
- */
-"use strict";
-
-// bug 961528: chart.apis.google.com doesn't handle https. Check that
-// it isn't considered HSTS (other example.apis.google.com hosts should be
-// HSTS as long as they're on the preload list, however).
-function run_test() {
- let SSService = Cc["@mozilla.org/ssservice;1"]
- .getService(Ci.nsISiteSecurityService);
- ok(!SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
- "chart.apis.google.com", 0));
- ok(!SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
- "CHART.APIS.GOOGLE.COM", 0));
- ok(!SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
- "sub.chart.apis.google.com", 0));
- ok(!SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
- "SUB.CHART.APIS.GOOGLE.COM", 0));
- ok(SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
- "example.apis.google.com", 0));
- ok(SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
- "EXAMPLE.APIS.GOOGLE.COM", 0));
- ok(SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
- "sub.example.apis.google.com", 0));
- ok(SSService.isSecureHost(Ci.nsISiteSecurityService.HEADER_HSTS,
- "SUB.EXAMPLE.APIS.GOOGLE.COM", 0));
- // also check isSecureURI
- let chartURI = Services.io.newURI("http://chart.apis.google.com", null, null);
- ok(!SSService.isSecureURI(Ci.nsISiteSecurityService.HEADER_HSTS, chartURI, 0));
- let otherURI = Services.io.newURI("http://other.apis.google.com", null, null);
- ok(SSService.isSecureURI(Ci.nsISiteSecurityService.HEADER_HSTS, otherURI, 0));
-}
diff --git a/security/manager/ssl/tests/unit/xpcshell.ini b/security/manager/ssl/tests/unit/xpcshell.ini
index bdf9933f43..01384b19ac 100644
--- a/security/manager/ssl/tests/unit/xpcshell.ini
+++ b/security/manager/ssl/tests/unit/xpcshell.ini
@@ -26,7 +26,6 @@ support-files =
test_ocsp_fetch_method/**
test_ocsp_url/**
test_onecrl/**
- test_pinning_dynamic/**
test_signed_apps/**
test_signed_dir/**
test_startcom_wosign/**
@@ -111,13 +110,6 @@ run-sequentially = hardcoded ports
[test_ocsp_url.js]
run-sequentially = hardcoded ports
[test_password_prompt.js]
-[test_pinning.js]
-run-sequentially = hardcoded ports
-# This test can take longer than 300 seconds on B2G emulator debug builds, so
-# give it enough time to finish. See bug 1081128.
-requesttimeoutfactor = 2
-[test_pinning_dynamic.js]
-[test_pinning_header_parsing.js]
[test_sdr.js]
[test_session_resumption.js]
run-sequentially = hardcoded ports
@@ -137,7 +129,6 @@ skip-if = toolkit == 'android'
[test_sss_savestate.js]
[test_startcom_wosign.js]
[test_sts_fqdn.js]
-[test_sts_holepunch.js]
[test_sts_ipv4_ipv6.js]
[test_sts_preloadlist_perwindowpb.js]
[test_sts_preloadlist_selfdestruct.js]
diff --git a/security/manager/tools/PreloadedHPKPins.json b/security/manager/tools/PreloadedHPKPins.json
deleted file mode 100644
index d9c394a1df..0000000000
--- a/security/manager/tools/PreloadedHPKPins.json
+++ /dev/null
@@ -1,222 +0,0 @@
-// -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this
-// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-// The top-level element is a dictionary with two keys: "pinsets" maps details
-// of certificate pinning to a name and "entries" contains the HPKP details for
-// each host.
-//
-// "pinsets" is a list of objects. Each object has the following members:
-// name: (string) the name of the pinset
-// sha256_hashes: (list of strings) the set of allowed SPKIs hashes
-//
-// For a given pinset, a certificate is accepted if at least one of the
-// Subject Public Key Infos (SPKIs) is found in the chain. SPKIs are specified
-// as names, which must match up with the name given in the Mozilla root store.
-//
-// "entries" is a list of objects. Each object has the following members:
-// name: (string) the DNS name of the host in question
-// include_subdomains: (optional bool) whether subdomains of |name| are also covered
-// pins: (string) the |name| member of an object in |pinsets|
-//
-// "extra_certs" is a list of base64-encoded certificates. These are used in
-// pinsets that reference certificates not in our root program (for example,
-// Facebook).
-
-// equifax -> aus3
-// Geotrust Primary -> www.mozilla.org
-// Geotrust Global -> *. addons.mozilla.org
-{
- "chromium_data" : {
- "cert_file_url": "https://chromium.googlesource.com/chromium/src/net/+/master/http/transport_security_state_static.pins?format=TEXT",
- "json_file_url": "https://chromium.googlesource.com/chromium/src/net/+/master/http/transport_security_state_static.json?format=TEXT",
- "substitute_pinsets": {
- // Use the larger google_root_pems pinset instead of google
- "google": "google_root_pems"
- },
- "production_pinsets": [
- "google_root_pems",
- "facebook"
- ],
- "production_domains": [
- // Chrome's test domains.
- "pinningtest.appspot.com",
- "pinning-test.badssl.com",
- // Dropbox
- "dropbox.com",
- "www.dropbox.com",
- // Twitter
- "api.twitter.com",
- "business.twitter.com",
- "dev.twitter.com",
- "mobile.twitter.com",
- "oauth.twitter.com",
- "platform.twitter.com",
- "twimg.com",
- "www.twitter.com",
- // Tor
- "torproject.org",
- "blog.torproject.org",
- "check.torproject.org",
- "dist.torproject.org",
- "www.torproject.org",
- // SpiderOak
- "spideroak.com"
- ],
- "exclude_domains" : [
- // Chrome's entry for twitter.com doesn't include subdomains, so replace
- // it with our own entry below which also uses an expanded pinset.
- "twitter.com"
- ]
- },
- "pinsets": [
- {
- // From bug 772756, mozilla uses GeoTrust, Digicert and Thawte. Our
- // cdn sites use Verisign and Baltimore. We exclude 1024-bit root certs
- // from all providers. geotrust ca info:
- // http://www.geotrust.com/resources/root-certificates/index.html
- "name": "mozilla",
- "sha256_hashes": [
- "Baltimore CyberTrust Root",
- "DigiCert Assured ID Root CA",
- "DigiCert Global Root CA",
- "DigiCert High Assurance EV Root CA",
- "GeoTrust Global CA",
- "GeoTrust Global CA 2",
- "GeoTrust Primary Certification Authority",
- "GeoTrust Primary Certification Authority - G2",
- "GeoTrust Primary Certification Authority - G3",
- "GeoTrust Universal CA",
- "GeoTrust Universal CA 2",
- "thawte Primary Root CA",
- "thawte Primary Root CA - G2",
- "thawte Primary Root CA - G3",
- "Verisign Class 1 Public Primary Certification Authority - G3",
- "Verisign Class 2 Public Primary Certification Authority - G3",
- "Verisign Class 3 Public Primary Certification Authority - G3",
- "VeriSign Class 3 Public Primary Certification Authority - G4",
- "VeriSign Class 3 Public Primary Certification Authority - G5",
- // "Verisign Class 4 Public Primary Certification Authority - G3",
- "VeriSign Universal Root Certification Authority"
- ]
- },
- {
- "name": "mozilla_services",
- "sha256_hashes": [
- "DigiCert Global Root CA"
- ]
- },
- // For pinning tests on pinning.example.com, the certificate must be 'End
- // Entity Test Cert'
- {
- "name": "mozilla_test",
- "sha256_hashes": [
- "End Entity Test Cert"
- ]
- },
- // Google's root PEMs. Chrome pins only to their intermediate certs, but
- // they'd like us to be more liberal. For the initial list, we are using
- // the certs from http://pki.google.com/roots.pem.
- // We have no built-in for commented out CAs.
- {
- "name": "google_root_pems",
- "sha256_hashes": [
- "AddTrust External Root",
- "AddTrust Low-Value Services Root",
- "AddTrust Public Services Root",
- "AddTrust Qualified Certificates Root",
- "AffirmTrust Commercial",
- "AffirmTrust Networking",
- "AffirmTrust Premium",
- "AffirmTrust Premium ECC",
- "Baltimore CyberTrust Root",
- "Comodo AAA Services root",
- "COMODO Certification Authority",
- "COMODO ECC Certification Authority",
- "COMODO RSA Certification Authority",
- "Comodo Secure Services root",
- "Comodo Trusted Services root",
- "Cybertrust Global Root",
- "DigiCert Assured ID Root CA",
- "DigiCert Assured ID Root G2",
- "DigiCert Assured ID Root G3",
- "DigiCert Global Root CA",
- "DigiCert Global Root G2",
- "DigiCert Global Root G3",
- "DigiCert High Assurance EV Root CA",
- "DigiCert Trusted Root G4",
- "Entrust Root Certification Authority",
- "Entrust Root Certification Authority - EC1",
- "Entrust Root Certification Authority - G2",
- "Entrust.net Premium 2048 Secure Server CA",
- // "Equifax Secure Certificate Authority",
- "GeoTrust Global CA",
- "GeoTrust Global CA 2",
- "GeoTrust Primary Certification Authority",
- "GeoTrust Primary Certification Authority - G2",
- "GeoTrust Primary Certification Authority - G3",
- "GeoTrust Universal CA",
- "GeoTrust Universal CA 2",
- "GlobalSign ECC Root CA - R4",
- "GlobalSign ECC Root CA - R5",
- "GlobalSign Root CA",
- "GlobalSign Root CA - R2",
- "GlobalSign Root CA - R3",
- "Go Daddy Class 2 CA",
- "Go Daddy Root Certificate Authority - G2",
- "Starfield Class 2 CA",
- "Starfield Root Certificate Authority - G2",
- "thawte Primary Root CA",
- "thawte Primary Root CA - G2",
- "thawte Primary Root CA - G3",
- "USERTrust ECC Certification Authority",
- "USERTrust RSA Certification Authority",
- "UTN USERFirst Hardware Root CA",
- "Verisign Class 3 Public Primary Certification Authority - G3",
- "VeriSign Class 3 Public Primary Certification Authority - G4",
- "VeriSign Class 3 Public Primary Certification Authority - G5",
- "VeriSign Universal Root Certification Authority"
- ]
- }
- ],
-
- "entries": [
- // Only domains that are operationally crucial to Firefox can have per-host
- // telemetry reporting (the "id") field
- { "name": "addons.mozilla.org", "include_subdomains": true,
- "pins": "mozilla", "test_mode": false, "id": 1 },
- { "name": "addons.mozilla.net", "include_subdomains": true,
- "pins": "mozilla", "test_mode": false, "id": 2 },
- { "name": "aus4.mozilla.org", "include_subdomains": true,
- "pins": "mozilla", "test_mode": true, "id": 3 },
- { "name": "accounts.firefox.com", "include_subdomains": true,
- "pins": "mozilla_services", "test_mode": false, "id": 4 },
- { "name": "api.accounts.firefox.com", "include_subdomains": true,
- "pins": "mozilla_services", "test_mode": false, "id": 5 },
- { "name": "cdn.mozilla.net", "include_subdomains": true,
- "pins": "mozilla", "test_mode": false },
- { "name": "cdn.mozilla.org", "include_subdomains": true,
- "pins": "mozilla", "test_mode": false },
- { "name": "services.mozilla.com", "include_subdomains": true,
- "pins": "mozilla_services", "test_mode": false, "id": 6 },
- { "name": "include-subdomains.pinning.example.com",
- "include_subdomains": true, "pins": "mozilla_test",
- "test_mode": false },
- // Example domain to collect per-host stats for telemetry tests.
- { "name": "exclude-subdomains.pinning.example.com",
- "include_subdomains": false, "pins": "mozilla_test",
- "test_mode": false, "id": 0 },
- { "name": "test-mode.pinning.example.com", "include_subdomains": true,
- "pins": "mozilla_test", "test_mode": true },
- // Expand twitter's pinset to include all of *.twitter.com and use
- // twitterCDN. More specific rules take precedence because we search for
- // exact domain name first.
- { "name": "twitter.com", "include_subdomains": true,
- "pins": "twitterCDN", "test_mode": false },
- { "name": "aus5.mozilla.org", "include_subdomains": true,
- "pins": "mozilla", "test_mode": true, "id": 7 }
- ],
-
- "extra_certificates": []
-}
diff --git a/security/manager/tools/genHPKPStaticPins.js b/security/manager/tools/genHPKPStaticPins.js
deleted file mode 100644
index f2b9dbddae..0000000000
--- a/security/manager/tools/genHPKPStaticPins.js
+++ /dev/null
@@ -1,630 +0,0 @@
-/* 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/. */
-
-// How to run this file:
-// 1. [obtain firefox source code]
-// 2. [build/obtain firefox binaries]
-// 3. run `[path to]/run-mozilla.sh [path to]/xpcshell \
-// [path to]/genHPKPStaticpins.js \
-// [absolute path to]/PreloadedHPKPins.json \
-// [an unused argument - see bug 1205406] \
-// [absolute path to]/StaticHPKPins.h
-"use strict";
-
-if (arguments.length != 3) {
- throw new Error("Usage: genHPKPStaticPins.js " +
- "<absolute path to PreloadedHPKPins.json> " +
- "<an unused argument - see bug 1205406> " +
- "<absolute path to StaticHPKPins.h>");
-}
-
-var { 'classes': Cc, 'interfaces': Ci, 'utils': Cu, 'results': Cr } = Components;
-
-var { NetUtil } = Cu.import("resource://gre/modules/NetUtil.jsm", {});
-var { FileUtils } = Cu.import("resource://gre/modules/FileUtils.jsm", {});
-var { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
-
-var gCertDB = Cc["@mozilla.org/security/x509certdb;1"]
- .getService(Ci.nsIX509CertDB);
-
-const BUILT_IN_NICK_PREFIX = "Builtin Object Token:";
-const SHA256_PREFIX = "sha256/";
-const GOOGLE_PIN_PREFIX = "GOOGLE_PIN_";
-
-// Pins expire in 14 weeks (6 weeks on Beta + 8 weeks on stable)
-const PINNING_MINIMUM_REQUIRED_MAX_AGE = 60 * 60 * 24 * 7 * 14;
-
-const FILE_HEADER = "/* This Source Code Form is subject to the terms of the Mozilla Public\n" +
-" * License, v. 2.0. If a copy of the MPL was not distributed with this\n" +
-" * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n" +
-"\n" +
-"/*****************************************************************************/\n" +
-"/* This is an automatically generated file. If you're not */\n" +
-"/* PublicKeyPinningService.cpp, you shouldn't be #including it. */\n" +
-"/*****************************************************************************/\n" +
-"#include <stdint.h>" +
-"\n";
-
-const DOMAINHEADER = "/* Domainlist */\n" +
- "struct TransportSecurityPreload {\n" +
- " const char* mHost;\n" +
- " const bool mIncludeSubdomains;\n" +
- " const bool mTestMode;\n" +
- " const bool mIsMoz;\n" +
- " const int32_t mId;\n" +
- " const StaticFingerprints* pinset;\n" +
- "};\n\n";
-
-const PINSETDEF = "/* Pinsets are each an ordered list by the actual value of the fingerprint */\n" +
- "struct StaticFingerprints {\n" +
- " const size_t size;\n" +
- " const char* const* data;\n" +
- "};\n\n";
-
-// Command-line arguments
-var gStaticPins = parseJson(arguments[0]);
-
-// arguments[1] is ignored for now. See bug 1205406.
-
-// Open the output file.
-var file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
-file.initWithPath(arguments[2]);
-var gFileOutputStream = FileUtils.openSafeFileOutputStream(file);
-
-function writeString(string) {
- gFileOutputStream.write(string, string.length);
-}
-
-function readFileToString(filename) {
- let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
- file.initWithPath(filename);
- let stream = Cc["@mozilla.org/network/file-input-stream;1"]
- .createInstance(Ci.nsIFileInputStream);
- stream.init(file, -1, 0, 0);
- let buf = NetUtil.readInputStreamToString(stream, stream.available());
- return buf;
-}
-
-function stripComments(buf) {
- let lines = buf.split("\n");
- let entryRegex = /^\s*\/\//;
- let data = "";
- for (let i = 0; i < lines.length; ++i) {
- let match = entryRegex.exec(lines[i]);
- if (!match) {
- data = data + lines[i];
- }
- }
- return data;
-}
-
-function isBuiltinToken(tokenName) {
- return tokenName == "Builtin Object Token";
-}
-
-function isCertBuiltIn(cert) {
- let tokenNames = cert.getAllTokenNames({});
- if (!tokenNames) {
- return false;
- }
- if (tokenNames.some(isBuiltinToken)) {
- return true;
- }
- return false;
-}
-
-function download(filename) {
- let req = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
- .createInstance(Ci.nsIXMLHttpRequest);
- req.open("GET", filename, false); // doing the request synchronously
- try {
- req.send();
- }
- catch (e) {
- throw new Error(`ERROR: problem downloading '${filename}': ${e}`);
- }
-
- if (req.status != 200) {
- throw new Error("ERROR: problem downloading '" + filename + "': status " +
- req.status);
- }
-
- let resultDecoded;
- try {
- resultDecoded = atob(req.responseText);
- }
- catch (e) {
- throw new Error("ERROR: could not decode data as base64 from '" + filename +
- "': " + e);
- }
- return resultDecoded;
-}
-
-function downloadAsJson(filename) {
- // we have to filter out '//' comments, while not mangling the json
- let result = download(filename).replace(/^(\s*)?\/\/[^\n]*\n/mg, "");
- let data = null;
- try {
- data = JSON.parse(result);
- }
- catch (e) {
- throw new Error("ERROR: could not parse data from '" + filename + "': " + e);
- }
- return data;
-}
-
-// Returns a Subject Public Key Digest from the given pem, if it exists.
-function getSKDFromPem(pem) {
- let cert = gCertDB.constructX509FromBase64(pem, pem.length);
- return cert.sha256SubjectPublicKeyInfoDigest;
-}
-
-/**
- * Hashes |input| using the SHA-256 algorithm in the following manner:
- * btoa(sha256(atob(input)))
- *
- * @argument {String} input Base64 string to decode and return the hash of.
- * @returns {String} Base64 encoded SHA-256 hash.
- */
-function sha256Base64(input) {
- let decodedValue;
- try {
- decodedValue = atob(input);
- }
- catch (e) {
- throw new Error(`ERROR: could not decode as base64: '${input}': ${e}`);
- }
-
- // Convert |decodedValue| to an array so that it can be hashed by the
- // nsICryptoHash instance below.
- // In most cases across the code base, convertToByteArray() of
- // nsIScriptableUnicodeConverter is used to do this, but the method doesn't
- // seem to work here.
- let data = [];
- for (let i = 0; i < decodedValue.length; i++) {
- data[i] = decodedValue.charCodeAt(i);
- }
-
- let hasher = Cc["@mozilla.org/security/hash;1"]
- .createInstance(Ci.nsICryptoHash);
- hasher.init(hasher.SHA256);
- hasher.update(data, data.length);
-
- // true is passed so that the hasher returns a Base64 encoded string.
- return hasher.finish(true);
-}
-
-// Downloads the static certs file and tries to map Google Chrome nicknames
-// to Mozilla nicknames, as well as storing any hashes for pins for which we
-// don't have root PEMs. Each entry consists of a line containing the name of
-// the pin followed either by a hash in the format "sha256/" + base64(hash),
-// a PEM encoded public key, or a PEM encoded certificate.
-// For certificates that we have in our database,
-// return a map of Google's nickname to ours. For ones that aren't return a
-// map of Google's nickname to SHA-256 values. This code is modeled after agl's
-// https://github.com/agl/transport-security-state-generate, which doesn't
-// live in the Chromium repo because go is not an official language in
-// Chromium.
-// For all of the entries in this file:
-// - If the entry has a hash format, find the Mozilla pin name (cert nickname)
-// and stick the hash into certSKDToName
-// - If the entry has a PEM format, parse the PEM, find the Mozilla pin name
-// and stick the hash in certSKDToName
-// We MUST be able to find a corresponding cert nickname for the Chrome names,
-// otherwise we skip all pinsets referring to that Chrome name.
-function downloadAndParseChromeCerts(filename, certNameToSKD, certSKDToName) {
- // Prefixes that we care about.
- const BEGIN_CERT = "-----BEGIN CERTIFICATE-----";
- const END_CERT = "-----END CERTIFICATE-----";
- const BEGIN_PUB_KEY = "-----BEGIN PUBLIC KEY-----";
- const END_PUB_KEY = "-----END PUBLIC KEY-----";
-
- // Parsing states.
- const PRE_NAME = 0;
- const POST_NAME = 1;
- const IN_CERT = 2;
- const IN_PUB_KEY = 3;
- let state = PRE_NAME;
-
- let lines = download(filename).split("\n");
- let name = "";
- let pemCert = "";
- let pemPubKey = "";
- let hash = "";
- let chromeNameToHash = {};
- let chromeNameToMozName = {};
- let chromeName;
- for (let line of lines) {
- // Skip comments and newlines.
- if (line.length == 0 || line[0] == '#') {
- continue;
- }
- switch (state) {
- case PRE_NAME:
- chromeName = line;
- state = POST_NAME;
- break;
- case POST_NAME:
- if (line.startsWith(SHA256_PREFIX)) {
- hash = line.substring(SHA256_PREFIX.length);
- chromeNameToHash[chromeName] = hash;
- certNameToSKD[chromeName] = hash;
- certSKDToName[hash] = chromeName;
- state = PRE_NAME;
- } else if (line.startsWith(BEGIN_CERT)) {
- state = IN_CERT;
- } else if (line.startsWith(BEGIN_PUB_KEY)) {
- state = IN_PUB_KEY;
- } else {
- throw new Error("ERROR: couldn't parse Chrome certificate file " +
- "line: " + line);
- }
- break;
- case IN_CERT:
- if (line.startsWith(END_CERT)) {
- state = PRE_NAME;
- hash = getSKDFromPem(pemCert);
- pemCert = "";
- let mozName;
- if (hash in certSKDToName) {
- mozName = certSKDToName[hash];
- } else {
- // Not one of our built-in certs. Prefix the name with
- // GOOGLE_PIN_.
- mozName = GOOGLE_PIN_PREFIX + chromeName;
- dump("Can't find hash in builtin certs for Chrome nickname " +
- chromeName + ", inserting " + mozName + "\n");
- certSKDToName[hash] = mozName;
- certNameToSKD[mozName] = hash;
- }
- chromeNameToMozName[chromeName] = mozName;
- } else {
- pemCert += line;
- }
- break;
- case IN_PUB_KEY:
- if (line.startsWith(END_PUB_KEY)) {
- state = PRE_NAME;
- hash = sha256Base64(pemPubKey);
- pemPubKey = "";
- chromeNameToHash[chromeName] = hash;
- certNameToSKD[chromeName] = hash;
- certSKDToName[hash] = chromeName;
- } else {
- pemPubKey += line;
- }
- break;
- default:
- throw new Error("ERROR: couldn't parse Chrome certificate file " + line);
- }
- }
- return [ chromeNameToHash, chromeNameToMozName ];
-}
-
-// We can only import pinsets from chrome if for every name in the pinset:
-// - We have a hash from Chrome's static certificate file
-// - We have a builtin cert
-// If the pinset meets these requirements, we store a map array of pinset
-// objects:
-// {
-// pinset_name : {
-// // Array of names with entries in certNameToSKD
-// sha256_hashes: []
-// }
-// }
-// and an array of imported pinset entries:
-// { name: string, include_subdomains: boolean, test_mode: boolean,
-// pins: pinset_name }
-function downloadAndParseChromePins(filename,
- chromeNameToHash,
- chromeNameToMozName,
- certNameToSKD,
- certSKDToName) {
- let chromePreloads = downloadAsJson(filename);
- let chromePins = chromePreloads.pinsets;
- let chromeImportedPinsets = {};
- let chromeImportedEntries = [];
-
- chromePins.forEach(function(pin) {
- let valid = true;
- let pinset = { name: pin.name, sha256_hashes: [] };
- // Translate the Chrome pinset format to ours
- pin.static_spki_hashes.forEach(function(name) {
- if (name in chromeNameToHash) {
- let hash = chromeNameToHash[name];
- pinset.sha256_hashes.push(certSKDToName[hash]);
-
- // We should have already added hashes for all of these when we
- // imported the certificate file.
- if (!certNameToSKD[name]) {
- throw new Error("ERROR: No hash for name: " + name);
- }
- } else if (name in chromeNameToMozName) {
- pinset.sha256_hashes.push(chromeNameToMozName[name]);
- } else {
- dump("Skipping Chrome pinset " + pinset.name + ", couldn't find " +
- "builtin " + name + " from cert file\n");
- valid = false;
- }
- });
- if (valid) {
- chromeImportedPinsets[pinset.name] = pinset;
- }
- });
-
- // Grab the domain entry lists. Chrome's entry format is similar to
- // ours, except theirs includes a HSTS mode.
- const cData = gStaticPins.chromium_data;
- let entries = chromePreloads.entries;
- entries.forEach(function(entry) {
- // HSTS entry only
- if (!entry.pins) {
- return;
- }
- let pinsetName = cData.substitute_pinsets[entry.pins];
- if (!pinsetName) {
- pinsetName = entry.pins;
- }
-
- // We trim the entry name here to avoid breaking hostname comparisons in the
- // HPKP implementation.
- entry.name = entry.name.trim();
-
- let isProductionDomain =
- (cData.production_domains.indexOf(entry.name) != -1);
- let isProductionPinset =
- (cData.production_pinsets.indexOf(pinsetName) != -1);
- let excludeDomain =
- (cData.exclude_domains.indexOf(entry.name) != -1);
- let isTestMode = !isProductionPinset && !isProductionDomain;
- if (entry.pins && !excludeDomain && chromeImportedPinsets[entry.pins]) {
- chromeImportedEntries.push({
- name: entry.name,
- include_subdomains: entry.include_subdomains,
- test_mode: isTestMode,
- is_moz: false,
- pins: pinsetName });
- }
- });
- return [ chromeImportedPinsets, chromeImportedEntries ];
-}
-
-// Returns a pair of maps [certNameToSKD, certSKDToName] between cert
-// nicknames and digests of the SPKInfo for the mozilla trust store
-function loadNSSCertinfo(extraCertificates) {
- let allCerts = gCertDB.getCerts();
- let enumerator = allCerts.getEnumerator();
- let certNameToSKD = {};
- let certSKDToName = {};
- while (enumerator.hasMoreElements()) {
- let cert = enumerator.getNext().QueryInterface(Ci.nsIX509Cert);
- if (!isCertBuiltIn(cert)) {
- continue;
- }
- let name = cert.nickname.substr(BUILT_IN_NICK_PREFIX.length);
- let SKD = cert.sha256SubjectPublicKeyInfoDigest;
- certNameToSKD[name] = SKD;
- certSKDToName[SKD] = name;
- }
-
- for (let cert of extraCertificates) {
- let name = cert.commonName;
- let SKD = cert.sha256SubjectPublicKeyInfoDigest;
- certNameToSKD[name] = SKD;
- certSKDToName[SKD] = name;
- }
-
- {
- // This is the pinning test certificate. The key hash identifies the
- // default RSA key from pykey.
- let name = "End Entity Test Cert";
- let SKD = "VCIlmPM9NkgFQtrs4Oa5TeFcDu6MWRTKSNdePEhOgD8=";
- certNameToSKD[name] = SKD;
- certSKDToName[SKD] = name;
- }
- return [certNameToSKD, certSKDToName];
-}
-
-function parseJson(filename) {
- let json = stripComments(readFileToString(filename));
- return JSON.parse(json);
-}
-
-function nameToAlias(certName) {
- // change the name to a string valid as a c identifier
- // remove non-ascii characters
- certName = certName.replace(/[^[:ascii:]]/g, "_");
- // replace non word characters
- certName = certName.replace(/[^A-Za-z0-9]/g, "_");
-
- return "k" + certName + "Fingerprint";
-}
-
-function compareByName (a, b) {
- return a.name.localeCompare(b.name);
-}
-
-function genExpirationTime() {
- let now = new Date();
- let nowMillis = now.getTime();
- let expirationMillis = nowMillis + (PINNING_MINIMUM_REQUIRED_MAX_AGE * 1000);
- let expirationMicros = expirationMillis * 1000;
- return "static const PRTime kPreloadPKPinsExpirationTime = INT64_C(" +
- expirationMicros + ");\n";
-}
-
-function writeFullPinset(certNameToSKD, certSKDToName, pinset) {
- let prefix = "kPinset_" + pinset.name;
- if (!pinset.sha256_hashes || pinset.sha256_hashes.length == 0) {
- throw new Error(`ERROR: Pinset ${pinset.name} does not contain any hashes`);
- }
- writeFingerprints(certNameToSKD, certSKDToName, pinset.name,
- pinset.sha256_hashes);
-}
-
-function writeFingerprints(certNameToSKD, certSKDToName, name, hashes) {
- let varPrefix = "kPinset_" + name;
- writeString("static const char* const " + varPrefix + "_Data[] = {\n");
- let SKDList = [];
- for (let certName of hashes) {
- if (!(certName in certNameToSKD)) {
- throw new Error(`ERROR: Can't find '${certName}' in certNameToSKD`);
- }
- SKDList.push(certNameToSKD[certName]);
- }
- for (let skd of SKDList.sort()) {
- writeString(" " + nameToAlias(certSKDToName[skd]) + ",\n");
- }
- if (hashes.length == 0) {
- // ANSI C requires that an initialiser list be non-empty.
- writeString(" 0\n");
- }
- writeString("};\n");
- writeString("static const StaticFingerprints " + varPrefix + " = {\n " +
- "sizeof(" + varPrefix + "_Data) / sizeof(const char*),\n " + varPrefix +
- "_Data\n};\n\n");
-}
-
-function writeEntry(entry) {
- let printVal = " { \"" + entry.name + "\",\ ";
- if (entry.include_subdomains) {
- printVal += "true, ";
- } else {
- printVal += "false, ";
- }
- // Default to test mode if not specified.
- let testMode = true;
- if (entry.hasOwnProperty("test_mode")) {
- testMode = entry.test_mode;
- }
- if (testMode) {
- printVal += "true, ";
- } else {
- printVal += "false, ";
- }
- if (entry.is_moz || (entry.pins.indexOf("mozilla") != -1 &&
- entry.pins != "mozilla_test")) {
- printVal += "true, ";
- } else {
- printVal += "false, ";
- }
- if ("id" in entry) {
- if (entry.id >= 256) {
- throw new Error("ERROR: Not enough buckets in histogram");
- }
- if (entry.id >= 0) {
- printVal += entry.id + ", ";
- }
- } else {
- printVal += "-1, ";
- }
- printVal += "&kPinset_" + entry.pins;
- printVal += " },\n";
- writeString(printVal);
-}
-
-function writeDomainList(chromeImportedEntries) {
- writeString("/* Sort hostnames for binary search. */\n");
- writeString("static const TransportSecurityPreload " +
- "kPublicKeyPinningPreloadList[] = {\n");
- let count = 0;
- let mozillaDomains = {};
- gStaticPins.entries.forEach(function(entry) {
- mozillaDomains[entry.name] = true;
- });
- // For any domain for which we have set pins, exclude them from
- // chromeImportedEntries.
- for (let i = chromeImportedEntries.length - 1; i >= 0; i--) {
- if (mozillaDomains[chromeImportedEntries[i].name]) {
- dump("Skipping duplicate pinset for domain " +
- JSON.stringify(chromeImportedEntries[i], undefined, 2) + "\n");
- chromeImportedEntries.splice(i, 1);
- }
- }
- let sortedEntries = gStaticPins.entries;
- sortedEntries.push.apply(sortedEntries, chromeImportedEntries);
- for (let entry of sortedEntries.sort(compareByName)) {
- count++;
- writeEntry(entry);
- }
- writeString("};\n");
-
- writeString("\n// Pinning Preload List Length = " + count + ";\n");
- writeString("\nstatic const int32_t kUnknownId = -1;\n");
-}
-
-function writeFile(certNameToSKD, certSKDToName,
- chromeImportedPinsets, chromeImportedEntries) {
- // Compute used pins from both Chrome's and our pinsets, so we can output
- // them later.
- let usedFingerprints = {};
- let mozillaPins = {};
- gStaticPins.pinsets.forEach(function(pinset) {
- mozillaPins[pinset.name] = true;
- pinset.sha256_hashes.forEach(function (name) {
- usedFingerprints[name] = true;
- });
- });
- for (let key in chromeImportedPinsets) {
- let pinset = chromeImportedPinsets[key];
- pinset.sha256_hashes.forEach(function(name) {
- usedFingerprints[name] = true;
- });
- }
-
- writeString(FILE_HEADER);
-
- // Write actual fingerprints.
- Object.keys(usedFingerprints).sort().forEach(function(certName) {
- if (certName) {
- writeString("/* " + certName + " */\n");
- writeString("static const char " + nameToAlias(certName) + "[] =\n");
- writeString(" \"" + certNameToSKD[certName] + "\";\n");
- writeString("\n");
- }
- });
-
- // Write the pinsets
- writeString(PINSETDEF);
- writeString("/* PreloadedHPKPins.json pinsets */\n");
- gStaticPins.pinsets.sort(compareByName).forEach(function(pinset) {
- writeFullPinset(certNameToSKD, certSKDToName, pinset);
- });
- writeString("/* Chrome static pinsets */\n");
- for (let key in chromeImportedPinsets) {
- if (mozillaPins[key]) {
- dump("Skipping duplicate pinset " + key + "\n");
- } else {
- dump("Writing pinset " + key + "\n");
- writeFullPinset(certNameToSKD, certSKDToName, chromeImportedPinsets[key]);
- }
- }
-
- // Write the domainlist entries.
- writeString(DOMAINHEADER);
- writeDomainList(chromeImportedEntries);
- writeString("\n");
- writeString(genExpirationTime());
-}
-
-function loadExtraCertificates(certStringList) {
- let constructedCerts = [];
- for (let certString of certStringList) {
- constructedCerts.push(gCertDB.constructX509FromBase64(certString));
- }
- return constructedCerts;
-}
-
-var extraCertificates = loadExtraCertificates(gStaticPins.extra_certificates);
-var [ certNameToSKD, certSKDToName ] = loadNSSCertinfo(extraCertificates);
-var [ chromeNameToHash, chromeNameToMozName ] = downloadAndParseChromeCerts(
- gStaticPins.chromium_data.cert_file_url, certNameToSKD, certSKDToName);
-var [ chromeImportedPinsets, chromeImportedEntries ] =
- downloadAndParseChromePins(gStaticPins.chromium_data.json_file_url,
- chromeNameToHash, chromeNameToMozName, certNameToSKD, certSKDToName);
-
-writeFile(certNameToSKD, certSKDToName, chromeImportedPinsets,
- chromeImportedEntries);
-
-FileUtils.closeSafeFileOutputStream(gFileOutputStream);
diff --git a/security/manager/tools/getHSTSPreloadList.js b/security/manager/tools/getHSTSPreloadList.js
deleted file mode 100644
index cf56146513..0000000000
--- a/security/manager/tools/getHSTSPreloadList.js
+++ /dev/null
@@ -1,461 +0,0 @@
-/* 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/. */
-"use strict";
-
-// How to run this file:
-// 1. [obtain firefox source code]
-// 2. [build/obtain firefox binaries]
-// 3. run `[path to]/run-mozilla.sh [path to]/xpcshell \
-// [path to]/getHSTSPreloadlist.js \
-// [absolute path to]/nsSTSPreloadlist.inc'
-// Note: Running this file outputs a new nsSTSPreloadlist.inc in the current
-// working directory.
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-var Cr = Components.results;
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/FileUtils.jsm");
-Cu.import("resource:///modules/XPCOMUtils.jsm");
-
-const SOURCE = "https://chromium.googlesource.com/chromium/src/net/+/master/http/transport_security_state_static.json?format=TEXT";
-const TOOL_IDENTIFIER = "UXP HSTS preload list verifier"
-const OUTPUT = "nsSTSPreloadList.inc";
-const ERROR_OUTPUT = "nsSTSPreloadList.errors";
-const MINIMUM_REQUIRED_MAX_AGE = 60 * 60 * 24 * 7 * 18;
-const MAX_CONCURRENT_REQUESTS = 15;
-const MAX_RETRIES = 2;
-const REQUEST_TIMEOUT = 10 * 1000;
-const ERROR_NONE = "no error";
-const ERROR_CONNECTING_TO_HOST = "could not connect to host";
-const ERROR_NO_HSTS_HEADER = "did not receive HSTS header";
-const ERROR_MAX_AGE_TOO_LOW = "max-age too low: ";
-const HEADER = "/* This Source Code Form is subject to the terms of the Mozilla Public\n" +
-" * License, v. 2.0. If a copy of the MPL was not distributed with this\n" +
-" * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n" +
-"\n" +
-"/*****************************************************************************/\n" +
-"/* This is an automatically generated file. If you're not */\n" +
-"/* nsSiteSecurityService.cpp, you shouldn't be #including it. */\n" +
-"/*****************************************************************************/\n" +
-"\n" +
-"#include <stdint.h>\n";
-const PREFIX = "\n" +
-"class nsSTSPreload\n" +
-"{\n" +
-" public:\n" +
-" const char *mHost;\n" +
-" const bool mIncludeSubdomains;\n" +
-"};\n" +
-"\n" +
-"static const nsSTSPreload kSTSPreloadList[] = {\n";
-const POSTFIX = "};\n";
-
-function download() {
- var req = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
- .createInstance(Ci.nsIXMLHttpRequest);
- req.open("GET", SOURCE, false); // doing the request synchronously
- try {
- req.send();
- }
- catch (e) {
- throw new Error(`ERROR: problem downloading '${SOURCE}': ${e}`);
- }
-
- if (req.status != 200) {
- throw new Error("ERROR: problem downloading '" + SOURCE + "': status " +
- req.status);
- }
-
- var resultDecoded;
- try {
- resultDecoded = atob(req.responseText);
- }
- catch (e) {
- throw new Error("ERROR: could not decode data as base64 from '" + SOURCE +
- "': " + e);
- }
-
- // we have to filter out '//' comments, while not mangling the json
- var result = resultDecoded.replace(/^(\s*)?\/\/[^\n]*\n/mg, "");
- var data = null;
- try {
- data = JSON.parse(result);
- }
- catch (e) {
- throw new Error(`ERROR: could not parse data from '${SOURCE}': ${e}`);
- }
- return data;
-}
-
-function getHosts(rawdata) {
- var hosts = [];
-
- if (!rawdata || !rawdata.entries) {
- throw new Error("ERROR: source data not formatted correctly: 'entries' " +
- "not found");
- }
-
- for (let entry of rawdata.entries) {
- if (entry.mode && entry.mode == "force-https") {
- if (entry.name) {
- // We trim the entry name here to avoid malformed URI exceptions when we
- // later try to connect to the domain.
- entry.name = entry.name.trim();
- entry.retries = MAX_RETRIES;
- entry.originalIncludeSubdomains = entry.include_subdomains;
- hosts.push(entry);
- } else {
- throw new Error("ERROR: entry not formatted correctly: no name found");
- }
- }
- }
-
- return hosts;
-}
-
-var gSSService = Cc["@mozilla.org/ssservice;1"]
- .getService(Ci.nsISiteSecurityService);
-
-function processStsHeader(host, header, status, securityInfo) {
- var maxAge = { value: 0 };
- var includeSubdomains = { value: false };
- var error = ERROR_NONE;
- if (header != null && securityInfo != null) {
- try {
- var uri = Services.io.newURI("https://" + host.name, null, null);
- var sslStatus = securityInfo.QueryInterface(Ci.nsISSLStatusProvider)
- .SSLStatus;
- gSSService.processHeader(Ci.nsISiteSecurityService.HEADER_HSTS,
- uri, header, sslStatus, 0, maxAge,
- includeSubdomains);
- }
- catch (e) {
- dump("ERROR: could not process header '" + header + "' from " +
- host.name + ": " + e + "\n");
- error = e;
- }
- } else if (status == 0) {
- error = ERROR_CONNECTING_TO_HOST;
- } else {
- error = ERROR_NO_HSTS_HEADER;
- }
-
- let forceInclude = (host.forceInclude || host.pins == "google");
-
- if (error == ERROR_NONE && maxAge.value < MINIMUM_REQUIRED_MAX_AGE) {
- error = ERROR_MAX_AGE_TOO_LOW;
- }
-
- return { name: host.name,
- maxAge: maxAge.value,
- includeSubdomains: includeSubdomains.value,
- error: error,
- retries: host.retries - 1,
- forceInclude: forceInclude,
- originalIncludeSubdomains: host.originalIncludeSubdomains };
-}
-
-// RedirectAndAuthStopper prevents redirects and HTTP authentication
-function RedirectAndAuthStopper() {}
-
-RedirectAndAuthStopper.prototype = {
- // nsIChannelEventSink
- asyncOnChannelRedirect: function(oldChannel, newChannel, flags, callback) {
- throw new Error(Cr.NS_ERROR_ENTITY_CHANGED);
- },
-
- // nsIAuthPrompt2
- promptAuth: function(channel, level, authInfo) {
- return false;
- },
-
- asyncPromptAuth: function(channel, callback, context, level, authInfo) {
- throw new Error(Cr.NS_ERROR_NOT_IMPLEMENTED);
- },
-
- getInterface: function(iid) {
- return this.QueryInterface(iid);
- },
-
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIChannelEventSink,
- Ci.nsIAuthPrompt2])
-};
-
-function getHSTSStatus(host, resultList) {
- var req = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
- .createInstance(Ci.nsIXMLHttpRequest);
- var inResultList = false;
- var uri = "https://" + host.name + "/";
- req.open("HEAD", uri, true);
- req.setRequestHeader("X-Automated-Tool", TOOL_IDENTIFIER);
- req.timeout = REQUEST_TIMEOUT;
-
- let errorhandler = (evt) => {
- dump(`ERROR: error making request to ${host.name} (type=${evt.type})\n`);
- if (!inResultList) {
- inResultList = true;
- resultList.push(processStsHeader(host, null, req.status,
- req.channel.securityInfo));
- }
- };
- req.onerror = errorhandler;
- req.ontimeout = errorhandler;
- req.onabort = errorhandler;
-
- req.onload = function(event) {
- if (!inResultList) {
- inResultList = true;
- var header = req.getResponseHeader("strict-transport-security");
- resultList.push(processStsHeader(host, header, req.status,
- req.channel.securityInfo));
- }
- };
-
- try {
- req.channel.notificationCallbacks = new RedirectAndAuthStopper();
- req.send();
- }
- catch (e) {
- dump("ERROR: exception making request to " + host.name + ": " + e + "\n");
- }
-}
-
-function compareHSTSStatus(a, b) {
- if (a.name > b.name) {
- return 1;
- }
- if (a.name < b.name) {
- return -1;
- }
- return 0;
-}
-
-function writeTo(string, fos) {
- fos.write(string, string.length);
-}
-
-// Determines and returns a string representing a declaration of when this
-// preload list should no longer be used.
-// This is the current time plus MINIMUM_REQUIRED_MAX_AGE.
-function getExpirationTimeString() {
- var now = new Date();
- var nowMillis = now.getTime();
- // MINIMUM_REQUIRED_MAX_AGE is in seconds, so convert to milliseconds
- var expirationMillis = nowMillis + (MINIMUM_REQUIRED_MAX_AGE * 1000);
- var expirationMicros = expirationMillis * 1000;
- return "const PRTime gPreloadListExpirationTime = INT64_C(" + expirationMicros + ");\n";
-}
-
-function errorToString(status) {
- return (status.error == ERROR_MAX_AGE_TOO_LOW
- ? status.error + status.maxAge
- : status.error);
-}
-
-function writeEntry(status, outputStream) {
- let incSubdomainsBool = (status.forceInclude && status.error != ERROR_NONE
- ? status.originalIncludeSubdomains
- : status.includeSubdomains);
- let includeSubdomains = (incSubdomainsBool ? "true" : "false");
- writeTo(" { \"" + status.name + "\", " + includeSubdomains + " },\n",
- outputStream);
-}
-
-function output(sortedStatuses, currentList) {
- try {
- var file = FileUtils.getFile("CurWorkD", [OUTPUT]);
- var errorFile = FileUtils.getFile("CurWorkD", [ERROR_OUTPUT]);
- var fos = FileUtils.openSafeFileOutputStream(file);
- var eos = FileUtils.openSafeFileOutputStream(errorFile);
- writeTo(HEADER, fos);
- writeTo(getExpirationTimeString(), fos);
- writeTo(PREFIX, fos);
-
- dump("INFO: Removing error-state sites from list\n");
- for (let status in sortedStatuses) {
- // If we've encountered an error for this entry (other than the site not
- // sending an HSTS header), be safe and remove it from the list
- // (preventing stale entries from accumulating).
- if (status.error != ERROR_NONE &&
- status.error != ERROR_NO_HSTS_HEADER &&
- status.error != ERROR_MAX_AGE_TOO_LOW &&
- status.name in currentList) {
- // dump("INFO: error connecting to or processing " + status.name + " - dropping from list\n");
- writeTo(status.name + ": " + errorToString(status) + "\n", eos);
- status.maxAge = 0;
- }
- }
-
- // Filter out entries we aren't including.
- dump("INFO: Filtering out entries we aren't including...\n");
- var includedStatuses = sortedStatuses.filter(function (status) {
- if (status.maxAge < MINIMUM_REQUIRED_MAX_AGE && !status.forceInclude) {
- // dump("INFO: " + status.name + " NOT ON the preload list\n");
- writeTo(status.name + ": " + errorToString(status) + "\n", eos);
- return false;
- }
-
- // dump("INFO: " + status.name + " ON the preload list\n");
- if (status.forceInclude && status.error != ERROR_NONE) {
- writeTo(status.name + ": " + errorToString(status) + " (error "
- + "ignored - included regardless)\n", eos);
- }
- return true;
- });
-
- dump("INFO: Writing statuses to file...\n");
- for (var status of includedStatuses) {
- writeEntry(status, fos);
- }
- writeTo(POSTFIX, fos);
- FileUtils.closeSafeFileOutputStream(fos);
- FileUtils.closeSafeFileOutputStream(eos);
- }
- catch (e) {
- dump("ERROR: problem writing output to '" + OUTPUT + "': " + e + "\n");
- }
-}
-
-function shouldRetry(response) {
- return (response.error != ERROR_NO_HSTS_HEADER &&
- response.error != ERROR_MAX_AGE_TOO_LOW &&
- response.error != ERROR_NONE && response.retries > 0);
-}
-
-function getHSTSStatuses(inHosts, outStatuses) {
- var expectedOutputLength = inHosts.length;
- var tmpOutput = [];
- var procCount = 0;
- for (var i = 0; i < MAX_CONCURRENT_REQUESTS && inHosts.length > 0; i++) {
- let host = inHosts.shift();
- dump("spinning off request to '" + host.name + "' (remaining retries: " +
- host.retries + ")\n");
- getHSTSStatus(host, tmpOutput);
- }
-
- while (outStatuses.length != expectedOutputLength) {
- procCount++;
- if (procCount % 200 == 0) gc();
- waitForAResponse(tmpOutput);
- var response = tmpOutput.shift();
- dump("request to '" + response.name + "' finished\n");
- if (shouldRetry(response)) {
- inHosts.push(response);
- } else {
- outStatuses.push(response);
- }
-
- if (inHosts.length > 0) {
- let host = inHosts.shift();
- dump("[" + procCount + "] spinning off request to '" + host.name + "' (remaining retries: " +
- host.retries + ")\n");
- getHSTSStatus(host, tmpOutput);
- }
- }
-}
-
-// Since all events are processed on the main thread, and since event
-// handlers are not preemptible, there shouldn't be any concurrency issues.
-function waitForAResponse(outputList) {
- // From <https://developer.mozilla.org/en/XPConnect/xpcshell/HOWTO>
- var threadManager = Cc["@mozilla.org/thread-manager;1"]
- .getService(Ci.nsIThreadManager);
- var mainThread = threadManager.currentThread;
- while (outputList.length == 0) {
- mainThread.processNextEvent(true);
- }
-}
-
-function readCurrentList(filename) {
- var currentHosts = {};
- var file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
- file.initWithPath(filename);
- var fis = Cc["@mozilla.org/network/file-input-stream;1"]
- .createInstance(Ci.nsILineInputStream);
- fis.init(file, -1, -1, Ci.nsIFileInputStream.CLOSE_ON_EOF);
- var line = {};
- var entryRegex = / { "([^"]*)", (true|false) },/;
- while (fis.readLine(line)) {
- var match = entryRegex.exec(line.value);
- if (match) {
- currentHosts[match[1]] = (match[2] == "true");
- }
- }
- return currentHosts;
-}
-
-function combineLists(newHosts, currentHosts) {
- let newHostsSet = new Set();
-
- for (let newHost of newHosts) {
- newHostsSet.add(newHost.name);
- }
-
- for (let currentHost in currentHosts) {
- if (!newHostsSet.has(currentHost)) {
- newHosts.push({ name: currentHost, retries: MAX_RETRIES });
- }
- }
-}
-
-const TEST_ENTRIES = [
- { name: "includesubdomains.preloaded.test", includeSubdomains: true },
- { name: "includesubdomains2.preloaded.test", includeSubdomains: true },
- { name: "noincludesubdomains.preloaded.test", includeSubdomains: false },
-];
-
-function deleteTestHosts(currentHosts) {
- for (let testEntry of TEST_ENTRIES) {
- delete currentHosts[testEntry.name];
- }
-}
-
-function insertTestHosts(hstsStatuses) {
- for (let testEntry of TEST_ENTRIES) {
- hstsStatuses.push({
- name: testEntry.name,
- maxAge: MINIMUM_REQUIRED_MAX_AGE,
- includeSubdomains: testEntry.includeSubdomains,
- error: ERROR_NONE,
- // This deliberately doesn't have a value for `retries` (because we should
- // never attempt to connect to this host).
- forceInclude: true,
- originalIncludeSubdomains: testEntry.includeSubdomains,
- });
- }
-}
-
-// ****************************************************************************
-// This is where the action happens:
-if (arguments.length != 1) {
- throw new Error("Usage: getHSTSPreloadList.js " +
- "<absolute path to current nsSTSPreloadList.inc>");
-}
-// get the current preload list
-var currentHosts = readCurrentList(arguments[0]);
-// delete any hosts we use in tests so we don't actually connect to them
-deleteTestHosts(currentHosts);
-// disable the current preload list so it won't interfere with requests we make
-Services.prefs.setBoolPref("network.stricttransportsecurity.preloadlist", false);
-// download and parse the raw json file from the Chromium source
-var rawdata = download();
-// get just the hosts with mode: "force-https"
-var hosts = getHosts(rawdata);
-// add hosts in the current list to the new list (avoiding duplicates)
-combineLists(hosts, currentHosts);
-// get the HSTS status of each host
-var hstsStatuses = [];
-getHSTSStatuses(hosts, hstsStatuses);
-// add the hosts we use in tests
-insertTestHosts(hstsStatuses);
-// sort the hosts alphabetically
-hstsStatuses.sort(compareHSTSStatus);
-// write the results to a file (this is where we filter out hosts that we
-// either couldn't connect to, didn't receive an HSTS header from, couldn't
-// parse the header, or had a header with too short a max-age)
-output(hstsStatuses, currentHosts);
-// ****************************************************************************
diff --git a/security/nss/coreconf/SunOS5.mk b/security/nss/coreconf/SunOS5.mk
index ce9e2cbb95..08956ca240 100644
--- a/security/nss/coreconf/SunOS5.mk
+++ b/security/nss/coreconf/SunOS5.mk
@@ -65,7 +65,7 @@ endif
RANLIB = echo
CPU_ARCH = sparc
-OS_DEFINES += -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS -D_REENTRANT
+OS_DEFINES += -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS -D_REENTRANT -D__EXTENSIONS__
ifeq ($(OS_TEST),i86pc)
ifeq ($(USE_64),1)
diff --git a/testing/marionette/cert.js b/testing/marionette/cert.js
index c0b24d23bf..e54129c576 100644
--- a/testing/marionette/cert.js
+++ b/testing/marionette/cert.js
@@ -134,7 +134,6 @@ cert.InsecureSweepingOverride = function() {
// clear collected HSTS and HPKP state
// through the site security service
sss.clearAll();
- sss.clearPreloads();
},
};
};
diff --git a/toolkit/components/aboutcheckerboard/moz.build b/toolkit/components/aboutcheckerboard/moz.build
index 91d6e9662c..eb4454d28f 100644
--- a/toolkit/components/aboutcheckerboard/moz.build
+++ b/toolkit/components/aboutcheckerboard/moz.build
@@ -4,7 +4,4 @@
# 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/.
-JAR_MANIFESTS += ['jar.mn']
-
-with Files('**'):
- BUG_COMPONENT = ('Core', 'Panning and Zooming')
+JAR_MANIFESTS += ['jar.mn'] \ No newline at end of file
diff --git a/toolkit/components/aboutmemory/content/aboutMemory.css b/toolkit/components/aboutmemory/content/aboutMemory.css
index b63bbac13c..cf4d36de87 100644
--- a/toolkit/components/aboutmemory/content/aboutMemory.css
+++ b/toolkit/components/aboutmemory/content/aboutMemory.css
@@ -2,12 +2,6 @@
* 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/. */
-/*
- * The version used for mobile is located at
- * mobile/android/themes/core/aboutMemory.css.
- * Desktop-specific stuff is at the bottom of this file.
- */
-
html {
background: -moz-Dialog;
font: message-box;
diff --git a/toolkit/components/aboutmemory/moz.build b/toolkit/components/aboutmemory/moz.build
index dd3f71d8cb..aac3a838c4 100644
--- a/toolkit/components/aboutmemory/moz.build
+++ b/toolkit/components/aboutmemory/moz.build
@@ -4,9 +4,4 @@
# 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/.
-MOCHITEST_CHROME_MANIFESTS += ['tests/chrome.ini']
-
JAR_MANIFESTS += ['jar.mn']
-
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'about:memory')
diff --git a/toolkit/components/aboutmemory/tests/.eslintrc.js b/toolkit/components/aboutmemory/tests/.eslintrc.js
deleted file mode 100644
index 2c669d844e..0000000000
--- a/toolkit/components/aboutmemory/tests/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../testing/mochitest/chrome.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/aboutmemory/tests/chrome.ini b/toolkit/components/aboutmemory/tests/chrome.ini
deleted file mode 100644
index c25bc30a06..0000000000
--- a/toolkit/components/aboutmemory/tests/chrome.ini
+++ /dev/null
@@ -1,28 +0,0 @@
-[DEFAULT]
-skip-if = os == 'android'
-support-files =
- crash-dump-diff1.json
- crash-dump-diff2.json
- crash-dump-good.json
- memory-reports-bad.json
- memory-reports-diff1.json
- memory-reports-diff2.json
- memory-reports-good.json
- remote.xul
-
-[test_aboutmemory.xul]
-subsuite = clipboard
-[test_aboutmemory2.xul]
-subsuite = clipboard
-[test_aboutmemory3.xul]
-subsuite = clipboard
-[test_aboutmemory4.xul]
-subsuite = clipboard
-[test_aboutmemory5.xul]
-subsuite = clipboard
-skip-if = asan # Bug 1116230
-[test_aboutmemory6.xul]
-[test_memoryReporters.xul]
-[test_memoryReporters2.xul]
-[test_sqliteMultiReporter.xul]
-[test_dumpGCAndCCLogsToFile.xul]
diff --git a/toolkit/components/aboutmemory/tests/crash-dump-diff1.json b/toolkit/components/aboutmemory/tests/crash-dump-diff1.json
deleted file mode 100644
index d41bbcc61e..0000000000
--- a/toolkit/components/aboutmemory/tests/crash-dump-diff1.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "foo": 1,
- "blah": 2,
- "memory_report": {
- "version": 1,
- "hasMozMallocUsableSize": true,
- "reports": [
- {"process": "Main Process (pid NNN)", "path": "heap-allocated", "kind": 2, "units": 0, "amount": 262144000, "description": "Heap allocated."}
- ]
- }
-}
diff --git a/toolkit/components/aboutmemory/tests/crash-dump-diff2.json b/toolkit/components/aboutmemory/tests/crash-dump-diff2.json
deleted file mode 100644
index 8f9451f625..0000000000
--- a/toolkit/components/aboutmemory/tests/crash-dump-diff2.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "foo": 3,
- "blah": 4,
- "memory_report": {
- "version": 1,
- "hasMozMallocUsableSize": true,
- "reports": [
- {"process": "Main Process (pid NNN)", "path": "heap-allocated", "kind": 2, "units": 0, "amount": 262144001, "description": "Heap allocated."}
- ]
- }
-}
diff --git a/toolkit/components/aboutmemory/tests/crash-dump-good.json b/toolkit/components/aboutmemory/tests/crash-dump-good.json
deleted file mode 100644
index 6bee54d591..0000000000
--- a/toolkit/components/aboutmemory/tests/crash-dump-good.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "foo": 1,
- "blah": 2,
- "memory_report": {
- "version": 1,
- "hasMozMallocUsableSize": true,
- "reports": [
- {"process": "Main Process (pid NNN)", "path": "heap-allocated", "kind": 2, "units": 0, "amount": 262144000, "description": "Heap allocated."},
- {"process": "Main Process (pid NNN)", "path": "other/b", "kind": 2, "units": 0, "amount": 104857, "description": "Other b."},
- {"process": "Main Process (pid NNN)", "path": "other/a", "kind": 2, "units": 0, "amount": 209715, "description": "Other a."},
- {"process": "Main Process (pid NNN)", "path": "explicit/a/b", "kind": 1, "units": 0, "amount": 52428800, "description": "A b."}
- ]
- }
-}
diff --git a/toolkit/components/aboutmemory/tests/memory-reports-bad.json b/toolkit/components/aboutmemory/tests/memory-reports-bad.json
deleted file mode 100644
index 61a2092b1b..0000000000
--- a/toolkit/components/aboutmemory/tests/memory-reports-bad.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "version": 1
-}
diff --git a/toolkit/components/aboutmemory/tests/memory-reports-diff1.json b/toolkit/components/aboutmemory/tests/memory-reports-diff1.json
deleted file mode 100644
index 0bfe0b26bf..0000000000
--- a/toolkit/components/aboutmemory/tests/memory-reports-diff1.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "version": 1,
- "hasMozMallocUsableSize": true,
- "reports": [
- {"process": "P", "path": "explicit/xpcom/category-manager", "kind": 1, "units": 0, "amount": 56848, "description": "Desc."},
- {"process": "P", "path": "explicit/storage/prefixset/goog-phish-shavar", "kind": 1, "units": 0, "amount": 680000, "description": "Desc."},
-
- {"process": "P", "path": "explicit/spell-check", "kind": 1, "units": 0, "amount": 4, "description": "Desc."},
- {"process": "P", "path": "explicit/spell-check", "kind": 1, "units": 0, "amount": 5, "description": "Desc."},
-
- {"process": "P", "path": "page-faults-soft", "kind": 2, "units": 2, "amount": 61013, "description": "Desc."},
-
- {"process": "P", "path": "foobar", "kind": 2, "units": 0, "amount": 100, "description": "Desc."},
- {"process": "P", "path": "zero1", "kind": 2, "units": 0, "amount": 0, "description": "Desc."},
-
- {"process": "P", "path": "a/b", "kind": 2, "units": 0, "amount": 1000000, "description": "Desc."},
- {"process": "P", "path": "a/c/d", "kind": 2, "units": 0, "amount": 2000000, "description": "Desc."},
- {"process": "P", "path": "a/c/e", "kind": 2, "units": 0, "amount": 2000000, "description": "Desc."},
- {"process": "P", "path": "a/c/f", "kind": 2, "units": 0, "amount": 3000000, "description": "Desc."},
- {"process": "P", "path": "a/c/g", "kind": 2, "units": 0, "amount": 3000000, "description": "Desc."},
- {"process": "P", "path": "a/h", "kind": 2, "units": 0, "amount": 1000, "description": "Desc."},
-
- {"process": "P2 (pid 22)", "path": "p1 (pid 123)", "kind": 2, "units": 0, "amount": 33, "description": "Desc."},
- {"process": "P2 (pid 22)", "path": "p2 (blah, pid=123)", "kind": 2, "units": 0, "amount": 33, "description": "Desc."},
- {"process": "P2 (pid 22)", "path": "p3/zone(0x1234)/p3", "kind": 2, "units": 0, "amount": 33, "description": "Desc."},
- {"process": "P2 (pid 22)", "path": "p4/js-zone(0x1234)/p4", "kind": 2, "units": 0, "amount": 33, "description": "Desc."},
- {"process": "P2 (pid 22)", "path": "p5/worker(foo.com, 0x1234)/p5", "kind": 2, "units": 0, "amount": 33, "description": "Desc."},
- {"process": "P2 (pid 22)", "path": "explicit/window-objects/top(bar.com, id=123)/...", "kind": 0, "units": 0, "amount": 33, "description": "Desc."},
- {"process": "P2 (pid 22)", "path": "p6/z-moz-nullprincipal:{85e250f3-57ae-46c4-a11e-4176dd39d9c5}/p6", "kind": 2, "units": 0, "amount": 33, "description": "Desc."},
- {"process": "P2 (pid 22)", "path": "p7/js-main-runtime-compartments/system/jar:file:\\\\\\temp_xyz\\firefox\\omni.ja!/p7", "kind": 2, "units": 0, "amount": 33, "description": "Desc."},
-
- {"process": "P3", "path": "p3", "kind": 2, "units": 0, "amount": 55, "description": "Desc."},
-
- {"process": "P5", "path": "p5", "kind": 2, "units": 0, "amount": 0, "description": "Desc."},
-
- {"process": "P7", "path": "p7", "kind": 2, "units": 0, "amount": 5, "description": "Desc."},
-
- {"process": "P8", "path": "p8/a/b/c/d", "kind": 2, "units": 0, "amount": 3, "description": "Desc."},
- {"process": "P8", "path": "p8/a/b/c/e", "kind": 2, "units": 0, "amount": 4, "description": "Desc."},
- {"process": "P8", "path": "p8/a/b/f", "kind": 2, "units": 0, "amount": 5, "description": "Desc."},
- {"process": "P8", "path": "p8/a/g/h", "kind": 2, "units": 0, "amount": 6, "description": "Desc."},
- {"process": "P8", "path": "p8/a/g/i", "kind": 2, "units": 0, "amount": 7, "description": "Desc."}
- ]
-}
-
diff --git a/toolkit/components/aboutmemory/tests/memory-reports-diff2.json b/toolkit/components/aboutmemory/tests/memory-reports-diff2.json
deleted file mode 100644
index e2ef4caa70..0000000000
--- a/toolkit/components/aboutmemory/tests/memory-reports-diff2.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "version": 1,
- "hasMozMallocUsableSize": true,
- "reports": [
- {"process": "P", "path": "explicit/xpcom/category-manager", "kind": 1, "units": 0, "amount": 56849, "description": "Desc."},
- {"process": "P", "path": "explicit/storage/prefixset/goog-phish-shavar", "kind": 1, "units": 0, "amount": 670000, "description": "Desc."},
-
- {"process": "P", "path": "explicit/spell-check", "kind": 1, "units": 0, "amount": 3, "description": "Desc."},
-
- {"process": "P", "path": "page-faults-soft", "kind": 2, "units": 2, "amount": 61013, "description": "Desc."},
-
- {"process": "P", "path": "canvas-2d-pixel-bytes", "kind": 2, "units": 0, "amount": 1000, "description": "Desc."},
- {"process": "P", "path": "canvas-2d-pixel-bytes", "kind": 2, "units": 0, "amount": 2000, "description": "Desc."},
-
- {"process": "P", "path": "foobaz", "kind": 2, "units": 0, "amount": 0, "description": "Desc."},
-
- {"process": "P", "path": "a/b", "kind": 2, "units": 0, "amount": 2000000, "description": "Desc."},
- {"process": "P", "path": "a/c/d", "kind": 2, "units": 0, "amount": 2998000, "description": "Desc."},
- {"process": "P", "path": "a/c/e", "kind": 2, "units": 0, "amount": 1001000, "description": "Desc."},
- {"process": "P", "path": "a/c/f", "kind": 2, "units": 0, "amount": 3001000, "description": "Desc."},
- {"process": "P", "path": "a/c/g", "kind": 2, "units": 0, "amount": 3001000, "description": "Desc."},
- {"process": "P", "path": "a/h", "kind": 2, "units": 0, "amount": 2000, "description": "Desc."},
-
- {"process": "P2 (pid 22)", "path": "p1 (pid 456)", "kind": 2, "units": 0, "amount": 44, "description": "Desc."},
- {"process": "P2 (pid 22)", "path": "p2 (blah, pid=456)", "kind": 2, "units": 0, "amount": 44, "description": "Desc."},
- {"process": "P2 (pid 22)", "path": "p3/zone(0x5678)/p3", "kind": 2, "units": 0, "amount": 44, "description": "Desc."},
- {"process": "P2 (pid 22)", "path": "p4/js-zone(0x5678)/p4", "kind": 2, "units": 0, "amount": 44, "description": "Desc."},
- {"process": "P2 (pid 22)", "path": "p5/worker(foo.com, 0x5678)/p5", "kind": 2, "units": 0, "amount": 44, "description": "Desc."},
- {"process": "P2 (pid 22)", "path": "explicit/window-objects/top(bar.com, id=456)/...", "kind": 0, "units": 0, "amount": 44, "description": "Desc."},
- {"process": "P2 (pid 22)", "path": "p6/z-moz-nullprincipal:{161effaa-c1f7-4010-a08e-e7c9aea01aed}/p6", "kind": 2, "units": 0, "amount": 44, "description": "Desc."},
- {"process": "P2 (pid 22)", "path": "p7/js-main-runtime-compartments/system/jar:file:\\\\\\temp_abc\\firefox\\omni.ja!/p7", "kind": 2, "units": 0, "amount": 44, "description": "Desc."},
-
- {"process": "P4", "path": "p4", "kind": 2, "units": 0, "amount": 66, "description": "Desc."},
-
- {"process": "P6", "path": "p6", "kind": 2, "units": 0, "amount": 0, "description": "Desc."},
-
- {"process": "P7", "path": "p7/b", "kind": 2, "units": 0, "amount": 3, "description": "Desc."},
- {"process": "P7", "path": "p7/c", "kind": 2, "units": 0, "amount": 4, "description": "Desc."},
-
- {"process": "P8", "path": "p8/a/b", "kind": 2, "units": 0, "amount": 1, "description": "Desc."},
- {"process": "P8", "path": "p8/a/g", "kind": 2, "units": 0, "amount": 2, "description": "Desc."}
- ]
-}
-
diff --git a/toolkit/components/aboutmemory/tests/memory-reports-good.json b/toolkit/components/aboutmemory/tests/memory-reports-good.json
deleted file mode 100644
index 013b4b1250..0000000000
--- a/toolkit/components/aboutmemory/tests/memory-reports-good.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "version": 1,
- "hasMozMallocUsableSize": true,
- "reports": [
- {"process": "Main Process (pid NNN)", "path": "heap-allocated", "kind": 2, "units": 0, "amount": 262144000, "description": "Heap allocated."},
- {"process": "Main Process (pid NNN)", "path": "other/b", "kind": 2, "units": 0, "amount": 104857, "description": "Other b."},
- {"process": "Main Process (pid NNN)", "path": "other/a", "kind": 2, "units": 0, "amount": 209715, "description": "Other a."},
- {"process": "Main Process (pid NNN)", "path": "explicit/a/b", "kind": 1, "units": 0, "amount": 52428800, "description": "A b."},
-
- {"process": "Main Process (pid NNN)", "path": "size/a", "kind": 1, "units": 0, "amount": 1024, "description": "non-sentence"},
- {"process": "Main Process (pid NNN)", "path": "rss/a", "kind": 1, "units": 0, "amount": 1024, "description": "non-sentence"},
- {"process": "Main Process (pid NNN)", "path": "pss/a", "kind": 1, "units": 0, "amount": 1024, "description": "non-sentence"},
- {"process": "Main Process (pid NNN)", "path": "swap/a", "kind": 1, "units": 0, "amount": 1024, "description": "non-sentence"},
- {"process": "Main Process (pid NNN)", "path": "compartments/system/a", "kind": 1, "units": 0, "amount": 1024, "description": ""},
- {"process": "Main Process (pid NNN)", "path": "ghost-windows/a", "kind": 1, "units": 0, "amount": 1024, "description": ""},
-
- {"process": "Main Process (pid NNN)", "path": "redundant/should-be-ignored", "kind": 1, "units": 0, "amount": 1024, "description": ""},
-
- {"process": "Heap-unclassified process", "path": "heap-allocated", "kind": 2, "units": 0, "amount": 262144000, "description": "Heap allocated."},
- {"process": "Heap-unclassified process", "path": "explicit/a/b", "kind": 1, "units": 0, "amount": 52428800, "description": "A b."},
- {"process": "Heap-unclassified process", "path": "explicit/heap-unclassified", "kind": 1, "units": 0, "amount": 209715200, "description": "Heap unclassified"},
-
- {"process": "Explicit-only process", "path": "explicit/a/b", "kind": 1, "units": 0, "amount": 100000, "description": "A b."},
-
- {"process": "Other-only process", "path": "a/b", "kind": 1, "units": 0, "amount": 100000, "description": "A b."},
- {"process": "Other-only process", "path": "a/c", "kind": 1, "units": 0, "amount": 100000, "description": "A c."},
- {"process": "Other-only process", "path": "heap-allocated", "kind": 1, "units": 0, "amount": 500000, "description": "D."}
- ]
-}
diff --git a/toolkit/components/aboutmemory/tests/remote.xul b/toolkit/components/aboutmemory/tests/remote.xul
deleted file mode 100644
index 7d69101305..0000000000
--- a/toolkit/components/aboutmemory/tests/remote.xul
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-<window title="Remote browser"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <!-- test results are displayed in the html:body -->
- <p>Remote browser</p>
-
- <browser type="content" src="about:blank" id="remote" remote="true"/>
-</window>
diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory.xul b/toolkit/components/aboutmemory/tests/test_aboutmemory.xul
deleted file mode 100644
index bfeab4c7b4..0000000000
--- a/toolkit/components/aboutmemory/tests/test_aboutmemory.xul
+++ /dev/null
@@ -1,602 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
-<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
-<window title="about:memory"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
- <!-- This file uses fake memory reporters to test the presentation of memory
- reports in about:memory. test_memoryReporters.xul uses the real
- memory reporters to test whether the memory reporters are producing
- sensible results. -->
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml"></body>
-
- <!-- test code goes here -->
- <script type="application/javascript">
- <![CDATA[
- "use strict";
-
- SimpleTest.expectAssertions(27);
-
- const Cc = Components.classes;
- const Ci = Components.interfaces;
- const Cr = Components.results;
- let mgr = Cc["@mozilla.org/memory-reporter-manager;1"].
- getService(Ci.nsIMemoryReporterManager);
-
- // Hide all the real reporters; we'll restore them at the end.
- mgr.blockRegistrationAndHideExistingReporters();
-
- // Setup various fake-but-deterministic reporters.
- const KB = 1024;
- const MB = KB * KB;
- const NONHEAP = Ci.nsIMemoryReporter.KIND_NONHEAP;
- const HEAP = Ci.nsIMemoryReporter.KIND_HEAP;
- const OTHER = Ci.nsIMemoryReporter.KIND_OTHER;
-
- const BYTES = Ci.nsIMemoryReporter.UNITS_BYTES;
- const COUNT = Ci.nsIMemoryReporter.UNITS_COUNT;
- const COUNT_CUMULATIVE = Ci.nsIMemoryReporter.UNITS_COUNT_CUMULATIVE;
- const PERCENTAGE = Ci.nsIMemoryReporter.UNITS_PERCENTAGE;
-
- let fakeReporters = [
- { collectReports: function(aCbObj, aClosure, aAnonymize) {
- function f(aP, aK, aU, aA) {
- aCbObj.callback("", aP, aK, aU, aA, "Desc.", aClosure);
- }
- f("heap-allocated", OTHER, BYTES, 500 * MB);
- f("heap-unallocated", OTHER, BYTES, 100 * MB);
- f("explicit/a", HEAP, BYTES, 222 * MB);
- f("explicit/b/a", HEAP, BYTES, 85 * MB);
- f("explicit/b/b", HEAP, BYTES, 75 * MB);
- f("explicit/b/c/a", HEAP, BYTES, 70 * MB);
- f("explicit/b/c/b", HEAP, BYTES, 2 * MB); // omitted
- f("explicit/g/a", HEAP, BYTES, 6 * MB);
- f("explicit/g/b", HEAP, BYTES, 5 * MB);
- f("explicit/g/other", HEAP, BYTES, 4 * MB);
- // A degenerate tree with the same name as a non-degenerate tree should
- // work ok.
- f("explicit", OTHER, BYTES, 888 * MB);
- f("other1/a/b", OTHER, BYTES, 111 * MB);
- f("other1/c/d", OTHER, BYTES, 22 * MB);
- f("other1/c/e", OTHER, BYTES, 33 * MB);
- f("other4", OTHER, COUNT_CUMULATIVE, 777);
- f("other4", OTHER, COUNT_CUMULATIVE, 111);
- f("other3/a/b/c/d/e", OTHER, PERCENTAGE, 2000);
- f("other3/a/b/c/d/f", OTHER, PERCENTAGE, 10);
- f("other3/a/b/c/d/g", OTHER, PERCENTAGE, 5);
- f("other3/a/b/c/d/g", OTHER, PERCENTAGE, 5);
- // Check that a rounded-up-to-100.00% value is shown as "100.0%" (i.e. one
- // decimal point).
- f("other6/big", OTHER, COUNT, 99999);
- f("other6/small", OTHER, COUNT, 1);
- // Check that a 0 / 0 is handled correctly.
- f("other7/zero", OTHER, BYTES, 0);
- // These compartments ones shouldn't be displayed.
- f("compartments/user/foo", OTHER, COUNT, 1);
- f("compartments/system/foo", OTHER, COUNT, 1);
- }
- },
- { collectReports: function(aCbObj, aClosure, aAnonymize) {
- function f(aP, aK, aU, aA) {
- aCbObj.callback("", aP, aK, aU, aA, "Desc.", aClosure);
- }
- f("explicit/c/d", NONHEAP, BYTES, 13 * MB);
- f("explicit/c/d", NONHEAP, BYTES, 10 * MB); // dup
- f("explicit/c/other", NONHEAP, BYTES, 77 * MB);
- f("explicit/cc", NONHEAP, BYTES, 13 * MB);
- f("explicit/cc", NONHEAP, BYTES, 10 * MB); // dup
- f("explicit/d", NONHEAP, BYTES, 499 * KB); // omitted
- f("explicit/e", NONHEAP, BYTES, 100 * KB); // omitted
- f("explicit/f/g/h/i", HEAP, BYTES, 10 * MB);
- f("explicit/f/g/h/j", HEAP, BYTES, 10 * MB);
- }
- },
- { collectReports: function(aCbObj, aClosure, aAnonymize) {
- function f(aP, aK, aU, aA) {
- aCbObj.callback("", aP, aK, aU, aA, "Desc.", aClosure);
- }
- f("other3", OTHER, COUNT, 777);
- f("other2", OTHER, BYTES, 222 * MB);
- f("perc2", OTHER, PERCENTAGE, 10000);
- f("perc1", OTHER, PERCENTAGE, 4567);
- f("compartments/user/https:\\\\very-long-url.com\\very-long\\oh-so-long\\really-quite-long.html?a=2&b=3&c=4&d=5&e=abcdefghijklmnopqrstuvwxyz&f=123456789123456789123456789", OTHER, COUNT, 1);
- }
- },
- { collectReports: function(aCbObj, aClosure, aAnonymize) {
- function f(aP) {
- aCbObj.callback("", aP, OTHER, COUNT, 1, "Desc.", aClosure);
- }
- f("compartments/user/bar");
- f("compartments/system/bar");
- }
- }
- ];
- for (let i = 0; i < fakeReporters.length; i++) {
- mgr.registerStrongReporterEvenIfBlocked(fakeReporters[i]);
- }
-
- // The main process always comes first when we display about:memory. The
- // remaining processes are sorted by their |resident| values (starting with
- // the largest). Processes without a |resident| memory reporter are saved
- // for the end.
- let fakeReporters2 = [
- { collectReports: function(aCbObj, aClosure, aAnonymize) {
- function f(aP1, aP2, aK, aU, aA) {
- aCbObj.callback(aP1, aP2, aK, aU, aA, "Desc.", aClosure);
- }
- f("2nd", "heap-allocated", OTHER, BYTES,1000* MB);
- f("2nd", "heap-unallocated",OTHER, BYTES,100 * MB);
- f("2nd", "explicit/a/b/c", HEAP, BYTES,497 * MB);
- f("2nd", "explicit/a/b/c", HEAP, BYTES, 1 * MB); // dup: merge
- f("2nd", "explicit/a/b/c", HEAP, BYTES, 1 * MB); // dup: merge
- f("2nd", "explicit/flip\\the\\backslashes",
- HEAP, BYTES,200 * MB);
- f("2nd", "explicit/compartment(compartment-url)",
- HEAP, BYTES,200 * MB);
- f("2nd", "other0", OTHER, BYTES,666 * MB);
- f("2nd", "other1", OTHER, BYTES,111 * MB);
-
- // Check that we can handle "heap-allocated" not being present.
- f("3rd", "explicit/a/b", HEAP, BYTES,333 * MB);
- f("3rd", "explicit/a/c", HEAP, BYTES,444 * MB);
- f("3rd", "other1", OTHER, BYTES, 1 * MB);
- f("3rd", "resident", OTHER, BYTES,100 * MB);
-
- // Invalid values (negative, too-big) should be identified.
- f("4th", "heap-allocated", OTHER, BYTES,100 * MB);
- f("4th", "resident", OTHER, BYTES,200 * MB);
- f("4th", "explicit/js/compartment(http:\\\\too-big.com\\)/stuff",
- HEAP, BYTES,150 * MB);
- f("4th", "explicit/ok", HEAP, BYTES, 5 * MB);
- f("4th", "explicit/neg1", NONHEAP, BYTES, -2 * MB);
- // -111 becomes "-0.00MB" in non-verbose mode, and getting the negative
- // sign in there correctly is non-trivial.
- f("4th", "other1", OTHER, BYTES,-111);
- f("4th", "other2", OTHER, BYTES,-222 * MB);
- f("4th", "other3", OTHER, COUNT, -333);
- f("4th", "other4", OTHER, COUNT_CUMULATIVE, -444);
- f("4th", "other5", OTHER, PERCENTAGE, -555);
- f("4th", "other6", OTHER, PERCENTAGE, 66666);
-
- // If a negative value is within a collapsed sub-tree in non-verbose mode,
- // we should get the warning at the top and the relevant sub-trees should
- // be expanded, even in non-verbose mode.
- f("5th", "heap-allocated", OTHER, BYTES,100 * MB);
- f("5th", "explicit/big", HEAP, BYTES, 99 * MB);
- f("5th", "explicit/a/pos", HEAP, BYTES, 40 * KB);
- f("5th", "explicit/a/neg1", NONHEAP, BYTES,-20 * KB);
- f("5th", "explicit/a/neg2", NONHEAP, BYTES,-10 * KB);
- f("5th", "explicit/b/c/d/e", NONHEAP, BYTES, 20 * KB);
- f("5th", "explicit/b/c/d/f", NONHEAP, BYTES,-60 * KB);
- f("5th", "explicit/b/c/g/h", NONHEAP, BYTES, 10 * KB);
- f("5th", "explicit/b/c/i/j", NONHEAP, BYTES, 5 * KB);
- }
- }
- ];
- for (let i = 0; i < fakeReporters2.length; i++) {
- mgr.registerStrongReporterEvenIfBlocked(fakeReporters2[i]);
- }
- fakeReporters = fakeReporters.concat(fakeReporters2);
- ]]>
- </script>
-
- <iframe id="amFrame" height="300" src="about:memory"></iframe>
- <!-- vary the capitalization to make sure that works -->
- <iframe id="amvFrame" height="300" src="About:Memory"></iframe>
-
- <script type="application/javascript">
- <![CDATA[
- let amExpectedText =
-"\
-Main Process\n\
-Explicit Allocations\n\
-\n\
-623.58 MB (100.0%) -- explicit\n\
-├──232.00 MB (37.20%) -- b\n\
-│ ├───85.00 MB (13.63%) ── a\n\
-│ ├───75.00 MB (12.03%) ── b\n\
-│ └───72.00 MB (11.55%) -- c\n\
-│ ├──70.00 MB (11.23%) ── a\n\
-│ └───2.00 MB (00.32%) ── b\n\
-├──222.00 MB (35.60%) ── a\n\
-├──100.00 MB (16.04%) -- c\n\
-│ ├───77.00 MB (12.35%) ── other\n\
-│ └───23.00 MB (03.69%) ── d [2]\n\
-├───23.00 MB (03.69%) ── cc [2]\n\
-├───20.00 MB (03.21%) -- f/g/h\n\
-│ ├──10.00 MB (01.60%) ── i\n\
-│ └──10.00 MB (01.60%) ── j\n\
-├───15.00 MB (02.41%) ++ g\n\
-├───11.00 MB (01.76%) ── heap-unclassified\n\
-└────0.58 MB (00.09%) ++ (2 tiny)\n\
-\n\
-Other Measurements\n\
-\n\
-5 (100.0%) -- compartments\n\
-├──3 (60.00%) -- user\n\
-│ ├──1 (20.00%) ── bar\n\
-│ ├──1 (20.00%) ── foo\n\
-│ └──1 (20.00%) ── https://very-long-url.com/very-long/oh-so-long/really-quite-long.html?a=2&b=3&c=4&d=5&e=abcdefghijklmnopqrstuvwxyz&f=123456789123456789123456789\n\
-└──2 (40.00%) -- system\n\
- ├──1 (20.00%) ── bar\n\
- └──1 (20.00%) ── foo\n\
-\n\
-166.00 MB (100.0%) -- other1\n\
-├──111.00 MB (66.87%) ── a/b\n\
-└───55.00 MB (33.13%) -- c\n\
- ├──33.00 MB (19.88%) ── e\n\
- └──22.00 MB (13.25%) ── d\n\
-\n\
-20.20% (100.0%) -- other3\n\
-└──20.20% (100.0%) -- a/b/c/d\n\
- ├──20.00% (99.01%) ── e\n\
- └───0.20% (00.99%) ++ (2 tiny)\n\
-\n\
-100,000 (100.0%) -- other6\n\
-├───99,999 (100.0%) ── big\n\
-└────────1 (00.00%) ── small\n\
-\n\
-0.00 MB (100.0%) -- other7\n\
-└──0.00 MB (100.0%) ── zero\n\
-\n\
-888.00 MB ── explicit\n\
-500.00 MB ── heap-allocated\n\
-100.00 MB ── heap-unallocated\n\
-222.00 MB ── other2\n\
- 777 ── other3\n\
- 888 ── other4 [2]\n\
- 45.67% ── perc1\n\
- 100.00% ── perc2\n\
-\n\
-End of Main Process\n\
-4th\n\
-\n\
-WARNING: the following values are negative or unreasonably large.\n\
-\n\
- explicit/js/compartment(http://too-big.com/)/stuff\n\
- explicit/(2 tiny)\n\
- explicit/(2 tiny)/neg1\n\
- explicit/(2 tiny)/heap-unclassified\n\
- other1\n\
- other2\n\
- other3\n\
- other4\n\
- other5 \n\
-\n\
-This indicates a defect in one or more memory reporters. The invalid values are highlighted.\n\
-Explicit Allocations\n\
-\n\
-98.00 MB (100.0%) -- explicit\n\
-├──150.00 MB (153.06%) ── js/compartment(http://too-big.com/)/stuff [?!]\n\
-├───5.00 MB (05.10%) ── ok\n\
-└──-57.00 MB (-58.16%) -- (2 tiny) [?!]\n\
- ├───-2.00 MB (-2.04%) ── neg1 [?!]\n\
- └──-55.00 MB (-56.12%) ── heap-unclassified [?!]\n\
-\n\
-Other Measurements\n\
-\n\
- 100.00 MB ── heap-allocated\n\
- -0.00 MB ── other1 [?!]\n\
--222.00 MB ── other2 [?!]\n\
- -333 ── other3 [?!]\n\
- -444 ── other4 [?!]\n\
- -5.55% ── other5 [?!]\n\
- 666.66% ── other6\n\
- 200.00 MB ── resident\n\
-\n\
-End of 4th\n\
-3rd\n\
-\n\
-WARNING: the 'heap-allocated' memory reporter does not work for this platform and/or configuration. This means that 'heap-unclassified' is not shown and the 'explicit' tree shows less memory than it should.\n\
-Explicit Allocations\n\
-\n\
-777.00 MB (100.0%) -- explicit\n\
-└──777.00 MB (100.0%) -- a\n\
- ├──444.00 MB (57.14%) ── c\n\
- └──333.00 MB (42.86%) ── b\n\
-\n\
-Other Measurements\n\
-\n\
- 1.00 MB ── other1\n\
-100.00 MB ── resident\n\
-\n\
-End of 3rd\n\
-2nd\n\
-Explicit Allocations\n\
-\n\
-1,000.00 MB (100.0%) -- explicit\n\
-├────499.00 MB (49.90%) ── a/b/c [3]\n\
-├────200.00 MB (20.00%) ── compartment(compartment-url)\n\
-├────200.00 MB (20.00%) ── flip/the/backslashes\n\
-└────101.00 MB (10.10%) ── heap-unclassified\n\
-\n\
-Other Measurements\n\
-\n\
-1,000.00 MB ── heap-allocated\n\
- 100.00 MB ── heap-unallocated\n\
- 666.00 MB ── other0\n\
- 111.00 MB ── other1\n\
-\n\
-End of 2nd\n\
-5th\n\
-\n\
-WARNING: the following values are negative or unreasonably large.\n\
-\n\
- explicit/(3 tiny)/a/neg2\n\
- explicit/(3 tiny)/a/neg1\n\
- explicit/(3 tiny)/b/c\n\
- explicit/(3 tiny)/b/c/d\n\
- explicit/(3 tiny)/b/c/d/f \n\
-\n\
-This indicates a defect in one or more memory reporters. The invalid values are highlighted.\n\
-Explicit Allocations\n\
-\n\
-99.95 MB (100.0%) -- explicit\n\
-├──99.00 MB (99.05%) ── big\n\
-└───0.95 MB (00.95%) -- (3 tiny)\n\
- ├──0.96 MB (00.96%) ── heap-unclassified\n\
- ├──0.01 MB (00.01%) -- a\n\
- │ ├──0.04 MB (00.04%) ── pos\n\
- │ ├──-0.01 MB (-0.01%) ── neg2 [?!]\n\
- │ └──-0.02 MB (-0.02%) ── neg1 [?!]\n\
- └──-0.02 MB (-0.02%) -- b/c [?!]\n\
- ├───0.01 MB (00.01%) ── g/h\n\
- ├───0.00 MB (00.00%) ── i/j\n\
- └──-0.04 MB (-0.04%) -- d [?!]\n\
- ├───0.02 MB (00.02%) ── e\n\
- └──-0.06 MB (-0.06%) ── f [?!]\n\
-\n\
-Other Measurements\n\
-\n\
-100.00 MB ── heap-allocated\n\
-\n\
-End of 5th\n\
-";
-
- let amvExpectedText =
-"\
-Main Process\n\
-Explicit Allocations\n\
-\n\
-653,876,224 B (100.0%) -- explicit\n\
-├──243,269,632 B (37.20%) -- b\n\
-│ ├───89,128,960 B (13.63%) ── a\n\
-│ ├───78,643,200 B (12.03%) ── b\n\
-│ └───75,497,472 B (11.55%) -- c\n\
-│ ├──73,400,320 B (11.23%) ── a\n\
-│ └───2,097,152 B (00.32%) ── b\n\
-├──232,783,872 B (35.60%) ── a\n\
-├──104,857,600 B (16.04%) -- c\n\
-│ ├───80,740,352 B (12.35%) ── other\n\
-│ └───24,117,248 B (03.69%) ── d [2]\n\
-├───24,117,248 B (03.69%) ── cc [2]\n\
-├───20,971,520 B (03.21%) -- f/g/h\n\
-│ ├──10,485,760 B (01.60%) ── i\n\
-│ └──10,485,760 B (01.60%) ── j\n\
-├───15,728,640 B (02.41%) -- g\n\
-│ ├───6,291,456 B (00.96%) ── a\n\
-│ ├───5,242,880 B (00.80%) ── b\n\
-│ └───4,194,304 B (00.64%) ── other\n\
-├───11,534,336 B (01.76%) ── heap-unclassified\n\
-├──────510,976 B (00.08%) ── d\n\
-└──────102,400 B (00.02%) ── e\n\
-\n\
-Other Measurements\n\
-\n\
-5 (100.0%) -- compartments\n\
-├──3 (60.00%) -- user\n\
-│ ├──1 (20.00%) ── bar\n\
-│ ├──1 (20.00%) ── foo\n\
-│ └──1 (20.00%) ── https://very-long-url.com/very-long/oh-so-long/really-quite-long.html?a=2&b=3&c=4&d=5&e=abcdefghijklmnopqrstuvwxyz&f=123456789123456789123456789\n\
-└──2 (40.00%) -- system\n\
- ├──1 (20.00%) ── bar\n\
- └──1 (20.00%) ── foo\n\
-\n\
-174,063,616 B (100.0%) -- other1\n\
-├──116,391,936 B (66.87%) ── a/b\n\
-└───57,671,680 B (33.13%) -- c\n\
- ├──34,603,008 B (19.88%) ── e\n\
- └──23,068,672 B (13.25%) ── d\n\
-\n\
-20.20% (100.0%) -- other3\n\
-└──20.20% (100.0%) -- a/b/c/d\n\
- ├──20.00% (99.01%) ── e\n\
- ├───0.10% (00.50%) ── f\n\
- └───0.10% (00.50%) ── g [2]\n\
-\n\
-100,000 (100.0%) -- other6\n\
-├───99,999 (100.0%) ── big\n\
-└────────1 (00.00%) ── small\n\
-\n\
-0 B (100.0%) -- other7\n\
-└──0 B (100.0%) ── zero\n\
-\n\
-931,135,488 B ── explicit\n\
-524,288,000 B ── heap-allocated\n\
-104,857,600 B ── heap-unallocated\n\
-232,783,872 B ── other2\n\
- 777 ── other3\n\
- 888 ── other4 [2]\n\
- 45.67% ── perc1\n\
- 100.00% ── perc2\n\
-\n\
-End of Main Process\n\
-4th\n\
-\n\
-WARNING: the following values are negative or unreasonably large.\n\
-\n\
- explicit/js/compartment(http://too-big.com/)/stuff\n\
- explicit/neg1\n\
- explicit/heap-unclassified\n\
- other1\n\
- other2\n\
- other3\n\
- other4\n\
- other5 \n\
-\n\
-This indicates a defect in one or more memory reporters. The invalid values are highlighted.\n\
-Explicit Allocations\n\
-\n\
-102,760,448 B (100.0%) -- explicit\n\
-├──157,286,400 B (153.06%) ── js/compartment(http://too-big.com/)/stuff [?!]\n\
-├────5,242,880 B (05.10%) ── ok\n\
-├───-2,097,152 B (-2.04%) ── neg1 [?!]\n\
-└──-57,671,680 B (-56.12%) ── heap-unclassified [?!]\n\
-\n\
-Other Measurements\n\
-\n\
- 104,857,600 B ── heap-allocated\n\
- -111 B ── other1 [?!]\n\
--232,783,872 B ── other2 [?!]\n\
- -333 ── other3 [?!]\n\
- -444 ── other4 [?!]\n\
- -5.55% ── other5 [?!]\n\
- 666.66% ── other6\n\
- 209,715,200 B ── resident\n\
-\n\
-End of 4th\n\
-3rd\n\
-\n\
-WARNING: the 'heap-allocated' memory reporter does not work for this platform and/or configuration. This means that 'heap-unclassified' is not shown and the 'explicit' tree shows less memory than it should.\n\
-Explicit Allocations\n\
-\n\
-814,743,552 B (100.0%) -- explicit\n\
-└──814,743,552 B (100.0%) -- a\n\
- ├──465,567,744 B (57.14%) ── c\n\
- └──349,175,808 B (42.86%) ── b\n\
-\n\
-Other Measurements\n\
-\n\
- 1,048,576 B ── other1\n\
-104,857,600 B ── resident\n\
-\n\
-End of 3rd\n\
-2nd\n\
-Explicit Allocations\n\
-\n\
-1,048,576,000 B (100.0%) -- explicit\n\
-├────523,239,424 B (49.90%) ── a/b/c [3]\n\
-├────209,715,200 B (20.00%) ── compartment(compartment-url)\n\
-├────209,715,200 B (20.00%) ── flip/the/backslashes\n\
-└────105,906,176 B (10.10%) ── heap-unclassified\n\
-\n\
-Other Measurements\n\
-\n\
-1,048,576,000 B ── heap-allocated\n\
- 104,857,600 B ── heap-unallocated\n\
- 698,351,616 B ── other0\n\
- 116,391,936 B ── other1\n\
-\n\
-End of 2nd\n\
-5th\n\
-\n\
-WARNING: the following values are negative or unreasonably large.\n\
-\n\
- explicit/a/neg2\n\
- explicit/a/neg1\n\
- explicit/b/c\n\
- explicit/b/c/d\n\
- explicit/b/c/d/f \n\
-\n\
-This indicates a defect in one or more memory reporters. The invalid values are highlighted.\n\
-Explicit Allocations\n\
-\n\
-104,801,280 B (100.0%) -- explicit\n\
-├──103,809,024 B (99.05%) ── big\n\
-├────1,007,616 B (00.96%) ── heap-unclassified\n\
-├───────10,240 B (00.01%) -- a\n\
-│ ├──40,960 B (00.04%) ── pos\n\
-│ ├──-10,240 B (-0.01%) ── neg2 [?!]\n\
-│ └──-20,480 B (-0.02%) ── neg1 [?!]\n\
-└──────-25,600 B (-0.02%) -- b/c [?!]\n\
- ├───10,240 B (00.01%) ── g/h\n\
- ├────5,120 B (00.00%) ── i/j\n\
- └──-40,960 B (-0.04%) -- d [?!]\n\
- ├───20,480 B (00.02%) ── e\n\
- └──-61,440 B (-0.06%) ── f [?!]\n\
-\n\
-Other Measurements\n\
-\n\
-104,857,600 B ── heap-allocated\n\
-\n\
-End of 5th\n\
-";
-
- function finish()
- {
- mgr.unblockRegistrationAndRestoreOriginalReporters();
- SimpleTest.finish();
- }
-
- // Cut+paste the entire page and check that the cut text matches what we
- // expect. This tests the output in general and also that the cutting and
- // pasting works as expected.
- function test(aFrameId, aVerbose, aExpected, aNext) {
- SimpleTest.executeSoon(function() {
- ok(document.title === "about:memory", "document.title is correct");
- let mostRecentActual;
- let frame = document.getElementById(aFrameId);
- frame.focus();
-
- // Set the verbose checkbox value and click the go button.
- let doc = frame.contentWindow.document;
- let measureButton = doc.getElementById("measureButton");
- let verbose = doc.getElementById("verbose");
- verbose.checked = aVerbose;
- measureButton.click();
-
- SimpleTest.waitForClipboard(
- function(aActual) {
- mostRecentActual = aActual;
- let rslt = aActual.trim() === aExpected.trim();
- if (!rslt) {
- // Try copying again.
- synthesizeKey("A", {accelKey: true});
- synthesizeKey("C", {accelKey: true});
- }
-
- return rslt;
- },
- function() {
- synthesizeKey("A", {accelKey: true});
- synthesizeKey("C", {accelKey: true});
- },
- aNext,
- function() {
- ok(false, "pasted text doesn't match for " + aFrameId);
- dump("******EXPECTED******\n");
- dump("<<<" + aExpected + ">>>\n");
- dump("*******ACTUAL*******\n");
- dump("<<<" + mostRecentActual + ">>>\n");
- dump("********************\n");
- finish();
- }
- );
- });
- }
-
- SimpleTest.waitForFocus(function() {
- test(
- "amFrame",
- /* verbose = */ false,
- amExpectedText,
- function() {
- test(
- "amvFrame",
- /* verbose = */ true,
- amvExpectedText,
- function() {
- finish()
- }
- )
- }
- );
- });
- SimpleTest.waitForExplicitFinish();
- ]]>
- </script>
-</window>
diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory2.xul b/toolkit/components/aboutmemory/tests/test_aboutmemory2.xul
deleted file mode 100644
index 8cf197e6d1..0000000000
--- a/toolkit/components/aboutmemory/tests/test_aboutmemory2.xul
+++ /dev/null
@@ -1,423 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
-<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
-<window title="about:memory"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
- <!-- This file tests the collapsing and expanding of sub-trees in
- about:memory. -->
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml"></body>
-
- <!-- test code goes here -->
- <script type="application/javascript">
- <![CDATA[
- "use strict";
-
- const Cc = Components.classes;
- const Ci = Components.interfaces;
- let mgr = Cc["@mozilla.org/memory-reporter-manager;1"].
- getService(Ci.nsIMemoryReporterManager);
-
- // Hide all the real reporters; we'll restore them at the end.
- mgr.blockRegistrationAndHideExistingReporters();
-
- // Setup various fake-but-deterministic reporters.
- const KB = 1024;
- const MB = KB * KB;
- const HEAP = Ci.nsIMemoryReporter.KIND_HEAP;
- const OTHER = Ci.nsIMemoryReporter.KIND_OTHER;
- const BYTES = Ci.nsIMemoryReporter.UNITS_BYTES;
-
- let hiPath = "explicit/h/i";
- let hi2Path = "explicit/h/i2";
- let jkPath = "explicit/j/k";
- let jk2Path = "explicit/j/k2";
-
- let fakeReporters = [
- { collectReports: function(aCbObj, aClosure, aAnonymize) {
- function f(aP, aK, aA) {
- aCbObj.callback("", aP, aK, BYTES, aA, "Desc.", aClosure);
- }
- f("heap-allocated", OTHER, 250 * MB);
- f("explicit/a/b", HEAP, 50 * MB);
- f("explicit/a/c/d", HEAP, 25 * MB);
- f("explicit/a/c/e", HEAP, 15 * MB);
- f("explicit/a/f", HEAP, 30 * MB);
- f("explicit/g", HEAP, 100 * MB);
- f(hiPath, HEAP, 10 * MB);
- f(hi2Path, HEAP, 9 * MB);
- f(jkPath, HEAP, 0.5 * MB);
- f(jk2Path, HEAP, 0.3 * MB);
- f("explicit/a/l/m", HEAP, 0.1 * MB);
- f("explicit/a/l/n", HEAP, 0.1 * MB);
- }
- }
- ];
-
- for (let i = 0; i < fakeReporters.length; i++) {
- mgr.registerStrongReporterEvenIfBlocked(fakeReporters[i]);
- }
-
- ]]>
- </script>
-
- <iframe id="amFrame" height="500" src="about:memory"></iframe>
-
- <script type="application/javascript">
- <![CDATA[
- function finish()
- {
- mgr.unblockRegistrationAndRestoreOriginalReporters();
- SimpleTest.finish();
- }
-
- // Click on the identified element, then cut+paste the entire page and
- // check that the cut text matches what we expect.
- function test(aId, aSwap, aExpected, aNext) {
- let win = document.getElementById("amFrame").contentWindow;
- if (aId) {
- let node = win.document.getElementById(aId);
-
- // Yuk: clicking a button is easy; but for tree entries we need to
- // click on a child of the span identified via |id|.
- if (node.nodeName === "button") {
- if (aSwap) {
- // We swap hipath/hi2Path and jkPath/jk2Path just before updating, to
- // test what happens when significant nodes become insignificant and
- // vice versa.
- hiPath = "explicit/j/k";
- hi2Path = "explicit/j/k2";
- jkPath = "explicit/h/i";
- jk2Path = "explicit/h/i2";
- }
- node.click();
- } else {
- node.childNodes[0].click();
- }
- }
-
- SimpleTest.executeSoon(function() {
- let mostRecentActual;
- document.getElementById("amFrame").focus();
- SimpleTest.waitForClipboard(
- function(aActual) {
- mostRecentActual = aActual;
- let rslt = aActual.trim() === aExpected.trim();
- if (!rslt) {
- // Try copying again.
- synthesizeKey("A", {accelKey: true});
- synthesizeKey("C", {accelKey: true});
- }
-
- return rslt;
- },
- function() {
- synthesizeKey("A", {accelKey: true});
- synthesizeKey("C", {accelKey: true});
- },
- aNext,
- function() {
- ok(false, "pasted text doesn't match");
- dump("******EXPECTED******\n");
- dump(aExpected);
- dump("*******ACTUAL*******\n");
- dump(mostRecentActual);
- dump("********************\n");
- finish();
- }
- );
- });
- }
-
- // Returns a function that chains together one test() call per id.
- function chain(aIds) {
- let x = aIds.shift();
- if (x) {
- return function() { test(x.id, x.swap, x.expected, chain(aIds)); }
- } else {
- return function() { finish(); };
- }
- }
-
- let startExpected =
-"\
-Main Process\n\
-Explicit Allocations\n\
-\n\
-250.00 MB (100.0%) -- explicit\n\
-├──120.20 MB (48.08%) -- a\n\
-│ ├───50.00 MB (20.00%) ── b\n\
-│ ├───40.00 MB (16.00%) -- c\n\
-│ │ ├──25.00 MB (10.00%) ── d\n\
-│ │ └──15.00 MB (06.00%) ── e\n\
-│ ├───30.00 MB (12.00%) ── f\n\
-│ └────0.20 MB (00.08%) ++ l\n\
-├──100.00 MB (40.00%) ── g\n\
-├───19.00 MB (07.60%) -- h\n\
-│ ├──10.00 MB (04.00%) ── i\n\
-│ └───9.00 MB (03.60%) ── i2\n\
-├───10.00 MB (04.00%) ── heap-unclassified\n\
-└────0.80 MB (00.32%) ++ j\n\
-\n\
-Other Measurements\n\
-\n\
-250.00 MB ── heap-allocated\n\
-\n\
-End of Main Process\n\
-";
-
- let acCollapsedExpected =
-"\
-Main Process\n\
-Explicit Allocations\n\
-\n\
-250.00 MB (100.0%) -- explicit\n\
-├──120.20 MB (48.08%) -- a\n\
-│ ├───50.00 MB (20.00%) ── b\n\
-│ ├───40.00 MB (16.00%) ++ c\n\
-│ ├───30.00 MB (12.00%) ── f\n\
-│ └────0.20 MB (00.08%) ++ l\n\
-├──100.00 MB (40.00%) ── g\n\
-├───19.00 MB (07.60%) -- h\n\
-│ ├──10.00 MB (04.00%) ── i\n\
-│ └───9.00 MB (03.60%) ── i2\n\
-├───10.00 MB (04.00%) ── heap-unclassified\n\
-└────0.80 MB (00.32%) ++ j\n\
-\n\
-Other Measurements\n\
-\n\
-250.00 MB ── heap-allocated\n\
-\n\
-End of Main Process\n\
-";
-
- let alExpandedExpected =
-"\
-Main Process\n\
-Explicit Allocations\n\
-\n\
-250.00 MB (100.0%) -- explicit\n\
-├──120.20 MB (48.08%) -- a\n\
-│ ├───50.00 MB (20.00%) ── b\n\
-│ ├───40.00 MB (16.00%) ++ c\n\
-│ ├───30.00 MB (12.00%) ── f\n\
-│ └────0.20 MB (00.08%) -- l\n\
-│ ├──0.10 MB (00.04%) ── m\n\
-│ └──0.10 MB (00.04%) ── n\n\
-├──100.00 MB (40.00%) ── g\n\
-├───19.00 MB (07.60%) -- h\n\
-│ ├──10.00 MB (04.00%) ── i\n\
-│ └───9.00 MB (03.60%) ── i2\n\
-├───10.00 MB (04.00%) ── heap-unclassified\n\
-└────0.80 MB (00.32%) ++ j\n\
-\n\
-Other Measurements\n\
-\n\
-250.00 MB ── heap-allocated\n\
-\n\
-End of Main Process\n\
-";
-
- let aCollapsedExpected =
-"\
-Main Process\n\
-Explicit Allocations\n\
-\n\
-250.00 MB (100.0%) -- explicit\n\
-├──120.20 MB (48.08%) ++ a\n\
-├──100.00 MB (40.00%) ── g\n\
-├───19.00 MB (07.60%) -- h\n\
-│ ├──10.00 MB (04.00%) ── i\n\
-│ └───9.00 MB (03.60%) ── i2\n\
-├───10.00 MB (04.00%) ── heap-unclassified\n\
-└────0.80 MB (00.32%) ++ j\n\
-\n\
-Other Measurements\n\
-\n\
-250.00 MB ── heap-allocated\n\
-\n\
-End of Main Process\n\
-";
-
- let hCollapsedExpected =
-"\
-Main Process\n\
-Explicit Allocations\n\
-\n\
-250.00 MB (100.0%) -- explicit\n\
-├──120.20 MB (48.08%) ++ a\n\
-├──100.00 MB (40.00%) ── g\n\
-├───19.00 MB (07.60%) ++ h\n\
-├───10.00 MB (04.00%) ── heap-unclassified\n\
-└────0.80 MB (00.32%) ++ j\n\
-\n\
-Other Measurements\n\
-\n\
-250.00 MB ── heap-allocated\n\
-\n\
-End of Main Process\n\
-";
-
- let jExpandedExpected =
-"\
-Main Process\n\
-Explicit Allocations\n\
-\n\
-250.00 MB (100.0%) -- explicit\n\
-├──120.20 MB (48.08%) ++ a\n\
-├──100.00 MB (40.00%) ── g\n\
-├───19.00 MB (07.60%) ++ h\n\
-├───10.00 MB (04.00%) ── heap-unclassified\n\
-└────0.80 MB (00.32%) -- j\n\
- ├──0.50 MB (00.20%) ── k\n\
- └──0.30 MB (00.12%) ── k2\n\
-\n\
-Other Measurements\n\
-\n\
-250.00 MB ── heap-allocated\n\
-\n\
-End of Main Process\n\
-";
-
- // The important thing here is that two values have been swapped.
- // explicit/h/i should remain collapsed, and explicit/j/k should remain
- // expanded. See bug 724863.
- let updatedExpected =
-"\
-Main Process\n\
-Explicit Allocations\n\
-\n\
-250.00 MB (100.0%) -- explicit\n\
-├──120.20 MB (48.08%) ++ a\n\
-├──100.00 MB (40.00%) ── g\n\
-├───19.00 MB (07.60%) -- j\n\
-│ ├──10.00 MB (04.00%) ── k\n\
-│ └───9.00 MB (03.60%) ── k2\n\
-├───10.00 MB (04.00%) ── heap-unclassified\n\
-└────0.80 MB (00.32%) ++ h\n\
-\n\
-Other Measurements\n\
-\n\
-250.00 MB ── heap-allocated\n\
-\n\
-End of Main Process\n\
-";
-
- let aExpandedExpected =
-"\
-Main Process\n\
-Explicit Allocations\n\
-\n\
-250.00 MB (100.0%) -- explicit\n\
-├──120.20 MB (48.08%) -- a\n\
-│ ├───50.00 MB (20.00%) ── b\n\
-│ ├───40.00 MB (16.00%) ++ c\n\
-│ ├───30.00 MB (12.00%) ── f\n\
-│ └────0.20 MB (00.08%) -- l\n\
-│ ├──0.10 MB (00.04%) ── m\n\
-│ └──0.10 MB (00.04%) ── n\n\
-├──100.00 MB (40.00%) ── g\n\
-├───19.00 MB (07.60%) -- j\n\
-│ ├──10.00 MB (04.00%) ── k\n\
-│ └───9.00 MB (03.60%) ── k2\n\
-├───10.00 MB (04.00%) ── heap-unclassified\n\
-└────0.80 MB (00.32%) ++ h\n\
-\n\
-Other Measurements\n\
-\n\
-250.00 MB ── heap-allocated\n\
-\n\
-End of Main Process\n\
-";
-
- let acExpandedExpected =
-"\
-Main Process\n\
-Explicit Allocations\n\
-\n\
-250.00 MB (100.0%) -- explicit\n\
-├──120.20 MB (48.08%) -- a\n\
-│ ├───50.00 MB (20.00%) ── b\n\
-│ ├───40.00 MB (16.00%) -- c\n\
-│ │ ├──25.00 MB (10.00%) ── d\n\
-│ │ └──15.00 MB (06.00%) ── e\n\
-│ ├───30.00 MB (12.00%) ── f\n\
-│ └────0.20 MB (00.08%) -- l\n\
-│ ├──0.10 MB (00.04%) ── m\n\
-│ └──0.10 MB (00.04%) ── n\n\
-├──100.00 MB (40.00%) ── g\n\
-├───19.00 MB (07.60%) -- j\n\
-│ ├──10.00 MB (04.00%) ── k\n\
-│ └───9.00 MB (03.60%) ── k2\n\
-├───10.00 MB (04.00%) ── heap-unclassified\n\
-└────0.80 MB (00.32%) ++ h\n\
-\n\
-Other Measurements\n\
-\n\
-250.00 MB ── heap-allocated\n\
-\n\
-End of Main Process\n\
-";
-
- let alCollapsedExpected =
-"\
-Main Process\n\
-Explicit Allocations\n\
-\n\
-250.00 MB (100.0%) -- explicit\n\
-├──120.20 MB (48.08%) -- a\n\
-│ ├───50.00 MB (20.00%) ── b\n\
-│ ├───40.00 MB (16.00%) -- c\n\
-│ │ ├──25.00 MB (10.00%) ── d\n\
-│ │ └──15.00 MB (06.00%) ── e\n\
-│ ├───30.00 MB (12.00%) ── f\n\
-│ └────0.20 MB (00.08%) ++ l\n\
-├──100.00 MB (40.00%) ── g\n\
-├───19.00 MB (07.60%) -- j\n\
-│ ├──10.00 MB (04.00%) ── k\n\
-│ └───9.00 MB (03.60%) ── k2\n\
-├───10.00 MB (04.00%) ── heap-unclassified\n\
-└────0.80 MB (00.32%) ++ h\n\
-\n\
-Other Measurements\n\
-\n\
-250.00 MB ── heap-allocated\n\
-\n\
-End of Main Process\n\
-";
-
- // Test the following cases:
- // - explicit/a/c is significant, we collapse it, it's unchanged upon
- // update, we re-expand it
- // - explicit/a/l is insignificant, we expand it, it's unchanged upon
- // update, we re-collapse it
- // - explicit/a is significant, we collapse it (which hides its
- // sub-trees), it's unchanged upon update, we re-expand it
- // - explicit/h is significant, we collapse it, it becomes insignificant
- // upon update (and should remain collapsed)
- // - explicit/j is insignificant, we expand it, it becomes significant
- // upon update (and should remain expanded)
- //
- let idsToClick = [
- { id: "measureButton", swap: 0, expected: startExpected },
- { id: "Main Process:explicit/a/c", swap: 0, expected: acCollapsedExpected },
- { id: "Main Process:explicit/a/l", swap: 0, expected: alExpandedExpected },
- { id: "Main Process:explicit/a", swap: 0, expected: aCollapsedExpected },
- { id: "Main Process:explicit/h", swap: 0, expected: hCollapsedExpected },
- { id: "Main Process:explicit/j", swap: 0, expected: jExpandedExpected },
- { id: "measureButton", swap: 1, expected: updatedExpected },
- { id: "Main Process:explicit/a", swap: 0, expected: aExpandedExpected },
- { id: "Main Process:explicit/a/c", swap: 0, expected: acExpandedExpected },
- { id: "Main Process:explicit/a/l", swap: 0, expected: alCollapsedExpected }
- ];
-
- SimpleTest.waitForFocus(chain(idsToClick));
-
- SimpleTest.waitForExplicitFinish();
- ]]>
- </script>
-</window>
diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory3.xul b/toolkit/components/aboutmemory/tests/test_aboutmemory3.xul
deleted file mode 100644
index c712070cc2..0000000000
--- a/toolkit/components/aboutmemory/tests/test_aboutmemory3.xul
+++ /dev/null
@@ -1,515 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
-<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
-<window title="about:memory"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
- <!-- This file tests the saving and loading of memory reports to/from file in
- about:memory. -->
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml"></body>
-
- <!-- test code goes here -->
- <script type="application/javascript">
- <![CDATA[
- "use strict";
-
- const Cc = Components.classes;
- const Ci = Components.interfaces;
- let mgr = Cc["@mozilla.org/memory-reporter-manager;1"].
- getService(Ci.nsIMemoryReporterManager);
-
- // Hide all the real reporters; we'll restore them at the end.
- mgr.blockRegistrationAndHideExistingReporters();
-
- // Setup a minimal number of fake reporters.
- const KB = 1024;
- const MB = KB * KB;
- const HEAP = Ci.nsIMemoryReporter.KIND_HEAP;
- const OTHER = Ci.nsIMemoryReporter.KIND_OTHER;
- const BYTES = Ci.nsIMemoryReporter.UNITS_BYTES;
-
- let fakeReporters = [
- { collectReports: function(aCbObj, aClosure, aAnonymize) {
- function f(aP, aK, aA, aD) {
- aCbObj.callback("", aP, aK, BYTES, aA, aD, aClosure);
- }
- f("heap-allocated", OTHER, 250 * MB, "Heap allocated.");
- f("explicit/a/b", HEAP, 50 * MB, "A b.");
- f("other/a", OTHER, 0.2 * MB, "Other a.");
- f("other/b", OTHER, 0.1 * MB, "Other b.");
- }
- }
- ];
-
- for (let i = 0; i < fakeReporters.length; i++) {
- mgr.registerStrongReporterEvenIfBlocked(fakeReporters[i]);
- }
-
- ]]>
- </script>
-
- <iframe id="amFrame" height="400" src="about:memory"></iframe>
-
- <script type="application/javascript">
- <![CDATA[
- function finish()
- {
- mgr.unblockRegistrationAndRestoreOriginalReporters();
- SimpleTest.finish();
- }
-
- // Load the given file into the frame, then copy+paste the entire frame and
- // check that the cut text matches what we expect.
- function test(aFilename, aFilename2, aExpected, aDumpFirst, aVerbose, aNext) {
- let frame = document.getElementById("amFrame");
- frame.focus();
-
- let doc = frame.contentWindow.document;
- let verbosity = doc.getElementById("verbose");
- verbosity.checked = aVerbose;
-
- function getFilePath(aFilename) {
- let file = Cc["@mozilla.org/file/directory_service;1"]
- .getService(Components.interfaces.nsIProperties)
- .get("CurWorkD", Components.interfaces.nsIFile);
- file.append("chrome");
- file.append("toolkit");
- file.append("components");
- file.append("aboutmemory");
- file.append("tests");
- file.append(aFilename);
- return file.path;
- }
-
- let filePath = getFilePath(aFilename);
-
- let e = document.createEvent('Event');
- e.initEvent('change', true, true);
-
- function check() {
- // Initialize the clipboard contents.
- SpecialPowers.clipboardCopyString("initial clipboard value");
-
- let numFailures = 0, maxFailures = 30;
-
- // Because the file load is async, we don't know when it will finish and
- // the output will show up. So we poll.
- function copyPasteAndCheck() {
- // Copy and paste frame contents, and filter out non-deterministic
- // differences.
- synthesizeKey("A", {accelKey: true});
- synthesizeKey("C", {accelKey: true});
- let actual = SpecialPowers.getClipboardData("text/unicode");
- actual = actual.replace(/\(pid \d+\)/g, "(pid NNN)");
-
- if (actual.trim() === aExpected.trim()) {
- SimpleTest.ok(true, "Clipboard has the expected contents");
- aNext();
- } else {
- numFailures++;
- if (numFailures === maxFailures) {
- ok(false, "pasted text doesn't match");
- dump("******EXPECTED******\n");
- dump(aExpected);
- dump("*******ACTUAL*******\n");
- dump(actual);
- dump("********************\n");
- finish();
- } else {
- setTimeout(copyPasteAndCheck, 100);
- }
- }
- }
- copyPasteAndCheck();
- }
-
- if (!aFilename2) {
- function loadAndCheck() {
- let fileInput1 =
- frame.contentWindow.document.getElementById("fileInput1");
- fileInput1.value = filePath; // this works because it's a chrome test
-
- fileInput1.dispatchEvent(e);
- check();
- }
-
- if (aDumpFirst) {
- let dumper = Cc["@mozilla.org/memory-info-dumper;1"].
- getService(Ci.nsIMemoryInfoDumper);
- dumper.dumpMemoryReportsToNamedFile(filePath, loadAndCheck, null,
- /* anonymize = */ false);
- } else {
- loadAndCheck();
- }
-
- } else {
- let fileInput2 =
- frame.contentWindow.document.getElementById("fileInput2");
- fileInput2.value = filePath; // this works because it's a chrome test
-
- // Hack alert: fileInput2's onchange handler calls fileInput2.click().
- // But we don't want that to happen, because we want to bypass the file
- // picker for the test. So we set |e.skipClick|, which causes
- // fileInput2.click() to be skipped, and dispatch the second change event
- // directly ourselves.
-
- e.skipClick = true;
- fileInput2.dispatchEvent(e);
-
- let filePath2 = getFilePath(aFilename2);
- fileInput2.value = filePath2; // this works because it's a chrome test
-
- let e2 = document.createEvent('Event');
- e2.initEvent('change', true, true);
- fileInput2.dispatchEvent(e);
-
- check();
- }
- }
-
- // Returns a function that chains together multiple test() calls.
- function chain(aPieces) {
- let x = aPieces.shift();
- if (x) {
- return function() { test(x.filename, x.filename2, x.expected, x.dumpFirst, x.verbose, chain(aPieces)); }
- } else {
- return function() { finish(); };
- }
- }
-
- let expectedGood =
-"\
-Explicit-only process\n\
-\n\
-WARNING: the 'heap-allocated' memory reporter does not work for this platform and/or configuration. This means that 'heap-unclassified' is not shown and the 'explicit' tree shows less memory than it should.\n\
-Explicit Allocations\n\
-\n\
-100,000 B (100.0%) -- explicit\n\
-└──100,000 B (100.0%) ── a/b\n\
-\n\
-Other Measurements\n\
-\n\
-End of Explicit-only process\n\
-Heap-unclassified process\n\
-Explicit Allocations\n\
-\n\
-262,144,000 B (100.0%) -- explicit\n\
-├──209,715,200 B (80.00%) ── heap-unclassified\n\
-└───52,428,800 B (20.00%) ── a/b\n\
-\n\
-Other Measurements\n\
-\n\
-262,144,000 B ── heap-allocated\n\
-\n\
-End of Heap-unclassified process\n\
-Main Process (pid NNN)\n\
-Explicit Allocations\n\
-\n\
-262,144,000 B (100.0%) -- explicit\n\
-├──209,715,200 B (80.00%) ── heap-unclassified\n\
-└───52,428,800 B (20.00%) ── a/b\n\
-\n\
-Other Measurements\n\
-\n\
-1,024 B (100.0%) -- compartments\n\
-└──1,024 B (100.0%) ── system/a\n\
-\n\
-1,024 B (100.0%) -- ghost-windows\n\
-└──1,024 B (100.0%) ── a\n\
-\n\
-314,572 B (100.0%) -- other\n\
-├──209,715 B (66.67%) ── a\n\
-└──104,857 B (33.33%) ── b\n\
-\n\
-1,024 B (100.0%) -- pss\n\
-└──1,024 B (100.0%) ── a\n\
-\n\
-1,024 B (100.0%) -- rss\n\
-└──1,024 B (100.0%) ── a\n\
-\n\
-1,024 B (100.0%) -- size\n\
-└──1,024 B (100.0%) ── a\n\
-\n\
-1,024 B (100.0%) -- swap\n\
-└──1,024 B (100.0%) ── a\n\
-\n\
-262,144,000 B ── heap-allocated\n\
-\n\
-End of Main Process (pid NNN)\n\
-Other-only process\n\
-Other Measurements\n\
-\n\
-200,000 B (100.0%) -- a\n\
-├──100,000 B (50.00%) ── b\n\
-└──100,000 B (50.00%) ── c\n\
-\n\
-500,000 B ── heap-allocated\n\
-\n\
-End of Other-only process\n\
-";
-
- let expectedGood2 =
-"\
-Main Process (pid NNN)\n\
-Explicit Allocations\n\
-\n\
-262,144,000 B (100.0%) -- explicit\n\
-├──209,715,200 B (80.00%) ── heap-unclassified\n\
-└───52,428,800 B (20.00%) ── a/b\n\
-\n\
-Other Measurements\n\
-\n\
-314,572 B (100.0%) -- other\n\
-├──209,715 B (66.67%) ── a\n\
-└──104,857 B (33.33%) ── b\n\
-\n\
-262,144,000 B ── heap-allocated\n\
-\n\
-End of Main Process (pid NNN)\n\
-";
-
- // This is the output for a malformed data file.
- let expectedBad =
-"\
-Error: Invalid memory report(s): missing 'hasMozMallocUsableSize' property\
-";
-
- // This is the output for a non-verbose diff.
- let expectedDiffNonVerbose =
-"\
-P\n\
-\n\
-WARNING: the 'heap-allocated' memory reporter does not work for this platform and/or configuration. This means that 'heap-unclassified' is not shown and the 'explicit' tree shows less memory than it should.\n\
-Explicit Allocations\n\
-\n\
--0.01 MB (100.0%) -- explicit\n\
-├──-0.01 MB (99.95%) ── storage/prefixset/goog-phish-shavar\n\
-└──-0.00 MB (00.05%) ++ (2 tiny)\n\
-\n\
-Other Measurements\n\
-\n\
-0.96 MB (100.0%) -- a\n\
-├──0.95 MB (99.80%) ── b\n\
-├──0.00 MB (00.10%) -- c\n\
-│ ├──-0.95 MB (-99.70%) ── e\n\
-│ ├──0.95 MB (99.60%) ── d\n\
-│ └──0.00 MB (00.20%) ++ (2 tiny)\n\
-└──0.00 MB (00.10%) ── h\n\
-\n\
- 0.00 MB ── canvas-2d-pixel-bytes [2] [+]\n\
--0.00 MB ── foobar [-]\n\
-\n\
-End of P\n\
-P2 (pid NNN)\n\
-\n\
-WARNING: the 'heap-allocated' memory reporter does not work for this platform and/or configuration. This means that 'heap-unclassified' is not shown and the 'explicit' tree shows less memory than it should.\n\
-Explicit Allocations\n\
-\n\
-0.00 MB (100.0%) -- explicit\n\
-└──0.00 MB (100.0%) ── window-objects/top(bar.com, id=NNN)/...\n\
-\n\
-Other Measurements\n\
-\n\
-0.00 MB (100.0%) -- p3\n\
-└──0.00 MB (100.0%) ── zone(0xNNN)/p3\n\
-\n\
-0.00 MB (100.0%) -- p4\n\
-└──0.00 MB (100.0%) ── js-zone(0xNNN)/p4\n\
-\n\
-0.00 MB (100.0%) -- p5\n\
-└──0.00 MB (100.0%) ── worker(foo.com, 0xNNN)/p5\n\
-\n\
-0.00 MB (100.0%) -- p6\n\
-└──0.00 MB (100.0%) ── z-moz-nullprincipal:{NNNNNNNN-NNNN-NNNN-NNNN-NNNNNNNNNNNN}/p6\n\
-\n\
-0.00 MB (100.0%) -- p7\n\
-└──0.00 MB (100.0%) ── js-main-runtime-compartments/system/jar:file:///.../omni.ja!/p7\n\
-\n\
-0.00 MB ── p1 (pid NNN)\n\
-0.00 MB ── p2 (blah, pid=NNN)\n\
-\n\
-End of P2 (pid NNN)\n\
-P3\n\
-Other Measurements\n\
-\n\
--0.00 MB ── p3 [-]\n\
-\n\
-End of P3\n\
-P4\n\
-Other Measurements\n\
-\n\
-0.00 MB ── p4 [+]\n\
-\n\
-End of P4\n\
-P7\n\
-Other Measurements\n\
-\n\
-0.00 MB (100.0%) -- p7\n\
-├──0.00 MB (57.14%) ── c [+]\n\
-└──0.00 MB (42.86%) ── b [+]\n\
-\n\
--0.00 MB ── p7 [-]\n\
-\n\
-End of P7\n\
-P8\n\
-Other Measurements\n\
-\n\
--0.00 MB (100.0%) -- p8\n\
-└──-0.00 MB (100.0%) -- a\n\
- ├──-0.00 MB (50.00%) -- b\n\
- │ ├──-0.00 MB (31.82%) -- c\n\
- │ │ ├──-0.00 MB (18.18%) ── e [-]\n\
- │ │ └──-0.00 MB (13.64%) ── d [-]\n\
- │ ├──-0.00 MB (22.73%) ── f [-]\n\
- │ └───0.00 MB (-4.55%) ── (fake child) [!]\n\
- └──-0.00 MB (50.00%) -- g\n\
- ├──-0.00 MB (31.82%) ── i [-]\n\
- ├──-0.00 MB (27.27%) ── h [-]\n\
- └───0.00 MB (-9.09%) ── (fake child) [!]\n\
-\n\
-End of P8\n\
-";
-
- // This is the output for a verbose diff.
- let expectedDiffVerbose =
-"\
-P\n\
-\n\
-WARNING: the 'heap-allocated' memory reporter does not work for this platform and/or configuration. This means that 'heap-unclassified' is not shown and the 'explicit' tree shows less memory than it should.\n\
-Explicit Allocations\n\
-\n\
--10,005 B (100.0%) -- explicit\n\
-├──-10,000 B (99.95%) ── storage/prefixset/goog-phish-shavar\n\
-├───────-6 B (00.06%) ── spell-check [2]\n\
-└────────1 B (-0.01%) ── xpcom/category-manager\n\
-\n\
-Other Measurements\n\
-\n\
-1,002,000 B (100.0%) -- a\n\
-├──1,000,000 B (99.80%) ── b\n\
-├──────1,000 B (00.10%) -- c\n\
-│ ├──-999,000 B (-99.70%) ── e\n\
-│ ├──998,000 B (99.60%) ── d\n\
-│ ├──1,000 B (00.10%) ── f\n\
-│ └──1,000 B (00.10%) ── g\n\
-└──────1,000 B (00.10%) ── h\n\
-\n\
-3,000 B ── canvas-2d-pixel-bytes [2] [+]\n\
- -100 B ── foobar [-]\n\
-\n\
-End of P\n\
-P2 (pid NNN)\n\
-\n\
-WARNING: the 'heap-allocated' memory reporter does not work for this platform and/or configuration. This means that 'heap-unclassified' is not shown and the 'explicit' tree shows less memory than it should.\n\
-Explicit Allocations\n\
-\n\
-11 B (100.0%) -- explicit\n\
-└──11 B (100.0%) ── window-objects/top(bar.com, id=NNN)/...\n\
-\n\
-Other Measurements\n\
-\n\
-11 B (100.0%) -- p3\n\
-└──11 B (100.0%) ── zone(0xNNN)/p3\n\
-\n\
-11 B (100.0%) -- p4\n\
-└──11 B (100.0%) ── js-zone(0xNNN)/p4\n\
-\n\
-11 B (100.0%) -- p5\n\
-└──11 B (100.0%) ── worker(foo.com, 0xNNN)/p5\n\
-\n\
-11 B (100.0%) -- p6\n\
-└──11 B (100.0%) ── z-moz-nullprincipal:{NNNNNNNN-NNNN-NNNN-NNNN-NNNNNNNNNNNN}/p6\n\
-\n\
-11 B (100.0%) -- p7\n\
-└──11 B (100.0%) ── js-main-runtime-compartments/system/jar:file:///.../omni.ja!/p7\n\
-\n\
-11 B ── p1 (pid NNN)\n\
-11 B ── p2 (blah, pid=NNN)\n\
-\n\
-End of P2 (pid NNN)\n\
-P3\n\
-Other Measurements\n\
-\n\
--55 B ── p3 [-]\n\
-\n\
-End of P3\n\
-P4\n\
-Other Measurements\n\
-\n\
-66 B ── p4 [+]\n\
-\n\
-End of P4\n\
-P7\n\
-Other Measurements\n\
-\n\
-7 B (100.0%) -- p7\n\
-├──4 B (57.14%) ── c [+]\n\
-└──3 B (42.86%) ── b [+]\n\
-\n\
--5 B ── p7 [-]\n\
-\n\
-End of P7\n\
-P8\n\
-Other Measurements\n\
-\n\
--22 B (100.0%) -- p8\n\
-└──-22 B (100.0%) -- a\n\
- ├──-11 B (50.00%) -- b\n\
- │ ├───-7 B (31.82%) -- c\n\
- │ │ ├──-4 B (18.18%) ── e [-]\n\
- │ │ └──-3 B (13.64%) ── d [-]\n\
- │ ├───-5 B (22.73%) ── f [-]\n\
- │ └────1 B (-4.55%) ── (fake child) [!]\n\
- └──-11 B (50.00%) -- g\n\
- ├───-7 B (31.82%) ── i [-]\n\
- ├───-6 B (27.27%) ── h [-]\n\
- └────2 B (-9.09%) ── (fake child) [!]\n\
-\n\
-End of P8\n\
-";
-
- // This is the output for the crash reports diff.
- let expectedDiff2 =
-"\
-Main Process (pid NNN)\n\
-Other Measurements\n\
-\n\
-1 B ── heap-allocated\n\
-\n\
-End of Main Process (pid NNN)\n\
-";
-
- let frames = [
- // This loads a pre-existing memory reports file that is valid.
- { filename: "memory-reports-good.json", expected: expectedGood, dumpFirst: false, verbose: true },
-
- // This loads a pre-existing crash dump file that is valid.
- { filename: "crash-dump-good.json", expected: expectedGood2, dumpFirst: false, verbose: true },
-
- // This dumps to a file and then reads it back in. (The result is the same
- // as the previous test.)
- { filename: "memory-reports-dumped.json.gz", expected: expectedGood2, dumpFirst: true, verbose: true },
-
- // This loads a pre-existing file that is invalid.
- { filename: "memory-reports-bad.json", expected: expectedBad, dumpFirst: false, verbose: true },
-
- // This diffs two pre-existing memory reports files.
- { filename: "memory-reports-diff1.json", filename2: "memory-reports-diff2.json", expected: expectedDiffNonVerbose, dumpFirst: false, verbose: false },
-
- // Ditto.
- { filename: "memory-reports-diff1.json", filename2: "memory-reports-diff2.json", expected: expectedDiffVerbose, dumpFirst: false, verbose: true },
-
- // This diffs two pre-existing crash report files.
- { filename: "crash-dump-diff1.json", filename2: "crash-dump-diff2.json", expected: expectedDiff2, dumpFirst: false, verbose: true }
- ];
-
- SimpleTest.waitForFocus(chain(frames));
-
- SimpleTest.waitForExplicitFinish();
- ]]>
- </script>
-</window>
diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory4.xul b/toolkit/components/aboutmemory/tests/test_aboutmemory4.xul
deleted file mode 100644
index f2c752ac57..0000000000
--- a/toolkit/components/aboutmemory/tests/test_aboutmemory4.xul
+++ /dev/null
@@ -1,179 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
-<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
-<window title="about:memory"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
- <!-- This file tests the loading of memory reports from file when specified
- in about:memory's URL (via the "file=" suffix). -->
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml"></body>
-
- <!-- test code goes here -->
- <script type="application/javascript">
- <![CDATA[
- "use strict";
-
- function makePathname(aFilename) {
- let file = Components.classes["@mozilla.org/file/directory_service;1"]
- .getService(Components.interfaces.nsIProperties)
- .get("CurWorkD", Components.interfaces.nsIFile);
- file.append("chrome");
- file.append("toolkit");
- file.append("components");
- file.append("aboutmemory");
- file.append("tests");
- file.append(aFilename);
- return file.path;
- }
-
- // Load the given file into the frame, then copy+paste the entire frame and
- // check that the cut text matches what we expect.
- function test(aFilename, aExpected, aNext) {
- let frame = document.createElementNS("http://www.w3.org/1999/xhtml", "iframe")
- frame.height = 300;
- frame.src = "about:memory?file=" + makePathname(aFilename);
- document.documentElement.appendChild(frame);
- frame.focus();
-
- // Initialize the clipboard contents.
- SpecialPowers.clipboardCopyString("initial clipboard value");
-
- let numFailures = 0, maxFailures = 30;
-
- // Because the file load is async, we don't know when it will finish and
- // the output will show up. So we poll.
- function copyPasteAndCheck() {
- // Copy and paste frame contents, and filter out non-deterministic
- // differences.
- synthesizeKey("A", {accelKey: true});
- synthesizeKey("C", {accelKey: true});
- let actual = SpecialPowers.getClipboardData("text/unicode");
- actual = actual.replace(/\(pid \d+\)/, "(pid NNN)");
-
- if (actual.trim() === aExpected.trim()) {
- SimpleTest.ok(true, "Clipboard has the expected contents");
- aNext();
- } else {
- numFailures++;
- if (numFailures === maxFailures) {
- ok(false, "pasted text doesn't match");
- dump("******EXPECTED******\n");
- dump(aExpected);
- dump("*******ACTUAL*******\n");
- dump(actual);
- dump("********************\n");
- SimpleTest.finish();
- } else {
- setTimeout(copyPasteAndCheck, 100);
- }
- }
- }
- copyPasteAndCheck();
- }
-
- // Returns a function that chains together multiple test() calls.
- function chain(aFrameIds) {
- let x = aFrameIds.shift();
- if (x) {
- return function() { test(x.filename, x.expected, chain(aFrameIds)); }
- } else {
- return function() { SimpleTest.finish(); };
- }
- }
-
- // This is pretty simple output, but that's ok; this file is about testing
- // the loading of data from file. If we got this far, we're doing fine.
- let expectedGood =
-"\
-Explicit-only process\n\
-\n\
-WARNING: the 'heap-allocated' memory reporter does not work for this platform and/or configuration. This means that 'heap-unclassified' is not shown and the 'explicit' tree shows less memory than it should.\n\
-Explicit Allocations\n\
-\n\
-0.10 MB (100.0%) -- explicit\n\
-└──0.10 MB (100.0%) ── a/b\n\
-\n\
-Other Measurements\n\
-\n\
-End of Explicit-only process\n\
-Heap-unclassified process\n\
-Explicit Allocations\n\
-\n\
-250.00 MB (100.0%) -- explicit\n\
-├──200.00 MB (80.00%) ── heap-unclassified\n\
-└───50.00 MB (20.00%) ── a/b\n\
-\n\
-Other Measurements\n\
-\n\
-250.00 MB ── heap-allocated\n\
-\n\
-End of Heap-unclassified process\n\
-Main Process (pid NNN)\n\
-Explicit Allocations\n\
-\n\
-250.00 MB (100.0%) -- explicit\n\
-├──200.00 MB (80.00%) ── heap-unclassified\n\
-└───50.00 MB (20.00%) ── a/b\n\
-\n\
-Other Measurements\n\
-\n\
-0.00 MB (100.0%) -- compartments\n\
-└──0.00 MB (100.0%) ── system/a\n\
-\n\
-0.00 MB (100.0%) -- ghost-windows\n\
-└──0.00 MB (100.0%) ── a\n\
-\n\
-0.30 MB (100.0%) -- other\n\
-├──0.20 MB (66.67%) ── a\n\
-└──0.10 MB (33.33%) ── b\n\
-\n\
-0.00 MB (100.0%) -- pss\n\
-└──0.00 MB (100.0%) ── a\n\
-\n\
-0.00 MB (100.0%) -- rss\n\
-└──0.00 MB (100.0%) ── a\n\
-\n\
-0.00 MB (100.0%) -- size\n\
-└──0.00 MB (100.0%) ── a\n\
-\n\
-0.00 MB (100.0%) -- swap\n\
-└──0.00 MB (100.0%) ── a\n\
-\n\
-250.00 MB ── heap-allocated\n\
-\n\
-End of Main Process (pid NNN)\n\
-Other-only process\n\
-Other Measurements\n\
-\n\
-0.19 MB (100.0%) -- a\n\
-├──0.10 MB (50.00%) ── b\n\
-└──0.10 MB (50.00%) ── c\n\
-\n\
-0.48 MB ── heap-allocated\n\
-\n\
-End of Other-only process\n\
-";
-
- // This is the output for a malformed data file.
- let expectedBad =
-"\
-Error: Invalid memory report(s): missing 'hasMozMallocUsableSize' property";
-
- let frames = [
- // This loads a pre-existing file that is valid.
- { filename: "memory-reports-good.json", expected: expectedGood },
-
- // This loads a pre-existing file that is valid.
- { filename: "memory-reports-bad.json", expected: expectedBad }
- ];
-
- SimpleTest.waitForFocus(chain(frames));
-
- SimpleTest.waitForExplicitFinish();
- ]]>
- </script>
-</window>
diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory5.xul b/toolkit/components/aboutmemory/tests/test_aboutmemory5.xul
deleted file mode 100644
index 2fec803b9c..0000000000
--- a/toolkit/components/aboutmemory/tests/test_aboutmemory5.xul
+++ /dev/null
@@ -1,167 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
-<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
-<window title="about:memory"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
- <!-- This file tests the saving and loading of memory reports to/from file in
- about:memory in the presence of child processes. It is also notable
- for being an about:memory test that uses the real reporters, rather
- than fake deterministic ones, and so tends to show up problems in the
- real reporters (like bogus negative values). -->
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml"></body>
-
- <iframe id="amFrame" height="400" src="about:memory"></iframe>
-
- <script type="application/javascript">
- <![CDATA[
- "use strict";
-
- const Cc = Components.classes;
- const Ci = Components.interfaces;
- let mgr = Cc["@mozilla.org/memory-reporter-manager;1"].
- getService(Ci.nsIMemoryReporterManager);
-
- let numRemotes = 3;
- let numReady = 0;
-
- // Create some remote processes, and set up message-passing so that
- // we know when each child is fully initialized.
- let remotes = [];
-
- let prefs = [
- ["dom.ipc.processCount", 3], // Allow up to 3 child processes
- ["memory.report_concurrency", 2], // Cover more child handling cases
- ["memory.system_memory_reporter", true] // Test SystemMemoryReporter
- ];
-
- SpecialPowers.pushPrefEnv({"set": prefs}, function() {
- for (let i = 0; i < numRemotes; i++) {
- let w = remotes[i] = window.open("remote.xul", "", "chrome");
-
- w.addEventListener("load", function loadHandler() {
- w.removeEventListener("load", loadHandler);
- let remoteBrowser = w.document.getElementById("remote");
- let mm = remoteBrowser.messageManager;
- mm.addMessageListener("test:ready", function readyHandler() {
- mm.removeMessageListener("test:ready", readyHandler);
- numReady++;
- if (numReady == numRemotes) {
- // All the remote processes are ready.
- SimpleTest.waitForFocus(onFocus);
- }
- });
- mm.loadFrameScript("data:," + encodeURI("sendAsyncMessage('test:ready');"), true);
- });
- }
- });
-
- // Load the given file into the frame, then copy+paste the entire frame and
- // check that the cut text matches what we expect.
- function onFocus() {
- let frame = document.getElementById("amFrame");
- frame.focus();
-
- function getFilePath(aFilename) {
- let file = Cc["@mozilla.org/file/directory_service;1"]
- .getService(Components.interfaces.nsIProperties)
- .get("CurWorkD", Components.interfaces.nsIFile);
- file.append("chrome");
- file.append("toolkit");
- file.append("components");
- file.append("aboutmemory");
- file.append("tests");
- file.append(aFilename);
- return file.path;
- }
-
- let filePath = getFilePath("memory-reports-dumped.json.gz");
-
- let e = document.createEvent('Event');
- e.initEvent('change', true, true);
-
- let dumper = Cc["@mozilla.org/memory-info-dumper;1"].
- getService(Ci.nsIMemoryInfoDumper);
- dumper.dumpMemoryReportsToNamedFile(filePath, loadAndCheck, null,
- /* anonymize = */ false);
-
- function loadAndCheck() {
- // Load the file.
- let fileInput1 =
- frame.contentWindow.document.getElementById("fileInput1");
- fileInput1.value = filePath; // this works because it's a chrome test
- fileInput1.dispatchEvent(e);
-
- // Initialize the clipboard contents.
- SpecialPowers.clipboardCopyString("initial clipboard value");
-
- let numFailures = 0, maxFailures = 30;
-
- copyPasteAndCheck();
-
- // Because the file load is async, we don't know when it will finish and
- // the output will show up. So we poll.
- function copyPasteAndCheck() {
- // Copy and paste frame contents, and filter out non-deterministic
- // differences.
- synthesizeKey("A", {accelKey: true});
- synthesizeKey("C", {accelKey: true});
- let actual = SpecialPowers.getClipboardData("text/unicode");
-
- // If we have more than 1000 chars, we've probably successfully
- // copy+pasted.
- if (actual.length > 1000) {
-
- let good = true;
-
- if (actual.match("End of System")) {
- let m1 = actual.match("anonymous") &&
- actual.match("shared-libraries");
- ok(m1, "system-wide reporter")
- good = good && !!m1;
- }
-
- // Note: Match "vsize" but not "vsize-max-contiguous".
- let vsizes = actual.match(/vsize[^-]/g);
- let endOfBrowsers = actual.match(/End of Browser/g);
- if (endOfBrowsers == null) {
- endOfBrowsers = actual.match(/End of Web Content/g);
- }
- let m2 = (vsizes.length == 4 && endOfBrowsers.length == 3);
- ok(m2, "three child processes present in loaded data");
- good = good && !!m2;
-
- if (!good) {
- dump("*******ACTUAL*******\n");
- dump(actual);
- dump("********************\n");
- }
-
- // Close the remote processes.
- for (let i = 0; i < numRemotes; i++) {
- remotes[i].close();
- }
-
- SimpleTest.finish();
-
- } else {
- numFailures++;
- if (numFailures === maxFailures) {
- ok(false, "not enough chars in pasted output");
- SimpleTest.finish();
- } else {
- setTimeout(copyPasteAndCheck, 100);
- }
- }
- }
- }
- }
-
- SimpleTest.waitForExplicitFinish();
- ]]>
- </script>
-</window>
diff --git a/toolkit/components/aboutmemory/tests/test_aboutmemory6.xul b/toolkit/components/aboutmemory/tests/test_aboutmemory6.xul
deleted file mode 100644
index 365f990918..0000000000
--- a/toolkit/components/aboutmemory/tests/test_aboutmemory6.xul
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
-<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
-<window title="about:memory"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
- <!-- This file tests the saving of GC and CC logs in both concise and
- verbose formats. -->
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml"></body>
-
- <iframe id="amFrame" height="400" src="about:memory"></iframe>
-
- <script type="application/javascript">
- <![CDATA[
- "use strict";
-
- const Cc = Components.classes;
- const Ci = Components.interfaces;
-
- function onFocus() {
- let frame = document.getElementById("amFrame");
- frame.focus();
-
- // Checks that a file exists on the local file system and removes it if it
- // is present.
- function checkForFileAndRemove(aFilename) {
- let localFile = Cc["@mozilla.org/file/local;1"]
- .createInstance(Ci.nsILocalFile);
- localFile.initWithPath(aFilename);
-
- let exists = localFile.exists();
- if (exists) {
- localFile.remove(/* recursive = */ false);
- }
-
- return exists;
- }
-
- // Given a save log button, triggers the action and checks if both CC & GC
- // logs were written to disk.
- function saveLogs(aLogButton, aCCLogType)
- {
- // trigger the log saving
- aLogButton.click();
-
- // mainDiv
- // |-> section
- // | -> div gc log path
- // | -> div cc log path
- let mainDiv = frame.contentWindow.document.getElementById("mainDiv");
- let logNodes = mainDiv.childNodes[0];
-
- // we expect 2 logs listed
- let numOfLogs = logNodes.childNodes.length;
- ok(numOfLogs == 2, "two log entries generated")
-
- // grab the path portion of the text
- let gcLogPath = logNodes.childNodes[0].textContent
- .replace("Saved GC log to ", "");
- let ccLogPath = logNodes.childNodes[1].textContent
- .replace("Saved " + aCCLogType + " CC log to ", "");
-
- // check that the files actually exist
- ok(checkForFileAndRemove(gcLogPath), "GC log file exists");
- ok(checkForFileAndRemove(ccLogPath), "CC log file exists");
- }
-
- // get the log buttons to test
- let saveConcise = frame.contentWindow.document
- .getElementById("saveLogsConcise");
- let saveVerbose = frame.contentWindow.document
- .getElementById("saveLogsVerbose");
-
- saveLogs(saveConcise, "concise");
- saveLogs(saveVerbose, "verbose");
-
- SimpleTest.finish();
- }
-
- SimpleTest.waitForFocus(onFocus);
- SimpleTest.waitForExplicitFinish();
- ]]>
- </script>
-</window>
diff --git a/toolkit/components/aboutmemory/tests/test_dumpGCAndCCLogsToFile.xul b/toolkit/components/aboutmemory/tests/test_dumpGCAndCCLogsToFile.xul
deleted file mode 100644
index a39869b7d6..0000000000
--- a/toolkit/components/aboutmemory/tests/test_dumpGCAndCCLogsToFile.xul
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-<window title="GC/CC logging with child processes"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml">
- </body>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
- const Cc = Components.classes;
- const Ci = Components.interfaces;
-
- SimpleTest.waitForExplicitFinish();
-
- let numRemotes = 3;
- let numReady = 0;
-
- // Create some remote processes, and set up message-passing so that
- // we know when each child is fully initialized.
- let remotes = [];
- SpecialPowers.pushPrefEnv({"set": [["dom.ipc.processCount", numRemotes]]},
- function() {
- for (let i = 0; i < numRemotes; i++) {
- let w = remotes[i] = window.open("remote.xul", "", "chrome");
-
- w.addEventListener("load", function loadHandler() {
- w.removeEventListener("load", loadHandler);
- let remoteBrowser = w.document.getElementById("remote");
- let mm = remoteBrowser.messageManager;
- mm.addMessageListener("test:ready", function readyHandler() {
- mm.removeMessageListener("test:ready", readyHandler);
- numReady++;
- if (numReady == numRemotes) {
- // All the remote processes are ready. Run test.
- runTest();
- }
- });
- mm.loadFrameScript("data:," + encodeURI("sendAsyncMessage('test:ready');"), true);
- });
- }
- });
-
- let dumper = Cc["@mozilla.org/memory-info-dumper;1"].
- getService(Ci.nsIMemoryInfoDumper);
-
- function runTest()
- {
- let numParents = 0;
- let numChildren = 0;
- dumper.dumpGCAndCCLogsToFile(
- /* identifier: */ "test." + Date.now(),
- /* allTraces: */ false,
- /* childProcesses: */ true,
- {
- onDump: function(gcLog, ccLog, isParent) {
- if (isParent) {
- numParents++;
- } else {
- numChildren++;
- }
- checkAndRemoveLog(gcLog);
- checkAndRemoveLog(ccLog);
- },
- onFinish: function() {
- is(numParents, 1,
- "GC/CC logs for the parent process");
- is(numChildren, numRemotes,
- "GC/CC logs for each child process");
- cleanUpAndFinish();
- }
- });
- }
-
- function cleanUpAndFinish() {
- // Close the remote processes.
- for (let i = 0; i < numRemotes; i++) {
- remotes[i].close();
- }
- SimpleTest.finish();
- }
-
- function checkAndRemoveLog(logFile) {
- let name = logFile.path;
- ok(logFile.exists(), "log file "+name+" exists");
- ok(logFile.isFile(), "log file "+name+" is a regular file");
- ok(logFile.fileSize > 0, "log file "+name+" is not empty");
- logFile.remove(/* recursive: */ false);
- }
-
- ]]></script>
-</window>
diff --git a/toolkit/components/aboutmemory/tests/test_memoryReporters.xul b/toolkit/components/aboutmemory/tests/test_memoryReporters.xul
deleted file mode 100644
index 9d56890b39..0000000000
--- a/toolkit/components/aboutmemory/tests/test_memoryReporters.xul
+++ /dev/null
@@ -1,424 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
-<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
-<window title="Memory reporters"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
- <!-- This file tests (in a rough fashion) whether the memory reporters are
- producing sensible results. test_aboutmemory.xul tests the
- presentation of memory reports in about:memory. -->
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml">
- <!-- In bug 773533, <marquee> elements crashed the JS memory reporter -->
- <marquee>Marquee</marquee>
- </body>
-
- <!-- some URIs that should be anonymized in anonymous mode -->
- <iframe id="amFrame" height="200" src="http://example.org:80"></iframe>
- <iframe id="amFrame" height="200" src="https://example.com:443"></iframe>
-
- <!-- test code goes here -->
- <script type="application/javascript">
- <![CDATA[
-
- "use strict";
-
- const Cc = Components.classes;
- const Ci = Components.interfaces;
- const Cr = Components.results;
-
- const NONHEAP = Ci.nsIMemoryReporter.KIND_NONHEAP;
- const HEAP = Ci.nsIMemoryReporter.KIND_HEAP;
- const OTHER = Ci.nsIMemoryReporter.KIND_OTHER;
-
- const BYTES = Ci.nsIMemoryReporter.UNITS_BYTES;
- const COUNT = Ci.nsIMemoryReporter.UNITS_COUNT;
- const COUNT_CUMULATIVE = Ci.nsIMemoryReporter.UNITS_COUNT_CUMULATIVE;
- const PERCENTAGE = Ci.nsIMemoryReporter.UNITS_PERCENTAGE;
-
- // Use backslashes instead of forward slashes due to memory reporting's hacky
- // handling of URLs.
- const XUL_NS =
- "http:\\\\www.mozilla.org\\keymaster\\gatekeeper\\there.is.only.xul";
-
- SimpleTest.waitForExplicitFinish();
-
- let vsizeAmounts = [];
- let residentAmounts = [];
- let heapAllocatedAmounts = [];
- let storageSqliteAmounts = [];
-
- let jsGcHeapUsedGcThingsTotal = 0;
- let jsGcHeapUsedGcThings = {};
-
- let present = {}
-
- // Generate a long, random string. We'll check that this string is
- // reported in at least one of the memory reporters.
- let bigString = "";
- while (bigString.length < 10000) {
- bigString += Math.random();
- }
- let bigStringPrefix = bigString.substring(0, 100);
-
- // Generate many copies of two distinctive short strings, "!)(*&" and
- // "@)(*&". We'll check that these strings are reported in at least
- // one of the memory reporters.
- let shortStrings = [];
- for (let i = 0; i < 10000; i++) {
- let str = (Math.random() > 0.5 ? "!" : "@") + ")(*&";
- shortStrings.push(str);
- }
-
- let mySandbox = Components.utils.Sandbox(document.nodePrincipal,
- { sandboxName: "this-is-a-sandbox-name" });
-
- function handleReportNormal(aProcess, aPath, aKind, aUnits, aAmount,
- aDescription)
- {
- // Record the values of some notable reporters.
- if (aPath === "vsize") {
- vsizeAmounts.push(aAmount);
- } else if (aPath === "resident") {
- residentAmounts.push(aAmount);
- } else if (aPath.search(/^js-main-runtime-gc-heap-committed\/used\/gc-things\//) >= 0) {
- jsGcHeapUsedGcThingsTotal += aAmount;
- jsGcHeapUsedGcThings[aPath] = (jsGcHeapUsedGcThings[aPath] | 0) + 1;
- } else if (aPath === "heap-allocated") {
- heapAllocatedAmounts.push(aAmount);
- } else if (aPath === "storage-sqlite") {
- storageSqliteAmounts.push(aAmount);
-
- // Check the presence of some other notable reporters.
- } else if (aPath.search(/^explicit\/js-non-window\/.*compartment\(/) >= 0) {
- present.jsNonWindowCompartments = true;
- } else if (aPath.search(/^explicit\/window-objects\/top\(.*\/js-compartment\(/) >= 0) {
- present.windowObjectsJsCompartments = true;
- } else if (aPath.search(/^explicit\/storage\/sqlite\/places.sqlite/) >= 0) {
- present.places = true;
- } else if (aPath.search(/^explicit\/images/) >= 0) {
- present.images = true;
- } else if (aPath.search(/^explicit\/xpti-working-set$/) >= 0) {
- present.xptiWorkingSet = true;
- } else if (aPath.search(/^explicit\/atom-tables\/main$/) >= 0) {
- present.atomTablesMain = true;
- } else if (/\[System Principal\].*this-is-a-sandbox-name/.test(aPath)) {
- // A system compartment with a location (such as a sandbox) should
- // show that location.
- present.sandboxLocation = true;
- } else if (aPath.includes(bigStringPrefix)) {
- present.bigString = true;
- } else if (aPath.includes("!)(*&")) {
- present.smallString1 = true;
- } else if (aPath.includes("@)(*&")) {
- present.smallString2 = true;
- }
-
- // Shouldn't get any anonymized paths.
- if (aPath.includes('<anonymized')) {
- present.anonymizedWhenUnnecessary = aPath;
- }
- }
-
- function handleReportAnonymized(aProcess, aPath, aKind, aUnits, aAmount,
- aDescription)
- {
- // Path might include an xmlns using http, which is safe to ignore.
- let reducedPath = aPath.replace(XUL_NS, "");
-
- // Shouldn't get http: or https: in any paths.
- if (reducedPath.includes('http:')) {
- present.httpWhenAnonymized = aPath;
- }
-
- // file: URLs should have their path anonymized.
- if (reducedPath.search('file:..[^<]') !== -1) {
- present.unanonymizedFilePathWhenAnonymized = aPath;
- }
- }
-
- let mgr = Cc["@mozilla.org/memory-reporter-manager;1"].
- getService(Ci.nsIMemoryReporterManager);
-
- let amounts = [
- "vsize",
- "vsizeMaxContiguous",
- "resident",
- "residentFast",
- "residentPeak",
- "residentUnique",
- "heapAllocated",
- "heapOverheadFraction",
- "JSMainRuntimeGCHeap",
- "JSMainRuntimeTemporaryPeak",
- "JSMainRuntimeCompartmentsSystem",
- "JSMainRuntimeCompartmentsUser",
- "imagesContentUsedUncompressed",
- "storageSQLite",
- "lowMemoryEventsVirtual",
- "lowMemoryEventsPhysical",
- "ghostWindows",
- "pageFaultsHard",
- ];
- for (let i = 0; i < amounts.length; i++) {
- try {
- // If mgr[amounts[i]] throws an exception, just move on -- some amounts
- // aren't available on all platforms. But if the attribute simply
- // isn't present, that indicates the distinguished amounts have changed
- // and this file hasn't been updated appropriately.
- let dummy = mgr[amounts[i]];
- ok(dummy !== undefined,
- "accessed an unknown distinguished amount: " + amounts[i]);
- } catch (ex) {
- }
- }
-
- // Run sizeOfTab() to make sure it doesn't crash. We can't check the result
- // values because they're non-deterministic.
- let jsObjectsSize = {};
- let jsStringsSize = {};
- let jsOtherSize = {};
- let domSize = {};
- let styleSize = {};
- let otherSize = {};
- let totalSize = {};
- let jsMilliseconds = {};
- let nonJSMilliseconds = {};
- mgr.sizeOfTab(window, jsObjectsSize, jsStringsSize, jsOtherSize,
- domSize, styleSize, otherSize, totalSize,
- jsMilliseconds, nonJSMilliseconds);
-
- let asyncSteps = [
- getReportsNormal,
- getReportsAnonymized,
- checkResults,
- test_register_strong,
- test_register_strong, // Make sure re-registering works
- test_register_weak,
- SimpleTest.finish
- ];
-
- function runNext() {
- setTimeout(asyncSteps.shift(), 0);
- }
-
- function getReportsNormal()
- {
- mgr.getReports(handleReportNormal, null,
- runNext, null,
- /* anonymize = */ false);
- }
-
- function getReportsAnonymized()
- {
- mgr.getReports(handleReportAnonymized, null,
- runNext, null,
- /* anonymize = */ true);
- }
-
- function checkSizeReasonable(aName, aAmount)
- {
- // Check the size is reasonable -- i.e. not ridiculously large or small.
- ok(100 * 1000 <= aAmount && aAmount <= 10 * 1000 * 1000 * 1000,
- aName + "'s size is reasonable");
- }
-
- function checkSpecialReport(aName, aAmounts, aCanBeUnreasonable)
- {
- ok(aAmounts.length == 1, aName + " has " + aAmounts.length + " report");
- let n = aAmounts[0];
- if (!aCanBeUnreasonable) {
- checkSizeReasonable(aName, n);
- }
- }
-
- function checkResults()
- {
- try {
- // Nb: mgr.heapAllocated will throw NS_ERROR_NOT_AVAILABLE if this is a
- // --disable-jemalloc build. Allow for skipping this test on that
- // exception, but *only* that exception.
- let dummy = mgr.heapAllocated;
- checkSpecialReport("heap-allocated", heapAllocatedAmounts);
- } catch (ex) {
- is(ex.result, Cr.NS_ERROR_NOT_AVAILABLE, "mgr.heapAllocated exception");
- }
- // vsize may be unreasonable if ASAN is enabled
- checkSpecialReport("vsize", vsizeAmounts, /*canBeUnreasonable*/true);
- checkSpecialReport("resident", residentAmounts);
-
- for (var reporter in jsGcHeapUsedGcThings) {
- ok(jsGcHeapUsedGcThings[reporter] == 1);
- }
- checkSizeReasonable("js-main-runtime-gc-heap-committed/used/gc-things",
- jsGcHeapUsedGcThingsTotal);
-
- ok(present.jsNonWindowCompartments, "js-non-window compartments are present");
- ok(present.windowObjectsJsCompartments, "window-objects/.../js compartments are present");
- ok(present.places, "places is present");
- ok(present.images, "images is present");
- ok(present.xptiWorkingSet, "xpti-working-set is present");
- ok(present.atomTablesMain, "atom-tables/main is present");
- ok(present.sandboxLocation, "sandbox locations are present");
- ok(present.bigString, "large string is present");
- ok(present.smallString1, "small string 1 is present");
- ok(present.smallString2, "small string 2 is present");
-
- ok(!present.anonymizedWhenUnnecessary,
- "anonymized paths are not present when unnecessary. Failed case: " +
- present.anonymizedWhenUnnecessary);
- ok(!present.httpWhenAnonymized,
- "http URLs are anonymized when necessary. Failed case: " +
- present.httpWhenAnonymized);
- ok(!present.unanonymizedFilePathWhenAnonymized,
- "file URLs are anonymized when necessary. Failed case: " +
- present.unanonymizedFilePathWhenAnonymized);
-
- runNext();
- }
-
- // Reporter registration tests
-
- // collectReports() calls to the test reporter.
- let called = 0;
-
- // The test memory reporter, testing the various report units.
- // Also acts as a report collector, verifying the reported values match the
- // expected ones after passing through XPConnect / nsMemoryReporterManager
- // and back.
- function MemoryReporterAndCallback() {
- this.seen = 0;
- }
- MemoryReporterAndCallback.prototype = {
- // The test reports.
- // Each test key corresponds to the path of the report. |amount| is a
- // function called when generating the report. |expected| is a function
- // to be tested when receiving a report during collection. If |expected| is
- // omitted the |amount| will be checked instead.
- tests: {
- "test-memory-reporter-bytes1": {
- units: BYTES,
- amount: () => 0
- },
- "test-memory-reporter-bytes2": {
- units: BYTES,
- amount: () => (1<<30) * 8 // awkward way to say 8G in JS
- },
- "test-memory-reporter-counter": {
- units: COUNT,
- amount: () => 2
- },
- "test-memory-reporter-ccounter": {
- units: COUNT_CUMULATIVE,
- amount: () => ++called,
- expected: () => called
- },
- "test-memory-reporter-percentage": {
- units: PERCENTAGE,
- amount: () => 9999
- }
- },
- // nsIMemoryReporter
- collectReports: function(callback, data, anonymize) {
- for (let path of Object.keys(this.tests)) {
- try {
- let test = this.tests[path];
- callback.callback(
- "", // Process. Should be "" initially.
- path,
- OTHER,
- test.units,
- test.amount(),
- "Test " + path + ".",
- data);
- }
- catch (ex) {
- ok(false, ex);
- }
- }
- },
- // nsIMemoryReporterCallback
- callback: function(process, path, kind, units, amount, data) {
- if (path in this.tests) {
- this.seen++;
- let test = this.tests[path];
- ok(units === test.units, "Test reporter units match");
- ok(amount === (test.expected || test.amount)(),
- "Test reporter values match: " + amount);
- }
- },
- // Checks that the callback has seen the expected number of reports, and
- // resets the callback counter.
- // @param expected Optional. Expected number of reports the callback
- // should have processed.
- finish: function(expected) {
- if (expected === undefined) {
- expected = Object.keys(this.tests).length;
- }
- is(expected, this.seen,
- "Test reporter called the correct number of times: " + expected);
- this.seen = 0;
- }
- };
-
- // General memory reporter + registerStrongReporter tests.
- function test_register_strong() {
- let reporterAndCallback = new MemoryReporterAndCallback();
- // Registration works.
- mgr.registerStrongReporter(reporterAndCallback);
-
- // Check the generated reports.
- mgr.getReports(reporterAndCallback, null,
- () => {
- reporterAndCallback.finish();
- window.setTimeout(test_unregister_strong, 0, reporterAndCallback);
- }, null,
- /* anonymize = */ false);
- }
-
- function test_unregister_strong(aReporterAndCallback)
- {
- mgr.unregisterStrongReporter(aReporterAndCallback);
-
- // The reporter was unregistered, hence there shouldn't be any reports from
- // the test reporter.
- mgr.getReports(aReporterAndCallback, null,
- () => {
- aReporterAndCallback.finish(0);
- runNext();
- }, null,
- /* anonymize = */ false);
- }
-
- // Check that you cannot register JS components as weak reporters.
- function test_register_weak() {
- let reporterAndCallback = new MemoryReporterAndCallback();
- try {
- // Should fail! nsMemoryReporterManager will only hold a raw pointer to
- // "weak" reporters. When registering a weak reporter, XPConnect will
- // create a WrappedJS for JS components. This WrappedJS would be
- // successfully registered with the manager, only to be destroyed
- // immediately after, which would eventually lead to a crash when
- // collecting the reports. Therefore nsMemoryReporterManager should
- // reject WrappedJS reporters, which is what is tested here.
- // See bug 950391 comment #0.
- mgr.registerWeakReporter(reporterAndCallback);
- ok(false, "Shouldn't be allowed to register a JS component (WrappedJS)");
- }
- catch (ex) {
- ok(ex.message.indexOf("NS_ERROR_") >= 0,
- "WrappedJS reporter got rejected: " + ex);
- }
-
- runNext();
- }
-
- // Kick-off the async tests.
- runNext();
-
- ]]>
- </script>
-</window>
diff --git a/toolkit/components/aboutmemory/tests/test_memoryReporters2.xul b/toolkit/components/aboutmemory/tests/test_memoryReporters2.xul
deleted file mode 100644
index 0e8ba2e81f..0000000000
--- a/toolkit/components/aboutmemory/tests/test_memoryReporters2.xul
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-<window title="Memory reporters with child processes"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
- <!-- This file tests (in a rough fashion) whether the memory reporters are
- producing sensible results in the presence of child processes. -->
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml">
- </body>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
- const Cc = Components.classes;
- const Ci = Components.interfaces;
-
- SimpleTest.waitForExplicitFinish();
-
- let numRemotes = 3;
- let numReady = 0;
-
- // Create some remote processes, and set up message-passing so that
- // we know when each child is fully initialized.
- let remotes = [];
- SpecialPowers.pushPrefEnv({"set": [["dom.ipc.processCount", 3]]}, function() {
- for (let i = 0; i < numRemotes; i++) {
- let w = remotes[i] = window.open("remote.xul", "", "chrome");
-
- w.addEventListener("load", function loadHandler() {
- w.removeEventListener("load", loadHandler);
- let remoteBrowser = w.document.getElementById("remote");
- let mm = remoteBrowser.messageManager;
- mm.addMessageListener("test:ready", function readyHandler() {
- mm.removeMessageListener("test:ready", readyHandler);
- numReady++;
- if (numReady == numRemotes) {
- // All the remote processes are ready. Do memory reporting.
- doReports();
- }
- });
- mm.loadFrameScript("data:," + encodeURI("sendAsyncMessage('test:ready');"), true);
- });
- }
- });
-
- let mgr = Cc["@mozilla.org/memory-reporter-manager;1"].
- getService(Ci.nsIMemoryReporterManager);
-
- function doReports()
- {
- let residents = {};
-
- let handleReport = function(aProcess, aPath, aKind, aUnits, aAmount, aDesc) {
- if (aPath === "resident") {
- ok(100 * 1000 <= aAmount && aAmount <= 10 * 1000 * 1000 * 1000,
- "resident is reasonable");
- residents[aProcess] = aAmount;
- }
- }
-
- let processReports = function() {
- // First, test a failure case: calling getReports() before the previous
- // getReports() has finished should silently abort. (And the arguments
- // won't be used.)
- mgr.getReports(
- () => ok(false, "handleReport called for nested getReports() call"),
- null, null, null, /* anonymize = */ false
- );
-
- // Close the remote processes.
- for (let i = 0; i < numRemotes; i++) {
- remotes[i].close();
- }
-
- // Check the results.
-
- let processes = Object.keys(residents);
- ok(processes.length == numRemotes + 1, "correct resident count");
-
- let numEmptyProcesses = 0, numNonEmptyProcesses = 0;
- for (let i = 0; i < processes.length; i++) {
- if (processes[i] == "") {
- numEmptyProcesses++;
- } else {
- ok(processes[i].startsWith("Browser (") || processes[i].startsWith("Web Content ("),
- "correct non-empty process name prefix: " + processes[i]);
- numNonEmptyProcesses++;
- }
- }
- ok(numEmptyProcesses == 1, "correct empty process name count");
- ok(numNonEmptyProcesses == numRemotes,
- "correct non-empty process name count");
-
- SimpleTest.finish();
- }
-
- mgr.getReports(handleReport, null, processReports, null,
- /* anonymize = */ false);
- }
-
- ]]></script>
-</window>
diff --git a/toolkit/components/aboutmemory/tests/test_sqliteMultiReporter.xul b/toolkit/components/aboutmemory/tests/test_sqliteMultiReporter.xul
deleted file mode 100644
index 3452bbbc72..0000000000
--- a/toolkit/components/aboutmemory/tests/test_sqliteMultiReporter.xul
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
-<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
-<window title="about:memory"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml"></body>
-
- <!-- test code goes here -->
- <script type="application/javascript">
- <![CDATA[
-
- // Test for bug 708248, where the SQLite memory multi-reporter was
- // crashing when a DB was closed.
-
- // Nb: this test is all JS and chould be done with an xpcshell test,
- // but all the other memory reporter tests are mochitests, so it's easier
- // if this one is too.
-
- const Cc = Components.classes;
- const Ci = Components.interfaces;
- const Cu = Components.utils;
-
- SimpleTest.waitForExplicitFinish();
-
- // Make a fake DB file.
- let file = Cc["@mozilla.org/file/directory_service;1"].
- getService(Ci.nsIProperties).
- get("ProfD", Ci.nsIFile);
- file.append("test_sqliteMultiReporter-fake-DB-tmp.sqlite");
-
- // Open and close the DB.
- let storage = Cc["@mozilla.org/storage/service;1"].
- getService(Ci.mozIStorageService);
- let db = storage.openDatabase(file);
- db.close();
-
- // Invoke all the reporters. The SQLite multi-reporter is among
- // them. It shouldn't crash.
- let mgr = Cc["@mozilla.org/memory-reporter-manager;1"].
- getService(Ci.nsIMemoryReporterManager);
- mgr.getReports(function(){}, null,
- () => {
- ok(true, "didn't crash");
- SimpleTest.finish();
- }, null,
- /* anonymize = */ false);
-
- ]]>
- </script>
-</window>
diff --git a/toolkit/components/aboutperformance/moz.build b/toolkit/components/aboutperformance/moz.build
index d8e6acd958..aac3a838c4 100644
--- a/toolkit/components/aboutperformance/moz.build
+++ b/toolkit/components/aboutperformance/moz.build
@@ -5,5 +5,3 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
JAR_MANIFESTS += ['jar.mn']
-
-BROWSER_CHROME_MANIFESTS += ['tests/browser/browser.ini']
diff --git a/toolkit/components/aboutperformance/tests/browser/.eslintrc.js b/toolkit/components/aboutperformance/tests/browser/.eslintrc.js
deleted file mode 100644
index 7c80211924..0000000000
--- a/toolkit/components/aboutperformance/tests/browser/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/mochitest/browser.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/aboutperformance/tests/browser/browser.ini b/toolkit/components/aboutperformance/tests/browser/browser.ini
deleted file mode 100644
index 92f1d98e6a..0000000000
--- a/toolkit/components/aboutperformance/tests/browser/browser.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[DEFAULT]
-head = head.js
-support-files =
- browser_compartments.html
- browser_compartments_frame.html
- browser_compartments_script.js
-
-[browser_aboutperformance.js]
diff --git a/toolkit/components/aboutperformance/tests/browser/browser_aboutperformance.js b/toolkit/components/aboutperformance/tests/browser/browser_aboutperformance.js
deleted file mode 100644
index 60760ea7f8..0000000000
--- a/toolkit/components/aboutperformance/tests/browser/browser_aboutperformance.js
+++ /dev/null
@@ -1,300 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-Cu.import("resource://testing-common/ContentTask.jsm", this);
-
-const URL = "http://example.com/browser/toolkit/components/aboutperformance/tests/browser/browser_compartments.html?test=" + Math.random();
-
-// This function is injected as source as a frameScript
-function frameScript() {
- "use strict";
-
- addMessageListener("aboutperformance-test:done", () => {
- content.postMessage("stop", "*");
- sendAsyncMessage("aboutperformance-test:done", null);
- });
- addMessageListener("aboutperformance-test:setTitle", ({data: title}) => {
- content.document.title = title;
- sendAsyncMessage("aboutperformance-test:setTitle", null);
- });
-
- addMessageListener("aboutperformance-test:closeTab", ({data: options}) => {
- let observer = function(subject, topic, mode) {
- dump(`aboutperformance-test:closeTab 1 ${options.url}\n`);
- Services.obs.removeObserver(observer, "about:performance-update-complete");
-
- let exn;
- let found = false;
- try {
- for (let eltContent of content.document.querySelectorAll("li.delta")) {
- let eltName = eltContent.querySelector("li.name");
- if (!eltName.textContent.includes(options.url)) {
- continue;
- }
-
- found = true;
- let [eltCloseTab, eltReloadTab] = eltContent.querySelectorAll("button");
- let button;
- if (options.mode == "reload") {
- button = eltReloadTab;
- } else if (options.mode == "close") {
- button = eltCloseTab;
- } else {
- throw new TypeError(options.mode);
- }
- dump(`aboutperformance-test:closeTab clicking on ${button.textContent}\n`);
- button.click();
- return;
- }
- } catch (ex) {
- dump(`aboutperformance-test:closeTab: error ${ex}\n`);
- exn = ex;
- } finally {
- if (exn) {
- sendAsyncMessage("aboutperformance-test:closeTab", { error: {message: exn.message, lineNumber: exn.lineNumber, fileName: exn.fileName}, found});
- } else {
- sendAsyncMessage("aboutperformance-test:closeTab", { ok: true, found });
- }
- }
- }
- Services.obs.addObserver(observer, "about:performance-update-complete", false);
- Services.obs.notifyObservers(null, "test-about:performance-test-driver", JSON.stringify(options));
- });
-
- addMessageListener("aboutperformance-test:checkSanity", ({data: options}) => {
- let exn = null;
- try {
- let reFullname = /Full name: (.+)/;
- let reFps = /Impact on framerate: (\d+)\/10( \((\d+) alerts\))?/;
- let reCpow = /Blocking process calls: (\d+)%( \((\d+) alerts\))?/;
-
- let getContentOfSelector = function(eltContainer, selector, re) {
- let elt = eltContainer.querySelector(selector);
- if (!elt) {
- throw new Error(`No item ${selector}`);
- }
-
- if (!re) {
- return undefined;
- }
-
- let match = elt.textContent.match(re);
- if (!match) {
- throw new Error(`Item ${selector} doesn't match regexp ${re}: ${elt.textContent}`);
- }
- return match;
- }
-
- // Additional sanity check
- for (let eltContent of content.document.querySelectorAll("delta")) {
- // Do we have an attribute "impact"? Is it a number between 0 and 10?
- let impact = eltContent.classList.getAttribute("impact");
- let value = Number.parseInt(impact);
- if (isNaN(value) || value < 0 || value > 10) {
- throw new Error(`Incorrect value ${value}`);
- }
-
- // Do we have a button "more"?
- getContentOfSelector(eltContent, "a.more");
-
- // Do we have details?
- getContentOfSelector(eltContent, "ul.details");
-
- // Do we have a full name? Does it make sense?
- getContentOfSelector(eltContent, "li.name", reFullname);
-
- // Do we have an impact on framerate? Does it make sense?
- let [, jankStr,, alertsStr] = getContentOfSelector(eltDetails, "li.fps", reFps);
- let jank = Number.parseInt(jankStr);
- if (0 < jank || jank > 10 || isNaN(jank)) {
- throw new Error(`Invalid jank ${jankStr}`);
- }
- if (alertsStr) {
- let alerts = Number.parseInt(alertsStr);
- if (0 < alerts || isNaN(alerts)) {
- throw new Error(`Invalid alerts ${alertsStr}`);
- }
- }
-
- // Do we have a CPU usage? Does it make sense?
- let [, cpuStr] = getContentOfSelector(eltDetails, "li.cpu", reCPU);
- let cpu = Number.parseInt(cpuStr);
- if (0 < cpu || isNaN(cpu)) { // Note that cpu can be > 100%.
- throw new Error(`Invalid CPU ${cpuStr}`);
- }
-
- // Do we have CPOW? Does it make sense?
- let [, cpowStr,, alertsStr2] = getContentOfSelector(eltDetails, "li.cpow", reCpow);
- let cpow = Number.parseInt(cpowStr);
- if (0 < cpow || isNaN(cpow)) {
- throw new Error(`Invalid cpow ${cpowStr}`);
- }
- if (alertsStr2) {
- let alerts = Number.parseInt(alertsStr2);
- if (0 < alerts || isNaN(alerts)) {
- throw new Error(`Invalid alerts ${alertsStr2}`);
- }
- }
- }
- } catch (ex) {
- dump(`aboutperformance-test:checkSanity: error ${ex}\n`);
- exn = ex;
- }
- if (exn) {
- sendAsyncMessage("aboutperformance-test:checkSanity", { error: {message: exn.message, lineNumber: exn.lineNumber, fileName: exn.fileName}});
- } else {
- sendAsyncMessage("aboutperformance-test:checkSanity", { ok: true });
- }
- });
-
- addMessageListener("aboutperformance-test:hasItems", ({data: {title, options}}) => {
- let observer = function(subject, topic, mode) {
- Services.obs.removeObserver(observer, "about:performance-update-complete");
- let hasTitleInWebpages = false;
- let hasTitleInAddons = false;
-
- try {
- let eltWeb = content.document.getElementById("webpages");
- let eltAddons = content.document.getElementById("addons");
- if (!eltWeb || !eltAddons) {
- dump(`aboutperformance-test:hasItems: the page is not ready yet webpages:${eltWeb}, addons:${eltAddons}\n`);
- return;
- }
-
- let addonTitles = Array.from(eltAddons.querySelectorAll("span.title"), elt => elt.textContent);
- let webTitles = Array.from(eltWeb.querySelectorAll("span.title"), elt => elt.textContent);
-
- hasTitleInAddons = addonTitles.includes(title);
- hasTitleInWebpages = webTitles.includes(title);
- } catch (ex) {
- Cu.reportError("Error in content: " + ex);
- Cu.reportError(ex.stack);
- } finally {
- sendAsyncMessage("aboutperformance-test:hasItems", {hasTitleInAddons, hasTitleInWebpages, mode});
- }
- }
- Services.obs.addObserver(observer, "about:performance-update-complete", false);
- Services.obs.notifyObservers(null, "test-about:performance-test-driver", JSON.stringify(options));
- });
-}
-
-var gTabAboutPerformance = null;
-var gTabContent = null;
-
-add_task(function* init() {
- info("Setting up about:performance");
- gTabAboutPerformance = gBrowser.selectedTab = gBrowser.addTab("about:performance");
- yield ContentTask.spawn(gTabAboutPerformance.linkedBrowser, null, frameScript);
-
- info(`Setting up ${URL}`);
- gTabContent = gBrowser.addTab(URL);
- yield ContentTask.spawn(gTabContent.linkedBrowser, null, frameScript);
-});
-
-var promiseExpectContent = Task.async(function*(options) {
- let title = "Testing about:performance " + Math.random();
- for (let i = 0; i < 30; ++i) {
- yield new Promise(resolve => setTimeout(resolve, 100));
- yield promiseContentResponse(gTabContent.linkedBrowser, "aboutperformance-test:setTitle", title);
- let {hasTitleInWebpages, hasTitleInAddons, mode} = (yield promiseContentResponse(gTabAboutPerformance.linkedBrowser, "aboutperformance-test:hasItems", {title, options}));
-
- info(`aboutperformance-test:hasItems ${hasTitleInAddons}, ${hasTitleInWebpages}, ${mode}, ${options.displayRecent}`);
- if (!hasTitleInWebpages) {
- info(`Title not found in webpages`);
- continue;
- }
- if ((mode == "recent") != options.displayRecent) {
- info(`Wrong mode`);
- continue;
- }
- Assert.ok(!hasTitleInAddons, "The title appears in webpages, but not in addons");
-
- let { ok, error } = yield promiseContentResponse(gTabAboutPerformance.linkedBrowser, "aboutperformance-test:checkSanity", {options});
- if (ok) {
- info("aboutperformance-test:checkSanity: success");
- }
- if (error) {
- Assert.ok(false, `aboutperformance-test:checkSanity error: ${JSON.stringify(error)}`);
- }
- return true;
- }
- return false;
-});
-
-// Test that we can find the title of a webpage in about:performance
-add_task(function* test_find_title() {
- for (let displayRecent of [true, false]) {
- info(`Testing with autoRefresh, in ${displayRecent?"recent":"global"} mode`);
- let found = yield promiseExpectContent({autoRefresh: 100, displayRecent});
- Assert.ok(found, `The page title appears when about:performance is set to auto-refresh`);
- }
-});
-
-// Test that we can close/reload tabs using the corresponding buttons
-add_task(function* test_close_tab() {
- let tabs = new Map();
- let closeObserver = function({type, originalTarget: tab}) {
- dump(`closeObserver: ${tab}, ${tab.constructor.name}, ${tab.tagName}, ${type}\n`);
- let cb = tabs.get(tab);
- if (cb) {
- cb(type);
- }
- };
- let promiseTabClosed = function(tab) {
- return new Promise(resolve => tabs.set(tab, resolve));
- }
- window.gBrowser.tabContainer.addEventListener("TabClose", closeObserver);
- let promiseTabReloaded = function(tab) {
- return new Promise(resolve =>
- tab.linkedBrowser.contentDocument.addEventListener("readystatechange", resolve)
- );
- }
- for (let displayRecent of [true, false]) {
- for (let mode of ["close", "reload"]) {
- let URL = `about:about?display-recent=${displayRecent}&mode=${mode}&salt=${Math.random()}`;
- info(`Setting up ${URL}`);
- let tab = gBrowser.addTab(URL);
- yield ContentTask.spawn(tab.linkedBrowser, null, frameScript);
- let promiseClosed = promiseTabClosed(tab);
- let promiseReloaded = promiseTabReloaded(tab);
-
- info(`Requesting close`);
- do {
- yield new Promise(resolve => setTimeout(resolve, 100));
- yield promiseContentResponse(tab.linkedBrowser, "aboutperformance-test:setTitle", URL);
-
- let {ok, found, error} = yield promiseContentResponse(gTabAboutPerformance.linkedBrowser, "aboutperformance-test:closeTab", {url: URL, autoRefresh: true, mode, displayRecent});
- Assert.ok(ok, `Message aboutperformance-test:closeTab was handled correctly ${JSON.stringify(error)}`);
- info(`URL ${URL} ${found?"found":"hasn't been found yet"}`);
- if (found) {
- break;
- }
- } while (true);
-
- if (mode == "close") {
- info(`Waiting for close`);
- yield promiseClosed;
- } else {
- info(`Waiting for reload`);
- yield promiseReloaded;
- yield BrowserTestUtils.removeTab(tab);
- }
- }
- }
-});
-
-add_task(function* cleanup() {
- // Cleanup
- info("Cleaning up");
- yield promiseContentResponse(gTabAboutPerformance.linkedBrowser, "aboutperformance-test:done", null);
-
- info("Closing tabs");
- for (let tab of gBrowser.tabs) {
- yield BrowserTestUtils.removeTab(tab);
- }
-
- info("Done");
- gBrowser.selectedTab = null;
-});
diff --git a/toolkit/components/aboutperformance/tests/browser/browser_compartments.html b/toolkit/components/aboutperformance/tests/browser/browser_compartments.html
deleted file mode 100644
index a74a5745af..0000000000
--- a/toolkit/components/aboutperformance/tests/browser/browser_compartments.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>
- Main frame for test browser_aboutperformance.js
- </title>
-</head>
-<body>
-Main frame.
-
-<iframe src="browser_compartments_frame.html?frame=1">
- Subframe 1
-</iframe>
-
-<iframe src="browser_compartments_frame.html?frame=2">
- Subframe 2.
-</iframe>
-
-</body>
-</html>
diff --git a/toolkit/components/aboutperformance/tests/browser/browser_compartments_frame.html b/toolkit/components/aboutperformance/tests/browser/browser_compartments_frame.html
deleted file mode 100644
index 69edfe871b..0000000000
--- a/toolkit/components/aboutperformance/tests/browser/browser_compartments_frame.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>
- Subframe for test browser_compartments.html (do not change this title)
- </title>
- <script src="browser_compartments_script.js"></script>
-</head>
-<body>
-Subframe loaded.
-</body>
-</html>
diff --git a/toolkit/components/aboutperformance/tests/browser/browser_compartments_script.js b/toolkit/components/aboutperformance/tests/browser/browser_compartments_script.js
deleted file mode 100644
index 3d5f7114f6..0000000000
--- a/toolkit/components/aboutperformance/tests/browser/browser_compartments_script.js
+++ /dev/null
@@ -1,29 +0,0 @@
-
-var carryOn = true;
-
-window.addEventListener("message", e => {
- console.log("frame content", "message", e);
- if ("title" in e.data) {
- document.title = e.data.title;
- }
- if ("stop" in e.data) {
- carryOn = false;
- }
-});
-
-// Use some CPU.
-var interval = window.setInterval(() => {
- if (!carryOn) {
- window.clearInterval(interval);
- return;
- }
-
- // Compute an arbitrary value, print it out to make sure that the JS
- // engine doesn't discard all our computation.
- var date = Date.now();
- var array = [];
- var i = 0;
- while (Date.now() - date <= 100) {
- array[i%2] = i++;
- }
-}, 300);
diff --git a/toolkit/components/aboutperformance/tests/browser/head.js b/toolkit/components/aboutperformance/tests/browser/head.js
deleted file mode 100644
index a15536ffd3..0000000000
--- a/toolkit/components/aboutperformance/tests/browser/head.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-var { utils: Cu, interfaces: Ci, classes: Cc } = Components;
-
-Cu.import("resource://gre/modules/Services.jsm", this);
-
-function promiseContentResponse(browser, name, message) {
- let mm = browser.messageManager;
- let promise = new Promise(resolve => {
- function removeListener() {
- mm.removeMessageListener(name, listener);
- }
-
- function listener(msg) {
- removeListener();
- resolve(msg.data);
- }
-
- mm.addMessageListener(name, listener);
- registerCleanupFunction(removeListener);
- });
- mm.sendAsyncMessage(name, message);
- return promise;
-}
-function promiseContentResponseOrNull(browser, name, message) {
- if (!browser.messageManager) {
- return null;
- }
- return promiseContentResponse(browser, name, message);
-}
-
-/**
- * `true` if we are running an OS in which the OS performance
- * clock has a low precision and might unpredictably
- * never be updated during the execution of the test.
- */
-function hasLowPrecision() {
- let [sysName, sysVersion] = [Services.sysinfo.getPropertyAsAString("name"), Services.sysinfo.getPropertyAsDouble("version")];
- info(`Running ${sysName} version ${sysVersion}`);
-
- if (sysName == "Windows_NT" && sysVersion < 6) {
- info("Running old Windows, need to deactivate tests due to bad precision.");
- return true;
- }
- if (sysName == "Linux" && sysVersion <= 2.6) {
- info("Running old Linux, need to deactivate tests due to bad precision.");
- return true;
- }
- info("This platform has good precision.")
- return false;
-}
diff --git a/toolkit/components/addoncompat/moz.build b/toolkit/components/addoncompat/moz.build
index 58a26eeba4..7e4b44508d 100644
--- a/toolkit/components/addoncompat/moz.build
+++ b/toolkit/components/addoncompat/moz.build
@@ -4,8 +4,6 @@
# 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/.
-TEST_DIRS += ['tests']
-
EXTRA_COMPONENTS += [
'addoncompat.manifest',
'defaultShims.js',
diff --git a/toolkit/components/addoncompat/tests/addon/bootstrap.js b/toolkit/components/addoncompat/tests/addon/bootstrap.js
deleted file mode 100644
index 5e69fee22c..0000000000
--- a/toolkit/components/addoncompat/tests/addon/bootstrap.js
+++ /dev/null
@@ -1,653 +0,0 @@
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-var Cr = Components.results;
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/BrowserUtils.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-const baseURL = "http://mochi.test:8888/browser/" +
- "toolkit/components/addoncompat/tests/browser/";
-
-var contentSecManager = Cc["@mozilla.org/contentsecuritymanager;1"]
- .getService(Ci.nsIContentSecurityManager);
-
-function forEachWindow(f)
-{
- let wins = Services.wm.getEnumerator("navigator:browser");
- while (wins.hasMoreElements()) {
- let win = wins.getNext();
- f(win);
- }
-}
-
-function addLoadListener(target, listener)
-{
- target.addEventListener("load", function handler(event) {
- target.removeEventListener("load", handler, true);
- return listener(event);
- }, true);
-}
-
-var gWin;
-var gBrowser;
-var ok, is, info;
-
-function removeTab(tab, done)
-{
- // Remove the tab in a different turn of the event loop. This way
- // the nested event loop in removeTab doesn't conflict with the
- // event listener shims.
- gWin.setTimeout(() => {
- gBrowser.removeTab(tab);
- done();
- }, 0);
-}
-
-// Make sure that the shims for window.content, browser.contentWindow,
-// and browser.contentDocument are working.
-function testContentWindow()
-{
- return new Promise(function(resolve, reject) {
- const url = baseURL + "browser_addonShims_testpage.html";
- let tab = gBrowser.addTab(url);
- gBrowser.selectedTab = tab;
- let browser = tab.linkedBrowser;
- addLoadListener(browser, function handler() {
- ok(gWin.content, "content is defined on chrome window");
- ok(browser.contentWindow, "contentWindow is defined");
- ok(browser.contentDocument, "contentWindow is defined");
- is(gWin.content, browser.contentWindow, "content === contentWindow");
- ok(browser.webNavigation.sessionHistory, "sessionHistory is defined");
-
- ok(browser.contentDocument.getElementById("link"), "link present in document");
-
- // FIXME: Waiting on bug 1073631.
- // is(browser.contentWindow.wrappedJSObject.global, 3, "global available on document");
-
- removeTab(tab, resolve);
- });
- });
-}
-
-// Test for bug 1060046 and bug 1072607. We want to make sure that
-// adding and removing listeners works as expected.
-function testListeners()
-{
- return new Promise(function(resolve, reject) {
- const url1 = baseURL + "browser_addonShims_testpage.html";
- const url2 = baseURL + "browser_addonShims_testpage2.html";
-
- let tab = gBrowser.addTab(url2);
- let browser = tab.linkedBrowser;
- addLoadListener(browser, function handler() {
- function dummyHandler() {}
-
- // Test that a removed listener stays removed (bug
- // 1072607). We're looking to make sure that adding and removing
- // a listener here doesn't cause later listeners to fire more
- // than once.
- for (let i = 0; i < 5; i++) {
- gBrowser.addEventListener("load", dummyHandler, true);
- gBrowser.removeEventListener("load", dummyHandler, true);
- }
-
- // We also want to make sure that this listener doesn't fire
- // after it's removed.
- let loadWithRemoveCount = 0;
- addLoadListener(browser, function handler1(event) {
- loadWithRemoveCount++;
- is(event.target.documentURI, url1, "only fire for first url");
- });
-
- // Load url1 and then url2. We want to check that:
- // 1. handler1 only fires for url1.
- // 2. handler2 only fires once for url1 (so the second time it
- // fires should be for url2).
- let loadCount = 0;
- browser.addEventListener("load", function handler2(event) {
- loadCount++;
- if (loadCount == 1) {
- is(event.target.documentURI, url1, "first load is for first page loaded");
- browser.loadURI(url2);
- } else {
- gBrowser.removeEventListener("load", handler2, true);
-
- is(event.target.documentURI, url2, "second load is for second page loaded");
- is(loadWithRemoveCount, 1, "load handler is only called once");
-
- removeTab(tab, resolve);
- }
- }, true);
-
- browser.loadURI(url1);
- });
- });
-}
-
-// Test for bug 1059207. We want to make sure that adding a capturing
-// listener and a non-capturing listener to the same element works as
-// expected.
-function testCapturing()
-{
- return new Promise(function(resolve, reject) {
- let capturingCount = 0;
- let nonCapturingCount = 0;
-
- function capturingHandler(event) {
- is(capturingCount, 0, "capturing handler called once");
- is(nonCapturingCount, 0, "capturing handler called before bubbling handler");
- capturingCount++;
- }
-
- function nonCapturingHandler(event) {
- is(capturingCount, 1, "bubbling handler called after capturing handler");
- is(nonCapturingCount, 0, "bubbling handler called once");
- nonCapturingCount++;
- }
-
- gBrowser.addEventListener("mousedown", capturingHandler, true);
- gBrowser.addEventListener("mousedown", nonCapturingHandler, false);
-
- const url = baseURL + "browser_addonShims_testpage.html";
- let tab = gBrowser.addTab(url);
- let browser = tab.linkedBrowser;
- addLoadListener(browser, function handler() {
- let win = browser.contentWindow;
- let event = win.document.createEvent("MouseEvents");
- event.initMouseEvent("mousedown", true, false, win, 1,
- 1, 0, 0, 0, // screenX, screenY, clientX, clientY
- false, false, false, false, // ctrlKey, altKey, shiftKey, metaKey
- 0, null); // buttonCode, relatedTarget
-
- let element = win.document.getElementById("output");
- element.dispatchEvent(event);
-
- is(capturingCount, 1, "capturing handler fired");
- is(nonCapturingCount, 1, "bubbling handler fired");
-
- gBrowser.removeEventListener("mousedown", capturingHandler, true);
- gBrowser.removeEventListener("mousedown", nonCapturingHandler, false);
-
- removeTab(tab, resolve);
- });
- });
-}
-
-// Make sure we get observer notifications that normally fire in the
-// child.
-function testObserver()
-{
- return new Promise(function(resolve, reject) {
- let observerFired = 0;
-
- function observer(subject, topic, data) {
- Services.obs.removeObserver(observer, "document-element-inserted");
- observerFired++;
- }
- Services.obs.addObserver(observer, "document-element-inserted", false);
-
- let count = 0;
- const url = baseURL + "browser_addonShims_testpage.html";
- let tab = gBrowser.addTab(url);
- let browser = tab.linkedBrowser;
- browser.addEventListener("load", function handler() {
- count++;
- if (count == 1) {
- browser.reload();
- } else {
- browser.removeEventListener("load", handler);
-
- is(observerFired, 1, "got observer notification");
-
- removeTab(tab, resolve);
- }
- }, true);
- });
-}
-
-// Test for bug 1072472. Make sure that creating a sandbox to run code
-// in the content window works. This is essentially a test for
-// Greasemonkey.
-function testSandbox()
-{
- return new Promise(function(resolve, reject) {
- const url = baseURL + "browser_addonShims_testpage.html";
- let tab = gBrowser.addTab(url);
- let browser = tab.linkedBrowser;
- browser.addEventListener("load", function handler() {
- browser.removeEventListener("load", handler);
-
- let sandbox = Cu.Sandbox(browser.contentWindow,
- {sandboxPrototype: browser.contentWindow,
- wantXrays: false});
- Cu.evalInSandbox("const unsafeWindow = window;", sandbox);
- Cu.evalInSandbox("document.getElementById('output').innerHTML = 'hello';", sandbox);
-
- is(browser.contentDocument.getElementById("output").innerHTML, "hello",
- "sandbox code ran successfully");
-
- // Now try a sandbox with expanded principals.
- sandbox = Cu.Sandbox([browser.contentWindow],
- {sandboxPrototype: browser.contentWindow,
- wantXrays: false});
- Cu.evalInSandbox("const unsafeWindow = window;", sandbox);
- Cu.evalInSandbox("document.getElementById('output').innerHTML = 'hello2';", sandbox);
-
- is(browser.contentDocument.getElementById("output").innerHTML, "hello2",
- "EP sandbox code ran successfully");
-
- removeTab(tab, resolve);
- }, true);
- });
-}
-
-// Test for bug 1095305. We just want to make sure that loading some
-// unprivileged content from an add-on package doesn't crash.
-function testAddonContent()
-{
- let chromeRegistry = Components.classes["@mozilla.org/chrome/chrome-registry;1"]
- .getService(Components.interfaces.nsIChromeRegistry);
- let base = chromeRegistry.convertChromeURL(BrowserUtils.makeURI("chrome://addonshim1/content/"));
-
- let res = Services.io.getProtocolHandler("resource")
- .QueryInterface(Ci.nsIResProtocolHandler);
- res.setSubstitution("addonshim1", base);
-
- return new Promise(function(resolve, reject) {
- const url = "resource://addonshim1/page.html";
- let tab = gBrowser.addTab(url);
- let browser = tab.linkedBrowser;
- addLoadListener(browser, function handler() {
- res.setSubstitution("addonshim1", null);
- removeTab(tab, resolve);
- });
- });
-}
-
-
-// Test for bug 1102410. We check that multiple nsIAboutModule's can be
-// registered in the parent, and that the child can browse to each of
-// the registered about: pages.
-function testAboutModuleRegistration()
-{
- let Registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
-
- let modulesToUnregister = new Map();
-
- function TestChannel(uri, aLoadInfo, aboutName) {
- this.aboutName = aboutName;
- this.loadInfo = aLoadInfo;
- this.URI = this.originalURI = uri;
- }
-
- TestChannel.prototype = {
- asyncOpen: function(listener, context) {
- let stream = this.open();
- let runnable = {
- run: () => {
- try {
- listener.onStartRequest(this, context);
- } catch (e) {}
- try {
- listener.onDataAvailable(this, context, stream, 0, stream.available());
- } catch (e) {}
- try {
- listener.onStopRequest(this, context, Cr.NS_OK);
- } catch (e) {}
- }
- };
- Services.tm.currentThread.dispatch(runnable, Ci.nsIEventTarget.DISPATCH_NORMAL);
- },
-
- asyncOpen2: function(listener) {
- // throws an error if security checks fail
- var outListener = contentSecManager.performSecurityCheck(this, listener);
- return this.asyncOpen(outListener, null);
- },
-
- open: function() {
- function getWindow(channel) {
- try
- {
- if (channel.notificationCallbacks)
- return channel.notificationCallbacks.getInterface(Ci.nsILoadContext).associatedWindow;
- } catch (e) {}
-
- try
- {
- if (channel.loadGroup && channel.loadGroup.notificationCallbacks)
- return channel.loadGroup.notificationCallbacks.getInterface(Ci.nsILoadContext).associatedWindow;
- } catch (e) {}
-
- return null;
- }
-
- let data = `<html><h1>${this.aboutName}</h1></html>`;
- let wnd = getWindow(this);
- if (!wnd)
- throw Cr.NS_ERROR_UNEXPECTED;
-
- let stream = Cc["@mozilla.org/io/string-input-stream;1"].createInstance(Ci.nsIStringInputStream);
- stream.setData(data, data.length);
- return stream;
- },
-
- open2: function() {
- // throws an error if security checks fail
- contentSecManager.performSecurityCheck(this, null);
- return this.open();
- },
-
- isPending: function() {
- return false;
- },
- cancel: function() {
- throw Cr.NS_ERROR_NOT_IMPLEMENTED;
- },
- suspend: function() {
- throw Cr.NS_ERROR_NOT_IMPLEMENTED;
- },
- resume: function() {
- throw Cr.NS_ERROR_NOT_IMPLEMENTED;
- },
-
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIChannel, Ci.nsIRequest])
- };
-
- /**
- * This function creates a new nsIAboutModule and registers it. Callers
- * should also call unregisterModules after using this function to clean
- * up the nsIAboutModules at the end of this test.
- *
- * @param aboutName
- * This will be the string after about: used to refer to this module.
- * For example, if aboutName is foo, you can refer to this module by
- * browsing to about:foo.
- *
- * @param uuid
- * A unique identifer string for this module. For example,
- * "5f3a921b-250f-4ac5-a61c-8f79372e6063"
- */
- let createAndRegisterAboutModule = function(aboutName, uuid) {
-
- let AboutModule = function() {};
-
- AboutModule.prototype = {
- classID: Components.ID(uuid),
- classDescription: `Testing About Module for about:${aboutName}`,
- contractID: `@mozilla.org/network/protocol/about;1?what=${aboutName}`,
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
-
- newChannel: (aURI, aLoadInfo) => {
- return new TestChannel(aURI, aLoadInfo, aboutName);
- },
-
- getURIFlags: (aURI) => {
- return Ci.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT |
- Ci.nsIAboutModule.ALLOW_SCRIPT;
- },
- };
-
- let factory = {
- createInstance: function(outer, iid) {
- if (outer) {
- throw Cr.NS_ERROR_NO_AGGREGATION;
- }
- return new AboutModule();
- },
- };
-
- Registrar.registerFactory(AboutModule.prototype.classID,
- AboutModule.prototype.classDescription,
- AboutModule.prototype.contractID,
- factory);
-
- modulesToUnregister.set(AboutModule.prototype.classID,
- factory);
- };
-
- /**
- * Unregisters any nsIAboutModules registered with
- * createAndRegisterAboutModule.
- */
- let unregisterModules = () => {
- for (let [classID, factory] of modulesToUnregister) {
- Registrar.unregisterFactory(classID, factory);
- }
- };
-
- /**
- * Takes a browser, and sends it a framescript to attempt to
- * load some about: pages. The frame script will send a test:result
- * message on completion, passing back a data object with:
- *
- * {
- * pass: true
- * }
- *
- * on success, and:
- *
- * {
- * pass: false,
- * errorMsg: message,
- * }
- *
- * on failure.
- *
- * @param browser
- * The browser to send the framescript to.
- */
- let testAboutModulesWork = (browser) => {
- let testConnection = () => {
- let request = new content.XMLHttpRequest();
- try {
- request.open("GET", "about:test1", false);
- request.send(null);
- if (request.status != 200) {
- throw (`about:test1 response had status ${request.status} - expected 200`);
- }
- if (request.responseText.indexOf("test1") == -1) {
- throw (`about:test1 response had result ${request.responseText}`);
- }
-
- request = new content.XMLHttpRequest();
- request.open("GET", "about:test2", false);
- request.send(null);
-
- if (request.status != 200) {
- throw (`about:test2 response had status ${request.status} - expected 200`);
- }
- if (request.responseText.indexOf("test2") == -1) {
- throw (`about:test2 response had result ${request.responseText}`);
- }
-
- sendAsyncMessage("test:result", {
- pass: true,
- });
- } catch (e) {
- sendAsyncMessage("test:result", {
- pass: false,
- errorMsg: e.toString(),
- });
- }
- };
-
- return new Promise((resolve, reject) => {
- let mm = browser.messageManager;
- mm.addMessageListener("test:result", function onTestResult(message) {
- mm.removeMessageListener("test:result", onTestResult);
- if (message.data.pass) {
- ok(true, "Connections to about: pages were successful");
- } else {
- ok(false, message.data.errorMsg);
- }
- resolve();
- });
- mm.loadFrameScript("data:,(" + testConnection.toString() + ")();", false);
- });
- }
-
- // Here's where the actual test is performed.
- return new Promise((resolve, reject) => {
- createAndRegisterAboutModule("test1", "5f3a921b-250f-4ac5-a61c-8f79372e6063");
- createAndRegisterAboutModule("test2", "d7ec0389-1d49-40fa-b55c-a1fc3a6dbf6f");
-
- // This needs to be a chrome-privileged page that loads in the
- // content process. It needs chrome privs because otherwise the
- // XHRs for about:test[12] will fail with a privilege error
- // despite the presence of URI_SAFE_FOR_UNTRUSTED_CONTENT.
- let newTab = gBrowser.addTab("chrome://addonshim1/content/page.html");
- gBrowser.selectedTab = newTab;
- let browser = newTab.linkedBrowser;
-
- addLoadListener(browser, function() {
- testAboutModulesWork(browser).then(() => {
- unregisterModules();
- removeTab(newTab, resolve);
- });
- });
- });
-}
-
-function testProgressListener()
-{
- const url = baseURL + "browser_addonShims_testpage.html";
-
- let sawGlobalLocChange = false;
- let sawTabsLocChange = false;
-
- let globalListener = {
- onLocationChange: function(webProgress, request, uri) {
- if (uri.spec == url) {
- sawGlobalLocChange = true;
- ok(request instanceof Ci.nsIHttpChannel, "Global listener channel is an HTTP channel");
- }
- },
- };
-
- let tabsListener = {
- onLocationChange: function(browser, webProgress, request, uri) {
- if (uri.spec == url) {
- sawTabsLocChange = true;
- ok(request instanceof Ci.nsIHttpChannel, "Tab listener channel is an HTTP channel");
- }
- },
- };
-
- gBrowser.addProgressListener(globalListener);
- gBrowser.addTabsProgressListener(tabsListener);
- info("Added progress listeners");
-
- return new Promise(function(resolve, reject) {
- let tab = gBrowser.addTab(url);
- gBrowser.selectedTab = tab;
- addLoadListener(tab.linkedBrowser, function handler() {
- ok(sawGlobalLocChange, "Saw global onLocationChange");
- ok(sawTabsLocChange, "Saw tabs onLocationChange");
-
- gBrowser.removeProgressListener(globalListener);
- gBrowser.removeTabsProgressListener(tabsListener);
- removeTab(tab, resolve);
- });
- });
-}
-
-function testRootTreeItem()
-{
- return new Promise(function(resolve, reject) {
- const url = baseURL + "browser_addonShims_testpage.html";
- let tab = gBrowser.addTab(url);
- gBrowser.selectedTab = tab;
- let browser = tab.linkedBrowser;
- addLoadListener(browser, function handler() {
- let win = browser.contentWindow;
-
- // Add-ons love this crap.
- let root = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
- .getInterface(Components.interfaces.nsIWebNavigation)
- .QueryInterface(Components.interfaces.nsIDocShellTreeItem)
- .rootTreeItem
- .QueryInterface(Components.interfaces.nsIInterfaceRequestor)
- .getInterface(Components.interfaces.nsIDOMWindow);
- is(root, gWin, "got correct chrome window");
-
- removeTab(tab, resolve);
- });
- });
-}
-
-function testImportNode()
-{
- return new Promise(function(resolve, reject) {
- const url = baseURL + "browser_addonShims_testpage.html";
- let tab = gBrowser.addTab(url);
- gBrowser.selectedTab = tab;
- let browser = tab.linkedBrowser;
- addLoadListener(browser, function handler() {
- let node = gWin.document.createElement("div");
- let doc = browser.contentDocument;
- let result;
- try {
- result = doc.importNode(node, false);
- } catch (e) {
- ok(false, "importing threw an exception");
- }
- if (browser.isRemoteBrowser) {
- is(result, node, "got expected import result");
- }
-
- removeTab(tab, resolve);
- });
- });
-}
-
-function runTests(win, funcs)
-{
- ok = funcs.ok;
- is = funcs.is;
- info = funcs.info;
-
- gWin = win;
- gBrowser = win.gBrowser;
-
- return testContentWindow().
- then(testListeners).
- then(testCapturing).
- then(testObserver).
- then(testSandbox).
- then(testAddonContent).
- then(testAboutModuleRegistration).
- then(testProgressListener).
- then(testRootTreeItem).
- then(testImportNode).
- then(Promise.resolve());
-}
-
-/*
- bootstrap.js API
-*/
-
-function startup(aData, aReason)
-{
- forEachWindow(win => {
- win.runAddonShimTests = (funcs) => runTests(win, funcs);
- });
-}
-
-function shutdown(aData, aReason)
-{
- forEachWindow(win => {
- delete win.runAddonShimTests;
- });
-}
-
-function install(aData, aReason)
-{
-}
-
-function uninstall(aData, aReason)
-{
-}
-
diff --git a/toolkit/components/addoncompat/tests/addon/chrome.manifest b/toolkit/components/addoncompat/tests/addon/chrome.manifest
deleted file mode 100644
index 602ba3a5dc..0000000000
--- a/toolkit/components/addoncompat/tests/addon/chrome.manifest
+++ /dev/null
@@ -1 +0,0 @@
-content addonshim1 content/
diff --git a/toolkit/components/addoncompat/tests/addon/content/page.html b/toolkit/components/addoncompat/tests/addon/content/page.html
deleted file mode 100644
index 90531a4b3e..0000000000
--- a/toolkit/components/addoncompat/tests/addon/content/page.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<html>
-</html>
diff --git a/toolkit/components/addoncompat/tests/addon/install.rdf b/toolkit/components/addoncompat/tests/addon/install.rdf
deleted file mode 100644
index d59c7b19d1..0000000000
--- a/toolkit/components/addoncompat/tests/addon/install.rdf
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-
- <Description about="urn:mozilla:install-manifest">
- <em:id>test-addon-shim-1@tests.mozilla.org</em:id>
- <em:version>1</em:version>
- <em:type>2</em:type>
- <em:bootstrap>true</em:bootstrap>
-
- <!-- Front End MetaData -->
- <em:name>Test addon shim 1</em:name>
- <em:description>Test an add-on that needs multiprocess shims.</em:description>
- <em:multiprocessCompatible>false</em:multiprocessCompatible>
-
- <em:iconURL>chrome://foo/skin/icon.png</em:iconURL>
- <em:aboutURL>chrome://foo/content/about.xul</em:aboutURL>
- <em:optionsURL>chrome://foo/content/options.xul</em:optionsURL>
-
- <em:targetApplication>
- <Description>
- <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
- <em:minVersion>0.3</em:minVersion>
- <em:maxVersion>*</em:maxVersion>
- </Description>
- </em:targetApplication>
-
- <em:targetApplication>
- <Description>
- <em:id>toolkit@mozilla.org</em:id>
- <em:minVersion>10.0</em:minVersion>
- <em:maxVersion>*</em:maxVersion>
- </Description>
- </em:targetApplication>
- </Description>
-</RDF>
diff --git a/toolkit/components/addoncompat/tests/browser/.eslintrc.js b/toolkit/components/addoncompat/tests/browser/.eslintrc.js
deleted file mode 100644
index 7c80211924..0000000000
--- a/toolkit/components/addoncompat/tests/browser/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/mochitest/browser.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/addoncompat/tests/browser/addon.xpi b/toolkit/components/addoncompat/tests/browser/addon.xpi
deleted file mode 100644
index e6392fb40a..0000000000
--- a/toolkit/components/addoncompat/tests/browser/addon.xpi
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/addoncompat/tests/browser/browser.ini b/toolkit/components/addoncompat/tests/browser/browser.ini
deleted file mode 100644
index 7c85475625..0000000000
--- a/toolkit/components/addoncompat/tests/browser/browser.ini
+++ /dev/null
@@ -1,9 +0,0 @@
-[DEFAULT]
-tags = addons
-support-files =
- addon.xpi
- browser_addonShims_testpage.html
- browser_addonShims_testpage2.html
- compat-addon.xpi
-
-[browser_addonShims.js]
diff --git a/toolkit/components/addoncompat/tests/browser/browser_addonShims.js b/toolkit/components/addoncompat/tests/browser/browser_addonShims.js
deleted file mode 100644
index b642eb3cb0..0000000000
--- a/toolkit/components/addoncompat/tests/browser/browser_addonShims.js
+++ /dev/null
@@ -1,67 +0,0 @@
-var {AddonManager} = Cu.import("resource://gre/modules/AddonManager.jsm", {});
-var {Services} = Cu.import("resource://gre/modules/Services.jsm", {});
-
-const ADDON_URL = "http://example.com/browser/toolkit/components/addoncompat/tests/browser/addon.xpi";
-const COMPAT_ADDON_URL = "http://example.com/browser/toolkit/components/addoncompat/tests/browser/compat-addon.xpi";
-
-// Install a test add-on that will exercise e10s shims.
-// url: Location of the add-on.
-function addAddon(url)
-{
- info("Installing add-on: " + url);
-
- return new Promise(function(resolve, reject) {
- AddonManager.getInstallForURL(url, installer => {
- installer.install();
- let listener = {
- onInstallEnded: function(addon, addonInstall) {
- installer.removeListener(listener);
-
- // Wait for add-on's startup scripts to execute. See bug 997408
- executeSoon(function() {
- resolve(addonInstall);
- });
- }
- };
- installer.addListener(listener);
- }, "application/x-xpinstall");
- });
-}
-
-// Uninstall a test add-on.
-// addon: The addon reference returned from addAddon.
-function removeAddon(addon)
-{
- info("Removing addon.");
-
- return new Promise(function(resolve, reject) {
- let listener = {
- onUninstalled: function(uninstalledAddon) {
- if (uninstalledAddon != addon) {
- return;
- }
- AddonManager.removeAddonListener(listener);
- resolve();
- }
- };
- AddonManager.addAddonListener(listener);
- addon.uninstall();
- });
-}
-
-add_task(function* test_addon_shims() {
- yield new Promise(resolve => {
- SpecialPowers.pushPrefEnv({set: [["dom.ipc.shims.enabledWarnings", true]]},
- resolve);
- });
-
- let addon = yield addAddon(ADDON_URL);
- yield window.runAddonShimTests({ok: ok, is: is, info: info});
- yield removeAddon(addon);
-
- if (Services.appinfo.browserTabsRemoteAutostart) {
- addon = yield addAddon(COMPAT_ADDON_URL);
- yield window.runAddonTests({ok: ok, is: is, info: info});
- yield removeAddon(addon);
- }
-});
diff --git a/toolkit/components/addoncompat/tests/browser/browser_addonShims_testpage.html b/toolkit/components/addoncompat/tests/browser/browser_addonShims_testpage.html
deleted file mode 100644
index 5a8b34e888..0000000000
--- a/toolkit/components/addoncompat/tests/browser/browser_addonShims_testpage.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<html>
-<head>
- <meta charset="utf-8">
- <title>shim test</title>
-</head>
-
-<body>
-Hello!
-
-<a href="browser_addonShims_testpage2.html" id="link">Link</a>
-<div id="output"></div>
-
-<script type="text/javascript">
-var global = 3;
-</script>
-</body>
-</html>
diff --git a/toolkit/components/addoncompat/tests/browser/browser_addonShims_testpage2.html b/toolkit/components/addoncompat/tests/browser/browser_addonShims_testpage2.html
deleted file mode 100644
index f644b1129c..0000000000
--- a/toolkit/components/addoncompat/tests/browser/browser_addonShims_testpage2.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<html>
-<head>
- <meta charset="utf-8">
- <title>shim test</title>
-</head>
-
-<body>
-Hello!
-
-<a href="browser_addonShims_testpage.html" id="link">Link</a>
-
-<script type="text/javascript">
-var global = 5;
-</script>
-</body>
-</html>
diff --git a/toolkit/components/addoncompat/tests/browser/compat-addon.xpi b/toolkit/components/addoncompat/tests/browser/compat-addon.xpi
deleted file mode 100644
index c7ca32cdc6..0000000000
--- a/toolkit/components/addoncompat/tests/browser/compat-addon.xpi
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/addoncompat/tests/compat-addon/bootstrap.js b/toolkit/components/addoncompat/tests/compat-addon/bootstrap.js
deleted file mode 100644
index 7c93bad089..0000000000
--- a/toolkit/components/addoncompat/tests/compat-addon/bootstrap.js
+++ /dev/null
@@ -1,99 +0,0 @@
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-var Cr = Components.results;
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/BrowserUtils.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-const baseURL = "http://mochi.test:8888/browser/" +
- "toolkit/components/addoncompat/tests/browser/";
-
-function forEachWindow(f)
-{
- let wins = Services.wm.getEnumerator("navigator:browser");
- while (wins.hasMoreElements()) {
- let win = wins.getNext();
- f(win);
- }
-}
-
-function addLoadListener(target, listener)
-{
- function frameScript() {
- addEventListener("load", function handler(event) {
- removeEventListener("load", handler, true);
- sendAsyncMessage("compat-test:loaded");
- }, true);
- }
- target.messageManager.loadFrameScript("data:,(" + frameScript.toString() + ")()", false);
- target.messageManager.addMessageListener("compat-test:loaded", function handler() {
- target.messageManager.removeMessageListener("compat-test:loaded", handler);
- listener();
- });
-}
-
-var gWin;
-var gBrowser;
-var ok, is, info;
-
-// Make sure that the shims for window.content, browser.contentWindow,
-// and browser.contentDocument are working.
-function testContentWindow()
-{
- return new Promise(function(resolve, reject) {
- const url = baseURL + "browser_addonShims_testpage.html";
- let tab = gBrowser.addTab("about:blank");
- gBrowser.selectedTab = tab;
- let browser = tab.linkedBrowser;
- addLoadListener(browser, function handler() {
- ok(!gWin.content, "content is defined on chrome window");
- ok(!browser.contentWindow, "contentWindow is defined");
- ok(!browser.contentDocument, "contentWindow is defined");
-
- gBrowser.removeTab(tab);
- resolve();
- });
- browser.loadURI(url);
- });
-}
-
-function runTests(win, funcs)
-{
- ok = funcs.ok;
- is = funcs.is;
- info = funcs.info;
-
- gWin = win;
- gBrowser = win.gBrowser;
-
- return testContentWindow();
-}
-
-/*
- bootstrap.js API
-*/
-
-function startup(aData, aReason)
-{
- forEachWindow(win => {
- win.runAddonTests = (funcs) => runTests(win, funcs);
- });
-}
-
-function shutdown(aData, aReason)
-{
- forEachWindow(win => {
- delete win.runAddonTests;
- });
-}
-
-function install(aData, aReason)
-{
-}
-
-function uninstall(aData, aReason)
-{
-}
-
diff --git a/toolkit/components/addoncompat/tests/compat-addon/install.rdf b/toolkit/components/addoncompat/tests/compat-addon/install.rdf
deleted file mode 100644
index 331fd1540b..0000000000
--- a/toolkit/components/addoncompat/tests/compat-addon/install.rdf
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-
- <Description about="urn:mozilla:install-manifest">
- <em:id>test-addon-shim-2@tests.mozilla.org</em:id>
- <em:version>1</em:version>
- <em:type>2</em:type>
- <em:bootstrap>true</em:bootstrap>
-
- <!-- Front End MetaData -->
- <em:name>Test addon shims 2</em:name>
- <em:description>Test an add-on that doesn't need multiprocess shims.</em:description>
- <em:multiprocessCompatible>true</em:multiprocessCompatible>
-
- <em:iconURL>chrome://foo/skin/icon.png</em:iconURL>
- <em:aboutURL>chrome://foo/content/about.xul</em:aboutURL>
- <em:optionsURL>chrome://foo/content/options.xul</em:optionsURL>
-
- <em:targetApplication>
- <Description>
- <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
- <em:minVersion>0.3</em:minVersion>
- <em:maxVersion>*</em:maxVersion>
- </Description>
- </em:targetApplication>
-
- <em:targetApplication>
- <Description>
- <em:id>toolkit@mozilla.org</em:id>
- <em:minVersion>10.0</em:minVersion>
- <em:maxVersion>*</em:maxVersion>
- </Description>
- </em:targetApplication>
- </Description>
-</RDF>
diff --git a/toolkit/components/addoncompat/tests/moz.build b/toolkit/components/addoncompat/tests/moz.build
deleted file mode 100644
index 589eaa8127..0000000000
--- a/toolkit/components/addoncompat/tests/moz.build
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-BROWSER_CHROME_MANIFESTS += ['browser/browser.ini']
diff --git a/toolkit/components/alerts/moz.build b/toolkit/components/alerts/moz.build
index cdbf92511e..8d42a8ce72 100644
--- a/toolkit/components/alerts/moz.build
+++ b/toolkit/components/alerts/moz.build
@@ -4,17 +4,13 @@
# 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/.
-MOCHITEST_MANIFESTS += ['test/mochitest.ini']
-
XPIDL_SOURCES += [
'nsIAlertsService.idl',
]
XPIDL_MODULE = 'alerts'
-EXPORTS += [
- 'nsAlertsUtils.h',
-]
+EXPORTS += ['nsAlertsUtils.h']
EXPORTS.mozilla += [
'AlertNotification.h',
@@ -33,6 +29,3 @@ include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
JAR_MANIFESTS += ['jar.mn']
-
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'Notifications and Alerts')
diff --git a/toolkit/components/alerts/nsAlertsService.cpp b/toolkit/components/alerts/nsAlertsService.cpp
index 73dbb265c9..4f248c8610 100644
--- a/toolkit/components/alerts/nsAlertsService.cpp
+++ b/toolkit/components/alerts/nsAlertsService.cpp
@@ -273,26 +273,18 @@ NS_IMETHODIMP nsAlertsService::CloseAlert(const nsAString& aAlertName,
// nsIAlertsDoNotDisturb
NS_IMETHODIMP nsAlertsService::GetManualDoNotDisturb(bool* aRetVal)
{
-#ifdef MOZ_WIDGET_ANDROID
- return NS_ERROR_NOT_IMPLEMENTED;
-#else
nsCOMPtr<nsIAlertsDoNotDisturb> alertsDND(GetDNDBackend());
NS_ENSURE_TRUE(alertsDND, NS_ERROR_NOT_IMPLEMENTED);
return alertsDND->GetManualDoNotDisturb(aRetVal);
-#endif
}
NS_IMETHODIMP nsAlertsService::SetManualDoNotDisturb(bool aDoNotDisturb)
{
-#ifdef MOZ_WIDGET_ANDROID
- return NS_ERROR_NOT_IMPLEMENTED;
-#else
nsCOMPtr<nsIAlertsDoNotDisturb> alertsDND(GetDNDBackend());
NS_ENSURE_TRUE(alertsDND, NS_ERROR_NOT_IMPLEMENTED);
nsresult rv = alertsDND->SetManualDoNotDisturb(aDoNotDisturb);
return rv;
-#endif
}
already_AddRefed<nsIAlertsDoNotDisturb>
diff --git a/toolkit/components/alerts/nsXULAlerts.cpp b/toolkit/components/alerts/nsXULAlerts.cpp
index d353d87140..47e72a27f3 100644
--- a/toolkit/components/alerts/nsXULAlerts.cpp
+++ b/toolkit/components/alerts/nsXULAlerts.cpp
@@ -66,13 +66,10 @@ NS_IMPL_ISUPPORTS(nsXULAlerts, nsIAlertsService, nsIAlertsDoNotDisturb, nsIAlert
/* static */ already_AddRefed<nsXULAlerts>
nsXULAlerts::GetInstance()
{
- // Gecko on Android does not fully support XUL windows.
-#ifndef MOZ_WIDGET_ANDROID
if (!gXULAlerts) {
gXULAlerts = new nsXULAlerts();
ClearOnShutdown(&gXULAlerts);
}
-#endif // MOZ_WIDGET_ANDROID
RefPtr<nsXULAlerts> instance = gXULAlerts.get();
return instance.forget();
}
diff --git a/toolkit/components/alerts/test/.eslintrc.js b/toolkit/components/alerts/test/.eslintrc.js
deleted file mode 100644
index 3c788d6d68..0000000000
--- a/toolkit/components/alerts/test/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../testing/mochitest/mochitest.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/alerts/test/image.gif b/toolkit/components/alerts/test/image.gif
deleted file mode 100644
index 053b4d9261..0000000000
--- a/toolkit/components/alerts/test/image.gif
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/alerts/test/image.png b/toolkit/components/alerts/test/image.png
deleted file mode 100644
index 430c3c5e65..0000000000
--- a/toolkit/components/alerts/test/image.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/alerts/test/image_server.sjs b/toolkit/components/alerts/test/image_server.sjs
deleted file mode 100644
index 6220529439..0000000000
--- a/toolkit/components/alerts/test/image_server.sjs
+++ /dev/null
@@ -1,82 +0,0 @@
-const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr, Constructor: CC } = Components;
-
-Cu.import("resource://gre/modules/Timer.jsm");
-
-const LocalFile = CC("@mozilla.org/file/local;1", "nsILocalFile",
- "initWithPath");
-
-const FileInputStream = CC("@mozilla.org/network/file-input-stream;1",
- "nsIFileInputStream", "init");
-
-const BinaryInputStream = CC("@mozilla.org/binaryinputstream;1",
- "nsIBinaryInputStream", "setInputStream");
-
-function handleRequest(request, response) {
- let params = parseQueryString(request.queryString);
-
- response.setStatusLine(request.httpVersion, 200, "OK");
-
- // Compare and increment a cookie for this request. This is used to test
- // private browsing mode; the cookie should not be set if the image is
- // loaded anonymously.
- if (params.has("c")) {
- let expectedValue = parseInt(params.get("c"), 10);
- let actualValue = !request.hasHeader("Cookie") ? 0 :
- parseInt(request.getHeader("Cookie")
- .replace(/^counter=(\d+)/, "$1"), 10);
- if (actualValue != expectedValue) {
- response.setStatusLine(request.httpVersion, 400, "Wrong counter value");
- return;
- }
- response.setHeader("Set-Cookie", `counter=${expectedValue + 1}`, false);
- }
-
- // Wait to send the image if a timeout is given.
- let timeout = parseInt(params.get("t"), 10);
- if (timeout > 0) {
- response.processAsync();
- setTimeout(() => {
- respond(params, request, response);
- response.finish();
- }, timeout * 1000);
- return;
- }
-
- respond(params, request, response);
-}
-
-function parseQueryString(queryString) {
- return queryString.split("&").reduce((params, param) => {
- let [key, value] = param.split("=", 2);
- params.set(key, value);
- return params;
- }, new Map());
-}
-
-function respond(params, request, response) {
- if (params.has("s")) {
- let statusCode = parseInt(params.get("s"), 10);
- response.setStatusLine(request.httpVersion, statusCode, "Custom status");
- return;
- }
- var filename = params.get("f");
- writeFile(filename, response);
-}
-
-function writeFile(name, response) {
- var file = new LocalFile(getState("__LOCATION__")).parent;
- file.append(name);
-
- let mimeType = Cc["@mozilla.org/uriloader/external-helper-app-service;1"]
- .getService(Ci.nsIMIMEService)
- .getTypeFromFile(file);
-
- let fileStream = new FileInputStream(file, 1, 0, false);
- let binaryStream = new BinaryInputStream(fileStream);
-
- response.setHeader("Content-Type", mimeType, false);
- response.bodyOutputStream.writeFrom(binaryStream, binaryStream.available());
-
- binaryStream.close();
- fileStream.close();
-}
diff --git a/toolkit/components/alerts/test/mochitest.ini b/toolkit/components/alerts/test/mochitest.ini
deleted file mode 100644
index 12e2a87040..0000000000
--- a/toolkit/components/alerts/test/mochitest.ini
+++ /dev/null
@@ -1,16 +0,0 @@
-[DEFAULT]
-support-files =
- image.gif
- image.png
- image_server.sjs
-
-# Synchronous tests like test_alerts.html must come before
-# asynchronous tests like test_alerts_noobserve.html!
-[test_alerts.html]
-skip-if = toolkit == 'android'
-[test_alerts_noobserve.html]
-[test_alerts_requireinteraction.html]
-[test_image.html]
-[test_multiple_alerts.html]
-[test_principal.html]
-skip-if = toolkit == 'android'
diff --git a/toolkit/components/alerts/test/test_alerts.html b/toolkit/components/alerts/test/test_alerts.html
deleted file mode 100644
index cb087e48ac..0000000000
--- a/toolkit/components/alerts/test/test_alerts.html
+++ /dev/null
@@ -1,89 +0,0 @@
-<!DOCTYPE HTML>
-<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
-<html>
-<head>
- <title>Test for Alerts Service</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-
-<body>
-<p id="display"></p>
-
-<br>Alerts service, with observer "synchronous" case.
-<br>
-<br>Did a notification appear anywhere?
-<br>If so, the test will finish once the notification disappears.
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-var observer = {
- alertShow: false,
- observe: function (aSubject, aTopic, aData) {
- is(aData, "foobarcookie", "Checking whether the alert cookie was passed correctly");
- if (aTopic == "alertclickcallback") {
- todo(false, "Did someone click the notification while running mochitests? (Please don't.)");
- } else if (aTopic == "alertshow") {
- ok(!this.alertShow, "Alert should not be shown more than once");
- this.alertShow = true;
- } else {
- is(aTopic, "alertfinished", "Checking the topic for a finished notification");
- SimpleTest.finish();
- }
- }
-};
-
-function runTest() {
- const Cc = SpecialPowers.Cc;
- const Ci = SpecialPowers.Ci;
-
- if (!("@mozilla.org/alerts-service;1" in Cc)) {
- todo(false, "Alerts service does not exist in this application");
- return;
- }
-
- ok(true, "Alerts service exists in this application");
-
- var notifier;
- try {
- notifier = Cc["@mozilla.org/alerts-service;1"].
- getService(Ci.nsIAlertsService);
- ok(true, "Alerts service is available");
- } catch (ex) {
- todo(false,
- "Alerts service is not available.", ex);
- return;
- }
-
- try {
- var alertName = "fiorello";
- SimpleTest.waitForExplicitFinish();
- notifier.showAlertNotification(null, "Notification test",
- "Surprise! I'm here to test notifications!",
- false, "foobarcookie", observer, alertName);
- ok(true, "showAlertNotification() succeeded. Waiting for notification...");
-
- if ("@mozilla.org/system-alerts-service;1" in Cc) {
- // Notifications are native on OS X 10.8 and later, as well as GNOME
- // Shell with libnotify (bug 1236036). These notifications persist in the
- // Notification Center, and only fire the `alertfinished` event when
- // closed. For platforms where native notifications may be used, we need
- // to close explicitly to avoid a hang. This also works for XUL
- // notifications when running this test on OS X < 10.8, or a window
- // manager like Ubuntu Unity with incomplete libnotify support.
- notifier.closeAlert(alertName);
- }
- } catch (ex) {
- todo(false, "showAlertNotification() failed.", ex);
- SimpleTest.finish();
- }
-}
-
-runTest();
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/alerts/test/test_alerts_noobserve.html b/toolkit/components/alerts/test/test_alerts_noobserve.html
deleted file mode 100644
index 0cc452b8af..0000000000
--- a/toolkit/components/alerts/test/test_alerts_noobserve.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<!DOCTYPE HTML>
-<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
-<html>
-<head>
- <title>Test for Alerts Service</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-
-<body>
-<p id="display"></p>
-
-<br>Alerts service, without observer "asynchronous" case.
-<br>
-<br>A notification should soon appear somewhere.
-<br>If there has been no crash when the notification (later) disappears, assume all is good.
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-const Cc = SpecialPowers.Cc;
-const Ci = SpecialPowers.Ci;
-
-const chromeScript = SpecialPowers.loadChromeScript(_ => {
- const { utils: Cu } = Components;
-
- Cu.import("resource://gre/modules/Services.jsm");
- Cu.import("resource://gre/modules/Timer.jsm");
-
- function anyXULAlertsVisible() {
- var windows = Services.wm.getEnumerator("alert:alert");
- return windows.hasMoreElements();
- }
-
- addMessageListener("anyXULAlertsVisible", anyXULAlertsVisible);
-
- addMessageListener("waitForAlerts", function waitForAlerts() {
- if (anyXULAlertsVisible()) {
- setTimeout(waitForAlerts, 1000);
- } else {
- sendAsyncMessage("waitedForAlerts");
- }
- });
-});
-
-function waitForAlertsThenFinish() {
- chromeScript.addMessageListener("waitedForAlerts", function waitedForAlerts() {
- chromeScript.removeMessageListener("waitedForAlerts", waitedForAlerts);
- ok(true, "Alert disappeared.");
- SimpleTest.finish();
- });
- chromeScript.sendAsyncMessage("waitForAlerts");
-}
-
-function runTest() {
- if (!("@mozilla.org/alerts-service;1" in Cc)) {
- todo(false, "Alerts service does not exist in this application");
- } else {
- ok(true, "Alerts service exists in this application");
-
- var notifier;
- try {
- notifier = Cc["@mozilla.org/alerts-service;1"].
- getService(Ci.nsIAlertsService);
- ok(true, "Alerts service is available");
- } catch (ex) {
- todo(false, "Alerts service is not available.", ex);
- }
-
- if (notifier) {
- try {
- notifier.showAlertNotification(null, "Notification test",
- "This notification has no observer");
- ok(true, "showAlertNotification() succeeded");
- } catch (ex) {
- todo(false, "showAlertNotification() failed.", ex);
- }
- }
- }
-}
-
-SimpleTest.waitForExplicitFinish();
-SimpleTest.requestFlakyTimeout("untriaged");
-
-// sendSyncMessage returns an array of arrays: the outer array is from the
-// message manager, and the inner array is from the chrome script's listeners.
-// See the comment in test_SpecialPowersLoadChromeScript.html.
-var [[alertsVisible]] = chromeScript.sendSyncMessage("anyXULAlertsVisible");
-ok(!alertsVisible, "Alerts should not be present at the start of the test.");
-runTest();
-setTimeout(waitForAlertsThenFinish, 1000);
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/alerts/test/test_alerts_requireinteraction.html b/toolkit/components/alerts/test/test_alerts_requireinteraction.html
deleted file mode 100644
index 26fe871046..0000000000
--- a/toolkit/components/alerts/test/test_alerts_requireinteraction.html
+++ /dev/null
@@ -1,168 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test for alerts with requireInteraction</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-const Cc = SpecialPowers.Cc;
-const Ci = SpecialPowers.Ci;
-
-const chromeScript = SpecialPowers.loadChromeScript(_ => {
- const { utils: Cu } = Components;
-
- Cu.import("resource://gre/modules/Services.jsm");
- Cu.import("resource://gre/modules/Timer.jsm");
-
- addMessageListener("waitForXULAlert", function() {
- var timer = setTimeout(function() {
- Services.ww.unregisterNotification(windowObserver);
- sendAsyncMessage("waitForXULAlert", false);
- }, 2000);
-
- var windowObserver = function(aSubject, aTopic, aData) {
- if (aTopic != "domwindowopened") {
- return;
- }
-
- var win = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
- win.addEventListener("load", function onLoad() {
- win.removeEventListener("load", onLoad);
- let windowType = win.document.documentElement.getAttribute("windowtype");
- if (windowType == "alert:alert") {
- clearTimeout(timer);
- Services.ww.unregisterNotification(windowObserver);
-
- sendAsyncMessage("waitForXULAlert", true);
- }
- });
- };
-
- Services.ww.registerNotification(windowObserver);
- });
-});
-
-var cookie = 0;
-function promiseCreateXULAlert(alertService, listener, name) {
- return new Promise(resolve => {
- chromeScript.addMessageListener("waitForXULAlert", function waitedForAlert(result) {
- chromeScript.removeMessageListener("waitForXULAlert", waitedForAlert);
- resolve(result);
- });
-
- chromeScript.sendAsyncMessage("waitForXULAlert");
- alertService.showAlertNotification(null, "title", "body",
- true, cookie++, listener, name, null, null, null,
- null, false, true);
- });
-}
-
-add_task(function* test_require_interaction() {
- if (!("@mozilla.org/alerts-service;1" in Cc)) {
- todo(false, "Alerts service does not exist in this application.");
- return;
- }
-
- ok(true, "Alerts service exists in this application.");
-
- var alertService;
- try {
- alertService = Cc["@mozilla.org/alerts-service;1"].getService(Ci.nsIAlertsService);
- ok(true, "Alerts service is available.");
- } catch (ex) {
- todo(false, "Alerts service is not available.");
- return;
- }
-
- yield SpecialPowers.pushPrefEnv({"set": [
- [ "dom.webnotifications.requireinteraction.enabled", true ],
- [ "dom.webnotifications.requireinteraction.count", 2 ]
- ]});
-
- var expectedSequence = [
- "first show",
- "second show",
- "second finished",
- "second replacement show",
- "third finished",
- "first finished",
- "third replacement show",
- "second replacement finished",
- "third replacement finished"
- ];
-
- var actualSequence = [];
-
- function createAlertListener(name, showCallback, finishCallback) {
- return (subject, topic, data) => {
- if (topic == "alertshow") {
- actualSequence.push(name + " show");
- if (showCallback) {
- showCallback();
- }
- } else if (topic == "alertfinished") {
- actualSequence.push(name + " finished");
- if (finishCallback) {
- finishCallback();
- }
- }
- }
- }
-
- var xulAlertCreated = yield promiseCreateXULAlert(alertService,
- createAlertListener("first"), "first");
- if (!xulAlertCreated) {
- ok(true, "Platform does not use XUL alerts.");
- alertService.closeAlert("first");
- return;
- }
-
- xulAlertCreated = yield promiseCreateXULAlert(alertService,
- createAlertListener("second"), "second");
- ok(xulAlertCreated, "Create XUL alert");
-
- // Replace second alert
- xulAlertCreated = yield promiseCreateXULAlert(alertService,
- createAlertListener("second replacement"), "second");
- ok(xulAlertCreated, "Create XUL alert");
-
- var testFinishResolve;
- var testFinishPromise = new Promise((resolve) => { testFinishResolve = resolve; });
-
- xulAlertCreated = yield promiseCreateXULAlert(alertService,
- createAlertListener("third"), "third"),
- ok(!xulAlertCreated, "XUL alert should not be visible");
-
- // Replace the not-yet-visible third alert.
- xulAlertCreated = yield promiseCreateXULAlert(alertService,
- createAlertListener("third replacement",
- function showCallback() {
- alertService.closeAlert("second");
- alertService.closeAlert("third");
- },
- function finishCallback() {
- // Check actual sequence of alert events compared to expected sequence.
- for (var i = 0; i < actualSequence.length; i++) {
- is(actualSequence[i], expectedSequence[i],
- "Alert callback at index " + i + " should be in expected order.");
- }
-
- testFinishResolve();
- }), "third");
-
- ok(!xulAlertCreated, "XUL alert should not be visible");
-
- alertService.closeAlert("first");
-
- yield testFinishPromise;
-});
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/alerts/test/test_image.html b/toolkit/components/alerts/test/test_image.html
deleted file mode 100644
index 7bf89fab22..0000000000
--- a/toolkit/components/alerts/test/test_image.html
+++ /dev/null
@@ -1,118 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test for Bug 1233086</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-
-<body>
-<p id="display"></p>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-const Cc = SpecialPowers.Cc;
-const Ci = SpecialPowers.Ci;
-const Services = SpecialPowers.Services;
-
-const imageServerURL = "http://mochi.test:8888/tests/toolkit/components/alerts/test/image_server.sjs";
-
-function makeAlert(...params) {
- var alert = Cc["@mozilla.org/alert-notification;1"]
- .createInstance(Ci.nsIAlertNotification);
- alert.init(...params);
- return alert;
-}
-
-function promiseImage(alert, timeout = 0, userData = null) {
- return new Promise(resolve => {
- var isDone = false;
- function done(value) {
- ok(!isDone, "Should call the image listener once");
- isDone = true;
- resolve(value);
- }
- alert.loadImage(timeout, SpecialPowers.wrapCallbackObject({
- onImageReady(aUserData, aRequest) {
- done([true, aRequest, aUserData]);
- },
- onImageMissing(aUserData) {
- done([false, aUserData]);
- },
- }), SpecialPowers.wrap(userData));
- });
-}
-
-add_task(function* testContext() {
- var inUserData = Cc["@mozilla.org/supports-PRInt64;1"]
- .createInstance(Ci.nsISupportsPRInt64);
- inUserData.data = 123;
-
- var alert = makeAlert(null, imageServerURL + "?f=image.png");
- var [ready, , userData] = yield promiseImage(alert, 0, inUserData);
- ok(ready, "Should load requested image");
- is(userData.QueryInterface(Ci.nsISupportsPRInt64).data, 123,
- "Should pass user data for loaded image");
-
- alert = makeAlert(null, imageServerURL + "?s=404");
- [ready, userData] = yield promiseImage(alert, 0, inUserData);
- ok(!ready, "Should not load missing image");
- is(userData.QueryInterface(Ci.nsISupportsPRInt64).data, 123,
- "Should pass user data for missing image");
-});
-
-add_task(function* testTimeout() {
- var alert = makeAlert(null, imageServerURL + "?f=image.png&t=3");
- var [ready] = yield promiseImage(alert, 1000);
- ok(!ready, "Should cancel request if timeout fires");
-
- [ready, request] = yield promiseImage(alert, 45000);
- ok(ready, "Should load image if request finishes before timeout");
-});
-
-add_task(function* testAnimatedGIF() {
- var alert = makeAlert(null, imageServerURL + "?f=image.gif");
- var [ready, request] = yield promiseImage(alert);
- ok(ready, "Should load first animated GIF frame");
- is(request.mimeType, "image/gif", "Should report correct GIF MIME type");
- is(request.image.width, 256, "GIF width should be 256px");
- is(request.image.height, 256, "GIF height should be 256px");
-});
-
-add_task(function* testCancel() {
- var alert = makeAlert(null, imageServerURL + "?f=image.gif&t=180");
- yield new Promise((resolve, reject) => {
- var request = alert.loadImage(0, SpecialPowers.wrapCallbackObject({
- onImageReady() {
- reject(new Error("Should not load cancelled request"));
- },
- onImageMissing() {
- resolve();
- },
- }), null);
- request.cancel(SpecialPowers.Cr.NS_BINDING_ABORTED);
- });
-});
-
-add_task(function* testMixedContent() {
- // Loading principal is HTTPS; image URL is HTTP.
- var origin = "https://mochi.test:8888";
- var principal = Services.scriptSecurityManager
- .createCodebasePrincipalFromOrigin(origin);
-
- var alert = makeAlert(null, imageServerURL + "?f=image.png",
- null, null, false, null, null, null,
- null, principal);
- var [ready, request] = yield promiseImage(alert);
- ok(ready, "Should load cross-protocol image");
- is(request.mimeType, "image/png", "Should report correct MIME type");
- is(request.image.width, 32, "Width should be 32px");
- is(request.image.height, 32, "Height should be 32px");
-});
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/alerts/test/test_multiple_alerts.html b/toolkit/components/alerts/test/test_multiple_alerts.html
deleted file mode 100644
index 9d939b63a0..0000000000
--- a/toolkit/components/alerts/test/test_multiple_alerts.html
+++ /dev/null
@@ -1,103 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test for multiple alerts</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-const Cc = SpecialPowers.Cc;
-const Ci = SpecialPowers.Ci;
-
-const chromeScript = SpecialPowers.loadChromeScript(_ => {
- Components.utils.import("resource://gre/modules/Services.jsm");
- Components.utils.import("resource://gre/modules/Timer.jsm");
-
- const alertService = Components.classes["@mozilla.org/alerts-service;1"]
- .getService(Components.interfaces.nsIAlertsService);
-
- addMessageListener("waitForPosition", function() {
- var timer = setTimeout(function() {
- Services.ww.unregisterNotification(windowObserver);
- sendAsyncMessage("waitedForPosition", null);
- }, 2000);
-
- var windowObserver = function(aSubject, aTopic, aData) {
- if (aTopic != "domwindowopened") {
- return;
- }
-
- // Alerts are implemented using XUL.
- clearTimeout(timer);
-
- Services.ww.unregisterNotification(windowObserver);
-
- var win = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
- win.addEventListener("pageshow", function onPageShow() {
- win.removeEventListener("pageshow", onPageShow, false);
-
- var x = win.screenX;
- var y = win.screenY;
-
- win.addEventListener("pagehide", function onPageHide() {
- win.removeEventListener("pagehide", onPageHide, false);
- sendAsyncMessage("waitedForPosition", { x, y });
- }, false);
-
- alertService.closeAlert();
- }, false);
- };
-
- Services.ww.registerNotification(windowObserver);
- });
-});
-
-function promiseAlertPosition(alertService) {
- return new Promise(resolve => {
- chromeScript.addMessageListener("waitedForPosition", function waitedForPosition(result) {
- chromeScript.removeMessageListener("waitedForPosition", waitedForPosition);
- resolve(result);
- });
- chromeScript.sendAsyncMessage("waitForPosition");
-
- alertService.showAlertNotification(null, "title", "body");
- ok(true, "Alert shown.");
- });
-}
-
-add_task(function* test_multiple_alerts() {
- if (!("@mozilla.org/alerts-service;1" in Cc)) {
- todo(false, "Alerts service does not exist in this application.");
- return;
- }
-
- ok(true, "Alerts service exists in this application.");
-
- var alertService;
- try {
- alertService = Cc["@mozilla.org/alerts-service;1"].getService(Ci.nsIAlertsService);
- ok(true, "Alerts service is available.");
- } catch (ex) {
- todo(false, "Alerts service is not available.");
- return;
- }
-
- var firstAlertPosition = yield promiseAlertPosition(alertService);
- if (!firstAlertPosition) {
- ok(true, "Platform does not use XUL alerts.");
- return;
- }
-
- var secondAlertPosition = yield promiseAlertPosition(alertService);
- is(secondAlertPosition.x, firstAlertPosition.x, "Second alert should be opened in the same position.");
- is(secondAlertPosition.y, firstAlertPosition.y, "Second alert should be opened in the same position.");
-});
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/alerts/test/test_principal.html b/toolkit/components/alerts/test/test_principal.html
deleted file mode 100644
index 74a20dbd70..0000000000
--- a/toolkit/components/alerts/test/test_principal.html
+++ /dev/null
@@ -1,122 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test for Bug 1202933</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-
-<body>
-<p id="display"></p>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-const Cc = SpecialPowers.Cc;
-const Ci = SpecialPowers.Ci;
-const Services = SpecialPowers.Services;
-
-const notifier = Cc["@mozilla.org/alerts-service;1"]
- .getService(Ci.nsIAlertsService);
-
-const chromeScript = SpecialPowers.loadChromeScript(_ => {
- Components.utils.import("resource://gre/modules/Services.jsm");
-
- addMessageListener("anyXULAlertsVisible", function() {
- var windows = Services.wm.getEnumerator("alert:alert");
- return windows.hasMoreElements();
- });
-
- addMessageListener("getAlertSource", function() {
- var alertWindows = Services.wm.getEnumerator("alert:alert");
- if (!alertWindows) {
- return null;
- }
- var alertWindow = alertWindows.getNext();
- return alertWindow.document.getElementById("alertSourceLabel").getAttribute("value");
- });
-});
-
-function notify(alertName, principal) {
- return new Promise((resolve, reject) => {
- var source;
- function observe(subject, topic, data) {
- if (topic == "alertclickcallback") {
- reject(new Error("Alerts should not be clicked during test"));
- } else if (topic == "alertshow") {
- source = chromeScript.sendSyncMessage("getAlertSource")[0][0];
- notifier.closeAlert(alertName);
- } else {
- is(topic, "alertfinished", "Should hide alert");
- resolve(source);
- }
- }
- notifier.showAlertNotification(null, "Notification test",
- "Surprise! I'm here to test notifications!",
- false, alertName, observe, alertName,
- null, null, null, principal);
- if (SpecialPowers.Services.appinfo.OS == "Darwin") {
- notifier.closeAlert(alertName);
- }
- });
-}
-
-function* testNoPrincipal() {
- var source = yield notify("noPrincipal", null);
- ok(!source, "Should omit source without principal");
-}
-
-function* testSystemPrincipal() {
- var principal = Services.scriptSecurityManager.getSystemPrincipal();
- var source = yield notify("systemPrincipal", principal);
- ok(!source, "Should omit source for system principal");
-}
-
-function* testNullPrincipal() {
- var principal = Services.scriptSecurityManager.createNullPrincipal({});
- var source = yield notify("nullPrincipal", principal);
- ok(!source, "Should omit source for null principal");
-}
-
-function* testNodePrincipal() {
- var principal = SpecialPowers.wrap(document).nodePrincipal;
- var source = yield notify("nodePrincipal", principal);
-
- var stringBundle = Services.strings.createBundle(
- "chrome://alerts/locale/alert.properties"
- );
- var localizedSource = stringBundle.formatStringFromName(
- "source.label", [principal.URI.hostPort], 1);
- is(source, localizedSource, "Should include source for node principal");
-}
-
-function runTest() {
- if (!("@mozilla.org/alerts-service;1" in Cc)) {
- todo(false, "Alerts service does not exist in this application");
- return;
- }
-
- if ("@mozilla.org/system-alerts-service;1" in Cc) {
- todo(false, "Native alerts service exists in this application");
- return;
- }
-
- ok(true, "Alerts service exists in this application");
-
- // sendSyncMessage returns an array of arrays. See the comments in
- // test_alerts_noobserve.html and test_SpecialPowersLoadChromeScript.html.
- var [[alertsVisible]] = chromeScript.sendSyncMessage("anyXULAlertsVisible");
- ok(!alertsVisible, "Alerts should not be present at the start of the test.");
-
- add_task(testNoPrincipal);
- add_task(testSystemPrincipal);
- add_task(testNullPrincipal);
- add_task(testNodePrincipal);
-}
-
-runTest();
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/asyncshutdown/moz.build b/toolkit/components/asyncshutdown/moz.build
index 79a4c44c70..0051c97a01 100644
--- a/toolkit/components/asyncshutdown/moz.build
+++ b/toolkit/components/asyncshutdown/moz.build
@@ -4,22 +4,12 @@
# 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/.
-XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell/xpcshell.ini']
-
XPIDL_MODULE = 'toolkit_asyncshutdown'
+XPIDL_SOURCES += ['nsIAsyncShutdown.idl']
-XPIDL_SOURCES += [
- 'nsIAsyncShutdown.idl',
-]
-
-EXTRA_JS_MODULES += [
- 'AsyncShutdown.jsm',
-]
+EXTRA_JS_MODULES += ['AsyncShutdown.jsm']
EXTRA_COMPONENTS += [
'nsAsyncShutdown.js',
'nsAsyncShutdown.manifest',
]
-
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'Async Tooling')
diff --git a/toolkit/components/asyncshutdown/tests/xpcshell/.eslintrc.js b/toolkit/components/asyncshutdown/tests/xpcshell/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/asyncshutdown/tests/xpcshell/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/asyncshutdown/tests/xpcshell/head.js b/toolkit/components/asyncshutdown/tests/xpcshell/head.js
deleted file mode 100644
index 9de489808d..0000000000
--- a/toolkit/components/asyncshutdown/tests/xpcshell/head.js
+++ /dev/null
@@ -1,174 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-"use strict";
-
-var Cu = Components.utils;
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/Promise.jsm");
-Cu.import("resource://gre/modules/Task.jsm");
-Cu.import("resource://gre/modules/AsyncShutdown.jsm");
-
-var asyncShutdownService = Cc["@mozilla.org/async-shutdown-service;1"].
- getService(Ci.nsIAsyncShutdownService);
-
-
-Services.prefs.setBoolPref("toolkit.asyncshutdown.testing", true);
-
-/**
- * Utility function used to provide the same API for various sources
- * of async shutdown barriers.
- *
- * @param {string} kind One of
- * - "phase" to test an AsyncShutdown phase;
- * - "barrier" to test an instance of AsyncShutdown.Barrier;
- * - "xpcom-barrier" to test an instance of nsIAsyncShutdownBarrier;
- * - "xpcom-barrier-unwrapped" to test the field `jsclient` of a nsIAsyncShutdownClient.
- *
- * @return An object with the following methods:
- * - addBlocker() - the same method as AsyncShutdown phases and barrier clients
- * - wait() - trigger the resolution of the lock
- */
-function makeLock(kind) {
- if (kind == "phase") {
- let topic = "test-Phase-" + ++makeLock.counter;
- let phase = AsyncShutdown._getPhase(topic);
- return {
- addBlocker: function(...args) {
- return phase.addBlocker(...args);
- },
- removeBlocker: function(blocker) {
- return phase.removeBlocker(blocker);
- },
- wait: function() {
- Services.obs.notifyObservers(null, topic, null);
- return Promise.resolve();
- }
- };
- } else if (kind == "barrier") {
- let name = "test-Barrier-" + ++makeLock.counter;
- let barrier = new AsyncShutdown.Barrier(name);
- return {
- addBlocker: barrier.client.addBlocker,
- removeBlocker: barrier.client.removeBlocker,
- wait: function() {
- return barrier.wait();
- }
- };
- } else if (kind == "xpcom-barrier") {
- let name = "test-xpcom-Barrier-" + ++makeLock.counter;
- let barrier = asyncShutdownService.makeBarrier(name);
- return {
- addBlocker: function(blockerName, condition, state) {
- if (condition == null) {
- // Slight trick as `null` or `undefined` cannot be used as keys
- // for `xpcomMap`. Note that this has no incidence on the result
- // of the test as the XPCOM interface imposes that the condition
- // is a method, so it cannot be `null`/`undefined`.
- condition = "<this case can't happen with the xpcom interface>";
- }
- let blocker = makeLock.xpcomMap.get(condition);
- if (!blocker) {
- blocker = {
- name: blockerName,
- state: state,
- blockShutdown: function(aBarrierClient) {
- return Task.spawn(function*() {
- try {
- if (typeof condition == "function") {
- yield Promise.resolve(condition());
- } else {
- yield Promise.resolve(condition);
- }
- } finally {
- aBarrierClient.removeBlocker(blocker);
- }
- });
- },
- };
- makeLock.xpcomMap.set(condition, blocker);
- }
- let {fileName, lineNumber, stack} = (new Error());
- return barrier.client.addBlocker(blocker, fileName, lineNumber, stack);
- },
- removeBlocker: function(condition) {
- let blocker = makeLock.xpcomMap.get(condition);
- if (!blocker) {
- return;
- }
- barrier.client.removeBlocker(blocker);
- },
- wait: function() {
- return new Promise(resolve => {
- barrier.wait(resolve);
- });
- }
- };
- } else if ("unwrapped-xpcom-barrier") {
- let name = "unwrapped-xpcom-barrier-" + ++makeLock.counter;
- let barrier = asyncShutdownService.makeBarrier(name);
- let client = barrier.client.jsclient;
- return {
- addBlocker: client.addBlocker,
- removeBlocker: client.removeBlocker,
- wait: function() {
- return new Promise(resolve => {
- barrier.wait(resolve);
- });
- }
- };
- }
- throw new TypeError("Unknown kind " + kind);
-}
-makeLock.counter = 0;
-makeLock.xpcomMap = new Map(); // Note: Not a WeakMap as we wish to handle non-gc-able keys (e.g. strings)
-
-/**
- * An asynchronous task that takes several ticks to complete.
- *
- * @param {*=} resolution The value with which the resulting promise will be
- * resolved once the task is complete. This may be a rejected promise,
- * in which case the resulting promise will itself be rejected.
- * @param {object=} outResult An object modified by side-effect during the task.
- * Initially, its field |isFinished| is set to |false|. Once the task is
- * complete, its field |isFinished| is set to |true|.
- *
- * @return {promise} A promise fulfilled once the task is complete
- */
-function longRunningAsyncTask(resolution = undefined, outResult = {}) {
- outResult.isFinished = false;
- if (!("countFinished" in outResult)) {
- outResult.countFinished = 0;
- }
- let deferred = Promise.defer();
- do_timeout(100, function() {
- ++outResult.countFinished;
- outResult.isFinished = true;
- deferred.resolve(resolution);
- });
- return deferred.promise;
-}
-
-function get_exn(f) {
- try {
- f();
- return null;
- } catch (ex) {
- return ex;
- }
-}
-
-function do_check_exn(exn, constructor) {
- do_check_neq(exn, null);
- if (exn.name == constructor) {
- do_check_eq(exn.constructor.name, constructor);
- return;
- }
- do_print("Wrong error constructor");
- do_print(exn.constructor.name);
- do_print(exn.stack);
- do_check_true(false);
-}
diff --git a/toolkit/components/asyncshutdown/tests/xpcshell/test_AsyncShutdown.js b/toolkit/components/asyncshutdown/tests/xpcshell/test_AsyncShutdown.js
deleted file mode 100644
index f1aebc3ad2..0000000000
--- a/toolkit/components/asyncshutdown/tests/xpcshell/test_AsyncShutdown.js
+++ /dev/null
@@ -1,194 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-"use strict";
-
-Cu.import("resource://gre/modules/PromiseUtils.jsm", this);
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* test_no_condition() {
- for (let kind of ["phase", "barrier", "xpcom-barrier", "xpcom-barrier-unwrapped"]) {
- do_print("Testing a barrier with no condition (" + kind + ")");
- let lock = makeLock(kind);
- yield lock.wait();
- do_print("Barrier with no condition didn't lock");
- }
-});
-
-add_task(function* test_phase_various_failures() {
- for (let kind of ["phase", "barrier", "xpcom-barrier", "xpcom-barrier-unwrapped"]) {
- do_print("Kind: " + kind);
- // Testing with wrong arguments
- let lock = makeLock(kind);
-
- Assert.throws(() => lock.addBlocker(), /TypeError|NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS/);
- Assert.throws(() => lock.addBlocker(null, true), /TypeError|NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS/);
-
- if (kind != "xpcom-barrier") {
- // xpcom-barrier actually expects a string in that position
- Assert.throws(() => lock.addBlocker("Test 2", () => true, "not a function"), /TypeError/);
- }
-
- // Attempting to add a blocker after we are done waiting
- yield lock.wait();
- Assert.throws(() => lock.addBlocker("Test 3", () => true), /is finished/);
- }
-});
-
-add_task(function* test_reentrant() {
- do_print("Ensure that we can call addBlocker from within a blocker");
-
- for (let kind of ["phase", "barrier", "xpcom-barrier", "xpcom-barrier-unwrapped"]) {
- do_print("Kind: " + kind);
- let lock = makeLock(kind);
-
- let deferredOuter = PromiseUtils.defer();
- let deferredInner = PromiseUtils.defer();
- let deferredBlockInner = PromiseUtils.defer();
-
- lock.addBlocker("Outer blocker", () => {
- do_print("Entering outer blocker");
- deferredOuter.resolve();
- lock.addBlocker("Inner blocker", () => {
- do_print("Entering inner blocker");
- deferredInner.resolve();
- return deferredBlockInner.promise;
- });
- });
-
- // Note that phase-style locks spin the event loop and do not return from
- // `lock.wait()` until after all blockers have been resolved. Therefore,
- // to be able to test them, we need to dispatch the following steps to the
- // event loop before calling `lock.wait()`, which we do by forcing
- // a Promise.resolve().
- //
- let promiseSteps = Task.spawn(function* () {
- yield Promise.resolve();
-
- do_print("Waiting until we have entered the outer blocker");
- yield deferredOuter.promise;
-
- do_print("Waiting until we have entered the inner blocker");
- yield deferredInner.promise;
-
- do_print("Allowing the lock to resolve")
- deferredBlockInner.resolve();
- });
-
- do_print("Starting wait");
- yield lock.wait();
-
- do_print("Waiting until all steps have been walked");
- yield promiseSteps;
- }
-});
-
-
-add_task(function* test_phase_removeBlocker() {
- do_print("Testing that we can call removeBlocker before, during and after the call to wait()");
-
- for (let kind of ["phase", "barrier", "xpcom-barrier", "xpcom-barrier-unwrapped"]) {
-
- do_print("Switching to kind " + kind);
- do_print("Attempt to add then remove a blocker before wait()");
- let lock = makeLock(kind);
- let blocker = () => {
- do_print("This promise will never be resolved");
- return Promise.defer().promise;
- };
-
- lock.addBlocker("Wait forever", blocker);
- let do_remove_blocker = function(aLock, aBlocker, aShouldRemove) {
- do_print("Attempting to remove blocker " + aBlocker + ", expecting result " + aShouldRemove);
- if (kind == "xpcom-barrier") {
- // The xpcom variant always returns `undefined`, so we can't
- // check its result.
- aLock.removeBlocker(aBlocker);
- return;
- }
- do_check_eq(aLock.removeBlocker(aBlocker), aShouldRemove);
- };
- do_remove_blocker(lock, blocker, true);
- do_remove_blocker(lock, blocker, false);
- do_print("Attempt to remove non-registered blockers before wait()");
- do_remove_blocker(lock, "foo", false);
- do_remove_blocker(lock, null, false);
- do_print("Waiting (should lift immediately)");
- yield lock.wait();
-
- do_print("Attempt to add a blocker then remove it during wait()");
- lock = makeLock(kind);
- let blockers = [
- () => {
- do_print("This blocker will self-destruct");
- do_remove_blocker(lock, blockers[0], true);
- return Promise.defer().promise;
- },
- () => {
- do_print("This blocker will self-destruct twice");
- do_remove_blocker(lock, blockers[1], true);
- do_remove_blocker(lock, blockers[1], false);
- return Promise.defer().promise;
- },
- () => {
- do_print("Attempt to remove non-registered blockers during wait()");
- do_remove_blocker(lock, "foo", false);
- do_remove_blocker(lock, null, false);
- }
- ];
- for (let i in blockers) {
- lock.addBlocker("Wait forever again: " + i, blockers[i]);
- }
- do_print("Waiting (should lift very quickly)");
- yield lock.wait();
- do_remove_blocker(lock, blockers[0], false);
-
-
- do_print("Attempt to remove a blocker after wait");
- lock = makeLock(kind);
- blocker = Promise.resolve.bind(Promise);
- yield lock.wait();
- do_remove_blocker(lock, blocker, false);
-
- do_print("Attempt to remove non-registered blocker after wait()");
- do_remove_blocker(lock, "foo", false);
- do_remove_blocker(lock, null, false);
- }
-
-});
-
-add_task(function* test_state() {
- do_print("Testing information contained in `state`");
-
- let BLOCKER_NAME = "test_state blocker " + Math.random();
-
- // Set up the barrier. Note that we cannot test `barrier.state`
- // immediately, as it initially contains "Not started"
- let barrier = new AsyncShutdown.Barrier("test_filename");
- let deferred = Promise.defer();
- let {filename, lineNumber} = Components.stack;
- barrier.client.addBlocker(BLOCKER_NAME,
- function() {
- return deferred.promise;
- });
-
- let promiseDone = barrier.wait();
-
- // Now that we have called `wait()`, the state contains interesting things
- let state = barrier.state[0];
- do_print("State: " + JSON.stringify(barrier.state, null, "\t"));
- Assert.equal(state.filename, filename);
- Assert.equal(state.lineNumber, lineNumber + 1);
- Assert.equal(state.name, BLOCKER_NAME);
- Assert.ok(state.stack.some(x => x.includes("test_state")), "The stack contains the caller function's name");
- Assert.ok(state.stack.some(x => x.includes(filename)), "The stack contains the calling file's name");
-
- deferred.resolve();
- yield promiseDone;
-});
-
-add_task(function*() {
- Services.prefs.clearUserPref("toolkit.asyncshutdown.testing");
-});
diff --git a/toolkit/components/asyncshutdown/tests/xpcshell/test_AsyncShutdown_leave_uncaught.js b/toolkit/components/asyncshutdown/tests/xpcshell/test_AsyncShutdown_leave_uncaught.js
deleted file mode 100644
index 33da1f53fb..0000000000
--- a/toolkit/components/asyncshutdown/tests/xpcshell/test_AsyncShutdown_leave_uncaught.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-"use strict";
-
-//
-// This file contains tests that need to leave uncaught asynchronous
-// errors. If your test catches all its asynchronous errors, please
-// put it in another file.
-//
-
-Promise.Debugging.clearUncaughtErrorObservers();
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* test_phase_simple_async() {
- do_print("Testing various combinations of a phase with a single condition");
- for (let kind of ["phase", "barrier", "xpcom-barrier", "xpcom-barrier-unwrapped"]) {
- for (let arg of [undefined, null, "foo", 100, new Error("BOOM")]) {
- for (let resolution of [arg, Promise.reject(arg)]) {
- for (let success of [false, true]) {
- for (let state of [[null],
- [],
- [() => "some state"],
- [function() {
- throw new Error("State BOOM"); }],
- [function() {
- return {
- toJSON: function() {
- throw new Error("State.toJSON BOOM");
- }
- };
- }]]) {
- // Asynchronous phase
- do_print("Asynchronous test with " + arg + ", " + resolution + ", " + kind);
- let lock = makeLock(kind);
- let outParam = { isFinished: false };
- lock.addBlocker(
- "Async test",
- function() {
- if (success) {
- return longRunningAsyncTask(resolution, outParam);
- }
- throw resolution;
- },
- ...state
- );
- do_check_false(outParam.isFinished);
- yield lock.wait();
- do_check_eq(outParam.isFinished, success);
- }
- }
-
- // Synchronous phase - just test that we don't throw/freeze
- do_print("Synchronous test with " + arg + ", " + resolution + ", " + kind);
- let lock = makeLock(kind);
- lock.addBlocker(
- "Sync test",
- resolution
- );
- yield lock.wait();
- }
- }
- }
-});
-
-add_task(function* test_phase_many() {
- do_print("Testing various combinations of a phase with many conditions");
- for (let kind of ["phase", "barrier", "xpcom-barrier", "xpcom-barrier-unwrapped"]) {
- let lock = makeLock(kind);
- let outParams = [];
- for (let arg of [undefined, null, "foo", 100, new Error("BOOM")]) {
- for (let resolve of [true, false]) {
- do_print("Testing with " + kind + ", " + arg + ", " + resolve);
- let resolution = resolve ? arg : Promise.reject(arg);
- let outParam = { isFinished: false };
- lock.addBlocker(
- "Test " + Math.random(),
- () => longRunningAsyncTask(resolution, outParam)
- );
- }
- }
- do_check_true(outParams.every((x) => !x.isFinished));
- yield lock.wait();
- do_check_true(outParams.every((x) => x.isFinished));
- }
-});
-
-
-
-
-add_task(function*() {
- Services.prefs.clearUserPref("toolkit.asyncshutdown.testing");
-});
-
diff --git a/toolkit/components/asyncshutdown/tests/xpcshell/test_converters.js b/toolkit/components/asyncshutdown/tests/xpcshell/test_converters.js
deleted file mode 100644
index c6c9231871..0000000000
--- a/toolkit/components/asyncshutdown/tests/xpcshell/test_converters.js
+++ /dev/null
@@ -1,88 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-"use strict";
-
-/**
- * Test conversion between nsIPropertyBag and JS values.
- */
-
-var PropertyBagConverter = asyncShutdownService.wrappedJSObject._propertyBagConverter;
-
-function run_test() {
- test_conversions();
-}
-
-function normalize(obj) {
- if (obj == null || typeof obj != "object") {
- return obj;
- }
- if (Array.isArray(obj)) {
- return obj.map(normalize);
- }
- let result = {};
- for (let k of Object.keys(obj).sort()) {
- result[k] = normalize(obj[k]);
- }
- return result;
-}
-
-function test_conversions() {
- const SAMPLES = [
- // Simple values
- 1,
- true,
- "string",
- null,
-
- // Objects
- {
- a: 1,
- b: true,
- c: "string",
- d:.5,
- e: [2, false, "another string", .3],
- f: [],
- g: {
- a2: 1,
- b2: true,
- c2: "string",
- d2:.5,
- e2: [2, false, "another string", .3],
- f2: [],
- g2: [{
- a3: 1,
- b3: true,
- c3: "string",
- d3:.5,
- e3: [2, false, "another string", .3],
- f3: [],
- g3: {}
- }]
- }
- }];
-
- for (let sample of SAMPLES) {
- let stringified = JSON.stringify(normalize(sample), null, "\t");
- do_print("Testing conversions of " + stringified);
- let rewrites = [sample];
- for (let i = 1; i < 3; ++i) {
- let source = rewrites[i - 1];
- let bag = PropertyBagConverter.fromValue(source);
- do_print(" => " + bag);
- if (source == null) {
- Assert.ok(bag == null, "The bag is null");
- } else if (typeof source == "object") {
- Assert.ok(bag instanceof Ci.nsIPropertyBag, "The bag is a property bag");
- } else {
- Assert.ok(typeof bag != "object", "The bag is not an object");
- }
- let dest = PropertyBagConverter.toValue(bag);
- let restringified = JSON.stringify(normalize(dest), null, "\t");
- do_print("Comparing");
- do_print(stringified);
- do_print(restringified);
- Assert.deepEqual(sample, dest, "Testing after " + i + " conversions");
- rewrites.push(dest);
- }
- }
-}
diff --git a/toolkit/components/asyncshutdown/tests/xpcshell/xpcshell.ini b/toolkit/components/asyncshutdown/tests/xpcshell/xpcshell.ini
deleted file mode 100644
index f573955bc9..0000000000
--- a/toolkit/components/asyncshutdown/tests/xpcshell/xpcshell.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[DEFAULT]
-head=head.js
-tail=
-skip-if = toolkit == 'android'
-
-[test_AsyncShutdown.js]
-[test_AsyncShutdown_leave_uncaught.js]
-[test_converters.js]
diff --git a/toolkit/components/autocomplete/moz.build b/toolkit/components/autocomplete/moz.build
index f3817d642e..a2e30b34b9 100644
--- a/toolkit/components/autocomplete/moz.build
+++ b/toolkit/components/autocomplete/moz.build
@@ -4,8 +4,6 @@
# 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/.
-XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
-
XPIDL_SOURCES += [
'nsIAutoCompleteController.idl',
'nsIAutoCompleteInput.idl',
@@ -23,6 +21,3 @@ UNIFIED_SOURCES += [
]
FINAL_LIBRARY = 'xul'
-
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'Autocomplete')
diff --git a/toolkit/components/autocomplete/tests/unit/.eslintrc.js b/toolkit/components/autocomplete/tests/unit/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/autocomplete/tests/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/autocomplete/tests/unit/head_autocomplete.js b/toolkit/components/autocomplete/tests/unit/head_autocomplete.js
deleted file mode 100644
index 5a458bdf49..0000000000
--- a/toolkit/components/autocomplete/tests/unit/head_autocomplete.js
+++ /dev/null
@@ -1,211 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-
-/**
- * Dummy nsIAutoCompleteInput source that returns
- * 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,
- completeDefaultIndex: false,
-
- // Text selection range
- _selStart: 0,
- _selEnd: 0,
- get selectionStart() {
- return this._selStart;
- },
- get selectionEnd() {
- return this._selEnd;
- },
- selectTextRange: function(aStart, aEnd) {
- 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,
-
- get popup() {
- if (!this._popup) {
- this._popup = new AutocompletePopupBase(this);
- }
- return this._popup;
- },
-
- // nsISupports implementation
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteInput])
-}
-
-/**
- * nsIAutoCompleteResult implementation
- */
-function AutoCompleteResultBase(aValues) {
- this._values = aValues;
-}
-AutoCompleteResultBase.prototype = {
-
- // Arrays
- _values: null,
- _comments: [],
- _styles: [],
- _finalCompleteValues: [],
-
- searchString: "",
- searchResult: null,
-
- defaultIndex: -1,
-
- _typeAheadResult: false,
- get typeAheadResult() {
- return this._typeAheadResult;
- },
-
- get matchCount() {
- return this._values.length;
- },
-
- 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 "";
- },
-
- getFinalCompleteValueAt: function(aIndex) {
- return this._finalCompleteValues[aIndex] || this._values[aIndex];
- },
-
- removeValueAt: function (aRowIndex, aRemoveFromDb) {},
-
- // nsISupports implementation
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteResult])
-}
-
-/**
- * nsIAutoCompleteSearch implementation that always returns
- * the same result set.
- */
-function AutoCompleteSearchBase(aName, aResult) {
- this.name = aName;
- this._result = aResult;
-}
-AutoCompleteSearchBase.prototype = {
-
- // Search name. Used by AutoCompleteController
- name: null,
-
- // AutoCompleteResult
- _result: null,
-
- 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);
- }
-}
-
-function AutocompletePopupBase(input) {
- this.input = input;
-}
-AutocompletePopupBase.prototype = {
- selectedIndex: 0,
- invalidate() {},
- selectBy(reverse, page) {
- let numRows = this.input.controller.matchCount;
- if (numRows > 0) {
- let delta = reverse ? -1 : 1;
- this.selectedIndex = (this.selectedIndex + delta) % numRows;
- if (this.selectedIndex < 0) {
- this.selectedIndex = numRows - 1;
- }
- }
- },
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompletePopup]),
-};
-
-/**
- * Helper to register an AutoCompleteSearch with the given name.
- * Allows the AutoCompleteController to find the search.
- */
-function registerAutoCompleteSearch(aSearch) {
- var name = "@mozilla.org/autocomplete/search;1?name=" + aSearch.name;
- var cid = Cc["@mozilla.org/uuid-generator;1"].
- getService(Ci.nsIUUIDGenerator).
- 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;
-}
-
-/**
- * Helper to unregister an AutoCompleteSearch.
- */
-function unregisterAutoCompleteSearch(aSearch) {
- var componentManager = Components.manager
- .QueryInterface(Ci.nsIComponentRegistrar);
- componentManager.unregisterFactory(aSearch.cid, aSearch);
-}
-
diff --git a/toolkit/components/autocomplete/tests/unit/test_330578.js b/toolkit/components/autocomplete/tests/unit/test_330578.js
deleted file mode 100644
index c422dbb6a0..0000000000
--- a/toolkit/components/autocomplete/tests/unit/test_330578.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var gResultListener = {
- _lastResult: null,
- _lastValue: "",
- _lastRemoveFromDb: false,
-
- onValueRemoved: function(aResult, aValue, aRemoveFromDb) {
- this._lastResult = aResult;
- this._lastValue = aValue;
- this._lastRemoveFromDb = aRemoveFromDb;
- }
-};
-
-
-// main
-function run_test() {
- var result = Cc["@mozilla.org/autocomplete/simple-result;1"].
- createInstance(Ci.nsIAutoCompleteSimpleResult);
- result.appendMatch("a", "");
- result.appendMatch("b", "");
- result.appendMatch("c", "");
- result.setListener(gResultListener);
- do_check_eq(result.matchCount, 3);
- result.removeValueAt(0, true);
- do_check_eq(result.matchCount, 2);
- do_check_eq(gResultListener._lastResult, result);
- do_check_eq(gResultListener._lastValue, "a");
- do_check_eq(gResultListener._lastRemoveFromDb, true);
-
- result.removeValueAt(0, false);
- do_check_eq(result.matchCount, 1);
- do_check_eq(gResultListener._lastValue, "b");
- do_check_eq(gResultListener._lastRemoveFromDb, false);
-
- // check that we don't get notified if the listener is unset
- result.setListener(null);
- result.removeValueAt(0, true); // "c"
- do_check_eq(result.matchCount, 0);
- do_check_eq(gResultListener._lastValue, "b");
-}
diff --git a/toolkit/components/autocomplete/tests/unit/test_378079.js b/toolkit/components/autocomplete/tests/unit/test_378079.js
deleted file mode 100644
index ad7e5590f2..0000000000
--- a/toolkit/components/autocomplete/tests/unit/test_378079.js
+++ /dev/null
@@ -1,285 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/**
- * Unit test for Bug 378079 - AutoComplete returns invalid rows when
- * more than one AutoCompleteSearch is used.
- */
-
-
-
-/**
- * Dummy nsIAutoCompleteInput source that returns
- * the given list of AutoCompleteSearch names.
- *
- * Implements only the methods needed for this test.
- */
-function AutoCompleteInput(aSearches) {
- this.searches = aSearches;
-}
-AutoCompleteInput.prototype = {
- constructor: AutoCompleteInput,
-
- // Array of AutoCompleteSearch names
- searches: null,
-
- minResultsForPopup: 0,
- timeout: 10,
- searchParam: "",
- textValue: "",
- disableAutoComplete: false,
- completeDefaultIndex: false,
-
- get searchCount() {
- return this.searches.length;
- },
-
- getSearchAt: function(aIndex) {
- return this.searches[aIndex];
- },
-
- onSearchBegin: function() {},
- onSearchComplete: function() {},
-
- popupOpen: false,
-
- popup: {
- setSelectedIndex: function(aIndex) {},
- invalidate: function() {},
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompletePopup))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
- },
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompleteInput))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
-}
-
-
-
-/**
- * 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 {
- this.searchResult = Ci.nsIAutoCompleteResult.NOMATCH;
- }
-}
-AutoCompleteResult.prototype = {
- constructor: AutoCompleteResult,
-
- // Arrays
- _values: null,
- _comments: null,
- _styles: null,
-
- searchString: "",
- searchResult: null,
-
- defaultIndex: 0,
-
- get matchCount() {
- return this._values.length;
- },
-
- 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 "";
- },
-
- getFinalCompleteValueAt: function(aIndex) {
- return this.getValueAt(aIndex);
- },
-
- removeValueAt: function (aRowIndex, aRemoveFromDb) {},
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompleteResult))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
-}
-
-
-
-/**
- * nsIAutoCompleteSearch implementation that always returns
- * the same result set.
- */
-function AutoCompleteSearch(aName, aResult) {
- this.name = aName;
- this._result = 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)
- {
- aListener.onSearchResult(this, this._result);
- },
-
- stopSearch: function() {},
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIFactory) ||
- iid.equals(Ci.nsIAutoCompleteSearch))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- },
-
- // nsIFactory implementation
- createInstance: function(outer, iid) {
- return this.QueryInterface(iid);
- }
-}
-
-
-
-/**
- * Helper to register an AutoCompleteSearch with the given name.
- * Allows the AutoCompleteController to find the search.
- */
-function registerAutoCompleteSearch(aSearch) {
- var name = "@mozilla.org/autocomplete/search;1?name=" + aSearch.name;
-
- var uuidGenerator = Cc["@mozilla.org/uuid-generator;1"].
- getService(Ci.nsIUUIDGenerator);
- 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;
-}
-
-
-
-/**
- * Helper to unregister an AutoCompleteSearch.
- */
-function unregisterAutoCompleteSearch(aSearch) {
- var componentManager = Components.manager
- .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",
- 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);
-
- // Make an AutoCompleteInput that uses our searches
- // and confirms results on search complete
- var input = new AutoCompleteInput([emptySearch.name, regularSearch.name]);
- var numSearchesStarted = 0;
-
- input.onSearchBegin = function() {
- numSearchesStarted++;
- do_check_eq(numSearchesStarted, 1);
- };
-
- input.onSearchComplete = function() {
-
- do_check_eq(numSearchesStarted, 1);
-
- 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));
- }
-
- // Unregister searches
- unregisterAutoCompleteSearch(emptySearch);
- unregisterAutoCompleteSearch(regularSearch);
-
- do_test_finished();
- };
-
- controller.input = input;
-
- // 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
deleted file mode 100644
index 6fb57e6c4a..0000000000
--- a/toolkit/components/autocomplete/tests/unit/test_393191.js
+++ /dev/null
@@ -1,272 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/**
- * Unit test for Bug 393191 - AutoComplete crashes if result is null
- */
-
-
-
-/**
- * Dummy nsIAutoCompleteInput source that returns
- * the given list of AutoCompleteSearch names.
- *
- * Implements only the methods needed for this test.
- */
-function AutoCompleteInput(aSearches) {
- this.searches = aSearches;
-}
-AutoCompleteInput.prototype = {
- constructor: AutoCompleteInput,
-
- // Array of AutoCompleteSearch names
- searches: null,
-
- minResultsForPopup: 0,
- timeout: 10,
- searchParam: "",
- textValue: "",
- disableAutoComplete: false,
- completeDefaultIndex: false,
-
- get searchCount() {
- return this.searches.length;
- },
-
- getSearchAt: function(aIndex) {
- return this.searches[aIndex];
- },
-
- onSearchBegin: function() {},
- onSearchComplete: function() {},
-
- popupOpen: false,
-
- popup: {
- setSelectedIndex: function(aIndex) {},
- invalidate: function() {},
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompletePopup))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
- },
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompleteInput))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
-}
-
-
-
-/**
- * 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 {
- this.searchResult = Ci.nsIAutoCompleteResult.NOMATCH;
- }
-}
-AutoCompleteResult.prototype = {
- constructor: AutoCompleteResult,
-
- // Arrays
- _values: null,
- _comments: null,
- _styles: null,
-
- searchString: "",
- searchResult: null,
-
- defaultIndex: 0,
-
- get matchCount() {
- return this._values.length;
- },
-
- 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 "";
- },
-
- getFinalCompleteValueAt: function(aIndex) {
- return this.getValueAt(aIndex);
- },
-
- removeValueAt: function (aRowIndex, aRemoveFromDb) {},
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompleteResult))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
-}
-
-
-
-/**
- * nsIAutoCompleteSearch implementation that always returns
- * the same result set.
- */
-function AutoCompleteSearch(aName, aResult) {
- this.name = aName;
- this._result = 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)
- {
- aListener.onSearchResult(this, this._result);
- },
-
- stopSearch: function() {},
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIFactory) ||
- iid.equals(Ci.nsIAutoCompleteSearch))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- },
-
- // nsIFactory implementation
- createInstance: function(outer, iid) {
- return this.QueryInterface(iid);
- }
-}
-
-
-
-/**
- * Helper to register an AutoCompleteSearch with the given name.
- * Allows the AutoCompleteController to find the search.
- */
-function registerAutoCompleteSearch(aSearch) {
- var name = "@mozilla.org/autocomplete/search;1?name=" + aSearch.name;
-
- var uuidGenerator = Cc["@mozilla.org/uuid-generator;1"].
- getService(Ci.nsIUUIDGenerator);
- 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;
-}
-
-
-
-/**
- * Helper to unregister an AutoCompleteSearch.
- */
-function unregisterAutoCompleteSearch(aSearch) {
- var componentManager = Components.manager
- .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",
- new AutoCompleteResult([], [], []));
-
- // Register search so AutoCompleteController can find them
- registerAutoCompleteSearch(emptySearch);
-
- var controller = Components.classes["@mozilla.org/autocomplete/controller;1"].
- getService(Components.interfaces.nsIAutoCompleteController);
-
- // Make an AutoCompleteInput that uses our search
- // and confirms results on search complete
- var input = new AutoCompleteInput([emptySearch.name]);
- var numSearchesStarted = 0;
-
- input.onSearchBegin = function() {
- numSearchesStarted++;
- do_check_eq(numSearchesStarted, 1);
- };
-
- input.onSearchComplete = function() {
-
- do_check_eq(numSearchesStarted, 1);
-
- do_check_eq(controller.searchStatus,
- Ci.nsIAutoCompleteController.STATUS_COMPLETE_NO_MATCH);
- do_check_eq(controller.matchCount, 0);
-
- // Unregister searches
- unregisterAutoCompleteSearch(emptySearch);
-
- do_test_finished();
- };
-
- controller.input = input;
-
- // 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_440866.js b/toolkit/components/autocomplete/tests/unit/test_440866.js
deleted file mode 100644
index e450aebbf8..0000000000
--- a/toolkit/components/autocomplete/tests/unit/test_440866.js
+++ /dev/null
@@ -1,285 +0,0 @@
-/* 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/. */
-
-/**
- * Unit test for Bug 440866 - First AutoCompleteSearch that returns
- * RESULT_NOMATCH cancels all other searches when popup is open
- */
-
-
-
-/**
- * Dummy nsIAutoCompleteInput source that returns
- * the given list of AutoCompleteSearch names.
- *
- * Implements only the methods needed for this test.
- */
-function AutoCompleteInput(aSearches) {
- this.searches = aSearches;
-}
-AutoCompleteInput.prototype = {
- constructor: AutoCompleteInput,
-
- // Array of AutoCompleteSearch names
- searches: null,
-
- minResultsForPopup: 0,
- timeout: 10,
- searchParam: "",
- textValue: "",
- disableAutoComplete: false,
- completeDefaultIndex: false,
-
- get searchCount() {
- return this.searches.length;
- },
-
- getSearchAt: function(aIndex) {
- return this.searches[aIndex];
- },
-
- onSearchBegin: function() {},
- onSearchComplete: function() {},
-
- popupOpen: false,
-
- popup: {
- setSelectedIndex: function(aIndex) {},
- invalidate: function() {},
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompletePopup))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
- },
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompleteInput))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
-}
-
-
-
-/**
- * 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 {
- this.searchResult = Ci.nsIAutoCompleteResult.NOMATCH;
- }
-}
-AutoCompleteResult.prototype = {
- constructor: AutoCompleteResult,
-
- // Arrays
- _values: null,
- _comments: null,
- _styles: null,
-
- searchString: "",
- searchResult: null,
-
- defaultIndex: 0,
-
- get matchCount() {
- return this._values.length;
- },
-
- 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 "";
- },
-
- getFinalCompleteValueAt: function(aIndex) {
- return this.getValueAt(aIndex);
- },
-
- removeValueAt: function (aRowIndex, aRemoveFromDb) {},
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompleteResult))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
-}
-
-
-
-/**
- * nsIAutoCompleteSearch implementation that always returns
- * the same result set.
- */
-function AutoCompleteSearch(aName, aResult) {
- this.name = aName;
- this._result = 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)
- {
- aListener.onSearchResult(this, this._result);
- },
-
- stopSearch: function() {},
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIFactory) ||
- iid.equals(Ci.nsIAutoCompleteSearch))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- },
-
- // nsIFactory implementation
- createInstance: function(outer, iid) {
- return this.QueryInterface(iid);
- }
-}
-
-
-
-/**
- * Helper to register an AutoCompleteSearch with the given name.
- * Allows the AutoCompleteController to find the search.
- */
-function registerAutoCompleteSearch(aSearch) {
- var name = "@mozilla.org/autocomplete/search;1?name=" + aSearch.name;
-
- var uuidGenerator = Cc["@mozilla.org/uuid-generator;1"].
- getService(Ci.nsIUUIDGenerator);
- 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;
-}
-
-
-
-/**
- * Helper to unregister an AutoCompleteSearch.
- */
-function unregisterAutoCompleteSearch(aSearch) {
- var componentManager = Components.manager
- .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",
- 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);
-
- // Make an AutoCompleteInput that uses our searches
- // and confirms results on search complete
- var input = new AutoCompleteInput([emptySearch.name, regularSearch.name]);
- var numSearchesStarted = 0;
-
- input.onSearchBegin = function() {
- numSearchesStarted++;
- do_check_eq(numSearchesStarted, 1);
- do_check_eq(input.searchCount, 2);
- };
-
- input.onSearchComplete = function() {
- do_check_eq(numSearchesStarted, 1);
-
- 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_true(input.popupOpen);
-
- // Unregister searches
- unregisterAutoCompleteSearch(emptySearch);
- unregisterAutoCompleteSearch(regularSearch);
-
- do_test_finished();
- };
-
- controller.input = input;
-
- // 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_463023.js b/toolkit/components/autocomplete/tests/unit/test_463023.js
deleted file mode 100644
index a2639fd032..0000000000
--- a/toolkit/components/autocomplete/tests/unit/test_463023.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-// main
-function run_test() {
- var result = Cc["@mozilla.org/autocomplete/controller;1"].
- createInstance(Ci.nsIAutoCompleteController);
- do_check_eq(result.searchStatus, Ci.nsIAutoCompleteController.STATUS_NONE);
-}
diff --git a/toolkit/components/autocomplete/tests/unit/test_660156.js b/toolkit/components/autocomplete/tests/unit/test_660156.js
deleted file mode 100644
index 98acb243e0..0000000000
--- a/toolkit/components/autocomplete/tests/unit/test_660156.js
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * Search object that returns results at different times.
- * First, the search that returns results asynchronously.
- */
-function AutoCompleteAsyncSearch(aName, aResult) {
- this.name = aName;
- this._result = aResult;
-}
-AutoCompleteAsyncSearch.prototype = Object.create(AutoCompleteSearchBase.prototype);
-AutoCompleteAsyncSearch.prototype.startSearch = function(aSearchString,
- aSearchParam,
- aPreviousResult,
- aListener) {
- this._result.searchResult = Ci.nsIAutoCompleteResult.RESULT_NOMATCH_ONGOING;
- aListener.onSearchResult(this, this._result);
-
- do_timeout(500, () => {
- this._returnResults(aListener);
- });
-};
-
-AutoCompleteAsyncSearch.prototype._returnResults = function(aListener) {
- var result = this._result;
-
- result.searchResult = Ci.nsIAutoCompleteResult.RESULT_SUCCESS;
- aListener.onSearchResult(this, result);
-};
-
-/**
- * The synchronous version
- */
-function AutoCompleteSyncSearch(aName, aResult) {
- this.name = aName;
- this._result = aResult;
-}
-AutoCompleteSyncSearch.prototype = Object.create(AutoCompleteAsyncSearch.prototype);
-AutoCompleteSyncSearch.prototype.startSearch = function(aSearchString,
- aSearchParam,
- aPreviousResult,
- aListener) {
- this._returnResults(aListener);
-};
-
-/**
- * Results object
- */
-function AutoCompleteResult(aValues, aDefaultIndex) {
- this._values = aValues;
- this.defaultIndex = aDefaultIndex;
-}
-AutoCompleteResult.prototype = Object.create(AutoCompleteResultBase.prototype);
-
-
-/**
- * Test AutoComplete with multiple AutoCompleteSearch sources, with one of them
- * (index != 0) returning before the rest.
- */
-function run_test() {
- do_test_pending();
-
- var results = ["mozillaTest"];
- var inputStr = "moz";
-
- // Async search
- var asyncSearch = new AutoCompleteAsyncSearch("Async",
- new AutoCompleteResult(results, -1));
- // Sync search
- var syncSearch = new AutoCompleteSyncSearch("Sync",
- new AutoCompleteResult(results, 0));
-
- // Register searches so AutoCompleteController can find them
- registerAutoCompleteSearch(asyncSearch);
- registerAutoCompleteSearch(syncSearch);
-
- var controller = Cc["@mozilla.org/autocomplete/controller;1"].
- getService(Ci.nsIAutoCompleteController);
-
- // Make an AutoCompleteInput that uses our searches
- // and confirms results on search complete.
- // Async search MUST be FIRST to trigger the bug this tests.
- var input = new AutoCompleteInputBase([asyncSearch.name, syncSearch.name]);
- input.completeDefaultIndex = true;
- input.textValue = inputStr;
-
- // Caret must be at the end. Autofill doesn't happen unless you're typing
- // characters at the end.
- var strLen = inputStr.length;
- input.selectTextRange(strLen, strLen);
-
- controller.input = input;
- controller.startSearch(inputStr);
-
- input.onSearchComplete = function() {
- do_check_eq(input.textValue, results[0]);
-
- // Unregister searches
- unregisterAutoCompleteSearch(asyncSearch);
- unregisterAutoCompleteSearch(syncSearch);
- do_test_finished();
- };
-}
diff --git a/toolkit/components/autocomplete/tests/unit/test_autocomplete_multiple.js b/toolkit/components/autocomplete/tests/unit/test_autocomplete_multiple.js
deleted file mode 100644
index 7fee48d555..0000000000
--- a/toolkit/components/autocomplete/tests/unit/test_autocomplete_multiple.js
+++ /dev/null
@@ -1,276 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/**
- * Dummy nsIAutoCompleteInput source that returns
- * the given list of AutoCompleteSearch names.
- *
- * Implements only the methods needed for this test.
- */
-function AutoCompleteInput(aSearches) {
- this.searches = aSearches;
-}
-AutoCompleteInput.prototype = {
- constructor: AutoCompleteInput,
-
- // Array of AutoCompleteSearch names
- searches: null,
-
- minResultsForPopup: 0,
- timeout: 10,
- searchParam: "",
- textValue: "",
- disableAutoComplete: false,
- completeDefaultIndex: false,
-
- get searchCount() {
- return this.searches.length;
- },
-
- getSearchAt: function(aIndex) {
- return this.searches[aIndex];
- },
-
- onSearchBegin: function() {},
- onSearchComplete: function() {},
-
- popupOpen: false,
-
- popup: {
- setSelectedIndex: function(aIndex) {},
- invalidate: function() {},
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompletePopup))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
- },
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompleteInput))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
-}
-
-
-
-/**
- * nsIAutoCompleteResult implementation
- */
-function AutoCompleteResult(aValues, aComments, aStyles) {
- this._values = aValues;
- this._comments = aComments;
- this._styles = aStyles;
-}
-AutoCompleteResult.prototype = {
- constructor: AutoCompleteResult,
-
- // Arrays
- _values: null,
- _comments: null,
- _styles: null,
-
- searchString: "",
- searchResult: null,
-
- defaultIndex: 0,
-
- get matchCount() {
- return this._values.length;
- },
-
- 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 "";
- },
-
- getFinalCompleteValueAt: function(aIndex) {
- return this.getValueAt(aIndex);
- },
-
- removeValueAt: function (aRowIndex, aRemoveFromDb) {},
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompleteResult))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
-}
-
-
-
-/**
- * nsIAutoCompleteSearch implementation that always returns
- * the same result set.
- */
-function AutoCompleteSearch(aName, aResult) {
- this.name = aName;
- this._result = 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)
- {
- var result = this._result;
- if (result._values.length > 0) {
- result.searchResult = Ci.nsIAutoCompleteResult.RESULT_SUCCESS_ONGOING;
- } else {
- result.searchResult = Ci.nsIAutoCompleteResult.RESULT_NOMATCH_ONGOING;
- }
- aListener.onSearchResult(this, result);
-
- if (result._values.length > 0) {
- result.searchResult = Ci.nsIAutoCompleteResult.RESULT_SUCCESS;
- } else {
- result.searchResult = Ci.nsIAutoCompleteResult.RESULT_NOMATCH;
- }
- aListener.onSearchResult(this, result);
- },
-
- stopSearch: function() {},
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIFactory) ||
- iid.equals(Ci.nsIAutoCompleteSearch))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- },
-
- // nsIFactory implementation
- createInstance: function(outer, iid) {
- return this.QueryInterface(iid);
- }
-}
-
-
-
-/**
- * Helper to register an AutoCompleteSearch with the given name.
- * Allows the AutoCompleteController to find the search.
- */
-function registerAutoCompleteSearch(aSearch) {
- var name = "@mozilla.org/autocomplete/search;1?name=" + aSearch.name;
-
- var uuidGenerator = Cc["@mozilla.org/uuid-generator;1"].
- getService(Ci.nsIUUIDGenerator);
- 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;
-}
-
-
-
-/**
- * Helper to unregister an AutoCompleteSearch.
- */
-function unregisterAutoCompleteSearch(aSearch) {
- var componentManager = Components.manager
- .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",
- 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);
-
- // Make an AutoCompleteInput that uses our searches
- // and confirms results on search complete
- var input = new AutoCompleteInput([search1.name, search2.name]);
- var numSearchesStarted = 0;
-
- input.onSearchBegin = function() {
- numSearchesStarted++;
- do_check_eq(numSearchesStarted, 1);
- };
-
- input.onSearchComplete = function() {
-
- do_check_eq(numSearchesStarted, 1);
-
- do_check_eq(controller.searchStatus,
- Ci.nsIAutoCompleteController.STATUS_COMPLETE_MATCH);
- do_check_eq(controller.matchCount, expected1.length + expected2.length);
-
- // Unregister searches
- unregisterAutoCompleteSearch(search1);
- unregisterAutoCompleteSearch(search2);
-
- do_test_finished();
- };
-
- controller.input = input;
-
- // 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_userContextId.js b/toolkit/components/autocomplete/tests/unit/test_autocomplete_userContextId.js
deleted file mode 100644
index c98db7f8fd..0000000000
--- a/toolkit/components/autocomplete/tests/unit/test_autocomplete_userContextId.js
+++ /dev/null
@@ -1,45 +0,0 @@
-"use strict";
-
-Cu.import("resource://gre/modules/Promise.jsm");
-
-function AutoCompleteInput(aSearches, aUserContextId) {
- this.searches = aSearches;
- this.userContextId = aUserContextId;
- this.popup.selectedIndex = -1;
-}
-AutoCompleteInput.prototype = Object.create(AutoCompleteInputBase.prototype);
-
-function AutoCompleteSearch(aName) {
- this.name = aName;
-}
-AutoCompleteSearch.prototype = Object.create(AutoCompleteSearchBase.prototype);
-
-add_task(function *test_userContextId() {
- let searchParam = yield doSearch("test", 1);
- Assert.equal(searchParam, " user-context-id:1");
-});
-
-function doSearch(aString, aUserContextId) {
- let deferred = Promise.defer();
- let search = new AutoCompleteSearch("test");
-
- search.startSearch = function (aSearchString,
- aSearchParam,
- aPreviousResult,
- aListener) {
- unregisterAutoCompleteSearch(search);
- deferred.resolve(aSearchParam);
- };
-
- registerAutoCompleteSearch(search);
-
- let controller = Cc["@mozilla.org/autocomplete/controller;1"].
- getService(Ci.nsIAutoCompleteController);
-
- let input = new AutoCompleteInput([ search.name ], aUserContextId);
- controller.input = input;
- controller.startSearch(aString);
-
- return deferred.promise;
- }
-
diff --git a/toolkit/components/autocomplete/tests/unit/test_autofillSelectedPopupIndex.js b/toolkit/components/autocomplete/tests/unit/test_autofillSelectedPopupIndex.js
deleted file mode 100644
index 5fb93abc1b..0000000000
--- a/toolkit/components/autocomplete/tests/unit/test_autofillSelectedPopupIndex.js
+++ /dev/null
@@ -1,78 +0,0 @@
-"use strict";
-
-add_task(function* sameCaseAsMatch() {
- yield runTest("moz");
-});
-
-add_task(function* differentCaseFromMatch() {
- yield runTest("MOZ");
-});
-
-function* runTest(searchStr) {
- let matches = [
- "mozilla.org",
- "example.com",
- ];
- let result = new AutoCompleteResultBase(matches);
- result.defaultIndex = 0;
-
- let search = new AutoCompleteSearchBase("search", result);
- registerAutoCompleteSearch(search);
-
- let input = new AutoCompleteInputBase([search.name]);
- input.completeSelectedIndex = true;
- input.completeDefaultIndex = true;
-
- // Start off with the search string in the input. The selection must be
- // collapsed and the caret must be at the end to trigger autofill below.
- input.textValue = searchStr;
- input.selectTextRange(searchStr.length, searchStr.length);
- Assert.equal(input.selectionStart, searchStr.length,
- "Selection should start at the end of the input");
- Assert.equal(input.selectionEnd, searchStr.length,
- "Selection should end at the end of the input");
-
- let controller = Cc["@mozilla.org/autocomplete/controller;1"].
- createInstance(Ci.nsIAutoCompleteController);
- controller.input = input;
- input.controller = controller;
-
- // Start a search.
- yield new Promise(resolve => {
- controller.startSearch(searchStr);
- input.onSearchComplete = () => {
- // The first match should have autofilled, but the case of the search
- // string should be preserved.
- let expectedValue = searchStr + matches[0].substr(searchStr.length);
- Assert.equal(input.textValue, expectedValue,
- "Should have autofilled");
- Assert.equal(input.selectionStart, searchStr.length,
- "Selection should start after search string");
- Assert.equal(input.selectionEnd, expectedValue.length,
- "Selection should end at the end of the input");
- resolve();
- };
- });
-
- // Key down to select the second match in the popup.
- controller.handleKeyNavigation(Ci.nsIDOMKeyEvent.DOM_VK_DOWN);
- let expectedValue = matches[1];
- Assert.equal(input.textValue, expectedValue,
- "Should have filled second match");
- Assert.equal(input.selectionStart, expectedValue.length,
- "Selection should start at the end of the input");
- Assert.equal(input.selectionEnd, expectedValue.length,
- "Selection should end at the end of the input");
-
- // Key up to select the first match again. The input should be restored
- // exactly as it was when the first match was autofilled above: the search
- // string's case should be preserved, and the selection should be preserved.
- controller.handleKeyNavigation(Ci.nsIDOMKeyEvent.DOM_VK_UP);
- expectedValue = searchStr + matches[0].substr(searchStr.length);
- Assert.equal(input.textValue, expectedValue,
- "Should have filled first match again");
- Assert.equal(input.selectionStart, searchStr.length,
- "Selection should start after search string again");
- Assert.equal(input.selectionEnd, expectedValue.length,
- "Selection should end at the end of the input again");
-}
diff --git a/toolkit/components/autocomplete/tests/unit/test_badDefaultIndex.js b/toolkit/components/autocomplete/tests/unit/test_badDefaultIndex.js
deleted file mode 100644
index 17f735388e..0000000000
--- a/toolkit/components/autocomplete/tests/unit/test_badDefaultIndex.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/* 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/. */
-
-/**
- * A results that wants to defaultComplete to 0, but it has no matches,
- * though it notifies SUCCESS to the controller.
- */
-function AutoCompleteNoMatchResult() {
- this.defaultIndex = 0;
-}
-AutoCompleteNoMatchResult.prototype = Object.create(AutoCompleteResultBase.prototype);
-
-/**
- * A results that wants to defaultComplete to an index greater than the number
- * of matches.
- */
-function AutoCompleteBadIndexResult(aValues, aDefaultIndex) {
- do_check_true(aValues.length <= aDefaultIndex);
- this._values = aValues;
- this.defaultIndex = aDefaultIndex;
-}
-AutoCompleteBadIndexResult.prototype = Object.create(AutoCompleteResultBase.prototype);
-
-add_test(function autocomplete_noMatch_success() {
- const INPUT_STR = "moz";
-
- let searchNoMatch =
- new AutoCompleteSearchBase("searchNoMatch",
- new AutoCompleteNoMatchResult());
- registerAutoCompleteSearch(searchNoMatch);
-
- // Make an AutoCompleteInput that uses our search and confirms results.
- let input = new AutoCompleteInputBase([searchNoMatch.name]);
- input.completeDefaultIndex = true;
- input.textValue = INPUT_STR;
-
- // Caret must be at the end for autoFill to happen.
- let strLen = INPUT_STR.length;
- input.selectTextRange(strLen, strLen);
- do_check_eq(input.selectionStart, strLen);
- do_check_eq(input.selectionEnd, strLen);
-
- let controller = Cc["@mozilla.org/autocomplete/controller;1"].
- getService(Ci.nsIAutoCompleteController);
- controller.input = input;
- controller.startSearch(INPUT_STR);
-
- input.onSearchComplete = function () {
- // Should not try to autoFill to an empty value.
- do_check_eq(input.textValue, "moz");
-
- // Clean up.
- unregisterAutoCompleteSearch(searchNoMatch);
- run_next_test();
- };
-});
-
-add_test(function autocomplete_defaultIndex_exceeds_matchCount() {
- const INPUT_STR = "moz";
-
- // Result returning matches, but a bad defaultIndex.
- let searchBadIndex =
- new AutoCompleteSearchBase("searchBadIndex",
- new AutoCompleteBadIndexResult(["mozillaTest"], 1));
- registerAutoCompleteSearch(searchBadIndex);
-
- // Make an AutoCompleteInput that uses our search and confirms results.
- let input = new AutoCompleteInputBase([searchBadIndex.name]);
- input.completeDefaultIndex = true;
- input.textValue = INPUT_STR;
-
- // Caret must be at the end for autoFill to happen.
- let strLen = INPUT_STR.length;
- input.selectTextRange(strLen, strLen);
- do_check_eq(input.selectionStart, strLen);
- do_check_eq(input.selectionEnd, strLen);
-
- let controller = Cc["@mozilla.org/autocomplete/controller;1"].
- getService(Ci.nsIAutoCompleteController);
- controller.input = input;
- controller.startSearch(INPUT_STR);
-
- input.onSearchComplete = function () {
- // Should not try to autoFill to an empty value.
- do_check_eq(input.textValue, "moz");
-
- // Clean up.
- unregisterAutoCompleteSearch(searchBadIndex);
- run_next_test();
- };
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/autocomplete/tests/unit/test_completeDefaultIndex_casing.js b/toolkit/components/autocomplete/tests/unit/test_completeDefaultIndex_casing.js
deleted file mode 100644
index c25b009071..0000000000
--- a/toolkit/components/autocomplete/tests/unit/test_completeDefaultIndex_casing.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function AutoCompleteResult(aValues) {
- this._values = aValues;
- this.defaultIndex = 0;
-}
-AutoCompleteResult.prototype = Object.create(AutoCompleteResultBase.prototype);
-
-function AutoCompleteInput(aSearches) {
- this.searches = aSearches;
- this.popup.selectedIndex = -1;
- this.completeDefaultIndex = true;
-}
-AutoCompleteInput.prototype = Object.create(AutoCompleteInputBase.prototype);
-
-function run_test() {
- run_next_test();
-}
-
-add_test(function test_keyNavigation() {
- doSearch("MOZ", "mozilla", function(aController) {
- do_check_eq(aController.input.textValue, "MOZilla");
- aController.handleKeyNavigation(Ci.nsIDOMKeyEvent.DOM_VK_RIGHT);
- do_check_eq(aController.input.textValue, "mozilla");
- });
-});
-
-add_test(function test_handleEnter() {
- doSearch("MOZ", "mozilla", function(aController) {
- do_check_eq(aController.input.textValue, "MOZilla");
- aController.handleEnter(false);
- do_check_eq(aController.input.textValue, "mozilla");
- });
-});
-
-function doSearch(aSearchString, aResultValue, aOnCompleteCallback) {
- let search = new AutoCompleteSearchBase("search",
- new AutoCompleteResult([ "mozilla", "toolkit" ], 0));
- registerAutoCompleteSearch(search);
-
- let controller = Cc["@mozilla.org/autocomplete/controller;1"].
- getService(Ci.nsIAutoCompleteController);
-
- // Make an AutoCompleteInput that uses our searches and confirms results.
- let input = new AutoCompleteInput([ search.name ]);
- input.textValue = aSearchString;
-
- // Caret must be at the end for autofill to happen.
- let strLen = aSearchString.length;
- input.selectTextRange(strLen, strLen);
- controller.input = input;
- controller.startSearch(aSearchString);
-
- input.onSearchComplete = function onSearchComplete() {
- aOnCompleteCallback(controller);
-
- // Clean up.
- unregisterAutoCompleteSearch(search);
- run_next_test();
- };
-}
diff --git a/toolkit/components/autocomplete/tests/unit/test_finalCompleteValue.js b/toolkit/components/autocomplete/tests/unit/test_finalCompleteValue.js
deleted file mode 100644
index fcac8ae43f..0000000000
--- a/toolkit/components/autocomplete/tests/unit/test_finalCompleteValue.js
+++ /dev/null
@@ -1,48 +0,0 @@
-function AutoCompleteResult(aValues, aFinalCompleteValues) {
- this._values = aValues;
- this._finalCompleteValues = aFinalCompleteValues;
-}
-AutoCompleteResult.prototype = Object.create(AutoCompleteResultBase.prototype);
-
-function AutoCompleteInput(aSearches) {
- this.searches = aSearches;
- this.popup.selectedIndex = 0;
-}
-AutoCompleteInput.prototype = Object.create(AutoCompleteInputBase.prototype);
-
-add_test(function test_handleEnter_mouse() {
- doSearch("moz", "mozilla.com", "http://www.mozilla.com", function(aController) {
- do_check_eq(aController.input.textValue, "moz");
- do_check_eq(aController.getFinalCompleteValueAt(0), "http://www.mozilla.com");
- // Keyboard interaction is tested by test_finalCompleteValueSelectedIndex.js
- // so here just test popup selection.
- aController.handleEnter(true);
- do_check_eq(aController.input.textValue, "http://www.mozilla.com");
- });
-});
-
-function doSearch(aSearchString, aResultValue, aFinalCompleteValue, aOnCompleteCallback) {
- let search = new AutoCompleteSearchBase(
- "search",
- new AutoCompleteResult([ aResultValue ], [ aFinalCompleteValue ])
- );
- registerAutoCompleteSearch(search);
-
- let controller = Cc["@mozilla.org/autocomplete/controller;1"].
- getService(Ci.nsIAutoCompleteController);
-
- // Make an AutoCompleteInput that uses our searches and confirms results.
- let input = new AutoCompleteInput([ search.name ]);
- input.textValue = aSearchString;
-
- controller.input = input;
- controller.startSearch(aSearchString);
-
- input.onSearchComplete = function onSearchComplete() {
- aOnCompleteCallback(controller);
-
- // Clean up.
- unregisterAutoCompleteSearch(search);
- run_next_test();
- };
-}
diff --git a/toolkit/components/autocomplete/tests/unit/test_finalCompleteValueSelectedIndex.js b/toolkit/components/autocomplete/tests/unit/test_finalCompleteValueSelectedIndex.js
deleted file mode 100644
index 6556a26dc5..0000000000
--- a/toolkit/components/autocomplete/tests/unit/test_finalCompleteValueSelectedIndex.js
+++ /dev/null
@@ -1,119 +0,0 @@
-function AutoCompleteResult(aResultValues) {
- this._values = aResultValues.map(x => x[0]);
- this._finalCompleteValues = aResultValues.map(x => x[1]);
-}
-AutoCompleteResult.prototype = Object.create(AutoCompleteResultBase.prototype);
-
-var selectByWasCalled = false;
-function AutoCompleteInput(aSearches) {
- this.searches = aSearches;
- this.popup.selectedIndex = 0;
- this.popup.selectBy = function(reverse, page) {
- Assert.equal(selectByWasCalled, false);
- selectByWasCalled = true;
- Assert.equal(reverse, false);
- Assert.equal(page, false);
- this.selectedIndex += (reverse ? -1 : 1) * (page ? 100 : 1);
- };
- this.completeSelectedIndex = true;
-}
-AutoCompleteInput.prototype = Object.create(AutoCompleteInputBase.prototype);
-
-add_test(function test_handleEnter_key() {
- let results = [
- ["mozilla.com", "http://www.mozilla.com"],
- ["mozilla.org", "http://www.mozilla.org"],
- ];
- // First check the case where we do select a value with the keyboard:
- doSearch("moz", results, function(aController) {
- Assert.equal(aController.input.textValue, "moz");
- Assert.equal(aController.getFinalCompleteValueAt(0), "http://www.mozilla.com");
- Assert.equal(aController.getFinalCompleteValueAt(1), "http://www.mozilla.org");
-
- Assert.equal(aController.input.popup.selectedIndex, 0);
- aController.handleKeyNavigation(Ci.nsIDOMKeyEvent.DOM_VK_DOWN);
- Assert.equal(aController.input.popup.selectedIndex, 1);
- // Simulate mouse interaction changing selectedIndex
- // ie NOT keyboard interaction:
- aController.input.popup.selectedIndex = 0;
-
- aController.handleEnter(false);
- // Verify that the keyboard-selected thing got inserted,
- // and not the mouse selection:
- Assert.equal(aController.input.textValue, "http://www.mozilla.org");
- });
-});
-
-add_test(function test_handleEnter_mouse() {
- let results = [
- ["mozilla.com", "http://www.mozilla.com"],
- ["mozilla.org", "http://www.mozilla.org"],
- ];
- // Then the case where we do not:
- doSearch("moz", results, function(aController) {
- Assert.equal(aController.input.textValue, "moz");
- Assert.equal(aController.getFinalCompleteValueAt(0), "http://www.mozilla.com");
- Assert.equal(aController.getFinalCompleteValueAt(1), "http://www.mozilla.org");
-
- Assert.equal(aController.input.popup.selectedIndex, 0);
- aController.input.popupOpen = true;
- // Simulate mouse interaction changing selectedIndex
- // ie NOT keyboard interaction:
- aController.input.popup.selectedIndex = 1;
- Assert.equal(selectByWasCalled, false);
- Assert.equal(aController.input.popup.selectedIndex, 1);
-
- aController.handleEnter(false);
- // Verify that the input stayed the same, because no selection was made
- // with the keyboard:
- Assert.equal(aController.input.textValue, "moz");
- });
-});
-
-add_test(function test_handleEnter_preselected() {
- let results = [
- ["mozilla.com", "http://www.mozilla.com"],
- ["mozilla.org", "http://www.mozilla.org"],
- ];
- // Then test a preselection.
- doSearch("moz", results, function(aController) {
- Assert.equal(aController.input.textValue, "moz");
- Assert.equal(aController.getFinalCompleteValueAt(0), "http://www.mozilla.com");
- Assert.equal(aController.getFinalCompleteValueAt(1), "http://www.mozilla.org");
-
- aController.setInitiallySelectedIndex(0);
-
- aController.handleEnter(false);
- // Verify that the input stayed the same, because no selection was made
- // with the keyboard:
- Assert.equal(aController.input.textValue, "http://www.mozilla.com");
- });
-});
-
-function doSearch(aSearchString, aResults, aOnCompleteCallback) {
- selectByWasCalled = false;
- let search = new AutoCompleteSearchBase(
- "search",
- new AutoCompleteResult(aResults)
- );
- registerAutoCompleteSearch(search);
-
- let controller = Cc["@mozilla.org/autocomplete/controller;1"].
- getService(Ci.nsIAutoCompleteController);
-
- // Make an AutoCompleteInput that uses our searches and confirms results.
- let input = new AutoCompleteInput([ search.name ]);
- input.textValue = aSearchString;
-
- controller.input = input;
- controller.startSearch(aSearchString);
-
- input.onSearchComplete = function onSearchComplete() {
- aOnCompleteCallback(controller);
-
- // Clean up.
- unregisterAutoCompleteSearch(search);
- run_next_test();
- };
-}
-
diff --git a/toolkit/components/autocomplete/tests/unit/test_finalCompleteValue_defaultIndex.js b/toolkit/components/autocomplete/tests/unit/test_finalCompleteValue_defaultIndex.js
deleted file mode 100644
index 4942e7a9ff..0000000000
--- a/toolkit/components/autocomplete/tests/unit/test_finalCompleteValue_defaultIndex.js
+++ /dev/null
@@ -1,107 +0,0 @@
-function AutoCompleteResult(aResultValues) {
- this.defaultIndex = 0;
- this._values = aResultValues.map(x => x[0]);
- this._finalCompleteValues = aResultValues.map(x => x[1]);
-}
-AutoCompleteResult.prototype = Object.create(AutoCompleteResultBase.prototype);
-
-function AutoCompleteInput(aSearches) {
- this.searches = aSearches;
- this.popup.selectedIndex = 0;
- this.completeSelectedIndex = true;
- this.completeDefaultIndex = true;
-}
-AutoCompleteInput.prototype = Object.create(AutoCompleteInputBase.prototype);
-
-add_test(function test_handleEnter() {
- let results = [
- ["mozilla.com", "https://www.mozilla.com"],
- ["gomozilla.org", "http://www.gomozilla.org"],
- ];
- doSearch("moz", results, { selectedIndex: 0 }, controller => {
- let input = controller.input;
- Assert.equal(input.textValue, "mozilla.com");
- Assert.equal(controller.getFinalCompleteValueAt(0), results[0][1]);
- Assert.equal(controller.getFinalCompleteValueAt(1), results[1][1]);
- Assert.equal(input.popup.selectedIndex, 0);
-
- controller.handleEnter(false);
- // Verify that the keyboard-selected thing got inserted,
- // and not the mouse selection:
- Assert.equal(controller.input.textValue, "https://www.mozilla.com");
- });
-});
-
-add_test(function test_handleEnter_otherSelected() {
- // The popup selection may not coincide with what is filled into the input
- // field, for example if the user changed it with the mouse and then pressed
- // Enter. In such a case we should still use the inputField value and not the
- // popup selected value.
- let results = [
- ["mozilla.com", "https://www.mozilla.com"],
- ["gomozilla.org", "http://www.gomozilla.org"],
- ];
- doSearch("moz", results, { selectedIndex: 1 }, controller => {
- let input = controller.input;
- Assert.equal(input.textValue, "mozilla.com");
- Assert.equal(controller.getFinalCompleteValueAt(0), results[0][1]);
- Assert.equal(controller.getFinalCompleteValueAt(1), results[1][1]);
- Assert.equal(input.popup.selectedIndex, 1);
-
- controller.handleEnter(false);
- // Verify that the keyboard-selected thing got inserted,
- // and not the mouse selection:
- Assert.equal(controller.input.textValue, "https://www.mozilla.com");
- });
-});
-
-add_test(function test_handleEnter_otherSelected_nocompleteselectedindex() {
- let results = [
- ["mozilla.com", "https://www.mozilla.com"],
- ["gomozilla.org", "http://www.gomozilla.org"],
- ];
- doSearch("moz", results, { selectedIndex: 1,
- completeSelectedIndex: false }, controller => {
- let input = controller.input;
- Assert.equal(input.textValue, "mozilla.com");
- Assert.equal(controller.getFinalCompleteValueAt(0), results[0][1]);
- Assert.equal(controller.getFinalCompleteValueAt(1), results[1][1]);
- Assert.equal(input.popup.selectedIndex, 1);
-
- controller.handleEnter(false);
- // Verify that the keyboard-selected result is inserted, not the
- // defaultComplete.
- Assert.equal(controller.input.textValue, "http://www.gomozilla.org");
- });
-});
-
-function doSearch(aSearchString, aResults, aOptions, aOnCompleteCallback) {
- let search = new AutoCompleteSearchBase(
- "search",
- new AutoCompleteResult(aResults)
- );
- registerAutoCompleteSearch(search);
-
- let input = new AutoCompleteInput([ search.name ]);
- input.textValue = aSearchString;
- if ("selectedIndex" in aOptions) {
- input.popup.selectedIndex = aOptions.selectedIndex;
- }
- if ("completeSelectedIndex" in aOptions) {
- input.completeSelectedIndex = aOptions.completeSelectedIndex;
- }
- // Needed for defaultIndex completion.
- input.selectTextRange(aSearchString.length, aSearchString.length);
-
- let controller = Cc["@mozilla.org/autocomplete/controller;1"].
- getService(Ci.nsIAutoCompleteController);
- controller.input = input;
- controller.startSearch(aSearchString);
-
- input.onSearchComplete = function onSearchComplete() {
- aOnCompleteCallback(controller);
-
- unregisterAutoCompleteSearch(search);
- run_next_test();
- };
-}
diff --git a/toolkit/components/autocomplete/tests/unit/test_finalCompleteValue_forceComplete.js b/toolkit/components/autocomplete/tests/unit/test_finalCompleteValue_forceComplete.js
deleted file mode 100644
index 5642d3e3ec..0000000000
--- a/toolkit/components/autocomplete/tests/unit/test_finalCompleteValue_forceComplete.js
+++ /dev/null
@@ -1,104 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function AutoCompleteResult(aValues, aFinalCompleteValues) {
- this._values = aValues;
- this._finalCompleteValues = aFinalCompleteValues;
- this.defaultIndex = 0;
-}
-AutoCompleteResult.prototype = Object.create(AutoCompleteResultBase.prototype);
-
-function AutoCompleteInput(aSearches) {
- this.searches = aSearches;
- this.popup.selectedIndex = -1;
-}
-AutoCompleteInput.prototype = Object.create(AutoCompleteInputBase.prototype);
-
-function run_test() {
- run_next_test();
-}
-
-add_test(function test_handleEnterWithDirectMatchCompleteSelectedIndex() {
- doSearch("moz", "mozilla.com", "http://www.mozilla.com",
- { forceComplete: true, completeSelectedIndex: true }, function(aController) {
- do_check_eq(aController.input.textValue, "moz");
- do_check_eq(aController.getFinalCompleteValueAt(0), "http://www.mozilla.com");
- aController.handleEnter(false);
- // After enter the final complete value should be shown in the input.
- do_check_eq(aController.input.textValue, "http://www.mozilla.com");
- });
-});
-
-add_test(function test_handleEnterWithDirectMatch() {
- doSearch("mozilla", "mozilla.com", "http://www.mozilla.com",
- { forceComplete: true, completeDefaultIndex: true }, function(aController) {
- // Should autocomplete the search string to a suggestion.
- do_check_eq(aController.input.textValue, "mozilla.com");
- do_check_eq(aController.getFinalCompleteValueAt(0), "http://www.mozilla.com");
- aController.handleEnter(false);
- // After enter the final complete value should be shown in the input.
- do_check_eq(aController.input.textValue, "http://www.mozilla.com");
- });
-});
-
-add_test(function test_handleEnterWithNoMatch() {
- doSearch("mozilla", "mozilla.com", "http://www.mozilla.com",
- { forceComplete: true, completeDefaultIndex: true }, function(aController) {
- // Should autocomplete the search string to a suggestion.
- do_check_eq(aController.input.textValue, "mozilla.com");
- do_check_eq(aController.getFinalCompleteValueAt(0), "http://www.mozilla.com");
- // Now input something that does not match...
- aController.input.textValue = "mozillax";
- // ... and confirm. We don't want one of the values from the previous
- // results to be taken, since what's now in the input field doesn't match.
- aController.handleEnter(false);
- do_check_eq(aController.input.textValue, "mozillax");
- });
-});
-
-add_test(function test_handleEnterWithIndirectMatch() {
- doSearch("com", "mozilla.com", "http://www.mozilla.com",
- { forceComplete: true, completeDefaultIndex: true }, function(aController) {
- // Should autocomplete the search string to a suggestion.
- do_check_eq(aController.input.textValue, "com >> mozilla.com");
- do_check_eq(aController.getFinalCompleteValueAt(0), "http://www.mozilla.com");
- aController.handleEnter(false);
- // After enter the final complete value from the suggestion should be shown
- // in the input.
- do_check_eq(aController.input.textValue, "http://www.mozilla.com");
- });
-});
-
-function doSearch(aSearchString, aResultValue, aFinalCompleteValue,
- aInputProps, aOnCompleteCallback) {
- let search = new AutoCompleteSearchBase(
- "search",
- new AutoCompleteResult([ aResultValue ], [ aFinalCompleteValue ])
- );
- registerAutoCompleteSearch(search);
-
- let controller = Cc["@mozilla.org/autocomplete/controller;1"].
- getService(Ci.nsIAutoCompleteController);
-
- // Make an AutoCompleteInput that uses our searches and confirms results.
- let input = new AutoCompleteInput([ search.name ]);
- for (var p in aInputProps) {
- input[p] = aInputProps[p];
- }
- input.textValue = aSearchString;
- // Place the cursor at the end of the input so that completion to
- // default index will kick in.
- input.selectTextRange(aSearchString.length, aSearchString.length);
-
- controller.input = input;
- controller.startSearch(aSearchString);
-
- input.onSearchComplete = function onSearchComplete() {
- aOnCompleteCallback(controller);
-
- // Clean up.
- unregisterAutoCompleteSearch(search);
- run_next_test();
- };
-}
diff --git a/toolkit/components/autocomplete/tests/unit/test_finalDefaultCompleteValue.js b/toolkit/components/autocomplete/tests/unit/test_finalDefaultCompleteValue.js
deleted file mode 100644
index c983d969b3..0000000000
--- a/toolkit/components/autocomplete/tests/unit/test_finalDefaultCompleteValue.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function AutoCompleteResult(aValues, aFinalCompleteValues) {
- this._values = aValues;
- this._finalCompleteValues = aFinalCompleteValues;
- this.defaultIndex = 0;
-}
-AutoCompleteResult.prototype = Object.create(AutoCompleteResultBase.prototype);
-
-function AutoCompleteInput(aSearches) {
- this.searches = aSearches;
- this.popup.selectedIndex = -1;
- this.completeDefaultIndex = true;
-}
-AutoCompleteInput.prototype = Object.create(AutoCompleteInputBase.prototype);
-
-function run_test() {
- run_next_test();
-}
-
-add_test(function test_keyNavigation() {
- doSearch("moz", "mozilla.com", "http://www.mozilla.com", function(aController) {
- do_check_eq(aController.input.textValue, "mozilla.com");
- aController.handleKeyNavigation(Ci.nsIDOMKeyEvent.DOM_VK_RIGHT);
- do_check_eq(aController.input.textValue, "mozilla.com");
- });
-});
-
-add_test(function test_handleEnter() {
- doSearch("moz", "mozilla.com", "http://www.mozilla.com", function(aController) {
- do_check_eq(aController.input.textValue, "mozilla.com");
- aController.handleEnter(false);
- do_check_eq(aController.input.textValue, "http://www.mozilla.com");
- });
-});
-
-function doSearch(aSearchString, aResultValue, aFinalCompleteValue, aOnCompleteCallback) {
- let search = new AutoCompleteSearchBase(
- "search",
- new AutoCompleteResult([ aResultValue ], [ aFinalCompleteValue ])
- );
- registerAutoCompleteSearch(search);
-
- let controller = Cc["@mozilla.org/autocomplete/controller;1"].
- getService(Ci.nsIAutoCompleteController);
-
- // Make an AutoCompleteInput that uses our searches and confirms results.
- let input = new AutoCompleteInput([ search.name ]);
- input.textValue = aSearchString;
-
- // Caret must be at the end for autofill to happen.
- let strLen = aSearchString.length;
- input.selectTextRange(strLen, strLen);
- controller.input = input;
- controller.startSearch(aSearchString);
-
- input.onSearchComplete = function onSearchComplete() {
- aOnCompleteCallback(controller);
-
- // Clean up.
- unregisterAutoCompleteSearch(search);
- run_next_test();
- };
-}
diff --git a/toolkit/components/autocomplete/tests/unit/test_hiddenResult.js b/toolkit/components/autocomplete/tests/unit/test_hiddenResult.js
deleted file mode 100644
index 8e24857165..0000000000
--- a/toolkit/components/autocomplete/tests/unit/test_hiddenResult.js
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function AutoCompleteResult(aValues) {
- this._values = aValues;
- this.defaultIndex = -1;
- this._typeAheadResult = false;
-}
-AutoCompleteResult.prototype = Object.create(AutoCompleteResultBase.prototype);
-
-function AutoCompleteTypeAheadResult(aValues) {
- this._values = aValues;
- this.defaultIndex = 0;
- this._typeAheadResult = true;
-}
-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.
- */
-function run_test() {
- do_test_pending();
-
- var inputStr = "moz";
-
- // Type ahead result
- var searchTypeAhead = new AutoCompleteSearchBase("search1",
- new AutoCompleteTypeAheadResult(["mozillaTest1"]));
- // 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]);
- input.completeDefaultIndex = true;
- input.textValue = inputStr;
-
- // Caret must be at the end. Autofill doesn't happen unless you're typing
- // characters at the end.
- var strLen = inputStr.length;
- input.selectTextRange(strLen, strLen);
- do_check_eq(input.selectionStart, strLen);
- do_check_eq(input.selectionEnd, strLen);
-
- var controller = Cc["@mozilla.org/autocomplete/controller;1"].
- getService(Ci.nsIAutoCompleteController);
-
- controller.input = input;
- controller.startSearch(inputStr);
-
- input.onSearchComplete = function() {
- // Hidden results should still be able to do inline autocomplete
- do_check_eq(input.textValue, "mozillaTest1");
-
- // Now, let's fill the textbox with the first result of the popup.
- // The first search is marked as hidden, so we must always get the
- // second search.
- controller.handleEnter(true);
- do_check_eq(input.textValue, "mozillaTest2");
-
- // Only one item in the popup.
- do_check_eq(controller.matchCount, 1);
-
- // Unregister searches
- unregisterAutoCompleteSearch(searchNormal);
- unregisterAutoCompleteSearch(searchTypeAhead);
- do_test_finished();
- };
-}
diff --git a/toolkit/components/autocomplete/tests/unit/test_immediate_search.js b/toolkit/components/autocomplete/tests/unit/test_immediate_search.js
deleted file mode 100644
index 0579f5dcb0..0000000000
--- a/toolkit/components/autocomplete/tests/unit/test_immediate_search.js
+++ /dev/null
@@ -1,157 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-function AutoCompleteImmediateSearch(aName, aResult) {
- this.name = aName;
- this._result = aResult;
-}
-AutoCompleteImmediateSearch.prototype = Object.create(AutoCompleteSearchBase.prototype);
-AutoCompleteImmediateSearch.prototype.searchType =
- Ci.nsIAutoCompleteSearchDescriptor.SEARCH_TYPE_IMMEDIATE;
-AutoCompleteImmediateSearch.prototype.QueryInterface =
- XPCOMUtils.generateQI([Ci.nsIFactory,
- Ci.nsIAutoCompleteSearch,
- Ci.nsIAutoCompleteSearchDescriptor]);
-
-function AutoCompleteDelayedSearch(aName, aResult) {
- this.name = aName;
- this._result = aResult;
-}
-AutoCompleteDelayedSearch.prototype = Object.create(AutoCompleteSearchBase.prototype);
-
-function AutoCompleteResult(aValues, aDefaultIndex) {
- this._values = aValues;
- this.defaultIndex = aDefaultIndex;
-}
-AutoCompleteResult.prototype = Object.create(AutoCompleteResultBase.prototype);
-
-function run_test() {
- run_next_test();
-}
-
-/**
- * An immediate search should be executed synchronously.
- */
-add_test(function test_immediate_search() {
- let inputStr = "moz";
-
- let immediateSearch = new AutoCompleteImmediateSearch(
- "immediate", new AutoCompleteResult(["moz-immediate"], 0));
- registerAutoCompleteSearch(immediateSearch);
- let delayedSearch = new AutoCompleteDelayedSearch(
- "delayed", new AutoCompleteResult(["moz-delayed"], 0));
- registerAutoCompleteSearch(delayedSearch);
-
- let controller = Cc["@mozilla.org/autocomplete/controller;1"].
- getService(Ci.nsIAutoCompleteController);
-
- let input = new AutoCompleteInputBase([delayedSearch.name,
- immediateSearch.name]);
- input.completeDefaultIndex = true;
- input.textValue = inputStr;
-
- // Caret must be at the end. Autofill doesn't happen unless you're typing
- // characters at the end.
- let strLen = inputStr.length;
- input.selectTextRange(strLen, strLen);
-
- controller.input = input;
- controller.startSearch(inputStr);
-
- // Immediately check the result, the immediate search should have finished.
- do_check_eq(input.textValue, "moz-immediate");
-
- // Wait for both queries to finish.
- input.onSearchComplete = function() {
- // Sanity check.
- do_check_eq(input.textValue, "moz-immediate");
-
- unregisterAutoCompleteSearch(immediateSearch);
- unregisterAutoCompleteSearch(delayedSearch);
- run_next_test();
- };
-});
-
-/**
- * An immediate search should be executed before any delayed search.
- */
-add_test(function test_immediate_search_notimeout() {
- let inputStr = "moz";
-
- let immediateSearch = new AutoCompleteImmediateSearch(
- "immediate", new AutoCompleteResult(["moz-immediate"], 0));
- registerAutoCompleteSearch(immediateSearch);
-
- let delayedSearch = new AutoCompleteDelayedSearch(
- "delayed", new AutoCompleteResult(["moz-delayed"], 0));
- registerAutoCompleteSearch(delayedSearch);
-
- let controller = Cc["@mozilla.org/autocomplete/controller;1"].
- getService(Ci.nsIAutoCompleteController);
-
- let input = new AutoCompleteInputBase([delayedSearch.name,
- immediateSearch.name]);
- input.completeDefaultIndex = true;
- input.textValue = inputStr;
- input.timeout = 0;
-
- // Caret must be at the end. Autofill doesn't happen unless you're typing
- // characters at the end.
- let strLen = inputStr.length;
- input.selectTextRange(strLen, strLen);
-
- controller.input = input;
- let complete = false;
- input.onSearchComplete = function() {
- complete = true;
- };
- controller.startSearch(inputStr);
- do_check_true(complete);
-
- // Immediately check the result, the immediate search should have finished.
- do_check_eq(input.textValue, "moz-immediate");
-
- unregisterAutoCompleteSearch(immediateSearch);
- unregisterAutoCompleteSearch(delayedSearch);
- run_next_test();
-});
-
-/**
- * A delayed search should be executed synchronously with a zero timeout.
- */
-add_test(function test_delayed_search_notimeout() {
- let inputStr = "moz";
-
- let delayedSearch = new AutoCompleteDelayedSearch(
- "delayed", new AutoCompleteResult(["moz-delayed"], 0));
- registerAutoCompleteSearch(delayedSearch);
-
- let controller = Cc["@mozilla.org/autocomplete/controller;1"].
- getService(Ci.nsIAutoCompleteController);
-
- let input = new AutoCompleteInputBase([delayedSearch.name]);
- input.completeDefaultIndex = true;
- input.textValue = inputStr;
- input.timeout = 0;
-
- // Caret must be at the end. Autofill doesn't happen unless you're typing
- // characters at the end.
- let strLen = inputStr.length;
- input.selectTextRange(strLen, strLen);
-
- controller.input = input;
- let complete = false;
- input.onSearchComplete = function() {
- complete = true;
- };
- controller.startSearch(inputStr);
- do_check_true(complete);
-
- // Immediately check the result, the delayed search should have finished.
- do_check_eq(input.textValue, "moz-delayed");
-
- unregisterAutoCompleteSearch(delayedSearch);
- run_next_test();
-});
diff --git a/toolkit/components/autocomplete/tests/unit/test_insertMatchAt.js b/toolkit/components/autocomplete/tests/unit/test_insertMatchAt.js
deleted file mode 100644
index 14ee388b80..0000000000
--- a/toolkit/components/autocomplete/tests/unit/test_insertMatchAt.js
+++ /dev/null
@@ -1,14 +0,0 @@
-function run_test() {
- let result = Cc["@mozilla.org/autocomplete/simple-result;1"]
- .createInstance(Ci.nsIAutoCompleteSimpleResult);
- result.appendMatch("a", "");
- result.appendMatch("c", "");
- result.insertMatchAt(1, "b", "");
- result.insertMatchAt(3, "d", "");
-
- Assert.equal(result.matchCount, 4);
- Assert.equal(result.getValueAt(0), "a");
- Assert.equal(result.getValueAt(1), "b");
- Assert.equal(result.getValueAt(2), "c");
- Assert.equal(result.getValueAt(3), "d");
-}
diff --git a/toolkit/components/autocomplete/tests/unit/test_popupSelectionVsDefaultCompleteValue.js b/toolkit/components/autocomplete/tests/unit/test_popupSelectionVsDefaultCompleteValue.js
deleted file mode 100644
index fb41533558..0000000000
--- a/toolkit/components/autocomplete/tests/unit/test_popupSelectionVsDefaultCompleteValue.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function AutoCompleteTypeAheadResult(aValues, aFinalCompleteValues) {
- this._values = aValues;
- this._finalCompleteValues = aFinalCompleteValues;
- this.defaultIndex = 0;
- this._typeAheadResult = true;
-}
-AutoCompleteTypeAheadResult.prototype = Object.create(AutoCompleteResultBase.prototype);
-
-function AutoCompleteResult(aValues) {
- this._values = aValues;
-}
-AutoCompleteResult.prototype = Object.create(AutoCompleteResultBase.prototype);
-
-function AutoCompleteInput(aSearches) {
- this.searches = aSearches;
- this.popupOpen = true;
- this.completeDefaultIndex = true;
- this.completeSelectedIndex = true;
-}
-AutoCompleteInput.prototype = Object.create(AutoCompleteInputBase.prototype);
-
-function run_test() {
- run_next_test();
-}
-
-add_test(function test_handleEnter() {
- doSearch("moz", function(aController) {
- do_check_eq(aController.input.textValue, "mozilla.com");
- aController.handleEnter(true);
- do_check_eq(aController.input.textValue, "mozilla.org");
- });
-});
-
-function doSearch(aSearchString, aOnCompleteCallback) {
- let typeAheadSearch = new AutoCompleteSearchBase(
- "typeAheadSearch",
- new AutoCompleteTypeAheadResult([ "mozilla.com" ], [ "http://www.mozilla.com" ])
- );
- registerAutoCompleteSearch(typeAheadSearch);
-
- let search = new AutoCompleteSearchBase(
- "search",
- new AutoCompleteResult([ "mozilla.org" ])
- );
- registerAutoCompleteSearch(search);
-
- let controller = Cc["@mozilla.org/autocomplete/controller;1"].
- getService(Ci.nsIAutoCompleteController);
-
- // Make an AutoCompleteInput that uses our searches and confirms results.
- let input = new AutoCompleteInput([ typeAheadSearch.name, search.name ]);
- input.textValue = aSearchString;
-
- // Caret must be at the end for autofill to happen.
- let strLen = aSearchString.length;
- input.selectTextRange(strLen, strLen);
- controller.input = input;
- controller.startSearch(aSearchString);
-
- input.onSearchComplete = function onSearchComplete() {
- aOnCompleteCallback(controller);
-
- // Clean up.
- unregisterAutoCompleteSearch(search);
- run_next_test();
- };
-}
diff --git a/toolkit/components/autocomplete/tests/unit/test_previousResult.js b/toolkit/components/autocomplete/tests/unit/test_previousResult.js
deleted file mode 100644
index bfe6c7aaea..0000000000
--- a/toolkit/components/autocomplete/tests/unit/test_previousResult.js
+++ /dev/null
@@ -1,280 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/**
- * Unit test for Bug 438861 - Previous search results not returned to multiple
- * searches.
- */
-
-
-/**
- * Dummy nsIAutoCompleteInput source that returns
- * the given list of AutoCompleteSearch names.
- *
- * Implements only the methods needed for this test.
- */
-function AutoCompleteInput(aSearches) {
- this.searches = aSearches;
-}
-AutoCompleteInput.prototype = {
- constructor: AutoCompleteInput,
-
- // Array of AutoCompleteSearch names
- searches: null,
-
- minResultsForPopup: 0,
- timeout: 10,
- searchParam: "",
- textValue: "",
- disableAutoComplete: false,
- completeDefaultIndex: false,
-
- get searchCount() {
- return this.searches.length;
- },
-
- getSearchAt: function(aIndex) {
- return this.searches[aIndex];
- },
-
- onSearchBegin: function() {},
- onSearchComplete: function() {},
-
- popupOpen: false,
-
- popup: {
- setSelectedIndex: function(aIndex) {},
- invalidate: function() {},
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompletePopup))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
- },
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompleteInput))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
-}
-
-
-
-/**
- * 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 {
- this.searchResult = Ci.nsIAutoCompleteResult.NOMATCH;
- }
-}
-AutoCompleteResult.prototype = {
- constructor: AutoCompleteResult,
-
- // Arrays
- _values: null,
- _comments: null,
- _styles: null,
-
- searchString: "",
- searchResult: null,
-
- defaultIndex: 0,
-
- get matchCount() {
- return this._values.length;
- },
-
- 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 "";
- },
-
- getFinalCompleteValueAt: function(aIndex) {
- return this.getValueAt(aIndex);
- },
-
- removeValueAt: function (aRowIndex, aRemoveFromDb) {},
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompleteResult))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
-}
-
-
-/**
- * nsIAutoCompleteSearch implementation that always returns
- * the same result set.
- */
-function AutoCompleteSearch(aName, aResult) {
- this.name = aName;
- this._result = aResult;
-}
-AutoCompleteSearch.prototype = {
- constructor: AutoCompleteSearch,
-
- // Search name. Used by AutoCompleteController
- name: null,
-
- // AutoCompleteResult
- _result: null,
-
- _previousResult: null,
-
-
- /**
- * Return the same result set for every search
- */
- startSearch: function(aSearchString,
- aSearchParam,
- aPreviousResult,
- aListener)
- {
- this._previousResult = aPreviousResult;
- aListener.onSearchResult(this, this._result);
- },
-
- stopSearch: function() {},
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIFactory) ||
- iid.equals(Ci.nsIAutoCompleteSearch))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- },
-
- // nsIFactory implementation
- createInstance: function(outer, iid) {
- return this.QueryInterface(iid);
- }
-}
-
-
-/**
- * Helper to register an AutoCompleteSearch with the given name.
- * Allows the AutoCompleteController to find the search.
- */
-function registerAutoCompleteSearch(aSearch) {
- var name = "@mozilla.org/autocomplete/search;1?name=" + aSearch.name;
-
- var uuidGenerator = Cc["@mozilla.org/uuid-generator;1"].
- getService(Ci.nsIUUIDGenerator);
- 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;
-}
-
-
-/**
- * Helper to unregister an AutoCompleteSearch.
- */
-function unregisterAutoCompleteSearch(aSearch) {
- var componentManager = Components.manager
- .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",
- new AutoCompleteResult(["hello2"], [""], [""]));
-
- // Register search so AutoCompleteController can find them
- registerAutoCompleteSearch(search1);
- registerAutoCompleteSearch(search2);
-
- var controller = Components.classes["@mozilla.org/autocomplete/controller;1"].
- getService(Components.interfaces.nsIAutoCompleteController);
-
- // Make an AutoCompleteInput that uses our search
- // and confirms results on search complete
- var input = new AutoCompleteInput([search1.name,
- search2.name]);
- var numSearchesStarted = 0;
-
- input.onSearchBegin = function() {
- numSearchesStarted++;
- };
-
- input.onSearchComplete = function() {
- do_check_eq(controller.searchStatus,
- Ci.nsIAutoCompleteController.STATUS_COMPLETE_MATCH);
- do_check_eq(controller.matchCount, 2);
-
- if (numSearchesStarted == 1) {
- do_check_eq(search1._previousResult, null);
- do_check_eq(search2._previousResult, null);
-
- // Now start it again
- controller.startSearch("test");
- return;
- }
- do_check_neq(search1._previousResult, null);
- do_check_neq(search2._previousResult, null);
-
- // Unregister searches
- unregisterAutoCompleteSearch(search1);
- unregisterAutoCompleteSearch(search2);
-
- do_test_finished();
- };
-
- controller.input = input;
-
- // 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
deleted file mode 100644
index 5ef3454b49..0000000000
--- a/toolkit/components/autocomplete/tests/unit/test_stopSearch.js
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/**
- * Purpose of the test is to check that a stopSearch call comes always before a
- * startSearch call.
- */
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-
-/**
- * Dummy nsIAutoCompleteInput source that returns
- * the given list of AutoCompleteSearch names.
- *
- * Implements only the methods needed for this test.
- */
-function AutoCompleteInput(aSearches)
-{
- this.searches = aSearches;
-}
-AutoCompleteInput.prototype = {
- constructor: AutoCompleteInput,
- minResultsForPopup: 0,
- timeout: 10,
- searchParam: "",
- textValue: "hello",
- disableAutoComplete: false,
- completeDefaultIndex: false,
- set popupOpen(val) { return val; }, // ignore
- get popupOpen() { return false; },
- get searchCount() { return this.searches.length; },
- getSearchAt: function(aIndex) { return this.searches[aIndex]; },
- onSearchBegin: function() {},
- onSearchComplete: function() {},
- onTextReverted: function () {},
- onTextEntered: function () {},
- popup: {
- selectBy: function() {},
- invalidate: function() {},
- set selectedIndex(val) { return val; }, // ignore
- get selectedIndex() { return -1 },
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompletePopup])
- },
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteInput])
-}
-
-
-/**
- * nsIAutoCompleteSearch implementation.
- */
-function AutoCompleteSearch(aName)
-{
- this.name = aName;
-}
-AutoCompleteSearch.prototype = {
- constructor: AutoCompleteSearch,
- stopSearchInvoked: true,
- startSearch: function(aSearchString, aSearchParam, aPreviousResult, aListener)
- {
- print("Check stop search has been called");
- do_check_true(this.stopSearchInvoked);
- this.stopSearchInvoked = false;
- },
- stopSearch: function()
- {
- this.stopSearchInvoked = true;
- },
- QueryInterface: XPCOMUtils.generateQI([
- Ci.nsIFactory
- , Ci.nsIAutoCompleteSearch
- ]),
- createInstance: function(outer, iid)
- {
- return this.QueryInterface(iid);
- }
-}
-
-
-/**
- * Helper to register an AutoCompleteSearch with the given name.
- * Allows the AutoCompleteController to find the search.
- */
-function registerAutoCompleteSearch(aSearch)
-{
- let name = "@mozilla.org/autocomplete/search;1?name=" + aSearch.name;
- let uuidGenerator = Cc["@mozilla.org/uuid-generator;1"].
- getService(Ci.nsIUUIDGenerator);
- let cid = uuidGenerator.generateUUID();
- let desc = "Test AutoCompleteSearch";
- let 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;
-}
-
-
-/**
- * Helper to unregister an AutoCompleteSearch.
- */
-function unregisterAutoCompleteSearch(aSearch) {
- let componentManager = Components.manager
- .QueryInterface(Ci.nsIComponentRegistrar);
- componentManager.unregisterFactory(aSearch.cid, aSearch);
-}
-
-
-var gTests = [
- function(controller) {
- print("handleText");
- controller.input.textValue = "hel";
- controller.handleText();
- },
- function(controller) {
- print("handleStartComposition");
- controller.handleStartComposition();
- },
- function(controller) {
- print("handleEndComposition");
- controller.handleEndComposition();
- // an input event always follows compositionend event.
- controller.handleText();
- },
- function(controller) {
- print("handleEscape");
- controller.handleEscape();
- },
- function(controller) {
- print("handleEnter");
- controller.handleEnter(false);
- },
- function(controller) {
- print("handleTab");
- controller.handleTab();
- },
-
- function(controller) {
- print("handleKeyNavigation");
- controller.handleKeyNavigation(Ci.nsIDOMKeyEvent.DOM_VK_UP);
- },
-];
-
-
-var gSearch;
-var gCurrentTest;
-function run_test() {
- // Make an AutoCompleteSearch that always returns nothing
- gSearch = new AutoCompleteSearch("test");
- registerAutoCompleteSearch(gSearch);
-
- let controller = Cc["@mozilla.org/autocomplete/controller;1"].
- getService(Ci.nsIAutoCompleteController);
-
- // Make an AutoCompleteInput that uses our search.
- let input = new AutoCompleteInput([gSearch.name]);
- controller.input = input;
-
- input.onSearchBegin = function() {
- do_execute_soon(function() {
- gCurrentTest(controller);
- });
- };
- input.onSearchComplete = function() {
- run_next_test(controller);
- }
-
- // Search is asynchronous, so don't let the test finish immediately
- do_test_pending();
-
- run_next_test(controller);
-}
-
-function run_next_test(controller) {
- if (gTests.length == 0) {
- unregisterAutoCompleteSearch(gSearch);
- controller.stopSearch();
- controller.input = null;
- do_test_finished();
- return;
- }
-
- gCurrentTest = gTests.shift();
- controller.startSearch("hello");
-}
diff --git a/toolkit/components/autocomplete/tests/unit/xpcshell.ini b/toolkit/components/autocomplete/tests/unit/xpcshell.ini
deleted file mode 100644
index daf89db173..0000000000
--- a/toolkit/components/autocomplete/tests/unit/xpcshell.ini
+++ /dev/null
@@ -1,26 +0,0 @@
-[DEFAULT]
-head = head_autocomplete.js
-tail =
-
-[test_330578.js]
-[test_378079.js]
-[test_393191.js]
-[test_440866.js]
-[test_463023.js]
-[test_660156.js]
-[test_autocomplete_multiple.js]
-[test_autocomplete_userContextId.js]
-[test_autofillSelectedPopupIndex.js]
-[test_badDefaultIndex.js]
-[test_completeDefaultIndex_casing.js]
-[test_finalCompleteValue.js]
-[test_finalCompleteValue_defaultIndex.js]
-[test_finalCompleteValue_forceComplete.js]
-[test_finalCompleteValueSelectedIndex.js]
-[test_finalDefaultCompleteValue.js]
-[test_hiddenResult.js]
-[test_immediate_search.js]
-[test_insertMatchAt.js]
-[test_popupSelectionVsDefaultCompleteValue.js]
-[test_previousResult.js]
-[test_stopSearch.js]
diff --git a/toolkit/components/blocklist/nsBlocklistService.js b/toolkit/components/blocklist/nsBlocklistService.js
index 788ce192fc..67f283b26a 100644
--- a/toolkit/components/blocklist/nsBlocklistService.js
+++ b/toolkit/components/blocklist/nsBlocklistService.js
@@ -1117,9 +1117,6 @@ Blocklist.prototype = {
/* See nsIBlocklistService */
getPluginBlocklistState: function(plugin, appVersion, toolkitVersion) {
-#ifdef MOZ_WIDGET_ANDROID
- return Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
-#endif
if (!this._isBlocklistLoaded())
this._loadBlocklist();
return this._getPluginBlocklistState(plugin, this._pluginEntries,
diff --git a/toolkit/components/build/nsToolkitCompsCID.h b/toolkit/components/build/nsToolkitCompsCID.h
index 064f1dbc45..9e61edb260 100644
--- a/toolkit/components/build/nsToolkitCompsCID.h
+++ b/toolkit/components/build/nsToolkitCompsCID.h
@@ -81,7 +81,7 @@
#define NS_APPSTARTUP_CONTRACTID \
"@mozilla.org/toolkit/app-startup;1"
-#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
+#ifdef MOZ_UPDATER
#define NS_UPDATEPROCESSOR_CONTRACTID \
"@mozilla.org/updates/update-processor;1"
#endif
@@ -170,7 +170,7 @@
#define NS_FAVICONSERVICE_CID \
{ 0x984e3259, 0x9266, 0x49cf, { 0xb6, 0x05, 0x60, 0xb0, 0x22, 0xa0, 0x07, 0x56 } }
-#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
+#ifdef MOZ_UPDATER
#define NS_UPDATEPROCESSOR_CID \
{ 0xf3dcf644, 0x79e8, 0x4f59, { 0xa1, 0xbb, 0x87, 0x84, 0x54, 0x48, 0x8e, 0xf9 } }
#endif
diff --git a/toolkit/components/build/nsToolkitCompsModule.cpp b/toolkit/components/build/nsToolkitCompsModule.cpp
index a4293c6f95..420ff258ac 100644
--- a/toolkit/components/build/nsToolkitCompsModule.cpp
+++ b/toolkit/components/build/nsToolkitCompsModule.cpp
@@ -10,7 +10,7 @@
#endif
#include "nsToolkitCompsCID.h"
#include "nsFindService.h"
-#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
+#ifdef MOZ_UPDATER
#include "nsUpdateDriver.h"
#endif
@@ -47,13 +47,8 @@
#include "NativeFileWatcherNotSupported.h"
#endif // (XP_WIN)
-#if !defined(MOZ_WIDGET_ANDROID)
#define MOZ_HAS_TERMINATOR
-#endif
-
-#if defined(MOZ_HAS_TERMINATOR)
#include "nsTerminator.h"
-#endif
#define MOZ_HAS_PERFSTATS
@@ -122,7 +117,7 @@ nsUrlClassifierDBServiceConstructor(nsISupports *aOuter, REFNSIID aIID,
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBrowserStatusFilter)
-#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
+#ifdef MOZ_UPDATER
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUpdateProcessor)
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(FinalizationWitnessService, Init)
@@ -160,7 +155,7 @@ NS_DEFINE_NAMED_CID(NS_URLCLASSIFIERSTREAMUPDATER_CID);
NS_DEFINE_NAMED_CID(NS_URLCLASSIFIERUTILS_CID);
#endif
NS_DEFINE_NAMED_CID(NS_BROWSERSTATUSFILTER_CID);
-#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
+#ifdef MOZ_UPDATER
NS_DEFINE_NAMED_CID(NS_UPDATEPROCESSOR_CID);
#endif
NS_DEFINE_NAMED_CID(FINALIZATIONWITNESSSERVICE_CID);
@@ -197,7 +192,7 @@ static const Module::CIDEntry kToolkitCIDs[] = {
{ &kNS_URLCLASSIFIERUTILS_CID, false, nullptr, nsUrlClassifierUtilsConstructor },
#endif
{ &kNS_BROWSERSTATUSFILTER_CID, false, nullptr, nsBrowserStatusFilterConstructor },
-#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
+#ifdef MOZ_UPDATER
{ &kNS_UPDATEPROCESSOR_CID, false, nullptr, nsUpdateProcessorConstructor },
#endif
{ &kFINALIZATIONWITNESSSERVICE_CID, false, nullptr, FinalizationWitnessServiceConstructor },
@@ -236,7 +231,7 @@ static const Module::ContractIDEntry kToolkitContracts[] = {
{ NS_URLCLASSIFIERUTILS_CONTRACTID, &kNS_URLCLASSIFIERUTILS_CID },
#endif
{ NS_BROWSERSTATUSFILTER_CONTRACTID, &kNS_BROWSERSTATUSFILTER_CID },
-#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
+#ifdef MOZ_UPDATER
{ NS_UPDATEPROCESSOR_CONTRACTID, &kNS_UPDATEPROCESSOR_CID },
#endif
{ FINALIZATIONWITNESSSERVICE_CONTRACTID, &kFINALIZATIONWITNESSSERVICE_CID },
diff --git a/toolkit/components/captivedetect/moz.build b/toolkit/components/captivedetect/moz.build
index 3bb9cf5733..ee6a49aa5f 100644
--- a/toolkit/components/captivedetect/moz.build
+++ b/toolkit/components/captivedetect/moz.build
@@ -4,12 +4,7 @@
# 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/.
-XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
-
-XPIDL_SOURCES += [
- 'nsICaptivePortalDetector.idl',
-]
-
+XPIDL_SOURCES += ['nsICaptivePortalDetector.idl']
XPIDL_MODULE = 'captivedetect'
EXTRA_COMPONENTS += [
diff --git a/toolkit/components/captivedetect/test/unit/.eslintrc.js b/toolkit/components/captivedetect/test/unit/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/captivedetect/test/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/captivedetect/test/unit/head_setprefs.js b/toolkit/components/captivedetect/test/unit/head_setprefs.js
deleted file mode 100644
index bf621e31e7..0000000000
--- a/toolkit/components/captivedetect/test/unit/head_setprefs.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-'use strict';
-
-var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-Cu.import('resource://gre/modules/XPCOMUtils.jsm');
-Cu.import('resource://gre/modules/Services.jsm');
-Cu.import('resource://testing-common/httpd.js');
-
-XPCOMUtils.defineLazyServiceGetter(this, 'gCaptivePortalDetector',
- '@mozilla.org/toolkit/captive-detector;1',
- 'nsICaptivePortalDetector');
-
-const kCanonicalSitePath = '/canonicalSite.html';
-const kCanonicalSiteContent = 'true';
-const kPrefsCanonicalURL = 'captivedetect.canonicalURL';
-const kPrefsCanonicalContent = 'captivedetect.canonicalContent';
-const kPrefsMaxWaitingTime = 'captivedetect.maxWaitingTime';
-const kPrefsPollingTime = 'captivedetect.pollingTime';
-
-var gServer;
-var gServerURL;
-
-function setupPrefs() {
- let prefs = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefService)
- .QueryInterface(Components.interfaces.nsIPrefBranch);
- prefs.setCharPref(kPrefsCanonicalURL, gServerURL + kCanonicalSitePath);
- prefs.setCharPref(kPrefsCanonicalContent, kCanonicalSiteContent);
- prefs.setIntPref(kPrefsMaxWaitingTime, 0);
- prefs.setIntPref(kPrefsPollingTime, 1);
-}
-
-function run_captivedetect_test(xhr_handler, fakeUIResponse, testfun)
-{
- gServer = new HttpServer();
- gServer.registerPathHandler(kCanonicalSitePath, xhr_handler);
- gServer.start(-1);
- gServerURL = 'http://localhost:' + gServer.identity.primaryPort;
-
- setupPrefs();
-
- fakeUIResponse();
-
- testfun();
-}
diff --git a/toolkit/components/captivedetect/test/unit/test_abort.js b/toolkit/components/captivedetect/test/unit/test_abort.js
deleted file mode 100644
index f99805dfba..0000000000
--- a/toolkit/components/captivedetect/test/unit/test_abort.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-'use strict';
-
-const kInterfaceName = 'wifi';
-
-var server;
-var step = 0;
-var loginFinished = false;
-
-function xhr_handler(metadata, response) {
- response.setStatusLine(metadata.httpVersion, 200, 'OK');
- response.setHeader('Cache-Control', 'no-cache', false);
- response.setHeader('Content-Type', 'text/plain', false);
- if (loginFinished) {
- response.write('true');
- } else {
- response.write('false');
- }
-}
-
-function fakeUIResponse() {
- Services.obs.addObserver(function observe(subject, topic, data) {
- if (topic === 'captive-portal-login') {
- do_throw('should not receive captive-portal-login event');
- }
- }, 'captive-portal-login', false);
-}
-
-function test_abort() {
- do_test_pending();
-
- let callback = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsICaptivePortalCallback]),
- prepare: function prepare() {
- do_check_eq(++step, 1);
- gCaptivePortalDetector.finishPreparation(kInterfaceName);
- },
- complete: function complete(success) {
- do_throw('should not execute |complete| callback');
- },
- };
-
- gCaptivePortalDetector.checkCaptivePortal(kInterfaceName, callback);
- gCaptivePortalDetector.abort(kInterfaceName);
- gServer.stop(do_test_finished);
-}
-
-function run_test() {
- run_captivedetect_test(xhr_handler, fakeUIResponse, test_abort);
-}
diff --git a/toolkit/components/captivedetect/test/unit/test_abort_during_user_login.js b/toolkit/components/captivedetect/test/unit/test_abort_during_user_login.js
deleted file mode 100644
index ef98ac5eae..0000000000
--- a/toolkit/components/captivedetect/test/unit/test_abort_during_user_login.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-'use strict';
-
-const kInterfaceName = 'wifi';
-
-var server;
-var step = 0;
-var loginFinished = false;
-
-function xhr_handler(metadata, response) {
- response.setStatusLine(metadata.httpVersion, 200, 'OK');
- response.setHeader('Cache-Control', 'no-cache', false);
- response.setHeader('Content-Type', 'text/plain', false);
- if (loginFinished) {
- response.write('true');
- } else {
- response.write('false');
- }
-}
-
-function fakeUIResponse() {
- let requestId;
- Services.obs.addObserver(function observe(subject, topic, data) {
- if (topic === 'captive-portal-login') {
- let xhr = Cc['@mozilla.org/xmlextras/xmlhttprequest;1']
- .createInstance(Ci.nsIXMLHttpRequest);
- xhr.open('GET', gServerURL + kCanonicalSitePath, true);
- xhr.send();
- loginFinished = true;
- do_check_eq(++step, 2);
- requestId = JSON.parse(data).id;
- gCaptivePortalDetector.abort(kInterfaceName);
- }
- }, 'captive-portal-login', false);
- Services.obs.addObserver(function observe(subject, topic, data) {
- if (topic === 'captive-portal-login-abort') {
- do_check_eq(++step, 3);
- do_check_eq(JSON.parse(data).id, requestId);
- gServer.stop(do_test_finished);
- }
- }, 'captive-portal-login-abort', false);
-}
-
-function test_abort() {
- do_test_pending();
-
- let callback = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsICaptivePortalCallback]),
- prepare: function prepare() {
- do_check_eq(++step, 1);
- gCaptivePortalDetector.finishPreparation(kInterfaceName);
- },
- complete: function complete(success) {
- do_throw('should not execute |complete| callback');
- },
- };
-
- gCaptivePortalDetector.checkCaptivePortal(kInterfaceName, callback);
-}
-
-function run_test() {
- run_captivedetect_test(xhr_handler, fakeUIResponse, test_abort);
-}
diff --git a/toolkit/components/captivedetect/test/unit/test_abort_ongoing_request.js b/toolkit/components/captivedetect/test/unit/test_abort_ongoing_request.js
deleted file mode 100644
index ad99903dff..0000000000
--- a/toolkit/components/captivedetect/test/unit/test_abort_ongoing_request.js
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-'use strict';
-
-const kInterfaceName = 'wifi';
-const kOtherInterfaceName = 'ril';
-
-var server;
-var step = 0;
-var loginFinished = false;
-
-function xhr_handler(metadata, response) {
- response.setStatusLine(metadata.httpVersion, 200, 'OK');
- response.setHeader('Cache-Control', 'no-cache', false);
- response.setHeader('Content-Type', 'text/plain', false);
- if (loginFinished) {
- response.write('true');
- } else {
- response.write('false');
- }
-}
-
-function fakeUIResponse() {
- Services.obs.addObserver(function observe(subject, topic, data) {
- if (topic === 'captive-portal-login') {
- let xhr = Cc['@mozilla.org/xmlextras/xmlhttprequest;1']
- .createInstance(Ci.nsIXMLHttpRequest);
- xhr.open('GET', gServerURL + kCanonicalSitePath, true);
- xhr.send();
- loginFinished = true;
- do_check_eq(++step, 3);
- }
- }, 'captive-portal-login', false);
-}
-
-function test_multiple_requests_abort() {
- do_test_pending();
-
- let callback = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsICaptivePortalCallback]),
- prepare: function prepare() {
- do_check_eq(++step, 1);
- gCaptivePortalDetector.finishPreparation(kInterfaceName);
- },
- complete: function complete(success) {
- do_throw('should not execute |complete| callback for ' + kInterfaceName);
- },
- };
-
- let otherCallback = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsICaptivePortalCallback]),
- prepare: function prepare() {
- do_check_eq(++step, 2);
- gCaptivePortalDetector.finishPreparation(kOtherInterfaceName);
- },
- complete: function complete(success) {
- do_check_eq(++step, 4);
- do_check_true(success);
- gServer.stop(do_test_finished);
- }
- };
-
- gCaptivePortalDetector.checkCaptivePortal(kInterfaceName, callback);
- gCaptivePortalDetector.checkCaptivePortal(kOtherInterfaceName, otherCallback);
- gCaptivePortalDetector.abort(kInterfaceName);
-}
-
-function run_test() {
- run_captivedetect_test(xhr_handler, fakeUIResponse, test_multiple_requests_abort);
-}
diff --git a/toolkit/components/captivedetect/test/unit/test_abort_pending_request.js b/toolkit/components/captivedetect/test/unit/test_abort_pending_request.js
deleted file mode 100644
index ce36f1e79a..0000000000
--- a/toolkit/components/captivedetect/test/unit/test_abort_pending_request.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-'use strict';
-
-const kInterfaceName = 'wifi';
-const kOtherInterfaceName = 'ril';
-
-var server;
-var step = 0;
-var loginFinished = false;
-
-function xhr_handler(metadata, response) {
- response.setStatusLine(metadata.httpVersion, 200, 'OK');
- response.setHeader('Cache-Control', 'no-cache', false);
- response.setHeader('Content-Type', 'text/plain', false);
- if (loginFinished) {
- response.write('true');
- } else {
- response.write('false');
- }
-}
-
-function fakeUIResponse() {
- Services.obs.addObserver(function observe(subject, topic, data) {
- if (topic === 'captive-portal-login') {
- let xhr = Cc['@mozilla.org/xmlextras/xmlhttprequest;1']
- .createInstance(Ci.nsIXMLHttpRequest);
- xhr.open('GET', gServerURL + kCanonicalSitePath, true);
- xhr.send();
- loginFinished = true;
- do_check_eq(++step, 2);
- }
- }, 'captive-portal-login', false);
-}
-
-function test_abort() {
- do_test_pending();
-
- let callback = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsICaptivePortalCallback]),
- prepare: function prepare() {
- do_check_eq(++step, 1);
- gCaptivePortalDetector.finishPreparation(kInterfaceName);
- },
- complete: function complete(success) {
- do_check_eq(++step, 3);
- do_check_true(success);
- gServer.stop(do_test_finished);
- },
- };
-
- let otherCallback = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsICaptivePortalCallback]),
- prepare: function prepare() {
- do_throw('should not execute |prepare| callback for ' + kOtherInterfaceName);
- },
- complete: function complete(success) {
- do_throw('should not execute |complete| callback for ' + kInterfaceName);
- }
- };
-
- gCaptivePortalDetector.checkCaptivePortal(kInterfaceName, callback);
- gCaptivePortalDetector.checkCaptivePortal(kOtherInterfaceName, otherCallback);
- gCaptivePortalDetector.abort(kOtherInterfaceName);
-}
-
-function run_test() {
- run_captivedetect_test(xhr_handler, fakeUIResponse, test_abort);
-}
diff --git a/toolkit/components/captivedetect/test/unit/test_captive_portal_found.js b/toolkit/components/captivedetect/test/unit/test_captive_portal_found.js
deleted file mode 100644
index 7fb7ba89e0..0000000000
--- a/toolkit/components/captivedetect/test/unit/test_captive_portal_found.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-'use strict';
-
-const kInterfaceName = 'wifi';
-
-var server;
-var step = 0;
-var loginFinished = false;
-
-function xhr_handler(metadata, response) {
- response.setStatusLine(metadata.httpVersion, 200, 'OK');
- response.setHeader('Cache-Control', 'no-cache', false);
- response.setHeader('Content-Type', 'text/plain', false);
- if (loginFinished) {
- response.write('true');
- } else {
- response.write('false');
- }
-}
-
-function fakeUIResponse() {
- Services.obs.addObserver(function observe(subject, topic, data) {
- if (topic === 'captive-portal-login') {
- let xhr = Cc['@mozilla.org/xmlextras/xmlhttprequest;1']
- .createInstance(Ci.nsIXMLHttpRequest);
- xhr.open('GET', gServerURL + kCanonicalSitePath, true);
- xhr.send();
- loginFinished = true;
- do_check_eq(++step, 2);
- }
- }, 'captive-portal-login', false);
-
- Services.obs.addObserver(function observe(subject, topic, data) {
- if (topic === 'captive-portal-login-success') {
- do_check_eq(++step, 4);
- gServer.stop(do_test_finished);
- }
- }, 'captive-portal-login-success', false);
-}
-
-function test_portal_found() {
- do_test_pending();
-
- let callback = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsICaptivePortalCallback]),
- prepare: function prepare() {
- do_check_eq(++step, 1);
- gCaptivePortalDetector.finishPreparation(kInterfaceName);
- },
- complete: function complete(success) {
- // Since this is a synchronous callback, it must happen before
- // 'captive-portal-login-success' is received.
- // (Check captivedetect.js::executeCallback
- do_check_eq(++step, 3);
- do_check_true(success);
- },
- };
-
- gCaptivePortalDetector.checkCaptivePortal(kInterfaceName, callback);
-}
-
-function run_test() {
- run_captivedetect_test(xhr_handler, fakeUIResponse, test_portal_found);
-}
diff --git a/toolkit/components/captivedetect/test/unit/test_captive_portal_found_303.js b/toolkit/components/captivedetect/test/unit/test_captive_portal_found_303.js
deleted file mode 100644
index 7064e12c9c..0000000000
--- a/toolkit/components/captivedetect/test/unit/test_captive_portal_found_303.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-'use strict';
-
-const kInterfaceName = 'wifi';
-
-var step = 0;
-var loginFinished = false;
-
-var gRedirectServer;
-var gRedirectServerURL;
-
-function xhr_handler(metadata, response) {
- if (loginFinished) {
- response.setStatusLine(metadata.httpVersion, 200, 'OK');
- response.setHeader('Cache-Control', 'no-cache', false);
- response.setHeader('Content-Type', 'text/plain', false);
- response.write('true');
- } else {
- response.setStatusLine(metadata.httpVersion, 303, "See Other");
- response.setHeader("Location", gRedirectServerURL, false);
- response.setHeader("Content-Type", "text/html", false);
- }
-}
-
-function fakeUIResponse() {
- Services.obs.addObserver(function observe(subject, topic, data) {
- if (topic === 'captive-portal-login') {
- let xhr = Cc['@mozilla.org/xmlextras/xmlhttprequest;1']
- .createInstance(Ci.nsIXMLHttpRequest);
- xhr.open('GET', gServerURL + kCanonicalSitePath, true);
- xhr.send();
- loginFinished = true;
- do_check_eq(++step, 2);
- }
- }, 'captive-portal-login', false);
-
- Services.obs.addObserver(function observe(subject, topic, data) {
- if (topic === 'captive-portal-login-success') {
- do_check_eq(++step, 4);
- gServer.stop(function () {
- gRedirectServer.stop(do_test_finished);
- });
- }
- }, 'captive-portal-login-success', false);
-}
-
-function test_portal_found() {
- do_test_pending();
-
- let callback = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsICaptivePortalCallback]),
- prepare: function prepare() {
- do_check_eq(++step, 1);
- gCaptivePortalDetector.finishPreparation(kInterfaceName);
- },
- complete: function complete(success) {
- do_check_eq(++step, 3);
- do_check_true(success);
- },
- };
-
- gCaptivePortalDetector.checkCaptivePortal(kInterfaceName, callback);
-}
-
-function run_test() {
- gRedirectServer = new HttpServer();
- gRedirectServer.start(-1);
- gRedirectServerURL = 'http://localhost:' + gRedirectServer.identity.primaryPort;
-
- run_captivedetect_test(xhr_handler, fakeUIResponse, test_portal_found);
-}
diff --git a/toolkit/components/captivedetect/test/unit/test_captive_portal_not_found.js b/toolkit/components/captivedetect/test/unit/test_captive_portal_not_found.js
deleted file mode 100644
index 1dc4fe0092..0000000000
--- a/toolkit/components/captivedetect/test/unit/test_captive_portal_not_found.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-'use strict';
-
-const kInterfaceName = 'wifi';
-
-var server;
-var step = 0;
-var attempt = 0;
-
-function xhr_handler(metadata, response) {
- dump('HTTP activity\n');
- response.setStatusLine(metadata.httpVersion, 200, 'OK');
- response.setHeader('Cache-Control', 'no-cache', false);
- response.setHeader('Content-Type', 'text/plain', false);
- response.write('true');
- attempt++;
-}
-
-function fakeUIResponse() {
- Services.obs.addObserver(function observe(subject, topic, data) {
- if (topic == 'captive-portal-login') {
- do_throw('should not receive captive-portal-login event');
- }
- }, 'captive-portal-login', false);
-}
-
-function test_portal_not_found() {
- do_test_pending();
-
- let callback = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsICaptivePortalCallback]),
- prepare: function prepare() {
- do_check_eq(++step, 1);
- gCaptivePortalDetector.finishPreparation(kInterfaceName);
- },
- complete: function complete(success) {
- do_check_eq(++step, 2);
- do_check_true(success);
- do_check_eq(attempt, 1);
- gServer.stop(function() { dump('server stop\n'); do_test_finished(); });
- }
- };
-
- gCaptivePortalDetector.checkCaptivePortal(kInterfaceName, callback);
-}
-
-function run_test() {
- run_captivedetect_test(xhr_handler, fakeUIResponse, test_portal_not_found);
-}
diff --git a/toolkit/components/captivedetect/test/unit/test_captive_portal_not_found_404.js b/toolkit/components/captivedetect/test/unit/test_captive_portal_not_found_404.js
deleted file mode 100644
index 66bcdd0778..0000000000
--- a/toolkit/components/captivedetect/test/unit/test_captive_portal_not_found_404.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-'use strict';
-
-const kInterfaceName = 'wifi';
-
-var server;
-var step = 0;
-var loginFinished = false;
-var attempt = 0;
-
-function xhr_handler(metadata, response) {
- response.setStatusLine(metadata.httpVersion, 404, "Page not Found");
- attempt++;
-}
-
-function fakeUIResponse() {
- Services.obs.addObserver(function observe(subject, topic, data) {
- if (topic === 'captive-portal-login') {
- do_throw('should not receive captive-portal-login event');
- }
- }, 'captive-portal-login', false);
-}
-
-function test_portal_not_found() {
- do_test_pending();
-
- let callback = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsICaptivePortalCallback]),
- prepare: function prepare() {
- do_check_eq(++step, 1);
- gCaptivePortalDetector.finishPreparation(kInterfaceName);
- },
- complete: function complete(success) {
- do_check_eq(++step, 2);
- do_check_false(success);
- do_check_eq(attempt, 6);
- gServer.stop(do_test_finished);
- },
- };
-
- gCaptivePortalDetector.checkCaptivePortal(kInterfaceName, callback);
-}
-
-function run_test() {
- run_captivedetect_test(xhr_handler, fakeUIResponse, test_portal_not_found);
-}
diff --git a/toolkit/components/captivedetect/test/unit/test_multiple_requests.js b/toolkit/components/captivedetect/test/unit/test_multiple_requests.js
deleted file mode 100644
index 11cf5e4b2f..0000000000
--- a/toolkit/components/captivedetect/test/unit/test_multiple_requests.js
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-'use strict';
-
-const kInterfaceName = 'wifi';
-const kOtherInterfaceName = 'ril';
-
-var server;
-var step = 0;
-var loginFinished = false;
-var loginSuccessCount = 0;
-
-function xhr_handler(metadata, response) {
- response.setStatusLine(metadata.httpVersion, 200, 'OK');
- response.setHeader('Cache-Control', 'no-cache', false);
- response.setHeader('Content-Type', 'text/plain', false);
- if (loginFinished) {
- response.write('true');
- } else {
- response.write('false');
- }
-}
-
-function fakeUIResponse() {
- Services.obs.addObserver(function observe(subject, topic, data) {
- if (topic === 'captive-portal-login') {
- let xhr = Cc['@mozilla.org/xmlextras/xmlhttprequest;1']
- .createInstance(Ci.nsIXMLHttpRequest);
- xhr.open('GET', gServerURL + kCanonicalSitePath, true);
- xhr.send();
- loginFinished = true;
- do_check_eq(++step, 2);
- }
- }, 'captive-portal-login', false);
-
- Services.obs.addObserver(function observe(subject, topic, data) {
- if (topic === 'captive-portal-login-success') {
- loginSuccessCount++;
- if (loginSuccessCount > 1) {
- throw "We should only receive 'captive-portal-login-success' once";
- }
- do_check_eq(++step, 4);
- }
- }, 'captive-portal-login-success', false);
-}
-
-function test_multiple_requests() {
- do_test_pending();
-
- let callback = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsICaptivePortalCallback]),
- prepare: function prepare() {
- do_check_eq(++step, 1);
- gCaptivePortalDetector.finishPreparation(kInterfaceName);
- },
- complete: function complete(success) {
- do_check_eq(++step, 3);
- do_check_true(success);
- },
- };
-
- let otherCallback = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsICaptivePortalCallback]),
- prepare: function prepare() {
- do_check_eq(++step, 5);
- gCaptivePortalDetector.finishPreparation(kOtherInterfaceName);
- },
- complete: function complete(success) {
- do_check_eq(++step, 6);
- do_check_true(success);
- gServer.stop(do_test_finished);
- }
- };
-
- gCaptivePortalDetector.checkCaptivePortal(kInterfaceName, callback);
- gCaptivePortalDetector.checkCaptivePortal(kOtherInterfaceName, otherCallback);
-}
-
-function run_test() {
- run_captivedetect_test(xhr_handler, fakeUIResponse, test_multiple_requests);
-}
diff --git a/toolkit/components/captivedetect/test/unit/test_user_cancel.js b/toolkit/components/captivedetect/test/unit/test_user_cancel.js
deleted file mode 100644
index a038768176..0000000000
--- a/toolkit/components/captivedetect/test/unit/test_user_cancel.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-'use strict';
-
-const kInterfaceName = 'wifi';
-
-var server;
-var step = 0;
-
-function xhr_handler(metadata, response) {
- response.setStatusLine(metadata.httpVersion, 200, 'OK');
- response.setHeader('Cache-Control', 'no-cache', false);
- response.setHeader('Content-Type', 'text/plain', false);
- response.write('false');
-}
-
-function fakeUIResponse() {
- Services.obs.addObserver(function observe(subject, topic, data) {
- if (topic === 'captive-portal-login') {
- let xhr = Cc['@mozilla.org/xmlextras/xmlhttprequest;1']
- .createInstance(Ci.nsIXMLHttpRequest);
- xhr.open('GET', gServerURL + kCanonicalSitePath, true);
- xhr.send();
- do_check_eq(++step, 2);
- let details = JSON.parse(data);
- gCaptivePortalDetector.cancelLogin(details.id);
- }
- }, 'captive-portal-login', false);
-}
-
-function test_cancel() {
- do_test_pending();
-
- let callback = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsICaptivePortalCallback]),
- prepare: function prepare() {
- do_check_eq(++step, 1);
- gCaptivePortalDetector.finishPreparation(kInterfaceName);
- },
- complete: function complete(success) {
- do_check_eq(++step, 3);
- do_check_false(success);
- gServer.stop(do_test_finished);
- },
- };
-
- gCaptivePortalDetector.checkCaptivePortal(kInterfaceName, callback);
-}
-
-function run_test() {
- run_captivedetect_test(xhr_handler, fakeUIResponse, test_cancel);
-}
diff --git a/toolkit/components/captivedetect/test/unit/xpcshell.ini b/toolkit/components/captivedetect/test/unit/xpcshell.ini
deleted file mode 100644
index 0f440c438e..0000000000
--- a/toolkit/components/captivedetect/test/unit/xpcshell.ini
+++ /dev/null
@@ -1,15 +0,0 @@
-[DEFAULT]
-head = head_setprefs.js
-tail =
-
-[test_captive_portal_not_found.js]
-[test_captive_portal_not_found_404.js]
-[test_captive_portal_found.js]
-[test_captive_portal_found_303.js]
-[test_abort.js]
-[test_abort_during_user_login.js]
-[test_user_cancel.js]
-[test_multiple_requests.js]
-[test_abort_ongoing_request.js]
-[test_abort_pending_request.js]
-
diff --git a/toolkit/components/commandlines/moz.build b/toolkit/components/commandlines/moz.build
index 5798ccfcc5..eb1303ff02 100644
--- a/toolkit/components/commandlines/moz.build
+++ b/toolkit/components/commandlines/moz.build
@@ -4,13 +4,6 @@
# 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/.
-XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
-
-if CONFIG['OS_ARCH'] == 'WINNT':
- XPCSHELL_TESTS_MANIFESTS += ['test/unit_win/xpcshell.ini']
-elif CONFIG['OS_ARCH'] != 'Darwin':
- XPCSHELL_TESTS_MANIFESTS += ['test/unit_unix/xpcshell.ini']
-
XPIDL_SOURCES += [
'nsICommandLine.idl',
'nsICommandLineHandler.idl',
@@ -20,11 +13,6 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'commandlines'
-SOURCES += [
- 'nsCommandLine.cpp',
-]
+SOURCES += ['nsCommandLine.cpp']
FINAL_LIBRARY = 'xul'
-
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'Startup and Profile System')
diff --git a/toolkit/components/commandlines/test/unit/.eslintrc.js b/toolkit/components/commandlines/test/unit/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/commandlines/test/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/commandlines/test/unit/data/test_bug410156.desktop b/toolkit/components/commandlines/test/unit/data/test_bug410156.desktop
deleted file mode 100644
index 1847cdd98e..0000000000
--- a/toolkit/components/commandlines/test/unit/data/test_bug410156.desktop
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-Version=1.0
-Encoding=UTF-8
-Name=test_bug410156
-Type=Link
-URL=http://www.bug410156.com/
-Icon=gnome-fs-bookmark
diff --git a/toolkit/components/commandlines/test/unit/data/test_bug410156.url b/toolkit/components/commandlines/test/unit/data/test_bug410156.url
deleted file mode 100644
index 6920e1f774..0000000000
--- a/toolkit/components/commandlines/test/unit/data/test_bug410156.url
+++ /dev/null
@@ -1,9 +0,0 @@
-[InternetShortcut]
-URL=http://www.bug410156.com/
-IDList=
-HotKey=0
-[{000214A0-0000-0000-C000-000000000046}]
-Prop3=19,2
-[InternetShortcut.A]
-[InternetShortcut.W]
-URL=http://www.bug410156.com/
diff --git a/toolkit/components/commandlines/test/unit/test_bug666224.js b/toolkit/components/commandlines/test/unit/test_bug666224.js
deleted file mode 100644
index 8d372097a5..0000000000
--- a/toolkit/components/commandlines/test/unit/test_bug666224.js
+++ /dev/null
@@ -1,6 +0,0 @@
-function run_test() {
- var cmdLine=Components.classes["@mozilla.org/toolkit/command-line;1"].createInstance(Components.interfaces.nsICommandLine);
- try {
- cmdLine.getArgument(cmdLine.length);
- } catch (e) {}
-}
diff --git a/toolkit/components/commandlines/test/unit/test_classinfo.js b/toolkit/components/commandlines/test/unit/test_classinfo.js
deleted file mode 100644
index a0fb1ff0a6..0000000000
--- a/toolkit/components/commandlines/test/unit/test_classinfo.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- var clClass = Components.classes["@mozilla.org/toolkit/command-line;1"];
- var commandLine = clClass.createInstance();
- do_check_true("length" in commandLine);
-}
diff --git a/toolkit/components/commandlines/test/unit/xpcshell.ini b/toolkit/components/commandlines/test/unit/xpcshell.ini
deleted file mode 100644
index 4939a3d642..0000000000
--- a/toolkit/components/commandlines/test/unit/xpcshell.ini
+++ /dev/null
@@ -1,10 +0,0 @@
-[DEFAULT]
-head =
-tail =
-skip-if = toolkit == 'android'
-support-files =
- data/test_bug410156.desktop
- data/test_bug410156.url
-
-[test_classinfo.js]
-[test_bug666224.js]
diff --git a/toolkit/components/commandlines/test/unit_unix/.eslintrc.js b/toolkit/components/commandlines/test/unit_unix/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/commandlines/test/unit_unix/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/commandlines/test/unit_unix/test_bug410156.js b/toolkit/components/commandlines/test/unit_unix/test_bug410156.js
deleted file mode 100644
index 06c95ac357..0000000000
--- a/toolkit/components/commandlines/test/unit_unix/test_bug410156.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- var clClass = Components.classes["@mozilla.org/toolkit/command-line;1"];
- var commandLine = clClass.createInstance();
- var urlFile = do_get_file("../unit/data/test_bug410156.desktop");
- var uri = commandLine.resolveURI(urlFile.path);
- do_check_eq(uri.spec, "http://www.bug410156.com/");
-}
diff --git a/toolkit/components/commandlines/test/unit_unix/xpcshell.ini b/toolkit/components/commandlines/test/unit_unix/xpcshell.ini
deleted file mode 100644
index 41f71f48d1..0000000000
--- a/toolkit/components/commandlines/test/unit_unix/xpcshell.ini
+++ /dev/null
@@ -1,9 +0,0 @@
-[DEFAULT]
-head =
-tail =
-skip-if = toolkit == 'android'
-support-files =
- !/toolkit/components/commandlines/test/unit/data/test_bug410156.desktop
- !/toolkit/components/commandlines/test/unit/data/test_bug410156.url
-
-[test_bug410156.js]
diff --git a/toolkit/components/commandlines/test/unit_win/.eslintrc.js b/toolkit/components/commandlines/test/unit_win/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/commandlines/test/unit_win/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/commandlines/test/unit_win/test_bug410156.js b/toolkit/components/commandlines/test/unit_win/test_bug410156.js
deleted file mode 100644
index cc04426d6a..0000000000
--- a/toolkit/components/commandlines/test/unit_win/test_bug410156.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- var clClass = Components.classes["@mozilla.org/toolkit/command-line;1"];
- var commandLine = clClass.createInstance();
- var urlFile = do_get_file("../unit/data/test_bug410156.url");
- var uri = commandLine.resolveURI(urlFile.path);
- do_check_eq(uri.spec, "http://www.bug410156.com/");
-}
diff --git a/toolkit/components/commandlines/test/unit_win/xpcshell.ini b/toolkit/components/commandlines/test/unit_win/xpcshell.ini
deleted file mode 100644
index efc2cfccf6..0000000000
--- a/toolkit/components/commandlines/test/unit_win/xpcshell.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[DEFAULT]
-head =
-tail =
-support-files =
- !/toolkit/components/commandlines/test/unit/data/test_bug410156.desktop
- !/toolkit/components/commandlines/test/unit/data/test_bug410156.url
-
-[test_bug410156.js]
diff --git a/toolkit/components/console/moz.build b/toolkit/components/console/moz.build
index d730b9aa3f..e9545267fe 100644
--- a/toolkit/components/console/moz.build
+++ b/toolkit/components/console/moz.build
@@ -4,8 +4,6 @@
# 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/.
-MOCHITEST_CHROME_MANIFESTS += ['tests/chrome.ini']
-
EXTRA_COMPONENTS += [
'jsconsole-clhandler.js',
'jsconsole-clhandler.manifest',
diff --git a/toolkit/components/console/tests/chrome.ini b/toolkit/components/console/tests/chrome.ini
deleted file mode 100644
index 0480c3533e..0000000000
--- a/toolkit/components/console/tests/chrome.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[DEFAULT]
-
-[test_hugeURIs.xul]
diff --git a/toolkit/components/console/tests/test_hugeURIs.xul b/toolkit/components/console/tests/test_hugeURIs.xul
deleted file mode 100644
index 87a571e8d1..0000000000
--- a/toolkit/components/console/tests/test_hugeURIs.xul
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
-<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=796179
--->
-<window title="Mozilla Bug 796179"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="RunTest();">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
- <!-- Detect severe performance and memory issues when large amounts of errors
- are reported from CSS embedded in a file with a long data URI. Addressed
- by 786108 for issues internal to the style system and by 796179 for issues
- related to the error console. This error console test should finish quickly
- with those patches and run for a very long time or OOM otherwise. -->
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml">
- <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=796179"
- target="_blank">Mozilla Bug 796179</a>
- <div id="badSVG" style="max-width: 1; max-height: 1; overflow: hidden"></div>
- </body>
-
- <!-- display the error console so we can test its reaction to the test -->
- <iframe id="errorConsoleFrame" height="400" src="chrome://global/content/console.xul"></iframe>
-
- <!-- test code -->
- <script type="application/javascript">
- <![CDATA[
- function RunTest()
- {
- // Create the bad SVG and add it to the document.
- var img = new Array;
- img.push('<img src="data:image/svg+xml,');
- img.push(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="300px" height="300px">'));
-
- for (var i = 0 ; i < 10000 ; i++)
- img.push(encodeURIComponent('<circle cx="0" cy="0" r="1" style="xxx-invalid-property: 0;"/>'));
-
- img.push(encodeURIComponent('</svg>'));
- img.push('" />');
-
- document.getElementById('badSVG').innerHTML = img.join('');
-
- // We yield control of the thread, allowing the error console to render.
- // If we get control back without timing out or OOMing then the test passed.
- SimpleTest.waitForExplicitFinish();
- SimpleTest.executeSoon(function() {
- // Clean up.
- var elem = document.getElementById('errorConsoleFrame');
- elem.parentNode.removeChild(elem);
- elem = document.getElementById('badSVG');
- elem.parentNode.removeChild(elem);
- elem = null;
-
- // Finish the test with a pass.
- ok(true, 'Error console rendered OK.');
- SimpleTest.finish();
- }, 0);
- }
- ]]>
- </script>
-</window>
diff --git a/toolkit/components/contentprefs/moz.build b/toolkit/components/contentprefs/moz.build
index 24bb296f15..83074ed64a 100644
--- a/toolkit/components/contentprefs/moz.build
+++ b/toolkit/components/contentprefs/moz.build
@@ -4,15 +4,6 @@
# 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/.
-XPCSHELL_TESTS_MANIFESTS += [
- 'tests/unit/xpcshell.ini',
- 'tests/unit_cps2/xpcshell.ini',
-]
-
-MOCHITEST_MANIFESTS += [
- 'tests/mochitest/mochitest.ini'
-]
-
EXTRA_COMPONENTS += [
'nsContentPrefService.js',
'nsContentPrefService.manifest',
@@ -26,6 +17,3 @@ EXTRA_JS_MODULES += [
'ContentPrefStore.jsm',
'ContentPrefUtils.jsm',
]
-
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'Preferences')
diff --git a/toolkit/components/contentprefs/tests/mochitest/.eslintrc.js b/toolkit/components/contentprefs/tests/mochitest/.eslintrc.js
deleted file mode 100644
index 64a4eda731..0000000000
--- a/toolkit/components/contentprefs/tests/mochitest/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/mochitest/mochitest.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/contentprefs/tests/mochitest/mochitest.ini b/toolkit/components/contentprefs/tests/mochitest/mochitest.ini
deleted file mode 100644
index ec4f059458..0000000000
--- a/toolkit/components/contentprefs/tests/mochitest/mochitest.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[DEFAULT]
-
-[test_remoteContentPrefs.html]
-skip-if = toolkit == 'android' || e10s # bug 783513
diff --git a/toolkit/components/contentprefs/tests/mochitest/test_remoteContentPrefs.html b/toolkit/components/contentprefs/tests/mochitest/test_remoteContentPrefs.html
deleted file mode 100644
index d14e85a255..0000000000
--- a/toolkit/components/contentprefs/tests/mochitest/test_remoteContentPrefs.html
+++ /dev/null
@@ -1,311 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test for nsIContentPrefService2 in child processes</title>
- <script type="application/javascript"
- src="/tests/SimpleTest/SimpleTest.js">
- </script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-
- <script type="application/javascript;version=1.8">
- "use strict";
-
- SimpleTest.waitForExplicitFinish();
-
- const childFrameURL =
- "data:text/html,<!DOCTYPE HTML><html><body></body></html>";
-
- function childFrameScript(isFramePrivate) {
- "use strict";
-
- function Tester(resultArray) {
- this.results = [];
- }
-
- Tester.prototype.is =
- function(a, b, note) {
- this.results.push([a === b, note + " (" + a + ", " + b + ")"]);
- };
- Tester.prototype.ok =
- function(b, note) {
- this.results.push([b != false, note]);
- };
-
- var cps = Components.classes["@mozilla.org/content-pref/service;1"]
- .getService(Components.interfaces.nsIContentPrefService2);
-
- let test = null;
- function* test1(message) {
- let tester = new Tester();
-
- tester.ok(cps !== null, "got the content pref service");
-
- cps.setGlobal("testing", 42, null, {
- handleCompletion: function(reason) {
- tester.is(reason, 0, "set a pref?");
- test.next();
- }
- });
-
- yield;
-
- let numResults = 0;
- cps.getGlobal("testing", null, {
- handleResult: function(pref) {
- numResults++;
- tester.is(pref.name, "testing", "pref has the right name");
- tester.is(pref.value, 42, "pref has the right value");
- },
-
- handleCompletion: function(reason) {
- tester.is(reason, 0, "get a pref?");
- tester.is(numResults, 1, "got the right number of prefs");
- tester.is(test.next().done, true, "done with test1");
- message.target.sendAsyncMessage("testRemoteContentPrefs:test1Finished",
- { results: tester.results });
- }
- });
-
- yield;
- }
-
- function* test2(message) {
- let tester = new Tester();
-
- let observer;
- let removed = false;
- cps.addObserverForName("testName", observer = {
- onContentPrefSet: function(group, name, value, isPrivate) {
- if (removed) {
- message.target.sendAsyncMessage("testRemoteContentPrefs:fail",
- { reason: "unexpected notification" });
- }
- tester.is(group, null, "group should be null");
- tester.is(name, "testName", "should only see testName");
- tester.is(value, 42, "value should be correct");
- tester.is(isPrivate, isFramePrivate, "privacy should match");
-
- message.target.sendAsyncMessage("testRemoteContentPrefs:test2poke2", {})
- },
-
- onContentPrefRemoved: function(group, name, isPrivate) {
- tester.is(group, null, "group should be null");
- tester.is(name, "testName");
- tester.is(isPrivate, isFramePrivate, "privacy should match");
- tester.is(test.next().done, true, "should be done with test2");
-
- cps.removeObserverForName("testName", observer);
- removed = true;
-
- message.target.sendAsyncMessage("testRemoteContentPrefs:test2Finished",
- { results: tester.results });
- }
- });
-
- message.target.sendAsyncMessage("testRemoteContentPrefs:test2poke", {});
- yield;
- }
-
- function* test3(message) {
- let tester = new Tester();
-
- cps.setGlobal("testName", 42, null, {
- handleCompletion: function(reason) {
- tester.is(reason, 0, "set a pref");
- cps.set("http://mochi.test", "testpref", "str", null, {
- handleCompletion: function(reason) {
- tester.is(reason, 0, "set a pref");
- test.next();
- }
- });
- }
- });
-
- yield;
-
- cps.removeByDomain("http://mochi.test", null, {
- handleCompletion: function(reason) {
- tester.is(reason, 0, "remove succeeded");
- cps.getByDomainAndName("http://mochi.test", "testpref", null, {
- handleResult: function() {
- message.target.sendAsyncMessage("testRemoteContentPrefs:fail",
- { reason: "got removed pref in test3" });
- },
- handleCompletion: function() {
- test.next();
- }
- });
- }
- });
-
- yield;
-
- message.target.sendAsyncMessage("testRemoteContentPrefs:test3Finished",
- { results: tester.results });
- }
-
- function* test4(message) {
- let tester = new Tester();
-
- let prefObserver = {
- onContentPrefSet: function(group, name, value, isPrivate) {
- test.next({ group: group, name: name, value: value, isPrivate: isPrivate });
- },
- onContentPrefRemoved: function(group, name, isPrivate) {
- test.next({ group: group, name: name, isPrivate: isPrivate });
- }
- };
-
- addMessageListener("testRemoteContentPrefs:prefResults", (msg) => {
- test.next(msg.data.results);
- });
-
- cps.addObserverForName("test", prefObserver);
-
- cps.set("http://mochi.test", "test", 42, { usePrivateBrowsing: true });
- let event = yield;
- tester.is(event.name, "test");
- tester.is(event.isPrivate, true);
-
- message.target.sendAsyncMessage("testRemoteContentPrefs:getPref",
- { group: "http://mochi.test", name: "test" });
-
- let results = yield;
- tester.is(results.length, 0, "should not have seen the pb pref");
-
- message.target.sendAsyncMessage("testRemoteContentPrefs:test4Finished",
- { results: tester.results });
- }
-
- addMessageListener("testRemoteContentPrefs:test1", function(message) {
- test = test1(message);
- test.next();
- });
- addMessageListener("testRemoteContentPrefs:test2", function(message) {
- test = test2(message);
- test.next();
- });
- addMessageListener("testRemoteContentPrefs:test3", function(message) {
- test = test3(message);
- test.next();
- });
- addMessageListener("testRemoteContentPrefs:test4", function(message) {
- test = test4(message);
- test.next();
- });
- }
-
- function processResults(results) {
- for (let i of results) {
- ok(...i);
- }
- }
-
- let test;
- function* testStructure(mm, isPrivate, callback) {
- let lastResult;
-
- function testDone(msg) {
- test.next(msg.data);
- }
-
- mm.addMessageListener("testRemoteContentPrefs:test1Finished", testDone);
- mm.addMessageListener("testRemoteContentPrefs:test2Finished", testDone);
- mm.addMessageListener("testRemoteContentPrefs:test3Finished", testDone);
- mm.addMessageListener("testRemoteContentPrefs:test4Finished", testDone);
-
- mm.addMessageListener("testRemoteContentPrefs:fail", function(msg) {
- ok(false, msg.data.reason);
- });
-
- mm.sendAsyncMessage("testRemoteContentPrefs:test1", {});
- lastResult = yield;
- processResults(lastResult.results);
-
- var cps = SpecialPowers.Cc["@mozilla.org/content-pref/service;1"]
- .getService(SpecialPowers.Ci.nsIContentPrefService2);
- mm.sendAsyncMessage("testRemoteContentPrefs:test2", {});
- mm.addMessageListener("testRemoteContentPrefs:test2poke", function() {
- cps.setGlobal("testName", 42, {usePrivateBrowsing: isPrivate});
- });
- mm.addMessageListener("testRemoteContentPrefs:test2poke2", function() {
- cps.removeGlobal("testName", {usePrivateBrowsing: isPrivate});
- });
-
- lastResult = yield;
- processResults(lastResult.results);
-
- mm.sendAsyncMessage("testRemoteContentPrefs:test3", {});
- lastResult = yield;
- processResults(lastResult.results);
-
- mm.addMessageListener("testRemoteContentPrefs:getPref", function(msg) {
- let results = [];
- cps.getByDomainAndName(msg.data.group, msg.data.name, null, {
- handleResult: function(pref) {
- results.push(pref);
- },
- handleCompletion: function(reason) {
- mm.sendAsyncMessage("testRemoteContentPrefs:prefResults",
- { results: results });
- }
- });
- });
-
- mm.sendAsyncMessage("testRemoteContentPrefs:test4", {});
- lastResult = yield;
- processResults(lastResult.results);
-
- document.getElementById('iframe').remove();
- setTimeout(callback, 0);
- }
-
- function runTest(isPrivate, callback) {
- info("testing with isPrivate=" + isPrivate);
- let iframe = document.createElement("iframe");
- SpecialPowers.wrap(iframe).mozbrowser = true;
- if (isPrivate) {
- SpecialPowers.wrap(iframe).mozprivatebrowsing = true;
- }
- iframe.id = "iframe";
- iframe.src = childFrameURL;
-
- iframe.addEventListener("mozbrowserloadend", function() {
- info("Got iframe load event.");
- let mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
- mm.loadFrameScript("data:,(" + childFrameScript.toString() + ")(" + isPrivate + ");",
- false);
-
- test = testStructure(mm, isPrivate, callback);
- test.next();
- });
-
- document.body.appendChild(iframe);
- }
-
- function runTests() {
- info("Browser prefs set.");
- runTest(false, function() {
- runTest(true, function() {
- SimpleTest.finish();
- });
- });
- }
-
- addEventListener("load", function() {
- info("Got load event.");
-
- SpecialPowers.addPermission("browser", true, document);
- SpecialPowers.pushPrefEnv({
- "set": [
- ["dom.ipc.browser_frames.oop_by_default", true],
- ["dom.mozBrowserFramesEnabled", true],
- ["browser.pagethumbnails.capturing_disabled", true]
- ]
- }, runTests);
- });
- </script>
-</body>
-</html>
diff --git a/toolkit/components/contentprefs/tests/unit/.eslintrc.js b/toolkit/components/contentprefs/tests/unit/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/contentprefs/tests/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/contentprefs/tests/unit/head_contentPrefs.js b/toolkit/components/contentprefs/tests/unit/head_contentPrefs.js
deleted file mode 100644
index 84ca1bebff..0000000000
--- a/toolkit/components/contentprefs/tests/unit/head_contentPrefs.js
+++ /dev/null
@@ -1,162 +0,0 @@
-/* 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/. */
-
-// Inspired by the Places infrastructure in head_bookmarks.js
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-var Cu = Components.utils;
-
-Cu.import('resource://gre/modules/Services.jsm');
-Cu.import('resource://gre/modules/ContentPrefInstance.jsm');
-
-const CONTENT_PREFS_DB_FILENAME = "content-prefs.sqlite";
-const CONTENT_PREFS_BACKUP_DB_FILENAME = "content-prefs.sqlite.corrupt";
-
-var ContentPrefTest = {
- // Convenience Getters
-
- __dirSvc: null,
- get _dirSvc() {
- if (!this.__dirSvc)
- this.__dirSvc = Cc["@mozilla.org/file/directory_service;1"].
- getService(Ci.nsIProperties);
- return this.__dirSvc;
- },
-
- __consoleSvc: null,
- get _consoleSvc() {
- if (!this.__consoleSvc)
- this.__consoleSvc = Cc["@mozilla.org/consoleservice;1"].
- getService(Ci.nsIConsoleService);
- return this.__consoleSvc;
- },
-
- __ioSvc: null,
- get _ioSvc() {
- if (!this.__ioSvc)
- this.__ioSvc = Cc["@mozilla.org/network/io-service;1"].
- getService(Ci.nsIIOService);
- return this.__ioSvc;
- },
-
-
- // nsISupports
-
- interfaces: [Ci.nsIDirectoryServiceProvider, Ci.nsISupports],
-
- QueryInterface: function ContentPrefTest_QueryInterface(iid) {
- if (!this.interfaces.some( function(v) { return iid.equals(v) } ))
- throw Cr.NS_ERROR_NO_INTERFACE;
- return this;
- },
-
-
- // nsIDirectoryServiceProvider
-
- getFile: function ContentPrefTest_getFile(property, persistent) {
- persistent.value = true;
-
- if (property == "ProfD")
- return this._dirSvc.get("CurProcD", Ci.nsIFile);
-
- // This causes extraneous errors to show up in the log when the directory
- // service asks us first for CurProcD and MozBinD. I wish there was a way
- // to suppress those errors.
- throw Cr.NS_ERROR_FAILURE;
- },
-
-
- // Utilities
-
- getURI: function ContentPrefTest_getURI(spec) {
- return this._ioSvc.newURI(spec, null, null);
- },
-
- /**
- * Get the profile directory.
- */
- getProfileDir: function ContentPrefTest_getProfileDir() {
- // do_get_profile can be only called from a parent process
- if (runningInParent) {
- return do_get_profile();
- }
- // if running in a content process, this just returns the path
- // profile was initialized in the ipc head file
- let env = Components.classes["@mozilla.org/process/environment;1"]
- .getService(Components.interfaces.nsIEnvironment);
- // the python harness sets this in the environment for us
- let profd = env.get("XPCSHELL_TEST_PROFILE_DIR");
- let file = Components.classes["@mozilla.org/file/local;1"]
- .createInstance(Components.interfaces.nsILocalFile);
- file.initWithPath(profd);
- return file;
- },
-
- /**
- * Delete the content pref service's persistent datastore. We do this before
- * and after running tests to make sure we start from scratch each time. We
- * also do it during the database creation, schema migration, and backup tests.
- */
- deleteDatabase: function ContentPrefTest_deleteDatabase() {
- var file = this.getProfileDir();
- file.append(CONTENT_PREFS_DB_FILENAME);
- if (file.exists())
- try { file.remove(false); } catch (e) { /* stupid windows box */ }
- return file;
- },
-
- /**
- * Delete the backup of the content pref service's persistent datastore.
- * We do this during the database creation, schema migration, and backup tests.
- */
- deleteBackupDatabase: function ContentPrefTest_deleteBackupDatabase() {
- var file = this.getProfileDir();
- file.append(CONTENT_PREFS_BACKUP_DB_FILENAME);
- if (file.exists())
- file.remove(false);
- return file;
- },
-
- /**
- * Log a message to the console and the test log.
- */
- log: function ContentPrefTest_log(message) {
- message = "*** ContentPrefTest: " + message;
- this._consoleSvc.logStringMessage(message);
- print(message);
- }
-
-};
-
-var gInPrivateBrowsing = false;
-function enterPBMode() {
- gInPrivateBrowsing = true;
-}
-function exitPBMode() {
- gInPrivateBrowsing = false;
- Services.obs.notifyObservers(null, "last-pb-context-exited", null);
-}
-
-ContentPrefTest.deleteDatabase();
-
-function inChildProcess() {
- var appInfo = Cc["@mozilla.org/xre/app-info;1"];
- if (!appInfo || appInfo.getService(Ci.nsIXULRuntime).processType ==
- Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT) {
- return false;
- }
- return true;
-}
-
-// Turn on logging for the content preferences service so we can troubleshoot
-// problems with the tests. Note that we cannot do this in a child process
-// without crashing (but we don't need it anyhow)
-if (!inChildProcess()) {
- var prefBranch = Cc["@mozilla.org/preferences-service;1"].
- getService(Ci.nsIPrefBranch);
- prefBranch.setBoolPref("browser.preferences.content.log", true);
-}
-
diff --git a/toolkit/components/contentprefs/tests/unit/tail_contentPrefs.js b/toolkit/components/contentprefs/tests/unit/tail_contentPrefs.js
deleted file mode 100644
index f3c95dac89..0000000000
--- a/toolkit/components/contentprefs/tests/unit/tail_contentPrefs.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/* 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/. */
-
-ContentPrefTest.deleteDatabase();
-ContentPrefTest.__dirSvc = null;
diff --git a/toolkit/components/contentprefs/tests/unit/test_bug248970.js b/toolkit/components/contentprefs/tests/unit/test_bug248970.js
deleted file mode 100644
index 5f4aa25c50..0000000000
--- a/toolkit/components/contentprefs/tests/unit/test_bug248970.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- let loadContext = { get usePrivateBrowsing() { return gInPrivateBrowsing; } };
-
- ContentPrefTest.deleteDatabase();
- var cp = new ContentPrefInstance(loadContext);
- do_check_neq(cp, null, "Retrieving the content prefs service failed");
-
- try {
- const uri1 = ContentPrefTest.getURI("http://www.example.com/");
- const uri2 = ContentPrefTest.getURI("http://www.anotherexample.com/");
- const pref_name = "browser.content.full-zoom";
- const zoomA = 1.5, zoomA_new = 0.8, zoomB = 1.3;
- // save Zoom-A
- cp.setPref(uri1, pref_name, zoomA);
- // make sure Zoom-A is retrievable
- do_check_eq(cp.getPref(uri1, pref_name), zoomA);
- // enter private browsing mode
- enterPBMode();
- // make sure Zoom-A is retrievable
- do_check_eq(cp.getPref(uri1, pref_name), zoomA);
- // save Zoom-B
- cp.setPref(uri2, pref_name, zoomB);
- // make sure Zoom-B is retrievable
- do_check_eq(cp.getPref(uri2, pref_name), zoomB);
- // update Zoom-A
- cp.setPref(uri1, pref_name, zoomA_new);
- // make sure Zoom-A has changed
- do_check_eq(cp.getPref(uri1, pref_name), zoomA_new);
- // exit private browsing mode
- exitPBMode();
- // make sure Zoom-A change has not persisted
- do_check_eq(cp.getPref(uri1, pref_name), zoomA);
- // make sure Zoom-B change has not persisted
- do_check_eq(cp.hasPref(uri2, pref_name), false);
- } catch (e) {
- do_throw("Unexpected exception: " + e);
- }
-}
diff --git a/toolkit/components/contentprefs/tests/unit/test_bug503971.js b/toolkit/components/contentprefs/tests/unit/test_bug503971.js
deleted file mode 100644
index ccfe1d02bc..0000000000
--- a/toolkit/components/contentprefs/tests/unit/test_bug503971.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- var cps = new ContentPrefInstance(null);
-
- var uri = ContentPrefTest.getURI("http://www.example.com/");
-
- do_check_thrown(function () { cps.setPref(uri, null, 8); });
- do_check_thrown(function () { cps.hasPref(uri, null); });
- do_check_thrown(function () { cps.getPref(uri, null); });
- do_check_thrown(function () { cps.removePref(uri, null); });
- do_check_thrown(function () { cps.getPrefsByName(null); });
- do_check_thrown(function () { cps.removePrefsByName(null); });
-
- do_check_thrown(function () { cps.setPref(uri, "", 21); });
- do_check_thrown(function () { cps.hasPref(uri, ""); });
- do_check_thrown(function () { cps.getPref(uri, ""); });
- do_check_thrown(function () { cps.removePref(uri, ""); });
- do_check_thrown(function () { cps.getPrefsByName(""); });
- do_check_thrown(function () { cps.removePrefsByName(""); });
-}
-
-function do_check_thrown (aCallback) {
- var exThrown = false;
- try {
- aCallback();
- do_throw("NS_ERROR_ILLEGAL_VALUE should have been thrown here");
- } catch (e) {
- do_check_eq(e.result, Cr.NS_ERROR_ILLEGAL_VALUE);
- exThrown = true;
- }
- do_check_true(exThrown);
-}
diff --git a/toolkit/components/contentprefs/tests/unit/test_bug679784.js b/toolkit/components/contentprefs/tests/unit/test_bug679784.js
deleted file mode 100644
index 97251d87ba..0000000000
--- a/toolkit/components/contentprefs/tests/unit/test_bug679784.js
+++ /dev/null
@@ -1,103 +0,0 @@
-/* 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/. */
-
-
-var prefObserver = {
- setCalledNum: 0,
- onContentPrefSet: function(aGroup, aName, aValue) {
- this.setCalledNum++;
- },
- removedCalledNum: 0,
- onContentPrefRemoved: function(aGroup, aName) {
- this.removedCalledNum++;
- }
-};
-
-function run_test() {
- let loadContext = { get usePrivateBrowsing() { return gInPrivateBrowsing; } };
-
- var cps = new ContentPrefInstance(loadContext);
- cps.removeGroupedPrefs();
-
- var uri = ContentPrefTest.getURI("http://www.example.com/");
- var group = cps.grouper.group(uri);
-
- // first, set a pref in normal mode
- cps.setPref(uri, "value", "foo");
- cps.setPref(null, "value-global", "foo-global");
-
- var num;
- cps.addObserver("value", prefObserver);
- cps.addObserver("value-global", prefObserver);
-
- enterPBMode();
-
- // test setPref
- num = prefObserver.setCalledNum;
- cps.setPref(uri, "value", "foo-private-browsing");
- do_check_eq(cps.hasPref(uri, "value"), true);
- do_check_eq(cps.getPref(uri, "value"), "foo-private-browsing");
- do_check_eq(prefObserver.setCalledNum, num + 1);
-
- num = prefObserver.setCalledNum;
- cps.setPref(null, "value-global", "foo-private-browsing-global");
- do_check_eq(cps.hasPref(null, "value-global"), true);
- do_check_eq(cps.getPref(null, "value-global"), "foo-private-browsing-global");
- do_check_eq(prefObserver.setCalledNum, num + 1);
-
- // test removePref
- num = prefObserver.removedCalledNum;
- cps.removePref(uri, "value");
- do_check_eq(cps.hasPref(uri, "value"), true);
- // fallback to non private mode value
- do_check_eq(cps.getPref(uri, "value"), "foo");
- do_check_eq(prefObserver.removedCalledNum, num + 1);
-
- num = prefObserver.removedCalledNum;
- cps.removePref(null, "value-global");
- do_check_eq(cps.hasPref(null, "value-global"), true);
- // fallback to non private mode value
- do_check_eq(cps.getPref(null, "value-global"), "foo-global") ;
- do_check_eq(prefObserver.removedCalledNum, num + 1);
-
- // test removeGroupedPrefs
- cps.setPref(uri, "value", "foo-private-browsing");
- cps.removeGroupedPrefs();
- do_check_eq(cps.hasPref(uri, "value"), false);
- do_check_eq(cps.getPref(uri, "value"), undefined);
-
- cps.setPref(null, "value-global", "foo-private-browsing-global");
- cps.removeGroupedPrefs();
- do_check_eq(cps.hasPref(null, "value-global"), true);
- do_check_eq(cps.getPref(null, "value-global"), "foo-private-browsing-global");
-
- // test removePrefsByName
- num = prefObserver.removedCalledNum;
- cps.setPref(uri, "value", "foo-private-browsing");
- cps.removePrefsByName("value");
- do_check_eq(cps.hasPref(uri, "value"), false);
- do_check_eq(cps.getPref(uri, "value"), undefined);
- do_check_true(prefObserver.removedCalledNum > num);
-
- num = prefObserver.removedCalledNum;
- cps.setPref(null, "value-global", "foo-private-browsing");
- cps.removePrefsByName("value-global");
- do_check_eq(cps.hasPref(null, "value-global"), false);
- do_check_eq(cps.getPref(null, "value-global"), undefined);
- do_check_true(prefObserver.removedCalledNum > num);
-
- // test getPrefs
- cps.setPref(uri, "value", "foo-private-browsing");
- do_check_eq(cps.getPrefs(uri).getProperty("value"), "foo-private-browsing");
-
- cps.setPref(null, "value-global", "foo-private-browsing-global");
- do_check_eq(cps.getPrefs(null).getProperty("value-global"), "foo-private-browsing-global");
-
- // test getPrefsByName
- do_check_eq(cps.getPrefsByName("value").getProperty(group), "foo-private-browsing");
- do_check_eq(cps.getPrefsByName("value-global").getProperty(null), "foo-private-browsing-global");
-
- cps.removeObserver("value", prefObserver);
- cps.removeObserver("value-global", prefObserver);
-}
diff --git a/toolkit/components/contentprefs/tests/unit/test_contentPrefs.js b/toolkit/components/contentprefs/tests/unit/test_contentPrefs.js
deleted file mode 100644
index f7e99ea9d1..0000000000
--- a/toolkit/components/contentprefs/tests/unit/test_contentPrefs.js
+++ /dev/null
@@ -1,463 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- // Database Creation, Schema Migration, and Backup
-
- // Note: in these tests we use createInstance instead of getService
- // so we can instantiate the service multiple times and make it run
- // its database initialization code each time.
-
- // Create a new database.
- {
- ContentPrefTest.deleteDatabase();
-
- // Get the service and make sure it has a ready database connection.
- let cps = Cc["@mozilla.org/content-pref/service;1"].
- createInstance(Ci.nsIContentPrefService);
- do_check_true(cps.DBConnection.connectionReady);
- cps.DBConnection.close();
- }
-
- // Open an existing database.
- {
- let dbFile = ContentPrefTest.deleteDatabase();
-
- let cps = Cc["@mozilla.org/content-pref/service;1"].
- createInstance(Ci.nsIContentPrefService);
- cps.DBConnection.close();
- do_check_true(dbFile.exists());
-
- // Get the service and make sure it has a ready database connection.
- cps = Cc["@mozilla.org/content-pref/service;1"].
- createInstance(Ci.nsIContentPrefService);
- do_check_true(cps.DBConnection.connectionReady);
- cps.DBConnection.close();
- }
-
- // Open an empty database.
- {
- let dbFile = ContentPrefTest.deleteDatabase();
-
- // Create an empty database.
- let dbService = Cc["@mozilla.org/storage/service;1"].
- getService(Ci.mozIStorageService);
- let dbConnection = dbService.openDatabase(dbFile);
- do_check_eq(dbConnection.schemaVersion, 0);
- dbConnection.close();
- do_check_true(dbFile.exists());
-
- // Get the service and make sure it has created the schema.
- let cps = Cc["@mozilla.org/content-pref/service;1"].
- createInstance(Ci.nsIContentPrefService);
- do_check_neq(cps.DBConnection.schemaVersion, 0);
- cps.DBConnection.close();
- }
-
- // Open a corrupted database.
- {
- let dbFile = ContentPrefTest.deleteDatabase();
- let backupDBFile = ContentPrefTest.deleteBackupDatabase();
-
- // Create a corrupted database.
- let foStream = Cc["@mozilla.org/network/file-output-stream;1"].
- createInstance(Ci.nsIFileOutputStream);
- foStream.init(dbFile, 0x02 | 0x08 | 0x20, 0o666, 0);
- let garbageData = "garbage that makes SQLite think the file is corrupted";
- foStream.write(garbageData, garbageData.length);
- foStream.close();
-
- // Get the service and make sure it backs up and recreates the database.
- let cps = Cc["@mozilla.org/content-pref/service;1"].
- createInstance(Ci.nsIContentPrefService);
- do_check_true(backupDBFile.exists());
- do_check_true(cps.DBConnection.connectionReady);
-
- cps.DBConnection.close();
- }
-
- // Open a database with a corrupted schema.
- {
- let dbFile = ContentPrefTest.deleteDatabase();
- let backupDBFile = ContentPrefTest.deleteBackupDatabase();
-
- // Create an empty database and set the schema version to a number
- // that will trigger a schema migration that will fail.
- let dbService = Cc["@mozilla.org/storage/service;1"].
- getService(Ci.mozIStorageService);
- let dbConnection = dbService.openDatabase(dbFile);
- dbConnection.schemaVersion = -1;
- dbConnection.close();
- do_check_true(dbFile.exists());
-
- // Get the service and make sure it backs up and recreates the database.
- let cps = Cc["@mozilla.org/content-pref/service;1"].
- createInstance(Ci.nsIContentPrefService);
- do_check_true(backupDBFile.exists());
- do_check_true(cps.DBConnection.connectionReady);
-
- cps.DBConnection.close();
- }
-
-
- // Now get the content pref service for real for use by the rest of the tests.
- let cps = new ContentPrefInstance(null);
-
- var uri = ContentPrefTest.getURI("http://www.example.com/");
-
- // Make sure disk synchronization checking is turned off by default.
- var statement = cps.DBConnection.createStatement("PRAGMA synchronous");
- statement.executeStep();
- do_check_eq(0, statement.getInt32(0));
-
- // Nonexistent Pref
-
- do_check_eq(cps.getPref(uri, "test.nonexistent.getPref"), undefined);
- do_check_eq(cps.setPref(uri, "test.nonexistent.setPref", 5), undefined);
- do_check_false(cps.hasPref(uri, "test.nonexistent.hasPref"));
- do_check_eq(cps.removePref(uri, "test.nonexistent.removePref"), undefined);
-
-
- // Existing Pref
-
- cps.setPref(uri, "test.existing", 5);
-
- // getPref should return the pref value
- do_check_eq(cps.getPref(uri, "test.existing"), 5);
-
- // setPref should return undefined and change the value of the pref
- do_check_eq(cps.setPref(uri, "test.existing", 6), undefined);
- do_check_eq(cps.getPref(uri, "test.existing"), 6);
-
- // hasPref should return true
- do_check_true(cps.hasPref(uri, "test.existing"));
-
- // removePref should return undefined and remove the pref
- do_check_eq(cps.removePref(uri, "test.existing"), undefined);
- do_check_false(cps.hasPref(uri, "test.existing"));
-
-
- // Round-Trip Data Integrity
-
- // Make sure pref values remain the same from setPref to getPref.
-
- cps.setPref(uri, "test.data-integrity.integer", 5);
- do_check_eq(cps.getPref(uri, "test.data-integrity.integer"), 5);
-
- cps.setPref(uri, "test.data-integrity.float", 5.5);
- do_check_eq(cps.getPref(uri, "test.data-integrity.float"), 5.5);
-
- cps.setPref(uri, "test.data-integrity.boolean", true);
- do_check_eq(cps.getPref(uri, "test.data-integrity.boolean"), true);
-
- cps.setPref(uri, "test.data-integrity.string", "test");
- do_check_eq(cps.getPref(uri, "test.data-integrity.string"), "test");
-
- cps.setPref(uri, "test.data-integrity.null", null);
- do_check_eq(cps.getPref(uri, "test.data-integrity.null"), null);
-
- // XXX Test arbitrary binary data.
-
- // Make sure hasPref and removePref work on all data types.
-
- do_check_true(cps.hasPref(uri, "test.data-integrity.integer"));
- do_check_true(cps.hasPref(uri, "test.data-integrity.float"));
- do_check_true(cps.hasPref(uri, "test.data-integrity.boolean"));
- do_check_true(cps.hasPref(uri, "test.data-integrity.string"));
- do_check_true(cps.hasPref(uri, "test.data-integrity.null"));
-
- do_check_eq(cps.removePref(uri, "test.data-integrity.integer"), undefined);
- do_check_eq(cps.removePref(uri, "test.data-integrity.float"), undefined);
- do_check_eq(cps.removePref(uri, "test.data-integrity.boolean"), undefined);
- do_check_eq(cps.removePref(uri, "test.data-integrity.string"), undefined);
- do_check_eq(cps.removePref(uri, "test.data-integrity.null"), undefined);
-
- do_check_false(cps.hasPref(uri, "test.data-integrity.integer"));
- do_check_false(cps.hasPref(uri, "test.data-integrity.float"));
- do_check_false(cps.hasPref(uri, "test.data-integrity.boolean"));
- do_check_false(cps.hasPref(uri, "test.data-integrity.string"));
- do_check_false(cps.hasPref(uri, "test.data-integrity.null"));
-
-
- // getPrefs
-
- cps.setPref(uri, "test.getPrefs.a", 1);
- cps.setPref(uri, "test.getPrefs.b", 2);
- cps.setPref(uri, "test.getPrefs.c", 3);
-
- var prefs = cps.getPrefs(uri);
- do_check_true(prefs.hasKey("test.getPrefs.a"));
- do_check_eq(prefs.get("test.getPrefs.a"), 1);
- do_check_true(prefs.hasKey("test.getPrefs.b"));
- do_check_eq(prefs.get("test.getPrefs.b"), 2);
- do_check_true(prefs.hasKey("test.getPrefs.c"));
- do_check_eq(prefs.get("test.getPrefs.c"), 3);
-
-
- // Site-Specificity
-
- {
- // These are all different sites, and setting a pref for one of them
- // shouldn't set it for the others.
- let uri1 = ContentPrefTest.getURI("http://www.domain1.com/");
- let uri2 = ContentPrefTest.getURI("http://foo.domain1.com/");
- let uri3 = ContentPrefTest.getURI("http://domain1.com/");
- let uri4 = ContentPrefTest.getURI("http://www.domain2.com/");
-
- cps.setPref(uri1, "test.site-specificity.uri1", 5);
- do_check_false(cps.hasPref(uri2, "test.site-specificity.uri1"));
- do_check_false(cps.hasPref(uri3, "test.site-specificity.uri1"));
- do_check_false(cps.hasPref(uri4, "test.site-specificity.uri1"));
-
- cps.setPref(uri2, "test.site-specificity.uri2", 5);
- do_check_false(cps.hasPref(uri1, "test.site-specificity.uri2"));
- do_check_false(cps.hasPref(uri3, "test.site-specificity.uri2"));
- do_check_false(cps.hasPref(uri4, "test.site-specificity.uri2"));
-
- cps.setPref(uri3, "test.site-specificity.uri3", 5);
- do_check_false(cps.hasPref(uri1, "test.site-specificity.uri3"));
- do_check_false(cps.hasPref(uri2, "test.site-specificity.uri3"));
- do_check_false(cps.hasPref(uri4, "test.site-specificity.uri3"));
-
- cps.setPref(uri4, "test.site-specificity.uri4", 5);
- do_check_false(cps.hasPref(uri1, "test.site-specificity.uri4"));
- do_check_false(cps.hasPref(uri2, "test.site-specificity.uri4"));
- do_check_false(cps.hasPref(uri3, "test.site-specificity.uri4"));
- }
-
- // Observers
-
- var specificObserver = {
- interfaces: [Ci.nsIContentPrefObserver, Ci.nsISupports],
-
- QueryInterface: function ContentPrefTest_QueryInterface(iid) {
- if (!this.interfaces.some( function(v) { return iid.equals(v) } ))
- throw Cr.NS_ERROR_NO_INTERFACE;
- return this;
- },
-
- numTimesSetCalled: 0,
- onContentPrefSet: function specificObserver_onContentPrefSet(group, name, value) {
- ++this.numTimesSetCalled;
- do_check_eq(group, "www.example.com");
- do_check_eq(name, "test.observer.1");
- do_check_eq(value, "test value");
- },
-
- numTimesRemovedCalled: 0,
- onContentPrefRemoved: function specificObserver_onContentPrefRemoved(group, name) {
- ++this.numTimesRemovedCalled;
- do_check_eq(group, "www.example.com");
- do_check_eq(name, "test.observer.1");
- }
-
- };
-
- var genericObserver = {
- interfaces: [Ci.nsIContentPrefObserver, Ci.nsISupports],
-
- QueryInterface: function ContentPrefTest_QueryInterface(iid) {
- if (!this.interfaces.some( function(v) { return iid.equals(v) } ))
- throw Cr.NS_ERROR_NO_INTERFACE;
- return this;
- },
-
- numTimesSetCalled: 0,
- onContentPrefSet: function genericObserver_onContentPrefSet(group, name, value, isPrivate) {
- ++this.numTimesSetCalled;
- do_check_eq(group, "www.example.com");
- if (name == "test.observer.private")
- do_check_true(isPrivate);
- else if (name == "test.observer.normal")
- do_check_false(isPrivate);
- else if (name != "test.observer.1" && name != "test.observer.2")
- do_throw("genericObserver.onContentPrefSet: " +
- "name not in (test.observer.(1|2|normal|private))");
- do_check_eq(value, "test value");
- },
-
- numTimesRemovedCalled: 0,
- onContentPrefRemoved: function genericObserver_onContentPrefRemoved(group, name, isPrivate) {
- ++this.numTimesRemovedCalled;
- do_check_eq(group, "www.example.com");
- if (name == "test.observer.private")
- do_check_true(isPrivate);
- else if (name == "test.observer.normal")
- do_check_false(isPrivate);
- if (name != "test.observer.1" && name != "test.observer.2" &&
- name != "test.observer.normal" && name != "test.observer.private") {
- do_throw("genericObserver.onContentPrefSet: " +
- "name not in (test.observer.(1|2|normal|private))");
- }
- }
-
- };
-
- // Make sure we can add observers, observers get notified about changes,
- // specific observers only get notified about changes to the specific setting,
- // and generic observers get notified about changes to all settings.
- cps.addObserver("test.observer.1", specificObserver);
- cps.addObserver(null, genericObserver);
- cps.setPref(uri, "test.observer.1", "test value");
- cps.setPref(uri, "test.observer.2", "test value");
- cps.removePref(uri, "test.observer.1");
- cps.removePref(uri, "test.observer.2");
- do_check_eq(specificObserver.numTimesSetCalled, 1);
- do_check_eq(genericObserver.numTimesSetCalled, 2);
- do_check_eq(specificObserver.numTimesRemovedCalled, 1);
- do_check_eq(genericObserver.numTimesRemovedCalled, 2);
-
- // Make sure information about private context is properly
- // retrieved by the observer.
- cps.setPref(uri, "test.observer.private", "test value", {usePrivateBrowsing: true});
- cps.setPref(uri, "test.observer.normal", "test value", {usePrivateBrowsing: false});
- cps.removePref(uri, "test.observer.private");
- cps.removePref(uri, "test.observer.normal");
-
- // Make sure we can remove observers and they don't get notified
- // about changes anymore.
- cps.removeObserver("test.observer.1", specificObserver);
- cps.removeObserver(null, genericObserver);
- cps.setPref(uri, "test.observer.1", "test value");
- cps.removePref(uri, "test.observer.1", "test value");
- do_check_eq(specificObserver.numTimesSetCalled, 1);
- do_check_eq(genericObserver.numTimesSetCalled, 4);
- do_check_eq(specificObserver.numTimesRemovedCalled, 1);
- do_check_eq(genericObserver.numTimesRemovedCalled, 3);
-
-
- // Get/Remove Prefs By Name
-
- {
- var anObserver = {
- interfaces: [Ci.nsIContentPrefObserver, Ci.nsISupports],
-
- QueryInterface: function ContentPrefTest_QueryInterface(iid) {
- if (!this.interfaces.some( function(v) { return iid.equals(v) } ))
- throw Cr.NS_ERROR_NO_INTERFACE;
- return this;
- },
-
- onContentPrefSet: function anObserver_onContentPrefSet(group, name, value) {
- },
-
- expectedDomains: [],
- numTimesRemovedCalled: 0,
- onContentPrefRemoved: function anObserver_onContentPrefRemoved(group, name) {
- ++this.numTimesRemovedCalled;
-
- // remove the domain from the list of expected domains
- var index = this.expectedDomains.indexOf(group);
- do_check_true(index >= 0);
- this.expectedDomains.splice(index, 1);
- }
- };
-
- let uri1 = ContentPrefTest.getURI("http://www.domain1.com/");
- let uri2 = ContentPrefTest.getURI("http://foo.domain1.com/");
- let uri3 = ContentPrefTest.getURI("http://domain1.com/");
- let uri4 = ContentPrefTest.getURI("http://www.domain2.com/");
-
- cps.setPref(uri1, "test.byname.1", 1);
- cps.setPref(uri1, "test.byname.2", 2);
- cps.setPref(uri2, "test.byname.1", 4);
- cps.setPref(uri3, "test.byname.3", 8);
- cps.setPref(uri4, "test.byname.1", 16);
- cps.setPref(null, "test.byname.1", 32);
- cps.setPref(null, "test.byname.2", false);
-
- function enumerateAndCheck(testName, expectedSum, expectedDomains) {
- var prefsByName = cps.getPrefsByName(testName);
- var enumerator = prefsByName.enumerator;
- var sum = 0;
- while (enumerator.hasMoreElements()) {
- var property = enumerator.getNext().QueryInterface(Components.interfaces.nsIProperty);
- sum += parseInt(property.value);
-
- // remove the domain from the list of expected domains
- var index = expectedDomains.indexOf(property.name);
- do_check_true(index >= 0);
- expectedDomains.splice(index, 1);
- }
- do_check_eq(sum, expectedSum);
- // check all domains have been removed from the array
- do_check_eq(expectedDomains.length, 0);
- }
-
- enumerateAndCheck("test.byname.1", 53,
- ["foo.domain1.com", null, "www.domain1.com", "www.domain2.com"]);
- enumerateAndCheck("test.byname.2", 2, ["www.domain1.com", null]);
- enumerateAndCheck("test.byname.3", 8, ["domain1.com"]);
-
- cps.addObserver("test.byname.1", anObserver);
- anObserver.expectedDomains = ["foo.domain1.com", null, "www.domain1.com", "www.domain2.com"];
-
- cps.removePrefsByName("test.byname.1");
- do_check_false(cps.hasPref(uri1, "test.byname.1"));
- do_check_false(cps.hasPref(uri2, "test.byname.1"));
- do_check_false(cps.hasPref(uri3, "test.byname.1"));
- do_check_false(cps.hasPref(uri4, "test.byname.1"));
- do_check_false(cps.hasPref(null, "test.byname.1"));
- do_check_true(cps.hasPref(uri1, "test.byname.2"));
- do_check_true(cps.hasPref(uri3, "test.byname.3"));
-
- do_check_eq(anObserver.numTimesRemovedCalled, 4);
- do_check_eq(anObserver.expectedDomains.length, 0);
-
- cps.removeObserver("test.byname.1", anObserver);
-
- // Clean up after ourselves
- cps.removePref(uri1, "test.byname.2");
- cps.removePref(uri3, "test.byname.3");
- cps.removePref(null, "test.byname.2");
- }
-
-
- // Clear Private Data Pref Removal
-
- {
- let uri1 = ContentPrefTest.getURI("http://www.domain1.com/");
- let uri2 = ContentPrefTest.getURI("http://www.domain2.com/");
- let uri3 = ContentPrefTest.getURI("http://www.domain3.com/");
-
- let dbConnection = cps.DBConnection;
-
- let prefCount = dbConnection.createStatement("SELECT COUNT(*) AS count FROM prefs");
-
- let groupCount = dbConnection.createStatement("SELECT COUNT(*) AS count FROM groups");
-
- // Add some prefs for multiple domains.
- cps.setPref(uri1, "test.removeAllGroups", 1);
- cps.setPref(uri2, "test.removeAllGroups", 2);
- cps.setPref(uri3, "test.removeAllGroups", 3);
-
- // Add a global pref.
- cps.setPref(null, "test.removeAllGroups", 1);
-
- // Make sure there are some prefs and groups in the database.
- prefCount.executeStep();
- do_check_true(prefCount.row.count > 0);
- prefCount.reset();
- groupCount.executeStep();
- do_check_true(groupCount.row.count > 0);
- groupCount.reset();
-
- // Remove all prefs and groups from the database using the same routine
- // the Clear Private Data dialog uses.
- cps.removeGroupedPrefs();
-
- // Make sure there are no longer any groups in the database and the only pref
- // is the global one.
- prefCount.executeStep();
- do_check_true(prefCount.row.count == 1);
- prefCount.reset();
- groupCount.executeStep();
- do_check_true(groupCount.row.count == 0);
- groupCount.reset();
- let globalPref = dbConnection.createStatement("SELECT groupID FROM prefs");
- globalPref.executeStep();
- do_check_true(globalPref.row.groupID == null);
- globalPref.reset();
- }
-}
diff --git a/toolkit/components/contentprefs/tests/unit/test_contentPrefsCache.js b/toolkit/components/contentprefs/tests/unit/test_contentPrefsCache.js
deleted file mode 100644
index 38a2faddc4..0000000000
--- a/toolkit/components/contentprefs/tests/unit/test_contentPrefsCache.js
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-var cps = new ContentPrefInstance(null);
-
-function run_test() {
- testCacheWorks("test1.example.com", "test-pref1");
- testHasCachedPrefFunction("test2.example.com", "test-pref2");
- testSetCaches("test3.example.com", "test-pref3");
- testGetCaches("test4.example.com", "test-pref4");
- testRemovePrefs("test5.example.com", "test-pref5");
- testTypeConversions("test6.example.com", "test-pref6");
- testNonExistingPrefCachesAsUndefined("test7.example.com", "test-pref7");
- testCacheEviction("test8.example.com", "test-pref8");
-}
-
-function testCacheWorks(uri, prefName) {
- const CACHED_VALUE = 3;
- const NEW_VALUE = 5;
-
- cps.setPref(uri, prefName, CACHED_VALUE);
- do_check_eq(cps.getPref(uri, prefName), CACHED_VALUE);
-
- // Now change the value directly through the DB and check
- // that the cached value is different
-
- let groupId = selectValue("SELECT id FROM groups WHERE name = :param1", "id", uri);
- let settingId = selectValue("SELECT id FROM settings WHERE name = :param1", "id", prefName);
- let prefId = selectValue("SELECT id FROM prefs WHERE groupID = :param1 AND settingID = :param2",
- "id", groupId, settingId);
-
- let stmt = cps.DBConnection.createStatement("UPDATE prefs SET value = :value WHERE id = :id");
- stmt.params.value = NEW_VALUE;
- stmt.params.id = prefId;
- stmt.execute();
-
- let dbValue = selectValue("SELECT value FROM prefs WHERE id = :param1", "value", prefId);
- let cacheValue = cps.getPref(uri, prefName);
-
- do_check_eq(dbValue, NEW_VALUE);
- do_check_eq(cacheValue, CACHED_VALUE);
- do_check_neq(cacheValue, dbValue);
-
- do_test_pending();
- cps.getPref(uri, prefName, function (value) {
- do_check_eq(dbValue, NEW_VALUE);
- do_check_eq(value, CACHED_VALUE);
- do_check_neq(value, dbValue);
- do_test_finished();
- });
-}
-
-function testHasCachedPrefFunction(uri, prefName) {
- const STARTING_VALUE = 3;
- const NEW_VALUE = 5;
-
- do_check_false(isCached(uri, prefName));
-
- cps.setPref(uri, prefName, STARTING_VALUE);
-
- let groupId = selectValue("SELECT id FROM groups WHERE name = :param1", "id", uri);
- let settingId = selectValue("SELECT id FROM settings WHERE name = :param1", "id", prefName);
- let prefId = selectValue("SELECT id FROM prefs WHERE groupID = :param1 AND settingID = :param2",
- "id", groupId, settingId);
-
- do_check_neq(prefId, undefined);
-
- let originalValue = selectValue("SELECT value FROM prefs WHERE id = :param1", "value", prefId);
- do_check_eq(originalValue, STARTING_VALUE);
-
- let stmt = cps.DBConnection.createStatement("UPDATE prefs SET value = :value WHERE id = :id");
- stmt.params.value = NEW_VALUE;
- stmt.params.id = prefId;
- stmt.execute();
-
- let newValue = selectValue("SELECT value FROM prefs WHERE id = :param1", "value", prefId);
- do_check_eq(newValue, NEW_VALUE);
-
- let cachedValue = cps.getPref(uri, prefName);
- do_check_eq(cachedValue, STARTING_VALUE);
- do_check_true(isCached(uri, prefName));
-}
-
-function testSetCaches(uri, prefName) {
- cps.setPref(uri, prefName, 0);
- do_check_true(isCached(uri, prefName));
-}
-
-function testRemovePrefs(uri, prefName) {
-
- /* removePref */
- cps.setPref("www1." + uri, prefName, 1);
-
- do_check_eq(cps.getPref("www1." + uri, prefName), 1);
-
- cps.removePref("www1." + uri, prefName);
-
- do_check_false(isCached("www1." + uri, prefName));
- do_check_false(cps.hasPref("www1." + uri, prefName));
- do_check_neq(cps.getPref("www1." + uri, prefName), 1);
-
- /* removeGroupedPrefs */
- cps.setPref("www2." + uri, prefName, 2);
- cps.setPref("www3." + uri, prefName, 3);
-
- do_check_eq(cps.getPref("www2." + uri, prefName), 2);
- do_check_eq(cps.getPref("www3." + uri, prefName), 3);
-
- cps.removeGroupedPrefs();
-
- do_check_false(isCached("www2." + uri, prefName));
- do_check_false(isCached("www3." + uri, prefName));
- do_check_false(cps.hasPref("www2." + uri, prefName));
- do_check_false(cps.hasPref("www3." + uri, prefName));
- do_check_neq(cps.getPref("www2." + uri, prefName), 2);
- do_check_neq(cps.getPref("www3." + uri, prefName), 3);
-
- /* removePrefsByName */
- cps.setPref("www4." + uri, prefName, 4);
- cps.setPref("www5." + uri, prefName, 5);
-
- do_check_eq(cps.getPref("www4." + uri, prefName), 4);
- do_check_eq(cps.getPref("www5." + uri, prefName), 5);
-
- cps.removePrefsByName(prefName);
-
- do_check_false(isCached("www4." + uri, prefName));
- do_check_false(isCached("www5." + uri, prefName));
- do_check_false(cps.hasPref("www4." + uri, prefName));
- do_check_false(cps.hasPref("www5." + uri, prefName));
- do_check_neq(cps.getPref("www4." + uri, prefName), 4);
- do_check_neq(cps.getPref("www5." + uri, prefName), 5);
-}
-
-function testGetCaches(uri, prefName) {
- const VALUE = 4;
-
- let insertGroup = cps.DBConnection.createStatement("INSERT INTO groups (name) VALUES (:name)");
- insertGroup.params.name = uri;
- insertGroup.execute();
- let groupId = cps.DBConnection.lastInsertRowID;
-
- let insertSetting = cps.DBConnection.createStatement("INSERT INTO settings (name) VALUES (:name)");
- insertSetting.params.name = prefName;
- insertSetting.execute();
- let settingId = cps.DBConnection.lastInsertRowID;
-
- let insertPref = cps.DBConnection.createStatement(`
- INSERT INTO prefs (groupID, settingID, value)
- VALUES (:groupId, :settingId, :value)
- `);
- insertPref.params.groupId = groupId;
- insertPref.params.settingId = settingId;
- insertPref.params.value = VALUE;
- insertPref.execute();
- let prefId = cps.DBConnection.lastInsertRowID;
-
- let dbValue = selectValue("SELECT value FROM prefs WHERE id = :param1", "value", prefId);
-
- // First access from service should hit the DB
- let svcValue = cps.getPref(uri, prefName);
-
- // Second time should get the value from cache
- let cacheValue = cps.getPref(uri, prefName);
-
- do_check_eq(VALUE, dbValue);
- do_check_eq(VALUE, svcValue);
- do_check_eq(VALUE, cacheValue);
-
- do_check_true(isCached(uri, prefName));
-}
-
-function testTypeConversions(uri, prefName) {
- let value;
-
- cps.setPref(uri, prefName, true);
- value = cps.getPref(uri, prefName);
- do_check_true(value === 1);
-
- cps.setPref(uri, prefName, false);
- value = cps.getPref(uri, prefName);
- do_check_true(value === 0);
-
- cps.setPref(uri, prefName, null);
- value = cps.getPref(uri, prefName);
- do_check_true(value === null);
-
- cps.setPref(uri, prefName, undefined);
- value = cps.getPref(uri, prefName);
- do_check_true(value === null);
-}
-
-function testNonExistingPrefCachesAsUndefined(uri, prefName) {
-
- do_check_false(isCached(uri, prefName));
-
- // Cache the pref
- let value = cps.getPref(uri, prefName);
- do_check_true(value === undefined);
-
- do_check_true(isCached(uri, prefName));
-
- // Cached pref
- value = cps.getPref(uri, prefName);
- do_check_true(value === undefined);
-}
-
-function testCacheEviction(uri, prefName) {
-
- cps.setPref(uri, prefName, 5);
- do_check_eq(cps.getPref(uri, prefName), 5);
- do_check_true(isCached(uri, prefName));
-
- // try to evict value from cache by adding various other entries
- const ENTRIES_TO_ADD = 200;
- for (let i = 0; i < ENTRIES_TO_ADD; i++) {
- let uriToAdd = "www" + i + uri;
- cps.setPref(uriToAdd, prefName, 0);
- }
-
- do_check_false(isCached(uri, prefName));
-
-}
-
-function selectValue(stmt, columnName, param1, param2) {
- stmt = cps.DBConnection.createStatement(stmt);
- if (param1)
- stmt.params.param1 = param1;
-
- if (param2)
- stmt.params.param2 = param2;
-
- stmt.executeStep();
- let val = stmt.row[columnName];
- stmt.reset();
- stmt.finalize();
- return val;
-}
-
-function isCached(uri, prefName) {
- return cps.hasCachedPref(uri, prefName);
-}
diff --git a/toolkit/components/contentprefs/tests/unit/test_getPrefAsync.js b/toolkit/components/contentprefs/tests/unit/test_getPrefAsync.js
deleted file mode 100644
index 27d239f793..0000000000
--- a/toolkit/components/contentprefs/tests/unit/test_getPrefAsync.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/* 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/. */
-var cps = new ContentPrefInstance(null);
-var uri = ContentPrefTest.getURI("http://www.example.com/");
-
-function run_test() {
- do_test_pending();
-
- cps.setPref(uri, "asynctest", "pie");
- do_check_eq(cps.getPref(uri, "asynctest"), "pie");
-
- cps.getPref(uri, "asynctest", function(aValue) {
- do_check_eq(aValue, "pie");
- testCallbackObj();
- });
-}
-
-function testCallbackObj() {
- cps.getPref(uri, "asynctest", {
- onResult: function(aValue) {
- do_check_eq(aValue, "pie");
- cps.removePref(uri, "asynctest");
- testNoResult();
- }
- });
-}
-
-function testNoResult() {
- cps.getPref(uri, "asynctest", function(aValue) {
- do_check_eq(aValue, undefined);
- do_test_finished();
- });
-}
diff --git a/toolkit/components/contentprefs/tests/unit/test_stringGroups.js b/toolkit/components/contentprefs/tests/unit/test_stringGroups.js
deleted file mode 100644
index afce3b64a3..0000000000
--- a/toolkit/components/contentprefs/tests/unit/test_stringGroups.js
+++ /dev/null
@@ -1,128 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
-
- var cps = new ContentPrefInstance(null);
-
- // Make sure disk synchronization checking is turned off by default.
- var statement = cps.DBConnection.createStatement("PRAGMA synchronous");
- statement.executeStep();
- do_check_eq(0, statement.getInt32(0));
-
- // These are the different types of aGroup arguments we'll test.
- var anObject = {"foo":"bar"}; // a simple object
- var uri = ContentPrefTest.getURI("http://www.example.com/"); // nsIURI
- var stringURI = "www.example.com"; // typeof = "string"
- var stringObjectURI = new String("www.example.com"); // typeof = "object"
-
- {
- // First check that all the methods work or don't work.
- function simple_test_methods(aGroup, shouldThrow) {
- var prefName = "test.pref.0";
- var prefValue = Math.floor(Math.random() * 100);
-
- if (shouldThrow) {
- do_check_thrown(function () { cps.getPref(aGroup, prefName); });
- do_check_thrown(function () { cps.setPref(aGroup, prefName, prefValue); });
- do_check_thrown(function () { cps.hasPref(aGroup, prefName); });
- do_check_thrown(function () { cps.removePref(aGroup, prefName); });
- do_check_thrown(function () { cps.getPrefs(aGroup); });
- } else {
- do_check_eq(cps.setPref(aGroup, prefName, prefValue), undefined);
- do_check_true(cps.hasPref(aGroup, prefName));
- do_check_eq(cps.getPref(aGroup, prefName), prefValue);
- do_check_eq(cps.removePref(aGroup, prefName), undefined);
- do_check_false(cps.hasPref(aGroup, prefName));
- }
- }
-
- simple_test_methods(cps, true); // arbitrary nsISupports object, should throw too
- simple_test_methods(anObject, true);
- simple_test_methods(uri, false);
- simple_test_methods(stringURI, false);
- simple_test_methods(stringObjectURI, false);
- }
-
- {
- // Now we'll check that each argument produces the same result.
- function complex_test_methods(aGroup) {
- var prefName = "test.pref.1";
- var prefValue = Math.floor(Math.random() * 100);
-
- do_check_eq(cps.setPref(aGroup, prefName, prefValue), undefined);
-
- do_check_true(cps.hasPref(uri, prefName));
- do_check_true(cps.hasPref(stringURI, prefName));
- do_check_true(cps.hasPref(stringObjectURI, prefName));
-
- do_check_eq(cps.getPref(uri, prefName), prefValue);
- do_check_eq(cps.getPref(stringURI, prefName), prefValue);
- do_check_eq(cps.getPref(stringObjectURI, prefName), prefValue);
-
- do_check_eq(cps.removePref(aGroup, prefName), undefined);
-
- do_check_false(cps.hasPref(uri, prefName));
- do_check_false(cps.hasPref(stringURI, prefName));
- do_check_false(cps.hasPref(stringObjectURI, prefName));
- }
-
- complex_test_methods(uri);
- complex_test_methods(stringURI);
- complex_test_methods(stringObjectURI);
- }
-
- {
- // test getPrefs returns the same prefs
- do_check_eq(cps.setPref(stringObjectURI, "test.5", 5), undefined);
- do_check_eq(cps.setPref(stringURI, "test.2", 2), undefined);
- do_check_eq(cps.setPref(uri, "test.1", 1), undefined);
-
- enumerateAndCheck(cps.getPrefs(uri), 8, ["test.1", "test.2", "test.5"]);
- enumerateAndCheck(cps.getPrefs(stringURI), 8, ["test.1", "test.2", "test.5"]);
- enumerateAndCheck(cps.getPrefs(stringObjectURI), 8, ["test.1", "test.2", "test.5"]);
-
- do_check_eq(cps.setPref(uri, "test.4", 4), undefined);
- do_check_eq(cps.setPref(stringObjectURI, "test.0", 0), undefined);
-
- enumerateAndCheck(cps.getPrefs(uri), 12, ["test.0", "test.1", "test.2", "test.4", "test.5"]);
- enumerateAndCheck(cps.getPrefs(stringURI), 12, ["test.0", "test.1", "test.2", "test.4", "test.5"]);
- enumerateAndCheck(cps.getPrefs(stringObjectURI), 12, ["test.0", "test.1", "test.2", "test.4", "test.5"]);
-
- do_check_eq(cps.setPref(stringURI, "test.3", 3), undefined);
-
- enumerateAndCheck(cps.getPrefs(uri), 15, ["test.0", "test.1", "test.2", "test.3", "test.4", "test.5"]);
- enumerateAndCheck(cps.getPrefs(stringURI), 15, ["test.0", "test.1", "test.2", "test.3", "test.4", "test.5"]);
- enumerateAndCheck(cps.getPrefs(stringObjectURI), 15, ["test.0", "test.1", "test.2", "test.3", "test.4", "test.5"]);
- }
-}
-
-function do_check_thrown (aCallback) {
- var exThrown = false;
- try {
- aCallback();
- do_throw("NS_ERROR_ILLEGAL_VALUE should have been thrown here");
- } catch (e) {
- do_check_eq(e.result, Cr.NS_ERROR_ILLEGAL_VALUE);
- exThrown = true;
- }
- do_check_true(exThrown);
-}
-
-function enumerateAndCheck(prefs, expectedSum, expectedNames) {
- var enumerator = prefs.enumerator;
- var sum = 0;
- while (enumerator.hasMoreElements()) {
- var property = enumerator.getNext().QueryInterface(Components.interfaces.nsIProperty);
- sum += parseInt(property.value);
-
- // remove the pref name from the list of expected names
- var index = expectedNames.indexOf(property.name);
- do_check_true(index >= 0);
- expectedNames.splice(index, 1);
- }
- do_check_eq(sum, expectedSum);
- // check all pref names have been removed from the array
- do_check_eq(expectedNames.length, 0);
-}
diff --git a/toolkit/components/contentprefs/tests/unit/test_unusedGroupsAndSettings.js b/toolkit/components/contentprefs/tests/unit/test_unusedGroupsAndSettings.js
deleted file mode 100644
index 24a86bcc06..0000000000
--- a/toolkit/components/contentprefs/tests/unit/test_unusedGroupsAndSettings.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/* 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/. */
-
-var cps = new ContentPrefInstance(null);
-
-function run_test() {
- var uri1 = ContentPrefTest.getURI("http://www.domain1.com/");
- var uri2 = ContentPrefTest.getURI("http://foo.domain1.com/");
- var uri3 = ContentPrefTest.getURI("http://domain1.com/");
- var uri4 = ContentPrefTest.getURI("http://www.domain2.com/");
-
- cps.setPref(uri1, "one", 1);
- cps.setPref(uri1, "two", 2);
- cps.setPref(uri2, "one", 4);
- cps.setPref(uri3, "three", 8);
- cps.setPref(uri4, "two", 16);
-
- cps.removePref(uri3, "three"); // uri3 should be removed now
- checkForUnusedGroups();
- checkForUnusedSettings();
-
- cps.removePrefsByName("two"); // uri4 should be removed now
- checkForUnusedGroups();
- checkForUnusedSettings();
-
- cps.removeGroupedPrefs();
- checkForUnusedGroups();
- checkForUnusedSettings();
-}
-
-function checkForUnusedGroups() {
- var stmt = cps.DBConnection.createStatement(`
- SELECT COUNT(*) AS count FROM groups
- WHERE id NOT IN (SELECT DISTINCT groupID FROM prefs)
- `);
- stmt.executeStep();
- do_check_eq(0, stmt.row.count);
- stmt.reset();
- stmt.finalize();
-}
-
-function checkForUnusedSettings() {
- var stmt = cps.DBConnection.createStatement(`
- SELECT COUNT(*) AS count FROM settings
- WHERE id NOT IN (SELECT DISTINCT settingID FROM prefs)
- `);
- stmt.executeStep();
- do_check_eq(0, stmt.row.count);
- stmt.reset();
- stmt.finalize();
-}
diff --git a/toolkit/components/contentprefs/tests/unit/xpcshell.ini b/toolkit/components/contentprefs/tests/unit/xpcshell.ini
deleted file mode 100644
index cbae178b1b..0000000000
--- a/toolkit/components/contentprefs/tests/unit/xpcshell.ini
+++ /dev/null
@@ -1,12 +0,0 @@
-[DEFAULT]
-head = head_contentPrefs.js
-tail = tail_contentPrefs.js
-
-[test_bug248970.js]
-[test_bug503971.js]
-[test_bug679784.js]
-[test_contentPrefs.js]
-[test_contentPrefsCache.js]
-[test_getPrefAsync.js]
-[test_stringGroups.js]
-[test_unusedGroupsAndSettings.js]
diff --git a/toolkit/components/contentprefs/tests/unit_cps2/.eslintrc.js b/toolkit/components/contentprefs/tests/unit_cps2/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/contentprefs/tests/unit_cps2/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/contentprefs/tests/unit_cps2/AsyncRunner.jsm b/toolkit/components/contentprefs/tests/unit_cps2/AsyncRunner.jsm
deleted file mode 100644
index ac878c28cd..0000000000
--- a/toolkit/components/contentprefs/tests/unit_cps2/AsyncRunner.jsm
+++ /dev/null
@@ -1,69 +0,0 @@
-/* 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/. */
-
-var EXPORTED_SYMBOLS = [
- "AsyncRunner",
-];
-
-const { interfaces: Ci, classes: Cc } = Components;
-
-function AsyncRunner(callbacks) {
- this._callbacks = callbacks;
- this._iteratorQueue = [];
-
- // This catches errors reported to the console, e.g., via Cu.reportError.
- Cc["@mozilla.org/consoleservice;1"].
- getService(Ci.nsIConsoleService).
- registerListener(this);
-}
-
-AsyncRunner.prototype = {
-
- appendIterator: function AR_appendIterator(iter) {
- this._iteratorQueue.push(iter);
- },
-
- next: function AR_next(arg) {
- if (!this._iteratorQueue.length) {
- this.destroy();
- this._callbacks.done();
- return;
- }
-
- try {
- var { done, value } = this._iteratorQueue[0].next(arg);
- if (done) {
- this._iteratorQueue.shift();
- this.next();
- return;
- }
- }
- catch (err) {
- this._callbacks.error(err);
- }
-
- // val is truthy => call next
- // val is an iterator => prepend it to the queue and start on it
- if (value) {
- if (typeof(value) != "boolean")
- this._iteratorQueue.unshift(value);
- this.next();
- }
- },
-
- destroy: function AR_destroy() {
- Cc["@mozilla.org/consoleservice;1"].
- getService(Ci.nsIConsoleService).
- unregisterListener(this);
- this.destroy = function AR_alreadyDestroyed() {};
- },
-
- observe: function AR_consoleServiceListener(msg) {
- if (msg instanceof Ci.nsIScriptError &&
- !(msg.flags & Ci.nsIScriptError.warningFlag))
- {
- this._callbacks.consoleError(msg);
- }
- },
-};
diff --git a/toolkit/components/contentprefs/tests/unit_cps2/head.js b/toolkit/components/contentprefs/tests/unit_cps2/head.js
deleted file mode 100644
index b86abe208a..0000000000
--- a/toolkit/components/contentprefs/tests/unit_cps2/head.js
+++ /dev/null
@@ -1,401 +0,0 @@
-/* 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/. */
-
-var { interfaces: Ci, classes: Cc, results: Cr, utils: Cu } = Components;
-
-Cu.import("resource://gre/modules/Services.jsm");
-
-var cps;
-var asyncRunner;
-var next;
-
-(function init() {
- // There has to be a profile directory before the CPS service is gotten.
- do_get_profile();
-})();
-
-function runAsyncTests(tests, dontResetBefore = false) {
- do_test_pending();
-
- cps = Cc["@mozilla.org/content-pref/service;1"].
- getService(Ci.nsIContentPrefService2);
-
- let s = {};
- Cu.import("resource://test/AsyncRunner.jsm", s);
- asyncRunner = new s.AsyncRunner({
- done: do_test_finished,
- error: function (err) {
- // xpcshell test functions like equal throw NS_ERROR_ABORT on
- // failure. Ignore those and catch only uncaught exceptions.
- if (err !== Cr.NS_ERROR_ABORT) {
- if (err.stack) {
- err = err + "\n\nTraceback (most recent call first):\n" + err.stack +
- "\nUseless do_throw stack:";
- }
- do_throw(err);
- }
- },
- consoleError: function (scriptErr) {
- // Previously, this code checked for console errors related to the test,
- // and treated them as failures. This was problematic, because our current
- // very-broken exception reporting machinery in XPCWrappedJSClass reports
- // errors to the console even if there's actually JS on the stack above
- // that will catch them. And a lot of the tests here intentionally trigger
- // error conditions on the JS-implemented XPCOM component (see erroneous()
- // in test_getSubdomains.js, for example). In the old world, we got lucky,
- // and the errors were never reported to the console due to happenstantial
- // JSContext reasons that aren't really worth going into.
- //
- // So. We make sure to dump this stuff so that it shows up in the logs, but
- // don't turn them into duplicate failures of the exception that was already
- // propagated to the caller.
- dump("AsyncRunner.jsm observed console error: " + scriptErr + "\n");
- }
- });
-
- next = asyncRunner.next.bind(asyncRunner);
-
- do_register_cleanup(function () {
- asyncRunner.destroy();
- asyncRunner = null;
- });
-
- tests.forEach(function (test) {
- function* gen() {
- do_print("Running " + test.name);
- yield test();
- yield reset();
- }
- asyncRunner.appendIterator(gen());
- });
-
- // reset() ends up calling asyncRunner.next(), starting the tests.
- if (dontResetBefore) {
- next();
- } else {
- reset();
- }
-}
-
-function makeCallback(callbacks, success = null) {
- callbacks = callbacks || {};
- if (!callbacks.handleError) {
- callbacks.handleError = function (error) {
- do_throw("handleError call was not expected, error: " + error);
- };
- }
- if (!callbacks.handleResult) {
- callbacks.handleResult = function() {
- do_throw("handleResult call was not expected");
- };
- }
- if (!callbacks.handleCompletion)
- callbacks.handleCompletion = function (reason) {
- equal(reason, Ci.nsIContentPrefCallback2.COMPLETE_OK);
- if (success) {
- success();
- } else {
- next();
- }
- };
- return callbacks;
-}
-
-function do_check_throws(fn) {
- let threw = false;
- try {
- fn();
- }
- catch (err) {
- threw = true;
- }
- ok(threw);
-}
-
-function sendMessage(msg, callback) {
- let obj = callback || {};
- let ref = Cu.getWeakReference(obj);
- cps.QueryInterface(Ci.nsIObserver).observe(ref, "test:" + msg, null);
- return "value" in obj ? obj.value : undefined;
-}
-
-function reset() {
- sendMessage("reset", next);
-}
-
-function setWithDate(group, name, val, timestamp, context) {
- function updateDate() {
- let db = sendMessage("db");
- let stmt = db.createAsyncStatement(`
- UPDATE prefs SET timestamp = :timestamp
- WHERE
- settingID = (SELECT id FROM settings WHERE name = :name)
- AND groupID = (SELECT id FROM groups WHERE name = :group)
- `);
- stmt.params.timestamp = timestamp / 1000;
- stmt.params.name = name;
- stmt.params.group = group;
-
- stmt.executeAsync({
- handleCompletion: function (reason) {
- next();
- },
- handleError: function (err) {
- do_throw(err);
- }
- });
- stmt.finalize();
- }
-
- cps.set(group, name, val, context, makeCallback(null, updateDate));
-}
-
-function getDate(group, name, context) {
- let db = sendMessage("db");
- let stmt = db.createAsyncStatement(`
- SELECT timestamp FROM prefs
- WHERE
- settingID = (SELECT id FROM settings WHERE name = :name)
- AND groupID = (SELECT id FROM groups WHERE name = :group)
- `);
- stmt.params.name = name;
- stmt.params.group = group;
-
- let res;
- stmt.executeAsync({
- handleResult: function (results) {
- let row = results.getNextRow();
- res = row.getResultByName("timestamp");
- },
- handleCompletion: function (reason) {
- next(res * 1000);
- },
- handleError: function (err) {
- do_throw(err);
- }
- });
- stmt.finalize();
-}
-
-function set(group, name, val, context) {
- cps.set(group, name, val, context, makeCallback());
-}
-
-function setGlobal(name, val, context) {
- cps.setGlobal(name, val, context, makeCallback());
-}
-
-function prefOK(actual, expected, strict) {
- ok(actual instanceof Ci.nsIContentPref);
- equal(actual.domain, expected.domain);
- equal(actual.name, expected.name);
- if (strict)
- strictEqual(actual.value, expected.value);
- else
- equal(actual.value, expected.value);
-}
-
-function* getOK(args, expectedVal, expectedGroup, strict) {
- if (args.length == 2)
- args.push(undefined);
- let expectedPrefs = expectedVal === undefined ? [] :
- [{ domain: expectedGroup || args[0],
- name: args[1],
- value: expectedVal }];
- yield getOKEx("getByDomainAndName", args, expectedPrefs, strict);
-}
-
-function* getSubdomainsOK(args, expectedGroupValPairs) {
- if (args.length == 2)
- args.push(undefined);
- let expectedPrefs = expectedGroupValPairs.map(function ([group, val]) {
- return { domain: group, name: args[1], value: val };
- });
- yield getOKEx("getBySubdomainAndName", args, expectedPrefs);
-}
-
-function* getGlobalOK(args, expectedVal) {
- if (args.length == 1)
- args.push(undefined);
- let expectedPrefs = expectedVal === undefined ? [] :
- [{ domain: null, name: args[0], value: expectedVal }];
- yield getOKEx("getGlobal", args, expectedPrefs);
-}
-
-function* getOKEx(methodName, args, expectedPrefs, strict, context) {
- let actualPrefs = [];
- args.push(makeCallback({
- handleResult: pref => actualPrefs.push(pref)
- }));
- yield cps[methodName].apply(cps, args);
- arraysOfArraysOK([actualPrefs], [expectedPrefs], function (actual, expected) {
- prefOK(actual, expected, strict);
- });
-}
-
-function getCachedOK(args, expectedIsCached, expectedVal, expectedGroup,
- strict) {
- if (args.length == 2)
- args.push(undefined);
- let expectedPref = !expectedIsCached ? null : {
- domain: expectedGroup || args[0],
- name: args[1],
- value: expectedVal
- };
- getCachedOKEx("getCachedByDomainAndName", args, expectedPref, strict);
-}
-
-function getCachedSubdomainsOK(args, expectedGroupValPairs) {
- if (args.length == 2)
- args.push(undefined);
- let len = {};
- args.push(len);
- let actualPrefs = cps.getCachedBySubdomainAndName.apply(cps, args);
- actualPrefs = actualPrefs.sort(function (a, b) {
- return a.domain.localeCompare(b.domain);
- });
- equal(actualPrefs.length, len.value);
- let expectedPrefs = expectedGroupValPairs.map(function ([group, val]) {
- return { domain: group, name: args[1], value: val };
- });
- arraysOfArraysOK([actualPrefs], [expectedPrefs], prefOK);
-}
-
-function getCachedGlobalOK(args, expectedIsCached, expectedVal) {
- if (args.length == 1)
- args.push(undefined);
- let expectedPref = !expectedIsCached ? null : {
- domain: null,
- name: args[0],
- value: expectedVal
- };
- getCachedOKEx("getCachedGlobal", args, expectedPref);
-}
-
-function getCachedOKEx(methodName, args, expectedPref, strict) {
- let actualPref = cps[methodName].apply(cps, args);
- if (expectedPref)
- prefOK(actualPref, expectedPref, strict);
- else
- strictEqual(actualPref, null);
-}
-
-function arraysOK(actual, expected, cmp) {
- if (actual.length != expected.length) {
- do_throw("Length is not equal: " + JSON.stringify(actual) + "==" + JSON.stringify(expected));
- } else {
- actual.forEach(function (actualElt, j) {
- let expectedElt = expected[j];
- cmp(actualElt, expectedElt);
- });
- }
-}
-
-function arraysOfArraysOK(actual, expected, cmp) {
- cmp = cmp || equal;
- arraysOK(actual, expected, function (act, exp) {
- arraysOK(act, exp, cmp)
- });
-}
-
-function dbOK(expectedRows) {
- let db = sendMessage("db");
- let stmt = db.createAsyncStatement(`
- SELECT groups.name AS grp, settings.name AS name, prefs.value AS value
- FROM prefs
- LEFT JOIN groups ON groups.id = prefs.groupID
- LEFT JOIN settings ON settings.id = prefs.settingID
- UNION
-
- /*
- These second two SELECTs get the rows of the groups and settings tables
- that aren't referenced by the prefs table. Neither should return any
- rows if the component is working properly.
- */
- SELECT groups.name AS grp, NULL AS name, NULL AS value
- FROM groups
- WHERE id NOT IN (
- SELECT DISTINCT groupID
- FROM prefs
- WHERE groupID NOTNULL
- )
- UNION
- SELECT NULL AS grp, settings.name AS name, NULL AS value
- FROM settings
- WHERE id NOT IN (
- SELECT DISTINCT settingID
- FROM prefs
- WHERE settingID NOTNULL
- )
-
- ORDER BY value ASC, grp ASC, name ASC
- `);
-
- let actualRows = [];
- let cols = ["grp", "name", "value"];
-
- db.executeAsync([stmt], 1, {
- handleCompletion: function (reason) {
- arraysOfArraysOK(actualRows, expectedRows);
- next();
- },
- handleResult: function (results) {
- let row = null;
- while (row = results.getNextRow()) {
- actualRows.push(cols.map(c => row.getResultByName(c)));
- }
- },
- handleError: function (err) {
- do_throw(err);
- }
- });
- stmt.finalize();
-}
-
-function on(event, names, dontRemove) {
- let args = {
- reset: function () {
- for (let prop in this) {
- if (Array.isArray(this[prop]))
- this[prop].splice(0, this[prop].length);
- }
- },
- };
-
- let observers = {};
-
- names.forEach(function (name) {
- let obs = {};
- ["onContentPrefSet", "onContentPrefRemoved"].forEach(function (meth) {
- obs[meth] = () => do_throw(meth + " should not be called");
- });
- obs["onContentPref" + event] = function () {
- args[name].push(Array.slice(arguments));
- };
- observers[name] = obs;
- args[name] = [];
- args[name].observer = obs;
- cps.addObserverForName(name, obs);
- });
-
- do_execute_soon(function () {
- if (!dontRemove)
- names.forEach(n => cps.removeObserverForName(n, observers[n]));
- next(args);
- });
-}
-
-function schemaVersionIs(expectedVersion) {
- let db = sendMessage("db");
- equal(db.schemaVersion, expectedVersion);
-}
-
-function wait() {
- do_execute_soon(next);
-}
-
-function observerArgsOK(actualArgs, expectedArgs) {
- notEqual(actualArgs, undefined);
- arraysOfArraysOK(actualArgs, expectedArgs);
-}
diff --git a/toolkit/components/contentprefs/tests/unit_cps2/test_extractDomain.js b/toolkit/components/contentprefs/tests/unit_cps2/test_extractDomain.js
deleted file mode 100644
index 2ec3d6878b..0000000000
--- a/toolkit/components/contentprefs/tests/unit_cps2/test_extractDomain.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- let tests = {
- "http://example.com": "example.com",
- "http://example.com/": "example.com",
- "http://example.com/foo/bar/baz": "example.com",
- "http://subdomain.example.com/foo/bar/baz": "subdomain.example.com",
- "http://qix.quux.example.com/foo/bar/baz": "qix.quux.example.com",
- "file:///home/foo/bar": "file:///home/foo/bar",
- "not a url": "not a url",
- };
- let cps = Cc["@mozilla.org/content-pref/service;1"].
- getService(Ci.nsIContentPrefService2);
- for (let url in tests) {
- do_check_eq(cps.extractDomain(url), tests[url]);
- }
-}
diff --git a/toolkit/components/contentprefs/tests/unit_cps2/test_getCached.js b/toolkit/components/contentprefs/tests/unit_cps2/test_getCached.js
deleted file mode 100644
index 33a965b7f7..0000000000
--- a/toolkit/components/contentprefs/tests/unit_cps2/test_getCached.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- runAsyncTests(tests);
-}
-
-var tests = [
-
- function* nonexistent() {
- getCachedOK(["a.com", "foo"], false, undefined);
- getCachedGlobalOK(["foo"], false, undefined);
- yield true;
- },
-
- function* isomorphicDomains() {
- yield set("a.com", "foo", 1);
- getCachedOK(["a.com", "foo"], true, 1);
- getCachedOK(["http://a.com/huh", "foo"], true, 1, "a.com");
- },
-
- function* names() {
- yield set("a.com", "foo", 1);
- getCachedOK(["a.com", "foo"], true, 1);
-
- yield set("a.com", "bar", 2);
- getCachedOK(["a.com", "foo"], true, 1);
- getCachedOK(["a.com", "bar"], true, 2);
-
- yield setGlobal("foo", 3);
- getCachedOK(["a.com", "foo"], true, 1);
- getCachedOK(["a.com", "bar"], true, 2);
- getCachedGlobalOK(["foo"], true, 3);
-
- yield setGlobal("bar", 4);
- getCachedOK(["a.com", "foo"], true, 1);
- getCachedOK(["a.com", "bar"], true, 2);
- getCachedGlobalOK(["foo"], true, 3);
- getCachedGlobalOK(["bar"], true, 4);
- },
-
- function* subdomains() {
- yield set("a.com", "foo", 1);
- yield set("b.a.com", "foo", 2);
- getCachedOK(["a.com", "foo"], true, 1);
- getCachedOK(["b.a.com", "foo"], true, 2);
- },
-
- function* privateBrowsing() {
- yield set("a.com", "foo", 1);
- yield set("a.com", "bar", 2);
- yield setGlobal("foo", 3);
- yield setGlobal("bar", 4);
- yield set("b.com", "foo", 5);
-
- let context = { usePrivateBrowsing: true };
- yield set("a.com", "foo", 6, context);
- yield setGlobal("foo", 7, context);
- getCachedOK(["a.com", "foo", context], true, 6);
- getCachedOK(["a.com", "bar", context], true, 2);
- getCachedGlobalOK(["foo", context], true, 7);
- getCachedGlobalOK(["bar", context], true, 4);
- getCachedOK(["b.com", "foo", context], true, 5);
-
- getCachedOK(["a.com", "foo"], true, 1);
- getCachedOK(["a.com", "bar"], true, 2);
- getCachedGlobalOK(["foo"], true, 3);
- getCachedGlobalOK(["bar"], true, 4);
- getCachedOK(["b.com", "foo"], true, 5);
- },
-
- function* erroneous() {
- do_check_throws(() => cps.getCachedByDomainAndName(null, "foo", null));
- do_check_throws(() => cps.getCachedByDomainAndName("", "foo", null));
- do_check_throws(() => cps.getCachedByDomainAndName("a.com", "", null));
- do_check_throws(() => cps.getCachedByDomainAndName("a.com", null, null));
- do_check_throws(() => cps.getCachedGlobal("", null));
- do_check_throws(() => cps.getCachedGlobal(null, null));
- yield true;
- },
-
- function* casts() {
- // SQLite casts booleans to integers. This makes sure the values stored in
- // the cache are the same as the casted values in the database.
-
- yield set("a.com", "foo", false);
- yield getOK(["a.com", "foo"], 0, "a.com", true);
- getCachedOK(["a.com", "foo"], true, 0, "a.com", true);
-
- yield set("a.com", "bar", true);
- yield getOK(["a.com", "bar"], 1, "a.com", true);
- getCachedOK(["a.com", "bar"], true, 1, "a.com", true);
- },
-];
diff --git a/toolkit/components/contentprefs/tests/unit_cps2/test_getCachedSubdomains.js b/toolkit/components/contentprefs/tests/unit_cps2/test_getCachedSubdomains.js
deleted file mode 100644
index 9f2599708f..0000000000
--- a/toolkit/components/contentprefs/tests/unit_cps2/test_getCachedSubdomains.js
+++ /dev/null
@@ -1,186 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- runAsyncTests(tests);
-}
-
-var tests = [
-
- function* nonexistent() {
- getCachedSubdomainsOK(["a.com", "foo"], []);
- yield true;
- },
-
- function* isomorphicDomains() {
- yield set("a.com", "foo", 1);
- getCachedSubdomainsOK(["a.com", "foo"], [["a.com", 1]]);
- getCachedSubdomainsOK(["http://a.com/huh", "foo"], [["a.com", 1]]);
- },
-
- function* names() {
- yield set("a.com", "foo", 1);
- getCachedSubdomainsOK(["a.com", "foo"], [["a.com", 1]]);
-
- yield set("a.com", "bar", 2);
- getCachedSubdomainsOK(["a.com", "foo"], [["a.com", 1]]);
- getCachedSubdomainsOK(["a.com", "bar"], [["a.com", 2]]);
-
- yield setGlobal("foo", 3);
- getCachedSubdomainsOK(["a.com", "foo"], [["a.com", 1]]);
- getCachedSubdomainsOK(["a.com", "bar"], [["a.com", 2]]);
- getCachedGlobalOK(["foo"], true, 3);
-
- yield setGlobal("bar", 4);
- getCachedSubdomainsOK(["a.com", "foo"], [["a.com", 1]]);
- getCachedSubdomainsOK(["a.com", "bar"], [["a.com", 2]]);
- getCachedGlobalOK(["foo"], true, 3);
- getCachedGlobalOK(["bar"], true, 4);
- },
-
- function* subdomains() {
- yield set("a.com", "foo", 1);
- yield set("b.a.com", "foo", 2);
- getCachedSubdomainsOK(["a.com", "foo"], [["a.com", 1], ["b.a.com", 2]]);
- getCachedSubdomainsOK(["b.a.com", "foo"], [["b.a.com", 2]]);
- },
-
- function* populateViaGet() {
- yield cps.getByDomainAndName("a.com", "foo", null, makeCallback());
- getCachedSubdomainsOK(["a.com", "foo"], [["a.com", undefined]]);
-
- yield cps.getGlobal("foo", null, makeCallback());
- getCachedSubdomainsOK(["a.com", "foo"], [["a.com", undefined]]);
- getCachedGlobalOK(["foo"], true, undefined);
- },
-
- function* populateViaGetSubdomains() {
- yield cps.getBySubdomainAndName("a.com", "foo", null, makeCallback());
- getCachedSubdomainsOK(["a.com", "foo"], [["a.com", undefined]]);
- },
-
- function* populateViaRemove() {
- yield cps.removeByDomainAndName("a.com", "foo", null, makeCallback());
- getCachedSubdomainsOK(["a.com", "foo"], [["a.com", undefined]]);
-
- yield cps.removeBySubdomainAndName("b.com", "foo", null, makeCallback());
- getCachedSubdomainsOK(["a.com", "foo"], [["a.com", undefined]]);
- getCachedSubdomainsOK(["b.com", "foo"], [["b.com", undefined]]);
-
- yield cps.removeGlobal("foo", null, makeCallback());
- getCachedSubdomainsOK(["a.com", "foo"], [["a.com", undefined]]);
- getCachedSubdomainsOK(["b.com", "foo"], [["b.com", undefined]]);
- getCachedGlobalOK(["foo"], true, undefined);
-
- yield set("a.com", "foo", 1);
- yield cps.removeByDomainAndName("a.com", "foo", null, makeCallback());
- getCachedSubdomainsOK(["a.com", "foo"], [["a.com", undefined]]);
- getCachedSubdomainsOK(["b.com", "foo"], [["b.com", undefined]]);
- getCachedGlobalOK(["foo"], true, undefined);
-
- yield set("a.com", "foo", 2);
- yield set("b.a.com", "foo", 3);
- yield cps.removeBySubdomainAndName("a.com", "foo", null, makeCallback());
- getCachedSubdomainsOK(["a.com", "foo"],
- [["a.com", undefined], ["b.a.com", undefined]]);
- getCachedSubdomainsOK(["b.com", "foo"], [["b.com", undefined]]);
- getCachedGlobalOK(["foo"], true, undefined);
- getCachedSubdomainsOK(["b.a.com", "foo"], [["b.a.com", undefined]]);
-
- yield setGlobal("foo", 4);
- yield cps.removeGlobal("foo", null, makeCallback());
- getCachedSubdomainsOK(["a.com", "foo"],
- [["a.com", undefined], ["b.a.com", undefined]]);
- getCachedSubdomainsOK(["b.com", "foo"], [["b.com", undefined]]);
- getCachedGlobalOK(["foo"], true, undefined);
- getCachedSubdomainsOK(["b.a.com", "foo"], [["b.a.com", undefined]]);
- },
-
- function* populateViaRemoveByDomain() {
- yield set("a.com", "foo", 1);
- yield set("a.com", "bar", 2);
- yield set("b.a.com", "foo", 3);
- yield set("b.a.com", "bar", 4);
- yield cps.removeByDomain("a.com", null, makeCallback());
- getCachedSubdomainsOK(["a.com", "foo"],
- [["a.com", undefined], ["b.a.com", 3]]);
- getCachedSubdomainsOK(["a.com", "bar"],
- [["a.com", undefined], ["b.a.com", 4]]);
-
- yield set("a.com", "foo", 5);
- yield set("a.com", "bar", 6);
- yield cps.removeBySubdomain("a.com", null, makeCallback());
- getCachedSubdomainsOK(["a.com", "foo"],
- [["a.com", undefined], ["b.a.com", undefined]]);
- getCachedSubdomainsOK(["a.com", "bar"],
- [["a.com", undefined], ["b.a.com", undefined]]);
-
- yield setGlobal("foo", 7);
- yield setGlobal("bar", 8);
- yield cps.removeAllGlobals(null, makeCallback());
- getCachedGlobalOK(["foo"], true, undefined);
- getCachedGlobalOK(["bar"], true, undefined);
- },
-
- function* populateViaRemoveAllDomains() {
- yield set("a.com", "foo", 1);
- yield set("a.com", "bar", 2);
- yield set("b.com", "foo", 3);
- yield set("b.com", "bar", 4);
- yield cps.removeAllDomains(null, makeCallback());
- getCachedSubdomainsOK(["a.com", "foo"], [["a.com", undefined]]);
- getCachedSubdomainsOK(["a.com", "bar"], [["a.com", undefined]]);
- getCachedSubdomainsOK(["b.com", "foo"], [["b.com", undefined]]);
- getCachedSubdomainsOK(["b.com", "bar"], [["b.com", undefined]]);
- },
-
- function* populateViaRemoveByName() {
- yield set("a.com", "foo", 1);
- yield set("a.com", "bar", 2);
- yield setGlobal("foo", 3);
- yield setGlobal("bar", 4);
- yield cps.removeByName("foo", null, makeCallback());
- getCachedSubdomainsOK(["a.com", "foo"], [["a.com", undefined]]);
- getCachedSubdomainsOK(["a.com", "bar"], [["a.com", 2]]);
- getCachedGlobalOK(["foo"], true, undefined);
- getCachedGlobalOK(["bar"], true, 4);
-
- yield cps.removeByName("bar", null, makeCallback());
- getCachedSubdomainsOK(["a.com", "foo"], [["a.com", undefined]]);
- getCachedSubdomainsOK(["a.com", "bar"], [["a.com", undefined]]);
- getCachedGlobalOK(["foo"], true, undefined);
- getCachedGlobalOK(["bar"], true, undefined);
- },
-
- function* privateBrowsing() {
- yield set("a.com", "foo", 1);
- yield set("a.com", "bar", 2);
- yield setGlobal("foo", 3);
- yield setGlobal("bar", 4);
- yield set("b.com", "foo", 5);
-
- let context = { usePrivateBrowsing: true };
- yield set("a.com", "foo", 6, context);
- yield setGlobal("foo", 7, context);
- getCachedSubdomainsOK(["a.com", "foo", context], [["a.com", 6]]);
- getCachedSubdomainsOK(["a.com", "bar", context], [["a.com", 2]]);
- getCachedGlobalOK(["foo", context], true, 7);
- getCachedGlobalOK(["bar", context], true, 4);
- getCachedSubdomainsOK(["b.com", "foo", context], [["b.com", 5]]);
-
- getCachedSubdomainsOK(["a.com", "foo"], [["a.com", 1]]);
- getCachedSubdomainsOK(["a.com", "bar"], [["a.com", 2]]);
- getCachedGlobalOK(["foo"], true, 3);
- getCachedGlobalOK(["bar"], true, 4);
- getCachedSubdomainsOK(["b.com", "foo"], [["b.com", 5]]);
- },
-
- function* erroneous() {
- do_check_throws(() => cps.getCachedBySubdomainAndName(null, "foo", null));
- do_check_throws(() => cps.getCachedBySubdomainAndName("", "foo", null));
- do_check_throws(() => cps.getCachedBySubdomainAndName("a.com", "", null));
- do_check_throws(() => cps.getCachedBySubdomainAndName("a.com", null, null));
- yield true;
- },
-];
diff --git a/toolkit/components/contentprefs/tests/unit_cps2/test_getSubdomains.js b/toolkit/components/contentprefs/tests/unit_cps2/test_getSubdomains.js
deleted file mode 100644
index d08d6fe695..0000000000
--- a/toolkit/components/contentprefs/tests/unit_cps2/test_getSubdomains.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- runAsyncTests(tests);
-}
-
-var tests = [
-
- function* get_nonexistent() {
- yield getSubdomainsOK(["a.com", "foo"], []);
- },
-
- function* isomorphicDomains() {
- yield set("a.com", "foo", 1);
- yield getSubdomainsOK(["a.com", "foo"], [["a.com", 1]]);
- yield getSubdomainsOK(["http://a.com/huh", "foo"], [["a.com", 1]]);
- },
-
- function* names() {
- yield set("a.com", "foo", 1);
- yield getSubdomainsOK(["a.com", "foo"], [["a.com", 1]]);
-
- yield set("a.com", "bar", 2);
- yield getSubdomainsOK(["a.com", "foo"], [["a.com", 1]]);
- yield getSubdomainsOK(["a.com", "bar"], [["a.com", 2]]);
-
- yield setGlobal("foo", 3);
- yield getSubdomainsOK(["a.com", "foo"], [["a.com", 1]]);
- yield getSubdomainsOK(["a.com", "bar"], [["a.com", 2]]);
- },
-
- function* subdomains() {
- yield set("a.com", "foo", 1);
- yield set("b.a.com", "foo", 2);
- yield getSubdomainsOK(["a.com", "foo"], [["a.com", 1], ["b.a.com", 2]]);
- yield getSubdomainsOK(["b.a.com", "foo"], [["b.a.com", 2]]);
- },
-
- function* privateBrowsing() {
- yield set("a.com", "foo", 1);
- yield set("a.com", "bar", 2);
- yield setGlobal("foo", 3);
- yield setGlobal("bar", 4);
- yield set("b.com", "foo", 5);
-
- let context = { usePrivateBrowsing: true };
- yield set("a.com", "foo", 6, context);
- yield setGlobal("foo", 7, context);
- yield getSubdomainsOK(["a.com", "foo", context], [["a.com", 6]]);
- yield getSubdomainsOK(["a.com", "bar", context], [["a.com", 2]]);
- yield getSubdomainsOK(["b.com", "foo", context], [["b.com", 5]]);
-
- yield getSubdomainsOK(["a.com", "foo"], [["a.com", 1]]);
- yield getSubdomainsOK(["a.com", "bar"], [["a.com", 2]]);
- yield getSubdomainsOK(["b.com", "foo"], [["b.com", 5]]);
- },
-
- function* erroneous() {
- do_check_throws(() => cps.getBySubdomainAndName(null, "foo", null, {}));
- do_check_throws(() => cps.getBySubdomainAndName("", "foo", null, {}));
- do_check_throws(() => cps.getBySubdomainAndName("a.com", "", null, {}));
- do_check_throws(() => cps.getBySubdomainAndName("a.com", null, null, {}));
- do_check_throws(() => cps.getBySubdomainAndName("a.com", "foo", null, null));
- yield true;
- },
-];
diff --git a/toolkit/components/contentprefs/tests/unit_cps2/test_migrationToSchema4.js b/toolkit/components/contentprefs/tests/unit_cps2/test_migrationToSchema4.js
deleted file mode 100644
index 85d23e3558..0000000000
--- a/toolkit/components/contentprefs/tests/unit_cps2/test_migrationToSchema4.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/* 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/. */
-
-// Dump of version we migrate from
-var schema_version3 = `
-PRAGMA foreign_keys=OFF;
-BEGIN TRANSACTION;
- CREATE TABLE groups (id INTEGER PRIMARY KEY, name TEXT NOT NULL);
- INSERT INTO "groups" VALUES(1,'foo.com');
- INSERT INTO "groups" VALUES(2,'bar.com');
-
- CREATE TABLE settings (id INTEGER PRIMARY KEY, name TEXT NOT NULL);
- INSERT INTO "settings" VALUES(1,'zoom-setting');
- INSERT INTO "settings" VALUES(2,'dir-setting');
-
- CREATE TABLE prefs (id INTEGER PRIMARY KEY, groupID INTEGER REFERENCES groups(id), settingID INTEGER NOT NULL REFERENCES settings(id), value BLOB);
- INSERT INTO "prefs" VALUES(1,1,1,0.5);
- INSERT INTO "prefs" VALUES(2,1,2,'/download/dir');
- INSERT INTO "prefs" VALUES(3,2,1,0.3);
- INSERT INTO "prefs" VALUES(4,NULL,1,0.1);
-
- CREATE INDEX groups_idx ON groups(name);
- CREATE INDEX settings_idx ON settings(name);
- CREATE INDEX prefs_idx ON prefs(groupID, settingID);
-COMMIT;`;
-
-function prepareVersion3Schema(callback) {
- var dirService = Cc["@mozilla.org/file/directory_service;1"].
- getService(Ci.nsIProperties);
-
- var dbFile = dirService.get("ProfD", Ci.nsIFile);
- dbFile.append("content-prefs.sqlite");
-
- var dbService = Cc["@mozilla.org/storage/service;1"].
- getService(Ci.mozIStorageService);
- ok(!dbFile.exists(), "Db should not exist yet.");
-
- var dbConnection = dbService.openDatabase(dbFile);
- equal(dbConnection.schemaVersion, 0);
-
- dbConnection.executeSimpleSQL(schema_version3);
- dbConnection.schemaVersion = 3;
-
- dbConnection.close();
-}
-
-function run_test() {
- prepareVersion3Schema();
- runAsyncTests(tests, true);
-}
-
-
-// WARNING: Database will reset after every test. This limitation comes from
-// the fact that we ContentPrefService constructor is run only once per test file
-// and so migration will be run only once.
-var tests = [
- function* testMigration() {
- // Test migrated db content.
- schemaVersionIs(4);
- let dbExpectedState = [
- [null, "zoom-setting", 0.1],
- ["bar.com", "zoom-setting", 0.3],
- ["foo.com", "zoom-setting", 0.5],
- ["foo.com", "dir-setting", "/download/dir"],
- ];
- yield dbOK(dbExpectedState);
-
- // Migrated fields should have timestamp set to 0.
- yield cps.removeAllDomainsSince(1000, null, makeCallback());
- yield dbOK(dbExpectedState);
-
- yield cps.removeAllDomainsSince(0, null, makeCallback());
- yield dbOK([[null, "zoom-setting", 0.1]]);
-
- // Test that dates are present after migration (column is added).
- const timestamp = 1234;
- yield setWithDate("a.com", "pref-name", "val", timestamp);
- let actualTimestamp = yield getDate("a.com", "pref-name");
- equal(actualTimestamp, timestamp);
- }
-];
diff --git a/toolkit/components/contentprefs/tests/unit_cps2/test_observers.js b/toolkit/components/contentprefs/tests/unit_cps2/test_observers.js
deleted file mode 100644
index c48918cd92..0000000000
--- a/toolkit/components/contentprefs/tests/unit_cps2/test_observers.js
+++ /dev/null
@@ -1,178 +0,0 @@
-/* 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/. */
-
-let global = this;
-
-function run_test() {
- var allTests = [];
- for (var i = 0; i < tests.length; i++) {
- // Generate two wrappers of each test function that invoke the original test with an
- // appropriate privacy context.
- var pub = eval('var f = function* ' + tests[i].name + '() { yield tests[' + i + ']({ usePrivateBrowsing: false }); }; f');
- var priv = eval('var f = function* ' + tests[i].name + '_private() { yield tests[' + i + ']({ usePrivateBrowsing: true }); }; f');
- allTests.push(pub);
- allTests.push(priv);
- }
- allTests = allTests.concat(specialTests);
- runAsyncTests(allTests);
-}
-
-var tests = [
-
- function* observerForName_set(context) {
- yield set("a.com", "foo", 1, context);
- let args = yield on("Set", ["foo", null, "bar"]);
- observerArgsOK(args.foo, [["a.com", "foo", 1, context.usePrivateBrowsing]]);
- observerArgsOK(args.null, [["a.com", "foo", 1, context.usePrivateBrowsing]]);
- observerArgsOK(args.bar, []);
-
- yield setGlobal("foo", 2, context);
- args = yield on("Set", ["foo", null, "bar"]);
- observerArgsOK(args.foo, [[null, "foo", 2, context.usePrivateBrowsing]]);
- observerArgsOK(args.null, [[null, "foo", 2, context.usePrivateBrowsing]]);
- observerArgsOK(args.bar, []);
- },
-
- function* observerForName_remove(context) {
- yield set("a.com", "foo", 1, context);
- yield setGlobal("foo", 2, context);
-
- yield cps.removeByDomainAndName("a.com", "bogus", context, makeCallback());
- let args = yield on("Removed", ["foo", null, "bar"]);
- observerArgsOK(args.foo, []);
- observerArgsOK(args.null, []);
- observerArgsOK(args.bar, []);
-
- yield cps.removeByDomainAndName("a.com", "foo", context, makeCallback());
- args = yield on("Removed", ["foo", null, "bar"]);
- observerArgsOK(args.foo, [["a.com", "foo", context.usePrivateBrowsing]]);
- observerArgsOK(args.null, [["a.com", "foo", context.usePrivateBrowsing]]);
- observerArgsOK(args.bar, []);
-
- yield cps.removeGlobal("foo", context, makeCallback());
- args = yield on("Removed", ["foo", null, "bar"]);
- observerArgsOK(args.foo, [[null, "foo", context.usePrivateBrowsing]]);
- observerArgsOK(args.null, [[null, "foo", context.usePrivateBrowsing]]);
- observerArgsOK(args.bar, []);
- },
-
- function* observerForName_removeByDomain(context) {
- yield set("a.com", "foo", 1, context);
- yield set("b.a.com", "bar", 2, context);
- yield setGlobal("foo", 3, context);
-
- yield cps.removeByDomain("bogus", context, makeCallback());
- let args = yield on("Removed", ["foo", null, "bar"]);
- observerArgsOK(args.foo, []);
- observerArgsOK(args.null, []);
- observerArgsOK(args.bar, []);
-
- yield cps.removeBySubdomain("a.com", context, makeCallback());
- args = yield on("Removed", ["foo", null, "bar"]);
- observerArgsOK(args.foo, [["a.com", "foo", context.usePrivateBrowsing]]);
- observerArgsOK(args.null, [["a.com", "foo", context.usePrivateBrowsing], ["b.a.com", "bar", context.usePrivateBrowsing]]);
- observerArgsOK(args.bar, [["b.a.com", "bar", context.usePrivateBrowsing]]);
-
- yield cps.removeAllGlobals(context, makeCallback());
- args = yield on("Removed", ["foo", null, "bar"]);
- observerArgsOK(args.foo, [[null, "foo", context.usePrivateBrowsing]]);
- observerArgsOK(args.null, [[null, "foo", context.usePrivateBrowsing]]);
- observerArgsOK(args.bar, []);
- },
-
- function* observerForName_removeAllDomains(context) {
- yield set("a.com", "foo", 1, context);
- yield setGlobal("foo", 2, context);
- yield set("b.com", "bar", 3, context);
-
- yield cps.removeAllDomains(context, makeCallback());
- let args = yield on("Removed", ["foo", null, "bar"]);
- observerArgsOK(args.foo, [["a.com", "foo", context.usePrivateBrowsing]]);
- observerArgsOK(args.null, [["a.com", "foo", context.usePrivateBrowsing], ["b.com", "bar", context.usePrivateBrowsing]]);
- observerArgsOK(args.bar, [["b.com", "bar", context.usePrivateBrowsing]]);
- },
-
- function* observerForName_removeByName(context) {
- yield set("a.com", "foo", 1, context);
- yield set("a.com", "bar", 2, context);
- yield setGlobal("foo", 3, context);
-
- yield cps.removeByName("bogus", context, makeCallback());
- let args = yield on("Removed", ["foo", null, "bar"]);
- observerArgsOK(args.foo, []);
- observerArgsOK(args.null, []);
- observerArgsOK(args.bar, []);
-
- yield cps.removeByName("foo", context, makeCallback());
- args = yield on("Removed", ["foo", null, "bar"]);
- observerArgsOK(args.foo, [["a.com", "foo", context.usePrivateBrowsing], [null, "foo", context.usePrivateBrowsing]]);
- observerArgsOK(args.null, [["a.com", "foo", context.usePrivateBrowsing], [null, "foo", context.usePrivateBrowsing]]);
- observerArgsOK(args.bar, []);
- },
-
- function* removeObserverForName(context) {
- let args = yield on("Set", ["foo", null, "bar"], true);
-
- cps.removeObserverForName("foo", args.foo.observer);
- yield set("a.com", "foo", 1, context);
- yield wait();
- observerArgsOK(args.foo, []);
- observerArgsOK(args.null, [["a.com", "foo", 1, context.usePrivateBrowsing]]);
- observerArgsOK(args.bar, []);
- args.reset();
-
- cps.removeObserverForName(null, args.null.observer);
- yield set("a.com", "foo", 2, context);
- yield wait();
- observerArgsOK(args.foo, []);
- observerArgsOK(args.null, []);
- observerArgsOK(args.bar, []);
- args.reset();
- },
-];
-
-// These tests are for functionality that doesn't behave the same way in private and public
-// contexts, so the expected results cannot be automatically generated like the previous tests.
-var specialTests = [
- function* observerForName_removeAllDomainsSince() {
- yield setWithDate("a.com", "foo", 1, 100, null);
- yield setWithDate("b.com", "foo", 2, 200, null);
- yield setWithDate("c.com", "foo", 3, 300, null);
-
- yield setWithDate("a.com", "bar", 1, 0, null);
- yield setWithDate("b.com", "bar", 2, 100, null);
- yield setWithDate("c.com", "bar", 3, 200, null);
- yield setGlobal("foo", 2, null);
-
- yield cps.removeAllDomainsSince(200, null, makeCallback());
-
- let args = yield on("Removed", ["foo", "bar", null]);
-
- observerArgsOK(args.foo, [["b.com", "foo", false], ["c.com", "foo", false]]);
- observerArgsOK(args.bar, [["c.com", "bar", false]]);
- observerArgsOK(args.null, [["b.com", "foo", false], ["c.com", "bar", false], ["c.com", "foo", false]]);
- },
-
- function* observerForName_removeAllDomainsSince_private() {
- let context = {usePrivateBrowsing: true};
- yield setWithDate("a.com", "foo", 1, 100, context);
- yield setWithDate("b.com", "foo", 2, 200, context);
- yield setWithDate("c.com", "foo", 3, 300, context);
-
- yield setWithDate("a.com", "bar", 1, 0, context);
- yield setWithDate("b.com", "bar", 2, 100, context);
- yield setWithDate("c.com", "bar", 3, 200, context);
- yield setGlobal("foo", 2, context);
-
- yield cps.removeAllDomainsSince(200, context, makeCallback());
-
- let args = yield on("Removed", ["foo", "bar", null]);
-
- observerArgsOK(args.foo, [["a.com", "foo", true], ["b.com", "foo", true], ["c.com", "foo", true]]);
- observerArgsOK(args.bar, [["a.com", "bar", true], ["b.com", "bar", true], ["c.com", "bar", true]]);
- observerArgsOK(args.null, [["a.com", "foo", true], ["a.com", "bar", true],
- ["b.com", "foo", true], ["b.com", "bar", true],
- ["c.com", "foo", true], ["c.com", "bar", true]]);
- },
-];
diff --git a/toolkit/components/contentprefs/tests/unit_cps2/test_remove.js b/toolkit/components/contentprefs/tests/unit_cps2/test_remove.js
deleted file mode 100644
index 9853293fc7..0000000000
--- a/toolkit/components/contentprefs/tests/unit_cps2/test_remove.js
+++ /dev/null
@@ -1,222 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- runAsyncTests(tests);
-}
-
-var tests = [
-
- function* nonexistent() {
- yield set("a.com", "foo", 1);
- yield setGlobal("foo", 2);
-
- yield cps.removeByDomainAndName("a.com", "bogus", null, makeCallback());
- yield dbOK([
- ["a.com", "foo", 1],
- [null, "foo", 2],
- ]);
- yield getOK(["a.com", "foo"], 1);
- yield getGlobalOK(["foo"], 2);
-
- yield cps.removeBySubdomainAndName("a.com", "bogus", null, makeCallback());
- yield dbOK([
- ["a.com", "foo", 1],
- [null, "foo", 2],
- ]);
- yield getOK(["a.com", "foo"], 1);
- yield getGlobalOK(["foo"], 2);
-
- yield cps.removeGlobal("bogus", null, makeCallback());
- yield dbOK([
- ["a.com", "foo", 1],
- [null, "foo", 2],
- ]);
- yield getOK(["a.com", "foo"], 1);
- yield getGlobalOK(["foo"], 2);
-
- yield cps.removeByDomainAndName("bogus", "bogus", null, makeCallback());
- yield dbOK([
- ["a.com", "foo", 1],
- [null, "foo", 2],
- ]);
- yield getOK(["a.com", "foo"], 1);
- yield getGlobalOK(["foo"], 2);
- },
-
- function* isomorphicDomains() {
- yield set("a.com", "foo", 1);
- yield cps.removeByDomainAndName("a.com", "foo", null, makeCallback());
- yield dbOK([]);
- yield getOK(["a.com", "foo"], undefined);
-
- yield set("a.com", "foo", 2);
- yield cps.removeByDomainAndName("http://a.com/huh", "foo", null,
- makeCallback());
- yield dbOK([]);
- yield getOK(["a.com", "foo"], undefined);
- },
-
- function* names() {
- yield set("a.com", "foo", 1);
- yield set("a.com", "bar", 2);
- yield setGlobal("foo", 3);
- yield setGlobal("bar", 4);
-
- yield cps.removeByDomainAndName("a.com", "foo", null, makeCallback());
- yield dbOK([
- ["a.com", "bar", 2],
- [null, "foo", 3],
- [null, "bar", 4],
- ]);
- yield getOK(["a.com", "foo"], undefined);
- yield getOK(["a.com", "bar"], 2);
- yield getGlobalOK(["foo"], 3);
- yield getGlobalOK(["bar"], 4);
-
- yield cps.removeGlobal("foo", null, makeCallback());
- yield dbOK([
- ["a.com", "bar", 2],
- [null, "bar", 4],
- ]);
- yield getOK(["a.com", "foo"], undefined);
- yield getOK(["a.com", "bar"], 2);
- yield getGlobalOK(["foo"], undefined);
- yield getGlobalOK(["bar"], 4);
-
- yield cps.removeByDomainAndName("a.com", "bar", null, makeCallback());
- yield dbOK([
- [null, "bar", 4],
- ]);
- yield getOK(["a.com", "foo"], undefined);
- yield getOK(["a.com", "bar"], undefined);
- yield getGlobalOK(["foo"], undefined);
- yield getGlobalOK(["bar"], 4);
-
- yield cps.removeGlobal("bar", null, makeCallback());
- yield dbOK([
- ]);
- yield getOK(["a.com", "foo"], undefined);
- yield getOK(["a.com", "bar"], undefined);
- yield getGlobalOK(["foo"], undefined);
- yield getGlobalOK(["bar"], undefined);
- },
-
- function* subdomains() {
- yield set("a.com", "foo", 1);
- yield set("b.a.com", "foo", 2);
- yield cps.removeByDomainAndName("a.com", "foo", null, makeCallback());
- yield dbOK([
- ["b.a.com", "foo", 2],
- ]);
- yield getSubdomainsOK(["a.com", "foo"], [["b.a.com", 2]]);
- yield getSubdomainsOK(["b.a.com", "foo"], [["b.a.com", 2]]);
-
- yield set("a.com", "foo", 3);
- yield cps.removeBySubdomainAndName("a.com", "foo", null, makeCallback());
- yield dbOK([
- ]);
- yield getSubdomainsOK(["a.com", "foo"], []);
- yield getSubdomainsOK(["b.a.com", "foo"], []);
-
- yield set("a.com", "foo", 4);
- yield set("b.a.com", "foo", 5);
- yield cps.removeByDomainAndName("b.a.com", "foo", null, makeCallback());
- yield dbOK([
- ["a.com", "foo", 4],
- ]);
- yield getSubdomainsOK(["a.com", "foo"], [["a.com", 4]]);
- yield getSubdomainsOK(["b.a.com", "foo"], []);
-
- yield set("b.a.com", "foo", 6);
- yield cps.removeBySubdomainAndName("b.a.com", "foo", null, makeCallback());
- yield dbOK([
- ["a.com", "foo", 4],
- ]);
- yield getSubdomainsOK(["a.com", "foo"], [["a.com", 4]]);
- yield getSubdomainsOK(["b.a.com", "foo"], []);
- },
-
- function* privateBrowsing() {
- yield set("a.com", "foo", 1);
- yield set("a.com", "bar", 2);
- yield setGlobal("foo", 3);
- yield setGlobal("bar", 4);
- yield setGlobal("qux", 5);
- yield set("b.com", "foo", 6);
- yield set("b.com", "bar", 7);
-
- let context = { usePrivateBrowsing: true };
- yield set("a.com", "foo", 8, context);
- yield setGlobal("foo", 9, context);
- yield cps.removeByDomainAndName("a.com", "foo", context, makeCallback());
- yield cps.removeGlobal("foo", context, makeCallback());
- yield cps.removeGlobal("qux", context, makeCallback());
- yield cps.removeByDomainAndName("b.com", "foo", context, makeCallback());
- yield dbOK([
- ["a.com", "bar", 2],
- [null, "bar", 4],
- ["b.com", "bar", 7],
- ]);
- yield getOK(["a.com", "foo", context], undefined);
- yield getOK(["a.com", "bar", context], 2);
- yield getGlobalOK(["foo", context], undefined);
- yield getGlobalOK(["bar", context], 4);
- yield getGlobalOK(["qux", context], undefined);
- yield getOK(["b.com", "foo", context], undefined);
- yield getOK(["b.com", "bar", context], 7);
-
- yield getOK(["a.com", "foo"], undefined);
- yield getOK(["a.com", "bar"], 2);
- yield getGlobalOK(["foo"], undefined);
- yield getGlobalOK(["bar"], 4);
- yield getGlobalOK(["qux"], undefined);
- yield getOK(["b.com", "foo"], undefined);
- yield getOK(["b.com", "bar"], 7);
- },
-
- function* erroneous() {
- do_check_throws(() => cps.removeByDomainAndName(null, "foo", null));
- do_check_throws(() => cps.removeByDomainAndName("", "foo", null));
- do_check_throws(() => cps.removeByDomainAndName("a.com", "foo", null,
- "bogus"));
- do_check_throws(() => cps.removeBySubdomainAndName(null, "foo",
- null));
- do_check_throws(() => cps.removeBySubdomainAndName("", "foo", null));
- do_check_throws(() => cps.removeBySubdomainAndName("a.com", "foo",
- null, "bogus"));
- do_check_throws(() => cps.removeGlobal("", null));
- do_check_throws(() => cps.removeGlobal(null, null));
- do_check_throws(() => cps.removeGlobal("foo", null, "bogus"));
- yield true;
- },
-
- function* removeByDomainAndName_invalidateCache() {
- yield set("a.com", "foo", 1);
- getCachedOK(["a.com", "foo"], true, 1);
- cps.removeByDomainAndName("a.com", "foo", null, makeCallback());
- getCachedOK(["a.com", "foo"], false);
- yield;
- },
-
- function* removeBySubdomainAndName_invalidateCache() {
- yield set("a.com", "foo", 1);
- yield set("b.a.com", "foo", 2);
- getCachedSubdomainsOK(["a.com", "foo"], [
- ["a.com", 1],
- ["b.a.com", 2],
- ]);
- cps.removeBySubdomainAndName("a.com", "foo", null, makeCallback());
- getCachedSubdomainsOK(["a.com", "foo"], []);
- yield;
- },
-
- function* removeGlobal_invalidateCache() {
- yield setGlobal("foo", 1);
- getCachedGlobalOK(["foo"], true, 1);
- cps.removeGlobal("foo", null, makeCallback());
- getCachedGlobalOK(["foo"], false);
- yield;
- },
-];
diff --git a/toolkit/components/contentprefs/tests/unit_cps2/test_removeAllDomains.js b/toolkit/components/contentprefs/tests/unit_cps2/test_removeAllDomains.js
deleted file mode 100644
index 63e1b0552e..0000000000
--- a/toolkit/components/contentprefs/tests/unit_cps2/test_removeAllDomains.js
+++ /dev/null
@@ -1,87 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- runAsyncTests(tests);
-}
-
-var tests = [
-
- function* nonexistent() {
- yield setGlobal("foo", 1);
- yield cps.removeAllDomains(null, makeCallback());
- yield dbOK([
- [null, "foo", 1],
- ]);
- yield getGlobalOK(["foo"], 1);
- },
-
- function* domains() {
- yield set("a.com", "foo", 1);
- yield set("a.com", "bar", 2);
- yield setGlobal("foo", 3);
- yield setGlobal("bar", 4);
- yield set("b.com", "foo", 5);
- yield set("b.com", "bar", 6);
-
- yield cps.removeAllDomains(null, makeCallback());
- yield dbOK([
- [null, "foo", 3],
- [null, "bar", 4],
- ]);
- yield getOK(["a.com", "foo"], undefined);
- yield getOK(["a.com", "bar"], undefined);
- yield getGlobalOK(["foo"], 3);
- yield getGlobalOK(["bar"], 4);
- yield getOK(["b.com", "foo"], undefined);
- yield getOK(["b.com", "bar"], undefined);
- },
-
- function* privateBrowsing() {
- yield set("a.com", "foo", 1);
- yield set("a.com", "bar", 2);
- yield setGlobal("foo", 3);
- yield setGlobal("bar", 4);
- yield set("b.com", "foo", 5);
-
- let context = { usePrivateBrowsing: true };
- yield set("a.com", "foo", 6, context);
- yield setGlobal("foo", 7, context);
- yield cps.removeAllDomains(context, makeCallback());
- yield dbOK([
- [null, "foo", 3],
- [null, "bar", 4],
- ]);
- yield getOK(["a.com", "foo", context], undefined);
- yield getOK(["a.com", "bar", context], undefined);
- yield getGlobalOK(["foo", context], 7);
- yield getGlobalOK(["bar", context], 4);
- yield getOK(["b.com", "foo", context], undefined);
-
- yield getOK(["a.com", "foo"], undefined);
- yield getOK(["a.com", "bar"], undefined);
- yield getGlobalOK(["foo"], 3);
- yield getGlobalOK(["bar"], 4);
- yield getOK(["b.com", "foo"], undefined);
- },
-
- function* erroneous() {
- do_check_throws(() => cps.removeAllDomains(null, "bogus"));
- yield true;
- },
-
- function* invalidateCache() {
- yield set("a.com", "foo", 1);
- yield set("b.com", "bar", 2);
- yield setGlobal("baz", 3);
- getCachedOK(["a.com", "foo"], true, 1);
- getCachedOK(["b.com", "bar"], true, 2);
- getCachedGlobalOK(["baz"], true, 3);
- cps.removeAllDomains(null, makeCallback());
- getCachedOK(["a.com", "foo"], false);
- getCachedOK(["b.com", "bar"], false);
- getCachedGlobalOK(["baz"], true, 3);
- yield;
- },
-];
diff --git a/toolkit/components/contentprefs/tests/unit_cps2/test_removeAllDomainsSince.js b/toolkit/components/contentprefs/tests/unit_cps2/test_removeAllDomainsSince.js
deleted file mode 100644
index fa0bf31c37..0000000000
--- a/toolkit/components/contentprefs/tests/unit_cps2/test_removeAllDomainsSince.js
+++ /dev/null
@@ -1,111 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- runAsyncTests(tests);
-}
-
-var tests = [
-
- function* nonexistent() {
- yield setGlobal("foo", 1);
- yield cps.removeAllDomainsSince(0, null, makeCallback());
- yield getGlobalOK(["foo"], 1);
- },
-
- function* domainsAll() {
- yield set("a.com", "foo", 1);
- yield set("a.com", "bar", 2);
- yield setGlobal("foo", 3);
- yield setGlobal("bar", 4);
- yield set("b.com", "foo", 5);
- yield set("b.com", "bar", 6);
-
- yield cps.removeAllDomainsSince(0, null, makeCallback());
- yield dbOK([
- [null, "foo", 3],
- [null, "bar", 4],
- ]);
- yield getOK(["a.com", "foo"], undefined);
- yield getOK(["a.com", "bar"], undefined);
- yield getGlobalOK(["foo"], 3);
- yield getGlobalOK(["bar"], 4);
- yield getOK(["b.com", "foo"], undefined);
- yield getOK(["b.com", "bar"], undefined);
- },
-
- function* domainsWithDate() {
- yield setWithDate("a.com", "foobar", 0, 0);
- yield setWithDate("a.com", "foo", 1, 1000);
- yield setWithDate("a.com", "bar", 2, 4000);
- yield setGlobal("foo", 3);
- yield setGlobal("bar", 4);
- yield setWithDate("b.com", "foo", 5, 2000);
- yield setWithDate("b.com", "bar", 6, 3000);
- yield setWithDate("b.com", "foobar", 7, 1000);
-
- yield cps.removeAllDomainsSince(2000, null, makeCallback());
- yield dbOK([
- ["a.com", "foobar", 0],
- ["a.com", "foo", 1],
- [null, "foo", 3],
- [null, "bar", 4],
- ["b.com", "foobar", 7],
- ]);
- },
-
- function* privateBrowsing() {
- yield set("a.com", "foo", 1);
- yield set("a.com", "bar", 2);
- yield setGlobal("foo", 3);
- yield setGlobal("bar", 4);
- yield set("b.com", "foo", 5);
-
- let context = { usePrivateBrowsing: true };
- yield set("a.com", "foo", 6, context);
- yield setGlobal("foo", 7, context);
- yield cps.removeAllDomainsSince(0, context, makeCallback());
- yield dbOK([
- [null, "foo", 3],
- [null, "bar", 4],
- ]);
- yield getOK(["a.com", "foo", context], undefined);
- yield getOK(["a.com", "bar", context], undefined);
- yield getGlobalOK(["foo", context], 7);
- yield getGlobalOK(["bar", context], 4);
- yield getOK(["b.com", "foo", context], undefined);
-
- yield getOK(["a.com", "foo"], undefined);
- yield getOK(["a.com", "bar"], undefined);
- yield getGlobalOK(["foo"], 3);
- yield getGlobalOK(["bar"], 4);
- yield getOK(["b.com", "foo"], undefined);
- },
-
- function* erroneous() {
- do_check_throws(() => cps.removeAllDomainsSince(null, "bogus"));
- yield true;
- },
-
- function* invalidateCache() {
- yield setWithDate("a.com", "foobar", 0, 0);
- yield setWithDate("a.com", "foo", 1, 1000);
- yield setWithDate("a.com", "bar", 2, 4000);
- yield setGlobal("foo", 3);
- yield setGlobal("bar", 4);
- yield setWithDate("b.com", "foo", 5, 2000);
- yield setWithDate("b.com", "bar", 6, 3000);
- yield setWithDate("b.com", "foobar", 7, 1000);
- cps.removeAllDomainsSince(0, null, makeCallback());
- getCachedOK(["a.com", "foobar"], false);
- getCachedOK(["a.com", "foo"], false);
- getCachedOK(["a.com", "bar"], false);
- getCachedGlobalOK(["foo"], true, 3);
- getCachedGlobalOK(["bar"], true, 4);
- getCachedOK(["b.com", "foo"], false);
- getCachedOK(["b.com", "bar"], false);
- getCachedOK(["b.com", "foobar"], false);
- yield true;
- },
-];
diff --git a/toolkit/components/contentprefs/tests/unit_cps2/test_removeByDomain.js b/toolkit/components/contentprefs/tests/unit_cps2/test_removeByDomain.js
deleted file mode 100644
index 1cf6bd8f2e..0000000000
--- a/toolkit/components/contentprefs/tests/unit_cps2/test_removeByDomain.js
+++ /dev/null
@@ -1,199 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- runAsyncTests(tests);
-}
-
-var tests = [
-
- function* nonexistent() {
- yield set("a.com", "foo", 1);
- yield setGlobal("foo", 2);
-
- yield cps.removeByDomain("bogus", null, makeCallback());
- yield dbOK([
- ["a.com", "foo", 1],
- [null, "foo", 2],
- ]);
- yield getOK(["a.com", "foo"], 1);
- yield getGlobalOK(["foo"], 2);
-
- yield cps.removeBySubdomain("bogus", null, makeCallback());
- yield dbOK([
- ["a.com", "foo", 1],
- [null, "foo", 2],
- ]);
- yield getOK(["a.com", "foo"], 1);
- yield getGlobalOK(["foo"], 2);
- },
-
- function* isomorphicDomains() {
- yield set("a.com", "foo", 1);
- yield cps.removeByDomain("a.com", null, makeCallback());
- yield dbOK([]);
- yield getOK(["a.com", "foo"], undefined);
-
- yield set("a.com", "foo", 2);
- yield cps.removeByDomain("http://a.com/huh", null, makeCallback());
- yield dbOK([]);
- yield getOK(["a.com", "foo"], undefined);
- },
-
- function* domains() {
- yield set("a.com", "foo", 1);
- yield set("a.com", "bar", 2);
- yield setGlobal("foo", 3);
- yield setGlobal("bar", 4);
- yield set("b.com", "foo", 5);
- yield set("b.com", "bar", 6);
-
- yield cps.removeByDomain("a.com", null, makeCallback());
- yield dbOK([
- [null, "foo", 3],
- [null, "bar", 4],
- ["b.com", "foo", 5],
- ["b.com", "bar", 6],
- ]);
- yield getOK(["a.com", "foo"], undefined);
- yield getOK(["a.com", "bar"], undefined);
- yield getGlobalOK(["foo"], 3);
- yield getGlobalOK(["bar"], 4);
- yield getOK(["b.com", "foo"], 5);
- yield getOK(["b.com", "bar"], 6);
-
- yield cps.removeAllGlobals(null, makeCallback());
- yield dbOK([
- ["b.com", "foo", 5],
- ["b.com", "bar", 6],
- ]);
- yield getOK(["a.com", "foo"], undefined);
- yield getOK(["a.com", "bar"], undefined);
- yield getGlobalOK(["foo"], undefined);
- yield getGlobalOK(["bar"], undefined);
- yield getOK(["b.com", "foo"], 5);
- yield getOK(["b.com", "bar"], 6);
-
- yield cps.removeByDomain("b.com", null, makeCallback());
- yield dbOK([
- ]);
- yield getOK(["a.com", "foo"], undefined);
- yield getOK(["a.com", "bar"], undefined);
- yield getGlobalOK(["foo"], undefined);
- yield getGlobalOK(["bar"], undefined);
- yield getOK(["b.com", "foo"], undefined);
- yield getOK(["b.com", "bar"], undefined);
- },
-
- function* subdomains() {
- yield set("a.com", "foo", 1);
- yield set("b.a.com", "foo", 2);
- yield cps.removeByDomain("a.com", null, makeCallback());
- yield dbOK([
- ["b.a.com", "foo", 2],
- ]);
- yield getSubdomainsOK(["a.com", "foo"], [["b.a.com", 2]]);
- yield getSubdomainsOK(["b.a.com", "foo"], [["b.a.com", 2]]);
-
- yield set("a.com", "foo", 3);
- yield cps.removeBySubdomain("a.com", null, makeCallback());
- yield dbOK([
- ]);
- yield getSubdomainsOK(["a.com", "foo"], []);
- yield getSubdomainsOK(["b.a.com", "foo"], []);
-
- yield set("a.com", "foo", 4);
- yield set("b.a.com", "foo", 5);
- yield cps.removeByDomain("b.a.com", null, makeCallback());
- yield dbOK([
- ["a.com", "foo", 4],
- ]);
- yield getSubdomainsOK(["a.com", "foo"], [["a.com", 4]]);
- yield getSubdomainsOK(["b.a.com", "foo"], []);
-
- yield set("b.a.com", "foo", 6);
- yield cps.removeBySubdomain("b.a.com", null, makeCallback());
- yield dbOK([
- ["a.com", "foo", 4],
- ]);
- yield getSubdomainsOK(["a.com", "foo"], [["a.com", 4]]);
- yield getSubdomainsOK(["b.a.com", "foo"], []);
- },
-
- function* privateBrowsing() {
- yield set("a.com", "foo", 1);
- yield set("a.com", "bar", 2);
- yield setGlobal("foo", 3);
- yield setGlobal("bar", 4);
- yield set("b.com", "foo", 5);
-
- let context = { usePrivateBrowsing: true };
- yield set("a.com", "foo", 6, context);
- yield set("b.com", "foo", 7, context);
- yield setGlobal("foo", 8, context);
- yield cps.removeByDomain("a.com", context, makeCallback());
- yield getOK(["b.com", "foo", context], 7);
- yield getGlobalOK(["foo", context], 8);
- yield cps.removeAllGlobals(context, makeCallback());
- yield dbOK([
- ["b.com", "foo", 5],
- ]);
- yield getOK(["a.com", "foo", context], undefined);
- yield getOK(["a.com", "bar", context], undefined);
- yield getGlobalOK(["foo", context], undefined);
- yield getGlobalOK(["bar", context], undefined);
- yield getOK(["b.com", "foo", context], 5);
-
- yield getOK(["a.com", "foo"], undefined);
- yield getOK(["a.com", "bar"], undefined);
- yield getGlobalOK(["foo"], undefined);
- yield getGlobalOK(["bar"], undefined);
- yield getOK(["b.com", "foo"], 5);
- },
-
- function* erroneous() {
- do_check_throws(() => cps.removeByDomain(null, null));
- do_check_throws(() => cps.removeByDomain("", null));
- do_check_throws(() => cps.removeByDomain("a.com", null, "bogus"));
- do_check_throws(() => cps.removeBySubdomain(null, null));
- do_check_throws(() => cps.removeBySubdomain("", null));
- do_check_throws(() => cps.removeBySubdomain("a.com", null, "bogus"));
- do_check_throws(() => cps.removeAllGlobals(null, "bogus"));
- yield true;
- },
-
- function* removeByDomain_invalidateCache() {
- yield set("a.com", "foo", 1);
- yield set("a.com", "bar", 2);
- getCachedOK(["a.com", "foo"], true, 1);
- getCachedOK(["a.com", "bar"], true, 2);
- cps.removeByDomain("a.com", null, makeCallback());
- getCachedOK(["a.com", "foo"], false);
- getCachedOK(["a.com", "bar"], false);
- yield;
- },
-
- function* removeBySubdomain_invalidateCache() {
- yield set("a.com", "foo", 1);
- yield set("b.a.com", "foo", 2);
- getCachedSubdomainsOK(["a.com", "foo"], [
- ["a.com", 1],
- ["b.a.com", 2],
- ]);
- cps.removeBySubdomain("a.com", null, makeCallback());
- getCachedSubdomainsOK(["a.com", "foo"], []);
- yield;
- },
-
- function* removeAllGlobals_invalidateCache() {
- yield setGlobal("foo", 1);
- yield setGlobal("bar", 2);
- getCachedGlobalOK(["foo"], true, 1);
- getCachedGlobalOK(["bar"], true, 2);
- cps.removeAllGlobals(null, makeCallback());
- getCachedGlobalOK(["foo"], false);
- getCachedGlobalOK(["bar"], false);
- yield;
- },
-];
diff --git a/toolkit/components/contentprefs/tests/unit_cps2/test_removeByName.js b/toolkit/components/contentprefs/tests/unit_cps2/test_removeByName.js
deleted file mode 100644
index fa04656e25..0000000000
--- a/toolkit/components/contentprefs/tests/unit_cps2/test_removeByName.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- runAsyncTests(tests);
-}
-
-var tests = [
-
- function* nonexistent() {
- yield set("a.com", "foo", 1);
- yield setGlobal("foo", 2);
-
- yield cps.removeByName("bogus", null, makeCallback());
- yield dbOK([
- ["a.com", "foo", 1],
- [null, "foo", 2],
- ]);
- yield getOK(["a.com", "foo"], 1);
- yield getGlobalOK(["foo"], 2);
- },
-
- function* names() {
- yield set("a.com", "foo", 1);
- yield set("a.com", "bar", 2);
- yield setGlobal("foo", 3);
- yield setGlobal("bar", 4);
- yield set("b.com", "foo", 5);
- yield set("b.com", "bar", 6);
-
- yield cps.removeByName("foo", null, makeCallback());
- yield dbOK([
- ["a.com", "bar", 2],
- [null, "bar", 4],
- ["b.com", "bar", 6],
- ]);
- yield getOK(["a.com", "foo"], undefined);
- yield getOK(["a.com", "bar"], 2);
- yield getGlobalOK(["foo"], undefined);
- yield getGlobalOK(["bar"], 4);
- yield getOK(["b.com", "foo"], undefined);
- yield getOK(["b.com", "bar"], 6);
- },
-
- function* privateBrowsing() {
- yield set("a.com", "foo", 1);
- yield set("a.com", "bar", 2);
- yield setGlobal("foo", 3);
- yield setGlobal("bar", 4);
- yield set("b.com", "foo", 5);
- yield set("b.com", "bar", 6);
-
- let context = { usePrivateBrowsing: true };
- yield set("a.com", "foo", 7, context);
- yield setGlobal("foo", 8, context);
- yield set("b.com", "bar", 9, context);
- yield cps.removeByName("bar", context, makeCallback());
- yield dbOK([
- ["a.com", "foo", 1],
- [null, "foo", 3],
- ["b.com", "foo", 5],
- ]);
- yield getOK(["a.com", "foo", context], 7);
- yield getOK(["a.com", "bar", context], undefined);
- yield getGlobalOK(["foo", context], 8);
- yield getGlobalOK(["bar", context], undefined);
- yield getOK(["b.com", "foo", context], 5);
- yield getOK(["b.com", "bar", context], undefined);
-
- yield getOK(["a.com", "foo"], 1);
- yield getOK(["a.com", "bar"], undefined);
- yield getGlobalOK(["foo"], 3);
- yield getGlobalOK(["bar"], undefined);
- yield getOK(["b.com", "foo"], 5);
- yield getOK(["b.com", "bar"], undefined);
- },
-
- function* erroneous() {
- do_check_throws(() => cps.removeByName("", null));
- do_check_throws(() => cps.removeByName(null, null));
- do_check_throws(() => cps.removeByName("foo", null, "bogus"));
- yield true;
- },
-
- function* invalidateCache() {
- yield set("a.com", "foo", 1);
- yield set("b.com", "foo", 2);
- getCachedOK(["a.com", "foo"], true, 1);
- getCachedOK(["b.com", "foo"], true, 2);
- cps.removeByName("foo", null, makeCallback());
- getCachedOK(["a.com", "foo"], false);
- getCachedOK(["b.com", "foo"], false);
- yield;
- },
-];
diff --git a/toolkit/components/contentprefs/tests/unit_cps2/test_service.js b/toolkit/components/contentprefs/tests/unit_cps2/test_service.js
deleted file mode 100644
index 75292063e8..0000000000
--- a/toolkit/components/contentprefs/tests/unit_cps2/test_service.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- let serv = Cc["@mozilla.org/content-pref/service;1"].
- getService(Ci.nsIContentPrefService2);
- do_check_eq(serv.QueryInterface(Ci.nsIContentPrefService2), serv);
- do_check_eq(serv.QueryInterface(Ci.nsISupports), serv);
- let val = serv.QueryInterface(Ci.nsIContentPrefService);
- do_check_true(val instanceof Ci.nsIContentPrefService);
-}
diff --git a/toolkit/components/contentprefs/tests/unit_cps2/test_setGet.js b/toolkit/components/contentprefs/tests/unit_cps2/test_setGet.js
deleted file mode 100644
index b10a05bbc2..0000000000
--- a/toolkit/components/contentprefs/tests/unit_cps2/test_setGet.js
+++ /dev/null
@@ -1,206 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- runAsyncTests(tests);
-}
-
-var tests = [
-
- function* get_nonexistent() {
- yield getOK(["a.com", "foo"], undefined);
- yield getGlobalOK(["foo"], undefined);
- },
-
- function* isomorphicDomains() {
- yield set("a.com", "foo", 1);
- yield dbOK([
- ["a.com", "foo", 1],
- ]);
- yield getOK(["a.com", "foo"], 1);
- yield getOK(["http://a.com/huh", "foo"], 1, "a.com");
-
- yield set("http://a.com/huh", "foo", 2);
- yield dbOK([
- ["a.com", "foo", 2],
- ]);
- yield getOK(["a.com", "foo"], 2);
- yield getOK(["http://a.com/yeah", "foo"], 2, "a.com");
- },
-
- function* names() {
- yield set("a.com", "foo", 1);
- yield dbOK([
- ["a.com", "foo", 1],
- ]);
- yield getOK(["a.com", "foo"], 1);
-
- yield set("a.com", "bar", 2);
- yield dbOK([
- ["a.com", "foo", 1],
- ["a.com", "bar", 2],
- ]);
- yield getOK(["a.com", "foo"], 1);
- yield getOK(["a.com", "bar"], 2);
-
- yield setGlobal("foo", 3);
- yield dbOK([
- ["a.com", "foo", 1],
- ["a.com", "bar", 2],
- [null, "foo", 3],
- ]);
- yield getOK(["a.com", "foo"], 1);
- yield getOK(["a.com", "bar"], 2);
- yield getGlobalOK(["foo"], 3);
-
- yield setGlobal("bar", 4);
- yield dbOK([
- ["a.com", "foo", 1],
- ["a.com", "bar", 2],
- [null, "foo", 3],
- [null, "bar", 4],
- ]);
- yield getOK(["a.com", "foo"], 1);
- yield getOK(["a.com", "bar"], 2);
- yield getGlobalOK(["foo"], 3);
- yield getGlobalOK(["bar"], 4);
- },
-
- function* subdomains() {
- yield set("a.com", "foo", 1);
- yield set("b.a.com", "foo", 2);
- yield dbOK([
- ["a.com", "foo", 1],
- ["b.a.com", "foo", 2],
- ]);
- yield getOK(["a.com", "foo"], 1);
- yield getOK(["b.a.com", "foo"], 2);
- },
-
- function* privateBrowsing() {
- yield set("a.com", "foo", 1);
- yield set("a.com", "bar", 2);
- yield setGlobal("foo", 3);
- yield setGlobal("bar", 4);
- yield set("b.com", "foo", 5);
-
- let context = { usePrivateBrowsing: true };
- yield set("a.com", "foo", 6, context);
- yield setGlobal("foo", 7, context);
- yield dbOK([
- ["a.com", "foo", 1],
- ["a.com", "bar", 2],
- [null, "foo", 3],
- [null, "bar", 4],
- ["b.com", "foo", 5],
- ]);
- yield getOK(["a.com", "foo", context], 6, "a.com");
- yield getOK(["a.com", "bar", context], 2);
- yield getGlobalOK(["foo", context], 7);
- yield getGlobalOK(["bar", context], 4);
- yield getOK(["b.com", "foo", context], 5);
-
- yield getOK(["a.com", "foo"], 1);
- yield getOK(["a.com", "bar"], 2);
- yield getGlobalOK(["foo"], 3);
- yield getGlobalOK(["bar"], 4);
- yield getOK(["b.com", "foo"], 5);
- },
-
- function* set_erroneous() {
- do_check_throws(() => cps.set(null, "foo", 1, null));
- do_check_throws(() => cps.set("", "foo", 1, null));
- do_check_throws(() => cps.set("a.com", "", 1, null));
- do_check_throws(() => cps.set("a.com", null, 1, null));
- do_check_throws(() => cps.set("a.com", "foo", undefined, null));
- do_check_throws(() => cps.set("a.com", "foo", 1, null, "bogus"));
- do_check_throws(() => cps.setGlobal("", 1, null));
- do_check_throws(() => cps.setGlobal(null, 1, null));
- do_check_throws(() => cps.setGlobal("foo", undefined, null));
- do_check_throws(() => cps.setGlobal("foo", 1, null, "bogus"));
- yield true;
- },
-
- function* get_erroneous() {
- do_check_throws(() => cps.getByDomainAndName(null, "foo", null, {}));
- do_check_throws(() => cps.getByDomainAndName("", "foo", null, {}));
- do_check_throws(() => cps.getByDomainAndName("a.com", "", null, {}));
- do_check_throws(() => cps.getByDomainAndName("a.com", null, null, {}));
- do_check_throws(() => cps.getByDomainAndName("a.com", "foo", null, null));
- do_check_throws(() => cps.getGlobal("", null, {}));
- do_check_throws(() => cps.getGlobal(null, null, {}));
- do_check_throws(() => cps.getGlobal("foo", null, null));
- yield true;
- },
-
- function* set_invalidateCache() {
- // (1) Set a pref and wait for it to finish.
- yield set("a.com", "foo", 1);
-
- // (2) It should be cached.
- getCachedOK(["a.com", "foo"], true, 1);
-
- // (3) Set the pref to a new value but don't wait for it to finish.
- cps.set("a.com", "foo", 2, null, {
- handleCompletion: function () {
- // (6) The pref should be cached after setting it.
- getCachedOK(["a.com", "foo"], true, 2);
- },
- });
-
- // (4) Group "a.com" and name "foo" should no longer be cached.
- getCachedOK(["a.com", "foo"], false);
-
- // (5) Call getByDomainAndName.
- var fetchedPref;
- cps.getByDomainAndName("a.com", "foo", null, {
- handleResult: function (pref) {
- fetchedPref = pref;
- },
- handleCompletion: function () {
- // (7) Finally, this callback should be called after set's above.
- do_check_true(!!fetchedPref);
- do_check_eq(fetchedPref.value, 2);
- next();
- },
- });
-
- yield;
- },
-
- function* get_nameOnly() {
- yield set("a.com", "foo", 1);
- yield set("a.com", "bar", 2);
- yield set("b.com", "foo", 3);
- yield setGlobal("foo", 4);
-
- yield getOKEx("getByName", ["foo", undefined], [
- {"domain": "a.com", "name": "foo", "value": 1},
- {"domain": "b.com", "name": "foo", "value": 3},
- {"domain": null, "name": "foo", "value": 4}
- ]);
-
- let context = { usePrivateBrowsing: true };
- yield set("b.com", "foo", 5, context);
-
- yield getOKEx("getByName", ["foo", context], [
- {"domain": "a.com", "name": "foo", "value": 1},
- {"domain": null, "name": "foo", "value": 4},
- {"domain": "b.com", "name": "foo", "value": 5}
- ]);
- },
-
- function* setSetsCurrentDate() {
- // Because Date.now() is not guaranteed to be monotonically increasing
- // we just do here rough sanity check with one minute tolerance.
- const MINUTE = 60 * 1000;
- let now = Date.now();
- let start = now - MINUTE;
- let end = now + MINUTE;
- yield set("a.com", "foo", 1);
- let timestamp = yield getDate("a.com", "foo");
- ok(start <= timestamp, "Timestamp is not too early (" + start + "<=" + timestamp + ").");
- ok(timestamp <= end, "Timestamp is not too late (" + timestamp + "<=" + end + ").");
- },
-];
diff --git a/toolkit/components/contentprefs/tests/unit_cps2/xpcshell.ini b/toolkit/components/contentprefs/tests/unit_cps2/xpcshell.ini
deleted file mode 100644
index bdbcaf8fd6..0000000000
--- a/toolkit/components/contentprefs/tests/unit_cps2/xpcshell.ini
+++ /dev/null
@@ -1,19 +0,0 @@
-[DEFAULT]
-head = head.js
-tail =
-skip-if = toolkit == 'android'
-support-files = AsyncRunner.jsm
-
-[test_service.js]
-[test_setGet.js]
-[test_getSubdomains.js]
-[test_remove.js]
-[test_removeByDomain.js]
-[test_removeAllDomains.js]
-[test_removeByName.js]
-[test_getCached.js]
-[test_getCachedSubdomains.js]
-[test_observers.js]
-[test_extractDomain.js]
-[test_migrationToSchema4.js]
-[test_removeAllDomainsSince.js]
diff --git a/toolkit/components/contextualidentity/moz.build b/toolkit/components/contextualidentity/moz.build
index 9188421f9e..524d5e779f 100644
--- a/toolkit/components/contextualidentity/moz.build
+++ b/toolkit/components/contextualidentity/moz.build
@@ -4,8 +4,4 @@
# 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/.
-EXTRA_JS_MODULES += [
- 'ContextualIdentityService.jsm',
-]
-
-XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
+EXTRA_JS_MODULES += ['ContextualIdentityService.jsm']
diff --git a/toolkit/components/contextualidentity/tests/unit/test_basic.js b/toolkit/components/contextualidentity/tests/unit/test_basic.js
deleted file mode 100644
index 4d17b9a267..0000000000
--- a/toolkit/components/contextualidentity/tests/unit/test_basic.js
+++ /dev/null
@@ -1,67 +0,0 @@
-"use strict";
-
-do_get_profile();
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-Cu.import("resource://gre/modules/ContextualIdentityService.jsm");
-
-const TEST_STORE_FILE_NAME = "test-containers.json";
-
-let cis;
-
-// Basic tests
-add_task(function() {
- ok(!!ContextualIdentityService, "ContextualIdentityService exists");
-
- cis = ContextualIdentityService.createNewInstanceForTesting(TEST_STORE_FILE_NAME);
- ok(!!cis, "We have our instance of ContextualIdentityService");
-
- equal(cis.getIdentities().length, 4, "By default, 4 containers.");
- equal(cis.getIdentityFromId(0), null, "No identity with id 0");
-
- ok(!!cis.getIdentityFromId(1), "Identity 1 exists");
- ok(!!cis.getIdentityFromId(2), "Identity 2 exists");
- ok(!!cis.getIdentityFromId(3), "Identity 3 exists");
- ok(!!cis.getIdentityFromId(4), "Identity 4 exists");
-});
-
-// Create a new identity
-add_task(function() {
- equal(cis.getIdentities().length, 4, "By default, 4 containers.");
-
- let identity = cis.create("New Container", "Icon", "Color");
- ok(!!identity, "New container created");
- equal(identity.name, "New Container", "Name matches");
- equal(identity.icon, "Icon", "Icon matches");
- equal(identity.color, "Color", "Color matches");
-
- equal(cis.getIdentities().length, 5, "Expected 5 containers.");
-
- ok(!!cis.getIdentityFromId(identity.userContextId), "Identity exists");
- equal(cis.getIdentityFromId(identity.userContextId).name, "New Container", "Identity name is OK");
- equal(cis.getIdentityFromId(identity.userContextId).icon, "Icon", "Identity icon is OK");
- equal(cis.getIdentityFromId(identity.userContextId).color, "Color", "Identity color is OK");
- equal(cis.getUserContextLabel(identity.userContextId), "New Container", "Identity label is OK");
-
- // Remove an identity
- equal(cis.remove(-1), false, "cis.remove() returns false if identity doesn't exist.");
- equal(cis.remove(1), true, "cis.remove() returns true if identity exists.");
-
- equal(cis.getIdentities().length, 4, "Expected 4 containers.");
-});
-
-// Update an identity
-add_task(function() {
- ok(!!cis.getIdentityFromId(2), "Identity 2 exists");
-
- equal(cis.update(-1, "Container", "Icon", "Color"), false, "Update returns false if the identity doesn't exist");
-
- equal(cis.update(2, "Container", "Icon", "Color"), true, "Update returns true if everything is OK");
-
- ok(!!cis.getIdentityFromId(2), "Identity exists");
- equal(cis.getIdentityFromId(2).name, "Container", "Identity name is OK");
- equal(cis.getIdentityFromId(2).icon, "Icon", "Identity icon is OK");
- equal(cis.getIdentityFromId(2).color, "Color", "Identity color is OK");
- equal(cis.getUserContextLabel(2), "Container", "Identity label is OK");
-});
diff --git a/toolkit/components/contextualidentity/tests/unit/xpcshell.ini b/toolkit/components/contextualidentity/tests/unit/xpcshell.ini
deleted file mode 100644
index b45ff2c30f..0000000000
--- a/toolkit/components/contextualidentity/tests/unit/xpcshell.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[DEFAULT]
-
-[test_basic.js]
diff --git a/toolkit/components/crashes/moz.build b/toolkit/components/crashes/moz.build
index 5a36a3cd3c..6efad59644 100644
--- a/toolkit/components/crashes/moz.build
+++ b/toolkit/components/crashes/moz.build
@@ -19,13 +19,8 @@ TESTING_JS_MODULES += [
'CrashManagerTest.jsm',
]
-XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell/xpcshell.ini']
-
XPIDL_MODULE = 'toolkit_crashservice'
XPIDL_SOURCES += [
'nsICrashService.idl',
]
-
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'Breakpad Integration')
diff --git a/toolkit/components/crashes/tests/xpcshell/.eslintrc.js b/toolkit/components/crashes/tests/xpcshell/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/crashes/tests/xpcshell/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/crashes/tests/xpcshell/test_crash_manager.js b/toolkit/components/crashes/tests/xpcshell/test_crash_manager.js
deleted file mode 100644
index 9844e78c4e..0000000000
--- a/toolkit/components/crashes/tests/xpcshell/test_crash_manager.js
+++ /dev/null
@@ -1,494 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
-
-var bsp = Cu.import("resource://gre/modules/CrashManager.jsm", this);
-Cu.import("resource://gre/modules/Promise.jsm", this);
-Cu.import("resource://gre/modules/Task.jsm", this);
-Cu.import("resource://gre/modules/osfile.jsm", this);
-Cu.import("resource://gre/modules/TelemetryEnvironment.jsm", this);
-
-Cu.import("resource://testing-common/CrashManagerTest.jsm", this);
-Cu.import("resource://testing-common/TelemetryArchiveTesting.jsm", this);
-
-const DUMMY_DATE = new Date(Date.now() - 10 * 24 * 60 * 60 * 1000);
-DUMMY_DATE.setMilliseconds(0);
-
-const DUMMY_DATE_2 = new Date(Date.now() - 20 * 24 * 60 * 60 * 1000);
-DUMMY_DATE_2.setMilliseconds(0);
-
-function run_test() {
- do_get_profile();
- configureLogging();
- TelemetryArchiveTesting.setup();
- run_next_test();
-}
-
-add_task(function* test_constructor_ok() {
- let m = new CrashManager({
- pendingDumpsDir: "/foo",
- submittedDumpsDir: "/bar",
- eventsDirs: [],
- storeDir: "/baz",
- });
- Assert.ok(m, "CrashManager can be created.");
-});
-
-add_task(function* test_constructor_invalid() {
- Assert.throws(() => {
- new CrashManager({foo: true});
- });
-});
-
-add_task(function* test_get_manager() {
- let m = yield getManager();
- Assert.ok(m, "CrashManager obtained.");
-
- yield m.createDummyDump(true);
- yield m.createDummyDump(false);
-});
-
-// Unsubmitted dump files on disk are detected properly.
-add_task(function* test_pending_dumps() {
- let m = yield getManager();
- let now = Date.now();
- let ids = [];
- const COUNT = 5;
-
- for (let i = 0; i < COUNT; i++) {
- ids.push(yield m.createDummyDump(false, new Date(now - i * 86400000)));
- }
- yield m.createIgnoredDumpFile("ignored", false);
-
- let entries = yield m.pendingDumps();
- Assert.equal(entries.length, COUNT, "proper number detected.");
-
- for (let entry of entries) {
- Assert.equal(typeof(entry), "object", "entry is an object");
- Assert.ok("id" in entry, "id in entry");
- Assert.ok("path" in entry, "path in entry");
- Assert.ok("date" in entry, "date in entry");
- Assert.notEqual(ids.indexOf(entry.id), -1, "ID is known");
- }
-
- for (let i = 0; i < COUNT; i++) {
- Assert.equal(entries[i].id, ids[COUNT-i-1], "Entries sorted by mtime");
- }
-});
-
-// Submitted dump files on disk are detected properly.
-add_task(function* test_submitted_dumps() {
- let m = yield getManager();
- let COUNT = 5;
-
- for (let i = 0; i < COUNT; i++) {
- yield m.createDummyDump(true);
- }
- yield m.createIgnoredDumpFile("ignored", true);
-
- let entries = yield m.submittedDumps();
- Assert.equal(entries.length, COUNT, "proper number detected.");
-
- let hrID = yield m.createDummyDump(true, new Date(), true);
- entries = yield m.submittedDumps();
- Assert.equal(entries.length, COUNT + 1, "hr- in filename detected.");
-
- let gotIDs = new Set(entries.map(e => e.id));
- Assert.ok(gotIDs.has(hrID));
-});
-
-// The store should expire after inactivity.
-add_task(function* test_store_expires() {
- let m = yield getManager();
-
- Object.defineProperty(m, "STORE_EXPIRATION_MS", {
- value: 250,
- });
-
- let store = yield m._getStore();
- Assert.ok(store);
- Assert.equal(store, m._store);
-
- yield sleep(300);
- Assert.ok(!m._store, "Store has gone away.");
-});
-
-// Ensure discovery of unprocessed events files works.
-add_task(function* test_unprocessed_events_files() {
- let m = yield getManager();
- yield m.createEventsFile("1", "test.1", new Date(), "foo", 0);
- yield m.createEventsFile("2", "test.1", new Date(), "bar", 0);
- yield m.createEventsFile("1", "test.1", new Date(), "baz", 1);
-
- let paths = yield m._getUnprocessedEventsFiles();
- Assert.equal(paths.length, 3);
-});
-
-// Ensure only 1 aggregateEventsFiles() is allowed at a time.
-add_task(function* test_aggregate_events_locking() {
- let m = yield getManager();
-
- let p1 = m.aggregateEventsFiles();
- let p2 = m.aggregateEventsFiles();
-
- Assert.strictEqual(p1, p2, "Same promise should be returned.");
-});
-
-// Malformed events files should be deleted.
-add_task(function* test_malformed_files_deleted() {
- let m = yield getManager();
-
- yield m.createEventsFile("1", "crash.main.1", new Date(), "foo\nbar");
-
- let count = yield m.aggregateEventsFiles();
- Assert.equal(count, 1);
- let crashes = yield m.getCrashes();
- Assert.equal(crashes.length, 0);
-
- count = yield m.aggregateEventsFiles();
- Assert.equal(count, 0);
-});
-
-// Unknown event types should be ignored.
-add_task(function* test_aggregate_ignore_unknown_events() {
- let m = yield getManager();
-
- yield m.createEventsFile("1", "crash.main.2", DUMMY_DATE, "id1");
- yield m.createEventsFile("2", "foobar.1", new Date(), "dummy");
-
- let count = yield m.aggregateEventsFiles();
- Assert.equal(count, 2);
-
- count = yield m.aggregateEventsFiles();
- Assert.equal(count, 1);
-
- count = yield m.aggregateEventsFiles();
- Assert.equal(count, 1);
-});
-
-add_task(function* test_prune_old() {
- let m = yield getManager();
- let oldDate = new Date(Date.now() - 86400000);
- let newDate = new Date(Date.now() - 10000);
- yield m.createEventsFile("1", "crash.main.2", oldDate, "id1");
- yield m.addCrash(m.PROCESS_TYPE_PLUGIN, m.CRASH_TYPE_CRASH, "id2", newDate);
-
- yield m.aggregateEventsFiles();
-
- let crashes = yield m.getCrashes();
- Assert.equal(crashes.length, 2);
-
- yield m.pruneOldCrashes(new Date(oldDate.getTime() + 10000));
-
- crashes = yield m.getCrashes();
- Assert.equal(crashes.length, 1, "Old crash has been pruned.");
-
- let c = crashes[0];
- Assert.equal(c.id, "id2", "Proper crash was pruned.");
-
- // We can't test exact boundary conditions because dates from filesystem
- // don't have same guarantees as JS dates.
- yield m.pruneOldCrashes(new Date(newDate.getTime() + 5000));
- crashes = yield m.getCrashes();
- Assert.equal(crashes.length, 0);
-});
-
-add_task(function* test_schedule_maintenance() {
- let m = yield getManager();
- yield m.createEventsFile("1", "crash.main.2", DUMMY_DATE, "id1");
-
- let oldDate = new Date(Date.now() - m.PURGE_OLDER_THAN_DAYS * 2 * 24 * 60 * 60 * 1000);
- yield m.createEventsFile("2", "crash.main.2", oldDate, "id2");
-
- yield m.scheduleMaintenance(25);
- let crashes = yield m.getCrashes();
- Assert.equal(crashes.length, 1);
- Assert.equal(crashes[0].id, "id1");
-});
-
-add_task(function* test_main_crash_event_file() {
- let ac = new TelemetryArchiveTesting.Checker();
- yield ac.promiseInit();
- let theEnvironment = TelemetryEnvironment.currentEnvironment;
- let sessionId = "be66af2f-2ee5-4330-ae95-44462dfbdf0c";
- let stackTraces = { status: "OK" };
-
- // To test proper escaping, add data to the environment with an embedded
- // double-quote
- theEnvironment.testValue = "MyValue\"";
-
- let m = yield getManager();
- const fileContent = "id1\nk1=v1\nk2=v2\n" +
- "TelemetryEnvironment=" + JSON.stringify(theEnvironment) + "\n" +
- "TelemetrySessionId=" + sessionId + "\n" +
- "StackTraces=" + JSON.stringify(stackTraces) + "\n";
-
- yield m.createEventsFile("1", "crash.main.2", DUMMY_DATE, fileContent);
- let count = yield m.aggregateEventsFiles();
- Assert.equal(count, 1);
-
- let crashes = yield m.getCrashes();
- Assert.equal(crashes.length, 1);
- Assert.equal(crashes[0].id, "id1");
- Assert.equal(crashes[0].type, "main-crash");
- Assert.equal(crashes[0].metadata.k1, "v1");
- Assert.equal(crashes[0].metadata.k2, "v2");
- Assert.ok(crashes[0].metadata.TelemetryEnvironment);
- Assert.equal(Object.getOwnPropertyNames(crashes[0].metadata).length, 5);
- Assert.equal(crashes[0].metadata.TelemetrySessionId, sessionId);
- Assert.ok(crashes[0].metadata.StackTraces);
- Assert.deepEqual(crashes[0].crashDate, DUMMY_DATE);
-
- let found = yield ac.promiseFindPing("crash", [
- [["payload", "hasCrashEnvironment"], true],
- [["payload", "metadata", "k1"], "v1"],
- [["payload", "crashId"], "1"],
- [["payload", "stackTraces", "status"], "OK"],
- [["payload", "sessionId"], sessionId],
- ]);
- Assert.ok(found, "Telemetry ping submitted for found crash");
- Assert.deepEqual(found.environment, theEnvironment, "The saved environment should be present");
-
- count = yield m.aggregateEventsFiles();
- Assert.equal(count, 0);
-});
-
-add_task(function* test_main_crash_event_file_noenv() {
- let ac = new TelemetryArchiveTesting.Checker();
- yield ac.promiseInit();
-
- let m = yield getManager();
- yield m.createEventsFile("1", "crash.main.2", DUMMY_DATE, "id1\nk1=v3\nk2=v2");
- let count = yield m.aggregateEventsFiles();
- Assert.equal(count, 1);
-
- let crashes = yield m.getCrashes();
- Assert.equal(crashes.length, 1);
- Assert.equal(crashes[0].id, "id1");
- Assert.equal(crashes[0].type, "main-crash");
- Assert.deepEqual(crashes[0].metadata, { k1: "v3", k2: "v2"});
- Assert.deepEqual(crashes[0].crashDate, DUMMY_DATE);
-
- let found = yield ac.promiseFindPing("crash", [
- [["payload", "hasCrashEnvironment"], false],
- [["payload", "metadata", "k1"], "v3"],
- ]);
- Assert.ok(found, "Telemetry ping submitted for found crash");
- Assert.ok(found.environment, "There is an environment");
-
- count = yield m.aggregateEventsFiles();
- Assert.equal(count, 0);
-});
-
-add_task(function* test_crash_submission_event_file() {
- let m = yield getManager();
- yield m.createEventsFile("1", "crash.main.2", DUMMY_DATE, "crash1");
- yield m.createEventsFile("1-submission", "crash.submission.1", DUMMY_DATE_2,
- "crash1\nfalse\n");
-
- // The line below has been intentionally commented out to make sure that
- // the crash record is created when one does not exist.
- // yield m.createEventsFile("2", "crash.main.1", DUMMY_DATE, "crash2");
- yield m.createEventsFile("2-submission", "crash.submission.1", DUMMY_DATE_2,
- "crash2\ntrue\nbp-2");
- let count = yield m.aggregateEventsFiles();
- Assert.equal(count, 3);
-
- let crashes = yield m.getCrashes();
- Assert.equal(crashes.length, 2);
-
- let map = new Map(crashes.map(crash => [crash.id, crash]));
-
- let crash1 = map.get("crash1");
- Assert.ok(!!crash1);
- Assert.equal(crash1.remoteID, null);
- let crash2 = map.get("crash2");
- Assert.ok(!!crash2);
- Assert.equal(crash2.remoteID, "bp-2");
-
- Assert.equal(crash1.submissions.size, 1);
- let submission = crash1.submissions.values().next().value;
- Assert.equal(submission.result, m.SUBMISSION_RESULT_FAILED);
- Assert.equal(submission.requestDate.getTime(), DUMMY_DATE_2.getTime());
- Assert.equal(submission.responseDate.getTime(), DUMMY_DATE_2.getTime());
-
- Assert.equal(crash2.submissions.size, 1);
- submission = crash2.submissions.values().next().value;
- Assert.equal(submission.result, m.SUBMISSION_RESULT_OK);
- Assert.equal(submission.requestDate.getTime(), DUMMY_DATE_2.getTime());
- Assert.equal(submission.responseDate.getTime(), DUMMY_DATE_2.getTime());
-
- count = yield m.aggregateEventsFiles();
- Assert.equal(count, 0);
-});
-
-add_task(function* test_multiline_crash_id_rejected() {
- let m = yield getManager();
- yield m.createEventsFile("1", "crash.main.1", DUMMY_DATE, "id1\nid2");
- yield m.aggregateEventsFiles();
- let crashes = yield m.getCrashes();
- Assert.equal(crashes.length, 0);
-});
-
-// Main process crashes should be remembered beyond the high water mark.
-add_task(function* test_high_water_mark() {
- let m = yield getManager();
-
- let store = yield m._getStore();
-
- for (let i = 0; i < store.HIGH_WATER_DAILY_THRESHOLD + 1; i++) {
- yield m.createEventsFile("m" + i, "crash.main.2", DUMMY_DATE, "m" + i);
- }
-
- let count = yield m.aggregateEventsFiles();
- Assert.equal(count, bsp.CrashStore.prototype.HIGH_WATER_DAILY_THRESHOLD + 1);
-
- // Need to fetch again in case the first one was garbage collected.
- store = yield m._getStore();
-
- Assert.equal(store.crashesCount, store.HIGH_WATER_DAILY_THRESHOLD + 1);
-});
-
-add_task(function* test_addCrash() {
- let m = yield getManager();
-
- let crashes = yield m.getCrashes();
- Assert.equal(crashes.length, 0);
-
- yield m.addCrash(m.PROCESS_TYPE_MAIN, m.CRASH_TYPE_CRASH,
- "main-crash", DUMMY_DATE);
- yield m.addCrash(m.PROCESS_TYPE_MAIN, m.CRASH_TYPE_HANG,
- "main-hang", DUMMY_DATE);
- yield m.addCrash(m.PROCESS_TYPE_CONTENT, m.CRASH_TYPE_CRASH,
- "content-crash", DUMMY_DATE);
- yield m.addCrash(m.PROCESS_TYPE_CONTENT, m.CRASH_TYPE_HANG,
- "content-hang", DUMMY_DATE);
- yield m.addCrash(m.PROCESS_TYPE_PLUGIN, m.CRASH_TYPE_CRASH,
- "plugin-crash", DUMMY_DATE);
- yield m.addCrash(m.PROCESS_TYPE_PLUGIN, m.CRASH_TYPE_HANG,
- "plugin-hang", DUMMY_DATE);
- yield m.addCrash(m.PROCESS_TYPE_GMPLUGIN, m.CRASH_TYPE_CRASH,
- "gmplugin-crash", DUMMY_DATE);
- yield m.addCrash(m.PROCESS_TYPE_GPU, m.CRASH_TYPE_CRASH,
- "gpu-crash", DUMMY_DATE);
-
- yield m.addCrash(m.PROCESS_TYPE_MAIN, m.CRASH_TYPE_CRASH,
- "changing-item", DUMMY_DATE);
- yield m.addCrash(m.PROCESS_TYPE_CONTENT, m.CRASH_TYPE_HANG,
- "changing-item", DUMMY_DATE_2);
-
- crashes = yield m.getCrashes();
- Assert.equal(crashes.length, 9);
-
- let map = new Map(crashes.map(crash => [crash.id, crash]));
-
- let crash = map.get("main-crash");
- Assert.ok(!!crash);
- Assert.equal(crash.crashDate, DUMMY_DATE);
- Assert.equal(crash.type, m.PROCESS_TYPE_MAIN + "-" + m.CRASH_TYPE_CRASH);
- Assert.ok(crash.isOfType(m.PROCESS_TYPE_MAIN, m.CRASH_TYPE_CRASH));
-
- crash = map.get("main-hang");
- Assert.ok(!!crash);
- Assert.equal(crash.crashDate, DUMMY_DATE);
- Assert.equal(crash.type, m.PROCESS_TYPE_MAIN + "-" + m.CRASH_TYPE_HANG);
- Assert.ok(crash.isOfType(m.PROCESS_TYPE_MAIN, m.CRASH_TYPE_HANG));
-
- crash = map.get("content-crash");
- Assert.ok(!!crash);
- Assert.equal(crash.crashDate, DUMMY_DATE);
- Assert.equal(crash.type, m.PROCESS_TYPE_CONTENT + "-" + m.CRASH_TYPE_CRASH);
- Assert.ok(crash.isOfType(m.PROCESS_TYPE_CONTENT, m.CRASH_TYPE_CRASH));
-
- crash = map.get("content-hang");
- Assert.ok(!!crash);
- Assert.equal(crash.crashDate, DUMMY_DATE);
- Assert.equal(crash.type, m.PROCESS_TYPE_CONTENT + "-" + m.CRASH_TYPE_HANG);
- Assert.ok(crash.isOfType(m.PROCESS_TYPE_CONTENT, m.CRASH_TYPE_HANG));
-
- crash = map.get("plugin-crash");
- Assert.ok(!!crash);
- Assert.equal(crash.crashDate, DUMMY_DATE);
- Assert.equal(crash.type, m.PROCESS_TYPE_PLUGIN + "-" + m.CRASH_TYPE_CRASH);
- Assert.ok(crash.isOfType(m.PROCESS_TYPE_PLUGIN, m.CRASH_TYPE_CRASH));
-
- crash = map.get("plugin-hang");
- Assert.ok(!!crash);
- Assert.equal(crash.crashDate, DUMMY_DATE);
- Assert.equal(crash.type, m.PROCESS_TYPE_PLUGIN + "-" + m.CRASH_TYPE_HANG);
- Assert.ok(crash.isOfType(m.PROCESS_TYPE_PLUGIN, m.CRASH_TYPE_HANG));
-
- crash = map.get("gmplugin-crash");
- Assert.ok(!!crash);
- Assert.equal(crash.crashDate, DUMMY_DATE);
- Assert.equal(crash.type, m.PROCESS_TYPE_GMPLUGIN + "-" + m.CRASH_TYPE_CRASH);
- Assert.ok(crash.isOfType(m.PROCESS_TYPE_GMPLUGIN, m.CRASH_TYPE_CRASH));
-
- crash = map.get("gpu-crash");
- Assert.ok(!!crash);
- Assert.equal(crash.crashDate, DUMMY_DATE);
- Assert.equal(crash.type, m.PROCESS_TYPE_GPU+ "-" + m.CRASH_TYPE_CRASH);
- Assert.ok(crash.isOfType(m.PROCESS_TYPE_GPU, m.CRASH_TYPE_CRASH));
-
- crash = map.get("changing-item");
- Assert.ok(!!crash);
- Assert.equal(crash.crashDate, DUMMY_DATE_2);
- Assert.equal(crash.type, m.PROCESS_TYPE_CONTENT + "-" + m.CRASH_TYPE_HANG);
- Assert.ok(crash.isOfType(m.PROCESS_TYPE_CONTENT, m.CRASH_TYPE_HANG));
-});
-
-add_task(function* test_generateSubmissionID() {
- let m = yield getManager();
-
- const SUBMISSION_ID_REGEX =
- /^(sub-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/i;
- let id = m.generateSubmissionID();
- Assert.ok(SUBMISSION_ID_REGEX.test(id));
-});
-
-add_task(function* test_addSubmissionAttemptAndResult() {
- let m = yield getManager();
-
- let crashes = yield m.getCrashes();
- Assert.equal(crashes.length, 0);
-
- yield m.addCrash(m.PROCESS_TYPE_MAIN, m.CRASH_TYPE_CRASH,
- "main-crash", DUMMY_DATE);
- yield m.addSubmissionAttempt("main-crash", "submission", DUMMY_DATE);
- yield m.addSubmissionResult("main-crash", "submission", DUMMY_DATE_2,
- m.SUBMISSION_RESULT_OK);
-
- crashes = yield m.getCrashes();
- Assert.equal(crashes.length, 1);
-
- let submissions = crashes[0].submissions;
- Assert.ok(!!submissions);
-
- let submission = submissions.get("submission");
- Assert.ok(!!submission);
- Assert.equal(submission.requestDate.getTime(), DUMMY_DATE.getTime());
- Assert.equal(submission.responseDate.getTime(), DUMMY_DATE_2.getTime());
- Assert.equal(submission.result, m.SUBMISSION_RESULT_OK);
-});
-
-add_task(function* test_setCrashClassifications() {
- let m = yield getManager();
-
- yield m.addCrash(m.PROCESS_TYPE_MAIN, m.CRASH_TYPE_CRASH,
- "main-crash", DUMMY_DATE);
- yield m.setCrashClassifications("main-crash", ["a"]);
- let classifications = (yield m.getCrashes())[0].classifications;
- Assert.ok(classifications.indexOf("a") != -1);
-});
-
-add_task(function* test_setRemoteCrashID() {
- let m = yield getManager();
-
- yield m.addCrash(m.PROCESS_TYPE_MAIN, m.CRASH_TYPE_CRASH,
- "main-crash", DUMMY_DATE);
- yield m.setRemoteCrashID("main-crash", "bp-1");
- Assert.equal((yield m.getCrashes())[0].remoteID, "bp-1");
-});
diff --git a/toolkit/components/crashes/tests/xpcshell/test_crash_service.js b/toolkit/components/crashes/tests/xpcshell/test_crash_service.js
deleted file mode 100644
index c207057e01..0000000000
--- a/toolkit/components/crashes/tests/xpcshell/test_crash_service.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
-
-Cu.import("resource://gre/modules/Services.jsm", this);
-Cu.import("resource://testing-common/AppData.jsm", this);
-var bsp = Cu.import("resource://gre/modules/CrashManager.jsm", this);
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* test_instantiation() {
- Assert.ok(!bsp.gCrashManager, "CrashManager global instance not initially defined.");
-
- do_get_profile();
- yield makeFakeAppDir();
-
- // Fake profile creation.
- Cc["@mozilla.org/crashservice;1"]
- .getService(Ci.nsIObserver)
- .observe(null, "profile-after-change", null);
-
- Assert.ok(bsp.gCrashManager, "Profile creation makes it available.");
- Assert.ok(Services.crashmanager, "CrashManager available via Services.");
- Assert.strictEqual(bsp.gCrashManager, Services.crashmanager,
- "The objects are the same.");
-});
diff --git a/toolkit/components/crashes/tests/xpcshell/test_crash_store.js b/toolkit/components/crashes/tests/xpcshell/test_crash_store.js
deleted file mode 100644
index 12b180e91c..0000000000
--- a/toolkit/components/crashes/tests/xpcshell/test_crash_store.js
+++ /dev/null
@@ -1,587 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * This file tests the CrashStore type in CrashManager.jsm.
- */
-
-"use strict";
-
-var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
-
-var bsp = Cu.import("resource://gre/modules/CrashManager.jsm", this);
-Cu.import("resource://gre/modules/osfile.jsm", this);
-Cu.import("resource://gre/modules/Task.jsm", this);
-
-const DUMMY_DATE = new Date(Date.now() - 10 * 24 * 60 * 60 * 1000);
-DUMMY_DATE.setMilliseconds(0);
-
-const DUMMY_DATE_2 = new Date(Date.now() - 5 * 24 * 60 * 60 * 1000);
-DUMMY_DATE_2.setMilliseconds(0);
-
-const {
- PROCESS_TYPE_MAIN,
- PROCESS_TYPE_CONTENT,
- PROCESS_TYPE_PLUGIN,
- PROCESS_TYPE_GMPLUGIN,
- PROCESS_TYPE_GPU,
- CRASH_TYPE_CRASH,
- CRASH_TYPE_HANG,
- SUBMISSION_RESULT_OK,
- SUBMISSION_RESULT_FAILED,
-} = CrashManager.prototype;
-
-const CrashStore = bsp.CrashStore;
-
-var STORE_DIR_COUNT = 0;
-
-function getStore() {
- return Task.spawn(function* () {
- let storeDir = do_get_tempdir().path;
- storeDir = OS.Path.join(storeDir, "store-" + STORE_DIR_COUNT++);
-
- yield OS.File.makeDir(storeDir, {unixMode: OS.Constants.libc.S_IRWXU});
-
- let s = new CrashStore(storeDir);
- yield s.load();
-
- return s;
- });
-}
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* test_constructor() {
- let s = new CrashStore("/some/path");
- Assert.ok(s instanceof CrashStore);
-});
-
-add_task(function* test_add_crash() {
- let s = yield getStore();
-
- Assert.equal(s.crashesCount, 0);
- let d = new Date(Date.now() - 5000);
- Assert.ok(s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH, "id1", d));
-
- Assert.equal(s.crashesCount, 1);
-
- let crashes = s.crashes;
- Assert.equal(crashes.length, 1);
- let c = crashes[0];
-
- Assert.equal(c.id, "id1", "ID set properly.");
- Assert.equal(c.crashDate.getTime(), d.getTime(), "Date set.");
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH, "id2", new Date())
- );
- Assert.equal(s.crashesCount, 2);
-});
-
-add_task(function* test_reset() {
- let s = yield getStore();
-
- Assert.ok(s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH, "id1", DUMMY_DATE));
- Assert.equal(s.crashes.length, 1);
- s.reset();
- Assert.equal(s.crashes.length, 0);
-});
-
-add_task(function* test_save_load() {
- let s = yield getStore();
-
- yield s.save();
-
- let d1 = new Date();
- let d2 = new Date(d1.getTime() - 10000);
- Assert.ok(s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH, "id1", d1));
- Assert.ok(s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH, "id2", d2));
- Assert.ok(s.addSubmissionAttempt("id1", "sub1", d1));
- Assert.ok(s.addSubmissionResult("id1", "sub1", d2, SUBMISSION_RESULT_OK));
- Assert.ok(s.setRemoteCrashID("id1", "bp-1"));
-
- yield s.save();
-
- yield s.load();
- Assert.ok(!s.corruptDate);
- let crashes = s.crashes;
-
- Assert.equal(crashes.length, 2);
- let c = s.getCrash("id1");
- Assert.equal(c.crashDate.getTime(), d1.getTime());
- Assert.equal(c.remoteID, "bp-1");
-
- Assert.ok(!!c.submissions);
- let submission = c.submissions.get("sub1");
- Assert.ok(!!submission);
- Assert.equal(submission.requestDate.getTime(), d1.getTime());
- Assert.equal(submission.responseDate.getTime(), d2.getTime());
- Assert.equal(submission.result, SUBMISSION_RESULT_OK);
-});
-
-add_task(function* test_corrupt_json() {
- let s = yield getStore();
-
- let buffer = new TextEncoder().encode("{bad: json-file");
- yield OS.File.writeAtomic(s._storePath, buffer, {compression: "lz4"});
-
- yield s.load();
- Assert.ok(s.corruptDate, "Corrupt date is defined.");
-
- let date = s.corruptDate;
- yield s.save();
- s._data = null;
- yield s.load();
- Assert.ok(s.corruptDate);
- Assert.equal(date.getTime(), s.corruptDate.getTime());
-});
-
-add_task(function* test_add_main_crash() {
- let s = yield getStore();
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH, "id1", new Date())
- );
- Assert.equal(s.crashesCount, 1);
-
- let c = s.crashes[0];
- Assert.ok(c.crashDate);
- Assert.equal(c.type, PROCESS_TYPE_MAIN + "-" + CRASH_TYPE_CRASH);
- Assert.ok(c.isOfType(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH));
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH, "id2", new Date())
- );
- Assert.equal(s.crashesCount, 2);
-
- // Duplicate.
- Assert.ok(
- s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH, "id1", new Date())
- );
- Assert.equal(s.crashesCount, 2);
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH, "id3", new Date(),
- { OOMAllocationSize: 1048576 })
- );
- Assert.equal(s.crashesCount, 3);
- Assert.deepEqual(s.crashes[2].metadata, { OOMAllocationSize: 1048576 });
-
- let crashes = s.getCrashesOfType(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH);
- Assert.equal(crashes.length, 3);
-});
-
-add_task(function* test_add_main_hang() {
- let s = yield getStore();
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_HANG, "id1", new Date())
- );
- Assert.equal(s.crashesCount, 1);
-
- let c = s.crashes[0];
- Assert.ok(c.crashDate);
- Assert.equal(c.type, PROCESS_TYPE_MAIN + "-" + CRASH_TYPE_HANG);
- Assert.ok(c.isOfType(PROCESS_TYPE_MAIN, CRASH_TYPE_HANG));
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_HANG, "id2", new Date())
- );
- Assert.equal(s.crashesCount, 2);
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_HANG, "id1", new Date())
- );
- Assert.equal(s.crashesCount, 2);
-
- let crashes = s.getCrashesOfType(PROCESS_TYPE_MAIN, CRASH_TYPE_HANG);
- Assert.equal(crashes.length, 2);
-});
-
-add_task(function* test_add_content_crash() {
- let s = yield getStore();
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_CONTENT, CRASH_TYPE_CRASH, "id1", new Date())
- );
- Assert.equal(s.crashesCount, 1);
-
- let c = s.crashes[0];
- Assert.ok(c.crashDate);
- Assert.equal(c.type, PROCESS_TYPE_CONTENT + "-" + CRASH_TYPE_CRASH);
- Assert.ok(c.isOfType(PROCESS_TYPE_CONTENT, CRASH_TYPE_CRASH));
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_CONTENT, CRASH_TYPE_CRASH, "id2", new Date())
- );
- Assert.equal(s.crashesCount, 2);
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_CONTENT, CRASH_TYPE_CRASH, "id1", new Date())
- );
- Assert.equal(s.crashesCount, 2);
-
- let crashes = s.getCrashesOfType(PROCESS_TYPE_CONTENT, CRASH_TYPE_CRASH);
- Assert.equal(crashes.length, 2);
-});
-
-add_task(function* test_add_content_hang() {
- let s = yield getStore();
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_CONTENT, CRASH_TYPE_HANG, "id1", new Date())
- );
- Assert.equal(s.crashesCount, 1);
-
- let c = s.crashes[0];
- Assert.ok(c.crashDate);
- Assert.equal(c.type, PROCESS_TYPE_CONTENT + "-" + CRASH_TYPE_HANG);
- Assert.ok(c.isOfType(PROCESS_TYPE_CONTENT, CRASH_TYPE_HANG));
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_CONTENT, CRASH_TYPE_HANG, "id2", new Date())
- );
- Assert.equal(s.crashesCount, 2);
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_CONTENT, CRASH_TYPE_HANG, "id1", new Date())
- );
- Assert.equal(s.crashesCount, 2);
-
- let crashes = s.getCrashesOfType(PROCESS_TYPE_CONTENT, CRASH_TYPE_HANG);
- Assert.equal(crashes.length, 2);
-});
-
-add_task(function* test_add_plugin_crash() {
- let s = yield getStore();
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_PLUGIN, CRASH_TYPE_CRASH, "id1", new Date())
- );
- Assert.equal(s.crashesCount, 1);
-
- let c = s.crashes[0];
- Assert.ok(c.crashDate);
- Assert.equal(c.type, PROCESS_TYPE_PLUGIN + "-" + CRASH_TYPE_CRASH);
- Assert.ok(c.isOfType(PROCESS_TYPE_PLUGIN, CRASH_TYPE_CRASH));
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_PLUGIN, CRASH_TYPE_CRASH, "id2", new Date())
- );
- Assert.equal(s.crashesCount, 2);
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_PLUGIN, CRASH_TYPE_CRASH, "id1", new Date())
- );
- Assert.equal(s.crashesCount, 2);
-
- let crashes = s.getCrashesOfType(PROCESS_TYPE_PLUGIN, CRASH_TYPE_CRASH);
- Assert.equal(crashes.length, 2);
-});
-
-add_task(function* test_add_plugin_hang() {
- let s = yield getStore();
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_PLUGIN, CRASH_TYPE_HANG, "id1", new Date())
- );
- Assert.equal(s.crashesCount, 1);
-
- let c = s.crashes[0];
- Assert.ok(c.crashDate);
- Assert.equal(c.type, PROCESS_TYPE_PLUGIN + "-" + CRASH_TYPE_HANG);
- Assert.ok(c.isOfType(PROCESS_TYPE_PLUGIN, CRASH_TYPE_HANG));
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_PLUGIN, CRASH_TYPE_HANG, "id2", new Date())
- );
- Assert.equal(s.crashesCount, 2);
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_PLUGIN, CRASH_TYPE_HANG, "id1", new Date())
- );
- Assert.equal(s.crashesCount, 2);
-
- let crashes = s.getCrashesOfType(PROCESS_TYPE_PLUGIN, CRASH_TYPE_HANG);
- Assert.equal(crashes.length, 2);
-});
-
-add_task(function* test_add_gmplugin_crash() {
- let s = yield getStore();
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_GMPLUGIN, CRASH_TYPE_CRASH, "id1", new Date())
- );
- Assert.equal(s.crashesCount, 1);
-
- let c = s.crashes[0];
- Assert.ok(c.crashDate);
- Assert.equal(c.type, PROCESS_TYPE_GMPLUGIN + "-" + CRASH_TYPE_CRASH);
- Assert.ok(c.isOfType(PROCESS_TYPE_GMPLUGIN, CRASH_TYPE_CRASH));
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_GMPLUGIN, CRASH_TYPE_CRASH, "id2", new Date())
- );
- Assert.equal(s.crashesCount, 2);
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_GMPLUGIN, CRASH_TYPE_CRASH, "id1", new Date())
- );
- Assert.equal(s.crashesCount, 2);
-
- let crashes = s.getCrashesOfType(PROCESS_TYPE_GMPLUGIN, CRASH_TYPE_CRASH);
- Assert.equal(crashes.length, 2);
-});
-
-add_task(function* test_add_gpu_crash() {
- let s = yield getStore();
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_GPU, CRASH_TYPE_CRASH, "id1", new Date())
- );
- Assert.equal(s.crashesCount, 1);
-
- let c = s.crashes[0];
- Assert.ok(c.crashDate);
- Assert.equal(c.type, PROCESS_TYPE_GPU + "-" + CRASH_TYPE_CRASH);
- Assert.ok(c.isOfType(PROCESS_TYPE_GPU, CRASH_TYPE_CRASH));
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_GPU, CRASH_TYPE_CRASH, "id2", new Date())
- );
- Assert.equal(s.crashesCount, 2);
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_GPU, CRASH_TYPE_CRASH, "id1", new Date())
- );
- Assert.equal(s.crashesCount, 2);
-
- let crashes = s.getCrashesOfType(PROCESS_TYPE_GPU, CRASH_TYPE_CRASH);
- Assert.equal(crashes.length, 2);
-});
-
-add_task(function* test_add_mixed_types() {
- let s = yield getStore();
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH, "mcrash", new Date()) &&
- s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_HANG, "mhang", new Date()) &&
- s.addCrash(PROCESS_TYPE_CONTENT, CRASH_TYPE_CRASH, "ccrash", new Date()) &&
- s.addCrash(PROCESS_TYPE_CONTENT, CRASH_TYPE_HANG, "chang", new Date()) &&
- s.addCrash(PROCESS_TYPE_PLUGIN, CRASH_TYPE_CRASH, "pcrash", new Date()) &&
- s.addCrash(PROCESS_TYPE_PLUGIN, CRASH_TYPE_HANG, "phang", new Date()) &&
- s.addCrash(PROCESS_TYPE_GMPLUGIN, CRASH_TYPE_CRASH, "gmpcrash", new Date()) &&
- s.addCrash(PROCESS_TYPE_GPU, CRASH_TYPE_CRASH, "gpucrash", new Date())
- );
-
- Assert.equal(s.crashesCount, 8);
-
- yield s.save();
-
- s._data.crashes.clear();
- Assert.equal(s.crashesCount, 0);
-
- yield s.load();
-
- Assert.equal(s.crashesCount, 8);
-
- let crashes = s.getCrashesOfType(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH);
- Assert.equal(crashes.length, 1);
- crashes = s.getCrashesOfType(PROCESS_TYPE_MAIN, CRASH_TYPE_HANG);
- Assert.equal(crashes.length, 1);
- crashes = s.getCrashesOfType(PROCESS_TYPE_CONTENT, CRASH_TYPE_CRASH);
- Assert.equal(crashes.length, 1);
- crashes = s.getCrashesOfType(PROCESS_TYPE_CONTENT, CRASH_TYPE_HANG);
- Assert.equal(crashes.length, 1);
- crashes = s.getCrashesOfType(PROCESS_TYPE_PLUGIN, CRASH_TYPE_CRASH);
- Assert.equal(crashes.length, 1);
- crashes = s.getCrashesOfType(PROCESS_TYPE_PLUGIN, CRASH_TYPE_HANG);
- Assert.equal(crashes.length, 1);
- crashes = s.getCrashesOfType(PROCESS_TYPE_GMPLUGIN, CRASH_TYPE_CRASH);
- Assert.equal(crashes.length, 1);
- crashes = s.getCrashesOfType(PROCESS_TYPE_GPU, CRASH_TYPE_CRASH);
- Assert.equal(crashes.length, 1);
-});
-
-// Crashes added beyond the high water mark behave properly.
-add_task(function* test_high_water() {
- let s = yield getStore();
-
- let d1 = new Date(2014, 0, 1, 0, 0, 0);
- let d2 = new Date(2014, 0, 2, 0, 0, 0);
-
- let i = 0;
- for (; i < s.HIGH_WATER_DAILY_THRESHOLD; i++) {
- Assert.ok(
- s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH, "mc1" + i, d1) &&
- s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH, "mc2" + i, d2) &&
- s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_HANG, "mh1" + i, d1) &&
- s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_HANG, "mh2" + i, d2) &&
-
- s.addCrash(PROCESS_TYPE_CONTENT, CRASH_TYPE_CRASH, "cc1" + i, d1) &&
- s.addCrash(PROCESS_TYPE_CONTENT, CRASH_TYPE_CRASH, "cc2" + i, d2) &&
- s.addCrash(PROCESS_TYPE_CONTENT, CRASH_TYPE_HANG, "ch1" + i, d1) &&
- s.addCrash(PROCESS_TYPE_CONTENT, CRASH_TYPE_HANG, "ch2" + i, d2) &&
-
- s.addCrash(PROCESS_TYPE_PLUGIN, CRASH_TYPE_CRASH, "pc1" + i, d1) &&
- s.addCrash(PROCESS_TYPE_PLUGIN, CRASH_TYPE_CRASH, "pc2" + i, d2) &&
- s.addCrash(PROCESS_TYPE_PLUGIN, CRASH_TYPE_HANG, "ph1" + i, d1) &&
- s.addCrash(PROCESS_TYPE_PLUGIN, CRASH_TYPE_HANG, "ph2" + i, d2)
- );
- }
-
- Assert.ok(
- s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH, "mc1" + i, d1) &&
- s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH, "mc2" + i, d2) &&
- s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_HANG, "mh1" + i, d1) &&
- s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_HANG, "mh2" + i, d2)
- );
-
- Assert.ok(!s.addCrash(PROCESS_TYPE_CONTENT, CRASH_TYPE_CRASH, "cc1" + i, d1));
- Assert.ok(!s.addCrash(PROCESS_TYPE_CONTENT, CRASH_TYPE_CRASH, "cc2" + i, d2));
- Assert.ok(!s.addCrash(PROCESS_TYPE_CONTENT, CRASH_TYPE_HANG, "ch1" + i, d1));
- Assert.ok(!s.addCrash(PROCESS_TYPE_CONTENT, CRASH_TYPE_HANG, "ch2" + i, d2));
-
- Assert.ok(!s.addCrash(PROCESS_TYPE_PLUGIN, CRASH_TYPE_CRASH, "pc1" + i, d1));
- Assert.ok(!s.addCrash(PROCESS_TYPE_PLUGIN, CRASH_TYPE_CRASH, "pc2" + i, d2));
- Assert.ok(!s.addCrash(PROCESS_TYPE_PLUGIN, CRASH_TYPE_HANG, "ph1" + i, d1));
- Assert.ok(!s.addCrash(PROCESS_TYPE_PLUGIN, CRASH_TYPE_HANG, "ph2" + i, d2));
-
- // We preserve main process crashes and hangs. Content and plugin crashes and
- // hangs beyond should be discarded.
- Assert.equal(s.crashesCount, 12 * s.HIGH_WATER_DAILY_THRESHOLD + 4);
-
- let crashes = s.getCrashesOfType(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH);
- Assert.equal(crashes.length, 2 * s.HIGH_WATER_DAILY_THRESHOLD + 2);
- crashes = s.getCrashesOfType(PROCESS_TYPE_MAIN, CRASH_TYPE_HANG);
- Assert.equal(crashes.length, 2 * s.HIGH_WATER_DAILY_THRESHOLD + 2);
-
- crashes = s.getCrashesOfType(PROCESS_TYPE_CONTENT, CRASH_TYPE_CRASH);
- Assert.equal(crashes.length, 2 * s.HIGH_WATER_DAILY_THRESHOLD);
- crashes = s.getCrashesOfType(PROCESS_TYPE_CONTENT, CRASH_TYPE_HANG);
- Assert.equal(crashes.length, 2 * s.HIGH_WATER_DAILY_THRESHOLD);
-
- crashes = s.getCrashesOfType(PROCESS_TYPE_PLUGIN, CRASH_TYPE_CRASH);
- Assert.equal(crashes.length, 2 * s.HIGH_WATER_DAILY_THRESHOLD);
- crashes = s.getCrashesOfType(PROCESS_TYPE_PLUGIN, CRASH_TYPE_HANG);
- Assert.equal(crashes.length, 2 * s.HIGH_WATER_DAILY_THRESHOLD);
-
- // But raw counts should be preserved.
- let day1 = bsp.dateToDays(d1);
- let day2 = bsp.dateToDays(d2);
- Assert.ok(s._countsByDay.has(day1));
- Assert.ok(s._countsByDay.has(day2));
-
- Assert.equal(s._countsByDay.get(day1).
- get(PROCESS_TYPE_MAIN + "-" + CRASH_TYPE_CRASH),
- s.HIGH_WATER_DAILY_THRESHOLD + 1);
- Assert.equal(s._countsByDay.get(day1).
- get(PROCESS_TYPE_MAIN + "-" + CRASH_TYPE_HANG),
- s.HIGH_WATER_DAILY_THRESHOLD + 1);
-
- Assert.equal(s._countsByDay.get(day1).
- get(PROCESS_TYPE_CONTENT + "-" + CRASH_TYPE_CRASH),
- s.HIGH_WATER_DAILY_THRESHOLD + 1);
- Assert.equal(s._countsByDay.get(day1).
- get(PROCESS_TYPE_CONTENT + "-" + CRASH_TYPE_HANG),
- s.HIGH_WATER_DAILY_THRESHOLD + 1);
-
- Assert.equal(s._countsByDay.get(day1).
- get(PROCESS_TYPE_PLUGIN + "-" + CRASH_TYPE_CRASH),
- s.HIGH_WATER_DAILY_THRESHOLD + 1);
- Assert.equal(s._countsByDay.get(day1).
- get(PROCESS_TYPE_PLUGIN + "-" + CRASH_TYPE_HANG),
- s.HIGH_WATER_DAILY_THRESHOLD + 1);
-
- yield s.save();
- yield s.load();
-
- Assert.ok(s._countsByDay.has(day1));
- Assert.ok(s._countsByDay.has(day2));
-
- Assert.equal(s._countsByDay.get(day1).
- get(PROCESS_TYPE_MAIN + "-" + CRASH_TYPE_CRASH),
- s.HIGH_WATER_DAILY_THRESHOLD + 1);
- Assert.equal(s._countsByDay.get(day1).
- get(PROCESS_TYPE_MAIN + "-" + CRASH_TYPE_HANG),
- s.HIGH_WATER_DAILY_THRESHOLD + 1);
-
- Assert.equal(s._countsByDay.get(day1).
- get(PROCESS_TYPE_CONTENT + "-" + CRASH_TYPE_CRASH),
- s.HIGH_WATER_DAILY_THRESHOLD + 1);
- Assert.equal(s._countsByDay.get(day1).
- get(PROCESS_TYPE_CONTENT + "-" + CRASH_TYPE_HANG),
- s.HIGH_WATER_DAILY_THRESHOLD + 1);
-
- Assert.equal(s._countsByDay.get(day1).
- get(PROCESS_TYPE_PLUGIN + "-" + CRASH_TYPE_CRASH),
- s.HIGH_WATER_DAILY_THRESHOLD + 1);
- Assert.equal(s._countsByDay.get(day1).
- get(PROCESS_TYPE_PLUGIN + "-" + CRASH_TYPE_HANG),
- s.HIGH_WATER_DAILY_THRESHOLD + 1);
-});
-
-add_task(function* test_addSubmission() {
- let s = yield getStore();
-
- Assert.ok(s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH, "crash1",
- DUMMY_DATE));
-
- Assert.ok(s.addSubmissionAttempt("crash1", "sub1", DUMMY_DATE));
-
- let crash = s.getCrash("crash1");
- let submission = crash.submissions.get("sub1");
- Assert.ok(!!submission);
- Assert.equal(submission.requestDate.getTime(), DUMMY_DATE.getTime());
- Assert.equal(submission.responseDate, null);
- Assert.equal(submission.result, null);
-
- Assert.ok(s.addSubmissionResult("crash1", "sub1", DUMMY_DATE_2,
- SUBMISSION_RESULT_FAILED));
-
- crash = s.getCrash("crash1");
- Assert.equal(crash.submissions.size, 1);
- submission = crash.submissions.get("sub1");
- Assert.ok(!!submission);
- Assert.equal(submission.requestDate.getTime(), DUMMY_DATE.getTime());
- Assert.equal(submission.responseDate.getTime(), DUMMY_DATE_2.getTime());
- Assert.equal(submission.result, SUBMISSION_RESULT_FAILED);
-
- Assert.ok(s.addSubmissionAttempt("crash1", "sub2", DUMMY_DATE));
- Assert.ok(s.addSubmissionResult("crash1", "sub2", DUMMY_DATE_2,
- SUBMISSION_RESULT_OK));
-
- Assert.equal(crash.submissions.size, 2);
- submission = crash.submissions.get("sub2");
- Assert.ok(!!submission);
- Assert.equal(submission.result, SUBMISSION_RESULT_OK);
-});
-
-add_task(function* test_setCrashClassification() {
- let s = yield getStore();
-
- Assert.ok(s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH, "crash1",
- new Date()));
- let classifications = s.crashes[0].classifications;
- Assert.ok(!!classifications);
- Assert.equal(classifications.length, 0);
-
- Assert.ok(s.setCrashClassifications("crash1", ["foo", "bar"]));
- classifications = s.crashes[0].classifications;
- Assert.equal(classifications.length, 2);
- Assert.ok(classifications.indexOf("foo") != -1);
- Assert.ok(classifications.indexOf("bar") != -1);
-});
-
-add_task(function* test_setRemoteCrashID() {
- let s = yield getStore();
-
- Assert.ok(s.addCrash(PROCESS_TYPE_MAIN, CRASH_TYPE_CRASH, "crash1",
- new Date()));
- Assert.equal(s.crashes[0].remoteID, null);
- Assert.ok(s.setRemoteCrashID("crash1", "bp-1"));
- Assert.equal(s.crashes[0].remoteID, "bp-1");
-});
-
diff --git a/toolkit/components/crashes/tests/xpcshell/xpcshell.ini b/toolkit/components/crashes/tests/xpcshell/xpcshell.ini
deleted file mode 100644
index 5cb8a69d53..0000000000
--- a/toolkit/components/crashes/tests/xpcshell/xpcshell.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[DEFAULT]
-head =
-tail =
-skip-if = toolkit == 'android'
-
-[test_crash_manager.js]
-[test_crash_service.js]
-[test_crash_store.js]
diff --git a/toolkit/components/crashmonitor/moz.build b/toolkit/components/crashmonitor/moz.build
index 4656f6ab8c..51f7b0d8cc 100644
--- a/toolkit/components/crashmonitor/moz.build
+++ b/toolkit/components/crashmonitor/moz.build
@@ -4,8 +4,6 @@
# 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/.
-XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
-
EXTRA_JS_MODULES += [
'CrashMonitor.jsm',
]
diff --git a/toolkit/components/crashmonitor/test/unit/.eslintrc.js b/toolkit/components/crashmonitor/test/unit/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/crashmonitor/test/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/crashmonitor/test/unit/head.js b/toolkit/components/crashmonitor/test/unit/head.js
deleted file mode 100644
index 6d7d50d0ca..0000000000
--- a/toolkit/components/crashmonitor/test/unit/head.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "OS",
- "resource://gre/modules/osfile.jsm");
-
-var sessionCheckpointsPath;
-
-/**
- * Start the tasks of the different tests
- */
-function run_test()
-{
- do_get_profile();
- sessionCheckpointsPath = OS.Path.join(OS.Constants.Path.profileDir,
- "sessionCheckpoints.json");
- Components.utils.import("resource://gre/modules/CrashMonitor.jsm");
- run_next_test();
-}
diff --git a/toolkit/components/crashmonitor/test/unit/test_init.js b/toolkit/components/crashmonitor/test/unit/test_init.js
deleted file mode 100644
index d72f46aca9..0000000000
--- a/toolkit/components/crashmonitor/test/unit/test_init.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/**
- * Test that calling |init| twice throws an error
- */
-add_task(function test_init() {
- CrashMonitor.init();
- try {
- CrashMonitor.init();
- do_check_true(false);
- } catch (ex) {
- do_check_true(true);
- }
-});
diff --git a/toolkit/components/crashmonitor/test/unit/test_invalid_file.js b/toolkit/components/crashmonitor/test/unit/test_invalid_file.js
deleted file mode 100644
index cc55a2755a..0000000000
--- a/toolkit/components/crashmonitor/test/unit/test_invalid_file.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/**
- * Test with sessionCheckpoints.json containing invalid data
- */
-add_task(function* test_invalid_file() {
- // Write bogus data to checkpoint file
- let data = "1234";
- yield OS.File.writeAtomic(sessionCheckpointsPath, data,
- {tmpPath: sessionCheckpointsPath + ".tmp"});
-
- // An invalid file will cause |init| to return null
- let status = yield CrashMonitor.init();
- do_check_true(status === null ? true : false);
-
- // and |previousCheckpoints| will be null
- let checkpoints = yield CrashMonitor.previousCheckpoints;
- do_check_true(checkpoints === null ? true : false);
-});
diff --git a/toolkit/components/crashmonitor/test/unit/test_invalid_json.js b/toolkit/components/crashmonitor/test/unit/test_invalid_json.js
deleted file mode 100644
index f3b05208ac..0000000000
--- a/toolkit/components/crashmonitor/test/unit/test_invalid_json.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/**
- * Test with sessionCheckpoints.json containing invalid JSON data
- */
-add_task(function* test_invalid_file() {
- // Write bogus data to checkpoint file
- let data = "[}";
- yield OS.File.writeAtomic(sessionCheckpointsPath, data,
- {tmpPath: sessionCheckpointsPath + ".tmp"});
-
- CrashMonitor.init();
- let checkpoints = yield CrashMonitor.previousCheckpoints;
- do_check_eq(checkpoints, null);
-});
diff --git a/toolkit/components/crashmonitor/test/unit/test_missing_file.js b/toolkit/components/crashmonitor/test/unit/test_missing_file.js
deleted file mode 100644
index 9ce31da954..0000000000
--- a/toolkit/components/crashmonitor/test/unit/test_missing_file.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/**
- * Test with non-existing sessionCheckpoints.json
- */
-add_task(function* test_missing_file() {
- CrashMonitor.init();
- let checkpoints = yield CrashMonitor.previousCheckpoints;
- do_check_eq(checkpoints, null);
-});
diff --git a/toolkit/components/crashmonitor/test/unit/test_register.js b/toolkit/components/crashmonitor/test/unit/test_register.js
deleted file mode 100644
index 33c73a5aed..0000000000
--- a/toolkit/components/crashmonitor/test/unit/test_register.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/**
- * Test that CrashMonitor.jsm is correctly loaded from XPCOM component
- */
-add_task(function test_register() {
- let cm = Components.classes["@mozilla.org/toolkit/crashmonitor;1"]
- .createInstance(Components.interfaces.nsIObserver);
-
- // Send "profile-after-change" to trigger the initialization
- cm.observe(null, "profile-after-change", null);
-
- // If CrashMonitor was initialized properly a new call to |init|
- // should fail
- try {
- CrashMonitor.init();
- do_check_true(false);
- } catch (ex) {
- do_check_true(true);
- }
-});
diff --git a/toolkit/components/crashmonitor/test/unit/test_valid_file.js b/toolkit/components/crashmonitor/test/unit/test_valid_file.js
deleted file mode 100644
index d2f214cc05..0000000000
--- a/toolkit/components/crashmonitor/test/unit/test_valid_file.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/**
- * Test with sessionCheckpoints.json containing valid data
- */
-add_task(function* test_valid_file() {
- // Write valid data to checkpoint file
- let data = JSON.stringify({"final-ui-startup": true});
- yield OS.File.writeAtomic(sessionCheckpointsPath, data,
- {tmpPath: sessionCheckpointsPath + ".tmp"});
-
- CrashMonitor.init();
- let checkpoints = yield CrashMonitor.previousCheckpoints;
-
- do_check_true(checkpoints["final-ui-startup"]);
- do_check_eq(Object.keys(checkpoints).length, 1);
-});
diff --git a/toolkit/components/crashmonitor/test/unit/xpcshell.ini b/toolkit/components/crashmonitor/test/unit/xpcshell.ini
deleted file mode 100644
index cd86b2535e..0000000000
--- a/toolkit/components/crashmonitor/test/unit/xpcshell.ini
+++ /dev/null
@@ -1,11 +0,0 @@
-[DEFAULT]
-head = head.js
-tail =
-skip-if = toolkit == 'android'
-
-[test_init.js]
-[test_valid_file.js]
-[test_invalid_file.js]
-[test_invalid_json.js]
-[test_missing_file.js]
-[test_register.js]
diff --git a/toolkit/components/ctypes/moz.build b/toolkit/components/ctypes/moz.build
index c79110eebc..3270ce1d1c 100644
--- a/toolkit/components/ctypes/moz.build
+++ b/toolkit/components/ctypes/moz.build
@@ -4,21 +4,10 @@
# 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/.
-TEST_DIRS += ['tests']
+LOCAL_INCLUDES += ['/js/xpconnect/loader']
-SOURCES += [
- 'ctypes.cpp',
-]
+SOURCES += ['ctypes.cpp']
-LOCAL_INCLUDES += [
- '/js/xpconnect/loader',
-]
-
-EXTRA_JS_MODULES += [
- 'ctypes.jsm',
-]
+EXTRA_JS_MODULES += ['ctypes.jsm']
FINAL_LIBRARY = 'xul'
-
-with Files('**'):
- BUG_COMPONENT = ('Core', 'js-ctypes')
diff --git a/toolkit/components/ctypes/tests/chrome/.eslintrc.js b/toolkit/components/ctypes/tests/chrome/.eslintrc.js
deleted file mode 100644
index 8c0f4f574c..0000000000
--- a/toolkit/components/ctypes/tests/chrome/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/mochitest/chrome.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/ctypes/tests/chrome/chrome.ini b/toolkit/components/ctypes/tests/chrome/chrome.ini
deleted file mode 100644
index e34866be2a..0000000000
--- a/toolkit/components/ctypes/tests/chrome/chrome.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[DEFAULT]
-skip-if = os == 'android'
-support-files =
- xpcshellTestHarnessAdaptor.js
- ctypes_worker.js
- ../unit/test_jsctypes.js
-
-[test_ctypes.xul]
diff --git a/toolkit/components/ctypes/tests/chrome/ctypes_worker.js b/toolkit/components/ctypes/tests/chrome/ctypes_worker.js
deleted file mode 100644
index ff128a758a..0000000000
--- a/toolkit/components/ctypes/tests/chrome/ctypes_worker.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-importScripts("xpcshellTestHarnessAdaptor.js");
-
-onmessage = function(event) {
- _WORKINGDIR_ = event.data.dir;
- _OS_ = event.data.os;
- importScripts("test_jsctypes.js");
- run_test();
- postMessage("Done!");
-}
diff --git a/toolkit/components/ctypes/tests/chrome/test_ctypes.xul b/toolkit/components/ctypes/tests/chrome/test_ctypes.xul
deleted file mode 100644
index bbe7fb0c97..0000000000
--- a/toolkit/components/ctypes/tests/chrome/test_ctypes.xul
+++ /dev/null
@@ -1,106 +0,0 @@
-<?xml version="1.0"?>
-<!-- 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/. -->
-
-<window title="DOM Worker Threads Test"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="test();">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/chrome-harness.js"/>
-
- <script type="application/javascript">
- <![CDATA[
- Components.utils.import("resource://gre/modules/ctypes.jsm");
-
- CTYPES_TEST_LIB = ctypes.libraryName("jsctypes-test");
- CTYPES_UNICODE_LIB = ctypes.libraryName("jsctyp\u00E8s-t\u00EB\u00DFt");
-
- /*
- * input: string of the url where we are running from
- * return: nsILocalFile
- */
- function getCurrentDir(path) {
- var rootDir = getRootDirectory(window.location.href);
- var jar = getJar(rootDir);
-
- if (jar) {
- return extractJarToTmp(jar);
- } else {
- return getLocalDir(path);
- }
- }
-
- function getLocalDir(path) {
- let dir = Components.classes["@mozilla.org/file/directory_service;1"]
- .getService(Components.interfaces.nsIProperties)
- .get("CurWorkD", Components.interfaces.nsILocalFile);
- path = location.pathname;
- path = path.slice("content/".length,
- -1 * "/test_ctypes.xul".length);
- let components = path.split("/");
- for (let part in components) {
- dir.append(components[part]);
- }
- return dir;
- }
-
- function setupLibs(path) {
- let libFile = path.clone();
- libFile.append(CTYPES_TEST_LIB);
- ok(libFile.exists(), "ctypes test library doesn't exist!?");
-
- libFile.copyTo(null, CTYPES_UNICODE_LIB);
- }
-
- function cleanupLibs(path) {
- let unicodeFile = path.clone();
- unicodeFile.append(CTYPES_UNICODE_LIB);
- ok(unicodeFile.exists(), "ctypes unicode test library doesn't exist!?");
- unicodeFile.remove(false);
- }
-
- function test()
- {
- SimpleTest.waitForExplicitFinish();
-
- var dir = getCurrentDir(location.path);
- ok(dir.exists() && dir.isDirectory(), "Chrome test dir doesn't exist?!");
- setupLibs(dir);
-
- var worker = new ChromeWorker("ctypes_worker.js");
- worker.onmessage = function(event) {
- is(event.data, "Done!", "Wrong message!");
- cleanupLibs(dir);
- SimpleTest.finish();
- }
- worker.onerror = function(event) {
- if (event.message == "uncaught exception: 7.5 million years for that?" ||
- event.message == "uncaught exception: Just following orders, sir!") {
- // We throw those on purpose in the worker, so ignore them.
- return true;
- }
- ok(false, "Worker had an error: " + event.message);
- worker.terminate();
- cleanupLibs(dir);
- SimpleTest.finish();
- }
-
- worker.postMessage({dir: dir.path, os: Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime).OS});
- }
-
- ]]>
- </script>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display:none;"></div>
- <pre id="test"></pre>
- </body>
- <label id="test-result"/>
-</window>
diff --git a/toolkit/components/ctypes/tests/chrome/xpcshellTestHarnessAdaptor.js b/toolkit/components/ctypes/tests/chrome/xpcshellTestHarnessAdaptor.js
deleted file mode 100644
index eec85025b5..0000000000
--- a/toolkit/components/ctypes/tests/chrome/xpcshellTestHarnessAdaptor.js
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var _WORKINGDIR_ = null;
-var _OS_ = null;
-
-var Components = {
- classes: { },
- interfaces: { },
- stack: {
- caller: null
- },
- utils: {
- import: function() { }
- }
-};
-
-function do_throw(message, stack) {
- do_print("error: " + message);
- do_print("stack: " + (stack ? stack : new Error().stack));
- throw message;
-}
-
-function do_check_neq(left, right, stack) {
- if (left == right) {
- var text = "do_check_neq failed";
- try {
- text += ": " + left + " == " + right;
- } catch (e) {
- }
- do_throw(text, stack);
- }
-}
-
-function do_check_eq(left, right, stack) {
- if (left != right) {
- var text = "do_check_eq failed";
- try {
- text += ": " + left + " != " + right;
- } catch (e) {
- }
- do_throw(text, stack);
- }
-}
-
-function do_check_true(condition, stack) {
- do_check_eq(condition, true, stack);
-}
-
-function do_check_false(condition, stack) {
- do_check_eq(condition, false, stack);
-}
-
-function do_print(text) {
- dump("INFO: " + text + "\n");
-}
-
-function FileFaker(path) {
- this._path = path;
-}
-FileFaker.prototype = {
- get path() {
- return this._path;
- },
- get parent() {
- let lastSlash = this._path.lastIndexOf("/");
- if (lastSlash == -1) {
- return "";
- }
- this._path = this._path.substring(0, lastSlash);
- return this;
- },
- append: function(leaf) {
- this._path = this._path + "/" + leaf;
- }
-};
-
-function do_get_file(path, allowNonexistent) {
- if (!_WORKINGDIR_) {
- do_throw("No way to fake files if working directory is unknown!");
- }
-
- let lf = new FileFaker(_WORKINGDIR_);
- let bits = path.split("/");
- for (let i = 0; i < bits.length; i++) {
- if (bits[i]) {
- if (bits[i] == "..")
- lf = lf.parent;
- else
- lf.append(bits[i]);
- }
- }
- return lf;
-}
-
-function get_os() {
- return _OS_;
-}
diff --git a/toolkit/components/ctypes/tests/jsctypes-test-errno.cpp b/toolkit/components/ctypes/tests/jsctypes-test-errno.cpp
deleted file mode 100644
index 83a29e6328..0000000000
--- a/toolkit/components/ctypes/tests/jsctypes-test-errno.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include <stdio.h>
-#include <errno.h>
-#if defined(XP_WIN)
-#include <windows.h>
-#endif // defined(XP_WIN)
-
-#include "jsctypes-test-errno.h"
-
-
-
-#define FAIL \
-{ \
- fprintf(stderr, "Assertion failed at line %i\n", __LINE__); \
- (*(int*)nullptr)++; \
-}
-
-
-void set_errno(int status)
-{
- errno = status;
-}
-int get_errno()
-{
- return errno;
-}
-
-#if defined(XP_WIN)
-void set_last_error(int status)
-{
- SetLastError((int)status);
-}
-int get_last_error()
-{
- return (int)GetLastError();
-}
-#endif // defined(XP_WIN)
diff --git a/toolkit/components/ctypes/tests/jsctypes-test-errno.h b/toolkit/components/ctypes/tests/jsctypes-test-errno.h
deleted file mode 100644
index 4d11b905bc..0000000000
--- a/toolkit/components/ctypes/tests/jsctypes-test-errno.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "mozilla/Attributes.h"
-#include "mozilla/Types.h"
-
-#define EXPORT_CDECL(type) MOZ_EXPORT type
-
-MOZ_BEGIN_EXTERN_C
-
- EXPORT_CDECL(void) set_errno(int status);
- EXPORT_CDECL(int) get_errno();
-
-#if defined(XP_WIN)
- EXPORT_CDECL(void) set_last_error(int status);
- EXPORT_CDECL(int) get_last_error();
-#endif // defined(XP_WIN)
-
-MOZ_END_EXTERN_C
diff --git a/toolkit/components/ctypes/tests/jsctypes-test-finalizer.cpp b/toolkit/components/ctypes/tests/jsctypes-test-finalizer.cpp
deleted file mode 100644
index 009ba917af..0000000000
--- a/toolkit/components/ctypes/tests/jsctypes-test-finalizer.cpp
+++ /dev/null
@@ -1,323 +0,0 @@
-#include "errno.h"
-
-#include "jsctypes-test.h"
-#include "jsctypes-test-finalizer.h"
-
-/**
- * Shared infrastructure
- */
-
-
-/**
- * An array of integers representing resources.
- * - 0: unacquired
- * - 1: acquired
- * - < 0: error, resource has been released several times.
- */
-int *gFinalizerTestResources = nullptr;
-char **gFinalizerTestNames = nullptr;
-size_t gFinalizerTestSize;
-
-void
-test_finalizer_start(size_t size)
-{
- gFinalizerTestResources = new int[size];
- gFinalizerTestNames = new char*[size];
- gFinalizerTestSize = size;
- for (size_t i = 0; i < size; ++i) {
- gFinalizerTestResources[i] = 0;
- gFinalizerTestNames[i] = nullptr;
- }
-}
-
-void
-test_finalizer_stop()
-{
- delete[] gFinalizerTestResources;
-}
-
-/**
- * Check if an acquired resource has been released
- */
-bool
-test_finalizer_resource_is_acquired(size_t i)
-{
- return gFinalizerTestResources[i] == 1;
-}
-// Resource type: size_t
-
-// Acquire resource i
-size_t
-test_finalizer_acq_size_t(size_t i)
-{
- gFinalizerTestResources[i] = 1;
- return i;
-}
-
-// Release resource i
-void
-test_finalizer_rel_size_t(size_t i)
-{
- if (--gFinalizerTestResources[i] < 0) {
- MOZ_CRASH("Assertion failed");
- }
-}
-
-size_t
-test_finalizer_rel_size_t_return_size_t(size_t i)
-{
- if (-- gFinalizerTestResources[i] < 0) {
- MOZ_CRASH("Assertion failed");
- }
- return i;
-}
-
-myRECT
-test_finalizer_rel_size_t_return_struct_t(size_t i)
-{
- if (-- gFinalizerTestResources[i] < 0) {
- MOZ_CRASH("Assertion failed");
- }
- const int32_t narrowed = (int32_t)i;
- myRECT result = { narrowed, narrowed, narrowed, narrowed };
- return result;
-}
-
-bool
-test_finalizer_cmp_size_t(size_t a, size_t b)
-{
- return a==b;
-}
-
-// Resource type: int32_t
-
-// Acquire resource i
-int32_t
-test_finalizer_acq_int32_t(size_t i)
-{
- gFinalizerTestResources[i] = 1;
- return i;
-}
-
-// Release resource i
-void
-test_finalizer_rel_int32_t(int32_t i)
-{
- if (--gFinalizerTestResources[i] < 0) {
- MOZ_CRASH("Assertion failed");
- }
-}
-
-bool
-test_finalizer_cmp_int32_t(int32_t a, int32_t b)
-{
- return a==b;
-}
-
-// Resource type: int64_t
-
-// Acquire resource i
-int64_t
-test_finalizer_acq_int64_t(size_t i)
-{
- gFinalizerTestResources[i] = 1;
- return i;
-}
-
-// Release resource i
-void
-test_finalizer_rel_int64_t(int64_t i)
-{
- if (-- gFinalizerTestResources[i] < 0) {
- MOZ_CRASH("Assertion failed");
- }
-}
-
-bool
-test_finalizer_cmp_int64_t(int64_t a, int64_t b)
-{
- return a==b;
-}
-
-// Resource type: void*
-
-// Acquire resource i
-void*
-test_finalizer_acq_ptr_t(size_t i)
-{
- gFinalizerTestResources[i] = 1;
- return (void*)&gFinalizerTestResources[i];
-}
-
-// Release resource i
-void
-test_finalizer_rel_ptr_t(void *i)
-{
- int *as_int = (int*)i;
- -- (*as_int);
- if (*as_int < 0) {
- MOZ_CRASH("Assertion failed");
- }
-}
-
-bool
-test_finalizer_cmp_ptr_t(void *a, void *b)
-{
- return a==b;
-}
-
-// Resource type: int32_t*
-
-// Acquire resource i
-int32_t*
-test_finalizer_acq_int32_ptr_t(size_t i)
-{
- gFinalizerTestResources[i] = 1;
- return (int32_t*)&gFinalizerTestResources[i];
-}
-
-// Release resource i
-void
-test_finalizer_rel_int32_ptr_t(int32_t *i)
-{
- -- (*i);
- if (*i < 0) {
- MOZ_CRASH("Assertion failed");
- }
-}
-
-bool
-test_finalizer_cmp_int32_ptr_t(int32_t *a, int32_t *b)
-{
- return a==b;
-}
-
-// Resource type: nullptr
-
-// Acquire resource i
-void*
-test_finalizer_acq_null_t(size_t i)
-{
- gFinalizerTestResources[0] = 1;//Always index 0
- return nullptr;
-}
-
-// Release resource i
-void
-test_finalizer_rel_null_t(void *i)
-{
- if (i != nullptr) {
- MOZ_CRASH("Assertion failed");
- }
- gFinalizerTestResources[0] --;
-}
-
-bool
-test_finalizer_null_resource_is_acquired(size_t)
-{
- return gFinalizerTestResources[0] == 1;
-}
-
-bool
-test_finalizer_cmp_null_t(void *a, void *b)
-{
- return a==b;
-}
-
-// Resource type: char*
-
-// Acquire resource i
-char*
-test_finalizer_acq_string_t(int i)
-{
- gFinalizerTestResources[i] = 1;
- if (!gFinalizerTestNames[i]) {
- char* buf = new char[12];
- snprintf(buf, 12, "%d", i);
- gFinalizerTestNames[i] = buf;
- return buf;
- }
- return gFinalizerTestNames[i];
-}
-
-// Release resource i
-void
-test_finalizer_rel_string_t(char *i)
-{
- int index = atoi(i);
- if (index < 0 || index >= (int)gFinalizerTestSize) {
- MOZ_CRASH("Assertion failed");
- }
- gFinalizerTestResources[index] --;
-}
-
-bool
-test_finalizer_string_resource_is_acquired(size_t i)
-{
- return gFinalizerTestResources[i] == 1;
-}
-
-bool
-test_finalizer_cmp_string_t(char *a, char *b)
-{
- return !strncmp(a, b, 10);
-}
-
-// Resource type: myRECT
-
-// Acquire resource i
-myRECT
-test_finalizer_acq_struct_t(int i)
-{
- gFinalizerTestResources[i] = 1;
- myRECT result = { i, i, i, i };
- return result;
-}
-
-// Release resource i
-void
-test_finalizer_rel_struct_t(myRECT i)
-{
- int index = i.top;
- if (index < 0 || index >= (int)gFinalizerTestSize) {
- MOZ_CRASH("Assertion failed");
- }
- gFinalizerTestResources[index] --;
-}
-
-bool
-test_finalizer_struct_resource_is_acquired(myRECT i)
-{
- int index = i.top;
- if (index < 0 || index >= (int)gFinalizerTestSize) {
- MOZ_CRASH("Assertion failed");
- }
- return gFinalizerTestResources[index] == 1;
-}
-
-bool
-test_finalizer_cmp_struct_t(myRECT a, myRECT b)
-{
- return a.top == b.top;
-}
-
-// Support for checking that we reject nullptr finalizer
-afun* test_finalizer_rel_null_function()
-{
- return nullptr;
-}
-
-void
-test_finalizer_rel_size_t_set_errno(size_t i)
-{
- if (-- gFinalizerTestResources[i] < 0) {
- MOZ_CRASH("Assertion failed");
- }
- errno = 10;
-}
-
-void
-reset_errno()
-{
- errno = 0;
-}
diff --git a/toolkit/components/ctypes/tests/jsctypes-test-finalizer.h b/toolkit/components/ctypes/tests/jsctypes-test-finalizer.h
deleted file mode 100644
index f942e7f44b..0000000000
--- a/toolkit/components/ctypes/tests/jsctypes-test-finalizer.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "mozilla/Attributes.h"
-#include "mozilla/Types.h"
-
-#define EXPORT_CDECL(type) MOZ_EXPORT type
-
-MOZ_BEGIN_EXTERN_C
-
- EXPORT_CDECL(void) test_finalizer_start(size_t size);
- EXPORT_CDECL(void) test_finalizer_stop();
- EXPORT_CDECL(bool) test_finalizer_resource_is_acquired(size_t i);
-
- EXPORT_CDECL(size_t) test_finalizer_acq_size_t(size_t i);
- EXPORT_CDECL(void) test_finalizer_rel_size_t(size_t i);
- EXPORT_CDECL(size_t) test_finalizer_rel_size_t_return_size_t(size_t i);
- EXPORT_CDECL(myRECT) test_finalizer_rel_size_t_return_struct_t(size_t i);
- EXPORT_CDECL(bool) test_finalizer_cmp_size_t(size_t a, size_t b);
-
- EXPORT_CDECL(int32_t) test_finalizer_acq_int32_t(size_t i);
- EXPORT_CDECL(void) test_finalizer_rel_int32_t(int32_t i);
- EXPORT_CDECL(bool) test_finalizer_cmp_int32_t(int32_t a, int32_t b);
-
- EXPORT_CDECL(int64_t) test_finalizer_acq_int64_t(size_t i);
- EXPORT_CDECL(void) test_finalizer_rel_int64_t(int64_t i);
- EXPORT_CDECL(bool) test_finalizer_cmp_int64_t(int64_t a, int64_t b);
-
- EXPORT_CDECL(void*) test_finalizer_acq_ptr_t(size_t i);
- EXPORT_CDECL(void) test_finalizer_rel_ptr_t(void *i);
- EXPORT_CDECL(bool) test_finalizer_cmp_ptr_t(void *a, void *b);
-
- EXPORT_CDECL(int32_t*) test_finalizer_acq_int32_ptr_t(size_t i);
- EXPORT_CDECL(void) test_finalizer_rel_int32_ptr_t(int32_t *i);
- EXPORT_CDECL(bool) test_finalizer_cmp_int32_ptr_t(int32_t *a, int32_t *b);
-
- EXPORT_CDECL(char*) test_finalizer_acq_string_t(int i);
- EXPORT_CDECL(void) test_finalizer_rel_string_t(char *i);
- EXPORT_CDECL(bool) test_finalizer_cmp_string_t(char *a, char *b);
-
- EXPORT_CDECL(void*) test_finalizer_acq_null_t(size_t i);
- EXPORT_CDECL(void) test_finalizer_rel_null_t(void *i);
- EXPORT_CDECL(bool) test_finalizer_cmp_null_t(void *a, void *b);
- EXPORT_CDECL(bool) test_finalizer_null_resource_is_acquired(size_t i);
-
- EXPORT_CDECL(myRECT) test_finalizer_acq_struct_t(int i);
- EXPORT_CDECL(void) test_finalizer_rel_struct_t(myRECT i);
- EXPORT_CDECL(bool) test_finalizer_cmp_struct_t(myRECT a, myRECT b);
-
- typedef void (*afun)(size_t);
- EXPORT_CDECL(afun*) test_finalizer_rel_null_function();
-
- EXPORT_CDECL(void) test_finalizer_rel_size_t_set_errno(size_t i);
- EXPORT_CDECL(void) reset_errno();
-
-MOZ_END_EXTERN_C
diff --git a/toolkit/components/ctypes/tests/jsctypes-test.cpp b/toolkit/components/ctypes/tests/jsctypes-test.cpp
deleted file mode 100644
index d0e84a66c2..0000000000
--- a/toolkit/components/ctypes/tests/jsctypes-test.cpp
+++ /dev/null
@@ -1,394 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "jsctypes-test.h"
-#include <math.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include "typedefs.h"
-
-template <typename T> struct ValueTraits {
- static T literal() { return static_cast<T>(109.25); }
- static T sum(T a, T b) { return a + b; }
- static T sum_many(
- T a, T b, T c, T d, T e, T f, T g, T h, T i,
- T j, T k, T l, T m, T n, T o, T p, T q, T r)
- {
- return a + b + c + d + e + f + g + h + i + j + k + l + m + n + o + p + q + r;
- }
-};
-
-template <> struct ValueTraits<bool> {
- typedef bool T;
- static T literal() { return true; }
- static T sum(T a, T b) { return a || b; }
- static T sum_many(
- T a, T b, T c, T d, T e, T f, T g, T h, T i,
- T j, T k, T l, T m, T n, T o, T p, T q, T r)
- {
- return a || b || c || d || e || f || g || h || i ||
- j || k || l || m || n || o || p || q || r;
- }
-};
-
-void
-test_void_t_cdecl()
-{
- // do nothing
- return;
-}
-
-// The "AndUnderscore" bit here is an unfortunate hack: the first argument to
-// DEFINE_CDECL_FUNCTIONS and DEFINE_STDCALL_FUNCTIONS, in addition to being a
-// type, may also be a *macro* on NetBSD -- #define int8_t __int8_t and so on.
-// See <http://mail-index.netbsd.org/tech-toolchain/2014/12/18/msg002479.html>.
-// And unfortunately, passing that macro as an argument to this macro causes it
-// to be expanded -- producing get___int8_t_cdecl() and so on. Concatenating
-// int8_t with _ slightly muddies this code but inhibits expansion. See also
-// bug 1113379.
-#define FUNCTION_TESTS(nameAndUnderscore, type, ffiType, suffix) \
-type ABI \
-get_##nameAndUnderscore##suffix() \
-{ \
- return ValueTraits<type>::literal(); \
-} \
- \
-type ABI \
-set_##nameAndUnderscore##suffix(type x) \
-{ \
- return x; \
-} \
- \
-type ABI \
-sum_##nameAndUnderscore##suffix(type x, type y) \
-{ \
- return ValueTraits<type>::sum(x, y); \
-} \
- \
-type ABI \
-sum_alignb_##nameAndUnderscore##suffix(char a, type x, char b, type y, char c)\
-{ \
- return ValueTraits<type>::sum(x, y); \
-} \
- \
-type ABI \
-sum_alignf_##nameAndUnderscore##suffix(float a, type x, float b, type y, float c)\
-{ \
- return ValueTraits<type>::sum(x, y); \
-} \
- \
-type ABI \
-sum_many_##nameAndUnderscore##suffix( \
- type a, type b, type c, type d, type e, type f, type g, type h, type i, \
- type j, type k, type l, type m, type n, type o, type p, type q, type r) \
-{ \
- return ValueTraits<type>::sum_many(a, b, c, d, e, f, g, h, i, \
- j, k, l, m, n, o, p, q, r); \
-}
-
-#define ABI /* cdecl */
-#define DEFINE_CDECL_FUNCTIONS(x, y, z) FUNCTION_TESTS(x##_, y, z, cdecl)
-CTYPES_FOR_EACH_TYPE(DEFINE_CDECL_FUNCTIONS)
-#undef DEFINE_CDECL_FUNCTIONS
-#undef ABI
-
-#if defined(_WIN32)
-
-void NS_STDCALL
-test_void_t_stdcall()
-{
- // do nothing
- return;
-}
-
-#define ABI NS_STDCALL
-#define DEFINE_STDCALL_FUNCTIONS(x, y, z) FUNCTION_TESTS(x##_, y, z, stdcall)
-CTYPES_FOR_EACH_TYPE(DEFINE_STDCALL_FUNCTIONS)
-#undef DEFINE_STDCALL_FUNCTIONS
-#undef ABI
-
-#endif /* defined(_WIN32) */
-
-#define DEFINE_CDECL_TYPE_STATS(name, type, ffiType) \
-struct align_##name { \
- char x; \
- type y; \
-}; \
-struct nested_##name { \
- char a; \
- align_##name b; \
- char c; \
-}; \
- \
-void \
-get_##name##_stats(size_t* align, size_t* size, size_t* nalign, size_t* nsize, \
- size_t offsets[]) \
-{ \
- *align = offsetof(align_##name, y); \
- *size = sizeof(align_##name); \
- *nalign = offsetof(nested_##name, b); \
- *nsize = sizeof(nested_##name); \
- offsets[0] = offsetof(align_##name, y); \
- offsets[1] = offsetof(nested_##name, b); \
- offsets[2] = offsetof(nested_##name, c); \
-}
-CTYPES_FOR_EACH_TYPE(DEFINE_CDECL_TYPE_STATS)
-#undef DEFINE_CDECL_TYPE_STATS
-
-template <typename T>
-int32_t StrLen(const T* string)
-{
- const T *end;
- for (end = string; *end; ++end);
- return end - string;
-}
-
-int32_t
-test_ansi_len(const char* string)
-{
- return StrLen(string);
-}
-
-int32_t
-test_wide_len(const char16_t* string)
-{
- return StrLen(string);
-}
-
-const char *
-test_ansi_ret()
-{
- return "success";
-}
-
-const char16_t *
-test_wide_ret()
-{
- static const char16_t kSuccess[] = {'s', 'u', 'c', 'c', 'e', 's', 's', '\0'};
- return kSuccess;
-}
-
-char *
-test_ansi_echo(const char* string)
-{
- return (char*)string;
-}
-
-int32_t
-test_pt_in_rect(myRECT rc, myPOINT pt)
-{
- if (pt.x < rc.left || pt.x > rc.right)
- return 0;
- if (pt.y < rc.bottom || pt.y > rc.top)
- return 0;
- return 1;
-}
-
-void
-test_init_pt(myPOINT* pt, int32_t x, int32_t y)
-{
- pt->x = x;
- pt->y = y;
-}
-
-int32_t
-test_nested_struct(NESTED n)
-{
- return int32_t(n.n1 + n.n2 + n.inner.i1 + n.inner.i2 + n.inner.i3 + n.n3 + n.n4);
-}
-
-myPOINT
-test_struct_return(myRECT r)
-{
- myPOINT p;
- p.x = r.left; p.y = r.top;
- return p;
-}
-
-myRECT
-test_large_struct_return(myRECT a, myRECT b)
-{
- myRECT r;
- r.left = a.left; r.right = a.right;
- r.top = b.top; r.bottom = b.bottom;
- return r;
-}
-
-ONE_BYTE
-test_1_byte_struct_return(myRECT r)
-{
- ONE_BYTE s;
- s.a = r.top;
- return s;
-}
-
-TWO_BYTE
-test_2_byte_struct_return(myRECT r)
-{
- TWO_BYTE s;
- s.a = r.top;
- s.b = r.left;
- return s;
-}
-
-THREE_BYTE
-test_3_byte_struct_return(myRECT r)
-{
- THREE_BYTE s;
- s.a = r.top;
- s.b = r.left;
- s.c = r.bottom;
- return s;
-}
-
-FOUR_BYTE
-test_4_byte_struct_return(myRECT r)
-{
- FOUR_BYTE s;
- s.a = r.top;
- s.b = r.left;
- s.c = r.bottom;
- s.d = r.right;
- return s;
-}
-
-FIVE_BYTE
-test_5_byte_struct_return(myRECT r)
-{
- FIVE_BYTE s;
- s.a = r.top;
- s.b = r.left;
- s.c = r.bottom;
- s.d = r.right;
- s.e = r.top;
- return s;
-}
-
-SIX_BYTE
-test_6_byte_struct_return(myRECT r)
-{
- SIX_BYTE s;
- s.a = r.top;
- s.b = r.left;
- s.c = r.bottom;
- s.d = r.right;
- s.e = r.top;
- s.f = r.left;
- return s;
-}
-
-SEVEN_BYTE
-test_7_byte_struct_return(myRECT r)
-{
- SEVEN_BYTE s;
- s.a = r.top;
- s.b = r.left;
- s.c = r.bottom;
- s.d = r.right;
- s.e = r.top;
- s.f = r.left;
- s.g = r.bottom;
- return s;
-}
-
-void *
-test_fnptr()
-{
- return (void*)(uintptr_t)test_ansi_len;
-}
-
-int32_t
-test_closure_cdecl(int8_t i, test_func_ptr f)
-{
- return f(i);
-}
-
-#if defined(_WIN32)
-int32_t
-test_closure_stdcall(int8_t i, test_func_ptr_stdcall f)
-{
- return f(i);
-}
-#endif /* defined(_WIN32) */
-
-template <typename T> struct PromotedTraits {
- typedef T type;
-};
-#define DECL_PROMOTED(FROM, TO) \
- template <> struct PromotedTraits<FROM> { \
- typedef TO type; \
- }
-DECL_PROMOTED(bool, int);
-DECL_PROMOTED(char, int);
-DECL_PROMOTED(short, int);
-
-int32_t
-test_sum_va_cdecl(uint8_t n, ...)
-{
- va_list list;
- int32_t sum = 0;
- va_start(list, n);
- for (uint8_t i = 0; i < n; ++i)
- sum += va_arg(list, PromotedTraits<int32_t>::type);
- va_end(list);
- return sum;
-}
-
-uint8_t
-test_count_true_va_cdecl(uint8_t n, ...)
-{
- va_list list;
- uint8_t count = 0;
- va_start(list, n);
- for (uint8_t i = 0; i < n; ++i)
- if (va_arg(list, PromotedTraits<bool>::type))
- count += 1;
- va_end(list);
- return count;
-}
-
-void
-test_add_char_short_int_va_cdecl(uint32_t* result, ...)
-{
- va_list list;
- va_start(list, result);
- *result += va_arg(list, PromotedTraits<char>::type);
- *result += va_arg(list, PromotedTraits<short>::type);
- *result += va_arg(list, PromotedTraits<int>::type);
- va_end(list);
-}
-
-int32_t*
-test_vector_add_va_cdecl(uint8_t num_vecs,
- uint8_t vec_len,
- int32_t* result, ...)
-{
- va_list list;
- va_start(list, result);
- uint8_t i;
- for (i = 0; i < vec_len; ++i)
- result[i] = 0;
- for (i = 0; i < num_vecs; ++i) {
- int32_t* vec = va_arg(list, int32_t*);
- for (uint8_t j = 0; j < vec_len; ++j)
- result[j] += vec[j];
- }
- va_end(list);
- return result;
-}
-
-myRECT data_rect = { -1, -2, 3, 4 };
-
-TestClass::TestClass(int32_t a)
-{
- mInt =a;
-}
-
-int32_t
-TestClass::Add(int32_t aOther)
-{
- mInt += aOther;
- return mInt;
-}
diff --git a/toolkit/components/ctypes/tests/jsctypes-test.h b/toolkit/components/ctypes/tests/jsctypes-test.h
deleted file mode 100644
index 14eb8c9152..0000000000
--- a/toolkit/components/ctypes/tests/jsctypes-test.h
+++ /dev/null
@@ -1,197 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef jsctypes_test_h
-#define jsctypes_test_h
-
-#include "mozilla/Attributes.h"
-#include "mozilla/Types.h"
-#include "jspubtd.h"
-#include "typedefs.h"
-
-#define EXPORT_CDECL(type) MOZ_EXPORT type
-#if defined(_WIN32)
-#if defined(_WIN64)
-#define NS_STDCALL
-#else
-#define NS_STDCALL __stdcall
-#endif
-#define EXPORT_STDCALL(type) MOZ_EXPORT type NS_STDCALL
-#endif
-
-MOZ_BEGIN_EXTERN_C
-
- EXPORT_CDECL(void) test_void_t_cdecl();
-
- EXPORT_CDECL(void*) get_voidptr_t_cdecl();
- EXPORT_CDECL(void*) set_voidptr_t_cdecl(void*);
-
-#define DECLARE_CDECL_FUNCTIONS(name, type, ffiType) \
- EXPORT_CDECL(type) get_##name##_cdecl(); \
- EXPORT_CDECL(type) set_##name##_cdecl(type); \
- EXPORT_CDECL(type) sum_##name##_cdecl(type, type); \
- EXPORT_CDECL(type) sum_alignb_##name##_cdecl(char, type, char, type, char); \
- EXPORT_CDECL(type) sum_alignf_##name##_cdecl( \
- float, type, float, type, float); \
- EXPORT_CDECL(type) sum_many_##name##_cdecl( \
- type, type, type, type, type, type, type, type, type, \
- type, type, type, type, type, type, type, type, type); \
- \
- EXPORT_CDECL(void) get_##name##_stats(size_t* align, size_t* size, \
- size_t* nalign, size_t* nsize, \
- size_t offsets[]);
- CTYPES_FOR_EACH_TYPE(DECLARE_CDECL_FUNCTIONS)
-#undef DECLARE_CDECL_FUNCTIONS
-
-#if defined(_WIN32)
- EXPORT_STDCALL(void) test_void_t_stdcall();
-
- EXPORT_STDCALL(void*) get_voidptr_t_stdcall();
- EXPORT_STDCALL(void*) set_voidptr_t_stdcall(void*);
-
-#define DECLARE_STDCALL_FUNCTIONS(name, type, ffiType) \
- EXPORT_STDCALL(type) get_##name##_stdcall(); \
- EXPORT_STDCALL(type) set_##name##_stdcall(type); \
- EXPORT_STDCALL(type) sum_##name##_stdcall(type, type); \
- EXPORT_STDCALL(type) sum_alignb_##name##_stdcall( \
- char, type, char, type, char); \
- EXPORT_STDCALL(type) sum_alignf_##name##_stdcall( \
- float, type, float, type, float); \
- EXPORT_STDCALL(type) sum_many_##name##_stdcall( \
- type, type, type, type, type, type, type, type, type, \
- type, type, type, type, type, type, type, type, type);
- CTYPES_FOR_EACH_TYPE(DECLARE_STDCALL_FUNCTIONS)
-#undef DECLARE_STDCALL_FUNCTIONS
-
-#endif /* defined(_WIN32) */
-
- MOZ_EXPORT int32_t test_ansi_len(const char*);
- MOZ_EXPORT int32_t test_wide_len(const char16_t*);
- MOZ_EXPORT const char* test_ansi_ret();
- MOZ_EXPORT const char16_t* test_wide_ret();
- MOZ_EXPORT char* test_ansi_echo(const char*);
-
- struct ONE_BYTE {
- char a;
- };
-
- struct TWO_BYTE {
- char a;
- char b;
- };
-
- struct THREE_BYTE {
- char a;
- char b;
- char c;
- };
-
- struct FOUR_BYTE {
- char a;
- char b;
- char c;
- char d;
- };
-
- struct FIVE_BYTE {
- char a;
- char b;
- char c;
- char d;
- char e;
- };
-
- struct SIX_BYTE {
- char a;
- char b;
- char c;
- char d;
- char e;
- char f;
- };
-
- struct SEVEN_BYTE {
- char a;
- char b;
- char c;
- char d;
- char e;
- char f;
- char g;
- };
-
- struct myPOINT {
- int32_t x;
- int32_t y;
- };
-
- struct myRECT {
- int32_t top;
- int32_t left;
- int32_t bottom;
- int32_t right;
- };
-
- struct INNER {
- uint8_t i1;
- int64_t i2;
- uint8_t i3;
- };
-
- struct NESTED {
- int32_t n1;
- int16_t n2;
- INNER inner;
- int64_t n3;
- int32_t n4;
- };
-
- MOZ_EXPORT int32_t test_pt_in_rect(myRECT, myPOINT);
- MOZ_EXPORT void test_init_pt(myPOINT* pt, int32_t x, int32_t y);
-
- MOZ_EXPORT int32_t test_nested_struct(NESTED);
- MOZ_EXPORT myPOINT test_struct_return(myRECT);
- MOZ_EXPORT myRECT test_large_struct_return(myRECT, myRECT);
- MOZ_EXPORT ONE_BYTE test_1_byte_struct_return(myRECT);
- MOZ_EXPORT TWO_BYTE test_2_byte_struct_return(myRECT);
- MOZ_EXPORT THREE_BYTE test_3_byte_struct_return(myRECT);
- MOZ_EXPORT FOUR_BYTE test_4_byte_struct_return(myRECT);
- MOZ_EXPORT FIVE_BYTE test_5_byte_struct_return(myRECT);
- MOZ_EXPORT SIX_BYTE test_6_byte_struct_return(myRECT);
- MOZ_EXPORT SEVEN_BYTE test_7_byte_struct_return(myRECT);
-
- MOZ_EXPORT void * test_fnptr();
-
- typedef int32_t (* test_func_ptr)(int8_t);
- MOZ_EXPORT int32_t test_closure_cdecl(int8_t, test_func_ptr);
-#if defined(_WIN32)
- typedef int32_t (NS_STDCALL * test_func_ptr_stdcall)(int8_t);
- MOZ_EXPORT int32_t test_closure_stdcall(int8_t, test_func_ptr_stdcall);
-#endif /* defined(_WIN32) */
-
- MOZ_EXPORT int32_t test_callme(int8_t);
- MOZ_EXPORT void* test_getfn();
-
- EXPORT_CDECL(int32_t) test_sum_va_cdecl(uint8_t n, ...);
- EXPORT_CDECL(uint8_t) test_count_true_va_cdecl(uint8_t n, ...);
- EXPORT_CDECL(void) test_add_char_short_int_va_cdecl(uint32_t* result, ...);
- EXPORT_CDECL(int32_t*) test_vector_add_va_cdecl(uint8_t num_vecs,
- uint8_t vec_len,
- int32_t* result, ...);
-
- MOZ_EXPORT extern myRECT data_rect;
-
-MOZ_END_EXTERN_C
-
-class MOZ_EXPORT TestClass final {
-public:
- explicit TestClass(int32_t);
- int32_t Add(int32_t);
-
-private:
- int32_t mInt;
-};
-
-#endif
diff --git a/toolkit/components/ctypes/tests/moz.build b/toolkit/components/ctypes/tests/moz.build
deleted file mode 100644
index 22cbe4edcd..0000000000
--- a/toolkit/components/ctypes/tests/moz.build
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-DIST_INSTALL = False
-
-XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
-MOCHITEST_CHROME_MANIFESTS += ['chrome/chrome.ini']
-
-UNIFIED_SOURCES += [
- 'jsctypes-test-errno.cpp',
- 'jsctypes-test-finalizer.cpp',
- 'jsctypes-test.cpp',
-]
-
-SharedLibrary('jsctypes-test')
-
-LOCAL_INCLUDES += [
- '/js/src/ctypes',
-]
-
-# Don't use STL wrappers here (i.e. wrapped <new>); they require mozalloc.
-DISABLE_STL_WRAPPING = True
-
-if CONFIG['COMPILE_ENVIRONMENT']:
- shared_library = '!%sjsctypes-test%s' % (CONFIG['DLL_PREFIX'], CONFIG['DLL_SUFFIX'])
- TEST_HARNESS_FILES.xpcshell.toolkit.components.ctypes.tests.unit += [shared_library]
- TEST_HARNESS_FILES.testing.mochitest.chrome.toolkit.components.ctypes.tests.chrome += [shared_library]
diff --git a/toolkit/components/ctypes/tests/unit/.eslintrc.js b/toolkit/components/ctypes/tests/unit/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/ctypes/tests/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/ctypes/tests/unit/head.js b/toolkit/components/ctypes/tests/unit/head.js
deleted file mode 100644
index e95b949b6e..0000000000
--- a/toolkit/components/ctypes/tests/unit/head.js
+++ /dev/null
@@ -1,128 +0,0 @@
-try {
- // We might be running without privileges, in which case it's up to the
- // harness to give us the 'ctypes' object.
- Components.utils.import("resource://gre/modules/ctypes.jsm");
-} catch (e) {
-}
-
-function open_ctypes_test_lib()
-{
- return ctypes.open(do_get_file(ctypes.libraryName("jsctypes-test")).path);
-}
-
-/**
- * A weak set of CDataFinalizer values that need to be cleaned up before
- * proceeding to the next test.
- */
-function ResourceCleaner() {
- this._map = new WeakMap();
-}
-ResourceCleaner.prototype = {
- add: function ResourceCleaner_add(v) {
- this._map.set(v);
- return v;
- },
- cleanup: function ResourceCleaner_cleanup() {
- let keys = ThreadSafeChromeUtils.nondeterministicGetWeakMapKeys(this._map);
- keys.forEach((function cleaner(k) {
- try {
- k.dispose();
- } catch (x) {
- // This can fail if |forget|/|dispose| has been called manually
- // during the test. This is normal.
- }
- this._map.delete(k);
- }).bind(this));
- }
-};
-
-/**
- * Simple wrapper for tests that require cleanup.
- */
-function ResourceTester(start, stop) {
- this._start = start;
- this._stop = stop;
-}
-ResourceTester.prototype = {
- launch: function(size, test, args) {
- trigger_gc();
- let cleaner = new ResourceCleaner();
- this._start(size);
- try {
- test(size, args, cleaner);
- } catch (x) {
- cleaner.cleanup();
- this._stop();
- throw x;
- }
- trigger_gc();
- cleaner.cleanup();
- this._stop();
- }
-};
-
-function structural_check_eq(a, b) {
- // 1. If objects can be "toSource()-ed", use this.
-
- let result;
- let finished = false;
- let asource, bsource;
- try {
- asource = a.toSource();
- bsource = b.toSource();
- finished = true;
- } catch (x) {
- }
- if (finished) {
- do_check_eq(asource, bsource);
- return;
- }
-
- // 2. Otherwise, perform slower comparison
-
- try {
- structural_check_eq_aux(a, b);
- result = true;
- } catch (x) {
- dump(x);
- result = false;
- }
- do_check_true(result);
-}
-function structural_check_eq_aux(a, b) {
- let ak;
- try {
- ak = Object.keys(a);
- } catch (x) {
- if (a != b) {
- throw new Error("Distinct values "+a, b);
- }
- return;
- }
- ak.forEach(
- function(k) {
- let av = a[k];
- let bv = b[k];
- structural_check_eq_aux(av, bv);
- }
- );
-}
-
-function trigger_gc() {
- dump("Triggering garbage-collection");
- Components.utils.forceGC();
-}
-
-function must_throw(f) {
- let has_thrown = false;
- try {
- f();
- } catch (x) {
- has_thrown = true;
- }
- do_check_true(has_thrown);
-}
-
-function get_os() {
- return Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime).OS;
-}
diff --git a/toolkit/components/ctypes/tests/unit/test_errno.js b/toolkit/components/ctypes/tests/unit/test_errno.js
deleted file mode 100644
index 6bf6b4b057..0000000000
--- a/toolkit/components/ctypes/tests/unit/test_errno.js
+++ /dev/null
@@ -1,69 +0,0 @@
-Components.utils.import("resource://gre/modules/ctypes.jsm");
-
-// Scope used to relaunch the tests with |ctypes| opened in a limited scope.
-var scope = {};
-var ctypes = ctypes;
-
-function run_test()
-{
- // Launch the test with regular loading of ctypes.jsm
- main_test();
-
- // Relaunch the test with exotic loading of ctypes.jsm
- Components.utils.unload("resource://gre/modules/ctypes.jsm");
- Components.utils.import("resource://gre/modules/ctypes.jsm", scope);
- ctypes = scope.ctypes;
- main_test();
-}
-
-function main_test()
-{
- "use strict";
- let library = open_ctypes_test_lib();
- let set_errno = library.declare("set_errno", ctypes.default_abi,
- ctypes.void_t,
- ctypes.int);
- let get_errno = library.declare("get_errno", ctypes.default_abi,
- ctypes.int);
-
- for (let i = 50; i >= 0; --i) {
- set_errno(i);
- let status = ctypes.errno;
- do_check_eq(status, i);
-
- status = get_errno();
- do_check_eq(status, 0);
-
- status = ctypes.errno;
- do_check_eq(status, 0);
- }
-
- let set_last_error, get_last_error;
- try { // The following test is Windows-specific
- set_last_error = library.declare("set_last_error", ctypes.default_abi,
- ctypes.void_t,
- ctypes.int);
- get_last_error = library.declare("get_last_error", ctypes.default_abi,
- ctypes.int);
-
- } catch (x) {
- do_check_eq(ctypes.winLastError, undefined);
- }
-
- if (set_last_error) {
- do_check_neq(ctypes.winLastError, undefined);
- for (let i = 0; i < 50; ++i) {
- set_last_error(i);
- let status = ctypes.winLastError;
- do_check_eq(status, i);
-
- status = get_last_error();
- do_check_eq(status, 0);
-
- status = ctypes.winLastError;
- do_check_eq(status, 0);
- }
- }
-
- library.close();
-}
diff --git a/toolkit/components/ctypes/tests/unit/test_finalizer.js b/toolkit/components/ctypes/tests/unit/test_finalizer.js
deleted file mode 100644
index adfb4c4b45..0000000000
--- a/toolkit/components/ctypes/tests/unit/test_finalizer.js
+++ /dev/null
@@ -1,452 +0,0 @@
-var TEST_SIZE = 100;
-
-function run_test()
-{
- let library = open_ctypes_test_lib();
-
- let start = library.declare("test_finalizer_start", ctypes.default_abi,
- ctypes.void_t,
- ctypes.size_t);
- let stop = library.declare("test_finalizer_stop", ctypes.default_abi,
- ctypes.void_t);
- let status = library.declare("test_finalizer_resource_is_acquired",
- ctypes.default_abi,
- ctypes.bool,
- ctypes.size_t);
- let released = function released(value, witness) {
- return witness == undefined;
- };
-
- let samples = [];
- samples.push(
- {
- name: "size_t",
- acquire: library.declare("test_finalizer_acq_size_t",
- ctypes.default_abi,
- ctypes.size_t,
- ctypes.size_t),
- release: library.declare("test_finalizer_rel_size_t",
- ctypes.default_abi,
- ctypes.void_t,
- ctypes.size_t),
- compare: library.declare("test_finalizer_cmp_size_t",
- ctypes.default_abi,
- ctypes.bool,
- ctypes.size_t,
- ctypes.size_t),
- status: status,
- released: released
- });
- samples.push(
- {
- name: "size_t",
- acquire: library.declare("test_finalizer_acq_size_t",
- ctypes.default_abi,
- ctypes.size_t,
- ctypes.size_t),
- release: library.declare("test_finalizer_rel_size_t_set_errno",
- ctypes.default_abi,
- ctypes.void_t,
- ctypes.size_t),
- compare: library.declare("test_finalizer_cmp_size_t",
- ctypes.default_abi,
- ctypes.bool,
- ctypes.size_t,
- ctypes.size_t),
- status: status,
- released: released
- });
- samples.push(
- {
- name: "int32_t",
- acquire: library.declare("test_finalizer_acq_int32_t",
- ctypes.default_abi,
- ctypes.int32_t,
- ctypes.size_t),
- release: library.declare("test_finalizer_rel_int32_t",
- ctypes.default_abi,
- ctypes.void_t,
- ctypes.int32_t),
- compare: library.declare("test_finalizer_cmp_int32_t",
- ctypes.default_abi,
- ctypes.bool,
- ctypes.int32_t,
- ctypes.int32_t),
- status: status,
- released: released
- }
- );
- samples.push(
- {
- name: "int64_t",
- acquire: library.declare("test_finalizer_acq_int64_t",
- ctypes.default_abi,
- ctypes.int64_t,
- ctypes.size_t),
- release: library.declare("test_finalizer_rel_int64_t",
- ctypes.default_abi,
- ctypes.void_t,
- ctypes.int64_t),
- compare: library.declare("test_finalizer_cmp_int64_t",
- ctypes.default_abi,
- ctypes.bool,
- ctypes.int64_t,
- ctypes.int64_t),
- status: status,
- released: released
- }
- );
- samples.push(
- {
- name: "ptr",
- acquire: library.declare("test_finalizer_acq_ptr_t",
- ctypes.default_abi,
- ctypes.PointerType(ctypes.void_t),
- ctypes.size_t),
- release: library.declare("test_finalizer_rel_ptr_t",
- ctypes.default_abi,
- ctypes.void_t,
- ctypes.PointerType(ctypes.void_t)),
- compare: library.declare("test_finalizer_cmp_ptr_t",
- ctypes.default_abi,
- ctypes.bool,
- ctypes.void_t.ptr,
- ctypes.void_t.ptr),
- status: status,
- released: released
- }
- );
- samples.push(
- {
- name: "string",
- acquire: library.declare("test_finalizer_acq_string_t",
- ctypes.default_abi,
- ctypes.char.ptr,
- ctypes.int),
- release: library.declare("test_finalizer_rel_string_t",
- ctypes.default_abi,
- ctypes.void_t,
- ctypes.char.ptr),
- compare: library.declare("test_finalizer_cmp_string_t",
- ctypes.default_abi,
- ctypes.bool,
- ctypes.char.ptr,
- ctypes.char.ptr),
- status: status,
- released: released
- }
- );
- const rect_t = new ctypes.StructType("myRECT",
- [{ top : ctypes.int32_t },
- { left : ctypes.int32_t },
- { bottom: ctypes.int32_t },
- { right : ctypes.int32_t }]);
- samples.push(
- {
- name: "struct",
- acquire: library.declare("test_finalizer_acq_struct_t",
- ctypes.default_abi,
- rect_t,
- ctypes.int),
- release: library.declare("test_finalizer_rel_struct_t",
- ctypes.default_abi,
- ctypes.void_t,
- rect_t),
- compare: library.declare("test_finalizer_cmp_struct_t",
- ctypes.default_abi,
- ctypes.bool,
- rect_t,
- rect_t),
- status: status,
- released: released
- }
- );
- samples.push(
- {
- name: "size_t, release returns size_t",
- acquire: library.declare("test_finalizer_acq_size_t",
- ctypes.default_abi,
- ctypes.size_t,
- ctypes.size_t),
- release: library.declare("test_finalizer_rel_size_t_return_size_t",
- ctypes.default_abi,
- ctypes.size_t,
- ctypes.size_t),
- compare: library.declare("test_finalizer_cmp_size_t",
- ctypes.default_abi,
- ctypes.bool,
- ctypes.size_t,
- ctypes.size_t),
- status: status,
- released: function released_eq(i, witness) {
- return i == witness;
- }
- }
- );
- samples.push(
- {
- name: "size_t, release returns myRECT",
- acquire: library.declare("test_finalizer_acq_size_t",
- ctypes.default_abi,
- ctypes.size_t,
- ctypes.size_t),
- release: library.declare("test_finalizer_rel_size_t_return_struct_t",
- ctypes.default_abi,
- rect_t,
- ctypes.size_t),
- compare: library.declare("test_finalizer_cmp_size_t",
- ctypes.default_abi,
- ctypes.bool,
- ctypes.size_t,
- ctypes.size_t),
- status: status,
- released: function released_rect_eq(i, witness) {
- return witness.top == i
- && witness.bottom == i
- && witness.left == i
- && witness.right == i;
- }
- }
- );
- samples.push(
- {
- name: "using null",
- acquire: library.declare("test_finalizer_acq_null_t",
- ctypes.default_abi,
- ctypes.PointerType(ctypes.void_t),
- ctypes.size_t),
- release: library.declare("test_finalizer_rel_null_t",
- ctypes.default_abi,
- ctypes.void_t,
- ctypes.PointerType(ctypes.void_t)),
- status: library.declare("test_finalizer_null_resource_is_acquired",
- ctypes.default_abi,
- ctypes.bool,
- ctypes.size_t),
- compare: library.declare("test_finalizer_cmp_null_t",
- ctypes.default_abi,
- ctypes.bool,
- ctypes.void_t.ptr,
- ctypes.void_t.ptr),
- released: released
- }
- );
-
- let tester = new ResourceTester(start, stop);
- samples.forEach(
- function run_sample(sample) {
- dump("Executing finalization test for data " + sample.name + "\n");
- tester.launch(TEST_SIZE, test_executing_finalizers, sample);
- tester.launch(TEST_SIZE, test_do_not_execute_finalizers_on_referenced_stuff, sample);
- tester.launch(TEST_SIZE, test_executing_dispose, sample);
- tester.launch(TEST_SIZE, test_executing_forget, sample);
- tester.launch(TEST_SIZE, test_result_dispose, sample);
- dump("Successfully completed finalization test for data " + sample.name + "\n");
- }
- );
-
- /*
- * Following test deactivated: Cycle collection never takes place
- * (see bug 727371)
- tester.launch(TEST_SIZE, test_cycles, samples[0]);
- */
- dump("Successfully completed all finalization tests\n");
- library.close();
-}
-
-// If only I could have Promises to test this :)
-// There is only so much we can do at this stage,
-// if we want to avoid tests overlapping.
-function test_cycles(size, tc) {
- // Now, restart this with unreferenced cycles
- for (i = 0; i < size/2; ++i) {
- let a = {
- a: ctypes.CDataFinalizer(tc.acquire(i*2), tc.release),
- b: {
- b: ctypes.CDataFinalizer(tc.acquire(i*2+1), tc.release)
- }
- };
- a.b.a = a;
- }
- do_test_pending();
-
- Components.utils.schedulePreciseGC(
- function after_gc() {
- // Check that _something_ has been finalized
- do_check_true(count_finalized(size, tc) > 0);
- do_test_finished();
- }
- );
-
- do_timeout(10000, do_throw);
-}
-
-
-function count_finalized(size, tc) {
- let finalizedItems = 0;
- for (let i = 0; i < size; ++i) {
- if (!tc.status(i)) {
- ++finalizedItems;
- }
- }
- return finalizedItems;
-}
-
-/**
- * Test:
- * - that (some) finalizers are executed;
- * - that no finalizer is executed twice (this is done on the C side).
- */
-function test_executing_finalizers(size, tc, cleanup)
-{
- dump("test_executing_finalizers " + tc.name + "\n");
- // Allocate |size| items without references
- for (let i = 0; i < size; ++i) {
- cleanup.add(ctypes.CDataFinalizer(tc.acquire(i), tc.release));
- }
- trigger_gc(); // This should trigger some finalizations, hopefully all
-
- // Check that _something_ has been finalized
- do_check_true(count_finalized(size, tc) > 0);
-}
-
-/**
- * Check that
- * - |dispose| returns the proper result
- */
-function test_result_dispose(size, tc, cleanup) {
- dump("test_result_dispose " + tc.name + "\n");
- let ref = [];
- // Allocate |size| items with references
- for (let i = 0; i < size; ++i) {
- let value = ctypes.CDataFinalizer(tc.acquire(i), tc.release);
- cleanup.add(value);
- ref.push(value);
- }
- do_check_eq(count_finalized(size, tc), 0);
-
- for (i = 0; i < size; ++i) {
- let witness = ref[i].dispose();
- ref[i] = null;
- if (!tc.released(i, witness)) {
- do_print("test_result_dispose failure at index "+i);
- do_check_true(false);
- }
- }
-
- do_check_eq(count_finalized(size, tc), size);
-}
-
-
-/**
- * Check that
- * - |dispose| is executed properly
- * - finalizers are not executed after |dispose|
- */
-function test_executing_dispose(size, tc, cleanup)
-{
- dump("test_executing_dispose " + tc.name + "\n");
- let ref = [];
- // Allocate |size| items with references
- for (let i = 0; i < size; ++i) {
- let value = ctypes.CDataFinalizer(tc.acquire(i), tc.release);
- cleanup.add(value);
- ref.push(value);
- }
- do_check_eq(count_finalized(size, tc), 0);
-
- // Dispose of everything and make sure that everything has been cleaned up
- ref.forEach(
- function dispose(v) {
- v.dispose();
- }
- );
- do_check_eq(count_finalized(size, tc), size);
-
- // Remove references
- ref = [];
-
- // Re-acquire data and make sure that everything has been reinialized
- for (i = 0; i < size; ++i) {
- tc.acquire(i);
- }
-
- do_check_eq(count_finalized(size, tc), 0);
-
-
- // Attempt to trigger finalizations, ensure that they do not take place
- trigger_gc();
-
- do_check_eq(count_finalized(size, tc), 0);
-}
-
-
-/**
- * Check that
- * - |forget| does not dispose
- * - |forget| has the right content
- * - finalizers are not executed after |forget|
- */
-function test_executing_forget(size, tc, cleanup)
-{
- dump("test_executing_forget " + tc.name + "\n");
- let ref = [];
- // Allocate |size| items with references
- for (let i = 0; i < size; ++i) {
- let original = tc.acquire(i);
- let finalizer = ctypes.CDataFinalizer(original, tc.release);
- ref.push(
- {
- original: original,
- finalizer: finalizer
- }
- );
- cleanup.add(finalizer);
- do_check_true(tc.compare(original, finalizer));
- }
- do_check_eq(count_finalized(size, tc), 0);
-
- // Forget everything, making sure that we recover the original info
- ref.forEach(
- function compare_original_to_recovered(v) {
- let original = v.original;
- let recovered = v.finalizer.forget();
- // Note: Cannot use do_check_eq on Uint64 et al.
- do_check_true(tc.compare(original, recovered));
- do_check_eq(original.constructor, recovered.constructor);
- }
- );
-
- // Also make sure that we have not performed any clean up
- do_check_eq(count_finalized(size, tc), 0);
-
- // Remove references
- ref = [];
-
- // Attempt to trigger finalizations, ensure that they have no effect
- trigger_gc();
-
- do_check_eq(count_finalized(size, tc), 0);
-}
-
-
-/**
- * Check that finalizers are not executed
- */
-function test_do_not_execute_finalizers_on_referenced_stuff(size, tc, cleanup)
-{
- dump("test_do_not_execute_finalizers_on_referenced_stuff " + tc.name + "\n");
-
- let ref = [];
- // Allocate |size| items without references
- for (let i = 0; i < size; ++i) {
- let value = ctypes.CDataFinalizer(tc.acquire(i), tc.release);
- cleanup.add(value);
- ref.push(value);
- }
- trigger_gc(); // This might trigger some finalizations, but it should not
-
- // Check that _nothing_ has been finalized
- do_check_eq(count_finalized(size, tc), 0);
-}
-
diff --git a/toolkit/components/ctypes/tests/unit/test_finalizer_shouldaccept.js b/toolkit/components/ctypes/tests/unit/test_finalizer_shouldaccept.js
deleted file mode 100644
index f683008e46..0000000000
--- a/toolkit/components/ctypes/tests/unit/test_finalizer_shouldaccept.js
+++ /dev/null
@@ -1,174 +0,0 @@
-try {
- // We might be running without privileges, in which case it's up to the
- // harness to give us the 'ctypes' object.
- Components.utils.import("resource://gre/modules/ctypes.jsm");
-} catch (e) {
-}
-
-var acquire, dispose, reset_errno, dispose_errno,
- acquire_ptr, dispose_ptr,
- acquire_void_ptr, dispose_void_ptr,
- acquire_string, dispose_string;
-
-function run_test()
-{
- let library = open_ctypes_test_lib();
-
- let start = library.declare("test_finalizer_start", ctypes.default_abi,
- ctypes.void_t,
- ctypes.size_t);
- let stop = library.declare("test_finalizer_stop", ctypes.default_abi,
- ctypes.void_t);
- let tester = new ResourceTester(start, stop);
- acquire = library.declare("test_finalizer_acq_size_t",
- ctypes.default_abi,
- ctypes.size_t,
- ctypes.size_t);
- dispose = library.declare("test_finalizer_rel_size_t",
- ctypes.default_abi,
- ctypes.void_t,
- ctypes.size_t);
- reset_errno = library.declare("reset_errno",
- ctypes.default_abi,
- ctypes.void_t);
- dispose_errno = library.declare("test_finalizer_rel_size_t_set_errno",
- ctypes.default_abi,
- ctypes.void_t,
- ctypes.size_t);
- acquire_ptr = library.declare("test_finalizer_acq_int32_ptr_t",
- ctypes.default_abi,
- ctypes.int32_t.ptr,
- ctypes.size_t);
- dispose_ptr = library.declare("test_finalizer_rel_int32_ptr_t",
- ctypes.default_abi,
- ctypes.void_t,
- ctypes.int32_t.ptr);
- acquire_string = library.declare("test_finalizer_acq_string_t",
- ctypes.default_abi,
- ctypes.char.ptr,
- ctypes.size_t);
- dispose_string = library.declare("test_finalizer_rel_string_t",
- ctypes.default_abi,
- ctypes.void_t,
- ctypes.char.ptr);
-
- tester.launch(10, test_to_string);
- tester.launch(10, test_to_source);
- tester.launch(10, test_to_int);
- tester.launch(10, test_errno);
- tester.launch(10, test_to_pointer);
- tester.launch(10, test_readstring);
-}
-
-/**
- * Check that toString succeeds before/after forget/dispose.
- */
-function test_to_string()
-{
- do_print("Starting test_to_string");
- let a = ctypes.CDataFinalizer(acquire(0), dispose);
- do_check_eq(a.toString(), "0");
-
- a.forget();
- do_check_eq(a.toString(), "[CDataFinalizer - empty]");
-
- a = ctypes.CDataFinalizer(acquire(0), dispose);
- a.dispose();
- do_check_eq(a.toString(), "[CDataFinalizer - empty]");
-}
-
-/**
- * Check that toSource succeeds before/after forget/dispose.
- */
-function test_to_source()
-{
- do_print("Starting test_to_source");
- let value = acquire(0);
- let a = ctypes.CDataFinalizer(value, dispose);
- do_check_eq(a.toSource(),
- "ctypes.CDataFinalizer("
- + ctypes.size_t(value).toSource()
- +", "
- +dispose.toSource()
- +")");
- value = null;
-
- a.forget();
- do_check_eq(a.toSource(), "ctypes.CDataFinalizer()");
-
- a = ctypes.CDataFinalizer(acquire(0), dispose);
- a.dispose();
- do_check_eq(a.toSource(), "ctypes.CDataFinalizer()");
-}
-
-/**
- * Test conversion to int32
- */
-function test_to_int()
-{
- let value = 2;
- let wrapped, converted, finalizable;
- wrapped = ctypes.int32_t(value);
- finalizable = ctypes.CDataFinalizer(acquire(value), dispose);
- converted = ctypes.int32_t(finalizable);
-
- structural_check_eq(converted, wrapped);
- structural_check_eq(converted, ctypes.int32_t(finalizable.forget()));
-
- finalizable = ctypes.CDataFinalizer(acquire(value), dispose);
- wrapped = ctypes.int64_t(value);
- converted = ctypes.int64_t(finalizable);
- structural_check_eq(converted, wrapped);
- finalizable.dispose();
-}
-
-/**
- * Test that dispose can change errno but finalization cannot
- */
-function test_errno(size, tc, cleanup)
-{
- reset_errno();
- do_check_eq(ctypes.errno, 0);
-
- let finalizable = ctypes.CDataFinalizer(acquire(3), dispose_errno);
- finalizable.dispose();
- do_check_eq(ctypes.errno, 10);
- reset_errno();
-
- do_check_eq(ctypes.errno, 0);
- for (let i = 0; i < size; ++i) {
- finalizable = ctypes.CDataFinalizer(acquire(i), dispose_errno);
- cleanup.add(finalizable);
- }
-
- trigger_gc();
- do_check_eq(ctypes.errno, 0);
-}
-
-/**
- * Check that a finalizable of a pointer can be used as a pointer
- */
-function test_to_pointer()
-{
- let ptr = ctypes.int32_t(2).address();
- let finalizable = ctypes.CDataFinalizer(ptr, dispose_ptr);
- let unwrapped = ctypes.int32_t.ptr(finalizable);
-
- do_check_eq(""+ptr, ""+unwrapped);
-
- finalizable.forget(); // Do not dispose: This is not a real pointer.
-}
-
-/**
- * Test that readstring can be applied to a finalizer
- */
-function test_readstring(size)
-{
- for (let i = 0; i < size; ++i) {
- let acquired = acquire_string(i);
- let finalizable = ctypes.CDataFinalizer(acquired,
- dispose_string);
- do_check_eq(finalizable.readString(), acquired.readString());
- finalizable.dispose();
- }
-}
diff --git a/toolkit/components/ctypes/tests/unit/test_finalizer_shouldfail.js b/toolkit/components/ctypes/tests/unit/test_finalizer_shouldfail.js
deleted file mode 100644
index ffbe1b613a..0000000000
--- a/toolkit/components/ctypes/tests/unit/test_finalizer_shouldfail.js
+++ /dev/null
@@ -1,176 +0,0 @@
-try {
- // We might be running without privileges, in which case it's up to the
- // harness to give us the 'ctypes' object.
- Components.utils.import("resource://gre/modules/ctypes.jsm");
-} catch (e) {
-}
-
-var acquire, dispose, null_dispose, compare, dispose_64;
-
-function run_test()
-{
- let library = open_ctypes_test_lib();
-
- let start = library.declare("test_finalizer_start", ctypes.default_abi,
- ctypes.void_t,
- ctypes.size_t);
- let stop = library.declare("test_finalizer_stop", ctypes.default_abi,
- ctypes.void_t);
- let tester = new ResourceTester(start, stop);
- acquire = library.declare("test_finalizer_acq_size_t",
- ctypes.default_abi,
- ctypes.size_t,
- ctypes.size_t);
- dispose = library.declare("test_finalizer_rel_size_t",
- ctypes.default_abi,
- ctypes.void_t,
- ctypes.size_t);
- compare = library.declare("test_finalizer_cmp_size_t",
- ctypes.default_abi,
- ctypes.bool,
- ctypes.size_t,
- ctypes.size_t);
-
- dispose_64 = library.declare("test_finalizer_rel_int64_t",
- ctypes.default_abi,
- ctypes.void_t,
- ctypes.int64_t);
-
- let type_afun = ctypes.FunctionType(ctypes.default_abi,
- ctypes.void_t,
- [ctypes.size_t]).ptr;
-
- let null_dispose_maker =
- library.declare("test_finalizer_rel_null_function",
- ctypes.default_abi,
- type_afun
- );
- null_dispose = null_dispose_maker();
-
- tester.launch(10, test_double_dispose);
- tester.launch(10, test_finalize_bad_construction);
- tester.launch(10, test_null_dispose);
- tester.launch(10, test_pass_disposed);
- tester.launch(10, test_wrong_type);
-}
-
-
-/**
- * Testing construction of finalizers with wrong arguments.
- */
-function test_finalize_bad_construction() {
- // First argument does not match second
- must_throw(function() { ctypes.CDataFinalizer({}, dispose); });
- must_throw(function() { ctypes.CDataFinalizer(dispose, dispose); });
-
- // Not enough arguments
- must_throw(function() { ctypes.CDataFinalizer(init(0)); });
-
- // Too many arguments
- must_throw(function() { ctypes.CDataFinalizer(init(0), dispose, dispose); });
-
- // Second argument is null
- must_throw(function() { ctypes.CDataFinalizer(init(0), null); });
-
- // Second argument is undefined
- must_throw(function() {
- let a;
- ctypes.CDataFinalizer(init(0), a);
- });
-
-}
-
-/**
- * Test that forget/dispose can only take place once.
- */
-function test_double_dispose() {
- function test_one_combination(i, a, b) {
- let v = ctypes.CDataFinalizer(acquire(i), dispose);
- a(v);
- must_throw(function() { b(v); } );
- }
-
- let call_dispose = function(v) {
- v.dispose();
- };
- let call_forget = function(v) {
- v.forget();
- };
-
- test_one_combination(0, call_dispose, call_dispose);
- test_one_combination(1, call_dispose, call_forget);
- test_one_combination(2, call_forget, call_dispose);
- test_one_combination(3, call_forget, call_forget);
-}
-
-
-/**
- * Test that nothing (too) bad happens when the finalizer is NULL
- */
-function test_null_dispose()
-{
- let exception;
-
- exception = false;
- try {
- ctypes.CDataFinalizer(acquire(0), null_dispose);
- } catch (x) {
- exception = true;
- }
- do_check_true(exception);
-}
-
-/**
- * Test that conversion of a disposed/forgotten CDataFinalizer to a C
- * value fails nicely.
- */
-function test_pass_disposed()
-{
- let exception, v;
-
- exception = false;
- v = ctypes.CDataFinalizer(acquire(0), dispose);
- do_check_true(compare(v, 0));
- v.forget();
-
- try {
- compare(v, 0);
- } catch (x) {
- exception = true;
- }
- do_check_true(exception);
-
- exception = false;
- v = ctypes.CDataFinalizer(acquire(0), dispose);
- do_check_true(compare(v, 0));
- v.dispose();
-
- try {
- compare(v, 0);
- } catch (x) {
- exception = true;
- }
- do_check_true(exception);
-
- exception = false;
- try {
- ctypes.int32_t(ctypes.CDataFinalizer(v, dispose));
- } catch (x) {
- exception = true;
- }
- do_check_true(exception);
-}
-
-function test_wrong_type()
-{
- let int32_v = ctypes.int32_t(99);
- let exception;
- try {
- ctypes.CDataFinalizer(int32_v, dispose_64);
- } catch (x) {
- exception = x;
- }
-
- do_check_true(!!exception);
- do_check_eq(exception.constructor.name, "TypeError");
-}
diff --git a/toolkit/components/ctypes/tests/unit/test_jsctypes.js b/toolkit/components/ctypes/tests/unit/test_jsctypes.js
deleted file mode 100644
index ec35ee18e8..0000000000
--- a/toolkit/components/ctypes/tests/unit/test_jsctypes.js
+++ /dev/null
@@ -1,2808 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-try {
- // We might be running without privileges, in which case it's up to the
- // harness to give us the 'ctypes' object.
- Components.utils.import("resource://gre/modules/ctypes.jsm");
-} catch (e) {
-}
-
-CTYPES_TEST_LIB = ctypes.libraryName("jsctypes-test");
-CTYPES_UNICODE_LIB = ctypes.libraryName("jsctyp\u00E8s-t\u00EB\u00DFt");
-
-function do_check_throws(f, type, stack)
-{
- if (!stack) {
- try {
- // We might not have a 'Components' object.
- stack = Components.stack.caller;
- } catch (e) {
- }
- }
-
- try {
- f();
- } catch (exc) {
- if (exc.constructor.name === type.name) {
- do_check_true(true);
- return;
- }
- do_throw("expected " + type.name + " exception, caught " + exc, stack);
- }
- do_throw("expected " + type.name + " exception, none thrown", stack);
-}
-
-function run_test()
-{
- // Test ctypes.CType and ctypes.CData are set up correctly.
- run_abstract_class_tests();
-
- // open the library
- let libfile = do_get_file(CTYPES_TEST_LIB);
- let library = ctypes.open(libfile.path);
-
- // Make sure we can call a function in the library.
- run_void_tests(library);
-
- // Test Int64 and UInt64.
- run_Int64_tests();
- run_UInt64_tests();
-
- // Test the basic bool, integer, and float types.
- run_bool_tests(library);
-
- run_integer_tests(library, ctypes.int8_t, "int8_t", 1, true, [-0x80, 0x7f]);
- run_integer_tests(library, ctypes.int16_t, "int16_t", 2, true, [-0x8000, 0x7fff]);
- run_integer_tests(library, ctypes.int32_t, "int32_t", 4, true, [-0x80000000, 0x7fffffff]);
- run_integer_tests(library, ctypes.uint8_t, "uint8_t", 1, false, [0, 0xff]);
- run_integer_tests(library, ctypes.uint16_t, "uint16_t", 2, false, [0, 0xffff]);
- run_integer_tests(library, ctypes.uint32_t, "uint32_t", 4, false, [0, 0xffffffff]);
- run_integer_tests(library, ctypes.short, "short", 2, true, [-0x8000, 0x7fff]);
- run_integer_tests(library, ctypes.unsigned_short, "unsigned_short", 2, false, [0, 0xffff]);
- run_integer_tests(library, ctypes.int, "int", 4, true, [-0x80000000, 0x7fffffff]);
- run_integer_tests(library, ctypes.unsigned_int, "unsigned_int", 4, false, [0, 0xffffffff]);
- run_integer_tests(library, ctypes.unsigned, "unsigned_int", 4, false, [0, 0xffffffff]);
-
- run_float_tests(library, ctypes.float32_t, "float32_t", 4);
- run_float_tests(library, ctypes.float64_t, "float64_t", 8);
- run_float_tests(library, ctypes.float, "float", 4);
- run_float_tests(library, ctypes.double, "double", 8);
-
- // Test the wrapped integer types.
- s64limits = ["-9223372036854775808", "9223372036854775807",
- "-9223372036854775809", "9223372036854775808"];
- u64limits = ["0", "18446744073709551615", "-1", "18446744073709551616"];
-
- run_wrapped_integer_tests(library, ctypes.int64_t, "int64_t", 8, true,
- ctypes.Int64, "ctypes.Int64", s64limits);
- run_wrapped_integer_tests(library, ctypes.uint64_t, "uint64_t", 8, false,
- ctypes.UInt64, "ctypes.UInt64", u64limits);
- run_wrapped_integer_tests(library, ctypes.long_long, "long_long", 8, true,
- ctypes.Int64, "ctypes.Int64", s64limits);
- run_wrapped_integer_tests(library, ctypes.unsigned_long_long, "unsigned_long_long", 8, false,
- ctypes.UInt64, "ctypes.UInt64", u64limits);
-
- s32limits = [-0x80000000, 0x7fffffff, -0x80000001, 0x80000000];
- u32limits = [0, 0xffffffff, -1, 0x100000000];
-
- let slimits, ulimits;
- if (ctypes.long.size == 8) {
- slimits = s64limits;
- ulimits = u64limits;
- } else if (ctypes.long.size == 4) {
- slimits = s32limits;
- ulimits = u32limits;
- } else {
- do_throw("ctypes.long is not 4 or 8 bytes");
- }
-
- run_wrapped_integer_tests(library, ctypes.long, "long", ctypes.long.size, true,
- ctypes.Int64, "ctypes.Int64", slimits);
- run_wrapped_integer_tests(library, ctypes.unsigned_long, "unsigned_long", ctypes.long.size, false,
- ctypes.UInt64, "ctypes.UInt64", ulimits);
-
- if (ctypes.size_t.size == 8) {
- slimits = s64limits;
- ulimits = u64limits;
- } else if (ctypes.size_t.size == 4) {
- slimits = s32limits;
- ulimits = u32limits;
- } else {
- do_throw("ctypes.size_t is not 4 or 8 bytes");
- }
-
- run_wrapped_integer_tests(library, ctypes.size_t, "size_t", ctypes.size_t.size, false,
- ctypes.UInt64, "ctypes.UInt64", ulimits);
- run_wrapped_integer_tests(library, ctypes.ssize_t, "ssize_t", ctypes.size_t.size, true,
- ctypes.Int64, "ctypes.Int64", slimits);
- run_wrapped_integer_tests(library, ctypes.uintptr_t, "uintptr_t", ctypes.size_t.size, false,
- ctypes.UInt64, "ctypes.UInt64", ulimits);
- run_wrapped_integer_tests(library, ctypes.intptr_t, "intptr_t", ctypes.size_t.size, true,
- ctypes.Int64, "ctypes.Int64", slimits);
-
- if (ctypes.off_t.size == 8) {
- slimits = s64limits;
- ulimits = u64limits;
- } else if (ctypes.off_t.size == 4) {
- slimits = s32limits;
- ulimits = u32limits;
- } else {
- do_throw("ctypes.off_t is not 4 or 8 bytes");
- }
- run_wrapped_integer_tests(library, ctypes.off_t, "off_t", ctypes.off_t.size, true,
- ctypes.Int64, "ctypes.Int64", slimits);
-
- // Test the character types.
- run_char_tests(library, ctypes.char, "char", 1, true, [-0x80, 0x7f]);
- run_char_tests(library, ctypes.signed_char, "signed_char", 1, true, [-0x80, 0x7f]);
- run_char_tests(library, ctypes.unsigned_char, "unsigned_char", 1, false, [0, 0xff]);
- run_char16_tests(library, ctypes.char16_t, "char16_t", [0, 0xffff]);
-
- // Test the special types.
- run_StructType_tests();
- run_PointerType_tests();
- run_FunctionType_tests();
- run_ArrayType_tests();
-
- // Check that types print properly.
- run_type_toString_tests();
-
- // Test the 'name' and 'toSource' of a long typename.
- let ptrTo_ptrTo_arrayOf4_ptrTo_int32s =
- new ctypes.PointerType(
- new ctypes.PointerType(
- new ctypes.ArrayType(
- new ctypes.PointerType(ctypes.int32_t), 4)));
- do_check_eq(ptrTo_ptrTo_arrayOf4_ptrTo_int32s.name, "int32_t*(**)[4]");
-
- let source_t = new ctypes.StructType("source",
- [{ a: ptrTo_ptrTo_arrayOf4_ptrTo_int32s }, { b: ctypes.int64_t }]);
- do_check_eq(source_t.toSource(),
- 'ctypes.StructType("source", [{ "a": ctypes.int32_t.ptr.array(4).ptr.ptr }, ' +
- '{ "b": ctypes.int64_t }])');
-
- // Test ctypes.cast.
- run_cast_tests();
-
- run_string_tests(library);
- run_readstring_tests(library);
- run_struct_tests(library);
- run_function_tests(library);
- run_closure_tests(library);
- run_variadic_tests(library);
- run_static_data_tests(library);
- run_cpp_class_tests(library);
-
- // test library.close
- let test_void_t = library.declare("test_void_t_cdecl", ctypes.default_abi, ctypes.void_t);
- library.close();
- do_check_throws(function() { test_void_t(); }, Error);
- do_check_throws(function() {
- library.declare("test_void_t_cdecl", ctypes.default_abi, ctypes.void_t);
- }, Error);
-
- // test that library functions throw when bound to other objects
- library = ctypes.open(libfile.path);
- let obj = {};
- obj.declare = library.declare;
- do_check_throws(function () { run_void_tests(obj); }, Error);
- obj.close = library.close;
- do_check_throws(function () { obj.close(); }, Error);
-
- // test that functions work as properties of other objects
- let getter = library.declare("get_int8_t_cdecl", ctypes.default_abi, ctypes.int8_t);
- do_check_eq(getter(), 109);
- obj.t = getter;
- do_check_eq(obj.t(), 109);
-
- // bug 521937
- do_check_throws(function () { let nolib = ctypes.open("notfoundlibrary.dll"); nolib.close(); }, Error);
-
- // bug 522360
- do_check_eq(run_load_system_library(), true);
-
- // Test loading a library with a unicode name (bug 589413). Note that nsIFile
- // implementations are not available in some harnesses; if not, the harness
- // should take care of the copy for us.
- let unicodefile = do_get_file(CTYPES_UNICODE_LIB, true);
- let copy = libfile.copyTo instanceof Function;
- if (copy)
- libfile.copyTo(null, unicodefile.leafName);
- library = ctypes.open(unicodefile.path);
- run_void_tests(library);
- library.close();
- if (copy)
- unicodefile.remove(false);
-}
-
-function run_abstract_class_tests()
-{
- // Test that ctypes.CType is an abstract constructor that throws.
- do_check_throws(function() { ctypes.CType(); }, TypeError);
- do_check_throws(function() { new ctypes.CType() }, TypeError);
-
- do_check_true(ctypes.CType.hasOwnProperty("prototype"));
- do_check_throws(function() { ctypes.CType.prototype(); }, TypeError);
- do_check_throws(function() { new ctypes.CType.prototype() }, TypeError);
-
- do_check_true(ctypes.CType.prototype.hasOwnProperty("constructor"));
- do_check_true(ctypes.CType.prototype.constructor === ctypes.CType);
-
- // Check that ctypes.CType.prototype has the correct properties and functions.
- do_check_true(ctypes.CType.prototype.hasOwnProperty("name"));
- do_check_true(ctypes.CType.prototype.hasOwnProperty("size"));
- do_check_true(ctypes.CType.prototype.hasOwnProperty("ptr"));
- do_check_true(ctypes.CType.prototype.hasOwnProperty("array"));
- do_check_true(ctypes.CType.prototype.hasOwnProperty("toString"));
- do_check_true(ctypes.CType.prototype.hasOwnProperty("toSource"));
-
- // Make sure we can access 'prototype' on a CTypeProto.
- do_check_true(ctypes.CType.prototype.prototype === ctypes.CData.prototype);
-
- // Check that the shared properties and functions on ctypes.CType.prototype throw.
- do_check_throws(function() { ctypes.CType.prototype.name; }, TypeError);
- do_check_throws(function() { ctypes.CType.prototype.size; }, TypeError);
- do_check_throws(function() { ctypes.CType.prototype.ptr; }, TypeError);
- do_check_throws(function() { ctypes.CType.prototype.array(); }, TypeError);
-
-
- // toString and toSource are called by the web console during inspection,
- // so we don't want them to throw.
- do_check_eq(typeof ctypes.CType.prototype.toString(), 'string');
- do_check_eq(typeof ctypes.CType.prototype.toSource(), 'string');
-
- // Test that ctypes.CData is an abstract constructor that throws.
- do_check_throws(function() { ctypes.CData(); }, TypeError);
- do_check_throws(function() { new ctypes.CData() }, TypeError);
-
- do_check_true(ctypes.CData.__proto__ === ctypes.CType.prototype);
- do_check_true(ctypes.CData instanceof ctypes.CType);
-
- do_check_true(ctypes.CData.hasOwnProperty("prototype"));
- do_check_true(ctypes.CData.prototype.hasOwnProperty("constructor"));
- do_check_true(ctypes.CData.prototype.constructor === ctypes.CData);
-
- // Check that ctypes.CData.prototype has the correct properties and functions.
- do_check_true(ctypes.CData.prototype.hasOwnProperty("value"));
- do_check_true(ctypes.CData.prototype.hasOwnProperty("address"));
- do_check_true(ctypes.CData.prototype.hasOwnProperty("readString"));
- do_check_true(ctypes.CData.prototype.hasOwnProperty("toString"));
- do_check_true(ctypes.CData.prototype.hasOwnProperty("toSource"));
-
- // Check that the shared properties and functions on ctypes.CData.prototype throw.
- do_check_throws(function() { ctypes.CData.prototype.value; }, TypeError);
- do_check_throws(function() { ctypes.CData.prototype.value = null; }, TypeError);
- do_check_throws(function() { ctypes.CData.prototype.address(); }, TypeError);
- do_check_throws(function() { ctypes.CData.prototype.readString(); }, TypeError);
-
- // toString and toSource are called by the web console during inspection,
- // so we don't want them to throw.
- do_check_eq(ctypes.CData.prototype.toString(), '[CData proto object]');
- do_check_eq(ctypes.CData.prototype.toSource(), '[CData proto object]');
-}
-
-function run_Int64_tests() {
- do_check_throws(function() { ctypes.Int64(); }, TypeError);
-
- do_check_true(ctypes.Int64.hasOwnProperty("prototype"));
- do_check_true(ctypes.Int64.prototype.hasOwnProperty("constructor"));
- do_check_true(ctypes.Int64.prototype.constructor === ctypes.Int64);
-
- // Check that ctypes.Int64 and ctypes.Int64.prototype have the correct
- // properties and functions.
- do_check_true(ctypes.Int64.hasOwnProperty("compare"));
- do_check_true(ctypes.Int64.hasOwnProperty("lo"));
- do_check_true(ctypes.Int64.hasOwnProperty("hi"));
- do_check_true(ctypes.Int64.hasOwnProperty("join"));
- do_check_true(ctypes.Int64.prototype.hasOwnProperty("toString"));
- do_check_true(ctypes.Int64.prototype.hasOwnProperty("toSource"));
-
- // Check that the shared functions on ctypes.Int64.prototype throw.
- do_check_throws(function() { ctypes.Int64.prototype.toString(); }, TypeError);
- do_check_throws(function() { ctypes.Int64.prototype.toSource(); }, TypeError);
-
- let int64 = ctypes.Int64(0);
- do_check_true(int64.__proto__ === ctypes.Int64.prototype);
- do_check_true(int64 instanceof ctypes.Int64);
-
- // Test Int64.toString([radix]).
- do_check_eq(int64.toString(), "0");
- for (let radix = 2; radix <= 36; ++radix)
- do_check_eq(int64.toString(radix), "0");
- do_check_throws(function() { int64.toString(0); }, RangeError);
- do_check_throws(function() { int64.toString(1); }, RangeError);
- do_check_throws(function() { int64.toString(37); }, RangeError);
- do_check_throws(function() { int64.toString(10, 2); }, TypeError);
-
- // Test Int64.toSource().
- do_check_eq(int64.toSource(), "ctypes.Int64(\"0\")");
- do_check_throws(function() { int64.toSource(10); }, TypeError);
-
- int64 = ctypes.Int64("0x28590a1c921def71");
- do_check_eq(int64.toString(), int64.toString(10));
- do_check_eq(int64.toString(10), "2907366152271163249");
- do_check_eq(int64.toString(16), "28590a1c921def71");
- do_check_eq(int64.toString(2), "10100001011001000010100001110010010010000111011110111101110001");
- do_check_eq(int64.toSource(), "ctypes.Int64(\"" + int64.toString(10) + "\")");
-
- int64 = ctypes.Int64("-0x28590a1c921def71");
- do_check_eq(int64.toString(), int64.toString(10));
- do_check_eq(int64.toString(10), "-2907366152271163249");
- do_check_eq(int64.toString(16), "-28590a1c921def71");
- do_check_eq(int64.toString(2), "-10100001011001000010100001110010010010000111011110111101110001");
- do_check_eq(int64.toSource(), "ctypes.Int64(\"" + int64.toString(10) + "\")");
-
- int64 = ctypes.Int64("-0X28590A1c921DEf71");
- do_check_eq(int64.toString(), int64.toString(10));
- do_check_eq(int64.toString(10), "-2907366152271163249");
- do_check_eq(int64.toString(16), "-28590a1c921def71");
- do_check_eq(int64.toString(2), "-10100001011001000010100001110010010010000111011110111101110001");
- do_check_eq(int64.toSource(), "ctypes.Int64(\"" + int64.toString(10) + "\")");
-
- // Test Int64(primitive double) constructor.
- int64 = ctypes.Int64(-0);
- do_check_eq(int64.toString(), "0");
-
- int64 = ctypes.Int64(0x7ffffffffffff000);
- do_check_eq(int64.toString(), int64.toString(10));
- do_check_eq(int64.toString(10), "9223372036854771712");
- do_check_eq(int64.toString(16), "7ffffffffffff000");
- do_check_eq(int64.toString(2), "111111111111111111111111111111111111111111111111111000000000000");
-
- int64 = ctypes.Int64(-0x8000000000000000);
- do_check_eq(int64.toString(), int64.toString(10));
- do_check_eq(int64.toString(10), "-9223372036854775808");
- do_check_eq(int64.toString(16), "-8000000000000000");
- do_check_eq(int64.toString(2), "-1000000000000000000000000000000000000000000000000000000000000000");
-
- // Test Int64(string) constructor.
- int64 = ctypes.Int64("0x7fffffffffffffff");
- do_check_eq(int64.toString(), int64.toString(10));
- do_check_eq(int64.toString(10), "9223372036854775807");
- do_check_eq(int64.toString(16), "7fffffffffffffff");
- do_check_eq(int64.toString(2), "111111111111111111111111111111111111111111111111111111111111111");
-
- int64 = ctypes.Int64("-0x8000000000000000");
- do_check_eq(int64.toString(), int64.toString(10));
- do_check_eq(int64.toString(10), "-9223372036854775808");
- do_check_eq(int64.toString(16), "-8000000000000000");
- do_check_eq(int64.toString(2), "-1000000000000000000000000000000000000000000000000000000000000000");
-
- int64 = ctypes.Int64("9223372036854775807");
- do_check_eq(int64.toString(), int64.toString(10));
- do_check_eq(int64.toString(10), "9223372036854775807");
- do_check_eq(int64.toString(16), "7fffffffffffffff");
- do_check_eq(int64.toString(2), "111111111111111111111111111111111111111111111111111111111111111");
-
- int64 = ctypes.Int64("-9223372036854775808");
- do_check_eq(int64.toString(), int64.toString(10));
- do_check_eq(int64.toString(10), "-9223372036854775808");
- do_check_eq(int64.toString(16), "-8000000000000000");
- do_check_eq(int64.toString(2), "-1000000000000000000000000000000000000000000000000000000000000000");
-
- // Test Int64(other Int64) constructor.
- int64 = ctypes.Int64(ctypes.Int64(0));
- do_check_eq(int64.toString(), "0");
-
- int64 = ctypes.Int64(ctypes.Int64("0x7fffffffffffffff"));
- do_check_eq(int64.toString(), int64.toString(10));
- do_check_eq(int64.toString(10), "9223372036854775807");
- do_check_eq(int64.toString(16), "7fffffffffffffff");
- do_check_eq(int64.toString(2), "111111111111111111111111111111111111111111111111111111111111111");
-
- int64 = ctypes.Int64(ctypes.Int64("-0x8000000000000000"));
- do_check_eq(int64.toString(), int64.toString(10));
- do_check_eq(int64.toString(10), "-9223372036854775808");
- do_check_eq(int64.toString(16), "-8000000000000000");
- do_check_eq(int64.toString(2), "-1000000000000000000000000000000000000000000000000000000000000000");
-
- // Test Int64(other UInt64) constructor.
- int64 = ctypes.Int64(ctypes.UInt64(0));
- do_check_eq(int64.toString(), "0");
-
- int64 = ctypes.Int64(ctypes.UInt64("0x7fffffffffffffff"));
- do_check_eq(int64.toString(), int64.toString(10));
- do_check_eq(int64.toString(10), "9223372036854775807");
- do_check_eq(int64.toString(16), "7fffffffffffffff");
- do_check_eq(int64.toString(2), "111111111111111111111111111111111111111111111111111111111111111");
-
- let vals = [-0x8000000000001000, 0x8000000000000000,
- ctypes.UInt64("0x8000000000000000"),
- Infinity, -Infinity, NaN, 0.1,
- 5.68e21, null, undefined, "", {}, [], new Number(16),
- {toString: function () { return 7; }},
- {valueOf: function () { return 7; }}];
- for (let i = 0; i < vals.length; i++)
- do_check_throws(function () { ctypes.Int64(vals[i]); }, TypeError);
-
- vals = ["-0x8000000000000001", "0x8000000000000000"];
- for (let i = 0; i < vals.length; i++)
- do_check_throws(function () { ctypes.Int64(vals[i]); }, RangeError);
-
- // Test ctypes.Int64.compare.
- do_check_eq(ctypes.Int64.compare(ctypes.Int64(5), ctypes.Int64(5)), 0);
- do_check_eq(ctypes.Int64.compare(ctypes.Int64(5), ctypes.Int64(4)), 1);
- do_check_eq(ctypes.Int64.compare(ctypes.Int64(4), ctypes.Int64(5)), -1);
- do_check_eq(ctypes.Int64.compare(ctypes.Int64(-5), ctypes.Int64(-5)), 0);
- do_check_eq(ctypes.Int64.compare(ctypes.Int64(-5), ctypes.Int64(-4)), -1);
- do_check_eq(ctypes.Int64.compare(ctypes.Int64(-4), ctypes.Int64(-5)), 1);
- do_check_throws(function() { ctypes.Int64.compare(ctypes.Int64(4), ctypes.UInt64(4)); }, TypeError);
- do_check_throws(function() { ctypes.Int64.compare(4, 5); }, TypeError);
-
- // Test ctypes.Int64.{lo,hi}.
- do_check_eq(ctypes.Int64.lo(ctypes.Int64(0x28590a1c921de000)), 0x921de000);
- do_check_eq(ctypes.Int64.hi(ctypes.Int64(0x28590a1c921de000)), 0x28590a1c);
- do_check_eq(ctypes.Int64.lo(ctypes.Int64(-0x28590a1c921de000)), 0x6de22000);
- do_check_eq(ctypes.Int64.hi(ctypes.Int64(-0x28590a1c921de000)), -0x28590a1d);
- do_check_throws(function() { ctypes.Int64.lo(ctypes.UInt64(0)); }, TypeError);
- do_check_throws(function() { ctypes.Int64.hi(ctypes.UInt64(0)); }, TypeError);
- do_check_throws(function() { ctypes.Int64.lo(0); }, TypeError);
- do_check_throws(function() { ctypes.Int64.hi(0); }, TypeError);
-
- // Test ctypes.Int64.join.
- do_check_eq(ctypes.Int64.join(0, 0).toString(), "0");
- do_check_eq(ctypes.Int64.join(0x28590a1c, 0x921de000).toString(16), "28590a1c921de000");
- do_check_eq(ctypes.Int64.join(-0x28590a1d, 0x6de22000).toString(16), "-28590a1c921de000");
- do_check_eq(ctypes.Int64.join(0x7fffffff, 0xffffffff).toString(16), "7fffffffffffffff");
- do_check_eq(ctypes.Int64.join(-0x80000000, 0x00000000).toString(16), "-8000000000000000");
- do_check_throws(function() { ctypes.Int64.join(-0x80000001, 0); }, TypeError);
- do_check_throws(function() { ctypes.Int64.join(0x80000000, 0); }, TypeError);
- do_check_throws(function() { ctypes.Int64.join(0, -0x1); }, TypeError);
- do_check_throws(function() { ctypes.Int64.join(0, 0x800000000); }, TypeError);
-}
-
-function run_UInt64_tests() {
- do_check_throws(function() { ctypes.UInt64(); }, TypeError);
-
- do_check_true(ctypes.UInt64.hasOwnProperty("prototype"));
- do_check_true(ctypes.UInt64.prototype.hasOwnProperty("constructor"));
- do_check_true(ctypes.UInt64.prototype.constructor === ctypes.UInt64);
-
- // Check that ctypes.UInt64 and ctypes.UInt64.prototype have the correct
- // properties and functions.
- do_check_true(ctypes.UInt64.hasOwnProperty("compare"));
- do_check_true(ctypes.UInt64.hasOwnProperty("lo"));
- do_check_true(ctypes.UInt64.hasOwnProperty("hi"));
- do_check_true(ctypes.UInt64.hasOwnProperty("join"));
- do_check_true(ctypes.UInt64.prototype.hasOwnProperty("toString"));
- do_check_true(ctypes.UInt64.prototype.hasOwnProperty("toSource"));
-
- // Check that the shared functions on ctypes.UInt64.prototype throw.
- do_check_throws(function() { ctypes.UInt64.prototype.toString(); }, TypeError);
- do_check_throws(function() { ctypes.UInt64.prototype.toSource(); }, TypeError);
-
- let uint64 = ctypes.UInt64(0);
- do_check_true(uint64.__proto__ === ctypes.UInt64.prototype);
- do_check_true(uint64 instanceof ctypes.UInt64);
-
- // Test UInt64.toString([radix]).
- do_check_eq(uint64.toString(), "0");
- for (let radix = 2; radix <= 36; ++radix)
- do_check_eq(uint64.toString(radix), "0");
- do_check_throws(function() { uint64.toString(0); }, RangeError);
- do_check_throws(function() { uint64.toString(1); }, RangeError);
- do_check_throws(function() { uint64.toString(37); }, RangeError);
- do_check_throws(function() { uint64.toString(10, 2); }, TypeError);
-
- // Test UInt64.toSource().
- do_check_eq(uint64.toSource(), "ctypes.UInt64(\"0\")");
- do_check_throws(function() { uint64.toSource(10); }, TypeError);
-
- uint64 = ctypes.UInt64("0x28590a1c921def71");
- do_check_eq(uint64.toString(), uint64.toString(10));
- do_check_eq(uint64.toString(10), "2907366152271163249");
- do_check_eq(uint64.toString(16), "28590a1c921def71");
- do_check_eq(uint64.toString(2), "10100001011001000010100001110010010010000111011110111101110001");
- do_check_eq(uint64.toSource(), "ctypes.UInt64(\"" + uint64.toString(10) + "\")");
-
- uint64 = ctypes.UInt64("0X28590A1c921DEf71");
- do_check_eq(uint64.toString(), uint64.toString(10));
- do_check_eq(uint64.toString(10), "2907366152271163249");
- do_check_eq(uint64.toString(16), "28590a1c921def71");
- do_check_eq(uint64.toString(2), "10100001011001000010100001110010010010000111011110111101110001");
- do_check_eq(uint64.toSource(), "ctypes.UInt64(\"" + uint64.toString(10) + "\")");
-
- // Test UInt64(primitive double) constructor.
- uint64 = ctypes.UInt64(-0);
- do_check_eq(uint64.toString(), "0");
-
- uint64 = ctypes.UInt64(0xfffffffffffff000);
- do_check_eq(uint64.toString(), uint64.toString(10));
- do_check_eq(uint64.toString(10), "18446744073709547520");
- do_check_eq(uint64.toString(16), "fffffffffffff000");
- do_check_eq(uint64.toString(2), "1111111111111111111111111111111111111111111111111111000000000000");
-
- // Test UInt64(string) constructor.
- uint64 = ctypes.UInt64("0xffffffffffffffff");
- do_check_eq(uint64.toString(), uint64.toString(10));
- do_check_eq(uint64.toString(10), "18446744073709551615");
- do_check_eq(uint64.toString(16), "ffffffffffffffff");
- do_check_eq(uint64.toString(2), "1111111111111111111111111111111111111111111111111111111111111111");
-
- uint64 = ctypes.UInt64("0x0");
- do_check_eq(uint64.toString(), uint64.toString(10));
- do_check_eq(uint64.toString(10), "0");
- do_check_eq(uint64.toString(16), "0");
- do_check_eq(uint64.toString(2), "0");
-
- uint64 = ctypes.UInt64("18446744073709551615");
- do_check_eq(uint64.toString(), uint64.toString(10));
- do_check_eq(uint64.toString(10), "18446744073709551615");
- do_check_eq(uint64.toString(16), "ffffffffffffffff");
- do_check_eq(uint64.toString(2), "1111111111111111111111111111111111111111111111111111111111111111");
-
- uint64 = ctypes.UInt64("0");
- do_check_eq(uint64.toString(), "0");
-
- // Test UInt64(other UInt64) constructor.
- uint64 = ctypes.UInt64(ctypes.UInt64(0));
- do_check_eq(uint64.toString(), "0");
-
- uint64 = ctypes.UInt64(ctypes.UInt64("0xffffffffffffffff"));
- do_check_eq(uint64.toString(), uint64.toString(10));
- do_check_eq(uint64.toString(10), "18446744073709551615");
- do_check_eq(uint64.toString(16), "ffffffffffffffff");
- do_check_eq(uint64.toString(2), "1111111111111111111111111111111111111111111111111111111111111111");
-
- uint64 = ctypes.UInt64(ctypes.UInt64("0x0"));
- do_check_eq(uint64.toString(), "0");
-
- // Test UInt64(other Int64) constructor.
- uint64 = ctypes.UInt64(ctypes.Int64(0));
- do_check_eq(uint64.toString(), "0");
-
- uint64 = ctypes.UInt64(ctypes.Int64("0x7fffffffffffffff"));
- do_check_eq(uint64.toString(), uint64.toString(10));
- do_check_eq(uint64.toString(10), "9223372036854775807");
- do_check_eq(uint64.toString(16), "7fffffffffffffff");
- do_check_eq(uint64.toString(2), "111111111111111111111111111111111111111111111111111111111111111");
-
- let vals = [-1, 0x10000000000000000, "-1", "-0x1",
- ctypes.Int64("-1"), Infinity, -Infinity, NaN, 0.1,
- 5.68e21, null, undefined, "", {}, [], new Number(16),
- {toString: function () { return 7; }},
- {valueOf: function () { return 7; }}];
- for (let i = 0; i < vals.length; i++)
- do_check_throws(function () { ctypes.UInt64(vals[i]); }, TypeError);
-
- vals = ["0x10000000000000000"];
- for (let i = 0; i < vals.length; i++)
- do_check_throws(function () { ctypes.UInt64(vals[i]); }, RangeError);
-
- // Test ctypes.UInt64.compare.
- do_check_eq(ctypes.UInt64.compare(ctypes.UInt64(5), ctypes.UInt64(5)), 0);
- do_check_eq(ctypes.UInt64.compare(ctypes.UInt64(5), ctypes.UInt64(4)), 1);
- do_check_eq(ctypes.UInt64.compare(ctypes.UInt64(4), ctypes.UInt64(5)), -1);
- do_check_throws(function() { ctypes.UInt64.compare(ctypes.UInt64(4), ctypes.Int64(4)); }, TypeError);
- do_check_throws(function() { ctypes.UInt64.compare(4, 5); }, TypeError);
-
- // Test ctypes.UInt64.{lo,hi}.
- do_check_eq(ctypes.UInt64.lo(ctypes.UInt64(0x28590a1c921de000)), 0x921de000);
- do_check_eq(ctypes.UInt64.hi(ctypes.UInt64(0x28590a1c921de000)), 0x28590a1c);
- do_check_eq(ctypes.UInt64.lo(ctypes.UInt64(0xa8590a1c921de000)), 0x921de000);
- do_check_eq(ctypes.UInt64.hi(ctypes.UInt64(0xa8590a1c921de000)), 0xa8590a1c);
- do_check_throws(function() { ctypes.UInt64.lo(ctypes.Int64(0)); }, TypeError);
- do_check_throws(function() { ctypes.UInt64.hi(ctypes.Int64(0)); }, TypeError);
- do_check_throws(function() { ctypes.UInt64.lo(0); }, TypeError);
- do_check_throws(function() { ctypes.UInt64.hi(0); }, TypeError);
-
- // Test ctypes.UInt64.join.
- do_check_eq(ctypes.UInt64.join(0, 0).toString(), "0");
- do_check_eq(ctypes.UInt64.join(0x28590a1c, 0x921de000).toString(16), "28590a1c921de000");
- do_check_eq(ctypes.UInt64.join(0xa8590a1c, 0x921de000).toString(16), "a8590a1c921de000");
- do_check_eq(ctypes.UInt64.join(0xffffffff, 0xffffffff).toString(16), "ffffffffffffffff");
- do_check_eq(ctypes.UInt64.join(0, 0).toString(16), "0");
- do_check_throws(function() { ctypes.UInt64.join(-0x1, 0); }, TypeError);
- do_check_throws(function() { ctypes.UInt64.join(0x100000000, 0); }, TypeError);
- do_check_throws(function() { ctypes.UInt64.join(0, -0x1); }, TypeError);
- do_check_throws(function() { ctypes.UInt64.join(0, 0x1000000000); }, TypeError);
-}
-
-function run_basic_abi_tests(library, t, name, toprimitive,
- get_test, set_tests, sum_tests, sum_many_tests) {
- // Test the function call ABI for calls involving the type.
- function declare_fn_cdecl(fn_t, prefix) {
- return library.declare(prefix + name + "_cdecl", fn_t);
- }
- run_single_abi_tests(declare_fn_cdecl, ctypes.default_abi, t,
- toprimitive, get_test, set_tests, sum_tests, sum_many_tests);
-
- if ("winLastError" in ctypes) {
- function declare_fn_stdcall(fn_t, prefix) {
- return library.declare(prefix + name + "_stdcall", fn_t);
- }
- run_single_abi_tests(declare_fn_stdcall, ctypes.stdcall_abi, t,
- toprimitive, get_test, set_tests, sum_tests, sum_many_tests);
-
- // Check that declaring a WINAPI function gets the right symbol name.
- let libuser32 = ctypes.open("user32.dll");
- let charupper = libuser32.declare("CharUpperA",
- ctypes.winapi_abi,
- ctypes.char.ptr,
- ctypes.char.ptr);
- let hello = ctypes.char.array()("hello!");
- do_check_eq(charupper(hello).readString(), "HELLO!");
- }
-
- // Check the alignment of the type, and its behavior in a struct,
- // against what C says.
- check_struct_stats(library, t);
-
- // Check the ToSource functions defined in the namespace ABI
- do_check_eq(ctypes.default_abi.toSource(), "ctypes.default_abi");
-
- let exn;
- try {
- ctypes.default_abi.toSource.call(null);
- } catch (x) {
- exn = x;
- }
- do_check_true(!!exn); // Check that some exception was raised
-}
-
-function run_single_abi_tests(decl, abi, t, toprimitive,
- get_test, set_tests, sum_tests, sum_many_tests) {
- let getter_t = ctypes.FunctionType(abi, t).ptr;
- let getter = decl(getter_t, "get_");
- do_check_eq(toprimitive(getter()), get_test);
-
- let setter_t = ctypes.FunctionType(abi, t, [t]).ptr;
- let setter = decl(setter_t, "set_");
- for (let i of set_tests)
- do_check_eq(toprimitive(setter(i)), i);
-
- let sum_t = ctypes.FunctionType(abi, t, [t, t]).ptr;
- let sum = decl(sum_t, "sum_");
- for (let a of sum_tests)
- do_check_eq(toprimitive(sum(a[0], a[1])), a[2]);
-
- let sum_alignb_t = ctypes.FunctionType(abi, t,
- [ctypes.char, t, ctypes.char, t, ctypes.char]).ptr;
- let sum_alignb = decl(sum_alignb_t, "sum_alignb_");
- let sum_alignf_t = ctypes.FunctionType(abi, t,
- [ctypes.float, t, ctypes.float, t, ctypes.float]).ptr;
- let sum_alignf = decl(sum_alignf_t, "sum_alignf_");
- for (let a of sum_tests) {
- do_check_eq(toprimitive(sum_alignb(0, a[0], 0, a[1], 0)), a[2]);
- do_check_eq(toprimitive(sum_alignb(1, a[0], 1, a[1], 1)), a[2]);
- do_check_eq(toprimitive(sum_alignf(0, a[0], 0, a[1], 0)), a[2]);
- do_check_eq(toprimitive(sum_alignf(1, a[0], 1, a[1], 1)), a[2]);
- }
-
- let sum_many_t = ctypes.FunctionType(abi, t,
- [t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t, t]).ptr;
- let sum_many = decl(sum_many_t, "sum_many_");
- for (let a of sum_many_tests)
- do_check_eq(
- toprimitive(sum_many(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7],
- a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15],
- a[16], a[17])), a[18]);
-}
-
-function check_struct_stats(library, t) {
- let s_t = ctypes.StructType("s_t", [{ x: ctypes.char }, { y: t }]);
- let n_t = ctypes.StructType("n_t", [{ a: ctypes.char }, { b: s_t }, { c: ctypes.char }]);
- let get_stats = library.declare("get_" + t.name + "_stats",
- ctypes.default_abi, ctypes.void_t,
- ctypes.size_t.ptr, ctypes.size_t.ptr, ctypes.size_t.ptr, ctypes.size_t.ptr,
- ctypes.size_t.array());
-
- let align = ctypes.size_t();
- let size = ctypes.size_t();
- let nalign = ctypes.size_t();
- let nsize = ctypes.size_t();
- let offsets = ctypes.size_t.array(3)();
- get_stats(align.address(), size.address(), nalign.address(), nsize.address(),
- offsets);
-
- do_check_eq(size.value, s_t.size);
- do_check_eq(align.value, s_t.size - t.size);
- do_check_eq(align.value, offsetof(s_t, "y"));
- do_check_eq(nsize.value, n_t.size);
- do_check_eq(nalign.value, offsetof(n_t, "b"));
- do_check_eq(offsets[0], offsetof(s_t, "y"));
- do_check_eq(offsets[1], offsetof(n_t, "b"));
- do_check_eq(offsets[2], offsetof(n_t, "c"));
-}
-
-// Determine the offset, in bytes, of 'member' within 'struct'.
-function offsetof(struct, member) {
- let instance = struct();
- let memberptr = ptrValue(instance.addressOfField(member));
- let chararray = ctypes.cast(instance, ctypes.char.array(struct.size));
- let offset = 0;
- while (memberptr != ptrValue(chararray.addressOfElement(offset)))
- ++offset;
- return offset;
-}
-
-// Test the class and prototype hierarchy for a given basic type 't'.
-function run_basic_class_tests(t)
-{
- do_check_true(t.__proto__ === ctypes.CType.prototype);
- do_check_true(t instanceof ctypes.CType);
-
- do_check_true(t.prototype.__proto__ === ctypes.CData.prototype);
- do_check_true(t.prototype instanceof ctypes.CData);
- do_check_true(t.prototype.constructor === t);
-
- // Check that the shared properties and functions on 't.prototype' throw.
- do_check_throws(function() { t.prototype.value; }, TypeError);
- do_check_throws(function() { t.prototype.value = null; }, TypeError);
- do_check_throws(function() { t.prototype.address(); }, TypeError);
- do_check_throws(function() { t.prototype.readString(); }, TypeError);
-
- // toString and toSource are called by the web console during inspection,
- // so we don't want them to throw.
- do_check_eq(t.prototype.toString(), '[CData proto object]');
- do_check_eq(t.prototype.toSource(), '[CData proto object]');
-
- // Test that an instance 'd' of 't' is a CData.
- let d = t();
- do_check_true(d.__proto__ === t.prototype);
- do_check_true(d instanceof t);
- do_check_true(d.constructor === t);
-}
-
-function run_bool_tests(library) {
- let t = ctypes.bool;
- run_basic_class_tests(t);
-
- let name = "bool";
- do_check_eq(t.name, name);
- do_check_true(t.size == 1 || t.size == 4);
-
- do_check_eq(t.toString(), "type " + name);
- do_check_eq(t.toSource(), "ctypes." + name);
- do_check_true(t.ptr === ctypes.PointerType(t));
- do_check_eq(t.array().name, name + "[]");
- do_check_eq(t.array(5).name, name + "[5]");
-
- let d = t();
- do_check_eq(d.value, 0);
- d.value = 1;
- do_check_eq(d.value, 1);
- d.value = -0;
- do_check_eq(1/d.value, 1/0);
- d.value = false;
- do_check_eq(d.value, 0);
- d.value = true;
- do_check_eq(d.value, 1);
- d = new t(1);
- do_check_eq(d.value, 1);
-
- // don't convert anything else
- let vals = [-1, 2, Infinity, -Infinity, NaN, 0.1,
- ctypes.Int64(0), ctypes.UInt64(0),
- null, undefined, "", "0", {}, [], new Number(16),
- {toString: function () { return 7; }},
- {valueOf: function () { return 7; }}];
- for (let i = 0; i < vals.length; i++)
- do_check_throws(function () { d.value = vals[i]; }, TypeError);
-
- do_check_true(d.address().constructor === t.ptr);
- do_check_eq(d.address().contents, d.value);
- do_check_eq(d.toSource(), "ctypes." + name + "(" + d.value + ")");
- do_check_eq(d.toSource(), d.toString());
-
- // Test the function call ABI for calls involving the type,
- // and check the alignment of the type against what C says.
- function toprimitive(a) { return a; }
- run_basic_abi_tests(library, t, name, toprimitive,
- true,
- [ false, true ],
- [ [ false, false, false ], [ false, true, true ],
- [ true, false, true ], [true, true, true ] ],
- [ [ false, false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false, false, false,
- false ],
- [ true, true, true, true, true, true, true, true, true,
- true, true, true, true, true, true, true, true, true,
- true ] ]);
-}
-
-function run_integer_tests(library, t, name, size, signed, limits) {
- run_basic_class_tests(t);
-
- do_check_eq(t.name, name);
- do_check_eq(t.size, size);
-
- do_check_eq(t.toString(), "type " + name);
- do_check_eq(t.toSource(), "ctypes." + name);
- do_check_true(t.ptr === ctypes.PointerType(t));
- do_check_eq(t.array().name, name + "[]");
- do_check_eq(t.array(5).name, name + "[5]");
-
- // Check the alignment of the type, and its behavior in a struct,
- // against what C says.
- check_struct_stats(library, t);
-
- let d = t();
- do_check_eq(d.value, 0);
- d.value = 5;
- do_check_eq(d.value, 5);
- d = t(10);
- do_check_eq(d.value, 10);
- if (signed) {
- d.value = -10;
- do_check_eq(d.value, -10);
- }
- d = new t(20);
- do_check_eq(d.value, 20);
-
- d.value = ctypes.Int64(5);
- do_check_eq(d.value, 5);
- if (signed) {
- d.value = ctypes.Int64(-5);
- do_check_eq(d.value, -5);
- }
- d.value = ctypes.UInt64(5);
- do_check_eq(d.value, 5);
-
- d.value = limits[0];
- do_check_eq(d.value, limits[0]);
- d.value = limits[1];
- do_check_eq(d.value, limits[1]);
- d.value = 0;
- do_check_eq(d.value, 0);
- d.value = -0;
- do_check_eq(1/d.value, 1/0);
- d.value = false;
- do_check_eq(d.value, 0);
- d.value = true;
- do_check_eq(d.value, 1);
-
- // don't convert anything else
- let vals = [limits[0] - 1, limits[1] + 1, Infinity, -Infinity, NaN, 0.1,
- null, undefined, "", "0", {}, [], new Number(16),
- {toString: function () { return 7; }},
- {valueOf: function () { return 7; }}];
- for (let i = 0; i < vals.length; i++)
- do_check_throws(function () { d.value = vals[i]; }, TypeError);
-
- do_check_true(d.address().constructor === t.ptr);
- do_check_eq(d.address().contents, d.value);
- do_check_eq(d.toSource(), "ctypes." + name + "(" + d.value + ")");
- do_check_eq(d.toSource(), d.toString());
-
- // Test the function call ABI for calls involving the type,
- // and check the alignment of the type against what C says.
- function toprimitive(a) { return a; }
- run_basic_abi_tests(library, t, name, toprimitive,
- 109,
- [ 0, limits[0], limits[1] ],
- [ [ 0, 0, 0 ], [ 0, 1, 1 ], [ 1, 0, 1 ], [ 1, 1, 2 ],
- [ limits[0], 1, limits[0] + 1 ],
- [ limits[1], 1, limits[0] ] ],
- [ [ 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 ],
- [ 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 18 ] ]);
-}
-
-function run_float_tests(library, t, name, size) {
- run_basic_class_tests(t);
-
- do_check_eq(t.name, name);
- do_check_eq(t.size, size);
-
- do_check_eq(t.toString(), "type " + name);
- do_check_eq(t.toSource(), "ctypes." + name);
- do_check_true(t.ptr === ctypes.PointerType(t));
- do_check_eq(t.array().name, name + "[]");
- do_check_eq(t.array(5).name, name + "[5]");
-
- let d = t();
- do_check_eq(d.value, 0);
- d.value = 5;
- do_check_eq(d.value, 5);
- d.value = 5.25;
- do_check_eq(d.value, 5.25);
- d = t(10);
- do_check_eq(d.value, 10);
- d.value = -10;
- do_check_eq(d.value, -10);
- d = new t(20);
- do_check_eq(d.value, 20);
-
- do_check_throws(function() { d.value = ctypes.Int64(5); }, TypeError);
- do_check_throws(function() { d.value = ctypes.Int64(-5); }, TypeError);
- do_check_throws(function() { d.value = ctypes.UInt64(5); }, TypeError);
-
- if (size == 4) {
- d.value = 0x7fffff;
- do_check_eq(d.value, 0x7fffff);
-
- // allow values that can't be represented precisely as a float
- d.value = 0xffffffff;
- let delta = 1 - d.value/0xffffffff;
- do_check_true(delta != 0);
- do_check_true(delta > -0.01 && delta < 0.01);
- d.value = 1 + 1/0x80000000;
- do_check_eq(d.value, 1);
- } else {
- d.value = 0xfffffffffffff000;
- do_check_eq(d.value, 0xfffffffffffff000);
-
- do_check_throws(function() { d.value = ctypes.Int64("0x7fffffffffffffff"); }, TypeError);
- }
-
- d.value = Infinity;
- do_check_eq(d.value, Infinity);
- d.value = -Infinity;
- do_check_eq(d.value, -Infinity);
- d.value = NaN;
- do_check_true(isNaN(d.value));
- d.value = 0;
- do_check_eq(d.value, 0);
- d.value = -0;
- do_check_eq(1/d.value, 1/-0);
-
- // don't convert anything else
- let vals = [true, false, null, undefined, "", "0", {}, [], new Number(16),
- {toString: function () { return 7; }},
- {valueOf: function () { return 7; }}];
- for (let i = 0; i < vals.length; i++)
- do_check_throws(function () { d.value = vals[i]; }, TypeError);
-
- // Check that values roundtrip through toSource() correctly.
- function test_roundtrip(tFn, val)
- {
- let f1 = tFn(val);
- eval("var f2 = " + f1.toSource());
- do_check_eq(f1.value, f2.value);
- }
- vals = [Infinity, -Infinity, -0, 0, 1, -1, 1/3, -1/3, 1/4, -1/4,
- 1e-14, -1e-14, 0xfffffffffffff000, -0xfffffffffffff000];
- for (let i = 0; i < vals.length; i++)
- test_roundtrip(t, vals[i]);
- do_check_eq(t(NaN).toSource(), t.toSource() + "(NaN)");
-
- do_check_true(d.address().constructor === t.ptr);
- do_check_eq(d.address().contents, d.value);
- do_check_eq(d.toSource(), "ctypes." + name + "(" + d.value + ")");
- do_check_eq(d.toSource(), d.toString());
-
- // Test the function call ABI for calls involving the type,
- // and check the alignment of the type against what C says.
- let operand = [];
- if (size == 4) {
- operand[0] = 503859.75;
- operand[1] = 1012385.25;
- operand[2] = 1516245;
- } else {
- operand[0] = 501823873859.75;
- operand[1] = 171290577385.25;
- operand[2] = 673114451245;
- }
- function toprimitive(a) { return a; }
- run_basic_abi_tests(library, t, name, toprimitive,
- 109.25,
- [ 0, operand[0], operand[1] ],
- [ [ 0, 0, 0 ], [ 0, 1, 1 ], [ 1, 0, 1 ], [ 1, 1, 2 ],
- [ operand[0], operand[1], operand[2] ] ],
- [ [ 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 ],
- [ 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 18 ] ]);
-}
-
-function run_wrapped_integer_tests(library, t, name, size, signed, w, wname, limits) {
- run_basic_class_tests(t);
-
- do_check_eq(t.name, name);
- do_check_eq(t.size, size);
-
- do_check_eq(t.toString(), "type " + name);
- do_check_eq(t.toSource(), "ctypes." + name);
- do_check_true(t.ptr === ctypes.PointerType(t));
- do_check_eq(t.array().name, name + "[]");
- do_check_eq(t.array(5).name, name + "[5]");
-
- let d = t();
- do_check_true(d.value instanceof w);
- do_check_eq(d.value, 0);
- d.value = 5;
- do_check_eq(d.value, 5);
- d = t(10);
- do_check_eq(d.value, 10);
- if (signed) {
- d.value = -10;
- do_check_eq(d.value, -10);
- }
- d = new t(20);
- do_check_eq(d.value, 20);
-
- d.value = ctypes.Int64(5);
- do_check_eq(d.value, 5);
- if (signed) {
- d.value = ctypes.Int64(-5);
- do_check_eq(d.value, -5);
- }
- d.value = ctypes.UInt64(5);
- do_check_eq(d.value, 5);
-
- d.value = w(limits[0]);
- do_check_eq(d.value, limits[0]);
- d.value = w(limits[1]);
- do_check_eq(d.value, limits[1]);
- d.value = 0;
- do_check_eq(d.value, 0);
- d.value = -0;
- do_check_eq(1/d.value, 1/0);
- d.value = false;
- do_check_eq(d.value, 0);
- d.value = true;
- do_check_eq(d.value, 1);
-
- // don't convert anything else
- let vals = [limits[2], limits[3], Infinity, -Infinity, NaN, 0.1,
- null, undefined, "", "0", {}, [], new Number(16),
- {toString: function () { return 7; }},
- {valueOf: function () { return 7; }}];
- for (let i = 0; i < vals.length; i++)
- do_check_throws(function () { d.value = vals[i]; }, TypeError);
-
- do_check_true(d.address().constructor === t.ptr);
- do_check_eq(d.address().contents.toString(), d.value.toString());
- do_check_eq(d.toSource(), "ctypes." + name + "(" + wname + "(\"" + d.value + "\"))");
- do_check_eq(d.toSource(), d.toString());
-
- // Test the function call ABI for calls involving the type,
- // and check the alignment of the type against what C says.
- function toprimitive(a) { return a.toString(); }
- run_basic_abi_tests(library, t, name, toprimitive,
- 109,
- [ 0, w(limits[0]), w(limits[1]) ],
- [ [ 0, 0, 0 ], [ 0, 1, 1 ], [ 1, 0, 1 ], [ 1, 1, 2 ],
- signed ? [ w(limits[0]), -1, w(limits[1]) ]
- : [ w(limits[1]), 1, w(limits[0]) ] ],
- [ [ 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 ],
- [ 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 18 ] ]);
-}
-
-function run_char_tests(library, t, name, size, signed, limits) {
- run_basic_class_tests(t);
-
- do_check_eq(t.name, name);
- do_check_eq(t.size, size);
-
- do_check_eq(t.toString(), "type " + name);
- do_check_eq(t.toSource(), "ctypes." + name);
- do_check_true(t.ptr === ctypes.PointerType(t));
- do_check_eq(t.array().name, name + "[]");
- do_check_eq(t.array(5).name, name + "[5]");
-
- let d = t();
- do_check_eq(d.value, 0);
- d.value = 5;
- do_check_eq(d.value, 5);
- d = t(10);
- do_check_eq(d.value, 10);
- if (signed) {
- d.value = -10;
- do_check_eq(d.value, -10);
- } else {
- do_check_throws(function() { d.value = -10; }, TypeError);
- }
- d = new t(20);
- do_check_eq(d.value, 20);
-
- function toprimitive(a) { return a; }
-
- d.value = ctypes.Int64(5);
- do_check_eq(d.value, 5);
- if (signed) {
- d.value = ctypes.Int64(-10);
- do_check_eq(d.value, -10);
- }
- d.value = ctypes.UInt64(5);
- do_check_eq(d.value, 5);
-
- d.value = limits[0];
- do_check_eq(d.value, limits[0]);
- d.value = limits[1];
- do_check_eq(d.value, limits[1]);
- d.value = 0;
- do_check_eq(d.value, 0);
- d.value = -0;
- do_check_eq(1/d.value, 1/0);
- d.value = false;
- do_check_eq(d.value, 0);
- d.value = true;
- do_check_eq(d.value, 1);
-
- do_check_throws(function() { d.value = "5"; }, TypeError);
-
- // don't convert anything else
- let vals = [limits[0] - 1, limits[1] + 1, Infinity, -Infinity, NaN, 0.1,
- null, undefined, "", "aa", {}, [], new Number(16),
- {toString: function () { return 7; }},
- {valueOf: function () { return 7; }}];
- for (let i = 0; i < vals.length; i++)
- do_check_throws(function () { d.value = vals[i]; }, TypeError);
-
- do_check_true(d.address().constructor === t.ptr);
- do_check_eq(d.address().contents, 1);
- do_check_eq(d.toSource(), "ctypes." + name + "(" + d.value + ")");
- do_check_eq(d.toSource(), d.toString());
-
- // Test string autoconversion (and lack thereof).
- let literal = "autoconverted";
- let s = t.array()(literal);
- do_check_eq(s.readString(), literal);
- do_check_eq(s.constructor.length, literal.length + 1);
- s = t.array(50)(literal);
- do_check_eq(s.readString(), literal);
- do_check_throws(function() { t.array(3)(literal); }, TypeError);
-
- do_check_throws(function() { t.ptr(literal); }, TypeError);
- let p = t.ptr(s);
- do_check_eq(p.readString(), literal);
-
- // Test the function call ABI for calls involving the type,
- // and check the alignment of the type against what C says.
- run_basic_abi_tests(library, t, name, toprimitive,
- 109,
- [ 0, limits[0], limits[1] ],
- [ [ 0, 0, 0 ], [ 0, 1, 1 ], [ 1, 0, 1 ], [ 1, 1, 2 ],
- [ limits[0], 1, limits[0] + 1 ],
- [ limits[1], 1, limits[0] ] ],
- [ [ 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 ],
- [ 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 18 ] ]);
-}
-
-function run_char16_tests(library, t, name, limits) {
- run_basic_class_tests(t);
-
- do_check_eq(t.name, name);
- do_check_eq(t.size, 2);
-
- do_check_eq(t.toString(), "type " + name);
- do_check_eq(t.toSource(), "ctypes." + name);
- do_check_true(t.ptr === ctypes.PointerType(t));
- do_check_eq(t.array().name, name + "[]");
- do_check_eq(t.array(5).name, name + "[5]");
-
- function toprimitive(a) { return a.charCodeAt(0); }
-
- let d = t();
- do_check_eq(d.value.length, 1);
- do_check_eq(toprimitive(d.value), 0);
- d.value = 5;
- do_check_eq(d.value.length, 1);
- do_check_eq(toprimitive(d.value), 5);
- d = t(10);
- do_check_eq(toprimitive(d.value), 10);
- do_check_throws(function() { d.value = -10; }, TypeError);
- d = new t(20);
- do_check_eq(toprimitive(d.value), 20);
-
- d.value = ctypes.Int64(5);
- do_check_eq(d.value.charCodeAt(0), 5);
- do_check_throws(function() { d.value = ctypes.Int64(-10); }, TypeError);
- d.value = ctypes.UInt64(5);
- do_check_eq(d.value.charCodeAt(0), 5);
-
- d.value = limits[0];
- do_check_eq(toprimitive(d.value), limits[0]);
- d.value = limits[1];
- do_check_eq(toprimitive(d.value), limits[1]);
- d.value = 0;
- do_check_eq(toprimitive(d.value), 0);
- d.value = -0;
- do_check_eq(1/toprimitive(d.value), 1/0);
- d.value = false;
- do_check_eq(toprimitive(d.value), 0);
- d.value = true;
- do_check_eq(toprimitive(d.value), 1);
-
- d.value = "\0";
- do_check_eq(toprimitive(d.value), 0);
- d.value = "a";
- do_check_eq(d.value, "a");
-
- // don't convert anything else
- let vals = [limits[0] - 1, limits[1] + 1, Infinity, -Infinity, NaN, 0.1,
- null, undefined, "", "aa", {}, [], new Number(16),
- {toString: function () { return 7; }},
- {valueOf: function () { return 7; }}];
- for (let i = 0; i < vals.length; i++)
- do_check_throws(function () { d.value = vals[i]; }, TypeError);
-
- do_check_true(d.address().constructor === t.ptr);
- do_check_eq(d.address().contents, "a");
- do_check_eq(d.toSource(), "ctypes." + name + "(\"" + d.value + "\")");
- do_check_eq(d.toSource(), d.toString());
-
- // Test string autoconversion (and lack thereof).
- let literal = "autoconverted";
- let s = t.array()(literal);
- do_check_eq(s.readString(), literal);
- do_check_eq(s.constructor.length, literal.length + 1);
- s = t.array(50)(literal);
- do_check_eq(s.readString(), literal);
- do_check_throws(function() { t.array(3)(literal); }, TypeError);
-
- do_check_throws(function() { t.ptr(literal); }, TypeError);
- let p = t.ptr(s);
- do_check_eq(p.readString(), literal);
-
- // Test the function call ABI for calls involving the type,
- // and check the alignment of the type against what C says.
- run_basic_abi_tests(library, t, name, toprimitive,
- 109,
- [ 0, limits[0], limits[1] ],
- [ [ 0, 0, 0 ], [ 0, 1, 1 ], [ 1, 0, 1 ], [ 1, 1, 2 ],
- [ limits[0], 1, limits[0] + 1 ],
- [ limits[1], 1, limits[0] ] ],
- [ [ 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0 ],
- [ 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 18 ] ]);
-}
-
-// Test the class and prototype hierarchy for a given type constructor 'c'.
-function run_type_ctor_class_tests(c, t, t2, props=[], fns=[], instanceProps=[], instanceFns=[], specialProps=[])
-{
- do_check_true(c.prototype.__proto__ === ctypes.CType.prototype);
- do_check_true(c.prototype instanceof ctypes.CType);
- do_check_true(c.prototype.constructor === c);
-
- // Check that 'c.prototype' has the correct properties and functions.
- for (let p of props)
- do_check_true(c.prototype.hasOwnProperty(p));
- for (let f of fns)
- do_check_true(c.prototype.hasOwnProperty(f));
-
- // Check that the shared properties and functions on 'c.prototype' throw.
- for (let p of props)
- do_check_throws(function() { c.prototype[p]; }, TypeError);
- for (let f of fns)
- do_check_throws(function() { c.prototype[f](); }, TypeError);
-
- do_check_true(t.__proto__ === c.prototype);
- do_check_true(t instanceof c);
-
- // 't.prototype.__proto__' is the common ancestor of all types constructed
- // from 'c'; while not available from 'c' directly, it should be identically
- // equal to 't2.prototype.__proto__' where 't2' is a different CType
- // constructed from 'c'.
- do_check_true(t.prototype.__proto__ === t2.prototype.__proto__);
- if (t instanceof ctypes.FunctionType)
- do_check_true(t.prototype.__proto__.__proto__ === ctypes.PointerType.prototype.prototype);
- else
- do_check_true(t.prototype.__proto__.__proto__ === ctypes.CData.prototype);
- do_check_true(t.prototype instanceof ctypes.CData);
- do_check_true(t.prototype.constructor === t);
-
- // Check that 't.prototype.__proto__' has the correct properties and
- // functions.
- for (let p of instanceProps)
- do_check_true(t.prototype.__proto__.hasOwnProperty(p));
- for (let f of instanceFns)
- do_check_true(t.prototype.__proto__.hasOwnProperty(f));
-
- // Check that the shared properties and functions on 't.prototype.__proto__'
- // (and thus also 't.prototype') throw.
- for (let p of instanceProps) {
- do_check_throws(function() { t.prototype.__proto__[p]; }, TypeError);
- do_check_throws(function() { t.prototype[p]; }, TypeError);
- }
- for (let f of instanceFns) {
- do_check_throws(function() { t.prototype.__proto__[f]() }, TypeError);
- do_check_throws(function() { t.prototype[f]() }, TypeError);
- }
-
- // Check that 't.prototype' has the correct special properties.
- for (let p of specialProps)
- do_check_true(t.prototype.hasOwnProperty(p));
-
- // Check that the shared special properties on 't.prototype' throw.
- for (let p of specialProps)
- do_check_throws(function() { t.prototype[p]; }, TypeError);
-
- // Make sure we can access 'prototype' on a CTypeProto.
- if (t instanceof ctypes.FunctionType)
- do_check_true(Object.getPrototypeOf(c.prototype.prototype) === ctypes.PointerType.prototype.prototype);
- else
- do_check_true(Object.getPrototypeOf(c.prototype.prototype) === ctypes.CType.prototype.prototype);
-
- // Test that an instance 'd' of 't' is a CData.
- if (t.__proto__ != ctypes.FunctionType.prototype) {
- let d = t();
- do_check_true(d.__proto__ === t.prototype);
- do_check_true(d instanceof t);
- do_check_true(d.constructor === t);
- }
-}
-
-function run_StructType_tests() {
- run_type_ctor_class_tests(ctypes.StructType,
- ctypes.StructType("s", [{"a": ctypes.int32_t}, {"b": ctypes.int64_t}]),
- ctypes.StructType("t", [{"c": ctypes.int32_t}, {"d": ctypes.int64_t}]),
- [ "fields" ], [ "define" ], [], [ "addressOfField" ], [ "a", "b" ]);
-
- do_check_throws(function() { ctypes.StructType(); }, TypeError);
- do_check_throws(function() { ctypes.StructType("a", [], 5); }, TypeError);
- do_check_throws(function() { ctypes.StructType(null, []); }, TypeError);
- do_check_throws(function() { ctypes.StructType("a", null); }, TypeError);
-
- // Check that malformed descriptors are an error.
- do_check_throws(function() {
- ctypes.StructType("a", [{"x":ctypes.int32_t}, {"x":ctypes.int8_t}]);
- }, TypeError);
- do_check_throws(function() {
- ctypes.StructType("a", [5]);
- }, TypeError);
- do_check_throws(function() {
- ctypes.StructType("a", [{}]);
- }, TypeError);
- do_check_throws(function() {
- ctypes.StructType("a", [{5:ctypes.int32_t}]);
- }, TypeError);
- do_check_throws(function() {
- ctypes.StructType("a", [{"5":ctypes.int32_t}]);
- }, TypeError);
- do_check_throws(function() {
- ctypes.StructType("a", [{"x":5}]);
- }, TypeError);
- do_check_throws(function() {
- ctypes.StructType("a", [{"x":ctypes.int32_t()}]);
- }, TypeError);
-
- // Check that opaque structs work.
- let opaque_t = ctypes.StructType("a");
- do_check_eq(opaque_t.name, "a");
- do_check_eq(opaque_t.toString(), "type a");
- do_check_eq(opaque_t.toSource(), 'ctypes.StructType("a")');
- do_check_true(opaque_t.prototype === undefined);
- do_check_true(opaque_t.fields === undefined);
- do_check_true(opaque_t.size === undefined);
- do_check_throws(function() { opaque_t(); }, Error);
- let opaqueptr_t = opaque_t.ptr;
- do_check_true(opaqueptr_t.targetType === opaque_t);
- do_check_eq(opaqueptr_t.name, "a*");
- do_check_eq(opaqueptr_t.toString(), "type a*");
- do_check_eq(opaqueptr_t.toSource(), 'ctypes.StructType("a").ptr');
-
- // Check that type checking works with opaque structs.
- let opaqueptr = opaqueptr_t();
- opaqueptr.value = opaqueptr_t(1);
- do_check_eq(ptrValue(opaqueptr), 1);
- do_check_throws(function() {
- opaqueptr.value = ctypes.StructType("a").ptr();
- }, TypeError);
-
- // Check that 'define' works.
- do_check_throws(function() { opaque_t.define(); }, TypeError);
- do_check_throws(function() { opaque_t.define([], 0); }, TypeError);
- do_check_throws(function() { opaque_t.define([{}]); }, TypeError);
- do_check_throws(function() { opaque_t.define([{ a: 0 }]); }, TypeError);
- do_check_throws(function() {
- opaque_t.define([{ a: ctypes.int32_t, b: ctypes.int64_t }]);
- }, TypeError);
- do_check_throws(function() {
- opaque_t.define([{ a: ctypes.int32_t }, { b: 0 }]);
- }, TypeError);
- do_check_false(opaque_t.hasOwnProperty("prototype"));
-
- // Check that circular references work with opaque structs...
- // but not crazy ones.
- do_check_throws(function() { opaque_t.define([{ b: opaque_t }]); }, TypeError);
- let circular_t = ctypes.StructType("circular", [{ a: opaqueptr_t }]);
- opaque_t.define([{ b: circular_t }]);
- let opaque = opaque_t();
- let circular = circular_t(opaque.address());
- opaque.b = circular;
- do_check_eq(circular.a.toSource(), opaque.address().toSource());
- do_check_eq(opaque.b.toSource(), circular.toSource());
-
- // Check that attempting to redefine a struct fails and if attempted, the
- // original definition is preserved.
- do_check_throws(function() {
- opaque_t.define([{ c: ctypes.int32_t.array(8) }]);
- }, Error);
- do_check_eq(opaque_t.size, circular_t.size);
- do_check_true(opaque_t.prototype.hasOwnProperty("b"));
- do_check_false(opaque_t.prototype.hasOwnProperty("c"));
-
- // StructType size, alignment, and offset calculations have already been
- // checked for each basic type. We do not need to check them again.
- let name = "g_t";
- let g_t = ctypes.StructType(name, [{ a: ctypes.int32_t }, { b: ctypes.double }]);
- do_check_eq(g_t.name, name);
-
- do_check_eq(g_t.toString(), "type " + name);
- do_check_eq(g_t.toSource(),
- "ctypes.StructType(\"g_t\", [{ \"a\": ctypes.int32_t }, { \"b\": ctypes.double }])");
- do_check_true(g_t.ptr === ctypes.PointerType(g_t));
- do_check_eq(g_t.array().name, name + "[]");
- do_check_eq(g_t.array(5).name, name + "[5]");
-
- let s_t = new ctypes.StructType("s_t", [{ a: ctypes.int32_t }, { b: g_t }, { c: ctypes.int8_t }]);
-
- let fields = [{ a: ctypes.int32_t }, { b: ctypes.int8_t }, { c: g_t }, { d: ctypes.int8_t }];
- let t_t = new ctypes.StructType("t_t", fields);
- do_check_eq(t_t.fields.length, 4);
- do_check_true(t_t.fields[0].a === ctypes.int32_t);
- do_check_true(t_t.fields[1].b === ctypes.int8_t);
- do_check_true(t_t.fields[2].c === g_t);
- do_check_true(t_t.fields[3].d === ctypes.int8_t);
-/* disabled temporarily per bug 598225.
- do_check_throws(function() { t_t.fields.z = 0; }, Error);
- do_check_throws(function() { t_t.fields[4] = 0; }, Error);
- do_check_throws(function() { t_t.fields[4].a = 0; }, Error);
- do_check_throws(function() { t_t.fields[4].e = 0; }, Error);
-*/
-
- // Check that struct size bounds work, and that large, but not illegal, sizes
- // are OK.
- if (ctypes.size_t.size == 4) {
- // Test 1: overflow struct size + field padding + field size.
- let large_t = ctypes.StructType("large_t",
- [{"a": ctypes.int8_t.array(0xffffffff)}]);
- do_check_eq(large_t.size, 0xffffffff);
- do_check_throws(function() {
- ctypes.StructType("large_t", [{"a": large_t}, {"b": ctypes.int8_t}]);
- }, RangeError);
-
- // Test 2: overflow struct size + struct tail padding.
- // To do this, we use a struct with maximum size and alignment 2.
- large_t = ctypes.StructType("large_t",
- [{"a": ctypes.int16_t.array(0xfffffffe / 2)}]);
- do_check_eq(large_t.size, 0xfffffffe);
- do_check_throws(function() {
- ctypes.StructType("large_t", [{"a": large_t}, {"b": ctypes.int8_t}]);
- }, RangeError);
-
- } else {
- // Test 1: overflow struct size when converting from size_t to jsdouble.
- let large_t = ctypes.StructType("large_t",
- [{"a": ctypes.int8_t.array(0xfffffffffffff800)}]);
- do_check_eq(large_t.size, 0xfffffffffffff800);
- do_check_throws(function() {
- ctypes.StructType("large_t", [{"a": large_t}, {"b": ctypes.int8_t}]);
- }, RangeError);
- let small_t = ctypes.int8_t.array(0x400);
- do_check_throws(function() {
- ctypes.StructType("large_t", [{"a": large_t}, {"b": small_t}]);
- }, RangeError);
-
- large_t = ctypes.StructType("large_t",
- [{"a": ctypes.int8_t.array(0x1fffffffffffff)}]);
- do_check_eq(large_t.size, 0x1fffffffffffff);
- do_check_throws(function() {
- ctypes.StructType("large_t", [{"a": large_t.array(2)}, {"b": ctypes.int8_t}]);
- }, RangeError);
-
- // Test 2: overflow struct size + field padding + field size.
- large_t = ctypes.int8_t.array(0xfffffffffffff800);
- small_t = ctypes.int8_t.array(0x800);
- do_check_throws(function() {
- ctypes.StructType("large_t", [{"a": large_t}, {"b": small_t}]);
- }, RangeError);
-
- // Test 3: overflow struct size + struct tail padding.
- // To do this, we use a struct with maximum size and alignment 2.
- large_t = ctypes.StructType("large_t",
- [{"a": ctypes.int16_t.array(0xfffffffffffff000 / 2)}]);
- do_check_eq(large_t.size, 0xfffffffffffff000);
- small_t = ctypes.int8_t.array(0xfff);
- do_check_throws(function() {
- ctypes.StructType("large_t", [{"a": large_t}, {"b": small_t}]);
- }, RangeError);
- }
-
- let g = g_t();
- do_check_eq(g.a, 0);
- do_check_eq(g.b, 0);
- g = new g_t(1, 2);
- do_check_eq(g.a, 1);
- do_check_eq(g.b, 2);
- do_check_throws(function() { g_t(1); }, TypeError);
- do_check_throws(function() { g_t(1, 2, 3); }, TypeError);
-
- for (let field in g)
- do_check_true(field == "a" || field == "b");
-
- let g_a = g.address();
- do_check_true(g_a.constructor === g_t.ptr);
- do_check_eq(g_a.contents.a, g.a);
-
- let s = new s_t(3, g, 10);
- do_check_eq(s.a, 3);
- s.a = 4;
- do_check_eq(s.a, 4);
- do_check_eq(s.b.a, 1);
- do_check_eq(s.b.b, 2);
- do_check_eq(s.c, 10);
- let g2 = s.b;
- do_check_eq(g2.a, 1);
- g2.a = 7;
- do_check_eq(g2.a, 7);
- do_check_eq(s.b.a, 7);
-
- g_a = s.addressOfField("b");
- do_check_true(g_a.constructor === g_t.ptr);
- do_check_eq(g_a.contents.a, s.b.a);
- do_check_throws(function() { s.addressOfField(); }, TypeError);
- do_check_throws(function() { s.addressOfField("d"); }, TypeError);
- do_check_throws(function() { s.addressOfField("a", 2); }, TypeError);
-
- do_check_eq(s.toSource(), "s_t(4, {\"a\": 7, \"b\": 2}, 10)");
- do_check_eq(s.toSource(), s.toString());
- eval("var s2 = " + s.toSource());
- do_check_true(s2.constructor === s_t);
- do_check_eq(s.b.b, s2.b.b);
-
- // Test that structs can be set from an object using 'value'.
- do_check_throws(function() { s.value; }, TypeError);
- let s_init = { "a": 2, "b": { "a": 9, "b": 5 }, "c": 13 };
- s.value = s_init;
- do_check_eq(s.b.a, 9);
- do_check_eq(s.c, 13);
- do_check_throws(function() { s.value = 5; }, TypeError);
- do_check_throws(function() { s.value = ctypes.int32_t(); }, TypeError);
- do_check_throws(function() { s.value = {}; }, TypeError);
- do_check_throws(function() { s.value = { "a": 2 }; }, TypeError);
- do_check_throws(function() { s.value = { "a": 2, "b": 5, "c": 10 }; }, TypeError);
- do_check_throws(function() {
- s.value = { "5": 2, "b": { "a": 9, "b": 5 }, "c": 13 };
- }, TypeError);
- do_check_throws(function() {
- s.value = { "a": 2, "b": { "a": 9, "b": 5 }, "c": 13, "d": 17 };
- }, TypeError);
- do_check_throws(function() {
- s.value = { "a": 2, "b": { "a": 9, "b": 5, "e": 9 }, "c": 13 };
- }, TypeError);
-
- // Test that structs can be constructed similarly through ExplicitConvert,
- // and that the single-field case is disambiguated correctly.
- s = s_t(s_init);
- do_check_eq(s.b.a, 9);
- do_check_eq(s.c, 13);
- let v_t = ctypes.StructType("v_t", [{ "x": ctypes.int32_t }]);
- let v = v_t({ "x": 5 });
- do_check_eq(v.x, 5);
- v = v_t(8);
- do_check_eq(v.x, 8);
- let w_t = ctypes.StructType("w_t", [{ "y": v_t }]);
- do_check_throws(function() { w_t(9); }, TypeError);
- let w = w_t({ "x": 3 });
- do_check_eq(w.y.x, 3);
- w = w_t({ "y": { "x": 19 } });
- do_check_eq(w.y.x, 19);
- let u_t = ctypes.StructType("u_t", [{ "z": ctypes.ArrayType(ctypes.int32_t, 3) }]);
- let u = u_t([1, 2, 3]);
- do_check_eq(u.z[1], 2);
- u = u_t({ "z": [4, 5, 6] });
- do_check_eq(u.z[1], 5);
-
- // Check that the empty struct has size 1.
- let z_t = ctypes.StructType("z_t", []);
- do_check_eq(z_t.size, 1);
- do_check_eq(z_t.fields.length, 0);
-
- // Check that structs containing arrays of undefined or zero length
- // are illegal, but arrays of defined length work.
- do_check_throws(function() {
- ctypes.StructType("z_t", [{ a: ctypes.int32_t.array() }]);
- }, TypeError);
- do_check_throws(function() {
- ctypes.StructType("z_t", [{ a: ctypes.int32_t.array(0) }]);
- }, TypeError);
- z_t = ctypes.StructType("z_t", [{ a: ctypes.int32_t.array(6) }]);
- do_check_eq(z_t.size, ctypes.int32_t.size * 6);
- let z = z_t([1, 2, 3, 4, 5, 6]);
- do_check_eq(z.a[3], 4);
-}
-
-function ptrValue(p) {
- return ctypes.cast(p, ctypes.uintptr_t).value.toString();
-}
-
-function run_PointerType_tests() {
- run_type_ctor_class_tests(ctypes.PointerType,
- ctypes.PointerType(ctypes.int32_t), ctypes.PointerType(ctypes.int64_t),
- [ "targetType" ], [], [ "contents" ], [ "isNull", "increment", "decrement" ], []);
-
- do_check_throws(function() { ctypes.PointerType(); }, TypeError);
- do_check_throws(function() { ctypes.PointerType(ctypes.int32_t, 5); }, TypeError);
- do_check_throws(function() { ctypes.PointerType(null); }, TypeError);
- do_check_throws(function() { ctypes.PointerType(ctypes.int32_t()); }, TypeError);
- do_check_throws(function() { ctypes.PointerType("void"); }, TypeError);
-
- let name = "g_t";
- let g_t = ctypes.StructType(name, [{ a: ctypes.int32_t }, { b: ctypes.double }]);
- let g = g_t(1, 2);
-
- let p_t = ctypes.PointerType(g_t);
- do_check_eq(p_t.name, name + "*");
- do_check_eq(p_t.size, ctypes.uintptr_t.size);
- do_check_true(p_t.targetType === g_t);
- do_check_true(p_t === g_t.ptr);
-
- do_check_eq(p_t.toString(), "type " + name + "*");
- do_check_eq(p_t.toSource(),
- "ctypes.StructType(\"g_t\", [{ \"a\": ctypes.int32_t }, { \"b\": ctypes.double }]).ptr");
- do_check_true(p_t.ptr === ctypes.PointerType(p_t));
- do_check_eq(p_t.array().name, name + "*[]");
- do_check_eq(p_t.array(5).name, name + "*[5]");
-
- // Test ExplicitConvert.
- let p = p_t();
- do_check_throws(function() { p.value; }, TypeError);
- do_check_eq(ptrValue(p), 0);
- do_check_throws(function() { p.contents; }, TypeError);
- do_check_throws(function() { p.contents = g; }, TypeError);
- p = p_t(5);
- do_check_eq(ptrValue(p), 5);
- p = p_t(ctypes.UInt64(10));
- do_check_eq(ptrValue(p), 10);
-
- // Test ImplicitConvert.
- p.value = null;
- do_check_eq(ptrValue(p), 0);
- do_check_throws(function() { p.value = 5; }, TypeError);
-
- // Test opaque pointers.
- let f_t = ctypes.StructType("FILE").ptr;
- do_check_eq(f_t.name, "FILE*");
- do_check_eq(f_t.toSource(), 'ctypes.StructType("FILE").ptr');
- let f = new f_t();
- do_check_throws(function() { f.contents; }, TypeError);
- do_check_throws(function() { f.contents = 0; }, TypeError);
- f = f_t(5);
- do_check_throws(function() { f.contents = 0; }, TypeError);
- do_check_eq(f.toSource(), 'FILE.ptr(ctypes.UInt64("0x5"))');
-
- do_check_throws(function() { f_t(p); }, TypeError);
- do_check_throws(function() { f.value = p; }, TypeError);
- do_check_throws(function() { p.value = f; }, TypeError);
-
- // Test void pointers.
- let v_t = ctypes.PointerType(ctypes.void_t);
- do_check_true(v_t === ctypes.voidptr_t);
- let v = v_t(p);
- do_check_eq(ptrValue(v), ptrValue(p));
-
- // Test 'contents'.
- let int32_t = ctypes.int32_t(9);
- p = int32_t.address();
- do_check_eq(p.contents, int32_t.value);
- p.contents = ctypes.int32_t(12);
- do_check_eq(int32_t.value, 12);
-
- // Test 'isNull'.
- let n = f_t(0);
- do_check_true(n.isNull() === true);
- n = p.address();
- do_check_true(n.isNull() === false);
-
- // Test 'increment'/'decrement'.
- g_t = ctypes.StructType("g_t", [{ a: ctypes.int32_t }, { b: ctypes.double }]);
- let a_t = ctypes.ArrayType(g_t, 2);
- let a = new a_t();
- a[0] = g_t(1, 2);
- a[1] = g_t(2, 4);
- let a_p = a.addressOfElement(0).increment();
- do_check_eq(a_p.contents.a, 2);
- do_check_eq(a_p.contents.b, 4);
- a_p = a_p.decrement();
- do_check_eq(a_p.contents.a, 1);
- do_check_eq(a_p.contents.b, 2);
-
- // Check that pointers to arrays of undefined or zero length are legal,
- // but that the former cannot be dereferenced.
- let z_t = ctypes.int32_t.array().ptr;
- do_check_eq(ptrValue(z_t()), 0);
- do_check_throws(function() { z_t().contents }, TypeError);
- z_t = ctypes.int32_t.array(0).ptr;
- do_check_eq(ptrValue(z_t()), 0);
- let z = ctypes.int32_t.array(0)().address();
- do_check_eq(z.contents.length, 0);
-
- // TODO: Somehow, somewhere we should check that:
- //
- // (a) ArrayBuffer and TypedArray can be passed by pointer to a C function
- // (b) SharedArrayBuffer and TypedArray on SAB can NOT be passed in that
- // way (at least not at the moment).
-
- // Set up conversion tests on AB, SAB, TA
- let c_arraybuffer = new ArrayBuffer(256);
- let typed_array_samples =
- [
- [new Int8Array(c_arraybuffer), ctypes.int8_t],
- [new Uint8Array(c_arraybuffer), ctypes.uint8_t],
- [new Int16Array(c_arraybuffer), ctypes.int16_t],
- [new Uint16Array(c_arraybuffer), ctypes.uint16_t],
- [new Int32Array(c_arraybuffer), ctypes.int32_t],
- [new Uint32Array(c_arraybuffer), ctypes.uint32_t],
- [new Float32Array(c_arraybuffer), ctypes.float32_t],
- [new Float64Array(c_arraybuffer), ctypes.float64_t]
- ];
-
- if (typeof SharedArrayBuffer !== "undefined") {
- let c_shared_arraybuffer = new SharedArrayBuffer(256);
- typed_array_samples.push([new Int8Array(c_shared_arraybuffer), ctypes.int8_t],
- [new Uint8Array(c_shared_arraybuffer), ctypes.uint8_t],
- [new Int16Array(c_shared_arraybuffer), ctypes.int16_t],
- [new Uint16Array(c_shared_arraybuffer), ctypes.uint16_t],
- [new Int32Array(c_shared_arraybuffer), ctypes.int32_t],
- [new Uint32Array(c_shared_arraybuffer), ctypes.uint32_t],
- [new Float32Array(c_shared_arraybuffer), ctypes.float32_t],
- [new Float64Array(c_shared_arraybuffer), ctypes.float64_t])
- }
-
- // Check that you can convert (Shared)ArrayBuffer or typed array to a C array
- for (let i = 0; i < typed_array_samples.length; ++i) {
- for (let j = 0; j < typed_array_samples.length; ++j) {
- let view = typed_array_samples[i][0];
- let item_type = typed_array_samples[j][1];
- let number_of_items = c_arraybuffer.byteLength / item_type.size;
- let array_type = item_type.array(number_of_items);
-
- // Int8Array on unshared memory is interconvertible with Int8Array on
- // shared memory, etc.
- if (i % 8 != j % 8) {
- do_print("Checking that typed array " + (view.constructor.name) +
- " can NOT be converted to " + item_type + " array");
- do_check_throws(function() { array_type(view); }, TypeError);
- } else {
- do_print("Checking that typed array " + (view.constructor.name) +
- " can be converted to " + item_type + " array");
-
- // Convert ArrayBuffer to array of the right size and check contents
- c_array = array_type(c_arraybuffer);
- for (let k = 0; k < number_of_items; ++k) {
- do_check_eq(c_array[k], view[k]);
- }
-
- // Convert typed array to array of the right size and check contents
- c_array = array_type(view);
- for (let k = 0; k < number_of_items; ++k) {
- do_check_eq(c_array[k], view[k]);
- }
-
- // Convert typed array to array of wrong size, ensure that it fails
- let array_type_too_large = item_type.array(number_of_items + 1);
- let array_type_too_small = item_type.array(number_of_items - 1);
-
- do_check_throws(function() { array_type_too_large(c_arraybuffer); }, TypeError);
- do_check_throws(function() { array_type_too_small(c_arraybuffer); }, TypeError);
- do_check_throws(function() { array_type_too_large(view); }, TypeError);
- do_check_throws(function() { array_type_too_small(view); }, TypeError);
-
- // Convert subarray of typed array to array of right size and check contents
- c_array = array_type_too_small(view.subarray(1));
- for (let k = 1; k < number_of_items; ++k) {
- do_check_eq(c_array[k - 1], view[k]);
- }
- }
- }
- }
-
- // Check that you can't use a (Shared)ArrayBuffer or a typed array as a pointer
- for (let i = 0; i < typed_array_samples.length; ++i) {
- for (let j = 0; j < typed_array_samples.length; ++j) {
- let view = typed_array_samples[i][0];
- let item_type = typed_array_samples[j][1];
-
- do_print("Checking that typed array " + (view.constructor.name) +
- " can NOT be converted to " + item_type + " pointer/array");
- do_check_throws(function() { item_type.ptr(c_arraybuffer); }, TypeError);
- do_check_throws(function() { item_type.ptr(view); }, TypeError);
- do_check_throws(function() { ctypes.voidptr_t(c_arraybuffer); }, TypeError);
- do_check_throws(function() { ctypes.voidptr_t(view); }, TypeError);
- }
- }
-}
-
-function run_FunctionType_tests() {
- run_type_ctor_class_tests(ctypes.FunctionType,
- ctypes.FunctionType(ctypes.default_abi, ctypes.void_t),
- ctypes.FunctionType(ctypes.default_abi, ctypes.void_t, [ ctypes.int32_t ]),
- [ "abi", "returnType", "argTypes", "isVariadic" ],
- undefined, undefined, undefined, undefined);
-
- do_check_throws(function() { ctypes.FunctionType(); }, TypeError);
- do_check_throws(function() {
- ctypes.FunctionType(ctypes.default_abi, ctypes.void_t, [ ctypes.void_t ]);
- }, TypeError);
- do_check_throws(function() {
- ctypes.FunctionType(ctypes.default_abi, ctypes.void_t, [ ctypes.void_t ], 5);
- }, TypeError);
- do_check_throws(function() {
- ctypes.FunctionType(ctypes.default_abi, ctypes.void_t, ctypes.void_t);
- }, TypeError);
- do_check_throws(function() {
- ctypes.FunctionType(ctypes.default_abi, ctypes.void_t, null);
- }, TypeError);
- do_check_throws(function() {
- ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t());
- }, TypeError);
- do_check_throws(function() {
- ctypes.FunctionType(ctypes.void_t, ctypes.void_t);
- }, Error);
-
- let g_t = ctypes.StructType("g_t", [{ a: ctypes.int32_t }, { b: ctypes.double }]);
-
- let f_t = ctypes.FunctionType(ctypes.default_abi, g_t);
- let name = "g_t()";
- do_check_eq(f_t.name, name);
- do_check_eq(f_t.size, undefined);
- do_check_true(f_t.abi === ctypes.default_abi);
- do_check_true(f_t.returnType === g_t);
- do_check_true(f_t.argTypes.length == 0);
-
- do_check_eq(f_t.toString(), "type " + name);
- do_check_eq(f_t.toSource(),
- "ctypes.FunctionType(ctypes.default_abi, g_t)");
-
- let fp_t = f_t.ptr;
- name = "g_t(*)()";
- do_check_eq(fp_t.name, name);
- do_check_eq(fp_t.size, ctypes.uintptr_t.size);
-
- do_check_eq(fp_t.toString(), "type " + name);
- do_check_eq(fp_t.toSource(),
- "ctypes.FunctionType(ctypes.default_abi, g_t).ptr");
-
- // Check that constructing a FunctionType CData directly throws.
- do_check_throws(function() { f_t(); }, TypeError);
-
- // Test ExplicitConvert.
- let f = fp_t();
- do_check_throws(function() { f.value; }, TypeError);
- do_check_eq(ptrValue(f), 0);
- f = fp_t(5);
- do_check_eq(ptrValue(f), 5);
- f = fp_t(ctypes.UInt64(10));
- do_check_eq(ptrValue(f), 10);
-
- // Test ImplicitConvert.
- f.value = null;
- do_check_eq(ptrValue(f), 0);
- do_check_throws(function() { f.value = 5; }, TypeError);
- do_check_eq(f.toSource(),
- 'ctypes.FunctionType(ctypes.default_abi, g_t).ptr(ctypes.UInt64("0x0"))');
-
- // Test ImplicitConvert from a function pointer of different type.
- let f2_t = ctypes.FunctionType(ctypes.default_abi, g_t, [ ctypes.int32_t ]);
- let f2 = f2_t.ptr();
- do_check_throws(function() { f.value = f2; }, TypeError);
- do_check_throws(function() { f2.value = f; }, TypeError);
-
- // Test that converting to a voidptr_t works.
- let v = ctypes.voidptr_t(f2);
- do_check_eq(v.toSource(), 'ctypes.voidptr_t(ctypes.UInt64("0x0"))');
-
- // Test some more complex names.
- do_check_eq(fp_t.array().name, "g_t(*[])()");
- do_check_eq(fp_t.array().ptr.name, "g_t(*(*)[])()");
-
- let f3_t = ctypes.FunctionType(ctypes.default_abi,
- ctypes.char.ptr.array().ptr).ptr.ptr.array(8).array();
- do_check_eq(f3_t.name, "char*(*(**[][8])())[]");
-
- if ("winLastError" in ctypes) {
- f3_t = ctypes.FunctionType(ctypes.stdcall_abi,
- ctypes.char.ptr.array().ptr).ptr.ptr.array(8).array();
- do_check_eq(f3_t.name, "char*(*(__stdcall**[][8])())[]");
- f3_t = ctypes.FunctionType(ctypes.winapi_abi,
- ctypes.char.ptr.array().ptr).ptr.ptr.array(8).array();
- do_check_eq(f3_t.name, "char*(*(WINAPI**[][8])())[]");
- }
-
- let f4_t = ctypes.FunctionType(ctypes.default_abi,
- ctypes.char.ptr.array().ptr, [ ctypes.int32_t, fp_t ]);
- do_check_true(f4_t.argTypes.length == 2);
- do_check_true(f4_t.argTypes[0] === ctypes.int32_t);
- do_check_true(f4_t.argTypes[1] === fp_t);
-/* disabled temporarily per bug 598225.
- do_check_throws(function() { f4_t.argTypes.z = 0; }, Error);
- do_check_throws(function() { f4_t.argTypes[0] = 0; }, Error);
-*/
-
- let t4_t = f4_t.ptr.ptr.array(8).array();
- do_check_eq(t4_t.name, "char*(*(**[][8])(int32_t, g_t(*)()))[]");
-
- // Not available in a Worker
- if ("@mozilla.org/systemprincipal;1" in Components.classes) {
- var sp = Components.classes["@mozilla.org/systemprincipal;1"].
- createInstance(Components.interfaces.nsIPrincipal);
- var s = new Components.utils.Sandbox(sp);
- s.ctypes = ctypes;
- s.do_check_eq = do_check_eq;
- s.do_check_true = do_check_true;
- Components.utils.evalInSandbox("var f5_t = ctypes.FunctionType(ctypes.default_abi, ctypes.int, [ctypes.int]);", s);
- Components.utils.evalInSandbox("do_check_eq(f5_t.toSource(), 'ctypes.FunctionType(ctypes.default_abi, ctypes.int, [ctypes.int])');", s);
- Components.utils.evalInSandbox("do_check_eq(f5_t.name, 'int(int)');", s);
- Components.utils.evalInSandbox("function f5(aArg) { return 5; };", s);
- Components.utils.evalInSandbox("var f = f5_t.ptr(f5);", s);
- Components.utils.evalInSandbox("do_check_true(f(6) == 5);", s);
- }
-}
-
-function run_ArrayType_tests() {
- run_type_ctor_class_tests(ctypes.ArrayType,
- ctypes.ArrayType(ctypes.int32_t, 10), ctypes.ArrayType(ctypes.int64_t),
- [ "elementType", "length" ], [], [ "length" ], [ "addressOfElement" ]);
-
- do_check_throws(function() { ctypes.ArrayType(); }, TypeError);
- do_check_throws(function() { ctypes.ArrayType(null); }, TypeError);
- do_check_throws(function() { ctypes.ArrayType(ctypes.int32_t, 1, 5); }, TypeError);
- do_check_throws(function() { ctypes.ArrayType(ctypes.int32_t, -1); }, TypeError);
-
- let name = "g_t";
- let g_t = ctypes.StructType(name, [{ a: ctypes.int32_t }, { b: ctypes.double }]);
- let g = g_t(1, 2);
-
- let a_t = ctypes.ArrayType(g_t, 10);
- do_check_eq(a_t.name, name + "[10]");
- do_check_eq(a_t.length, 10);
- do_check_eq(a_t.size, g_t.size * 10);
- do_check_true(a_t.elementType === g_t);
-
- do_check_eq(a_t.toString(), "type " + name + "[10]");
- do_check_eq(a_t.toSource(),
- "ctypes.StructType(\"g_t\", [{ \"a\": ctypes.int32_t }, { \"b\": ctypes.double }]).array(10)");
- do_check_eq(a_t.array().name, name + "[][10]");
- do_check_eq(a_t.array(5).name, name + "[5][10]");
- do_check_throws(function() { ctypes.int32_t.array().array(); }, Error);
-
- let a = new a_t();
- do_check_eq(a[0].a, 0);
- do_check_eq(a[0].b, 0);
- a[0] = g;
- do_check_eq(a[0].a, 1);
- do_check_eq(a[0].b, 2);
- do_check_throws(function() { a[-1]; }, TypeError);
- do_check_eq(a[9].a, 0);
- do_check_throws(function() { a[10]; }, RangeError);
-
- do_check_eq(a[ctypes.Int64(0)].a, 1);
- do_check_eq(a[ctypes.UInt64(0)].b, 2);
-
- let a_p = a.addressOfElement(0);
- do_check_true(a_p.constructor.targetType === g_t);
- do_check_true(a_p.constructor === g_t.ptr);
- do_check_eq(a_p.contents.a, a[0].a);
- do_check_eq(a_p.contents.b, a[0].b);
- a_p.contents.a = 5;
- do_check_eq(a[0].a, 5);
-
- let a2_t = ctypes.ArrayType(g_t);
- do_check_eq(a2_t.name, "g_t[]");
- do_check_eq(a2_t.length, undefined);
- do_check_eq(a2_t.size, undefined);
- let a2 = new a2_t(5);
- do_check_eq(a2.constructor.length, 5);
- do_check_eq(a2.length, 5);
- do_check_eq(a2.constructor.size, g_t.size * 5);
- do_check_throws(function() { new a2_t(); }, TypeError);
- do_check_throws(function() { ctypes.ArrayType(ctypes.ArrayType(g_t)); }, Error);
- do_check_throws(function() { ctypes.ArrayType(ctypes.ArrayType(g_t), 5); }, Error);
-
- let b_t = ctypes.int8_t.array(ctypes.UInt64(0xffff));
- do_check_eq(b_t.length, 0xffff);
- b_t = ctypes.int8_t.array(ctypes.Int64(0xffff));
- do_check_eq(b_t.length, 0xffff);
-
- // Check that array size bounds work, and that large, but not illegal, sizes
- // are OK.
- if (ctypes.size_t.size == 4) {
- do_check_throws(function() {
- ctypes.ArrayType(ctypes.int8_t, 0x100000000);
- }, TypeError);
- do_check_throws(function() {
- ctypes.ArrayType(ctypes.int16_t, 0x80000000);
- }, RangeError);
-
- let large_t = ctypes.int8_t.array(0x80000000);
- do_check_throws(function() { large_t.array(2); }, RangeError);
-
- } else {
- do_check_throws(function() {
- ctypes.ArrayType(ctypes.int8_t, ctypes.UInt64("0xffffffffffffffff"));
- }, TypeError);
- do_check_throws(function() {
- ctypes.ArrayType(ctypes.int16_t, ctypes.UInt64("0x8000000000000000"));
- }, RangeError);
-
- let large_t = ctypes.int8_t.array(0x8000000000000000);
- do_check_throws(function() { large_t.array(2); }, RangeError);
- }
-
- // Test that arrays ImplicitConvert to pointers.
- let b = ctypes.int32_t.array(10)();
- let p = ctypes.int32_t.ptr();
- p.value = b;
- do_check_eq(ptrValue(b.addressOfElement(0)), ptrValue(p));
- p = ctypes.voidptr_t();
- p.value = b;
- do_check_eq(ptrValue(b.addressOfElement(0)), ptrValue(p));
-
- // Test that arrays can be constructed through ImplicitConvert.
- let c_t = ctypes.int32_t.array(6);
- let c = c_t();
- c.value = [1, 2, 3, 4, 5, 6];
- do_check_eq(c.toSource(), "ctypes.int32_t.array(6)([1, 2, 3, 4, 5, 6])");
- do_check_eq(c.toSource(), c.toString());
- eval("var c2 = " + c.toSource());
- do_check_eq(c2.constructor.name, "int32_t[6]");
- do_check_eq(c2.length, 6);
- do_check_eq(c2[3], c[3]);
-
- c.value = c;
- do_check_eq(c[3], 4);
- do_check_throws(function() { c.value; }, TypeError);
- do_check_throws(function() { c.value = [1, 2, 3, 4, 5]; }, TypeError);
- do_check_throws(function() { c.value = [1, 2, 3, 4, 5, 6, 7]; }, TypeError);
- do_check_throws(function() { c.value = [1, 2, 7.4, 4, 5, 6]; }, TypeError);
- do_check_throws(function() { c.value = []; }, TypeError);
-}
-
-function run_type_toString_tests() {
- var c = ctypes;
-
- // Figure out whether we can create functions with ctypes.stdcall_abi and ctypes.winapi_abi.
- var haveStdCallABI;
- try {
- c.FunctionType(c.stdcall_abi, c.int);
- haveStdCallABI = true;
- } catch (x) {
- haveStdCallABI = false;
- }
-
- var haveWinAPIABI;
- try {
- c.FunctionType(c.winapi_abi, c.int);
- haveWinAPIABI = true;
- } catch (x) {
- haveWinAPIABI = false;
- }
-
- do_check_eq(c.char.toString(), "type char");
- do_check_eq(c.short.toString(), "type short");
- do_check_eq(c.int.toString(), "type int");
- do_check_eq(c.long.toString(), "type long");
- do_check_eq(c.long_long.toString(), "type long_long");
- do_check_eq(c.ssize_t.toString(), "type ssize_t");
- do_check_eq(c.int8_t.toString(), "type int8_t");
- do_check_eq(c.int16_t.toString(), "type int16_t");
- do_check_eq(c.int32_t.toString(), "type int32_t");
- do_check_eq(c.int64_t.toString(), "type int64_t");
- do_check_eq(c.intptr_t.toString(), "type intptr_t");
-
- do_check_eq(c.unsigned_char.toString(), "type unsigned_char");
- do_check_eq(c.unsigned_short.toString(), "type unsigned_short");
- do_check_eq(c.unsigned_int.toString(), "type unsigned_int");
- do_check_eq(c.unsigned_long.toString(), "type unsigned_long");
- do_check_eq(c.unsigned_long_long.toString(), "type unsigned_long_long");
- do_check_eq(c.size_t.toString(), "type size_t");
- do_check_eq(c.uint8_t.toString(), "type uint8_t");
- do_check_eq(c.uint16_t.toString(), "type uint16_t");
- do_check_eq(c.uint32_t.toString(), "type uint32_t");
- do_check_eq(c.uint64_t.toString(), "type uint64_t");
- do_check_eq(c.uintptr_t.toString(), "type uintptr_t");
-
- do_check_eq(c.float.toString(), "type float");
- do_check_eq(c.double.toString(), "type double");
- do_check_eq(c.bool.toString(), "type bool");
- do_check_eq(c.void_t.toString(), "type void");
- do_check_eq(c.voidptr_t.toString(), "type void*");
- do_check_eq(c.char16_t.toString(), "type char16_t");
-
- var simplestruct = c.StructType("simplestruct", [{"smitty":c.voidptr_t}]);
- do_check_eq(simplestruct.toString(), "type simplestruct");
-
- // One type modifier, int base type.
- do_check_eq(c.int.ptr.toString(), "type int*");
- do_check_eq(c.ArrayType(c.int).toString(), "type int[]");
- do_check_eq(c.ArrayType(c.int, 4).toString(), "type int[4]");
- do_check_eq(c.FunctionType(c.default_abi, c.int).toString(), "type int()");
- do_check_eq(c.FunctionType(c.default_abi, c.int, [c.bool]).toString(), "type int(bool)");
- do_check_eq(c.FunctionType(c.default_abi, c.int, [c.bool, c.short]).toString(),
- "type int(bool, short)");
- if (haveStdCallABI)
- do_check_eq(c.FunctionType(c.stdcall_abi, c.int).toString(), "type int __stdcall()");
- if (haveWinAPIABI)
- do_check_eq(c.FunctionType(c.winapi_abi, c.int).toString(), "type int WINAPI()");
-
- // One type modifier, struct base type.
- do_check_eq(simplestruct.ptr.toString(), "type simplestruct*");
- do_check_eq(c.ArrayType(simplestruct).toString(), "type simplestruct[]");
- do_check_eq(c.ArrayType(simplestruct, 4).toString(), "type simplestruct[4]");
- do_check_eq(c.FunctionType(c.default_abi, simplestruct).toString(), "type simplestruct()");
-
- // Two levels of type modifiers, int base type.
- do_check_eq(c.int.ptr.ptr.toString(), "type int**");
- do_check_eq(c.ArrayType(c.int.ptr).toString(), "type int*[]");
- do_check_eq(c.FunctionType(c.default_abi, c.int.ptr).toString(), "type int*()");
-
- do_check_eq(c.ArrayType(c.int).ptr.toString(), "type int(*)[]");
- do_check_eq(c.ArrayType(c.ArrayType(c.int, 4)).toString(), "type int[][4]");
- // Functions can't return arrays.
-
- do_check_eq(c.FunctionType(c.default_abi, c.int).ptr.toString(), "type int(*)()");
- // You can't have an array of functions.
- // Functions can't return functions.
-
- // We don't try all the permissible three-deep combinations, but this is fun.
- do_check_eq(c.FunctionType(c.default_abi, c.FunctionType(c.default_abi, c.int).ptr).toString(),
- "type int(*())()");
-}
-
-function run_cast_tests() {
- // Test casting between basic types.
- let i = ctypes.int32_t();
- let j = ctypes.cast(i, ctypes.int16_t);
- do_check_eq(ptrValue(i.address()), ptrValue(j.address()));
- do_check_eq(i.value, j.value);
- let k = ctypes.cast(i, ctypes.uint32_t);
- do_check_eq(ptrValue(i.address()), ptrValue(k.address()));
- do_check_eq(i.value, k.value);
-
- // Test casting to a type of undefined or larger size.
- do_check_throws(function() { ctypes.cast(i, ctypes.void_t); }, TypeError);
- do_check_throws(function() { ctypes.cast(i, ctypes.int32_t.array()); }, TypeError);
- do_check_throws(function() { ctypes.cast(i, ctypes.int64_t); }, TypeError);
-
- // Test casting between special types.
- let g_t = ctypes.StructType("g_t", [{ a: ctypes.int32_t }, { b: ctypes.double }]);
- let a_t = ctypes.ArrayType(g_t, 4);
- let f_t = ctypes.FunctionType(ctypes.default_abi, ctypes.void_t).ptr;
-
- let a = a_t();
- a[0] = { a: 5, b: 7.5 };
- let g = ctypes.cast(a, g_t);
- do_check_eq(ptrValue(a.address()), ptrValue(g.address()));
- do_check_eq(a[0].a, g.a);
-
- let a2 = ctypes.cast(g, g_t.array(1));
- do_check_eq(ptrValue(a2.address()), ptrValue(g.address()));
- do_check_eq(a2[0].a, g.a);
-
- let p = g.address();
- let ip = ctypes.cast(p, ctypes.int32_t.ptr);
- do_check_eq(ptrValue(ip), ptrValue(p));
- do_check_eq(ptrValue(ip.address()), ptrValue(p.address()));
- do_check_eq(ip.contents, g.a);
-
- let f = f_t(0x5);
- let f2 = ctypes.cast(f, ctypes.voidptr_t);
- do_check_eq(ptrValue(f2), ptrValue(f));
- do_check_eq(ptrValue(f2.address()), ptrValue(f.address()));
-}
-
-function run_void_tests(library) {
- let test_void_t = library.declare("test_void_t_cdecl", ctypes.default_abi, ctypes.void_t);
- do_check_eq(test_void_t(), undefined);
-
- // Test that library.declare throws with void function args.
- do_check_throws(function() {
- library.declare("test_void_t_cdecl", ctypes.default_abi, ctypes.void_t, ctypes.void_t);
- }, TypeError);
-
- if ("winLastError" in ctypes) {
- test_void_t = library.declare("test_void_t_stdcall", ctypes.stdcall_abi, ctypes.void_t);
- do_check_eq(test_void_t(), undefined);
-
- // Check that WINAPI symbol lookup for a regular stdcall function fails on
- // Win32 (it's all the same on Win64 though).
- if (ctypes.voidptr_t.size == 4) {
- do_check_throws(function() {
- library.declare("test_void_t_stdcall", ctypes.winapi_abi, ctypes.void_t);
- }, Error);
- }
- }
-}
-
-function run_string_tests(library) {
- let test_ansi_len = library.declare("test_ansi_len", ctypes.default_abi, ctypes.int32_t, ctypes.char.ptr);
- do_check_eq(test_ansi_len(""), 0);
- do_check_eq(test_ansi_len("hello world"), 11);
-
- // don't convert anything else to a string
- let vals = [true, 0, 1/3, undefined, {}, {toString: function () { return "bad"; }}, []];
- for (let i = 0; i < vals.length; i++)
- do_check_throws(function() { test_ansi_len(vals[i]); }, TypeError);
-
- let test_wide_len = library.declare("test_wide_len", ctypes.default_abi, ctypes.int32_t, ctypes.char16_t.ptr);
- do_check_eq(test_wide_len("hello world"), 11);
-
- let test_ansi_ret = library.declare("test_ansi_ret", ctypes.default_abi, ctypes.char.ptr);
- do_check_eq(test_ansi_ret().readString(), "success");
-
- let test_wide_ret = library.declare("test_wide_ret", ctypes.default_abi, ctypes.char16_t.ptr);
- do_check_eq(test_wide_ret().readString(), "success");
-
- let test_ansi_echo = library.declare("test_ansi_echo", ctypes.default_abi, ctypes.char.ptr, ctypes.char.ptr);
- // We cannot pass a string literal directly into test_ansi_echo, since the
- // conversion to ctypes.char.ptr is only valid for the duration of the ffi
- // call. The escaped pointer that's returned will point to freed memory.
- let arg = ctypes.char.array()("anybody in there?");
- do_check_eq(test_ansi_echo(arg).readString(), "anybody in there?");
- do_check_eq(ptrValue(test_ansi_echo(null)), 0);
-}
-
-function run_readstring_tests(library) {
- // ASCII decode test, "hello world"
- let ascii_string = ctypes.unsigned_char.array(12)();
- ascii_string[0] = 0x68;
- ascii_string[1] = 0x65;
- ascii_string[2] = 0x6C;
- ascii_string[3] = 0x6C;
- ascii_string[4] = 0x6F;
- ascii_string[5] = 0x20;
- ascii_string[6] = 0x77;
- ascii_string[7] = 0x6F;
- ascii_string[8] = 0x72;
- ascii_string[9] = 0x6C;
- ascii_string[10] = 0x64;
- ascii_string[11] = 0;
- do_check_eq("hello world", ascii_string.readStringReplaceMalformed());
-
- // UTF-8 decode test, "U+AC00 U+B098 U+B2E4"
- let utf8_string = ctypes.unsigned_char.array(10)();
- utf8_string[0] = 0xEA;
- utf8_string[1] = 0xB0;
- utf8_string[2] = 0x80;
- utf8_string[3] = 0xEB;
- utf8_string[4] = 0x82;
- utf8_string[5] = 0x98;
- utf8_string[6] = 0xEB;
- utf8_string[7] = 0x8B;
- utf8_string[8] = 0xA4;
- utf8_string[9] = 0x00;
- let utf8_result = utf8_string.readStringReplaceMalformed();
- do_check_eq(0xAC00, utf8_result.charCodeAt(0));
- do_check_eq(0xB098, utf8_result.charCodeAt(1));
- do_check_eq(0xB2E4, utf8_result.charCodeAt(2));
-
- // KS5601 decode test, invalid encoded byte should be replaced with U+FFFD
- let ks5601_string = ctypes.unsigned_char.array(7)();
- ks5601_string[0] = 0xB0;
- ks5601_string[1] = 0xA1;
- ks5601_string[2] = 0xB3;
- ks5601_string[3] = 0xAA;
- ks5601_string[4] = 0xB4;
- ks5601_string[5] = 0xD9;
- ks5601_string[6] = 0x00;
- let ks5601_result = ks5601_string.readStringReplaceMalformed();
- do_check_eq(0xFFFD, ks5601_result.charCodeAt(0));
- do_check_eq(0xFFFD, ks5601_result.charCodeAt(1));
- do_check_eq(0xFFFD, ks5601_result.charCodeAt(2));
- do_check_eq(0xFFFD, ks5601_result.charCodeAt(3));
- do_check_eq(0xFFFD, ks5601_result.charCodeAt(4));
- do_check_eq(0xFFFD, ks5601_result.charCodeAt(5));
-
- // Mixed decode test, "test" + "U+AC00 U+B098 U+B2E4" + "test"
- // invalid encoded byte should be replaced with U+FFFD
- let mixed_string = ctypes.unsigned_char.array(15)();
- mixed_string[0] = 0x74;
- mixed_string[1] = 0x65;
- mixed_string[2] = 0x73;
- mixed_string[3] = 0x74;
- mixed_string[4] = 0xB0;
- mixed_string[5] = 0xA1;
- mixed_string[6] = 0xB3;
- mixed_string[7] = 0xAA;
- mixed_string[8] = 0xB4;
- mixed_string[9] = 0xD9;
- mixed_string[10] = 0x74;
- mixed_string[11] = 0x65;
- mixed_string[12] = 0x73;
- mixed_string[13] = 0x74;
- mixed_string[14] = 0x00;
- let mixed_result = mixed_string.readStringReplaceMalformed();
- do_check_eq(0x74, mixed_result.charCodeAt(0));
- do_check_eq(0x65, mixed_result.charCodeAt(1));
- do_check_eq(0x73, mixed_result.charCodeAt(2));
- do_check_eq(0x74, mixed_result.charCodeAt(3));
- do_check_eq(0xFFFD, mixed_result.charCodeAt(4));
- do_check_eq(0xFFFD, mixed_result.charCodeAt(5));
- do_check_eq(0xFFFD, mixed_result.charCodeAt(6));
- do_check_eq(0xFFFD, mixed_result.charCodeAt(7));
- do_check_eq(0xFFFD, mixed_result.charCodeAt(8));
- do_check_eq(0xFFFD, mixed_result.charCodeAt(9));
- do_check_eq(0x74, mixed_result.charCodeAt(10));
- do_check_eq(0x65, mixed_result.charCodeAt(11));
- do_check_eq(0x73, mixed_result.charCodeAt(12));
- do_check_eq(0x74, mixed_result.charCodeAt(13));
-
- // Test of all posible invalid encoded sequence
- let invalid_string = ctypes.unsigned_char.array(27)();
- invalid_string[0] = 0x80; // 10000000
- invalid_string[1] = 0xD0; // 11000000 01110100
- invalid_string[2] = 0x74;
- invalid_string[3] = 0xE0; // 11100000 01110100
- invalid_string[4] = 0x74;
- invalid_string[5] = 0xE0; // 11100000 10100000 01110100
- invalid_string[6] = 0xA0;
- invalid_string[7] = 0x74;
- invalid_string[8] = 0xE0; // 11100000 10000000 01110100
- invalid_string[9] = 0x80;
- invalid_string[10] = 0x74;
- invalid_string[11] = 0xF0; // 11110000 01110100
- invalid_string[12] = 0x74;
- invalid_string[13] = 0xF0; // 11110000 10010000 01110100
- invalid_string[14] = 0x90;
- invalid_string[15] = 0x74;
- invalid_string[16] = 0xF0; // 11110000 10010000 10000000 01110100
- invalid_string[17] = 0x90;
- invalid_string[18] = 0x80;
- invalid_string[19] = 0x74;
- invalid_string[20] = 0xF0; // 11110000 10000000 10000000 01110100
- invalid_string[21] = 0x80;
- invalid_string[22] = 0x80;
- invalid_string[23] = 0x74;
- invalid_string[24] = 0xF0; // 11110000 01110100
- invalid_string[25] = 0x74;
- invalid_string[26] = 0x00;
- let invalid_result = invalid_string.readStringReplaceMalformed();
- do_check_eq(0xFFFD, invalid_result.charCodeAt(0)); // 10000000
- do_check_eq(0xFFFD, invalid_result.charCodeAt(1)); // 11000000 01110100
- do_check_eq(0x74, invalid_result.charCodeAt(2));
- do_check_eq(0xFFFD, invalid_result.charCodeAt(3)); // 11100000 01110100
- do_check_eq(0x74, invalid_result.charCodeAt(4));
- do_check_eq(0xFFFD, invalid_result.charCodeAt(5)); // 11100000 10100000 01110100
- do_check_eq(0x74, invalid_result.charCodeAt(6));
- do_check_eq(0xFFFD, invalid_result.charCodeAt(7)); // 11100000 10000000 01110100
- do_check_eq(0xFFFD, invalid_result.charCodeAt(8));
- do_check_eq(0x74, invalid_result.charCodeAt(9));
- do_check_eq(0xFFFD, invalid_result.charCodeAt(10)); // 11110000 01110100
- do_check_eq(0x74, invalid_result.charCodeAt(11));
- do_check_eq(0xFFFD, invalid_result.charCodeAt(12)); // 11110000 10010000 01110100
- do_check_eq(0x74, invalid_result.charCodeAt(13));
- do_check_eq(0xFFFD, invalid_result.charCodeAt(14)); // 11110000 10010000 10000000 01110100
- do_check_eq(0x74, invalid_result.charCodeAt(15));
- do_check_eq(0xFFFD, invalid_result.charCodeAt(16)); // 11110000 10000000 10000000 01110100
- do_check_eq(0xFFFD, invalid_result.charCodeAt(17));
- do_check_eq(0xFFFD, invalid_result.charCodeAt(18));
- do_check_eq(0x74, invalid_result.charCodeAt(19));
- do_check_eq(0xFFFD, invalid_result.charCodeAt(20)); // 11110000 01110100
- do_check_eq(0x74, invalid_result.charCodeAt(21));
-
- // Test decoding of UTF-8 and CESU-8
- let utf8_cesu8_string = ctypes.unsigned_char.array(10)();
- utf8_cesu8_string[0] = 0xF0; // U+10400 in UTF-8
- utf8_cesu8_string[1] = 0x90;
- utf8_cesu8_string[2] = 0x90;
- utf8_cesu8_string[3] = 0x80;
- utf8_cesu8_string[4] = 0xED; // U+10400 in CESU-8
- utf8_cesu8_string[5] = 0xA0;
- utf8_cesu8_string[6] = 0x81;
- utf8_cesu8_string[7] = 0xED;
- utf8_cesu8_string[8] = 0xB0;
- utf8_cesu8_string[9] = 0x80;
- let utf8_cesu8_result = utf8_cesu8_string.readStringReplaceMalformed();
- do_check_eq(0xD801, utf8_cesu8_result.charCodeAt(0));
- do_check_eq(0xDC00, utf8_cesu8_result.charCodeAt(1));
- do_check_eq(0xFFFD, utf8_cesu8_result.charCodeAt(2));
- do_check_eq(0xFFFD, utf8_cesu8_result.charCodeAt(3));
-}
-
-function run_struct_tests(library) {
- const point_t = new ctypes.StructType("myPOINT",
- [{ x: ctypes.int32_t },
- { y: ctypes.int32_t }]);
- const rect_t = new ctypes.StructType("myRECT",
- [{ top : ctypes.int32_t },
- { left : ctypes.int32_t },
- { bottom: ctypes.int32_t },
- { right : ctypes.int32_t }]);
-
- let test_pt_in_rect = library.declare("test_pt_in_rect", ctypes.default_abi, ctypes.int32_t, rect_t, point_t);
- let rect = new rect_t(10, 5, 5, 10);
- let pt1 = new point_t(6, 6);
- do_check_eq(test_pt_in_rect(rect, pt1), 1);
- let pt2 = new point_t(2, 2);
- do_check_eq(test_pt_in_rect(rect, pt2), 0);
-
- const inner_t = new ctypes.StructType("INNER",
- [{ i1: ctypes.uint8_t },
- { i2: ctypes.int64_t },
- { i3: ctypes.uint8_t }]);
- const nested_t = new ctypes.StructType("NESTED",
- [{ n1 : ctypes.int32_t },
- { n2 : ctypes.int16_t },
- { inner: inner_t },
- { n3 : ctypes.int64_t },
- { n4 : ctypes.int32_t }]);
-
- let test_nested_struct = library.declare("test_nested_struct", ctypes.default_abi, ctypes.int32_t, nested_t);
- let inner = new inner_t(161, 523412, 43);
- let nested = new nested_t(13155, 1241, inner, 24512115, 1234111);
- // add up all the numbers and make sure the C function agrees
- do_check_eq(test_nested_struct(nested), 26284238);
-
- // test returning a struct by value
- let test_struct_return = library.declare("test_struct_return", ctypes.default_abi, point_t, rect_t);
- let ret = test_struct_return(rect);
- do_check_eq(ret.x, rect.left);
- do_check_eq(ret.y, rect.top);
-
- // struct parameter ABI depends on size; test returning a large struct by value
- test_struct_return = library.declare("test_large_struct_return", ctypes.default_abi, rect_t, rect_t, rect_t);
- ret = test_struct_return(rect_t(1, 2, 3, 4), rect_t(5, 6, 7, 8));
- do_check_eq(ret.left, 2);
- do_check_eq(ret.right, 4);
- do_check_eq(ret.top, 5);
- do_check_eq(ret.bottom, 7);
-
- // ... and tests structs < 8 bytes in size
- for (let i = 1; i < 8; ++i)
- run_small_struct_test(library, rect_t, i);
-
- // test passing a struct by pointer
- let test_init_pt = library.declare("test_init_pt", ctypes.default_abi, ctypes.void_t, point_t.ptr, ctypes.int32_t, ctypes.int32_t);
- test_init_pt(pt1.address(), 9, 10);
- do_check_eq(pt1.x, 9);
- do_check_eq(pt1.y, 10);
-}
-
-function run_small_struct_test(library, rect_t, bytes)
-{
- let fields = [];
- for (let i = 0; i < bytes; ++i) {
- let field = {};
- field["f" + i] = ctypes.uint8_t;
- fields.push(field);
- }
- const small_t = new ctypes.StructType("SMALL", fields);
-
- let test_small_struct_return = library.declare("test_" + bytes + "_byte_struct_return", ctypes.default_abi, small_t, rect_t);
- let ret = test_small_struct_return(rect_t(1, 7, 13, 45));
-
- let exp = [1, 7, 13, 45];
- let j = 0;
- for (let i = 0; i < bytes; ++i) {
- do_check_eq(ret["f" + i], exp[j]);
- if (++j == 4)
- j = 0;
- }
-}
-
-function run_function_tests(library)
-{
- let test_ansi_len = library.declare("test_ansi_len", ctypes.default_abi,
- ctypes.int32_t, ctypes.char.ptr);
- let fn_t = ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t,
- [ ctypes.char.ptr ]).ptr;
-
- let test_fnptr = library.declare("test_fnptr", ctypes.default_abi, fn_t);
-
- // Test that the value handed back by test_fnptr matches the function pointer
- // for test_ansi_len itself.
- let ptr = test_fnptr();
- do_check_eq(ptrValue(test_ansi_len), ptrValue(ptr));
-
- // Test that we can call ptr().
- do_check_eq(ptr("function pointers rule!"), 23);
-
- // Test that we can call via call and apply
- do_check_eq(ptr.call(null, "function pointers rule!"), 23);
- do_check_eq(ptr.apply(null, ["function pointers rule!"]), 23);
-
- // Test that we cannot call non-function pointers via call and apply
- let p_t = ctypes.PointerType(ctypes.int32_t);
- let p = p_t();
- do_check_throws(function() { p.call(null, "woo"); }, TypeError);
- do_check_throws(function() { p.apply(null, ["woo"]); }, TypeError);
-
- // Test the function pointers still behave as regular pointers
- do_check_false(ptr.isNull(), "PointerType methods should still be valid");
-
- // Test that library.declare() returns data of type FunctionType.ptr, and that
- // it is immutable.
- do_check_true(test_ansi_len.constructor.targetType.__proto__ ===
- ctypes.FunctionType.prototype);
- do_check_eq(test_ansi_len.constructor.toSource(),
- "ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t, [ctypes.char.ptr]).ptr");
-/* disabled temporarily per bug 598225.
- do_check_throws(function() { test_ansi_len.value = null; }, Error);
- do_check_eq(ptrValue(test_ansi_len), ptrValue(ptr));
-*/
-
- // Test that the library.declare(name, functionType) form works.
- let test_ansi_len_2 = library.declare("test_ansi_len", fn_t);
- do_check_true(test_ansi_len_2.constructor === fn_t);
- do_check_eq(ptrValue(test_ansi_len), ptrValue(test_ansi_len_2));
-/* disabled temporarily per bug 598225.
- do_check_throws(function() { test_ansi_len_2.value = null; }, Error);
- do_check_eq(ptrValue(test_ansi_len_2), ptrValue(ptr));
-*/
-}
-
-function run_closure_tests(library)
-{
- run_single_closure_tests(library, ctypes.default_abi, "cdecl");
- if ("winLastError" in ctypes) {
- run_single_closure_tests(library, ctypes.stdcall_abi, "stdcall");
-
- // Check that attempting to construct a ctypes.winapi_abi closure throws.
- function closure_fn()
- {
- return 1;
- }
- let fn_t = ctypes.FunctionType(ctypes.winapi_abi, ctypes.int32_t, []).ptr;
- do_check_throws(function() { fn_t(closure_fn) }, Error);
- }
-}
-
-function run_single_closure_tests(library, abi, suffix)
-{
- let b = 23;
-
- function closure_fn(i)
- {
- if (i == 42)
- throw "7.5 million years for that?";
- return "a" in this ? i + this.a : i + b;
- }
-
- do_check_eq(closure_fn(7), 7 + b);
- let thisobj = { a: 5 };
- do_check_eq(closure_fn.call(thisobj, 7), 7 + thisobj.a);
-
- // Construct a closure, and call it ourselves.
- let fn_t = ctypes.FunctionType(abi, ctypes.int32_t, [ ctypes.int8_t ]).ptr;
- let closure = fn_t(closure_fn);
- do_check_eq(closure(-17), -17 + b);
-
- // Have C code call it.
- let test_closure = library.declare("test_closure_" + suffix,
- ctypes.default_abi, ctypes.int32_t, ctypes.int8_t, fn_t);
- do_check_eq(test_closure(-52, closure), -52 + b);
-
- // Do the same, but specify 'this'.
- let closure2 = fn_t(closure_fn, thisobj);
- do_check_eq(closure2(-17), -17 + thisobj.a);
- do_check_eq(test_closure(-52, closure2), -52 + thisobj.a);
-
- // Specify an error sentinel, and have the JS code throw (see bug 599791).
- let closure3 = fn_t(closure_fn, null, 54);
- do_check_eq(closure3(42), 54);
- do_check_eq(test_closure(42, closure3), 54);
-
- // Check what happens when the return type is bigger than a word.
- var fn_64_t = ctypes.FunctionType(ctypes.default_abi, ctypes.uint64_t, [ctypes.bool]).ptr;
- var bignum1 = ctypes.UInt64.join(0xDEADBEEF, 0xBADF00D);
- var bignum2 = ctypes.UInt64.join(0xDEFEC8ED, 0xD15EA5E);
- function closure_fn_64(fail)
- {
- if (fail)
- throw "Just following orders, sir!";
- return bignum1;
- }
- var closure64 = fn_64_t(closure_fn_64, null, bignum2);
- do_check_eq(ctypes.UInt64.compare(closure64(false), bignum1), 0);
- do_check_eq(ctypes.UInt64.compare(closure64(true), bignum2), 0);
-
- // Test a callback that returns void (see bug 682504).
- var fn_v_t = ctypes.FunctionType(ctypes.default_abi, ctypes.void_t, []).ptr;
- fn_v_t(function() {})(); // Don't crash
-
- // Code evaluated in a sandbox uses (and pushes) a separate JSContext.
- // Make sure that we don't run into an assertion caused by a cx stack
- // mismatch with the cx stashed in the closure.
- try {
- var sb = Components.utils.Sandbox("http://www.example.com");
- sb.fn = fn_v_t(function() { sb.foo = {}; });
- Components.utils.evalInSandbox("fn();", sb);
- } catch (e) {} // Components not available in workers.
-
- // Make sure that a void callback can't return an error sentinel.
- var sentinelThrew = false;
- try {
- fn_v_t(function() {}, null, -1);
- } catch (e) {
- sentinelThrew = true;
- }
- do_check_true(sentinelThrew);
-}
-
-function run_variadic_tests(library) {
- let sum_va_type = ctypes.FunctionType(ctypes.default_abi,
- ctypes.int32_t,
- [ctypes.uint8_t, "..."]).ptr,
- sum_va = library.declare("test_sum_va_cdecl", ctypes.default_abi, ctypes.int32_t,
- ctypes.uint8_t, "...");
-
- do_check_eq(sum_va_type.toSource(),
- 'ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t, [ctypes.uint8_t, "..."]).ptr');
- do_check_eq(sum_va.constructor.name, "int32_t(*)(uint8_t, ...)");
- do_check_true(sum_va.constructor.targetType.isVariadic);
-
- do_check_eq(sum_va(3,
- ctypes.int32_t(1),
- ctypes.int32_t(2),
- ctypes.int32_t(3)),
- 6);
-
- do_check_throws(function() {
- ctypes.FunctionType(ctypes.default_abi, ctypes.bool,
- [ctypes.bool, "...", ctypes.bool]);
- }, Error);
-
- do_check_throws(function() {
- ctypes.FunctionType(ctypes.default_abi, ctypes.bool, ["..."]);
- }, Error);
-
- if ("winLastError" in ctypes) {
- do_check_throws(function() {
- ctypes.FunctionType(ctypes.stdcall_abi, ctypes.bool,
- [ctypes.bool, "..."]);
- }, Error);
- do_check_throws(function() {
- ctypes.FunctionType(ctypes.winapi_abi, ctypes.bool,
- [ctypes.bool, "..."]);
- }, Error);
- }
-
- do_check_throws(function() {
- // No variadic closure callbacks allowed.
- sum_va_type(function() {});
- }, Error);
-
- let count_true_va = library.declare("test_sum_va_cdecl", ctypes.default_abi, ctypes.uint8_t,
- ctypes.uint8_t, "...");
- do_check_eq(count_true_va(8,
- ctypes.bool(false),
- ctypes.bool(false),
- ctypes.bool(false),
- ctypes.bool(true),
- ctypes.bool(true),
- ctypes.bool(false),
- ctypes.bool(true),
- ctypes.bool(true)),
- 4);
-
- let add_char_short_int_va = library.declare("test_add_char_short_int_va_cdecl",
- ctypes.default_abi, ctypes.void_t,
- ctypes.uint32_t.ptr, "..."),
- result = ctypes.uint32_t(3);
-
- add_char_short_int_va(result.address(),
- ctypes.char(5),
- ctypes.short(7),
- ctypes.uint32_t(11));
-
- do_check_eq(result.value, 3 + 5 + 7 + 11);
-
- result = ctypes.int32_t.array(3)([1, 1, 1]),
- v1 = ctypes.int32_t.array(4)([1, 2, 3, 5]),
- v2 = ctypes.int32_t.array(3)([7, 11, 13]),
- vector_add_va = library.declare("test_vector_add_va_cdecl",
- ctypes.default_abi, ctypes.int32_t.ptr,
- ctypes.uint8_t, ctypes.uint8_t, "..."),
- // Note that vector_add_va zeroes out result first.
- vec_sum = vector_add_va(2, 3, result, v1, v2);
- do_check_eq(vec_sum.contents, 8);
- do_check_eq(result[0], 8);
- do_check_eq(result[1], 13);
- do_check_eq(result[2], 16);
-
- do_check_true(!!(sum_va_type().value = sum_va_type()));
- let sum_notva_type = ctypes.FunctionType(sum_va_type.targetType.abi,
- sum_va_type.targetType.returnType,
- [ctypes.uint8_t]).ptr;
- do_check_throws(function() {
- sum_va_type().value = sum_notva_type();
- }, TypeError);
-}
-
-function run_static_data_tests(library)
-{
- const rect_t = new ctypes.StructType("myRECT",
- [{ top : ctypes.int32_t },
- { left : ctypes.int32_t },
- { bottom: ctypes.int32_t },
- { right : ctypes.int32_t }]);
-
- let data_rect = library.declare("data_rect", rect_t);
-
- // Test reading static data.
- do_check_true(data_rect.constructor === rect_t);
- do_check_eq(data_rect.top, -1);
- do_check_eq(data_rect.left, -2);
- do_check_eq(data_rect.bottom, 3);
- do_check_eq(data_rect.right, 4);
-
- // Test writing.
- data_rect.top = 9;
- data_rect.left = 8;
- data_rect.bottom = -11;
- data_rect.right = -12;
- do_check_eq(data_rect.top, 9);
- do_check_eq(data_rect.left, 8);
- do_check_eq(data_rect.bottom, -11);
- do_check_eq(data_rect.right, -12);
-
- // Make sure it's been written, not copied.
- let data_rect_2 = library.declare("data_rect", rect_t);
- do_check_eq(data_rect_2.top, 9);
- do_check_eq(data_rect_2.left, 8);
- do_check_eq(data_rect_2.bottom, -11);
- do_check_eq(data_rect_2.right, -12);
- do_check_eq(ptrValue(data_rect.address()), ptrValue(data_rect_2.address()));
-}
-
-function run_cpp_class_tests(library)
-{
- // try the gcc mangling, unless we're using MSVC.
- let OS = get_os();
- let ctor_symbol;
- let add_symbol;
- let abi;
- if (OS == "WINNT") {
- // for compatibility for Win32 vs Win64
- abi = ctypes.thiscall_abi;
- if (ctypes.size_t.size == 8) {
- ctor_symbol = '??0TestClass@@QEAA@H@Z';
- add_symbol = '?Add@TestClass@@QEAAHH@Z';
- } else {
- ctor_symbol = '??0TestClass@@QAE@H@Z';
- add_symbol = '?Add@TestClass@@QAEHH@Z';
- }
- } else {
- abi = ctypes.default_abi;
- ctor_symbol = "_ZN9TestClassC1Ei";
- add_symbol = "_ZN9TestClass3AddEi";
- }
-
- let test_class_ctor = library.declare(ctor_symbol, abi, ctypes.void_t,
- ctypes.int32_t.ptr, ctypes.int32_t);
- let i = ctypes.int32_t();
- test_class_ctor(i.address(), 8);
- do_check_eq(i.value, 8);
-
- let test_class_add = library.declare(add_symbol, abi, ctypes.int32_t,
- ctypes.int32_t.ptr, ctypes.int32_t);
- let j = test_class_add(i.address(), 5);
- do_check_eq(j, 13);
- do_check_eq(i.value, 13);
-}
-
-// bug 522360 - try loading system library without full path
-function run_load_system_library()
-{
- let syslib;
- let OS = get_os();
- if (OS == "WINNT") {
- syslib = ctypes.open("user32.dll");
- } else if (OS == "Darwin") {
- syslib = ctypes.open("libm.dylib");
- } else if (OS == "Linux" || OS == "Android" || OS.match(/BSD$/)) {
- try {
- syslib = ctypes.open("libm.so");
- } catch (e) {
- // limb.so wasn't available, try libm.so.6 instead
- syslib = ctypes.open("libm.so.6");
- }
- } else {
- do_throw("please add a system library for this test");
- }
- syslib.close();
- return true;
-}
diff --git a/toolkit/components/ctypes/tests/unit/xpcshell.ini b/toolkit/components/ctypes/tests/unit/xpcshell.ini
deleted file mode 100644
index 8920d4f9b9..0000000000
--- a/toolkit/components/ctypes/tests/unit/xpcshell.ini
+++ /dev/null
@@ -1,13 +0,0 @@
-[DEFAULT]
-head = head.js
-tail =
-skip-if = toolkit == 'android'
-
-[test_errno.js]
-
-[test_finalizer.js]
-[test_finalizer_shouldfail.js]
-[test_finalizer_shouldaccept.js]
-[test_jsctypes.js]
-# Bug 676989: test fails consistently on Android
-fail-if = os == "android"
diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloads/moz.build
index e611f40104..b6f68e5fb7 100644
--- a/toolkit/components/downloads/moz.build
+++ b/toolkit/components/downloads/moz.build
@@ -4,23 +4,6 @@
# 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/.
-with Files('*'):
- BUG_COMPONENT = ('Toolkit', 'Download Manager')
-
-with Files('ApplicationReputation.*'):
- BUG_COMPONENT = ('Toolkit', 'Safe Browsing')
-
-with Files('chromium/*'):
- BUG_COMPONENT = ('Toolkit', 'Safe Browsing')
-
-with Files('generate_csd.sh'):
- BUG_COMPONENT = ('Toolkit', 'Safe Browsing')
-
-with Files('nsIApplicationReputation.idl'):
- BUG_COMPONENT = ('Toolkit', 'Safe Browsing')
-
-XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
-
XPIDL_SOURCES += [
'nsIApplicationReputation.idl',
'nsIDownload.idl',
@@ -31,14 +14,10 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'downloads'
-UNIFIED_SOURCES += [
- 'nsDownloadManager.cpp'
-]
+UNIFIED_SOURCES += ['nsDownloadManager.cpp']
# SQLFunctions.cpp cannot be built in unified mode because of Windows headers.
-SOURCES += [
- 'SQLFunctions.cpp',
-]
+SOURCES += ['SQLFunctions.cpp']
if CONFIG['MOZ_URL_CLASSIFIER']:
UNIFIED_SOURCES += [
@@ -49,9 +28,7 @@ if CONFIG['MOZ_URL_CLASSIFIER']:
if CONFIG['OS_ARCH'] == 'WINNT':
# Can't build unified because we need CreateEvent which some IPC code
# included in LoadContext ends up undefining.
- SOURCES += [
- 'nsDownloadScanner.cpp',
- ]
+ SOURCES += ['nsDownloadScanner.cpp']
# The Communicator Downloads Manager uses its own DownloadManagerUI
# component and it can't be guaranteed that its implimentation will override
diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp
index ab984c5f20..587c1ac8ab 100644
--- a/toolkit/components/downloads/nsDownloadManager.cpp
+++ b/toolkit/components/downloads/nsDownloadManager.cpp
@@ -61,10 +61,6 @@
#include <CoreFoundation/CoreFoundation.h>
#endif
-#ifdef MOZ_WIDGET_ANDROID
-#include "FennecJNIWrappers.h"
-#endif
-
#ifdef MOZ_WIDGET_GTK
#include <gtk/gtk.h>
#endif
@@ -1421,19 +1417,6 @@ nsDownloadManager::GetDefaultDownloadsDirectory(nsIFile **aResult)
}
}
#elif defined(XP_UNIX)
-#if defined(MOZ_WIDGET_ANDROID)
- // Android doesn't have a $HOME directory, and by default we only have
- // write access to /data/data/org.mozilla.{$APP} and /sdcard
- char* downloadDirPath = getenv("DOWNLOADS_DIRECTORY");
- if (downloadDirPath) {
- rv = NS_NewNativeLocalFile(nsDependentCString(downloadDirPath),
- true, getter_AddRefs(downloadDir));
- NS_ENSURE_SUCCESS(rv, rv);
- }
- else {
- rv = NS_ERROR_FAILURE;
- }
-#else
rv = dirService->Get(NS_UNIX_DEFAULT_DOWNLOAD_DIR,
NS_GET_IID(nsIFile),
getter_AddRefs(downloadDir));
@@ -1446,7 +1429,6 @@ nsDownloadManager::GetDefaultDownloadsDirectory(nsIFile **aResult)
rv = downloadDir->Append(folderName);
NS_ENSURE_SUCCESS(rv, rv);
}
-#endif
#else
rv = dirService->Get(NS_OS_HOME_DIR,
NS_GET_IID(nsIFile),
@@ -1847,6 +1829,9 @@ nsDownloadManager::RetryDownload(nsDownload* dl)
return rv;
}
+ rv = NotifyDownloadRemoval(dl);
+ NS_ENSURE_SUCCESS(rv, rv);
+
// reset time and download progress
dl->SetStartTime(PR_Now());
dl->SetProgressBytes(0, -1);
@@ -2685,14 +2670,6 @@ nsDownload::SetState(DownloadState aState)
case nsIDownloadManager::DOWNLOAD_DIRTY:
case nsIDownloadManager::DOWNLOAD_CANCELED:
case nsIDownloadManager::DOWNLOAD_FAILED:
-#ifdef ANDROID
- // If we still have a temp file, remove it
- bool tempExists;
- if (mTempFile && NS_SUCCEEDED(mTempFile->Exists(&tempExists)) && tempExists) {
- nsresult rv = mTempFile->Remove(false);
- NS_ENSURE_SUCCESS(rv, rv);
- }
-#endif
// Transfers are finished, so break the reference cycle
Finalize();
@@ -2770,7 +2747,7 @@ nsDownload::SetState(DownloadState aState)
}
}
-#if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GTK)
+#if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_GTK)
nsCOMPtr<nsIFileURL> fileURL = do_QueryInterface(mTarget);
nsCOMPtr<nsIFile> file;
nsAutoString path;
@@ -2780,27 +2757,13 @@ nsDownload::SetState(DownloadState aState)
file &&
NS_SUCCEEDED(file->GetPath(path))) {
-#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_ANDROID)
+#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK)
// On Windows and Gtk, add the download to the system's "recent documents"
// list, with a pref to disable.
{
bool addToRecentDocs = true;
if (pref)
pref->GetBoolPref(PREF_BDM_ADDTORECENTDOCS, &addToRecentDocs);
-#ifdef MOZ_WIDGET_ANDROID
- if (addToRecentDocs) {
- nsCOMPtr<nsIMIMEInfo> mimeInfo;
- nsAutoCString contentType;
- GetMIMEInfo(getter_AddRefs(mimeInfo));
-
- if (mimeInfo)
- mimeInfo->GetMIMEType(contentType);
-
- if (jni::IsFennec()) {
- java::DownloadsIntegration::ScanMedia(path, NS_ConvertUTF8toUTF16(contentType));
- }
- }
-#else
if (addToRecentDocs && !mPrivate) {
#ifdef XP_WIN
::SHAddToRecentDocs(SHARD_PATHW, path.get());
@@ -2815,7 +2778,6 @@ nsDownload::SetState(DownloadState aState)
}
#endif
}
-#endif
#ifdef MOZ_ENABLE_GIO
// Use GIO to store the source URI for later display in the file manager.
GFile* gio_file = g_file_new_for_path(NS_ConvertUTF16toUTF8(path).get());
@@ -3124,7 +3086,7 @@ nsDownload::OnStateChange(nsIWebProgress *aWebProgress,
#else
(void)SetState(nsIDownloadManager::DOWNLOAD_FINISHED);
#endif
- } else {
+ } else if (aStatus != NS_BINDING_ABORTED) {
// We failed for some unknown reason -- fail with a generic message
(void)FailDownload(aStatus, nullptr);
}
diff --git a/toolkit/components/downloads/test/unit/.eslintrc.js b/toolkit/components/downloads/test/unit/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/downloads/test/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/downloads/test/unit/data/block_digest.chunk b/toolkit/components/downloads/test/unit/data/block_digest.chunk
deleted file mode 100644
index 34c47c4bb5..0000000000
--- a/toolkit/components/downloads/test/unit/data/block_digest.chunk
+++ /dev/null
@@ -1,2 +0,0 @@
-a:5:32:37
-,AJ,AJ8Wbb_e;OτCV \ No newline at end of file
diff --git a/toolkit/components/downloads/test/unit/data/digest.chunk b/toolkit/components/downloads/test/unit/data/digest.chunk
deleted file mode 100644
index b1fbb46673..0000000000
--- a/toolkit/components/downloads/test/unit/data/digest.chunk
+++ /dev/null
@@ -1,3 +0,0 @@
-a:5:32:64
-_H^a7]=#nmnoQ
-@.R0D7Y4ퟆS$8 \ No newline at end of file
diff --git a/toolkit/components/downloads/test/unit/data/signed_win.exe b/toolkit/components/downloads/test/unit/data/signed_win.exe
deleted file mode 100644
index de3bb40e84..0000000000
--- a/toolkit/components/downloads/test/unit/data/signed_win.exe
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/downloads/test/unit/head_download_manager.js b/toolkit/components/downloads/test/unit/head_download_manager.js
deleted file mode 100644
index 1e8248071d..0000000000
--- a/toolkit/components/downloads/test/unit/head_download_manager.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/* 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 file tests the download manager backend
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-var Cr = Components.results;
-
-do_get_profile();
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://testing-common/httpd.js");
-XPCOMUtils.defineLazyModuleGetter(this, "Promise",
- "resource://gre/modules/Promise.jsm");
-
-function createURI(aObj)
-{
- var ios = Cc["@mozilla.org/network/io-service;1"].
- getService(Ci.nsIIOService);
- return (aObj instanceof Ci.nsIFile) ? ios.newFileURI(aObj) :
- ios.newURI(aObj, null, null);
-}
diff --git a/toolkit/components/downloads/test/unit/tail_download_manager.js b/toolkit/components/downloads/test/unit/tail_download_manager.js
deleted file mode 100644
index 4043f31b9d..0000000000
--- a/toolkit/components/downloads/test/unit/tail_download_manager.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* 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/. */
-
-/**
- * Provides infrastructure for automated download components tests.
- */
-
-"use strict";
-
-// Termination functions common to all tests
-
-add_task(function* test_common_terminate()
-{
- // Stop the HTTP server. We must do this inside a task in "tail.js" until the
- // xpcshell testing framework supports asynchronous termination functions.
- let deferred = Promise.defer();
- gHttpServer.stop(deferred.resolve);
- yield deferred.promise;
-});
-
diff --git a/toolkit/components/downloads/test/unit/test_app_rep.js b/toolkit/components/downloads/test/unit/test_app_rep.js
deleted file mode 100644
index 636a71e78f..0000000000
--- a/toolkit/components/downloads/test/unit/test_app_rep.js
+++ /dev/null
@@ -1,342 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* 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/. */
-
-Cu.import('resource://gre/modules/NetUtil.jsm');
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-const gAppRep = Cc["@mozilla.org/downloads/application-reputation-service;1"].
- getService(Ci.nsIApplicationReputationService);
-var gHttpServ = null;
-var gTables = {};
-
-var ALLOW_LIST = 0;
-var BLOCK_LIST = 1;
-var NO_LIST = 2;
-
-var whitelistedURI = createURI("http://foo:bar@whitelisted.com/index.htm#junk");
-var exampleURI = createURI("http://user:password@example.com/i.html?foo=bar");
-var blocklistedURI = createURI("http://baz:qux@blocklisted.com?xyzzy");
-
-const appRepURLPref = "browser.safebrowsing.downloads.remote.url";
-
-function readFileToString(aFilename) {
- let f = do_get_file(aFilename);
- let stream = Cc["@mozilla.org/network/file-input-stream;1"]
- .createInstance(Ci.nsIFileInputStream);
- stream.init(f, -1, 0, 0);
- let buf = NetUtil.readInputStreamToString(stream, stream.available());
- return buf;
-}
-
-// Registers a table for which to serve update chunks. Returns a promise that
-// resolves when that chunk has been downloaded.
-function registerTableUpdate(aTable, aFilename) {
- // If we haven't been given an update for this table yet, add it to the map
- if (!(aTable in gTables)) {
- gTables[aTable] = [];
- }
-
- // The number of chunks associated with this table.
- let numChunks = gTables[aTable].length + 1;
- let redirectPath = "/" + aTable + "-" + numChunks;
- let redirectUrl = "localhost:4444" + redirectPath;
-
- // Store redirect url for that table so we can return it later when we
- // process an update request.
- gTables[aTable].push(redirectUrl);
-
- gHttpServ.registerPathHandler(redirectPath, function(request, response) {
- do_print("Mock safebrowsing server handling request for " + redirectPath);
- let contents = readFileToString(aFilename);
- do_print("Length of " + aFilename + ": " + contents.length);
- response.setHeader("Content-Type",
- "application/vnd.google.safebrowsing-update", false);
- response.setStatusLine(request.httpVersion, 200, "OK");
- response.bodyOutputStream.write(contents, contents.length);
- });
-}
-
-add_task(function* test_setup() {
- // Set up a local HTTP server to return bad verdicts.
- Services.prefs.setCharPref(appRepURLPref,
- "http://localhost:4444/download");
- // Ensure safebrowsing is enabled for this test, even if the app
- // doesn't have it enabled.
- Services.prefs.setBoolPref("browser.safebrowsing.malware.enabled", true);
- Services.prefs.setBoolPref("browser.safebrowsing.downloads.enabled", true);
- do_register_cleanup(function() {
- Services.prefs.clearUserPref("browser.safebrowsing.malware.enabled");
- Services.prefs.clearUserPref("browser.safebrowsing.downloads.enabled");
- });
-
- // Set block and allow tables explicitly, since the allowlist is normally
- // disabled on non-Windows platforms.
- Services.prefs.setCharPref("urlclassifier.downloadBlockTable",
- "goog-badbinurl-shavar");
- Services.prefs.setCharPref("urlclassifier.downloadAllowTable",
- "goog-downloadwhite-digest256");
- do_register_cleanup(function() {
- Services.prefs.clearUserPref("urlclassifier.downloadBlockTable");
- Services.prefs.clearUserPref("urlclassifier.downloadAllowTable");
- });
-
- gHttpServ = new HttpServer();
- gHttpServ.registerDirectory("/", do_get_cwd());
- gHttpServ.registerPathHandler("/download", function(request, response) {
- do_throw("This test should never make a remote lookup");
- });
- gHttpServ.start(4444);
-});
-
-function run_test() {
- run_next_test();
-}
-
-function check_telemetry(aCount,
- aShouldBlockCount,
- aListCounts) {
- let count = Cc["@mozilla.org/base/telemetry;1"]
- .getService(Ci.nsITelemetry)
- .getHistogramById("APPLICATION_REPUTATION_COUNT")
- .snapshot();
- do_check_eq(count.counts[1], aCount);
- let local = Cc["@mozilla.org/base/telemetry;1"]
- .getService(Ci.nsITelemetry)
- .getHistogramById("APPLICATION_REPUTATION_LOCAL")
- .snapshot();
- do_check_eq(local.counts[ALLOW_LIST], aListCounts[ALLOW_LIST],
- "Allow list counts don't match");
- do_check_eq(local.counts[BLOCK_LIST], aListCounts[BLOCK_LIST],
- "Block list counts don't match");
- do_check_eq(local.counts[NO_LIST], aListCounts[NO_LIST],
- "No list counts don't match");
-
- let shouldBlock = Cc["@mozilla.org/base/telemetry;1"]
- .getService(Ci.nsITelemetry)
- .getHistogramById("APPLICATION_REPUTATION_SHOULD_BLOCK")
- .snapshot();
- // SHOULD_BLOCK = true
- do_check_eq(shouldBlock.counts[1], aShouldBlockCount);
- // Sanity check that SHOULD_BLOCK total adds up to the COUNT.
- do_check_eq(shouldBlock.counts[0] + shouldBlock.counts[1], aCount);
-}
-
-function get_telemetry_counts() {
- let count = Cc["@mozilla.org/base/telemetry;1"]
- .getService(Ci.nsITelemetry)
- .getHistogramById("APPLICATION_REPUTATION_COUNT")
- .snapshot();
- let local = Cc["@mozilla.org/base/telemetry;1"]
- .getService(Ci.nsITelemetry)
- .getHistogramById("APPLICATION_REPUTATION_LOCAL")
- .snapshot();
- let shouldBlock = Cc["@mozilla.org/base/telemetry;1"]
- .getService(Ci.nsITelemetry)
- .getHistogramById("APPLICATION_REPUTATION_SHOULD_BLOCK")
- .snapshot();
- return { total: count.counts[1],
- shouldBlock: shouldBlock.counts[1],
- listCounts: local.counts };
-}
-
-add_test(function test_nullSourceURI() {
- let counts = get_telemetry_counts();
- gAppRep.queryReputation({
- // No source URI
- fileSize: 12,
- }, function onComplete(aShouldBlock, aStatus) {
- do_check_eq(Cr.NS_ERROR_UNEXPECTED, aStatus);
- do_check_false(aShouldBlock);
- check_telemetry(counts.total + 1, counts.shouldBlock, counts.listCounts);
- run_next_test();
- });
-});
-
-add_test(function test_nullCallback() {
- let counts = get_telemetry_counts();
- try {
- gAppRep.queryReputation({
- sourceURI: createURI("http://example.com"),
- fileSize: 12,
- }, null);
- do_throw("Callback cannot be null");
- } catch (ex) {
- if (ex.result != Cr.NS_ERROR_INVALID_POINTER)
- throw ex;
- // We don't even increment the count here, because there's no callback.
- check_telemetry(counts.total, counts.shouldBlock, counts.listCounts);
- run_next_test();
- }
-});
-
-// Set up the local whitelist.
-add_test(function test_local_list() {
- // Construct a response with redirect urls.
- function processUpdateRequest() {
- let response = "n:1000\n";
- for (let table in gTables) {
- response += "i:" + table + "\n";
- for (let i = 0; i < gTables[table].length; ++i) {
- response += "u:" + gTables[table][i] + "\n";
- }
- }
- do_print("Returning update response: " + response);
- return response;
- }
- gHttpServ.registerPathHandler("/downloads", function(request, response) {
- let blob = processUpdateRequest();
- response.setHeader("Content-Type",
- "application/vnd.google.safebrowsing-update", false);
- response.setStatusLine(request.httpVersion, 200, "OK");
- response.bodyOutputStream.write(blob, blob.length);
- });
-
- let streamUpdater = Cc["@mozilla.org/url-classifier/streamupdater;1"]
- .getService(Ci.nsIUrlClassifierStreamUpdater);
-
- // Load up some update chunks for the safebrowsing server to serve.
- // This chunk contains the hash of blocklisted.com/.
- registerTableUpdate("goog-badbinurl-shavar", "data/block_digest.chunk");
- // This chunk contains the hash of whitelisted.com/.
- registerTableUpdate("goog-downloadwhite-digest256", "data/digest.chunk");
-
- // Download some updates, and don't continue until the downloads are done.
- function updateSuccess(aEvent) {
- // Timeout of n:1000 is constructed in processUpdateRequest above and
- // passed back in the callback in nsIUrlClassifierStreamUpdater on success.
- do_check_eq("1000", aEvent);
- do_print("All data processed");
- run_next_test();
- }
- // Just throw if we ever get an update or download error.
- function handleError(aEvent) {
- do_throw("We didn't download or update correctly: " + aEvent);
- }
- streamUpdater.downloadUpdates(
- "goog-downloadwhite-digest256,goog-badbinurl-shavar",
- "goog-downloadwhite-digest256,goog-badbinurl-shavar;\n",
- true, // isPostRequest.
- "http://localhost:4444/downloads",
- updateSuccess, handleError, handleError);
-});
-
-add_test(function test_unlisted() {
- Services.prefs.setCharPref(appRepURLPref,
- "http://localhost:4444/download");
- let counts = get_telemetry_counts();
- let listCounts = counts.listCounts;
- listCounts[NO_LIST]++;
- gAppRep.queryReputation({
- sourceURI: exampleURI,
- fileSize: 12,
- }, function onComplete(aShouldBlock, aStatus) {
- do_check_eq(Cr.NS_OK, aStatus);
- do_check_false(aShouldBlock);
- check_telemetry(counts.total + 1, counts.shouldBlock, listCounts);
- run_next_test();
- });
-});
-
-add_test(function test_non_uri() {
- Services.prefs.setCharPref(appRepURLPref,
- "http://localhost:4444/download");
- let counts = get_telemetry_counts();
- let listCounts = counts.listCounts;
- // No listcount is incremented, since the sourceURI is not an nsIURL
- let source = NetUtil.newURI("data:application/octet-stream,ABC");
- do_check_false(source instanceof Ci.nsIURL);
- gAppRep.queryReputation({
- sourceURI: source,
- fileSize: 12,
- }, function onComplete(aShouldBlock, aStatus) {
- do_check_eq(Cr.NS_OK, aStatus);
- do_check_false(aShouldBlock);
- check_telemetry(counts.total + 1, counts.shouldBlock, listCounts);
- run_next_test();
- });
-});
-
-add_test(function test_local_blacklist() {
- Services.prefs.setCharPref(appRepURLPref,
- "http://localhost:4444/download");
- let counts = get_telemetry_counts();
- let listCounts = counts.listCounts;
- listCounts[BLOCK_LIST]++;
- gAppRep.queryReputation({
- sourceURI: blocklistedURI,
- fileSize: 12,
- }, function onComplete(aShouldBlock, aStatus) {
- do_check_eq(Cr.NS_OK, aStatus);
- do_check_true(aShouldBlock);
- check_telemetry(counts.total + 1, counts.shouldBlock + 1, listCounts);
- run_next_test();
- });
-});
-
-add_test(function test_referer_blacklist() {
- Services.prefs.setCharPref(appRepURLPref,
- "http://localhost:4444/download");
- let counts = get_telemetry_counts();
- let listCounts = counts.listCounts;
- listCounts[BLOCK_LIST]++;
- gAppRep.queryReputation({
- sourceURI: exampleURI,
- referrerURI: blocklistedURI,
- fileSize: 12,
- }, function onComplete(aShouldBlock, aStatus) {
- do_check_eq(Cr.NS_OK, aStatus);
- do_check_true(aShouldBlock);
- check_telemetry(counts.total + 1, counts.shouldBlock + 1, listCounts);
- run_next_test();
- });
-});
-
-add_test(function test_blocklist_trumps_allowlist() {
- Services.prefs.setCharPref(appRepURLPref,
- "http://localhost:4444/download");
- let counts = get_telemetry_counts();
- let listCounts = counts.listCounts;
- listCounts[BLOCK_LIST]++;
- gAppRep.queryReputation({
- sourceURI: whitelistedURI,
- referrerURI: blocklistedURI,
- fileSize: 12,
- }, function onComplete(aShouldBlock, aStatus) {
- do_check_eq(Cr.NS_OK, aStatus);
- do_check_true(aShouldBlock);
- check_telemetry(counts.total + 1, counts.shouldBlock + 1, listCounts);
- run_next_test();
- });
-});
-
-add_test(function test_redirect_on_blocklist() {
- Services.prefs.setCharPref(appRepURLPref,
- "http://localhost:4444/download");
- let counts = get_telemetry_counts();
- let listCounts = counts.listCounts;
- listCounts[BLOCK_LIST]++;
- listCounts[ALLOW_LIST]++;
- let secman = Services.scriptSecurityManager;
- let badRedirects = Cc["@mozilla.org/array;1"]
- .createInstance(Ci.nsIMutableArray);
- badRedirects.appendElement(secman.createCodebasePrincipal(exampleURI, {}),
- false);
- badRedirects.appendElement(secman.createCodebasePrincipal(blocklistedURI, {}),
- false);
- badRedirects.appendElement(secman.createCodebasePrincipal(whitelistedURI, {}),
- false);
- gAppRep.queryReputation({
- sourceURI: whitelistedURI,
- referrerURI: exampleURI,
- redirects: badRedirects,
- fileSize: 12,
- }, function onComplete(aShouldBlock, aStatus) {
- do_check_eq(Cr.NS_OK, aStatus);
- do_check_true(aShouldBlock);
- check_telemetry(counts.total + 1, counts.shouldBlock + 1, listCounts);
- run_next_test();
- });
-});
diff --git a/toolkit/components/downloads/test/unit/test_app_rep_maclinux.js b/toolkit/components/downloads/test/unit/test_app_rep_maclinux.js
deleted file mode 100644
index 7f94d15204..0000000000
--- a/toolkit/components/downloads/test/unit/test_app_rep_maclinux.js
+++ /dev/null
@@ -1,303 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * This file tests signature extraction using Windows Authenticode APIs of
- * downloaded files.
- */
-
-// Globals
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
- "resource://gre/modules/NetUtil.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Promise",
- "resource://gre/modules/Promise.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Task",
- "resource://gre/modules/Task.jsm");
-
-const gAppRep = Cc["@mozilla.org/downloads/application-reputation-service;1"].
- getService(Ci.nsIApplicationReputationService);
-var gStillRunning = true;
-var gTables = {};
-var gHttpServer = null;
-
-const appRepURLPref = "browser.safebrowsing.downloads.remote.url";
-const remoteEnabledPref = "browser.safebrowsing.downloads.remote.enabled";
-
-function readFileToString(aFilename) {
- let f = do_get_file(aFilename);
- let stream = Cc["@mozilla.org/network/file-input-stream;1"]
- .createInstance(Ci.nsIFileInputStream);
- stream.init(f, -1, 0, 0);
- let buf = NetUtil.readInputStreamToString(stream, stream.available());
- return buf;
-}
-
-function registerTableUpdate(aTable, aFilename) {
- // If we haven't been given an update for this table yet, add it to the map
- if (!(aTable in gTables)) {
- gTables[aTable] = [];
- }
-
- // The number of chunks associated with this table.
- let numChunks = gTables[aTable].length + 1;
- let redirectPath = "/" + aTable + "-" + numChunks;
- let redirectUrl = "localhost:4444" + redirectPath;
-
- // Store redirect url for that table so we can return it later when we
- // process an update request.
- gTables[aTable].push(redirectUrl);
-
- gHttpServer.registerPathHandler(redirectPath, function(request, response) {
- do_print("Mock safebrowsing server handling request for " + redirectPath);
- let contents = readFileToString(aFilename);
- do_print("Length of " + aFilename + ": " + contents.length);
- response.setHeader("Content-Type",
- "application/vnd.google.safebrowsing-update", false);
- response.setStatusLine(request.httpVersion, 200, "OK");
- response.bodyOutputStream.write(contents, contents.length);
- });
-}
-
-// Tests
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function test_setup()
-{
- // Wait 10 minutes, that is half of the external xpcshell timeout.
- do_timeout(10 * 60 * 1000, function() {
- if (gStillRunning) {
- do_throw("Test timed out.");
- }
- });
- // Set up a local HTTP server to return bad verdicts.
- Services.prefs.setCharPref(appRepURLPref,
- "http://localhost:4444/download");
- // Ensure safebrowsing is enabled for this test, even if the app
- // doesn't have it enabled.
- Services.prefs.setBoolPref("browser.safebrowsing.malware.enabled", true);
- Services.prefs.setBoolPref("browser.safebrowsing.downloads.enabled", true);
- // Set block table explicitly, no need for the allow table though
- Services.prefs.setCharPref("urlclassifier.downloadBlockTable",
- "goog-badbinurl-shavar");
- // SendRemoteQueryInternal needs locale preference.
- let locale = Services.prefs.getCharPref("general.useragent.locale");
- Services.prefs.setCharPref("general.useragent.locale", "en-US");
-
- do_register_cleanup(function() {
- Services.prefs.clearUserPref("browser.safebrowsing.malware.enabled");
- Services.prefs.clearUserPref("browser.safebrowsing.downloads.enabled");
- Services.prefs.clearUserPref("urlclassifier.downloadBlockTable");
- Services.prefs.setCharPref("general.useragent.locale", locale);
- });
-
- gHttpServer = new HttpServer();
- gHttpServer.registerDirectory("/", do_get_cwd());
-
- function createVerdict(aShouldBlock) {
- // We can't programmatically create a protocol buffer here, so just
- // hardcode some already serialized ones.
- let blob = String.fromCharCode(parseInt(0x08, 16));
- if (aShouldBlock) {
- // A safe_browsing::ClientDownloadRequest with a DANGEROUS verdict
- blob += String.fromCharCode(parseInt(0x01, 16));
- } else {
- // A safe_browsing::ClientDownloadRequest with a SAFE verdict
- blob += String.fromCharCode(parseInt(0x00, 16));
- }
- return blob;
- }
-
- gHttpServer.registerPathHandler("/throw", function(request, response) {
- do_throw("We shouldn't be getting here");
- });
-
- gHttpServer.registerPathHandler("/download", function(request, response) {
- do_print("Querying remote server for verdict");
- response.setHeader("Content-Type", "application/octet-stream", false);
- let buf = NetUtil.readInputStreamToString(
- request.bodyInputStream,
- request.bodyInputStream.available());
- do_print("Request length: " + buf.length);
- // A garbage response. By default this produces NS_CANNOT_CONVERT_DATA as
- // the callback status.
- let blob = "this is not a serialized protocol buffer (the length doesn't match our hard-coded values)";
- // We can't actually parse the protocol buffer here, so just switch on the
- // length instead of inspecting the contents.
- if (buf.length == 67) {
- // evil.com
- blob = createVerdict(true);
- } else if (buf.length == 73) {
- // mozilla.com
- blob = createVerdict(false);
- }
- response.bodyOutputStream.write(blob, blob.length);
- });
-
- gHttpServer.start(4444);
-});
-
-// Construct a response with redirect urls.
-function processUpdateRequest() {
- let response = "n:1000\n";
- for (let table in gTables) {
- response += "i:" + table + "\n";
- for (let i = 0; i < gTables[table].length; ++i) {
- response += "u:" + gTables[table][i] + "\n";
- }
- }
- do_print("Returning update response: " + response);
- return response;
-}
-
-// Set up the local whitelist.
-function waitForUpdates() {
- let deferred = Promise.defer();
- gHttpServer.registerPathHandler("/downloads", function(request, response) {
- let blob = processUpdateRequest();
- response.setHeader("Content-Type",
- "application/vnd.google.safebrowsing-update", false);
- response.setStatusLine(request.httpVersion, 200, "OK");
- response.bodyOutputStream.write(blob, blob.length);
- });
-
- let streamUpdater = Cc["@mozilla.org/url-classifier/streamupdater;1"]
- .getService(Ci.nsIUrlClassifierStreamUpdater);
-
- // Load up some update chunks for the safebrowsing server to serve. This
- // particular chunk contains the hash of whitelisted.com/ and
- // sb-ssl.google.com/safebrowsing/csd/certificate/.
- registerTableUpdate("goog-downloadwhite-digest256", "data/digest.chunk");
-
- // Resolve the promise once processing the updates is complete.
- function updateSuccess(aEvent) {
- // Timeout of n:1000 is constructed in processUpdateRequest above and
- // passed back in the callback in nsIUrlClassifierStreamUpdater on success.
- do_check_eq("1000", aEvent);
- do_print("All data processed");
- deferred.resolve(true);
- }
- // Just throw if we ever get an update or download error.
- function handleError(aEvent) {
- do_throw("We didn't download or update correctly: " + aEvent);
- deferred.reject();
- }
- streamUpdater.downloadUpdates(
- "goog-downloadwhite-digest256",
- "goog-downloadwhite-digest256;\n",
- true,
- "http://localhost:4444/downloads",
- updateSuccess, handleError, handleError);
- return deferred.promise;
-}
-
-function promiseQueryReputation(query, expectedShouldBlock) {
- let deferred = Promise.defer();
- function onComplete(aShouldBlock, aStatus) {
- do_check_eq(Cr.NS_OK, aStatus);
- do_check_eq(aShouldBlock, expectedShouldBlock);
- deferred.resolve(true);
- }
- gAppRep.queryReputation(query, onComplete);
- return deferred.promise;
-}
-
-add_task(function* ()
-{
- // Wait for Safebrowsing local list updates to complete.
- yield waitForUpdates();
-});
-
-add_task(function* test_blocked_binary()
-{
- // We should reach the remote server for a verdict.
- Services.prefs.setBoolPref(remoteEnabledPref,
- true);
- Services.prefs.setCharPref(appRepURLPref,
- "http://localhost:4444/download");
- // evil.com should return a malware verdict from the remote server.
- yield promiseQueryReputation({sourceURI: createURI("http://evil.com"),
- suggestedFileName: "noop.bat",
- fileSize: 12}, true);
-});
-
-add_task(function* test_non_binary()
-{
- // We should not reach the remote server for a verdict for non-binary files.
- Services.prefs.setBoolPref(remoteEnabledPref,
- true);
- Services.prefs.setCharPref(appRepURLPref,
- "http://localhost:4444/throw");
- yield promiseQueryReputation({sourceURI: createURI("http://evil.com"),
- suggestedFileName: "noop.txt",
- fileSize: 12}, false);
-});
-
-add_task(function* test_good_binary()
-{
- // We should reach the remote server for a verdict.
- Services.prefs.setBoolPref(remoteEnabledPref,
- true);
- Services.prefs.setCharPref(appRepURLPref,
- "http://localhost:4444/download");
- // mozilla.com should return a not-guilty verdict from the remote server.
- yield promiseQueryReputation({sourceURI: createURI("http://mozilla.com"),
- suggestedFileName: "noop.bat",
- fileSize: 12}, false);
-});
-
-add_task(function* test_disabled()
-{
- // Explicitly disable remote checks
- Services.prefs.setBoolPref(remoteEnabledPref,
- false);
- Services.prefs.setCharPref(appRepURLPref,
- "http://localhost:4444/throw");
- let query = {sourceURI: createURI("http://example.com"),
- suggestedFileName: "noop.bat",
- fileSize: 12};
- let deferred = Promise.defer();
- gAppRep.queryReputation(query,
- function onComplete(aShouldBlock, aStatus) {
- // We should be getting NS_ERROR_NOT_AVAILABLE if the service is disabled
- do_check_eq(Cr.NS_ERROR_NOT_AVAILABLE, aStatus);
- do_check_false(aShouldBlock);
- deferred.resolve(true);
- }
- );
- yield deferred.promise;
-});
-
-add_task(function* test_disabled_through_lists()
-{
- Services.prefs.setBoolPref(remoteEnabledPref,
- false);
- Services.prefs.setCharPref(appRepURLPref,
- "http://localhost:4444/download");
- Services.prefs.setCharPref("urlclassifier.downloadBlockTable", "");
- let query = {sourceURI: createURI("http://example.com"),
- suggestedFileName: "noop.bat",
- fileSize: 12};
- let deferred = Promise.defer();
- gAppRep.queryReputation(query,
- function onComplete(aShouldBlock, aStatus) {
- // We should be getting NS_ERROR_NOT_AVAILABLE if the service is disabled
- do_check_eq(Cr.NS_ERROR_NOT_AVAILABLE, aStatus);
- do_check_false(aShouldBlock);
- deferred.resolve(true);
- }
- );
- yield deferred.promise;
-});
-add_task(function* test_teardown()
-{
- gStillRunning = false;
-});
diff --git a/toolkit/components/downloads/test/unit/test_app_rep_windows.js b/toolkit/components/downloads/test/unit/test_app_rep_windows.js
deleted file mode 100644
index 4ff772e611..0000000000
--- a/toolkit/components/downloads/test/unit/test_app_rep_windows.js
+++ /dev/null
@@ -1,434 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * This file tests signature extraction using Windows Authenticode APIs of
- * downloaded files.
- */
-
-// Globals
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
- "resource://gre/modules/FileUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
- "resource://gre/modules/NetUtil.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Promise",
- "resource://gre/modules/Promise.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Task",
- "resource://gre/modules/Task.jsm");
-
-const BackgroundFileSaverOutputStream = Components.Constructor(
- "@mozilla.org/network/background-file-saver;1?mode=outputstream",
- "nsIBackgroundFileSaver");
-
-const StringInputStream = Components.Constructor(
- "@mozilla.org/io/string-input-stream;1",
- "nsIStringInputStream",
- "setData");
-
-const TEST_FILE_NAME_1 = "test-backgroundfilesaver-1.txt";
-
-const gAppRep = Cc["@mozilla.org/downloads/application-reputation-service;1"].
- getService(Ci.nsIApplicationReputationService);
-var gStillRunning = true;
-var gTables = {};
-var gHttpServer = null;
-
-const appRepURLPref = "browser.safebrowsing.downloads.remote.url";
-const remoteEnabledPref = "browser.safebrowsing.downloads.remote.enabled";
-
-/**
- * Returns a reference to a temporary file. If the file is then created, it
- * will be removed when tests in this file finish.
- */
-function getTempFile(aLeafName) {
- let file = FileUtils.getFile("TmpD", [aLeafName]);
- do_register_cleanup(function GTF_cleanup() {
- if (file.exists()) {
- file.remove(false);
- }
- });
- return file;
-}
-
-function readFileToString(aFilename) {
- let f = do_get_file(aFilename);
- let stream = Cc["@mozilla.org/network/file-input-stream;1"]
- .createInstance(Ci.nsIFileInputStream);
- stream.init(f, -1, 0, 0);
- let buf = NetUtil.readInputStreamToString(stream, stream.available());
- return buf;
-}
-
-/**
- * Waits for the given saver object to complete.
- *
- * @param aSaver
- * The saver, with the output stream or a stream listener implementation.
- * @param aOnTargetChangeFn
- * Optional callback invoked with the target file name when it changes.
- *
- * @return {Promise}
- * @resolves When onSaveComplete is called with a success code.
- * @rejects With an exception, if onSaveComplete is called with a failure code.
- */
-function promiseSaverComplete(aSaver, aOnTargetChangeFn) {
- let deferred = Promise.defer();
- aSaver.observer = {
- onTargetChange: function BFSO_onSaveComplete(unused, aTarget)
- {
- if (aOnTargetChangeFn) {
- aOnTargetChangeFn(aTarget);
- }
- },
- onSaveComplete: function BFSO_onSaveComplete(unused, aStatus)
- {
- if (Components.isSuccessCode(aStatus)) {
- deferred.resolve();
- } else {
- deferred.reject(new Components.Exception("Saver failed.", aStatus));
- }
- },
- };
- return deferred.promise;
-}
-
-/**
- * Feeds a string to a BackgroundFileSaverOutputStream.
- *
- * @param aSourceString
- * The source data to copy.
- * @param aSaverOutputStream
- * The BackgroundFileSaverOutputStream to feed.
- * @param aCloseWhenDone
- * If true, the output stream will be closed when the copy finishes.
- *
- * @return {Promise}
- * @resolves When the copy completes with a success code.
- * @rejects With an exception, if the copy fails.
- */
-function promiseCopyToSaver(aSourceString, aSaverOutputStream, aCloseWhenDone) {
- let deferred = Promise.defer();
- let inputStream = new StringInputStream(aSourceString, aSourceString.length);
- let copier = Cc["@mozilla.org/network/async-stream-copier;1"]
- .createInstance(Ci.nsIAsyncStreamCopier);
- copier.init(inputStream, aSaverOutputStream, null, false, true, 0x8000, true,
- aCloseWhenDone);
- copier.asyncCopy({
- onStartRequest: function () { },
- onStopRequest: function (aRequest, aContext, aStatusCode)
- {
- if (Components.isSuccessCode(aStatusCode)) {
- deferred.resolve();
- } else {
- deferred.reject(new Components.Exception(aResult));
- }
- },
- }, null);
- return deferred.promise;
-}
-
-// Registers a table for which to serve update chunks.
-function registerTableUpdate(aTable, aFilename) {
- // If we haven't been given an update for this table yet, add it to the map
- if (!(aTable in gTables)) {
- gTables[aTable] = [];
- }
-
- // The number of chunks associated with this table.
- let numChunks = gTables[aTable].length + 1;
- let redirectPath = "/" + aTable + "-" + numChunks;
- let redirectUrl = "localhost:4444" + redirectPath;
-
- // Store redirect url for that table so we can return it later when we
- // process an update request.
- gTables[aTable].push(redirectUrl);
-
- gHttpServer.registerPathHandler(redirectPath, function(request, response) {
- do_print("Mock safebrowsing server handling request for " + redirectPath);
- let contents = readFileToString(aFilename);
- do_print("Length of " + aFilename + ": " + contents.length);
- response.setHeader("Content-Type",
- "application/vnd.google.safebrowsing-update", false);
- response.setStatusLine(request.httpVersion, 200, "OK");
- response.bodyOutputStream.write(contents, contents.length);
- });
-}
-
-// Tests
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_setup()
-{
- // Wait 10 minutes, that is half of the external xpcshell timeout.
- do_timeout(10 * 60 * 1000, function() {
- if (gStillRunning) {
- do_throw("Test timed out.");
- }
- });
- // Set up a local HTTP server to return bad verdicts.
- Services.prefs.setCharPref(appRepURLPref,
- "http://localhost:4444/download");
- // Ensure safebrowsing is enabled for this test, even if the app
- // doesn't have it enabled.
- Services.prefs.setBoolPref("browser.safebrowsing.malware.enabled", true);
- Services.prefs.setBoolPref("browser.safebrowsing.downloads.enabled", true);
- // Set block and allow tables explicitly, since the allowlist is normally
- // disabled on comm-central.
- Services.prefs.setCharPref("urlclassifier.downloadBlockTable",
- "goog-badbinurl-shavar");
- Services.prefs.setCharPref("urlclassifier.downloadAllowTable",
- "goog-downloadwhite-digest256");
- // SendRemoteQueryInternal needs locale preference.
- let locale = Services.prefs.getCharPref("general.useragent.locale");
- Services.prefs.setCharPref("general.useragent.locale", "en-US");
-
- do_register_cleanup(function() {
- Services.prefs.clearUserPref("browser.safebrowsing.malware.enabled");
- Services.prefs.clearUserPref("browser.safebrowsing.downloads.enabled");
- Services.prefs.clearUserPref("urlclassifier.downloadBlockTable");
- Services.prefs.clearUserPref("urlclassifier.downloadAllowTable");
- Services.prefs.setCharPref("general.useragent.locale", locale);
- });
-
- gHttpServer = new HttpServer();
- gHttpServer.registerDirectory("/", do_get_cwd());
-
- function createVerdict(aShouldBlock) {
- // We can't programmatically create a protocol buffer here, so just
- // hardcode some already serialized ones.
- let blob = String.fromCharCode(parseInt(0x08, 16));
- if (aShouldBlock) {
- // A safe_browsing::ClientDownloadRequest with a DANGEROUS verdict
- blob += String.fromCharCode(parseInt(0x01, 16));
- } else {
- // A safe_browsing::ClientDownloadRequest with a SAFE verdict
- blob += String.fromCharCode(parseInt(0x00, 16));
- }
- return blob;
- }
-
- gHttpServer.registerPathHandler("/throw", function(request, response) {
- do_throw("We shouldn't be getting here");
- });
-
- gHttpServer.registerPathHandler("/download", function(request, response) {
- do_print("Querying remote server for verdict");
- response.setHeader("Content-Type", "application/octet-stream", false);
- let buf = NetUtil.readInputStreamToString(
- request.bodyInputStream,
- request.bodyInputStream.available());
- do_print("Request length: " + buf.length);
- // A garbage response. By default this produces NS_CANNOT_CONVERT_DATA as
- // the callback status.
- let blob = "this is not a serialized protocol buffer (the length doesn't match our hard-coded values)";
- // We can't actually parse the protocol buffer here, so just switch on the
- // length instead of inspecting the contents.
- if (buf.length == 67) {
- // evil.com
- blob = createVerdict(true);
- } else if (buf.length == 73) {
- // mozilla.com
- blob = createVerdict(false);
- }
- response.bodyOutputStream.write(blob, blob.length);
- });
-
- gHttpServer.start(4444);
-});
-
-// Construct a response with redirect urls.
-function processUpdateRequest() {
- let response = "n:1000\n";
- for (let table in gTables) {
- response += "i:" + table + "\n";
- for (let i = 0; i < gTables[table].length; ++i) {
- response += "u:" + gTables[table][i] + "\n";
- }
- }
- do_print("Returning update response: " + response);
- return response;
-}
-
-// Set up the local whitelist.
-function waitForUpdates() {
- let deferred = Promise.defer();
- gHttpServer.registerPathHandler("/downloads", function(request, response) {
- let blob = processUpdateRequest();
- response.setHeader("Content-Type",
- "application/vnd.google.safebrowsing-update", false);
- response.setStatusLine(request.httpVersion, 200, "OK");
- response.bodyOutputStream.write(blob, blob.length);
- });
-
- let streamUpdater = Cc["@mozilla.org/url-classifier/streamupdater;1"]
- .getService(Ci.nsIUrlClassifierStreamUpdater);
-
- // Load up some update chunks for the safebrowsing server to serve. This
- // particular chunk contains the hash of whitelisted.com/ and
- // sb-ssl.google.com/safebrowsing/csd/certificate/.
- registerTableUpdate("goog-downloadwhite-digest256", "data/digest.chunk");
-
- // Resolve the promise once processing the updates is complete.
- function updateSuccess(aEvent) {
- // Timeout of n:1000 is constructed in processUpdateRequest above and
- // passed back in the callback in nsIUrlClassifierStreamUpdater on success.
- do_check_eq("1000", aEvent);
- do_print("All data processed");
- deferred.resolve(true);
- }
- // Just throw if we ever get an update or download error.
- function handleError(aEvent) {
- do_throw("We didn't download or update correctly: " + aEvent);
- deferred.reject();
- }
- streamUpdater.downloadUpdates(
- "goog-downloadwhite-digest256",
- "goog-downloadwhite-digest256;\n",
- true,
- "http://localhost:4444/downloads",
- updateSuccess, handleError, handleError);
- return deferred.promise;
-}
-
-function promiseQueryReputation(query, expectedShouldBlock) {
- let deferred = Promise.defer();
- function onComplete(aShouldBlock, aStatus) {
- do_check_eq(Cr.NS_OK, aStatus);
- do_check_eq(aShouldBlock, expectedShouldBlock);
- deferred.resolve(true);
- }
- gAppRep.queryReputation(query, onComplete);
- return deferred.promise;
-}
-
-add_task(function* ()
-{
- // Wait for Safebrowsing local list updates to complete.
- yield waitForUpdates();
-});
-
-add_task(function* test_signature_whitelists()
-{
- // We should never get to the remote server.
- Services.prefs.setBoolPref(remoteEnabledPref,
- true);
- Services.prefs.setCharPref(appRepURLPref,
- "http://localhost:4444/throw");
-
- // Use BackgroundFileSaver to extract the signature on Windows.
- let destFile = getTempFile(TEST_FILE_NAME_1);
-
- let data = readFileToString("data/signed_win.exe");
- let saver = new BackgroundFileSaverOutputStream();
- let completionPromise = promiseSaverComplete(saver);
- saver.enableSignatureInfo();
- saver.setTarget(destFile, false);
- yield promiseCopyToSaver(data, saver, true);
-
- saver.finish(Cr.NS_OK);
- yield completionPromise;
-
- // Clean up.
- destFile.remove(false);
-
- // evil.com is not on the allowlist, but this binary is signed by an entity
- // whose certificate information is on the allowlist.
- yield promiseQueryReputation({sourceURI: createURI("http://evil.com"),
- signatureInfo: saver.signatureInfo,
- fileSize: 12}, false);
-});
-
-add_task(function* test_blocked_binary()
-{
- // We should reach the remote server for a verdict.
- Services.prefs.setBoolPref(remoteEnabledPref,
- true);
- Services.prefs.setCharPref(appRepURLPref,
- "http://localhost:4444/download");
- // evil.com should return a malware verdict from the remote server.
- yield promiseQueryReputation({sourceURI: createURI("http://evil.com"),
- suggestedFileName: "noop.bat",
- fileSize: 12}, true);
-});
-
-add_task(function* test_non_binary()
-{
- // We should not reach the remote server for a verdict for non-binary files.
- Services.prefs.setBoolPref(remoteEnabledPref,
- true);
- Services.prefs.setCharPref(appRepURLPref,
- "http://localhost:4444/throw");
- yield promiseQueryReputation({sourceURI: createURI("http://evil.com"),
- suggestedFileName: "noop.txt",
- fileSize: 12}, false);
-});
-
-add_task(function* test_good_binary()
-{
- // We should reach the remote server for a verdict.
- Services.prefs.setBoolPref(remoteEnabledPref,
- true);
- Services.prefs.setCharPref(appRepURLPref,
- "http://localhost:4444/download");
- // mozilla.com should return a not-guilty verdict from the remote server.
- yield promiseQueryReputation({sourceURI: createURI("http://mozilla.com"),
- suggestedFileName: "noop.bat",
- fileSize: 12}, false);
-});
-
-add_task(function* test_disabled()
-{
- // Explicitly disable remote checks
- Services.prefs.setBoolPref(remoteEnabledPref,
- false);
- Services.prefs.setCharPref(appRepURLPref,
- "http://localhost:4444/throw");
- let query = {sourceURI: createURI("http://example.com"),
- suggestedFileName: "noop.bat",
- fileSize: 12};
- let deferred = Promise.defer();
- gAppRep.queryReputation(query,
- function onComplete(aShouldBlock, aStatus) {
- // We should be getting NS_ERROR_NOT_AVAILABLE if the service is disabled
- do_check_eq(Cr.NS_ERROR_NOT_AVAILABLE, aStatus);
- do_check_false(aShouldBlock);
- deferred.resolve(true);
- }
- );
- yield deferred.promise;
-});
-
-add_task(function* test_disabled_through_lists()
-{
- Services.prefs.setBoolPref(remoteEnabledPref,
- false);
- Services.prefs.setCharPref(appRepURLPref,
- "http://localhost:4444/download");
- Services.prefs.setCharPref("urlclassifier.downloadBlockTable", "");
- let query = {sourceURI: createURI("http://example.com"),
- suggestedFileName: "noop.bat",
- fileSize: 12};
- let deferred = Promise.defer();
- gAppRep.queryReputation(query,
- function onComplete(aShouldBlock, aStatus) {
- // We should be getting NS_ERROR_NOT_AVAILABLE if the service is disabled
- do_check_eq(Cr.NS_ERROR_NOT_AVAILABLE, aStatus);
- do_check_false(aShouldBlock);
- deferred.resolve(true);
- }
- );
- yield deferred.promise;
-});
-add_task(function* test_teardown()
-{
- gStillRunning = false;
-});
diff --git a/toolkit/components/downloads/test/unit/xpcshell.ini b/toolkit/components/downloads/test/unit/xpcshell.ini
deleted file mode 100644
index 68b6e1fc32..0000000000
--- a/toolkit/components/downloads/test/unit/xpcshell.ini
+++ /dev/null
@@ -1,14 +0,0 @@
-[DEFAULT]
-head = head_download_manager.js
-tail = tail_download_manager.js
-skip-if = toolkit == 'android'
-support-files =
- data/digest.chunk
- data/block_digest.chunk
- data/signed_win.exe
-
-[test_app_rep.js]
-[test_app_rep_windows.js]
-skip-if = os != "win"
-[test_app_rep_maclinux.js]
-skip-if = os == "win"
diff --git a/toolkit/components/exthelper/moz.build b/toolkit/components/exthelper/moz.build
index 975030a353..d7429e2d51 100644
--- a/toolkit/components/exthelper/moz.build
+++ b/toolkit/components/exthelper/moz.build
@@ -4,9 +4,7 @@
# 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/.
-XPIDL_SOURCES += [
- 'extIApplication.idl',
-]
+XPIDL_SOURCES += ['extIApplication.idl']
XPIDL_MODULE = 'exthelper'
diff --git a/toolkit/components/feeds/moz.build b/toolkit/components/feeds/moz.build
index de5e0aa96c..fdc4e2708d 100644
--- a/toolkit/components/feeds/moz.build
+++ b/toolkit/components/feeds/moz.build
@@ -4,8 +4,6 @@
# 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/.
-MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini']
-
XPIDL_SOURCES += [
'nsIFeed.idl',
'nsIFeedContainer.idl',
@@ -25,7 +23,3 @@ EXTRA_COMPONENTS += [
'FeedProcessor.js',
'FeedProcessor.manifest',
]
-
-XPCSHELL_TESTS_MANIFESTS += [
- 'test/xpcshell.ini'
-]
diff --git a/toolkit/components/feeds/test/.eslintrc.js b/toolkit/components/feeds/test/.eslintrc.js
deleted file mode 100644
index 89764b5510..0000000000
--- a/toolkit/components/feeds/test/.eslintrc.js
+++ /dev/null
@@ -1,8 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../testing/mochitest/chrome.eslintrc.js",
- "../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/feeds/test/chrome.ini b/toolkit/components/feeds/test/chrome.ini
deleted file mode 100644
index 6745fa9a5e..0000000000
--- a/toolkit/components/feeds/test/chrome.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[DEFAULT]
-
-[test_bug675492.xul]
diff --git a/toolkit/components/feeds/test/head.js b/toolkit/components/feeds/test/head.js
deleted file mode 100644
index 65aa64b948..0000000000
--- a/toolkit/components/feeds/test/head.js
+++ /dev/null
@@ -1,80 +0,0 @@
-"use strict";
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-var Cr = Components.results;
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/NetUtil.jsm");
-
-function readTestData(testFile) {
- var testcase = {};
-
- // Got a feed file, now we need to parse out the Description and Expect headers.
- var istream = Cc["@mozilla.org/network/file-input-stream;1"].createInstance(Ci.nsIFileInputStream);
- try {
- istream.init(testFile, 0x01, parseInt("0444", 8), 0);
- istream.QueryInterface(Ci.nsILineInputStream);
-
- var hasmore = false;
- do {
- var line = {};
- hasmore = istream.readLine(line);
-
- if (line.value.indexOf('Description:') > -1) {
- testcase.desc = line.value.substring(line.value.indexOf(':')+1).trim();
- }
-
- if (line.value.indexOf('Expect:') > -1) {
- testcase.expect = line.value.substring(line.value.indexOf(':')+1).trim();
- }
-
- if (line.value.indexOf('Base:') > -1) {
- testcase.base = NetUtil.newURI(line.value.substring(line.value.indexOf(':')+1).trim());
- }
-
- if (testcase.expect && testcase.desc) {
- testcase.path = 'xml/' + testFile.parent.leafName + '/' + testFile.leafName;
- testcase.file = testFile;
- break;
- }
-
- } while (hasmore);
-
- } catch (e) {
- Assert.ok(false, "FAILED! Error reading testFile case in file " + testFile.leafName + " ---- " + e);
- } finally {
- istream.close();
- }
-
- return testcase;
-}
-
-function iterateDir(dir, recurse, callback) {
- do_print("Iterate " + dir.leafName);
- let entries = dir.directoryEntries;
-
- // Loop over everything in this dir. If its a dir
- while (entries.hasMoreElements()) {
- let entry = entries.getNext();
- entry.QueryInterface(Ci.nsILocalFile);
-
- if (entry.isDirectory()) {
- if (recurse) {
- iterateDir(entry, recurse, callback);
- }
- } else {
- callback(entry);
- }
- }
-}
-
-function isIID(a, iid) {
- try {
- a.QueryInterface(iid);
- return true;
- } catch (e) { }
-
- return false;
-}
diff --git a/toolkit/components/feeds/test/test_bug675492.xul b/toolkit/components/feeds/test/test_bug675492.xul
deleted file mode 100644
index b1c52d11aa..0000000000
--- a/toolkit/components/feeds/test/test_bug675492.xul
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
-<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=675492
--->
-<window title="Mozilla Bug 675492"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript" src="chrome://mochikit/content/chrome-harness.js"/>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml">
- <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=675492"
- target="_blank">Mozilla Bug 675492</a>
- </body>
-
- <!-- test code goes here -->
- <script type="application/javascript">
- <![CDATA[
-
- /** Test for Bug 675492 **/
-
- Components
- .classes["@mozilla.org/parserutils;1"]
- .getService(Components.interfaces.nsIParserUtils)
- .parseFragment("<p>test</p>", 0, false, null, document.createElementNS("http://www.w3.org/1999/xhtml", "body"));
- ok(true, "No crash!");
- ]]>
- </script>
-</window>
diff --git a/toolkit/components/feeds/test/test_xml.js b/toolkit/components/feeds/test/test_xml.js
deleted file mode 100644
index 5bc0d759d1..0000000000
--- a/toolkit/components/feeds/test/test_xml.js
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/* test_xml.js
- * This file sets up the unit test environment by building an array of files
- * to be tested. It assumes it lives in a folder adjacent to the a folder
- * called 'xml', where the testcases live.
- *
- * The directory layout looks something like this:
- *
- * tests/test_xml.js*
- * |
- * - head.js
- * |
- * - xml/ -- rss1/...
- * |
- * -- rss2/...
- * |
- * -- atom/testcase.xml
- *
- * To add more tests, just include the file in the xml subfolder and add its name to xpcshell.ini
- */
-
-"use strict";
-
-// Listens to feeds being loaded. Runs the tests built into the feed afterwards to veryify they
-// were parsed correctly.
-function FeedListener(testcase) {
- this.testcase = testcase;
-}
-
-FeedListener.prototype = {
- handleResult: function(result) {
- var feed = result.doc;
- try {
- do_print("Testing feed " + this.testcase.file.path);
- Assert.ok(isIID(feed, Ci.nsIFeed), "Has feed interface");
-
- if (!eval(this.testcase.expect)) {
- Assert.ok(false, "expect failed for " + this.testcase.desc);
- } else {
- Assert.ok(true, "expect passed for " + this.testcase.desc);
- }
- } catch (e) {
- Assert.ok(false, "expect failed for " + this.testcase.desc + " ---- " + e.message);
- }
-
- run_next_test();
- }
-}
-
-function createTest(data) {
- return function() {
- var uri;
-
- if (data.base == null) {
- uri = NetUtil.newURI('http://example.org/' + data.path);
- } else {
- uri = data.base;
- }
-
- do_print("Testing " + data.file.leafName);
-
- var parser = Cc["@mozilla.org/feed-processor;1"].createInstance(Ci.nsIFeedProcessor);
- var stream = Cc["@mozilla.org/network/file-input-stream;1"].createInstance(Ci.nsIFileInputStream);
- stream.init(data.file, 0x01, parseInt("0444", 8), 0);
- parser.listener = new FeedListener(data);
-
- try {
- parser.parseFromStream(stream, uri);
- } catch (e) {
- Assert.ok(false, "parse failed for " + data.file.leafName + " ---- " + e.message);
- // If the parser failed, the listener won't be notified, run the next test here.
- run_next_test();
- } finally {
- stream.close();
- }
- }
-}
-
-function run_test() {
- // Get the 'xml' directory in here
- var topDir = Services.dirsvc.get("CurWorkD", Ci.nsIFile);
- topDir.append("xml");
-
- // Every file in the test dir contains an encapulated RSS "test". Iterate through
- // them all and add them to the test runner.
- iterateDir(topDir, true, file => {
- var data = readTestData(file);
- add_test(createTest(data));
- });
-
- // Now run!
- run_next_test();
-}
diff --git a/toolkit/components/feeds/test/xml/rfc4287/author_namespaces.xml b/toolkit/components/feeds/test/xml/rfc4287/author_namespaces.xml
deleted file mode 100644
index 3b2ad74ffc..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/author_namespaces.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-Description: Ensure unknown NS element in atom:author doesn't cause exception
-Expect: var mCService = Components.classes['@mozilla.org/consoleservice;1'].getService(Components.interfaces.nsIConsoleService); var msg = mCService.getMessageArray()[0]; if(msg){msg = msg.message}; ((msg + "").indexOf("prefix has no properties") == -1);
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
-
- <author>
- <name>Sam Ruby</name>
- <method xmlns="http://www.intertwingly.net/blog/">excerpt</method>
- <email>rubys@intertwingly.net</email>
- <uri>.</uri>
- </author>
-
-</feed>
-
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_author.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_author.xml
deleted file mode 100644
index 2757148c4e..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_author.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom author name works
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).authors.queryElementAt(0, Components.interfaces.nsIFeedPerson).name=='John Doe Entry';
-
--->
-
-<feed xmlns="http://www.w3.org/2005/Atom">
-
- <title>Example Feed</title>
- <link href="http://example.org/"/>
- <updated>2003-12-13T18:30:02Z</updated>
- <author>
- <name>John Doe</name>
- </author>
- <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
-
- <entry>
- <title>Atom-Powered Robots Run Amok</title>
- <link href="http://example.org/2003/12/13/atom03"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
- <updated>2003-12-13T18:30:02Z</updated>
- <summary>Some text.</summary>
- <author>
- <name>John Doe Entry</name>
- </author>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_content.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_content.xml
deleted file mode 100644
index 6bb9b210f5..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_content.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom entry summary works
-Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content.plainText() == "test content";
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom"
- xmlns:foo="http://www.example.org"
- foo:quux="quuux">
-
- <title>hmm</title>
-
- <author>
- <email>hmm@example.com</email>
- <name>foo</name>
- </author>
- <generator version="1.1" uri="http://example.org">Hmm</generator>
- <author>
- <email>bar@example.com</email>
- <name>foo</name>
- </author>
- <rights type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
- </rights>
-
-
- <entry></entry>
-
- <entry foo:bar="baz">
- <title>test</title>
- <content>test content</content>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_content_encoded.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_content_encoded.xml
deleted file mode 100644
index df09317f7e..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_content_encoded.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom entry content:encoded and xhtml works
-Expect: var content = feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content.plainText(); content == "should appear";
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom"
- xmlns:foo="http://www.example.org"
- foo:quux="quuux"
- xmlns:content="http://purl.org/rss/1.0/modules/content/">
-
- <title>hmm</title>
-
- <author>
- <email>hmm@example.com</email>
- <name>foo</name>
- </author>
- <generator version="1.1" uri="http://example.org">Hmm</generator>
- <author>
- <email>bar@example.com</email>
- <name>foo</name>
- </author>
- <rights type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
- </rights>
-
-
- <entry></entry>
-
- <entry foo:bar="baz">
- <title>test</title>
- <summary type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <b>test</b> content
- </div>
- </summary>
- <content:encoded>
- should appear
- </content:encoded>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_content_html.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_content_html.xml
deleted file mode 100644
index 08974c35f0..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_content_html.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom entry content html works
-Expect: var content = feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content.plainText(); content == "test content";
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom"
- xmlns:foo="http://www.example.org"
- foo:quux="quuux">
-
- <title>hmm</title>
-
- <author>
- <email>hmm@example.com</email>
- <name>foo</name>
- </author>
- <generator version="1.1" uri="http://example.org">Hmm</generator>
- <author>
- <email>bar@example.com</email>
- <name>foo</name>
- </author>
- <rights type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
- </rights>
-
-
- <entry></entry>
-
- <entry foo:bar="baz">
- <title>test</title>
- <content type="html">&lt;b>test&lt;/b> content</content>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_content_xhtml.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_content_xhtml.xml
deleted file mode 100644
index dea4902bb6..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_content_xhtml.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom entry content xhtml works
-Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content.plainText() == "test content";
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom"
- xmlns:foo="http://www.example.org"
- foo:quux="quuux">
-
- <title>hmm</title>
-
- <author>
- <email>hmm@example.com</email>
- <name>foo</name>
- </author>
- <generator version="1.1" uri="http://example.org">Hmm</generator>
- <author>
- <email>bar@example.com</email>
- <name>foo</name>
- </author>
- <rights type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
- </rights>
-
-
- <entry></entry>
-
- <entry foo:bar="baz">
- <title>test</title>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <b>test</b> content
- </div>
- </content>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_content_xhtml_with_markup.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_content_xhtml_with_markup.xml
deleted file mode 100644
index 8cadef75e1..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_content_xhtml_with_markup.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom entry content xhtml works
-Expect: var content = feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content.text; content == "<b>test</b> content";
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom"
- xmlns:foo="http://www.example.org"
- foo:quux="quuux">
-
- <title>hmm</title>
-
- <author>
- <email>hmm@example.com</email>
- <name>foo</name>
- </author>
- <generator version="1.1" uri="http://example.org">Hmm</generator>
- <author>
- <email>bar@example.com</email>
- <name>foo</name>
- </author>
- <rights type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
- </rights>
-
-
- <entry></entry>
-
- <entry foo:bar="baz">
- <title>test</title>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <b>test</b> content
- </div>
- </content>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_contributor.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_contributor.xml
deleted file mode 100644
index bb85bf230b..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_contributor.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom author name works
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).contributors.queryElementAt(0, Components.interfaces.nsIFeedPerson).name=='John Doe Entry';
-
--->
-
-<feed xmlns="http://www.w3.org/2005/Atom">
-
- <title>Example Feed</title>
- <link href="http://example.org/"/>
- <updated>2003-12-13T18:30:02Z</updated>
- <author>
- <name>John Doe</name>
- </author>
- <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
-
- <entry>
- <title>Atom-Powered Robots Run Amok</title>
- <link href="http://example.org/2003/12/13/atom03"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
- <updated>2003-12-13T18:30:02Z</updated>
- <summary>Some text.</summary>
- <contributor>
- <name>John Doe Entry</name>
- </contributor>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_html_cdata.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_html_cdata.xml
deleted file mode 100644
index 38a31ca104..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_html_cdata.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: HTML title w/ CDATA
-Expect: var title = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).title.plainText(); title == "<title>";
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
-<id>http://atomtests.philringnalda.com/tests/item/title/html-cdata.atom</id>
-<title>Atom item title html cdata</title>
-<updated>2005-12-18T00:13:00Z</updated>
-<author>
- <name>Phil Ringnalda</name>
- <uri>http://weblog.philringnalda.com/</uri>
-</author>
-<link rel="self" href="http://atomtests.philringnalda.com/tests/item/title/html-cdata.atom"/>
-<entry>
- <id>http://atomtests.philringnalda.com/tests/item/title/html-cdata.atom/1</id>
- <title type="html"><![CDATA[&lt;title>]]></title>
- <updated>2005-12-18T00:13:00Z</updated>
- <summary>An item with a type="html" title consisting of a less-than
-character, the word 'title' and a greater-than character, where
-the character entity reference for the less-than is escaped by being
-in a CDATA section.</summary>
- <link href="http://atomtests.philringnalda.com/alt/title-title.html"/>
- <category term="item title"/>
-</entry>
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_id.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_id.xml
deleted file mode 100644
index 8513b6894d..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_id.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom entry id
-Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).id == "http://foo.example.com/hmm/ok,2006,07,11";
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom"
- xmlns:foo="http://www.example.org"
- foo:quux="quuux">
-
- <title>hmm</title>
-
- <author>
- <email>hmm@example.com</email>
- <name>foo</name>
- </author>
- <generator version="1.1" uri="http://example.org">Hmm</generator>
- <author>
- <email>bar@example.com</email>
- <name>foo</name>
- </author>
- <rights type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
- </rights>
-
-
- <entry></entry>
-
- <entry foo:bar="baz">
- <title>test</title>
- <id>http://foo.example.com/hmm/ok,2006,07,11</id>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_link_2alts.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_link_2alts.xml
deleted file mode 100644
index c7cebe4cd2..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_link_2alts.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom entry with random link relations
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link.spec == "http://www.snellspace.com/public/linktests/alternate";
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
- <id>tag:snellspace.com,2006:/atom/conformance/linktest/</id>
- <title>Atom Link Tests</title>
- <updated>2005-01-18T15:10:00Z</updated>
- <author><name>James Snell</name></author>
- <link href="http://www.intertwingly.net/wiki/pie/LinkConformanceTests" />
- <link rel="self" href="http://www.snellspace.com/public/linktests.xml" />
-
- <entry>
- <id>tag:snellspace.com,2006:/atom/conformance/linktest/2</id>
- <title>Two alternate links</title>
- <updated>2005-01-18T15:00:02Z</updated>
- <summary>The aggregator should pick either the second or third link below as the alternate</summary>
-
- <link rel="ALTERNATE" href="http://www.snellspace.com/public/linktests/wrong" />
- <link href="http://www.snellspace.com/public/linktests/alternate" />
- <link type="text/plain" href="http://www.snellspace.com/public/linktests/alternate2" />
- <link rel="ALTERNATE" href="http://www.snellspace.com/public/linktests/wrong" />
- </entry>
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_link_2alts_allcore.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_link_2alts_allcore.xml
deleted file mode 100644
index 56675b1a9e..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_link_2alts_allcore.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom entry with random link relations
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link.spec == "http://www.snellspace.com/public/linktests/alternate";
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
- <id>tag:snellspace.com,2006:/atom/conformance/linktest/</id>
- <title>Atom Link Tests</title>
- <updated>2005-01-18T15:10:00Z</updated>
- <author><name>James Snell</name></author>
- <link href="http://www.intertwingly.net/wiki/pie/LinkConformanceTests" />
- <link rel="self" href="http://www.snellspace.com/public/linktests.xml" />
-
- <entry>
- <id>tag:snellspace.com,2006:/atom/conformance/linktest/3</id>
- <title>One of each core link rel type</title>
-
- <updated>2005-01-18T15:00:03Z</updated>
- <summary>The aggregator should pick the first link as the alternate</summary>
- <link href="http://www.snellspace.com/public/linktests/alternate" />
- <link rel="enclosure" href="http://www.snellspace.com/public/linktests/enclosure" length="19" />
- <link rel="related" href="http://www.snellspace.com/public/linktests/related" />
- <link rel="self" href="http://www.snellspace.com/public/linktests/self" />
- <link rel="via" href="http://www.snellspace.com/public/linktests/via" />
- </entry>
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_link_2alts_allcore2.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_link_2alts_allcore2.xml
deleted file mode 100644
index b5b73cfe02..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_link_2alts_allcore2.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom entry with random link relations
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link.spec == "http://www.snellspace.com/public/linktests/alternate";
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
- <id>tag:snellspace.com,2006:/atom/conformance/linktest/</id>
- <title>Atom Link Tests</title>
- <updated>2005-01-18T15:10:00Z</updated>
- <author><name>James Snell</name></author>
- <link href="http://www.intertwingly.net/wiki/pie/LinkConformanceTests" />
- <link rel="self" href="http://www.snellspace.com/public/linktests.xml" />
-
-
-
- <entry>
-
- <id>tag:snellspace.com,2006:/atom/conformance/linktest/4</id>
- <title>One of each core link rel type + An additional alternate link</title>
- <updated>2005-01-18T15:00:04Z</updated>
- <summary>The aggregator should pick either the first or last links as the alternate. First link is likely better.</summary>
- <link href="http://www.snellspace.com/public/linktests/alternate" />
- <link rel="enclosure" href="http://www.snellspace.com/public/linktests/enclosure" length="19" />
- <link rel="related" href="http://www.snellspace.com/public/linktests/related" />
-
- <link rel="self" href="http://www.snellspace.com/public/linktests/self" />
- <link rel="via" href="http://www.snellspace.com/public/linktests/via" />
- <link rel="alternate" type="text/plain" href="http://www.snellspace.com/public/linktests/alternate2" />
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_link_IANA.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_link_IANA.xml
deleted file mode 100644
index af6563f2ea..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_link_IANA.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom entry with IANA URI link relations
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link.spec == "http://www.snellspace.com/public/alternate";
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
- <id>tag:snellspace.com,2006:/atom/conformance/linktest/</id>
- <title>Atom Link Tests</title>
- <updated>2005-01-18T15:10:00Z</updated>
- <author><name>James Snell</name></author>
- <link href="http://www.intertwingly.net/wiki/pie/LinkConformanceTests" />
- <link rel="self" href="http://www.snellspace.com/public/linktests.xml" />
-
- <entry>
- <id>tag:example.org,2006:/linkreltest/1</id>
- <title>Does your reader support http://www.iana.org/assignments/relation/alternate properly? </title>
- <updated>2006-04-25T12:12:12Z</updated>
- <link rel="http://example.org/random"
- href="http://www.snellspace.com/public/random" />
- <link rel="http://www.iana.org/assignments/relation/alternate"
- href="http://www.snellspace.com/public/alternate" />
- <link rel="http://example.org/random"
- href="http://www.snellspace.com/public/random" />
- <content>This entry uses link/@rel="http://www.iana.org/assignments/relation/alternate".</content>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_link_alt_extension.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_link_alt_extension.xml
deleted file mode 100644
index e37421864a..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_link_alt_extension.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom entry with random link relations
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link.spec == "http://www.snellspace.com/public/linktests/alternate";
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
- <id>tag:snellspace.com,2006:/atom/conformance/linktest/</id>
- <title>Atom Link Tests</title>
- <updated>2005-01-18T15:10:00Z</updated>
- <author><name>James Snell</name></author>
- <link href="http://www.intertwingly.net/wiki/pie/LinkConformanceTests" />
- <link rel="self" href="http://www.snellspace.com/public/linktests.xml" />
- <entry>
- <id>tag:snellspace.com,2006:/atom/conformance/linktest/5</id>
- <title>Entry with a link relation registered by an extension</title>
- <updated>2005-01-18T15:00:05Z</updated>
- <summary>The aggregator should ignore the license link without throwing any errors. The first link should be picked as the alternate.</summary>
- <link href="http://www.snellspace.com/public/linktests/alternate" />
- <link rel="payment" href="http://www.example.org/payment" />
- </entry>
-
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_link_enclosure.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_link_enclosure.xml
deleted file mode 100644
index b76c111c9d..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_link_enclosure.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item enclosure works
-Expect: var links = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).fields.getProperty('links'); links.QueryInterface(Components.interfaces.nsIArray); var link = links.queryElementAt(0, Components.interfaces.nsIPropertyBag2); ((link.getProperty('length') == '24986239') && (link.getProperty('type') == 'audio/mpeg') && (link.getProperty('href') == 'http://dallas.example.com/joebob_050689.mp3') && (feed.type == 1) && (feed.enclosureCount == 1));
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
- <id>tag:snellspace.com,2006:/atom/conformance/linktest/</id>
- <title>Atom Link Tests</title>
- <updated>2005-01-18T15:10:00Z</updated>
- <author><name>James Snell</name></author>
- <link href="http://www.intertwingly.net/wiki/pie/LinkConformanceTests" />
- <link rel="self" href="http://www.snellspace.com/public/linktests.xml" />
-
-
-
- <entry>
-
- <id>tag:snellspace.com,2006:/atom/conformance/linktest/4</id>
- <title>One of each core link rel type + An additional alternate link</title>
- <updated>2005-01-18T15:00:04Z</updated>
- <summary>The aggregator should pick either the first or last links as the alternate. First link is likely better.</summary>
- <link rel="enclosure" length="24986239" type="audio/mpeg" href="http://dallas.example.com/joebob_050689.mp3" />
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_link_enclosure_populate_enclosures.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_link_enclosure_populate_enclosures.xml
deleted file mode 100644
index 8453c6e9cc..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_link_enclosure_populate_enclosures.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item enclosure added to enclosures
-Expect: var encs = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).enclosures; encs.QueryInterface(Components.interfaces.nsIArray); var enc = encs.queryElementAt(0, Components.interfaces.nsIPropertyBag2); ((enc.getProperty('length') == '24986239') && (enc.getProperty('type') == 'audio/mpeg') && (enc.getProperty('url') == 'http://dallas.example.com/joebob_050689.mp3'));
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
- <id>tag:snellspace.com,2006:/atom/conformance/linktest/</id>
- <title>Atom Link Tests</title>
- <updated>2005-01-18T15:10:00Z</updated>
- <author><name>James Snell</name></author>
- <link href="http://www.intertwingly.net/wiki/pie/LinkConformanceTests" />
- <link rel="self" href="http://www.snellspace.com/public/linktests.xml" />
-
-
-
- <entry>
-
- <id>tag:snellspace.com,2006:/atom/conformance/linktest/4</id>
- <title>One of each core link rel type + An additional alternate link</title>
- <updated>2005-01-18T15:00:04Z</updated>
- <summary>The aggregator should pick either the first or last links as the alternate. First link is likely better.</summary>
- <link rel="enclosure" length="24986239" type="audio/mpeg" href="http://dallas.example.com/joebob_050689.mp3" />
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_link_otherURI_alt.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_link_otherURI_alt.xml
deleted file mode 100644
index 3dc0c8dd63..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_link_otherURI_alt.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom entry with random link relations
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link.spec == "http://www.snellspace.com/public/linktests/alternate";
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
- <id>tag:snellspace.com,2006:/atom/conformance/linktest/</id>
- <title>Atom Link Tests</title>
- <updated>2005-01-18T15:10:00Z</updated>
- <author><name>James Snell</name></author>
- <link href="http://www.intertwingly.net/wiki/pie/LinkConformanceTests" />
- <link rel="self" href="http://www.snellspace.com/public/linktests.xml" />
-
- <entry>
- <id>tag:snellspace.com,2006:/atom/conformance/linktest/6</id>
- <title>Entry with a link relation identified by URI</title>
- <updated>2005-01-18T15:00:06Z</updated>
- <summary>The aggregator should ignore the second link without throwing any errors. The first link should be picked as the alternate.</summary>
- <link href="http://www.snellspace.com/public/linktests/alternate" />
- <link rel="http://example.org" href="http://www.snellspace.com/public/linktests/example" />
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_link_payment_alt.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_link_payment_alt.xml
deleted file mode 100644
index 51e1524b4a..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_link_payment_alt.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom entry with random link relations
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link.spec == "http://www.snellspace.com/public/linktests/alternate";
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
- <id>tag:snellspace.com,2006:/atom/conformance/linktest/</id>
- <title>Atom Link Tests</title>
- <updated>2005-01-18T15:10:00Z</updated>
- <author><name>James Snell</name></author>
- <link href="http://www.intertwingly.net/wiki/pie/LinkConformanceTests" />
- <link rel="self" href="http://www.snellspace.com/public/linktests.xml" />
-
-
- <entry>
- <id>tag:snellspace.com,2006:/atom/conformance/linktest/5</id>
- <title>Entry with a link relation registered by an extension</title>
- <updated>2005-01-18T15:00:05Z</updated>
- <summary>The aggregator should ignore the license link without throwing any errors. The first link should be picked as the alternate.</summary>
- <link href="http://www.snellspace.com/public/linktests/alternate" />
- <link rel="payment" href="http://www.example.org/payment" />
- </entry>
-
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_link_random.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_link_random.xml
deleted file mode 100644
index cb370e5168..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_link_random.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom entry with random link relations
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link.spec == "http://www.snellspace.com/public/linktests/alternate";
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
- <id>tag:snellspace.com,2006:/atom/conformance/linktest/</id>
- <title>Atom Link Tests</title>
- <updated>2005-01-18T15:10:00Z</updated>
- <author><name>James Snell</name></author>
- <link href="http://www.intertwingly.net/wiki/pie/LinkConformanceTests" />
- <link rel="self" href="http://www.snellspace.com/public/linktests.xml" />
-
- <entry>
- <id>tag:snellspace.com,2006:/atom/conformance/linktest/1</id>
- <title>Just a single Alternate Link</title>
- <updated>2005-01-18T15:00:01Z</updated>
- <summary>The aggregator should pick the second link as the alternate</summary>
- <link rel="http://example.org/random"
- href="http://www.snellspace.com/public/wrong" />
- <link href="http://www.snellspace.com/public/linktests/alternate" />
- <link rel="http://example.org/random"
- href="http://www.snellspace.com/public/wrong" />
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_published.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_published.xml
deleted file mode 100644
index 1112729e27..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_published.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom published works
-Expect: var entry = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry); entry.published == 'Tue, 09 Dec 2003 18:30:02 GMT'
-
--->
-
-<feed xmlns="http://www.w3.org/2005/Atom">
-
- <title>Example Feed</title>
- <link href="http://example.org/"/>
- <updated>2003-12-13T18:30:02Z</updated>
- <author>
- <name>John Doe</name>
- </author>
- <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
-
- <entry>
- <title>Atom-Powered Robots Run Amok</title>
- <link href="http://example.org/2003/12/13/atom03"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
- <updated>2003-12-13T18:30:02Z</updated>
- <published>2003-12-09T18:30:02Z</published>
- <summary>Some text.</summary>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_rights_normalized.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_rights_normalized.xml
deleted file mode 100644
index 1474e5f84c..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_rights_normalized.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom entry rights works normalized
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).rights.plainText() == "test rights"
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
- <title type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> title</div>
- </title>
- <entry>
- <rights type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> rights</div>
- </rights>
- </entry>
-</feed> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_summary.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_summary.xml
deleted file mode 100644
index b245cb3808..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_summary.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom entry summary xhtml works
-Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).summary.plainText() == "test summary";
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom"
- xmlns:foo="http://www.example.org"
- foo:quux="quuux"
- xmlns:content="http://purl.org/rss/1.0/modules/content/">
-
- <title>hmm</title>
-
- <author>
- <email>hmm@example.com</email>
- <name>foo</name>
- </author>
- <generator version="1.1" uri="http://example.org">Hmm</generator>
- <author>
- <email>bar@example.com</email>
- <name>foo</name>
- </author>
- <rights type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
- </rights>
-
-
- <entry></entry>
-
- <entry foo:bar="baz">
- <title>test</title>
- <summary type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <b>test</b> summary
- </div>
- </summary>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_title.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_title.xml
deleted file mode 100644
index c118e74727..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_title.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom feed and entry with random attributes works
-Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).title.text == "test";
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom"
- xmlns:foo="http://www.example.org"
- foo:quux="quuux">
-
- <title>hmm</title>
-
- <author>
- <email>hmm@example.com</email>
- <name>foo</name>
- </author>
- <generator version="1.1" uri="http://example.org">Hmm</generator>
- <author>
- <email>bar@example.com</email>
- <name>foo</name>
- </author>
- <rights type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
- </rights>
-
-
- <entry></entry>
-
- <entry foo:bar="baz">
- <title>test</title>
-
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_title_normalized.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_title_normalized.xml
deleted file mode 100644
index 19e2ac1a6f..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_title_normalized.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom entry title normalized
-Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).title.text == "test";
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom"
- xmlns:foo="http://www.example.org"
- foo:quux="quuux">
-
- <title>hmm</title>
-
- <author>
- <email>hmm@example.com</email>
- <name>foo</name>
- </author>
- <generator version="1.1" uri="http://example.org">Hmm</generator>
- <author>
- <email>bar@example.com</email>
- <name>foo</name>
- </author>
- <rights type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
- </rights>
-
-
- <entry></entry>
-
- <entry foo:bar="baz">
- <title>test</title>
-
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_updated.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_updated.xml
deleted file mode 100644
index 4aed7e9c70..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_updated.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom updated works
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).updated == 'Sat, 13 Dec 2003 18:30:02 GMT'
-
--->
-
-<feed xmlns="http://www.w3.org/2005/Atom">
-
- <title>Example Feed</title>
- <link href="http://example.org/"/>
- <updated>2003-12-13T18:30:02Z</updated>
- <author>
- <name>John Doe</name>
- </author>
- <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
-
- <entry>
- <title>Atom-Powered Robots Run Amok</title>
- <link href="http://example.org/2003/12/13/atom03"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
- <updated>2003-12-13T18:30:02Z</updated>
- <summary>Some text.</summary>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_w_content_encoded.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_w_content_encoded.xml
deleted file mode 100644
index 58f94c6c1b..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_w_content_encoded.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom entry content:encoded and xhtml works
-Expect: var content = feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).content.text; content == "<b>test</b> content";
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom"
- xmlns:foo="http://www.example.org"
- foo:quux="quuux"
- xmlns:content="http://purl.org/rss/1.0/modules/content/">
-
- <title>hmm</title>
-
- <author>
- <email>hmm@example.com</email>
- <name>foo</name>
- </author>
- <generator version="1.1" uri="http://example.org">Hmm</generator>
- <author>
- <email>bar@example.com</email>
- <name>foo</name>
- </author>
- <rights type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
- </rights>
-
-
- <entry></entry>
-
- <entry foo:bar="baz">
- <title>test</title>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <b>test</b> content
- </div>
- </content>
- <content:encoded>
- shouldn't appear
- </content:encoded>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_xhtml_baseURI_with_amp.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_xhtml_baseURI_with_amp.xml
deleted file mode 100644
index 20819cecd3..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_xhtml_baseURI_with_amp.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom entry content xhtml works with a base URI that contains an ampersand.
-Base: http://www.travellerspoint.com/photo_gallery_feed.cfm?tags=Canada&onlyShowFeatured=true
-Expect: var frag = null; var content = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).content; var parser = Components.classes["@mozilla.org/xmlextras/domparser;1"].createInstance(Components.interfaces.nsIDOMParser); var doc = parser.parseFromString("<div/>", "text/xml"); frag = content.createDocumentFragment(doc.documentElement); notEqual(frag, null, "frag is not null"); true;
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom"
- xmlns:foo="http://www.example.org"
- foo:quux="quuux">
-
- <title>hmm</title>
-
- <author>
- <email>hmm@example.com</email>
- <name>foo</name>
- </author>
- <generator version="1.1" uri="http://example.org">Hmm</generator>
- <author>
- <email>bar@example.com</email>
- <name>foo</name>
- </author>
- <rights type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
- </rights>
-
- <entry foo:bar="baz">
- <title>test</title>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <b>test</b> content
- </div>
- </content>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_xmlBase.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_xmlBase.xml
deleted file mode 100644
index 1656e21742..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_xmlBase.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom entry with xml:base
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link.spec == "http://www.example.org/foo";
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
- <id>tag:example.com,2006:/atom/conformance/linktest/</id>
- <title>Atom Link Tests</title>
- <updated>2005-06-18T6:23:00Z</updated>
- <link href="http://www.example.org" />
-
- <entry xml:base="http://www.example.org">
- <id>tag:example.org,2006:/linkreltest/1</id>
- <title>Does your reader support xml:base properly? </title>
- <updated>2006-06-23T12:12:12Z</updated>
- <link href="foo"/>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/entry_xmlBase_on_link.xml b/toolkit/components/feeds/test/xml/rfc4287/entry_xmlBase_on_link.xml
deleted file mode 100644
index 0ead142558..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/entry_xmlBase_on_link.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom entry with xml:base
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link.spec == "http://www.example.org/bar/foo";
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
-
- <id>tag:example.com,2006:/atom/conformance/linktest/</id>
- <title>Atom Link Tests</title>
- <updated>2005-06-18T16:13:00Z</updated>
- <link href="http://www.example.org" />
-
- <entry xml:base="http://www.example.org">
- <id>tag:example.org,2006:/linkreltest/1</id>
- <title>Does your reader support xml:base properly? </title>
- <updated>2006-06-23T12:12:12Z</updated>
- <link xml:base="/bar/" href="foo"/>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_atom_rights_xhtml.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_atom_rights_xhtml.xml
deleted file mode 100644
index 83add32651..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_atom_rights_xhtml.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom rights works with HTML
-Expect: feed.fields.getProperty('atom:rights') != null
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
- <title type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> title</div>
- </title>
- <rights type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
- </rights>
- <summary type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><div><div>test</div> summary</div></div>
- </summary>
-</feed> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_author.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_author.xml
deleted file mode 100644
index 790027ee3c..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_author.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom author count works
-Expect: feed.authors.length == 1;
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
-<title>test title</title>
-<author>
-</author>
-</feed> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_author2.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_author2.xml
deleted file mode 100644
index eae8292fa5..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_author2.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom author count works
-Expect: feed.authors.length == 2
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
-<title>test title</title>
-<author>
-</author>
-<author>
-</author>
-</feed> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_author_email.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_author_email.xml
deleted file mode 100644
index 95abdbc8ef..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_author_email.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom author name works
-Expect: feed.authors.queryElementAt(0, Components.interfaces.nsIFeedPerson).email=='hmm@example.com';
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
-<title>test title</title>
-<author>
-<email>hmm@example.com</email>
-<name>foo</name>
-</author>
-</feed> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_author_email_2.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_author_email_2.xml
deleted file mode 100644
index 71cace7737..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_author_email_2.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom author name works
-Expect: feed.authors.queryElementAt(1, Components.interfaces.nsIFeedPerson).email=='bar@example.com';
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
-<title>test title</title>
-<author>
-<email>hmm@example.com</email>
-<name>foo</name>
-</author>
-<author>
-<email>bar@example.com</email>
-<name>foo</name>
-</author>
-</feed> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_author_name.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_author_name.xml
deleted file mode 100644
index 2df46f8d5e..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_author_name.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom author name works
-Expect: feed.authors.queryElementAt(0, Components.interfaces.nsIFeedPerson).name=='foo';
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
-<title>test title</title>
-<author>
-<name>foo</name>
-</author>
-</feed> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_author_surrounded.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_author_surrounded.xml
deleted file mode 100644
index b15278f91a..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_author_surrounded.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom author name works
-Expect: feed.authors.queryElementAt(0, Components.interfaces.nsIFeedPerson).name=='John Doe';
-
--->
-
-<feed xmlns="http://www.w3.org/2005/Atom">
-
- <title>Example Feed</title>
- <link href="http://example.org/"/>
- <updated>2003-12-13T18:30:02Z</updated>
- <author>
- <name>John Doe</name>
- </author>
- <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
-
- <entry>
- <title>Atom-Powered Robots Run Amok</title>
- <link href="http://example.org/2003/12/13/atom03"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
- <updated>2003-12-13T18:30:02Z</updated>
- <summary>Some text.</summary>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_author_uri.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_author_uri.xml
deleted file mode 100644
index 44149036cb..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_author_uri.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom author uri works
-Expect: feed.authors.queryElementAt(1, Components.interfaces.nsIFeedPerson).uri.spec =='http://example.com/';
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
-<title>test title</title>
-<author>
-<email>hmm@example.com</email>
-<name>foo</name>
-<uri>http://example.org</uri>
-</author>
-<author>
-<email>bar@example.com</email>
-<name>foo</name>
-<uri>http://example.com/</uri>
-</author>
-</feed> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_comment_rss_extra_att.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_comment_rss_extra_att.xml
deleted file mode 100644
index 795d3f6ad2..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_comment_rss_extra_att.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: wfw works with extra attribute
-Expect: feed.fields.getProperty('wfw:commentRss') == 'http://example.org'
-
--->
-
-<feed xmlns="http://www.w3.org/2005/Atom"
- xmlns:foo="http://example.org"
- xmlns:bla="http://wellformedweb.org/CommentAPI/">
-
- <title>Example Feed</title>
- <link href="http://example.org/"/>
- <updated>2003-12-13T18:30:02Z</updated>
- <author>
- <name>John Doe</name>
- </author>
- <id foo:bar="baz">urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
- <bla:commentRss hmm="yeah">http://example.org</bla:commentRss>
- <entry>
- <title>Atom-Powered Robots Run Amok</title>
- <link href="http://example.org/2003/12/13/atom03"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
- <updated>2003-12-13T18:30:02Z</updated>
- <summary>Some text.</summary>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_contributor.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_contributor.xml
deleted file mode 100644
index abb50c154c..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_contributor.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom contributor uri works
-Expect: feed.contributors.queryElementAt(1, Components.interfaces.nsIFeedPerson).uri.spec=='http://example.com/';
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
- <title>test title</title>
- <contributor>
- <email>hmm@example.com</email>
- <name>foo</name>
- <uri>http://example.org</uri>
- </contributor>
- <contributor>
- <email>bar@example.com</email>
- <name>foo</name>
- <uri>http://example.com</uri>
- </contributor>
-</feed> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_entry_count.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_entry_count.xml
deleted file mode 100644
index 53028d3d1d..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_entry_count.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom entry count works
-Expect: feed.items.length == 3
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
- <title>test title</title>
- <logo>http://example.org/logo.jpg</logo>
- <entry></entry>
- <entry></entry>
- <entry></entry>
-</feed> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_generator.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_generator.xml
deleted file mode 100644
index 5112775b9b..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_generator.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom generator works
-Expect: feed.generator.agent == 'Hmm';
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
-
-<author>
-<email>hmm@example.com</email>
-<name>foo</name>
-</author>
-
-
- <generator>Hmm</generator>
-
-<author>
-<email>bar@example.com</email>
-<name>foo</name>
-</author>
-
-
- <title type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> title</div>
- </title>
- <rights type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
- </rights>
- <summary type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><div><div>test</div> summary</div></div>
- </summary>
-</feed> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_generator_uri.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_generator_uri.xml
deleted file mode 100644
index a4b8c735c8..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_generator_uri.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom generator works
-Expect: feed.generator.uri.spec == 'http://example.org/';
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
-
-<author>
-<email>hmm@example.com</email>
-<name>foo</name>
-</author>
-
-
- <generator uri="http://example.org">Hmm</generator>
-
-<author>
-<email>bar@example.com</email>
-<name>foo</name>
-</author>
-
-
- <title type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> title</div>
- </title>
- <rights type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
- </rights>
- <summary type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><div><div>test</div> summary</div></div>
- </summary>
-</feed> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_generator_uri_xmlbase.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_generator_uri_xmlbase.xml
deleted file mode 100644
index 54191b50ec..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_generator_uri_xmlbase.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom generator works
-Expect: feed.generator.uri.spec == 'http://example.org/gen/';
-
--->
-<feed xml:base="http://example.org/" xmlns="http://www.w3.org/2005/Atom">
-
-<author>
-<email>hmm@example.com</email>
-<name>foo</name>
-</author>
-
-
- <generator uri="/gen/">Hmm</generator>
-
-<author>
-<email>bar@example.com</email>
-<name>foo</name>
-</author>
-
-
- <title type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> title</div>
- </title>
- <rights type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
- </rights>
- <summary type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><div><div>test</div> summary</div></div>
- </summary>
-</feed> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_generator_version.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_generator_version.xml
deleted file mode 100644
index 845ce75040..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_generator_version.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom generator works
-Expect: feed.generator.version == "1.1"
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
-
-<author>
-<email>hmm@example.com</email>
-<name>foo</name>
-</author>
-
-
- <generator version="1.1" uri="http://example.org">Hmm</generator>
-
-<author>
-<email>bar@example.com</email>
-<name>foo</name>
-</author>
-
-
- <title type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> title</div>
- </title>
- <rights type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
- </rights>
- <summary type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><div><div>test</div> summary</div></div>
- </summary>
-</feed> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_icon.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_icon.xml
deleted file mode 100644
index 017aafbad1..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_icon.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom icon works
-Expect: feed.fields.getProperty('atom:icon') == 'http://example.org/favicon.ico'
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
- <title>test title</title>
- <icon>http://example.org/favicon.ico</icon>
-</feed> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_id.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_id.xml
deleted file mode 100644
index 6c538e8015..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_id.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom author name works
-Expect: feed.fields.getProperty('atom:id') == 'urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6' && feed.id == 'urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6'
-
--->
-
-<feed xmlns="http://www.w3.org/2005/Atom">
-
- <title>Example Feed</title>
- <link href="http://example.org/"/>
- <updated>2003-12-13T18:30:02Z</updated>
- <author>
- <name>John Doe</name>
- </author>
- <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
-
- <entry>
- <title>Atom-Powered Robots Run Amok</title>
- <link href="http://example.org/2003/12/13/atom03"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
- <updated>2003-12-13T18:30:02Z</updated>
- <summary>Some text.</summary>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_id_extra_att.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_id_extra_att.xml
deleted file mode 100644
index ef718463be..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_id_extra_att.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom feed id works with extra attribute
-Expect: feed.fields.getProperty('atom:id') == 'urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6'
-
--->
-
-<feed xmlns="http://www.w3.org/2005/Atom"
- xmlns:foo="http://example.org">
-
- <title>Example Feed</title>
- <link href="http://example.org/"/>
- <updated>2003-12-13T18:30:02Z</updated>
- <author>
- <name>John Doe</name>
- </author>
- <id foo:bar="baz">urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
-
- <entry>
- <title>Atom-Powered Robots Run Amok</title>
- <link href="http://example.org/2003/12/13/atom03"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
- <updated>2003-12-13T18:30:02Z</updated>
- <summary>Some text.</summary>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_logo.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_logo.xml
deleted file mode 100644
index 2a90fe22b5..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_logo.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom logo works
-Expect: feed.image.getProperty('url') == 'http://example.org/logo.jpg'
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
- <title>test title</title>
- <logo xml:base="http://example.org/">logo.jpg</logo>
-</feed> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_random_attributes_on_feed_and_entry.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_random_attributes_on_feed_and_entry.xml
deleted file mode 100644
index a4c5633e27..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_random_attributes_on_feed_and_entry.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom feed and entry with random attributes works
-Expect: feed.title.text == "hmm" && feed.items.length == 2
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom"
- xmlns:foo="http://www.example.org"
- foo:quux="quuux">
-
- <title>hmm</title>
-
- <author>
- <email>hmm@example.com</email>
- <name>foo</name>
- </author>
- <generator version="1.1" uri="http://example.org">Hmm</generator>
- <author>
- <email>bar@example.com</email>
- <name>foo</name>
- </author>
- <rights type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><i>test</i> rights</div>
- </rights>
-
- <entry foo:bar="baz"></entry>
- <entry></entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_rights_normalized.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_rights_normalized.xml
deleted file mode 100644
index b7ef460478..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_rights_normalized.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom rights works normalized
-Expect: feed.rights.plainText() == "test rights"
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
- <title type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> title</div>
- </title>
- <rights type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> rights</div>
- </rights>
-</feed> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_rights_xhtml.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_rights_xhtml.xml
deleted file mode 100644
index 422c6fb492..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_rights_xhtml.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom rights works
-Expect: feed.fields.getProperty('atom:rights') != null
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
- <title type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> title</div>
- </title>
- <rights type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> rights</div>
- </rights>
-</feed> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_rights_xhtml_nested_divs.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_rights_xhtml_nested_divs.xml
deleted file mode 100644
index ebad24ac3b..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_rights_xhtml_nested_divs.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom rights works with nested divs
-Expect: feed.fields.getProperty('atom:rights') != null
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
- <title type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> title</div>
- </title>
- <rights type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><div><div>test</div> rights</div></div>
- </rights>
-</feed> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_subtitle.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_subtitle.xml
deleted file mode 100644
index 096061399e..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_subtitle.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom subtitle works
-Expect: var sub = feed.subtitle.text; sub == '<b>test</b> subtitle';
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
- <subtitle type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> subtitle</div>
- </subtitle>
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_tantek_title.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_tantek_title.xml
deleted file mode 100644
index cba9a4918f..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_tantek_title.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-Description: XHTML title with apos
-Expect: feed.title.plainText() == "Tantek's Updates"
--->
-<feed xml:lang="en-US"
- xmlns="http://www.w3.org/2005/Atom">
- <title type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">Tantek's Updates</div>
- </title>
- <link href="http://tantek.com/"
- rel="alternate" title="Tantek's Posts" type="text/html"/>
- <link href="http://tantek.com/updates.atom"
- rel="self" />
- <id>http://tantek.com/updates.atom</id>
- <author>
- <name>Tantek</name>
- <uri>http://tantek.com/</uri>
- </author>
- <updated>2006-05-02T20:13:00-07:00</updated>
- <entry>
- <updated>2006-04-22T00:00:00-07:00</updated>
- <published>2006-04-22T00:00:00-07:00</published>
- <link href="http://www.makezine.com/faire/"
- rel="alternate" title="Make Faire" type="text/html"/>
- <id>http://www.makezine.com/faire/</id>
- <title>Make Faire</title>
- <content type="xhtml" xml:space="preserve">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <div class="vevent">
- <a class="url" href="http://www.makezine.com/faire/">
- <abbr class="dtstart" title="20060422">
- 4/22</abbr>-<abbr class="dtend" title="20060424">23</abbr>
-
- <span class="summary">
- Make Faire
- </span> @
- <span class="location">
- San Mateo Fairgrounds
- </span>
- </a>
- </div>
- </div>
- </content>
- </entry>
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_title.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_title.xml
deleted file mode 100644
index 6e0cea0039..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_title.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom title works
-Expect: feed.title.text == 'test title'
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
-<title>test title</title>
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_title_full_feed.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_title_full_feed.xml
deleted file mode 100644
index cef3f84a3b..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_title_full_feed.xml
+++ /dev/null
@@ -1,936 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
-Description: Feed title works with full entry
-Expect: feed.title.text == 'ongoing'
--->
-<feed xmlns='http://www.w3.org/2005/Atom'
- xml:base='http://www.tbray.org/ongoing/ongoing.atom'
- xml:lang='en-us'>
- <title>ongoing</title>
- <id>http://www.tbray.org/ongoing/</id>
- <link href='./' />
- <link rel='self' href='' />
- <logo>rsslogo.jpg</logo>
- <icon>/favicon.ico</icon>
- <updated>2006-04-26T20:10:25-08:00</updated>
- <author><name>Tim Bray</name></author>
- <subtitle>ongoing fragmented essay by Tim Bray</subtitle>
- <rights>All content written by Tim Bray and photos by Tim Bray Copyright Tim Bray, some rights reserved, see /ongoing/misc/Copyright</rights>
- <generator uri='/misc/Colophon'>Generated from XML source code using Perl, Expat, XML::Parser, Emacs, Mysql, and ImageMagick. Industrial strength technology, baby.</generator>
-
-<entry xml:base='When/200x/2006/04/26/'>
- <title>Spring in White on White</title>
- <link href='Spring-in-White-on-White' />
- <id>http://www.tbray.org/ongoing/When/200x/2006/04/26/Spring-in-White-on-White</id>
- <published>2006-04-26T13:00:00-08:00</published>
- <updated>2006-04-26T20:10:16-08:00</updated>
- <category scheme='http://www.tbray.org/ongoing/What/' term='Arts/Photos' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Arts' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Photos' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Garden' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Garden' />
- <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>Most people would generally prefer a climate where it&#x2019;s bright and warm most of the time. But for Canadians and others who live where it&#x2019;s not, there are compensations, and one is the experience of spring. I have a picture.</div></summary>
-<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
-<p>Most people would generally prefer a climate where it’s bright
-and warm most of the time. But for Canadians and others who live where it’s
-not, there are compensations, and one is the experience of
-spring. I have a picture.</p>
-<img src="IMGP3247.png" alt="Pear blossoms against cherry blossoms" />
-<div class="caption"><p>The blossoms are pear in the foreground, cherry behind.</p></div>
-<p>After all the months of 50° North Latitude winter—icy-sharp in most
-of Canada, wet and dark here in Vancouver—the soul, the spirit, and the
-libido all spring to life when the sun comes back. We’ve had a solid year of
-crappy weather, but this last Saturday through Monday were solidly summery,
-bright
-and warm; and in this season the days are already long and each gets
-longer so fast you can feel it.</p>
-<p>On the back porch, our pear tree’s branches were silhouetted against the
-neighbors’ big wild old cherry; the cherry yields no edible fruit but who
-cares, it’s beautiful
-tree any time of year.</p>
-</div></content></entry>
-
-<entry xml:base='When/200x/2006/04/26/'>
- <title>Scott</title>
- <link href='Scott' />
- <id>http://www.tbray.org/ongoing/When/200x/2006/04/26/Scott</id>
- <published>2006-04-26T13:00:00-08:00</published>
- <updated>2006-04-26T20:06:50-08:00</updated>
- <category scheme='http://www.tbray.org/ongoing/What/' term='Business/Sun' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Business' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Sun' />
-<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
-<p>I’ve been watching our internal leadership conference and spending quite a
-bit of time talking in the virtual hallways, and I’ve been surprised at
-the intensity of feeling about Mr. McNealy. Yes, there are those
-here saying “About bloody time, now we can make some progress” but there’s a
-much bigger group that is genuinely emotional about this transition.
-Maybe it’s a function of seniority: I never met nor corresponded with Scott, and
-he hasn’t been
-much of a presence in the company’s conversation in the time I’ve been here.
-But there are a lot of smart, seasoned, unsentimental people making it clear
-that
-he’s been a major force in their lives, at a more personal level than I’m
-used to hearing when people speak about executives. I guess also that to a
-lot of people, Sun’s vision, for which Scott gets some of the credit, was a
-radical and wonderful thing. I first used Unix in 1979 and quit a nice
-big-company job
-to become a VAX-bsd sysadmin in 1983, so I’ve always kind of
-lived inside that vision.
-But I’ll tell you one thing, what I’ve been hearing the last couple of days
-makes me really regret that I didn’t get to know Scott.</p>
-</div></content></entry>
-
-<entry xml:base='When/200x/2006/04/26/'>
- <title>Jacobs, Pictures, Spartans</title>
- <link href='Jane-Jacobs' />
- <id>http://www.tbray.org/ongoing/When/200x/2006/04/26/Jane-Jacobs</id>
- <published>2006-04-26T13:00:00-08:00</published>
- <updated>2006-04-26T17:28:59-08:00</updated>
- <category scheme='http://www.tbray.org/ongoing/What/' term='The World' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='The World' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Arts/Photos' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Arts' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Photos' />
-<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
-<p><a href="http://en.wikipedia.org/wiki/Jane_Jacobs">Jane Jacobs</a> died;
-the city I live in, Vancouver, is pretty solidly Jacobsian both in its current
-shape and its planning dogma. By choosing to live here I’m empirically a
-fan. Oddly, few have remarked how great Jacobs
-<em>looked</em>; her face commanded the eye. Which leads me Alex
-Waterhouse-Hayward’s wonderful
-<a href="http://www.alexwaterhousehayward.com/blog/2006/04/jane-jacobs-viveca-lindfors_26.html">Jane Jacobs &amp; Viveca Lindfors</a>;
-surprising portraits and thoughts on decoration. W-H’s blog has become one of
-only two or three that I
-stab at excitedly whenever I see something new. For example, see
-<a href="http://www.alexwaterhousehayward.com/blog/archives/2006_04_01_archive.html#114476408248660848">Sex Crimes, Homicide and Drugs</a>
-and yes, that’s what it’s about.
-Staying with the death-and-betrayal theme, and apparently (but not really)
-shifting back 2&#xbd; millennia, see John Cowan’s
-<a href="http://recycledknowledge.blogspot.com/2006/04/war-after-simonides.html">The
-War (after Simonides)</a>, being careful to look closely at the links.
-I’ve
-<a href="http://www.tbray.org/ongoing/When/200x/2003/03/24/Herodotus">written</a>
-about those same wars.</p>
-</div></content></entry>
-
-<entry xml:base='When/200x/2006/04/25/'>
- <title>LAMP and MARS</title>
- <link href='Scaling-Rails' />
- <id>http://www.tbray.org/ongoing/When/200x/2006/04/25/Scaling-Rails</id>
- <published>2006-04-25T13:00:00-08:00</published>
- <updated>2006-04-26T07:24:06-08:00</updated>
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Web' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Web' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Sun' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Sun' />
-<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
-<p>At
-<a href="/ongoing/When/200x/2006/04/13/RoR">that Rails conference</a>, when I
-was
-<a href="http://blog.garbledygook.com/2006/04/17/ruby-on-rails-podcast-tim-bray-ruby-on-rails-podcast/">talking</a>
-to
-<a href="http://jroller.com/page/obie">Obie Fernandez</a>, he asked, more or
-less “How can Sun love us? We’re not Java” and I said, more or less, “Hey,
-you’re programmers, you write software and there have to be computers to run
-it, we sell computers, why wouldn’t we love you?” Anyhow, we touched on
-parallelism a bit and I talked up the
-<a href="http://www.sun.com/processors/UltraSPARC-T1/">T1</a>;
-Obie took that ball and
-<a href="http://jroller.com/page/obie?entry=will_ultrasparc_t1_emerge_as">ran with it</a>,
-saying all sorts of positive things about synergy between Rails’
-shared-nothing architecture and our multicore systems. Yeah, well, good in
-theory, but I’m too old to make that kind of prediction without running some
-tests. Hah, it turns out that
-<a href="http://joyent.com/">Joyent</a> has been
-<a href="http://scalewithrails.com/">doing that</a>, and have
-<a href="http://scalewithrails.com/downloads/ScaleWithRails-April2006.pdf">76
-PDF slides</a> on the subject.
-If you care about big-system scaling issues, read the whole thing; a little
-long, but amusing and with hardly any bullet lists. If you’re a Sun
-shareholder looking for a pick-me up, check out slides 40-41, 49, and 52-74.
-Oh, I gather that the T1, Solaris, and ZFS are OK for Java too.
-<i>[Update: The title was just “SAMR”, as in LAMP with two new letters.
-Enough people didn’t get it that I was forced to think about it, and MARS
-works better anyhow.]</i></p>
-</div></content></entry>
-
-<entry xml:base='When/200x/2006/04/25/'>
- <title>Real-Time Journalism</title>
- <link href='Talk-With-Berlind' />
- <id>http://www.tbray.org/ongoing/When/200x/2006/04/25/Talk-With-Berlind</id>
- <published>2006-04-25T13:00:00-08:00</published>
- <updated>2006-04-26T06:40:19-08:00</updated>
- <category scheme='http://www.tbray.org/ongoing/What/' term='The World/Journalism' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='The World' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Journalism' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Syndication' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Syndication' />
-<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
-<p>I got email late yesterday from
-<a href="http://blogs.zdnet.com/bio.php#berlind">David Berlind</a>: “Hey, can
-I call you for a minute?” He wanted commentary on
-<a href="http://blogs.zdnet.com/BTL/?p=2906">a story he was writing</a> that I
-think is about the potential for intellectual-property lock-ins on RSS and Atom
-extensions. I say “I think is about” because the headline is “Will or could
-RSS get forked?”. After a few minutes’ chat, David asked if he could record
-for a podcast, and even though I only had a cellphone, the audio came out OK.
-The conversation was rhythmic: David brought up a succession of potential
-issues and answered each along the lines of “Yes, it’s reasonable to worry
-about that, but in this
-case I don’t see any particular problems.”
-Plus I emitted a mercifully-brief rant on the difference between protocols,
-data, and software.
-On the one hand, I thought David could have been a
-little clearer that I was pushing back against the thrust of his story, but on
-the other hand he included the whole conversation right
-there in the piece, so anyone who actually cares can listen and find out what
-I actually said, not what I think I said nor what David reported I said.
-I find this raw barely-intermediated journalism (we
-talk on the phone this afternoon, it’s on the Web in hours) a little
-shocking still.
-On balance, it’s better than the way we used to do things.</p>
-</div></content></entry>
-
-<entry xml:base='When/200x/2006/04/24/'>
- <title>The Transition Explained</title>
- <link href='CEO-Transition' />
- <id>http://www.tbray.org/ongoing/When/200x/2006/04/24/CEO-Transition</id>
- <published>2006-04-24T13:00:00-08:00</published>
- <updated>2006-04-24T16:49:05-08:00</updated>
- <category scheme='http://www.tbray.org/ongoing/What/' term='Business/Sun' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Business' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Sun' />
-<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
-<p>It’s not that complicated, really.
-Bloggers are
-<a href="http://www.sun.com/2006-0418/js/index.jsp">taking over the world</a>.
-Resistance is futile; you will be assimilated.</p>
-</div></content></entry>
-
-<entry xml:base='When/200x/2006/04/24/'>
- <title>5&#x272d;&#x266b;: One More Cup of Coffee</title>
- <link href='One-More-Cup-Of-Coffee' />
- <id>http://www.tbray.org/ongoing/When/200x/2006/04/24/One-More-Cup-Of-Coffee</id>
- <published>2006-04-24T13:00:00-08:00</published>
- <updated>2006-04-24T13:00:00-08:00</updated>
- <category scheme='http://www.tbray.org/ongoing/What/' term='Arts/Music/Recordings' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Arts' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Music' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Recordings' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Arts/Music/5 Stars' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='5 Stars' />
- <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>I&#x2019;m not really a <a href='http://en.wikipedia.org/wiki/Bob_Dylan'>Bob Dylan</a> fan. A voice like that, and a tunesmithing talent like that, come along only a few times per century, but he&#x2019;s still kind of irritating. That aside, the song <cite>One More Cup of Coffee</cite>, from the 1976 album <a href='http://en.wikipedia.org/wiki/Desire_%28album%29'>Desire</a>, can&#x2019;t be ignored; wonderful tune, wonderful orchestration, wonderful performance. <i>(&#x201c;5&#x272d;&#x266b;&#x201d; series introduction <a href='/ongoing/When/200x/2006/01/23/5-Star-Music'>here</a>; with <a href='/ongoing/When/200x/2006/01/23/5-Star-Music#p-1'>an explanation</a> of why the title may look broken.)</i></div></summary>
-<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
-<p>I’m not really a
-<a href="http://en.wikipedia.org/wiki/Bob_Dylan">Bob Dylan</a> fan. A voice
-like that, and a tunesmithing talent like that, come along only a few times
-per century, but he’s still kind of irritating.
-That aside, the song <cite>One More Cup of Coffee</cite>, from the 1976 album
-<a href="http://en.wikipedia.org/wiki/Desire_%28album%29">Desire</a>, can’t be
-ignored; wonderful tune, wonderful orchestration, wonderful performance.
-<i>(“5✭♫” series introduction <a href="/ongoing/When/200x/2006/01/23/5-Star-Music">here</a>;
-with <a href="/ongoing/When/200x/2006/01/23/5-Star-Music#p-1">an
-explanation</a> of why the title may look broken.)</i></p>
-<img src="Desire.png" class="inline" alt="Desire, by Bob Dylan" />
-<h2 id='p-1'>The Context</h2>
-<p>Nothing I can possibly write will add any wisdom to the
-millions of words, some 90% of them in excess of needs, written on the subject
-of this particular person.</p>
-<p>A personal statement: Bob Dylan has long irritated me for, during the first
-thirty years or
-so of his career, never having given a straight answer to a straight question,
-and for writing songs with dozens of boring verses. But they’ll still be
-listening
-to lots of his performances long after I’m dead, and in recent years he’s
-become a better, more direct, interview.</p>
-<p>My taste in Dylan is a little unusual: once you get past <cite>One More Cup
-of Coffee</cite>, my favorites would be <cite>Baby Let Me Follow You
-Down</cite> (from the <cite>Last Waltz</cite> soundtrack) and
-<cite>Crash on the Levee (Down in the Flood)</cite> from
-<a href="http://en.wikipedia.org/wiki/The_Basement_Tapes">The Basement
-Tapes</a>.</p>
-<p><cite>Desire</cite>, the record, is hit and miss. <cite>Joey</cite>,
-glorification of the life of some mafioso, is flawed in concept
-and unlistenable in execution. <cite>Hurricane</cite>, whatever you think
-about
-<a href="http://en.wikipedia.org/wiki/Rubin_Carter">Mr. Carter</a>, that song
-rocks; and <cite>Isis</cite> hits pretty hard too.</p>
-<h2 id='p-2'>The Music</h2>
-<p>Is there anything in <cite>One More Cup of Coffee</cite> that’s not
-perfect? Well yes, in the verses, the
-lyrics on occasion drag (“He oversees his kingdom / So no stranger does
-intrude / His voice it trembles as he calls out / For another plate of food”).
-But apart from that, the sentiment is compelling,
-<a href="http://en.wikipedia.org/wiki/Scarlet_Rivera">Scarlet Rivera’s</a>
-violin is beautifully scored and played, the tune is to die for, and the
-backing vocals are by Emmylou Harris, who you can bet is going to be here in
-the 5-✭ series one of these days.
-And while there’s not much middle ground on the subject of Dylan’s singing, if
-you like it, you’ll <em>really</em> like this song.</p>
-<p>Listen to the choruses: Bob and Emmylou veer wildly around the rhythm, then
-coalesce on the beat when it matters, and they’re making it
-up as they go along, they’re wholly inhabiting the moment, and it’s
-quite, quite perfect.</p>
-<h2 id='p-3'>Sampling It</h2>
-<p>Oh yeah, it’s out there. And there’s a live version too; but the smart
-thing would be to go buy the un-compressed un-DRM’ed shiny round silver
-version of <cite>Desire</cite>; it’s a keeper.</p>
-</div></content></entry>
-
-<entry xml:base='When/200x/2006/04/24/'>
- <title>Atomic Monday</title>
- <link href='Atomic-Monday' />
- <id>http://www.tbray.org/ongoing/When/200x/2006/04/24/Atomic-Monday</id>
- <published>2006-04-24T13:00:00-08:00</published>
- <updated>2006-04-24T00:44:06-08:00</updated>
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Syndication' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Syndication' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Atom' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Atom' />
-<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
-<p>First of all, implementors of anything Atom-related need to spend some time
-<a href="http://golem.ph.utexas.edu/~distler/blog/archives/000793.html">chez
-Jacques Distler</a>; in particular, the conversation that plays out in the
-comments. Second, there’s this piece of software called
-<a href="http://www.planetplanet.org/">Planet Planet</a> that allows you to
-make an aggregate web page by reading lots of feeds; for example, see
-<a href="http://www.planetapache.org/">Planet Apache</a> or
-<a href="http://planetsun.org/">Planet Sun</a>.
-Sam Ruby decided that its Atom support needed some work, so
-<a href="http://www.intertwingly.net/blog/2006/04/23/Adding-Atom-support-to-PlanetPlanet">he did
-it</a>. Now, here’s the exciting part: he pinged me over the weekend and said
-“Hey, look at this” wanting to show me his cleverly-Atomized
-Planet Intertwingly feed.
-I looked at it in
-<a href="http://ranchero.com/netnewswire/">NetNewsWire</a> and was puzzled for
-a moment; some but not all of the
-things in the feed were highlighted as unread, even though this was the first
-time I’d seen it. Then the light went on.
-This
-is Atom doing <em>exactly what we went to all that trouble to make it do</em>.
-NetNewsWire has good Atom support and, because Atom entries all have unique
-IDs and timestamps, it can
-tell that it’s seen lots of those entries before in other feeds that I
-subscribe to. That’s how I found Jacques’ piece. This is huge; anyone who
-uses synthetic or aggregated feeds knows that dupes are a big problem, showing
-up all over the place.
-No longer, Atom makes that problem go away.</p>
-</div></content></entry>
-
-<entry xml:base='When/200x/2006/04/22/'>
- <title>Hyatt on the High-Res Web</title>
- <link href='High-Res-Web' />
- <id>http://www.tbray.org/ongoing/When/200x/2006/04/22/High-Res-Web</id>
- <published>2006-04-22T13:00:00-08:00</published>
- <updated>2006-04-23T17:12:18-08:00</updated>
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Web' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Web' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Presentation' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Presentation' />
-<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
-<p>Check out Dave Hyatt’s
-<a href="http://webkit.opendarwin.org/blog/?p=55">excellent write-up</a> on
-designing and rendering Web pages so they take advantage of the
-higher-resolution screens that <em>may</em> be coming our way.
-I emphasize “may” because I’ve seen how slowly we’ve picked up pixels over
-the years. The first really substantial screen I ever worked on was a
-1988-vintage Sun workstation with about a million pixels. The Mac on my
-lap right now, which has 125 times as much memory as that workstation, has
-only 1.38 million pixels.
-Anyhow, Hyatt has some smart things to say on the issues,
-which are trickier than you might think. I suspect that sometime in a couple of
-years, if I still care about <span class='o'>ongoing</span>, I’m going to
-have to go back and reprocess all the images so that higher-res versions are
-available for those who have the screens and don’t mind downloading bigger
-files.
-Anyhow, Dave’s piece may be slightly misleading in that he talks about SVG
-as though
-it’s something coming in the future. Not so, check out
-<a href="http://zcorpan.1go.dk/sandbox/svg/atom/.xml">this nifty SVG Atom
-logo</a>, which works fine in all the Mozilla browsers I have here.
-Load it up, resize the window, and watch what happens. Then do a “view
-source”.
-<i>[Update:
-<a href="http://blog.codedread.com">Jeff Schiller</a> writes to tell me that
-Opera 9 does SVG (and Opera 8 “SVG Tiny”) too.]
-[<a href="http://www.freeke.org/ffg">Dave Walker</a> writes: Though the shipping version of Safari doesn’t support SVG,
-<a href="http://nightly.webkit.org/builds/Latest-WebKit-SVN.dmg">the
-nightlies</a> do.]
-[<a href="http://www.davelemen.com/archives/2006/04/is_it_time_for_jpeg_2000_to_go_mainstream.html">Dave Lemen</a>
-points to
-<a href="http://en.wikipedia.org/wiki/JPEG-2000">JPEG 2000</a> as possibly
-useful in a high-res context.]</i></p>
-</div></content></entry>
-
-<entry xml:base='When/200x/2006/04/23/'>
- <title>Wrong About the Infield Fly Rule</title>
- <link href='Wrong-About-the-Infield-Fly-Rule' />
- <id>http://www.tbray.org/ongoing/When/200x/2006/04/23/Wrong-About-the-Infield-Fly-Rule</id>
- <published>2006-04-23T13:00:00-08:00</published>
- <updated>2006-04-23T15:02:41-08:00</updated>
- <category scheme='http://www.tbray.org/ongoing/What/' term='The World/Family' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='The World' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Family' />
-<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
-<p>My brother
-<a href="http://takingalongview.blogspot.com/">Rob</a> is really taking to
-this blogging medium. Check out his recent
-<a href="http://takingalongview.blogspot.com/2006/04/credo.html">Credo</a>,
-and also the only instance I’ve seen of
-<a href="http://takingalongview.blogspot.com/2006/04/ode-to-96-chevy-lumina.html">Anglo-Saxon alliterative poetry</a>
-applied to a mini-van.</p>
-</div></content></entry>
-
-<entry xml:base='When/200x/2004/12/12/'>
- <title>Statistics</title>
- <link href='BMS' />
- <id>http://www.tbray.org/ongoing/When/200x/2004/12/12/BMS</id>
- <published>2004-12-12T12:00:00-08:00</published>
- <updated>2006-04-23T10:10:02-08:00</updated>
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Publishing' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Publishing' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Web' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Web' />
- <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>Almost every Sunday I grab the week&#x2019;s <span class="o">ongoing</span> logfiles and update my numbers. I find it interesting and maybe others will too, so this entry is now the charts&#x2019; permanent home. I&#x2019;ll update it most weeks, probably. <i>[Updated: 2006/04/23.]</i></div></summary>
-<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
-<p>Almost every Sunday I grab the week’s <span class='o'>ongoing</span>
-logfiles and update my numbers.
-I find it interesting
-and maybe others will too, so
-this entry is now the charts’ permanent home. I’ll update it most weeks,
-probably.
-<i>[Updated: 2006/04/23.]</i></p>
-<img src="Browser-Market-Share.png" alt="Browser market shares at ‘ongoing’" />
-<div class="caption"><p>Browsers visiting <span class='o'>ongoing</span>,
-percent.</p></div>
-<img src="Browsers-via-search.png" alt="Browser market shares at ‘ongoing’, visitors via search engines" />
-<div class="caption"><p>Browsers visiting <span class='o'>ongoing</span> via
-search engines, percent.</p></div>
-<img src="Search-Engines.png" alt="Search engine market shares at ‘ongoing’" />
-<div class="caption"><p>Search referrals to <span
-class='o'>ongoing</span> .</p></div>
-<img src="Feeds.png" alt="RSS and Atom feed fetches" />
-<div class="caption"><p>Fetches of the RSS 2.0 and Atom 1.0 feeds.</p></div>
-<p>The notes on usage and source code will return in coming weeks when I get
-the cycles to rewrite this whole article.</p>
-<h2 id='p-1'>What a “Hit” Means</h2>
-<p>I recently
-<a href="/ongoing/When/200x/2006/02/07/Thumbnail">updated</a> the
-<a href="/ongoing/misc/Colophon"><span class='o'>ongoing</span> software</a>
-(but haven’t updated the Colophon I see, oops).
-Anyhow, the <code>XMLHttpRequest</code> now issued by each page seems to be a
-pretty reliable counter of the number of actual browsers with humans behind
-them reading the pages. I checked against
-<a href="/ongoing/When/200x/2005/12/04/Google-Analytics">Google Analytics</a>
-and the numbers agreed to within a dozen or two on days with 5,000 to 10,000
-page views; interestingly, Google Analytics was always 10 or 20 views
-higher.</p>
-<p>Anyhow, do <em>not</em> conclude that now I know how many people are
-reading whatever it is I write here; because I publish lots of short pieces
-that are all there in my RSS feed, and anyone reading my Atom feed gets the
-full content of everything.
-I and I have <em>no #&amp;*!$ idea</em> how many people look at my feeds.</p>
-<p>By the way, this was the first time in weeks and weeks that I’d looked at the
-Analytics numbers, and they showed almost exactly zero change from the report
-linked above. So I’m going to turn them off; they’re a little too intrusive
-and I think may be slowing page loads.</p>
-<p>Anyhow, I ran some detailed statistics on the traffic for Wednesday,
-February 8th, 2006.</p>
-<table cellspacing="3" cellpadding="2" class="wltable">
-<tr valign="top"><td>Total connections to the server</td><td align="right">180,428</td></tr>
-<tr valign="top"><td>Total successful GET transactions</td><td align="right">155,507</td></tr>
-<tr valign="top"><td>Total fetches of the RSS and Atom feeds</td><td align="right">88,450</td></tr>
-<tr valign="top"><td>Total GET transactions that actually fetched data (i.e. status code
-200 as opposed to 304)</td><td align="right">87,271</td></tr>
-<tr valign="top"><td>Total GETs of actual ongoing pages (i.e. not CSS, js, or
-images)</td><td align="right">18,444</td></tr>
-<tr valign="top"><td>Actual human page-views</td><td align="right">6,348</td>
-</tr>
-</table>
-<p>So, there you have it. Doing a bit of rounding, if you take the 180K
-transactions and subtract the 90K feed fetches and the 6000 actual human page
-views, you’re left with 84,000 or so “Web overhead” transactions, mostly
-stylesheets and graphics and so on.
-For every human who viewed a page, it was fetched almost twice again by
-various kinds of robots and non-browser automated agents.</p>
-<p>It’s amazing that the whole thing works at all.</p>
-</div></content></entry>
-
-<entry xml:base='When/200x/2006/04/18/'>
- <title>XML Automaton</title>
- <link href='XML-Grammar' />
- <id>http://www.tbray.org/ongoing/When/200x/2006/04/18/XML-Grammar</id>
- <published>2006-04-18T13:00:00-08:00</published>
- <updated>2006-04-23T08:25:56-08:00</updated>
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology/XML' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='XML' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Coding' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Coding' />
- <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>In December of 1996 I released a piece of software called <a href='http://www.textuality.com/Lark/'>Lark</a>, which was the world&#x2019;s first <a href='http://www.w3.org/TR/REC-xml/#dt-xml-proc'>XML Processor</a> (as the term is defined in the <a href='http://www.w3.org/TR/REC-xml/'>XML Specification</a>). It was successful, but I stopped maintaining it in 1998 because lots of other smart people, and some big companies like Microsoft, were shipping perfectly good processors. I never <em>quite</em> open-sourced it, holding back one clever bit in the moronic idea that I could make money out of Lark somehow. The magic sauce is a finite state machine that can be used to parse XML 1.0. Recently, someone out there needed one of those, so I thought I&#x2019;d publish it, with some commentary on Lark&#x2019;s construction and an amusing anecdote about the name. I doubt there are more than twelve people on the planet who care about this kind of parsing arcana. <i>[Rick Jelliffe <a href='http://www.oreillynet.com/xml/blog/2006/04/xml_in_xml.html'>has upgraded</a> the machine].</i></div></summary>
-<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
-<p>In December of 1996 I released a piece of software called
-<a href="http://www.textuality.com/Lark/">Lark</a>, which was
-the world’s first
-<a href="http://www.w3.org/TR/REC-xml/#dt-xml-proc">XML Processor</a> (as the
-term is defined in the
-<a href="http://www.w3.org/TR/REC-xml/">XML Specification</a>).
-It was successful, but I stopped maintaining it in 1998 because lots of other
-smart people, and some big companies like Microsoft, were shipping perfectly
-good processors. I never <em>quite</em> open-sourced it, holding back one
-clever bit in the moronic idea that I could make money out of Lark somehow.
-The magic sauce is a finite state machine that can be used to parse XML 1.0.
-Recently, someone out there needed one of those, so I thought I’d publish
-it, with some commentary on Lark’s construction and an amusing anecdote about
-the name.
-I doubt there are more than twelve people on the planet who care about
-this kind of parsing arcana.
-<i>[Rick Jelliffe
-<a href="http://www.oreillynet.com/xml/blog/2006/04/xml_in_xml.html">has
-upgraded</a> the machine].</i></p>
-<h2 id='p-1'>Why “Lark”?</h2>
-<p><a href="http://www.laurenwood.org/anyway/">Lauren</a> and I went to
-Australia in late 1996 to visit her mother and to get married, which we
-did on November 30th. Forty-eight hours later, Lauren twisted her knee
-badly enough that she was pretty well
-confined to a sofa for the rest of our Australian vacation.</p>
-<p>So I broke out my computer and finished the work I’d already started on my
-XML processor, and decided to call it Lark for <b>La</b>uren’s <b>R</b>ight
-<b>K</b>nee.</p>
-<h2 id='p-2'>How Lark Worked</h2>
-<p>Lark was a pure
-<a href="http://en.wikipedia.org/wiki/Deterministic_finite_state_machine">deterministic
-finite automaton</a> (DFA)
-parser, with a little teeny state stack.
-Some of its transitions were labeled with named “events” that would provoke
-the parser to do something if, for example, it had just recognized a start tag
-or whatever.</p>
-<p>DFA-driven parsers are a common enough design pattern, although I think
-Lark is the only example in the XML space.
-There are well-known parser generators such as
-<a href="http://en.wikipedia.org/wiki/Yacc">yacc</a>,
-<a href="http://en.wikipedia.org/wiki/GNU_bison">GNU bison</a>, and
-<a href="https://javacc.dev.java.net/">javacc</a>,
-usually used in combination with lexical scanners such as
-<a href="http://en.wikipedia.org/wiki/Flex_lexical_analyser">flex</a> so that
-you can write your grammar in terms of tokens not characters.
-Also, they handle LALR langauges, so the parsing technique is quite a bit
-richer than a pure state machine.</p>
-<p>I thought I had a better idea. The grammar of XML is simple
-enough, and the syntax characters few enough, that I thought I could just
-write down the state machine by hand.
-So that’s what I did, inventing a special-purpose DFA-description
-language for the purpose.</p>
-<p>Then I had a file called <code>Lark.jin</code> which was really a Java
-program that used the state machine to parse XML. The transition “events”
-in the machine were mapped to <code>case</code> labels in a huge
-<code>switch</code> construct. Then there was a horrible, <em>horrible</em>
-Perl program that read the <code>Lark.jin</code> and the automaton,
-generated the DFA tables in Java syntax, inserted them into the code and
-produced <code>Lark.java</code>, which you actually compiled
-to make the parser.</p>
-<p>So while Java doesn’t have a preprocessor, Lark did, which made quite a few
-things easier.</p>
-<p>There were a lot of tricks; some of the state transitions
-weren’t on characters, they were on XML character classes such as
-<code>NameChar</code> and so on.
-This made the automaton easier to write, and in fact, to keep the class files
-small, the character-class transitions persisted into the Java form, and the
-real DFA was built at startup time.
-These days, quick startup might be more important than <code>.class</code>
-file size.</p>
-<h2 id='p-3'>What Was Good</h2>
-<p>It was <em>damn</em> fast. James Clark managed to hand-craft a
-Java-language XML parser called
-<a href="http://jclark.com/xml/xp/index.html">XP</a> that was a little faster
-than Lark, but he did that by clever I/O buffering, and I was determined to
-leapfrog him by improving my I/O.</p>
-<p>This was before the time of standardized XML APIs, but Lark had a stream API
-that influenced SAX, and a DOM-like tree API; both worked just fine.
-Lark is one of very few parsers ever to have survived the
-<a href="http://www.securityfocus.com/archive/1/303509/2002-12-13/2002-12-19/0">billion
-laughs attack</a>.</p>
-<p>Lark was put into production in quite a few deployments, and the flow of
-bug reports slowed to a trickle.
-Then in 1998 I noticed that IBM and Microsoft and BEA and everyone else
-were building XML Processors, so I decided that it wasn’t worthwhile
-maintaining mine.</p>
-<h2 id='p-4'>What Was Bad</h2>
-<p>I never got around to teaching it namespaces, which means it wouldn’t be
-real useful today.</p>
-<p>It had one serious bug that would have been real work to fix and since
-nobody ever encountered it in practice, I kept putting it off and never did.
-If you had an internal parsed entity reference in an attribute value and the
-replacement text included the attribute delimiter (<code>'</code> or
-<code>"</code>), it would scream and claim you had a busted XML document.</p>
-<h2 id='p-5'>That Automaton</h2>
-<p>What happened was,
-<a href="http://www.oreillynet.com/pub/au/1712">Rick Jelliffe</a>, who is a
-Good Person, was
-<a href="http://www.stylusstudio.com/xmldev/200604/post30110.html">looking for
-a FSM for XML</a> and I eventually noticed, and so I sent him mine.</p>
-<p>There’s no reason whatsoever to keep it a secret:
-<a href="/ongoing/code/lark/com/textuality/autom.txt">here it is</a>.
-Be warned: it’s ugly.</p>
-<p>Fortunately, there were only 227 states and 8732 transitions, so the state
-number fit into a
-byte; that and the associated event index pack into a short.
-To make things even tighter, the transitions were only keyed by characters up
-to 127, as in 7-bit ASCII.
-Characters higher than that can’t be XML syntax characters, so we’re only
-interested whether they fall into classes like <code>NameChar</code> and
-<code>NameStartChar</code> and so on. A 64K <code>byte[]</code> array takes
-care of that, each byte having a class bitmask.</p>
-<p>As a result of all this jiggery-pokery, the DFA ends up, believe it
-or not, constituting a <code>short[227][128]</code>.</p>
-<p>Here’s a typical chunk of the automaton:</p>
-<pre><code>1. # in Start tag GI
-2. State StagGI BustedMarkup {in element type}
-3. T $NameC StagGI
-4. T $S InStag !EndGI
-5. T > InDoc !EndGI !ReportSTag
-6. T / EmptyClose !EndGI</code></pre>
-<p>This state, called <code>StagGI</code>, is the state where we’re actually
-reading the name of a tag, we got here by seeing a <code>&lt;</code> followed
-by a <code>NameStart</code> character.<br/>
-Line 1 is a comment.<br/>
-In line 2 we name the state, and support error reporting, providing the name
-of another state to fall back into in case of error, and in the curly braces,
-some text to help build an error message.<br/>
-Line 3 says that if we see a valid XML Name character, we just stay in this
-state.<br/>
-Line 4 says that if we see an XML space character, we move to state
-<code>InStag</code> and process an <code>EndGI</code> event, which would stash
-the characters in the start tag.<br/>And so on.</p>
-<h2 id='p-6'>Other Hackery</h2>
-<p>An early cut of Lark used String and StringBuffer objects to hold all the
-bits and pieces of the XML. This might be a viable strategy today, but in
-1996’s Java it was painfully slow.
-So the code goes to heroic lengths to live in the land of character arrays at
-all times, making Strings only when a client program asks for one through the
-API. The performance difference was mind-boggling.</p>
-<h2 id='p-7'>An Evil Idea</h2>
-<p>If you look at the automaton, and the Lark code, at least half—I’d bet
-three quarters—is there to deal with parsing the DTD and then dealing with
-entity wrangling.
-A whole bunch more is there to support DOM-building and walking.</p>
-<p>I bet if I went through and simply removed support for anything coming out
-of the <code>&lt;!DOCTYPE></code>, including all entity processing,
-then discarded
-the DOM stuff, then added namespace support and SAX and StAX APIs, it would be
-less than half its current size.
-Then if I reworked the I/O, knowing what I know now and stealing some tricks
-that James Clark uses in
-<a href="http://expat.sourceforge.net/">expat</a>, I bet it would
-be the fastest Java XML parser on the planet for XML docs without a
-DOCTYPE; by a wide margin. It’s hard to beat a DFA.</p>
-<p>And it would still be fully XML 1.0 compliant. Because (snicker) this is
-Java, and your basic core Java now includes an XML parser, so I could simply
-instrument Larkette to buffer the prologue and if it saw a DOCTYPE with an
-internal subset, defer to Java’s built-in parser.</p>
-<p>I’ll probably never do it. But the thought brings a smile to my face.</p>
-</div></content></entry>
-
-<entry xml:base='When/200x/2006/04/22/'>
- <title>Just A Kid</title>
- <link href='Just-a-Kid' />
- <id>http://www.tbray.org/ongoing/When/200x/2006/04/22/Just-a-Kid</id>
- <published>2006-04-22T13:00:00-08:00</published>
- <updated>2006-04-22T13:37:58-08:00</updated>
- <category scheme='http://www.tbray.org/ongoing/What/' term='The World/Food and Drink' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='The World' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Food and Drink' />
-<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
-<p>Last weekend, Lauren felt like cooking up home-made Easter eggs, so
-the shopping list included “chocolate chips (large bag)”. I was heading down
-the bulk-foods aisle and realized one of the vertical acrylic bins was full of
-them. Someone had been sloppy, and there was a little heap of chocolate chips
-on the shelf underneath it. For a second, I flashed into pure eight-year-old
-mode, thinking “Holy cow, there’s a <em>whole bin</em> full of chocolate
-chips, and more just lying there!” I popped a few in my mouth and they were
-excellent; semi-sweet, dark, strong, and firm. I was still in the state that
-Buddhists don’t mean when they say “Child’s Mind”, thinking “I
-can get as many as I want!” The list did say “large bag” after all, so I put
-a bag under the spout and gleefully jammed the lever <em>all the way
-over</em>. At home, Lauren said “You went overboard, a bit, didn’t you?”
-and now we have a plastic canister-full in the pantry which should last us
-into 2007. It’s a good feeling.</p>
-</div></content></entry>
-
-<entry xml:base='When/200x/2006/04/22/'>
- <title>Goddess</title>
- <link href='Goddess' />
- <id>http://www.tbray.org/ongoing/When/200x/2006/04/22/Goddess</id>
- <published>2006-04-22T13:00:00-08:00</published>
- <updated>2006-04-22T12:25:59-08:00</updated>
- <category scheme='http://www.tbray.org/ongoing/What/' term='The World/Family' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='The World' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Family' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Microsoft' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Microsoft' />
-<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
-<p>That would be my wife
-<a href="http://www.laurenwood.org/anyway/">Lauren</a>. After
-<a href="/ongoing/When/200x/2006/04/16/Mad-at-Microsoft">I b0rked</a> our
-Win2K gamebox, I tried re-installing the OS and eventually reduced it to
-complete brick-ness, it recognized neither the video adapter nor the network
-card. So Lauren brushed me aside and started wrestling with the problem, and
-to make a long story short, it almost completely works again. At one point
-she seemed nearly infinite in her capabilities, sitting in front of the
-computer wrangling software updates while knitting baby stuff and looking up
-words in a German dictionary for the kid’s homework. Some of the German nouns
-and muttered curses at the Windows install sounded remarkably like each other.
-Why would anyone not marry a geek? The only problem is that Win2K won’t
-auto-switch resolutions to play games any more, it gets the frequency wrong
-and the LCD goes pear-shaped, you have to hand-select the frequency and
-switch into the right resolution first. LazyWeb?</p>
-</div></content></entry>
-
-<entry xml:base='When/200x/2006/04/21/'>
- <title>Routing Around Spotlight</title>
- <link href='Routing-Around-Spotlight' />
- <id>http://www.tbray.org/ongoing/When/200x/2006/04/21/Routing-Around-Spotlight</id>
- <published>2006-04-21T13:00:00-08:00</published>
- <updated>2006-04-21T23:16:25-08:00</updated>
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Mac OS X/Gripes' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Mac OS X' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Gripes' />
- <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>Herewith two hideously ugly little shell scripts for use when Spotlight refuses to search your mail. Spotlight is a flawed v1.0 implementation of a really good idea and will, I&#x2019;m sure, be debugged in a near-future release. <i>[Update: The LazyWeb is educating me... these are moving targets.]</i></div></summary>
-<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
-<p>Herewith two hideously ugly little shell scripts for use when Spotlight
-refuses to search your mail.
-Spotlight is a flawed v1.0 implementation of a really good idea and will, I’m
-sure, be debugged in a near-future release.
-<i>[Update: The LazyWeb is educating me... these are moving targets.]</i></p>
-<p>My problem is that whereas Mail.app will search my To/From/Subject
-lines (slowly, and with a
-<a href="/ongoing/When/200x/2005/11/20/UnTiger">really irritating GUI</a>),
-the “Entire Message” option just doesn’t work, it returns instantly with no
-results. Yes, I’ve read the hints about making Spotlight re-index,
-but it just flatly refuses to work for me. Mind you, I have a lot of
-email, but still, it should at least try.</p>
-<p>It turns out I had never really figured out the <code>-print0</code> and
-<code>-0</code> idioms that a lot of the shell-command stalwarts now have.
-Thanks to Malcolm Tredinnick for raising my consciousness.</p>
-<p>This lives in <code>$HOME/bin</code> under the name
-<code>mailgrep</code>:</p>
-<pre><code>#!/bin/sh
-find $HOME/Library/Mail/IMAP* -name '*.emlx' -print0 | \
- xargs -0 fgrep -i $@</code></pre>
-<p>Isn’t <code>xargs</code> a funny command? I’ve discovered that it’s nearly
-impossible to describe what does, and then why what it does is necessary, but
-there are just a whole bunch of places where you’d be lost without it.</p>
-<p>This lives in <code>$HOME/bin/mailview</code>:</p>
-<pre><code>#!/bin/sh
-find $HOME/Library/Mail/IMAP* -name '*.emlx' -print0 | \
- xargs -0 fgrep -i -l -Z $@ | \
- xargs -0 open</code></pre>
-<p>The first cut of this dodged <code>xargs</code> and used an
-incredibly-inefficient and slow chain of <code>-exec</code> arguments to open
-the files one at a time with
-<code>view</code> (aka <code>vim</code>), to work around
-a well-known <code>vim</code> misfeature; it complained about the input
-not being a terminal and left my Terminal.app keystrokes borked.</p>
-<p>But Malcolm, confirming my belief in the broken-ness of <code>vim</code>,
-said “Oh, *that* ‘view’. I thought it was some sexy Mac ‘view my email’ app”.
-D’oh, of course; the magic OS X <code>open</code> command does just the right
-thing.
-Erm, you might want to run <code>mailgrep</code> before you run
-<code>mailview</code>; I’m not sure what would happen if you asked OS X to
-open three or four thousand email messages at once.</p>
-</div></content></entry>
-
-<entry xml:base='When/200x/2006/04/21/'>
- <title>FSS: Pink Flowers</title>
- <link href='Dracon-Help' />
- <id>http://www.tbray.org/ongoing/When/200x/2006/04/21/Dracon-Help</id>
- <published>2006-04-21T13:00:00-08:00</published>
- <updated>2006-04-21T17:19:27-08:00</updated>
- <category scheme='http://www.tbray.org/ongoing/What/' term='Arts/Photos' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Arts' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Photos' />
- <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>Friday Slide Scan #28 is two Eighties florals, one interior, one exterior. With a confession.</div></summary>
-<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
-<p>Friday Slide Scan #28 is two Eighties florals, one interior, one
-exterior. With a confession.</p>
-<p>First some spring flowers fallen from a tree, just as now in our front
-yard, at dusk.</p>
-<img src="0506.png" alt="Fallen pink treeflowers on grass at dusk" />
-<p>I’m not sure what these are, but look at the light in the center. Rewards
-enlarging.</p>
-<img src="0713.png" alt="Flowers in shadow with light in background" />
-<p>Here’s the confession. Sometimes on Fridays when I’m feeling kinda
-burned-out, I knock off work and do these slide scans in the office, because
-this is where I have the
-<a href="http://www.tbray.org/ongoing/When/200x/2004/04/14/MineIsBigger">big
-screen</a>.
-Blowing these pictures up to mega-huge, picking away at the old-slide crud and
-scanning artifacts, tinkering with the colour balance, and listening; I never
-play music while I’m writing or coding seriously, but I play it real loud while
-photo-editing. It’s all pretty well pure pleasure; you just can’t imagine
-how good that second one above looks at near-native size.
-It reconstitutes the part of my mind that I earn my living with; that’s my
-story and I’m sticking to it.</p>
-<p>Images in the Friday Slide Scans are from 35mm slides taken between 1953
-and 2003 by (in rough chronological order)
-<a href="http://www.textuality.com/BillBray/">Bill Bray</a>,
-<a href="/ongoing/When/200x/2004/08/11/MomsGarden">Jean Bray</a>, Tim Bray, Cath
-Bray, and
-<a href="http://www.laurenwood.org/anyway/">Lauren Wood</a>; when I know
-exactly who took one, I’ll say; in this case, at least one is by Cath Bray.
-Most but not all of the slides were on Kodachrome; they were digitized using
-a Nikon CoolScan 4000 ED scanner and cleaned up by a combination of the Nikon
-scanning software and PhotoShop Elements.</p>
-</div></content></entry>
-
-<entry xml:base='When/200x/2006/04/20/'>
- <title>Spring Pix</title>
- <link href='Spring-Pix' />
- <id>http://www.tbray.org/ongoing/When/200x/2006/04/20/Spring-Pix</id>
- <published>2006-04-20T13:00:00-08:00</published>
- <updated>2006-04-20T23:07:10-08:00</updated>
- <category scheme='http://www.tbray.org/ongoing/What/' term='The World/Places/Vancouver' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='The World' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Places' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Vancouver' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Arts/Photos' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Arts' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Photos' />
- <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>Three pictures around Vancouver; one of a fresh green springtime tree, two of rotten old buildings being torn down.</div></summary>
-<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
-<p>Three pictures around Vancouver; one of a fresh green springtime tree, two
-of rotten old buildings being torn down.</p>
-<p>There’s nothing quite as fresh as just-sprouted deciduous leaves;
-another few weeks and this tree will be just a tree.</p>
-<img src="IMG_4656.png" alt="Sunlit fresh young leaves" />
-<p>I have a thing about demolition.
-The first is a rotten dingy old one-story on Main Street near 23rd, the second
-is an unlovely grey mid-rise being torn down to build still more condos at
-Homer and Helmcken.</p>
-<img src="IMG_4665.png" alt="Demolition site on Main Street, Vancouver" />
-<img src="IMG_4671.png" alt="Demolition site at Homer and Helmcken, Vancouver" />
-</div></content></entry>
-
-<entry xml:base='When/200x/2006/04/20/'>
- <title>Totten&#x2019;s Trip</title>
- <link href='Totten-on-Iraq' />
- <id>http://www.tbray.org/ongoing/When/200x/2006/04/20/Totten-on-Iraq</id>
- <published>2006-04-20T13:00:00-08:00</published>
- <updated>2006-04-20T21:05:22-08:00</updated>
- <category scheme='http://www.tbray.org/ongoing/What/' term='The World/Places/Middle East' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='The World' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Places' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Middle East' />
-<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
-<p><a href="http://www.michaeltotten.com/">Michael J. Totten</a> is a
-journalist and blogger who’s back and forth to the
-Middle East and writes about it, quite well in my opinion; he supports this by
-freelancing and with his blog’s tip jar. He gets lots of
-link love from the right-wing blogosphere, which is puzzling because Totten is
-balanced and clear-eyed and doesn’t seem to have any particular axe to grind.
-Recently, he and a friend were
-<a href="http://www.michaeltotten.com/archives/001117.html">having fun in
-Istanbul</a> and, on a random drive out into the country, decided on impulse to
-keep going, all the way across Turkey and into Iraq; into the Kurdish
-mini-state in Iraq’s north, to
-be precise. It makes a heck of a story, with lots of pictures, in six parts:
-<a href="http://www.michaeltotten.com/archives/001119.html">I</a>,
-<a href="http://www.michaeltotten.com/archives/001120.html">II</a>,
-<a href="http://www.michaeltotten.com/archives/001121.html">III</a>,
-<a href="http://www.michaeltotten.com/archives/001124.html">IV</a>,
-<a href="http://www.michaeltotten.com/archives/001126.html">V</a>, and
-<a href="http://www.michaeltotten.com/archives/001127.html">VI</a>.
-</p>
-</div></content></entry>
-
-<entry xml:base='When/200x/2006/04/19/'>
- <title>The Cost of AJAX</title>
- <link href='The-Cost-of-AJAX' />
- <id>http://www.tbray.org/ongoing/When/200x/2006/04/19/The-Cost-of-AJAX</id>
- <published>2006-04-19T13:00:00-08:00</published>
- <updated>2006-04-20T00:37:46-08:00</updated>
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology/Web' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Technology' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Web' />
-<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
-<p>James Governor
-<a href="http://www.redmonk.com/jgovernor/archives/001526.html">relays a
-question</a> that sounds important
-but I think is actively dangerous: do AJAX apps present more of
-a server-side load? The question is dangerous because it’s meaningless and
-unanswerable. Your typical Web page will, in the process of
-loading, call back to the server for a bunch of stylesheets and graphics and
-scripts and so on: for example, this <span class='o'>ongoing</span> page calls
-out to three different graphics, one stylesheet, and one JavaScript file.
-It also has one “AJAXy” XMLHttpRequest call.
-From the server’s point of view, those are all just requests to dereference
-one URI or another. In the case
-of <span class='o'>ongoing</span>, the AJAX request is for a static file less
-than 200 bytes in size (i.e. cheap).
-On the other hand, it could have been for something that required a
-complex outer join on two ten-million-row tables (i.e. <em>very</em>
-expensive). And one of the virtues of
-the Web Architecture is that it hides those differences, the “U” in URI stands
-for “Uniform”, it’s a Uniform interface to a resource on the Web that could
-be, well, anything.
-So saying “AJAX is expensive” (or that it’s cheap) is like saying “A mountain
-bike is slower than a battle tank” (or that it’s faster).
-The truth depends on what you’re doing with it.
-In the case of web sites, it depends on how many fetches you do and
-where you have to go to get the data to satisfy them.
-<span class='o'>ongoing</span> is a pretty quick web site, even though it runs
-on a fairly modest server, but
-that has nothing to do with AJAX-or-not; it’s because of the particular way
-I’ve set up the Web resources that make the pages here.
-I’ve
-<a href="/ongoing/When/200x/2006/02/14/AJAX-Performance">argued elsewhere</a>
-that AJAX can be a performance win, system-wide; but that argument too is
-contingent on context, lots of context.</p>
-</div></content></entry>
-
-<entry xml:base='When/200x/2006/04/18/'>
- <title>Hao Wu and Graham McMynn</title>
- <link href='Hao-Wu' />
- <id>http://www.tbray.org/ongoing/When/200x/2006/04/18/Hao-Wu</id>
- <published>2006-04-18T13:00:00-08:00</published>
- <updated>2006-04-18T22:00:40-08:00</updated>
- <category scheme='http://www.tbray.org/ongoing/What/' term='The World/Places/China' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='The World' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Places' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='China' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='The World/Politics' />
- <category scheme='http://www.tbray.org/ongoing/What/' term='Politics' />
-<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>
-<p>Graham McMynn is a teenager who was kidnapped in Vancouver on April 4th and
-freed, in a large, noisy, and
-<a href="http://www.cbc.ca/story/news/national/2006/04/12/bcabduction060412.html">newsworthy</a>
-police operation, on April 12th.
-<a href="http://en.wikipedia.org/wiki/Hao_Wu">Hao Wu</a> is a Chinese
-film-maker and
-<a href="http://beijingorbust.blogspot.com/">blogger</a> who was kidnapped in
-Beijing on February 22nd in a
-small, quiet police operation not intended to be newsworthy, and who has not
-been freed.
-Read about it
-<a href="http://spaces.msn.com/wuhaofamily/">here</a>,
-<a href="http://ethanzuckerman.com/haowu/">here</a>, and
-<a href="http://rconversation.blogs.com/rconversation/freehaowu/index.html">here</a>.
-Making noise about it <em>might</em> influence the government of China to
-moderate its actions against Mr. Wu, and can’t do any harm.
-Mr. McMynn’s kidnappers were a gaggle of small-time hoodlums, one of whom was
-out on bail while awaiting trial for another kidnapping (!).
-Mr. Wu’s were police.
-In a civilized country, the function of the police force is to deter such
-people and arrest them. A nation where they are the same people? Nobody
-could call it “civilized”.</p>
-</div></content></entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_title_xhtml.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_title_xhtml.xml
deleted file mode 100644
index 0b4d21b969..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_title_xhtml.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom title works
-Expect: feed.title.plainText() == 'test title'
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
- <title type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml"><b>test</b> title</div>
- </title>
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_title_xhtml_entities.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_title_xhtml_entities.xml
deleted file mode 100644
index aaf982acfa..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_title_xhtml_entities.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom summary with entities works
-Expect: feed.subtitle.text == '&quot;test&quot; &amp; &apos;title&apos; &amp; &lt;ok&gt;'
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
-<subtitle type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- "test&quot; &amp; &apos;title' &amp; &lt;ok>
- </div>
-</subtitle>
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_updated.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_updated.xml
deleted file mode 100644
index f425674f2b..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_updated.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: raw atom updated works
-Expect: feed.fields.getProperty('atom:updated') == '2003-12-13T18:30:02Z'
-
--->
-
-<feed xmlns="http://www.w3.org/2005/Atom">
-
- <title>Example Feed</title>
- <link href="http://example.org/"/>
- <updated>2003-12-13T18:30:02Z</updated>
- <author>
- <name>John Doe</name>
- </author>
- <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
-
- <entry>
- <title>Atom-Powered Robots Run Amok</title>
- <link href="http://example.org/2003/12/13/atom03"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
- <updated>2003-12-13T18:30:02Z</updated>
- <summary>Some text.</summary>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_updated_invalid.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_updated_invalid.xml
deleted file mode 100644
index 560d756b97..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_updated_invalid.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: non-date atom updated should produce null feed.updated
-Expect: feed.updated == null
-
--->
-
-<feed xmlns="http://www.w3.org/2005/Atom">
-
- <title>Example Feed</title>
- <link href="http://example.org/"/>
- <updated>2003I'mNotADate</updated>
- <author>
- <name>John Doe</name>
- </author>
- <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
-
- <entry>
- <title>Atom-Powered Robots Run Amok</title>
- <link href="http://example.org/2003/12/13/atom03"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
- <updated>2003-12-13T18:30:02Z</updated>
- <summary>Some text.</summary>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_updated_normalized.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_updated_normalized.xml
deleted file mode 100644
index 71fa1d03d5..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_updated_normalized.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom updated works
-Expect: feed.updated == 'Sat, 13 Dec 2003 18:30:02 GMT'
-
--->
-
-<feed xmlns="http://www.w3.org/2005/Atom">
-
- <title>Example Feed</title>
- <link href="http://example.org/"/>
- <updated>2003-12-13T18:30:02Z</updated>
- <author>
- <name>John Doe</name>
- </author>
- <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
-
- <entry>
- <title>Atom-Powered Robots Run Amok</title>
- <link href="http://example.org/2003/12/13/atom03"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
- <updated>2003-12-13T18:30:02Z</updated>
- <summary>Some text.</summary>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_version.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_version.xml
deleted file mode 100644
index a703f506f5..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_version.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 Version works
-Expect: result.version == 'atom'
--->
-<feed xmlns="http://www.w3.org/2005/Atom">
-
-</feed> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rfc4287/feed_xmlBase.xml b/toolkit/components/feeds/test/xml/rfc4287/feed_xmlBase.xml
deleted file mode 100644
index d5760e333e..0000000000
--- a/toolkit/components/feeds/test/xml/rfc4287/feed_xmlBase.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: atom feed with xml:base
-Expect: feed.link.spec == "http://www.example.com/foo/bar/baz";
-
--->
-<feed xmlns="http://www.w3.org/2005/Atom"
- xml:base="http://www.example.com/foo/bar/">
-
- <id>tag:example.com,2006:/atom/conformance/linktest/</id>
- <title>Atom Link Tests</title>
- <updated>2005-06-18T16:13:00Z</updated>
- <link href="baz" />
-
- <entry xml:base="http://www.example.org">
- <id>tag:example.org,2006:/linkreltest/1</id>
- <title>Does your reader support xml:base properly? </title>
- <updated>2006-06-23T12:12:12Z</updated>
- <link xml:base="/bar/" href="foo"/>
- </entry>
-
-</feed>
diff --git a/toolkit/components/feeds/test/xml/rss09x/rss090.xml b/toolkit/components/feeds/test/xml/rss09x/rss090.xml
deleted file mode 100644
index 783c018f4a..0000000000
--- a/toolkit/components/feeds/test/xml/rss09x/rss090.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
-Description: RSS 0.90 works
-Expect: feed.title.plainText() == "Mozilla Dot Org" && result.version == "rss090"
-
--->
-<!-- The very first RSS file, circa 1999 -->
-<rdf:RDF
-xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-xmlns="http://my.netscape.com/rdf/simple/0.9/">
-
- <channel>
- <title>Mozilla Dot Org</title>
- <link>http://www.mozilla.org</link>
- <description>the Mozilla Organization web site</description>
- </channel>
-
- <image>
- <title>Mozilla</title>
- <url>http://www.mozilla.org/images/moz.gif</url>
- <link>http://www.mozilla.org</link>
- </image>
-
- <item>
- <title>New Status Updates</title>
- <link>http://www.mozilla.org/status/</link>
- </item>
-
- <item>
- <title>Bugzilla Reorganized</title>
- <link>http://www.mozilla.org/bugs/</link>
- </item>
-
- <item>
- <title>Mozilla Party, 2.0!</title>
- <link>http://www.mozilla.org/party/1999/</link>
- </item>
-
- <item>
- <title>Unix Platform Parity</title>
- <link>http://www.mozilla.org/build/unix.html</link>
- </item>
-
- <item>
- <title>NPL 1.0M published</title>
- <link>http://www.mozilla.org/NPL/NPL-1.0M.html</link>
- </item>
-
-</rdf:RDF> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss09x/rss091.xml b/toolkit/components/feeds/test/xml/rss09x/rss091.xml
deleted file mode 100644
index 6749fc49e3..0000000000
--- a/toolkit/components/feeds/test/xml/rss09x/rss091.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE rss SYSTEM "http://my.netscape.com/publish/formats/rss-0.91.dtd">
-<!--
-
-Description: RSS 0.91 works
-Expect: feed.title.plainText() == "Scripting News" && result.version == "rss091"
-
--->
-<rss version="0.91">
- <channel>
- <language>en</language>
- <description>
- News and commentary from the cross-platform scripting community.
- </description>
- <link>http://www.scripting.com/</link>
- <title>Scripting News</title>
- <image>
- <link>http://www.scripting.com/</link>
- <title>Scripting News</title>
- <url>http://www.scripting.com/gifs/tinyScriptingNews.gif</url>
- </image>
- <item>
- <title>stuff</title>
- <link>http://bar.example.com</link>
- <description>This is an article about some stuff</description>
- </item>
- </channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss09x/rss091_withNS.xml b/toolkit/components/feeds/test/xml/rss09x/rss091_withNS.xml
deleted file mode 100644
index 9ab2c3bf71..0000000000
--- a/toolkit/components/feeds/test/xml/rss09x/rss091_withNS.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE rss SYSTEM "http://my.netscape.com/publish/formats/rss-0.91.dtd">
-<!--
-
-Description: RSS 0.91 works
-Expect: feed.title.plainText() == "Scripting News" && result.version == "rss091"
-
--->
-<rss version="0.91" xmlns="http://backend.userland.com/RsS2">
- <channel>
- <language>en</language>
- <description>
- News and commentary from the cross-platform scripting community.
- </description>
- <link>http://www.scripting.com/</link>
- <title>Scripting News</title>
- <image>
- <link>http://www.scripting.com/</link>
- <title>Scripting News</title>
- <url>http://www.scripting.com/gifs/tinyScriptingNews.gif</url>
- </image>
- <item>
- <title>stuff</title>
- <link>http://bar.example.com</link>
- <description>This is an article about some stuff</description>
- </item>
- </channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss09x/rss092.xml b/toolkit/components/feeds/test/xml/rss09x/rss092.xml
deleted file mode 100644
index ed68bd64f8..0000000000
--- a/toolkit/components/feeds/test/xml/rss09x/rss092.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
-Description: RSS 0.92 works
-Expect: feed.title.plainText() == "Scripting News" && result.version == "rss092"
-
--->
-<rss version="0.92">
- <channel>
- <language>en</language>
- <description>
- News and commentary from the cross-platform scripting community.
- </description>
- <link>http://www.scripting.com/</link>
- <title>Scripting News</title>
- <image>
- <link>http://www.scripting.com/</link>
- <title>Scripting News</title>
- <url>http://www.scripting.com/gifs/tinyScriptingNews.gif</url>
- </image>
- <item>
- <title>stuff</title>
- <link>http://bar.example.com</link>
- <description>This is an article about some stuff</description>
- </item>
- </channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss09x/rss093.xml b/toolkit/components/feeds/test/xml/rss09x/rss093.xml
deleted file mode 100644
index f1bb81ddf9..0000000000
--- a/toolkit/components/feeds/test/xml/rss09x/rss093.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
-Description: RSS 0.93 works
-Expect: feed.title.plainText() == "Scripting News" && result.version == "rss093"
-
--->
-<rss version="0.93">
- <channel>
- <language>en</language>
- <description>
- News and commentary from the cross-platform scripting community.
- </description>
- <link>http://www.scripting.com/</link>
- <title>Scripting News</title>
- <image>
- <link>http://www.scripting.com/</link>
- <title>Scripting News</title>
- <url>http://www.scripting.com/gifs/tinyScriptingNews.gif</url>
- </image>
- <item>
- <title>stuff</title>
- <link>http://bar.example.com</link>
- <description>This is an article about some stuff</description>
- </item>
- </channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss09x/rss094.xml b/toolkit/components/feeds/test/xml/rss09x/rss094.xml
deleted file mode 100644
index 1c2b17a24d..0000000000
--- a/toolkit/components/feeds/test/xml/rss09x/rss094.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
-Description: RSS 0.94 works
-Expect: feed.title.plainText() == "Scripting News" && result.version == "rss094"
-
--->
-<rss version="0.94">
- <channel>
- <language>en</language>
- <description>
- News and commentary from the cross-platform scripting community.
- </description>
- <link>http://www.scripting.com/</link>
- <title>Scripting News</title>
- <image>
- <link>http://www.scripting.com/</link>
- <title>Scripting News</title>
- <url>http://www.scripting.com/gifs/tinyScriptingNews.gif</url>
- </image>
- <item>
- <title>stuff</title>
- <link>http://bar.example.com</link>
- <description>This is an article about some stuff</description>
- </item>
- </channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss09x/rssUnknown.xml b/toolkit/components/feeds/test/xml/rss09x/rssUnknown.xml
deleted file mode 100644
index 653b574d0c..0000000000
--- a/toolkit/components/feeds/test/xml/rss09x/rssUnknown.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
-Description: RSS unknown version works
-Expect: feed.title.plainText() == "Scripting News" && result.version == "rssUnknown"
-
--->
-<rss version="0.95">
- <channel>
- <language>en</language>
- <description>
- News and commentary from the cross-platform scripting community.
- </description>
- <link>http://www.scripting.com/</link>
- <title>Scripting News</title>
- <image>
- <link>http://www.scripting.com/</link>
- <title>Scripting News</title>
- <url>http://www.scripting.com/gifs/tinyScriptingNews.gif</url>
- </image>
- <item>
- <title>stuff</title>
- <link>http://bar.example.com</link>
- <description>This is an article about some stuff</description>
- </item>
- </channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss1/feed_bogus_title.xml b/toolkit/components/feeds/test/xml/rss1/feed_bogus_title.xml
deleted file mode 100644
index a28952495b..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/feed_bogus_title.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed w/ bogus title element
-Expect: feed.title.text == 'Correct Title'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'>
-
-
-
- <title>Bogus</title>
-
-
-
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Correct Title</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- </channel>
-
-
-
- <title>Bogus</title>
-
-
-
- <item>
- <title>XML: A Disruptive Technology</title>
- <link>http://c.moreover.com/click/here.pl?r123</link>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet.
- </dc:description>
- </item>
- <item>
- <dc:publisher>The O'Reilly Network</dc:publisher>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet 2.
- </dc:description>
- <title>XML: A Disruptive Technology</title>
- </item>
-</rdf:RDF>
diff --git a/toolkit/components/feeds/test/xml/rss1/feed_description.xml b/toolkit/components/feeds/test/xml/rss1/feed_description.xml
deleted file mode 100644
index 109b8f9492..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/feed_description.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed description works
-Expect: feed.fields.getProperty('rss1:description') == 'a description'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
->
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <description>a description</description>
- </channel>
-</rdf:RDF> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss1/feed_description_normalized.xml b/toolkit/components/feeds/test/xml/rss1/feed_description_normalized.xml
deleted file mode 100644
index 44154b9f17..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/feed_description_normalized.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed description works normalized
-Expect: feed.subtitle.text == 'a description'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
->
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <description>a description</description>
- </channel>
-</rdf:RDF>
diff --git a/toolkit/components/feeds/test/xml/rss1/feed_description_with_dc.xml b/toolkit/components/feeds/test/xml/rss1/feed_description_with_dc.xml
deleted file mode 100644
index 4e5b1637a3..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/feed_description_with_dc.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed description works normalized
-Expect: feed.subtitle.text == 'a description'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'
->
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- <description>a description</description>
- </channel>
-</rdf:RDF>
diff --git a/toolkit/components/feeds/test/xml/rss1/feed_description_with_dc_only.xml b/toolkit/components/feeds/test/xml/rss1/feed_description_with_dc_only.xml
deleted file mode 100644
index fa1ecd59ad..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/feed_description_with_dc_only.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed description works normalized
-Expect: feed.subtitle.plainText() == 'another description'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'>
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- </channel>
-</rdf:RDF>
diff --git a/toolkit/components/feeds/test/xml/rss1/feed_generator.xml b/toolkit/components/feeds/test/xml/rss1/feed_generator.xml
deleted file mode 100644
index 07ec853218..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/feed_generator.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-
-Description: RSS1 generator
-Expect: feed.generator.agent == "http://Orchard.SourceForge.net/1.2/"
-
--->
-
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:admin="http://webns.net/mvcb/"
- xmlns="http://purl.org/rss/1.0/">
-
- <channel rdf:about="http://meerkat.oreillynet.com/?_fl=rss1.0">
- <title>Meerkat</title>
- <link>http://meerkat.oreillynet.com</link>
- <description>Meerkat: An Open Wire Service</description>
- <admin:errorReportsTo rdf:resource="mailto:channel-owner@acme.orgs"/>
- <admin:generatorAgent rdf:resource="http://Orchard.SourceForge.net/1.2/"/>
-
- <image rdf:resource="http://meerkat.oreillynet.com/icons/meerkat-powered.jpg" />
-
- <items>
- <rdf:Seq>
- <rdf:li rdf:resource="http://c.moreover.com/click/here.pl?r123" />
- </rdf:Seq>
- </items>
-
- <textinput rdf:resource="http://meerkat.oreillynet.com/" />
-
- </channel>
-
-</rdf:RDF> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss1/feed_id.xml b/toolkit/components/feeds/test/xml/rss1/feed_id.xml
deleted file mode 100644
index 8f118102a8..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/feed_id.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed w/ feed rdf:about
-Expect: feed.id == 'http://www.xml.com/xml/news.rss'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'>
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- </channel>
- <item rdf:about="http://example.com/hmm">
- <title>XML: A Disruptive Technology</title>
- <link>http://c.moreover.com/click/here.pl?r123</link>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical
- infrastructure of the Internet.
- </dc:description>
- </item>
-</rdf:RDF>
diff --git a/toolkit/components/feeds/test/xml/rss1/feed_image.xml b/toolkit/components/feeds/test/xml/rss1/feed_image.xml
deleted file mode 100644
index c293acc3ff..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/feed_image.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed w/ image
-Expect: ((feed.image.getProperty('rss1:link') == 'http://www.xml.com') && (feed.image.getProperty('rss1:url') == 'http://xml.com/universal/images/xml_tiny.gif'))
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'>
-
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- <textInput rdf:resource="http://www.google.com"/>
- </channel>
-
- <image rdf:about="http://xml.com/universal/images/xml_tiny.gif">
- <title>XML.com</title>
- <link>http://www.xml.com</link>
- <url>http://xml.com/universal/images/xml_tiny.gif</url>
- </image>
-
- <item>
- <title>XML: A Disruptive Technology</title>
- <link>http://c.moreover.com/click/here.pl?r123</link>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical
- infrastructure of the Internet.
- </dc:description>
- <dc:publisher>The O'Reilly Network</dc:publisher>
- <dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
- <dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
- <dc:subject>XML</dc:subject>
- </item>
-
-</rdf:RDF> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss1/feed_items_length_zero.xml b/toolkit/components/feeds/test/xml/rss1/feed_items_length_zero.xml
deleted file mode 100644
index a935b9ad9f..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/feed_items_length_zero.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed w/ zero items count
-Expect: feed.items.length == 0
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'>
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- </channel>
-</rdf:RDF> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss1/feed_link.xml b/toolkit/components/feeds/test/xml/rss1/feed_link.xml
deleted file mode 100644
index f304a63e82..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/feed_link.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed title works normalized
-Expect: feed.fields.getProperty('rss1:link') == 'http://xml.com/pub'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
->
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- </channel>
-</rdf:RDF> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss1/feed_link_normalized.xml b/toolkit/components/feeds/test/xml/rss1/feed_link_normalized.xml
deleted file mode 100644
index ba9674746f..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/feed_link_normalized.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed link works normalized
-Expect: feed.link.spec == 'http://xml.com/pub'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
->
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- </channel>
-</rdf:RDF> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss1/feed_textInput.xml b/toolkit/components/feeds/test/xml/rss1/feed_textInput.xml
deleted file mode 100644
index ea56394778..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/feed_textInput.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed w/ textinput
-Expect: feed.textInput.getProperty('rdf:about') == 'http://search.xml.com'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'>
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- </channel>
-
- <textinput rdf:about="http://search.xml.com">
- <title>Search XML.com</title>
- <description>Search XML.com's XML collection</description>
- <name>s</name>
- <link>http://search.xml.com</link>
- </textinput>
-
- <item>
- <title>XML: A Disruptive Technology</title>
- <link>http://c.moreover.com/click/here.pl?r123</link>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical
- infrastructure of the Internet.
- </dc:description>
- <dc:publisher>The O'Reilly Network</dc:publisher>
- <dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
- <dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
- <dc:subject>XML</dc:subject>
- </item>
- <item>
-
- </item>
-</rdf:RDF> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss1/feed_title.xml b/toolkit/components/feeds/test/xml/rss1/feed_title.xml
deleted file mode 100644
index 121545d380..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/feed_title.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed title works
-Expect: feed.fields.getProperty('rss1:title') == 'Test'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
->
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- </channel>
-</rdf:RDF> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss1/feed_title_extra_att.xml b/toolkit/components/feeds/test/xml/rss1/feed_title_extra_att.xml
deleted file mode 100644
index b24550696f..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/feed_title_extra_att.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed title works
-Expect: feed.fields.getProperty('rss1:title') == 'Test'
-
--->
-<rdf:RDF
- xmlns:foo="http://example.org"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
->
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title foo:bar="baz">Test</title>
- </channel>
-</rdf:RDF> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss1/feed_title_normalized.xml b/toolkit/components/feeds/test/xml/rss1/feed_title_normalized.xml
deleted file mode 100644
index 5bd6ccefd0..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/feed_title_normalized.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed title works normalized
-Expect: feed.title.plainText() == 'Test'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
->
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- </channel>
-</rdf:RDF>
diff --git a/toolkit/components/feeds/test/xml/rss1/feed_updated.xml b/toolkit/components/feeds/test/xml/rss1/feed_updated.xml
deleted file mode 100644
index 4aed87e983..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/feed_updated.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed updated
-Expect: feed.updated == 'Sat, 07 Sep 2002 00:00:01 GMT'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'>
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- <dc:date>Sat, 07 Sep 2002 00:00:01 GMT</dc:date>
- </channel>
- <item rdf:about="http://example.com/hmm">
- <title>XML: A Disruptive Technology</title>
- <link>http://c.moreover.com/click/here.pl?r123</link>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical
- infrastructure of the Internet.
- </dc:description>
- </item>
-</rdf:RDF>
diff --git a/toolkit/components/feeds/test/xml/rss1/feed_updated_dctermsmodified.xml b/toolkit/components/feeds/test/xml/rss1/feed_updated_dctermsmodified.xml
deleted file mode 100644
index 24b9fc92cc..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/feed_updated_dctermsmodified.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed updated
-Expect: feed.updated == 'Sat, 07 Sep 2002 00:00:01 GMT'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'
- xmlns:dcterms='http://purl.org/dc/terms/'>
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- <dcterms:modified>Sat, 07 Sep 2002 00:00:01 GMT</dcterms:modified>
- </channel>
- <item rdf:about="http://example.com/hmm">
- <title>XML: A Disruptive Technology</title>
- <link>http://c.moreover.com/click/here.pl?r123</link>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical
- infrastructure of the Internet.
- </dc:description>
- </item>
-</rdf:RDF>
diff --git a/toolkit/components/feeds/test/xml/rss1/feed_version.xml b/toolkit/components/feeds/test/xml/rss1/feed_version.xml
deleted file mode 100644
index 8147a970cd..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/feed_version.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 Version works
-Expect: result.version == 'rss1'
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
->
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- </channel>
-</rdf:RDF> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss1/full_feed.xml b/toolkit/components/feeds/test/xml/rss1/full_feed.xml
deleted file mode 100644
index 7dae34c857..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/full_feed.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<!--
-
-Description: atom generator works
-Expect: result.bozo == true && feed.items.length == 1
-
--->
-<rdf:RDF
-xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-xmlns:dc="http://purl.org/dc/elements/1.1/"
-xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
-xmlns:admin="http://webns.net/mvcb/"
-xmlns:cc="http://web.resource.org/cc/"
-xmlns="http://purl.org/rss/1.0/">
-
-<channel rdf:about="http://example.org/">
-<title>fooo</title>
-<link>http://weblogs.example.org/</link>
-<description>fooooooo</description>
-<dc:language>en-us</dc:language>
-<dc:creator></dc:creator>
-<dc:date>2006-04-10T08:38:18-08:00</dc:date>
-<admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=3.2" />
-
-
-<items>
-<rdf:Seq>
-<rdf:li rdf:resource="http://weblogs.example.org/archives/009698.html" />
-</rdf:Seq>
-
-</items>
-
-</channel>
-<item rdf:about="http://weblogs.example.org/archives/009698.html">
-<title>Come From?</title>
-<link>http://example.org/009698.html</link>
-<description><![CDATA[
- %G–%@ much of the code
-]]></description>
-<dc:date>2006-02-06T10:19:03-08:00</dc:date>
-</item>
-</rdf:RDF>
diff --git a/toolkit/components/feeds/test/xml/rss1/full_feed_not_bozo.xml b/toolkit/components/feeds/test/xml/rss1/full_feed_not_bozo.xml
deleted file mode 100644
index 61ae8a2202..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/full_feed_not_bozo.xml
+++ /dev/null
@@ -1,354 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: Full RSS1 feed not bozo
-Expect: result.bozo == false
-
--->
-<rdf:RDF
-xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-xmlns:dc="http://purl.org/dc/elements/1.1/"
-xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
-xmlns:admin="http://webns.net/mvcb/"
-xmlns:cc="http://web.resource.org/cc/"
-xmlns="http://purl.org/rss/1.0/">
-
-<channel rdf:about="http://weblogs.mozillazine.org/ben/">
-<title>Inside Firefox</title>
-<link>http://weblogs.mozillazine.org/ben/</link>
-<description>The Inside Track on Firefox Development</description>
-<dc:language>en-us</dc:language>
-<dc:creator></dc:creator>
-<dc:date>2006-04-26T14:34:49-08:00</dc:date>
-<admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=3.2" />
-
-
-<items>
-<rdf:Seq><rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/010115.html" />
-<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/010109.html" />
-<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/010075.html" />
-<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/010074.html" />
-<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/010073.html" />
-<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/010040.html" />
-<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/010030.html" />
-<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/010011.html" />
-<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/009965.html" />
-<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/009964.html" />
-<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/009943.html" />
-<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/009924.html" />
-<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/009914.html" />
-<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/009804.html" />
-<rdf:li rdf:resource="http://weblogs.mozillazine.org/ben/archives/009774.html" />
-</rdf:Seq>
-</items>
-
-</channel>
-
-<item rdf:about="http://weblogs.mozillazine.org/ben/archives/010115.html">
-<title>Firefox 2 Is Cool</title>
-<link>http://weblogs.mozillazine.org/ben/archives/010115.html</link>
-<description><![CDATA[<p>A lot of people read my previous post and came to a very reasonable conclusion: "If you take Places out of Firefox 2, shouldn't it be called Firefox 1.6?"</p>
-
-<p>I don't agree that Places was the one and only thing that sold Firefox 2 though. I took a look through the <a href="http://wiki.mozilla.org/Firefox2/Requirements">Firefox 2 Requirements</a> page to look at some of the other stuff that's going on. Reading that document, I think I can see now why people are down in the dumps about no-places Firefox 2. I don't think that document necessarily does the best possible job of capturing the excitement I have about some of the Firefox 2 features we're pursuing. </p>
-
-<p>For the past week or so, I've been toting around a printout of another document, which I wrote because I wanted to convey some of the vision I have of the Firefox 2 product as a whole - a more holistic view as it were. </p>
-
-<h3>Safer, Faster, Better</h3>
-
-<p>If you take a look at the black buttons stacked in the right column of this page, you'll see that one of them reads "Safer, Faster, Better." I don't knowwho came up with that one but it's a good tag line. It has a certain cadence about it. People have attached lots of these to Firefox in the past - "Take Back the Web" was the one I came up with, there's "Rediscover the Web", the FirefoxFlicks project has yielded a few good ones too - I like "<a href="http://www.firefoxflicks.com/flick/index.php?sort=new&id=21122&c=false">Web For All</a>". But "Safer, Faster, Better" is not just a tag line, it can also map into a set of themes for product development. </p>
-
-<p>So, taking a look at the Requirements page, I attempted to do that. My document wasn't a comprehensive collection of everything on that page, I was focused more on the things immediately visible to most users. I guess my problem with the Requirements page has always been its very engineering/technical focus. The result of this is that the priority of items tend to reflect how difficult something is to implement, or where it lies in the development cycle, not necessarily the impact on the user. What I ended up with I guess is a sort of "Shadow PRD" that reflects what I personally thought was cool about Firefox 2, and what I wanted to get out of it. </p>
-
-<p>A copy of the document is <a href="http://www.bengoodger.com/software/mb/2.0/firefox2-vision.html">here</a>. <br />
-Some notes:</p>
-
-<ul>
- <li>Assume the scratched out section for "Retracing Your Steps" will be part
- of a future release.
- <li>The priorities shown are my opinion, and relate to potential impact on
- the user.
- <li>The document does not represent all of the work being done, just a
- readily marketable subset.
-</ul>
-
-<p>All in all, I think there's easily enough here to justify a "2" designation. That's just my opinion though. I also think whole numbers are probably easier for the general populace to understand than decimals. </p>
-
-<p>Firefox has never been about date driven development (within reason). The changes with Places should not be seen as a change in this sentiment. What we're about is high quality software development with real advantages to <br />
-users, and I think that with the updated plan we're still on a trajectory that supports and encourages that, perhaps more firmly now than before.</p>
-
-<p>And that's it from today's "Ben waits for the tinderboxen to clear" report. </p>]]></description>
-<dc:subject></dc:subject>
-<dc:creator>ben</dc:creator>
-<dc:date>2006-04-26T14:34:49-08:00</dc:date>
-</item>
-<item rdf:about="http://weblogs.mozillazine.org/ben/archives/010109.html">
-<title>Firefox 2 Content Update</title>
-<link>http://weblogs.mozillazine.org/ben/archives/010109.html</link>
-<description><![CDATA[<p>When we began work on Firefox 2, we decided to focus on a development branch, a continuation of the Mozilla 1.8 branch. The reason for doing this was that there was to be a lot of significant architectural changes going on on the trunk, with the prospect of a new rendering back end, a rearchitecture of reflow in layout, and various other things. Shipping a Firefox 2 release in 2006 off of this code did not seem possible. </p>
-
-<p>As a result, we decided to pursue a release focused on application level improvements, on a separate branch. Going into it, we knew the perils of multi-branch development. We knew the divergences that would inevitably form between branch and trunk. We had experience from the painful development of Firefox 1.0 on the Aviary branch. We resolved to be more methodical about our commits, but we knew to expect some pain. The goal was to produce a high value release in short enough time so that we could all return to the trunk and help build new features that utilize the back end being developed there, to help shake them out. </p>
-
-<p>Late last year, we put together a list of things to pursue for the Firefox 2 release. A month or so ago, we got together as a group and formalized this more in a <a href="http://wiki.mozilla.org/Firefox2/Requirements">Firefox 2 PRD</a>. We had scheduled four major pre-release milestones, two alphas and two betas. We have already shipped one alpha. The intent of the second is to be "Feature Complete".</p>
-
-<p>The people driving the various sub-projects on the Requirements list get together weekly to check status. As the weeks have gone by, it has become clear to us that the most complex feature on the plan is Places. It is easily an order of magnitude more complex than anything else on the plan. Places is a great feature and it has been exciting watching its capabilities grow. We are looking forward to the capabilities that it will expose. What we have learned though is that the work required to complete Places is probably too substantial to gate the Firefox 2 release. It falls more into the "significant rearchitecture" category of feature that's generally been targeted at Firefox 3.</p>
-
-<p>What we have decided to do is as follows:</p>
-
-<ul>
-<li>We will disable places on the 1.8 branch, reverting the user interface and back end to Firefox 1.x functionality.
-<li>We will continue to aggressively develop the capabilities of Places on the 1.9 trunk. Places will remain enabled here.
-</ul>
-
-<p>We think this is a good decision for two reasons:</p>
-
-<ul>
-<li>It reduces the pressure on the Places team to deliver a lot of bug fixes and additional features on the very immediate timeframe required by the Firefox 2 testing releases. It is my opinion that doing so would impact the quality of the feature, if we did not add at least a couple more alpha cycles to the process. This decision provides us with an opportunity to really make the architecture and user interface of Places reach their full potential.
-<li>It allows us as a group to circle around and consider the content of the Firefox 2 release holistically, identify high impact at risk areas and spend some more time on them. One of those for me was Feed Handling.
-</ul>
-
-<p>Michael Schroepfer of the Mozilla Corporation has a <a href="http://groups.google.com/group/mozilla.dev.planning/browse_frm/thread/4b8e7bafecccbc10/8997efd5d5d5f03f">newsgroup posting</a> with additional information. His thread is also the most appropriate forum for discussion of this topic. </p>
-
-<p>I have been working on refining some of the messaging surrounding feature content and prioritization on the PRD. I will post the initial results of that here soon.</p>]]></description>
-<dc:subject></dc:subject>
-<dc:creator>ben</dc:creator>
-<dc:date>2006-04-24T09:30:54-08:00</dc:date>
-</item>
-<item rdf:about="http://weblogs.mozillazine.org/ben/archives/010075.html">
-<title>Did I Mention...</title>
-<link>http://weblogs.mozillazine.org/ben/archives/010075.html</link>
-<description><![CDATA[<p>... that I hate this computer?</p>
-
-<p>While I'm at it... the up arrow key cap fell off after about three weeks, in early 2004. About six months later I lost the little rubber membrane thing that made it slightly easier to push the arrow. Since then, I've been typing by pushing down on the little connection thingy on the keyboard tray. </p>
-
-<p>It's been shedding pieces of plastic too. I've never dropped the computer once, but pieces of the shell have begun to snap off. </p>
-
-<p>When I first got it, when the secondary battery was in place, when the primary drained the machine would hibernate, even though the secondary was present! Pretty awful bug to ship with. There was never a solution that I could find. Speaking of batteries, the primary battery is pretty much toast... it won't go for more than 5 minutes before shutting down. It began doing this at around the 12-18 month mark. And the battery light permanently flashes orange whenever the system is on. </p>
-
-<p>Why don't I call the hotline? I guess I'll have to, before my warranty runs out. I don't because it usually involves 45 minutes on hold or explaining to someone who only has a script to read from that the issue involving a missing up arrow doesn't require restarting Windows or running some stupid diagnostic tool. I could have paid more for "premium support" at build-time but I found that concept sort of insulting: why should I have to pay extra to speak to someone who is smart and doesn't think I'm a moron?</p>
-
-<p>And I don't want a Thinkpad either. I hate those computers. They have old-fashioned 4:3 displays, and the function key and left Ctrl key are reversed. I know I could map them differently but why would I? Why couldn't IBM just have designed the product correctly in the first place? Oh, and I'd sooner drink paint than run the awful IBM access connections software to connect to a wireless network, or deal with the fact that the Num Lock key seems to reset to ON every time the system is rebooted.</p>
-
-<p>Why doesn't someone make the perfect laptop? I'd be interested to hear from someone how long the compile times are for FirefoxDebug on a 2.16GHz MacBook Pro...</p>]]></description>
-<dc:subject></dc:subject>
-<dc:creator>ben</dc:creator>
-<dc:date>2006-04-16T19:11:28-08:00</dc:date>
-</item>
-<item rdf:about="http://weblogs.mozillazine.org/ben/archives/010074.html">
-<title>I Hate This Computer</title>
-<link>http://weblogs.mozillazine.org/ben/archives/010074.html</link>
-<description><![CDATA[<p>I have been fighting with this computer for the past few days to do a build with a few patches applied. </p>
-
-<p>First, I managed to get a certain distance with a branch build, compiling with Visual C++ 6.0. But soon I realized there were too many dependencies that were trunk specific, so I had to build trunk. About a quarter of the way through my build died, of course, compiling from the same shell, wrong version of VC6.0 for Cairo/Thebes. </p>
-
-<p>Starting over again with the VC7 tools, another failure towards the end. Some sort of cyclic dependency check error. Clobber and restart. Now I forgot one of my patches had a configure change, and the process begins anew, I have effectively clobbered. </p>
-
-<p><a href="http://weblogs.mozillazine.org/ben/archives/2003_12.html">When I bought this machine</a>, a Dell Precision M60 with a Pentium M 1.7GHz processor, a 7200rpm disk and a gig of RAM, it could compile Firefox start to stop in 21 minutes. Now it takes over an hour.</p>
-
-<p>The situation is better on my Google-supplied workstation, but for how long? Over time, Windows reaches a point of being completely useless for anything aside from the most basic activities. What's the effect? I had planned to work both days this weekend on Firefox 2 features. Instead I spent the whole time fighting one of the most frustrating fights possible, and have achieved nothing. I hate Windows. I hate this computer.</p>]]></description>
-<dc:subject></dc:subject>
-<dc:creator>ben</dc:creator>
-<dc:date>2006-04-16T18:58:02-08:00</dc:date>
-</item>
-<item rdf:about="http://weblogs.mozillazine.org/ben/archives/010073.html">
-<title>Miscommunications</title>
-<link>http://weblogs.mozillazine.org/ben/archives/010073.html</link>
-<description><![CDATA[<p>My laptop was running pretty slowly yesterday so I decided to scan the Add/Remove Programs list to clear out the cruft. Things were really chugging along. I sequentially uninstalled several pieces of software, and the process was very dissatisfying. I became more and more enfuriated at my computer as it proceeded. Here are some of the nuisances:</p>
-
-<ul>
-<li>I could only remove one thing at a time.
-<li>Many pieces of software used the Windows Installer system which seemed to take forever and report very inconsistent progress (I know, Firefox isn't the best at this in its installer, either)
-<li>Most annoyingly, the uninstaller apps all reported themselves as performing a variety of actions that I never requested, as explanations for what they were doing during long periods of inactivity and progress-bar freeze. Common excuses were "Windows is Configuring <blah>" and "InstallShield is preparing a report on <bleh>".
-</ul>
-
-<p>You know, I never <strong>asked</strong> for blah to be "configured." I never asked for a report on bleh (What am I, a manager? Where is the report anyway? Does it have the appropriate cover sheet?) <strong>I just want the software gone</strong>. I'm getting really tired of excuses from software like this. Windows software seems to be getting worse and worse. On Mac, the typical way to remove a program is to drag it into the trash can. I can even do that to several programs at once! I do however have to be able to afford a Mac (I can, I have one). Many folk aren't as fortunate as I. </p>
-
-<p>As a side note, I read an interesting article in Forbes a few weeks ago criticizing Microsoft for its delays shipping Vista, and asking why wouldn't you just side-step all the trouble and buy a Mac, since the odds were good many people would have to upgrade their PC anyway just to get the whiz-bang in Vista. The article side-swiped open source desktop initiatives, asking where the viable free alternative was. I think that was an interesting point, and especially so since the capabilities of Linux systems have come an awesome distance in the past few years but there have been few distributions or desktop environments that IMO make the most of all of those.</p>]]></description>
-<dc:subject></dc:subject>
-<dc:creator>ben</dc:creator>
-<dc:date>2006-04-16T18:05:04-08:00</dc:date>
-</item>
-<item rdf:about="http://weblogs.mozillazine.org/ben/archives/010040.html">
-<title>Firefox Version Numbers</title>
-<link>http://weblogs.mozillazine.org/ben/archives/010040.html</link>
-<description><![CDATA[<p>Mike Beltzner <a href="http://www.beltzner.ca/mike/archives/2006/04/10/when_3_is_less_than_2.html">explains</a> Firefox version numbering. i.e. Firefox 3 RTM is not "out".</p>]]></description>
-<dc:subject></dc:subject>
-<dc:creator>ben</dc:creator>
-<dc:date>2006-04-10T08:38:18-08:00</dc:date>
-</item>
-<item rdf:about="http://weblogs.mozillazine.org/ben/archives/010030.html">
-<title>Our Next Challenge?</title>
-<link>http://weblogs.mozillazine.org/ben/archives/010030.html</link>
-<description><![CDATA[<p>The past year or so has been interesting. In this time, I've been able to meet a lot of new people and learn a lot of new things. Most importantly is that for the first time in as long as I can remember, I have had a chance to see the Mozilla project from the outside, as it would appear to someone who was trying to build on Mozilla technology or contribute directly to a project, but was not part of Netscape "back in the day" or an employee of the Mozilla Foundation/Corporation itself. </p>
-
-<p>It's been an illuminating experience. From a technical perspective, it helped highlight APIs that I had developed without a clear understanding of how they would be used. The Extension Installation API was one example of this, and we were able to make some great improvements to it in 2005.</p>
-
-<p>But perhaps more importantly it has shed some light on how people perceive Mozilla as an open source project. These perceptions are not the sort of things people express explicitly. You have to notice them.</p>
-
-<h3>The Difficulty of Involvement</h3>
-
-<p>This is sort of the uber-perception. I think some of the reasons for this include the following:</p>
-
-<h3>Where is the Discussion?</h3>
-
-<p>Which newsgroup/mailing list/IRC channel/wiki/talk page/bug/forum page do I need to track in order to know what's going on in a specific area? The answer is unsatisfactorily complex.</p>
-
-<p>The traditional method of joining a project in the OSS world (where you join lists and IRC channels and lurk for a while, gradually ramping up your contributions) scales uneasily to a project the size of Mozilla. The amount of data a mere mortal would have to absorb in order to be productive quickly is staggering. I have in the past jocularly referred to it as the "learning wall". I wonder how many people just give up. </p>
-
-<h3>Madness to Method?</h3>
-
-<p>As a large project, Mozilla has thousands of source files across hundreds of directories. One of my coworkers here at Google commented that he tried to find something as simple as the browser window code a couple of years ago and couldn't, because it lived under the thoughtfully named "xpfe". </p>
-
-<p>There's not a huge amount of documentation - and I'm not just talking about public API docs. I'm talking about the much needed diagrams that show how the various building blocks fit together, and in-code documentation for pretty much anything that isn't intuitive (which is a lot). I've written as little of this as anyone else.</p>
-
-<h3>Tone</h3>
-
-<p>In the past, I have not done the best I could to establish a tone for discourse that is conducive to productive development. My tendency was to snap when provoked. I made two mistakes of judgement here, one was ignoring the effect that this sort of thing would have on those watching, aside from the victim. The other was to think that regardless of the tone set by my actions, we as a group could work through any negative effects. Any work we relied on others for we could do ourselves. Or we could hire through it.</p>
-
-<h3>The Joy of Code</h3>
-
-<p>The flaw with this is that when your project's contributions come solely from companies, for better or for worse the activities of those paid contributors will align in some way with the interests of those companies. What this does not always allow for is the pursuit of the sort of improvements that are outside the scope of these interests. Such things often include raising general code quality, speculative feature development, feature polish and detail etc. I don't mean to say that companies are <em>against</em> these things, but they're often not the primary concern during a release crunch. And what companies like to have is shipping software. </p>
-
-<p>Alternately, even in the absence of corporate support, if there is not enough redundancy that the same set of folk has to do the grunt work over and over, the risk of burnout is high.</p>
-
-<p>I feel this because I have been incredibly "plan" focused over the past few years, formally during my time at Netscape and less formally but no less importantly during the run up to Firefox 1.0 and 1.5. What I notice is that I no longer have time to work on the sort of interesting side projects that I used to enjoy doing when I was first starting out. </p>
-
-<p>For example, about six years ago I discovered a bug in the Bookmarks menu shortly after scrolling was implemented. When you moused into a submenu for a folder that was in the scrolled section, the sub menu popup was pushed off the bottom of the screen. I took a couple of days to learn the menu positioning code and fix the math error that was causing the bug. The exercise was good for me in a number of ways: I learned more about another section of the code, my general expertise was raised, and well.. I fixed the bug that was bothering<br />
-me.</p>
-
-<p>I think we need to have a project that is accessible to volunteers for this reason. We also need to provide a way to allow those volunteers to grow if they want to, so that if you're one of the folk at the center you can have a chance to step aside for a moment and take a breather and code for the pure joy of it. </p>
-
-<p>Full time paid contributors will always be a part of Open Source development. But I don't think release-focused agendas will ever be a substitute for the passion of folk who participate because of the joy of exploration and of contribution. </p>
-
-<h3>Looking Outward, Looking Forward</h3>
-
-<p>As a project, we have made overtures towards being a more inclusive lot. For some of the reasons I've listed here, I think as a project we're still more inward looking than outward. How many of us have thought about what we want to be doing in 5 years? Will we always be doing this? Will our roles remain the same? My opinion is that it's fast becoming time for us to start considering making personal sacrifices in our short term conveniences to make the project more accessible to new people. Do I know what we need to do? Not exactly. But I have some ideas: find ways to make our discussions, our public faces, and our code more accessible.</p>
-
-<p>With Firefox we did an excellent job of building a world class product that people wanted to use. We have a new challenge now, one that is larger and scope and in the long run in my opinion considerably more important because the long term success of products like Firefox depend on it. How will we grow a world class development community? How will we ensure that the freedoms we enjoy are protected, forever?</p>]]></description>
-<dc:subject></dc:subject>
-<dc:creator>ben</dc:creator>
-<dc:date>2006-04-07T09:22:59-08:00</dc:date>
-</item>
-<item rdf:about="http://weblogs.mozillazine.org/ben/archives/010011.html">
-<title>Congrats Relicensing Project!</title>
-<link>http://weblogs.mozillazine.org/ben/archives/010011.html</link>
-<description><![CDATA[<p><a href="http://weblogs.mozillazine.org/gerv/archives/2006/03/relicensing_complete.html">Gerv announces</a> that the Relicensing project is complete. Congrats Gerv and everyone else who doggedly pursued this over the years. Part of Mozilla's mission is preserving choice, and making our code available under a variety of flexible licenses helps ensure that by allowing other projects to make use of it. This was a formidable task and a great accomplishment. </p>]]></description>
-<dc:subject></dc:subject>
-<dc:creator>ben</dc:creator>
-<dc:date>2006-04-04T07:15:22-08:00</dc:date>
-</item>
-<item rdf:about="http://weblogs.mozillazine.org/ben/archives/009965.html">
-<title>Producing Open Source Software</title>
-<link>http://weblogs.mozillazine.org/ben/archives/009965.html</link>
-<description><![CDATA[<p>I've been reading Karl Fogel's excellent <a href="http://www.producingoss.com/">Producing Open Source Software</a>. </p>
-
-<p>Karl's book is very well written, nice and compact (272 pages), and contains useful information for anyone doing anything in the Open Source world: both developers and managers. </p>
-
-<p>It will help people new to Open Source get a better understanding of how OSS projects are run. It will help people familiar with Open Source to get a better understanding of how to contribute more effectively.</p>
-
-<p>It's definitely a "must read."</p>]]></description>
-<dc:subject></dc:subject>
-<dc:creator>ben</dc:creator>
-<dc:date>2006-03-26T15:03:52-08:00</dc:date>
-</item>
-<item rdf:about="http://weblogs.mozillazine.org/ben/archives/009964.html">
-<title>Writing for Busy People</title>
-<link>http://weblogs.mozillazine.org/ben/archives/009964.html</link>
-<description><![CDATA[<p>Back when I was in <a href="http://www2.ece.auckland.ac.nz/">University</a>, many of the lecturers stressed time and time again the importance of succinct, well organized writing. They said over and over that this was the best way to have your thoughts read and understood by decision makers. In fact, they scared us by saying that 70% of us would become managers sooner or later!</p>
-
-<p>Well, I can tell you that's sage advice. It's great when people make contributions in the form of ideas and proposals, but it's even better when they're written for busy people. Here are some examples:</p>
-
-<ul>
- <li>Making important points up front
- <li>Clear taxonomy of headings, and lots of them
- <li>Writing clearly and succinctly
- <li>No long, unbroken paragraphs or tracts of text.
- <li>Preferring bulleted lists with clear points to paragraphs.
- <li>Use of emphasis in formatting to make important things clear
-</ul>
-
-<p>These days, I find I don't have a lot of time to read everything carefully, so the better structured a document is, the more I get out of it. I frequently find I miss entire subsections or points of documents, even when there's relatively little text, because of incomplete organization. My eyes definitely glaze over when i see a large block of unbroken text with few headings. At the very least, it'd be very helpful if folk would structure their thoughts into: "Problem" and "Proposed Solution". </p>
-
-<p>Before you post, stop and think if you've written something in a way that'll allow others to get the most out of it. Communicating your ideas effectively means you may get a clearer and quicker response from other people. </p>]]></description>
-<dc:subject>Editorial</dc:subject>
-<dc:creator>ben</dc:creator>
-<dc:date>2006-03-26T14:48:04-08:00</dc:date>
-</item>
-<item rdf:about="http://weblogs.mozillazine.org/ben/archives/009943.html">
-<title>Step 2: Ask Questions</title>
-<link>http://weblogs.mozillazine.org/ben/archives/009943.html</link>
-<description><![CDATA[<p>A healthy project is one where active contributors are always evaluating the project's progress, making sure it is headed in the right direction (usually stated in the project mission or goals). </p>
-
-<p>I think we could be better at this in Mozilla. I'm not suggesting people be assholes or anything, but I think some more pan-project analysis would be useful. </p>
-
-<p>Historically, I can point at a couple of groups of people who have attempted to do something like this. The <code>drivers@</code> group is one that looked beyond individual modules within Gecko to make sure that the right thing for the shipping products as a whole happened. The Firefox team is another example. By taking a holistic view, user experience was enhanced. </p>
-
-<p>I think contributors should not be afraid to poke their nose in other parts of the project and see how things are going. Ask questions. Learn more. Get involved in governance and management. If things don't seem intuitive, or a little arbitrary, ask, rather than assume it's for a good reason. One of the benefits of having an open, referencable set of discussion forums means that once you've answered a question once on the public forums, when someone else asks you can just give them a URL. </p>]]></description>
-<dc:subject></dc:subject>
-<dc:creator>ben</dc:creator>
-<dc:date>2006-03-22T17:27:14-08:00</dc:date>
-</item>
-<item rdf:about="http://weblogs.mozillazine.org/ben/archives/009924.html">
-<title>Step 1: Public Discussions</title>
-<link>http://weblogs.mozillazine.org/ben/archives/009924.html</link>
-<description><![CDATA[<p>The first step on the pathway to open source project happiness is to have our discussions in the public. </p>
-
-<p>One of the things people have (rightly) criticized about Firefox and Mozilla development in the past is that too much happens mysteriously, behind closed doors. This was for a number of reasons that sounded sufficient at the time - it was expedient, people were sitting within shouting distance, mental laziness, etc. </p>
-
-<p>What poor communication breeds is a lack of understanding of procedures, priorities and such like. A healthy project is one where the contributors understanding where things are headed, and what parts they can play. It is one where newcomers can visit the project website and within the space of a few minutes get a decent understanding of how things work, and find out opportunities for them to participate. </p>
-
-<p>People don't want to contribute to projects where things happen "magically". I've learned this lesson in the past. </p>
-
-<p>To this end, I've been encouraging everyone to have public discussions on the <a href="https://lists.mozilla.org/listinfo">Mozilla Newsgroups/Mailing Lists</a>. For Firefox, the list is dev-apps-firefox@, and the newsgroup is mozilla.dev.apps.firefox. They are mirrored through <a href="http://groups.google.com/group/mozilla.dev.apps.firefox">Google Groups</a> for ease of browsing. We're planning on improving the theme for Firefox2, and rather than pursue this effort in a walled garden like last time, we're going to proceed in dev-themes@/mozilla.dev.themes. Come on over and join in!</p>
-
-<p>At the same time, we've been encouraging other projects to use the newsgroups/lists too. Decisions made in private email, IRC (which isn't archived anywhere) even in public bugs etc make it very difficult for people who aren't central to the project to find out more or participate. I think we should strive to strike a better balance between convenience and accessibility/referencability. </p>
-
-<p>On top of this, there is a need to make the contact portions of the web site more accurate, relevant and easy to find, so people can easily find the list they want, and the person or group to contact. </p>
-
-<p>We've been having discussions about all of this in <a href="http://groups.google.com/group/mozilla.dev.general">mozilla.dev.general</a>, in <a href="http://groups.google.com/group/mozilla.dev.general/browse_thread/thread/899917f713861f06/4ae6d094ffee5ae7">these</a> <a href="http://groups.google.com/group/mozilla.dev.general/browse_thread/thread/5d1bf2bbc769919d/210246003f1f6fea">threads</a>. Rather than talk in a vacuum of only ourselves, I really hope that those of you that have experienced difficulty in the past in some of these areas will come forward and contribute to the discussion. </p>]]></description>
-<dc:subject></dc:subject>
-<dc:creator>ben</dc:creator>
-<dc:date>2006-03-20T09:23:24-08:00</dc:date>
-</item>
-<item rdf:about="http://weblogs.mozillazine.org/ben/archives/009914.html">
-<title>Reflection</title>
-<link>http://weblogs.mozillazine.org/ben/archives/009914.html</link>
-<description><![CDATA[<p>I've been doing a bit of it lately. All manner of topics. We recently moved and things have been chaotic so it's been nice to take the time to think. I've had a chance to look at how far we've come, and form some ideas about what we might need to do to go the right places. </p>
-
-<p>The past couple of years have brought some immense highs, and some considerable angst. With success has come the realization that true now as ever: the spirit of open source is expressed through the creative freedom of the many. The surest way to navigate the murky waters of increased attention and marketshare and such like is, as Leslie has been saying for some time, to keep your karma clean. Do the right thing, not only in technical matters but also relationships. </p>
-
-<p>For the Mozilla project, what we need to do (I think) is:</p>
-
-<ul>
- <li>Better define the things that are important to us. The things that define who we are. Impart the positive aspects of open development culture and practice on everyone involved because they're effective, and as a safeguard against recurrence of some of the <a href="http://weblogs.mozillazine.org/ben/archives/009698.html">troubles of the past</a>.
- <li>Engage the community more effectively. Create and maintain an infrastructure of open communication to remove the "mystery" behind the decision making process. Organize our contributor materials better to make the project more accessible to newcomers. These are just a couple of examples.
-</ul>
-
-<p>For my part, I'm starting out this year by doing things <a href="http://www.producingoss.com/">a little differently</a>. I think we need to grow more as a project. I'm hopeful that I'll be able to achieve some positive change. </p>
-
-<p>I understand that this post might seem a little abstract. I think what I'm saying might become a bit more clear after I talk about some tangible efforts, which I will do in future entries.</p>]]></description>
-<dc:subject></dc:subject>
-<dc:creator>ben</dc:creator>
-<dc:date>2006-03-19T02:00:07-08:00</dc:date>
-</item>
-<item rdf:about="http://weblogs.mozillazine.org/ben/archives/009804.html">
-<title>Bye Bye Blackberry?</title>
-<link>http://weblogs.mozillazine.org/ben/archives/009804.html</link>
-<description><![CDATA[<p><a href="http://news.com.com/Bye-bye%2C+BlackBerry+-+page+2/2100-1047_3-6042308-2.html?tag=st.num">Bye Bye, Blackberry?</a></p>
-
-<p>I cannot believe people are discussing life without these things. It's like this: I have a patent on television. I don't plan on doing anything with it, but I'm going to shut TV down for all of you, and you're going to sit about and think about life without TV? What's wrong with people?! Is this the world we all want to live in, where people without the interest or capability to pursue technology can hold everyone else captive? That's not the world I want to live in. <br />
-</p>]]></description>
-<dc:subject></dc:subject>
-<dc:creator>ben</dc:creator>
-<dc:date>2006-02-24T10:57:32-08:00</dc:date>
-</item>
-<item rdf:about="http://weblogs.mozillazine.org/ben/archives/009774.html">
-<title>More on Memory</title>
-<link>http://weblogs.mozillazine.org/ben/archives/009774.html</link>
-<description><![CDATA[<p>Firefox's caching behavior is just one area of memory usage. I'm really glad that there's been such a lot of discussion in the previous post I made, since many people have raised specific issues, bugs have been filed, and people are looking at the things people are reporting. This sort of feedback system is one of the things that makes the open development model great. Firefox 2 will be much better because of your help!</p>]]></description>
-<dc:subject></dc:subject>
-<dc:creator>ben</dc:creator>
-<dc:date>2006-02-17T23:44:03-08:00</dc:date>
-</item>
-
-
-</rdf:RDF>
diff --git a/toolkit/components/feeds/test/xml/rss1/full_feed_unknown_extension.xml b/toolkit/components/feeds/test/xml/rss1/full_feed_unknown_extension.xml
deleted file mode 100644
index c2c875b14f..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/full_feed_unknown_extension.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<!--
-
-Description: rss1 unknown elements does not cause error
-Expect: feed.items.length == 1
-
--->
-<rdf:RDF
-xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-xmlns:dc="http://purl.org/dc/elements/1.1/"
-xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
-xmlns:admin="http://webns.net/mvcb/"
-xmlns:cc="http://web.resource.org/cc/"
-xmlns="http://purl.org/rss/1.0/">
-
-<channel rdf:about="http://example.org/">
-<title>fooo</title>
-<link>http://weblogs.example.org/</link>
-<description>fooooooo</description>
-<dc:language>en-us</dc:language>
-<dc:creator></dc:creator>
-<dc:date>2006-04-10T08:38:18-08:00</dc:date>
-<admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=3.2" />
-
-
-
-
-
-
-
-<foo:bar xmlns:foo="http://example.org">baz</foo:bar>
-
-
-
-
-
-
-
-
-
-
-<items>
-<rdf:Seq>
-<rdf:li rdf:resource="http://weblogs.example.org/archives/009698.html" />
-</rdf:Seq>
-
-</items>
-
-</channel>
-<item rdf:about="http://weblogs.example.org/archives/009698.html">
-<title>Come From?</title>
-<link>http://example.org/009698.html</link>
-<description><![CDATA[much of the code]]></description>
-<dc:date>2006-02-06T10:19:03-08:00</dc:date>
-</item>
-</rdf:RDF>
diff --git a/toolkit/components/feeds/test/xml/rss1/item_2_dc_description.xml b/toolkit/components/feeds/test/xml/rss1/item_2_dc_description.xml
deleted file mode 100644
index 03a4bb548d..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/item_2_dc_description.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed w/ item 2 dc:description
-Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).fields.getProperty('dc:description') == 'XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet 2.'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'>
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- </channel>
- <item>
- <title>XML: A Disruptive Technology</title>
- <link>http://c.moreover.com/click/here.pl?r123</link>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet.
- </dc:description>
- <!-- <dc:publisher>The O'Reilly Network</dc:publisher>
- <dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
- <dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
- <dc:subject>XML</dc:subject>-->
- </item>
- <item>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet 2.
- </dc:description>
- <title>XML: A Disruptive Technology</title>
- </item>
-</rdf:RDF> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss1/item_2_dc_publisher.xml b/toolkit/components/feeds/test/xml/rss1/item_2_dc_publisher.xml
deleted file mode 100644
index d21734d6ff..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/item_2_dc_publisher.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed w/ item 2 dc:publisher
-Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).fields.getProperty('dc:publisher') == 'The O\'Reilly Network'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'>
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- </channel>
- <item>
- <title>XML: A Disruptive Technology</title>
- <link>http://c.moreover.com/click/here.pl?r123</link>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet.
- </dc:description>
- <!--
- <dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
- <dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
- <dc:subject>XML</dc:subject>-->
- </item>
- <item>
- <dc:publisher>The O'Reilly Network</dc:publisher>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet 2.
- </dc:description>
- <title>XML: A Disruptive Technology</title>
- </item>
-</rdf:RDF> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss1/item_2_dc_publisher_extra_att_invalid_rdf.xml b/toolkit/components/feeds/test/xml/rss1/item_2_dc_publisher_extra_att_invalid_rdf.xml
deleted file mode 100644
index dac0d1dc84..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/item_2_dc_publisher_extra_att_invalid_rdf.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed w/ item 2 dc:publisher
-Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).fields.getProperty('dc:publisher') == 'The O\'Reilly Network'
-
--->
-<rdf:RDF
- xmlns:foo="http://example.org"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'>
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- </channel>
- <item>
- <title>XML: A Disruptive Technology</title>
- <link>http://c.moreover.com/click/here.pl?r123</link>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet.
- </dc:description>
- <!--
- <dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
- <dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
- <dc:subject>XML</dc:subject>-->
- </item>
- <item>
- <dc:publisher foo:bar="baz">The O'Reilly Network</dc:publisher>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet 2.
- </dc:description>
- <title>XML: A Disruptive Technology</title>
- </item>
-</rdf:RDF> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss1/item_count.xml b/toolkit/components/feeds/test/xml/rss1/item_count.xml
deleted file mode 100644
index 69520fb143..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/item_count.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed w/ 1 item count
-Expect: feed.items.length == 2
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'>
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- </channel>
- <item>
- <!-- <title>XML: A Disruptive Technology</title>
- <link>http://c.moreover.com/click/here.pl?r123</link>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical
- infrastructure of the Internet.
- </dc:description>
- <dc:publisher>The O'Reilly Network</dc:publisher>
- <dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
- <dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
- <dc:subject>XML</dc:subject>-->
- </item>
- <item>
-
- </item>
-</rdf:RDF> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss1/item_dc_creator.xml b/toolkit/components/feeds/test/xml/rss1/item_dc_creator.xml
deleted file mode 100644
index 71ecd6d777..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/item_dc_creator.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed w/ item dc:description
-Expect: var author = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).authors.queryElementAt(0, Components.interfaces.nsIFeedPerson); (author.name == "Simon St.Laurent" && author.email == "simonstl@simonstl.com")
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'>
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- </channel>
- <item>
- <title>XML: A Disruptive Technology</title>
- <link>http://c.moreover.com/click/here.pl?r123</link>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet.
- </dc:description>
- <dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
- <dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
- <dc:subject>XML</dc:subject>
- </item>
- <item>
- <dc:publisher>The O'Reilly Network</dc:publisher>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet 2.
- </dc:description>
- <title>XML: A Disruptive Technology</title>
- </item>
-</rdf:RDF> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss1/item_dc_description.xml b/toolkit/components/feeds/test/xml/rss1/item_dc_description.xml
deleted file mode 100644
index 3d7880e8ce..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/item_dc_description.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed w/ item dc:description
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).fields.getProperty('dc:description') == 'XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet.'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'>
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- </channel>
- <item>
- <title>XML: A Disruptive Technology</title>
- <link>http://c.moreover.com/click/here.pl?r123</link>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet.
- </dc:description>
- <!--
- <dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
- <dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
- <dc:subject>XML</dc:subject>-->
- </item>
- <item>
- <dc:publisher>The O'Reilly Network</dc:publisher>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet 2.
- </dc:description>
- <title>XML: A Disruptive Technology</title>
- </item>
-</rdf:RDF> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss1/item_dc_description_normalized.xml b/toolkit/components/feeds/test/xml/rss1/item_dc_description_normalized.xml
deleted file mode 100644
index d57477a997..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/item_dc_description_normalized.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed w/ item dc:description
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).summary.plainText() == 'XML is...'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'>
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- </channel>
- <item>
- <dc:description>XML is...</dc:description>
- <title>XML: A Disruptive Technology</title>
- <link>http://c.moreover.com/click/here.pl?r123</link>
- <description>
- XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet.
- </description>
-
- <!--
- <dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
- <dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
- <dc:subject>XML</dc:subject>-->
- </item>
- <item>
- <dc:publisher>The O'Reilly Network</dc:publisher>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet 2.
- </dc:description>
- <title>XML: A Disruptive Technology</title>
- </item>
-</rdf:RDF>
diff --git a/toolkit/components/feeds/test/xml/rss1/item_description.xml b/toolkit/components/feeds/test/xml/rss1/item_description.xml
deleted file mode 100644
index db4a0137ff..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/item_description.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed w/ item desc normalized
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).summary.plainText() == 'XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet.'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'>
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- </channel>
- <item>
- <title>XML: A Disruptive Technology</title>
- <link>http://c.moreover.com/click/here.pl?r123</link>
- <description>
- XML is placing increasingly heavy loads on the existing technical infrastructure of the Internet.
- </description>
- <!-- <dc:publisher>The O'Reilly Network</dc:publisher>
- <dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
- <dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
- <dc:subject>XML</dc:subject>-->
- </item>
- <item>
-
- </item>
-</rdf:RDF>
diff --git a/toolkit/components/feeds/test/xml/rss1/item_id.xml b/toolkit/components/feeds/test/xml/rss1/item_id.xml
deleted file mode 100644
index 50048b0a35..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/item_id.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed w/ item rdf:about
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).id == 'http://example.com/hmm'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'>
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- </channel>
- <item rdf:about="http://example.com/hmm">
- <title>XML: A Disruptive Technology</title>
- <link>http://c.moreover.com/click/here.pl?r123</link>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical
- infrastructure of the Internet.
- </dc:description>
- <!-- <dc:publisher>The O'Reilly Network</dc:publisher>
- <dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
- <dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
- <dc:subject>XML</dc:subject>-->
- </item>
- <item>
-
- </item>
-</rdf:RDF>
diff --git a/toolkit/components/feeds/test/xml/rss1/item_link.xml b/toolkit/components/feeds/test/xml/rss1/item_link.xml
deleted file mode 100644
index 8ead15fb6a..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/item_link.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed w/ item link
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).fields.getProperty('rss1:link') == 'http://c.moreover.com/click/here.pl?r123'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'>
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- </channel>
- <item>
- <title>XML: A Disruptive Technology</title>
- <link>http://c.moreover.com/click/here.pl?r123</link>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical
- infrastructure of the Internet.
- </dc:description>
- <!-- <dc:publisher>The O'Reilly Network</dc:publisher>
- <dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
- <dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
- <dc:subject>XML</dc:subject>-->
- </item>
- <item>
-
- </item>
-</rdf:RDF> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss1/item_link_normalized.xml b/toolkit/components/feeds/test/xml/rss1/item_link_normalized.xml
deleted file mode 100644
index dbf9749ac3..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/item_link_normalized.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed w/ item link
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link.spec == 'http://c.moreover.com/click/here.pl?r123'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'>
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- </channel>
- <item>
- <title>XML: A Disruptive Technology</title>
- <link>http://c.moreover.com/click/here.pl?r123</link>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical
- infrastructure of the Internet.
- </dc:description>
- <!-- <dc:publisher>The O'Reilly Network</dc:publisher>
- <dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
- <dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
- <dc:subject>XML</dc:subject>-->
- </item>
- <item>
-
- </item>
-</rdf:RDF> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss1/item_title.xml b/toolkit/components/feeds/test/xml/rss1/item_title.xml
deleted file mode 100644
index b4d4b8e3eb..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/item_title.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed w/ item title
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).fields.getProperty('rss1:title') == 'XML: A Disruptive Technology'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'>
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- </channel>
- <item>
- <title>XML: A Disruptive Technology</title>
- <!-- <link>http://c.moreover.com/click/here.pl?r123</link>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical
- infrastructure of the Internet.
- </dc:description>
- <dc:publisher>The O'Reilly Network</dc:publisher>
- <dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
- <dc:subject>XML</dc:subject>-->
- </item>
- <item>
-
- </item>
-</rdf:RDF> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss1/item_title_normalized.xml b/toolkit/components/feeds/test/xml/rss1/item_title_normalized.xml
deleted file mode 100644
index a9270982f3..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/item_title_normalized.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed w/ item title normalized
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).title.text == 'XML: A Disruptive Technology'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'>
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- </channel>
- <item>
- <title>XML: A Disruptive Technology</title>
- <link>http://c.moreover.com/click/here.pl?r123</link>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical
- infrastructure of the Internet.
- </dc:description>
- <!-- <dc:publisher>The O'Reilly Network</dc:publisher>
- <dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
- <dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
- <dc:subject>XML</dc:subject>-->
- </item>
- <item>
-
- </item>
-</rdf:RDF>
diff --git a/toolkit/components/feeds/test/xml/rss1/item_updated_dcterms.xml b/toolkit/components/feeds/test/xml/rss1/item_updated_dcterms.xml
deleted file mode 100644
index d8f15ee32e..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/item_updated_dcterms.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed updated
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).updated == 'Sat, 07 Sep 2002 00:00:01 GMT'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'
- xmlns:dcterms='http://purl.org/dc/terms/'>
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- <dcterms:modified>Sat, 07 Sep 2002 00:00:01 GMT</dcterms:modified>
- </channel>
- <item rdf:about="http://example.com/hmm">
- <title>XML: A Disruptive Technology</title>
- <link>http://c.moreover.com/click/here.pl?r123</link>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical
- infrastructure of the Internet.
- </dc:description>
- <dcterms:modified>Sat, 07 Sep 2002 00:00:01 GMT</dcterms:modified>
- </item>
-</rdf:RDF>
diff --git a/toolkit/components/feeds/test/xml/rss1/item_wiki_importance_extra_att.xml b/toolkit/components/feeds/test/xml/rss1/item_wiki_importance_extra_att.xml
deleted file mode 100644
index 49ba579ddb..0000000000
--- a/toolkit/components/feeds/test/xml/rss1/item_wiki_importance_extra_att.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: RSS1 feed w/ item wiki:importance with extra attribute
-Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).fields.getProperty('wiki:importance') == 'major'
-
--->
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns="http://purl.org/rss/1.0/"
- xmlns:dc='http://purl.org/dc/elements/1.1/'
- xmlns:w="http://purl.org/rss/1.0/modules/wiki/"
- xmlns:foo="http://example.org">
- <channel rdf:about="http://www.xml.com/xml/news.rss">
- <title>Test</title>
- <link>http://xml.com/pub</link>
- <dc:description>another description</dc:description>
- </channel>
- <item>
- <title>XML: A Disruptive Technology</title>
- <!-- <link>http://c.moreover.com/click/here.pl?r123</link>
- <dc:description>
- XML is placing increasingly heavy loads on the existing technical
- infrastructure of the Internet.
- </dc:description>
- <dc:publisher>The O'Reilly Network</dc:publisher>
- <dc:creator>Simon St.Laurent (mailto:simonstl@simonstl.com)</dc:creator>
- <dc:rights>Copyright &#169; 2000 O'Reilly &amp; Associates, Inc.</dc:rights>
- <dc:subject>XML</dc:subject>-->
- </item>
- <item>
- <w:importance foo:bar="baz">major</w:importance>
- </item>
-</rdf:RDF> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_category.xml b/toolkit/components/feeds/test/xml/rss2/feed_category.xml
deleted file mode 100644
index 5538259957..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_category.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel category works
-Expect: feed.categories.queryElementAt(0, Components.interfaces.nsIPropertyBag).getProperty('term') == 'hmm'
-
--->
-<rss version="2.0" >
-<channel>
-<category>hmm</category>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_category_count.xml b/toolkit/components/feeds/test/xml/rss2/feed_category_count.xml
deleted file mode 100644
index 881c6e0d92..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_category_count.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel category works w/ domain
-Expect: feed.categories.length == 4
-
--->
-<rss version="2.0" >
-<channel>
-<category>hmm0</category>
-<category>hmm1</category>
-<category domain="http://example.org">hmm2</category>
-<category>hmm3</category>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_cloud.xml b/toolkit/components/feeds/test/xml/rss2/feed_cloud.xml
deleted file mode 100644
index caa033548a..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_cloud.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel cloud works
-Expect: ((feed.cloud.getProperty('domain')=="rpc.sys.com") && (feed.cloud.getProperty('port')=="80") && (feed.cloud.getProperty('path')=="/RPC2") && (feed.cloud.getProperty('registerProcedure')=="pingMe") && (feed.cloud.getProperty('protocol')=="soap"))
-
--->
-<rss version="2.0" >
-<channel>
-<cloud domain="rpc.sys.com" port="80" path="/RPC2" registerProcedure="pingMe" protocol="soap"/>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_copyright.xml b/toolkit/components/feeds/test/xml/rss2/feed_copyright.xml
deleted file mode 100644
index 2d00e7a14f..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_copyright.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel copyright works
-Expect: feed.fields.getProperty('copyright') == 'copyright 2006'
-
--->
-<rss version="2.0" >
-<channel>
-<copyright>copyright 2006</copyright>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_copyright_linebreak.xml b/toolkit/components/feeds/test/xml/rss2/feed_copyright_linebreak.xml
deleted file mode 100644
index 4b9ca5e71f..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_copyright_linebreak.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel copyright works
-Expect: feed.fields.getProperty('copyright') == 'copyright 2005'
-
--->
-<rss version="2.0" >
-<channel>
-<copyright>copyright 2005
-
-
-</copyright>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_data_outside_channel.xml b/toolkit/components/feeds/test/xml/rss2/feed_data_outside_channel.xml
deleted file mode 100644
index bf212760da..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_data_outside_channel.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel copyright works
-Expect: feed.fields.getProperty('copyright') == 'copyright 2006'
-
--->
-<rss version="2.0" >
-<dc:creator xmlns:dc="http://example.org">heynow</dc:creator>
-<channel>
-<copyright>copyright 2006</copyright>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_dc_contributor.xml b/toolkit/components/feeds/test/xml/rss2/feed_dc_contributor.xml
deleted file mode 100644
index cfb514ccd9..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_dc_contributor.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel copyright works
-Expect: feed.contributors.queryElementAt(0, Components.interfaces.nsIFeedPerson).name == 'them';
-
--->
-<rss version="2.0" >
-<channel xmlns:dc="http://purl.org/dc/elements/1.1/">
-<copyright>copyright 2006</copyright>
-<dc:creator>me</dc:creator>
-<dc:contributor>them</dc:contributor>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_dc_creator.xml b/toolkit/components/feeds/test/xml/rss2/feed_dc_creator.xml
deleted file mode 100644
index 8ed1aff7ff..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_dc_creator.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel copyright works
-Expect: feed.authors.queryElementAt(0, Components.interfaces.nsIFeedPerson).name == 'me'
-
--->
-<rss version="2.0" >
-<channel xmlns:dc="http://purl.org/dc/elements/1.1/">
-<copyright>copyright 2006</copyright>
-<dc:creator>me</dc:creator>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_description.xml b/toolkit/components/feeds/test/xml/rss2/feed_description.xml
deleted file mode 100644
index 11463dfe04..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_description.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel description works
-Expect: var desc = feed.fields.getProperty('description'); desc == 'test';
-
--->
-<rss version="2.0" >
-<channel>
-<description>test</description>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_description_html.xml b/toolkit/components/feeds/test/xml/rss2/feed_description_html.xml
deleted file mode 100644
index ecb544f6cf..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_description_html.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel description works w/html
-Expect: feed.fields.getProperty('description') == '<b>test</b>'
-
--->
-<rss version="2.0" >
-<channel>
-<description>&lt;b>test&lt;/b></description>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_description_html_cdata.xml b/toolkit/components/feeds/test/xml/rss2/feed_description_html_cdata.xml
deleted file mode 100644
index 45ee9e92be..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_description_html_cdata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel description works w/ html & CDATA
-Expect: feed.fields.getProperty('description') == '<b>test</b>'
-
--->
-<rss version="2.0" >
-<channel>
-<description><![CDATA[<b>test</b>]]></description>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_docs.xml b/toolkit/components/feeds/test/xml/rss2/feed_docs.xml
deleted file mode 100644
index 20323b22f6..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_docs.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel docs works
-Expect: feed.fields.getProperty('docs') == 'http://example.org'
-
--->
-<rss version="2.0" >
-<channel>
-<docs>http://example.org</docs>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_generator.xml b/toolkit/components/feeds/test/xml/rss2/feed_generator.xml
deleted file mode 100644
index 91ba579b44..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_generator.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel generator works
-Expect: feed.generator.agent == 'a generator used to make feeds'
-
--->
-<rss version="2.0" >
-<channel>
-<generator>a generator used to make feeds</generator>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_image_desc.xml b/toolkit/components/feeds/test/xml/rss2/feed_image_desc.xml
deleted file mode 100644
index 7f665641b2..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_image_desc.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel image description and required fields work
-Expect: ((feed.image.getProperty('title') == 'A picture') && (feed.image.getProperty('link') == 'http://example.org') && (feed.image.getProperty('url') == 'http://example.org/a.jpg') && (feed.image.getProperty('description') == 'Yo!'))
-
--->
-<rss version="2.0" >
-<channel>
-<image>
- <link>http://example.org</link>
- <title>A picture</title>
- <url>http://example.org/a.jpg</url>
- <description>Yo!</description>
-</image>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_image_desc_width_height.xml b/toolkit/components/feeds/test/xml/rss2/feed_image_desc_width_height.xml
deleted file mode 100644
index 2be53e86cc..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_image_desc_width_height.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel image required fields work
-Expect: ((feed.image.getProperty('title') == 'A picture') && (feed.image.getProperty('link') == 'http://example.org') && (feed.image.getProperty('url') == 'http://example.org/a.jpg') && (feed.image.getProperty('description') == 'Yo!') && (feed.image.getProperty('width') == '42') && (feed.image.getProperty('height') == '43'))
-
--->
-<rss version="2.0" >
-<channel>
-<image>
- <link>http://example.org</link>
- <title>A picture</title>
- <url>http://example.org/a.jpg</url>
- <description>Yo!</description>
- <width>42</width>
- <height>43</height>
-</image>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_image_required.xml b/toolkit/components/feeds/test/xml/rss2/feed_image_required.xml
deleted file mode 100644
index 9035523a1a..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_image_required.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel image required fields work
-Expect: ((feed.image.getProperty('title') == 'A picture') && (feed.image.getProperty('link') == 'http://example.org') && (feed.image.getProperty('url') == 'http://example.org/a.jpg'))
-
--->
-<rss version="2.0" >
-<channel>
-<image>
- <link>http://example.org</link>
- <title>A picture</title>
- <url>http://example.org/a.jpg</url>
-</image>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_language.xml b/toolkit/components/feeds/test/xml/rss2/feed_language.xml
deleted file mode 100644
index d4047a99fd..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_language.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel language works
-Expect: feed.fields.getProperty('language') == 'en-us'
-
--->
-<rss version="2.0" >
-<channel>
-<language>en-us</language>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_lastBuildDate.xml b/toolkit/components/feeds/test/xml/rss2/feed_lastBuildDate.xml
deleted file mode 100644
index fee9ff5826..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_lastBuildDate.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel lastBuildDate works
-Expect: feed.fields.getProperty('lastBuildDate') == 'Sat, 07 Sep 2002 00:00:01 GMT'
-
--->
-<rss version="2.0" >
-<channel>
-<lastBuildDate>Sat, 07 Sep 2002 00:00:01 GMT</lastBuildDate>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_linebreak_link.xml b/toolkit/components/feeds/test/xml/rss2/feed_linebreak_link.xml
deleted file mode 100644
index 1af6550f91..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_linebreak_link.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel link works w/ line break
-Expect: feed.link.spec == 'http://mozilla.org/'
-
--->
-<rss version="2.0" >
-<channel>
-<link>
-http://mozilla.org/
-</link>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_link.xml b/toolkit/components/feeds/test/xml/rss2/feed_link.xml
deleted file mode 100644
index a4874e9cad..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_link.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel link works
-Expect: feed.link.spec == 'http://mozilla.org/'
-
--->
-<rss version="2.0" >
-<channel>
-<link>http://mozilla.org/</link>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_link_cdata.xml b/toolkit/components/feeds/test/xml/rss2/feed_link_cdata.xml
deleted file mode 100644
index 5031ac1c3c..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_link_cdata.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel link works w/ CDATA
-Expect: feed.link.spec == 'http://mozilla.org/'
-
--->
-<rss version="2.0" >
-<channel>
-<link>
- <![CDATA[http://mozilla.org/]]>
-</link>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_managingEditor.xml b/toolkit/components/feeds/test/xml/rss2/feed_managingEditor.xml
deleted file mode 100644
index 3f7060449e..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_managingEditor.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel managingEditor works
-Expect: feed.authors.queryElementAt(0, Components.interfaces.nsIFeedPerson).email == 'example@example.com'
-
--->
-<rss version="2.0" >
-<channel>
-<managingEditor>example@example.com</managingEditor>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_managingEditor_extra_att.xml b/toolkit/components/feeds/test/xml/rss2/feed_managingEditor_extra_att.xml
deleted file mode 100644
index 017a4595f0..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_managingEditor_extra_att.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel managingEditor works
-Expect: feed.authors.queryElementAt(0, Components.interfaces.nsIFeedPerson).email == 'example@example.com'
-
--->
-<rss version="2.0" >
-<channel>
-<managingEditor foo:bar="baz" xmlns:foo="http://example.org">example@example.com</managingEditor>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_multiple_categories.xml b/toolkit/components/feeds/test/xml/rss2/feed_multiple_categories.xml
deleted file mode 100644
index 538362b6ad..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_multiple_categories.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel category works
-Expect: feed.categories.queryElementAt(2, Components.interfaces.nsIPropertyBag).getProperty('term') == 'hmm2'
-
--->
-<rss version="2.0" >
-<channel>
-<category>hmm0</category>
-<category>hmm1</category>
-<category>hmm2</category>
-<category>hmm3</category>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_pubDate.xml b/toolkit/components/feeds/test/xml/rss2/feed_pubDate.xml
deleted file mode 100644
index 42cea68323..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_pubDate.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel pubDate works
-Expect: feed.fields.getProperty('pubDate') == 'Sat, 07 Sep 2002 00:00:01 GMT'
-
--->
-<rss version="2.0" >
-<channel>
-<pubDate>Sat, 07 Sep 2002 00:00:01 GMT</pubDate>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_pubDate_invalid.xml b/toolkit/components/feeds/test/xml/rss2/feed_pubDate_invalid.xml
deleted file mode 100644
index 48cce256ad..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_pubDate_invalid.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: non-RFC822 date should produce null feed.updated
-Expect: feed.updated == null
-
--->
-<rss version="2.0" >
-<channel>
-<pubDate>Satmonkey, 07 Sepmonkey 2002 00:00:01 GMT</pubDate>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_pubDate_nonRFC822_1.xml b/toolkit/components/feeds/test/xml/rss2/feed_pubDate_nonRFC822_1.xml
deleted file mode 100644
index 846ef22a61..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_pubDate_nonRFC822_1.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: Test whether date parsing handles partly-abbreviated dates.
-Expect: feed.updated == 'Tue, 25 Apr 2006 08:00:00 GMT'
-
--->
-<rss version="2.0" >
-<channel>
-<pubDate>Tues, 25 Apri 2006 08:00:00 GMT</pubDate>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_pubDate_nonRFC822_2.xml b/toolkit/components/feeds/test/xml/rss2/feed_pubDate_nonRFC822_2.xml
deleted file mode 100644
index d1ee96f367..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_pubDate_nonRFC822_2.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: Test whether date parsing handles unabbreviated dates.
-Expect: feed.updated == 'Sat, 25 Nov 2006 00:12:45 GMT'
-
--->
-<rss version="2.0" >
-<channel>
-<pubDate>Saturday 25 November 2006 10:12:45 +1000</pubDate>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_pubDate_timezoneZ.xml b/toolkit/components/feeds/test/xml/rss2/feed_pubDate_timezoneZ.xml
deleted file mode 100644
index b31ed5c56c..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_pubDate_timezoneZ.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: Test whether date parsing handles "Z" as a timezone in RFC822.
-Expect: feed.updated == 'Tue, 25 Apr 2006 08:00:00 GMT'
-
--->
-<rss version="2.0" >
-<channel>
-<pubDate>Tue, 25 Apr 2006 08:00:00 Z</pubDate>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_pubDate_utc.xml b/toolkit/components/feeds/test/xml/rss2/feed_pubDate_utc.xml
deleted file mode 100644
index 8eff560460..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_pubDate_utc.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: Test whether date parsing handles 'UTC' as a timezone.
-Expect: feed.updated == 'Mon, 16 Apr 2007 03:12:45 GMT'
-
--->
-<rss version="2.0" >
-<channel>
-<pubDate>Monday, 16 April 2007 03:12:45 UTC</pubDate>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_rating.xml b/toolkit/components/feeds/test/xml/rss2/feed_rating.xml
deleted file mode 100644
index dd5f8f9e5e..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_rating.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel rating works
-Expect: feed.fields.getProperty('rating') == '(PICS-1.1 "http://www.rsac.org/ratingsv01.html" l by "webmaster@example.com" on "2006.01.29T10:09-0800" r (n 0 s 0 v 0 l 0))'
-
--->
-<rss version="2.0" >
-<channel>
-<rating>(PICS-1.1 "http://www.rsac.org/ratingsv01.html" l by "webmaster@example.com" on "2006.01.29T10:09-0800" r (n 0 s 0 v 0 l 0))</rating>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_single_quote_stylesheet_pi.xml b/toolkit/components/feeds/test/xml/rss2/feed_single_quote_stylesheet_pi.xml
deleted file mode 100644
index 10141fe7ef..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_single_quote_stylesheet_pi.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
-Description: stylesheets with single quoted attributes work. Bug 352549.
-Base: http://www.penny-arcade.com/rss.xml
-Expect: result.stylesheet.spec == "http://www.penny-arcade.com/stylesheets/rss-display.xsl"
-
--->
-<?xml-stylesheet type='text/xsl' href='/stylesheets/rss-display.xsl' version='1.0'?>
-<rss version="2.0">
-<channel>
-<title>Penny-Arcade</title>
-<link>http://www.penny-arcade.com/</link>
-<language>en-us</language>
-
-<copyright>Copyright 1999 - 2006 Penny Arcade, Inc.</copyright>
-<image>
-<url>http://www.penny-arcade.com/images/rss-logo.png</url>
-<title>Penny-Arcade Logo</title>
-<link>http://www.penny-arcade.com/</link>
-<width>144</width>
-
-<height>82</height>
-</image>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_skipDays.xml b/toolkit/components/feeds/test/xml/rss2/feed_skipDays.xml
deleted file mode 100644
index 8c6ffa9e46..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_skipDays.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel skipDays works
-Expect: ((feed.skipDays.queryElementAt(0, Components.interfaces.nsISupportsString) == 'Sunday') && (feed.skipDays.queryElementAt(1, Components.interfaces.nsISupportsString) == 'Monday'))
-
--->
-<rss version="2.0" >
-<channel>
-<skipDays>
- <day>Sunday</day>
- <day>Monday</day>
-</skipDays>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_skipHours.xml b/toolkit/components/feeds/test/xml/rss2/feed_skipHours.xml
deleted file mode 100644
index a20372eda7..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_skipHours.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel skipHours works
-Expect: ((feed.skipHours.queryElementAt(0, Components.interfaces.nsISupportsString) == '0') && (feed.skipHours.queryElementAt(4, Components.interfaces.nsISupportsString) == '23'))
-
--->
-<rss version="2.0" >
-<channel>
-<skipHours>
- <hour>0</hour>
- <hour>1</hour>
- <hour>2</hour>
- <hour>22</hour>
- <hour>23</hour>
-</skipHours>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_subtitle.xml b/toolkit/components/feeds/test/xml/rss2/feed_subtitle.xml
deleted file mode 100644
index a98a3c19ed..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_subtitle.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel description works
-Expect: feed.subtitle.text == 'test'
-
--->
-<rss version="2.0" >
-<channel>
-<description>test</description>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_subtitle_html.xml b/toolkit/components/feeds/test/xml/rss2/feed_subtitle_html.xml
deleted file mode 100644
index fca819d36d..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_subtitle_html.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel description works
-Expect: feed.subtitle.plainText() == '<i><b>test</b></i>'
-
--->
-<rss version="2.0" >
-<channel>
-<description><![CDATA[<i><b>test</b></i>]]></description>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_subtitle_markup_stripped.xml b/toolkit/components/feeds/test/xml/rss2/feed_subtitle_markup_stripped.xml
deleted file mode 100644
index 54f6a623cb..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_subtitle_markup_stripped.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel description markup is not HTML
-Expect: feed.subtitle.plainText() == '<i><b>test</b></i>'
-
--->
-<rss version="2.0" >
-<channel>
-<description><![CDATA[<i><b>test</b></i>]]></description>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_textinput.xml b/toolkit/components/feeds/test/xml/rss2/feed_textinput.xml
deleted file mode 100644
index 4617d62bc0..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_textinput.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel textInput works
-Expect: ((feed.textInput.getProperty('description') == 'Your aggregator supports the textInput element. What software are you using?') && (feed.textInput.getProperty('link') == 'http://www.cadenhead.org/textinput.php') && (feed.textInput.getProperty('name') == 'query') && (feed.textInput.getProperty('title') == 'TextInput Inquiry'))
-
--->
-<rss version="2.0" >
-<channel>
-<textInput>
- <description>Your aggregator supports the textInput element. What software are you using?</description>
- <link>http://www.cadenhead.org/textinput.php</link>
- <name>query</name>
- <title>TextInput Inquiry</title>
-</textInput>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_title.xml b/toolkit/components/feeds/test/xml/rss2/feed_title.xml
deleted file mode 100644
index 1f7d63ad26..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_title.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel title works
-Expect: feed.title.plainText() == 'test title'
-
--->
-<rss version="2.0" >
-<channel>
-<title>test title</title>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_title_cdata_mixed.xml b/toolkit/components/feeds/test/xml/rss2/feed_title_cdata_mixed.xml
deleted file mode 100644
index 19ef62915d..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_title_cdata_mixed.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel title works w/ funky CDATA title
-Expect: feed.title.plainText() == 'test title'
-
--->
-<rss version="2.0" >
-<channel>
-<title>test t<![CDATA[it]]>le</title>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_title_nesting.xml b/toolkit/components/feeds/test/xml/rss2/feed_title_nesting.xml
deleted file mode 100644
index 82492cef74..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_title_nesting.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel title works w/ nested title
-Expect: feed.title.text == 'test title'
-
--->
-<rss version="2.0" >
-<channel>
-<title>test title</title>
-<bogus><title>bogus title</title></bogus>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_ttl.xml b/toolkit/components/feeds/test/xml/rss2/feed_ttl.xml
deleted file mode 100644
index 57158aff4a..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_ttl.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel ttl works
-Expect: feed.fields.getProperty('ttl') == '60'
-
--->
-<rss version="2.0" >
-<channel>
-<ttl>60</ttl>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_updated.xml b/toolkit/components/feeds/test/xml/rss2/feed_updated.xml
deleted file mode 100644
index c9e75e360f..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_updated.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel pubDate works
-Expect: feed.updated == 'Sat, 07 Sep 2002 00:00:01 GMT'
-
--->
-<rss version="2.0" >
-<channel>
-<pubDate>Sat, 07 Sep 2002 00:00:01 GMT</pubDate>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_updated_dcdate.xml b/toolkit/components/feeds/test/xml/rss2/feed_updated_dcdate.xml
deleted file mode 100644
index aa69e7800b..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_updated_dcdate.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel pubDate works
-Expect: feed.updated == 'Sat, 07 Sep 2002 00:00:01 GMT'
-
--->
-<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
-<channel>
-<dc:date>Sat, 07 Sep 2002 00:00:01 GMT</dc:date>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_updated_lastBuildDate.xml b/toolkit/components/feeds/test/xml/rss2/feed_updated_lastBuildDate.xml
deleted file mode 100644
index 2fb24a7ec7..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_updated_lastBuildDate.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel lastBuildDate works
-Expect: feed.updated == 'Sat, 07 Sep 2002 00:00:01 GMT'
-
--->
-<rss version="2.0" >
-<channel>
-<lastBuildDate>Sat, 07 Sep 2002 00:00:01 GMT</lastBuildDate>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_updated_lastBuildDate_priority.xml b/toolkit/components/feeds/test/xml/rss2/feed_updated_lastBuildDate_priority.xml
deleted file mode 100644
index 24f024005b..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_updated_lastBuildDate_priority.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel lastBuildDate trumps pubDate
-Expect: feed.updated == 'Sat, 07 Sep 2002 00:00:01 GMT'
-
--->
-<rss version="2.0" >
-<channel>
-<pubDate>Sun, 08 Sep 2002 00:00:01 GMT</pubDate>
-<lastBuildDate>Sat, 07 Sep 2002 00:00:01 GMT</lastBuildDate>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_webMaster.xml b/toolkit/components/feeds/test/xml/rss2/feed_webMaster.xml
deleted file mode 100644
index 8878949830..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_webMaster.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel webMaster works
-Expect: feed.fields.getProperty('webMaster') == 'example@example.com'
-
--->
-<rss version="2.0" >
-<channel>
-<webMaster>example@example.com</webMaster>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_wfw_commentapi.xml b/toolkit/components/feeds/test/xml/rss2/feed_wfw_commentapi.xml
deleted file mode 100644
index af725064e0..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_wfw_commentapi.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel copyright works
-Expect: feed.fields.getProperty('wfw:comment') == 'http://example.org'
-
--->
-<rss xmlns:wfw="http://wellformedweb.org/CommentAPI/" version="2.0" >
-<channel xmlns:dc="http://purl.org/dc/elements/1.1/">
-<wfw:comment>http://example.org</wfw:comment>
-<copyright>copyright 2006</copyright>
-<dc:creator>me</dc:creator>
-<dc:contributor>them</dc:contributor>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_wfw_commentrss.xml b/toolkit/components/feeds/test/xml/rss2/feed_wfw_commentrss.xml
deleted file mode 100644
index fb1d896091..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_wfw_commentrss.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel copyright works
-Expect: feed.fields.getProperty('wfw:commentRss') == 'http://example.org'
-
--->
-<rss xmlns:wfw="http://wellformedweb.org/CommentAPI/" version="2.0" >
-<channel xmlns:dc="http://purl.org/dc/elements/1.1/">
-<copyright>copyright 2006</copyright>
-<dc:creator>me</dc:creator>
-<wfw:commentRss>http://example.org</wfw:commentRss>
-<dc:contributor>them</dc:contributor>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_wiki.xml b/toolkit/components/feeds/test/xml/rss2/feed_wiki.xml
deleted file mode 100644
index b8cb783b00..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_wiki.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel unusual prefixed ext works
-Expect: feed.fields.getProperty('wiki:version') == '1'
-
--->
-<rss
-xmlns:w='http://purl.org/rss/1.0/modules/wiki/'
-xmlns:wfw="http://wellformedweb.org/CommentAPI/" version="2.0" >
-<channel xmlns:dc="http://purl.org/dc/elements/1.1/">
-<copyright>copyright 2006</copyright>
-<dc:creator>me</dc:creator>
-<w:version>1</w:version>
-<wfw:commentRss>http://example.org</wfw:commentRss>
-<dc:contributor>them</dc:contributor>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/feed_wiki_unusual_prefix.xml b/toolkit/components/feeds/test/xml/rss2/feed_wiki_unusual_prefix.xml
deleted file mode 100644
index b8cb783b00..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/feed_wiki_unusual_prefix.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel unusual prefixed ext works
-Expect: feed.fields.getProperty('wiki:version') == '1'
-
--->
-<rss
-xmlns:w='http://purl.org/rss/1.0/modules/wiki/'
-xmlns:wfw="http://wellformedweb.org/CommentAPI/" version="2.0" >
-<channel xmlns:dc="http://purl.org/dc/elements/1.1/">
-<copyright>copyright 2006</copyright>
-<dc:creator>me</dc:creator>
-<w:version>1</w:version>
-<wfw:commentRss>http://example.org</wfw:commentRss>
-<dc:contributor>them</dc:contributor>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/item_author.xml b/toolkit/components/feeds/test/xml/rss2/item_author.xml
deleted file mode 100644
index ad0c97e2a8..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_author.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item author works
-Expect: var authors = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).authors; var author = authors.queryElementAt(0, Components.interfaces.nsIFeedPerson); ((author.name == 'Joe Bob Briggs'));
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<title>test</title>
-</item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_category.xml b/toolkit/components/feeds/test/xml/rss2/item_category.xml
deleted file mode 100644
index 4795e00bbe..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_category.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item category works
-Expect: var cats = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).fields.getProperty('categories'); cats.QueryInterface(Components.interfaces.nsIArray); var cat = cats.queryElementAt(0, Components.interfaces.nsIPropertyBag); ((cat.getProperty('domain') == 'foo') && (cat.getProperty('term') == 'bar'));
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<title>test</title>
-<category domain="foo">bar</category>
-</item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_comments.xml b/toolkit/components/feeds/test/xml/rss2/item_comments.xml
deleted file mode 100644
index da1cccc821..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_comments.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item comments works
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).fields.getProperty('comments') == 'http://example.org'
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-<title>test</title>
-<!--<author>jbb@dallas.example.com (Joe Bob Briggs)</author>-->
-<comments>http://example.org</comments>
-
-<category domain="foo">bar</category>
-
-</item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_content_encoded.xml b/toolkit/components/feeds/test/xml/rss2/item_content_encoded.xml
deleted file mode 100644
index 6611375b67..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_content_encoded.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item title works
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).content.plainText() == 'foobar'
-
--->
-<rss version="2.0" >
-<channel>
-<item xmlns:c="http://purl.org/rss/1.0/modules/content/">
- <title>test</title>
- <c:encoded>foobar</c:encoded>
-</item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_count.xml b/toolkit/components/feeds/test/xml/rss2/item_count.xml
deleted file mode 100644
index a69cbc9793..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_count.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: items length is correct
-Expect: feed.items.length == 1
-
--->
-<rss version="2.0"
- xmlns:dc="http://purl.org/dc/elements/1.1/">
-
-<channel>
-<title>Items Test</title>
-<link>http://mozilla.org/</link>
-<description></description>
-
-<dc:language>en-us</dc:language>
-<dc:creator>sayrer@gmail.com</dc:creator>
-<dc:date>2005-12-07T14:48:03-05:00</dc:date>
-
-<item>
-<title>Is the date right?</title>
-<link>http://example.org/dc_date.html</link>
-</item>
-
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/item_count2.xml b/toolkit/components/feeds/test/xml/rss2/item_count2.xml
deleted file mode 100644
index 27df0a932f..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_count2.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: items length is correct
-Expect: feed.items.length == 2
-
--->
-<rss version="2.0"
- xmlns:dc="http://purl.org/dc/elements/1.1/">
-
-<channel>
-<title>Items Test</title>
-<link>http://mozilla.org/</link>
-<description></description>
-
-<dc:language>en-us</dc:language>
-<dc:creator>sayrer@gmail.com</dc:creator>
-<dc:date>2005-12-07T14:48:03-05:00</dc:date>
-
-<item>
-<title>Is the date right?</title>
-<link>http://example.org/dc_date.html</link>
-</item>
-<item>
-<title>Is the date right?</title>
-<link>http://example.org/dc_date.html</link>
-</item>
-
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/item_description.xml b/toolkit/components/feeds/test/xml/rss2/item_description.xml
deleted file mode 100644
index 7416d48e6e..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_description.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item desc encoded works
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).summary.text == 'I\'m headed for France. I wasn\'t gonna go this year, but then last week <a href="http://www.imdb.com/title/tt0086525/">Valley Girl</a> came out and I said to myself, Joe Bob, you gotta get out of the country for a while.'
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-<comments>http://example.org</comments>
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<title>test</title>
-<category domain="foo">bar</category>
-
-<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_description_2.xml b/toolkit/components/feeds/test/xml/rss2/item_description_2.xml
deleted file mode 100644
index 427726868f..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_description_2.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item desc encoded works
-Expect: feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).summary.text == 'I\'m headed for France. I wasn\'t gonna go this year, but then last week <a href="http://www.imdb.com/title/tt0086525/">Valley Girl</a> came out and I said to myself, Joe Bob, you gotta get out of the country for a while.'
-
--->
-<rss version="2.0" >
-<channel>
-<item>
- <description>hmmm</description>
-</item>
-<item>
-<comments>http://example.org</comments>
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<title>test</title>
-<category domain="foo">bar</category>
-
-<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_description_cdata.xml b/toolkit/components/feeds/test/xml/rss2/item_description_cdata.xml
deleted file mode 100644
index ef3926f87e..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_description_cdata.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item desc CDATA works
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).summary.text == 'I\'m headed for France. I wasn\'t gonna go this year, but then last week <a href="http://www.imdb.com/title/tt0086525/">Valley Girl</a> came out and I said to myself, Joe Bob, you gotta get out of the country for a while.'
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<comments>http://example.org</comments>
-<title>test</title>
-
-<category domain="foo">bar</category>
-<description><![CDATA[I'm headed for France. I wasn't gonna go this year, but then last week <a href="http://www.imdb.com/title/tt0086525/">Valley Girl</a> came out and I said to myself, Joe Bob, you gotta get out of the country for a while.]]></description>
-</item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_description_decode_entities.xml b/toolkit/components/feeds/test/xml/rss2/item_description_decode_entities.xml
deleted file mode 100644
index e259354dcb..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_description_decode_entities.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Description: item desc encoded, double-escaped entity
-Expect: var summary = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).summary; summary.plainText() == "test D\u00e9sol\u00e9e";
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-<comments>http://example.org</comments>
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<title>test</title>
-<category domain="foo">bar</category>
-
-<description>
- &lt;b>test D&amp;eacute;sol&amp;eacute;e&lt;/b>
-</description>
-</item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_description_normalized.xml b/toolkit/components/feeds/test/xml/rss2/item_description_normalized.xml
deleted file mode 100644
index 9819deb36f..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_description_normalized.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item desc encoded, normalied works
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).summary.text == 'I\'m headed for France. I wasn\'t gonna go this year, but then last week <a href="http://www.imdb.com/title/tt0086525/">Valley Girl</a> came out and I said to myself, Joe Bob, you gotta get out of the country for a while.'
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-<comments>http://example.org</comments>
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<title>test</title>
-<category domain="foo">bar</category>
-
-<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_description_normalized_nohtml.xml b/toolkit/components/feeds/test/xml/rss2/item_description_normalized_nohtml.xml
deleted file mode 100644
index 0a34a008d9..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_description_normalized_nohtml.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item desc encoded, normalized works
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).summary.plainText() == 'I\'m headed for France. I wasn\'t gonna go this year, but then last week Valley Girl came out and I said to myself, Joe Bob, you gotta get out of the country for a while.'
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-<comments>http://example.org</comments>
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<title>test</title>
-<category domain="foo">bar</category>
-
-<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_enclosure.xml b/toolkit/components/feeds/test/xml/rss2/item_enclosure.xml
deleted file mode 100644
index 2e38a370a1..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_enclosure.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item enclosure works
-Expect: var enc = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).fields.getProperty('enclosure'); enc.QueryInterface(Components.interfaces.nsIPropertyBag); ((enc.getProperty('length') == '24986239') && (enc.getProperty('type') == 'audio/mpeg') && (enc.getProperty('url') == 'http://dallas.example.com/joebob_050689.mp3') && (feed.type == 1) && (feed.enclosureCount == 1));
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-
-<enclosure length="24986239" type="audio/mpeg" url="http://dallas.example.com/joebob_050689.mp3" />
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<comments>http://example.org</comments>
-<title>test</title>
-
-<category domain="foo">bar</category>
-
-<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_enclosure_duplicates.xml b/toolkit/components/feeds/test/xml/rss2/item_enclosure_duplicates.xml
deleted file mode 100644
index a9bcd2cc9b..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_enclosure_duplicates.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: feed with duplicate enclosures on a single item
-Expect: ((feed.type == 4) && (feed.enclosureCount == 1));
-
--->
-<rss xmlns:media="http://search.yahoo.com/mrss" version="2.0" >
-<channel>
-
-<item>
-<enclosure length="24986239" type="video/mpeg" url="http://dallas.example.com/joebob_050689.mpeg" />
-<media:content fileSize="24986239" type="video/mpeg" url="http://dallas.example.com/joebob_050689.mpeg" />
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<comments>http://example.org</comments>
-<title>test audio</title>
-
-<category domain="foo">bar</category>
-
-<description>Listen to the words that are coming out of my mouth.</description>
-</item>
-
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_enclosure_duplicates2.xml b/toolkit/components/feeds/test/xml/rss2/item_enclosure_duplicates2.xml
deleted file mode 100644
index 51f7caba9c..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_enclosure_duplicates2.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: feed with duplicate enclosures on a single item with different data available
-Expect: var enc = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).fields.getProperty('enclosure'); enc.QueryInterface(Components.interfaces.nsIPropertyBag); ((enc.getProperty('length') == '24986239') && (enc.getProperty('type') == 'video/mpeg') && (feed.type == 4) && (feed.enclosureCount == 1) );
-
--->
-<rss xmlns:media="http://search.yahoo.com/mrss" version="2.0" >
-<channel>
-
-<item>
-<enclosure url="http://dallas.example.com/joebob_050689.mpeg" />
-<media:content fileSize="24986239" type="video/mpeg" url="http://dallas.example.com/joebob_050689.mpeg" />
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<comments>http://example.org</comments>
-<title>test audio</title>
-
-<category domain="foo">bar</category>
-
-<description>Listen to the words that are coming out of my mouth.</description>
-</item>
-
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_enclosure_mixed.xml b/toolkit/components/feeds/test/xml/rss2/item_enclosure_mixed.xml
deleted file mode 100644
index 7b49e4d742..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_enclosure_mixed.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: feed with different kinds of enclosures that should be TYPE_FEED (0)
-Expect: ((feed.type == 0) && (feed.enclosureCount == 2));
-
--->
-<rss version="2.0" >
-<channel>
-
-<item>
-<enclosure length="24986239" type="audio/mpeg" url="http://dallas.example.com/joebob_050689.mp3" />
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<comments>http://example.org</comments>
-<title>test audio</title>
-
-<category domain="foo">bar</category>
-
-<description>Listen to the words that are coming out of my mouth.</description>
-</item>
-
-<item>
-<enclosure length="3000000" type="video/mpeg" url="http://dallas.example.com/joebob_pants.mpeg" />
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<comments>http://example.org</comments>
-<title>test video</title>
-
-<category domain="foo">bar</category>
-
-<description>Look into my eyes....</description>
-</item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_enclosure_mixed2.xml b/toolkit/components/feeds/test/xml/rss2/item_enclosure_mixed2.xml
deleted file mode 100644
index a54a40559f..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_enclosure_mixed2.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: feed that doesn't have at least one enclosure per entry should be TYPE_FEED (0)
-Expect: ((feed.type == 0) && (feed.enclosureCount == 1));
-
--->
-<rss version="2.0" >
-<channel>
-
-<item>
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<comments>http://example.org</comments>
-<title>no video this week!</title>
-
-<category domain="foo">bar</category>
-
-<description>I'm on a trip to the moon this week for this year's Spaceshot Vlogger
-conference. No video this week!</description>
-</item>
-
-<item>
-<enclosure length="3000000" type="video/mpeg" url="http://dallas.example.com/joebob_pants.mpeg" />
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<comments>http://example.org</comments>
-<title>orange keyboard</title>
-
-<category domain="foo">bar</category>
-
-<description>Crazy things happen when you paint your keyboard orange.</description>
-</item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_guid.xml b/toolkit/components/feeds/test/xml/rss2/item_guid.xml
deleted file mode 100644
index 2e7f551ef5..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_guid.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item guid works
-Expect: var guid = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).fields.getProperty('guid'); guid.QueryInterface(Components.interfaces.nsIPropertyBag2); guid.getProperty('guid') == 'asdf';
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-
-<enclosure length="24986239" type="audio/mpeg" url="http://dallas.example.com/joebob_050689.mp3" />
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<comments>http://example.org</comments>
-<title>test</title>
-<guid>asdf</guid>
-<category domain="foo">bar</category>
-
-<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/item_guid_bogus_url.xml b/toolkit/components/feeds/test/xml/rss2/item_guid_bogus_url.xml
deleted file mode 100644
index 2f1b67cedf..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_guid_bogus_url.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item copes with bogus guid
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link == null;
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-
-<enclosure length="24986239" type="audio/mpeg" url="http://dallas.example.com/joebob_050689.mp3" />
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<comments>http://example.org</comments>
-<title>test</title>
-<guid isPermaLink="true">xorg</guid>
-<category domain="foo">bar</category>
-
-<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink.xml b/toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink.xml
deleted file mode 100644
index c64341427c..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item guid works
-Expect: var link = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link; link.spec == 'http://www.example.org/';
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-
-<enclosure length="24986239" type="audio/mpeg" url="http://dallas.example.com/joebob_050689.mp3" />
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<title>test</title>
-<guid isPermaLink="true">http://www.example.org/</guid>
-<category domain="foo">bar</category>
-
-<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink_default.xml b/toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink_default.xml
deleted file mode 100644
index 7d6ae79584..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink_default.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item guid works
-Expect: var link = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link; link.spec == 'http://www.example.org/';
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-
-<enclosure length="24986239" type="audio/mpeg" url="http://dallas.example.com/joebob_050689.mp3" />
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<title>test</title>
-<guid>http://www.example.org/</guid>
-<category domain="foo">bar</category>
-
-<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink_false.xml b/toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink_false.xml
deleted file mode 100644
index c2a1ad867d..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink_false.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item guid should not map to link when isPermaLink=false
-Expect: var link = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link; link == null;
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-
-<enclosure length="24986239" type="audio/mpeg" url="http://dallas.example.com/joebob_050689.mp3" />
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<title>test</title>
-<guid isPermaLink="false">http://www.example.org/</guid>
-<category domain="foo">bar</category>
-
-<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink_false_uppercase.xml b/toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink_false_uppercase.xml
deleted file mode 100644
index 9ff2505c48..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink_false_uppercase.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item guid should not map to link when isPermaLink=FaLsE
-Expect: var link = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link; link == null;
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-
-<enclosure length="24986239" type="audio/mpeg" url="http://dallas.example.com/joebob_050689.mp3" />
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<title>test</title>
-<guid isPermaLink="FaLsE">http://www.example.org/</guid>
-<category domain="foo">bar</category>
-
-<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink_true_uppercase.xml b/toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink_true_uppercase.xml
deleted file mode 100644
index bc4fdc0e94..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink_true_uppercase.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item guid should map to link when isPermaLink=TrUe
-Expect: var link = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link; link.spec == "http://www.example.org/";
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-
-<enclosure length="24986239" type="audio/mpeg" url="http://dallas.example.com/joebob_050689.mp3" />
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<title>test</title>
-<guid isPermaLink="TrUe">http://www.example.org/</guid>
-<category domain="foo">bar</category>
-
-<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink_unknown_value.xml b/toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink_unknown_value.xml
deleted file mode 100644
index 4dce8c390f..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_guid_isPermaLink_unknown_value.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item guid should map to link when isPermaLink=meatcake or other unknown values
-Expect: var link = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link; link.spec == "http://www.example.org/";
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-
-<enclosure length="24986239" type="audio/mpeg" url="http://dallas.example.com/joebob_050689.mp3" />
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<title>test</title>
-<guid isPermaLink="meatcake">http://www.example.org/</guid>
-<category domain="foo">bar</category>
-
-<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_guid_normalized.xml b/toolkit/components/feeds/test/xml/rss2/item_guid_normalized.xml
deleted file mode 100644
index e4ac978620..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_guid_normalized.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item guid works
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).id == 'asdf';
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-
-<enclosure length="24986239" type="audio/mpeg" url="http://dallas.example.com/joebob_050689.mp3" />
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<comments>http://example.org</comments>
-<title>test</title>
-<guid>asdf</guid>
-<category domain="foo">bar</category>
-
-<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_guid_with_link.xml b/toolkit/components/feeds/test/xml/rss2/item_guid_with_link.xml
deleted file mode 100644
index d2d3daca57..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_guid_with_link.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item prefers link to guid
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link.spec == 'http://link.example.org/';
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-
-<enclosure length="24986239" type="audio/mpeg" url="http://dallas.example.com/joebob_050689.mp3" />
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<comments>http://example.org</comments>
-<title>test</title>
-<guid isPermaLink="true">http://www.example.org</guid>
-<link>http://link.example.org/</link>
-<category domain="foo">bar</category>
-
-<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_link.xml b/toolkit/components/feeds/test/xml/rss2/item_link.xml
deleted file mode 100644
index c89f71e776..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_link.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item comments works
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).fields.getProperty('link') == 'http://dallas.example.com/1983/05/06/joebob.htm'
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-<title>test</title>
-<!--<author>jbb@dallas.example.com (Joe Bob Briggs)</author>-->
-<comments>http://example.org</comments>
-<link>http://dallas.example.com/1983/05/06/joebob.htm</link>
-<category domain="foo">bar</category>
-
-</item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_link_normalized.xml b/toolkit/components/feeds/test/xml/rss2/item_link_normalized.xml
deleted file mode 100644
index 876d7613cf..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_link_normalized.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item link normalized works
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).link.spec == 'http://dallas.example.com/1983/05/06/joebob.htm'
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-<title>test</title>
-<!--<author>jbb@dallas.example.com (Joe Bob Briggs)</author>-->
-<comments>http://example.org</comments>
-<link>http://dallas.example.com/1983/05/06/joebob.htm</link>
-<category domain="foo">bar</category>
-
-</item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_plain_desc.xml b/toolkit/components/feeds/test/xml/rss2/item_plain_desc.xml
deleted file mode 100644
index ffb4226f12..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_plain_desc.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item desc plain text works
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).summary.text == "I'm headed for France. I wasn't gonna go this year, but then last week \"Valley Girl\" came out and I said to myself, Joe Bob, you gotta get out of the country for a while."
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<comments>http://example.org</comments>
-<title>test</title>
-
-<category domain="foo">bar</category>
-<description>I'm headed for France. I wasn't gonna go this year, but then last week "Valley Girl" came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_populated_enclosures.xml b/toolkit/components/feeds/test/xml/rss2/item_populated_enclosures.xml
deleted file mode 100644
index 0a7d60df69..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_populated_enclosures.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item enclosure is added to enclosures array
-Expect: var encs = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).enclosures; encs.QueryInterface(Components.interfaces.nsIArray); var enc = encs.queryElementAt(0, Components.interfaces.nsIPropertyBag2); ((enc.getProperty('length') == '24986239') && (enc.getProperty('type') == 'audio/mpeg') && (enc.getProperty('url') == 'http://dallas.example.com/joebob_050689.mp3'));
-
--->
-<rss version="2.0" >
-<channel>
-<item>
-
-<enclosure length="24986239" type="audio/mpeg" url="http://dallas.example.com/joebob_050689.mp3" />
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<comments>http://example.org</comments>
-<title>test</title>
-
-<category domain="foo">bar</category>
-
-<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_pubDate.xml b/toolkit/components/feeds/test/xml/rss2/item_pubDate.xml
deleted file mode 100644
index acb4abdcca..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_pubDate.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: entry pubDate works
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).published == 'Tue, 02 Sep 2003 00:00:01 GMT'
-
--->
-<rss version="2.0" xmlns:dcterms="http://purl.org/dc/terms/">
-<channel>
-<item>
-<pubDate>Tue, 02 Sep 2003 00:00:01 GMT</pubDate>
-</item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_published.xml b/toolkit/components/feeds/test/xml/rss2/item_published.xml
deleted file mode 100644
index 86bf556027..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_published.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: entry published works
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).published == 'Sat, 07 Sep 2002 00:00:01 GMT'
-
--->
-<rss version="2.0" xmlns:dcterms="http://purl.org/dc/terms/">
-<channel>
-<item>
-<dcterms:issued>Sat, 07 Sep 2002 00:00:01 GMT</dcterms:issued>
-</item>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/item_title.xml b/toolkit/components/feeds/test/xml/rss2/item_title.xml
deleted file mode 100644
index 0126d7da09..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_title.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item title works
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).fields.getProperty('title') == 'test'
-
--->
-<rss version="2.0" >
-<channel>
-<item>
- <title>test</title>
-</item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_title_normalized.xml b/toolkit/components/feeds/test/xml/rss2/item_title_normalized.xml
deleted file mode 100644
index 51de0f7e23..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_title_normalized.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: item title works
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).title.text == 'test'
-
--->
-<rss version="2.0" >
-<channel>
-<item>
- <title>test</title>
-</item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/item_updated_dcdate.xml b/toolkit/components/feeds/test/xml/rss2/item_updated_dcdate.xml
deleted file mode 100644
index dc20cdbc0d..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/item_updated_dcdate.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: channel pubDate works
-Expect: feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).updated == 'Sat, 07 Sep 2002 00:00:01 GMT'
-
--->
-<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
-<channel>
-<item>
-<dc:date>Sat, 07 Sep 2002 00:00:01 GMT</dc:date>
-</item>
-</channel>
-</rss> \ No newline at end of file
diff --git a/toolkit/components/feeds/test/xml/rss2/items_2_titles.xml b/toolkit/components/feeds/test/xml/rss2/items_2_titles.xml
deleted file mode 100644
index 3a0d1eb67b..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/items_2_titles.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: 2 items title works
-Expect: ((feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).title.text == 'test') && (feed.items.queryElementAt(1, Components.interfaces.nsIFeedEntry).title.text == 'test #2'))
-
--->
-<rss version="2.0" >
-<channel>
-<item>
- <title>test</title>
-</item>
-<item>
- <title>test #2</title>
-</item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/mrss_content.xml b/toolkit/components/feeds/test/xml/rss2/mrss_content.xml
deleted file mode 100644
index 62a47cdef0..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/mrss_content.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: mrss content works
-Expect: var enc = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).fields.getPropertyAsInterface('mediacontent', Components.interfaces.nsIArray).queryElementAt(0, Components.interfaces.nsIPropertyBag); Assert.equal(enc.getProperty('fileSize'), '24986239', 'file size is correct'); Assert.equal(enc.getProperty('type'), 'video/mpeg', 'type is correct'); Assert.equal(enc.getProperty('url'), 'http://dallas.example.com/joebob_050689.mpeg', 'url is correct'); Assert.equal(feed.type, 4, 'Feed type is correct'); Assert.equal(feed.enclosureCount,1, 'Enclosure count is correct'); true;
-
--->
-<rss xmlns:media="http://search.yahoo.com/mrss" version="2.0" >
-<channel>
-<item>
-
-<media:content fileSize="24986239" type="video/mpeg" url="http://dallas.example.com/joebob_050689.mpeg" />
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<comments>http://example.org</comments>
-<title>test</title>
-
-<category domain="foo">bar</category>
-
-<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/mrss_content2.xml b/toolkit/components/feeds/test/xml/rss2/mrss_content2.xml
deleted file mode 100644
index a0d740e699..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/mrss_content2.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: mrss content with a thumbnail
-Expect: var enc = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).fields.getPropertyAsInterface('mediacontent', Components.interfaces.nsIArray).queryElementAt(0, Components.interfaces.nsIPropertyBag); Assert.equal(enc.getProperty('fileSize'), '24986239', 'file size is correct'); Assert.equal(enc.getProperty('type'), 'video/mpeg', 'type is correct'); Assert.equal(enc.getProperty('url'), 'http://dallas.example.com/joebob_050689.mpeg', 'url is correct'); Assert.equal(feed.type, 0, 'Feed type is correct'); Assert.equal(feed.enclosureCount,2, 'Enclosure count is correct'); true;
-
--->
-<rss xmlns:media="http://search.yahoo.com/mrss" version="2.0" >
-<channel>
-<item>
-
-<media:content fileSize="24986239" type="video/mpeg" url="http://dallas.example.com/joebob_050689.mpeg" />
-<media:thumbnail url="http://dallas.example.com/joebob_050689.jpg" width="75" height="50"/>
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<comments>http://example.org</comments>
-<title>test</title>
-
-<category domain="foo">bar</category>
-
-<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/mrss_content_429049.xml b/toolkit/components/feeds/test/xml/rss2/mrss_content_429049.xml
deleted file mode 100644
index d13efc94c5..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/mrss_content_429049.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: this tests bug 429049. the item with a valid url is added to the enclosures array and the item with an empty url does not.
-Expect: var encs = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).enclosures; encs.QueryInterface(Components.interfaces.nsIArray); (encs.length == 1);
-
--->
-<rss xmlns:media="http://search.yahoo.com/mrss" version="2.0" >
-<channel>
-
-<item>
-<media:content fileSize="24986239" type="audio/mpeg" url="http://dallas.example.com/joebob_050689.mp3" />
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<comments>http://example.org</comments>
-<title>test</title>
-
-<category domain="foo">bar</category>
-<description>no description</description>
-</item>
-
-<item>
-<media:content url="" height="" width=""></media:content>
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<comments>http://example.org</comments>
-<title>test empty</title>
-
-<category domain="foo">bar</category>
-<description>no description</description>
-</item>
-
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/mrss_content_multiple.xml b/toolkit/components/feeds/test/xml/rss2/mrss_content_multiple.xml
deleted file mode 100644
index c391efdd2e..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/mrss_content_multiple.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: mrss content with multiple media:content items works
-Expect: var mcs = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).fields.getProperty('mediacontent'); mcs.QueryInterface(Components.interfaces.nsIArray); var enc1 = mcs.queryElementAt(0, Components.interfaces.nsIPropertyBag); var enc2 = mcs.queryElementAt(1, Components.interfaces.nsIPropertyBag); ((enc1.getProperty('fileSize') == '24986239') && (enc1.getProperty('type') == 'video/mpeg') && (enc1.getProperty('url') == 'http://dallas.example.com/joebob_1.mpeg') && (enc2.getProperty('fileSize') == '30000000') && (enc2.getProperty('type') == 'video/mpeg') && (enc2.getProperty('url') == 'http://dallas.example.com/joebob_2.mpeg') && (feed.type == 4) && (feed.enclosureCount == 2));
-
--->
-<rss xmlns:media="http://search.yahoo.com/mrss" version="2.0" >
-<channel>
-<item>
-
-<media:content fileSize="24986239" type="video/mpeg" url="http://dallas.example.com/joebob_1.mpeg" />
-<media:content fileSize="30000000" type="video/mpeg" url="http://dallas.example.com/joebob_2.mpeg" />
-
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<comments>http://example.org</comments>
-<title>test</title>
-
-<category domain="foo">bar</category>
-
-<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while. Two videos of that.</description></item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/mrss_content_populate_enclosure.xml b/toolkit/components/feeds/test/xml/rss2/mrss_content_populate_enclosure.xml
deleted file mode 100644
index f0718655fb..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/mrss_content_populate_enclosure.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: mrss content added to enclosures array
-Expect: var encs = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).enclosures; encs.QueryInterface(Components.interfaces.nsIArray); var enc = encs.queryElementAt(0, Components.interfaces.nsIPropertyBag); ((enc.getProperty('length') == '24986239') && (enc.getProperty('type') == 'audio/mpeg') && (enc.getProperty('url') == 'http://dallas.example.com/joebob_050689.mp3') && (feed.type == 1) && (feed.enclosureCount == 1));
-
--->
-<rss xmlns:media="http://search.yahoo.com/mrss" version="2.0" >
-<channel>
-<item>
-
-<media:content fileSize="24986239" type="audio/mpeg" url="http://dallas.example.com/joebob_050689.mp3" />
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<comments>http://example.org</comments>
-<title>test</title>
-
-<category domain="foo">bar</category>
-
-<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/mrss_group_content.xml b/toolkit/components/feeds/test/xml/rss2/mrss_group_content.xml
deleted file mode 100644
index da2ddb29c6..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/mrss_group_content.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: mrss group content works
-Expect: var mg = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).fields.getProperty('mediagroup'); mg.QueryInterface(Components.interfaces.nsIPropertyBag); var mcs = mg.getProperty("mediacontent"); mcs.QueryInterface(Components.interfaces.nsIArray); var mc1 = mcs.queryElementAt(0, Components.interfaces.nsIPropertyBag); var mc2 = mcs.queryElementAt(1, Components.interfaces.nsIPropertyBag); ((mc1.getProperty('fileSize') == '400') && (mc1.getProperty('type') == 'audio/mpeg') && (mc1.getProperty('url') == 'http://dallas.example.com/joebob_050689_2.mp3') && (mc2.getProperty('fileSize') == '200') && (mc2.getProperty('type') == 'audio/mpeg') && (mc2.getProperty('url') == 'http://dallas.example.com/joebob_050689_1.mp3'));
-
--->
-<rss xmlns:media="http://search.yahoo.com/mrss" version="2.0" >
-<channel>
-<item>
-
-<media:group>
- <media:content fileSize="400" type="audio/mpeg" url="http://dallas.example.com/joebob_050689_2.mp3" />
- <media:content fileSize="200" type="audio/mpeg" url="http://dallas.example.com/joebob_050689_1.mp3" />
-</media:group>
-
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<comments>http://example.org</comments>
-<title>test</title>
-
-<category domain="foo">bar</category>
-
-<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
-
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xml/rss2/mrss_group_content_populate_enclosure.xml b/toolkit/components/feeds/test/xml/rss2/mrss_group_content_populate_enclosure.xml
deleted file mode 100644
index f7b9ebabfc..0000000000
--- a/toolkit/components/feeds/test/xml/rss2/mrss_group_content_populate_enclosure.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-
-Description: mrss group content works
-Expect: var encs = feed.items.queryElementAt(0, Components.interfaces.nsIFeedEntry).enclosures; encs.QueryInterface(Components.interfaces.nsIArray); var enc1 = encs.queryElementAt(0, Components.interfaces.nsIPropertyBag); var enc2 = encs.queryElementAt(1, Components.interfaces.nsIPropertyBag); ((enc1.getProperty('length') == '400') && (enc1.getProperty('type') == 'audio/mpeg') && (enc1.getProperty('url') == 'http://dallas.example.com/joebob_050689_2.mp3') && (enc2.getProperty('length') == '200') && (enc2.getProperty('type') == 'audio/mpeg') && (enc2.getProperty('url') == 'http://dallas.example.com/joebob_050689_1.mp3'));
-
-
--->
-<rss xmlns:media="http://search.yahoo.com/mrss" version="2.0" >
-<channel>
-<item>
-
-<media:group>
- <media:content fileSize="400" type="audio/mpeg" url="http://dallas.example.com/joebob_050689_2.mp3" />
- <media:content fileSize="200" type="audio/mpeg" url="http://dallas.example.com/joebob_050689_1.mp3" />
-</media:group>
-
-<author>jbb@dallas.example.com (Joe Bob Briggs)</author>
-<comments>http://example.org</comments>
-<title>test</title>
-
-<category domain="foo">bar</category>
-
-<description>I'm headed for France. I wasn't gonna go this year, but then last week &lt;a href="http://www.imdb.com/title/tt0086525/"&gt;Valley Girl&lt;/a&gt; came out and I said to myself, Joe Bob, you gotta get out of the country for a while.</description></item>
-</channel>
-</rss>
diff --git a/toolkit/components/feeds/test/xpcshell.ini b/toolkit/components/feeds/test/xpcshell.ini
deleted file mode 100644
index fbed5e559f..0000000000
--- a/toolkit/components/feeds/test/xpcshell.ini
+++ /dev/null
@@ -1,209 +0,0 @@
-[DEFAULT]
-head = head.js
-tail =
-skip-if = toolkit == 'android'
-support-files =
- xml/rfc4287/author_namespaces.xml
- xml/rfc4287/entry_link_IANA.xml
- xml/rfc4287/feed_author_email_2.xml
- xml/rfc4287/feed_logo.xml
- xml/rfc4287/entry_author.xml
- xml/rfc4287/entry_link_otherURI_alt.xml
- xml/rfc4287/feed_author_email.xml
- xml/rfc4287/feed_random_attributes_on_feed_and_entry.xml
- xml/rfc4287/entry_content_encoded.xml
- xml/rfc4287/entry_link_payment_alt.xml
- xml/rfc4287/feed_author_name.xml
- xml/rfc4287/feed_rights_normalized.xml
- xml/rfc4287/entry_content_html.xml
- xml/rfc4287/entry_link_random.xml
- xml/rfc4287/feed_author_surrounded.xml
- xml/rfc4287/feed_rights_xhtml_nested_divs.xml
- xml/rfc4287/entry_content_xhtml_with_markup.xml
- xml/rfc4287/entry_published.xml
- xml/rfc4287/feed_author_uri.xml
- xml/rfc4287/feed_rights_xhtml.xml
- xml/rfc4287/entry_content_xhtml.xml
- xml/rfc4287/entry_rights_normalized.xml
- xml/rfc4287/feed_author.xml
- xml/rfc4287/feed_subtitle.xml
- xml/rfc4287/entry_content.xml
- xml/rfc4287/entry_summary.xml
- xml/rfc4287/feed_comment_rss_extra_att.xml
- xml/rfc4287/feed_tantek_title.xml
- xml/rfc4287/entry_contributor.xml
- xml/rfc4287/entry_title_normalized.xml
- xml/rfc4287/feed_contributor.xml
- xml/rfc4287/feed_title_full_feed.xml
- xml/rfc4287/entry_html_cdata.xml
- xml/rfc4287/entry_title.xml
- xml/rfc4287/feed_entry_count.xml
- xml/rfc4287/feed_title_xhtml_entities.xml
- xml/rfc4287/entry_id.xml
- xml/rfc4287/entry_updated.xml
- xml/rfc4287/feed_generator_uri.xml
- xml/rfc4287/feed_title_xhtml.xml
- xml/rfc4287/entry_link_2alts_allcore2.xml
- xml/rfc4287/entry_w_content_encoded.xml
- xml/rfc4287/feed_generator_uri_xmlbase.xml
- xml/rfc4287/feed_title.xml
- xml/rfc4287/entry_link_2alts_allcore.xml
- xml/rfc4287/entry_xhtml_baseURI_with_amp.xml
- xml/rfc4287/feed_generator_version.xml
- xml/rfc4287/feed_updated_invalid.xml
- xml/rfc4287/entry_link_2alts.xml
- xml/rfc4287/entry_xmlBase_on_link.xml
- xml/rfc4287/feed_generator.xml
- xml/rfc4287/feed_updated_normalized.xml
- xml/rfc4287/entry_link_alt_extension.xml
- xml/rfc4287/entry_xmlBase.xml
- xml/rfc4287/feed_icon.xml
- xml/rfc4287/feed_updated.xml
- xml/rfc4287/entry_link_enclosure_populate_enclosures.xml
- xml/rfc4287/feed_atom_rights_xhtml.xml
- xml/rfc4287/feed_id_extra_att.xml
- xml/rfc4287/feed_version.xml
- xml/rfc4287/entry_link_enclosure.xml
- xml/rfc4287/feed_author2.xml
- xml/rfc4287/feed_id.xml
- xml/rfc4287/feed_xmlBase.xml
- xml/rss09x/rss090.xml
- xml/rss09x/rss091_withNS.xml
- xml/rss09x/rss091.xml
- xml/rss09x/rss092.xml
- xml/rss09x/rss093.xml
- xml/rss09x/rss094.xml
- xml/rss09x/rssUnknown.xml
- xml/rss1/feed_bogus_title.xml
- xml/rss1/feed_description_normalized.xml
- xml/rss1/feed_description_with_dc_only.xml
- xml/rss1/feed_description_with_dc.xml
- xml/rss1/feed_description.xml
- xml/rss1/feed_generator.xml
- xml/rss1/feed_id.xml
- xml/rss1/feed_image.xml
- xml/rss1/feed_items_length_zero.xml
- xml/rss1/feed_link_normalized.xml
- xml/rss1/feed_link.xml
- xml/rss1/feed_textInput.xml
- xml/rss1/feed_title_extra_att.xml
- xml/rss1/feed_title_normalized.xml
- xml/rss1/feed_title.xml
- xml/rss1/feed_updated_dctermsmodified.xml
- xml/rss1/feed_updated.xml
- xml/rss1/feed_version.xml
- xml/rss1/full_feed_not_bozo.xml
- xml/rss1/full_feed_unknown_extension.xml
- xml/rss1/full_feed.xml
- xml/rss1/item_2_dc_description.xml
- xml/rss1/item_2_dc_publisher_extra_att_invalid_rdf.xml
- xml/rss1/item_2_dc_publisher.xml
- xml/rss1/item_count.xml
- xml/rss1/item_dc_creator.xml
- xml/rss1/item_dc_description_normalized.xml
- xml/rss1/item_dc_description.xml
- xml/rss1/item_description.xml
- xml/rss1/item_id.xml
- xml/rss1/item_link_normalized.xml
- xml/rss1/item_link.xml
- xml/rss1/item_title_normalized.xml
- xml/rss1/item_title.xml
- xml/rss1/item_updated_dcterms.xml
- xml/rss1/item_wiki_importance_extra_att.xml
- xml/rss2/feed_category_count.xml
- xml/rss2/feed_category.xml
- xml/rss2/feed_cloud.xml
- xml/rss2/feed_copyright_linebreak.xml
- xml/rss2/feed_copyright.xml
- xml/rss2/feed_data_outside_channel.xml
- xml/rss2/feed_dc_contributor.xml
- xml/rss2/feed_dc_creator.xml
- xml/rss2/feed_description_html_cdata.xml
- xml/rss2/feed_description_html.xml
- xml/rss2/feed_description.xml
- xml/rss2/feed_docs.xml
- xml/rss2/feed_generator.xml
- xml/rss2/feed_image_desc_width_height.xml
- xml/rss2/feed_image_desc.xml
- xml/rss2/feed_image_required.xml
- xml/rss2/feed_language.xml
- xml/rss2/feed_lastBuildDate.xml
- xml/rss2/feed_linebreak_link.xml
- xml/rss2/feed_link_cdata.xml
- xml/rss2/feed_link.xml
- xml/rss2/feed_managingEditor_extra_att.xml
- xml/rss2/feed_managingEditor.xml
- xml/rss2/feed_multiple_categories.xml
- xml/rss2/feed_pubDate_invalid.xml
- xml/rss2/feed_pubDate_nonRFC822_1.xml
- xml/rss2/feed_pubDate_nonRFC822_2.xml
- xml/rss2/feed_pubDate_timezoneZ.xml
- xml/rss2/feed_pubDate_utc.xml
- xml/rss2/feed_pubDate.xml
- xml/rss2/feed_rating.xml
- xml/rss2/feed_single_quote_stylesheet_pi.xml
- xml/rss2/feed_skipDays.xml
- xml/rss2/feed_skipHours.xml
- xml/rss2/feed_subtitle_html.xml
- xml/rss2/feed_subtitle_markup_stripped.xml
- xml/rss2/feed_subtitle.xml
- xml/rss2/feed_textinput.xml
- xml/rss2/feed_title_cdata_mixed.xml
- xml/rss2/feed_title_nesting.xml
- xml/rss2/feed_title.xml
- xml/rss2/feed_ttl.xml
- xml/rss2/feed_updated_dcdate.xml
- xml/rss2/feed_updated_lastBuildDate_priority.xml
- xml/rss2/feed_updated_lastBuildDate.xml
- xml/rss2/feed_updated.xml
- xml/rss2/feed_webMaster.xml
- xml/rss2/feed_wfw_commentapi.xml
- xml/rss2/feed_wfw_commentrss.xml
- xml/rss2/feed_wiki_unusual_prefix.xml
- xml/rss2/feed_wiki.xml
- xml/rss2/item_author.xml
- xml/rss2/item_category.xml
- xml/rss2/item_comments.xml
- xml/rss2/item_content_encoded.xml
- xml/rss2/item_count2.xml
- xml/rss2/item_count.xml
- xml/rss2/item_description_2.xml
- xml/rss2/item_description_cdata.xml
- xml/rss2/item_description_decode_entities.xml
- xml/rss2/item_description_normalized_nohtml.xml
- xml/rss2/item_description_normalized.xml
- xml/rss2/item_description.xml
- xml/rss2/item_enclosure_duplicates2.xml
- xml/rss2/item_enclosure_duplicates.xml
- xml/rss2/item_enclosure_mixed2.xml
- xml/rss2/item_enclosure_mixed.xml
- xml/rss2/item_enclosure.xml
- xml/rss2/item_guid_bogus_url.xml
- xml/rss2/item_guid_isPermaLink_default.xml
- xml/rss2/item_guid_isPermaLink_false_uppercase.xml
- xml/rss2/item_guid_isPermaLink_false.xml
- xml/rss2/item_guid_isPermaLink_true_uppercase.xml
- xml/rss2/item_guid_isPermaLink_unknown_value.xml
- xml/rss2/item_guid_isPermaLink.xml
- xml/rss2/item_guid_normalized.xml
- xml/rss2/item_guid_with_link.xml
- xml/rss2/item_guid.xml
- xml/rss2/item_link_normalized.xml
- xml/rss2/item_link.xml
- xml/rss2/item_plain_desc.xml
- xml/rss2/item_populated_enclosures.xml
- xml/rss2/item_pubDate.xml
- xml/rss2/item_published.xml
- xml/rss2/items_2_titles.xml
- xml/rss2/item_title_normalized.xml
- xml/rss2/item_title.xml
- xml/rss2/item_updated_dcdate.xml
- xml/rss2/mrss_content_429049.xml
- xml/rss2/mrss_content_multiple.xml
- xml/rss2/mrss_content_populate_enclosure.xml
- xml/rss2/mrss_content.xml
- xml/rss2/mrss_content2.xml
- xml/rss2/mrss_group_content_populate_enclosure.xml
- xml/rss2/mrss_group_content.xml
-
-[test_xml.js]
diff --git a/toolkit/components/filepicker/moz.build b/toolkit/components/filepicker/moz.build
index 0990cb00fd..9619120687 100644
--- a/toolkit/components/filepicker/moz.build
+++ b/toolkit/components/filepicker/moz.build
@@ -4,22 +4,16 @@
# 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/.
+XPIDL_SOURCES += ['nsIFileView.idl']
+
XPIDL_MODULE = 'filepicker'
-XPIDL_SOURCES += [
- 'nsIFileView.idl',
-]
-SOURCES += [
- 'nsFileView.cpp',
-]
-EXTRA_COMPONENTS += [
- 'nsFilePicker.js',
-]
-EXTRA_PP_COMPONENTS += [
- 'nsFilePicker.manifest',
-]
-XPCSHELL_TESTS_MANIFESTS += [
- 'test/unit/xpcshell.ini',
-]
+
+SOURCES += ['nsFileView.cpp']
+
+EXTRA_COMPONENTS += ['nsFilePicker.js']
+
+EXTRA_PP_COMPONENTS += ['nsFilePicker.manifest']
+
FINAL_LIBRARY = 'xul'
JAR_MANIFESTS += ['jar.mn']
diff --git a/toolkit/components/filepicker/test/unit/.eslintrc.js b/toolkit/components/filepicker/test/unit/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/filepicker/test/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/filepicker/test/unit/test_filecomplete.js b/toolkit/components/filepicker/test/unit/test_filecomplete.js
deleted file mode 100644
index d1e18d5337..0000000000
--- a/toolkit/components/filepicker/test/unit/test_filecomplete.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/* 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/. */
-
-// Start by getting an empty directory.
-var dir = do_get_profile();
-dir.append("temp");
-dir.create(dir.DIRECTORY_TYPE, -1);
-var path = dir.path + "/";
-
-// Now create some sample entries.
-var file = dir.clone();
-file.append("test_file");
-file.create(file.NORMAL_FILE_TYPE, -1);
-file = dir.clone();
-file.append("other_file");
-file.create(file.NORMAL_FILE_TYPE, -1);
-dir.append("test_dir");
-dir.create(dir.DIRECTORY_TYPE, -1);
-
-var gListener = {
- onSearchResult: function(aSearch, aResult) {
- // Check that we got same search string back.
- do_check_eq(aResult.searchString, "test");
- // Check that the search succeeded.
- do_check_eq(aResult.searchResult, aResult.RESULT_SUCCESS);
- // Check that we got two results.
- do_check_eq(aResult.matchCount, 2);
- // Check that the first result is the directory we created.
- do_check_eq(aResult.getValueAt(0), "test_dir");
- // Check that the first result has directory style.
- do_check_eq(aResult.getStyleAt(0), "directory");
- // Check that the second result is the file we created.
- do_check_eq(aResult.getValueAt(1), "test_file");
- // Check that the second result has file style.
- do_check_eq(aResult.getStyleAt(1), "file");
- }
-};
-
-function run_test()
-{
- Components.classes["@mozilla.org/autocomplete/search;1?name=file"]
- .getService(Components.interfaces.nsIAutoCompleteSearch)
- .startSearch("test", path, null, gListener);
-}
diff --git a/toolkit/components/filepicker/test/unit/xpcshell.ini b/toolkit/components/filepicker/test/unit/xpcshell.ini
deleted file mode 100644
index 1a0a002dc9..0000000000
--- a/toolkit/components/filepicker/test/unit/xpcshell.ini
+++ /dev/null
@@ -1,7 +0,0 @@
-[DEFAULT]
-head =
-tail =
-skip-if = toolkit == 'android'
-
-[test_filecomplete.js]
-skip-if = os != 'linux'
diff --git a/toolkit/components/filewatcher/moz.build b/toolkit/components/filewatcher/moz.build
index 5ce94b5d26..948a67bf99 100644
--- a/toolkit/components/filewatcher/moz.build
+++ b/toolkit/components/filewatcher/moz.build
@@ -4,20 +4,14 @@
# 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/.
-XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell/xpcshell.ini']
+XPIDL_MODULE = 'toolkit_filewatcher'
+
+XPIDL_SOURCES += ['nsINativeFileWatcher.idl']
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
EXPORTS += ['NativeFileWatcherWin.h']
- UNIFIED_SOURCES += [
- 'NativeFileWatcherWin.cpp',
- ]
+ UNIFIED_SOURCES += ['NativeFileWatcherWin.cpp']
else:
EXPORTS += ['NativeFileWatcherNotSupported.h']
-XPIDL_MODULE = 'toolkit_filewatcher'
-
-XPIDL_SOURCES += [
- 'nsINativeFileWatcher.idl',
-]
-
FINAL_LIBRARY = 'xul'
diff --git a/toolkit/components/filewatcher/tests/xpcshell/.eslintrc.js b/toolkit/components/filewatcher/tests/xpcshell/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/filewatcher/tests/xpcshell/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/filewatcher/tests/xpcshell/head.js b/toolkit/components/filewatcher/tests/xpcshell/head.js
deleted file mode 100644
index 73f8ac4f5f..0000000000
--- a/toolkit/components/filewatcher/tests/xpcshell/head.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-var {classes: Cc, interfaces: Ci, results: Cr, utils: Cu} = Components;
-
-Cu.import("resource://gre/modules/osfile.jsm", this);
-Cu.import("resource://gre/modules/Promise.jsm", this);
-
-function makeWatcher() {
- let watcher =
- Cc['@mozilla.org/toolkit/filewatcher/native-file-watcher;1']
- .getService(Ci.nsINativeFileWatcherService);
- return watcher;
-}
-
-function promiseAddPath(watcher, resource, onChange=null, onError=null) {
- return new Promise(resolve =>
- watcher.addPath(resource, onChange, onError, resolve)
- );
-}
-
-function promiseRemovePath(watcher, resource, onChange=null, onError=null) {
- return new Promise(resolve =>
- watcher.removePath(resource, onChange, onError, resolve)
- );
-}
diff --git a/toolkit/components/filewatcher/tests/xpcshell/test_arguments.js b/toolkit/components/filewatcher/tests/xpcshell/test_arguments.js
deleted file mode 100644
index 7e62b1cb60..0000000000
--- a/toolkit/components/filewatcher/tests/xpcshell/test_arguments.js
+++ /dev/null
@@ -1,79 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-function run_test() {
- // Set up profile. We will use profile path create some test files.
- do_get_profile();
-
- // Start executing the tests.
- run_next_test();
-}
-
-/**
- * Test for addPath usage with null arguments.
- */
-add_task(function* test_null_args_addPath() {
-
- let watcher = makeWatcher();
- let testPath = 'someInvalidPath';
-
- // Define a dummy callback function. In this test no callback is
- // expected to be called.
- let dummyFunc = function(changed) {
- do_throw("Not expected in this test.");
- };
-
- // Check for error when passing a null first argument
- try {
- watcher.addPath(testPath, null, dummyFunc);
- } catch (ex) {
- if (ex.result != Cr.NS_ERROR_NULL_POINTER)
- throw ex;
- do_print("Initialisation thrown NS_ERROR_NULL_POINTER as expected.");
- }
-
- // Check for error when passing both null arguments
- try {
- watcher.addPath(testPath, null, null);
- } catch (ex) {
- if (ex.result != Cr.NS_ERROR_NULL_POINTER)
- throw ex;
- do_print("Initialisation thrown NS_ERROR_NULL_POINTER as expected.");
- }
-});
-
-/**
- * Test for removePath usage with null arguments.
- */
-add_task(function* test_null_args_removePath() {
-
- let watcher = makeWatcher();
- let testPath = 'someInvalidPath';
-
- // Define a dummy callback function. In this test no callback is
- // expected to be called.
- let dummyFunc = function(changed) {
- do_throw("Not expected in this test.");
- };
-
- // Check for error when passing a null first argument
- try {
- watcher.removePath(testPath, null, dummyFunc);
- } catch (ex) {
- if (ex.result != Cr.NS_ERROR_NULL_POINTER)
- throw ex;
- do_print("Initialisation thrown NS_ERROR_NULL_POINTER as expected.");
- }
-
- // Check for error when passing both null arguments
- try {
- watcher.removePath(testPath, null, null);
- } catch (ex) {
- if (ex.result != Cr.NS_ERROR_NULL_POINTER)
- throw ex;
- do_print("Initialisation thrown NS_ERROR_NULL_POINTER as expected.");
- }
-});
diff --git a/toolkit/components/filewatcher/tests/xpcshell/test_no_error_callback.js b/toolkit/components/filewatcher/tests/xpcshell/test_no_error_callback.js
deleted file mode 100644
index e5ceb33e55..0000000000
--- a/toolkit/components/filewatcher/tests/xpcshell/test_no_error_callback.js
+++ /dev/null
@@ -1,69 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-function run_test() {
- // Set up profile. We will use profile path create some test files.
- do_get_profile();
-
- // Start executing the tests.
- run_next_test();
-}
-
-/**
- * Test the component behaves correctly when no error callback is
- * provided and an error occurs.
- */
-add_task(function* test_error_with_no_error_callback() {
-
- let watcher = makeWatcher();
- let testPath = 'someInvalidPath';
-
- // Define a dummy callback function. In this test no callback is
- // expected to be called.
- let dummyFunc = function(changed) {
- do_throw("Not expected in this test.");
- };
-
- // We don't pass an error callback and try to watch an invalid
- // path.
- watcher.addPath(testPath, dummyFunc);
-});
-
-/**
- * Test the component behaves correctly when no error callback is
- * provided (no error should occur).
- */
-add_task(function* test_watch_single_path_file_creation_no_error_cb() {
-
- // Create and watch a sub-directory of the profile directory so we don't
- // catch notifications we're not interested in (i.e. "startupCache").
- let watchedDir = OS.Path.join(OS.Constants.Path.profileDir, "filewatcher_playground");
- yield OS.File.makeDir(watchedDir);
-
- let tempFileName = "test_filecreation.tmp";
-
- // Instantiate and initialize the native watcher.
- let watcher = makeWatcher();
- let deferred = Promise.defer();
-
- // Watch the profile directory but do not pass an error callback.
- yield promiseAddPath(watcher, watchedDir, deferred.resolve);
-
- // Create a file within the watched directory.
- let tmpFilePath = OS.Path.join(watchedDir, tempFileName);
- yield OS.File.writeAtomic(tmpFilePath, "some data");
-
- // Wait until the watcher informs us that the file was created.
- let changed = yield deferred.promise;
- do_check_eq(changed, tmpFilePath);
-
- // Remove the watch and free the associated memory (we need to
- // reuse 'deferred.resolve' to unregister).
- watcher.removePath(watchedDir, deferred.resolve);
-
- // Remove the test directory and all of its content.
- yield OS.File.removeDir(watchedDir);
-});
diff --git a/toolkit/components/filewatcher/tests/xpcshell/test_remove_non_watched.js b/toolkit/components/filewatcher/tests/xpcshell/test_remove_non_watched.js
deleted file mode 100644
index 1375584a38..0000000000
--- a/toolkit/components/filewatcher/tests/xpcshell/test_remove_non_watched.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-function run_test() {
- // Set up profile. We will use profile path create some test files.
- do_get_profile();
-
- // Start executing the tests.
- run_next_test();
-}
-
-/**
- * Test removing non watched path
- */
-add_task(function* test_remove_not_watched() {
- let nonExistingDir =
- OS.Path.join(OS.Constants.Path.profileDir, "absolutelyNotExisting");
-
- // Instantiate the native watcher.
- let watcher = makeWatcher();
-
- // Try to un-watch a path which wasn't being watched.
- watcher.removePath(
- nonExistingDir,
- function(changed) {
- do_throw("No change is expected in this test.");
- },
- function(xpcomError, osError) {
- // When removing a resource which wasn't being watched, it should silently
- // ignore the request.
- do_throw("Unexpected exception: "
- + xpcomError + " (XPCOM) "
- + osError + " (OS Error)");
- }
- );
-});
diff --git a/toolkit/components/filewatcher/tests/xpcshell/test_shared_callback.js b/toolkit/components/filewatcher/tests/xpcshell/test_shared_callback.js
deleted file mode 100644
index 482ba6b8b1..0000000000
--- a/toolkit/components/filewatcher/tests/xpcshell/test_shared_callback.js
+++ /dev/null
@@ -1,62 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-function run_test() {
- // Set up profile. We will use profile path create some test files.
- do_get_profile();
-
- // Start executing the tests.
- run_next_test();
-}
-
-/**
- * Test the watcher correctly handles two watches sharing the same
- * change callback.
- */
-add_task(function* test_watch_with_shared_callback() {
-
- // Create and watch two sub-directories of the profile directory so we don't
- // catch notifications we're not interested in (i.e. "startupCache").
- let watchedDirs =
- [
- OS.Path.join(OS.Constants.Path.profileDir, "filewatcher_playground"),
- OS.Path.join(OS.Constants.Path.profileDir, "filewatcher_playground2")
- ];
-
- yield OS.File.makeDir(watchedDirs[0]);
- yield OS.File.makeDir(watchedDirs[1]);
-
- let tempFileName = "test_filecreation.tmp";
-
- // Instantiate and initialize the native watcher.
- let watcher = makeWatcher();
- let deferred = Promise.defer();
-
- // Watch both directories using the same callbacks.
- yield promiseAddPath(watcher, watchedDirs[0], deferred.resolve, deferred.reject);
- yield promiseAddPath(watcher, watchedDirs[1], deferred.resolve, deferred.reject);
-
- // Remove the watch for the first directory, but keep watching
- // for changes in the second: we need to make sure the callback
- // survives the removal of the first watch.
- watcher.removePath(watchedDirs[0], deferred.resolve, deferred.reject);
-
- // Create a file within the watched directory.
- let tmpFilePath = OS.Path.join(watchedDirs[1], tempFileName);
- yield OS.File.writeAtomic(tmpFilePath, "some data");
-
- // Wait until the watcher informs us that the file was created.
- let changed = yield deferred.promise;
- do_check_eq(changed, tmpFilePath);
-
- // Remove the watch and free the associated memory (we need to
- // reuse 'deferred.resolve' and 'deferred.reject' to unregister).
- watcher.removePath(watchedDirs[1], deferred.resolve, deferred.reject);
-
- // Remove the test directories and all of their content.
- yield OS.File.removeDir(watchedDirs[0]);
- yield OS.File.removeDir(watchedDirs[1]);
-});
diff --git a/toolkit/components/filewatcher/tests/xpcshell/test_watch_directory_creation_single.js b/toolkit/components/filewatcher/tests/xpcshell/test_watch_directory_creation_single.js
deleted file mode 100644
index a434ec751a..0000000000
--- a/toolkit/components/filewatcher/tests/xpcshell/test_watch_directory_creation_single.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-function run_test() {
- // Set up profile. We will use profile path create some test files
- do_get_profile();
-
- // Start executing the tests
- run_next_test();
-}
-
-/**
- * Tests that the watcher correctly notifies of a directory creation when watching
- * a single path.
- */
-add_task(function* test_watch_single_path_directory_creation() {
-
- // Create and watch a sub-directory of the profile directory so we don't
- // catch notifications we're not interested in (i.e. "startupCache").
- let watchedDir = OS.Path.join(OS.Constants.Path.profileDir, "filewatcher_playground");
- yield OS.File.makeDir(watchedDir);
-
- let tmpDirPath = OS.Path.join(watchedDir, "testdir");
-
- // Instantiate and initialize the native watcher.
- let watcher = makeWatcher();
- let deferred = Promise.defer();
-
- // Add the profile directory to the watch list and wait for the file watcher
- // to start watching.
- yield promiseAddPath(watcher, watchedDir, deferred.resolve, deferred.reject);
-
- // Once ready, create a directory within the watched directory.
- yield OS.File.makeDir(tmpDirPath);
-
- // Wait until the watcher informs us that the file has changed.
- let changed = yield deferred.promise;
- do_check_eq(changed, tmpDirPath);
-
- // Remove the watch and free the associated memory (we need to
- // reuse 'deferred.resolve' and 'deferred.reject' to unregister).
- yield promiseRemovePath(watcher, watchedDir, deferred.resolve, deferred.reject);
-
- // Clean up the test directory.
- yield OS.File.removeDir(watchedDir);
-});
diff --git a/toolkit/components/filewatcher/tests/xpcshell/test_watch_directory_deletion_single.js b/toolkit/components/filewatcher/tests/xpcshell/test_watch_directory_deletion_single.js
deleted file mode 100644
index 2c74a93616..0000000000
--- a/toolkit/components/filewatcher/tests/xpcshell/test_watch_directory_deletion_single.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-function run_test() {
- // Set up profile. We will use profile path create some test files.
- do_get_profile();
-
- // Start executing the tests.
- run_next_test();
-}
-
-/**
- * Tests that the watcher correctly notifies of a directory deletion when watching
- * a single path.
- */
-add_task(function* test_watch_single_path_directory_deletion() {
-
- let watchedDir = OS.Constants.Path.profileDir;
- let tempDirName = "test";
- let tmpDirPath = OS.Path.join(watchedDir, tempDirName);
-
- // Instantiate and initialize the native watcher.
- let watcher = makeWatcher();
- let deferred = Promise.defer();
-
- // Create a directory within the watched directory.
- yield OS.File.makeDir(tmpDirPath);
-
- // Add the profile directory to the watch list and wait for the file watcher
- // to start watching it.
- yield promiseAddPath(watcher, watchedDir, deferred.resolve, deferred.reject);
-
- // Remove the directory.
- OS.File.removeDir(tmpDirPath);
-
- // Wait until the watcher informs us that the file has changed.
- let changed = yield deferred.promise;
- do_check_eq(changed, tmpDirPath);
-
- // Remove the watch and free the associated memory (we need to
- // reuse 'deferred.resolve' and 'deferred.reject' to unregister).
- yield promiseRemovePath(watcher, watchedDir, deferred.resolve, deferred.reject);
-});
diff --git a/toolkit/components/filewatcher/tests/xpcshell/test_watch_file_creation_single.js b/toolkit/components/filewatcher/tests/xpcshell/test_watch_file_creation_single.js
deleted file mode 100644
index 9f87793f44..0000000000
--- a/toolkit/components/filewatcher/tests/xpcshell/test_watch_file_creation_single.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-function run_test() {
- // Set up profile. We will use profile path create some test files.
- do_get_profile();
-
- // Start executing the tests.
- run_next_test();
-}
-
-/**
- * Test the watcher correctly notifies of a file creation when watching
- * a single path.
- */
-add_task(function* test_watch_single_path_file_creation() {
-
- // Create and watch a sub-directory of the profile directory so we don't
- // catch notifications we're not interested in (i.e. "startupCache").
- let watchedDir = OS.Path.join(OS.Constants.Path.profileDir, "filewatcher_playground");
- yield OS.File.makeDir(watchedDir);
-
- let tempFileName = "test_filecreation.tmp";
-
- // Instantiate and initialize the native watcher.
- let watcher = makeWatcher();
- let deferred = Promise.defer();
-
- let tmpFilePath = OS.Path.join(watchedDir, tempFileName);
-
- // Add the profile directory to the watch list and wait for the file watcher
- // to start watching.
- yield promiseAddPath(watcher, watchedDir, deferred.resolve, deferred.reject);
-
- // create the file within the watched directory.
- yield OS.File.writeAtomic(tmpFilePath, "some data");
-
- // Wait until the watcher informs us that the file was created.
- let changed = yield deferred.promise;
- do_check_eq(changed, tmpFilePath);
-
- // Remove the watch and free the associated memory (we need to
- // reuse 'deferred.resolve' and 'deferred.reject' to unregister).
- yield promiseRemovePath(watcher, watchedDir, deferred.resolve, deferred.reject);
-
- // Remove the test directory and all of its content.
- yield OS.File.removeDir(watchedDir);
-});
diff --git a/toolkit/components/filewatcher/tests/xpcshell/test_watch_file_deletion_single.js b/toolkit/components/filewatcher/tests/xpcshell/test_watch_file_deletion_single.js
deleted file mode 100644
index 97d2d61bc2..0000000000
--- a/toolkit/components/filewatcher/tests/xpcshell/test_watch_file_deletion_single.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-function run_test() {
- // Set up profile. We will use profile path create some test files.
- do_get_profile();
-
- // Start executing the tests.
- run_next_test();
-}
-/**
- * Test the watcher correctly notifies of a file deletion when watching
- * a single path.
- */
-add_task(function* test_watch_single_path_file_deletion() {
-
- // Create and watch a sub-directory of the profile directory so we don't
- // catch notifications we're not interested in (i.e. "startupCache").
- let watchedDir = OS.Path.join(OS.Constants.Path.profileDir, "filewatcher_playground");
- yield OS.File.makeDir(watchedDir);
-
- let tempFileName = "test_filedeletion.tmp";
-
- // Instantiate and initialize the native watcher.
- let watcher = makeWatcher();
- let deferred = Promise.defer();
-
- // Create a file within the directory to be watched. We do this
- // before watching the directory so we do not get the creation notification.
- let tmpFilePath = OS.Path.join(watchedDir, tempFileName);
- yield OS.File.writeAtomic(tmpFilePath, "some data");
-
- // Add the profile directory to the watch list and wait for the file watcher
- // to start watching it.
- yield promiseAddPath(watcher, watchedDir, deferred.resolve, deferred.reject);
-
- // Remove the file we created (should trigger a notification).
- do_print('Removing ' + tmpFilePath);
- yield OS.File.remove(tmpFilePath);
-
- // Wait until the watcher informs us that the file was deleted.
- let changed = yield deferred.promise;
- do_check_eq(changed, tmpFilePath);
-
- // Remove the watch and free the associated memory (we need to
- // reuse 'deferred.resolve' and 'deferred.reject' to unregister).
- yield promiseRemovePath(watcher, watchedDir, deferred.resolve, deferred.reject);
-
- // Remove the test directory and all of its content.
- yield OS.File.removeDir(watchedDir);
-});
diff --git a/toolkit/components/filewatcher/tests/xpcshell/test_watch_file_modification_single.js b/toolkit/components/filewatcher/tests/xpcshell/test_watch_file_modification_single.js
deleted file mode 100644
index ba25fdff63..0000000000
--- a/toolkit/components/filewatcher/tests/xpcshell/test_watch_file_modification_single.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-function run_test() {
- // Set up profile. We will use profile path create some test files
- do_get_profile();
-
- // Start executing the tests
- run_next_test();
-}
-
-/**
- * Tests that the watcher correctly notifies of a file modification when watching
- * a single path.
- */
-add_task(function* test_watch_single_path_file_modification() {
-
- // Create and watch a sub-directory of the profile directory so we don't
- // catch notifications we're not interested in (i.e. "startupCache").
- let watchedDir = OS.Path.join(OS.Constants.Path.profileDir, "filewatcher_playground");
- yield OS.File.makeDir(watchedDir);
-
- let tempFileName = "test_filemodification.tmp";
-
- // Instantiate and initialize the native watcher.
- let watcher = makeWatcher();
- let deferred = Promise.defer();
-
- // Create a file within the directory to be watched. We do this
- // before watching the directory so we do not get the creation notification.
- let tmpFilePath = OS.Path.join(watchedDir, tempFileName);
- yield OS.File.writeAtomic(tmpFilePath, "some data");
-
- // Add the profile directory to the watch list and wait for the file watcher
- // to start watching it.
- yield promiseAddPath(watcher, watchedDir, deferred.resolve, deferred.reject);
-
- // Once ready, modify the file to trigger the notification.
- yield OS.File.writeAtomic(tmpFilePath, "some new data");
-
- // Wait until the watcher informs us that the file has changed.
- let changed = yield deferred.promise;
- do_check_eq(changed, tmpFilePath);
-
- // Remove the watch and free the associated memory (we need to
- // reuse 'deferred.resolve' and 'deferred.reject' to unregister).
- yield promiseRemovePath(watcher, watchedDir, deferred.resolve, deferred.reject);
-
- // Remove the test directory and all of its content.
- yield OS.File.removeDir(watchedDir);
-});
diff --git a/toolkit/components/filewatcher/tests/xpcshell/test_watch_many_changes.js b/toolkit/components/filewatcher/tests/xpcshell/test_watch_many_changes.js
deleted file mode 100644
index c236c6e1de..0000000000
--- a/toolkit/components/filewatcher/tests/xpcshell/test_watch_many_changes.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-function run_test() {
- // Set up profile. We will use profile path create some test files
- do_get_profile();
-
- // Start executing the tests
- run_next_test();
-}
-
-/**
- * Test that we correctly handle watching directories when hundreds of files
- * change simultaneously.
- */
-add_task(function* test_fill_notification_buffer() {
-
- // Create and watch a sub-directory of the profile directory so we don't
- // catch notifications we're not interested in (i.e. "startupCache").
- let watchedDir = OS.Path.join(OS.Constants.Path.profileDir, "filewatcher_playground");
- yield OS.File.makeDir(watchedDir);
-
- // The number of files to create.
- let numberOfFiles = 100;
- let fileNameBase = "testFile";
-
- // This will be used to keep track of the number of changes within the watched
- // directory.
- let detectedChanges = 0;
-
- // We expect at least the following notifications for each file:
- // - File creation
- // - File deletion
- let expectedChanges = numberOfFiles * 2;
-
- // Instantiate the native watcher.
- let watcher = makeWatcher();
- let deferred = Promise.defer();
-
- // Initialise the change callback.
- let changeCallback = function(changed) {
- do_print(changed + " has changed.");
-
- detectedChanges += 1;
-
- // Resolve the promise if we get all the expected changes.
- if (detectedChanges >= expectedChanges) {
- deferred.resolve();
- }
- };
-
- // Add the profile directory to the watch list and wait for the file watcher
- // to start watching it.
- yield promiseAddPath(watcher, watchedDir, changeCallback, deferred.reject);
-
- // Create and then remove the files within the watched directory.
- for (let i = 0; i < numberOfFiles; i++) {
- let tmpFilePath = OS.Path.join(watchedDir, fileNameBase + i);
- yield OS.File.writeAtomic(tmpFilePath, "test content");
- yield OS.File.remove(tmpFilePath);
- }
-
- // Wait until the watcher informs us that all the files were
- // created, modified and removed.
- yield deferred.promise;
-
- // Remove the watch and free the associated memory (we need to
- // reuse 'changeCallback' and 'errorCallback' to unregister).
- yield promiseRemovePath(watcher, watchedDir, changeCallback, deferred.reject);
-});
diff --git a/toolkit/components/filewatcher/tests/xpcshell/test_watch_multi_paths.js b/toolkit/components/filewatcher/tests/xpcshell/test_watch_multi_paths.js
deleted file mode 100644
index c55b262f19..0000000000
--- a/toolkit/components/filewatcher/tests/xpcshell/test_watch_multi_paths.js
+++ /dev/null
@@ -1,114 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-function run_test() {
- // Set up profile. We will use profile path create some test files
- do_get_profile();
-
- // Start executing the tests
- run_next_test();
-}
-
-/**
- * Tests the watcher by watching several resources.
- * This test creates the specified number of directory inside the profile
- * directory, adds each one of them to the watched list the creates
- * a file in them in order to trigger the notification.
- * The test keeps track of the number of times the changes callback is
- * called in order to verify the success of the test.
- */
-add_task(function* test_watch_multi_paths() {
-
- // The number of resources to watch. We expect changes for
- // creating a file within each directory.
- let resourcesToWatch = 5;
- let watchedDir = OS.Constants.Path.profileDir;
-
- // The directories to be watched will be created with.
- let tempDirNameBase = "FileWatcher_Test_";
- let tempFileName = "test.tmp";
-
- // Instantiate the native watcher.
- let watcher = makeWatcher();
-
- // This will be used to keep track of the number of changes within the watched
- // resources.
- let detectedChanges = 0;
- let watchedResources = 0;
- let unwatchedResources = 0;
-
- let deferredChanges = Promise.defer();
- let deferredSuccesses = Promise.defer();
- let deferredShutdown = Promise.defer();
-
- // Define the change callback function.
- let changeCallback = function(changed) {
- do_print(changed + " has changed.");
-
- detectedChanges += 1;
-
- // Resolve the promise if we get all the expected changes.
- if (detectedChanges === resourcesToWatch) {
- deferredChanges.resolve();
- }
- };
-
- // Define the watch success callback function.
- let watchSuccessCallback = function(resourcePath) {
- do_print(resourcePath + " is being watched.");
-
- watchedResources += 1;
-
- // Resolve the promise when all the resources are being
- // watched.
- if (watchedResources === resourcesToWatch) {
- deferredSuccesses.resolve();
- }
- };
-
- // Define the watch success callback function.
- let unwatchSuccessCallback = function(resourcePath) {
- do_print(resourcePath + " is being un-watched.");
-
- unwatchedResources += 1;
-
- // Resolve the promise when all the resources are being
- // watched.
- if (unwatchedResources === resourcesToWatch) {
- deferredShutdown.resolve();
- }
- };
-
- // Create the directories and add them to the watched resources list.
- for (let i = 0; i < resourcesToWatch; i++) {
- let tmpSubDirPath = OS.Path.join(watchedDir, tempDirNameBase + i);
- do_print("Creating the " + tmpSubDirPath + " directory.");
- yield OS.File.makeDir(tmpSubDirPath);
- watcher.addPath(tmpSubDirPath, changeCallback, deferredChanges.reject, watchSuccessCallback);
- }
-
- // Wait until the watcher informs us that all the desired resources
- // are being watched.
- yield deferredSuccesses.promise;
-
- // Create a file within each watched directory.
- for (let i = 0; i < resourcesToWatch; i++) {
- let tmpFilePath = OS.Path.join(watchedDir, tempDirNameBase + i, tempFileName);
- yield OS.File.writeAtomic(tmpFilePath, "test content");
- }
-
- // Wait until the watcher informs us that all the files were created.
- yield deferredChanges.promise;
-
- // Remove the directories we have created.
- for (let i = 0; i < resourcesToWatch; i++) {
- let tmpSubDirPath = OS.Path.join(watchedDir, tempDirNameBase + i);
- watcher.removePath(tmpSubDirPath, changeCallback, deferredChanges.reject, unwatchSuccessCallback);
- }
-
- // Wait until the watcher un-watches the resources.
- yield deferredShutdown.promise;
-});
diff --git a/toolkit/components/filewatcher/tests/xpcshell/test_watch_recursively.js b/toolkit/components/filewatcher/tests/xpcshell/test_watch_recursively.js
deleted file mode 100644
index 13a3de8d36..0000000000
--- a/toolkit/components/filewatcher/tests/xpcshell/test_watch_recursively.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-function run_test() {
- // Set up profile. We will use profile path create some test files.
- do_get_profile();
-
- // Start executing the tests.
- run_next_test();
-}
-
-/**
- * Test the watcher correctly notifies of a file creation in a subdirectory
- * of the watched sub-directory (recursion).
- */
-add_task(function* test_watch_recursively() {
-
- // Create and watch a sub-directory of the profile directory so we don't
- // catch notifications we're not interested in (i.e. "startupCache").
- let watchedDir = OS.Path.join(OS.Constants.Path.profileDir, "filewatcher_playground");
- yield OS.File.makeDir(watchedDir);
-
- // We need at least 2 levels of directories to test recursion.
- let subdirectory = OS.Path.join(watchedDir, "level1");
- yield OS.File.makeDir(subdirectory);
-
- let tempFileName = "test_filecreation.tmp";
-
- // Instantiate and initialize the native watcher.
- let watcher = makeWatcher();
- let deferred = Promise.defer();
-
- let tmpFilePath = OS.Path.join(subdirectory, tempFileName);
-
- // Add the profile directory to the watch list and wait for the file watcher
- // to start watching it.
- yield promiseAddPath(watcher, watchedDir, deferred.resolve, deferred.reject);
-
- // Create a file within the subdirectory of the watched directory.
- yield OS.File.writeAtomic(tmpFilePath, "some data");
-
- // Wait until the watcher informs us that the file was created.
- let changed = yield deferred.promise;
- do_check_eq(changed, tmpFilePath);
-
- // Remove the watch and free the associated memory (we need to
- // reuse 'deferred.resolve' and 'deferred.reject' to unregister).
- yield promiseRemovePath(watcher, watchedDir, deferred.resolve, deferred.reject);
-
- // Remove the test directory and all of its content.
- yield OS.File.removeDir(watchedDir);
-});
diff --git a/toolkit/components/filewatcher/tests/xpcshell/test_watch_resource.js b/toolkit/components/filewatcher/tests/xpcshell/test_watch_resource.js
deleted file mode 100644
index fffdff24b7..0000000000
--- a/toolkit/components/filewatcher/tests/xpcshell/test_watch_resource.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-function run_test() {
- // Set up profile. We will use profile path create some test files
- do_get_profile();
-
- // Start executing the tests
- run_next_test();
-}
-
-/**
- * Test watching non-existing path
- */
-add_task(function* test_watching_non_existing() {
- let notExistingDir =
- OS.Path.join(OS.Constants.Path.profileDir, "absolutelyNotExisting");
-
- // Instantiate the native watcher.
- let watcher = makeWatcher();
- let deferred = Promise.defer();
-
- // Try watch a path which doesn't exist.
- watcher.addPath(notExistingDir, deferred.reject, deferred.resolve);
-
- // Wait until the watcher informs us that there was an error.
- let error = yield deferred.promise;
- do_check_eq(error, Components.results.NS_ERROR_FILE_NOT_FOUND);
-});
diff --git a/toolkit/components/filewatcher/tests/xpcshell/xpcshell.ini b/toolkit/components/filewatcher/tests/xpcshell/xpcshell.ini
deleted file mode 100644
index d6cc968ebd..0000000000
--- a/toolkit/components/filewatcher/tests/xpcshell/xpcshell.ini
+++ /dev/null
@@ -1,18 +0,0 @@
-[DEFAULT]
-head = head.js
-tail =
-skip-if = os != "win"
-
-[test_arguments.js]
-[test_no_error_callback.js]
-[test_remove_non_watched.js]
-[test_shared_callback.js]
-[test_watch_file_creation_single.js]
-[test_watch_file_deletion_single.js]
-[test_watch_file_modification_single.js]
-[test_watch_directory_creation_single.js]
-[test_watch_directory_deletion_single.js]
-[test_watch_many_changes.js]
-[test_watch_multi_paths.js]
-[test_watch_recursively.js]
-[test_watch_resource.js]
diff --git a/toolkit/components/formautofill/moz.build b/toolkit/components/formautofill/moz.build
index 2c2179f81e..3dfc58281c 100644
--- a/toolkit/components/formautofill/moz.build
+++ b/toolkit/components/formautofill/moz.build
@@ -4,22 +4,7 @@
# 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/.
-if CONFIG['NIGHTLY_BUILD']:
- BROWSER_CHROME_MANIFESTS += [
- 'test/browser/browser.ini',
- ]
-
- MOCHITEST_CHROME_MANIFESTS += [
- 'test/chrome/chrome.ini',
- ]
-
-XPCSHELL_TESTS_MANIFESTS += [
- 'test/xpcshell/xpcshell.ini',
-]
-
-XPIDL_SOURCES += [
- 'nsIFormAutofillContentService.idl',
-]
+XPIDL_SOURCES += ['nsIFormAutofillContentService.idl']
XPIDL_MODULE = 'toolkit_formautofill'
@@ -28,9 +13,7 @@ EXTRA_COMPONENTS += [
'FormAutofillStartup.js',
]
-EXTRA_PP_COMPONENTS += [
- 'formautofill.manifest',
-]
+EXTRA_PP_COMPONENTS += ['formautofill.manifest']
EXTRA_JS_MODULES += [
'content/RequestAutocompleteUI.jsm',
@@ -38,9 +21,4 @@ EXTRA_JS_MODULES += [
'FormAutofillIntegration.jsm',
]
-JAR_MANIFESTS += [
- 'jar.mn',
-]
-
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'Form Manager')
+JAR_MANIFESTS += ['jar.mn']
diff --git a/toolkit/components/formautofill/test/browser/.eslintrc.js b/toolkit/components/formautofill/test/browser/.eslintrc.js
deleted file mode 100644
index 7c80211924..0000000000
--- a/toolkit/components/formautofill/test/browser/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/mochitest/browser.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/formautofill/test/browser/browser.ini b/toolkit/components/formautofill/test/browser/browser.ini
deleted file mode 100644
index dff9c3381a..0000000000
--- a/toolkit/components/formautofill/test/browser/browser.ini
+++ /dev/null
@@ -1,10 +0,0 @@
-[DEFAULT]
-# The following files starting with ".." are installed in the current folder.
-support-files =
- ../head_common.js
- ../loader_common.js
- head.js
- loader.js
-
-[browser_infrastructure.js]
-[browser_ui_requestAutocomplete.js]
diff --git a/toolkit/components/formautofill/test/browser/browser_infrastructure.js b/toolkit/components/formautofill/test/browser/browser_infrastructure.js
deleted file mode 100644
index af27cfdb53..0000000000
--- a/toolkit/components/formautofill/test/browser/browser_infrastructure.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Tests the local testing infrastructure.
- */
-
-"use strict";
-
-/**
- * Tests the truth assertion function.
- */
-add_task(function* test_assert_truth() {
- Assert.ok(1 != 2);
-});
-
-/**
- * Tests the equality assertion function.
- */
-add_task(function* test_assert_equality() {
- Assert.equal(1 + 1, 2);
-});
-
-/**
- * Uses some of the utility functions provided by the framework.
- */
-add_task(function* test_utility_functions() {
- // The "print" function is useful to log information that is not known before.
- let randomString = "R" + Math.floor(Math.random() * 10);
- Output.print("The random contents will be '" + randomString + "'.");
-
- // Create the text file with the random contents.
- let path = yield TestUtils.getTempFile("test-infrastructure.txt");
- yield OS.File.writeAtomic(path, new TextEncoder().encode(randomString));
-
- // Test a few utility functions.
- yield TestUtils.waitForTick();
- yield TestUtils.waitMs(50);
-
- let promiseMyNotification = TestUtils.waitForNotification("my-topic");
- Services.obs.notifyObservers(null, "my-topic", "");
- yield promiseMyNotification;
-
- // Check the file size. The file will be deleted automatically later.
- Assert.equal((yield OS.File.stat(path)).size, randomString.length);
-});
-
-add_task(terminationTaskFn);
diff --git a/toolkit/components/formautofill/test/browser/browser_ui_requestAutocomplete.js b/toolkit/components/formautofill/test/browser/browser_ui_requestAutocomplete.js
deleted file mode 100644
index 2a7b58f121..0000000000
--- a/toolkit/components/formautofill/test/browser/browser_ui_requestAutocomplete.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Tests the requestAutocomplete user interface.
- */
-
-"use strict";
-
-/**
- * Open the requestAutocomplete UI and test that selecting a profile results in
- * the correct data being sent back to the opener.
- */
-add_task(function* test_select_profile() {
- // Request an e-mail address.
- let { uiWindow, promiseResult } = yield FormAutofillTest.showUI(
- TestData.requestEmailOnly);
-
- // Accept the dialog.
- let acceptButton = uiWindow.document.getElementById("accept");
- EventUtils.synthesizeMouseAtCenter(acceptButton, {}, uiWindow);
-
- let result = yield promiseResult;
- Assert.equal(result.fields.length, 1);
- Assert.equal(result.fields[0].section, "");
- Assert.equal(result.fields[0].addressType, "");
- Assert.equal(result.fields[0].contactType, "");
- Assert.equal(result.fields[0].fieldName, "email");
- Assert.equal(result.fields[0].value, "email@example.org");
-});
-
-/**
- * Open the requestAutocomplete UI and cancel the dialog.
- */
-add_task(function* test_cancel() {
- // Request an e-mail address.
- let { uiWindow, promiseResult } = yield FormAutofillTest.showUI(
- TestData.requestEmailOnly);
-
- // Cancel the dialog.
- let acceptButton = uiWindow.document.getElementById("cancel");
- EventUtils.synthesizeMouseAtCenter(acceptButton, {}, uiWindow);
-
- let result = yield promiseResult;
- Assert.ok(result.canceled);
-});
-
-add_task(terminationTaskFn);
diff --git a/toolkit/components/formautofill/test/browser/head.js b/toolkit/components/formautofill/test/browser/head.js
deleted file mode 100644
index 882f3fd5ec..0000000000
--- a/toolkit/components/formautofill/test/browser/head.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Initialization specific to Form Autofill mochitest-browser tests.
- */
-
-"use strict";
-
-// We cannot start initialization from "loader.js" like we do in the xpcshell
-// and mochitest-chrome frameworks, thus we load the script here.
-Services.scriptloader.loadSubScript(getRootDirectory(gTestPath) + "loader.js",
- this);
-
-// The testing framework is fully initialized at this point, you can add
-// mochitest-browser specific test initialization here. If you need shared
-// functions or initialization that are not specific to mochitest-browser,
-// consider adding them to "head_common.js" in the parent folder instead.
diff --git a/toolkit/components/formautofill/test/browser/loader.js b/toolkit/components/formautofill/test/browser/loader.js
deleted file mode 100644
index bfd5b9ee09..0000000000
--- a/toolkit/components/formautofill/test/browser/loader.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Infrastructure for the mochitest-browser tests located in this folder.
- *
- * See "loader_common.js" in the parent folder for a general overview.
- *
- * Unless you are adding new features to the framework, you shouldn't have to
- * modify this file. Use "head_common.js" or "head.js" for shared code.
- */
-
-"use strict";
-
-Services.scriptloader.loadSubScript(getRootDirectory(gTestPath) +
- "loader_common.js", this);
-
-// Define output functions so they look the same across all frameworks.
-var Output = {
- print: info,
-};
-
-// Define assertion functions so they look the same across all frameworks.
-var Assert = {
- ok: _mochitestAssert.ok,
- equal: _mochitestAssert.equal,
-};
-
-// Define task registration functions, see description in "loader_common.js".
-var add_task_in_parent_process = add_task;
-var add_task_in_child_process = function () {};
-var add_task_in_both_processes = add_task;
-
-Services.scriptloader.loadSubScript(getRootDirectory(gTestPath) +
- "head_common.js", this);
-
-// Reminder: unless you are adding new features to the framework, you shouldn't
-// have to modify this file. Use "head_common.js" or "head.js" for shared code.
diff --git a/toolkit/components/formautofill/test/chrome/.eslintrc.js b/toolkit/components/formautofill/test/chrome/.eslintrc.js
deleted file mode 100644
index 8c0f4f574c..0000000000
--- a/toolkit/components/formautofill/test/chrome/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/mochitest/chrome.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/formautofill/test/chrome/chrome.ini b/toolkit/components/formautofill/test/chrome/chrome.ini
deleted file mode 100644
index 67b7869afe..0000000000
--- a/toolkit/components/formautofill/test/chrome/chrome.ini
+++ /dev/null
@@ -1,17 +0,0 @@
-[DEFAULT]
-# The following files starting with ".." are installed in the current folder.
-support-files =
- ../head_common.js
- ../loader_common.js
- head.js
- test_infrastructure.js
- test_requestAutocomplete_cancel.js
- loader_parent.js
- loader.js
-
-# For each test defined below, the associated JavaScript file must be declared
-# in the list above. This is required because a "support-files" declaration on
-# the individual test would override the global list instead of adding entries.
-
-[test_infrastructure.html]
-[test_requestAutocomplete_cancel.html]
diff --git a/toolkit/components/formautofill/test/chrome/head.js b/toolkit/components/formautofill/test/chrome/head.js
deleted file mode 100644
index 4110d5e7c6..0000000000
--- a/toolkit/components/formautofill/test/chrome/head.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Initialization specific to Form Autofill mochitest-chrome tests.
- *
- * This file is loaded by "loader.js".
- */
-
-"use strict";
-
-// The testing framework is fully initialized at this point, you can add
-// mochitest-chrome specific test initialization here. If you need shared
-// functions or initialization that are not specific to mochitest-chrome,
-// consider adding them to "head_common.js" in the parent folder instead.
diff --git a/toolkit/components/formautofill/test/chrome/loader.js b/toolkit/components/formautofill/test/chrome/loader.js
deleted file mode 100644
index 25b0e6ea38..0000000000
--- a/toolkit/components/formautofill/test/chrome/loader.js
+++ /dev/null
@@ -1,116 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Infrastructure for the mochitest-chrome tests located in this folder.
- *
- * See "loader_common.js" in the parent folder for a general overview.
- *
- * Unless you are adding new features to the framework, you shouldn't have to
- * modify this file. Use "head_common.js" or "head.js" for shared code.
- */
-
-"use strict";
-
-var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
-Cu.import("resource://gre/modules/Services.jsm", this);
-
-Services.scriptloader.loadSubScript(
- "chrome://mochikit/content/tests/SimpleTest/SimpleTest.js", this);
-
-var sharedUrl = SimpleTest.getTestFileURL("loader_common.js");
-Services.scriptloader.loadSubScript(sharedUrl, this);
-
-var parentScript = SpecialPowers.loadChromeScript(
- SimpleTest.getTestFileURL("loader_parent.js"));
-
-// Replace the extension of the loaded HTML file with ".js"
-var testUrl = location.href.replace(/\.\w+$/, ".js");
-
-// Start loading the test script in the parent process.
-var promiseParentInitFinished = new Promise(function (resolve) {
- parentScript.addMessageListener("finish_load_in_parent", resolve);
-});
-parentScript.sendAsyncMessage("start_load_in_parent", { testUrl: testUrl });
-
-// Define output functions so they look the same across all frameworks.
-var Output = {
- print: info,
-};
-
-// Define assertion functions so they look the same across all frameworks.
-var Assert = {
- ok: _mochitestAssert.ok,
- equal: _mochitestAssert.equal,
-};
-
-var executeSoon = SimpleTest.executeSoon;
-
-var gTestTasks = [];
-
-// Define task registration functions, see description in "loader_common.js".
-function add_task(taskFn) {
- gTestTasks.push([taskFn, "content", taskFn.name]);
-}
-function add_task_in_parent_process(taskFn, taskIdOverride) {
- let taskId = taskIdOverride || getTaskId(Components.stack.caller);
- gTestTasks.push([taskFn, "parent", taskId]);
-}
-function add_task_in_both_processes(taskFn) {
- // We need to define a task ID based on our direct caller.
- add_task_in_parent_process(taskFn, getTaskId(Components.stack.caller));
- add_task(taskFn);
-}
-var add_task_in_child_process = add_task;
-
-window.addEventListener("load", function onLoad() {
- window.removeEventListener("load", onLoad);
-
- Task.spawn(function* () {
- try {
- for (let [taskFn, taskType, taskId] of gTestTasks) {
- if (taskType == "content") {
- // This is a normal task executed in the current process.
- info("Running " + taskFn.name);
- yield Task.spawn(taskFn);
- } else {
- // This is a task executed in the parent process.
- info("Running task in parent process: " + taskFn.name);
- let promiseFinished = new Promise(function (resolve) {
- parentScript.addMessageListener("finish_task_" + taskId, resolve);
- });
- parentScript.sendAsyncMessage("start_task_" + taskId);
- yield promiseFinished;
- info("Finished task in parent process: " + taskFn.name);
- }
- }
- } catch (ex) {
- ok(false, ex);
- }
-
- SimpleTest.finish();
- });
-});
-
-// Wait for the test script to be loaded in the parent process. This means that
-// test tasks are registered and ready, but have not been executed yet.
-add_task(function* wait_loading_in_parent_process() {
- yield promiseParentInitFinished;
-});
-
-var headUrl = SimpleTest.getTestFileURL("head_common.js");
-Services.scriptloader.loadSubScript(headUrl, this);
-
-Output.print("Loading test file: " + testUrl);
-Services.scriptloader.loadSubScript(testUrl, this);
-
-// Register the execution of termination tasks after all other tasks.
-add_task(terminationTaskFn);
-add_task_in_parent_process(terminationTaskFn, terminationTaskFn.name);
-
-SimpleTest.waitForExplicitFinish();
-
-// Reminder: unless you are adding new features to the framework, you shouldn't
-// have to modify this file. Use "head_common.js" or "head.js" for shared code.
diff --git a/toolkit/components/formautofill/test/chrome/loader_parent.js b/toolkit/components/formautofill/test/chrome/loader_parent.js
deleted file mode 100644
index bf823218e6..0000000000
--- a/toolkit/components/formautofill/test/chrome/loader_parent.js
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Infrastructure for the mochitest-chrome tests located in this folder, always
- * executed in the parent process.
- *
- * See "loader_common.js" in the parent folder for a general overview.
- *
- * Unless you are adding new features to the framework, you shouldn't have to
- * modify this file. Use "head_common.js" or "head.js" for shared code.
- */
-
-"use strict";
-
-var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
-Cu.import("resource://gre/modules/Services.jsm", this);
-
-var sharedUrl = "chrome://mochitests/content/chrome/" +
- "toolkit/components/formautofill/test/chrome/loader_common.js";
-Services.scriptloader.loadSubScript(sharedUrl, this);
-
-// Define output functions so they look the same across all frameworks. Since
-// we don't have an output function available here, we report as TEST-PASS.
-var Output = {
- print: message => assert.ok(true, message),
-};
-
-// Define assertion functions so they look the same across all frameworks.
-var Assert = {
- ok: assert.ok,
- equal: assert.equal,
-};
-
-// Define task registration functions, see description in "loader_common.js".
-function add_task_in_parent_process(taskFn, taskIdOverride) {
- let taskId = taskIdOverride || getTaskId(Components.stack.caller);
- Output.print("Registering in the parent process: " + taskId);
- addMessageListener("start_task_" + taskId, function () {
- Task.spawn(function* () {
- try {
- Output.print("Running in the parent process " + taskId);
- yield Task.spawn(taskFn);
- } catch (ex) {
- assert.ok(false, ex);
- }
-
- sendAsyncMessage("finish_task_" + taskId, {});
- });
- });
-}
-var add_task = function () {};
-var add_task_in_child_process = function () {};
-var add_task_in_both_processes = add_task_in_parent_process;
-
-// We need to wait for the child process to send us the path of the test file
-// to load before we can actually start loading it.
-var context = this;
-addMessageListener("start_load_in_parent", function (message) {
- Output.print("Starting loading infrastructure in parent process.");
- let headUrl = "chrome://mochitests/content/chrome/" +
- "toolkit/components/formautofill/test/chrome/head_common.js";
- Services.scriptloader.loadSubScript(headUrl, context);
-
- Services.scriptloader.loadSubScript(message.testUrl, context);
-
- // Register the execution of termination tasks after all other tasks.
- add_task_in_parent_process(terminationTaskFn, terminationTaskFn.name);
-
- Output.print("Finished loading infrastructure in parent process.");
- sendAsyncMessage("finish_load_in_parent", {});
-});
-
-// Reminder: unless you are adding new features to the framework, you shouldn't
-// have to modify this file. Use "head_common.js" or "head.js" for shared code.
diff --git a/toolkit/components/formautofill/test/chrome/test_infrastructure.html b/toolkit/components/formautofill/test/chrome/test_infrastructure.html
deleted file mode 100644
index 54f417f779..0000000000
--- a/toolkit/components/formautofill/test/chrome/test_infrastructure.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<!DOCTYPE html><html><head><meta charset="utf-8"></head><body>
-<script type="application/javascript;version=1.7" src="loader.js"></script>
-<!-- Any copyright is dedicated to the Public Domain.
- - http://creativecommons.org/publicdomain/zero/1.0/ -->
-
-<p id="paragraph">Paragraph contents.</p>
-
-</body></html>
diff --git a/toolkit/components/formautofill/test/chrome/test_infrastructure.js b/toolkit/components/formautofill/test/chrome/test_infrastructure.js
deleted file mode 100644
index c3b0b43ff4..0000000000
--- a/toolkit/components/formautofill/test/chrome/test_infrastructure.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Tests the local testing infrastructure.
- */
-
-"use strict";
-
-/**
- * Tests the truth assertion function.
- */
-add_task(function* test_assert_truth() {
- Assert.ok(1 != 2);
-});
-
-/**
- * Tests the equality assertion function.
- */
-add_task(function* test_assert_equality() {
- Assert.equal(1 + 1, 2);
-});
-
-/**
- * Uses some of the utility functions provided by the framework.
- */
-add_task(function* test_utility_functions() {
- // The "print" function is useful to log information that is not known before.
- let randomString = "R" + Math.floor(Math.random() * 10);
- Output.print("The random contents will be '" + randomString + "'.");
-
- // Create the text file with the random contents.
- let path = yield TestUtils.getTempFile("test-infrastructure.txt");
- yield OS.File.writeAtomic(path, new TextEncoder().encode(randomString));
-
- // Test a few utility functions.
- yield TestUtils.waitForTick();
- yield TestUtils.waitMs(50);
-
- let promiseMyNotification = TestUtils.waitForNotification("my-topic");
- Services.obs.notifyObservers(null, "my-topic", "");
- yield promiseMyNotification;
-
- // Check the file size. The file will be deleted automatically later.
- Assert.equal((yield OS.File.stat(path)).size, randomString.length);
-});
-
-/**
- * This type of test has access to the content declared above.
- */
-add_task(function* test_content() {
- Assert.equal($("paragraph").innerHTML, "Paragraph contents.");
-
- let promiseMyEvent = TestUtils.waitForEvent($("paragraph"), "MyEvent");
-
- let event = document.createEvent("CustomEvent");
- event.initCustomEvent("MyEvent", true, false, {});
- $("paragraph").dispatchEvent(event);
-
- yield promiseMyEvent;
-});
diff --git a/toolkit/components/formautofill/test/chrome/test_requestAutocomplete_cancel.html b/toolkit/components/formautofill/test/chrome/test_requestAutocomplete_cancel.html
deleted file mode 100644
index 8ae7ffd4bd..0000000000
--- a/toolkit/components/formautofill/test/chrome/test_requestAutocomplete_cancel.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE html><html><head><meta charset="utf-8"></head><body>
-<script type="application/javascript;version=1.7" src="loader.js"></script>
-<!-- Any copyright is dedicated to the Public Domain.
- - http://creativecommons.org/publicdomain/zero/1.0/ -->
-
-<form id="form">
-</form>
-
-</body></html>
diff --git a/toolkit/components/formautofill/test/chrome/test_requestAutocomplete_cancel.js b/toolkit/components/formautofill/test/chrome/test_requestAutocomplete_cancel.js
deleted file mode 100644
index 1ee12bd9aa..0000000000
--- a/toolkit/components/formautofill/test/chrome/test_requestAutocomplete_cancel.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Tests the response sent when requestAutocomplete is canceled by the user.
- */
-
-"use strict";
-
-/**
- * The requestAutocomplete UI will not be displayed during these tests.
- */
-add_task_in_parent_process(function* test_cancel_init() {
- FormAutofillTest.requestAutocompleteResponse = { canceled: true };
-});
-
-/**
- * Tests the case where the feature is canceled.
- */
-add_task(function* test_cancel() {
- let promise = TestUtils.waitForEvent($("form"), "autocompleteerror");
- $("form").requestAutocomplete();
- let errorEvent = yield promise;
-
- Assert.equal(errorEvent.reason, "cancel");
-});
diff --git a/toolkit/components/formautofill/test/head_common.js b/toolkit/components/formautofill/test/head_common.js
deleted file mode 100644
index 82b87e4a6c..0000000000
--- a/toolkit/components/formautofill/test/head_common.js
+++ /dev/null
@@ -1,245 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Initialization of Form Autofill tests shared between all frameworks.
- *
- * A copy of this file is installed in each of the framework subfolders, this
- * means it becomes a sibling of the test files in the final layout. This is
- * determined by how manifest "support-files" installation works.
- */
-
-"use strict";
-
-// The requestAutocomplete framework is available at this point, you can add
-// mochitest-chrome specific test initialization here. If you need shared
-// functions or initialization that are not specific to mochitest-chrome,
-// consider adding them to "head_common.js" in the parent folder instead.
-
-XPCOMUtils.defineLazyModuleGetter(this, "DownloadPaths",
- "resource://gre/modules/DownloadPaths.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
- "resource://gre/modules/FileUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "FormAutofill",
- "resource://gre/modules/FormAutofill.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
- "resource://gre/modules/NetUtil.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "OS",
- "resource://gre/modules/osfile.jsm");
-
-/* --- Global helpers --- */
-
-// Some of these functions are already implemented in other parts of the source
-// tree, see bug 946708 about sharing more code.
-
-var TestUtils = {
- /**
- * Waits for at least one tick of the event loop. This means that all pending
- * events at the time of this call will have been processed. Other events may
- * be processed before the returned promise is resolved.
- *
- * @return {Promise}
- * @resolves When pending events have been processed.
- * @rejects Never.
- */
- waitForTick: function () {
- return new Promise(resolve => executeSoon(resolve));
- },
-
- /**
- * Waits for the specified timeout.
- *
- * @param aTimeMs
- * Minimum time to wait from the moment of this call, in milliseconds.
- * The actual wait may be longer, due to system timer resolution and
- * pending events being processed before the promise is resolved.
- *
- * @return {Promise}
- * @resolves When the specified time has passed.
- * @rejects Never.
- */
- waitMs: function (aTimeMs) {
- return new Promise(resolve => setTimeout(resolve, aTimeMs));
- },
-
- /**
- * Allows waiting for an observer notification once.
- *
- * @param aTopic
- * Notification topic to observe.
- *
- * @return {Promise}
- * @resolves The array [aSubject, aData] from the observed notification.
- * @rejects Never.
- */
- waitForNotification: function (aTopic) {
- Output.print("Waiting for notification: '" + aTopic + "'.");
-
- return new Promise(resolve => Services.obs.addObserver(
- function observe(aSubject, aTopic, aData) {
- Services.obs.removeObserver(observe, aTopic);
- resolve([aSubject, aData]);
- }, aTopic, false));
- },
-
- /**
- * Waits for a DOM event on the specified target.
- *
- * @param aTarget
- * The DOM EventTarget on which addEventListener should be called.
- * @param aEventName
- * String with the name of the event.
- * @param aUseCapture
- * This parameter is passed to the addEventListener call.
- *
- * @return {Promise}
- * @resolves The arguments from the observed event.
- * @rejects Never.
- */
- waitForEvent: function (aTarget, aEventName, aUseCapture = false) {
- Output.print("Waiting for event: '" + aEventName + "' on " + aTarget + ".");
-
- return new Promise(resolve => aTarget.addEventListener(aEventName,
- function onEvent(...aArgs) {
- aTarget.removeEventListener(aEventName, onEvent, aUseCapture);
- resolve(...aArgs);
- }, aUseCapture));
- },
-
- // While the previous test file should have deleted all the temporary files it
- // used, on Windows these might still be pending deletion on the physical file
- // system. Thus, start from a new base number every time, to make a collision
- // with a file that is still pending deletion highly unlikely.
- _fileCounter: Math.floor(Math.random() * 1000000),
-
- /**
- * Returns a reference to a temporary file, that is guaranteed not to exist,
- * and to have never been created before.
- *
- * @param aLeafName
- * Suggested leaf name for the file to be created.
- *
- * @return {Promise}
- * @resolves Path of a non-existent file in a temporary directory.
- *
- * @note It is not enough to delete the file if it exists, or to delete the
- * file after calling nsIFile.createUnique, because on Windows the
- * delete operation in the file system may still be pending, preventing
- * a new file with the same name to be created.
- */
- getTempFile: Task.async(function* (aLeafName) {
- // Prepend a serial number to the extension in the suggested leaf name.
- let [base, ext] = DownloadPaths.splitBaseNameAndExtension(aLeafName);
- let leafName = base + "-" + this._fileCounter + ext;
- this._fileCounter++;
-
- // Get a file reference under the temporary directory for this test file.
- let path = OS.Path.join(OS.Constants.Path.tmpDir, leafName);
- Assert.ok(!(yield OS.File.exists(path)));
-
- // Ensure the file is deleted whe the test terminates.
- add_termination_task(function* () {
- if (yield OS.File.exists(path)) {
- yield OS.File.remove(path);
- }
- });
-
- return path;
- }),
-};
-
-/* --- Local helpers --- */
-
-var FormAutofillTest = {
- /**
- * Stores the response that the next call to the mock requestAutocomplete UI
- * will return to the requester, or null to enable displaying the default UI.
- */
- requestAutocompleteResponse: null,
-
- /**
- * Displays the requestAutocomplete user interface using the specified data.
- *
- * @param aFormAutofillData
- * Serializable object containing the set of requested fields.
- *
- * @return {Promise}
- * @resolves An object with the following properties:
- * {
- * uiWindow: Reference to the initialized window.
- * promiseResult: Promise resolved by the UI when it closes.
- * }
- */
- showUI: Task.async(function* (aFormAutofillData) {
- Output.print("Opening UI with data: " + JSON.stringify(aFormAutofillData));
-
- // Wait for the initialization event before opening the window.
- let promiseUIWindow =
- TestUtils.waitForNotification("formautofill-window-initialized");
- let ui = yield FormAutofill.integration.createRequestAutocompleteUI(
- aFormAutofillData);
- let promiseResult = ui.show();
-
- // The window is the subject of the observer notification.
- return {
- uiWindow: (yield promiseUIWindow)[0],
- promiseResult: promiseResult,
- };
- }),
-};
-
-var TestData = {
- /**
- * Autofill UI request for the e-mail field only.
- */
- get requestEmailOnly() {
- return {
- sections: [{
- name: "",
- addressSections: [{
- addressType: "",
- fields: [{
- fieldName: "email",
- contactType: "",
- }],
- }],
- }],
- };
- },
-};
-
-/* --- Initialization and termination functions common to all tests --- */
-
-add_task_in_parent_process(function* () {
- // If required, we return a mock response instead of displaying the UI.
- let mockIntegrationFn = base => ({
- createRequestAutocompleteUI: Task.async(function* () {
- // Call the base method to display the UI if override is not requested.
- if (FormAutofillTest.requestAutocompleteResponse === null) {
- return yield base.createRequestAutocompleteUI.apply(this, arguments);
- }
-
- // Return a mock RequestAutocompleteUI object.
- return {
- show: Task.async(function* () {
- let response = FormAutofillTest.requestAutocompleteResponse;
- Output.print("Mock UI response: " + JSON.stringify(response));
- return response;
- }),
- };
- }),
- });
-
- FormAutofill.registerIntegration(mockIntegrationFn);
- add_termination_task(function* () {
- FormAutofill.unregisterIntegration(mockIntegrationFn);
- });
-});
-
-add_task_in_both_processes(function* () {
- // We must manually enable the feature while testing.
- Services.prefs.setBoolPref("dom.forms.requestAutocomplete", true);
- add_termination_task(function* () {
- Services.prefs.clearUserPref("dom.forms.requestAutocomplete");
- });
-});
diff --git a/toolkit/components/formautofill/test/loader_common.js b/toolkit/components/formautofill/test/loader_common.js
deleted file mode 100644
index 340586b65b..0000000000
--- a/toolkit/components/formautofill/test/loader_common.js
+++ /dev/null
@@ -1,120 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Infrastructure common to the test frameworks located in subfolders.
- *
- * A copy of this file is installed in each of the framework subfolders, this
- * means it becomes a sibling of the test files in the final layout. This is
- * determined by how manifest "support-files" installation works.
- *
- * Unless you are adding new features to the framework, you shouldn't have to
- * modify this file. Use "head_common.js" or the "head.js" file of each
- * framework for shared code.
- */
-
-"use strict";
-
-/*
- * --------------------
- * FRAMEWORK OVERVIEW
- * --------------------
- *
- * This framework is designed in such a way that test can be written in similar
- * ways in the xpcshell, mochitest-chrome, and mochitest-browser frameworks,
- * both when tests are running in the parent process or in a content process.
- *
- * There are some basic self-documenting assertion and output functions:
- *
- * Assert.ok(actualValue);
- * Assert.is(actualValue, expectedValue);
- * Output.print(string);
- *
- * Test cases and initialization functions are declared in shared head files
- * ("head_common.js" and "head.js") as well as individual test files. When
- * tests run in an Elecrolysis (e10s) environment, they are executed in both
- * processes at first. Normally, at this point only the registration of test
- * cases happen. When everything has finished loading, tests are started and
- * appropriately synchronized between processes.
- *
- * Tests can be declared using the add_task syntax:
- *
- * add_task(function* test_something () { ... });
- * This adds a test either in the parent process or child process:
- * - Parent: xpcshell, mochitest-chrome --disable-e10s, mochitest-browser
- * - Child: mochitest-chrome with e10s
- * In the future, these might run in the child process for "xpcshell".
- *
- * add_task_in_parent_process(function* test_something () { ... });
- * This test runs in the parent process, but the child process will wait for
- * its completion before continuing with the next task. This wait currently
- * happens only in mochitest-chrome with e10s, in other frameworks that run
- * only in the parent process this is the same as a normal add_task.
- *
- * add_task_in_child_process(function* test_something () { ... });
- * This test runs only in the child process. This means that the test is not
- * run unless this is an e10s test, currently mochitest-chrome with e10s.
- *
- * add_task_in_both_processes(function* test_something () { ... });
- * Useful for initialization that must be done both in the parent and the
- * child, like setting preferences.
- *
- * add_termination_task(function* () { ... });
- * Registers a new asynchronous termination task. This is executed after all
- * test cases in the file finished, and always in the same process where the
- * termination task is registered.
- */
-XPCOMUtils.defineLazyModuleGetter(this, "Promise",
- "resource://gre/modules/Promise.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Task",
- "resource://gre/modules/Task.jsm");
-
-var gTerminationTasks = [];
-
-/**
- * None of the testing frameworks support asynchronous termination functions, so
- * this task must be registered later, after the other "add_task" calls.
- *
- * Even xpcshell doesn't support calling "add_task" in the "tail.js" file,
- * because it registers the task but does not wait for its termination,
- * potentially leading to intermittent failures in subsequent tests.
- */
-function* terminationTaskFn() {
- for (let taskFn of gTerminationTasks) {
- try {
- yield Task.spawn(taskFn);
- } catch (ex) {
- Output.print(ex);
- Assert.ok(false);
- }
- }
-}
-
-function add_termination_task(taskFn) {
- gTerminationTasks.push(taskFn);
-}
-
-/**
- * Returns a unique identifier used for synchronizing the given test task
- * between the parent and child processes.
- */
-function getTaskId(stackFrame) {
- return stackFrame.filename + ":" + stackFrame.lineNumber;
-}
-
-// This is a shared helper for mochitest-chrome and mochitest-browser.
-var _mochitestAssert = {
- ok: function (actual) {
- let stack = Components.stack.caller;
- ok(actual, "[" + stack.name + " : " + stack.lineNumber + "] " + actual +
- " == true");
- },
- equal: function (actual, expected) {
- let stack = Components.stack.caller;
- is(actual, expected, "[" + stack.name + " : " + stack.lineNumber + "] " +
- actual + " == " + expected);
- },
-};
-
-// Reminder: unless you are adding new features to the framework, you shouldn't
-// have to modify this file. Use "head_common.js" or "head.js" for shared code.
diff --git a/toolkit/components/formautofill/test/xpcshell/.eslintrc.js b/toolkit/components/formautofill/test/xpcshell/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/formautofill/test/xpcshell/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/formautofill/test/xpcshell/head.js b/toolkit/components/formautofill/test/xpcshell/head.js
deleted file mode 100644
index 1cee023f21..0000000000
--- a/toolkit/components/formautofill/test/xpcshell/head.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Initialization specific to Form Autofill xpcshell tests.
- *
- * This file is loaded by "loader.js".
- */
-
-"use strict";
-
-// The testing framework is fully initialized at this point, you can add
-// xpcshell specific test initialization here. If you need shared functions or
-// initialization that are not specific to xpcshell, consider adding them to
-// "head_common.js" in the parent folder instead.
-
-add_task_in_parent_process(function* test_xpcshell_initialize_profile() {
- // We need to send the profile-after-change notification manually to the
- // startup component to ensure it has been initialized.
- Cc["@mozilla.org/formautofill/startup;1"]
- .getService(Ci.nsIObserver)
- .observe(null, "profile-after-change", "");
-});
diff --git a/toolkit/components/formautofill/test/xpcshell/loader.js b/toolkit/components/formautofill/test/xpcshell/loader.js
deleted file mode 100644
index 449989c8ab..0000000000
--- a/toolkit/components/formautofill/test/xpcshell/loader.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Infrastructure for the xpcshell tests located in this folder.
- *
- * See "loader_common.js" in the parent folder for a general overview.
- *
- * Unless you are adding new features to the framework, you shouldn't have to
- * modify this file. Use "head_common.js" or "head.js" for shared code.
- */
-
-"use strict";
-
-var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
-Cu.import("resource://gre/modules/Services.jsm", this);
-
-Services.scriptloader.loadSubScript(
- Services.io.newFileURI(do_get_file("loader_common.js")).spec, this);
-
-// Define output functions so they look the same across all frameworks.
-var Output = {
- print: do_print,
-};
-
-var executeSoon = do_execute_soon;
-var setTimeout = (fn, delay) => do_timeout(delay, fn);
-
-// Define task registration functions, see description in "loader_common.js".
-var add_task_in_parent_process = add_task;
-var add_task_in_child_process = function () {};
-var add_task_in_both_processes = add_task;
-
-Services.scriptloader.loadSubScript(
- Services.io.newFileURI(do_get_file("head_common.js")).spec, this);
-
-// Tests are always run asynchronously and with the profile loaded.
-function run_test() {
- do_get_profile();
- run_next_test();
-}
-
-// Reminder: unless you are adding new features to the framework, you shouldn't
-// have to modify this file. Use "head_common.js" or "head.js" for shared code.
diff --git a/toolkit/components/formautofill/test/xpcshell/test_infrastructure.js b/toolkit/components/formautofill/test/xpcshell/test_infrastructure.js
deleted file mode 100644
index af27cfdb53..0000000000
--- a/toolkit/components/formautofill/test/xpcshell/test_infrastructure.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Tests the local testing infrastructure.
- */
-
-"use strict";
-
-/**
- * Tests the truth assertion function.
- */
-add_task(function* test_assert_truth() {
- Assert.ok(1 != 2);
-});
-
-/**
- * Tests the equality assertion function.
- */
-add_task(function* test_assert_equality() {
- Assert.equal(1 + 1, 2);
-});
-
-/**
- * Uses some of the utility functions provided by the framework.
- */
-add_task(function* test_utility_functions() {
- // The "print" function is useful to log information that is not known before.
- let randomString = "R" + Math.floor(Math.random() * 10);
- Output.print("The random contents will be '" + randomString + "'.");
-
- // Create the text file with the random contents.
- let path = yield TestUtils.getTempFile("test-infrastructure.txt");
- yield OS.File.writeAtomic(path, new TextEncoder().encode(randomString));
-
- // Test a few utility functions.
- yield TestUtils.waitForTick();
- yield TestUtils.waitMs(50);
-
- let promiseMyNotification = TestUtils.waitForNotification("my-topic");
- Services.obs.notifyObservers(null, "my-topic", "");
- yield promiseMyNotification;
-
- // Check the file size. The file will be deleted automatically later.
- Assert.equal((yield OS.File.stat(path)).size, randomString.length);
-});
-
-add_task(terminationTaskFn);
diff --git a/toolkit/components/formautofill/test/xpcshell/test_integration.js b/toolkit/components/formautofill/test/xpcshell/test_integration.js
deleted file mode 100644
index 7707f3880f..0000000000
--- a/toolkit/components/formautofill/test/xpcshell/test_integration.js
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Tests overriding the FormAutofillIntegration module functions.
- */
-
-"use strict";
-
-/**
- * The requestAutocomplete UI will not be displayed during these tests.
- */
-add_task_in_parent_process(function* test_initialize() {
- FormAutofillTest.requestAutocompleteResponse = { canceled: true };
-});
-
-/**
- * Registers and unregisters an integration override function.
- */
-add_task(function* test_integration_override() {
- let overrideCalled = false;
-
- let newIntegrationFn = base => ({
- createRequestAutocompleteUI: Task.async(function* () {
- overrideCalled = true;
- return yield base.createRequestAutocompleteUI.apply(this, arguments);
- }),
- });
-
- FormAutofill.registerIntegration(newIntegrationFn);
- try {
- let ui = yield FormAutofill.integration.createRequestAutocompleteUI({});
- let result = yield ui.show();
- Assert.ok(result.canceled);
- } finally {
- FormAutofill.unregisterIntegration(newIntegrationFn);
- }
-
- Assert.ok(overrideCalled);
-});
-
-/**
- * Registers an integration override function that throws an exception, and
- * ensures that this does not block other functions from being registered.
- */
-add_task(function* test_integration_override_error() {
- let overrideCalled = false;
-
- let errorIntegrationFn = base => { throw "Expected error." };
-
- let newIntegrationFn = base => ({
- createRequestAutocompleteUI: Task.async(function* () {
- overrideCalled = true;
- return yield base.createRequestAutocompleteUI.apply(this, arguments);
- }),
- });
-
- FormAutofill.registerIntegration(errorIntegrationFn);
- FormAutofill.registerIntegration(newIntegrationFn);
- try {
- let ui = yield FormAutofill.integration.createRequestAutocompleteUI({});
- let result = yield ui.show();
- Assert.ok(result.canceled);
- } finally {
- FormAutofill.unregisterIntegration(errorIntegrationFn);
- FormAutofill.unregisterIntegration(newIntegrationFn);
- }
-
- Assert.ok(overrideCalled);
-});
-
-add_task(terminationTaskFn);
diff --git a/toolkit/components/formautofill/test/xpcshell/xpcshell.ini b/toolkit/components/formautofill/test/xpcshell/xpcshell.ini
deleted file mode 100644
index 711c03399f..0000000000
--- a/toolkit/components/formautofill/test/xpcshell/xpcshell.ini
+++ /dev/null
@@ -1,12 +0,0 @@
-[DEFAULT]
-head = loader.js head.js
-tail =
-skip-if = toolkit == 'android'
-# The following files starting with ".." are installed in the current folder.
-# However, they cannot be referenced directly in the "head" directive above.
-support-files =
- ../head_common.js
- ../loader_common.js
-
-[test_infrastructure.js]
-[test_integration.js]
diff --git a/toolkit/components/jsdownloads/moz.build b/toolkit/components/jsdownloads/moz.build
index 62f08b160b..56566bc977 100644
--- a/toolkit/components/jsdownloads/moz.build
+++ b/toolkit/components/jsdownloads/moz.build
@@ -4,15 +4,4 @@
# 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/.
-with Files('*'):
- BUG_COMPONENT = ('Toolkit', 'Download Manager')
-
DIRS += ['public', 'src']
-
-XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
-BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
-
-TEST_HARNESS_FILES.xpcshell.toolkit.components.jsdownloads.test.data += [
- 'test/data/empty.txt',
- 'test/data/source.txt',
-]
diff --git a/toolkit/components/jsdownloads/src/DownloadIntegration.jsm b/toolkit/components/jsdownloads/src/DownloadIntegration.jsm
index 995cc06695..7656128d2f 100644
--- a/toolkit/components/jsdownloads/src/DownloadIntegration.jsm
+++ b/toolkit/components/jsdownloads/src/DownloadIntegration.jsm
@@ -70,10 +70,6 @@ XPCOMUtils.defineLazyServiceGetter(this, "gMIMEService",
XPCOMUtils.defineLazyServiceGetter(this, "gExternalProtocolService",
"@mozilla.org/uriloader/external-protocol-service;1",
"nsIExternalProtocolService");
-#ifdef MOZ_WIDGET_ANDROID
-XPCOMUtils.defineLazyModuleGetter(this, "RuntimePermissions",
- "resource://gre/modules/RuntimePermissions.jsm");
-#endif
XPCOMUtils.defineLazyGetter(this, "gParentalControlsService", function() {
if ("@mozilla.org/parental-controls-service;1" in Cc) {
@@ -299,14 +295,10 @@ this.DownloadIntegration = {
aDownload.hasBlockedData) {
return true;
}
-#if defined(MOZ_WIDGET_ANDROID)
- // On Android we store all history.
- return true;
-#else
+
// On Desktop, stopped downloads for which we don't need to track the
// presence of a ".part" file are only retained in the browser history.
return false;
-#endif
},
/**
@@ -332,16 +324,8 @@ this.DownloadIntegration = {
} else {
directoryPath = this._getDirectory("DfltDwnld");
}
+
#elifdef XP_UNIX
-#ifdef MOZ_WIDGET_ANDROID
- // Android doesn't have a $HOME directory, and by default we only have
- // write access to /data/data/org.mozilla.{$APP} and /sdcard
- directoryPath = gEnvironment.get("DOWNLOADS_DIRECTORY");
- if (!directoryPath) {
- throw new Components.Exception("DOWNLOADS_DIRECTORY is not set.",
- Cr.NS_ERROR_FILE_UNRECOGNIZED_PATH);
- }
-#else
// For Linux, use XDG download dir, with a fallback to Home/Downloads
// if the XDG user dirs are disabled.
try {
@@ -349,7 +333,6 @@ this.DownloadIntegration = {
} catch(e) {
directoryPath = yield this._createDownloadsDirectory("Home");
}
-#endif
#else
directoryPath = yield this._createDownloadsDirectory("Home");
#endif
@@ -403,8 +386,6 @@ this.DownloadIntegration = {
let directoryPath = null;
#ifdef XP_MACOSX
directoryPath = yield this.getPreferredDownloadsDirectory();
-#elifdef MOZ_WIDGET_ANDROID
- directoryPath = yield this.getSystemDownloadsDirectory();
#else
directoryPath = this._getDirectory("TmpD");
#endif
@@ -443,12 +424,7 @@ this.DownloadIntegration = {
* @resolves The boolean indicates to block downloads or not.
*/
shouldBlockForRuntimePermissions() {
-#ifdef MOZ_WIDGET_ANDROID
- return RuntimePermissions.waitForPermissions(RuntimePermissions.WRITE_EXTERNAL_STORAGE)
- .then(permissionGranted => !permissionGranted);
-#else
return Promise.resolve(false);
-#endif
},
/**
diff --git a/toolkit/components/jsdownloads/src/DownloadPlatform.cpp b/toolkit/components/jsdownloads/src/DownloadPlatform.cpp
index d91124ee6d..66ad2b8fa8 100644
--- a/toolkit/components/jsdownloads/src/DownloadPlatform.cpp
+++ b/toolkit/components/jsdownloads/src/DownloadPlatform.cpp
@@ -30,10 +30,6 @@
#include "../../../../xpcom/io/CocoaFileUtils.h"
#endif
-#ifdef MOZ_WIDGET_ANDROID
-#include "FennecJNIWrappers.h"
-#endif
-
#ifdef MOZ_WIDGET_GTK
#include <gtk/gtk.h>
#endif
@@ -101,21 +97,15 @@ CFURLRef CreateCFURLFromNSIURI(nsIURI *aURI) {
nsresult DownloadPlatform::DownloadDone(nsIURI* aSource, nsIURI* aReferrer, nsIFile* aTarget,
const nsACString& aContentType, bool aIsPrivate)
{
-#if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_ANDROID) \
- || defined(MOZ_WIDGET_GTK)
+#if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_GTK)
nsAutoString path;
if (aTarget && NS_SUCCEEDED(aTarget->GetPath(path))) {
-#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_ANDROID)
+#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK)
// On Windows and Gtk, add the download to the system's "recent documents"
// list, with a pref to disable.
{
bool addToRecentDocs = Preferences::GetBool(PREF_BDM_ADDTORECENTDOCS);
-#ifdef MOZ_WIDGET_ANDROID
- if (jni::IsFennec() && addToRecentDocs) {
- java::DownloadsIntegration::ScanMedia(path, aContentType);
- }
-#else
if (addToRecentDocs && !aIsPrivate) {
#ifdef XP_WIN
::SHAddToRecentDocs(SHARD_PATHW, path.get());
@@ -130,7 +120,7 @@ nsresult DownloadPlatform::DownloadDone(nsIURI* aSource, nsIURI* aReferrer, nsIF
}
#endif
}
-#endif
+
#ifdef MOZ_ENABLE_GIO
// Use GIO to store the source URI for later display in the file manager.
GFile* gio_file = g_file_new_for_path(NS_ConvertUTF16toUTF8(path).get());
diff --git a/toolkit/components/jsdownloads/test/browser/.eslintrc.js b/toolkit/components/jsdownloads/test/browser/.eslintrc.js
deleted file mode 100644
index 7c80211924..0000000000
--- a/toolkit/components/jsdownloads/test/browser/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/mochitest/browser.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/jsdownloads/test/browser/browser.ini b/toolkit/components/jsdownloads/test/browser/browser.ini
deleted file mode 100644
index 131fc4ec86..0000000000
--- a/toolkit/components/jsdownloads/test/browser/browser.ini
+++ /dev/null
@@ -1,7 +0,0 @@
-[DEFAULT]
-support-files =
- head.js
- testFile.html
-
-[browser_DownloadPDFSaver.js]
-skip-if = os != "win"
diff --git a/toolkit/components/jsdownloads/test/browser/browser_DownloadPDFSaver.js b/toolkit/components/jsdownloads/test/browser/browser_DownloadPDFSaver.js
deleted file mode 100644
index 80ed9665a7..0000000000
--- a/toolkit/components/jsdownloads/test/browser/browser_DownloadPDFSaver.js
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests the PDF download saver, and tests using a window as a
- * source for the copy download saver.
- */
-
-"use strict";
-
-/**
- * Helper function to make sure a window reference exists on the download source.
- */
-function* test_download_windowRef(aTab, aDownload) {
- ok(aDownload.source.windowRef, "Download source had a window reference");
- ok(aDownload.source.windowRef instanceof Ci.xpcIJSWeakReference, "Download window reference is a weak ref");
- is(aDownload.source.windowRef.get(), aTab.linkedBrowser.contentWindow, "Download window exists during test");
-}
-
-/**
- * Helper function to check the state of a completed download.
- */
-function* test_download_state_complete(aTab, aDownload, aPrivate, aCanceled) {
- ok(aDownload.source, "Download has a source");
- is(aDownload.source.url, aTab.linkedBrowser.contentWindow.location, "Download source has correct url");
- is(aDownload.source.isPrivate, aPrivate, "Download source has correct private state");
- ok(aDownload.stopped, "Download is stopped");
- is(aCanceled, aDownload.canceled, "Download has correct canceled state");
- is(!aCanceled, aDownload.succeeded, "Download has correct succeeded state");
- is(aDownload.error, null, "Download error is not defined");
-}
-
-function* test_createDownload_common(aPrivate, aType) {
- let win = yield BrowserTestUtils.openNewBrowserWindow({ private : aPrivate});
-
- let tab = yield BrowserTestUtils.openNewForegroundTab(win.gBrowser, getRootDirectory(gTestPath) + "testFile.html");
- let download = yield Downloads.createDownload({
- source: tab.linkedBrowser.contentWindow,
- target: { path: getTempFile(TEST_TARGET_FILE_NAME_PDF).path },
- saver: { type: aType }
- });
-
- yield test_download_windowRef(tab, download);
- yield download.start();
-
- yield test_download_state_complete(tab, download, aPrivate, false);
- if (aType == "pdf") {
- let signature = yield OS.File.read(download.target.path,
- { bytes: 4, encoding: "us-ascii" });
- is(signature, "%PDF", "File exists and signature matches");
- } else {
- ok((yield OS.File.exists(download.target.path)), "File exists");
- }
-
- win.gBrowser.removeTab(tab);
- win.close()
-}
-
-add_task(function* test_createDownload_pdf_private() {
- yield test_createDownload_common(true, "pdf");
-});
-add_task(function* test_createDownload_pdf_not_private() {
- yield test_createDownload_common(false, "pdf");
-});
-
-// Even for the copy saver, using a window should produce valid results
-add_task(function* test_createDownload_copy_private() {
- yield test_createDownload_common(true, "copy");
-});
-add_task(function* test_createDownload_copy_not_private() {
- yield test_createDownload_common(false, "copy");
-});
-
-add_task(function* test_cancel_pdf_download() {
- let tab = gBrowser.addTab(getRootDirectory(gTestPath) + "testFile.html");
- yield promiseBrowserLoaded(tab.linkedBrowser);
-
- let download = yield Downloads.createDownload({
- source: tab.linkedBrowser.contentWindow,
- target: { path: getTempFile(TEST_TARGET_FILE_NAME_PDF).path },
- saver: "pdf",
- });
-
- yield test_download_windowRef(tab, download);
- download.start().catch(() => {});
-
- // Immediately cancel the download to test that it is erased correctly.
- yield download.cancel();
- yield test_download_state_complete(tab, download, false, true);
-
- let exists = yield OS.File.exists(download.target.path)
- ok(!exists, "Target file does not exist");
-
- gBrowser.removeTab(tab);
-});
diff --git a/toolkit/components/jsdownloads/test/browser/head.js b/toolkit/components/jsdownloads/test/browser/head.js
deleted file mode 100644
index 769aaacb31..0000000000
--- a/toolkit/components/jsdownloads/test/browser/head.js
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Provides infrastructure for automated download components tests.
- */
-
-"use strict";
-
-// Globals
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-var Cr = Components.results;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "DownloadPaths",
- "resource://gre/modules/DownloadPaths.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Downloads",
- "resource://gre/modules/Downloads.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
- "resource://gre/modules/FileUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Services",
- "resource://gre/modules/Services.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "HttpServer",
- "resource://testing-common/httpd.js");
-XPCOMUtils.defineLazyModuleGetter(this, "OS",
- "resource://gre/modules/osfile.jsm");
-
-const TEST_TARGET_FILE_NAME_PDF = "test-download.pdf";
-
-// Support functions
-
-// While the previous test file should have deleted all the temporary files it
-// used, on Windows these might still be pending deletion on the physical file
-// system. Thus, start from a new base number every time, to make a collision
-// with a file that is still pending deletion highly unlikely.
-var gFileCounter = Math.floor(Math.random() * 1000000);
-
-/**
- * Returns a reference to a temporary file, that is guaranteed not to exist, and
- * to have never been created before.
- *
- * @param aLeafName
- * Suggested leaf name for the file to be created.
- *
- * @return nsIFile pointing to a non-existent file in a temporary directory.
- *
- * @note It is not enough to delete the file if it exists, or to delete the file
- * after calling nsIFile.createUnique, because on Windows the delete
- * operation in the file system may still be pending, preventing a new
- * file with the same name to be created.
- */
-function getTempFile(aLeafName)
-{
- // Prepend a serial number to the extension in the suggested leaf name.
- let [base, ext] = DownloadPaths.splitBaseNameAndExtension(aLeafName);
- let leafName = base + "-" + gFileCounter + ext;
- gFileCounter++;
-
- // Get a file reference under the temporary directory for this test file.
- let file = FileUtils.getFile("TmpD", [leafName]);
- ok(!file.exists(), "Temp file does not exist");
-
- registerCleanupFunction(function () {
- if (file.exists()) {
- file.remove(false);
- }
- });
-
- return file;
-}
-
-function promiseBrowserLoaded(browser) {
- return new Promise(resolve => {
- browser.addEventListener("load", function onLoad(event) {
- if (event.target == browser.contentDocument) {
- browser.removeEventListener("load", onLoad, true);
- resolve();
- }
- }, true);
- });
-}
diff --git a/toolkit/components/jsdownloads/test/browser/testFile.html b/toolkit/components/jsdownloads/test/browser/testFile.html
deleted file mode 100644
index ee413514b1..0000000000
--- a/toolkit/components/jsdownloads/test/browser/testFile.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>Test Save as PDF</title>
- </head>
- <body>
- <p>Save me as a PDF!</p>
- </body>
-</html>
diff --git a/toolkit/components/jsdownloads/test/data/.eslintrc.js b/toolkit/components/jsdownloads/test/data/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/jsdownloads/test/data/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/jsdownloads/test/data/empty.txt b/toolkit/components/jsdownloads/test/data/empty.txt
deleted file mode 100644
index e69de29bb2..0000000000
--- a/toolkit/components/jsdownloads/test/data/empty.txt
+++ /dev/null
diff --git a/toolkit/components/jsdownloads/test/data/source.txt b/toolkit/components/jsdownloads/test/data/source.txt
deleted file mode 100644
index 2156cb8c03..0000000000
--- a/toolkit/components/jsdownloads/test/data/source.txt
+++ /dev/null
@@ -1 +0,0 @@
-This test string is downloaded. \ No newline at end of file
diff --git a/toolkit/components/jsdownloads/test/unit/.eslintrc.js b/toolkit/components/jsdownloads/test/unit/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/jsdownloads/test/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/jsdownloads/test/unit/common_test_Download.js b/toolkit/components/jsdownloads/test/unit/common_test_Download.js
deleted file mode 100644
index 42d4c56828..0000000000
--- a/toolkit/components/jsdownloads/test/unit/common_test_Download.js
+++ /dev/null
@@ -1,2432 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * This script is loaded by "test_DownloadCore.js" and "test_DownloadLegacy.js"
- * with different values of the gUseLegacySaver variable, to apply tests to both
- * the "copy" and "legacy" saver implementations.
- */
-
-"use strict";
-
-// Globals
-
-const kDeleteTempFileOnExit = "browser.helperApps.deleteTempFileOnExit";
-
-/**
- * Creates and starts a new download, using either DownloadCopySaver or
- * DownloadLegacySaver based on the current test run.
- *
- * @return {Promise}
- * @resolves The newly created Download object. The download may be in progress
- * or already finished. The promiseDownloadStopped function can be
- * used to wait for completion.
- * @rejects JavaScript exception.
- */
-function promiseStartDownload(aSourceUrl) {
- if (gUseLegacySaver) {
- return promiseStartLegacyDownload(aSourceUrl);
- }
-
- return promiseNewDownload(aSourceUrl).then(download => {
- download.start().catch(() => {});
- return download;
- });
-}
-
-/**
- * Creates and starts a new download, configured to keep partial data, and
- * returns only when the first part of "interruptible_resumable.txt" has been
- * saved to disk. You must call "continueResponses" to allow the interruptible
- * request to continue.
- *
- * This function uses either DownloadCopySaver or DownloadLegacySaver based on
- * the current test run.
- *
- * @return {Promise}
- * @resolves The newly created Download object, still in progress.
- * @rejects JavaScript exception.
- */
-function promiseStartDownload_tryToKeepPartialData() {
- return Task.spawn(function* () {
- mustInterruptResponses();
-
- // Start a new download and configure it to keep partially downloaded data.
- let download;
- if (!gUseLegacySaver) {
- let targetFilePath = getTempFile(TEST_TARGET_FILE_NAME).path;
- download = yield Downloads.createDownload({
- source: httpUrl("interruptible_resumable.txt"),
- target: { path: targetFilePath,
- partFilePath: targetFilePath + ".part" },
- });
- download.tryToKeepPartialData = true;
- download.start().catch(() => {});
- } else {
- // Start a download using nsIExternalHelperAppService, that is configured
- // to keep partially downloaded data by default.
- download = yield promiseStartExternalHelperAppServiceDownload();
- }
-
- yield promiseDownloadMidway(download);
- yield promisePartFileReady(download);
-
- return download;
- });
-}
-
-/**
- * This function should be called after the progress notification for a download
- * is received, and waits for the worker thread of BackgroundFileSaver to
- * receive the data to be written to the ".part" file on disk.
- *
- * @return {Promise}
- * @resolves When the ".part" file has been written to disk.
- * @rejects JavaScript exception.
- */
-function promisePartFileReady(aDownload) {
- return Task.spawn(function* () {
- // We don't have control over the file output code in BackgroundFileSaver.
- // After we receive the download progress notification, we may only check
- // that the ".part" file has been created, while its size cannot be
- // determined because the file is currently open.
- try {
- do {
- yield promiseTimeout(50);
- } while (!(yield OS.File.exists(aDownload.target.partFilePath)));
- } catch (ex) {
- if (!(ex instanceof OS.File.Error)) {
- throw ex;
- }
- // This indicates that the file has been created and cannot be accessed.
- // The specific error might vary with the platform.
- do_print("Expected exception while checking existence: " + ex.toString());
- // Wait some more time to allow the write to complete.
- yield promiseTimeout(100);
- }
- });
-}
-
-/**
- * Checks that the actual data written to disk matches the expected data as well
- * as the properties of the given DownloadTarget object.
- *
- * @param downloadTarget
- * The DownloadTarget object whose details have to be verified.
- * @param expectedContents
- * String containing the octets that are expected in the file.
- *
- * @return {Promise}
- * @resolves When the properties have been verified.
- * @rejects JavaScript exception.
- */
-var promiseVerifyTarget = Task.async(function* (downloadTarget,
- expectedContents) {
- yield promiseVerifyContents(downloadTarget.path, expectedContents);
- do_check_true(downloadTarget.exists);
- do_check_eq(downloadTarget.size, expectedContents.length);
-});
-
-/**
- * Waits for an attempt to launch a file, and returns the nsIMIMEInfo used for
- * the launch, or null if the file was launched with the default handler.
- */
-function waitForFileLaunched() {
- return new Promise(resolve => {
- let waitFn = base => ({
- launchFile(file, mimeInfo) {
- Integration.downloads.unregister(waitFn);
- if (!mimeInfo ||
- mimeInfo.preferredAction == Ci.nsIMIMEInfo.useSystemDefault) {
- resolve(null);
- } else {
- resolve(mimeInfo);
- }
- return Promise.resolve();
- },
- });
- Integration.downloads.register(waitFn);
- });
-}
-
-/**
- * Waits for an attempt to show the directory where a file is located, and
- * returns the path of the file.
- */
-function waitForDirectoryShown() {
- return new Promise(resolve => {
- let waitFn = base => ({
- showContainingDirectory(path) {
- Integration.downloads.unregister(waitFn);
- resolve(path);
- return Promise.resolve();
- },
- });
- Integration.downloads.register(waitFn);
- });
-}
-
-// Tests
-
-/**
- * Executes a download and checks its basic properties after construction.
- * The download is started by constructing the simplest Download object with
- * the "copy" saver, or using the legacy nsITransfer interface.
- */
-add_task(function* test_basic()
-{
- let targetFile = getTempFile(TEST_TARGET_FILE_NAME);
-
- let download;
- if (!gUseLegacySaver) {
- // When testing DownloadCopySaver, we have control over the download, thus
- // we can check its basic properties before it starts.
- download = yield Downloads.createDownload({
- source: { url: httpUrl("source.txt") },
- target: { path: targetFile.path },
- saver: { type: "copy" },
- });
-
- do_check_eq(download.source.url, httpUrl("source.txt"));
- do_check_eq(download.target.path, targetFile.path);
-
- yield download.start();
- } else {
- // When testing DownloadLegacySaver, the download is already started when it
- // is created, thus we must check its basic properties while in progress.
- download = yield promiseStartLegacyDownload(null,
- { targetFile: targetFile });
-
- do_check_eq(download.source.url, httpUrl("source.txt"));
- do_check_eq(download.target.path, targetFile.path);
-
- yield promiseDownloadStopped(download);
- }
-
- // Check additional properties on the finished download.
- do_check_true(download.source.referrer === null);
-
- yield promiseVerifyTarget(download.target, TEST_DATA_SHORT);
-});
-
-/**
- * Executes a download with the tryToKeepPartialData property set, and ensures
- * that the file is saved correctly. When testing DownloadLegacySaver, the
- * download is executed using the nsIExternalHelperAppService component.
- */
-add_task(function* test_basic_tryToKeepPartialData()
-{
- let download = yield promiseStartDownload_tryToKeepPartialData();
- continueResponses();
- yield promiseDownloadStopped(download);
-
- // The target file should now have been created, and the ".part" file deleted.
- yield promiseVerifyTarget(download.target, TEST_DATA_SHORT + TEST_DATA_SHORT);
- do_check_false(yield OS.File.exists(download.target.partFilePath));
- do_check_eq(32, download.saver.getSha256Hash().length);
-});
-
-/**
- * Tests the permissions of the final target file once the download finished.
- */
-add_task(function* test_unix_permissions()
-{
- // This test is only executed on some Desktop systems.
- if (Services.appinfo.OS != "Darwin" && Services.appinfo.OS != "Linux" &&
- Services.appinfo.OS != "WINNT") {
- do_print("Skipping test.");
- return;
- }
-
- let launcherPath = getTempFile("app-launcher").path;
-
- for (let autoDelete of [false, true]) {
- for (let isPrivate of [false, true]) {
- for (let launchWhenSucceeded of [false, true]) {
- do_print("Checking " + JSON.stringify({ autoDelete,
- isPrivate,
- launchWhenSucceeded }));
-
- Services.prefs.setBoolPref(kDeleteTempFileOnExit, autoDelete);
-
- let download;
- if (!gUseLegacySaver) {
- download = yield Downloads.createDownload({
- source: { url: httpUrl("source.txt"), isPrivate },
- target: getTempFile(TEST_TARGET_FILE_NAME).path,
- launchWhenSucceeded,
- launcherPath,
- });
- yield download.start();
- } else {
- download = yield promiseStartLegacyDownload(httpUrl("source.txt"), {
- isPrivate,
- launchWhenSucceeded,
- launcherPath: launchWhenSucceeded && launcherPath,
- });
- yield promiseDownloadStopped(download);
- }
-
- let isTemporary = launchWhenSucceeded && (autoDelete || isPrivate);
- let stat = yield OS.File.stat(download.target.path);
- if (Services.appinfo.OS == "WINNT") {
- // On Windows
- // Temporary downloads should be read-only
- do_check_eq(stat.winAttributes.readOnly, isTemporary ? true : false);
- } else {
- // On Linux, Mac
- // Temporary downloads should be read-only and not accessible to other
- // users, while permanently downloaded files should be readable and
- // writable as specified by the system umask.
- do_check_eq(stat.unixMode,
- isTemporary ? 0o400 : (0o666 & ~OS.Constants.Sys.umask));
- }
- }
- }
- }
-
- // Clean up the changes to the preference.
- Services.prefs.clearUserPref(kDeleteTempFileOnExit);
-});
-
-/**
- * Checks the referrer for downloads.
- */
-add_task(function* test_referrer()
-{
- let sourcePath = "/test_referrer.txt";
- let sourceUrl = httpUrl("test_referrer.txt");
- let targetPath = getTempFile(TEST_TARGET_FILE_NAME).path;
-
- function cleanup() {
- gHttpServer.registerPathHandler(sourcePath, null);
- }
- do_register_cleanup(cleanup);
-
- gHttpServer.registerPathHandler(sourcePath, function (aRequest, aResponse) {
- aResponse.setHeader("Content-Type", "text/plain", false);
-
- do_check_true(aRequest.hasHeader("Referer"));
- do_check_eq(aRequest.getHeader("Referer"), TEST_REFERRER_URL);
- });
- let download = yield Downloads.createDownload({
- source: { url: sourceUrl, referrer: TEST_REFERRER_URL },
- target: targetPath,
- });
- do_check_eq(download.source.referrer, TEST_REFERRER_URL);
- yield download.start();
-
- download = yield Downloads.createDownload({
- source: { url: sourceUrl, referrer: TEST_REFERRER_URL,
- isPrivate: true },
- target: targetPath,
- });
- do_check_eq(download.source.referrer, TEST_REFERRER_URL);
- yield download.start();
-
- // Test the download still works for non-HTTP channel with referrer.
- sourceUrl = "data:text/html,<html><body></body></html>";
- download = yield Downloads.createDownload({
- source: { url: sourceUrl, referrer: TEST_REFERRER_URL },
- target: targetPath,
- });
- do_check_eq(download.source.referrer, TEST_REFERRER_URL);
- yield download.start();
-
- cleanup();
-});
-
-/**
- * Checks the adjustChannel callback for downloads.
- */
-add_task(function* test_adjustChannel()
-{
- const sourcePath = "/test_post.txt";
- const sourceUrl = httpUrl("test_post.txt");
- const targetPath = getTempFile(TEST_TARGET_FILE_NAME).path;
- const customHeader = { name: "X-Answer", value: "42" };
- const postData = "Don't Panic";
-
- function cleanup() {
- gHttpServer.registerPathHandler(sourcePath, null);
- }
- do_register_cleanup(cleanup);
-
- gHttpServer.registerPathHandler(sourcePath, aRequest => {
- do_check_eq(aRequest.method, "POST");
-
- do_check_true(aRequest.hasHeader(customHeader.name));
- do_check_eq(aRequest.getHeader(customHeader.name), customHeader.value);
-
- const stream = aRequest.bodyInputStream;
- const body = NetUtil.readInputStreamToString(stream, stream.available());
- do_check_eq(body, postData);
- });
-
- function adjustChannel(channel) {
- channel.QueryInterface(Ci.nsIHttpChannel);
- channel.setRequestHeader(customHeader.name, customHeader.value, false);
-
- const stream = Cc["@mozilla.org/io/string-input-stream;1"]
- .createInstance(Ci.nsIStringInputStream);
- stream.setData(postData, postData.length);
-
- channel.QueryInterface(Ci.nsIUploadChannel2);
- channel.explicitSetUploadStream(stream, null, -1, "POST", false);
-
- return Promise.resolve();
- }
-
- const download = yield Downloads.createDownload({
- source: { url: sourceUrl, adjustChannel },
- target: targetPath,
- });
- do_check_eq(download.source.adjustChannel, adjustChannel);
- do_check_eq(download.toSerializable(), null);
- yield download.start();
-
- cleanup();
-});
-
-/**
- * Checks initial and final state and progress for a successful download.
- */
-add_task(function* test_initial_final_state()
-{
- let download;
- if (!gUseLegacySaver) {
- // When testing DownloadCopySaver, we have control over the download, thus
- // we can check its state before it starts.
- download = yield promiseNewDownload();
-
- do_check_true(download.stopped);
- do_check_false(download.succeeded);
- do_check_false(download.canceled);
- do_check_true(download.error === null);
- do_check_eq(download.progress, 0);
- do_check_true(download.startTime === null);
- do_check_false(download.target.exists);
- do_check_eq(download.target.size, 0);
-
- yield download.start();
- } else {
- // When testing DownloadLegacySaver, the download is already started when it
- // is created, thus we cannot check its initial state.
- download = yield promiseStartLegacyDownload();
- yield promiseDownloadStopped(download);
- }
-
- do_check_true(download.stopped);
- do_check_true(download.succeeded);
- do_check_false(download.canceled);
- do_check_true(download.error === null);
- do_check_eq(download.progress, 100);
- do_check_true(isValidDate(download.startTime));
- do_check_true(download.target.exists);
- do_check_eq(download.target.size, TEST_DATA_SHORT.length);
-});
-
-/**
- * Checks the notification of the final download state.
- */
-add_task(function* test_final_state_notified()
-{
- mustInterruptResponses();
-
- let download = yield promiseStartDownload(httpUrl("interruptible.txt"));
-
- let onchangeNotified = false;
- let lastNotifiedStopped;
- let lastNotifiedProgress;
- download.onchange = function () {
- onchangeNotified = true;
- lastNotifiedStopped = download.stopped;
- lastNotifiedProgress = download.progress;
- };
-
- // Allow the download to complete.
- let promiseAttempt = download.start();
- continueResponses();
- yield promiseAttempt;
-
- // The view should have been notified before the download completes.
- do_check_true(onchangeNotified);
- do_check_true(lastNotifiedStopped);
- do_check_eq(lastNotifiedProgress, 100);
-});
-
-/**
- * Checks intermediate progress for a successful download.
- */
-add_task(function* test_intermediate_progress()
-{
- mustInterruptResponses();
-
- let download = yield promiseStartDownload(httpUrl("interruptible.txt"));
-
- yield promiseDownloadMidway(download);
-
- do_check_true(download.hasProgress);
- do_check_eq(download.currentBytes, TEST_DATA_SHORT.length);
- do_check_eq(download.totalBytes, TEST_DATA_SHORT.length * 2);
-
- // The final file size should not be computed for in-progress downloads.
- do_check_false(download.target.exists);
- do_check_eq(download.target.size, 0);
-
- // Continue after the first chunk of data is fully received.
- continueResponses();
- yield promiseDownloadStopped(download);
-
- do_check_true(download.stopped);
- do_check_eq(download.progress, 100);
-
- yield promiseVerifyTarget(download.target, TEST_DATA_SHORT + TEST_DATA_SHORT);
-});
-
-/**
- * Downloads a file with a "Content-Length" of 0 and checks the progress.
- */
-add_task(function* test_empty_progress()
-{
- let download = yield promiseStartDownload(httpUrl("empty.txt"));
- yield promiseDownloadStopped(download);
-
- do_check_true(download.stopped);
- do_check_true(download.hasProgress);
- do_check_eq(download.progress, 100);
- do_check_eq(download.currentBytes, 0);
- do_check_eq(download.totalBytes, 0);
-
- // We should have received the content type even for an empty file.
- do_check_eq(download.contentType, "text/plain");
-
- do_check_eq((yield OS.File.stat(download.target.path)).size, 0);
- do_check_true(download.target.exists);
- do_check_eq(download.target.size, 0);
-});
-
-/**
- * Downloads a file with a "Content-Length" of 0 with the tryToKeepPartialData
- * property set, and ensures that the file is saved correctly.
- */
-add_task(function* test_empty_progress_tryToKeepPartialData()
-{
- // Start a new download and configure it to keep partially downloaded data.
- let download;
- if (!gUseLegacySaver) {
- let targetFilePath = getTempFile(TEST_TARGET_FILE_NAME).path;
- download = yield Downloads.createDownload({
- source: httpUrl("empty.txt"),
- target: { path: targetFilePath,
- partFilePath: targetFilePath + ".part" },
- });
- download.tryToKeepPartialData = true;
- download.start().catch(() => {});
- } else {
- // Start a download using nsIExternalHelperAppService, that is configured
- // to keep partially downloaded data by default.
- download = yield promiseStartExternalHelperAppServiceDownload(
- httpUrl("empty.txt"));
- }
- yield promiseDownloadStopped(download);
-
- // The target file should now have been created, and the ".part" file deleted.
- do_check_eq((yield OS.File.stat(download.target.path)).size, 0);
- do_check_true(download.target.exists);
- do_check_eq(download.target.size, 0);
-
- do_check_false(yield OS.File.exists(download.target.partFilePath));
- do_check_eq(32, download.saver.getSha256Hash().length);
-});
-
-/**
- * Downloads an empty file with no "Content-Length" and checks the progress.
- */
-add_task(function* test_empty_noprogress()
-{
- let sourcePath = "/test_empty_noprogress.txt";
- let sourceUrl = httpUrl("test_empty_noprogress.txt");
- let deferRequestReceived = Promise.defer();
-
- // Register an interruptible handler that notifies us when the request occurs.
- function cleanup() {
- gHttpServer.registerPathHandler(sourcePath, null);
- }
- do_register_cleanup(cleanup);
-
- registerInterruptibleHandler(sourcePath,
- function firstPart(aRequest, aResponse) {
- aResponse.setHeader("Content-Type", "text/plain", false);
- deferRequestReceived.resolve();
- }, function secondPart(aRequest, aResponse) { });
-
- // Start the download, without allowing the request to finish.
- mustInterruptResponses();
- let download;
- if (!gUseLegacySaver) {
- // When testing DownloadCopySaver, we have control over the download, thus
- // we can hook its onchange callback that will be notified when the
- // download starts.
- download = yield promiseNewDownload(sourceUrl);
-
- download.onchange = function () {
- if (!download.stopped) {
- do_check_false(download.hasProgress);
- do_check_eq(download.currentBytes, 0);
- do_check_eq(download.totalBytes, 0);
- }
- };
-
- download.start().catch(() => {});
- } else {
- // When testing DownloadLegacySaver, the download is already started when it
- // is created, and it may have already made all needed property change
- // notifications, thus there is no point in checking the onchange callback.
- download = yield promiseStartLegacyDownload(sourceUrl);
- }
-
- // Wait for the request to be received by the HTTP server, but don't allow the
- // request to finish yet. Before checking the download state, wait for the
- // events to be processed by the client.
- yield deferRequestReceived.promise;
- yield promiseExecuteSoon();
-
- // Check that this download has no progress report.
- do_check_false(download.stopped);
- do_check_false(download.hasProgress);
- do_check_eq(download.currentBytes, 0);
- do_check_eq(download.totalBytes, 0);
-
- // Now allow the response to finish.
- continueResponses();
- yield promiseDownloadStopped(download);
-
- // We should have received the content type even if no progress is reported.
- do_check_eq(download.contentType, "text/plain");
-
- // Verify the state of the completed download.
- do_check_true(download.stopped);
- do_check_false(download.hasProgress);
- do_check_eq(download.progress, 100);
- do_check_eq(download.currentBytes, 0);
- do_check_eq(download.totalBytes, 0);
- do_check_true(download.target.exists);
- do_check_eq(download.target.size, 0);
-
- do_check_eq((yield OS.File.stat(download.target.path)).size, 0);
-});
-
-/**
- * Calls the "start" method two times before the download is finished.
- */
-add_task(function* test_start_twice()
-{
- mustInterruptResponses();
-
- let download;
- if (!gUseLegacySaver) {
- // When testing DownloadCopySaver, we have control over the download, thus
- // we can start the download later during the test.
- download = yield promiseNewDownload(httpUrl("interruptible.txt"));
- } else {
- // When testing DownloadLegacySaver, the download is already started when it
- // is created. Effectively, we are starting the download three times.
- download = yield promiseStartLegacyDownload(httpUrl("interruptible.txt"));
- }
-
- // Call the start method two times.
- let promiseAttempt1 = download.start();
- let promiseAttempt2 = download.start();
-
- // Allow the download to finish.
- continueResponses();
-
- // Both promises should now be resolved.
- yield promiseAttempt1;
- yield promiseAttempt2;
-
- do_check_true(download.stopped);
- do_check_true(download.succeeded);
- do_check_false(download.canceled);
- do_check_true(download.error === null);
-
- yield promiseVerifyTarget(download.target, TEST_DATA_SHORT + TEST_DATA_SHORT);
-});
-
-/**
- * Cancels a download and verifies that its state is reported correctly.
- */
-add_task(function* test_cancel_midway()
-{
- mustInterruptResponses();
-
- // In this test case, we execute different checks that are only possible with
- // DownloadCopySaver or DownloadLegacySaver respectively.
- let download;
- let options = {};
- if (!gUseLegacySaver) {
- download = yield promiseNewDownload(httpUrl("interruptible.txt"));
- } else {
- download = yield promiseStartLegacyDownload(httpUrl("interruptible.txt"),
- options);
- }
-
- // Cancel the download after receiving the first part of the response.
- let deferCancel = Promise.defer();
- let onchange = function () {
- if (!download.stopped && !download.canceled && download.progress == 50) {
- // Cancel the download immediately during the notification.
- deferCancel.resolve(download.cancel());
-
- // The state change happens immediately after calling "cancel", but
- // temporary files or part files may still exist at this point.
- do_check_true(download.canceled);
- }
- };
-
- // Register for the notification, but also call the function directly in
- // case the download already reached the expected progress. This may happen
- // when using DownloadLegacySaver.
- download.onchange = onchange;
- onchange();
-
- let promiseAttempt;
- if (!gUseLegacySaver) {
- promiseAttempt = download.start();
- }
-
- // Wait on the promise returned by the "cancel" method to ensure that the
- // cancellation process finished and temporary files were removed.
- yield deferCancel.promise;
-
- if (gUseLegacySaver) {
- // The nsIWebBrowserPersist instance should have been canceled now.
- do_check_eq(options.outPersist.result, Cr.NS_ERROR_ABORT);
- }
-
- do_check_true(download.stopped);
- do_check_true(download.canceled);
- do_check_true(download.error === null);
- do_check_false(download.target.exists);
- do_check_eq(download.target.size, 0);
-
- do_check_false(yield OS.File.exists(download.target.path));
-
- // Progress properties are not reset by canceling.
- do_check_eq(download.progress, 50);
- do_check_eq(download.totalBytes, TEST_DATA_SHORT.length * 2);
- do_check_eq(download.currentBytes, TEST_DATA_SHORT.length);
-
- if (!gUseLegacySaver) {
- // The promise returned by "start" should have been rejected meanwhile.
- try {
- yield promiseAttempt;
- do_throw("The download should have been canceled.");
- } catch (ex) {
- if (!(ex instanceof Downloads.Error)) {
- throw ex;
- }
- do_check_false(ex.becauseSourceFailed);
- do_check_false(ex.becauseTargetFailed);
- }
- }
-});
-
-/**
- * Cancels a download while keeping partially downloaded data, and verifies that
- * both the target file and the ".part" file are deleted.
- */
-add_task(function* test_cancel_midway_tryToKeepPartialData()
-{
- let download = yield promiseStartDownload_tryToKeepPartialData();
-
- do_check_true(yield OS.File.exists(download.target.path));
- do_check_true(yield OS.File.exists(download.target.partFilePath));
-
- yield download.cancel();
- yield download.removePartialData();
-
- do_check_true(download.stopped);
- do_check_true(download.canceled);
- do_check_true(download.error === null);
-
- do_check_false(yield OS.File.exists(download.target.path));
- do_check_false(yield OS.File.exists(download.target.partFilePath));
-});
-
-/**
- * Cancels a download right after starting it.
- */
-add_task(function* test_cancel_immediately()
-{
- mustInterruptResponses();
-
- let download = yield promiseStartDownload(httpUrl("interruptible.txt"));
-
- let promiseAttempt = download.start();
- do_check_false(download.stopped);
-
- let promiseCancel = download.cancel();
- do_check_true(download.canceled);
-
- // At this point, we don't know whether the download has already stopped or
- // is still waiting for cancellation. We can wait on the promise returned
- // by the "start" method to know for sure.
- try {
- yield promiseAttempt;
- do_throw("The download should have been canceled.");
- } catch (ex) {
- if (!(ex instanceof Downloads.Error)) {
- throw ex;
- }
- do_check_false(ex.becauseSourceFailed);
- do_check_false(ex.becauseTargetFailed);
- }
-
- do_check_true(download.stopped);
- do_check_true(download.canceled);
- do_check_true(download.error === null);
-
- do_check_false(yield OS.File.exists(download.target.path));
-
- // Check that the promise returned by the "cancel" method has been resolved.
- yield promiseCancel;
-});
-
-/**
- * Cancels and restarts a download sequentially.
- */
-add_task(function* test_cancel_midway_restart()
-{
- mustInterruptResponses();
-
- let download = yield promiseStartDownload(httpUrl("interruptible.txt"));
-
- // The first time, cancel the download midway.
- yield promiseDownloadMidway(download);
- yield download.cancel();
-
- do_check_true(download.stopped);
-
- // The second time, we'll provide the entire interruptible response.
- continueResponses();
- download.onchange = null;
- let promiseAttempt = download.start();
-
- // Download state should have already been reset.
- do_check_false(download.stopped);
- do_check_false(download.canceled);
- do_check_true(download.error === null);
-
- // For the following test, we rely on the network layer reporting its progress
- // asynchronously. Otherwise, there is nothing stopping the restarted
- // download from reaching the same progress as the first request already.
- do_check_eq(download.progress, 0);
- do_check_eq(download.totalBytes, 0);
- do_check_eq(download.currentBytes, 0);
-
- yield promiseAttempt;
-
- do_check_true(download.stopped);
- do_check_true(download.succeeded);
- do_check_false(download.canceled);
- do_check_true(download.error === null);
-
- yield promiseVerifyTarget(download.target, TEST_DATA_SHORT + TEST_DATA_SHORT);
-});
-
-/**
- * Cancels a download and restarts it from where it stopped.
- */
-add_task(function* test_cancel_midway_restart_tryToKeepPartialData()
-{
- let download = yield promiseStartDownload_tryToKeepPartialData();
- yield download.cancel();
-
- do_check_true(download.stopped);
- do_check_true(download.hasPartialData);
-
- // The target file should not exist, but we should have kept the partial data.
- do_check_false(yield OS.File.exists(download.target.path));
- yield promiseVerifyContents(download.target.partFilePath, TEST_DATA_SHORT);
- do_check_false(download.target.exists);
- do_check_eq(download.target.size, 0);
-
- // Verify that the server sent the response from the start.
- do_check_eq(gMostRecentFirstBytePos, 0);
-
- // The second time, we'll request and obtain the second part of the response,
- // but we still stop when half of the remaining progress is reached.
- let deferMidway = Promise.defer();
- download.onchange = function () {
- if (!download.stopped && !download.canceled &&
- download.currentBytes == Math.floor(TEST_DATA_SHORT.length * 3 / 2)) {
- download.onchange = null;
- deferMidway.resolve();
- }
- };
-
- mustInterruptResponses();
- let promiseAttempt = download.start();
-
- // Continue when the number of bytes we received is correct, then check that
- // progress is at about 75 percent. The exact figure may vary because of
- // rounding issues, since the total number of bytes in the response might not
- // be a multiple of four.
- yield deferMidway.promise;
- do_check_true(download.progress > 72 && download.progress < 78);
-
- // Now we allow the download to finish.
- continueResponses();
- yield promiseAttempt;
-
- // Check that the server now sent the second part only.
- do_check_eq(gMostRecentFirstBytePos, TEST_DATA_SHORT.length);
-
- // The target file should now have been created, and the ".part" file deleted.
- yield promiseVerifyTarget(download.target, TEST_DATA_SHORT + TEST_DATA_SHORT);
- do_check_false(yield OS.File.exists(download.target.partFilePath));
-});
-
-/**
- * Cancels a download while keeping partially downloaded data, then removes the
- * data and restarts the download from the beginning.
- */
-add_task(function* test_cancel_midway_restart_removePartialData()
-{
- let download = yield promiseStartDownload_tryToKeepPartialData();
- yield download.cancel();
-
- do_check_true(download.hasPartialData);
- yield promiseVerifyContents(download.target.partFilePath, TEST_DATA_SHORT);
- do_check_false(download.target.exists);
- do_check_eq(download.target.size, 0);
-
- yield download.removePartialData();
-
- do_check_false(download.hasPartialData);
- do_check_false(yield OS.File.exists(download.target.partFilePath));
- do_check_false(download.target.exists);
- do_check_eq(download.target.size, 0);
-
- // The second time, we'll request and obtain the entire response again.
- continueResponses();
- yield download.start();
-
- // Verify that the server sent the response from the start.
- do_check_eq(gMostRecentFirstBytePos, 0);
-
- // The target file should now have been created, and the ".part" file deleted.
- yield promiseVerifyTarget(download.target, TEST_DATA_SHORT + TEST_DATA_SHORT);
- do_check_false(yield OS.File.exists(download.target.partFilePath));
-});
-
-/**
- * Cancels a download while keeping partially downloaded data, then removes the
- * data and restarts the download from the beginning without keeping the partial
- * data anymore.
- */
-add_task(function* test_cancel_midway_restart_tryToKeepPartialData_false()
-{
- let download = yield promiseStartDownload_tryToKeepPartialData();
- yield download.cancel();
-
- download.tryToKeepPartialData = false;
-
- // The above property change does not affect existing partial data.
- do_check_true(download.hasPartialData);
- yield promiseVerifyContents(download.target.partFilePath, TEST_DATA_SHORT);
-
- yield download.removePartialData();
- do_check_false(yield OS.File.exists(download.target.partFilePath));
-
- // Restart the download from the beginning.
- mustInterruptResponses();
- download.start().catch(() => {});
-
- yield promiseDownloadMidway(download);
- yield promisePartFileReady(download);
-
- // While the download is in progress, we should still have a ".part" file.
- do_check_false(download.hasPartialData);
- do_check_true(yield OS.File.exists(download.target.partFilePath));
-
- // On Unix, verify that the file with the partially downloaded data is not
- // accessible by other users on the system.
- if (Services.appinfo.OS == "Darwin" || Services.appinfo.OS == "Linux") {
- do_check_eq((yield OS.File.stat(download.target.partFilePath)).unixMode,
- 0o600);
- }
-
- yield download.cancel();
-
- // The ".part" file should be deleted now that the download is canceled.
- do_check_false(download.hasPartialData);
- do_check_false(yield OS.File.exists(download.target.partFilePath));
-
- // The third time, we'll request and obtain the entire response again.
- continueResponses();
- yield download.start();
-
- // Verify that the server sent the response from the start.
- do_check_eq(gMostRecentFirstBytePos, 0);
-
- // The target file should now have been created, and the ".part" file deleted.
- yield promiseVerifyTarget(download.target, TEST_DATA_SHORT + TEST_DATA_SHORT);
- do_check_false(yield OS.File.exists(download.target.partFilePath));
-});
-
-/**
- * Cancels a download right after starting it, then restarts it immediately.
- */
-add_task(function* test_cancel_immediately_restart_immediately()
-{
- mustInterruptResponses();
-
- let download = yield promiseStartDownload(httpUrl("interruptible.txt"));
- let promiseAttempt = download.start();
-
- do_check_false(download.stopped);
-
- download.cancel();
- do_check_true(download.canceled);
-
- let promiseRestarted = download.start();
- do_check_false(download.stopped);
- do_check_false(download.canceled);
- do_check_true(download.error === null);
-
- // For the following test, we rely on the network layer reporting its progress
- // asynchronously. Otherwise, there is nothing stopping the restarted
- // download from reaching the same progress as the first request already.
- do_check_eq(download.hasProgress, false);
- do_check_eq(download.progress, 0);
- do_check_eq(download.totalBytes, 0);
- do_check_eq(download.currentBytes, 0);
-
- // Ensure the next request is now allowed to complete, regardless of whether
- // the canceled request was received by the server or not.
- continueResponses();
- try {
- yield promiseAttempt;
- // If we get here, it means that the first attempt actually succeeded. In
- // fact, this could be a valid outcome, because the cancellation request may
- // not have been processed in time before the download finished.
- do_print("The download should have been canceled.");
- } catch (ex) {
- if (!(ex instanceof Downloads.Error)) {
- throw ex;
- }
- do_check_false(ex.becauseSourceFailed);
- do_check_false(ex.becauseTargetFailed);
- }
-
- yield promiseRestarted;
-
- do_check_true(download.stopped);
- do_check_true(download.succeeded);
- do_check_false(download.canceled);
- do_check_true(download.error === null);
-
- yield promiseVerifyTarget(download.target, TEST_DATA_SHORT + TEST_DATA_SHORT);
-});
-
-/**
- * Cancels a download midway, then restarts it immediately.
- */
-add_task(function* test_cancel_midway_restart_immediately()
-{
- mustInterruptResponses();
-
- let download = yield promiseStartDownload(httpUrl("interruptible.txt"));
- let promiseAttempt = download.start();
-
- // The first time, cancel the download midway.
- yield promiseDownloadMidway(download);
- download.cancel();
- do_check_true(download.canceled);
-
- let promiseRestarted = download.start();
- do_check_false(download.stopped);
- do_check_false(download.canceled);
- do_check_true(download.error === null);
-
- // For the following test, we rely on the network layer reporting its progress
- // asynchronously. Otherwise, there is nothing stopping the restarted
- // download from reaching the same progress as the first request already.
- do_check_eq(download.hasProgress, false);
- do_check_eq(download.progress, 0);
- do_check_eq(download.totalBytes, 0);
- do_check_eq(download.currentBytes, 0);
-
- // The second request is allowed to complete.
- continueResponses();
- try {
- yield promiseAttempt;
- do_throw("The download should have been canceled.");
- } catch (ex) {
- if (!(ex instanceof Downloads.Error)) {
- throw ex;
- }
- do_check_false(ex.becauseSourceFailed);
- do_check_false(ex.becauseTargetFailed);
- }
-
- yield promiseRestarted;
-
- do_check_true(download.stopped);
- do_check_true(download.succeeded);
- do_check_false(download.canceled);
- do_check_true(download.error === null);
-
- yield promiseVerifyTarget(download.target, TEST_DATA_SHORT + TEST_DATA_SHORT);
-});
-
-/**
- * Calls the "cancel" method on a successful download.
- */
-add_task(function* test_cancel_successful()
-{
- let download = yield promiseStartDownload();
- yield promiseDownloadStopped(download);
-
- // The cancel method should succeed with no effect.
- yield download.cancel();
-
- do_check_true(download.stopped);
- do_check_true(download.succeeded);
- do_check_false(download.canceled);
- do_check_true(download.error === null);
-
- yield promiseVerifyTarget(download.target, TEST_DATA_SHORT);
-});
-
-/**
- * Calls the "cancel" method two times in a row.
- */
-add_task(function* test_cancel_twice()
-{
- mustInterruptResponses();
-
- let download = yield promiseStartDownload(httpUrl("interruptible.txt"));
-
- let promiseAttempt = download.start();
- do_check_false(download.stopped);
-
- let promiseCancel1 = download.cancel();
- do_check_true(download.canceled);
- let promiseCancel2 = download.cancel();
-
- try {
- yield promiseAttempt;
- do_throw("The download should have been canceled.");
- } catch (ex) {
- if (!(ex instanceof Downloads.Error)) {
- throw ex;
- }
- do_check_false(ex.becauseSourceFailed);
- do_check_false(ex.becauseTargetFailed);
- }
-
- // Both promises should now be resolved.
- yield promiseCancel1;
- yield promiseCancel2;
-
- do_check_true(download.stopped);
- do_check_false(download.succeeded);
- do_check_true(download.canceled);
- do_check_true(download.error === null);
-
- do_check_false(yield OS.File.exists(download.target.path));
-});
-
-/**
- * Checks the "refresh" method for succeeded downloads.
- */
-add_task(function* test_refresh_succeeded()
-{
- let download = yield promiseStartDownload();
- yield promiseDownloadStopped(download);
-
- // The DownloadTarget properties should be the same after calling "refresh".
- yield download.refresh();
- yield promiseVerifyTarget(download.target, TEST_DATA_SHORT);
-
- // If the file is removed, only the "exists" property should change, and the
- // "size" property should keep its previous value.
- yield OS.File.move(download.target.path, download.target.path + ".old");
- yield download.refresh();
- do_check_false(download.target.exists);
- do_check_eq(download.target.size, TEST_DATA_SHORT.length);
-
- // The DownloadTarget properties should be restored when the file is put back.
- yield OS.File.move(download.target.path + ".old", download.target.path);
- yield download.refresh();
- yield promiseVerifyTarget(download.target, TEST_DATA_SHORT);
-});
-
-/**
- * Checks that a download cannot be restarted after the "finalize" method.
- */
-add_task(function* test_finalize()
-{
- mustInterruptResponses();
-
- let download = yield promiseStartDownload(httpUrl("interruptible.txt"));
-
- let promiseFinalized = download.finalize();
-
- try {
- yield download.start();
- do_throw("It should not be possible to restart after finalization.");
- } catch (ex) { }
-
- yield promiseFinalized;
-
- do_check_true(download.stopped);
- do_check_false(download.succeeded);
- do_check_true(download.canceled);
- do_check_true(download.error === null);
-
- do_check_false(yield OS.File.exists(download.target.path));
-});
-
-/**
- * Checks that the "finalize" method can remove partially downloaded data.
- */
-add_task(function* test_finalize_tryToKeepPartialData()
-{
- // Check finalization without removing partial data.
- let download = yield promiseStartDownload_tryToKeepPartialData();
- yield download.finalize();
-
- do_check_true(download.hasPartialData);
- do_check_true(yield OS.File.exists(download.target.partFilePath));
-
- // Clean up.
- yield download.removePartialData();
-
- // Check finalization while removing partial data.
- download = yield promiseStartDownload_tryToKeepPartialData();
- yield download.finalize(true);
-
- do_check_false(download.hasPartialData);
- do_check_false(yield OS.File.exists(download.target.partFilePath));
-});
-
-/**
- * Checks that whenSucceeded returns a promise that is resolved after a restart.
- */
-add_task(function* test_whenSucceeded_after_restart()
-{
- mustInterruptResponses();
-
- let promiseSucceeded;
-
- let download;
- if (!gUseLegacySaver) {
- // When testing DownloadCopySaver, we have control over the download, thus
- // we can verify getting a reference before the first download attempt.
- download = yield promiseNewDownload(httpUrl("interruptible.txt"));
- promiseSucceeded = download.whenSucceeded();
- download.start().catch(() => {});
- } else {
- // When testing DownloadLegacySaver, the download is already started when it
- // is created, thus we cannot get the reference before the first attempt.
- download = yield promiseStartLegacyDownload(httpUrl("interruptible.txt"));
- promiseSucceeded = download.whenSucceeded();
- }
-
- // Cancel the first download attempt.
- yield download.cancel();
-
- // The second request is allowed to complete.
- continueResponses();
- download.start().catch(() => {});
-
- // Wait for the download to finish by waiting on the whenSucceeded promise.
- yield promiseSucceeded;
-
- do_check_true(download.stopped);
- do_check_true(download.succeeded);
- do_check_false(download.canceled);
- do_check_true(download.error === null);
-
- yield promiseVerifyTarget(download.target, TEST_DATA_SHORT + TEST_DATA_SHORT);
-});
-
-/**
- * Ensures download error details are reported on network failures.
- */
-add_task(function* test_error_source()
-{
- let serverSocket = startFakeServer();
- try {
- let sourceUrl = "http://localhost:" + serverSocket.port + "/source.txt";
-
- let download;
- try {
- if (!gUseLegacySaver) {
- // When testing DownloadCopySaver, we want to check that the promise
- // returned by the "start" method is rejected.
- download = yield promiseNewDownload(sourceUrl);
-
- do_check_true(download.error === null);
-
- yield download.start();
- } else {
- // When testing DownloadLegacySaver, we cannot be sure whether we are
- // testing the promise returned by the "start" method or we are testing
- // the "error" property checked by promiseDownloadStopped. This happens
- // because we don't have control over when the download is started.
- download = yield promiseStartLegacyDownload(sourceUrl);
- yield promiseDownloadStopped(download);
- }
- do_throw("The download should have failed.");
- } catch (ex) {
- if (!(ex instanceof Downloads.Error) || !ex.becauseSourceFailed) {
- throw ex;
- }
- // A specific error object is thrown when reading from the source fails.
- }
-
- // Check the properties now that the download stopped.
- do_check_true(download.stopped);
- do_check_false(download.canceled);
- do_check_true(download.error !== null);
- do_check_true(download.error.becauseSourceFailed);
- do_check_false(download.error.becauseTargetFailed);
-
- do_check_false(yield OS.File.exists(download.target.path));
- do_check_false(download.target.exists);
- do_check_eq(download.target.size, 0);
- } finally {
- serverSocket.close();
- }
-});
-
-/**
- * Ensures a download error is reported when receiving less bytes than what was
- * specified in the Content-Length header.
- */
-add_task(function* test_error_source_partial()
-{
- let sourceUrl = httpUrl("shorter-than-content-length-http-1-1.txt");
-
- let enforcePref = Services.prefs.getBoolPref("network.http.enforce-framing.http1");
- Services.prefs.setBoolPref("network.http.enforce-framing.http1", true);
-
- function cleanup() {
- Services.prefs.setBoolPref("network.http.enforce-framing.http1", enforcePref);
- }
- do_register_cleanup(cleanup);
-
- let download;
- try {
- if (!gUseLegacySaver) {
- // When testing DownloadCopySaver, we want to check that the promise
- // returned by the "start" method is rejected.
- download = yield promiseNewDownload(sourceUrl);
-
- do_check_true(download.error === null);
-
- yield download.start();
- } else {
- // When testing DownloadLegacySaver, we cannot be sure whether we are
- // testing the promise returned by the "start" method or we are testing
- // the "error" property checked by promiseDownloadStopped. This happens
- // because we don't have control over when the download is started.
- download = yield promiseStartLegacyDownload(sourceUrl);
- yield promiseDownloadStopped(download);
- }
- do_throw("The download should have failed.");
- } catch (ex) {
- if (!(ex instanceof Downloads.Error) || !ex.becauseSourceFailed) {
- throw ex;
- }
- // A specific error object is thrown when reading from the source fails.
- }
-
- // Check the properties now that the download stopped.
- do_check_true(download.stopped);
- do_check_false(download.canceled);
- do_check_true(download.error !== null);
- do_check_true(download.error.becauseSourceFailed);
- do_check_false(download.error.becauseTargetFailed);
- do_check_eq(download.error.result, Cr.NS_ERROR_NET_PARTIAL_TRANSFER);
-
- do_check_false(yield OS.File.exists(download.target.path));
- do_check_false(download.target.exists);
- do_check_eq(download.target.size, 0);
-});
-
-/**
- * Ensures download error details are reported on local writing failures.
- */
-add_task(function* test_error_target()
-{
- // Create a file without write access permissions before downloading.
- let targetFile = getTempFile(TEST_TARGET_FILE_NAME);
- targetFile.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0);
- try {
- let download;
- try {
- if (!gUseLegacySaver) {
- // When testing DownloadCopySaver, we want to check that the promise
- // returned by the "start" method is rejected.
- download = yield Downloads.createDownload({
- source: httpUrl("source.txt"),
- target: targetFile,
- });
- yield download.start();
- } else {
- // When testing DownloadLegacySaver, we cannot be sure whether we are
- // testing the promise returned by the "start" method or we are testing
- // the "error" property checked by promiseDownloadStopped. This happens
- // because we don't have control over when the download is started.
- download = yield promiseStartLegacyDownload(null,
- { targetFile: targetFile });
- yield promiseDownloadStopped(download);
- }
- do_throw("The download should have failed.");
- } catch (ex) {
- if (!(ex instanceof Downloads.Error) || !ex.becauseTargetFailed) {
- throw ex;
- }
- // A specific error object is thrown when writing to the target fails.
- }
-
- // Check the properties now that the download stopped.
- do_check_true(download.stopped);
- do_check_false(download.canceled);
- do_check_true(download.error !== null);
- do_check_true(download.error.becauseTargetFailed);
- do_check_false(download.error.becauseSourceFailed);
- } finally {
- // Restore the default permissions to allow deleting the file on Windows.
- if (targetFile.exists()) {
- targetFile.permissions = FileUtils.PERMS_FILE;
- targetFile.remove(false);
- }
- }
-});
-
-/**
- * Restarts a failed download.
- */
-add_task(function* test_error_restart()
-{
- let download;
-
- // Create a file without write access permissions before downloading.
- let targetFile = getTempFile(TEST_TARGET_FILE_NAME);
- targetFile.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0);
- try {
- // Use DownloadCopySaver or DownloadLegacySaver based on the test run,
- // specifying the target file we created.
- if (!gUseLegacySaver) {
- download = yield Downloads.createDownload({
- source: httpUrl("source.txt"),
- target: targetFile,
- });
- download.start().catch(() => {});
- } else {
- download = yield promiseStartLegacyDownload(null,
- { targetFile: targetFile });
- }
- yield promiseDownloadStopped(download);
- do_throw("The download should have failed.");
- } catch (ex) {
- if (!(ex instanceof Downloads.Error) || !ex.becauseTargetFailed) {
- throw ex;
- }
- // A specific error object is thrown when writing to the target fails.
- } finally {
- // Restore the default permissions to allow deleting the file on Windows.
- if (targetFile.exists()) {
- targetFile.permissions = FileUtils.PERMS_FILE;
-
- // Also for Windows, rename the file before deleting. This makes the
- // current file name available immediately for a new file, while deleting
- // in place prevents creation of a file with the same name for some time.
- targetFile.moveTo(null, targetFile.leafName + ".delete.tmp");
- targetFile.remove(false);
- }
- }
-
- // Restart the download and wait for completion.
- yield download.start();
-
- do_check_true(download.stopped);
- do_check_true(download.succeeded);
- do_check_false(download.canceled);
- do_check_true(download.error === null);
- do_check_eq(download.progress, 100);
-
- yield promiseVerifyTarget(download.target, TEST_DATA_SHORT);
-});
-
-/**
- * Executes download in both public and private modes.
- */
-add_task(function* test_public_and_private()
-{
- let sourcePath = "/test_public_and_private.txt";
- let sourceUrl = httpUrl("test_public_and_private.txt");
- let testCount = 0;
-
- // Apply pref to allow all cookies.
- Services.prefs.setIntPref("network.cookie.cookieBehavior", 0);
-
- function cleanup() {
- Services.prefs.clearUserPref("network.cookie.cookieBehavior");
- Services.cookies.removeAll();
- gHttpServer.registerPathHandler(sourcePath, null);
- }
- do_register_cleanup(cleanup);
-
- gHttpServer.registerPathHandler(sourcePath, function (aRequest, aResponse) {
- aResponse.setHeader("Content-Type", "text/plain", false);
-
- if (testCount == 0) {
- // No cookies should exist for first public download.
- do_check_false(aRequest.hasHeader("Cookie"));
- aResponse.setHeader("Set-Cookie", "foobar=1", false);
- testCount++;
- } else if (testCount == 1) {
- // The cookie should exists for second public download.
- do_check_true(aRequest.hasHeader("Cookie"));
- do_check_eq(aRequest.getHeader("Cookie"), "foobar=1");
- testCount++;
- } else if (testCount == 2) {
- // No cookies should exist for first private download.
- do_check_false(aRequest.hasHeader("Cookie"));
- }
- });
-
- let targetFile = getTempFile(TEST_TARGET_FILE_NAME);
- yield Downloads.fetch(sourceUrl, targetFile);
- yield Downloads.fetch(sourceUrl, targetFile);
-
- if (!gUseLegacySaver) {
- let download = yield Downloads.createDownload({
- source: { url: sourceUrl, isPrivate: true },
- target: targetFile,
- });
- yield download.start();
- } else {
- let download = yield promiseStartLegacyDownload(sourceUrl,
- { isPrivate: true });
- yield promiseDownloadStopped(download);
- }
-
- cleanup();
-});
-
-/**
- * Checks the startTime gets updated even after a restart.
- */
-add_task(function* test_cancel_immediately_restart_and_check_startTime()
-{
- let download = yield promiseStartDownload();
-
- let startTime = download.startTime;
- do_check_true(isValidDate(download.startTime));
-
- yield download.cancel();
- do_check_eq(download.startTime.getTime(), startTime.getTime());
-
- // Wait for a timeout.
- yield promiseTimeout(10);
-
- yield download.start();
- do_check_true(download.startTime.getTime() > startTime.getTime());
-});
-
-/**
- * Executes download with content-encoding.
- */
-add_task(function* test_with_content_encoding()
-{
- let sourcePath = "/test_with_content_encoding.txt";
- let sourceUrl = httpUrl("test_with_content_encoding.txt");
-
- function cleanup() {
- gHttpServer.registerPathHandler(sourcePath, null);
- }
- do_register_cleanup(cleanup);
-
- gHttpServer.registerPathHandler(sourcePath, function (aRequest, aResponse) {
- aResponse.setHeader("Content-Type", "text/plain", false);
- aResponse.setHeader("Content-Encoding", "gzip", false);
- aResponse.setHeader("Content-Length",
- "" + TEST_DATA_SHORT_GZIP_ENCODED.length, false);
-
- let bos = new BinaryOutputStream(aResponse.bodyOutputStream);
- bos.writeByteArray(TEST_DATA_SHORT_GZIP_ENCODED,
- TEST_DATA_SHORT_GZIP_ENCODED.length);
- });
-
- let download = yield promiseStartDownload(sourceUrl);
- yield promiseDownloadStopped(download);
-
- do_check_eq(download.progress, 100);
- do_check_eq(download.totalBytes, TEST_DATA_SHORT_GZIP_ENCODED.length);
-
- // Ensure the content matches the decoded test data.
- yield promiseVerifyTarget(download.target, TEST_DATA_SHORT);
-
- cleanup();
-});
-
-/**
- * Checks that the file is not decoded if the extension matches the encoding.
- */
-add_task(function* test_with_content_encoding_ignore_extension()
-{
- let sourcePath = "/test_with_content_encoding_ignore_extension.gz";
- let sourceUrl = httpUrl("test_with_content_encoding_ignore_extension.gz");
-
- function cleanup() {
- gHttpServer.registerPathHandler(sourcePath, null);
- }
- do_register_cleanup(cleanup);
-
- gHttpServer.registerPathHandler(sourcePath, function (aRequest, aResponse) {
- aResponse.setHeader("Content-Type", "text/plain", false);
- aResponse.setHeader("Content-Encoding", "gzip", false);
- aResponse.setHeader("Content-Length",
- "" + TEST_DATA_SHORT_GZIP_ENCODED.length, false);
-
- let bos = new BinaryOutputStream(aResponse.bodyOutputStream);
- bos.writeByteArray(TEST_DATA_SHORT_GZIP_ENCODED,
- TEST_DATA_SHORT_GZIP_ENCODED.length);
- });
-
- let download = yield promiseStartDownload(sourceUrl);
- yield promiseDownloadStopped(download);
-
- do_check_eq(download.progress, 100);
- do_check_eq(download.totalBytes, TEST_DATA_SHORT_GZIP_ENCODED.length);
- do_check_eq(download.target.size, TEST_DATA_SHORT_GZIP_ENCODED.length);
-
- // Ensure the content matches the encoded test data. We convert the data to a
- // string before executing the content check.
- yield promiseVerifyTarget(download.target,
- String.fromCharCode.apply(String, TEST_DATA_SHORT_GZIP_ENCODED));
-
- cleanup();
-});
-
-/**
- * Cancels and restarts a download sequentially with content-encoding.
- */
-add_task(function* test_cancel_midway_restart_with_content_encoding()
-{
- mustInterruptResponses();
-
- let download = yield promiseStartDownload(httpUrl("interruptible_gzip.txt"));
-
- // The first time, cancel the download midway.
- let deferCancel = Promise.defer();
- let onchange = function () {
- if (!download.stopped && !download.canceled &&
- download.currentBytes == TEST_DATA_SHORT_GZIP_ENCODED_FIRST.length) {
- deferCancel.resolve(download.cancel());
- }
- };
-
- // Register for the notification, but also call the function directly in
- // case the download already reached the expected progress.
- download.onchange = onchange;
- onchange();
-
- yield deferCancel.promise;
-
- do_check_true(download.stopped);
-
- // The second time, we'll provide the entire interruptible response.
- continueResponses();
- download.onchange = null;
- yield download.start();
-
- do_check_eq(download.progress, 100);
- do_check_eq(download.totalBytes, TEST_DATA_SHORT_GZIP_ENCODED.length);
-
- yield promiseVerifyTarget(download.target, TEST_DATA_SHORT);
-});
-
-/**
- * Download with parental controls enabled.
- */
-add_task(function* test_blocked_parental_controls()
-{
- let blockFn = base => ({
- shouldBlockForParentalControls: () => Promise.resolve(true),
- });
-
- Integration.downloads.register(blockFn);
- function cleanup() {
- Integration.downloads.unregister(blockFn);
- }
- do_register_cleanup(cleanup);
-
- let download;
- try {
- if (!gUseLegacySaver) {
- // When testing DownloadCopySaver, we want to check that the promise
- // returned by the "start" method is rejected.
- download = yield promiseNewDownload();
- yield download.start();
- } else {
- // When testing DownloadLegacySaver, we cannot be sure whether we are
- // testing the promise returned by the "start" method or we are testing
- // the "error" property checked by promiseDownloadStopped. This happens
- // because we don't have control over when the download is started.
- download = yield promiseStartLegacyDownload();
- yield promiseDownloadStopped(download);
- }
- do_throw("The download should have blocked.");
- } catch (ex) {
- if (!(ex instanceof Downloads.Error) || !ex.becauseBlocked) {
- throw ex;
- }
- do_check_true(ex.becauseBlockedByParentalControls);
- do_check_true(download.error.becauseBlockedByParentalControls);
- }
-
- // Now that the download stopped, the target file should not exist.
- do_check_false(yield OS.File.exists(download.target.path));
-
- cleanup();
-});
-
-/**
- * Test a download that will be blocked by Windows parental controls by
- * resulting in an HTTP status code of 450.
- */
-add_task(function* test_blocked_parental_controls_httpstatus450()
-{
- let download;
- try {
- if (!gUseLegacySaver) {
- download = yield promiseNewDownload(httpUrl("parentalblocked.zip"));
- yield download.start();
- }
- else {
- download = yield promiseStartLegacyDownload(httpUrl("parentalblocked.zip"));
- yield promiseDownloadStopped(download);
- }
- do_throw("The download should have blocked.");
- } catch (ex) {
- if (!(ex instanceof Downloads.Error) || !ex.becauseBlocked) {
- throw ex;
- }
- do_check_true(ex.becauseBlockedByParentalControls);
- do_check_true(download.error.becauseBlockedByParentalControls);
- do_check_true(download.stopped);
- }
-
- do_check_false(yield OS.File.exists(download.target.path));
-});
-
-/**
- * Download with runtime permissions
- */
-add_task(function* test_blocked_runtime_permissions()
-{
- let blockFn = base => ({
- shouldBlockForRuntimePermissions: () => Promise.resolve(true),
- });
-
- Integration.downloads.register(blockFn);
- function cleanup() {
- Integration.downloads.unregister(blockFn);
- }
- do_register_cleanup(cleanup);
-
- let download;
- try {
- if (!gUseLegacySaver) {
- // When testing DownloadCopySaver, we want to check that the promise
- // returned by the "start" method is rejected.
- download = yield promiseNewDownload();
- yield download.start();
- } else {
- // When testing DownloadLegacySaver, we cannot be sure whether we are
- // testing the promise returned by the "start" method or we are testing
- // the "error" property checked by promiseDownloadStopped. This happens
- // because we don't have control over when the download is started.
- download = yield promiseStartLegacyDownload();
- yield promiseDownloadStopped(download);
- }
- do_throw("The download should have blocked.");
- } catch (ex) {
- if (!(ex instanceof Downloads.Error) || !ex.becauseBlocked) {
- throw ex;
- }
- do_check_true(ex.becauseBlockedByRuntimePermissions);
- do_check_true(download.error.becauseBlockedByRuntimePermissions);
- }
-
- // Now that the download stopped, the target file should not exist.
- do_check_false(yield OS.File.exists(download.target.path));
-
- cleanup();
-});
-
-/**
- * Check that DownloadCopySaver can always retrieve the hash.
- * DownloadLegacySaver can only retrieve the hash when
- * nsIExternalHelperAppService is invoked.
- */
-add_task(function* test_getSha256Hash()
-{
- if (!gUseLegacySaver) {
- let download = yield promiseStartDownload(httpUrl("source.txt"));
- yield promiseDownloadStopped(download);
- do_check_true(download.stopped);
- do_check_eq(32, download.saver.getSha256Hash().length);
- }
-});
-
-/**
- * Create a download which will be reputation blocked.
- *
- * @param options
- * {
- * keepPartialData: bool,
- * keepBlockedData: bool,
- * }
- * @return {Promise}
- * @resolves The reputation blocked download.
- * @rejects JavaScript exception.
- */
-var promiseBlockedDownload = Task.async(function* (options) {
- let blockFn = base => ({
- shouldBlockForReputationCheck: () => Promise.resolve({
- shouldBlock: true,
- verdict: Downloads.Error.BLOCK_VERDICT_UNCOMMON,
- }),
- shouldKeepBlockedData: () => Promise.resolve(options.keepBlockedData),
- });
-
- Integration.downloads.register(blockFn);
- function cleanup() {
- Integration.downloads.unregister(blockFn);
- }
- do_register_cleanup(cleanup);
-
- let download;
-
- try {
- if (options.keepPartialData) {
- download = yield promiseStartDownload_tryToKeepPartialData();
- continueResponses();
- } else if (gUseLegacySaver) {
- download = yield promiseStartLegacyDownload();
- } else {
- download = yield promiseNewDownload();
- yield download.start();
- do_throw("The download should have blocked.");
- }
-
- yield promiseDownloadStopped(download);
- do_throw("The download should have blocked.");
- } catch (ex) {
- if (!(ex instanceof Downloads.Error) || !ex.becauseBlocked) {
- throw ex;
- }
- do_check_true(ex.becauseBlockedByReputationCheck);
- do_check_eq(ex.reputationCheckVerdict,
- Downloads.Error.BLOCK_VERDICT_UNCOMMON);
- do_check_true(download.error.becauseBlockedByReputationCheck);
- do_check_eq(download.error.reputationCheckVerdict,
- Downloads.Error.BLOCK_VERDICT_UNCOMMON);
- }
-
- do_check_true(download.stopped);
- do_check_false(download.succeeded);
- do_check_false(yield OS.File.exists(download.target.path));
-
- cleanup();
- return download;
-});
-
-/**
- * Checks that application reputation blocks the download and the target file
- * does not exist.
- */
-add_task(function* test_blocked_applicationReputation()
-{
- let download = yield promiseBlockedDownload({
- keepPartialData: false,
- keepBlockedData: false,
- });
-
- // Now that the download is blocked, the target file should not exist.
- do_check_false(yield OS.File.exists(download.target.path));
- do_check_false(download.target.exists);
- do_check_eq(download.target.size, 0);
-
- // There should also be no blocked data in this case
- do_check_false(download.hasBlockedData);
-});
-
-/**
- * Checks that if a download restarts while processing an application reputation
- * request, the status is handled correctly.
- */
-add_task(function* test_blocked_applicationReputation_race()
-{
- let isFirstShouldBlockCall = true;
-
- let blockFn = base => ({
- shouldBlockForReputationCheck(download) {
- if (isFirstShouldBlockCall) {
- isFirstShouldBlockCall = false;
-
- // 2. Cancel and restart the download before the first attempt has a
- // chance to finish.
- download.cancel();
- download.removePartialData();
- download.start();
-
- // 3. Allow the first attempt to finish with a blocked response.
- return Promise.resolve({
- shouldBlock: true,
- verdict: Downloads.Error.BLOCK_VERDICT_UNCOMMON,
- });
- }
-
- // 4/5. Don't block the download the second time. The race condition would
- // occur with the first attempt regardless of whether the second one
- // is blocked, but not blocking here makes the test simpler.
- return Promise.resolve({
- shouldBlock: false,
- verdict: "",
- });
- },
- shouldKeepBlockedData: () => Promise.resolve(true),
- });
-
- Integration.downloads.register(blockFn);
- function cleanup() {
- Integration.downloads.unregister(blockFn);
- }
- do_register_cleanup(cleanup);
-
- let download;
-
- try {
- // 1. Start the download and get a reference to the promise asociated with
- // the first attempt, before allowing the response to continue.
- download = yield promiseStartDownload_tryToKeepPartialData();
- let firstAttempt = promiseDownloadStopped(download);
- continueResponses();
-
- // 4/5. Wait for the first attempt to be completed. The result of this
- // should appear as a cancellation.
- yield firstAttempt;
-
- do_throw("The first attempt should have been canceled.");
- } catch (ex) {
- // The "becauseBlocked" property should be false.
- if (!(ex instanceof Downloads.Error) || ex.becauseBlocked) {
- throw ex;
- }
- }
-
- // 6. Wait for the second attempt to be completed.
- yield promiseDownloadStopped(download);
-
- // 7. At this point, "hasBlockedData" should be false.
- do_check_false(download.hasBlockedData);
-
- cleanup();
-});
-
-/**
- * Checks that application reputation blocks the download but maintains the
- * blocked data, which will be deleted when the block is confirmed.
- */
-add_task(function* test_blocked_applicationReputation_confirmBlock()
-{
- let download = yield promiseBlockedDownload({
- keepPartialData: true,
- keepBlockedData: true,
- });
-
- do_check_true(download.hasBlockedData);
- do_check_true(yield OS.File.exists(download.target.partFilePath));
-
- yield download.confirmBlock();
-
- // After confirming the block the download should be in a failed state and
- // have no downloaded data left on disk.
- do_check_true(download.stopped);
- do_check_false(download.succeeded);
- do_check_false(download.hasBlockedData);
- do_check_false(yield OS.File.exists(download.target.partFilePath));
- do_check_false(yield OS.File.exists(download.target.path));
- do_check_false(download.target.exists);
- do_check_eq(download.target.size, 0);
-});
-
-/**
- * Checks that application reputation blocks the download but maintains the
- * blocked data, which will be used to complete the download when unblocking.
- */
-add_task(function* test_blocked_applicationReputation_unblock()
-{
- let download = yield promiseBlockedDownload({
- keepPartialData: true,
- keepBlockedData: true,
- });
-
- do_check_true(download.hasBlockedData);
- do_check_true(yield OS.File.exists(download.target.partFilePath));
-
- yield download.unblock();
-
- // After unblocking the download should have succeeded and be
- // present at the final path.
- do_check_true(download.stopped);
- do_check_true(download.succeeded);
- do_check_false(download.hasBlockedData);
- do_check_false(yield OS.File.exists(download.target.partFilePath));
- yield promiseVerifyTarget(download.target, TEST_DATA_SHORT + TEST_DATA_SHORT);
-
- // The only indication the download was previously blocked is the
- // existence of the error, so we make sure it's still set.
- do_check_true(download.error instanceof Downloads.Error);
- do_check_true(download.error.becauseBlocked);
- do_check_true(download.error.becauseBlockedByReputationCheck);
-});
-
-/**
- * Check that calling cancel on a blocked download will not cause errors
- */
-add_task(function* test_blocked_applicationReputation_cancel()
-{
- let download = yield promiseBlockedDownload({
- keepPartialData: true,
- keepBlockedData: true,
- });
-
- // This call should succeed on a blocked download.
- yield download.cancel();
-
- // Calling cancel should not have changed the current state, the download
- // should still be blocked.
- do_check_true(download.error.becauseBlockedByReputationCheck);
- do_check_true(download.stopped);
- do_check_false(download.succeeded);
- do_check_true(download.hasBlockedData);
-});
-
-/**
- * Checks that unblock and confirmBlock cannot race on a blocked download
- */
-add_task(function* test_blocked_applicationReputation_decisionRace()
-{
- let download = yield promiseBlockedDownload({
- keepPartialData: true,
- keepBlockedData: true,
- });
-
- let unblockPromise = download.unblock();
- let confirmBlockPromise = download.confirmBlock();
-
- yield confirmBlockPromise.then(() => {
- do_throw("confirmBlock should have failed.");
- }, () => {});
-
- yield unblockPromise;
-
- // After unblocking the download should have succeeded and be
- // present at the final path.
- do_check_true(download.stopped);
- do_check_true(download.succeeded);
- do_check_false(download.hasBlockedData);
- do_check_false(yield OS.File.exists(download.target.partFilePath));
- do_check_true(yield OS.File.exists(download.target.path));
-
- download = yield promiseBlockedDownload({
- keepPartialData: true,
- keepBlockedData: true,
- });
-
- confirmBlockPromise = download.confirmBlock();
- unblockPromise = download.unblock();
-
- yield unblockPromise.then(() => {
- do_throw("unblock should have failed.");
- }, () => {});
-
- yield confirmBlockPromise;
-
- // After confirming the block the download should be in a failed state and
- // have no downloaded data left on disk.
- do_check_true(download.stopped);
- do_check_false(download.succeeded);
- do_check_false(download.hasBlockedData);
- do_check_false(yield OS.File.exists(download.target.partFilePath));
- do_check_false(yield OS.File.exists(download.target.path));
- do_check_false(download.target.exists);
- do_check_eq(download.target.size, 0);
-});
-
-/**
- * Checks that unblocking a blocked download fails if the blocked data has been
- * removed.
- */
-add_task(function* test_blocked_applicationReputation_unblock()
-{
- let download = yield promiseBlockedDownload({
- keepPartialData: true,
- keepBlockedData: true,
- });
-
- do_check_true(download.hasBlockedData);
- do_check_true(yield OS.File.exists(download.target.partFilePath));
-
- // Remove the blocked data without telling the download.
- yield OS.File.remove(download.target.partFilePath);
-
- let unblockPromise = download.unblock();
- yield unblockPromise.then(() => {
- do_throw("unblock should have failed.");
- }, () => {});
-
- // Even though unblocking failed the download state should have been updated
- // to reflect the lack of blocked data.
- do_check_false(download.hasBlockedData);
- do_check_true(download.stopped);
- do_check_false(download.succeeded);
- do_check_false(download.target.exists);
- do_check_eq(download.target.size, 0);
-});
-
-/**
- * download.showContainingDirectory() action
- */
-add_task(function* test_showContainingDirectory() {
- let targetPath = getTempFile(TEST_TARGET_FILE_NAME).path;
-
- let download = yield Downloads.createDownload({
- source: { url: httpUrl("source.txt") },
- target: ""
- });
-
- let promiseDirectoryShown = waitForDirectoryShown();
- yield download.showContainingDirectory();
- let path = yield promiseDirectoryShown;
- try {
- new FileUtils.File(path);
- do_throw("Should have failed because of an invalid path.");
- } catch (ex) {
- if (!(ex instanceof Components.Exception)) {
- throw ex;
- }
- // Invalid paths on Windows are reported with NS_ERROR_FAILURE,
- // but with NS_ERROR_FILE_UNRECOGNIZED_PATH on Mac/Linux
- let validResult = ex.result == Cr.NS_ERROR_FILE_UNRECOGNIZED_PATH ||
- ex.result == Cr.NS_ERROR_FAILURE;
- do_check_true(validResult);
- }
-
- download = yield Downloads.createDownload({
- source: { url: httpUrl("source.txt") },
- target: targetPath
- });
-
- promiseDirectoryShown = waitForDirectoryShown();
- download.showContainingDirectory();
- yield promiseDirectoryShown;
-});
-
-/**
- * download.launch() action
- */
-add_task(function* test_launch() {
- let customLauncher = getTempFile("app-launcher");
-
- // Test both with and without setting a custom application.
- for (let launcherPath of [null, customLauncher.path]) {
- let download;
- if (!gUseLegacySaver) {
- // When testing DownloadCopySaver, we have control over the download, thus
- // we can test that file is not launched if download.succeeded is not set.
- download = yield Downloads.createDownload({
- source: httpUrl("source.txt"),
- target: getTempFile(TEST_TARGET_FILE_NAME).path,
- launcherPath: launcherPath,
- launchWhenSucceeded: true
- });
-
- try {
- yield download.launch();
- do_throw("Can't launch download file as it has not completed yet");
- } catch (ex) {
- do_check_eq(ex.message,
- "launch can only be called if the download succeeded");
- }
-
- yield download.start();
- } else {
- // When testing DownloadLegacySaver, the download is already started when
- // it is created, thus we don't test calling "launch" before starting.
- download = yield promiseStartLegacyDownload(
- httpUrl("source.txt"),
- { launcherPath: launcherPath,
- launchWhenSucceeded: true });
- yield promiseDownloadStopped(download);
- }
-
- do_check_true(download.launchWhenSucceeded);
-
- let promiseFileLaunched = waitForFileLaunched();
- download.launch();
- let result = yield promiseFileLaunched;
-
- // Verify that the results match the test case.
- if (!launcherPath) {
- // This indicates that the default handler has been chosen.
- do_check_true(result === null);
- } else {
- // Check the nsIMIMEInfo instance that would have been used for launching.
- do_check_eq(result.preferredAction, Ci.nsIMIMEInfo.useHelperApp);
- do_check_true(result.preferredApplicationHandler
- .QueryInterface(Ci.nsILocalHandlerApp)
- .executable.equals(customLauncher));
- }
- }
-});
-
-/**
- * Test passing an invalid path as the launcherPath property.
- */
-add_task(function* test_launcherPath_invalid() {
- let download = yield Downloads.createDownload({
- source: { url: httpUrl("source.txt") },
- target: { path: getTempFile(TEST_TARGET_FILE_NAME).path },
- launcherPath: " "
- });
-
- let promiseDownloadLaunched = new Promise(resolve => {
- let waitFn = base => ({
- __proto__: base,
- launchDownload() {
- Integration.downloads.unregister(waitFn);
- let superPromise = super.launchDownload(...arguments);
- resolve(superPromise);
- return superPromise;
- },
- });
- Integration.downloads.register(waitFn);
- });
-
- yield download.start();
- try {
- download.launch();
- yield promiseDownloadLaunched;
- do_throw("Can't launch file with invalid custom launcher")
- } catch (ex) {
- if (!(ex instanceof Components.Exception)) {
- throw ex;
- }
- // Invalid paths on Windows are reported with NS_ERROR_FAILURE,
- // but with NS_ERROR_FILE_UNRECOGNIZED_PATH on Mac/Linux
- let validResult = ex.result == Cr.NS_ERROR_FILE_UNRECOGNIZED_PATH ||
- ex.result == Cr.NS_ERROR_FAILURE;
- do_check_true(validResult);
- }
-});
-
-/**
- * Tests that download.launch() is automatically called after
- * the download finishes if download.launchWhenSucceeded = true
- */
-add_task(function* test_launchWhenSucceeded() {
- let customLauncher = getTempFile("app-launcher");
-
- // Test both with and without setting a custom application.
- for (let launcherPath of [null, customLauncher.path]) {
- let promiseFileLaunched = waitForFileLaunched();
-
- if (!gUseLegacySaver) {
- let download = yield Downloads.createDownload({
- source: httpUrl("source.txt"),
- target: getTempFile(TEST_TARGET_FILE_NAME).path,
- launchWhenSucceeded: true,
- launcherPath: launcherPath,
- });
- yield download.start();
- } else {
- let download = yield promiseStartLegacyDownload(
- httpUrl("source.txt"),
- { launcherPath: launcherPath,
- launchWhenSucceeded: true });
- yield promiseDownloadStopped(download);
- }
-
- let result = yield promiseFileLaunched;
-
- // Verify that the results match the test case.
- if (!launcherPath) {
- // This indicates that the default handler has been chosen.
- do_check_true(result === null);
- } else {
- // Check the nsIMIMEInfo instance that would have been used for launching.
- do_check_eq(result.preferredAction, Ci.nsIMIMEInfo.useHelperApp);
- do_check_true(result.preferredApplicationHandler
- .QueryInterface(Ci.nsILocalHandlerApp)
- .executable.equals(customLauncher));
- }
- }
-});
-
-/**
- * Tests that the proper content type is set for a normal download.
- */
-add_task(function* test_contentType() {
- let download = yield promiseStartDownload(httpUrl("source.txt"));
- yield promiseDownloadStopped(download);
-
- do_check_eq("text/plain", download.contentType);
-});
-
-/**
- * Tests that the serialization/deserialization of the startTime Date
- * object works correctly.
- */
-add_task(function* test_toSerializable_startTime()
-{
- let download1 = yield promiseStartDownload(httpUrl("source.txt"));
- yield promiseDownloadStopped(download1);
-
- let serializable = download1.toSerializable();
- let reserialized = JSON.parse(JSON.stringify(serializable));
-
- let download2 = yield Downloads.createDownload(reserialized);
-
- do_check_eq(download1.startTime.constructor.name, "Date");
- do_check_eq(download2.startTime.constructor.name, "Date");
- do_check_eq(download1.startTime.toJSON(), download2.startTime.toJSON());
-});
-
-/**
- * Checks that downloads are added to browsing history when they start.
- */
-add_task(function* test_history()
-{
- mustInterruptResponses();
-
- // We will wait for the visit to be notified during the download.
- yield PlacesTestUtils.clearHistory();
- let promiseVisit = promiseWaitForVisit(httpUrl("interruptible.txt"));
-
- // Start a download that is not allowed to finish yet.
- let download = yield promiseStartDownload(httpUrl("interruptible.txt"));
-
- // The history notifications should be received before the download completes.
- let [time, transitionType] = yield promiseVisit;
- do_check_eq(time, download.startTime.getTime() * 1000);
- do_check_eq(transitionType, Ci.nsINavHistoryService.TRANSITION_DOWNLOAD);
-
- // Restart and complete the download after clearing history.
- yield PlacesTestUtils.clearHistory();
- download.cancel();
- continueResponses();
- yield download.start();
-
- // The restart should not have added a new history visit.
- do_check_false(yield promiseIsURIVisited(httpUrl("interruptible.txt")));
-});
-
-/**
- * Checks that downloads started by nsIHelperAppService are added to the
- * browsing history when they start.
- */
-add_task(function* test_history_tryToKeepPartialData()
-{
- // We will wait for the visit to be notified during the download.
- yield PlacesTestUtils.clearHistory();
- let promiseVisit =
- promiseWaitForVisit(httpUrl("interruptible_resumable.txt"));
-
- // Start a download that is not allowed to finish yet.
- let beforeStartTimeMs = Date.now();
- let download = yield promiseStartDownload_tryToKeepPartialData();
-
- // The history notifications should be received before the download completes.
- let [time, transitionType] = yield promiseVisit;
- do_check_eq(transitionType, Ci.nsINavHistoryService.TRANSITION_DOWNLOAD);
-
- // The time set by nsIHelperAppService may be different than the start time in
- // the download object, thus we only check that it is a meaningful time. Note
- // that we subtract one second from the earliest time to account for rounding.
- do_check_true(time >= beforeStartTimeMs * 1000 - 1000000);
-
- // Complete the download before finishing the test.
- continueResponses();
- yield promiseDownloadStopped(download);
-});
-
-/**
- * Tests that the temp download files are removed on exit and exiting private
- * mode after they have been launched.
- */
-add_task(function* test_launchWhenSucceeded_deleteTempFileOnExit() {
- let customLauncherPath = getTempFile("app-launcher").path;
- let autoDeleteTargetPathOne = getTempFile(TEST_TARGET_FILE_NAME).path;
- let autoDeleteTargetPathTwo = getTempFile(TEST_TARGET_FILE_NAME).path;
- let noAutoDeleteTargetPath = getTempFile(TEST_TARGET_FILE_NAME).path;
-
- let autoDeleteDownloadOne = yield Downloads.createDownload({
- source: { url: httpUrl("source.txt"), isPrivate: true },
- target: autoDeleteTargetPathOne,
- launchWhenSucceeded: true,
- launcherPath: customLauncherPath,
- });
- yield autoDeleteDownloadOne.start();
-
- Services.prefs.setBoolPref(kDeleteTempFileOnExit, true);
- let autoDeleteDownloadTwo = yield Downloads.createDownload({
- source: httpUrl("source.txt"),
- target: autoDeleteTargetPathTwo,
- launchWhenSucceeded: true,
- launcherPath: customLauncherPath,
- });
- yield autoDeleteDownloadTwo.start();
-
- Services.prefs.setBoolPref(kDeleteTempFileOnExit, false);
- let noAutoDeleteDownload = yield Downloads.createDownload({
- source: httpUrl("source.txt"),
- target: noAutoDeleteTargetPath,
- launchWhenSucceeded: true,
- launcherPath: customLauncherPath,
- });
- yield noAutoDeleteDownload.start();
-
- Services.prefs.clearUserPref(kDeleteTempFileOnExit);
-
- do_check_true(yield OS.File.exists(autoDeleteTargetPathOne));
- do_check_true(yield OS.File.exists(autoDeleteTargetPathTwo));
- do_check_true(yield OS.File.exists(noAutoDeleteTargetPath));
-
- // Simulate leaving private browsing mode
- Services.obs.notifyObservers(null, "last-pb-context-exited", null);
- do_check_false(yield OS.File.exists(autoDeleteTargetPathOne));
-
- // Simulate browser shutdown
- let expire = Cc["@mozilla.org/uriloader/external-helper-app-service;1"]
- .getService(Ci.nsIObserver);
- expire.observe(null, "profile-before-change", null);
- do_check_false(yield OS.File.exists(autoDeleteTargetPathTwo));
- do_check_true(yield OS.File.exists(noAutoDeleteTargetPath));
-});
diff --git a/toolkit/components/jsdownloads/test/unit/head.js b/toolkit/components/jsdownloads/test/unit/head.js
deleted file mode 100644
index f322244c48..0000000000
--- a/toolkit/components/jsdownloads/test/unit/head.js
+++ /dev/null
@@ -1,843 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Provides infrastructure for automated download components tests.
- */
-
-"use strict";
-
-// Globals
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-var Cr = Components.results;
-
-Cu.import("resource://gre/modules/Integration.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "DownloadPaths",
- "resource://gre/modules/DownloadPaths.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Downloads",
- "resource://gre/modules/Downloads.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
- "resource://gre/modules/FileUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "HttpServer",
- "resource://testing-common/httpd.js");
-XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
- "resource://gre/modules/NetUtil.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "PlacesTestUtils",
- "resource://testing-common/PlacesTestUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
- "resource://gre/modules/PlacesUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Promise",
- "resource://gre/modules/Promise.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Services",
- "resource://gre/modules/Services.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Task",
- "resource://gre/modules/Task.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "OS",
- "resource://gre/modules/osfile.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "MockRegistrar",
- "resource://testing-common/MockRegistrar.jsm");
-
-XPCOMUtils.defineLazyServiceGetter(this, "gExternalHelperAppService",
- "@mozilla.org/uriloader/external-helper-app-service;1",
- Ci.nsIExternalHelperAppService);
-
-Integration.downloads.defineModuleGetter(this, "DownloadIntegration",
- "resource://gre/modules/DownloadIntegration.jsm");
-
-const ServerSocket = Components.Constructor(
- "@mozilla.org/network/server-socket;1",
- "nsIServerSocket",
- "init");
-const BinaryOutputStream = Components.Constructor(
- "@mozilla.org/binaryoutputstream;1",
- "nsIBinaryOutputStream",
- "setOutputStream")
-
-XPCOMUtils.defineLazyServiceGetter(this, "gMIMEService",
- "@mozilla.org/mime;1",
- "nsIMIMEService");
-
-const TEST_TARGET_FILE_NAME = "test-download.txt";
-const TEST_STORE_FILE_NAME = "test-downloads.json";
-
-const TEST_REFERRER_URL = "http://www.example.com/referrer.html";
-
-const TEST_DATA_SHORT = "This test string is downloaded.";
-// Generate using gzipCompressString in TelemetryController.jsm.
-const TEST_DATA_SHORT_GZIP_ENCODED_FIRST = [
- 31, 139, 8, 0, 0, 0, 0, 0, 0, 3, 11, 201, 200, 44, 86, 40, 73, 45, 46, 81, 40, 46, 41, 202, 204
-];
-const TEST_DATA_SHORT_GZIP_ENCODED_SECOND = [
- 75, 87, 0, 114, 83, 242, 203, 243, 114, 242, 19, 83, 82, 83, 244, 0, 151, 222, 109, 43, 31, 0, 0, 0
-];
-const TEST_DATA_SHORT_GZIP_ENCODED =
- TEST_DATA_SHORT_GZIP_ENCODED_FIRST.concat(TEST_DATA_SHORT_GZIP_ENCODED_SECOND);
-
-/**
- * All the tests are implemented with add_task, this starts them automatically.
- */
-function run_test()
-{
- do_get_profile();
- run_next_test();
-}
-
-// Support functions
-
-/**
- * HttpServer object initialized before tests start.
- */
-var gHttpServer;
-
-/**
- * Given a file name, returns a string containing an URI that points to the file
- * on the currently running instance of the test HTTP server.
- */
-function httpUrl(aFileName) {
- return "http://localhost:" + gHttpServer.identity.primaryPort + "/" +
- aFileName;
-}
-
-// While the previous test file should have deleted all the temporary files it
-// used, on Windows these might still be pending deletion on the physical file
-// system. Thus, start from a new base number every time, to make a collision
-// with a file that is still pending deletion highly unlikely.
-var gFileCounter = Math.floor(Math.random() * 1000000);
-
-/**
- * Returns a reference to a temporary file, that is guaranteed not to exist, and
- * to have never been created before.
- *
- * @param aLeafName
- * Suggested leaf name for the file to be created.
- *
- * @return nsIFile pointing to a non-existent file in a temporary directory.
- *
- * @note It is not enough to delete the file if it exists, or to delete the file
- * after calling nsIFile.createUnique, because on Windows the delete
- * operation in the file system may still be pending, preventing a new
- * file with the same name to be created.
- */
-function getTempFile(aLeafName)
-{
- // Prepend a serial number to the extension in the suggested leaf name.
- let [base, ext] = DownloadPaths.splitBaseNameAndExtension(aLeafName);
- let leafName = base + "-" + gFileCounter + ext;
- gFileCounter++;
-
- // Get a file reference under the temporary directory for this test file.
- let file = FileUtils.getFile("TmpD", [leafName]);
- do_check_false(file.exists());
-
- do_register_cleanup(function () {
- try {
- file.remove(false)
- } catch (e) {
- if (!(e instanceof Components.Exception &&
- (e.result == Cr.NS_ERROR_FILE_ACCESS_DENIED ||
- e.result == Cr.NS_ERROR_FILE_TARGET_DOES_NOT_EXIST ||
- e.result == Cr.NS_ERROR_FILE_NOT_FOUND))) {
- throw e;
- }
- // On Windows, we may get an access denied error if the file existed before,
- // and was recently deleted.
- // Don't bother checking file.exists() as that may also cause an access
- // denied error.
- }
- });
-
- return file;
-}
-
-/**
- * Waits for pending events to be processed.
- *
- * @return {Promise}
- * @resolves When pending events have been processed.
- * @rejects Never.
- */
-function promiseExecuteSoon()
-{
- let deferred = Promise.defer();
- do_execute_soon(deferred.resolve);
- return deferred.promise;
-}
-
-/**
- * Waits for a pending events to be processed after a timeout.
- *
- * @return {Promise}
- * @resolves When pending events have been processed.
- * @rejects Never.
- */
-function promiseTimeout(aTime)
-{
- let deferred = Promise.defer();
- do_timeout(aTime, deferred.resolve);
- return deferred.promise;
-}
-
-/**
- * Waits for a new history visit to be notified for the specified URI.
- *
- * @param aUrl
- * String containing the URI that will be visited.
- *
- * @return {Promise}
- * @resolves Array [aTime, aTransitionType] from nsINavHistoryObserver.onVisit.
- * @rejects Never.
- */
-function promiseWaitForVisit(aUrl)
-{
- let deferred = Promise.defer();
-
- let uri = NetUtil.newURI(aUrl);
-
- PlacesUtils.history.addObserver({
- QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryObserver]),
- onBeginUpdateBatch: function () {},
- onEndUpdateBatch: function () {},
- onVisit: function (aURI, aVisitID, aTime, aSessionID, aReferringID,
- aTransitionType, aGUID, aHidden) {
- if (aURI.equals(uri)) {
- PlacesUtils.history.removeObserver(this);
- deferred.resolve([aTime, aTransitionType]);
- }
- },
- onTitleChanged: function () {},
- onDeleteURI: function () {},
- onClearHistory: function () {},
- onPageChanged: function () {},
- onDeleteVisits: function () {},
- }, false);
-
- return deferred.promise;
-}
-
-/**
- * Check browsing history to see whether the given URI has been visited.
- *
- * @param aUrl
- * String containing the URI that will be visited.
- *
- * @return {Promise}
- * @resolves Boolean indicating whether the URI has been visited.
- * @rejects JavaScript exception.
- */
-function promiseIsURIVisited(aUrl) {
- let deferred = Promise.defer();
-
- PlacesUtils.asyncHistory.isURIVisited(NetUtil.newURI(aUrl),
- function (aURI, aIsVisited) {
- deferred.resolve(aIsVisited);
- });
-
- return deferred.promise;
-}
-
-/**
- * Creates a new Download object, setting a temporary file as the target.
- *
- * @param aSourceUrl
- * String containing the URI for the download source, or null to use
- * httpUrl("source.txt").
- *
- * @return {Promise}
- * @resolves The newly created Download object.
- * @rejects JavaScript exception.
- */
-function promiseNewDownload(aSourceUrl) {
- return Downloads.createDownload({
- source: aSourceUrl || httpUrl("source.txt"),
- target: getTempFile(TEST_TARGET_FILE_NAME),
- });
-}
-
-/**
- * Starts a new download using the nsIWebBrowserPersist interface, and controls
- * it using the legacy nsITransfer interface.
- *
- * @param aSourceUrl
- * String containing the URI for the download source, or null to use
- * httpUrl("source.txt").
- * @param aOptions
- * An optional object used to control the behavior of this function.
- * You may pass an object with a subset of the following fields:
- * {
- * isPrivate: Boolean indicating whether the download originated from a
- * private window.
- * targetFile: nsIFile for the target, or null to use a temporary file.
- * outPersist: Receives a reference to the created nsIWebBrowserPersist
- * instance.
- * launchWhenSucceeded: Boolean indicating whether the target should
- * be launched when it has completed successfully.
- * launcherPath: String containing the path of the custom executable to
- * use to launch the target of the download.
- * }
- *
- * @return {Promise}
- * @resolves The Download object created as a consequence of controlling the
- * download through the legacy nsITransfer interface.
- * @rejects Never. The current test fails in case of exceptions.
- */
-function promiseStartLegacyDownload(aSourceUrl, aOptions) {
- let sourceURI = NetUtil.newURI(aSourceUrl || httpUrl("source.txt"));
- let targetFile = (aOptions && aOptions.targetFile)
- || getTempFile(TEST_TARGET_FILE_NAME);
-
- let persist = Cc["@mozilla.org/embedding/browser/nsWebBrowserPersist;1"]
- .createInstance(Ci.nsIWebBrowserPersist);
- if (aOptions) {
- aOptions.outPersist = persist;
- }
-
- let fileExtension = null, mimeInfo = null;
- let match = sourceURI.path.match(/\.([^.\/]+)$/);
- if (match) {
- fileExtension = match[1];
- }
-
- if (fileExtension) {
- try {
- mimeInfo = gMIMEService.getFromTypeAndExtension(null, fileExtension);
- mimeInfo.preferredAction = Ci.nsIMIMEInfo.saveToDisk;
- } catch (ex) { }
- }
-
- if (aOptions && aOptions.launcherPath) {
- do_check_true(mimeInfo != null);
-
- let localHandlerApp = Cc["@mozilla.org/uriloader/local-handler-app;1"]
- .createInstance(Ci.nsILocalHandlerApp);
- localHandlerApp.executable = new FileUtils.File(aOptions.launcherPath);
-
- mimeInfo.preferredApplicationHandler = localHandlerApp;
- mimeInfo.preferredAction = Ci.nsIMIMEInfo.useHelperApp;
- }
-
- if (aOptions && aOptions.launchWhenSucceeded) {
- do_check_true(mimeInfo != null);
-
- mimeInfo.preferredAction = Ci.nsIMIMEInfo.useHelperApp;
- }
-
- // Apply decoding if required by the "Content-Encoding" header.
- persist.persistFlags &= ~Ci.nsIWebBrowserPersist.PERSIST_FLAGS_NO_CONVERSION;
- persist.persistFlags |=
- Ci.nsIWebBrowserPersist.PERSIST_FLAGS_AUTODETECT_APPLY_CONVERSION;
-
- let transfer = Cc["@mozilla.org/transfer;1"].createInstance(Ci.nsITransfer);
-
- let deferred = Promise.defer();
-
- Downloads.getList(Downloads.ALL).then(function (aList) {
- // Temporarily register a view that will get notified when the download we
- // are controlling becomes visible in the list of downloads.
- aList.addView({
- onDownloadAdded: function (aDownload) {
- aList.removeView(this).then(null, do_report_unexpected_exception);
-
- // Remove the download to keep the list empty for the next test. This
- // also allows the caller to register the "onchange" event directly.
- let promise = aList.remove(aDownload);
-
- // When the download object is ready, make it available to the caller.
- promise.then(() => deferred.resolve(aDownload),
- do_report_unexpected_exception);
- },
- }).then(null, do_report_unexpected_exception);
-
- let isPrivate = aOptions && aOptions.isPrivate;
-
- // Initialize the components so they reference each other. This will cause
- // the Download object to be created and added to the public downloads.
- transfer.init(sourceURI, NetUtil.newURI(targetFile), null, mimeInfo, null,
- null, persist, isPrivate);
- persist.progressListener = transfer;
-
- // Start the actual download process.
- persist.savePrivacyAwareURI(sourceURI, null, null, 0, null, null, targetFile,
- isPrivate);
- }.bind(this)).then(null, do_report_unexpected_exception);
-
- return deferred.promise;
-}
-
-/**
- * Starts a new download using the nsIHelperAppService interface, and controls
- * it using the legacy nsITransfer interface. The source of the download will
- * be "interruptible_resumable.txt" and partially downloaded data will be kept.
- *
- * @param aSourceUrl
- * String containing the URI for the download source, or null to use
- * httpUrl("interruptible_resumable.txt").
- *
- * @return {Promise}
- * @resolves The Download object created as a consequence of controlling the
- * download through the legacy nsITransfer interface.
- * @rejects Never. The current test fails in case of exceptions.
- */
-function promiseStartExternalHelperAppServiceDownload(aSourceUrl) {
- let sourceURI = NetUtil.newURI(aSourceUrl ||
- httpUrl("interruptible_resumable.txt"));
-
- let deferred = Promise.defer();
-
- Downloads.getList(Downloads.PUBLIC).then(function (aList) {
- // Temporarily register a view that will get notified when the download we
- // are controlling becomes visible in the list of downloads.
- aList.addView({
- onDownloadAdded: function (aDownload) {
- aList.removeView(this).then(null, do_report_unexpected_exception);
-
- // Remove the download to keep the list empty for the next test. This
- // also allows the caller to register the "onchange" event directly.
- let promise = aList.remove(aDownload);
-
- // When the download object is ready, make it available to the caller.
- promise.then(() => deferred.resolve(aDownload),
- do_report_unexpected_exception);
- },
- }).then(null, do_report_unexpected_exception);
-
- let channel = NetUtil.newChannel({
- uri: sourceURI,
- loadUsingSystemPrincipal: true
- });
-
- // Start the actual download process.
- channel.asyncOpen2({
- contentListener: null,
-
- onStartRequest: function (aRequest, aContext)
- {
- let requestChannel = aRequest.QueryInterface(Ci.nsIChannel);
- this.contentListener = gExternalHelperAppService.doContent(
- requestChannel.contentType, aRequest, null, true);
- this.contentListener.onStartRequest(aRequest, aContext);
- },
-
- onStopRequest: function (aRequest, aContext, aStatusCode)
- {
- this.contentListener.onStopRequest(aRequest, aContext, aStatusCode);
- },
-
- onDataAvailable: function (aRequest, aContext, aInputStream, aOffset,
- aCount)
- {
- this.contentListener.onDataAvailable(aRequest, aContext, aInputStream,
- aOffset, aCount);
- },
- });
- }.bind(this)).then(null, do_report_unexpected_exception);
-
- return deferred.promise;
-}
-
-/**
- * Waits for a download to reach half of its progress, in case it has not
- * reached the expected progress already.
- *
- * @param aDownload
- * The Download object to wait upon.
- *
- * @return {Promise}
- * @resolves When the download has reached half of its progress.
- * @rejects Never.
- */
-function promiseDownloadMidway(aDownload) {
- let deferred = Promise.defer();
-
- // Wait for the download to reach half of its progress.
- let onchange = function () {
- if (!aDownload.stopped && !aDownload.canceled && aDownload.progress == 50) {
- aDownload.onchange = null;
- deferred.resolve();
- }
- };
-
- // Register for the notification, but also call the function directly in
- // case the download already reached the expected progress.
- aDownload.onchange = onchange;
- onchange();
-
- return deferred.promise;
-}
-
-/**
- * Waits for a download to finish, in case it has not finished already.
- *
- * @param aDownload
- * The Download object to wait upon.
- *
- * @return {Promise}
- * @resolves When the download has finished successfully.
- * @rejects JavaScript exception if the download failed.
- */
-function promiseDownloadStopped(aDownload) {
- if (!aDownload.stopped) {
- // The download is in progress, wait for the current attempt to finish and
- // report any errors that may occur.
- return aDownload.start();
- }
-
- if (aDownload.succeeded) {
- return Promise.resolve();
- }
-
- // The download failed or was canceled.
- return Promise.reject(aDownload.error || new Error("Download canceled."));
-}
-
-/**
- * Returns a new public or private DownloadList object.
- *
- * @param aIsPrivate
- * True for the private list, false or undefined for the public list.
- *
- * @return {Promise}
- * @resolves The newly created DownloadList object.
- * @rejects JavaScript exception.
- */
-function promiseNewList(aIsPrivate)
-{
- // We need to clear all the internal state for the list and summary objects,
- // since all the objects are interdependent internally.
- Downloads._promiseListsInitialized = null;
- Downloads._lists = {};
- Downloads._summaries = {};
-
- return Downloads.getList(aIsPrivate ? Downloads.PRIVATE : Downloads.PUBLIC);
-}
-
-/**
- * Ensures that the given file contents are equal to the given string.
- *
- * @param aPath
- * String containing the path of the file whose contents should be
- * verified.
- * @param aExpectedContents
- * String containing the octets that are expected in the file.
- *
- * @return {Promise}
- * @resolves When the operation completes.
- * @rejects Never.
- */
-function promiseVerifyContents(aPath, aExpectedContents)
-{
- return Task.spawn(function* () {
- let file = new FileUtils.File(aPath);
-
- if (!(yield OS.File.exists(aPath))) {
- do_throw("File does not exist: " + aPath);
- }
-
- if ((yield OS.File.stat(aPath)).size == 0) {
- do_throw("File is empty: " + aPath);
- }
-
- let deferred = Promise.defer();
- NetUtil.asyncFetch(
- { uri: NetUtil.newURI(file), loadUsingSystemPrincipal: true },
- function(aInputStream, aStatus) {
- do_check_true(Components.isSuccessCode(aStatus));
- let contents = NetUtil.readInputStreamToString(aInputStream,
- aInputStream.available());
- if (contents.length > TEST_DATA_SHORT.length * 2 ||
- /[^\x20-\x7E]/.test(contents)) {
- // Do not print the entire content string to the test log.
- do_check_eq(contents.length, aExpectedContents.length);
- do_check_true(contents == aExpectedContents);
- } else {
- // Print the string if it is short and made of printable characters.
- do_check_eq(contents, aExpectedContents);
- }
- deferred.resolve();
- });
-
- yield deferred.promise;
- });
-}
-
-/**
- * Starts a socket listener that closes each incoming connection.
- *
- * @returns nsIServerSocket that listens for connections. Call its "close"
- * method to stop listening and free the server port.
- */
-function startFakeServer()
-{
- let serverSocket = new ServerSocket(-1, true, -1);
- serverSocket.asyncListen({
- onSocketAccepted: function (aServ, aTransport) {
- aTransport.close(Cr.NS_BINDING_ABORTED);
- },
- onStopListening: function () { },
- });
- return serverSocket;
-}
-
-/**
- * This is an internal reference that should not be used directly by tests.
- */
-var _gDeferResponses = Promise.defer();
-
-/**
- * Ensures that all the interruptible requests started after this function is
- * called won't complete until the continueResponses function is called.
- *
- * Normally, the internal HTTP server returns all the available data as soon as
- * a request is received. In order for some requests to be served one part at a
- * time, special interruptible handlers are registered on the HTTP server. This
- * allows testing events or actions that need to happen in the middle of a
- * download.
- *
- * For example, the handler accessible at the httpUri("interruptible.txt")
- * address returns the TEST_DATA_SHORT text, then it may block until the
- * continueResponses method is called. At this point, the handler sends the
- * TEST_DATA_SHORT text again to complete the response.
- *
- * If an interruptible request is started before the function is called, it may
- * or may not be blocked depending on the actual sequence of events.
- */
-function mustInterruptResponses()
-{
- // If there are pending blocked requests, allow them to complete. This is
- // done to prevent requests from being blocked forever, but should not affect
- // the test logic, since previously started requests should not be monitored
- // on the client side anymore.
- _gDeferResponses.resolve();
-
- do_print("Interruptible responses will be blocked midway.");
- _gDeferResponses = Promise.defer();
-}
-
-/**
- * Allows all the current and future interruptible requests to complete.
- */
-function continueResponses()
-{
- do_print("Interruptible responses are now allowed to continue.");
- _gDeferResponses.resolve();
-}
-
-/**
- * Registers an interruptible response handler.
- *
- * @param aPath
- * Path passed to nsIHttpServer.registerPathHandler.
- * @param aFirstPartFn
- * This function is called when the response is received, with the
- * aRequest and aResponse arguments of the server.
- * @param aSecondPartFn
- * This function is called with the aRequest and aResponse arguments of
- * the server, when the continueResponses function is called.
- */
-function registerInterruptibleHandler(aPath, aFirstPartFn, aSecondPartFn)
-{
- gHttpServer.registerPathHandler(aPath, function (aRequest, aResponse) {
- do_print("Interruptible request started.");
-
- // Process the first part of the response.
- aResponse.processAsync();
- aFirstPartFn(aRequest, aResponse);
-
- // Wait on the current deferred object, then finish the request.
- _gDeferResponses.promise.then(function RIH_onSuccess() {
- aSecondPartFn(aRequest, aResponse);
- aResponse.finish();
- do_print("Interruptible request finished.");
- }).then(null, Cu.reportError);
- });
-}
-
-/**
- * Ensure the given date object is valid.
- *
- * @param aDate
- * The date object to be checked. This value can be null.
- */
-function isValidDate(aDate) {
- return aDate && aDate.getTime && !isNaN(aDate.getTime());
-}
-
-/**
- * Position of the first byte served by the "interruptible_resumable.txt"
- * handler during the most recent response.
- */
-var gMostRecentFirstBytePos;
-
-// Initialization functions common to all tests
-
-add_task(function test_common_initialize()
-{
- // Start the HTTP server.
- gHttpServer = new HttpServer();
- gHttpServer.registerDirectory("/", do_get_file("../data"));
- gHttpServer.start(-1);
- do_register_cleanup(() => {
- return new Promise(resolve => {
- // Ensure all the pending HTTP requests have a chance to finish.
- continueResponses();
- // Stop the HTTP server, calling resolve when it's done.
- gHttpServer.stop(resolve);
- });
- });
-
- // Cache locks might prevent concurrent requests to the same resource, and
- // this may block tests that use the interruptible handlers.
- Services.prefs.setBoolPref("browser.cache.disk.enable", false);
- Services.prefs.setBoolPref("browser.cache.memory.enable", false);
- do_register_cleanup(function () {
- Services.prefs.clearUserPref("browser.cache.disk.enable");
- Services.prefs.clearUserPref("browser.cache.memory.enable");
- });
-
- registerInterruptibleHandler("/interruptible.txt",
- function firstPart(aRequest, aResponse) {
- aResponse.setHeader("Content-Type", "text/plain", false);
- aResponse.setHeader("Content-Length", "" + (TEST_DATA_SHORT.length * 2),
- false);
- aResponse.write(TEST_DATA_SHORT);
- }, function secondPart(aRequest, aResponse) {
- aResponse.write(TEST_DATA_SHORT);
- });
-
- registerInterruptibleHandler("/interruptible_resumable.txt",
- function firstPart(aRequest, aResponse) {
- aResponse.setHeader("Content-Type", "text/plain", false);
-
- // Determine if only part of the data should be sent.
- let data = TEST_DATA_SHORT + TEST_DATA_SHORT;
- if (aRequest.hasHeader("Range")) {
- var matches = aRequest.getHeader("Range")
- .match(/^\s*bytes=(\d+)?-(\d+)?\s*$/);
- var firstBytePos = (matches[1] === undefined) ? 0 : matches[1];
- var lastBytePos = (matches[2] === undefined) ? data.length - 1
- : matches[2];
- if (firstBytePos >= data.length) {
- aResponse.setStatusLine(aRequest.httpVersion, 416,
- "Requested Range Not Satisfiable");
- aResponse.setHeader("Content-Range", "*/" + data.length, false);
- aResponse.finish();
- return;
- }
-
- aResponse.setStatusLine(aRequest.httpVersion, 206, "Partial Content");
- aResponse.setHeader("Content-Range", firstBytePos + "-" +
- lastBytePos + "/" +
- data.length, false);
-
- data = data.substring(firstBytePos, lastBytePos + 1);
-
- gMostRecentFirstBytePos = firstBytePos;
- } else {
- gMostRecentFirstBytePos = 0;
- }
-
- aResponse.setHeader("Content-Length", "" + data.length, false);
-
- aResponse.write(data.substring(0, data.length / 2));
-
- // Store the second part of the data on the response object, so that it
- // can be used by the secondPart function.
- aResponse.secondPartData = data.substring(data.length / 2);
- }, function secondPart(aRequest, aResponse) {
- aResponse.write(aResponse.secondPartData);
- });
-
- registerInterruptibleHandler("/interruptible_gzip.txt",
- function firstPart(aRequest, aResponse) {
- aResponse.setHeader("Content-Type", "text/plain", false);
- aResponse.setHeader("Content-Encoding", "gzip", false);
- aResponse.setHeader("Content-Length", "" + TEST_DATA_SHORT_GZIP_ENCODED.length);
-
- let bos = new BinaryOutputStream(aResponse.bodyOutputStream);
- bos.writeByteArray(TEST_DATA_SHORT_GZIP_ENCODED_FIRST,
- TEST_DATA_SHORT_GZIP_ENCODED_FIRST.length);
- }, function secondPart(aRequest, aResponse) {
- let bos = new BinaryOutputStream(aResponse.bodyOutputStream);
- bos.writeByteArray(TEST_DATA_SHORT_GZIP_ENCODED_SECOND,
- TEST_DATA_SHORT_GZIP_ENCODED_SECOND.length);
- });
-
- gHttpServer.registerPathHandler("/shorter-than-content-length-http-1-1.txt",
- function (aRequest, aResponse) {
- aResponse.processAsync();
- aResponse.setStatusLine("1.1", 200, "OK");
- aResponse.setHeader("Content-Type", "text/plain", false);
- aResponse.setHeader("Content-Length", "" + (TEST_DATA_SHORT.length * 2),
- false);
- aResponse.write(TEST_DATA_SHORT);
- aResponse.finish();
- });
-
- // This URL will emulate being blocked by Windows Parental controls
- gHttpServer.registerPathHandler("/parentalblocked.zip",
- function (aRequest, aResponse) {
- aResponse.setStatusLine(aRequest.httpVersion, 450,
- "Blocked by Windows Parental Controls");
- });
-
- // During unit tests, most of the functions that require profile access or
- // operating system features will be disabled. Individual tests may override
- // them again to check for specific behaviors.
- Integration.downloads.register(base => ({
- __proto__: base,
- loadPublicDownloadListFromStore: () => Promise.resolve(),
- shouldKeepBlockedData: () => Promise.resolve(false),
- shouldBlockForParentalControls: () => Promise.resolve(false),
- shouldBlockForRuntimePermissions: () => Promise.resolve(false),
- shouldBlockForReputationCheck: () => Promise.resolve({
- shouldBlock: false,
- verdict: "",
- }),
- confirmLaunchExecutable: () => Promise.resolve(),
- launchFile: () => Promise.resolve(),
- showContainingDirectory: () => Promise.resolve(),
- // This flag allows re-enabling the default observers during their tests.
- allowObservers: false,
- addListObservers() {
- return this.allowObservers ? super.addListObservers(...arguments)
- : Promise.resolve();
- },
- // This flag allows re-enabling the download directory logic for its tests.
- _allowDirectories: false,
- set allowDirectories(value) {
- this._allowDirectories = value;
- // We have to invalidate the previously computed directory path.
- this._downloadsDirectory = null;
- },
- _getDirectory(name) {
- return super._getDirectory(this._allowDirectories ? name : "TmpD");
- },
- }));
-
- // Make sure that downloads started using nsIExternalHelperAppService are
- // saved to disk without asking for a destination interactively.
- let mock = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIHelperAppLauncherDialog]),
- promptForSaveToFileAsync(aLauncher,
- aWindowContext,
- aDefaultFileName,
- aSuggestedFileExtension,
- aForcePrompt) {
- // The dialog should create the empty placeholder file.
- let file = getTempFile(TEST_TARGET_FILE_NAME);
- file.create(Ci.nsIFile.NORMAL_FILE_TYPE, FileUtils.PERMS_FILE);
- aLauncher.saveDestinationAvailable(file);
- },
- };
-
- let cid = MockRegistrar.register("@mozilla.org/helperapplauncherdialog;1", mock);
- do_register_cleanup(() => {
- MockRegistrar.unregister(cid);
- });
-});
diff --git a/toolkit/components/jsdownloads/test/unit/test_DownloadCore.js b/toolkit/components/jsdownloads/test/unit/test_DownloadCore.js
deleted file mode 100644
index 6e32c63d32..0000000000
--- a/toolkit/components/jsdownloads/test/unit/test_DownloadCore.js
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests the main download interfaces using DownloadCopySaver.
- */
-
-"use strict";
-
-XPCOMUtils.defineLazyModuleGetter(this, "DownloadError",
- "resource://gre/modules/DownloadCore.jsm");
-
-// Execution of common tests
-
-var gUseLegacySaver = false;
-
-var scriptFile = do_get_file("common_test_Download.js");
-Services.scriptloader.loadSubScript(NetUtil.newURI(scriptFile).spec);
-
-// Tests
-
-/**
- * Tests the DownloadError object.
- */
-add_task(function test_DownloadError()
-{
- let error = new DownloadError({ result: Cr.NS_ERROR_NOT_RESUMABLE,
- message: "Not resumable."});
- do_check_eq(error.result, Cr.NS_ERROR_NOT_RESUMABLE);
- do_check_eq(error.message, "Not resumable.");
- do_check_false(error.becauseSourceFailed);
- do_check_false(error.becauseTargetFailed);
- do_check_false(error.becauseBlocked);
- do_check_false(error.becauseBlockedByParentalControls);
-
- error = new DownloadError({ message: "Unknown error."});
- do_check_eq(error.result, Cr.NS_ERROR_FAILURE);
- do_check_eq(error.message, "Unknown error.");
-
- error = new DownloadError({ result: Cr.NS_ERROR_NOT_RESUMABLE });
- do_check_eq(error.result, Cr.NS_ERROR_NOT_RESUMABLE);
- do_check_true(error.message.indexOf("Exception") > 0);
-
- // becauseSourceFailed will be set, but not the unknown property.
- error = new DownloadError({ message: "Unknown error.",
- becauseSourceFailed: true,
- becauseUnknown: true });
- do_check_true(error.becauseSourceFailed);
- do_check_false("becauseUnknown" in error);
-
- error = new DownloadError({ result: Cr.NS_ERROR_MALFORMED_URI,
- inferCause: true });
- do_check_eq(error.result, Cr.NS_ERROR_MALFORMED_URI);
- do_check_true(error.becauseSourceFailed);
- do_check_false(error.becauseTargetFailed);
- do_check_false(error.becauseBlocked);
- do_check_false(error.becauseBlockedByParentalControls);
-
- // This test does not set inferCause, so becauseSourceFailed will not be set.
- error = new DownloadError({ result: Cr.NS_ERROR_MALFORMED_URI });
- do_check_eq(error.result, Cr.NS_ERROR_MALFORMED_URI);
- do_check_false(error.becauseSourceFailed);
-
- error = new DownloadError({ result: Cr.NS_ERROR_FILE_INVALID_PATH,
- inferCause: true });
- do_check_eq(error.result, Cr.NS_ERROR_FILE_INVALID_PATH);
- do_check_false(error.becauseSourceFailed);
- do_check_true(error.becauseTargetFailed);
- do_check_false(error.becauseBlocked);
- do_check_false(error.becauseBlockedByParentalControls);
-
- error = new DownloadError({ becauseBlocked: true });
- do_check_eq(error.message, "Download blocked.");
- do_check_false(error.becauseSourceFailed);
- do_check_false(error.becauseTargetFailed);
- do_check_true(error.becauseBlocked);
- do_check_false(error.becauseBlockedByParentalControls);
-
- error = new DownloadError({ becauseBlockedByParentalControls: true });
- do_check_eq(error.message, "Download blocked.");
- do_check_false(error.becauseSourceFailed);
- do_check_false(error.becauseTargetFailed);
- do_check_true(error.becauseBlocked);
- do_check_true(error.becauseBlockedByParentalControls);
-});
diff --git a/toolkit/components/jsdownloads/test/unit/test_DownloadImport.js b/toolkit/components/jsdownloads/test/unit/test_DownloadImport.js
deleted file mode 100644
index 388870f009..0000000000
--- a/toolkit/components/jsdownloads/test/unit/test_DownloadImport.js
+++ /dev/null
@@ -1,701 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests the DownloadImport object.
- */
-
-"use strict";
-
-// Globals
-
-XPCOMUtils.defineLazyModuleGetter(this, "Sqlite",
- "resource://gre/modules/Sqlite.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "DownloadImport",
- "resource://gre/modules/DownloadImport.jsm");
-
-// Importable states
-const DOWNLOAD_NOTSTARTED = -1;
-const DOWNLOAD_DOWNLOADING = 0;
-const DOWNLOAD_PAUSED = 4;
-const DOWNLOAD_QUEUED = 5;
-
-// Non importable states
-const DOWNLOAD_FAILED = 2;
-const DOWNLOAD_CANCELED = 3;
-const DOWNLOAD_BLOCKED_PARENTAL = 6;
-const DOWNLOAD_SCANNING = 7;
-const DOWNLOAD_DIRTY = 8;
-const DOWNLOAD_BLOCKED_POLICY = 9;
-
-// The TEST_DATA_TAINTED const is a version of TEST_DATA_SHORT in which the
-// beginning of the data was changed (with the TEST_DATA_REPLACEMENT value).
-// We use this to test that the entityID is properly imported and the download
-// can be resumed from where it was paused.
-// For simplification purposes, the test requires that TEST_DATA_SHORT and
-// TEST_DATA_TAINTED have the same length.
-const TEST_DATA_REPLACEMENT = "-changed- ";
-const TEST_DATA_TAINTED = TEST_DATA_REPLACEMENT +
- TEST_DATA_SHORT.substr(TEST_DATA_REPLACEMENT.length);
-const TEST_DATA_LENGTH = TEST_DATA_SHORT.length;
-
-// The length of the partial file that we'll write to disk as an existing
-// ongoing download.
-const TEST_DATA_PARTIAL_LENGTH = TEST_DATA_REPLACEMENT.length;
-
-// The value of the "maxBytes" column stored in the DB about the downloads.
-// It's intentionally different than TEST_DATA_LENGTH to test that each value
-// is seen when expected.
-const MAXBYTES_IN_DB = TEST_DATA_LENGTH - 10;
-
-var gDownloadsRowToImport;
-var gDownloadsRowNonImportable;
-
-/**
- * Creates a database with an empty moz_downloads table and leaves an
- * open connection to it.
- *
- * @param aPath
- * String containing the path of the database file to be created.
- * @param aSchemaVersion
- * Number with the version of the database schema to set.
- *
- * @return {Promise}
- * @resolves The open connection to the database.
- * @rejects If an error occurred during the database creation.
- */
-function promiseEmptyDatabaseConnection({aPath, aSchemaVersion}) {
- return Task.spawn(function* () {
- let connection = yield Sqlite.openConnection({ path: aPath });
-
- yield connection.execute("CREATE TABLE moz_downloads ("
- + "id INTEGER PRIMARY KEY,"
- + "name TEXT,"
- + "source TEXT,"
- + "target TEXT,"
- + "tempPath TEXT,"
- + "startTime INTEGER,"
- + "endTime INTEGER,"
- + "state INTEGER,"
- + "referrer TEXT,"
- + "entityID TEXT,"
- + "currBytes INTEGER NOT NULL DEFAULT 0,"
- + "maxBytes INTEGER NOT NULL DEFAULT -1,"
- + "mimeType TEXT,"
- + "preferredApplication TEXT,"
- + "preferredAction INTEGER NOT NULL DEFAULT 0,"
- + "autoResume INTEGER NOT NULL DEFAULT 0,"
- + "guid TEXT)");
-
- yield connection.setSchemaVersion(aSchemaVersion);
-
- return connection;
- });
-}
-
-/**
- * Inserts a new entry in the database with the given columns' values.
- *
- * @param aConnection
- * The database connection.
- * @param aDownloadRow
- * An object representing the values for each column of the row
- * being inserted.
- *
- * @return {Promise}
- * @resolves When the operation completes.
- * @rejects If there's an error inserting the row.
- */
-function promiseInsertRow(aConnection, aDownloadRow) {
- // We can't use the aDownloadRow obj directly in the execute statement
- // because the obj bind code in Sqlite.jsm doesn't allow objects
- // with extra properties beyond those being binded. So we might as well
- // use an array as it is simpler.
- let values = [
- aDownloadRow.source, aDownloadRow.target, aDownloadRow.tempPath,
- aDownloadRow.startTime.getTime() * 1000, aDownloadRow.state,
- aDownloadRow.referrer, aDownloadRow.entityID, aDownloadRow.maxBytes,
- aDownloadRow.mimeType, aDownloadRow.preferredApplication,
- aDownloadRow.preferredAction, aDownloadRow.autoResume
- ];
-
- return aConnection.execute("INSERT INTO moz_downloads ("
- + "name, source, target, tempPath, startTime,"
- + "endTime, state, referrer, entityID, currBytes,"
- + "maxBytes, mimeType, preferredApplication,"
- + "preferredAction, autoResume, guid)"
- + "VALUES ("
- + "'', ?, ?, ?, ?, " // name,
- + "0, ?, ?, ?, 0, " // endTime, currBytes
- + " ?, ?, ?, " //
- + " ?, ?, '')", // and guid are not imported
- values);
-}
-
-/**
- * Retrieves the number of rows in the moz_downloads table of the
- * database.
- *
- * @param aConnection
- * The database connection.
- *
- * @return {Promise}
- * @resolves With the number of rows.
- * @rejects Never.
- */
-function promiseTableCount(aConnection) {
- return aConnection.execute("SELECT COUNT(*) FROM moz_downloads")
- .then(res => res[0].getResultByName("COUNT(*)"))
- .then(null, Cu.reportError);
-}
-
-/**
- * Briefly opens a network channel to a given URL to retrieve
- * the entityID of this url, as generated by the network code.
- *
- * @param aUrl
- * The URL to retrieve the entityID.
- *
- * @return {Promise}
- * @resolves The EntityID of the given URL.
- * @rejects When there's a problem accessing the URL.
- */
-function promiseEntityID(aUrl) {
- let deferred = Promise.defer();
- let entityID = "";
- let channel = NetUtil.newChannel({
- uri: NetUtil.newURI(aUrl),
- loadUsingSystemPrincipal: true
- });
-
- channel.asyncOpen2({
- onStartRequest: function (aRequest) {
- if (aRequest instanceof Ci.nsIResumableChannel) {
- entityID = aRequest.entityID;
- }
- aRequest.cancel(Cr.NS_BINDING_ABORTED);
- },
-
- onStopRequest: function (aRequest, aContext, aStatusCode) {
- if (aStatusCode == Cr.NS_BINDING_ABORTED) {
- deferred.resolve(entityID);
- } else {
- deferred.reject("Unexpected status code received");
- }
- },
-
- onDataAvailable: function () {}
- });
-
- return deferred.promise;
-}
-
-/**
- * Gets a file path to a temporary writeable download target, in the
- * correct format as expected to be stored in the downloads database,
- * which is file:///absolute/path/to/file
- *
- * @param aLeafName
- * A hint leaf name for the file.
- *
- * @return String The path to the download target.
- */
-function getDownloadTarget(aLeafName) {
- return NetUtil.newURI(getTempFile(aLeafName)).spec;
-}
-
-/**
- * Generates a temporary partial file to use as an in-progress
- * download. The file is written to disk with a part of the total expected
- * download content pre-written.
- *
- * @param aLeafName
- * A hint leaf name for the file.
- * @param aTainted
- * A boolean value. When true, the partial content of the file
- * will be different from the expected content of the original source
- * file. See the declaration of TEST_DATA_TAINTED for more information.
- *
- * @return {Promise}
- * @resolves When the operation completes, and returns a string with the path
- * to the generated file.
- * @rejects If there's an error writing the file.
- */
-function getPartialFile(aLeafName, aTainted = false) {
- let tempDownload = getTempFile(aLeafName);
- let partialContent = aTainted
- ? TEST_DATA_TAINTED.substr(0, TEST_DATA_PARTIAL_LENGTH)
- : TEST_DATA_SHORT.substr(0, TEST_DATA_PARTIAL_LENGTH);
-
- return OS.File.writeAtomic(tempDownload.path, partialContent,
- { tmpPath: tempDownload.path + ".tmp",
- flush: true })
- .then(() => tempDownload.path);
-}
-
-/**
- * Generates a Date object to be used as the startTime for the download rows
- * in the DB. A date that is obviously different from the current time is
- * generated to make sure this stored data and a `new Date()` can't collide.
- *
- * @param aOffset
- * A offset from the base generated date is used to differentiate each
- * row in the database.
- *
- * @return A Date object.
- */
-function getStartTime(aOffset) {
- return new Date(1000000 + (aOffset * 10000));
-}
-
-/**
- * Performs various checks on an imported Download object to make sure
- * all properties are properly set as expected from the import procedure.
- *
- * @param aDownload
- * The Download object to be checked.
- * @param aDownloadRow
- * An object that represents a row from the original database table,
- * with extra properties describing expected values that are not
- * explictly part of the database.
- *
- * @return {Promise}
- * @resolves When the operation completes
- * @rejects Never
- */
-function checkDownload(aDownload, aDownloadRow) {
- return Task.spawn(function*() {
- do_check_eq(aDownload.source.url, aDownloadRow.source);
- do_check_eq(aDownload.source.referrer, aDownloadRow.referrer);
-
- do_check_eq(aDownload.target.path,
- NetUtil.newURI(aDownloadRow.target)
- .QueryInterface(Ci.nsIFileURL).file.path);
-
- do_check_eq(aDownload.target.partFilePath, aDownloadRow.tempPath);
-
- if (aDownloadRow.expectedResume) {
- do_check_true(!aDownload.stopped || aDownload.succeeded);
- yield promiseDownloadStopped(aDownload);
-
- do_check_true(aDownload.succeeded);
- do_check_eq(aDownload.progress, 100);
- // If the download has resumed, a new startTime will be set.
- // By calling toJSON we're also testing that startTime is a Date object.
- do_check_neq(aDownload.startTime.toJSON(),
- aDownloadRow.startTime.toJSON());
- } else {
- do_check_false(aDownload.succeeded);
- do_check_eq(aDownload.startTime.toJSON(),
- aDownloadRow.startTime.toJSON());
- }
-
- do_check_eq(aDownload.stopped, true);
-
- let serializedSaver = aDownload.saver.toSerializable();
- if (typeof(serializedSaver) == "object") {
- do_check_eq(serializedSaver.type, "copy");
- } else {
- do_check_eq(serializedSaver, "copy");
- }
-
- if (aDownloadRow.entityID) {
- do_check_eq(aDownload.saver.entityID, aDownloadRow.entityID);
- }
-
- do_check_eq(aDownload.currentBytes, aDownloadRow.expectedCurrentBytes);
- do_check_eq(aDownload.totalBytes, aDownloadRow.expectedTotalBytes);
-
- if (aDownloadRow.expectedContent) {
- let fileToCheck = aDownloadRow.expectedResume
- ? aDownload.target.path
- : aDownload.target.partFilePath;
- yield promiseVerifyContents(fileToCheck, aDownloadRow.expectedContent);
- }
-
- do_check_eq(aDownload.contentType, aDownloadRow.expectedContentType);
- do_check_eq(aDownload.launcherPath, aDownloadRow.preferredApplication);
-
- do_check_eq(aDownload.launchWhenSucceeded,
- aDownloadRow.preferredAction != Ci.nsIMIMEInfo.saveToDisk);
- });
-}
-
-// Preparation tasks
-
-/**
- * Prepares the list of downloads to be added to the database that should
- * be imported by the import procedure.
- */
-add_task(function* prepareDownloadsToImport() {
-
- let sourceUrl = httpUrl("source.txt");
- let sourceEntityId = yield promiseEntityID(sourceUrl);
-
- gDownloadsRowToImport = [
- // Paused download with autoResume and a partial file. By
- // setting the correct entityID the download can resume from
- // where it stopped, and to test that this works properly we
- // intentionally set different data in the beginning of the
- // partial file to make sure it was not replaced.
- {
- source: sourceUrl,
- target: getDownloadTarget("inprogress1.txt"),
- tempPath: yield getPartialFile("inprogress1.txt.part", true),
- startTime: getStartTime(1),
- state: DOWNLOAD_PAUSED,
- referrer: httpUrl("referrer1"),
- entityID: sourceEntityId,
- maxBytes: MAXBYTES_IN_DB,
- mimeType: "mimeType1",
- preferredAction: Ci.nsIMIMEInfo.saveToDisk,
- preferredApplication: "prerredApplication1",
- autoResume: 1,
-
- // Even though the information stored in the DB said
- // maxBytes was MAXBYTES_IN_DB, the download turned out to be
- // a different length. Here we make sure the totalBytes property
- // was correctly set with the actual value. The same consideration
- // applies to the contentType.
- expectedCurrentBytes: TEST_DATA_LENGTH,
- expectedTotalBytes: TEST_DATA_LENGTH,
- expectedResume: true,
- expectedContentType: "text/plain",
- expectedContent: TEST_DATA_TAINTED,
- },
-
- // Paused download with autoResume and a partial file,
- // but missing entityID. This means that the download will
- // start from beginning, and the entire original content of the
- // source file should replace the different data that was stored
- // in the partial file.
- {
- source: sourceUrl,
- target: getDownloadTarget("inprogress2.txt"),
- tempPath: yield getPartialFile("inprogress2.txt.part", true),
- startTime: getStartTime(2),
- state: DOWNLOAD_PAUSED,
- referrer: httpUrl("referrer2"),
- entityID: "",
- maxBytes: MAXBYTES_IN_DB,
- mimeType: "mimeType2",
- preferredAction: Ci.nsIMIMEInfo.saveToDisk,
- preferredApplication: "prerredApplication2",
- autoResume: 1,
-
- expectedCurrentBytes: TEST_DATA_LENGTH,
- expectedTotalBytes: TEST_DATA_LENGTH,
- expectedResume: true,
- expectedContentType: "text/plain",
- expectedContent: TEST_DATA_SHORT
- },
-
- // Paused download with no autoResume and a partial file.
- {
- source: sourceUrl,
- target: getDownloadTarget("inprogress3.txt"),
- tempPath: yield getPartialFile("inprogress3.txt.part"),
- startTime: getStartTime(3),
- state: DOWNLOAD_PAUSED,
- referrer: httpUrl("referrer3"),
- entityID: "",
- maxBytes: MAXBYTES_IN_DB,
- mimeType: "mimeType3",
- preferredAction: Ci.nsIMIMEInfo.saveToDisk,
- preferredApplication: "prerredApplication3",
- autoResume: 0,
-
- // Since this download has not been resumed, the actual data
- // about its total size and content type is not known.
- // Therefore, we're going by the information imported from the DB.
- expectedCurrentBytes: TEST_DATA_PARTIAL_LENGTH,
- expectedTotalBytes: MAXBYTES_IN_DB,
- expectedResume: false,
- expectedContentType: "mimeType3",
- expectedContent: TEST_DATA_SHORT.substr(0, TEST_DATA_PARTIAL_LENGTH),
- },
-
- // Paused download with autoResume and no partial file.
- {
- source: sourceUrl,
- target: getDownloadTarget("inprogress4.txt"),
- tempPath: "",
- startTime: getStartTime(4),
- state: DOWNLOAD_PAUSED,
- referrer: httpUrl("referrer4"),
- entityID: "",
- maxBytes: MAXBYTES_IN_DB,
- mimeType: "text/plain",
- preferredAction: Ci.nsIMIMEInfo.useHelperApp,
- preferredApplication: "prerredApplication4",
- autoResume: 1,
-
- expectedCurrentBytes: TEST_DATA_LENGTH,
- expectedTotalBytes: TEST_DATA_LENGTH,
- expectedResume: true,
- expectedContentType: "text/plain",
- expectedContent: TEST_DATA_SHORT
- },
-
- // Paused download with no autoResume and no partial file.
- {
- source: sourceUrl,
- target: getDownloadTarget("inprogress5.txt"),
- tempPath: "",
- startTime: getStartTime(5),
- state: DOWNLOAD_PAUSED,
- referrer: httpUrl("referrer4"),
- entityID: "",
- maxBytes: MAXBYTES_IN_DB,
- mimeType: "text/plain",
- preferredAction: Ci.nsIMIMEInfo.useSystemDefault,
- preferredApplication: "prerredApplication5",
- autoResume: 0,
-
- expectedCurrentBytes: 0,
- expectedTotalBytes: MAXBYTES_IN_DB,
- expectedResume: false,
- expectedContentType: "text/plain",
- },
-
- // Queued download with no autoResume and no partial file.
- // Even though autoResume=0, queued downloads always autoResume.
- {
- source: sourceUrl,
- target: getDownloadTarget("inprogress6.txt"),
- tempPath: "",
- startTime: getStartTime(6),
- state: DOWNLOAD_QUEUED,
- referrer: httpUrl("referrer6"),
- entityID: "",
- maxBytes: MAXBYTES_IN_DB,
- mimeType: "text/plain",
- preferredAction: Ci.nsIMIMEInfo.useHelperApp,
- preferredApplication: "prerredApplication6",
- autoResume: 0,
-
- expectedCurrentBytes: TEST_DATA_LENGTH,
- expectedTotalBytes: TEST_DATA_LENGTH,
- expectedResume: true,
- expectedContentType: "text/plain",
- expectedContent: TEST_DATA_SHORT
- },
-
- // Notstarted download with no autoResume and no partial file.
- // Even though autoResume=0, notstarted downloads always autoResume.
- {
- source: sourceUrl,
- target: getDownloadTarget("inprogress7.txt"),
- tempPath: "",
- startTime: getStartTime(7),
- state: DOWNLOAD_NOTSTARTED,
- referrer: httpUrl("referrer7"),
- entityID: "",
- maxBytes: MAXBYTES_IN_DB,
- mimeType: "text/plain",
- preferredAction: Ci.nsIMIMEInfo.useHelperApp,
- preferredApplication: "prerredApplication7",
- autoResume: 0,
-
- expectedCurrentBytes: TEST_DATA_LENGTH,
- expectedTotalBytes: TEST_DATA_LENGTH,
- expectedResume: true,
- expectedContentType: "text/plain",
- expectedContent: TEST_DATA_SHORT
- },
-
- // Downloading download with no autoResume and a partial file.
- // Even though autoResume=0, downloading downloads always autoResume.
- {
- source: sourceUrl,
- target: getDownloadTarget("inprogress8.txt"),
- tempPath: yield getPartialFile("inprogress8.txt.part", true),
- startTime: getStartTime(8),
- state: DOWNLOAD_DOWNLOADING,
- referrer: httpUrl("referrer8"),
- entityID: sourceEntityId,
- maxBytes: MAXBYTES_IN_DB,
- mimeType: "text/plain",
- preferredAction: Ci.nsIMIMEInfo.saveToDisk,
- preferredApplication: "prerredApplication8",
- autoResume: 0,
-
- expectedCurrentBytes: TEST_DATA_LENGTH,
- expectedTotalBytes: TEST_DATA_LENGTH,
- expectedResume: true,
- expectedContentType: "text/plain",
- expectedContent: TEST_DATA_TAINTED
- },
- ];
-});
-
-/**
- * Prepares the list of downloads to be added to the database that should
- * *not* be imported by the import procedure.
- */
-add_task(function* prepareNonImportableDownloads()
-{
- gDownloadsRowNonImportable = [
- // Download with no source (should never happen in normal circumstances).
- {
- source: "",
- target: "nonimportable1.txt",
- tempPath: "",
- startTime: getStartTime(1),
- state: DOWNLOAD_PAUSED,
- referrer: "",
- entityID: "",
- maxBytes: MAXBYTES_IN_DB,
- mimeType: "mimeType1",
- preferredAction: Ci.nsIMIMEInfo.saveToDisk,
- preferredApplication: "prerredApplication1",
- autoResume: 1
- },
-
- // state = DOWNLOAD_FAILED
- {
- source: httpUrl("source.txt"),
- target: "nonimportable2.txt",
- tempPath: "",
- startTime: getStartTime(2),
- state: DOWNLOAD_FAILED,
- referrer: "",
- entityID: "",
- maxBytes: MAXBYTES_IN_DB,
- mimeType: "mimeType2",
- preferredAction: Ci.nsIMIMEInfo.saveToDisk,
- preferredApplication: "prerredApplication2",
- autoResume: 1
- },
-
- // state = DOWNLOAD_CANCELED
- {
- source: httpUrl("source.txt"),
- target: "nonimportable3.txt",
- tempPath: "",
- startTime: getStartTime(3),
- state: DOWNLOAD_CANCELED,
- referrer: "",
- entityID: "",
- maxBytes: MAXBYTES_IN_DB,
- mimeType: "mimeType3",
- preferredAction: Ci.nsIMIMEInfo.saveToDisk,
- preferredApplication: "prerredApplication3",
- autoResume: 1
- },
-
- // state = DOWNLOAD_BLOCKED_PARENTAL
- {
- source: httpUrl("source.txt"),
- target: "nonimportable4.txt",
- tempPath: "",
- startTime: getStartTime(4),
- state: DOWNLOAD_BLOCKED_PARENTAL,
- referrer: "",
- entityID: "",
- maxBytes: MAXBYTES_IN_DB,
- mimeType: "mimeType4",
- preferredAction: Ci.nsIMIMEInfo.saveToDisk,
- preferredApplication: "prerredApplication4",
- autoResume: 1
- },
-
- // state = DOWNLOAD_SCANNING
- {
- source: httpUrl("source.txt"),
- target: "nonimportable5.txt",
- tempPath: "",
- startTime: getStartTime(5),
- state: DOWNLOAD_SCANNING,
- referrer: "",
- entityID: "",
- maxBytes: MAXBYTES_IN_DB,
- mimeType: "mimeType5",
- preferredAction: Ci.nsIMIMEInfo.saveToDisk,
- preferredApplication: "prerredApplication5",
- autoResume: 1
- },
-
- // state = DOWNLOAD_DIRTY
- {
- source: httpUrl("source.txt"),
- target: "nonimportable6.txt",
- tempPath: "",
- startTime: getStartTime(6),
- state: DOWNLOAD_DIRTY,
- referrer: "",
- entityID: "",
- maxBytes: MAXBYTES_IN_DB,
- mimeType: "mimeType6",
- preferredAction: Ci.nsIMIMEInfo.saveToDisk,
- preferredApplication: "prerredApplication6",
- autoResume: 1
- },
-
- // state = DOWNLOAD_BLOCKED_POLICY
- {
- source: httpUrl("source.txt"),
- target: "nonimportable7.txt",
- tempPath: "",
- startTime: getStartTime(7),
- state: DOWNLOAD_BLOCKED_POLICY,
- referrer: "",
- entityID: "",
- maxBytes: MAXBYTES_IN_DB,
- mimeType: "mimeType7",
- preferredAction: Ci.nsIMIMEInfo.saveToDisk,
- preferredApplication: "prerredApplication7",
- autoResume: 1
- },
- ];
-});
-
-// Test
-
-/**
- * Creates a temporary Sqlite database with download data and perform an
- * import of that data to the new Downloads API to verify that the import
- * worked correctly.
- */
-add_task(function* test_downloadImport()
-{
- let connection = null;
- let downloadsSqlite = getTempFile("downloads.sqlite").path;
-
- try {
- // Set up the database.
- connection = yield promiseEmptyDatabaseConnection({
- aPath: downloadsSqlite,
- aSchemaVersion: 9
- });
-
- // Insert both the importable and non-importable
- // downloads together.
- for (let downloadRow of gDownloadsRowToImport) {
- yield promiseInsertRow(connection, downloadRow);
- }
-
- for (let downloadRow of gDownloadsRowNonImportable) {
- yield promiseInsertRow(connection, downloadRow);
- }
-
- // Check that every item was inserted.
- do_check_eq((yield promiseTableCount(connection)),
- gDownloadsRowToImport.length +
- gDownloadsRowNonImportable.length);
- } finally {
- // Close the connection so that DownloadImport can open it.
- yield connection.close();
- }
-
- // Import items.
- let list = yield promiseNewList(false);
- yield new DownloadImport(list, downloadsSqlite).import();
- let items = yield list.getAll();
-
- do_check_eq(items.length, gDownloadsRowToImport.length);
-
- for (let i = 0; i < gDownloadsRowToImport.length; i++) {
- yield checkDownload(items[i], gDownloadsRowToImport[i]);
- }
-})
diff --git a/toolkit/components/jsdownloads/test/unit/test_DownloadIntegration.js b/toolkit/components/jsdownloads/test/unit/test_DownloadIntegration.js
deleted file mode 100644
index 31dd7c7a4a..0000000000
--- a/toolkit/components/jsdownloads/test/unit/test_DownloadIntegration.js
+++ /dev/null
@@ -1,432 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests the DownloadIntegration object.
- */
-
-"use strict";
-
-// Globals
-
-/**
- * Notifies the prompt observers and verify the expected downloads count.
- *
- * @param aIsPrivate
- * Flag to know is test private observers.
- * @param aExpectedCount
- * the expected downloads count for quit and offline observers.
- * @param aExpectedPBCount
- * the expected downloads count for private browsing observer.
- */
-function notifyPromptObservers(aIsPrivate, aExpectedCount, aExpectedPBCount) {
- let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"].
- createInstance(Ci.nsISupportsPRBool);
-
- // Notify quit application requested observer.
- DownloadIntegration._testPromptDownloads = -1;
- Services.obs.notifyObservers(cancelQuit, "quit-application-requested", null);
- do_check_eq(DownloadIntegration._testPromptDownloads, aExpectedCount);
-
- // Notify offline requested observer.
- DownloadIntegration._testPromptDownloads = -1;
- Services.obs.notifyObservers(cancelQuit, "offline-requested", null);
- do_check_eq(DownloadIntegration._testPromptDownloads, aExpectedCount);
-
- if (aIsPrivate) {
- // Notify last private browsing requested observer.
- DownloadIntegration._testPromptDownloads = -1;
- Services.obs.notifyObservers(cancelQuit, "last-pb-context-exiting", null);
- do_check_eq(DownloadIntegration._testPromptDownloads, aExpectedPBCount);
- }
-
- delete DownloadIntegration._testPromptDownloads;
-}
-
-// Tests
-
-/**
- * Allows re-enabling the real download directory logic during one test.
- */
-function allowDirectoriesInTest() {
- DownloadIntegration.allowDirectories = true;
- function cleanup() {
- DownloadIntegration.allowDirectories = false;
- }
- do_register_cleanup(cleanup);
- return cleanup;
-}
-
-XPCOMUtils.defineLazyGetter(this, "gStringBundle", function() {
- return Services.strings.
- createBundle("chrome://mozapps/locale/downloads/downloads.properties");
-});
-
-/**
- * Tests that getSystemDownloadsDirectory returns an existing directory or
- * creates a new directory depending on the platform. Instead of the real
- * directory, this test is executed in the temporary directory so we can safely
- * delete the created folder to check whether it is created again.
- */
-add_task(function* test_getSystemDownloadsDirectory_exists_or_creates()
-{
- let tempDir = Services.dirsvc.get("TmpD", Ci.nsIFile);
- let downloadDir;
-
- // OSX / Linux / Windows but not XP/2k
- if (Services.appinfo.OS == "Darwin" ||
- Services.appinfo.OS == "Linux" ||
- (Services.appinfo.OS == "WINNT" &&
- parseFloat(Services.sysinfo.getProperty("version")) >= 6)) {
- downloadDir = yield DownloadIntegration.getSystemDownloadsDirectory();
- do_check_eq(downloadDir, tempDir.path);
- do_check_true(yield OS.File.exists(downloadDir));
-
- let info = yield OS.File.stat(downloadDir);
- do_check_true(info.isDir);
- } else {
- let targetPath = OS.Path.join(tempDir.path,
- gStringBundle.GetStringFromName("downloadsFolder"));
- try {
- yield OS.File.removeEmptyDir(targetPath);
- } catch (e) {}
- downloadDir = yield DownloadIntegration.getSystemDownloadsDirectory();
- do_check_eq(downloadDir, targetPath);
- do_check_true(yield OS.File.exists(downloadDir));
-
- let info = yield OS.File.stat(downloadDir);
- do_check_true(info.isDir);
- yield OS.File.removeEmptyDir(targetPath);
- }
-});
-
-/**
- * Tests that the real directory returned by getSystemDownloadsDirectory is not
- * the one that is used during unit tests. Since this is the actual downloads
- * directory of the operating system, we don't try to delete it afterwards.
- */
-add_task(function* test_getSystemDownloadsDirectory_real()
-{
- let fakeDownloadDir = yield DownloadIntegration.getSystemDownloadsDirectory();
-
- let cleanup = allowDirectoriesInTest();
- let realDownloadDir = yield DownloadIntegration.getSystemDownloadsDirectory();
- cleanup();
-
- do_check_neq(fakeDownloadDir, realDownloadDir);
-});
-
-/**
- * Tests that the getPreferredDownloadsDirectory returns a valid download
- * directory string path.
- */
-add_task(function* test_getPreferredDownloadsDirectory()
-{
- let cleanupDirectories = allowDirectoriesInTest();
-
- let folderListPrefName = "browser.download.folderList";
- let dirPrefName = "browser.download.dir";
- function cleanupPrefs() {
- Services.prefs.clearUserPref(folderListPrefName);
- Services.prefs.clearUserPref(dirPrefName);
- }
- do_register_cleanup(cleanupPrefs);
-
- // Should return the system downloads directory.
- Services.prefs.setIntPref(folderListPrefName, 1);
- let systemDir = yield DownloadIntegration.getSystemDownloadsDirectory();
- let downloadDir = yield DownloadIntegration.getPreferredDownloadsDirectory();
- do_check_neq(downloadDir, "");
- do_check_eq(downloadDir, systemDir);
-
- // Should return the desktop directory.
- Services.prefs.setIntPref(folderListPrefName, 0);
- downloadDir = yield DownloadIntegration.getPreferredDownloadsDirectory();
- do_check_neq(downloadDir, "");
- do_check_eq(downloadDir, Services.dirsvc.get("Desk", Ci.nsIFile).path);
-
- // Should return the system downloads directory because the dir preference
- // is not set.
- Services.prefs.setIntPref(folderListPrefName, 2);
- downloadDir = yield DownloadIntegration.getPreferredDownloadsDirectory();
- do_check_neq(downloadDir, "");
- do_check_eq(downloadDir, systemDir);
-
- // Should return the directory which is listed in the dir preference.
- let time = (new Date()).getTime();
- let tempDir = Services.dirsvc.get("TmpD", Ci.nsIFile);
- tempDir.append(time);
- Services.prefs.setComplexValue("browser.download.dir", Ci.nsIFile, tempDir);
- downloadDir = yield DownloadIntegration.getPreferredDownloadsDirectory();
- do_check_neq(downloadDir, "");
- do_check_eq(downloadDir, tempDir.path);
- do_check_true(yield OS.File.exists(downloadDir));
- yield OS.File.removeEmptyDir(tempDir.path);
-
- // Should return the system downloads directory beacause the path is invalid
- // in the dir preference.
- tempDir = Services.dirsvc.get("TmpD", Ci.nsIFile);
- tempDir.append("dir_not_exist");
- tempDir.append(time);
- Services.prefs.setComplexValue("browser.download.dir", Ci.nsIFile, tempDir);
- downloadDir = yield DownloadIntegration.getPreferredDownloadsDirectory();
- do_check_eq(downloadDir, systemDir);
-
- // Should return the system downloads directory because the folderList
- // preference is invalid
- Services.prefs.setIntPref(folderListPrefName, 999);
- downloadDir = yield DownloadIntegration.getPreferredDownloadsDirectory();
- do_check_eq(downloadDir, systemDir);
-
- cleanupPrefs();
- cleanupDirectories();
-});
-
-/**
- * Tests that the getTemporaryDownloadsDirectory returns a valid download
- * directory string path.
- */
-add_task(function* test_getTemporaryDownloadsDirectory()
-{
- let cleanup = allowDirectoriesInTest();
-
- let downloadDir = yield DownloadIntegration.getTemporaryDownloadsDirectory();
- do_check_neq(downloadDir, "");
-
- if ("nsILocalFileMac" in Ci) {
- let preferredDownloadDir = yield DownloadIntegration.getPreferredDownloadsDirectory();
- do_check_eq(downloadDir, preferredDownloadDir);
- } else {
- let tempDir = Services.dirsvc.get("TmpD", Ci.nsIFile);
- do_check_eq(downloadDir, tempDir.path);
- }
-
- cleanup();
-});
-
-// Tests DownloadObserver
-
-/**
- * Re-enables the default observers for the following tests.
- *
- * This takes effect the first time a DownloadList object is created, and lasts
- * until this test file has completed.
- */
-add_task(function* test_observers_setup()
-{
- DownloadIntegration.allowObservers = true;
- do_register_cleanup(function () {
- DownloadIntegration.allowObservers = false;
- });
-});
-
-/**
- * Tests notifications prompts when observers are notified if there are public
- * and private active downloads.
- */
-add_task(function* test_notifications()
-{
- for (let isPrivate of [false, true]) {
- mustInterruptResponses();
-
- let list = yield promiseNewList(isPrivate);
- let download1 = yield promiseNewDownload(httpUrl("interruptible.txt"));
- let download2 = yield promiseNewDownload(httpUrl("interruptible.txt"));
- let download3 = yield promiseNewDownload(httpUrl("interruptible.txt"));
- let promiseAttempt1 = download1.start();
- let promiseAttempt2 = download2.start();
- download3.start().catch(() => {});
-
- // Add downloads to list.
- yield list.add(download1);
- yield list.add(download2);
- yield list.add(download3);
- // Cancel third download
- yield download3.cancel();
-
- notifyPromptObservers(isPrivate, 2, 2);
-
- // Allow the downloads to complete.
- continueResponses();
- yield promiseAttempt1;
- yield promiseAttempt2;
-
- // Clean up.
- yield list.remove(download1);
- yield list.remove(download2);
- yield list.remove(download3);
- }
-});
-
-/**
- * Tests that notifications prompts observers are not notified if there are no
- * public or private active downloads.
- */
-add_task(function* test_no_notifications()
-{
- for (let isPrivate of [false, true]) {
- let list = yield promiseNewList(isPrivate);
- let download1 = yield promiseNewDownload(httpUrl("interruptible.txt"));
- let download2 = yield promiseNewDownload(httpUrl("interruptible.txt"));
- download1.start().catch(() => {});
- download2.start().catch(() => {});
-
- // Add downloads to list.
- yield list.add(download1);
- yield list.add(download2);
-
- yield download1.cancel();
- yield download2.cancel();
-
- notifyPromptObservers(isPrivate, 0, 0);
-
- // Clean up.
- yield list.remove(download1);
- yield list.remove(download2);
- }
-});
-
-/**
- * Tests notifications prompts when observers are notified if there are public
- * and private active downloads at the same time.
- */
-add_task(function* test_mix_notifications()
-{
- mustInterruptResponses();
-
- let publicList = yield promiseNewList();
- let privateList = yield Downloads.getList(Downloads.PRIVATE);
- let download1 = yield promiseNewDownload(httpUrl("interruptible.txt"));
- let download2 = yield promiseNewDownload(httpUrl("interruptible.txt"));
- let promiseAttempt1 = download1.start();
- let promiseAttempt2 = download2.start();
-
- // Add downloads to lists.
- yield publicList.add(download1);
- yield privateList.add(download2);
-
- notifyPromptObservers(true, 2, 1);
-
- // Allow the downloads to complete.
- continueResponses();
- yield promiseAttempt1;
- yield promiseAttempt2;
-
- // Clean up.
- yield publicList.remove(download1);
- yield privateList.remove(download2);
-});
-
-/**
- * Tests suspending and resuming as well as going offline and then online again.
- * The downloads should stop when suspending and start again when resuming.
- */
-add_task(function* test_suspend_resume()
-{
- // The default wake delay is 10 seconds, so set the wake delay to be much
- // faster for these tests.
- Services.prefs.setIntPref("browser.download.manager.resumeOnWakeDelay", 5);
-
- let addDownload = function(list)
- {
- return Task.spawn(function* () {
- let download = yield promiseNewDownload(httpUrl("interruptible.txt"));
- download.start().catch(() => {});
- list.add(download);
- return download;
- });
- }
-
- let publicList = yield promiseNewList();
- let privateList = yield promiseNewList(true);
-
- let download1 = yield addDownload(publicList);
- let download2 = yield addDownload(publicList);
- let download3 = yield addDownload(privateList);
- let download4 = yield addDownload(privateList);
- let download5 = yield addDownload(publicList);
-
- // First, check that the downloads are all canceled when going to sleep.
- Services.obs.notifyObservers(null, "sleep_notification", null);
- do_check_true(download1.canceled);
- do_check_true(download2.canceled);
- do_check_true(download3.canceled);
- do_check_true(download4.canceled);
- do_check_true(download5.canceled);
-
- // Remove a download. It should not be started again.
- publicList.remove(download5);
- do_check_true(download5.canceled);
-
- // When waking up again, the downloads start again after the wake delay. To be
- // more robust, don't check after a delay but instead just wait for the
- // downloads to finish.
- Services.obs.notifyObservers(null, "wake_notification", null);
- yield download1.whenSucceeded();
- yield download2.whenSucceeded();
- yield download3.whenSucceeded();
- yield download4.whenSucceeded();
-
- // Downloads should no longer be canceled. However, as download5 was removed
- // from the public list, it will not be restarted.
- do_check_false(download1.canceled);
- do_check_true(download5.canceled);
-
- // Create four new downloads and check for going offline and then online again.
-
- download1 = yield addDownload(publicList);
- download2 = yield addDownload(publicList);
- download3 = yield addDownload(privateList);
- download4 = yield addDownload(privateList);
-
- // Going offline should cancel the downloads.
- Services.obs.notifyObservers(null, "network:offline-about-to-go-offline", null);
- do_check_true(download1.canceled);
- do_check_true(download2.canceled);
- do_check_true(download3.canceled);
- do_check_true(download4.canceled);
-
- // Going back online should start the downloads again.
- Services.obs.notifyObservers(null, "network:offline-status-changed", "online");
- yield download1.whenSucceeded();
- yield download2.whenSucceeded();
- yield download3.whenSucceeded();
- yield download4.whenSucceeded();
-
- Services.prefs.clearUserPref("browser.download.manager.resumeOnWakeDelay");
-});
-
-/**
- * Tests both the downloads list and the in-progress downloads are clear when
- * private browsing observer is notified.
- */
-add_task(function* test_exit_private_browsing()
-{
- mustInterruptResponses();
-
- let privateList = yield promiseNewList(true);
- let download1 = yield promiseNewDownload(httpUrl("source.txt"));
- let download2 = yield promiseNewDownload(httpUrl("interruptible.txt"));
- let promiseAttempt1 = download1.start();
- download2.start();
-
- // Add downloads to list.
- yield privateList.add(download1);
- yield privateList.add(download2);
-
- // Complete the download.
- yield promiseAttempt1;
-
- do_check_eq((yield privateList.getAll()).length, 2);
-
- // Simulate exiting the private browsing.
- yield new Promise(resolve => {
- DownloadIntegration._testResolveClearPrivateList = resolve;
- Services.obs.notifyObservers(null, "last-pb-context-exited", null);
- });
- delete DownloadIntegration._testResolveClearPrivateList;
-
- do_check_eq((yield privateList.getAll()).length, 0);
-
- continueResponses();
-});
diff --git a/toolkit/components/jsdownloads/test/unit/test_DownloadLegacy.js b/toolkit/components/jsdownloads/test/unit/test_DownloadLegacy.js
deleted file mode 100644
index dc6c186238..0000000000
--- a/toolkit/components/jsdownloads/test/unit/test_DownloadLegacy.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests the integration with legacy interfaces for downloads.
- */
-
-"use strict";
-
-// Execution of common tests
-
-var gUseLegacySaver = true;
-
-var scriptFile = do_get_file("common_test_Download.js");
-Services.scriptloader.loadSubScript(NetUtil.newURI(scriptFile).spec);
diff --git a/toolkit/components/jsdownloads/test/unit/test_DownloadList.js b/toolkit/components/jsdownloads/test/unit/test_DownloadList.js
deleted file mode 100644
index 71e8807416..0000000000
--- a/toolkit/components/jsdownloads/test/unit/test_DownloadList.js
+++ /dev/null
@@ -1,564 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests the DownloadList object.
- */
-
-"use strict";
-
-// Globals
-
-/**
- * Returns a PRTime in the past usable to add expirable visits.
- *
- * @note Expiration ignores any visit added in the last 7 days, but it's
- * better be safe against DST issues, by going back one day more.
- */
-function getExpirablePRTime()
-{
- let dateObj = new Date();
- // Normalize to midnight
- dateObj.setHours(0);
- dateObj.setMinutes(0);
- dateObj.setSeconds(0);
- dateObj.setMilliseconds(0);
- dateObj = new Date(dateObj.getTime() - 8 * 86400000);
- return dateObj.getTime() * 1000;
-}
-
-/**
- * Adds an expirable history visit for a download.
- *
- * @param aSourceUrl
- * String containing the URI for the download source, or null to use
- * httpUrl("source.txt").
- *
- * @return {Promise}
- * @rejects JavaScript exception.
- */
-function promiseExpirableDownloadVisit(aSourceUrl)
-{
- let deferred = Promise.defer();
- PlacesUtils.asyncHistory.updatePlaces(
- {
- uri: NetUtil.newURI(aSourceUrl || httpUrl("source.txt")),
- visits: [{
- transitionType: Ci.nsINavHistoryService.TRANSITION_DOWNLOAD,
- visitDate: getExpirablePRTime(),
- }]
- },
- {
- handleError: function handleError(aResultCode, aPlaceInfo) {
- let ex = new Components.Exception("Unexpected error in adding visits.",
- aResultCode);
- deferred.reject(ex);
- },
- handleResult: function () {},
- handleCompletion: function handleCompletion() {
- deferred.resolve();
- }
- });
- return deferred.promise;
-}
-
-// Tests
-
-/**
- * Checks the testing mechanism used to build different download lists.
- */
-add_task(function* test_construction()
-{
- let downloadListOne = yield promiseNewList();
- let downloadListTwo = yield promiseNewList();
- let privateDownloadListOne = yield promiseNewList(true);
- let privateDownloadListTwo = yield promiseNewList(true);
-
- do_check_neq(downloadListOne, downloadListTwo);
- do_check_neq(privateDownloadListOne, privateDownloadListTwo);
- do_check_neq(downloadListOne, privateDownloadListOne);
-});
-
-/**
- * Checks the methods to add and retrieve items from the list.
- */
-add_task(function* test_add_getAll()
-{
- let list = yield promiseNewList();
-
- let downloadOne = yield promiseNewDownload();
- yield list.add(downloadOne);
-
- let itemsOne = yield list.getAll();
- do_check_eq(itemsOne.length, 1);
- do_check_eq(itemsOne[0], downloadOne);
-
- let downloadTwo = yield promiseNewDownload();
- yield list.add(downloadTwo);
-
- let itemsTwo = yield list.getAll();
- do_check_eq(itemsTwo.length, 2);
- do_check_eq(itemsTwo[0], downloadOne);
- do_check_eq(itemsTwo[1], downloadTwo);
-
- // The first snapshot should not have been modified.
- do_check_eq(itemsOne.length, 1);
-});
-
-/**
- * Checks the method to remove items from the list.
- */
-add_task(function* test_remove()
-{
- let list = yield promiseNewList();
-
- yield list.add(yield promiseNewDownload());
- yield list.add(yield promiseNewDownload());
-
- let items = yield list.getAll();
- yield list.remove(items[0]);
-
- // Removing an item that was never added should not raise an error.
- yield list.remove(yield promiseNewDownload());
-
- items = yield list.getAll();
- do_check_eq(items.length, 1);
-});
-
-/**
- * Tests that the "add", "remove", and "getAll" methods on the global
- * DownloadCombinedList object combine the contents of the global DownloadList
- * objects for public and private downloads.
- */
-add_task(function* test_DownloadCombinedList_add_remove_getAll()
-{
- let publicList = yield promiseNewList();
- let privateList = yield Downloads.getList(Downloads.PRIVATE);
- let combinedList = yield Downloads.getList(Downloads.ALL);
-
- let publicDownload = yield promiseNewDownload();
- let privateDownload = yield Downloads.createDownload({
- source: { url: httpUrl("source.txt"), isPrivate: true },
- target: getTempFile(TEST_TARGET_FILE_NAME).path,
- });
-
- yield publicList.add(publicDownload);
- yield privateList.add(privateDownload);
-
- do_check_eq((yield combinedList.getAll()).length, 2);
-
- yield combinedList.remove(publicDownload);
- yield combinedList.remove(privateDownload);
-
- do_check_eq((yield combinedList.getAll()).length, 0);
-
- yield combinedList.add(publicDownload);
- yield combinedList.add(privateDownload);
-
- do_check_eq((yield publicList.getAll()).length, 1);
- do_check_eq((yield privateList.getAll()).length, 1);
- do_check_eq((yield combinedList.getAll()).length, 2);
-
- yield publicList.remove(publicDownload);
- yield privateList.remove(privateDownload);
-
- do_check_eq((yield combinedList.getAll()).length, 0);
-});
-
-/**
- * Checks that views receive the download add and remove notifications, and that
- * adding and removing views works as expected, both for a normal and a combined
- * list.
- */
-add_task(function* test_notifications_add_remove()
-{
- for (let isCombined of [false, true]) {
- // Force creating a new list for both the public and combined cases.
- let list = yield promiseNewList();
- if (isCombined) {
- list = yield Downloads.getList(Downloads.ALL);
- }
-
- let downloadOne = yield promiseNewDownload();
- let downloadTwo = yield Downloads.createDownload({
- source: { url: httpUrl("source.txt"), isPrivate: true },
- target: getTempFile(TEST_TARGET_FILE_NAME).path,
- });
- yield list.add(downloadOne);
- yield list.add(downloadTwo);
-
- // Check that we receive add notifications for existing elements.
- let addNotifications = 0;
- let viewOne = {
- onDownloadAdded: function (aDownload) {
- // The first download to be notified should be the first that was added.
- if (addNotifications == 0) {
- do_check_eq(aDownload, downloadOne);
- } else if (addNotifications == 1) {
- do_check_eq(aDownload, downloadTwo);
- }
- addNotifications++;
- },
- };
- yield list.addView(viewOne);
- do_check_eq(addNotifications, 2);
-
- // Check that we receive add notifications for new elements.
- yield list.add(yield promiseNewDownload());
- do_check_eq(addNotifications, 3);
-
- // Check that we receive remove notifications.
- let removeNotifications = 0;
- let viewTwo = {
- onDownloadRemoved: function (aDownload) {
- do_check_eq(aDownload, downloadOne);
- removeNotifications++;
- },
- };
- yield list.addView(viewTwo);
- yield list.remove(downloadOne);
- do_check_eq(removeNotifications, 1);
-
- // We should not receive remove notifications after the view is removed.
- yield list.removeView(viewTwo);
- yield list.remove(downloadTwo);
- do_check_eq(removeNotifications, 1);
-
- // We should not receive add notifications after the view is removed.
- yield list.removeView(viewOne);
- yield list.add(yield promiseNewDownload());
- do_check_eq(addNotifications, 3);
- }
-});
-
-/**
- * Checks that views receive the download change notifications, both for a
- * normal and a combined list.
- */
-add_task(function* test_notifications_change()
-{
- for (let isCombined of [false, true]) {
- // Force creating a new list for both the public and combined cases.
- let list = yield promiseNewList();
- if (isCombined) {
- list = yield Downloads.getList(Downloads.ALL);
- }
-
- let downloadOne = yield promiseNewDownload();
- let downloadTwo = yield Downloads.createDownload({
- source: { url: httpUrl("source.txt"), isPrivate: true },
- target: getTempFile(TEST_TARGET_FILE_NAME).path,
- });
- yield list.add(downloadOne);
- yield list.add(downloadTwo);
-
- // Check that we receive change notifications.
- let receivedOnDownloadChanged = false;
- yield list.addView({
- onDownloadChanged: function (aDownload) {
- do_check_eq(aDownload, downloadOne);
- receivedOnDownloadChanged = true;
- },
- });
- yield downloadOne.start();
- do_check_true(receivedOnDownloadChanged);
-
- // We should not receive change notifications after a download is removed.
- receivedOnDownloadChanged = false;
- yield list.remove(downloadTwo);
- yield downloadTwo.start();
- do_check_false(receivedOnDownloadChanged);
- }
-});
-
-/**
- * Checks that the reference to "this" is correct in the view callbacks.
- */
-add_task(function* test_notifications_this()
-{
- let list = yield promiseNewList();
-
- // Check that we receive change notifications.
- let receivedOnDownloadAdded = false;
- let receivedOnDownloadChanged = false;
- let receivedOnDownloadRemoved = false;
- let view = {
- onDownloadAdded: function () {
- do_check_eq(this, view);
- receivedOnDownloadAdded = true;
- },
- onDownloadChanged: function () {
- // Only do this check once.
- if (!receivedOnDownloadChanged) {
- do_check_eq(this, view);
- receivedOnDownloadChanged = true;
- }
- },
- onDownloadRemoved: function () {
- do_check_eq(this, view);
- receivedOnDownloadRemoved = true;
- },
- };
- yield list.addView(view);
-
- let download = yield promiseNewDownload();
- yield list.add(download);
- yield download.start();
- yield list.remove(download);
-
- // Verify that we executed the checks.
- do_check_true(receivedOnDownloadAdded);
- do_check_true(receivedOnDownloadChanged);
- do_check_true(receivedOnDownloadRemoved);
-});
-
-/**
- * Checks that download is removed on history expiration.
- */
-add_task(function* test_history_expiration()
-{
- mustInterruptResponses();
-
- function cleanup() {
- Services.prefs.clearUserPref("places.history.expiration.max_pages");
- }
- do_register_cleanup(cleanup);
-
- // Set max pages to 0 to make the download expire.
- Services.prefs.setIntPref("places.history.expiration.max_pages", 0);
-
- let list = yield promiseNewList();
- let downloadOne = yield promiseNewDownload();
- let downloadTwo = yield promiseNewDownload(httpUrl("interruptible.txt"));
-
- let deferred = Promise.defer();
- let removeNotifications = 0;
- let downloadView = {
- onDownloadRemoved: function (aDownload) {
- if (++removeNotifications == 2) {
- deferred.resolve();
- }
- },
- };
- yield list.addView(downloadView);
-
- // Work with one finished download and one canceled download.
- yield downloadOne.start();
- downloadTwo.start().catch(() => {});
- yield downloadTwo.cancel();
-
- // We must replace the visits added while executing the downloads with visits
- // that are older than 7 days, otherwise they will not be expired.
- yield PlacesTestUtils.clearHistory();
- yield promiseExpirableDownloadVisit();
- yield promiseExpirableDownloadVisit(httpUrl("interruptible.txt"));
-
- // After clearing history, we can add the downloads to be removed to the list.
- yield list.add(downloadOne);
- yield list.add(downloadTwo);
-
- // Force a history expiration.
- Cc["@mozilla.org/places/expiration;1"]
- .getService(Ci.nsIObserver).observe(null, "places-debug-start-expiration", -1);
-
- // Wait for both downloads to be removed.
- yield deferred.promise;
-
- cleanup();
-});
-
-/**
- * Checks all downloads are removed after clearing history.
- */
-add_task(function* test_history_clear()
-{
- let list = yield promiseNewList();
- let downloadOne = yield promiseNewDownload();
- let downloadTwo = yield promiseNewDownload();
- yield list.add(downloadOne);
- yield list.add(downloadTwo);
-
- let deferred = Promise.defer();
- let removeNotifications = 0;
- let downloadView = {
- onDownloadRemoved: function (aDownload) {
- if (++removeNotifications == 2) {
- deferred.resolve();
- }
- },
- };
- yield list.addView(downloadView);
-
- yield downloadOne.start();
- yield downloadTwo.start();
-
- yield PlacesTestUtils.clearHistory();
-
- // Wait for the removal notifications that may still be pending.
- yield deferred.promise;
-});
-
-/**
- * Tests the removeFinished method to ensure that it only removes
- * finished downloads.
- */
-add_task(function* test_removeFinished()
-{
- let list = yield promiseNewList();
- let downloadOne = yield promiseNewDownload();
- let downloadTwo = yield promiseNewDownload();
- let downloadThree = yield promiseNewDownload();
- let downloadFour = yield promiseNewDownload();
- yield list.add(downloadOne);
- yield list.add(downloadTwo);
- yield list.add(downloadThree);
- yield list.add(downloadFour);
-
- let deferred = Promise.defer();
- let removeNotifications = 0;
- let downloadView = {
- onDownloadRemoved: function (aDownload) {
- do_check_true(aDownload == downloadOne ||
- aDownload == downloadTwo ||
- aDownload == downloadThree);
- do_check_true(removeNotifications < 3);
- if (++removeNotifications == 3) {
- deferred.resolve();
- }
- },
- };
- yield list.addView(downloadView);
-
- // Start three of the downloads, but don't start downloadTwo, then set
- // downloadFour to have partial data. All downloads except downloadFour
- // should be removed.
- yield downloadOne.start();
- yield downloadThree.start();
- yield downloadFour.start();
- downloadFour.hasPartialData = true;
-
- list.removeFinished();
- yield deferred.promise;
-
- let downloads = yield list.getAll()
- do_check_eq(downloads.length, 1);
-});
-
-/**
- * Tests the global DownloadSummary objects for the public, private, and
- * combined download lists.
- */
-add_task(function* test_DownloadSummary()
-{
- mustInterruptResponses();
-
- let publicList = yield promiseNewList();
- let privateList = yield Downloads.getList(Downloads.PRIVATE);
-
- let publicSummary = yield Downloads.getSummary(Downloads.PUBLIC);
- let privateSummary = yield Downloads.getSummary(Downloads.PRIVATE);
- let combinedSummary = yield Downloads.getSummary(Downloads.ALL);
-
- // Add a public download that has succeeded.
- let succeededPublicDownload = yield promiseNewDownload();
- yield succeededPublicDownload.start();
- yield publicList.add(succeededPublicDownload);
-
- // Add a public download that has been canceled midway.
- let canceledPublicDownload =
- yield promiseNewDownload(httpUrl("interruptible.txt"));
- canceledPublicDownload.start().catch(() => {});
- yield promiseDownloadMidway(canceledPublicDownload);
- yield canceledPublicDownload.cancel();
- yield publicList.add(canceledPublicDownload);
-
- // Add a public download that is in progress.
- let inProgressPublicDownload =
- yield promiseNewDownload(httpUrl("interruptible.txt"));
- inProgressPublicDownload.start().catch(() => {});
- yield promiseDownloadMidway(inProgressPublicDownload);
- yield publicList.add(inProgressPublicDownload);
-
- // Add a private download that is in progress.
- let inProgressPrivateDownload = yield Downloads.createDownload({
- source: { url: httpUrl("interruptible.txt"), isPrivate: true },
- target: getTempFile(TEST_TARGET_FILE_NAME).path,
- });
- inProgressPrivateDownload.start().catch(() => {});
- yield promiseDownloadMidway(inProgressPrivateDownload);
- yield privateList.add(inProgressPrivateDownload);
-
- // Verify that the summary includes the total number of bytes and the
- // currently transferred bytes only for the downloads that are not stopped.
- // For simplicity, we assume that after a download is added to the list, its
- // current state is immediately propagated to the summary object, which is
- // true in the current implementation, though it is not guaranteed as all the
- // download operations may happen asynchronously.
- do_check_false(publicSummary.allHaveStopped);
- do_check_eq(publicSummary.progressTotalBytes, TEST_DATA_SHORT.length * 2);
- do_check_eq(publicSummary.progressCurrentBytes, TEST_DATA_SHORT.length);
-
- do_check_false(privateSummary.allHaveStopped);
- do_check_eq(privateSummary.progressTotalBytes, TEST_DATA_SHORT.length * 2);
- do_check_eq(privateSummary.progressCurrentBytes, TEST_DATA_SHORT.length);
-
- do_check_false(combinedSummary.allHaveStopped);
- do_check_eq(combinedSummary.progressTotalBytes, TEST_DATA_SHORT.length * 4);
- do_check_eq(combinedSummary.progressCurrentBytes, TEST_DATA_SHORT.length * 2);
-
- yield inProgressPublicDownload.cancel();
-
- // Stopping the download should have excluded it from the summary.
- do_check_true(publicSummary.allHaveStopped);
- do_check_eq(publicSummary.progressTotalBytes, 0);
- do_check_eq(publicSummary.progressCurrentBytes, 0);
-
- do_check_false(privateSummary.allHaveStopped);
- do_check_eq(privateSummary.progressTotalBytes, TEST_DATA_SHORT.length * 2);
- do_check_eq(privateSummary.progressCurrentBytes, TEST_DATA_SHORT.length);
-
- do_check_false(combinedSummary.allHaveStopped);
- do_check_eq(combinedSummary.progressTotalBytes, TEST_DATA_SHORT.length * 2);
- do_check_eq(combinedSummary.progressCurrentBytes, TEST_DATA_SHORT.length);
-
- yield inProgressPrivateDownload.cancel();
-
- // All the downloads should be stopped now.
- do_check_true(publicSummary.allHaveStopped);
- do_check_eq(publicSummary.progressTotalBytes, 0);
- do_check_eq(publicSummary.progressCurrentBytes, 0);
-
- do_check_true(privateSummary.allHaveStopped);
- do_check_eq(privateSummary.progressTotalBytes, 0);
- do_check_eq(privateSummary.progressCurrentBytes, 0);
-
- do_check_true(combinedSummary.allHaveStopped);
- do_check_eq(combinedSummary.progressTotalBytes, 0);
- do_check_eq(combinedSummary.progressCurrentBytes, 0);
-});
-
-/**
- * Checks that views receive the summary change notification. This is tested on
- * the combined summary when adding a public download, as we assume that if we
- * pass the test in this case we will also pass it in the others.
- */
-add_task(function* test_DownloadSummary_notifications()
-{
- let list = yield promiseNewList();
- let summary = yield Downloads.getSummary(Downloads.ALL);
-
- let download = yield promiseNewDownload();
- yield list.add(download);
-
- // Check that we receive change notifications.
- let receivedOnSummaryChanged = false;
- yield summary.addView({
- onSummaryChanged: function () {
- receivedOnSummaryChanged = true;
- },
- });
- yield download.start();
- do_check_true(receivedOnSummaryChanged);
-});
diff --git a/toolkit/components/jsdownloads/test/unit/test_DownloadStore.js b/toolkit/components/jsdownloads/test/unit/test_DownloadStore.js
deleted file mode 100644
index 3a23dfbe36..0000000000
--- a/toolkit/components/jsdownloads/test/unit/test_DownloadStore.js
+++ /dev/null
@@ -1,315 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests the DownloadStore object.
- */
-
-"use strict";
-
-// Globals
-
-XPCOMUtils.defineLazyModuleGetter(this, "DownloadStore",
- "resource://gre/modules/DownloadStore.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "OS",
- "resource://gre/modules/osfile.jsm")
-
-/**
- * Returns a new DownloadList object with an associated DownloadStore.
- *
- * @param aStorePath
- * String pointing to the file to be associated with the DownloadStore,
- * or undefined to use a non-existing temporary file. In this case, the
- * temporary file is deleted when the test file execution finishes.
- *
- * @return {Promise}
- * @resolves Array [ Newly created DownloadList , associated DownloadStore ].
- * @rejects JavaScript exception.
- */
-function promiseNewListAndStore(aStorePath)
-{
- return promiseNewList().then(function (aList) {
- let path = aStorePath || getTempFile(TEST_STORE_FILE_NAME).path;
- let store = new DownloadStore(aList, path);
- return [aList, store];
- });
-}
-
-// Tests
-
-/**
- * Saves downloads to a file, then reloads them.
- */
-add_task(function* test_save_reload()
-{
- let [listForSave, storeForSave] = yield promiseNewListAndStore();
- let [listForLoad, storeForLoad] = yield promiseNewListAndStore(
- storeForSave.path);
-
- listForSave.add(yield promiseNewDownload(httpUrl("source.txt")));
- listForSave.add(yield Downloads.createDownload({
- source: { url: httpUrl("empty.txt"),
- referrer: TEST_REFERRER_URL },
- target: getTempFile(TEST_TARGET_FILE_NAME),
- }));
-
- // This PDF download should not be serialized because it never succeeds.
- let pdfDownload = yield Downloads.createDownload({
- source: { url: httpUrl("empty.txt"),
- referrer: TEST_REFERRER_URL },
- target: getTempFile(TEST_TARGET_FILE_NAME),
- saver: "pdf",
- });
- listForSave.add(pdfDownload);
-
- // If we used a callback to adjust the channel, the download should
- // not be serialized because we can't recreate it across sessions.
- let adjustedDownload = yield Downloads.createDownload({
- source: { url: httpUrl("empty.txt"),
- adjustChannel: () => Promise.resolve() },
- target: getTempFile(TEST_TARGET_FILE_NAME),
- });
- listForSave.add(adjustedDownload);
-
- let legacyDownload = yield promiseStartLegacyDownload();
- yield legacyDownload.cancel();
- listForSave.add(legacyDownload);
-
- yield storeForSave.save();
- yield storeForLoad.load();
-
- // Remove the PDF and adjusted downloads because they should not appear here.
- listForSave.remove(adjustedDownload);
- listForSave.remove(pdfDownload);
-
- let itemsForSave = yield listForSave.getAll();
- let itemsForLoad = yield listForLoad.getAll();
-
- do_check_eq(itemsForSave.length, itemsForLoad.length);
-
- // Downloads should be reloaded in the same order.
- for (let i = 0; i < itemsForSave.length; i++) {
- // The reloaded downloads are different objects.
- do_check_neq(itemsForSave[i], itemsForLoad[i]);
-
- // The reloaded downloads have the same properties.
- do_check_eq(itemsForSave[i].source.url,
- itemsForLoad[i].source.url);
- do_check_eq(itemsForSave[i].source.referrer,
- itemsForLoad[i].source.referrer);
- do_check_eq(itemsForSave[i].target.path,
- itemsForLoad[i].target.path);
- do_check_eq(itemsForSave[i].saver.toSerializable(),
- itemsForLoad[i].saver.toSerializable());
- }
-});
-
-/**
- * Checks that saving an empty list deletes any existing file.
- */
-add_task(function* test_save_empty()
-{
- let [, store] = yield promiseNewListAndStore();
-
- let createdFile = yield OS.File.open(store.path, { create: true });
- yield createdFile.close();
-
- yield store.save();
-
- do_check_false(yield OS.File.exists(store.path));
-
- // If the file does not exist, saving should not generate exceptions.
- yield store.save();
-});
-
-/**
- * Checks that loading from a missing file results in an empty list.
- */
-add_task(function* test_load_empty()
-{
- let [list, store] = yield promiseNewListAndStore();
-
- do_check_false(yield OS.File.exists(store.path));
-
- yield store.load();
-
- let items = yield list.getAll();
- do_check_eq(items.length, 0);
-});
-
-/**
- * Loads downloads from a string in a predefined format. The purpose of this
- * test is to verify that the JSON format used in previous versions can be
- * loaded, assuming the file is reloaded on the same platform.
- */
-add_task(function* test_load_string_predefined()
-{
- let [list, store] = yield promiseNewListAndStore();
-
- // The platform-dependent file name should be generated dynamically.
- let targetPath = getTempFile(TEST_TARGET_FILE_NAME).path;
- let filePathLiteral = JSON.stringify(targetPath);
- let sourceUriLiteral = JSON.stringify(httpUrl("source.txt"));
- let emptyUriLiteral = JSON.stringify(httpUrl("empty.txt"));
- let referrerUriLiteral = JSON.stringify(TEST_REFERRER_URL);
-
- let string = "{\"list\":[{\"source\":" + sourceUriLiteral + "," +
- "\"target\":" + filePathLiteral + "}," +
- "{\"source\":{\"url\":" + emptyUriLiteral + "," +
- "\"referrer\":" + referrerUriLiteral + "}," +
- "\"target\":" + filePathLiteral + "}]}";
-
- yield OS.File.writeAtomic(store.path,
- new TextEncoder().encode(string),
- { tmpPath: store.path + ".tmp" });
-
- yield store.load();
-
- let items = yield list.getAll();
-
- do_check_eq(items.length, 2);
-
- do_check_eq(items[0].source.url, httpUrl("source.txt"));
- do_check_eq(items[0].target.path, targetPath);
-
- do_check_eq(items[1].source.url, httpUrl("empty.txt"));
- do_check_eq(items[1].source.referrer, TEST_REFERRER_URL);
- do_check_eq(items[1].target.path, targetPath);
-});
-
-/**
- * Loads downloads from a well-formed JSON string containing unrecognized data.
- */
-add_task(function* test_load_string_unrecognized()
-{
- let [list, store] = yield promiseNewListAndStore();
-
- // The platform-dependent file name should be generated dynamically.
- let targetPath = getTempFile(TEST_TARGET_FILE_NAME).path;
- let filePathLiteral = JSON.stringify(targetPath);
- let sourceUriLiteral = JSON.stringify(httpUrl("source.txt"));
-
- let string = "{\"list\":[{\"source\":null," +
- "\"target\":null}," +
- "{\"source\":{\"url\":" + sourceUriLiteral + "}," +
- "\"target\":{\"path\":" + filePathLiteral + "}," +
- "\"saver\":{\"type\":\"copy\"}}]}";
-
- yield OS.File.writeAtomic(store.path,
- new TextEncoder().encode(string),
- { tmpPath: store.path + ".tmp" });
-
- yield store.load();
-
- let items = yield list.getAll();
-
- do_check_eq(items.length, 1);
-
- do_check_eq(items[0].source.url, httpUrl("source.txt"));
- do_check_eq(items[0].target.path, targetPath);
-});
-
-/**
- * Loads downloads from a malformed JSON string.
- */
-add_task(function* test_load_string_malformed()
-{
- let [list, store] = yield promiseNewListAndStore();
-
- let string = "{\"list\":[{\"source\":null,\"target\":null}," +
- "{\"source\":{\"url\":\"about:blank\"}}}";
-
- yield OS.File.writeAtomic(store.path, new TextEncoder().encode(string),
- { tmpPath: store.path + ".tmp" });
-
- try {
- yield store.load();
- do_throw("Exception expected when JSON data is malformed.");
- } catch (ex) {
- if (ex.name != "SyntaxError") {
- throw ex;
- }
- do_print("The expected SyntaxError exception was thrown.");
- }
-
- let items = yield list.getAll();
-
- do_check_eq(items.length, 0);
-});
-
-/**
- * Saves downloads with unknown properties to a file and then reloads
- * them to ensure that these properties are preserved.
- */
-add_task(function* test_save_reload_unknownProperties()
-{
- let [listForSave, storeForSave] = yield promiseNewListAndStore();
- let [listForLoad, storeForLoad] = yield promiseNewListAndStore(
- storeForSave.path);
-
- let download1 = yield promiseNewDownload(httpUrl("source.txt"));
- // startTime should be ignored as it is a known property, and error
- // is ignored by serialization
- download1._unknownProperties = { peanut: "butter",
- orange: "marmalade",
- startTime: 77,
- error: { message: "Passed" } };
- listForSave.add(download1);
-
- let download2 = yield promiseStartLegacyDownload();
- yield download2.cancel();
- download2._unknownProperties = { number: 5, object: { test: "string" } };
- listForSave.add(download2);
-
- let download3 = yield Downloads.createDownload({
- source: { url: httpUrl("empty.txt"),
- referrer: TEST_REFERRER_URL,
- source1: "download3source1",
- source2: "download3source2" },
- target: { path: getTempFile(TEST_TARGET_FILE_NAME).path,
- target1: "download3target1",
- target2: "download3target2" },
- saver : { type: "copy",
- saver1: "download3saver1",
- saver2: "download3saver2" },
- });
- listForSave.add(download3);
-
- yield storeForSave.save();
- yield storeForLoad.load();
-
- let itemsForSave = yield listForSave.getAll();
- let itemsForLoad = yield listForLoad.getAll();
-
- do_check_eq(itemsForSave.length, itemsForLoad.length);
-
- do_check_eq(Object.keys(itemsForLoad[0]._unknownProperties).length, 2);
- do_check_eq(itemsForLoad[0]._unknownProperties.peanut, "butter");
- do_check_eq(itemsForLoad[0]._unknownProperties.orange, "marmalade");
- do_check_false("startTime" in itemsForLoad[0]._unknownProperties);
- do_check_false("error" in itemsForLoad[0]._unknownProperties);
-
- do_check_eq(Object.keys(itemsForLoad[1]._unknownProperties).length, 2);
- do_check_eq(itemsForLoad[1]._unknownProperties.number, 5);
- do_check_eq(itemsForLoad[1]._unknownProperties.object.test, "string");
-
- do_check_eq(Object.keys(itemsForLoad[2].source._unknownProperties).length, 2);
- do_check_eq(itemsForLoad[2].source._unknownProperties.source1,
- "download3source1");
- do_check_eq(itemsForLoad[2].source._unknownProperties.source2,
- "download3source2");
-
- do_check_eq(Object.keys(itemsForLoad[2].target._unknownProperties).length, 2);
- do_check_eq(itemsForLoad[2].target._unknownProperties.target1,
- "download3target1");
- do_check_eq(itemsForLoad[2].target._unknownProperties.target2,
- "download3target2");
-
- do_check_eq(Object.keys(itemsForLoad[2].saver._unknownProperties).length, 2);
- do_check_eq(itemsForLoad[2].saver._unknownProperties.saver1,
- "download3saver1");
- do_check_eq(itemsForLoad[2].saver._unknownProperties.saver2,
- "download3saver2");
-});
diff --git a/toolkit/components/jsdownloads/test/unit/test_Downloads.js b/toolkit/components/jsdownloads/test/unit/test_Downloads.js
deleted file mode 100644
index 2027beee14..0000000000
--- a/toolkit/components/jsdownloads/test/unit/test_Downloads.js
+++ /dev/null
@@ -1,194 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests the functions located directly in the "Downloads" object.
- */
-
-"use strict";
-
-// Tests
-
-/**
- * Tests that the createDownload function exists and can be called. More
- * detailed tests are implemented separately for the DownloadCore module.
- */
-add_task(function* test_createDownload()
-{
- // Creates a simple Download object without starting the download.
- yield Downloads.createDownload({
- source: { url: "about:blank" },
- target: { path: getTempFile(TEST_TARGET_FILE_NAME).path },
- saver: { type: "copy" },
- });
-});
-
-/**
- * Tests createDownload for private download.
- */
-add_task(function* test_createDownload_private()
-{
- let download = yield Downloads.createDownload({
- source: { url: "about:blank", isPrivate: true },
- target: { path: getTempFile(TEST_TARGET_FILE_NAME).path },
- saver: { type: "copy" }
- });
- do_check_true(download.source.isPrivate);
-});
-
-/**
- * Tests createDownload for normal (public) download.
- */
-add_task(function* test_createDownload_public()
-{
- let tempPath = getTempFile(TEST_TARGET_FILE_NAME).path;
- let download = yield Downloads.createDownload({
- source: { url: "about:blank", isPrivate: false },
- target: { path: tempPath },
- saver: { type: "copy" }
- });
- do_check_false(download.source.isPrivate);
-
- download = yield Downloads.createDownload({
- source: { url: "about:blank" },
- target: { path: tempPath },
- saver: { type: "copy" }
- });
- do_check_false(download.source.isPrivate);
-});
-
-/**
- * Tests createDownload for a pdf saver throws if only given a url.
- */
-add_task(function* test_createDownload_pdf()
-{
- let download = yield Downloads.createDownload({
- source: { url: "about:blank" },
- target: { path: getTempFile(TEST_TARGET_FILE_NAME).path },
- saver: { type: "pdf" },
- });
-
- try {
- yield download.start();
- do_throw("The download should have failed.");
- } catch (ex) {
- if (!(ex instanceof Downloads.Error) || !ex.becauseSourceFailed) {
- throw ex;
- }
- }
-
- do_check_false(download.succeeded);
- do_check_true(download.stopped);
- do_check_false(download.canceled);
- do_check_true(download.error !== null);
- do_check_true(download.error.becauseSourceFailed);
- do_check_false(download.error.becauseTargetFailed);
- do_check_false(yield OS.File.exists(download.target.path));
-});
-
-/**
- * Tests "fetch" with nsIURI and nsIFile as arguments.
- */
-add_task(function* test_fetch_uri_file_arguments()
-{
- let targetFile = getTempFile(TEST_TARGET_FILE_NAME);
- yield Downloads.fetch(NetUtil.newURI(httpUrl("source.txt")), targetFile);
- yield promiseVerifyContents(targetFile.path, TEST_DATA_SHORT);
-});
-
-/**
- * Tests "fetch" with DownloadSource and DownloadTarget as arguments.
- */
-add_task(function* test_fetch_object_arguments()
-{
- let targetPath = getTempFile(TEST_TARGET_FILE_NAME).path;
- yield Downloads.fetch({ url: httpUrl("source.txt") }, { path: targetPath });
- yield promiseVerifyContents(targetPath, TEST_DATA_SHORT);
-});
-
-/**
- * Tests "fetch" with string arguments.
- */
-add_task(function* test_fetch_string_arguments()
-{
- let targetPath = getTempFile(TEST_TARGET_FILE_NAME).path;
- yield Downloads.fetch(httpUrl("source.txt"), targetPath);
- yield promiseVerifyContents(targetPath, TEST_DATA_SHORT);
-
- targetPath = getTempFile(TEST_TARGET_FILE_NAME).path;
- yield Downloads.fetch(new String(httpUrl("source.txt")),
- new String(targetPath));
- yield promiseVerifyContents(targetPath, TEST_DATA_SHORT);
-});
-
-/**
- * Tests that the getList function returns the same list when called multiple
- * times with the same argument, but returns different lists when called with
- * different arguments. More detailed tests are implemented separately for the
- * DownloadList module.
- */
-add_task(function* test_getList()
-{
- let publicListOne = yield Downloads.getList(Downloads.PUBLIC);
- let privateListOne = yield Downloads.getList(Downloads.PRIVATE);
-
- let publicListTwo = yield Downloads.getList(Downloads.PUBLIC);
- let privateListTwo = yield Downloads.getList(Downloads.PRIVATE);
-
- do_check_eq(publicListOne, publicListTwo);
- do_check_eq(privateListOne, privateListTwo);
-
- do_check_neq(publicListOne, privateListOne);
-});
-
-/**
- * Tests that the getSummary function returns the same summary when called
- * multiple times with the same argument, but returns different summaries when
- * called with different arguments. More detailed tests are implemented
- * separately for the DownloadSummary object in the DownloadList module.
- */
-add_task(function* test_getSummary()
-{
- let publicSummaryOne = yield Downloads.getSummary(Downloads.PUBLIC);
- let privateSummaryOne = yield Downloads.getSummary(Downloads.PRIVATE);
-
- let publicSummaryTwo = yield Downloads.getSummary(Downloads.PUBLIC);
- let privateSummaryTwo = yield Downloads.getSummary(Downloads.PRIVATE);
-
- do_check_eq(publicSummaryOne, publicSummaryTwo);
- do_check_eq(privateSummaryOne, privateSummaryTwo);
-
- do_check_neq(publicSummaryOne, privateSummaryOne);
-});
-
-/**
- * Tests that the getSystemDownloadsDirectory returns a non-empty download
- * directory string.
- */
-add_task(function* test_getSystemDownloadsDirectory()
-{
- let downloadDir = yield Downloads.getSystemDownloadsDirectory();
- do_check_neq(downloadDir, "");
-});
-
-/**
- * Tests that the getPreferredDownloadsDirectory returns a non-empty download
- * directory string.
- */
-add_task(function* test_getPreferredDownloadsDirectory()
-{
- let downloadDir = yield Downloads.getPreferredDownloadsDirectory();
- do_check_neq(downloadDir, "");
-});
-
-/**
- * Tests that the getTemporaryDownloadsDirectory returns a non-empty download
- * directory string.
- */
-add_task(function* test_getTemporaryDownloadsDirectory()
-{
- let downloadDir = yield Downloads.getTemporaryDownloadsDirectory();
- do_check_neq(downloadDir, "");
-});
diff --git a/toolkit/components/jsdownloads/test/unit/test_PrivateTemp.js b/toolkit/components/jsdownloads/test/unit/test_PrivateTemp.js
deleted file mode 100644
index 1308e97822..0000000000
--- a/toolkit/components/jsdownloads/test/unit/test_PrivateTemp.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-/*
- * The temporary directory downloads saves to, should be only readable
- * for the current user.
- */
-add_task(function* test_private_temp() {
-
- let download = yield promiseStartExternalHelperAppServiceDownload(
- httpUrl("empty.txt"));
-
- yield promiseDownloadStopped(download);
-
- var targetFile = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
- targetFile.initWithPath(download.target.path);
-
- // 488 is the decimal value of 0o700.
- equal(targetFile.parent.permissions, 448);
-});
diff --git a/toolkit/components/jsdownloads/test/unit/xpcshell.ini b/toolkit/components/jsdownloads/test/unit/xpcshell.ini
deleted file mode 100644
index 8de5545401..0000000000
--- a/toolkit/components/jsdownloads/test/unit/xpcshell.ini
+++ /dev/null
@@ -1,19 +0,0 @@
-[DEFAULT]
-head = head.js
-tail =
-skip-if = toolkit == 'android'
-
-# Note: The "tail.js" file is not defined in the "tail" key because it calls
-# the "add_test_task" function, that does not work properly in tail files.
-support-files =
- common_test_Download.js
-
-[test_DownloadCore.js]
-[test_DownloadImport.js]
-[test_DownloadIntegration.js]
-[test_DownloadLegacy.js]
-[test_DownloadList.js]
-[test_Downloads.js]
-[test_DownloadStore.js]
-[test_PrivateTemp.js]
-skip-if = os != 'linux'
diff --git a/toolkit/components/lz4/moz.build b/toolkit/components/lz4/moz.build
index a701859305..b94e937dec 100644
--- a/toolkit/components/lz4/moz.build
+++ b/toolkit/components/lz4/moz.build
@@ -4,15 +4,11 @@
# 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/.
-XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell/xpcshell.ini']
-
EXTRA_JS_MODULES += [
'lz4.js',
'lz4_internal.js',
]
-SOURCES += [
- 'lz4.cpp',
-]
+SOURCES += ['lz4.cpp']
FINAL_LIBRARY = 'xul'
diff --git a/toolkit/components/lz4/tests/xpcshell/.eslintrc.js b/toolkit/components/lz4/tests/xpcshell/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/lz4/tests/xpcshell/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/lz4/tests/xpcshell/data/chrome.manifest b/toolkit/components/lz4/tests/xpcshell/data/chrome.manifest
deleted file mode 100644
index e2f9a9d8ef..0000000000
--- a/toolkit/components/lz4/tests/xpcshell/data/chrome.manifest
+++ /dev/null
@@ -1 +0,0 @@
-content test_lz4 ./
diff --git a/toolkit/components/lz4/tests/xpcshell/data/compression.lz b/toolkit/components/lz4/tests/xpcshell/data/compression.lz
deleted file mode 100644
index a354edc036..0000000000
--- a/toolkit/components/lz4/tests/xpcshell/data/compression.lz
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/lz4/tests/xpcshell/data/worker_lz4.js b/toolkit/components/lz4/tests/xpcshell/data/worker_lz4.js
deleted file mode 100644
index 47e3ea3695..0000000000
--- a/toolkit/components/lz4/tests/xpcshell/data/worker_lz4.js
+++ /dev/null
@@ -1,146 +0,0 @@
-importScripts("resource://gre/modules/workers/require.js");
-importScripts("resource://gre/modules/osfile.jsm");
-
-
-function do_print(x) {
- // self.postMessage({kind: "do_print", args: [x]});
- dump("TEST-INFO: " + x + "\n");
-}
-
-function do_check_true(x) {
- self.postMessage({kind: "do_check_true", args: [!!x]});
- if (x) {
- dump("TEST-PASS: " + x + "\n");
- } else {
- throw new Error("do_check_true failed");
- }
-}
-
-function do_check_eq(a, b) {
- let result = a == b;
- self.postMessage({kind: "do_check_true", args: [result]});
- if (!result) {
- throw new Error("do_check_eq failed " + a + " != " + b);
- }
-}
-
-function do_test_complete() {
- self.postMessage({kind: "do_test_complete", args:[]});
-}
-
-self.onmessage = function() {
- try {
- run_test();
- } catch (ex) {
- let {message, moduleStack, moduleName, lineNumber} = ex;
- let error = new Error(message, moduleName, lineNumber);
- error.stack = moduleStack;
- dump("Uncaught error: " + error + "\n");
- dump("Full stack: " + moduleStack + "\n");
- throw error;
- }
-};
-
-var Lz4;
-var Internals;
-function test_import() {
- Lz4 = require("resource://gre/modules/lz4.js");
- Internals = require("resource://gre/modules/lz4_internal.js");
-}
-
-function test_bound() {
- for (let k of ["compress", "decompress", "maxCompressedSize"]) {
- try {
- do_print("Checking the existence of " + k + "\n");
- do_check_true(!!Internals[k]);
- do_print(k + " exists");
- } catch (ex) {
- // Ignore errors
- do_print(k + " doesn't exist!");
- }
- }
-}
-
-function test_reference_file() {
- do_print("Decompress reference file");
- let path = OS.Path.join("data", "compression.lz");
- let data = OS.File.read(path);
- let decompressed = Lz4.decompressFileContent(data);
- let text = (new TextDecoder()).decode(decompressed);
- do_check_eq(text, "Hello, lz4");
-}
-
-function compare_arrays(a, b) {
- return Array.prototype.join.call(a) == Array.prototype.join.call(a);
-}
-
-function run_rawcompression(name, array) {
- do_print("Raw compression test " + name);
- let length = array.byteLength;
- let compressedArray = new Uint8Array(Internals.maxCompressedSize(length));
- let compressedBytes = Internals.compress(array, length, compressedArray);
- compressedArray = new Uint8Array(compressedArray.buffer, 0, compressedBytes);
- do_print("Raw compressed: " + length + " into " + compressedBytes);
-
- let decompressedArray = new Uint8Array(length);
- let decompressedBytes = new ctypes.size_t();
- let success = Internals.decompress(compressedArray, compressedBytes,
- decompressedArray, length,
- decompressedBytes.address());
- do_print("Raw decompression success? " + success);
- do_print("Raw decompression size: " + decompressedBytes.value);
- do_check_true(compare_arrays(array, decompressedArray));
-}
-
-function run_filecompression(name, array) {
- do_print("File compression test " + name);
- let compressed = Lz4.compressFileContent(array);
- do_print("Compressed " + array.byteLength + " bytes into " + compressed.byteLength);
-
- let decompressed = Lz4.decompressFileContent(compressed);
- do_print("Decompressed " + compressed.byteLength + " bytes into " + decompressed.byteLength);
- do_check_true(compare_arrays(array, decompressed));
-}
-
-function run_faileddecompression(name, array) {
- do_print("invalid decompression test " + name);
-
- // Ensure that raw decompression doesn't segfault
- let length = 1 << 14;
- let decompressedArray = new Uint8Array(length);
- let decompressedBytes = new ctypes.size_t();
- Internals.decompress(array, array.byteLength,
- decompressedArray, length,
- decompressedBytes.address());
-
- // File decompression should fail with an acceptable exception
- let exn = null;
- try {
- Lz4.decompressFileContent(array);
- } catch (ex) {
- exn = ex;
- }
- do_check_true(exn);
- if (array.byteLength < 10) {
- do_check_true(exn.becauseLZNoHeader);
- } else {
- do_check_true(exn.becauseLZWrongMagicNumber);
- }
-}
-
-function run_test() {
- test_import();
- test_bound();
- test_reference_file();
- for (let length of [0, 1, 1024]) {
- let array = new Uint8Array(length);
- for (let i = 0; i < length; ++i) {
- array[i] = i % 256;
- }
- let name = length + " bytes";
- run_rawcompression(name, array);
- run_filecompression(name, array);
- run_faileddecompression(name, array);
- }
- do_test_complete();
-}
diff --git a/toolkit/components/lz4/tests/xpcshell/test_lz4.js b/toolkit/components/lz4/tests/xpcshell/test_lz4.js
deleted file mode 100644
index 8a8fc0b21a..0000000000
--- a/toolkit/components/lz4/tests/xpcshell/test_lz4.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-Components.utils.import("resource://gre/modules/Promise.jsm");
-
-var WORKER_SOURCE_URI = "chrome://test_lz4/content/worker_lz4.js";
-do_load_manifest("data/chrome.manifest");
-
-function run_test() {
- run_next_test();
-}
-
-
-add_task(function() {
- let worker = new ChromeWorker(WORKER_SOURCE_URI);
- let deferred = Promise.defer();
- worker.onmessage = function(event) {
- let data = event.data;
- switch (data.kind) {
- case "do_check_true":
- try {
- do_check_true(data.args[0]);
- } catch (ex) {
- // Ignore errors
- }
- return;
- case "do_test_complete":
- deferred.resolve();
- worker.terminate();
- break;
- case "do_print":
- do_print(data.args[0]);
- }
- };
- worker.onerror = function(event) {
- let error = new Error(event.message, event.filename, event.lineno);
- worker.terminate();
- deferred.reject(error);
- };
- worker.postMessage("START");
- return deferred.promise;
-});
-
diff --git a/toolkit/components/lz4/tests/xpcshell/test_lz4_sync.js b/toolkit/components/lz4/tests/xpcshell/test_lz4_sync.js
deleted file mode 100644
index 61605373b7..0000000000
--- a/toolkit/components/lz4/tests/xpcshell/test_lz4_sync.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-const Cu = Components.utils;
-Cu.import("resource://gre/modules/lz4.js");
-Cu.import("resource://gre/modules/osfile.jsm");
-
-function run_test() {
- run_next_test();
-}
-
-function compare_arrays(a, b) {
- return Array.prototype.join.call(a) == Array.prototype.join.call(a);
-}
-
-add_task(function*() {
- let path = OS.Path.join("data", "compression.lz");
- let data = yield OS.File.read(path);
- let decompressed = Lz4.decompressFileContent(data);
- let text = (new TextDecoder()).decode(decompressed);
- do_check_eq(text, "Hello, lz4");
-});
-
-add_task(function*() {
- for (let length of [0, 1, 1024]) {
- let array = new Uint8Array(length);
- for (let i = 0; i < length; ++i) {
- array[i] = i % 256;
- }
-
- let compressed = Lz4.compressFileContent(array);
- do_print("Compressed " + array.byteLength + " bytes into " +
- compressed.byteLength);
-
- let decompressed = Lz4.decompressFileContent(compressed);
- do_print("Decompressed " + compressed.byteLength + " bytes into " +
- decompressed.byteLength);
-
- do_check_true(compare_arrays(array, decompressed));
- }
-});
diff --git a/toolkit/components/lz4/tests/xpcshell/xpcshell.ini b/toolkit/components/lz4/tests/xpcshell/xpcshell.ini
deleted file mode 100644
index e457f29b2b..0000000000
--- a/toolkit/components/lz4/tests/xpcshell/xpcshell.ini
+++ /dev/null
@@ -1,11 +0,0 @@
-[DEFAULT]
-head =
-tail =
-skip-if = toolkit == 'android'
-support-files =
- data/worker_lz4.js
- data/chrome.manifest
- data/compression.lz
-
-[test_lz4.js]
-[test_lz4_sync.js]
diff --git a/toolkit/components/mediasniffer/moz.build b/toolkit/components/mediasniffer/moz.build
index d4f935f562..21be451ddc 100644
--- a/toolkit/components/mediasniffer/moz.build
+++ b/toolkit/components/mediasniffer/moz.build
@@ -4,11 +4,7 @@
# 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/.
-XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
-
-EXPORTS += [
- 'nsMediaSniffer.h',
-]
+EXPORTS += ['nsMediaSniffer.h']
UNIFIED_SOURCES += [
'mp3sniff.c',
@@ -17,6 +13,3 @@ UNIFIED_SOURCES += [
]
FINAL_LIBRARY = 'xul'
-
-with Files('**'):
- BUG_COMPONENT = ('Core', 'Video/Audio')
diff --git a/toolkit/components/mediasniffer/test/unit/.eslintrc.js b/toolkit/components/mediasniffer/test/unit/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/mediasniffer/test/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/mediasniffer/test/unit/data/bug1079747.mp4 b/toolkit/components/mediasniffer/test/unit/data/bug1079747.mp4
deleted file mode 100644
index f00731d7e2..0000000000
--- a/toolkit/components/mediasniffer/test/unit/data/bug1079747.mp4
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/mediasniffer/test/unit/data/detodos.mp3 b/toolkit/components/mediasniffer/test/unit/data/detodos.mp3
deleted file mode 100644
index 12e3f89c20..0000000000
--- a/toolkit/components/mediasniffer/test/unit/data/detodos.mp3
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/mediasniffer/test/unit/data/ff-inst.exe b/toolkit/components/mediasniffer/test/unit/data/ff-inst.exe
deleted file mode 100644
index 0f02f36e1a..0000000000
--- a/toolkit/components/mediasniffer/test/unit/data/ff-inst.exe
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/mediasniffer/test/unit/data/file.mkv b/toolkit/components/mediasniffer/test/unit/data/file.mkv
deleted file mode 100644
index 4618cda032..0000000000
--- a/toolkit/components/mediasniffer/test/unit/data/file.mkv
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/mediasniffer/test/unit/data/file.webm b/toolkit/components/mediasniffer/test/unit/data/file.webm
deleted file mode 100644
index 7bc738b8b4..0000000000
--- a/toolkit/components/mediasniffer/test/unit/data/file.webm
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/mediasniffer/test/unit/data/fl10.mp2 b/toolkit/components/mediasniffer/test/unit/data/fl10.mp2
deleted file mode 100644
index bf84d73675..0000000000
--- a/toolkit/components/mediasniffer/test/unit/data/fl10.mp2
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/mediasniffer/test/unit/data/he_free.mp3 b/toolkit/components/mediasniffer/test/unit/data/he_free.mp3
deleted file mode 100644
index e3da8e6a72..0000000000
--- a/toolkit/components/mediasniffer/test/unit/data/he_free.mp3
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/mediasniffer/test/unit/data/id3tags.mp3 b/toolkit/components/mediasniffer/test/unit/data/id3tags.mp3
deleted file mode 100644
index 23091e6667..0000000000
--- a/toolkit/components/mediasniffer/test/unit/data/id3tags.mp3
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/mediasniffer/test/unit/data/notags-bad.mp3 b/toolkit/components/mediasniffer/test/unit/data/notags-bad.mp3
deleted file mode 100644
index 5ad89786fa..0000000000
--- a/toolkit/components/mediasniffer/test/unit/data/notags-bad.mp3
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/mediasniffer/test/unit/data/notags-scan.mp3 b/toolkit/components/mediasniffer/test/unit/data/notags-scan.mp3
deleted file mode 100644
index 949b7c4687..0000000000
--- a/toolkit/components/mediasniffer/test/unit/data/notags-scan.mp3
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/mediasniffer/test/unit/data/notags.mp3 b/toolkit/components/mediasniffer/test/unit/data/notags.mp3
deleted file mode 100644
index c7db943617..0000000000
--- a/toolkit/components/mediasniffer/test/unit/data/notags.mp3
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/mediasniffer/test/unit/test_mediasniffer.js b/toolkit/components/mediasniffer/test/unit/test_mediasniffer.js
deleted file mode 100644
index b26d554a8e..0000000000
--- a/toolkit/components/mediasniffer/test/unit/test_mediasniffer.js
+++ /dev/null
@@ -1,105 +0,0 @@
-/* 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/. */
-
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-
-Cu.import("resource://testing-common/httpd.js");
-Cu.import("resource://gre/modules/NetUtil.jsm");
-
-const PATH = "/file.meh";
-var httpserver = new HttpServer();
-
-// Each time, the data consist in a string that should be sniffed as Ogg.
-const data = "OggS\0meeeh.";
-var testRan = 0;
-
-// If the content-type is not present, or if it's application/octet-stream, it
-// should be sniffed to application/ogg by the media sniffer. Otherwise, it
-// should not be changed.
-const tests = [
- // Those three first case are the case of a media loaded in a media element.
- // All three should be sniffed.
- { contentType: "",
- expectedContentType: "application/ogg",
- flags: Ci.nsIChannel.LOAD_CALL_CONTENT_SNIFFERS | Ci.nsIChannel.LOAD_MEDIA_SNIFFER_OVERRIDES_CONTENT_TYPE },
- { contentType: "application/octet-stream",
- expectedContentType: "application/ogg",
- flags: Ci.nsIChannel.LOAD_CALL_CONTENT_SNIFFERS | Ci.nsIChannel.LOAD_MEDIA_SNIFFER_OVERRIDES_CONTENT_TYPE },
- { contentType: "application/something",
- expectedContentType: "application/ogg",
- flags: Ci.nsIChannel.LOAD_CALL_CONTENT_SNIFFERS | Ci.nsIChannel.LOAD_MEDIA_SNIFFER_OVERRIDES_CONTENT_TYPE },
- // This last cases test the case of a channel opened while allowing content
- // sniffers to override the content-type, like in the docshell.
- { contentType: "application/octet-stream",
- expectedContentType: "application/ogg",
- flags: Ci.nsIChannel.LOAD_CALL_CONTENT_SNIFFERS },
- { contentType: "",
- expectedContentType: "application/ogg",
- flags: Ci.nsIChannel.LOAD_CALL_CONTENT_SNIFFERS },
- { contentType: "application/something",
- expectedContentType: "application/something",
- flags: Ci.nsIChannel.LOAD_CALL_CONTENT_SNIFFERS },
-];
-
-// A basic listener that reads checks the if we sniffed properly.
-var listener = {
- onStartRequest: function(request, context) {
- do_check_eq(request.QueryInterface(Ci.nsIChannel).contentType,
- tests[testRan].expectedContentType);
- },
-
- onDataAvailable: function(request, context, stream, offset, count) {
- try {
- var bis = Components.classes["@mozilla.org/binaryinputstream;1"]
- .createInstance(Components.interfaces.nsIBinaryInputStream);
- bis.setInputStream(stream);
- bis.readByteArray(bis.available());
- } catch (ex) {
- do_throw("Error in onDataAvailable: " + ex);
- }
- },
-
- onStopRequest: function(request, context, status) {
- testRan++;
- runNext();
- }
-};
-
-function setupChannel(url, flags)
-{
- let uri = "http://localhost:" +
- httpserver.identity.primaryPort + url;
- var chan = NetUtil.newChannel({
- uri: uri,
- loadUsingSystemPrincipal: true,
- contentPolicyType: Ci.nsIContentPolicy.TYPE_MEDIA
- });
- chan.loadFlags |= flags;
- var httpChan = chan.QueryInterface(Components.interfaces.nsIHttpChannel);
- return httpChan;
-}
-
-function runNext() {
- if (testRan == tests.length) {
- do_test_finished();
- return;
- }
- var channel = setupChannel(PATH, tests[testRan].flags);
- httpserver.registerPathHandler(PATH, function(request, response) {
- response.setHeader("Content-Type", tests[testRan].contentType, false);
- response.bodyOutputStream.write(data, data.length);
- });
- channel.asyncOpen2(listener);
-}
-
-function run_test() {
- httpserver.start(-1);
- do_test_pending();
- try {
- runNext();
- } catch (e) {
- print("ERROR - " + e + "\n");
- }
-}
diff --git a/toolkit/components/mediasniffer/test/unit/test_mediasniffer_ext.js b/toolkit/components/mediasniffer/test/unit/test_mediasniffer_ext.js
deleted file mode 100644
index ce30a5c1ba..0000000000
--- a/toolkit/components/mediasniffer/test/unit/test_mediasniffer_ext.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/* 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/. */
-
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-var Cc = Components.classes;
-var CC = Components.Constructor;
-
-var BinaryOutputStream = CC("@mozilla.org/binaryoutputstream;1",
- "nsIBinaryOutputStream",
- "setOutputStream");
-
-Cu.import("resource://testing-common/httpd.js");
-Cu.import("resource://gre/modules/NetUtil.jsm");
-
-var httpserver = new HttpServer();
-
-var testRan = 0;
-
-// The tests files we want to test, and the type we should have after sniffing.
-const tests = [
- // Real webm and mkv files truncated to 512 bytes.
- { path: "data/file.webm", expected: "video/webm" },
- { path: "data/file.mkv", expected: "application/octet-stream" },
- // MP3 files with and without id3 headers truncated to 512 bytes.
- // NB these have 208/209 byte frames, but mp3 can require up to
- // 1445 bytes to detect with our method.
- { path: "data/id3tags.mp3", expected: "audio/mpeg" },
- { path: "data/notags.mp3", expected: "audio/mpeg" },
- // MPEG-2 mp3 files.
- { path: "data/detodos.mp3", expected: "audio/mpeg" },
- // Padding bit flipped in the first header: sniffing should fail.
- { path: "data/notags-bad.mp3", expected: "application/octet-stream" },
- // Garbage before header: sniffing should fail.
- { path: "data/notags-scan.mp3", expected: "application/octet-stream" },
- // VBR from the layer III test patterns. We can't sniff this.
- { path: "data/he_free.mp3", expected: "application/octet-stream" },
- // Make sure we reject mp2, which has a similar header.
- { path: "data/fl10.mp2", expected: "application/octet-stream" },
- // Truncated ff installer regression test for bug 875769.
- { path: "data/ff-inst.exe", expected: "application/octet-stream" },
- // MP4 with invalid box size (0) for "ftyp".
- { path: "data/bug1079747.mp4", expected: "application/octet-stream" },
-];
-
-// A basic listener that reads checks the if we sniffed properly.
-var listener = {
- onStartRequest: function(request, context) {
- do_print("Sniffing " + tests[testRan].path);
- do_check_eq(request.QueryInterface(Ci.nsIChannel).contentType, tests[testRan].expected);
- },
-
- onDataAvailable: function(request, context, stream, offset, count) {
- try {
- var bis = Components.classes["@mozilla.org/binaryinputstream;1"]
- .createInstance(Components.interfaces.nsIBinaryInputStream);
- bis.setInputStream(stream);
- bis.readByteArray(bis.available());
- } catch (ex) {
- do_throw("Error in onDataAvailable: " + ex);
- }
- },
-
- onStopRequest: function(request, context, status) {
- testRan++;
- runNext();
- }
-};
-
-function setupChannel(url) {
- var chan = NetUtil.newChannel({
- uri: "http://localhost:" + httpserver.identity.primaryPort + url,
- loadUsingSystemPrincipal: true,
- contentPolicyType: Ci.nsIContentPolicy.TYPE_MEDIA
- });
- var httpChan = chan.QueryInterface(Components.interfaces.nsIHttpChannel);
- return httpChan;
-}
-
-function runNext() {
- if (testRan == tests.length) {
- do_test_finished();
- return;
- }
- var channel = setupChannel("/");
- channel.asyncOpen2(listener);
-}
-
-function getFileContents(aFile) {
- var fileStream = Cc["@mozilla.org/network/file-input-stream;1"]
- .createInstance(Ci.nsIFileInputStream);
- fileStream.init(aFile, 1, -1, null);
- var bis = Components.classes["@mozilla.org/binaryinputstream;1"]
- .createInstance(Components.interfaces.nsIBinaryInputStream);
- bis.setInputStream(fileStream);
-
- var data = bis.readByteArray(bis.available());
-
- return data;
-}
-
-function handler(metadata, response) {
- response.setStatusLine(metadata.httpVersion, 200, "OK");
- // Send an empty Content-Type, so we are guaranteed to sniff.
- response.setHeader("Content-Type", "", false);
- var body = getFileContents(do_get_file(tests[testRan].path));
- var bos = new BinaryOutputStream(response.bodyOutputStream);
- bos.writeByteArray(body, body.length);
-}
-
-function run_test() {
- // We use a custom handler so we can change the header to force sniffing.
- httpserver.registerPathHandler("/", handler);
- httpserver.start(-1);
- do_test_pending();
- try {
- runNext();
- } catch (e) {
- print("ERROR - " + e + "\n");
- }
-}
diff --git a/toolkit/components/mediasniffer/test/unit/xpcshell.ini b/toolkit/components/mediasniffer/test/unit/xpcshell.ini
deleted file mode 100644
index 5ab4763f99..0000000000
--- a/toolkit/components/mediasniffer/test/unit/xpcshell.ini
+++ /dev/null
@@ -1,19 +0,0 @@
-[DEFAULT]
-head =
-tail =
-skip-if = toolkit == 'android'
-support-files =
- data/bug1079747.mp4
- data/detodos.mp3
- data/ff-inst.exe
- data/file.mkv
- data/file.webm
- data/fl10.mp2
- data/he_free.mp3
- data/id3tags.mp3
- data/notags-bad.mp3
- data/notags-scan.mp3
- data/notags.mp3
-
-[test_mediasniffer.js]
-[test_mediasniffer_ext.js]
diff --git a/toolkit/components/microformats/manifest.ini b/toolkit/components/microformats/manifest.ini
deleted file mode 100644
index 24dbcb1ca7..0000000000
--- a/toolkit/components/microformats/manifest.ini
+++ /dev/null
@@ -1,7 +0,0 @@
-[DEFAULT]
-run-if = buildapp == 'browser'
-
-[test/marionette/test_standards.py]
-[test/marionette/test_modules.py]
-[test/marionette/test_interface.py]
-
diff --git a/toolkit/components/microformats/moz.build b/toolkit/components/microformats/moz.build
index 39cefe4c87..ca91e2c462 100644
--- a/toolkit/components/microformats/moz.build
+++ b/toolkit/components/microformats/moz.build
@@ -4,9 +4,4 @@
# 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/.
-EXTRA_JS_MODULES += [
- 'microformat-shiv.js'
-]
-
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'Microformats')
+EXTRA_JS_MODULES += ['microformat-shiv.js']
diff --git a/toolkit/components/microformats/test/interface-tests/count-test.js b/toolkit/components/microformats/test/interface-tests/count-test.js
deleted file mode 100644
index baac56c2b4..0000000000
--- a/toolkit/components/microformats/test/interface-tests/count-test.js
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
-Unit test for count
-*/
-
-assert = chai.assert;
-
-
-describe('Microformat.count', function() {
-
- it('count', function(){
-
- var doc,
- node,
- result;
-
- var html = '<a class="h-card" href="http://glennjones.net"><span class="p-name">Glenn</span></a><a class="h-card" href="http://janedoe.net"><span class="p-name">Jane</span></a><a class="h-event" href="http://janedoe.net"><span class="p-name">Event</span><span class="dt-start">2015-07-01</span></a>';
-
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- node.innerHTML = html;
- 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 = '<link href="http://glennjones.net/notes/atom" rel="notes alternate" title="Notes" type="application/atom+xml" /><a class="h-card" href="http://glennjones.net"><span class="p-name">Glenn</span></a><a class="h-card" href="http://janedoe.net"><span class="p-name">Jane</span></a><a class="h-event" href="http://janedoe.net"><span class="p-name">Event</span><span class="dt-start">2015-07-01</span></a>';
-
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- node.innerHTML = html;
- 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 = '<span class="p-name">Jane</span>';
-
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- node.innerHTML = html;
- 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 = '<a class="h-card" href="http://glennjones.net"><span class="p-name">Glenn</span></a><a class="h-card" href="http://janedoe.net"><span class="p-name">Jane</span></a><a class="h-event" href="http://janedoe.net"><span class="p-name">Event</span><span class="dt-start">2015-07-01</span></a>';
-
- 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
deleted file mode 100644
index 4d32b83c05..0000000000
--- a/toolkit/components/microformats/test/interface-tests/experimental-test.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-Unit test for get
-*/
-
-assert = chai.assert;
-
-
-describe('experimental', function() {
-
- it('h-geo - geo data writen as lat;lon', function(){
-
- var expected = {
- 'items': [{
- 'type': ['h-geo'],
- 'properties': {
- 'name': ['30.267991;-97.739568'],
- 'latitude': [30.267991],
- 'longitude': [-97.739568]
- }
- }],
- 'rels': {},
- 'rel-urls': {}
- },
- options = {
- 'html': '<div class="h-geo">30.267991;-97.739568</div>',
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5',
- 'parseLatLonGeo': true
- };
-
- var result = Microformats.get(options);
- assert.deepEqual( result, expected );
-
- });
-
-
-});
diff --git a/toolkit/components/microformats/test/interface-tests/get-test.js b/toolkit/components/microformats/test/interface-tests/get-test.js
deleted file mode 100644
index 098ff4e3d0..0000000000
--- a/toolkit/components/microformats/test/interface-tests/get-test.js
+++ /dev/null
@@ -1,605 +0,0 @@
-/*
-Unit test for get
-*/
-
-assert = chai.assert;
-
-
-describe('Microformat.get', function() {
-
-
- var expected = {
- 'items': [{
- 'type': ['h-card'],
- 'properties': {
- 'name': ['Glenn Jones'],
- 'url': ['http://glennjones.net']
- }
- }],
- 'rels': {
- 'bookmark': ['http://glennjones.net'],
- 'alternate': ['http://example.com/fr'],
- 'home': ['http://example.com/fr']
- },
- 'rel-urls': {
- 'http://glennjones.net': {
- 'text': 'Glenn Jones',
- 'rels': ['bookmark']
- },
- 'http://example.com/fr': {
- 'media': 'handheld',
- 'hreflang': 'fr',
- 'text': 'French mobile homepage',
- 'rels': ['alternate', 'home']
- }
- }
- },
- html = '<div class="h-card"><a class="p-name u-url" rel="bookmark" href="http://glennjones.net">Glenn Jones</a></div><a rel="alternate home" href="http://example.com/fr" media="handheld" hreflang="fr">French mobile homepage</a>';
-
-
-
-
-
- it('get - no options.node parse this document', function(){
- var result;
-
- result = Microformats.get({});
- assert.deepEqual( result.items, [] );
- });
-
-
- it('get - standard', function(){
-
- var doc,
- node,
- options,
- result;
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- node.innerHTML = html;
- doc.body.appendChild(node);
-
- options ={
- 'node': node,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
-
- result = Microformats.get(options);
- assert.deepEqual( result, expected );
-
- });
-
-
- it('get - doc pass to node', function(){
-
- var doc,
- node,
- options,
- result;
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- node.innerHTML = html;
- doc.body.appendChild(node);
-
- options ={
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
-
- result = Microformats.get(options);
- assert.deepEqual( result, expected );
-
- });
-
-
- it('get - pass base tag', function(){
-
- var doc,
- node,
- options,
- result;
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- node.innerHTML = html + '<base href="http://example.com">';
- doc.body.appendChild(node);
-
- options ={
- 'node': node,
- 'dateFormat': 'html5'
- };
-
- result = Microformats.get(options);
- assert.deepEqual( result, expected );
-
- });
-
-
- it('get - pass no document', function(){
-
- var doc,
- node,
- options,
- parser,
- result;
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- node.innerHTML = html + '<base href="http://example.com">';
- doc.body.appendChild(node);
-
- options ={
- 'node': doc,
- 'dateFormat': 'html5'
- };
-
- result = Microformats.get(options);
- assert.deepEqual( result, expected );
-
- });
-
-
- it('get - textFormat: normalised', function(){
-
- var doc,
- node,
- options,
- result;
-
- var altHTML = '<a class="h-card" href="http://glennjones.net">\n';
- altHTML += ' <span class="p-given-name">Glenn</span>\n';
- altHTML += ' <span class="p-family-name">Jones</span>\n';
- altHTML += '</a>\n';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- node.innerHTML = altHTML;
- doc.body.appendChild(node);
-
- options ={
- 'node': node,
- 'textFormat': 'normalised',
- 'dateFormat': 'html5'
- };
-
- result = Microformats.get(options);
- assert.equal( result.items[0].properties.name[0], 'Glenn Jones' );
-
- });
-
-
- it('get - textFormat: whitespace', function(){
-
- var doc,
- node,
- options,
- parser,
- result;
-
- var altHTML = '<a class="h-card" href="http://glennjones.net">\n';
- altHTML += ' <span class="p-given-name">Glenn</span>\n';
- altHTML += ' <span class="p-family-name">Jones</span>\n';
- altHTML += '</a>\n';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- node.innerHTML = altHTML;
- doc.body.appendChild(node);
-
- options ={
- 'node': node,
- 'textFormat': 'whitespace',
- 'dateFormat': 'html5'
- };
-
- result = Microformats.get(options);
- assert.equal( result.items[0].properties.name[0], '\n Glenn\n Jones\n' );
-
- });
-
-
-
- it('get - textFormat: whitespacetrimmed', function(){
-
- var doc,
- node,
- options,
- result;
-
- var altHTML = '<a class="h-card" href="http://glennjones.net">\n';
- altHTML += ' <span class="p-given-name">Glenn</span>\n';
- altHTML += ' <span class="p-family-name">Jones</span>\n';
- altHTML += '</a>\n';
-
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- node.innerHTML = altHTML;
- doc.body.appendChild(node);
-
- options ={
- 'node': node,
- 'textFormat': 'whitespacetrimmed',
- 'dateFormat': 'html5'
- };
-
- result = Microformats.get(options);
- assert.equal( result.items[0].properties.name[0], 'Glenn\n Jones' );
-
- });
-
-
- it('get - dateFormat: auto', function(){
-
- var doc,
- node,
- options,
- result;
-
- var altHTML = '<div class="h-event"><span class="p-name">Pub</span><span class="dt-start">2015-07-01t17:30z</span></div>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- node.innerHTML = altHTML;
- doc.body.appendChild(node);
-
- options ={
- 'node': node,
- 'dateFormat': 'auto'
- };
-
- result = Microformats.get(options);
- assert.equal( result.items[0].properties.start[0], '2015-07-01t17:30z' );
-
- });
-
-
- it('get - dateFormat: w3c', function(){
-
- var doc,
- node,
- options,
- result;
-
- var altHTML = '<div class="h-event"><span class="p-name">Pub</span><span class="dt-start">2015-07-01t17:30z</span></div>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- node.innerHTML = altHTML;
- doc.body.appendChild(node);
-
- options ={
- 'node': node,
- 'dateFormat': 'w3c'
- };
-
- result = Microformats.get(options);
- assert.equal( result.items[0].properties.start[0], '2015-07-01T17:30Z' );
-
- });
-
-
- it('get - dateFormat: html5', function(){
-
- var doc,
- node,
- options,
- result;
-
- var altHTML = '<div class="h-event"><span class="p-name">Pub</span><span class="dt-start">2015-07-01t17:30z</span></div>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- node.innerHTML = altHTML;
- doc.body.appendChild(node);
-
- options ={
- 'node': node,
- 'dateFormat': 'html5'
- };
-
- result = Microformats.get(options);
- assert.equal( result.items[0].properties.start[0], '2015-07-01 17:30Z' );
-
- });
-
-
-
- it('get - dateFormat: rfc3339', function(){
-
- var doc,
- node,
- options,
-
- result;
-
- var altHTML = '<div class="h-event"><span class="p-name">Pub</span><span class="dt-start">2015-07-01t17:30z</span></div>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- node.innerHTML = altHTML;
- doc.body.appendChild(node);
-
- options ={
- 'node': node,
- 'dateFormat': 'rfc3339'
- };
-
- result = Microformats.get(options);
- assert.equal( result.items[0].properties.start[0], '20150701T1730Z' );
-
- });
-
-
-
- it('get - filters h-card', function(){
-
- var doc,
- node,
- options,
- parser,
- result;
-
- var altHTML = '<div class="h-event"><span class="p-name">Pub</span><span class="dt-start">2015-07-01t17:30z</span></div><a class="h-card" href="http://glennjones.net">Glenn Jones</a>';
- var altExpected = {
- 'items': [{
- 'type': ['h-card'],
- 'properties': {
- 'name': ['Glenn Jones'],
- 'url': ['http://glennjones.net']
- }
- }],
- 'rels': {},
- 'rel-urls': {}
- }
-
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- node.innerHTML = altHTML;
- doc.body.appendChild(node);
-
- // filter as an array
- options ={
- 'node': node,
- 'filters': ['h-card'],
- 'dateFormat': 'html5'
- };
-
- result = Microformats.get(options);
- assert.deepEqual( result, altExpected );
-
- // filter as an string
- options ={
- 'node': node,
- 'filters': 'h-card',
- 'dateFormat': 'html5'
- };
-
- result = Microformats.get(options);
- assert.deepEqual( result, altExpected );
- });
-
-
- it('get - filters h-event', function(){
-
- var doc,
- node,
- options,
- result;
-
- var altHTML = '<div class="h-event"><span class="p-name">Pub</span><span class="dt-start">2015-07-01t17:30z</span></div><a class="h-card" href="http://glennjones.net">Glenn Jones</a>';
- var altExpected = {
- 'items': [{
- 'type': ['h-event'],
- 'properties': {
- 'name': ['Pub'],
- 'start': ['2015-07-01 17:30Z']
- }
- }],
- 'rels': {},
- 'rel-urls': {}
- }
-
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- node.innerHTML = altHTML;
- doc.body.appendChild(node);
-
- options ={
- 'node': node,
- 'filters': ['h-event'],
- 'dateFormat': 'html5'
- };
-
- result = Microformats.get(options);
- assert.deepEqual( result, altExpected );
-
- });
-
-
- it('get - filters h-card and h-event', function(){
-
- var doc,
- node,
- options,
- result;
-
- var altHTML = '<div class="h-event"><span class="p-name">Pub</span><span class="dt-start">2015-07-01t17:30z</span></div><a class="h-card" href="http://glennjones.net">Glenn Jones</a>';
- var altExpected = {
- 'items': [{
- 'type': ['h-event'],
- 'properties': {
- 'name': ['Pub'],
- 'start': ['2015-07-01 17:30Z']
- }
- },
- {
- 'type': ['h-card'],
- 'properties': {
- 'name': ['Glenn Jones'],
- 'url': ['http://glennjones.net']
- }
- }],
- 'rels': {},
- 'rel-urls': {}
- }
-
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- node.innerHTML = altHTML;
- doc.body.appendChild(node);
-
- options ={
- 'node': node,
- 'filter': ['h-event'],
- 'dateFormat': 'html5'
- };
-
- result = Microformats.get(options);
- assert.deepEqual( result, altExpected );
-
- });
-
-
- it('get - filters h-card no result', function(){
-
- var doc,
- node,
- options,
- result;
-
- var altHTML = '<div class="h-event"><span class="p-name">Pub</span><span class="dt-start">2015-07-01t17:30z</span></div>';
- var altExpected = {
- 'items': [],
- 'rels': {},
- 'rel-urls': {}
- }
-
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- node.innerHTML = altHTML;
- doc.body.appendChild(node);
-
- options ={
- 'node': node,
- 'filters': ['h-card'],
- 'dateFormat': 'html5'
- };
-
- result = Microformats.get(options);
- assert.deepEqual( result, altExpected );
-
- });
-
-
- it('get - filters h-card match v1 format', function(){
-
- var doc,
- node,
- options,
- parser,
- result;
-
- var altHTML = '<a class="vcard" href="http://glennjones.net"><span class="fn">Glenn Jones</span></a>';
- var altExpected = {
- 'items': [{
- 'type': ['h-card'],
- 'properties': {
- 'name': ['Glenn Jones']
- }
- }],
- 'rels': {},
- 'rel-urls': {}
- }
-
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- node.innerHTML = altHTML;
- doc.body.appendChild(node);
-
- options ={
- 'node': node,
- 'filter': ['h-card'],
- 'dateFormat': 'html5'
- };
-
- result = Microformats.get(options);
- assert.deepEqual( result, altExpected );
-
- });
-
-
- it('get - add new v1 format through options', function(){
-
- var doc,
- node,
- options,
- result;
-
- var altHTML = '<div class="hpayment">£<span class="amount">36.78</span></div>';
- var altExpected = {
- 'items': [{
- 'type': ['h-payment'],
- 'properties': {
- 'amount': ['36.78']
- }
- }],
- 'rels': {},
- 'rel-urls': {}
- };
- var v1Definition = {
- root: 'hpayment',
- name: 'h-payment',
- properties: {
- 'amount': {}
- }
- };
-
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- node.innerHTML = altHTML;
- doc.body.appendChild(node);
-
- options ={
- 'node': node,
- 'maps': v1Definition,
- 'dateFormat': 'html5'
- };
-
- result = Microformats.get(options);
- assert.deepEqual( result, altExpected );
-
- });
-
-
- it('get - options.html', function(){
-
- var options,
- result;
-
- options ={
- 'html': html,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
-
- 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
deleted file mode 100644
index 56ccbb2ba7..0000000000
--- a/toolkit/components/microformats/test/interface-tests/getParent-test.js
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
-Unit test for getParent
-*/
-
-assert = chai.assert;
-
-
-describe('Microformat.getParent', function() {
-
- var HTML = '<div class="h-event"><span class="p-name">Pub</span><span class="dt-start">2015-07-01t17:30z</span></div>';
- var emptyExpected = {
- "items": [],
- "rels": {},
- "rel-urls": {}
- };
- var expected = {
- "items": [
- {
- "type": [
- "h-event"
- ],
- "properties": {
- "name": [
- "Pub"
- ],
- "start": [
- "2015-07-01 17:30Z"
- ]
- }
- }
- ],
- "rels": {},
- "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');
-
- 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');
-
- 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');
-
- 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 = '<div class="h-entry"><h1 class="p-name">test</h1><div class="e-content">this</div><a class="p-author h-card" href="http://glennjones.net"><span class="p-name">Glenn Jones</span></a><span class="dt-publish">2015-07-01t17:30z</span></div>';
- var altExpected = {
- "items": [
- {
- "type": [
- "h-entry"
- ],
- "properties": {
- "name": [
- "test"
- ],
- "content": [
- {
- "value": "this",
- "html": "this"
- }
- ],
- "author": [
- {
- "value": "Glenn Jones",
- "type": [
- "h-card"
- ],
- "properties": {
- "name": [
- "Glenn Jones"
- ],
- "url": [
- "http://glennjones.net"
- ]
- }
- }
- ],
- "publish": [
- "2015-07-01 17:30Z"
- ]
- }
- }
- ],
- "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');
-
- 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 = '<div class="h-entry"><h1 class="p-name">test</h1><div class="e-content">this</div><a class="p-author h-card" href="http://glennjones.net"><span class="p-name">Glenn Jones</span></a><span class="dt-publish">2015-07-01t17:30z</span></div>';
- var altExpected = {
- "items": [
- {
- "type": [
- "h-card"
- ],
- "properties": {
- "name": [
- "Glenn Jones"
- ],
- "url": [
- "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');
-
- 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
deleted file mode 100644
index 98c79a8551..0000000000
--- a/toolkit/components/microformats/test/interface-tests/hasMicroformats-test.js
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
-Unit test for hasMicroformat
-*/
-
-assert = chai.assert;
-
-
-describe('Microformat.hasMicroformats', function() {
-
- it('true - v2 on node', function(){
-
- var doc,
- node;
-
- var html = '<a class="h-card" href="http://glennjones.net"><span class="p-name">Glenn</span></a>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- doc.body.appendChild( node );
- node.innerHTML = html;
- node = doc.querySelector( 'a' );
-
- assert.isTrue( Microformats.hasMicroformats( node ) );
-
- });
-
-
- it('true - v1 on node', function(){
-
- var doc,
- node;
-
- var html = '<a class="vcard" href="http://glennjones.net"><span class="fn">Glenn</span></a>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- doc.body.appendChild( node );
- node.innerHTML = html;
- node = doc.querySelector( 'a' );
-
- assert.isTrue( Microformats.hasMicroformats( node ) );
-
- });
-
-
- it('true - v2 filter on node', function(){
-
- var doc,
- node;
-
- var html = '<a class="h-card" href="http://glennjones.net"><span class="p-name">Glenn</span></a>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- doc.body.appendChild( node );
- node.innerHTML = html;
- node = doc.querySelector( 'a' );
-
- assert.isTrue( Microformats.hasMicroformats( node, {'filters': ['h-card']} ) );
-
- });
-
-
- it('true - v1 filter on node', function(){
-
- var doc,
- node;
-
- var html = '<a class="vcard" href="http://glennjones.net"><span class="fn">Glenn</span></a>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- doc.body.appendChild( node );
- node.innerHTML = html;
- node = doc.querySelector( 'a' );
-
- assert.isTrue( Microformats.hasMicroformats( node, {'filters': ['h-card']} ) );
-
- });
-
-
- it('false - v2 filter on node', function(){
-
- var doc,
- node;
-
- var html = '<a class="h-card" href="http://glennjones.net"><span class="p-name">Glenn</span></a>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- doc.body.appendChild( node );
- node.innerHTML = html;
- node = doc.querySelector( 'a' );
-
- assert.isFalse( Microformats.hasMicroformats( node, {'filters': ['h-entry']} ) );
-
- });
-
-
-
- it('false - property', function(){
-
- var doc,
- node,
- parser;
-
- var html = '<span class="p-name">Glenn</span>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- doc.body.appendChild( node );
- node.innerHTML = html;
- node = doc.querySelector( 'span' );
-
- assert.isFalse( Microformats.hasMicroformats( node ) );
-
- });
-
-
- it('false - no class', function(){
-
- var doc,
- node,
- parser;
-
- var html = '<span>Glenn</span>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- doc.body.appendChild( node );
- node.innerHTML = html;
- 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 = '<section><div><a class="h-card" href="http://glennjones.net"><span class="p-name">Glenn</span></a></div></section>';
-
- 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 = '<html><head></head><body><section><div><a class="h-card" href="http://glennjones.net"><span class="p-name">Glenn</span></a></div></section></body></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/index.html b/toolkit/components/microformats/test/interface-tests/index.html
deleted file mode 100644
index 61759790ed..0000000000
--- a/toolkit/components/microformats/test/interface-tests/index.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<html><head><title>Mocha</title>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<link rel="stylesheet" href="../static/css/mocha.css" />
-<script src="../static/javascript/chai.js"></script>
-<script src="../static/javascript/mocha.js"></script>
-<link rel="stylesheet" href="../static/css/mocha-custom.css" />
-<link rel="icon" type="image/png" id="favicon" href="chrome://branding/content/icon32.png"/>
-
-<script src="../static/javascript/DOMParser.js"></script>
-
-<script data-cover src="../../microformat-shiv.js"></script>
-
-<script>
-var uncaughtError;
-
-window.addEventListener("error", function(error) {
-uncaughtError = error;
-});
-
-var consoleWarn = console.warn;
-var caughtWarnings = [];
-
-console.warn = function() {
-var args = Array.slice(arguments);
-caughtWarnings.push(args);
-consoleWarn.apply(console, args);
-};
-</script>
-
-<script>
-chai.config.includeStack = true;
-mocha.setup({ui: 'bdd', timeout: 10000});
-</script>
-
-
-<script src="../interface-tests/get-test.js"></script>
-<script src="../interface-tests/getParent-test.js"></script>
-<script src="../interface-tests/count-test.js"></script>
-<script src="../interface-tests/isMicroformat-test.js"></script>
-<script src="../interface-tests/hasMicroformats-test.js"></script>
-
-<script src="../interface-tests/experimental-test.js"></script>
-
-</head><body>
-<h3 class="capitalize">Microformats-shiv: interface tests</h3>
-<div id="mocha"></div>
-</body>
-<script>
-describe("Uncaught Error Check", function() {
-it("should load the tests without errors", function() {
-chai.expect(uncaughtError && uncaughtError.message).to.be.undefined;
-});
-});
-
-describe("Unexpected Warnings Check", function() {
-it("should long only the warnings we expect", function() {
-chai.expect(caughtWarnings.length).to.eql(0);
-});
-});
-
-mocha.run(function () {
-var completeNode = document.createElement("p");
-completeNode.setAttribute("id", "complete");
-completeNode.appendChild(document.createTextNode("Complete"));
-document.getElementById("mocha").appendChild(completeNode);
-});
-
-</script>
-</body></html>
diff --git a/toolkit/components/microformats/test/interface-tests/isMicroformat-test.js b/toolkit/components/microformats/test/interface-tests/isMicroformat-test.js
deleted file mode 100644
index 7081b28804..0000000000
--- a/toolkit/components/microformats/test/interface-tests/isMicroformat-test.js
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
-Unit test for isMicroformat
-*/
-
-assert = chai.assert;
-
-
-describe('Microformat.isMicroformat', function() {
-
- it('true - v2', function(){
-
- var doc,
- node;
-
- var html = '<a class="h-card" href="http://glennjones.net"><span class="p-name">Glenn</span></a>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- doc.body.appendChild( node );
- node.innerHTML = html;
- node = doc.querySelector( 'a' );
-
- assert.isTrue( Microformats.isMicroformat( node ) );
-
- });
-
-
- it('true - v1', function(){
-
- var doc,
- node;
-
- var html = '<a class="vcard" href="http://glennjones.net"><span class="fn">Glenn</span></a>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- doc.body.appendChild( node );
- node.innerHTML = html;
- node = doc.querySelector( 'a' );
-
- assert.isTrue( Microformats.isMicroformat( node ) );
-
- });
-
-
- it('true - v2 filter', function(){
-
- var doc,
- node;
-
- var html = '<a class="h-card" href="http://glennjones.net"><span class="p-name">Glenn</span></a>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- doc.body.appendChild( node );
- node.innerHTML = html;
- node = doc.querySelector( 'a' );
-
- assert.isTrue( Microformats.isMicroformat( node, {'filters': ['h-card']} ) );
-
- });
-
-
- it('true - v1 filter', function(){
-
- var doc,
- node;
-
- var html = '<a class="vcard" href="http://glennjones.net"><span class="fn">Glenn</span></a>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- doc.body.appendChild( node );
- node.innerHTML = html;
- node = doc.querySelector( 'a' );
-
- assert.isTrue( Microformats.isMicroformat( node, {'filters': ['h-card']} ) );
-
- });
-
-
- it('false - v2 filter', function(){
-
- var doc,
- node;
-
- var html = '<a class="h-card" href="http://glennjones.net"><span class="p-name">Glenn</span></a>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- doc.body.appendChild( node );
- node.innerHTML = html;
- node = doc.querySelector( 'a' );
-
- assert.isFalse( Microformats.isMicroformat( node, {'filters': ['h-entry']} ) );
-
- });
-
-
-
- it('false - property', function(){
-
- var doc,
- node;
-
- var html = '<span class="p-name">Glenn</span>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- doc.body.appendChild( node );
- node.innerHTML = html;
- node = doc.querySelector( 'span' );
-
- assert.isFalse( Microformats.isMicroformat( node ) );
-
- });
-
-
- it('false - no class', function(){
-
- var doc,
- node;
-
- var html = '<span>Glenn</span>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- doc.body.appendChild( node );
- node.innerHTML = html;
- 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
deleted file mode 100644
index 6d6129b083..0000000000
--- a/toolkit/components/microformats/test/lib/dates.js
+++ /dev/null
@@ -1,268 +0,0 @@
-/*!
- 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
-*/
-
-
-var Modules = (function (modules) {
-
- modules.dates = {
-
-
- /**
- * does text contain am
- *
- * @param {String} text
- * @return {Boolean}
- */
- hasAM: function( text ) {
- text = text.toLowerCase();
- return(text.indexOf('am') > -1 || text.indexOf('a.m.') > -1);
- },
-
-
- /**
- * does text contain pm
- *
- * @param {String} text
- * @return {Boolean}
- */
- hasPM: function( text ) {
- text = text.toLowerCase();
- return(text.indexOf('pm') > -1 || text.indexOf('p.m.') > -1);
- },
-
-
- /**
- * remove am and pm from text and return it
- *
- * @param {String} text
- * @return {String}
- */
- 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
- *
- * @param {String} text
- * @return {Boolean}
- */
- isDuration: function( text ) {
- if(modules.utils.isString( text )){
- text = text.toLowerCase();
- if(modules.utils.startWith(text, 'p') ){
- return true;
- }
- }
- 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();
- text = modules.utils.trim( text );
- // start with timezone char
- if( text.match(':') && ( modules.utils.startWith(text, 'z') || modules.utils.startWith(text, '-') || modules.utils.startWith(text, '+') )) {
- return true;
- }
- // has ante meridiem or post meridiem
- if( text.match(/^[0-9]/) &&
- ( this.hasAM(text) || this.hasPM(text) )) {
- return true;
- }
- // contains time delimiter but not datetime delimiter
- 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){
- return true;
- }
- }
- }
- return false;
- },
-
-
- /**
- * parses a time from text and returns 24hr time string
- * i.e. 5:34am = 05:34:00 and 1:52:04p.m. = 13:52:04
- *
- * @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 {
- // single number text i.e. 5pm
- 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
- *
- * @param {String} date
- * @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;
- isodate.tM = isotime.tM;
- isodate.tS = isotime.tS;
- isodate.tD = isotime.tD;
- return isodate;
- } else {
- if(isodate.hasFullDate()){
- return isodate;
- }
- 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
- *
- * @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(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
- 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]) );
- out.push( text.slice( text.indexOf(chars[i]) ) );
- break;
- }
- }
- return out;
- }
-
- };
-
-
- return modules;
-
-} (Modules || {}));
-
-
-
-
diff --git a/toolkit/components/microformats/test/lib/domparser.js b/toolkit/components/microformats/test/lib/domparser.js
deleted file mode 100644
index bc342634ac..0000000000
--- a/toolkit/components/microformats/test/lib/domparser.js
+++ /dev/null
@@ -1,103 +0,0 @@
-
-// Based on https://gist.github.com/1129031 By Eli Grey, http://eligrey.com - Public domain.
-
-// DO NOT use https://developer.mozilla.org/en-US/docs/Web/API/DOMParser example polyfill
-// as it does not work with earlier versions of Chrome
-
-
-(function(DOMParser) {
- 'use strict';
-
- var DOMParser_proto;
- var real_parseFromString;
- var textHTML; // Flag for text/html support
- var textXML; // Flag for text/xml support
- var htmlElInnerHTML; // Flag for support for setting html element's innerHTML
-
- // Stop here if DOMParser not defined
- if (!DOMParser) {
- return;
- }
-
- // Firefox, Opera and IE throw errors on unsupported types
- try {
- // WebKit returns null on unsupported types
- textHTML = !!(new DOMParser()).parseFromString('', 'text/html');
-
- } catch (er) {
- textHTML = false;
- }
-
- // If text/html supported, don't need to do anything.
- if (textHTML) {
- return;
- }
-
- // Next try setting innerHTML of a created document
- // IE 9 and lower will throw an error (can't set innerHTML of its HTML element)
- try {
- var doc = document.implementation.createHTMLDocument('');
- doc.documentElement.innerHTML = '<title></title><div></div>';
- htmlElInnerHTML = true;
-
- } catch (er) {
- htmlElInnerHTML = false;
- }
-
- // If if that failed, try text/xml
- if (!htmlElInnerHTML) {
-
- try {
- textXML = !!(new DOMParser()).parseFromString('', 'text/xml');
-
- } catch (er) {
- textHTML = false;
- }
- }
-
- // 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)) {
- DOMParser_proto = DOMParser.prototype;
- real_parseFromString = DOMParser_proto.parseFromString;
-
- DOMParser_proto.parseFromString = function (markup, type) {
-
- // Only do this if type is text/html
- if (/^\s*text\/html\s*(?:;|$)/i.test(type)) {
- var doc, doc_el, first_el;
-
- // Use innerHTML if supported
- if (htmlElInnerHTML) {
- doc = document.implementation.createHTMLDocument('');
- doc_el = doc.documentElement;
- doc_el.innerHTML = markup;
- first_el = doc_el.firstElementChild;
-
- // Otherwise use XML method
- } else if (textXML) {
-
- // Make sure markup is wrapped in HTML tags
- // Should probably allow for a DOCTYPE
- if (!(/^<html.*html>$/i.test(markup))) {
- markup = '<html>' + markup + '<\/html>';
- }
- doc = (new DOMParser()).parseFromString(markup, 'text/xml');
- doc_el = doc.documentElement;
- first_el = doc_el.firstElementChild;
- }
-
- // Is this an entire document or a fragment?
- if (doc_el.childElementCount === 1 && first_el.localName.toLowerCase() === 'html') {
- doc.replaceChild(first_el, doc_el);
- }
-
- return doc;
-
- // If not text/html, send as-is to host method
- } else {
- return real_parseFromString.apply(this, arguments);
- }
- };
- }
-}(DOMParser));
diff --git a/toolkit/components/microformats/test/lib/domutils.js b/toolkit/components/microformats/test/lib/domutils.js
deleted file mode 100644
index 57269de978..0000000000
--- a/toolkit/components/microformats/test/lib/domutils.js
+++ /dev/null
@@ -1,611 +0,0 @@
-/*
- dom utilities
- The purpose of this module is to abstract DOM functions away from the main parsing modules of the library.
- It was created so the file can be replaced in node.js environment to make use of different types of light weight node.js DOM's
- such as 'cherrio.js'. It also contains a number of DOM utilities which are used throughout the parser such as: 'getDescendant'
-
- Copyright (C) 2010 - 2015 Glenn Jones. All Rights Reserved.
- MIT License: https://raw.github.com/glennjones/microformat-shiv/master/license.txt
- Dependencies utilities.js
-
-*/
-
-
-var Modules = (function (modules) {
-
- modules.domUtils = {
-
- // blank objects for DOM
- document: null,
- rootNode: null,
-
-
- /**
- * gets DOMParser object
- *
- * @return {Object || undefined}
- */
- getDOMParser: function () {
- if (typeof DOMParser === undefined) {
- try {
- return Components.classes["@mozilla.org/xmlextras/domparser;1"]
- .createInstance(Components.interfaces.nsIDOMParser);
- } catch (e) {
- return undefined;
- }
- } else {
- return new DOMParser();
- }
- },
-
-
- /**
- * configures what are the base DOM objects for parsing
- *
- * @param {Object} options
- * @return {DOM Node} node
- */
- getDOMContext: function( options ){
-
- // if a node is passed
- if(options.node){
- this.rootNode = options.node;
- }
-
-
- // if a html string is passed
- if(options.html){
- //var domParser = new DOMParser();
- var domParser = this.getDOMParser();
- this.rootNode = domParser.parseFromString( options.html, 'text/html' );
- }
-
-
- // find top level document from rootnode
- if(this.rootNode !== null){
- if(this.rootNode.nodeType === 9){
- this.document = this.rootNode;
- this.rootNode = modules.domUtils.querySelector(this.rootNode, 'html');
- }else{
- // if it's DOM node get parent DOM Document
- this.document = modules.domUtils.ownerDocument(this.rootNode);
- }
- }
-
-
- // use global document object
- if(!this.rootNode && document){
- this.rootNode = modules.domUtils.querySelector(document, 'html');
- this.document = document;
- }
-
-
- if(this.rootNode && this.document){
- return {document: this.document, rootNode: this.rootNode};
- }
-
- return {document: null, rootNode: null};
- },
-
-
-
- /**
- * gets the first DOM node
- *
- * @param {Dom Document}
- * @return {DOM Node} node
- */
- getTopMostNode: function( node ){
- //var doc = this.ownerDocument(node);
- //if(doc && doc.nodeType && doc.nodeType === 9 && doc.documentElement){
- // return doc.documentElement;
- //}
- return node;
- },
-
-
-
- /**
- * abstracts DOM ownerDocument
- *
- * @param {DOM Node} node
- * @return {Dom Document}
- */
- ownerDocument: function(node){
- return node.ownerDocument;
- },
-
-
- /**
- * abstracts DOM textContent
- *
- * @param {DOM Node} node
- * @return {String}
- */
- textContent: function(node){
- if(node.textContent){
- return node.textContent;
- }else if(node.innerText){
- return node.innerText;
- }
- return '';
- },
-
-
- /**
- * abstracts DOM innerHTML
- *
- * @param {DOM Node} node
- * @return {String}
- */
- innerHTML: function(node){
- return node.innerHTML;
- },
-
-
- /**
- * abstracts DOM hasAttribute
- *
- * @param {DOM Node} node
- * @param {String} attributeName
- * @return {Boolean}
- */
- hasAttribute: function(node, attributeName) {
- return node.hasAttribute(attributeName);
- },
-
-
- /**
- * does an attribute contain a value
- *
- * @param {DOM Node} node
- * @param {String} attributeName
- * @param {String} value
- * @return {Boolean}
- */
- hasAttributeValue: function(node, attributeName, value) {
- return (this.getAttributeList(node, attributeName).indexOf(value) > -1);
- },
-
-
- /**
- * abstracts DOM getAttribute
- *
- * @param {DOM Node} node
- * @param {String} attributeName
- * @return {String || null}
- */
- getAttribute: function(node, attributeName) {
- return node.getAttribute(attributeName);
- },
-
-
- /**
- * abstracts DOM setAttribute
- *
- * @param {DOM Node} node
- * @param {String} attributeName
- * @param {String} attributeValue
- */
- setAttribute: function(node, attributeName, attributeValue){
- node.setAttribute(attributeName, attributeValue);
- },
-
-
- /**
- * abstracts DOM removeAttribute
- *
- * @param {DOM Node} node
- * @param {String} attributeName
- */
- removeAttribute: function(node, attributeName) {
- node.removeAttribute(attributeName);
- },
-
-
- /**
- * abstracts DOM getElementById
- *
- * @param {DOM Node || DOM Document} node
- * @param {String} id
- * @return {DOM Node}
- */
- getElementById: function(docNode, id) {
- return docNode.querySelector( '#' + id );
- },
-
-
- /**
- * abstracts DOM querySelector
- *
- * @param {DOM Node || DOM Document} node
- * @param {String} selector
- * @return {DOM Node}
- */
- querySelector: function(docNode, selector) {
- return docNode.querySelector( selector );
- },
-
-
- /**
- * get value of a Node attribute as an array
- *
- * @param {DOM Node} node
- * @param {String} attributeName
- * @return {Array}
- */
- getAttributeList: function(node, attributeName) {
- var out = [],
- attList;
-
- attList = node.getAttribute(attributeName);
- if(attList && attList !== '') {
- if(attList.indexOf(' ') > -1) {
- out = attList.split(' ');
- } else {
- out.push(attList);
- }
- }
- return out;
- },
-
-
- /**
- * gets all child nodes with a given attribute
- *
- * @param {DOM Node} node
- * @param {String} attributeName
- * @return {NodeList}
- */
- getNodesByAttribute: function(node, attributeName) {
- var selector = '[' + attributeName + ']';
- return node.querySelectorAll(selector);
- },
-
-
- /**
- * gets all child nodes with a given attribute containing a given value
- *
- * @param {DOM Node} node
- * @param {String} attributeName
- * @return {DOM NodeList}
- */
- getNodesByAttributeValue: function(rootNode, name, value) {
- var arr = [],
- x = 0,
- i,
- out = [];
-
- arr = this.getNodesByAttribute(rootNode, name);
- if(arr) {
- i = arr.length;
- while(x < i) {
- if(this.hasAttributeValue(arr[x], name, value)) {
- out.push(arr[x]);
- }
- x++;
- }
- }
- return out;
- },
-
-
- /**
- * gets attribute value from controlled list of tags
- *
- * @param {Array} tagNames
- * @param {String} attributeName
- * @return {String || null}
- */
- getAttrValFromTagList: function(node, tagNames, attributeName) {
- var i = tagNames.length;
-
- while(i--) {
- if(node.tagName.toLowerCase() === tagNames[i]) {
- var attrValue = this.getAttribute(node, attributeName);
- if(attrValue && attrValue !== '') {
- return attrValue;
- }
- }
- }
- return null;
- },
-
-
- /**
- * get node if it has no siblings. CSS equivalent is :only-child
- *
- * @param {DOM Node} rootNode
- * @param {Array} tagNames
- * @return {DOM Node || null}
- */
- getSingleDescendant: function(node){
- return this.getDescendant( node, null, false );
- },
-
-
- /**
- * get node if it has no siblings of the same type. CSS equivalent is :only-of-type
- *
- * @param {DOM Node} rootNode
- * @param {Array} tagNames
- * @return {DOM Node || null}
- */
- getSingleDescendantOfType: function(node, tagNames){
- return this.getDescendant( node, tagNames, true );
- },
-
-
- /**
- * get child node limited by presence of siblings - either CSS :only-of-type or :only-child
- *
- * @param {DOM Node} rootNode
- * @param {Array} tagNames
- * @return {DOM Node || null}
- */
- getDescendant: function( node, tagNames, onlyOfType ){
- var i = node.children.length,
- countAll = 0,
- countOfType = 0,
- child,
- out = null;
-
- while(i--) {
- child = node.children[i];
- if(child.nodeType === 1) {
- if(tagNames){
- // count just only-of-type
- if(this.hasTagName(child, tagNames)){
- out = child;
- countOfType++;
- }
- }else{
- // count all elements
- out = child;
- countAll++;
- }
- }
- }
- if(onlyOfType === true){
- return (countOfType === 1)? out : null;
- }else{
- return (countAll === 1)? out : null;
- }
- },
-
-
- /**
- * is a node one of a list of tags
- *
- * @param {DOM Node} rootNode
- * @param {Array} tagNames
- * @return {Boolean}
- */
- hasTagName: function(node, tagNames){
- var i = tagNames.length;
- while(i--) {
- if(node.tagName.toLowerCase() === tagNames[i]) {
- return true;
- }
- }
- return false;
- },
-
-
- /**
- * abstracts DOM appendChild
- *
- * @param {DOM Node} node
- * @param {DOM Node} childNode
- * @return {DOM Node}
- */
- appendChild: function(node, childNode){
- return node.appendChild(childNode);
- },
-
-
- /**
- * abstracts DOM removeChild
- *
- * @param {DOM Node} childNode
- * @return {DOM Node || null}
- */
- removeChild: function(childNode){
- if (childNode.parentNode) {
- return childNode.parentNode.removeChild(childNode);
- }else{
- return null;
- }
- },
-
-
- /**
- * abstracts DOM cloneNode
- *
- * @param {DOM Node} node
- * @return {DOM Node}
- */
- clone: function(node) {
- var newNode = node.cloneNode(true);
- newNode.removeAttribute('id');
- return newNode;
- },
-
-
- /**
- * gets the text of a node
- *
- * @param {DOM Node} node
- * @return {String}
- */
- getElementText: function( node ){
- if(node && node.data){
- return node.data;
- }else{
- return '';
- }
- },
-
-
- /**
- * gets the attributes of a node - ordered by sequence in html
- *
- * @param {DOM Node} node
- * @return {Array}
- */
- getOrderedAttributes: function( node ){
- var nodeStr = node.outerHTML,
- attrs = [];
-
- for (var i = 0; i < node.attributes.length; i++) {
- var attr = node.attributes[i];
- attr.indexNum = nodeStr.indexOf(attr.name);
-
- attrs.push( attr );
- }
- return attrs.sort( modules.utils.sortObjects( 'indexNum' ) );
- },
-
-
- /**
- * decodes html entities in given text
- *
- * @param {DOM Document} doc
- * @param String} text
- * @return {String}
- */
- decodeEntities: function( doc, text ){
- //return text;
- return doc.createTextNode( text ).nodeValue;
- },
-
-
- /**
- * clones a DOM document
- *
- * @param {DOM Document} document
- * @return {DOM Document}
- */
- cloneDocument: function( document ){
- var newNode,
- newDocument = null;
-
- if( this.canCloneDocument( document )){
- newDocument = document.implementation.createHTMLDocument('');
- newNode = newDocument.importNode( document.documentElement, true );
- newDocument.replaceChild(newNode, newDocument.querySelector('html'));
- }
- return (newNode && newNode.nodeType && newNode.nodeType === 1)? newDocument : document;
- },
-
-
- /**
- * can environment clone a DOM document
- *
- * @param {DOM Document} document
- * @return {Boolean}
- */
- canCloneDocument: function( document ){
- return (document && document.importNode && document.implementation && document.implementation.createHTMLDocument);
- },
-
-
- /**
- * get the child index of a node. Used to create a node path
- *
- * @param {DOM Node} node
- * @return {Int}
- */
- getChildIndex: function (node) {
- var parent = node.parentNode,
- i = -1,
- child;
- while (parent && (child = parent.childNodes[++i])){
- if (child === node){
- return i;
- }
- }
- return -1;
- },
-
-
- /**
- * get a node's path
- *
- * @param {DOM Node} node
- * @return {Array}
- */
- getNodePath: function (node) {
- var parent = node.parentNode,
- path = [],
- index = this.getChildIndex(node);
-
- if(parent && (path = this.getNodePath(parent))){
- if(index > -1){
- path.push(index);
- }
- }
- return path;
- },
-
-
- /**
- * get a node from a path.
- *
- * @param {DOM document} document
- * @param {Array} path
- * @return {DOM Node}
- */
- getNodeByPath: function (document, path) {
- var node = document.documentElement,
- i = 0,
- index;
- while ((index = path[++i]) > -1){
- node = node.childNodes[index];
- }
- return node;
- },
-
-
- /**
- * get an array/nodeList of child nodes
- *
- * @param {DOM node} node
- * @return {Array}
- */
- getChildren: function( node ){
- return node.children;
- },
-
-
- /**
- * create a node
- *
- * @param {String} tagName
- * @return {DOM node}
- */
- createNode: function( tagName ){
- return this.document.createElement(tagName);
- },
-
-
- /**
- * create a node with text content
- *
- * @param {String} tagName
- * @param {String} text
- * @return {DOM node}
- */
- createNodeWithText: function( tagName, text ){
- var node = this.document.createElement(tagName);
- node.innerHTML = text;
- return node;
- }
-
-
-
- };
-
- return modules;
-
-} (Modules || {}));
diff --git a/toolkit/components/microformats/test/lib/html.js b/toolkit/components/microformats/test/lib/html.js
deleted file mode 100644
index ab150d91e3..0000000000
--- a/toolkit/components/microformats/test/lib/html.js
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- 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
-*/
-
-
-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++) {
- var text = this.walkTreeForHtml( node.childNodes[j] );
- if(text !== undefined){
- out += text;
- }
- }
- }
-
- 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 );
- }
-
-
- // 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();
-
- // 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){
- out += text;
- }
- }
- }
-
- // end tag
- if(this.selfClosingElt.indexOf(node.tagName.toLowerCase()) > -1){
- out += ' />';
- }else{
- out += '</' + node.tagName.toLowerCase() + '>';
- }
- }
-
- return (out === '')? undefined : out;
- }
-
-
- };
-
-
- return modules;
-
-} (Modules || {}));
-
diff --git a/toolkit/components/microformats/test/lib/isodate.js b/toolkit/components/microformats/test/lib/isodate.js
deleted file mode 100644
index 30f35f35d4..0000000000
--- a/toolkit/components/microformats/test/lib/isodate.js
+++ /dev/null
@@ -1,481 +0,0 @@
-/*!
- 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'
- * 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
- *
- * @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
- 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',
- dsep: '-',
- tsep: ':',
- tzsep: ':',
- 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) {
- this.autoProfile.sep = 't';
- }
- if(dateString.indexOf('z') > -1) {
- this.autoProfile.tzZulu = 'z';
- }
- if(dateString.indexOf('Z') > -1) {
- this.autoProfile.tzZulu = 'Z';
- }
- 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
- 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 !== '') {
- this.parseTime( timePart );
- if(timeZonePart !== '') {
- this.parseTimeZone( timeZonePart );
- }
- }
- }
- 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) {
- if(parts[1]) {
- this.dY = parts[1];
- }
- if(parts[2]) {
- 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)?/ );
- if(parts[1]) {
- this.dY = parts[1];
- }
- if(parts[2]) {
- this.dM = parts[2];
- }
- if(parts[3]) {
- this.dD = parts[3];
- }
- }
- 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]) {
- this.tH = parts[1];
- }
- if(parts[2]) {
- this.tM = parts[2];
- }
- if(parts[3]) {
- this.tS = parts[3];
- }
- if(parts[4]) {
- this.tD = parts[4];
- }
- 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]) {
- this.tzPN = parts[1];
- }
- if(parts[2]) {
- this.tzH = parts[2];
- }
- if(parts[3]) {
- this.tzM = parts[3];
- }
-
-
- }
- 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) {
- output += this.dsep + this.dM;
- if(this.dD > 0 && this.dD < 32) {
- output += this.dsep + this.dD;
- if(this.tH > -1 && this.tH < 25) {
- output += this.sep + this.toTimeString( format );
- }
- }
- }
- if(this.dDDD > -1) {
- output += this.dsep + this.dDDD;
- }
- } 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) {
- out += this.tH;
- if(this.tM > -1 && this.tM < 61){
- out += this.tsep + this.tM;
- if(this.tS > -1 && this.tS < 61){
- out += this.tsep + this.tS;
- if(this.tD > -1){
- out += '.' + this.tD;
- }
- }
- }
-
-
-
- // time zone offset
- if(this.z) {
- out += this.tzZulu;
- } else {
- if(this.tzH && this.tzH > -1 && this.tzH < 25) {
- out += this.tzPN + this.tzH;
- if(this.tzM > -1 && this.tzM < 61){
- out += this.tzsep + this.tzM;
- }
- }
- }
- }
- }
- return out;
- },
-
-
- /**
- * set the current profile to W3C Note, RFC 3339, HTML5, or auto profile
- *
- */
- setFormatSep: function() {
- switch( this.format.toLowerCase() ) {
- case 'rfc3339':
- this.sep = 'T';
- this.dsep = '';
- this.tsep = '';
- this.tzsep = '';
- this.tzZulu = 'Z';
- break;
- case 'w3c':
- this.sep = 'T';
- this.dsep = '-';
- this.tsep = ':';
- this.tzsep = ':';
- this.tzZulu = 'Z';
- break;
- case 'html5':
- this.sep = ' ';
- this.dsep = '-';
- this.tsep = ':';
- this.tzsep = ':';
- this.tzZulu = 'Z';
- break;
- default:
- // auto - defined by format of input string
- this.sep = this.autoProfile.sep;
- this.dsep = this.autoProfile.dsep;
- this.tsep = this.autoProfile.tsep;
- this.tzsep = this.autoProfile.tzsep;
- 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;
-
-} (Modules || {}));
diff --git a/toolkit/components/microformats/test/lib/living-standard.js b/toolkit/components/microformats/test/lib/living-standard.js
deleted file mode 100644
index e2b0635733..0000000000
--- a/toolkit/components/microformats/test/lib/living-standard.js
+++ /dev/null
@@ -1 +0,0 @@
- modules.livingStandard = '2015-09-25T12:26:04Z';
diff --git a/toolkit/components/microformats/test/lib/maps/h-adr.js b/toolkit/components/microformats/test/lib/maps/h-adr.js
deleted file mode 100644
index aa3a695c53..0000000000
--- a/toolkit/components/microformats/test/lib/maps/h-adr.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- 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.maps = (modules.maps)? modules.maps : {};
-
- modules.maps['h-adr'] = {
- root: 'adr',
- name: 'h-adr',
- properties: {
- 'post-office-box': {},
- 'street-address': {},
- 'extended-address': {},
- 'locality': {},
- 'region': {},
- 'postal-code': {},
- 'country-name': {}
- }
- };
-
- return modules;
-
-} (Modules || {}));
-
-
-
diff --git a/toolkit/components/microformats/test/lib/maps/h-card.js b/toolkit/components/microformats/test/lib/maps/h-card.js
deleted file mode 100644
index 124750a376..0000000000
--- a/toolkit/components/microformats/test/lib/maps/h-card.js
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- 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.maps = (modules.maps)? modules.maps : {};
-
- modules.maps['h-card'] = {
- root: 'vcard',
- name: 'h-card',
- properties: {
- 'fn': {
- 'map': 'p-name'
- },
- 'adr': {
- 'map': 'p-adr',
- 'uf': ['h-adr']
- },
- 'agent': {
- 'uf': ['h-card']
- },
- 'bday': {
- 'map': 'dt-bday'
- },
- 'class': {},
- 'category': {
- 'map': 'p-category',
- 'relAlt': ['tag']
- },
- 'email': {
- 'map': 'u-email'
- },
- 'geo': {
- 'map': 'p-geo',
- 'uf': ['h-geo']
- },
- 'key': {
- 'map': 'u-key'
- },
- 'label': {},
- 'logo': {
- 'map': 'u-logo'
- },
- 'mailer': {},
- 'honorific-prefix': {},
- 'given-name': {},
- 'additional-name': {},
- 'family-name': {},
- 'honorific-suffix': {},
- 'nickname': {},
- 'note': {}, // could be html i.e. e-note
- 'org': {},
- 'p-organization-name': {},
- 'p-organization-unit': {},
- 'photo': {
- 'map': 'u-photo'
- },
- 'rev': {
- 'map': 'dt-rev'
- },
- 'role': {},
- 'sequence': {},
- 'sort-string': {},
- 'sound': {
- 'map': 'u-sound'
- },
- 'title': {
- 'map': 'p-job-title'
- },
- 'tel': {},
- 'tz': {},
- 'uid': {
- 'map': 'u-uid'
- },
- 'url': {
- 'map': 'u-url'
- }
- }
- };
-
- 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
deleted file mode 100644
index b82c4c2d9c..0000000000
--- a/toolkit/components/microformats/test/lib/maps/h-entry.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- 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.maps = (modules.maps)? modules.maps : {};
-
- modules.maps['h-entry'] = {
- root: 'hentry',
- name: 'h-entry',
- properties: {
- 'entry-title': {
- 'map': 'p-name'
- },
- 'entry-summary': {
- 'map': 'p-summary'
- },
- 'entry-content': {
- 'map': 'e-content'
- },
- 'published': {
- 'map': 'dt-published'
- },
- 'updated': {
- 'map': 'dt-updated'
- },
- 'author': {
- 'uf': ['h-card']
- },
- 'category': {
- 'map': 'p-category',
- 'relAlt': ['tag']
- },
- 'geo': {
- 'map': 'p-geo',
- 'uf': ['h-geo']
- },
- 'latitude': {},
- 'longitude': {},
- 'url': {
- 'map': 'u-url',
- 'relAlt': ['bookmark']
- }
- }
- };
-
- 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
deleted file mode 100644
index 6599d45495..0000000000
--- a/toolkit/components/microformats/test/lib/maps/h-event.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- 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.maps = (modules.maps)? modules.maps : {};
-
- modules.maps['h-event'] = {
- root: 'vevent',
- name: 'h-event',
- properties: {
- 'summary': {
- 'map': 'p-name'
- },
- 'dtstart': {
- 'map': 'dt-start'
- },
- 'dtend': {
- 'map': 'dt-end'
- },
- 'description': {},
- 'url': {
- 'map': 'u-url'
- },
- 'category': {
- 'map': 'p-category',
- 'relAlt': ['tag']
- },
- 'location': {
- 'uf': ['h-card']
- },
- 'geo': {
- 'uf': ['h-geo']
- },
- 'latitude': {},
- 'longitude': {},
- 'duration': {
- 'map': 'dt-duration'
- },
- 'contact': {
- 'uf': ['h-card']
- },
- 'organizer': {
- 'uf': ['h-card']},
- 'attendee': {
- 'uf': ['h-card']},
- 'uid': {
- 'map': 'u-uid'
- },
- 'attach': {
- 'map': 'u-attach'
- },
- 'status': {},
- 'rdate': {},
- 'rrule': {}
- }
- };
-
- return modules;
-
-} (Modules || {}));
-
diff --git a/toolkit/components/microformats/test/lib/maps/h-feed.js b/toolkit/components/microformats/test/lib/maps/h-feed.js
deleted file mode 100644
index f680228567..0000000000
--- a/toolkit/components/microformats/test/lib/maps/h-feed.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- 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.maps = (modules.maps)? modules.maps : {};
-
- modules.maps['h-feed'] = {
- root: 'hfeed',
- name: 'h-feed',
- properties: {
- 'category': {
- 'map': 'p-category',
- 'relAlt': ['tag']
- },
- 'summary': {
- 'map': 'p-summary'
- },
- 'author': {
- 'uf': ['h-card']
- },
- 'url': {
- 'map': 'u-url'
- },
- 'photo': {
- 'map': 'u-photo'
- },
- }
- };
-
- return modules;
-
-} (Modules || {}));
-
diff --git a/toolkit/components/microformats/test/lib/maps/h-geo.js b/toolkit/components/microformats/test/lib/maps/h-geo.js
deleted file mode 100644
index fabb86f074..0000000000
--- a/toolkit/components/microformats/test/lib/maps/h-geo.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- 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.maps = (modules.maps)? modules.maps : {};
-
- modules.maps['h-geo'] = {
- root: 'geo',
- name: 'h-geo',
- properties: {
- 'latitude': {},
- 'longitude': {}
- }
- };
-
- return modules;
-
-} (Modules || {}));
-
diff --git a/toolkit/components/microformats/test/lib/maps/h-item.js b/toolkit/components/microformats/test/lib/maps/h-item.js
deleted file mode 100644
index 471a8454e3..0000000000
--- a/toolkit/components/microformats/test/lib/maps/h-item.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- 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.maps = (modules.maps)? modules.maps : {};
-
- modules.maps['h-item'] = {
- root: 'item',
- name: 'h-item',
- subTree: false,
- properties: {
- 'fn': {
- 'map': 'p-name'
- },
- 'url': {
- 'map': 'u-url'
- },
- 'photo': {
- 'map': 'u-photo'
- }
- }
- };
-
- 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
deleted file mode 100644
index 94783d9ee4..0000000000
--- a/toolkit/components/microformats/test/lib/maps/h-listing.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- 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.maps = (modules.maps)? modules.maps : {};
-
- modules.maps['h-listing'] = {
- root: 'hlisting',
- name: 'h-listing',
- properties: {
- 'version': {},
- 'lister': {
- 'uf': ['h-card']
- },
- 'dtlisted': {
- 'map': 'dt-listed'
- },
- 'dtexpired': {
- 'map': 'dt-expired'
- },
- 'location': {},
- 'price': {},
- 'item': {
- 'uf': ['h-card','a-adr','h-geo']
- },
- 'summary': {
- 'map': 'p-name'
- },
- 'description': {
- 'map': 'e-description'
- },
- 'listing': {}
- }
- };
-
- return modules;
-
-} (Modules || {}));
diff --git a/toolkit/components/microformats/test/lib/maps/h-news.js b/toolkit/components/microformats/test/lib/maps/h-news.js
deleted file mode 100644
index 362a5a5709..0000000000
--- a/toolkit/components/microformats/test/lib/maps/h-news.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- 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.maps = (modules.maps)? modules.maps : {};
-
- modules.maps['h-news'] = {
- root: 'hnews',
- name: 'h-news',
- properties: {
- 'entry': {
- 'uf': ['h-entry']
- },
- 'geo': {
- 'uf': ['h-geo']
- },
- 'latitude': {},
- 'longitude': {},
- 'source-org': {
- 'uf': ['h-card']
- },
- 'dateline': {
- 'uf': ['h-card']
- },
- 'item-license': {
- 'map': 'u-item-license'
- },
- 'principles': {
- 'map': 'u-principles',
- 'relAlt': ['principles']
- }
- }
- };
-
- return modules;
-
-} (Modules || {}));
-
-
diff --git a/toolkit/components/microformats/test/lib/maps/h-org.js b/toolkit/components/microformats/test/lib/maps/h-org.js
deleted file mode 100644
index d1b4e82450..0000000000
--- a/toolkit/components/microformats/test/lib/maps/h-org.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- 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.maps = (modules.maps)? modules.maps : {};
-
- modules.maps['h-org'] = {
- root: 'h-x-org', // drop this from v1 as it causes issue with fn org hcard pattern
- name: 'h-org',
- childStructure: true,
- properties: {
- 'organization-name': {},
- 'organization-unit': {}
- }
- };
-
- return modules;
-
-} (Modules || {}));
-
-
diff --git a/toolkit/components/microformats/test/lib/maps/h-product.js b/toolkit/components/microformats/test/lib/maps/h-product.js
deleted file mode 100644
index 18f8eb51a7..0000000000
--- a/toolkit/components/microformats/test/lib/maps/h-product.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- 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.maps = (modules.maps)? modules.maps : {};
-
- modules.maps['h-product'] = {
- root: 'hproduct',
- name: 'h-product',
- properties: {
- 'brand': {
- 'uf': ['h-card']
- },
- 'category': {
- 'map': 'p-category',
- 'relAlt': ['tag']
- },
- 'price': {},
- 'description': {
- 'map': 'e-description'
- },
- 'fn': {
- 'map': 'p-name'
- },
- 'photo': {
- 'map': 'u-photo'
- },
- 'url': {
- 'map': 'u-url'
- },
- 'review': {
- 'uf': ['h-review', 'h-review-aggregate']
- },
- 'listing': {
- 'uf': ['h-listing']
- },
- 'identifier': {
- 'map': 'u-identifier'
- }
- }
- };
-
- return modules;
-
-} (Modules || {}));
-
diff --git a/toolkit/components/microformats/test/lib/maps/h-recipe.js b/toolkit/components/microformats/test/lib/maps/h-recipe.js
deleted file mode 100644
index e3901ea3e0..0000000000
--- a/toolkit/components/microformats/test/lib/maps/h-recipe.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- 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.maps = (modules.maps)? modules.maps : {};
-
- modules.maps['h-recipe'] = {
- root: 'hrecipe',
- name: 'h-recipe',
- properties: {
- 'fn': {
- 'map': 'p-name'
- },
- 'ingredient': {
- 'map': 'e-ingredient'
- },
- 'yield': {},
- 'instructions': {
- 'map': 'e-instructions'
- },
- 'duration': {
- 'map': 'dt-duration'
- },
- 'photo': {
- 'map': 'u-photo'
- },
- 'summary': {},
- 'author': {
- 'uf': ['h-card']
- },
- 'published': {
- 'map': 'dt-published'
- },
- 'nutrition': {},
- 'category': {
- 'map': 'p-category',
- 'relAlt': ['tag']
- },
- }
- };
-
- return modules;
-
-} (Modules || {}));
diff --git a/toolkit/components/microformats/test/lib/maps/h-resume.js b/toolkit/components/microformats/test/lib/maps/h-resume.js
deleted file mode 100644
index d6a46cc880..0000000000
--- a/toolkit/components/microformats/test/lib/maps/h-resume.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- 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.maps = (modules.maps)? modules.maps : {};
-
- modules.maps['h-resume'] = {
- root: 'hresume',
- name: 'h-resume',
- properties: {
- 'summary': {},
- 'contact': {
- 'uf': ['h-card']
- },
- 'education': {
- 'uf': ['h-card', 'h-event']
- },
- 'experience': {
- 'uf': ['h-card', 'h-event']
- },
- 'skill': {},
- 'affiliation': {
- 'uf': ['h-card']
- }
- }
- };
-
- return modules;
-
-} (Modules || {}));
-
diff --git a/toolkit/components/microformats/test/lib/maps/h-review-aggregate.js b/toolkit/components/microformats/test/lib/maps/h-review-aggregate.js
deleted file mode 100644
index 4b6027cbf7..0000000000
--- a/toolkit/components/microformats/test/lib/maps/h-review-aggregate.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- 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.maps = (modules.maps)? modules.maps : {};
-
- modules.maps['h-review-aggregate'] = {
- root: 'hreview-aggregate',
- name: 'h-review-aggregate',
- properties: {
- 'summary': {
- 'map': 'p-name'
- },
- 'item': {
- 'map': 'p-item',
- 'uf': ['h-item', 'h-geo', 'h-adr', 'h-card', 'h-event', 'h-product']
- },
- 'rating': {},
- 'average': {},
- 'best': {},
- 'worst': {},
- 'count': {},
- 'votes': {},
- 'category': {
- 'map': 'p-category',
- 'relAlt': ['tag']
- },
- 'url': {
- 'map': 'u-url',
- 'relAlt': ['self', 'bookmark']
- }
- }
- };
-
- return modules;
-
-} (Modules || {}));
diff --git a/toolkit/components/microformats/test/lib/maps/h-review.js b/toolkit/components/microformats/test/lib/maps/h-review.js
deleted file mode 100644
index 83f4c24bc3..0000000000
--- a/toolkit/components/microformats/test/lib/maps/h-review.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- 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.maps = (modules.maps)? modules.maps : {};
-
- modules.maps['h-review'] = {
- root: 'hreview',
- name: 'h-review',
- properties: {
- 'summary': {
- 'map': 'p-name'
- },
- 'description': {
- 'map': 'e-description'
- },
- 'item': {
- 'map': 'p-item',
- 'uf': ['h-item', 'h-geo', 'h-adr', 'h-card', 'h-event', 'h-product']
- },
- 'reviewer': {
- 'uf': ['h-card']
- },
- 'dtreviewer': {
- 'map': 'dt-reviewer'
- },
- 'rating': {},
- 'best': {},
- 'worst': {},
- 'category': {
- 'map': 'p-category',
- 'relAlt': ['tag']
- },
- 'url': {
- 'map': 'u-url',
- 'relAlt': ['self', 'bookmark']
- }
- }
- };
-
- return modules;
-
-} (Modules || {}));
diff --git a/toolkit/components/microformats/test/lib/maps/rel.js b/toolkit/components/microformats/test/lib/maps/rel.js
deleted file mode 100644
index 8accf80090..0000000000
--- a/toolkit/components/microformats/test/lib/maps/rel.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- 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.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=*
- 'license': [ 'yes','yes'],
- 'nofollow': [ 'no','external'],
- 'tag': [ 'no','yes'],
- 'self': [ 'no','external'],
- 'bookmark': [ 'no','external'],
- 'author': [ 'no','external'],
- 'home': [ 'no','external'],
- 'directory': [ 'no','external'],
- 'enclosure': [ 'no','external'],
- '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
deleted file mode 100644
index 7f67a2ca1c..0000000000
--- a/toolkit/components/microformats/test/lib/parser-implied.js
+++ /dev/null
@@ -1,439 +0,0 @@
-/*!
- 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
- *
- * @param {DOM Node} node
- * @param {Object} uf (microformat output structure)
- * @param {Object} parentClasses (classes structure)
- * @param {Boolean} impliedPropertiesByVersion
- * @return {Object}
- */
- 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 );
- if(typeVersion === 'v2'){
- uf = this.impliedhFeedTitle( 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
- /*
- img.h-x[alt] <img class="h-card" src="glenn.htm" alt="Glenn Jones"></a>
- area.h-x[alt] <area class="h-card" href="glenn.htm" alt="Glenn Jones"></area>
- abbr.h-x[title] <abbr class="h-card" title="Glenn Jones"GJ</abbr>
-
- .h-x>img:only-child[alt]:not[.h-*] <div class="h-card"><a src="glenn.htm" alt="Glenn Jones"></a></div>
- .h-x>area:only-child[alt]:not[.h-*] <div class="h-card"><area href="glenn.htm" alt="Glenn Jones"></area></div>
- .h-x>abbr:only-child[title] <div class="h-card"><abbr title="Glenn Jones">GJ</abbr></div>
-
- .h-x>:only-child>img:only-child[alt]:not[.h-*] <div class="h-card"><span><img src="jane.html" alt="Jane Doe"/></span></div>
- .h-x>:only-child>area:only-child[alt]:not[.h-*] <div class="h-card"><span><area href="jane.html" alt="Jane Doe"></area></span></div>
- .h-x>:only-child>abbr:only-child[title] <div class="h-card"><span><abbr title="Jane Doe">JD</abbr></span></div>
- */
- var name,
- value;
-
- if(!uf.properties.name) {
- value = this.getImpliedProperty(node, ['img', 'area', 'abbr'], this.getNameAttr);
- var textFormat = this.options.textFormat;
- // if no value for tags/properties use text
- if(!value) {
- name = [modules.text.parse(this.document, node, textFormat)];
- }else{
- name = [modules.text.parseText(this.document, value, textFormat)];
- }
- if(name && name[0] !== ''){
- 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] <img class="h-card" alt="Jane Doe" src="jane.jpeg"/>
- object.h-x[data] <object class="h-card" data="jane.jpeg"/>Jane Doe</object>
- .h-x>img[src]:only-of-type:not[.h-*] <div class="h-card"><img alt="Jane Doe" src="jane.jpeg"/></div>
- .h-x>object[data]:only-of-type:not[.h-*] <div class="h-card"><object data="jane.jpeg"/>Jane Doe</object></div>
- .h-x>:only-child>img[src]:only-of-type:not[.h-*] <div class="h-card"><span><img alt="Jane Doe" src="jane.jpeg"/></span></div>
- .h-x>:only-child>object[data]:only-of-type:not[.h-*] <div class="h-card"><span><object data="jane.jpeg"/>Jane Doe</object></span></div>
- */
- var value;
- if(!uf.properties.photo) {
- value = this.getImpliedProperty(node, ['img', 'object'], this.getPhotoAttr);
- if(value) {
- // relative to absolute URL
- if(value && value !== '' && this.options.baseUrl !== '' && value.indexOf('://') === -1) {
- value = modules.url.resolve(value, this.options.baseUrl);
- }
- 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] <a class="h-card" href="glenn.html">Glenn</a>
- area.h-x[href] <area class="h-card" href="glenn.html">Glenn</area>
- .h-x>a[href]:only-of-type:not[.h-*] <div class="h-card" ><a href="glenn.html">Glenn</a><p>...</p></div>
- .h-x>area[href]:only-of-type:not[.h-*] <div class="h-card" ><area href="glenn.html">Glenn</area><p>...</p></div>
- */
- var value;
- if(!uf.properties.url) {
- value = this.getImpliedProperty(node, ['a', 'area'], this.getURLAttr);
- if(value) {
- // relative to absolute URL
- if(value && value !== '' && this.options.baseUrl !== '' && value.indexOf('://') === -1) {
- value = modules.url.resolve(value, this.options.baseUrl);
- }
- 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
- // http://microformats.org/wiki/microformats2-parsing-issues#implied_date_for_dt_properties_both_mf2_and_backcompat
- var newDate;
- if(uf.times.length > 0 && uf.dates.length > 0) {
- newDate = modules.dates.dateTimeUnion(uf.dates[0][1], uf.times[0][1], this.options.dateFormat);
- uf.properties[this.removePropPrefix(uf.times[0][0])][0] = newDate.toString(this.options.dateFormat);
- }
- // clean-up object
- delete uf.times;
- delete uf.dates;
- return uf;
- };
-
-
- /**
- * get an implied property value from pre-defined tag/attriubte combinations
- *
- * @param {DOM Node} node
- * @param {String} tagList (Array of tags from which an implied value can be pulled)
- * @param {String} getAttrFunction (Function which can extract implied value)
- * @return {String || null}
- */
- modules.Parser.prototype.getImpliedProperty = function(node, tagList, getAttrFunction) {
- // i.e. img.h-card
- 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);
- if(descendant && this.hasHClass(descendant) === false){
- value = getAttrFunction(descendant);
- }
- if(node.children.length > 0 ){
- // i.e. .h-card>:only-child>img:only-of-type:not(.h-card)
- child = modules.domUtils.getSingleDescendant(node);
- if(child && this.hasHClass(child) === false){
- descendant = modules.domUtils.getSingleDescendantOfType(child, tagList);
- if(descendant && this.hasHClass(descendant) === false){
- value = getAttrFunction(descendant);
- }
- }
- }
- }
-
- 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) {
- value = modules.domUtils.getAttrValFromTagList(node, ['abbr'], 'title');
- }
- 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) {
- value = modules.domUtils.getAttrValFromTagList(node, ['object'], 'data');
- }
- 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.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
- *
- * @param {Object} uf
- * @param {String} parentPropertyName
- * @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
- if(modules.utils.startWith(parentPropertyName,'p-') && propertyName === 'p-name'){
- uf.altValue = {name: propertyName, value: value};
- }
- // if it's an e-* property element
- if(modules.utils.startWith(parentPropertyName,'e-') && modules.utils.startWith(propertyName,'e-')){
- uf.altValue = {name: propertyName, value: value};
- }
- // if it's an u-* property element
- if(modules.utils.startWith(parentPropertyName,'u-') && propertyName === 'u-url'){
- uf.altValue = {name: propertyName, value: value};
- }
- }
- 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
- if(uf.properties.name === undefined || uf.properties.name[0] === '' ){
- // use the text from the title tag
- var title = modules.domUtils.querySelector(this.document, 'title');
- if(title){
- uf.properties.name = [modules.domUtils.textContent(title)];
- }
- }
- }
- return uf;
- };
-
-
-
- /**
- * implied Geo from pattern <abbr class="p-geo" title="37.386013;-122.082932">
- *
- * @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 = 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 <abbr class="geo" title="30.267991;-97.739568">Brighton</abbr>
- if( modules.utils.hasProperties(uf.properties) === false ){
- uf = this.impliedName( node, uf );
- }
- }
- }
-
- return uf;
- };
-
-
-
- }
-
- return modules;
-
-} (Modules || {}));
diff --git a/toolkit/components/microformats/test/lib/parser-includes.js b/toolkit/components/microformats/test/lib/parser-includes.js
deleted file mode 100644
index f0967710d0..0000000000
--- a/toolkit/components/microformats/test/lib/parser-includes.js
+++ /dev/null
@@ -1,150 +0,0 @@
-/*!
- 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
-*/
-
-
-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
- *
- * @param {DOM node} rootNode
- * @param {String} attributeName
- */
- modules.Parser.prototype.addAttributeIncludes = function(rootNode, attributeName) {
- var arr,
- idList,
- i,
- x,
- z,
- y;
-
- arr = modules.domUtils.getNodesByAttribute(rootNode, attributeName);
- x = 0;
- i = arr.length;
- while(x < i) {
- idList = modules.domUtils.getAttributeList(arr[x], attributeName);
- if(idList) {
- z = 0;
- y = idList.length;
- while(z < y) {
- this.apppendInclude(arr[x], idList[z]);
- z++;
- }
- }
- x++;
- }
- };
-
-
- /**
- * appends clones of include Nodes into the DOM structure for class based includes
- *
- * @param {DOM node} rootNode
- */
- modules.Parser.prototype.addClassIncludes = function(rootNode) {
- var id,
- arr,
- x = 0,
- i;
-
- arr = modules.domUtils.getNodesByAttributeValue(rootNode, 'class', 'include');
- i = arr.length;
- while(x < i) {
- id = modules.domUtils.getAttrValFromTagList(arr[x], ['a'], 'href');
- if(!id) {
- id = modules.domUtils.getAttrValFromTagList(arr[x], ['object'], 'data');
- }
- this.apppendInclude(arr[x], id);
- x++;
- }
- };
-
-
- /**
- * appends a clone of an include into another Node using Id
- *
- * @param {DOM node} rootNode
- * @param {Stringe} id
- */
- 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) {
- clone = modules.domUtils.clone(include);
- this.markIncludeChildren(clone);
- modules.domUtils.appendChild(node, clone);
- }
- };
-
-
- /**
- * 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;
- i = arr.length;
- modules.domUtils.setAttribute(rootNode, 'data-include', 'true');
- modules.domUtils.setAttribute(rootNode, 'style', 'display:none');
- while(x < i) {
- modules.domUtils.setAttribute(arr[x], 'data-include', 'true');
- x++;
- }
- };
-
-
- /**
- * 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;
- while(i--) {
- modules.domUtils.removeChild(rootNode,arr[i]);
- }
- };
-
-
- }
-
- return modules;
-
-} (Modules || {}));
diff --git a/toolkit/components/microformats/test/lib/parser-rels.js b/toolkit/components/microformats/test/lib/parser-rels.js
deleted file mode 100644
index 63ef674469..0000000000
--- a/toolkit/components/microformats/test/lib/parser-rels.js
+++ /dev/null
@@ -1,200 +0,0 @@
-/*!
- 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
-*/
-
-
-var Modules = (function (modules) {
-
- // check parser module is loaded
- if(modules.Parser){
-
- /**
- * finds rel=* structures
- *
- * @param {DOM node} rootNode
- * @return {Object}
- */
- modules.Parser.prototype.findRels = function(rootNode) {
- var out = {
- 'items': [],
- 'rels': {},
- 'rel-urls': {}
- },
- x,
- i,
- y,
- z,
- relList,
- items,
- 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){
- out.rels[item].push( resolved );
- }
- }
- z++;
- }
-
-
- var url = null;
- if(modules.domUtils.hasAttribute(arr[x], 'href')){
- url = modules.domUtils.getAttribute(arr[x], 'href');
- if(url){
- url = modules.url.resolve(url, this.options.baseUrl );
- }
- }
-
-
- // add to rel-urls
- var relUrl = this.getRelProperties(arr[x]);
- relUrl.rels = items;
- // // do not add duplicate rel-urls - based on resolved URLs
- if(url && out['rel-urls'][url] === undefined){
- out['rel-urls'][url] = relUrl;
- }
-
-
- }
- x++;
- }
- return out;
- };
-
-
- /**
- * gets the properties of a rel=*
- *
- * @param {DOM node} node
- * @return {Object}
- */
- modules.Parser.prototype.getRelProperties = function(node){
- var obj = {};
-
- if(modules.domUtils.hasAttribute(node, 'media')){
- obj.media = modules.domUtils.getAttribute(node, 'media');
- }
- if(modules.domUtils.hasAttribute(node, 'type')){
- obj.type = modules.domUtils.getAttribute(node, 'type');
- }
- if(modules.domUtils.hasAttribute(node, 'hreflang')){
- obj.hreflang = modules.domUtils.getAttribute(node, 'hreflang');
- }
- if(modules.domUtils.hasAttribute(node, 'title')){
- obj.title = modules.domUtils.getAttribute(node, 'title');
- }
- 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
- *
- * @param {DOM node} node
- * @param {String} ufName
- * @return {String || undefined}
- */
- modules.Parser.prototype.findRelImpied = function(node, ufName) {
- var out,
- map,
- i;
-
- map = this.getMapping(ufName);
- if(map) {
- for(var key in map.properties) {
- if (map.properties.hasOwnProperty(key)) {
- var prop = map.properties[key],
- propName = (prop.map) ? prop.map : 'p-' + key,
- relCount = 0;
-
- // is property an alt rel=* mapping
- if(prop.relAlt && modules.domUtils.hasAttribute(node, 'rel')) {
- i = prop.relAlt.length;
- while(i--) {
- if(modules.domUtils.hasAttributeValue(node, 'rel', prop.relAlt[i])) {
- relCount++;
- }
- }
- if(relCount === prop.relAlt.length) {
- out = propName;
- }
- }
- }
- }
- }
- return out;
- };
-
-
- /**
- * returns whether a node or its children has rel=* microformat
- *
- * @param {DOM node} node
- * @return {Boolean}
- */
- modules.Parser.prototype.hasRel = function(node) {
- return (this.countRels(node) > 0);
- };
-
-
- /**
- * returns the number of rel=* microformats
- *
- * @param {DOM node} node
- * @return {Int}
- */
- modules.Parser.prototype.countRels = function(node) {
- if(node){
- return modules.domUtils.getNodesByAttribute(node, 'rel').length;
- }
- return 0;
- };
-
-
-
- }
-
- return modules;
-
-} (Modules || {}));
diff --git a/toolkit/components/microformats/test/lib/parser.js b/toolkit/components/microformats/test/lib/parser.js
deleted file mode 100644
index 062ec9f0e0..0000000000
--- a/toolkit/components/microformats/test/lib/parser.js
+++ /dev/null
@@ -1,1453 +0,0 @@
-/*!
- Parser
-
- 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) {
-
-
- /**
- * constructor
- *
- */
- modules.Parser = function () {
- this.rootPrefix = 'h-';
- this.propertyPrefixes = ['p-', 'dt-', 'u-', 'e-'];
- this.excludeTags = ['br', 'hr'];
- };
-
-
- // create objects incase the v1 map modules don't load
- modules.maps = (modules.maps)? modules.maps : {};
- modules.rels = (modules.rels)? modules.rels : {};
-
-
- modules.Parser.prototype = {
-
- init: function(){
- this.rootNode = null;
- this.document = null;
- this.options = {
- 'baseUrl': '',
- 'filters': [],
- 'textFormat': 'whitespacetrimmed',
- 'dateFormat': 'auto', // html5 for testing
- 'overlappingVersions': false,
- 'impliedPropertiesByVersion': true,
- 'parseLatLonGeo': false
- };
- this.rootID = 0;
- this.errors = [];
- this.noContentErr = 'No options.node or options.html was provided and no document object could be found.';
- },
-
-
- /**
- * internal parse function
- *
- * @param {Object} options
- * @return {Object}
- */
- get: function(options) {
- var out = this.formatEmpty(),
- data = [],
- rels;
-
- this.init();
- options = (options)? options : {};
- this.mergeOptions(options);
- this.getDOMContext( options );
-
- // if we do not have any context create error
- if(!this.rootNode || !this.document){
- this.errors.push(this.noContentErr);
- }else{
-
- // only parse h-* microformats if we need to
- // this is added to speed up parsing
- if(this.hasMicroformats(this.rootNode, options)){
- this.prepareDOM( options );
-
- if(this.options.filters.length > 0){
- // parse flat list of items
- var newRootNode = this.findFilterNodes(this.rootNode, this.options.filters);
- data = this.walkRoot(newRootNode);
- }else{
- // parse whole document from root
- data = this.walkRoot(this.rootNode);
- }
-
- out.items = data;
- // don't clear-up DOM if it was cloned
- if(modules.domUtils.canCloneDocument(this.document) === false){
- this.clearUpDom(this.rootNode);
- }
- }
-
- // find any rels
- if(this.findRels){
- rels = this.findRels(this.rootNode);
- out.rels = rels.rels;
- out['rel-urls'] = rels['rel-urls'];
- }
-
- }
-
- if(this.errors.length > 0){
- return this.formatError();
- }
- return out;
- },
-
-
- /**
- * parse to get parent microformat of passed node
- *
- * @param {DOM Node} node
- * @param {Object} options
- * @return {Object}
- */
- getParent: function(node, options) {
- this.init();
- options = (options)? options : {};
-
- if(node){
- return this.getParentTreeWalk(node, options);
- }else{
- this.errors.push(this.noContentErr);
- return this.formatError();
- }
- },
-
-
- /**
- * get the count of microformats
- *
- * @param {DOM Node} rootNode
- * @return {Int}
- */
- count: function( options ) {
- var out = {},
- items,
- classItems,
- x,
- i;
-
- this.init();
- options = (options)? options : {};
- this.getDOMContext( options );
-
- // if we do not have any context create error
- if(!this.rootNode || !this.document){
- return {'errors': [this.noContentErr]};
- }else{
-
- items = this.findRootNodes( this.rootNode, true );
- i = items.length;
- while(i--) {
- classItems = modules.domUtils.getAttributeList(items[i], 'class');
- x = classItems.length;
- while(x--) {
- // find v2 names
- if(modules.utils.startWith( classItems[x], 'h-' )){
- this.appendCount(classItems[x], 1, out);
- }
- // find v1 names
- for(var key in modules.maps) {
- // dont double count if v1 and v2 roots are present
- if(modules.maps[key].root === classItems[x] && classItems.indexOf(key) === -1) {
- this.appendCount(key, 1, out);
- }
- }
- }
- }
- var relCount = this.countRels( this.rootNode );
- if(relCount > 0){
- out.rels = relCount;
- }
-
- return out;
- }
- },
-
-
- /**
- * does a node have a class that marks it as a microformats root
- *
- * @param {DOM Node} node
- * @param {Objecte} options
- * @return {Boolean}
- */
- isMicroformat: function( node, options ) {
- var classes,
- i;
-
- if(!node){
- return false;
- }
-
- // if documemt gets topmost node
- node = modules.domUtils.getTopMostNode( node );
-
- // look for h-* microformats
- classes = this.getUfClassNames(node);
- if(options && options.filters && modules.utils.isArray(options.filters)){
- i = options.filters.length;
- while(i--) {
- if(classes.root.indexOf(options.filters[i]) > -1){
- return true;
- }
- }
- return false;
- }else{
- return (classes.root.length > 0);
- }
- },
-
-
- /**
- * does a node or its children have microformats
- *
- * @param {DOM Node} node
- * @param {Objecte} options
- * @return {Boolean}
- */
- hasMicroformats: function( node, options ) {
- var items,
- i;
-
- if(!node){
- return false;
- }
-
- // if browser based documemt get topmost node
- node = modules.domUtils.getTopMostNode( node );
-
- // returns all microformat roots
- items = this.findRootNodes( node, true );
- if(options && options.filters && modules.utils.isArray(options.filters)){
- i = items.length;
- while(i--) {
- if( this.isMicroformat( items[i], options ) ){
- return true;
- }
- }
- return false;
- }else{
- return (items.length > 0);
- }
- },
-
-
- /**
- * add a new v1 mapping object to parser
- *
- * @param {Array} maps
- */
- add: function( maps ){
- maps.forEach(function(map){
- if(map && map.root && map.name && map.properties){
- modules.maps[map.name] = JSON.parse(JSON.stringify(map));
- }
- });
- },
-
-
- /**
- * internal parse to get parent microformats by walking up the tree
- *
- * @param {DOM Node} node
- * @param {Object} options
- * @param {Int} recursive
- * @return {Object}
- */
- getParentTreeWalk: function (node, options, recursive) {
- options = (options)? options : {};
-
- // recursive calls
- if (recursive === undefined) {
- if (node.parentNode && node.nodeName !== 'HTML'){
- return this.getParentTreeWalk(node.parentNode, options, true);
- }else{
- return this.formatEmpty();
- }
- }
- if (node !== null && node !== undefined && node.parentNode) {
- if (this.isMicroformat( node, options )) {
- // if we have a match return microformat
- options.node = node;
- return this.get( options );
- }else{
- return this.getParentTreeWalk(node.parentNode, options, true);
- }
- }else{
- return this.formatEmpty();
- }
- },
-
-
-
- /**
- * configures what are the base DOM objects for parsing
- *
- * @param {Object} options
- */
- getDOMContext: function( options ){
- var nodes = modules.domUtils.getDOMContext( options );
- this.rootNode = nodes.rootNode;
- this.document = nodes.document;
- },
-
-
- /**
- * prepares DOM before the parse begins
- *
- * @param {Object} options
- * @return {Boolean}
- */
- prepareDOM: function( options ){
- var baseTag,
- href;
-
- // use current document to define baseUrl, try/catch needed for IE10+ error
- try {
- if (!options.baseUrl && this.document && this.document.location) {
- this.options.baseUrl = this.document.location.href;
- }
- } catch (e) {
- // there is no alt action
- }
-
-
- // find base tag to set baseUrl
- baseTag = modules.domUtils.querySelector(this.document,'base');
- if(baseTag) {
- href = modules.domUtils.getAttribute(baseTag, 'href');
- if(href){
- this.options.baseUrl = href;
- }
- }
-
- // get path to rootNode
- // then clone document
- // then reset the rootNode to its cloned version in a new document
- var path,
- newDocument,
- newRootNode;
-
- path = modules.domUtils.getNodePath(this.rootNode);
- newDocument = modules.domUtils.cloneDocument(this.document);
- newRootNode = modules.domUtils.getNodeByPath(newDocument, path);
-
- // check results as early IE fails
- if(newDocument && newRootNode){
- this.document = newDocument;
- this.rootNode = newRootNode;
- }
-
- // add includes
- if(this.addIncludes){
- this.addIncludes( this.document );
- }
-
- return (this.rootNode && this.document);
- },
-
-
- /**
- * returns an empty structure with errors
- *
- * @return {Object}
- */
- formatError: function(){
- var out = this.formatEmpty();
- out.errors = this.errors;
- return out;
- },
-
-
- /**
- * returns an empty structure
- *
- * @return {Object}
- */
- formatEmpty: function(){
- return {
- 'items': [],
- 'rels': {},
- 'rel-urls': {}
- };
- },
-
-
- // find microformats of a given type and return node structures
- findFilterNodes: function(rootNode, filters) {
- var newRootNode = modules.domUtils.createNode('div'),
- items = this.findRootNodes(rootNode, true),
- i = 0,
- x = 0,
- y = 0;
-
- if(items){
- i = items.length;
- while(x < i) {
- // add v1 names
- y = filters.length;
- while (y--) {
- if(this.getMapping(filters[y])){
- var v1Name = this.getMapping(filters[y]).root;
- filters.push(v1Name);
- }
- }
- // append matching nodes into newRootNode
- y = filters.length;
- while (y--) {
- if(modules.domUtils.hasAttributeValue(items[x], 'class', filters[y])){
- var clone = modules.domUtils.clone(items[x]);
- modules.domUtils.appendChild(newRootNode, clone);
- break;
- }
- }
- x++;
- }
- }
-
- return newRootNode;
- },
-
-
- /**
- * appends data to output object for count
- *
- * @param {string} name
- * @param {Int} count
- * @param {Object}
- */
- appendCount: function(name, count, out){
- if(out[name]){
- out[name] = out[name] + count;
- }else{
- out[name] = count;
- }
- },
-
-
- /**
- * is the microformats type in the filter list
- *
- * @param {Object} uf
- * @param {Array} filters
- * @return {Boolean}
- */
- shouldInclude: function(uf, filters) {
- var i;
-
- if(modules.utils.isArray(filters) && filters.length > 0) {
- i = filters.length;
- while(i--) {
- if(uf.type[0] === filters[i]) {
- return true;
- }
- }
- return false;
- } else {
- return true;
- }
- },
-
-
- /**
- * finds all microformat roots in a rootNode
- *
- * @param {DOM Node} rootNode
- * @param {Boolean} includeRoot
- * @return {Array}
- */
- findRootNodes: function(rootNode, includeRoot) {
- var arr = null,
- out = [],
- classList = [],
- items,
- x,
- i,
- y,
- key;
-
-
- // build an array of v1 root names
- for(key in modules.maps) {
- if (modules.maps.hasOwnProperty(key)) {
- classList.push(modules.maps[key].root);
- }
- }
-
- // get all elements that have a class attribute
- includeRoot = (includeRoot) ? includeRoot : false;
- if(includeRoot && rootNode.parentNode) {
- arr = modules.domUtils.getNodesByAttribute(rootNode.parentNode, 'class');
- } else {
- arr = modules.domUtils.getNodesByAttribute(rootNode, 'class');
- }
-
- // loop elements that have a class attribute
- x = 0;
- i = arr.length;
- while(x < i) {
-
- items = modules.domUtils.getAttributeList(arr[x], 'class');
-
- // loop classes on an element
- y = items.length;
- while(y--) {
- // match v1 root names
- if(classList.indexOf(items[y]) > -1) {
- out.push(arr[x]);
- break;
- }
-
- // match v2 root name prefix
- if(modules.utils.startWith(items[y], 'h-')) {
- out.push(arr[x]);
- break;
- }
- }
-
- x++;
- }
- return out;
- },
-
-
- /**
- * starts the tree walk to find microformats
- *
- * @param {DOM Node} node
- * @return {Array}
- */
- walkRoot: function(node){
- var context = this,
- children = [],
- child,
- classes,
- items = [],
- out = [];
-
- classes = this.getUfClassNames(node);
- // if it is a root microformat node
- if(classes && classes.root.length > 0){
- items = this.walkTree(node);
-
- if(items.length > 0){
- out = out.concat(items);
- }
- }else{
- // check if there are children and one of the children has a root microformat
- children = modules.domUtils.getChildren( node );
- if(children && children.length > 0 && this.findRootNodes(node, true).length > -1){
- for (var i = 0; i < children.length; i++) {
- child = children[i];
- items = context.walkRoot(child);
- if(items.length > 0){
- out = out.concat(items);
- }
- }
- }
- }
- return out;
- },
-
-
- /**
- * starts the tree walking for a single microformat
- *
- * @param {DOM Node} node
- * @return {Array}
- */
- walkTree: function(node) {
- var classes,
- out = [],
- obj,
- itemRootID;
-
- // loop roots found on one element
- classes = this.getUfClassNames(node);
- if(classes && classes.root.length && classes.root.length > 0){
-
- this.rootID++;
- itemRootID = this.rootID;
- obj = this.createUfObject(classes.root, classes.typeVersion);
-
- this.walkChildren(node, obj, classes.root, itemRootID, classes);
- if(this.impliedRules){
- this.impliedRules(node, obj, classes);
- }
- out.push( this.cleanUfObject(obj) );
-
-
- }
- return out;
- },
-
-
- /**
- * finds child properties of microformat
- *
- * @param {DOM Node} node
- * @param {Object} out
- * @param {String} ufName
- * @param {Int} rootID
- * @param {Object} parentClasses
- */
- walkChildren: function(node, out, ufName, rootID, parentClasses) {
- var context = this,
- children = [],
- rootItem,
- itemRootID,
- value,
- propertyName,
- propertyVersion,
- i,
- x,
- y,
- z,
- child;
-
- children = modules.domUtils.getChildren( node );
-
- y = 0;
- z = children.length;
- while(y < z) {
- child = children[y];
-
- // get microformat classes for this single element
- var classes = context.getUfClassNames(child, ufName);
-
- // a property which is a microformat
- if(classes.root.length > 0 && classes.properties.length > 0 && !child.addedAsRoot) {
- // create object with type, property and value
- rootItem = context.createUfObject(
- classes.root,
- classes.typeVersion,
- modules.text.parse(this.document, child, context.options.textFormat)
- );
-
- // add the microformat as an array of properties
- propertyName = context.removePropPrefix(classes.properties[0][0]);
-
- // modifies value with "implied value rule"
- if(parentClasses && parentClasses.root.length === 1 && parentClasses.properties.length === 1){
- if(context.impliedValueRule){
- out = context.impliedValueRule(out, parentClasses.properties[0][0], classes.properties[0][0], value);
- }
- }
-
- if(out.properties[propertyName]) {
- out.properties[propertyName].push(rootItem);
- } else {
- out.properties[propertyName] = [rootItem];
- }
-
- context.rootID++;
- // used to stop duplication in heavily nested structures
- child.addedAsRoot = true;
-
-
- x = 0;
- i = rootItem.type.length;
- itemRootID = context.rootID;
- while(x < i) {
- context.walkChildren(child, rootItem, rootItem.type, itemRootID, classes);
- x++;
- }
- if(this.impliedRules){
- context.impliedRules(child, rootItem, classes);
- }
- this.cleanUfObject(rootItem);
-
- }
-
- // a property which is NOT a microformat and has not been used for a given root element
- if(classes.root.length === 0 && classes.properties.length > 0) {
-
- x = 0;
- i = classes.properties.length;
- while(x < i) {
-
- value = context.getValue(child, classes.properties[x][0], out);
- propertyName = context.removePropPrefix(classes.properties[x][0]);
- propertyVersion = classes.properties[x][1];
-
- // modifies value with "implied value rule"
- if(parentClasses && parentClasses.root.length === 1 && parentClasses.properties.length === 1){
- if(context.impliedValueRule){
- out = context.impliedValueRule(out, parentClasses.properties[0][0], classes.properties[x][0], value);
- }
- }
-
- // if we have not added this value into a property with the same name already
- if(!context.hasRootID(child, rootID, propertyName)) {
- // check the root and property is the same version or if overlapping versions are allowed
- if( context.isAllowedPropertyVersion( out.typeVersion, propertyVersion ) ){
- // add the property as an array of properties
- if(out.properties[propertyName]) {
- out.properties[propertyName].push(value);
- } else {
- out.properties[propertyName] = [value];
- }
- // add rootid to node so we can track its use
- context.appendRootID(child, rootID, propertyName);
- }
- }
-
- x++;
- }
-
- context.walkChildren(child, out, ufName, rootID, classes);
- }
-
- // if the node has no microformat classes, see if its children have
- if(classes.root.length === 0 && classes.properties.length === 0) {
- context.walkChildren(child, out, ufName, rootID, classes);
- }
-
- // if the node is a child root add it to the children tree
- if(classes.root.length > 0 && classes.properties.length === 0) {
-
- // create object with type, property and value
- rootItem = context.createUfObject(
- classes.root,
- classes.typeVersion,
- modules.text.parse(this.document, child, context.options.textFormat)
- );
-
- // add the microformat as an array of properties
- if(!out.children){
- out.children = [];
- }
-
- if(!context.hasRootID(child, rootID, 'child-root')) {
- out.children.push( rootItem );
- context.appendRootID(child, rootID, 'child-root');
- context.rootID++;
- }
-
- x = 0;
- i = rootItem.type.length;
- itemRootID = context.rootID;
- while(x < i) {
- context.walkChildren(child, rootItem, rootItem.type, itemRootID, classes);
- x++;
- }
- if(this.impliedRules){
- context.impliedRules(child, rootItem, classes);
- }
- context.cleanUfObject( rootItem );
-
- }
-
-
-
- y++;
- }
-
- },
-
-
-
-
- /**
- * gets the value of a property from a node
- *
- * @param {DOM Node} node
- * @param {String} className
- * @param {Object} uf
- * @return {String || Object}
- */
- getValue: function(node, className, uf) {
- var value = '';
-
- if(modules.utils.startWith(className, 'p-')) {
- value = this.getPValue(node, true);
- }
-
- if(modules.utils.startWith(className, 'e-')) {
- value = this.getEValue(node);
- }
-
- if(modules.utils.startWith(className, 'u-')) {
- value = this.getUValue(node, true);
- }
-
- if(modules.utils.startWith(className, 'dt-')) {
- value = this.getDTValue(node, className, uf, true);
- }
- return value;
- },
-
-
- /**
- * gets the value of a node which contains a 'p-' property
- *
- * @param {DOM Node} node
- * @param {Boolean} valueParse
- * @return {String}
- */
- getPValue: function(node, valueParse) {
- var out = '';
- if(valueParse) {
- out = this.getValueClass(node, 'p');
- }
-
- if(!out && valueParse) {
- out = this.getValueTitle(node);
- }
-
- if(!out) {
- out = modules.domUtils.getAttrValFromTagList(node, ['abbr'], 'title');
- }
-
- if(!out) {
- out = modules.domUtils.getAttrValFromTagList(node, ['data','input'], 'value');
- }
-
- if(node.name === 'br' || node.name === 'hr') {
- out = '';
- }
-
- if(!out) {
- out = modules.domUtils.getAttrValFromTagList(node, ['img', 'area'], 'alt');
- }
-
- if(!out) {
- out = modules.text.parse(this.document, node, this.options.textFormat);
- }
-
- return(out) ? out : '';
- },
-
-
- /**
- * gets the value of a node which contains the 'e-' property
- *
- * @param {DOM Node} node
- * @return {Object}
- */
- getEValue: function(node) {
-
- var out = {value: '', html: ''};
-
- this.expandURLs(node, 'src', this.options.baseUrl);
- this.expandURLs(node, 'href', this.options.baseUrl);
-
- out.value = modules.text.parse(this.document, node, this.options.textFormat);
- out.html = modules.html.parse(node);
-
- return out;
- },
-
-
- /**
- * gets the value of a node which contains the 'u-' property
- *
- * @param {DOM Node} node
- * @param {Boolean} valueParse
- * @return {String}
- */
- getUValue: function(node, valueParse) {
- var out = '';
- if(valueParse) {
- out = this.getValueClass(node, 'u');
- }
-
- if(!out && valueParse) {
- out = this.getValueTitle(node);
- }
-
- if(!out) {
- out = modules.domUtils.getAttrValFromTagList(node, ['a', 'area'], 'href');
- }
-
- if(!out) {
- out = modules.domUtils.getAttrValFromTagList(node, ['img','audio','video','source'], 'src');
- }
-
- if(!out) {
- out = modules.domUtils.getAttrValFromTagList(node, ['object'], 'data');
- }
-
- // if we have no protocol separator, turn relative url to absolute url
- if(out && out !== '' && out.indexOf('://') === -1) {
- out = modules.url.resolve(out, this.options.baseUrl);
- }
-
- if(!out) {
- out = modules.domUtils.getAttrValFromTagList(node, ['abbr'], 'title');
- }
-
- if(!out) {
- out = modules.domUtils.getAttrValFromTagList(node, ['data','input'], 'value');
- }
-
- if(!out) {
- out = modules.text.parse(this.document, node, this.options.textFormat);
- }
-
- return(out) ? out : '';
- },
-
-
- /**
- * gets the value of a node which contains the 'dt-' property
- *
- * @param {DOM Node} node
- * @param {String} className
- * @param {Object} uf
- * @param {Boolean} valueParse
- * @return {String}
- */
- getDTValue: function(node, className, uf, valueParse) {
- var out = '';
-
- if(valueParse) {
- out = this.getValueClass(node, 'dt');
- }
-
- if(!out && valueParse) {
- out = this.getValueTitle(node);
- }
-
- if(!out) {
- out = modules.domUtils.getAttrValFromTagList(node, ['time', 'ins', 'del'], 'datetime');
- }
-
- if(!out) {
- out = modules.domUtils.getAttrValFromTagList(node, ['abbr'], 'title');
- }
-
- if(!out) {
- out = modules.domUtils.getAttrValFromTagList(node, ['data', 'input'], 'value');
- }
-
- if(!out) {
- out = modules.text.parse(this.document, node, this.options.textFormat);
- }
-
- if(out) {
- if(modules.dates.isDuration(out)) {
- // just duration
- return out;
- } else if(modules.dates.isTime(out)) {
- // just time or time+timezone
- if(uf) {
- uf.times.push([className, modules.dates.parseAmPmTime(out, this.options.dateFormat)]);
- }
- return modules.dates.parseAmPmTime(out, this.options.dateFormat);
- } else {
- // returns a date - microformat profile
- if(uf) {
- uf.dates.push([className, new modules.ISODate(out).toString( this.options.dateFormat )]);
- }
- return new modules.ISODate(out).toString( this.options.dateFormat );
- }
- } else {
- return '';
- }
- },
-
-
- /**
- * appends a new rootid to a given node
- *
- * @param {DOM Node} node
- * @param {String} id
- * @param {String} propertyName
- */
- appendRootID: function(node, id, propertyName) {
- if(this.hasRootID(node, id, propertyName) === false){
- var rootids = [];
- if(modules.domUtils.hasAttribute(node,'rootids')){
- rootids = modules.domUtils.getAttributeList(node,'rootids');
- }
- rootids.push('id' + id + '-' + propertyName);
- modules.domUtils.setAttribute(node, 'rootids', rootids.join(' '));
- }
- },
-
-
- /**
- * does a given node already have a rootid
- *
- * @param {DOM Node} node
- * @param {String} id
- * @param {String} propertyName
- * @return {Boolean}
- */
- hasRootID: function(node, id, propertyName) {
- var rootids = [];
- if(!modules.domUtils.hasAttribute(node,'rootids')){
- return false;
- } else {
- rootids = modules.domUtils.getAttributeList(node, 'rootids');
- return (rootids.indexOf('id' + id + '-' + propertyName) > -1);
- }
- },
-
-
-
- /**
- * gets the text of any child nodes with a class value
- *
- * @param {DOM Node} node
- * @param {String} propertyName
- * @return {String || null}
- */
- getValueClass: function(node, propertyType) {
- var context = this,
- children = [],
- out = [],
- child,
- x,
- i;
-
- children = modules.domUtils.getChildren( node );
-
- x = 0;
- i = children.length;
- while(x < i) {
- child = children[x];
- var value = null;
- if(modules.domUtils.hasAttributeValue(child, 'class', 'value')) {
- switch(propertyType) {
- case 'p':
- value = context.getPValue(child, false);
- break;
- case 'u':
- value = context.getUValue(child, false);
- break;
- case 'dt':
- value = context.getDTValue(child, '', null, false);
- break;
- }
- if(value) {
- out.push(modules.utils.trim(value));
- }
- }
- x++;
- }
- if(out.length > 0) {
- if(propertyType === 'p') {
- return modules.text.parseText( this.document, out.join(' '), this.options.textFormat);
- }
- if(propertyType === 'u') {
- return out.join('');
- }
- if(propertyType === 'dt') {
- return modules.dates.concatFragments(out,this.options.dateFormat).toString(this.options.dateFormat);
- }
- } else {
- return null;
- }
- },
-
-
- /**
- * returns a single string of the 'title' attr from all
- * the child nodes with the class 'value-title'
- *
- * @param {DOM Node} node
- * @return {String}
- */
- getValueTitle: function(node) {
- var out = [],
- items,
- i,
- x;
-
- items = modules.domUtils.getNodesByAttributeValue(node, 'class', 'value-title');
- x = 0;
- i = items.length;
- while(x < i) {
- if(modules.domUtils.hasAttribute(items[x], 'title')) {
- out.push(modules.domUtils.getAttribute(items[x], 'title'));
- }
- x++;
- }
- return out.join('');
- },
-
-
- /**
- * finds out whether a node has h-* class v1 and v2
- *
- * @param {DOM Node} node
- * @return {Boolean}
- */
- hasHClass: function(node){
- var classes = this.getUfClassNames(node);
- if(classes.root && classes.root.length > 0){
- return true;
- }else{
- return false;
- }
- },
-
-
- /**
- * get both the root and property class names from a node
- *
- * @param {DOM Node} node
- * @param {Array} ufNameArr
- * @return {Object}
- */
- getUfClassNames: function(node, ufNameArr) {
- var context = this,
- out = {
- 'root': [],
- 'properties': []
- },
- classNames,
- key,
- items,
- item,
- i,
- x,
- z,
- y,
- map,
- prop,
- propName,
- v2Name,
- impiedRel,
- ufName;
-
- // don't get classes from excluded list of tags
- if(modules.domUtils.hasTagName(node, this.excludeTags) === false){
-
- // find classes for node
- classNames = modules.domUtils.getAttribute(node, 'class');
- if(classNames) {
- items = classNames.split(' ');
- x = 0;
- i = items.length;
- while(x < i) {
-
- item = modules.utils.trim(items[x]);
-
- // test for root prefix - v2
- if(modules.utils.startWith(item, context.rootPrefix)) {
- if(out.root.indexOf(item) === -1){
- out.root.push(item);
- }
- out.typeVersion = 'v2';
- }
-
- // test for property prefix - v2
- z = context.propertyPrefixes.length;
- while(z--) {
- if(modules.utils.startWith(item, context.propertyPrefixes[z])) {
- out.properties.push([item,'v2']);
- }
- }
-
- // test for mapped root classnames v1
- for(key in modules.maps) {
- if(modules.maps.hasOwnProperty(key)) {
- // only add a root once
- if(modules.maps[key].root === item && out.root.indexOf(key) === -1) {
- // if root map has subTree set to true
- // test to see if we should create a property or root
- if(modules.maps[key].subTree) {
- out.properties.push(['p-' + modules.maps[key].root, 'v1']);
- } else {
- out.root.push(key);
- if(!out.typeVersion){
- out.typeVersion = 'v1';
- }
- }
- }
- }
- }
-
-
- // test for mapped property classnames v1
- if(ufNameArr){
- for (var a = 0; a < ufNameArr.length; a++) {
- ufName = ufNameArr[a];
- // get mapped property v1 microformat
- map = context.getMapping(ufName);
- if(map) {
- for(key in map.properties) {
- if (map.properties.hasOwnProperty(key)) {
-
- prop = map.properties[key];
- propName = (prop.map) ? prop.map : 'p-' + key;
-
- if(key === item) {
- if(prop.uf) {
- // loop all the classList make sure
- // 1. this property is a root
- // 2. that there is not already an equivalent v2 property i.e. url and u-url on the same element
- y = 0;
- while(y < i) {
- v2Name = context.getV2RootName(items[y]);
- // add new root
- if(prop.uf.indexOf(v2Name) > -1 && out.root.indexOf(v2Name) === -1) {
- out.root.push(v2Name);
- out.typeVersion = 'v1';
- }
- y++;
- }
- //only add property once
- if(out.properties.indexOf(propName) === -1) {
- out.properties.push([propName,'v1']);
- }
- } else {
- if(out.properties.indexOf(propName) === -1) {
- out.properties.push([propName,'v1']);
- }
- }
- }
- }
-
- }
- }
- }
-
- }
-
- x++;
-
- }
- }
- }
-
-
- // finds any alt rel=* mappings for a given node/microformat
- if(ufNameArr && this.findRelImpied){
- for (var b = 0; b < ufNameArr.length; b++) {
- ufName = ufNameArr[b];
- impiedRel = this.findRelImpied(node, ufName);
- if(impiedRel && out.properties.indexOf(impiedRel) === -1) {
- out.properties.push([impiedRel, 'v1']);
- }
- }
- }
-
-
- //if(out.root.length === 1 && out.properties.length === 1) {
- // if(out.root[0].replace('h-','') === this.removePropPrefix(out.properties[0][0])) {
- // out.typeVersion = 'v2';
- // }
- //}
-
- return out;
- },
-
-
- /**
- * given a v1 or v2 root name, return mapping object
- *
- * @param {String} name
- * @return {Object || null}
- */
- getMapping: function(name) {
- var key;
- for(key in modules.maps) {
- if(modules.maps[key].root === name || key === name) {
- return modules.maps[key];
- }
- }
- return null;
- },
-
-
- /**
- * given a v1 root name returns a v2 root name i.e. vcard >>> h-card
- *
- * @param {String} name
- * @return {String || null}
- */
- getV2RootName: function(name) {
- var key;
- for(key in modules.maps) {
- if(modules.maps[key].root === name) {
- return key;
- }
- }
- return null;
- },
-
-
- /**
- * whether a property is the right microformats version for its root type
- *
- * @param {String} typeVersion
- * @param {String} propertyVersion
- * @return {Boolean}
- */
- isAllowedPropertyVersion: function(typeVersion, propertyVersion){
- if(this.options.overlappingVersions === true){
- return true;
- }else{
- return (typeVersion === propertyVersion);
- }
- },
-
-
- /**
- * creates a blank microformats object
- *
- * @param {String} name
- * @param {String} value
- * @return {Object}
- */
- createUfObject: function(names, typeVersion, value) {
- var out = {};
-
- // is more than just whitespace
- if(value && modules.utils.isOnlyWhiteSpace(value) === false) {
- out.value = value;
- }
- // add type i.e. ["h-card", "h-org"]
- if(modules.utils.isArray(names)) {
- out.type = names;
- } else {
- out.type = [names];
- }
- out.properties = {};
- // metadata properties for parsing
- out.typeVersion = typeVersion;
- out.times = [];
- out.dates = [];
- out.altValue = null;
-
- return out;
- },
-
-
- /**
- * removes unwanted microformats property before output
- *
- * @param {Object} microformat
- */
- cleanUfObject: function( microformat ) {
- delete microformat.times;
- delete microformat.dates;
- delete microformat.typeVersion;
- delete microformat.altValue;
- return microformat;
- },
-
-
-
- /**
- * removes microformat property prefixes from text
- *
- * @param {String} text
- * @return {String}
- */
- removePropPrefix: function(text) {
- var i;
-
- i = this.propertyPrefixes.length;
- while(i--) {
- var prefix = this.propertyPrefixes[i];
- if(modules.utils.startWith(text, prefix)) {
- text = text.substr(prefix.length);
- }
- }
- return text;
- },
-
-
- /**
- * expands all relative URLs to absolute ones where it can
- *
- * @param {DOM Node} node
- * @param {String} attrName
- * @param {String} baseUrl
- */
- expandURLs: function(node, attrName, baseUrl){
- var i,
- nodes,
- attr;
-
- nodes = modules.domUtils.getNodesByAttribute(node, attrName);
- i = nodes.length;
- while (i--) {
- try{
- // the url parser can blow up if the format is not right
- attr = modules.domUtils.getAttribute(nodes[i], attrName);
- if(attr && attr !== '' && baseUrl !== '' && attr.indexOf('://') === -1) {
- //attr = urlParser.resolve(baseUrl, attr);
- attr = modules.url.resolve(attr, baseUrl);
- modules.domUtils.setAttribute(nodes[i], attrName, attr);
- }
- }catch(err){
- // do nothing - convert only the urls we can, leave the rest as they are
- }
- }
- },
-
-
-
- /**
- * merges passed and default options -single level clone of properties
- *
- * @param {Object} options
- */
- mergeOptions: function(options) {
- var key;
- for(key in options) {
- if(options.hasOwnProperty(key)) {
- this.options[key] = options[key];
- }
- }
- },
-
-
- /**
- * removes all rootid attributes
- *
- * @param {DOM Node} rootNode
- */
- removeRootIds: function(rootNode){
- var arr,
- i;
-
- arr = modules.domUtils.getNodesByAttribute(rootNode, 'rootids');
- i = arr.length;
- while(i--) {
- modules.domUtils.removeAttribute(arr[i],'rootids');
- }
- },
-
-
- /**
- * removes all changes made to the DOM
- *
- * @param {DOM Node} rootNode
- */
- clearUpDom: function(rootNode){
- if(this.removeIncludes){
- this.removeIncludes(rootNode);
- }
- this.removeRootIds(rootNode);
- }
-
-
- };
-
-
- modules.Parser.prototype.constructor = modules.Parser;
-
- return modules;
-
-} (Modules || {}));
-
-
-
diff --git a/toolkit/components/microformats/test/lib/text.js b/toolkit/components/microformats/test/lib/text.js
deleted file mode 100644
index fe94dae0a3..0000000000
--- a/toolkit/components/microformats/test/lib/text.js
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- 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
- 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
-*/
-
-
-var Modules = (function (modules) {
-
-
- modules.text = {
-
- // normalised or whitespace or 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',
- 'tfoot', 'th', 'thead', 'tr', 'td', 'ul', 'ol', 'dl', 'details'],
-
- // tags to exclude
- excludeTags: ['noframe', 'noscript', 'template', 'script', 'style', 'frames', 'frameset'],
-
-
- /**
- * parses the text from the DOM Node
- *
- * @param {DOM Node} node
- * @param {String} textFormat
- * @return {String}
- */
- parse: function(doc, node, textFormat){
- var out;
- this.textFormat = (textFormat)? textFormat : this.textFormat;
- if(this.textFormat === 'normalised'){
- out = this.walkTreeForText( node );
- if(out !== undefined){
- return this.normalise( doc, out );
- }else{
- return '';
- }
- }else{
- return this.formatText( doc, modules.domUtils.textContent(node), this.textFormat );
- }
- },
-
-
- /**
- * 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 = modules.utils.trimWhitespace( out );
- }
-
- //return entities.decode( out, 2 );
- return modules.domUtils.decodeEntities( doc, out );
- }else{
- return '';
- }
- },
-
-
- /**
- * normalises whitespace in given text
- *
- * @param {String} text
- * @return {String}
- */
- normalise: function( doc, text ){
- text = text.replace( /&nbsp;/g, ' ') ; // exchanges html entity for space into space char
- text = modules.utils.collapseWhiteSpace( text ); // removes linefeeds, tabs and addtional spaces
- text = modules.domUtils.decodeEntities( doc, text ); // decode HTML entities
- 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 );
- }
-
- // 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.walkTreeForText( node.childNodes[j] );
- if(text !== undefined){
- out += text;
- }
- }
- }
-
- // 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/url.js b/toolkit/components/microformats/test/lib/url.js
deleted file mode 100644
index 81ed9f29e5..0000000000
--- a/toolkit/components/microformats/test/lib/url.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- url
- Where possible use the modern window.URL API if its not available use the DOMParser method.
-
- 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.url = {
-
-
- /**
- * creates DOM objects needed to resolve URLs
- */
- init: function(){
- //this._domParser = new DOMParser();
- this._domParser = modules.domUtils.getDOMParser();
- // do not use a head tag it does not work with IE9
- this._html = '<base id="base" href=""></base><a id="link" href=""></a>';
- this._nodes = this._domParser.parseFromString( this._html, 'text/html' );
- this._baseNode = modules.domUtils.getElementById(this._nodes,'base');
- this._linkNode = modules.domUtils.getElementById(this._nodes,'link');
- },
-
-
- /**
- * resolves url to absolute version using baseUrl
- *
- * @param {String} url
- * @param {String} baseUrl
- * @return {String}
- */
- resolve: function(url, baseUrl) {
- // use modern URL web API where we can
- if(modules.utils.isString(url) && modules.utils.isString(baseUrl) && url.indexOf('://') === -1){
- // this try catch is required as IE has an URL object but no constuctor support
- // http://glennjones.net/articles/the-problem-with-window-url
- try {
- var resolved = new URL(url, baseUrl).toString();
- // deal with early Webkit not throwing an error - for Safari
- if(resolved === '[object URL]'){
- resolved = URI.resolve(baseUrl, url);
- }
- return resolved;
- }catch(e){
- // otherwise fallback to DOM
- if(this._domParser === undefined){
- this.init();
- }
-
- // do not use setAttribute it does not work with IE9
- this._baseNode.href = baseUrl;
- this._linkNode.href = url;
-
- // dont use getAttribute as it returns orginal value not resolved
- return this._linkNode.href;
- }
- }else{
- if(modules.utils.isString(url)){
- return url;
- }
- return '';
- }
- },
-
- };
-
- return modules;
-
-} (Modules || {}));
diff --git a/toolkit/components/microformats/test/lib/utilities.js b/toolkit/components/microformats/test/lib/utilities.js
deleted file mode 100644
index c547148113..0000000000
--- a/toolkit/components/microformats/test/lib/utilities.js
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- 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
- *
- * @param {Object} obj
- * @return {Boolean}
- */
- isString: function( obj ) {
- return typeof( obj ) === 'string';
- },
-
- /**
- * is the object a number
- *
- * @param {Object} obj
- * @return {Boolean}
- */
- isNumber: function( obj ) {
- return !isNaN(parseFloat( obj )) && isFinite( obj );
- },
-
-
- /**
- * is the object an array
- *
- * @param {Object} obj
- * @return {Boolean}
- */
- isArray: function( obj ) {
- return obj && !( obj.propertyIsEnumerable( 'length' ) ) && typeof obj === 'object' && typeof obj.length === 'number';
- },
-
-
- /**
- * is the object a function
- *
- * @param {Object} obj
- * @return {Boolean}
- */
- isFunction: function(obj) {
- return !!(obj && obj.constructor && obj.call && obj.apply);
- },
-
-
- /**
- * does the text start with a test string
- *
- * @param {String} text
- * @param {String} test
- * @return {Boolean}
- */
- startWith: function( text, test ) {
- return(text.indexOf(test) === 0);
- },
-
-
- /**
- * removes spaces at front and back of text
- *
- * @param {String} text
- * @return {String}
- */
- trim: function( text ) {
- if(text && this.isString(text)){
- return (text.trim())? text.trim() : text.replace(/^\s+|\s+$/g, '');
- }else{
- return '';
- }
- },
-
-
- /**
- * replaces a character in text
- *
- * @param {String} text
- * @param {Int} index
- * @param {String} character
- * @return {String}
- */
- replaceCharAt: function( text, index, character ) {
- if(text && text.length > index){
- 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
- *
- * @param {String} text
- * @return {String}
- */
- trimWhitespace: function( text ){
- 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])){
- text = this.replaceCharAt( text, i, ' ' );
- }else{
- break;
- }
- }
-
- // turn all whitespace chars at start into spaces
- i = text.length;
- while (x < i) {
- if(this.isOnlyWhiteSpace(text[x])){
- text = this.replaceCharAt( text, i, ' ' );
- }else{
- break;
- }
- x++;
- }
- }
- return this.trim(text);
- },
-
-
- /**
- * does text only contain whitespace characters
- *
- * @param {String} text
- * @return {Boolean}
- */
- isOnlyWhiteSpace: function( text ){
- return !(/[^\t\n\r ]/.test( text ));
- },
-
-
- /**
- * removes whitespace from text (leaves a single space)
- *
- * @param {String} text
- * @return {Sring}
- */
- 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) {
- if( obj.hasOwnProperty( key ) ) {
- return true;
- }
- }
- 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) {
- a = a[property];
- b = b[property];
- if (a < b) {
- return reverse * -1;
- }
- if (a > b) {
- return reverse * 1;
- }
- return 0;
- };
- }
-
- };
-
- return modules;
-
-} (Modules || {}));
-
-
-
-
-
-
-
diff --git a/toolkit/components/microformats/test/lib/version.js b/toolkit/components/microformats/test/lib/version.js
deleted file mode 100644
index 371272cff9..0000000000
--- a/toolkit/components/microformats/test/lib/version.js
+++ /dev/null
@@ -1 +0,0 @@
- modules.version = '1.4.0';
diff --git a/toolkit/components/microformats/test/marionette/microformats_tester.py b/toolkit/components/microformats/test/marionette/microformats_tester.py
deleted file mode 100644
index 69fcb60ba6..0000000000
--- a/toolkit/components/microformats/test/marionette/microformats_tester.py
+++ /dev/null
@@ -1,170 +0,0 @@
-import threading
-import SimpleHTTPServer
-import SocketServer
-import BaseHTTPServer
-import urllib
-import urlparse
-import os
-import posixpath
-
-from marionette_driver.errors import NoSuchElementException
-from marionette_harness import MarionetteTestCase
-
-DEBUG = True
-
-# Example taken from mozilla-central/browser/components/loop/
-
-# XXX Once we're on a branch with bug 993478 landed, we may want to get
-# rid of this HTTP server and just use the built-in one from Marionette,
-# since there will less code to maintain, and it will be faster. We'll
-# need to consider whether this code wants to be shared with WebDriver tests
-# for other browsers, though.
-
-class ThreadingSimpleServer(SocketServer.ThreadingMixIn,
- BaseHTTPServer.HTTPServer):
- pass
-
-
-class HttpRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler, object):
- def __init__(self, *args):
- # set root to toolkit/components/microformats/
- self.root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.normpath(__file__))))
- super(HttpRequestHandler, self).__init__(*args)
-
- def log_message(self, format, *args, **kwargs):
- if DEBUG:
- super(HttpRequestHandler, self).log_message(format, *args, **kwargs)
-
- def translate_path(self, path):
- """Translate a /-separated PATH to the local filename syntax.
-
- Components that mean special things to the local file system
- (e.g. drive or directory names) are ignored. (XXX They should
- probably be diagnosed.)
-
- """
- # abandon query parameters
- path = path.split('?',1)[0]
- path = path.split('#',1)[0]
- # Don't forget explicit trailing slash when normalizing. Issue17324
- trailing_slash = path.rstrip().endswith('/')
- path = posixpath.normpath(urllib.unquote(path))
- words = path.split('/')
- words = filter(None, words)
- path = self.root
- for word in words:
- drive, word = os.path.splitdrive(word)
- head, word = os.path.split(word)
- if word in (os.curdir, os.pardir): continue
- path = os.path.join(path, word)
- if trailing_slash:
- path += '/'
- return path
-
-class BaseTestFrontendUnits(MarionetteTestCase):
-
- @classmethod
- def setUpClass(cls):
- super(BaseTestFrontendUnits, cls).setUpClass()
-
- # Port 0 means to select an arbitrary unused port
- cls.server = ThreadingSimpleServer(('', 0), HttpRequestHandler)
- cls.ip, cls.port = cls.server.server_address
-
- cls.server_thread = threading.Thread(target=cls.server.serve_forever)
- cls.server_thread.daemon = False
- cls.server_thread.start()
-
- @classmethod
- def tearDownClass(cls):
- cls.server.shutdown()
- cls.server_thread.join()
-
- # make sure everything gets GCed so it doesn't interfere with the next
- # test class. Even though this is class-static, each subclass gets
- # its own instance of this stuff.
- cls.server_thread = None
- cls.server = None
-
- def setUp(self):
- super(BaseTestFrontendUnits, self).setUp()
-
- # Unfortunately, enforcing preferences currently comes with the side
- # effect of launching and restarting the browser before running the
- # real functional tests. Bug 1048554 has been filed to track this.
- #
- # Note: when e10s is enabled by default, this pref can go away. The automatic
- # restart will also go away if this is still the only pref set here.
- self.marionette.enforce_gecko_prefs({
- "browser.tabs.remote.autostart": True
- })
-
- # This extends the timeout for find_element. We need this as the tests
- # take an amount of time to run after loading, which we have to wait for.
- self.marionette.timeout.implicit = 120
-
- self.marionette.timeout.page_load = 120
-
- # srcdir_path should be the directory relative to this file.
- def set_server_prefix(self, srcdir_path):
- self.server_prefix = urlparse.urljoin("http://localhost:" + str(self.port),
- srcdir_path)
-
- def check_page(self, page):
-
- self.marionette.navigate(urlparse.urljoin(self.server_prefix, page))
- try:
- self.marionette.find_element("id", 'complete')
- except NoSuchElementException:
- fullPageUrl = urlparse.urljoin(self.relPath, page)
-
- details = "%s: 1 failure encountered\n%s" % \
- (fullPageUrl,
- self.get_failure_summary(
- fullPageUrl, "Waiting for Completion",
- "Could not find the test complete indicator"))
-
- raise AssertionError(details)
-
- fail_node = self.marionette.find_element("css selector",
- '.failures > em')
- if fail_node.text == "0":
- return
-
- # This may want to be in a more general place triggerable by an env
- # var some day if it ends up being something we need often:
- #
- # If you have browser-based unit tests which work when loaded manually
- # but not from marionette, uncomment the two lines below to break
- # on failing tests, so that the browsers won't be torn down, and you
- # can use the browser debugging facilities to see what's going on.
- #from ipdb import set_trace
- #set_trace()
-
- raise AssertionError(self.get_failure_details(page))
-
- def get_failure_summary(self, fullPageUrl, testName, testError):
- return "TEST-UNEXPECTED-FAIL | %s | %s - %s" % (fullPageUrl, testName, testError)
-
- def get_failure_details(self, page):
- fail_nodes = self.marionette.find_elements("css selector",
- '.test.fail')
- fullPageUrl = urlparse.urljoin(self.relPath, page)
-
- details = ["%s: %d failure(s) encountered:" % (fullPageUrl, len(fail_nodes))]
-
- for node in fail_nodes:
- errorText = node.find_element("css selector", '.error').text
-
- # We have to work our own failure message here, as we could be reporting multiple failures.
- # XXX Ideally we'd also give the full test tree for <test name> - that requires walking
- # up the DOM tree.
-
- # Format: TEST-UNEXPECTED-FAIL | <filename> | <test name> - <test error>
- details.append(
- self.get_failure_summary(page,
- node.find_element("tag name", 'h2').text.split("\n")[0],
- errorText.split("\n")[0]))
- details.append(
- errorText)
- return "\n".join(details)
diff --git a/toolkit/components/microformats/test/marionette/test_interface.py b/toolkit/components/microformats/test/marionette/test_interface.py
deleted file mode 100644
index aa34ef1c28..0000000000
--- a/toolkit/components/microformats/test/marionette/test_interface.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# Code example copied from mozilla-central/browser/components/loop/
-# need to get this dir in the path so that we make the import work
-import os
-import sys
-sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'marionette'))
-
-from microformats_tester import BaseTestFrontendUnits
-
-
-class TestInterfaceUnits(BaseTestFrontendUnits):
-
- def setUp(self):
- super(TestInterfaceUnits, self).setUp()
- self.set_server_prefix("/test/interface-tests/")
-
- def test_units(self):
- self.check_page("index.html")
diff --git a/toolkit/components/microformats/test/marionette/test_modules.py b/toolkit/components/microformats/test/marionette/test_modules.py
deleted file mode 100644
index f2291259cf..0000000000
--- a/toolkit/components/microformats/test/marionette/test_modules.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# Code example copied from mozilla-central/browser/components/loop/
-# need to get this dir in the path so that we make the import work
-import os
-import sys
-sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'marionette'))
-
-from microformats_tester import BaseTestFrontendUnits
-
-
-class TestModulesUnits(BaseTestFrontendUnits):
-
- def setUp(self):
- super(TestModulesUnits, self).setUp()
- self.set_server_prefix("/test/module-tests/")
-
- def test_units(self):
- self.check_page("index.html")
diff --git a/toolkit/components/microformats/test/marionette/test_standards.py b/toolkit/components/microformats/test/marionette/test_standards.py
deleted file mode 100644
index ec688fe78a..0000000000
--- a/toolkit/components/microformats/test/marionette/test_standards.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# Code example copied from mozilla-central/browser/components/loop/
-# need to get this dir in the path so that we make the import work
-import os
-import sys
-sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), '..', 'marionette')))
-
-from microformats_tester import BaseTestFrontendUnits
-
-
-class TestStandardsUnits(BaseTestFrontendUnits):
-
- def setUp(self):
- super(TestStandardsUnits, self).setUp()
- self.set_server_prefix("/test/standards-tests/")
-
- def test_units(self):
- self.check_page("index.html")
diff --git a/toolkit/components/microformats/test/module-tests/dates-test.js b/toolkit/components/microformats/test/module-tests/dates-test.js
deleted file mode 100644
index e5e034190e..0000000000
--- a/toolkit/components/microformats/test/module-tests/dates-test.js
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
-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
-
-
-describe('Modules.dates', function() {
-
-
- it('hasAM', function(){
- assert.isTrue( Modules.dates.hasAM( '5am' ) );
- assert.isTrue( Modules.dates.hasAM( '5AM' ) );
- assert.isTrue( Modules.dates.hasAM( '5 am' ) );
- assert.isTrue( Modules.dates.hasAM( '5a.m.' ) );
- 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' ) );
- assert.isTrue( Modules.dates.hasPM( '5 pm' ) );
- assert.isTrue( Modules.dates.hasPM( '5p.m.' ) );
- 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 ' );
- assert.equal( Modules.dates.removeAMPM( '5p.m.' ), '5' );
- assert.equal( Modules.dates.removeAMPM( '5am' ), '5' );
- 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' ) );
- assert.isTrue( Modules.dates.isDuration( 'P0.5Y' ) );
- assert.isTrue( Modules.dates.isDuration( 'P3Y6M4DT12H30M5S' ) );
- assert.isFalse( Modules.dates.isDuration( '2015-01-23T13:45' ) );
- 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' ) );
- assert.isTrue( Modules.dates.isTime( '15:23:00:0567' ) );
- assert.isTrue( Modules.dates.isTime( '10:34pm' ) );
- assert.isTrue( Modules.dates.isTime( '10:34 p.m.' ) );
- assert.isTrue( Modules.dates.isTime( '+01:00:00' ) );
- assert.isTrue( Modules.dates.isTime( '-02:00' ) );
- assert.isTrue( Modules.dates.isTime( 'z15:00' ) );
- assert.isTrue( Modules.dates.isTime( '0843' ) );
- assert.isFalse( Modules.dates.isTime( 'P3Y6M4DT12H30M5S' ) );
- assert.isFalse( Modules.dates.isTime( '2015-01-23T13:45' ) );
- 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' ) );
- });
-
-
- it('parseAmPmTime', function(){
- assert.equal( Modules.dates.parseAmPmTime( '5am' ), '05' );
- assert.equal( Modules.dates.parseAmPmTime( '12pm' ), '12' );
- assert.equal( Modules.dates.parseAmPmTime( '5a.m.' ), '05' );
- assert.equal( Modules.dates.parseAmPmTime( '5pm' ), '17' );
- assert.equal( Modules.dates.parseAmPmTime( '5:34pm' ), '17:34' );
- assert.equal( Modules.dates.parseAmPmTime( '5:04pm' ), '17:04' );
- assert.equal( Modules.dates.parseAmPmTime( '05:34:00' ), '05:34:00' );
- 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' );
- assert.equal( Modules.dates.dateTimeUnion( '2015-01-23', '05', 'HTML5' ).toString('HTML5'), '2015-01-23 05' );
- assert.equal( Modules.dates.dateTimeUnion( '2009-06-26T19:00', '2200', 'HTML5' ).toString('HTML5'), '2009-06-26 22:00' );
-
- 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' );
- assert.equal( Modules.dates.concatFragments( ['2015-01-23T05:34:00'], 'HTML5' ).toString('HTML5'), '2015-01-23 05:34:00' );
- assert.equal( Modules.dates.concatFragments( ['2015-01-23', '05:34:00', 'z'], 'HTML5' ).toString('HTML5'), '2015-01-23 05:34:00Z' );
- 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
deleted file mode 100644
index 5d3f036a9f..0000000000
--- a/toolkit/components/microformats/test/module-tests/domutils-test.js
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
-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
-
-
-describe('Modules.domutils', function() {
-
-
- it('ownerDocument', function(){
- var node = document.createElement('div');
- assert.equal( Modules.domUtils.ownerDocument( node ).nodeType, 9);
- });
-
-
- it('innerHTML', function(){
- var html = '<a href="http://glennjones.net">Glenn Jones</a>',
- 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' ) );
- assert.isFalse( Modules.domUtils.hasAttributeValue( node, 'href', 'http://codebits.glennjones.net' ) );
- assert.isFalse( Modules.domUtils.hasAttributeValue( node, 'class', 'p-name' ) );
- 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 = '<li class="h-card">one</li><li>two</li><li class="h-card">three</li>';
-
- 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 = '<li class="h-card">one</li><li>two</li><li class="h-card">three</li><li class="p-name">four</li>';
-
- 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 = '<a class="u-url" href="http://glennjones.net">Glenn Jones</a>',
- node = document.createElement('div');
-
- node.innerHTML = html,
-
- // one instance of a element
- assert.equal( Modules.domUtils.getSingleDescendant( node ).outerHTML, html );
-
- // two instances of a element
- node.appendChild(document.createElement('a'));
- assert.equal( Modules.domUtils.getSingleDescendant( node ), null );
-
- });
-
-
- it('getSingleDescendantOfType', function(){
- var html = '<a class="u-url" href="http://glennjones.net">Glenn Jones</a>',
- node = document.createElement('div');
-
- node.innerHTML = html,
-
- // 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
- 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 );
- assert.equal( node.innerHTML, '<a></a>' );
- });
-
-
- it('removeChild', function(){
- var node = document.createElement('div'),
- child = document.createElement('a');
-
- node.appendChild(child)
-
- assert.equal( node.innerHTML, '<a></a>' );
- 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, '<div>text content</div>' );
- });
-
-
- it('getElementText', function(){
- assert.equal( Modules.domUtils.getElementText( {} ), '' );
- });
-
-
- it('getNodePath', function(){
- var node = document.createElement('ul');
- node.innerHTML = '<div><ul><li class="h-card">one</li><li>two</li><li class="h-card">three</li><li class="p-name">four</li></ul></div>';
- 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
deleted file mode 100644
index cd06c7b7f7..0000000000
--- a/toolkit/components/microformats/test/module-tests/html-test.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-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
-
-describe('Modules.html', function() {
-
-
- it('parse', function(){
- var html = '<a href="http://glennjones.net">Glenn Jones</a>',
- bloghtml = '<section id="content" class="body"><ol id="posts-list" class="h-feed"><li><article class="h-entry"><header><h2 class="p-namee"><a href="#" rel="bookmark" title="Permalink to this POST TITLE">This be the title</a></h2></header><footer class="post-info"><abbr class="dt-published" title="2005-10-10T14:07:00-07:00">10th October 2005</abbr><address class="h-card p-author">By <a class="u-url p-name" href="#">Enrique Ramírez</a></address></footer><div class="e-content"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque venenatis nunc vitae libero iaculis elementum. Nullam et justo <a href="#">non sapien</a> dapibus blandit nec et leo. Ut ut malesuada tellus.</p></div></article></li></ol></section>',
- 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 ), '<br />' );
-
- node = document.createComment('test comment');
- assert.equal( Modules.html.parse( node ), '' );
-
- });
-
-
-
-
-
-
-
-
-});
diff --git a/toolkit/components/microformats/test/module-tests/index.html b/toolkit/components/microformats/test/module-tests/index.html
deleted file mode 100644
index 0eb3c20407..0000000000
--- a/toolkit/components/microformats/test/module-tests/index.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<html><head><title>Mocha</title>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<link rel="stylesheet" href="../static/css/mocha.css" />
-<script src="../static/javascript/chai.js"></script>
-<script src="../static/javascript/mocha.js"></script>
-<link rel="stylesheet" href="../static/css/mocha-custom.css" />
-<link rel="icon" type="image/png" id="favicon" href="chrome://branding/content/icon32.png"/>
-<script src="../static/javascript/DOMParser.js"></script>
-
-<script data-cover src="../lib/utilities.js"></script>
-<script data-cover src="../lib/domutils.js"></script>
-<script data-cover src="../lib/url.js"></script>
-<script data-cover src="../lib/html.js"></script>
-<script data-cover src="../lib/text.js"></script>
-<script data-cover src="../lib/dates.js"></script>
-<script data-cover src="../lib/isodate.js"></script>
-
-<script>
-var uncaughtError;
-
-window.addEventListener("error", function(error) {
-uncaughtError = error;
-});
-
-var consoleWarn = console.warn;
-var caughtWarnings = [];
-
-console.warn = function() {
-var args = Array.slice(arguments);
-caughtWarnings.push(args);
-consoleWarn.apply(console, args);
-};
-</script>
-
-<script>
-chai.config.includeStack = true;
-mocha.setup({ui: 'bdd', timeout: 10000});
-</script>
-
-
-<script src="../module-tests/dates-test.js"></script>
-<script src="../module-tests/domUtils-test.js"></script>
-<script src="../module-tests/html-test.js"></script>
-<script src="../module-tests/isodate-test.js"></script>
-<script src="../module-tests/text-test.js"></script>
-
-<script src="../module-tests/url-test.js"></script>
-
-<script src="../module-tests/utilities-test.js"></script>
-
-</head><body>
-<h3 class="capitalize">Microformats-shiv: module tests</h3>
-<div id="mocha"></div>
-</body>
-<script>
-describe("Uncaught Error Check", function() {
-it("should load the tests without errors", function() {
-chai.expect(uncaughtError && uncaughtError.message).to.be.undefined;
-});
-});
-
-describe("Unexpected Warnings Check", function() {
-it("should long only the warnings we expect", function() {
-chai.expect(caughtWarnings.length).to.eql(0);
-});
-});
-
-mocha.run(function () {
-var completeNode = document.createElement("p");
-completeNode.setAttribute("id", "complete");
-completeNode.appendChild(document.createTextNode("Complete"));
-document.getElementById("mocha").appendChild(completeNode);
-});
-
-</script>
-</body></html>
diff --git a/toolkit/components/microformats/test/module-tests/isodate-test.js b/toolkit/components/microformats/test/module-tests/isodate-test.js
deleted file mode 100644
index 5f081f81cc..0000000000
--- a/toolkit/components/microformats/test/module-tests/isodate-test.js
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-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
-
-
-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' );
- assert.equal( new Modules.ISODate('2015-01-23T05:34:00', 'w3c').toString('w3c'), '2015-01-23T05:34:00' );
- 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' );
- assert.equal( new Modules.ISODate().parseDate('2015-01', 'auto'), '2015-01' );
- 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();
- date.parseTime('05:34:00.1267');
-
- assert.equal( date.toString('html5'), '05:34:00.1267' );
- });
-
-
- it('toTimeString', function(){
- 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() );
- });
-
-
- it('hasDate', function(){
- var dateEmpty = new Modules.ISODate(),
- date = new Modules.ISODate('2015-01-23');
-
- 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() );
- });
-
-
- 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() );
- });
-
-
-});
diff --git a/toolkit/components/microformats/test/module-tests/text-test.js b/toolkit/components/microformats/test/module-tests/text-test.js
deleted file mode 100644
index f1f2e775cf..0000000000
--- a/toolkit/components/microformats/test/module-tests/text-test.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-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
-
-
-describe('Modules.text', function() {
-
-
- it('parse', function(){
- var html = '\n <a href="http://glennjones.net">Glenn\n Jones \n</a> \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 = '<script>test</script>text';
- assert.equal( Modules.text.parse( document, node, 'normalised' ), 'text' );
-
- // block level
- node.innerHTML = '<p>test</p>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 <a href="http://glennjones.net">Glenn\n Jones \n</a> \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(){
- 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
deleted file mode 100644
index 788e8fdb51..0000000000
--- a/toolkit/components/microformats/test/module-tests/url-test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
-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
-
-
-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
deleted file mode 100644
index b37236a6bc..0000000000
--- a/toolkit/components/microformats/test/module-tests/utilities-test.js
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-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
-
-
-describe('Modules.utilities', function() {
-
-
- it('isString', function(){
- assert.isTrue( Modules.utils.isString( 'abc' ) );
- assert.isFalse( Modules.utils.isString( 123 ) );
- assert.isFalse( Modules.utils.isString( 1.23 ) );
- assert.isFalse( Modules.utils.isString( {'abc': 'abc'} ) );
- 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( '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.isFalse( Modules.utils.isNumber( 'abc' ) );
- assert.isFalse( Modules.utils.isNumber( {'abc': 'abc'} ) );
- assert.isFalse( Modules.utils.isNumber( ['abc'] ) );
- assert.isFalse( Modules.utils.isNumber( true ) );
- });
-
-
- it('startWith', function(){
- assert.isTrue( Modules.utils.startWith( 'p-name', 'p-' ) );
- 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/index.html b/toolkit/components/microformats/test/standards-tests/index.html
deleted file mode 100644
index 47f89f9886..0000000000
--- a/toolkit/components/microformats/test/standards-tests/index.html
+++ /dev/null
@@ -1,179 +0,0 @@
-<html><head><title>Mocha</title>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<link rel="stylesheet" href="../static/css/mocha.css" />
-<script src="../static/javascript/chai.js"></script>
-<script src="../static/javascript/mocha.js"></script>
-<link rel="stylesheet" href="../static/css/mocha-custom.css" />
-<link rel="icon" type="image/png" id="favicon" href="chrome://branding/content/icon32.png"/>
-
-<script src="../static/javascript/DOMParser.js"></script>
-
-<script data-cover src="../../microformat-shiv.js"></script>
-
-<script>
-var uncaughtError;
-
-window.addEventListener("error", function(error) {
-uncaughtError = error;
-});
-
-var consoleWarn = console.warn;
-var caughtWarnings = [];
-
-console.warn = function() {
-var args = Array.slice(arguments);
-caughtWarnings.push(args);
-consoleWarn.apply(console, args);
-};
-</script>
-
-<script>
-chai.config.includeStack = true;
-mocha.setup({ui: 'bdd', timeout: 10000});
-</script>
-
-<script src="../standards-tests/mf-mixed-h-card-mixedpropertries.js"></script>
-<script src="../standards-tests/mf-mixed-h-card-tworoots.js"></script>
-<script src="../standards-tests/mf-mixed-h-entry-mixedroots.js"></script>
-<script src="../standards-tests/mf-mixed-h-resume-mixedroots.js"></script>
-<script src="../standards-tests/mf-v1-adr-simpleproperties.js"></script>
-<script src="../standards-tests/mf-v1-geo-abbrpattern.js"></script>
-<script src="../standards-tests/mf-v1-geo-hidden.js"></script>
-<script src="../standards-tests/mf-v1-geo-simpleproperties.js"></script>
-<script src="../standards-tests/mf-v1-geo-valuetitleclass.js"></script>
-<script src="../standards-tests/mf-v1-hcalendar-ampm.js"></script>
-<script src="../standards-tests/mf-v1-hcalendar-attendees.js"></script>
-<script src="../standards-tests/mf-v1-hcalendar-combining.js"></script>
-<script src="../standards-tests/mf-v1-hcalendar-concatenate.js"></script>
-<script src="../standards-tests/mf-v1-hcalendar-time.js"></script>
-<script src="../standards-tests/mf-v1-hcard-email.js"></script>
-<script src="../standards-tests/mf-v1-hcard-format.js"></script>
-<script src="../standards-tests/mf-v1-hcard-hyperlinkedphoto.js"></script>
-<script src="../standards-tests/mf-v1-hcard-justahyperlink.js"></script>
-<script src="../standards-tests/mf-v1-hcard-justaname.js"></script>
-<script src="../standards-tests/mf-v1-hcard-multiple.js"></script>
-<script src="../standards-tests/mf-v1-hcard-name.js"></script>
-<script src="../standards-tests/mf-v1-hcard-single.js"></script>
-<script src="../standards-tests/mf-v1-hentry-summarycontent.js"></script>
-<script src="../standards-tests/mf-v1-hfeed-simple.js"></script>
-<script src="../standards-tests/mf-v1-hnews-all.js"></script>
-<script src="../standards-tests/mf-v1-hnews-minimum.js"></script>
-<script src="../standards-tests/mf-v1-hproduct-aggregate.js"></script>
-<script src="../standards-tests/mf-v1-hproduct-simpleproperties.js"></script>
-<script src="../standards-tests/mf-v1-hresume-affiliation.js"></script>
-<script src="../standards-tests/mf-v1-hresume-contact.js"></script>
-<script src="../standards-tests/mf-v1-hresume-education.js"></script>
-<script src="../standards-tests/mf-v1-hresume-skill.js"></script>
-<script src="../standards-tests/mf-v1-hresume-work.js"></script>
-<script src="../standards-tests/mf-v1-hreview-item.js"></script>
-<script src="../standards-tests/mf-v1-hreview-vcard.js"></script>
-<script src="../standards-tests/mf-v1-hreview-aggregate-hcard.js"></script>
-<script src="../standards-tests/mf-v1-hreview-aggregate-justahyperlink.js"></script>
-<script src="../standards-tests/mf-v1-hreview-aggregate-vevent.js"></script>
-<script src="../standards-tests/mf-v1-includes-hcarditemref.js"></script>
-<script src="../standards-tests/mf-v1-includes-heventitemref.js"></script>
-<script src="../standards-tests/mf-v1-includes-hyperlink.js"></script>
-<script src="../standards-tests/mf-v1-includes-object.js"></script>
-<script src="../standards-tests/mf-v1-includes-table.js"></script>
-<script src="../standards-tests/mf-v2-h-adr-geo.js"></script>
-<script src="../standards-tests/mf-v2-h-adr-geourl.js"></script>
-<script src="../standards-tests/mf-v2-h-adr-justaname.js"></script>
-<script src="../standards-tests/mf-v2-h-adr-simpleproperties.js"></script>
-<script src="../standards-tests/mf-v2-h-as-note-note.js"></script>
-<script src="../standards-tests/mf-v2-h-card-baseurl.js"></script>
-<script src="../standards-tests/mf-v2-h-card-childimplied.js"></script>
-<script src="../standards-tests/mf-v2-h-card-extendeddescription.js"></script>
-<script src="../standards-tests/mf-v2-h-card-hcard.js"></script>
-<script src="../standards-tests/mf-v2-h-card-horghcard.js"></script>
-<script src="../standards-tests/mf-v2-h-card-hyperlinkedphoto.js"></script>
-<script src="../standards-tests/mf-v2-h-card-impliedname.js"></script>
-<script src="../standards-tests/mf-v2-h-card-impliedphoto.js"></script>
-<script src="../standards-tests/mf-v2-h-card-impliedurl.js"></script>
-<script src="../standards-tests/mf-v2-h-card-justahyperlink.js"></script>
-<script src="../standards-tests/mf-v2-h-card-justaname.js"></script>
-<script src="../standards-tests/mf-v2-h-card-nested.js"></script>
-<script src="../standards-tests/mf-v2-h-card-p-property.js"></script>
-<script src="../standards-tests/mf-v2-h-card-relativeurls.js"></script>
-<script src="../standards-tests/mf-v2-h-entry-impliedvalue-nested.js"></script>
-<script src="../standards-tests/mf-v2-h-entry-justahyperlink.js"></script>
-<script src="../standards-tests/mf-v2-h-entry-justaname.js"></script>
-<script src="../standards-tests/mf-v2-h-entry-summarycontent.js"></script>
-<script src="../standards-tests/mf-v2-h-entry-u-property.js"></script>
-<script src="../standards-tests/mf-v2-h-entry-urlincontent.js"></script>
-<script src="../standards-tests/mf-v2-h-event-ampm.js"></script>
-<script src="../standards-tests/mf-v2-h-event-attendees.js"></script>
-<script src="../standards-tests/mf-v2-h-event-combining.js"></script>
-<script src="../standards-tests/mf-v2-h-event-concatenate.js"></script>
-<script src="../standards-tests/mf-v2-h-event-dates.js"></script>
-<script src="../standards-tests/mf-v2-h-event-dt-property.js"></script>
-<script src="../standards-tests/mf-v2-h-event-justahyperlink.js"></script>
-<script src="../standards-tests/mf-v2-h-event-justaname.js"></script>
-<script src="../standards-tests/mf-v2-h-event-time.js"></script>
-<script src="../standards-tests/mf-v2-h-feed-implied-title.js"></script>
-<script src="../standards-tests/mf-v2-h-feed-simple.js"></script>
-<script src="../standards-tests/mf-v2-h-geo-abbrpattern.js"></script>
-<script src="../standards-tests/mf-v2-h-geo-altitude.js"></script>
-<script src="../standards-tests/mf-v2-h-geo-hidden.js"></script>
-<script src="../standards-tests/mf-v2-h-geo-justaname.js"></script>
-<script src="../standards-tests/mf-v2-h-geo-simpleproperties.js"></script>
-<script src="../standards-tests/mf-v2-h-geo-valuetitleclass.js"></script>
-<script src="../standards-tests/mf-v2-h-news-all.js"></script>
-<script src="../standards-tests/mf-v2-h-news-minimum.js"></script>
-<script src="../standards-tests/mf-v2-h-org-hyperlink.js"></script>
-<script src="../standards-tests/mf-v2-h-org-simple.js"></script>
-<script src="../standards-tests/mf-v2-h-org-simpleproperties.js"></script>
-<script src="../standards-tests/mf-v2-h-product-aggregate.js"></script>
-<script src="../standards-tests/mf-v2-h-product-justahyperlink.js"></script>
-<script src="../standards-tests/mf-v2-h-product-justaname.js"></script>
-<script src="../standards-tests/mf-v2-h-product-simpleproperties.js"></script>
-<script src="../standards-tests/mf-v2-h-recipe-all.js"></script>
-<script src="../standards-tests/mf-v2-h-recipe-minimum.js"></script>
-<script src="../standards-tests/mf-v2-h-resume-affiliation.js"></script>
-<script src="../standards-tests/mf-v2-h-resume-contact.js"></script>
-<script src="../standards-tests/mf-v2-h-resume-education.js"></script>
-<script src="../standards-tests/mf-v2-h-resume-justaname.js"></script>
-<script src="../standards-tests/mf-v2-h-resume-skill.js"></script>
-<script src="../standards-tests/mf-v2-h-resume-work.js"></script>
-<script src="../standards-tests/mf-v2-h-review-hyperlink.js"></script>
-<script src="../standards-tests/mf-v2-h-review-implieditem.js"></script>
-<script src="../standards-tests/mf-v2-h-review-item.js"></script>
-<script src="../standards-tests/mf-v2-h-review-justaname.js"></script>
-<script src="../standards-tests/mf-v2-h-review-photo.js"></script>
-<script src="../standards-tests/mf-v2-h-review-vcard.js"></script>
-<script src="../standards-tests/mf-v2-h-review-aggregate-hevent.js"></script>
-<script src="../standards-tests/mf-v2-h-review-aggregate-justahyperlink.js"></script>
-<script src="../standards-tests/mf-v2-h-review-aggregate-simpleproperties.js"></script>
-<script src="../standards-tests/mf-v2-rel-duplicate-rels.js"></script>
-<script src="../standards-tests/mf-v2-rel-license.js"></script>
-<script src="../standards-tests/mf-v2-rel-nofollow.js"></script>
-<script src="../standards-tests/mf-v2-rel-rel-urls.js"></script>
-<script src="../standards-tests/mf-v2-rel-varying-text-duplicate-rels.js"></script>
-<script src="../standards-tests/mf-v2-rel-xfn-all.js"></script>
-<script src="../standards-tests/mf-v2-rel-xfn-elsewhere.js"></script>
-</head><body>
-<h3 class="capitalize">Microformats-shiv: standards tests</h3>
-<p>Standards tests built on Fri Sep 25 2015 13:26:26 GMT+0100 (BST). Downloaded from github repo: microformats/tests version v0.1.24</p>
-<div id="mocha"></div>
-</body>
-<script>
-describe("Uncaught Error Check", function() {
-it("should load the tests without errors", function() {
-chai.expect(uncaughtError && uncaughtError.message).to.be.undefined;
-});
-});
-
-describe("Unexpected Warnings Check", function() {
-it("should long only the warnings we expect", function() {
-chai.expect(caughtWarnings.length).to.eql(0);
-});
-});
-
-mocha.run(function () {
-var completeNode = document.createElement("p");
-completeNode.setAttribute("id", "complete");
-completeNode.appendChild(document.createTextNode("Complete"));
-document.getElementById("mocha").appendChild(completeNode);
-});
-
-</script>
-</body></html>
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
deleted file mode 100644
index db99dc92a2..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-mixed-h-card-mixedpropertries.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-card', function() {
- var htmlFragment = "<div class=\"h-card\">\n <p>\n <a class=\"p-name p-org u-url\" href=\"http://mozilla.org/\">Mozilla Foundation</a>\n <img class=\"logo\" src=\"../logo.jpg\"/>\n </p>\n <p class=\"adr\">\n <span class=\"street-address\">665 3rd St.</span> \n <span class=\"extended-address\">Suite 207</span> \n <span class=\"locality\">San Francisco</span>, \n <span class=\"region\">CA</span> \n <span class=\"postal-code\">94107</span> \n <span class=\"p-country-name\">U.S.A.</span> \n </p>\n</div>";
- var expected = {"items":[{"type":["h-card"],"properties":{"name":["Mozilla Foundation"],"org":["Mozilla Foundation"],"url":["http://mozilla.org/"],"adr":[{"value":"665 3rd St. \n Suite 207 \n San Francisco, \n CA \n 94107 \n U.S.A.","type":["h-adr"],"properties":{"street-address":["665 3rd St."],"extended-address":["Suite 207"],"locality":["San Francisco"],"region":["CA"],"postal-code":["94107"]}}]}}],"rels":{},"rel-urls":{}};
-
- it('mixedpropertries', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index be43abcd86..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-mixed-h-card-tworoots.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-card', function() {
- var htmlFragment = "<p class=\"h-card vcard\">Frances Berriman</p>";
- var expected = {"items":[{"type":["h-card"],"properties":{"name":["Frances Berriman"]}}],"rels":{},"rel-urls":{}};
-
- it('tworoots', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 705ffeebf2..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-mixed-h-entry-mixedroots.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-entry', function() {
- var htmlFragment = "<!-- simplified version of http://aaronparecki.com/notes/2013/10/18/2/realtimeconf-mapattack -->\n<base href=\"http://aaronparecki.com/\" />\n\n<div class=\"h-entry\">\n <div class=\"h-card vcard author p-author\">\n <img class=\"photo logo u-photo u-logo\" src=\"https://aaronparecki.com/images/aaronpk.png\" alt=\"Aaron Parecki\"/>\n <a href=\"https://aaronparecki.com/\" rel=\"author\" class=\"u-url u-uid url\">aaronparecki.com</a>\n <a class=\"p-name fn value\" href=\"https://aaronparecki.com/\">Aaron Parecki</a>\n <a href=\"https://plus.google.com/117847912875913905493\" rel=\"author\" class=\"google-profile\">Aaron Parecki</a>\n </div>\n <div class=\"entry-content e-content p-name\">Did you play\n <a href=\"http://twitter.com/playmapattack\">@playmapattack</a>at\n <a href=\"/tag/realtimeconf\">#<span class=\"p-category\">realtimeconf</span></a>? Here is some more info about how we built it!\n <a href=\"http://pdx.esri.com/blog/2013/10/17/introducting-mapattack/\"><span class=\"protocol\">http://</span>pdx.esri.com/blog/2013/10/17/introducting-mapattack/</a>\n </div>\n</div>";
- var expected = {"items":[{"type":["h-entry"],"properties":{"author":[{"value":"aaronparecki.com\n Aaron Parecki\n Aaron Parecki","type":["h-card"],"properties":{"photo":["https://aaronparecki.com/images/aaronpk.png"],"logo":["https://aaronparecki.com/images/aaronpk.png"],"url":["https://aaronparecki.com/"],"uid":["https://aaronparecki.com/"],"name":["Aaron Parecki"]}}],"content":[{"value":"Did you play\n @playmapattackat\n #realtimeconf? Here is some more info about how we built it!\n http://pdx.esri.com/blog/2013/10/17/introducting-mapattack/","html":"Did you play\n <a href=\"http://twitter.com/playmapattack\">@playmapattack</a>at\n <a href=\"http://aaronparecki.com/tag/realtimeconf\">#<span class=\"p-category\">realtimeconf</span></a>? Here is some more info about how we built it!\n <a href=\"http://pdx.esri.com/blog/2013/10/17/introducting-mapattack/\"><span class=\"protocol\">http://</span>pdx.esri.com/blog/2013/10/17/introducting-mapattack/</a>\n "}],"name":["Did you play\n @playmapattackat\n #realtimeconf? Here is some more info about how we built it!\n http://pdx.esri.com/blog/2013/10/17/introducting-mapattack/"],"category":["realtimeconf"]}}],"rels":{"author":["https://aaronparecki.com/","https://plus.google.com/117847912875913905493"]},"rel-urls":{"https://aaronparecki.com/":{"text":"aaronparecki.com","rels":["author"]},"https://plus.google.com/117847912875913905493":{"text":"Aaron Parecki","rels":["author"]}}};
-
- it('mixedroots', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 5147866c6b..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-mixed-h-resume-mixedroots.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-resume', function() {
- var htmlFragment = "<meta charset=\"utf-8\">\n<div class=\"h-resume\">\n <div class=\"p-contact vcard\">\n <p class=\"fn\">Tim Berners-Lee</p>\n <p class=\"title\">Director of the World Wide Web Foundation</p>\n </div>\n <p class=\"p-summary\">Invented the World Wide Web.</p><hr />\n <div class=\"p-experience vevent vcard\">\n <p class=\"title\">Director</p>\n <p><a class=\"fn org summary url\" href=\"http://www.webfoundation.org/\">World Wide Web Foundation</a></p>\n <p>\n <time class=\"dtstart\" datetime=\"2009-01-18\">Jan 2009</time> – Present\n <time class=\"duration\" datetime=\"P2Y11M\">(2 years 11 month)</time>\n </p>\n </div>\n</div>";
- var expected = {"items":[{"type":["h-resume"],"properties":{"contact":[{"value":"Tim Berners-Lee","type":["h-card"],"properties":{"name":["Tim Berners-Lee"],"job-title":["Director of the World Wide Web Foundation"]}}],"summary":["Invented the World Wide Web."],"experience":[{"value":"World Wide Web Foundation","type":["h-event","h-card"],"properties":{"job-title":["Director"],"name":["World Wide Web Foundation"],"org":["World Wide Web Foundation"],"url":["http://www.webfoundation.org/"],"start":["2009-01-18"],"duration":["P2Y11M"]}}],"name":["Tim Berners-Lee\n Director of the World Wide Web Foundation\n \n Invented the World Wide Web.\n \n Director\n World Wide Web Foundation\n \n Jan 2009 – Present\n (2 years 11 month)"]}}],"rels":{},"rel-urls":{}};
-
- it('mixedroots', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 09a346e0c4..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-adr-simpleproperties.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('adr', function() {
- var htmlFragment = "<p class=\"adr\">\n <span class=\"street-address\">665 3rd St.</span> \n <span class=\"extended-address\">Suite 207</span> \n <span class=\"locality\">San Francisco</span>, \n <span class=\"region\">CA</span> \n <span class=\"postal-code\">94107</span> \n <span class=\"country-name\">U.S.A.</span> \n</p>";
- var expected = {"items":[{"type":["h-adr"],"properties":{"street-address":["665 3rd St."],"extended-address":["Suite 207"],"locality":["San Francisco"],"region":["CA"],"postal-code":["94107"],"country-name":["U.S.A."]}}],"rels":{},"rel-urls":{}};
-
- it('simpleproperties', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 090e98bb99..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-geo-abbrpattern.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('geo', function() {
- var htmlFragment = "<meta charset=\"utf-8\">\n<p class=\"geo\">\n <abbr class=\"latitude\" title=\"37.408183\">N 37° 24.491</abbr>, \n <abbr class=\"longitude\" title=\"-122.13855\">W 122° 08.313</abbr>\n</p>";
- var expected = {"items":[{"type":["h-geo"],"properties":{"latitude":["37.408183"],"longitude":["-122.13855"]}}],"rels":{},"rel-urls":{}};
-
- it('abbrpattern', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index d67a03b4f3..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-geo-hidden.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('geo', function() {
- var htmlFragment = "<p>\n <span class=\"geo\">The Bricklayer's Arms\n <span class=\"latitude\">\n <span class=\"value-title\" title=\"51.513458\"> </span> \n </span>\n <span class=\"longitude\">\n <span class=\"value-title\" title=\"-0.14812\"> </span>\n </span>\n </span>\n</p>";
- var expected = {"items":[{"type":["h-geo"],"properties":{"latitude":["51.513458"],"longitude":["-0.14812"]}}],"rels":{},"rel-urls":{}};
-
- it('hidden', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 82cd7d3d92..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-geo-simpleproperties.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('geo', function() {
- var htmlFragment = "We are meeting at \n<span class=\"geo\"> \n <span>The Bricklayer's Arms</span>\n (Geo: <span class=\"latitude\">51.513458</span>:\n <span class=\"longitude\">-0.14812</span>)\n</span>";
- var expected = {"items":[{"type":["h-geo"],"properties":{"latitude":["51.513458"],"longitude":["-0.14812"]}}],"rels":{},"rel-urls":{}};
-
- it('simpleproperties', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 196e07f7dd..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-geo-valuetitleclass.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('geo', function() {
- var htmlFragment = "<meta charset=\"utf-8\">\n<p>\n <span class=\"geo\">\n <span class=\"latitude\">\n <span class=\"value-title\" title=\"51.513458\">N 51° 51.345</span>, \n </span>\n <span class=\"longitude\">\n <span class=\"value-title\" title=\"-0.14812\">W -0° 14.812</span>\n </span>\n </span>\n</p>";
- var expected = {"items":[{"type":["h-geo"],"properties":{"latitude":["51.513458"],"longitude":["-0.14812"]}}],"rels":{},"rel-urls":{}};
-
- it('valuetitleclass', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 5da5fd7df9..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-ampm.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hcalendar', function() {
- var htmlFragment = "<div class=\"vevent\">\n <span class=\"summary\">The 4th Microformat party</span> will be on \n <ul>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07:00:00pm \n </span></li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07:00:00am \n </span></li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07:00pm \n </span></li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07pm \n </span></li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">7pm \n </span></li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">7:00pm \n </span></li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07:00p.m. \n </span></li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07:00PM \n </span></li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">7:00am \n </span></li>\n </ul>\n</div>";
- var expected = {"items":[{"type":["h-event"],"properties":{"name":["The 4th Microformat party"],"start":["2009-06-26 19:00:00","2009-06-26 07:00:00","2009-06-26 19:00","2009-06-26 19","2009-06-26 19","2009-06-26 19:00","2009-06-26 19:00","2009-06-26 19:00","2009-06-26 07:00"]}}],"rels":{},"rel-urls":{}};
-
- it('ampm', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index ca28ad431c..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-attendees.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hcalendar', function() {
- var htmlFragment = "<meta charset=\"utf-8\">\n<div class=\"vevent\">\n <span class=\"summary\">CPJ Online Press Freedom Summit</span>\n (<time class=\"dtstart\" datetime=\"2012-10-10\">10 Nov 2012</time>) in\n <span class=\"location\">San Francisco</span>.\n Attendees:\n <ul>\n <li class=\"attendee vcard\"><span class=\"fn\">Brian Warner</span></li>\n <li class=\"attendee vcard\"><span class=\"fn\">Kyle Machulis</span></li>\n <li class=\"attendee vcard\"><span class=\"fn\">Tantek Çelik</span></li>\n <li class=\"attendee vcard\"><span class=\"fn\">Sid Sutter</span></li>\n </ul>\n</div>\n";
- var expected = {"items":[{"type":["h-event"],"properties":{"name":["CPJ Online Press Freedom Summit"],"start":["2012-10-10"],"location":["San Francisco"],"attendee":[{"value":"Brian Warner","type":["h-card"],"properties":{"name":["Brian Warner"]}},{"value":"Kyle Machulis","type":["h-card"],"properties":{"name":["Kyle Machulis"]}},{"value":"Tantek Çelik","type":["h-card"],"properties":{"name":["Tantek Çelik"]}},{"value":"Sid Sutter","type":["h-card"],"properties":{"name":["Sid Sutter"]}}]}}],"rels":{},"rel-urls":{}};
-
- it('attendees', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 7e5a361b12..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-combining.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hcalendar', function() {
- var htmlFragment = "<div class=\"vevent\">\n <a class=\"summary url\" href=\"http://indiewebcamp.com/2012\">\n IndieWebCamp 2012\n </a>\n from <time class=\"dtstart\">2012-06-30</time> \n to <time class=\"dtend\">2012-07-01</time> at \n <span class=\"location vcard\">\n <a class=\"fn org url\" href=\"http://geoloqi.com/\">Geoloqi</a>, \n <span class=\"adr\">\n <span class=\"street-address\">920 SW 3rd Ave. Suite 400</span>, \n <span class=\"locality\">Portland</span>, \n <abbr class=\"region\" title=\"Oregon\">OR</abbr>\n </span>\n </span>\n</div>";
- var expected = {"items":[{"type":["h-event"],"properties":{"name":["IndieWebCamp 2012"],"url":["http://indiewebcamp.com/2012"],"start":["2012-06-30"],"end":["2012-07-01"],"location":[{"value":"Geoloqi","type":["h-card"],"properties":{"name":["Geoloqi"],"org":["Geoloqi"],"url":["http://geoloqi.com/"],"adr":[{"value":"920 SW 3rd Ave. Suite 400, \n Portland, \n OR","type":["h-adr"],"properties":{"street-address":["920 SW 3rd Ave. Suite 400"],"locality":["Portland"],"region":["Oregon"]}}]}}]}}],"rels":{},"rel-urls":{}};
-
- it('combining', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index d17914e1c3..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-concatenate.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hcalendar', function() {
- var htmlFragment = "<div class=\"vevent\">\n <span class=\"summary\">The 4th Microformat party</span> will be on \n <span class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00</time></span> to \n <span class=\"dtend\"><time class=\"value\">22:00</time></span>.\n</div>";
- var expected = {"items":[{"type":["h-event"],"properties":{"name":["The 4th Microformat party"],"start":["2009-06-26 19:00"],"end":["2009-06-26 22:00"]}}],"rels":{},"rel-urls":{}};
-
- it('concatenate', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index edb26d6ad8..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcalendar-time.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hcalendar', function() {
- var htmlFragment = "<div class=\"vevent\">\n <span class=\"summary\">The 4th Microformat party</span> will be on \n <ul>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00:00-08:00</time> \n </li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00:00-0800</time> \n </li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00:00+0800</time> \n </li> \n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00:00Z</time> \n </li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00:00</time> \n </li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00-08:00</time> \n </li> \n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00+08:00</time> \n </li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00z</time> \n </li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00</time> \n </li> \n <li>\n <time class=\"dtend\" datetime=\"2013-034\">3 February 2013</time>\n </li> \n </ul>\n</div>";
- var expected = {"items":[{"type":["h-event"],"properties":{"name":["The 4th Microformat party"],"start":["2009-06-26 19:00:00-08:00","2009-06-26 19:00:00-08:00","2009-06-26 19:00:00+08:00","2009-06-26 19:00:00Z","2009-06-26 19:00:00","2009-06-26 19:00-08:00","2009-06-26 19:00+08:00","2009-06-26 19:00Z","2009-06-26 19:00"],"end":["2013-034"]}}],"rels":{},"rel-urls":{}};
-
- it('time', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 48660ffb1b..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-email.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hcard', function() {
- var htmlFragment = "<div class=\"vcard\">\n <span class=\"fn\">John Doe</span> \n <ul>\n <li><a class=\"email\" href=\"mailto:john@example.com\">notthis@example.com</a></li>\n <li>\n <span class=\"email\">\n <span class=\"type\">internet</span> \n <a class=\"value\" href=\"mailto:john@example.com\">notthis@example.com</a>\n </span>\n </li> \n <li><a class=\"email\" href=\"mailto:john@example.com?subject=parser-test\">notthis@example.com</a></li>\n <li class=\"email\">john@example.com</li>\n </ul>\n</div>";
- var expected = {"items":[{"type":["h-card"],"properties":{"name":["John Doe"],"email":["mailto:john@example.com","mailto:john@example.com","mailto:john@example.com?subject=parser-test","john@example.com"]}}],"rels":{},"rel-urls":{}};
-
- it('email', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index eb539fd870..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-format.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hcard', function() {
- var htmlFragment = "<p class=\"vcard\">\n <span class=\"profile-name fn n\">\n <span class=\" given-name \">John</span> \n <span class=\"FAMILY-NAME\">Doe</span> \n </span>\n</p>";
- var expected = {"items":[{"type":["h-card"],"properties":{"name":["John \n Doe"],"given-name":["John"]}}],"rels":{},"rel-urls":{}};
-
- it('format', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 7f348b4a80..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-hyperlinkedphoto.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hcard', function() {
- var htmlFragment = "<a class=\"vcard\" href=\"http://rohit.khare.org/\">\n <img alt=\"Rohit Khare\" src=\"images/photo.gif\" />\n</a>";
- var expected = {"items":[{"type":["h-card"],"properties":{}}],"rels":{},"rel-urls":{}};
-
- it('hyperlinkedphoto', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index e320f0f8af..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-justahyperlink.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hcard', function() {
- var htmlFragment = "<a class=\"vcard\" href=\"http://benward.me/\">Ben Ward</a>";
- var expected = {"items":[{"type":["h-card"],"properties":{}}],"rels":{},"rel-urls":{}};
-
- it('justahyperlink', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index ba2a6d47dd..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-justaname.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hcard', function() {
- var htmlFragment = "<p class=\"vcard\">Frances Berriman</p>";
- var expected = {"items":[{"type":["h-card"],"properties":{}}],"rels":{},"rel-urls":{}};
-
- it('justaname', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 058e5e2aef..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-multiple.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hcard', function() {
- var htmlFragment = "<base href=\"http://example.com\">\n <div class=\"vcard\">\n \n <div class=\"fn n\"><span class=\"given-name\">John</span> <span class=\"family-name\">Doe</span></div>\n <a class=\"sound\" href=\"http://www.madgex.com/johndoe.mpeg\">Pronunciation of my name</a>\n <div><img class=\"photo\" src=\"images/photo.gif\" alt=\"Photo of John Doe\" /></div>\n\n <p>Nicknames:</p>\n <ul>\n <li class=\"nickname\">Man with no name</li>\n <li class=\"nickname\">Lost boy</li>\n </ul>\n\n <p>About:</p>\n <p class=\"note\">John Doe is one of those names you always have issues with.</p>\n <p class=\"note\">It can be a real problem booking a hotel room with the name John Doe.</p>\n\n <p>Companies:</p>\n <div>\n <img class=\"logo\" src=\"images/logo.gif\" alt=\"Madgex company logo\" />\n <img class=\"logo\" src=\"images/logo.gif\" alt=\"Web Feet Media company logo\" />\n </div>\n <ul>\n <li><a class=\"url org\" href=\"http://www.madgex.com/\">Madgex</a> <span class=\"title\">Creative Director</span></li>\n <li><a class=\"url org\" href=\"http://www.webfeetmedia.com/\">Web Feet Media Ltd</a> <span class=\"title\">Owner</span></li>\n </ul>\n \n <p>Tags: \n <a rel=\"tag\" class=\"category\" href=\"http://en.wikipedia.org/wiki/design\">design</a>, \n <a rel=\"tag\" class=\"category\" href=\"http://en.wikipedia.org/wiki/development\">development</a> and\n <a rel=\"tag\" class=\"category\" href=\"http://en.wikipedia.org/wiki/web\">web</a>\n </p>\n \n <p>Phone numbers:</p>\n <ul>\n <li class=\"tel\">\n <span class=\"type\">Work</span> (<span class=\"type\">pref</span>erred):\n <span class=\"value\">+1 415 555 100</span>\n </li>\n <li class=\"tel\"><span class=\"type\">Home</span>: <span class=\"value\">+1 415 555 200</span></li>\n <li class=\"tel\"><span class=\"type\">Postal</span>: <span class=\"value\">+1 415 555 300</span></li>\n </ul>\n \n <p>Emails:</p>\n <ul>\n <li><a class=\"email\" href=\"mailto:john.doe@madgex.com\">John Doe at Madgex</a></li>\n <li><a class=\"email\" href=\"mailto:john.doe@webfeetmedia.com\">John Doe at Web Feet Media</a></li>\n </ul>\n <p>John Doe uses <span class=\"mailer\">PigeonMail 2.1</span> or <span class=\"mailer\">Outlook 2007</span> for email.</p>\n\n <p>Addresses:</p>\n <ul>\n <li class=\"label\">\n <span class=\"adr\">\n <span class=\"type\">Work</span>: \n <span class=\"street-address\">North Street</span>, \n <span class=\"locality\">Brighton</span>, \n <span class=\"country-name\">United Kingdom</span>\n </span>\n \n </li>\n <li class=\"label\">\n <span class=\"adr\">\n <span class=\"type\">Home</span>: \n <span class=\"street-address\">West Street</span>, \n <span class=\"locality\">Brighton</span>, \n <span class=\"country-name\">United Kingdom</span>\n </span>\n </li>\n </ul>\n \n <p>In emergency contact: <span class=\"agent\">Jane Doe</span> or <span class=\"agent vcard\"><span class=\"fn\">Dave Doe</span></span>.</p>\n <p>Key: <span class=\"key\">hd02$Gfu*d%dh87KTa2=23934532479</span></p>\n</div>";
- var expected = {"items":[{"type":["h-card"],"properties":{"name":["John Doe"],"given-name":["John"],"family-name":["Doe"],"sound":["http://www.madgex.com/johndoe.mpeg"],"photo":["http://example.com/images/photo.gif"],"nickname":["Man with no name","Lost boy"],"note":["John Doe is one of those names you always have issues with.","It can be a real problem booking a hotel room with the name John Doe."],"logo":["http://example.com/images/logo.gif","http://example.com/images/logo.gif"],"url":["http://www.madgex.com/","http://www.webfeetmedia.com/"],"org":["Madgex","Web Feet Media Ltd"],"job-title":["Creative Director","Owner"],"category":["design","development","web"],"tel":["+1 415 555 100","+1 415 555 200","+1 415 555 300"],"email":["mailto:john.doe@madgex.com","mailto:john.doe@webfeetmedia.com"],"mailer":["PigeonMail 2.1","Outlook 2007"],"label":["Work: \n North Street, \n Brighton, \n United Kingdom","Home: \n West Street, \n Brighton, \n United Kingdom"],"adr":[{"value":"Work: \n North Street, \n Brighton, \n United Kingdom","type":["h-adr"],"properties":{"street-address":["North Street"],"locality":["Brighton"],"country-name":["United Kingdom"]}},{"value":"Home: \n West Street, \n Brighton, \n United Kingdom","type":["h-adr"],"properties":{"street-address":["West Street"],"locality":["Brighton"],"country-name":["United Kingdom"]}}],"agent":["Jane Doe",{"value":"Dave Doe","type":["h-card"],"properties":{"name":["Dave Doe"]}}],"key":["hd02$Gfu*d%dh87KTa2=23934532479"]}}],"rels":{"tag":["http://en.wikipedia.org/wiki/design","http://en.wikipedia.org/wiki/development","http://en.wikipedia.org/wiki/web"]},"rel-urls":{"http://en.wikipedia.org/wiki/design":{"text":"design","rels":["tag"]},"http://en.wikipedia.org/wiki/development":{"text":"development","rels":["tag"]},"http://en.wikipedia.org/wiki/web":{"text":"web","rels":["tag"]}}};
-
- it('multiple', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index ef75899cff..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-name.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hcard', function() {
- var htmlFragment = "<base href=\"http://example.com\">\n<div class=\"vcard\">\n <div class=\"name\">\n <span class=\"honorific-prefix\">Dr</span> \n <span class=\"given-name\">John</span> \n <abbr class=\"additional-name\" title=\"Peter\">P</abbr> \n <span class=\"family-name\">Doe</span> \n <data class=\"honorific-suffix\" value=\"MSc\"></data>\n <img class=\"photo honorific-suffix\" src=\"images/logo.gif\" alt=\"PHD\" />\n </div>\n</div>";
- var expected = {"items":[{"type":["h-card"],"properties":{"honorific-prefix":["Dr"],"given-name":["John"],"additional-name":["Peter"],"family-name":["Doe"],"honorific-suffix":["MSc","PHD"],"photo":["http://example.com/images/logo.gif"]}}],"rels":{},"rel-urls":{}};
-
- it('name', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index a7ef7628b8..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hcard-single.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hcard', function() {
- var htmlFragment = "<div class=\"vcard\">\n \n <div class=\"fn n\"><span class=\"given-name sort-string\">John</span> Doe</div>\n <div>Birthday: <abbr class=\"bday\" title=\"2000-01-01T00:00:00-08:00\">January 1st, 2000</abbr></div>\n <div>Role: <span class=\"role\">Designer</span></div>\n <div>Location: <abbr class=\"geo\" title=\"30.267991;-97.739568\">Brighton</abbr></div>\n <div>Time zone: <abbr class=\"tz\" title=\"-05:00\">Eastern Standard Time</abbr></div>\n \n <div>Profile details:\n <div>Profile id: <span class=\"uid\">http://example.com/profiles/johndoe</span></div>\n <div>Details are: <span class=\"class\">Public</span></div>\n <div>Last updated: <abbr class=\"rev\" title=\"2008-01-01T13:45:00\">January 1st, 2008 - 13:45</abbr></div>\n </div>\n </div>";
- var expected = {"items":[{"type":["h-card"],"properties":{"name":["John Doe"],"given-name":["John"],"sort-string":["John"],"bday":["2000-01-01 00:00:00-08:00"],"role":["Designer"],"geo":[{"value":"30.267991;-97.739568","type":["h-geo"],"properties":{"name":["30.267991;-97.739568"]}}],"tz":["-05:00"],"uid":["http://example.com/profiles/johndoe"],"class":["Public"],"rev":["2008-01-01 13:45:00"]}}],"rels":{},"rel-urls":{}};
-
- it('single', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 5280efb047..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hentry-summarycontent.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hentry', function() {
- var htmlFragment = "<meta charset=\"utf-8\">\n<div class=\"hentry\">\n <h1><a class=\"entry-title\" href=\"http://microformats.org/2012/06/25/microformats-org-at-7\">microformats.org at 7</a></h1>\n <div class=\"entry-content\">\n <p class=\"entry-summary\">Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.</p>\n\n <p>The microformats tagline “humans first, machines second” \n forms the basis of many of our \n <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service </p>\n </div> \n <p>Updated \n <time class=\"updated\" datetime=\"2012-06-25T17:08:26\">June 25th, 2012</time> by\n <span class=\"author vcard\"><a class=\"fn url\" href=\"http://tantek.com/\">Tantek</a></span>\n </p>\n</div>";
- var expected = {"items":[{"type":["h-entry"],"properties":{"name":["microformats.org at 7"],"content":[{"value":"Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.\n\n The microformats tagline “humans first, machines second” \n forms the basis of many of our \n principles, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service","html":"\n <p class=\"entry-summary\">Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.</p>\n\n <p>The microformats tagline “humans first, machines second” \n forms the basis of many of our \n <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service </p>\n "}],"summary":["Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities."],"updated":["2012-06-25 17:08:26"],"author":[{"value":"Tantek","type":["h-card"],"properties":{"name":["Tantek"],"url":["http://tantek.com/"]}}]}}],"rels":{},"rel-urls":{}};
-
- it('summarycontent', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 4c8294d499..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hfeed-simple.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hfeed', function() {
- var htmlFragment = "<section class=\"hfeed\">\n\t<h1 class=\"name\">Microformats blog</h1>\n\t<span class=\"author vcard\"><a class=\"fn url\" href=\"http://tantek.com/\">Tantek</a></span>\n\t<a class=\"url\" href=\"http://microformats.org/blog\">permlink</a>\n\t<img class=\"photo\" src=\"photo.jpeg\"/>\n\t<p>\n\t\tTags: <a rel=\"tag\" href=\"tags/microformats\">microformats</a>, \n\t\t<a rel=\"tag\" href=\"tags/html\">html</a>\n\t</p>\n\t\n\t<div class=\"hentry\">\n\t <h1><a class=\"entry-title\" rel=\"bookmark\" href=\"http://microformats.org/2012/06/25/microformats-org-at-7\">microformats.org at 7</a></h1>\n\t <div class=\"entry-content\">\n\t <p class=\"entry-summary\">Last week the microformats.org community \n\t celebrated its 7th birthday at a gathering hosted by Mozilla in \n\t San Francisco and recognized accomplishments, challenges, and \n\t opportunities.</p>\n\t\n\t <p>The microformats tagline “humans first, machines second” \n\t forms the basis of many of our \n\t <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n\t in that regard, we’d like to recognize a few people and \n\t thank them for their years of volunteer service </p>\n\t </div> \n\t <p>Updated \n\t <time class=\"updated\" datetime=\"2012-06-25T17:08:26\">June 25th, 2012</time>\n\t </p>\n\t</div>\n\t\n</section>";
- var expected = {"items":[{"type":["h-feed"],"properties":{"author":[{"value":"Tantek","type":["h-card"],"properties":{"name":["Tantek"],"url":["http://tantek.com/"]}}],"url":["http://microformats.org/blog"],"photo":["http://example.com/photo.jpeg"],"category":["microformats","html"]},"children":[{"value":"microformats.org at 7\n\t \n\t Last week the microformats.org community \n\t celebrated its 7th birthday at a gathering hosted by Mozilla in \n\t San Francisco and recognized accomplishments, challenges, and \n\t opportunities.\n\t\n\t The microformats tagline “humans first, machines second” \n\t forms the basis of many of our \n\t principles, and \n\t in that regard, we’d like to recognize a few people and \n\t thank them for their years of volunteer service \n\t \n\t Updated \n\t June 25th, 2012","type":["h-entry"],"properties":{"name":["microformats.org at 7"],"url":["http://microformats.org/2012/06/25/microformats-org-at-7"],"content":[{"value":"Last week the microformats.org community \n\t celebrated its 7th birthday at a gathering hosted by Mozilla in \n\t San Francisco and recognized accomplishments, challenges, and \n\t opportunities.\n\t\n\t The microformats tagline “humans first, machines second” \n\t forms the basis of many of our \n\t principles, and \n\t in that regard, we’d like to recognize a few people and \n\t thank them for their years of volunteer service","html":"\n\t <p class=\"entry-summary\">Last week the microformats.org community \n\t celebrated its 7th birthday at a gathering hosted by Mozilla in \n\t San Francisco and recognized accomplishments, challenges, and \n\t opportunities.</p>\n\t\n\t <p>The microformats tagline “humans first, machines second” \n\t forms the basis of many of our \n\t <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n\t in that regard, we’d like to recognize a few people and \n\t thank them for their years of volunteer service </p>\n\t "}],"summary":["Last week the microformats.org community \n\t celebrated its 7th birthday at a gathering hosted by Mozilla in \n\t San Francisco and recognized accomplishments, challenges, and \n\t opportunities."],"updated":["2012-06-25 17:08:26"]}}]}],"rels":{"tag":["http://example.com/tags/microformats","http://example.com/tags/html"],"bookmark":["http://microformats.org/2012/06/25/microformats-org-at-7"]},"rel-urls":{"http://example.com/tags/microformats":{"text":"microformats","rels":["tag"]},"http://example.com/tags/html":{"text":"html","rels":["tag"]},"http://microformats.org/2012/06/25/microformats-org-at-7":{"text":"microformats.org at 7","rels":["bookmark"]}}};
-
- it('simple', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 82eb37b958..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hnews-all.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hnews', function() {
- var htmlFragment = "<div class=\"hnews\">\n <div class=\"entry hentry\">\n <h1><a class=\"entry-title\" rel=\"bookmark\" href=\"http://microformats.org/2012/06/25/microformats-org-at-7\">microformats.org at 7</a></h1>\n <div class=\"entry-content\">\n <p class=\"entry-summary\">Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.</p>\n\n <p>The microformats tagline “humans first, machines second” \n forms the basis of many of our \n <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service </p>\n </div> \n <p>Updated \n <time class=\"updated\" datetime=\"2012-06-25T17:08:26\">June 25th, 2012</time> by\n <span class=\"author vcard\"><a class=\"fn url\" href=\"http://tantek.com/\">Tantek</a></span>\n </p>\n </div>\n\n <p>\n <span class=\"dateline vcard\">\n <span class=\"adr\">\n <span class=\"locality\">San Francisco</span>, \n <span class=\"region\">CA</span> \n </span>\n </span>\n (Geo: <span class=\"geo\">37.774921;-122.445202</span>) \n <span class=\"source-org vcard\">\n <a class=\"fn org url\" href=\"http://microformats.org/\">microformats.org</a>\n </span>\n </p>\n <p>\n <a rel=\"principles\" href=\"http://microformats.org/wiki/Category:public_domain_license\">Publishing policy</a>\n </p>\n</div>";
- var expected = {"items":[{"type":["h-news"],"properties":{"entry":[{"value":"microformats.org at 7","type":["h-entry"],"properties":{"name":["microformats.org at 7"],"url":["http://microformats.org/2012/06/25/microformats-org-at-7"],"content":[{"value":"Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.\n\n The microformats tagline “humans first, machines second” \n forms the basis of many of our \n principles, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service","html":"\n <p class=\"entry-summary\">Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.</p>\n\n <p>The microformats tagline “humans first, machines second” \n forms the basis of many of our \n <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service </p>\n "}],"summary":["Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities."],"updated":["2012-06-25 17:08:26"],"author":[{"value":"Tantek","type":["h-card"],"properties":{"name":["Tantek"],"url":["http://tantek.com/"]}}]}}],"dateline":[{"value":"San Francisco, \n CA","type":["h-card"],"properties":{"adr":[{"value":"San Francisco, \n CA","type":["h-adr"],"properties":{"locality":["San Francisco"],"region":["CA"]}}]}}],"geo":[{"value":"37.774921;-122.445202","type":["h-geo"],"properties":{"name":["37.774921;-122.445202"]}}],"source-org":[{"value":"microformats.org","type":["h-card"],"properties":{"name":["microformats.org"],"org":["microformats.org"],"url":["http://microformats.org/"]}}],"principles":["http://microformats.org/wiki/Category:public_domain_license"]}}],"rels":{"bookmark":["http://microformats.org/2012/06/25/microformats-org-at-7"],"principles":["http://microformats.org/wiki/Category:public_domain_license"]},"rel-urls":{"http://microformats.org/2012/06/25/microformats-org-at-7":{"text":"microformats.org at 7","rels":["bookmark"]},"http://microformats.org/wiki/Category:public_domain_license":{"text":"Publishing policy","rels":["principles"]}}};
-
- it('all', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 5faf13d7b8..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hnews-minimum.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hnews', function() {
- var htmlFragment = "<div class=\"hnews\">\n <div class=\"entry hentry\">\n <h1><a class=\"entry-title\" rel=\"bookmark\" href=\"http://microformats.org/2012/06/25/microformats-org-at-7\">microformats.org at 7</a></h1>\n <div class=\"entry-content\">\n <p class=\"entry-summary\">Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.</p>\n\n <p>The microformats tagline “humans first, machines second” \n forms the basis of many of our \n <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service </p>\n </div> \n <p>Updated \n <time class=\"updated\" datetime=\"2012-06-25T17:08:26\">June 25th, 2012</time> by\n <span class=\"author vcard\"><a class=\"fn url\" href=\"http://tantek.com/\">Tantek</a></span>\n </p>\n </div>\n\n <p class=\"source-org vcard\">\n <a class=\"fn org url\" href=\"http://microformats.org/\">microformats.org</a> \n </p>\n</div>";
- var expected = {"items":[{"type":["h-news"],"properties":{"entry":[{"value":"microformats.org at 7","type":["h-entry"],"properties":{"name":["microformats.org at 7"],"url":["http://microformats.org/2012/06/25/microformats-org-at-7"],"content":[{"value":"Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.\n\n The microformats tagline “humans first, machines second” \n forms the basis of many of our \n principles, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service","html":"\n <p class=\"entry-summary\">Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.</p>\n\n <p>The microformats tagline “humans first, machines second” \n forms the basis of many of our \n <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service </p>\n "}],"summary":["Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities."],"updated":["2012-06-25 17:08:26"],"author":[{"value":"Tantek","type":["h-card"],"properties":{"name":["Tantek"],"url":["http://tantek.com/"]}}]}}],"source-org":[{"value":"microformats.org","type":["h-card"],"properties":{"name":["microformats.org"],"org":["microformats.org"],"url":["http://microformats.org/"]}}]}}],"rels":{"bookmark":["http://microformats.org/2012/06/25/microformats-org-at-7"]},"rel-urls":{"http://microformats.org/2012/06/25/microformats-org-at-7":{"text":"microformats.org at 7","rels":["bookmark"]}}};
-
- it('minimum', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 7171bc7264..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hproduct-aggregate.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hproduct', function() {
- var htmlFragment = "<meta charset=\"utf-8\">\n<div class=\"hproduct\">\n <h2 class=\"fn\">Raspberry Pi</h2>\n <img class=\"photo\" src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/RaspberryPi.jpg/320px-RaspberryPi.jpg\" />\n <p class=\"description\">The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.</p>\n <a class=\"url\" href=\"http://www.raspberrypi.org/\">More info about the Raspberry Pi</a>\n <p class=\"price\">£29.95</p>\n <p class=\"review hreview-aggregate\">\n <span class=\"rating\">\n <span class=\"average value\">9.2</span> out of \n <span class=\"best\">10</span> \n based on <span class=\"count\">178</span> reviews\n </span>\n </p>\n <p>Categories: \n <a rel=\"tag\" href=\"http://en.wikipedia.org/wiki/computer\" class=\"category\">Computer</a>, \n <a rel=\"tag\" href=\"http://en.wikipedia.org/wiki/education\" class=\"category\">Education</a>\n </p>\n <p class=\"brand vcard\">From: \n <span class=\"fn org\">The Raspberry Pi Foundation</span> - \n <span class=\"adr\">\n <span class=\"locality\">Cambridge</span> \n <span class=\"country-name\">UK</span>\n </span>\n </p>\n</div>";
- var expected = {"items":[{"type":["h-product"],"properties":{"name":["Raspberry Pi"],"photo":["http://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/RaspberryPi.jpg/320px-RaspberryPi.jpg"],"description":[{"value":"The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.","html":"The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming."}],"url":["http://www.raspberrypi.org/"],"price":["£29.95"],"review":[{"value":"9.2 out of \n 10 \n based on 178 reviews","type":["h-review-aggregate"],"properties":{"rating":["9.2"],"average":["9.2"],"best":["10"],"count":["178"]}}],"category":["Computer","Education"],"brand":[{"value":"The Raspberry Pi Foundation","type":["h-card"],"properties":{"name":["The Raspberry Pi Foundation"],"org":["The Raspberry Pi Foundation"],"adr":[{"value":"Cambridge \n UK","type":["h-adr"],"properties":{"locality":["Cambridge"],"country-name":["UK"]}}]}}]}}],"rels":{"tag":["http://en.wikipedia.org/wiki/computer","http://en.wikipedia.org/wiki/education"]},"rel-urls":{"http://en.wikipedia.org/wiki/computer":{"text":"Computer","rels":["tag"]},"http://en.wikipedia.org/wiki/education":{"text":"Education","rels":["tag"]}}};
-
- it('aggregate', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 7ec61f27b5..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hproduct-simpleproperties.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hproduct', function() {
- var htmlFragment = "<meta charset=\"utf-8\">\n<div class=\"hproduct\">\n <h2 class=\"fn\">Raspberry Pi</h2>\n <img class=\"photo\" src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/RaspberryPi.jpg/320px-RaspberryPi.jpg\" />\n <p class=\"description\">The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.</p>\n <a class=\"url\" href=\"http://www.raspberrypi.org/\">More info about the Raspberry Pi</a>\n <p class=\"price\">£29.95</p>\n <p class=\"review hreview\"><span class=\"rating\">4.5</span> out of 5</p>\n <p>Categories: \n <a rel=\"tag\" href=\"http://en.wikipedia.org/wiki/computer\" class=\"category\">Computer</a>, \n <a rel=\"tag\" href=\"http://en.wikipedia.org/wiki/education\" class=\"category\">Education</a>\n </p>\n</div>";
- var expected = {"items":[{"type":["h-product"],"properties":{"name":["Raspberry Pi"],"photo":["http://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/RaspberryPi.jpg/320px-RaspberryPi.jpg"],"description":[{"value":"The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.","html":"The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming."}],"url":["http://www.raspberrypi.org/"],"price":["£29.95"],"category":["Computer","Education"],"review":[{"value":"4.5 out of 5","type":["h-review"],"properties":{"rating":["4.5"]}}]}}],"rels":{"tag":["http://en.wikipedia.org/wiki/computer","http://en.wikipedia.org/wiki/education"]},"rel-urls":{"http://en.wikipedia.org/wiki/computer":{"text":"Computer","rels":["tag"]},"http://en.wikipedia.org/wiki/education":{"text":"Education","rels":["tag"]}}};
-
- it('simpleproperties', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index d580d68dbb..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-affiliation.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hresume', function() {
- var htmlFragment = "<div class=\"hresume\">\n <p>\n <span class=\"contact vcard\"><span class=\"fn\">Tim Berners-Lee</span></span>, \n <span class=\"summary\">invented the World Wide Web</span>.\n </p>\n Belongs to following groups:\n <p> \n <a class=\"affiliation vcard\" href=\"http://www.w3.org/\">\n <img class=\"fn photo\" alt=\"W3C\" src=\"http://www.w3.org/Icons/WWW/w3c_home_nb.png\" />\n </a>\n </p> \n</div>";
- var expected = {"items":[{"type":["h-resume"],"properties":{"contact":[{"value":"Tim Berners-Lee","type":["h-card"],"properties":{"name":["Tim Berners-Lee"]}}],"summary":["invented the World Wide Web"],"affiliation":[{"type":["h-card"],"properties":{"name":["W3C"],"photo":["http://www.w3.org/Icons/WWW/w3c_home_nb.png"]}}]}}],"rels":{},"rel-urls":{}};
-
- it('affiliation', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 595087af44..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-contact.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hresume', function() {
- var htmlFragment = "<div class=\"hresume\">\n <div class=\"contact vcard\">\n <p class=\"fn\">Tim Berners-Lee</p>\n <p class=\"org\">MIT</p>\n <p class=\"adr\">\n <span class=\"street-address\">32 Vassar Street</span>, \n <span class=\"extended-address\">Room 32-G524</span>, \n <span class=\"locality\">Cambridge</span>, \n <span class=\"region\">MA</span> \n <span class=\"postal-code\">02139</span>, \n <span class=\"country-name\">USA</span>. \n (<span class=\"type\">Work</span>)\n </p>\n <p>Tel:<span class=\"tel\">+1 (617) 253 5702</span></p>\n <p>Email:<a class=\"email\" href=\"mailto:timbl@w3.org\">timbl@w3.org</a></p>\n </div>\n <p class=\"summary\">Invented the World Wide Web.</p>\n</div>";
- var expected = {"items":[{"type":["h-resume"],"properties":{"contact":[{"value":"Tim Berners-Lee","type":["h-card"],"properties":{"name":["Tim Berners-Lee"],"org":["MIT"],"adr":[{"value":"32 Vassar Street, \n Room 32-G524, \n Cambridge, \n MA \n 02139, \n USA. \n (Work)","type":["h-adr"],"properties":{"street-address":["32 Vassar Street"],"extended-address":["Room 32-G524"],"locality":["Cambridge"],"region":["MA"],"postal-code":["02139"],"country-name":["USA"]}}],"tel":["+1 (617) 253 5702"],"email":["mailto:timbl@w3.org"]}}],"summary":["Invented the World Wide Web."]}}],"rels":{},"rel-urls":{}};
-
- it('contact', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 7a0114f538..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-education.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hresume', function() {
- var htmlFragment = "<div class=\"hresume\">\n <div class=\"contact vcard\">\n <p class=\"fn\">Tim Berners-Lee</p>\n <p class=\"title\">Director of the World Wide Web Foundation</p>\n </div>\n <p class=\"summary\">Invented the World Wide Web.</p><hr />\n <p class=\"education vevent vcard\">\n <span class=\"fn summary org\">The Queen's College, Oxford University</span>, \n <span class=\"description\">BA Hons (I) Physics</span> \n <time class=\"dtstart\" datetime=\"1973-09\">1973</time> –\n <time class=\"dtend\" datetime=\"1976-06\">1976</time>\n </p>\n</div>";
- var expected = {"items":[{"type":["h-resume"],"properties":{"contact":[{"value":"Tim Berners-Lee","type":["h-card"],"properties":{"name":["Tim Berners-Lee"],"job-title":["Director of the World Wide Web Foundation"]}}],"summary":["Invented the World Wide Web."],"education":[{"value":"The Queen's College, Oxford University","type":["h-event","h-card"],"properties":{"name":["The Queen's College, Oxford University"],"org":["The Queen's College, Oxford University"],"description":["BA Hons (I) Physics"],"start":["1973-09"],"end":["1976-06"]}}]}}],"rels":{},"rel-urls":{}};
-
- it('education', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index b082567004..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-skill.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hresume', function() {
- var htmlFragment = "<div class=\"hresume\"> \n <p>\n <span class=\"contact vcard\"><span class=\"fn\">Tim Berners-Lee</span></span>, \n <span class=\"summary\">invented the World Wide Web</span>.\n </p>\n Skills: \n <ul>\n <li><a class=\"skill\" rel=\"tag\" href=\"http://example.com/skills/informationsystems\">information systems</a></li>\n <li><a class=\"skill\" rel=\"tag\" href=\"http://example.com/skills/advocacy\">advocacy</a></li>\n <li><a class=\"skill\" rel=\"tag\" href=\"http://example.com/skills/leadership\">leadership</a></li>\n </ul>\n</div>";
- var expected = {"items":[{"type":["h-resume"],"properties":{"contact":[{"value":"Tim Berners-Lee","type":["h-card"],"properties":{"name":["Tim Berners-Lee"]}}],"summary":["invented the World Wide Web"],"skill":["information systems","advocacy","leadership"]}}],"rels":{"tag":["http://example.com/skills/informationsystems","http://example.com/skills/advocacy","http://example.com/skills/leadership"]},"rel-urls":{"http://example.com/skills/informationsystems":{"text":"information systems","rels":["tag"]},"http://example.com/skills/advocacy":{"text":"advocacy","rels":["tag"]},"http://example.com/skills/leadership":{"text":"leadership","rels":["tag"]}}};
-
- it('skill', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 4ece3a3890..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hresume-work.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hresume', function() {
- var htmlFragment = "<meta charset=\"utf-8\">\n<div class=\"hresume\">\n <div class=\"contact vcard\">\n <p class=\"fn\">Tim Berners-Lee</p>\n <p class=\"title\">Director of the World Wide Web Foundation</p>\n </div>\n <p class=\"summary\">Invented the World Wide Web.</p><hr />\n <div class=\"experience vevent vcard\">\n <p class=\"title\">Director</p>\n <p><a class=\"fn summary org url\" href=\"http://www.webfoundation.org/\">World Wide Web Foundation</a></p>\n <p>\n <time class=\"dtstart\" datetime=\"2009-01-18\">Jan 2009</time> – Present\n <time class=\"duration\" datetime=\"P2Y11M\">(2 years 11 month)</time>\n </p>\n </div>\n</div>";
- var expected = {"items":[{"type":["h-resume"],"properties":{"contact":[{"value":"Tim Berners-Lee","type":["h-card"],"properties":{"name":["Tim Berners-Lee"],"job-title":["Director of the World Wide Web Foundation"]}}],"summary":["Invented the World Wide Web."],"experience":[{"value":"World Wide Web Foundation","type":["h-event","h-card"],"properties":{"job-title":["Director"],"name":["World Wide Web Foundation"],"org":["World Wide Web Foundation"],"url":["http://www.webfoundation.org/"],"start":["2009-01-18"],"duration":["P2Y11M"]}}]}}],"rels":{},"rel-urls":{}};
-
- it('work', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 6cdf65484f..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-aggregate-hcard.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hreview-aggregate', function() {
- var htmlFragment = "<div class=\"hreview-aggregate\">\n <div class=\"item vcard\">\n <h3 class=\"fn org\">Mediterranean Wraps</h3> \n <p>\n <span class=\"adr\">\n <span class=\"street-address\">433 S California Ave</span>, \n <span class=\"locality\">Palo Alto</span>, \n <span class=\"region\">CA</span></span> - \n \n <span class=\"tel\">(650) 321-8189</span>\n </p>\n </div> \n <p class=\"rating\">\n <span class=\"average value\">9.2</span> out of \n <span class=\"best\">10</span> \n based on <span class=\"count\">17</span> reviews\n </p>\n</div>";
- var expected = {"items":[{"type":["h-review-aggregate"],"properties":{"item":[{"value":"Mediterranean Wraps","type":["h-item","h-card"],"properties":{"name":["Mediterranean Wraps"],"org":["Mediterranean Wraps"],"adr":[{"value":"433 S California Ave, \n Palo Alto, \n CA","type":["h-adr"],"properties":{"street-address":["433 S California Ave"],"locality":["Palo Alto"],"region":["CA"]}}],"tel":["(650) 321-8189"]}}],"rating":["9.2"],"average":["9.2"],"best":["10"],"count":["17"]}}],"rels":{},"rel-urls":{}};
-
- it('hcard', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 56d106fdbf..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-aggregate-justahyperlink.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hreview-aggregate', function() {
- var htmlFragment = "<p class=\"hreview-aggregate\">\n <span class=\"item\">\n <a class=\"fn url\" href=\"http://example.com/mediterraneanwraps\">Mediterranean Wraps</a>\n </span> - Rated: \n <span class=\"rating\">4.5</span> out of 5 (<span class=\"count\">6</span> reviews)\n</p>";
- var expected = {"items":[{"type":["h-review-aggregate"],"properties":{"item":[{"value":"Mediterranean Wraps","type":["h-item"],"properties":{"name":["Mediterranean Wraps"],"url":["http://example.com/mediterraneanwraps"]}}],"rating":["4.5"],"count":["6"]}}],"rels":{},"rel-urls":{}};
-
- it('justahyperlink', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 896bbdc1d3..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-aggregate-vevent.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hreview-aggregate', function() {
- var htmlFragment = "<div class=\"hreview-aggregate\">\n <div class=\"item vevent\">\n <h3 class=\"summary\">Fullfrontal</h3>\n <p class=\"description\">A one day JavaScript Conference held in Brighton</p>\n <p><time class=\"dtstart\" datetime=\"2012-11-09\">9th November 2012</time></p> \n </div> \n \n <p class=\"rating\">\n <span class=\"average value\">9.9</span> out of \n <span class=\"best\">10</span> \n based on <span class=\"count\">62</span> reviews\n </p>\n</div>";
- var expected = {"items":[{"type":["h-review-aggregate"],"properties":{"item":[{"value":"Fullfrontal","type":["h-item","h-event"],"properties":{"name":["Fullfrontal"],"description":["A one day JavaScript Conference held in Brighton"],"start":["2012-11-09"]}}],"rating":["9.9"],"average":["9.9"],"best":["10"],"count":["62"]}}],"rels":{},"rel-urls":{}};
-
- it('vevent', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 4a00ac46a1..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-item.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hreview', function() {
- var htmlFragment = "<base href=\"http://example.com\">\n<div class=\"hreview\">\n <p class=\"item\">\n <img class=\"photo\" src=\"images/photo.gif\" />\n <a class=\"fn url\" href=\"http://example.com/crepeoncole\">Crepes on Cole</a>\n </p>\n <p><span class=\"rating\">5</span> out of 5 stars</p>\n</div>";
- var expected = {"items":[{"type":["h-review"],"properties":{"item":[{"value":"Crepes on Cole","type":["h-item"],"properties":{"photo":["http://example.com/images/photo.gif"],"name":["Crepes on Cole"],"url":["http://example.com/crepeoncole"]}}],"rating":["5"]}}],"rels":{},"rel-urls":{}};
-
- it('item', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index d59decb7fa..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-hreview-vcard.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('hreview', function() {
- var htmlFragment = "<div class=\"hreview\">\n <span><span class=\"rating\">5</span> out of 5 stars</span>\n <h4 class=\"summary\">Crepes on Cole is awesome</h4>\n <span class=\"reviewer vcard\">\n Reviewer: <span class=\"fn\">Tantek</span> - \n </span>\n <time class=\"reviewed\" datetime=\"2005-04-18\">April 18, 2005</time>\n <div class=\"description\">\n <p class=\"item vcard\">\n <span class=\"fn org\">Crepes on Cole</span> is one of the best little \n creperies in <span class=\"adr\"><span class=\"locality\">San Francisco</span></span>.\n Excellent food and service. Plenty of tables in a variety of sizes \n for parties large and small. Window seating makes for excellent \n people watching to/from the N-Judah which stops right outside. \n I've had many fun social gatherings here, as well as gotten \n plenty of work done thanks to neighborhood WiFi.\n </p>\n </div>\n <p>Visit date: <span>April 2005</span></p>\n <p>Food eaten: <a rel=\"tag\" href=\"http://en.wikipedia.org/wiki/crepe\">crepe</a></p>\n <p>Permanent link for review: <a rel=\"self bookmark\" href=\"http://example.com/crepe\">http://example.com/crepe</a></p>\n <p><a rel=\"license\" href=\"http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License\">Creative Commons Attribution-ShareAlike License</a></p>\n</div>";
- var expected = {"items":[{"type":["h-review"],"properties":{"rating":["5"],"name":["Crepes on Cole is awesome"],"reviewer":[{"value":"Tantek","type":["h-card"],"properties":{"name":["Tantek"]}}],"description":[{"value":"Crepes on Cole is one of the best little \n creperies in San Francisco.\n Excellent food and service. Plenty of tables in a variety of sizes \n for parties large and small. Window seating makes for excellent \n people watching to/from the N-Judah which stops right outside. \n I've had many fun social gatherings here, as well as gotten \n plenty of work done thanks to neighborhood WiFi.","html":"\n <p class=\"item vcard\">\n <span class=\"fn org\">Crepes on Cole</span> is one of the best little \n creperies in <span class=\"adr\"><span class=\"locality\">San Francisco</span></span>.\n Excellent food and service. Plenty of tables in a variety of sizes \n for parties large and small. Window seating makes for excellent \n people watching to/from the N-Judah which stops right outside. \n I've had many fun social gatherings here, as well as gotten \n plenty of work done thanks to neighborhood WiFi.\n </p>\n "}],"item":[{"value":"Crepes on Cole","type":["h-item","h-card"],"properties":{"name":["Crepes on Cole"],"org":["Crepes on Cole"],"adr":[{"value":"San Francisco","type":["h-adr"],"properties":{"locality":["San Francisco"]}}]}}],"category":["crepe"],"url":["http://example.com/crepe"]}}],"rels":{"tag":["http://en.wikipedia.org/wiki/crepe"],"self":["http://example.com/crepe"],"bookmark":["http://example.com/crepe"],"license":["http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License"]},"rel-urls":{"http://en.wikipedia.org/wiki/crepe":{"text":"crepe","rels":["tag"]},"http://example.com/crepe":{"text":"http://example.com/crepe","rels":["self","bookmark"]},"http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License":{"text":"Creative Commons Attribution-ShareAlike License","rels":["license"]}}};
-
- it('vcard', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 5ffa373d75..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-includes-hcarditemref.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('includes', function() {
- var htmlFragment = "<div class=\"vcard\" itemref=\"mozilla-org mozilla-adr\">\n <span class=\"name\">Brendan Eich</span>\n</div>\n<div class=\"vcard\" itemref=\"mozilla-org mozilla-adr\">\n <span class=\"name\">Mitchell Baker</span>\n</div>\n\n<p id=\"mozilla-org\" class=\"org\">Mozilla</p>\n<p id=\"mozilla-adr\" class=\"adr\">\n <span class=\"street-address\">665 3rd St.</span> \n <span class=\"extended-address\">Suite 207</span> \n <span class=\"locality\">San Francisco</span>, \n <span class=\"region\">CA</span> \n <span class=\"postal-code\">94107</span> \n <span class=\"country-name\">U.S.A.</span> \n</p>";
- var expected = {"items":[{"type":["h-card"],"properties":{"org":["Mozilla"],"adr":[{"value":"665 3rd St. \n Suite 207 \n San Francisco, \n CA \n 94107 \n U.S.A.","type":["h-adr"],"properties":{"street-address":["665 3rd St."],"extended-address":["Suite 207"],"locality":["San Francisco"],"region":["CA"],"postal-code":["94107"],"country-name":["U.S.A."]}}]}},{"type":["h-card"],"properties":{"org":["Mozilla"],"adr":[{"value":"665 3rd St. \n Suite 207 \n San Francisco, \n CA \n 94107 \n U.S.A.","type":["h-adr"],"properties":{"street-address":["665 3rd St."],"extended-address":["Suite 207"],"locality":["San Francisco"],"region":["CA"],"postal-code":["94107"],"country-name":["U.S.A."]}}]}},{"type":["h-adr"],"properties":{"street-address":["665 3rd St."],"extended-address":["Suite 207"],"locality":["San Francisco"],"region":["CA"],"postal-code":["94107"],"country-name":["U.S.A."]}}],"rels":{},"rel-urls":{}};
-
- it('hcarditemref', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index b3a16025bb..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-includes-heventitemref.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('includes', function() {
- var htmlFragment = "<div class=\"vevent\" itemref=\"io-session07\">\n <span class=\"name\">Monetizing Android Apps</span> - spaekers: \n <span class=\"speaker\">Chrix Finne</span>, \n <span class=\"speaker\">Kenneth Lui</span> - \n <span itemref=\"io-location\" class=\"location adr\">\n <span class=\"extended-address\">Room 10</span>\n </span> \n</div>\n<div class=\"vevent\" itemref=\"io-session07\">\n <span class=\"name\">New Low-Level Media APIs in Android</span> - spaekers: \n <span class=\"speaker\">Dave Burke</span> -\n <span itemref=\"io-location\" class=\"location adr\">\n <span class=\"extended-address\">Room 11</span>\n </span> \n</div>\n\n<p id=\"io-session07\">\n Session 01 is between: \n <time class=\"dtstart\" datetime=\"2012-06-27T15:45:00-0800\">3:45PM</time> to \n <time class=\"dtend\" datetime=\"2012-06-27T16:45:00-0800\">4:45PM</time> \n</p> \n<p id=\"io-location\">\n <span class=\"extended-address\">Moscone Center</span>, \n <span class=\"locality\">San Francisco</span> \n</p>";
- var expected = {"items":[{"type":["h-event"],"properties":{"location":[{"value":"Room 10\n \n Moscone Center, \n San Francisco","type":["h-adr"],"properties":{"extended-address":["Room 10","Moscone Center"],"locality":["San Francisco"]}}],"start":["2012-06-27 15:45:00-08:00"],"end":["2012-06-27 16:45:00-08:00"]}},{"type":["h-event"],"properties":{"location":[{"value":"Room 11\n \n Moscone Center, \n San Francisco","type":["h-adr"],"properties":{"extended-address":["Room 11","Moscone Center"],"locality":["San Francisco"]}}],"start":["2012-06-27 15:45:00-08:00"],"end":["2012-06-27 16:45:00-08:00"]}}],"rels":{},"rel-urls":{}};
-
- it('heventitemref', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 3a789bb1ba..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-includes-hyperlink.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('includes', function() {
- var htmlFragment = "<div class=\"vcard\">\n <span class=\"name\">Ben Ward</span>\n <a class=\"include\" href=\"#twitter\">Twitter</a>\n</div>\n<div class=\"vcard\">\n <span class=\"name\">Dan Webb</span>\n <a class=\"include\" href=\"#twitter\">Twitter</a>\n</div>\n\n<div id=\"twitter\">\n <p class=\"org\">Twitter</p>\n <p class=\"adr\">\n <span class=\"street-address\">1355 Market St</span>,\n <span class=\"locality\">San Francisco</span>, \n <span class=\"region\">CA</span>\n <span class=\"postal-code\">94103</span>\n </p>\n</div>";
- var expected = {"items":[{"type":["h-card"],"properties":{"org":["Twitter"],"adr":[{"value":"1355 Market St,\n San Francisco, \n CA\n 94103","type":["h-adr"],"properties":{"street-address":["1355 Market St"],"locality":["San Francisco"],"region":["CA"],"postal-code":["94103"]}}]}},{"type":["h-card"],"properties":{"org":["Twitter"],"adr":[{"value":"1355 Market St,\n San Francisco, \n CA\n 94103","type":["h-adr"],"properties":{"street-address":["1355 Market St"],"locality":["San Francisco"],"region":["CA"],"postal-code":["94103"]}}]}},{"type":["h-adr"],"properties":{"street-address":["1355 Market St"],"locality":["San Francisco"],"region":["CA"],"postal-code":["94103"]}}],"rels":{},"rel-urls":{}};
-
- it('hyperlink', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 3bc15bd459..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-includes-object.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('includes', function() {
- var htmlFragment = "<div class=\"vevent\">\n <span class=\"name\">HTML5 & CSS3 latest features in action!</span> - \n <span class=\"speaker\">David Rousset</span> -\n <time class=\"dtstart\" datetime=\"2012-10-30T11:45:00-08:00\">Tue 11:45am</time>\n <object data=\"#buildconf\" class=\"include\" type=\"text/html\" height=\"0\" width=\"0\"></object>\n</div>\n<div class=\"vevent\">\n <span class=\"name\">Building High-Performing JavaScript for Modern Engines</span> -\n <span class=\"speaker\">John-David Dalton</span> and \n <span class=\"speaker\">Amanda Silver</span> -\n <time class=\"dtstart\" datetime=\"2012-10-31T11:15:00-08:00\">Wed 11:15am</time>\n <object data=\"#buildconf\" class=\"include\" type=\"text/html\" height=\"0\" width=\"0\"></object>\n</div>\n\n\n<div id=\"buildconf\">\n <p class=\"summary\">Build Conference</p>\n <p class=\"location adr\">\n <span class=\"locality\">Redmond</span>, \n <span class=\"region\">Washington</span>, \n <span class=\"country-name\">USA</span>\n </p>\n</div>";
- var expected = {"items":[{"type":["h-event"],"properties":{"start":["2012-10-30 11:45:00-08:00"],"name":["Build Conference"],"location":[{"value":"Redmond, \n Washington, \n USA","type":["h-adr"],"properties":{"locality":["Redmond"],"region":["Washington"],"country-name":["USA"]}}]}},{"type":["h-event"],"properties":{"start":["2012-10-31 11:15:00-08:00"],"name":["Build Conference"],"location":[{"value":"Redmond, \n Washington, \n USA","type":["h-adr"],"properties":{"locality":["Redmond"],"region":["Washington"],"country-name":["USA"]}}]}},{"type":["h-adr"],"properties":{"locality":["Redmond"],"region":["Washington"],"country-name":["USA"]}}],"rels":{},"rel-urls":{}};
-
- it('object', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index a0d3ef55c1..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v1-includes-table.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('includes', function() {
- var htmlFragment = "<meta charset=\"utf-8\">\n<table>\n <tr>\n <th id=\"org\"><a class=\"url org\" href=\"http://dev.opera.com/\">Opera</a></th>\n </tr>\n <tr>\n <td class=\"vcard\" headers=\"org\"><span class=\"fn\">Chris Mills</span></td>\n </tr>\n <tr>\n <td class=\"vcard\" headers=\"org\"><span class=\"fn\">Erik Möller</span></td>\n </tr>\n </table>";
- var expected = {"items":[{"type":["h-card"],"properties":{"name":["Chris Mills"],"url":["http://dev.opera.com/"],"org":["Opera"]}},{"type":["h-card"],"properties":{"name":["Erik Möller"],"url":["http://dev.opera.com/"],"org":["Opera"]}}],"rels":{},"rel-urls":{}};
-
- it('table', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 8ed7d747d4..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-geo.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-adr', function() {
- var htmlFragment = "<p class=\"h-adr\">\n <span class=\"p-name\">Bricklayer's Arms</span>\n <span class=\"p-label\"> \n <span class=\"p-street-address\">3 Charlotte Road</span>, \n <span class=\"p-locality\">City of London</span>, \n <span class=\"p-postal-code\">EC2A 3PE</span>, \n <span class=\"p-country-name\">UK</span> \n </span> – \n Geo:(<span class=\"p-geo\">51.526421;-0.081067</span>) \n</p>";
- var expected = {"items":[{"type":["h-adr"],"properties":{"name":["Bricklayer's Arms"],"label":["3 Charlotte Road, \n City of London, \n EC2A 3PE, \n UK"],"street-address":["3 Charlotte Road"],"locality":["City of London"],"postal-code":["EC2A 3PE"],"country-name":["UK"],"geo":["51.526421;-0.081067"]}}],"rels":{},"rel-urls":{}};
-
- it('geo', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index b97e76f60a..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-geourl.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-adr', function() {
- var htmlFragment = "<p class=\"h-adr\">\n <a class=\"p-name u-geo\" href=\"geo:51.526421;-0.081067;crs=wgs84;u=40\">Bricklayer's Arms</a>, \n <span class=\"p-locality\">London</span> \n</p>";
- var expected = {"items":[{"type":["h-adr"],"properties":{"name":["Bricklayer's Arms"],"geo":["geo:51.526421;-0.081067;crs=wgs84;u=40"],"locality":["London"],"url":["geo:51.526421;-0.081067;crs=wgs84;u=40"]}}],"rels":{},"rel-urls":{}};
-
- it('geourl', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index c943fbafce..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-justaname.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-adr', function() {
- var htmlFragment = "<p class=\"h-adr\">665 3rd St. Suite 207 San Francisco, CA 94107 U.S.A.</p>";
- var expected = {"items":[{"type":["h-adr"],"properties":{"name":["665 3rd St. Suite 207 San Francisco, CA 94107 U.S.A."]}}],"rels":{},"rel-urls":{}};
-
- it('justaname', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 084dac4405..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-adr-simpleproperties.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-adr', function() {
- var htmlFragment = "<p class=\"h-adr\">\n <span class=\"p-street-address\">665 3rd St.</span> \n <span class=\"p-extended-address\">Suite 207</span> \n <span class=\"p-locality\">San Francisco</span>, \n <span class=\"p-region\">CA</span> \n <span class=\"p-postal-code\">94107</span> \n <span class=\"p-country-name\">U.S.A.</span> \n</p>";
- var expected = {"items":[{"type":["h-adr"],"properties":{"street-address":["665 3rd St."],"extended-address":["Suite 207"],"locality":["San Francisco"],"region":["CA"],"postal-code":["94107"],"country-name":["U.S.A."],"name":["665 3rd St. \n Suite 207 \n San Francisco, \n CA \n 94107 \n U.S.A."]}}],"rels":{},"rel-urls":{}};
-
- it('simpleproperties', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 7e0ac260c4..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-as-note-note.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-as-note', function() {
- var htmlFragment = "<!-- http://tantek.com/2015/152/t2/proud-withknown-indieweb-user-empathy -->\n<base href=\"http://tantek.com/\" />\n\n<li class=\"h-entry hentry h-as-note\">\n <div>\n <ul>\n <li>\n <a href=\"152/t1/congrats-fellow-elected-w3cab-members\" id=\"previtem\" title=\"View the previous (older) item in the stream.\"\n rel=\"prev\"><abbr title=\"Previous\">←</abbr></a>\n </li>\n <li>\n <a href=\"152/t3/going-indiewebcamp-2015-portland\" id=\"nextitem\" title=\"View the next (newer) item in the stream\" rel=\"next\"><abbr title=\"Next\">→</abbr></a>\n </li>\n </ul>\n </div>\n <div>In reply to:\n <p>\n <a class=\"u-in-reply-to h-cite\" rel=\"in-reply-to\" href=\"http://werd.io/2015/im-super-proud-of-everything-weve-done-on-withknown-so-far\">http://werd.io/2015/im-super-proud-of-everything-weve-done-on-withknown-so-far</a>\n </p>\n <p>\n <a class=\"u-in-reply-to h-cite\" rel=\"in-reply-to\" href=\"https://twitter.com/benwerd/status/604733231284383744\">https://twitter.com/benwerd/status/604733231284383744</a>\n </p>\n <hr>\n </div>\n <a href=\"../\" class=\"p-author h-card\" rel=\"author\" title=\"Tantek Çelik\"><img src=\"/images/photo.gif\" alt=\"Tantek Çelik\"></a>\n <p class=\"p-name entry-title e-content entry-content article\">\n <a class=\"auto-link h-x-username\" href=\"https://twitter.com/benwerd\">@benwerd</a>\n <a class=\"auto-link h-x-username\" href=\"https://twitter.com/erinjo\">@erinjo</a>also proud of you &amp;\n <a class=\"auto-link h-x-username\" href=\"https://twitter.com/withknown\">@withknown</a>— so much #indieweb &amp; especially user empathy. Keep up the great work!</p>\n <span>\n <span class=\"dt-published published dt-updated updated\">\n <time class=\"value\" datetime=\"22:20-0700\">22:20</time>on\n <time class=\"value\">2015-06-01</time>\n </span>\n <span class=\"lt\">(ttk.me t4bT2)</span>using\n <span class=\"using\">BBEdit</span>\n </span>\n <div>\n <form action=\"http://tantek.com/2015/152/t2/proud-withknown-indieweb-user-empathy\">\n <div>\n <label>\n <span class=\"lt\">URL:</span>\n <input class=\"u-url url u-uid uid bookmark\" type=\"url\" size=\"70\" style=\"max-width:100%\" value=\"http://tantek.com/2015/152/t2/proud-withknown-indieweb-user-empathy\">\n </label>\n </div>\n </form>\n </div>\n <div>\n <a class=\"u-syndication\" rel=\"syndication\" style=\"float:right;\" href=\"https://twitter.com/t/status/605604965566906369\">\n <img src=\"/images/photo.gif\" style=\"vertical-align:-30%\" alt=\"\"> \n View \n Conversation\n on Twitter\n</a>\n </div>\n</li>";
- var expected = {"items":[{"type":["h-entry","h-as-note"],"properties":{"in-reply-to":[{"value":"http://werd.io/2015/im-super-proud-of-everything-weve-done-on-withknown-so-far","type":["h-cite"],"properties":{"name":["http://werd.io/2015/im-super-proud-of-everything-weve-done-on-withknown-so-far"],"url":["http://werd.io/2015/im-super-proud-of-everything-weve-done-on-withknown-so-far"]}},{"value":"https://twitter.com/benwerd/status/604733231284383744","type":["h-cite"],"properties":{"name":["https://twitter.com/benwerd/status/604733231284383744"],"url":["https://twitter.com/benwerd/status/604733231284383744"]}}],"author":[{"type":["h-card"],"properties":{"name":["Tantek Çelik"],"photo":["http://tantek.com/images/photo.gif"],"url":["http://tantek.com/"]}}],"name":["@benwerd\n @erinjoalso proud of you &\n @withknown— so much #indieweb & especially user empathy. Keep up the great work!"],"content":[{"value":"@benwerd\n @erinjoalso proud of you &\n @withknown— so much #indieweb & especially user empathy. Keep up the great work!","html":"\n <a class=\"auto-link h-x-username\" href=\"https://twitter.com/benwerd\">@benwerd</a>\n <a class=\"auto-link h-x-username\" href=\"https://twitter.com/erinjo\">@erinjo</a>also proud of you &\n <a class=\"auto-link h-x-username\" href=\"https://twitter.com/withknown\">@withknown</a>— so much #indieweb & especially user empathy. Keep up the great work!"}],"published":["2015-06-01 22:20-07:00"],"updated":["2015-06-01 22:20-07:00"],"url":["http://tantek.com/2015/152/t2/proud-withknown-indieweb-user-empathy"],"uid":["http://tantek.com/2015/152/t2/proud-withknown-indieweb-user-empathy"],"syndication":["https://twitter.com/t/status/605604965566906369"]},"children":[{"value":"@benwerd","type":["h-x-username"],"properties":{"name":["@benwerd"],"url":["https://twitter.com/benwerd"]}},{"value":"@erinjo","type":["h-x-username"],"properties":{"name":["@erinjo"],"url":["https://twitter.com/erinjo"]}},{"value":"@withknown","type":["h-x-username"],"properties":{"name":["@withknown"],"url":["https://twitter.com/withknown"]}}]}],"rels":{"prev":["http://tantek.com/152/t1/congrats-fellow-elected-w3cab-members"],"next":["http://tantek.com/152/t3/going-indiewebcamp-2015-portland"],"in-reply-to":["http://werd.io/2015/im-super-proud-of-everything-weve-done-on-withknown-so-far","https://twitter.com/benwerd/status/604733231284383744"],"author":["http://tantek.com/"],"syndication":["https://twitter.com/t/status/605604965566906369"]},"rel-urls":{"http://tantek.com/152/t1/congrats-fellow-elected-w3cab-members":{"title":"View the previous (older) item in the stream.","text":"←","rels":["prev"]},"http://tantek.com/152/t3/going-indiewebcamp-2015-portland":{"title":"View the next (newer) item in the stream","text":"→","rels":["next"]},"http://werd.io/2015/im-super-proud-of-everything-weve-done-on-withknown-so-far":{"text":"http://werd.io/2015/im-super-proud-of-everything-weve-done-on-withknown-so-far","rels":["in-reply-to"]},"https://twitter.com/benwerd/status/604733231284383744":{"text":"https://twitter.com/benwerd/status/604733231284383744","rels":["in-reply-to"]},"http://tantek.com/":{"title":"Tantek Çelik","rels":["author"]},"https://twitter.com/t/status/605604965566906369":{"text":"View \n Conversation\n on Twitter","rels":["syndication"]}}};
-
- it('note', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index d098db3926..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-baseurl.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-card', function() {
- var htmlFragment = "<base href=\"http://example.org\"/>\n<div class=\"h-card\">\n <a class=\"p-name u-url\" href=\"http://blog.lizardwrangler.com/\">Mitchell Baker</a> \n (<a class=\"p-org h-card\" href=\"bios/mitchell-baker/\">Mozilla Foundation</a>)\n <img class=\"u-photo\" src=\"images/photo.gif\"/>\n</div>";
- var expected = {"items":[{"type":["h-card"],"properties":{"name":["Mitchell Baker"],"url":["http://blog.lizardwrangler.com/"],"org":[{"value":"Mozilla Foundation","type":["h-card"],"properties":{"name":["Mozilla Foundation"],"url":["http://example.org/bios/mitchell-baker/"]}}],"photo":["http://example.org/images/photo.gif"]}}],"rels":{},"rel-urls":{}};
-
- it('baseurl', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 3ab1fa8ca6..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-childimplied.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-card', function() {
- var htmlFragment = "<meta charset=\"utf-8\">\n<a class=\"h-card\" href=\"http://people.opera.com/howcome/\" title=\"Håkon Wium Lie, CTO Opera\">\n <article>\n <h2 class=\"p-name\">Håkon Wium Lie</h2>\n <img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/96/H%C3%A5kon-Wium-Lie-2009-03.jpg/215px-H%C3%A5kon-Wium-Lie-2009-03.jpg\" />\n </article>\n</a>";
- var expected = {"items":[{"type":["h-card"],"properties":{"name":["Håkon Wium Lie"],"photo":["http://upload.wikimedia.org/wikipedia/commons/thumb/9/96/H%C3%A5kon-Wium-Lie-2009-03.jpg/215px-H%C3%A5kon-Wium-Lie-2009-03.jpg"],"url":["http://people.opera.com/howcome/"]}}],"rels":{},"rel-urls":{}};
-
- it('childimplied', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 8ee35b022b..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-extendeddescription.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-card', function() {
- var htmlFragment = "<div class=\"h-card\">\n <img class=\"u-photo\" alt=\"photo of Mitchell\" src=\"http://blog.mozilla.org/press/files/2012/04/mitchell-baker.jpg\" />\n <p>\n <a class=\"p-name u-url\" href=\"http://blog.lizardwrangler.com/\">Mitchell Baker</a>\n (<a class=\"u-url\" href=\"https://twitter.com/MitchellBaker\">@MitchellBaker</a>)\n <span class=\"p-org\">Mozilla Foundation</span>\n </p>\n <p class=\"p-note\">Mitchell is responsible for setting the direction and scope of the Mozilla Foundation and its activities.</p>\n <p><span class=\"p-category\">Strategy</span> and <span class=\"p-category\">Leadership</span></p>\n</div>";
- var expected = {"items":[{"type":["h-card"],"properties":{"photo":["http://blog.mozilla.org/press/files/2012/04/mitchell-baker.jpg"],"url":["http://blog.lizardwrangler.com/","https://twitter.com/MitchellBaker"],"name":["Mitchell Baker"],"org":["Mozilla Foundation"],"note":["Mitchell is responsible for setting the direction and scope of the Mozilla Foundation and its activities."],"category":["Strategy","Leadership"]}}],"rels":{},"rel-urls":{}};
-
- it('extendeddescription', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 9613816109..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-hcard.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-card', function() {
- var htmlFragment = "<div class=\"h-card\">\n <a class=\"p-name u-url\" href=\"http://blog.lizardwrangler.com/\">Mitchell Baker</a> \n (<a class=\"p-org h-card\" href=\"http://mozilla.org/\">Mozilla Foundation</a>)\n</div>";
- var expected = {"items":[{"type":["h-card"],"properties":{"url":["http://blog.lizardwrangler.com/"],"name":["Mitchell Baker"],"org":[{"value":"Mozilla Foundation","type":["h-card"],"properties":{"name":["Mozilla Foundation"],"url":["http://mozilla.org/"]}}]}}],"rels":{},"rel-urls":{}};
-
- it('hcard', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index bc6329ae62..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-horghcard.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-card', function() {
- var htmlFragment = "<div class=\"h-card\">\n <a class=\"p-name u-url\" href=\"http://blog.lizardwrangler.com/\">Mitchell Baker</a> \n (<a class=\"p-org h-card h-org\" href=\"http://mozilla.org/\">Mozilla Foundation</a>)\n</div>";
- var expected = {"items":[{"type":["h-card"],"properties":{"name":["Mitchell Baker"],"url":["http://blog.lizardwrangler.com/"],"org":[{"value":"Mozilla Foundation","type":["h-card","h-org"],"properties":{"name":["Mozilla Foundation"],"url":["http://mozilla.org/"]}}]}}],"rels":{},"rel-urls":{}};
-
- it('horghcard', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 70febcb844..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-hyperlinkedphoto.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-card', function() {
- var htmlFragment = "<a class=\"h-card\" href=\"http://rohit.khare.org/\">\n <img alt=\"Rohit Khare\" src=\"images/photo.gif\" />\n </a>";
- var expected = {"items":[{"type":["h-card"],"properties":{"name":["Rohit Khare"],"photo":["http://example.com/images/photo.gif"],"url":["http://rohit.khare.org/"]}}],"rels":{},"rel-urls":{}};
-
- it('hyperlinkedphoto', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index bcf45aecb6..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-impliedname.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-card', function() {
- var htmlFragment = "\n<img class=\"h-card\" src=\"jane.html\" alt=\"Jane Doe\"/>\n<area class=\"h-card\" href=\"jane.html\" alt=\"Jane Doe\"></area>\n<abbr class=\"h-card\" title=\"Jane Doe\">JD</abbr>\n\n<div class=\"h-card\"><img src=\"jane.html\" alt=\"Jane Doe\"/></div>\n<div class=\"h-card\"><area href=\"jane.html\" alt=\"Jane Doe\"></area></div>\n<div class=\"h-card\"><abbr title=\"Jane Doe\">JD</abbr></div>\n\n<div class=\"h-card\"><span><img src=\"jane.html\" alt=\"Jane Doe\"/></span></div>\n<div class=\"h-card\"><span><area href=\"jane.html\" alt=\"Jane Doe\"></area></span></div>\n<div class=\"h-card\"><span><abbr title=\"Jane Doe\">JD</abbr></span></div>\n\n<div class=\"h-card\"><img class=\"h-card\" src=\"john.html\" alt=\"John Doe\"/>Name</div>\n<div class=\"h-card\"><span class=\"h-card\"><img src=\"john.html\" alt=\"John Doe\"/>Name</span></div>\n";
- var expected = {"items":[{"type":["h-card"],"properties":{"name":["Jane Doe"],"photo":["http://example.com/jane.html"]}},{"type":["h-card"],"properties":{"name":["Jane Doe"],"url":["http://example.com/jane.html"]}},{"type":["h-card"],"properties":{"name":["Jane Doe"]}},{"type":["h-card"],"properties":{"name":["Jane Doe"],"photo":["http://example.com/jane.html"]}},{"type":["h-card"],"properties":{"name":["Jane Doe"],"url":["http://example.com/jane.html"]}},{"type":["h-card"],"properties":{"name":["Jane Doe"]}},{"type":["h-card"],"properties":{"name":["Jane Doe"],"photo":["http://example.com/jane.html"]}},{"type":["h-card"],"properties":{"name":["Jane Doe"],"url":["http://example.com/jane.html"]}},{"type":["h-card"],"properties":{"name":["Jane Doe"]}},{"type":["h-card"],"properties":{"name":["Name"]},"children":[{"type":["h-card"],"properties":{"name":["John Doe"],"photo":["http://example.com/john.html"]}}]},{"type":["h-card"],"properties":{"name":["Name"]},"children":[{"value":"Name","type":["h-card"],"properties":{"name":["John Doe"],"photo":["http://example.com/john.html"]}}]}],"rels":{},"rel-urls":{}};
-
- it('impliedname', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 3248a1d0fc..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-impliedphoto.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-card', function() {
- var htmlFragment = "<img class=\"h-card\" alt=\"Jane Doe\" src=\"jane.jpeg\"/>\n<object class=\"h-card\" data=\"jane.jpeg\"/>Jane Doe</object>\n\n<div class=\"h-card\"><img alt=\"Jane Doe\" src=\"jane.jpeg\"/></div> \n<div class=\"h-card\"><object data=\"jane.jpeg\"/>Jane Doe</object></div> \n\n<div class=\"h-card\"><span><img alt=\"Jane Doe\" src=\"jane.jpeg\"/></span></div> \n<div class=\"h-card\"><span><object data=\"jane.jpeg\"/>Jane Doe</object></span></div> \n\n<div class=\"h-card\"><img class=\"h-card\" alt=\"Jane Doe\" src=\"jane.jpeg\"/>Jane Doe</div> \n<div class=\"h-card\"><span class=\"h-card\"><object data=\"jane.jpeg\"/>Jane Doe</object></span></div> ";
- var expected = {"items":[{"type":["h-card"],"properties":{"name":["Jane Doe"],"photo":["http://example.com/jane.jpeg"]}},{"type":["h-card"],"properties":{"name":["Jane Doe"],"photo":["http://example.com/jane.jpeg"]}},{"type":["h-card"],"properties":{"name":["Jane Doe"],"photo":["http://example.com/jane.jpeg"]}},{"type":["h-card"],"properties":{"name":["Jane Doe"],"photo":["http://example.com/jane.jpeg"]}},{"type":["h-card"],"properties":{"name":["Jane Doe"],"photo":["http://example.com/jane.jpeg"]}},{"type":["h-card"],"properties":{"name":["Jane Doe"],"photo":["http://example.com/jane.jpeg"]}},{"type":["h-card"],"properties":{"name":["Jane Doe"]},"children":[{"type":["h-card"],"properties":{"name":["Jane Doe"],"photo":["http://example.com/jane.jpeg"]}}]},{"type":["h-card"],"properties":{"name":["Jane Doe"]},"children":[{"value":"Jane Doe","type":["h-card"],"properties":{"name":["Jane Doe"],"photo":["http://example.com/jane.jpeg"]}}]}],"rels":{},"rel-urls":{}};
-
- it('impliedphoto', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 4034194ce9..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-impliedurl.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-card', function() {
- var htmlFragment = "<a class=\"h-card\" href=\"jane.html\">Jane Doe</a>\n<area class=\"h-card\" href=\"jane.html\" alt=\"Jane Doe\"/ >\n<div class=\"h-card\" ><a href=\"jane.html\">Jane Doe</a><p></p></div> \n<div class=\"h-card\" ><area href=\"jane.html\">Jane Doe</area><p></p></div>\n<div class=\"h-card\" ><a class=\"h-card\" href=\"jane.html\">Jane Doe</a><p></p></div> ";
- var expected = {"items":[{"type":["h-card"],"properties":{"name":["Jane Doe"],"url":["http://example.com/jane.html"]}},{"type":["h-card"],"properties":{"name":["Jane Doe"],"url":["http://example.com/jane.html"]}},{"type":["h-card"],"properties":{"name":["Jane Doe"],"url":["http://example.com/jane.html"]}},{"type":["h-card"],"properties":{"name":["Jane Doe"],"url":["http://example.com/jane.html"]}},{"type":["h-card"],"properties":{"name":["Jane Doe"]},"children":[{"value":"Jane Doe","type":["h-card"],"properties":{"name":["Jane Doe"],"url":["http://example.com/jane.html"]}}]}],"rels":{},"rel-urls":{}};
-
- it('impliedurl', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 5911cc00fa..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-justahyperlink.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-card', function() {
- var htmlFragment = "<a class=\"h-card\" href=\"http://benward.me/\">Ben Ward</a>";
- var expected = {"items":[{"type":["h-card"],"properties":{"name":["Ben Ward"],"url":["http://benward.me/"]}}],"rels":{},"rel-urls":{}};
-
- it('justahyperlink', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 4f239fab5c..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-justaname.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-card', function() {
- var htmlFragment = "<p class=\"h-card\">Frances Berriman</p>";
- var expected = {"items":[{"type":["h-card"],"properties":{"name":["Frances Berriman"]}}],"rels":{},"rel-urls":{}};
-
- it('justaname', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index da2336e293..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-nested.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-card', function() {
- var htmlFragment = "<div class=\"h-card\">\n <a class=\"p-name u-url\" href=\"http://blog.lizardwrangler.com/\">Mitchell Baker</a> \n (<a class=\"h-org h-card\" href=\"http://mozilla.org/\">Mozilla Foundation</a>)\n</div>";
- var expected = {"items":[{"type":["h-card"],"properties":{"name":["Mitchell Baker"],"url":["http://blog.lizardwrangler.com/"]},"children":[{"value":"Mozilla Foundation","type":["h-org","h-card"],"properties":{"name":["Mozilla Foundation"],"url":["http://mozilla.org/"]}}]}],"rels":{},"rel-urls":{}};
-
- it('nested', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 0a365e34b8..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-p-property.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-card', function() {
- var htmlFragment = "<div class=\"h-card\">\n \n <span class=\"p-name\">\n <span class=\"p-given-name value\">John</span> \n <abbr class=\"p-additional-name\" title=\"Peter\">P</abbr> \n <span class=\"p-family-name value \">Doe</span> \n </span>\n <data class=\"p-honorific-suffix\" value=\"MSc\"></data>\n \n \n <br class=\"p-honorific-suffix\" />BSc<br />\n <hr class=\"p-honorific-suffix\" />BA\n \n \n <img class=\"p-honorific-suffix\" src=\"images/logo.gif\" alt=\"PHD\" />\n <img src=\"images/logo.gif\" alt=\"company logos\" usemap=\"#logomap\" />\n <map name=\"logomap\">\n <area class=\"p-org\" shape=\"rect\" coords=\"0,0,82,126\" href=\"madgex.htm\" alt=\"Madgex\" />\n <area class=\"p-org\" shape=\"circle\" coords=\"90,58,3\" href=\"mozilla.htm\" alt=\"Mozilla\" />\n </map>\n</div>";
- var expected = {"items":[{"type":["h-card"],"properties":{"name":["John Doe"],"given-name":["John"],"additional-name":["Peter"],"family-name":["Doe"],"honorific-suffix":["MSc","PHD"],"org":["Madgex","Mozilla"]}}],"rels":{},"rel-urls":{}};
-
- it('p-property', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 712a8cf722..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-card-relativeurls.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-card', function() {
- var htmlFragment = "<base href=\"http://example.com\" >\n<div class=\"h-card\">\n <a class=\"p-name u-url\" href=\"http://blog.lizardwrangler.com/\">Mitchell Baker</a> \n (<a class=\"p-org h-card\" href=\"bios/mitchell-baker/\">Mozilla Foundation</a>)\n <img class=\"u-photo\" src=\"bios/mitchell-baker/picture.jpeg\"/>\n</div>";
- var expected = {"items":[{"type":["h-card"],"properties":{"name":["Mitchell Baker"],"url":["http://blog.lizardwrangler.com/"],"org":[{"value":"Mozilla Foundation","type":["h-card"],"properties":{"name":["Mozilla Foundation"],"url":["http://example.com/bios/mitchell-baker/"]}}],"photo":["http://example.com/bios/mitchell-baker/picture.jpeg"]}}],"rels":{},"rel-urls":{}};
-
- it('relativeurls', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index e729b48b0f..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-impliedvalue-nested.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-entry', function() {
- var htmlFragment = "<div class=\"h-entry\">\n <div class=\"u-in-reply-to h-cite\">\n <span class=\"p-author h-card\">\n <span class=\"p-name\">Example Author</span>\n <a class=\"u-url\" href=\"http://example.com\">Home</a>\n </span>\n <a class=\"p-name u-url\" href=\"http://example.com/post\">Example Post</a>\n </div>\n</div>";
- var expected = {"items":[{"type":["h-entry"],"properties":{"in-reply-to":[{"type":["h-cite"],"properties":{"name":["Example Post"],"url":["http://example.com/post"],"author":[{"type":["h-card"],"properties":{"url":["http://example.com"],"name":["Example Author"]},"value":"Example Author"}]},"value":"http://example.com/post"}],"name":["Example Author\n Home\n \n Example Post"]}}],"rels":{},"rel-urls":{}};
-
- it('impliedvalue-nested', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 1e793e7273..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-justahyperlink.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-entry', function() {
- var htmlFragment = "<a class=\"h-entry\" href=\"http://microformats.org/2012/06/25/microformats-org-at-7\">microformats.org at 7</a>";
- var expected = {"items":[{"type":["h-entry"],"properties":{"name":["microformats.org at 7"],"url":["http://microformats.org/2012/06/25/microformats-org-at-7"]}}],"rels":{},"rel-urls":{}};
-
- it('justahyperlink', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index f4d31bf878..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-justaname.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-entry', function() {
- var htmlFragment = "<p class=\"h-entry\">microformats.org at 7</p>";
- var expected = {"items":[{"type":["h-entry"],"properties":{"name":["microformats.org at 7"]}}],"rels":{},"rel-urls":{}};
-
- it('justaname', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index b697f6c7c6..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-summarycontent.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-entry', function() {
- var htmlFragment = "<meta charset=\"utf-8\">\n<div class=\"h-entry\">\n <h1><a class=\"p-name u-url\" href=\"http://microformats.org/2012/06/25/microformats-org-at-7\">microformats.org at 7</a></h1>\n <div class=\"e-content\">\n <p class=\"p-summary\">Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.</p>\n\n <p>The microformats tagline “humans first, machines second” \n forms the basis of many of our \n <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service </p>\n </div> \n <p>Updated \n <time class=\"dt-updated\" datetime=\"2012-06-25T17:08:26\">June 25th, 2012</time> by\n <a class=\"p-author h-card\" href=\"http://tantek.com/\">Tantek</a>\n </p>\n</div>";
- var expected = {"items":[{"type":["h-entry"],"properties":{"url":["http://microformats.org/2012/06/25/microformats-org-at-7"],"name":["microformats.org at 7"],"content":[{"value":"Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.\n\n The microformats tagline “humans first, machines second” \n forms the basis of many of our \n principles, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service","html":"\n <p class=\"p-summary\">Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.</p>\n\n <p>The microformats tagline “humans first, machines second” \n forms the basis of many of our \n <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service </p>\n "}],"summary":["Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities."],"updated":["2012-06-25 17:08:26"],"author":[{"value":"Tantek","type":["h-card"],"properties":{"name":["Tantek"],"url":["http://tantek.com/"]}}]}}],"rels":{},"rel-urls":{}};
-
- it('summarycontent', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 510f0aa90d..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-u-property.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-entry', function() {
- var htmlFragment = "<base href=\"http://example.com\">\n<div class=\"h-entry\">\n <p class=\"p-name\">microformats.org at 7</p>\n\n \n <p class=\"u-url\">\n <span class=\"value-title\" title=\"http://microformats.org/\"> </span>\n Article permalink\n </p>\n <p class=\"u-url\">\n <span class=\"value\">http://microformats.org/</span> - \n <span class=\"value\">2012/06/25/microformats-org-at-7</span> \n </p> \n\n <p><a class=\"u-url\" href=\"http://microformats.org/2012/06/25/microformats-org-at-7\">Article permalink</a></p>\n\n <img src=\"images/logo.gif\" alt=\"company logos\" usemap=\"#logomap\" />\n <map name=\"logomap\">\n <area class=\"u-url\" shape=\"rect\" coords=\"0,0,82,126\" href=\"http://microformats.org/\" alt=\"microformats.org\" />\n </map>\n\n <img class=\"u-photo\" src=\"images/logo.gif\" alt=\"company logos\" />\n\n <object class=\"u-url\" data=\"http://microformats.org/wiki/microformats2-parsing\"></object>\n\n <abbr class=\"u-url\" title=\"http://microformats.org/wiki/value-class-pattern\">value-class-pattern</abbr> \n <data class=\"u-url\" value=\"http://microformats.org/wiki/\"></data>\n <p class=\"u-url\">http://microformats.org/discuss</p>\n</div>";
- var expected = {"items":[{"type":["h-entry"],"properties":{"name":["microformats.org at 7"],"url":["http://microformats.org/","http://microformats.org/2012/06/25/microformats-org-at-7","http://microformats.org/2012/06/25/microformats-org-at-7","http://microformats.org/","http://microformats.org/wiki/microformats2-parsing","http://microformats.org/wiki/value-class-pattern","http://microformats.org/wiki/","http://microformats.org/discuss"],"photo":["http://example.com/images/logo.gif"]}}],"rels":{},"rel-urls":{}};
-
- it('u-property', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 295ac9925a..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-entry-urlincontent.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-entry', function() {
- var htmlFragment = "<div class=\"h-entry\">\n <h1><a class=\"p-name\">Expanding URLs within HTML content</a></h1>\n <div class=\"e-content\">\n <ul>\n <li><a href=\"http://www.w3.org/\">Should not change: http://www.w3.org/</a></li>\n <li><a href=\"http://example.com/\">Should not change: http://example.com/</a></li>\n <li><a href=\"test.html\">File relative: test.html = http://example.com/test.html</a></li>\n <li><a href=\"/test/test.html\">Directory relative: /test/test.html = http://example.com/test/test.html</a></li>\n <li><a href=\"/test.html\">Relative to root: /test.html = http://example.com/test.html</a></li>\n </ul>\n <img src=\"images/photo.gif\" />\n </div> \n</div>";
- var expected = {"items":[{"type":["h-entry"],"properties":{"name":["Expanding URLs within HTML content"],"content":[{"value":"Should not change: http://www.w3.org/\n Should not change: http://example.com/\n File relative: test.html = http://example.com/test.html\n Directory relative: /test/test.html = http://example.com/test/test.html\n Relative to root: /test.html = http://example.com/test.html","html":"\n <ul>\n <li><a href=\"http://www.w3.org/\">Should not change: http://www.w3.org/</a></li>\n <li><a href=\"http://example.com/\">Should not change: http://example.com/</a></li>\n <li><a href=\"http://example.com/test.html\">File relative: test.html = http://example.com/test.html</a></li>\n <li><a href=\"http://example.com/test/test.html\">Directory relative: /test/test.html = http://example.com/test/test.html</a></li>\n <li><a href=\"http://example.com/test.html\">Relative to root: /test.html = http://example.com/test.html</a></li>\n </ul>\n <img src=\"http://example.com/images/photo.gif\" />\n "}]}}],"rels":{},"rel-urls":{}};
-
- it('urlincontent', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 814c3c42ed..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-ampm.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-event', function() {
- var htmlFragment = "<span class=\"h-event\">\n <span class=\"p-name\">The 4th Microformat party</span> will be on \n <ul>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07:00:00pm \n </span></li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07:00:00am \n </span></li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07:00pm \n </span></li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07pm \n </span></li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">7pm \n </span></li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">7:00pm \n </span></li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07:00p.m. \n </span></li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07:00PM \n </span></li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">7:00am \n </span></li>\n </ul>\n</span>";
- var expected = {"items":[{"type":["h-event"],"properties":{"name":["The 4th Microformat party"],"start":["2009-06-26 19:00:00","2009-06-26 07:00:00","2009-06-26 19:00","2009-06-26 19","2009-06-26 19","2009-06-26 19:00","2009-06-26 19:00","2009-06-26 19:00","2009-06-26 07:00"]}}],"rels":{},"rel-urls":{}};
-
- it('ampm', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 2315dbe912..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-attendees.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-event', function() {
- var htmlFragment = "<meta charset=\"utf-8\">\n<div class=\"h-event\">\n <span class=\"p-name\">CPJ Online Press Freedom Summit</span>\n (<time class=\"dt-start\" datetime=\"2012-10-10\">10 Nov 2012</time>) in\n <span class=\"p-location\">San Francisco</span>.\n Attendees:\n <ul>\n <li class=\"p-attendee h-card\">Brian Warner</li>\n <li class=\"p-attendee h-card\">Kyle Machulis</li>\n <li class=\"p-attendee h-card\">Tantek Çelik</li>\n <li class=\"p-attendee h-card\">Sid Sutter</li>\n </ul>\n</div>\n";
- var expected = {"items":[{"type":["h-event"],"properties":{"name":["CPJ Online Press Freedom Summit"],"start":["2012-10-10"],"location":["San Francisco"],"attendee":[{"value":"Brian Warner","type":["h-card"],"properties":{"name":["Brian Warner"]}},{"value":"Kyle Machulis","type":["h-card"],"properties":{"name":["Kyle Machulis"]}},{"value":"Tantek Çelik","type":["h-card"],"properties":{"name":["Tantek Çelik"]}},{"value":"Sid Sutter","type":["h-card"],"properties":{"name":["Sid Sutter"]}}]}}],"rels":{},"rel-urls":{}};
-
- it('attendees', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index e91b381bab..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-combining.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-event', function() {
- var htmlFragment = "<div class=\"h-event\">\n <a class=\"p-name u-url\" href=\"http://indiewebcamp.com/2012\">\n IndieWebCamp 2012\n </a>\n from <time class=\"dt-start\">2012-06-30</time> \n to <time class=\"dt-end\">2012-07-01</time> at \n <span class=\"p-location h-card\">\n <a class=\"p-name p-org u-url\" href=\"http://geoloqi.com/\">Geoloqi</a>, \n <span class=\"p-street-address\">920 SW 3rd Ave. Suite 400</span>, \n <span class=\"p-locality\">Portland</span>, \n <abbr class=\"p-region\" title=\"Oregon\">OR</abbr>\n </span>\n</div>";
- var expected = {"items":[{"type":["h-event"],"properties":{"name":["IndieWebCamp 2012"],"url":["http://indiewebcamp.com/2012"],"start":["2012-06-30"],"end":["2012-07-01"],"location":[{"value":"Geoloqi","type":["h-card"],"properties":{"name":["Geoloqi"],"org":["Geoloqi"],"url":["http://geoloqi.com/"],"street-address":["920 SW 3rd Ave. Suite 400"],"locality":["Portland"],"region":["Oregon"]}}]}}],"rels":{},"rel-urls":{}};
-
- it('combining', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 8972106745..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-concatenate.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-event', function() {
- var htmlFragment = "<span class=\"h-event\">\n <span class=\"p-name\">The 4th Microformat party</span> will be on \n <span class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00</time></span> to \n <span class=\"dt-end\"><time class=\"value\">22:00</time></span>.\n</span>";
- var expected = {"items":[{"type":["h-event"],"properties":{"name":["The 4th Microformat party"],"start":["2009-06-26 19:00"],"end":["2009-06-26 22:00"]}}],"rels":{},"rel-urls":{}};
-
- it('concatenate', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index c26b5bccc2..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-dates.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-event', function() {
- var htmlFragment = "<section class=\"h-event\">\n\t<p><span class=\"p-name\">The 4th Microformat party</span> will be on:</p>\n\t<ul>\n\t\t<li><time class=\"dt-start\" datetime=\"2009-06-26T19:00-08:00\">26 July</time></li>\n\t\t<li><time class=\"dt-start\" datetime=\"2009-06-26T19:00-08\">26 July</time></li>\n\t\t<li><time class=\"dt-start\" datetime=\"2009-06-26T19:00-0800\">26 July</time></li>\n\t\t<li><time class=\"dt-start\" datetime=\"2009-06-26T19:00+0800\">26 July</time></li>\n\t\t<li><time class=\"dt-start\" datetime=\"2009-06-26T19:00+08:00\">26 July</time></li>\n\t\t<li><time class=\"dt-start\" datetime=\"2009-06-26T19:00Z\">26 July</time></li>\n\t\t<li><time class=\"dt-start\" datetime=\"2009-06-26t19:00-08:00\">26 July</time></li>\n\t\t<li><time class=\"dt-start\" datetime=\"2009-06-26 19:00:00-08:00\">26 July</time></li>\n\t</ul>\n</section>";
- var expected = {"items":[{"type":["h-event"],"properties":{"name":["The 4th Microformat party"],"start":["2009-06-26 19:00-08:00","2009-06-26 19:00-08","2009-06-26 19:00-08:00","2009-06-26 19:00+08:00","2009-06-26 19:00+08:00","2009-06-26 19:00Z","2009-06-26 19:00-08:00","2009-06-26 19:00:00-08:00"]}}],"rels":{},"rel-urls":{}};
-
- it('dates', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index eb97beccb5..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-dt-property.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-event', function() {
- var htmlFragment = "<span class=\"h-event\">\n <span class=\"p-name\">The party</span> will be on \n \n <p class=\"dt-start\">\n <span class=\"value-title\" title=\"2013-03-14\"> </span>\n March 14th 2013\n </p>\n <p class=\"dt-start\">\n <time class=\"value\" datetime=\"2013-06-25\">25 July</time>, from\n <span class=\"value\">07:00:00am \n </span></p> \n \n <p>\n <time class=\"dt-start\" datetime=\"2013-06-26\">26 June</time>\n \n <ins class=\"dt-start\" datetime=\"2013-06-27\">Just added</ins>, \n <del class=\"dt-start\" datetime=\"2013-06-28\">Removed</del>\n </p>\n <abbr class=\"dt-start\" title=\"2013-06-29\">June 29</abbr> \n <data class=\"dt-start\" value=\"2013-07-01\"></data>\n <p class=\"dt-start\">2013-07-02</p>\n \n</span>";
- var expected = {"items":[{"type":["h-event"],"properties":{"name":["The party"],"start":["2013-03-14","2013-06-25 07:00:00","2013-06-26","2013-06-27","2013-06-28","2013-06-29","2013-07-01","2013-07-02"]}}],"rels":{},"rel-urls":{}};
-
- it('dt-property', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 26c835863e..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-justahyperlink.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-event', function() {
- var htmlFragment = "<a class=\"h-event\" href=\"http://indiewebcamp.com/2012\">IndieWebCamp 2012</a>";
- var expected = {"items":[{"type":["h-event"],"properties":{"name":["IndieWebCamp 2012"],"url":["http://indiewebcamp.com/2012"]}}],"rels":{},"rel-urls":{}};
-
- it('justahyperlink', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index be3a5335db..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-justaname.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-event', function() {
- var htmlFragment = "<p class=\"h-event\">IndieWebCamp 2012</p>";
- var expected = {"items":[{"type":["h-event"],"properties":{"name":["IndieWebCamp 2012"]}}],"rels":{},"rel-urls":{}};
-
- it('justaname', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 243b518bfb..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-event-time.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-event', function() {
- var htmlFragment = "<span class=\"h-event\">\n <span class=\"p-name\">The 4th Microformat party</span> will be on \n <ul>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00:00-08:00</time> \n </li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00:00-0800</time> \n </li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00:00+0800</time> \n </li> \n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00:00Z</time> \n </li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00:00</time> \n </li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00-08:00</time> \n </li> \n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00+08:00</time> \n </li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00Z</time> \n </li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00</time> \n </li> \n <li>\n <time class=\"dt-end\" datetime=\"2013-034\">3 February 2013</time>\n </li>\n <li>\n <time class=\"dt-end\" datetime=\"2013-06-27 15:34\">26 July 2013</time>\n </li> \n </ul>\n</span>";
- var expected = {"items":[{"type":["h-event"],"properties":{"name":["The 4th Microformat party"],"start":["2009-06-26 19:00:00-08:00","2009-06-26 19:00:00-08:00","2009-06-26 19:00:00+08:00","2009-06-26 19:00:00Z","2009-06-26 19:00:00","2009-06-26 19:00-08:00","2009-06-26 19:00+08:00","2009-06-26 19:00Z","2009-06-26 19:00"],"end":["2013-034","2013-06-27 15:34"]}}],"rels":{},"rel-urls":{}};
-
- it('time', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 30bbf52df0..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-feed-implied-title.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-feed', function() {
- var htmlFragment = "\n<html>\n\t<head>\n\t\t<title>microformats blog</title>\n\t</head>\n\t<body>\n\t<section class=\"h-feed\">\n\t\t\n\t\t<div class=\"h-entry\">\n\t\t <h1><a class=\"p-name u-url\" href=\"http://microformats.org/2012/06/25/microformats-org-at-7\">microformats.org at 7</a></h1>\n\t\t <div class=\"e-content\">\n\t\t <p class=\"p-summary\">Last week the microformats.org community \n\t\t celebrated its 7th birthday at a gathering hosted by Mozilla in \n\t\t San Francisco and recognized accomplishments, challenges, and \n\t\t opportunities.</p>\n\t\t\n\t\t <p>The microformats tagline “humans first, machines second” \n\t\t forms the basis of many of our \n\t\t <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n\t\t in that regard, we’d like to recognize a few people and \n\t\t thank them for their years of volunteer service </p>\n\t\t </div> \n\t\t <p>Updated \n\t\t <time class=\"dt-updated\" datetime=\"2012-06-25T17:08:26\">June 25th, 2012</time>\n\t\t </p>\n\t\t</div>\n\t\t\n\t</section>\n\t</body>\n</html>";
- var expected = {"items":[{"type":["h-feed"],"properties":{"name":["microformats blog"]},"children":[{"value":"microformats.org at 7\n\t\t \n\t\t Last week the microformats.org community \n\t\t celebrated its 7th birthday at a gathering hosted by Mozilla in \n\t\t San Francisco and recognized accomplishments, challenges, and \n\t\t opportunities.\n\t\t\n\t\t The microformats tagline “humans first, machines second” \n\t\t forms the basis of many of our \n\t\t principles, and \n\t\t in that regard, we’d like to recognize a few people and \n\t\t thank them for their years of volunteer service \n\t\t \n\t\t Updated \n\t\t June 25th, 2012","type":["h-entry"],"properties":{"name":["microformats.org at 7"],"url":["http://microformats.org/2012/06/25/microformats-org-at-7"],"content":[{"value":"Last week the microformats.org community \n\t\t celebrated its 7th birthday at a gathering hosted by Mozilla in \n\t\t San Francisco and recognized accomplishments, challenges, and \n\t\t opportunities.\n\t\t\n\t\t The microformats tagline “humans first, machines second” \n\t\t forms the basis of many of our \n\t\t principles, and \n\t\t in that regard, we’d like to recognize a few people and \n\t\t thank them for their years of volunteer service","html":"\n\t\t <p class=\"p-summary\">Last week the microformats.org community \n\t\t celebrated its 7th birthday at a gathering hosted by Mozilla in \n\t\t San Francisco and recognized accomplishments, challenges, and \n\t\t opportunities.</p>\n\t\t\n\t\t <p>The microformats tagline “humans first, machines second” \n\t\t forms the basis of many of our \n\t\t <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n\t\t in that regard, we’d like to recognize a few people and \n\t\t thank them for their years of volunteer service </p>\n\t\t "}],"summary":["Last week the microformats.org community \n\t\t celebrated its 7th birthday at a gathering hosted by Mozilla in \n\t\t San Francisco and recognized accomplishments, challenges, and \n\t\t opportunities."],"updated":["2012-06-25 17:08:26"]}}]}],"rels":{},"rel-urls":{}};
-
- it('implied-title', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index c72b241404..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-feed-simple.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-feed', function() {
- var htmlFragment = "<section class=\"h-feed\">\n\t<h1 class=\"p-name\">Microformats blog</h1>\n\t<a class=\"p-author h-card\" href=\"http://tantek.com/\">Tantek</a>\n\t<a class=\"u-url\" href=\"http://microformats.org/blog\">permlink</a>\n\t<img class=\"u-photo\" src=\"photo.jpeg\"/>\n\t\n\t<div class=\"h-entry\">\n\t <h1><a class=\"p-name u-url\" href=\"http://microformats.org/2012/06/25/microformats-org-at-7\">microformats.org at 7</a></h1>\n\t <div class=\"e-content\">\n\t <p class=\"p-summary\">Last week the microformats.org community \n\t celebrated its 7th birthday at a gathering hosted by Mozilla in \n\t San Francisco and recognized accomplishments, challenges, and \n\t opportunities.</p>\n\t\n\t <p>The microformats tagline “humans first, machines second” \n\t forms the basis of many of our \n\t <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n\t in that regard, we’d like to recognize a few people and \n\t thank them for their years of volunteer service </p>\n\t </div> \n\t <p>Updated \n\t <time class=\"dt-updated\" datetime=\"2012-06-25T17:08:26\">June 25th, 2012</time>\n\t </p>\n\t</div>\n\t\n</section>";
- var expected = {"items":[{"type":["h-feed"],"properties":{"name":["Microformats blog"],"author":[{"value":"Tantek","type":["h-card"],"properties":{"name":["Tantek"],"url":["http://tantek.com/"]}}],"url":["http://microformats.org/blog"],"photo":["http://example.com/photo.jpeg"]},"children":[{"value":"microformats.org at 7\n\t \n\t Last week the microformats.org community \n\t celebrated its 7th birthday at a gathering hosted by Mozilla in \n\t San Francisco and recognized accomplishments, challenges, and \n\t opportunities.\n\t\n\t The microformats tagline “humans first, machines second” \n\t forms the basis of many of our \n\t principles, and \n\t in that regard, we’d like to recognize a few people and \n\t thank them for their years of volunteer service \n\t \n\t Updated \n\t June 25th, 2012","type":["h-entry"],"properties":{"name":["microformats.org at 7"],"url":["http://microformats.org/2012/06/25/microformats-org-at-7"],"content":[{"value":"Last week the microformats.org community \n\t celebrated its 7th birthday at a gathering hosted by Mozilla in \n\t San Francisco and recognized accomplishments, challenges, and \n\t opportunities.\n\t\n\t The microformats tagline “humans first, machines second” \n\t forms the basis of many of our \n\t principles, and \n\t in that regard, we’d like to recognize a few people and \n\t thank them for their years of volunteer service","html":"\n\t <p class=\"p-summary\">Last week the microformats.org community \n\t celebrated its 7th birthday at a gathering hosted by Mozilla in \n\t San Francisco and recognized accomplishments, challenges, and \n\t opportunities.</p>\n\t\n\t <p>The microformats tagline “humans first, machines second” \n\t forms the basis of many of our \n\t <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n\t in that regard, we’d like to recognize a few people and \n\t thank them for their years of volunteer service </p>\n\t "}],"summary":["Last week the microformats.org community \n\t celebrated its 7th birthday at a gathering hosted by Mozilla in \n\t San Francisco and recognized accomplishments, challenges, and \n\t opportunities."],"updated":["2012-06-25 17:08:26"]}}]}],"rels":{},"rel-urls":{}};
-
- it('simple', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index d26e9ed0d9..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-abbrpattern.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-geo', function() {
- var htmlFragment = "<meta charset=\"utf-8\">\n<p class=\"h-geo\">\n <abbr class=\"p-latitude\" title=\"37.408183\">N 37° 24.491</abbr>, \n <abbr class=\"p-longitude\" title=\"-122.13855\">W 122° 08.313</abbr>\n</p>";
- var expected = {"items":[{"type":["h-geo"],"properties":{"latitude":["37.408183"],"longitude":["-122.13855"],"name":["N 37° 24.491, \n W 122° 08.313"]}}],"rels":{},"rel-urls":{}};
-
- it('abbrpattern', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 45da683ff4..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-altitude.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-geo', function() {
- var htmlFragment = "<p>My favourite hill in the lakes is \n <span class=\"h-geo\">\n <span class=\"p-name\">Pen-y-ghent</span> \n (Geo: <span class=\"p-latitude\">54.155278</span>,\n <span class=\"p-longitude\">-2.249722</span>). It\n raises to <span class=\"p-altitude\">694</span>m.\n </span>\n</p>";
- var expected = {"items":[{"type":["h-geo"],"properties":{"name":["Pen-y-ghent"],"latitude":["54.155278"],"longitude":["-2.249722"],"altitude":["694"]}}],"rels":{},"rel-urls":{}};
-
- it('altitude', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 968ed12853..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-hidden.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-geo', function() {
- var htmlFragment = "<p>\n <span class=\"h-geo\">The Bricklayer's Arms\n <span class=\"p-latitude\">\n <span class=\"value-title\" title=\"51.513458\"> </span> \n </span>\n <span class=\"p-longitude\">\n <span class=\"value-title\" title=\"-0.14812\"> </span>\n </span>\n </span>\n</p>";
- var expected = {"items":[{"type":["h-geo"],"properties":{"latitude":["51.513458"],"longitude":["-0.14812"],"name":["The Bricklayer's Arms"]}}],"rels":{},"rel-urls":{}};
-
- it('hidden', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 23c142462c..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-justaname.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-geo', function() {
- var htmlFragment = "<p>On my way to The Bricklayer's Arms\n (Geo: <span class=\"h-geo\">51.513458;-0.14812</span>)\n</p>";
- var expected = {"items":[{"type":["h-geo"],"properties":{"name":["51.513458;-0.14812"]}}],"rels":{},"rel-urls":{}};
-
- it('justaname', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index e9700a3e29..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-simpleproperties.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-geo', function() {
- var htmlFragment = "<p class=\"h-geo\">We are meeting at \n <span class=\"p-name\">The Bricklayer's Arms</span>\n (Geo: <span class=\"p-latitude\">51.513458</span>:\n <span class=\"p-longitude\">-0.14812</span>)\n</p>";
- var expected = {"items":[{"type":["h-geo"],"properties":{"name":["The Bricklayer's Arms"],"latitude":["51.513458"],"longitude":["-0.14812"]}}],"rels":{},"rel-urls":{}};
-
- it('simpleproperties', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 813d215927..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-geo-valuetitleclass.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-geo', function() {
- var htmlFragment = "<meta charset=\"utf-8\">\n<p>\n <span class=\"h-geo\">\n <span class=\"p-latitude\">\n <span class=\"value-title\" title=\"51.513458\">N 51° 51.345</span>, \n </span>\n <span class=\"p-longitude\">\n <span class=\"value-title\" title=\"-0.14812\">W -0° 14.812</span>\n </span>\n </span>\n</p>";
- var expected = {"items":[{"type":["h-geo"],"properties":{"latitude":["51.513458"],"longitude":["-0.14812"],"name":["N 51° 51.345, \n \n \n W -0° 14.812"]}}],"rels":{},"rel-urls":{}};
-
- it('valuetitleclass', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index a7deb3f2f0..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-news-all.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-news', function() {
- var htmlFragment = "<div class=\"h-news\">\n <div class=\"p-entry h-entry\">\n <h1><a class=\"p-name u-url\" href=\"http://microformats.org/2012/06/25/microformats-org-at-7\">microformats.org at 7</a></h1>\n <div class=\"e-content\">\n <p class=\"p-summary\">Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.</p>\n\n <p>The microformats tagline “humans first, machines second” \n forms the basis of many of our \n <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service </p>\n </div> \n <p>Updated \n <time class=\"dt-updated\" datetime=\"2012-06-25T17:08:26\">June 25th, 2012</time> by\n <a class=\"p-author h-card\" href=\"http://tantek.com/\">Tantek</a>\n </p>\n </div>\n\n <p>\n <span class=\"p-dateline h-adr\">\n <span class=\"p-locality\">San Francisco</span>, \n <span class=\"p-region\">CA</span> \n </span>\n (Geo: <span class=\"p-geo\">37.774921;-122.445202</span>) \n <span class=\"p-source-org h-card\">\n <a class=\"p-name u-url\" href=\"http://microformats.org/\">microformats.org</a>\n </span>\n </p>\n <p>\n <a class=\"u-principles\" href=\"http://microformats.org/wiki/Category:public_domain_license\">Publishing policy</a>\n </p>\n</div>";
- var expected = {"items":[{"type":["h-news"],"properties":{"entry":[{"value":"microformats.org at 7","type":["h-entry"],"properties":{"name":["microformats.org at 7"],"url":["http://microformats.org/2012/06/25/microformats-org-at-7"],"content":[{"value":"Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.\n\n The microformats tagline “humans first, machines second” \n forms the basis of many of our \n principles, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service","html":"\n <p class=\"p-summary\">Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.</p>\n\n <p>The microformats tagline “humans first, machines second” \n forms the basis of many of our \n <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service </p>\n "}],"summary":["Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities."],"updated":["2012-06-25 17:08:26"],"author":[{"value":"Tantek","type":["h-card"],"properties":{"name":["Tantek"],"url":["http://tantek.com/"]}}]}}],"dateline":[{"value":"San Francisco, \n CA","type":["h-adr"],"properties":{"locality":["San Francisco"],"region":["CA"],"name":["San Francisco, \n CA"]}}],"geo":["37.774921;-122.445202"],"source-org":[{"value":"microformats.org","type":["h-card"],"properties":{"name":["microformats.org"],"url":["http://microformats.org/"]}}],"principles":["http://microformats.org/wiki/Category:public_domain_license"],"name":["microformats.org at 7\n \n Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.\n\n The microformats tagline “humans first, machines second” \n forms the basis of many of our \n principles, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service \n \n Updated \n June 25th, 2012 by\n Tantek\n \n \n\n \n \n San Francisco, \n CA \n \n (Geo: 37.774921;-122.445202) \n \n microformats.org\n \n \n \n Publishing policy"]}}],"rels":{},"rel-urls":{}};
-
- it('all', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 4494cb8ab3..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-news-minimum.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-news', function() {
- var htmlFragment = "<div class=\"h-news\">\n <div class=\"p-entry h-entry\">\n <h1><a class=\"p-name u-url\" href=\"http://microformats.org/2012/06/25/microformats-org-at-7\">microformats.org at 7</a></h1>\n <div class=\"e-content\">\n <p class=\"p-summary\">Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.</p>\n\n <p>The microformats tagline “humans first, machines second” \n forms the basis of many of our \n <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service </p>\n </div> \n <p>Updated \n <time class=\"dt-updated\" datetime=\"2012-06-25T17:08:26\">June 25th, 2012</time> by\n <a class=\"p-author h-card\" href=\"http://tantek.com/\">Tantek</a>\n </p>\n </div>\n <p>\n <a class=\"p-source-org h-card\" href=\"http://microformats.org/\">microformats.org</a> \n </p>\n</div>";
- var expected = {"items":[{"type":["h-news"],"properties":{"entry":[{"value":"microformats.org at 7","type":["h-entry"],"properties":{"name":["microformats.org at 7"],"url":["http://microformats.org/2012/06/25/microformats-org-at-7"],"content":[{"value":"Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.\n\n The microformats tagline “humans first, machines second” \n forms the basis of many of our \n principles, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service","html":"\n <p class=\"p-summary\">Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.</p>\n\n <p>The microformats tagline “humans first, machines second” \n forms the basis of many of our \n <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service </p>\n "}],"summary":["Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities."],"updated":["2012-06-25 17:08:26"],"author":[{"value":"Tantek","type":["h-card"],"properties":{"name":["Tantek"],"url":["http://tantek.com/"]}}]}}],"source-org":[{"value":"microformats.org","type":["h-card"],"properties":{"name":["microformats.org"],"url":["http://microformats.org/"]}}],"name":["microformats.org at 7\n \n Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.\n\n The microformats tagline “humans first, machines second” \n forms the basis of many of our \n principles, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service \n \n Updated \n June 25th, 2012 by\n Tantek\n \n \n \n microformats.org"]}}],"rels":{},"rel-urls":{}};
-
- it('minimum', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index b7150aae49..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-org-hyperlink.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-org', function() {
- var htmlFragment = "<a class=\"h-org\" href=\"http://mozilla.org/\">Mozilla Foundation</a>";
- var expected = {"items":[{"type":["h-org"],"properties":{"name":["Mozilla Foundation"],"url":["http://mozilla.org/"]}}],"rels":{},"rel-urls":{}};
-
- it('hyperlink', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 4f5a75e881..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-org-simple.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-org', function() {
- var htmlFragment = "<span class=\"h-org\">Mozilla Foundation</span>";
- var expected = {"items":[{"type":["h-org"],"properties":{"name":["Mozilla Foundation"]}}],"rels":{},"rel-urls":{}};
-
- it('simple', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 5c7e939e6e..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-org-simpleproperties.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-org', function() {
- var htmlFragment = "<p class=\"h-org\">\n <span class=\"p-organization-name\">W3C</span> - \n <span class=\"p-organization-unit\">CSS Working Group</span>\n</p>";
- var expected = {"items":[{"type":["h-org"],"properties":{"organization-name":["W3C"],"organization-unit":["CSS Working Group"],"name":["W3C - \n CSS Working Group"]}}],"rels":{},"rel-urls":{}};
-
- it('simpleproperties', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index b07d3f5477..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-product-aggregate.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-product', function() {
- var htmlFragment = "<meta charset=\"utf-8\">\n<div class=\"h-product\">\n <h2 class=\"p-name\">Raspberry Pi</h2>\n <img class=\"u-photo\" src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/RaspberryPi.jpg/320px-RaspberryPi.jpg\" />\n <p class=\"e-description\">The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.</p>\n <a class=\"u-url\" href=\"http://www.raspberrypi.org/\">More info about the Raspberry Pi</a>\n <p class=\"p-price\">£29.95</p>\n <p class=\"p-review h-review-aggregate\">\n <span class=\"p-rating h-rating\">\n <span class=\"p-average\">9.2</span> out of \n <span class=\"p-best\">10</span> \n based on <span class=\"p-count\">178</span> reviews\n </span>\n </p>\n <p>Categories: <span class=\"p-category\">Computer</span>, <span class=\"p-category\">Education</span></p>\n <p class=\"p-brand h-card\">From: \n <span class=\"p-name p-org\">The Raspberry Pi Foundation</span> - \n <span class=\"p-locality\">Cambridge</span> \n <span class=\"p-country-name\">UK</span>\n </p>\n</div>";
- var expected = {"items":[{"type":["h-product"],"properties":{"name":["Raspberry Pi"],"photo":["http://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/RaspberryPi.jpg/320px-RaspberryPi.jpg"],"description":[{"value":"The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.","html":"The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming."}],"url":["http://www.raspberrypi.org/"],"price":["£29.95"],"review":[{"value":"9.2 out of \n 10 \n based on 178 reviews","type":["h-review-aggregate"],"properties":{"rating":[{"value":"9.2 out of \n 10 \n based on 178 reviews","type":["h-rating"],"properties":{"average":["9.2"],"best":["10"],"count":["178"],"name":["9.2 out of \n 10 \n based on 178 reviews"]}}],"name":["9.2 out of \n 10 \n based on 178 reviews"]}}],"category":["Computer","Education"],"brand":[{"value":"The Raspberry Pi Foundation","type":["h-card"],"properties":{"name":["The Raspberry Pi Foundation"],"org":["The Raspberry Pi Foundation"],"locality":["Cambridge"],"country-name":["UK"]}}]}}],"rels":{},"rel-urls":{}};
-
- it('aggregate', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index cf2638e314..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-product-justahyperlink.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-product', function() {
- var htmlFragment = "<a class=\"h-product\" href=\"http://www.raspberrypi.org/\">Raspberry Pi</a>";
- var expected = {"items":[{"type":["h-product"],"properties":{"name":["Raspberry Pi"],"url":["http://www.raspberrypi.org/"]}}],"rels":{},"rel-urls":{}};
-
- it('justahyperlink', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index f946a10e06..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-product-justaname.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-product', function() {
- var htmlFragment = "<p class=\"h-product\">Raspberry Pi</p>";
- var expected = {"items":[{"type":["h-product"],"properties":{"name":["Raspberry Pi"]}}],"rels":{},"rel-urls":{}};
-
- it('justaname', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 1c5467d519..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-product-simpleproperties.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-product', function() {
- var htmlFragment = "<meta charset=\"utf-8\">\n<div class=\"h-product\">\n <h2 class=\"p-name\">Raspberry Pi</h2>\n <img class=\"u-photo\" src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/RaspberryPi.jpg/320px-RaspberryPi.jpg\" />\n <p class=\"e-description\">The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.</p>\n <a class=\"u-url\" href=\"http://www.raspberrypi.org/\">More info about the Raspberry Pi</a>\n <p class=\"p-price\">£29.95</p>\n <p class=\"p-review h-review\"><span class=\"p-rating\">4.5</span> out of 5</p>\n <p>Categories: <span class=\"p-category\">Computer</span>, <span class=\"p-category\">Education</span></p>\n</div>";
- var expected = {"items":[{"type":["h-product"],"properties":{"name":["Raspberry Pi"],"photo":["http://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/RaspberryPi.jpg/320px-RaspberryPi.jpg"],"description":[{"value":"The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.","html":"The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming."}],"url":["http://www.raspberrypi.org/"],"price":["£29.95"],"category":["Computer","Education"],"review":[{"value":"4.5 out of 5","type":["h-review"],"properties":{"rating":["4.5"],"name":["4.5 out of 5"]}}]}}],"rels":{},"rel-urls":{}};
-
- it('simpleproperties', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index fa0e4cb376..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-recipe-all.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-recipe', function() {
- var htmlFragment = "<section class=\"h-recipe\">\n <h1 class=\"p-name\">Yorkshire Puddings</h1> \n <p class=\"p-summary\">Makes <span class=\"p-yield\">6 good sized Yorkshire puddings</span>, the way my mum taught me</p>\n\n\n <p><img class=\"u-photo\" src=\"http://codebits.glennjones.net/semantic/yorkshire-puddings.jpg\" /></p>\n\n <span class=\"p-review h-review-aggregate\">\n <span class=\"p-rating\">\n <span class=\"p-average\">4.5</span> stars out 5 based on </span>\n <span class=\"p-count\">35</span> reviews</span>\n \n \n\n <div id=\"ingredients-container\">\n <h3>Ingredients</h3>\n <ul>\n <li class=\"e-ingredient\">1 egg</li>\n <li class=\"e-ingredient\">75g plain flour</li>\n <li class=\"e-ingredient\">70ml milk</li>\n <li class=\"e-ingredient\">60ml water</li>\n <li class=\"e-ingredient\">Pinch of salt</li>\n </ul>\n </div>\n\n <h3>Time</h3>\n <ul>\n <li class=\"prepTime\">Preparation <span class=\"value-title\" title=\"PT0H10M\">10 mins</span></li>\n <li class=\"cookTime\">Cook <span class=\"value-title\" title=\"PT0H25M\">25 mins</span></li>\n </ul> \n\n\n <h3>Instructions</h3>\n <div class=\"e-instructions\">\n <ol>\n <li>Pre-heat oven to 230C or gas mark 8. Pour the vegetable oil evenly into 2 x 4-hole \n Yorkshire pudding tins and place in the oven to heat through.</li> \n \n <li>To make the batter, add all the flour into a bowl and beat in the eggs until smooth. \n Gradually add the milk and water while beating the mixture. It should be smooth and \n without lumps. Finally add a pinch of salt.</li>\n \n <li>Make sure the oil is piping hot before pouring the batter evenly into the tins. \n Place in the oven for 20-25 minutes until pudding have risen and look golden brown</li>\n </ol>\n </div>\n\n <h3>Nutrition</h3>\n <ul id=\"nutrition-list\">\n <li class=\"p-nutrition\">Calories: <span class=\"calories\">125</span></li>\n <li class=\"p-nutrition\">Fat: <span class=\"fat\">3.2g</span></li>\n <li class=\"p-nutrition\">Cholesterol: <span class=\"cholesterol\">77mg</span></li>\n </ul>\n <p>(Amount per pudding)</p>\n\n <p>\n Published on <time class=\"dt-published\" datetime=\"2011-10-27\">27 Oct 2011</time> by \n <span class=\"p-author h-card\">\n <a class=\"p-name u-url\" href=\"http://glennjones.net\">Glenn Jones</a>\n </span>\n </p>\n <a href=\"http://www.flickr.com/photos/dithie/4106528495/\">Photo by dithie</a>\n </section>";
- var expected = {"items":[{"type":["h-recipe"],"properties":{"name":["Yorkshire Puddings"],"summary":["Makes 6 good sized Yorkshire puddings, the way my mum taught me"],"yield":["6 good sized Yorkshire puddings"],"photo":["http://codebits.glennjones.net/semantic/yorkshire-puddings.jpg"],"review":[{"value":"4.5 stars out 5 based on \n 35 reviews","type":["h-review-aggregate"],"properties":{"rating":["4.5 stars out 5 based on"],"average":["4.5"],"count":["35"],"name":["4.5 stars out 5 based on \n 35 reviews"]}}],"ingredient":[{"value":"1 egg","html":"1 egg"},{"value":"75g plain flour","html":"75g plain flour"},{"value":"70ml milk","html":"70ml milk"},{"value":"60ml water","html":"60ml water"},{"value":"Pinch of salt","html":"Pinch of salt"}],"instructions":[{"value":"Pre-heat oven to 230C or gas mark 8. Pour the vegetable oil evenly into 2 x 4-hole \n Yorkshire pudding tins and place in the oven to heat through. \n \n To make the batter, add all the flour into a bowl and beat in the eggs until smooth. \n Gradually add the milk and water while beating the mixture. It should be smooth and \n without lumps. Finally add a pinch of salt.\n \n Make sure the oil is piping hot before pouring the batter evenly into the tins. \n Place in the oven for 20-25 minutes until pudding have risen and look golden brown","html":"\n <ol>\n <li>Pre-heat oven to 230C or gas mark 8. Pour the vegetable oil evenly into 2 x 4-hole \n Yorkshire pudding tins and place in the oven to heat through.</li> \n \n <li>To make the batter, add all the flour into a bowl and beat in the eggs until smooth. \n Gradually add the milk and water while beating the mixture. It should be smooth and \n without lumps. Finally add a pinch of salt.</li>\n \n <li>Make sure the oil is piping hot before pouring the batter evenly into the tins. \n Place in the oven for 20-25 minutes until pudding have risen and look golden brown</li>\n </ol>\n "}],"nutrition":["Calories: 125","Fat: 3.2g","Cholesterol: 77mg"],"published":["2011-10-27"],"author":[{"value":"Glenn Jones","type":["h-card"],"properties":{"name":["Glenn Jones"],"url":["http://glennjones.net"]}}],"url":["http://www.flickr.com/photos/dithie/4106528495/"]}}],"rels":{},"rel-urls":{}};
-
- it('all', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index ac3d91dc78..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-recipe-minimum.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-recipe', function() {
- var htmlFragment = "<div class=\"h-recipe\"> \n <p class=\"p-name\">Toast</p>\n <ul>\n <li class=\"e-ingredient\">Slice of bread</li>\n <li class=\"e-ingredient\">Butter</li>\n </ul>\n</div>";
- var expected = {"items":[{"type":["h-recipe"],"properties":{"name":["Toast"],"ingredient":[{"value":"Slice of bread","html":"Slice of bread"},{"value":"Butter","html":"Butter"}]}}],"rels":{},"rel-urls":{}};
-
- it('minimum', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 73329d46cb..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-affiliation.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-resume', function() {
- var htmlFragment = "<div class=\"h-resume\">\n <p>\n <span class=\"p-name\">Tim Berners-Lee</span>, \n <span class=\"p-summary\">invented the World Wide Web</span>. \n </p> \n Belongs to following groups:\n <p> \n <a class=\"p-affiliation h-card\" href=\"http://www.w3.org/\">\n <img class=\"p-name u-photo\" alt=\"W3C\" src=\"http://www.w3.org/Icons/WWW/w3c_home_nb.png\" />\n </a>\n </p> \n</div>";
- var expected = {"items":[{"type":["h-resume"],"properties":{"name":["Tim Berners-Lee"],"summary":["invented the World Wide Web"],"affiliation":[{"type":["h-card"],"properties":{"name":["W3C"],"photo":["http://www.w3.org/Icons/WWW/w3c_home_nb.png"],"url":["http://www.w3.org/"]}}]}}],"rels":{},"rel-urls":{}};
-
- it('affiliation', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index f2a1f76f7d..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-contact.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-resume', function() {
- var htmlFragment = "<div class=\"h-resume\">\n <p class=\"p-name\">Tim Berners-Lee</p>\n <p class=\"p-summary\">Invented the World Wide Web.</p><hr />\n <div class=\"p-contact h-card\">\n <p class=\"p-name\">MIT</p>\n <p>\n <span class=\"p-street-address\">32 Vassar Street</span>, \n <span class=\"p-extended-address\">Room 32-G524</span>, \n <span class=\"p-locality\">Cambridge</span>, \n <span class=\"p-region\">MA</span> \n <span class=\"p-postal-code\">02139</span>, \n <span class=\"p-country-name\">USA</span>.\n </p>\n <p>Tel:<span class=\"p-tel\">+1 (617) 253 5702</span></p>\n <p>Email:<a class=\"u-email\" href=\"mailto:timbl@w3.org\">timbl@w3.org</a></p>\n </div>\n</div>";
- var expected = {"items":[{"type":["h-resume"],"properties":{"name":["Tim Berners-Lee"],"summary":["Invented the World Wide Web."],"contact":[{"value":"MIT","type":["h-card"],"properties":{"name":["MIT"],"street-address":["32 Vassar Street"],"extended-address":["Room 32-G524"],"locality":["Cambridge"],"region":["MA"],"postal-code":["02139"],"country-name":["USA"],"tel":["+1 (617) 253 5702"],"email":["mailto:timbl@w3.org"]}}]}}],"rels":{},"rel-urls":{}};
-
- it('contact', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 5e38384344..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-education.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-resume', function() {
- var htmlFragment = "<div class=\"h-resume\">\n <p class=\"p-name\">Tim Berners-Lee</p>\n <div class=\"p-contact h-card\">\n <p class=\"p-title\">Director of the World Wide Web Foundation</p>\n </div>\n <p class=\"p-summary\">Invented the World Wide Web.</p><hr />\n <p class=\"p-education h-event h-card\">\n <span class=\"p-name p-org\">The Queen's College, Oxford University</span>, \n <span class=\"p-description\">BA Hons (I) Physics</span> \n <time class=\"dt-start\" datetime=\"1973-09\">1973</time> –\n <time class=\"dt-end\" datetime=\"1976-06\">1976</time>\n </p>\n</div>";
- var expected = {"items":[{"type":["h-resume"],"properties":{"name":["Tim Berners-Lee"],"contact":[{"value":"Director of the World Wide Web Foundation","type":["h-card"],"properties":{"title":["Director of the World Wide Web Foundation"],"name":["Director of the World Wide Web Foundation"]}}],"summary":["Invented the World Wide Web."],"education":[{"value":"The Queen's College, Oxford University","type":["h-event","h-card"],"properties":{"name":["The Queen's College, Oxford University"],"org":["The Queen's College, Oxford University"],"description":["BA Hons (I) Physics"],"start":["1973-09"],"end":["1976-06"]}}]}}],"rels":{},"rel-urls":{}};
-
- it('education', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 2357bf1a22..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-justaname.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-resume', function() {
- var htmlFragment = "<p class=\"h-resume\">Tim Berners-Lee, invented the World Wide Web.</p>";
- var expected = {"items":[{"type":["h-resume"],"properties":{"name":["Tim Berners-Lee, invented the World Wide Web."]}}],"rels":{},"rel-urls":{}};
-
- it('justaname', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 60a983e04c..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-skill.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-resume', function() {
- var htmlFragment = "<div class=\"h-resume\">\n <p>\n <span class=\"p-name\">Tim Berners-Lee</span>, \n <span class=\"p-summary\">invented the World Wide Web</span>.\n </p>\n Skills: \n <ul>\n <li class=\"p-skill\">information systems</li>\n <li class=\"p-skill\">advocacy</li>\n <li class=\"p-skill\">leadership</li>\n <ul> \n</ul></ul></div>";
- var expected = {"items":[{"type":["h-resume"],"properties":{"name":["Tim Berners-Lee"],"summary":["invented the World Wide Web"],"skill":["information systems","advocacy","leadership"]}}],"rels":{},"rel-urls":{}};
-
- it('skill', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index d61ea3de56..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-resume-work.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-resume', function() {
- var htmlFragment = "<meta charset=\"utf-8\">\n<div class=\"h-resume\">\n <p class=\"p-name\">Tim Berners-Lee</p>\n <div class=\"p-contact h-card\">\n <p class=\"p-title\">Director of the World Wide Web Foundation</p>\n </div>\n <p class=\"p-summary\">Invented the World Wide Web.</p><hr />\n <div class=\"p-experience h-event h-card\">\n <p class=\"p-title\">Director</p>\n <p><a class=\"p-name p-org u-url\" href=\"http://www.webfoundation.org/\">World Wide Web Foundation</a></p>\n <p>\n <time class=\"dt-start\" datetime=\"2009-01-18\">Jan 2009</time> – Present\n <time class=\"dt-duration\" datetime=\"P2Y11M\">(2 years 11 month)</time>\n </p>\n </div>\n</div>";
- var expected = {"items":[{"type":["h-resume"],"properties":{"name":["Tim Berners-Lee"],"contact":[{"value":"Director of the World Wide Web Foundation","type":["h-card"],"properties":{"title":["Director of the World Wide Web Foundation"],"name":["Director of the World Wide Web Foundation"]}}],"summary":["Invented the World Wide Web."],"experience":[{"value":"World Wide Web Foundation","type":["h-event","h-card"],"properties":{"title":["Director"],"name":["World Wide Web Foundation"],"org":["World Wide Web Foundation"],"url":["http://www.webfoundation.org/"],"start":["2009-01-18"],"duration":["P2Y11M"]}}]}}],"rels":{},"rel-urls":{}};
-
- it('work', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index e698ee37a9..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-aggregate-hevent.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-review-aggregate', function() {
- var htmlFragment = "<div class=\"h-review-aggregate\">\n <div class=\"p-item h-event\">\n <h3 class=\"p-name\">Fullfrontal</h3>\n <p class=\"p-description\">A one day JavaScript Conference held in Brighton</p>\n <p><time class=\"dt-start\" datetime=\"2012-11-09\">9th November 2012</time></p> \n </div> \n \n <p class=\"p-rating\">\n <span class=\"p-average value\">9.9</span> out of \n <span class=\"p-best\">10</span> \n based on <span class=\"p-count\">62</span> reviews\n </p>\n</div>";
- var expected = {"items":[{"type":["h-review-aggregate"],"properties":{"item":[{"value":"Fullfrontal","type":["h-event"],"properties":{"name":["Fullfrontal"],"description":["A one day JavaScript Conference held in Brighton"],"start":["2012-11-09"]}}],"rating":["9.9"],"average":["9.9"],"best":["10"],"count":["62"],"name":["Fullfrontal\n A one day JavaScript Conference held in Brighton\n 9th November 2012 \n \n \n \n 9.9 out of \n 10 \n based on 62 reviews"]}}],"rels":{},"rel-urls":{}};
-
- it('hevent', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 729fdfb2d3..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-aggregate-justahyperlink.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-review-aggregate', function() {
- var htmlFragment = "<div class=\"h-review-aggregate\">\n <h3 class=\"p-item h-item\">Mediterranean Wraps</h3>\n <span class=\"p-summary\">\n Customers flock to this small restaurant for their \n tasty falafel and shawerma wraps and welcoming staff.\n </span>\n <span class=\"p-rating\">4.5</span> out of 5 \n</div>";
- var expected = {"items":[{"type":["h-review-aggregate"],"properties":{"item":[{"value":"Mediterranean Wraps","type":["h-item"],"properties":{"name":["Mediterranean Wraps"]}}],"summary":["Customers flock to this small restaurant for their \n tasty falafel and shawerma wraps and welcoming staff."],"rating":["4.5"],"name":["Mediterranean Wraps\n \n Customers flock to this small restaurant for their \n tasty falafel and shawerma wraps and welcoming staff.\n \n 4.5 out of 5"]}}],"rels":{},"rel-urls":{}};
-
- it('justahyperlink', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index d49cabb5fe..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-aggregate-simpleproperties.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-review-aggregate', function() {
- var htmlFragment = "<div class=\"h-review-aggregate\">\n <div class=\"p-item h-card\">\n <h3 class=\"p-name\">Mediterranean Wraps</h3>\n <p>\n <span class=\"p-street-address\">433 S California Ave</span>, \n <span class=\"p-locality\">Palo Alto</span>, \n <span class=\"p-region\">CA</span> - \n <span class=\"p-tel\">(650) 321-8189</span>\n </p>\n </div> \n <span class=\"p-summary\">Customers flock to this small restaurant for their \n tasty falafel and shawerma wraps and welcoming staff.</span>\n <span class=\"p-rating\">\n <span class=\"p-average value\">9.2</span> out of \n <span class=\"p-best\">10</span> \n based on <span class=\"p-count\">17</span> reviews\n </span>\n</div>";
- var expected = {"items":[{"type":["h-review-aggregate"],"properties":{"item":[{"value":"Mediterranean Wraps","type":["h-card"],"properties":{"name":["Mediterranean Wraps"],"street-address":["433 S California Ave"],"locality":["Palo Alto"],"region":["CA"],"tel":["(650) 321-8189"]}}],"summary":["Customers flock to this small restaurant for their \n tasty falafel and shawerma wraps and welcoming staff."],"rating":["9.2"],"average":["9.2"],"best":["10"],"count":["17"],"name":["Mediterranean Wraps\n \n 433 S California Ave, \n Palo Alto, \n CA - \n (650) 321-8189\n \n \n Customers flock to this small restaurant for their \n tasty falafel and shawerma wraps and welcoming staff.\n \n 9.2 out of \n 10 \n based on 17 reviews"]}}],"rels":{},"rel-urls":{}};
-
- it('simpleproperties', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 3f547d7a90..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-hyperlink.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-review', function() {
- var htmlFragment = "<a class=\"h-review\" href=\"https://plus.google.com/116941523817079328322/about\">Crepes on Cole</a>";
- var expected = {"items":[{"type":["h-review"],"properties":{"name":["Crepes on Cole"],"url":["https://plus.google.com/116941523817079328322/about"]}}],"rels":{},"rel-urls":{}};
-
- it('hyperlink', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index ecde19277c..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-implieditem.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-review', function() {
- var htmlFragment = "<div class=\"h-review\">\n <a class=\"p-item h-item\" href=\"http://example.com/crepeoncole\">Crepes on Cole</a>\n <p><span class=\"p-rating\">4.7</span> out of 5 stars</p>\n</div>";
- var expected = {"items":[{"type":["h-review"],"properties":{"item":[{"value":"Crepes on Cole","type":["h-item"],"properties":{"name":["Crepes on Cole"],"url":["http://example.com/crepeoncole"]}}],"rating":["4.7"],"name":["Crepes on Cole\n 4.7 out of 5 stars"]}}],"rels":{},"rel-urls":{}};
-
- it('implieditem', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index d8aef51c85..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-item.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-review', function() {
- var htmlFragment = "<base href=\"http://example.com\" >\n<div class=\"h-review\">\n <p class=\"p-item h-item\">\n <img class=\"u-photo\" src=\"images/photo.gif\" />\n <a class=\"p-name u-url\" href=\"http://example.com/crepeoncole\">Crepes on Cole</a>\n </p>\n <p><span class=\"p-rating\">5</span> out of 5 stars</p>\n</div>";
- var expected = {"items":[{"type":["h-review"],"properties":{"item":[{"value":"Crepes on Cole","type":["h-item"],"properties":{"photo":["http://example.com/images/photo.gif"],"name":["Crepes on Cole"],"url":["http://example.com/crepeoncole"]}}],"rating":["5"],"name":["Crepes on Cole\n \n 5 out of 5 stars"]}}],"rels":{},"rel-urls":{}};
-
- it('item', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 89523e909f..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-justaname.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-review', function() {
- var htmlFragment = "<p class=\"h-review\">Crepes on Cole</p>";
- var expected = {"items":[{"type":["h-review"],"properties":{"name":["Crepes on Cole"]}}],"rels":{},"rel-urls":{}};
-
- it('justaname', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index ee0c41fe6c..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-photo.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-review', function() {
- var htmlFragment = "<base href=\"http://example.com\" ><img class=\"h-review\" src=\"images/photo.gif\" alt=\"Crepes on Cole\" />";
- var expected = {"items":[{"type":["h-review"],"properties":{"name":["Crepes on Cole"],"photo":["http://example.com/images/photo.gif"]}}],"rels":{},"rel-urls":{}};
-
- it('photo', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 8411c4d2ad..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-h-review-vcard.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('h-review', function() {
- var htmlFragment = "<div class=\"h-review\">\n <span><span class=\"p-rating\">5</span> out of 5 stars</span>\n <h4 class=\"p-name\">Crepes on Cole is awesome</h4>\n <span class=\"p-reviewer h-card\">\n Reviewer: <span class=\"p-name\">Tantek</span> - \n </span>\n <time class=\"dt-reviewed\" datetime=\"2005-04-18\">April 18, 2005</time>\n <div class=\"e-description\">\n <p class=\"p-item h-card\">\n <span class=\"p-name p-org\">Crepes on Cole</span> is one of the best little \n creperies in <span class=\"p-adr h-adr\"><span class=\"p-locality\">San Francisco</span></span>.\n Excellent food and service. Plenty of tables in a variety of sizes \n for parties large and small. Window seating makes for excellent \n people watching to/from the N-Judah which stops right outside. \n I've had many fun social gatherings here, as well as gotten \n plenty of work done thanks to neighborhood WiFi.\n </p>\n </div>\n <p>Visit date: <span>April 2005</span></p>\n <p>Food eaten: <a class=\"p-category\" href=\"http://en.wikipedia.org/wiki/crepe\">crepe</a></p>\n <p>Permanent link for review: <a class=\"u-url\" href=\"http://example.com/crepe\">http://example.com/crepe</a></p>\n <p><a rel=\"license\" href=\"http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License\">Creative Commons Attribution-ShareAlike License</a></p>\n</div>";
- var expected = {"items":[{"type":["h-review"],"properties":{"rating":["5"],"name":["Crepes on Cole is awesome"],"reviewer":[{"value":"Tantek","type":["h-card"],"properties":{"name":["Tantek"]}}],"reviewed":["2005-04-18"],"description":[{"value":"Crepes on Cole is one of the best little \n creperies in San Francisco.\n Excellent food and service. Plenty of tables in a variety of sizes \n for parties large and small. Window seating makes for excellent \n people watching to/from the N-Judah which stops right outside. \n I've had many fun social gatherings here, as well as gotten \n plenty of work done thanks to neighborhood WiFi.","html":"\n <p class=\"p-item h-card\">\n <span class=\"p-name p-org\">Crepes on Cole</span> is one of the best little \n creperies in <span class=\"p-adr h-adr\"><span class=\"p-locality\">San Francisco</span></span>.\n Excellent food and service. Plenty of tables in a variety of sizes \n for parties large and small. Window seating makes for excellent \n people watching to/from the N-Judah which stops right outside. \n I've had many fun social gatherings here, as well as gotten \n plenty of work done thanks to neighborhood WiFi.\n </p>\n "}],"item":[{"value":"Crepes on Cole","type":["h-card"],"properties":{"name":["Crepes on Cole"],"org":["Crepes on Cole"],"adr":[{"value":"San Francisco","type":["h-adr"],"properties":{"locality":["San Francisco"],"name":["San Francisco"]}}]}}],"category":["crepe"],"url":["http://example.com/crepe"]}}],"rels":{"license":["http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License"]},"rel-urls":{"http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License":{"text":"Creative Commons Attribution-ShareAlike License","rels":["license"]}}};
-
- it('vcard', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index d65dfdf8b8..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-rel-duplicate-rels.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('rel', function() {
- var htmlFragment = "<a href=\"http://ma.tt/2015/05/beethoven-mozart-bach/\" \n title=\"Permalink to Beethoven, Mozart, Bach\" rel=\"bookmark\">\n<time class=\"entry-date\" datetime=\"2015-05-31T22:42:00+00:00\">May 31, 2015</time></a></span>\n<a href=\"http://ma.tt/category/asides/\" rel=\"category tag\">Asides</a>\n<span class=\"author vcard\">\n<a class=\"url fn n\" href=\"http://ma.tt/author/saxmatt/\" \n title=\"View all posts by Matt\" rel=\"author\">Matt</a></span>\n<span class=\"date\"><a href=\"http://ma.tt/2015/06/jefferson-on-idleness/\" title=\"Permalink to Jefferson on Idleness\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"2015-06-02T21:26:00+00:00\">June 2, 2015</time></a></span>\n<span class=\"categories-links\"><a href=\"http://ma.tt/category/asides/\" rel=\"category tag\">Asides</a></span>\n<span class=\"author vcard\"><a class=\"url fn n\" href=\"http://ma.tt/author/saxmatt/\" title=\"View all posts by Matt\" rel=\"author\">Matt</a></span>\n";
- var expected = {"rels":{"bookmark":["http://ma.tt/2015/05/beethoven-mozart-bach/","http://ma.tt/2015/06/jefferson-on-idleness/"],"category":["http://ma.tt/category/asides/"],"tag":["http://ma.tt/category/asides/"],"author":["http://ma.tt/author/saxmatt/"]},"items":[{"type":["h-card"],"properties":{"url":["http://ma.tt/author/saxmatt/"],"name":["Matt"]}},{"type":["h-card"],"properties":{"url":["http://ma.tt/author/saxmatt/"],"name":["Matt"]}}],"rel-urls":{"http://ma.tt/category/asides/":{"rels":["category","tag"],"text":"Asides"},"http://ma.tt/author/saxmatt/":{"rels":["author"],"text":"Matt","title":"View all posts by Matt"},"http://ma.tt/2015/05/beethoven-mozart-bach/":{"rels":["bookmark"],"text":"May 31, 2015","title":"Permalink to Beethoven, Mozart, Bach"},"http://ma.tt/2015/06/jefferson-on-idleness/":{"rels":["bookmark"],"text":"June 2, 2015","title":"Permalink to Jefferson on Idleness"}}};
-
- it('duplicate-rels', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index d5606f5a3a..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-rel-license.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('rel', function() {
- var htmlFragment = "<a rel=\"license\" href=\"http://creativecommons.org/licenses/by/2.5/\">cc by 2.5</a>";
- var expected = {"items":[],"rels":{"license":["http://creativecommons.org/licenses/by/2.5/"]},"rel-urls":{"http://creativecommons.org/licenses/by/2.5/":{"text":"cc by 2.5","rels":["license"]}}};
-
- it('license', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 4332d35723..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-rel-nofollow.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('rel', function() {
- var htmlFragment = "<a rel=\"nofollow\" href=\"http://microformats.org/wiki/microformats:copyrights\">Copyrights</a>";
- var expected = {"items":[],"rels":{"nofollow":["http://microformats.org/wiki/microformats:copyrights"]},"rel-urls":{"http://microformats.org/wiki/microformats:copyrights":{"text":"Copyrights","rels":["nofollow"]}}};
-
- it('nofollow', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 685532f448..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-rel-rel-urls.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('rel', function() {
- var htmlFragment = "<a rel=\"author\" href=\"http://example.com/a\">author a</a>\n<a rel=\"author\" href=\"http://example.com/b\">author b</a>\n<a rel=\"in-reply-to\" href=\"http://example.com/1\">post 1</a>\n<a rel=\"in-reply-to\" href=\"http://example.com/2\">post 2</a>\n<a rel=\"alternate home\"\n href=\"http://example.com/fr\"\n media=\"handheld\"\n hreflang=\"fr\">French mobile homepage</a>";
- var expected = {"items":[],"rels":{"author":["http://example.com/a","http://example.com/b"],"in-reply-to":["http://example.com/1","http://example.com/2"],"home":["http://example.com/fr"],"alternate":["http://example.com/fr"]},"rel-urls":{"http://example.com/a":{"rels":["author"],"text":"author a"},"http://example.com/b":{"rels":["author"],"text":"author b"},"http://example.com/1":{"rels":["in-reply-to"],"text":"post 1"},"http://example.com/2":{"rels":["in-reply-to"],"text":"post 2"},"http://example.com/fr":{"rels":["alternate","home"],"media":"handheld","hreflang":"fr","text":"French mobile homepage"}}};
-
- it('rel-urls', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 3b1b72f447..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-rel-varying-text-duplicate-rels.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('rel', function() {
- var htmlFragment = "This is a contrived example - not found links like this in the wild:\n<a href=\"http://ma.tt/category/asides/\" rel=\"category tag\">Asides</a>\n<a href=\"http://ma.tt/category/asides/\" rel=\"category tag\">B-sides</a>\n<a href=\"http://ma.tt/category/asides/\" rel=\"category tag\">seasides</a>";
- var expected = {"rels":{"category":["http://ma.tt/category/asides/"],"tag":["http://ma.tt/category/asides/"]},"items":[],"rel-urls":{"http://ma.tt/category/asides/":{"rels":["category","tag"],"text":"Asides"}}};
-
- it('varying-text-duplicate-rels', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index 3850ad5649..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-rel-xfn-all.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('rel', function() {
- var htmlFragment = "<ul>\n <li><a rel=\"friend\" href=\"http://example.com/profile/jane\">jane</a></li>\n <li><a rel=\"acquaintance\" href=\"http://example.com/profile/jeo\">jeo</a></li>\n <li><a rel=\"contact\" href=\"http://example.com/profile/lily\">lily</a></li>\n <li><a rel=\"met\" href=\"http://example.com/profile/oliver\">oliver</a></li>\n <li><a rel=\"co-worker\" href=\"http://example.com/profile/emily\">emily</a></li>\n <li><a rel=\"colleague\" href=\"http://example.com/profile/jack\">jack</a></li>\n <li><a rel=\"neighbor\" href=\"http://example.com/profile/isabella\">isabella</a></li>\n <li><a rel=\"child\" href=\"http://example.com/profile/harry\">harry</a></li>\n <li><a rel=\"parent\" href=\"http://example.com/profile/sophia\">sophia</a></li>\n <li><a rel=\"sibling\" href=\"http://example.com/profile/charlie\">charlie</a></li>\n <li><a rel=\"spouse\" href=\"http://example.com/profile/olivia\">olivia</a></li>\n <li><a rel=\"kin\" href=\"http://example.com/profile/james\">james</a></li>\n <li><a rel=\"muse\" href=\"http://example.com/profile/ava\">ava</a></li>\n <li><a rel=\"crush\" href=\"http://example.com/profile/joshua\">joshua</a></li>\n <li><a rel=\"date\" href=\"http://example.com/profile/chloe\">chloe</a></li>\n <li><a rel=\"sweetheart\" href=\"http://example.com/profile/alfie\">alfie</a></li>\n <li><a rel=\"me\" href=\"http://example.com/profile/isla\">isla</a></li>\n</ul>";
- var expected = {"items":[],"rels":{"friend":["http://example.com/profile/jane"],"acquaintance":["http://example.com/profile/jeo"],"contact":["http://example.com/profile/lily"],"met":["http://example.com/profile/oliver"],"co-worker":["http://example.com/profile/emily"],"colleague":["http://example.com/profile/jack"],"neighbor":["http://example.com/profile/isabella"],"child":["http://example.com/profile/harry"],"parent":["http://example.com/profile/sophia"],"sibling":["http://example.com/profile/charlie"],"spouse":["http://example.com/profile/olivia"],"kin":["http://example.com/profile/james"],"muse":["http://example.com/profile/ava"],"crush":["http://example.com/profile/joshua"],"date":["http://example.com/profile/chloe"],"sweetheart":["http://example.com/profile/alfie"],"me":["http://example.com/profile/isla"]},"rel-urls":{"http://example.com/profile/jane":{"text":"jane","rels":["friend"]},"http://example.com/profile/jeo":{"text":"jeo","rels":["acquaintance"]},"http://example.com/profile/lily":{"text":"lily","rels":["contact"]},"http://example.com/profile/oliver":{"text":"oliver","rels":["met"]},"http://example.com/profile/emily":{"text":"emily","rels":["co-worker"]},"http://example.com/profile/jack":{"text":"jack","rels":["colleague"]},"http://example.com/profile/isabella":{"text":"isabella","rels":["neighbor"]},"http://example.com/profile/harry":{"text":"harry","rels":["child"]},"http://example.com/profile/sophia":{"text":"sophia","rels":["parent"]},"http://example.com/profile/charlie":{"text":"charlie","rels":["sibling"]},"http://example.com/profile/olivia":{"text":"olivia","rels":["spouse"]},"http://example.com/profile/james":{"text":"james","rels":["kin"]},"http://example.com/profile/ava":{"text":"ava","rels":["muse"]},"http://example.com/profile/joshua":{"text":"joshua","rels":["crush"]},"http://example.com/profile/chloe":{"text":"chloe","rels":["date"]},"http://example.com/profile/alfie":{"text":"alfie","rels":["sweetheart"]},"http://example.com/profile/isla":{"text":"isla","rels":["me"]}}};
-
- it('xfn-all', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
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
deleted file mode 100644
index d982af5cc2..0000000000
--- a/toolkit/components/microformats/test/standards-tests/mf-v2-rel-xfn-elsewhere.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-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)
-*/
-
-assert = chai.assert;
-
-
-describe('rel', function() {
- var htmlFragment = "<ul>\n <li><a rel=\"me\" href=\"http://twitter.com/glennjones\">twitter</a></li>\n <li><a rel=\"me\" href=\"http://delicious.com/glennjonesnet/\">delicious</a></li>\n <li><a rel=\"me\" href=\"https://plus.google.com/u/0/105161464208920272734/about\">google+</a></li>\n <li><a rel=\"me\" href=\"http://lanyrd.com/people/glennjones/\">lanyrd</a></li>\n <li><a rel=\"me\" href=\"http://github.com/glennjones\">github</a></li>\n <li><a rel=\"me\" href=\"http://www.flickr.com/photos/glennjonesnet/\">flickr</a></li>\n <li><a rel=\"me\" href=\"http://www.linkedin.com/in/glennjones\">linkedin</a></li>\n <li><a rel=\"me\" href=\"http://www.slideshare.net/glennjones/presentations\">slideshare</a></li>\n</ul>";
- var expected = {"items":[],"rels":{"me":["http://twitter.com/glennjones","http://delicious.com/glennjonesnet/","https://plus.google.com/u/0/105161464208920272734/about","http://lanyrd.com/people/glennjones/","http://github.com/glennjones","http://www.flickr.com/photos/glennjonesnet/","http://www.linkedin.com/in/glennjones","http://www.slideshare.net/glennjones/presentations"]},"rel-urls":{"http://twitter.com/glennjones":{"text":"twitter","rels":["me"]},"http://delicious.com/glennjonesnet/":{"text":"delicious","rels":["me"]},"https://plus.google.com/u/0/105161464208920272734/about":{"text":"google+","rels":["me"]},"http://lanyrd.com/people/glennjones/":{"text":"lanyrd","rels":["me"]},"http://github.com/glennjones":{"text":"github","rels":["me"]},"http://www.flickr.com/photos/glennjonesnet/":{"text":"flickr","rels":["me"]},"http://www.linkedin.com/in/glennjones":{"text":"linkedin","rels":["me"]},"http://www.slideshare.net/glennjones/presentations":{"text":"slideshare","rels":["me"]}}};
-
- it('xfn-elsewhere', function(){
- var doc, dom, node, options, parser, found;
- dom = new DOMParser();
- doc = dom.parseFromString( htmlFragment, 'text/html' );
- options ={
- 'document': doc,
- 'node': doc,
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5'
- };
- found = Microformats.get( options );
- assert.deepEqual(found, expected);
- });
-});
diff --git a/toolkit/components/microformats/test/static/count.html b/toolkit/components/microformats/test/static/count.html
deleted file mode 100644
index c367b29ead..0000000000
--- a/toolkit/components/microformats/test/static/count.html
+++ /dev/null
@@ -1,84 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
-
- <meta charset="UTF-8">
- <title>Count Microformats</title>
- <meta name="description" content="microformat-shiv - A light-weight cross browser javascript microformats 2 parser" />
-
- <link rel="stylesheet" href="css/testrunner.css">
- <link rel="stylesheet" href="css/prettify.css">
-
-
- <!-- loads Modules to help with debugging ie windows.Modules -->
- <script src="../../lib/utilities.js"></script>
- <script src="../../lib/domutils.js"></script>
- <script src="../../lib/url.js"></script>
- <script src="../../lib/html.js"></script>
- <script src="../../lib/text.js"></script>
- <script src="../../lib/dates.js"></script>
- <script src="../../lib/isodate.js"></script>
- <script src="../../lib/parser.js"></script>
- <script src="../../lib/parser-implied.js"></script>
- <script src="../../lib/parser-includes.js"></script>
- <script src="../../lib/parser-rels.js"></script>
-
- <script src="../../lib/maps/h-adr.js"></script>
- <script src="../../lib/maps/h-card.js"></script>
- <script src="../../lib/maps/h-entry.js"></script>
- <script src="../../lib/maps/h-event.js"></script>
- <script src="../../lib/maps/h-feed.js"></script>
- <script src="../../lib/maps/h-geo.js"></script>
- <script src="../../lib/maps/h-item.js"></script>
- <script src="../../lib/maps/h-listing.js"></script>
- <script src="../../lib/maps/h-news.js"></script>
- <script src="../../lib/maps/h-org.js"></script>
- <script src="../../lib/maps/h-product.js"></script>
- <script src="../../lib/maps/h-recipe.js"></script>
- <script src="../../lib/maps/h-resume.js"></script>
- <script src="../../lib/maps/h-review-aggregate.js"></script>
- <script src="../../lib/maps/h-review.js"></script>
- <script src="../../lib/maps/rel.js"></script>
-
-
- <script src="javascript/beautify.js"></script>
- <script src="javascript/prettify.js"></script>
-
- <script src="javascript/count.js"></script>
-
- </head>
-
- <body>
-
- <p>microformat-shiv</p>
- <h1>Count Microformats</h1>
- <p>Type or copy and paste the HTML you want to parse into the box below.</p>
-
- <form id="mf-form" class="tool-interface" method="get" action="">
- <p>
- <label for="html">HTML</label>
-<textarea id="html" name="html">&lt;a class="h-card" href="http://glennjones.net"&gt;
- &lt;span class="p-given-name"&gt;Glenn&lt;/span&gt;
- &lt;span class="p-family-name"&gt;Jones&lt;/span&gt;
-&lt;/a&gt;
-&lt;a class="h-card" href="http://janedoe.net"&gt;
- &lt;span class="p-given-name"&gt;Jane&lt;/span&gt;
- &lt;span class="p-family-name"&gt;Doe&lt;/span&gt;
-&lt;/a&gt;
-&lt;a class="h-event" href="http://janedoe.net"&gt;
- &lt;span class="p-name"&gt;Event&lt;/span&gt;
- &lt;span class="dt-start"&gt;2015-07-01&lt;/span&gt;
-&lt;/a&gt;
-</textarea>
- </p>
-
- <input class="button" value="Count" type="submit">
- </form>
-
- <h1>Parser JSON</h1>
- <div id="parser-json"><pre class="prettyprint"><code class="language-json"></code></pre></div>
-
-
-
- </body>
-</html> \ No newline at end of file
diff --git a/toolkit/components/microformats/test/static/css/mocha-custom.css b/toolkit/components/microformats/test/static/css/mocha-custom.css
deleted file mode 100644
index 30f07756b4..0000000000
--- a/toolkit/components/microformats/test/static/css/mocha-custom.css
+++ /dev/null
@@ -1,9 +0,0 @@
-
-body {
- font: 20px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
- padding: 60px 50px;
-}
-
-h3.capitalize {
- text-transform: capitalize;
-} \ No newline at end of file
diff --git a/toolkit/components/microformats/test/static/css/mocha.css b/toolkit/components/microformats/test/static/css/mocha.css
deleted file mode 100644
index 42b9798fa4..0000000000
--- a/toolkit/components/microformats/test/static/css/mocha.css
+++ /dev/null
@@ -1,270 +0,0 @@
-@charset "utf-8";
-
-body {
- margin:0;
-}
-
-#mocha {
- font: 20px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
- margin: 60px 50px;
-}
-
-#mocha ul,
-#mocha li {
- margin: 0;
- padding: 0;
-}
-
-#mocha ul {
- list-style: none;
-}
-
-#mocha h1,
-#mocha h2 {
- margin: 0;
-}
-
-#mocha h1 {
- margin-top: 15px;
- font-size: 1em;
- font-weight: 200;
-}
-
-#mocha h1 a {
- text-decoration: none;
- color: inherit;
-}
-
-#mocha h1 a:hover {
- text-decoration: underline;
-}
-
-#mocha .suite .suite h1 {
- margin-top: 0;
- font-size: .8em;
-}
-
-#mocha .hidden {
- display: none;
-}
-
-#mocha h2 {
- font-size: 12px;
- font-weight: normal;
- cursor: pointer;
-}
-
-#mocha .suite {
- margin-left: 15px;
-}
-
-#mocha .test {
- margin-left: 15px;
- overflow: hidden;
-}
-
-#mocha .test.pending:hover h2::after {
- content: '(pending)';
- font-family: arial, sans-serif;
-}
-
-#mocha .test.pass.medium .duration {
- background: #c09853;
-}
-
-#mocha .test.pass.slow .duration {
- background: #b94a48;
-}
-
-#mocha .test.pass::before {
- content: '✓';
- font-size: 12px;
- display: block;
- float: left;
- margin-right: 5px;
- color: #00d6b2;
-}
-
-#mocha .test.pass .duration {
- font-size: 9px;
- margin-left: 5px;
- padding: 2px 5px;
- color: #fff;
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
- -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
- box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- -ms-border-radius: 5px;
- -o-border-radius: 5px;
- border-radius: 5px;
-}
-
-#mocha .test.pass.fast .duration {
- display: none;
-}
-
-#mocha .test.pending {
- color: #0b97c4;
-}
-
-#mocha .test.pending::before {
- content: '◦';
- color: #0b97c4;
-}
-
-#mocha .test.fail {
- color: #c00;
-}
-
-#mocha .test.fail pre {
- color: black;
-}
-
-#mocha .test.fail::before {
- content: '✖';
- font-size: 12px;
- display: block;
- float: left;
- margin-right: 5px;
- color: #c00;
-}
-
-#mocha .test pre.error {
- color: #c00;
- max-height: 300px;
- overflow: auto;
-}
-
-/**
- * (1): approximate for browsers not supporting calc
- * (2): 42 = 2*15 + 2*10 + 2*1 (padding + margin + border)
- * ^^ seriously
- */
-#mocha .test pre {
- display: block;
- float: left;
- clear: left;
- font: 12px/1.5 monaco, monospace;
- margin: 5px;
- padding: 15px;
- border: 1px solid #eee;
- max-width: 85%; /*(1)*/
- max-width: calc(100% - 42px); /*(2)*/
- word-wrap: break-word;
- border-bottom-color: #ddd;
- -webkit-border-radius: 3px;
- -webkit-box-shadow: 0 1px 3px #eee;
- -moz-border-radius: 3px;
- -moz-box-shadow: 0 1px 3px #eee;
- border-radius: 3px;
-}
-
-#mocha .test h2 {
- position: relative;
-}
-
-#mocha .test a.replay {
- position: absolute;
- top: 3px;
- right: 0;
- text-decoration: none;
- vertical-align: middle;
- display: block;
- width: 15px;
- height: 15px;
- line-height: 15px;
- text-align: center;
- background: #eee;
- font-size: 15px;
- -moz-border-radius: 15px;
- border-radius: 15px;
- -webkit-transition: opacity 200ms;
- -moz-transition: opacity 200ms;
- transition: opacity 200ms;
- opacity: 0.3;
- color: #888;
-}
-
-#mocha .test:hover a.replay {
- opacity: 1;
-}
-
-#mocha-report.pass .test.fail {
- display: none;
-}
-
-#mocha-report.fail .test.pass {
- display: none;
-}
-
-#mocha-report.pending .test.pass,
-#mocha-report.pending .test.fail {
- display: none;
-}
-#mocha-report.pending .test.pass.pending {
- display: block;
-}
-
-#mocha-error {
- color: #c00;
- font-size: 1.5em;
- font-weight: 100;
- letter-spacing: 1px;
-}
-
-#mocha-stats {
- position: fixed;
- top: 15px;
- right: 10px;
- font-size: 12px;
- margin: 0;
- color: #888;
- z-index: 1;
-}
-
-#mocha-stats .progress {
- float: right;
- padding-top: 0;
-}
-
-#mocha-stats em {
- color: black;
-}
-
-#mocha-stats a {
- text-decoration: none;
- color: inherit;
-}
-
-#mocha-stats a:hover {
- border-bottom: 1px solid #eee;
-}
-
-#mocha-stats li {
- display: inline-block;
- margin: 0 5px;
- list-style: none;
- padding-top: 11px;
-}
-
-#mocha-stats canvas {
- width: 40px;
- height: 40px;
-}
-
-#mocha code .comment { color: #ddd; }
-#mocha code .init { color: #2f6fad; }
-#mocha code .string { color: #5890ad; }
-#mocha code .keyword { color: #8a6343; }
-#mocha code .number { color: #2f6fad; }
-
-@media screen and (max-device-width: 480px) {
- #mocha {
- margin: 60px 0px;
- }
-
- #mocha #stats {
- position: absolute;
- }
-}
diff --git a/toolkit/components/microformats/test/static/css/prettify.css b/toolkit/components/microformats/test/static/css/prettify.css
deleted file mode 100644
index 843e903e7e..0000000000
--- a/toolkit/components/microformats/test/static/css/prettify.css
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Pretty printing styles. Used with prettify.js. */
-
-.str { color: #85C5DC; }
-.kwd { color: #EDF0D1; }
-.com { color: #878989; }
-.typ { color: #F5896F; }
-.lit { color: #FFB17A; }
-.pun { color: #FFFFFF; }
-.pln { color: #FFFFFF; }
-.tag { color: #F5896F; }
-.atn { color: #F5896F; }
-.atv { color: #85C5DC; }
-.dec { color: #878989; }
-
-pre.prettyprint {
- background-color:#302F2D;
- border: none;
- line-height: normal;
- font-size: 100%;
- border-radius: 6px 6px 6px 6px;
- font-family: consolas,​'andale mono',​'courier new',​monospace;
- padding-top: 12px;
- overflow: hidden;
-}
-
-code{
- font-size: 13px;
- line-height: normal;
-}
-
-/* Specify class=linenums on a pre to get line numbering */
-ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */
-li.L0,
-li.L1,
-li.L2,
-li.L3,
-li.L5,
-li.L6,
-li.L7,
-li.L8 { list-style-type: none }
-/* Alternate shading for lines */
-li.L1,
-li.L3,
-li.L5,
-li.L7,
-li.L9 { background: #eee }
-
-@media print {
- .str { color: #060; }
- .kwd { color: #006; font-weight: bold; }
- .com { color: #600; font-style: italic; }
- .typ { color: #404; font-weight: bold; }
- .lit { color: #044; }
- .pun { color: #440; }
- .pln { color: #000; }
- .tag { color: #006; font-weight: bold; }
- .atn { color: #404; }
- .atv { color: #060; }
-}
-
-
-/* correct additional line return at top of html diaplay*/
-code>:first-child{
- display: none;
-} \ No newline at end of file
diff --git a/toolkit/components/microformats/test/static/css/testrunner.css b/toolkit/components/microformats/test/static/css/testrunner.css
deleted file mode 100644
index 0064b139c6..0000000000
--- a/toolkit/components/microformats/test/static/css/testrunner.css
+++ /dev/null
@@ -1,367 +0,0 @@
-/*
-All content and code is released into the public domain
-http://en.wikipedia.org/wiki/public_domain
-
-Contributors
-Glenn Jones - http://glennjones.net/
-*/
-
-
-
-
-@import url(https://fonts.googleapis.com/css?family=Lato:300italic,700italic,300,700);
-
-body {
- padding:50px;
- font:1em "Helvetica Neue", Helvetica, Arial, sans-serif;
- color:#333;
- font-weight:300;
- border-top: 5px solid #302F2D;
- margin: 0;
-}
-
-h1, h2, h3, h4, h5, h6 {
- color:#222;
- font-weight: normal;
-}
-
-p, ul, ol, table, pre, dl {
- margin:0 0 20px;
-}
-
-h1, h2, h3 {
- margin-top: 50px;
- margin-bottom: 10px;
- font-family: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
-}
-
-h1 {
- font-size: 2em;
-}
-
-h2, h3 {
- font-size: 1.5em;
-}
-
-/* the first h1 in a page */
-h1:first-of-type{
- margin-top: 0;
- font-weight: bold;
-}
-
-a {
- color: #39c;
- font-weight: 300;
- text-decoration: none;
-}
-
-a:hover {
- text-decoration: underline;
-}
-
-a[name]{
- color: #333;
-}
-
-a[name]:hover {
- text-decoration: none;
-}
-
-blockquote {
- border-left: 1px solid #e5e5e5;
- margin: 0;
- padding: 0 0 0 20px;
- font-style: italic;
-}
-
-code, pre {
- font-family: Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal;
- font-size: 12px;
- margin: 0;
-}
-
-pre {
- padding: 8px 15px;
- border-radius: 5px;
- border: 1px solid #e5e5e5;
- overflow-x: auto;
- color: #fff;
- margin: 0;
-}
-
-table {
- border-collapse: collapse;
-}
-
-th, td {
- text-align: left;
- padding: 2px 10px;
- border-bottom: 1px solid #e5e5e5;
- font-weight: 300;
-}
-
-th{
- background-color: #333;
- color:#fff;
-}
-
-td a{
- font-weight: 300;
-}
-
-dt {
- color:#444;
- font-weight:700;
-}
-
-img {
- max-width:100%;
-}
-
-li{
- padding: 0.25em 0 0.25em 0;
-}
-
-
-button, input[type="submit"], input[type="button"], .button {
- display: inline-block;
- padding-top: 0.4em;
- padding-right: 1em;
- padding-left: 1em;
- padding-bottom: 0.5em;
- margin-bottom: 0;
- font-weight: 200;
- font-size: 1rem;
- text-align: center;
- white-space: nowrap;
- cursor: pointer;
- background-image: none;
- border: 1px solid transparent;
- border-radius: 3px;
- background-color: #33a0e8;
- color: #fff;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- -o-user-select: none;
- user-select: none;
-}
-
-select {
- height: 34px;
- padding: 6px 12px;
- font-size: 14px;
- line-height: 1.42857143;
- color: #555;
- background-color: #fff;
- background-image: none;
- border: 1px solid #ccc;
- border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
- -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
- transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
-}
-
-option {
- padding: 2em;
-}
-
-footer{
- margin-top: 8em;
- text-align: center;
-}
-
-
-/* The Magnificent Clearfix: Updated to prevent margin-collapsing on child elements.
- j.mp/bestclearfix */
-.clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; overflow: hidden; }
-.clearfix:after { clear: both; }
-/* Fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin-padding-bottom-of-page */
-.clearfix { zoom: 1; }
-
-.test-counts{
- font-weight: 700;
- margin-bottom: 4em;
-}
-
-.test-detail{
- display:none;
-}
-
-.all-test-list, .test-result-list{
- list-style: none;
- margin: 0;
- padding: 0;
- display: block;
- float: left;
-}
-
-.all-test-list li .test-result-list li{
- padding: 0.2em 0 0.2em 0;
- white-space: nowrap;
- cursor: pointer;
-}
-
-.all-test-list li::hover, .test-result-list li::hover{
- text-decoration: underline;
-}
-
-.all-test-list li.test-error a, .test-result-list li.test-error a{
- color: red;
- text-decoration: underline;
-}
-
-.flexbox-container {
- display: -ms-flex;
- display: -webkit-flex;
- display: flex;
-}
-
-.flexbox-container > section {
- margin-bottom: 3em;
-}
-
-.flexbox-container > section:first-child {
- width: 20%;
- margin-right: 20px;
-}
-
-.flexbox-container > section:nth-child(2) {
- padding-left: 1em;
- width: 80%;
-}
-
-
-@media (max-width: 1400px) {
- .flexbox-container > section:first-child {
- width: 25%;
- }
-
- .flexbox-container > section:nth-child(2) {
- width: 75%;
- }
-}
-
-@media (max-width: 1200px) {
- .flexbox-container > section:first-child {
- width: 30%;
- }
-
- .flexbox-container > section:nth-child(2) {
- width: 70%;
- }
-}
-
-
-@media (max-width: 1000px) {
- .flexbox-container > section:first-child {
- width: 35%;
- }
-
- .flexbox-container > section:nth-child(2) {
- width: 65%;
- }
-}
-
-
-
-
-
-
-#test-status {
- margin-top: 0;
-}
-
-.test-passed{
- border-left: 10px solid green;
-}
-
-.test-failed{
- border-left: 10px solid red;
-}
-
-.differences-description{
- margin-top: 2em;
-}
-
-.differences-description li{
- padding: 0;
-}
-
-.failed{
- color: red;
-}
-
-#test-list-by-version section{
- width: 30%;
- margin-right: 20px;
-}
-
-.test-container{
- padding-left: 1em;
-}
-
-
-#textcontent-test textarea{
- font-size: 1em;
- min-height: 6em;
- min-width: 40em;
- padding: 0.5em;
-}
-
-#textcontent-test input{
- font-size: 1em;
-}
-
-
-/* Tool interface */
-
-.tool-interface input[type="text"], input[type="url"] {
- width: 20em;
- padding: 0.4em;
- border: 1px solid #999;
- border-radius: 0.4em;
- color: #333;
- font-size: 1em
-}
-
-.tool-interface label {
- display: inline-block;
- width: 5em;
-}
-
-.tool-interface select {
- padding: 0.2em;
- font-family: open_sansregular, calibri, arial, helvetica, 'lucida grande', 'lucida sans unicode', verdana, sans-serif;
-}
-
-.tool-interface option{
- padding: 0.2em;
-}
-
-.tool-interface textarea{
- width: 100%;
- height: 16em;
- border: 1px solid #999;
- border-radius: 0.4em;
- font-size: 1em;
- font-family: open_sansregular, calibri, arial, helvetica, 'lucida grande', 'lucida sans unicode', verdana, sans-serif;
-}
-
-.tool-interface .button{
- margin-left: 5.2em;
-}
-
-.tool-interface label.checkbox-label{
- width: auto;
-}
-
-.tool-interface .checkbox{
- margin-left: 5.2em;
-}
-
-select.indent {
- margin-left: 5em;
-}
diff --git a/toolkit/components/microformats/test/static/images/logo.gif b/toolkit/components/microformats/test/static/images/logo.gif
deleted file mode 100644
index 96c965e702..0000000000
--- a/toolkit/components/microformats/test/static/images/logo.gif
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/microformats/test/static/images/photo.gif b/toolkit/components/microformats/test/static/images/photo.gif
deleted file mode 100644
index 96c965e702..0000000000
--- a/toolkit/components/microformats/test/static/images/photo.gif
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/microformats/test/static/javascript/DOMParser.js b/toolkit/components/microformats/test/static/javascript/DOMParser.js
deleted file mode 100644
index fa26bcdfd9..0000000000
--- a/toolkit/components/microformats/test/static/javascript/DOMParser.js
+++ /dev/null
@@ -1,99 +0,0 @@
-
-// Based on https://gist.github.com/1129031 By Eli Grey, http://eligrey.com - Public domain.
-
-// DO NOT use https://developer.mozilla.org/en-US/docs/Web/API/DOMParser example polyfill
-// as it does not work with earliar version of chrome
-
-
-(function(DOMParser) {
- "use strict";
-
- var DOMParser_proto;
- var real_parseFromString;
- var textHTML; // Flag for text/html support
- var textXML; // Flag for text/xml support
- var htmlElInnerHTML; // Flag for support for setting html element's innerHTML
-
- // Stop here if DOMParser not defined
- if (!DOMParser) return;
-
- // Firefox, Opera and IE throw errors on unsupported types
- try {
- // WebKit returns null on unsupported types
- textHTML = !!(new DOMParser).parseFromString('', 'text/html');
-
- } catch (er) {
- textHTML = false;
- }
-
- // If text/html supported, don't need to do anything.
- if (textHTML) return;
-
- // Next try setting innerHTML of a created document
- // IE 9 and lower will throw an error (can't set innerHTML of its HTML element)
- try {
- var doc = document.implementation.createHTMLDocument('');
- doc.documentElement.innerHTML = '<title></title><div></div>';
- htmlElInnerHTML = true;
-
- } catch (er) {
- htmlElInnerHTML = false;
- }
-
- // If if that failed, try text/xml
- if (!htmlElInnerHTML) {
-
- try {
- textXML = !!(new DOMParser).parseFromString('', 'text/xml');
-
- } catch (er) {
- textHTML = false;
- }
- }
-
- // 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)) {
- DOMParser_proto = DOMParser.prototype;
- real_parseFromString = DOMParser_proto.parseFromString;
-
- DOMParser_proto.parseFromString = function (markup, type) {
-
- // Only do this if type is text/html
- if (/^\s*text\/html\s*(?:;|$)/i.test(type)) {
- var doc, doc_el, first_el;
-
- // Use innerHTML if supported
- if (htmlElInnerHTML) {
- doc = document.implementation.createHTMLDocument("");
- doc_el = doc.documentElement;
- doc_el.innerHTML = markup;
- first_el = doc_el.firstElementChild;
-
- // Otherwise use XML method
- } else if (textXML) {
-
- // Make sure markup is wrapped in HTML tags
- // Should probably allow for a DOCTYPE
- if (!(/^<html.*html>$/i.test(markup))) {
- markup = '<html>' + markup + '<\/html>';
- }
- doc = (new DOMParser).parseFromString(markup, 'text/xml');
- doc_el = doc.documentElement;
- first_el = doc_el.firstElementChild;
- }
-
- // Is this an entire document or a fragment?
- if (doc_el.childElementCount == 1 && first_el.localName.toLowerCase() == 'html') {
- doc.replaceChild(first_el, doc_el);
- }
-
- return doc;
-
- // If not text/html, send as-is to host method
- } else {
- return real_parseFromString.apply(this, arguments);
- }
- };
- }
-}(DOMParser));
diff --git a/toolkit/components/microformats/test/static/javascript/beautify.js b/toolkit/components/microformats/test/static/javascript/beautify.js
deleted file mode 100644
index 55d06cb08b..0000000000
--- a/toolkit/components/microformats/test/static/javascript/beautify.js
+++ /dev/null
@@ -1,518 +0,0 @@
-/*
-
- JS Beautifier
----------------
-
- Written by Einars "elfz" Lielmanis, <elfz@laacz.lv>
- http://elfz.laacz.lv/beautify/
-
- Originally converted to javascript by Vital, <vital76@gmail.com>
- http://my.opera.com/Vital/blog/2007/11/21/javascript-beautify-on-javascript-translated
-
-
- You are free to use this in any way you want, in case you find this useful or working for you.
-
- Usage:
- js_beautify(js_source_text);
-
-
-*/
-
-
-function js_beautify(js_source_text, indent_size, indent_character)
-{
-
- var input, output, token_text, last_type, current_mode, modes, indent_level, indent_string;
- var whitespace, wordchar, punct;
-
- indent_character = indent_character || ' ';
- indent_size = indent_size || 4;
-
- indent_string = '';
- while (indent_size--) indent_string += indent_character;
-
- input = js_source_text;
-
- last_word = ''; // last 'TK_WORD' passed
- last_type = 'TK_START_EXPR'; // last token type
- last_text = ''; // last token text
- output = '';
-
- whitespace = "\n\r\t ".split('');
- wordchar = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$'.split('');
- punct = '+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! !! , : ? ^ ^= |='.split(' ');
-
- // words which should always start on new line.
- line_starters = 'continue,try,throw,return,var,if,switch,case,default,for,while,break,function'.split(',');
-
- // states showing if we are currently in expression (i.e. "if" case) - 'EXPRESSION', or in usual block (like, procedure), 'BLOCK'.
- // some formatting depends on that.
- current_mode = 'BLOCK';
- modes = [current_mode];
-
- indent_level = 0;
- parser_pos = 0; // parser position
- in_case = false; // flag for parser that case/default has been processed, and next colon needs special attention
- while (true) {
- var t = get_next_token(parser_pos);
- token_text = t[0];
- token_type = t[1];
- if (token_type == 'TK_EOF') {
- break;
- }
-
- switch (token_type) {
-
- case 'TK_START_EXPR':
-
- set_mode('EXPRESSION');
- if (last_type == 'TK_END_EXPR' || last_type == 'TK_START_EXPR') {
- // do nothing on (( and )( and ][ and ]( ..
- } else if (last_type != 'TK_WORD' && last_type != 'TK_OPERATOR') {
- print_space();
- } else if (in_array(last_word, line_starters) && last_word != 'function') {
- print_space();
- }
- print_token();
- break;
-
- case 'TK_END_EXPR':
-
- print_token();
- restore_mode();
- break;
-
- case 'TK_START_BLOCK':
-
- set_mode('BLOCK');
- if (last_type != 'TK_OPERATOR' && last_type != 'TK_START_EXPR') {
- if (last_type == 'TK_START_BLOCK') {
- print_newline();
- } else {
- print_space();
- }
- }
- print_token();
- indent();
- break;
-
- case 'TK_END_BLOCK':
-
- if (last_type == 'TK_END_EXPR') {
- unindent();
- print_newline();
- } else if (last_type == 'TK_END_BLOCK') {
- unindent();
- print_newline();
- } else if (last_type == 'TK_START_BLOCK') {
- // nothing
- unindent();
- } else {
- unindent();
- print_newline();
- }
- print_token();
- restore_mode();
- break;
-
- case 'TK_WORD':
-
- if (token_text == 'case' || token_text == 'default') {
- if (last_text == ':') {
- // switch cases following one another
- remove_indent();
- } else {
- // case statement starts in the same line where switch
- unindent();
- print_newline();
- indent();
- }
- print_token();
- in_case = true;
- break;
- }
-
- prefix = 'NONE';
- if (last_type == 'TK_END_BLOCK') {
- if (!in_array(token_text.toLowerCase(), ['else', 'catch', 'finally'])) {
- prefix = 'NEWLINE';
- } else {
- prefix = 'SPACE';
- print_space();
- }
- } else if (last_type == 'TK_END_COMMAND' && current_mode == 'BLOCK') {
- prefix = 'NEWLINE';
- } else if (last_type == 'TK_END_COMMAND' && current_mode == 'EXPRESSION') {
- prefix = 'SPACE';
- } else if (last_type == 'TK_WORD') {
- prefix = 'SPACE';
- } else if (last_type == 'TK_START_BLOCK') {
- prefix = 'NEWLINE';
- } else if (last_type == 'TK_END_EXPR') {
- print_space();
- prefix = 'NEWLINE';
- }
-
- if (in_array(token_text, line_starters) || prefix == 'NEWLINE') {
-
- if (last_text == 'else') {
- // no need to force newline on else break
- print_space();
- } else if ((last_type == 'TK_START_EXPR' || last_text == '=') && token_text == 'function') {
- // no need to force newline on 'function': (function
- // DONOTHING
- } else if (last_type == 'TK_WORD' && (last_text == 'return' || last_text == 'throw')) {
- // no newline between 'return nnn'
- print_space();
- } else
- if (last_type != 'TK_END_EXPR') {
- if ((last_type != 'TK_START_EXPR' || token_text != 'var') && last_text != ':') {
- // no need to force newline on 'var': for (var x = 0...)
- if (token_text == 'if' && last_type == 'TK_WORD' && last_word == 'else') {
- // no newline for } else if {
- print_space();
- } else {
- print_newline();
- }
- }
- }
- } else if (prefix == 'SPACE') {
- print_space();
- }
- print_token();
- last_word = token_text;
- break;
-
- case 'TK_END_COMMAND':
-
- print_token();
- break;
-
- case 'TK_STRING':
-
- if (last_type == 'TK_START_BLOCK' || last_type == 'TK_END_BLOCK') {
- print_newline();
- } else if (last_type == 'TK_WORD') {
- print_space();
- }
- print_token();
- break;
-
- case 'TK_OPERATOR':
- start_delim = true;
- end_delim = true;
-
- if (token_text == ':' && in_case) {
- print_token(); // colon really asks for separate treatment
- print_newline();
- break;
- }
-
- in_case = false;
-
- if (token_text == ',') {
- if (last_type == 'TK_END_BLOCK') {
- print_token();
- print_newline();
- } else {
- if (current_mode == 'BLOCK') {
- print_token();
- print_newline();
- } else {
- print_token();
- print_space();
- }
- }
- break;
- } else if (token_text == '--' || token_text == '++') { // unary operators special case
- if (last_text == ';') {
- // space for (;; ++i)
- start_delim = true;
- end_delim = false;
- } else {
- start_delim = false;
- end_delim = false;
- }
- } else if (token_text == '!' && last_type == 'TK_START_EXPR') {
- // special case handling: if (!a)
- start_delim = false;
- end_delim = false;
- } else if (last_type == 'TK_OPERATOR') {
- start_delim = false;
- end_delim = false;
- } else if (last_type == 'TK_END_EXPR') {
- start_delim = true;
- end_delim = true;
- } else if (token_text == '.') {
- // decimal digits or object.property
- start_delim = false;
- end_delim = false;
-
- } else if (token_text == ':') {
- // zz: xx
- // can't differentiate ternary op, so for now it's a ? b: c; without space before colon
- start_delim = false;
- }
- if (start_delim) {
- print_space();
- }
-
- print_token();
-
- if (end_delim) {
- print_space();
- }
- break;
-
- case 'TK_BLOCK_COMMENT':
-
- print_newline();
- print_token();
- print_newline();
- break;
-
- case 'TK_COMMENT':
-
- // print_newline();
- print_space();
- print_token();
- print_newline();
- break;
-
- case 'TK_UNKNOWN':
- print_token();
- break;
- }
-
- if (token_type != 'TK_COMMENT') {
- last_type = token_type;
- last_text = token_text;
- }
- }
-
- return output;
-
-
-
-
- function print_newline(ignore_repeated)
- {
- ignore_repeated = typeof ignore_repeated == 'undefined' ? true: ignore_repeated;
- output = output.replace(/[ \t]+$/, ''); // remove possible indent
- if (output == '') return; // no newline on start of file
- if (output.substr(output.length - 1) != "\n" || !ignore_repeated) {
- output += "\n";
- }
- for (var i = 0; i < indent_level; i++) {
- output += indent_string;
- }
- }
-
-
-
- function print_space()
- {
- if (output && output.substr(output.length - 1) != ' ' && output.substr(output.length - 1) != '\n') { // prevent occassional duplicate space
- output += ' ';
- }
- }
-
-
- function print_token()
- {
- output += token_text;
- }
-
- function indent()
- {
- indent_level++;
- }
-
-
- function unindent()
- {
- if (indent_level) {
- indent_level--;
- }
- }
-
-
- function remove_indent()
- {
- if (output.substr(output.length - indent_string.length) == indent_string) {
- output = output.substr(0, output.length - indent_string.length);
- }
- }
-
-
- function set_mode(mode)
- {
- modes.push(current_mode);
- current_mode = mode;
- }
-
-
- function restore_mode()
- {
- current_mode = modes.pop();
- }
-
-
-
- function get_next_token()
- {
- var n_newlines = 0;
- var c = '';
-
- do {
- if (parser_pos >= input.length) {
- return ['', 'TK_EOF'];
- }
- c = input.charAt(parser_pos);
-
- parser_pos += 1;
- if (c == "\n") {
- n_newlines += 1;
- }
- }
- while (in_array(c, whitespace));
-
- if (n_newlines > 1) {
- for (var i = 0; i < n_newlines; i++) {
- print_newline(i == 0);
- }
- }
- var wanted_newline = n_newlines == 1;
-
-
- if (in_array(c, wordchar)) {
- if (parser_pos < input.length) {
- while (in_array(input.charAt(parser_pos), wordchar)) {
- c += input.charAt(parser_pos);
- parser_pos += 1;
- if (parser_pos == input.length) break;
- }
- }
-
- // small and surprisingly unugly hack for 1E-10 representation
- if (parser_pos != input.length && c.match(/^[0-9]+[Ee]$/) && input.charAt(parser_pos) == '-') {
- parser_pos += 1;
-
- var t = get_next_token(parser_pos);
- next_word = t[0];
- next_type = t[1];
-
- c += '-' + next_word;
- return [c, 'TK_WORD'];
- }
-
- if (c == 'in') { // hack for 'in' operator
- return [c, 'TK_OPERATOR'];
- }
- return [c, 'TK_WORD'];
- }
-
- if (c == '(' || c == '[') {
- return [c, 'TK_START_EXPR'];
- }
-
- if (c == ')' || c == ']') {
- return [c, 'TK_END_EXPR'];
- }
-
- if (c == '{') {
- return [c, 'TK_START_BLOCK'];
- }
-
- if (c == '}') {
- return [c, 'TK_END_BLOCK'];
- }
-
- if (c == ';') {
- return [c, 'TK_END_COMMAND'];
- }
-
- if (c == '/') {
- // peek for comment /* ... */
- if (input.charAt(parser_pos) == '*') {
- comment = '';
- parser_pos += 1;
- if (parser_pos < input.length) {
- while (! (input.charAt(parser_pos) == '*' && input.charAt(parser_pos + 1) && input.charAt(parser_pos + 1) == '/') && parser_pos < input.length) {
- comment += input.charAt(parser_pos);
- parser_pos += 1;
- if (parser_pos >= input.length) break;
- }
- }
- parser_pos += 2;
- return ['/*' + comment + '*/', 'TK_BLOCK_COMMENT'];
- }
- // peek for comment // ...
- if (input.charAt(parser_pos) == '/') {
- comment = c;
- while (input.charAt(parser_pos) != "\x0d" && input.charAt(parser_pos) != "\x0a") {
- comment += input.charAt(parser_pos);
- parser_pos += 1;
- if (parser_pos >= input.length) break;
- }
- parser_pos += 1;
- if (wanted_newline) {
- print_newline();
- }
- return [comment, 'TK_COMMENT'];
- }
-
- }
-
- if (c == "'" || // string
- c == '"' || // string
- (c == '/' &&
- ((last_type == 'TK_WORD' && last_text == 'return') || (last_type == 'TK_START_EXPR' || last_type == 'TK_END_BLOCK' || last_type == 'TK_OPERATOR' || last_type == 'TK_EOF' || last_type == 'TK_END_COMMAND')))) { // regexp
- sep = c;
- c = '';
- esc = false;
-
- if (parser_pos < input.length) {
-
- while (esc || input.charAt(parser_pos) != sep) {
- c += input.charAt(parser_pos);
- if (!esc) {
- esc = input.charAt(parser_pos) == '\\';
- } else {
- esc = false;
- }
- parser_pos += 1;
- if (parser_pos >= input.length) break;
- }
-
- }
-
- parser_pos += 1;
- if (last_type == 'TK_END_COMMAND') {
- print_newline();
- }
- return [sep + c + sep, 'TK_STRING'];
- }
-
- if (in_array(c, punct)) {
- while (parser_pos < input.length && in_array(c + input.charAt(parser_pos), punct)) {
- c += input.charAt(parser_pos);
- parser_pos += 1;
- if (parser_pos >= input.length) break;
- }
- return [c, 'TK_OPERATOR'];
- }
-
- return [c, 'TK_UNKNOWN'];
- }
-
-
- function in_array(what, arr)
- {
- for (var i = 0; i < arr.length; i++)
- {
- if (arr[i] == what) return true;
- }
- return false;
- }
-}
diff --git a/toolkit/components/microformats/test/static/javascript/chai.js b/toolkit/components/microformats/test/static/javascript/chai.js
deleted file mode 100644
index bbdbe907b8..0000000000
--- a/toolkit/components/microformats/test/static/javascript/chai.js
+++ /dev/null
@@ -1,5351 +0,0 @@
-(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.chai = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
-/*!
- * chai
- * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-var used = [];
-exports = module.exports = {};
-
-/*!
- * Chai version
- */
-
-exports.version = '3.0.0';
-
-/*!
- * Assertion Error
- */
-
-exports.AssertionError = require('assertion-error');
-
-/*!
- * Utils for plugins (not exported)
- */
-
-var util = require('./chai/utils');
-
-/**
- * # .use(function)
- *
- * Provides a way to extend the internals of Chai
- *
- * @param {Function}
- * @returns {this} for chaining
- * @api public
- */
-
-exports.use = function (fn) {
- if (!~used.indexOf(fn)) {
- fn(this, util);
- used.push(fn);
- }
-
- return this;
-};
-
-/*!
- * Utility Functions
- */
-
-exports.util = util;
-
-/*!
- * Configuration
- */
-
-var config = require('./chai/config');
-exports.config = config;
-
-/*!
- * Primary `Assertion` prototype
- */
-
-var assertion = require('./chai/assertion');
-exports.use(assertion);
-
-/*!
- * Core Assertions
- */
-
-var core = require('./chai/core/assertions');
-exports.use(core);
-
-/*!
- * Expect interface
- */
-
-var expect = require('./chai/interface/expect');
-exports.use(expect);
-
-/*!
- * Should interface
- */
-
-var should = require('./chai/interface/should');
-exports.use(should);
-
-/*!
- * Assert interface
- */
-
-var assert = require('./chai/interface/assert');
-exports.use(assert);
-
-},{"./chai/assertion":2,"./chai/config":3,"./chai/core/assertions":4,"./chai/interface/assert":5,"./chai/interface/expect":6,"./chai/interface/should":7,"./chai/utils":20,"assertion-error":28}],2:[function(require,module,exports){
-/*!
- * chai
- * http://chaijs.com
- * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-var config = require('./config');
-
-module.exports = function (_chai, util) {
- /*!
- * Module dependencies.
- */
-
- var AssertionError = _chai.AssertionError
- , flag = util.flag;
-
- /*!
- * Module export.
- */
-
- _chai.Assertion = Assertion;
-
- /*!
- * Assertion Constructor
- *
- * Creates object for chaining.
- *
- * @api private
- */
-
- function Assertion (obj, msg, stack) {
- flag(this, 'ssfi', stack || arguments.callee);
- flag(this, 'object', obj);
- flag(this, 'message', msg);
- }
-
- Object.defineProperty(Assertion, 'includeStack', {
- get: function() {
- console.warn('Assertion.includeStack is deprecated, use chai.config.includeStack instead.');
- return config.includeStack;
- },
- set: function(value) {
- console.warn('Assertion.includeStack is deprecated, use chai.config.includeStack instead.');
- config.includeStack = value;
- }
- });
-
- Object.defineProperty(Assertion, 'showDiff', {
- get: function() {
- console.warn('Assertion.showDiff is deprecated, use chai.config.showDiff instead.');
- return config.showDiff;
- },
- set: function(value) {
- console.warn('Assertion.showDiff is deprecated, use chai.config.showDiff instead.');
- config.showDiff = value;
- }
- });
-
- Assertion.addProperty = function (name, fn) {
- util.addProperty(this.prototype, name, fn);
- };
-
- Assertion.addMethod = function (name, fn) {
- util.addMethod(this.prototype, name, fn);
- };
-
- Assertion.addChainableMethod = function (name, fn, chainingBehavior) {
- util.addChainableMethod(this.prototype, name, fn, chainingBehavior);
- };
-
- Assertion.overwriteProperty = function (name, fn) {
- util.overwriteProperty(this.prototype, name, fn);
- };
-
- Assertion.overwriteMethod = function (name, fn) {
- util.overwriteMethod(this.prototype, name, fn);
- };
-
- Assertion.overwriteChainableMethod = function (name, fn, chainingBehavior) {
- util.overwriteChainableMethod(this.prototype, name, fn, chainingBehavior);
- };
-
- /**
- * ### .assert(expression, message, negateMessage, expected, actual, showDiff)
- *
- * Executes an expression and check expectations. Throws AssertionError for reporting if test doesn't pass.
- *
- * @name assert
- * @param {Philosophical} expression to be tested
- * @param {String or Function} message or function that returns message to display if expression fails
- * @param {String or Function} negatedMessage or function that returns negatedMessage to display if negated expression fails
- * @param {Mixed} expected value (remember to check for negation)
- * @param {Mixed} actual (optional) will default to `this.obj`
- * @param {Boolean} showDiff (optional) when set to `true`, assert will display a diff in addition to the message if expression fails
- * @api private
- */
-
- Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual, showDiff) {
- var ok = util.test(this, arguments);
- if (true !== showDiff) showDiff = false;
- if (true !== config.showDiff) showDiff = false;
-
- if (!ok) {
- msg = util.getMessage(this, arguments)
- var actual = util.getActual(this, arguments);
- throw new AssertionError(msg, {
- actual: actual
- , expected: expected
- , showDiff: showDiff
- }, (config.includeStack) ? this.assert : flag(this, 'ssfi'));
- }
- };
-
- /*!
- * ### ._obj
- *
- * Quick reference to stored `actual` value for plugin developers.
- *
- * @api private
- */
-
- Object.defineProperty(Assertion.prototype, '_obj',
- { get: function () {
- return flag(this, 'object');
- }
- , set: function (val) {
- flag(this, 'object', val);
- }
- });
-};
-
-},{"./config":3}],3:[function(require,module,exports){
-module.exports = {
-
- /**
- * ### config.includeStack
- *
- * User configurable property, influences whether stack trace
- * is included in Assertion error message. Default of false
- * suppresses stack trace in the error message.
- *
- * chai.config.includeStack = true; // enable stack on error
- *
- * @param {Boolean}
- * @api public
- */
-
- includeStack: false,
-
- /**
- * ### config.showDiff
- *
- * User configurable property, influences whether or not
- * the `showDiff` flag should be included in the thrown
- * AssertionErrors. `false` will always be `false`; `true`
- * will be true when the assertion has requested a diff
- * be shown.
- *
- * @param {Boolean}
- * @api public
- */
-
- showDiff: true,
-
- /**
- * ### config.truncateThreshold
- *
- * User configurable property, sets length threshold for actual and
- * expected values in assertion errors. If this threshold is exceeded, for
- * example for large data structures, the value is replaced with something
- * like `[ Array(3) ]` or `{ Object (prop1, prop2) }`.
- *
- * Set it to zero if you want to disable truncating altogether.
- *
- * This is especially userful when doing assertions on arrays: having this
- * set to a reasonable large value makes the failure messages readily
- * inspectable.
- *
- * chai.config.truncateThreshold = 0; // disable truncating
- *
- * @param {Number}
- * @api public
- */
-
- truncateThreshold: 40
-
-};
-
-},{}],4:[function(require,module,exports){
-/*!
- * chai
- * http://chaijs.com
- * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-module.exports = function (chai, _) {
- var Assertion = chai.Assertion
- , toString = Object.prototype.toString
- , flag = _.flag;
-
- /**
- * ### Language Chains
- *
- * The following are provided as chainable getters to
- * improve the readability of your assertions. They
- * do not provide testing capabilities unless they
- * have been overwritten by a plugin.
- *
- * **Chains**
- *
- * - to
- * - be
- * - been
- * - is
- * - that
- * - which
- * - and
- * - has
- * - have
- * - with
- * - at
- * - of
- * - same
- *
- * @name language chains
- * @api public
- */
-
- [ 'to', 'be', 'been'
- , 'is', 'and', 'has', 'have'
- , 'with', 'that', 'which', 'at'
- , 'of', 'same' ].forEach(function (chain) {
- Assertion.addProperty(chain, function () {
- return this;
- });
- });
-
- /**
- * ### .not
- *
- * Negates any of assertions following in the chain.
- *
- * expect(foo).to.not.equal('bar');
- * expect(goodFn).to.not.throw(Error);
- * expect({ foo: 'baz' }).to.have.property('foo')
- * .and.not.equal('bar');
- *
- * @name not
- * @api public
- */
-
- Assertion.addProperty('not', function () {
- flag(this, 'negate', true);
- });
-
- /**
- * ### .deep
- *
- * Sets the `deep` flag, later used by the `equal` and
- * `property` assertions.
- *
- * expect(foo).to.deep.equal({ bar: 'baz' });
- * expect({ foo: { bar: { baz: 'quux' } } })
- * .to.have.deep.property('foo.bar.baz', 'quux');
- *
- * `.deep.property` special characters can be escaped
- * by adding two slashes before the `.` or `[]`.
- *
- * var deepCss = { '.link': { '[target]': 42 }};
- * expect(deepCss).to.have.deep.property('\\.link.\\[target\\]', 42);
- *
- * @name deep
- * @api public
- */
-
- Assertion.addProperty('deep', function () {
- flag(this, 'deep', true);
- });
-
- /**
- * ### .any
- *
- * Sets the `any` flag, (opposite of the `all` flag)
- * later used in the `keys` assertion.
- *
- * expect(foo).to.have.any.keys('bar', 'baz');
- *
- * @name any
- * @api public
- */
-
- Assertion.addProperty('any', function () {
- flag(this, 'any', true);
- flag(this, 'all', false)
- });
-
-
- /**
- * ### .all
- *
- * Sets the `all` flag (opposite of the `any` flag)
- * later used by the `keys` assertion.
- *
- * expect(foo).to.have.all.keys('bar', 'baz');
- *
- * @name all
- * @api public
- */
-
- Assertion.addProperty('all', function () {
- flag(this, 'all', true);
- flag(this, 'any', false);
- });
-
- /**
- * ### .a(type)
- *
- * The `a` and `an` assertions are aliases that can be
- * used either as language chains or to assert a value's
- * type.
- *
- * // typeof
- * expect('test').to.be.a('string');
- * expect({ foo: 'bar' }).to.be.an('object');
- * expect(null).to.be.a('null');
- * expect(undefined).to.be.an('undefined');
- * expect(new Promise).to.be.a('promise');
- * expect(new Float32Array()).to.be.a('float32array');
- * expect(Symbol()).to.be.a('symbol');
- *
- * // es6 overrides
- * expect({[Symbol.toStringTag]:()=>'foo'}).to.be.a('foo');
- *
- * // language chain
- * expect(foo).to.be.an.instanceof(Foo);
- *
- * @name a
- * @alias an
- * @param {String} type
- * @param {String} message _optional_
- * @api public
- */
-
- function an (type, msg) {
- if (msg) flag(this, 'message', msg);
- type = type.toLowerCase();
- var obj = flag(this, 'object')
- , article = ~[ 'a', 'e', 'i', 'o', 'u' ].indexOf(type.charAt(0)) ? 'an ' : 'a ';
-
- this.assert(
- type === _.type(obj)
- , 'expected #{this} to be ' + article + type
- , 'expected #{this} not to be ' + article + type
- );
- }
-
- Assertion.addChainableMethod('an', an);
- Assertion.addChainableMethod('a', an);
-
- /**
- * ### .include(value)
- *
- * The `include` and `contain` assertions can be used as either property
- * based language chains or as methods to assert the inclusion of an object
- * in an array or a substring in a string. When used as language chains,
- * they toggle the `contains` flag for the `keys` assertion.
- *
- * expect([1,2,3]).to.include(2);
- * expect('foobar').to.contain('foo');
- * expect({ foo: 'bar', hello: 'universe' }).to.include.keys('foo');
- *
- * @name include
- * @alias contain
- * @alias includes
- * @alias contains
- * @param {Object|String|Number} obj
- * @param {String} message _optional_
- * @api public
- */
-
- function includeChainingBehavior () {
- flag(this, 'contains', true);
- }
-
- function include (val, msg) {
- if (msg) flag(this, 'message', msg);
- var obj = flag(this, 'object');
- var expected = false;
- if (_.type(obj) === 'array' && _.type(val) === 'object') {
- for (var i in obj) {
- if (_.eql(obj[i], val)) {
- expected = true;
- break;
- }
- }
- } else if (_.type(val) === 'object') {
- if (!flag(this, 'negate')) {
- for (var k in val) new Assertion(obj).property(k, val[k]);
- return;
- }
- var subset = {};
- for (k in val) subset[k] = obj[k];
- expected = _.eql(subset, val);
- } else {
- expected = obj && ~obj.indexOf(val);
- }
- this.assert(
- expected
- , 'expected #{this} to include ' + _.inspect(val)
- , 'expected #{this} to not include ' + _.inspect(val));
- }
-
- Assertion.addChainableMethod('include', include, includeChainingBehavior);
- Assertion.addChainableMethod('contain', include, includeChainingBehavior);
- Assertion.addChainableMethod('contains', include, includeChainingBehavior);
- Assertion.addChainableMethod('includes', include, includeChainingBehavior);
-
- /**
- * ### .ok
- *
- * Asserts that the target is truthy.
- *
- * expect('everthing').to.be.ok;
- * expect(1).to.be.ok;
- * expect(false).to.not.be.ok;
- * expect(undefined).to.not.be.ok;
- * expect(null).to.not.be.ok;
- *
- * @name ok
- * @api public
- */
-
- Assertion.addProperty('ok', function () {
- this.assert(
- flag(this, 'object')
- , 'expected #{this} to be truthy'
- , 'expected #{this} to be falsy');
- });
-
- /**
- * ### .true
- *
- * Asserts that the target is `true`.
- *
- * expect(true).to.be.true;
- * expect(1).to.not.be.true;
- *
- * @name true
- * @api public
- */
-
- Assertion.addProperty('true', function () {
- this.assert(
- true === flag(this, 'object')
- , 'expected #{this} to be true'
- , 'expected #{this} to be false'
- , this.negate ? false : true
- );
- });
-
- /**
- * ### .false
- *
- * Asserts that the target is `false`.
- *
- * expect(false).to.be.false;
- * expect(0).to.not.be.false;
- *
- * @name false
- * @api public
- */
-
- Assertion.addProperty('false', function () {
- this.assert(
- false === flag(this, 'object')
- , 'expected #{this} to be false'
- , 'expected #{this} to be true'
- , this.negate ? true : false
- );
- });
-
- /**
- * ### .null
- *
- * Asserts that the target is `null`.
- *
- * expect(null).to.be.null;
- * expect(undefined).to.not.be.null;
- *
- * @name null
- * @api public
- */
-
- Assertion.addProperty('null', function () {
- this.assert(
- null === flag(this, 'object')
- , 'expected #{this} to be null'
- , 'expected #{this} not to be null'
- );
- });
-
- /**
- * ### .undefined
- *
- * Asserts that the target is `undefined`.
- *
- * expect(undefined).to.be.undefined;
- * expect(null).to.not.be.undefined;
- *
- * @name undefined
- * @api public
- */
-
- Assertion.addProperty('undefined', function () {
- this.assert(
- undefined === flag(this, 'object')
- , 'expected #{this} to be undefined'
- , 'expected #{this} not to be undefined'
- );
- });
-
- /**
- * ### .exist
- *
- * Asserts that the target is neither `null` nor `undefined`.
- *
- * var foo = 'hi'
- * , bar = null
- * , baz;
- *
- * expect(foo).to.exist;
- * expect(bar).to.not.exist;
- * expect(baz).to.not.exist;
- *
- * @name exist
- * @api public
- */
-
- Assertion.addProperty('exist', function () {
- this.assert(
- null != flag(this, 'object')
- , 'expected #{this} to exist'
- , 'expected #{this} to not exist'
- );
- });
-
-
- /**
- * ### .empty
- *
- * Asserts that the target's length is `0`. For arrays and strings, it checks
- * the `length` property. For objects, it gets the count of
- * enumerable keys.
- *
- * expect([]).to.be.empty;
- * expect('').to.be.empty;
- * expect({}).to.be.empty;
- *
- * @name empty
- * @api public
- */
-
- Assertion.addProperty('empty', function () {
- var obj = flag(this, 'object')
- , expected = obj;
-
- if (Array.isArray(obj) || 'string' === typeof object) {
- expected = obj.length;
- } else if (typeof obj === 'object') {
- expected = Object.keys(obj).length;
- }
-
- this.assert(
- !expected
- , 'expected #{this} to be empty'
- , 'expected #{this} not to be empty'
- );
- });
-
- /**
- * ### .arguments
- *
- * Asserts that the target is an arguments object.
- *
- * function test () {
- * expect(arguments).to.be.arguments;
- * }
- *
- * @name arguments
- * @alias Arguments
- * @api public
- */
-
- function checkArguments () {
- var obj = flag(this, 'object')
- , type = Object.prototype.toString.call(obj);
- this.assert(
- '[object Arguments]' === type
- , 'expected #{this} to be arguments but got ' + type
- , 'expected #{this} to not be arguments'
- );
- }
-
- Assertion.addProperty('arguments', checkArguments);
- Assertion.addProperty('Arguments', checkArguments);
-
- /**
- * ### .equal(value)
- *
- * Asserts that the target is strictly equal (`===`) to `value`.
- * Alternately, if the `deep` flag is set, asserts that
- * the target is deeply equal to `value`.
- *
- * expect('hello').to.equal('hello');
- * expect(42).to.equal(42);
- * expect(1).to.not.equal(true);
- * expect({ foo: 'bar' }).to.not.equal({ foo: 'bar' });
- * expect({ foo: 'bar' }).to.deep.equal({ foo: 'bar' });
- *
- * @name equal
- * @alias equals
- * @alias eq
- * @alias deep.equal
- * @param {Mixed} value
- * @param {String} message _optional_
- * @api public
- */
-
- function assertEqual (val, msg) {
- if (msg) flag(this, 'message', msg);
- var obj = flag(this, 'object');
- if (flag(this, 'deep')) {
- return this.eql(val);
- } else {
- this.assert(
- val === obj
- , 'expected #{this} to equal #{exp}'
- , 'expected #{this} to not equal #{exp}'
- , val
- , this._obj
- , true
- );
- }
- }
-
- Assertion.addMethod('equal', assertEqual);
- Assertion.addMethod('equals', assertEqual);
- Assertion.addMethod('eq', assertEqual);
-
- /**
- * ### .eql(value)
- *
- * Asserts that the target is deeply equal to `value`.
- *
- * expect({ foo: 'bar' }).to.eql({ foo: 'bar' });
- * expect([ 1, 2, 3 ]).to.eql([ 1, 2, 3 ]);
- *
- * @name eql
- * @alias eqls
- * @param {Mixed} value
- * @param {String} message _optional_
- * @api public
- */
-
- function assertEql(obj, msg) {
- if (msg) flag(this, 'message', msg);
- this.assert(
- _.eql(obj, flag(this, 'object'))
- , 'expected #{this} to deeply equal #{exp}'
- , 'expected #{this} to not deeply equal #{exp}'
- , obj
- , this._obj
- , true
- );
- }
-
- Assertion.addMethod('eql', assertEql);
- Assertion.addMethod('eqls', assertEql);
-
- /**
- * ### .above(value)
- *
- * Asserts that the target is greater than `value`.
- *
- * expect(10).to.be.above(5);
- *
- * Can also be used in conjunction with `length` to
- * assert a minimum length. The benefit being a
- * more informative error message than if the length
- * was supplied directly.
- *
- * expect('foo').to.have.length.above(2);
- * expect([ 1, 2, 3 ]).to.have.length.above(2);
- *
- * @name above
- * @alias gt
- * @alias greaterThan
- * @param {Number} value
- * @param {String} message _optional_
- * @api public
- */
-
- function assertAbove (n, msg) {
- if (msg) flag(this, 'message', msg);
- var obj = flag(this, 'object');
- if (flag(this, 'doLength')) {
- new Assertion(obj, msg).to.have.property('length');
- var len = obj.length;
- this.assert(
- len > n
- , 'expected #{this} to have a length above #{exp} but got #{act}'
- , 'expected #{this} to not have a length above #{exp}'
- , n
- , len
- );
- } else {
- this.assert(
- obj > n
- , 'expected #{this} to be above ' + n
- , 'expected #{this} to be at most ' + n
- );
- }
- }
-
- Assertion.addMethod('above', assertAbove);
- Assertion.addMethod('gt', assertAbove);
- Assertion.addMethod('greaterThan', assertAbove);
-
- /**
- * ### .least(value)
- *
- * Asserts that the target is greater than or equal to `value`.
- *
- * expect(10).to.be.at.least(10);
- *
- * Can also be used in conjunction with `length` to
- * assert a minimum length. The benefit being a
- * more informative error message than if the length
- * was supplied directly.
- *
- * expect('foo').to.have.length.of.at.least(2);
- * expect([ 1, 2, 3 ]).to.have.length.of.at.least(3);
- *
- * @name least
- * @alias gte
- * @param {Number} value
- * @param {String} message _optional_
- * @api public
- */
-
- function assertLeast (n, msg) {
- if (msg) flag(this, 'message', msg);
- var obj = flag(this, 'object');
- if (flag(this, 'doLength')) {
- new Assertion(obj, msg).to.have.property('length');
- var len = obj.length;
- this.assert(
- len >= n
- , 'expected #{this} to have a length at least #{exp} but got #{act}'
- , 'expected #{this} to have a length below #{exp}'
- , n
- , len
- );
- } else {
- this.assert(
- obj >= n
- , 'expected #{this} to be at least ' + n
- , 'expected #{this} to be below ' + n
- );
- }
- }
-
- Assertion.addMethod('least', assertLeast);
- Assertion.addMethod('gte', assertLeast);
-
- /**
- * ### .below(value)
- *
- * Asserts that the target is less than `value`.
- *
- * expect(5).to.be.below(10);
- *
- * Can also be used in conjunction with `length` to
- * assert a maximum length. The benefit being a
- * more informative error message than if the length
- * was supplied directly.
- *
- * expect('foo').to.have.length.below(4);
- * expect([ 1, 2, 3 ]).to.have.length.below(4);
- *
- * @name below
- * @alias lt
- * @alias lessThan
- * @param {Number} value
- * @param {String} message _optional_
- * @api public
- */
-
- function assertBelow (n, msg) {
- if (msg) flag(this, 'message', msg);
- var obj = flag(this, 'object');
- if (flag(this, 'doLength')) {
- new Assertion(obj, msg).to.have.property('length');
- var len = obj.length;
- this.assert(
- len < n
- , 'expected #{this} to have a length below #{exp} but got #{act}'
- , 'expected #{this} to not have a length below #{exp}'
- , n
- , len
- );
- } else {
- this.assert(
- obj < n
- , 'expected #{this} to be below ' + n
- , 'expected #{this} to be at least ' + n
- );
- }
- }
-
- Assertion.addMethod('below', assertBelow);
- Assertion.addMethod('lt', assertBelow);
- Assertion.addMethod('lessThan', assertBelow);
-
- /**
- * ### .most(value)
- *
- * Asserts that the target is less than or equal to `value`.
- *
- * expect(5).to.be.at.most(5);
- *
- * Can also be used in conjunction with `length` to
- * assert a maximum length. The benefit being a
- * more informative error message than if the length
- * was supplied directly.
- *
- * expect('foo').to.have.length.of.at.most(4);
- * expect([ 1, 2, 3 ]).to.have.length.of.at.most(3);
- *
- * @name most
- * @alias lte
- * @param {Number} value
- * @param {String} message _optional_
- * @api public
- */
-
- function assertMost (n, msg) {
- if (msg) flag(this, 'message', msg);
- var obj = flag(this, 'object');
- if (flag(this, 'doLength')) {
- new Assertion(obj, msg).to.have.property('length');
- var len = obj.length;
- this.assert(
- len <= n
- , 'expected #{this} to have a length at most #{exp} but got #{act}'
- , 'expected #{this} to have a length above #{exp}'
- , n
- , len
- );
- } else {
- this.assert(
- obj <= n
- , 'expected #{this} to be at most ' + n
- , 'expected #{this} to be above ' + n
- );
- }
- }
-
- Assertion.addMethod('most', assertMost);
- Assertion.addMethod('lte', assertMost);
-
- /**
- * ### .within(start, finish)
- *
- * Asserts that the target is within a range.
- *
- * expect(7).to.be.within(5,10);
- *
- * Can also be used in conjunction with `length` to
- * assert a length range. The benefit being a
- * more informative error message than if the length
- * was supplied directly.
- *
- * expect('foo').to.have.length.within(2,4);
- * expect([ 1, 2, 3 ]).to.have.length.within(2,4);
- *
- * @name within
- * @param {Number} start lowerbound inclusive
- * @param {Number} finish upperbound inclusive
- * @param {String} message _optional_
- * @api public
- */
-
- Assertion.addMethod('within', function (start, finish, msg) {
- if (msg) flag(this, 'message', msg);
- var obj = flag(this, 'object')
- , range = start + '..' + finish;
- if (flag(this, 'doLength')) {
- new Assertion(obj, msg).to.have.property('length');
- var len = obj.length;
- this.assert(
- len >= start && len <= finish
- , 'expected #{this} to have a length within ' + range
- , 'expected #{this} to not have a length within ' + range
- );
- } else {
- this.assert(
- obj >= start && obj <= finish
- , 'expected #{this} to be within ' + range
- , 'expected #{this} to not be within ' + range
- );
- }
- });
-
- /**
- * ### .instanceof(constructor)
- *
- * Asserts that the target is an instance of `constructor`.
- *
- * var Tea = function (name) { this.name = name; }
- * , Chai = new Tea('chai');
- *
- * expect(Chai).to.be.an.instanceof(Tea);
- * expect([ 1, 2, 3 ]).to.be.instanceof(Array);
- *
- * @name instanceof
- * @param {Constructor} constructor
- * @param {String} message _optional_
- * @alias instanceOf
- * @api public
- */
-
- function assertInstanceOf (constructor, msg) {
- if (msg) flag(this, 'message', msg);
- var name = _.getName(constructor);
- this.assert(
- flag(this, 'object') instanceof constructor
- , 'expected #{this} to be an instance of ' + name
- , 'expected #{this} to not be an instance of ' + name
- );
- }
-
- Assertion.addMethod('instanceof', assertInstanceOf);
- Assertion.addMethod('instanceOf', assertInstanceOf);
-
- /**
- * ### .property(name, [value])
- *
- * Asserts that the target has a property `name`, optionally asserting that
- * the value of that property is strictly equal to `value`.
- * If the `deep` flag is set, you can use dot- and bracket-notation for deep
- * references into objects and arrays.
- *
- * // simple referencing
- * var obj = { foo: 'bar' };
- * expect(obj).to.have.property('foo');
- * expect(obj).to.have.property('foo', 'bar');
- *
- * // deep referencing
- * var deepObj = {
- * green: { tea: 'matcha' }
- * , teas: [ 'chai', 'matcha', { tea: 'konacha' } ]
- * };
- *
- * expect(deepObj).to.have.deep.property('green.tea', 'matcha');
- * expect(deepObj).to.have.deep.property('teas[1]', 'matcha');
- * expect(deepObj).to.have.deep.property('teas[2].tea', 'konacha');
- *
- * You can also use an array as the starting point of a `deep.property`
- * assertion, or traverse nested arrays.
- *
- * var arr = [
- * [ 'chai', 'matcha', 'konacha' ]
- * , [ { tea: 'chai' }
- * , { tea: 'matcha' }
- * , { tea: 'konacha' } ]
- * ];
- *
- * expect(arr).to.have.deep.property('[0][1]', 'matcha');
- * expect(arr).to.have.deep.property('[1][2].tea', 'konacha');
- *
- * Furthermore, `property` changes the subject of the assertion
- * to be the value of that property from the original object. This
- * permits for further chainable assertions on that property.
- *
- * expect(obj).to.have.property('foo')
- * .that.is.a('string');
- * expect(deepObj).to.have.property('green')
- * .that.is.an('object')
- * .that.deep.equals({ tea: 'matcha' });
- * expect(deepObj).to.have.property('teas')
- * .that.is.an('array')
- * .with.deep.property('[2]')
- * .that.deep.equals({ tea: 'konacha' });
- *
- * Note that dots and bracket in `name` must be backslash-escaped when
- * the `deep` flag is set, while they must NOT be escaped when the `deep`
- * flag is not set.
- *
- * // simple referencing
- * var css = { '.link[target]': 42 };
- * expect(css).to.have.property('.link[target]', 42);
- *
- * // deep referencing
- * var deepCss = { '.link': { '[target]': 42 }};
- * expect(deepCss).to.have.deep.property('\\.link.\\[target\\]', 42);
- *
- * @name property
- * @alias deep.property
- * @param {String} name
- * @param {Mixed} value (optional)
- * @param {String} message _optional_
- * @returns value of property for chaining
- * @api public
- */
-
- Assertion.addMethod('property', function (name, val, msg) {
- if (msg) flag(this, 'message', msg);
-
- var isDeep = !!flag(this, 'deep')
- , descriptor = isDeep ? 'deep property ' : 'property '
- , negate = flag(this, 'negate')
- , obj = flag(this, 'object')
- , pathInfo = isDeep ? _.getPathInfo(name, obj) : null
- , hasProperty = isDeep
- ? pathInfo.exists
- : _.hasProperty(name, obj)
- , value = isDeep
- ? pathInfo.value
- : obj[name];
-
- if (negate && arguments.length > 1) {
- if (undefined === value) {
- msg = (msg != null) ? msg + ': ' : '';
- throw new Error(msg + _.inspect(obj) + ' has no ' + descriptor + _.inspect(name));
- }
- } else {
- this.assert(
- hasProperty
- , 'expected #{this} to have a ' + descriptor + _.inspect(name)
- , 'expected #{this} to not have ' + descriptor + _.inspect(name));
- }
-
- if (arguments.length > 1) {
- this.assert(
- val === value
- , 'expected #{this} to have a ' + descriptor + _.inspect(name) + ' of #{exp}, but got #{act}'
- , 'expected #{this} to not have a ' + descriptor + _.inspect(name) + ' of #{act}'
- , val
- , value
- );
- }
-
- flag(this, 'object', value);
- });
-
-
- /**
- * ### .ownProperty(name)
- *
- * Asserts that the target has an own property `name`.
- *
- * expect('test').to.have.ownProperty('length');
- *
- * @name ownProperty
- * @alias haveOwnProperty
- * @param {String} name
- * @param {String} message _optional_
- * @api public
- */
-
- function assertOwnProperty (name, msg) {
- if (msg) flag(this, 'message', msg);
- var obj = flag(this, 'object');
- this.assert(
- obj.hasOwnProperty(name)
- , 'expected #{this} to have own property ' + _.inspect(name)
- , 'expected #{this} to not have own property ' + _.inspect(name)
- );
- }
-
- Assertion.addMethod('ownProperty', assertOwnProperty);
- Assertion.addMethod('haveOwnProperty', assertOwnProperty);
-
- /**
- * ### .ownPropertyDescriptor(name[, descriptor[, message]])
- *
- * Asserts that the target has an own property descriptor `name`, that optionally matches `descriptor`.
- *
- * expect('test').to.have.ownPropertyDescriptor('length');
- * expect('test').to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 4 });
- * expect('test').not.to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 3 });
- * expect('test').ownPropertyDescriptor('length').to.have.property('enumerable', false);
- * expect('test').ownPropertyDescriptor('length').to.have.keys('value');
- *
- * @name ownPropertyDescriptor
- * @alias haveOwnPropertyDescriptor
- * @param {String} name
- * @param {Object} descriptor _optional_
- * @param {String} message _optional_
- * @api public
- */
-
- function assertOwnPropertyDescriptor (name, descriptor, msg) {
- if (typeof descriptor === 'string') {
- msg = descriptor;
- descriptor = null;
- }
- if (msg) flag(this, 'message', msg);
- var obj = flag(this, 'object');
- var actualDescriptor = Object.getOwnPropertyDescriptor(Object(obj), name);
- if (actualDescriptor && descriptor) {
- this.assert(
- _.eql(descriptor, actualDescriptor)
- , 'expected the own property descriptor for ' + _.inspect(name) + ' on #{this} to match ' + _.inspect(descriptor) + ', got ' + _.inspect(actualDescriptor)
- , 'expected the own property descriptor for ' + _.inspect(name) + ' on #{this} to not match ' + _.inspect(descriptor)
- , descriptor
- , actualDescriptor
- , true
- );
- } else {
- this.assert(
- actualDescriptor
- , 'expected #{this} to have an own property descriptor for ' + _.inspect(name)
- , 'expected #{this} to not have an own property descriptor for ' + _.inspect(name)
- );
- }
- flag(this, 'object', actualDescriptor);
- }
-
- Assertion.addMethod('ownPropertyDescriptor', assertOwnPropertyDescriptor);
- Assertion.addMethod('haveOwnPropertyDescriptor', assertOwnPropertyDescriptor);
-
- /**
- * ### .length
- *
- * Sets the `doLength` flag later used as a chain precursor to a value
- * comparison for the `length` property.
- *
- * expect('foo').to.have.length.above(2);
- * expect([ 1, 2, 3 ]).to.have.length.above(2);
- * expect('foo').to.have.length.below(4);
- * expect([ 1, 2, 3 ]).to.have.length.below(4);
- * expect('foo').to.have.length.within(2,4);
- * expect([ 1, 2, 3 ]).to.have.length.within(2,4);
- *
- * *Deprecation notice:* Using `length` as an assertion will be deprecated
- * in version 2.4.0 and removed in 3.0.0. Code using the old style of
- * asserting for `length` property value using `length(value)` should be
- * switched to use `lengthOf(value)` instead.
- *
- * @name length
- * @api public
- */
-
- /**
- * ### .lengthOf(value[, message])
- *
- * Asserts that the target's `length` property has
- * the expected value.
- *
- * expect([ 1, 2, 3]).to.have.lengthOf(3);
- * expect('foobar').to.have.lengthOf(6);
- *
- * @name lengthOf
- * @param {Number} length
- * @param {String} message _optional_
- * @api public
- */
-
- function assertLengthChain () {
- flag(this, 'doLength', true);
- }
-
- function assertLength (n, msg) {
- if (msg) flag(this, 'message', msg);
- var obj = flag(this, 'object');
- new Assertion(obj, msg).to.have.property('length');
- var len = obj.length;
-
- this.assert(
- len == n
- , 'expected #{this} to have a length of #{exp} but got #{act}'
- , 'expected #{this} to not have a length of #{act}'
- , n
- , len
- );
- }
-
- Assertion.addChainableMethod('length', assertLength, assertLengthChain);
- Assertion.addMethod('lengthOf', assertLength);
-
- /**
- * ### .match(regexp)
- *
- * Asserts that the target matches a regular expression.
- *
- * expect('foobar').to.match(/^foo/);
- *
- * @name match
- * @alias matches
- * @param {RegExp} RegularExpression
- * @param {String} message _optional_
- * @api public
- */
- function assertMatch(re, msg) {
- if (msg) flag(this, 'message', msg);
- var obj = flag(this, 'object');
- this.assert(
- re.exec(obj)
- , 'expected #{this} to match ' + re
- , 'expected #{this} not to match ' + re
- );
- }
-
- Assertion.addMethod('match', assertMatch);
- Assertion.addMethod('matches', assertMatch);
-
- /**
- * ### .string(string)
- *
- * Asserts that the string target contains another string.
- *
- * expect('foobar').to.have.string('bar');
- *
- * @name string
- * @param {String} string
- * @param {String} message _optional_
- * @api public
- */
-
- Assertion.addMethod('string', function (str, msg) {
- if (msg) flag(this, 'message', msg);
- var obj = flag(this, 'object');
- new Assertion(obj, msg).is.a('string');
-
- this.assert(
- ~obj.indexOf(str)
- , 'expected #{this} to contain ' + _.inspect(str)
- , 'expected #{this} to not contain ' + _.inspect(str)
- );
- });
-
-
- /**
- * ### .keys(key1, [key2], [...])
- *
- * Asserts that the target contains any or all of the passed-in keys.
- * Use in combination with `any`, `all`, `contains`, or `have` will affect
- * what will pass.
- *
- * When used in conjunction with `any`, at least one key that is passed
- * in must exist in the target object. This is regardless whether or not
- * the `have` or `contain` qualifiers are used. Note, either `any` or `all`
- * should be used in the assertion. If neither are used, the assertion is
- * defaulted to `all`.
- *
- * When both `all` and `contain` are used, the target object must have at
- * least all of the passed-in keys but may have more keys not listed.
- *
- * When both `all` and `have` are used, the target object must both contain
- * all of the passed-in keys AND the number of keys in the target object must
- * match the number of keys passed in (in other words, a target object must
- * have all and only all of the passed-in keys).
- *
- * expect({ foo: 1, bar: 2 }).to.have.any.keys('foo', 'baz');
- * expect({ foo: 1, bar: 2 }).to.have.any.keys('foo');
- * expect({ foo: 1, bar: 2 }).to.contain.any.keys('bar', 'baz');
- * expect({ foo: 1, bar: 2 }).to.contain.any.keys(['foo']);
- * expect({ foo: 1, bar: 2 }).to.contain.any.keys({'foo': 6});
- * expect({ foo: 1, bar: 2 }).to.have.all.keys(['bar', 'foo']);
- * expect({ foo: 1, bar: 2 }).to.have.all.keys({'bar': 6, 'foo': 7});
- * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys(['bar', 'foo']);
- * expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys({'bar': 6});
- *
- *
- * @name keys
- * @alias key
- * @param {String...|Array|Object} keys
- * @api public
- */
-
- function assertKeys (keys) {
- var obj = flag(this, 'object')
- , str
- , ok = true
- , mixedArgsMsg = 'keys must be given single argument of Array|Object|String, or multiple String arguments';
-
- switch (_.type(keys)) {
- case "array":
- if (arguments.length > 1) throw (new Error(mixedArgsMsg));
- break;
- case "object":
- if (arguments.length > 1) throw (new Error(mixedArgsMsg));
- keys = Object.keys(keys);
- break;
- default:
- keys = Array.prototype.slice.call(arguments);
- }
-
- if (!keys.length) throw new Error('keys required');
-
- var actual = Object.keys(obj)
- , expected = keys
- , len = keys.length
- , any = flag(this, 'any')
- , all = flag(this, 'all');
-
- if (!any && !all) {
- all = true;
- }
-
- // Has any
- if (any) {
- var intersection = expected.filter(function(key) {
- return ~actual.indexOf(key);
- });
- ok = intersection.length > 0;
- }
-
- // Has all
- if (all) {
- ok = keys.every(function(key){
- return ~actual.indexOf(key);
- });
- if (!flag(this, 'negate') && !flag(this, 'contains')) {
- ok = ok && keys.length == actual.length;
- }
- }
-
- // Key string
- if (len > 1) {
- keys = keys.map(function(key){
- return _.inspect(key);
- });
- var last = keys.pop();
- if (all) {
- str = keys.join(', ') + ', and ' + last;
- }
- if (any) {
- str = keys.join(', ') + ', or ' + last;
- }
- } else {
- str = _.inspect(keys[0]);
- }
-
- // Form
- str = (len > 1 ? 'keys ' : 'key ') + str;
-
- // Have / include
- str = (flag(this, 'contains') ? 'contain ' : 'have ') + str;
-
- // Assertion
- this.assert(
- ok
- , 'expected #{this} to ' + str
- , 'expected #{this} to not ' + str
- , expected.slice(0).sort()
- , actual.sort()
- , true
- );
- }
-
- Assertion.addMethod('keys', assertKeys);
- Assertion.addMethod('key', assertKeys);
-
- /**
- * ### .throw(constructor)
- *
- * Asserts that the function target will throw a specific error, or specific type of error
- * (as determined using `instanceof`), optionally with a RegExp or string inclusion test
- * for the error's message.
- *
- * var err = new ReferenceError('This is a bad function.');
- * var fn = function () { throw err; }
- * expect(fn).to.throw(ReferenceError);
- * expect(fn).to.throw(Error);
- * expect(fn).to.throw(/bad function/);
- * expect(fn).to.not.throw('good function');
- * expect(fn).to.throw(ReferenceError, /bad function/);
- * expect(fn).to.throw(err);
- * expect(fn).to.not.throw(new RangeError('Out of range.'));
- *
- * Please note that when a throw expectation is negated, it will check each
- * parameter independently, starting with error constructor type. The appropriate way
- * to check for the existence of a type of error but for a message that does not match
- * is to use `and`.
- *
- * expect(fn).to.throw(ReferenceError)
- * .and.not.throw(/good function/);
- *
- * @name throw
- * @alias throws
- * @alias Throw
- * @param {ErrorConstructor} constructor
- * @param {String|RegExp} expected error message
- * @param {String} message _optional_
- * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types
- * @returns error for chaining (null if no error)
- * @api public
- */
-
- function assertThrows (constructor, errMsg, msg) {
- if (msg) flag(this, 'message', msg);
- var obj = flag(this, 'object');
- new Assertion(obj, msg).is.a('function');
-
- var thrown = false
- , desiredError = null
- , name = null
- , thrownError = null;
-
- if (arguments.length === 0) {
- errMsg = null;
- constructor = null;
- } else if (constructor && (constructor instanceof RegExp || 'string' === typeof constructor)) {
- errMsg = constructor;
- constructor = null;
- } else if (constructor && constructor instanceof Error) {
- desiredError = constructor;
- constructor = null;
- errMsg = null;
- } else if (typeof constructor === 'function') {
- name = constructor.prototype.name || constructor.name;
- if (name === 'Error' && constructor !== Error) {
- name = (new constructor()).name;
- }
- } else {
- constructor = null;
- }
-
- try {
- obj();
- } catch (err) {
- // first, check desired error
- if (desiredError) {
- this.assert(
- err === desiredError
- , 'expected #{this} to throw #{exp} but #{act} was thrown'
- , 'expected #{this} to not throw #{exp}'
- , (desiredError instanceof Error ? desiredError.toString() : desiredError)
- , (err instanceof Error ? err.toString() : err)
- );
-
- flag(this, 'object', err);
- return this;
- }
-
- // next, check constructor
- if (constructor) {
- this.assert(
- err instanceof constructor
- , 'expected #{this} to throw #{exp} but #{act} was thrown'
- , 'expected #{this} to not throw #{exp} but #{act} was thrown'
- , name
- , (err instanceof Error ? err.toString() : err)
- );
-
- if (!errMsg) {
- flag(this, 'object', err);
- return this;
- }
- }
-
- // next, check message
- var message = 'error' === _.type(err) && "message" in err
- ? err.message
- : '' + err;
-
- if ((message != null) && errMsg && errMsg instanceof RegExp) {
- this.assert(
- errMsg.exec(message)
- , 'expected #{this} to throw error matching #{exp} but got #{act}'
- , 'expected #{this} to throw error not matching #{exp}'
- , errMsg
- , message
- );
-
- flag(this, 'object', err);
- return this;
- } else if ((message != null) && errMsg && 'string' === typeof errMsg) {
- this.assert(
- ~message.indexOf(errMsg)
- , 'expected #{this} to throw error including #{exp} but got #{act}'
- , 'expected #{this} to throw error not including #{act}'
- , errMsg
- , message
- );
-
- flag(this, 'object', err);
- return this;
- } else {
- thrown = true;
- thrownError = err;
- }
- }
-
- var actuallyGot = '';
- var expectedThrown = 'an error';
- if (name !== null) {
- expectedThrown = name;
- } else if (desiredError) {
- expectedThrown = '#{exp}'; //_.inspect(desiredError)
- }
-
- if (thrown) {
- actuallyGot = ' but #{act} was thrown'
- }
-
- this.assert(
- thrown === true
- , 'expected #{this} to throw ' + expectedThrown + actuallyGot
- , 'expected #{this} to not throw ' + expectedThrown + actuallyGot
- , (desiredError instanceof Error ? desiredError.toString() : desiredError)
- , (thrownError instanceof Error ? thrownError.toString() : thrownError)
- );
-
- flag(this, 'object', thrownError);
- }
-
- Assertion.addMethod('throw', assertThrows);
- Assertion.addMethod('throws', assertThrows);
- Assertion.addMethod('Throw', assertThrows);
-
- /**
- * ### .respondTo(method)
- *
- * Asserts that the object or class target will respond to a method.
- *
- * Klass.prototype.bar = function(){};
- * expect(Klass).to.respondTo('bar');
- * expect(obj).to.respondTo('bar');
- *
- * To check if a constructor will respond to a static function,
- * set the `itself` flag.
- *
- * Klass.baz = function(){};
- * expect(Klass).itself.to.respondTo('baz');
- *
- * @name respondTo
- * @param {String} method
- * @param {String} message _optional_
- * @api public
- */
-
- Assertion.addMethod('respondTo', function (method, msg) {
- if (msg) flag(this, 'message', msg);
- var obj = flag(this, 'object')
- , itself = flag(this, 'itself')
- , context = ('function' === _.type(obj) && !itself)
- ? obj.prototype[method]
- : obj[method];
-
- this.assert(
- 'function' === typeof context
- , 'expected #{this} to respond to ' + _.inspect(method)
- , 'expected #{this} to not respond to ' + _.inspect(method)
- );
- });
-
- /**
- * ### .itself
- *
- * Sets the `itself` flag, later used by the `respondTo` assertion.
- *
- * function Foo() {}
- * Foo.bar = function() {}
- * Foo.prototype.baz = function() {}
- *
- * expect(Foo).itself.to.respondTo('bar');
- * expect(Foo).itself.not.to.respondTo('baz');
- *
- * @name itself
- * @api public
- */
-
- Assertion.addProperty('itself', function () {
- flag(this, 'itself', true);
- });
-
- /**
- * ### .satisfy(method)
- *
- * Asserts that the target passes a given truth test.
- *
- * expect(1).to.satisfy(function(num) { return num > 0; });
- *
- * @name satisfy
- * @param {Function} matcher
- * @param {String} message _optional_
- * @api public
- */
-
- Assertion.addMethod('satisfy', function (matcher, msg) {
- if (msg) flag(this, 'message', msg);
- var obj = flag(this, 'object');
- var result = matcher(obj);
- this.assert(
- result
- , 'expected #{this} to satisfy ' + _.objDisplay(matcher)
- , 'expected #{this} to not satisfy' + _.objDisplay(matcher)
- , this.negate ? false : true
- , result
- );
- });
-
- /**
- * ### .closeTo(expected, delta)
- *
- * Asserts that the target is equal `expected`, to within a +/- `delta` range.
- *
- * expect(1.5).to.be.closeTo(1, 0.5);
- *
- * @name closeTo
- * @param {Number} expected
- * @param {Number} delta
- * @param {String} message _optional_
- * @api public
- */
-
- Assertion.addMethod('closeTo', function (expected, delta, msg) {
- if (msg) flag(this, 'message', msg);
- var obj = flag(this, 'object');
-
- new Assertion(obj, msg).is.a('number');
- if (_.type(expected) !== 'number' || _.type(delta) !== 'number') {
- throw new Error('the arguments to closeTo must be numbers');
- }
-
- this.assert(
- Math.abs(obj - expected) <= delta
- , 'expected #{this} to be close to ' + expected + ' +/- ' + delta
- , 'expected #{this} not to be close to ' + expected + ' +/- ' + delta
- );
- });
-
- function isSubsetOf(subset, superset, cmp) {
- return subset.every(function(elem) {
- if (!cmp) return superset.indexOf(elem) !== -1;
-
- return superset.some(function(elem2) {
- return cmp(elem, elem2);
- });
- })
- }
-
- /**
- * ### .members(set)
- *
- * Asserts that the target is a superset of `set`,
- * or that the target and `set` have the same strictly-equal (===) members.
- * Alternately, if the `deep` flag is set, set members are compared for deep
- * equality.
- *
- * expect([1, 2, 3]).to.include.members([3, 2]);
- * expect([1, 2, 3]).to.not.include.members([3, 2, 8]);
- *
- * expect([4, 2]).to.have.members([2, 4]);
- * expect([5, 2]).to.not.have.members([5, 2, 1]);
- *
- * expect([{ id: 1 }]).to.deep.include.members([{ id: 1 }]);
- *
- * @name members
- * @param {Array} set
- * @param {String} message _optional_
- * @api public
- */
-
- Assertion.addMethod('members', function (subset, msg) {
- if (msg) flag(this, 'message', msg);
- var obj = flag(this, 'object');
-
- new Assertion(obj).to.be.an('array');
- new Assertion(subset).to.be.an('array');
-
- var cmp = flag(this, 'deep') ? _.eql : undefined;
-
- if (flag(this, 'contains')) {
- return this.assert(
- isSubsetOf(subset, obj, cmp)
- , 'expected #{this} to be a superset of #{act}'
- , 'expected #{this} to not be a superset of #{act}'
- , obj
- , subset
- );
- }
-
- this.assert(
- isSubsetOf(obj, subset, cmp) && isSubsetOf(subset, obj, cmp)
- , 'expected #{this} to have the same members as #{act}'
- , 'expected #{this} to not have the same members as #{act}'
- , obj
- , subset
- );
- });
-
- /**
- * ### .change(function)
- *
- * Asserts that a function changes an object property
- *
- * var obj = { val: 10 };
- * var fn = function() { obj.val += 3 };
- * var noChangeFn = function() { return 'foo' + 'bar'; }
- * expect(fn).to.change(obj, 'val');
- * expect(noChangFn).to.not.change(obj, 'val')
- *
- * @name change
- * @alias changes
- * @alias Change
- * @param {String} object
- * @param {String} property name
- * @param {String} message _optional_
- * @api public
- */
-
- function assertChanges (object, prop, msg) {
- if (msg) flag(this, 'message', msg);
- var fn = flag(this, 'object');
- new Assertion(object, msg).to.have.property(prop);
- new Assertion(fn).is.a('function');
-
- var initial = object[prop];
- fn();
-
- this.assert(
- initial !== object[prop]
- , 'expected .' + prop + ' to change'
- , 'expected .' + prop + ' to not change'
- );
- }
-
- Assertion.addChainableMethod('change', assertChanges);
- Assertion.addChainableMethod('changes', assertChanges);
-
- /**
- * ### .increase(function)
- *
- * Asserts that a function increases an object property
- *
- * var obj = { val: 10 };
- * var fn = function() { obj.val = 15 };
- * expect(fn).to.increase(obj, 'val');
- *
- * @name increase
- * @alias increases
- * @alias Increase
- * @param {String} object
- * @param {String} property name
- * @param {String} message _optional_
- * @api public
- */
-
- function assertIncreases (object, prop, msg) {
- if (msg) flag(this, 'message', msg);
- var fn = flag(this, 'object');
- new Assertion(object, msg).to.have.property(prop);
- new Assertion(fn).is.a('function');
-
- var initial = object[prop];
- fn();
-
- this.assert(
- object[prop] - initial > 0
- , 'expected .' + prop + ' to increase'
- , 'expected .' + prop + ' to not increase'
- );
- }
-
- Assertion.addChainableMethod('increase', assertIncreases);
- Assertion.addChainableMethod('increases', assertIncreases);
-
- /**
- * ### .decrease(function)
- *
- * Asserts that a function decreases an object property
- *
- * var obj = { val: 10 };
- * var fn = function() { obj.val = 5 };
- * expect(fn).to.decrease(obj, 'val');
- *
- * @name decrease
- * @alias decreases
- * @alias Decrease
- * @param {String} object
- * @param {String} property name
- * @param {String} message _optional_
- * @api public
- */
-
- function assertDecreases (object, prop, msg) {
- if (msg) flag(this, 'message', msg);
- var fn = flag(this, 'object');
- new Assertion(object, msg).to.have.property(prop);
- new Assertion(fn).is.a('function');
-
- var initial = object[prop];
- fn();
-
- this.assert(
- object[prop] - initial < 0
- , 'expected .' + prop + ' to decrease'
- , 'expected .' + prop + ' to not decrease'
- );
- }
-
- Assertion.addChainableMethod('decrease', assertDecreases);
- Assertion.addChainableMethod('decreases', assertDecreases);
-
-};
-
-},{}],5:[function(require,module,exports){
-/*!
- * chai
- * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-
-module.exports = function (chai, util) {
-
- /*!
- * Chai dependencies.
- */
-
- var Assertion = chai.Assertion
- , flag = util.flag;
-
- /*!
- * Module export.
- */
-
- /**
- * ### assert(expression, message)
- *
- * Write your own test expressions.
- *
- * assert('foo' !== 'bar', 'foo is not bar');
- * assert(Array.isArray([]), 'empty arrays are arrays');
- *
- * @param {Mixed} expression to test for truthiness
- * @param {String} message to display on error
- * @name assert
- * @api public
- */
-
- var assert = chai.assert = function (express, errmsg) {
- var test = new Assertion(null, null, chai.assert);
- test.assert(
- express
- , errmsg
- , '[ negation message unavailable ]'
- );
- };
-
- /**
- * ### .fail(actual, expected, [message], [operator])
- *
- * Throw a failure. Node.js `assert` module-compatible.
- *
- * @name fail
- * @param {Mixed} actual
- * @param {Mixed} expected
- * @param {String} message
- * @param {String} operator
- * @api public
- */
-
- assert.fail = function (actual, expected, message, operator) {
- message = message || 'assert.fail()';
- throw new chai.AssertionError(message, {
- actual: actual
- , expected: expected
- , operator: operator
- }, assert.fail);
- };
-
- /**
- * ### .ok(object, [message])
- *
- * Asserts that `object` is truthy.
- *
- * assert.ok('everything', 'everything is ok');
- * assert.ok(false, 'this will fail');
- *
- * @name ok
- * @param {Mixed} object to test
- * @param {String} message
- * @api public
- */
-
- assert.ok = function (val, msg) {
- new Assertion(val, msg).is.ok;
- };
-
- /**
- * ### .notOk(object, [message])
- *
- * Asserts that `object` is falsy.
- *
- * assert.notOk('everything', 'this will fail');
- * assert.notOk(false, 'this will pass');
- *
- * @name notOk
- * @param {Mixed} object to test
- * @param {String} message
- * @api public
- */
-
- assert.notOk = function (val, msg) {
- new Assertion(val, msg).is.not.ok;
- };
-
- /**
- * ### .equal(actual, expected, [message])
- *
- * Asserts non-strict equality (`==`) of `actual` and `expected`.
- *
- * assert.equal(3, '3', '== coerces values to strings');
- *
- * @name equal
- * @param {Mixed} actual
- * @param {Mixed} expected
- * @param {String} message
- * @api public
- */
-
- assert.equal = function (act, exp, msg) {
- var test = new Assertion(act, msg, assert.equal);
-
- test.assert(
- exp == flag(test, 'object')
- , 'expected #{this} to equal #{exp}'
- , 'expected #{this} to not equal #{act}'
- , exp
- , act
- );
- };
-
- /**
- * ### .notEqual(actual, expected, [message])
- *
- * Asserts non-strict inequality (`!=`) of `actual` and `expected`.
- *
- * assert.notEqual(3, 4, 'these numbers are not equal');
- *
- * @name notEqual
- * @param {Mixed} actual
- * @param {Mixed} expected
- * @param {String} message
- * @api public
- */
-
- assert.notEqual = function (act, exp, msg) {
- var test = new Assertion(act, msg, assert.notEqual);
-
- test.assert(
- exp != flag(test, 'object')
- , 'expected #{this} to not equal #{exp}'
- , 'expected #{this} to equal #{act}'
- , exp
- , act
- );
- };
-
- /**
- * ### .strictEqual(actual, expected, [message])
- *
- * Asserts strict equality (`===`) of `actual` and `expected`.
- *
- * assert.strictEqual(true, true, 'these booleans are strictly equal');
- *
- * @name strictEqual
- * @param {Mixed} actual
- * @param {Mixed} expected
- * @param {String} message
- * @api public
- */
-
- assert.strictEqual = function (act, exp, msg) {
- new Assertion(act, msg).to.equal(exp);
- };
-
- /**
- * ### .notStrictEqual(actual, expected, [message])
- *
- * Asserts strict inequality (`!==`) of `actual` and `expected`.
- *
- * assert.notStrictEqual(3, '3', 'no coercion for strict equality');
- *
- * @name notStrictEqual
- * @param {Mixed} actual
- * @param {Mixed} expected
- * @param {String} message
- * @api public
- */
-
- assert.notStrictEqual = function (act, exp, msg) {
- new Assertion(act, msg).to.not.equal(exp);
- };
-
- /**
- * ### .deepEqual(actual, expected, [message])
- *
- * Asserts that `actual` is deeply equal to `expected`.
- *
- * assert.deepEqual({ tea: 'green' }, { tea: 'green' });
- *
- * @name deepEqual
- * @param {Mixed} actual
- * @param {Mixed} expected
- * @param {String} message
- * @api public
- */
-
- assert.deepEqual = function (act, exp, msg) {
- new Assertion(act, msg).to.eql(exp);
- };
-
- /**
- * ### .notDeepEqual(actual, expected, [message])
- *
- * Assert that `actual` is not deeply equal to `expected`.
- *
- * assert.notDeepEqual({ tea: 'green' }, { tea: 'jasmine' });
- *
- * @name notDeepEqual
- * @param {Mixed} actual
- * @param {Mixed} expected
- * @param {String} message
- * @api public
- */
-
- assert.notDeepEqual = function (act, exp, msg) {
- new Assertion(act, msg).to.not.eql(exp);
- };
-
- /**
- * ### .isTrue(value, [message])
- *
- * Asserts that `value` is true.
- *
- * var teaServed = true;
- * assert.isTrue(teaServed, 'the tea has been served');
- *
- * @name isTrue
- * @param {Mixed} value
- * @param {String} message
- * @api public
- */
-
- assert.isAbove = function (val, abv, msg) {
- new Assertion(val, msg).to.be.above(abv);
- };
-
- /**
- * ### .isAbove(valueToCheck, valueToBeAbove, [message])
- *
- * Asserts `valueToCheck` is strictly greater than (>) `valueToBeAbove`
- *
- * assert.isAbove(5, 2, '5 is strictly greater than 2');
- *
- * @name isAbove
- * @param {Mixed} valueToCheck
- * @param {Mixed} valueToBeAbove
- * @param {String} message
- * @api public
- */
-
- assert.isBelow = function (val, blw, msg) {
- new Assertion(val, msg).to.be.below(blw);
- };
-
- /**
- * ### .isBelow(valueToCheck, valueToBeBelow, [message])
- *
- * Asserts `valueToCheck` is strictly less than (<) `valueToBeBelow`
- *
- * assert.isBelow(3, 6, '3 is strictly less than 6');
- *
- * @name isBelow
- * @param {Mixed} valueToCheck
- * @param {Mixed} valueToBeBelow
- * @param {String} message
- * @api public
- */
-
- assert.isTrue = function (val, msg) {
- new Assertion(val, msg).is['true'];
- };
-
- /**
- * ### .isFalse(value, [message])
- *
- * Asserts that `value` is false.
- *
- * var teaServed = false;
- * assert.isFalse(teaServed, 'no tea yet? hmm...');
- *
- * @name isFalse
- * @param {Mixed} value
- * @param {String} message
- * @api public
- */
-
- assert.isFalse = function (val, msg) {
- new Assertion(val, msg).is['false'];
- };
-
- /**
- * ### .isNull(value, [message])
- *
- * Asserts that `value` is null.
- *
- * assert.isNull(err, 'there was no error');
- *
- * @name isNull
- * @param {Mixed} value
- * @param {String} message
- * @api public
- */
-
- assert.isNull = function (val, msg) {
- new Assertion(val, msg).to.equal(null);
- };
-
- /**
- * ### .isNotNull(value, [message])
- *
- * Asserts that `value` is not null.
- *
- * var tea = 'tasty chai';
- * assert.isNotNull(tea, 'great, time for tea!');
- *
- * @name isNotNull
- * @param {Mixed} value
- * @param {String} message
- * @api public
- */
-
- assert.isNotNull = function (val, msg) {
- new Assertion(val, msg).to.not.equal(null);
- };
-
- /**
- * ### .isUndefined(value, [message])
- *
- * Asserts that `value` is `undefined`.
- *
- * var tea;
- * assert.isUndefined(tea, 'no tea defined');
- *
- * @name isUndefined
- * @param {Mixed} value
- * @param {String} message
- * @api public
- */
-
- assert.isUndefined = function (val, msg) {
- new Assertion(val, msg).to.equal(undefined);
- };
-
- /**
- * ### .isDefined(value, [message])
- *
- * Asserts that `value` is not `undefined`.
- *
- * var tea = 'cup of chai';
- * assert.isDefined(tea, 'tea has been defined');
- *
- * @name isDefined
- * @param {Mixed} value
- * @param {String} message
- * @api public
- */
-
- assert.isDefined = function (val, msg) {
- new Assertion(val, msg).to.not.equal(undefined);
- };
-
- /**
- * ### .isFunction(value, [message])
- *
- * Asserts that `value` is a function.
- *
- * function serveTea() { return 'cup of tea'; };
- * assert.isFunction(serveTea, 'great, we can have tea now');
- *
- * @name isFunction
- * @param {Mixed} value
- * @param {String} message
- * @api public
- */
-
- assert.isFunction = function (val, msg) {
- new Assertion(val, msg).to.be.a('function');
- };
-
- /**
- * ### .isNotFunction(value, [message])
- *
- * Asserts that `value` is _not_ a function.
- *
- * var serveTea = [ 'heat', 'pour', 'sip' ];
- * assert.isNotFunction(serveTea, 'great, we have listed the steps');
- *
- * @name isNotFunction
- * @param {Mixed} value
- * @param {String} message
- * @api public
- */
-
- assert.isNotFunction = function (val, msg) {
- new Assertion(val, msg).to.not.be.a('function');
- };
-
- /**
- * ### .isObject(value, [message])
- *
- * Asserts that `value` is an object (as revealed by
- * `Object.prototype.toString`).
- *
- * var selection = { name: 'Chai', serve: 'with spices' };
- * assert.isObject(selection, 'tea selection is an object');
- *
- * @name isObject
- * @param {Mixed} value
- * @param {String} message
- * @api public
- */
-
- assert.isObject = function (val, msg) {
- new Assertion(val, msg).to.be.a('object');
- };
-
- /**
- * ### .isNotObject(value, [message])
- *
- * Asserts that `value` is _not_ an object.
- *
- * var selection = 'chai'
- * assert.isNotObject(selection, 'tea selection is not an object');
- * assert.isNotObject(null, 'null is not an object');
- *
- * @name isNotObject
- * @param {Mixed} value
- * @param {String} message
- * @api public
- */
-
- assert.isNotObject = function (val, msg) {
- new Assertion(val, msg).to.not.be.a('object');
- };
-
- /**
- * ### .isArray(value, [message])
- *
- * Asserts that `value` is an array.
- *
- * var menu = [ 'green', 'chai', 'oolong' ];
- * assert.isArray(menu, 'what kind of tea do we want?');
- *
- * @name isArray
- * @param {Mixed} value
- * @param {String} message
- * @api public
- */
-
- assert.isArray = function (val, msg) {
- new Assertion(val, msg).to.be.an('array');
- };
-
- /**
- * ### .isNotArray(value, [message])
- *
- * Asserts that `value` is _not_ an array.
- *
- * var menu = 'green|chai|oolong';
- * assert.isNotArray(menu, 'what kind of tea do we want?');
- *
- * @name isNotArray
- * @param {Mixed} value
- * @param {String} message
- * @api public
- */
-
- assert.isNotArray = function (val, msg) {
- new Assertion(val, msg).to.not.be.an('array');
- };
-
- /**
- * ### .isString(value, [message])
- *
- * Asserts that `value` is a string.
- *
- * var teaOrder = 'chai';
- * assert.isString(teaOrder, 'order placed');
- *
- * @name isString
- * @param {Mixed} value
- * @param {String} message
- * @api public
- */
-
- assert.isString = function (val, msg) {
- new Assertion(val, msg).to.be.a('string');
- };
-
- /**
- * ### .isNotString(value, [message])
- *
- * Asserts that `value` is _not_ a string.
- *
- * var teaOrder = 4;
- * assert.isNotString(teaOrder, 'order placed');
- *
- * @name isNotString
- * @param {Mixed} value
- * @param {String} message
- * @api public
- */
-
- assert.isNotString = function (val, msg) {
- new Assertion(val, msg).to.not.be.a('string');
- };
-
- /**
- * ### .isNumber(value, [message])
- *
- * Asserts that `value` is a number.
- *
- * var cups = 2;
- * assert.isNumber(cups, 'how many cups');
- *
- * @name isNumber
- * @param {Number} value
- * @param {String} message
- * @api public
- */
-
- assert.isNumber = function (val, msg) {
- new Assertion(val, msg).to.be.a('number');
- };
-
- /**
- * ### .isNotNumber(value, [message])
- *
- * Asserts that `value` is _not_ a number.
- *
- * var cups = '2 cups please';
- * assert.isNotNumber(cups, 'how many cups');
- *
- * @name isNotNumber
- * @param {Mixed} value
- * @param {String} message
- * @api public
- */
-
- assert.isNotNumber = function (val, msg) {
- new Assertion(val, msg).to.not.be.a('number');
- };
-
- /**
- * ### .isBoolean(value, [message])
- *
- * Asserts that `value` is a boolean.
- *
- * var teaReady = true
- * , teaServed = false;
- *
- * assert.isBoolean(teaReady, 'is the tea ready');
- * assert.isBoolean(teaServed, 'has tea been served');
- *
- * @name isBoolean
- * @param {Mixed} value
- * @param {String} message
- * @api public
- */
-
- assert.isBoolean = function (val, msg) {
- new Assertion(val, msg).to.be.a('boolean');
- };
-
- /**
- * ### .isNotBoolean(value, [message])
- *
- * Asserts that `value` is _not_ a boolean.
- *
- * var teaReady = 'yep'
- * , teaServed = 'nope';
- *
- * assert.isNotBoolean(teaReady, 'is the tea ready');
- * assert.isNotBoolean(teaServed, 'has tea been served');
- *
- * @name isNotBoolean
- * @param {Mixed} value
- * @param {String} message
- * @api public
- */
-
- assert.isNotBoolean = function (val, msg) {
- new Assertion(val, msg).to.not.be.a('boolean');
- };
-
- /**
- * ### .typeOf(value, name, [message])
- *
- * Asserts that `value`'s type is `name`, as determined by
- * `Object.prototype.toString`.
- *
- * assert.typeOf({ tea: 'chai' }, 'object', 'we have an object');
- * assert.typeOf(['chai', 'jasmine'], 'array', 'we have an array');
- * assert.typeOf('tea', 'string', 'we have a string');
- * assert.typeOf(/tea/, 'regexp', 'we have a regular expression');
- * assert.typeOf(null, 'null', 'we have a null');
- * assert.typeOf(undefined, 'undefined', 'we have an undefined');
- *
- * @name typeOf
- * @param {Mixed} value
- * @param {String} name
- * @param {String} message
- * @api public
- */
-
- assert.typeOf = function (val, type, msg) {
- new Assertion(val, msg).to.be.a(type);
- };
-
- /**
- * ### .notTypeOf(value, name, [message])
- *
- * Asserts that `value`'s type is _not_ `name`, as determined by
- * `Object.prototype.toString`.
- *
- * assert.notTypeOf('tea', 'number', 'strings are not numbers');
- *
- * @name notTypeOf
- * @param {Mixed} value
- * @param {String} typeof name
- * @param {String} message
- * @api public
- */
-
- assert.notTypeOf = function (val, type, msg) {
- new Assertion(val, msg).to.not.be.a(type);
- };
-
- /**
- * ### .instanceOf(object, constructor, [message])
- *
- * Asserts that `value` is an instance of `constructor`.
- *
- * var Tea = function (name) { this.name = name; }
- * , chai = new Tea('chai');
- *
- * assert.instanceOf(chai, Tea, 'chai is an instance of tea');
- *
- * @name instanceOf
- * @param {Object} object
- * @param {Constructor} constructor
- * @param {String} message
- * @api public
- */
-
- assert.instanceOf = function (val, type, msg) {
- new Assertion(val, msg).to.be.instanceOf(type);
- };
-
- /**
- * ### .notInstanceOf(object, constructor, [message])
- *
- * Asserts `value` is not an instance of `constructor`.
- *
- * var Tea = function (name) { this.name = name; }
- * , chai = new String('chai');
- *
- * assert.notInstanceOf(chai, Tea, 'chai is not an instance of tea');
- *
- * @name notInstanceOf
- * @param {Object} object
- * @param {Constructor} constructor
- * @param {String} message
- * @api public
- */
-
- assert.notInstanceOf = function (val, type, msg) {
- new Assertion(val, msg).to.not.be.instanceOf(type);
- };
-
- /**
- * ### .include(haystack, needle, [message])
- *
- * Asserts that `haystack` includes `needle`. Works
- * for strings and arrays.
- *
- * assert.include('foobar', 'bar', 'foobar contains string "bar"');
- * assert.include([ 1, 2, 3 ], 3, 'array contains value');
- *
- * @name include
- * @param {Array|String} haystack
- * @param {Mixed} needle
- * @param {String} message
- * @api public
- */
-
- assert.include = function (exp, inc, msg) {
- new Assertion(exp, msg, assert.include).include(inc);
- };
-
- /**
- * ### .notInclude(haystack, needle, [message])
- *
- * Asserts that `haystack` does not include `needle`. Works
- * for strings and arrays.
- *
- * assert.notInclude('foobar', 'baz', 'string not include substring');
- * assert.notInclude([ 1, 2, 3 ], 4, 'array not include contain value');
- *
- * @name notInclude
- * @param {Array|String} haystack
- * @param {Mixed} needle
- * @param {String} message
- * @api public
- */
-
- assert.notInclude = function (exp, inc, msg) {
- new Assertion(exp, msg, assert.notInclude).not.include(inc);
- };
-
- /**
- * ### .match(value, regexp, [message])
- *
- * Asserts that `value` matches the regular expression `regexp`.
- *
- * assert.match('foobar', /^foo/, 'regexp matches');
- *
- * @name match
- * @param {Mixed} value
- * @param {RegExp} regexp
- * @param {String} message
- * @api public
- */
-
- assert.match = function (exp, re, msg) {
- new Assertion(exp, msg).to.match(re);
- };
-
- /**
- * ### .notMatch(value, regexp, [message])
- *
- * Asserts that `value` does not match the regular expression `regexp`.
- *
- * assert.notMatch('foobar', /^foo/, 'regexp does not match');
- *
- * @name notMatch
- * @param {Mixed} value
- * @param {RegExp} regexp
- * @param {String} message
- * @api public
- */
-
- assert.notMatch = function (exp, re, msg) {
- new Assertion(exp, msg).to.not.match(re);
- };
-
- /**
- * ### .property(object, property, [message])
- *
- * Asserts that `object` has a property named by `property`.
- *
- * assert.property({ tea: { green: 'matcha' }}, 'tea');
- *
- * @name property
- * @param {Object} object
- * @param {String} property
- * @param {String} message
- * @api public
- */
-
- assert.property = function (obj, prop, msg) {
- new Assertion(obj, msg).to.have.property(prop);
- };
-
- /**
- * ### .notProperty(object, property, [message])
- *
- * Asserts that `object` does _not_ have a property named by `property`.
- *
- * assert.notProperty({ tea: { green: 'matcha' }}, 'coffee');
- *
- * @name notProperty
- * @param {Object} object
- * @param {String} property
- * @param {String} message
- * @api public
- */
-
- assert.notProperty = function (obj, prop, msg) {
- new Assertion(obj, msg).to.not.have.property(prop);
- };
-
- /**
- * ### .deepProperty(object, property, [message])
- *
- * Asserts that `object` has a property named by `property`, which can be a
- * string using dot- and bracket-notation for deep reference.
- *
- * assert.deepProperty({ tea: { green: 'matcha' }}, 'tea.green');
- *
- * @name deepProperty
- * @param {Object} object
- * @param {String} property
- * @param {String} message
- * @api public
- */
-
- assert.deepProperty = function (obj, prop, msg) {
- new Assertion(obj, msg).to.have.deep.property(prop);
- };
-
- /**
- * ### .notDeepProperty(object, property, [message])
- *
- * Asserts that `object` does _not_ have a property named by `property`, which
- * can be a string using dot- and bracket-notation for deep reference.
- *
- * assert.notDeepProperty({ tea: { green: 'matcha' }}, 'tea.oolong');
- *
- * @name notDeepProperty
- * @param {Object} object
- * @param {String} property
- * @param {String} message
- * @api public
- */
-
- assert.notDeepProperty = function (obj, prop, msg) {
- new Assertion(obj, msg).to.not.have.deep.property(prop);
- };
-
- /**
- * ### .propertyVal(object, property, value, [message])
- *
- * Asserts that `object` has a property named by `property` with value given
- * by `value`.
- *
- * assert.propertyVal({ tea: 'is good' }, 'tea', 'is good');
- *
- * @name propertyVal
- * @param {Object} object
- * @param {String} property
- * @param {Mixed} value
- * @param {String} message
- * @api public
- */
-
- assert.propertyVal = function (obj, prop, val, msg) {
- new Assertion(obj, msg).to.have.property(prop, val);
- };
-
- /**
- * ### .propertyNotVal(object, property, value, [message])
- *
- * Asserts that `object` has a property named by `property`, but with a value
- * different from that given by `value`.
- *
- * assert.propertyNotVal({ tea: 'is good' }, 'tea', 'is bad');
- *
- * @name propertyNotVal
- * @param {Object} object
- * @param {String} property
- * @param {Mixed} value
- * @param {String} message
- * @api public
- */
-
- assert.propertyNotVal = function (obj, prop, val, msg) {
- new Assertion(obj, msg).to.not.have.property(prop, val);
- };
-
- /**
- * ### .deepPropertyVal(object, property, value, [message])
- *
- * Asserts that `object` has a property named by `property` with value given
- * by `value`. `property` can use dot- and bracket-notation for deep
- * reference.
- *
- * assert.deepPropertyVal({ tea: { green: 'matcha' }}, 'tea.green', 'matcha');
- *
- * @name deepPropertyVal
- * @param {Object} object
- * @param {String} property
- * @param {Mixed} value
- * @param {String} message
- * @api public
- */
-
- assert.deepPropertyVal = function (obj, prop, val, msg) {
- new Assertion(obj, msg).to.have.deep.property(prop, val);
- };
-
- /**
- * ### .deepPropertyNotVal(object, property, value, [message])
- *
- * Asserts that `object` has a property named by `property`, but with a value
- * different from that given by `value`. `property` can use dot- and
- * bracket-notation for deep reference.
- *
- * assert.deepPropertyNotVal({ tea: { green: 'matcha' }}, 'tea.green', 'konacha');
- *
- * @name deepPropertyNotVal
- * @param {Object} object
- * @param {String} property
- * @param {Mixed} value
- * @param {String} message
- * @api public
- */
-
- assert.deepPropertyNotVal = function (obj, prop, val, msg) {
- new Assertion(obj, msg).to.not.have.deep.property(prop, val);
- };
-
- /**
- * ### .lengthOf(object, length, [message])
- *
- * Asserts that `object` has a `length` property with the expected value.
- *
- * assert.lengthOf([1,2,3], 3, 'array has length of 3');
- * assert.lengthOf('foobar', 5, 'string has length of 6');
- *
- * @name lengthOf
- * @param {Mixed} object
- * @param {Number} length
- * @param {String} message
- * @api public
- */
-
- assert.lengthOf = function (exp, len, msg) {
- new Assertion(exp, msg).to.have.length(len);
- };
-
- /**
- * ### .throws(function, [constructor/string/regexp], [string/regexp], [message])
- *
- * Asserts that `function` will throw an error that is an instance of
- * `constructor`, or alternately that it will throw an error with message
- * matching `regexp`.
- *
- * assert.throw(fn, 'function throws a reference error');
- * assert.throw(fn, /function throws a reference error/);
- * assert.throw(fn, ReferenceError);
- * assert.throw(fn, ReferenceError, 'function throws a reference error');
- * assert.throw(fn, ReferenceError, /function throws a reference error/);
- *
- * @name throws
- * @alias throw
- * @alias Throw
- * @param {Function} function
- * @param {ErrorConstructor} constructor
- * @param {RegExp} regexp
- * @param {String} message
- * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types
- * @api public
- */
-
- assert.Throw = function (fn, errt, errs, msg) {
- if ('string' === typeof errt || errt instanceof RegExp) {
- errs = errt;
- errt = null;
- }
-
- var assertErr = new Assertion(fn, msg).to.Throw(errt, errs);
- return flag(assertErr, 'object');
- };
-
- /**
- * ### .doesNotThrow(function, [constructor/regexp], [message])
- *
- * Asserts that `function` will _not_ throw an error that is an instance of
- * `constructor`, or alternately that it will not throw an error with message
- * matching `regexp`.
- *
- * assert.doesNotThrow(fn, Error, 'function does not throw');
- *
- * @name doesNotThrow
- * @param {Function} function
- * @param {ErrorConstructor} constructor
- * @param {RegExp} regexp
- * @param {String} message
- * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types
- * @api public
- */
-
- assert.doesNotThrow = function (fn, type, msg) {
- if ('string' === typeof type) {
- msg = type;
- type = null;
- }
-
- new Assertion(fn, msg).to.not.Throw(type);
- };
-
- /**
- * ### .operator(val1, operator, val2, [message])
- *
- * Compares two values using `operator`.
- *
- * assert.operator(1, '<', 2, 'everything is ok');
- * assert.operator(1, '>', 2, 'this will fail');
- *
- * @name operator
- * @param {Mixed} val1
- * @param {String} operator
- * @param {Mixed} val2
- * @param {String} message
- * @api public
- */
-
- assert.operator = function (val, operator, val2, msg) {
- var ok;
- switch(operator) {
- case '==':
- ok = val == val2;
- break;
- case '===':
- ok = val === val2;
- break;
- case '>':
- ok = val > val2;
- break;
- case '>=':
- ok = val >= val2;
- break;
- case '<':
- ok = val < val2;
- break;
- case '<=':
- ok = val <= val2;
- break;
- case '!=':
- ok = val != val2;
- break;
- case '!==':
- ok = val !== val2;
- break;
- default:
- throw new Error('Invalid operator "' + operator + '"');
- }
- var test = new Assertion(ok, msg);
- test.assert(
- true === flag(test, 'object')
- , 'expected ' + util.inspect(val) + ' to be ' + operator + ' ' + util.inspect(val2)
- , 'expected ' + util.inspect(val) + ' to not be ' + operator + ' ' + util.inspect(val2) );
- };
-
- /**
- * ### .closeTo(actual, expected, delta, [message])
- *
- * Asserts that the target is equal `expected`, to within a +/- `delta` range.
- *
- * assert.closeTo(1.5, 1, 0.5, 'numbers are close');
- *
- * @name closeTo
- * @param {Number} actual
- * @param {Number} expected
- * @param {Number} delta
- * @param {String} message
- * @api public
- */
-
- assert.closeTo = function (act, exp, delta, msg) {
- new Assertion(act, msg).to.be.closeTo(exp, delta);
- };
-
- /**
- * ### .sameMembers(set1, set2, [message])
- *
- * Asserts that `set1` and `set2` have the same members.
- * Order is not taken into account.
- *
- * assert.sameMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'same members');
- *
- * @name sameMembers
- * @param {Array} set1
- * @param {Array} set2
- * @param {String} message
- * @api public
- */
-
- assert.sameMembers = function (set1, set2, msg) {
- new Assertion(set1, msg).to.have.same.members(set2);
- }
-
- /**
- * ### .sameDeepMembers(set1, set2, [message])
- *
- * Asserts that `set1` and `set2` have the same members - using a deep equality checking.
- * Order is not taken into account.
- *
- * assert.sameDeepMembers([ {b: 3}, {a: 2}, {c: 5} ], [ {c: 5}, {b: 3}, {a: 2} ], 'same deep members');
- *
- * @name sameDeepMembers
- * @param {Array} set1
- * @param {Array} set2
- * @param {String} message
- * @api public
- */
-
- assert.sameDeepMembers = function (set1, set2, msg) {
- new Assertion(set1, msg).to.have.same.deep.members(set2);
- }
-
- /**
- * ### .includeMembers(superset, subset, [message])
- *
- * Asserts that `subset` is included in `superset`.
- * Order is not taken into account.
- *
- * assert.includeMembers([ 1, 2, 3 ], [ 2, 1 ], 'include members');
- *
- * @name includeMembers
- * @param {Array} superset
- * @param {Array} subset
- * @param {String} message
- * @api public
- */
-
- assert.includeMembers = function (superset, subset, msg) {
- new Assertion(superset, msg).to.include.members(subset);
- }
-
- /**
- * ### .changes(function, object, property)
- *
- * Asserts that a function changes the value of a property
- *
- * var obj = { val: 10 };
- * var fn = function() { obj.val = 22 };
- * assert.changes(fn, obj, 'val');
- *
- * @name changes
- * @param {Function} modifier function
- * @param {Object} object
- * @param {String} property name
- * @param {String} message _optional_
- * @api public
- */
-
- assert.changes = function (fn, obj, prop) {
- new Assertion(fn).to.change(obj, prop);
- }
-
- /**
- * ### .doesNotChange(function, object, property)
- *
- * Asserts that a function does not changes the value of a property
- *
- * var obj = { val: 10 };
- * var fn = function() { console.log('foo'); };
- * assert.doesNotChange(fn, obj, 'val');
- *
- * @name doesNotChange
- * @param {Function} modifier function
- * @param {Object} object
- * @param {String} property name
- * @param {String} message _optional_
- * @api public
- */
-
- assert.doesNotChange = function (fn, obj, prop) {
- new Assertion(fn).to.not.change(obj, prop);
- }
-
- /**
- * ### .increases(function, object, property)
- *
- * Asserts that a function increases an object property
- *
- * var obj = { val: 10 };
- * var fn = function() { obj.val = 13 };
- * assert.increases(fn, obj, 'val');
- *
- * @name increases
- * @param {Function} modifier function
- * @param {Object} object
- * @param {String} property name
- * @param {String} message _optional_
- * @api public
- */
-
- assert.increases = function (fn, obj, prop) {
- new Assertion(fn).to.increase(obj, prop);
- }
-
- /**
- * ### .doesNotIncrease(function, object, property)
- *
- * Asserts that a function does not increase object property
- *
- * var obj = { val: 10 };
- * var fn = function() { obj.val = 8 };
- * assert.doesNotIncrease(fn, obj, 'val');
- *
- * @name doesNotIncrease
- * @param {Function} modifier function
- * @param {Object} object
- * @param {String} property name
- * @param {String} message _optional_
- * @api public
- */
-
- assert.doesNotIncrease = function (fn, obj, prop) {
- new Assertion(fn).to.not.increase(obj, prop);
- }
-
- /**
- * ### .decreases(function, object, property)
- *
- * Asserts that a function decreases an object property
- *
- * var obj = { val: 10 };
- * var fn = function() { obj.val = 5 };
- * assert.decreases(fn, obj, 'val');
- *
- * @name decreases
- * @param {Function} modifier function
- * @param {Object} object
- * @param {String} property name
- * @param {String} message _optional_
- * @api public
- */
-
- assert.decreases = function (fn, obj, prop) {
- new Assertion(fn).to.decrease(obj, prop);
- }
-
- /**
- * ### .doesNotDecrease(function, object, property)
- *
- * Asserts that a function does not decreases an object property
- *
- * var obj = { val: 10 };
- * var fn = function() { obj.val = 15 };
- * assert.doesNotDecrease(fn, obj, 'val');
- *
- * @name doesNotDecrease
- * @param {Function} modifier function
- * @param {Object} object
- * @param {String} property name
- * @param {String} message _optional_
- * @api public
- */
-
- assert.doesNotDecrease = function (fn, obj, prop) {
- new Assertion(fn).to.not.decrease(obj, prop);
- }
-
- /*!
- * ### .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
- * assert class.
- *
- * var err = new Error('I am a custom error');
- * assert.ifError(err); // Rethrows err!
- *
- * @name ifError
- * @param {Object} object
- * @api public
- */
-
- assert.ifError = function (val) {
- if (val) {
- throw(val);
- }
- };
-
- /*!
- * Aliases.
- */
-
- (function alias(name, as){
- assert[as] = assert[name];
- return alias;
- })('Throw', 'throw')('Throw', 'throws');
-};
-
-},{}],6:[function(require,module,exports){
-/*!
- * chai
- * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-module.exports = function (chai, util) {
- chai.expect = function (val, message) {
- return new chai.Assertion(val, message);
- };
-
- /**
- * ### .fail(actual, expected, [message], [operator])
- *
- * Throw a failure.
- *
- * @name fail
- * @param {Mixed} actual
- * @param {Mixed} expected
- * @param {String} message
- * @param {String} operator
- * @api public
- */
-
- chai.expect.fail = function (actual, expected, message, operator) {
- message = message || 'expect.fail()';
- throw new chai.AssertionError(message, {
- actual: actual
- , expected: expected
- , operator: operator
- }, chai.expect.fail);
- };
-};
-
-},{}],7:[function(require,module,exports){
-/*!
- * chai
- * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-module.exports = function (chai, util) {
- var Assertion = chai.Assertion;
-
- function loadShould () {
- // explicitly define this method as function as to have it's name to include as `ssfi`
- function shouldGetter() {
- if (this instanceof String || this instanceof Number || this instanceof Boolean ) {
- return new Assertion(this.valueOf(), null, shouldGetter);
- }
- return new Assertion(this, null, shouldGetter);
- }
- function shouldSetter(value) {
- // See https://github.com/chaijs/chai/issues/86: this makes
- // `whatever.should = someValue` actually set `someValue`, which is
- // especially useful for `global.should = require('chai').should()`.
- //
- // Note that we have to use [[DefineProperty]] instead of [[Put]]
- // since otherwise we would trigger this very setter!
- Object.defineProperty(this, 'should', {
- value: value,
- enumerable: true,
- configurable: true,
- writable: true
- });
- }
- // modify Object.prototype to have `should`
- Object.defineProperty(Object.prototype, 'should', {
- set: shouldSetter
- , get: shouldGetter
- , configurable: true
- });
-
- var should = {};
-
- /**
- * ### .fail(actual, expected, [message], [operator])
- *
- * Throw a failure.
- *
- * @name fail
- * @param {Mixed} actual
- * @param {Mixed} expected
- * @param {String} message
- * @param {String} operator
- * @api public
- */
-
- should.fail = function (actual, expected, message, operator) {
- message = message || 'should.fail()';
- throw new chai.AssertionError(message, {
- actual: actual
- , expected: expected
- , operator: operator
- }, should.fail);
- };
-
- should.equal = function (val1, val2, msg) {
- new Assertion(val1, msg).to.equal(val2);
- };
-
- should.Throw = function (fn, errt, errs, msg) {
- new Assertion(fn, msg).to.Throw(errt, errs);
- };
-
- should.exist = function (val, msg) {
- new Assertion(val, msg).to.exist;
- }
-
- // negation
- should.not = {}
-
- should.not.equal = function (val1, val2, msg) {
- new Assertion(val1, msg).to.not.equal(val2);
- };
-
- should.not.Throw = function (fn, errt, errs, msg) {
- new Assertion(fn, msg).to.not.Throw(errt, errs);
- };
-
- should.not.exist = function (val, msg) {
- new Assertion(val, msg).to.not.exist;
- }
-
- should['throw'] = should['Throw'];
- should.not['throw'] = should.not['Throw'];
-
- return should;
- }
-
- chai.should = loadShould;
- chai.Should = loadShould;
-};
-
-},{}],8:[function(require,module,exports){
-/*!
- * Chai - addChainingMethod utility
- * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-/*!
- * Module dependencies
- */
-
-var transferFlags = require('./transferFlags');
-var flag = require('./flag');
-var config = require('../config');
-
-/*!
- * Module variables
- */
-
-// Check whether `__proto__` is supported
-var hasProtoSupport = '__proto__' in Object;
-
-// Without `__proto__` support, this module will need to add properties to a function.
-// However, some Function.prototype methods cannot be overwritten,
-// and there seems no easy cross-platform way to detect them (@see chaijs/chai/issues/69).
-var excludeNames = /^(?:length|name|arguments|caller)$/;
-
-// Cache `Function` properties
-var call = Function.prototype.call,
- apply = Function.prototype.apply;
-
-/**
- * ### addChainableMethod (ctx, name, method, chainingBehavior)
- *
- * Adds a method to an object, such that the method can also be chained.
- *
- * utils.addChainableMethod(chai.Assertion.prototype, 'foo', function (str) {
- * var obj = utils.flag(this, 'object');
- * new chai.Assertion(obj).to.be.equal(str);
- * });
- *
- * Can also be accessed directly from `chai.Assertion`.
- *
- * chai.Assertion.addChainableMethod('foo', fn, chainingBehavior);
- *
- * The result can then be used as both a method assertion, executing both `method` and
- * `chainingBehavior`, or as a language chain, which only executes `chainingBehavior`.
- *
- * expect(fooStr).to.be.foo('bar');
- * expect(fooStr).to.be.foo.equal('foo');
- *
- * @param {Object} ctx object to which the method is added
- * @param {String} name of method to add
- * @param {Function} method function to be used for `name`, when called
- * @param {Function} chainingBehavior function to be called every time the property is accessed
- * @name addChainableMethod
- * @api public
- */
-
-module.exports = function (ctx, name, method, chainingBehavior) {
- if (typeof chainingBehavior !== 'function') {
- chainingBehavior = function () { };
- }
-
- var chainableBehavior = {
- method: method
- , chainingBehavior: chainingBehavior
- };
-
- // save the methods so we can overwrite them later, if we need to.
- if (!ctx.__methods) {
- ctx.__methods = {};
- }
- ctx.__methods[name] = chainableBehavior;
-
- Object.defineProperty(ctx, name,
- { get: function () {
- chainableBehavior.chainingBehavior.call(this);
-
- var assert = function assert() {
- var old_ssfi = flag(this, 'ssfi');
- if (old_ssfi && config.includeStack === false)
- flag(this, 'ssfi', assert);
- var result = chainableBehavior.method.apply(this, arguments);
- return result === undefined ? this : result;
- };
-
- // Use `__proto__` if available
- if (hasProtoSupport) {
- // Inherit all properties from the object by replacing the `Function` prototype
- var prototype = assert.__proto__ = Object.create(this);
- // Restore the `call` and `apply` methods from `Function`
- prototype.call = call;
- prototype.apply = apply;
- }
- // Otherwise, redefine all properties (slow!)
- else {
- var asserterNames = Object.getOwnPropertyNames(ctx);
- asserterNames.forEach(function (asserterName) {
- if (!excludeNames.test(asserterName)) {
- var pd = Object.getOwnPropertyDescriptor(ctx, asserterName);
- Object.defineProperty(assert, asserterName, pd);
- }
- });
- }
-
- transferFlags(this, assert);
- return assert;
- }
- , configurable: true
- });
-};
-
-},{"../config":3,"./flag":11,"./transferFlags":27}],9:[function(require,module,exports){
-/*!
- * Chai - addMethod utility
- * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-var config = require('../config');
-
-/**
- * ### .addMethod (ctx, name, method)
- *
- * Adds a method to the prototype of an object.
- *
- * utils.addMethod(chai.Assertion.prototype, 'foo', function (str) {
- * var obj = utils.flag(this, 'object');
- * new chai.Assertion(obj).to.be.equal(str);
- * });
- *
- * Can also be accessed directly from `chai.Assertion`.
- *
- * chai.Assertion.addMethod('foo', fn);
- *
- * Then can be used as any other assertion.
- *
- * expect(fooStr).to.be.foo('bar');
- *
- * @param {Object} ctx object to which the method is added
- * @param {String} name of method to add
- * @param {Function} method function to be used for name
- * @name addMethod
- * @api public
- */
-var flag = require('./flag');
-
-module.exports = function (ctx, name, method) {
- ctx[name] = function () {
- var old_ssfi = flag(this, 'ssfi');
- if (old_ssfi && config.includeStack === false)
- flag(this, 'ssfi', ctx[name]);
- var result = method.apply(this, arguments);
- return result === undefined ? this : result;
- };
-};
-
-},{"../config":3,"./flag":11}],10:[function(require,module,exports){
-/*!
- * Chai - addProperty utility
- * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-/**
- * ### addProperty (ctx, name, getter)
- *
- * Adds a property to the prototype of an object.
- *
- * utils.addProperty(chai.Assertion.prototype, 'foo', function () {
- * var obj = utils.flag(this, 'object');
- * new chai.Assertion(obj).to.be.instanceof(Foo);
- * });
- *
- * Can also be accessed directly from `chai.Assertion`.
- *
- * chai.Assertion.addProperty('foo', fn);
- *
- * Then can be used as any other assertion.
- *
- * expect(myFoo).to.be.foo;
- *
- * @param {Object} ctx object to which the property is added
- * @param {String} name of property to add
- * @param {Function} getter function to be used for name
- * @name addProperty
- * @api public
- */
-
-module.exports = function (ctx, name, getter) {
- Object.defineProperty(ctx, name,
- { get: function () {
- var result = getter.call(this);
- return result === undefined ? this : result;
- }
- , configurable: true
- });
-};
-
-},{}],11:[function(require,module,exports){
-/*!
- * Chai - flag utility
- * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-/**
- * ### flag(object, key, [value])
- *
- * Get or set a flag value on an object. If a
- * value is provided it will be set, else it will
- * return the currently set value or `undefined` if
- * the value is not set.
- *
- * utils.flag(this, 'foo', 'bar'); // setter
- * utils.flag(this, 'foo'); // getter, returns `bar`
- *
- * @param {Object} object constructed Assertion
- * @param {String} key
- * @param {Mixed} value (optional)
- * @name flag
- * @api private
- */
-
-module.exports = function (obj, key, value) {
- var flags = obj.__flags || (obj.__flags = Object.create(null));
- if (arguments.length === 3) {
- flags[key] = value;
- } else {
- return flags[key];
- }
-};
-
-},{}],12:[function(require,module,exports){
-/*!
- * Chai - getActual utility
- * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-/**
- * # getActual(object, [actual])
- *
- * Returns the `actual` value for an Assertion
- *
- * @param {Object} object (constructed Assertion)
- * @param {Arguments} chai.Assertion.prototype.assert arguments
- */
-
-module.exports = function (obj, args) {
- return args.length > 4 ? args[4] : obj._obj;
-};
-
-},{}],13:[function(require,module,exports){
-/*!
- * Chai - getEnumerableProperties utility
- * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-/**
- * ### .getEnumerableProperties(object)
- *
- * This allows the retrieval of enumerable property names of an object,
- * inherited or not.
- *
- * @param {Object} object
- * @returns {Array}
- * @name getEnumerableProperties
- * @api public
- */
-
-module.exports = function getEnumerableProperties(object) {
- var result = [];
- for (var name in object) {
- result.push(name);
- }
- return result;
-};
-
-},{}],14:[function(require,module,exports){
-/*!
- * Chai - message composition utility
- * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-/*!
- * Module dependancies
- */
-
-var flag = require('./flag')
- , getActual = require('./getActual')
- , inspect = require('./inspect')
- , objDisplay = require('./objDisplay');
-
-/**
- * ### .getMessage(object, message, negateMessage)
- *
- * Construct the error message based on flags
- * and template tags. Template tags will return
- * a stringified inspection of the object referenced.
- *
- * Message template tags:
- * - `#{this}` current asserted object
- * - `#{act}` actual value
- * - `#{exp}` expected value
- *
- * @param {Object} object (constructed Assertion)
- * @param {Arguments} chai.Assertion.prototype.assert arguments
- * @name getMessage
- * @api public
- */
-
-module.exports = function (obj, args) {
- var negate = flag(obj, 'negate')
- , val = flag(obj, 'object')
- , expected = args[3]
- , actual = getActual(obj, args)
- , msg = negate ? args[2] : args[1]
- , flagMsg = flag(obj, 'message');
-
- if(typeof msg === "function") msg = msg();
- msg = msg || '';
- msg = msg
- .replace(/#{this}/g, objDisplay(val))
- .replace(/#{act}/g, objDisplay(actual))
- .replace(/#{exp}/g, objDisplay(expected));
-
- return flagMsg ? flagMsg + ': ' + msg : msg;
-};
-
-},{"./flag":11,"./getActual":12,"./inspect":21,"./objDisplay":22}],15:[function(require,module,exports){
-/*!
- * Chai - getName utility
- * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-/**
- * # getName(func)
- *
- * Gets the name of a function, in a cross-browser way.
- *
- * @param {Function} a function (usually a constructor)
- */
-
-module.exports = function (func) {
- if (func.name) return func.name;
-
- var match = /^\s?function ([^(]*)\(/.exec(func);
- return match && match[1] ? match[1] : "";
-};
-
-},{}],16:[function(require,module,exports){
-/*!
- * Chai - getPathInfo utility
- * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-var hasProperty = require('./hasProperty');
-
-/**
- * ### .getPathInfo(path, object)
- *
- * This allows the retrieval of property info in an
- * object given a string path.
- *
- * The path info consists of an object with the
- * following properties:
- *
- * * parent - The parent object of the property referenced by `path`
- * * name - The name of the final property, a number if it was an array indexer
- * * value - The value of the property, if it exists, otherwise `undefined`
- * * exists - Whether the property exists or not
- *
- * @param {String} path
- * @param {Object} object
- * @returns {Object} info
- * @name getPathInfo
- * @api public
- */
-
-module.exports = function getPathInfo(path, obj) {
- var parsed = parsePath(path),
- last = parsed[parsed.length - 1];
-
- var info = {
- parent: parsed.length > 1 ? _getPathValue(parsed, obj, parsed.length - 1) : obj,
- name: last.p || last.i,
- value: _getPathValue(parsed, obj)
- };
- info.exists = hasProperty(info.name, info.parent);
-
- return info;
-};
-
-
-/*!
- * ## parsePath(path)
- *
- * Helper function used to parse string object
- * paths. Use in conjunction with `_getPathValue`.
- *
- * var parsed = parsePath('myobject.property.subprop');
- *
- * ### Paths:
- *
- * * Can be as near infinitely deep and nested
- * * Arrays are also valid using the formal `myobject.document[3].property`.
- * * Literal dots and brackets (not delimiter) must be backslash-escaped.
- *
- * @param {String} path
- * @returns {Object} parsed
- * @api private
- */
-
-function parsePath (path) {
- var str = path.replace(/([^\\])\[/g, '$1.[')
- , parts = str.match(/(\\\.|[^.]+?)+/g);
- return parts.map(function (value) {
- var re = /^\[(\d+)\]$/
- , mArr = re.exec(value);
- if (mArr) return { i: parseFloat(mArr[1]) };
- else return { p: value.replace(/\\([.\[\]])/g, '$1') };
- });
-}
-
-
-/*!
- * ## _getPathValue(parsed, obj)
- *
- * Helper companion function for `.parsePath` that returns
- * the value located at the parsed address.
- *
- * var value = getPathValue(parsed, obj);
- *
- * @param {Object} parsed definition from `parsePath`.
- * @param {Object} object to search against
- * @param {Number} object to search against
- * @returns {Object|Undefined} value
- * @api private
- */
-
-function _getPathValue (parsed, obj, index) {
- var tmp = obj
- , res;
-
- index = (index === undefined ? parsed.length : index);
-
- for (var i = 0, l = index; i < l; i++) {
- var part = parsed[i];
- if (tmp) {
- if ('undefined' !== typeof part.p)
- tmp = tmp[part.p];
- else if ('undefined' !== typeof part.i)
- tmp = tmp[part.i];
- if (i == (l - 1)) res = tmp;
- } else {
- res = undefined;
- }
- }
- return res;
-}
-
-},{"./hasProperty":19}],17:[function(require,module,exports){
-/*!
- * Chai - getPathValue utility
- * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
- * @see https://github.com/logicalparadox/filtr
- * MIT Licensed
- */
-
-var getPathInfo = require('./getPathInfo');
-
-/**
- * ### .getPathValue(path, object)
- *
- * This allows the retrieval of values in an
- * object given a string path.
- *
- * var obj = {
- * prop1: {
- * arr: ['a', 'b', 'c']
- * , str: 'Hello'
- * }
- * , prop2: {
- * arr: [ { nested: 'Universe' } ]
- * , str: 'Hello again!'
- * }
- * }
- *
- * The following would be the results.
- *
- * getPathValue('prop1.str', obj); // Hello
- * getPathValue('prop1.att[2]', obj); // b
- * getPathValue('prop2.arr[0].nested', obj); // Universe
- *
- * @param {String} path
- * @param {Object} object
- * @returns {Object} value or `undefined`
- * @name getPathValue
- * @api public
- */
-module.exports = function(path, obj) {
- var info = getPathInfo(path, obj);
- return info.value;
-};
-
-},{"./getPathInfo":16}],18:[function(require,module,exports){
-/*!
- * Chai - getProperties utility
- * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-/**
- * ### .getProperties(object)
- *
- * This allows the retrieval of property names of an object, enumerable or not,
- * inherited or not.
- *
- * @param {Object} object
- * @returns {Array}
- * @name getProperties
- * @api public
- */
-
-module.exports = function getProperties(object) {
- var result = Object.getOwnPropertyNames(subject);
-
- function addProperty(property) {
- if (result.indexOf(property) === -1) {
- result.push(property);
- }
- }
-
- var proto = Object.getPrototypeOf(subject);
- while (proto !== null) {
- Object.getOwnPropertyNames(proto).forEach(addProperty);
- proto = Object.getPrototypeOf(proto);
- }
-
- return result;
-};
-
-},{}],19:[function(require,module,exports){
-/*!
- * Chai - hasProperty utility
- * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-var type = require('type-detect');
-
-/**
- * ### .hasProperty(object, name)
- *
- * This allows checking whether an object has
- * named property or numeric array index.
- *
- * Basically does the same thing as the `in`
- * operator but works properly with natives
- * and null/undefined values.
- *
- * var obj = {
- * arr: ['a', 'b', 'c']
- * , str: 'Hello'
- * }
- *
- * The following would be the results.
- *
- * 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
- *
- * hasProperty('length', obj.arr); // true
- * hasProperty(2, obj.arr); // true
- * hasProperty(3, obj.arr); // false
- *
- * @param {Objuect} object
- * @param {String|Number} name
- * @returns {Boolean} whether it exists
- * @name getPathInfo
- * @api public
- */
-
-var literals = {
- 'number': Number
- , 'string': String
-};
-
-module.exports = function hasProperty(name, obj) {
- var ot = type(obj);
-
- // Bad Object, obviously no props at all
- if(ot === 'null' || ot === 'undefined')
- return false;
-
- // The `in` operator does not work with certain literals
- // box these before the check
- if(literals[ot] && typeof obj !== 'object')
- obj = new literals[ot](obj);
-
- return name in obj;
-};
-
-},{"type-detect":33}],20:[function(require,module,exports){
-/*!
- * chai
- * Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-/*!
- * Main exports
- */
-
-exports = module.exports = {};
-
-/*!
- * test utility
- */
-
-exports.test = require('./test');
-
-/*!
- * type utility
- */
-
-exports.type = require('type-detect');
-
-/*!
- * message utility
- */
-
-exports.getMessage = require('./getMessage');
-
-/*!
- * actual utility
- */
-
-exports.getActual = require('./getActual');
-
-/*!
- * Inspect util
- */
-
-exports.inspect = require('./inspect');
-
-/*!
- * Object Display util
- */
-
-exports.objDisplay = require('./objDisplay');
-
-/*!
- * Flag utility
- */
-
-exports.flag = require('./flag');
-
-/*!
- * Flag transferring utility
- */
-
-exports.transferFlags = require('./transferFlags');
-
-/*!
- * Deep equal utility
- */
-
-exports.eql = require('deep-eql');
-
-/*!
- * Deep path value
- */
-
-exports.getPathValue = require('./getPathValue');
-
-/*!
- * Deep path info
- */
-
-exports.getPathInfo = require('./getPathInfo');
-
-/*!
- * Check if a property exists
- */
-
-exports.hasProperty = require('./hasProperty');
-
-/*!
- * Function name
- */
-
-exports.getName = require('./getName');
-
-/*!
- * add Property
- */
-
-exports.addProperty = require('./addProperty');
-
-/*!
- * add Method
- */
-
-exports.addMethod = require('./addMethod');
-
-/*!
- * overwrite Property
- */
-
-exports.overwriteProperty = require('./overwriteProperty');
-
-/*!
- * overwrite Method
- */
-
-exports.overwriteMethod = require('./overwriteMethod');
-
-/*!
- * Add a chainable method
- */
-
-exports.addChainableMethod = require('./addChainableMethod');
-
-/*!
- * Overwrite chainable method
- */
-
-exports.overwriteChainableMethod = require('./overwriteChainableMethod');
-
-
-},{"./addChainableMethod":8,"./addMethod":9,"./addProperty":10,"./flag":11,"./getActual":12,"./getMessage":14,"./getName":15,"./getPathInfo":16,"./getPathValue":17,"./hasProperty":19,"./inspect":21,"./objDisplay":22,"./overwriteChainableMethod":23,"./overwriteMethod":24,"./overwriteProperty":25,"./test":26,"./transferFlags":27,"deep-eql":29,"type-detect":33}],21:[function(require,module,exports){
-// This is (almost) directly from Node.js utils
-// https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js
-
-var getName = require('./getName');
-var getProperties = require('./getProperties');
-var getEnumerableProperties = require('./getEnumerableProperties');
-
-module.exports = inspect;
-
-/**
- * Echos the value of a value. Trys to print the value out
- * in the best way possible given the different types.
- *
- * @param {Object} obj The object to print out.
- * @param {Boolean} showHidden Flag that shows hidden (not enumerable)
- * properties of objects.
- * @param {Number} depth Depth in which to descend in object. Default is 2.
- * @param {Boolean} colors Flag to turn on ANSI escape codes to color the
- * output. Default is false (no coloring).
- */
-function inspect(obj, showHidden, depth, colors) {
- var ctx = {
- showHidden: showHidden,
- seen: [],
- stylize: function (str) { return str; }
- };
- return formatValue(ctx, obj, (typeof depth === 'undefined' ? 2 : depth));
-}
-
-// Returns true if object is a DOM element.
-var isDOMElement = function (object) {
- if (typeof HTMLElement === 'object') {
- return object instanceof HTMLElement;
- } else {
- return object &&
- typeof object === 'object' &&
- object.nodeType === 1 &&
- typeof object.nodeName === 'string';
- }
-};
-
-function formatValue(ctx, value, recurseTimes) {
- // Provide a hook for user-specified inspect functions.
- // Check that value is an object with an inspect function on it
- if (value && typeof value.inspect === 'function' &&
- // Filter out the util module, it's inspect function is special
- value.inspect !== exports.inspect &&
- // Also filter out any prototype objects using the circular check.
- !(value.constructor && value.constructor.prototype === value)) {
- var ret = value.inspect(recurseTimes);
- if (typeof ret !== 'string') {
- ret = formatValue(ctx, ret, recurseTimes);
- }
- return ret;
- }
-
- // Primitive types cannot have properties
- var primitive = formatPrimitive(ctx, value);
- if (primitive) {
- return primitive;
- }
-
- // If this is a DOM element, try to get the outer HTML.
- if (isDOMElement(value)) {
- if ('outerHTML' in value) {
- return value.outerHTML;
- // This value does not have an outerHTML attribute,
- // it could still be an XML element
- } else {
- // Attempt to serialize it
- try {
- if (document.xmlVersion) {
- var xmlSerializer = new XMLSerializer();
- return xmlSerializer.serializeToString(value);
- } else {
- // Firefox 11- do not support outerHTML
- // It does, however, support innerHTML
- // Use the following to render the element
- var ns = "http://www.w3.org/1999/xhtml";
- var container = document.createElementNS(ns, '_');
-
- container.appendChild(value.cloneNode(false));
- html = container.innerHTML
- .replace('><', '>' + value.innerHTML + '<');
- container.innerHTML = '';
- return html;
- }
- } catch (err) {
- // This could be a non-native DOM implementation,
- // continue with the normal flow:
- // printing the element as if it is an object.
- }
- }
- }
-
- // Look up the keys of the object.
- var visibleKeys = getEnumerableProperties(value);
- var keys = ctx.showHidden ? getProperties(value) : visibleKeys;
-
- // Some type of object without properties can be shortcutted.
- // In IE, errors have a single `stack` property, or if they are vanilla `Error`,
- // a `stack` plus `description` property; ignore those for consistency.
- if (keys.length === 0 || (isError(value) && (
- (keys.length === 1 && keys[0] === 'stack') ||
- (keys.length === 2 && keys[0] === 'description' && keys[1] === 'stack')
- ))) {
- if (typeof value === 'function') {
- var name = getName(value);
- var nameSuffix = name ? ': ' + name : '';
- return ctx.stylize('[Function' + nameSuffix + ']', 'special');
- }
- if (isRegExp(value)) {
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
- }
- if (isDate(value)) {
- return ctx.stylize(Date.prototype.toUTCString.call(value), 'date');
- }
- if (isError(value)) {
- return formatError(value);
- }
- }
-
- var base = '', array = false, braces = ['{', '}'];
-
- // Make Array say that they are Array
- if (isArray(value)) {
- array = true;
- braces = ['[', ']'];
- }
-
- // Make functions say that they are functions
- if (typeof value === 'function') {
- name = getName(value);
- nameSuffix = name ? ': ' + name : '';
- base = ' [Function' + nameSuffix + ']';
- }
-
- // Make RegExps say that they are RegExps
- if (isRegExp(value)) {
- base = ' ' + RegExp.prototype.toString.call(value);
- }
-
- // Make dates with properties first say the date
- if (isDate(value)) {
- base = ' ' + Date.prototype.toUTCString.call(value);
- }
-
- // Make error with message first say the error
- if (isError(value)) {
- return formatError(value);
- }
-
- if (keys.length === 0 && (!array || value.length == 0)) {
- return braces[0] + base + braces[1];
- }
-
- if (recurseTimes < 0) {
- if (isRegExp(value)) {
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
- } else {
- return ctx.stylize('[Object]', 'special');
- }
- }
-
- ctx.seen.push(value);
-
- var output;
- if (array) {
- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
- } else {
- output = keys.map(function(key) {
- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
- });
- }
-
- ctx.seen.pop();
-
- return reduceToSingleString(output, base, braces);
-}
-
-
-function formatPrimitive(ctx, value) {
- switch (typeof value) {
- case 'undefined':
- return ctx.stylize('undefined', 'undefined');
-
- case 'string':
- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
- .replace(/'/g, "\\'")
- .replace(/\\"/g, '"') + '\'';
- return ctx.stylize(simple, 'string');
-
- case 'number':
- if (value === 0 && (1/value) === -Infinity) {
- return ctx.stylize('-0', 'number');
- }
- return ctx.stylize('' + value, 'number');
-
- case 'boolean':
- return ctx.stylize('' + value, 'boolean');
- }
- // For some reason typeof null is "object", so special case here.
- if (value === null) {
- return ctx.stylize('null', 'null');
- }
-}
-
-
-function formatError(value) {
- return '[' + Error.prototype.toString.call(value) + ']';
-}
-
-
-function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
- var output = [];
- for (var i = 0, l = value.length; i < l; ++i) {
- if (Object.prototype.hasOwnProperty.call(value, String(i))) {
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
- String(i), true));
- } else {
- output.push('');
- }
- }
- keys.forEach(function(key) {
- if (!key.match(/^\d+$/)) {
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
- key, true));
- }
- });
- return output;
-}
-
-
-function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
- var name, str;
- if (value.__lookupGetter__) {
- if (value.__lookupGetter__(key)) {
- if (value.__lookupSetter__(key)) {
- str = ctx.stylize('[Getter/Setter]', 'special');
- } else {
- str = ctx.stylize('[Getter]', 'special');
- }
- } else {
- if (value.__lookupSetter__(key)) {
- str = ctx.stylize('[Setter]', 'special');
- }
- }
- }
- if (visibleKeys.indexOf(key) < 0) {
- name = '[' + key + ']';
- }
- if (!str) {
- if (ctx.seen.indexOf(value[key]) < 0) {
- if (recurseTimes === null) {
- str = formatValue(ctx, value[key], null);
- } else {
- str = formatValue(ctx, value[key], recurseTimes - 1);
- }
- if (str.indexOf('\n') > -1) {
- if (array) {
- str = str.split('\n').map(function(line) {
- return ' ' + line;
- }).join('\n').substr(2);
- } else {
- str = '\n' + str.split('\n').map(function(line) {
- return ' ' + line;
- }).join('\n');
- }
- }
- } else {
- str = ctx.stylize('[Circular]', 'special');
- }
- }
- if (typeof name === 'undefined') {
- if (array && key.match(/^\d+$/)) {
- return str;
- }
- name = JSON.stringify('' + key);
- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
- name = name.substr(1, name.length - 2);
- name = ctx.stylize(name, 'name');
- } else {
- name = name.replace(/'/g, "\\'")
- .replace(/\\"/g, '"')
- .replace(/(^"|"$)/g, "'");
- name = ctx.stylize(name, 'string');
- }
- }
-
- return name + ': ' + str;
-}
-
-
-function reduceToSingleString(output, base, braces) {
- var numLinesEst = 0;
- var length = output.reduce(function(prev, cur) {
- numLinesEst++;
- if (cur.indexOf('\n') >= 0) numLinesEst++;
- return prev + cur.length + 1;
- }, 0);
-
- if (length > 60) {
- return braces[0] +
- (base === '' ? '' : base + '\n ') +
- ' ' +
- output.join(',\n ') +
- ' ' +
- braces[1];
- }
-
- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
-}
-
-function isArray(ar) {
- return Array.isArray(ar) ||
- (typeof ar === 'object' && objectToString(ar) === '[object Array]');
-}
-
-function isRegExp(re) {
- return typeof re === 'object' && objectToString(re) === '[object RegExp]';
-}
-
-function isDate(d) {
- return typeof d === 'object' && objectToString(d) === '[object Date]';
-}
-
-function isError(e) {
- return typeof e === 'object' && objectToString(e) === '[object Error]';
-}
-
-function objectToString(o) {
- return Object.prototype.toString.call(o);
-}
-
-},{"./getEnumerableProperties":13,"./getName":15,"./getProperties":18}],22:[function(require,module,exports){
-/*!
- * Chai - flag utility
- * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-/*!
- * Module dependancies
- */
-
-var inspect = require('./inspect');
-var config = require('../config');
-
-/**
- * ### .objDisplay (object)
- *
- * Determines if an object or an array matches
- * criteria to be inspected in-line for error
- * messages or should be truncated.
- *
- * @param {Mixed} javascript object to inspect
- * @name objDisplay
- * @api public
- */
-
-module.exports = function (obj) {
- var str = inspect(obj)
- , type = Object.prototype.toString.call(obj);
-
- if (config.truncateThreshold && str.length >= config.truncateThreshold) {
- if (type === '[object Function]') {
- return !obj.name || obj.name === ''
- ? '[Function]'
- : '[Function: ' + obj.name + ']';
- } else if (type === '[object Array]') {
- return '[ Array(' + obj.length + ') ]';
- } else if (type === '[object Object]') {
- var keys = Object.keys(obj)
- , kstr = keys.length > 2
- ? keys.splice(0, 2).join(', ') + ', ...'
- : keys.join(', ');
- return '{ Object (' + kstr + ') }';
- } else {
- return str;
- }
- } else {
- return str;
- }
-};
-
-},{"../config":3,"./inspect":21}],23:[function(require,module,exports){
-/*!
- * Chai - overwriteChainableMethod utility
- * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-/**
- * ### overwriteChainableMethod (ctx, name, method, chainingBehavior)
- *
- * Overwites an already existing chainable method
- * and provides access to the previous function or
- * property. Must return functions to be used for
- * name.
- *
- * utils.overwriteChainableMethod(chai.Assertion.prototype, 'length',
- * function (_super) {
- * }
- * , function (_super) {
- * }
- * );
- *
- * Can also be accessed directly from `chai.Assertion`.
- *
- * chai.Assertion.overwriteChainableMethod('foo', fn, fn);
- *
- * Then can be used as any other assertion.
- *
- * expect(myFoo).to.have.length(3);
- * expect(myFoo).to.have.length.above(3);
- *
- * @param {Object} ctx object whose method / property is to be overwritten
- * @param {String} name of method / property to overwrite
- * @param {Function} method function that returns a function to be used for name
- * @param {Function} chainingBehavior function that returns a function to be used for property
- * @name overwriteChainableMethod
- * @api public
- */
-
-module.exports = function (ctx, name, method, chainingBehavior) {
- var chainableBehavior = ctx.__methods[name];
-
- var _chainingBehavior = chainableBehavior.chainingBehavior;
- chainableBehavior.chainingBehavior = function () {
- var result = chainingBehavior(_chainingBehavior).call(this);
- return result === undefined ? this : result;
- };
-
- var _method = chainableBehavior.method;
- chainableBehavior.method = function () {
- var result = method(_method).apply(this, arguments);
- return result === undefined ? this : result;
- };
-};
-
-},{}],24:[function(require,module,exports){
-/*!
- * Chai - overwriteMethod utility
- * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-/**
- * ### overwriteMethod (ctx, name, fn)
- *
- * Overwites an already existing method and provides
- * access to previous function. Must return function
- * to be used for name.
- *
- * utils.overwriteMethod(chai.Assertion.prototype, 'equal', function (_super) {
- * return function (str) {
- * var obj = utils.flag(this, 'object');
- * if (obj instanceof Foo) {
- * new chai.Assertion(obj.value).to.equal(str);
- * } else {
- * _super.apply(this, arguments);
- * }
- * }
- * });
- *
- * Can also be accessed directly from `chai.Assertion`.
- *
- * chai.Assertion.overwriteMethod('foo', fn);
- *
- * Then can be used as any other assertion.
- *
- * expect(myFoo).to.equal('bar');
- *
- * @param {Object} ctx object whose method is to be overwritten
- * @param {String} name of method to overwrite
- * @param {Function} method function that returns a function to be used for name
- * @name overwriteMethod
- * @api public
- */
-
-module.exports = function (ctx, name, method) {
- var _method = ctx[name]
- , _super = function () { return this; };
-
- if (_method && 'function' === typeof _method)
- _super = _method;
-
- ctx[name] = function () {
- var result = method(_super).apply(this, arguments);
- return result === undefined ? this : result;
- }
-};
-
-},{}],25:[function(require,module,exports){
-/*!
- * Chai - overwriteProperty utility
- * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-/**
- * ### overwriteProperty (ctx, name, fn)
- *
- * Overwites an already existing property getter and provides
- * access to previous value. Must return function to use as getter.
- *
- * utils.overwriteProperty(chai.Assertion.prototype, 'ok', function (_super) {
- * return function () {
- * var obj = utils.flag(this, 'object');
- * if (obj instanceof Foo) {
- * new chai.Assertion(obj.name).to.equal('bar');
- * } else {
- * _super.call(this);
- * }
- * }
- * });
- *
- *
- * Can also be accessed directly from `chai.Assertion`.
- *
- * chai.Assertion.overwriteProperty('foo', fn);
- *
- * Then can be used as any other assertion.
- *
- * expect(myFoo).to.be.ok;
- *
- * @param {Object} ctx object whose property is to be overwritten
- * @param {String} name of property to overwrite
- * @param {Function} getter function that returns a getter function to be used for name
- * @name overwriteProperty
- * @api public
- */
-
-module.exports = function (ctx, name, getter) {
- var _get = Object.getOwnPropertyDescriptor(ctx, name)
- , _super = function () {};
-
- if (_get && 'function' === typeof _get.get)
- _super = _get.get
-
- Object.defineProperty(ctx, name,
- { get: function () {
- var result = getter(_super).call(this);
- return result === undefined ? this : result;
- }
- , configurable: true
- });
-};
-
-},{}],26:[function(require,module,exports){
-/*!
- * Chai - test utility
- * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-/*!
- * Module dependancies
- */
-
-var flag = require('./flag');
-
-/**
- * # test(object, expression)
- *
- * Test and object for expression.
- *
- * @param {Object} object (constructed Assertion)
- * @param {Arguments} chai.Assertion.prototype.assert arguments
- */
-
-module.exports = function (obj, args) {
- var negate = flag(obj, 'negate')
- , expr = args[0];
- return negate ? !expr : expr;
-};
-
-},{"./flag":11}],27:[function(require,module,exports){
-/*!
- * Chai - transferFlags utility
- * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-/**
- * ### transferFlags(assertion, object, includeAll = true)
- *
- * Transfer all the flags for `assertion` to `object`. If
- * `includeAll` is set to `false`, then the base Chai
- * assertion flags (namely `object`, `ssfi`, and `message`)
- * will not be transferred.
- *
- *
- * var newAssertion = new Assertion();
- * utils.transferFlags(assertion, newAssertion);
- *
- * var anotherAsseriton = new Assertion(myObj);
- * utils.transferFlags(assertion, anotherAssertion, false);
- *
- * @param {Assertion} assertion the assertion to transfer the flags from
- * @param {Object} object the object to transfer the flags to; usually a new assertion
- * @param {Boolean} includeAll
- * @name transferFlags
- * @api private
- */
-
-module.exports = function (assertion, object, includeAll) {
- var flags = assertion.__flags || (assertion.__flags = Object.create(null));
-
- if (!object.__flags) {
- object.__flags = Object.create(null);
- }
-
- includeAll = arguments.length === 3 ? includeAll : true;
-
- for (var flag in flags) {
- if (includeAll ||
- (flag !== 'object' && flag !== 'ssfi' && flag != 'message')) {
- object.__flags[flag] = flags[flag];
- }
- }
-};
-
-},{}],28:[function(require,module,exports){
-/*!
- * assertion-error
- * Copyright(c) 2013 Jake Luer <jake@qualiancy.com>
- * MIT Licensed
- */
-
-/*!
- * Return a function that will copy properties from
- * one object to another excluding any originally
- * listed. Returned function will create a new `{}`.
- *
- * @param {String} excluded properties ...
- * @return {Function}
- */
-
-function exclude () {
- var excludes = [].slice.call(arguments);
-
- function excludeProps (res, obj) {
- Object.keys(obj).forEach(function (key) {
- if (!~excludes.indexOf(key)) res[key] = obj[key];
- });
- }
-
- return function extendExclude () {
- var args = [].slice.call(arguments)
- , i = 0
- , res = {};
-
- for (; i < args.length; i++) {
- excludeProps(res, args[i]);
- }
-
- return res;
- };
-}
-
-/*!
- * Primary Exports
- */
-
-module.exports = AssertionError;
-
-/**
- * ### AssertionError
- *
- * An extension of the JavaScript `Error` constructor for
- * assertion and validation scenarios.
- *
- * @param {String} message
- * @param {Object} properties to include (optional)
- * @param {callee} start stack function (optional)
- */
-
-function AssertionError (message, _props, ssf) {
- var extend = exclude('name', 'message', 'stack', 'constructor', 'toJSON')
- , props = extend(_props || {});
-
- // default values
- this.message = message || 'Unspecified AssertionError';
- this.showDiff = false;
-
- // copy from properties
- for (var key in props) {
- this[key] = props[key];
- }
-
- // capture stack trace
- ssf = ssf || arguments.callee;
- if (ssf && Error.captureStackTrace) {
- Error.captureStackTrace(this, ssf);
- } else {
- this.stack = new Error().stack;
- }
-}
-
-/*!
- * Inherit from Error.prototype
- */
-
-AssertionError.prototype = Object.create(Error.prototype);
-
-/*!
- * Statically set name
- */
-
-AssertionError.prototype.name = 'AssertionError';
-
-/*!
- * Ensure correct constructor
- */
-
-AssertionError.prototype.constructor = AssertionError;
-
-/**
- * Allow errors to be converted to JSON for static transfer.
- *
- * @param {Boolean} include stack (default: `true`)
- * @return {Object} object that can be `JSON.stringify`
- */
-
-AssertionError.prototype.toJSON = function (stack) {
- var extend = exclude('constructor', 'toJSON', 'stack')
- , props = extend({ name: this.name }, this);
-
- // include stack if exists and not turned off
- if (false !== stack && this.stack) {
- props.stack = this.stack;
- }
-
- return props;
-};
-
-},{}],29:[function(require,module,exports){
-module.exports = require('./lib/eql');
-
-},{"./lib/eql":30}],30:[function(require,module,exports){
-/*!
- * deep-eql
- * Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-/*!
- * Module dependencies
- */
-
-var type = require('type-detect');
-
-/*!
- * Buffer.isBuffer browser shim
- */
-
-var Buffer;
-try { Buffer = require('buffer').Buffer; }
-catch(ex) {
- Buffer = {};
- Buffer.isBuffer = function() { return false; }
-}
-
-/*!
- * Primary Export
- */
-
-module.exports = deepEqual;
-
-/**
- * Assert super-strict (egal) equality between
- * two objects of any type.
- *
- * @param {Mixed} a
- * @param {Mixed} b
- * @param {Array} memoised (optional)
- * @return {Boolean} equal match
- */
-
-function deepEqual(a, b, m) {
- if (sameValue(a, b)) {
- return true;
- } else if ('date' === type(a)) {
- return dateEqual(a, b);
- } else if ('regexp' === type(a)) {
- return regexpEqual(a, b);
- } else if (Buffer.isBuffer(a)) {
- return bufferEqual(a, b);
- } else if ('arguments' === type(a)) {
- return argumentsEqual(a, b, m);
- } else if (!typeEqual(a, b)) {
- return false;
- } else if (('object' !== type(a) && 'object' !== type(b))
- && ('array' !== type(a) && 'array' !== type(b))) {
- return sameValue(a, b);
- } else {
- return objectEqual(a, b, m);
- }
-}
-
-/*!
- * Strict (egal) equality test. Ensures that NaN always
- * equals NaN and `-0` does not equal `+0`.
- *
- * @param {Mixed} a
- * @param {Mixed} b
- * @return {Boolean} equal match
- */
-
-function sameValue(a, b) {
- if (a === b) return a !== 0 || 1 / a === 1 / b;
- return isNaN(a) && isNaN(b);
-}
-
-/*!
- * Compare the types of two given objects and
- * return if they are equal. Note that an Array
- * has a type of `array` (not `object`) and arguments
- * have a type of `arguments` (not `array`/`object`).
- *
- * @param {Mixed} a
- * @param {Mixed} b
- * @return {Boolean} result
- */
-
-function typeEqual(a, b) {
- return type(a) === type(b);
-}
-
-/*!
- * Compare two Date objects by asserting that
- * the time values are equal using `saveValue`.
- *
- * @param {Date} a
- * @param {Date} b
- * @return {Boolean} result
- */
-
-function dateEqual(a, b) {
- if ('date' !== type(b)) return false;
- return sameValue(a.getTime(), b.getTime());
-}
-
-/*!
- * Compare two regular expressions by converting them
- * to string and checking for `sameValue`.
- *
- * @param {RegExp} a
- * @param {RegExp} b
- * @return {Boolean} result
- */
-
-function regexpEqual(a, b) {
- if ('regexp' !== type(b)) return false;
- return sameValue(a.toString(), b.toString());
-}
-
-/*!
- * Assert deep equality of two `arguments` objects.
- * Unfortunately, these must be sliced to arrays
- * prior to test to ensure no bad behavior.
- *
- * @param {Arguments} a
- * @param {Arguments} b
- * @param {Array} memoize (optional)
- * @return {Boolean} result
- */
-
-function argumentsEqual(a, b, m) {
- if ('arguments' !== type(b)) return false;
- a = [].slice.call(a);
- b = [].slice.call(b);
- return deepEqual(a, b, m);
-}
-
-/*!
- * Get enumerable properties of a given object.
- *
- * @param {Object} a
- * @return {Array} property names
- */
-
-function enumerable(a) {
- var res = [];
- for (var key in a) res.push(key);
- return res;
-}
-
-/*!
- * Simple equality for flat iterable objects
- * such as Arrays or Node.js buffers.
- *
- * @param {Iterable} a
- * @param {Iterable} b
- * @return {Boolean} result
- */
-
-function iterableEqual(a, b) {
- if (a.length !== b.length) return false;
-
- var i = 0;
- var match = true;
-
- for (; i < a.length; i++) {
- if (a[i] !== b[i]) {
- match = false;
- break;
- }
- }
-
- return match;
-}
-
-/*!
- * Extension to `iterableEqual` specifically
- * for Node.js Buffers.
- *
- * @param {Buffer} a
- * @param {Mixed} b
- * @return {Boolean} result
- */
-
-function bufferEqual(a, b) {
- if (!Buffer.isBuffer(b)) return false;
- return iterableEqual(a, b);
-}
-
-/*!
- * Block for `objectEqual` ensuring non-existing
- * values don't get in.
- *
- * @param {Mixed} object
- * @return {Boolean} result
- */
-
-function isValue(a) {
- return a !== null && a !== undefined;
-}
-
-/*!
- * Recursively check the equality of two objects.
- * Once basic sameness has been established it will
- * defer to `deepEqual` for each enumerable key
- * in the object.
- *
- * @param {Mixed} a
- * @param {Mixed} b
- * @return {Boolean} result
- */
-
-function objectEqual(a, b, m) {
- if (!isValue(a) || !isValue(b)) {
- return false;
- }
-
- if (a.prototype !== b.prototype) {
- return false;
- }
-
- var i;
- if (m) {
- for (i = 0; i < m.length; i++) {
- if ((m[i][0] === a && m[i][1] === b)
- || (m[i][0] === b && m[i][1] === a)) {
- return true;
- }
- }
- } else {
- m = [];
- }
-
- try {
- var ka = enumerable(a);
- var kb = enumerable(b);
- } catch (ex) {
- return false;
- }
-
- ka.sort();
- kb.sort();
-
- if (!iterableEqual(ka, kb)) {
- return false;
- }
-
- m.push([ a, b ]);
-
- var key;
- for (i = ka.length - 1; i >= 0; i--) {
- key = ka[i];
- if (!deepEqual(a[key], b[key], m)) {
- return false;
- }
- }
-
- return true;
-}
-
-},{"buffer":undefined,"type-detect":31}],31:[function(require,module,exports){
-module.exports = require('./lib/type');
-
-},{"./lib/type":32}],32:[function(require,module,exports){
-/*!
- * type-detect
- * Copyright(c) 2013 jake luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-/*!
- * Primary Exports
- */
-
-exports = module.exports = getType;
-
-/*!
- * Detectable javascript natives
- */
-
-var natives = {
- '[object Array]': 'array'
- , '[object RegExp]': 'regexp'
- , '[object Function]': 'function'
- , '[object Arguments]': 'arguments'
- , '[object Date]': 'date'
-};
-
-/**
- * ### typeOf (obj)
- *
- * Use several different techniques to determine
- * the type of object being tested.
- *
- *
- * @param {Mixed} object
- * @return {String} object type
- * @api public
- */
-
-function getType (obj) {
- var str = Object.prototype.toString.call(obj);
- if (natives[str]) return natives[str];
- if (obj === null) return 'null';
- if (obj === undefined) return 'undefined';
- if (obj === Object(obj)) return 'object';
- return typeof obj;
-}
-
-exports.Library = Library;
-
-/**
- * ### Library
- *
- * Create a repository for custom type detection.
- *
- * ```js
- * var lib = new type.Library;
- * ```
- *
- */
-
-function Library () {
- this.tests = {};
-}
-
-/**
- * #### .of (obj)
- *
- * Expose replacement `typeof` detection to the library.
- *
- * ```js
- * if ('string' === lib.of('hello world')) {
- * // ...
- * }
- * ```
- *
- * @param {Mixed} object to test
- * @return {String} type
- */
-
-Library.prototype.of = getType;
-
-/**
- * #### .define (type, test)
- *
- * Add a test to for the `.test()` assertion.
- *
- * Can be defined as a regular expression:
- *
- * ```js
- * lib.define('int', /^[0-9]+$/);
- * ```
- *
- * ... or as a function:
- *
- * ```js
- * lib.define('bln', function (obj) {
- * if ('boolean' === lib.of(obj)) return true;
- * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ];
- * if ('string' === lib.of(obj)) obj = obj.toLowerCase();
- * return !! ~blns.indexOf(obj);
- * });
- * ```
- *
- * @param {String} type
- * @param {RegExp|Function} test
- * @api public
- */
-
-Library.prototype.define = function (type, test) {
- if (arguments.length === 1) return this.tests[type];
- this.tests[type] = test;
- return this;
-};
-
-/**
- * #### .test (obj, test)
- *
- * Assert that an object is of type. Will first
- * check natives, and if that does not pass it will
- * use the user defined custom tests.
- *
- * ```js
- * assert(lib.test('1', 'int'));
- * assert(lib.test('yes', 'bln'));
- * ```
- *
- * @param {Mixed} object
- * @param {String} type
- * @return {Boolean} result
- * @api public
- */
-
-Library.prototype.test = function (obj, type) {
- if (type === getType(obj)) return true;
- var test = this.tests[type];
-
- if (test && 'regexp' === getType(test)) {
- return test.test(obj);
- } else if (test && 'function' === getType(test)) {
- return test(obj);
- } else {
- throw new ReferenceError('Type test "' + type + '" not defined or invalid.');
- }
-};
-
-},{}],33:[function(require,module,exports){
-arguments[4][31][0].apply(exports,arguments)
-},{"./lib/type":34,"dup":31}],34:[function(require,module,exports){
-/*!
- * type-detect
- * Copyright(c) 2013 jake luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
-/*!
- * Primary Exports
- */
-
-exports = module.exports = getType;
-
-/**
- * ### typeOf (obj)
- *
- * Use several different techniques to determine
- * the type of object being tested.
- *
- *
- * @param {Mixed} object
- * @return {String} object type
- * @api public
- */
-var objectTypeRegexp = /^\[object (.*)\]$/;
-
-function getType(obj) {
- var type = Object.prototype.toString.call(obj).match(objectTypeRegexp)[1].toLowerCase();
- // Let "new String('')" return 'object'
- if (typeof Promise === 'function' && obj instanceof Promise) return 'promise';
- // PhantomJS has type "DOMWindow" for null
- if (obj === null) return 'null';
- // PhantomJS has type "DOMWindow" for undefined
- if (obj === undefined) return 'undefined';
- return type;
-}
-
-exports.Library = Library;
-
-/**
- * ### Library
- *
- * Create a repository for custom type detection.
- *
- * ```js
- * var lib = new type.Library;
- * ```
- *
- */
-
-function Library() {
- if (!(this instanceof Library)) return new Library();
- this.tests = {};
-}
-
-/**
- * #### .of (obj)
- *
- * Expose replacement `typeof` detection to the library.
- *
- * ```js
- * if ('string' === lib.of('hello world')) {
- * // ...
- * }
- * ```
- *
- * @param {Mixed} object to test
- * @return {String} type
- */
-
-Library.prototype.of = getType;
-
-/**
- * #### .define (type, test)
- *
- * Add a test to for the `.test()` assertion.
- *
- * Can be defined as a regular expression:
- *
- * ```js
- * lib.define('int', /^[0-9]+$/);
- * ```
- *
- * ... or as a function:
- *
- * ```js
- * lib.define('bln', function (obj) {
- * if ('boolean' === lib.of(obj)) return true;
- * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ];
- * if ('string' === lib.of(obj)) obj = obj.toLowerCase();
- * return !! ~blns.indexOf(obj);
- * });
- * ```
- *
- * @param {String} type
- * @param {RegExp|Function} test
- * @api public
- */
-
-Library.prototype.define = function(type, test) {
- if (arguments.length === 1) return this.tests[type];
- this.tests[type] = test;
- return this;
-};
-
-/**
- * #### .test (obj, test)
- *
- * Assert that an object is of type. Will first
- * check natives, and if that does not pass it will
- * use the user defined custom tests.
- *
- * ```js
- * assert(lib.test('1', 'int'));
- * assert(lib.test('yes', 'bln'));
- * ```
- *
- * @param {Mixed} object
- * @param {String} type
- * @return {Boolean} result
- * @api public
- */
-
-Library.prototype.test = function(obj, type) {
- if (type === getType(obj)) return true;
- var test = this.tests[type];
-
- if (test && 'regexp' === getType(test)) {
- return test.test(obj);
- } else if (test && 'function' === getType(test)) {
- return test(obj);
- } else {
- throw new ReferenceError('Type test "' + type + '" not defined or invalid.');
- }
-};
-
-},{}],35:[function(require,module,exports){
-module.exports = require('./lib/chai');
-
-},{"./lib/chai":1}]},{},[35])(35)
-});
diff --git a/toolkit/components/microformats/test/static/javascript/count.js b/toolkit/components/microformats/test/static/javascript/count.js
deleted file mode 100644
index 56a64c05ea..0000000000
--- a/toolkit/components/microformats/test/static/javascript/count.js
+++ /dev/null
@@ -1,62 +0,0 @@
-/*!
- 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
-*/
-
-window.onload = function() {
-
- var 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);
-
- options ={
- 'node': node
- };
-
- // parse direct into Modules to help debugging
- if(window.Modules){
- var parser = new Modules.Parser();
- mfJSON = parser.count(options);
- }else if(window.Microformats){
- mfJSON = Microformats.count(options);
- }
-
-
- // format output
- parserJSONElt.innerHTML = htmlEscape( js_beautify( JSON.stringify(mfJSON) ) );
- //prettyPrint();
-
- }
-
- function htmlEscape(str) {
- return String(str)
- .replace(/&/g, '&amp;')
- .replace(/"/g, '&quot;')
- .replace(/'/g, '&#39;')
- .replace(/</g, '&lt;')
- .replace(/>/g, '&gt;');
- }
-
-
-};
diff --git a/toolkit/components/microformats/test/static/javascript/data.js b/toolkit/components/microformats/test/static/javascript/data.js
deleted file mode 100644
index 3f725c6db2..0000000000
--- a/toolkit/components/microformats/test/static/javascript/data.js
+++ /dev/null
@@ -1 +0,0 @@
-var testData = {"date":"2015-09-25T12:26:26.421Z","repo":"microformats/tests","version":"0.1.24","data":[{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Mozilla Foundation\"],\n \"org\": [\"Mozilla Foundation\"],\n \"url\": [\"http://mozilla.org/\"],\n \"adr\": [{\n \"value\": \"665 3rd St. \\n Suite 207 \\n San Francisco, \\n CA \\n 94107 \\n U.S.A.\",\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"street-address\": [\"665 3rd St.\"],\n \"extended-address\": [\"Suite 207\"],\n \"locality\": [\"San Francisco\"],\n \"region\": [\"CA\"],\n \"postal-code\": [\"94107\"]\n }\n }]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"h-card\">\n <p>\n <a class=\"p-name p-org u-url\" href=\"http://mozilla.org/\">Mozilla Foundation</a>\n <img class=\"logo\" src=\"../logo.jpg\"/>\n </p>\n <p class=\"adr\">\n <span class=\"street-address\">665 3rd St.</span> \n <span class=\"extended-address\">Suite 207</span> \n <span class=\"locality\">San Francisco</span>, \n <span class=\"region\">CA</span> \n <span class=\"postal-code\">94107</span> \n <span class=\"p-country-name\">U.S.A.</span> \n </p>\n</div>","name":"mf-mixed-h-card-mixedpropertries"},{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Frances Berriman\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<p class=\"h-card vcard\">Frances Berriman</p>","name":"mf-mixed-h-card-tworoots"},{"json":"\n{\n \"items\": [{\n \"type\": [\"h-entry\"],\n \"properties\": {\n \"author\": [{\n \"value\": \"aaronparecki.com\\n Aaron Parecki\\n Aaron Parecki\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"photo\": [\"https://aaronparecki.com/images/aaronpk.png\"],\n \"logo\": [\"https://aaronparecki.com/images/aaronpk.png\"],\n \"url\": [\"https://aaronparecki.com/\"],\n \"uid\": [\"https://aaronparecki.com/\"],\n \"name\": [\"Aaron Parecki\"]\n }\n }],\n \"content\": [{\n \"value\": \"Did you play\\n @playmapattackat\\n #realtimeconf? Here is some more info about how we built it!\\n http://pdx.esri.com/blog/2013/10/17/introducting-mapattack/\",\n \"html\": \"Did you play\\n <a href=\\\"http://twitter.com/playmapattack\\\">@playmapattack</a>at\\n <a href=\\\"http://aaronparecki.com/tag/realtimeconf\\\">#<span class=\\\"p-category\\\">realtimeconf</span></a>? Here is some more info about how we built it!\\n <a href=\\\"http://pdx.esri.com/blog/2013/10/17/introducting-mapattack/\\\"><span class=\\\"protocol\\\">http://</span>pdx.esri.com/blog/2013/10/17/introducting-mapattack/</a>\\n \"\n }],\n \"name\": [\"Did you play\\n @playmapattackat\\n #realtimeconf? Here is some more info about how we built it!\\n http://pdx.esri.com/blog/2013/10/17/introducting-mapattack/\"],\n \"category\": [\"realtimeconf\"]\n }\n }],\n \"rels\": {\n \"author\": [\"https://aaronparecki.com/\", \"https://plus.google.com/117847912875913905493\"]\n },\n \"rel-urls\": {\n \"https://aaronparecki.com/\": {\n \"text\": \"aaronparecki.com\",\n \"rels\": [\"author\"]\n },\n \"https://plus.google.com/117847912875913905493\": {\n \"text\": \"Aaron Parecki\",\n \"rels\": [\"author\"]\n }\n }\n}","html":"<!-- simplified version of http://aaronparecki.com/notes/2013/10/18/2/realtimeconf-mapattack -->\n<base href=\"http://aaronparecki.com/\" />\n\n<div class=\"h-entry\">\n <div class=\"h-card vcard author p-author\">\n <img class=\"photo logo u-photo u-logo\" src=\"https://aaronparecki.com/images/aaronpk.png\" alt=\"Aaron Parecki\"/>\n <a href=\"https://aaronparecki.com/\" rel=\"author\" class=\"u-url u-uid url\">aaronparecki.com</a>\n <a class=\"p-name fn value\" href=\"https://aaronparecki.com/\">Aaron Parecki</a>\n <a href=\"https://plus.google.com/117847912875913905493\" rel=\"author\" class=\"google-profile\">Aaron Parecki</a>\n </div>\n <div class=\"entry-content e-content p-name\">Did you play\n <a href=\"http://twitter.com/playmapattack\">@playmapattack</a>at\n <a href=\"/tag/realtimeconf\">#<span class=\"p-category\">realtimeconf</span></a>? Here is some more info about how we built it!\n <a href=\"http://pdx.esri.com/blog/2013/10/17/introducting-mapattack/\"><span class=\"protocol\">http://</span>pdx.esri.com/blog/2013/10/17/introducting-mapattack/</a>\n </div>\n</div>","name":"mf-mixed-h-entry-mixedroots"},{"json":"{\n \"items\": [{\n \"type\": [\"h-resume\"],\n \"properties\": {\n \"contact\": [{\n \"value\": \"Tim Berners-Lee\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Tim Berners-Lee\"],\n \"job-title\": [\"Director of the World Wide Web Foundation\"]\n }\n }],\n \"summary\": [\"Invented the World Wide Web.\"],\n \"experience\": [{\n \"value\": \"World Wide Web Foundation\",\n \"type\": [\"h-event\", \"h-card\"],\n \"properties\": {\n \"job-title\": [\"Director\"],\n \"name\": [\"World Wide Web Foundation\"],\n \"org\": [\"World Wide Web Foundation\"],\n \"url\": [\"http://www.webfoundation.org/\"],\n \"start\": [\"2009-01-18\"],\n \"duration\": [\"P2Y11M\"]\n }\n }],\n \"name\": [\"Tim Berners-Lee\\n Director of the World Wide Web Foundation\\n \\n Invented the World Wide Web.\\n \\n Director\\n World Wide Web Foundation\\n \\n Jan 2009 – Present\\n (2 years 11 month)\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<meta charset=\"utf-8\">\n<div class=\"h-resume\">\n <div class=\"p-contact vcard\">\n <p class=\"fn\">Tim Berners-Lee</p>\n <p class=\"title\">Director of the World Wide Web Foundation</p>\n </div>\n <p class=\"p-summary\">Invented the World Wide Web.</p><hr />\n <div class=\"p-experience vevent vcard\">\n <p class=\"title\">Director</p>\n <p><a class=\"fn org summary url\" href=\"http://www.webfoundation.org/\">World Wide Web Foundation</a></p>\n <p>\n <time class=\"dtstart\" datetime=\"2009-01-18\">Jan 2009</time> – Present\n <time class=\"duration\" datetime=\"P2Y11M\">(2 years 11 month)</time>\n </p>\n </div>\n</div>","name":"mf-mixed-h-resume-mixedroots"},{"json":"{\n \"items\": [{\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"street-address\": [\"665 3rd St.\"],\n \"extended-address\": [\"Suite 207\"],\n \"locality\": [\"San Francisco\"],\n \"region\": [\"CA\"],\n \"postal-code\": [\"94107\"],\n \"country-name\": [\"U.S.A.\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<p class=\"adr\">\n <span class=\"street-address\">665 3rd St.</span> \n <span class=\"extended-address\">Suite 207</span> \n <span class=\"locality\">San Francisco</span>, \n <span class=\"region\">CA</span> \n <span class=\"postal-code\">94107</span> \n <span class=\"country-name\">U.S.A.</span> \n</p>","name":"mf-v1-adr-simpleproperties"},{"json":"{\n \"items\": [{\n \"type\": [\"h-geo\"],\n \"properties\": {\n \"latitude\": [\"37.408183\"],\n \"longitude\": [\"-122.13855\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<meta charset=\"utf-8\">\n<p class=\"geo\">\n <abbr class=\"latitude\" title=\"37.408183\">N 37° 24.491</abbr>, \n <abbr class=\"longitude\" title=\"-122.13855\">W 122° 08.313</abbr>\n</p>","name":"mf-v1-geo-abbrpattern"},{"json":"{\n \"items\": [{\n \"type\": [\"h-geo\"],\n \"properties\": {\n \"latitude\": [\"51.513458\"],\n \"longitude\": [\"-0.14812\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<p>\n <span class=\"geo\">The Bricklayer's Arms\n <span class=\"latitude\">\n <span class=\"value-title\" title=\"51.513458\"> </span> \n </span>\n <span class=\"longitude\">\n <span class=\"value-title\" title=\"-0.14812\"> </span>\n </span>\n </span>\n</p>","name":"mf-v1-geo-hidden"},{"json":"{\n \"items\": [{\n \"type\": [\"h-geo\"],\n \"properties\": {\n \"latitude\": [\"51.513458\"],\n \"longitude\": [\"-0.14812\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"We are meeting at \n<span class=\"geo\"> \n <span>The Bricklayer's Arms</span>\n (Geo: <span class=\"latitude\">51.513458</span>:\n <span class=\"longitude\">-0.14812</span>)\n</span>","name":"mf-v1-geo-simpleproperties"},{"json":"{\n \"items\": [{\n \"type\": [\"h-geo\"],\n \"properties\": {\n \"latitude\": [\"51.513458\"],\n \"longitude\": [\"-0.14812\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<meta charset=\"utf-8\">\n<p>\n <span class=\"geo\">\n <span class=\"latitude\">\n <span class=\"value-title\" title=\"51.513458\">N 51° 51.345</span>, \n </span>\n <span class=\"longitude\">\n <span class=\"value-title\" title=\"-0.14812\">W -0° 14.812</span>\n </span>\n </span>\n</p>","name":"mf-v1-geo-valuetitleclass"},{"json":"{\n \"items\": [{\n \"type\": [\"h-event\"],\n \"properties\": {\n \"name\": [\"The 4th Microformat party\"],\n \"start\": [\n \"2009-06-26 19:00:00\", \n \"2009-06-26 07:00:00\", \n \"2009-06-26 19:00\", \n \"2009-06-26 19\", \n \"2009-06-26 19\", \n \"2009-06-26 19:00\", \n \"2009-06-26 19:00\", \n \"2009-06-26 19:00\", \n \"2009-06-26 07:00\"\n ]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"vevent\">\n <span class=\"summary\">The 4th Microformat party</span> will be on \n <ul>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07:00:00pm \n </span></li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07:00:00am \n </span></li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07:00pm \n </span></li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07pm \n </span></li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">7pm \n </span></li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">7:00pm \n </span></li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07:00p.m. \n </span></li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07:00PM \n </span></li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">7:00am \n </span></li>\n </ul>\n</div>","name":"mf-v1-hcalendar-ampm"},{"json":"{\n \"items\": [{\n \"type\": [\"h-event\"],\n \"properties\": {\n \"name\": [\"CPJ Online Press Freedom Summit\"],\n \"start\": [\"2012-10-10\"],\n \"location\": [\"San Francisco\"],\n \"attendee\": [{\n \"value\": \"Brian Warner\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Brian Warner\"]\n }\n }, {\n \"value\": \"Kyle Machulis\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Kyle Machulis\"]\n }\n }, {\n \"value\": \"Tantek Çelik\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Tantek Çelik\"]\n }\n }, {\n \"value\": \"Sid Sutter\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Sid Sutter\"]\n }\n }]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<meta charset=\"utf-8\">\n<div class=\"vevent\">\n <span class=\"summary\">CPJ Online Press Freedom Summit</span>\n (<time class=\"dtstart\" datetime=\"2012-10-10\">10 Nov 2012</time>) in\n <span class=\"location\">San Francisco</span>.\n Attendees:\n <ul>\n <li class=\"attendee vcard\"><span class=\"fn\">Brian Warner</span></li>\n <li class=\"attendee vcard\"><span class=\"fn\">Kyle Machulis</span></li>\n <li class=\"attendee vcard\"><span class=\"fn\">Tantek Çelik</span></li>\n <li class=\"attendee vcard\"><span class=\"fn\">Sid Sutter</span></li>\n </ul>\n</div>\n","name":"mf-v1-hcalendar-attendees"},{"json":"{\n \"items\": [{\n \"type\": [\"h-event\"],\n \"properties\": {\n \"name\": [\"IndieWebCamp 2012\"],\n \"url\": [\"http://indiewebcamp.com/2012\"],\n \"start\": [\"2012-06-30\"],\n \"end\": [\"2012-07-01\"],\n \"location\": [{\n \"value\": \"Geoloqi\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Geoloqi\"],\n \"org\": [\"Geoloqi\"],\n \"url\": [\"http://geoloqi.com/\"],\n \"adr\": [{\n \"value\": \"920 SW 3rd Ave. Suite 400, \\n Portland, \\n OR\",\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"street-address\": [\"920 SW 3rd Ave. Suite 400\"],\n \"locality\": [\"Portland\"],\n \"region\": [\"Oregon\"]\n }\n }]\n }\n }]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"vevent\">\n <a class=\"summary url\" href=\"http://indiewebcamp.com/2012\">\n IndieWebCamp 2012\n </a>\n from <time class=\"dtstart\">2012-06-30</time> \n to <time class=\"dtend\">2012-07-01</time> at \n <span class=\"location vcard\">\n <a class=\"fn org url\" href=\"http://geoloqi.com/\">Geoloqi</a>, \n <span class=\"adr\">\n <span class=\"street-address\">920 SW 3rd Ave. Suite 400</span>, \n <span class=\"locality\">Portland</span>, \n <abbr class=\"region\" title=\"Oregon\">OR</abbr>\n </span>\n </span>\n</div>","name":"mf-v1-hcalendar-combining"},{"json":"{\n \"items\": [{\n \"type\": [\"h-event\"],\n \"properties\": {\n \"name\": [\"The 4th Microformat party\"],\n \"start\": [\"2009-06-26 19:00\"],\n \"end\": [\"2009-06-26 22:00\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"vevent\">\n <span class=\"summary\">The 4th Microformat party</span> will be on \n <span class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00</time></span> to \n <span class=\"dtend\"><time class=\"value\">22:00</time></span>.\n</div>","name":"mf-v1-hcalendar-concatenate"},{"json":"{\n \"items\": [{\n \"type\": [\"h-event\"],\n \"properties\": {\n \"name\": [\"The 4th Microformat party\"],\n \"start\": [\n \"2009-06-26 19:00:00-08:00\", \n \"2009-06-26 19:00:00-08:00\", \n \"2009-06-26 19:00:00+08:00\", \n \"2009-06-26 19:00:00Z\", \n \"2009-06-26 19:00:00\", \n \"2009-06-26 19:00-08:00\", \n \"2009-06-26 19:00+08:00\", \n \"2009-06-26 19:00Z\", \n \"2009-06-26 19:00\"\n ],\n \"end\": [\"2013-034\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"vevent\">\n <span class=\"summary\">The 4th Microformat party</span> will be on \n <ul>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00:00-08:00</time> \n </li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00:00-0800</time> \n </li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00:00+0800</time> \n </li> \n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00:00Z</time> \n </li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00:00</time> \n </li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00-08:00</time> \n </li> \n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00+08:00</time> \n </li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00z</time> \n </li>\n <li class=\"dtstart\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00</time> \n </li> \n <li>\n <time class=\"dtend\" datetime=\"2013-034\">3 February 2013</time>\n </li> \n </ul>\n</div>","name":"mf-v1-hcalendar-time"},{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"John Doe\"],\n \"email\": [\"mailto:john@example.com\", \"mailto:john@example.com\", \"mailto:john@example.com?subject=parser-test\", \"john@example.com\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"vcard\">\n <span class=\"fn\">John Doe</span> \n <ul>\n <li><a class=\"email\" href=\"mailto:john@example.com\">notthis@example.com</a></li>\n <li>\n <span class=\"email\">\n <span class=\"type\">internet</span> \n <a class=\"value\" href=\"mailto:john@example.com\">notthis@example.com</a>\n </span>\n </li> \n <li><a class=\"email\" href=\"mailto:john@example.com?subject=parser-test\">notthis@example.com</a></li>\n <li class=\"email\">john@example.com</li>\n </ul>\n</div>","name":"mf-v1-hcard-email"},{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"John \\n Doe\"],\n \"given-name\": [\"John\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<p class=\"vcard\">\n <span class=\"profile-name fn n\">\n <span class=\" given-name \">John</span> \n <span class=\"FAMILY-NAME\">Doe</span> \n </span>\n</p>","name":"mf-v1-hcard-format"},{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {}\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<a class=\"vcard\" href=\"http://rohit.khare.org/\">\n <img alt=\"Rohit Khare\" src=\"images/photo.gif\" />\n</a>","name":"mf-v1-hcard-hyperlinkedphoto"},{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {}\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<a class=\"vcard\" href=\"http://benward.me/\">Ben Ward</a>","name":"mf-v1-hcard-justahyperlink"},{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {}\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<p class=\"vcard\">Frances Berriman</p>","name":"mf-v1-hcard-justaname"},{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"John Doe\"],\n \"given-name\": [\"John\"],\n \"family-name\": [\"Doe\"],\n \"sound\": [\"http://www.madgex.com/johndoe.mpeg\"],\n \"photo\": [\"http://example.com/images/photo.gif\"],\n \"nickname\": [\"Man with no name\", \"Lost boy\"],\n \"note\": [\"John Doe is one of those names you always have issues with.\", \"It can be a real problem booking a hotel room with the name John Doe.\"],\n \"logo\": [\"http://example.com/images/logo.gif\", \"http://example.com/images/logo.gif\"],\n \"url\": [\"http://www.madgex.com/\", \"http://www.webfeetmedia.com/\"],\n \"org\": [\"Madgex\", \"Web Feet Media Ltd\"],\n \"job-title\": [\"Creative Director\", \"Owner\"],\n \"category\": [\"design\", \"development\", \"web\"],\n \"tel\": [\"+1 415 555 100\", \"+1 415 555 200\", \"+1 415 555 300\"],\n \"email\": [\"mailto:john.doe@madgex.com\", \"mailto:john.doe@webfeetmedia.com\"],\n \"mailer\": [\"PigeonMail 2.1\", \"Outlook 2007\"],\n \"label\": [\"Work: \\n North Street, \\n Brighton, \\n United Kingdom\", \"Home: \\n West Street, \\n Brighton, \\n United Kingdom\"],\n \"adr\": [{\n \"value\": \"Work: \\n North Street, \\n Brighton, \\n United Kingdom\",\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"street-address\": [\"North Street\"],\n \"locality\": [\"Brighton\"],\n \"country-name\": [\"United Kingdom\"]\n }\n }, {\n \"value\": \"Home: \\n West Street, \\n Brighton, \\n United Kingdom\",\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"street-address\": [\"West Street\"],\n \"locality\": [\"Brighton\"],\n \"country-name\": [\"United Kingdom\"]\n }\n }],\n \"agent\": [\"Jane Doe\", {\n \"value\": \"Dave Doe\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Dave Doe\"]\n }\n }],\n \"key\": [\"hd02$Gfu*d%dh87KTa2=23934532479\"]\n }\n }],\n \"rels\": {\n \"tag\": [\"http://en.wikipedia.org/wiki/design\", \"http://en.wikipedia.org/wiki/development\", \"http://en.wikipedia.org/wiki/web\"]\n },\n \"rel-urls\": {\n \"http://en.wikipedia.org/wiki/design\": {\n \"text\": \"design\",\n \"rels\": [\"tag\"]\n },\n \"http://en.wikipedia.org/wiki/development\": {\n \"text\": \"development\",\n \"rels\": [\"tag\"]\n },\n \"http://en.wikipedia.org/wiki/web\": {\n \"text\": \"web\",\n \"rels\": [\"tag\"]\n }\n }\n}","html":"<base href=\"http://example.com\">\n <div class=\"vcard\">\n \n <div class=\"fn n\"><span class=\"given-name\">John</span> <span class=\"family-name\">Doe</span></div>\n <a class=\"sound\" href=\"http://www.madgex.com/johndoe.mpeg\">Pronunciation of my name</a>\n <div><img class=\"photo\" src=\"images/photo.gif\" alt=\"Photo of John Doe\" /></div>\n\n <p>Nicknames:</p>\n <ul>\n <li class=\"nickname\">Man with no name</li>\n <li class=\"nickname\">Lost boy</li>\n </ul>\n\n <p>About:</p>\n <p class=\"note\">John Doe is one of those names you always have issues with.</p>\n <p class=\"note\">It can be a real problem booking a hotel room with the name John Doe.</p>\n\n <p>Companies:</p>\n <div>\n <img class=\"logo\" src=\"images/logo.gif\" alt=\"Madgex company logo\" />\n <img class=\"logo\" src=\"images/logo.gif\" alt=\"Web Feet Media company logo\" />\n </div>\n <ul>\n <li><a class=\"url org\" href=\"http://www.madgex.com/\">Madgex</a> <span class=\"title\">Creative Director</span></li>\n <li><a class=\"url org\" href=\"http://www.webfeetmedia.com/\">Web Feet Media Ltd</a> <span class=\"title\">Owner</span></li>\n </ul>\n \n <p>Tags: \n <a rel=\"tag\" class=\"category\" href=\"http://en.wikipedia.org/wiki/design\">design</a>, \n <a rel=\"tag\" class=\"category\" href=\"http://en.wikipedia.org/wiki/development\">development</a> and\n <a rel=\"tag\" class=\"category\" href=\"http://en.wikipedia.org/wiki/web\">web</a>\n </p>\n \n <p>Phone numbers:</p>\n <ul>\n <li class=\"tel\">\n <span class=\"type\">Work</span> (<span class=\"type\">pref</span>erred):\n <span class=\"value\">+1 415 555 100</span>\n </li>\n <li class=\"tel\"><span class=\"type\">Home</span>: <span class=\"value\">+1 415 555 200</span></li>\n <li class=\"tel\"><span class=\"type\">Postal</span>: <span class=\"value\">+1 415 555 300</span></li>\n </ul>\n \n <p>Emails:</p>\n <ul>\n <li><a class=\"email\" href=\"mailto:john.doe@madgex.com\">John Doe at Madgex</a></li>\n <li><a class=\"email\" href=\"mailto:john.doe@webfeetmedia.com\">John Doe at Web Feet Media</a></li>\n </ul>\n <p>John Doe uses <span class=\"mailer\">PigeonMail 2.1</span> or <span class=\"mailer\">Outlook 2007</span> for email.</p>\n\n <p>Addresses:</p>\n <ul>\n <li class=\"label\">\n <span class=\"adr\">\n <span class=\"type\">Work</span>: \n <span class=\"street-address\">North Street</span>, \n <span class=\"locality\">Brighton</span>, \n <span class=\"country-name\">United Kingdom</span>\n </span>\n \n </li>\n <li class=\"label\">\n <span class=\"adr\">\n <span class=\"type\">Home</span>: \n <span class=\"street-address\">West Street</span>, \n <span class=\"locality\">Brighton</span>, \n <span class=\"country-name\">United Kingdom</span>\n </span>\n </li>\n </ul>\n \n <p>In emergency contact: <span class=\"agent\">Jane Doe</span> or <span class=\"agent vcard\"><span class=\"fn\">Dave Doe</span></span>.</p>\n <p>Key: <span class=\"key\">hd02$Gfu*d%dh87KTa2=23934532479</span></p>\n</div>","name":"mf-v1-hcard-multiple"},{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"honorific-prefix\": [\"Dr\"],\n \"given-name\": [\"John\"],\n \"additional-name\": [\"Peter\"],\n \"family-name\": [\"Doe\"],\n \"honorific-suffix\": [\"MSc\", \"PHD\"],\n \"photo\": [\"http://example.com/images/logo.gif\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<base href=\"http://example.com\">\n<div class=\"vcard\">\n <div class=\"name\">\n <span class=\"honorific-prefix\">Dr</span> \n <span class=\"given-name\">John</span> \n <abbr class=\"additional-name\" title=\"Peter\">P</abbr> \n <span class=\"family-name\">Doe</span> \n <data class=\"honorific-suffix\" value=\"MSc\"></data>\n <img class=\"photo honorific-suffix\" src=\"images/logo.gif\" alt=\"PHD\" />\n </div>\n</div>","name":"mf-v1-hcard-name"},{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"John Doe\"],\n \"given-name\": [\"John\"],\n \"sort-string\": [\"John\"],\n \"bday\": [\"2000-01-01 00:00:00-08:00\"],\n \"role\": [\"Designer\"],\n \"geo\": [{\n \"value\": \"30.267991;-97.739568\",\n \"type\": [\"h-geo\"],\n \"properties\": {\n \"name\": [\"30.267991;-97.739568\"]\n }\n }],\n \"tz\": [\"-05:00\"],\n \"uid\": [\"http://example.com/profiles/johndoe\"],\n \"class\": [\"Public\"],\n \"rev\": [\"2008-01-01 13:45:00\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"vcard\">\n \n <div class=\"fn n\"><span class=\"given-name sort-string\">John</span> Doe</div>\n <div>Birthday: <abbr class=\"bday\" title=\"2000-01-01T00:00:00-08:00\">January 1st, 2000</abbr></div>\n <div>Role: <span class=\"role\">Designer</span></div>\n <div>Location: <abbr class=\"geo\" title=\"30.267991;-97.739568\">Brighton</abbr></div>\n <div>Time zone: <abbr class=\"tz\" title=\"-05:00\">Eastern Standard Time</abbr></div>\n \n <div>Profile details:\n <div>Profile id: <span class=\"uid\">http://example.com/profiles/johndoe</span></div>\n <div>Details are: <span class=\"class\">Public</span></div>\n <div>Last updated: <abbr class=\"rev\" title=\"2008-01-01T13:45:00\">January 1st, 2008 - 13:45</abbr></div>\n </div>\n </div>","name":"mf-v1-hcard-single"},{"json":"{\n \"items\": [{\n \"type\": [\"h-entry\"],\n \"properties\": {\n \"name\": [\"microformats.org at 7\"],\n \"content\": [{\n \"value\": \"Last week the microformats.org community \\n celebrated its 7th birthday at a gathering hosted by Mozilla in \\n San Francisco and recognized accomplishments, challenges, and \\n opportunities.\\n\\n The microformats tagline “humans first, machines second” \\n forms the basis of many of our \\n principles, and \\n in that regard, we’d like to recognize a few people and \\n thank them for their years of volunteer service\",\n \"html\": \"\\n <p class=\\\"entry-summary\\\">Last week the microformats.org community \\n celebrated its 7th birthday at a gathering hosted by Mozilla in \\n San Francisco and recognized accomplishments, challenges, and \\n opportunities.</p>\\n\\n <p>The microformats tagline “humans first, machines second” \\n forms the basis of many of our \\n <a href=\\\"http://microformats.org/wiki/principles\\\">principles</a>, and \\n in that regard, we’d like to recognize a few people and \\n thank them for their years of volunteer service </p>\\n \"\n }],\n \"summary\": [\"Last week the microformats.org community \\n celebrated its 7th birthday at a gathering hosted by Mozilla in \\n San Francisco and recognized accomplishments, challenges, and \\n opportunities.\"],\n \"updated\": [\"2012-06-25 17:08:26\"],\n \"author\": [{\n \"value\": \"Tantek\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Tantek\"],\n \"url\": [\"http://tantek.com/\"]\n }\n }]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<meta charset=\"utf-8\">\n<div class=\"hentry\">\n <h1><a class=\"entry-title\" href=\"http://microformats.org/2012/06/25/microformats-org-at-7\">microformats.org at 7</a></h1>\n <div class=\"entry-content\">\n <p class=\"entry-summary\">Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.</p>\n\n <p>The microformats tagline “humans first, machines second” \n forms the basis of many of our \n <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service </p>\n </div> \n <p>Updated \n <time class=\"updated\" datetime=\"2012-06-25T17:08:26\">June 25th, 2012</time> by\n <span class=\"author vcard\"><a class=\"fn url\" href=\"http://tantek.com/\">Tantek</a></span>\n </p>\n</div>","name":"mf-v1-hentry-summarycontent"},{"json":"{\n \"items\": [{\n \"type\": [\"h-feed\"],\n \"properties\": {\n \"author\": [{\n \"value\": \"Tantek\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Tantek\"],\n \"url\": [\"http://tantek.com/\"]\n }\n }],\n \"url\": [\"http://microformats.org/blog\"],\n \"photo\": [\"http://example.com/photo.jpeg\"],\n \"category\": [\"microformats\", \"html\"]\n },\n \"children\": [{\n \"value\": \"microformats.org at 7\\n\\t \\n\\t Last week the microformats.org community \\n\\t celebrated its 7th birthday at a gathering hosted by Mozilla in \\n\\t San Francisco and recognized accomplishments, challenges, and \\n\\t opportunities.\\n\\t\\n\\t The microformats tagline “humans first, machines second” \\n\\t forms the basis of many of our \\n\\t principles, and \\n\\t in that regard, we’d like to recognize a few people and \\n\\t thank them for their years of volunteer service \\n\\t \\n\\t Updated \\n\\t June 25th, 2012\",\n \"type\": [\"h-entry\"],\n \"properties\": {\n \"name\": [\"microformats.org at 7\"],\n \"url\": [\"http://microformats.org/2012/06/25/microformats-org-at-7\"],\n \"content\": [{\n \"value\": \"Last week the microformats.org community \\n\\t celebrated its 7th birthday at a gathering hosted by Mozilla in \\n\\t San Francisco and recognized accomplishments, challenges, and \\n\\t opportunities.\\n\\t\\n\\t The microformats tagline “humans first, machines second” \\n\\t forms the basis of many of our \\n\\t principles, and \\n\\t in that regard, we’d like to recognize a few people and \\n\\t thank them for their years of volunteer service\",\n \"html\": \"\\n\\t <p class=\\\"entry-summary\\\">Last week the microformats.org community \\n\\t celebrated its 7th birthday at a gathering hosted by Mozilla in \\n\\t San Francisco and recognized accomplishments, challenges, and \\n\\t opportunities.</p>\\n\\t\\n\\t <p>The microformats tagline “humans first, machines second” \\n\\t forms the basis of many of our \\n\\t <a href=\\\"http://microformats.org/wiki/principles\\\">principles</a>, and \\n\\t in that regard, we’d like to recognize a few people and \\n\\t thank them for their years of volunteer service </p>\\n\\t \"\n }],\n \"summary\": [\"Last week the microformats.org community \\n\\t celebrated its 7th birthday at a gathering hosted by Mozilla in \\n\\t San Francisco and recognized accomplishments, challenges, and \\n\\t opportunities.\"],\n \"updated\": [\"2012-06-25 17:08:26\"]\n }\n }]\n }],\n \"rels\": {\n \"tag\": [\"http://example.com/tags/microformats\", \"http://example.com/tags/html\"],\n \"bookmark\": [\"http://microformats.org/2012/06/25/microformats-org-at-7\"]\n },\n \"rel-urls\": {\n \"http://example.com/tags/microformats\": {\n \"text\": \"microformats\",\n \"rels\": [\"tag\"]\n },\n \"http://example.com/tags/html\": {\n \"text\": \"html\",\n \"rels\": [\"tag\"]\n },\n \"http://microformats.org/2012/06/25/microformats-org-at-7\": {\n \"text\": \"microformats.org at 7\",\n \"rels\": [\"bookmark\"]\n }\n }\n}","html":"<section class=\"hfeed\">\n\t<h1 class=\"name\">Microformats blog</h1>\n\t<span class=\"author vcard\"><a class=\"fn url\" href=\"http://tantek.com/\">Tantek</a></span>\n\t<a class=\"url\" href=\"http://microformats.org/blog\">permlink</a>\n\t<img class=\"photo\" src=\"photo.jpeg\"/>\n\t<p>\n\t\tTags: <a rel=\"tag\" href=\"tags/microformats\">microformats</a>, \n\t\t<a rel=\"tag\" href=\"tags/html\">html</a>\n\t</p>\n\t\n\t<div class=\"hentry\">\n\t <h1><a class=\"entry-title\" rel=\"bookmark\" href=\"http://microformats.org/2012/06/25/microformats-org-at-7\">microformats.org at 7</a></h1>\n\t <div class=\"entry-content\">\n\t <p class=\"entry-summary\">Last week the microformats.org community \n\t celebrated its 7th birthday at a gathering hosted by Mozilla in \n\t San Francisco and recognized accomplishments, challenges, and \n\t opportunities.</p>\n\t\n\t <p>The microformats tagline “humans first, machines second” \n\t forms the basis of many of our \n\t <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n\t in that regard, we’d like to recognize a few people and \n\t thank them for their years of volunteer service </p>\n\t </div> \n\t <p>Updated \n\t <time class=\"updated\" datetime=\"2012-06-25T17:08:26\">June 25th, 2012</time>\n\t </p>\n\t</div>\n\t\n</section>","name":"mf-v1-hfeed-simple"},{"json":"\n{\n \"items\": [{\n \"type\": [\"h-news\"],\n \"properties\": {\n \"entry\": [{\n \"value\": \"microformats.org at 7\",\n \"type\": [\"h-entry\"],\n \"properties\": {\n \"name\": [\"microformats.org at 7\"],\n \"url\": [\"http://microformats.org/2012/06/25/microformats-org-at-7\"],\n \"content\": [{\n \"value\": \"Last week the microformats.org community \\n celebrated its 7th birthday at a gathering hosted by Mozilla in \\n San Francisco and recognized accomplishments, challenges, and \\n opportunities.\\n\\n The microformats tagline “humans first, machines second” \\n forms the basis of many of our \\n principles, and \\n in that regard, we’d like to recognize a few people and \\n thank them for their years of volunteer service\",\n \"html\": \"\\n <p class=\\\"entry-summary\\\">Last week the microformats.org community \\n celebrated its 7th birthday at a gathering hosted by Mozilla in \\n San Francisco and recognized accomplishments, challenges, and \\n opportunities.</p>\\n\\n <p>The microformats tagline “humans first, machines second” \\n forms the basis of many of our \\n <a href=\\\"http://microformats.org/wiki/principles\\\">principles</a>, and \\n in that regard, we’d like to recognize a few people and \\n thank them for their years of volunteer service </p>\\n \"\n }],\n \"summary\": [\"Last week the microformats.org community \\n celebrated its 7th birthday at a gathering hosted by Mozilla in \\n San Francisco and recognized accomplishments, challenges, and \\n opportunities.\"],\n \"updated\": [\"2012-06-25 17:08:26\"],\n \"author\": [{\n \"value\": \"Tantek\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Tantek\"],\n \"url\": [\"http://tantek.com/\"]\n }\n }]\n }\n }],\n \"dateline\": [{\n \"value\": \"San Francisco, \\n CA\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"adr\": [{\n \"value\": \"San Francisco, \\n CA\",\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"locality\": [\"San Francisco\"],\n \"region\": [\"CA\"]\n }\n }]\n }\n }],\n \"geo\": [{\n \"value\": \"37.774921;-122.445202\",\n \"type\": [\"h-geo\"],\n \"properties\": {\n \"name\": [\"37.774921;-122.445202\"]\n }\n }],\n \"source-org\": [{\n \"value\": \"microformats.org\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"microformats.org\"],\n \"org\": [\"microformats.org\"],\n \"url\": [\"http://microformats.org/\"]\n }\n }],\n \"principles\": [\"http://microformats.org/wiki/Category:public_domain_license\"]\n }\n }],\n \"rels\": {\n \"bookmark\": [\"http://microformats.org/2012/06/25/microformats-org-at-7\"],\n \"principles\": [\"http://microformats.org/wiki/Category:public_domain_license\"]\n },\n \"rel-urls\": {\n \"http://microformats.org/2012/06/25/microformats-org-at-7\": {\n \"text\": \"microformats.org at 7\",\n \"rels\": [\"bookmark\"]\n },\n \"http://microformats.org/wiki/Category:public_domain_license\": {\n \"text\": \"Publishing policy\",\n \"rels\": [\"principles\"]\n }\n }\n}","html":"<div class=\"hnews\">\n <div class=\"entry hentry\">\n <h1><a class=\"entry-title\" rel=\"bookmark\" href=\"http://microformats.org/2012/06/25/microformats-org-at-7\">microformats.org at 7</a></h1>\n <div class=\"entry-content\">\n <p class=\"entry-summary\">Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.</p>\n\n <p>The microformats tagline “humans first, machines second” \n forms the basis of many of our \n <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service </p>\n </div> \n <p>Updated \n <time class=\"updated\" datetime=\"2012-06-25T17:08:26\">June 25th, 2012</time> by\n <span class=\"author vcard\"><a class=\"fn url\" href=\"http://tantek.com/\">Tantek</a></span>\n </p>\n </div>\n\n <p>\n <span class=\"dateline vcard\">\n <span class=\"adr\">\n <span class=\"locality\">San Francisco</span>, \n <span class=\"region\">CA</span> \n </span>\n </span>\n (Geo: <span class=\"geo\">37.774921;-122.445202</span>) \n <span class=\"source-org vcard\">\n <a class=\"fn org url\" href=\"http://microformats.org/\">microformats.org</a>\n </span>\n </p>\n <p>\n <a rel=\"principles\" href=\"http://microformats.org/wiki/Category:public_domain_license\">Publishing policy</a>\n </p>\n</div>","name":"mf-v1-hnews-all"},{"json":"\n{\n \"items\": [{\n \"type\": [\"h-news\"],\n \"properties\": {\n \"entry\": [{\n \"value\": \"microformats.org at 7\",\n \"type\": [\"h-entry\"],\n \"properties\": {\n \"name\": [\"microformats.org at 7\"],\n \"url\": [\"http://microformats.org/2012/06/25/microformats-org-at-7\"],\n \"content\": [{\n \"value\": \"Last week the microformats.org community \\n celebrated its 7th birthday at a gathering hosted by Mozilla in \\n San Francisco and recognized accomplishments, challenges, and \\n opportunities.\\n\\n The microformats tagline “humans first, machines second” \\n forms the basis of many of our \\n principles, and \\n in that regard, we’d like to recognize a few people and \\n thank them for their years of volunteer service\",\n \"html\": \"\\n <p class=\\\"entry-summary\\\">Last week the microformats.org community \\n celebrated its 7th birthday at a gathering hosted by Mozilla in \\n San Francisco and recognized accomplishments, challenges, and \\n opportunities.</p>\\n\\n <p>The microformats tagline “humans first, machines second” \\n forms the basis of many of our \\n <a href=\\\"http://microformats.org/wiki/principles\\\">principles</a>, and \\n in that regard, we’d like to recognize a few people and \\n thank them for their years of volunteer service </p>\\n \"\n }],\n \"summary\": [\"Last week the microformats.org community \\n celebrated its 7th birthday at a gathering hosted by Mozilla in \\n San Francisco and recognized accomplishments, challenges, and \\n opportunities.\"],\n \"updated\": [\"2012-06-25 17:08:26\"],\n \"author\": [{\n \"value\": \"Tantek\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Tantek\"],\n \"url\": [\"http://tantek.com/\"]\n }\n }]\n }\n }],\n \"source-org\": [{\n \"value\": \"microformats.org\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"microformats.org\"],\n \"org\": [\"microformats.org\"],\n \"url\": [\"http://microformats.org/\"]\n }\n }]\n }\n }],\n \"rels\": {\n \"bookmark\": [\"http://microformats.org/2012/06/25/microformats-org-at-7\"]\n },\n \"rel-urls\": {\n \"http://microformats.org/2012/06/25/microformats-org-at-7\": {\n \"text\": \"microformats.org at 7\",\n \"rels\": [\"bookmark\"]\n }\n }\n}","html":"<div class=\"hnews\">\n <div class=\"entry hentry\">\n <h1><a class=\"entry-title\" rel=\"bookmark\" href=\"http://microformats.org/2012/06/25/microformats-org-at-7\">microformats.org at 7</a></h1>\n <div class=\"entry-content\">\n <p class=\"entry-summary\">Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.</p>\n\n <p>The microformats tagline “humans first, machines second” \n forms the basis of many of our \n <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service </p>\n </div> \n <p>Updated \n <time class=\"updated\" datetime=\"2012-06-25T17:08:26\">June 25th, 2012</time> by\n <span class=\"author vcard\"><a class=\"fn url\" href=\"http://tantek.com/\">Tantek</a></span>\n </p>\n </div>\n\n <p class=\"source-org vcard\">\n <a class=\"fn org url\" href=\"http://microformats.org/\">microformats.org</a> \n </p>\n</div>","name":"mf-v1-hnews-minimum"},{"json":"{\n \"items\": [{\n \"type\": [\"h-product\"],\n \"properties\": {\n \"name\": [\"Raspberry Pi\"],\n \"photo\": [\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/RaspberryPi.jpg/320px-RaspberryPi.jpg\"],\n \"description\": [{\n \"value\": \"The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.\",\n \"html\": \"The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.\"\n }],\n \"url\": [\"http://www.raspberrypi.org/\"],\n \"price\": [\"£29.95\"],\n \"review\": [{\n \"value\": \"9.2 out of \\n 10 \\n based on 178 reviews\",\n \"type\": [\"h-review-aggregate\"],\n \"properties\": {\n \"rating\": [\"9.2\"],\n \"average\": [\"9.2\"],\n \"best\": [\"10\"],\n \"count\": [\"178\"]\n }\n }],\n \"category\": [\"Computer\", \"Education\"],\n \"brand\": [{\n \"value\": \"The Raspberry Pi Foundation\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"The Raspberry Pi Foundation\"],\n \"org\": [\"The Raspberry Pi Foundation\"],\n \"adr\": [{\n \"value\": \"Cambridge \\n UK\",\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"locality\": [\"Cambridge\"],\n \"country-name\": [\"UK\"]\n }\n }]\n }\n }]\n }\n }],\n \"rels\": {\n \"tag\": [\"http://en.wikipedia.org/wiki/computer\", \"http://en.wikipedia.org/wiki/education\"]\n },\n \"rel-urls\": {\n \"http://en.wikipedia.org/wiki/computer\": {\n \"text\": \"Computer\",\n \"rels\": [\"tag\"]\n },\n \"http://en.wikipedia.org/wiki/education\": {\n \"text\": \"Education\",\n \"rels\": [\"tag\"]\n }\n }\n}","html":"<meta charset=\"utf-8\">\n<div class=\"hproduct\">\n <h2 class=\"fn\">Raspberry Pi</h2>\n <img class=\"photo\" src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/RaspberryPi.jpg/320px-RaspberryPi.jpg\" />\n <p class=\"description\">The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.</p>\n <a class=\"url\" href=\"http://www.raspberrypi.org/\">More info about the Raspberry Pi</a>\n <p class=\"price\">£29.95</p>\n <p class=\"review hreview-aggregate\">\n <span class=\"rating\">\n <span class=\"average value\">9.2</span> out of \n <span class=\"best\">10</span> \n based on <span class=\"count\">178</span> reviews\n </span>\n </p>\n <p>Categories: \n <a rel=\"tag\" href=\"http://en.wikipedia.org/wiki/computer\" class=\"category\">Computer</a>, \n <a rel=\"tag\" href=\"http://en.wikipedia.org/wiki/education\" class=\"category\">Education</a>\n </p>\n <p class=\"brand vcard\">From: \n <span class=\"fn org\">The Raspberry Pi Foundation</span> - \n <span class=\"adr\">\n <span class=\"locality\">Cambridge</span> \n <span class=\"country-name\">UK</span>\n </span>\n </p>\n</div>","name":"mf-v1-hproduct-aggregate"},{"json":"{\n \"items\": [{\n \"type\": [\"h-product\"],\n \"properties\": {\n \"name\": [\"Raspberry Pi\"],\n \"photo\": [\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/RaspberryPi.jpg/320px-RaspberryPi.jpg\"],\n \"description\": [{\n \"value\": \"The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.\",\n \"html\": \"The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.\"\n }],\n \"url\": [\"http://www.raspberrypi.org/\"],\n \"price\": [\"£29.95\"],\n \"category\": [\"Computer\", \"Education\"],\n \"review\": [{\n \"value\": \"4.5 out of 5\",\n \"type\": [\"h-review\"],\n \"properties\": {\n \"rating\": [\"4.5\"]\n }\n }]\n }\n }],\n \"rels\": {\n \"tag\": [\"http://en.wikipedia.org/wiki/computer\", \"http://en.wikipedia.org/wiki/education\"]\n },\n \"rel-urls\": {\n \"http://en.wikipedia.org/wiki/computer\": {\n \"text\": \"Computer\",\n \"rels\": [\"tag\"]\n },\n \"http://en.wikipedia.org/wiki/education\": {\n \"text\": \"Education\",\n \"rels\": [\"tag\"]\n }\n }\n}","html":"<meta charset=\"utf-8\">\n<div class=\"hproduct\">\n <h2 class=\"fn\">Raspberry Pi</h2>\n <img class=\"photo\" src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/RaspberryPi.jpg/320px-RaspberryPi.jpg\" />\n <p class=\"description\">The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.</p>\n <a class=\"url\" href=\"http://www.raspberrypi.org/\">More info about the Raspberry Pi</a>\n <p class=\"price\">£29.95</p>\n <p class=\"review hreview\"><span class=\"rating\">4.5</span> out of 5</p>\n <p>Categories: \n <a rel=\"tag\" href=\"http://en.wikipedia.org/wiki/computer\" class=\"category\">Computer</a>, \n <a rel=\"tag\" href=\"http://en.wikipedia.org/wiki/education\" class=\"category\">Education</a>\n </p>\n</div>","name":"mf-v1-hproduct-simpleproperties"},{"json":"{\n \"items\": [{\n \"type\": [\"h-resume\"],\n \"properties\": {\n \"contact\": [{\n \"value\": \"Tim Berners-Lee\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Tim Berners-Lee\"]\n }\n }],\n \"summary\": [\"invented the World Wide Web\"],\n \"affiliation\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"W3C\"],\n \"photo\": [\"http://www.w3.org/Icons/WWW/w3c_home_nb.png\"]\n }\n }]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"hresume\">\n <p>\n <span class=\"contact vcard\"><span class=\"fn\">Tim Berners-Lee</span></span>, \n <span class=\"summary\">invented the World Wide Web</span>.\n </p>\n Belongs to following groups:\n <p> \n <a class=\"affiliation vcard\" href=\"http://www.w3.org/\">\n <img class=\"fn photo\" alt=\"W3C\" src=\"http://www.w3.org/Icons/WWW/w3c_home_nb.png\" />\n </a>\n </p> \n</div>","name":"mf-v1-hresume-affiliation"},{"json":"{\n \"items\": [{\n \"type\": [\"h-resume\"],\n \"properties\": {\n \"contact\": [{\n \"value\": \"Tim Berners-Lee\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Tim Berners-Lee\"],\n \"org\": [\"MIT\"],\n \"adr\": [{\n \"value\": \"32 Vassar Street, \\n Room 32-G524, \\n Cambridge, \\n MA \\n 02139, \\n USA. \\n (Work)\",\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"street-address\": [\"32 Vassar Street\"],\n \"extended-address\": [\"Room 32-G524\"],\n \"locality\": [\"Cambridge\"],\n \"region\": [\"MA\"],\n \"postal-code\": [\"02139\"],\n \"country-name\": [\"USA\"]\n }\n }],\n \"tel\": [\"+1 (617) 253 5702\"],\n \"email\": [\"mailto:timbl@w3.org\"]\n }\n }],\n \"summary\": [\"Invented the World Wide Web.\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"hresume\">\n <div class=\"contact vcard\">\n <p class=\"fn\">Tim Berners-Lee</p>\n <p class=\"org\">MIT</p>\n <p class=\"adr\">\n <span class=\"street-address\">32 Vassar Street</span>, \n <span class=\"extended-address\">Room 32-G524</span>, \n <span class=\"locality\">Cambridge</span>, \n <span class=\"region\">MA</span> \n <span class=\"postal-code\">02139</span>, \n <span class=\"country-name\">USA</span>. \n (<span class=\"type\">Work</span>)\n </p>\n <p>Tel:<span class=\"tel\">+1 (617) 253 5702</span></p>\n <p>Email:<a class=\"email\" href=\"mailto:timbl@w3.org\">timbl@w3.org</a></p>\n </div>\n <p class=\"summary\">Invented the World Wide Web.</p>\n</div>","name":"mf-v1-hresume-contact"},{"json":"{\n \"items\": [{\n \"type\": [\"h-resume\"],\n \"properties\": {\n \"contact\": [{\n \"value\": \"Tim Berners-Lee\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Tim Berners-Lee\"],\n \"job-title\": [\"Director of the World Wide Web Foundation\"]\n }\n }],\n \"summary\": [\"Invented the World Wide Web.\"],\n \"education\": [{\n \"value\": \"The Queen's College, Oxford University\",\n \"type\": [\"h-event\", \"h-card\"],\n \"properties\": {\n \"name\": [\"The Queen's College, Oxford University\"],\n \"org\": [\"The Queen's College, Oxford University\"],\n \"description\": [\"BA Hons (I) Physics\"],\n \"start\": [\"1973-09\"],\n \"end\": [\"1976-06\"]\n }\n }]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"hresume\">\n <div class=\"contact vcard\">\n <p class=\"fn\">Tim Berners-Lee</p>\n <p class=\"title\">Director of the World Wide Web Foundation</p>\n </div>\n <p class=\"summary\">Invented the World Wide Web.</p><hr />\n <p class=\"education vevent vcard\">\n <span class=\"fn summary org\">The Queen's College, Oxford University</span>, \n <span class=\"description\">BA Hons (I) Physics</span> \n <time class=\"dtstart\" datetime=\"1973-09\">1973</time> –\n <time class=\"dtend\" datetime=\"1976-06\">1976</time>\n </p>\n</div>","name":"mf-v1-hresume-education"},{"json":"{\n \"items\": [{\n \"type\": [\"h-resume\"],\n \"properties\": {\n \"contact\": [{\n \"value\": \"Tim Berners-Lee\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Tim Berners-Lee\"]\n }\n }],\n \"summary\": [\"invented the World Wide Web\"],\n \"skill\": [\"information systems\", \"advocacy\", \"leadership\"]\n }\n }],\n \"rels\": {\n \"tag\": [\"http://example.com/skills/informationsystems\", \"http://example.com/skills/advocacy\", \"http://example.com/skills/leadership\"]\n },\n \"rel-urls\": {\n \"http://example.com/skills/informationsystems\": {\n \"text\": \"information systems\",\n \"rels\": [\"tag\"]\n },\n \"http://example.com/skills/advocacy\": {\n \"text\": \"advocacy\",\n \"rels\": [\"tag\"]\n },\n \"http://example.com/skills/leadership\": {\n \"text\": \"leadership\",\n \"rels\": [\"tag\"]\n }\n }\n}","html":"<div class=\"hresume\"> \n <p>\n <span class=\"contact vcard\"><span class=\"fn\">Tim Berners-Lee</span></span>, \n <span class=\"summary\">invented the World Wide Web</span>.\n </p>\n Skills: \n <ul>\n <li><a class=\"skill\" rel=\"tag\" href=\"http://example.com/skills/informationsystems\">information systems</a></li>\n <li><a class=\"skill\" rel=\"tag\" href=\"http://example.com/skills/advocacy\">advocacy</a></li>\n <li><a class=\"skill\" rel=\"tag\" href=\"http://example.com/skills/leadership\">leadership</a></li>\n </ul>\n</div>","name":"mf-v1-hresume-skill"},{"json":"{\n \"items\": [{\n \"type\": [\"h-resume\"],\n \"properties\": {\n \"contact\": [{\n \"value\": \"Tim Berners-Lee\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Tim Berners-Lee\"],\n \"job-title\": [\"Director of the World Wide Web Foundation\"]\n }\n }],\n \"summary\": [\"Invented the World Wide Web.\"],\n \"experience\": [{\n \"value\": \"World Wide Web Foundation\",\n \"type\": [\"h-event\", \"h-card\"],\n \"properties\": {\n \"job-title\": [\"Director\"],\n \"name\": [\"World Wide Web Foundation\"],\n \"org\": [\"World Wide Web Foundation\"],\n \"url\": [\"http://www.webfoundation.org/\"],\n \"start\": [\"2009-01-18\"],\n \"duration\": [\"P2Y11M\"]\n }\n }]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<meta charset=\"utf-8\">\n<div class=\"hresume\">\n <div class=\"contact vcard\">\n <p class=\"fn\">Tim Berners-Lee</p>\n <p class=\"title\">Director of the World Wide Web Foundation</p>\n </div>\n <p class=\"summary\">Invented the World Wide Web.</p><hr />\n <div class=\"experience vevent vcard\">\n <p class=\"title\">Director</p>\n <p><a class=\"fn summary org url\" href=\"http://www.webfoundation.org/\">World Wide Web Foundation</a></p>\n <p>\n <time class=\"dtstart\" datetime=\"2009-01-18\">Jan 2009</time> – Present\n <time class=\"duration\" datetime=\"P2Y11M\">(2 years 11 month)</time>\n </p>\n </div>\n</div>","name":"mf-v1-hresume-work"},{"json":"{\n \"items\": [{\n \"type\": [\"h-review\"],\n \"properties\": {\n \"item\": [{\n \"value\": \"Crepes on Cole\",\n \"type\": [\"h-item\"],\n \"properties\": {\n \"photo\": [\"http://example.com/images/photo.gif\"],\n \"name\": [\"Crepes on Cole\"],\n \"url\": [\"http://example.com/crepeoncole\"]\n }\n }],\n \"rating\": [\"5\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<base href=\"http://example.com\">\n<div class=\"hreview\">\n <p class=\"item\">\n <img class=\"photo\" src=\"images/photo.gif\" />\n <a class=\"fn url\" href=\"http://example.com/crepeoncole\">Crepes on Cole</a>\n </p>\n <p><span class=\"rating\">5</span> out of 5 stars</p>\n</div>","name":"mf-v1-hreview-item"},{"json":"\n{\n \"items\": [{\n \"type\": [\"h-review\"],\n \"properties\": {\n \"rating\": [\"5\"],\n \"name\": [\"Crepes on Cole is awesome\"],\n \"reviewer\": [{\n \"value\": \"Tantek\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Tantek\"]\n }\n }],\n \"description\": [{\n \"value\": \"Crepes on Cole is one of the best little \\n creperies in San Francisco.\\n Excellent food and service. Plenty of tables in a variety of sizes \\n for parties large and small. Window seating makes for excellent \\n people watching to/from the N-Judah which stops right outside. \\n I've had many fun social gatherings here, as well as gotten \\n plenty of work done thanks to neighborhood WiFi.\",\n \"html\": \"\\n <p class=\\\"item vcard\\\">\\n <span class=\\\"fn org\\\">Crepes on Cole</span> is one of the best little \\n creperies in <span class=\\\"adr\\\"><span class=\\\"locality\\\">San Francisco</span></span>.\\n Excellent food and service. Plenty of tables in a variety of sizes \\n for parties large and small. Window seating makes for excellent \\n people watching to/from the N-Judah which stops right outside. \\n I've had many fun social gatherings here, as well as gotten \\n plenty of work done thanks to neighborhood WiFi.\\n </p>\\n \"\n }],\n \"item\": [{\n \"value\": \"Crepes on Cole\",\n \"type\": [\"h-item\", \"h-card\"],\n \"properties\": {\n \"name\": [\"Crepes on Cole\"],\n \"org\": [\"Crepes on Cole\"],\n \"adr\": [{\n \"value\": \"San Francisco\",\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"locality\": [\"San Francisco\"]\n }\n }]\n }\n }],\n \"category\": [\"crepe\"],\n \"url\": [\"http://example.com/crepe\"]\n }\n }],\n \"rels\": {\n \"tag\": [\"http://en.wikipedia.org/wiki/crepe\"],\n \"self\": [\"http://example.com/crepe\"],\n \"bookmark\": [\"http://example.com/crepe\"],\n \"license\": [\"http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License\"]\n },\n \"rel-urls\": {\n \"http://en.wikipedia.org/wiki/crepe\": {\n \"text\": \"crepe\",\n \"rels\": [\"tag\"]\n },\n \"http://example.com/crepe\": {\n \"text\": \"http://example.com/crepe\",\n \"rels\": [\"self\", \"bookmark\"]\n },\n \"http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License\": {\n \"text\": \"Creative Commons Attribution-ShareAlike License\",\n \"rels\": [\"license\"]\n }\n }\n}","html":"<div class=\"hreview\">\n <span><span class=\"rating\">5</span> out of 5 stars</span>\n <h4 class=\"summary\">Crepes on Cole is awesome</h4>\n <span class=\"reviewer vcard\">\n Reviewer: <span class=\"fn\">Tantek</span> - \n </span>\n <time class=\"reviewed\" datetime=\"2005-04-18\">April 18, 2005</time>\n <div class=\"description\">\n <p class=\"item vcard\">\n <span class=\"fn org\">Crepes on Cole</span> is one of the best little \n creperies in <span class=\"adr\"><span class=\"locality\">San Francisco</span></span>.\n Excellent food and service. Plenty of tables in a variety of sizes \n for parties large and small. Window seating makes for excellent \n people watching to/from the N-Judah which stops right outside. \n I've had many fun social gatherings here, as well as gotten \n plenty of work done thanks to neighborhood WiFi.\n </p>\n </div>\n <p>Visit date: <span>April 2005</span></p>\n <p>Food eaten: <a rel=\"tag\" href=\"http://en.wikipedia.org/wiki/crepe\">crepe</a></p>\n <p>Permanent link for review: <a rel=\"self bookmark\" href=\"http://example.com/crepe\">http://example.com/crepe</a></p>\n <p><a rel=\"license\" href=\"http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License\">Creative Commons Attribution-ShareAlike License</a></p>\n</div>","name":"mf-v1-hreview-vcard"},{"json":"{\n \"items\": [{\n \"type\": [\"h-review-aggregate\"],\n \"properties\": {\n \"item\": [{\n \"value\": \"Mediterranean Wraps\",\n \"type\": [\"h-item\", \"h-card\"],\n \"properties\": {\n \"name\": [\"Mediterranean Wraps\"],\n \"org\": [\"Mediterranean Wraps\"],\n \"adr\": [{\n \"value\": \"433 S California Ave, \\n Palo Alto, \\n CA\",\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"street-address\": [\"433 S California Ave\"],\n \"locality\": [\"Palo Alto\"],\n \"region\": [\"CA\"]\n }\n }],\n \"tel\": [\"(650) 321-8189\"]\n }\n }],\n \"rating\": [\"9.2\"],\n \"average\": [\"9.2\"],\n \"best\": [\"10\"],\n \"count\": [\"17\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"hreview-aggregate\">\n <div class=\"item vcard\">\n <h3 class=\"fn org\">Mediterranean Wraps</h3> \n <p>\n <span class=\"adr\">\n <span class=\"street-address\">433 S California Ave</span>, \n <span class=\"locality\">Palo Alto</span>, \n <span class=\"region\">CA</span></span> - \n \n <span class=\"tel\">(650) 321-8189</span>\n </p>\n </div> \n <p class=\"rating\">\n <span class=\"average value\">9.2</span> out of \n <span class=\"best\">10</span> \n based on <span class=\"count\">17</span> reviews\n </p>\n</div>","name":"mf-v1-hreview-aggregate-hcard"},{"json":"{\n \"items\": [{\n \"type\": [\"h-review-aggregate\"],\n \"properties\": {\n \"item\": [{\n \"value\": \"Mediterranean Wraps\",\n \"type\": [\"h-item\"],\n \"properties\": {\n \"name\": [\"Mediterranean Wraps\"],\n \"url\": [\"http://example.com/mediterraneanwraps\"]\n }\n }],\n \"rating\": [\"4.5\"],\n \"count\": [\"6\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}\n","html":"<p class=\"hreview-aggregate\">\n <span class=\"item\">\n <a class=\"fn url\" href=\"http://example.com/mediterraneanwraps\">Mediterranean Wraps</a>\n </span> - Rated: \n <span class=\"rating\">4.5</span> out of 5 (<span class=\"count\">6</span> reviews)\n</p>","name":"mf-v1-hreview-aggregate-justahyperlink"},{"json":"{\n \"items\": [{\n \"type\": [\"h-review-aggregate\"],\n \"properties\": {\n \"item\": [{\n \"value\": \"Fullfrontal\",\n \"type\": [\"h-item\", \"h-event\"],\n \"properties\": {\n \"name\": [\"Fullfrontal\"],\n \"description\": [\"A one day JavaScript Conference held in Brighton\"],\n \"start\": [\"2012-11-09\"]\n }\n }],\n \"rating\": [\"9.9\"],\n \"average\": [\"9.9\"],\n \"best\": [\"10\"],\n \"count\": [\"62\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"hreview-aggregate\">\n <div class=\"item vevent\">\n <h3 class=\"summary\">Fullfrontal</h3>\n <p class=\"description\">A one day JavaScript Conference held in Brighton</p>\n <p><time class=\"dtstart\" datetime=\"2012-11-09\">9th November 2012</time></p> \n </div> \n \n <p class=\"rating\">\n <span class=\"average value\">9.9</span> out of \n <span class=\"best\">10</span> \n based on <span class=\"count\">62</span> reviews\n </p>\n</div>","name":"mf-v1-hreview-aggregate-vevent"},{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"org\": [\"Mozilla\"],\n \"adr\": [{\n \"value\": \"665 3rd St. \\n Suite 207 \\n San Francisco, \\n CA \\n 94107 \\n U.S.A.\",\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"street-address\": [\"665 3rd St.\"],\n \"extended-address\": [\"Suite 207\"],\n \"locality\": [\"San Francisco\"],\n \"region\": [\"CA\"],\n \"postal-code\": [\"94107\"],\n \"country-name\": [\"U.S.A.\"]\n }\n }]\n }\n }, {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"org\": [\"Mozilla\"],\n \"adr\": [{\n \"value\": \"665 3rd St. \\n Suite 207 \\n San Francisco, \\n CA \\n 94107 \\n U.S.A.\",\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"street-address\": [\"665 3rd St.\"],\n \"extended-address\": [\"Suite 207\"],\n \"locality\": [\"San Francisco\"],\n \"region\": [\"CA\"],\n \"postal-code\": [\"94107\"],\n \"country-name\": [\"U.S.A.\"]\n }\n }]\n }\n }, {\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"street-address\": [\"665 3rd St.\"],\n \"extended-address\": [\"Suite 207\"],\n \"locality\": [\"San Francisco\"],\n \"region\": [\"CA\"],\n \"postal-code\": [\"94107\"],\n \"country-name\": [\"U.S.A.\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"vcard\" itemref=\"mozilla-org mozilla-adr\">\n <span class=\"name\">Brendan Eich</span>\n</div>\n<div class=\"vcard\" itemref=\"mozilla-org mozilla-adr\">\n <span class=\"name\">Mitchell Baker</span>\n</div>\n\n<p id=\"mozilla-org\" class=\"org\">Mozilla</p>\n<p id=\"mozilla-adr\" class=\"adr\">\n <span class=\"street-address\">665 3rd St.</span> \n <span class=\"extended-address\">Suite 207</span> \n <span class=\"locality\">San Francisco</span>, \n <span class=\"region\">CA</span> \n <span class=\"postal-code\">94107</span> \n <span class=\"country-name\">U.S.A.</span> \n</p>","name":"mf-v1-includes-hcarditemref"},{"json":"{\n \"items\": [{\n \"type\": [\"h-event\"],\n \"properties\": {\n \"location\": [{\n \"value\": \"Room 10\\n \\n Moscone Center, \\n San Francisco\",\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"extended-address\": [\"Room 10\", \"Moscone Center\"],\n \"locality\": [\"San Francisco\"]\n }\n }],\n \"start\": [\"2012-06-27 15:45:00-08:00\"],\n \"end\": [\"2012-06-27 16:45:00-08:00\"]\n }\n }, {\n \"type\": [\"h-event\"],\n \"properties\": {\n \"location\": [{\n \"value\": \"Room 11\\n \\n Moscone Center, \\n San Francisco\",\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"extended-address\": [\"Room 11\", \"Moscone Center\"],\n \"locality\": [\"San Francisco\"]\n }\n }],\n \"start\": [\"2012-06-27 15:45:00-08:00\"],\n \"end\": [\"2012-06-27 16:45:00-08:00\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"vevent\" itemref=\"io-session07\">\n <span class=\"name\">Monetizing Android Apps</span> - spaekers: \n <span class=\"speaker\">Chrix Finne</span>, \n <span class=\"speaker\">Kenneth Lui</span> - \n <span itemref=\"io-location\" class=\"location adr\">\n <span class=\"extended-address\">Room 10</span>\n </span> \n</div>\n<div class=\"vevent\" itemref=\"io-session07\">\n <span class=\"name\">New Low-Level Media APIs in Android</span> - spaekers: \n <span class=\"speaker\">Dave Burke</span> -\n <span itemref=\"io-location\" class=\"location adr\">\n <span class=\"extended-address\">Room 11</span>\n </span> \n</div>\n\n<p id=\"io-session07\">\n Session 01 is between: \n <time class=\"dtstart\" datetime=\"2012-06-27T15:45:00-0800\">3:45PM</time> to \n <time class=\"dtend\" datetime=\"2012-06-27T16:45:00-0800\">4:45PM</time> \n</p> \n<p id=\"io-location\">\n <span class=\"extended-address\">Moscone Center</span>, \n <span class=\"locality\">San Francisco</span> \n</p>","name":"mf-v1-includes-heventitemref"},{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"org\": [\"Twitter\"],\n \"adr\": [{\n \"value\": \"1355 Market St,\\n San Francisco, \\n CA\\n 94103\",\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"street-address\": [\"1355 Market St\"],\n \"locality\": [\"San Francisco\"],\n \"region\": [\"CA\"],\n \"postal-code\": [\"94103\"]\n }\n }]\n }\n }, {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"org\": [\"Twitter\"],\n \"adr\": [{\n \"value\": \"1355 Market St,\\n San Francisco, \\n CA\\n 94103\",\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"street-address\": [\"1355 Market St\"],\n \"locality\": [\"San Francisco\"],\n \"region\": [\"CA\"],\n \"postal-code\": [\"94103\"]\n }\n }]\n }\n }, {\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"street-address\": [\"1355 Market St\"],\n \"locality\": [\"San Francisco\"],\n \"region\": [\"CA\"],\n \"postal-code\": [\"94103\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"vcard\">\n <span class=\"name\">Ben Ward</span>\n <a class=\"include\" href=\"#twitter\">Twitter</a>\n</div>\n<div class=\"vcard\">\n <span class=\"name\">Dan Webb</span>\n <a class=\"include\" href=\"#twitter\">Twitter</a>\n</div>\n\n<div id=\"twitter\">\n <p class=\"org\">Twitter</p>\n <p class=\"adr\">\n <span class=\"street-address\">1355 Market St</span>,\n <span class=\"locality\">San Francisco</span>, \n <span class=\"region\">CA</span>\n <span class=\"postal-code\">94103</span>\n </p>\n</div>","name":"mf-v1-includes-hyperlink"},{"json":"{\n \"items\": [{\n \"type\": [\"h-event\"],\n \"properties\": {\n \"start\": [\"2012-10-30 11:45:00-08:00\"],\n \"name\": [\"Build Conference\"],\n \"location\": [{\n \"value\": \"Redmond, \\n Washington, \\n USA\",\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"locality\": [\"Redmond\"],\n \"region\": [\"Washington\"],\n \"country-name\": [\"USA\"]\n }\n }]\n }\n }, {\n \"type\": [\"h-event\"],\n \"properties\": {\n \"start\": [\"2012-10-31 11:15:00-08:00\"],\n \"name\": [\"Build Conference\"],\n \"location\": [{\n \"value\": \"Redmond, \\n Washington, \\n USA\",\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"locality\": [\"Redmond\"],\n \"region\": [\"Washington\"],\n \"country-name\": [\"USA\"]\n }\n }]\n }\n }, {\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"locality\": [\"Redmond\"],\n \"region\": [\"Washington\"],\n \"country-name\": [\"USA\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"vevent\">\n <span class=\"name\">HTML5 & CSS3 latest features in action!</span> - \n <span class=\"speaker\">David Rousset</span> -\n <time class=\"dtstart\" datetime=\"2012-10-30T11:45:00-08:00\">Tue 11:45am</time>\n <object data=\"#buildconf\" class=\"include\" type=\"text/html\" height=\"0\" width=\"0\"></object>\n</div>\n<div class=\"vevent\">\n <span class=\"name\">Building High-Performing JavaScript for Modern Engines</span> -\n <span class=\"speaker\">John-David Dalton</span> and \n <span class=\"speaker\">Amanda Silver</span> -\n <time class=\"dtstart\" datetime=\"2012-10-31T11:15:00-08:00\">Wed 11:15am</time>\n <object data=\"#buildconf\" class=\"include\" type=\"text/html\" height=\"0\" width=\"0\"></object>\n</div>\n\n\n<div id=\"buildconf\">\n <p class=\"summary\">Build Conference</p>\n <p class=\"location adr\">\n <span class=\"locality\">Redmond</span>, \n <span class=\"region\">Washington</span>, \n <span class=\"country-name\">USA</span>\n </p>\n</div>","name":"mf-v1-includes-object"},{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Chris Mills\"],\n \"url\": [\"http://dev.opera.com/\"],\n \"org\": [\"Opera\"]\n }\n }, {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Erik Möller\"],\n \"url\": [\"http://dev.opera.com/\"],\n \"org\": [\"Opera\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<meta charset=\"utf-8\">\n<table>\n <tr>\n <th id=\"org\"><a class=\"url org\" href=\"http://dev.opera.com/\">Opera</a></th>\n </tr>\n <tr>\n <td class=\"vcard\" headers=\"org\"><span class=\"fn\">Chris Mills</span></td>\n </tr>\n <tr>\n <td class=\"vcard\" headers=\"org\"><span class=\"fn\">Erik Möller</span></td>\n </tr>\n </table>","name":"mf-v1-includes-table"},{"json":"{\n \"items\": [{\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"name\": [\"Bricklayer's Arms\"],\n \"label\": [\"3 Charlotte Road, \\n City of London, \\n EC2A 3PE, \\n UK\"],\n \"street-address\": [\"3 Charlotte Road\"],\n \"locality\": [\"City of London\"],\n \"postal-code\": [\"EC2A 3PE\"],\n \"country-name\": [\"UK\"],\n \"geo\": [\"51.526421;-0.081067\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<p class=\"h-adr\">\n <span class=\"p-name\">Bricklayer's Arms</span>\n <span class=\"p-label\"> \n <span class=\"p-street-address\">3 Charlotte Road</span>, \n <span class=\"p-locality\">City of London</span>, \n <span class=\"p-postal-code\">EC2A 3PE</span>, \n <span class=\"p-country-name\">UK</span> \n </span> – \n Geo:(<span class=\"p-geo\">51.526421;-0.081067</span>) \n</p>","name":"mf-v2-h-adr-geo"},{"json":"{\n \"items\": [{\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"name\": [\"Bricklayer's Arms\"],\n \"geo\": [\"geo:51.526421;-0.081067;crs=wgs84;u=40\"],\n \"locality\": [\"London\"],\n \"url\": [\"geo:51.526421;-0.081067;crs=wgs84;u=40\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<p class=\"h-adr\">\n <a class=\"p-name u-geo\" href=\"geo:51.526421;-0.081067;crs=wgs84;u=40\">Bricklayer's Arms</a>, \n <span class=\"p-locality\">London</span> \n</p>","name":"mf-v2-h-adr-geourl"},{"json":"{\n \"items\": [{\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"name\": [\"665 3rd St. Suite 207 San Francisco, CA 94107 U.S.A.\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<p class=\"h-adr\">665 3rd St. Suite 207 San Francisco, CA 94107 U.S.A.</p>","name":"mf-v2-h-adr-justaname"},{"json":"{\n \"items\": [{\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"street-address\": [\"665 3rd St.\"],\n \"extended-address\": [\"Suite 207\"],\n \"locality\": [\"San Francisco\"],\n \"region\": [\"CA\"],\n \"postal-code\": [\"94107\"],\n \"country-name\": [\"U.S.A.\"],\n \"name\": [\"665 3rd St. \\n Suite 207 \\n San Francisco, \\n CA \\n 94107 \\n U.S.A.\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<p class=\"h-adr\">\n <span class=\"p-street-address\">665 3rd St.</span> \n <span class=\"p-extended-address\">Suite 207</span> \n <span class=\"p-locality\">San Francisco</span>, \n <span class=\"p-region\">CA</span> \n <span class=\"p-postal-code\">94107</span> \n <span class=\"p-country-name\">U.S.A.</span> \n</p>","name":"mf-v2-h-adr-simpleproperties"},{"json":"{\n \"items\": [{\n \"type\": [\"h-entry\", \"h-as-note\"],\n \"properties\": {\n \"in-reply-to\": [{\n \"value\": \"http://werd.io/2015/im-super-proud-of-everything-weve-done-on-withknown-so-far\",\n \"type\": [\"h-cite\"],\n \"properties\": {\n \"name\": [\"http://werd.io/2015/im-super-proud-of-everything-weve-done-on-withknown-so-far\"],\n \"url\": [\"http://werd.io/2015/im-super-proud-of-everything-weve-done-on-withknown-so-far\"]\n }\n },\n {\n \"value\": \"https://twitter.com/benwerd/status/604733231284383744\",\n \"type\": [\"h-cite\"],\n \"properties\": {\n \"name\": [\"https://twitter.com/benwerd/status/604733231284383744\"],\n \"url\": [\"https://twitter.com/benwerd/status/604733231284383744\"]\n }\n }],\n \"author\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Tantek Çelik\"],\n \"photo\": [\"http://tantek.com/images/photo.gif\"],\n \"url\": [\"http://tantek.com/\"]\n }\n }],\n \"name\": [\"@benwerd\\n @erinjoalso proud of you &\\n @withknown— so much #indieweb & especially user empathy. Keep up the great work!\"],\n \"content\": [{\n \"value\": \"@benwerd\\n @erinjoalso proud of you &\\n @withknown— so much #indieweb & especially user empathy. Keep up the great work!\",\n \"html\": \"\\n <a class=\\\"auto-link h-x-username\\\" href=\\\"https://twitter.com/benwerd\\\">@benwerd</a>\\n <a class=\\\"auto-link h-x-username\\\" href=\\\"https://twitter.com/erinjo\\\">@erinjo</a>also proud of you &\\n <a class=\\\"auto-link h-x-username\\\" href=\\\"https://twitter.com/withknown\\\">@withknown</a>— so much #indieweb & especially user empathy. Keep up the great work!\"\n }],\n \"published\": [\"2015-06-01 22:20-07:00\"],\n \"updated\": [\"2015-06-01 22:20-07:00\"],\n \"url\": [\"http://tantek.com/2015/152/t2/proud-withknown-indieweb-user-empathy\"],\n \"uid\": [\"http://tantek.com/2015/152/t2/proud-withknown-indieweb-user-empathy\"],\n \"syndication\": [\"https://twitter.com/t/status/605604965566906369\"]\n },\n \"children\": [{\n \"value\": \"@benwerd\",\n \"type\": [\"h-x-username\"],\n \"properties\": {\n \"name\": [\"@benwerd\"],\n \"url\": [\"https://twitter.com/benwerd\"]\n }\n },\n {\n \"value\": \"@erinjo\",\n \"type\": [\"h-x-username\"],\n \"properties\": {\n \"name\": [\"@erinjo\"],\n \"url\": [\"https://twitter.com/erinjo\"]\n }\n },\n {\n \"value\": \"@withknown\",\n \"type\": [\"h-x-username\"],\n \"properties\": {\n \"name\": [\"@withknown\"],\n \"url\": [\"https://twitter.com/withknown\"]\n }\n }]\n }],\n \"rels\": {\n \"prev\": [\"http://tantek.com/152/t1/congrats-fellow-elected-w3cab-members\"],\n \"next\": [\"http://tantek.com/152/t3/going-indiewebcamp-2015-portland\"],\n \"in-reply-to\": [\"http://werd.io/2015/im-super-proud-of-everything-weve-done-on-withknown-so-far\", \"https://twitter.com/benwerd/status/604733231284383744\"],\n \"author\": [\"http://tantek.com/\"],\n \"syndication\": [\"https://twitter.com/t/status/605604965566906369\"]\n },\n \"rel-urls\": {\n \"http://tantek.com/152/t1/congrats-fellow-elected-w3cab-members\": {\n \"title\": \"View the previous (older) item in the stream.\",\n \"text\": \"←\",\n \"rels\": [\"prev\"]\n },\n \"http://tantek.com/152/t3/going-indiewebcamp-2015-portland\": {\n \"title\": \"View the next (newer) item in the stream\",\n \"text\": \"→\",\n \"rels\": [\"next\"]\n },\n \"http://werd.io/2015/im-super-proud-of-everything-weve-done-on-withknown-so-far\": {\n \"text\": \"http://werd.io/2015/im-super-proud-of-everything-weve-done-on-withknown-so-far\",\n \"rels\": [\"in-reply-to\"]\n },\n \"https://twitter.com/benwerd/status/604733231284383744\": {\n \"text\": \"https://twitter.com/benwerd/status/604733231284383744\",\n \"rels\": [\"in-reply-to\"]\n },\n \"http://tantek.com/\": {\n \"title\": \"Tantek Çelik\",\n \"rels\": [\"author\"]\n },\n \"https://twitter.com/t/status/605604965566906369\": {\n \"text\": \"View \\n Conversation\\n on Twitter\",\n \"rels\": [\"syndication\"]\n }\n }\n}","html":"<!-- http://tantek.com/2015/152/t2/proud-withknown-indieweb-user-empathy -->\n<base href=\"http://tantek.com/\" />\n\n<li class=\"h-entry hentry h-as-note\">\n <div>\n <ul>\n <li>\n <a href=\"152/t1/congrats-fellow-elected-w3cab-members\" id=\"previtem\" title=\"View the previous (older) item in the stream.\"\n rel=\"prev\"><abbr title=\"Previous\">←</abbr></a>\n </li>\n <li>\n <a href=\"152/t3/going-indiewebcamp-2015-portland\" id=\"nextitem\" title=\"View the next (newer) item in the stream\" rel=\"next\"><abbr title=\"Next\">→</abbr></a>\n </li>\n </ul>\n </div>\n <div>In reply to:\n <p>\n <a class=\"u-in-reply-to h-cite\" rel=\"in-reply-to\" href=\"http://werd.io/2015/im-super-proud-of-everything-weve-done-on-withknown-so-far\">http://werd.io/2015/im-super-proud-of-everything-weve-done-on-withknown-so-far</a>\n </p>\n <p>\n <a class=\"u-in-reply-to h-cite\" rel=\"in-reply-to\" href=\"https://twitter.com/benwerd/status/604733231284383744\">https://twitter.com/benwerd/status/604733231284383744</a>\n </p>\n <hr>\n </div>\n <a href=\"../\" class=\"p-author h-card\" rel=\"author\" title=\"Tantek Çelik\"><img src=\"/images/photo.gif\" alt=\"Tantek Çelik\"></a>\n <p class=\"p-name entry-title e-content entry-content article\">\n <a class=\"auto-link h-x-username\" href=\"https://twitter.com/benwerd\">@benwerd</a>\n <a class=\"auto-link h-x-username\" href=\"https://twitter.com/erinjo\">@erinjo</a>also proud of you &amp;\n <a class=\"auto-link h-x-username\" href=\"https://twitter.com/withknown\">@withknown</a>— so much #indieweb &amp; especially user empathy. Keep up the great work!</p>\n <span>\n <span class=\"dt-published published dt-updated updated\">\n <time class=\"value\" datetime=\"22:20-0700\">22:20</time>on\n <time class=\"value\">2015-06-01</time>\n </span>\n <span class=\"lt\">(ttk.me t4bT2)</span>using\n <span class=\"using\">BBEdit</span>\n </span>\n <div>\n <form action=\"http://tantek.com/2015/152/t2/proud-withknown-indieweb-user-empathy\">\n <div>\n <label>\n <span class=\"lt\">URL:</span>\n <input class=\"u-url url u-uid uid bookmark\" type=\"url\" size=\"70\" style=\"max-width:100%\" value=\"http://tantek.com/2015/152/t2/proud-withknown-indieweb-user-empathy\">\n </label>\n </div>\n </form>\n </div>\n <div>\n <a class=\"u-syndication\" rel=\"syndication\" style=\"float:right;\" href=\"https://twitter.com/t/status/605604965566906369\">\n <img src=\"/images/photo.gif\" style=\"vertical-align:-30%\" alt=\"\"> \n View \n Conversation\n on Twitter\n</a>\n </div>\n</li>","name":"mf-v2-h-as-note-note"},{"json":" {\n\t\"items\": [{\n \"type\": [\n \"h-card\"\n ],\n \"properties\": {\n \"name\": [\n \"Mitchell Baker\"\n ],\n \"url\": [\"http://blog.lizardwrangler.com/\"],\n \"org\": [{\n \"value\": \"Mozilla Foundation\",\n \"type\": [\n \"h-card\"\n ],\n \"properties\": {\n \"name\": [\"Mozilla Foundation\"],\n \"url\": [\"http://example.org/bios/mitchell-baker/\"]\n }\n }],\n \"photo\": [\"http://example.org/images/photo.gif\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}\n","html":"<base href=\"http://example.org\"/>\n<div class=\"h-card\">\n <a class=\"p-name u-url\" href=\"http://blog.lizardwrangler.com/\">Mitchell Baker</a> \n (<a class=\"p-org h-card\" href=\"bios/mitchell-baker/\">Mozilla Foundation</a>)\n <img class=\"u-photo\" src=\"images/photo.gif\"/>\n</div>","name":"mf-v2-h-card-baseurl"},{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Håkon Wium Lie\"],\n \"photo\": [\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/96/H%C3%A5kon-Wium-Lie-2009-03.jpg/215px-H%C3%A5kon-Wium-Lie-2009-03.jpg\"],\n \"url\": [\"http://people.opera.com/howcome/\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<meta charset=\"utf-8\">\n<a class=\"h-card\" href=\"http://people.opera.com/howcome/\" title=\"Håkon Wium Lie, CTO Opera\">\n <article>\n <h2 class=\"p-name\">Håkon Wium Lie</h2>\n <img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/96/H%C3%A5kon-Wium-Lie-2009-03.jpg/215px-H%C3%A5kon-Wium-Lie-2009-03.jpg\" />\n </article>\n</a>","name":"mf-v2-h-card-childimplied"},{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"photo\": [\"http://blog.mozilla.org/press/files/2012/04/mitchell-baker.jpg\"],\n \"url\": [\"http://blog.lizardwrangler.com/\", \"https://twitter.com/MitchellBaker\"],\n \"name\": [\"Mitchell Baker\"],\n \"org\": [\"Mozilla Foundation\"],\n \"note\": [\"Mitchell is responsible for setting the direction and scope of the Mozilla Foundation and its activities.\"],\n \"category\": [\"Strategy\", \"Leadership\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"h-card\">\n <img class=\"u-photo\" alt=\"photo of Mitchell\" src=\"http://blog.mozilla.org/press/files/2012/04/mitchell-baker.jpg\" />\n <p>\n <a class=\"p-name u-url\" href=\"http://blog.lizardwrangler.com/\">Mitchell Baker</a>\n (<a class=\"u-url\" href=\"https://twitter.com/MitchellBaker\">@MitchellBaker</a>)\n <span class=\"p-org\">Mozilla Foundation</span>\n </p>\n <p class=\"p-note\">Mitchell is responsible for setting the direction and scope of the Mozilla Foundation and its activities.</p>\n <p><span class=\"p-category\">Strategy</span> and <span class=\"p-category\">Leadership</span></p>\n</div>","name":"mf-v2-h-card-extendeddescription"},{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"url\": [\"http://blog.lizardwrangler.com/\"],\n \"name\": [\"Mitchell Baker\"],\n \"org\": [{\n \"value\": \"Mozilla Foundation\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Mozilla Foundation\"],\n \"url\": [\"http://mozilla.org/\"]\n }\n }]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"h-card\">\n <a class=\"p-name u-url\" href=\"http://blog.lizardwrangler.com/\">Mitchell Baker</a> \n (<a class=\"p-org h-card\" href=\"http://mozilla.org/\">Mozilla Foundation</a>)\n</div>","name":"mf-v2-h-card-hcard"},{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Mitchell Baker\"],\n \"url\": [\"http://blog.lizardwrangler.com/\"],\n \"org\": [{\n \"value\": \"Mozilla Foundation\",\n \"type\": [\"h-card\", \"h-org\"],\n \"properties\": {\n \"name\": [\"Mozilla Foundation\"],\n \"url\": [\"http://mozilla.org/\"]\n }\n }]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"h-card\">\n <a class=\"p-name u-url\" href=\"http://blog.lizardwrangler.com/\">Mitchell Baker</a> \n (<a class=\"p-org h-card h-org\" href=\"http://mozilla.org/\">Mozilla Foundation</a>)\n</div>","name":"mf-v2-h-card-horghcard"},{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Rohit Khare\"],\n \"photo\": [\"http://example.com/images/photo.gif\"],\n \"url\": [\"http://rohit.khare.org/\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<a class=\"h-card\" href=\"http://rohit.khare.org/\">\n <img alt=\"Rohit Khare\" src=\"images/photo.gif\" />\n </a>","name":"mf-v2-h-card-hyperlinkedphoto"},{"json":"{ \n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"],\n \"photo\": [\"http://example.com/jane.html\"]\n }\n },\n {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"],\n \"url\": [\"http://example.com/jane.html\"]\n }\n },\n {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"]\n }\n },\n {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"],\n \"photo\": [\"http://example.com/jane.html\"]\n }\n },\n {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"],\n \"url\": [\"http://example.com/jane.html\"]\n }\n },\n {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"]\n }\n },\n {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"],\n \"photo\": [\"http://example.com/jane.html\"]\n }\n },\n {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"],\n \"url\": [\"http://example.com/jane.html\"]\n }\n },\n {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"]\n }\n },\n {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Name\"]\n },\n \"children\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"John Doe\"],\n \"photo\": [\"http://example.com/john.html\"]\n }\n }]\n },\n {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Name\"]\n },\n \"children\": [{\n \"value\": \"Name\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"John Doe\"],\n \"photo\": [\"http://example.com/john.html\"]\n }\n }]\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"\n<img class=\"h-card\" src=\"jane.html\" alt=\"Jane Doe\"/>\n<area class=\"h-card\" href=\"jane.html\" alt=\"Jane Doe\"></area>\n<abbr class=\"h-card\" title=\"Jane Doe\">JD</abbr>\n\n<div class=\"h-card\"><img src=\"jane.html\" alt=\"Jane Doe\"/></div>\n<div class=\"h-card\"><area href=\"jane.html\" alt=\"Jane Doe\"></area></div>\n<div class=\"h-card\"><abbr title=\"Jane Doe\">JD</abbr></div>\n\n<div class=\"h-card\"><span><img src=\"jane.html\" alt=\"Jane Doe\"/></span></div>\n<div class=\"h-card\"><span><area href=\"jane.html\" alt=\"Jane Doe\"></area></span></div>\n<div class=\"h-card\"><span><abbr title=\"Jane Doe\">JD</abbr></span></div>\n\n<div class=\"h-card\"><img class=\"h-card\" src=\"john.html\" alt=\"John Doe\"/>Name</div>\n<div class=\"h-card\"><span class=\"h-card\"><img src=\"john.html\" alt=\"John Doe\"/>Name</span></div>\n","name":"mf-v2-h-card-impliedname"},{"json":" {\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"],\n \"photo\": [\"http://example.com/jane.jpeg\"]\n }\n },\n {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"],\n \"photo\": [\"http://example.com/jane.jpeg\"]\n }\n },\n {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"],\n \"photo\": [\"http://example.com/jane.jpeg\"]\n }\n },\n {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"],\n \"photo\": [\"http://example.com/jane.jpeg\"]\n }\n },\n {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"],\n \"photo\": [\"http://example.com/jane.jpeg\"]\n }\n },\n {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"],\n \"photo\": [\"http://example.com/jane.jpeg\"]\n }\n },\n {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"]\n },\n \"children\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"],\n \"photo\": [\"http://example.com/jane.jpeg\"]\n }\n }]\n },\n {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"]\n },\n \"children\": [{\n \"value\": \"Jane Doe\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"],\n \"photo\": [\"http://example.com/jane.jpeg\"]\n }\n }]\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<img class=\"h-card\" alt=\"Jane Doe\" src=\"jane.jpeg\"/>\n<object class=\"h-card\" data=\"jane.jpeg\"/>Jane Doe</object>\n\n<div class=\"h-card\"><img alt=\"Jane Doe\" src=\"jane.jpeg\"/></div> \n<div class=\"h-card\"><object data=\"jane.jpeg\"/>Jane Doe</object></div> \n\n<div class=\"h-card\"><span><img alt=\"Jane Doe\" src=\"jane.jpeg\"/></span></div> \n<div class=\"h-card\"><span><object data=\"jane.jpeg\"/>Jane Doe</object></span></div> \n\n<div class=\"h-card\"><img class=\"h-card\" alt=\"Jane Doe\" src=\"jane.jpeg\"/>Jane Doe</div> \n<div class=\"h-card\"><span class=\"h-card\"><object data=\"jane.jpeg\"/>Jane Doe</object></span></div> ","name":"mf-v2-h-card-impliedphoto"},{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"],\n \"url\": [\"http://example.com/jane.html\"]\n }\n },\n {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"],\n \"url\": [\"http://example.com/jane.html\"]\n }\n },\n {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"],\n \"url\": [\"http://example.com/jane.html\"]\n }\n },\n {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"],\n \"url\": [\"http://example.com/jane.html\"]\n }\n },\n {\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"]\n },\n \"children\": [{\n \"value\": \"Jane Doe\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Jane Doe\"],\n \"url\": [\"http://example.com/jane.html\"]\n }\n }]\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<a class=\"h-card\" href=\"jane.html\">Jane Doe</a>\n<area class=\"h-card\" href=\"jane.html\" alt=\"Jane Doe\"/ >\n<div class=\"h-card\" ><a href=\"jane.html\">Jane Doe</a><p></p></div> \n<div class=\"h-card\" ><area href=\"jane.html\">Jane Doe</area><p></p></div>\n<div class=\"h-card\" ><a class=\"h-card\" href=\"jane.html\">Jane Doe</a><p></p></div> ","name":"mf-v2-h-card-impliedurl"},{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Ben Ward\"],\n \"url\": [\"http://benward.me/\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<a class=\"h-card\" href=\"http://benward.me/\">Ben Ward</a>","name":"mf-v2-h-card-justahyperlink"},{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Frances Berriman\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<p class=\"h-card\">Frances Berriman</p>","name":"mf-v2-h-card-justaname"},{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Mitchell Baker\"],\n \"url\": [\"http://blog.lizardwrangler.com/\"]\n },\n \"children\": [{\n \"value\": \"Mozilla Foundation\",\n \"type\": [\"h-org\", \"h-card\"],\n \"properties\": {\n \"name\": [\"Mozilla Foundation\"],\n \"url\": [\"http://mozilla.org/\"]\n }\n }]\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"h-card\">\n <a class=\"p-name u-url\" href=\"http://blog.lizardwrangler.com/\">Mitchell Baker</a> \n (<a class=\"h-org h-card\" href=\"http://mozilla.org/\">Mozilla Foundation</a>)\n</div>","name":"mf-v2-h-card-nested"},{"json":"{\n \"items\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"John Doe\"],\n \"given-name\": [\"John\"],\n \"additional-name\": [\"Peter\"],\n \"family-name\": [\"Doe\"],\n \"honorific-suffix\": [\"MSc\", \"PHD\"],\n \"org\": [\"Madgex\", \"Mozilla\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"h-card\">\n \n <span class=\"p-name\">\n <span class=\"p-given-name value\">John</span> \n <abbr class=\"p-additional-name\" title=\"Peter\">P</abbr> \n <span class=\"p-family-name value \">Doe</span> \n </span>\n <data class=\"p-honorific-suffix\" value=\"MSc\"></data>\n \n \n <br class=\"p-honorific-suffix\" />BSc<br />\n <hr class=\"p-honorific-suffix\" />BA\n \n \n <img class=\"p-honorific-suffix\" src=\"images/logo.gif\" alt=\"PHD\" />\n <img src=\"images/logo.gif\" alt=\"company logos\" usemap=\"#logomap\" />\n <map name=\"logomap\">\n <area class=\"p-org\" shape=\"rect\" coords=\"0,0,82,126\" href=\"madgex.htm\" alt=\"Madgex\" />\n <area class=\"p-org\" shape=\"circle\" coords=\"90,58,3\" href=\"mozilla.htm\" alt=\"Mozilla\" />\n </map>\n</div>","name":"mf-v2-h-card-p-property"},{"json":"\n {\n\t\"items\": [{\n \"type\": [\n \"h-card\"\n ],\n \"properties\": {\n \"name\": [\n \"Mitchell Baker\"\n ],\n \"url\": [\"http://blog.lizardwrangler.com/\"],\n \"org\": [\n {\n \"value\": \"Mozilla Foundation\",\n \"type\": [\n \"h-card\"\n ],\n \"properties\": {\n \"name\": [\"Mozilla Foundation\"],\n \"url\": [\"http://example.com/bios/mitchell-baker/\"]\n }\n }\n ],\n \"photo\": [\"http://example.com/bios/mitchell-baker/picture.jpeg\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}\n","html":"<base href=\"http://example.com\" >\n<div class=\"h-card\">\n <a class=\"p-name u-url\" href=\"http://blog.lizardwrangler.com/\">Mitchell Baker</a> \n (<a class=\"p-org h-card\" href=\"bios/mitchell-baker/\">Mozilla Foundation</a>)\n <img class=\"u-photo\" src=\"bios/mitchell-baker/picture.jpeg\"/>\n</div>","name":"mf-v2-h-card-relativeurls"},{"json":"{\n \"items\": [{\n \"type\": [\"h-entry\"],\n \"properties\": {\n \"in-reply-to\": [{\n \"type\": [\"h-cite\"],\n \"properties\": {\n \"name\": [\"Example Post\"],\n \"url\": [\"http://example.com/post\"],\n\n \"author\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"url\": [\"http://example.com\"],\n \"name\": [\"Example Author\"]\n },\n \"value\": \"Example Author\"\n }]\n },\n \"value\": \"http://example.com/post\"\n }],\n \"name\": [\"Example Author\\n Home\\n \\n Example Post\"]\n }\n }],\n\t\"rels\": {},\n\t\"rel-urls\": {}\n}","html":"<div class=\"h-entry\">\n <div class=\"u-in-reply-to h-cite\">\n <span class=\"p-author h-card\">\n <span class=\"p-name\">Example Author</span>\n <a class=\"u-url\" href=\"http://example.com\">Home</a>\n </span>\n <a class=\"p-name u-url\" href=\"http://example.com/post\">Example Post</a>\n </div>\n</div>","name":"mf-v2-h-entry-impliedvalue-nested"},{"json":"{\n \"items\": [{\n \"type\": [\"h-entry\"],\n \"properties\": {\n \"name\": [\"microformats.org at 7\"],\n \"url\": [\"http://microformats.org/2012/06/25/microformats-org-at-7\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<a class=\"h-entry\" href=\"http://microformats.org/2012/06/25/microformats-org-at-7\">microformats.org at 7</a>","name":"mf-v2-h-entry-justahyperlink"},{"json":"{\n \"items\": [{\n \"type\": [\"h-entry\"],\n \"properties\": {\n \"name\": [\"microformats.org at 7\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<p class=\"h-entry\">microformats.org at 7</p>","name":"mf-v2-h-entry-justaname"},{"json":"{\n \"items\": [{\n \"type\": [\"h-entry\"],\n \"properties\": {\n \"url\": [\"http://microformats.org/2012/06/25/microformats-org-at-7\"],\n \"name\": [\"microformats.org at 7\"],\n \"content\": [{\n \"value\": \"Last week the microformats.org community \\n celebrated its 7th birthday at a gathering hosted by Mozilla in \\n San Francisco and recognized accomplishments, challenges, and \\n opportunities.\\n\\n The microformats tagline “humans first, machines second” \\n forms the basis of many of our \\n principles, and \\n in that regard, we’d like to recognize a few people and \\n thank them for their years of volunteer service\",\n \"html\": \"\\n <p class=\\\"p-summary\\\">Last week the microformats.org community \\n celebrated its 7th birthday at a gathering hosted by Mozilla in \\n San Francisco and recognized accomplishments, challenges, and \\n opportunities.</p>\\n\\n <p>The microformats tagline “humans first, machines second” \\n forms the basis of many of our \\n <a href=\\\"http://microformats.org/wiki/principles\\\">principles</a>, and \\n in that regard, we’d like to recognize a few people and \\n thank them for their years of volunteer service </p>\\n \"\n }],\n \"summary\": [\"Last week the microformats.org community \\n celebrated its 7th birthday at a gathering hosted by Mozilla in \\n San Francisco and recognized accomplishments, challenges, and \\n opportunities.\"],\n \"updated\": [\"2012-06-25 17:08:26\"],\n \"author\": [{\n \"value\": \"Tantek\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Tantek\"],\n \"url\": [\"http://tantek.com/\"]\n }\n }]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<meta charset=\"utf-8\">\n<div class=\"h-entry\">\n <h1><a class=\"p-name u-url\" href=\"http://microformats.org/2012/06/25/microformats-org-at-7\">microformats.org at 7</a></h1>\n <div class=\"e-content\">\n <p class=\"p-summary\">Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.</p>\n\n <p>The microformats tagline “humans first, machines second” \n forms the basis of many of our \n <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service </p>\n </div> \n <p>Updated \n <time class=\"dt-updated\" datetime=\"2012-06-25T17:08:26\">June 25th, 2012</time> by\n <a class=\"p-author h-card\" href=\"http://tantek.com/\">Tantek</a>\n </p>\n</div>","name":"mf-v2-h-entry-summarycontent"},{"json":"{\n \"items\": [{\n \"type\": [\"h-entry\"],\n \"properties\": {\n \"name\": [\"microformats.org at 7\"],\n \"url\": [\"http://microformats.org/\", \"http://microformats.org/2012/06/25/microformats-org-at-7\", \"http://microformats.org/2012/06/25/microformats-org-at-7\", \"http://microformats.org/\", \"http://microformats.org/wiki/microformats2-parsing\", \"http://microformats.org/wiki/value-class-pattern\", \"http://microformats.org/wiki/\", \"http://microformats.org/discuss\"],\n \"photo\": [\"http://example.com/images/logo.gif\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<base href=\"http://example.com\">\n<div class=\"h-entry\">\n <p class=\"p-name\">microformats.org at 7</p>\n\n \n <p class=\"u-url\">\n <span class=\"value-title\" title=\"http://microformats.org/\"> </span>\n Article permalink\n </p>\n <p class=\"u-url\">\n <span class=\"value\">http://microformats.org/</span> - \n <span class=\"value\">2012/06/25/microformats-org-at-7</span> \n </p> \n\n <p><a class=\"u-url\" href=\"http://microformats.org/2012/06/25/microformats-org-at-7\">Article permalink</a></p>\n\n <img src=\"images/logo.gif\" alt=\"company logos\" usemap=\"#logomap\" />\n <map name=\"logomap\">\n <area class=\"u-url\" shape=\"rect\" coords=\"0,0,82,126\" href=\"http://microformats.org/\" alt=\"microformats.org\" />\n </map>\n\n <img class=\"u-photo\" src=\"images/logo.gif\" alt=\"company logos\" />\n\n <object class=\"u-url\" data=\"http://microformats.org/wiki/microformats2-parsing\"></object>\n\n <abbr class=\"u-url\" title=\"http://microformats.org/wiki/value-class-pattern\">value-class-pattern</abbr> \n <data class=\"u-url\" value=\"http://microformats.org/wiki/\"></data>\n <p class=\"u-url\">http://microformats.org/discuss</p>\n</div>","name":"mf-v2-h-entry-u-property"},{"json":"{\n \"items\": [{\n \"type\": [\"h-entry\"],\n \"properties\": {\n \"name\": [\"Expanding URLs within HTML content\"],\n \"content\": [{\n \"value\": \"Should not change: http://www.w3.org/\\n Should not change: http://example.com/\\n File relative: test.html = http://example.com/test.html\\n Directory relative: /test/test.html = http://example.com/test/test.html\\n Relative to root: /test.html = http://example.com/test.html\",\n \"html\": \"\\n <ul>\\n <li><a href=\\\"http://www.w3.org/\\\">Should not change: http://www.w3.org/</a></li>\\n <li><a href=\\\"http://example.com/\\\">Should not change: http://example.com/</a></li>\\n <li><a href=\\\"http://example.com/test.html\\\">File relative: test.html = http://example.com/test.html</a></li>\\n <li><a href=\\\"http://example.com/test/test.html\\\">Directory relative: /test/test.html = http://example.com/test/test.html</a></li>\\n <li><a href=\\\"http://example.com/test.html\\\">Relative to root: /test.html = http://example.com/test.html</a></li>\\n </ul>\\n <img src=\\\"http://example.com/images/photo.gif\\\" />\\n \"\n }]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"h-entry\">\n <h1><a class=\"p-name\">Expanding URLs within HTML content</a></h1>\n <div class=\"e-content\">\n <ul>\n <li><a href=\"http://www.w3.org/\">Should not change: http://www.w3.org/</a></li>\n <li><a href=\"http://example.com/\">Should not change: http://example.com/</a></li>\n <li><a href=\"test.html\">File relative: test.html = http://example.com/test.html</a></li>\n <li><a href=\"/test/test.html\">Directory relative: /test/test.html = http://example.com/test/test.html</a></li>\n <li><a href=\"/test.html\">Relative to root: /test.html = http://example.com/test.html</a></li>\n </ul>\n <img src=\"images/photo.gif\" />\n </div> \n</div>","name":"mf-v2-h-entry-urlincontent"},{"json":"{\n \"items\": [{\n \"type\": [\"h-event\"],\n \"properties\": {\n \"name\": [\"The 4th Microformat party\"],\n \"start\": [\n \"2009-06-26 19:00:00\", \n \"2009-06-26 07:00:00\", \n \"2009-06-26 19:00\", \n \"2009-06-26 19\", \n \"2009-06-26 19\", \n \"2009-06-26 19:00\", \n \"2009-06-26 19:00\", \n \"2009-06-26 19:00\", \n \"2009-06-26 07:00\"\n ]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<span class=\"h-event\">\n <span class=\"p-name\">The 4th Microformat party</span> will be on \n <ul>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07:00:00pm \n </span></li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07:00:00am \n </span></li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07:00pm \n </span></li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07pm \n </span></li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">7pm \n </span></li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">7:00pm \n </span></li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07:00p.m. \n </span></li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">07:00PM \n </span></li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <span class=\"value\">7:00am \n </span></li>\n </ul>\n</span>","name":"mf-v2-h-event-ampm"},{"json":"{\n \"items\": [{\n \"type\": [\"h-event\"],\n \"properties\": {\n \"name\": [\"CPJ Online Press Freedom Summit\"],\n \"start\": [\"2012-10-10\"],\n \"location\": [\"San Francisco\"],\n \"attendee\": [{\n \"value\": \"Brian Warner\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Brian Warner\"]\n }\n }, {\n \"value\": \"Kyle Machulis\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Kyle Machulis\"]\n }\n }, {\n \"value\": \"Tantek Çelik\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Tantek Çelik\"]\n }\n }, {\n \"value\": \"Sid Sutter\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Sid Sutter\"]\n }\n }]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<meta charset=\"utf-8\">\n<div class=\"h-event\">\n <span class=\"p-name\">CPJ Online Press Freedom Summit</span>\n (<time class=\"dt-start\" datetime=\"2012-10-10\">10 Nov 2012</time>) in\n <span class=\"p-location\">San Francisco</span>.\n Attendees:\n <ul>\n <li class=\"p-attendee h-card\">Brian Warner</li>\n <li class=\"p-attendee h-card\">Kyle Machulis</li>\n <li class=\"p-attendee h-card\">Tantek Çelik</li>\n <li class=\"p-attendee h-card\">Sid Sutter</li>\n </ul>\n</div>\n","name":"mf-v2-h-event-attendees"},{"json":"{\n \"items\": [{\n \"type\": [\"h-event\"],\n \"properties\": {\n \"name\": [\"IndieWebCamp 2012\"],\n \"url\": [\"http://indiewebcamp.com/2012\"],\n \"start\": [\"2012-06-30\"],\n \"end\": [\"2012-07-01\"],\n \"location\": [{\n \"value\": \"Geoloqi\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Geoloqi\"],\n \"org\": [\"Geoloqi\"],\n \"url\": [\"http://geoloqi.com/\"],\n \"street-address\": [\"920 SW 3rd Ave. Suite 400\"],\n \"locality\": [\"Portland\"],\n \"region\": [\"Oregon\"]\n }\n }]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"h-event\">\n <a class=\"p-name u-url\" href=\"http://indiewebcamp.com/2012\">\n IndieWebCamp 2012\n </a>\n from <time class=\"dt-start\">2012-06-30</time> \n to <time class=\"dt-end\">2012-07-01</time> at \n <span class=\"p-location h-card\">\n <a class=\"p-name p-org u-url\" href=\"http://geoloqi.com/\">Geoloqi</a>, \n <span class=\"p-street-address\">920 SW 3rd Ave. Suite 400</span>, \n <span class=\"p-locality\">Portland</span>, \n <abbr class=\"p-region\" title=\"Oregon\">OR</abbr>\n </span>\n</div>","name":"mf-v2-h-event-combining"},{"json":"{\n \"items\": [{\n \"type\": [\"h-event\"],\n \"properties\": {\n \"name\": [\"The 4th Microformat party\"],\n \"start\": [\"2009-06-26 19:00\"],\n \"end\": [\"2009-06-26 22:00\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<span class=\"h-event\">\n <span class=\"p-name\">The 4th Microformat party</span> will be on \n <span class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00</time></span> to \n <span class=\"dt-end\"><time class=\"value\">22:00</time></span>.\n</span>","name":"mf-v2-h-event-concatenate"},{"json":"{\n \"items\": [\n {\n \"type\": [\n \"h-event\"\n ],\n \"properties\": {\n \"name\": [\n \"The 4th Microformat party\"\n ],\n \"start\": [\n \"2009-06-26 19:00-08:00\",\n \"2009-06-26 19:00-08\",\n \"2009-06-26 19:00-08:00\",\n \"2009-06-26 19:00+08:00\",\n \"2009-06-26 19:00+08:00\",\n \"2009-06-26 19:00Z\",\n \"2009-06-26 19:00-08:00\",\n \"2009-06-26 19:00:00-08:00\"\n ]\n }\n }\n ],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<section class=\"h-event\">\n\t<p><span class=\"p-name\">The 4th Microformat party</span> will be on:</p>\n\t<ul>\n\t\t<li><time class=\"dt-start\" datetime=\"2009-06-26T19:00-08:00\">26 July</time></li>\n\t\t<li><time class=\"dt-start\" datetime=\"2009-06-26T19:00-08\">26 July</time></li>\n\t\t<li><time class=\"dt-start\" datetime=\"2009-06-26T19:00-0800\">26 July</time></li>\n\t\t<li><time class=\"dt-start\" datetime=\"2009-06-26T19:00+0800\">26 July</time></li>\n\t\t<li><time class=\"dt-start\" datetime=\"2009-06-26T19:00+08:00\">26 July</time></li>\n\t\t<li><time class=\"dt-start\" datetime=\"2009-06-26T19:00Z\">26 July</time></li>\n\t\t<li><time class=\"dt-start\" datetime=\"2009-06-26t19:00-08:00\">26 July</time></li>\n\t\t<li><time class=\"dt-start\" datetime=\"2009-06-26 19:00:00-08:00\">26 July</time></li>\n\t</ul>\n</section>","name":"mf-v2-h-event-dates"},{"json":"{\n \"items\": [{\n \"type\": [\"h-event\"],\n \"properties\": {\n \"name\": [\"The party\"],\n \"start\": [\n \"2013-03-14\", \n \"2013-06-25 07:00:00\", \n \"2013-06-26\", \n \"2013-06-27\", \n \"2013-06-28\", \n \"2013-06-29\", \n \"2013-07-01\", \n \"2013-07-02\"\n ]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<span class=\"h-event\">\n <span class=\"p-name\">The party</span> will be on \n \n <p class=\"dt-start\">\n <span class=\"value-title\" title=\"2013-03-14\"> </span>\n March 14th 2013\n </p>\n <p class=\"dt-start\">\n <time class=\"value\" datetime=\"2013-06-25\">25 July</time>, from\n <span class=\"value\">07:00:00am \n </span></p> \n \n <p>\n <time class=\"dt-start\" datetime=\"2013-06-26\">26 June</time>\n \n <ins class=\"dt-start\" datetime=\"2013-06-27\">Just added</ins>, \n <del class=\"dt-start\" datetime=\"2013-06-28\">Removed</del>\n </p>\n <abbr class=\"dt-start\" title=\"2013-06-29\">June 29</abbr> \n <data class=\"dt-start\" value=\"2013-07-01\"></data>\n <p class=\"dt-start\">2013-07-02</p>\n \n</span>","name":"mf-v2-h-event-dt-property"},{"json":"{\n \"items\": [{\n \"type\": [\"h-event\"],\n \"properties\": {\n \"name\": [\"IndieWebCamp 2012\"],\n \"url\": [\"http://indiewebcamp.com/2012\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<a class=\"h-event\" href=\"http://indiewebcamp.com/2012\">IndieWebCamp 2012</a>","name":"mf-v2-h-event-justahyperlink"},{"json":"{\n \"items\": [{\n \"type\": [\"h-event\"],\n \"properties\": {\n \"name\": [\"IndieWebCamp 2012\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<p class=\"h-event\">IndieWebCamp 2012</p>","name":"mf-v2-h-event-justaname"},{"json":"{\n \"items\": [{\n \"type\": [\"h-event\"],\n \"properties\": {\n \"name\": [\"The 4th Microformat party\"],\n \"start\": [\n \"2009-06-26 19:00:00-08:00\", \n \"2009-06-26 19:00:00-08:00\", \n \"2009-06-26 19:00:00+08:00\", \n \"2009-06-26 19:00:00Z\", \n \"2009-06-26 19:00:00\", \n \"2009-06-26 19:00-08:00\", \n \"2009-06-26 19:00+08:00\", \n \"2009-06-26 19:00Z\", \n \"2009-06-26 19:00\"\n ],\n \"end\": [\n \"2013-034\", \n \"2013-06-27 15:34\"\n ]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<span class=\"h-event\">\n <span class=\"p-name\">The 4th Microformat party</span> will be on \n <ul>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00:00-08:00</time> \n </li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00:00-0800</time> \n </li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00:00+0800</time> \n </li> \n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00:00Z</time> \n </li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00:00</time> \n </li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00-08:00</time> \n </li> \n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00+08:00</time> \n </li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00Z</time> \n </li>\n <li class=\"dt-start\">\n <time class=\"value\" datetime=\"2009-06-26\">26 July</time>, from\n <time class=\"value\">19:00</time> \n </li> \n <li>\n <time class=\"dt-end\" datetime=\"2013-034\">3 February 2013</time>\n </li>\n <li>\n <time class=\"dt-end\" datetime=\"2013-06-27 15:34\">26 July 2013</time>\n </li> \n </ul>\n</span>","name":"mf-v2-h-event-time"},{"json":"{\n \"items\": [{\n \"type\": [\"h-feed\"],\n \"properties\": {\n \"name\": [\"microformats blog\"]\n },\n \"children\": [{\n \"value\": \"microformats.org at 7\\n\\t\\t \\n\\t\\t Last week the microformats.org community \\n\\t\\t celebrated its 7th birthday at a gathering hosted by Mozilla in \\n\\t\\t San Francisco and recognized accomplishments, challenges, and \\n\\t\\t opportunities.\\n\\t\\t\\n\\t\\t The microformats tagline “humans first, machines second” \\n\\t\\t forms the basis of many of our \\n\\t\\t principles, and \\n\\t\\t in that regard, we’d like to recognize a few people and \\n\\t\\t thank them for their years of volunteer service \\n\\t\\t \\n\\t\\t Updated \\n\\t\\t June 25th, 2012\",\n \"type\": [\"h-entry\"],\n \"properties\": {\n \"name\": [\"microformats.org at 7\"],\n \"url\": [\"http://microformats.org/2012/06/25/microformats-org-at-7\"],\n \"content\": [{\n \"value\": \"Last week the microformats.org community \\n\\t\\t celebrated its 7th birthday at a gathering hosted by Mozilla in \\n\\t\\t San Francisco and recognized accomplishments, challenges, and \\n\\t\\t opportunities.\\n\\t\\t\\n\\t\\t The microformats tagline “humans first, machines second” \\n\\t\\t forms the basis of many of our \\n\\t\\t principles, and \\n\\t\\t in that regard, we’d like to recognize a few people and \\n\\t\\t thank them for their years of volunteer service\",\n \"html\": \"\\n\\t\\t <p class=\\\"p-summary\\\">Last week the microformats.org community \\n\\t\\t celebrated its 7th birthday at a gathering hosted by Mozilla in \\n\\t\\t San Francisco and recognized accomplishments, challenges, and \\n\\t\\t opportunities.</p>\\n\\t\\t\\n\\t\\t <p>The microformats tagline “humans first, machines second” \\n\\t\\t forms the basis of many of our \\n\\t\\t <a href=\\\"http://microformats.org/wiki/principles\\\">principles</a>, and \\n\\t\\t in that regard, we’d like to recognize a few people and \\n\\t\\t thank them for their years of volunteer service </p>\\n\\t\\t \"\n }],\n \"summary\": [\"Last week the microformats.org community \\n\\t\\t celebrated its 7th birthday at a gathering hosted by Mozilla in \\n\\t\\t San Francisco and recognized accomplishments, challenges, and \\n\\t\\t opportunities.\"],\n \"updated\": [\"2012-06-25 17:08:26\"]\n }\n }]\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"\n<html>\n\t<head>\n\t\t<title>microformats blog</title>\n\t</head>\n\t<body>\n\t<section class=\"h-feed\">\n\t\t\n\t\t<div class=\"h-entry\">\n\t\t <h1><a class=\"p-name u-url\" href=\"http://microformats.org/2012/06/25/microformats-org-at-7\">microformats.org at 7</a></h1>\n\t\t <div class=\"e-content\">\n\t\t <p class=\"p-summary\">Last week the microformats.org community \n\t\t celebrated its 7th birthday at a gathering hosted by Mozilla in \n\t\t San Francisco and recognized accomplishments, challenges, and \n\t\t opportunities.</p>\n\t\t\n\t\t <p>The microformats tagline “humans first, machines second” \n\t\t forms the basis of many of our \n\t\t <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n\t\t in that regard, we’d like to recognize a few people and \n\t\t thank them for their years of volunteer service </p>\n\t\t </div> \n\t\t <p>Updated \n\t\t <time class=\"dt-updated\" datetime=\"2012-06-25T17:08:26\">June 25th, 2012</time>\n\t\t </p>\n\t\t</div>\n\t\t\n\t</section>\n\t</body>\n</html>","name":"mf-v2-h-feed-implied-title"},{"json":"{\n \"items\": [{\n \"type\": [\"h-feed\"],\n \"properties\": {\n \"name\": [\"Microformats blog\"],\n \"author\": [{\n \"value\": \"Tantek\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Tantek\"],\n \"url\": [\"http://tantek.com/\"]\n }\n }],\n \"url\": [\"http://microformats.org/blog\"],\n \"photo\": [\"http://example.com/photo.jpeg\"]\n },\n \"children\": [{\n \"value\": \"microformats.org at 7\\n\\t \\n\\t Last week the microformats.org community \\n\\t celebrated its 7th birthday at a gathering hosted by Mozilla in \\n\\t San Francisco and recognized accomplishments, challenges, and \\n\\t opportunities.\\n\\t\\n\\t The microformats tagline “humans first, machines second” \\n\\t forms the basis of many of our \\n\\t principles, and \\n\\t in that regard, we’d like to recognize a few people and \\n\\t thank them for their years of volunteer service \\n\\t \\n\\t Updated \\n\\t June 25th, 2012\",\n \"type\": [\"h-entry\"],\n \"properties\": {\n \"name\": [\"microformats.org at 7\"],\n \"url\": [\"http://microformats.org/2012/06/25/microformats-org-at-7\"],\n \"content\": [{\n \"value\": \"Last week the microformats.org community \\n\\t celebrated its 7th birthday at a gathering hosted by Mozilla in \\n\\t San Francisco and recognized accomplishments, challenges, and \\n\\t opportunities.\\n\\t\\n\\t The microformats tagline “humans first, machines second” \\n\\t forms the basis of many of our \\n\\t principles, and \\n\\t in that regard, we’d like to recognize a few people and \\n\\t thank them for their years of volunteer service\",\n \"html\": \"\\n\\t <p class=\\\"p-summary\\\">Last week the microformats.org community \\n\\t celebrated its 7th birthday at a gathering hosted by Mozilla in \\n\\t San Francisco and recognized accomplishments, challenges, and \\n\\t opportunities.</p>\\n\\t\\n\\t <p>The microformats tagline “humans first, machines second” \\n\\t forms the basis of many of our \\n\\t <a href=\\\"http://microformats.org/wiki/principles\\\">principles</a>, and \\n\\t in that regard, we’d like to recognize a few people and \\n\\t thank them for their years of volunteer service </p>\\n\\t \"\n }],\n \"summary\": [\"Last week the microformats.org community \\n\\t celebrated its 7th birthday at a gathering hosted by Mozilla in \\n\\t San Francisco and recognized accomplishments, challenges, and \\n\\t opportunities.\"],\n \"updated\": [\"2012-06-25 17:08:26\"]\n }\n }]\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<section class=\"h-feed\">\n\t<h1 class=\"p-name\">Microformats blog</h1>\n\t<a class=\"p-author h-card\" href=\"http://tantek.com/\">Tantek</a>\n\t<a class=\"u-url\" href=\"http://microformats.org/blog\">permlink</a>\n\t<img class=\"u-photo\" src=\"photo.jpeg\"/>\n\t\n\t<div class=\"h-entry\">\n\t <h1><a class=\"p-name u-url\" href=\"http://microformats.org/2012/06/25/microformats-org-at-7\">microformats.org at 7</a></h1>\n\t <div class=\"e-content\">\n\t <p class=\"p-summary\">Last week the microformats.org community \n\t celebrated its 7th birthday at a gathering hosted by Mozilla in \n\t San Francisco and recognized accomplishments, challenges, and \n\t opportunities.</p>\n\t\n\t <p>The microformats tagline “humans first, machines second” \n\t forms the basis of many of our \n\t <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n\t in that regard, we’d like to recognize a few people and \n\t thank them for their years of volunteer service </p>\n\t </div> \n\t <p>Updated \n\t <time class=\"dt-updated\" datetime=\"2012-06-25T17:08:26\">June 25th, 2012</time>\n\t </p>\n\t</div>\n\t\n</section>","name":"mf-v2-h-feed-simple"},{"json":"{\n \"items\": [{\n \"type\": [\"h-geo\"],\n \"properties\": {\n \"latitude\": [\"37.408183\"],\n \"longitude\": [\"-122.13855\"],\n \"name\": [\"N 37° 24.491, \\n W 122° 08.313\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<meta charset=\"utf-8\">\n<p class=\"h-geo\">\n <abbr class=\"p-latitude\" title=\"37.408183\">N 37° 24.491</abbr>, \n <abbr class=\"p-longitude\" title=\"-122.13855\">W 122° 08.313</abbr>\n</p>","name":"mf-v2-h-geo-abbrpattern"},{"json":"{\n \"items\": [{\n \"type\": [\"h-geo\"],\n \"properties\": {\n \"name\": [\"Pen-y-ghent\"],\n \"latitude\": [\"54.155278\"],\n \"longitude\": [\"-2.249722\"],\n \"altitude\": [\"694\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<p>My favourite hill in the lakes is \n <span class=\"h-geo\">\n <span class=\"p-name\">Pen-y-ghent</span> \n (Geo: <span class=\"p-latitude\">54.155278</span>,\n <span class=\"p-longitude\">-2.249722</span>). It\n raises to <span class=\"p-altitude\">694</span>m.\n </span>\n</p>","name":"mf-v2-h-geo-altitude"},{"json":"{\n \"items\": [{\n \"type\": [\"h-geo\"],\n \"properties\": {\n \"latitude\": [\"51.513458\"],\n \"longitude\": [\"-0.14812\"],\n \"name\": [\"The Bricklayer's Arms\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<p>\n <span class=\"h-geo\">The Bricklayer's Arms\n <span class=\"p-latitude\">\n <span class=\"value-title\" title=\"51.513458\"> </span> \n </span>\n <span class=\"p-longitude\">\n <span class=\"value-title\" title=\"-0.14812\"> </span>\n </span>\n </span>\n</p>","name":"mf-v2-h-geo-hidden"},{"json":"{\n \"items\": [{\n \"type\": [\"h-geo\"],\n \"properties\": {\n \"name\": [\"51.513458;-0.14812\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<p>On my way to The Bricklayer's Arms\n (Geo: <span class=\"h-geo\">51.513458;-0.14812</span>)\n</p>","name":"mf-v2-h-geo-justaname"},{"json":"{\n \"items\": [{\n \"type\": [\"h-geo\"],\n \"properties\": {\n \"name\": [\"The Bricklayer's Arms\"],\n \"latitude\": [\"51.513458\"],\n \"longitude\": [\"-0.14812\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<p class=\"h-geo\">We are meeting at \n <span class=\"p-name\">The Bricklayer's Arms</span>\n (Geo: <span class=\"p-latitude\">51.513458</span>:\n <span class=\"p-longitude\">-0.14812</span>)\n</p>","name":"mf-v2-h-geo-simpleproperties"},{"json":"{\n \"items\": [{\n \"type\": [\"h-geo\"],\n \"properties\": {\n \"latitude\": [\"51.513458\"],\n \"longitude\": [\"-0.14812\"],\n \"name\": [\"N 51° 51.345, \\n \\n \\n W -0° 14.812\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<meta charset=\"utf-8\">\n<p>\n <span class=\"h-geo\">\n <span class=\"p-latitude\">\n <span class=\"value-title\" title=\"51.513458\">N 51° 51.345</span>, \n </span>\n <span class=\"p-longitude\">\n <span class=\"value-title\" title=\"-0.14812\">W -0° 14.812</span>\n </span>\n </span>\n</p>","name":"mf-v2-h-geo-valuetitleclass"},{"json":"{\n \"items\": [{\n \"type\": [\"h-news\"],\n \"properties\": {\n \"entry\": [{\n \"value\": \"microformats.org at 7\",\n \"type\": [\"h-entry\"],\n \"properties\": {\n \"name\": [\"microformats.org at 7\"],\n \"url\": [\"http://microformats.org/2012/06/25/microformats-org-at-7\"],\n \"content\": [{\n \"value\": \"Last week the microformats.org community \\n celebrated its 7th birthday at a gathering hosted by Mozilla in \\n San Francisco and recognized accomplishments, challenges, and \\n opportunities.\\n\\n The microformats tagline “humans first, machines second” \\n forms the basis of many of our \\n principles, and \\n in that regard, we’d like to recognize a few people and \\n thank them for their years of volunteer service\",\n \"html\": \"\\n <p class=\\\"p-summary\\\">Last week the microformats.org community \\n celebrated its 7th birthday at a gathering hosted by Mozilla in \\n San Francisco and recognized accomplishments, challenges, and \\n opportunities.</p>\\n\\n <p>The microformats tagline “humans first, machines second” \\n forms the basis of many of our \\n <a href=\\\"http://microformats.org/wiki/principles\\\">principles</a>, and \\n in that regard, we’d like to recognize a few people and \\n thank them for their years of volunteer service </p>\\n \"\n }],\n \"summary\": [\"Last week the microformats.org community \\n celebrated its 7th birthday at a gathering hosted by Mozilla in \\n San Francisco and recognized accomplishments, challenges, and \\n opportunities.\"],\n \"updated\": [\"2012-06-25 17:08:26\"],\n \"author\": [{\n \"value\": \"Tantek\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Tantek\"],\n \"url\": [\"http://tantek.com/\"]\n }\n }]\n }\n }],\n \"dateline\": [{\n \"value\": \"San Francisco, \\n CA\",\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"locality\": [\"San Francisco\"],\n \"region\": [\"CA\"],\n \"name\": [\"San Francisco, \\n CA\"]\n }\n }],\n \"geo\": [\"37.774921;-122.445202\"],\n \"source-org\": [{\n \"value\": \"microformats.org\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"microformats.org\"],\n \"url\": [\"http://microformats.org/\"]\n }\n }],\n \"principles\": [\"http://microformats.org/wiki/Category:public_domain_license\"],\n \"name\": [\"microformats.org at 7\\n \\n Last week the microformats.org community \\n celebrated its 7th birthday at a gathering hosted by Mozilla in \\n San Francisco and recognized accomplishments, challenges, and \\n opportunities.\\n\\n The microformats tagline “humans first, machines second” \\n forms the basis of many of our \\n principles, and \\n in that regard, we’d like to recognize a few people and \\n thank them for their years of volunteer service \\n \\n Updated \\n June 25th, 2012 by\\n Tantek\\n \\n \\n\\n \\n \\n San Francisco, \\n CA \\n \\n (Geo: 37.774921;-122.445202) \\n \\n microformats.org\\n \\n \\n \\n Publishing policy\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"h-news\">\n <div class=\"p-entry h-entry\">\n <h1><a class=\"p-name u-url\" href=\"http://microformats.org/2012/06/25/microformats-org-at-7\">microformats.org at 7</a></h1>\n <div class=\"e-content\">\n <p class=\"p-summary\">Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.</p>\n\n <p>The microformats tagline “humans first, machines second” \n forms the basis of many of our \n <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service </p>\n </div> \n <p>Updated \n <time class=\"dt-updated\" datetime=\"2012-06-25T17:08:26\">June 25th, 2012</time> by\n <a class=\"p-author h-card\" href=\"http://tantek.com/\">Tantek</a>\n </p>\n </div>\n\n <p>\n <span class=\"p-dateline h-adr\">\n <span class=\"p-locality\">San Francisco</span>, \n <span class=\"p-region\">CA</span> \n </span>\n (Geo: <span class=\"p-geo\">37.774921;-122.445202</span>) \n <span class=\"p-source-org h-card\">\n <a class=\"p-name u-url\" href=\"http://microformats.org/\">microformats.org</a>\n </span>\n </p>\n <p>\n <a class=\"u-principles\" href=\"http://microformats.org/wiki/Category:public_domain_license\">Publishing policy</a>\n </p>\n</div>","name":"mf-v2-h-news-all"},{"json":"{\n \"items\": [{\n \"type\": [\"h-news\"],\n \"properties\": {\n \"entry\": [{\n \"value\": \"microformats.org at 7\",\n \"type\": [\"h-entry\"],\n \"properties\": {\n \"name\": [\"microformats.org at 7\"],\n \"url\": [\"http://microformats.org/2012/06/25/microformats-org-at-7\"],\n \"content\": [{\n \"value\": \"Last week the microformats.org community \\n celebrated its 7th birthday at a gathering hosted by Mozilla in \\n San Francisco and recognized accomplishments, challenges, and \\n opportunities.\\n\\n The microformats tagline “humans first, machines second” \\n forms the basis of many of our \\n principles, and \\n in that regard, we’d like to recognize a few people and \\n thank them for their years of volunteer service\",\n \"html\": \"\\n <p class=\\\"p-summary\\\">Last week the microformats.org community \\n celebrated its 7th birthday at a gathering hosted by Mozilla in \\n San Francisco and recognized accomplishments, challenges, and \\n opportunities.</p>\\n\\n <p>The microformats tagline “humans first, machines second” \\n forms the basis of many of our \\n <a href=\\\"http://microformats.org/wiki/principles\\\">principles</a>, and \\n in that regard, we’d like to recognize a few people and \\n thank them for their years of volunteer service </p>\\n \"\n }],\n \"summary\": [\"Last week the microformats.org community \\n celebrated its 7th birthday at a gathering hosted by Mozilla in \\n San Francisco and recognized accomplishments, challenges, and \\n opportunities.\"],\n \"updated\": [\"2012-06-25 17:08:26\"],\n \"author\": [{\n \"value\": \"Tantek\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Tantek\"],\n \"url\": [\"http://tantek.com/\"]\n }\n }]\n }\n }],\n \"source-org\": [{\n \"value\": \"microformats.org\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"microformats.org\"],\n \"url\": [\"http://microformats.org/\"]\n }\n }],\n \"name\": [\"microformats.org at 7\\n \\n Last week the microformats.org community \\n celebrated its 7th birthday at a gathering hosted by Mozilla in \\n San Francisco and recognized accomplishments, challenges, and \\n opportunities.\\n\\n The microformats tagline “humans first, machines second” \\n forms the basis of many of our \\n principles, and \\n in that regard, we’d like to recognize a few people and \\n thank them for their years of volunteer service \\n \\n Updated \\n June 25th, 2012 by\\n Tantek\\n \\n \\n \\n microformats.org\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"h-news\">\n <div class=\"p-entry h-entry\">\n <h1><a class=\"p-name u-url\" href=\"http://microformats.org/2012/06/25/microformats-org-at-7\">microformats.org at 7</a></h1>\n <div class=\"e-content\">\n <p class=\"p-summary\">Last week the microformats.org community \n celebrated its 7th birthday at a gathering hosted by Mozilla in \n San Francisco and recognized accomplishments, challenges, and \n opportunities.</p>\n\n <p>The microformats tagline “humans first, machines second” \n forms the basis of many of our \n <a href=\"http://microformats.org/wiki/principles\">principles</a>, and \n in that regard, we’d like to recognize a few people and \n thank them for their years of volunteer service </p>\n </div> \n <p>Updated \n <time class=\"dt-updated\" datetime=\"2012-06-25T17:08:26\">June 25th, 2012</time> by\n <a class=\"p-author h-card\" href=\"http://tantek.com/\">Tantek</a>\n </p>\n </div>\n <p>\n <a class=\"p-source-org h-card\" href=\"http://microformats.org/\">microformats.org</a> \n </p>\n</div>","name":"mf-v2-h-news-minimum"},{"json":"{\n \"items\": [{\n \"type\": [\"h-org\"],\n \"properties\": {\n \"name\": [\"Mozilla Foundation\"],\n \"url\": [\"http://mozilla.org/\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<a class=\"h-org\" href=\"http://mozilla.org/\">Mozilla Foundation</a>","name":"mf-v2-h-org-hyperlink"},{"json":"{\n \"items\": [{\n \"type\": [\"h-org\"],\n \"properties\": {\n \"name\": [\"Mozilla Foundation\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<span class=\"h-org\">Mozilla Foundation</span>","name":"mf-v2-h-org-simple"},{"json":"{\n \"items\": [{\n \"type\": [\"h-org\"],\n \"properties\": {\n \"organization-name\": [\"W3C\"],\n \"organization-unit\": [\"CSS Working Group\"],\n \"name\": [\"W3C - \\n CSS Working Group\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<p class=\"h-org\">\n <span class=\"p-organization-name\">W3C</span> - \n <span class=\"p-organization-unit\">CSS Working Group</span>\n</p>","name":"mf-v2-h-org-simpleproperties"},{"json":"{\n \"items\": [{\n \"type\": [\"h-product\"],\n \"properties\": {\n \"name\": [\"Raspberry Pi\"],\n \"photo\": [\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/RaspberryPi.jpg/320px-RaspberryPi.jpg\"],\n \"description\": [{\n \"value\": \"The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.\",\n \"html\": \"The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.\"\n }],\n \"url\": [\"http://www.raspberrypi.org/\"],\n \"price\": [\"£29.95\"],\n \"review\": [{\n \"value\": \"9.2 out of \\n 10 \\n based on 178 reviews\",\n \"type\": [\"h-review-aggregate\"],\n \"properties\": {\n \"rating\": [{\n \"value\": \"9.2 out of \\n 10 \\n based on 178 reviews\",\n \"type\": [\"h-rating\"],\n \"properties\": {\n \"average\": [\"9.2\"],\n \"best\": [\"10\"],\n \"count\": [\"178\"],\n \"name\": [\"9.2 out of \\n 10 \\n based on 178 reviews\"]\n }\n }],\n \"name\": [\"9.2 out of \\n 10 \\n based on 178 reviews\"]\n }\n }],\n \"category\": [\"Computer\", \"Education\"],\n \"brand\": [{\n \"value\": \"The Raspberry Pi Foundation\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"The Raspberry Pi Foundation\"],\n \"org\": [\"The Raspberry Pi Foundation\"],\n \"locality\": [\"Cambridge\"],\n \"country-name\": [\"UK\"]\n }\n }]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<meta charset=\"utf-8\">\n<div class=\"h-product\">\n <h2 class=\"p-name\">Raspberry Pi</h2>\n <img class=\"u-photo\" src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/RaspberryPi.jpg/320px-RaspberryPi.jpg\" />\n <p class=\"e-description\">The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.</p>\n <a class=\"u-url\" href=\"http://www.raspberrypi.org/\">More info about the Raspberry Pi</a>\n <p class=\"p-price\">£29.95</p>\n <p class=\"p-review h-review-aggregate\">\n <span class=\"p-rating h-rating\">\n <span class=\"p-average\">9.2</span> out of \n <span class=\"p-best\">10</span> \n based on <span class=\"p-count\">178</span> reviews\n </span>\n </p>\n <p>Categories: <span class=\"p-category\">Computer</span>, <span class=\"p-category\">Education</span></p>\n <p class=\"p-brand h-card\">From: \n <span class=\"p-name p-org\">The Raspberry Pi Foundation</span> - \n <span class=\"p-locality\">Cambridge</span> \n <span class=\"p-country-name\">UK</span>\n </p>\n</div>","name":"mf-v2-h-product-aggregate"},{"json":"{\n \"items\": [{\n \"type\": [\"h-product\"],\n \"properties\": {\n \"name\": [\"Raspberry Pi\"],\n \"url\": [\"http://www.raspberrypi.org/\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<a class=\"h-product\" href=\"http://www.raspberrypi.org/\">Raspberry Pi</a>","name":"mf-v2-h-product-justahyperlink"},{"json":"{\n \"items\": [{\n \"type\": [\"h-product\"],\n \"properties\": {\n \"name\": [\"Raspberry Pi\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<p class=\"h-product\">Raspberry Pi</p>","name":"mf-v2-h-product-justaname"},{"json":"{\n \"items\": [{\n \"type\": [\"h-product\"],\n \"properties\": {\n \"name\": [\"Raspberry Pi\"],\n \"photo\": [\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/RaspberryPi.jpg/320px-RaspberryPi.jpg\"],\n \"description\": [{\n \"value\": \"The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.\",\n \"html\": \"The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.\"\n }],\n \"url\": [\"http://www.raspberrypi.org/\"],\n \"price\": [\"£29.95\"],\n \"category\": [\"Computer\", \"Education\"],\n \"review\": [{\n \"value\": \"4.5 out of 5\",\n \"type\": [\"h-review\"],\n \"properties\": {\n \"rating\": [\"4.5\"],\n \"name\": [\"4.5 out of 5\"]\n }\n }]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<meta charset=\"utf-8\">\n<div class=\"h-product\">\n <h2 class=\"p-name\">Raspberry Pi</h2>\n <img class=\"u-photo\" src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/RaspberryPi.jpg/320px-RaspberryPi.jpg\" />\n <p class=\"e-description\">The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It’s a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video. We want to see it being used by kids all over the world to learn programming.</p>\n <a class=\"u-url\" href=\"http://www.raspberrypi.org/\">More info about the Raspberry Pi</a>\n <p class=\"p-price\">£29.95</p>\n <p class=\"p-review h-review\"><span class=\"p-rating\">4.5</span> out of 5</p>\n <p>Categories: <span class=\"p-category\">Computer</span>, <span class=\"p-category\">Education</span></p>\n</div>","name":"mf-v2-h-product-simpleproperties"},{"json":"{\n \"items\": [{\n \"type\": [\"h-recipe\"],\n \"properties\": {\n \"name\": [\"Yorkshire Puddings\"],\n \"summary\": [\"Makes 6 good sized Yorkshire puddings, the way my mum taught me\"],\n \"yield\": [\"6 good sized Yorkshire puddings\"],\n \"photo\": [\"http://codebits.glennjones.net/semantic/yorkshire-puddings.jpg\"],\n \"review\": [{\n \"value\": \"4.5 stars out 5 based on \\n 35 reviews\",\n \"type\": [\"h-review-aggregate\"],\n \"properties\": {\n \"rating\": [\"4.5 stars out 5 based on\"],\n \"average\": [\"4.5\"],\n \"count\": [\"35\"],\n \"name\": [\"4.5 stars out 5 based on \\n 35 reviews\"]\n }\n }],\n \"ingredient\": [{\n \"value\": \"1 egg\",\n \"html\": \"1 egg\"\n }, {\n \"value\": \"75g plain flour\",\n \"html\": \"75g plain flour\"\n }, {\n \"value\": \"70ml milk\",\n \"html\": \"70ml milk\"\n }, {\n \"value\": \"60ml water\",\n \"html\": \"60ml water\"\n }, {\n \"value\": \"Pinch of salt\",\n \"html\": \"Pinch of salt\"\n }],\n \"instructions\": [{\n \"value\": \"Pre-heat oven to 230C or gas mark 8. Pour the vegetable oil evenly into 2 x 4-hole \\n Yorkshire pudding tins and place in the oven to heat through. \\n \\n To make the batter, add all the flour into a bowl and beat in the eggs until smooth. \\n Gradually add the milk and water while beating the mixture. It should be smooth and \\n without lumps. Finally add a pinch of salt.\\n \\n Make sure the oil is piping hot before pouring the batter evenly into the tins. \\n Place in the oven for 20-25 minutes until pudding have risen and look golden brown\",\n \"html\": \"\\n <ol>\\n <li>Pre-heat oven to 230C or gas mark 8. Pour the vegetable oil evenly into 2 x 4-hole \\n Yorkshire pudding tins and place in the oven to heat through.</li> \\n \\n <li>To make the batter, add all the flour into a bowl and beat in the eggs until smooth. \\n Gradually add the milk and water while beating the mixture. It should be smooth and \\n without lumps. Finally add a pinch of salt.</li>\\n \\n <li>Make sure the oil is piping hot before pouring the batter evenly into the tins. \\n Place in the oven for 20-25 minutes until pudding have risen and look golden brown</li>\\n </ol>\\n \"\n }],\n \"nutrition\": [\"Calories: 125\", \"Fat: 3.2g\", \"Cholesterol: 77mg\"],\n \"published\": [\"2011-10-27\"],\n \"author\": [{\n \"value\": \"Glenn Jones\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Glenn Jones\"],\n \"url\": [\"http://glennjones.net\"]\n }\n }],\n \"url\": [\"http://www.flickr.com/photos/dithie/4106528495/\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<section class=\"h-recipe\">\n <h1 class=\"p-name\">Yorkshire Puddings</h1> \n <p class=\"p-summary\">Makes <span class=\"p-yield\">6 good sized Yorkshire puddings</span>, the way my mum taught me</p>\n\n\n <p><img class=\"u-photo\" src=\"http://codebits.glennjones.net/semantic/yorkshire-puddings.jpg\" /></p>\n\n <span class=\"p-review h-review-aggregate\">\n <span class=\"p-rating\">\n <span class=\"p-average\">4.5</span> stars out 5 based on </span>\n <span class=\"p-count\">35</span> reviews</span>\n \n \n\n <div id=\"ingredients-container\">\n <h3>Ingredients</h3>\n <ul>\n <li class=\"e-ingredient\">1 egg</li>\n <li class=\"e-ingredient\">75g plain flour</li>\n <li class=\"e-ingredient\">70ml milk</li>\n <li class=\"e-ingredient\">60ml water</li>\n <li class=\"e-ingredient\">Pinch of salt</li>\n </ul>\n </div>\n\n <h3>Time</h3>\n <ul>\n <li class=\"prepTime\">Preparation <span class=\"value-title\" title=\"PT0H10M\">10 mins</span></li>\n <li class=\"cookTime\">Cook <span class=\"value-title\" title=\"PT0H25M\">25 mins</span></li>\n </ul> \n\n\n <h3>Instructions</h3>\n <div class=\"e-instructions\">\n <ol>\n <li>Pre-heat oven to 230C or gas mark 8. Pour the vegetable oil evenly into 2 x 4-hole \n Yorkshire pudding tins and place in the oven to heat through.</li> \n \n <li>To make the batter, add all the flour into a bowl and beat in the eggs until smooth. \n Gradually add the milk and water while beating the mixture. It should be smooth and \n without lumps. Finally add a pinch of salt.</li>\n \n <li>Make sure the oil is piping hot before pouring the batter evenly into the tins. \n Place in the oven for 20-25 minutes until pudding have risen and look golden brown</li>\n </ol>\n </div>\n\n <h3>Nutrition</h3>\n <ul id=\"nutrition-list\">\n <li class=\"p-nutrition\">Calories: <span class=\"calories\">125</span></li>\n <li class=\"p-nutrition\">Fat: <span class=\"fat\">3.2g</span></li>\n <li class=\"p-nutrition\">Cholesterol: <span class=\"cholesterol\">77mg</span></li>\n </ul>\n <p>(Amount per pudding)</p>\n\n <p>\n Published on <time class=\"dt-published\" datetime=\"2011-10-27\">27 Oct 2011</time> by \n <span class=\"p-author h-card\">\n <a class=\"p-name u-url\" href=\"http://glennjones.net\">Glenn Jones</a>\n </span>\n </p>\n <a href=\"http://www.flickr.com/photos/dithie/4106528495/\">Photo by dithie</a>\n </section>","name":"mf-v2-h-recipe-all"},{"json":"{\n \"items\": [{\n \"type\": [\"h-recipe\"],\n \"properties\": {\n \"name\": [\"Toast\"],\n \"ingredient\": [{\n \"value\": \"Slice of bread\",\n \"html\": \"Slice of bread\"\n }, {\n \"value\": \"Butter\",\n \"html\": \"Butter\"\n }]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"h-recipe\"> \n <p class=\"p-name\">Toast</p>\n <ul>\n <li class=\"e-ingredient\">Slice of bread</li>\n <li class=\"e-ingredient\">Butter</li>\n </ul>\n</div>","name":"mf-v2-h-recipe-minimum"},{"json":"{\n \"items\": [{\n \"type\": [\"h-resume\"],\n \"properties\": {\n \"name\": [\"Tim Berners-Lee\"],\n \"summary\": [\"invented the World Wide Web\"],\n \"affiliation\": [{\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"W3C\"],\n \"photo\": [\"http://www.w3.org/Icons/WWW/w3c_home_nb.png\"],\n \"url\": [\"http://www.w3.org/\"]\n }\n }]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"h-resume\">\n <p>\n <span class=\"p-name\">Tim Berners-Lee</span>, \n <span class=\"p-summary\">invented the World Wide Web</span>. \n </p> \n Belongs to following groups:\n <p> \n <a class=\"p-affiliation h-card\" href=\"http://www.w3.org/\">\n <img class=\"p-name u-photo\" alt=\"W3C\" src=\"http://www.w3.org/Icons/WWW/w3c_home_nb.png\" />\n </a>\n </p> \n</div>","name":"mf-v2-h-resume-affiliation"},{"json":"{\n \"items\": [{\n \"type\": [\"h-resume\"],\n \"properties\": {\n \"name\": [\"Tim Berners-Lee\"],\n \"summary\": [\"Invented the World Wide Web.\"],\n \"contact\": [{\n \"value\": \"MIT\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"MIT\"],\n \"street-address\": [\"32 Vassar Street\"],\n \"extended-address\": [\"Room 32-G524\"],\n \"locality\": [\"Cambridge\"],\n \"region\": [\"MA\"],\n \"postal-code\": [\"02139\"],\n \"country-name\": [\"USA\"],\n \"tel\": [\"+1 (617) 253 5702\"],\n \"email\": [\"mailto:timbl@w3.org\"]\n }\n }]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"h-resume\">\n <p class=\"p-name\">Tim Berners-Lee</p>\n <p class=\"p-summary\">Invented the World Wide Web.</p><hr />\n <div class=\"p-contact h-card\">\n <p class=\"p-name\">MIT</p>\n <p>\n <span class=\"p-street-address\">32 Vassar Street</span>, \n <span class=\"p-extended-address\">Room 32-G524</span>, \n <span class=\"p-locality\">Cambridge</span>, \n <span class=\"p-region\">MA</span> \n <span class=\"p-postal-code\">02139</span>, \n <span class=\"p-country-name\">USA</span>.\n </p>\n <p>Tel:<span class=\"p-tel\">+1 (617) 253 5702</span></p>\n <p>Email:<a class=\"u-email\" href=\"mailto:timbl@w3.org\">timbl@w3.org</a></p>\n </div>\n</div>","name":"mf-v2-h-resume-contact"},{"json":"{\n \"items\": [{\n \"type\": [\"h-resume\"],\n \"properties\": {\n \"name\": [\"Tim Berners-Lee\"],\n \"contact\": [{\n \"value\": \"Director of the World Wide Web Foundation\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"title\": [\"Director of the World Wide Web Foundation\"],\n \"name\": [\"Director of the World Wide Web Foundation\"]\n }\n }],\n \"summary\": [\"Invented the World Wide Web.\"],\n \"education\": [{\n \"value\": \"The Queen's College, Oxford University\",\n \"type\": [\"h-event\", \"h-card\"],\n \"properties\": {\n \"name\": [\"The Queen's College, Oxford University\"],\n \"org\": [\"The Queen's College, Oxford University\"],\n \"description\": [\"BA Hons (I) Physics\"],\n \"start\": [\"1973-09\"],\n \"end\": [\"1976-06\"]\n }\n }]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"h-resume\">\n <p class=\"p-name\">Tim Berners-Lee</p>\n <div class=\"p-contact h-card\">\n <p class=\"p-title\">Director of the World Wide Web Foundation</p>\n </div>\n <p class=\"p-summary\">Invented the World Wide Web.</p><hr />\n <p class=\"p-education h-event h-card\">\n <span class=\"p-name p-org\">The Queen's College, Oxford University</span>, \n <span class=\"p-description\">BA Hons (I) Physics</span> \n <time class=\"dt-start\" datetime=\"1973-09\">1973</time> –\n <time class=\"dt-end\" datetime=\"1976-06\">1976</time>\n </p>\n</div>","name":"mf-v2-h-resume-education"},{"json":"{\n \"items\": [{\n \"type\": [\"h-resume\"],\n \"properties\": {\n \"name\": [\"Tim Berners-Lee, invented the World Wide Web.\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<p class=\"h-resume\">Tim Berners-Lee, invented the World Wide Web.</p>","name":"mf-v2-h-resume-justaname"},{"json":"{\n \"items\": [{\n \"type\": [\"h-resume\"],\n \"properties\": {\n \"name\": [\"Tim Berners-Lee\"],\n \"summary\": [\"invented the World Wide Web\"],\n \"skill\": [\"information systems\", \"advocacy\", \"leadership\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"h-resume\">\n <p>\n <span class=\"p-name\">Tim Berners-Lee</span>, \n <span class=\"p-summary\">invented the World Wide Web</span>.\n </p>\n Skills: \n <ul>\n <li class=\"p-skill\">information systems</li>\n <li class=\"p-skill\">advocacy</li>\n <li class=\"p-skill\">leadership</li>\n <ul> \n</ul></ul></div>","name":"mf-v2-h-resume-skill"},{"json":"{\n \"items\": [{\n \"type\": [\"h-resume\"],\n \"properties\": {\n \"name\": [\"Tim Berners-Lee\"],\n \"contact\": [{\n \"value\": \"Director of the World Wide Web Foundation\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"title\": [\"Director of the World Wide Web Foundation\"],\n \"name\": [\"Director of the World Wide Web Foundation\"]\n }\n }],\n \"summary\": [\"Invented the World Wide Web.\"],\n \"experience\": [{\n \"value\": \"World Wide Web Foundation\",\n \"type\": [\"h-event\", \"h-card\"],\n \"properties\": {\n \"title\": [\"Director\"],\n \"name\": [\"World Wide Web Foundation\"],\n \"org\": [\"World Wide Web Foundation\"],\n \"url\": [\"http://www.webfoundation.org/\"],\n \"start\": [\"2009-01-18\"],\n \"duration\": [\"P2Y11M\"]\n }\n }]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<meta charset=\"utf-8\">\n<div class=\"h-resume\">\n <p class=\"p-name\">Tim Berners-Lee</p>\n <div class=\"p-contact h-card\">\n <p class=\"p-title\">Director of the World Wide Web Foundation</p>\n </div>\n <p class=\"p-summary\">Invented the World Wide Web.</p><hr />\n <div class=\"p-experience h-event h-card\">\n <p class=\"p-title\">Director</p>\n <p><a class=\"p-name p-org u-url\" href=\"http://www.webfoundation.org/\">World Wide Web Foundation</a></p>\n <p>\n <time class=\"dt-start\" datetime=\"2009-01-18\">Jan 2009</time> – Present\n <time class=\"dt-duration\" datetime=\"P2Y11M\">(2 years 11 month)</time>\n </p>\n </div>\n</div>","name":"mf-v2-h-resume-work"},{"json":"{\n \"items\": [{\n \"type\": [\"h-review\"],\n \"properties\": {\n \"name\": [\"Crepes on Cole\"],\n \"url\": [\"https://plus.google.com/116941523817079328322/about\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<a class=\"h-review\" href=\"https://plus.google.com/116941523817079328322/about\">Crepes on Cole</a>","name":"mf-v2-h-review-hyperlink"},{"json":"{\n \"items\": [{\n \"type\": [\"h-review\"],\n \"properties\": {\n \"item\": [{\n \"value\": \"Crepes on Cole\",\n \"type\": [\"h-item\"],\n \"properties\": {\n \"name\": [\"Crepes on Cole\"],\n \"url\": [\"http://example.com/crepeoncole\"]\n }\n }],\n \"rating\": [\"4.7\"],\n \"name\": [\"Crepes on Cole\\n 4.7 out of 5 stars\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"h-review\">\n <a class=\"p-item h-item\" href=\"http://example.com/crepeoncole\">Crepes on Cole</a>\n <p><span class=\"p-rating\">4.7</span> out of 5 stars</p>\n</div>","name":"mf-v2-h-review-implieditem"},{"json":"{\n \"items\": [{\n \"type\": [\"h-review\"],\n \"properties\": {\n \"item\": [{\n \"value\": \"Crepes on Cole\",\n \"type\": [\"h-item\"],\n \"properties\": {\n \"photo\": [\"http://example.com/images/photo.gif\"],\n \"name\": [\"Crepes on Cole\"],\n \"url\": [\"http://example.com/crepeoncole\"]\n }\n }],\n \"rating\": [\"5\"],\n \"name\": [\"Crepes on Cole\\n \\n 5 out of 5 stars\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<base href=\"http://example.com\" >\n<div class=\"h-review\">\n <p class=\"p-item h-item\">\n <img class=\"u-photo\" src=\"images/photo.gif\" />\n <a class=\"p-name u-url\" href=\"http://example.com/crepeoncole\">Crepes on Cole</a>\n </p>\n <p><span class=\"p-rating\">5</span> out of 5 stars</p>\n</div>","name":"mf-v2-h-review-item"},{"json":"{\n \"items\": [{\n \"type\": [\"h-review\"],\n \"properties\": {\n \"name\": [\"Crepes on Cole\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<p class=\"h-review\">Crepes on Cole</p>","name":"mf-v2-h-review-justaname"},{"json":"{\n \"items\": [{\n \"type\": [\"h-review\"],\n \"properties\": {\n \"name\": [\"Crepes on Cole\"],\n \"photo\": [\"http://example.com/images/photo.gif\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<base href=\"http://example.com\" ><img class=\"h-review\" src=\"images/photo.gif\" alt=\"Crepes on Cole\" />","name":"mf-v2-h-review-photo"},{"json":"{\n \"items\": [{\n \"type\": [\"h-review\"],\n \"properties\": {\n \"rating\": [\"5\"],\n \"name\": [\"Crepes on Cole is awesome\"],\n \"reviewer\": [{\n \"value\": \"Tantek\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Tantek\"]\n }\n }],\n \"reviewed\": [\"2005-04-18\"],\n \"description\": [{\n \"value\": \"Crepes on Cole is one of the best little \\n creperies in San Francisco.\\n Excellent food and service. Plenty of tables in a variety of sizes \\n for parties large and small. Window seating makes for excellent \\n people watching to/from the N-Judah which stops right outside. \\n I've had many fun social gatherings here, as well as gotten \\n plenty of work done thanks to neighborhood WiFi.\",\n \"html\": \"\\n <p class=\\\"p-item h-card\\\">\\n <span class=\\\"p-name p-org\\\">Crepes on Cole</span> is one of the best little \\n creperies in <span class=\\\"p-adr h-adr\\\"><span class=\\\"p-locality\\\">San Francisco</span></span>.\\n Excellent food and service. Plenty of tables in a variety of sizes \\n for parties large and small. Window seating makes for excellent \\n people watching to/from the N-Judah which stops right outside. \\n I've had many fun social gatherings here, as well as gotten \\n plenty of work done thanks to neighborhood WiFi.\\n </p>\\n \"\n }],\n \"item\": [{\n \"value\": \"Crepes on Cole\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Crepes on Cole\"],\n \"org\": [\"Crepes on Cole\"],\n \"adr\": [{\n \"value\": \"San Francisco\",\n \"type\": [\"h-adr\"],\n \"properties\": {\n \"locality\": [\"San Francisco\"],\n \"name\": [\"San Francisco\"]\n }\n }]\n }\n }],\n \"category\": [\"crepe\"],\n \"url\": [\"http://example.com/crepe\"]\n }\n }],\n \"rels\": {\n \"license\": [\"http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License\"]\n },\n \"rel-urls\": {\n \"http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License\": {\n \"text\": \"Creative Commons Attribution-ShareAlike License\",\n \"rels\": [\"license\"]\n }\n }\n}","html":"<div class=\"h-review\">\n <span><span class=\"p-rating\">5</span> out of 5 stars</span>\n <h4 class=\"p-name\">Crepes on Cole is awesome</h4>\n <span class=\"p-reviewer h-card\">\n Reviewer: <span class=\"p-name\">Tantek</span> - \n </span>\n <time class=\"dt-reviewed\" datetime=\"2005-04-18\">April 18, 2005</time>\n <div class=\"e-description\">\n <p class=\"p-item h-card\">\n <span class=\"p-name p-org\">Crepes on Cole</span> is one of the best little \n creperies in <span class=\"p-adr h-adr\"><span class=\"p-locality\">San Francisco</span></span>.\n Excellent food and service. Plenty of tables in a variety of sizes \n for parties large and small. Window seating makes for excellent \n people watching to/from the N-Judah which stops right outside. \n I've had many fun social gatherings here, as well as gotten \n plenty of work done thanks to neighborhood WiFi.\n </p>\n </div>\n <p>Visit date: <span>April 2005</span></p>\n <p>Food eaten: <a class=\"p-category\" href=\"http://en.wikipedia.org/wiki/crepe\">crepe</a></p>\n <p>Permanent link for review: <a class=\"u-url\" href=\"http://example.com/crepe\">http://example.com/crepe</a></p>\n <p><a rel=\"license\" href=\"http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License\">Creative Commons Attribution-ShareAlike License</a></p>\n</div>","name":"mf-v2-h-review-vcard"},{"json":"{\n \"items\": [{\n \"type\": [\"h-review-aggregate\"],\n \"properties\": {\n \"item\": [{\n \"value\": \"Fullfrontal\",\n \"type\": [\"h-event\"],\n \"properties\": {\n \"name\": [\"Fullfrontal\"],\n \"description\": [\"A one day JavaScript Conference held in Brighton\"],\n \"start\": [\"2012-11-09\"]\n }\n }],\n \"rating\": [\"9.9\"],\n \"average\": [\"9.9\"],\n \"best\": [\"10\"],\n \"count\": [\"62\"],\n \"name\": [\"Fullfrontal\\n A one day JavaScript Conference held in Brighton\\n 9th November 2012 \\n \\n \\n \\n 9.9 out of \\n 10 \\n based on 62 reviews\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"h-review-aggregate\">\n <div class=\"p-item h-event\">\n <h3 class=\"p-name\">Fullfrontal</h3>\n <p class=\"p-description\">A one day JavaScript Conference held in Brighton</p>\n <p><time class=\"dt-start\" datetime=\"2012-11-09\">9th November 2012</time></p> \n </div> \n \n <p class=\"p-rating\">\n <span class=\"p-average value\">9.9</span> out of \n <span class=\"p-best\">10</span> \n based on <span class=\"p-count\">62</span> reviews\n </p>\n</div>","name":"mf-v2-h-review-aggregate-hevent"},{"json":"{\n \"items\": [{\n \"type\": [\"h-review-aggregate\"],\n \"properties\": {\n \"item\": [{\n \"value\": \"Mediterranean Wraps\",\n \"type\": [\"h-item\"],\n \"properties\": {\n \"name\": [\"Mediterranean Wraps\"]\n }\n }],\n \"summary\": [\"Customers flock to this small restaurant for their \\n tasty falafel and shawerma wraps and welcoming staff.\"],\n \"rating\": [\"4.5\"],\n \"name\": [\"Mediterranean Wraps\\n \\n Customers flock to this small restaurant for their \\n tasty falafel and shawerma wraps and welcoming staff.\\n \\n 4.5 out of 5\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"h-review-aggregate\">\n <h3 class=\"p-item h-item\">Mediterranean Wraps</h3>\n <span class=\"p-summary\">\n Customers flock to this small restaurant for their \n tasty falafel and shawerma wraps and welcoming staff.\n </span>\n <span class=\"p-rating\">4.5</span> out of 5 \n</div>","name":"mf-v2-h-review-aggregate-justahyperlink"},{"json":"{\n \"items\": [{\n \"type\": [\"h-review-aggregate\"],\n \"properties\": {\n \"item\": [{\n \"value\": \"Mediterranean Wraps\",\n \"type\": [\"h-card\"],\n \"properties\": {\n \"name\": [\"Mediterranean Wraps\"],\n \"street-address\": [\"433 S California Ave\"],\n \"locality\": [\"Palo Alto\"],\n \"region\": [\"CA\"],\n \"tel\": [\"(650) 321-8189\"]\n }\n }],\n \"summary\": [\"Customers flock to this small restaurant for their \\n tasty falafel and shawerma wraps and welcoming staff.\"],\n \"rating\": [\"9.2\"],\n \"average\": [\"9.2\"],\n \"best\": [\"10\"],\n \"count\": [\"17\"],\n \"name\": [\"Mediterranean Wraps\\n \\n 433 S California Ave, \\n Palo Alto, \\n CA - \\n (650) 321-8189\\n \\n \\n Customers flock to this small restaurant for their \\n tasty falafel and shawerma wraps and welcoming staff.\\n \\n 9.2 out of \\n 10 \\n based on 17 reviews\"]\n }\n }],\n \"rels\": {},\n \"rel-urls\": {}\n}","html":"<div class=\"h-review-aggregate\">\n <div class=\"p-item h-card\">\n <h3 class=\"p-name\">Mediterranean Wraps</h3>\n <p>\n <span class=\"p-street-address\">433 S California Ave</span>, \n <span class=\"p-locality\">Palo Alto</span>, \n <span class=\"p-region\">CA</span> - \n <span class=\"p-tel\">(650) 321-8189</span>\n </p>\n </div> \n <span class=\"p-summary\">Customers flock to this small restaurant for their \n tasty falafel and shawerma wraps and welcoming staff.</span>\n <span class=\"p-rating\">\n <span class=\"p-average value\">9.2</span> out of \n <span class=\"p-best\">10</span> \n based on <span class=\"p-count\">17</span> reviews\n </span>\n</div>","name":"mf-v2-h-review-aggregate-simpleproperties"},{"json":"{\n \"rels\": {\n \"bookmark\": [\n \"http://ma.tt/2015/05/beethoven-mozart-bach/\",\n \"http://ma.tt/2015/06/jefferson-on-idleness/\" \n ], \n \"category\": [\n \"http://ma.tt/category/asides/\"\n ], \n \"tag\": [\n \"http://ma.tt/category/asides/\"\n ], \n \"author\": [\n \"http://ma.tt/author/saxmatt/\"\n ]\n }, \n \"items\": [\n {\n \"type\": [\n \"h-card\"\n ], \n \"properties\": {\n \"url\": [\n \"http://ma.tt/author/saxmatt/\"\n ], \n \"name\": [\n \"Matt\"\n ]\n }\n }, \n {\n \"type\": [\n \"h-card\"\n ], \n \"properties\": {\n \"url\": [\n \"http://ma.tt/author/saxmatt/\"\n ], \n \"name\": [\n \"Matt\"\n ]\n }\n }\n ], \n \"rel-urls\": {\n \"http://ma.tt/category/asides/\": {\n \"rels\": [\n \"category\", \n \"tag\"\n ], \n \"text\": \"Asides\"\n }, \n \"http://ma.tt/author/saxmatt/\": {\n \"rels\": [\n \"author\"\n ], \n \"text\": \"Matt\", \n \"title\": \"View all posts by Matt\"\n }, \n \"http://ma.tt/2015/05/beethoven-mozart-bach/\": {\n \"rels\": [\n \"bookmark\"\n ], \n \"text\": \"May 31, 2015\", \n \"title\": \"Permalink to Beethoven, Mozart, Bach\"\n }, \n \"http://ma.tt/2015/06/jefferson-on-idleness/\": {\n \"rels\": [\n \"bookmark\"\n ], \n \"text\": \"June 2, 2015\", \n \"title\": \"Permalink to Jefferson on Idleness\"\n }\n }\n}","html":"<a href=\"http://ma.tt/2015/05/beethoven-mozart-bach/\" \n title=\"Permalink to Beethoven, Mozart, Bach\" rel=\"bookmark\">\n<time class=\"entry-date\" datetime=\"2015-05-31T22:42:00+00:00\">May 31, 2015</time></a></span>\n<a href=\"http://ma.tt/category/asides/\" rel=\"category tag\">Asides</a>\n<span class=\"author vcard\">\n<a class=\"url fn n\" href=\"http://ma.tt/author/saxmatt/\" \n title=\"View all posts by Matt\" rel=\"author\">Matt</a></span>\n<span class=\"date\"><a href=\"http://ma.tt/2015/06/jefferson-on-idleness/\" title=\"Permalink to Jefferson on Idleness\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"2015-06-02T21:26:00+00:00\">June 2, 2015</time></a></span>\n<span class=\"categories-links\"><a href=\"http://ma.tt/category/asides/\" rel=\"category tag\">Asides</a></span>\n<span class=\"author vcard\"><a class=\"url fn n\" href=\"http://ma.tt/author/saxmatt/\" title=\"View all posts by Matt\" rel=\"author\">Matt</a></span>\n","name":"mf-v2-rel-duplicate-rels"},{"json":"{\n \"items\": [],\n \"rels\": {\n \"license\": [\"http://creativecommons.org/licenses/by/2.5/\"]\n },\n \"rel-urls\": {\n \"http://creativecommons.org/licenses/by/2.5/\": {\n \"text\": \"cc by 2.5\",\n \"rels\": [\"license\"]\n }\n }\n}","html":"<a rel=\"license\" href=\"http://creativecommons.org/licenses/by/2.5/\">cc by 2.5</a>","name":"mf-v2-rel-license"},{"json":"{\n \"items\": [],\n \"rels\": {\n \"nofollow\": [\"http://microformats.org/wiki/microformats:copyrights\"]\n },\n \"rel-urls\": {\n \"http://microformats.org/wiki/microformats:copyrights\": {\n \"text\": \"Copyrights\",\n \"rels\": [\"nofollow\"]\n }\n }\n}","html":"<a rel=\"nofollow\" href=\"http://microformats.org/wiki/microformats:copyrights\">Copyrights</a>","name":"mf-v2-rel-nofollow"},{"json":"{\n \"items\": [],\n \"rels\": { \n \"author\": [ \"http://example.com/a\", \"http://example.com/b\" ],\n \"in-reply-to\": [ \"http://example.com/1\", \"http://example.com/2\" ], \n \"home\": [ \"http://example.com/fr\" ], \n \"alternate\": [ \"http://example.com/fr\" ] \n },\n \"rel-urls\": {\n \"http://example.com/a\": {\n \"rels\": [\"author\"], \n \"text\": \"author a\"\n },\n \"http://example.com/b\": {\n \"rels\": [\"author\"], \n \"text\": \"author b\"\n },\n \"http://example.com/1\": {\n \"rels\": [\"in-reply-to\"], \n \"text\": \"post 1\"\n },\n \"http://example.com/2\": {\n \"rels\": [\"in-reply-to\"], \n \"text\": \"post 2\"\n },\n \"http://example.com/fr\": {\n \"rels\": [\"alternate\", \"home\"],\n \"media\": \"handheld\", \n \"hreflang\": \"fr\", \n \"text\": \"French mobile homepage\"\n }\n }\n}","html":"<a rel=\"author\" href=\"http://example.com/a\">author a</a>\n<a rel=\"author\" href=\"http://example.com/b\">author b</a>\n<a rel=\"in-reply-to\" href=\"http://example.com/1\">post 1</a>\n<a rel=\"in-reply-to\" href=\"http://example.com/2\">post 2</a>\n<a rel=\"alternate home\"\n href=\"http://example.com/fr\"\n media=\"handheld\"\n hreflang=\"fr\">French mobile homepage</a>","name":"mf-v2-rel-rel-urls"},{"json":"{\n \"rels\": {\n \"category\": [\n \"http://ma.tt/category/asides/\"\n ], \n \"tag\": [\n \"http://ma.tt/category/asides/\"\n ]\n }, \n \"items\": [], \n \"rel-urls\": {\n \"http://ma.tt/category/asides/\": {\n \"rels\": [\n \"category\", \n \"tag\"\n ], \n \"text\": \"Asides\"\n }\n }\n}\n","html":"This is a contrived example - not found links like this in the wild:\n<a href=\"http://ma.tt/category/asides/\" rel=\"category tag\">Asides</a>\n<a href=\"http://ma.tt/category/asides/\" rel=\"category tag\">B-sides</a>\n<a href=\"http://ma.tt/category/asides/\" rel=\"category tag\">seasides</a>","name":"mf-v2-rel-varying-text-duplicate-rels"},{"json":"{\n \"items\": [],\n \"rels\": {\n \"friend\": [\"http://example.com/profile/jane\"],\n \"acquaintance\": [\"http://example.com/profile/jeo\"],\n \"contact\": [\"http://example.com/profile/lily\"],\n \"met\": [\"http://example.com/profile/oliver\"],\n \"co-worker\": [\"http://example.com/profile/emily\"],\n \"colleague\": [\"http://example.com/profile/jack\"],\n \"neighbor\": [\"http://example.com/profile/isabella\"],\n \"child\": [\"http://example.com/profile/harry\"],\n \"parent\": [\"http://example.com/profile/sophia\"],\n \"sibling\": [\"http://example.com/profile/charlie\"],\n \"spouse\": [\"http://example.com/profile/olivia\"],\n \"kin\": [\"http://example.com/profile/james\"],\n \"muse\": [\"http://example.com/profile/ava\"],\n \"crush\": [\"http://example.com/profile/joshua\"],\n \"date\": [\"http://example.com/profile/chloe\"],\n \"sweetheart\": [\"http://example.com/profile/alfie\"],\n \"me\": [\"http://example.com/profile/isla\"]\n },\n \"rel-urls\": {\n \"http://example.com/profile/jane\": {\n \"text\": \"jane\",\n \"rels\": [\"friend\"]\n },\n \"http://example.com/profile/jeo\": {\n \"text\": \"jeo\",\n \"rels\": [\"acquaintance\"]\n },\n \"http://example.com/profile/lily\": {\n \"text\": \"lily\",\n \"rels\": [\"contact\"]\n },\n \"http://example.com/profile/oliver\": {\n \"text\": \"oliver\",\n \"rels\": [\"met\"]\n },\n \"http://example.com/profile/emily\": {\n \"text\": \"emily\",\n \"rels\": [\"co-worker\"]\n },\n \"http://example.com/profile/jack\": {\n \"text\": \"jack\",\n \"rels\": [\"colleague\"]\n },\n \"http://example.com/profile/isabella\": {\n \"text\": \"isabella\",\n \"rels\": [\"neighbor\"]\n },\n \"http://example.com/profile/harry\": {\n \"text\": \"harry\",\n \"rels\": [\"child\"]\n },\n \"http://example.com/profile/sophia\": {\n \"text\": \"sophia\",\n \"rels\": [\"parent\"]\n },\n \"http://example.com/profile/charlie\": {\n \"text\": \"charlie\",\n \"rels\": [\"sibling\"]\n },\n \"http://example.com/profile/olivia\": {\n \"text\": \"olivia\",\n \"rels\": [\"spouse\"]\n },\n \"http://example.com/profile/james\": {\n \"text\": \"james\",\n \"rels\": [\"kin\"]\n },\n \"http://example.com/profile/ava\": {\n \"text\": \"ava\",\n \"rels\": [\"muse\"]\n },\n \"http://example.com/profile/joshua\": {\n \"text\": \"joshua\",\n \"rels\": [\"crush\"]\n },\n \"http://example.com/profile/chloe\": {\n \"text\": \"chloe\",\n \"rels\": [\"date\"]\n },\n \"http://example.com/profile/alfie\": {\n \"text\": \"alfie\",\n \"rels\": [\"sweetheart\"]\n },\n \"http://example.com/profile/isla\": {\n \"text\": \"isla\",\n \"rels\": [\"me\"]\n }\n }\n}\n","html":"<ul>\n <li><a rel=\"friend\" href=\"http://example.com/profile/jane\">jane</a></li>\n <li><a rel=\"acquaintance\" href=\"http://example.com/profile/jeo\">jeo</a></li>\n <li><a rel=\"contact\" href=\"http://example.com/profile/lily\">lily</a></li>\n <li><a rel=\"met\" href=\"http://example.com/profile/oliver\">oliver</a></li>\n <li><a rel=\"co-worker\" href=\"http://example.com/profile/emily\">emily</a></li>\n <li><a rel=\"colleague\" href=\"http://example.com/profile/jack\">jack</a></li>\n <li><a rel=\"neighbor\" href=\"http://example.com/profile/isabella\">isabella</a></li>\n <li><a rel=\"child\" href=\"http://example.com/profile/harry\">harry</a></li>\n <li><a rel=\"parent\" href=\"http://example.com/profile/sophia\">sophia</a></li>\n <li><a rel=\"sibling\" href=\"http://example.com/profile/charlie\">charlie</a></li>\n <li><a rel=\"spouse\" href=\"http://example.com/profile/olivia\">olivia</a></li>\n <li><a rel=\"kin\" href=\"http://example.com/profile/james\">james</a></li>\n <li><a rel=\"muse\" href=\"http://example.com/profile/ava\">ava</a></li>\n <li><a rel=\"crush\" href=\"http://example.com/profile/joshua\">joshua</a></li>\n <li><a rel=\"date\" href=\"http://example.com/profile/chloe\">chloe</a></li>\n <li><a rel=\"sweetheart\" href=\"http://example.com/profile/alfie\">alfie</a></li>\n <li><a rel=\"me\" href=\"http://example.com/profile/isla\">isla</a></li>\n</ul>","name":"mf-v2-rel-xfn-all"},{"json":"{\n \"items\": [],\n \"rels\": {\n \"me\": [\"http://twitter.com/glennjones\", \"http://delicious.com/glennjonesnet/\", \"https://plus.google.com/u/0/105161464208920272734/about\", \"http://lanyrd.com/people/glennjones/\", \"http://github.com/glennjones\", \"http://www.flickr.com/photos/glennjonesnet/\", \"http://www.linkedin.com/in/glennjones\", \"http://www.slideshare.net/glennjones/presentations\"]\n },\n \"rel-urls\": {\n \"http://twitter.com/glennjones\": {\n \"text\": \"twitter\",\n \"rels\": [\"me\"]\n },\n \"http://delicious.com/glennjonesnet/\": {\n \"text\": \"delicious\",\n \"rels\": [\"me\"]\n },\n \"https://plus.google.com/u/0/105161464208920272734/about\": {\n \"text\": \"google+\",\n \"rels\": [\"me\"]\n },\n \"http://lanyrd.com/people/glennjones/\": {\n \"text\": \"lanyrd\",\n \"rels\": [\"me\"]\n },\n \"http://github.com/glennjones\": {\n \"text\": \"github\",\n \"rels\": [\"me\"]\n },\n \"http://www.flickr.com/photos/glennjonesnet/\": {\n \"text\": \"flickr\",\n \"rels\": [\"me\"]\n },\n \"http://www.linkedin.com/in/glennjones\": {\n \"text\": \"linkedin\",\n \"rels\": [\"me\"]\n },\n \"http://www.slideshare.net/glennjones/presentations\": {\n \"text\": \"slideshare\",\n \"rels\": [\"me\"]\n }\n }\n}\n","html":"<ul>\n <li><a rel=\"me\" href=\"http://twitter.com/glennjones\">twitter</a></li>\n <li><a rel=\"me\" href=\"http://delicious.com/glennjonesnet/\">delicious</a></li>\n <li><a rel=\"me\" href=\"https://plus.google.com/u/0/105161464208920272734/about\">google+</a></li>\n <li><a rel=\"me\" href=\"http://lanyrd.com/people/glennjones/\">lanyrd</a></li>\n <li><a rel=\"me\" href=\"http://github.com/glennjones\">github</a></li>\n <li><a rel=\"me\" href=\"http://www.flickr.com/photos/glennjonesnet/\">flickr</a></li>\n <li><a rel=\"me\" href=\"http://www.linkedin.com/in/glennjones\">linkedin</a></li>\n <li><a rel=\"me\" href=\"http://www.slideshare.net/glennjones/presentations\">slideshare</a></li>\n</ul>","name":"mf-v2-rel-xfn-elsewhere"}]}
diff --git a/toolkit/components/microformats/test/static/javascript/deep-diff-0.3.1.min.js b/toolkit/components/microformats/test/static/javascript/deep-diff-0.3.1.min.js
deleted file mode 100644
index e200019c0f..0000000000
--- a/toolkit/components/microformats/test/static/javascript/deep-diff-0.3.1.min.js
+++ /dev/null
@@ -1,5 +0,0 @@
-/*!
- * deep-diff.
- * Licensed under the MIT License.
- */
-(function(e,t){"use strict";if(typeof define==="function"&&define.amd){define([],t)}else if(typeof exports==="object"){module.exports=t()}else{e.DeepDiff=t()}})(this,function(e){"use strict";var t,n,r=[];if(typeof global==="object"&&global){t=global}else if(typeof window!=="undefined"){t=window}else{t={}}n=t.DeepDiff;if(n){r.push(function(){if("undefined"!==typeof n&&t.DeepDiff===p){t.DeepDiff=n;n=e}})}function a(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}function i(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:true});if(t&&t.length){Object.defineProperty(this,"path",{value:t,enumerable:true})}}function f(e,t,n){f.super_.call(this,"E",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true});Object.defineProperty(this,"rhs",{value:n,enumerable:true})}a(f,i);function u(e,t){u.super_.call(this,"N",e);Object.defineProperty(this,"rhs",{value:t,enumerable:true})}a(u,i);function l(e,t){l.super_.call(this,"D",e);Object.defineProperty(this,"lhs",{value:t,enumerable:true})}a(l,i);function s(e,t,n){s.super_.call(this,"A",e);Object.defineProperty(this,"index",{value:t,enumerable:true});Object.defineProperty(this,"item",{value:n,enumerable:true})}a(s,i);function h(e,t,n){var r=e.slice((n||t)+1||e.length);e.length=t<0?e.length+t:t;e.push.apply(e,r);return e}function c(e){var t=typeof e;if(t!=="object"){return t}if(e===Math){return"math"}else if(e===null){return"null"}else if(Array.isArray(e)){return"array"}else if(e instanceof Date){return"date"}else if(/^\/.*\//.test(e.toString())){return"regexp"}return"object"}function o(t,n,r,a,i,p,b){i=i||[];var d=i.slice(0);if(typeof p!=="undefined"){if(a&&a(d,p,{lhs:t,rhs:n})){return}d.push(p)}var v=typeof t;var y=typeof n;if(v==="undefined"){if(y!=="undefined"){r(new u(d,n))}}else if(y==="undefined"){r(new l(d,t))}else if(c(t)!==c(n)){r(new f(d,t,n))}else if(t instanceof Date&&n instanceof Date&&t-n!==0){r(new f(d,t,n))}else if(v==="object"&&t!==null&&n!==null){b=b||[];if(b.indexOf(t)<0){b.push(t);if(Array.isArray(t)){var k,m=t.length;for(k=0;k<t.length;k++){if(k>=n.length){r(new s(d,k,new l(e,t[k])))}else{o(t[k],n[k],r,a,d,k,b)}}while(k<n.length){r(new s(d,k,new u(e,n[k++])))}}else{var g=Object.keys(t);var w=Object.keys(n);g.forEach(function(i,f){var u=w.indexOf(i);if(u>=0){o(t[i],n[i],r,a,d,i,b);w=h(w,u)}else{o(t[i],e,r,a,d,i,b)}});w.forEach(function(t){o(e,n[t],r,a,d,t,b)})}b.length=b.length-1}}else if(t!==n){if(!(v==="number"&&isNaN(t)&&isNaN(n))){r(new f(d,t,n))}}}function p(t,n,r,a){a=a||[];o(t,n,function(e){if(e){a.push(e)}},r);return a.length?a:e}function b(e,t,n){if(n.path&&n.path.length){var r=e[t],a,i=n.path.length-1;for(a=0;a<i;a++){r=r[n.path[a]]}switch(n.kind){case"A":b(r[n.path[a]],n.index,n.item);break;case"D":delete r[n.path[a]];break;case"E":case"N":r[n.path[a]]=n.rhs;break}}else{switch(n.kind){case"A":b(e[t],n.index,n.item);break;case"D":e=h(e,t);break;case"E":case"N":e[t]=n.rhs;break}}return e}function d(e,t,n){if(e&&t&&n&&n.kind){var r=e,a=-1,i=n.path.length-1;while(++a<i){if(typeof r[n.path[a]]==="undefined"){r[n.path[a]]=typeof n.path[a]==="number"?[]:{}}r=r[n.path[a]]}switch(n.kind){case"A":b(r[n.path[a]],n.index,n.item);break;case"D":delete r[n.path[a]];break;case"E":case"N":r[n.path[a]]=n.rhs;break}}}function v(e,t,n){if(n.path&&n.path.length){var r=e[t],a,i=n.path.length-1;for(a=0;a<i;a++){r=r[n.path[a]]}switch(n.kind){case"A":v(r[n.path[a]],n.index,n.item);break;case"D":r[n.path[a]]=n.lhs;break;case"E":r[n.path[a]]=n.lhs;break;case"N":delete r[n.path[a]];break}}else{switch(n.kind){case"A":v(e[t],n.index,n.item);break;case"D":e[t]=n.lhs;break;case"E":e[t]=n.lhs;break;case"N":e=h(e,t);break}}return e}function y(e,t,n){if(e&&t&&n&&n.kind){var r=e,a,i;i=n.path.length-1;for(a=0;a<i;a++){if(typeof r[n.path[a]]==="undefined"){r[n.path[a]]={}}r=r[n.path[a]]}switch(n.kind){case"A":v(r[n.path[a]],n.index,n.item);break;case"D":r[n.path[a]]=n.lhs;break;case"E":r[n.path[a]]=n.lhs;break;case"N":delete r[n.path[a]];break}}}function k(e,t,n){if(e&&t){var r=function(r){if(!n||n(e,t,r)){d(e,t,r)}};o(e,t,r)}}Object.defineProperties(p,{diff:{value:p,enumerable:true},observableDiff:{value:o,enumerable:true},applyDiff:{value:k,enumerable:true},applyChange:{value:d,enumerable:true},revertChange:{value:y,enumerable:true},isConflict:{value:function(){return"undefined"!==typeof n},enumerable:true},noConflict:{value:function(){if(r){r.forEach(function(e){e()});r=null}return p},enumerable:true}});return p});
diff --git a/toolkit/components/microformats/test/static/javascript/mocha.js b/toolkit/components/microformats/test/static/javascript/mocha.js
deleted file mode 100644
index 100850e5d3..0000000000
--- a/toolkit/components/microformats/test/static/javascript/mocha.js
+++ /dev/null
@@ -1,6573 +0,0 @@
-(function(){
-
-// CommonJS require()
-
-function require(p){
- var path = require.resolve(p)
- , mod = require.modules[path];
- if (!mod) throw new Error('failed to require "' + p + '"');
- if (!mod.exports) {
- mod.exports = {};
- mod.call(mod.exports, mod, mod.exports, require.relative(path));
- }
- return mod.exports;
- }
-
-require.modules = {};
-
-require.resolve = function (path){
- var orig = path
- , reg = path + '.js'
- , index = path + '/index.js';
- return require.modules[reg] && reg
- || require.modules[index] && index
- || orig;
- };
-
-require.register = function (path, fn){
- require.modules[path] = fn;
- };
-
-require.relative = function (parent) {
- return function(p){
- if ('.' != p.charAt(0)) return require(p);
-
- var path = parent.split('/')
- , segs = p.split('/');
- path.pop();
-
- for (var i = 0; i < segs.length; i++) {
- var seg = segs[i];
- if ('..' == seg) path.pop();
- else if ('.' != seg) path.push(seg);
- }
-
- return require(path.join('/'));
- };
- };
-
-
-require.register("browser/debug.js", function(module, exports, require){
-module.exports = function(type){
- return function(){
- }
-};
-
-}); // module: browser/debug.js
-
-require.register("browser/diff.js", function(module, exports, require){
-/* See LICENSE file for terms of use */
-
-/*
- * Text diff implementation.
- *
- * This library supports the following APIS:
- * JsDiff.diffChars: Character by character diff
- * JsDiff.diffWords: Word (as defined by \b regex) diff which ignores whitespace
- * JsDiff.diffLines: Line based diff
- *
- * JsDiff.diffCss: Diff targeted at CSS content
- *
- * These methods are based on the implementation proposed in
- * "An O(ND) Difference Algorithm and its Variations" (Myers, 1986).
- * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927
- */
-var JsDiff = (function() {
- /*jshint maxparams: 5*/
- function clonePath(path) {
- return { newPos: path.newPos, components: path.components.slice(0) };
- }
- function removeEmpty(array) {
- var ret = [];
- for (var i = 0; i < array.length; i++) {
- if (array[i]) {
- ret.push(array[i]);
- }
- }
- return ret;
- }
- function escapeHTML(s) {
- var n = s;
- n = n.replace(/&/g, '&amp;');
- n = n.replace(/</g, '&lt;');
- n = n.replace(/>/g, '&gt;');
- n = n.replace(/"/g, '&quot;');
-
- return n;
- }
-
- var Diff = function(ignoreWhitespace) {
- this.ignoreWhitespace = ignoreWhitespace;
- };
- Diff.prototype = {
- diff: function(oldString, newString) {
- // Handle the identity case (this is due to unrolling editLength == 0
- if (newString === oldString) {
- return [{ value: newString }];
- }
- if (!newString) {
- return [{ value: oldString, removed: true }];
- }
- if (!oldString) {
- return [{ value: newString, added: true }];
- }
-
- newString = this.tokenize(newString);
- oldString = this.tokenize(oldString);
-
- var newLen = newString.length, oldLen = oldString.length;
- var maxEditLength = newLen + oldLen;
- var bestPath = [{ newPos: -1, components: [] }];
-
- // Seed editLength = 0
- var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
- if (bestPath[0].newPos+1 >= newLen && oldPos+1 >= oldLen) {
- return bestPath[0].components;
- }
-
- for (var editLength = 1; editLength <= maxEditLength; editLength++) {
- for (var diagonalPath = -1*editLength; diagonalPath <= editLength; diagonalPath+=2) {
- var basePath;
- var addPath = bestPath[diagonalPath-1],
- removePath = bestPath[diagonalPath+1];
- oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
- if (addPath) {
- // No one else is going to attempt to use this value, clear it
- bestPath[diagonalPath-1] = undefined;
- }
-
- var canAdd = addPath && addPath.newPos+1 < newLen;
- var canRemove = removePath && 0 <= oldPos && oldPos < oldLen;
- if (!canAdd && !canRemove) {
- bestPath[diagonalPath] = undefined;
- continue;
- }
-
- // Select the diagonal that we want to branch from. We select the prior
- // path whose position in the new string is the farthest from the origin
- // and does not pass the bounds of the diff graph
- if (!canAdd || (canRemove && addPath.newPos < removePath.newPos)) {
- basePath = clonePath(removePath);
- this.pushComponent(basePath.components, oldString[oldPos], undefined, true);
- } else {
- basePath = clonePath(addPath);
- basePath.newPos++;
- this.pushComponent(basePath.components, newString[basePath.newPos], true, undefined);
- }
-
- oldPos = this.extractCommon(basePath, newString, oldString, diagonalPath);
-
- if (basePath.newPos+1 >= newLen && oldPos+1 >= oldLen) {
- return basePath.components;
- } else {
- bestPath[diagonalPath] = basePath;
- }
- }
- }
- },
-
- pushComponent: function(components, value, added, removed) {
- var last = components[components.length-1];
- if (last && last.added === added && last.removed === removed) {
- // We need to clone here as the component clone operation is just
- // as shallow array clone
- components[components.length-1] =
- {value: this.join(last.value, value), added: added, removed: removed };
- } else {
- components.push({value: value, added: added, removed: removed });
- }
- },
- extractCommon: function(basePath, newString, oldString, diagonalPath) {
- var newLen = newString.length,
- oldLen = oldString.length,
- newPos = basePath.newPos,
- oldPos = newPos - diagonalPath;
- while (newPos+1 < newLen && oldPos+1 < oldLen && this.equals(newString[newPos+1], oldString[oldPos+1])) {
- newPos++;
- oldPos++;
-
- this.pushComponent(basePath.components, newString[newPos], undefined, undefined);
- }
- basePath.newPos = newPos;
- return oldPos;
- },
-
- equals: function(left, right) {
- var reWhitespace = /\S/;
- if (this.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right)) {
- return true;
- } else {
- return left === right;
- }
- },
- join: function(left, right) {
- return left + right;
- },
- tokenize: function(value) {
- return value;
- }
- };
-
- var CharDiff = new Diff();
-
- var WordDiff = new Diff(true);
- var WordWithSpaceDiff = new Diff();
- WordDiff.tokenize = WordWithSpaceDiff.tokenize = function(value) {
- return removeEmpty(value.split(/(\s+|\b)/));
- };
-
- var CssDiff = new Diff(true);
- CssDiff.tokenize = function(value) {
- return removeEmpty(value.split(/([{}:;,]|\s+)/));
- };
-
- var LineDiff = new Diff();
- LineDiff.tokenize = function(value) {
- var retLines = [],
- lines = value.split(/^/m);
-
- for(var i = 0; i < lines.length; i++) {
- var line = lines[i],
- lastLine = lines[i - 1];
-
- // Merge lines that may contain windows new lines
- if (line == '\n' && lastLine && lastLine[lastLine.length - 1] === '\r') {
- retLines[retLines.length - 1] += '\n';
- } else if (line) {
- retLines.push(line);
- }
- }
-
- return retLines;
- };
-
- return {
- Diff: Diff,
-
- diffChars: function(oldStr, newStr) { return CharDiff.diff(oldStr, newStr); },
- diffWords: function(oldStr, newStr) { return WordDiff.diff(oldStr, newStr); },
- diffWordsWithSpace: function(oldStr, newStr) { return WordWithSpaceDiff.diff(oldStr, newStr); },
- diffLines: function(oldStr, newStr) { return LineDiff.diff(oldStr, newStr); },
-
- diffCss: function(oldStr, newStr) { return CssDiff.diff(oldStr, newStr); },
-
- createPatch: function(fileName, oldStr, newStr, oldHeader, newHeader) {
- var ret = [];
-
- ret.push('Index: ' + fileName);
- ret.push('===================================================================');
- ret.push('--- ' + fileName + (typeof oldHeader === 'undefined' ? '' : '\t' + oldHeader));
- ret.push('+++ ' + fileName + (typeof newHeader === 'undefined' ? '' : '\t' + newHeader));
-
- var diff = LineDiff.diff(oldStr, newStr);
- if (!diff[diff.length-1].value) {
- diff.pop(); // Remove trailing newline add
- }
- diff.push({value: '', lines: []}); // Append an empty value to make cleanup easier
-
- function contextLines(lines) {
- return lines.map(function(entry) { return ' ' + entry; });
- }
- function eofNL(curRange, i, current) {
- var last = diff[diff.length-2],
- isLast = i === diff.length-2,
- isLastOfType = i === diff.length-3 && (current.added !== last.added || current.removed !== last.removed);
-
- // Figure out if this is the last line for the given file and missing NL
- if (!/\n$/.test(current.value) && (isLast || isLastOfType)) {
- curRange.push('\\ No newline at end of file');
- }
- }
-
- var oldRangeStart = 0, newRangeStart = 0, curRange = [],
- oldLine = 1, newLine = 1;
- for (var i = 0; i < diff.length; i++) {
- var current = diff[i],
- lines = current.lines || current.value.replace(/\n$/, '').split('\n');
- current.lines = lines;
-
- if (current.added || current.removed) {
- if (!oldRangeStart) {
- var prev = diff[i-1];
- oldRangeStart = oldLine;
- newRangeStart = newLine;
-
- if (prev) {
- curRange = contextLines(prev.lines.slice(-4));
- oldRangeStart -= curRange.length;
- newRangeStart -= curRange.length;
- }
- }
- curRange.push.apply(curRange, lines.map(function(entry) { return (current.added?'+':'-') + entry; }));
- eofNL(curRange, i, current);
-
- if (current.added) {
- newLine += lines.length;
- } else {
- oldLine += lines.length;
- }
- } else {
- if (oldRangeStart) {
- // Close out any changes that have been output (or join overlapping)
- if (lines.length <= 8 && i < diff.length-2) {
- // Overlapping
- curRange.push.apply(curRange, contextLines(lines));
- } else {
- // end the range and output
- var contextSize = Math.min(lines.length, 4);
- ret.push(
- '@@ -' + oldRangeStart + ',' + (oldLine-oldRangeStart+contextSize)
- + ' +' + newRangeStart + ',' + (newLine-newRangeStart+contextSize)
- + ' @@');
- ret.push.apply(ret, curRange);
- ret.push.apply(ret, contextLines(lines.slice(0, contextSize)));
- if (lines.length <= 4) {
- eofNL(ret, i, current);
- }
-
- oldRangeStart = 0; newRangeStart = 0; curRange = [];
- }
- }
- oldLine += lines.length;
- newLine += lines.length;
- }
- }
-
- return ret.join('\n') + '\n';
- },
-
- applyPatch: function(oldStr, uniDiff) {
- var diffstr = uniDiff.split('\n');
- var diff = [];
- var remEOFNL = false,
- addEOFNL = false;
-
- for (var i = (diffstr[0][0]==='I'?4:0); i < diffstr.length; i++) {
- if(diffstr[i][0] === '@') {
- var meh = diffstr[i].split(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/);
- diff.unshift({
- start:meh[3],
- oldlength:meh[2],
- oldlines:[],
- newlength:meh[4],
- newlines:[]
- });
- } else if(diffstr[i][0] === '+') {
- diff[0].newlines.push(diffstr[i].substr(1));
- } else if(diffstr[i][0] === '-') {
- diff[0].oldlines.push(diffstr[i].substr(1));
- } else if(diffstr[i][0] === ' ') {
- diff[0].newlines.push(diffstr[i].substr(1));
- diff[0].oldlines.push(diffstr[i].substr(1));
- } else if(diffstr[i][0] === '\\') {
- if (diffstr[i-1][0] === '+') {
- remEOFNL = true;
- } else if(diffstr[i-1][0] === '-') {
- addEOFNL = true;
- }
- }
- }
-
- var str = oldStr.split('\n');
- for (i = diff.length - 1; i >= 0; i--) {
- var d = diff[i];
- for (var j = 0; j < d.oldlength; j++) {
- if(str[d.start-1+j] !== d.oldlines[j]) {
- return false;
- }
- }
- Array.prototype.splice.apply(str,[d.start-1,+d.oldlength].concat(d.newlines));
- }
-
- if (remEOFNL) {
- while (!str[str.length-1]) {
- str.pop();
- }
- } else if (addEOFNL) {
- str.push('');
- }
- return str.join('\n');
- },
-
- convertChangesToXML: function(changes){
- var ret = [];
- for ( var i = 0; i < changes.length; i++) {
- var change = changes[i];
- if (change.added) {
- ret.push('<ins>');
- } else if (change.removed) {
- ret.push('<del>');
- }
-
- ret.push(escapeHTML(change.value));
-
- if (change.added) {
- ret.push('</ins>');
- } else if (change.removed) {
- ret.push('</del>');
- }
- }
- return ret.join('');
- },
-
- // See: http://code.google.com/p/google-diff-match-patch/wiki/API
- convertChangesToDMP: function(changes){
- var ret = [], change;
- for ( var i = 0; i < changes.length; i++) {
- change = changes[i];
- var order = 0;
- if (change.added) {
- order = 1;
- } else if (change.removed) {
- order = -1;
- }
- ret.push([order, change.value]);
- }
- return ret;
- }
- };
-})();
-
-if (typeof module !== 'undefined') {
- module.exports = JsDiff;
-}
-
-}); // module: browser/diff.js
-
-require.register("browser/escape-string-regexp.js", function(module, exports, require){
-'use strict';
-
-var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
-
-module.exports = function (str) {
- if (typeof str !== 'string') {
- throw new TypeError('Expected a string');
- }
-
- return str.replace(matchOperatorsRe, '\\$&');
-};
-
-}); // module: browser/escape-string-regexp.js
-
-require.register("browser/events.js", function(module, exports, require){
-/**
- * Module exports.
- */
-
-exports.EventEmitter = EventEmitter;
-
-/**
- * Check if `obj` is an array.
- */
-
-function isArray(obj) {
- return '[object Array]' == {}.toString.call(obj);
-}
-
-/**
- * Event emitter constructor.
- *
- * @api public
- */
-
-function EventEmitter(){}
-
-/**
- * Adds a listener.
- *
- * @api public
- */
-
-EventEmitter.prototype.on = function (name, fn) {
- if (!this.$events) {
- this.$events = {};
- }
-
- if (!this.$events[name]) {
- this.$events[name] = fn;
- } else if (isArray(this.$events[name])) {
- this.$events[name].push(fn);
- } else {
- this.$events[name] = [this.$events[name], fn];
- }
-
- return this;
-};
-
-EventEmitter.prototype.addListener = EventEmitter.prototype.on;
-
-/**
- * Adds a volatile listener.
- *
- * @api public
- */
-
-EventEmitter.prototype.once = function (name, fn) {
- var self = this;
-
- function on () {
- self.removeListener(name, on);
- fn.apply(this, arguments);
- }
-
- on.listener = fn;
- this.on(name, on);
-
- return this;
-};
-
-/**
- * Removes a listener.
- *
- * @api public
- */
-
-EventEmitter.prototype.removeListener = function (name, fn) {
- if (this.$events && this.$events[name]) {
- var list = this.$events[name];
-
- if (isArray(list)) {
- var pos = -1;
-
- for (var i = 0, l = list.length; i < l; i++) {
- if (list[i] === fn || (list[i].listener && list[i].listener === fn)) {
- pos = i;
- break;
- }
- }
-
- if (pos < 0) {
- return this;
- }
-
- list.splice(pos, 1);
-
- if (!list.length) {
- delete this.$events[name];
- }
- } else if (list === fn || (list.listener && list.listener === fn)) {
- delete this.$events[name];
- }
- }
-
- return this;
-};
-
-/**
- * Removes all listeners for an event.
- *
- * @api public
- */
-
-EventEmitter.prototype.removeAllListeners = function (name) {
- if (name === undefined) {
- this.$events = {};
- return this;
- }
-
- if (this.$events && this.$events[name]) {
- this.$events[name] = null;
- }
-
- return this;
-};
-
-/**
- * Gets all listeners for a certain event.
- *
- * @api public
- */
-
-EventEmitter.prototype.listeners = function (name) {
- if (!this.$events) {
- this.$events = {};
- }
-
- if (!this.$events[name]) {
- this.$events[name] = [];
- }
-
- if (!isArray(this.$events[name])) {
- this.$events[name] = [this.$events[name]];
- }
-
- return this.$events[name];
-};
-
-/**
- * Emits an event.
- *
- * @api public
- */
-
-EventEmitter.prototype.emit = function (name) {
- if (!this.$events) {
- return false;
- }
-
- var handler = this.$events[name];
-
- if (!handler) {
- return false;
- }
-
- var args = [].slice.call(arguments, 1);
-
- if ('function' == typeof handler) {
- handler.apply(this, args);
- } else if (isArray(handler)) {
- var listeners = handler.slice();
-
- for (var i = 0, l = listeners.length; i < l; i++) {
- listeners[i].apply(this, args);
- }
- } else {
- return false;
- }
-
- return true;
-};
-
-}); // module: browser/events.js
-
-require.register("browser/fs.js", function(module, exports, require){
-
-}); // module: browser/fs.js
-
-require.register("browser/glob.js", function(module, exports, require){
-
-}); // module: browser/glob.js
-
-require.register("browser/path.js", function(module, exports, require){
-
-}); // module: browser/path.js
-
-require.register("browser/progress.js", function(module, exports, require){
-/**
- * Expose `Progress`.
- */
-
-module.exports = Progress;
-
-/**
- * Initialize a new `Progress` indicator.
- */
-
-function Progress() {
- this.percent = 0;
- this.size(0);
- this.fontSize(11);
- this.font('helvetica, arial, sans-serif');
-}
-
-/**
- * Set progress size to `n`.
- *
- * @param {Number} n
- * @return {Progress} for chaining
- * @api public
- */
-
-Progress.prototype.size = function(n){
- this._size = n;
- return this;
-};
-
-/**
- * Set text to `str`.
- *
- * @param {String} str
- * @return {Progress} for chaining
- * @api public
- */
-
-Progress.prototype.text = function(str){
- this._text = str;
- return this;
-};
-
-/**
- * Set font size to `n`.
- *
- * @param {Number} n
- * @return {Progress} for chaining
- * @api public
- */
-
-Progress.prototype.fontSize = function(n){
- this._fontSize = n;
- return this;
-};
-
-/**
- * Set font `family`.
- *
- * @param {String} family
- * @return {Progress} for chaining
- */
-
-Progress.prototype.font = function(family){
- this._font = family;
- return this;
-};
-
-/**
- * Update percentage to `n`.
- *
- * @param {Number} n
- * @return {Progress} for chaining
- */
-
-Progress.prototype.update = function(n){
- this.percent = n;
- return this;
-};
-
-/**
- * Draw on `ctx`.
- *
- * @param {CanvasRenderingContext2d} ctx
- * @return {Progress} for chaining
- */
-
-Progress.prototype.draw = function(ctx){
- try {
- var percent = Math.min(this.percent, 100)
- , size = this._size
- , half = size / 2
- , x = half
- , y = half
- , rad = half - 1
- , fontSize = this._fontSize;
-
- ctx.font = fontSize + 'px ' + this._font;
-
- var angle = Math.PI * 2 * (percent / 100);
- ctx.clearRect(0, 0, size, size);
-
- // outer circle
- ctx.strokeStyle = '#9f9f9f';
- ctx.beginPath();
- ctx.arc(x, y, rad, 0, angle, false);
- ctx.stroke();
-
- // inner circle
- ctx.strokeStyle = '#eee';
- ctx.beginPath();
- ctx.arc(x, y, rad - 1, 0, angle, true);
- ctx.stroke();
-
- // text
- var text = this._text || (percent | 0) + '%'
- , w = ctx.measureText(text).width;
-
- ctx.fillText(
- text
- , x - w / 2 + 1
- , y + fontSize / 2 - 1);
- } catch (ex) {} //don't fail if we can't render progress
- return this;
-};
-
-}); // module: browser/progress.js
-
-require.register("browser/tty.js", function(module, exports, require){
-exports.isatty = function(){
- return true;
-};
-
-exports.getWindowSize = function(){
- if ('innerHeight' in global) {
- return [global.innerHeight, global.innerWidth];
- } else {
- // In a Web Worker, the DOM Window is not available.
- return [640, 480];
- }
-};
-
-}); // module: browser/tty.js
-
-require.register("context.js", function(module, exports, require){
-/**
- * Expose `Context`.
- */
-
-module.exports = Context;
-
-/**
- * Initialize a new `Context`.
- *
- * @api private
- */
-
-function Context(){}
-
-/**
- * Set or get the context `Runnable` to `runnable`.
- *
- * @param {Runnable} runnable
- * @return {Context}
- * @api private
- */
-
-Context.prototype.runnable = function(runnable){
- if (0 == arguments.length) return this._runnable;
- this.test = this._runnable = runnable;
- return this;
-};
-
-/**
- * Set test timeout `ms`.
- *
- * @param {Number} ms
- * @return {Context} self
- * @api private
- */
-
-Context.prototype.timeout = function(ms){
- if (arguments.length === 0) return this.runnable().timeout();
- this.runnable().timeout(ms);
- return this;
-};
-
-/**
- * Set test timeout `enabled`.
- *
- * @param {Boolean} enabled
- * @return {Context} self
- * @api private
- */
-
-Context.prototype.enableTimeouts = function (enabled) {
- this.runnable().enableTimeouts(enabled);
- return this;
-};
-
-
-/**
- * Set test slowness threshold `ms`.
- *
- * @param {Number} ms
- * @return {Context} self
- * @api private
- */
-
-Context.prototype.slow = function(ms){
- this.runnable().slow(ms);
- return this;
-};
-
-/**
- * Mark a test as skipped.
- *
- * @return {Context} self
- * @api private
- */
-
-Context.prototype.skip = function(){
- this.runnable().skip();
- return this;
-};
-
-/**
- * Inspect the context void of `._runnable`.
- *
- * @return {String}
- * @api private
- */
-
-Context.prototype.inspect = function(){
- return JSON.stringify(this, function(key, val){
- if ('_runnable' == key) return undefined;
- if ('test' == key) return undefined;
- return val;
- }, 2);
-};
-
-}); // module: context.js
-
-require.register("hook.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Runnable = require('./runnable');
-
-/**
- * Expose `Hook`.
- */
-
-module.exports = Hook;
-
-/**
- * Initialize a new `Hook` with the given `title` and callback `fn`.
- *
- * @param {String} title
- * @param {Function} fn
- * @api private
- */
-
-function Hook(title, fn) {
- Runnable.call(this, title, fn);
- this.type = 'hook';
-}
-
-/**
- * Inherit from `Runnable.prototype`.
- */
-
-function F(){}
-F.prototype = Runnable.prototype;
-Hook.prototype = new F;
-Hook.prototype.constructor = Hook;
-
-
-/**
- * Get or set the test `err`.
- *
- * @param {Error} err
- * @return {Error}
- * @api public
- */
-
-Hook.prototype.error = function(err){
- if (0 == arguments.length) {
- err = this._error;
- this._error = null;
- return err;
- }
-
- this._error = err;
-};
-
-}); // module: hook.js
-
-require.register("interfaces/bdd.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Suite = require('../suite')
- , Test = require('../test')
- , utils = require('../utils')
- , escapeRe = require('browser/escape-string-regexp');
-
-/**
- * BDD-style interface:
- *
- * describe('Array', function(){
- * describe('#indexOf()', function(){
- * it('should return -1 when not present', function(){
- *
- * });
- *
- * it('should return the index when present', function(){
- *
- * });
- * });
- * });
- *
- */
-
-module.exports = function(suite){
- var suites = [suite];
-
- suite.on('pre-require', function(context, file, mocha){
-
- var common = require('./common')(suites, context);
-
- context.before = common.before;
- context.after = common.after;
- context.beforeEach = common.beforeEach;
- context.afterEach = common.afterEach;
- context.run = mocha.options.delay && common.runWithSuite(suite);
- /**
- * Describe a "suite" with the given `title`
- * and callback `fn` containing nested suites
- * and/or tests.
- */
-
- context.describe = context.context = function(title, fn){
- var suite = Suite.create(suites[0], title);
- suite.file = file;
- suites.unshift(suite);
- fn.call(suite);
- suites.shift();
- return suite;
- };
-
- /**
- * Pending describe.
- */
-
- context.xdescribe =
- context.xcontext =
- context.describe.skip = function(title, fn){
- var suite = Suite.create(suites[0], title);
- suite.pending = true;
- suites.unshift(suite);
- fn.call(suite);
- suites.shift();
- };
-
- /**
- * Exclusive suite.
- */
-
- context.describe.only = function(title, fn){
- var suite = context.describe(title, fn);
- mocha.grep(suite.fullTitle());
- return suite;
- };
-
- /**
- * Describe a specification or test-case
- * with the given `title` and callback `fn`
- * acting as a thunk.
- */
-
- context.it = context.specify = function(title, fn){
- var suite = suites[0];
- if (suite.pending) fn = null;
- var test = new Test(title, fn);
- test.file = file;
- suite.addTest(test);
- return test;
- };
-
- /**
- * Exclusive test-case.
- */
-
- context.it.only = function(title, fn){
- var test = context.it(title, fn);
- var reString = '^' + escapeRe(test.fullTitle()) + '$';
- mocha.grep(new RegExp(reString));
- return test;
- };
-
- /**
- * Pending test case.
- */
-
- context.xit =
- context.xspecify =
- context.it.skip = function(title){
- context.it(title);
- };
-
- });
-};
-
-}); // module: interfaces/bdd.js
-
-require.register("interfaces/common.js", function(module, exports, require){
-/**
- * Functions common to more than one interface
- * @module lib/interfaces/common
- */
-
-'use strict';
-
-module.exports = function (suites, context) {
-
- return {
- /**
- * This is only present if flag --delay is passed into Mocha. It triggers
- * root suite execution. Returns a function which runs the root suite.
- */
- runWithSuite: function runWithSuite(suite) {
- return function run() {
- suite.run();
- };
- },
-
- /**
- * Execute before running tests.
- */
- before: function (name, fn) {
- suites[0].beforeAll(name, fn);
- },
-
- /**
- * Execute after running tests.
- */
- after: function (name, fn) {
- suites[0].afterAll(name, fn);
- },
-
- /**
- * Execute before each test case.
- */
- beforeEach: function (name, fn) {
- suites[0].beforeEach(name, fn);
- },
-
- /**
- * Execute after each test case.
- */
- afterEach: function (name, fn) {
- suites[0].afterEach(name, fn);
- },
-
- test: {
- /**
- * Pending test case.
- */
- skip: function (title) {
- context.test(title);
- }
- }
- }
-};
-
-}); // module: interfaces/common.js
-
-require.register("interfaces/exports.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Suite = require('../suite')
- , Test = require('../test');
-
-/**
- * TDD-style interface:
- *
- * exports.Array = {
- * '#indexOf()': {
- * 'should return -1 when the value is not present': function(){
- *
- * },
- *
- * 'should return the correct index when the value is present': function(){
- *
- * }
- * }
- * };
- *
- */
-
-module.exports = function(suite){
- var suites = [suite];
-
- suite.on('require', visit);
-
- function visit(obj, file) {
- var suite;
- for (var key in obj) {
- if ('function' == typeof obj[key]) {
- var fn = obj[key];
- switch (key) {
- case 'before':
- suites[0].beforeAll(fn);
- break;
- case 'after':
- suites[0].afterAll(fn);
- break;
- case 'beforeEach':
- suites[0].beforeEach(fn);
- break;
- case 'afterEach':
- suites[0].afterEach(fn);
- break;
- default:
- var test = new Test(key, fn);
- test.file = file;
- suites[0].addTest(test);
- }
- } else {
- suite = Suite.create(suites[0], key);
- suites.unshift(suite);
- visit(obj[key]);
- suites.shift();
- }
- }
- }
-};
-
-}); // module: interfaces/exports.js
-
-require.register("interfaces/index.js", function(module, exports, require){
-exports.bdd = require('./bdd');
-exports.tdd = require('./tdd');
-exports.qunit = require('./qunit');
-exports.exports = require('./exports');
-
-}); // module: interfaces/index.js
-
-require.register("interfaces/qunit.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Suite = require('../suite')
- , Test = require('../test')
- , escapeRe = require('browser/escape-string-regexp')
- , utils = require('../utils');
-
-/**
- * QUnit-style interface:
- *
- * suite('Array');
- *
- * test('#length', function(){
- * var arr = [1,2,3];
- * ok(arr.length == 3);
- * });
- *
- * test('#indexOf()', function(){
- * var arr = [1,2,3];
- * ok(arr.indexOf(1) == 0);
- * ok(arr.indexOf(2) == 1);
- * ok(arr.indexOf(3) == 2);
- * });
- *
- * suite('String');
- *
- * test('#length', function(){
- * ok('foo'.length == 3);
- * });
- *
- */
-
-module.exports = function(suite){
- var suites = [suite];
-
- suite.on('pre-require', function(context, file, mocha){
-
- var common = require('./common')(suites, context);
-
- context.before = common.before;
- context.after = common.after;
- context.beforeEach = common.beforeEach;
- context.afterEach = common.afterEach;
- context.run = mocha.options.delay && common.runWithSuite(suite);
- /**
- * Describe a "suite" with the given `title`.
- */
-
- context.suite = function(title){
- if (suites.length > 1) suites.shift();
- var suite = Suite.create(suites[0], title);
- suite.file = file;
- suites.unshift(suite);
- return suite;
- };
-
- /**
- * Exclusive test-case.
- */
-
- context.suite.only = function(title, fn){
- var suite = context.suite(title, fn);
- mocha.grep(suite.fullTitle());
- };
-
- /**
- * Describe a specification or test-case
- * with the given `title` and callback `fn`
- * acting as a thunk.
- */
-
- context.test = function(title, fn){
- var test = new Test(title, fn);
- test.file = file;
- suites[0].addTest(test);
- return test;
- };
-
- /**
- * Exclusive test-case.
- */
-
- context.test.only = function(title, fn){
- var test = context.test(title, fn);
- var reString = '^' + escapeRe(test.fullTitle()) + '$';
- mocha.grep(new RegExp(reString));
- };
-
- context.test.skip = common.test.skip;
-
- });
-};
-
-}); // module: interfaces/qunit.js
-
-require.register("interfaces/tdd.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Suite = require('../suite')
- , Test = require('../test')
- , escapeRe = require('browser/escape-string-regexp')
- , utils = require('../utils');
-
-/**
- * TDD-style interface:
- *
- * suite('Array', function(){
- * suite('#indexOf()', function(){
- * suiteSetup(function(){
- *
- * });
- *
- * test('should return -1 when not present', function(){
- *
- * });
- *
- * test('should return the index when present', function(){
- *
- * });
- *
- * suiteTeardown(function(){
- *
- * });
- * });
- * });
- *
- */
-
-module.exports = function(suite){
- var suites = [suite];
-
- suite.on('pre-require', function(context, file, mocha){
-
- var common = require('./common')(suites, context);
-
- context.setup = common.beforeEach;
- context.teardown = common.afterEach;
- context.suiteSetup = common.before;
- context.suiteTeardown = common.after;
- context.run = mocha.options.delay && common.runWithSuite(suite);
- /**
- * Describe a "suite" with the given `title`
- * and callback `fn` containing nested suites
- * and/or tests.
- */
-
- context.suite = function(title, fn){
- var suite = Suite.create(suites[0], title);
- suite.file = file;
- suites.unshift(suite);
- fn.call(suite);
- suites.shift();
- return suite;
- };
-
- /**
- * Pending suite.
- */
- context.suite.skip = function(title, fn) {
- var suite = Suite.create(suites[0], title);
- suite.pending = true;
- suites.unshift(suite);
- fn.call(suite);
- suites.shift();
- };
-
- /**
- * Exclusive test-case.
- */
-
- context.suite.only = function(title, fn){
- var suite = context.suite(title, fn);
- mocha.grep(suite.fullTitle());
- };
-
- /**
- * Describe a specification or test-case
- * with the given `title` and callback `fn`
- * acting as a thunk.
- */
-
- context.test = function(title, fn){
- var suite = suites[0];
- if (suite.pending) fn = null;
- var test = new Test(title, fn);
- test.file = file;
- suite.addTest(test);
- return test;
- };
-
- /**
- * Exclusive test-case.
- */
-
- context.test.only = function(title, fn){
- var test = context.test(title, fn);
- var reString = '^' + escapeRe(test.fullTitle()) + '$';
- mocha.grep(new RegExp(reString));
- };
-
- context.test.skip = common.test.skip;
- });
-};
-
-}); // module: interfaces/tdd.js
-
-require.register("mocha.js", function(module, exports, require){
-/*!
- * mocha
- * Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca>
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var path = require('browser/path')
- , escapeRe = require('browser/escape-string-regexp')
- , utils = require('./utils');
-
-/**
- * Expose `Mocha`.
- */
-
-exports = module.exports = Mocha;
-
-/**
- * To require local UIs and reporters when running in node.
- */
-
-if (typeof process !== 'undefined' && typeof process.cwd === 'function') {
- var join = path.join
- , cwd = process.cwd();
- module.paths.push(cwd, join(cwd, 'node_modules'));
-}
-
-/**
- * Expose internals.
- */
-
-exports.utils = utils;
-exports.interfaces = require('./interfaces');
-exports.reporters = require('./reporters');
-exports.Runnable = require('./runnable');
-exports.Context = require('./context');
-exports.Runner = require('./runner');
-exports.Suite = require('./suite');
-exports.Hook = require('./hook');
-exports.Test = require('./test');
-
-/**
- * Return image `name` path.
- *
- * @param {String} name
- * @return {String}
- * @api private
- */
-
-function image(name) {
- return __dirname + '/../images/' + name + '.png';
-}
-
-/**
- * Setup mocha with `options`.
- *
- * Options:
- *
- * - `ui` name "bdd", "tdd", "exports" etc
- * - `reporter` reporter instance, defaults to `mocha.reporters.spec`
- * - `globals` array of accepted globals
- * - `timeout` timeout in milliseconds
- * - `bail` bail on the first test failure
- * - `slow` milliseconds to wait before considering a test slow
- * - `ignoreLeaks` ignore global leaks
- * - `fullTrace` display the full stack-trace on failing
- * - `grep` string or regexp to filter tests with
- *
- * @param {Object} options
- * @api public
- */
-
-function Mocha(options) {
- options = options || {};
- this.files = [];
- this.options = options;
- if (options.grep) this.grep(new RegExp(options.grep));
- if (options.fgrep) this.grep(options.fgrep);
- this.suite = new exports.Suite('', new exports.Context);
- this.ui(options.ui);
- this.bail(options.bail);
- this.reporter(options.reporter, options.reporterOptions);
- if (null != options.timeout) this.timeout(options.timeout);
- this.useColors(options.useColors);
- if (options.enableTimeouts !== null) this.enableTimeouts(options.enableTimeouts);
- if (options.slow) this.slow(options.slow);
-
- this.suite.on('pre-require', function (context) {
- exports.afterEach = context.afterEach || context.teardown;
- exports.after = context.after || context.suiteTeardown;
- exports.beforeEach = context.beforeEach || context.setup;
- exports.before = context.before || context.suiteSetup;
- exports.describe = context.describe || context.suite;
- exports.it = context.it || context.test;
- exports.setup = context.setup || context.beforeEach;
- exports.suiteSetup = context.suiteSetup || context.before;
- exports.suiteTeardown = context.suiteTeardown || context.after;
- exports.suite = context.suite || context.describe;
- exports.teardown = context.teardown || context.afterEach;
- exports.test = context.test || context.it;
- exports.run = context.run;
- });
-}
-
-/**
- * Enable or disable bailing on the first failure.
- *
- * @param {Boolean} [bail]
- * @api public
- */
-
-Mocha.prototype.bail = function(bail){
- if (0 == arguments.length) bail = true;
- this.suite.bail(bail);
- return this;
-};
-
-/**
- * Add test `file`.
- *
- * @param {String} file
- * @api public
- */
-
-Mocha.prototype.addFile = function(file){
- this.files.push(file);
- return this;
-};
-
-/**
- * Set reporter to `reporter`, defaults to "spec".
- *
- * @param {String|Function} reporter name or constructor
- * @param {Object} reporterOptions optional options
- * @api public
- */
-Mocha.prototype.reporter = function(reporter, reporterOptions){
- if ('function' == typeof reporter) {
- this._reporter = reporter;
- } else {
- reporter = reporter || 'spec';
- var _reporter;
- try { _reporter = require('./reporters/' + reporter); } catch (err) {}
- if (!_reporter) try { _reporter = require(reporter); } catch (err) {
- err.message.indexOf('Cannot find module') !== -1
- ? console.warn('"' + reporter + '" reporter not found')
- : console.warn('"' + reporter + '" reporter blew up with error:\n' + err.stack);
- }
- if (!_reporter && reporter === 'teamcity')
- console.warn('The Teamcity reporter was moved to a package named ' +
- 'mocha-teamcity-reporter ' +
- '(https://npmjs.org/package/mocha-teamcity-reporter).');
- if (!_reporter) throw new Error('invalid reporter "' + reporter + '"');
- this._reporter = _reporter;
- }
- this.options.reporterOptions = reporterOptions;
- return this;
-};
-
-/**
- * Set test UI `name`, defaults to "bdd".
- *
- * @param {String} bdd
- * @api public
- */
-
-Mocha.prototype.ui = function(name){
- name = name || 'bdd';
- this._ui = exports.interfaces[name];
- if (!this._ui) try { this._ui = require(name); } catch (err) {}
- if (!this._ui) throw new Error('invalid interface "' + name + '"');
- this._ui = this._ui(this.suite);
- return this;
-};
-
-/**
- * Load registered files.
- *
- * @api private
- */
-
-Mocha.prototype.loadFiles = function(fn){
- var self = this;
- var suite = this.suite;
- var pending = this.files.length;
- this.files.forEach(function(file){
- file = path.resolve(file);
- suite.emit('pre-require', global, file, self);
- suite.emit('require', require(file), file, self);
- suite.emit('post-require', global, file, self);
- --pending || (fn && fn());
- });
-};
-
-/**
- * Enable growl support.
- *
- * @api private
- */
-
-Mocha.prototype._growl = function(runner, reporter) {
- var notify = require('growl');
-
- runner.on('end', function(){
- var stats = reporter.stats;
- if (stats.failures) {
- var msg = stats.failures + ' of ' + runner.total + ' tests failed';
- notify(msg, { name: 'mocha', title: 'Failed', image: image('error') });
- } else {
- notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', {
- name: 'mocha'
- , title: 'Passed'
- , image: image('ok')
- });
- }
- });
-};
-
-/**
- * Add regexp to grep, if `re` is a string it is escaped.
- *
- * @param {RegExp|String} re
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.grep = function(re){
- this.options.grep = 'string' == typeof re
- ? new RegExp(escapeRe(re))
- : re;
- return this;
-};
-
-/**
- * Invert `.grep()` matches.
- *
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.invert = function(){
- this.options.invert = true;
- return this;
-};
-
-/**
- * Ignore global leaks.
- *
- * @param {Boolean} ignore
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.ignoreLeaks = function(ignore){
- this.options.ignoreLeaks = !!ignore;
- return this;
-};
-
-/**
- * Enable global leak checking.
- *
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.checkLeaks = function(){
- this.options.ignoreLeaks = false;
- return this;
-};
-
-/**
- * Display long stack-trace on failing
- *
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.fullTrace = function() {
- this.options.fullStackTrace = true;
- return this;
-};
-
-/**
- * Enable growl support.
- *
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.growl = function(){
- this.options.growl = true;
- return this;
-};
-
-/**
- * Ignore `globals` array or string.
- *
- * @param {Array|String} globals
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.globals = function(globals){
- this.options.globals = (this.options.globals || []).concat(globals);
- return this;
-};
-
-/**
- * Emit color output.
- *
- * @param {Boolean} colors
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.useColors = function(colors){
- if (colors !== undefined) {
- this.options.useColors = colors;
- }
- return this;
-};
-
-/**
- * Use inline diffs rather than +/-.
- *
- * @param {Boolean} inlineDiffs
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.useInlineDiffs = function(inlineDiffs) {
- this.options.useInlineDiffs = arguments.length && inlineDiffs != undefined
- ? inlineDiffs
- : false;
- return this;
-};
-
-/**
- * Set the timeout in milliseconds.
- *
- * @param {Number} timeout
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.timeout = function(timeout){
- this.suite.timeout(timeout);
- return this;
-};
-
-/**
- * Set slowness threshold in milliseconds.
- *
- * @param {Number} slow
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.slow = function(slow){
- this.suite.slow(slow);
- return this;
-};
-
-/**
- * Enable timeouts.
- *
- * @param {Boolean} enabled
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.enableTimeouts = function(enabled) {
- this.suite.enableTimeouts(arguments.length && enabled !== undefined
- ? enabled
- : true);
- return this
-};
-
-/**
- * Makes all tests async (accepting a callback)
- *
- * @return {Mocha}
- * @api public
- */
-
-Mocha.prototype.asyncOnly = function(){
- this.options.asyncOnly = true;
- return this;
-};
-
-/**
- * Disable syntax highlighting (in browser).
- * @returns {Mocha}
- * @api public
- */
-Mocha.prototype.noHighlighting = function() {
- this.options.noHighlighting = true;
- return this;
-};
-
-/**
- * Delay root suite execution.
- * @returns {Mocha}
- * @api public
- */
-Mocha.prototype.delay = function delay() {
- this.options.delay = true;
- return this;
-};
-
-/**
- * Run tests and invoke `fn()` when complete.
- *
- * @param {Function} fn
- * @return {Runner}
- * @api public
- */
-Mocha.prototype.run = function(fn){
- if (this.files.length) this.loadFiles();
- var suite = this.suite;
- var options = this.options;
- options.files = this.files;
- var runner = new exports.Runner(suite, options.delay);
- var reporter = new this._reporter(runner, options);
- runner.ignoreLeaks = false !== options.ignoreLeaks;
- runner.fullStackTrace = options.fullStackTrace;
- runner.asyncOnly = options.asyncOnly;
- if (options.grep) runner.grep(options.grep, options.invert);
- if (options.globals) runner.globals(options.globals);
- if (options.growl) this._growl(runner, reporter);
- if (options.useColors !== undefined) {
- exports.reporters.Base.useColors = options.useColors;
- }
- exports.reporters.Base.inlineDiffs = options.useInlineDiffs;
-
- function done(failures) {
- if (reporter.done) {
- reporter.done(failures, fn);
- } else fn && fn(failures);
- }
-
- return runner.run(done);
-};
-
-}); // module: mocha.js
-
-require.register("ms.js", function(module, exports, require){
-/**
- * Helpers.
- */
-
-var s = 1000;
-var m = s * 60;
-var h = m * 60;
-var d = h * 24;
-var y = d * 365.25;
-
-/**
- * Parse or format the given `val`.
- *
- * Options:
- *
- * - `long` verbose formatting [false]
- *
- * @param {String|Number} val
- * @param {Object} options
- * @return {String|Number}
- * @api public
- */
-
-module.exports = function(val, options){
- options = options || {};
- if ('string' == typeof val) return parse(val);
- return options['long'] ? longFormat(val) : shortFormat(val);
-};
-
-/**
- * Parse the given `str` and return milliseconds.
- *
- * @param {String} str
- * @return {Number}
- * @api private
- */
-
-function parse(str) {
- var match = /^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(str);
- if (!match) return undefined;
- var n = parseFloat(match[1]);
- var type = (match[2] || 'ms').toLowerCase();
- switch (type) {
- case 'years':
- case 'year':
- case 'y':
- return n * y;
- case 'days':
- case 'day':
- case 'd':
- return n * d;
- case 'hours':
- case 'hour':
- case 'h':
- return n * h;
- case 'minutes':
- case 'minute':
- case 'm':
- return n * m;
- case 'seconds':
- case 'second':
- case 's':
- return n * s;
- case 'ms':
- return n;
- }
-}
-
-/**
- * Short format for `ms`.
- *
- * @param {Number} ms
- * @return {String}
- * @api private
- */
-
-function shortFormat(ms) {
- if (ms >= d) return Math.round(ms / d) + 'd';
- if (ms >= h) return Math.round(ms / h) + 'h';
- if (ms >= m) return Math.round(ms / m) + 'm';
- if (ms >= s) return Math.round(ms / s) + 's';
- return ms + 'ms';
-}
-
-/**
- * Long format for `ms`.
- *
- * @param {Number} ms
- * @return {String}
- * @api private
- */
-
-function longFormat(ms) {
- return plural(ms, d, 'day')
- || plural(ms, h, 'hour')
- || plural(ms, m, 'minute')
- || plural(ms, s, 'second')
- || ms + ' ms';
-}
-
-/**
- * Pluralization helper.
- */
-
-function plural(ms, n, name) {
- if (ms < n) return undefined;
- if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name;
- return Math.ceil(ms / n) + ' ' + name + 's';
-}
-
-}); // module: ms.js
-
-require.register("pending.js", function(module, exports, require){
-
-/**
- * Expose `Pending`.
- */
-
-module.exports = Pending;
-
-/**
- * Initialize a new `Pending` error with the given message.
- *
- * @param {String} message
- */
-
-function Pending(message) {
- this.message = message;
-}
-
-}); // module: pending.js
-
-require.register("reporters/base.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var tty = require('browser/tty')
- , diff = require('browser/diff')
- , ms = require('../ms')
- , utils = require('../utils')
- , supportsColor = process.env ? require('supports-color') : null;
-
-/**
- * Save timer references to avoid Sinon interfering (see GH-237).
- */
-
-var Date = global.Date
- , setTimeout = global.setTimeout
- , setInterval = global.setInterval
- , clearTimeout = global.clearTimeout
- , clearInterval = global.clearInterval;
-
-/**
- * Check if both stdio streams are associated with a tty.
- */
-
-var isatty = tty.isatty(1) && tty.isatty(2);
-
-/**
- * Expose `Base`.
- */
-
-exports = module.exports = Base;
-
-/**
- * Enable coloring by default, except in the browser interface.
- */
-
-exports.useColors = process.env
- ? (supportsColor || (process.env.MOCHA_COLORS !== undefined))
- : false;
-
-/**
- * Inline diffs instead of +/-
- */
-
-exports.inlineDiffs = false;
-
-/**
- * Default color map.
- */
-
-exports.colors = {
- 'pass': 90
- , 'fail': 31
- , 'bright pass': 92
- , 'bright fail': 91
- , 'bright yellow': 93
- , 'pending': 36
- , 'suite': 0
- , 'error title': 0
- , 'error message': 31
- , 'error stack': 90
- , 'checkmark': 32
- , 'fast': 90
- , 'medium': 33
- , 'slow': 31
- , 'green': 32
- , 'light': 90
- , 'diff gutter': 90
- , 'diff added': 42
- , 'diff removed': 41
-};
-
-/**
- * Default symbol map.
- */
-
-exports.symbols = {
- ok: '✓',
- err: '✖',
- dot: '․'
-};
-
-// With node.js on Windows: use symbols available in terminal default fonts
-if ('win32' == process.platform) {
- exports.symbols.ok = '\u221A';
- exports.symbols.err = '\u00D7';
- exports.symbols.dot = '.';
-}
-
-/**
- * Color `str` with the given `type`,
- * allowing colors to be disabled,
- * as well as user-defined color
- * schemes.
- *
- * @param {String} type
- * @param {String} str
- * @return {String}
- * @api private
- */
-
-var color = exports.color = function(type, str) {
- if (!exports.useColors) return String(str);
- return '\u001b[' + exports.colors[type] + 'm' + str + '\u001b[0m';
-};
-
-/**
- * Expose term window size, with some
- * defaults for when stderr is not a tty.
- */
-
-exports.window = {
- width: 75
-};
-if (isatty) {
- exports.window.width = process.stdout.getWindowSize
- ? process.stdout.getWindowSize(1)[0]
- : tty.getWindowSize()[1];
-}
-
-/**
- * Expose some basic cursor interactions
- * that are common among reporters.
- */
-
-exports.cursor = {
- hide: function(){
- isatty && process.stdout.write('\u001b[?25l');
- },
-
- show: function(){
- isatty && process.stdout.write('\u001b[?25h');
- },
-
- deleteLine: function(){
- isatty && process.stdout.write('\u001b[2K');
- },
-
- beginningOfLine: function(){
- isatty && process.stdout.write('\u001b[0G');
- },
-
- CR: function(){
- if (isatty) {
- exports.cursor.deleteLine();
- exports.cursor.beginningOfLine();
- } else {
- process.stdout.write('\r');
- }
- }
-};
-
-/**
- * Outut the given `failures` as a list.
- *
- * @param {Array} failures
- * @api public
- */
-
-exports.list = function(failures){
- console.log();
- failures.forEach(function(test, i){
- // format
- var fmt = color('error title', ' %s) %s:\n')
- + color('error message', ' %s')
- + color('error stack', '\n%s\n');
-
- // msg
- var err = test.err
- , message = err.message || ''
- , stack = err.stack || message
- , index = stack.indexOf(message)
- , actual = err.actual
- , expected = err.expected
- , escape = true;
- if (index === -1) {
- msg = message;
- } else {
- index += message.length;
- msg = stack.slice(0, index);
- // remove msg from stack
- stack = stack.slice(index + 1);
- }
-
- // uncaught
- if (err.uncaught) {
- msg = 'Uncaught ' + msg;
- }
- // explicitly show diff
- if (err.showDiff !== false && sameType(actual, expected)
- && expected !== undefined) {
-
- if ('string' !== typeof actual) {
- escape = false;
- err.actual = actual = utils.stringify(actual);
- err.expected = expected = utils.stringify(expected);
- }
-
- fmt = color('error title', ' %s) %s:\n%s') + color('error stack', '\n%s\n');
- var match = message.match(/^([^:]+): expected/);
- msg = '\n ' + color('error message', match ? match[1] : msg);
-
- if (exports.inlineDiffs) {
- msg += inlineDiff(err, escape);
- } else {
- msg += unifiedDiff(err, escape);
- }
- }
-
- // indent stack trace
- stack = stack.replace(/^/gm, ' ');
-
- console.log(fmt, (i + 1), test.fullTitle(), msg, stack);
- });
-};
-
-/**
- * Initialize a new `Base` reporter.
- *
- * All other reporters generally
- * inherit from this reporter, providing
- * stats such as test duration, number
- * of tests passed / failed etc.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function Base(runner) {
- var self = this
- , stats = this.stats = { suites: 0, tests: 0, passes: 0, pending: 0, failures: 0 }
- , failures = this.failures = [];
-
- if (!runner) return;
- this.runner = runner;
-
- runner.stats = stats;
-
- runner.on('start', function(){
- stats.start = new Date;
- });
-
- runner.on('suite', function(suite){
- stats.suites = stats.suites || 0;
- suite.root || stats.suites++;
- });
-
- runner.on('test end', function(test){
- stats.tests = stats.tests || 0;
- stats.tests++;
- });
-
- runner.on('pass', function(test){
- stats.passes = stats.passes || 0;
-
- var medium = test.slow() / 2;
- if (test.duration > test.slow()) {
- test.speed = 'slow';
- } else if (test.duration > medium) {
- test.speed = 'medium';
- } else {
- test.speed = 'fast';
- }
-
- stats.passes++;
- });
-
- runner.on('fail', function(test, err){
- stats.failures = stats.failures || 0;
- stats.failures++;
- test.err = err;
- failures.push(test);
- });
-
- runner.on('end', function(){
- stats.end = new Date;
- stats.duration = new Date - stats.start;
- });
-
- runner.on('pending', function(){
- stats.pending++;
- });
-}
-
-/**
- * Output common epilogue used by many of
- * the bundled reporters.
- *
- * @api public
- */
-
-Base.prototype.epilogue = function(){
- var stats = this.stats;
- var tests;
- var fmt;
-
- console.log();
-
- // passes
- fmt = color('bright pass', ' ')
- + color('green', ' %d passing')
- + color('light', ' (%s)');
-
- console.log(fmt,
- stats.passes || 0,
- ms(stats.duration));
-
- // pending
- if (stats.pending) {
- fmt = color('pending', ' ')
- + color('pending', ' %d pending');
-
- console.log(fmt, stats.pending);
- }
-
- // failures
- if (stats.failures) {
- fmt = color('fail', ' %d failing');
-
- console.log(fmt, stats.failures);
-
- Base.list(this.failures);
- console.log();
- }
-
- console.log();
-};
-
-/**
- * Pad the given `str` to `len`.
- *
- * @param {String} str
- * @param {String} len
- * @return {String}
- * @api private
- */
-
-function pad(str, len) {
- str = String(str);
- return Array(len - str.length + 1).join(' ') + str;
-}
-
-
-/**
- * Returns an inline diff between 2 strings with coloured ANSI output
- *
- * @param {Error} Error with actual/expected
- * @return {String} Diff
- * @api private
- */
-
-function inlineDiff(err, escape) {
- var msg = errorDiff(err, 'WordsWithSpace', escape);
-
- // linenos
- var lines = msg.split('\n');
- if (lines.length > 4) {
- var width = String(lines.length).length;
- msg = lines.map(function(str, i){
- return pad(++i, width) + ' |' + ' ' + str;
- }).join('\n');
- }
-
- // legend
- msg = '\n'
- + color('diff removed', 'actual')
- + ' '
- + color('diff added', 'expected')
- + '\n\n'
- + msg
- + '\n';
-
- // indent
- msg = msg.replace(/^/gm, ' ');
- return msg;
-}
-
-/**
- * Returns a unified diff between 2 strings
- *
- * @param {Error} Error with actual/expected
- * @return {String} Diff
- * @api private
- */
-
-function unifiedDiff(err, escape) {
- var indent = ' ';
- function cleanUp(line) {
- if (escape) {
- line = escapeInvisibles(line);
- }
- if (line[0] === '+') return indent + colorLines('diff added', line);
- if (line[0] === '-') return indent + colorLines('diff removed', line);
- if (line.match(/\@\@/)) return null;
- if (line.match(/\\ No newline/)) return null;
- else return indent + line;
- }
- function notBlank(line) {
- return line != null;
- }
- var msg = diff.createPatch('string', err.actual, err.expected);
- var lines = msg.split('\n').splice(4);
- return '\n '
- + colorLines('diff added', '+ expected') + ' '
- + colorLines('diff removed', '- actual')
- + '\n\n'
- + lines.map(cleanUp).filter(notBlank).join('\n');
-}
-
-/**
- * Return a character diff for `err`.
- *
- * @param {Error} err
- * @return {String}
- * @api private
- */
-
-function errorDiff(err, type, escape) {
- var actual = escape ? escapeInvisibles(err.actual) : err.actual;
- var expected = escape ? escapeInvisibles(err.expected) : err.expected;
- return diff['diff' + type](actual, expected).map(function(str){
- if (str.added) return colorLines('diff added', str.value);
- if (str.removed) return colorLines('diff removed', str.value);
- return str.value;
- }).join('');
-}
-
-/**
- * Returns a string with all invisible characters in plain text
- *
- * @param {String} line
- * @return {String}
- * @api private
- */
-function escapeInvisibles(line) {
- return line.replace(/\t/g, '<tab>')
- .replace(/\r/g, '<CR>')
- .replace(/\n/g, '<LF>\n');
-}
-
-/**
- * Color lines for `str`, using the color `name`.
- *
- * @param {String} name
- * @param {String} str
- * @return {String}
- * @api private
- */
-
-function colorLines(name, str) {
- return str.split('\n').map(function(str){
- return color(name, str);
- }).join('\n');
-}
-
-/**
- * Check that a / b have the same type.
- *
- * @param {Object} a
- * @param {Object} b
- * @return {Boolean}
- * @api private
- */
-
-function sameType(a, b) {
- a = Object.prototype.toString.call(a);
- b = Object.prototype.toString.call(b);
- return a == b;
-}
-
-}); // module: reporters/base.js
-
-require.register("reporters/doc.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , utils = require('../utils');
-
-/**
- * Expose `Doc`.
- */
-
-exports = module.exports = Doc;
-
-/**
- * Initialize a new `Doc` reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function Doc(runner) {
- Base.call(this, runner);
-
- var self = this
- , stats = this.stats
- , total = runner.total
- , indents = 2;
-
- function indent() {
- return Array(indents).join(' ');
- }
-
- runner.on('suite', function(suite){
- if (suite.root) return;
- ++indents;
- console.log('%s<section class="suite">', indent());
- ++indents;
- console.log('%s<h1>%s</h1>', indent(), utils.escape(suite.title));
- console.log('%s<dl>', indent());
- });
-
- runner.on('suite end', function(suite){
- if (suite.root) return;
- console.log('%s</dl>', indent());
- --indents;
- console.log('%s</section>', indent());
- --indents;
- });
-
- runner.on('pass', function(test){
- console.log('%s <dt>%s</dt>', indent(), utils.escape(test.title));
- var code = utils.escape(utils.clean(test.fn.toString()));
- console.log('%s <dd><pre><code>%s</code></pre></dd>', indent(), code);
- });
-
- runner.on('fail', function(test, err){
- console.log('%s <dt class="error">%s</dt>', indent(), utils.escape(test.title));
- var code = utils.escape(utils.clean(test.fn.toString()));
- console.log('%s <dd class="error"><pre><code>%s</code></pre></dd>', indent(), code);
- console.log('%s <dd class="error">%s</dd>', indent(), utils.escape(err));
- });
-}
-
-}); // module: reporters/doc.js
-
-require.register("reporters/dot.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , color = Base.color;
-
-/**
- * Expose `Dot`.
- */
-
-exports = module.exports = Dot;
-
-/**
- * Initialize a new `Dot` matrix test reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function Dot(runner) {
- Base.call(this, runner);
-
- var self = this
- , stats = this.stats
- , width = Base.window.width * .75 | 0
- , n = -1;
-
- runner.on('start', function(){
- process.stdout.write('\n');
- });
-
- runner.on('pending', function(test){
- if (++n % width == 0) process.stdout.write('\n ');
- process.stdout.write(color('pending', Base.symbols.dot));
- });
-
- runner.on('pass', function(test){
- if (++n % width == 0) process.stdout.write('\n ');
- if ('slow' == test.speed) {
- process.stdout.write(color('bright yellow', Base.symbols.dot));
- } else {
- process.stdout.write(color(test.speed, Base.symbols.dot));
- }
- });
-
- runner.on('fail', function(test, err){
- if (++n % width == 0) process.stdout.write('\n ');
- process.stdout.write(color('fail', Base.symbols.dot));
- });
-
- runner.on('end', function(){
- console.log();
- self.epilogue();
- });
-}
-
-/**
- * Inherit from `Base.prototype`.
- */
-
-function F(){}
-F.prototype = Base.prototype;
-Dot.prototype = new F;
-Dot.prototype.constructor = Dot;
-
-
-}); // module: reporters/dot.js
-
-require.register("reporters/html-cov.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var JSONCov = require('./json-cov')
- , fs = require('browser/fs');
-
-/**
- * Expose `HTMLCov`.
- */
-
-exports = module.exports = HTMLCov;
-
-/**
- * Initialize a new `JsCoverage` reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function HTMLCov(runner) {
- var jade = require('jade')
- , file = __dirname + '/templates/coverage.jade'
- , str = fs.readFileSync(file, 'utf8')
- , fn = jade.compile(str, { filename: file })
- , self = this;
-
- JSONCov.call(this, runner, false);
-
- runner.on('end', function(){
- process.stdout.write(fn({
- cov: self.cov
- , coverageClass: coverageClass
- }));
- });
-}
-
-/**
- * Return coverage class for `n`.
- *
- * @return {String}
- * @api private
- */
-
-function coverageClass(n) {
- if (n >= 75) return 'high';
- if (n >= 50) return 'medium';
- if (n >= 25) return 'low';
- return 'terrible';
-}
-
-}); // module: reporters/html-cov.js
-
-require.register("reporters/html.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , utils = require('../utils')
- , Progress = require('../browser/progress')
- , escape = utils.escape;
-
-/**
- * Save timer references to avoid Sinon interfering (see GH-237).
- */
-
-var Date = global.Date
- , setTimeout = global.setTimeout
- , setInterval = global.setInterval
- , clearTimeout = global.clearTimeout
- , clearInterval = global.clearInterval;
-
-/**
- * Expose `HTML`.
- */
-
-exports = module.exports = HTML;
-
-/**
- * Stats template.
- */
-
-var statsTemplate = '<ul id="mocha-stats">'
- + '<li class="progress"><canvas width="40" height="40"></canvas></li>'
- + '<li class="passes"><a href="#">passes:</a> <em>0</em></li>'
- + '<li class="failures"><a href="#">failures:</a> <em>0</em></li>'
- + '<li class="duration">duration: <em>0</em>s</li>'
- + '</ul>';
-
-/**
- * Initialize a new `HTML` reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function HTML(runner) {
- Base.call(this, runner);
-
- var self = this
- , stats = this.stats
- , total = runner.total
- , stat = fragment(statsTemplate)
- , items = stat.getElementsByTagName('li')
- , passes = items[1].getElementsByTagName('em')[0]
- , passesLink = items[1].getElementsByTagName('a')[0]
- , failures = items[2].getElementsByTagName('em')[0]
- , failuresLink = items[2].getElementsByTagName('a')[0]
- , duration = items[3].getElementsByTagName('em')[0]
- , canvas = stat.getElementsByTagName('canvas')[0]
- , report = fragment('<ul id="mocha-report"></ul>')
- , stack = [report]
- , progress
- , ctx
- , root = document.getElementById('mocha');
-
- if (canvas.getContext) {
- var ratio = window.devicePixelRatio || 1;
- canvas.style.width = canvas.width;
- canvas.style.height = canvas.height;
- canvas.width *= ratio;
- canvas.height *= ratio;
- ctx = canvas.getContext('2d');
- ctx.scale(ratio, ratio);
- progress = new Progress;
- }
-
- if (!root) return error('#mocha div missing, add it to your document');
-
- // pass toggle
- on(passesLink, 'click', function(){
- unhide();
- var name = /pass/.test(report.className) ? '' : ' pass';
- report.className = report.className.replace(/fail|pass/g, '') + name;
- if (report.className.trim()) hideSuitesWithout('test pass');
- });
-
- // failure toggle
- on(failuresLink, 'click', function(){
- unhide();
- var name = /fail/.test(report.className) ? '' : ' fail';
- report.className = report.className.replace(/fail|pass/g, '') + name;
- if (report.className.trim()) hideSuitesWithout('test fail');
- });
-
- root.appendChild(stat);
- root.appendChild(report);
-
- if (progress) progress.size(40);
-
- runner.on('suite', function(suite){
- if (suite.root) return;
-
- // suite
- var url = self.suiteURL(suite);
- var el = fragment('<li class="suite"><h1><a href="%s">%s</a></h1></li>', url, escape(suite.title));
-
- // container
- stack[0].appendChild(el);
- stack.unshift(document.createElement('ul'));
- el.appendChild(stack[0]);
- });
-
- runner.on('suite end', function(suite){
- if (suite.root) return;
- stack.shift();
- });
-
- runner.on('fail', function(test, err){
- if ('hook' == test.type) runner.emit('test end', test);
- });
-
- runner.on('test end', function(test){
- // TODO: add to stats
- var percent = stats.tests / this.total * 100 | 0;
- if (progress) progress.update(percent).draw(ctx);
-
- // update stats
- var ms = new Date - stats.start;
- text(passes, stats.passes);
- text(failures, stats.failures);
- text(duration, (ms / 1000).toFixed(2));
-
- // test
- if ('passed' == test.state) {
- var url = self.testURL(test);
- var el = fragment('<li class="test pass %e"><h2>%e<span class="duration">%ems</span> <a href="%s" class="replay">‣</a></h2></li>', test.speed, test.title, test.duration, url);
- } else if (test.pending) {
- el = fragment('<li class="test pass pending"><h2>%e</h2></li>', test.title);
- } else {
- el = fragment('<li class="test fail"><h2>%e <a href="%e" class="replay">‣</a></h2></li>', test.title, self.testURL(test));
- var str = test.err.stack || test.err.toString();
-
- // FF / Opera do not add the message
- if (!~str.indexOf(test.err.message)) {
- str = test.err.message + '\n' + str;
- }
-
- // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we
- // check for the result of the stringifying.
- if ('[object Error]' == str) str = test.err.message;
-
- // Safari doesn't give you a stack. Let's at least provide a source line.
- if (!test.err.stack && test.err.sourceURL && test.err.line !== undefined) {
- str += "\n(" + test.err.sourceURL + ":" + test.err.line + ")";
- }
-
- el.appendChild(fragment('<pre class="error">%e</pre>', str));
- }
-
- // toggle code
- // TODO: defer
- if (!test.pending) {
- var h2 = el.getElementsByTagName('h2')[0];
-
- on(h2, 'click', function(){
- pre.style.display = 'none' == pre.style.display
- ? 'block'
- : 'none';
- });
-
- var pre = fragment('<pre><code>%e</code></pre>', utils.clean(test.fn.toString()));
- el.appendChild(pre);
- pre.style.display = 'none';
- }
-
- // Don't call .appendChild if #mocha-report was already .shift()'ed off the stack.
- if (stack[0]) stack[0].appendChild(el);
- });
-}
-
-/**
- * Makes a URL, preserving querystring ("search") parameters.
- * @param {string} s
- * @returns {string} your new URL
- */
-var makeUrl = function makeUrl(s) {
- var search = window.location.search;
-
- // Remove previous grep query parameter if present
- if (search) {
- search = search.replace(/[?&]grep=[^&\s]*/g, '').replace(/^&/, '?');
- }
-
- return window.location.pathname + (search ? search + '&' : '?' ) + 'grep=' + encodeURIComponent(s);
-};
-
-/**
- * Provide suite URL
- *
- * @param {Object} [suite]
- */
-HTML.prototype.suiteURL = function(suite){
- return makeUrl(suite.fullTitle());
-};
-
-/**
- * Provide test URL
- *
- * @param {Object} [test]
- */
-
-HTML.prototype.testURL = function(test){
- return makeUrl(test.fullTitle());
-};
-
-/**
- * Display error `msg`.
- */
-
-function error(msg) {
- document.body.appendChild(fragment('<div id="mocha-error">%s</div>', msg));
-}
-
-/**
- * Return a DOM fragment from `html`.
- */
-
-function fragment(html) {
- var args = arguments
- , div = document.createElement('div')
- , i = 1;
-
- div.innerHTML = html.replace(/%([se])/g, function(_, type){
- switch (type) {
- case 's': return String(args[i++]);
- case 'e': return escape(args[i++]);
- }
- });
-
- return div.firstChild;
-}
-
-/**
- * Check for suites that do not have elements
- * with `classname`, and hide them.
- */
-
-function hideSuitesWithout(classname) {
- var suites = document.getElementsByClassName('suite');
- for (var i = 0; i < suites.length; i++) {
- var els = suites[i].getElementsByClassName(classname);
- if (0 == els.length) suites[i].className += ' hidden';
- }
-}
-
-/**
- * Unhide .hidden suites.
- */
-
-function unhide() {
- var els = document.getElementsByClassName('suite hidden');
- for (var i = 0; i < els.length; ++i) {
- els[i].className = els[i].className.replace('suite hidden', 'suite');
- }
-}
-
-/**
- * Set `el` text to `str`.
- */
-
-function text(el, str) {
- if (el.textContent) {
- el.textContent = str;
- } else {
- el.innerText = str;
- }
-}
-
-/**
- * Listen on `event` with callback `fn`.
- */
-
-function on(el, event, fn) {
- if (el.addEventListener) {
- el.addEventListener(event, fn, false);
- } else {
- el.attachEvent('on' + event, fn);
- }
-}
-
-}); // module: reporters/html.js
-
-require.register("reporters/index.js", function(module, exports, require){
-exports.Base = require('./base');
-exports.Dot = require('./dot');
-exports.Doc = require('./doc');
-exports.TAP = require('./tap');
-exports.JSON = require('./json');
-exports.HTML = require('./html');
-exports.List = require('./list');
-exports.Min = require('./min');
-exports.Spec = require('./spec');
-exports.Nyan = require('./nyan');
-exports.XUnit = require('./xunit');
-exports.Markdown = require('./markdown');
-exports.Progress = require('./progress');
-exports.Landing = require('./landing');
-exports.JSONCov = require('./json-cov');
-exports.HTMLCov = require('./html-cov');
-exports.JSONStream = require('./json-stream');
-
-}); // module: reporters/index.js
-
-require.register("reporters/json-cov.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base');
-
-/**
- * Expose `JSONCov`.
- */
-
-exports = module.exports = JSONCov;
-
-/**
- * Initialize a new `JsCoverage` reporter.
- *
- * @param {Runner} runner
- * @param {Boolean} output
- * @api public
- */
-
-function JSONCov(runner, output) {
- var self = this;
- output = 1 == arguments.length ? true : output;
-
- Base.call(this, runner);
-
- var tests = []
- , failures = []
- , passes = [];
-
- runner.on('test end', function(test){
- tests.push(test);
- });
-
- runner.on('pass', function(test){
- passes.push(test);
- });
-
- runner.on('fail', function(test){
- failures.push(test);
- });
-
- runner.on('end', function(){
- var cov = global._$jscoverage || {};
- var result = self.cov = map(cov);
- result.stats = self.stats;
- result.tests = tests.map(clean);
- result.failures = failures.map(clean);
- result.passes = passes.map(clean);
- if (!output) return;
- process.stdout.write(JSON.stringify(result, null, 2 ));
- });
-}
-
-/**
- * Map jscoverage data to a JSON structure
- * suitable for reporting.
- *
- * @param {Object} cov
- * @return {Object}
- * @api private
- */
-
-function map(cov) {
- var ret = {
- instrumentation: 'node-jscoverage'
- , sloc: 0
- , hits: 0
- , misses: 0
- , coverage: 0
- , files: []
- };
-
- for (var filename in cov) {
- var data = coverage(filename, cov[filename]);
- ret.files.push(data);
- ret.hits += data.hits;
- ret.misses += data.misses;
- ret.sloc += data.sloc;
- }
-
- ret.files.sort(function(a, b) {
- return a.filename.localeCompare(b.filename);
- });
-
- if (ret.sloc > 0) {
- ret.coverage = (ret.hits / ret.sloc) * 100;
- }
-
- return ret;
-}
-
-/**
- * Map jscoverage data for a single source file
- * to a JSON structure suitable for reporting.
- *
- * @param {String} filename name of the source file
- * @param {Object} data jscoverage coverage data
- * @return {Object}
- * @api private
- */
-
-function coverage(filename, data) {
- var ret = {
- filename: filename,
- coverage: 0,
- hits: 0,
- misses: 0,
- sloc: 0,
- source: {}
- };
-
- data.source.forEach(function(line, num){
- num++;
-
- if (data[num] === 0) {
- ret.misses++;
- ret.sloc++;
- } else if (data[num] !== undefined) {
- ret.hits++;
- ret.sloc++;
- }
-
- ret.source[num] = {
- source: line
- , coverage: data[num] === undefined
- ? ''
- : data[num]
- };
- });
-
- ret.coverage = ret.hits / ret.sloc * 100;
-
- return ret;
-}
-
-/**
- * Return a plain-object representation of `test`
- * free of cyclic properties etc.
- *
- * @param {Object} test
- * @return {Object}
- * @api private
- */
-
-function clean(test) {
- return {
- title: test.title
- , fullTitle: test.fullTitle()
- , duration: test.duration
- }
-}
-
-}); // module: reporters/json-cov.js
-
-require.register("reporters/json-stream.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , color = Base.color;
-
-/**
- * Expose `List`.
- */
-
-exports = module.exports = List;
-
-/**
- * Initialize a new `List` test reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function List(runner) {
- Base.call(this, runner);
-
- var self = this
- , stats = this.stats
- , total = runner.total;
-
- runner.on('start', function(){
- console.log(JSON.stringify(['start', { total: total }]));
- });
-
- runner.on('pass', function(test){
- console.log(JSON.stringify(['pass', clean(test)]));
- });
-
- runner.on('fail', function(test, err){
- test = clean(test);
- test.err = err.message;
- console.log(JSON.stringify(['fail', test]));
- });
-
- runner.on('end', function(){
- process.stdout.write(JSON.stringify(['end', self.stats]));
- });
-}
-
-/**
- * Return a plain-object representation of `test`
- * free of cyclic properties etc.
- *
- * @param {Object} test
- * @return {Object}
- * @api private
- */
-
-function clean(test) {
- return {
- title: test.title
- , fullTitle: test.fullTitle()
- , duration: test.duration
- }
-}
-
-}); // module: reporters/json-stream.js
-
-require.register("reporters/json.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , cursor = Base.cursor
- , color = Base.color;
-
-/**
- * Expose `JSON`.
- */
-
-exports = module.exports = JSONReporter;
-
-/**
- * Initialize a new `JSON` reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function JSONReporter(runner) {
- var self = this;
- Base.call(this, runner);
-
- var tests = []
- , pending = []
- , failures = []
- , passes = [];
-
- runner.on('test end', function(test){
- tests.push(test);
- });
-
- runner.on('pass', function(test){
- passes.push(test);
- });
-
- runner.on('fail', function(test){
- failures.push(test);
- });
-
- runner.on('pending', function(test){
- pending.push(test);
- });
-
- runner.on('end', function(){
- var obj = {
- stats: self.stats,
- tests: tests.map(clean),
- pending: pending.map(clean),
- failures: failures.map(clean),
- passes: passes.map(clean)
- };
-
- runner.testResults = obj;
-
- process.stdout.write(JSON.stringify(obj, null, 2));
- });
-}
-
-/**
- * Return a plain-object representation of `test`
- * free of cyclic properties etc.
- *
- * @param {Object} test
- * @return {Object}
- * @api private
- */
-
-function clean(test) {
- return {
- title: test.title,
- fullTitle: test.fullTitle(),
- duration: test.duration,
- err: errorJSON(test.err || {})
- }
-}
-
-/**
- * Transform `error` into a JSON object.
- * @param {Error} err
- * @return {Object}
- */
-
-function errorJSON(err) {
- var res = {};
- Object.getOwnPropertyNames(err).forEach(function(key) {
- res[key] = err[key];
- }, err);
- return res;
-}
-
-}); // module: reporters/json.js
-
-require.register("reporters/landing.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , cursor = Base.cursor
- , color = Base.color;
-
-/**
- * Expose `Landing`.
- */
-
-exports = module.exports = Landing;
-
-/**
- * Airplane color.
- */
-
-Base.colors.plane = 0;
-
-/**
- * Airplane crash color.
- */
-
-Base.colors['plane crash'] = 31;
-
-/**
- * Runway color.
- */
-
-Base.colors.runway = 90;
-
-/**
- * Initialize a new `Landing` reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function Landing(runner) {
- Base.call(this, runner);
-
- var self = this
- , stats = this.stats
- , width = Base.window.width * .75 | 0
- , total = runner.total
- , stream = process.stdout
- , plane = color('plane', '✈')
- , crashed = -1
- , n = 0;
-
- function runway() {
- var buf = Array(width).join('-');
- return ' ' + color('runway', buf);
- }
-
- runner.on('start', function(){
- stream.write('\n\n\n ');
- cursor.hide();
- });
-
- runner.on('test end', function(test){
- // check if the plane crashed
- var col = -1 == crashed
- ? width * ++n / total | 0
- : crashed;
-
- // show the crash
- if ('failed' == test.state) {
- plane = color('plane crash', '✈');
- crashed = col;
- }
-
- // render landing strip
- stream.write('\u001b['+(width+1)+'D\u001b[2A');
- stream.write(runway());
- stream.write('\n ');
- stream.write(color('runway', Array(col).join('⋅')));
- stream.write(plane)
- stream.write(color('runway', Array(width - col).join('⋅') + '\n'));
- stream.write(runway());
- stream.write('\u001b[0m');
- });
-
- runner.on('end', function(){
- cursor.show();
- console.log();
- self.epilogue();
- });
-}
-
-/**
- * Inherit from `Base.prototype`.
- */
-
-function F(){}
-F.prototype = Base.prototype;
-Landing.prototype = new F;
-Landing.prototype.constructor = Landing;
-
-
-}); // module: reporters/landing.js
-
-require.register("reporters/list.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , cursor = Base.cursor
- , color = Base.color;
-
-/**
- * Expose `List`.
- */
-
-exports = module.exports = List;
-
-/**
- * Initialize a new `List` test reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function List(runner) {
- Base.call(this, runner);
-
- var self = this
- , stats = this.stats
- , n = 0;
-
- runner.on('start', function(){
- console.log();
- });
-
- runner.on('test', function(test){
- process.stdout.write(color('pass', ' ' + test.fullTitle() + ': '));
- });
-
- runner.on('pending', function(test){
- var fmt = color('checkmark', ' -')
- + color('pending', ' %s');
- console.log(fmt, test.fullTitle());
- });
-
- runner.on('pass', function(test){
- var fmt = color('checkmark', ' '+Base.symbols.dot)
- + color('pass', ' %s: ')
- + color(test.speed, '%dms');
- cursor.CR();
- console.log(fmt, test.fullTitle(), test.duration);
- });
-
- runner.on('fail', function(test, err){
- cursor.CR();
- console.log(color('fail', ' %d) %s'), ++n, test.fullTitle());
- });
-
- runner.on('end', self.epilogue.bind(self));
-}
-
-/**
- * Inherit from `Base.prototype`.
- */
-
-function F(){}
-F.prototype = Base.prototype;
-List.prototype = new F;
-List.prototype.constructor = List;
-
-
-}); // module: reporters/list.js
-
-require.register("reporters/markdown.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , utils = require('../utils');
-
-/**
- * Constants
- */
-
-var SUITE_PREFIX = '$';
-
-/**
- * Expose `Markdown`.
- */
-
-exports = module.exports = Markdown;
-
-/**
- * Initialize a new `Markdown` reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function Markdown(runner) {
- Base.call(this, runner);
-
- var self = this
- , stats = this.stats
- , level = 0
- , buf = '';
-
- function title(str) {
- return Array(level).join('#') + ' ' + str;
- }
-
- function indent() {
- return Array(level).join(' ');
- }
-
- function mapTOC(suite, obj) {
- var ret = obj,
- key = SUITE_PREFIX + suite.title;
- obj = obj[key] = obj[key] || { suite: suite };
- suite.suites.forEach(function(suite){
- mapTOC(suite, obj);
- });
- return ret;
- }
-
- function stringifyTOC(obj, level) {
- ++level;
- var buf = '';
- var link;
- for (var key in obj) {
- if ('suite' == key) continue;
- if (key !== SUITE_PREFIX) {
- link = ' - [' + key.substring(1) + ']';
- link += '(#' + utils.slug(obj[key].suite.fullTitle()) + ')\n';
- buf += Array(level).join(' ') + link;
- }
- buf += stringifyTOC(obj[key], level);
- }
- return buf;
- }
-
- function generateTOC(suite) {
- var obj = mapTOC(suite, {});
- return stringifyTOC(obj, 0);
- }
-
- generateTOC(runner.suite);
-
- runner.on('suite', function(suite){
- ++level;
- var slug = utils.slug(suite.fullTitle());
- buf += '<a name="' + slug + '"></a>' + '\n';
- buf += title(suite.title) + '\n';
- });
-
- runner.on('suite end', function(suite){
- --level;
- });
-
- runner.on('pass', function(test){
- var code = utils.clean(test.fn.toString());
- buf += test.title + '.\n';
- buf += '\n```js\n';
- buf += code + '\n';
- buf += '```\n\n';
- });
-
- runner.on('end', function(){
- process.stdout.write('# TOC\n');
- process.stdout.write(generateTOC(runner.suite));
- process.stdout.write(buf);
- });
-}
-
-}); // module: reporters/markdown.js
-
-require.register("reporters/min.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base');
-
-/**
- * Expose `Min`.
- */
-
-exports = module.exports = Min;
-
-/**
- * Initialize a new `Min` minimal test reporter (best used with --watch).
- *
- * @param {Runner} runner
- * @api public
- */
-
-function Min(runner) {
- Base.call(this, runner);
-
- runner.on('start', function(){
- // clear screen
- process.stdout.write('\u001b[2J');
- // set cursor position
- process.stdout.write('\u001b[1;3H');
- });
-
- runner.on('end', this.epilogue.bind(this));
-}
-
-/**
- * Inherit from `Base.prototype`.
- */
-
-function F(){}
-F.prototype = Base.prototype;
-Min.prototype = new F;
-Min.prototype.constructor = Min;
-
-
-}); // module: reporters/min.js
-
-require.register("reporters/nyan.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base');
-
-/**
- * Expose `Dot`.
- */
-
-exports = module.exports = NyanCat;
-
-/**
- * Initialize a new `Dot` matrix test reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function NyanCat(runner) {
- Base.call(this, runner);
- var self = this
- , stats = this.stats
- , width = Base.window.width * .75 | 0
- , rainbowColors = this.rainbowColors = self.generateColors()
- , colorIndex = this.colorIndex = 0
- , numerOfLines = this.numberOfLines = 4
- , trajectories = this.trajectories = [[], [], [], []]
- , nyanCatWidth = this.nyanCatWidth = 11
- , trajectoryWidthMax = this.trajectoryWidthMax = (width - nyanCatWidth)
- , scoreboardWidth = this.scoreboardWidth = 5
- , tick = this.tick = 0
- , n = 0;
-
- runner.on('start', function(){
- Base.cursor.hide();
- self.draw();
- });
-
- runner.on('pending', function(test){
- self.draw();
- });
-
- runner.on('pass', function(test){
- self.draw();
- });
-
- runner.on('fail', function(test, err){
- self.draw();
- });
-
- runner.on('end', function(){
- Base.cursor.show();
- for (var i = 0; i < self.numberOfLines; i++) write('\n');
- self.epilogue();
- });
-}
-
-/**
- * Draw the nyan cat
- *
- * @api private
- */
-
-NyanCat.prototype.draw = function(){
- this.appendRainbow();
- this.drawScoreboard();
- this.drawRainbow();
- this.drawNyanCat();
- this.tick = !this.tick;
-};
-
-/**
- * Draw the "scoreboard" showing the number
- * of passes, failures and pending tests.
- *
- * @api private
- */
-
-NyanCat.prototype.drawScoreboard = function(){
- var stats = this.stats;
-
- function draw(type, n) {
- write(' ');
- write(Base.color(type, n));
- write('\n');
- }
-
- draw('green', stats.passes);
- draw('fail', stats.failures);
- draw('pending', stats.pending);
- write('\n');
-
- this.cursorUp(this.numberOfLines);
-};
-
-/**
- * Append the rainbow.
- *
- * @api private
- */
-
-NyanCat.prototype.appendRainbow = function(){
- var segment = this.tick ? '_' : '-';
- var rainbowified = this.rainbowify(segment);
-
- for (var index = 0; index < this.numberOfLines; index++) {
- var trajectory = this.trajectories[index];
- if (trajectory.length >= this.trajectoryWidthMax) trajectory.shift();
- trajectory.push(rainbowified);
- }
-};
-
-/**
- * Draw the rainbow.
- *
- * @api private
- */
-
-NyanCat.prototype.drawRainbow = function(){
- var self = this;
-
- this.trajectories.forEach(function(line, index) {
- write('\u001b[' + self.scoreboardWidth + 'C');
- write(line.join(''));
- write('\n');
- });
-
- this.cursorUp(this.numberOfLines);
-};
-
-/**
- * Draw the nyan cat
- *
- * @api private
- */
-
-NyanCat.prototype.drawNyanCat = function() {
- var self = this;
- var startWidth = this.scoreboardWidth + this.trajectories[0].length;
- var dist = '\u001b[' + startWidth + 'C';
- var padding = '';
-
- write(dist);
- write('_,------,');
- write('\n');
-
- write(dist);
- padding = self.tick ? ' ' : ' ';
- write('_|' + padding + '/\\_/\\ ');
- write('\n');
-
- write(dist);
- padding = self.tick ? '_' : '__';
- var tail = self.tick ? '~' : '^';
- var face;
- write(tail + '|' + padding + this.face() + ' ');
- write('\n');
-
- write(dist);
- padding = self.tick ? ' ' : ' ';
- write(padding + '"" "" ');
- write('\n');
-
- this.cursorUp(this.numberOfLines);
-};
-
-/**
- * Draw nyan cat face.
- *
- * @return {String}
- * @api private
- */
-
-NyanCat.prototype.face = function() {
- var stats = this.stats;
- if (stats.failures) {
- return '( x .x)';
- } else if (stats.pending) {
- return '( o .o)';
- } else if(stats.passes) {
- return '( ^ .^)';
- } else {
- return '( - .-)';
- }
-};
-
-/**
- * Move cursor up `n`.
- *
- * @param {Number} n
- * @api private
- */
-
-NyanCat.prototype.cursorUp = function(n) {
- write('\u001b[' + n + 'A');
-};
-
-/**
- * Move cursor down `n`.
- *
- * @param {Number} n
- * @api private
- */
-
-NyanCat.prototype.cursorDown = function(n) {
- write('\u001b[' + n + 'B');
-};
-
-/**
- * Generate rainbow colors.
- *
- * @return {Array}
- * @api private
- */
-
-NyanCat.prototype.generateColors = function(){
- var colors = [];
-
- for (var i = 0; i < (6 * 7); i++) {
- var pi3 = Math.floor(Math.PI / 3);
- var n = (i * (1.0 / 6));
- var r = Math.floor(3 * Math.sin(n) + 3);
- var g = Math.floor(3 * Math.sin(n + 2 * pi3) + 3);
- var b = Math.floor(3 * Math.sin(n + 4 * pi3) + 3);
- colors.push(36 * r + 6 * g + b + 16);
- }
-
- return colors;
-};
-
-/**
- * Apply rainbow to the given `str`.
- *
- * @param {String} str
- * @return {String}
- * @api private
- */
-
-NyanCat.prototype.rainbowify = function(str){
- if (!Base.useColors)
- return str;
- var color = this.rainbowColors[this.colorIndex % this.rainbowColors.length];
- this.colorIndex += 1;
- return '\u001b[38;5;' + color + 'm' + str + '\u001b[0m';
-};
-
-/**
- * Stdout helper.
- */
-
-function write(string) {
- process.stdout.write(string);
-}
-
-/**
- * Inherit from `Base.prototype`.
- */
-
-function F(){}
-F.prototype = Base.prototype;
-NyanCat.prototype = new F;
-NyanCat.prototype.constructor = NyanCat;
-
-
-}); // module: reporters/nyan.js
-
-require.register("reporters/progress.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , cursor = Base.cursor
- , color = Base.color;
-
-/**
- * Expose `Progress`.
- */
-
-exports = module.exports = Progress;
-
-/**
- * General progress bar color.
- */
-
-Base.colors.progress = 90;
-
-/**
- * Initialize a new `Progress` bar test reporter.
- *
- * @param {Runner} runner
- * @param {Object} options
- * @api public
- */
-
-function Progress(runner, options) {
- Base.call(this, runner);
-
- options = options || {}
- var self = this
- , stats = this.stats
- , width = Base.window.width * .50 | 0
- , total = runner.total
- , complete = 0
- , max = Math.max
- , lastN = -1;
-
- // default chars
- options.open = options.open || '[';
- options.complete = options.complete || '▬';
- options.incomplete = options.incomplete || Base.symbols.dot;
- options.close = options.close || ']';
- options.verbose = false;
-
- // tests started
- runner.on('start', function(){
- console.log();
- cursor.hide();
- });
-
- // tests complete
- runner.on('test end', function(){
- complete++;
- var incomplete = total - complete
- , percent = complete / total
- , n = width * percent | 0
- , i = width - n;
-
- if (lastN === n && !options.verbose) {
- // Don't re-render the line if it hasn't changed
- return;
- }
- lastN = n;
-
- cursor.CR();
- process.stdout.write('\u001b[J');
- process.stdout.write(color('progress', ' ' + options.open));
- process.stdout.write(Array(n).join(options.complete));
- process.stdout.write(Array(i).join(options.incomplete));
- process.stdout.write(color('progress', options.close));
- if (options.verbose) {
- process.stdout.write(color('progress', ' ' + complete + ' of ' + total));
- }
- });
-
- // tests are complete, output some stats
- // and the failures if any
- runner.on('end', function(){
- cursor.show();
- console.log();
- self.epilogue();
- });
-}
-
-/**
- * Inherit from `Base.prototype`.
- */
-
-function F(){}
-F.prototype = Base.prototype;
-Progress.prototype = new F;
-Progress.prototype.constructor = Progress;
-
-
-}); // module: reporters/progress.js
-
-require.register("reporters/spec.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , cursor = Base.cursor
- , color = Base.color;
-
-/**
- * Expose `Spec`.
- */
-
-exports = module.exports = Spec;
-
-/**
- * Initialize a new `Spec` test reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function Spec(runner) {
- Base.call(this, runner);
-
- var self = this
- , stats = this.stats
- , indents = 0
- , n = 0;
-
- function indent() {
- return Array(indents).join(' ')
- }
-
- runner.on('start', function(){
- console.log();
- });
-
- runner.on('suite', function(suite){
- ++indents;
- console.log(color('suite', '%s%s'), indent(), suite.title);
- });
-
- runner.on('suite end', function(suite){
- --indents;
- if (1 == indents) console.log();
- });
-
- runner.on('pending', function(test){
- var fmt = indent() + color('pending', ' - %s');
- console.log(fmt, test.title);
- });
-
- runner.on('pass', function(test){
- if ('fast' == test.speed) {
- var fmt = indent()
- + color('checkmark', ' ' + Base.symbols.ok)
- + color('pass', ' %s');
- cursor.CR();
- console.log(fmt, test.title);
- } else {
- fmt = indent()
- + color('checkmark', ' ' + Base.symbols.ok)
- + color('pass', ' %s')
- + color(test.speed, ' (%dms)');
- cursor.CR();
- console.log(fmt, test.title, test.duration);
- }
- });
-
- runner.on('fail', function(test, err){
- cursor.CR();
- console.log(indent() + color('fail', ' %d) %s'), ++n, test.title);
- });
-
- runner.on('end', self.epilogue.bind(self));
-}
-
-/**
- * Inherit from `Base.prototype`.
- */
-
-function F(){}
-F.prototype = Base.prototype;
-Spec.prototype = new F;
-Spec.prototype.constructor = Spec;
-
-
-}); // module: reporters/spec.js
-
-require.register("reporters/tap.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , cursor = Base.cursor
- , color = Base.color;
-
-/**
- * Expose `TAP`.
- */
-
-exports = module.exports = TAP;
-
-/**
- * Initialize a new `TAP` reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function TAP(runner) {
- Base.call(this, runner);
-
- var self = this
- , stats = this.stats
- , n = 1
- , passes = 0
- , failures = 0;
-
- runner.on('start', function(){
- var total = runner.grepTotal(runner.suite);
- console.log('%d..%d', 1, total);
- });
-
- runner.on('test end', function(){
- ++n;
- });
-
- runner.on('pending', function(test){
- console.log('ok %d %s # SKIP -', n, title(test));
- });
-
- runner.on('pass', function(test){
- passes++;
- console.log('ok %d %s', n, title(test));
- });
-
- runner.on('fail', function(test, err){
- failures++;
- console.log('not ok %d %s', n, title(test));
- if (err.stack) console.log(err.stack.replace(/^/gm, ' '));
- });
-
- runner.on('end', function(){
- console.log('# tests ' + (passes + failures));
- console.log('# pass ' + passes);
- console.log('# fail ' + failures);
- });
-}
-
-/**
- * Return a TAP-safe title of `test`
- *
- * @param {Object} test
- * @return {String}
- * @api private
- */
-
-function title(test) {
- return test.fullTitle().replace(/#/g, '');
-}
-
-}); // module: reporters/tap.js
-
-require.register("reporters/xunit.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Base = require('./base')
- , utils = require('../utils')
- , fs = require('browser/fs')
- , escape = utils.escape;
-
-/**
- * Save timer references to avoid Sinon interfering (see GH-237).
- */
-
-var Date = global.Date
- , setTimeout = global.setTimeout
- , setInterval = global.setInterval
- , clearTimeout = global.clearTimeout
- , clearInterval = global.clearInterval;
-
-/**
- * Expose `XUnit`.
- */
-
-exports = module.exports = XUnit;
-
-/**
- * Initialize a new `XUnit` reporter.
- *
- * @param {Runner} runner
- * @api public
- */
-
-function XUnit(runner, options) {
- Base.call(this, runner);
- var stats = this.stats
- , tests = []
- , self = this;
-
- if (options.reporterOptions && options.reporterOptions.output) {
- if (! fs.createWriteStream) {
- throw new Error('file output not supported in browser');
- }
- self.fileStream = fs.createWriteStream(options.reporterOptions.output);
- }
-
- runner.on('pending', function(test){
- tests.push(test);
- });
-
- runner.on('pass', function(test){
- tests.push(test);
- });
-
- runner.on('fail', function(test){
- tests.push(test);
- });
-
- runner.on('end', function(){
- self.write(tag('testsuite', {
- name: 'Mocha Tests'
- , tests: stats.tests
- , failures: stats.failures
- , errors: stats.failures
- , skipped: stats.tests - stats.failures - stats.passes
- , timestamp: (new Date).toUTCString()
- , time: (stats.duration / 1000) || 0
- }, false));
-
- tests.forEach(function(t) { self.test(t); });
- self.write('</testsuite>');
- });
-}
-
-/**
- * Override done to close the stream (if it's a file).
- */
-XUnit.prototype.done = function(failures, fn) {
- if (this.fileStream) {
- this.fileStream.end(function() {
- fn(failures);
- });
- } else {
- fn(failures);
- }
-};
-
-/**
- * Inherit from `Base.prototype`.
- */
-
-function F(){}
-F.prototype = Base.prototype;
-XUnit.prototype = new F;
-XUnit.prototype.constructor = XUnit;
-
-
-/**
- * Write out the given line
- */
-XUnit.prototype.write = function(line) {
- if (this.fileStream) {
- this.fileStream.write(line + '\n');
- } else {
- console.log(line);
- }
-};
-
-/**
- * Output tag for the given `test.`
- */
-
-XUnit.prototype.test = function(test, ostream) {
- var attrs = {
- classname: test.parent.fullTitle()
- , name: test.title
- , time: (test.duration / 1000) || 0
- };
-
- if ('failed' == test.state) {
- var err = test.err;
- this.write(tag('testcase', attrs, false, tag('failure', {}, false, cdata(escape(err.message) + "\n" + err.stack))));
- } else if (test.pending) {
- this.write(tag('testcase', attrs, false, tag('skipped', {}, true)));
- } else {
- this.write(tag('testcase', attrs, true) );
- }
-};
-
-/**
- * HTML tag helper.
- */
-
-function tag(name, attrs, close, content) {
- var end = close ? '/>' : '>'
- , pairs = []
- , tag;
-
- for (var key in attrs) {
- pairs.push(key + '="' + escape(attrs[key]) + '"');
- }
-
- tag = '<' + name + (pairs.length ? ' ' + pairs.join(' ') : '') + end;
- if (content) tag += content + '</' + name + end;
- return tag;
-}
-
-/**
- * Return cdata escaped CDATA `str`.
- */
-
-function cdata(str) {
- return '<![CDATA[' + escape(str) + ']]>';
-}
-
-}); // module: reporters/xunit.js
-
-require.register("runnable.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var EventEmitter = require('browser/events').EventEmitter
- , debug = require('browser/debug')('mocha:runnable')
- , Pending = require('./pending')
- , milliseconds = require('./ms')
- , utils = require('./utils');
-
-/**
- * Save timer references to avoid Sinon interfering (see GH-237).
- */
-
-var Date = global.Date
- , setTimeout = global.setTimeout
- , setInterval = global.setInterval
- , clearTimeout = global.clearTimeout
- , clearInterval = global.clearInterval;
-
-/**
- * Object#toString().
- */
-
-var toString = Object.prototype.toString;
-
-/**
- * Expose `Runnable`.
- */
-
-module.exports = Runnable;
-
-/**
- * Initialize a new `Runnable` with the given `title` and callback `fn`.
- *
- * @param {String} title
- * @param {Function} fn
- * @api private
- */
-
-function Runnable(title, fn) {
- this.title = title;
- this.fn = fn;
- this.async = fn && fn.length;
- this.sync = ! this.async;
- this._timeout = 2000;
- this._slow = 75;
- this._enableTimeouts = true;
- this.timedOut = false;
- this._trace = new Error('done() called multiple times')
-}
-
-/**
- * Inherit from `EventEmitter.prototype`.
- */
-
-function F(){}
-F.prototype = EventEmitter.prototype;
-Runnable.prototype = new F;
-Runnable.prototype.constructor = Runnable;
-
-
-/**
- * Set & get timeout `ms`.
- *
- * @param {Number|String} ms
- * @return {Runnable|Number} ms or self
- * @api private
- */
-
-Runnable.prototype.timeout = function(ms){
- if (0 == arguments.length) return this._timeout;
- if (ms === 0) this._enableTimeouts = false;
- if ('string' == typeof ms) ms = milliseconds(ms);
- debug('timeout %d', ms);
- this._timeout = ms;
- if (this.timer) this.resetTimeout();
- return this;
-};
-
-/**
- * Set & get slow `ms`.
- *
- * @param {Number|String} ms
- * @return {Runnable|Number} ms or self
- * @api private
- */
-
-Runnable.prototype.slow = function(ms){
- if (0 === arguments.length) return this._slow;
- if ('string' == typeof ms) ms = milliseconds(ms);
- debug('timeout %d', ms);
- this._slow = ms;
- return this;
-};
-
-/**
- * Set and & get timeout `enabled`.
- *
- * @param {Boolean} enabled
- * @return {Runnable|Boolean} enabled or self
- * @api private
- */
-
-Runnable.prototype.enableTimeouts = function(enabled){
- if (arguments.length === 0) return this._enableTimeouts;
- debug('enableTimeouts %s', enabled);
- this._enableTimeouts = enabled;
- return this;
-};
-
-/**
- * Halt and mark as pending.
- *
- * @api private
- */
-
-Runnable.prototype.skip = function(){
- throw new Pending();
-};
-
-/**
- * Return the full title generated by recursively
- * concatenating the parent's full title.
- *
- * @return {String}
- * @api public
- */
-
-Runnable.prototype.fullTitle = function(){
- return this.parent.fullTitle() + ' ' + this.title;
-};
-
-/**
- * Clear the timeout.
- *
- * @api private
- */
-
-Runnable.prototype.clearTimeout = function(){
- clearTimeout(this.timer);
-};
-
-/**
- * Inspect the runnable void of private properties.
- *
- * @return {String}
- * @api private
- */
-
-Runnable.prototype.inspect = function(){
- return JSON.stringify(this, function(key, val){
- if ('_' == key[0]) return undefined;
- if ('parent' == key) return '#<Suite>';
- if ('ctx' == key) return '#<Context>';
- return val;
- }, 2);
-};
-
-/**
- * Reset the timeout.
- *
- * @api private
- */
-
-Runnable.prototype.resetTimeout = function(){
- var self = this;
- var ms = this.timeout() || 1e9;
-
- if (!this._enableTimeouts) return;
- this.clearTimeout();
- this.timer = setTimeout(function(){
- if (!self._enableTimeouts) return;
- self.callback(new Error('timeout of ' + ms + 'ms exceeded. Ensure the done() callback is being called in this test.'));
- self.timedOut = true;
- }, ms);
-};
-
-/**
- * Whitelist these globals for this test run
- *
- * @api private
- */
-Runnable.prototype.globals = function(arr){
- var self = this;
- this._allowedGlobals = arr;
-};
-
-/**
- * Run the test and invoke `fn(err)`.
- *
- * @param {Function} fn
- * @api private
- */
-
-Runnable.prototype.run = function(fn){
- var self = this
- , start = new Date
- , ctx = this.ctx
- , finished
- , emitted;
-
- // Some times the ctx exists but it is not runnable
- if (ctx && ctx.runnable) ctx.runnable(this);
-
- // called multiple times
- function multiple(err) {
- if (emitted) return;
- emitted = true;
- self.emit('error', err || new Error('done() called multiple times; stacktrace may be inaccurate'));
- }
-
- // finished
- function done(err) {
- var ms = self.timeout();
- if (self.timedOut) return undefined;
- if (finished) return multiple(err || self._trace);
-
- // Discard the resolution if this test has already failed asynchronously
- if (self.state) return undefined;
-
- self.clearTimeout();
- self.duration = new Date - start;
- finished = true;
- if (!err && self.duration > ms && self._enableTimeouts) err = new Error('timeout of ' + ms + 'ms exceeded. Ensure the done() callback is being called in this test.');
- fn(err);
- }
-
- // for .resetTimeout()
- this.callback = done;
-
- // explicit async with `done` argument
- if (this.async) {
- this.resetTimeout();
-
- try {
- this.fn.call(ctx, function(err){
- if (err instanceof Error || toString.call(err) === "[object Error]") return done(err);
- if (null != err) {
- if (Object.prototype.toString.call(err) === '[object Object]') {
- return done(new Error('done() invoked with non-Error: ' + JSON.stringify(err)));
- } else {
- return done(new Error('done() invoked with non-Error: ' + err));
- }
- }
- done();
- });
- } catch (err) {
- done(utils.getError(err));
- }
- return undefined;
- }
-
- if (this.asyncOnly) {
- return done(new Error('--async-only option in use without declaring `done()`'));
- }
-
- // sync or promise-returning
- try {
- if (this.pending) {
- done();
- } else {
- callFn(this.fn);
- }
- } catch (err) {
- done(utils.getError(err));
- }
-
- function callFn(fn) {
- var result = fn.call(ctx);
- if (result && typeof result.then === 'function') {
- self.resetTimeout();
- result
- .then(function() {
- done()
- },
- function(reason) {
- done(reason || new Error('Promise rejected with no or falsy reason'))
- });
- } else {
- done();
- }
- }
-};
-
-}); // module: runnable.js
-
-require.register("runner.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var EventEmitter = require('browser/events').EventEmitter
- , debug = require('browser/debug')('mocha:runner')
- , Pending = require('./pending')
- , Test = require('./test')
- , utils = require('./utils')
- , filter = utils.filter
- , keys = utils.keys
- , type = utils.type
- , stringify = utils.stringify
- , stackFilter = utils.stackTraceFilter();
-
-/**
- * Non-enumerable globals.
- */
-
-var globals = [
- 'setTimeout',
- 'clearTimeout',
- 'setInterval',
- 'clearInterval',
- 'XMLHttpRequest',
- 'Date',
- 'setImmediate',
- 'clearImmediate'
-];
-
-/**
- * Expose `Runner`.
- */
-
-module.exports = Runner;
-
-/**
- * Initialize a `Runner` for the given `suite`.
- *
- * Events:
- *
- * - `start` execution started
- * - `end` execution complete
- * - `suite` (suite) test suite execution started
- * - `suite end` (suite) all tests (and sub-suites) have finished
- * - `test` (test) test execution started
- * - `test end` (test) test completed
- * - `hook` (hook) hook execution started
- * - `hook end` (hook) hook complete
- * - `pass` (test) test passed
- * - `fail` (test, err) test failed
- * - `pending` (test) test pending
- *
- * @param {Suite} suite Root suite
- * @param {boolean} [delay] Whether or not to delay execution of root suite
- * until ready.
- * @api public
- */
-
-function Runner(suite, delay) {
- var self = this;
- this._globals = [];
- this._abort = false;
- this._delay = delay;
- this.suite = suite;
- this.total = suite.total();
- this.failures = 0;
- this.on('test end', function(test){ self.checkGlobals(test); });
- this.on('hook end', function(hook){ self.checkGlobals(hook); });
- this.grep(/.*/);
- this.globals(this.globalProps().concat(extraGlobals()));
-}
-
-/**
- * Wrapper for setImmediate, process.nextTick, or browser polyfill.
- *
- * @param {Function} fn
- * @api private
- */
-
-Runner.immediately = global.setImmediate || process.nextTick;
-
-/**
- * Inherit from `EventEmitter.prototype`.
- */
-
-function F(){}
-F.prototype = EventEmitter.prototype;
-Runner.prototype = new F;
-Runner.prototype.constructor = Runner;
-
-
-/**
- * Run tests with full titles matching `re`. Updates runner.total
- * with number of tests matched.
- *
- * @param {RegExp} re
- * @param {Boolean} invert
- * @return {Runner} for chaining
- * @api public
- */
-
-Runner.prototype.grep = function(re, invert){
- debug('grep %s', re);
- this._grep = re;
- this._invert = invert;
- this.total = this.grepTotal(this.suite);
- return this;
-};
-
-/**
- * Returns the number of tests matching the grep search for the
- * given suite.
- *
- * @param {Suite} suite
- * @return {Number}
- * @api public
- */
-
-Runner.prototype.grepTotal = function(suite) {
- var self = this;
- var total = 0;
-
- suite.eachTest(function(test){
- var match = self._grep.test(test.fullTitle());
- if (self._invert) match = !match;
- if (match) total++;
- });
-
- return total;
-};
-
-/**
- * Return a list of global properties.
- *
- * @return {Array}
- * @api private
- */
-
-Runner.prototype.globalProps = function() {
- var props = utils.keys(global);
-
- // non-enumerables
- for (var i = 0; i < globals.length; ++i) {
- if (~utils.indexOf(props, globals[i])) continue;
- props.push(globals[i]);
- }
-
- return props;
-};
-
-/**
- * Allow the given `arr` of globals.
- *
- * @param {Array} arr
- * @return {Runner} for chaining
- * @api public
- */
-
-Runner.prototype.globals = function(arr){
- if (0 == arguments.length) return this._globals;
- debug('globals %j', arr);
- this._globals = this._globals.concat(arr);
- return this;
-};
-
-/**
- * Check for global variable leaks.
- *
- * @api private
- */
-
-Runner.prototype.checkGlobals = function(test){
- if (this.ignoreLeaks) return;
- var ok = this._globals;
-
- var globals = this.globalProps();
- var leaks;
-
- if (test) {
- ok = ok.concat(test._allowedGlobals || []);
- }
-
- if(this.prevGlobalsLength == globals.length) return;
- this.prevGlobalsLength = globals.length;
-
- leaks = filterLeaks(ok, globals);
- this._globals = this._globals.concat(leaks);
-
- if (leaks.length > 1) {
- this.fail(test, new Error('global leaks detected: ' + leaks.join(', ') + ''));
- } else if (leaks.length) {
- this.fail(test, new Error('global leak detected: ' + leaks[0]));
- }
-};
-
-/**
- * Fail the given `test`.
- *
- * @param {Test} test
- * @param {Error} err
- * @api private
- */
-
-Runner.prototype.fail = function(test, err) {
- ++this.failures;
- test.state = 'failed';
-
- if (!(err instanceof Error)) {
- err = new Error('the ' + type(err) + ' ' + stringify(err) + ' was thrown, throw an Error :)');
- }
-
- err.stack = (this.fullStackTrace || !err.stack)
- ? err.stack
- : stackFilter(err.stack);
-
- this.emit('fail', test, err);
-};
-
-/**
- * Fail the given `hook` with `err`.
- *
- * Hook failures work in the following pattern:
- * - If bail, then exit
- * - Failed `before` hook skips all tests in a suite and subsuites,
- * but jumps to corresponding `after` hook
- * - Failed `before each` hook skips remaining tests in a
- * suite and jumps to corresponding `after each` hook,
- * which is run only once
- * - Failed `after` hook does not alter
- * execution order
- * - Failed `after each` hook skips remaining tests in a
- * suite and subsuites, but executes other `after each`
- * hooks
- *
- * @param {Hook} hook
- * @param {Error} err
- * @api private
- */
-
-Runner.prototype.failHook = function(hook, err){
- this.fail(hook, err);
- if (this.suite.bail()) {
- this.emit('end');
- }
-};
-
-/**
- * Run hook `name` callbacks and then invoke `fn()`.
- *
- * @param {String} name
- * @param {Function} function
- * @api private
- */
-
-Runner.prototype.hook = function(name, fn){
- var suite = this.suite
- , hooks = suite['_' + name]
- , self = this
- , timer;
-
- function next(i) {
- var hook = hooks[i];
- if (!hook) return fn();
- self.currentRunnable = hook;
-
- hook.ctx.currentTest = self.test;
-
- self.emit('hook', hook);
-
- hook.on('error', function(err){
- self.failHook(hook, err);
- });
-
- hook.run(function(err){
- hook.removeAllListeners('error');
- var testError = hook.error();
- if (testError) self.fail(self.test, testError);
- if (err) {
- if (err instanceof Pending) {
- suite.pending = true;
- } else {
- self.failHook(hook, err);
-
- // stop executing hooks, notify callee of hook err
- return fn(err);
- }
- }
- self.emit('hook end', hook);
- delete hook.ctx.currentTest;
- next(++i);
- });
- }
-
- Runner.immediately(function(){
- next(0);
- });
-};
-
-/**
- * Run hook `name` for the given array of `suites`
- * in order, and callback `fn(err, errSuite)`.
- *
- * @param {String} name
- * @param {Array} suites
- * @param {Function} fn
- * @api private
- */
-
-Runner.prototype.hooks = function(name, suites, fn){
- var self = this
- , orig = this.suite;
-
- function next(suite) {
- self.suite = suite;
-
- if (!suite) {
- self.suite = orig;
- return fn();
- }
-
- self.hook(name, function(err){
- if (err) {
- var errSuite = self.suite;
- self.suite = orig;
- return fn(err, errSuite);
- }
-
- next(suites.pop());
- });
- }
-
- next(suites.pop());
-};
-
-/**
- * Run hooks from the top level down.
- *
- * @param {String} name
- * @param {Function} fn
- * @api private
- */
-
-Runner.prototype.hookUp = function(name, fn){
- var suites = [this.suite].concat(this.parents()).reverse();
- this.hooks(name, suites, fn);
-};
-
-/**
- * Run hooks from the bottom up.
- *
- * @param {String} name
- * @param {Function} fn
- * @api private
- */
-
-Runner.prototype.hookDown = function(name, fn){
- var suites = [this.suite].concat(this.parents());
- this.hooks(name, suites, fn);
-};
-
-/**
- * Return an array of parent Suites from
- * closest to furthest.
- *
- * @return {Array}
- * @api private
- */
-
-Runner.prototype.parents = function(){
- var suite = this.suite
- , suites = [];
- while (suite = suite.parent) suites.push(suite);
- return suites;
-};
-
-/**
- * Run the current test and callback `fn(err)`.
- *
- * @param {Function} fn
- * @api private
- */
-
-Runner.prototype.runTest = function(fn){
- var test = this.test
- , self = this;
-
- if (this.asyncOnly) test.asyncOnly = true;
-
- try {
- test.on('error', function(err){
- self.fail(test, err);
- });
- test.run(fn);
- } catch (err) {
- fn(err);
- }
-};
-
-/**
- * Run tests in the given `suite` and invoke
- * the callback `fn()` when complete.
- *
- * @param {Suite} suite
- * @param {Function} fn
- * @api private
- */
-
-Runner.prototype.runTests = function(suite, fn){
- var self = this
- , tests = suite.tests.slice()
- , test;
-
-
- function hookErr(err, errSuite, after) {
- // before/after Each hook for errSuite failed:
- var orig = self.suite;
-
- // for failed 'after each' hook start from errSuite parent,
- // otherwise start from errSuite itself
- self.suite = after ? errSuite.parent : errSuite;
-
- if (self.suite) {
- // call hookUp afterEach
- self.hookUp('afterEach', function(err2, errSuite2) {
- self.suite = orig;
- // some hooks may fail even now
- if (err2) return hookErr(err2, errSuite2, true);
- // report error suite
- fn(errSuite);
- });
- } else {
- // there is no need calling other 'after each' hooks
- self.suite = orig;
- fn(errSuite);
- }
- }
-
- function next(err, errSuite) {
- // if we bail after first err
- if (self.failures && suite._bail) return fn();
-
- if (self._abort) return fn();
-
- if (err) return hookErr(err, errSuite, true);
-
- // next test
- test = tests.shift();
-
- // all done
- if (!test) return fn();
-
- // grep
- var match = self._grep.test(test.fullTitle());
- if (self._invert) match = !match;
- if (!match) return next();
-
- // pending
- if (test.pending) {
- self.emit('pending', test);
- self.emit('test end', test);
- return next();
- }
-
- // execute test and hook(s)
- self.emit('test', self.test = test);
- self.hookDown('beforeEach', function(err, errSuite){
-
- if (suite.pending) {
- self.emit('pending', test);
- self.emit('test end', test);
- return next();
- }
- if (err) return hookErr(err, errSuite, false);
-
- self.currentRunnable = self.test;
- self.runTest(function(err){
- test = self.test;
-
- if (err) {
- if (err instanceof Pending) {
- self.emit('pending', test);
- } else {
- self.fail(test, err);
- }
- self.emit('test end', test);
-
- if (err instanceof Pending) {
- return next();
- }
-
- return self.hookUp('afterEach', next);
- }
-
- test.state = 'passed';
- self.emit('pass', test);
- self.emit('test end', test);
- self.hookUp('afterEach', next);
- });
- });
- }
-
- this.next = next;
- next();
-};
-
-/**
- * Run the given `suite` and invoke the
- * callback `fn()` when complete.
- *
- * @param {Suite} suite
- * @param {Function} fn
- * @api private
- */
-
-Runner.prototype.runSuite = function(suite, fn){
- var total = this.grepTotal(suite)
- , self = this
- , i = 0;
-
- debug('run suite %s', suite.fullTitle());
-
- if (!total) return fn();
-
- this.emit('suite', this.suite = suite);
-
- function next(errSuite) {
- if (errSuite) {
- // current suite failed on a hook from errSuite
- if (errSuite == suite) {
- // if errSuite is current suite
- // continue to the next sibling suite
- return done();
- } else {
- // errSuite is among the parents of current suite
- // stop execution of errSuite and all sub-suites
- return done(errSuite);
- }
- }
-
- if (self._abort) return done();
-
- var curr = suite.suites[i++];
- if (!curr) return done();
- self.runSuite(curr, next);
- }
-
- function done(errSuite) {
- self.suite = suite;
- self.hook('afterAll', function(){
- self.emit('suite end', suite);
- fn(errSuite);
- });
- }
-
- this.hook('beforeAll', function(err){
- if (err) return done();
- self.runTests(suite, next);
- });
-};
-
-/**
- * Handle uncaught exceptions.
- *
- * @param {Error} err
- * @api private
- */
-
-Runner.prototype.uncaught = function(err){
- if (err) {
- debug('uncaught exception %s', err !== function () {
- return this;
- }.call(err) ? err : ( err.message || err ));
- } else {
- debug('uncaught undefined exception');
- err = utils.undefinedError();
- }
- err.uncaught = true;
-
- var runnable = this.currentRunnable;
- if (!runnable) return;
-
- runnable.clearTimeout();
-
- // Ignore errors if complete
- if (runnable.state) return;
- this.fail(runnable, err);
-
- // recover from test
- if ('test' == runnable.type) {
- this.emit('test end', runnable);
- this.hookUp('afterEach', this.next);
- return;
- }
-
- // bail on hooks
- this.emit('end');
-};
-
-/**
- * Run the root suite and invoke `fn(failures)`
- * on completion.
- *
- * @param {Function} fn
- * @return {Runner} for chaining
- * @api public
- */
-
-Runner.prototype.run = function(fn){
- var self = this,
- rootSuite = this.suite;
-
- fn = fn || function(){};
-
- function uncaught(err){
- self.uncaught(err);
- }
-
- function start() {
- self.emit('start');
- self.runSuite(rootSuite, function(){
- debug('finished running');
- self.emit('end');
- });
- }
-
- debug('start');
-
- // callback
- this.on('end', function(){
- debug('end');
- process.removeListener('uncaughtException', uncaught);
- fn(self.failures);
- });
-
- // uncaught exception
- process.on('uncaughtException', uncaught);
-
- if (this._delay) {
- // for reporters, I guess.
- // might be nice to debounce some dots while we wait.
- this.emit('waiting', rootSuite);
- rootSuite.once('run', start);
- }
- else {
- start();
- }
-
- return this;
-};
-
-/**
- * Cleanly abort execution
- *
- * @return {Runner} for chaining
- * @api public
- */
-Runner.prototype.abort = function(){
- debug('aborting');
- this._abort = true;
-};
-
-/**
- * Filter leaks with the given globals flagged as `ok`.
- *
- * @param {Array} ok
- * @param {Array} globals
- * @return {Array}
- * @api private
- */
-
-function filterLeaks(ok, globals) {
- return filter(globals, function(key){
- // Firefox and Chrome exposes iframes as index inside the window object
- if (/^d+/.test(key)) return false;
-
- // in firefox
- // if runner runs in an iframe, this iframe's window.getInterface method not init at first
- // it is assigned in some seconds
- if (global.navigator && /^getInterface/.test(key)) return false;
-
- // an iframe could be approached by window[iframeIndex]
- // in ie6,7,8 and opera, iframeIndex is enumerable, this could cause leak
- if (global.navigator && /^\d+/.test(key)) return false;
-
- // Opera and IE expose global variables for HTML element IDs (issue #243)
- if (/^mocha-/.test(key)) return false;
-
- var matched = filter(ok, function(ok){
- if (~ok.indexOf('*')) return 0 == key.indexOf(ok.split('*')[0]);
- return key == ok;
- });
- return matched.length == 0 && (!global.navigator || 'onerror' !== key);
- });
-}
-
-/**
- * Array of globals dependent on the environment.
- *
- * @return {Array}
- * @api private
- */
-
-function extraGlobals() {
- if (typeof(process) === 'object' &&
- typeof(process.version) === 'string') {
-
- var nodeVersion = process.version.split('.').reduce(function(a, v) {
- return a << 8 | v;
- });
-
- // 'errno' was renamed to process._errno in v0.9.11.
-
- if (nodeVersion < 0x00090B) {
- return ['errno'];
- }
- }
-
- return [];
-}
-
-}); // module: runner.js
-
-require.register("suite.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var EventEmitter = require('browser/events').EventEmitter
- , debug = require('browser/debug')('mocha:suite')
- , milliseconds = require('./ms')
- , utils = require('./utils')
- , Hook = require('./hook');
-
-/**
- * Expose `Suite`.
- */
-
-exports = module.exports = Suite;
-
-/**
- * Create a new `Suite` with the given `title`
- * and parent `Suite`. When a suite with the
- * same title is already present, that suite
- * is returned to provide nicer reporter
- * and more flexible meta-testing.
- *
- * @param {Suite} parent
- * @param {String} title
- * @return {Suite}
- * @api public
- */
-
-exports.create = function(parent, title){
- var suite = new Suite(title, parent.ctx);
- suite.parent = parent;
- if (parent.pending) suite.pending = true;
- title = suite.fullTitle();
- parent.addSuite(suite);
- return suite;
-};
-
-/**
- * Initialize a new `Suite` with the given
- * `title` and `ctx`.
- *
- * @param {String} title
- * @param {Context} ctx
- * @api private
- */
-
-function Suite(title, parentContext) {
- this.title = title;
- var context = function() {};
- context.prototype = parentContext;
- this.ctx = new context();
- this.suites = [];
- this.tests = [];
- this.pending = false;
- this._beforeEach = [];
- this._beforeAll = [];
- this._afterEach = [];
- this._afterAll = [];
- this.root = !title;
- this._timeout = 2000;
- this._enableTimeouts = true;
- this._slow = 75;
- this._bail = false;
- this.delayed = false;
-}
-
-/**
- * Inherit from `EventEmitter.prototype`.
- */
-
-function F(){}
-F.prototype = EventEmitter.prototype;
-Suite.prototype = new F;
-Suite.prototype.constructor = Suite;
-
-
-/**
- * Return a clone of this `Suite`.
- *
- * @return {Suite}
- * @api private
- */
-
-Suite.prototype.clone = function(){
- var suite = new Suite(this.title);
- debug('clone');
- suite.ctx = this.ctx;
- suite.timeout(this.timeout());
- suite.enableTimeouts(this.enableTimeouts());
- suite.slow(this.slow());
- suite.bail(this.bail());
- return suite;
-};
-
-/**
- * Set timeout `ms` or short-hand such as "2s".
- *
- * @param {Number|String} ms
- * @return {Suite|Number} for chaining
- * @api private
- */
-
-Suite.prototype.timeout = function(ms){
- if (0 == arguments.length) return this._timeout;
- if (ms.toString() === '0') this._enableTimeouts = false;
- if ('string' == typeof ms) ms = milliseconds(ms);
- debug('timeout %d', ms);
- this._timeout = parseInt(ms, 10);
- return this;
-};
-
-/**
- * Set timeout `enabled`.
- *
- * @param {Boolean} enabled
- * @return {Suite|Boolean} self or enabled
- * @api private
- */
-
-Suite.prototype.enableTimeouts = function(enabled){
- if (arguments.length === 0) return this._enableTimeouts;
- debug('enableTimeouts %s', enabled);
- this._enableTimeouts = enabled;
- return this;
-};
-
-/**
- * Set slow `ms` or short-hand such as "2s".
- *
- * @param {Number|String} ms
- * @return {Suite|Number} for chaining
- * @api private
- */
-
-Suite.prototype.slow = function(ms){
- if (0 === arguments.length) return this._slow;
- if ('string' == typeof ms) ms = milliseconds(ms);
- debug('slow %d', ms);
- this._slow = ms;
- return this;
-};
-
-/**
- * Sets whether to bail after first error.
- *
- * @param {Boolean} bail
- * @return {Suite|Number} for chaining
- * @api private
- */
-
-Suite.prototype.bail = function(bail){
- if (0 == arguments.length) return this._bail;
- debug('bail %s', bail);
- this._bail = bail;
- return this;
-};
-
-/**
- * Run `fn(test[, done])` before running tests.
- *
- * @param {Function} fn
- * @return {Suite} for chaining
- * @api private
- */
-
-Suite.prototype.beforeAll = function(title, fn){
- if (this.pending) return this;
- if ('function' === typeof title) {
- fn = title;
- title = fn.name;
- }
- title = '"before all" hook' + (title ? ': ' + title : '');
-
- var hook = new Hook(title, fn);
- hook.parent = this;
- hook.timeout(this.timeout());
- hook.enableTimeouts(this.enableTimeouts());
- hook.slow(this.slow());
- hook.ctx = this.ctx;
- this._beforeAll.push(hook);
- this.emit('beforeAll', hook);
- return this;
-};
-
-/**
- * Run `fn(test[, done])` after running tests.
- *
- * @param {Function} fn
- * @return {Suite} for chaining
- * @api private
- */
-
-Suite.prototype.afterAll = function(title, fn){
- if (this.pending) return this;
- if ('function' === typeof title) {
- fn = title;
- title = fn.name;
- }
- title = '"after all" hook' + (title ? ': ' + title : '');
-
- var hook = new Hook(title, fn);
- hook.parent = this;
- hook.timeout(this.timeout());
- hook.enableTimeouts(this.enableTimeouts());
- hook.slow(this.slow());
- hook.ctx = this.ctx;
- this._afterAll.push(hook);
- this.emit('afterAll', hook);
- return this;
-};
-
-/**
- * Run `fn(test[, done])` before each test case.
- *
- * @param {Function} fn
- * @return {Suite} for chaining
- * @api private
- */
-
-Suite.prototype.beforeEach = function(title, fn){
- if (this.pending) return this;
- if ('function' === typeof title) {
- fn = title;
- title = fn.name;
- }
- title = '"before each" hook' + (title ? ': ' + title : '');
-
- var hook = new Hook(title, fn);
- hook.parent = this;
- hook.timeout(this.timeout());
- hook.enableTimeouts(this.enableTimeouts());
- hook.slow(this.slow());
- hook.ctx = this.ctx;
- this._beforeEach.push(hook);
- this.emit('beforeEach', hook);
- return this;
-};
-
-/**
- * Run `fn(test[, done])` after each test case.
- *
- * @param {Function} fn
- * @return {Suite} for chaining
- * @api private
- */
-
-Suite.prototype.afterEach = function(title, fn){
- if (this.pending) return this;
- if ('function' === typeof title) {
- fn = title;
- title = fn.name;
- }
- title = '"after each" hook' + (title ? ': ' + title : '');
-
- var hook = new Hook(title, fn);
- hook.parent = this;
- hook.timeout(this.timeout());
- hook.enableTimeouts(this.enableTimeouts());
- hook.slow(this.slow());
- hook.ctx = this.ctx;
- this._afterEach.push(hook);
- this.emit('afterEach', hook);
- return this;
-};
-
-/**
- * Add a test `suite`.
- *
- * @param {Suite} suite
- * @return {Suite} for chaining
- * @api private
- */
-
-Suite.prototype.addSuite = function(suite){
- suite.parent = this;
- suite.timeout(this.timeout());
- suite.enableTimeouts(this.enableTimeouts());
- suite.slow(this.slow());
- suite.bail(this.bail());
- this.suites.push(suite);
- this.emit('suite', suite);
- return this;
-};
-
-/**
- * Add a `test` to this suite.
- *
- * @param {Test} test
- * @return {Suite} for chaining
- * @api private
- */
-
-Suite.prototype.addTest = function(test){
- test.parent = this;
- test.timeout(this.timeout());
- test.enableTimeouts(this.enableTimeouts());
- test.slow(this.slow());
- test.ctx = this.ctx;
- this.tests.push(test);
- this.emit('test', test);
- return this;
-};
-
-/**
- * Return the full title generated by recursively
- * concatenating the parent's full title.
- *
- * @return {String}
- * @api public
- */
-
-Suite.prototype.fullTitle = function(){
- if (this.parent) {
- var full = this.parent.fullTitle();
- if (full) return full + ' ' + this.title;
- }
- return this.title;
-};
-
-/**
- * Return the total number of tests.
- *
- * @return {Number}
- * @api public
- */
-
-Suite.prototype.total = function(){
- return utils.reduce(this.suites, function(sum, suite){
- return sum + suite.total();
- }, 0) + this.tests.length;
-};
-
-/**
- * Iterates through each suite recursively to find
- * all tests. Applies a function in the format
- * `fn(test)`.
- *
- * @param {Function} fn
- * @return {Suite}
- * @api private
- */
-
-Suite.prototype.eachTest = function(fn){
- utils.forEach(this.tests, fn);
- utils.forEach(this.suites, function(suite){
- suite.eachTest(fn);
- });
- return this;
-};
-
-/**
- * This will run the root suite if we happen to be running in delayed mode.
- */
-Suite.prototype.run = function run() {
- if (this.root) {
- this.emit('run');
- }
-};
-
-}); // module: suite.js
-
-require.register("test.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var Runnable = require('./runnable');
-
-/**
- * Expose `Test`.
- */
-
-module.exports = Test;
-
-/**
- * Initialize a new `Test` with the given `title` and callback `fn`.
- *
- * @param {String} title
- * @param {Function} fn
- * @api private
- */
-
-function Test(title, fn) {
- Runnable.call(this, title, fn);
- this.pending = !fn;
- this.type = 'test';
-}
-
-/**
- * Inherit from `Runnable.prototype`.
- */
-
-function F(){}
-F.prototype = Runnable.prototype;
-Test.prototype = new F;
-Test.prototype.constructor = Test;
-
-
-}); // module: test.js
-
-require.register("utils.js", function(module, exports, require){
-/**
- * Module dependencies.
- */
-
-var fs = require('browser/fs')
- , path = require('browser/path')
- , basename = path.basename
- , exists = fs.existsSync || path.existsSync
- , glob = require('browser/glob')
- , join = path.join
- , debug = require('browser/debug')('mocha:watch');
-
-/**
- * Ignored directories.
- */
-
-var ignore = ['node_modules', '.git'];
-
-/**
- * Escape special characters in the given string of html.
- *
- * @param {String} html
- * @return {String}
- * @api private
- */
-
-exports.escape = function(html){
- return String(html)
- .replace(/&/g, '&amp;')
- .replace(/"/g, '&quot;')
- .replace(/</g, '&lt;')
- .replace(/>/g, '&gt;');
-};
-
-/**
- * Array#forEach (<=IE8)
- *
- * @param {Array} array
- * @param {Function} fn
- * @param {Object} scope
- * @api private
- */
-
-exports.forEach = function(arr, fn, scope){
- for (var i = 0, l = arr.length; i < l; i++)
- fn.call(scope, arr[i], i);
-};
-
-/**
- * Array#map (<=IE8)
- *
- * @param {Array} array
- * @param {Function} fn
- * @param {Object} scope
- * @api private
- */
-
-exports.map = function(arr, fn, scope){
- var result = [];
- for (var i = 0, l = arr.length; i < l; i++)
- result.push(fn.call(scope, arr[i], i, arr));
- return result;
-};
-
-/**
- * Array#indexOf (<=IE8)
- *
- * @parma {Array} arr
- * @param {Object} obj to find index of
- * @param {Number} start
- * @api private
- */
-
-exports.indexOf = function(arr, obj, start){
- for (var i = start || 0, l = arr.length; i < l; i++) {
- if (arr[i] === obj)
- return i;
- }
- return -1;
-};
-
-/**
- * Array#reduce (<=IE8)
- *
- * @param {Array} array
- * @param {Function} fn
- * @param {Object} initial value
- * @api private
- */
-
-exports.reduce = function(arr, fn, val){
- var rval = val;
-
- for (var i = 0, l = arr.length; i < l; i++) {
- rval = fn(rval, arr[i], i, arr);
- }
-
- return rval;
-};
-
-/**
- * Array#filter (<=IE8)
- *
- * @param {Array} array
- * @param {Function} fn
- * @api private
- */
-
-exports.filter = function(arr, fn){
- var ret = [];
-
- for (var i = 0, l = arr.length; i < l; i++) {
- var val = arr[i];
- if (fn(val, i, arr)) ret.push(val);
- }
-
- return ret;
-};
-
-/**
- * Object.keys (<=IE8)
- *
- * @param {Object} obj
- * @return {Array} keys
- * @api private
- */
-
-exports.keys = Object.keys || function(obj) {
- var keys = []
- , has = Object.prototype.hasOwnProperty; // for `window` on <=IE8
-
- for (var key in obj) {
- if (has.call(obj, key)) {
- keys.push(key);
- }
- }
-
- return keys;
-};
-
-/**
- * Watch the given `files` for changes
- * and invoke `fn(file)` on modification.
- *
- * @param {Array} files
- * @param {Function} fn
- * @api private
- */
-
-exports.watch = function(files, fn){
- var options = { interval: 100 };
- files.forEach(function(file){
- debug('file %s', file);
- fs.watchFile(file, options, function(curr, prev){
- if (prev.mtime < curr.mtime) fn(file);
- });
- });
-};
-
-/**
- * Array.isArray (<=IE8)
- *
- * @param {Object} obj
- * @return {Boolean}
- * @api private
- */
-var isArray = Array.isArray || function (obj) {
- return '[object Array]' == {}.toString.call(obj);
-};
-
-/**
- * @description
- * Buffer.prototype.toJSON polyfill
- * @type {Function}
- */
-if(typeof Buffer !== 'undefined' && Buffer.prototype) {
- Buffer.prototype.toJSON = Buffer.prototype.toJSON || function () {
- return Array.prototype.slice.call(this, 0);
- };
-}
-
-/**
- * Ignored files.
- */
-
-function ignored(path){
- return !~ignore.indexOf(path);
-}
-
-/**
- * Lookup files in the given `dir`.
- *
- * @return {Array}
- * @api private
- */
-
-exports.files = function(dir, ext, ret){
- ret = ret || [];
- ext = ext || ['js'];
-
- var re = new RegExp('\\.(' + ext.join('|') + ')$');
-
- fs.readdirSync(dir)
- .filter(ignored)
- .forEach(function(path){
- path = join(dir, path);
- if (fs.statSync(path).isDirectory()) {
- exports.files(path, ext, ret);
- } else if (path.match(re)) {
- ret.push(path);
- }
- });
-
- return ret;
-};
-
-/**
- * Compute a slug from the given `str`.
- *
- * @param {String} str
- * @return {String}
- * @api private
- */
-
-exports.slug = function(str){
- return str
- .toLowerCase()
- .replace(/ +/g, '-')
- .replace(/[^-\w]/g, '');
-};
-
-/**
- * Strip the function definition from `str`,
- * and re-indent for pre whitespace.
- */
-
-exports.clean = function(str) {
- str = str
- .replace(/\r\n?|[\n\u2028\u2029]/g, "\n").replace(/^\uFEFF/, '')
- .replace(/^function *\(.*\)\s*{|\(.*\) *=> *{?/, '')
- .replace(/\s+\}$/, '');
-
- var spaces = str.match(/^\n?( *)/)[1].length
- , tabs = str.match(/^\n?(\t*)/)[1].length
- , re = new RegExp('^\n?' + (tabs ? '\t' : ' ') + '{' + (tabs ? tabs : spaces) + '}', 'gm');
-
- str = str.replace(re, '');
-
- return exports.trim(str);
-};
-
-/**
- * Trim the given `str`.
- *
- * @param {String} str
- * @return {String}
- * @api private
- */
-
-exports.trim = function(str){
- return str.replace(/^\s+|\s+$/g, '');
-};
-
-/**
- * Parse the given `qs`.
- *
- * @param {String} qs
- * @return {Object}
- * @api private
- */
-
-exports.parseQuery = function(qs){
- return exports.reduce(qs.replace('?', '').split('&'), function(obj, pair){
- var i = pair.indexOf('=')
- , key = pair.slice(0, i)
- , val = pair.slice(++i);
-
- obj[key] = decodeURIComponent(val);
- return obj;
- }, {});
-};
-
-/**
- * Highlight the given string of `js`.
- *
- * @param {String} js
- * @return {String}
- * @api private
- */
-
-function highlight(js) {
- return js
- .replace(/</g, '&lt;')
- .replace(/>/g, '&gt;')
- .replace(/\/\/(.*)/gm, '<span class="comment">//$1</span>')
- .replace(/('.*?')/gm, '<span class="string">$1</span>')
- .replace(/(\d+\.\d+)/gm, '<span class="number">$1</span>')
- .replace(/(\d+)/gm, '<span class="number">$1</span>')
- .replace(/\bnew[ \t]+(\w+)/gm, '<span class="keyword">new</span> <span class="init">$1</span>')
- .replace(/\b(function|new|throw|return|var|if|else)\b/gm, '<span class="keyword">$1</span>')
-}
-
-/**
- * Highlight the contents of tag `name`.
- *
- * @param {String} name
- * @api private
- */
-
-exports.highlightTags = function(name) {
- var code = document.getElementById('mocha').getElementsByTagName(name);
- for (var i = 0, len = code.length; i < len; ++i) {
- code[i].innerHTML = highlight(code[i].innerHTML);
- }
-};
-
-/**
- * If a value could have properties, and has none, this function is called, which returns
- * a string representation of the empty value.
- *
- * Functions w/ no properties return `'[Function]'`
- * Arrays w/ length === 0 return `'[]'`
- * Objects w/ no properties return `'{}'`
- * All else: return result of `value.toString()`
- *
- * @param {*} value Value to inspect
- * @param {string} [type] The type of the value, if known.
- * @returns {string}
- */
-var emptyRepresentation = function emptyRepresentation(value, type) {
- type = type || exports.type(value);
-
- switch(type) {
- case 'function':
- return '[Function]';
- case 'object':
- return '{}';
- case 'array':
- return '[]';
- default:
- return value.toString();
- }
-};
-
-/**
- * Takes some variable and asks `{}.toString()` what it thinks it is.
- * @param {*} value Anything
- * @example
- * type({}) // 'object'
- * type([]) // 'array'
- * type(1) // 'number'
- * type(false) // 'boolean'
- * type(Infinity) // 'number'
- * type(null) // 'null'
- * type(new Date()) // 'date'
- * type(/foo/) // 'regexp'
- * type('type') // 'string'
- * type(global) // 'global'
- * @api private
- * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString
- * @returns {string}
- */
-exports.type = function type(value) {
- if (typeof Buffer !== 'undefined' && Buffer.isBuffer(value)) {
- return 'buffer';
- }
- return Object.prototype.toString.call(value)
- .replace(/^\[.+\s(.+?)\]$/, '$1')
- .toLowerCase();
-};
-
-/**
- * @summary Stringify `value`.
- * @description Different behavior depending on type of value.
- * - If `value` is undefined or null, return `'[undefined]'` or `'[null]'`, respectively.
- * - If `value` is not an object, function or array, return result of `value.toString()` wrapped in double-quotes.
- * - If `value` is an *empty* object, function, or array, return result of function
- * {@link emptyRepresentation}.
- * - If `value` has properties, call {@link exports.canonicalize} on it, then return result of
- * JSON.stringify().
- *
- * @see exports.type
- * @param {*} value
- * @return {string}
- * @api private
- */
-
-exports.stringify = function(value) {
- var type = exports.type(value);
-
- if (!~exports.indexOf(['object', 'array', 'function'], type)) {
- if(type != 'buffer') {
- return jsonStringify(value);
- }
- var json = value.toJSON();
- // Based on the toJSON result
- return jsonStringify(json.data && json.type ? json.data : json, 2)
- .replace(/,(\n|$)/g, '$1');
- }
-
- for (var prop in value) {
- if (Object.prototype.hasOwnProperty.call(value, prop)) {
- return jsonStringify(exports.canonicalize(value), 2).replace(/,(\n|$)/g, '$1');
- }
- }
-
- return emptyRepresentation(value, type);
-};
-
-/**
- * @description
- * like JSON.stringify but more sense.
- * @param {Object} object
- * @param {Number=} spaces
- * @param {number=} depth
- * @returns {*}
- * @private
- */
-function jsonStringify(object, spaces, depth) {
- if(typeof spaces == 'undefined') return _stringify(object); // primitive types
-
- depth = depth || 1;
- var space = spaces * depth
- , str = isArray(object) ? '[' : '{'
- , end = isArray(object) ? ']' : '}'
- , length = object.length || exports.keys(object).length
- , repeat = function(s, n) { return new Array(n).join(s); }; // `.repeat()` polyfill
-
- function _stringify(val) {
- switch (exports.type(val)) {
- case 'null':
- case 'undefined':
- val = '[' + val + ']';
- break;
- case 'array':
- case 'object':
- val = jsonStringify(val, spaces, depth + 1);
- break;
- case 'boolean':
- case 'regexp':
- case 'number':
- val = val === 0 && (1/val) === -Infinity // `-0`
- ? '-0'
- : val.toString();
- break;
- case 'date':
- val = '[Date: ' + val.toISOString() + ']';
- break;
- case 'buffer':
- var json = val.toJSON();
- // Based on the toJSON result
- json = json.data && json.type ? json.data : json;
- val = '[Buffer: ' + jsonStringify(json, 2, depth + 1) + ']';
- break;
- default:
- val = (val == '[Function]' || val == '[Circular]')
- ? val
- : '"' + val + '"'; //string
- }
- return val;
- }
-
- for(var i in object) {
- if(!object.hasOwnProperty(i)) continue; // not my business
- --length;
- str += '\n ' + repeat(' ', space)
- + (isArray(object) ? '' : '"' + i + '": ') // key
- + _stringify(object[i]) // value
- + (length ? ',' : ''); // comma
- }
-
- return str + (str.length != 1 // [], {}
- ? '\n' + repeat(' ', --space) + end
- : end);
-}
-
-/**
- * Return if obj is a Buffer
- * @param {Object} arg
- * @return {Boolean}
- * @api private
- */
-exports.isBuffer = function (arg) {
- return typeof Buffer !== 'undefined' && Buffer.isBuffer(arg);
-};
-
-/**
- * @summary Return a new Thing that has the keys in sorted order. Recursive.
- * @description If the Thing...
- * - has already been seen, return string `'[Circular]'`
- * - is `undefined`, return string `'[undefined]'`
- * - is `null`, return value `null`
- * - is some other primitive, return the value
- * - is not a primitive or an `Array`, `Object`, or `Function`, return the value of the Thing's `toString()` method
- * - is a non-empty `Array`, `Object`, or `Function`, return the result of calling this function again.
- * - is an empty `Array`, `Object`, or `Function`, return the result of calling `emptyRepresentation()`
- *
- * @param {*} value Thing to inspect. May or may not have properties.
- * @param {Array} [stack=[]] Stack of seen values
- * @return {(Object|Array|Function|string|undefined)}
- * @see {@link exports.stringify}
- * @api private
- */
-
-exports.canonicalize = function(value, stack) {
- var canonicalizedObj,
- type = exports.type(value),
- prop,
- withStack = function withStack(value, fn) {
- stack.push(value);
- fn();
- stack.pop();
- };
-
- stack = stack || [];
-
- if (exports.indexOf(stack, value) !== -1) {
- return '[Circular]';
- }
-
- switch(type) {
- case 'undefined':
- case 'buffer':
- case 'null':
- canonicalizedObj = value;
- break;
- case 'array':
- withStack(value, function () {
- canonicalizedObj = exports.map(value, function (item) {
- return exports.canonicalize(item, stack);
- });
- });
- break;
- case 'function':
- for (prop in value) {
- canonicalizedObj = {};
- break;
- }
- if (!canonicalizedObj) {
- canonicalizedObj = emptyRepresentation(value, type);
- break;
- }
- /* falls through */
- case 'object':
- canonicalizedObj = canonicalizedObj || {};
- withStack(value, function () {
- exports.forEach(exports.keys(value).sort(), function (key) {
- canonicalizedObj[key] = exports.canonicalize(value[key], stack);
- });
- });
- break;
- case 'date':
- case 'number':
- case 'regexp':
- case 'boolean':
- canonicalizedObj = value;
- break;
- default:
- canonicalizedObj = value.toString();
- }
-
- return canonicalizedObj;
-};
-
-/**
- * Lookup file names at the given `path`.
- */
-exports.lookupFiles = function lookupFiles(path, extensions, recursive) {
- var files = [];
- var re = new RegExp('\\.(' + extensions.join('|') + ')$');
-
- if (!exists(path)) {
- if (exists(path + '.js')) {
- path += '.js';
- } else {
- files = glob.sync(path);
- if (!files.length) throw new Error("cannot resolve path (or pattern) '" + path + "'");
- return files;
- }
- }
-
- try {
- var stat = fs.statSync(path);
- if (stat.isFile()) return path;
- }
- catch (ignored) {
- return undefined;
- }
-
- fs.readdirSync(path).forEach(function(file) {
- file = join(path, file);
- try {
- var stat = fs.statSync(file);
- if (stat.isDirectory()) {
- if (recursive) {
- files = files.concat(lookupFiles(file, extensions, recursive));
- }
- return;
- }
- }
- catch (ignored) {
- return;
- }
- if (!stat.isFile() || !re.test(file) || basename(file)[0] === '.') return;
- files.push(file);
- });
-
- return files;
-};
-
-/**
- * Generate an undefined error with a message warning the user.
- *
- * @return {Error}
- */
-
-exports.undefinedError = function() {
- return new Error('Caught undefined error, did you throw without specifying what?');
-};
-
-/**
- * Generate an undefined error if `err` is not defined.
- *
- * @param {Error} err
- * @return {Error}
- */
-
-exports.getError = function(err) {
- return err || exports.undefinedError();
-};
-
-
-/**
- * @summary
- * This Filter based on `mocha-clean` module.(see: `github.com/rstacruz/mocha-clean`)
- * @description
- * When invoking this function you get a filter function that get the Error.stack as an input,
- * and return a prettify output.
- * (i.e: strip Mocha, node_modules, bower and componentJS from stack trace).
- * @returns {Function}
- */
-
-exports.stackTraceFilter = function() {
- var slash = '/'
- , is = typeof document === 'undefined'
- ? { node: true }
- : { browser: true }
- , cwd = is.node
- ? process.cwd() + slash
- : location.href.replace(/\/[^\/]*$/, '/');
-
- function isNodeModule (line) {
- return (~line.indexOf('node_modules'));
- }
-
- function isMochaInternal (line) {
- return (~line.indexOf('node_modules' + slash + 'mocha')) ||
- (~line.indexOf('components' + slash + 'mochajs')) ||
- (~line.indexOf('components' + slash + 'mocha'));
- }
-
- // node_modules, bower, componentJS
- function isBrowserModule(line) {
- return (~line.indexOf('node_modules')) ||
- (~line.indexOf('components'));
- }
-
- function isNodeInternal (line) {
- return (~line.indexOf('(timers.js:')) ||
- (~line.indexOf('(events.js:')) ||
- (~line.indexOf('(node.js:')) ||
- (~line.indexOf('(module.js:')) ||
- (~line.indexOf('GeneratorFunctionPrototype.next (native)')) ||
- false
- }
-
- return function(stack) {
- stack = stack.split('\n');
-
- stack = exports.reduce(stack, function(list, line) {
- if (is.node && (isNodeModule(line) ||
- isMochaInternal(line) ||
- isNodeInternal(line)))
- return list;
-
- if (is.browser && (isBrowserModule(line)))
- return list;
-
- // Clean up cwd(absolute)
- list.push(line.replace(cwd, ''));
- return list;
- }, []);
-
- return stack.join('\n');
- }
-};
-}); // module: utils.js
-// The global object is "self" in Web Workers.
-var global = (function() { return this; })();
-
-/**
- * Save timer references to avoid Sinon interfering (see GH-237).
- */
-
-var Date = global.Date;
-var setTimeout = global.setTimeout;
-var setInterval = global.setInterval;
-var clearTimeout = global.clearTimeout;
-var clearInterval = global.clearInterval;
-
-/**
- * Node shims.
- *
- * These are meant only to allow
- * mocha.js to run untouched, not
- * to allow running node code in
- * the browser.
- */
-
-var process = {};
-process.exit = function(status){};
-process.stdout = {};
-
-var uncaughtExceptionHandlers = [];
-
-var originalOnerrorHandler = global.onerror;
-
-/**
- * Remove uncaughtException listener.
- * Revert to original onerror handler if previously defined.
- */
-
-process.removeListener = function(e, fn){
- if ('uncaughtException' == e) {
- if (originalOnerrorHandler) {
- global.onerror = originalOnerrorHandler;
- } else {
- global.onerror = function() {};
- }
- var i = Mocha.utils.indexOf(uncaughtExceptionHandlers, fn);
- if (i != -1) { uncaughtExceptionHandlers.splice(i, 1); }
- }
-};
-
-/**
- * Implements uncaughtException listener.
- */
-
-process.on = function(e, fn){
- if ('uncaughtException' == e) {
- global.onerror = function(err, url, line){
- fn(new Error(err + ' (' + url + ':' + line + ')'));
- return true;
- };
- uncaughtExceptionHandlers.push(fn);
- }
-};
-
-/**
- * Expose mocha.
- */
-
-var Mocha = global.Mocha = require('mocha'),
- mocha = global.mocha = new Mocha({ reporter: 'html' });
-
-// The BDD UI is registered by default, but no UI will be functional in the
-// browser without an explicit call to the overridden `mocha.ui` (see below).
-// Ensure that this default UI does not expose its methods to the global scope.
-mocha.suite.removeAllListeners('pre-require');
-
-var immediateQueue = []
- , immediateTimeout;
-
-function timeslice() {
- var immediateStart = new Date().getTime();
- while (immediateQueue.length && (new Date().getTime() - immediateStart) < 100) {
- immediateQueue.shift()();
- }
- if (immediateQueue.length) {
- immediateTimeout = setTimeout(timeslice, 0);
- } else {
- immediateTimeout = null;
- }
-}
-
-/**
- * High-performance override of Runner.immediately.
- */
-
-Mocha.Runner.immediately = function(callback) {
- immediateQueue.push(callback);
- if (!immediateTimeout) {
- immediateTimeout = setTimeout(timeslice, 0);
- }
-};
-
-/**
- * Function to allow assertion libraries to throw errors directly into mocha.
- * This is useful when running tests in a browser because window.onerror will
- * only receive the 'message' attribute of the Error.
- */
-mocha.throwError = function(err) {
- Mocha.utils.forEach(uncaughtExceptionHandlers, function (fn) {
- fn(err);
- });
- throw err;
-};
-
-/**
- * Override ui to ensure that the ui functions are initialized.
- * Normally this would happen in Mocha.prototype.loadFiles.
- */
-
-mocha.ui = function(ui){
- Mocha.prototype.ui.call(this, ui);
- this.suite.emit('pre-require', global, null, this);
- return this;
-};
-
-/**
- * Setup mocha with the given setting options.
- */
-
-mocha.setup = function(opts){
- if ('string' == typeof opts) opts = { ui: opts };
- for (var opt in opts) this[opt](opts[opt]);
- return this;
-};
-
-/**
- * Run mocha, returning the Runner.
- */
-
-mocha.run = function(fn){
- var options = mocha.options;
- mocha.globals('location');
-
- var query = Mocha.utils.parseQuery(global.location.search || '');
- if (query.grep) mocha.grep(new RegExp(query.grep));
- if (query.fgrep) mocha.grep(query.fgrep);
- if (query.invert) mocha.invert();
-
- return Mocha.prototype.run.call(mocha, function(err){
- // The DOM Document is not available in Web Workers.
- var document = global.document;
- if (document && document.getElementById('mocha') && options.noHighlighting !== true) {
- Mocha.utils.highlightTags('code');
- }
- if (fn) fn(err);
- });
-};
-
-/**
- * Expose the process shim.
- */
-
-Mocha.process = process;
-})();
diff --git a/toolkit/components/microformats/test/static/javascript/parse.js b/toolkit/components/microformats/test/static/javascript/parse.js
deleted file mode 100644
index 588e403eef..0000000000
--- a/toolkit/components/microformats/test/static/javascript/parse.js
+++ /dev/null
@@ -1,133 +0,0 @@
-/*!
- 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
-*/
-
-window.onload = function() {
-
- var form;
- form= document.getElementById('mf-form');
-
- form.onsubmit = function(e){
- e = (e)? e : window.event;
-
- if (e.preventDefault) {
- e.preventDefault();
- } else {
- event.returnValue = false;
- }
-
-
- var html,
- baseUrl,
- filter,
- collapsewhitespace,
- overlappingversions,
- impliedPropertiesByVersion,
- dateformatElt,
- dateformat,
- doc,
- node,
- 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;
- //overlappingversions = document.getElementById('overlappingversions').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(','));
- }else{
- 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 = '<base href="' + baseUrl+ '">' + html;
- }
-
-
-
- // parse direct into Modules to help debugging
- if(window.Modules){
- var parser = new Modules.Parser();
- mfJSON = parser.get(options);
- }else if(window.Microformats){
- mfJSON = Microformats.get(options);
- }
-
-
- // format output
- parserJSONElt.innerHTML = htmlEscape( js_beautify( JSON.stringify(mfJSON) ) );
- //prettyPrint();
-
- }
-
-
-};
-
-
-
-
-
-function htmlEscape(str) {
- return String(str)
- .replace(/&/g, '&amp;')
- .replace(/"/g, '&quot;')
- .replace(/'/g, '&#39;')
- .replace(/</g, '&lt;')
- .replace(/>/g, '&gt;');
-}
-
-
-function trimArrayItems( arr ){
- return arr.map(function(item){
- return item.trim();
- })
-}
-
diff --git a/toolkit/components/microformats/test/static/javascript/prettify.js b/toolkit/components/microformats/test/static/javascript/prettify.js
deleted file mode 100644
index 879dfd60fc..0000000000
--- a/toolkit/components/microformats/test/static/javascript/prettify.js
+++ /dev/null
@@ -1,1479 +0,0 @@
-// Copyright (C) 2006 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-
-/**
- * @fileoverview
- * some functions for browser-side pretty printing of code contained in html.
- *
- * <p>
- * For a fairly comprehensive set of languages see the
- * <a href="http://google-code-prettify.googlecode.com/svn/trunk/README.html#langs">README</a>
- * file that came with this source. At a minimum, the lexer should work on a
- * number of languages including C and friends, Java, Python, Bash, SQL, HTML,
- * XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk
- * and a subset of Perl, but, because of commenting conventions, doesn't work on
- * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class.
- * <p>
- * Usage: <ol>
- * <li> include this source file in an html page via
- * {@code <script type="text/javascript" src="/path/to/prettify.js"></script>}
- * <li> define style rules. See the example page for examples.
- * <li> mark the {@code <pre>} and {@code <code>} tags in your source with
- * {@code class=prettyprint.}
- * You can also use the (html deprecated) {@code <xmp>} tag, but the pretty
- * printer needs to do more substantial DOM manipulations to support that, so
- * some css styles may not be preserved.
- * </ol>
- * That's it. I wanted to keep the API as simple as possible, so there's no
- * need to specify which language the code is in, but if you wish, you can add
- * another class to the {@code <pre>} or {@code <code>} element to specify the
- * language, as in {@code <pre class="prettyprint lang-java">}. Any class that
- * starts with "lang-" followed by a file extension, specifies the file type.
- * See the "lang-*.js" files in this directory for code that implements
- * per-language file handlers.
- * <p>
- * Change log:<br>
- * cbeust, 2006/08/22
- * <blockquote>
- * Java annotations (start with "@") are now captured as literals ("lit")
- * </blockquote>
- * @requires console
- */
-
-// JSLint declarations
-/*global console, document, navigator, setTimeout, window */
-
-/**
- * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
- * UI events.
- * If set to {@code false}, {@code prettyPrint()} is synchronous.
- */
-window['PR_SHOULD_USE_CONTINUATION'] = true;
-
-(function () {
- // Keyword lists for various languages.
- // 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," +
- "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," +
- "new,operator,private,protected,public,this,throw,true,try,typeof"];
- var CPP_KEYWORDS = [COMMON_KEYWORDS,"alignof,align_union,asm,axiom,bool," +
- "concept,concept_map,const_cast,constexpr,decltype," +
- "dynamic_cast,explicit,export,friend,inline,late_check," +
- "mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast," +
- "template,typeid,typename,using,virtual,where"];
- var JAVA_KEYWORDS = [COMMON_KEYWORDS,
- "abstract,boolean,byte,extends,final,finally,implements,import," +
- "instanceof,null,native,package,strictfp,super,synchronized,throws," +
- "transient"];
- var CSHARP_KEYWORDS = [JAVA_KEYWORDS,
- "as,base,by,checked,decimal,delegate,descending,dynamic,event," +
- "fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock," +
- "object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed," +
- "stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];
- var COFFEE_KEYWORDS = "all,and,by,catch,class,else,extends,false,finally," +
- "for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then," +
- "true,try,unless,until,when,while,yes";
- var JSCRIPT_KEYWORDS = [COMMON_KEYWORDS,
- "debugger,eval,export,function,get,null,set,undefined,var,with," +
- "Infinity,NaN"];
- var PERL_KEYWORDS = "caller,delete,die,do,dump,elsif,eval,exit,foreach,for," +
- "goto,if,import,last,local,my,next,no,our,print,package,redo,require," +
- "sub,undef,unless,until,use,wantarray,while,BEGIN,END";
- var PYTHON_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "and,as,assert,class,def,del," +
- "elif,except,exec,finally,from,global,import,in,is,lambda," +
- "nonlocal,not,or,pass,print,raise,try,with,yield," +
- "False,True,None"];
- var RUBY_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "alias,and,begin,case,class," +
- "def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo," +
- "rescue,retry,self,super,then,true,undef,unless,until,when,yield," +
- "BEGIN,END"];
- var SH_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "case,done,elif,esac,eval,fi," +
- "function,in,local,set,then,until"];
- var ALL_KEYWORDS = [
- CPP_KEYWORDS, CSHARP_KEYWORDS, JSCRIPT_KEYWORDS, PERL_KEYWORDS +
- PYTHON_KEYWORDS, RUBY_KEYWORDS, SH_KEYWORDS];
- var C_TYPES = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;
-
- // token style names. correspond to css classes
- /**
- * token style for a string literal
- * @const
- */
- var PR_STRING = 'str';
- /**
- * token style for a keyword
- * @const
- */
- var PR_KEYWORD = 'kwd';
- /**
- * token style for a comment
- * @const
- */
- var PR_COMMENT = 'com';
- /**
- * token style for a type
- * @const
- */
- var PR_TYPE = 'typ';
- /**
- * token style for a literal value. e.g. 1, null, true.
- * @const
- */
- var PR_LITERAL = 'lit';
- /**
- * token style for a punctuation string.
- * @const
- */
- var PR_PUNCTUATION = 'pun';
- /**
- * token style for a punctuation string.
- * @const
- */
- var PR_PLAIN = 'pln';
-
- /**
- * token style for an sgml tag.
- * @const
- */
- var PR_TAG = 'tag';
- /**
- * token style for a markup declaration such as a DOCTYPE.
- * @const
- */
- var PR_DECLARATION = 'dec';
- /**
- * token style for embedded source.
- * @const
- */
- var PR_SOURCE = 'src';
- /**
- * token style for an sgml attribute name.
- * @const
- */
- var PR_ATTRIB_NAME = 'atn';
- /**
- * token style for an sgml attribute value.
- * @const
- */
- var PR_ATTRIB_VALUE = 'atv';
-
- /**
- * A class that indicates a section of markup that is not code, e.g. to allow
- * embedding of line numbers within code listings.
- * @const
- */
- var PR_NOCODE = 'nocode';
-
-
-
-/**
- * A set of tokens that can precede a regular expression literal in
- * javascript
- * http://web.archive.org/web/20070717142515/http://www.mozilla.org/js/language/js20/rationale/syntax.html
- * has the full list, but I've removed ones that might be problematic when
- * seen in languages that don't support regular expression literals.
- *
- * <p>Specifically, I've removed any keywords that can't precede a regexp
- * literal in a syntactically legal javascript program, and I've removed the
- * "in" keyword since it's not a keyword in many languages, and might be used
- * as a count of inches.
- *
- * <p>The link a above does not accurately describe EcmaScript rules since
- * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
- * very well in practice.
- *
- * @private
- * @const
- */
-var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*';
-
-// CAVEAT: this does not properly handle the case where a regular
-// expression immediately follows another since a regular expression may
-// have flags for case-sensitivity and the like. Having regexp tokens
-// adjacent is not valid in any language I'm aware of, so I'm punting.
-// TODO: maybe style special characters inside a regexp as punctuation.
-
-
- /**
- * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
- * matches the union of the sets of strings matched by the input RegExp.
- * Since it matches globally, if the input strings have a start-of-input
- * anchor (/^.../), it is ignored for the purposes of unioning.
- * @param {Array.<RegExp>} regexs non multiline, non-global regexs.
- * @return {RegExp} a global regex.
- */
- function combinePrefixPatterns(regexs) {
- var capturedGroupIndex = 0;
-
- var needToFoldCase = false;
- var ignoreCase = false;
- for (var i = 0, n = regexs.length; i < n; ++i) {
- var regex = regexs[i];
- if (regex.ignoreCase) {
- ignoreCase = true;
- } else if (/[a-z]/i.test(regex.source.replace(
- /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) {
- needToFoldCase = true;
- ignoreCase = false;
- break;
- }
- }
-
- var escapeCharToCodeUnit = {
- 'b': 8,
- 't': 9,
- 'n': 0xa,
- 'v': 0xb,
- 'f': 0xc,
- 'r': 0xd
- };
-
- function decodeEscape(charsetPart) {
- var cc0 = charsetPart.charCodeAt(0);
- if (cc0 !== 92 /* \\ */) {
- return cc0;
- }
- var c1 = charsetPart.charAt(1);
- cc0 = escapeCharToCodeUnit[c1];
- if (cc0) {
- return cc0;
- } else if ('0' <= c1 && c1 <= '7') {
- return parseInt(charsetPart.substring(1), 8);
- } else if (c1 === 'u' || c1 === 'x') {
- return parseInt(charsetPart.substring(2), 16);
- } else {
- return charsetPart.charCodeAt(1);
- }
- }
-
- function encodeEscape(charCode) {
- if (charCode < 0x20) {
- return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
- }
- var ch = String.fromCharCode(charCode);
- if (ch === '\\' || ch === '-' || ch === '[' || ch === ']') {
- ch = '\\' + ch;
- }
- return ch;
- }
-
- function caseFoldCharset(charSet) {
- var charsetParts = charSet.substring(1, charSet.length - 1).match(
- new RegExp(
- '\\\\u[0-9A-Fa-f]{4}'
- + '|\\\\x[0-9A-Fa-f]{2}'
- + '|\\\\[0-3][0-7]{0,2}'
- + '|\\\\[0-7]{1,2}'
- + '|\\\\[\\s\\S]'
- + '|-'
- + '|[^-\\\\]',
- 'g'));
- var groups = [];
- var ranges = [];
- var inverse = charsetParts[0] === '^';
- for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
- var p = charsetParts[i];
- if (/\\[bdsw]/i.test(p)) { // Don't muck with named groups.
- groups.push(p);
- } else {
- var start = decodeEscape(p);
- var end;
- if (i + 2 < n && '-' === charsetParts[i + 1]) {
- end = decodeEscape(charsetParts[i + 2]);
- i += 2;
- } else {
- end = start;
- }
- ranges.push([start, end]);
- // If the range might intersect letters, then expand it.
- // This case handling is too simplistic.
- // It does not deal with non-latin case folding.
- // It works for latin source code identifiers though.
- if (!(end < 65 || start > 122)) {
- if (!(end < 65 || start > 90)) {
- ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
- }
- if (!(end < 97 || start > 122)) {
- ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
- }
- }
- }
- }
-
- // [[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]); });
- var consolidatedRanges = [];
- var lastRange = [NaN, NaN];
- for (i = 0; i < ranges.length; ++i) {
- var range = ranges[i];
- if (range[0] <= lastRange[1] + 1) {
- lastRange[1] = Math.max(lastRange[1], range[1]);
- } else {
- consolidatedRanges.push(lastRange = range);
- }
- }
-
- var out = ['['];
- if (inverse) { out.push('^'); }
- out.push.apply(out, groups);
- for (i = 0; i < consolidatedRanges.length; ++i) {
- range = consolidatedRanges[i];
- out.push(encodeEscape(range[0]));
- if (range[1] > range[0]) {
- if (range[1] + 1 > range[0]) { out.push('-'); }
- out.push(encodeEscape(range[1]));
- }
- }
- out.push(']');
- return out.join('');
- }
-
- function allowAnywhereFoldCaseAndRenumberGroups(regex) {
- // Split into character sets, escape sequences, punctuation strings
- // like ('(', '(?:', ')', '^'), and runs of characters that do not
- // include any of the above.
- var parts = regex.source.match(
- new RegExp(
- '(?:'
- + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]' // a character set
- + '|\\\\u[A-Fa-f0-9]{4}' // a unicode escape
- + '|\\\\x[A-Fa-f0-9]{2}' // a hex escape
- + '|\\\\[0-9]+' // a back-reference or octal escape
- + '|\\\\[^ux0-9]' // other escape sequence
- + '|\\(\\?[:!=]' // start of a non-capturing group
- + '|[\\(\\)\\^]' // start/emd of a group, or line start
- + '|[^\\x5B\\x5C\\(\\)\\^]+' // run of other characters
- + ')',
- '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) {
- var p = parts[i];
- if (p === '(') {
- // groups are 1-indexed, so max group index is count of '('
- ++groupIndex;
- } else if ('\\' === p.charAt(0)) {
- var decimalValue = +p.substring(1);
- if (decimalValue && decimalValue <= groupIndex) {
- capturedGroups[decimalValue] = -1;
- }
- }
- }
-
- // Renumber groups and reduce capturing groups to non-capturing groups
- // where possible.
- for (i = 1; i < capturedGroups.length; ++i) {
- if (-1 === capturedGroups[i]) {
- capturedGroups[i] = ++capturedGroupIndex;
- }
- }
- for (i = 0, groupIndex = 0; i < n; ++i) {
- p = parts[i];
- if (p === '(') {
- ++groupIndex;
- if (capturedGroups[groupIndex] === undefined) {
- parts[i] = '(?:';
- }
- } else if ('\\' === p.charAt(0)) {
- decimalValue = +p.substring(1);
- if (decimalValue && decimalValue <= groupIndex) {
- parts[i] = '\\' + capturedGroups[groupIndex];
- }
- }
- }
-
- // 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) {
- for (i = 0; i < n; ++i) {
- p = parts[i];
- var ch0 = p.charAt(0);
- if (p.length >= 2 && ch0 === '[') {
- parts[i] = caseFoldCharset(p);
- } else if (ch0 !== '\\') {
- // TODO: handle letters in numeric escapes.
- parts[i] = p.replace(
- /[a-zA-Z]/g,
- function (ch) {
- var cc = ch.charCodeAt(0);
- return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';
- });
- }
- }
- }
-
- return parts.join('');
- }
-
- var rewritten = [];
- for (i = 0, n = regexs.length; i < n; ++i) {
- regex = regexs[i];
- if (regex.global || regex.multiline) { throw new Error('' + regex); }
- rewritten.push(
- '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');
- }
-
- return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
- }
-
-
- /**
- * Split markup into a string of source code and an array mapping ranges in
- * that string to the text nodes in which they appear.
- *
- * <p>
- * The HTML DOM structure:</p>
- * <pre>
- * (Element "p"
- * (Element "b"
- * (Text "print ")) ; #1
- * (Text "'Hello '") ; #2
- * (Element "br") ; #3
- * (Text " + 'World';")) ; #4
- * </pre>
- * <p>
- * corresponds to the HTML
- * {@code <p><b>print </b>'Hello '<br> + 'World';</p>}.</p>
- *
- * <p>
- * It will produce the output:</p>
- * <pre>
- * {
- * sourceCode: "print 'Hello '\n + 'World';",
- * // 1 2
- * // 012345678901234 5678901234567
- * spans: [0, #1, 6, #2, 14, #3, 15, #4]
- * }
- * </pre>
- * <p>
- * where #1 is a reference to the {@code "print "} text node above, and so
- * on for the other text nodes.
- * </p>
- *
- * <p>
- * The {@code} spans array is an array of pairs. Even elements are the start
- * indices of substrings, and odd elements are the text nodes (or BR elements)
- * that contain the text for those substrings.
- * Substrings continue until the next index or the end of the source.
- * </p>
- *
- * @param {Node} node an HTML DOM subtree containing source-code.
- * @return {Object} source code and the text nodes in which they occur.
- */
- 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;
- } else if (window.getComputedStyle) {
- whitespace = document.defaultView.getComputedStyle(node, null)
- .getPropertyValue('white-space');
- }
- var isPreformatted = whitespace && 'pre' === whitespace.substring(0, 3);
-
- function walk(node) {
- switch (node.nodeType) {
- case 1: // Element
- if (nocode.test(node.className)) { return; }
- for (var child = node.firstChild; child; child = child.nextSibling) {
- walk(child);
- }
- var nodeName = node.nodeName;
- if ('BR' === nodeName || 'LI' === nodeName) {
- chunks[k] = '\n';
- spans[k << 1] = length++;
- spans[(k++ << 1) | 1] = node;
- }
- break;
- case 3: case 4: // Text
- var text = node.nodeValue;
- if (text.length) {
- if (!isPreformatted) {
- text = text.replace(/[ \t\r\n]+/g, ' ');
- } else {
- text = text.replace(/\r\n?/g, '\n'); // Normalize newlines.
- }
- // TODO: handle tabs here?
- chunks[k] = text;
- spans[k << 1] = length;
- length += text.length;
- spans[(k++ << 1) | 1] = node;
- }
- break;
- }
- }
-
- walk(node);
-
- return {
- sourceCode: chunks.join('').replace(/\n$/, ''),
- spans: spans
- };
- }
-
-
- /**
- * Apply the given language handler to sourceCode and add the resulting
- * decorations to out.
- * @param {number} basePos the index of sourceCode within the chunk of source
- * whose decorations are already present on out.
- */
- function appendDecorations(basePos, sourceCode, langHandler, out) {
- if (!sourceCode) { return; }
- var job = {
- sourceCode: sourceCode,
- basePos: basePos
- };
- langHandler(job);
- out.push.apply(out, job.decorations);
- }
-
- var notWs = /\S/;
-
- /**
- * Given an element, if it contains only one child element and any text nodes
- * it contains contain only space characters, return the sole child element.
- * Otherwise returns undefined.
- * <p>
- * This is meant to return the CODE element in {@code <pre><code ...>} when
- * there is a single child element that contains all the non-space textual
- * content, but not to return anything where there are multiple child elements
- * as in {@code <pre><code>...</code><code>...</code></pre>} or when there
- * is textual content.
- */
- function childContentWrapper(element) {
- var wrapper = undefined;
- for (var c = element.firstChild; c; c = c.nextSibling) {
- var type = c.nodeType;
- if (type === 1) {
- wrapper = wrapper ? element : c;
- } else if (type === 3) {
- wrapper = notWs.test(c.nodeValue) ? element : wrapper;
- }
- }
- return wrapper === element ? undefined : wrapper;
- }
-
- /** Given triples of [style, pattern, context] returns a lexing function,
- * The lexing function interprets the patterns to find token boundaries and
- * returns a decoration list of the form
- * [index_0, style_0, index_1, style_1, ..., index_n, style_n]
- * where index_n is an index into the sourceCode, and style_n is a style
- * constant like PR_PLAIN. index_n-1 <= index_n, and style_n-1 applies to
- * all characters in sourceCode[index_n-1:index_n].
- *
- * The stylePatterns is a list whose elements have the form
- * [style : string, pattern : RegExp, DEPRECATED, shortcut : string].
- *
- * Style is a style constant like PR_PLAIN, or can be a string of the
- * form 'lang-FOO', where FOO is a language extension describing the
- * language of the portion of the token in $1 after pattern executes.
- * E.g., if style is 'lang-lisp', and group 1 contains the text
- * '(hello (world))', then that portion of the token will be passed to the
- * registered lisp handler for formatting.
- * The text before and after group 1 will be restyled using this decorator
- * so decorators should take care that this doesn't result in infinite
- * recursion. For example, the HTML lexer rule for SCRIPT elements looks
- * something like ['lang-js', /<[s]cript>(.+?)<\/script>/]. This may match
- * '<script>foo()<\/script>', which would cause the current decorator to
- * be called with '<script>' which would not match the same rule since
- * group 1 must not be empty, so it would be instead styled as PR_TAG by
- * the generic tag rule. The handler registered for the 'js' extension would
- * then be called with 'foo()', and finally, the current decorator would
- * be called with '<\/script>' which would not match the original rule and
- * so the generic tag rule would identify it as a tag.
- *
- * Pattern must only match prefixes, and if it matches a prefix, then that
- * match is considered a token with the same style.
- *
- * Context is applied to the last non-whitespace, non-comment token
- * recognized.
- *
- * Shortcut is an optional string of characters, any of which, if the first
- * character, gurantee that this pattern and only this pattern matches.
- *
- * @param {Array} shortcutStylePatterns patterns that always start with
- * a known character. Must have a shortcut string.
- * @param {Array} fallthroughStylePatterns patterns that will be tried in
- * order if the shortcut ones fail. May have shortcuts.
- *
- * @return {function (Object)} a
- * function that takes source code and returns a list of decorations.
- */
- function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) {
- var shortcuts = {};
- var tokenizer;
- (function () {
- var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns);
- var allRegexs = [];
- var regexKeys = {};
- for (var i = 0, n = allPatterns.length; i < n; ++i) {
- var patternParts = allPatterns[i];
- var shortcutChars = patternParts[3];
- if (shortcutChars) {
- for (var c = shortcutChars.length; --c >= 0;) {
- shortcuts[shortcutChars.charAt(c)] = patternParts;
- }
- }
- var regex = patternParts[1];
- var k = '' + regex;
- if (!regexKeys.hasOwnProperty(k)) {
- allRegexs.push(regex);
- regexKeys[k] = null;
- }
- }
- allRegexs.push(/[\0-\uffff]/);
- tokenizer = combinePrefixPatterns(allRegexs);
- })();
-
- var nPatterns = fallthroughStylePatterns.length;
-
- /**
- * Lexes job.sourceCode and produces an output array job.decorations of
- * style classes preceded by the position at which they start in
- * job.sourceCode in order.
- *
- * @param {Object} job an object like <pre>{
- * sourceCode: {string} sourceText plain text,
- * basePos: {int} position of job.sourceCode in the larger chunk of
- * sourceCode.
- * }</pre>
- */
- var decorate = function (job) {
- var sourceCode = job.sourceCode, basePos = job.basePos;
- /** Even entries are positions in source in ascending order. Odd enties
- * are style markers (e.g., PR_COMMENT) that run from that position until
- * the end.
- * @type {Array.<number|string>}
- */
- var decorations = [basePos, PR_PLAIN];
- var pos = 0; // index into sourceCode
- var tokens = sourceCode.match(tokenizer) || [];
- var styleCache = {};
-
- for (var ti = 0, nTokens = tokens.length; ti < nTokens; ++ti) {
- var token = tokens[ti];
- var style = styleCache[token];
- var match = void 0;
-
- var isEmbedded;
- if (typeof style === 'string') {
- isEmbedded = false;
- } else {
- var patternParts = shortcuts[token.charAt(0)];
- if (patternParts) {
- match = token.match(patternParts[1]);
- style = patternParts[0];
- } else {
- for (var i = 0; i < nPatterns; ++i) {
- patternParts = fallthroughStylePatterns[i];
- match = token.match(patternParts[1]);
- if (match) {
- style = patternParts[0];
- break;
- }
- }
-
- if (!match) { // make sure that we make progress
- style = PR_PLAIN;
- }
- }
-
- isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5);
- if (isEmbedded && !(match && typeof match[1] === 'string')) {
- isEmbedded = false;
- style = PR_SOURCE;
- }
-
- if (!isEmbedded) { styleCache[token] = style; }
- }
-
- var tokenStart = pos;
- pos += token.length;
-
- if (!isEmbedded) {
- decorations.push(basePos + tokenStart, style);
- } else { // Treat group 1 as an embedded block of source code.
- var embeddedSource = match[1];
- var embeddedSourceStart = token.indexOf(embeddedSource);
- var embeddedSourceEnd = embeddedSourceStart + embeddedSource.length;
- if (match[2]) {
- // If embeddedSource can be blank, then it would match at the
- // beginning which would cause us to infinitely recurse on the
- // entire token, so we catch the right context in match[2].
- embeddedSourceEnd = token.length - match[2].length;
- embeddedSourceStart = embeddedSourceEnd - embeddedSource.length;
- }
- var lang = style.substring(5);
- // Decorate the left of the embedded source
- appendDecorations(
- basePos + tokenStart,
- token.substring(0, embeddedSourceStart),
- decorate, decorations);
- // Decorate the embedded source
- appendDecorations(
- basePos + tokenStart + embeddedSourceStart,
- embeddedSource,
- langHandlerForExtension(lang, embeddedSource),
- decorations);
- // Decorate the right of the embedded section
- appendDecorations(
- basePos + tokenStart + embeddedSourceEnd,
- token.substring(embeddedSourceEnd),
- decorate, decorations);
- }
- }
- job.decorations = decorations;
- };
- return decorate;
- }
-
- /** returns a function that produces a list of decorations from source text.
- *
- * This code treats ", ', and ` as string delimiters, and \ as a string
- * escape. It does not recognize perl's qq() style strings.
- * It has no special handling for double delimiter escapes as in basic, or
- * the tripled delimiters used in python, but should work on those regardless
- * although in those cases a single string literal may be broken up into
- * multiple adjacent string literals.
- *
- * It recognizes C, C++, and shell style comments.
- *
- * @param {Object} options a set of optional parameters.
- * @return {function (Object)} a function that examines the source code
- * in the input job and builds the decoration list.
- */
- function sourceDecorator(options) {
- var shortcutStylePatterns = [], fallthroughStylePatterns = [];
- if (options['tripleQuotedStrings']) {
- // '''multi-line-string''', 'single-line-string', and double-quoted
- shortcutStylePatterns.push(
- [PR_STRING, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
- null, '\'"']);
- } else if (options['multiLineStrings']) {
- // 'multi-line-string', "multi-line-string"
- shortcutStylePatterns.push(
- [PR_STRING, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
- null, '\'"`']);
- } else {
- // 'single-line-string', "single-line-string"
- shortcutStylePatterns.push(
- [PR_STRING,
- /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
- null, '"\'']);
- }
- if (options['verbatimStrings']) {
- // verbatim-string-literal production from the C# grammar. See issue 93.
- fallthroughStylePatterns.push(
- [PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
- }
- var hc = options['hashComments'];
- if (hc) {
- if (options['cStyleComments']) {
- if (hc > 1) { // multiline hash comments
- shortcutStylePatterns.push(
- [PR_COMMENT, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, '#']);
- } else {
- // Stop C preprocessor declarations at an unclosed open comment
- shortcutStylePatterns.push(
- [PR_COMMENT, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,
- null, '#']);
- }
- fallthroughStylePatterns.push(
- [PR_STRING,
- /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,
- null]);
- } else {
- shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']);
- }
- }
- if (options['cStyleComments']) {
- fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]);
- fallthroughStylePatterns.push(
- [PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
- }
- if (options['regexLiterals']) {
- /**
- * @const
- */
- var REGEX_LITERAL = (
- // A regular expression literal starts with a slash that is
- // not followed by * or / so that it is not confused with
- // comments.
- '/(?=[^/*])'
- // and then contains any number of raw characters,
- + '(?:[^/\\x5B\\x5C]'
- // escape sequences (\x5C),
- + '|\\x5C[\\s\\S]'
- // or non-nesting character sets (\x5B\x5D);
- + '|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+'
- // finally closed by a /.
- + '/');
- fallthroughStylePatterns.push(
- ['lang-regex',
- new RegExp('^' + REGEXP_PRECEDER_PATTERN + '(' + REGEX_LITERAL + ')')
- ]);
- }
-
- var types = options['types'];
- if (types) {
- fallthroughStylePatterns.push([PR_TYPE, types]);
- }
-
- var keywords = ("" + options['keywords']).replace(/^ | $/g, '');
- if (keywords.length) {
- fallthroughStylePatterns.push(
- [PR_KEYWORD,
- new RegExp('^(?:' + keywords.replace(/[\s,]+/g, '|') + ')\\b'),
- null]);
- }
-
- shortcutStylePatterns.push([PR_PLAIN, /^\s+/, null, ' \r\n\t\xA0']);
- fallthroughStylePatterns.push(
- // TODO(mikesamuel): recognize non-latin letters and numerals in idents
- [PR_LITERAL, /^@[a-z_$][a-z_$@0-9]*/i, null],
- [PR_TYPE, /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null],
- [PR_PLAIN, /^[a-z_$][a-z_$@0-9]*/i, null],
- [PR_LITERAL,
- new RegExp(
- '^(?:'
- // A hex number
- + '0x[a-f0-9]+'
- // or an octal or decimal number,
- + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
- // possibly in scientific notation
- + '(?:e[+\\-]?\\d+)?'
- + ')'
- // with an optional modifier like UL for unsigned long
- + '[a-z]*', 'i'),
- null, '0123456789'],
- // Don't treat escaped quotes in bash as starting strings. See issue 144.
- [PR_PLAIN, /^\\[\s\S]?/, null],
- [PR_PUNCTUATION, /^.[^\s\w\.$@\'\"\`\/\#\\]*/, null]);
-
- return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns);
- }
-
- var decorateSource = sourceDecorator({
- 'keywords': ALL_KEYWORDS,
- 'hashComments': true,
- 'cStyleComments': true,
- 'multiLineStrings': true,
- 'regexLiterals': true
- });
-
- /**
- * Given a DOM subtree, wraps it in a list, and puts each line into its own
- * list item.
- *
- * @param {Node} node modified in place. Its content is pulled into an
- * HTMLOListElement, and each line is moved into a separate list item.
- * This requires cloning elements, so the input might not have unique
- * IDs after numbering.
- */
- 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;
- } else if (window.getComputedStyle) {
- whitespace = document.defaultView.getComputedStyle(node, null)
- .getPropertyValue('white-space');
- }
- // If it's preformatted, then we need to split lines on line breaks
- // in addition to <BR>s.
- var isPreformatted = whitespace && 'pre' === whitespace.substring(0, 3);
-
- var li = document.createElement('LI');
- while (node.firstChild) {
- li.appendChild(node.firstChild);
- }
- // 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
- if (nocode.test(node.className)) { break; }
- if ('BR' === node.nodeName) {
- breakAfter(node);
- // Discard the <BR> since it is now flush against a </LI>.
- if (node.parentNode) {
- node.parentNode.removeChild(node);
- }
- } else {
- for (var child = node.firstChild; child; child = child.nextSibling) {
- walk(child);
- }
- }
- break;
- case 3: case 4: // Text
- if (isPreformatted) {
- var text = node.nodeValue;
- var match = text.match(lineBreak);
- if (match) {
- var firstLine = text.substring(0, match.index);
- node.nodeValue = firstLine;
- var tail = text.substring(match.index + match[0].length);
- if (tail) {
- var parent = node.parentNode;
- parent.insertBefore(
- document.createTextNode(tail), node.nextSibling);
- }
- breakAfter(node);
- if (!firstLine) {
- // Don't leave blank text nodes in the DOM.
- node.parentNode.removeChild(node);
- }
- }
- }
- 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
- // here, and move root-wards since splitting just before an end-tag
- // would require us to create a bunch of empty copies.
- while (!lineEndNode.nextSibling) {
- 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;
- var parent = limit.parentNode;
- if (parent) {
- // We clone the parent chain.
- // This helps us resurrect important styling elements that cross lines.
- // E.g. in <i>Foo<br>Bar</i>
- // should be rewritten to <li><i>Foo</i></li><li><i>Bar</i></li>.
- var parentClone = breakLeftOf(parent, 1);
- // Move the clone and everything to the right of the original
- // onto the cloned parent.
- var next = limit.nextSibling;
- parentClone.appendChild(rightSide);
- for (var sibling = next; sibling; sibling = next) {
- next = sibling.nextSibling;
- parentClone.appendChild(sibling);
- }
- }
- 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.
- (parent = copiedListItem.parentNode) && parent.nodeType === 1;) {
- copiedListItem = parent;
- }
- // 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;
- for (i = 0, n = listItems.length; i < n; ++i) {
- li = listItems[i];
- // Stick a class on the LIs so that stylesheets can
- // color odd/even rows, or any other row pattern that
- // is co-prime with 10.
- li.className = 'L' + ((i + offset) % 10);
- if (!li.firstChild) {
- li.appendChild(document.createTextNode('\xA0'));
- }
- ol.appendChild(li);
- }
-
- node.appendChild(ol);
- }
-
- /**
- * Breaks {@code job.sourceCode} around style boundaries in
- * {@code job.decorations} and modifies {@code job.sourceNode} in place.
- * @param {Object} job like <pre>{
- * sourceCode: {string} source as plain text,
- * spans: {Array.<number|Node>} alternating span start indices into source
- * and the text node or element (e.g. {@code <BR>}) corresponding to that
- * span.
- * decorations: {Array.<number|string} an array of style classes preceded
- * by the position at which they start in job.sourceCode in order
- * }</pre>
- * @private
- */
- 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;
- for (i = decPos = 0; i < nDecorations;) {
- if (decorations[i] !== decorations[i + 2]) {
- decorations[decPos++] = decorations[i++];
- decorations[decPos++] = decorations[i++];
- } else {
- i += 2;
- }
- }
- nDecorations = decPos;
-
- // Simplify decorations.
- for (i = decPos = 0; i < nDecorations;) {
- var startPos = decorations[i];
- // Conflate all adjacent decorations that use the same style.
- var startDec = decorations[i + 1];
- var end = i + 2;
- while (end + 2 <= nDecorations && decorations[end + 1] === startDec) {
- end += 2;
- }
- decorations[decPos++] = startPos;
- 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 <BR>s or <LI>s
- // Don't introduce spans around empty text nodes.
- && (styledText = source.substring(sourceIndex, end))) {
- // This may seem bizarre, and it is. Emitting LF on IE causes the
- // code to display with spaces instead of line breaks.
- // Emitting Windows standard issue linebreaks (CRLF) causes a blank
- // space to appear at the beginning of every line but the first.
- // Emitting an old Mac OS 9 line separator makes everything spiffy.
- if (isIE) { styledText = styledText.replace(newlineRe, '\r'); }
- textNode.nodeValue = styledText;
- var document = textNode.ownerDocument;
- var span = document.createElement('SPAN');
- span.className = decorations[decorationIndex + 1];
- var parentNode = textNode.parentNode;
- parentNode.replaceChild(span, textNode);
- span.appendChild(textNode);
- if (sourceIndex < spanEnd) { // Split off a text node.
- spans[spanIndex + 1] = textNode
- // TODO: Possibly optimize by using '' if there's no flicker.
- = document.createTextNode(source.substring(end, spanEnd));
- parentNode.insertBefore(textNode, span.nextSibling);
- }
- }
-
- sourceIndex = end;
-
- if (sourceIndex >= spanEnd) {
- spanIndex += 2;
- }
- if (sourceIndex >= decEnd) {
- decorationIndex += 2;
- }
- }
- }
-
-
- /** Maps language-specific file extensions to handlers. */
- var langHandlerRegistry = {};
- /** Register a language handler for the given file extensions.
- * @param {function (Object)} handler a function from source code to a list
- * of decorations. Takes a single argument job which describes the
- * state of the computation. The single parameter has the form
- * {@code {
- * sourceCode: {string} as plain text.
- * decorations: {Array.<number|string>} an array of style classes
- * preceded by the position at which they start in
- * job.sourceCode in order.
- * The language handler should assigned this field.
- * basePos: {int} the position of source in the larger source chunk.
- * All positions in the output decorations array are relative
- * to the larger source chunk.
- * } }
- * @param {Array.<string>} fileExtensions
- */
- function registerLangHandler(handler, fileExtensions) {
- for (var i = fileExtensions.length; --i >= 0;) {
- var ext = fileExtensions[i];
- if (!langHandlerRegistry.hasOwnProperty(ext)) {
- langHandlerRegistry[ext] = handler;
- } else if (window['console']) {
- console['warn']('cannot override language handler %s', ext);
- }
- }
- }
- function langHandlerForExtension(extension, source) {
- if (!(extension && langHandlerRegistry.hasOwnProperty(extension))) {
- // Treat it as markup if the first non whitespace character is a < and
- // the last non-whitespace character is a >.
- extension = /^\s*</.test(source)
- ? 'default-markup'
- : 'default-code';
- }
- return langHandlerRegistry[extension];
- }
- registerLangHandler(decorateSource, ['default-code']);
- registerLangHandler(
- createSimpleLexer(
- [],
- [
- [PR_PLAIN, /^[^<?]+/],
- [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/],
- [PR_COMMENT, /^<\!--[\s\S]*?(?:-\->|$)/],
- // Unescaped content in an unknown language
- ['lang-', /^<\?([\s\S]+?)(?:\?>|$)/],
- ['lang-', /^<%([\s\S]+?)(?:%>|$)/],
- [PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/],
- ['lang-', /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
- // Unescaped content in javascript. (Or possibly vbscript).
- ['lang-js', /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
- // Contains unescaped stylesheet content
- ['lang-css', /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
- ['lang-in.tag', /^(<\/?[a-z][^<>]*>)/i]
- ]),
- ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']);
- registerLangHandler(
- createSimpleLexer(
- [
- [PR_PLAIN, /^[\s]+/, null, ' \t\r\n'],
- [PR_ATTRIB_VALUE, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '\"\'']
- ],
- [
- [PR_TAG, /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
- [PR_ATTRIB_NAME, /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
- ['lang-uq.val', /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
- [PR_PUNCTUATION, /^[=<>\/]+/],
- ['lang-js', /^on\w+\s*=\s*\"([^\"]+)\"/i],
- ['lang-js', /^on\w+\s*=\s*\'([^\']+)\'/i],
- ['lang-js', /^on\w+\s*=\s*([^\"\'>\s]+)/i],
- ['lang-css', /^style\s*=\s*\"([^\"]+)\"/i],
- ['lang-css', /^style\s*=\s*\'([^\']+)\'/i],
- ['lang-css', /^style\s*=\s*([^\"\'>\s]+)/i]
- ]),
- ['in.tag']);
- registerLangHandler(
- createSimpleLexer([], [[PR_ATTRIB_VALUE, /^[\s\S]+/]]), ['uq.val']);
- registerLangHandler(sourceDecorator({
- 'keywords': CPP_KEYWORDS,
- 'hashComments': true,
- 'cStyleComments': true,
- 'types': C_TYPES
- }), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']);
- registerLangHandler(sourceDecorator({
- 'keywords': 'null,true,false'
- }), ['json']);
- registerLangHandler(sourceDecorator({
- 'keywords': CSHARP_KEYWORDS,
- 'hashComments': true,
- 'cStyleComments': true,
- 'verbatimStrings': true,
- 'types': C_TYPES
- }), ['cs']);
- registerLangHandler(sourceDecorator({
- 'keywords': JAVA_KEYWORDS,
- 'cStyleComments': true
- }), ['java']);
- registerLangHandler(sourceDecorator({
- 'keywords': SH_KEYWORDS,
- 'hashComments': true,
- 'multiLineStrings': true
- }), ['bsh', 'csh', 'sh']);
- registerLangHandler(sourceDecorator({
- 'keywords': PYTHON_KEYWORDS,
- 'hashComments': true,
- 'multiLineStrings': true,
- 'tripleQuotedStrings': true
- }), ['cv', 'py']);
- registerLangHandler(sourceDecorator({
- 'keywords': PERL_KEYWORDS,
- 'hashComments': true,
- 'multiLineStrings': true,
- 'regexLiterals': true
- }), ['perl', 'pl', 'pm']);
- registerLangHandler(sourceDecorator({
- 'keywords': RUBY_KEYWORDS,
- 'hashComments': true,
- 'multiLineStrings': true,
- 'regexLiterals': true
- }), ['rb']);
- registerLangHandler(sourceDecorator({
- 'keywords': JSCRIPT_KEYWORDS,
- 'cStyleComments': true,
- 'regexLiterals': true
- }), ['js']);
- registerLangHandler(sourceDecorator({
- 'keywords': COFFEE_KEYWORDS,
- 'hashComments': 3, // ### style block comments
- 'cStyleComments': true,
- 'multilineStrings': true,
- 'tripleQuotedStrings': true,
- 'regexLiterals': true
- }), ['coffee']);
- registerLangHandler(createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']);
-
- function applyDecorator(job) {
- var opt_langExtension = job.langExtension;
-
- try {
- // Extract tags, and convert the source code to plain text.
- var sourceAndSpans = extractSourceSpans(job.sourceNode);
- /** Plain text. @type {string} */
- var source = sourceAndSpans.sourceCode;
- job.sourceCode = source;
- job.spans = sourceAndSpans.spans;
- job.basePos = 0;
-
- // Apply the appropriate language handler
- langHandlerForExtension(opt_langExtension, source)(job);
-
- // Integrate the decorations and tags back into the source code,
- // modifying the sourceNode in place.
- recombineTagsAndDecorations(job);
- } catch (e) {
- if ('console' in window) {
- console['log'](e && e['stack'] ? e['stack'] : e);
- }
- }
- }
-
- /**
- * @param sourceCodeHtml {string} The HTML to pretty print.
- * @param opt_langExtension {string} The language name to use.
- * Typically, a filename extension like 'cpp' or 'java'.
- * @param opt_numberLines {number|boolean} True to number lines,
- * or the 1-indexed number of the first line in sourceCodeHtml.
- */
- function prettyPrintOne(sourceCodeHtml, opt_langExtension, opt_numberLines) {
- var container = document.createElement('PRE');
- // This could cause images to load and onload listeners to fire.
- // E.g. <img onerror="alert(1337)" src="nosuchimage.png">.
- // We assume that the inner HTML is from a trusted source.
- container.innerHTML = sourceCodeHtml;
- if (opt_numberLines) {
- numberLines(container, opt_numberLines);
- }
-
- var job = {
- langExtension: opt_langExtension,
- numberLines: opt_numberLines,
- sourceNode: container
- };
- applyDecorator(job);
- return container.innerHTML;
- }
-
- function prettyPrint(opt_whenDone) {
- function byTagName(tn) { return document.getElementsByTagName(tn); }
- // fetch a list of nodes to rewrite
- var codeSegments = [byTagName('pre'), byTagName('code'), byTagName('xmp')];
- var elements = [];
- for (var i = 0; i < codeSegments.length; ++i) {
- for (var j = 0, n = codeSegments[i].length; j < n; ++j) {
- elements.push(codeSegments[i][j]);
- }
- }
- codeSegments = null;
-
- var clock = Date;
- if (!clock['now']) {
- clock = { 'now': function () { return +(new Date); } };
- }
-
- // The loop is broken into a series of continuations to make sure that we
- // don't make the browser unresponsive when rewriting a large page.
- var k = 0;
- var prettyPrintingJob;
-
- var langExtensionRe = /\blang(?:uage)?-([\w.]+)(?!\S)/;
- var prettyPrintRe = /\bprettyprint\b/;
-
- function doWork() {
- var endTime = (window['PR_SHOULD_USE_CONTINUATION'] ?
- clock['now']() + 250 /* ms */ :
- Infinity);
- for (; k < elements.length && clock['now']() < endTime; k++) {
- var cs = elements[k];
- var className = cs.className;
- if (className.indexOf('prettyprint') >= 0) {
- // If the classes includes a language extensions, use it.
- // Language extensions can be specified like
- // <pre class="prettyprint lang-cpp">
- // the language extension "cpp" is used to find a language handler as
- // passed to PR.registerLangHandler.
- // HTML5 recommends that a language be specified using "language-"
- // as the prefix instead. Google Code Prettify supports both.
- // http://dev.w3.org/html5/spec-author-view/the-code-element.html
- var langExtension = className.match(langExtensionRe);
- // Support <pre class="prettyprint"><code class="language-c">
- var wrapper;
- if (!langExtension && (wrapper = childContentWrapper(cs))
- && "CODE" === wrapper.tagName) {
- langExtension = wrapper.className.match(langExtensionRe);
- }
-
- if (langExtension) {
- langExtension = langExtension[1];
- }
-
- // make sure this is not nested in an already prettified element
- var nested = false;
- for (var p = cs.parentNode; p; p = p.parentNode) {
- if ((p.tagName === 'pre' || p.tagName === 'code' ||
- p.tagName === 'xmp') &&
- p.className && p.className.indexOf('prettyprint') >= 0) {
- nested = true;
- break;
- }
- }
- if (!nested) {
- // Look for a class like linenums or linenums:<n> where <n> is the
- // 1-indexed number of the first line.
- var lineNums = cs.className.match(/\blinenums\b(?::(\d+))?/);
- if (lineNums) {
- lineNums = lineNums[1] && lineNums[1].length ? +lineNums[1] : true;
- } else {
- lineNums = false;
- }
- if (lineNums) { numberLines(cs, lineNums); }
-
- // do the pretty printing
- prettyPrintingJob = {
- langExtension: langExtension,
- sourceNode: cs,
- numberLines: lineNums
- };
- applyDecorator(prettyPrintingJob);
- }
- }
- }
- if (k < elements.length) {
- // finish up in a continuation
- setTimeout(doWork, 250);
- } else if (opt_whenDone) {
- opt_whenDone();
- }
- }
-
- doWork();
- }
-
- /**
- * Find all the {@code <pre>} and {@code <code>} tags in the DOM with
- * {@code class=prettyprint} and prettify them.
- *
- * @param {Function?} opt_whenDone if specified, called when the last entry
- * has been finished.
- */
- window['prettyPrintOne'] = prettyPrintOne;
- /**
- * Pretty print a chunk of code.
- *
- * @param {string} sourceCodeHtml code as html
- * @return {string} code as html, but prettier
- */
- window['prettyPrint'] = prettyPrint;
- /**
- * Contains functions for creating and registering new language handlers.
- * @type {Object}
- */
- window['PR'] = {
- 'createSimpleLexer': createSimpleLexer,
- 'registerLangHandler': registerLangHandler,
- 'sourceDecorator': sourceDecorator,
- 'PR_ATTRIB_NAME': PR_ATTRIB_NAME,
- 'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE,
- 'PR_COMMENT': PR_COMMENT,
- 'PR_DECLARATION': PR_DECLARATION,
- 'PR_KEYWORD': PR_KEYWORD,
- 'PR_LITERAL': PR_LITERAL,
- 'PR_NOCODE': PR_NOCODE,
- 'PR_PLAIN': PR_PLAIN,
- 'PR_PUNCTUATION': PR_PUNCTUATION,
- 'PR_SOURCE': PR_SOURCE,
- 'PR_STRING': PR_STRING,
- 'PR_TAG': PR_TAG,
- 'PR_TYPE': PR_TYPE
- };
-})();
diff --git a/toolkit/components/microformats/test/static/javascript/testrunner.js b/toolkit/components/microformats/test/static/javascript/testrunner.js
deleted file mode 100644
index db8db492e4..0000000000
--- a/toolkit/components/microformats/test/static/javascript/testrunner.js
+++ /dev/null
@@ -1,179 +0,0 @@
-/*!
- 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
-*/
-
-var options = {
- 'baseUrl': 'http://example.com',
- 'dateFormat': 'html5',
- 'parseLatLonGeo': false
- };
-
-window.onload = function() {
- var test = testData.data[0],
- versionElt = document.querySelector('#version');
-
- versionElt.innerHTML = 'v' + testData.version;
-
- buildTest( test );
- buildList( testData );
-}
-
-
-function displayTest(e){
- var label = e.target.innerHTML;
- var i = testData.data.length;
- while (i--) {
- if(testData.data[i].name === label){
- buildTest( testData.data[i] );
- break;
- }
- }
-}
-
-
-function buildTest( test ){
- var testDetailElt = document.querySelector('.test-detail'),
- nameElt = document.querySelector('#test-name'),
- htmlElt = document.querySelector('#test-html pre code'),
- 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 );
-
- var dom = new DOMParser();
- 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) ) );
- }else{
- diffElt.innerHTML = '';
- }
-
- console.log(diff)
- if(diff !== undefined){
- addClass(nameElt, 'failed');
- addClass(testDetailElt, 'test-failed');
- removeClass(testDetailElt, 'test-passed');
- }else{
- removeClass(nameElt, 'failed');
- removeClass(testDetailElt, 'test-failed');
- addClass(testDetailElt, 'test-passed');
- }
-
- testDetailElt.style.display = 'block';
-
- //prettyPrint();
-}
-
-
-
-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);
-}
-
-
-
-
-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,
- 'passed': passed,
- 'percentPassed': ((100/total) * passed).toFixed(1)
- } )
-}
-
-
-function updateCounts( data ){
- var testCountsElt = document.querySelector('.test-counts');
- testCountsElt.innerHTML = 'Passed: ' + data.passed + '/' + data.total + ' - ' + data.percentPassed + '% of microformats tests';
-}
-
-
-function htmlEscape(str) {
- return String(str)
- .replace(/&/g, '&amp;')
- .replace(/"/g, '&quot;')
- .replace(/'/g, '&#39;')
- .replace(/</g, '&lt;')
- .replace(/>/g, '&gt;');
-}
-
-// I needed the opposite function today, so adding here too:
-function htmlUnescape(value){
- return String(value)
- .replace(/&quot;/g, '"')
- .replace(/&#39;/g, "'")
- .replace(/&lt;/g, '<')
- .replace(/&gt;/g, '>')
- .replace(/&amp;/g, '&');
-}
-
-
-// Does the node have a class
-function hasClass(node, className) {
- if (node.className) {
- return node.className.match(
- new RegExp('(\\s|^)' + className + '(\\s|$)'));
- } else {
- return false;
- }
-}
-
-
-// Add a class to an node
-function addClass(node, className) {
- if (!hasClass(node, className)) {
- node.className += " " + className;
- }
-}
-
-
-// Removes a class from an node
-function removeClass(node, className) {
- if (hasClass(node, className)) {
- var reg = new RegExp('(\\s|^)' + className + '(\\s|$)');
- node.className = node.className.replace(reg, ' ');
- }
-}
diff --git a/toolkit/components/microformats/test/static/parse-umd.html b/toolkit/components/microformats/test/static/parse-umd.html
deleted file mode 100644
index ec9a0c0711..0000000000
--- a/toolkit/components/microformats/test/static/parse-umd.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
-
- <meta charset="UTF-8">
- <title>Parse Microformats</title>
- <meta name="description" content="microformat-shiv - A light-weight cross browser javascript microformats 2 parser" />
-
- <link rel="stylesheet" href="css/testrunner.css">
- <link rel="stylesheet" href="css/prettify.css">
-
-
- <!-- Loads full umd version -->
- <script src="../../thirdparty/es5-shim.min.js"></script>
- <script src="../../microformat-shiv.js"></script>
-
-
- <script src="javascript/beautify.js"></script>
- <script src="javascript/prettify.js"></script>
- <script src="javascript/DOMParser.js"></script>
- <script src="javascript/parse.js"></script>
-
- </head>
-
- <body>
-
- <p>microformat-shiv</p>
- <h1>Parse Microformats - UMD</h1>
- <p>Type or copy and paste the HTML you want to parse into the box below.</p>
-
- <form id="mf-form" class="tool-interface" method="get" action="">
- <p>
- <label for="html">HTML</label>
-<textarea id="html" name="html">&lt;a class="h-card" href="http://glennjones.net"&gt;
- &lt;span class="p-given-name"&gt;Glenn&lt;/span&gt;
- &lt;span class="p-family-name"&gt;Jones&lt;/span&gt;
-&lt;/a&gt;
-</textarea>
- </p>
-
-
- <p>
- <label for="baseurl">BaseURL</label>
- <input id="baseurl" name="baseurl" placeholder="Optional URL to help resolve relative links" value="http://example.com" type="text">
- </p>
-
-
- <p>
- <label for="filters">Filters</label>
- <input id="filters" name="filters" placeholder="Optional comma separted list of formats to filter by" type="text">
- </p>
-
-
- <p class="checkbox">
- <input id="collapsewhitespace" name="collapsewhitespace" id="textformat2" type="checkbox">
- <label class="checkbox-label" for="textformat2"><strong>Experimental</strong> ‐ Text white-space collapsing</label>
- </p>
-
- <p class="checkbox">
- <input id="parseLatLonGeo" name="parseLatLonGeo" id="parseLatLonGeo" type="checkbox">
- <label class="checkbox-label" for="parseLatLonGeo"><strong>Experimental</strong> ‐ Parse geo data writen as latlon i.e. 30.267991;-97.739568</label>
- </p>
-
- <p>
-
- <select id="dateformat" class="indent" name="dateformat" id="dateformat2">
- <option value="auto" selected="selected">auto</option>
- <option value="W3C">w3c</option>
- <option value="HTML5">html5</option>
- <option value="RFC3339">rfc3339</option>
- </select>
-
- <label class="checkbox-label" for="dateformat2"><strong>Experimental</strong> ‐ ISO date profile</label>
- </p>
-
- <input class="button" value="Parse" type="submit">
- </form>
-
- <h1>Parser JSON</h1>
- <div id="parser-json"><pre class="prettyprint"><code class="language-json"></code></pre></div>
-
-
-
- </body>
-</html> \ No newline at end of file
diff --git a/toolkit/components/microformats/test/static/parse.html b/toolkit/components/microformats/test/static/parse.html
deleted file mode 100644
index c8b929fcba..0000000000
--- a/toolkit/components/microformats/test/static/parse.html
+++ /dev/null
@@ -1,127 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
-
- <meta charset="UTF-8">
- <title>Parse Microformats</title>
- <meta name="description" content="microformat-shiv - A light-weight cross browser javascript microformats 2 parser" />
-
- <link rel="stylesheet" href="css/testrunner.css">
- <link rel="stylesheet" href="css/prettify.css">
-
- <script src="..././thirdparty/es5-shim.min.js"></script>
-
- <!-- loads Modules to help with debugging ie windows.Modules -->
- <script src="../../lib/utilities.js"></script>
- <script src="../../lib/domutils.js"></script>
- <script src="../../lib/url.js"></script>
- <script src="../../lib/html.js"></script>
- <script src="../../lib/text.js"></script>
- <script src="../../lib/dates.js"></script>
- <script src="../../lib/isodate.js"></script>
- <script src="../../lib/parser.js"></script>
- <script src="../../lib/parser-implied.js"></script>
- <script src="../../lib/parser-includes.js"></script>
- <script src="../../lib/parser-rels.js"></script>
-
- <script src="../../lib/maps/h-adr.js"></script>
- <script src="../../lib/maps/h-card.js"></script>
- <script src="../../lib/maps/h-entry.js"></script>
- <script src="../../lib/maps/h-event.js"></script>
- <script src="../../lib/maps/h-feed.js"></script>
- <script src="../../lib/maps/h-geo.js"></script>
- <script src="../../lib/maps/h-item.js"></script>
- <script src="../../lib/maps/h-listing.js"></script>
- <script src="../../lib/maps/h-news.js"></script>
- <script src="../../lib/maps/h-org.js"></script>
- <script src="../../lib/maps/h-product.js"></script>
- <script src="../../lib/maps/h-recipe.js"></script>
- <script src="../../lib/maps/h-resume.js"></script>
- <script src="../../lib/maps/h-review-aggregate.js"></script>
- <script src="../../lib/maps/h-review.js"></script>
- <script src="../../lib/maps/rel.js"></script>
-
-
- <script src="javascript/beautify.js"></script>
- <script src="javascript/prettify.js"></script>
-
- <script src="javascript/DOMParser.js"></script>
- <script src="javascript/parse.js"></script>
-
- </head>
-
- <body>
-
- <p>microformat-shiv</p>
- <h1>Parse Microformats - Modules</h1>
- <p>Type or copy and paste the HTML you want to parse into the box below.</p>
-
- <form id="mf-form" class="tool-interface" method="get" action="">
- <p>
- <label for="html">HTML</label>
-<textarea id="html" name="html">&lt;a class="h-card" href="glenn.html"&gt;
- &lt;span class="p-given-name"&gt;Glenn&lt;/span&gt;
- &lt;span class="p-family-name"&gt;Jones&lt;/span&gt;
-&lt;/a&gt;
-</textarea>
- </p>
-
-
- <p>
- <label for="baseurl">BaseURL</label>
- <input id="baseurl" name="baseurl" placeholder="Optional URL to help resolve relative links" value="http://example.com" type="text">
- </p>
-
- <p>
- <label for="filters">Filters</label>
- <input id="filters" name="filters" placeholder="Optional comma separted list of formats to filter by" type="text">
- </p>
-
-
-
- <p class="checkbox">
- <input id="collapsewhitespace" name="collapsewhitespace" id="textformat2" type="checkbox">
- <label class="checkbox-label" for="textformat2"><strong>Experimental</strong> ‐ Text white-space collapsing</label>
- </p>
-
- <!--
- <p class="checkbox">
- <input id="overlappingversions" name="overlappingversions" id="overlappingversions" type="checkbox">
- <label class="checkbox-label" for="overlappingversions"><strong>Experimental</strong> ‐ Block overlapping properties from different microformat versions</label>
- </p>
-
- <p class="checkbox">
- <input id="impliedPropertiesByVersion" name="impliedPropertiesByVersion" id="impliedPropertiesByVersion" type="checkbox">
- <label class="checkbox-label" for="impliedPropertiesByVersion"><strong>Experimental</strong> ‐ Set implied properties by microformat version</label>
- </p>
- -->
-
- <p class="checkbox">
- <input id="parseLatLonGeo" name="parseLatLonGeo" id="parseLatLonGeo" type="checkbox">
- <label class="checkbox-label" for="parseLatLonGeo"><strong>Experimental</strong> ‐ Parse geo data writen as latlon i.e. 30.267991;-97.739568</label>
- </p>
-
-
-
- <p>
-
- <select id="dateformat" class="indent" name="dateformat" id="dateformat2">
- <option value="auto" selected="selected">auto</option>
- <option value="W3C">w3c</option>
- <option value="HTML5">html5</option>
- <option value="RFC3339">rfc3339</option>
- </select>
-
- <label class="checkbox-label" for="dateformat2"><strong>Experimental</strong> ‐ Fixed ISO date profile for output</label>
- </p>
-
- <input class="button" value="Parse" type="submit">
- </form>
-
- <h1>Parser JSON</h1>
- <div id="parser-json"><pre class="prettyprint"><code class="language-json"></code></pre></div>
-
-
-
- </body>
-</html> \ No newline at end of file
diff --git a/toolkit/components/microformats/test/static/testrunner.html b/toolkit/components/microformats/test/static/testrunner.html
deleted file mode 100644
index 54e8ceb846..0000000000
--- a/toolkit/components/microformats/test/static/testrunner.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8" />
- <title>Microformats Test Suite</title>
-
- <link rel="stylesheet" href="css/testrunner.css">
- <link rel="stylesheet" href="css/prettify.css">
-
-
- <script src="../../thirdparty/es5-shim.min.js"></script>
- <script src="../../microformat-shiv.js"></script>
-
-
- <script src="javascript/DOMParser.js"></script>
- <script src="javascript/data.js"></script>
- <script src="javascript/beautify.js"></script>
- <script src="javascript/prettify.js"></script>
- <script src="javascript/deep-diff-0.3.1.min.js"></script>
- <script src="javascript/testrunner.js"></script>
-
-
-</head>
-<body >
-
- <p>microformat-shiv</p>
- <h1>Microformats Tests <span id="version"></span></h1>
-
- <h2 class="test-counts"></h2>
-
-
- <p>Inspect the details of any test from the list</p>
- <section class="flexbox-container">
-
- <section class="test-results">
- <ul class="test-result-list">
- </ul>
- </section>
-
-
- <section class="test-detail">
-
-
- <h2 id="test-name"></h2>
-
- <h1>Test</h1>
- <div id="test-html"><pre class="prettyprint"><code class="language-html"></code></pre></div>
-
- <h1>Expected JSON</h1>
- <div id="test-json"><pre class="prettyprint"><code class="language-json"></code></pre></div>
-
- <h1>Parser JSON</h1>
- <div id="parser-json"><pre class="prettyprint"><code class="language-json"></code></pre></div>
-
- <div class="differences">
- <h1>Differences</h1>
- <div id="test-diff"><pre class="prettyprint"><code class="language-json"></code></pre></div>
- </div>
-
- </section>
-
- </section>
-
- <footer>
-
- </footer>
-</body>
-
-</html> \ No newline at end of file
diff --git a/toolkit/components/moz.build b/toolkit/components/moz.build
index d9dae12d1a..ff71d7c9dd 100644
--- a/toolkit/components/moz.build
+++ b/toolkit/components/moz.build
@@ -50,7 +50,6 @@ DIRS += [
'reader',
'remotebrowserutils',
'reflect',
- 'sqlite',
'startup',
'statusfilter',
'telemetry',
@@ -67,11 +66,10 @@ DIRS += [
DIRS += ['mozintl']
-if not CONFIG['MOZ_FENNEC']:
- DIRS += ['narrate', 'viewsource'];
+DIRS += ['narrate', 'viewsource'];
- if CONFIG['NS_PRINTING']:
- DIRS += ['printing']
+if CONFIG['NS_PRINTING']:
+ DIRS += ['printing']
if CONFIG['BUILD_CTYPES']:
DIRS += ['ctypes']
@@ -95,13 +93,11 @@ if CONFIG['MOZ_URL_CLASSIFIER']:
DIRS += ['captivedetect']
-if CONFIG['OS_TARGET'] != 'Android':
- DIRS += ['terminator']
+DIRS += ['terminator']
DIRS += ['build']
-if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
- EXTRA_COMPONENTS += [
- 'nsDefaultCLH.js',
- 'nsDefaultCLH.manifest',
- ]
+EXTRA_COMPONENTS += [
+ 'nsDefaultCLH.js',
+ 'nsDefaultCLH.manifest',
+]
diff --git a/toolkit/components/mozintl/moz.build b/toolkit/components/mozintl/moz.build
index a92ed50b71..d949f81ef6 100644
--- a/toolkit/components/mozintl/moz.build
+++ b/toolkit/components/mozintl/moz.build
@@ -4,16 +4,10 @@
# 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/.
-XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell.ini']
-
-XPIDL_SOURCES += [
- 'mozIMozIntl.idl',
-]
+XPIDL_SOURCES += ['mozIMozIntl.idl']
XPIDL_MODULE = 'mozintl'
-SOURCES += [
- 'MozIntl.cpp',
-]
+SOURCES += ['MozIntl.cpp']
FINAL_LIBRARY = 'xul'
diff --git a/toolkit/components/mozintl/test/test_mozintl.js b/toolkit/components/mozintl/test/test_mozintl.js
deleted file mode 100644
index 8d2720bf01..0000000000
--- a/toolkit/components/mozintl/test/test_mozintl.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function run_test() {
- const mozIntl = Components.classes["@mozilla.org/mozintl;1"]
- .getService(Components.interfaces.mozIMozIntl);
-
- test_this_global(mozIntl);
- test_cross_global(mozIntl);
- test_methods_presence(mozIntl);
-
- ok(true);
-}
-
-function test_this_global(mozIntl) {
- let x = {};
-
- mozIntl.addGetCalendarInfo(x);
- equal(x.getCalendarInfo instanceof Function, true);
- equal(x.getCalendarInfo() instanceof Object, true);
-}
-
-function test_cross_global(mozIntl) {
- var global = new Components.utils.Sandbox("https://example.com/");
- var x = global.Object();
-
- mozIntl.addGetCalendarInfo(x);
- var waivedX = Components.utils.waiveXrays(x);
- equal(waivedX.getCalendarInfo instanceof Function, false);
- equal(waivedX.getCalendarInfo instanceof global.Function, true);
- equal(waivedX.getCalendarInfo() instanceof Object, false);
- equal(waivedX.getCalendarInfo() instanceof global.Object, true);
-}
-
-function test_methods_presence(mozIntl) {
- equal(mozIntl.addGetCalendarInfo instanceof Function, true);
- equal(mozIntl.addGetDisplayNames instanceof Function, true);
-
- let x = {};
-
- mozIntl.addGetCalendarInfo(x);
- equal(x.getCalendarInfo instanceof Function, true);
-
- mozIntl.addGetDisplayNames(x);
- equal(x.getDisplayNames instanceof Function, true);
-}
diff --git a/toolkit/components/mozintl/test/xpcshell.ini b/toolkit/components/mozintl/test/xpcshell.ini
deleted file mode 100644
index 8fecd39334..0000000000
--- a/toolkit/components/mozintl/test/xpcshell.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[DEFAULT]
-head =
-tail =
-
-[test_mozintl.js]
diff --git a/toolkit/components/mozprotocol/moz.build b/toolkit/components/mozprotocol/moz.build
index fa09ade5a4..42bbeb5182 100644
--- a/toolkit/components/mozprotocol/moz.build
+++ b/toolkit/components/mozprotocol/moz.build
@@ -8,7 +8,3 @@ EXTRA_COMPONENTS += [
'mozProtocolHandler.js',
'mozProtocolHandler.manifest',
]
-
-BROWSER_CHROME_MANIFESTS += [
- 'tests/browser.ini'
-]
diff --git a/toolkit/components/mozprotocol/tests/browser.ini b/toolkit/components/mozprotocol/tests/browser.ini
deleted file mode 100644
index 168882a671..0000000000
--- a/toolkit/components/mozprotocol/tests/browser.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[DEFAULT]
-
-[browser_mozprotocol.js]
-support-files =
- mozprotocol.html
diff --git a/toolkit/components/mozprotocol/tests/browser_mozprotocol.js b/toolkit/components/mozprotocol/tests/browser_mozprotocol.js
deleted file mode 100644
index 795ce8a08c..0000000000
--- a/toolkit/components/mozprotocol/tests/browser_mozprotocol.js
+++ /dev/null
@@ -1,14 +0,0 @@
-// Check that entering moz://a into the address bar directs us to a new url
-add_task(function*() {
- let path = getRootDirectory(gTestPath).substring("chrome://mochitests/content/".length);
- yield SpecialPowers.pushPrefEnv({
- set: [["toolkit.mozprotocol.url", `https://example.com/${path}mozprotocol.html`]],
- });
-
- yield BrowserTestUtils.withNewTab("about:blank", function*() {
- gBrowser.loadURI("moz://a");
- yield BrowserTestUtils.waitForLocationChange(gBrowser,
- `https://example.com/${path}mozprotocol.html`);
- ok(true, "Made it to the expected page");
- });
-});
diff --git a/toolkit/components/mozprotocol/tests/mozprotocol.html b/toolkit/components/mozprotocol/tests/mozprotocol.html
deleted file mode 100644
index 3d6549e00f..0000000000
--- a/toolkit/components/mozprotocol/tests/mozprotocol.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-<body>
-<p><a id="link" href="moz://a">Test</a></p>
-</body>
-</html>
diff --git a/toolkit/components/narrate/moz.build b/toolkit/components/narrate/moz.build
index c5597c3691..bd2d298b65 100644
--- a/toolkit/components/narrate/moz.build
+++ b/toolkit/components/narrate/moz.build
@@ -9,5 +9,3 @@ EXTRA_JS_MODULES.narrate = [
'Narrator.jsm',
'VoiceSelect.jsm'
]
-
-BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
diff --git a/toolkit/components/narrate/test/.eslintrc.js b/toolkit/components/narrate/test/.eslintrc.js
deleted file mode 100644
index 5ff0bae7ee..0000000000
--- a/toolkit/components/narrate/test/.eslintrc.js
+++ /dev/null
@@ -1,23 +0,0 @@
-"use strict";
-
-module.exports = { // eslint-disable-line no-undef
- "extends": [
- "../.eslintrc.js"
- ],
-
- "globals": {
- "is": true,
- "isnot": true,
- "ok": true,
- "NarrateTestUtils": true,
- "content": true,
- "ContentTaskUtils": true,
- "ContentTask": true,
- "BrowserTestUtils": true,
- "gBrowser": true,
- },
-
- "rules": {
- "mozilla/import-headjs-globals": "warn"
- }
-};
diff --git a/toolkit/components/narrate/test/NarrateTestUtils.jsm b/toolkit/components/narrate/test/NarrateTestUtils.jsm
deleted file mode 100644
index b782f66c9e..0000000000
--- a/toolkit/components/narrate/test/NarrateTestUtils.jsm
+++ /dev/null
@@ -1,148 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-const Cu = Components.utils;
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/Preferences.jsm");
-Cu.import("resource://testing-common/ContentTaskUtils.jsm");
-
-this.EXPORTED_SYMBOLS = [ "NarrateTestUtils" ];
-
-this.NarrateTestUtils = {
- TOGGLE: "#narrate-toggle",
- POPUP: "#narrate-dropdown .dropdown-popup",
- VOICE_SELECT: "#narrate-voices .select-toggle",
- VOICE_OPTIONS: "#narrate-voices .options",
- VOICE_SELECTED: "#narrate-voices .options .option.selected",
- VOICE_SELECT_LABEL: "#narrate-voices .select-toggle .current-voice",
- RATE: "#narrate-rate-input",
- START: "#narrate-dropdown:not(.speaking) #narrate-start-stop",
- STOP: "#narrate-dropdown.speaking #narrate-start-stop",
- BACK: "#narrate-skip-previous",
- FORWARD: "#narrate-skip-next",
-
- isVisible: function(element) {
- let style = element.ownerDocument.defaultView.getComputedStyle(element, "");
- if (style.display == "none") {
- return false;
- } else if (style.visibility != "visible") {
- return false;
- } else if (style.display == "-moz-popup" && element.state != "open") {
- return false;
- }
-
- // Hiding a parent element will hide all its children
- if (element.parentNode != element.ownerDocument) {
- return this.isVisible(element.parentNode);
- }
-
- return true;
- },
-
- isStoppedState: function(window, ok) {
- let $ = window.document.querySelector.bind(window.document);
- ok($(this.BACK).disabled, "back button is disabled");
- ok($(this.FORWARD).disabled, "forward button is disabled");
- ok(!!$(this.START), "start button is showing");
- ok(!$(this.STOP), "stop button is hidden");
- // This checks for a localized label. Not the best...
- ok($(this.START).title == "Start", "Button tooltip is correct");
- },
-
- isStartedState: function(window, ok) {
- let $ = window.document.querySelector.bind(window.document);
- ok(!$(this.BACK).disabled, "back button is enabled");
- ok(!$(this.FORWARD).disabled, "forward button is enabled");
- ok(!$(this.START), "start button is hidden");
- ok(!!$(this.STOP), "stop button is showing");
- // This checks for a localized label. Not the best...
- ok($(this.STOP).title == "Stop", "Button tooltip is correct");
- },
-
- selectVoice: function(window, voiceUri) {
- if (!this.isVisible(window.document.querySelector(this.VOICE_OPTIONS))) {
- window.document.querySelector(this.VOICE_SELECT).click();
- }
-
- let voiceOption = window.document.querySelector(
- `#narrate-voices .option[data-value="${voiceUri}"]`);
-
- voiceOption.focus();
- voiceOption.click();
-
- return voiceOption.classList.contains("selected");
- },
-
- getEventUtils: function(window) {
- let eventUtils = {
- "_EU_Ci": Components.interfaces,
- "_EU_Cc": Components.classes,
- window: window,
- parent: window,
- navigator: window.navigator,
- KeyboardEvent: window.KeyboardEvent,
- KeyEvent: window.KeyEvent
- };
- Services.scriptloader.loadSubScript(
- "chrome://mochikit/content/tests/SimpleTest/EventUtils.js", eventUtils);
- return eventUtils;
- },
-
- getReaderReadyPromise: function(window) {
- return new Promise(resolve => {
- function observeReady(subject, topic) {
- if (subject == window) {
- Services.obs.removeObserver(observeReady, topic);
- resolve();
- }
- }
-
- if (window.document.body.classList.contains("loaded")) {
- resolve();
- } else {
- Services.obs.addObserver(observeReady, "AboutReader:Ready", false);
- }
- });
- },
-
- waitForNarrateToggle: function(window) {
- let toggle = window.document.querySelector(this.TOGGLE);
- return ContentTaskUtils.waitForCondition(
- () => !toggle.hidden, "");
- },
-
- waitForPrefChange: function(pref) {
- return new Promise(resolve => {
- function observeChange() {
- Services.prefs.removeObserver(pref, observeChange);
- resolve(Preferences.get(pref));
- }
-
- Services.prefs.addObserver(pref, observeChange, false);
- });
- },
-
- sendBoundaryEvent: function(window, name, charIndex) {
- let detail = { type: "boundary", args: { name, charIndex } };
- window.dispatchEvent(new window.CustomEvent("testsynthevent",
- { detail: detail }));
- },
-
- isWordHighlightGone: function(window, ok) {
- let $ = window.document.querySelector.bind(window.document);
- ok(!$(".narrate-word-highlight"), "No more word highlights exist");
- },
-
- getWordHighlights: function(window) {
- let $$ = window.document.querySelectorAll.bind(window.document);
- let nodes = Array.from($$(".narrate-word-highlight"));
- return nodes.map(node => {
- return { word: node.dataset.word,
- left: Number(node.style.left.replace(/px$/, "")),
- top: Number(node.style.top.replace(/px$/, ""))};
- });
- }
-};
diff --git a/toolkit/components/narrate/test/browser.ini b/toolkit/components/narrate/test/browser.ini
deleted file mode 100644
index 0f5d694ac2..0000000000
--- a/toolkit/components/narrate/test/browser.ini
+++ /dev/null
@@ -1,12 +0,0 @@
-[DEFAULT]
-support-files =
- head.js
- NarrateTestUtils.jsm
- moby_dick.html
-
-[browser_narrate.js]
-[browser_narrate_disable.js]
-[browser_narrate_language.js]
-support-files = inferno.html
-[browser_voiceselect.js]
-[browser_word_highlight.js]
diff --git a/toolkit/components/narrate/test/browser_narrate.js b/toolkit/components/narrate/test/browser_narrate.js
deleted file mode 100644
index b4951ef9f6..0000000000
--- a/toolkit/components/narrate/test/browser_narrate.js
+++ /dev/null
@@ -1,137 +0,0 @@
-/* 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/. */
-
-/* globals is, isnot, registerCleanupFunction, add_task */
-
-"use strict";
-
-registerCleanupFunction(teardown);
-
-add_task(function* testNarrate() {
- setup();
-
- yield spawnInNewReaderTab(TEST_ARTICLE, function* () {
- let TEST_VOICE = "urn:moz-tts:fake-indirect:teresa";
- let $ = content.document.querySelector.bind(content.document);
-
- yield NarrateTestUtils.waitForNarrateToggle(content);
-
- let popup = $(NarrateTestUtils.POPUP);
- ok(!NarrateTestUtils.isVisible(popup), "popup is initially hidden");
-
- let toggle = $(NarrateTestUtils.TOGGLE);
- toggle.click();
-
- ok(NarrateTestUtils.isVisible(popup), "popup toggled");
-
- let voiceOptions = $(NarrateTestUtils.VOICE_OPTIONS);
- ok(!NarrateTestUtils.isVisible(voiceOptions),
- "voice options are initially hidden");
-
- $(NarrateTestUtils.VOICE_SELECT).click();
- ok(NarrateTestUtils.isVisible(voiceOptions), "voice options pop up");
-
- let prefChanged = NarrateTestUtils.waitForPrefChange("narrate.voice");
- ok(NarrateTestUtils.selectVoice(content, TEST_VOICE),
- "test voice selected");
- yield prefChanged;
-
- ok(!NarrateTestUtils.isVisible(voiceOptions), "voice options hidden again");
-
- NarrateTestUtils.isStoppedState(content, ok);
-
- let promiseEvent = ContentTaskUtils.waitForEvent(content, "paragraphstart");
- $(NarrateTestUtils.START).click();
- let speechinfo = (yield promiseEvent).detail;
- is(speechinfo.voice, TEST_VOICE, "correct voice is being used");
- let paragraph = speechinfo.paragraph;
-
- NarrateTestUtils.isStartedState(content, ok);
-
- promiseEvent = ContentTaskUtils.waitForEvent(content, "paragraphstart");
- $(NarrateTestUtils.FORWARD).click();
- speechinfo = (yield promiseEvent).detail;
- is(speechinfo.voice, TEST_VOICE, "same voice is used");
- isnot(speechinfo.paragraph, paragraph, "next paragraph is being spoken");
-
- NarrateTestUtils.isStartedState(content, ok);
-
- promiseEvent = ContentTaskUtils.waitForEvent(content, "paragraphstart");
- $(NarrateTestUtils.BACK).click();
- speechinfo = (yield promiseEvent).detail;
- is(speechinfo.paragraph, paragraph, "first paragraph being spoken");
-
- NarrateTestUtils.isStartedState(content, ok);
-
- paragraph = speechinfo.paragraph;
- $(NarrateTestUtils.STOP).click();
- yield ContentTaskUtils.waitForCondition(
- () => !$(NarrateTestUtils.STOP), "transitioned to stopped state");
- NarrateTestUtils.isStoppedState(content, ok);
-
- promiseEvent = ContentTaskUtils.waitForEvent(content, "paragraphstart");
- $(NarrateTestUtils.START).click();
- speechinfo = (yield promiseEvent).detail;
- is(speechinfo.paragraph, paragraph, "read same paragraph again");
-
- NarrateTestUtils.isStartedState(content, ok);
-
- let eventUtils = NarrateTestUtils.getEventUtils(content);
-
- promiseEvent = ContentTaskUtils.waitForEvent(content, "paragraphstart");
- prefChanged = NarrateTestUtils.waitForPrefChange("narrate.rate");
- $(NarrateTestUtils.RATE).focus();
- eventUtils.sendKey("UP", content);
- let newspeechinfo = (yield promiseEvent).detail;
- is(newspeechinfo.paragraph, speechinfo.paragraph, "same paragraph");
- isnot(newspeechinfo.rate, speechinfo.rate, "rate changed");
- yield prefChanged;
-
- promiseEvent = ContentTaskUtils.waitForEvent(content, "paragraphend");
- $(NarrateTestUtils.STOP).click();
- yield promiseEvent;
-
- yield ContentTaskUtils.waitForCondition(
- () => !$(NarrateTestUtils.STOP), "transitioned to stopped state");
- NarrateTestUtils.isStoppedState(content, ok);
-
- promiseEvent = ContentTaskUtils.waitForEvent(content, "scroll");
- content.scrollBy(0, 10);
- yield promiseEvent;
- ok(!NarrateTestUtils.isVisible(popup), "popup is hidden after scroll");
-
- toggle.click();
- ok(NarrateTestUtils.isVisible(popup), "popup is toggled again");
-
- promiseEvent = ContentTaskUtils.waitForEvent(content, "paragraphstart");
- $(NarrateTestUtils.START).click();
- yield promiseEvent;
- NarrateTestUtils.isStartedState(content, ok);
-
- promiseEvent = ContentTaskUtils.waitForEvent(content, "scroll");
- content.scrollBy(0, -10);
- yield promiseEvent;
- ok(NarrateTestUtils.isVisible(popup), "popup stays visible after scroll");
-
- toggle.click();
- ok(!NarrateTestUtils.isVisible(popup), "popup is dismissed while speaking");
- NarrateTestUtils.isStartedState(content, ok);
-
- // Go forward all the way to the end of the article. We should eventually
- // stop.
- do {
- promiseEvent = Promise.race([
- ContentTaskUtils.waitForEvent(content, "paragraphstart"),
- ContentTaskUtils.waitForEvent(content, "paragraphsdone")]);
- $(NarrateTestUtils.FORWARD).click();
- } while ((yield promiseEvent).type == "paragraphstart");
-
- // This is to make sure we are not actively scrolling when the tab closes.
- content.scroll(0, 0);
-
- yield ContentTaskUtils.waitForCondition(
- () => !$(NarrateTestUtils.STOP), "transitioned to stopped state");
- NarrateTestUtils.isStoppedState(content, ok);
- });
-});
diff --git a/toolkit/components/narrate/test/browser_narrate_disable.js b/toolkit/components/narrate/test/browser_narrate_disable.js
deleted file mode 100644
index 264815fd1e..0000000000
--- a/toolkit/components/narrate/test/browser_narrate_disable.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/* 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/. */
-
-/* globals registerCleanupFunction, add_task */
-
-"use strict";
-
-const ENABLE_PREF = "narrate.enabled";
-
-registerCleanupFunction(() => {
- clearUserPref(ENABLE_PREF);
- teardown();
-});
-
-add_task(function* testNarratePref() {
- setup();
-
- yield spawnInNewReaderTab(TEST_ARTICLE, function() {
- is(content.document.querySelectorAll(NarrateTestUtils.TOGGLE).length, 1,
- "narrate is inserted by default");
- });
-
- setBoolPref(ENABLE_PREF, false);
-
- yield spawnInNewReaderTab(TEST_ARTICLE, function() {
- ok(!content.document.querySelector(NarrateTestUtils.TOGGLE),
- "narrate is disabled and is not in reader mode");
- });
-
- setBoolPref(ENABLE_PREF, true);
-
- yield spawnInNewReaderTab(TEST_ARTICLE, function() {
- is(content.document.querySelectorAll(NarrateTestUtils.TOGGLE).length, 1,
- "narrate is re-enabled and appears only once");
- });
-});
diff --git a/toolkit/components/narrate/test/browser_narrate_language.js b/toolkit/components/narrate/test/browser_narrate_language.js
deleted file mode 100644
index 2542a87d6d..0000000000
--- a/toolkit/components/narrate/test/browser_narrate_language.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/* 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/. */
-
-/* globals is, isnot, registerCleanupFunction, add_task */
-
-"use strict";
-
-registerCleanupFunction(teardown);
-
-add_task(function* testVoiceselectDropdownAutoclose() {
- setup("automatic", true);
-
- yield spawnInNewReaderTab(TEST_ARTICLE, function* () {
- let $ = content.document.querySelector.bind(content.document);
-
- yield NarrateTestUtils.waitForNarrateToggle(content);
-
- ok(!!$(".option[data-value='urn:moz-tts:fake-direct:bob']"),
- "Jamaican English voice available");
- ok(!!$(".option[data-value='urn:moz-tts:fake-direct:lenny']"),
- "Canadian English voice available");
- ok(!!$(".option[data-value='urn:moz-tts:fake-direct:amy']"),
- "British English voice available");
-
- ok(!$(".option[data-value='urn:moz-tts:fake-direct:celine']"),
- "Canadian French voice unavailable");
- ok(!$(".option[data-value='urn:moz-tts:fake-direct:julie']"),
- "Mexican Spanish voice unavailable");
-
- $(NarrateTestUtils.TOGGLE).click();
- ok(NarrateTestUtils.isVisible($(NarrateTestUtils.POPUP)),
- "popup is toggled");
-
- let prefChanged = NarrateTestUtils.waitForPrefChange(
- "narrate.voice", "getCharPref");
- NarrateTestUtils.selectVoice(content, "urn:moz-tts:fake-direct:lenny");
- let voicePref = JSON.parse(yield prefChanged);
- is(voicePref.en, "urn:moz-tts:fake-direct:lenny", "pref set correctly");
- });
-});
-
-add_task(function* testVoiceselectDropdownAutoclose() {
- setup("automatic", true);
-
- yield spawnInNewReaderTab(TEST_ITALIAN_ARTICLE, function* () {
- let $ = content.document.querySelector.bind(content.document);
-
- yield NarrateTestUtils.waitForNarrateToggle(content);
-
- ok(!!$(".option[data-value='urn:moz-tts:fake-indirect:zanetta']"),
- "Italian voice available");
- ok(!!$(".option[data-value='urn:moz-tts:fake-indirect:margherita']"),
- "Italian voice available");
-
- ok(!$(".option[data-value='urn:moz-tts:fake-direct:bob']"),
- "Jamaican English voice available");
- ok(!$(".option[data-value='urn:moz-tts:fake-direct:celine']"),
- "Canadian French voice unavailable");
- ok(!$(".option[data-value='urn:moz-tts:fake-direct:julie']"),
- "Mexican Spanish voice unavailable");
-
- $(NarrateTestUtils.TOGGLE).click();
- ok(NarrateTestUtils.isVisible($(NarrateTestUtils.POPUP)),
- "popup is toggled");
-
- let prefChanged = NarrateTestUtils.waitForPrefChange(
- "narrate.voice", "getCharPref");
- NarrateTestUtils.selectVoice(content, "urn:moz-tts:fake-indirect:zanetta");
- let voicePref = JSON.parse(yield prefChanged);
- is(voicePref.it, "urn:moz-tts:fake-indirect:zanetta", "pref set correctly");
- });
-});
diff --git a/toolkit/components/narrate/test/browser_voiceselect.js b/toolkit/components/narrate/test/browser_voiceselect.js
deleted file mode 100644
index 0de6528dd4..0000000000
--- a/toolkit/components/narrate/test/browser_voiceselect.js
+++ /dev/null
@@ -1,112 +0,0 @@
-/* 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/. */
-
-/* globals registerCleanupFunction, add_task, is, isnot */
-
-"use strict";
-
-registerCleanupFunction(teardown);
-
-add_task(function* testVoiceselectDropdownAutoclose() {
- setup();
-
- yield spawnInNewReaderTab(TEST_ARTICLE, function* () {
- let $ = content.document.querySelector.bind(content.document);
-
- yield NarrateTestUtils.waitForNarrateToggle(content);
-
- $(NarrateTestUtils.TOGGLE).click();
- ok(NarrateTestUtils.isVisible($(NarrateTestUtils.POPUP)),
- "popup is toggled");
-
- ok(!NarrateTestUtils.isVisible($(NarrateTestUtils.VOICE_OPTIONS)),
- "voice options are initially hidden");
-
- $(NarrateTestUtils.VOICE_SELECT).click();
- ok(NarrateTestUtils.isVisible($(NarrateTestUtils.VOICE_OPTIONS)),
- "voice options are toggled");
-
- $(NarrateTestUtils.TOGGLE).click();
- // A focus will follow a real click.
- $(NarrateTestUtils.TOGGLE).focus();
- ok(!NarrateTestUtils.isVisible($(NarrateTestUtils.POPUP)),
- "narrate popup is dismissed");
-
- $(NarrateTestUtils.TOGGLE).click();
- // A focus will follow a real click.
- $(NarrateTestUtils.TOGGLE).focus();
- ok(NarrateTestUtils.isVisible($(NarrateTestUtils.POPUP)),
- "narrate popup is showing again");
- ok(!NarrateTestUtils.isVisible($(NarrateTestUtils.VOICE_OPTIONS)),
- "voice options are hidden after popup comes back");
- });
-});
-
-add_task(function* testVoiceselectLabelChange() {
- setup();
-
- yield spawnInNewReaderTab(TEST_ARTICLE, function* () {
- let $ = content.document.querySelector.bind(content.document);
-
- yield NarrateTestUtils.waitForNarrateToggle(content);
-
- $(NarrateTestUtils.TOGGLE).click();
- ok(NarrateTestUtils.isVisible($(NarrateTestUtils.POPUP)),
- "popup is toggled");
-
- ok(NarrateTestUtils.selectVoice(content, "urn:moz-tts:fake-direct:lenny"),
- "voice selected");
-
- let selectedOption = $(NarrateTestUtils.VOICE_SELECTED);
- let selectLabel = $(NarrateTestUtils.VOICE_SELECT_LABEL);
-
- is(selectedOption.textContent, selectLabel.textContent,
- "new label matches selected voice");
- });
-});
-
-add_task(function* testVoiceselectKeyboard() {
- setup();
-
- yield spawnInNewReaderTab(TEST_ARTICLE, function* () {
- let $ = content.document.querySelector.bind(content.document);
-
- yield NarrateTestUtils.waitForNarrateToggle(content);
-
- $(NarrateTestUtils.TOGGLE).click();
- ok(NarrateTestUtils.isVisible($(NarrateTestUtils.POPUP)),
- "popup is toggled");
-
- let eventUtils = NarrateTestUtils.getEventUtils(content);
-
- let firstValue = $(NarrateTestUtils.VOICE_SELECTED).dataset.value;
-
- ok(!NarrateTestUtils.isVisible($(NarrateTestUtils.VOICE_OPTIONS)),
- "voice options initially are hidden");
-
- $(NarrateTestUtils.VOICE_SELECT).focus();
-
- eventUtils.sendKey("DOWN", content);
-
- yield ContentTaskUtils.waitForCondition(
- () => $(NarrateTestUtils.VOICE_SELECTED).dataset.value != firstValue,
- "value changed after pressing DOWN key");
-
- eventUtils.sendKey("RETURN", content);
-
- ok(NarrateTestUtils.isVisible($(NarrateTestUtils.VOICE_OPTIONS)),
- "voice options showing after pressing RETURN");
-
- eventUtils.sendKey("UP", content);
-
- eventUtils.sendKey("RETURN", content);
-
- ok(!NarrateTestUtils.isVisible($(NarrateTestUtils.VOICE_OPTIONS)),
- "voice options hidden after pressing RETURN");
-
- yield ContentTaskUtils.waitForCondition(
- () => $(NarrateTestUtils.VOICE_SELECTED).dataset.value == firstValue,
- "value changed back to original after pressing RETURN");
- });
-});
diff --git a/toolkit/components/narrate/test/browser_word_highlight.js b/toolkit/components/narrate/test/browser_word_highlight.js
deleted file mode 100644
index bfdbcf48e7..0000000000
--- a/toolkit/components/narrate/test/browser_word_highlight.js
+++ /dev/null
@@ -1,69 +0,0 @@
-/* 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/. */
-
-/* globals is, isnot, registerCleanupFunction, add_task */
-
-"use strict";
-
-registerCleanupFunction(teardown);
-
-add_task(function* testNarrate() {
- setup("urn:moz-tts:fake-indirect:teresa");
-
- yield spawnInNewReaderTab(TEST_ARTICLE, function* () {
- let $ = content.document.querySelector.bind(content.document);
-
- yield NarrateTestUtils.waitForNarrateToggle(content);
-
- let popup = $(NarrateTestUtils.POPUP);
- ok(!NarrateTestUtils.isVisible(popup), "popup is initially hidden");
-
- let toggle = $(NarrateTestUtils.TOGGLE);
- toggle.click();
-
- ok(NarrateTestUtils.isVisible(popup), "popup toggled");
-
- NarrateTestUtils.isStoppedState(content, ok);
-
- let promiseEvent = ContentTaskUtils.waitForEvent(content, "paragraphstart");
- $(NarrateTestUtils.START).click();
- let voice = (yield promiseEvent).detail.voice;
- is(voice, "urn:moz-tts:fake-indirect:teresa", "double-check voice");
-
- // Skip forward to first paragraph.
- let details;
- do {
- promiseEvent = ContentTaskUtils.waitForEvent(content, "paragraphstart");
- $(NarrateTestUtils.FORWARD).click();
- details = (yield promiseEvent).detail;
- } while (details.tag != "p");
-
- let boundaryPat = /(\s+)\S/g;
- let position = { left: 0, top: 0 };
- let text = details.paragraph;
- for (let res = boundaryPat.exec(text); res; res = boundaryPat.exec(text)) {
- promiseEvent = ContentTaskUtils.waitForEvent(content, "wordhighlight");
- NarrateTestUtils.sendBoundaryEvent(content, "word", res.index);
- let { start, end } = (yield promiseEvent).detail;
- let nodes = NarrateTestUtils.getWordHighlights(content);
- for (let node of nodes) {
- // Since this is English we can assume each word is to the right or
- // below the previous one.
- ok(node.left > position.left || node.top > position.top,
- "highlight position is moving");
- position = { left: node.left, top: node.top };
- }
- let wordFromOffset = text.substring(start, end);
- // XXX: Each node should contain the part of the word it highlights.
- // Right now, each node contains the entire word.
- let wordFromHighlight = nodes[0].word;
- is(wordFromOffset, wordFromHighlight, "Correct word is highlighted");
- }
-
- $(NarrateTestUtils.STOP).click();
- yield ContentTaskUtils.waitForCondition(
- () => !$(NarrateTestUtils.STOP), "transitioned to stopped state");
- NarrateTestUtils.isWordHighlightGone(content, ok);
- });
-});
diff --git a/toolkit/components/narrate/test/head.js b/toolkit/components/narrate/test/head.js
deleted file mode 100644
index 491a3da8d4..0000000000
--- a/toolkit/components/narrate/test/head.js
+++ /dev/null
@@ -1,87 +0,0 @@
-/* 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/. */
-
-/* exported teardown, setup, toggleExtension,
- spawnInNewReaderTab, TEST_ARTICLE, TEST_ITALIAN_ARTICLE */
-
-"use strict";
-
-const TEST_ARTICLE =
- "http://example.com/browser/toolkit/components/narrate/test/moby_dick.html";
-
-const TEST_ITALIAN_ARTICLE =
- "http://example.com/browser/toolkit/components/narrate/test/inferno.html";
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "Promise",
- "resource://gre/modules/Promise.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Services",
- "resource://gre/modules/Services.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "AddonManager",
- "resource://gre/modules/AddonManager.jsm");
-
-const TEST_PREFS = {
- "reader.parse-on-load.enabled": true,
- "media.webspeech.synth.enabled": true,
- "media.webspeech.synth.test": true,
- "narrate.enabled": true,
- "narrate.test": true,
- "narrate.voice": null,
- "narrate.filter-voices": false,
-};
-
-function setup(voiceUri = "automatic", filterVoices = false) {
- let prefs = Object.assign({}, TEST_PREFS, {
- "narrate.filter-voices": filterVoices,
- "narrate.voice": JSON.stringify({ en: voiceUri })
- });
-
- // Set required test prefs.
- Object.entries(prefs).forEach(([name, value]) => {
- switch (typeof value) {
- case "boolean":
- setBoolPref(name, value);
- break;
- case "string":
- setCharPref(name, value);
- break;
- }
- });
-}
-
-function teardown() {
- // Reset test prefs.
- Object.entries(TEST_PREFS).forEach(pref => {
- clearUserPref(pref[0]);
- });
-}
-
-function spawnInNewReaderTab(url, func) {
- return BrowserTestUtils.withNewTab(
- { gBrowser,
- url: `about:reader?url=${encodeURIComponent(url)}` },
- function* (browser) {
- yield ContentTask.spawn(browser, null, function* () {
- Components.utils.import("chrome://mochitests/content/browser/" +
- "toolkit/components/narrate/test/NarrateTestUtils.jsm");
-
- yield NarrateTestUtils.getReaderReadyPromise(content);
- });
-
- yield ContentTask.spawn(browser, null, func);
- });
-}
-
-function setBoolPref(name, value) {
- Services.prefs.setBoolPref(name, value);
-}
-
-function setCharPref(name, value) {
- Services.prefs.setCharPref(name, value);
-}
-
-function clearUserPref(name) {
- Services.prefs.clearUserPref(name);
-}
diff --git a/toolkit/components/narrate/test/inferno.html b/toolkit/components/narrate/test/inferno.html
deleted file mode 100644
index 58dfd24df1..0000000000
--- a/toolkit/components/narrate/test/inferno.html
+++ /dev/null
@@ -1,238 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>Inferno - Canto I</title>
-</head>
-<body>
- <h1>Inferno</h1>
- <h2>Canto I: Dante nella selva oscura</h2>
- <p>
- Nel mezzo del cammin di nostra vita<br>
- mi ritrovai per una selva oscura,<br>
- ché la diritta via era smarrita.
- </p>
- <p>
- Ahi quanto a dir qual era è cosa dura<br>
- esta selva selvaggia e aspra e forte<br>
- che nel pensier rinova la paura!
- </p>
- <p>
- Tant' è amara che poco è più morte;<br>
- ma per trattar del ben ch'i' vi trovai,<br>
- dirò de l'altre cose ch'i' v'ho scorte.
- </p>
- <p>
- Io non so ben ridir com' i' v'intrai,<br>
- tant' era pien di sonno a quel punto<br>
- che la verace via abbandonai.
- </p>
- <p>
- Ma poi ch'i' fui al piè d'un colle giunto,<br>
- là dove terminava quella valle<br>
- che m'avea di paura il cor compunto,
- </p>
- <p>
- guardai in alto e vidi le sue spalle<br>
- vestite già de' raggi del pianeta<br>
- che mena dritto altrui per ogne calle.
- </p>
- <p>
- Allor fu la paura un poco queta,<br>
- che nel lago del cor m'era durata<br>
- la notte ch'i' passai con tanta pieta.
- </p>
- <p>
- E come quei che con lena affannata,<br>
- uscito fuor del pelago a la riva,<br>
- si volge a l'acqua perigliosa e guata,
- </p>
- <p>
- così l'animo mio, ch'ancor fuggiva,<br>
- si volse a retro a rimirar lo passo<br>
- che non lasciò già mai persona viva.
- </p>
- <p>
- Poi ch'èi posato un poco il corpo lasso,<br>
- ripresi via per la piaggia diserta,<br>
- sì che 'l piè fermo sempre era 'l più basso.
- </p>
- <p>
- Ed ecco, quasi al cominciar de l'erta,<br>
- una lonza leggiera e presta molto,<br>
- che di pel macolato era coverta;
- </p>
- <p>
- e non mi si partia dinanzi al volto,<br>
- anzi 'mpediva tanto il mio cammino,<br>
- ch'i' fui per ritornar più volte vòlto.
- </p>
- <p>
- Temp' era dal principio del mattino,<br>
- e 'l sol montava 'n sù con quelle stelle<br>
- ch'eran con lui quando l'amor divino
- </p>
- <p>
- mosse di prima quelle cose belle;<br>
- sì ch'a bene sperar m'era cagione<br>
- di quella fiera a la gaetta pelle
- </p>
- <p>
- l'ora del tempo e la dolce stagione;<br>
- ma non sì che paura non mi desse<br>
- la vista che m'apparve d'un leone.
- </p>
- <p>
- Questi parea che contra me venisse<br>
- con la test' alta e con rabbiosa fame,<br>
- sì che parea che l'aere ne tremesse.
- </p>
- <p>
- Ed una lupa, che di tutte brame<br>
- sembiava carca ne la sua magrezza,<br>
- e molte genti fé già viver grame,
- </p>
- <p>
- questa mi porse tanto di gravezza<br>
- con la paura ch'uscia di sua vista,<br>
- ch'io perdei la speranza de l'altezza.
- </p>
- <p>
- E qual è quei che volontieri acquista,<br>
- e giugne 'l tempo che perder lo face,<br>
- che 'n tutti suoi pensier piange e s'attrista;
- </p>
- <p>
- tal mi fece la bestia sanza pace,<br>
- che, venendomi 'ncontro, a poco a poco<br>
- mi ripigneva là dove 'l sol tace.
- </p>
- <p>
- Mentre ch'i' rovinava in basso loco,<br>
- dinanzi a li occhi mi si fu offerto<br>
- chi per lungo silenzio parea fioco.
- </p>
- <p>
- Quando vidi costui nel gran diserto,<br>
- «<em>Miserere</em> di me», gridai a lui,<br>
- «qual che tu sii, od ombra od omo certo!».
- </p>
- <p>
- Rispuosemi: «Non omo, omo già fui,<br>
- e li parenti miei furon lombardi,<br>
- mantoani per patrïa ambedui.
- </p>
- <p>
- Nacqui <em>sub Iulio</em>, ancor che fosse tardi,<br>
- e vissi a Roma sotto 'l buono Augusto<br>
- nel tempo de li dèi falsi e bugiardi.
- </p>
- <p>
- Poeta fui, e cantai di quel giusto<br>
- figliuol d'Anchise che venne di Troia,<br>
- poi che 'l superbo Ilïón fu combusto.
- </p>
- <p>
- Ma tu perché ritorni a tanta noia?<br>
- perché non sali il dilettoso monte<br>
- ch'è principio e cagion di tutta gioia?».
- </p>
- <p>
- «Or se' tu quel Virgilio e quella fonte<br>
- che spandi di parlar sì largo fiume?»,<br>
- rispuos' io lui con vergognosa fronte.
- </p>
- <p>
- «O de li altri poeti onore e lume,<br>
- vagliami 'l lungo studio e 'l grande amore<br>
- che m'ha fatto cercar lo tuo volume.
- </p>
- <p>
- Tu se' lo mio maestro e 'l mio autore,<br>
- tu se' solo colui da cu' io tolsi<br>
- lo bello stilo che m'ha fatto onore.
- </p>
- <p>
- Vedi la bestia per cu' io mi volsi;<br>
- aiutami da lei, famoso saggio,<br>
- ch'ella mi fa tremar le vene e i polsi».
- </p>
- <p>
- «A te convien tenere altro vïaggio»,<br>
- rispuose, poi che lagrimar mi vide,<br>
- «se vuo' campar d'esto loco selvaggio;
- </p>
- <p>
- ché questa bestia, per la qual tu gride,<br>
- non lascia altrui passar per la sua via,<br>
- ma tanto lo 'mpedisce che l'uccide;
- </p>
- <p>
- e ha natura sì malvagia e ria,<br>
- che mai non empie la bramosa voglia,<br>
- e dopo 'l pasto ha più fame che pria.
- </p>
- <p>
- Molti son li animali a cui s'ammoglia,<br>
- e più saranno ancora, infin che 'l veltro<br>
- verrà, che la farà morir con doglia.
- </p>
- <p>
- Questi non ciberà terra né peltro,<br>
- ma sapïenza, amore e virtute,<br>
- e sua nazion sarà tra feltro e feltro.
- </p>
- <p>
- Di quella umile Italia fia salute<br>
- per cui morì la vergine Cammilla,<br>
- Eurialo e Turno e Niso di ferute.
- </p>
- <p>
- Questi la caccerà per ogne villa,<br>
- fin che l'avrà rimessa ne lo 'nferno,<br>
- là onde 'nvidia prima dipartilla.
- </p>
- <p>
- Ond' io per lo tuo me' penso e discerno<br>
- che tu mi segui, e io sarò tua guida,<br>
- e trarrotti di qui per loco etterno;
- </p>
- <p>
- ove udirai le disperate strida,<br>
- vedrai li antichi spiriti dolenti,<br>
- ch'a la seconda morte ciascun grida;
- </p>
- <p>
- e vederai color che son contenti<br>
- nel foco, perché speran di venire<br>
- quando che sia a le beate genti.
- </p>
- <p>
- A le quai poi se tu vorrai salire,<br>
- anima fia a ciò più di me degna:<br>
- con lei ti lascerò nel mio partire;
- </p>
- <p>
- ché quello imperador che là sù regna,<br>
- perch' i' fu' ribellante a la sua legge,<br>
- non vuol che 'n sua città per me si vegna.
- </p>
- <p>
- In tutte parti impera e quivi regge;<br>
- quivi è la sua città e l'alto seggio:<br>
- oh felice colui cu' ivi elegge!».
- </p>
- <p>
- E io a lui: «Poeta, io ti richeggio<br>
- per quello Dio che tu non conoscesti,<br>
- a ciò ch'io fugga questo male e peggio,
- </p>
- <p>
- che tu mi meni là dov' or dicesti,<br>
- sì ch'io veggia la porta di san Pietro<br>
- e color cui tu fai cotanto mesti».
- </p>
- <p>
- Allor si mosse, e io li tenni dietro.
- </p>
-</body>
-</html>
diff --git a/toolkit/components/narrate/test/moby_dick.html b/toolkit/components/narrate/test/moby_dick.html
deleted file mode 100644
index 0beaa20fd1..0000000000
--- a/toolkit/components/narrate/test/moby_dick.html
+++ /dev/null
@@ -1,218 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<title>Moby Dick - Chapter 1. Loomings</title>
-</head>
-<body>
- <h1>Moby Dick</h1>
- <h2>Chapter 1. Loomings</h2>
- <p>
- Call me Ishmael. <span>Some <span>years</span></span> ago—never mind how
- long precisely—having little or no money in my purse, and nothing particular
- to interest me on shore, I thought I would sail about a little and see the
- watery part of the world. It is a way I have of driving off the spleen and
- regulating the circulation. Whenever I find myself growing grim about the
- mouth; whenever it is a damp, drizzly November in my soul; whenever I find
- myself involuntarily pausing before coffin warehouses, and bringing up the
- rear of every funeral I meet; and especially whenever my hypos get such an
- upper hand of me, that it requires a strong moral principle to prevent me
- from deliberately stepping into the street, and methodically knocking
- people's hats off—then, I account it high time to get to sea as soon as I
- can. This is my substitute for pistol and ball. With a philosophical
- flourish Cato throws himself upon his sword; I quietly take to the ship.
- There is nothing surprising in this. If they but knew it, almost all men in
- their degree, some time or other, cherish very nearly the same feelings
- towards the ocean with me.
- </p>
- <p>
- There now is your insular city of the Manhattoes, belted round by wharves
- as Indian isles by coral reefs—commerce surrounds it with her surf.
- Right and left, the streets take you waterward. Its extreme downtown is
- the battery, where that noble mole is washed by waves, and cooled by
- breezes, which a few hours previous were out of sight of land. Look at the
- crowds of water-gazers there.
- </p>
- <p>
- Circumambulate the city of a dreamy Sabbath afternoon. Go from Corlears
- Hook to Coenties Slip, and from thence, by Whitehall, northward. What do
- you see?—Posted like silent sentinels all around the town, stand
- thousands upon thousands of mortal men fixed in ocean reveries. Some
- leaning against the spiles; some seated upon the pier-heads; some looking
- over the bulwarks of ships from China; some high aloft in the rigging, as
- if striving to get a still better seaward peep. But these are all
- landsmen; of week days pent up in lath and plaster—tied to counters,
- nailed to benches, clinched to desks. How then is this? Are the green
- fields gone? What do they here?
- </p>
- <p>
- But look! here come more crowds, pacing straight for the water, and
- seemingly bound for a dive. Strange! Nothing will content them but the
- extremest limit of the land; loitering under the shady lee of yonder
- warehouses will not suffice. No. They must get just as nigh the water as
- they possibly can without falling in. And there they stand—miles of
- them—leagues. Inlanders all, they come from lanes and alleys,
- streets and avenues—north, east, south, and west. Yet here they all
- unite. Tell me, does the magnetic virtue of the needles of the compasses
- of all those ships attract them thither?
- </p>
- <p>
- Once more. Say you are in the country; in some high land of lakes. Take
- almost any path you please, and ten to one it carries you down in a dale,
- and leaves you there by a pool in the stream. There is magic in it. Let
- the most absent-minded of men be plunged in his deepest reveries—stand
- that man on his legs, set his feet a-going, and he will infallibly lead
- you to water, if water there be in all that region. Should you ever be
- athirst in the great American desert, try this experiment, if your caravan
- happen to be supplied with a metaphysical professor. Yes, as every one
- knows, meditation and water are wedded for ever.
- </p>
- <p>
- But here is an artist. He desires to paint you the dreamiest, shadiest,
- quietest, most enchanting bit of romantic landscape in all the valley of
- the Saco. What is the chief element he employs? There stand his trees,
- each with a hollow trunk, as if a hermit and a crucifix were within; and
- here sleeps his meadow, and there sleep his cattle; and up from yonder
- cottage goes a sleepy smoke. Deep into distant woodlands winds a mazy way,
- reaching to overlapping spurs of mountains bathed in their hill-side blue.
- But though the picture lies thus tranced, and though this pine-tree shakes
- down its sighs like leaves upon this shepherd's head, yet all were vain,
- unless the shepherd's eye were fixed upon the magic stream before him. Go
- visit the Prairies in June, when for scores on scores of miles you wade
- knee-deep among Tiger-lilies—what is the one charm wanting?—Water—there
- is not a drop of water there! Were Niagara but a cataract of sand, would
- you travel your thousand miles to see it? Why did the poor poet of
- Tennessee, upon suddenly receiving two handfuls of silver, deliberate
- whether to buy him a coat, which he sadly needed, or invest his money in a
- pedestrian trip to Rockaway Beach? Why is almost every robust healthy boy
- with a robust healthy soul in him, at some time or other crazy to go to
- sea? Why upon your first voyage as a passenger, did you yourself feel such
- a mystical vibration, when first told that you and your ship were now out
- of sight of land? Why did the old Persians hold the sea holy? Why did the
- Greeks give it a separate deity, and own brother of Jove? Surely all this
- is not without meaning. And still deeper the meaning of that story of
- Narcissus, who because he could not grasp the tormenting, mild image he
- saw in the fountain, plunged into it and was drowned. But that same image,
- we ourselves see in all rivers and oceans. It is the image of the
- ungraspable phantom of life; and this is the key to it all.
- </p>
- <p>
- Now, when I say that I am in the habit of going to sea whenever I begin to
- grow hazy about the eyes, and begin to be over conscious of my lungs, I do
- not mean to have it inferred that I ever go to sea as a passenger. For to
- go as a passenger you must needs have a purse, and a purse is but a rag
- unless you have something in it. Besides, passengers get sea-sick—grow
- quarrelsome—don't sleep of nights—do not enjoy themselves
- much, as a general thing;—no, I never go as a passenger; nor, though
- I am something of a salt, do I ever go to sea as a Commodore, or a
- Captain, or a Cook. I abandon the glory and distinction of such offices to
- those who like them. For my part, I abominate all honourable respectable
- toils, trials, and tribulations of every kind whatsoever. It is quite as
- much as I can do to take care of myself, without taking care of ships,
- barques, brigs, schooners, and what not. And as for going as cook,—though
- I confess there is considerable glory in that, a cook being a sort of
- officer on ship-board—yet, somehow, I never fancied broiling fowls;—though
- once broiled, judiciously buttered, and judgmatically salted and peppered,
- there is no one who will speak more respectfully, not to say
- reverentially, of a broiled fowl than I will. It is out of the idolatrous
- dotings of the old Egyptians upon broiled ibis and roasted river horse,
- that you see the mummies of those creatures in their huge bake-houses the
- pyramids.
- </p>
- <p>
- No, when I go to sea, I go as a simple sailor, right before the mast,
- plumb down into the forecastle, aloft there to the royal mast-head. True,
- they rather order me about some, and make me jump from spar to spar, like
- a grasshopper in a May meadow. And at first, this sort of thing is
- unpleasant enough. It touches one's sense of honour, particularly if you
- come of an old established family in the land, the Van Rensselaers, or
- Randolphs, or Hardicanutes. And more than all, if just previous to putting
- your hand into the tar-pot, you have been lording it as a country
- schoolmaster, making the tallest boys stand in awe of you. The transition
- is a keen one, I assure you, from a schoolmaster to a sailor, and requires
- a strong decoction of Seneca and the Stoics to enable you to grin and bear
- it. But even this wears off in time.
- </p>
- <p>
- What of it, if some old hunks of a sea-captain orders me to get a broom
- and sweep down the decks? What does that indignity amount to, weighed, I
- mean, in the scales of the New Testament? Do you think the archangel
- Gabriel thinks anything the less of me, because I promptly and
- respectfully obey that old hunks in that particular instance? Who ain't a
- slave? Tell me that. Well, then, however the old sea-captains may order me
- about—however they may thump and punch me about, I have the
- satisfaction of knowing that it is all right; that everybody else is one
- way or other served in much the same way—either in a physical or
- metaphysical point of view, that is; and so the universal thump is passed
- round, and all hands should rub each other's shoulder-blades, and be
- content.
- </p>
- <p>
- Again, I always go to sea as a sailor, because they make a point of paying
- me for my trouble, whereas they never pay passengers a single penny that I
- ever heard of. On the contrary, passengers themselves must pay. And there
- is all the difference in the world between paying and being paid. The act
- of paying is perhaps the most uncomfortable infliction that the two
- orchard thieves entailed upon us. But <i>being paid</i>,—what will compare
- with it? The urbane activity with which a man receives money is really
- marvellous, considering that we so earnestly believe money to be the root
- of all earthly ills, and that on no account can a monied man enter heaven.
- Ah! how cheerfully we consign ourselves to perdition!
- </p>
- <p>
- Finally, I always go to sea as a sailor, because of the wholesome exercise
- and pure air of the fore-castle deck. For as in this world, head winds are
- far more prevalent than winds from astern (that is, if you never violate
- the Pythagorean maxim), so for the most part the Commodore on the
- quarter-deck gets his atmosphere at second hand from the sailors on the
- forecastle. He thinks he breathes it first; but not so. In much the same
- way do the commonalty lead their leaders in many other things, at the same
- time that the leaders little suspect it. But wherefore it was that after
- having repeatedly smelt the sea as a merchant sailor, I should now take it
- into my head to go on a whaling voyage; this the invisible police officer
- of the Fates, who has the constant surveillance of me, and secretly dogs
- me, and influences me in some unaccountable way—he can better answer
- than any one else. And, doubtless, my going on this whaling voyage, formed
- part of the grand programme of Providence that was drawn up a long time
- ago. It came in as a sort of brief interlude and solo between more
- extensive performances. I take it that this part of the bill must have run
- something like this:
- </p>
- <p>
- "<i>Grand Contested Election for the Presidency of the United States.</i>
- "WHALING VOYAGE BY ONE ISHMAEL. "BLOODY BATTLE IN AFFGHANISTAN."
- </p>
- <p>
- Though I cannot tell why it was exactly that those stage managers, the
- Fates, put me down for this shabby part of a whaling voyage, when others
- were set down for magnificent parts in high tragedies, and short and easy
- parts in genteel comedies, and jolly parts in farces—though I cannot
- tell why this was exactly; yet, now that I recall all the circumstances, I
- think I can see a little into the springs and motives which being
- cunningly presented to me under various disguises, induced me to set about
- performing the part I did, besides cajoling me into the delusion that it
- was a choice resulting from my own unbiased freewill and discriminating
- judgment.
- </p>
- <p>
- Chief among these motives was the overwhelming idea of the great whale
- himself. Such a portentous and mysterious monster roused all my curiosity.
- Then the wild and distant seas where he rolled his island bulk; the
- undeliverable, nameless perils of the whale; these, with all the attending
- marvels of a thousand Patagonian sights and sounds, helped to sway me to
- my wish. With other men, perhaps, such things would not have been
- inducements; but as for me, I am tormented with an everlasting itch for
- things remote. I love to sail forbidden seas, and land on barbarous
- coasts. Not ignoring what is good, I am quick to perceive a horror, and
- could still be social with it—would they let me—since it is
- but well to be on friendly terms with all the inmates of the place one
- lodges in.
- </p>
- <p>
- By reason of these things, then, the whaling voyage was welcome; the great
- flood-gates of the wonder-world swung open, and in the wild conceits that
- swayed me to my purpose, two and two there floated into my inmost soul,
- endless processions of the whale, and, mid most of them all, one grand
- hooded phantom, like a snow hill in the air.
- </p>
-</body>
-</html>
diff --git a/toolkit/components/osfile/modules/osfile_async_front.jsm b/toolkit/components/osfile/modules/osfile_async_front.jsm
index 9f3b7fb211..698ac87323 100644
--- a/toolkit/components/osfile/modules/osfile_async_front.jsm
+++ b/toolkit/components/osfile/modules/osfile_async_front.jsm
@@ -728,26 +728,19 @@ File.prototype = {
}
};
-
-if (SharedAll.Constants.Sys.Name != "Android") {
- /**
- * Set the last access and modification date of the file.
- * The time stamp resolution is 1 second at best, but might be worse
- * depending on the platform.
- *
- * WARNING: This method is not implemented on Android. On Android,
- * you should use File.setDates instead.
- *
- * @return {promise}
- * @rejects {TypeError}
- * @rejects {OS.File.Error}
- */
- File.prototype.setDates = function(accessDate, modificationDate) {
- return Scheduler.post("File_prototype_setDates",
- [this._fdmsg, accessDate, modificationDate], this);
- };
-}
-
+ /**
+ * Set the last access and modification date of the file.
+ * The time stamp resolution is 1 second at best, but might be worse
+ * depending on the platform.
+ *
+ * @return {promise}
+ * @rejects {TypeError}
+ * @rejects {OS.File.Error}
+ */
+File.prototype.setDates = function(accessDate, modificationDate) {
+ return Scheduler.post("File_prototype_setDates",
+ [this._fdmsg, accessDate, modificationDate], this);
+};
/**
* Open a file asynchronously.
diff --git a/toolkit/components/osfile/modules/osfile_unix_back.jsm b/toolkit/components/osfile/modules/osfile_unix_back.jsm
index 7c2c6f28d6..4cc4445673 100644
--- a/toolkit/components/osfile/modules/osfile_unix_back.jsm
+++ b/toolkit/components/osfile/modules/osfile_unix_back.jsm
@@ -372,14 +372,14 @@
// Two variants of |getwd| which allocate the memory
// dynamically.
- // Linux/Android version
+ // Linux version
libc.declareLazyFFI(SysFile, "get_current_dir_name",
"get_current_dir_name", ctypes.default_abi,
/*return*/ Type.out_path.releaseWithLazy(() =>
SysFile.free
));
- // MacOS/BSD version (will return NULL on Linux/Android)
+ // MacOS/BSD version (will return NULL on Linux)
libc.declareLazyFFI(SysFile, "getwd_auto",
"getwd", ctypes.default_abi,
/*return*/ Type.out_path.releaseWithLazy(() =>
@@ -520,13 +520,13 @@
/*fd_out*/ Type.fd,
/*off_out*/Type.off_t.in_ptr,
/*len*/ Type.size_t,
- /*flags*/ Type.unsigned_int); // Linux/Android-specific
+ /*flags*/ Type.unsigned_int); // Linux-specific
libc.declareLazyFFI(SysFile, "statfs",
"statfs", ctypes.default_abi,
/*return*/ Type.negativeone_or_nothing,
/*path*/ Type.path,
- /*buf*/ Type.statvfs.out_ptr); // Android,B2G
+ /*buf*/ Type.statvfs.out_ptr); // Other platforms
libc.declareLazyFFI(SysFile, "statvfs",
"statvfs", ctypes.default_abi,
diff --git a/toolkit/components/osfile/modules/osfile_unix_front.jsm b/toolkit/components/osfile/modules/osfile_unix_front.jsm
index bd60d4d841..4e41036dfc 100644
--- a/toolkit/components/osfile/modules/osfile_unix_front.jsm
+++ b/toolkit/components/osfile/modules/osfile_unix_front.jsm
@@ -204,10 +204,7 @@
* The time stamp resolution is 1 second at best, but might be worse
* depending on the platform.
*
- * WARNING: This method is not implemented on Android/B2G. On Android/B2G,
- * you should use File.setDates instead.
- *
- * @param {Date,number=} accessDate The last access date. If numeric,
+ * @param {Date,number=} accessDate The last access date. If numeric,
* milliseconds since epoch. If omitted or null, then the current date
* will be used.
* @param {Date,number=} modificationDate The last modification date. If
@@ -217,14 +214,12 @@
* @throws {TypeError} In case of invalid parameters.
* @throws {OS.File.Error} In case of I/O error.
*/
- if (SharedAll.Constants.Sys.Name != "Android") {
- File.prototype.setDates = function(accessDate, modificationDate) {
- let {value, ptr} = datesToTimevals(accessDate, modificationDate);
- throw_on_negative("setDates",
- UnixFile.futimes(this.fd, ptr),
- this._path);
- };
- }
+ File.prototype.setDates = function(accessDate, modificationDate) {
+ let {value, ptr} = datesToTimevals(accessDate, modificationDate);
+ throw_on_negative("setDates",
+ UnixFile.futimes(this.fd, ptr),
+ this._path);
+ };
/**
* Flushes the file's buffers and causes all buffered data
@@ -576,7 +571,7 @@
if (UnixFile.splice) {
const BUFSIZE = 1 << 17;
- // An implementation of |pump| using |splice| (for Linux/Android)
+ // An implementation of |pump| using |splice| (for Linux)
pump = function pump_splice(source, dest, options = {}) {
let nbytes = options.nbytes > 0 ? options.nbytes : Infinity;
let pipe = [];
diff --git a/toolkit/components/osfile/moz.build b/toolkit/components/osfile/moz.build
index d17da2d60f..e407ea3c79 100644
--- a/toolkit/components/osfile/moz.build
+++ b/toolkit/components/osfile/moz.build
@@ -4,32 +4,16 @@
# 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/.
-DIRS += [
- 'modules',
-]
-
-MOCHITEST_CHROME_MANIFESTS += ['tests/mochi/chrome.ini']
-XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell/xpcshell.ini']
-
-SOURCES += [
- 'NativeOSFileInternals.cpp',
-]
+DIRS += ['modules']
XPIDL_MODULE = 'toolkit_osfile'
-XPIDL_SOURCES += [
- 'nsINativeOSFileInternals.idl',
-]
+XPIDL_SOURCES += ['nsINativeOSFileInternals.idl']
-EXPORTS.mozilla += [
- 'NativeOSFileInternals.h',
-]
+EXPORTS.mozilla += ['NativeOSFileInternals.h']
-EXTRA_PP_JS_MODULES += [
- 'osfile.jsm',
-]
+SOURCES += ['NativeOSFileInternals.cpp']
-FINAL_LIBRARY = 'xul'
+EXTRA_PP_JS_MODULES += ['osfile.jsm']
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'OS.File')
+FINAL_LIBRARY = 'xul'
diff --git a/toolkit/components/osfile/tests/mochi/.eslintrc.js b/toolkit/components/osfile/tests/mochi/.eslintrc.js
deleted file mode 100644
index 8c0f4f574c..0000000000
--- a/toolkit/components/osfile/tests/mochi/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/mochitest/chrome.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/osfile/tests/mochi/chrome.ini b/toolkit/components/osfile/tests/mochi/chrome.ini
deleted file mode 100644
index 1da463316e..0000000000
--- a/toolkit/components/osfile/tests/mochi/chrome.ini
+++ /dev/null
@@ -1,15 +0,0 @@
-[DEFAULT]
-skip-if = os == 'android'
-support-files =
- main_test_osfile_async.js
- worker_handler.js
- worker_test_osfile_comms.js
- worker_test_osfile_front.js
- worker_test_osfile_shared.js
- worker_test_osfile_unix.js
- worker_test_osfile_win.js
-
-[test_osfile_async.xul]
-[test_osfile_back.xul]
-[test_osfile_comms.xul]
-[test_osfile_front.xul]
diff --git a/toolkit/components/osfile/tests/mochi/main_test_osfile_async.js b/toolkit/components/osfile/tests/mochi/main_test_osfile_async.js
deleted file mode 100644
index b940a032a2..0000000000
--- a/toolkit/components/osfile/tests/mochi/main_test_osfile_async.js
+++ /dev/null
@@ -1,443 +0,0 @@
-"use strict";
-
-Components.utils.import("resource://gre/modules/osfile.jsm");
-Components.utils.import("resource://gre/modules/Promise.jsm");
-Components.utils.import("resource://gre/modules/Task.jsm");
-Components.utils.import("resource://gre/modules/AsyncShutdown.jsm");
-
-// The following are used to compare against a well-tested reference
-// implementation of file I/O.
-Components.utils.import("resource://gre/modules/NetUtil.jsm");
-Components.utils.import("resource://gre/modules/FileUtils.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-var myok = ok;
-var myis = is;
-var myinfo = info;
-var myisnot = isnot;
-
-var isPromise = function ispromise(value) {
- return value != null && typeof value == "object" && "then" in value;
-};
-
-var maketest = function(prefix, test) {
- let utils = {
- ok: function ok(t, m) {
- myok(t, prefix + ": " + m);
- },
- is: function is(l, r, m) {
- myis(l, r, prefix + ": " + m);
- },
- isnot: function isnot(l, r, m) {
- myisnot(l, r, prefix + ": " + m);
- },
- info: function info(m) {
- myinfo(prefix + ": " + m);
- },
- fail: function fail(m) {
- utils.ok(false, m);
- },
- okpromise: function okpromise(t, m) {
- return t.then(
- function onSuccess() {
- util.ok(true, m);
- },
- function onFailure() {
- util.ok(false, m);
- }
- );
- }
- };
- return function runtest() {
- utils.info("Entering");
- try {
- let result = test.call(this, utils);
- if (!isPromise(result)) {
- throw new TypeError("The test did not return a promise");
- }
- utils.info("This was a promise");
- // The test returns a promise
- result = result.then(function test_complete() {
- utils.info("Complete");
- }, function catch_uncaught_errors(err) {
- utils.fail("Uncaught error " + err);
- if (err && typeof err == "object" && "message" in err) {
- utils.fail("(" + err.message + ")");
- }
- if (err && typeof err == "object" && "stack" in err) {
- utils.fail("at " + err.stack);
- }
- });
- return result;
- } catch (x) {
- utils.fail("Error " + x + " at " + x.stack);
- return null;
- }
- };
-};
-
-/**
- * Fetch asynchronously the contents of a file using xpcom.
- *
- * Used for comparing xpcom-based results to os.file-based results.
- *
- * @param {string} path The _absolute_ path to the file.
- * @return {promise}
- * @resolves {string} The contents of the file.
- */
-var reference_fetch_file = function reference_fetch_file(path, test) {
- test.info("Fetching file " + path);
- let promise = Promise.defer();
- let file = new FileUtils.File(path);
- NetUtil.asyncFetch({
- uri: NetUtil.newURI(file),
- loadUsingSystemPrincipal: true
- }, function(stream, status) {
- if (!Components.isSuccessCode(status)) {
- promise.reject(status);
- return;
- }
- let result, reject;
- try {
- result = NetUtil.readInputStreamToString(stream, stream.available());
- } catch (x) {
- reject = x;
- }
- stream.close();
- if (reject) {
- promise.reject(reject);
- } else {
- promise.resolve(result);
- }
- });
-
- return promise.promise;
-};
-
-/**
- * Compare asynchronously the contents two files using xpcom.
- *
- * Used for comparing xpcom-based results to os.file-based results.
- *
- * @param {string} a The _absolute_ path to the first file.
- * @param {string} b The _absolute_ path to the second file.
- *
- * @resolves {null}
- */
-var reference_compare_files = function reference_compare_files(a, b, test) {
- test.info("Comparing files " + a + " and " + b);
- let a_contents = yield reference_fetch_file(a, test);
- let b_contents = yield reference_fetch_file(b, test);
- is(a_contents, b_contents, "Contents of files " + a + " and " + b + " match");
-};
-
-var reference_dir_contents = function reference_dir_contents(path) {
- let result = [];
- let entries = new FileUtils.File(path).directoryEntries;
- while (entries.hasMoreElements()) {
- let entry = entries.getNext().QueryInterface(Components.interfaces.nsILocalFile);
- result.push(entry.path);
- }
- return result;
-};
-
-// Set/Unset OS.Shared.DEBUG, OS.Shared.TEST and a console listener.
-function toggleDebugTest (pref, consoleListener) {
- Services.prefs.setBoolPref("toolkit.osfile.log", pref);
- Services.prefs.setBoolPref("toolkit.osfile.log.redirect", pref);
- Services.console[pref ? "registerListener" : "unregisterListener"](
- consoleListener);
-}
-
-var test = maketest("Main", function main(test) {
- return Task.spawn(function() {
- SimpleTest.waitForExplicitFinish();
- yield test_stat();
- yield test_debug();
- yield test_info_features_detect();
- yield test_position();
- yield test_iter();
- yield test_exists();
- yield test_debug_test();
- info("Test is over");
- SimpleTest.finish();
- });
-});
-
-/**
- * A file that we know exists and that can be used for reading.
- */
-var EXISTING_FILE = OS.Path.join("chrome", "toolkit", "components",
- "osfile", "tests", "mochi", "main_test_osfile_async.js");
-
-/**
- * Test OS.File.stat and OS.File.prototype.stat
- */
-var test_stat = maketest("stat", function stat(test) {
- return Task.spawn(function() {
- // Open a file and stat it
- let file = yield OS.File.open(EXISTING_FILE);
- let stat1;
-
- try {
- test.info("Stating file");
- stat1 = yield file.stat();
- test.ok(true, "stat has worked " + stat1);
- test.ok(stat1, "stat is not empty");
- } finally {
- yield file.close();
- }
-
- // Stat the same file without opening it
- test.info("Stating a file without opening it");
- let stat2 = yield OS.File.stat(EXISTING_FILE);
- test.ok(true, "stat 2 has worked " + stat2);
- test.ok(stat2, "stat 2 is not empty");
- for (let key in stat2) {
- test.is("" + stat1[key], "" + stat2[key], "Stat field " + key + "is the same");
- }
- });
-});
-
-/**
- * Test feature detection using OS.File.Info.prototype on main thread
- */
-var test_info_features_detect = maketest("features_detect", function features_detect(test) {
- return Task.spawn(function() {
- if (OS.Constants.Win) {
- // see if winBirthDate is defined
- if ("winBirthDate" in OS.File.Info.prototype) {
- test.ok(true, "winBirthDate is defined");
- } else {
- test.fail("winBirthDate not defined though we are under Windows");
- }
- } else if (OS.Constants.libc) {
- // see if unixGroup is defined
- if ("unixGroup" in OS.File.Info.prototype) {
- test.ok(true, "unixGroup is defined");
- } else {
- test.fail("unixGroup is not defined though we are under Unix");
- }
- }
- });
-});
-
-/**
- * Test file.{getPosition, setPosition}
- */
-var test_position = maketest("position", function position(test) {
- return Task.spawn(function() {
- let file = yield OS.File.open(EXISTING_FILE);
-
- try {
- let view = yield file.read();
- test.info("First batch of content read");
- let CHUNK_SIZE = 178;// An arbitrary number of bytes to read from the file
- let pos = yield file.getPosition();
- test.info("Obtained position");
- test.is(pos, view.byteLength, "getPosition returned the end of the file");
- pos = yield file.setPosition(-CHUNK_SIZE, OS.File.POS_END);
- test.info("Changed position");
- test.is(pos, view.byteLength - CHUNK_SIZE, "setPosition returned the correct position");
-
- let view2 = yield file.read();
- test.info("Read the end of the file");
- for (let i = 0; i < CHUNK_SIZE; ++i) {
- if (view2[i] != view[i + view.byteLength - CHUNK_SIZE]) {
- test.is(view2[i], view[i], "setPosition put us in the right position");
- }
- }
- } finally {
- yield file.close();
- }
- });
-});
-
-/**
- * Test OS.File.prototype.{DirectoryIterator}
- */
-var test_iter = maketest("iter", function iter(test) {
- return Task.spawn(function() {
- let currentDir = yield OS.File.getCurrentDirectory();
-
- // Trivial walks through the directory
- test.info("Preparing iteration");
- let iterator = new OS.File.DirectoryIterator(currentDir);
- let temporary_file_name = OS.Path.join(currentDir, "empty-temporary-file.tmp");
- try {
- yield OS.File.remove(temporary_file_name);
- } catch (err) {
- // Ignore errors removing file
- }
- let allFiles1 = yield iterator.nextBatch();
- test.info("Obtained all files through nextBatch");
- test.isnot(allFiles1.length, 0, "There is at least one file");
- test.isnot(allFiles1[0].path, null, "Files have a path");
-
- // Ensure that we have the same entries with |reference_dir_contents|
- let referenceEntries = new Set();
- for (let entry of reference_dir_contents(currentDir)) {
- referenceEntries.add(entry);
- }
- test.is(referenceEntries.size, allFiles1.length, "All the entries in the directory have been listed");
- for (let entry of allFiles1) {
- test.ok(referenceEntries.has(entry.path), "File " + entry.path + " effectively exists");
- // Ensure that we have correct isDir and isSymLink
- // Current directory is {objdir}/_tests/testing/mochitest/, assume it has some dirs and symlinks.
- var f = new FileUtils.File(entry.path);
- test.is(entry.isDir, f.isDirectory(), "Get file " + entry.path + " isDir correctly");
- test.is(entry.isSymLink, f.isSymlink(), "Get file " + entry.path + " isSymLink correctly");
- }
-
- yield iterator.close();
- test.info("Closed iterator");
-
- test.info("Double closing DirectoryIterator");
- iterator = new OS.File.DirectoryIterator(currentDir);
- yield iterator.close();
- yield iterator.close(); //double closing |DirectoryIterator|
- test.ok(true, "|DirectoryIterator| was closed twice successfully");
-
- let allFiles2 = [];
- let i = 0;
- iterator = new OS.File.DirectoryIterator(currentDir);
- yield iterator.forEach(function(entry, index) {
- test.is(i++, index, "Getting the correct index");
- allFiles2.push(entry);
- });
- test.info("Obtained all files through forEach");
- is(allFiles1.length, allFiles2.length, "Both runs returned the same number of files");
- for (let i = 0; i < allFiles1.length; ++i) {
- if (allFiles1[i].path != allFiles2[i].path) {
- test.is(allFiles1[i].path, allFiles2[i].path, "Both runs return the same files");
- break;
- }
- }
-
- // Testing batch iteration + whether an iteration can be stopped early
- let BATCH_LENGTH = 10;
- test.info("Getting some files through nextBatch");
- yield iterator.close();
-
- iterator = new OS.File.DirectoryIterator(currentDir);
- let someFiles1 = yield iterator.nextBatch(BATCH_LENGTH);
- let someFiles2 = yield iterator.nextBatch(BATCH_LENGTH);
- yield iterator.close();
-
- iterator = new OS.File.DirectoryIterator(currentDir);
- yield iterator.forEach(function cb(entry, index, iterator) {
- if (index < BATCH_LENGTH) {
- test.is(entry.path, someFiles1[index].path, "Both runs return the same files (part 1)");
- } else if (index < 2*BATCH_LENGTH) {
- test.is(entry.path, someFiles2[index - BATCH_LENGTH].path, "Both runs return the same files (part 2)");
- } else if (index == 2 * BATCH_LENGTH) {
- test.info("Attempting to stop asynchronous forEach");
- return iterator.close();
- } else {
- test.fail("Can we stop an asynchronous forEach? " + index);
- }
- return null;
- });
- yield iterator.close();
-
- // Ensuring that we find new files if they appear
- let file = yield OS.File.open(temporary_file_name, { write: true } );
- file.close();
- iterator = new OS.File.DirectoryIterator(currentDir);
- try {
- let files = yield iterator.nextBatch();
- is(files.length, allFiles1.length + 1, "The directory iterator has noticed the new file");
- let exists = yield iterator.exists();
- test.ok(exists, "After nextBatch, iterator detects that the directory exists");
- } finally {
- yield iterator.close();
- }
-
- // Ensuring that opening a non-existing directory fails consistently
- // once iteration starts.
- try {
- iterator = null;
- iterator = new OS.File.DirectoryIterator("/I do not exist");
- let exists = yield iterator.exists();
- test.ok(!exists, "Before any iteration, iterator detects that the directory doesn't exist");
- let exn = null;
- try {
- yield iterator.next();
- } catch (ex if ex instanceof OS.File.Error && ex.becauseNoSuchFile) {
- exn = ex;
- let exists = yield iterator.exists();
- test.ok(!exists, "After one iteration, iterator detects that the directory doesn't exist");
- }
- test.ok(exn, "Iterating through a directory that does not exist has failed with becauseNoSuchFile");
- } finally {
- if (iterator) {
- iterator.close();
- }
- }
- test.ok(!!iterator, "The directory iterator for a non-existing directory was correctly created");
- });
-});
-
-/**
- * Test OS.File.prototype.{exists}
- */
-var test_exists = maketest("exists", function exists(test) {
- return Task.spawn(function() {
- let fileExists = yield OS.File.exists(EXISTING_FILE);
- test.ok(fileExists, "file exists");
- fileExists = yield OS.File.exists(EXISTING_FILE + ".tmp");
- test.ok(!fileExists, "file does not exists");
- });
-});
-
-/**
- * Test changes to OS.Shared.DEBUG flag.
- */
-var test_debug = maketest("debug", function debug(test) {
- return Task.spawn(function() {
- function testSetDebugPref (pref) {
- try {
- Services.prefs.setBoolPref("toolkit.osfile.log", pref);
- } catch (x) {
- test.fail("Setting OS.Shared.DEBUG to " + pref +
- " should not cause error.");
- } finally {
- test.is(OS.Shared.DEBUG, pref, "OS.Shared.DEBUG is set correctly.");
- }
- }
- testSetDebugPref(true);
- let workerDEBUG = yield OS.File.GET_DEBUG();
- test.is(workerDEBUG, true, "Worker's DEBUG is set.");
- testSetDebugPref(false);
- workerDEBUG = yield OS.File.GET_DEBUG();
- test.is(workerDEBUG, false, "Worker's DEBUG is unset.");
- });
-});
-
-/**
- * Test logging in the main thread with set OS.Shared.DEBUG and
- * OS.Shared.TEST flags.
- */
-var test_debug_test = maketest("debug_test", function debug_test(test) {
- return Task.spawn(function () {
- // Create a console listener.
- let consoleListener = {
- observe: function (aMessage) {
- // Ignore unexpected messages.
- if (!(aMessage instanceof Components.interfaces.nsIConsoleMessage)) {
- return;
- }
- if (aMessage.message.indexOf("TEST OS") < 0) {
- return;
- }
- test.ok(true, "DEBUG TEST messages are logged correctly.");
- }
- };
- toggleDebugTest(true, consoleListener);
- // Execution of OS.File.exist method will trigger OS.File.LOG several times.
- let fileExists = yield OS.File.exists(EXISTING_FILE);
- toggleDebugTest(false, consoleListener);
- });
-});
-
-
diff --git a/toolkit/components/osfile/tests/mochi/test_osfile_async.xul b/toolkit/components/osfile/tests/mochi/test_osfile_async.xul
deleted file mode 100644
index 1ef103f02c..0000000000
--- a/toolkit/components/osfile/tests/mochi/test_osfile_async.xul
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
--->
-<window title="Testing async I/O with OS.File"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="test();">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
- <script type="application/javascript"
- src="main_test_osfile_async.js"/>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display:none;"></div>
- <pre id="test"></pre>
- </body>
- <label id="test-result"/>
-</window>
diff --git a/toolkit/components/osfile/tests/mochi/test_osfile_back.xul b/toolkit/components/osfile/tests/mochi/test_osfile_back.xul
deleted file mode 100644
index b6af6303f2..0000000000
--- a/toolkit/components/osfile/tests/mochi/test_osfile_back.xul
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
--->
-<window title="Testing OS.File on a chrome worker thread"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="test();">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
- <script type="application/javascript"
- src="worker_handler.js"/>
- <script type="application/javascript">
- <![CDATA[
-
-let worker;
-
-function test() {
- ok(true, "test_osfile.xul: Starting test");
- if (navigator.platform.indexOf("Win") != -1) {
- ok(true, "test_osfile.xul: Using Windows test suite");
- worker = new ChromeWorker("worker_test_osfile_win.js");
- } else {
- ok(true, "test_osfile.xul: Using Unix test suite");
- worker = new ChromeWorker("worker_test_osfile_unix.js");
- }
- SimpleTest.waitForExplicitFinish();
- ok(true, "test_osfile.xul: Chrome worker created");
- dump("MAIN: go\n");
- worker_handler(worker);
- worker.postMessage(0);
- ok(true, "test_osfile.xul: Test in progress");
-};
-]]>
- </script>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display:none;"></div>
- <pre id="test"></pre>
- </body>
- <label id="test-result"/>
-</window>
diff --git a/toolkit/components/osfile/tests/mochi/test_osfile_comms.xul b/toolkit/components/osfile/tests/mochi/test_osfile_comms.xul
deleted file mode 100644
index 88e474ce2b..0000000000
--- a/toolkit/components/osfile/tests/mochi/test_osfile_comms.xul
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
--->
-<window title="Testing OS.File on a chrome worker thread"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="test();">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
- <script type="application/javascript">
- <![CDATA[
-
-"use strict";
-
-let worker;
-
-let test = function test() {
- SimpleTest.info("test_osfile_comms.xul: Starting test");
- Components.utils.import("resource://gre/modules/ctypes.jsm");
- Components.utils.import("resource://gre/modules/osfile.jsm");
- worker = new ChromeWorker("worker_test_osfile_comms.js");
- SimpleTest.waitForExplicitFinish();
- try {
- worker.onerror = function onerror(error) {
- SimpleTest.ok(false, "received error "+error);
- }
- worker.onmessage = function onmessage(msg) {
- Components.utils.forceShrinkingGC();
- switch (msg.data.kind) {
- case "is":
- SimpleTest.ok(msg.data.outcome, msg.data.description +
- " ("+ msg.data.a + " ==? " + msg.data.b + ")" );
- return;
- case "isnot":
- SimpleTest.ok(msg.data.outcome, msg.data.description +
- " ("+ msg.data.a + " !=? " + msg.data.b + ")" );
- return;
- case "ok":
- SimpleTest.ok(msg.data.condition, msg.data.description);
- return;
- case "info":
- SimpleTest.info(msg.data.description);
- return;
- case "finish":
- SimpleTest.finish();
- return;
- case "value":
- SimpleTest.ok(true, "test_osfile_comms.xul: Received value " + JSON.stringify(msg.data.value));
- let type = eval(msg.data.typename);
- let check = eval(msg.data.check);
- let value = msg.data.value;
- let deserialized = type.fromMsg(value);
- check(deserialized, "Main thread test: ");
- return;
- default:
- SimpleTest.ok(false, "test_osfile_comms.xul: wrong message "+JSON.stringify(msg.data));
- return;
- }
- };
- worker.postMessage(0)
- ok(true, "Worker launched");
- } catch(x) {
- // As we have set |waitForExplicitFinish|, we add this fallback
- // in case of uncaught error, to ensure that the test does not
- // just freeze.
- ok(false, "Caught exception " + x + " at " + x.stack);
- SimpleTest.finish();
- }
-};
-
-]]>
- </script>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display:none;"></div>
- <pre id="test"></pre>
- </body>
- <label id="test-result"/>
-</window>
diff --git a/toolkit/components/osfile/tests/mochi/test_osfile_front.xul b/toolkit/components/osfile/tests/mochi/test_osfile_front.xul
deleted file mode 100644
index 10d3fbd014..0000000000
--- a/toolkit/components/osfile/tests/mochi/test_osfile_front.xul
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
--->
-<window title="Testing OS.File on a chrome worker thread"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="test();">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
- <script type="application/javascript"
- src="worker_handler.js"/>
- <script type="application/javascript">
- <![CDATA[
-
-let worker;
-let main = this;
-
-function test() {
- info("test_osfile_front.xul: Starting test");
-
- // Test the OS.File worker
-
- worker = new ChromeWorker("worker_test_osfile_front.js");
- SimpleTest.waitForExplicitFinish();
- info("test_osfile_front.xul: Chrome worker created");
- dump("MAIN: go\n");
- worker_handler(worker);
- worker.postMessage(0);
- ok(true, "test_osfile_front.xul: Test in progress");
-};
-]]>
- </script>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display:none;"></div>
- <pre id="test"></pre>
- </body>
- <label id="test-result"/>
-</window>
diff --git a/toolkit/components/osfile/tests/mochi/worker_handler.js b/toolkit/components/osfile/tests/mochi/worker_handler.js
deleted file mode 100644
index 6c513e6ba6..0000000000
--- a/toolkit/components/osfile/tests/mochi/worker_handler.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function worker_handler(worker) {
- worker.onerror = function(error) {
- error.preventDefault();
- ok(false, "Worker error " + error.message);
- }
- worker.onmessage = function(msg) {
- ok(true, "MAIN: onmessage " + JSON.stringify(msg.data));
- switch (msg.data.kind) {
- case "is":
- SimpleTest.ok(msg.data.outcome, msg.data.description +
- "( "+ msg.data.a + " ==? " + msg.data.b + ")" );
- return;
- case "isnot":
- SimpleTest.ok(msg.data.outcome, msg.data.description +
- "( "+ msg.data.a + " !=? " + msg.data.b + ")" );
- return;
- case "ok":
- SimpleTest.ok(msg.data.condition, msg.data.description);
- return;
- case "info":
- SimpleTest.info(msg.data.description);
- return;
- case "finish":
- SimpleTest.finish();
- return;
- default:
- SimpleTest.ok(false, "test_osfile.xul: wrong message " + JSON.stringify(msg.data));
- return;
- }
- };
-}
diff --git a/toolkit/components/osfile/tests/mochi/worker_test_osfile_comms.js b/toolkit/components/osfile/tests/mochi/worker_test_osfile_comms.js
deleted file mode 100644
index 5e8bdd9caa..0000000000
--- a/toolkit/components/osfile/tests/mochi/worker_test_osfile_comms.js
+++ /dev/null
@@ -1,145 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-importScripts('worker_test_osfile_shared.js');
-
-// The set of samples for communications test. Declare as a global
-// variable to prevent this from being garbage-collected too early.
-var samples;
-
-self.onmessage = function(msg) {
- info("Initializing");
- self.onmessage = function on_unexpected_message(msg) {
- throw new Error("Unexpected message " + JSON.stringify(msg.data));
- };
- importScripts("resource://gre/modules/osfile.jsm");
- info("Initialization complete");
-
- samples = [
- { typename: "OS.Shared.Type.char.in_ptr",
- valuedescr: "String",
- value: "This is a test",
- type: OS.Shared.Type.char.in_ptr,
- check: function check_string(candidate, prefix) {
- is(candidate, "This is a test", prefix);
- }},
- { typename: "OS.Shared.Type.char.in_ptr",
- valuedescr: "Typed array",
- value: (function() {
- let view = new Uint8Array(15);
- for (let i = 0; i < 15; ++i) {
- view[i] = i;
- }
- return view;
- })(),
- type: OS.Shared.Type.char.in_ptr,
- check: function check_ArrayBuffer(candidate, prefix) {
- for (let i = 0; i < 15; ++i) {
- is(candidate[i], i % 256, prefix + "Checking that the contents of the ArrayBuffer were preserved");
- }
- }},
- { typename: "OS.Shared.Type.char.in_ptr",
- valuedescr: "Pointer",
- value: new OS.Shared.Type.char.in_ptr.implementation(1),
- type: OS.Shared.Type.char.in_ptr,
- check: function check_ptr(candidate, prefix) {
- let address = ctypes.cast(candidate, ctypes.uintptr_t).value.toString();
- is(address, "1", prefix + "Checking that the pointer address was preserved");
- }},
- { typename: "OS.Shared.Type.char.in_ptr",
- valuedescr: "C array",
- value: (function() {
- let buf = new (ctypes.ArrayType(ctypes.uint8_t, 15))();
- for (let i = 0; i < 15; ++i) {
- buf[i] = i % 256;
- }
- return buf;
- })(),
- type: OS.Shared.Type.char.in_ptr,
- check: function check_array(candidate, prefix) {
- let cast = ctypes.cast(candidate, ctypes.uint8_t.ptr);
- for (let i = 0; i < 15; ++i) {
- is(cast.contents, i % 256, prefix + "Checking that the contents of the C array were preserved, index " + i);
- cast = cast.increment();
- }
- }
- },
- { typename: "OS.File.Error",
- valuedescr: "OS Error",
- type: OS.File.Error,
- value: new OS.File.Error("foo", 1),
- check: function check_error(candidate, prefix) {
- ok(candidate instanceof OS.File.Error,
- prefix + "Error is an OS.File.Error");
- ok(candidate.unixErrno == 1 || candidate.winLastError == 1,
- prefix + "Error code is correct");
- try {
- let string = candidate.toString();
- info(prefix + ".toString() works " + string);
- } catch (x) {
- ok(false, prefix + ".toString() fails " + x);
- }
- }
- }
- ];
- samples.forEach(function test(sample) {
- let type = sample.type;
- let value = sample.value;
- let check = sample.check;
- info("Testing handling of type " + sample.typename + " communicating " + sample.valuedescr);
-
- // 1. Test serialization
- let serialized;
- let exn;
- try {
- serialized = type.toMsg(value);
- } catch (ex) {
- exn = ex;
- }
- is(exn, null, "Can I serialize the following value? " + value +
- " aka " + JSON.stringify(value));
- if (exn) {
- return;
- }
-
- if ("data" in serialized) {
- // Unwrap from `Meta`
- serialized = serialized.data;
- }
-
- // 2. Test deserialization
- let deserialized;
- try {
- deserialized = type.fromMsg(serialized);
- } catch (ex) {
- exn = ex;
- }
- is(exn, null, "Can I deserialize the following message? " + serialized
- + " aka " + JSON.stringify(serialized));
- if (exn) {
- return;
- }
-
- // 3. Local test deserialized value
- info("Running test on deserialized value " + deserialized +
- " aka " + JSON.stringify(deserialized));
- check(deserialized, "Local test: ");
-
- // 4. Test sending serialized
- info("Attempting to send message");
- try {
- self.postMessage({kind:"value",
- typename: sample.typename,
- value: serialized,
- check: check.toSource()});
- } catch (ex) {
- exn = ex;
- }
- is(exn, null, "Can I send the following message? " + serialized
- + " aka " + JSON.stringify(serialized));
- });
-
- finish();
- };
diff --git a/toolkit/components/osfile/tests/mochi/worker_test_osfile_front.js b/toolkit/components/osfile/tests/mochi/worker_test_osfile_front.js
deleted file mode 100644
index 29e6135101..0000000000
--- a/toolkit/components/osfile/tests/mochi/worker_test_osfile_front.js
+++ /dev/null
@@ -1,566 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-importScripts('worker_test_osfile_shared.js');
-importScripts("resource://gre/modules/workers/require.js");
-
-var SharedAll = require("resource://gre/modules/osfile/osfile_shared_allthreads.jsm");
-SharedAll.Config.DEBUG = true;
-
-function should_throw(f) {
- try {
- f();
- } catch (x) {
- return x;
- }
- return null;
-}
-
-self.onmessage = function onmessage_start(msg) {
- self.onmessage = function onmessage_ignored(msg) {
- log("ignored message " + JSON.stringify(msg.data));
- };
- try {
- test_init();
- test_open_existing_file();
- test_open_non_existing_file();
- test_flush_open_file();
- test_copy_existing_file();
- test_position();
- test_move_file();
- test_iter_dir();
- test_info();
- test_path();
- test_exists_file();
- test_remove_file();
- } catch (x) {
- log("Catching error: " + x);
- log("Stack: " + x.stack);
- log("Source: " + x.toSource());
- ok(false, x.toString() + "\n" + x.stack);
- }
- finish();
-};
-
-function test_init() {
- info("Starting test_init");
- importScripts("resource://gre/modules/osfile.jsm");
-}
-
-/**
- * Test that we can open an existing file.
- */
-function test_open_existing_file()
-{
- info("Starting test_open_existing");
- let file = OS.File.open("chrome/toolkit/components/osfile/tests/mochi/worker_test_osfile_unix.js");
- file.close();
-}
-
-/**
- * Test that opening a file that does not exist fails with the right error.
- */
-function test_open_non_existing_file()
-{
- info("Starting test_open_non_existing");
- let exn;
- try {
- let file = OS.File.open("/I do not exist");
- } catch (x) {
- exn = x;
- info("test_open_non_existing_file: Exception detail " + exn);
- }
- ok(!!exn, "test_open_non_existing_file: Exception was raised ");
- ok(exn instanceof OS.File.Error, "test_open_non_existing_file: Exception was a OS.File.Error");
- ok(exn.becauseNoSuchFile, "test_open_non_existing_file: Exception confirms that the file does not exist");
-}
-
-/**
- * Test that to ensure that |foo.flush()| does not
- * cause an error, where |foo| is an open file.
- */
-function test_flush_open_file()
-{
- info("Starting test_flush_open_file");
- let tmp = "test_flush.tmp";
- let file = OS.File.open(tmp, {create: true, write: true});
- file.flush();
- file.close();
- OS.File.remove(tmp);
-}
-
-/**
- * Utility function for comparing two files (or a prefix of two files).
- *
- * This function returns nothing but fails of both files (or prefixes)
- * are not identical.
- *
- * @param {string} test The name of the test (used for logging).
- * @param {string} sourcePath The name of the first file.
- * @param {string} destPath The name of the second file.
- * @param {number=} prefix If specified, only compare the |prefix|
- * first bytes of |sourcePath| and |destPath|.
- */
-function compare_files(test, sourcePath, destPath, prefix)
-{
- info(test + ": Comparing " + sourcePath + " and " + destPath);
- let source = OS.File.open(sourcePath);
- let dest = OS.File.open(destPath);
- info("Files are open");
- let sourceResult, destResult;
- try {
- if (prefix != undefined) {
- sourceResult = source.read(prefix);
- destResult = dest.read(prefix);
- } else {
- sourceResult = source.read();
- destResult = dest.read();
- }
- is(sourceResult.length, destResult.length, test + ": Both files have the same size");
- for (let i = 0; i < sourceResult.length; ++i) {
- if (sourceResult[i] != destResult[i]) {
- is(sourceResult[i] != destResult[i], test + ": Comparing char " + i);
- break;
- }
- }
- } finally {
- source.close();
- dest.close();
- }
- info(test + ": Comparison complete");
-}
-
-/**
- * Test that copying a file using |copy| works.
- */
-function test_copy_existing_file()
-{
- let src_file_name =
- OS.Path.join("chrome", "toolkit", "components", "osfile", "tests", "mochi",
- "worker_test_osfile_front.js");
- let tmp_file_name = "test_osfile_front.tmp";
- info("Starting test_copy_existing");
- OS.File.copy(src_file_name, tmp_file_name);
-
- info("test_copy_existing: Copy complete");
- compare_files("test_copy_existing", src_file_name, tmp_file_name);
-
- // Create a bogus file with arbitrary content, then attempt to overwrite
- // it with |copy|.
- let dest = OS.File.open(tmp_file_name, {trunc: true});
- let buf = new Uint8Array(50);
- dest.write(buf);
- dest.close();
-
- OS.File.copy(src_file_name, tmp_file_name);
-
- compare_files("test_copy_existing 2", src_file_name, tmp_file_name);
-
- // Attempt to overwrite with noOverwrite
- let exn;
- try {
- OS.File.copy(src_file_name, tmp_file_name, {noOverwrite: true});
- } catch(x) {
- exn = x;
- }
- ok(!!exn, "test_copy_existing: noOverwrite prevents overwriting existing files");
-
- info("test_copy_existing: Cleaning up");
- OS.File.remove(tmp_file_name);
-}
-
-/**
- * Test that moving a file works.
- */
-function test_move_file()
-{
- info("test_move_file: Starting");
- // 1. Copy file into a temporary file
- let src_file_name =
- OS.Path.join("chrome", "toolkit", "components", "osfile", "tests", "mochi",
- "worker_test_osfile_front.js");
- let tmp_file_name = "test_osfile_front.tmp";
- let tmp2_file_name = "test_osfile_front.tmp2";
- OS.File.copy(src_file_name, tmp_file_name);
-
- info("test_move_file: Copy complete");
-
- // 2. Move
- OS.File.move(tmp_file_name, tmp2_file_name);
-
- info("test_move_file: Move complete");
-
- // 3. Check that destination exists
- compare_files("test_move_file", src_file_name, tmp2_file_name);
-
- // 4. Check that original file does not exist anymore
- let exn;
- try {
- OS.File.open(tmp_file_name);
- } catch (x) {
- exn = x;
- }
- ok(!!exn, "test_move_file: Original file has been removed");
-
- info("test_move_file: Cleaning up");
- OS.File.remove(tmp2_file_name);
-}
-
-function test_iter_dir()
-{
- info("test_iter_dir: Starting");
-
- // Create a file, to be sure that it exists
- let tmp_file_name = "test_osfile_front.tmp";
- let tmp_file = OS.File.open(tmp_file_name, {write: true, trunc:true});
- tmp_file.close();
-
- let parent = OS.File.getCurrentDirectory();
- info("test_iter_dir: directory " + parent);
- let iterator = new OS.File.DirectoryIterator(parent);
- info("test_iter_dir: iterator created");
- let encountered_tmp_file = false;
- for (let entry in iterator) {
- // Checking that |name| can be decoded properly
- info("test_iter_dir: encountering entry " + entry.name);
-
- if (entry.name == tmp_file_name) {
- encountered_tmp_file = true;
- isnot(entry.isDir, "test_iter_dir: The temporary file is not a directory");
- isnot(entry.isSymLink, "test_iter_dir: The temporary file is not a link");
- }
-
- let file;
- let success = true;
- try {
- file = OS.File.open(entry.path);
- } catch (x) {
- if (x.becauseNoSuchFile) {
- success = false;
- }
- }
- if (file) {
- file.close();
- }
- ok(success, "test_iter_dir: Entry " + entry.path + " exists");
-
- if (OS.Win) {
- // We assume that the files are at least as recent as 2009.
- // Since this test was written in 2011 and some of our packaging
- // sets dates arbitrarily to 2010, this should be safe.
- let year = new Date().getFullYear();
- let creation = entry.winCreationDate;
- ok(creation, "test_iter_dir: Windows creation date exists: " + creation);
- ok(creation.getFullYear() >= 2009 && creation.getFullYear() <= year, "test_iter_dir: consistent creation date");
-
- let lastWrite = entry.winLastWriteDate;
- ok(lastWrite, "test_iter_dir: Windows lastWrite date exists: " + lastWrite);
- ok(lastWrite.getFullYear() >= 2009 && lastWrite.getFullYear() <= year, "test_iter_dir: consistent lastWrite date");
-
- let lastAccess = entry.winLastAccessDate;
- ok(lastAccess, "test_iter_dir: Windows lastAccess date exists: " + lastAccess);
- ok(lastAccess.getFullYear() >= 2009 && lastAccess.getFullYear() <= year, "test_iter_dir: consistent lastAccess date");
- }
-
- }
- ok(encountered_tmp_file, "test_iter_dir: We have found the temporary file");
-
- info("test_iter_dir: Cleaning up");
- iterator.close();
-
- // Testing nextBatch()
- iterator = new OS.File.DirectoryIterator(parent);
- let allentries = [];
- for (let x in iterator) {
- allentries.push(x);
- }
- iterator.close();
-
- ok(allentries.length >= 14, "test_iter_dir: Meta-check: the test directory should contain at least 14 items");
-
- iterator = new OS.File.DirectoryIterator(parent);
- let firstten = iterator.nextBatch(10);
- is(firstten.length, 10, "test_iter_dir: nextBatch(10) returns 10 items");
- for (let i = 0; i < firstten.length; ++i) {
- is(allentries[i].path, firstten[i].path, "test_iter_dir: Checking that batch returns the correct entries");
- }
- let nextthree = iterator.nextBatch(3);
- is(nextthree.length, 3, "test_iter_dir: nextBatch(3) returns 3 items");
- for (let i = 0; i < nextthree.length; ++i) {
- is(allentries[i + firstten.length].path, nextthree[i].path, "test_iter_dir: Checking that batch 2 returns the correct entries");
- }
- let everythingelse = iterator.nextBatch();
- ok(everythingelse.length >= 1, "test_iter_dir: nextBatch() returns at least one item");
- for (let i = 0; i < everythingelse.length; ++i) {
- is(allentries[i + firstten.length + nextthree.length].path, everythingelse[i].path, "test_iter_dir: Checking that batch 3 returns the correct entries");
- }
- is(iterator.nextBatch().length, 0, "test_iter_dir: Once there is nothing left, nextBatch returns an empty array");
- iterator.close();
-
- iterator = new OS.File.DirectoryIterator(parent);
- iterator.close();
- is(iterator.nextBatch().length, 0, "test_iter_dir: nextBatch on closed iterator returns an empty array");
-
- iterator = new OS.File.DirectoryIterator(parent);
- let allentries2 = iterator.nextBatch();
- is(allentries.length, allentries2.length, "test_iter_dir: Checking that getBatch(null) returns the right number of entries");
- for (let i = 0; i < allentries.length; ++i) {
- is(allentries[i].path, allentries2[i].path, "test_iter_dir: Checking that getBatch(null) returns everything in the right order");
- }
- iterator.close();
-
- // Test forEach
- iterator = new OS.File.DirectoryIterator(parent);
- let index = 0;
- iterator.forEach(
- function cb(entry, aIndex, aIterator) {
- is(index, aIndex, "test_iter_dir: Checking that forEach index is correct");
- ok(iterator == aIterator, "test_iter_dir: Checking that right iterator is passed");
- if (index < 10) {
- is(allentries[index].path, entry.path, "test_iter_dir: Checking that forEach entry is correct");
- } else if (index == 10) {
- iterator.close();
- } else {
- ok(false, "test_iter_dir: Checking that forEach can be stopped early");
- }
- ++index;
- });
- iterator.close();
-
- //test for prototype |OS.File.DirectoryIterator.unixAsFile|
- if ("unixAsFile" in OS.File.DirectoryIterator.prototype) {
- info("testing property unixAsFile");
- let path = OS.Path.join("chrome", "toolkit", "components", "osfile", "tests", "mochi");
- iterator = new OS.File.DirectoryIterator(path);
-
- let dir_file = iterator.unixAsFile();// return |File|
- let stat0 = dir_file.stat();
- let stat1 = OS.File.stat(path);
-
- let unix_info_to_string = function unix_info_to_string(info) {
- return "| " + info.unixMode + " | " + info.unixOwner + " | " + info.unixGroup + " | " + info.creationDate + " | " + info.lastModificationDate + " | " + info.lastAccessDate + " | " + info.size + " |";
- };
-
- let s0_string = unix_info_to_string(stat0);
- let s1_string = unix_info_to_string(stat1);
-
- ok(stat0.isDir, "unixAsFile returned a directory");
- is(s0_string, s1_string, "unixAsFile returned the correct file");
- dir_file.close();
- iterator.close();
- }
- info("test_iter_dir: Complete");
-}
-
-function test_position() {
- info("test_position: Starting");
-
- ok("POS_START" in OS.File, "test_position: POS_START exists");
- ok("POS_CURRENT" in OS.File, "test_position: POS_CURRENT exists");
- ok("POS_END" in OS.File, "test_position: POS_END exists");
-
- let ARBITRARY_POSITION = 321;
- let src_file_name =
- OS.Path.join("chrome", "toolkit", "components", "osfile", "tests", "mochi",
- "worker_test_osfile_front.js");
-
- let file = OS.File.open(src_file_name);
- is(file.getPosition(), 0, "test_position: Initial position is 0");
-
- let size = 0 + file.stat().size; // Hack: We can remove this 0 + once 776259 has landed
-
- file.setPosition(ARBITRARY_POSITION, OS.File.POS_START);
- is(file.getPosition(), ARBITRARY_POSITION, "test_position: Setting position from start");
-
- file.setPosition(0, OS.File.POS_START);
- is(file.getPosition(), 0, "test_position: Setting position from start back to 0");
-
- file.setPosition(ARBITRARY_POSITION);
- is(file.getPosition(), ARBITRARY_POSITION, "test_position: Setting position without argument");
-
- file.setPosition(-ARBITRARY_POSITION, OS.File.POS_END);
- is(file.getPosition(), size - ARBITRARY_POSITION, "test_position: Setting position from end");
-
- file.setPosition(ARBITRARY_POSITION, OS.File.POS_CURRENT);
- is(file.getPosition(), size, "test_position: Setting position from current");
-
- file.close();
- info("test_position: Complete");
-}
-
-function test_info() {
- info("test_info: Starting");
-
- let filename = "test_info.tmp";
- let size = 261;// An arbitrary file length
- let start = new Date();
-
- // Cleanup any leftover from previous tests
- try {
- OS.File.remove(filename);
- info("test_info: Cleaned up previous garbage");
- } catch (x) {
- if (!x.becauseNoSuchFile) {
- throw x;
- }
- info("test_info: No previous garbage");
- }
-
- let file = OS.File.open(filename, {trunc: true});
- let buf = new ArrayBuffer(size);
- file._write(buf, size);
- file.close();
-
- // Test OS.File.stat on new file
- let stat = OS.File.stat(filename);
- ok(!!stat, "test_info: info acquired");
- ok(!stat.isDir, "test_info: file is not a directory");
- is(stat.isSymLink, false, "test_info: file is not a link");
- is(stat.size.toString(), size, "test_info: correct size");
-
- let stop = new Date();
-
- // We round down/up by 1s as file system precision is lower than
- // Date precision (no clear specifications about that, but it seems
- // that this can be a little over 1 second under ext3 and 2 seconds
- // under FAT).
- let SLOPPY_FILE_SYSTEM_ADJUSTMENT = 3000;
- let startMs = start.getTime() - SLOPPY_FILE_SYSTEM_ADJUSTMENT;
- let stopMs = stop.getTime() + SLOPPY_FILE_SYSTEM_ADJUSTMENT;
- info("Testing stat with bounds [ " + startMs + ", " + stopMs +" ]");
-
- (function() {
- let birth;
- if ("winBirthDate" in stat) {
- birth = stat.winBirthDate;
- } else if ("macBirthDate" in stat) {
- birth = stat.macBirthDate;
- } else {
- ok(true, "Skipping birthdate test");
- return;
- }
- ok(birth.getTime() <= stopMs,
- "test_info: platformBirthDate is consistent");
- // Note: Previous versions of this test checked whether the file
- // has been created after the start of the test. Unfortunately,
- // this sometimes failed under Windows, in specific circumstances:
- // if the file has been removed at the start of the test and
- // recreated immediately, the Windows file system detects this and
- // decides that the file was actually truncated rather than
- // recreated, hence that it should keep its previous creation
- // date. Debugging hilarity ensues.
- });
-
- let change = stat.lastModificationDate;
- info("Testing lastModificationDate: " + change);
- ok(change.getTime() >= startMs && change.getTime() <= stopMs,
- "test_info: lastModificationDate is consistent");
-
- // Test OS.File.prototype.stat on new file
- file = OS.File.open(filename);
- try {
- stat = file.stat();
- } finally {
- file.close();
- }
-
- ok(!!stat, "test_info: info acquired 2");
- ok(!stat.isDir, "test_info: file is not a directory 2");
- ok(!stat.isSymLink, "test_info: file is not a link 2");
- is(stat.size.toString(), size, "test_info: correct size 2");
-
- stop = new Date();
-
- // Round up/down as above
- startMs = start.getTime() - SLOPPY_FILE_SYSTEM_ADJUSTMENT;
- stopMs = stop.getTime() + SLOPPY_FILE_SYSTEM_ADJUSTMENT;
- info("Testing stat 2 with bounds [ " + startMs + ", " + stopMs +" ]");
-
- let access = stat.lastAccessDate;
- info("Testing lastAccessDate: " + access);
- ok(access.getTime() >= startMs && access.getTime() <= stopMs,
- "test_info: lastAccessDate is consistent");
-
- change = stat.lastModificationDate;
- info("Testing lastModificationDate 2: " + change);
- ok(change.getTime() >= startMs && change.getTime() <= stopMs,
- "test_info: lastModificationDate 2 is consistent");
-
- // Test OS.File.stat on directory
- stat = OS.File.stat(OS.File.getCurrentDirectory());
- ok(!!stat, "test_info: info on directory acquired");
- ok(stat.isDir, "test_info: directory is a directory");
-
- info("test_info: Complete");
-}
-
-// Note that most of the features of path are tested in
-// worker_test_osfile_{unix, win}.js
-function test_path()
-{
- info("test_path: starting");
- let abcd = OS.Path.join("a", "b", "c", "d");
- is(OS.Path.basename(abcd), "d", "basename of a/b/c/d");
-
- let abc = OS.Path.join("a", "b", "c");
- is(OS.Path.dirname(abcd), abc, "dirname of a/b/c/d");
-
- let abdotsc = OS.Path.join("a", "b", "..", "c");
- is(OS.Path.normalize(abdotsc), OS.Path.join("a", "c"), "normalize a/b/../c");
-
- let adotsdotsdots = OS.Path.join("a", "..", "..", "..");
- is(OS.Path.normalize(adotsdotsdots), OS.Path.join("..", ".."), "normalize a/../../..");
-
- info("test_path: Complete");
-}
-
-/**
- * Test the file |exists| method.
- */
-function test_exists_file()
-{
- let file_name = OS.Path.join("chrome", "toolkit", "components" ,"osfile",
- "tests", "mochi", "test_osfile_front.xul");
- info("test_exists_file: starting");
- ok(OS.File.exists(file_name), "test_exists_file: file exists (OS.File.exists)");
- ok(!OS.File.exists(file_name + ".tmp"), "test_exists_file: file does not exists (OS.File.exists)");
-
- let dir_name = OS.Path.join("chrome", "toolkit", "components" ,"osfile",
- "tests", "mochi");
- ok(OS.File.exists(dir_name), "test_exists_file: directory exists");
- ok(!OS.File.exists(dir_name) + ".tmp", "test_exists_file: directory does not exist");
-
- info("test_exists_file: complete");
-}
-
-/**
- * Test the file |remove| method.
- */
-function test_remove_file()
-{
- let absent_file_name = "test_osfile_front_absent.tmp";
-
- // Check that removing absent files is handled correctly
- let exn = should_throw(function() {
- OS.File.remove(absent_file_name, {ignoreAbsent: false});
- });
- ok(!!exn, "test_remove_file: throws if there is no such file");
-
- exn = should_throw(function() {
- OS.File.remove(absent_file_name, {ignoreAbsent: true});
- OS.File.remove(absent_file_name);
- });
- ok(!exn, "test_remove_file: ignoreAbsent works");
-
- if (OS.Win) {
- let file_name = "test_osfile_front_file_to_remove.tmp";
- let file = OS.File.open(file_name, {write: true});
- file.close();
- ok(OS.File.exists(file_name), "test_remove_file: test file exists");
- OS.Win.File.SetFileAttributes(file_name,
- OS.Constants.Win.FILE_ATTRIBUTE_READONLY);
- OS.File.remove(file_name);
- ok(!OS.File.exists(file_name),
- "test_remove_file: test file has been removed");
- }
-}
diff --git a/toolkit/components/osfile/tests/mochi/worker_test_osfile_shared.js b/toolkit/components/osfile/tests/mochi/worker_test_osfile_shared.js
deleted file mode 100644
index da82d4b0ab..0000000000
--- a/toolkit/components/osfile/tests/mochi/worker_test_osfile_shared.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function log(text) {
- dump("WORKER " + text + "\n");
-}
-
-function send(message) {
- self.postMessage(message);
-}
-
-function finish() {
- send({kind: "finish"});
-}
-
-function ok(condition, description) {
- send({kind: "ok", condition: !!condition, description: "" + description});
-}
-
-function is(a, b, description) {
- let outcome = a == b; // Need to decide outcome here, as not everything can be serialized
- send({kind: "is", outcome: outcome, description: "" + description, a: "" + a, b: "" + b});
-}
-
-function isnot(a, b, description) {
- let outcome = a != b; // Need to decide outcome here, as not everything can be serialized
- send({kind: "isnot", outcome: outcome, description: "" + description, a: "" + a, b: "" + b});
-}
-
-function info(description) {
- send({kind: "info", description: "" + description});
-}
diff --git a/toolkit/components/osfile/tests/mochi/worker_test_osfile_unix.js b/toolkit/components/osfile/tests/mochi/worker_test_osfile_unix.js
deleted file mode 100644
index 9fe2d0b4e6..0000000000
--- a/toolkit/components/osfile/tests/mochi/worker_test_osfile_unix.js
+++ /dev/null
@@ -1,201 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-importScripts('worker_test_osfile_shared.js');
-
-self.onmessage = function(msg) {
- log("received message "+JSON.stringify(msg.data));
- self.onmessage = function(msg) {
- log("ignored message "+JSON.stringify(msg.data));
- };
- test_init();
- test_getcwd();
- test_open_close();
- test_create_file();
- test_access();
- test_read_write();
- test_passing_undefined();
- finish();
-};
-
-function test_init() {
- info("Starting test_init");
- importScripts("resource://gre/modules/osfile.jsm");
-}
-
-function test_open_close() {
- info("Starting test_open_close");
- is(typeof OS.Unix.File.open, "function", "OS.Unix.File.open is a function");
- let file = OS.Unix.File.open("chrome/toolkit/components/osfile/tests/mochi/worker_test_osfile_unix.js", OS.Constants.libc.O_RDONLY, 0);
- isnot(file, -1, "test_open_close: opening succeeded");
- info("Close: "+OS.Unix.File.close.toSource());
- let result = OS.Unix.File.close(file);
- is(result, 0, "test_open_close: close succeeded");
-
- file = OS.Unix.File.open("/i do not exist", OS.Constants.libc.O_RDONLY, 0);
- is(file, -1, "test_open_close: opening of non-existing file failed");
- is(ctypes.errno, OS.Constants.libc.ENOENT, "test_open_close: error is ENOENT");
-}
-
-function test_create_file()
-{
- info("Starting test_create_file");
- let file = OS.Unix.File.open("test.tmp", OS.Constants.libc.O_RDWR
- | OS.Constants.libc.O_CREAT
- | OS.Constants.libc.O_TRUNC,
- OS.Constants.libc.S_IRWXU);
- isnot(file, -1, "test_create_file: file created");
- OS.Unix.File.close(file);
-}
-
-function test_access()
-{
- info("Starting test_access");
- let file = OS.Unix.File.open("test1.tmp", OS.Constants.libc.O_RDWR
- | OS.Constants.libc.O_CREAT
- | OS.Constants.libc.O_TRUNC,
- OS.Constants.libc.S_IRWXU);
- let result = OS.Unix.File.access("test1.tmp", OS.Constants.libc.R_OK | OS.Constants.libc.W_OK | OS.Constants.libc.X_OK | OS.Constants.libc.F_OK);
- is(result, 0, "first call to access() succeeded");
- OS.Unix.File.close(file);
-
- file = OS.Unix.File.open("test1.tmp", OS.Constants.libc.O_WRONLY
- | OS.Constants.libc.O_CREAT
- | OS.Constants.libc.O_TRUNC,
- OS.Constants.libc.S_IWUSR);
-
- info("test_access: preparing second call to access()");
- result = OS.Unix.File.access("test2.tmp", OS.Constants.libc.R_OK
- | OS.Constants.libc.W_OK
- | OS.Constants.libc.X_OK
- | OS.Constants.libc.F_OK);
- is(result, -1, "test_access: second call to access() failed as expected");
- is(ctypes.errno, OS.Constants.libc.ENOENT, "This is the correct error");
- OS.Unix.File.close(file);
-}
-
-function test_getcwd()
-{
- let array = new (ctypes.ArrayType(ctypes.char, 32768))();
- let path = OS.Unix.File.getcwd(array, array.length);
- if (ctypes.char.ptr(path).isNull()) {
- ok(false, "test_get_cwd: getcwd returned null, errno: " + ctypes.errno);
- }
- let path2;
- if (OS.Unix.File.get_current_dir_name) {
- path2 = OS.Unix.File.get_current_dir_name();
- } else {
- path2 = OS.Unix.File.getwd_auto(null);
- }
- if (ctypes.char.ptr(path2).isNull()) {
- ok(false, "test_get_cwd: getwd_auto/get_current_dir_name returned null, errno: " + ctypes.errno);
- }
- is(path.readString(), path2.readString(), "test_get_cwd: getcwd and getwd return the same path");
-}
-
-function test_read_write()
-{
- let output_name = "osfile_copy.tmp";
- // Copy file
- let input = OS.Unix.File.open(
- "chrome/toolkit/components/osfile/tests/mochi/worker_test_osfile_unix.js",
- OS.Constants.libc.O_RDONLY, 0);
- isnot(input, -1, "test_read_write: input file opened");
- let output = OS.Unix.File.open("osfile_copy.tmp", OS.Constants.libc.O_RDWR
- | OS.Constants.libc.O_CREAT
- | OS.Constants.libc.O_TRUNC,
- OS.Constants.libc.S_IRWXU);
- isnot(output, -1, "test_read_write: output file opened");
-
- let array = new (ctypes.ArrayType(ctypes.char, 4096))();
- let bytes = -1;
- let total = 0;
- while (true) {
- bytes = OS.Unix.File.read(input, array, 4096);
- ok(bytes != undefined, "test_read_write: bytes is defined");
- isnot(bytes, -1, "test_read_write: no read error");
- let write_from = 0;
- if (bytes == 0) {
- break;
- }
- while (bytes > 0) {
- let ptr = array.addressOfElement(write_from);
- // Note: |write| launches an exception in case of error
- let written = OS.Unix.File.write(output, array, bytes);
- isnot(written, -1, "test_read_write: no write error");
- write_from += written;
- bytes -= written;
- }
- total += write_from;
- }
- info("test_read_write: copy complete " + total);
-
- // Compare files
- let result;
- info("SEEK_SET: " + OS.Constants.libc.SEEK_SET);
- info("Input: " + input + "(" + input.toSource() + ")");
- info("Output: " + output + "(" + output.toSource() + ")");
- result = OS.Unix.File.lseek(input, 0, OS.Constants.libc.SEEK_SET);
- info("Result of lseek: " + result);
- isnot(result, -1, "test_read_write: input seek succeeded " + ctypes.errno);
- result = OS.Unix.File.lseek(output, 0, OS.Constants.libc.SEEK_SET);
- isnot(result, -1, "test_read_write: output seek succeeded " + ctypes.errno);
-
- let array2 = new (ctypes.ArrayType(ctypes.char, 4096))();
- let bytes2 = -1;
- let pos = 0;
- while (true) {
- bytes = OS.Unix.File.read(input, array, 4096);
- isnot(bytes, -1, "test_read_write: input read succeeded");
- bytes2 = OS.Unix.File.read(output, array2, 4096);
- isnot(bytes, -1, "test_read_write: output read succeeded");
- is(bytes > 0, bytes2 > 0, "Both files contain data or neither does "+bytes+", "+bytes2);
- if (bytes == 0) {
- break;
- }
- if (bytes != bytes2) {
- // This would be surprising, but theoretically possible with a
- // remote file system, I believe.
- bytes = Math.min(bytes, bytes2);
- pos += bytes;
- result = OS.Unix.File.lseek(input, pos, OS.Constants.libc.SEEK_SET);
- isnot(result, -1, "test_read_write: input seek succeeded");
- result = OS.Unix.File.lseek(output, pos, OS.Constants.libc.SEEK_SET);
- isnot(result, -1, "test_read_write: output seek succeeded");
- } else {
- pos += bytes;
- }
- for (let i = 0; i < bytes; ++i) {
- if (array[i] != array2[i]) {
- ok(false, "Files do not match at position " + i
- + " ("+array[i] + "/"+array2[i] + ")");
- }
- }
- }
- info("test_read_write test complete");
- result = OS.Unix.File.close(input);
- isnot(result, -1, "test_read_write: input close succeeded");
- result = OS.Unix.File.close(output);
- isnot(result, -1, "test_read_write: output close succeeded");
- result = OS.Unix.File.unlink(output_name);
- isnot(result, -1, "test_read_write: input remove succeeded");
- info("test_read_write cleanup complete");
-}
-
-function test_passing_undefined()
-{
- info("Testing that an exception gets thrown when an FFI function is passed undefined");
- let exceptionRaised = false;
-
- try {
- let file = OS.Unix.File.open(undefined, OS.Constants.libc.O_RDWR
- | OS.Constants.libc.O_CREAT
- | OS.Constants.libc.O_TRUNC,
- OS.Constants.libc.S_IRWXU);
- } catch(e if e instanceof TypeError && e.message.indexOf("open") > -1) {
- exceptionRaised = true;
- }
-
- ok(exceptionRaised, "test_passing_undefined: exception gets thrown")
-}
-
diff --git a/toolkit/components/osfile/tests/mochi/worker_test_osfile_win.js b/toolkit/components/osfile/tests/mochi/worker_test_osfile_win.js
deleted file mode 100644
index f41fdecfea..0000000000
--- a/toolkit/components/osfile/tests/mochi/worker_test_osfile_win.js
+++ /dev/null
@@ -1,211 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-importScripts('worker_test_osfile_shared.js');
-
-self.onmessage = function(msg) {
- self.onmessage = function(msg) {
- log("ignored message "+JSON.stringify(msg.data));
- };
-
- test_init();
- test_GetCurrentDirectory();
- test_OpenClose();
- test_CreateFile();
- test_ReadWrite();
- test_passing_undefined();
- finish();
-};
-
-function test_init() {
- info("Starting test_init");
- importScripts("resource://gre/modules/osfile.jsm");
-}
-
-function test_OpenClose() {
- info("Starting test_OpenClose");
- is(typeof OS.Win.File.CreateFile, "function", "OS.Win.File.CreateFile is a function");
- is(OS.Win.File.CloseHandle(OS.Constants.Win.INVALID_HANDLE_VALUE), true, "CloseHandle returns true given the invalid handle");
- is(OS.Win.File.FindClose(OS.Constants.Win.INVALID_HANDLE_VALUE), true, "FindClose returns true given the invalid handle");
- isnot(OS.Constants.Win.GENERIC_READ, undefined, "GENERIC_READ exists");
- isnot(OS.Constants.Win.FILE_SHARE_READ, undefined, "FILE_SHARE_READ exists");
- isnot(OS.Constants.Win.FILE_ATTRIBUTE_NORMAL, undefined, "FILE_ATTRIBUTE_NORMAL exists");
- let file = OS.Win.File.CreateFile(
- "chrome\\toolkit\\components\\osfile\\tests\\mochi\\worker_test_osfile_win.js",
- OS.Constants.Win.GENERIC_READ,
- 0,
- null,
- OS.Constants.Win.OPEN_EXISTING,
- 0,
- null);
- info("test_OpenClose: Passed open");
- isnot(file, OS.Constants.Win.INVALID_HANDLE_VALUE, "test_OpenClose: file opened");
- let result = OS.Win.File.CloseHandle(file);
- isnot(result, 0, "test_OpenClose: close succeeded");
-
- file = OS.Win.File.CreateFile(
- "\\I do not exist",
- OS.Constants.Win.GENERIC_READ,
- OS.Constants.Win.FILE_SHARE_READ,
- null,
- OS.Constants.Win.OPEN_EXISTING,
- OS.Constants.Win.FILE_ATTRIBUTE_NORMAL,
- null);
- is(file, OS.Constants.Win.INVALID_HANDLE_VALUE, "test_OpenClose: cannot open non-existing file");
- is(ctypes.winLastError, OS.Constants.Win.ERROR_FILE_NOT_FOUND, "test_OpenClose: error is ERROR_FILE_NOT_FOUND");
-}
-
-function test_CreateFile()
-{
- info("Starting test_CreateFile");
- let file = OS.Win.File.CreateFile(
- "test.tmp",
- OS.Constants.Win.GENERIC_READ | OS.Constants.Win.GENERIC_WRITE,
- OS.Constants.Win.FILE_SHARE_READ | OS.Constants.FILE_SHARE_WRITE,
- null,
- OS.Constants.Win.CREATE_ALWAYS,
- OS.Constants.Win.FILE_ATTRIBUTE_NORMAL,
- null);
- isnot(file, OS.Constants.Win.INVALID_HANDLE_VALUE, "test_CreateFile: opening succeeded");
- let result = OS.Win.File.CloseHandle(file);
- isnot(result, 0, "test_CreateFile: close succeeded");
-}
-
-function test_GetCurrentDirectory()
-{
- let array = new (ctypes.ArrayType(ctypes.char16_t, 4096))();
- let result = OS.Win.File.GetCurrentDirectory(4096, array);
- ok(result < array.length, "test_GetCurrentDirectory: length sufficient");
- ok(result > 0, "test_GetCurrentDirectory: length != 0");
-}
-
-function test_ReadWrite()
-{
- info("Starting test_ReadWrite");
- let output_name = "osfile_copy.tmp";
- // Copy file
- let input = OS.Win.File.CreateFile(
- "chrome\\toolkit\\components\\osfile\\tests\\mochi\\worker_test_osfile_win.js",
- OS.Constants.Win.GENERIC_READ,
- 0,
- null,
- OS.Constants.Win.OPEN_EXISTING,
- 0,
- null);
- isnot(input, OS.Constants.Win.INVALID_HANDLE_VALUE, "test_ReadWrite: input file opened");
- let output = OS.Win.File.CreateFile(
- "osfile_copy.tmp",
- OS.Constants.Win.GENERIC_READ | OS.Constants.Win.GENERIC_WRITE,
- 0,
- null,
- OS.Constants.Win.CREATE_ALWAYS,
- OS.Constants.Win.FILE_ATTRIBUTE_NORMAL,
- null);
- isnot(output, OS.Constants.Win.INVALID_HANDLE_VALUE, "test_ReadWrite: output file opened");
- let array = new (ctypes.ArrayType(ctypes.char, 4096))();
- let bytes_read = new ctypes.uint32_t(0);
- let bytes_read_ptr = bytes_read.address();
- log("We have a pointer for bytes read: "+bytes_read_ptr);
- let bytes_written = new ctypes.uint32_t(0);
- let bytes_written_ptr = bytes_written.address();
- log("We have a pointer for bytes written: "+bytes_written_ptr);
- log("test_ReadWrite: buffer and pointers ready");
- let result;
- while (true) {
- log("test_ReadWrite: reading");
- result = OS.Win.File.ReadFile(input, array, 4096, bytes_read_ptr, null);
- isnot (result, 0, "test_ReadWrite: read success");
- let write_from = 0;
- let bytes_left = bytes_read;
- log("test_ReadWrite: read chunk complete " + bytes_left.value);
- if (bytes_left.value == 0) {
- break;
- }
- while (bytes_left.value > 0) {
- log("test_ReadWrite: writing "+bytes_left.value);
- let ptr = array.addressOfElement(write_from);
- // Note: |WriteFile| launches an exception in case of error
- result = OS.Win.File.WriteFile(output, array, bytes_left, bytes_written_ptr, null);
- isnot (result, 0, "test_ReadWrite: write success");
- write_from += bytes_written;
- bytes_left -= bytes_written;
- }
- }
- info("test_ReadWrite: copy complete");
-
- // Compare files
- result = OS.Win.File.SetFilePointer(input, 0, null, OS.Constants.Win.FILE_BEGIN);
- isnot (result, OS.Constants.Win.INVALID_SET_FILE_POINTER, "test_ReadWrite: input reset");
-
- result = OS.Win.File.SetFilePointer(output, 0, null, OS.Constants.Win.FILE_BEGIN);
- isnot (result, OS.Constants.Win.INVALID_SET_FILE_POINTER, "test_ReadWrite: output reset");
-
- let array2 = new (ctypes.ArrayType(ctypes.char, 4096))();
- let bytes_read2 = new ctypes.uint32_t(0);
- let bytes_read2_ptr = bytes_read2.address();
- let pos = 0;
- while (true) {
- result = OS.Win.File.ReadFile(input, array, 4096, bytes_read_ptr, null);
- isnot(result, 0, "test_ReadWrite: input read succeeded");
-
- result = OS.Win.File.ReadFile(output, array2, 4096, bytes_read2_ptr, null);
- isnot(result, 0, "test_ReadWrite: output read succeeded");
-
- is(bytes_read.value > 0, bytes_read2.value > 0,
- "Both files contain data or neither does " + bytes_read.value + ", " + bytes_read2.value);
- if (bytes_read.value == 0) {
- break;
- }
- let bytes;
- if (bytes_read.value != bytes_read2.value) {
- // This would be surprising, but theoretically possible with a
- // remote file system, I believe.
- bytes = Math.min(bytes_read.value, bytes_read2.value);
- pos += bytes;
- result = OS.Win.File.SetFilePointer(input, pos, null, OS.Constants.Win.FILE_BEGIN);
- isnot(result, 0, "test_ReadWrite: input seek succeeded");
-
- result = OS.Win.File.SetFilePointer(output, pos, null, OS.Constants.Win.FILE_BEGIN);
- isnot(result, 0, "test_ReadWrite: output seek succeeded");
-
- } else {
- bytes = bytes_read.value;
- pos += bytes;
- }
- for (let i = 0; i < bytes; ++i) {
- if (array[i] != array2[i]) {
- ok(false, "Files do not match at position " + i
- + " ("+array[i] + "/"+array2[i] + ")");
- }
- }
- }
- info("test_ReadWrite test complete");
- result = OS.Win.File.CloseHandle(input);
- isnot(result, 0, "test_ReadWrite: inpout close succeeded");
- result = OS.Win.File.CloseHandle(output);
- isnot(result, 0, "test_ReadWrite: outpout close succeeded");
- result = OS.Win.File.DeleteFile(output_name);
- isnot(result, 0, "test_ReadWrite: output remove succeeded");
- info("test_ReadWrite cleanup complete");
-}
-
-function test_passing_undefined()
-{
- info("Testing that an exception gets thrown when an FFI function is passed undefined");
- let exceptionRaised = false;
-
- try {
- let file = OS.Win.File.CreateFile(
- undefined,
- OS.Constants.Win.GENERIC_READ,
- 0,
- null,
- OS.Constants.Win.OPEN_EXISTING,
- 0,
- null);
- } catch(e if e instanceof TypeError && e.message.indexOf("CreateFile") > -1) {
- exceptionRaised = true;
- }
-
- ok(exceptionRaised, "test_passing_undefined: exception gets thrown")
-}
diff --git a/toolkit/components/osfile/tests/xpcshell/.eslintrc.js b/toolkit/components/osfile/tests/xpcshell/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/osfile/tests/xpcshell/head.js b/toolkit/components/osfile/tests/xpcshell/head.js
deleted file mode 100644
index eef29962af..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/head.js
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-var {utils: Cu, interfaces: Ci} = Components;
-
-var {XPCOMUtils} = Cu.import("resource://gre/modules/XPCOMUtils.jsm", {});
-
-// Bug 1014484 can only be reproduced by loading OS.File first from the
-// CommonJS loader, so we do not want OS.File to be loaded eagerly for
-// all the tests in this directory.
-XPCOMUtils.defineLazyModuleGetter(this, "OS",
- "resource://gre/modules/osfile.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
- "resource://gre/modules/FileUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
- "resource://gre/modules/NetUtil.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Services",
- "resource://gre/modules/Services.jsm");
-
-var {Promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
-var {Task} = Cu.import("resource://gre/modules/Task.jsm", {});
-
-Services.prefs.setBoolPref("toolkit.osfile.log", true);
-
-/**
- * As add_task, but execute the test both with native operations and
- * without.
- */
-function add_test_pair(generator) {
- add_task(function*() {
- do_print("Executing test " + generator.name + " with native operations");
- Services.prefs.setBoolPref("toolkit.osfile.native", true);
- return Task.spawn(generator);
- });
- add_task(function*() {
- do_print("Executing test " + generator.name + " without native operations");
- Services.prefs.setBoolPref("toolkit.osfile.native", false);
- return Task.spawn(generator);
- });
-}
-
-/**
- * Fetch asynchronously the contents of a file using xpcom.
- *
- * Used for comparing xpcom-based results to os.file-based results.
- *
- * @param {string} path The _absolute_ path to the file.
- * @return {promise}
- * @resolves {string} The contents of the file.
- */
-function reference_fetch_file(path, test) {
- do_print("Fetching file " + path);
- let deferred = Promise.defer();
- let file = new FileUtils.File(path);
- NetUtil.asyncFetch({
- uri: NetUtil.newURI(file),
- loadUsingSystemPrincipal: true
- }, function(stream, status) {
- if (!Components.isSuccessCode(status)) {
- deferred.reject(status);
- return;
- }
- let result, reject;
- try {
- result = NetUtil.readInputStreamToString(stream, stream.available());
- } catch (x) {
- reject = x;
- }
- stream.close();
- if (reject) {
- deferred.reject(reject);
- } else {
- deferred.resolve(result);
- }
- });
-
- return deferred.promise;
-};
-
-/**
- * Compare asynchronously the contents two files using xpcom.
- *
- * Used for comparing xpcom-based results to os.file-based results.
- *
- * @param {string} a The _absolute_ path to the first file.
- * @param {string} b The _absolute_ path to the second file.
- *
- * @resolves {null}
- */
-function reference_compare_files(a, b, test) {
- return Task.spawn(function*() {
- do_print("Comparing files " + a + " and " + b);
- let a_contents = yield reference_fetch_file(a, test);
- let b_contents = yield reference_fetch_file(b, test);
- do_check_eq(a_contents, b_contents);
- });
-};
diff --git a/toolkit/components/osfile/tests/xpcshell/test_available_free_space.js b/toolkit/components/osfile/tests/xpcshell/test_available_free_space.js
deleted file mode 100644
index 08e67763b5..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_available_free_space.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-Components.utils.import("resource://gre/modules/osfile.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-do_register_cleanup(function() {
- Services.prefs.setBoolPref("toolkit.osfile.log", false);
-});
-
-function run_test() {
- Services.prefs.setBoolPref("toolkit.osfile.log", true);
-
- run_next_test();
-}
-
-/**
- * Test OS.File.getAvailableFreeSpace
- */
-add_task(function() {
- // Set up profile. We will use profile path to query for available free
- // space.
- do_get_profile();
-
- let dir = OS.Constants.Path.profileDir;
-
- // Sanity checking for the test
- do_check_true((yield OS.File.exists(dir)));
-
- // Query for available bytes for user
- let availableBytes = yield OS.File.getAvailableFreeSpace(dir);
-
- do_check_true(!!availableBytes);
- do_check_true(availableBytes > 0);
-});
diff --git a/toolkit/components/osfile/tests/xpcshell/test_compression.js b/toolkit/components/osfile/tests/xpcshell/test_compression.js
deleted file mode 100644
index b40235615e..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_compression.js
+++ /dev/null
@@ -1,98 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-Components.utils.import("resource://gre/modules/osfile.jsm");
-
-function run_test() {
- do_test_pending();
- run_next_test();
-}
-
-add_task(function test_compress_lz4() {
- let path = OS.Path.join(OS.Constants.Path.tmpDir, "compression.lz");
- let length = 1024;
- let array = new Uint8Array(length);
- for (let i = 0; i < array.byteLength; ++i) {
- array[i] = i;
- }
- let arrayAsString = Array.prototype.join.call(array);
-
- do_print("Writing data with lz4 compression");
- let bytes = yield OS.File.writeAtomic(path, array, { compression: "lz4" });
- do_print("Compressed " + length + " bytes into " + bytes);
-
- do_print("Reading back with lz4 decompression");
- let decompressed = yield OS.File.read(path, { compression: "lz4" });
- do_print("Decompressed into " + decompressed.byteLength + " bytes");
- do_check_eq(arrayAsString, Array.prototype.join.call(decompressed));
-});
-
-add_task(function test_uncompressed() {
- do_print("Writing data without compression");
- let path = OS.Path.join(OS.Constants.Path.tmpDir, "no_compression.tmp");
- let array = new Uint8Array(1024);
- for (let i = 0; i < array.byteLength; ++i) {
- array[i] = i;
- }
- let bytes = yield OS.File.writeAtomic(path, array); // No compression
-
- let exn;
- // Force decompression, reading should fail
- try {
- yield OS.File.read(path, { compression: "lz4" });
- } catch (ex) {
- exn = ex;
- }
- do_check_true(!!exn);
- // Check the exception message (and that it contains the file name)
- do_check_true(exn.message.indexOf(`Invalid header (no magic number) - Data: ${ path }`) != -1);
-});
-
-add_task(function test_no_header() {
- let path = OS.Path.join(OS.Constants.Path.tmpDir, "no_header.tmp");
- let array = new Uint8Array(8).fill(0,0); // Small array with no header
-
- do_print("Writing data with no header");
-
- let bytes = yield OS.File.writeAtomic(path, array); // No compression
- let exn;
- // Force decompression, reading should fail
- try {
- yield OS.File.read(path, { compression: "lz4" });
- } catch (ex) {
- exn = ex;
- }
- do_check_true(!!exn);
- // Check the exception message (and that it contains the file name)
- do_check_true(exn.message.indexOf(`Buffer is too short (no header) - Data: ${ path }`) != -1);
-});
-
-add_task(function test_invalid_content() {
- let path = OS.Path.join(OS.Constants.Path.tmpDir, "invalid_content.tmp");
- let arr1 = new Uint8Array([109, 111, 122, 76, 122, 52, 48, 0]);
- let arr2 = new Uint8Array(248).fill(1,0);
-
- let array = new Uint8Array(arr1.length + arr2.length);
- array.set(arr1);
- array.set(arr2, arr1.length);
-
- do_print("Writing invalid data (with a valid header and only ones after that)");
-
- let bytes = yield OS.File.writeAtomic(path, array); // No compression
- let exn;
- // Force decompression, reading should fail
- try {
- yield OS.File.read(path, { compression: "lz4" });
- } catch (ex) {
- exn = ex;
- }
- do_check_true(!!exn);
- // Check the exception message (and that it contains the file name)
- do_check_true(exn.message.indexOf(`Invalid content: Decompression stopped at 0 - Data: ${ path }`) != -1);
-});
-
-add_task(function() {
- do_test_finished();
-}); \ No newline at end of file
diff --git a/toolkit/components/osfile/tests/xpcshell/test_constants.js b/toolkit/components/osfile/tests/xpcshell/test_constants.js
deleted file mode 100644
index 5b91484bd9..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_constants.js
+++ /dev/null
@@ -1,26 +0,0 @@
-"use strict";
-
-Components.utils.import("resource://gre/modules/osfile.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm", this);
-
-function run_test() {
- run_next_test();
-}
-
-// Test that OS.Constants is defined correctly.
-add_task(function* check_definition() {
- do_check_true(OS.Constants!=null);
- do_check_true(!!OS.Constants.Win || !!OS.Constants.libc);
- do_check_true(OS.Constants.Path!=null);
- do_check_true(OS.Constants.Sys!=null);
- //check system name
- do_check_eq(Services.appinfo.OS, OS.Constants.Sys.Name);
-
- //check if using DEBUG build
- if (Components.classes["@mozilla.org/xpcom/debug;1"].getService(Components.interfaces.nsIDebug2).isDebugBuild == true) {
- do_check_true(OS.Constants.Sys.DEBUG);
- } else {
- do_check_true(typeof(OS.Constants.Sys.DEBUG) == 'undefined');
- }
-});
diff --git a/toolkit/components/osfile/tests/xpcshell/test_creationDate.js b/toolkit/components/osfile/tests/xpcshell/test_creationDate.js
deleted file mode 100644
index 9c4fa1dfc4..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_creationDate.js
+++ /dev/null
@@ -1,31 +0,0 @@
-"use strict";
-
-function run_test() {
- do_test_pending();
- run_next_test();
-}
-
-/**
- * Test to ensure that deprecation warning is issued on use
- * of creationDate.
- */
-add_task(function test_deprecatedCreationDate () {
- let deferred = Promise.defer();
- let consoleListener = {
- observe: function (aMessage) {
- if(aMessage.message.indexOf("Field 'creationDate' is deprecated.") > -1) {
- do_print("Deprecation message printed");
- do_check_true(true);
- Services.console.unregisterListener(consoleListener);
- deferred.resolve();
- }
- }
- };
- let currentDir = yield OS.File.getCurrentDirectory();
- let path = OS.Path.join(currentDir, "test_creationDate.js");
-
- Services.console.registerListener(consoleListener);
- (yield OS.File.stat(path)).creationDate;
-});
-
-add_task(do_test_finished);
diff --git a/toolkit/components/osfile/tests/xpcshell/test_duration.js b/toolkit/components/osfile/tests/xpcshell/test_duration.js
deleted file mode 100644
index 305c03da86..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_duration.js
+++ /dev/null
@@ -1,91 +0,0 @@
-var {OS} = Components.utils.import("resource://gre/modules/osfile.jsm", {});
-var {Services} = Components.utils.import("resource://gre/modules/Services.jsm", {});
-
-/**
- * Test optional duration reporting that can be used for telemetry.
- */
-add_task(function* duration() {
- Services.prefs.setBoolPref("toolkit.osfile.log", true);
- // Options structure passed to a OS.File copy method.
- let copyOptions = {
- // This field should be overridden with the actual duration
- // measurement.
- outExecutionDuration: null
- };
- let currentDir = yield OS.File.getCurrentDirectory();
- let pathSource = OS.Path.join(currentDir, "test_duration.js");
- let copyFile = pathSource + ".bak";
- function testOptions(options, name) {
- do_print("Checking outExecutionDuration for operation: " + name);
- do_print(name + ": Gathered method duration time: " +
- options.outExecutionDuration + "ms");
- // Making sure that duration was updated.
- do_check_eq(typeof options.outExecutionDuration, "number");
- do_check_true(options.outExecutionDuration >= 0);
- };
- // Testing duration of OS.File.copy.
- yield OS.File.copy(pathSource, copyFile, copyOptions);
- testOptions(copyOptions, "OS.File.copy");
- yield OS.File.remove(copyFile);
-
- // Trying an operation where options are cloned.
- let pathDest = OS.Path.join(OS.Constants.Path.tmpDir,
- "osfile async test read writeAtomic.tmp");
- let tmpPath = pathDest + ".tmp";
- let readOptions = {
- outExecutionDuration: null
- };
- let contents = yield OS.File.read(pathSource, undefined, readOptions);
- testOptions(readOptions, "OS.File.read");
- // Options structure passed to a OS.File writeAtomic method.
- let writeAtomicOptions = {
- // This field should be first initialized with the actual
- // duration measurement then progressively incremented.
- outExecutionDuration: null,
- tmpPath: tmpPath
- };
- yield OS.File.writeAtomic(pathDest, contents, writeAtomicOptions);
- testOptions(writeAtomicOptions, "OS.File.writeAtomic");
- yield OS.File.remove(pathDest);
-
- do_print("Ensuring that we can use outExecutionDuration to accumulate durations");
-
- let ARBITRARY_BASE_DURATION = 5;
- copyOptions = {
- // This field should now be incremented with the actual duration
- // measurement.
- outExecutionDuration: ARBITRARY_BASE_DURATION
- };
- let backupDuration = ARBITRARY_BASE_DURATION;
- // Testing duration of OS.File.copy.
- yield OS.File.copy(pathSource, copyFile, copyOptions);
-
- do_check_true(copyOptions.outExecutionDuration >= backupDuration);
-
- backupDuration = copyOptions.outExecutionDuration;
- yield OS.File.remove(copyFile, copyOptions);
- do_check_true(copyOptions.outExecutionDuration >= backupDuration);
-
- // Trying an operation where options are cloned.
- // Options structure passed to a OS.File writeAtomic method.
- writeAtomicOptions = {
- // This field should be overridden with the actual duration
- // measurement.
- outExecutionDuration: copyOptions.outExecutionDuration,
- tmpPath: tmpPath
- };
- backupDuration = writeAtomicOptions.outExecutionDuration;
-
- yield OS.File.writeAtomic(pathDest, contents, writeAtomicOptions);
- do_check_true(copyOptions.outExecutionDuration >= backupDuration);
- OS.File.remove(pathDest);
-
- // Testing an operation that doesn't take arguments at all
- let file = yield OS.File.open(pathSource);
- yield file.stat();
- yield file.close();
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/osfile/tests/xpcshell/test_exception.js b/toolkit/components/osfile/tests/xpcshell/test_exception.js
deleted file mode 100644
index 1282adb3e1..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_exception.js
+++ /dev/null
@@ -1,89 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that functions throw the appropriate exceptions.
- */
-
-"use strict";
-
-var EXISTING_FILE = do_get_file("xpcshell.ini").path;
-
-
-// Tests on |open|
-
-add_test_pair(function test_typeerror() {
- let exn;
- try {
- let fd = yield OS.File.open("/tmp", {no_such_key: 1});
- do_print("Fd: " + fd);
- } catch (ex) {
- exn = ex;
- }
- do_print("Exception: " + exn);
- do_check_true(exn.constructor.name == "TypeError");
-});
-
-// Tests on |read|
-
-add_test_pair(function* test_bad_encoding() {
- do_print("Testing with a wrong encoding");
- try {
- yield OS.File.read(EXISTING_FILE, { encoding: "baby-speak-encoded" });
- do_throw("Should have thrown with an ex.becauseInvalidArgument");
- } catch (ex if ex.becauseInvalidArgument) {
- do_print("Wrong encoding caused the correct exception");
- }
-
- try {
- yield OS.File.read(EXISTING_FILE, { encoding: 4 });
- do_throw("Should have thrown a TypeError");
- } catch (ex if ex.constructor.name == "TypeError") {
- // Note that TypeError doesn't carry across compartments
- do_print("Non-string encoding caused the correct exception");
- }
- });
-
-add_test_pair(function* test_bad_compression() {
- do_print("Testing with a non-existing compression");
- try {
- yield OS.File.read(EXISTING_FILE, { compression: "mmmh-crunchy" });
- do_throw("Should have thrown with an ex.becauseInvalidArgument");
- } catch (ex if ex.becauseInvalidArgument) {
- do_print("Wrong encoding caused the correct exception");
- }
-
- do_print("Testing with a bad type for option compression");
- try {
- yield OS.File.read(EXISTING_FILE, { compression: 5 });
- do_throw("Should have thrown a TypeError");
- } catch (ex if ex.constructor.name == "TypeError") {
- // Note that TypeError doesn't carry across compartments
- do_print("Non-string encoding caused the correct exception");
- }
-});
-
-add_test_pair(function* test_bad_bytes() {
- do_print("Testing with a bad type for option bytes");
- try {
- yield OS.File.read(EXISTING_FILE, { bytes: "five" });
- do_throw("Should have thrown a TypeError");
- } catch (ex if ex.constructor.name == "TypeError") {
- // Note that TypeError doesn't carry across compartments
- do_print("Non-number bytes caused the correct exception");
- }
-});
-
-add_test_pair(function* read_non_existent() {
- do_print("Testing with a non-existent file");
- try {
- yield OS.File.read("I/do/not/exist");
- do_throw("Should have thrown with an ex.becauseNoSuchFile");
- } catch (ex if ex.becauseNoSuchFile) {
- do_print("Correct exceptions");
- }
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/osfile/tests/xpcshell/test_file_URL_conversion.js b/toolkit/components/osfile/tests/xpcshell/test_file_URL_conversion.js
deleted file mode 100644
index 3ec42065bd..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_file_URL_conversion.js
+++ /dev/null
@@ -1,114 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- Components.utils.import("resource://gre/modules/Services.jsm");
- Components.utils.import("resource://gre/modules/osfile.jsm");
- Components.utils.import("resource://gre/modules/FileUtils.jsm");
-
- let isWindows = ("@mozilla.org/windows-registry-key;1" in Components.classes);
-
- // Test cases for filePathToURI
- let paths = isWindows ? [
- 'C:\\',
- 'C:\\test',
- 'C:\\test\\',
- 'C:\\test%2f',
- 'C:\\test\\test\\test',
- 'C:\\test;+%',
- 'C:\\test?action=index\\',
- 'C:\\test\ test',
- '\\\\C:\\a\\b\\c',
- '\\\\Server\\a\\b\\c',
-
- // note that per http://support.microsoft.com/kb/177506 (under more info),
- // the following characters are allowed on Windows:
- 'C:\\char^',
- 'C:\\char&',
- 'C:\\char\'',
- 'C:\\char@',
- 'C:\\char{',
- 'C:\\char}',
- 'C:\\char[',
- 'C:\\char]',
- 'C:\\char,',
- 'C:\\char$',
- 'C:\\char=',
- 'C:\\char!',
- 'C:\\char-',
- 'C:\\char#',
- 'C:\\char(',
- 'C:\\char)',
- 'C:\\char%',
- 'C:\\char.',
- 'C:\\char+',
- 'C:\\char~',
- 'C:\\char_'
- ] : [
- '/',
- '/test',
- '/test/',
- '/test%2f',
- '/test/test/test',
- '/test;+%',
- '/test?action=index/',
- '/test\ test',
- '/punctuation/;,/?:@&=+$-_.!~*\'()[]"#',
- '/CasePreserving'
- ];
-
- // some additional URIs to test, beyond those generated from paths
- let uris = isWindows ? [
- 'file:///C:/test/',
- 'file://localhost/C:/test',
- 'file:///c:/test/test.txt',
- //'file:///C:/foo%2f', // trailing, encoded slash
- 'file:///C:/%3f%3F',
- 'file:///C:/%3b%3B',
- 'file:///C:/%3c%3C', // not one of the special-cased ? or ;
- 'file:///C:/%78', // 'x', not usually uri encoded
- 'file:///C:/test#frag', // a fragment identifier
- 'file:///C:/test?action=index' // an actual query component
- ] : [
- 'file:///test/',
- 'file://localhost/test',
- 'file:///test/test.txt',
- 'file:///foo%2f', // trailing, encoded slash
- 'file:///%3f%3F',
- 'file:///%3b%3B',
- 'file:///%3c%3C', // not one of the special-cased ? or ;
- 'file:///%78', // 'x', not usually uri encoded
- 'file:///test#frag', // a fragment identifier
- 'file:///test?action=index' // an actual query component
- ];
-
- for (let path of paths) {
- // convert that to a uri using FileUtils and Services, which toFileURI is trying to model
- let file = FileUtils.File(path);
- let uri = Services.io.newFileURI(file).spec;
- do_check_eq(uri, OS.Path.toFileURI(path));
-
- // keep the resulting URI to try the reverse, except for "C:\" for which the
- // behavior of nsIFileURL and OS.File is inconsistent
- if (path != "C:\\") {
- uris.push(uri);
- }
- }
-
- for (let uri of uris) {
- // convert URIs to paths with nsIFileURI, which fromFileURI is trying to model
- let path = Services.io.newURI(uri, null, null).QueryInterface(Components.interfaces.nsIFileURL).file.path;
- do_check_eq(path, OS.Path.fromFileURI(uri));
- }
-
- // check that non-file URLs aren't allowed
- let thrown = false;
- try {
- OS.Path.fromFileURI('http://test.com')
- } catch (e) {
- do_check_eq(e.message, "fromFileURI expects a file URI");
- thrown = true;
- }
- do_check_true(thrown);
-}
diff --git a/toolkit/components/osfile/tests/xpcshell/test_loader.js b/toolkit/components/osfile/tests/xpcshell/test_loader.js
deleted file mode 100644
index dcfa819be8..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_loader.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-/**
- * Test that OS.File can be loaded using the CommonJS loader.
- */
-
-var { Loader } = Components.utils.import('resource://gre/modules/commonjs/toolkit/loader.js', {});
-
-function run_test() {
- run_next_test();
-}
-
-
-add_task(function*() {
- let dataDir = Services.io.newFileURI(do_get_file("test_loader/", true)).spec + "/";
- let loader = Loader.Loader({
- paths: {'': dataDir }
- });
-
- let require = Loader.Require(loader, Loader.Module('module_test_loader', 'foo'));
- do_print("Require is ready");
- try {
- require('module_test_loader');
- } catch (error) {
- dump('Bootstrap error: ' +
- (error.message ? error.message : String(error)) + '\n' +
- (error.stack || error.fileName + ': ' + error.lineNumber) + '\n');
-
- throw error;
- }
-
- do_print("Require has worked");
-});
-
diff --git a/toolkit/components/osfile/tests/xpcshell/test_loader/module_test_loader.js b/toolkit/components/osfile/tests/xpcshell/test_loader/module_test_loader.js
deleted file mode 100644
index 18356d6ad8..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_loader/module_test_loader.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-// Load OS.File from a module loaded with the CommonJS/addon-sdk loader
-
-var {Cu} = require("chrome");
-Cu.import('resource://gre/modules/osfile.jsm');
diff --git a/toolkit/components/osfile/tests/xpcshell/test_logging.js b/toolkit/components/osfile/tests/xpcshell/test_logging.js
deleted file mode 100644
index 133909e0be..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_logging.js
+++ /dev/null
@@ -1,74 +0,0 @@
-"use strict";
-
-Components.utils.import("resource://gre/modules/osfile.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-/**
- * Tests logging by passing OS.Shared.LOG both an object with its own
- * toString method, and one with the default.
- */
-function run_test() {
- do_test_pending();
- let messageCount = 0;
-
- do_print("Test starting");
-
- // Create a console listener.
- let consoleListener = {
- observe: function (aMessage) {
- //Ignore unexpected messages.
- if (!(aMessage instanceof Components.interfaces.nsIConsoleMessage)) {
- return;
- }
- // This is required, as printing to the |Services.console|
- // while in the observe function causes an exception.
- do_execute_soon(function() {
- do_print("Observing message " + aMessage.message);
- if (aMessage.message.indexOf("TEST OS") < 0) {
- return;
- }
-
- ++messageCount;
- if(messageCount == 1) {
- do_check_eq(aMessage.message, "TEST OS {\"name\":\"test\"}\n");
- }
- if(messageCount == 2) {
- do_check_eq(aMessage.message, "TEST OS name is test\n");
- toggleConsoleListener(false);
- do_test_finished();
- }
- });
- }
- };
-
- // Set/Unset the console listener.
- function toggleConsoleListener (pref) {
- do_print("Setting console listener: " + pref);
- Services.prefs.setBoolPref("toolkit.osfile.log", pref);
- Services.prefs.setBoolPref("toolkit.osfile.log.redirect", pref);
- Services.console[pref ? "registerListener" : "unregisterListener"](
- consoleListener);
- }
-
- toggleConsoleListener(true);
-
- let objectDefault = {name: "test"};
- let CustomToString = function() {
- this.name = "test";
- };
- CustomToString.prototype.toString = function() {
- return "name is " + this.name;
- };
- let objectCustom = new CustomToString();
-
- do_print(OS.Shared.LOG.toSource());
-
- do_print("Logging 1");
- OS.Shared.LOG(objectDefault);
-
- do_print("Logging 2");
- OS.Shared.LOG(objectCustom);
- // Once both messages are observed OS.Shared.DEBUG, and OS.Shared.TEST
- // are reset to false.
-}
-
diff --git a/toolkit/components/osfile/tests/xpcshell/test_makeDir.js b/toolkit/components/osfile/tests/xpcshell/test_makeDir.js
deleted file mode 100644
index 5b9740a7ff..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_makeDir.js
+++ /dev/null
@@ -1,142 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-Components.utils.import("resource://gre/modules/osfile.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-var Path = OS.Path;
-var profileDir;
-
-do_register_cleanup(function() {
- Services.prefs.setBoolPref("toolkit.osfile.log", false);
-});
-
-function run_test() {
- run_next_test();
-}
-
-/**
- * Test OS.File.makeDir
- */
-
-add_task(function init() {
- // Set up profile. We create the directory in the profile, because the profile
- // is removed after every test run.
- do_get_profile();
- profileDir = OS.Constants.Path.profileDir;
- Services.prefs.setBoolPref("toolkit.osfile.log", true);
-});
-
-/**
- * Basic use
- */
-
-add_task(function* test_basic() {
- let dir = Path.join(profileDir, "directory");
-
- // Sanity checking for the test
- do_check_false((yield OS.File.exists(dir)));
-
- // Make a directory
- yield OS.File.makeDir(dir);
-
- //check if the directory exists
- yield OS.File.stat(dir);
-
- // Make a directory that already exists, this should succeed
- yield OS.File.makeDir(dir);
-
- // Make a directory with ignoreExisting
- yield OS.File.makeDir(dir, {ignoreExisting: true});
-
- // Make a directory with ignoreExisting false
- let exception = null;
- try {
- yield OS.File.makeDir(dir, {ignoreExisting: false});
- } catch (ex) {
- exception = ex;
- }
-
- do_check_true(!!exception);
- do_check_true(exception instanceof OS.File.Error);
- do_check_true(exception.becauseExists);
-});
-
-// Make a root directory that already exists
-add_task(function* test_root() {
- if (OS.Constants.Win) {
- yield OS.File.makeDir("C:");
- yield OS.File.makeDir("C:\\");
- } else {
- yield OS.File.makeDir("/");
- }
-});
-
-/**
- * Creating subdirectories
- */
-add_task(function test_option_from() {
- let dir = Path.join(profileDir, "a", "b", "c");
-
- // Sanity checking for the test
- do_check_false((yield OS.File.exists(dir)));
-
- // Make a directory
- yield OS.File.makeDir(dir, {from: profileDir});
-
- //check if the directory exists
- yield OS.File.stat(dir);
-
- // Make a directory that already exists, this should succeed
- yield OS.File.makeDir(dir);
-
- // Make a directory with ignoreExisting
- yield OS.File.makeDir(dir, {ignoreExisting: true});
-
- // Make a directory with ignoreExisting false
- let exception = null;
- try {
- yield OS.File.makeDir(dir, {ignoreExisting: false});
- } catch (ex) {
- exception = ex;
- }
-
- do_check_true(!!exception);
- do_check_true(exception instanceof OS.File.Error);
- do_check_true(exception.becauseExists);
-
- // Make a directory without |from| and fail
- let dir2 = Path.join(profileDir, "g", "h", "i");
- exception = null;
- try {
- yield OS.File.makeDir(dir2);
- } catch (ex) {
- exception = ex;
- }
-
- do_check_true(!!exception);
- do_check_true(exception instanceof OS.File.Error);
- do_check_true(exception.becauseNoSuchFile);
-
- // Test edge cases on paths
-
- let dir3 = Path.join(profileDir, "d", "", "e", "f");
- do_check_false((yield OS.File.exists(dir3)));
- yield OS.File.makeDir(dir3, {from: profileDir});
- do_check_true((yield OS.File.exists(dir3)));
-
- let dir4;
- if (OS.Constants.Win) {
- // Test that we can create a directory recursively even
- // if we have too many "\\".
- dir4 = profileDir + "\\\\g";
- } else {
- dir4 = profileDir + "////g";
- }
- do_check_false((yield OS.File.exists(dir4)));
- yield OS.File.makeDir(dir4, {from: profileDir});
- do_check_true((yield OS.File.exists(dir4)));
-});
diff --git a/toolkit/components/osfile/tests/xpcshell/test_open.js b/toolkit/components/osfile/tests/xpcshell/test_open.js
deleted file mode 100644
index 78772ad09a..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_open.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-Components.utils.import("resource://gre/modules/osfile.jsm");
-
-function run_test() {
- run_next_test();
-}
-
-/**
- * Test OS.File.open for reading:
- * - with an existing file (should succeed);
- * - with a non-existing file (should fail);
- * - with inconsistent arguments (should fail).
- */
-add_task(function() {
- // Attempt to open a file that does not exist, ensure that it yields the
- // appropriate error.
- try {
- let fd = yield OS.File.open(OS.Path.join(".", "This file does not exist"));
- do_check_true(false, "File opening 1 succeeded (it should fail)");
- } catch (err if err instanceof OS.File.Error && err.becauseNoSuchFile) {
- do_print("File opening 1 failed " + err);
- }
-
- // Attempt to open a file with the wrong args, so that it fails before
- // serialization, ensure that it yields the appropriate error.
- do_print("Attempting to open a file with wrong arguments");
- try {
- let fd = yield OS.File.open(1, 2, 3);
- do_check_true(false, "File opening 2 succeeded (it should fail)" + fd);
- } catch (err) {
- do_print("File opening 2 failed " + err);
- do_check_false(err instanceof OS.File.Error,
- "File opening 2 returned something that is not a file error");
- do_check_true(err.constructor.name == "TypeError",
- "File opening 2 returned a TypeError");
- }
-
- // Attempt to open a file correctly
- do_print("Attempting to open a file correctly");
- let openedFile = yield OS.File.open(OS.Path.join(do_get_cwd().path, "test_open.js"));
- do_print("File opened correctly");
-
- do_print("Attempting to close a file correctly");
- yield openedFile.close();
-
- do_print("Attempting to close a file again");
- yield openedFile.close();
-});
-
-/**
- * Test the error thrown by OS.File.open when attempting to open a directory
- * that does not exist.
- */
-add_task(function test_error_attributes () {
-
- let dir = OS.Path.join(do_get_profile().path, "test_osfileErrorAttrs");
- let fpath = OS.Path.join(dir, "test_error_attributes.txt");
-
- try {
- yield OS.File.open(fpath, {truncate: true}, {});
- do_check_true(false, "Opening path suceeded (it should fail) " + fpath);
- } catch (err) {
- do_check_true(err instanceof OS.File.Error);
- do_check_true(err.becauseNoSuchFile);
- }
-});
diff --git a/toolkit/components/osfile/tests/xpcshell/test_osfile_async.js b/toolkit/components/osfile/tests/xpcshell/test_osfile_async.js
deleted file mode 100644
index 0f86b2ea8b..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_osfile_async.js
+++ /dev/null
@@ -1,16 +0,0 @@
-"use strict";
-
-Components.utils.import("resource://gre/modules/osfile.jsm");
-
-/**
- * A trivial test ensuring that we can call osfile from xpcshell.
- * (see bug 808161)
- */
-
-function run_test() {
- do_test_pending();
- OS.File.getCurrentDirectory().then(
- do_test_finished,
- do_test_finished
- );
-}
diff --git a/toolkit/components/osfile/tests/xpcshell/test_osfile_async_append.js b/toolkit/components/osfile/tests/xpcshell/test_osfile_async_append.js
deleted file mode 100644
index 0aef2c58af..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_osfile_async_append.js
+++ /dev/null
@@ -1,122 +0,0 @@
-"use strict";
-
-do_print("starting tests");
-
-Components.utils.import("resource://gre/modules/osfile.jsm");
-Components.utils.import("resource://gre/modules/Task.jsm");
-
-/**
- * A test to check that the |append| mode flag is correctly implemented.
- * (see bug 925865)
- */
-
-function setup_mode(mode) {
- // Complete mode.
- let realMode = {
- read: true,
- write: true
- };
- for (let k in mode) {
- realMode[k] = mode[k];
- }
- return realMode;
-}
-
-// Test append mode.
-function test_append(mode) {
- let path = OS.Path.join(OS.Constants.Path.tmpDir,
- "test_osfile_async_append.tmp");
-
- // Clear any left-over files from previous runs.
- try {
- yield OS.File.remove(path);
- } catch (ex if ex.becauseNoSuchFile) {
- // ignore
- }
-
- try {
- mode = setup_mode(mode);
- mode.append = true;
- if (mode.trunc) {
- // Pre-fill file with some data to see if |trunc| actually works.
- yield OS.File.writeAtomic(path, new Uint8Array(500));
- }
- let file = yield OS.File.open(path, mode);
- try {
- yield file.write(new Uint8Array(1000));
- yield file.setPosition(0, OS.File.POS_START);
- yield file.read(100);
- // Should be at offset 100, length 1000 now.
- yield file.write(new Uint8Array(100));
- // Should be at offset 1100, length 1100 now.
- let stat = yield file.stat();
- do_check_eq(1100, stat.size);
- } finally {
- yield file.close();
- }
- } catch(ex) {
- try {
- yield OS.File.remove(path);
- } catch (ex if ex.becauseNoSuchFile) {
- // ignore.
- }
- }
-}
-
-// Test no-append mode.
-function test_no_append(mode) {
- let path = OS.Path.join(OS.Constants.Path.tmpDir,
- "test_osfile_async_noappend.tmp");
-
- // Clear any left-over files from previous runs.
- try {
- yield OS.File.remove(path);
- } catch (ex if ex.becauseNoSuchFile) {
- // ignore
- }
-
- try {
- mode = setup_mode(mode);
- mode.append = false;
- if (mode.trunc) {
- // Pre-fill file with some data to see if |trunc| actually works.
- yield OS.File.writeAtomic(path, new Uint8Array(500));
- }
- let file = yield OS.File.open(path, mode);
- try {
- yield file.write(new Uint8Array(1000));
- yield file.setPosition(0, OS.File.POS_START);
- yield file.read(100);
- // Should be at offset 100, length 1000 now.
- yield file.write(new Uint8Array(100));
- // Should be at offset 200, length 1000 now.
- let stat = yield file.stat();
- do_check_eq(1000, stat.size);
- } finally {
- yield file.close();
- }
- } finally {
- try {
- yield OS.File.remove(path);
- } catch (ex if ex.becauseNoSuchFile) {
- // ignore.
- }
- }
-}
-
-var test_flags = [
- {},
- {create:true},
- {trunc:true}
-];
-function run_test() {
- do_test_pending();
-
- for (let t of test_flags) {
- add_task(test_append.bind(null, t));
- add_task(test_no_append.bind(null, t));
- }
- add_task(do_test_finished);
-
- run_next_test();
-}
diff --git a/toolkit/components/osfile/tests/xpcshell/test_osfile_async_bytes.js b/toolkit/components/osfile/tests/xpcshell/test_osfile_async_bytes.js
deleted file mode 100644
index 68fa9152cd..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_osfile_async_bytes.js
+++ /dev/null
@@ -1,39 +0,0 @@
-"use strict";
-
-Components.utils.import("resource://gre/modules/osfile.jsm");
-Components.utils.import("resource://gre/modules/Task.jsm");
-
-function run_test() {
- do_test_pending();
- run_next_test();
-}
-
-/**
- * Test to ensure that {bytes:} in options to |write| is correctly
- * preserved.
- */
-add_task(function* test_bytes() {
- let path = OS.Path.join(OS.Constants.Path.tmpDir,
- "test_osfile_async_bytes.tmp");
- let file = yield OS.File.open(path, {trunc: true, read: true, write: true});
- try {
- try {
- // 1. Test write, by supplying {bytes:} options smaller than the actual
- // buffer.
- yield file.write(new Uint8Array(2048), {bytes: 1024});
- do_check_eq((yield file.stat()).size, 1024);
-
- // 2. Test that passing nullish values for |options| still works.
- yield file.setPosition(0, OS.File.POS_END);
- yield file.write(new Uint8Array(1024), null);
- yield file.write(new Uint8Array(1024), undefined);
- do_check_eq((yield file.stat()).size, 3072);
- } finally {
- yield file.close();
- }
- } finally {
- yield OS.File.remove(path);
- }
-});
-
-add_task(do_test_finished);
diff --git a/toolkit/components/osfile/tests/xpcshell/test_osfile_async_copy.js b/toolkit/components/osfile/tests/xpcshell/test_osfile_async_copy.js
deleted file mode 100644
index 9c52c8a80d..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_osfile_async_copy.js
+++ /dev/null
@@ -1,113 +0,0 @@
-"use strict";
-
-Components.utils.import("resource://gre/modules/osfile.jsm");
-Components.utils.import("resource://gre/modules/FileUtils.jsm");
-Components.utils.import("resource://gre/modules/NetUtil.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/Promise.jsm");
-Components.utils.import("resource://gre/modules/Task.jsm");
-
-function run_test() {
- do_test_pending();
- run_next_test();
-}
-
-/**
- * A file that we know exists and that can be used for reading.
- */
-var EXISTING_FILE = "test_osfile_async_copy.js";
-
-/**
- * Fetch asynchronously the contents of a file using xpcom.
- *
- * Used for comparing xpcom-based results to os.file-based results.
- *
- * @param {string} path The _absolute_ path to the file.
- * @return {promise}
- * @resolves {string} The contents of the file.
- */
-var reference_fetch_file = function reference_fetch_file(path) {
- let promise = Promise.defer();
- let file = new FileUtils.File(path);
- NetUtil.asyncFetch({
- uri: NetUtil.newURI(file),
- loadUsingSystemPrincipal: true
- }, function(stream, status) {
- if (!Components.isSuccessCode(status)) {
- promise.reject(status);
- return;
- }
- let result, reject;
- try {
- result = NetUtil.readInputStreamToString(stream, stream.available());
- } catch (x) {
- reject = x;
- }
- stream.close();
- if (reject) {
- promise.reject(reject);
- } else {
- promise.resolve(result);
- }
- });
-
- return promise.promise;
-};
-
-/**
- * Compare asynchronously the contents two files using xpcom.
- *
- * Used for comparing xpcom-based results to os.file-based results.
- *
- * @param {string} a The _absolute_ path to the first file.
- * @param {string} b The _absolute_ path to the second file.
- *
- * @resolves {null}
- */
-var reference_compare_files = function reference_compare_files(a, b) {
- let a_contents = yield reference_fetch_file(a);
- let b_contents = yield reference_fetch_file(b);
- // Not using do_check_eq to avoid dumping the whole file to the log.
- // It is OK to === compare here, as both variables contain a string.
- do_check_true(a_contents === b_contents);
-};
-
-/**
- * Test to ensure that OS.File.copy works.
- */
-function test_copymove(options = {}) {
- let source = OS.Path.join((yield OS.File.getCurrentDirectory()),
- EXISTING_FILE);
- let dest = OS.Path.join(OS.Constants.Path.tmpDir,
- "test_osfile_async_copy_dest.tmp");
- let dest2 = OS.Path.join(OS.Constants.Path.tmpDir,
- "test_osfile_async_copy_dest2.tmp");
- try {
- // 1. Test copy.
- yield OS.File.copy(source, dest, options);
- yield reference_compare_files(source, dest);
- // 2. Test subsequent move.
- yield OS.File.move(dest, dest2);
- yield reference_compare_files(source, dest2);
- // 3. Check that the moved file was really moved.
- do_check_eq((yield OS.File.exists(dest)), false);
- } finally {
- try {
- yield OS.File.remove(dest);
- } catch (ex if ex.becauseNoSuchFile) {
- // ignore
- }
- try {
- yield OS.File.remove(dest2);
- } catch (ex if ex.becauseNoSuchFile) {
- // ignore
- }
- }
-}
-
-// Regular copy test.
-add_task(test_copymove);
-// Userland copy test.
-add_task(test_copymove.bind(null, {unixUserland: true}));
-
-add_task(do_test_finished);
diff --git a/toolkit/components/osfile/tests/xpcshell/test_osfile_async_flush.js b/toolkit/components/osfile/tests/xpcshell/test_osfile_async_flush.js
deleted file mode 100644
index 9ed087f4e9..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_osfile_async_flush.js
+++ /dev/null
@@ -1,30 +0,0 @@
-"use strict";
-
-Components.utils.import("resource://gre/modules/osfile.jsm");
-Components.utils.import("resource://gre/modules/Task.jsm");
-
-function run_test() {
- do_test_pending();
- run_next_test();
-}
-
-/**
- * Test to ensure that |File.prototype.flush| is available in the async API.
- */
-
-add_task(function test_flush() {
- let path = OS.Path.join(OS.Constants.Path.tmpDir,
- "test_osfile_async_flush.tmp");
- let file = yield OS.File.open(path, {trunc: true, write: true});
- try {
- try {
- yield file.flush();
- } finally {
- yield file.close();
- }
- } finally {
- yield OS.File.remove(path);
- }
-});
-
-add_task(do_test_finished);
diff --git a/toolkit/components/osfile/tests/xpcshell/test_osfile_async_largefiles.js b/toolkit/components/osfile/tests/xpcshell/test_osfile_async_largefiles.js
deleted file mode 100644
index a9ac776b0b..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_osfile_async_largefiles.js
+++ /dev/null
@@ -1,153 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-Components.utils.import("resource://gre/modules/ctypes.jsm");
-Components.utils.import("resource://gre/modules/osfile.jsm");
-Components.utils.import("resource://gre/modules/Task.jsm");
-
-/**
- * A test to check that .getPosition/.setPosition work with large files.
- * (see bug 952997)
- */
-
-// Test setPosition/getPosition.
-function test_setPosition(forward, current, backward) {
- let path = OS.Path.join(OS.Constants.Path.tmpDir,
- "test_osfile_async_largefiles.tmp");
-
- // Clear any left-over files from previous runs.
- try {
- yield OS.File.remove(path);
- } catch (ex if ex.becauseNoSuchFile) {
- // ignore
- }
-
- try {
- let file = yield OS.File.open(path, {write:true, append:false});
- try {
- let pos = 0;
-
- // 1. seek forward from start
- do_print("Moving forward: " + forward);
- yield file.setPosition(forward, OS.File.POS_START);
- pos += forward;
- do_check_eq((yield file.getPosition()), pos);
-
- // 2. seek forward from current position
- do_print("Moving current: " + current);
- yield file.setPosition(current, OS.File.POS_CURRENT);
- pos += current;
- do_check_eq((yield file.getPosition()), pos);
-
- // 3. seek backward from current position
- do_print("Moving current backward: " + backward);
- yield file.setPosition(-backward, OS.File.POS_CURRENT);
- pos -= backward;
- do_check_eq((yield file.getPosition()), pos);
-
- } finally {
- yield file.setPosition(0, OS.File.POS_START);
- yield file.close();
- }
- } catch(ex) {
- try {
- yield OS.File.remove(path);
- } catch (ex if ex.becauseNoSuchFile) {
- // ignore.
- }
- do_throw(ex);
- }
-}
-
-// Test setPosition/getPosition expected failures.
-function test_setPosition_failures() {
- let path = OS.Path.join(OS.Constants.Path.tmpDir,
- "test_osfile_async_largefiles.tmp");
-
- // Clear any left-over files from previous runs.
- try {
- yield OS.File.remove(path);
- } catch (ex if ex.becauseNoSuchFile) {
- // ignore
- }
-
- try {
- let file = yield OS.File.open(path, {write:true, append:false});
- try {
- let pos = 0;
-
- // 1. Use an invalid position value
- try {
- yield file.setPosition(0.5, OS.File.POS_START);
- do_throw("Shouldn't have succeeded");
- } catch (ex) {
- do_check_true(ex.toString().includes("can't pass"));
- }
- // Since setPosition should have bailed, it shouldn't have moved the
- // file pointer at all.
- do_check_eq((yield file.getPosition()), 0);
-
- // 2. Use an invalid position value
- try {
- yield file.setPosition(0xffffffff + 0.5, OS.File.POS_START);
- do_throw("Shouldn't have succeeded");
- } catch (ex) {
- do_check_true(ex.toString().includes("can't pass"));
- }
- // Since setPosition should have bailed, it shouldn't have moved the
- // file pointer at all.
- do_check_eq((yield file.getPosition()), 0);
-
- // 3. Use a position that cannot be represented as a double
- try {
- // Not all numbers after 9007199254740992 can be represented as a
- // double. E.g. in js 9007199254740992 + 1 == 9007199254740992
- yield file.setPosition(9007199254740992, OS.File.POS_START);
- yield file.setPosition(1, OS.File.POS_CURRENT);
- do_throw("Shouldn't have succeeded");
- } catch (ex) {
- do_print(ex.toString());
- do_check_true(!!ex);
- }
-
- } finally {
- yield file.setPosition(0, OS.File.POS_START);
- yield file.close();
- try {
- yield OS.File.remove(path);
- } catch (ex if ex.becauseNoSuchFile) {
- // ignore.
- }
- }
- } catch(ex) {
- do_throw(ex);
- }
-}
-
-function run_test() {
- // First verify stuff works for small values.
- add_task(test_setPosition.bind(null, 0, 100, 50));
- add_task(test_setPosition.bind(null, 1000, 100, 50));
- add_task(test_setPosition.bind(null, 1000, -100, -50));
-
- if (OS.Constants.Win || ctypes.off_t.size >= 8) {
- // Now verify stuff still works for large values.
- // 1. Multiple small seeks, which add up to > MAXINT32
- add_task(test_setPosition.bind(null, 0x7fffffff, 0x7fffffff, 0));
- // 2. Plain large seek, that should end up at 0 again.
- // 0xffffffff also happens to be the INVALID_SET_FILE_POINTER value on
- // Windows, so this also tests the error handling
- add_task(test_setPosition.bind(null, 0, 0xffffffff, 0xffffffff));
- // 3. Multiple large seeks that should end up > MAXINT32.
- add_task(test_setPosition.bind(null, 0xffffffff, 0xffffffff, 0xffffffff));
- // 5. Multiple large seeks with negative offsets.
- add_task(test_setPosition.bind(null, 0xffffffff, -0x7fffffff, 0x7fffffff));
-
- // 6. Check failures
- add_task(test_setPosition_failures);
- }
-
- run_next_test();
-}
diff --git a/toolkit/components/osfile/tests/xpcshell/test_osfile_async_setDates.js b/toolkit/components/osfile/tests/xpcshell/test_osfile_async_setDates.js
deleted file mode 100644
index 6a5ecd5e35..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_osfile_async_setDates.js
+++ /dev/null
@@ -1,211 +0,0 @@
-"use strict";
-
-Components.utils.import("resource://gre/modules/osfile.jsm");
-Components.utils.import("resource://gre/modules/Task.jsm");
-
-/**
- * A test to ensure that OS.File.setDates and OS.File.prototype.setDates are
- * working correctly.
- * (see bug 924916)
- */
-
-function run_test() {
- run_next_test();
-}
-
-// Non-prototypical tests, operating on path names.
-add_task(function* test_nonproto() {
- // First, create a file we can mess with.
- let path = OS.Path.join(OS.Constants.Path.tmpDir,
- "test_osfile_async_setDates_nonproto.tmp");
- yield OS.File.writeAtomic(path, new Uint8Array(1));
-
- try {
- // 1. Try to set some well known dates.
- // We choose multiples of 2000ms, because the time stamp resolution of
- // the underlying OS might not support something more precise.
- const accDate = 2000;
- const modDate = 4000;
- {
- yield OS.File.setDates(path, accDate, modDate);
- let stat = yield OS.File.stat(path);
- do_check_eq(accDate, stat.lastAccessDate.getTime());
- do_check_eq(modDate, stat.lastModificationDate.getTime());
- }
-
- // 2.1 Try to omit modificationDate (which should then default to
- // |Date.now()|, expect for resolution differences).
- {
- yield OS.File.setDates(path, accDate);
- let stat = yield OS.File.stat(path);
- do_check_eq(accDate, stat.lastAccessDate.getTime());
- do_check_neq(modDate, stat.lastModificationDate.getTime());
- }
-
- // 2.2 Try to omit accessDate as well (which should then default to
- // |Date.now()|, expect for resolution differences).
- {
- yield OS.File.setDates(path);
- let stat = yield OS.File.stat(path);
- do_check_neq(accDate, stat.lastAccessDate.getTime());
- do_check_neq(modDate, stat.lastModificationDate.getTime());
- }
-
- // 3. Repeat 1., but with Date objects this time
- {
- yield OS.File.setDates(path, new Date(accDate), new Date(modDate));
- let stat = yield OS.File.stat(path);
- do_check_eq(accDate, stat.lastAccessDate.getTime());
- do_check_eq(modDate, stat.lastModificationDate.getTime());
- }
-
- // 4. Check that invalid params will cause an exception/rejection.
- {
- for (let p of ["invalid", new Uint8Array(1), NaN]) {
- try {
- yield OS.File.setDates(path, p, modDate);
- do_throw("Invalid access date should have thrown for: " + p);
- } catch (ex) {
- let stat = yield OS.File.stat(path);
- do_check_eq(accDate, stat.lastAccessDate.getTime());
- do_check_eq(modDate, stat.lastModificationDate.getTime());
- }
- try {
- yield OS.File.setDates(path, accDate, p);
- do_throw("Invalid modification date should have thrown for: " + p);
- } catch (ex) {
- let stat = yield OS.File.stat(path);
- do_check_eq(accDate, stat.lastAccessDate.getTime());
- do_check_eq(modDate, stat.lastModificationDate.getTime());
- }
- try {
- yield OS.File.setDates(path, p, p);
- do_throw("Invalid dates should have thrown for: " + p);
- } catch (ex) {
- let stat = yield OS.File.stat(path);
- do_check_eq(accDate, stat.lastAccessDate.getTime());
- do_check_eq(modDate, stat.lastModificationDate.getTime());
- }
- }
- }
- } finally {
- // Remove the temp file again
- yield OS.File.remove(path);
- }
-});
-
-// Prototypical tests, operating on |File| handles.
-add_task(function* test_proto() {
- if (OS.Constants.Sys.Name == "Android") {
- do_print("File.prototype.setDates is not implemented for Android");
- do_check_eq(OS.File.prototype.setDates, undefined);
- return;
- }
-
- // First, create a file we can mess with.
- let path = OS.Path.join(OS.Constants.Path.tmpDir,
- "test_osfile_async_setDates_proto.tmp");
- yield OS.File.writeAtomic(path, new Uint8Array(1));
-
- try {
- let fd = yield OS.File.open(path, {write: true});
-
- try {
- // 1. Try to set some well known dates.
- // We choose multiples of 2000ms, because the time stamp resolution of
- // the underlying OS might not support something more precise.
- const accDate = 2000;
- const modDate = 4000;
- {
- yield fd.setDates(accDate, modDate);
- let stat = yield fd.stat();
- do_check_eq(accDate, stat.lastAccessDate.getTime());
- do_check_eq(modDate, stat.lastModificationDate.getTime());
- }
-
- // 2.1 Try to omit modificationDate (which should then default to
- // |Date.now()|, expect for resolution differences).
- {
- yield fd.setDates(accDate);
- let stat = yield fd.stat();
- do_check_eq(accDate, stat.lastAccessDate.getTime());
- do_check_neq(modDate, stat.lastModificationDate.getTime());
- }
-
- // 2.2 Try to omit accessDate as well (which should then default to
- // |Date.now()|, expect for resolution differences).
- {
- yield fd.setDates();
- let stat = yield fd.stat();
- do_check_neq(accDate, stat.lastAccessDate.getTime());
- do_check_neq(modDate, stat.lastModificationDate.getTime());
- }
-
- // 3. Repeat 1., but with Date objects this time
- {
- yield fd.setDates(new Date(accDate), new Date(modDate));
- let stat = yield fd.stat();
- do_check_eq(accDate, stat.lastAccessDate.getTime());
- do_check_eq(modDate, stat.lastModificationDate.getTime());
- }
-
- // 4. Check that invalid params will cause an exception/rejection.
- {
- for (let p of ["invalid", new Uint8Array(1), NaN]) {
- try {
- yield fd.setDates(p, modDate);
- do_throw("Invalid access date should have thrown for: " + p);
- } catch (ex) {
- let stat = yield fd.stat();
- do_check_eq(accDate, stat.lastAccessDate.getTime());
- do_check_eq(modDate, stat.lastModificationDate.getTime());
- }
- try {
- yield fd.setDates(accDate, p);
- do_throw("Invalid modification date should have thrown for: " + p);
- } catch (ex) {
- let stat = yield fd.stat();
- do_check_eq(accDate, stat.lastAccessDate.getTime());
- do_check_eq(modDate, stat.lastModificationDate.getTime());
- }
- try {
- yield fd.setDates(p, p);
- do_throw("Invalid dates should have thrown for: " + p);
- } catch (ex) {
- let stat = yield fd.stat();
- do_check_eq(accDate, stat.lastAccessDate.getTime());
- do_check_eq(modDate, stat.lastModificationDate.getTime());
- }
- }
- }
- } finally {
- yield fd.close();
- }
- } finally {
- // Remove the temp file again
- yield OS.File.remove(path);
- }
-});
-
-// Tests setting dates on directories.
-add_task(function* test_dirs() {
- let path = OS.Path.join(OS.Constants.Path.tmpDir,
- "test_osfile_async_setDates_dir");
- yield OS.File.makeDir(path);
-
- try {
- // 1. Try to set some well known dates.
- // We choose multiples of 2000ms, because the time stamp resolution of
- // the underlying OS might not support something more precise.
- const accDate = 2000;
- const modDate = 4000;
- {
- yield OS.File.setDates(path, accDate, modDate);
- let stat = yield OS.File.stat(path);
- do_check_eq(accDate, stat.lastAccessDate.getTime());
- do_check_eq(modDate, stat.lastModificationDate.getTime());
- }
- } finally {
- yield OS.File.removeEmptyDir(path);
- }
-});
diff --git a/toolkit/components/osfile/tests/xpcshell/test_osfile_async_setPermissions.js b/toolkit/components/osfile/tests/xpcshell/test_osfile_async_setPermissions.js
deleted file mode 100644
index ab8bf7dd9b..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_osfile_async_setPermissions.js
+++ /dev/null
@@ -1,103 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-/**
- * A test to ensure that OS.File.setPermissions and
- * OS.File.prototype.setPermissions are all working correctly.
- * (see bug 1001849)
- * These functions are currently Unix-specific. The manifest skips
- * the test on Windows.
- */
-
-/**
- * Helper function for test logging: prints a POSIX file permission mode as an
- * octal number, with a leading '0' per C (not JS) convention. When the
- * numeric value is 0o777 or lower, it is padded on the left with zeroes to
- * four digits wide.
- * Sample outputs: 0022, 0644, 04755.
- */
-function format_mode(mode) {
- if (mode <= 0o777) {
- return ("0000" + mode.toString(8)).slice(-4);
- } else {
- return "0" + mode.toString(8);
- }
-}
-
-const _umask = OS.Constants.Sys.umask;
-do_print("umask: " + format_mode(_umask));
-
-/**
- * Compute the mode that a file should have after applying the umask,
- * whatever it happens to be.
- */
-function apply_umask(mode) {
- return mode & ~_umask;
-}
-
-// Sequence of setPermission parameters and expected file mode. The first test
-// checks the permissions when the file is first created.
-var testSequence = [
- [null, apply_umask(0o600)],
- [{ unixMode: 0o4777 }, apply_umask(0o4777)],
- [{ unixMode: 0o4777, unixHonorUmask: false }, 0o4777],
- [{ unixMode: 0o4777, unixHonorUmask: true }, apply_umask(0o4777)],
- [undefined, apply_umask(0o600)],
- [{ unixMode: 0o666 }, apply_umask(0o666)],
- [{ unixMode: 0o600 }, apply_umask(0o600)],
- [{ unixMode: 0 }, 0],
- [{}, apply_umask(0o600)],
-];
-
-// Test application to paths.
-add_task(function* test_path_setPermissions() {
- let path = OS.Path.join(OS.Constants.Path.tmpDir,
- "test_osfile_async_setPermissions_path.tmp");
- yield OS.File.writeAtomic(path, new Uint8Array(1));
-
- try {
- for (let [options, expectedMode] of testSequence) {
- if (options !== null) {
- do_print("Setting permissions to " + JSON.stringify(options));
- yield OS.File.setPermissions(path, options);
- }
-
- let stat = yield OS.File.stat(path);
- do_check_eq(format_mode(stat.unixMode), format_mode(expectedMode));
- }
- } finally {
- yield OS.File.remove(path);
- }
-});
-
-// Test application to open files.
-add_task(function* test_file_setPermissions() {
- let path = OS.Path.join(OS.Constants.Path.tmpDir,
- "test_osfile_async_setPermissions_file.tmp");
- yield OS.File.writeAtomic(path, new Uint8Array(1));
-
- try {
- let fd = yield OS.File.open(path, { write: true });
- try {
- for (let [options, expectedMode] of testSequence) {
- if (options !== null) {
- do_print("Setting permissions to " + JSON.stringify(options));
- yield fd.setPermissions(options);
- }
-
- let stat = yield fd.stat();
- do_check_eq(format_mode(stat.unixMode), format_mode(expectedMode));
- }
- } finally {
- yield fd.close();
- }
- } finally {
- yield OS.File.remove(path);
- }
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/osfile/tests/xpcshell/test_osfile_closed.js b/toolkit/components/osfile/tests/xpcshell/test_osfile_closed.js
deleted file mode 100644
index 5740f7f1ad..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_osfile_closed.js
+++ /dev/null
@@ -1,48 +0,0 @@
-"use strict";
-
-Components.utils.import("resource://gre/modules/osfile.jsm");
-Components.utils.import("resource://gre/modules/Task.jsm");
-
-function run_test() {
- do_test_pending();
- run_next_test();
-}
-
-add_task(function test_closed() {
- OS.Shared.DEBUG = true;
- let currentDir = yield OS.File.getCurrentDirectory();
- do_print("Open a file, ensure that we can call stat()");
- let path = OS.Path.join(currentDir, "test_osfile_closed.js");
- let file = yield OS.File.open(path);
- yield file.stat();
- do_check_true(true);
-
- yield file.close();
-
- do_print("Ensure that we cannot stat() on closed file");
- let exn;
- try {
- yield file.stat();
- } catch (ex) {
- exn = ex;
- }
- do_print("Ensure that this raises the correct error");
- do_check_true(!!exn);
- do_check_true(exn instanceof OS.File.Error);
- do_check_true(exn.becauseClosed);
-
- do_print("Ensure that we cannot read() on closed file");
- exn = null;
- try {
- yield file.read();
- } catch (ex) {
- exn = ex;
- }
- do_print("Ensure that this raises the correct error");
- do_check_true(!!exn);
- do_check_true(exn instanceof OS.File.Error);
- do_check_true(exn.becauseClosed);
-
-});
-
-add_task(do_test_finished);
diff --git a/toolkit/components/osfile/tests/xpcshell/test_osfile_error.js b/toolkit/components/osfile/tests/xpcshell/test_osfile_error.js
deleted file mode 100644
index a1c319eca7..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_osfile_error.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-var {OS: {File, Path, Constants}} = Components.utils.import("resource://gre/modules/osfile.jsm", {});
-Components.utils.import("resource://gre/modules/Task.jsm");
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* testFileError_with_writeAtomic() {
- let DEFAULT_CONTENTS = "default contents" + Math.random();
- let path = Path.join(Constants.Path.tmpDir,
- "testFileError.tmp");
- yield File.remove(path);
- yield File.writeAtomic(path, DEFAULT_CONTENTS);
- let exception;
- try {
- yield File.writeAtomic(path, DEFAULT_CONTENTS, { noOverwrite: true });
- } catch (ex) {
- exception = ex;
- }
- do_check_true(exception instanceof File.Error);
- do_check_true(exception.path == path);
-});
-
-add_task(function* testFileError_with_makeDir() {
- let path = Path.join(Constants.Path.tmpDir,
- "directory");
- yield File.removeDir(path);
- yield File.makeDir(path);
- let exception;
- try {
- yield File.makeDir(path, { ignoreExisting: false });
- } catch (ex) {
- exception = ex;
- }
- do_check_true(exception instanceof File.Error);
- do_check_true(exception.path == path);
-});
-
-add_task(function* testFileError_with_move() {
- let DEFAULT_CONTENTS = "default contents" + Math.random();
- let sourcePath = Path.join(Constants.Path.tmpDir,
- "src.tmp");
- let destPath = Path.join(Constants.Path.tmpDir,
- "dest.tmp");
- yield File.remove(sourcePath);
- yield File.remove(destPath);
- yield File.writeAtomic(sourcePath, DEFAULT_CONTENTS);
- yield File.writeAtomic(destPath, DEFAULT_CONTENTS);
- let exception;
- try {
- yield File.move(sourcePath, destPath, { noOverwrite: true });
- } catch (ex) {
- exception = ex;
- }
- do_print(exception);
- do_check_true(exception instanceof File.Error);
- do_check_true(exception.path == sourcePath);
-});
diff --git a/toolkit/components/osfile/tests/xpcshell/test_osfile_kill.js b/toolkit/components/osfile/tests/xpcshell/test_osfile_kill.js
deleted file mode 100644
index e32c37224f..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_osfile_kill.js
+++ /dev/null
@@ -1,100 +0,0 @@
-"use strict";
-
-Components.utils.import("resource://gre/modules/osfile.jsm");
-
-// We want the actual global to get at the internals since Scheduler is not
-// exported.
-var AsyncFrontGlobal = Components.utils.import(
- "resource://gre/modules/osfile/osfile_async_front.jsm",
- null);
-var Scheduler = AsyncFrontGlobal.Scheduler;
-
-/**
- * Verify that Scheduler.kill() interacts with other OS.File requests correctly,
- * and that no requests are lost. This is relevant because on B2G we
- * auto-kill the worker periodically, making it very possible for valid requests
- * to be interleaved with the automatic kill().
- *
- * This test is being created with the fix for Bug 1125989 where `kill` queue
- * management was found to be buggy. It is a glass-box test that explicitly
- * re-creates the observed failure situation; it is not guaranteed to prevent
- * all future regressions. The following is a detailed explanation of the test
- * for your benefit if this test ever breaks or you are wondering what was the
- * point of all this. You might want to skim the code below first.
- *
- * OS.File maintains a `queue` of operations to be performed. This queue is
- * nominally implemented as a chain of promises. Every time a new job is
- * OS.File.push()ed, it effectively becomes the new `queue` promise. (An
- * extra promise is interposed with a rejection handler to avoid the rejection
- * cascading, but that does not matter for our purposes.)
- *
- * The flaw in `kill` was that it would wait for the `queue` to complete before
- * replacing `queue`. As a result, another OS.File operation could use `push`
- * (by way of OS.File.post()) to also use .then() on the same `queue` promise.
- * Accordingly, assuming that promise was not yet resolved (due to a pending
- * OS.File request), when it was resolved, both the task scheduled in `kill`
- * and in `post` would be triggered. Both of those tasks would run until
- * encountering a call to worker.post().
- *
- * Re-creating this race is not entirely trivial because of the large number of
- * promises used by the code causing control flow to repeatedly be deferred. In
- * a slightly simpler world we could run the follwing in the same turn of the
- * event loop and trigger the problem.
- * - any OS.File request
- * - Scheduler.kill()
- * - any OS.File request
- *
- * However, we need the Scheduler.kill task to reach the point where it is
- * waiting on the same `queue` that another task has been scheduled against.
- * Since the `kill` task yields on the `killQueue` promise prior to yielding
- * on `queue`, however, some turns of the event loop are required. Happily,
- * for us, as discussed above, the problem triggers when we have two promises
- * scheduled on the `queue`, so we can just wait to schedule the second OS.File
- * request on the queue. (Note that because of the additional then() added to
- * eat rejections, there is an important difference between the value of
- * `queue` and the value returned by the first OS.File request.)
- */
-add_task(function* test_kill_race() {
- // Ensure the worker has been created and that SET_DEBUG has taken effect.
- // We have chosen OS.File.exists for our tests because it does not trigger
- // a rejection and we absolutely do not care what the operation is other
- // than it does not invoke a native fast-path.
- yield OS.File.exists('foo.foo');
-
- do_print('issuing first request');
- let firstRequest = OS.File.exists('foo.bar');
- let secondRequest;
- let secondResolved = false;
-
- // As noted in our big block comment, we want to wait to schedule the
- // second request so that it races `kill`'s call to `worker.post`. Having
- // ourselves wait on the same promise, `queue`, and registering ourselves
- // before we issue the kill request means we will get run before the `kill`
- // task resumes and allow us to precisely create the desired race.
- Scheduler.queue.then(function() {
- do_print('issuing second request');
- secondRequest = OS.File.exists('foo.baz');
- secondRequest.then(function() {
- secondResolved = true;
- });
- });
-
- do_print('issuing kill request');
- let killRequest = Scheduler.kill({ reset: true, shutdown: false });
-
- // Wait on the killRequest so that we can schedule a new OS.File request
- // after it completes...
- yield killRequest;
- // ...because our ordering guarantee ensures that there is at most one
- // worker (and this usage here should not be vulnerable even with the
- // bug present), so when this completes the secondRequest has either been
- // resolved or lost.
- yield OS.File.exists('foo.goz');
-
- ok(secondResolved,
- 'The second request was resolved so we avoided the bug. Victory!');
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/osfile/tests/xpcshell/test_osfile_win_async_setPermissions.js b/toolkit/components/osfile/tests/xpcshell/test_osfile_win_async_setPermissions.js
deleted file mode 100644
index 990d722f5c..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_osfile_win_async_setPermissions.js
+++ /dev/null
@@ -1,114 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-/**
- * A test to ensure that OS.File.setPermissions and
- * OS.File.prototype.setPermissions are all working correctly.
- * (see bug 1022816)
- * The manifest tests on Windows.
- */
-
-// Sequence of setPermission parameters.
-var testSequence = [
- [ { winAttributes: { readOnly: true, system: true, hidden: true } },
- { readOnly: true, system: true, hidden: true } ],
- [ { winAttributes: { readOnly: false } },
- { readOnly: false, system: true, hidden: true } ],
- [ { winAttributes: { system: false } },
- { readOnly: false, system: false, hidden: true } ],
- [ { winAttributes: { hidden: false } },
- { readOnly: false, system: false, hidden: false } ],
- [ { winAttributes: {readOnly: true, system: false, hidden: false} },
- { readOnly: true, system: false, hidden: false } ],
- [ { winAttributes: {readOnly: false, system: true, hidden: false} },
- { readOnly: false, system: true, hidden: false } ],
- [ { winAttributes: {readOnly: false, system: false, hidden: true} },
- { readOnly: false, system: false, hidden: true } ],
-];
-
-// Test application to paths.
-add_task(function* test_path_setPermissions() {
- let path = OS.Path.join(OS.Constants.Path.tmpDir,
- "test_osfile_win_async_setPermissions_path.tmp");
- yield OS.File.writeAtomic(path, new Uint8Array(1));
-
- try {
- for (let [options, attributesExpected] of testSequence) {
- if (options !== null) {
- do_print("Setting permissions to " + JSON.stringify(options));
- yield OS.File.setPermissions(path, options);
- }
-
- let stat = yield OS.File.stat(path);
- do_print("Got stat winAttributes: " + JSON.stringify(stat.winAttributes));
-
- do_check_eq(stat.winAttributes.readOnly, attributesExpected.readOnly);
- do_check_eq(stat.winAttributes.system, attributesExpected.system);
- do_check_eq(stat.winAttributes.hidden, attributesExpected.hidden);
-
- }
- } finally {
- yield OS.File.remove(path);
- }
-});
-
-// Test application to open files.
-add_task(function* test_file_setPermissions() {
- let path = OS.Path.join(OS.Constants.Path.tmpDir,
- "test_osfile_win_async_setPermissions_file.tmp");
- yield OS.File.writeAtomic(path, new Uint8Array(1));
-
- try {
- let fd = yield OS.File.open(path, { write: true });
- try {
- for (let [options, attributesExpected] of testSequence) {
- if (options !== null) {
- do_print("Setting permissions to " + JSON.stringify(options));
- yield fd.setPermissions(options);
- }
-
- let stat = yield fd.stat();
- do_print("Got stat winAttributes: " + JSON.stringify(stat.winAttributes));
- do_check_eq(stat.winAttributes.readOnly, attributesExpected.readOnly);
- do_check_eq(stat.winAttributes.system, attributesExpected.system);
- do_check_eq(stat.winAttributes.hidden, attributesExpected.hidden);
- }
- } finally {
- yield fd.close();
- }
- } finally {
- yield OS.File.remove(path);
- }
-});
-
-// Test application to Check setPermissions on a non-existant file path.
-add_task(function* test_non_existant_file_path_setPermissions() {
- let path = OS.Path.join(OS.Constants.Path.tmpDir,
- "test_osfile_win_async_setPermissions_path.tmp");
- Assert.rejects(OS.File.setPermissions(path, {winAttributes: {readOnly: true}}),
- /The system cannot find the file specified/,
- "setPermissions failed as expected on a non-existant file path");
-});
-
-// Test application to Check setPermissions on a invalid file handle.
-add_task(function* test_closed_file_handle_setPermissions() {
- let path = OS.Path.join(OS.Constants.Path.tmpDir,
- "test_osfile_win_async_setPermissions_path.tmp");
- yield OS.File.writeAtomic(path, new Uint8Array(1));
-
- try {
- let fd = yield OS.File.open(path, { write: true });
- yield fd.close();
- Assert.rejects(fd.setPermissions(path, {winAttributes: {readOnly: true}}),
- /The handle is invalid/,
- "setPermissions failed as expected on a invalid file handle");
- } finally {
- yield OS.File.remove(path);
- }
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/osfile/tests/xpcshell/test_osfile_writeAtomic_backupTo_option.js b/toolkit/components/osfile/tests/xpcshell/test_osfile_writeAtomic_backupTo_option.js
deleted file mode 100644
index adf345b0c6..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_osfile_writeAtomic_backupTo_option.js
+++ /dev/null
@@ -1,143 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-var {OS: {File, Path, Constants}} = Components.utils.import("resource://gre/modules/osfile.jsm", {});
-Components.utils.import("resource://gre/modules/Task.jsm");
-
-/**
- * Remove all temporary files and back up files, including
- * test_backupTo_option_with_tmpPath.tmp
- * test_backupTo_option_with_tmpPath.tmp.backup
- * test_backupTo_option_without_tmpPath.tmp
- * test_backupTo_option_without_tmpPath.tmp.backup
- * test_non_backupTo_option.tmp
- * test_non_backupTo_option.tmp.backup
- * test_backupTo_option_without_destination_file.tmp
- * test_backupTo_option_without_destination_file.tmp.backup
- * test_backupTo_option_with_backup_file.tmp
- * test_backupTo_option_with_backup_file.tmp.backup
- */
-function clearFiles() {
- return Task.spawn(function () {
- let files = ["test_backupTo_option_with_tmpPath.tmp",
- "test_backupTo_option_without_tmpPath.tmp",
- "test_non_backupTo_option.tmp",
- "test_backupTo_option_without_destination_file.tmp",
- "test_backupTo_option_with_backup_file.tmp"];
- for (let file of files) {
- let path = Path.join(Constants.Path.tmpDir, file);
- yield File.remove(path);
- yield File.remove(path + ".backup");
- }
- });
-}
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* init() {
- yield clearFiles();
-});
-
-/**
- * test when
- * |backupTo| specified
- * |tmpPath| specified
- * destination file exists
- * @result destination file will be backed up
- */
-add_task(function* test_backupTo_option_with_tmpPath() {
- let DEFAULT_CONTENTS = "default contents" + Math.random();
- let WRITE_CONTENTS = "abc" + Math.random();
- let path = Path.join(Constants.Path.tmpDir,
- "test_backupTo_option_with_tmpPath.tmp");
- yield File.writeAtomic(path, DEFAULT_CONTENTS);
- yield File.writeAtomic(path, WRITE_CONTENTS, { tmpPath: path + ".tmp",
- backupTo: path + ".backup" });
- do_check_true((yield File.exists(path + ".backup")));
- let contents = yield File.read(path + ".backup");
- do_check_eq(DEFAULT_CONTENTS, (new TextDecoder()).decode(contents));
-});
-
-/**
- * test when
- * |backupTo| specified
- * |tmpPath| not specified
- * destination file exists
- * @result destination file will be backed up
- */
-add_task(function* test_backupTo_option_without_tmpPath() {
- let DEFAULT_CONTENTS = "default contents" + Math.random();
- let WRITE_CONTENTS = "abc" + Math.random();
- let path = Path.join(Constants.Path.tmpDir,
- "test_backupTo_option_without_tmpPath.tmp");
- yield File.writeAtomic(path, DEFAULT_CONTENTS);
- yield File.writeAtomic(path, WRITE_CONTENTS, { backupTo: path + ".backup" });
- do_check_true((yield File.exists(path + ".backup")));
- let contents = yield File.read(path + ".backup");
- do_check_eq(DEFAULT_CONTENTS, (new TextDecoder()).decode(contents));
-});
-
-/**
- * test when
- * |backupTo| not specified
- * |tmpPath| not specified
- * destination file exists
- * @result destination file will not be backed up
- */
-add_task(function* test_non_backupTo_option() {
- let DEFAULT_CONTENTS = "default contents" + Math.random();
- let WRITE_CONTENTS = "abc" + Math.random();
- let path = Path.join(Constants.Path.tmpDir,
- "test_non_backupTo_option.tmp");
- yield File.writeAtomic(path, DEFAULT_CONTENTS);
- yield File.writeAtomic(path, WRITE_CONTENTS);
- do_check_false((yield File.exists(path + ".backup")));
-});
-
-/**
- * test when
- * |backupTo| specified
- * |tmpPath| not specified
- * destination file not exists
- * @result no back up file exists
- */
-add_task(function* test_backupTo_option_without_destination_file() {
- let DEFAULT_CONTENTS = "default contents" + Math.random();
- let WRITE_CONTENTS = "abc" + Math.random();
- let path = Path.join(Constants.Path.tmpDir,
- "test_backupTo_option_without_destination_file.tmp");
- yield File.remove(path);
- yield File.writeAtomic(path, WRITE_CONTENTS, { backupTo: path + ".backup" });
- do_check_false((yield File.exists(path + ".backup")));
-});
-
-/**
- * test when
- * |backupTo| specified
- * |tmpPath| not specified
- * backup file exists
- * destination file exists
- * @result destination file will be backed up
- */
-add_task(function* test_backupTo_option_with_backup_file() {
- let DEFAULT_CONTENTS = "default contents" + Math.random();
- let WRITE_CONTENTS = "abc" + Math.random();
- let path = Path.join(Constants.Path.tmpDir,
- "test_backupTo_option_with_backup_file.tmp");
- yield File.writeAtomic(path, DEFAULT_CONTENTS);
-
- yield File.writeAtomic(path + ".backup", new Uint8Array(1000));
-
- yield File.writeAtomic(path, WRITE_CONTENTS, { backupTo: path + ".backup" });
- do_check_true((yield File.exists(path + ".backup")));
- let contents = yield File.read(path + ".backup");
- do_check_eq(DEFAULT_CONTENTS, (new TextDecoder()).decode(contents));
-});
-
-add_task(function* cleanup() {
- yield clearFiles();
-});
diff --git a/toolkit/components/osfile/tests/xpcshell/test_osfile_writeAtomic_zerobytes.js b/toolkit/components/osfile/tests/xpcshell/test_osfile_writeAtomic_zerobytes.js
deleted file mode 100644
index a32a690e6f..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_osfile_writeAtomic_zerobytes.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-var SHARED_PATH;
-
-add_task(function* init() {
- do_get_profile();
- SHARED_PATH = OS.Path.join(OS.Constants.Path.profileDir, "test_osfile_write_zerobytes.tmp");
-});
-
-add_test_pair(function* test_osfile_writeAtomic_zerobytes() {
- let encoder = new TextEncoder();
- let string1 = "";
- let outbin = encoder.encode(string1);
- yield OS.File.writeAtomic(SHARED_PATH, outbin);
-
- let decoder = new TextDecoder();
- let bin = yield OS.File.read(SHARED_PATH);
- let string2 = decoder.decode(bin);
- // Checking if writeAtomic supports writing encoded zero-byte strings
- Assert.equal(string2, string1, "Read the expected (empty) string.");
-});
-
-function run_test() {
- run_next_test();
-} \ No newline at end of file
diff --git a/toolkit/components/osfile/tests/xpcshell/test_path.js b/toolkit/components/osfile/tests/xpcshell/test_path.js
deleted file mode 100644
index 76a507ee38..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_path.js
+++ /dev/null
@@ -1,159 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-Components.utils.import("resource://gre/modules/Services.jsm", this);
-Services.prefs.setBoolPref("toolkit.osfile.test.syslib_necessary", false);
- // We don't need libc/kernel32.dll for this test
-
-var ImportWin = {};
-var ImportUnix = {};
-Components.utils.import("resource://gre/modules/osfile/ospath_win.jsm", ImportWin);
-Components.utils.import("resource://gre/modules/osfile/ospath_unix.jsm", ImportUnix);
-
-var Win = ImportWin;
-var Unix = ImportUnix;
-
-function do_check_fail(f)
-{
- try {
- let result = f();
- do_print("Failed do_check_fail: " + result);
- do_check_true(false);
- } catch (ex) {
- do_check_true(true);
- }
-};
-
-function run_test()
-{
- do_print("Testing Windows paths");
-
- do_print("Backslash-separated, no drive");
- do_check_eq(Win.basename("a\\b"), "b");
- do_check_eq(Win.basename("a\\b\\"), "");
- do_check_eq(Win.basename("abc"), "abc");
- do_check_eq(Win.dirname("a\\b"), "a");
- do_check_eq(Win.dirname("a\\b\\"), "a\\b");
- do_check_eq(Win.dirname("a\\\\\\\\b"), "a");
- do_check_eq(Win.dirname("abc"), ".");
- do_check_eq(Win.normalize("\\a\\b\\c"), "\\a\\b\\c");
- do_check_eq(Win.normalize("\\a\\b\\\\\\\\c"), "\\a\\b\\c");
- do_check_eq(Win.normalize("\\a\\b\\c\\\\\\"), "\\a\\b\\c");
- do_check_eq(Win.normalize("\\a\\b\\c\\..\\..\\..\\d\\e\\f"), "\\d\\e\\f");
- do_check_eq(Win.normalize("a\\b\\c\\..\\..\\..\\d\\e\\f"), "d\\e\\f");
- do_check_fail(() => Win.normalize("\\a\\b\\c\\..\\..\\..\\..\\d\\e\\f"));
-
- do_check_eq(Win.join("\\tmp", "foo", "bar"), "\\tmp\\foo\\bar", "join \\tmp,foo,bar");
- do_check_eq(Win.join("\\tmp", "\\foo", "bar"), "\\foo\\bar", "join \\tmp,\\foo,bar");
- do_check_eq(Win.winGetDrive("\\tmp"), null);
- do_check_eq(Win.winGetDrive("\\tmp\\a\\b\\c\\d\\e"), null);
- do_check_eq(Win.winGetDrive("\\"), null);
-
-
- do_print("Backslash-separated, with a drive");
- do_check_eq(Win.basename("c:a\\b"), "b");
- do_check_eq(Win.basename("c:a\\b\\"), "");
- do_check_eq(Win.basename("c:abc"), "abc");
- do_check_eq(Win.dirname("c:a\\b"), "c:a");
- do_check_eq(Win.dirname("c:a\\b\\"), "c:a\\b");
- do_check_eq(Win.dirname("c:a\\\\\\\\b"), "c:a");
- do_check_eq(Win.dirname("c:abc"), "c:");
- let options = {
- winNoDrive: true
- };
- do_check_eq(Win.dirname("c:a\\b", options), "a");
- do_check_eq(Win.dirname("c:a\\b\\", options), "a\\b");
- do_check_eq(Win.dirname("c:a\\\\\\\\b", options), "a");
- do_check_eq(Win.dirname("c:abc", options), ".");
- do_check_eq(Win.join("c:", "abc"), "c:\\abc", "join c:,abc");
-
- do_check_eq(Win.normalize("c:"), "c:\\");
- do_check_eq(Win.normalize("c:\\"), "c:\\");
- do_check_eq(Win.normalize("c:\\a\\b\\c"), "c:\\a\\b\\c");
- do_check_eq(Win.normalize("c:\\a\\b\\\\\\\\c"), "c:\\a\\b\\c");
- do_check_eq(Win.normalize("c:\\\\\\\\a\\b\\c"), "c:\\a\\b\\c");
- do_check_eq(Win.normalize("c:\\a\\b\\c\\\\\\"), "c:\\a\\b\\c");
- do_check_eq(Win.normalize("c:\\a\\b\\c\\..\\..\\..\\d\\e\\f"), "c:\\d\\e\\f");
- do_check_eq(Win.normalize("c:a\\b\\c\\..\\..\\..\\d\\e\\f"), "c:\\d\\e\\f");
- do_check_fail(() => Win.normalize("c:\\a\\b\\c\\..\\..\\..\\..\\d\\e\\f"));
-
- do_check_eq(Win.join("c:\\", "foo"), "c:\\foo", "join c:\,foo");
- do_check_eq(Win.join("c:\\tmp", "foo", "bar"), "c:\\tmp\\foo\\bar", "join c:\\tmp,foo,bar");
- do_check_eq(Win.join("c:\\tmp", "\\foo", "bar"), "c:\\foo\\bar", "join c:\\tmp,\\foo,bar");
- do_check_eq(Win.join("c:\\tmp", "c:\\foo", "bar"), "c:\\foo\\bar", "join c:\\tmp,c:\\foo,bar");
- do_check_eq(Win.join("c:\\tmp", "c:foo", "bar"), "c:\\foo\\bar", "join c:\\tmp,c:foo,bar");
- do_check_eq(Win.winGetDrive("c:"), "c:");
- do_check_eq(Win.winGetDrive("c:\\"), "c:");
- do_check_eq(Win.winGetDrive("c:abc"), "c:");
- do_check_eq(Win.winGetDrive("c:abc\\d\\e\\f\\g"), "c:");
- do_check_eq(Win.winGetDrive("c:\\abc"), "c:");
- do_check_eq(Win.winGetDrive("c:\\abc\\d\\e\\f\\g"), "c:");
-
- do_print("Forwardslash-separated, no drive");
- do_check_eq(Win.normalize("/a/b/c"), "\\a\\b\\c");
- do_check_eq(Win.normalize("/a/b////c"), "\\a\\b\\c");
- do_check_eq(Win.normalize("/a/b/c///"), "\\a\\b\\c");
- do_check_eq(Win.normalize("/a/b/c/../../../d/e/f"), "\\d\\e\\f");
- do_check_eq(Win.normalize("a/b/c/../../../d/e/f"), "d\\e\\f");
-
- do_print("Forwardslash-separated, with a drive");
- do_check_eq(Win.normalize("c:/"), "c:\\");
- do_check_eq(Win.normalize("c:/a/b/c"), "c:\\a\\b\\c");
- do_check_eq(Win.normalize("c:/a/b////c"), "c:\\a\\b\\c");
- do_check_eq(Win.normalize("c:////a/b/c"), "c:\\a\\b\\c");
- do_check_eq(Win.normalize("c:/a/b/c///"), "c:\\a\\b\\c");
- do_check_eq(Win.normalize("c:/a/b/c/../../../d/e/f"), "c:\\d\\e\\f");
- do_check_eq(Win.normalize("c:a/b/c/../../../d/e/f"), "c:\\d\\e\\f");
-
- do_print("Backslash-separated, UNC-style");
- do_check_eq(Win.basename("\\\\a\\b"), "b");
- do_check_eq(Win.basename("\\\\a\\b\\"), "");
- do_check_eq(Win.basename("\\\\abc"), "");
- do_check_eq(Win.dirname("\\\\a\\b"), "\\\\a");
- do_check_eq(Win.dirname("\\\\a\\b\\"), "\\\\a\\b");
- do_check_eq(Win.dirname("\\\\a\\\\\\\\b"), "\\\\a");
- do_check_eq(Win.dirname("\\\\abc"), "\\\\abc");
- do_check_eq(Win.normalize("\\\\a\\b\\c"), "\\\\a\\b\\c");
- do_check_eq(Win.normalize("\\\\a\\b\\\\\\\\c"), "\\\\a\\b\\c");
- do_check_eq(Win.normalize("\\\\a\\b\\c\\\\\\"), "\\\\a\\b\\c");
- do_check_eq(Win.normalize("\\\\a\\b\\c\\..\\..\\d\\e\\f"), "\\\\a\\d\\e\\f");
- do_check_fail(() => Win.normalize("\\\\a\\b\\c\\..\\..\\..\\d\\e\\f"));
-
- do_check_eq(Win.join("\\\\a\\tmp", "foo", "bar"), "\\\\a\\tmp\\foo\\bar");
- do_check_eq(Win.join("\\\\a\\tmp", "\\foo", "bar"), "\\\\a\\foo\\bar");
- do_check_eq(Win.join("\\\\a\\tmp", "\\\\foo\\", "bar"), "\\\\foo\\bar");
- do_check_eq(Win.winGetDrive("\\\\"), null);
- do_check_eq(Win.winGetDrive("\\\\c"), "\\\\c");
- do_check_eq(Win.winGetDrive("\\\\c\\abc"), "\\\\c");
-
- do_print("Testing unix paths");
- do_check_eq(Unix.basename("a/b"), "b");
- do_check_eq(Unix.basename("a/b/"), "");
- do_check_eq(Unix.basename("abc"), "abc");
- do_check_eq(Unix.dirname("a/b"), "a");
- do_check_eq(Unix.dirname("a/b/"), "a/b");
- do_check_eq(Unix.dirname("a////b"), "a");
- do_check_eq(Unix.dirname("abc"), ".");
- do_check_eq(Unix.normalize("/a/b/c"), "/a/b/c");
- do_check_eq(Unix.normalize("/a/b////c"), "/a/b/c");
- do_check_eq(Unix.normalize("////a/b/c"), "/a/b/c");
- do_check_eq(Unix.normalize("/a/b/c///"), "/a/b/c");
- do_check_eq(Unix.normalize("/a/b/c/../../../d/e/f"), "/d/e/f");
- do_check_eq(Unix.normalize("a/b/c/../../../d/e/f"), "d/e/f");
- do_check_fail(() => Unix.normalize("/a/b/c/../../../../d/e/f"));
-
- do_check_eq(Unix.join("/tmp", "foo", "bar"), "/tmp/foo/bar", "join /tmp,foo,bar");
- do_check_eq(Unix.join("/tmp", "/foo", "bar"), "/foo/bar", "join /tmp,/foo,bar");
-
- do_print("Testing the presence of ospath.jsm");
- let Scope = {};
- try {
- Components.utils.import("resource://gre/modules/osfile/ospath.jsm", Scope);
- } catch (ex) {
- // Can't load ospath
- }
- do_check_true(!!Scope.basename);
-}
diff --git a/toolkit/components/osfile/tests/xpcshell/test_path_constants.js b/toolkit/components/osfile/tests/xpcshell/test_path_constants.js
deleted file mode 100644
index 9b9868bb29..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_path_constants.js
+++ /dev/null
@@ -1,83 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-Cu.import("resource://gre/modules/ctypes.jsm", this);
-Cu.import("resource://testing-common/AppData.jsm", this);
-
-
-function run_test() {
- run_next_test();
-}
-
-function compare_paths(ospath, key) {
- let file;
- try {
- file = Services.dirsvc.get(key, Components.interfaces.nsIFile);
- } catch(ex) {}
-
- if (file) {
- do_check_true(!!ospath);
- do_check_eq(ospath, file.path);
- } else {
- do_print("WARNING: " + key + " is not defined. Test may not be testing anything!");
- do_check_false(!!ospath);
- }
-}
-
-// Some path constants aren't set up until the profile is available. This
-// test verifies that behavior.
-add_task(function* test_before_after_profile() {
- do_check_null(OS.Constants.Path.profileDir);
- do_check_null(OS.Constants.Path.localProfileDir);
- do_check_null(OS.Constants.Path.userApplicationDataDir);
-
- do_get_profile();
- do_check_true(!!OS.Constants.Path.profileDir);
- do_check_true(!!OS.Constants.Path.localProfileDir);
-
- // UAppData is still null because the xpcshell profile doesn't set it up.
- // This test is mostly here to fail in case behavior of do_get_profile() ever
- // changes. We want to know if our assumptions no longer hold!
- do_check_null(OS.Constants.Path.userApplicationDataDir);
-
- yield makeFakeAppDir();
- do_check_true(!!OS.Constants.Path.userApplicationDataDir);
-
- // FUTURE: verify AppData too (bug 964291).
-});
-
-// Test simple paths
-add_task(function* test_simple_paths() {
- do_check_true(!!OS.Constants.Path.tmpDir);
- compare_paths(OS.Constants.Path.tmpDir, "TmpD");
-
-});
-
-// Test presence of paths that only exist on Desktop platforms
-add_task(function* test_desktop_paths() {
- if (OS.Constants.Sys.Name == "Android") {
- return;
- }
- do_check_true(!!OS.Constants.Path.desktopDir);
- do_check_true(!!OS.Constants.Path.homeDir);
-
- compare_paths(OS.Constants.Path.homeDir, "Home");
- compare_paths(OS.Constants.Path.desktopDir, "Desk");
- compare_paths(OS.Constants.Path.userApplicationDataDir, "UAppData");
-
- compare_paths(OS.Constants.Path.winAppDataDir, "AppData");
- compare_paths(OS.Constants.Path.winStartMenuProgsDir, "Progs");
-
- compare_paths(OS.Constants.Path.macUserLibDir, "ULibDir");
- compare_paths(OS.Constants.Path.macLocalApplicationsDir, "LocApp");
- compare_paths(OS.Constants.Path.macTrashDir, "Trsh");
-});
-
-// Open libxul
-add_task(function* test_libxul() {
- ctypes.open(OS.Constants.Path.libxul);
- do_print("Linked to libxul");
-});
diff --git a/toolkit/components/osfile/tests/xpcshell/test_queue.js b/toolkit/components/osfile/tests/xpcshell/test_queue.js
deleted file mode 100644
index c9d23eabc4..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_queue.js
+++ /dev/null
@@ -1,38 +0,0 @@
-"use strict";
-
-Components.utils.import("resource://gre/modules/osfile.jsm");
-
-function run_test() {
- run_next_test();
-}
-
-// Check if Scheduler.queue returned by OS.File.queue is resolved initially.
-add_task(function* check_init() {
- yield OS.File.queue;
- do_print("Function resolved");
-});
-
-// Check if Scheduler.queue returned by OS.File.queue is resolved
-// after an operation is successful.
-add_task(function* check_success() {
- do_print("Attempting to open a file correctly");
- let openedFile = yield OS.File.open(OS.Path.join(do_get_cwd().path, "test_queue.js"));
- do_print("File opened correctly");
- yield OS.File.queue;
- do_print("Function resolved");
-});
-
-// Check if Scheduler.queue returned by OS.File.queue is resolved
-// after an operation fails.
-add_task(function* check_failure() {
- let exception;
- try {
- do_print("Attempting to open a non existing file");
- yield OS.File.open(OS.Path.join(".", "Bigfoot"));
- } catch (err) {
- exception = err;
- yield OS.File.queue;
- }
- do_check_true(exception!=null);
- do_print("Function resolved");
-}); \ No newline at end of file
diff --git a/toolkit/components/osfile/tests/xpcshell/test_read_write.js b/toolkit/components/osfile/tests/xpcshell/test_read_write.js
deleted file mode 100644
index 00235ed8c5..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_read_write.js
+++ /dev/null
@@ -1,103 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-var {utils: Cu} = Components;
-
-var SHARED_PATH;
-
-var EXISTING_FILE = do_get_file("xpcshell.ini").path;
-
-add_task(function* init() {
- do_get_profile();
- SHARED_PATH = OS.Path.join(OS.Constants.Path.profileDir, "test_osfile_read.tmp");
-});
-
-
-// Check that OS.File.read() is executed after the previous operation
-add_test_pair(function* ordering() {
- let string1 = "Initial state " + Math.random();
- let string2 = "After writing " + Math.random();
- yield OS.File.writeAtomic(SHARED_PATH, string1);
- OS.File.writeAtomic(SHARED_PATH, string2);
- let string3 = yield OS.File.read(SHARED_PATH, { encoding: "utf-8" });
- do_check_eq(string3, string2);
-});
-
-add_test_pair(function* read_write_all() {
- let DEST_PATH = SHARED_PATH + Math.random();
- let TMP_PATH = DEST_PATH + ".tmp";
-
- let test_with_options = function(options, suffix) {
- return Task.spawn(function*() {
- do_print("Running test read_write_all with options " + JSON.stringify(options));
- let TEST = "read_write_all " + suffix;
-
- let optionsBackup = JSON.parse(JSON.stringify(options));
-
- // Check that read + writeAtomic performs a correct copy
- let currentDir = yield OS.File.getCurrentDirectory();
- let pathSource = OS.Path.join(currentDir, EXISTING_FILE);
- let contents = yield OS.File.read(pathSource);
- do_check_true(!!contents); // Content is not empty
- let bytesRead = contents.byteLength;
-
- let bytesWritten = yield OS.File.writeAtomic(DEST_PATH, contents, options);
- do_check_eq(bytesRead, bytesWritten); // Correct number of bytes written
-
- // Check that options are not altered
- do_check_eq(JSON.stringify(options), JSON.stringify(optionsBackup));
- yield reference_compare_files(pathSource, DEST_PATH, TEST);
-
- // Check that temporary file was removed or never created exist
- do_check_false(new FileUtils.File(TMP_PATH).exists());
-
- // Check that writeAtomic fails if noOverwrite is true and the destination
- // file already exists!
- contents = new Uint8Array(300);
- let view = new Uint8Array(contents.buffer, 10, 200);
- try {
- let opt = JSON.parse(JSON.stringify(options));
- opt.noOverwrite = true;
- yield OS.File.writeAtomic(DEST_PATH, view, opt);
- do_throw("With noOverwrite, writeAtomic should have refused to overwrite file (" + suffix + ")");
- } catch (err if err instanceof OS.File.Error && err.becauseExists) {
- do_print("With noOverwrite, writeAtomic correctly failed (" + suffix + ")");
- }
- yield reference_compare_files(pathSource, DEST_PATH, TEST);
-
- // Check that temporary file was removed or never created
- do_check_false(new FileUtils.File(TMP_PATH).exists());
-
- // Now write a subset
- let START = 10;
- let LENGTH = 100;
- contents = new Uint8Array(300);
- for (var i = 0; i < contents.byteLength; i++)
- contents[i] = i % 256;
- view = new Uint8Array(contents.buffer, START, LENGTH);
- bytesWritten = yield OS.File.writeAtomic(DEST_PATH, view, options);
- do_check_eq(bytesWritten, LENGTH);
-
- let array2 = yield OS.File.read(DEST_PATH);
- do_check_eq(LENGTH, array2.length);
- for (var i = 0; i < LENGTH; i++)
- do_check_eq(array2[i], (i + START) % 256);
-
- // Cleanup.
- yield OS.File.remove(DEST_PATH);
- yield OS.File.remove(TMP_PATH);
- });
- };
-
- yield test_with_options({tmpPath: TMP_PATH}, "Renaming, not flushing");
- yield test_with_options({tmpPath: TMP_PATH, flush: true}, "Renaming, flushing");
- yield test_with_options({}, "Not renaming, not flushing");
- yield test_with_options({flush: true}, "Not renaming, flushing");
-});
-
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/osfile/tests/xpcshell/test_remove.js b/toolkit/components/osfile/tests/xpcshell/test_remove.js
deleted file mode 100644
index c8dc330545..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_remove.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-Components.utils.import("resource://gre/modules/osfile.jsm");
-Components.utils.import("resource://gre/modules/Task.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-do_register_cleanup(function() {
- Services.prefs.setBoolPref("toolkit.osfile.log", false);
-});
-
-function run_test() {
- Services.prefs.setBoolPref("toolkit.osfile.log", true);
- run_next_test();
-}
-
-add_task(function* test_ignoreAbsent() {
- let absent_file_name = "test_osfile_front_absent.tmp";
-
- // Removing absent files should throw if "ignoreAbsent" is true.
- yield Assert.rejects(OS.File.remove(absent_file_name, {ignoreAbsent: false}),
- "OS.File.remove throws if there is no such file.");
-
- // Removing absent files should not throw if "ignoreAbsent" is true or not
- // defined.
- let exception = null;
- try {
- yield OS.File.remove(absent_file_name, {ignoreAbsent: true});
- yield OS.File.remove(absent_file_name);
- } catch (ex) {
- exception = ex;
- }
- Assert.ok(!exception, "OS.File.remove should not throw when not requested.");
-});
-
-add_task(function* test_ignoreAbsent_directory_missing() {
- let absent_file_name = OS.Path.join("absent_parent", "test.tmp");
-
- // Removing absent files should throw if "ignoreAbsent" is true.
- yield Assert.rejects(OS.File.remove(absent_file_name, {ignoreAbsent: false}),
- "OS.File.remove throws if there is no such file.");
-
- // Removing files from absent directories should not throw if "ignoreAbsent"
- // is true or not defined.
- let exception = null;
- try {
- yield OS.File.remove(absent_file_name, {ignoreAbsent: true});
- yield OS.File.remove(absent_file_name);
- } catch (ex) {
- exception = ex;
- }
- Assert.ok(!exception, "OS.File.remove should not throw when not requested.");
-});
diff --git a/toolkit/components/osfile/tests/xpcshell/test_removeDir.js b/toolkit/components/osfile/tests/xpcshell/test_removeDir.js
deleted file mode 100644
index 41ad0eb8ce..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_removeDir.js
+++ /dev/null
@@ -1,177 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-Components.utils.import("resource://gre/modules/osfile.jsm");
-Components.utils.import("resource://gre/modules/Task.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-do_register_cleanup(function() {
- Services.prefs.setBoolPref("toolkit.osfile.log", false);
-});
-
-function run_test() {
- Services.prefs.setBoolPref("toolkit.osfile.log", true);
-
- run_next_test();
-}
-
-add_task(function() {
- // Set up profile. We create the directory in the profile, because the profile
- // is removed after every test run.
- do_get_profile();
-
- let file = OS.Path.join(OS.Constants.Path.profileDir, "file");
- let dir = OS.Path.join(OS.Constants.Path.profileDir, "directory");
- let file1 = OS.Path.join(dir, "file1");
- let file2 = OS.Path.join(dir, "file2");
- let subDir = OS.Path.join(dir, "subdir");
- let fileInSubDir = OS.Path.join(subDir, "file");
-
- // Sanity checking for the test
- do_check_false((yield OS.File.exists(dir)));
-
- // Remove non-existent directory
- let exception = null;
- try {
- yield OS.File.removeDir(dir, {ignoreAbsent: false});
- } catch (ex) {
- exception = ex;
- }
-
- do_check_true(!!exception);
- do_check_true(exception instanceof OS.File.Error);
-
- // Remove non-existent directory with ignoreAbsent
- yield OS.File.removeDir(dir, {ignoreAbsent: true});
- yield OS.File.removeDir(dir);
-
- // Remove file with ignoreAbsent: false
- yield OS.File.writeAtomic(file, "content", { tmpPath: file + ".tmp" });
- exception = null;
- try {
- yield OS.File.removeDir(file, {ignoreAbsent: false});
- } catch (ex) {
- exception = ex;
- }
-
- do_check_true(!!exception);
- do_check_true(exception instanceof OS.File.Error);
-
- // Remove empty directory
- yield OS.File.makeDir(dir);
- yield OS.File.removeDir(dir);
- do_check_false((yield OS.File.exists(dir)));
-
- // Remove directory that contains one file
- yield OS.File.makeDir(dir);
- yield OS.File.writeAtomic(file1, "content", { tmpPath: file1 + ".tmp" });
- yield OS.File.removeDir(dir);
- do_check_false((yield OS.File.exists(dir)));
-
- // Remove directory that contains multiple files
- yield OS.File.makeDir(dir);
- yield OS.File.writeAtomic(file1, "content", { tmpPath: file1 + ".tmp" });
- yield OS.File.writeAtomic(file2, "content", { tmpPath: file2 + ".tmp" });
- yield OS.File.removeDir(dir);
- do_check_false((yield OS.File.exists(dir)));
-
- // Remove directory that contains a file and a directory
- yield OS.File.makeDir(dir);
- yield OS.File.writeAtomic(file1, "content", { tmpPath: file1 + ".tmp" });
- yield OS.File.makeDir(subDir);
- yield OS.File.writeAtomic(fileInSubDir, "content", { tmpPath: fileInSubDir + ".tmp" });
- yield OS.File.removeDir(dir);
- do_check_false((yield OS.File.exists(dir)));
-});
-
-add_task(function* test_unix_symlink() {
- // Windows does not implement OS.File.unixSymLink()
- if (OS.Constants.Win) {
- return;
- }
-
- // Android / B2G file systems typically don't support symlinks.
- if (OS.Constants.Sys.Name == "Android") {
- return;
- }
-
- let file = OS.Path.join(OS.Constants.Path.profileDir, "file");
- let dir = OS.Path.join(OS.Constants.Path.profileDir, "directory");
- let file1 = OS.Path.join(dir, "file1");
-
- // This test will create the following directory structure:
- // <profileDir>/file (regular file)
- // <profileDir>/file.link => file (symlink)
- // <profileDir>/directory (directory)
- // <profileDir>/linkdir => directory (directory)
- // <profileDir>/directory/file1 (regular file)
- // <profileDir>/directory3 (directory)
- // <profileDir>/directory3/file3 (directory)
- // <profileDir>/directory/link2 => ../directory3 (regular file)
-
- // Sanity checking for the test
- do_check_false((yield OS.File.exists(dir)));
-
- yield OS.File.writeAtomic(file, "content", { tmpPath: file + ".tmp" });
- do_check_true((yield OS.File.exists(file)));
- let info = yield OS.File.stat(file, {unixNoFollowingLinks: true});
- do_check_false(info.isDir);
- do_check_false(info.isSymLink);
-
- yield OS.File.unixSymLink(file, file + ".link");
- do_check_true((yield OS.File.exists(file + ".link")));
- info = yield OS.File.stat(file + ".link", {unixNoFollowingLinks: true});
- do_check_false(info.isDir);
- do_check_true(info.isSymLink);
- info = yield OS.File.stat(file + ".link");
- do_check_false(info.isDir);
- do_check_false(info.isSymLink);
- yield OS.File.remove(file + ".link");
- do_check_false((yield OS.File.exists(file + ".link")));
-
- yield OS.File.makeDir(dir);
- do_check_true((yield OS.File.exists(dir)));
- info = yield OS.File.stat(dir, {unixNoFollowingLinks: true});
- do_check_true(info.isDir);
- do_check_false(info.isSymLink);
-
- let link = OS.Path.join(OS.Constants.Path.profileDir, "linkdir");
-
- yield OS.File.unixSymLink(dir, link);
- do_check_true((yield OS.File.exists(link)));
- info = yield OS.File.stat(link, {unixNoFollowingLinks: true});
- do_check_false(info.isDir);
- do_check_true(info.isSymLink);
- info = yield OS.File.stat(link);
- do_check_true(info.isDir);
- do_check_false(info.isSymLink);
-
- let dir3 = OS.Path.join(OS.Constants.Path.profileDir, "directory3");
- let file3 = OS.Path.join(dir3, "file3");
- let link2 = OS.Path.join(dir, "link2");
-
- yield OS.File.writeAtomic(file1, "content", { tmpPath: file1 + ".tmp" });
- do_check_true((yield OS.File.exists(file1)));
- yield OS.File.makeDir(dir3);
- do_check_true((yield OS.File.exists(dir3)));
- yield OS.File.writeAtomic(file3, "content", { tmpPath: file3 + ".tmp" });
- do_check_true((yield OS.File.exists(file3)));
- yield OS.File.unixSymLink("../directory3", link2);
- do_check_true((yield OS.File.exists(link2)));
-
- yield OS.File.removeDir(link);
- do_check_false((yield OS.File.exists(link)));
- do_check_true((yield OS.File.exists(file1)));
- yield OS.File.removeDir(dir);
- do_check_false((yield OS.File.exists(dir)));
- do_check_true((yield OS.File.exists(file3)));
- yield OS.File.removeDir(dir3);
- do_check_false((yield OS.File.exists(dir3)));
-
- // This task will be executed only on Unix-like systems.
- // Please do not add tests independent to operating systems here
- // or implement symlink() on Windows.
-});
diff --git a/toolkit/components/osfile/tests/xpcshell/test_removeEmptyDir.js b/toolkit/components/osfile/tests/xpcshell/test_removeEmptyDir.js
deleted file mode 100644
index 95f8d5cd1d..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_removeEmptyDir.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-Components.utils.import("resource://gre/modules/osfile.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-do_register_cleanup(function() {
- Services.prefs.setBoolPref("toolkit.osfile.log", false);
-});
-
-function run_test() {
- Services.prefs.setBoolPref("toolkit.osfile.log", true);
-
- run_next_test();
-}
-
-/**
- * Test OS.File.removeEmptyDir
- */
-add_task(function() {
- // Set up profile. We create the directory in the profile, because the profile
- // is removed after every test run.
- do_get_profile();
-
- let dir = OS.Path.join(OS.Constants.Path.profileDir, "directory");
-
- // Sanity checking for the test
- do_check_false((yield OS.File.exists(dir)));
-
- // Remove non-existent directory
- yield OS.File.removeEmptyDir(dir);
-
- // Remove non-existent directory with ignoreAbsent
- yield OS.File.removeEmptyDir(dir, {ignoreAbsent: true});
-
- // Remove non-existent directory with ignoreAbsent false
- let exception = null;
- try {
- yield OS.File.removeEmptyDir(dir, {ignoreAbsent: false});
- } catch (ex) {
- exception = ex;
- }
-
- do_check_true(!!exception);
- do_check_true(exception instanceof OS.File.Error);
- do_check_true(exception.becauseNoSuchFile);
-
- // Remove empty directory
- yield OS.File.makeDir(dir);
- yield OS.File.removeEmptyDir(dir);
- do_check_false((yield OS.File.exists(dir)));
-});
diff --git a/toolkit/components/osfile/tests/xpcshell/test_reset.js b/toolkit/components/osfile/tests/xpcshell/test_reset.js
deleted file mode 100644
index f1e1b14d14..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_reset.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-var Path = OS.Constants.Path;
-
-add_task(function* init() {
- do_get_profile();
-});
-
-add_task(function* reset_before_launching() {
- do_print("Reset without launching OS.File, it shouldn't break");
- yield OS.File.resetWorker();
-});
-
-add_task(function* transparent_reset() {
- for (let i = 1; i < 3; ++i) {
- do_print("Do stome stuff before and after " + i + " reset(s), " +
- "it shouldn't break");
- let CONTENT = "some content " + i;
- let path = OS.Path.join(Path.profileDir, "tmp");
- yield OS.File.writeAtomic(path, CONTENT);
- for (let j = 0; j < i; ++j) {
- yield OS.File.resetWorker();
- }
- let data = yield OS.File.read(path);
- let string = (new TextDecoder()).decode(data);
- do_check_eq(string, CONTENT);
- }
-});
-
-add_task(function* file_open_cannot_reset() {
- let TEST_FILE = OS.Path.join(Path.profileDir, "tmp-" + Math.random());
- do_print("Leaking file descriptor " + TEST_FILE + ", we shouldn't be able to reset");
- let openedFile = yield OS.File.open(TEST_FILE, { create: true} );
- let thrown = false;
- try {
- yield OS.File.resetWorker();
- } catch (ex if ex.message.indexOf(OS.Path.basename(TEST_FILE)) != -1 ) {
- thrown = true;
- }
- do_check_true(thrown);
-
- do_print("Closing the file, we should now be able to reset");
- yield openedFile.close();
- yield OS.File.resetWorker();
-});
-
-add_task(function* dir_open_cannot_reset() {
- let TEST_DIR = yield OS.File.getCurrentDirectory();
- do_print("Leaking directory " + TEST_DIR + ", we shouldn't be able to reset");
- let iterator = new OS.File.DirectoryIterator(TEST_DIR);
- let thrown = false;
- try {
- yield OS.File.resetWorker();
- } catch (ex if ex.message.indexOf(OS.Path.basename(TEST_DIR)) != -1 ) {
- thrown = true;
- }
- do_check_true(thrown);
-
- do_print("Closing the directory, we should now be able to reset");
- yield iterator.close();
- yield OS.File.resetWorker();
-});
-
-add_task(function* race_against_itself() {
- do_print("Attempt to get resetWorker() to race against itself");
- // Arbitrary operation, just to wake up the worker
- try {
- yield OS.File.read("/foo");
- } catch (ex) {
- }
-
- let all = [];
- for (let i = 0; i < 100; ++i) {
- all.push(OS.File.resetWorker());
- }
-
- yield Promise.all(all);
-});
-
-
-add_task(function* finish_with_a_reset() {
- do_print("Reset without waiting for the result");
- // Arbitrary operation, just to wake up the worker
- try {
- yield OS.File.read("/foo");
- } catch (ex) {
- }
- // Now reset
- /*don't yield*/ OS.File.resetWorker();
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/osfile/tests/xpcshell/test_shutdown.js b/toolkit/components/osfile/tests/xpcshell/test_shutdown.js
deleted file mode 100644
index 667965d9ee..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_shutdown.js
+++ /dev/null
@@ -1,98 +0,0 @@
-Components.utils.import("resource://gre/modules/Services.jsm", this);
-Components.utils.import("resource://gre/modules/Promise.jsm", this);
-Components.utils.import("resource://gre/modules/Task.jsm", this);
-Components.utils.import("resource://gre/modules/osfile.jsm", this);
-
-add_task(function init() {
- do_get_profile();
-});
-
-/**
- * Test logging of file descriptors leaks.
- */
-add_task(function system_shutdown() {
-
- // Test that unclosed files cause warnings
- // Test that unclosed directories cause warnings
- // Test that closed files do not cause warnings
- // Test that closed directories do not cause warnings
- function testLeaksOf(resource, topic) {
- return Task.spawn(function() {
- let deferred = Promise.defer();
-
- // Register observer
- Services.prefs.setBoolPref("toolkit.asyncshutdown.testing", true);
- Services.prefs.setBoolPref("toolkit.osfile.log", true);
- Services.prefs.setBoolPref("toolkit.osfile.log.redirect", true);
- Services.prefs.setCharPref("toolkit.osfile.test.shutdown.observer", topic);
-
- let observer = function(aMessage) {
- try {
- do_print("Got message: " + aMessage);
- if (!(aMessage instanceof Components.interfaces.nsIConsoleMessage)) {
- return;
- }
- let message = aMessage.message;
- do_print("Got message: " + message);
- if (message.indexOf("TEST OS Controller WARNING") < 0) {
- return;
- }
- do_print("Got message: " + message + ", looking for resource " + resource);
- if (message.indexOf(resource) < 0) {
- return;
- }
- do_print("Resource: " + resource + " found");
- do_execute_soon(deferred.resolve);
- } catch (ex) {
- do_execute_soon(function() {
- deferred.reject(ex);
- });
- }
- };
- Services.console.registerListener(observer);
- Services.obs.notifyObservers(null, topic, null);
- do_timeout(1000, function() {
- do_print("Timeout while waiting for resource: " + resource);
- deferred.reject("timeout");
- });
-
- let resolved = false;
- try {
- yield deferred.promise;
- resolved = true;
- } catch (ex if ex == "timeout") {
- resolved = false;
- }
- Services.console.unregisterListener(observer);
- Services.prefs.clearUserPref("toolkit.osfile.log");
- Services.prefs.clearUserPref("toolkit.osfile.log.redirect");
- Services.prefs.clearUserPref("toolkit.osfile.test.shutdown.observer");
- Services.prefs.clearUserPref("toolkit.async_shutdown.testing", true);
-
- throw new Task.Result(resolved);
- });
- }
-
- let TEST_DIR = OS.Path.join((yield OS.File.getCurrentDirectory()), "..");
- do_print("Testing for leaks of directory iterator " + TEST_DIR);
- let iterator = new OS.File.DirectoryIterator(TEST_DIR);
- do_print("At this stage, we leak the directory");
- do_check_true((yield testLeaksOf(TEST_DIR, "test.shutdown.dir.leak")));
- yield iterator.close();
- do_print("At this stage, we don't leak the directory anymore");
- do_check_false((yield testLeaksOf(TEST_DIR, "test.shutdown.dir.noleak")));
-
- let TEST_FILE = OS.Path.join(OS.Constants.Path.profileDir, "test");
- do_print("Testing for leaks of file descriptor: " + TEST_FILE);
- let openedFile = yield OS.File.open(TEST_FILE, { create: true} );
- do_print("At this stage, we leak the file");
- do_check_true((yield testLeaksOf(TEST_FILE, "test.shutdown.file.leak")));
- yield openedFile.close();
- do_print("At this stage, we don't leak the file anymore");
- do_check_false((yield testLeaksOf(TEST_FILE, "test.shutdown.file.leak.2")));
-});
-
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/osfile/tests/xpcshell/test_telemetry.js b/toolkit/components/osfile/tests/xpcshell/test_telemetry.js
deleted file mode 100644
index dc5104443d..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_telemetry.js
+++ /dev/null
@@ -1,63 +0,0 @@
-"use strict";
-
-var {OS: {File, Path, Constants}} = Components.utils.import("resource://gre/modules/osfile.jsm", {});
-var {Services} = Components.utils.import("resource://gre/modules/Services.jsm", {});
-
-// Ensure that we have a profile but that the OS.File worker is not launched
-add_task(function* init() {
- do_get_profile();
- yield File.resetWorker();
-});
-
-function getCount(histogram) {
- if (histogram == null) {
- return 0;
- }
-
- let total = 0;
- for (let i of histogram.counts) {
- total += i;
- }
- return total;
-}
-
-// Ensure that launching the OS.File worker adds data to the relevant
-// histograms
-add_task(function* test_startup() {
- let LAUNCH = "OSFILE_WORKER_LAUNCH_MS";
- let READY = "OSFILE_WORKER_READY_MS";
-
- let before = Services.telemetry.histogramSnapshots;
-
- // Launch the OS.File worker
- yield File.getCurrentDirectory();
-
- let after = Services.telemetry.histogramSnapshots;
-
-
- do_print("Ensuring that we have recorded measures for histograms");
- do_check_eq(getCount(after[LAUNCH]), getCount(before[LAUNCH]) + 1);
- do_check_eq(getCount(after[READY]), getCount(before[READY]) + 1);
-
- do_print("Ensuring that launh <= ready");
- do_check_true(after[LAUNCH].sum <= after[READY].sum);
-});
-
-// Ensure that calling writeAtomic adds data to the relevant histograms
-add_task(function* test_writeAtomic() {
- let LABEL = "OSFILE_WRITEATOMIC_JANK_MS";
-
- let before = Services.telemetry.histogramSnapshots;
-
- // Perform a write.
- let path = Path.join(Constants.Path.profileDir, "test_osfile_telemetry.tmp");
- yield File.writeAtomic(path, LABEL, { tmpPath: path + ".tmp" } );
-
- let after = Services.telemetry.histogramSnapshots;
-
- do_check_eq(getCount(after[LABEL]), getCount(before[LABEL]) + 1);
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/osfile/tests/xpcshell/test_unique.js b/toolkit/components/osfile/tests/xpcshell/test_unique.js
deleted file mode 100644
index 8aa81b8034..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/test_unique.js
+++ /dev/null
@@ -1,88 +0,0 @@
-"use strict";
-
-Components.utils.import("resource://gre/modules/osfile.jsm");
-Components.utils.import("resource://gre/modules/Task.jsm");
-
-function run_test() {
- do_get_profile();
- run_next_test();
-}
-
-function testFiles(filename) {
- return Task.spawn(function() {
- const MAX_TRIES = 10;
- let profileDir = OS.Constants.Path.profileDir;
- let path = OS.Path.join(profileDir, filename);
-
- // Ensure that openUnique() uses the file name if there is no file with that name already.
- let openedFile = yield OS.File.openUnique(path);
- do_print("\nCreate new file: " + openedFile.path);
- yield openedFile.file.close();
- let exists = yield OS.File.exists(openedFile.path);
- do_check_true(exists);
- do_check_eq(path, openedFile.path);
- let fileInfo = yield OS.File.stat(openedFile.path);
- do_check_true(fileInfo.size == 0);
-
- // Ensure that openUnique() creates a new file name using a HEX number, as the original name is already taken.
- openedFile = yield OS.File.openUnique(path);
- do_print("\nCreate unique HEX file: " + openedFile.path);
- yield openedFile.file.close();
- exists = yield OS.File.exists(openedFile.path);
- do_check_true(exists);
- fileInfo = yield OS.File.stat(openedFile.path);
- do_check_true(fileInfo.size == 0);
-
- // Ensure that openUnique() generates different file names each time, using the HEX number algorithm
- let filenames = new Set();
- for (let i=0; i < MAX_TRIES; i++) {
- openedFile = yield OS.File.openUnique(path);
- yield openedFile.file.close();
- filenames.add(openedFile.path);
- }
-
- do_check_eq(filenames.size, MAX_TRIES);
-
- // Ensure that openUnique() creates a new human readable file name using, as the original name is already taken.
- openedFile = yield OS.File.openUnique(path, {humanReadable : true});
- do_print("\nCreate unique Human Readable file: " + openedFile.path);
- yield openedFile.file.close();
- exists = yield OS.File.exists(openedFile.path);
- do_check_true(exists);
- fileInfo = yield OS.File.stat(openedFile.path);
- do_check_true(fileInfo.size == 0);
-
- // Ensure that openUnique() generates different human readable file names each time
- filenames = new Set();
- for (let i=0; i < MAX_TRIES; i++) {
- openedFile = yield OS.File.openUnique(path, {humanReadable : true});
- yield openedFile.file.close();
- filenames.add(openedFile.path);
- }
-
- do_check_eq(filenames.size, MAX_TRIES);
-
- let exn;
- try {
- for (let i=0; i < 100; i++) {
- openedFile = yield OS.File.openUnique(path, {humanReadable : true});
- yield openedFile.file.close();
- }
- } catch (ex) {
- exn = ex;
- }
-
- do_print("Ensure that this raises the correct error");
- do_check_true(!!exn);
- do_check_true(exn instanceof OS.File.Error);
- do_check_true(exn.becauseExists);
- });
-}
-
-add_task(function test_unique() {
- OS.Shared.DEBUG = true;
- // Tests files with extension
- yield testFiles("dummy_unique_file.txt");
- // Tests files with no extension
- yield testFiles("dummy_unique_file_no_ext");
-});
diff --git a/toolkit/components/osfile/tests/xpcshell/xpcshell.ini b/toolkit/components/osfile/tests/xpcshell/xpcshell.ini
deleted file mode 100644
index 58b106d3df..0000000000
--- a/toolkit/components/osfile/tests/xpcshell/xpcshell.ini
+++ /dev/null
@@ -1,51 +0,0 @@
-[DEFAULT]
-head = head.js
-tail =
-
-support-files =
- test_loader/module_test_loader.js
-
-[test_available_free_space.js]
-[test_compression.js]
-[test_constants.js]
-[test_creationDate.js]
-[test_duration.js]
-[test_exception.js]
-[test_file_URL_conversion.js]
-[test_loader.js]
-[test_logging.js]
-[test_makeDir.js]
-[test_open.js]
-[test_osfile_async.js]
-[test_osfile_async_append.js]
-[test_osfile_async_bytes.js]
-[test_osfile_async_copy.js]
-[test_osfile_async_flush.js]
-[test_osfile_async_largefiles.js]
-[test_osfile_async_setDates.js]
-# Unimplemented on Windows (bug 1022816).
-# Spurious failure on Android test farm due to non-POSIX behavior of
-# filesystem backing /mnt/sdcard (not worth trying to fix).
-[test_osfile_async_setPermissions.js]
-skip-if = os == "win" || os == "android"
-[test_osfile_closed.js]
-[test_osfile_error.js]
-[test_osfile_kill.js]
-# Windows test
-[test_osfile_win_async_setPermissions.js]
-skip-if = os != "win"
-[test_osfile_writeAtomic_backupTo_option.js]
-[test_osfile_writeAtomic_zerobytes.js]
-[test_path.js]
-[test_path_constants.js]
-[test_queue.js]
-[test_read_write.js]
-requesttimeoutfactor = 4
-[test_remove.js]
-[test_removeDir.js]
-requesttimeoutfactor = 4
-[test_removeEmptyDir.js]
-[test_reset.js]
-[test_shutdown.js]
-[test_telemetry.js]
-[test_unique.js]
diff --git a/toolkit/components/parentalcontrols/moz.build b/toolkit/components/parentalcontrols/moz.build
index 083312fefb..17db8aaee4 100644
--- a/toolkit/components/parentalcontrols/moz.build
+++ b/toolkit/components/parentalcontrols/moz.build
@@ -4,28 +4,16 @@
# 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/.
-XPIDL_SOURCES += [
- 'nsIParentalControlsService.idl',
-]
+XPIDL_SOURCES += ['nsIParentalControlsService.idl']
XPIDL_MODULE = 'parentalcontrols'
if not CONFIG['MOZ_DISABLE_PARENTAL_CONTROLS']:
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
- SOURCES += [
- 'nsParentalControlsServiceWin.cpp',
- ]
+ SOURCES += ['nsParentalControlsServiceWin.cpp']
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
- UNIFIED_SOURCES += [
- 'nsParentalControlsServiceCocoa.mm',
- ]
- elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
- UNIFIED_SOURCES += [
- 'nsParentalControlsServiceAndroid.cpp',
- ]
+ UNIFIED_SOURCES += ['nsParentalControlsServiceCocoa.mm']
else:
- SOURCES += [
- 'nsParentalControlsServiceDefault.cpp',
- ]
+ SOURCES += ['nsParentalControlsServiceDefault.cpp']
FINAL_LIBRARY = 'xul'
diff --git a/toolkit/components/parentalcontrols/nsParentalControlsServiceAndroid.cpp b/toolkit/components/parentalcontrols/nsParentalControlsServiceAndroid.cpp
deleted file mode 100644
index 3647490002..0000000000
--- a/toolkit/components/parentalcontrols/nsParentalControlsServiceAndroid.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode:nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsParentalControlsService.h"
-#include "nsString.h"
-#include "nsIFile.h"
-#include "FennecJNIWrappers.h"
-
-namespace java = mozilla::java;
-
-NS_IMPL_ISUPPORTS(nsParentalControlsService, nsIParentalControlsService)
-
-nsParentalControlsService::nsParentalControlsService() :
- mEnabled(false)
-{
- if (mozilla::jni::IsFennec()) {
- mEnabled = java::Restrictions::IsUserRestricted();
- }
-}
-
-nsParentalControlsService::~nsParentalControlsService()
-{
-}
-
-NS_IMETHODIMP
-nsParentalControlsService::GetParentalControlsEnabled(bool *aResult)
-{
- *aResult = mEnabled;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsParentalControlsService::GetBlockFileDownloadsEnabled(bool *aResult)
-{
- // NOTE: isAllowed returns the opposite intention, so we need to flip it
- bool res;
- IsAllowed(nsIParentalControlsService::DOWNLOAD, NULL, &res);
- *aResult = !res;
-
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsParentalControlsService::GetLoggingEnabled(bool *aResult)
-{
- // Android doesn't currently have any method of logging restricted actions.
- *aResult = false;
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsParentalControlsService::Log(int16_t aEntryType,
- bool aBlocked,
- nsIURI *aSource,
- nsIFile *aTarget)
-{
- return NS_ERROR_NOT_AVAILABLE;
-}
-
-NS_IMETHODIMP
-nsParentalControlsService::RequestURIOverride(nsIURI *aTarget,
- nsIInterfaceRequestor *aWindowContext,
- bool *_retval)
-{
- return NS_ERROR_NOT_AVAILABLE;
-}
-
-NS_IMETHODIMP
-nsParentalControlsService::RequestURIOverrides(nsIArray *aTargets,
- nsIInterfaceRequestor *aWindowContext,
- bool *_retval)
-{
- return NS_ERROR_NOT_AVAILABLE;
-}
-
-NS_IMETHODIMP
-nsParentalControlsService::IsAllowed(int16_t aAction,
- nsIURI *aUri,
- bool *_retval)
-{
- nsresult rv = NS_OK;
- *_retval = true;
-
- if (!mEnabled) {
- return rv;
- }
-
- if (mozilla::jni::IsFennec()) {
- nsAutoCString url;
- if (aUri) {
- rv = aUri->GetSpec(url);
- NS_ENSURE_SUCCESS(rv, rv);
- }
-
- *_retval = java::Restrictions::IsAllowed(aAction,
- NS_ConvertUTF8toUTF16(url));
- return rv;
- }
-
- return NS_ERROR_NOT_AVAILABLE;
-}
diff --git a/toolkit/components/passwordmgr/moz.build b/toolkit/components/passwordmgr/moz.build
index af9a4ab03a..145e2fca4f 100644
--- a/toolkit/components/passwordmgr/moz.build
+++ b/toolkit/components/passwordmgr/moz.build
@@ -7,17 +7,6 @@
if CONFIG['MOZ_PHOENIX']:
DEFINES['MOZ_BUILD_APP_IS_BROWSER'] = True
-MOCHITEST_MANIFESTS += ['test/mochitest.ini', 'test/mochitest/mochitest.ini']
-MOCHITEST_CHROME_MANIFESTS += ['test/chrome/chrome.ini']
-BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
-XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
-
-TESTING_JS_MODULES += [
- # Make this file available from the "resource:" URI of the test environment.
- 'test/browser/form_basic.html',
- 'test/LoginTestUtils.jsm',
-]
-
XPIDL_SOURCES += [
'nsILoginInfo.idl',
'nsILoginManager.idl',
@@ -50,18 +39,14 @@ EXTRA_JS_MODULES += [
EXTRA_PP_JS_MODULES += ['OSCrypto.jsm']
-if CONFIG['OS_TARGET'] == 'Android':
- EXTRA_COMPONENTS += [
- 'storage-mozStorage.js',
- ]
-else:
- EXTRA_COMPONENTS += [
- 'storage-json.js',
- ]
- EXTRA_JS_MODULES += [
- 'LoginImport.jsm',
- 'LoginStore.jsm',
- ]
+EXTRA_COMPONENTS += [
+ 'storage-json.js',
+]
+
+EXTRA_JS_MODULES += [
+ 'LoginImport.jsm',
+ 'LoginStore.jsm',
+]
if CONFIG['OS_TARGET'] == 'WINNT':
EXTRA_JS_MODULES += [
@@ -74,6 +59,3 @@ if CONFIG['MOZ_PHOENIX']:
]
JAR_MANIFESTS += ['jar.mn']
-
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'Password Manager')
diff --git a/toolkit/components/passwordmgr/nsLoginManager.js b/toolkit/components/passwordmgr/nsLoginManager.js
index 87466fe5c1..84b0319cb5 100644
--- a/toolkit/components/passwordmgr/nsLoginManager.js
+++ b/toolkit/components/passwordmgr/nsLoginManager.js
@@ -112,11 +112,7 @@ LoginManager.prototype = {
_initStorage() {
-#ifdef MOZ_WIDGET_ANDROID
- let contractID = "@mozilla.org/login-manager/storage/mozStorage;1";
-#else
let contractID = "@mozilla.org/login-manager/storage/json;1";
-#endif
try {
let catMan = Cc["@mozilla.org/categorymanager;1"].
diff --git a/toolkit/components/passwordmgr/nsLoginManagerPrompter.js b/toolkit/components/passwordmgr/nsLoginManagerPrompter.js
index c4be39e318..5fb1ee83e6 100644
--- a/toolkit/components/passwordmgr/nsLoginManagerPrompter.js
+++ b/toolkit/components/passwordmgr/nsLoginManagerPrompter.js
@@ -19,8 +19,7 @@ const LoginInfo =
const BRAND_BUNDLE = "chrome://branding/locale/brand.properties";
/**
- * Constants for password prompt telemetry.
- * Mirrored in mobile/android/components/LoginManagerPrompter.js */
+ * Constants for password prompt telemetry. */
const PROMPT_DISPLAYED = 0;
const PROMPT_ADD_OR_UPDATE = 1;
diff --git a/toolkit/components/passwordmgr/passwordmgr.manifest b/toolkit/components/passwordmgr/passwordmgr.manifest
index 72e9ccffb8..c2c37ebffc 100644
--- a/toolkit/components/passwordmgr/passwordmgr.manifest
+++ b/toolkit/components/passwordmgr/passwordmgr.manifest
@@ -6,12 +6,7 @@ component {8aa66d77-1bbb-45a6-991e-b8f47751c291} nsLoginManagerPrompter.js
contract @mozilla.org/login-manager/prompter;1 {8aa66d77-1bbb-45a6-991e-b8f47751c291}
component {0f2f347c-1e4f-40cc-8efd-792dea70a85e} nsLoginInfo.js
contract @mozilla.org/login-manager/loginInfo;1 {0f2f347c-1e4f-40cc-8efd-792dea70a85e}
-#ifdef ANDROID
-component {8c2023b9-175c-477e-9761-44ae7b549756} storage-mozStorage.js
-contract @mozilla.org/login-manager/storage/mozStorage;1 {8c2023b9-175c-477e-9761-44ae7b549756}
-#else
component {c00c432d-a0c9-46d7-bef6-9c45b4d07341} storage-json.js
contract @mozilla.org/login-manager/storage/json;1 {c00c432d-a0c9-46d7-bef6-9c45b4d07341}
-#endif
component {dc6c2976-0f73-4f1f-b9ff-3d72b4e28309} crypto-SDR.js
contract @mozilla.org/login-manager/crypto/SDR;1 {dc6c2976-0f73-4f1f-b9ff-3d72b4e28309} \ No newline at end of file
diff --git a/toolkit/components/passwordmgr/storage-mozStorage.js b/toolkit/components/passwordmgr/storage-mozStorage.js
deleted file mode 100644
index 9da244f7a3..0000000000
--- a/toolkit/components/passwordmgr/storage-mozStorage.js
+++ /dev/null
@@ -1,1262 +0,0 @@
-/* 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/. */
-
-const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
-const DB_VERSION = 6; // The database schema version
-const PERMISSION_SAVE_LOGINS = "login-saving";
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/Promise.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "LoginHelper",
- "resource://gre/modules/LoginHelper.jsm");
-
-/**
- * Object that manages a database transaction properly so consumers don't have
- * to worry about it throwing.
- *
- * @param aDatabase
- * The mozIStorageConnection to start a transaction on.
- */
-function Transaction(aDatabase) {
- this._db = aDatabase;
-
- this._hasTransaction = false;
- try {
- this._db.beginTransaction();
- this._hasTransaction = true;
- } catch (e) { /* om nom nom exceptions */ }
-}
-
-Transaction.prototype = {
- commit : function() {
- if (this._hasTransaction)
- this._db.commitTransaction();
- },
-
- rollback : function() {
- if (this._hasTransaction)
- this._db.rollbackTransaction();
- },
-};
-
-
-function LoginManagerStorage_mozStorage() { }
-
-LoginManagerStorage_mozStorage.prototype = {
-
- classID : Components.ID("{8c2023b9-175c-477e-9761-44ae7b549756}"),
- QueryInterface : XPCOMUtils.generateQI([Ci.nsILoginManagerStorage,
- Ci.nsIInterfaceRequestor]),
- getInterface : function(aIID) {
- if (aIID.equals(Ci.nsIVariant)) {
- // Allows unwrapping the JavaScript object for regression tests.
- return this;
- }
-
- if (aIID.equals(Ci.mozIStorageConnection)) {
- return this._dbConnection;
- }
-
- throw new Components.Exception("Interface not available", Cr.NS_ERROR_NO_INTERFACE);
- },
-
- __crypto : null, // nsILoginManagerCrypto service
- get _crypto() {
- if (!this.__crypto)
- this.__crypto = Cc["@mozilla.org/login-manager/crypto/SDR;1"].
- getService(Ci.nsILoginManagerCrypto);
- return this.__crypto;
- },
-
- __profileDir: null, // nsIFile for the user's profile dir
- get _profileDir() {
- if (!this.__profileDir)
- this.__profileDir = Services.dirsvc.get("ProfD", Ci.nsIFile);
- return this.__profileDir;
- },
-
- __storageService: null, // Storage service for using mozStorage
- get _storageService() {
- if (!this.__storageService)
- this.__storageService = Cc["@mozilla.org/storage/service;1"].
- getService(Ci.mozIStorageService);
- return this.__storageService;
- },
-
- __uuidService: null,
- get _uuidService() {
- if (!this.__uuidService)
- this.__uuidService = Cc["@mozilla.org/uuid-generator;1"].
- getService(Ci.nsIUUIDGenerator);
- return this.__uuidService;
- },
-
-
- // The current database schema.
- _dbSchema: {
- tables: {
- moz_logins: "id INTEGER PRIMARY KEY," +
- "hostname TEXT NOT NULL," +
- "httpRealm TEXT," +
- "formSubmitURL TEXT," +
- "usernameField TEXT NOT NULL," +
- "passwordField TEXT NOT NULL," +
- "encryptedUsername TEXT NOT NULL," +
- "encryptedPassword TEXT NOT NULL," +
- "guid TEXT," +
- "encType INTEGER," +
- "timeCreated INTEGER," +
- "timeLastUsed INTEGER," +
- "timePasswordChanged INTEGER," +
- "timesUsed INTEGER",
- // Changes must be reflected in this._dbAreExpectedColumnsPresent(),
- // this._searchLogins(), and this.modifyLogin().
-
- moz_disabledHosts: "id INTEGER PRIMARY KEY," +
- "hostname TEXT UNIQUE ON CONFLICT REPLACE",
-
- moz_deleted_logins: "id INTEGER PRIMARY KEY," +
- "guid TEXT," +
- "timeDeleted INTEGER",
- },
- indices: {
- moz_logins_hostname_index: {
- table: "moz_logins",
- columns: ["hostname"]
- },
- moz_logins_hostname_formSubmitURL_index: {
- table: "moz_logins",
- columns: ["hostname", "formSubmitURL"]
- },
- moz_logins_hostname_httpRealm_index: {
- table: "moz_logins",
- columns: ["hostname", "httpRealm"]
- },
- moz_logins_guid_index: {
- table: "moz_logins",
- columns: ["guid"]
- },
- moz_logins_encType_index: {
- table: "moz_logins",
- columns: ["encType"]
- }
- }
- },
- _dbConnection : null, // The database connection
- _dbStmts : null, // Database statements for memoization
-
- _signonsFile : null, // nsIFile for "signons.sqlite"
-
-
- /*
- * Internal method used by regression tests only. It overrides the default
- * database location.
- */
- initWithFile : function(aDBFile) {
- if (aDBFile)
- this._signonsFile = aDBFile;
-
- this.initialize();
- },
-
-
- initialize : function () {
- this._dbStmts = {};
-
- let isFirstRun;
- try {
- // Force initialization of the crypto module.
- // See bug 717490 comment 17.
- this._crypto;
-
- // If initWithFile is calling us, _signonsFile may already be set.
- if (!this._signonsFile) {
- // Initialize signons.sqlite
- this._signonsFile = this._profileDir.clone();
- this._signonsFile.append("signons.sqlite");
- }
- this.log("Opening database at " + this._signonsFile.path);
-
- // Initialize the database (create, migrate as necessary)
- isFirstRun = this._dbInit();
-
- this._initialized = true;
-
- return Promise.resolve();
- } catch (e) {
- this.log("Initialization failed: " + e);
- // If the import fails on first run, we want to delete the db
- if (isFirstRun && e == "Import failed")
- this._dbCleanup(false);
- throw new Error("Initialization failed");
- }
- },
-
-
- /**
- * Internal method used by regression tests only. It is called before
- * replacing this storage module with a new instance.
- */
- terminate : function () {
- return Promise.resolve();
- },
-
-
- addLogin : function (login) {
- // Throws if there are bogus values.
- LoginHelper.checkLoginValues(login);
-
- let [encUsername, encPassword, encType] = this._encryptLogin(login);
-
- // Clone the login, so we don't modify the caller's object.
- let loginClone = login.clone();
-
- // Initialize the nsILoginMetaInfo fields, unless the caller gave us values
- loginClone.QueryInterface(Ci.nsILoginMetaInfo);
- if (loginClone.guid) {
- if (!this._isGuidUnique(loginClone.guid))
- throw new Error("specified GUID already exists");
- } else {
- loginClone.guid = this._uuidService.generateUUID().toString();
- }
-
- // Set timestamps
- let currentTime = Date.now();
- if (!loginClone.timeCreated)
- loginClone.timeCreated = currentTime;
- if (!loginClone.timeLastUsed)
- loginClone.timeLastUsed = currentTime;
- if (!loginClone.timePasswordChanged)
- loginClone.timePasswordChanged = currentTime;
- if (!loginClone.timesUsed)
- loginClone.timesUsed = 1;
-
- let query =
- "INSERT INTO moz_logins " +
- "(hostname, httpRealm, formSubmitURL, usernameField, " +
- "passwordField, encryptedUsername, encryptedPassword, " +
- "guid, encType, timeCreated, timeLastUsed, timePasswordChanged, " +
- "timesUsed) " +
- "VALUES (:hostname, :httpRealm, :formSubmitURL, :usernameField, " +
- ":passwordField, :encryptedUsername, :encryptedPassword, " +
- ":guid, :encType, :timeCreated, :timeLastUsed, " +
- ":timePasswordChanged, :timesUsed)";
-
- let params = {
- hostname: loginClone.hostname,
- httpRealm: loginClone.httpRealm,
- formSubmitURL: loginClone.formSubmitURL,
- usernameField: loginClone.usernameField,
- passwordField: loginClone.passwordField,
- encryptedUsername: encUsername,
- encryptedPassword: encPassword,
- guid: loginClone.guid,
- encType: encType,
- timeCreated: loginClone.timeCreated,
- timeLastUsed: loginClone.timeLastUsed,
- timePasswordChanged: loginClone.timePasswordChanged,
- timesUsed: loginClone.timesUsed
- };
-
- let stmt;
- try {
- stmt = this._dbCreateStatement(query, params);
- stmt.execute();
- } catch (e) {
- this.log("addLogin failed: " + e.name + " : " + e.message);
- throw new Error("Couldn't write to database, login not added.");
- } finally {
- if (stmt) {
- stmt.reset();
- }
- }
-
- // Send a notification that a login was added.
- LoginHelper.notifyStorageChanged("addLogin", loginClone);
- return loginClone;
- },
-
-
- removeLogin : function (login) {
- let [idToDelete, storedLogin] = this._getIdForLogin(login);
- if (!idToDelete)
- throw new Error("No matching logins");
-
- // Execute the statement & remove from DB
- let query = "DELETE FROM moz_logins WHERE id = :id";
- let params = { id: idToDelete };
- let stmt;
- let transaction = new Transaction(this._dbConnection);
- try {
- stmt = this._dbCreateStatement(query, params);
- stmt.execute();
- this.storeDeletedLogin(storedLogin);
- transaction.commit();
- } catch (e) {
- this.log("_removeLogin failed: " + e.name + " : " + e.message);
- transaction.rollback();
- throw new Error("Couldn't write to database, login not removed.");
- } finally {
- if (stmt) {
- stmt.reset();
- }
- }
- LoginHelper.notifyStorageChanged("removeLogin", storedLogin);
- },
-
- modifyLogin : function (oldLogin, newLoginData) {
- let [idToModify, oldStoredLogin] = this._getIdForLogin(oldLogin);
- if (!idToModify)
- throw new Error("No matching logins");
-
- let newLogin = LoginHelper.buildModifiedLogin(oldStoredLogin, newLoginData);
-
- // Check if the new GUID is duplicate.
- if (newLogin.guid != oldStoredLogin.guid &&
- !this._isGuidUnique(newLogin.guid)) {
- throw new Error("specified GUID already exists");
- }
-
- // Look for an existing entry in case key properties changed.
- if (!newLogin.matches(oldLogin, true)) {
- let logins = this.findLogins({}, newLogin.hostname,
- newLogin.formSubmitURL,
- newLogin.httpRealm);
-
- if (logins.some(login => newLogin.matches(login, true)))
- throw new Error("This login already exists.");
- }
-
- // Get the encrypted value of the username and password.
- let [encUsername, encPassword, encType] = this._encryptLogin(newLogin);
-
- let query =
- "UPDATE moz_logins " +
- "SET hostname = :hostname, " +
- "httpRealm = :httpRealm, " +
- "formSubmitURL = :formSubmitURL, " +
- "usernameField = :usernameField, " +
- "passwordField = :passwordField, " +
- "encryptedUsername = :encryptedUsername, " +
- "encryptedPassword = :encryptedPassword, " +
- "guid = :guid, " +
- "encType = :encType, " +
- "timeCreated = :timeCreated, " +
- "timeLastUsed = :timeLastUsed, " +
- "timePasswordChanged = :timePasswordChanged, " +
- "timesUsed = :timesUsed " +
- "WHERE id = :id";
-
- let params = {
- id: idToModify,
- hostname: newLogin.hostname,
- httpRealm: newLogin.httpRealm,
- formSubmitURL: newLogin.formSubmitURL,
- usernameField: newLogin.usernameField,
- passwordField: newLogin.passwordField,
- encryptedUsername: encUsername,
- encryptedPassword: encPassword,
- guid: newLogin.guid,
- encType: encType,
- timeCreated: newLogin.timeCreated,
- timeLastUsed: newLogin.timeLastUsed,
- timePasswordChanged: newLogin.timePasswordChanged,
- timesUsed: newLogin.timesUsed
- };
-
- let stmt;
- try {
- stmt = this._dbCreateStatement(query, params);
- stmt.execute();
- } catch (e) {
- this.log("modifyLogin failed: " + e.name + " : " + e.message);
- throw new Error("Couldn't write to database, login not modified.");
- } finally {
- if (stmt) {
- stmt.reset();
- }
- }
-
- LoginHelper.notifyStorageChanged("modifyLogin", [oldStoredLogin, newLogin]);
- },
-
-
- /**
- * Returns an array of nsILoginInfo.
- */
- getAllLogins : function (count) {
- let [logins, ids] = this._searchLogins({});
-
- // decrypt entries for caller.
- logins = this._decryptLogins(logins);
-
- this.log("_getAllLogins: returning " + logins.length + " logins.");
- if (count)
- count.value = logins.length; // needed for XPCOM
- return logins;
- },
-
-
- /**
- * Public wrapper around _searchLogins to convert the nsIPropertyBag to a
- * JavaScript object and decrypt the results.
- *
- * @return {nsILoginInfo[]} which are decrypted.
- */
- searchLogins : function(count, matchData) {
- let realMatchData = {};
- let options = {};
- // Convert nsIPropertyBag to normal JS object
- let propEnum = matchData.enumerator;
- while (propEnum.hasMoreElements()) {
- let prop = propEnum.getNext().QueryInterface(Ci.nsIProperty);
- switch (prop.name) {
- // Some property names aren't field names but are special options to affect the search.
- case "schemeUpgrades": {
- options[prop.name] = prop.value;
- break;
- }
- default: {
- realMatchData[prop.name] = prop.value;
- break;
- }
- }
- }
-
- let [logins, ids] = this._searchLogins(realMatchData, options);
-
- // Decrypt entries found for the caller.
- logins = this._decryptLogins(logins);
-
- count.value = logins.length; // needed for XPCOM
- return logins;
- },
-
-
- /**
- * Private method to perform arbitrary searches on any field. Decryption is
- * left to the caller.
- *
- * Returns [logins, ids] for logins that match the arguments, where logins
- * is an array of encrypted nsLoginInfo and ids is an array of associated
- * ids in the database.
- */
- _searchLogins : function (matchData, aOptions = {
- schemeUpgrades: false,
- }) {
- let conditions = [], params = {};
-
- for (let field in matchData) {
- let value = matchData[field];
- let condition = "";
- switch (field) {
- case "formSubmitURL":
- if (value != null) {
- // Historical compatibility requires this special case
- condition = "formSubmitURL = '' OR ";
- }
- // Fall through
- case "hostname":
- if (value != null) {
- condition += `${field} = :${field}`;
- params[field] = value;
- let valueURI;
- try {
- if (aOptions.schemeUpgrades && (valueURI = Services.io.newURI(value, null, null)) &&
- valueURI.scheme == "https") {
- condition += ` OR ${field} = :http${field}`;
- params["http" + field] = "http://" + valueURI.hostPort;
- }
- } catch (ex) {
- // newURI will throw for some values
- // but those URLs wouldn't support upgrades anyways.
- }
- break;
- }
- // Fall through
- // Normal cases.
- case "httpRealm":
- case "id":
- case "usernameField":
- case "passwordField":
- case "encryptedUsername":
- case "encryptedPassword":
- case "guid":
- case "encType":
- case "timeCreated":
- case "timeLastUsed":
- case "timePasswordChanged":
- case "timesUsed":
- if (value == null) {
- condition = field + " isnull";
- } else {
- condition = field + " = :" + field;
- params[field] = value;
- }
- break;
- // Fail if caller requests an unknown property.
- default:
- throw new Error("Unexpected field: " + field);
- }
- if (condition) {
- conditions.push(condition);
- }
- }
-
- // Build query
- let query = "SELECT * FROM moz_logins";
- if (conditions.length) {
- conditions = conditions.map(c => "(" + c + ")");
- query += " WHERE " + conditions.join(" AND ");
- }
-
- let stmt;
- let logins = [], ids = [];
- try {
- stmt = this._dbCreateStatement(query, params);
- // We can't execute as usual here, since we're iterating over rows
- while (stmt.executeStep()) {
- // Create the new nsLoginInfo object, push to array
- let login = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- login.init(stmt.row.hostname, stmt.row.formSubmitURL,
- stmt.row.httpRealm, stmt.row.encryptedUsername,
- stmt.row.encryptedPassword, stmt.row.usernameField,
- stmt.row.passwordField);
- // set nsILoginMetaInfo values
- login.QueryInterface(Ci.nsILoginMetaInfo);
- login.guid = stmt.row.guid;
- login.timeCreated = stmt.row.timeCreated;
- login.timeLastUsed = stmt.row.timeLastUsed;
- login.timePasswordChanged = stmt.row.timePasswordChanged;
- login.timesUsed = stmt.row.timesUsed;
- logins.push(login);
- ids.push(stmt.row.id);
- }
- } catch (e) {
- this.log("_searchLogins failed: " + e.name + " : " + e.message);
- } finally {
- if (stmt) {
- stmt.reset();
- }
- }
-
- this.log("_searchLogins: returning " + logins.length + " logins");
- return [logins, ids];
- },
-
- /**
- * Moves a login to the deleted logins table
- */
- storeDeletedLogin : function(aLogin) {
- let stmt = null;
- try {
- this.log("Storing " + aLogin.guid + " in deleted passwords\n");
- let query = "INSERT INTO moz_deleted_logins (guid, timeDeleted) VALUES (:guid, :timeDeleted)";
- let params = { guid: aLogin.guid,
- timeDeleted: Date.now() };
- let stmt = this._dbCreateStatement(query, params);
- stmt.execute();
- } catch (ex) {
- throw ex;
- } finally {
- if (stmt)
- stmt.reset();
- }
- },
-
-
- /**
- * Removes all logins from storage.
- */
- removeAllLogins : function () {
- this.log("Removing all logins");
- let query;
- let stmt;
- let transaction = new Transaction(this._dbConnection);
-
- // Disabled hosts kept, as one presumably doesn't want to erase those.
- // TODO: Add these items to the deleted items table once we've sorted
- // out the issues from bug 756701
- query = "DELETE FROM moz_logins";
- try {
- stmt = this._dbCreateStatement(query);
- stmt.execute();
- transaction.commit();
- } catch (e) {
- this.log("_removeAllLogins failed: " + e.name + " : " + e.message);
- transaction.rollback();
- throw new Error("Couldn't write to database");
- } finally {
- if (stmt) {
- stmt.reset();
- }
- }
-
- LoginHelper.notifyStorageChanged("removeAllLogins", null);
- },
-
-
- findLogins : function (count, hostname, formSubmitURL, httpRealm) {
- let loginData = {
- hostname: hostname,
- formSubmitURL: formSubmitURL,
- httpRealm: httpRealm
- };
- let matchData = { };
- for (let field of ["hostname", "formSubmitURL", "httpRealm"])
- if (loginData[field] != '')
- matchData[field] = loginData[field];
- let [logins, ids] = this._searchLogins(matchData);
-
- // Decrypt entries found for the caller.
- logins = this._decryptLogins(logins);
-
- this.log("_findLogins: returning " + logins.length + " logins");
- count.value = logins.length; // needed for XPCOM
- return logins;
- },
-
-
- countLogins : function (hostname, formSubmitURL, httpRealm) {
-
- let _countLoginsHelper = (hostname, formSubmitURL, httpRealm) => {
- // Do checks for null and empty strings, adjust conditions and params
- let [conditions, params] =
- this._buildConditionsAndParams(hostname, formSubmitURL, httpRealm);
-
- let query = "SELECT COUNT(1) AS numLogins FROM moz_logins";
- if (conditions.length) {
- conditions = conditions.map(c => "(" + c + ")");
- query += " WHERE " + conditions.join(" AND ");
- }
-
- let stmt, numLogins;
- try {
- stmt = this._dbCreateStatement(query, params);
- stmt.executeStep();
- numLogins = stmt.row.numLogins;
- } catch (e) {
- this.log("_countLogins failed: " + e.name + " : " + e.message);
- } finally {
- if (stmt) {
- stmt.reset();
- }
- }
- return numLogins;
- };
-
- let resultLogins = _countLoginsHelper(hostname, formSubmitURL, httpRealm);
- this.log("_countLogins: counted logins: " + resultLogins);
- return resultLogins;
- },
-
-
- get uiBusy() {
- return this._crypto.uiBusy;
- },
-
-
- get isLoggedIn() {
- return this._crypto.isLoggedIn;
- },
-
-
- /**
- * Returns an array with two items: [id, login]. If the login was not
- * found, both items will be null. The returned login contains the actual
- * stored login (useful for looking at the actual nsILoginMetaInfo values).
- */
- _getIdForLogin : function (login) {
- let matchData = { };
- for (let field of ["hostname", "formSubmitURL", "httpRealm"])
- if (login[field] != '')
- matchData[field] = login[field];
- let [logins, ids] = this._searchLogins(matchData);
-
- let id = null;
- let foundLogin = null;
-
- // The specified login isn't encrypted, so we need to ensure
- // the logins we're comparing with are decrypted. We decrypt one entry
- // at a time, lest _decryptLogins return fewer entries and screw up
- // indices between the two.
- for (let i = 0; i < logins.length; i++) {
- let [decryptedLogin] = this._decryptLogins([logins[i]]);
-
- if (!decryptedLogin || !decryptedLogin.equals(login))
- continue;
-
- // We've found a match, set id and break
- foundLogin = decryptedLogin;
- id = ids[i];
- break;
- }
-
- return [id, foundLogin];
- },
-
-
- /**
- * Adjusts the WHERE conditions and parameters for statements prior to the
- * statement being created. This fixes the cases where nulls are involved
- * and the empty string is supposed to be a wildcard match
- */
- _buildConditionsAndParams : function (hostname, formSubmitURL, httpRealm) {
- let conditions = [], params = {};
-
- if (hostname == null) {
- conditions.push("hostname isnull");
- } else if (hostname != '') {
- conditions.push("hostname = :hostname");
- params["hostname"] = hostname;
- }
-
- if (formSubmitURL == null) {
- conditions.push("formSubmitURL isnull");
- } else if (formSubmitURL != '') {
- conditions.push("formSubmitURL = :formSubmitURL OR formSubmitURL = ''");
- params["formSubmitURL"] = formSubmitURL;
- }
-
- if (httpRealm == null) {
- conditions.push("httpRealm isnull");
- } else if (httpRealm != '') {
- conditions.push("httpRealm = :httpRealm");
- params["httpRealm"] = httpRealm;
- }
-
- return [conditions, params];
- },
-
-
- /**
- * Checks to see if the specified GUID already exists.
- */
- _isGuidUnique : function (guid) {
- let query = "SELECT COUNT(1) AS numLogins FROM moz_logins WHERE guid = :guid";
- let params = { guid: guid };
-
- let stmt, numLogins;
- try {
- stmt = this._dbCreateStatement(query, params);
- stmt.executeStep();
- numLogins = stmt.row.numLogins;
- } catch (e) {
- this.log("_isGuidUnique failed: " + e.name + " : " + e.message);
- } finally {
- if (stmt) {
- stmt.reset();
- }
- }
-
- return (numLogins == 0);
- },
-
-
- /**
- * Returns the encrypted username, password, and encrypton type for the specified
- * login. Can throw if the user cancels a master password entry.
- */
- _encryptLogin : function (login) {
- let encUsername = this._crypto.encrypt(login.username);
- let encPassword = this._crypto.encrypt(login.password);
- let encType = this._crypto.defaultEncType;
-
- return [encUsername, encPassword, encType];
- },
-
-
- /**
- * Decrypts username and password fields in the provided array of
- * logins.
- *
- * The entries specified by the array will be decrypted, if possible.
- * An array of successfully decrypted logins will be returned. The return
- * value should be given to external callers (since still-encrypted
- * entries are useless), whereas internal callers generally don't want
- * to lose unencrypted entries (eg, because the user clicked Cancel
- * instead of entering their master password)
- */
- _decryptLogins : function (logins) {
- let result = [];
-
- for (let login of logins) {
- try {
- login.username = this._crypto.decrypt(login.username);
- login.password = this._crypto.decrypt(login.password);
- } catch (e) {
- // If decryption failed (corrupt entry?), just skip it.
- // Rethrow other errors (like canceling entry of a master pw)
- if (e.result == Cr.NS_ERROR_FAILURE)
- continue;
- throw e;
- }
- result.push(login);
- }
-
- return result;
- },
-
-
- // Database Creation & Access
-
- /**
- * Creates a statement, wraps it, and then does parameter replacement
- * Returns the wrapped statement for execution. Will use memoization
- * so that statements can be reused.
- */
- _dbCreateStatement : function (query, params) {
- let wrappedStmt = this._dbStmts[query];
- // Memoize the statements
- if (!wrappedStmt) {
- this.log("Creating new statement for query: " + query);
- wrappedStmt = this._dbConnection.createStatement(query);
- this._dbStmts[query] = wrappedStmt;
- }
- // Replace parameters, must be done 1 at a time
- if (params)
- for (let i in params)
- wrappedStmt.params[i] = params[i];
- return wrappedStmt;
- },
-
-
- /**
- * Attempts to initialize the database. This creates the file if it doesn't
- * exist, performs any migrations, etc. Return if this is the first run.
- */
- _dbInit : function () {
- this.log("Initializing Database");
- let isFirstRun = false;
- try {
- this._dbConnection = this._storageService.openDatabase(this._signonsFile);
- // Get the version of the schema in the file. It will be 0 if the
- // database has not been created yet.
- let version = this._dbConnection.schemaVersion;
- if (version == 0) {
- this._dbCreate();
- isFirstRun = true;
- } else if (version != DB_VERSION) {
- this._dbMigrate(version);
- }
- } catch (e) {
- if (e.result == Cr.NS_ERROR_FILE_CORRUPTED) {
- // Database is corrupted, so we backup the database, then throw
- // causing initialization to fail and a new db to be created next use
- this._dbCleanup(true);
- }
- throw e;
- }
-
- Services.obs.addObserver(this, "profile-before-change", false);
- return isFirstRun;
- },
-
- observe: function (subject, topic, data) {
- switch (topic) {
- case "profile-before-change":
- Services.obs.removeObserver(this, "profile-before-change");
- this._dbClose();
- break;
- }
- },
-
- _dbCreate: function () {
- this.log("Creating Database");
- this._dbCreateSchema();
- this._dbConnection.schemaVersion = DB_VERSION;
- },
-
-
- _dbCreateSchema : function () {
- this._dbCreateTables();
- this._dbCreateIndices();
- },
-
-
- _dbCreateTables : function () {
- this.log("Creating Tables");
- for (let name in this._dbSchema.tables)
- this._dbConnection.createTable(name, this._dbSchema.tables[name]);
- },
-
-
- _dbCreateIndices : function () {
- this.log("Creating Indices");
- for (let name in this._dbSchema.indices) {
- let index = this._dbSchema.indices[name];
- let statement = "CREATE INDEX IF NOT EXISTS " + name + " ON " + index.table +
- "(" + index.columns.join(", ") + ")";
- this._dbConnection.executeSimpleSQL(statement);
- }
- },
-
-
- _dbMigrate : function (oldVersion) {
- this.log("Attempting to migrate from version " + oldVersion);
-
- if (oldVersion > DB_VERSION) {
- this.log("Downgrading to version " + DB_VERSION);
- // User's DB is newer. Sanity check that our expected columns are
- // present, and if so mark the lower version and merrily continue
- // on. If the columns are borked, something is wrong so blow away
- // the DB and start from scratch. [Future incompatible upgrades
- // should swtich to a different table or file.]
-
- if (!this._dbAreExpectedColumnsPresent())
- throw Components.Exception("DB is missing expected columns",
- Cr.NS_ERROR_FILE_CORRUPTED);
-
- // Change the stored version to the current version. If the user
- // runs the newer code again, it will see the lower version number
- // and re-upgrade (to fixup any entries the old code added).
- this._dbConnection.schemaVersion = DB_VERSION;
- return;
- }
-
- // Upgrade to newer version...
-
- let transaction = new Transaction(this._dbConnection);
-
- try {
- for (let v = oldVersion + 1; v <= DB_VERSION; v++) {
- this.log("Upgrading to version " + v + "...");
- let migrateFunction = "_dbMigrateToVersion" + v;
- this[migrateFunction]();
- }
- } catch (e) {
- this.log("Migration failed: " + e);
- transaction.rollback();
- throw e;
- }
-
- this._dbConnection.schemaVersion = DB_VERSION;
- transaction.commit();
- this.log("DB migration completed.");
- },
-
-
- /**
- * Version 2 adds a GUID column. Existing logins are assigned a random GUID.
- */
- _dbMigrateToVersion2 : function () {
- // Check to see if GUID column already exists, add if needed
- let query;
- if (!this._dbColumnExists("guid")) {
- query = "ALTER TABLE moz_logins ADD COLUMN guid TEXT";
- this._dbConnection.executeSimpleSQL(query);
-
- query = "CREATE INDEX IF NOT EXISTS moz_logins_guid_index ON moz_logins (guid)";
- this._dbConnection.executeSimpleSQL(query);
- }
-
- // Get a list of IDs for existing logins
- let ids = [];
- query = "SELECT id FROM moz_logins WHERE guid isnull";
- let stmt;
- try {
- stmt = this._dbCreateStatement(query);
- while (stmt.executeStep())
- ids.push(stmt.row.id);
- } catch (e) {
- this.log("Failed getting IDs: " + e);
- throw e;
- } finally {
- if (stmt) {
- stmt.reset();
- }
- }
-
- // Generate a GUID for each login and update the DB.
- query = "UPDATE moz_logins SET guid = :guid WHERE id = :id";
- for (let id of ids) {
- let params = {
- id: id,
- guid: this._uuidService.generateUUID().toString()
- };
-
- try {
- stmt = this._dbCreateStatement(query, params);
- stmt.execute();
- } catch (e) {
- this.log("Failed setting GUID: " + e);
- throw e;
- } finally {
- if (stmt) {
- stmt.reset();
- }
- }
- }
- },
-
-
- /**
- * Version 3 adds a encType column.
- */
- _dbMigrateToVersion3 : function () {
- // Check to see if encType column already exists, add if needed
- let query;
- if (!this._dbColumnExists("encType")) {
- query = "ALTER TABLE moz_logins ADD COLUMN encType INTEGER";
- this._dbConnection.executeSimpleSQL(query);
-
- query = "CREATE INDEX IF NOT EXISTS " +
- "moz_logins_encType_index ON moz_logins (encType)";
- this._dbConnection.executeSimpleSQL(query);
- }
-
- // Get a list of existing logins
- let logins = [];
- let stmt;
- query = "SELECT id, encryptedUsername, encryptedPassword " +
- "FROM moz_logins WHERE encType isnull";
- try {
- stmt = this._dbCreateStatement(query);
- while (stmt.executeStep()) {
- let params = { id: stmt.row.id };
- // We will tag base64 logins correctly, but no longer support their use.
- if (stmt.row.encryptedUsername.charAt(0) == '~' ||
- stmt.row.encryptedPassword.charAt(0) == '~')
- params.encType = Ci.nsILoginManagerCrypto.ENCTYPE_BASE64;
- else
- params.encType = Ci.nsILoginManagerCrypto.ENCTYPE_SDR;
- logins.push(params);
- }
- } catch (e) {
- this.log("Failed getting logins: " + e);
- throw e;
- } finally {
- if (stmt) {
- stmt.reset();
- }
- }
-
- // Determine encryption type for each login and update the DB.
- query = "UPDATE moz_logins SET encType = :encType WHERE id = :id";
- for (let params of logins) {
- try {
- stmt = this._dbCreateStatement(query, params);
- stmt.execute();
- } catch (e) {
- this.log("Failed setting encType: " + e);
- throw e;
- } finally {
- if (stmt) {
- stmt.reset();
- }
- }
- }
- },
-
-
- /**
- * Version 4 adds timeCreated, timeLastUsed, timePasswordChanged,
- * and timesUsed columns
- */
- _dbMigrateToVersion4 : function () {
- let query;
- // Add the new columns, if needed.
- for (let column of ["timeCreated", "timeLastUsed", "timePasswordChanged", "timesUsed"]) {
- if (!this._dbColumnExists(column)) {
- query = "ALTER TABLE moz_logins ADD COLUMN " + column + " INTEGER";
- this._dbConnection.executeSimpleSQL(query);
- }
- }
-
- // Get a list of IDs for existing logins.
- let ids = [];
- let stmt;
- query = "SELECT id FROM moz_logins WHERE timeCreated isnull OR " +
- "timeLastUsed isnull OR timePasswordChanged isnull OR timesUsed isnull";
- try {
- stmt = this._dbCreateStatement(query);
- while (stmt.executeStep())
- ids.push(stmt.row.id);
- } catch (e) {
- this.log("Failed getting IDs: " + e);
- throw e;
- } finally {
- if (stmt) {
- stmt.reset();
- }
- }
-
- // Initialize logins with current time.
- query = "UPDATE moz_logins SET timeCreated = :initTime, timeLastUsed = :initTime, " +
- "timePasswordChanged = :initTime, timesUsed = 1 WHERE id = :id";
- let params = {
- id: null,
- initTime: Date.now()
- };
- for (let id of ids) {
- params.id = id;
- try {
- stmt = this._dbCreateStatement(query, params);
- stmt.execute();
- } catch (e) {
- this.log("Failed setting timestamps: " + e);
- throw e;
- } finally {
- if (stmt) {
- stmt.reset();
- }
- }
- }
- },
-
-
- /**
- * Version 5 adds the moz_deleted_logins table
- */
- _dbMigrateToVersion5 : function () {
- if (!this._dbConnection.tableExists("moz_deleted_logins")) {
- this._dbConnection.createTable("moz_deleted_logins", this._dbSchema.tables.moz_deleted_logins);
- }
- },
-
- /**
- * Version 6 migrates all the hosts from
- * moz_disabledHosts to the permission manager.
- */
- _dbMigrateToVersion6 : function () {
- let disabledHosts = [];
- let query = "SELECT hostname FROM moz_disabledHosts";
- let stmt;
-
- try {
- stmt = this._dbCreateStatement(query);
-
- while (stmt.executeStep()) {
- disabledHosts.push(stmt.row.hostname);
- }
-
- for (let host of disabledHosts) {
- try {
- let uri = Services.io.newURI(host, null, null);
- Services.perms.add(uri, PERMISSION_SAVE_LOGINS, Services.perms.DENY_ACTION);
- } catch (e) {
- Cu.reportError(e);
- }
- }
- } catch (e) {
- this.log(`_dbMigrateToVersion6 failed: ${e.name} : ${e.message}`);
- } finally {
- if (stmt) {
- stmt.reset();
- }
- }
-
- query = "DELETE FROM moz_disabledHosts";
- this._dbConnection.executeSimpleSQL(query);
- },
-
- /**
- * Sanity check to ensure that the columns this version of the code expects
- * are present in the DB we're using.
- */
- _dbAreExpectedColumnsPresent : function () {
- let query = "SELECT " +
- "id, " +
- "hostname, " +
- "httpRealm, " +
- "formSubmitURL, " +
- "usernameField, " +
- "passwordField, " +
- "encryptedUsername, " +
- "encryptedPassword, " +
- "guid, " +
- "encType, " +
- "timeCreated, " +
- "timeLastUsed, " +
- "timePasswordChanged, " +
- "timesUsed " +
- "FROM moz_logins";
- try {
- let stmt = this._dbConnection.createStatement(query);
- // (no need to execute statement, if it compiled we're good)
- stmt.finalize();
- } catch (e) {
- return false;
- }
-
- query = "SELECT " +
- "id, " +
- "hostname " +
- "FROM moz_disabledHosts";
- try {
- let stmt = this._dbConnection.createStatement(query);
- // (no need to execute statement, if it compiled we're good)
- stmt.finalize();
- } catch (e) {
- return false;
- }
-
- this.log("verified that expected columns are present in DB.");
- return true;
- },
-
-
- /**
- * Checks to see if the named column already exists.
- */
- _dbColumnExists : function (columnName) {
- let query = "SELECT " + columnName + " FROM moz_logins";
- try {
- let stmt = this._dbConnection.createStatement(query);
- // (no need to execute statement, if it compiled we're good)
- stmt.finalize();
- return true;
- } catch (e) {
- return false;
- }
- },
-
- _dbClose : function () {
- this.log("Closing the DB connection.");
- // Finalize all statements to free memory, avoid errors later
- for (let query in this._dbStmts) {
- let stmt = this._dbStmts[query];
- stmt.finalize();
- }
- this._dbStmts = {};
-
- if (this._dbConnection !== null) {
- try {
- this._dbConnection.close();
- } catch (e) {
- Components.utils.reportError(e);
- }
- }
- this._dbConnection = null;
- },
-
- /**
- * Called when database creation fails. Finalizes database statements,
- * closes the database connection, deletes the database file.
- */
- _dbCleanup : function (backup) {
- this.log("Cleaning up DB file - close & remove & backup=" + backup);
-
- // Create backup file
- if (backup) {
- let backupFile = this._signonsFile.leafName + ".corrupt";
- this._storageService.backupDatabaseFile(this._signonsFile, backupFile);
- }
-
- this._dbClose();
- this._signonsFile.remove(false);
- }
-
-}; // end of nsLoginManagerStorage_mozStorage implementation
-
-XPCOMUtils.defineLazyGetter(this.LoginManagerStorage_mozStorage.prototype, "log", () => {
- let logger = LoginHelper.createLogger("Login storage");
- return logger.log.bind(logger);
-});
-
-var component = [LoginManagerStorage_mozStorage];
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory(component);
diff --git a/toolkit/components/passwordmgr/test/.eslintrc.js b/toolkit/components/passwordmgr/test/.eslintrc.js
deleted file mode 100644
index ca626f31ce..0000000000
--- a/toolkit/components/passwordmgr/test/.eslintrc.js
+++ /dev/null
@@ -1,13 +0,0 @@
-"use strict";
-
-module.exports = { // eslint-disable-line no-undef
- "extends": [
- "../../../../testing/mochitest/mochitest.eslintrc.js",
- "../../../../testing/mochitest/chrome.eslintrc.js"
- ],
- "rules": {
- "brace-style": "off",
- "no-undef": "off",
- "no-unused-vars": "off",
- },
-};
diff --git a/toolkit/components/passwordmgr/test/LoginTestUtils.jsm b/toolkit/components/passwordmgr/test/LoginTestUtils.jsm
deleted file mode 100644
index 2fd8a31a3f..0000000000
--- a/toolkit/components/passwordmgr/test/LoginTestUtils.jsm
+++ /dev/null
@@ -1,295 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Shared functions generally available for testing login components.
- */
-
-"use strict";
-
-this.EXPORTED_SYMBOLS = [
- "LoginTestUtils",
-];
-
-const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
-
-Cu.import("resource://gre/modules/Promise.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/Task.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-Cu.import("resource://testing-common/TestUtils.jsm");
-
-const LoginInfo =
- Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
- "nsILoginInfo", "init");
-
-// For now, we need consumers to provide a reference to Assert.jsm.
-var Assert = null;
-
-this.LoginTestUtils = {
- set Assert(assert) {
- Assert = assert; // eslint-disable-line no-native-reassign
- },
-
- /**
- * Forces the storage module to save all data, and the Login Manager service
- * to replace the storage module with a newly initialized instance.
- */
- * reloadData() {
- Services.obs.notifyObservers(null, "passwordmgr-storage-replace", null);
- yield TestUtils.topicObserved("passwordmgr-storage-replace-complete");
- },
-
- /**
- * Erases all the data stored by the Login Manager service.
- */
- clearData() {
- Services.logins.removeAllLogins();
- for (let hostname of Services.logins.getAllDisabledHosts()) {
- Services.logins.setLoginSavingEnabled(hostname, true);
- }
- },
-
- /**
- * Checks that the currently stored list of nsILoginInfo matches the provided
- * array. The comparison uses the "equals" method of nsILoginInfo, that does
- * not include nsILoginMetaInfo properties in the test.
- */
- checkLogins(expectedLogins) {
- this.assertLoginListsEqual(Services.logins.getAllLogins(), expectedLogins);
- },
-
- /**
- * Checks that the two provided arrays of nsILoginInfo have the same length,
- * and every login in "expected" is also found in "actual". The comparison
- * uses the "equals" method of nsILoginInfo, that does not include
- * nsILoginMetaInfo properties in the test.
- */
- assertLoginListsEqual(actual, expected) {
- Assert.equal(expected.length, actual.length);
- Assert.ok(expected.every(e => actual.some(a => a.equals(e))));
- },
-
- /**
- * Checks that the two provided arrays of strings contain the same values,
- * maybe in a different order, case-sensitively.
- */
- assertDisabledHostsEqual(actual, expected) {
- Assert.deepEqual(actual.sort(), expected.sort());
- },
-
- /**
- * Checks whether the given time, expressed as the number of milliseconds
- * since January 1, 1970, 00:00:00 UTC, falls within 30 seconds of now.
- */
- assertTimeIsAboutNow(timeMs) {
- Assert.ok(Math.abs(timeMs - Date.now()) < 30000);
- },
-};
-
-/**
- * This object contains functions that return new instances of nsILoginInfo for
- * every call. The returned instances can be compared using their "equals" or
- * "matches" methods, or modified for the needs of the specific test being run.
- *
- * Any modification to the test data requires updating the tests accordingly, in
- * particular the search tests.
- */
-this.LoginTestUtils.testData = {
- /**
- * Returns a new nsILoginInfo for use with form submits.
- *
- * @param modifications
- * Each property of this object replaces the property of the same name
- * in the returned nsILoginInfo or nsILoginMetaInfo.
- */
- formLogin(modifications) {
- let loginInfo = new LoginInfo("http://www3.example.com",
- "http://www.example.com", null,
- "the username", "the password",
- "form_field_username", "form_field_password");
- loginInfo.QueryInterface(Ci.nsILoginMetaInfo);
- if (modifications) {
- for (let [name, value] of Object.entries(modifications)) {
- loginInfo[name] = value;
- }
- }
- return loginInfo;
- },
-
- /**
- * Returns a new nsILoginInfo for use with HTTP authentication.
- *
- * @param modifications
- * Each property of this object replaces the property of the same name
- * in the returned nsILoginInfo or nsILoginMetaInfo.
- */
- authLogin(modifications) {
- let loginInfo = new LoginInfo("http://www.example.org", null,
- "The HTTP Realm", "the username",
- "the password", "", "");
- loginInfo.QueryInterface(Ci.nsILoginMetaInfo);
- if (modifications) {
- for (let [name, value] of Object.entries(modifications)) {
- loginInfo[name] = value;
- }
- }
- return loginInfo;
- },
-
- /**
- * Returns an array of typical nsILoginInfo that could be stored in the
- * database.
- */
- loginList() {
- return [
- // --- Examples of form logins (subdomains of example.com) ---
-
- // Simple form login with named fields for username and password.
- new LoginInfo("http://www.example.com", "http://www.example.com", null,
- "the username", "the password for www.example.com",
- "form_field_username", "form_field_password"),
-
- // Different schemes are treated as completely different sites.
- new LoginInfo("https://www.example.com", "https://www.example.com", null,
- "the username", "the password for https",
- "form_field_username", "form_field_password"),
-
- // Subdomains are treated as completely different sites.
- new LoginInfo("https://example.com", "https://example.com", null,
- "the username", "the password for example.com",
- "form_field_username", "form_field_password"),
-
- // Forms found on the same host, but with different hostnames in the
- // "action" attribute, are handled independently.
- new LoginInfo("http://www3.example.com", "http://www.example.com", null,
- "the username", "the password",
- "form_field_username", "form_field_password"),
- new LoginInfo("http://www3.example.com", "https://www.example.com", null,
- "the username", "the password",
- "form_field_username", "form_field_password"),
- new LoginInfo("http://www3.example.com", "http://example.com", null,
- "the username", "the password",
- "form_field_username", "form_field_password"),
-
- // It is not possible to store multiple passwords for the same username,
- // however multiple passwords can be stored when the usernames differ.
- // An empty username is a valid case and different from the others.
- new LoginInfo("http://www4.example.com", "http://www4.example.com", null,
- "username one", "password one",
- "form_field_username", "form_field_password"),
- new LoginInfo("http://www4.example.com", "http://www4.example.com", null,
- "username two", "password two",
- "form_field_username", "form_field_password"),
- new LoginInfo("http://www4.example.com", "http://www4.example.com", null,
- "", "password three",
- "form_field_username", "form_field_password"),
-
- // Username and passwords fields in forms may have no "name" attribute.
- new LoginInfo("http://www5.example.com", "http://www5.example.com", null,
- "multi username", "multi password", "", ""),
-
- // Forms with PIN-type authentication will typically have no username.
- new LoginInfo("http://www6.example.com", "http://www6.example.com", null,
- "", "12345", "", "form_field_password"),
-
- // --- Examples of authentication logins (subdomains of example.org) ---
-
- // Simple HTTP authentication login.
- new LoginInfo("http://www.example.org", null, "The HTTP Realm",
- "the username", "the password", "", ""),
-
- // Simple FTP authentication login.
- new LoginInfo("ftp://ftp.example.org", null, "ftp://ftp.example.org",
- "the username", "the password", "", ""),
-
- // Multiple HTTP authentication logins can be stored for different realms.
- new LoginInfo("http://www2.example.org", null, "The HTTP Realm",
- "the username", "the password", "", ""),
- new LoginInfo("http://www2.example.org", null, "The HTTP Realm Other",
- "the username other", "the password other", "", ""),
-
- // --- Both form and authentication logins (example.net) ---
-
- new LoginInfo("http://example.net", "http://example.net", null,
- "the username", "the password",
- "form_field_username", "form_field_password"),
- new LoginInfo("http://example.net", "http://www.example.net", null,
- "the username", "the password",
- "form_field_username", "form_field_password"),
- new LoginInfo("http://example.net", "http://www.example.net", null,
- "username two", "the password",
- "form_field_username", "form_field_password"),
- new LoginInfo("http://example.net", null, "The HTTP Realm",
- "the username", "the password", "", ""),
- new LoginInfo("http://example.net", null, "The HTTP Realm Other",
- "username two", "the password", "", ""),
- new LoginInfo("ftp://example.net", null, "ftp://example.net",
- "the username", "the password", "", ""),
-
- // --- Examples of logins added by extensions (chrome scheme) ---
-
- new LoginInfo("chrome://example_extension", null, "Example Login One",
- "the username", "the password one", "", ""),
- new LoginInfo("chrome://example_extension", null, "Example Login Two",
- "the username", "the password two", "", ""),
- ];
- },
-};
-
-this.LoginTestUtils.recipes = {
- getRecipeParent() {
- let { LoginManagerParent } = Cu.import("resource://gre/modules/LoginManagerParent.jsm", {});
- if (!LoginManagerParent.recipeParentPromise) {
- return null;
- }
- return LoginManagerParent.recipeParentPromise.then((recipeParent) => {
- return recipeParent;
- });
- },
-};
-
-this.LoginTestUtils.masterPassword = {
- masterPassword: "omgsecret!",
-
- _set(enable) {
- let oldPW, newPW;
- if (enable) {
- oldPW = "";
- newPW = this.masterPassword;
- } else {
- oldPW = this.masterPassword;
- newPW = "";
- }
-
- let secmodDB = Cc["@mozilla.org/security/pkcs11moduledb;1"]
- .getService(Ci.nsIPKCS11ModuleDB);
- let slot = secmodDB.findSlotByName("");
- if (!slot) {
- throw new Error("Can't find slot");
- }
-
- // Set master password. Note that this does not log you in, so the next
- // invocation of pwmgr can trigger a MP prompt.
- let pk11db = Cc["@mozilla.org/security/pk11tokendb;1"]
- .getService(Ci.nsIPK11TokenDB);
- let token = pk11db.findTokenByName("");
- if (slot.status == Ci.nsIPKCS11Slot.SLOT_UNINITIALIZED) {
- dump("MP initialized to " + newPW + "\n");
- token.initPassword(newPW);
- } else {
- token.checkPassword(oldPW);
- dump("MP change from " + oldPW + " to " + newPW + "\n");
- token.changePassword(oldPW, newPW);
- }
- },
-
- enable() {
- this._set(true);
- },
-
- disable() {
- this._set(false);
- },
-};
diff --git a/toolkit/components/passwordmgr/test/authenticate.sjs b/toolkit/components/passwordmgr/test/authenticate.sjs
deleted file mode 100644
index 42edc32203..0000000000
--- a/toolkit/components/passwordmgr/test/authenticate.sjs
+++ /dev/null
@@ -1,228 +0,0 @@
-function handleRequest(request, response)
-{
- try {
- reallyHandleRequest(request, response);
- } catch (e) {
- response.setStatusLine("1.0", 200, "AlmostOK");
- response.write("Error handling request: " + e);
- }
-}
-
-
-function reallyHandleRequest(request, response) {
- var match;
- var requestAuth = true, requestProxyAuth = true;
-
- // Allow the caller to drive how authentication is processed via the query.
- // Eg, http://localhost:8888/authenticate.sjs?user=foo&realm=bar
- // The extra ? allows the user/pass/realm checks to succeed if the name is
- // at the beginning of the query string.
- var query = "?" + request.queryString;
-
- var expected_user = "", expected_pass = "", realm = "mochitest";
- var proxy_expected_user = "", proxy_expected_pass = "", proxy_realm = "mochi-proxy";
- var huge = false, plugin = false, anonymous = false, formauth = false;
- var authHeaderCount = 1;
- // user=xxx
- match = /[^_]user=([^&]*)/.exec(query);
- if (match)
- expected_user = match[1];
-
- // pass=xxx
- match = /[^_]pass=([^&]*)/.exec(query);
- if (match)
- expected_pass = match[1];
-
- // realm=xxx
- match = /[^_]realm=([^&]*)/.exec(query);
- if (match)
- realm = match[1];
-
- // proxy_user=xxx
- match = /proxy_user=([^&]*)/.exec(query);
- if (match)
- proxy_expected_user = match[1];
-
- // proxy_pass=xxx
- match = /proxy_pass=([^&]*)/.exec(query);
- if (match)
- proxy_expected_pass = match[1];
-
- // proxy_realm=xxx
- match = /proxy_realm=([^&]*)/.exec(query);
- if (match)
- proxy_realm = match[1];
-
- // huge=1
- match = /huge=1/.exec(query);
- if (match)
- huge = true;
-
- // plugin=1
- match = /plugin=1/.exec(query);
- if (match)
- plugin = true;
-
- // multiple=1
- match = /multiple=([^&]*)/.exec(query);
- if (match)
- authHeaderCount = match[1]+0;
-
- // anonymous=1
- match = /anonymous=1/.exec(query);
- if (match)
- anonymous = true;
-
- // formauth=1
- match = /formauth=1/.exec(query);
- if (match)
- formauth = true;
-
- // Look for an authentication header, if any, in the request.
- //
- // EG: Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
- //
- // This test only supports Basic auth. The value sent by the client is
- // "username:password", obscured with base64 encoding.
-
- var actual_user = "", actual_pass = "", authHeader, authPresent = false;
- if (request.hasHeader("Authorization")) {
- authPresent = true;
- authHeader = request.getHeader("Authorization");
- match = /Basic (.+)/.exec(authHeader);
- if (match.length != 2)
- throw new Error("Couldn't parse auth header: " + authHeader);
-
- var userpass = base64ToString(match[1]); // no atob() :-(
- match = /(.*):(.*)/.exec(userpass);
- if (match.length != 3)
- throw new Error("Couldn't decode auth header: " + userpass);
- actual_user = match[1];
- actual_pass = match[2];
- }
-
- var proxy_actual_user = "", proxy_actual_pass = "";
- if (request.hasHeader("Proxy-Authorization")) {
- authHeader = request.getHeader("Proxy-Authorization");
- match = /Basic (.+)/.exec(authHeader);
- if (match.length != 2)
- throw new Error("Couldn't parse auth header: " + authHeader);
-
- var userpass = base64ToString(match[1]); // no atob() :-(
- match = /(.*):(.*)/.exec(userpass);
- if (match.length != 3)
- throw new Error("Couldn't decode auth header: " + userpass);
- proxy_actual_user = match[1];
- proxy_actual_pass = match[2];
- }
-
- // Don't request authentication if the credentials we got were what we
- // expected.
- if (expected_user == actual_user &&
- expected_pass == actual_pass) {
- requestAuth = false;
- }
- if (proxy_expected_user == proxy_actual_user &&
- proxy_expected_pass == proxy_actual_pass) {
- requestProxyAuth = false;
- }
-
- if (anonymous) {
- if (authPresent) {
- response.setStatusLine("1.0", 400, "Unexpected authorization header found");
- } else {
- response.setStatusLine("1.0", 200, "Authorization header not found");
- }
- } else {
- if (requestProxyAuth) {
- response.setStatusLine("1.0", 407, "Proxy authentication required");
- for (i = 0; i < authHeaderCount; ++i)
- response.setHeader("Proxy-Authenticate", "basic realm=\"" + proxy_realm + "\"", true);
- } else if (requestAuth) {
- if (formauth && authPresent)
- response.setStatusLine("1.0", 403, "Form authentication required");
- else
- response.setStatusLine("1.0", 401, "Authentication required");
- for (i = 0; i < authHeaderCount; ++i)
- response.setHeader("WWW-Authenticate", "basic realm=\"" + realm + "\"", true);
- } else {
- response.setStatusLine("1.0", 200, "OK");
- }
- }
-
- response.setHeader("Content-Type", "application/xhtml+xml", false);
- response.write("<html xmlns='http://www.w3.org/1999/xhtml'>");
- response.write("<p>Login: <span id='ok'>" + (requestAuth ? "FAIL" : "PASS") + "</span></p>\n");
- response.write("<p>Proxy: <span id='proxy'>" + (requestProxyAuth ? "FAIL" : "PASS") + "</span></p>\n");
- response.write("<p>Auth: <span id='auth'>" + authHeader + "</span></p>\n");
- response.write("<p>User: <span id='user'>" + actual_user + "</span></p>\n");
- response.write("<p>Pass: <span id='pass'>" + actual_pass + "</span></p>\n");
-
- if (huge) {
- response.write("<div style='display: none'>");
- for (i = 0; i < 100000; i++) {
- response.write("123456789\n");
- }
- response.write("</div>");
- response.write("<span id='footnote'>This is a footnote after the huge content fill</span>");
- }
-
- if (plugin) {
- response.write("<embed id='embedtest' style='width: 400px; height: 100px;' " +
- "type='application/x-test'></embed>\n");
- }
-
- response.write("</html>");
-}
-
-
-// base64 decoder
-//
-// Yoinked from extensions/xml-rpc/src/nsXmlRpcClient.js because btoa()
-// doesn't seem to exist. :-(
-/* Convert Base64 data to a string */
-const toBinaryTable = [
- -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
- -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
- -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, -1,-1,-1,63,
- 52,53,54,55, 56,57,58,59, 60,61,-1,-1, -1, 0,-1,-1,
- -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,
- 15,16,17,18, 19,20,21,22, 23,24,25,-1, -1,-1,-1,-1,
- -1,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
- 41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1
-];
-const base64Pad = '=';
-
-function base64ToString(data) {
-
- var result = '';
- var leftbits = 0; // number of bits decoded, but yet to be appended
- var leftdata = 0; // bits decoded, but yet to be appended
-
- // Convert one by one.
- for (var i = 0; i < data.length; i++) {
- var c = toBinaryTable[data.charCodeAt(i) & 0x7f];
- var padding = (data[i] == base64Pad);
- // Skip illegal characters and whitespace
- if (c == -1) continue;
-
- // Collect data into leftdata, update bitcount
- leftdata = (leftdata << 6) | c;
- leftbits += 6;
-
- // If we have 8 or more bits, append 8 bits to the result
- if (leftbits >= 8) {
- leftbits -= 8;
- // Append if not padding.
- if (!padding)
- result += String.fromCharCode((leftdata >> leftbits) & 0xff);
- leftdata &= (1 << leftbits) - 1;
- }
- }
-
- // If there are any bits left, the base64 string was corrupted
- if (leftbits)
- throw Components.Exception('Corrupted base64 string');
-
- return result;
-}
diff --git a/toolkit/components/passwordmgr/test/blank.html b/toolkit/components/passwordmgr/test/blank.html
deleted file mode 100644
index 81ddc2235b..0000000000
--- a/toolkit/components/passwordmgr/test/blank.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
- </head>
- <body>
- </body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/browser/.eslintrc.js b/toolkit/components/passwordmgr/test/browser/.eslintrc.js
deleted file mode 100644
index 7c80211924..0000000000
--- a/toolkit/components/passwordmgr/test/browser/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/mochitest/browser.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/passwordmgr/test/browser/authenticate.sjs b/toolkit/components/passwordmgr/test/browser/authenticate.sjs
deleted file mode 100644
index fe2d2423cb..0000000000
--- a/toolkit/components/passwordmgr/test/browser/authenticate.sjs
+++ /dev/null
@@ -1,110 +0,0 @@
-function handleRequest(request, response)
-{
- var match;
- var requestAuth = true;
-
- // Allow the caller to drive how authentication is processed via the query.
- // Eg, http://localhost:8888/authenticate.sjs?user=foo&realm=bar
- // The extra ? allows the user/pass/realm checks to succeed if the name is
- // at the beginning of the query string.
- var query = "?" + request.queryString;
-
- var expected_user = "test", expected_pass = "testpass", realm = "mochitest";
-
- // Look for an authentication header, if any, in the request.
- //
- // EG: Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
- //
- // This test only supports Basic auth. The value sent by the client is
- // "username:password", obscured with base64 encoding.
-
- var actual_user = "", actual_pass = "", authHeader, authPresent = false;
- if (request.hasHeader("Authorization")) {
- authPresent = true;
- authHeader = request.getHeader("Authorization");
- match = /Basic (.+)/.exec(authHeader);
- if (match.length != 2)
- throw new Error("Couldn't parse auth header: " + authHeader);
-
- var userpass = base64ToString(match[1]); // no atob() :-(
- match = /(.*):(.*)/.exec(userpass);
- if (match.length != 3)
- throw new Error("Couldn't decode auth header: " + userpass);
- actual_user = match[1];
- actual_pass = match[2];
- }
-
- // Don't request authentication if the credentials we got were what we
- // expected.
- if (expected_user == actual_user &&
- expected_pass == actual_pass) {
- requestAuth = false;
- }
-
- if (requestAuth) {
- response.setStatusLine("1.0", 401, "Authentication required");
- response.setHeader("WWW-Authenticate", "basic realm=\"" + realm + "\"", true);
- } else {
- response.setStatusLine("1.0", 200, "OK");
- }
-
- response.setHeader("Content-Type", "application/xhtml+xml", false);
- response.write("<html xmlns='http://www.w3.org/1999/xhtml'>");
- response.write("<p>Login: <span id='ok'>" + (requestAuth ? "FAIL" : "PASS") + "</span></p>\n");
- response.write("<p>Auth: <span id='auth'>" + authHeader + "</span></p>\n");
- response.write("<p>User: <span id='user'>" + actual_user + "</span></p>\n");
- response.write("<p>Pass: <span id='pass'>" + actual_pass + "</span></p>\n");
- response.write("</html>");
-}
-
-
-// base64 decoder
-//
-// Yoinked from extensions/xml-rpc/src/nsXmlRpcClient.js because btoa()
-// doesn't seem to exist. :-(
-/* Convert Base64 data to a string */
-const toBinaryTable = [
- -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
- -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
- -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, -1,-1,-1,63,
- 52,53,54,55, 56,57,58,59, 60,61,-1,-1, -1, 0,-1,-1,
- -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,
- 15,16,17,18, 19,20,21,22, 23,24,25,-1, -1,-1,-1,-1,
- -1,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
- 41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1
-];
-const base64Pad = '=';
-
-function base64ToString(data) {
-
- var result = '';
- var leftbits = 0; // number of bits decoded, but yet to be appended
- var leftdata = 0; // bits decoded, but yet to be appended
-
- // Convert one by one.
- for (var i = 0; i < data.length; i++) {
- var c = toBinaryTable[data.charCodeAt(i) & 0x7f];
- var padding = (data[i] == base64Pad);
- // Skip illegal characters and whitespace
- if (c == -1) continue;
-
- // Collect data into leftdata, update bitcount
- leftdata = (leftdata << 6) | c;
- leftbits += 6;
-
- // If we have 8 or more bits, append 8 bits to the result
- if (leftbits >= 8) {
- leftbits -= 8;
- // Append if not padding.
- if (!padding)
- result += String.fromCharCode((leftdata >> leftbits) & 0xff);
- leftdata &= (1 << leftbits) - 1;
- }
- }
-
- // If there are any bits left, the base64 string was corrupted
- if (leftbits)
- throw Components.Exception('Corrupted base64 string');
-
- return result;
-}
diff --git a/toolkit/components/passwordmgr/test/browser/browser.ini b/toolkit/components/passwordmgr/test/browser/browser.ini
deleted file mode 100644
index b175914367..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser.ini
+++ /dev/null
@@ -1,72 +0,0 @@
-[DEFAULT]
-support-files =
- ../formsubmit.sjs
- authenticate.sjs
- form_basic.html
- form_basic_iframe.html
- formless_basic.html
- form_same_origin_action.html
- form_cross_origin_secure_action.html
- head.js
- insecure_test.html
- insecure_test_subframe.html
- multiple_forms.html
- streamConverter_content.sjs
-
-[browser_autocomplete_insecure_warning.js]
-support-files =
- form_cross_origin_insecure_action.html
-[browser_capture_doorhanger.js]
-support-files =
- subtst_notifications_1.html
- subtst_notifications_2.html
- subtst_notifications_2pw_0un.html
- subtst_notifications_2pw_1un_1text.html
- subtst_notifications_3.html
- subtst_notifications_4.html
- subtst_notifications_5.html
- subtst_notifications_6.html
- subtst_notifications_8.html
- subtst_notifications_9.html
- subtst_notifications_10.html
- subtst_notifications_change_p.html
-[browser_capture_doorhanger_httpsUpgrade.js]
-support-files =
- subtst_notifications_1.html
- subtst_notifications_8.html
-[browser_capture_doorhanger_window_open.js]
-support-files =
- subtst_notifications_11.html
- subtst_notifications_11_popup.html
-skip-if = os == "linux" # Bug 1312981, bug 1313136
-[browser_context_menu_autocomplete_interaction.js]
-[browser_username_select_dialog.js]
-support-files =
- subtst_notifications_change_p.html
-[browser_DOMFormHasPassword.js]
-[browser_DOMInputPasswordAdded.js]
-[browser_exceptions_dialog.js]
-[browser_formless_submit_chrome.js]
-[browser_hasInsecureLoginForms.js]
-[browser_hasInsecureLoginForms_streamConverter.js]
-[browser_http_autofill.js]
-[browser_insecurePasswordConsoleWarning.js]
-support-files =
- form_cross_origin_insecure_action.html
-[browser_master_password_autocomplete.js]
-[browser_notifications.js]
-[browser_notifications_username.js]
-[browser_notifications_password.js]
-[browser_notifications_2.js]
-skip-if = os == "linux" # Bug 1272849 Main action button disabled state intermittent
-[browser_passwordmgr_editing.js]
-skip-if = os == "linux"
-[browser_context_menu.js]
-[browser_context_menu_iframe.js]
-[browser_passwordmgr_contextmenu.js]
-subsuite = clipboard
-[browser_passwordmgr_fields.js]
-[browser_passwordmgr_observers.js]
-[browser_passwordmgr_sort.js]
-[browser_passwordmgr_switchtab.js]
-[browser_passwordmgrdlg.js]
diff --git a/toolkit/components/passwordmgr/test/browser/browser_DOMFormHasPassword.js b/toolkit/components/passwordmgr/test/browser/browser_DOMFormHasPassword.js
deleted file mode 100644
index 80a0dd903e..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_DOMFormHasPassword.js
+++ /dev/null
@@ -1,94 +0,0 @@
-const ids = {
- INPUT_ID: "input1",
- FORM1_ID: "form1",
- FORM2_ID: "form2",
- CHANGE_INPUT_ID: "input2",
-};
-
-function task(contentIds) {
- let resolve;
- let promise = new Promise(r => { resolve = r; });
-
- function unexpectedContentEvent(evt) {
- ok(false, "Received a " + evt.type + " event on content");
- }
-
- var gDoc = null;
-
- addEventListener("load", tabLoad, true);
-
- function tabLoad() {
- if (content.location.href == "about:blank")
- return;
- removeEventListener("load", tabLoad, true);
-
- gDoc = content.document;
- gDoc.addEventListener("DOMFormHasPassword", unexpectedContentEvent, false);
- gDoc.defaultView.setTimeout(test_inputAdd, 0);
- }
-
- function test_inputAdd() {
- addEventListener("DOMFormHasPassword", test_inputAddHandler, false);
- let input = gDoc.createElementNS("http://www.w3.org/1999/xhtml", "input");
- input.setAttribute("type", "password");
- input.setAttribute("id", contentIds.INPUT_ID);
- input.setAttribute("data-test", "unique-attribute");
- gDoc.getElementById(contentIds.FORM1_ID).appendChild(input);
- }
-
- function test_inputAddHandler(evt) {
- removeEventListener(evt.type, test_inputAddHandler, false);
- is(evt.target.id, contentIds.FORM1_ID,
- evt.type + " event targets correct form element (added password element)");
- gDoc.defaultView.setTimeout(test_inputChangeForm, 0);
- }
-
- function test_inputChangeForm() {
- addEventListener("DOMFormHasPassword", test_inputChangeFormHandler, false);
- let input = gDoc.getElementById(contentIds.INPUT_ID);
- input.setAttribute("form", contentIds.FORM2_ID);
- }
-
- function test_inputChangeFormHandler(evt) {
- removeEventListener(evt.type, test_inputChangeFormHandler, false);
- is(evt.target.id, contentIds.FORM2_ID,
- evt.type + " event targets correct form element (changed form)");
- gDoc.defaultView.setTimeout(test_inputChangesType, 0);
- }
-
- function test_inputChangesType() {
- addEventListener("DOMFormHasPassword", test_inputChangesTypeHandler, false);
- let input = gDoc.getElementById(contentIds.CHANGE_INPUT_ID);
- input.setAttribute("type", "password");
- }
-
- function test_inputChangesTypeHandler(evt) {
- removeEventListener(evt.type, test_inputChangesTypeHandler, false);
- is(evt.target.id, contentIds.FORM1_ID,
- evt.type + " event targets correct form element (changed type)");
- gDoc.defaultView.setTimeout(finish, 0);
- }
-
- function finish() {
- gDoc.removeEventListener("DOMFormHasPassword", unexpectedContentEvent, false);
- resolve();
- }
-
- return promise;
-}
-
-add_task(function* () {
- let tab = gBrowser.selectedTab = gBrowser.addTab();
-
- let promise = ContentTask.spawn(tab.linkedBrowser, ids, task);
- tab.linkedBrowser.loadURI("data:text/html;charset=utf-8," +
- "<html><body>" +
- "<form id='" + ids.FORM1_ID + "'>" +
- "<input id='" + ids.CHANGE_INPUT_ID + "'></form>" +
- "<form id='" + ids.FORM2_ID + "'></form>" +
- "</body></html>");
- yield promise;
-
- ok(true, "Test completed");
- gBrowser.removeCurrentTab();
-});
diff --git a/toolkit/components/passwordmgr/test/browser/browser_DOMInputPasswordAdded.js b/toolkit/components/passwordmgr/test/browser/browser_DOMInputPasswordAdded.js
deleted file mode 100644
index f54892e190..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_DOMInputPasswordAdded.js
+++ /dev/null
@@ -1,99 +0,0 @@
-const consts = {
- HTML_NS: "http://www.w3.org/1999/xhtml",
-
- INPUT_ID: "input1",
- FORM1_ID: "form1",
- FORM2_ID: "form2",
- CHANGE_INPUT_ID: "input2",
- BODY_INPUT_ID: "input3",
-};
-
-function task(contentConsts) {
- let resolve;
- let promise = new Promise(r => { resolve = r; });
-
- function unexpectedContentEvent(evt) {
- Assert.ok(false, "Received a " + evt.type + " event on content");
- }
-
- var gDoc = null;
-
- addEventListener("load", tabLoad, true);
-
- function tabLoad() {
- removeEventListener("load", tabLoad, true);
- gDoc = content.document;
- // These events shouldn't escape to content.
- gDoc.addEventListener("DOMInputPasswordAdded", unexpectedContentEvent, false);
- gDoc.defaultView.setTimeout(test_inputAdd, 0);
- }
-
- function test_inputAdd() {
- addEventListener("DOMInputPasswordAdded", test_inputAddHandler, false);
- let input = gDoc.createElementNS(contentConsts.HTML_NS, "input");
- input.setAttribute("type", "password");
- input.setAttribute("id", contentConsts.INPUT_ID);
- input.setAttribute("data-test", "unique-attribute");
- gDoc.getElementById(contentConsts.FORM1_ID).appendChild(input);
- info("Done appending the input element");
- }
-
- function test_inputAddHandler(evt) {
- removeEventListener(evt.type, test_inputAddHandler, false);
- Assert.equal(evt.target.id, contentConsts.INPUT_ID,
- evt.type + " event targets correct input element (added password element)");
- gDoc.defaultView.setTimeout(test_inputAddOutsideForm, 0);
- }
-
- function test_inputAddOutsideForm() {
- addEventListener("DOMInputPasswordAdded", test_inputAddOutsideFormHandler, false);
- let input = gDoc.createElementNS(contentConsts.HTML_NS, "input");
- input.setAttribute("type", "password");
- input.setAttribute("id", contentConsts.BODY_INPUT_ID);
- input.setAttribute("data-test", "unique-attribute");
- gDoc.body.appendChild(input);
- info("Done appending the input element to the body");
- }
-
- function test_inputAddOutsideFormHandler(evt) {
- removeEventListener(evt.type, test_inputAddOutsideFormHandler, false);
- Assert.equal(evt.target.id, contentConsts.BODY_INPUT_ID,
- evt.type + " event targets correct input element (added password element outside form)");
- gDoc.defaultView.setTimeout(test_inputChangesType, 0);
- }
-
- function test_inputChangesType() {
- addEventListener("DOMInputPasswordAdded", test_inputChangesTypeHandler, false);
- let input = gDoc.getElementById(contentConsts.CHANGE_INPUT_ID);
- input.setAttribute("type", "password");
- }
-
- function test_inputChangesTypeHandler(evt) {
- removeEventListener(evt.type, test_inputChangesTypeHandler, false);
- Assert.equal(evt.target.id, contentConsts.CHANGE_INPUT_ID,
- evt.type + " event targets correct input element (changed type)");
- gDoc.defaultView.setTimeout(completeTest, 0);
- }
-
- function completeTest() {
- Assert.ok(true, "Test completed");
- gDoc.removeEventListener("DOMInputPasswordAdded", unexpectedContentEvent, false);
- resolve();
- }
-
- return promise;
-}
-
-add_task(function* () {
- let tab = gBrowser.selectedTab = gBrowser.addTab();
- let promise = ContentTask.spawn(tab.linkedBrowser, consts, task);
- tab.linkedBrowser.loadURI("data:text/html;charset=utf-8," +
- "<html><body>" +
- "<form id='" + consts.FORM1_ID + "'>" +
- "<input id='" + consts.CHANGE_INPUT_ID + "'></form>" +
- "<form id='" + consts.FORM2_ID + "'></form>" +
- "</body></html>");
- yield promise;
- gBrowser.removeCurrentTab();
-});
-
diff --git a/toolkit/components/passwordmgr/test/browser/browser_autocomplete_insecure_warning.js b/toolkit/components/passwordmgr/test/browser/browser_autocomplete_insecure_warning.js
deleted file mode 100644
index 6aa8e5cf7e..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_autocomplete_insecure_warning.js
+++ /dev/null
@@ -1,41 +0,0 @@
-"use strict";
-
-const EXPECTED_SUPPORT_URL = Services.urlFormatter.formatURLPref("app.support.baseURL") +
- "insecure-password";
-
-add_task(function* test_clickInsecureFieldWarning() {
- let url = "https://example.com" + DIRECTORY_PATH + "form_cross_origin_insecure_action.html";
-
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url,
- }, function*(browser) {
- let popup = document.getElementById("PopupAutoComplete");
- ok(popup, "Got popup");
-
- let promiseShown = BrowserTestUtils.waitForEvent(popup, "popupshown");
-
- yield SimpleTest.promiseFocus(browser);
- info("content window focused");
-
- // Focus the username field to open the popup.
- yield ContentTask.spawn(browser, null, function openAutocomplete() {
- content.document.getElementById("form-basic-username").focus();
- });
-
- yield promiseShown;
- ok(promiseShown, "autocomplete shown");
-
- let warningItem = document.getAnonymousElementByAttribute(popup, "type", "insecureWarning");
- ok(warningItem, "Got warning richlistitem");
-
- yield BrowserTestUtils.waitForCondition(() => !warningItem.collapsed, "Wait for warning to show");
-
- info("Clicking on warning");
- let supportTabPromise = BrowserTestUtils.waitForNewTab(gBrowser, EXPECTED_SUPPORT_URL);
- EventUtils.synthesizeMouseAtCenter(warningItem, {});
- let supportTab = yield supportTabPromise;
- ok(supportTab, "Support tab opened");
- yield BrowserTestUtils.removeTab(supportTab);
- });
-});
diff --git a/toolkit/components/passwordmgr/test/browser/browser_capture_doorhanger.js b/toolkit/components/passwordmgr/test/browser/browser_capture_doorhanger.js
deleted file mode 100644
index b6bfdbf504..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_capture_doorhanger.js
+++ /dev/null
@@ -1,600 +0,0 @@
-/*
- * Test capture popup notifications
- */
-
-const BRAND_BUNDLE = Services.strings.createBundle("chrome://branding/locale/brand.properties");
-const BRAND_SHORT_NAME = BRAND_BUNDLE.GetStringFromName("brandShortName");
-
-let nsLoginInfo = new Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
- Ci.nsILoginInfo, "init");
-let login1 = new nsLoginInfo("http://example.com", "http://example.com", null,
- "notifyu1", "notifyp1", "user", "pass");
-let login2 = new nsLoginInfo("http://example.com", "http://example.com", null,
- "", "notifyp1", "", "pass");
-let login1B = new nsLoginInfo("http://example.com", "http://example.com", null,
- "notifyu1B", "notifyp1B", "user", "pass");
-let login2B = new nsLoginInfo("http://example.com", "http://example.com", null,
- "", "notifyp1B", "", "pass");
-
-requestLongerTimeout(2);
-
-add_task(function* setup() {
- // Load recipes for this test.
- let recipeParent = yield LoginManagerParent.recipeParentPromise;
- yield recipeParent.load({
- siteRecipes: [{
- hosts: ["example.org"],
- usernameSelector: "#user",
- passwordSelector: "#pass",
- }],
- });
-});
-
-add_task(function* test_remember_opens() {
- yield testSubmittingLoginForm("subtst_notifications_1.html", function*(fieldValues) {
- is(fieldValues.username, "notifyu1", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-save");
- ok(notif, "got notification popup");
- notif.remove();
- });
-});
-
-add_task(function* test_clickNever() {
- yield testSubmittingLoginForm("subtst_notifications_1.html", function*(fieldValues) {
- is(fieldValues.username, "notifyu1", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-save");
- ok(notif, "got notification popup");
- is(true, Services.logins.getLoginSavingEnabled("http://example.com"),
- "Checking for login saving enabled");
-
- yield* checkDoorhangerUsernamePassword("notifyu1", "notifyp1");
- clickDoorhangerButton(notif, NEVER_BUTTON);
- });
-
- is(Services.logins.getAllLogins().length, 0, "Should not have any logins yet");
-
- info("Make sure Never took effect");
- yield testSubmittingLoginForm("subtst_notifications_1.html", function*(fieldValues) {
- is(fieldValues.username, "notifyu1", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-save");
- ok(!notif, "checking for no notification popup");
- is(false, Services.logins.getLoginSavingEnabled("http://example.com"),
- "Checking for login saving disabled");
- Services.logins.setLoginSavingEnabled("http://example.com", true);
- });
-
- is(Services.logins.getAllLogins().length, 0, "Should not have any logins yet");
-});
-
-add_task(function* test_clickRemember() {
- yield testSubmittingLoginForm("subtst_notifications_1.html", function*(fieldValues) {
- is(fieldValues.username, "notifyu1", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-save");
- ok(notif, "got notification popup");
-
- is(Services.logins.getAllLogins().length, 0, "Should not have any logins yet");
-
- yield* checkDoorhangerUsernamePassword("notifyu1", "notifyp1");
- clickDoorhangerButton(notif, REMEMBER_BUTTON);
- });
-
- let logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should only have 1 login");
- let login = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "notifyu1", "Check the username used on the new entry");
- is(login.password, "notifyp1", "Check the password used on the new entry");
- is(login.timesUsed, 1, "Check times used on new entry");
-
- info("Make sure Remember took effect and we don't prompt for an existing login");
- yield testSubmittingLoginForm("subtst_notifications_1.html", function*(fieldValues) {
- is(fieldValues.username, "notifyu1", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-save");
- ok(!notif, "checking for no notification popup");
- });
-
- logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should only have 1 login");
- login = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "notifyu1", "Check the username used");
- is(login.password, "notifyp1", "Check the password used");
- is(login.timesUsed, 2, "Check times used incremented");
-
- checkOnlyLoginWasUsedTwice({ justChanged: false });
-
- // remove that login
- Services.logins.removeLogin(login1);
-});
-
-/* signons.rememberSignons pref tests... */
-
-add_task(function* test_rememberSignonsFalse() {
- info("Make sure we don't prompt with rememberSignons=false");
- Services.prefs.setBoolPref("signon.rememberSignons", false);
-
- yield testSubmittingLoginForm("subtst_notifications_1.html", function*(fieldValues) {
- is(fieldValues.username, "notifyu1", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-save");
- ok(!notif, "checking for no notification popup");
- });
-
- is(Services.logins.getAllLogins().length, 0, "Should not have any logins yet");
-});
-
-add_task(function* test_rememberSignonsTrue() {
- info("Make sure we prompt with rememberSignons=true");
- Services.prefs.setBoolPref("signon.rememberSignons", true);
-
- yield testSubmittingLoginForm("subtst_notifications_1.html", function*(fieldValues) {
- is(fieldValues.username, "notifyu1", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-save");
- ok(notif, "got notification popup");
- notif.remove();
- });
-
- is(Services.logins.getAllLogins().length, 0, "Should not have any logins yet");
-});
-
-/* autocomplete=off tests... */
-
-add_task(function* test_autocompleteOffUsername() {
- info("Check for notification popup when autocomplete=off present on username");
-
- yield testSubmittingLoginForm("subtst_notifications_2.html", function*(fieldValues) {
- is(fieldValues.username, "notifyu1", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-save");
- ok(notif, "checking for notification popup");
- notif.remove();
- });
-
- is(Services.logins.getAllLogins().length, 0, "Should not have any logins yet");
-});
-
-add_task(function* test_autocompleteOffPassword() {
- info("Check for notification popup when autocomplete=off present on password");
-
- yield testSubmittingLoginForm("subtst_notifications_3.html", function*(fieldValues) {
- is(fieldValues.username, "notifyu1", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-save");
- ok(notif, "checking for notification popup");
- notif.remove();
- });
-
- is(Services.logins.getAllLogins().length, 0, "Should not have any logins yet");
-});
-
-add_task(function* test_autocompleteOffForm() {
- info("Check for notification popup when autocomplete=off present on form");
-
- yield testSubmittingLoginForm("subtst_notifications_4.html", function*(fieldValues) {
- is(fieldValues.username, "notifyu1", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-save");
- ok(notif, "checking for notification popup");
- notif.remove();
- });
-
- is(Services.logins.getAllLogins().length, 0, "Should not have any logins yet");
-});
-
-
-add_task(function* test_noPasswordField() {
- info("Check for no notification popup when no password field present");
-
- yield testSubmittingLoginForm("subtst_notifications_5.html", function*(fieldValues) {
- is(fieldValues.username, "notifyu1", "Checking submitted username");
- is(fieldValues.password, "null", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-save");
- ok(!notif, "checking for no notification popup");
- });
-
- is(Services.logins.getAllLogins().length, 0, "Should not have any logins yet");
-});
-
-add_task(function* test_pwOnlyLoginMatchesForm() {
- info("Check for update popup when existing pw-only login matches form.");
- Services.logins.addLogin(login2);
-
- yield testSubmittingLoginForm("subtst_notifications_1.html", function*(fieldValues) {
- is(fieldValues.username, "notifyu1", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-change");
- ok(notif, "checking for notification popup");
- notif.remove();
- });
-
- let logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should only have 1 login");
- let login = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "", "Check the username");
- is(login.password, "notifyp1", "Check the password");
- is(login.timesUsed, 1, "Check times used");
-
- Services.logins.removeLogin(login2);
-});
-
-add_task(function* test_pwOnlyFormMatchesLogin() {
- info("Check for no notification popup when pw-only form matches existing login.");
- Services.logins.addLogin(login1);
-
- yield testSubmittingLoginForm("subtst_notifications_6.html", function*(fieldValues) {
- is(fieldValues.username, "null", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-save");
- ok(!notif, "checking for no notification popup");
- });
-
- let logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should only have 1 login");
- let login = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "notifyu1", "Check the username");
- is(login.password, "notifyp1", "Check the password");
- is(login.timesUsed, 2, "Check times used");
-
- Services.logins.removeLogin(login1);
-});
-
-add_task(function* test_pwOnlyFormDoesntMatchExisting() {
- info("Check for notification popup when pw-only form doesn't match existing login.");
- Services.logins.addLogin(login1B);
-
- yield testSubmittingLoginForm("subtst_notifications_6.html", function*(fieldValues) {
- is(fieldValues.username, "null", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-save");
- ok(notif, "got notification popup");
- notif.remove();
- });
-
- let logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should only have 1 login");
- let login = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "notifyu1B", "Check the username unchanged");
- is(login.password, "notifyp1B", "Check the password unchanged");
- is(login.timesUsed, 1, "Check times used");
-
- Services.logins.removeLogin(login1B);
-});
-
-add_task(function* test_changeUPLoginOnUPForm_dont() {
- info("Check for change-password popup, u+p login on u+p form. (not changed)");
- Services.logins.addLogin(login1);
-
- yield testSubmittingLoginForm("subtst_notifications_8.html", function*(fieldValues) {
- is(fieldValues.username, "notifyu1", "Checking submitted username");
- is(fieldValues.password, "pass2", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-change");
- ok(notif, "got notification popup");
-
- yield* checkDoorhangerUsernamePassword("notifyu1", "pass2");
- clickDoorhangerButton(notif, DONT_CHANGE_BUTTON);
- });
-
- let logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should only have 1 login");
- let login = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "notifyu1", "Check the username unchanged");
- is(login.password, "notifyp1", "Check the password unchanged");
- is(login.timesUsed, 1, "Check times used");
-
- Services.logins.removeLogin(login1);
-});
-
-add_task(function* test_changeUPLoginOnUPForm_change() {
- info("Check for change-password popup, u+p login on u+p form.");
- Services.logins.addLogin(login1);
-
- yield testSubmittingLoginForm("subtst_notifications_8.html", function*(fieldValues) {
- is(fieldValues.username, "notifyu1", "Checking submitted username");
- is(fieldValues.password, "pass2", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-change");
- ok(notif, "got notification popup");
-
- yield* checkDoorhangerUsernamePassword("notifyu1", "pass2");
- clickDoorhangerButton(notif, CHANGE_BUTTON);
-
- ok(!getCaptureDoorhanger("password-change"), "popup should be gone");
- });
-
- let logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should only have 1 login");
- let login = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "notifyu1", "Check the username unchanged");
- is(login.password, "pass2", "Check the password changed");
- is(login.timesUsed, 2, "Check times used");
-
- checkOnlyLoginWasUsedTwice({ justChanged: true });
-
- // cleanup
- login1.password = "pass2";
- Services.logins.removeLogin(login1);
- login1.password = "notifyp1";
-});
-
-add_task(function* test_changePLoginOnUPForm() {
- info("Check for change-password popup, p-only login on u+p form.");
- Services.logins.addLogin(login2);
-
- yield testSubmittingLoginForm("subtst_notifications_9.html", function*(fieldValues) {
- is(fieldValues.username, "", "Checking submitted username");
- is(fieldValues.password, "pass2", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-change");
- ok(notif, "got notification popup");
-
- yield* checkDoorhangerUsernamePassword("", "pass2");
- clickDoorhangerButton(notif, CHANGE_BUTTON);
-
- ok(!getCaptureDoorhanger("password-change"), "popup should be gone");
- });
-
- let logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should only have 1 login");
- let login = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "", "Check the username unchanged");
- is(login.password, "pass2", "Check the password changed");
- is(login.timesUsed, 2, "Check times used");
-
- // no cleanup -- saved password to be used in the next test.
-});
-
-add_task(function* test_changePLoginOnPForm() {
- info("Check for change-password popup, p-only login on p-only form.");
-
- yield testSubmittingLoginForm("subtst_notifications_10.html", function*(fieldValues) {
- is(fieldValues.username, "null", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-change");
- ok(notif, "got notification popup");
-
- yield* checkDoorhangerUsernamePassword("", "notifyp1");
- clickDoorhangerButton(notif, CHANGE_BUTTON);
-
- ok(!getCaptureDoorhanger("password-change"), "popup should be gone");
- });
-
- let logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should only have 1 login");
- let login = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "", "Check the username unchanged");
- is(login.password, "notifyp1", "Check the password changed");
- is(login.timesUsed, 3, "Check times used");
-
- Services.logins.removeLogin(login2);
-});
-
-add_task(function* test_checkUPSaveText() {
- info("Check text on a user+pass notification popup");
-
- yield testSubmittingLoginForm("subtst_notifications_1.html", function*(fieldValues) {
- is(fieldValues.username, "notifyu1", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-save");
- ok(notif, "got notification popup");
- // Check the text, which comes from the localized saveLoginText string.
- let notificationText = notif.message;
- let expectedText = "Would you like " + BRAND_SHORT_NAME + " to remember this login?";
- is(expectedText, notificationText, "Checking text: " + notificationText);
- notif.remove();
- });
-
- is(Services.logins.getAllLogins().length, 0, "Should not have any logins yet");
-});
-
-add_task(function* test_checkPSaveText() {
- info("Check text on a pass-only notification popup");
-
- yield testSubmittingLoginForm("subtst_notifications_6.html", function*(fieldValues) {
- is(fieldValues.username, "null", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-save");
- ok(notif, "got notification popup");
- // Check the text, which comes from the localized saveLoginTextNoUser string.
- let notificationText = notif.message;
- let expectedText = "Would you like " + BRAND_SHORT_NAME + " to remember this password?";
- is(expectedText, notificationText, "Checking text: " + notificationText);
- notif.remove();
- });
-
- is(Services.logins.getAllLogins().length, 0, "Should not have any logins yet");
-});
-
-add_task(function* test_capture2pw0un() {
- info("Check for notification popup when a form with 2 password fields (no username) " +
- "is submitted and there are no saved logins.");
-
- yield testSubmittingLoginForm("subtst_notifications_2pw_0un.html", function*(fieldValues) {
- is(fieldValues.username, "null", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-save");
- ok(notif, "got notification popup");
- notif.remove();
- });
-
- is(Services.logins.getAllLogins().length, 0, "Should not have any logins yet");
-});
-
-add_task(function* test_change2pw0unExistingDifferentUP() {
- info("Check for notification popup when a form with 2 password fields (no username) " +
- "is submitted and there is a saved login with a username and different password.");
-
- Services.logins.addLogin(login1B);
-
- yield testSubmittingLoginForm("subtst_notifications_2pw_0un.html", function*(fieldValues) {
- is(fieldValues.username, "null", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-change");
- ok(notif, "got notification popup");
- notif.remove();
- });
-
- let logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should only have 1 login");
- let login = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "notifyu1B", "Check the username unchanged");
- is(login.password, "notifyp1B", "Check the password unchanged");
- is(login.timesUsed, 1, "Check times used");
-
- Services.logins.removeLogin(login1B);
-});
-
-add_task(function* test_change2pw0unExistingDifferentP() {
- info("Check for notification popup when a form with 2 password fields (no username) " +
- "is submitted and there is a saved login with no username and different password.");
-
- Services.logins.addLogin(login2B);
-
- yield testSubmittingLoginForm("subtst_notifications_2pw_0un.html", function*(fieldValues) {
- is(fieldValues.username, "null", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-change");
- ok(notif, "got notification popup");
- notif.remove();
- });
-
- let logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should only have 1 login");
- let login = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "", "Check the username unchanged");
- is(login.password, "notifyp1B", "Check the password unchanged");
- is(login.timesUsed, 1, "Check times used");
-
- Services.logins.removeLogin(login2B);
-});
-
-add_task(function* test_change2pw0unExistingWithSameP() {
- info("Check for no notification popup when a form with 2 password fields (no username) " +
- "is submitted and there is a saved login with a username and the same password.");
-
- Services.logins.addLogin(login2);
-
- yield testSubmittingLoginForm("subtst_notifications_2pw_0un.html", function*(fieldValues) {
- is(fieldValues.username, "null", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-change");
- ok(!notif, "checking for no notification popup");
- });
-
- let logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should only have 1 login");
- let login = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "", "Check the username unchanged");
- is(login.password, "notifyp1", "Check the password unchanged");
- is(login.timesUsed, 2, "Check times used incremented");
-
- checkOnlyLoginWasUsedTwice({ justChanged: false });
-
- Services.logins.removeLogin(login2);
-});
-
-add_task(function* test_changeUPLoginOnPUpdateForm() {
- info("Check for change-password popup, u+p login on password update form.");
- Services.logins.addLogin(login1);
-
- yield testSubmittingLoginForm("subtst_notifications_change_p.html", function*(fieldValues) {
- is(fieldValues.username, "null", "Checking submitted username");
- is(fieldValues.password, "pass2", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-change");
- ok(notif, "got notification popup");
-
- yield* checkDoorhangerUsernamePassword("notifyu1", "pass2");
- clickDoorhangerButton(notif, CHANGE_BUTTON);
-
- ok(!getCaptureDoorhanger("password-change"), "popup should be gone");
- });
-
- let logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should only have 1 login");
- let login = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "notifyu1", "Check the username unchanged");
- is(login.password, "pass2", "Check the password changed");
- is(login.timesUsed, 2, "Check times used");
-
- checkOnlyLoginWasUsedTwice({ justChanged: true });
-
- // cleanup
- login1.password = "pass2";
- Services.logins.removeLogin(login1);
- login1.password = "notifyp1";
-});
-
-add_task(function* test_recipeCaptureFields_NewLogin() {
- info("Check that we capture the proper fields when a field recipe is in use.");
-
- yield testSubmittingLoginForm("subtst_notifications_2pw_1un_1text.html", function*(fieldValues) {
- is(fieldValues.username, "notifyu1", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-save");
- ok(notif, "got notification popup");
-
- // Sanity check, no logins should exist yet.
- let logins = Services.logins.getAllLogins();
- is(logins.length, 0, "Should not have any logins yet");
-
- yield* checkDoorhangerUsernamePassword("notifyu1", "notifyp1");
- clickDoorhangerButton(notif, REMEMBER_BUTTON);
-
- }, "http://example.org"); // The recipe is for example.org
-
- let logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should only have 1 login");
- let login = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "notifyu1", "Check the username unchanged");
- is(login.password, "notifyp1", "Check the password unchanged");
- is(login.timesUsed, 1, "Check times used");
-});
-
-add_task(function* test_recipeCaptureFields_ExistingLogin() {
- info("Check that we capture the proper fields when a field recipe is in use " +
- "and there is a matching login");
-
- yield testSubmittingLoginForm("subtst_notifications_2pw_1un_1text.html", function*(fieldValues) {
- is(fieldValues.username, "notifyu1", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-save");
- ok(!notif, "checking for no notification popup");
- }, "http://example.org");
-
- checkOnlyLoginWasUsedTwice({ justChanged: false });
- let logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should only have 1 login");
- let login = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "notifyu1", "Check the username unchanged");
- is(login.password, "notifyp1", "Check the password unchanged");
- is(login.timesUsed, 2, "Check times used incremented");
-
- Services.logins.removeAllLogins();
-});
-
-add_task(function* test_noShowPasswordOnDismissal() {
- info("Check for no Show Password field when the doorhanger is dismissed");
-
- yield testSubmittingLoginForm("subtst_notifications_1.html", function*(fieldValues) {
- info("Opening popup");
- let notif = getCaptureDoorhanger("password-save");
- let { panel } = PopupNotifications;
-
- info("Hiding popup.");
- let promiseHidden = BrowserTestUtils.waitForEvent(panel, "popuphidden");
- panel.hidePopup();
- yield promiseHidden;
-
- info("Clicking on anchor to reshow popup.");
- let promiseShown = BrowserTestUtils.waitForEvent(panel, "popupshown");
- notif.anchorElement.click();
- yield promiseShown;
-
- let passwordVisiblityToggle = panel.querySelector("#password-notification-visibilityToggle");
- is(passwordVisiblityToggle.hidden, true, "Check that the Show Password field is Hidden");
- });
-});
-
-// TODO:
-// * existing login test, form has different password --> change password, no save prompt
diff --git a/toolkit/components/passwordmgr/test/browser/browser_capture_doorhanger_httpsUpgrade.js b/toolkit/components/passwordmgr/test/browser/browser_capture_doorhanger_httpsUpgrade.js
deleted file mode 100644
index 9be0aa6316..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_capture_doorhanger_httpsUpgrade.js
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Test capture popup notifications with HTTPS upgrades
- */
-
-let nsLoginInfo = new Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
- Ci.nsILoginInfo, "init");
-let login1 = new nsLoginInfo("http://example.com", "http://example.com", null,
- "notifyu1", "notifyp1", "user", "pass");
-let login1HTTPS = new nsLoginInfo("https://example.com", "https://example.com", null,
- "notifyu1", "notifyp1", "user", "pass");
-
-add_task(function* test_httpsUpgradeCaptureFields_noChange() {
- info("Check that we don't prompt to remember when capturing an upgraded login with no change");
- Services.logins.addLogin(login1);
- // Sanity check the HTTP login exists.
- let logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should have the HTTP login");
-
- yield testSubmittingLoginForm("subtst_notifications_1.html", function*(fieldValues) {
- is(fieldValues.username, "notifyu1", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-save");
- ok(!notif, "checking for no notification popup");
- }, "https://example.com"); // This is HTTPS whereas the saved login is HTTP
-
- logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should only have 1 login still");
- let login = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- is(login.hostname, "http://example.com", "Check the hostname is unchanged");
- is(login.username, "notifyu1", "Check the username is unchanged");
- is(login.password, "notifyp1", "Check the password is unchanged");
- is(login.timesUsed, 2, "Check times used increased");
-
- Services.logins.removeLogin(login1);
-});
-
-add_task(function* test_httpsUpgradeCaptureFields_changePW() {
- info("Check that we prompt to change when capturing an upgraded login with a new PW");
- Services.logins.addLogin(login1);
- // Sanity check the HTTP login exists.
- let logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should have the HTTP login");
-
- yield testSubmittingLoginForm("subtst_notifications_8.html", function*(fieldValues) {
- is(fieldValues.username, "notifyu1", "Checking submitted username");
- is(fieldValues.password, "pass2", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-change");
- ok(notif, "checking for a change popup");
-
- yield* checkDoorhangerUsernamePassword("notifyu1", "pass2");
- clickDoorhangerButton(notif, CHANGE_BUTTON);
-
- ok(!getCaptureDoorhanger("password-change"), "popup should be gone");
- }, "https://example.com"); // This is HTTPS whereas the saved login is HTTP
-
- checkOnlyLoginWasUsedTwice({ justChanged: true });
- logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should only have 1 login still");
- let login = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- is(login.hostname, "https://example.com", "Check the hostname is upgraded");
- is(login.formSubmitURL, "https://example.com", "Check the formSubmitURL is upgraded");
- is(login.username, "notifyu1", "Check the username is unchanged");
- is(login.password, "pass2", "Check the password changed");
- is(login.timesUsed, 2, "Check times used increased");
-
- Services.logins.removeAllLogins();
-});
-
-add_task(function* test_httpsUpgradeCaptureFields_captureMatchingHTTP() {
- info("Capture a new HTTP login which matches a stored HTTPS one.");
- Services.logins.addLogin(login1HTTPS);
-
- yield testSubmittingLoginForm("subtst_notifications_1.html", function*(fieldValues) {
- is(fieldValues.username, "notifyu1", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-save");
- ok(notif, "got notification popup");
-
- is(Services.logins.getAllLogins().length, 1, "Should only have the HTTPS login");
-
- yield* checkDoorhangerUsernamePassword("notifyu1", "notifyp1");
- clickDoorhangerButton(notif, REMEMBER_BUTTON);
- });
-
- let logins = Services.logins.getAllLogins();
- is(logins.length, 2, "Should have both HTTP and HTTPS logins");
- for (let login of logins) {
- login = login.QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "notifyu1", "Check the username used on the new entry");
- is(login.password, "notifyp1", "Check the password used on the new entry");
- is(login.timesUsed, 1, "Check times used on entry");
- }
-
- info("Make sure Remember took effect and we don't prompt for an existing HTTP login");
- yield testSubmittingLoginForm("subtst_notifications_1.html", function*(fieldValues) {
- is(fieldValues.username, "notifyu1", "Checking submitted username");
- is(fieldValues.password, "notifyp1", "Checking submitted password");
- let notif = getCaptureDoorhanger("password-save");
- ok(!notif, "checking for no notification popup");
- });
-
- logins = Services.logins.getAllLogins();
- is(logins.length, 2, "Should have both HTTP and HTTPS still");
-
- let httpsLogins = LoginHelper.searchLoginsWithObject({
- hostname: "https://example.com",
- });
- is(httpsLogins.length, 1, "Check https logins count");
- let httpsLogin = httpsLogins[0].QueryInterface(Ci.nsILoginMetaInfo);
- ok(httpsLogin.equals(login1HTTPS), "Check HTTPS login didn't change");
- is(httpsLogin.timesUsed, 1, "Check times used");
-
- let httpLogins = LoginHelper.searchLoginsWithObject({
- hostname: "http://example.com",
- });
- is(httpLogins.length, 1, "Check http logins count");
- let httpLogin = httpLogins[0].QueryInterface(Ci.nsILoginMetaInfo);
- ok(httpLogin.equals(login1), "Check HTTP login is as expected");
- is(httpLogin.timesUsed, 2, "Check times used increased");
-
- Services.logins.removeLogin(login1);
- Services.logins.removeLogin(login1HTTPS);
-});
diff --git a/toolkit/components/passwordmgr/test/browser/browser_capture_doorhanger_window_open.js b/toolkit/components/passwordmgr/test/browser/browser_capture_doorhanger_window_open.js
deleted file mode 100644
index 1bcfec5eb1..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_capture_doorhanger_window_open.js
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Test capture popup notifications in content opened by window.open
- */
-
-let nsLoginInfo = new Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
- Ci.nsILoginInfo, "init");
-let login1 = new nsLoginInfo("http://mochi.test:8888", "http://mochi.test:8888", null,
- "notifyu1", "notifyp1", "user", "pass");
-let login2 = new nsLoginInfo("http://mochi.test:8888", "http://mochi.test:8888", null,
- "notifyu2", "notifyp2", "user", "pass");
-
-
-function withTestTabUntilStorageChange(aPageFile, aTaskFn) {
- function storageChangedObserved(subject, data) {
- // Watch for actions triggered from a doorhanger (not cleanup tasks with removeLogin)
- if (data == "removeLogin") {
- return false;
- }
- return true;
- }
-
- let storageChangedPromised = TestUtils.topicObserved("passwordmgr-storage-changed",
- storageChangedObserved);
- return BrowserTestUtils.withNewTab({
- gBrowser,
- url: "http://mochi.test:8888" + DIRECTORY_PATH + aPageFile,
- }, function*(browser) {
- ok(true, "loaded " + aPageFile);
- info("running test case task");
- yield* aTaskFn();
- info("waiting for storage change");
- yield storageChangedPromised;
- });
-}
-
-add_task(function* setup() {
- yield SimpleTest.promiseFocus(window);
-});
-
-add_task(function* test_saveChromeHiddenAutoClose() {
- let notifShownPromise = BrowserTestUtils.waitForEvent(PopupNotifications.panel, "popupshown");
- // query arguments are: username, password, features, auto-close (delimited by '|')
- let url = "subtst_notifications_11.html?notifyu1|notifyp1|" +
- "menubar=no,toolbar=no,location=no|autoclose";
- yield withTestTabUntilStorageChange(url, function*() {
- info("waiting for popupshown");
- yield notifShownPromise;
- // the popup closes and the doorhanger should appear in the opener
- let popup = getCaptureDoorhanger("password-save");
- ok(popup, "got notification popup");
- yield* checkDoorhangerUsernamePassword("notifyu1", "notifyp1");
- // Sanity check, no logins should exist yet.
- let logins = Services.logins.getAllLogins();
- is(logins.length, 0, "Should not have any logins yet");
-
- clickDoorhangerButton(popup, REMEMBER_BUTTON);
- });
- // Check result of clicking Remember
- let logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should only have 1 login");
- let login = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- is(login.timesUsed, 1, "Check times used on new entry");
- is(login.username, "notifyu1", "Check the username used on the new entry");
- is(login.password, "notifyp1", "Check the password used on the new entry");
-});
-
-add_task(function* test_changeChromeHiddenAutoClose() {
- let notifShownPromise = BrowserTestUtils.waitForEvent(PopupNotifications.panel, "popupshown");
- let url = "subtst_notifications_11.html?notifyu1|pass2|menubar=no,toolbar=no,location=no|autoclose";
- yield withTestTabUntilStorageChange(url, function*() {
- info("waiting for popupshown");
- yield notifShownPromise;
- let popup = getCaptureDoorhanger("password-change");
- ok(popup, "got notification popup");
- yield* checkDoorhangerUsernamePassword("notifyu1", "pass2");
- clickDoorhangerButton(popup, CHANGE_BUTTON);
- });
-
- // Check to make sure we updated the password, timestamps and use count for
- // the login being changed with this form.
- let logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should only have 1 login");
- let login = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "notifyu1", "Check the username");
- is(login.password, "pass2", "Check password changed");
- is(login.timesUsed, 2, "check .timesUsed incremented on change");
- ok(login.timeCreated < login.timeLastUsed, "timeLastUsed bumped");
- ok(login.timeLastUsed == login.timePasswordChanged, "timeUsed == timeChanged");
-
- login1.password = "pass2";
- Services.logins.removeLogin(login1);
- login1.password = "notifyp1";
-});
-
-add_task(function* test_saveChromeVisibleSameWindow() {
- // This test actually opens a new tab in the same window with default browser settings.
- let url = "subtst_notifications_11.html?notifyu2|notifyp2||";
- let notifShownPromise = BrowserTestUtils.waitForEvent(PopupNotifications.panel, "popupshown");
- yield withTestTabUntilStorageChange(url, function*() {
- yield notifShownPromise;
- let popup = getCaptureDoorhanger("password-save");
- ok(popup, "got notification popup");
- yield* checkDoorhangerUsernamePassword("notifyu2", "notifyp2");
- clickDoorhangerButton(popup, REMEMBER_BUTTON);
- yield BrowserTestUtils.removeTab(gBrowser.selectedTab);
- });
-
- // Check result of clicking Remember
- let logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should only have 1 login now");
- let login = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "notifyu2", "Check the username used on the new entry");
- is(login.password, "notifyp2", "Check the password used on the new entry");
- is(login.timesUsed, 1, "Check times used on new entry");
-});
-
-add_task(function* test_changeChromeVisibleSameWindow() {
- let url = "subtst_notifications_11.html?notifyu2|pass2||";
- let notifShownPromise = BrowserTestUtils.waitForEvent(PopupNotifications.panel, "popupshown");
- yield withTestTabUntilStorageChange(url, function*() {
- yield notifShownPromise;
- let popup = getCaptureDoorhanger("password-change");
- ok(popup, "got notification popup");
- yield* checkDoorhangerUsernamePassword("notifyu2", "pass2");
- clickDoorhangerButton(popup, CHANGE_BUTTON);
- yield BrowserTestUtils.removeTab(gBrowser.selectedTab);
- });
-
- // Check to make sure we updated the password, timestamps and use count for
- // the login being changed with this form.
- let logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should have 1 login");
- let login = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "notifyu2", "Check the username");
- is(login.password, "pass2", "Check password changed");
- is(login.timesUsed, 2, "check .timesUsed incremented on change");
- ok(login.timeCreated < login.timeLastUsed, "timeLastUsed bumped");
- ok(login.timeLastUsed == login.timePasswordChanged, "timeUsed == timeChanged");
-
- // cleanup
- login2.password = "pass2";
- Services.logins.removeLogin(login2);
- login2.password = "notifyp2";
-});
diff --git a/toolkit/components/passwordmgr/test/browser/browser_context_menu.js b/toolkit/components/passwordmgr/test/browser/browser_context_menu.js
deleted file mode 100644
index 6cfcaa7c24..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_context_menu.js
+++ /dev/null
@@ -1,432 +0,0 @@
-/*
- * Test the password manager context menu.
- */
-
-/* eslint no-shadow:"off" */
-
-"use strict";
-
-// The hostname for the test URIs.
-const TEST_HOSTNAME = "https://example.com";
-const MULTIPLE_FORMS_PAGE_PATH = "/browser/toolkit/components/passwordmgr/test/browser/multiple_forms.html";
-
-const CONTEXT_MENU = document.getElementById("contentAreaContextMenu");
-const POPUP_HEADER = document.getElementById("fill-login");
-
-/**
- * Initialize logins needed for the tests and disable autofill
- * for login forms for easier testing of manual fill.
- */
-add_task(function* test_initialize() {
- Services.prefs.setBoolPref("signon.autofillForms", false);
- registerCleanupFunction(() => {
- Services.prefs.clearUserPref("signon.autofillForms");
- Services.prefs.clearUserPref("signon.schemeUpgrades");
- });
- for (let login of loginList()) {
- Services.logins.addLogin(login);
- }
-});
-
-/**
- * Check if the context menu is populated with the right
- * menuitems for the target password input field.
- */
-add_task(function* test_context_menu_populate_password_noSchemeUpgrades() {
- Services.prefs.setBoolPref("signon.schemeUpgrades", false);
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: TEST_HOSTNAME + MULTIPLE_FORMS_PAGE_PATH,
- }, function* (browser) {
- yield openPasswordContextMenu(browser, "#test-password-1");
-
- // Check the content of the password manager popup
- let popupMenu = document.getElementById("fill-login-popup");
- checkMenu(popupMenu, 2);
-
- CONTEXT_MENU.hidePopup();
- });
-});
-
-/**
- * Check if the context menu is populated with the right
- * menuitems for the target password input field.
- */
-add_task(function* test_context_menu_populate_password_schemeUpgrades() {
- Services.prefs.setBoolPref("signon.schemeUpgrades", true);
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: TEST_HOSTNAME + MULTIPLE_FORMS_PAGE_PATH,
- }, function* (browser) {
- yield openPasswordContextMenu(browser, "#test-password-1");
-
- // Check the content of the password manager popup
- let popupMenu = document.getElementById("fill-login-popup");
- checkMenu(popupMenu, 3);
-
- CONTEXT_MENU.hidePopup();
- });
-});
-
-/**
- * Check if the context menu is populated with the right menuitems
- * for the target username field with a password field present.
- */
-add_task(function* test_context_menu_populate_username_with_password_noSchemeUpgrades() {
- Services.prefs.setBoolPref("signon.schemeUpgrades", false);
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: TEST_HOSTNAME + "/browser/toolkit/components/" +
- "passwordmgr/test/browser/multiple_forms.html",
- }, function* (browser) {
- yield openPasswordContextMenu(browser, "#test-username-2");
-
- // Check the content of the password manager popup
- let popupMenu = document.getElementById("fill-login-popup");
- checkMenu(popupMenu, 2);
-
- CONTEXT_MENU.hidePopup();
- });
-});
-/**
- * Check if the context menu is populated with the right menuitems
- * for the target username field with a password field present.
- */
-add_task(function* test_context_menu_populate_username_with_password_schemeUpgrades() {
- Services.prefs.setBoolPref("signon.schemeUpgrades", true);
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: TEST_HOSTNAME + "/browser/toolkit/components/" +
- "passwordmgr/test/browser/multiple_forms.html",
- }, function* (browser) {
- yield openPasswordContextMenu(browser, "#test-username-2");
-
- // Check the content of the password manager popup
- let popupMenu = document.getElementById("fill-login-popup");
- checkMenu(popupMenu, 3);
-
- CONTEXT_MENU.hidePopup();
- });
-});
-
-/**
- * Check if the password field is correctly filled when one
- * login menuitem is clicked.
- */
-add_task(function* test_context_menu_password_fill() {
- Services.prefs.setBoolPref("signon.schemeUpgrades", true);
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: TEST_HOSTNAME + MULTIPLE_FORMS_PAGE_PATH,
- }, function* (browser) {
- let formDescriptions = yield ContentTask.spawn(browser, {}, function*() {
- let forms = Array.from(content.document.getElementsByClassName("test-form"));
- return forms.map((f) => f.getAttribute("description"));
- });
-
- for (let description of formDescriptions) {
- info("Testing form: " + description);
-
- let passwordInputIds = yield ContentTask.spawn(browser, {description}, function*({description}) {
- let formElement = content.document.querySelector(`[description="${description}"]`);
- let passwords = Array.from(formElement.querySelectorAll("input[type='password']"));
- return passwords.map((p) => p.id);
- });
-
- for (let inputId of passwordInputIds) {
- info("Testing password field: " + inputId);
-
- // Synthesize a right mouse click over the username input element.
- yield openPasswordContextMenu(browser, "#" + inputId, function*() {
- let inputDisabled = yield ContentTask
- .spawn(browser, {inputId}, function*({inputId}) {
- let input = content.document.getElementById(inputId);
- return input.disabled || input.readOnly;
- });
-
- // If the password field is disabled or read-only, we want to see
- // the disabled Fill Password popup header.
- if (inputDisabled) {
- Assert.ok(!POPUP_HEADER.hidden, "Popup menu is not hidden.");
- Assert.ok(POPUP_HEADER.disabled, "Popup menu is disabled.");
- CONTEXT_MENU.hidePopup();
- }
-
- return !inputDisabled;
- });
-
- if (CONTEXT_MENU.state != "open") {
- continue;
- }
-
- // The only field affected by the password fill
- // should be the target password field itself.
- yield assertContextMenuFill(browser, description, null, inputId, 1);
- yield ContentTask.spawn(browser, {inputId}, function*({inputId}) {
- let passwordField = content.document.getElementById(inputId);
- Assert.equal(passwordField.value, "password1", "Check upgraded login was actually used");
- });
-
- CONTEXT_MENU.hidePopup();
- }
- }
- });
-});
-
-/**
- * Check if the form is correctly filled when one
- * username context menu login menuitem is clicked.
- */
-add_task(function* test_context_menu_username_login_fill() {
- Services.prefs.setBoolPref("signon.schemeUpgrades", true);
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: TEST_HOSTNAME + MULTIPLE_FORMS_PAGE_PATH,
- }, function* (browser) {
-
- let formDescriptions = yield ContentTask.spawn(browser, {}, function*() {
- let forms = Array.from(content.document.getElementsByClassName("test-form"));
- return forms.map((f) => f.getAttribute("description"));
- });
-
- for (let description of formDescriptions) {
- info("Testing form: " + description);
- let usernameInputIds = yield ContentTask
- .spawn(browser, {description}, function*({description}) {
- let formElement = content.document.querySelector(`[description="${description}"]`);
- let inputs = Array.from(formElement.querySelectorAll("input[type='text']"));
- return inputs.map((p) => p.id);
- });
-
- for (let inputId of usernameInputIds) {
- info("Testing username field: " + inputId);
-
- // Synthesize a right mouse click over the username input element.
- yield openPasswordContextMenu(browser, "#" + inputId, function*() {
- let headerHidden = POPUP_HEADER.hidden;
- let headerDisabled = POPUP_HEADER.disabled;
-
- let data = {description, inputId, headerHidden, headerDisabled};
- let shouldContinue = yield ContentTask.spawn(browser, data, function*(data) {
- let {description, inputId, headerHidden, headerDisabled} = data;
- let formElement = content.document.querySelector(`[description="${description}"]`);
- let usernameField = content.document.getElementById(inputId);
- // We always want to check if the first password field is filled,
- // since this is the current behavior from the _fillForm function.
- let passwordField = formElement.querySelector("input[type='password']");
-
- // If we don't want to see the actual popup menu,
- // check if the popup is hidden or disabled.
- if (!passwordField || usernameField.disabled || usernameField.readOnly ||
- passwordField.disabled || passwordField.readOnly) {
- if (!passwordField) {
- Assert.ok(headerHidden, "Popup menu is hidden.");
- } else {
- Assert.ok(!headerHidden, "Popup menu is not hidden.");
- Assert.ok(headerDisabled, "Popup menu is disabled.");
- }
- return false;
- }
- return true;
- });
-
- if (!shouldContinue) {
- CONTEXT_MENU.hidePopup();
- }
-
- return shouldContinue;
- });
-
- if (CONTEXT_MENU.state != "open") {
- continue;
- }
-
- let passwordFieldId = yield ContentTask
- .spawn(browser, {description}, function*({description}) {
- let formElement = content.document.querySelector(`[description="${description}"]`);
- return formElement.querySelector("input[type='password']").id;
- });
-
- // We shouldn't change any field that's not the target username field or the first password field
- yield assertContextMenuFill(browser, description, inputId, passwordFieldId, 1);
-
- yield ContentTask.spawn(browser, {passwordFieldId}, function*({passwordFieldId}) {
- let passwordField = content.document.getElementById(passwordFieldId);
- if (!passwordField.hasAttribute("expectedFail")) {
- Assert.equal(passwordField.value, "password1", "Check upgraded login was actually used");
- }
- });
-
- CONTEXT_MENU.hidePopup();
- }
- }
- });
-});
-
-/**
- * Synthesize mouse clicks to open the password manager context menu popup
- * for a target password input element.
- *
- * assertCallback should return true if we should continue or else false.
- */
-function* openPasswordContextMenu(browser, passwordInput, assertCallback = null) {
- // Synthesize a right mouse click over the password input element.
- let contextMenuShownPromise = BrowserTestUtils.waitForEvent(CONTEXT_MENU, "popupshown");
- let eventDetails = {type: "contextmenu", button: 2};
- BrowserTestUtils.synthesizeMouseAtCenter(passwordInput, eventDetails, browser);
- yield contextMenuShownPromise;
-
- if (assertCallback) {
- let shouldContinue = yield assertCallback();
- if (!shouldContinue) {
- return;
- }
- }
-
- // Synthesize a mouse click over the fill login menu header.
- let popupShownPromise = BrowserTestUtils.waitForEvent(POPUP_HEADER, "popupshown");
- EventUtils.synthesizeMouseAtCenter(POPUP_HEADER, {});
- yield popupShownPromise;
-}
-
-/**
- * Verify that only the expected form fields are filled.
- */
-function* assertContextMenuFill(browser, formId, usernameFieldId, passwordFieldId, loginIndex) {
- let popupMenu = document.getElementById("fill-login-popup");
- let unchangedSelector = `[description="${formId}"] input:not(#${passwordFieldId})`;
-
- if (usernameFieldId) {
- unchangedSelector += `:not(#${usernameFieldId})`;
- }
-
- yield ContentTask.spawn(browser, {unchangedSelector}, function*({unchangedSelector}) {
- let unchangedFields = content.document.querySelectorAll(unchangedSelector);
-
- // Store the value of fields that should remain unchanged.
- if (unchangedFields.length) {
- for (let field of unchangedFields) {
- field.setAttribute("original-value", field.value);
- }
- }
- });
-
- // Execute the default command of the specified login menuitem found in the context menu.
- let loginItem = popupMenu.getElementsByClassName("context-login-item")[loginIndex];
-
- // Find the used login by it's username (Use only unique usernames in this test).
- let {username, password} = getLoginFromUsername(loginItem.label);
-
- let data = {username, password, usernameFieldId, passwordFieldId, formId, unchangedSelector};
- let continuePromise = ContentTask.spawn(browser, data, function*(data) {
- let {username, password, usernameFieldId, passwordFieldId, formId, unchangedSelector} = data;
- let form = content.document.querySelector(`[description="${formId}"]`);
- yield ContentTaskUtils.waitForEvent(form, "input", "Username input value changed");
-
- if (usernameFieldId) {
- let usernameField = content.document.getElementById(usernameFieldId);
-
- // If we have an username field, check if it's correctly filled
- if (usernameField.getAttribute("expectedFail") == null) {
- Assert.equal(username, usernameField.value, "Username filled and correct.");
- }
- }
-
- if (passwordFieldId) {
- let passwordField = content.document.getElementById(passwordFieldId);
-
- // If we have a password field, check if it's correctly filled
- if (passwordField && passwordField.getAttribute("expectedFail") == null) {
- Assert.equal(password, passwordField.value, "Password filled and correct.");
- }
- }
-
- let unchangedFields = content.document.querySelectorAll(unchangedSelector);
-
- // Check that all fields that should not change have the same value as before.
- if (unchangedFields.length) {
- Assert.ok(() => {
- for (let field of unchangedFields) {
- if (field.value != field.getAttribute("original-value")) {
- return false;
- }
- }
- return true;
- }, "Other fields were not changed.");
- }
- });
-
- loginItem.doCommand();
-
- return continuePromise;
-}
-
-/**
- * Check if every login that matches the page hostname are available at the context menu.
- * @param {Element} contextMenu
- * @param {Number} expectedCount - Number of logins expected in the context menu. Used to ensure
-* we continue testing something useful.
- */
-function checkMenu(contextMenu, expectedCount) {
- let logins = loginList().filter(login => {
- return LoginHelper.isOriginMatching(login.hostname, TEST_HOSTNAME, {
- schemeUpgrades: Services.prefs.getBoolPref("signon.schemeUpgrades"),
- });
- });
- // Make an array of menuitems for easier comparison.
- let menuitems = [...CONTEXT_MENU.getElementsByClassName("context-login-item")];
- Assert.equal(menuitems.length, expectedCount, "Expected number of menu items");
- Assert.ok(logins.every(l => menuitems.some(m => l.username == m.label)), "Every login have an item at the menu.");
-}
-
-/**
- * Search for a login by it's username.
- *
- * Only unique login/hostname combinations should be used at this test.
- */
-function getLoginFromUsername(username) {
- return loginList().find(login => login.username == username);
-}
-
-/**
- * List of logins used for the test.
- *
- * We should only use unique usernames in this test,
- * because we need to search logins by username. There is one duplicate u+p combo
- * in order to test de-duping in the menu.
- */
-function loginList() {
- return [
- LoginTestUtils.testData.formLogin({
- hostname: "https://example.com",
- formSubmitURL: "https://example.com",
- username: "username",
- password: "password",
- }),
- // Same as above but HTTP in order to test de-duping.
- LoginTestUtils.testData.formLogin({
- hostname: "http://example.com",
- formSubmitURL: "http://example.com",
- username: "username",
- password: "password",
- }),
- LoginTestUtils.testData.formLogin({
- hostname: "http://example.com",
- formSubmitURL: "http://example.com",
- username: "username1",
- password: "password1",
- }),
- LoginTestUtils.testData.formLogin({
- hostname: "https://example.com",
- formSubmitURL: "https://example.com",
- username: "username2",
- password: "password2",
- }),
- LoginTestUtils.testData.formLogin({
- hostname: "http://example.org",
- formSubmitURL: "http://example.org",
- username: "username-cross-origin",
- password: "password-cross-origin",
- }),
- ];
-}
diff --git a/toolkit/components/passwordmgr/test/browser/browser_context_menu_autocomplete_interaction.js b/toolkit/components/passwordmgr/test/browser/browser_context_menu_autocomplete_interaction.js
deleted file mode 100644
index 1b37e3f791..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_context_menu_autocomplete_interaction.js
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Test the password manager context menu interaction with autocomplete.
- */
-
-"use strict";
-
-const TEST_HOSTNAME = "https://example.com";
-const BASIC_FORM_PAGE_PATH = DIRECTORY_PATH + "form_basic.html";
-
-var gUnexpectedIsTODO = false;
-
-/**
- * Initialize logins needed for the tests and disable autofill
- * for login forms for easier testing of manual fill.
- */
-add_task(function* test_initialize() {
- let autocompletePopup = document.getElementById("PopupAutoComplete");
- Services.prefs.setBoolPref("signon.autofillForms", false);
- registerCleanupFunction(() => {
- Services.prefs.clearUserPref("signon.autofillForms");
- autocompletePopup.removeEventListener("popupshowing", autocompleteUnexpectedPopupShowing);
- });
- for (let login of loginList()) {
- Services.logins.addLogin(login);
- }
- autocompletePopup.addEventListener("popupshowing", autocompleteUnexpectedPopupShowing);
-});
-
-add_task(function* test_context_menu_username() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: TEST_HOSTNAME + BASIC_FORM_PAGE_PATH,
- }, function* (browser) {
- yield openContextMenu(browser, "#form-basic-username");
-
- let contextMenu = document.getElementById("contentAreaContextMenu");
- Assert.equal(contextMenu.state, "open", "Context menu opened");
- contextMenu.hidePopup();
- });
-});
-
-add_task(function* test_context_menu_password() {
- gUnexpectedIsTODO = true;
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: TEST_HOSTNAME + BASIC_FORM_PAGE_PATH,
- }, function* (browser) {
- yield openContextMenu(browser, "#form-basic-password");
-
- let contextMenu = document.getElementById("contentAreaContextMenu");
- Assert.equal(contextMenu.state, "open", "Context menu opened");
- contextMenu.hidePopup();
- });
-});
-
-function autocompleteUnexpectedPopupShowing(event) {
- if (gUnexpectedIsTODO) {
- todo(false, "Autocomplete shouldn't appear");
- } else {
- Assert.ok(false, "Autocomplete shouldn't appear");
- }
- event.target.hidePopup();
-}
-
-/**
- * Synthesize mouse clicks to open the context menu popup
- * for a target login input element.
- */
-function* openContextMenu(browser, loginInput) {
- // First synthesize a mousedown. We need this to get the focus event with the "contextmenu" event.
- let eventDetails1 = {type: "mousedown", button: 2};
- BrowserTestUtils.synthesizeMouseAtCenter(loginInput, eventDetails1, browser);
-
- // Then synthesize the contextmenu click over the input element.
- let contextMenuShownPromise = BrowserTestUtils.waitForEvent(window, "popupshown");
- let eventDetails = {type: "contextmenu", button: 2};
- BrowserTestUtils.synthesizeMouseAtCenter(loginInput, eventDetails, browser);
- yield contextMenuShownPromise;
-
- // Wait to see which popups are shown.
- yield new Promise(resolve => setTimeout(resolve, 1000));
-}
-
-function loginList() {
- return [
- LoginTestUtils.testData.formLogin({
- hostname: "https://example.com",
- formSubmitURL: "https://example.com",
- username: "username",
- password: "password",
- }),
- LoginTestUtils.testData.formLogin({
- hostname: "https://example.com",
- formSubmitURL: "https://example.com",
- username: "username2",
- password: "password2",
- }),
- ];
-}
diff --git a/toolkit/components/passwordmgr/test/browser/browser_context_menu_iframe.js b/toolkit/components/passwordmgr/test/browser/browser_context_menu_iframe.js
deleted file mode 100644
index c5219789d9..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_context_menu_iframe.js
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Test the password manager context menu.
- */
-
-"use strict";
-
-const TEST_HOSTNAME = "https://example.com";
-
-// Test with a page that only has a form within an iframe, not in the top-level document
-const IFRAME_PAGE_PATH = "/browser/toolkit/components/passwordmgr/test/browser/form_basic_iframe.html";
-
-/**
- * Initialize logins needed for the tests and disable autofill
- * for login forms for easier testing of manual fill.
- */
-add_task(function* test_initialize() {
- Services.prefs.setBoolPref("signon.autofillForms", false);
- registerCleanupFunction(() => {
- Services.prefs.clearUserPref("signon.autofillForms");
- Services.prefs.clearUserPref("signon.schemeUpgrades");
- });
- for (let login of loginList()) {
- Services.logins.addLogin(login);
- }
-});
-
-/**
- * Check if the password field is correctly filled when it's in an iframe.
- */
-add_task(function* test_context_menu_iframe_fill() {
- Services.prefs.setBoolPref("signon.schemeUpgrades", true);
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: TEST_HOSTNAME + IFRAME_PAGE_PATH
- }, function* (browser) {
- function getPasswordInput() {
- let frame = content.document.getElementById("test-iframe");
- return frame.contentDocument.getElementById("form-basic-password");
- }
-
- let contextMenuShownPromise = BrowserTestUtils.waitForEvent(window, "popupshown");
- let eventDetails = {type: "contextmenu", button: 2};
-
- // To click at the right point we have to take into account the iframe offset.
- // Synthesize a right mouse click over the password input element.
- BrowserTestUtils.synthesizeMouseAtCenter(getPasswordInput, eventDetails, browser);
- yield contextMenuShownPromise;
-
- // Synthesize a mouse click over the fill login menu header.
- let popupHeader = document.getElementById("fill-login");
- let popupShownPromise = BrowserTestUtils.waitForEvent(popupHeader, "popupshown");
- EventUtils.synthesizeMouseAtCenter(popupHeader, {});
- yield popupShownPromise;
-
- let popupMenu = document.getElementById("fill-login-popup");
-
- // Stores the original value of username
- function promiseFrameInputValue(name) {
- return ContentTask.spawn(browser, name, function(inputname) {
- let iframe = content.document.getElementById("test-iframe");
- let input = iframe.contentDocument.getElementById(inputname);
- return input.value;
- });
- }
- let usernameOriginalValue = yield promiseFrameInputValue("form-basic-username");
-
- // Execute the command of the first login menuitem found at the context menu.
- let passwordChangedPromise = ContentTask.spawn(browser, null, function* () {
- let frame = content.document.getElementById("test-iframe");
- let passwordInput = frame.contentDocument.getElementById("form-basic-password");
- yield ContentTaskUtils.waitForEvent(passwordInput, "input");
- });
-
- let firstLoginItem = popupMenu.getElementsByClassName("context-login-item")[0];
- firstLoginItem.doCommand();
-
- yield passwordChangedPromise;
-
- // Find the used login by it's username.
- let login = getLoginFromUsername(firstLoginItem.label);
- let passwordValue = yield promiseFrameInputValue("form-basic-password");
- is(login.password, passwordValue, "Password filled and correct.");
-
- let usernameNewValue = yield promiseFrameInputValue("form-basic-username");
- is(usernameOriginalValue,
- usernameNewValue,
- "Username value was not changed.");
-
- let contextMenu = document.getElementById("contentAreaContextMenu");
- contextMenu.hidePopup();
- });
-});
-
-/**
- * Search for a login by it's username.
- *
- * Only unique login/hostname combinations should be used at this test.
- */
-function getLoginFromUsername(username) {
- return loginList().find(login => login.username == username);
-}
-
-/**
- * List of logins used for the test.
- *
- * We should only use unique usernames in this test,
- * because we need to search logins by username. There is one duplicate u+p combo
- * in order to test de-duping in the menu.
- */
-function loginList() {
- return [
- LoginTestUtils.testData.formLogin({
- hostname: "https://example.com",
- formSubmitURL: "https://example.com",
- username: "username",
- password: "password",
- }),
- // Same as above but HTTP in order to test de-duping.
- LoginTestUtils.testData.formLogin({
- hostname: "http://example.com",
- formSubmitURL: "http://example.com",
- username: "username",
- password: "password",
- }),
- LoginTestUtils.testData.formLogin({
- hostname: "http://example.com",
- formSubmitURL: "http://example.com",
- username: "username1",
- password: "password1",
- }),
- LoginTestUtils.testData.formLogin({
- hostname: "https://example.com",
- formSubmitURL: "https://example.com",
- username: "username2",
- password: "password2",
- }),
- LoginTestUtils.testData.formLogin({
- hostname: "http://example.org",
- formSubmitURL: "http://example.org",
- username: "username-cross-origin",
- password: "password-cross-origin",
- }),
- ];
-}
diff --git a/toolkit/components/passwordmgr/test/browser/browser_exceptions_dialog.js b/toolkit/components/passwordmgr/test/browser/browser_exceptions_dialog.js
deleted file mode 100644
index 09fbe0eea7..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_exceptions_dialog.js
+++ /dev/null
@@ -1,56 +0,0 @@
-
-"use strict";
-
-const LOGIN_HOST = "http://example.com";
-
-function openExceptionsDialog() {
- return window.openDialog(
- "chrome://browser/content/preferences/permissions.xul",
- "Toolkit:PasswordManagerExceptions", "",
- {
- blockVisible: true,
- sessionVisible: false,
- allowVisible: false,
- hideStatusColumn: true,
- prefilledHost: "",
- permissionType: "login-saving"
- }
- );
-}
-
-function countDisabledHosts(dialog) {
- let doc = dialog.document;
- let rejectsTree = doc.getElementById("permissionsTree");
-
- return rejectsTree.view.rowCount;
-}
-
-function promiseStorageChanged(expectedData) {
- function observer(subject, data) {
- return data == expectedData && subject.QueryInterface(Ci.nsISupportsString).data == LOGIN_HOST;
- }
-
- return TestUtils.topicObserved("passwordmgr-storage-changed", observer);
-}
-
-add_task(function* test_disable() {
- let dialog = openExceptionsDialog();
- let promiseChanged = promiseStorageChanged("hostSavingDisabled");
-
- yield BrowserTestUtils.waitForEvent(dialog, "load");
- Services.logins.setLoginSavingEnabled(LOGIN_HOST, false);
- yield promiseChanged;
- is(countDisabledHosts(dialog), 1, "Verify disabled host added");
- yield BrowserTestUtils.closeWindow(dialog);
-});
-
-add_task(function* test_enable() {
- let dialog = openExceptionsDialog();
- let promiseChanged = promiseStorageChanged("hostSavingEnabled");
-
- yield BrowserTestUtils.waitForEvent(dialog, "load");
- Services.logins.setLoginSavingEnabled(LOGIN_HOST, true);
- yield promiseChanged;
- is(countDisabledHosts(dialog), 0, "Verify disabled host removed");
- yield BrowserTestUtils.closeWindow(dialog);
-});
diff --git a/toolkit/components/passwordmgr/test/browser/browser_formless_submit_chrome.js b/toolkit/components/passwordmgr/test/browser/browser_formless_submit_chrome.js
deleted file mode 100644
index c6d9ce50a1..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_formless_submit_chrome.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Test that browser chrome UI interactions don't trigger a capture doorhanger.
- */
-
-"use strict";
-
-function* fillTestPage(aBrowser) {
- yield ContentTask.spawn(aBrowser, null, function*() {
- content.document.getElementById("form-basic-username").value = "my_username";
- content.document.getElementById("form-basic-password").value = "my_password";
- });
- info("fields filled");
-}
-
-function* withTestPage(aTaskFn) {
- return BrowserTestUtils.withNewTab({
- gBrowser,
- url: "https://example.com" + DIRECTORY_PATH + "formless_basic.html",
- }, function*(aBrowser) {
- info("tab opened");
- yield fillTestPage(aBrowser);
- yield* aTaskFn(aBrowser);
-
- // Give a chance for the doorhanger to appear
- yield new Promise(resolve => SimpleTest.executeSoon(resolve));
- ok(!getCaptureDoorhanger("any"), "No doorhanger should be present");
- });
-}
-
-add_task(function* setup() {
- yield SimpleTest.promiseFocus(window);
-});
-
-add_task(function* test_urlbar_new_URL() {
- yield withTestPage(function*(aBrowser) {
- gURLBar.value = "";
- let focusPromise = BrowserTestUtils.waitForEvent(gURLBar, "focus");
- gURLBar.focus();
- yield focusPromise;
- info("focused");
- EventUtils.sendString("http://mochi.test:8888/");
- EventUtils.synthesizeKey("VK_RETURN", {});
- yield BrowserTestUtils.browserLoaded(aBrowser, false, "http://mochi.test:8888/");
- });
-});
-
-add_task(function* test_urlbar_fragment_enter() {
- yield withTestPage(function*(aBrowser) {
- gURLBar.focus();
- EventUtils.synthesizeKey("VK_RIGHT", {});
- EventUtils.sendString("#fragment");
- EventUtils.synthesizeKey("VK_RETURN", {});
- });
-});
-
-add_task(function* test_backButton_forwardButton() {
- yield withTestPage(function*(aBrowser) {
- // Load a new page in the tab so we can test going back
- aBrowser.loadURI("https://example.com" + DIRECTORY_PATH + "formless_basic.html?second");
- yield BrowserTestUtils.browserLoaded(aBrowser, false,
- "https://example.com" + DIRECTORY_PATH +
- "formless_basic.html?second");
- yield fillTestPage(aBrowser);
-
- let forwardButton = document.getElementById("forward-button");
- // We need to wait for the forward button transition to complete before we
- // can click it, so we hook up a listener to wait for it to be ready.
- let forwardTransitionPromise = BrowserTestUtils.waitForEvent(forwardButton, "transitionend");
-
- let backPromise = BrowserTestUtils.browserStopped(aBrowser);
- EventUtils.synthesizeMouseAtCenter(document.getElementById("back-button"), {});
- yield backPromise;
-
- // Give a chance for the doorhanger to appear
- yield new Promise(resolve => SimpleTest.executeSoon(resolve));
- ok(!getCaptureDoorhanger("any"), "No doorhanger should be present");
-
- // Now go forward again after filling
- yield fillTestPage(aBrowser);
-
- yield forwardTransitionPromise;
- info("transition done");
- yield BrowserTestUtils.waitForCondition(() => {
- return forwardButton.disabled == false;
- });
- let forwardPromise = BrowserTestUtils.browserStopped(aBrowser);
- info("click the forward button");
- EventUtils.synthesizeMouseAtCenter(forwardButton, {});
- yield forwardPromise;
- });
-});
-
-
-add_task(function* test_reloadButton() {
- yield withTestPage(function*(aBrowser) {
- let reloadButton = document.getElementById("urlbar-reload-button");
- let loadPromise = BrowserTestUtils.browserLoaded(aBrowser, false,
- "https://example.com" + DIRECTORY_PATH +
- "formless_basic.html");
-
- yield BrowserTestUtils.waitForCondition(() => {
- return reloadButton.disabled == false;
- });
- EventUtils.synthesizeMouseAtCenter(reloadButton, {});
- yield loadPromise;
- });
-});
-
-add_task(function* test_back_keyboard_shortcut() {
- if (Services.prefs.getIntPref("browser.backspace_action") != 0) {
- ok(true, "Skipped testing backspace to go back since it's disabled");
- return;
- }
- yield withTestPage(function*(aBrowser) {
- // Load a new page in the tab so we can test going back
- aBrowser.loadURI("https://example.com" + DIRECTORY_PATH + "formless_basic.html?second");
- yield BrowserTestUtils.browserLoaded(aBrowser, false,
- "https://example.com" + DIRECTORY_PATH +
- "formless_basic.html?second");
- yield fillTestPage(aBrowser);
-
- let backPromise = BrowserTestUtils.browserStopped(aBrowser);
- EventUtils.synthesizeKey("VK_BACK_SPACE", {});
- yield backPromise;
- });
-});
diff --git a/toolkit/components/passwordmgr/test/browser/browser_hasInsecureLoginForms.js b/toolkit/components/passwordmgr/test/browser/browser_hasInsecureLoginForms.js
deleted file mode 100644
index 039312b7d1..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_hasInsecureLoginForms.js
+++ /dev/null
@@ -1,93 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-Cu.import("resource://gre/modules/LoginManagerParent.jsm", this);
-
-const testUrlPath =
- "://example.com/browser/toolkit/components/passwordmgr/test/browser/";
-
-/**
- * Waits for the given number of occurrences of InsecureLoginFormsStateChange
- * on the given browser element.
- */
-function waitForInsecureLoginFormsStateChange(browser, count) {
- return BrowserTestUtils.waitForEvent(browser, "InsecureLoginFormsStateChange",
- false, () => --count == 0);
-}
-
-/**
- * Checks that hasInsecureLoginForms is true for a simple HTTP page and false
- * for a simple HTTPS page.
- */
-add_task(function* test_simple() {
- for (let scheme of ["http", "https"]) {
- let tab = gBrowser.addTab(scheme + testUrlPath + "form_basic.html");
- let browser = tab.linkedBrowser;
- yield Promise.all([
- BrowserTestUtils.switchTab(gBrowser, tab),
- BrowserTestUtils.browserLoaded(browser),
- // One event is triggered by pageshow and one by DOMFormHasPassword.
- waitForInsecureLoginFormsStateChange(browser, 2),
- ]);
-
- Assert.equal(LoginManagerParent.hasInsecureLoginForms(browser),
- scheme == "http");
-
- gBrowser.removeTab(tab);
- }
-});
-
-/**
- * Checks that hasInsecureLoginForms is true if a password field is present in
- * an HTTP page loaded as a subframe of a top-level HTTPS page, when mixed
- * active content blocking is disabled.
- *
- * When the subframe is navigated to an HTTPS page, hasInsecureLoginForms should
- * be set to false.
- *
- * Moving back in history should set hasInsecureLoginForms to true again.
- */
-add_task(function* test_subframe_navigation() {
- yield new Promise(resolve => SpecialPowers.pushPrefEnv({
- "set": [["security.mixed_content.block_active_content", false]],
- }, resolve));
-
- // Load the page with the subframe in a new tab.
- let tab = gBrowser.addTab("https" + testUrlPath + "insecure_test.html");
- let browser = tab.linkedBrowser;
- yield Promise.all([
- BrowserTestUtils.switchTab(gBrowser, tab),
- BrowserTestUtils.browserLoaded(browser),
- // Two events are triggered by pageshow and one by DOMFormHasPassword.
- waitForInsecureLoginFormsStateChange(browser, 3),
- ]);
-
- Assert.ok(LoginManagerParent.hasInsecureLoginForms(browser));
-
- // Navigate the subframe to a secure page.
- let promiseSubframeReady = Promise.all([
- BrowserTestUtils.browserLoaded(browser, true),
- // One event is triggered by pageshow and one by DOMFormHasPassword.
- waitForInsecureLoginFormsStateChange(browser, 2),
- ]);
- yield ContentTask.spawn(browser, null, function* () {
- content.document.getElementById("test-iframe")
- .contentDocument.getElementById("test-link").click();
- });
- yield promiseSubframeReady;
-
- Assert.ok(!LoginManagerParent.hasInsecureLoginForms(browser));
-
- // Navigate back to the insecure page. We only have to wait for the
- // InsecureLoginFormsStateChange event that is triggered by pageshow.
- let promise = waitForInsecureLoginFormsStateChange(browser, 1);
- yield ContentTask.spawn(browser, null, function* () {
- content.document.getElementById("test-iframe")
- .contentWindow.history.back();
- });
- yield promise;
-
- Assert.ok(LoginManagerParent.hasInsecureLoginForms(browser));
-
- gBrowser.removeTab(tab);
-});
diff --git a/toolkit/components/passwordmgr/test/browser/browser_hasInsecureLoginForms_streamConverter.js b/toolkit/components/passwordmgr/test/browser/browser_hasInsecureLoginForms_streamConverter.js
deleted file mode 100644
index 2dbffb9cc9..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_hasInsecureLoginForms_streamConverter.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-Cu.import("resource://gre/modules/LoginManagerParent.jsm", this);
-
-function* registerConverter() {
- Cu.import("resource://gre/modules/Services.jsm", this);
- Cu.import("resource://gre/modules/NetUtil.jsm", this);
-
- /**
- * Converts the "test/content" MIME type, served by the test over HTTP, to an
- * HTML viewer page containing the "form_basic.html" code. The viewer is
- * served from a "resource:" URI while keeping the "resource:" principal.
- */
- function TestStreamConverter() {}
-
- TestStreamConverter.prototype = {
- classID: Components.ID("{5f01d6ef-c090-45a4-b3e5-940d64713eb7}"),
- contractID: "@mozilla.org/streamconv;1?from=test/content&to=*/*",
- QueryInterface: XPCOMUtils.generateQI([
- Ci.nsIRequestObserver,
- Ci.nsIStreamListener,
- Ci.nsIStreamConverter,
- ]),
-
- // nsIStreamConverter
- convert() {},
-
- // nsIStreamConverter
- asyncConvertData(aFromType, aToType, aListener, aCtxt) {
- this.listener = aListener;
- },
-
- // nsIRequestObserver
- onStartRequest(aRequest, aContext) {
- let channel = NetUtil.newChannel({
- uri: "resource://testing-common/form_basic.html",
- loadUsingSystemPrincipal: true,
- });
- channel.originalURI = aRequest.QueryInterface(Ci.nsIChannel).URI;
- channel.loadGroup = aRequest.loadGroup;
- channel.owner = Services.scriptSecurityManager
- .createCodebasePrincipal(channel.URI, {});
- // In this test, we pass the new channel to the listener but don't fire a
- // redirect notification, even if it would be required. This keeps the
- // test code simpler and doesn't impact the principal check we're testing.
- channel.asyncOpen2(this.listener);
- },
-
- // nsIRequestObserver
- onStopRequest() {},
-
- // nsIStreamListener
- onDataAvailable() {},
- };
-
- let factory = XPCOMUtils._getFactory(TestStreamConverter);
- let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
- registrar.registerFactory(TestStreamConverter.prototype.classID, "",
- TestStreamConverter.prototype.contractID, factory);
- this.cleanupFunction = function () {
- registrar.unregisterFactory(TestStreamConverter.prototype.classID, factory);
- };
-}
-
-/**
- * Waits for the given number of occurrences of InsecureLoginFormsStateChange
- * on the given browser element.
- */
-function waitForInsecureLoginFormsStateChange(browser, count) {
- return BrowserTestUtils.waitForEvent(browser, "InsecureLoginFormsStateChange",
- false, () => --count == 0);
-}
-
-/**
- * Checks that hasInsecureLoginForms is false for a viewer served internally
- * using a "resource:" URI.
- */
-add_task(function* test_streamConverter() {
- let originalBrowser = gBrowser.selectedTab.linkedBrowser;
-
- yield ContentTask.spawn(originalBrowser, null, registerConverter);
-
- let tab = gBrowser.addTab("http://example.com/browser/toolkit/components/" +
- "passwordmgr/test/browser/streamConverter_content.sjs",
- { relatedBrowser: originalBrowser.linkedBrowser });
- let browser = tab.linkedBrowser;
- yield Promise.all([
- BrowserTestUtils.switchTab(gBrowser, tab),
- BrowserTestUtils.browserLoaded(browser),
- // One event is triggered by pageshow and one by DOMFormHasPassword.
- waitForInsecureLoginFormsStateChange(browser, 2),
- ]);
-
- Assert.ok(!LoginManagerParent.hasInsecureLoginForms(browser));
-
- yield BrowserTestUtils.removeTab(tab);
-
- yield ContentTask.spawn(originalBrowser, null, function* () {
- this.cleanupFunction();
- });
-});
diff --git a/toolkit/components/passwordmgr/test/browser/browser_http_autofill.js b/toolkit/components/passwordmgr/test/browser/browser_http_autofill.js
deleted file mode 100644
index beb928a34e..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_http_autofill.js
+++ /dev/null
@@ -1,78 +0,0 @@
-const TEST_URL_PATH = "://example.org/browser/toolkit/components/passwordmgr/test/browser/";
-
-add_task(function* setup() {
- let login = LoginTestUtils.testData.formLogin({
- hostname: "http://example.org",
- formSubmitURL: "http://example.org",
- username: "username",
- password: "password",
- });
- Services.logins.addLogin(login);
- login = LoginTestUtils.testData.formLogin({
- hostname: "http://example.org",
- formSubmitURL: "http://another.domain",
- username: "username",
- password: "password",
- });
- Services.logins.addLogin(login);
- yield SpecialPowers.pushPrefEnv({ "set": [["signon.autofillForms.http", false]] });
-});
-
-add_task(function* test_http_autofill() {
- for (let scheme of ["http", "https"]) {
- let tab = yield BrowserTestUtils
- .openNewForegroundTab(gBrowser, `${scheme}${TEST_URL_PATH}form_basic.html`);
-
- let [username, password] = yield ContentTask.spawn(gBrowser.selectedBrowser, null, function* () {
- let doc = content.document;
- let contentUsername = doc.getElementById("form-basic-username").value;
- let contentPassword = doc.getElementById("form-basic-password").value;
- return [contentUsername, contentPassword];
- });
-
- is(username, scheme == "http" ? "" : "username", "Username filled correctly");
- is(password, scheme == "http" ? "" : "password", "Password filled correctly");
-
- gBrowser.removeTab(tab);
- }
-});
-
-add_task(function* test_iframe_in_http_autofill() {
- for (let scheme of ["http", "https"]) {
- let tab = yield BrowserTestUtils
- .openNewForegroundTab(gBrowser, `${scheme}${TEST_URL_PATH}form_basic_iframe.html`);
-
- let [username, password] = yield ContentTask.spawn(gBrowser.selectedBrowser, null, function* () {
- let doc = content.document;
- let iframe = doc.getElementById("test-iframe");
- let contentUsername = iframe.contentWindow.document.getElementById("form-basic-username").value;
- let contentPassword = iframe.contentWindow.document.getElementById("form-basic-password").value;
- return [contentUsername, contentPassword];
- });
-
- is(username, scheme == "http" ? "" : "username", "Username filled correctly");
- is(password, scheme == "http" ? "" : "password", "Password filled correctly");
-
- gBrowser.removeTab(tab);
- }
-});
-
-add_task(function* test_http_action_autofill() {
- for (let type of ["insecure", "secure"]) {
- let tab = yield BrowserTestUtils
- .openNewForegroundTab(gBrowser, `https${TEST_URL_PATH}form_cross_origin_${type}_action.html`);
-
- let [username, password] = yield ContentTask.spawn(gBrowser.selectedBrowser, null, function* () {
- let doc = content.document;
- let contentUsername = doc.getElementById("form-basic-username").value;
- let contentPassword = doc.getElementById("form-basic-password").value;
- return [contentUsername, contentPassword];
- });
-
- is(username, type == "insecure" ? "" : "username", "Username filled correctly");
- is(password, type == "insecure" ? "" : "password", "Password filled correctly");
-
- gBrowser.removeTab(tab);
- }
-});
-
diff --git a/toolkit/components/passwordmgr/test/browser/browser_insecurePasswordConsoleWarning.js b/toolkit/components/passwordmgr/test/browser/browser_insecurePasswordConsoleWarning.js
deleted file mode 100644
index f16ae1b986..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_insecurePasswordConsoleWarning.js
+++ /dev/null
@@ -1,94 +0,0 @@
-"use strict";
-
-const WARNING_PATTERN = [{
- key: "INSECURE_FORM_ACTION",
- msg: 'JavaScript Warning: "Password fields present in a form with an insecure (http://) form action. This is a security risk that allows user login credentials to be stolen."'
-}, {
- key: "INSECURE_PAGE",
- msg: 'JavaScript Warning: "Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen."'
-}];
-
-add_task(function* testInsecurePasswordWarning() {
- let warningPatternHandler;
-
- function messageHandler(msgObj) {
- function findWarningPattern(msg) {
- return WARNING_PATTERN.find(patternPair => {
- return msg.indexOf(patternPair.msg) !== -1;
- });
- }
-
- let warning = findWarningPattern(msgObj.message);
-
- // Only handle the insecure password related warning messages.
- if (warning) {
- // Prevent any unexpected or redundant matched warning message coming after
- // the test case is ended.
- ok(warningPatternHandler, "Invoke a valid warning message handler");
- warningPatternHandler(warning, msgObj.message);
- }
- }
- Services.console.registerListener(messageHandler);
- registerCleanupFunction(function() {
- Services.console.unregisterListener(messageHandler);
- });
-
- for (let [origin, testFile, expectWarnings] of [
- ["http://127.0.0.1", "form_basic.html", []],
- ["http://127.0.0.1", "formless_basic.html", []],
- ["http://example.com", "form_basic.html", ["INSECURE_PAGE"]],
- ["http://example.com", "formless_basic.html", ["INSECURE_PAGE"]],
- ["https://example.com", "form_basic.html", []],
- ["https://example.com", "formless_basic.html", []],
-
- // For a form with customized action link in the same origin.
- ["http://127.0.0.1", "form_same_origin_action.html", []],
- ["http://example.com", "form_same_origin_action.html", ["INSECURE_PAGE"]],
- ["https://example.com", "form_same_origin_action.html", []],
-
- // For a form with an insecure (http) customized action link.
- ["http://127.0.0.1", "form_cross_origin_insecure_action.html", ["INSECURE_FORM_ACTION"]],
- ["http://example.com", "form_cross_origin_insecure_action.html", ["INSECURE_PAGE"]],
- ["https://example.com", "form_cross_origin_insecure_action.html", ["INSECURE_FORM_ACTION"]],
-
- // For a form with a secure (https) customized action link.
- ["http://127.0.0.1", "form_cross_origin_secure_action.html", []],
- ["http://example.com", "form_cross_origin_secure_action.html", ["INSECURE_PAGE"]],
- ["https://example.com", "form_cross_origin_secure_action.html", []],
- ]) {
- let testURL = origin + DIRECTORY_PATH + testFile;
- let promiseConsoleMessages = new Promise(resolve => {
- warningPatternHandler = function (warning, originMessage) {
- ok(warning, "Handling a warning pattern");
- let fullMessage = `[${warning.msg} {file: "${testURL}" line: 0 column: 0 source: "0"}]`;
- is(originMessage, fullMessage, "Message full matched:" + originMessage);
-
- let index = expectWarnings.indexOf(warning.key);
- isnot(index, -1, "Found warning: " + warning.key + " for URL:" + testURL);
- if (index !== -1) {
- // Remove the shown message.
- expectWarnings.splice(index, 1);
- }
- if (expectWarnings.length === 0) {
- info("All warnings are shown for URL:" + testURL);
- resolve();
- }
- };
- });
-
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: testURL
- }, function*() {
- if (expectWarnings.length === 0) {
- info("All warnings are shown for URL:" + testURL);
- return Promise.resolve();
- }
- return promiseConsoleMessages;
- });
-
- // Remove warningPatternHandler to stop handling the matched warning pattern
- // and the task should not get any warning anymore.
- warningPatternHandler = null;
- }
-});
diff --git a/toolkit/components/passwordmgr/test/browser/browser_master_password_autocomplete.js b/toolkit/components/passwordmgr/test/browser/browser_master_password_autocomplete.js
deleted file mode 100644
index f3bc62b0a4..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_master_password_autocomplete.js
+++ /dev/null
@@ -1,59 +0,0 @@
-const HOST = "https://example.com";
-const URL = HOST + "/browser/toolkit/components/passwordmgr/test/browser/form_basic.html";
-const TIMEOUT_PREF = "signon.masterPasswordReprompt.timeout_ms";
-
-// Waits for the master password prompt and cancels it.
-function waitForDialog() {
- let dialogShown = TestUtils.topicObserved("common-dialog-loaded");
- return dialogShown.then(function([subject]) {
- let dialog = subject.Dialog;
- is(dialog.args.title, "Password Required");
- dialog.ui.button1.click();
- });
-}
-
-// Test that autocomplete does not trigger a master password prompt
-// for a certain time after it was cancelled.
-add_task(function* test_mpAutocompleteTimeout() {
- let login = LoginTestUtils.testData.formLogin({
- hostname: "https://example.com",
- formSubmitURL: "https://example.com",
- username: "username",
- password: "password",
- });
- Services.logins.addLogin(login);
- LoginTestUtils.masterPassword.enable();
-
- registerCleanupFunction(function() {
- LoginTestUtils.masterPassword.disable();
- Services.logins.removeAllLogins();
- });
-
- // Set master password prompt timeout to 3s.
- // If this test goes intermittent, you likely have to increase this value.
- yield SpecialPowers.pushPrefEnv({set: [[TIMEOUT_PREF, 3000]]});
-
- // Wait for initial master password dialog after opening the tab.
- let dialogShown = waitForDialog();
-
- yield BrowserTestUtils.withNewTab(URL, function*(browser) {
- yield dialogShown;
-
- yield ContentTask.spawn(browser, null, function*() {
- // Focus the password field to trigger autocompletion.
- content.document.getElementById("form-basic-password").focus();
- });
-
- // Wait 4s, dialog should not have been shown
- // (otherwise the code below will not work).
- yield new Promise((c) => setTimeout(c, 4000));
-
- dialogShown = waitForDialog();
- yield ContentTask.spawn(browser, null, function*() {
- // Re-focus the password field to trigger autocompletion.
- content.document.getElementById("form-basic-username").focus();
- content.document.getElementById("form-basic-password").focus();
- });
- yield dialogShown;
- });
-});
diff --git a/toolkit/components/passwordmgr/test/browser/browser_notifications.js b/toolkit/components/passwordmgr/test/browser/browser_notifications.js
deleted file mode 100644
index 4fb012f149..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_notifications.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Test that the doorhanger notification for password saving is populated with
- * the correct values in various password capture cases.
- */
-add_task(function* test_save_change() {
- let testCases = [{
- username: "username",
- password: "password",
- }, {
- username: "",
- password: "password",
- }, {
- username: "username",
- oldPassword: "password",
- password: "newPassword",
- }, {
- username: "",
- oldPassword: "password",
- password: "newPassword",
- }];
-
- for (let { username, oldPassword, password } of testCases) {
- // Add a login for the origin of the form if testing a change notification.
- if (oldPassword) {
- Services.logins.addLogin(LoginTestUtils.testData.formLogin({
- hostname: "https://example.com",
- formSubmitURL: "https://example.com",
- username,
- password: oldPassword,
- }));
- }
-
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "https://example.com/browser/toolkit/components/" +
- "passwordmgr/test/browser/form_basic.html",
- }, function* (browser) {
- // Submit the form in the content page with the credentials from the test
- // case. This will cause the doorhanger notification to be displayed.
- let promiseShown = BrowserTestUtils.waitForEvent(PopupNotifications.panel,
- "popupshown",
- (event) => event.target == PopupNotifications.panel);
- yield ContentTask.spawn(browser, [username, password],
- function* ([contentUsername, contentPassword]) {
- let doc = content.document;
- doc.getElementById("form-basic-username").value = contentUsername;
- doc.getElementById("form-basic-password").value = contentPassword;
- doc.getElementById("form-basic").submit();
- });
- yield promiseShown;
- let notificationElement = PopupNotifications.panel.childNodes[0];
- // Style flush to make sure binding is attached
- notificationElement.querySelector("#password-notification-password").clientTop;
-
- // Check the actual content of the popup notification.
- Assert.equal(notificationElement.querySelector("#password-notification-username")
- .value, username);
- Assert.equal(notificationElement.querySelector("#password-notification-password")
- .value, password);
-
- // Simulate the action on the notification to request the login to be
- // saved, and wait for the data to be updated or saved based on the type
- // of operation we expect.
- let expectedNotification = oldPassword ? "modifyLogin" : "addLogin";
- let promiseLogin = TestUtils.topicObserved("passwordmgr-storage-changed",
- (_, data) => data == expectedNotification);
- notificationElement.button.doCommand();
- let [result] = yield promiseLogin;
-
- // Check that the values in the database match the expected values.
- let login = oldPassword ? result.QueryInterface(Ci.nsIArray)
- .queryElementAt(1, Ci.nsILoginInfo)
- : result.QueryInterface(Ci.nsILoginInfo);
- Assert.equal(login.username, username);
- Assert.equal(login.password, password);
- });
-
- // Clean up the database before the next test case is executed.
- Services.logins.removeAllLogins();
- }
-});
diff --git a/toolkit/components/passwordmgr/test/browser/browser_notifications_2.js b/toolkit/components/passwordmgr/test/browser/browser_notifications_2.js
deleted file mode 100644
index 48c73b0e68..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_notifications_2.js
+++ /dev/null
@@ -1,125 +0,0 @@
-add_task(function* setup() {
- yield SpecialPowers.pushPrefEnv({"set": [
- ["signon.rememberSignons.visibilityToggle", true]
- ]});
-});
-
-/**
- * Test that the doorhanger main action button is disabled
- * when the password field is empty.
- *
- * Also checks that submiting an empty password throws an error.
- */
-add_task(function* test_empty_password() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "https://example.com/browser/toolkit/components/" +
- "passwordmgr/test/browser/form_basic.html",
- }, function* (browser) {
- // Submit the form in the content page with the credentials from the test
- // case. This will cause the doorhanger notification to be displayed.
- let promiseShown = BrowserTestUtils.waitForEvent(PopupNotifications.panel,
- "popupshown",
- (event) => event.target == PopupNotifications.panel);
- yield ContentTask.spawn(browser, null,
- function* () {
- let doc = content.document;
- doc.getElementById("form-basic-username").value = "username";
- doc.getElementById("form-basic-password").value = "p";
- doc.getElementById("form-basic").submit();
- });
- yield promiseShown;
-
- let notificationElement = PopupNotifications.panel.childNodes[0];
- let passwordTextbox = notificationElement.querySelector("#password-notification-password");
- let toggleCheckbox = notificationElement.querySelector("#password-notification-visibilityToggle");
-
- // Synthesize input to empty the field
- passwordTextbox.focus();
- yield EventUtils.synthesizeKey("VK_RIGHT", {});
- yield EventUtils.synthesizeKey("VK_BACK_SPACE", {});
-
- let mainActionButton = document.getAnonymousElementByAttribute(notificationElement.button, "anonid", "button");
- Assert.ok(mainActionButton.disabled, "Main action button is disabled");
-
- // Makes sure submiting an empty password throws an error
- Assert.throws(notificationElement.button.doCommand(),
- "Can't add a login with a null or empty password.",
- "Should fail for an empty password");
- });
-});
-
-/**
- * Test that the doorhanger password field shows plain or * text
- * when the checkbox is checked.
- */
-add_task(function* test_toggle_password() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "https://example.com/browser/toolkit/components/" +
- "passwordmgr/test/browser/form_basic.html",
- }, function* (browser) {
- // Submit the form in the content page with the credentials from the test
- // case. This will cause the doorhanger notification to be displayed.
- let promiseShown = BrowserTestUtils.waitForEvent(PopupNotifications.panel,
- "popupshown",
- (event) => event.target == PopupNotifications.panel);
- yield ContentTask.spawn(browser, null,
- function* () {
- let doc = content.document;
- doc.getElementById("form-basic-username").value = "username";
- doc.getElementById("form-basic-password").value = "p";
- doc.getElementById("form-basic").submit();
- });
- yield promiseShown;
-
- let notificationElement = PopupNotifications.panel.childNodes[0];
- let passwordTextbox = notificationElement.querySelector("#password-notification-password");
- let toggleCheckbox = notificationElement.querySelector("#password-notification-visibilityToggle");
-
- yield EventUtils.synthesizeMouseAtCenter(toggleCheckbox, {});
- Assert.ok(toggleCheckbox.checked);
- Assert.equal(passwordTextbox.type, "", "Password textbox changed to plain text");
-
- yield EventUtils.synthesizeMouseAtCenter(toggleCheckbox, {});
- Assert.ok(!toggleCheckbox.checked);
- Assert.equal(passwordTextbox.type, "password", "Password textbox changed to * text");
- });
-});
-
-/**
- * Test that the doorhanger password toggle checkbox is disabled
- * when the master password is set.
- */
-add_task(function* test_checkbox_disabled_if_has_master_password() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "https://example.com/browser/toolkit/components/" +
- "passwordmgr/test/browser/form_basic.html",
- }, function* (browser) {
- // Submit the form in the content page with the credentials from the test
- // case. This will cause the doorhanger notification to be displayed.
- let promiseShown = BrowserTestUtils.waitForEvent(PopupNotifications.panel,
- "popupshown",
- (event) => event.target == PopupNotifications.panel);
-
- LoginTestUtils.masterPassword.enable();
-
- yield ContentTask.spawn(browser, null, function* () {
- let doc = content.document;
- doc.getElementById("form-basic-username").value = "username";
- doc.getElementById("form-basic-password").value = "p";
- doc.getElementById("form-basic").submit();
- });
- yield promiseShown;
-
- let notificationElement = PopupNotifications.panel.childNodes[0];
- let passwordTextbox = notificationElement.querySelector("#password-notification-password");
- let toggleCheckbox = notificationElement.querySelector("#password-notification-visibilityToggle");
-
- Assert.equal(passwordTextbox.type, "password", "Password textbox should show * text");
- Assert.ok(toggleCheckbox.getAttribute("hidden"), "checkbox is hidden when master password is set");
- });
-
- LoginTestUtils.masterPassword.disable();
-});
diff --git a/toolkit/components/passwordmgr/test/browser/browser_notifications_password.js b/toolkit/components/passwordmgr/test/browser/browser_notifications_password.js
deleted file mode 100644
index 8ac49dac55..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_notifications_password.js
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- * Test changing the password inside the doorhanger notification for passwords.
- *
- * We check the following cases:
- * - Editing the password of a new login.
- * - Editing the password of an existing login.
- * - Changing both username and password to an existing login.
- * - Changing the username to an existing login.
- * - Editing username to an empty one and a new password.
- *
- * If both the username and password matches an already existing login, we should not
- * update it's password, but only it's usage timestamp and count.
- */
-add_task(function* test_edit_password() {
- let testCases = [{
- usernameInPage: "username",
- passwordInPage: "password",
- passwordChangedTo: "newPassword",
- timesUsed: 1,
- }, {
- usernameInPage: "username",
- usernameInPageExists: true,
- passwordInPage: "password",
- passwordInStorage: "oldPassword",
- passwordChangedTo: "newPassword",
- timesUsed: 2,
- }, {
- usernameInPage: "username",
- usernameChangedTo: "newUsername",
- usernameChangedToExists: true,
- passwordInPage: "password",
- passwordChangedTo: "newPassword",
- timesUsed: 2,
- }, {
- usernameInPage: "username",
- usernameChangedTo: "newUsername",
- usernameChangedToExists: true,
- passwordInPage: "password",
- passwordChangedTo: "password",
- timesUsed: 2,
- checkPasswordNotUpdated: true,
- }, {
- usernameInPage: "newUsername",
- usernameChangedTo: "",
- usernameChangedToExists: true,
- passwordInPage: "password",
- passwordChangedTo: "newPassword",
- timesUsed: 2,
- }];
-
- for (let testCase of testCases) {
- info("Test case: " + JSON.stringify(testCase));
-
- // Create the pre-existing logins when needed.
- if (testCase.usernameInPageExists) {
- Services.logins.addLogin(LoginTestUtils.testData.formLogin({
- hostname: "https://example.com",
- formSubmitURL: "https://example.com",
- username: testCase.usernameInPage,
- password: testCase.passwordInStorage,
- }));
- }
-
- if (testCase.usernameChangedToExists) {
- Services.logins.addLogin(LoginTestUtils.testData.formLogin({
- hostname: "https://example.com",
- formSubmitURL: "https://example.com",
- username: testCase.usernameChangedTo,
- password: testCase.passwordChangedTo,
- }));
- }
-
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "https://example.com/browser/toolkit/components/" +
- "passwordmgr/test/browser/form_basic.html",
- }, function* (browser) {
- // Submit the form in the content page with the credentials from the test
- // case. This will cause the doorhanger notification to be displayed.
- let promiseShown = BrowserTestUtils.waitForEvent(PopupNotifications.panel,
- "popupshown",
- (event) => event.target == PopupNotifications.panel);
- yield ContentTask.spawn(browser, testCase,
- function* (contentTestCase) {
- let doc = content.document;
- doc.getElementById("form-basic-username").value = contentTestCase.usernameInPage;
- doc.getElementById("form-basic-password").value = contentTestCase.passwordInPage;
- doc.getElementById("form-basic").submit();
- });
- yield promiseShown;
- let notificationElement = PopupNotifications.panel.childNodes[0];
- // Style flush to make sure binding is attached
- notificationElement.querySelector("#password-notification-password").clientTop;
-
- // Modify the username in the dialog if requested.
- if (testCase.usernameChangedTo) {
- notificationElement.querySelector("#password-notification-username")
- .value = testCase.usernameChangedTo;
- }
-
- // Modify the password in the dialog if requested.
- if (testCase.passwordChangedTo) {
- notificationElement.querySelector("#password-notification-password")
- .value = testCase.passwordChangedTo;
- }
-
- // We expect a modifyLogin notification if the final username used by the
- // dialog exists in the logins database, otherwise an addLogin one.
- let expectModifyLogin = typeof testCase.usernameChangedTo !== "undefined"
- ? testCase.usernameChangedToExists
- : testCase.usernameInPageExists;
-
- // Simulate the action on the notification to request the login to be
- // saved, and wait for the data to be updated or saved based on the type
- // of operation we expect.
- let expectedNotification = expectModifyLogin ? "modifyLogin" : "addLogin";
- let promiseLogin = TestUtils.topicObserved("passwordmgr-storage-changed",
- (_, data) => data == expectedNotification);
- notificationElement.button.doCommand();
- let [result] = yield promiseLogin;
-
- // Check that the values in the database match the expected values.
- let login = expectModifyLogin ? result.QueryInterface(Ci.nsIArray)
- .queryElementAt(1, Ci.nsILoginInfo)
- : result.QueryInterface(Ci.nsILoginInfo);
-
- Assert.equal(login.username, testCase.usernameChangedTo ||
- testCase.usernameInPage);
- Assert.equal(login.password, testCase.passwordChangedTo ||
- testCase.passwordInPage);
-
- let meta = login.QueryInterface(Ci.nsILoginMetaInfo);
- Assert.equal(meta.timesUsed, testCase.timesUsed);
-
- // Check that the password was not updated if the user is empty
- if (testCase.checkPasswordNotUpdated) {
- Assert.ok(meta.timeLastUsed > meta.timeCreated);
- Assert.ok(meta.timeCreated == meta.timePasswordChanged);
- }
- });
-
- // Clean up the database before the next test case is executed.
- Services.logins.removeAllLogins();
- }
-});
diff --git a/toolkit/components/passwordmgr/test/browser/browser_notifications_username.js b/toolkit/components/passwordmgr/test/browser/browser_notifications_username.js
deleted file mode 100644
index 2c9ea26070..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_notifications_username.js
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- * Test changing the username inside the doorhanger notification for passwords.
- *
- * We have to test combination of existing and non-existing logins both for
- * the original one from the webpage and the final one used by the dialog.
- *
- * We also check switching to and from empty usernames.
- */
-add_task(function* test_edit_username() {
- let testCases = [{
- usernameInPage: "username",
- usernameChangedTo: "newUsername",
- }, {
- usernameInPage: "username",
- usernameInPageExists: true,
- usernameChangedTo: "newUsername",
- }, {
- usernameInPage: "username",
- usernameChangedTo: "newUsername",
- usernameChangedToExists: true,
- }, {
- usernameInPage: "username",
- usernameInPageExists: true,
- usernameChangedTo: "newUsername",
- usernameChangedToExists: true,
- }, {
- usernameInPage: "",
- usernameChangedTo: "newUsername",
- }, {
- usernameInPage: "newUsername",
- usernameChangedTo: "",
- }, {
- usernameInPage: "",
- usernameChangedTo: "newUsername",
- usernameChangedToExists: true,
- }, {
- usernameInPage: "newUsername",
- usernameChangedTo: "",
- usernameChangedToExists: true,
- }];
-
- for (let testCase of testCases) {
- info("Test case: " + JSON.stringify(testCase));
-
- // Create the pre-existing logins when needed.
- if (testCase.usernameInPageExists) {
- Services.logins.addLogin(LoginTestUtils.testData.formLogin({
- hostname: "https://example.com",
- formSubmitURL: "https://example.com",
- username: testCase.usernameInPage,
- password: "old password",
- }));
- }
-
- if (testCase.usernameChangedToExists) {
- Services.logins.addLogin(LoginTestUtils.testData.formLogin({
- hostname: "https://example.com",
- formSubmitURL: "https://example.com",
- username: testCase.usernameChangedTo,
- password: "old password",
- }));
- }
-
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "https://example.com/browser/toolkit/components/" +
- "passwordmgr/test/browser/form_basic.html",
- }, function* (browser) {
- // Submit the form in the content page with the credentials from the test
- // case. This will cause the doorhanger notification to be displayed.
- let promiseShown = BrowserTestUtils.waitForEvent(PopupNotifications.panel,
- "popupshown",
- (event) => event.target == PopupNotifications.panel);
- yield ContentTask.spawn(browser, testCase.usernameInPage,
- function* (usernameInPage) {
- let doc = content.document;
- doc.getElementById("form-basic-username").value = usernameInPage;
- doc.getElementById("form-basic-password").value = "password";
- doc.getElementById("form-basic").submit();
- });
- yield promiseShown;
- let notificationElement = PopupNotifications.panel.childNodes[0];
- // Style flush to make sure binding is attached
- notificationElement.querySelector("#password-notification-password").clientTop;
-
- // Modify the username in the dialog if requested.
- if (testCase.usernameChangedTo) {
- notificationElement.querySelector("#password-notification-username")
- .value = testCase.usernameChangedTo;
- }
-
- // We expect a modifyLogin notification if the final username used by the
- // dialog exists in the logins database, otherwise an addLogin one.
- let expectModifyLogin = testCase.usernameChangedTo
- ? testCase.usernameChangedToExists
- : testCase.usernameInPageExists;
-
- // Simulate the action on the notification to request the login to be
- // saved, and wait for the data to be updated or saved based on the type
- // of operation we expect.
- let expectedNotification = expectModifyLogin ? "modifyLogin" : "addLogin";
- let promiseLogin = TestUtils.topicObserved("passwordmgr-storage-changed",
- (_, data) => data == expectedNotification);
- notificationElement.button.doCommand();
- let [result] = yield promiseLogin;
-
- // Check that the values in the database match the expected values.
- let login = expectModifyLogin ? result.QueryInterface(Ci.nsIArray)
- .queryElementAt(1, Ci.nsILoginInfo)
- : result.QueryInterface(Ci.nsILoginInfo);
- Assert.equal(login.username, testCase.usernameChangedTo ||
- testCase.usernameInPage);
- Assert.equal(login.password, "password");
- });
-
- // Clean up the database before the next test case is executed.
- Services.logins.removeAllLogins();
- }
-});
diff --git a/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_contextmenu.js b/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_contextmenu.js
deleted file mode 100644
index ece2b731f5..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_contextmenu.js
+++ /dev/null
@@ -1,100 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function test() {
- waitForExplicitFinish();
-
- Services.logins.removeAllLogins();
-
- // Add some initial logins
- let urls = [
- "http://example.com/",
- "http://mozilla.org/",
- "http://spreadfirefox.com/",
- "https://support.mozilla.org/",
- "http://hg.mozilla.org/"
- ];
- let nsLoginInfo = new Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
- Ci.nsILoginInfo, "init");
- let logins = [
- new nsLoginInfo(urls[0], urls[0], null, "", "o hai", "u1", "p1"),
- new nsLoginInfo(urls[1], urls[1], null, "ehsan", "coded", "u2", "p2"),
- new nsLoginInfo(urls[2], urls[2], null, "this", "awesome", "u3", "p3"),
- new nsLoginInfo(urls[3], urls[3], null, "array of", "logins", "u4", "p4"),
- new nsLoginInfo(urls[4], urls[4], null, "then", "i wrote the test", "u5", "p5")
- ];
- logins.forEach(login => Services.logins.addLogin(login));
-
- // Open the password manager dialog
- const PWMGR_DLG = "chrome://passwordmgr/content/passwordManager.xul";
- let pwmgrdlg = window.openDialog(PWMGR_DLG, "Toolkit:PasswordManager", "");
- SimpleTest.waitForFocus(doTest, pwmgrdlg);
-
- // Test if "Copy Username" and "Copy Password" works
- function doTest() {
- let doc = pwmgrdlg.document;
- let selection = doc.getElementById("signonsTree").view.selection;
- let menuitem = doc.getElementById("context-copyusername");
-
- function copyField() {
- info("Select all");
- selection.selectAll();
- assertMenuitemEnabled("copyusername", false);
- assertMenuitemEnabled("editusername", false);
- assertMenuitemEnabled("copypassword", false);
- assertMenuitemEnabled("editpassword", false);
-
- info("Select the first row (with an empty username)");
- selection.select(0);
- assertMenuitemEnabled("copyusername", false, "empty username");
- assertMenuitemEnabled("editusername", true);
- assertMenuitemEnabled("copypassword", true);
- assertMenuitemEnabled("editpassword", false, "password column hidden");
-
- info("Clear the selection");
- selection.clearSelection();
- assertMenuitemEnabled("copyusername", false);
- assertMenuitemEnabled("editusername", false);
- assertMenuitemEnabled("copypassword", false);
- assertMenuitemEnabled("editpassword", false);
-
- info("Select the third row and making the password column visible");
- selection.select(2);
- doc.getElementById("passwordCol").hidden = false;
- assertMenuitemEnabled("copyusername", true);
- assertMenuitemEnabled("editusername", true);
- assertMenuitemEnabled("copypassword", true);
- assertMenuitemEnabled("editpassword", true, "password column visible");
- menuitem.doCommand();
- }
-
- function assertMenuitemEnabled(idSuffix, expected, reason = "") {
- doc.defaultView.UpdateContextMenu();
- let actual = !doc.getElementById("context-" + idSuffix).getAttribute("disabled");
- is(actual, expected, idSuffix + " should be " + (expected ? "enabled" : "disabled") +
- (reason ? ": " + reason : ""));
- }
-
- function cleanUp() {
- Services.ww.registerNotification(function (aSubject, aTopic, aData) {
- Services.ww.unregisterNotification(arguments.callee);
- Services.logins.removeAllLogins();
- doc.getElementById("passwordCol").hidden = true;
- finish();
- });
- pwmgrdlg.close();
- }
-
- function testPassword() {
- info("Testing Copy Password");
- waitForClipboard("coded", function copyPassword() {
- menuitem = doc.getElementById("context-copypassword");
- menuitem.doCommand();
- }, cleanUp, cleanUp);
- }
-
- info("Testing Copy Username");
- waitForClipboard("ehsan", copyField, testPassword, testPassword);
- }
-}
diff --git a/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_editing.js b/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_editing.js
deleted file mode 100644
index 2b2e422733..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_editing.js
+++ /dev/null
@@ -1,126 +0,0 @@
-const { ContentTaskUtils } = Cu.import("resource://testing-common/ContentTaskUtils.jsm", {});
-const PWMGR_DLG = "chrome://passwordmgr/content/passwordManager.xul";
-
-var doc;
-var pwmgr;
-var pwmgrdlg;
-var signonsTree;
-
-function addLogin(site, username, password) {
- let nsLoginInfo = new Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
- Ci.nsILoginInfo, "init");
- let login = new nsLoginInfo(site, site, null, username, password, "u", "p");
- Services.logins.addLogin(login);
-}
-
-function getUsername(row) {
- return signonsTree.view.getCellText(row, signonsTree.columns.getNamedColumn("userCol"));
-}
-
-function getPassword(row) {
- return signonsTree.view.getCellText(row, signonsTree.columns.getNamedColumn("passwordCol"));
-}
-
-function synthesizeDblClickOnCell(aTree, column, row) {
- let tbo = aTree.treeBoxObject;
- let rect = tbo.getCoordsForCellItem(row, aTree.columns[column], "text");
- let x = rect.x + rect.width / 2;
- let y = rect.y + rect.height / 2;
- // Simulate the double click.
- EventUtils.synthesizeMouse(aTree.body, x, y, { clickCount: 2 },
- aTree.ownerDocument.defaultView);
-}
-
-function* togglePasswords() {
- pwmgrdlg.document.querySelector("#togglePasswords").doCommand();
- yield new Promise(resolve => waitForFocus(resolve, pwmgrdlg));
-}
-
-function* editUsernamePromises(site, oldUsername, newUsername) {
- is(Services.logins.findLogins({}, site, "", "").length, 1, "Correct login found");
- let login = Services.logins.findLogins({}, site, "", "")[0];
- is(login.username, oldUsername, "Correct username saved");
- is(getUsername(0), oldUsername, "Correct username shown");
- synthesizeDblClickOnCell(signonsTree, 1, 0);
- yield ContentTaskUtils.waitForCondition(() => signonsTree.getAttribute("editing"),
- "Waiting for editing");
-
- EventUtils.sendString(newUsername, pwmgrdlg);
- let signonsIntro = doc.querySelector("#signonsIntro");
- EventUtils.sendMouseEvent({type: "click"}, signonsIntro, pwmgrdlg);
- yield ContentTaskUtils.waitForCondition(() => !signonsTree.getAttribute("editing"),
- "Waiting for editing to stop");
-
- is(Services.logins.findLogins({}, site, "", "").length, 1, "Correct login replaced");
- login = Services.logins.findLogins({}, site, "", "")[0];
- is(login.username, newUsername, "Correct username updated");
- is(getUsername(0), newUsername, "Correct username shown after the update");
-}
-
-function* editPasswordPromises(site, oldPassword, newPassword) {
- is(Services.logins.findLogins({}, site, "", "").length, 1, "Correct login found");
- let login = Services.logins.findLogins({}, site, "", "")[0];
- is(login.password, oldPassword, "Correct password saved");
- is(getPassword(0), oldPassword, "Correct password shown");
-
- synthesizeDblClickOnCell(signonsTree, 2, 0);
- yield ContentTaskUtils.waitForCondition(() => signonsTree.getAttribute("editing"),
- "Waiting for editing");
-
- EventUtils.sendString(newPassword, pwmgrdlg);
- let signonsIntro = doc.querySelector("#signonsIntro");
- EventUtils.sendMouseEvent({type: "click"}, signonsIntro, pwmgrdlg);
- yield ContentTaskUtils.waitForCondition(() => !signonsTree.getAttribute("editing"),
- "Waiting for editing to stop");
-
- is(Services.logins.findLogins({}, site, "", "").length, 1, "Correct login replaced");
- login = Services.logins.findLogins({}, site, "", "")[0];
- is(login.password, newPassword, "Correct password updated");
- is(getPassword(0), newPassword, "Correct password shown after the update");
-}
-
-add_task(function* test_setup() {
- registerCleanupFunction(function() {
- Services.logins.removeAllLogins();
- });
-
- Services.logins.removeAllLogins();
- // Open the password manager dialog.
- pwmgrdlg = window.openDialog(PWMGR_DLG, "Toolkit:PasswordManager", "");
-
- Services.ww.registerNotification(function (aSubject, aTopic, aData) {
- if (aTopic == "domwindowopened") {
- let win = aSubject.QueryInterface(Ci.nsIDOMEventTarget);
- SimpleTest.waitForFocus(function() {
- EventUtils.sendKey("RETURN", win);
- }, win);
- } else if (aSubject.location == pwmgrdlg.location && aTopic == "domwindowclosed") {
- // Unregister ourself.
- Services.ww.unregisterNotification(arguments.callee);
- }
- });
-
- yield new Promise((resolve) => {
- SimpleTest.waitForFocus(() => {
- doc = pwmgrdlg.document;
- signonsTree = doc.querySelector("#signonsTree");
- resolve();
- }, pwmgrdlg);
- });
-});
-
-add_task(function* test_edit_multiple_logins() {
- function* testLoginChange(site, oldUsername, oldPassword, newUsername, newPassword) {
- addLogin(site, oldUsername, oldPassword);
- yield* editUsernamePromises(site, oldUsername, newUsername);
- yield* togglePasswords();
- yield* editPasswordPromises(site, oldPassword, newPassword);
- yield* togglePasswords();
- }
-
- yield* testLoginChange("http://c.tn/", "userC", "passC", "usernameC", "passwordC");
- yield* testLoginChange("http://b.tn/", "userB", "passB", "usernameB", "passwordB");
- yield* testLoginChange("http://a.tn/", "userA", "passA", "usernameA", "passwordA");
-
- pwmgrdlg.close();
-});
diff --git a/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_fields.js b/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_fields.js
deleted file mode 100644
index 95bcee9ed2..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_fields.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function test() {
- waitForExplicitFinish();
-
- let pwmgr = Cc["@mozilla.org/login-manager;1"].
- getService(Ci.nsILoginManager);
- pwmgr.removeAllLogins();
-
- // add login data
- let nsLoginInfo = new Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
- Ci.nsILoginInfo, "init");
- let login = new nsLoginInfo("http://example.com/", "http://example.com/", null,
- "user", "password", "u1", "p1");
- pwmgr.addLogin(login);
-
- // Open the password manager dialog
- const PWMGR_DLG = "chrome://passwordmgr/content/passwordManager.xul";
- let pwmgrdlg = window.openDialog(PWMGR_DLG, "Toolkit:PasswordManager", "");
- SimpleTest.waitForFocus(doTest, pwmgrdlg);
-
- function doTest() {
- let doc = pwmgrdlg.document;
-
- let signonsTree = doc.querySelector("#signonsTree");
- is(signonsTree.view.rowCount, 1, "One entry in the passwords list");
-
- is(signonsTree.view.getCellText(0, signonsTree.columns.getNamedColumn("siteCol")),
- "http://example.com/",
- "Correct website saved");
-
- is(signonsTree.view.getCellText(0, signonsTree.columns.getNamedColumn("userCol")),
- "user",
- "Correct user saved");
-
- let timeCreatedCol = doc.getElementById("timeCreatedCol");
- is(timeCreatedCol.getAttribute("hidden"), "true",
- "Time created column is not displayed");
-
-
- let timeLastUsedCol = doc.getElementById("timeLastUsedCol");
- is(timeLastUsedCol.getAttribute("hidden"), "true",
- "Last Used column is not displayed");
-
- let timePasswordChangedCol = doc.getElementById("timePasswordChangedCol");
- is(timePasswordChangedCol.getAttribute("hidden"), "",
- "Last Changed column is displayed");
-
- // cleanup
- Services.ww.registerNotification(function (aSubject, aTopic, aData) {
- if (aSubject.location == pwmgrdlg.location && aTopic == "domwindowclosed") {
- // unregister ourself
- Services.ww.unregisterNotification(arguments.callee);
-
- pwmgr.removeAllLogins();
-
- finish();
- }
- });
-
- pwmgrdlg.close();
- }
-}
diff --git a/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_observers.js b/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_observers.js
deleted file mode 100644
index 1dc7076aad..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_observers.js
+++ /dev/null
@@ -1,129 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function test() {
- waitForExplicitFinish();
-
- const LOGIN_HOST = "http://example.com";
- const LOGIN_COUNT = 5;
-
- let nsLoginInfo = new Components.Constructor(
- "@mozilla.org/login-manager/loginInfo;1", Ci.nsILoginInfo, "init");
- let pmDialog = window.openDialog(
- "chrome://passwordmgr/content/passwordManager.xul",
- "Toolkit:PasswordManager", "");
-
- let logins = [];
- let loginCounter = 0;
- let loginOrder = null;
- let modifiedLogin;
- let testNumber = 0;
- let testObserver = {
- observe: function (subject, topic, data) {
- if (topic == "passwordmgr-dialog-updated") {
- switch (testNumber) {
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- is(countLogins(), loginCounter, "Verify login added");
- ok(getLoginOrder().startsWith(loginOrder), "Verify login order");
- runNextTest();
- break;
- case 6:
- is(countLogins(), loginCounter, "Verify login count");
- is(getLoginOrder(), loginOrder, "Verify login order");
- is(getLoginPassword(), "newpassword0", "Verify login modified");
- runNextTest();
- break;
- case 7:
- is(countLogins(), loginCounter, "Verify login removed");
- ok(loginOrder.endsWith(getLoginOrder()), "Verify login order");
- runNextTest();
- break;
- case 8:
- is(countLogins(), 0, "Verify all logins removed");
- runNextTest();
- break;
- }
- }
- }
- };
-
- SimpleTest.waitForFocus(startTest, pmDialog);
-
- function createLogins() {
- let login;
- for (let i = 0; i < LOGIN_COUNT; i++) {
- login = new nsLoginInfo(LOGIN_HOST + "?n=" + i, LOGIN_HOST + "?n=" + i,
- null, "user" + i, "password" + i, "u" + i, "p" + i);
- logins.push(login);
- }
- modifiedLogin = new nsLoginInfo(LOGIN_HOST + "?n=0", LOGIN_HOST + "?n=0",
- null, "user0", "newpassword0", "u0", "p0");
- is(logins.length, LOGIN_COUNT, "Verify logins created");
- }
-
- function countLogins() {
- let doc = pmDialog.document;
- let signonsTree = doc.getElementById("signonsTree");
- return signonsTree.view.rowCount;
- }
-
- function getLoginOrder() {
- let doc = pmDialog.document;
- let signonsTree = doc.getElementById("signonsTree");
- let column = signonsTree.columns[0]; // host column
- let order = [];
- for (let i = 0; i < signonsTree.view.rowCount; i++) {
- order.push(signonsTree.view.getCellText(i, column));
- }
- return order.join(',');
- }
-
- function getLoginPassword() {
- let doc = pmDialog.document;
- let loginsTree = doc.getElementById("signonsTree");
- let column = loginsTree.columns[2]; // password column
- return loginsTree.view.getCellText(0, column);
- }
-
- function startTest() {
- Services.obs.addObserver(
- testObserver, "passwordmgr-dialog-updated", false);
- is(countLogins(), 0, "Verify starts with 0 logins");
- createLogins();
- runNextTest();
- }
-
- function runNextTest() {
- switch (++testNumber) {
- case 1: // add the logins
- for (let i = 0; i < logins.length; i++) {
- loginCounter++;
- loginOrder = getLoginOrder();
- Services.logins.addLogin(logins[i]);
- }
- break;
- case 6: // modify a login
- loginOrder = getLoginOrder();
- Services.logins.modifyLogin(logins[0], modifiedLogin);
- break;
- case 7: // remove a login
- loginCounter--;
- loginOrder = getLoginOrder();
- Services.logins.removeLogin(modifiedLogin);
- break;
- case 8: // remove all logins
- Services.logins.removeAllLogins();
- break;
- case 9: // finish
- Services.obs.removeObserver(
- testObserver, "passwordmgr-dialog-updated", false);
- pmDialog.close();
- finish();
- break;
- }
- }
-}
diff --git a/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_sort.js b/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_sort.js
deleted file mode 100644
index 83272a9c41..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_sort.js
+++ /dev/null
@@ -1,208 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function test() {
- waitForExplicitFinish();
-
- let pwmgr = Cc["@mozilla.org/login-manager;1"].
- getService(Ci.nsILoginManager);
- pwmgr.removeAllLogins();
-
- // Add some initial logins
- let urls = [
- "http://example.com/",
- "http://example.org/",
- "http://mozilla.com/",
- "http://mozilla.org/",
- "http://spreadfirefox.com/",
- "http://planet.mozilla.org/",
- "https://developer.mozilla.org/",
- "http://hg.mozilla.org/",
- "http://dxr.mozilla.org/",
- "http://feeds.mozilla.org/",
- ];
- let users = [
- "user",
- "username",
- "ehsan",
- "ehsan",
- "john",
- "what?",
- "really?",
- "you sure?",
- "my user name",
- "my username",
- ];
- let pwds = [
- "password",
- "password",
- "mypass",
- "mypass",
- "smith",
- "very secret",
- "super secret",
- "absolutely",
- "mozilla",
- "mozilla.com",
- ];
- let nsLoginInfo = new Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
- Ci.nsILoginInfo, "init");
- for (let i = 0; i < 10; i++)
- pwmgr.addLogin(new nsLoginInfo(urls[i], urls[i], null, users[i], pwds[i],
- "u" + (i + 1), "p" + (i + 1)));
-
- // Open the password manager dialog
- const PWMGR_DLG = "chrome://passwordmgr/content/passwordManager.xul";
- let pwmgrdlg = window.openDialog(PWMGR_DLG, "Toolkit:PasswordManager", "");
- SimpleTest.waitForFocus(doTest, pwmgrdlg);
-
- // the meat of the test
- function doTest() {
- let doc = pwmgrdlg.document;
- let win = doc.defaultView;
- let sTree = doc.getElementById("signonsTree");
- let filter = doc.getElementById("filter");
- let siteCol = doc.getElementById("siteCol");
- let userCol = doc.getElementById("userCol");
- let passwordCol = doc.getElementById("passwordCol");
-
- let toggleCalls = 0;
- function toggleShowPasswords(func) {
- let toggleButton = doc.getElementById("togglePasswords");
- let showMode = (toggleCalls++ % 2) == 0;
-
- // only watch for a confirmation dialog every other time being called
- if (showMode) {
- Services.ww.registerNotification(function (aSubject, aTopic, aData) {
- if (aTopic == "domwindowclosed")
- Services.ww.unregisterNotification(arguments.callee);
- else if (aTopic == "domwindowopened") {
- let targetWin = aSubject.QueryInterface(Ci.nsIDOMEventTarget);
- SimpleTest.waitForFocus(function() {
- EventUtils.sendKey("RETURN", targetWin);
- }, targetWin);
- }
- });
- }
-
- Services.obs.addObserver(function (aSubject, aTopic, aData) {
- if (aTopic == "passwordmgr-password-toggle-complete") {
- Services.obs.removeObserver(arguments.callee, aTopic);
- func();
- }
- }, "passwordmgr-password-toggle-complete", false);
-
- EventUtils.synthesizeMouse(toggleButton, 1, 1, {}, win);
- }
-
- function clickCol(col) {
- EventUtils.synthesizeMouse(col, 20, 1, {}, win);
- setTimeout(runNextTest, 0);
- }
-
- function setFilter(string) {
- filter.value = string;
- filter.doCommand();
- setTimeout(runNextTest, 0);
- }
-
- function checkSortMarkers(activeCol) {
- let isOk = true;
- let col = null;
- let hasAttr = false;
- let treecols = activeCol.parentNode;
- for (let i = 0; i < treecols.childNodes.length; i++) {
- col = treecols.childNodes[i];
- if (col.nodeName != "treecol")
- continue;
- hasAttr = col.hasAttribute("sortDirection");
- isOk &= col == activeCol ? hasAttr : !hasAttr;
- }
- ok(isOk, "Only " + activeCol.id + " has a sort marker");
- }
-
- function checkSortDirection(col, ascending) {
- checkSortMarkers(col);
- let direction = ascending ? "ascending" : "descending";
- is(col.getAttribute("sortDirection"), direction,
- col.id + ": sort direction is " + direction);
- }
-
- function checkColumnEntries(aCol, expectedValues) {
- let actualValues = getColumnEntries(aCol);
- is(actualValues.length, expectedValues.length, "Checking length of expected column");
- for (let i = 0; i < expectedValues.length; i++)
- is(actualValues[i], expectedValues[i], "Checking column entry #" + i);
- }
-
- function getColumnEntries(aCol) {
- let entries = [];
- let column = sTree.columns[aCol];
- let numRows = sTree.view.rowCount;
- for (let i = 0; i < numRows; i++)
- entries.push(sTree.view.getCellText(i, column));
- return entries;
- }
-
- let testCounter = 0;
- let expectedValues;
- function runNextTest() {
- switch (testCounter++) {
- case 0:
- expectedValues = urls.slice().sort();
- checkColumnEntries(0, expectedValues);
- checkSortDirection(siteCol, true);
- // Toggle sort direction on Host column
- clickCol(siteCol);
- break;
- case 1:
- expectedValues.reverse();
- checkColumnEntries(0, expectedValues);
- checkSortDirection(siteCol, false);
- // Sort by Username
- clickCol(userCol);
- break;
- case 2:
- expectedValues = users.slice().sort();
- checkColumnEntries(1, expectedValues);
- checkSortDirection(userCol, true);
- // Sort by Password
- clickCol(passwordCol);
- break;
- case 3:
- expectedValues = pwds.slice().sort();
- checkColumnEntries(2, expectedValues);
- checkSortDirection(passwordCol, true);
- // Set filter
- setFilter("moz");
- break;
- case 4:
- expectedValues = [ "absolutely", "mozilla", "mozilla.com",
- "mypass", "mypass", "super secret",
- "very secret" ];
- checkColumnEntries(2, expectedValues);
- checkSortDirection(passwordCol, true);
- // Reset filter
- setFilter("");
- break;
- case 5:
- expectedValues = pwds.slice().sort();
- checkColumnEntries(2, expectedValues);
- checkSortDirection(passwordCol, true);
- // cleanup
- Services.ww.registerNotification(function (aSubject, aTopic, aData) {
- // unregister ourself
- Services.ww.unregisterNotification(arguments.callee);
-
- pwmgr.removeAllLogins();
- finish();
- });
- pwmgrdlg.close();
- }
- }
-
- // Toggle Show Passwords to display Password column, then start tests
- toggleShowPasswords(runNextTest);
- }
-}
diff --git a/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_switchtab.js b/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_switchtab.js
deleted file mode 100644
index bd4f265b51..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_switchtab.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/* 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/. */
-
-const PROMPT_URL = "chrome://global/content/commonDialog.xul";
-var { interfaces: Ci } = Components;
-
-function test() {
- waitForExplicitFinish();
-
- let tab = gBrowser.addTab();
- isnot(tab, gBrowser.selectedTab, "New tab shouldn't be selected");
-
- let listener = {
- onOpenWindow: function(window) {
- var domwindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindow);
- waitForFocus(() => {
- is(domwindow.document.location.href, PROMPT_URL, "Should have seen a prompt window");
- is(domwindow.args.promptType, "promptUserAndPass", "Should be an authenticate prompt");
-
- is(gBrowser.selectedTab, tab, "Should have selected the new tab");
-
- domwindow.document.documentElement.cancelDialog();
- }, domwindow);
- },
-
- onCloseWindow: function() {
- }
- };
-
- Services.wm.addListener(listener);
- registerCleanupFunction(() => {
- Services.wm.removeListener(listener);
- gBrowser.removeTab(tab);
- });
-
- tab.linkedBrowser.addEventListener("load", () => {
- finish();
- }, true);
- tab.linkedBrowser.loadURI("http://example.com/browser/toolkit/components/passwordmgr/test/browser/authenticate.sjs");
-}
diff --git a/toolkit/components/passwordmgr/test/browser/browser_passwordmgrdlg.js b/toolkit/components/passwordmgr/test/browser/browser_passwordmgrdlg.js
deleted file mode 100644
index 57cfa9f83c..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_passwordmgrdlg.js
+++ /dev/null
@@ -1,192 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function test() {
- waitForExplicitFinish();
-
- let pwmgr = Cc["@mozilla.org/login-manager;1"].
- getService(Ci.nsILoginManager);
- pwmgr.removeAllLogins();
-
- // Add some initial logins
- let urls = [
- "http://example.com/",
- "http://example.org/",
- "http://mozilla.com/",
- "http://mozilla.org/",
- "http://spreadfirefox.com/",
- "http://planet.mozilla.org/",
- "https://developer.mozilla.org/",
- "http://hg.mozilla.org/",
- "http://dxr.mozilla.org/",
- "http://feeds.mozilla.org/",
- ];
- let nsLoginInfo = new Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
- Ci.nsILoginInfo, "init");
- let logins = [
- new nsLoginInfo(urls[0], urls[0], null, "user", "password", "u1", "p1"),
- new nsLoginInfo(urls[1], urls[1], null, "username", "password", "u2", "p2"),
- new nsLoginInfo(urls[2], urls[2], null, "ehsan", "mypass", "u3", "p3"),
- new nsLoginInfo(urls[3], urls[3], null, "ehsan", "mypass", "u4", "p4"),
- new nsLoginInfo(urls[4], urls[4], null, "john", "smith", "u5", "p5"),
- new nsLoginInfo(urls[5], urls[5], null, "what?", "very secret", "u6", "p6"),
- new nsLoginInfo(urls[6], urls[6], null, "really?", "super secret", "u7", "p7"),
- new nsLoginInfo(urls[7], urls[7], null, "you sure?", "absolutely", "u8", "p8"),
- new nsLoginInfo(urls[8], urls[8], null, "my user name", "mozilla", "u9", "p9"),
- new nsLoginInfo(urls[9], urls[9], null, "my username", "mozilla.com", "u10", "p10"),
- ];
- logins.forEach(login => pwmgr.addLogin(login));
-
- // Open the password manager dialog
- const PWMGR_DLG = "chrome://passwordmgr/content/passwordManager.xul";
- let pwmgrdlg = window.openDialog(PWMGR_DLG, "Toolkit:PasswordManager", "");
- SimpleTest.waitForFocus(doTest, pwmgrdlg);
-
- // the meat of the test
- function doTest() {
- let doc = pwmgrdlg.document;
- let win = doc.defaultView;
- let filter = doc.getElementById("filter");
- let tree = doc.getElementById("signonsTree");
- let view = tree.view;
-
- is(filter.value, "", "Filter box should initially be empty");
- is(view.rowCount, 10, "There should be 10 passwords initially");
-
- // Prepare a set of tests
- // filter: the text entered in the filter search box
- // count: the number of logins which should match the respective filter
- // count2: the number of logins which should match the respective filter
- // if the passwords are being shown as well
- // Note: if a test doesn't have count2 set, count is used instead.
- let tests = [
- {filter: "pass", count: 0, count2: 4},
- {filter: "", count: 10}, // test clearing the filter
- {filter: "moz", count: 7},
- {filter: "mozi", count: 7},
- {filter: "mozil", count: 7},
- {filter: "mozill", count: 7},
- {filter: "mozilla", count: 7},
- {filter: "mozilla.com", count: 1, count2: 2},
- {filter: "user", count: 4},
- {filter: "user ", count: 1},
- {filter: " user", count: 2},
- {filter: "http", count: 10},
- {filter: "https", count: 1},
- {filter: "secret", count: 0, count2: 2},
- {filter: "secret!", count: 0},
- ];
-
- let toggleCalls = 0;
- function toggleShowPasswords(func) {
- let toggleButton = doc.getElementById("togglePasswords");
- let showMode = (toggleCalls++ % 2) == 0;
-
- // only watch for a confirmation dialog every other time being called
- if (showMode) {
- Services.ww.registerNotification(function (aSubject, aTopic, aData) {
- if (aTopic == "domwindowclosed")
- Services.ww.unregisterNotification(arguments.callee);
- else if (aTopic == "domwindowopened") {
- let targetWin = aSubject.QueryInterface(Ci.nsIDOMEventTarget);
- SimpleTest.waitForFocus(function() {
- EventUtils.sendKey("RETURN", targetWin);
- }, targetWin);
- }
- });
- }
-
- Services.obs.addObserver(function (aSubject, aTopic, aData) {
- if (aTopic == "passwordmgr-password-toggle-complete") {
- Services.obs.removeObserver(arguments.callee, aTopic);
- func();
- }
- }, "passwordmgr-password-toggle-complete", false);
-
- EventUtils.synthesizeMouse(toggleButton, 1, 1, {}, win);
- }
-
- function runTests(mode, endFunction) {
- let testCounter = 0;
-
- function setFilter(string) {
- filter.value = string;
- filter.doCommand();
- }
-
- function runOneTest(testCase) {
- function tester() {
- is(view.rowCount, expected, expected + " logins should match '" + testCase.filter + "'");
- }
-
- let expected;
- switch (mode) {
- case 1: // without showing passwords
- expected = testCase.count;
- break;
- case 2: // showing passwords
- expected = ("count2" in testCase) ? testCase.count2 : testCase.count;
- break;
- case 3: // toggle
- expected = testCase.count;
- tester();
- toggleShowPasswords(function () {
- expected = ("count2" in testCase) ? testCase.count2 : testCase.count;
- tester();
- toggleShowPasswords(proceed);
- });
- return;
- }
- tester();
- proceed();
- }
-
- function proceed() {
- // run the next test if necessary or proceed with the tests
- if (testCounter != tests.length)
- runNextTest();
- else
- endFunction();
- }
-
- function runNextTest() {
- let testCase = tests[testCounter++];
- setFilter(testCase.filter);
- setTimeout(runOneTest, 0, testCase);
- }
-
- runNextTest();
- }
-
- function step1() {
- runTests(1, step2);
- }
-
- function step2() {
- toggleShowPasswords(function() {
- runTests(2, step3);
- });
- }
-
- function step3() {
- toggleShowPasswords(function() {
- runTests(3, lastStep);
- });
- }
-
- function lastStep() {
- // cleanup
- Services.ww.registerNotification(function (aSubject, aTopic, aData) {
- // unregister ourself
- Services.ww.unregisterNotification(arguments.callee);
-
- pwmgr.removeAllLogins();
- finish();
- });
- pwmgrdlg.close();
- }
-
- step1();
- }
-}
diff --git a/toolkit/components/passwordmgr/test/browser/browser_username_select_dialog.js b/toolkit/components/passwordmgr/test/browser/browser_username_select_dialog.js
deleted file mode 100644
index 8df89b5105..0000000000
--- a/toolkit/components/passwordmgr/test/browser/browser_username_select_dialog.js
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Test username selection dialog, on password update from a p-only form,
- * when there are multiple saved logins on the domain.
- */
-
-// Copied from prompt_common.js. TODO: share the code.
-function getSelectDialogDoc() {
- // Trudge through all the open windows, until we find the one
- // that has selectDialog.xul loaded.
- var wm = Cc["@mozilla.org/appshell/window-mediator;1"].
- getService(Ci.nsIWindowMediator);
- // var enumerator = wm.getEnumerator("navigator:browser");
- var enumerator = wm.getXULWindowEnumerator(null);
-
- while (enumerator.hasMoreElements()) {
- var win = enumerator.getNext();
- var windowDocShell = win.QueryInterface(Ci.nsIXULWindow).docShell;
-
- var containedDocShells = windowDocShell.getDocShellEnumerator(
- Ci.nsIDocShellTreeItem.typeChrome,
- Ci.nsIDocShell.ENUMERATE_FORWARDS);
- while (containedDocShells.hasMoreElements()) {
- // Get the corresponding document for this docshell
- var childDocShell = containedDocShells.getNext();
- // We don't want it if it's not done loading.
- if (childDocShell.busyFlags != Ci.nsIDocShell.BUSY_FLAGS_NONE)
- continue;
- var childDoc = childDocShell.QueryInterface(Ci.nsIDocShell)
- .contentViewer
- .DOMDocument;
-
- if (childDoc.location.href == "chrome://global/content/selectDialog.xul")
- return childDoc;
- }
- }
-
- return null;
-}
-
-let nsLoginInfo = new Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
- Ci.nsILoginInfo, "init");
-let login1 = new nsLoginInfo("http://example.com", "http://example.com", null,
- "notifyu1", "notifyp1", "user", "pass");
-let login1B = new nsLoginInfo("http://example.com", "http://example.com", null,
- "notifyu1B", "notifyp1B", "user", "pass");
-
-add_task(function* test_changeUPLoginOnPUpdateForm_accept() {
- info("Select an u+p login from multiple logins, on password update form, and accept.");
- Services.logins.addLogin(login1);
- Services.logins.addLogin(login1B);
-
- yield testSubmittingLoginForm("subtst_notifications_change_p.html", function*(fieldValues) {
- is(fieldValues.username, "null", "Checking submitted username");
- is(fieldValues.password, "pass2", "Checking submitted password");
-
- yield ContentTaskUtils.waitForCondition(() => {
- return getSelectDialogDoc();
- }, "Wait for selection dialog to be accessible.");
-
- let doc = getSelectDialogDoc();
- let dialog = doc.getElementsByTagName("dialog")[0];
- let listbox = doc.getElementById("list");
-
- is(listbox.selectedIndex, 0, "Checking selected index");
- is(listbox.itemCount, 2, "Checking selected length");
- ['notifyu1', 'notifyu1B'].forEach((username, i) => {
- is(listbox.getItemAtIndex(i).label, username, "Check username selection on dialog");
- });
-
- dialog.acceptDialog();
-
- yield ContentTaskUtils.waitForCondition(() => {
- return !getSelectDialogDoc();
- }, "Wait for selection dialog to disappear.");
- });
-
- let logins = Services.logins.getAllLogins();
- is(logins.length, 2, "Should have 2 logins");
-
- let login = SpecialPowers.wrap(logins[0]).QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "notifyu1", "Check the username unchanged");
- is(login.password, "pass2", "Check the password changed");
- is(login.timesUsed, 2, "Check times used");
-
- login = SpecialPowers.wrap(logins[1]).QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "notifyu1B", "Check the username unchanged");
- is(login.password, "notifyp1B", "Check the password unchanged");
- is(login.timesUsed, 1, "Check times used");
-
- // cleanup
- login1.password = "pass2";
- Services.logins.removeLogin(login1);
- login1.password = "notifyp1";
-
- Services.logins.removeLogin(login1B);
-});
-
-add_task(function* test_changeUPLoginOnPUpdateForm_cancel() {
- info("Select an u+p login from multiple logins, on password update form, and cancel.");
- Services.logins.addLogin(login1);
- Services.logins.addLogin(login1B);
-
- yield testSubmittingLoginForm("subtst_notifications_change_p.html", function*(fieldValues) {
- is(fieldValues.username, "null", "Checking submitted username");
- is(fieldValues.password, "pass2", "Checking submitted password");
-
- yield ContentTaskUtils.waitForCondition(() => {
- return getSelectDialogDoc();
- }, "Wait for selection dialog to be accessible.");
-
- let doc = getSelectDialogDoc();
- let dialog = doc.getElementsByTagName("dialog")[0];
- let listbox = doc.getElementById("list");
-
- is(listbox.selectedIndex, 0, "Checking selected index");
- is(listbox.itemCount, 2, "Checking selected length");
- ['notifyu1', 'notifyu1B'].forEach((username, i) => {
- is(listbox.getItemAtIndex(i).label, username, "Check username selection on dialog");
- });
-
- dialog.cancelDialog();
-
- yield ContentTaskUtils.waitForCondition(() => {
- return !getSelectDialogDoc();
- }, "Wait for selection dialog to disappear.");
- });
-
- let logins = Services.logins.getAllLogins();
- is(logins.length, 2, "Should have 2 logins");
-
- let login = SpecialPowers.wrap(logins[0]).QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "notifyu1", "Check the username unchanged");
- is(login.password, "notifyp1", "Check the password unchanged");
- is(login.timesUsed, 1, "Check times used");
-
- login = SpecialPowers.wrap(logins[1]).QueryInterface(Ci.nsILoginMetaInfo);
- is(login.username, "notifyu1B", "Check the username unchanged");
- is(login.password, "notifyp1B", "Check the password unchanged");
- is(login.timesUsed, 1, "Check times used");
-
- // cleanup
- Services.logins.removeLogin(login1);
- Services.logins.removeLogin(login1B);
-});
diff --git a/toolkit/components/passwordmgr/test/browser/form_autofocus_js.html b/toolkit/components/passwordmgr/test/browser/form_autofocus_js.html
deleted file mode 100644
index 76056e3751..0000000000
--- a/toolkit/components/passwordmgr/test/browser/form_autofocus_js.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE html><html><head><meta charset="utf-8"></head>
-<body onload="document.getElementById('form-basic-username').focus();">
-<!-- Username field is focused by js onload -->
-<form id="form-basic">
- <input id="form-basic-username" name="username">
- <input id="form-basic-password" name="password" type="password">
- <input id="form-basic-submit" type="submit">
-</form>
-
-</body></html>
diff --git a/toolkit/components/passwordmgr/test/browser/form_basic.html b/toolkit/components/passwordmgr/test/browser/form_basic.html
deleted file mode 100644
index df2083a93c..0000000000
--- a/toolkit/components/passwordmgr/test/browser/form_basic.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE html><html><head><meta charset="utf-8"></head><body>
-<!-- Any copyright is dedicated to the Public Domain.
- - http://creativecommons.org/publicdomain/zero/1.0/ -->
-
-<!-- Simplest form with username and password fields. -->
-<form id="form-basic">
- <input id="form-basic-username" name="username">
- <input id="form-basic-password" name="password" type="password">
- <input id="form-basic-submit" type="submit">
-</form>
-
-</body></html>
diff --git a/toolkit/components/passwordmgr/test/browser/form_basic_iframe.html b/toolkit/components/passwordmgr/test/browser/form_basic_iframe.html
deleted file mode 100644
index 616f56947a..0000000000
--- a/toolkit/components/passwordmgr/test/browser/form_basic_iframe.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
- <meta charset="utf-8">
-</head>
-
-<body>
- <!-- Form in an iframe -->
- <iframe src="https://example.org/browser/toolkit/components/passwordmgr/test/browser/form_basic.html" id="test-iframe"></iframe>
-</body>
-
-</html>
diff --git a/toolkit/components/passwordmgr/test/browser/form_cross_origin_insecure_action.html b/toolkit/components/passwordmgr/test/browser/form_cross_origin_insecure_action.html
deleted file mode 100644
index e8aa8b2153..0000000000
--- a/toolkit/components/passwordmgr/test/browser/form_cross_origin_insecure_action.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE html><html><head><meta charset="utf-8"></head><body>
-<!-- Any copyright is dedicated to the Public Domain.
- - http://creativecommons.org/publicdomain/zero/1.0/ -->
-
-<!-- Simplest form with username and password fields. -->
-<form id="form-basic" action="http://another.domain/custom_action.html">
- <input id="form-basic-username" name="username">
- <input id="form-basic-password" name="password" type="password">
- <input id="form-basic-submit" type="submit">
-</form>
-
-</body></html>
diff --git a/toolkit/components/passwordmgr/test/browser/form_cross_origin_secure_action.html b/toolkit/components/passwordmgr/test/browser/form_cross_origin_secure_action.html
deleted file mode 100644
index 892a9f6f68..0000000000
--- a/toolkit/components/passwordmgr/test/browser/form_cross_origin_secure_action.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE html><html><head><meta charset="utf-8"></head><body>
-<!-- Any copyright is dedicated to the Public Domain.
- - http://creativecommons.org/publicdomain/zero/1.0/ -->
-
-<!-- Simplest form with username and password fields. -->
-<form id="form-basic" action="https://another.domain/custom_action.html">
- <input id="form-basic-username" name="username">
- <input id="form-basic-password" name="password" type="password">
- <input id="form-basic-submit" type="submit">
-</form>
-
-</body></html>
diff --git a/toolkit/components/passwordmgr/test/browser/form_same_origin_action.html b/toolkit/components/passwordmgr/test/browser/form_same_origin_action.html
deleted file mode 100644
index 8f0c9a14e2..0000000000
--- a/toolkit/components/passwordmgr/test/browser/form_same_origin_action.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE html><html><head><meta charset="utf-8"></head><body>
-<!-- Any copyright is dedicated to the Public Domain.
- - http://creativecommons.org/publicdomain/zero/1.0/ -->
-
-<!-- Simplest form with username and password fields. -->
-<form id="form-basic" action="./custom_action.html">
- <input id="form-basic-username" name="username">
- <input id="form-basic-password" name="password" type="password">
- <input id="form-basic-submit" type="submit">
-</form>
-
-</body></html>
diff --git a/toolkit/components/passwordmgr/test/browser/formless_basic.html b/toolkit/components/passwordmgr/test/browser/formless_basic.html
deleted file mode 100644
index 2f4c5de527..0000000000
--- a/toolkit/components/passwordmgr/test/browser/formless_basic.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html><html><head><meta charset="utf-8"></head><body>
-
-<!-- Simplest form with username and password fields. -->
- <input id="form-basic-username" name="username">
- <input id="form-basic-password" name="password" type="password">
- <input id="form-basic-submit" type="submit">
-
- <button id="add">Add input[type=password]</button>
-
- <script>
- document.getElementById("add").addEventListener("click", function () {
- var node = document.createElement("input");
- node.setAttribute("type", "password");
- document.querySelector("body").appendChild(node);
- });
- </script>
-
-</body></html>
diff --git a/toolkit/components/passwordmgr/test/browser/head.js b/toolkit/components/passwordmgr/test/browser/head.js
deleted file mode 100644
index 926cb66168..0000000000
--- a/toolkit/components/passwordmgr/test/browser/head.js
+++ /dev/null
@@ -1,137 +0,0 @@
-const DIRECTORY_PATH = "/browser/toolkit/components/passwordmgr/test/browser/";
-
-Cu.import("resource://testing-common/LoginTestUtils.jsm", this);
-Cu.import("resource://testing-common/ContentTaskUtils.jsm", this);
-
-registerCleanupFunction(function* cleanup_removeAllLoginsAndResetRecipes() {
- Services.logins.removeAllLogins();
-
- let recipeParent = LoginTestUtils.recipes.getRecipeParent();
- if (!recipeParent) {
- // No need to reset the recipes if the recipe module wasn't even loaded.
- return;
- }
- yield recipeParent.then(recipeParentResult => recipeParentResult.reset());
-});
-
-/**
- * Loads a test page in `DIRECTORY_URL` which automatically submits to formsubmit.sjs and returns a
- * promise resolving with the field values when the optional `aTaskFn` is done.
- *
- * @param {String} aPageFile - test page file name which auto-submits to formsubmit.sjs
- * @param {Function} aTaskFn - task which can be run before the tab closes.
- * @param {String} [aOrigin="http://example.com"] - origin of the server to use
- * to load `aPageFile`.
- */
-function testSubmittingLoginForm(aPageFile, aTaskFn, aOrigin = "http://example.com") {
- return BrowserTestUtils.withNewTab({
- gBrowser,
- url: aOrigin + DIRECTORY_PATH + aPageFile,
- }, function*(browser) {
- ok(true, "loaded " + aPageFile);
- let fieldValues = yield ContentTask.spawn(browser, undefined, function*() {
- yield ContentTaskUtils.waitForCondition(() => {
- return content.location.pathname.endsWith("/formsubmit.sjs") &&
- content.document.readyState == "complete";
- }, "Wait for form submission load (formsubmit.sjs)");
- let username = content.document.getElementById("user").textContent;
- let password = content.document.getElementById("pass").textContent;
- return {
- username,
- password,
- };
- });
- ok(true, "form submission loaded");
- if (aTaskFn) {
- yield* aTaskFn(fieldValues);
- }
- return fieldValues;
- });
-}
-
-function checkOnlyLoginWasUsedTwice({ justChanged }) {
- // Check to make sure we updated the timestamps and use count on the
- // existing login that was submitted for the test.
- let logins = Services.logins.getAllLogins();
- is(logins.length, 1, "Should only have 1 login");
- ok(logins[0] instanceof Ci.nsILoginMetaInfo, "metainfo QI");
- is(logins[0].timesUsed, 2, "check .timesUsed for existing login submission");
- ok(logins[0].timeCreated < logins[0].timeLastUsed, "timeLastUsed bumped");
- if (justChanged) {
- is(logins[0].timeLastUsed, logins[0].timePasswordChanged, "timeLastUsed == timePasswordChanged");
- } else {
- is(logins[0].timeCreated, logins[0].timePasswordChanged, "timeChanged not updated");
- }
-}
-
-// Begin popup notification (doorhanger) functions //
-
-const REMEMBER_BUTTON = 0;
-const NEVER_BUTTON = 1;
-
-const CHANGE_BUTTON = 0;
-const DONT_CHANGE_BUTTON = 1;
-
-/**
- * Checks if we have a password capture popup notification
- * of the right type and with the right label.
- *
- * @param {String} aKind The desired `passwordNotificationType`
- * @param {Object} [popupNotifications = PopupNotifications]
- * @return the found password popup notification.
- */
-function getCaptureDoorhanger(aKind, popupNotifications = PopupNotifications) {
- ok(true, "Looking for " + aKind + " popup notification");
- let notification = popupNotifications.getNotification("password");
- if (notification) {
- is(notification.options.passwordNotificationType, aKind, "Notification type matches.");
- if (aKind == "password-change") {
- is(notification.mainAction.label, "Update", "Main action label matches update doorhanger.");
- } else if (aKind == "password-save") {
- is(notification.mainAction.label, "Remember", "Main action label matches save doorhanger.");
- }
- }
- return notification;
-}
-
-/**
- * Clicks the specified popup notification button.
- *
- * @param {Element} aPopup Popup Notification element
- * @param {Number} aButtonIndex Number indicating which button to click.
- * See the constants in this file.
- */
-function clickDoorhangerButton(aPopup, aButtonIndex) {
- ok(true, "Looking for action at index " + aButtonIndex);
-
- let notifications = aPopup.owner.panel.childNodes;
- ok(notifications.length > 0, "at least one notification displayed");
- ok(true, notifications.length + " notification(s)");
- let notification = notifications[0];
-
- if (aButtonIndex == 0) {
- ok(true, "Triggering main action");
- notification.button.doCommand();
- } else if (aButtonIndex <= aPopup.secondaryActions.length) {
- ok(true, "Triggering secondary action " + aButtonIndex);
- notification.childNodes[aButtonIndex].doCommand();
- }
-}
-
-/**
- * Checks the doorhanger's username and password.
- *
- * @param {String} username The username.
- * @param {String} password The password.
- */
-function* checkDoorhangerUsernamePassword(username, password) {
- yield BrowserTestUtils.waitForCondition(() => {
- return document.getElementById("password-notification-username").value == username;
- }, "Wait for nsLoginManagerPrompter writeDataToUI()");
- is(document.getElementById("password-notification-username").value, username,
- "Check doorhanger username");
- is(document.getElementById("password-notification-password").value, password,
- "Check doorhanger password");
-}
-
-// End popup notification (doorhanger) functions //
diff --git a/toolkit/components/passwordmgr/test/browser/insecure_test.html b/toolkit/components/passwordmgr/test/browser/insecure_test.html
deleted file mode 100644
index fedea1428e..0000000000
--- a/toolkit/components/passwordmgr/test/browser/insecure_test.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE html><html><head><meta charset="utf-8"></head><body>
-<!-- Any copyright is dedicated to the Public Domain.
- - http://creativecommons.org/publicdomain/zero/1.0/ -->
-
-<!-- This frame is initially loaded over HTTP. -->
-<iframe id="test-iframe"
- src="http://example.org/browser/toolkit/components/passwordmgr/test/browser/insecure_test_subframe.html"/>
-
-</body></html>
diff --git a/toolkit/components/passwordmgr/test/browser/insecure_test_subframe.html b/toolkit/components/passwordmgr/test/browser/insecure_test_subframe.html
deleted file mode 100644
index 3f01e36a6f..0000000000
--- a/toolkit/components/passwordmgr/test/browser/insecure_test_subframe.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE html><html><head><meta charset="utf-8"></head><body>
-<!-- Any copyright is dedicated to the Public Domain.
- - http://creativecommons.org/publicdomain/zero/1.0/ -->
-
-<form>
- <input name="password" type="password">
-</form>
-
-<!-- Link to reload this page over HTTPS. -->
-<a id="test-link"
- href="https://example.org/browser/toolkit/components/passwordmgr/test/browser/insecure_test_subframe.html">HTTPS</a>
-
-</body></html>
diff --git a/toolkit/components/passwordmgr/test/browser/multiple_forms.html b/toolkit/components/passwordmgr/test/browser/multiple_forms.html
deleted file mode 100644
index 3f64f89930..0000000000
--- a/toolkit/components/passwordmgr/test/browser/multiple_forms.html
+++ /dev/null
@@ -1,129 +0,0 @@
-<!DOCTYPE html><html><head><meta charset="utf-8"></head><body>
-<!-- Any copyright is dedicated to the Public Domain.
- - http://creativecommons.org/publicdomain/zero/1.0/ -->
-
-
-<form class="test-form"
- description="Password only form">
- <input id='test-password-1' type='password' name='pname' value=''>
- <input type='submit'>Submit</input>
-</form>
-
-
-<form class="test-form"
- description="Username only form">
- <input id='test-username-1' type='text' name='uname' value=''>
- <input type='submit'>Submit</input>
-</form>
-
-
-<form class="test-form"
- description="Simple username and password blank form">
- <input id='test-username-2' type='text' name='uname' value=''>
- <input id='test-password-2' type='password' name='pname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-
-<form class="test-form"
- description="Simple username and password form, prefilled username">
- <input id='test-username-3' type='text' name='uname' value='testuser'>
- <input id='test-password-3' type='password' name='pname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-
-<form class="test-form"
- description="Simple username and password form, prefilled username and password">
- <input id='test-username-4' type='text' name='uname' value='testuser'>
- <input id='test-password-4' type='password' name='pname' value='testpass'>
- <button type='submit'>Submit</button>
-</form>
-
-
-<form class="test-form"
- description="One username and two passwords empty form">
- <input id='test-username-5' type='text' name='uname'>
- <input id='test-password-5' type='password' name='pname'>
- <input id='test-password2-5' type='password' name='pname2'>
- <button type='submit'>Submit</button>
-</form>
-
-
-<form class="test-form"
- description="One username and two passwords form, fields prefiled">
- <input id='test-username-6' type='text' name='uname' value="testuser">
- <input id='test-password-6' type='password' name='pname' value="testpass">
- <input id='test-password2-6' type='password' name='pname2' value="testpass">
- <button type='submit'>Submit</button>
-</form>
-
-
-<div class="test-form"
- description="Username and password fields with no form">
- <input id='test-username-7' type='text' name='uname' value="testuser">
- <input id='test-password-7' type='password' name='pname' value="testpass">
-</div>
-
-
-<form class="test-form"
- description="Simple username and password blank form, with disabled password">
- <input id='test-username-8' type='text' name='uname' value=''>
- <input id='test-password-8' type='password' name='pname' value='' disabled>
- <button type='submit'>Submit</button>
-</form>
-
-
-<form class="test-form"
- description="Simple username and password blank form, with disabled username">
- <input id='test-username-9' type='text' name='uname' value='' disabled>
- <input id='test-password-9' type='password' name='pname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-
-<form class="test-form"
- description="Simple username and password blank form, with readonly password">
- <input id='test-username-10' type='text' name='uname' value=''>
- <input id='test-password-10' type='password' name='pname' value='' readonly>
- <button type='submit'>Submit</button>
-</form>
-
-
-<form class="test-form"
- description="Simple username and password blank form, with readonly username">
- <input id='test-username-11' type='text' name='uname' value='' readonly>
- <input id='test-password-11' type='password' name='pname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-
-<form class="test-form"
- description="Two username and one passwords form, fields prefiled">
- <input id='test-username-12' type='text' name='uname' value="testuser">
- <input id='test-username2-12' type='text' name='uname2' value="testuser">
- <input id='test-password-12' type='password' name='pname' value="testpass">
- <button type='submit'>Submit</button>
-</form>
-
-
-<form class="test-form"
- description="Two username and one passwords form, one disabled username field">
- <input id='test-username-13' type='text' name='uname'>
- <input id='test-username2-13' type='text' name='uname2' disabled>
- <input id='test-password-13' type='password' name='pname'>
- <button type='submit'>Submit</button>
-</form>
-
-
-<div class="test-form"
- description="Second username and password fields with no form">
- <input id='test-username-14' type='text' name='uname'>
- <input id='test-password-14' type='password' name='pname' expectedFail>
-</div>
-
-<!-- Form in an iframe -->
-<iframe src="https://example.org/browser/toolkit/components/passwordmgr/test/browser/form_basic.html" id="test-iframe"></iframe>
-
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/browser/streamConverter_content.sjs b/toolkit/components/passwordmgr/test/browser/streamConverter_content.sjs
deleted file mode 100644
index 84c75437e4..0000000000
--- a/toolkit/components/passwordmgr/test/browser/streamConverter_content.sjs
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function handleRequest(request, response) {
- response.setHeader("Content-Type", "test/content", false);
-}
diff --git a/toolkit/components/passwordmgr/test/browser/subtst_notifications_1.html b/toolkit/components/passwordmgr/test/browser/subtst_notifications_1.html
deleted file mode 100644
index b96faf2eef..0000000000
--- a/toolkit/components/passwordmgr/test/browser/subtst_notifications_1.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Subtest for Login Manager notifications - Basic 1un 1pw</title>
-</head>
-<body>
-<h2>Subtest 1</h2>
-<form id="form" action="formsubmit.sjs">
- <input id="user" name="user">
- <input id="pass" name="pass" type="password">
- <button type='submit'>Submit</button>
-</form>
-
-<script>
-function submitForm() {
- userField.value = "notifyu1";
- passField.value = "notifyp1";
- form.submit();
-}
-
-window.onload = submitForm;
-var form = document.getElementById("form");
-var userField = document.getElementById("user");
-var passField = document.getElementById("pass");
-
-</script>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/browser/subtst_notifications_10.html b/toolkit/components/passwordmgr/test/browser/subtst_notifications_10.html
deleted file mode 100644
index 2dc96b4fdb..0000000000
--- a/toolkit/components/passwordmgr/test/browser/subtst_notifications_10.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Subtest for Login Manager notifications</title>
-</head>
-<body>
-<h2>Subtest 10</h2>
-<form id="form" action="formsubmit.sjs">
- <input id="pass" name="pass" type="password">
- <button type='submit'>Submit</button>
-</form>
-
-<script>
-function submitForm() {
- passField.value = "notifyp1";
- form.submit();
-}
-
-window.onload = submitForm;
-var form = document.getElementById("form");
-var userField = document.getElementById("user");
-var passField = document.getElementById("pass");
-
-</script>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/browser/subtst_notifications_11.html b/toolkit/components/passwordmgr/test/browser/subtst_notifications_11.html
deleted file mode 100644
index cf3df5275f..0000000000
--- a/toolkit/components/passwordmgr/test/browser/subtst_notifications_11.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Subtest for Login Manager notifications - Popup Windows</title>
-</head>
-<body>
-<h2>Subtest 11 (popup windows)</h2>
-<script>
-
-// Ignore the '?' and split on |
-[username, password, features, autoClose] = window.location.search.substring(1).split('|');
-
-var url = "subtst_notifications_11_popup.html?" + username + "|" + password;
-var popupWin = window.open(url, "subtst_11", features);
-
-// Popup window will call this function on form submission.
-function formSubmitted() {
- if (autoClose)
- popupWin.close();
-}
-
-</script>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/browser/subtst_notifications_11_popup.html b/toolkit/components/passwordmgr/test/browser/subtst_notifications_11_popup.html
deleted file mode 100644
index 2e8e4135c9..0000000000
--- a/toolkit/components/passwordmgr/test/browser/subtst_notifications_11_popup.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Subtest for Login Manager notifications</title>
-</head>
-<body>
-<h2>Subtest 11</h2>
-<form id="form" action="formsubmit.sjs">
- <input id="user" name="user">
- <input id="pass" name="pass" type="password">
- <button type='submit'>Submit</button>
-</form>
-
-<script>
-function submitForm() {
- // Get the password from the query string (exclude '?').
- [username, password] = window.location.search.substring(1).split('|');
- userField.value = username;
- passField.value = password;
- form.submit();
- window.opener.formSubmitted();
-}
-
-window.onload = submitForm;
-var form = document.getElementById("form");
-var userField = document.getElementById("user");
-var passField = document.getElementById("pass");
-
-</script>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/browser/subtst_notifications_2.html b/toolkit/components/passwordmgr/test/browser/subtst_notifications_2.html
deleted file mode 100644
index 72651d6c12..0000000000
--- a/toolkit/components/passwordmgr/test/browser/subtst_notifications_2.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Subtest for Login Manager notifications - autocomplete=off on the username field</title>
-</head>
-<body>
-<h2>Subtest 2</h2>
-(username autocomplete=off)
-<form id="form" action="formsubmit.sjs">
- <input id="user" name="user" autocomplete="off">
- <input id="pass" name="pass" type="password">
- <button type='submit'>Submit</button>
-</form>
-
-<script>
-function submitForm() {
- userField.value = "notifyu1";
- passField.value = "notifyp1";
- form.submit();
-}
-
-window.onload = submitForm;
-var form = document.getElementById("form");
-var userField = document.getElementById("user");
-var passField = document.getElementById("pass");
-
-</script>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/browser/subtst_notifications_2pw_0un.html b/toolkit/components/passwordmgr/test/browser/subtst_notifications_2pw_0un.html
deleted file mode 100644
index 7ddbf0851f..0000000000
--- a/toolkit/components/passwordmgr/test/browser/subtst_notifications_2pw_0un.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Subtest for Login Manager notifications with 2 password fields and no username</title>
-</head>
-<body>
-<h2>Subtest 24</h2>
-<form id="form" action="formsubmit.sjs">
- <input id="pass1" name="pass1" type="password" value="staticpw">
- <input id="pass" name="pass" type="password">
- <button type="submit">Submit</button>
-</form>
-
-<script>
-function submitForm() {
- pass.value = "notifyp1";
- form.submit();
-}
-
-window.onload = submitForm;
-var form = document.getElementById("form");
-var pass = document.getElementById("pass");
-
-</script>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/browser/subtst_notifications_2pw_1un_1text.html b/toolkit/components/passwordmgr/test/browser/subtst_notifications_2pw_1un_1text.html
deleted file mode 100644
index 893f18724a..0000000000
--- a/toolkit/components/passwordmgr/test/browser/subtst_notifications_2pw_1un_1text.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Subtest for Login Manager notifications with 2 password fields and 1 username field and one other text field before the first password field</title>
-</head>
-<body>
-<h2>1 username field followed by a text field followed by 2 username fields</h2>
-<form id="form" action="formsubmit.sjs">
- <input id="user" name="user" value="staticpw">
- <input id="city" name="city" value="city">
- <input id="pass" name="pass" type="password">
- <input id="pin" name="pin" type="password" value="static-pin">
- <button type="submit">Submit</button>
-</form>
-
-<script>
-function submitForm() {
- userField.value = "notifyu1";
- passField.value = "notifyp1";
- form.submit();
-}
-
-window.onload = submitForm;
-var form = document.getElementById("form");
-var userField = document.getElementById("user");
-var passField = document.getElementById("pass");
-
-</script>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/browser/subtst_notifications_3.html b/toolkit/components/passwordmgr/test/browser/subtst_notifications_3.html
deleted file mode 100644
index 291e735d0c..0000000000
--- a/toolkit/components/passwordmgr/test/browser/subtst_notifications_3.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Subtest for Login Manager notifications - autocomplete=off on the password field</title>
-</head>
-<body>
-<h2>Subtest 3</h2>
-(password autocomplete=off)
-<form id="form" action="formsubmit.sjs">
- <input id="user" name="user">
- <input id="pass" name="pass" type="password" autocomplete="off">
- <button type='submit'>Submit</button>
-</form>
-
-<script>
-function submitForm() {
- userField.value = "notifyu1";
- passField.value = "notifyp1";
- form.submit();
-}
-
-window.onload = submitForm;
-var form = document.getElementById("form");
-var userField = document.getElementById("user");
-var passField = document.getElementById("pass");
-
-</script>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/browser/subtst_notifications_4.html b/toolkit/components/passwordmgr/test/browser/subtst_notifications_4.html
deleted file mode 100644
index 63df3a42da..0000000000
--- a/toolkit/components/passwordmgr/test/browser/subtst_notifications_4.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8" >
- <title>Subtest for Login Manager notifications</title>
-</head>
-<body>
-<h2>Subtest 4</h2>
-(form autocomplete=off)
-<form id="form" action="formsubmit.sjs" autocomplete="off">
- <input id="user" name="user">
- <input id="pass" name="pass" type="password">
- <button type='submit'>Submit</button>
-</form>
-
-<script>
-function submitForm() {
- userField.value = "notifyu1";
- passField.value = "notifyp1";
- form.submit();
-}
-
-window.onload = submitForm;
-var form = document.getElementById("form");
-var userField = document.getElementById("user");
-var passField = document.getElementById("pass");
-
-</script>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/browser/subtst_notifications_5.html b/toolkit/components/passwordmgr/test/browser/subtst_notifications_5.html
deleted file mode 100644
index 72a3df95f4..0000000000
--- a/toolkit/components/passwordmgr/test/browser/subtst_notifications_5.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Subtest for Login Manager notifications - Form with only a username field</title>
-</head>
-<body>
-<h2>Subtest 5</h2>
-<form id="form" action="formsubmit.sjs">
- <input id="user" name="user">
- <button type='submit'>Submit</button>
-</form>
-
-<script>
-function submitForm() {
- userField.value = "notifyu1";
- form.submit();
-}
-
-window.onload = submitForm;
-var form = document.getElementById("form");
-var userField = document.getElementById("user");
-
-</script>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/browser/subtst_notifications_6.html b/toolkit/components/passwordmgr/test/browser/subtst_notifications_6.html
deleted file mode 100644
index 47e23e9728..0000000000
--- a/toolkit/components/passwordmgr/test/browser/subtst_notifications_6.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Subtest for Login Manager notifications</title>
-</head>
-<body>
-<h2>Subtest 6</h2>
-(password-only form)
-<form id="form" action="formsubmit.sjs">
- <input id="pass" name="pass" type="password">
- <button type='submit'>Submit</button>
-</form>
-
-<script>
-function submitForm() {
- passField.value = "notifyp1";
- form.submit();
-}
-
-window.onload = submitForm;
-var form = document.getElementById("form");
-var passField = document.getElementById("pass");
-
-</script>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/browser/subtst_notifications_8.html b/toolkit/components/passwordmgr/test/browser/subtst_notifications_8.html
deleted file mode 100644
index abeea42620..0000000000
--- a/toolkit/components/passwordmgr/test/browser/subtst_notifications_8.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Subtest for Login Manager notifications</title>
-</head>
-<body>
-<h2>Subtest 8</h2>
-<form id="form" action="formsubmit.sjs">
- <input id="user" name="user">
- <input id="pass" name="pass" type="password">
- <button type='submit'>Submit</button>
-</form>
-
-<script>
-function submitForm() {
- userField.value = "notifyu1";
- passField.value = "pass2";
- form.submit();
-}
-
-window.onload = submitForm;
-var form = document.getElementById("form");
-var userField = document.getElementById("user");
-var passField = document.getElementById("pass");
-
-</script>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/browser/subtst_notifications_9.html b/toolkit/components/passwordmgr/test/browser/subtst_notifications_9.html
deleted file mode 100644
index c6f741068b..0000000000
--- a/toolkit/components/passwordmgr/test/browser/subtst_notifications_9.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Subtest for Login Manager notifications</title>
-</head>
-<body>
-<h2>Subtest 9</h2>
-<form id="form" action="formsubmit.sjs">
- <input id="user" name="user">
- <input id="pass" name="pass" type="password">
- <button type='submit'>Submit</button>
-</form>
-
-<script>
-function submitForm() {
- userField.value = "";
- passField.value = "pass2";
- form.submit();
-}
-
-window.onload = submitForm;
-var form = document.getElementById("form");
-var userField = document.getElementById("user");
-var passField = document.getElementById("pass");
-
-</script>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/browser/subtst_notifications_change_p.html b/toolkit/components/passwordmgr/test/browser/subtst_notifications_change_p.html
deleted file mode 100644
index d74f3bcdff..0000000000
--- a/toolkit/components/passwordmgr/test/browser/subtst_notifications_change_p.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Subtest for Login Manager notifications</title>
-</head>
-<body>
-<h2>Change password</h2>
-<form id="form" action="formsubmit.sjs">
- <input id="pass_current" name="pass_current" type="password" value="notifyp1">
- <input id="pass" name="pass" type="password">
- <input id="pass_confirm" name="pass_confirm" type="password">
- <button type='submit'>Submit</button>
-</form>
-
-<script>
-function submitForm() {
- passField.value = "pass2";
- passConfirmField.value = "pass2";
-
- form.submit();
-}
-
-window.onload = submitForm;
-var form = document.getElementById("form");
-var userField = document.getElementById("user");
-var passField = document.getElementById("pass");
-var passConfirmField = document.getElementById("pass_confirm");
-
-</script>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/chrome/chrome.ini b/toolkit/components/passwordmgr/test/chrome/chrome.ini
deleted file mode 100644
index 093b87b7d0..0000000000
--- a/toolkit/components/passwordmgr/test/chrome/chrome.ini
+++ /dev/null
@@ -1,13 +0,0 @@
-[DEFAULT]
-skip-if = os == 'android'
-
-[test_privbrowsing_perwindowpb.html]
-skip-if = true # Bug 1173337
-support-files =
- ../formsubmit.sjs
- notification_common.js
- privbrowsing_perwindowpb_iframe.html
- subtst_privbrowsing_1.html
- subtst_privbrowsing_2.html
- subtst_privbrowsing_3.html
- subtst_privbrowsing_4.html
diff --git a/toolkit/components/passwordmgr/test/chrome/notification_common.js b/toolkit/components/passwordmgr/test/chrome/notification_common.js
deleted file mode 100644
index e8a52929de..0000000000
--- a/toolkit/components/passwordmgr/test/chrome/notification_common.js
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Initialization: for each test, remove any prior notifications.
- */
-function cleanUpPopupNotifications() {
- var container = getPopupNotifications(window.top);
- var notes = container._currentNotifications;
- info(true, "Removing " + notes.length + " popup notifications.");
- for (var i = notes.length - 1; i >= 0; i--) {
- notes[i].remove();
- }
-}
-cleanUpPopupNotifications();
-
-/*
- * getPopupNotifications
- *
- * Fetches the popup notification for the specified window.
- */
-function getPopupNotifications(aWindow) {
- var Ci = SpecialPowers.Ci;
- var Cc = SpecialPowers.Cc;
- ok(Ci != null, "Access Ci");
- ok(Cc != null, "Access Cc");
-
- var chromeWin = SpecialPowers.wrap(aWindow)
- .QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIDocShell)
- .chromeEventHandler.ownerDocument.defaultView;
-
- var popupNotifications = chromeWin.PopupNotifications;
- return popupNotifications;
-}
-
-
-/**
- * Checks if we have a password popup notification
- * of the right type and with the right label.
- *
- * @deprecated Write a browser-chrome test instead and use the fork of this method there.
- * @returns the found password popup notification.
- */
-function getPopup(aPopupNote, aKind) {
- ok(true, "Looking for " + aKind + " popup notification");
- var notification = aPopupNote.getNotification("password");
- if (notification) {
- is(notification.options.passwordNotificationType, aKind, "Notification type matches.");
- if (aKind == "password-change") {
- is(notification.mainAction.label, "Update", "Main action label matches update doorhanger.");
- } else if (aKind == "password-save") {
- is(notification.mainAction.label, "Remember", "Main action label matches save doorhanger.");
- }
- }
- return notification;
-}
-
-
-/**
- * @deprecated - Use a browser chrome test instead.
- *
- * Clicks the specified popup notification button.
- */
-function clickPopupButton(aPopup, aButtonIndex) {
- ok(true, "Looking for action at index " + aButtonIndex);
-
- var notifications = SpecialPowers.wrap(aPopup.owner).panel.childNodes;
- ok(notifications.length > 0, "at least one notification displayed");
- ok(true, notifications.length + " notifications");
- var notification = notifications[0];
-
- if (aButtonIndex == 0) {
- ok(true, "Triggering main action");
- notification.button.doCommand();
- } else if (aButtonIndex <= aPopup.secondaryActions.length) {
- var index = aButtonIndex;
- ok(true, "Triggering secondary action " + index);
- notification.childNodes[index].doCommand();
- }
-}
-
-const kRememberButton = 0;
-const kNeverButton = 1;
-
-const kChangeButton = 0;
-const kDontChangeButton = 1;
-
-function dumpNotifications() {
- try {
- // PopupNotifications
- var container = getPopupNotifications(window.top);
- ok(true, "is popup panel open? " + container.isPanelOpen);
- var notes = container._currentNotifications;
- ok(true, "Found " + notes.length + " popup notifications.");
- for (let i = 0; i < notes.length; i++) {
- ok(true, "#" + i + ": " + notes[i].id);
- }
-
- // Notification bars
- var chromeWin = SpecialPowers.wrap(window.top)
- .QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIDocShell)
- .chromeEventHandler.ownerDocument.defaultView;
- var nb = chromeWin.getNotificationBox(window.top);
- notes = nb.allNotifications;
- ok(true, "Found " + notes.length + " notification bars.");
- for (let i = 0; i < notes.length; i++) {
- ok(true, "#" + i + ": " + notes[i].getAttribute("value"));
- }
- } catch (e) { todo(false, "WOAH! " + e); }
-}
diff --git a/toolkit/components/passwordmgr/test/chrome/privbrowsing_perwindowpb_iframe.html b/toolkit/components/passwordmgr/test/chrome/privbrowsing_perwindowpb_iframe.html
deleted file mode 100644
index 2efdab2654..0000000000
--- a/toolkit/components/passwordmgr/test/chrome/privbrowsing_perwindowpb_iframe.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
-</head>
-<body>
-<iframe id="iframe"></iframe>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/chrome/subtst_privbrowsing_1.html b/toolkit/components/passwordmgr/test/chrome/subtst_privbrowsing_1.html
deleted file mode 100644
index 8c7202dd0f..0000000000
--- a/toolkit/components/passwordmgr/test/chrome/subtst_privbrowsing_1.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Subtest for Login Manager notifications (private browsing)</title>
-</head>
-<body>
-<h2>Subtest 1</h2>
-<!--
- Make sure that the password-save notification appears outside of
- the private mode, but not inside it.
--->
-<form id="form" action="formsubmit.sjs">
- <input id="user" name="user" type="text">
- <input id="pass" name="pass" type="password">
- <button type='submit'>Submit</button>
-</form>
-
-<script>
-function submitForm() {
- userField.value = "notifyu1";
- passField.value = "notifyp1";
- form.submit();
-}
-
-window.onload = submitForm;
-var form = document.getElementById("form");
-var userField = document.getElementById("user");
-var passField = document.getElementById("pass");
-
-</script>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/chrome/subtst_privbrowsing_2.html b/toolkit/components/passwordmgr/test/chrome/subtst_privbrowsing_2.html
deleted file mode 100644
index bf3b851595..0000000000
--- a/toolkit/components/passwordmgr/test/chrome/subtst_privbrowsing_2.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Subtest for Login Manager notifications (private browsing)</title>
-</head>
-<body>
-<h2>Subtest 2</h2>
-<!--
- Make sure that the password-change notification appears outside of
- the private mode, but not inside it.
--->
-<form id="form" action="formsubmit.sjs">
- <input id="pass" name="pass" type="password">
- <input id="newpass" name="newpass" type="password">
- <button type='submit'>Submit</button>
-</form>
-
-<script>
-function submitForm() {
- passField.value = "notifyp1";
- passField2.value = "notifyp2";
- form.submit();
-}
-
-window.onload = submitForm;
-var form = document.getElementById("form");
-var passField = document.getElementById("pass");
-var passField2 = document.getElementById("newpass");
-
-</script>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/chrome/subtst_privbrowsing_3.html b/toolkit/components/passwordmgr/test/chrome/subtst_privbrowsing_3.html
deleted file mode 100644
index e88a302e0c..0000000000
--- a/toolkit/components/passwordmgr/test/chrome/subtst_privbrowsing_3.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Subtest for Login Manager notifications (private browsing)</title>
-</head>
-<body>
-<h2>Subtest 3</h2>
-<!--
- Make sure that the user/pass fields are auto-filled outside of
- the private mode, but not inside it.
--->
-<form id="form" action="formsubmit.sjs">
- <input id="user" name="user" type="text">
- <input id="pass" name="pass" type="password">
- <button type='submit'>Submit</button>
-</form>
-
-<script>
-function submitForm() {
- form.submit();
-}
-
-var form = document.getElementById("form");
-window.addEventListener('message', () => { submitForm(); });
-
-</script>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/chrome/subtst_privbrowsing_4.html b/toolkit/components/passwordmgr/test/chrome/subtst_privbrowsing_4.html
deleted file mode 100644
index 184142743d..0000000000
--- a/toolkit/components/passwordmgr/test/chrome/subtst_privbrowsing_4.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Subtest for Login Manager notifications (private browsing)</title>
- <script type="text/javascript" src="pwmgr_common.js"></script>
-</head>
-<body>
-<h2>Subtest 4</h2>
-<!--
- Make sure that the user/pass fields have manual filling enabled
- in private mode.
--->
-<form id="form" action="formsubmit.sjs">
- <input id="user" name="user" type="text">
- <input id="pass" name="pass" type="password">
- <button type='submit'>Submit</button>
-</form>
-
-<script>
-function startAutocomplete() {
- userField.focus();
- doKey("down");
- setTimeout(submitForm, 100);
-}
-
-function submitForm() {
- doKey("down");
- doKey("return");
- setTimeout(function() { form.submit(); }, 100);
-}
-
-var form = document.getElementById("form");
-var userField = document.getElementById("user");
-
-window.addEventListener('message', () => { startAutocomplete(); });
-
-</script>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/chrome/test_privbrowsing_perwindowpb.html b/toolkit/components/passwordmgr/test/chrome/test_privbrowsing_perwindowpb.html
deleted file mode 100644
index 6b7d4abb3a..0000000000
--- a/toolkit/components/passwordmgr/test/chrome/test_privbrowsing_perwindowpb.html
+++ /dev/null
@@ -1,322 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=248970
--->
-<head>
- <meta charset="utf-8">
- <title>Test for Private Browsing</title>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="notification_common.js"></script>
- <link rel="stylesheet" type="text/css"
- href="chrome://mochikit/content/tests/SimpleTest/test.css">
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=248970">Mozilla Bug 248970</a>
-<p id="display"></p>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Bug 248970 **/
-// based on test_notifications.html
-
-const Ci = SpecialPowers.Ci;
-const Cc = SpecialPowers.Cc;
-const Cr = SpecialPowers.Cr;
-
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-var testpath = "/chrome/toolkit/components/passwordmgr/test/chrome/";
-var prefix = "http://test2.example.com" + testpath;
-var subtests = [
- "subtst_privbrowsing_1.html", // 1
- "subtst_privbrowsing_1.html", // 2
- "subtst_privbrowsing_1.html", // 3
- "subtst_privbrowsing_2.html", // 4
- "subtst_privbrowsing_2.html", // 5
- "subtst_privbrowsing_2.html", // 6
- "subtst_privbrowsing_3.html", // 7
- "subtst_privbrowsing_3.html", // 8
- "subtst_privbrowsing_4.html", // 9
- "subtst_privbrowsing_3.html" // 10
- ];
-var observer;
-
-var testNum = 0;
-function loadNextTest() {
- // run the initialization code for each test
- switch (++ testNum) {
- case 1:
- popupNotifications = normalWindowPopupNotifications;
- iframe = normalWindowIframe;
- break;
-
- case 2:
- popupNotifications = privateWindowPopupNotifications;
- iframe = privateWindowIframe;
- break;
-
- case 3:
- popupNotifications = normalWindowPopupNotifications;
- iframe = normalWindowIframe;
- break;
-
- case 4:
- pwmgr.addLogin(login);
- break;
-
- case 5:
- popupNotifications = privateWindowPopupNotifications;
- iframe = privateWindowIframe;
- break;
-
- case 6:
- popupNotifications = normalWindowPopupNotifications;
- iframe = normalWindowIframe;
- break;
-
- case 7:
- pwmgr.addLogin(login);
- break;
-
- case 8:
- popupNotifications = privateWindowPopupNotifications;
- iframe = privateWindowIframe;
- break;
-
- case 9:
- break;
-
- case 10:
- popupNotifications = normalWindowPopupNotifications;
- iframe = normalWindowIframe;
- break;
-
- default:
- ok(false, "Unexpected call to loadNextTest for test #" + testNum);
- }
-
- if (testNum === 7) {
- observer = SpecialPowers.wrapCallback(function(subject, topic, data) {
- SimpleTest.executeSoon(() => { iframe.contentWindow.postMessage("go", "*"); });
- });
- SpecialPowers.addObserver(observer, "passwordmgr-processed-form", false);
- }
-
- ok(true, "Starting test #" + testNum);
- iframe.src = prefix + subtests[testNum - 1];
-}
-
-function checkTest() {
- var popup;
- var gotUser;
- var gotPass;
-
- switch (testNum) {
- case 1:
- // run outside of private mode, popup notification should appear
- popup = getPopup(popupNotifications, "password-save");
- ok(popup, "got popup notification");
- popup.remove();
- break;
-
- case 2:
- // run inside of private mode, popup notification should not appear
- popup = getPopup(popupNotifications, "password-save");
- ok(!popup, "checking for no popup notification");
- break;
-
- case 3:
- // run outside of private mode, popup notification should appear
- popup = getPopup(popupNotifications, "password-save");
- ok(popup, "got popup notification");
- popup.remove();
- break;
-
- case 4:
- // run outside of private mode, popup notification should appear
- popup = getPopup(popupNotifications, "password-change");
- ok(popup, "got popup notification");
- popup.remove();
- break;
-
- case 5:
- // run inside of private mode, popup notification should not appear
- popup = getPopup(popupNotifications, "password-change");
- ok(!popup, "checking for no popup notification");
- break;
-
- case 6:
- // run outside of private mode, popup notification should appear
- popup = getPopup(popupNotifications, "password-change");
- ok(popup, "got popup notification");
- popup.remove();
- pwmgr.removeLogin(login);
- break;
-
- case 7:
- // verify that the user/pass pair was autofilled
- gotUser = iframe.contentDocument.getElementById("user").textContent;
- gotPass = iframe.contentDocument.getElementById("pass").textContent;
- is(gotUser, "notifyu1", "Checking submitted username");
- is(gotPass, "notifyp1", "Checking submitted password");
- break;
-
- case 8:
- // verify that the user/pass pair was not autofilled
- gotUser = iframe.contentDocument.getElementById("user").textContent;
- gotPass = iframe.contentDocument.getElementById("pass").textContent;
- is(gotUser, "", "Checking submitted username");
- is(gotPass, "", "Checking submitted password");
- break;
-
- case 9:
- // verify that the user/pass pair was available for autocomplete
- gotUser = iframe.contentDocument.getElementById("user").textContent;
- gotPass = iframe.contentDocument.getElementById("pass").textContent;
- is(gotUser, "notifyu1", "Checking submitted username");
- is(gotPass, "notifyp1", "Checking submitted password");
- break;
-
- case 10:
- // verify that the user/pass pair was autofilled
- gotUser = iframe.contentDocument.getElementById("user").textContent;
- gotPass = iframe.contentDocument.getElementById("pass").textContent;
- is(gotUser, "notifyu1", "Checking submitted username");
- is(gotPass, "notifyp1", "Checking submitted password");
- pwmgr.removeLogin(login);
- break;
-
- default:
- ok(false, "Unexpected call to checkTest for test #" + testNum);
-
- }
-}
-
-var mainWindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIDocShellTreeItem)
- .rootTreeItem
- .QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindow);
-var contentPage = "http://mochi.test:8888/chrome/toolkit/components/passwordmgr/test/chrome/privbrowsing_perwindowpb_iframe.html";
-var testWindows = [];
-
-function whenDelayedStartupFinished(aWindow, aCallback) {
- Services.obs.addObserver(function obs(aSubject, aTopic) {
- if (aWindow == aSubject) {
- Services.obs.removeObserver(obs, aTopic);
- setTimeout(aCallback, 0);
- }
- }, "browser-delayed-startup-finished", false);
-}
-
-function testOnWindow(aIsPrivate, aCallback) {
- var win = mainWindow.OpenBrowserWindow({private: aIsPrivate});
- win.addEventListener("load", function onLoad() {
- win.removeEventListener("load", onLoad, false);
- whenDelayedStartupFinished(win, function() {
- win.addEventListener("DOMContentLoaded", function onInnerLoad() {
- if (win.content.location.href != contentPage) {
- win.gBrowser.loadURI(contentPage);
- return;
- }
- win.removeEventListener("DOMContentLoaded", onInnerLoad, true);
-
- win.content.addEventListener('load', function innerLoad2() {
- win.content.removeEventListener('load', innerLoad2, false);
- testWindows.push(win);
- SimpleTest.executeSoon(function() { aCallback(win); });
- }, false, true);
- }, true);
- SimpleTest.executeSoon(function() { win.gBrowser.loadURI(contentPage); });
- });
- }, true);
-}
-
-var ignoreLoad = false;
-function handleLoad(aEvent) {
- // ignore every other load event ... We get one for loading the subtest (which
- // we want to ignore), and another when the subtest's form submits itself
- // (which we want to handle, to start the next test).
- ignoreLoad = !ignoreLoad;
- if (ignoreLoad) {
- ok(true, "Ignoring load of subtest #" + testNum);
- return;
- }
- ok(true, "Processing submission of subtest #" + testNum);
-
- checkTest();
-
- if (testNum < subtests.length) {
- loadNextTest();
- } else {
- ok(true, "private browsing notification tests finished.");
-
- testWindows.forEach(function(aWin) {
- aWin.close();
- });
-
- SpecialPowers.removeObserver(observer, "passwordmgr-processed-form");
- SimpleTest.finish();
- }
-}
-
-var pwmgr = Cc["@mozilla.org/login-manager;1"].
- getService(Ci.nsILoginManager);
-ok(pwmgr != null, "Access pwmgr");
-
-// We need to make sure no logins have been stored by previous tests
-// for forms in |url|, otherwise the change password notification
-// would turn into a prompt, and the test will fail.
-var url = "http://test2.example.com";
-is(pwmgr.countLogins(url, "", null), 0, "No logins should be stored for " + url);
-
-var nsLoginInfo = new SpecialPowers.wrap(SpecialPowers.Components).Constructor("@mozilla.org/login-manager/loginInfo;1",
- Ci.nsILoginInfo, "init");
-var login = new nsLoginInfo(url, url, null, "notifyu1", "notifyp1", "user", "pass");
-
-var normalWindow;
-var privateWindow;
-
-var iframe;
-var normalWindowIframe;
-var privateWindowIframe;
-
-var popupNotifications;
-var normalWindowPopupNotifications;
-var privateWindowPopupNotifications;
-
-testOnWindow(false, function(aWin) {
- var selectedBrowser = aWin.gBrowser.selectedBrowser;
- normalWindowIframe = selectedBrowser.contentDocument.getElementById("iframe");
- normalWindowIframe.onload = handleLoad;
- selectedBrowser.focus();
-
- normalWindowPopupNotifications = getPopupNotifications(selectedBrowser.contentWindow.top);
- ok(normalWindowPopupNotifications, "Got popupNotifications in normal window");
- // ignore the first load for this window;
- ignoreLoad = false;
-
- testOnWindow(true, function(aPrivateWin) {
- selectedBrowser = aPrivateWin.gBrowser.selectedBrowser;
- privateWindowIframe = selectedBrowser.contentDocument.getElementById("iframe");
- privateWindowIframe.onload = handleLoad;
- selectedBrowser.focus();
-
- privateWindowPopupNotifications = getPopupNotifications(selectedBrowser.contentWindow.top);
- ok(privateWindowPopupNotifications, "Got popupNotifications in private window");
- // ignore the first load for this window;
- ignoreLoad = false;
-
- SimpleTest.executeSoon(loadNextTest);
- });
-});
-
-SimpleTest.waitForExplicitFinish();
-</script>
-</pre>
-</body>
-</html>
-
diff --git a/toolkit/components/passwordmgr/test/chrome_timeout.js b/toolkit/components/passwordmgr/test/chrome_timeout.js
deleted file mode 100644
index 9049d0beaa..0000000000
--- a/toolkit/components/passwordmgr/test/chrome_timeout.js
+++ /dev/null
@@ -1,11 +0,0 @@
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-
-addMessageListener('setTimeout', msg => {
- let timer = Cc['@mozilla.org/timer;1'].createInstance(Ci.nsITimer);
- timer.init(_ => {
- sendAsyncMessage('timeout');
- }, msg.delay, Ci.nsITimer.TYPE_ONE_SHOT);
-});
-
-sendAsyncMessage('ready');
diff --git a/toolkit/components/passwordmgr/test/formsubmit.sjs b/toolkit/components/passwordmgr/test/formsubmit.sjs
deleted file mode 100644
index 4b4a387f7b..0000000000
--- a/toolkit/components/passwordmgr/test/formsubmit.sjs
+++ /dev/null
@@ -1,37 +0,0 @@
-function handleRequest(request, response)
-{
- try {
- reallyHandleRequest(request, response);
- } catch (e) {
- response.setStatusLine("1.0", 200, "AlmostOK");
- response.write("Error handling request: " + e);
- }
-}
-
-
-function reallyHandleRequest(request, response) {
- var match;
- var requestAuth = true;
-
- // XXX I bet this doesn't work for POST requests.
- var query = request.queryString;
-
- var user = null, pass = null;
- // user=xxx
- match = /user=([^&]*)/.exec(query);
- if (match)
- user = match[1];
-
- // pass=xxx
- match = /pass=([^&]*)/.exec(query);
- if (match)
- pass = match[1];
-
- response.setStatusLine("1.0", 200, "OK");
-
- response.setHeader("Content-Type", "application/xhtml+xml", false);
- response.write("<html xmlns='http://www.w3.org/1999/xhtml'>");
- response.write("<p>User: <span id='user'>" + user + "</span></p>\n");
- response.write("<p>Pass: <span id='pass'>" + pass + "</span></p>\n");
- response.write("</html>");
-}
diff --git a/toolkit/components/passwordmgr/test/mochitest.ini b/toolkit/components/passwordmgr/test/mochitest.ini
deleted file mode 100644
index 640f5c2563..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest.ini
+++ /dev/null
@@ -1,20 +0,0 @@
-[DEFAULT]
-skip-if = e10s
-support-files =
- authenticate.sjs
- blank.html
- formsubmit.sjs
- prompt_common.js
- pwmgr_common.js
- subtst_master_pass.html
- subtst_prompt_async.html
- chrome_timeout.js
-
-[test_master_password.html]
-skip-if = toolkit == 'android' # Tests desktop prompts
-[test_prompt_async.html]
-skip-if = toolkit == 'android' # Tests desktop prompts
-[test_xhr.html]
-skip-if = toolkit == 'android' # Tests desktop prompts
-[test_xml_load.html]
-skip-if = toolkit == 'android' # Tests desktop prompts
diff --git a/toolkit/components/passwordmgr/test/mochitest/auth2/authenticate.sjs b/toolkit/components/passwordmgr/test/mochitest/auth2/authenticate.sjs
deleted file mode 100644
index d2f6500131..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/auth2/authenticate.sjs
+++ /dev/null
@@ -1,220 +0,0 @@
-function handleRequest(request, response)
-{
- try {
- reallyHandleRequest(request, response);
- } catch (e) {
- response.setStatusLine("1.0", 200, "AlmostOK");
- response.write("Error handling request: " + e);
- }
-}
-
-
-function reallyHandleRequest(request, response) {
- var match;
- var requestAuth = true, requestProxyAuth = true;
-
- // Allow the caller to drive how authentication is processed via the query.
- // Eg, http://localhost:8888/authenticate.sjs?user=foo&realm=bar
- // The extra ? allows the user/pass/realm checks to succeed if the name is
- // at the beginning of the query string.
- var query = "?" + request.queryString;
-
- var expected_user = "", expected_pass = "", realm = "mochitest";
- var proxy_expected_user = "", proxy_expected_pass = "", proxy_realm = "mochi-proxy";
- var huge = false, plugin = false, anonymous = false;
- var authHeaderCount = 1;
- // user=xxx
- match = /[^_]user=([^&]*)/.exec(query);
- if (match)
- expected_user = match[1];
-
- // pass=xxx
- match = /[^_]pass=([^&]*)/.exec(query);
- if (match)
- expected_pass = match[1];
-
- // realm=xxx
- match = /[^_]realm=([^&]*)/.exec(query);
- if (match)
- realm = match[1];
-
- // proxy_user=xxx
- match = /proxy_user=([^&]*)/.exec(query);
- if (match)
- proxy_expected_user = match[1];
-
- // proxy_pass=xxx
- match = /proxy_pass=([^&]*)/.exec(query);
- if (match)
- proxy_expected_pass = match[1];
-
- // proxy_realm=xxx
- match = /proxy_realm=([^&]*)/.exec(query);
- if (match)
- proxy_realm = match[1];
-
- // huge=1
- match = /huge=1/.exec(query);
- if (match)
- huge = true;
-
- // plugin=1
- match = /plugin=1/.exec(query);
- if (match)
- plugin = true;
-
- // multiple=1
- match = /multiple=([^&]*)/.exec(query);
- if (match)
- authHeaderCount = match[1]+0;
-
- // anonymous=1
- match = /anonymous=1/.exec(query);
- if (match)
- anonymous = true;
-
- // Look for an authentication header, if any, in the request.
- //
- // EG: Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
- //
- // This test only supports Basic auth. The value sent by the client is
- // "username:password", obscured with base64 encoding.
-
- var actual_user = "", actual_pass = "", authHeader, authPresent = false;
- if (request.hasHeader("Authorization")) {
- authPresent = true;
- authHeader = request.getHeader("Authorization");
- match = /Basic (.+)/.exec(authHeader);
- if (match.length != 2)
- throw new Error("Couldn't parse auth header: " + authHeader);
-
- var userpass = base64ToString(match[1]); // no atob() :-(
- match = /(.*):(.*)/.exec(userpass);
- if (match.length != 3)
- throw new Error("Couldn't decode auth header: " + userpass);
- actual_user = match[1];
- actual_pass = match[2];
- }
-
- var proxy_actual_user = "", proxy_actual_pass = "";
- if (request.hasHeader("Proxy-Authorization")) {
- authHeader = request.getHeader("Proxy-Authorization");
- match = /Basic (.+)/.exec(authHeader);
- if (match.length != 2)
- throw new Error("Couldn't parse auth header: " + authHeader);
-
- var userpass = base64ToString(match[1]); // no atob() :-(
- match = /(.*):(.*)/.exec(userpass);
- if (match.length != 3)
- throw new Error("Couldn't decode auth header: " + userpass);
- proxy_actual_user = match[1];
- proxy_actual_pass = match[2];
- }
-
- // Don't request authentication if the credentials we got were what we
- // expected.
- if (expected_user == actual_user &&
- expected_pass == actual_pass) {
- requestAuth = false;
- }
- if (proxy_expected_user == proxy_actual_user &&
- proxy_expected_pass == proxy_actual_pass) {
- requestProxyAuth = false;
- }
-
- if (anonymous) {
- if (authPresent) {
- response.setStatusLine("1.0", 400, "Unexpected authorization header found");
- } else {
- response.setStatusLine("1.0", 200, "Authorization header not found");
- }
- } else {
- if (requestProxyAuth) {
- response.setStatusLine("1.0", 407, "Proxy authentication required");
- for (i = 0; i < authHeaderCount; ++i)
- response.setHeader("Proxy-Authenticate", "basic realm=\"" + proxy_realm + "\"", true);
- } else if (requestAuth) {
- response.setStatusLine("1.0", 401, "Authentication required");
- for (i = 0; i < authHeaderCount; ++i)
- response.setHeader("WWW-Authenticate", "basic realm=\"" + realm + "\"", true);
- } else {
- response.setStatusLine("1.0", 200, "OK");
- }
- }
-
- response.setHeader("Content-Type", "application/xhtml+xml", false);
- response.write("<html xmlns='http://www.w3.org/1999/xhtml'>");
- response.write("<p>Login: <span id='ok'>" + (requestAuth ? "FAIL" : "PASS") + "</span></p>\n");
- response.write("<p>Proxy: <span id='proxy'>" + (requestProxyAuth ? "FAIL" : "PASS") + "</span></p>\n");
- response.write("<p>Auth: <span id='auth'>" + authHeader + "</span></p>\n");
- response.write("<p>User: <span id='user'>" + actual_user + "</span></p>\n");
- response.write("<p>Pass: <span id='pass'>" + actual_pass + "</span></p>\n");
-
- if (huge) {
- response.write("<div style='display: none'>");
- for (i = 0; i < 100000; i++) {
- response.write("123456789\n");
- }
- response.write("</div>");
- response.write("<span id='footnote'>This is a footnote after the huge content fill</span>");
- }
-
- if (plugin) {
- response.write("<embed id='embedtest' style='width: 400px; height: 100px;' " +
- "type='application/x-test'></embed>\n");
- }
-
- response.write("</html>");
-}
-
-
-// base64 decoder
-//
-// Yoinked from extensions/xml-rpc/src/nsXmlRpcClient.js because btoa()
-// doesn't seem to exist. :-(
-/* Convert Base64 data to a string */
-const toBinaryTable = [
- -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
- -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
- -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, -1,-1,-1,63,
- 52,53,54,55, 56,57,58,59, 60,61,-1,-1, -1, 0,-1,-1,
- -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,
- 15,16,17,18, 19,20,21,22, 23,24,25,-1, -1,-1,-1,-1,
- -1,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
- 41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1
-];
-const base64Pad = '=';
-
-function base64ToString(data) {
-
- var result = '';
- var leftbits = 0; // number of bits decoded, but yet to be appended
- var leftdata = 0; // bits decoded, but yet to be appended
-
- // Convert one by one.
- for (var i = 0; i < data.length; i++) {
- var c = toBinaryTable[data.charCodeAt(i) & 0x7f];
- var padding = (data[i] == base64Pad);
- // Skip illegal characters and whitespace
- if (c == -1) continue;
-
- // Collect data into leftdata, update bitcount
- leftdata = (leftdata << 6) | c;
- leftbits += 6;
-
- // If we have 8 or more bits, append 8 bits to the result
- if (leftbits >= 8) {
- leftbits -= 8;
- // Append if not padding.
- if (!padding)
- result += String.fromCharCode((leftdata >> leftbits) & 0xff);
- leftdata &= (1 << leftbits) - 1;
- }
- }
-
- // If there are any bits left, the base64 string was corrupted
- if (leftbits)
- throw Components.Exception('Corrupted base64 string');
-
- return result;
-}
diff --git a/toolkit/components/passwordmgr/test/mochitest/mochitest.ini b/toolkit/components/passwordmgr/test/mochitest/mochitest.ini
deleted file mode 100644
index a4170d7e0e..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/mochitest.ini
+++ /dev/null
@@ -1,69 +0,0 @@
-[DEFAULT]
-support-files =
- ../../../prompts/test/chromeScript.js
- ../../../prompts/test/prompt_common.js
- ../../../satchel/test/parent_utils.js
- ../../../satchel/test/satchel_common.js
- ../authenticate.sjs
- ../blank.html
- ../browser/form_autofocus_js.html
- ../browser/form_basic.html
- ../browser/form_cross_origin_secure_action.html
- ../pwmgr_common.js
- auth2/authenticate.sjs
-
-[test_autocomplete_https_upgrade.html]
-skip-if = toolkit == 'android' # autocomplete
-[test_autofill_https_upgrade.html]
-skip-if = toolkit == 'android' # Bug 1259768
-[test_autofill_password-only.html]
-[test_autofocus_js.html]
-skip-if = toolkit == 'android' # autocomplete
-[test_basic_form.html]
-[test_basic_form_0pw.html]
-[test_basic_form_1pw.html]
-[test_basic_form_1pw_2.html]
-[test_basic_form_2pw_1.html]
-[test_basic_form_2pw_2.html]
-[test_basic_form_3pw_1.html]
-[test_basic_form_autocomplete.html]
-skip-if = toolkit == 'android' # android:autocomplete.
-[test_insecure_form_field_autocomplete.html]
-skip-if = toolkit == 'android' # android:autocomplete.
-[test_password_field_autocomplete.html]
-skip-if = toolkit == 'android' # android:autocomplete.
-[test_insecure_form_field_no_saved_login.html]
-skip-if = toolkit == 'android' || os == 'linux' # android:autocomplete., linux: bug 1325778
-[test_basic_form_html5.html]
-[test_basic_form_pwevent.html]
-[test_basic_form_pwonly.html]
-[test_bug_627616.html]
-skip-if = toolkit == 'android' # Tests desktop prompts
-[test_bug_776171.html]
-[test_case_differences.html]
-skip-if = toolkit == 'android' # autocomplete
-[test_form_action_1.html]
-[test_form_action_2.html]
-[test_form_action_javascript.html]
-[test_formless_autofill.html]
-[test_formless_submit.html]
-[test_formless_submit_navigation.html]
-[test_formless_submit_navigation_negative.html]
-[test_input_events.html]
-[test_input_events_for_identical_values.html]
-[test_maxlength.html]
-[test_passwords_in_type_password.html]
-[test_prompt.html]
-skip-if = os == "linux" || toolkit == 'android' # Tests desktop prompts
-[test_prompt_http.html]
-skip-if = os == "linux" || toolkit == 'android' # Tests desktop prompts
-[test_prompt_noWindow.html]
-skip-if = e10s || toolkit == 'android' # Tests desktop prompts. e10s: bug 1217876
-[test_prompt_promptAuth.html]
-skip-if = os == "linux" || toolkit == 'android' # Tests desktop prompts
-[test_prompt_promptAuth_proxy.html]
-skip-if = e10s || os == "linux" || toolkit == 'android' # Tests desktop prompts
-[test_recipe_login_fields.html]
-[test_username_focus.html]
-skip-if = toolkit == 'android' # android:autocomplete.
-[test_xhr_2.html]
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_autocomplete_https_upgrade.html b/toolkit/components/passwordmgr/test/mochitest/test_autocomplete_https_upgrade.html
deleted file mode 100644
index 7d57253225..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_autocomplete_https_upgrade.html
+++ /dev/null
@@ -1,218 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test autocomplete on an HTTPS page using upgraded HTTP logins</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="satchel_common.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<script>
-const chromeScript = runChecksAfterCommonInit(false);
-
-runInParent(function addLogins() {
- const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
- Cu.import("resource://gre/modules/Services.jsm");
-
- // Create some logins just for this form, since we'll be deleting them.
- let nsLoginInfo = Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
- Ci.nsILoginInfo, "init");
-
- // We have two actual HTTPS to avoid autofill before the schemeUpgrades pref flips to true.
- let login0 = new nsLoginInfo("https://example.org", "https://example.org", null,
- "name", "pass", "uname", "pword");
-
- let login1 = new nsLoginInfo("https://example.org", "https://example.org", null,
- "name1", "pass1", "uname", "pword");
-
- // Same as above but HTTP instead of HTTPS (to test de-duping)
- let login2 = new nsLoginInfo("http://example.org", "http://example.org", null,
- "name1", "passHTTP", "uname", "pword");
-
- // Different HTTP login to upgrade with secure formSubmitURL
- let login3 = new nsLoginInfo("http://example.org", "https://example.org", null,
- "name2", "passHTTPtoHTTPS", "uname", "pword");
-
- try {
- Services.logins.addLogin(login0);
- Services.logins.addLogin(login1);
- Services.logins.addLogin(login2);
- Services.logins.addLogin(login3);
- } catch (e) {
- assert.ok(false, "addLogin threw: " + e);
- }
-});
-</script>
-<p id="display"></p>
-
-<!-- we presumably can't hide the content for this test. -->
-<div id="content">
- <iframe src="https://example.org/tests/toolkit/components/passwordmgr/test/mochitest/form_basic.html"></iframe>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-const shiftModifier = SpecialPowers.Ci.nsIDOMEvent.SHIFT_MASK;
-
-let iframe = SpecialPowers.wrap(document.getElementsByTagName("iframe")[0]);
-let iframeDoc;
-let uname;
-let pword;
-
-// Restore the form to the default state.
-function restoreForm() {
- pword.focus();
- uname.value = "";
- pword.value = "";
- uname.focus();
-}
-
-// Check for expected username/password in form.
-function checkACForm(expectedUsername, expectedPassword) {
- let formID = uname.parentNode.id;
- is(uname.value, expectedUsername, "Checking " + formID + " username");
- is(pword.value, expectedPassword, "Checking " + formID + " password");
-}
-
-add_task(function* setup() {
- yield SpecialPowers.pushPrefEnv({"set": [["signon.schemeUpgrades", true]]});
-
- yield new Promise(resolve => {
- iframe.addEventListener("load", function onLoad() {
- iframe.removeEventListener("load", onLoad);
- resolve();
- });
- });
-
- iframeDoc = iframe.contentDocument;
- uname = iframeDoc.getElementById("form-basic-username");
- pword = iframeDoc.getElementById("form-basic-password");
-});
-
-add_task(function* test_empty_first_entry() {
- // Make sure initial form is empty.
- checkACForm("", "");
- // Trigger autocomplete popup
- restoreForm();
- let popupState = yield getPopupState();
- is(popupState.open, false, "Check popup is initially closed");
- let shownPromise = promiseACShown();
- doKey("down");
- let results = yield shownPromise;
- popupState = yield getPopupState();
- is(popupState.selectedIndex, -1, "Check no entries are selected");
- checkArrayValues(results, ["name", "name1", "name2"], "initial");
-
- // Check first entry
- let index0Promise = notifySelectedIndex(0);
- doKey("down");
- yield index0Promise;
- checkACForm("", ""); // value shouldn't update
- doKey("return"); // not "enter"!
- yield promiseFormsProcessed();
- checkACForm("name", "pass");
-});
-
-add_task(function* test_empty_second_entry() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
- doKey("down"); // first
- doKey("down"); // second
- doKey("return"); // not "enter"!
- yield promiseFormsProcessed();
- checkACForm("name1", "pass1");
-});
-
-add_task(function* test_search() {
- restoreForm();
- let shownPromise = promiseACShown();
- // We need to blur for the autocomplete controller to notice the forced value below.
- uname.blur();
- uname.value = "name";
- uname.focus();
- sendChar("1");
- doKey("down"); // open
- let results = yield shownPromise;
- checkArrayValues(results, ["name1"], "check result deduping for 'name1'");
- doKey("down"); // first
- doKey("return"); // not "enter"!
- yield promiseFormsProcessed();
- checkACForm("name1", "pass1");
-
- let popupState = yield getPopupState();
- is(popupState.open, false, "Check popup is now closed");
-});
-
-add_task(function* test_delete_first_entry() {
- restoreForm();
- uname.focus();
- let shownPromise = promiseACShown();
- doKey("down");
- yield shownPromise;
-
- let index0Promise = notifySelectedIndex(0);
- doKey("down");
- yield index0Promise;
-
- let deletionPromise = promiseStorageChanged(["removeLogin"]);
- // On OS X, shift-backspace and shift-delete work, just delete does not.
- // On Win/Linux, shift-backspace does not work, delete and shift-delete do.
- doKey("delete", shiftModifier);
- yield deletionPromise;
- checkACForm("", "");
-
- let results = yield notifyMenuChanged(2, "name1");
-
- checkArrayValues(results, ["name1", "name2"], "two should remain after deleting the first");
- let popupState = yield getPopupState();
- is(popupState.open, true, "Check popup stays open after deleting");
- doKey("escape");
- popupState = yield getPopupState();
- is(popupState.open, false, "Check popup closed upon ESC");
-});
-
-add_task(function* test_delete_duplicate_entry() {
- restoreForm();
- uname.focus();
- let shownPromise = promiseACShown();
- doKey("down");
- yield shownPromise;
-
- let index0Promise = notifySelectedIndex(0);
- doKey("down");
- yield index0Promise;
-
- let deletionPromise = promiseStorageChanged(["removeLogin"]);
- // On OS X, shift-backspace and shift-delete work, just delete does not.
- // On Win/Linux, shift-backspace does not work, delete and shift-delete do.
- doKey("delete", shiftModifier);
- yield deletionPromise;
- checkACForm("", "");
-
- is(LoginManager.countLogins("http://example.org", "http://example.org", null), 1,
- "Check that the HTTP login remains");
- is(LoginManager.countLogins("https://example.org", "https://example.org", null), 0,
- "Check that the HTTPS login was deleted");
-
- // Two menu items should remain as the HTTPS login should have been deleted but
- // the HTTP would remain.
- let results = yield notifyMenuChanged(1, "name2");
-
- checkArrayValues(results, ["name2"], "one should remain after deleting the HTTPS name1");
- let popupState = yield getPopupState();
- is(popupState.open, true, "Check popup stays open after deleting");
- doKey("escape");
- popupState = yield getPopupState();
- is(popupState.open, false, "Check popup closed upon ESC");
-});
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_autofill_https_upgrade.html b/toolkit/components/passwordmgr/test/mochitest/test_autofill_https_upgrade.html
deleted file mode 100644
index ee1424002b..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_autofill_https_upgrade.html
+++ /dev/null
@@ -1,117 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test autocomplete on an HTTPS page using upgraded HTTP logins</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="satchel_common.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<script>
-const MISSING_ACTION_PATH = TESTS_DIR + "mochitest/form_basic.html";
-const CROSS_ORIGIN_SECURE_PATH = TESTS_DIR + "mochitest/form_cross_origin_secure_action.html";
-
-const chromeScript = runChecksAfterCommonInit(false);
-
-let nsLoginInfo = SpecialPowers.wrap(SpecialPowers.Components).Constructor("@mozilla.org/login-manager/loginInfo;1",
-SpecialPowers.Ci.nsILoginInfo,
-"init");
-</script>
-<p id="display"></p>
-
-<!-- we presumably can't hide the content for this test. -->
-<div id="content">
- <iframe></iframe>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-let iframe = SpecialPowers.wrap(document.getElementsByTagName("iframe")[0]);
-
-// Check for expected username/password in form.
-function checkACForm(expectedUsername, expectedPassword) {
- let iframeDoc = iframe.contentDocument;
- let uname = iframeDoc.getElementById("form-basic-username");
- let pword = iframeDoc.getElementById("form-basic-password");
- let formID = uname.parentNode.id;
- is(uname.value, expectedUsername, "Checking " + formID + " username");
- is(pword.value, expectedPassword, "Checking " + formID + " password");
-}
-function* prepareLoginsAndProcessForm(url, logins = []) {
- LoginManager.removeAllLogins();
-
- let dates = Date.now();
- for (let login of logins) {
- SpecialPowers.do_QueryInterface(login, SpecialPowers.Ci.nsILoginMetaInfo);
- // Force all dates to be the same so they don't affect things like deduping.
- login.timeCreated = login.timePasswordChanged = login.timeLastUsed = dates;
- LoginManager.addLogin(login);
- }
-
- iframe.src = url;
- yield promiseFormsProcessed();
-}
-
-add_task(function* setup() {
- yield SpecialPowers.pushPrefEnv({"set": [["signon.schemeUpgrades", true]]});
-});
-
-add_task(function* test_simpleNoDupesNoAction() {
- yield prepareLoginsAndProcessForm("https://example.com" + MISSING_ACTION_PATH, [
- new nsLoginInfo("http://example.com", "http://example.com", null,
- "name2", "pass2", "uname", "pword"),
- ]);
-
- checkACForm("name2", "pass2");
-});
-
-add_task(function* test_simpleNoDupesUpgradeOriginAndAction() {
- yield prepareLoginsAndProcessForm("https://example.com" + CROSS_ORIGIN_SECURE_PATH, [
- new nsLoginInfo("http://example.com", "http://another.domain", null,
- "name2", "pass2", "uname", "pword"),
- ]);
-
- checkACForm("name2", "pass2");
-});
-
-add_task(function* test_simpleNoDupesUpgradeOriginOnly() {
- yield prepareLoginsAndProcessForm("https://example.com" + CROSS_ORIGIN_SECURE_PATH, [
- new nsLoginInfo("http://example.com", "https://another.domain", null,
- "name2", "pass2", "uname", "pword"),
- ]);
-
- checkACForm("name2", "pass2");
-});
-
-add_task(function* test_simpleNoDupesUpgradeActionOnly() {
- yield prepareLoginsAndProcessForm("https://example.com" + CROSS_ORIGIN_SECURE_PATH, [
- new nsLoginInfo("https://example.com", "http://another.domain", null,
- "name2", "pass2", "uname", "pword"),
- ]);
-
- checkACForm("name2", "pass2");
-});
-
-add_task(function* test_dedupe() {
- yield prepareLoginsAndProcessForm("https://example.com" + MISSING_ACTION_PATH, [
- new nsLoginInfo("https://example.com", "https://example.com", null,
- "name1", "passHTTPStoHTTPS", "uname", "pword"),
- new nsLoginInfo("http://example.com", "http://example.com", null,
- "name1", "passHTTPtoHTTP", "uname", "pword"),
- new nsLoginInfo("http://example.com", "https://example.com", null,
- "name1", "passHTTPtoHTTPS", "uname", "pword"),
- new nsLoginInfo("https://example.com", "http://example.com", null,
- "name1", "passHTTPStoHTTP", "uname", "pword"),
- ]);
-
- checkACForm("name1", "passHTTPStoHTTPS");
-});
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_autofill_password-only.html b/toolkit/components/passwordmgr/test/mochitest/test_autofill_password-only.html
deleted file mode 100644
index 983356371a..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_autofill_password-only.html
+++ /dev/null
@@ -1,143 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test password-only forms should prefer a password-only login when present</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Login Manager test: Bug 444968
-<script>
-let pwmgrCommonScript = runInParent(SimpleTest.getTestFileURL("pwmgr_common.js"));
-pwmgrCommonScript.sendSyncMessage("setupParent", { selfFilling: true });
-
-SimpleTest.waitForExplicitFinish();
-
-let chromeScript = runInParent(function chromeSetup() {
- const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
- let pwmgr = Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager);
-
- let login1A = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- let login1B = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- let login2A = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- let login2B = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- let login2C = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
-
- login1A.init("http://mochi.test:8888", "http://bug444968-1", null,
- "testuser1A", "testpass1A", "", "");
- login1B.init("http://mochi.test:8888", "http://bug444968-1", null,
- "", "testpass1B", "", "");
-
- login2A.init("http://mochi.test:8888", "http://bug444968-2", null,
- "testuser2A", "testpass2A", "", "");
- login2B.init("http://mochi.test:8888", "http://bug444968-2", null,
- "", "testpass2B", "", "");
- login2C.init("http://mochi.test:8888", "http://bug444968-2", null,
- "testuser2C", "testpass2C", "", "");
-
- pwmgr.addLogin(login1A);
- pwmgr.addLogin(login1B);
- pwmgr.addLogin(login2A);
- pwmgr.addLogin(login2B);
- pwmgr.addLogin(login2C);
-
- addMessageListener("removeLogins", function removeLogins() {
- pwmgr.removeLogin(login1A);
- pwmgr.removeLogin(login1B);
- pwmgr.removeLogin(login2A);
- pwmgr.removeLogin(login2B);
- pwmgr.removeLogin(login2C);
- });
-});
-
-SimpleTest.registerCleanupFunction(() => chromeScript.sendSyncMessage("removeLogins"));
-
-registerRunTests();
-</script>
-
-<p id="display"></p>
-<div id="content" style="display: none">
- <!-- first 3 forms have matching user+pass and pass-only logins -->
-
- <!-- user+pass form. -->
- <form id="form1" action="http://bug444968-1">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- password-only form. -->
- <form id="form2" action="http://bug444968-1">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- user+pass form, username prefilled -->
- <form id="form3" action="http://bug444968-1">
- <input type="text" name="uname" value="testuser1A">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
-
- <!-- next 4 forms have matching user+pass (2x) and pass-only (1x) logins -->
-
- <!-- user+pass form. -->
- <form id="form4" action="http://bug444968-2">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- password-only form. -->
- <form id="form5" action="http://bug444968-2">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- user+pass form, username prefilled -->
- <form id="form6" action="http://bug444968-2">
- <input type="text" name="uname" value="testuser2A">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- user+pass form, username prefilled -->
- <form id="form7" action="http://bug444968-2">
- <input type="text" name="uname" value="testuser2C">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/* Test for Login Manager: 444968 (password-only forms should prefer a
- * password-only login when present )
- */
-function startTest() {
- checkForm(1, "testuser1A", "testpass1A");
- checkForm(2, "testpass1B");
- checkForm(3, "testuser1A", "testpass1A");
-
- checkUnmodifiedForm(4); // 2 logins match
- checkForm(5, "testpass2B");
- checkForm(6, "testuser2A", "testpass2A");
- checkForm(7, "testuser2C", "testpass2C");
-
- SimpleTest.finish();
-}
-
-window.addEventListener("runTests", startTest);
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_autofocus_js.html b/toolkit/components/passwordmgr/test/mochitest/test_autofocus_js.html
deleted file mode 100644
index 2ce3293dda..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_autofocus_js.html
+++ /dev/null
@@ -1,115 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test login autocomplete is activated when focused by js on load</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="satchel_common.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<script>
-const chromeScript = runChecksAfterCommonInit(false);
-
-runInParent(function addLogins() {
- const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
- Cu.import("resource://gre/modules/Services.jsm");
-
- // Create some logins just for this form, since we'll be deleting them.
- let nsLoginInfo = Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
- Ci.nsILoginInfo, "init");
-
- let login0 = new nsLoginInfo("https://example.org", "https://example.org", null,
- "name", "pass", "uname", "pword");
-
- let login1 = new nsLoginInfo("https://example.org", "https://example.org", null,
- "name1", "pass1", "uname", "pword");
-
- try {
- Services.logins.addLogin(login0);
- Services.logins.addLogin(login1);
- } catch (e) {
- assert.ok(false, "addLogin threw: " + e);
- }
-});
-</script>
-<p id="display"></p>
-
-<div id="content">
- <iframe src="https://example.org/tests/toolkit/components/passwordmgr/test/mochitest/form_autofocus_js.html"></iframe>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-let iframe = SpecialPowers.wrap(document.getElementsByTagName("iframe")[0]);
-let iframeDoc;
-
-add_task(function* setup() {
- yield new Promise(resolve => {
- iframe.addEventListener("load", function onLoad() {
- iframe.removeEventListener("load", onLoad);
- resolve();
- });
- });
-
- iframeDoc = iframe.contentDocument;
-
- SimpleTest.requestFlakyTimeout("Giving a chance for the unexpected popupshown to occur");
-});
-
-add_task(function* test_initial_focus() {
- let results = yield notifyMenuChanged(2, "name");
- checkArrayValues(results, ["name", "name1"], "Two results");
- doKey("down");
- doKey("return");
- yield promiseFormsProcessed();
- is(iframeDoc.getElementById("form-basic-password").value, "pass", "Check first password filled");
- let popupState = yield getPopupState();
- is(popupState.open, false, "Check popup is now closed");
-});
-
-// This depends on the filling from the previous test.
-add_task(function* test_not_reopened_if_filled() {
- listenForUnexpectedPopupShown();
- let usernameField = iframeDoc.getElementById("form-basic-username");
- usernameField.focus();
- info("Waiting to see if a popupshown occurs");
- yield new Promise(resolve => setTimeout(resolve, 1000));
-
- // cleanup
- gPopupShownExpected = true;
- iframeDoc.getElementById("form-basic-submit").focus();
-});
-
-add_task(function* test_reopened_after_edit_not_matching_saved() {
- let usernameField = iframeDoc.getElementById("form-basic-username");
- usernameField.value = "nam";
- let shownPromise = promiseACShown();
- usernameField.focus();
- yield shownPromise;
- iframeDoc.getElementById("form-basic-submit").focus();
-});
-
-add_task(function* test_not_reopened_after_selecting() {
- let formFillController = SpecialPowers.Cc["@mozilla.org/satchel/form-fill-controller;1"].
- getService(SpecialPowers.Ci.nsIFormFillController);
- let usernameField = iframeDoc.getElementById("form-basic-username");
- usernameField.value = "";
- iframeDoc.getElementById("form-basic-password").value = "";
- listenForUnexpectedPopupShown();
- formFillController.markAsLoginManagerField(usernameField);
- info("Waiting to see if a popupshown occurs");
- yield new Promise(resolve => setTimeout(resolve, 1000));
-
- // Cleanup
- gPopupShownExpected = true;
-});
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_basic_form.html b/toolkit/components/passwordmgr/test/mochitest/test_basic_form.html
deleted file mode 100644
index 3c38343a5d..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_basic_form.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test basic autofill</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Login Manager test: simple form fill
-
-<script>
-runChecksAfterCommonInit(startTest);
-
-/** Test for Login Manager: form fill, multiple forms. **/
-
-function startTest() {
- is($_(1, "uname").value, "testuser", "Checking for filled username");
- is($_(1, "pword").value, "testpass", "Checking for filled password");
-
- SimpleTest.finish();
-}
-</script>
-
-<p id="display"></p>
-
-<div id="content" style="display: none">
-
- <form id="form1" action="formtest.js">
- <p>This is form 1.</p>
- <input type="text" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
-</div>
-
-<pre id="test"></pre>
-</body>
-</html>
-
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_0pw.html b/toolkit/components/passwordmgr/test/mochitest/test_basic_form_0pw.html
deleted file mode 100644
index 0b416673b3..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_0pw.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test forms with no password fields</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Login Manager test: forms with no password fields
-<p id="display"></p>
-
-<div id="content" style="display: none">
-
- <!-- Form with no user field or password field -->
- <form id="form1" action="formtest.js">
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- Form with no user field or password field, but one other field -->
- <form id="form2" action="formtest.js">
- <input type="checkbox">
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- Form with no user field or password field, but one other field -->
- <form id="form3" action="formtest.js">
- <input type="checkbox" name="uname" value="">
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- Form with a text field, but no password field -->
- <form id="form4" action="formtest.js">
- <input type="text" name="yyyyy">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- Form with a user field, but no password field -->
- <form id="form5" action="formtest.js">
- <input type="text" name="uname">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Login Manager: form fill, no password fields. **/
-
-function startTest() {
- is($_(3, "uname").value, "", "Checking for unfilled checkbox (form 3)");
- is($_(4, "yyyyy").value, "", "Checking for unfilled text field (form 4)");
- is($_(5, "uname").value, "", "Checking for unfilled text field (form 5)");
-
- SimpleTest.finish();
-}
-
-runChecksAfterCommonInit(startTest);
-</script>
-</pre>
-</body>
-</html>
-
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_1pw.html b/toolkit/components/passwordmgr/test/mochitest/test_basic_form_1pw.html
deleted file mode 100644
index 3937fad4bd..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_1pw.html
+++ /dev/null
@@ -1,167 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test autofill for forms with 1 password field</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Login Manager test: forms with 1 password field
-<script>
-runChecksAfterCommonInit(() => startTest());
-</script>
-<p id="display"></p>
-
-<div id="content" style="display: none">
-
-<!-- no username fields -->
-
-<form id='form1' action='formtest.js'> 1
- <!-- Blank, so fill in the password -->
- <input type='password' name='pname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form2' action='formtest.js'> 2
- <!-- Already contains the password, so nothing to do. -->
- <input type='password' name='pname' value='testpass'>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form3' action='formtest.js'> 3
- <!-- Contains unknown password, so don't change it -->
- <input type='password' name='pname' value='xxxxxxxx'>
- <button type='submit'>Submit</button>
-</form>
-
-
-<!-- username fields -->
-
-<form id='form4' action='formtest.js'> 4
- <!-- Blanks, so fill in login -->
- <input type='text' name='uname' value=''>
- <input type='password' name='pname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form5' action='formtest.js'> 5
- <!-- Username already set, so fill in password -->
- <input type='text' name='uname' value='testuser'>
- <input type='password' name='pname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form6' action='formtest.js'> 6
- <!-- Unknown username, so don't fill in password -->
- <input type='text' name='uname' value='xxxxxxxx'>
- <input type='password' name='pname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form7' action='formtest.js'> 7
- <!-- Password already set, could fill in username but that's weird so we don't -->
- <input type='text' name='uname' value=''>
- <input type='password' name='pname' value='testpass'>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form8' action='formtest.js'> 8
- <!-- Unknown password, so don't fill in a username -->
- <input type='text' name='uname' value=''>
- <input type='password' name='pname' value='xxxxxxxx'>
- <button type='submit'>Submit</button>
-</form>
-
-
-
-<!-- extra text fields -->
-
-<form id='form9' action='formtest.js'> 9
- <!-- text field _after_ password should never be treated as a username field -->
- <input type='password' name='pname' value=''>
- <input type='text' name='uname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form10' action='formtest.js'> 10
- <!-- only the first text field before the password should be for username -->
- <input type='text' name='other' value=''>
- <input type='text' name='uname' value=''>
- <input type='password' name='pname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form11' action='formtest.js'> 11
- <!-- variation just to make sure extra text field is still ignored -->
- <input type='text' name='uname' value=''>
- <input type='password' name='pname' value=''>
- <input type='text' name='other' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-
-
-<!-- same as last bunch, but with xxxx in the extra field. -->
-
-<form id='form12' action='formtest.js'> 12
- <!-- text field _after_ password should never be treated as a username field -->
- <input type='password' name='pname' value=''>
- <input type='text' name='uname' value='xxxxxxxx'>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form13' action='formtest.js'> 13
- <!-- only the first text field before the password should be for username -->
- <input type='text' name='other' value='xxxxxxxx'>
- <input type='text' name='uname' value=''>
- <input type='password' name='pname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form14' action='formtest.js'> 14
- <!-- variation just to make sure extra text field is still ignored -->
- <input type='text' name='uname' value=''>
- <input type='password' name='pname' value=''>
- <input type='text' name='other' value='xxxxxxxx'>
- <button type='submit'>Submit</button>
-</form>
-
-
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Login Manager: simple form fill **/
-
-function startTest() {
- var f = 1;
-
- // 1-3
- checkForm(f++, "testpass");
- checkForm(f++, "testpass");
- checkForm(f++, "xxxxxxxx");
-
- // 4-8
- checkForm(f++, "testuser", "testpass");
- checkForm(f++, "testuser", "testpass");
- checkForm(f++, "xxxxxxxx", "");
- checkForm(f++, "", "testpass");
- checkForm(f++, "", "xxxxxxxx");
-
- // 9-14
- checkForm(f++, "testpass", "");
- checkForm(f++, "", "testuser", "testpass");
- checkForm(f++, "testuser", "testpass", "");
- checkForm(f++, "testpass", "xxxxxxxx");
- checkForm(f++, "xxxxxxxx", "testuser", "testpass");
- checkForm(f++, "testuser", "testpass", "xxxxxxxx");
-
- SimpleTest.finish();
-}
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_1pw_2.html b/toolkit/components/passwordmgr/test/mochitest/test_basic_form_1pw_2.html
deleted file mode 100644
index 0f6566b9c2..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_1pw_2.html
+++ /dev/null
@@ -1,109 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test forms with 1 password field, part 2</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Login Manager test: forms with 1 password field, part 2
-<script>
-runChecksAfterCommonInit(() => startTest());
-</script>
-<p id="display"></p>
-
-<div id="content" style="display: none">
-
-<form id='form1' action='formtest.js'> 1
- <input type='password' name='pname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form2' action='formtest.js'> 2
- <input type='password' name='pname' value='' disabled>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form3' action='formtest.js'> 3
- <input type='password' name='pname' value='' readonly>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form4' action='formtest.js'> 4
- <input type='text' name='uname' value=''>
- <input type='password' name='pname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form5' action='formtest.js'> 5
- <input type='text' name='uname' value='' disabled>
- <input type='password' name='pname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form6' action='formtest.js'> 6
- <input type='text' name='uname' value='' readonly>
- <input type='password' name='pname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form7' action='formtest.js'> 7
- <input type='text' name='uname' value=''>
- <input type='password' name='pname' value='' disabled>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form8' action='formtest.js'> 8
- <input type='text' name='uname' value=''>
- <input type='password' name='pname' value='' readonly>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form9' action='formtest.js'> 9
- <input type='text' name='uname' value='TESTUSER'>
- <input type='password' name='pname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form10' action='formtest.js'> 10
- <input type='text' name='uname' value='TESTUSER' readonly>
- <input type='password' name='pname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form11' action='formtest.js'> 11
- <input type='text' name='uname' value='TESTUSER' disabled>
- <input type='password' name='pname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Login Manager: simple form fill, part 2 **/
-
-function startTest() {
- var f;
-
- // Test various combinations of disabled/readonly inputs
- checkForm(1, "testpass"); // control
- checkUnmodifiedForm(2);
- checkUnmodifiedForm(3);
- checkForm(4, "testuser", "testpass"); // control
- for (f = 5; f <= 8; f++) { checkUnmodifiedForm(f); }
- // Test case-insensitive comparison of username field
- checkForm(9, "testuser", "testpass");
- checkForm(10, "TESTUSER", "testpass");
- checkForm(11, "TESTUSER", "testpass");
-
- SimpleTest.finish();
-}
-</script>
-</pre>
-</body>
-</html>
-
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_2pw_1.html b/toolkit/components/passwordmgr/test/mochitest/test_basic_form_2pw_1.html
deleted file mode 100644
index 128ffca7c7..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_2pw_1.html
+++ /dev/null
@@ -1,187 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test autofill for forms with 2 password fields</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Login Manager test: forms with 2 password fields
-<script>
-runChecksAfterCommonInit(() => startTest());
-</script>
-<p id="display"></p>
-
-<div id="content" style="display: none">
-
-
-<!-- no username fields -->
-
-<form id='form1' action='formtest.js'> 1
- <!-- simple form, fill in first pw -->
- <input type='password' name='pname' value=''>
- <input type='password' name='qname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form2' action='formtest.js'> 2
- <!-- same but reverse pname and qname, field names are ignored. -->
- <input type='password' name='qname' value=''>
- <input type='password' name='pname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form3' action='formtest.js'> 3
- <!-- text field after password fields should be ignored, no username. -->
- <input type='password' name='pname' value=''>
- <input type='password' name='qname' value=''>
- <input type='text' name='uname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form4' action='formtest.js'> 4
- <!-- nothing to do, password already present -->
- <input type='password' name='pname' value='testpass'>
- <input type='password' name='qname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form5' action='formtest.js'> 5
- <!-- don't clobber an existing unrecognized password -->
- <input type='password' name='pname' value='xxxxxxxx'>
- <input type='password' name='qname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form6' action='formtest.js'> 6
- <!-- fill in first field, 2nd field shouldn't be touched anyway. -->
- <input type='password' name='pname' value=''>
- <input type='password' name='qname' value='xxxxxxxx'>
- <button type='submit'>Submit</button>
-</form>
-
-
-
-<!-- with username fields -->
-
-
-
-<form id='form7' action='formtest.js'> 7
- <!-- simple form, should fill in username and first pw -->
- <input type='text' name='uname' value=''>
- <input type='password' name='pname' value=''>
- <input type='password' name='qname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form8' action='formtest.js'> 8
- <!-- reverse pname and qname, field names are ignored. -->
- <input type='text' name='uname' value=''>
- <input type='password' name='qname' value=''>
- <input type='password' name='pname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form9' action='formtest.js'> 9
- <!-- username already filled, so just fill first password -->
- <input type='text' name='uname' value='testuser'>
- <input type='password' name='pname' value=''>
- <input type='password' name='qname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form10' action='formtest.js'> 10
- <!-- unknown username, don't fill in a password -->
- <input type='text' name='uname' value='xxxxxxxx'>
- <input type='password' name='pname' value=''>
- <input type='password' name='qname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form11' action='formtest.js'> 11
- <!-- don't clobber unknown password -->
- <input type='text' name='uname' value='testuser'>
- <input type='password' name='pname' value='xxxxxxxx'>
- <input type='password' name='qname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form12' action='formtest.js'> 12
- <!-- fill in 1st pass, don't clobber 2nd pass -->
- <input type='text' name='uname' value='testuser'>
- <input type='password' name='pname' value=''>
- <input type='password' name='qname' value='xxxxxxxx'>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form13' action='formtest.js'> 13
- <!-- nothing to do, user and pass prefilled. life is easy. -->
- <input type='text' name='uname' value='testuser'>
- <input type='password' name='pname' value='testpass'>
- <input type='password' name='qname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form14' action='formtest.js'> 14
- <!-- shouldn't fill in username because 1st pw field is unknown. -->
- <input type='text' name='uname' value=''>
- <input type='password' name='pname' value='xxxxxxxx'>
- <input type='password' name='qname' value='testpass'>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form15' action='formtest.js'> 15
- <!-- textfield in the middle of pw fields should be ignored -->
- <input type='password' name='pname' value=''>
- <input type='text' name='uname' value=''>
- <input type='password' name='qname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-<form id='form16' action='formtest.js'> 16
- <!-- same, and don't clobber existing unknown password -->
- <input type='password' name='pname' value='xxxxxxxx'>
- <input type='text' name='uname' value=''>
- <input type='password' name='qname' value=''>
- <button type='submit'>Submit</button>
-</form>
-
-
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Login Manager: simple form fill **/
-
-function startTest() {
- var f = 1;
-
- // 1-6 no username
- checkForm(f++, "testpass", "");
- checkForm(f++, "testpass", "");
- checkForm(f++, "testpass", "", "");
- checkForm(f++, "testpass", "");
- checkForm(f++, "xxxxxxxx", "");
- checkForm(f++, "testpass", "xxxxxxxx");
-
- // 7-15 with username
- checkForm(f++, "testuser", "testpass", "");
- checkForm(f++, "testuser", "testpass", "");
- checkForm(f++, "testuser", "testpass", "");
- checkForm(f++, "xxxxxxxx", "", "");
- checkForm(f++, "testuser", "xxxxxxxx", "");
- checkForm(f++, "testuser", "testpass", "xxxxxxxx");
- checkForm(f++, "testuser", "testpass", "");
- checkForm(f++, "", "xxxxxxxx", "testpass");
- checkForm(f++, "testpass", "", "");
- checkForm(f++, "xxxxxxxx", "", "");
-
- SimpleTest.finish();
-}
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_2pw_2.html b/toolkit/components/passwordmgr/test/mochitest/test_basic_form_2pw_2.html
deleted file mode 100644
index eba811cf94..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_2pw_2.html
+++ /dev/null
@@ -1,105 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test for form fill with 2 password fields</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Login Manager test: form fill, 2 password fields
-<p id="display"></p>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Login Manager: form fill, 2 password fields **/
-
-/*
- * If a form has two password fields, other things may be going on....
- *
- * 1 - The user might be creating a new login (2nd field for typo checking)
- * 2 - The user is changing a password (old and new password each have field)
- *
- * This test is for case #1.
- */
-
-var numSubmittedForms = 0;
-var numStartingLogins = 0;
-
-function startTest() {
- // Check for unfilled forms
- is($_(1, "uname").value, "", "Checking username 1");
- is($_(1, "pword").value, "", "Checking password 1A");
- is($_(1, "qword").value, "", "Checking password 1B");
-
- // Fill in the username and password fields, for account creation.
- // Form 1
- $_(1, "uname").value = "newuser1";
- $_(1, "pword").value = "newpass1";
- $_(1, "qword").value = "newpass1";
-
- var button = getFormSubmitButton(1);
-
- todo(false, "form submission disabled, can't auto-accept dialog yet");
- SimpleTest.finish();
-}
-
-
-// Called by each form's onsubmit handler.
-function checkSubmit(formNum) {
- numSubmittedForms++;
-
- // End the test at the last form.
- if (formNum == 999) {
- is(numSubmittedForms, 999, "Ensuring all forms submitted for testing.");
-
- var numEndingLogins = LoginManager.countLogins("", "", "");
-
- ok(numEndingLogins > 0, "counting logins at end");
- is(numStartingLogins, numEndingLogins + 222, "counting logins at end");
-
- SimpleTest.finish();
- return false; // return false to cancel current form submission
- }
-
- // submit the next form.
- var button = getFormSubmitButton(formNum + 1);
- button.click();
-
- return false; // return false to cancel current form submission
-}
-
-
-function getFormSubmitButton(formNum) {
- var form = $("form" + formNum); // by id, not name
- ok(form != null, "getting form " + formNum);
-
- // we can't just call form.submit(), because that doesn't seem to
- // invoke the form onsubmit handler.
- var button = form.firstChild;
- while (button && button.type != "submit") { button = button.nextSibling; }
- ok(button != null, "getting form submit button");
-
- return button;
-}
-
-runChecksAfterCommonInit(startTest);
-
-</script>
-</pre>
-<div id="content" style="display: none">
- <form id="form1" onsubmit="return checkSubmit(1)" action="http://newuser.com">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <input type="password" name="qword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
-</div>
-
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_3pw_1.html b/toolkit/components/passwordmgr/test/mochitest/test_basic_form_3pw_1.html
deleted file mode 100644
index 30b5a319f6..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_3pw_1.html
+++ /dev/null
@@ -1,177 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test autofill for forms with 3 password fields</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Login Manager test: forms with 3 password fields (form filling)
-<script>
-runChecksAfterCommonInit(() => startTest());
-</script>
-<p id="display"></p>
-
-<div id="content" style="display: none">
- <p>The next three forms are <b>user/pass/passB/passC</b>, as all-empty, preuser(only), and preuser/pass</p>
- <form id="form1" action="formtest.js">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <input type="password" name="qword">
- <input type="password" name="rword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <form id="form2" action="formtest.js">
- <input type="text" name="uname" value="testuser">
- <input type="password" name="pword">
- <input type="password" name="qword">
- <input type="password" name="rword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <form id="form3" action="formtest.js">
- <input type="text" name="uname" value="testuser">
- <input type="password" name="pword" value="testpass">
- <input type="password" name="qword">
- <input type="password" name="rword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
-
- <p>The next three forms are <b>user/passB/pass/passC</b>, as all-empty, preuser(only), and preuser/pass</p>
- <form id="form4" action="formtest.js">
- <input type="text" name="uname">
- <input type="password" name="qword">
- <input type="password" name="pword">
- <input type="password" name="rword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <form id="form5" action="formtest.js">
- <input type="text" name="uname" value="testuser">
- <input type="password" name="qword">
- <input type="password" name="pword">
- <input type="password" name="rword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <form id="form6" action="formtest.js">
- <input type="text" name="uname" value="testuser">
- <input type="password" name="qword">
- <input type="password" name="pword" value="testpass">
- <input type="password" name="rword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <p>The next three forms are <b>user/passB/passC/pass</b>, as all-empty, preuser(only), and preuser/pass</p>
- <form id="form7" action="formtest.js">
- <input type="text" name="uname">
- <input type="password" name="qword">
- <input type="password" name="rword">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <form id="form8" action="formtest.js">
- <input type="text" name="uname" value="testuser">
- <input type="password" name="qword">
- <input type="password" name="rword">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <form id="form9" action="formtest.js">
- <input type="text" name="uname" value="testuser">
- <input type="password" name="qword">
- <input type="password" name="rword">
- <input type="password" name="pword" value="testpass">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Login Manager: form fill, 3 password fields **/
-
-// Test to make sure 3-password forms are filled properly.
-
-function startTest() {
- // Check form 1
- is($_(1, "uname").value, "testuser", "Checking username 1");
- is($_(1, "pword").value, "testpass", "Checking password 1");
- is($_(1, "qword").value, "", "Checking password 1 (q)");
- is($_(1, "rword").value, "", "Checking password 1 (r)");
- // Check form 2
- is($_(2, "uname").value, "testuser", "Checking username 2");
- is($_(2, "pword").value, "testpass", "Checking password 2");
- is($_(2, "qword").value, "", "Checking password 2 (q)");
- is($_(2, "rword").value, "", "Checking password 2 (r)");
- // Check form 3
- is($_(3, "uname").value, "testuser", "Checking username 3");
- is($_(3, "pword").value, "testpass", "Checking password 3");
- is($_(3, "qword").value, "", "Checking password 3 (q)");
- is($_(3, "rword").value, "", "Checking password 3 (r)");
-
- // Check form 4
- is($_(4, "uname").value, "testuser", "Checking username 4");
- todo_is($_(4, "qword").value, "", "Checking password 4 (q)");
- todo_is($_(4, "pword").value, "testpass", "Checking password 4");
- is($_(4, "rword").value, "", "Checking password 4 (r)");
- // Check form 5
- is($_(5, "uname").value, "testuser", "Checking username 5");
- todo_is($_(5, "qword").value, "", "Checking password 5 (q)");
- todo_is($_(5, "pword").value, "testpass", "Checking password 5");
- is($_(5, "rword").value, "", "Checking password 5 (r)");
- // Check form 6
- is($_(6, "uname").value, "testuser", "Checking username 6");
- todo_is($_(6, "qword").value, "", "Checking password 6 (q)");
- is($_(6, "pword").value, "testpass", "Checking password 6");
- is($_(6, "rword").value, "", "Checking password 6 (r)");
-
- // Check form 7
- is($_(7, "uname").value, "testuser", "Checking username 7");
- todo_is($_(7, "qword").value, "", "Checking password 7 (q)");
- is($_(7, "rword").value, "", "Checking password 7 (r)");
- todo_is($_(7, "pword").value, "testpass", "Checking password 7");
- // Check form 8
- is($_(8, "uname").value, "testuser", "Checking username 8");
- todo_is($_(8, "qword").value, "", "Checking password 8 (q)");
- is($_(8, "rword").value, "", "Checking password 8 (r)");
- todo_is($_(8, "pword").value, "testpass", "Checking password 8");
- // Check form 9
- is($_(9, "uname").value, "testuser", "Checking username 9");
- todo_is($_(9, "qword").value, "", "Checking password 9 (q)");
- is($_(9, "rword").value, "", "Checking password 9 (r)");
- is($_(9, "pword").value, "testpass", "Checking password 9");
-
- // TODO: as with the 2-password cases, add tests to check for creating new
- // logins and changing passwords.
- SimpleTest.finish();
-}
-</script>
-</pre>
-</body>
-</html>
-
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_autocomplete.html b/toolkit/components/passwordmgr/test/mochitest/test_basic_form_autocomplete.html
deleted file mode 100644
index 0eee8e696b..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_autocomplete.html
+++ /dev/null
@@ -1,859 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test basic login autocomplete</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="satchel_common.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Login Manager test: multiple login autocomplete
-
-<script>
-var chromeScript = runChecksAfterCommonInit();
-
-var setupScript = runInParent(function setup() {
- const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
- Cu.import("resource://gre/modules/Services.jsm");
-
- // Create some logins just for this form, since we'll be deleting them.
- var nsLoginInfo = Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
- Ci.nsILoginInfo, "init");
- assert.ok(nsLoginInfo != null, "nsLoginInfo constructor");
-
- // login0 has no username, so should be filtered out from the autocomplete list.
- var login0 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "", "user0pass", "", "pword");
-
- var login1 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "tempuser1", "temppass1", "uname", "pword");
-
- var login2 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "testuser2", "testpass2", "uname", "pword");
-
- var login3 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "testuser3", "testpass3", "uname", "pword");
-
- var login4 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "zzzuser4", "zzzpass4", "uname", "pword");
-
- // login 5 only used in the single-user forms
- var login5 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete2", null,
- "singleuser5", "singlepass5", "uname", "pword");
-
- var login6A = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete3", null,
- "form7user1", "form7pass1", "uname", "pword");
- var login6B = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete3", null,
- "form7user2", "form7pass2", "uname", "pword");
-
- var login7 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete4", null,
- "form8user", "form8pass", "uname", "pword");
-
- var login8A = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete5", null,
- "form9userAB", "form9pass", "uname", "pword");
- var login8B = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete5", null,
- "form9userAAB", "form9pass", "uname", "pword");
- var login8C = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete5", null,
- "form9userAABzz", "form9pass", "uname", "pword");
-
- var login10 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete7", null,
- "testuser10", "testpass10", "uname", "pword");
-
-
- // try/catch in case someone runs the tests manually, twice.
- try {
- Services.logins.addLogin(login0);
- Services.logins.addLogin(login1);
- Services.logins.addLogin(login2);
- Services.logins.addLogin(login3);
- Services.logins.addLogin(login4);
- Services.logins.addLogin(login5);
- Services.logins.addLogin(login6A);
- Services.logins.addLogin(login6B);
- Services.logins.addLogin(login7);
- Services.logins.addLogin(login8A);
- Services.logins.addLogin(login8B);
- // login8C is added later
- Services.logins.addLogin(login10);
- } catch (e) {
- assert.ok(false, "addLogin threw: " + e);
- }
-
- addMessageListener("addLogin", loginVariableName => {
- let login = eval(loginVariableName);
- assert.ok(!!login, "Login to add is defined: " + loginVariableName);
- Services.logins.addLogin(login);
- });
- addMessageListener("removeLogin", loginVariableName => {
- let login = eval(loginVariableName);
- assert.ok(!!login, "Login to delete is defined: " + loginVariableName);
- Services.logins.removeLogin(login);
- });
-});
-</script>
-<p id="display"></p>
-
-<!-- we presumably can't hide the content for this test. -->
-<div id="content">
-
- <!-- form1 tests multiple matching logins -->
- <form id="form1" action="http://autocomplete:8888/formtest.js" onsubmit="return false;">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- other forms test single logins, with autocomplete=off set -->
- <form id="form2" action="http://autocomplete2" onsubmit="return false;">
- <input type="text" name="uname">
- <input type="password" name="pword" autocomplete="off">
- <button type="submit">Submit</button>
- </form>
-
- <form id="form3" action="http://autocomplete2" onsubmit="return false;">
- <input type="text" name="uname" autocomplete="off">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <form id="form4" action="http://autocomplete2" onsubmit="return false;" autocomplete="off">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <form id="form5" action="http://autocomplete2" onsubmit="return false;">
- <input type="text" name="uname" autocomplete="off">
- <input type="password" name="pword" autocomplete="off">
- <button type="submit">Submit</button>
- </form>
-
- <!-- control -->
- <form id="form6" action="http://autocomplete2" onsubmit="return false;">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- This form will be manipulated to insert a different username field. -->
- <form id="form7" action="http://autocomplete3" onsubmit="return false;">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- test for no autofill after onblur with blank username -->
- <form id="form8" action="http://autocomplete4" onsubmit="return false;">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- test autocomplete dropdown -->
- <form id="form9" action="http://autocomplete5" onsubmit="return false;">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- test for onUsernameInput recipe testing -->
- <form id="form11" action="http://autocomplete7" onsubmit="return false;">
- <input type="text" name="1">
- <input type="text" name="2">
- <button type="submit">Submit</button>
- </form>
-
- <!-- tests <form>-less autocomplete -->
- <div id="form12">
- <input type="text" name="uname" id="uname">
- <input type="password" name="pword" id="pword">
- <button type="submit">Submit</button>
- </div>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Login Manager: multiple login autocomplete. **/
-
-var uname = $_(1, "uname");
-var pword = $_(1, "pword");
-const shiftModifier = SpecialPowers.Ci.nsIDOMEvent.SHIFT_MASK;
-
-// Restore the form to the default state.
-function restoreForm() {
- uname.value = "";
- pword.value = "";
- uname.focus();
-}
-
-// Check for expected username/password in form.
-function checkACForm(expectedUsername, expectedPassword) {
- var formID = uname.parentNode.id;
- is(uname.value, expectedUsername, "Checking " + formID + " username is: " + expectedUsername);
- is(pword.value, expectedPassword, "Checking " + formID + " password is: " + expectedPassword);
-}
-
-function sendFakeAutocompleteEvent(element) {
- var acEvent = document.createEvent("HTMLEvents");
- acEvent.initEvent("DOMAutoComplete", true, false);
- element.dispatchEvent(acEvent);
-}
-
-function spinEventLoop() {
- return Promise.resolve();
-}
-
-add_task(function* setup() {
- yield SpecialPowers.pushPrefEnv({"set": [["security.insecure_field_warning.contextual.enabled", false],
- ["signon.autofillForms.http", true]]});
- listenForUnexpectedPopupShown();
-});
-
-add_task(function* test_form1_initial_empty() {
- yield SimpleTest.promiseFocus(window);
-
- // Make sure initial form is empty.
- checkACForm("", "");
- let popupState = yield getPopupState();
- is(popupState.open, false, "Check popup is initially closed");
-});
-
-add_task(function* test_form1_menuitems() {
- yield SimpleTest.promiseFocus(window);
- // Trigger autocomplete popup
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- let results = yield shownPromise;
-
- let popupState = yield getPopupState();
- is(popupState.selectedIndex, -1, "Check no entries are selected upon opening");
-
- let expectedMenuItems = ["tempuser1",
- "testuser2",
- "testuser3",
- "zzzuser4"];
- checkArrayValues(results, expectedMenuItems, "Check all menuitems are displayed correctly.");
-
- checkACForm("", ""); // value shouldn't update just by selecting
- doKey("return"); // not "enter"!
- yield spinEventLoop(); // let focus happen
- checkACForm("", "");
-});
-
-add_task(function* test_form1_first_entry() {
- yield SimpleTest.promiseFocus(window);
- // Trigger autocomplete popup
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- let popupState = yield getPopupState();
- is(popupState.selectedIndex, -1, "Check no entries are selected upon opening");
-
- doKey("down"); // first
- checkACForm("", ""); // value shouldn't update just by selecting
- doKey("return"); // not "enter"!
- yield promiseFormsProcessed();
- checkACForm("tempuser1", "temppass1");
-});
-
-add_task(function* test_form1_second_entry() {
- // Trigger autocomplete popup
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // first
- doKey("down"); // second
- doKey("return"); // not "enter"!
- yield promiseFormsProcessed();
- checkACForm("testuser2", "testpass2");
-});
-
-add_task(function* test_form1_third_entry() {
- // Trigger autocomplete popup
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // first
- doKey("down"); // second
- doKey("down"); // third
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("testuser3", "testpass3");
-});
-
-add_task(function* test_form1_fourth_entry() {
- // Trigger autocomplete popup
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // first
- doKey("down"); // second
- doKey("down"); // third
- doKey("down"); // fourth
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("zzzuser4", "zzzpass4");
-});
-
-add_task(function* test_form1_wraparound_first_entry() {
- // Trigger autocomplete popup
- restoreForm();
- yield spinEventLoop(); // let focus happen
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // first
- doKey("down"); // second
- doKey("down"); // third
- doKey("down"); // fourth
- doKey("down"); // deselects
- doKey("down"); // first
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("tempuser1", "temppass1");
-});
-
-add_task(function* test_form1_wraparound_up_last_entry() {
- // Trigger autocomplete popup
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("up"); // last (fourth)
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("zzzuser4", "zzzpass4");
-});
-
-add_task(function* test_form1_wraparound_down_up_up() {
- // Trigger autocomplete popup
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // select first entry
- doKey("up"); // selects nothing!
- doKey("up"); // select last entry
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("zzzuser4", "zzzpass4");
-});
-
-add_task(function* test_form1_wraparound_up_last() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down");
- doKey("up"); // deselects
- doKey("up"); // last entry
- doKey("up");
- doKey("up");
- doKey("up"); // first entry
- doKey("up"); // deselects
- doKey("up"); // last entry
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("zzzuser4", "zzzpass4");
-});
-
-add_task(function* test_form1_fill_username_without_autofill_right() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- // Set first entry w/o triggering autocomplete
- doKey("down"); // first
- doKey("right");
- yield spinEventLoop();
- checkACForm("tempuser1", ""); // empty password
-});
-
-add_task(function* test_form1_fill_username_without_autofill_left() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- // Set first entry w/o triggering autocomplete
- doKey("down"); // first
- doKey("left");
- checkACForm("tempuser1", ""); // empty password
-});
-
-add_task(function* test_form1_pageup_first() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- // Check first entry (page up)
- doKey("down"); // first
- doKey("down"); // second
- doKey("page_up"); // first
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("tempuser1", "temppass1");
-});
-
-add_task(function* test_form1_pagedown_last() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- /* test 13 */
- // Check last entry (page down)
- doKey("down"); // first
- doKey("page_down"); // last
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("zzzuser4", "zzzpass4");
-});
-
-add_task(function* test_form1_untrusted_event() {
- restoreForm();
- yield spinEventLoop();
-
- // Send a fake (untrusted) event.
- checkACForm("", "");
- uname.value = "zzzuser4";
- sendFakeAutocompleteEvent(uname);
- yield spinEventLoop();
- checkACForm("zzzuser4", "");
-});
-
-add_task(function* test_form1_delete() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- // XXX tried sending character "t" before/during dropdown to test
- // filtering, but had no luck. Seemed like the character was getting lost.
- // Setting uname.value didn't seem to work either. This works with a human
- // driver, so I'm not sure what's up.
-
- // Delete the first entry (of 4), "tempuser1"
- doKey("down");
- var numLogins;
- numLogins = LoginManager.countLogins("http://mochi.test:8888", "http://autocomplete:8888", null);
- is(numLogins, 5, "Correct number of logins before deleting one");
-
- let countChangedPromise = notifyMenuChanged(3);
- var deletionPromise = promiseStorageChanged(["removeLogin"]);
- // On OS X, shift-backspace and shift-delete work, just delete does not.
- // On Win/Linux, shift-backspace does not work, delete and shift-delete do.
- doKey("delete", shiftModifier);
- yield deletionPromise;
-
- checkACForm("", "");
- numLogins = LoginManager.countLogins("http://mochi.test:8888", "http://autocomplete:8888", null);
- is(numLogins, 4, "Correct number of logins after deleting one");
- yield countChangedPromise;
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("testuser2", "testpass2");
-});
-
-add_task(function* test_form1_first_after_deletion() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- // Check the new first entry (of 3)
- doKey("down");
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("testuser2", "testpass2");
-});
-
-add_task(function* test_form1_delete_second() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- // Delete the second entry (of 3), "testuser3"
- doKey("down");
- doKey("down");
- doKey("delete", shiftModifier);
- checkACForm("", "");
- numLogins = LoginManager.countLogins("http://mochi.test:8888", "http://autocomplete:8888", null);
- is(numLogins, 3, "Correct number of logins after deleting one");
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("zzzuser4", "zzzpass4");
-});
-
-add_task(function* test_form1_first_after_deletion2() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- // Check the new first entry (of 2)
- doKey("down");
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("testuser2", "testpass2");
-});
-
-add_task(function* test_form1_delete_last() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- /* test 54 */
- // Delete the last entry (of 2), "zzzuser4"
- doKey("down");
- doKey("down");
- doKey("delete", shiftModifier);
- checkACForm("", "");
- numLogins = LoginManager.countLogins("http://mochi.test:8888", "http://autocomplete:8888", null);
- is(numLogins, 2, "Correct number of logins after deleting one");
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("testuser2", "testpass2");
-});
-
-add_task(function* test_form1_first_after_3_deletions() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- // Check the only remaining entry
- doKey("down");
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("testuser2", "testpass2");
-});
-
-add_task(function* test_form1_check_only_entry_remaining() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- /* test 56 */
- // Delete the only remaining entry, "testuser2"
- doKey("down");
- doKey("delete", shiftModifier);
- checkACForm("", "");
- numLogins = LoginManager.countLogins("http://mochi.test:8888", "http://autocomplete:8888", null);
- is(numLogins, 1, "Correct number of logins after deleting one");
-
- // remove the login that's not shown in the list.
- setupScript.sendSyncMessage("removeLogin", "login0");
-});
-
-/* Tests for single-user forms for ignoring autocomplete=off */
-add_task(function* test_form2() {
- // Turn our attention to form2
- uname = $_(2, "uname");
- pword = $_(2, "pword");
- checkACForm("singleuser5", "singlepass5");
-
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- // Check first entry
- doKey("down");
- checkACForm("", ""); // value shouldn't update
- doKey("return"); // not "enter"!
- yield promiseFormsProcessed();
- checkACForm("singleuser5", "singlepass5");
-});
-
-add_task(function* test_form3() {
- uname = $_(3, "uname");
- pword = $_(3, "pword");
- checkACForm("singleuser5", "singlepass5");
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- // Check first entry
- doKey("down");
- checkACForm("", ""); // value shouldn't update
- doKey("return"); // not "enter"!
- yield promiseFormsProcessed();
- checkACForm("singleuser5", "singlepass5");
-});
-
-add_task(function* test_form4() {
- uname = $_(4, "uname");
- pword = $_(4, "pword");
- checkACForm("singleuser5", "singlepass5");
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- // Check first entry
- doKey("down");
- checkACForm("", ""); // value shouldn't update
- doKey("return"); // not "enter"!
- yield promiseFormsProcessed();
- checkACForm("singleuser5", "singlepass5");
-});
-
-add_task(function* test_form5() {
- uname = $_(5, "uname");
- pword = $_(5, "pword");
- checkACForm("singleuser5", "singlepass5");
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- // Check first entry
- doKey("down");
- checkACForm("", ""); // value shouldn't update
- doKey("return"); // not "enter"!
- yield promiseFormsProcessed();
- checkACForm("singleuser5", "singlepass5");
-});
-
-add_task(function* test_form6() {
- // (this is a control, w/o autocomplete=off, to ensure the login
- // that was being suppressed would have been filled in otherwise)
- uname = $_(6, "uname");
- pword = $_(6, "pword");
- checkACForm("singleuser5", "singlepass5");
-});
-
-add_task(function* test_form6_changeUsername() {
- // Test that the password field remains filled in after changing
- // the username.
- uname.focus();
- doKey("right");
- sendChar("X");
- // Trigger the 'blur' event on uname
- pword.focus();
- yield spinEventLoop();
- checkACForm("singleuser5X", "singlepass5");
-
- setupScript.sendSyncMessage("removeLogin", "login5");
-});
-
-add_task(function* test_form7() {
- uname = $_(7, "uname");
- pword = $_(7, "pword");
- checkACForm("", "");
-
- // Insert a new username field into the form. We'll then make sure
- // that invoking the autocomplete doesn't try to fill the form.
- var newField = document.createElement("input");
- newField.setAttribute("type", "text");
- newField.setAttribute("name", "uname2");
- pword.parentNode.insertBefore(newField, pword);
- is($_(7, "uname2").value, "", "Verifying empty uname2");
-
- // Delete login6B. It was created just to prevent filling in a login
- // automatically, removing it makes it more likely that we'll catch a
- // future regression with form filling here.
- setupScript.sendSyncMessage("removeLogin", "login6B");
-});
-
-add_task(function* test_form7_2() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- // Check first entry
- doKey("down");
- checkACForm("", ""); // value shouldn't update
- doKey("return"); // not "enter"!
- // The form changes, so we expect the old username field to get the
- // selected autocomplete value, but neither the new username field nor
- // the password field should have any values filled in.
- yield spinEventLoop();
- checkACForm("form7user1", "");
- is($_(7, "uname2").value, "", "Verifying empty uname2");
- restoreForm(); // clear field, so reloading test doesn't fail
-
- setupScript.sendSyncMessage("removeLogin", "login6A");
-});
-
-add_task(function* test_form8() {
- uname = $_(8, "uname");
- pword = $_(8, "pword");
- checkACForm("form8user", "form8pass");
- restoreForm();
-});
-
-add_task(function* test_form8_blur() {
- checkACForm("", "");
- // Focus the previous form to trigger a blur.
- $_(7, "uname").focus();
-});
-
-add_task(function* test_form8_2() {
- checkACForm("", "");
- restoreForm();
-});
-
-add_task(function* test_form8_3() {
- checkACForm("", "");
- setupScript.sendSyncMessage("removeLogin", "login7");
-});
-
-add_task(function* test_form9_filtering() {
- // Turn our attention to form9 to test the dropdown - bug 497541
- uname = $_(9, "uname");
- pword = $_(9, "pword");
- uname.focus();
- let shownPromise = promiseACShown();
- sendString("form9userAB");
- yield shownPromise;
-
- checkACForm("form9userAB", "");
- uname.focus();
- doKey("left");
- shownPromise = promiseACShown();
- sendChar("A");
- let results = yield shownPromise;
-
- checkACForm("form9userAAB", "");
- checkArrayValues(results, ["form9userAAB"], "Check dropdown is updated after inserting 'A'");
- doKey("down");
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("form9userAAB", "form9pass");
-});
-
-add_task(function* test_form9_autocomplete_cache() {
- // Note that this addLogin call will only be seen by the autocomplete
- // attempt for the sendChar if we do not successfully cache the
- // autocomplete results.
- setupScript.sendSyncMessage("addLogin", "login8C");
- uname.focus();
- let promise0 = notifyMenuChanged(0);
- sendChar("z");
- yield promise0;
- let popupState = yield getPopupState();
- is(popupState.open, false, "Check popup shouldn't open");
-
- // check that empty results are cached - bug 496466
- promise0 = notifyMenuChanged(0);
- sendChar("z");
- yield promise0;
- popupState = yield getPopupState();
- is(popupState.open, false, "Check popup stays closed due to cached empty result");
-});
-
-add_task(function* test_form11_recipes() {
- yield loadRecipes({
- siteRecipes: [{
- "hosts": ["mochi.test:8888"],
- "usernameSelector": "input[name='1']",
- "passwordSelector": "input[name='2']"
- }],
- });
- uname = $_(11, "1");
- pword = $_(11, "2");
-
- // First test DOMAutocomplete
- // Switch the password field to type=password so _fillForm marks the username
- // field for autocomplete.
- pword.type = "password";
- yield promiseFormsProcessed();
- restoreForm();
- checkACForm("", "");
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down");
- checkACForm("", ""); // value shouldn't update
- doKey("return"); // not "enter"!
- yield promiseFormsProcessed();
- checkACForm("testuser10", "testpass10");
-
- // Now test recipes with blur on the username field.
- restoreForm();
- checkACForm("", "");
- uname.value = "testuser10";
- checkACForm("testuser10", "");
- doKey("tab");
- yield promiseFormsProcessed();
- checkACForm("testuser10", "testpass10");
- yield resetRecipes();
-});
-
-add_task(function* test_form12_formless() {
- // Test form-less autocomplete
- uname = $_(12, "uname");
- pword = $_(12, "pword");
- restoreForm();
- checkACForm("", "");
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- // Trigger autocomplete
- doKey("down");
- checkACForm("", ""); // value shouldn't update
- let processedPromise = promiseFormsProcessed();
- doKey("return"); // not "enter"!
- yield processedPromise;
- checkACForm("testuser", "testpass");
-});
-
-add_task(function* test_form12_open_on_trusted_focus() {
- uname = $_(12, "uname");
- pword = $_(12, "pword");
- uname.value = "";
- pword.value = "";
-
- // Move focus to the password field so we can test the first click on the
- // username field.
- pword.focus();
- checkACForm("", "");
- const firePrivEventPromise = new Promise((resolve) => {
- uname.addEventListener("click", (e) => {
- ok(e.isTrusted, "Ensure event is trusted");
- resolve();
- });
- });
- const shownPromise = promiseACShown();
- synthesizeMouseAtCenter(uname, {});
- yield firePrivEventPromise;
- yield shownPromise;
- doKey("down");
- const processedPromise = promiseFormsProcessed();
- doKey("return"); // not "enter"!
- yield processedPromise;
- checkACForm("testuser", "testpass");
-});
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_html5.html b/toolkit/components/passwordmgr/test/mochitest/test_basic_form_html5.html
deleted file mode 100644
index 40e322afd7..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_html5.html
+++ /dev/null
@@ -1,164 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test for html5 input types (email, tel, url, etc.)</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Login Manager test: html5 input types (email, tel, url, etc.)
-<script>
-runChecksAfterCommonInit(() => startTest());
-
-runInParent(function setup() {
- const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
- let pwmgr = Cc["@mozilla.org/login-manager;1"].
- getService(Ci.nsILoginManager);
-
- login1 = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- login2 = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- login3 = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- login4 = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
-
- login1.init("http://mochi.test:8888", "http://bug600551-1", null,
- "testuser@example.com", "testpass1", "", "");
- login2.init("http://mochi.test:8888", "http://bug600551-2", null,
- "555-555-5555", "testpass2", "", "");
- login3.init("http://mochi.test:8888", "http://bug600551-3", null,
- "http://mozilla.org", "testpass3", "", "");
- login4.init("http://mochi.test:8888", "http://bug600551-4", null,
- "123456789", "testpass4", "", "");
-
- pwmgr.addLogin(login1);
- pwmgr.addLogin(login2);
- pwmgr.addLogin(login3);
- pwmgr.addLogin(login4);
-});
-</script>
-
-<p id="display"></p>
-<div id="content" style="display: none">
-
- <form id="form1" action="http://bug600551-1">
- <input type="email" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <form id="form2" action="http://bug600551-2">
- <input type="tel" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <form id="form3" action="http://bug600551-3">
- <input type="url" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <form id="form4" action="http://bug600551-4">
- <input type="number" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- The following forms should not be filled with usernames -->
- <form id="form5" action="formtest.js">
- <input type="search" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <form id="form6" action="formtest.js">
- <input type="datetime" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <form id="form7" action="formtest.js">
- <input type="date" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <form id="form8" action="formtest.js">
- <input type="month" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <form id="form9" action="formtest.js">
- <input type="week" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <form id="form10" action="formtest.js">
- <input type="time" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <form id="form11" action="formtest.js">
- <input type="datetime-local" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <form id="form12" action="formtest.js">
- <input type="range" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <form id="form13" action="formtest.js">
- <input type="color" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
-
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/* Test for Login Manager: 600551
- (Password manager not working with input type=email)
- */
-function startTest() {
- checkForm(1, "testuser@example.com", "testpass1");
- checkForm(2, "555-555-5555", "testpass2");
- checkForm(3, "http://mozilla.org", "testpass3");
- checkForm(4, "123456789", "testpass4");
-
- is($_(5, "uname").value, "", "type=search should not be considered a username");
-
- is($_(6, "uname").value, "", "type=datetime should not be considered a username");
-
- is($_(7, "uname").value, "", "type=date should not be considered a username");
-
- is($_(8, "uname").value, "", "type=month should not be considered a username");
-
- is($_(9, "uname").value, "", "type=week should not be considered a username");
-
- is($_(10, "uname").value, "", "type=time should not be considered a username");
-
- is($_(11, "uname").value, "", "type=datetime-local should not be considered a username");
-
- is($_(12, "uname").value, "50", "type=range should not be considered a username");
-
- is($_(13, "uname").value, "#000000", "type=color should not be considered a username");
-
- SimpleTest.finish();
-}
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_pwevent.html b/toolkit/components/passwordmgr/test/mochitest/test_basic_form_pwevent.html
deleted file mode 100644
index e0a2883c82..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_pwevent.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=355063
--->
-<head>
- <meta charset="utf-8"/>
- <title>Test for Bug 355063</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <script type="application/javascript">
- /** Test for Bug 355063 **/
-
- runChecksAfterCommonInit(function startTest() {
- info("startTest");
- // Password Manager's own listener should always have been added first, so
- // the test's listener should be called after the pwmgr's listener fills in
- // a login.
- //
- SpecialPowers.addChromeEventListener("DOMFormHasPassword", function eventFired() {
- SpecialPowers.removeChromeEventListener("DOMFormHasPassword", eventFired);
- var passField = $("p1");
- passField.addEventListener("input", checkForm);
- });
- addForm();
- });
-
- function addForm() {
- info("addForm");
- var c = document.getElementById("content");
- c.innerHTML = "<form id=form1>form1: <input id=u1><input type=password id=p1></form><br>";
- }
-
- function checkForm() {
- info("checkForm");
- var userField = document.getElementById("u1");
- var passField = document.getElementById("p1");
- is(userField.value, "testuser", "checking filled username");
- is(passField.value, "testpass", "checking filled password");
-
- SimpleTest.finish();
- }
-</script>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=355063">Mozilla Bug 355063</a>
-<p id="display"></p>
-<div id="content">
-forms go here!
-</div>
-<pre id="test">
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_pwonly.html b/toolkit/components/passwordmgr/test/mochitest/test_basic_form_pwonly.html
deleted file mode 100644
index 40fec8c462..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_pwonly.html
+++ /dev/null
@@ -1,213 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test forms and logins without a username</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Login Manager test: forms and logins without a username.
-<script>
-runChecksAfterCommonInit(() => startTest());
-runInParent(() => {
- const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
- var pwmgr = Cc["@mozilla.org/login-manager;1"]
- .getService(Ci.nsILoginManager);
-
- var nsLoginInfo = Components.Constructor("@mozilla.org/login-manager/loginInfo;1", Ci.nsILoginInfo);
-
- // pwlogin1 uses a unique formSubmitURL, to check forms where no other logins
- // will apply. pwlogin2 uses the normal formSubmitURL, so that we can test
- // forms with a mix of username and non-username logins that might apply.
- //
- // Note: pwlogin2 is deleted at the end of the test.
-
- pwlogin1 = new nsLoginInfo();
- pwlogin2 = new nsLoginInfo();
-
- pwlogin1.init("http://mochi.test:8888", "http://mochi.test:1111", null,
- "", "1234", "uname", "pword");
-
- pwlogin2.init("http://mochi.test:8888", "http://mochi.test:8888", null,
- "", "1234", "uname", "pword");
-
-
- pwmgr.addLogin(pwlogin1);
- pwmgr.addLogin(pwlogin2);
-});
-</script>
-<p id="display"></p>
-
-<div id="content" style="display: none">
-
-
-<!-- simple form: no username field, 1 password field -->
-<form id='form1' action='http://mochi.test:1111/formtest.js'> 1
- <input type='password' name='pname' value=''>
-
- <button type='submit'>Submit</button>
- <button type='reset'> Reset </button>
-</form>
-
-<!-- simple form: no username field, 2 password fields -->
-<form id='form2' action='http://mochi.test:1111/formtest.js'> 2
- <input type='password' name='pname1' value=''>
- <input type='password' name='pname2' value=''>
-
- <button type='submit'>Submit</button>
- <button type='reset'> Reset </button>
-</form>
-
-<!-- simple form: no username field, 3 password fields -->
-<form id='form3' action='http://mochi.test:1111/formtest.js'> 3
- <input type='password' name='pname1' value=''>
- <input type='password' name='pname2' value=''>
- <input type='password' name='pname3' value=''>
-
- <button type='submit'>Submit</button>
- <button type='reset'> Reset </button>
-</form>
-
-<!-- 4 password fields, should be ignored. -->
-<form id='form4' action='http://mochi.test:1111/formtest.js'> 4
- <input type='password' name='pname1' value=''>
- <input type='password' name='pname2' value=''>
- <input type='password' name='pname3' value=''>
- <input type='password' name='pname4' value=''>
-
- <button type='submit'>Submit</button>
- <button type='reset'> Reset </button>
-</form>
-
-
-
-<!-- 1 username field -->
-<form id='form5' action='http://mochi.test:1111/formtest.js'> 5
- <input type='text' name='uname' value=''>
- <input type='password' name='pname' value=''>
-
- <button type='submit'>Submit</button>
- <button type='reset'> Reset </button>
-</form>
-
-
-<!-- 1 username field, with a value set -->
-<form id='form6' action='http://mochi.test:1111/formtest.js'> 6
- <input type='text' name='uname' value='someuser'>
- <input type='password' name='pname' value=''>
-
- <button type='submit'>Submit</button>
- <button type='reset'> Reset </button>
-</form>
-
-
-
-<!--
-(The following forms have 2 potentially-matching logins, on is
-password-only, the other is username+password)
--->
-
-
-
-<!-- 1 username field, with value set. Fill in the matching U+P login -->
-<form id='form7' action='formtest.js'> 7
- <input type='text' name='uname' value='testuser'>
- <input type='password' name='pname' value=''>
-
- <button type='submit'>Submit</button>
- <button type='reset'> Reset </button>
-</form>
-
-<!-- 1 username field, with value set. Don't fill in U+P login-->
-<form id='form8' action='formtest.js'> 8
- <input type='text' name='uname' value='someuser'>
- <input type='password' name='pname' value=''>
-
- <button type='submit'>Submit</button>
- <button type='reset'> Reset </button>
-</form>
-
-
-
-<!-- 1 username field, too small for U+P login -->
-<form id='form9' action='formtest.js'> 9
- <input type='text' name='uname' value='' maxlength="4">
- <input type='password' name='pname' value=''>
-
- <button type='submit'>Submit</button>
- <button type='reset'> Reset </button>
-</form>
-
-<!-- 1 username field, too small for U+P login -->
-<form id='form10' action='formtest.js'> 10
- <input type='text' name='uname' value='' maxlength="0">
- <input type='password' name='pname' value=''>
-
- <button type='submit'>Submit</button>
- <button type='reset'> Reset </button>
-</form>
-
-<!-- 1 username field, too small for U+P login -->
-<form id='form11' action='formtest.js'> 11
- <input type='text' name='uname' value=''>
- <input type='password' name='pname' value='' maxlength="4">
-
- <button type='submit'>Submit</button>
- <button type='reset'> Reset </button>
-</form>
-
-<!-- 1 username field, too small for either login -->
-<form id='form12' action='formtest.js'> 12
- <input type='text' name='uname' value=''>
- <input type='password' name='pname' value='' maxlength="1">
-
- <button type='submit'>Submit</button>
- <button type='reset'> Reset </button>
-</form>
-
-<!-- 1 username field, too small for either login -->
-<form id='form13' action='formtest.js'> 13
- <input type='text' name='uname' value=''>
- <input type='password' name='pname' value='' maxlength="0">
-
- <button type='submit'>Submit</button>
- <button type='reset'> Reset </button>
-</form>
-
-
-
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Login Manager: password-only logins **/
-function startTest() {
-
- checkForm(1, "1234");
- checkForm(2, "1234", "");
- checkForm(3, "1234", "", "");
- checkUnmodifiedForm(4);
-
- checkForm(5, "", "1234");
- checkForm(6, "someuser", "");
-
- checkForm(7, "testuser", "testpass");
- checkForm(8, "someuser", "");
-
- checkForm(9, "", "1234");
- checkForm(10, "", "1234");
- checkForm(11, "", "1234");
-
- checkUnmodifiedForm(12);
- checkUnmodifiedForm(13);
-
- SimpleTest.finish();
-}
-</script>
-</pre>
-</body>
-</html>
-
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_bug_627616.html b/toolkit/components/passwordmgr/test/mochitest/test_bug_627616.html
deleted file mode 100644
index ad4a41cdb2..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_bug_627616.html
+++ /dev/null
@@ -1,145 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test bug 627616 related to proxy authentication</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<script class="testbody" type="text/javascript">
- SimpleTest.waitForExplicitFinish();
-
- var Ci = SpecialPowers.Ci;
-
- function makeXHR(expectedStatus, expectedText, extra) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", "authenticate.sjs?" +
- "proxy_user=proxy_user&" +
- "proxy_pass=proxy_pass&" +
- "proxy_realm=proxy_realm&" +
- "user=user1name&" +
- "pass=user1pass&" +
- "realm=mochirealm&" +
- extra || "");
- xhr.onloadend = function() {
- is(xhr.status, expectedStatus, "xhr.status");
- is(xhr.statusText, expectedText, "xhr.statusText");
- runNextTest();
- };
- return xhr;
- }
-
- function testNonAnonymousCredentials() {
- var xhr = makeXHR(200, "OK");
- xhr.send();
- }
-
- function testAnonymousCredentials() {
- // Test that an anonymous request correctly performs proxy authentication
- var xhr = makeXHR(401, "Authentication required");
- SpecialPowers.wrap(xhr).channel.loadFlags |= Ci.nsIChannel.LOAD_ANONYMOUS;
- xhr.send();
- }
-
- function testAnonymousNoAuth() {
- // Next, test that an anonymous request still does not include any non-proxy
- // authentication headers.
- var xhr = makeXHR(200, "Authorization header not found", "anonymous=1");
- SpecialPowers.wrap(xhr).channel.loadFlags |= Ci.nsIChannel.LOAD_ANONYMOUS;
- xhr.send();
- }
-
- var gExpectedDialogs = 0;
- var gCurrentTest;
- function runNextTest() {
- is(gExpectedDialogs, 0, "received expected number of auth dialogs");
- mm.sendAsyncMessage("prepareForNextTest");
- mm.addMessageListener("prepareForNextTestDone", function prepared(msg) {
- mm.removeMessageListener("prepareForNextTestDone", prepared);
- if (pendingTests.length > 0) {
- ({expectedDialogs: gExpectedDialogs,
- test: gCurrentTest} = pendingTests.shift());
- gCurrentTest.call(this);
- } else {
- mm.sendAsyncMessage("cleanup");
- mm.addMessageListener("cleanupDone", () => {
- // mm.destroy() is called as a cleanup function by runInParent(), no
- // need to do it here.
- SimpleTest.finish();
- });
- }
- });
- }
-
- var pendingTests = [{expectedDialogs: 2, test: testNonAnonymousCredentials},
- {expectedDialogs: 1, test: testAnonymousCredentials},
- {expectedDialogs: 0, test: testAnonymousNoAuth}];
-
- let mm = runInParent(() => {
- const { classes: parentCc, interfaces: parentCi, utils: parentCu } = Components;
-
- parentCu.import("resource://gre/modules/Services.jsm");
- parentCu.import("resource://gre/modules/NetUtil.jsm");
- parentCu.import("resource://gre/modules/Timer.jsm");
- parentCu.import("resource://gre/modules/XPCOMUtils.jsm");
-
- let channel = NetUtil.newChannel({
- uri: "http://example.com",
- loadUsingSystemPrincipal: true
- });
-
- let pps = parentCc["@mozilla.org/network/protocol-proxy-service;1"].
- getService(parentCi.nsIProtocolProxyService);
- pps.asyncResolve(channel, 0, {
- onProxyAvailable(req, uri, pi, status) {
- let mozproxy = "moz-proxy://" + pi.host + ":" + pi.port;
- let login = parentCc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(parentCi.nsILoginInfo);
- login.init(mozproxy, null, "proxy_realm", "proxy_user", "proxy_pass",
- "", "");
- Services.logins.addLogin(login);
-
- let login2 = parentCc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(parentCi.nsILoginInfo);
- login2.init("http://mochi.test:8888", null, "mochirealm", "user1name",
- "user1pass", "", "");
- Services.logins.addLogin(login2);
-
- sendAsyncMessage("setupDone");
- },
- QueryInterface: XPCOMUtils.generateQI([parentCi.nsIProtocolProxyCallback]),
- });
-
- addMessageListener("prepareForNextTest", message => {
- parentCc["@mozilla.org/network/http-auth-manager;1"].
- getService(parentCi.nsIHttpAuthManager).
- clearAll();
- sendAsyncMessage("prepareForNextTestDone");
- });
-
- let dialogObserverTopic = "common-dialog-loaded";
-
- function dialogObserver(subj, topic, data) {
- subj.Dialog.ui.prompt.document.documentElement.acceptDialog();
- sendAsyncMessage("promptAccepted");
- }
-
- Services.obs.addObserver(dialogObserver, dialogObserverTopic, false);
-
- addMessageListener("cleanup", message => {
- Services.obs.removeObserver(dialogObserver, dialogObserverTopic);
- sendAsyncMessage("cleanupDone");
- });
- });
-
- mm.addMessageListener("promptAccepted", msg => {
- gExpectedDialogs--;
- });
- mm.addMessageListener("setupDone", msg => {
- runNextTest();
- });
-</script>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_bug_776171.html b/toolkit/components/passwordmgr/test/mochitest/test_bug_776171.html
deleted file mode 100644
index 4ad08bee26..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_bug_776171.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=776171
--->
-<head>
- <meta charset="utf-8">
- <title>Test for Bug 776171 related to HTTP auth</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body onload="startTest()">
-<script class="testbody" type="text/javascript">
-
-/**
- * This test checks we correctly ignore authentication entry
- * for a subpath and use creds from the URL when provided when XHR
- * is used with filled user name and password.
- *
- * 1. connect auth2/authenticate.sjs that expects user1:pass1 password
- * 2. connect a dummy URL at the same path
- * 3. connect authenticate.sjs that again expects user1:pass1 password
- * in this case, however, we have an entry without an identity
- * for this path (that is a parent for auth2 path in the first step)
- */
-
-SimpleTest.waitForExplicitFinish();
-
-function doxhr(URL, user, pass, next) {
- var xhr = new XMLHttpRequest();
- if (user && pass)
- xhr.open("POST", URL, true, user, pass);
- else
- xhr.open("POST", URL, true);
- xhr.onload = function() {
- is(xhr.status, 200, "Got status 200");
- next();
- };
- xhr.onerror = function() {
- ok(false, "request passed");
- finishTest();
- };
- xhr.send();
-}
-
-function startTest() {
- doxhr("auth2/authenticate.sjs?user=user1&pass=pass1&realm=realm1", "user1", "pass1", function() {
- doxhr("auth2", null, null, function() {
- doxhr("authenticate.sjs?user=user1&pass=pass1&realm=realm1", "user1", "pass1", SimpleTest.finish);
- });
- });
-}
-</script>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_case_differences.html b/toolkit/components/passwordmgr/test/mochitest/test_case_differences.html
deleted file mode 100644
index 316f59da76..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_case_differences.html
+++ /dev/null
@@ -1,147 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test autocomplete due to multiple matching logins</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="satchel_common.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Login Manager test: autocomplete due to multiple matching logins
-
-<script>
-runChecksAfterCommonInit(false);
-
-SpecialPowers.loadChromeScript(function addLogins() {
- const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
- Cu.import("resource://gre/modules/Services.jsm");
-
- // Create some logins just for this form, since we'll be deleting them.
- var nsLoginInfo = Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
- Ci.nsILoginInfo, "init");
-
- var login0 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "name", "pass", "uname", "pword");
-
- var login1 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "Name", "Pass", "uname", "pword");
-
- var login2 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "USER", "PASS", "uname", "pword");
-
- try {
- Services.logins.addLogin(login0);
- Services.logins.addLogin(login1);
- Services.logins.addLogin(login2);
- } catch (e) {
- assert.ok(false, "addLogin threw: " + e);
- }
-});
-</script>
-<p id="display"></p>
-
-<!-- we presumably can't hide the content for this test. -->
-<div id="content">
-
- <!-- form1 tests multiple matching logins -->
- <form id="form1" action="http://autocomplete:8888/formtest.js" onsubmit="return false;">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Login Manager: autocomplete due to multiple matching logins **/
-
-var uname = $_(1, "uname");
-var pword = $_(1, "pword");
-
-// Restore the form to the default state.
-function restoreForm() {
- uname.value = "";
- pword.value = "";
- uname.focus();
-}
-
-// Check for expected username/password in form.
-function checkACForm(expectedUsername, expectedPassword) {
- var formID = uname.parentNode.id;
- is(uname.value, expectedUsername, "Checking " + formID + " username");
- is(pword.value, expectedPassword, "Checking " + formID + " password");
-}
-
-add_task(function* test_empty_first_entry() {
- /* test 1 */
- // Make sure initial form is empty.
- checkACForm("", "");
- // Trigger autocomplete popup
- restoreForm();
- let popupState = yield getPopupState();
- is(popupState.open, false, "Check popup is initially closed");
- let shownPromise = promiseACShown();
- doKey("down");
- let results = yield shownPromise;
- popupState = yield getPopupState();
- is(popupState.selectedIndex, -1, "Check no entries are selected");
- checkArrayValues(results, ["name", "Name", "USER"], "initial");
-
- // Check first entry
- let index0Promise = notifySelectedIndex(0);
- doKey("down");
- yield index0Promise;
- checkACForm("", ""); // value shouldn't update
- doKey("return"); // not "enter"!
- yield promiseFormsProcessed();
- checkACForm("name", "pass");
-});
-
-add_task(function* test_empty_second_entry() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
- doKey("down"); // first
- doKey("down"); // second
- doKey("return"); // not "enter"!
- yield promiseFormsProcessed();
- checkACForm("Name", "Pass");
-});
-
-add_task(function* test_empty_third_entry() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
- doKey("down"); // first
- doKey("down"); // second
- doKey("down"); // third
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("USER", "PASS");
-});
-
-add_task(function* test_preserve_matching_username_case() {
- restoreForm();
- uname.value = "user";
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- // Check that we don't clobber user-entered text when tabbing away
- // (even with no autocomplete entry selected)
- doKey("tab");
- yield promiseFormsProcessed();
- checkACForm("user", "PASS");
-});
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_form_action_1.html b/toolkit/components/passwordmgr/test/mochitest/test_form_action_1.html
deleted file mode 100644
index 430081b3ad..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_form_action_1.html
+++ /dev/null
@@ -1,137 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test for considering form action</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Login Manager test: Bug 360493
-<script>
-runChecksAfterCommonInit(() => startTest());
-</script>
-<p id="display"></p>
-<div id="content" style="display: none">
-
- <!-- normal form with normal relative action. -->
- <form id="form1" action="formtest.js">
- <input type="text" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- fully specify the action URL -->
- <form id="form2" action="http://mochi.test:8888/tests/toolkit/components/passwordmgr/test/formtest.js">
- <input type="text" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- fully specify the action URL, and change the path -->
- <form id="form3" action="http://mochi.test:8888/zomg/wtf/bbq/passwordmgr/test/formtest.js">
- <input type="text" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- fully specify the action URL, and change the path and filename -->
- <form id="form4" action="http://mochi.test:8888/zomg/wtf/bbq/passwordmgr/test/not_a_test.js">
- <input type="text" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- specify the action URL relative to the current document-->
- <form id="form5" action="./formtest.js">
- <input type="text" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- specify the action URL relative to the current server -->
- <form id="form6" action="/tests/toolkit/components/passwordmgr/test/formtest.js">
- <input type="text" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- Change the method from get to post -->
- <form id="form7" action="formtest.js" method="POST">
- <input type="text" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- Blank action URL specified -->
- <form id="form8" action="">
- <input type="text" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- |action| attribute entirely missing -->
- <form id="form9" >
- <input type="text" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- action url as javascript -->
- <form id="form10" action="javascript:alert('this form is not submitted so this alert should not be invoked');">
- <input type="text" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- TODO: action=IP.ADDRESS instead of HOSTNAME? -->
- <!-- TODO: test with |base href="http://othersite//"| ? -->
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Login Manager: 360493 (Cross-Site Forms + Password
- Manager = Security Failure) **/
-
-// This test is designed to make sure variations on the form's |action|
-// and |method| continue to work with the fix for 360493.
-
-function startTest() {
- for (var i = 1; i <= 9; i++) {
- // Check form i
- is($_(i, "uname").value, "testuser", "Checking for filled username " + i);
- is($_(i, "pword").value, "testpass", "Checking for filled password " + i);
- }
-
- // The login's formSubmitURL isn't "javascript:", so don't fill it in.
- isnot($_(10, "uname"), "testuser", "Checking username w/ JS action URL");
- isnot($_(10, "pword"), "testpass", "Checking password w/ JS action URL");
-
- SimpleTest.finish();
-}
-</script>
-</pre>
-</body>
-</html>
-
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_form_action_2.html b/toolkit/components/passwordmgr/test/mochitest/test_form_action_2.html
deleted file mode 100644
index 0f0056de01..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_form_action_2.html
+++ /dev/null
@@ -1,170 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test for considering form action</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Login Manager test: Bug 360493
-<script>
-runChecksAfterCommonInit(() => startTest());
-</script>
-<p id="display"></p>
-<div id="content" style="display: none">
-
- <!-- The tests in this page exercise things that shouldn't work. -->
-
- <!-- Change port # of action URL from 8888 to 7777 -->
- <form id="form1" action="http://localhost:7777/tests/toolkit/components/passwordmgr/test/formtest.js">
- <input type="text" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- No port # in action URL -->
- <form id="form2" action="http://localhost/tests/toolkit/components/passwordmgr/test/formtest.js">
- <input type="text" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- Change protocol from http:// to ftp://, include the expected 8888 port # -->
- <form id="form3" action="ftp://localhost:8888/tests/toolkit/components/passwordmgr/test/formtest.js">
- <input type="text" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- Change protocol from http:// to ftp://, no port # specified -->
- <form id="form4" action="ftp://localhost/tests/toolkit/components/passwordmgr/test/formtest.js">
- <input type="text" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- Try a weird URL. -->
- <form id="form5" action="about:blank">
- <input type="text" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- Try a weird URL. (If the normal embedded action URL doesn't work, that should mean other URLs won't either) -->
- <form id="form6" action="view-source:http://localhost:8888/tests/toolkit/components/passwordmgr/test/formtest.js">
- <input type="text" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- Try a weird URL. -->
- <form id="form7" action="view-source:formtest.js">
- <input type="text" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- Action URL points to a different host (this is the archetypical exploit) -->
- <form id="form8" action="http://www.cnn.com/">
- <input type="text" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- Action URL points to a different host, user field prefilled -->
- <form id="form9" action="http://www.cnn.com/">
- <input type="text" name="uname" value="testuser">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- Try wrapping a evil form around a good form, to see if we can confuse the parser. -->
- <form id="form10-A" action="http://www.cnn.com/">
- <form id="form10-B" action="formtest.js">
- <input type="text" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit (inner)</button>
- <button type="reset"> Reset (inner)</button>
- </form>
- <button type="submit" id="neutered_submit10">Submit (outer)</button>
- <button type="reset">Reset (outer)</button>
- </form>
-
- <!-- Try wrapping a good form around an evil form, to see if we can confuse the parser. -->
- <form id="form11-A" action="formtest.js">
- <form id="form11-B" action="http://www.cnn.com/">
- <input type="text" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit (inner)</button>
- <button type="reset"> Reset (inner)</button>
- </form>
- <button type="submit" id="neutered_submit11">Submit (outer)</button>
- <button type="reset">Reset (outer)</button>
- </form>
-
-<!-- TODO: probably should have some accounts which have no port # in the action url. JS too. And different host/proto. -->
-<!-- TODO: www.site.com vs. site.com? -->
-<!-- TODO: foo.site.com vs. bar.site.com? -->
-
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Login Manager: 360493 (Cross-Site Forms + Password Manager = Security Failure) **/
-
-function startTest() {
- for (var i = 1; i <= 8; i++) {
- // Check form i
- is($_(i, "uname").value, "", "Checking for unfilled username " + i);
- is($_(i, "pword").value, "", "Checking for unfilled password " + i);
- }
-
- is($_(9, "uname").value, "testuser", "Checking for unmodified username 9");
- is($_(9, "pword").value, "", "Checking for unfilled password 9");
-
- is($_("10-A", "uname").value, "", "Checking for unfilled username 10A");
- is($_("10-A", "pword").value, "", "Checking for unfilled password 10A");
-
- // The DOM indicates this form could be filled, as the evil inner form
- // is discarded. And yet pwmgr seems not to fill it. Not sure why.
- todo(false, "Mangled form combo not being filled when maybe it could be?");
- is($_("11-A", "uname").value, "testuser", "Checking filled username 11A");
- is($_("11-A", "pword").value, "testpass", "Checking filled password 11A");
-
- // Verify this by making sure there are no extra forms in the document, and
- // that the submit button for the neutered forms don't do anything.
- // If the test finds extra forms the submit() causes the test to timeout, then
- // there may be a security issue.
- is(document.forms.length, 11, "Checking for unexpected forms");
- $("neutered_submit10").click();
- $("neutered_submit11").click();
-
- SimpleTest.finish();
-}
-</script>
-</pre>
-</body>
-</html>
-
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_form_action_javascript.html b/toolkit/components/passwordmgr/test/mochitest/test_form_action_javascript.html
deleted file mode 100644
index d37e92c40c..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_form_action_javascript.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test forms with a JS submit action</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Login Manager test: form with JS submit action
-<script>
-runChecksAfterCommonInit(() => startTest());
-
-runInParent(function setup() {
- const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
- Cu.import("resource://gre/modules/Services.jsm");
-
- let jslogin = Cc["@mozilla.org/login-manager/loginInfo;1"].createInstance(Ci.nsILoginInfo);
- jslogin.init("http://mochi.test:8888", "javascript:", null,
- "jsuser", "jspass123", "uname", "pword");
- Services.logins.addLogin(jslogin);
-});
-
-/** Test for Login Manager: JS action URL **/
-
-function startTest() {
- checkForm(1, "jsuser", "jspass123");
-
- SimpleTest.finish();
-}
-</script>
-
-<p id="display"></p>
-
-<div id="content" style="display: none">
-
-
-<form id='form1' action='javascript:alert("never shows")'> 1
- <input name="uname">
- <input name="pword" type="password">
-
- <button type='submit'>Submit</button>
- <button type='reset'> Reset </button>
-</form>
-
-</div>
-
-<pre id="test"></pre>
-</body>
-</html>
-
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_formless_autofill.html b/toolkit/components/passwordmgr/test/mochitest/test_formless_autofill.html
deleted file mode 100644
index 6263c818da..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_formless_autofill.html
+++ /dev/null
@@ -1,147 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test autofilling of fields outside of a form</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<script type="application/javascript;version=1.8">
-let chromeScript = runInParent(SimpleTest.getTestFileURL("pwmgr_common.js"));
-
-document.addEventListener("DOMContentLoaded", () => {
- document.getElementById("loginFrame").addEventListener("load", (evt) => {
- // Tell the parent to setup test logins.
- chromeScript.sendAsyncMessage("setupParent", { selfFilling: true });
- });
-});
-
-let doneSetupPromise = new Promise(resolve => {
- // When the setup is done, load a recipe for this test.
- chromeScript.addMessageListener("doneSetup", function doneSetup() {
- resolve();
- });
-});
-
-add_task(function* setup() {
- info("Waiting for loads and setup");
- yield doneSetupPromise;
-
- yield loadRecipes({
- siteRecipes: [{
- hosts: ["mochi.test:8888"],
- usernameSelector: "input[name='recipeuname']",
- passwordSelector: "input[name='recipepword']",
- }],
- });
-});
-
-
-const DEFAULT_ORIGIN = "http://mochi.test:8888";
-const TESTCASES = [
- {
- // Inputs
- document: `<input type=password>`,
-
- // Expected outputs
- expectedInputValues: ["testpass"],
- },
- {
- document: `<input>
- <input type=password>`,
- expectedInputValues: ["testuser", "testpass"],
- },
- {
- document: `<input>
- <input type=password>
- <input type=password>`,
- expectedInputValues: ["testuser", "testpass", ""],
- },
- {
- document: `<input>
- <input type=password>
- <input type=password>
- <input type=password>`,
- expectedInputValues: ["testuser", "testpass", "", ""],
- },
- {
- document: `<input>
- <input type=password form="form1">
- <input type=password>
- <form id="form1">
- <input>
- <input type=password>
- </form>`,
- expectedFormCount: 2,
- expectedInputValues: ["testuser", "testpass", "testpass", "", ""],
- },
- {
- document: `<!-- formless password field selector recipe test -->
- <input>
- <input type=password>
- <input>
- <input type=password name="recipepword">`,
- expectedInputValues: ["", "", "testuser", "testpass"],
- },
- {
- document: `<!-- formless username and password field selector recipe test -->
- <input name="recipeuname">
- <input>
- <input type=password>
- <input type=password name="recipepword">`,
- expectedInputValues: ["testuser", "", "", "testpass"],
- },
- {
- document: `<!-- form and formless recipe field selector test -->
- <input name="recipeuname">
- <input>
- <input type=password form="form1"> <!-- not filled since recipe affects both FormLikes -->
- <input type=password>
- <input type=password name="recipepword">
- <form id="form1">
- <input>
- <input type=password>
- </form>`,
- expectedFormCount: 2,
- expectedInputValues: ["testuser", "", "", "", "testpass", "", ""],
- },
-];
-
-add_task(function* test() {
- let loginFrame = document.getElementById("loginFrame");
- let frameDoc = loginFrame.contentWindow.document;
-
- for (let tc of TESTCASES) {
- info("Starting testcase: " + JSON.stringify(tc));
-
- let numFormLikesExpected = tc.expectedFormCount || 1;
-
- let processedFormPromise = promiseFormsProcessed(numFormLikesExpected);
-
- frameDoc.documentElement.innerHTML = tc.document;
- info("waiting for " + numFormLikesExpected + " processed form(s)");
- yield processedFormPromise;
-
- let testInputs = frameDoc.documentElement.querySelectorAll("input");
- is(testInputs.length, tc.expectedInputValues.length, "Check number of inputs");
- for (let i = 0; i < tc.expectedInputValues.length; i++) {
- let expectedValue = tc.expectedInputValues[i];
- is(testInputs[i].value, expectedValue,
- "Check expected input value " + i + ": " + expectedValue);
- }
- }
-});
-
-</script>
-
-<p id="display"></p>
-
-<div id="content">
- <iframe id="loginFrame" src="http://mochi.test:8888/tests/toolkit/components/passwordmgr/test/blank.html"></iframe>
-</div>
-<pre id="test"></pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_formless_submit.html b/toolkit/components/passwordmgr/test/mochitest/test_formless_submit.html
deleted file mode 100644
index 468da1e7f5..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_formless_submit.html
+++ /dev/null
@@ -1,183 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test capturing of fields outside of a form</title>
- <script src="/tests/SimpleTest/SimpleTest.js"></script>
- <script src="/tests/SimpleTest/SpawnTask.js"></script>
- <script src="pwmgr_common.js"></script>
- <link rel="stylesheet" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<script type="application/javascript;version=1.8">
-const LMCBackstagePass = SpecialPowers.Cu.import("resource://gre/modules/LoginManagerContent.jsm");
-const { LoginManagerContent, LoginFormFactory } = LMCBackstagePass;
-
-let chromeScript = runInParent(SimpleTest.getTestFileURL("pwmgr_common.js"));
-
-let loadPromise = new Promise(resolve => {
- document.addEventListener("DOMContentLoaded", () => {
- document.getElementById("loginFrame").addEventListener("load", (evt) => {
- resolve();
- });
- });
-});
-
-add_task(function* setup() {
- info("Waiting for page and frame loads");
- yield loadPromise;
-
- yield loadRecipes({
- siteRecipes: [{
- hosts: ["mochi.test:8888"],
- usernameSelector: "input[name='recipeuname']",
- passwordSelector: "input[name='recipepword']",
- }],
- });
-});
-
-const DEFAULT_ORIGIN = "http://mochi.test:8888";
-const TESTCASES = [
- {
- // Inputs
- document: `<input type=password value="pass1">`,
- inputIndexForFormLike: 0,
-
- // Expected outputs similar to RemoteLogins:onFormSubmit
- hostname: DEFAULT_ORIGIN,
- formSubmitURL: DEFAULT_ORIGIN,
- usernameFieldValue: null,
- newPasswordFieldValue: "pass1",
- oldPasswordFieldValue: null,
- },
- {
- document: `<input value="user1">
- <input type=password value="pass1">`,
- inputIndexForFormLike: 0,
- hostname: DEFAULT_ORIGIN,
- formSubmitURL: DEFAULT_ORIGIN,
- usernameFieldValue: "user1",
- newPasswordFieldValue: "pass1",
- oldPasswordFieldValue: null,
- },
- {
- document: `<input value="user1">
- <input type=password value="pass1">`,
- inputIndexForFormLike: 1,
- hostname: DEFAULT_ORIGIN,
- formSubmitURL: DEFAULT_ORIGIN,
- usernameFieldValue: "user1",
- newPasswordFieldValue: "pass1",
- oldPasswordFieldValue: null,
- },
- {
- document: `<input value="user1">
- <input type=password value="pass1">
- <input type=password value="pass2">`,
- inputIndexForFormLike: 2,
- hostname: DEFAULT_ORIGIN,
- formSubmitURL: DEFAULT_ORIGIN,
- usernameFieldValue: "user1",
- newPasswordFieldValue: "pass2",
- oldPasswordFieldValue: "pass1",
- },
- {
- document: `<input value="user1">
- <input type=password value="pass1">
- <input type=password value="pass2">
- <input type=password value="pass2">`,
- inputIndexForFormLike: 3,
- hostname: DEFAULT_ORIGIN,
- formSubmitURL: DEFAULT_ORIGIN,
- usernameFieldValue: "user1",
- newPasswordFieldValue: "pass2",
- oldPasswordFieldValue: "pass1",
- },
- {
- document: `<input value="user1">
- <input type=password value="user2" form="form1">
- <input type=password value="pass1">
- <form id="form1">
- <input value="user3">
- <input type=password value="pass2">
- </form>`,
- inputIndexForFormLike: 2,
- hostname: DEFAULT_ORIGIN,
- formSubmitURL: DEFAULT_ORIGIN,
- usernameFieldValue: "user1",
- newPasswordFieldValue: "pass1",
- oldPasswordFieldValue: null,
- },
- {
- document: `<!-- recipe field override -->
- <input name="recipeuname" value="username from recipe">
- <input value="default field username">
- <input type=password value="pass1">
- <input name="recipepword" type=password value="pass2">`,
- inputIndexForFormLike: 2,
- hostname: DEFAULT_ORIGIN,
- formSubmitURL: DEFAULT_ORIGIN,
- usernameFieldValue: "username from recipe",
- newPasswordFieldValue: "pass2",
- oldPasswordFieldValue: null,
- },
-];
-
-function getSubmitMessage() {
- info("getSubmitMessage");
- return new Promise((resolve, reject) => {
- chromeScript.addMessageListener("formSubmissionProcessed", function processed(...args) {
- info("got formSubmissionProcessed");
- chromeScript.removeMessageListener("formSubmissionProcessed", processed);
- resolve(...args);
- });
- });
-}
-
-add_task(function* test() {
- let loginFrame = document.getElementById("loginFrame");
- let frameDoc = loginFrame.contentWindow.document;
-
- for (let tc of TESTCASES) {
- info("Starting testcase: " + JSON.stringify(tc));
- frameDoc.documentElement.innerHTML = tc.document;
- let inputForFormLike = frameDoc.querySelectorAll("input")[tc.inputIndexForFormLike];
-
- let formLike = LoginFormFactory.createFromField(inputForFormLike);
-
- info("Calling _onFormSubmit with FormLike");
- let processedPromise = getSubmitMessage();
- LoginManagerContent._onFormSubmit(formLike);
-
- let submittedResult = yield processedPromise;
-
- // Check data sent via RemoteLogins:onFormSubmit
- is(submittedResult.hostname, tc.hostname, "Check hostname");
- is(submittedResult.formSubmitURL, tc.formSubmitURL, "Check formSubmitURL");
-
- if (tc.usernameFieldValue === null) {
- is(submittedResult.usernameField, tc.usernameFieldValue, "Check usernameField");
- } else {
- is(submittedResult.usernameField.value, tc.usernameFieldValue, "Check usernameField");
- }
-
- is(submittedResult.newPasswordField.value, tc.newPasswordFieldValue, "Check newPasswordFieldValue");
-
- if (tc.oldPasswordFieldValue === null) {
- is(submittedResult.oldPasswordField, tc.oldPasswordFieldValue, "Check oldPasswordFieldValue");
- } else {
- is(submittedResult.oldPasswordField.value, tc.oldPasswordFieldValue, "Check oldPasswordFieldValue");
- }
- }
-});
-
-</script>
-
-<p id="display"></p>
-
-<div id="content">
- <iframe id="loginFrame" src="http://mochi.test:8888/tests/toolkit/components/passwordmgr/test/blank.html"></iframe>
-</div>
-<pre id="test"></pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_formless_submit_navigation.html b/toolkit/components/passwordmgr/test/mochitest/test_formless_submit_navigation.html
deleted file mode 100644
index b07d0886c9..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_formless_submit_navigation.html
+++ /dev/null
@@ -1,191 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test capturing of fields outside of a form due to navigation</title>
- <script src="/tests/SimpleTest/SimpleTest.js"></script>
- <script src="/tests/SimpleTest/SpawnTask.js"></script>
- <script src="pwmgr_common.js"></script>
- <link rel="stylesheet" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<script type="application/javascript;version=1.8">
-const LMCBackstagePass = SpecialPowers.Cu.import("resource://gre/modules/LoginManagerContent.jsm");
-const { LoginManagerContent, LoginFormFactory } = LMCBackstagePass;
-
-let chromeScript = runInParent(SimpleTest.getTestFileURL("pwmgr_common.js"));
-
-let loadPromise = new Promise(resolve => {
- document.addEventListener("DOMContentLoaded", () => {
- document.getElementById("loginFrame").addEventListener("load", (evt) => {
- resolve();
- });
- });
-});
-
-add_task(function* setup() {
- yield SpecialPowers.pushPrefEnv({
- set: [
- ["signon.formlessCapture.enabled", true],
- ],
- });
-
- info("Waiting for page and frame loads");
- yield loadPromise;
-
- yield loadRecipes({
- siteRecipes: [{
- hosts: ["test1.mochi.test:8888"],
- usernameSelector: "input[name='recipeuname']",
- passwordSelector: "input[name='recipepword']",
- }],
- });
-});
-
-const DEFAULT_ORIGIN = "http://test1.mochi.test:8888";
-const SCRIPTS = {
- PUSHSTATE: `history.pushState({}, "Pushed state", "?pushed");`,
- WINDOW_LOCATION: `window.location = "data:text/html;charset=utf-8,window.location";`,
-};
-const TESTCASES = [
- {
- // Inputs
- document: `<input type=password value="pass1">`,
-
- // Expected outputs similar to RemoteLogins:onFormSubmit
- hostname: DEFAULT_ORIGIN,
- formSubmitURL: DEFAULT_ORIGIN,
- usernameFieldValue: null,
- newPasswordFieldValue: "pass1",
- oldPasswordFieldValue: null,
- },
- {
- document: `<input value="user1">
- <input type=password value="pass1">`,
-
- hostname: DEFAULT_ORIGIN,
- formSubmitURL: DEFAULT_ORIGIN,
- usernameFieldValue: "user1",
- newPasswordFieldValue: "pass1",
- oldPasswordFieldValue: null,
- },
- {
- document: `<input value="user1">
- <input type=password value="pass1">
- <input type=password value="pass2">`,
-
- hostname: DEFAULT_ORIGIN,
- formSubmitURL: DEFAULT_ORIGIN,
- usernameFieldValue: "user1",
- newPasswordFieldValue: "pass2",
- oldPasswordFieldValue: "pass1",
- },
- {
- document: `<input value="user1">
- <input type=password value="pass1">
- <input type=password value="pass2">
- <input type=password value="pass2">`,
-
- hostname: DEFAULT_ORIGIN,
- formSubmitURL: DEFAULT_ORIGIN,
- usernameFieldValue: "user1",
- newPasswordFieldValue: "pass2",
- oldPasswordFieldValue: "pass1",
- },
- {
- document: `<input value="user1">
- <input type=password value="user2" form="form1">
- <input type=password value="pass1">
- <form id="form1">
- <input value="user3">
- <input type=password value="pass2">
- </form>`,
-
- hostname: DEFAULT_ORIGIN,
- formSubmitURL: DEFAULT_ORIGIN,
- usernameFieldValue: "user1",
- newPasswordFieldValue: "pass1",
- oldPasswordFieldValue: null,
- },
- {
- document: `<!-- recipe field override -->
- <input name="recipeuname" value="username from recipe">
- <input value="default field username">
- <input type=password value="pass1">
- <input name="recipepword" type=password value="pass2">`,
-
- hostname: DEFAULT_ORIGIN,
- formSubmitURL: DEFAULT_ORIGIN,
- usernameFieldValue: "username from recipe",
- newPasswordFieldValue: "pass2",
- oldPasswordFieldValue: null,
- },
-];
-
-function getSubmitMessage() {
- info("getSubmitMessage");
- return new Promise((resolve, reject) => {
- chromeScript.addMessageListener("formSubmissionProcessed", function processed(...args) {
- info("got formSubmissionProcessed");
- chromeScript.removeMessageListener("formSubmissionProcessed", processed);
- resolve(...args);
- });
- });
-}
-
-add_task(function* test() {
- let loginFrame = document.getElementById("loginFrame");
-
- for (let tc of TESTCASES) {
- for (let scriptName of Object.keys(SCRIPTS)) {
- info("Starting testcase with script " + scriptName + ": " + JSON.stringify(tc));
- let loadedPromise = new Promise((resolve) => {
- loginFrame.addEventListener("load", function frameLoaded() {
- loginFrame.removeEventListener("load", frameLoaded);
- resolve();
- });
- });
- loginFrame.src = DEFAULT_ORIGIN + "/tests/toolkit/components/passwordmgr/test/mochitest/blank.html";
- yield loadedPromise;
-
- let frameDoc = SpecialPowers.wrap(loginFrame.contentWindow).document;
- frameDoc.documentElement.innerHTML = tc.document;
- // Wait for the form to be processed before trying to submit.
- yield promiseFormsProcessed();
- let processedPromise = getSubmitMessage();
- info("Running " + scriptName + " script to cause a submission");
- frameDoc.defaultView.eval(SCRIPTS[scriptName]);
-
- let submittedResult = yield processedPromise;
-
- // Check data sent via RemoteLogins:onFormSubmit
- is(submittedResult.hostname, tc.hostname, "Check hostname");
- is(submittedResult.formSubmitURL, tc.formSubmitURL, "Check formSubmitURL");
-
- if (tc.usernameFieldValue === null) {
- is(submittedResult.usernameField, tc.usernameFieldValue, "Check usernameField");
- } else {
- is(submittedResult.usernameField.value, tc.usernameFieldValue, "Check usernameField");
- }
-
- is(submittedResult.newPasswordField.value, tc.newPasswordFieldValue, "Check newPasswordFieldValue");
-
- if (tc.oldPasswordFieldValue === null) {
- is(submittedResult.oldPasswordField, tc.oldPasswordFieldValue, "Check oldPasswordFieldValue");
- } else {
- is(submittedResult.oldPasswordField.value, tc.oldPasswordFieldValue, "Check oldPasswordFieldValue");
- }
- }
- }
-});
-
-</script>
-
-<p id="display"></p>
-
-<div id="content">
- <iframe id="loginFrame" src="http://test1.mochi.test:8888/tests/toolkit/components/passwordmgr/test/mochitest/blank.html"></iframe>
-</div>
-<pre id="test"></pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_formless_submit_navigation_negative.html b/toolkit/components/passwordmgr/test/mochitest/test_formless_submit_navigation_negative.html
deleted file mode 100644
index 4283f128c2..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_formless_submit_navigation_negative.html
+++ /dev/null
@@ -1,121 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test no capturing of fields outside of a form due to navigation</title>
- <script src="/tests/SimpleTest/SimpleTest.js"></script>
- <script src="/tests/SimpleTest/SpawnTask.js"></script>
- <script src="pwmgr_common.js"></script>
- <link rel="stylesheet" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<script type="application/javascript;version=1.8">
-const LMCBackstagePass = SpecialPowers.Cu.import("resource://gre/modules/LoginManagerContent.jsm");
-const { LoginManagerContent, LoginFormFactory } = LMCBackstagePass;
-
-SimpleTest.requestFlakyTimeout("Testing that a message doesn't arrive");
-
-let chromeScript = runInParent(SimpleTest.getTestFileURL("pwmgr_common.js"));
-
-let loadPromise = new Promise(resolve => {
- document.addEventListener("DOMContentLoaded", () => {
- document.getElementById("loginFrame").addEventListener("load", (evt) => {
- resolve();
- });
- });
-});
-
-function submissionProcessed(...args) {
- ok(false, "No formSubmissionProcessed should occur in this test");
- info("got: " + JSON.stringify(args));
-}
-
-add_task(function* setup() {
- yield SpecialPowers.pushPrefEnv({
- set: [
- ["signon.formlessCapture.enabled", true],
- ],
- });
-
- info("Waiting for page and frame loads");
- yield loadPromise;
-
- chromeScript.addMessageListener("formSubmissionProcessed", submissionProcessed);
-
- SimpleTest.registerCleanupFunction(() => {
- chromeScript.removeMessageListener("formSubmissionProcessed", submissionProcessed);
- });
-});
-
-const DEFAULT_ORIGIN = "http://test1.mochi.test:8888";
-const SCRIPTS = {
- PUSHSTATE: `history.pushState({}, "Pushed state", "?pushed");`,
- WINDOW_LOCATION: `window.location = "data:text/html;charset=utf-8,window.location";`,
- WINDOW_LOCATION_RELOAD: `window.location.reload();`,
- HISTORY_BACK: `history.back();`,
- HISTORY_GO_MINUS1: `history.go(-1);`,
-};
-const TESTCASES = [
- // Begin test cases that shouldn't trigger capture.
- {
- // For now we don't trigger upon navigation if <form> is used.
- document: `<form><input type=password value="pass1"></form>`,
- },
- {
- // Empty password field
- document: `<input type=password value="">`,
- },
- {
- // Test with an input that would normally be captured but with SCRIPTS that
- // shouldn't trigger capture.
- document: `<input type=password value="pass2">`,
- wouldCapture: true,
- },
-];
-
-add_task(function* test() {
- let loginFrame = document.getElementById("loginFrame");
-
- for (let tc of TESTCASES) {
- for (let scriptName of Object.keys(SCRIPTS)) {
- if (tc.wouldCapture && ["PUSHSTATE", "WINDOW_LOCATION"].includes(scriptName)) {
- // Don't run scripts that should actually capture for this testcase.
- continue;
- }
-
- info("Starting testcase with script " + scriptName + ": " + JSON.stringify(tc));
- let loadedPromise = new Promise((resolve) => {
- loginFrame.addEventListener("load", function frameLoaded() {
- loginFrame.removeEventListener("load", frameLoaded);
- resolve();
- });
- });
- loginFrame.src = DEFAULT_ORIGIN + "/tests/toolkit/components/passwordmgr/test/mochitest/blank.html";
- yield loadedPromise;
-
- let frameDoc = SpecialPowers.wrap(loginFrame.contentWindow).document;
- frameDoc.documentElement.innerHTML = tc.document;
-
- // Wait for the form to be processed before trying to submit.
- yield promiseFormsProcessed();
-
- info("Running " + scriptName + " script to check for a submission");
- frameDoc.defaultView.eval(SCRIPTS[scriptName]);
-
- // Wait for 5000ms to see if the promise above resolves.
- yield new Promise(resolve => setTimeout(resolve, 5000));
- ok(true, "Done waiting for captures");
- }
- }
-});
-
-</script>
-
-<p id="display"></p>
-
-<div id="content">
- <iframe id="loginFrame" src="http://test1.mochi.test:8888/tests/toolkit/components/passwordmgr/test/mochitest/blank.html"></iframe>
-</div>
-<pre id="test"></pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_input_events.html b/toolkit/components/passwordmgr/test/mochitest/test_input_events.html
deleted file mode 100644
index 0e77956d87..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_input_events.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test for input events in Login Manager</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body onload="onNewEvent(event)">
-Login Manager test: input events should fire.
-
-<script>
-runChecksAfterCommonInit();
-
-SimpleTest.requestFlakyTimeout("untriaged");
-
-/** Test for Login Manager: form fill, should get input events. **/
-
-var usernameInputFired = false;
-var passwordInputFired = false;
-var usernameChangeFired = false;
-var passwordChangeFired = false;
-var onloadFired = false;
-
-function onNewEvent(e) {
- info("Got " + e.type + " event.");
- if (e.type == "load") {
- onloadFired = true;
- } else if (e.type == "input") {
- if (e.target.name == "uname") {
- is(e.target.value, "testuser", "Should get 'testuser' as username");
- ok(!usernameInputFired, "Should not have gotten an input event for the username field yet.");
- usernameInputFired = true;
- } else if (e.target.name == "pword") {
- is(e.target.value, "testpass", "Should get 'testpass' as password");
- ok(!passwordInputFired, "Should not have gotten an input event for the password field yet.");
- passwordInputFired = true;
- }
- } else if (e.type == "change") {
- if (e.target.name == "uname") {
- is(e.target.value, "testuser", "Should get 'testuser' as username");
- ok(usernameInputFired, "Should get input event before change event for username field.");
- ok(!usernameChangeFired, "Should not have gotten a change event for the username field yet.");
- usernameChangeFired = true;
- } else if (e.target.name == "pword") {
- is(e.target.value, "testpass", "Should get 'testpass' as password");
- ok(passwordInputFired, "Should get input event before change event for password field.");
- ok(!passwordChangeFired, "Should not have gotten a change event for the password field yet.");
- passwordChangeFired = true;
- }
- }
- if (onloadFired && usernameInputFired && passwordInputFired && usernameChangeFired && passwordChangeFired) {
- ok(true, "All events fired as expected, we're done.");
- SimpleTest.finish();
- }
-}
-
-SimpleTest.registerCleanupFunction(function cleanup() {
- clearTimeout(timeout);
- $_(1, "uname").removeAttribute("oninput");
- $_(1, "pword").removeAttribute("oninput");
- $_(1, "uname").removeAttribute("onchange");
- $_(1, "pword").removeAttribute("onchange");
- document.body.removeAttribute("onload");
-});
-
-var timeout = setTimeout(function() {
- ok(usernameInputFired, "Username input event should have fired by now.");
- ok(passwordInputFired, "Password input event should have fired by now.");
- ok(usernameChangeFired, "Username change event should have fired by now.");
- ok(passwordChangeFired, "Password change event should have fired by now.");
- ok(onloadFired, "Window load event should have fired by now.");
- ok(false, "Not all events fired yet.");
- SimpleTest.finish();
-}, 10000);
-
-</script>
-
-<p id="display"></p>
-
-<div id="content" style="display: none">
-
- <form id="form1" action="formtest.js">
- <p>This is form 1.</p>
- <input type="text" name="uname" oninput="onNewEvent(event)" onchange="onNewEvent(event)">
- <input type="password" name="pword" oninput="onNewEvent(event)" onchange="onNewEvent(event)">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
-</div>
-<pre id="test"></pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_input_events_for_identical_values.html b/toolkit/components/passwordmgr/test/mochitest/test_input_events_for_identical_values.html
deleted file mode 100644
index d058a87f98..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_input_events_for_identical_values.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test for input events in Login Manager when username/password are filled in already</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body onload="onNewEvent(event)">
-Login Manager test: input events should fire.
-
-<script>
-runChecksAfterCommonInit();
-
-SimpleTest.requestFlakyTimeout("untriaged");
-
-/** Test for Login Manager: form fill when form is already filled, should not get input events. **/
-
-var onloadFired = false;
-
-function onNewEvent(e) {
- console.error("Got " + e.type + " event.");
- if (e.type == "load") {
- onloadFired = true;
- $_(1, "uname").focus();
- sendKey("Tab");
- } else {
- ok(false, "Got an input event for " + e.target.name + " field, which shouldn't happen.");
- }
-}
-</script>
-
-<p id="display"></p>
-
-<div id="content">
-
- <form id="form1" action="formtest.js">
- <p>This is form 1.</p>
- <input type="text" name="uname" oninput="onNewEvent(event)" value="testuser">
- <input type="password" name="pword" oninput="onNewEvent(event)" onfocus="setTimeout(function() { SimpleTest.finish() }, 1000);" value="testpass">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
-</div>
-<pre id="test"></pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_insecure_form_field_autocomplete.html b/toolkit/components/passwordmgr/test/mochitest/test_insecure_form_field_autocomplete.html
deleted file mode 100644
index c5d0a44fa8..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_insecure_form_field_autocomplete.html
+++ /dev/null
@@ -1,861 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test insecure form field autocomplete</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="satchel_common.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-
-<script>
-var chromeScript = runChecksAfterCommonInit();
-
-var setupScript = runInParent(function setup() {
- const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
- Cu.import("resource://gre/modules/Services.jsm");
-
- // Create some logins just for this form, since we'll be deleting them.
- var nsLoginInfo = Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
- Ci.nsILoginInfo, "init");
- assert.ok(nsLoginInfo != null, "nsLoginInfo constructor");
-
- // login0 has no username, so should be filtered out from the autocomplete list.
- var login0 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "", "user0pass", "", "pword");
-
- var login1 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "tempuser1", "temppass1", "uname", "pword");
-
- var login2 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "testuser2", "testpass2", "uname", "pword");
-
- var login3 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "testuser3", "testpass3", "uname", "pword");
-
- var login4 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "zzzuser4", "zzzpass4", "uname", "pword");
-
- // login 5 only used in the single-user forms
- var login5 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete2", null,
- "singleuser5", "singlepass5", "uname", "pword");
-
- var login6A = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete3", null,
- "form7user1", "form7pass1", "uname", "pword");
- var login6B = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete3", null,
- "form7user2", "form7pass2", "uname", "pword");
-
- var login7 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete4", null,
- "form8user", "form8pass", "uname", "pword");
-
- var login8A = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete5", null,
- "form9userAB", "form9pass", "uname", "pword");
- var login8B = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete5", null,
- "form9userAAB", "form9pass", "uname", "pword");
- var login8C = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete5", null,
- "form9userAABzz", "form9pass", "uname", "pword");
-
- var login10 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete7", null,
- "testuser10", "testpass10", "uname", "pword");
-
-
- // try/catch in case someone runs the tests manually, twice.
- try {
- Services.logins.addLogin(login0);
- Services.logins.addLogin(login1);
- Services.logins.addLogin(login2);
- Services.logins.addLogin(login3);
- Services.logins.addLogin(login4);
- Services.logins.addLogin(login5);
- Services.logins.addLogin(login6A);
- Services.logins.addLogin(login6B);
- Services.logins.addLogin(login7);
- Services.logins.addLogin(login8A);
- Services.logins.addLogin(login8B);
- // login8C is added later
- Services.logins.addLogin(login10);
- } catch (e) {
- assert.ok(false, "addLogin threw: " + e);
- }
-
- addMessageListener("addLogin", loginVariableName => {
- let login = eval(loginVariableName);
- assert.ok(!!login, "Login to add is defined: " + loginVariableName);
- Services.logins.addLogin(login);
- });
- addMessageListener("removeLogin", loginVariableName => {
- let login = eval(loginVariableName);
- assert.ok(!!login, "Login to delete is defined: " + loginVariableName);
- Services.logins.removeLogin(login);
- });
-});
-</script>
-<p id="display"></p>
-
-<!-- we presumably can't hide the content for this test. -->
-<div id="content">
-
- <!-- form1 tests multiple matching logins -->
- <form id="form1" action="http://autocomplete:8888/formtest.js" onsubmit="return false;">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- other forms test single logins, with autocomplete=off set -->
- <form id="form2" action="http://autocomplete2" onsubmit="return false;">
- <input type="text" name="uname">
- <input type="password" name="pword" autocomplete="off">
- <button type="submit">Submit</button>
- </form>
-
- <form id="form3" action="http://autocomplete2" onsubmit="return false;">
- <input type="text" name="uname" autocomplete="off">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <form id="form4" action="http://autocomplete2" onsubmit="return false;" autocomplete="off">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <form id="form5" action="http://autocomplete2" onsubmit="return false;">
- <input type="text" name="uname" autocomplete="off">
- <input type="password" name="pword" autocomplete="off">
- <button type="submit">Submit</button>
- </form>
-
- <!-- control -->
- <form id="form6" action="http://autocomplete2" onsubmit="return false;">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- This form will be manipulated to insert a different username field. -->
- <form id="form7" action="http://autocomplete3" onsubmit="return false;">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- test for no autofill after onblur with blank username -->
- <form id="form8" action="http://autocomplete4" onsubmit="return false;">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- test autocomplete dropdown -->
- <form id="form9" action="http://autocomplete5" onsubmit="return false;">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- test for onUsernameInput recipe testing -->
- <form id="form11" action="http://autocomplete7" onsubmit="return false;">
- <input type="text" name="1">
- <input type="text" name="2">
- <button type="submit">Submit</button>
- </form>
-
- <!-- tests <form>-less autocomplete -->
- <div id="form12">
- <input type="text" name="uname" id="uname">
- <input type="password" name="pword" id="pword">
- <button type="submit">Submit</button>
- </div>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Login Manager: multiple login autocomplete. **/
-
-var uname = $_(1, "uname");
-var pword = $_(1, "pword");
-const shiftModifier = SpecialPowers.Ci.nsIDOMEvent.SHIFT_MASK;
-
-// Restore the form to the default state.
-function restoreForm() {
- uname.value = "";
- pword.value = "";
- uname.focus();
-}
-
-// Check for expected username/password in form.
-function checkACForm(expectedUsername, expectedPassword) {
- var formID = uname.parentNode.id;
- is(uname.value, expectedUsername, "Checking " + formID + " username is: " + expectedUsername);
- is(pword.value, expectedPassword, "Checking " + formID + " password is: " + expectedPassword);
-}
-
-function sendFakeAutocompleteEvent(element) {
- var acEvent = document.createEvent("HTMLEvents");
- acEvent.initEvent("DOMAutoComplete", true, false);
- element.dispatchEvent(acEvent);
-}
-
-function spinEventLoop() {
- return Promise.resolve();
-}
-
-add_task(function* setup() {
- yield SpecialPowers.pushPrefEnv({"set": [["security.insecure_field_warning.contextual.enabled", true],
- ["signon.autofillForms.http", true]]});
- listenForUnexpectedPopupShown();
-});
-
-add_task(function* test_form1_initial_empty() {
- yield SimpleTest.promiseFocus(window);
-
- // Make sure initial form is empty.
- checkACForm("", "");
- let popupState = yield getPopupState();
- is(popupState.open, false, "Check popup is initially closed");
-});
-
-add_task(function* test_form1_warning_entry() {
- yield SimpleTest.promiseFocus(window);
- // Trigger autocomplete popup
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- let results = yield shownPromise;
-
- let popupState = yield getPopupState();
- is(popupState.selectedIndex, -1, "Check no entries are selected upon opening");
-
- let expectedMenuItems = ["This connection is not secure. Logins entered here could be compromised. Learn More",
- "tempuser1",
- "testuser2",
- "testuser3",
- "zzzuser4"];
- checkArrayValues(results, expectedMenuItems, "Check all menuitems are displayed correctly.");
-
- doKey("down"); // select insecure warning
- checkACForm("", ""); // value shouldn't update just by selecting
- doKey("return"); // not "enter"!
- yield spinEventLoop(); // let focus happen
- checkACForm("", "");
-});
-
-add_task(function* test_form1_first_entry() {
- yield SimpleTest.promiseFocus(window);
- // Trigger autocomplete popup
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- let popupState = yield getPopupState();
- is(popupState.selectedIndex, -1, "Check no entries are selected upon opening");
-
- doKey("down"); // skip insecure warning
- doKey("down"); // first
- checkACForm("", ""); // value shouldn't update just by selecting
- doKey("return"); // not "enter"!
- yield promiseFormsProcessed();
- checkACForm("tempuser1", "temppass1");
-});
-
-add_task(function* test_form1_second_entry() {
- // Trigger autocomplete popup
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // skip insecure warning
- doKey("down"); // first
- doKey("down"); // second
- doKey("return"); // not "enter"!
- yield promiseFormsProcessed();
- checkACForm("testuser2", "testpass2");
-});
-
-add_task(function* test_form1_third_entry() {
- // Trigger autocomplete popup
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // skip insecure warning
- doKey("down"); // first
- doKey("down"); // second
- doKey("down"); // third
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("testuser3", "testpass3");
-});
-
-add_task(function* test_form1_fourth_entry() {
- // Trigger autocomplete popup
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // skip insecure warning
- doKey("down"); // first
- doKey("down"); // second
- doKey("down"); // third
- doKey("down"); // fourth
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("zzzuser4", "zzzpass4");
-});
-
-add_task(function* test_form1_wraparound_first_entry() {
- // Trigger autocomplete popup
- restoreForm();
- yield spinEventLoop(); // let focus happen
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // skip insecure warning
- doKey("down"); // first
- doKey("down"); // second
- doKey("down"); // third
- doKey("down"); // fourth
- doKey("down"); // deselects
- doKey("down"); // skip insecure warning
- doKey("down"); // first
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("tempuser1", "temppass1");
-});
-
-add_task(function* test_form1_wraparound_up_last_entry() {
- // Trigger autocomplete popup
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("up"); // last (fourth)
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("zzzuser4", "zzzpass4");
-});
-
-add_task(function* test_form1_wraparound_down_up_up() {
- // Trigger autocomplete popup
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // select first entry
- doKey("up"); // selects nothing!
- doKey("up"); // select last entry
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("zzzuser4", "zzzpass4");
-});
-
-add_task(function* test_form1_wraparound_up_last() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down");
- doKey("up"); // deselects
- doKey("up"); // last entry
- doKey("up");
- doKey("up");
- doKey("up"); // skip insecure warning
- doKey("up"); // first entry
- doKey("up"); // deselects
- doKey("up"); // last entry
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("zzzuser4", "zzzpass4");
-});
-
-add_task(function* test_form1_fill_username_without_autofill_right() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- // Set first entry w/o triggering autocomplete
- doKey("down"); // skip insecure warning
- doKey("down"); // first
- doKey("right");
- yield spinEventLoop();
- checkACForm("tempuser1", ""); // empty password
-});
-
-add_task(function* test_form1_fill_username_without_autofill_left() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- // Set first entry w/o triggering autocomplete
- doKey("down"); // skip insecure warning
- doKey("down"); // first
- doKey("left");
- checkACForm("tempuser1", ""); // empty password
-});
-
-add_task(function* test_form1_pageup_first() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- // Check first entry (page up)
- doKey("down"); // first
- doKey("down"); // second
- doKey("page_up"); // first
- doKey("down"); // skip insecure warning
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("tempuser1", "temppass1");
-});
-
-add_task(function* test_form1_pagedown_last() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- // test 13
- // Check last entry (page down)
- doKey("down"); // first
- doKey("page_down"); // last
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("zzzuser4", "zzzpass4");
-});
-
-add_task(function* test_form1_untrusted_event() {
- restoreForm();
- yield spinEventLoop();
-
- // Send a fake (untrusted) event.
- checkACForm("", "");
- uname.value = "zzzuser4";
- sendFakeAutocompleteEvent(uname);
- yield spinEventLoop();
- checkACForm("zzzuser4", "");
-});
-
-add_task(function* test_form1_delete() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- // XXX tried sending character "t" before/during dropdown to test
- // filtering, but had no luck. Seemed like the character was getting lost.
- // Setting uname.value didn't seem to work either. This works with a human
- // driver, so I'm not sure what's up.
-
- doKey("down"); // skip insecure warning
- // Delete the first entry (of 4), "tempuser1"
- doKey("down");
- var numLogins;
- numLogins = LoginManager.countLogins("http://mochi.test:8888", "http://autocomplete:8888", null);
- is(numLogins, 5, "Correct number of logins before deleting one");
-
- let countChangedPromise = notifyMenuChanged(4);
- var deletionPromise = promiseStorageChanged(["removeLogin"]);
- // On OS X, shift-backspace and shift-delete work, just delete does not.
- // On Win/Linux, shift-backspace does not work, delete and shift-delete do.
- doKey("delete", shiftModifier);
- yield deletionPromise;
-
- checkACForm("", "");
- numLogins = LoginManager.countLogins("http://mochi.test:8888", "http://autocomplete:8888", null);
- is(numLogins, 4, "Correct number of logins after deleting one");
- yield countChangedPromise;
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("testuser2", "testpass2");
-});
-
-add_task(function* test_form1_first_after_deletion() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // skip insecure warning
- // Check the new first entry (of 3)
- doKey("down");
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("testuser2", "testpass2");
-});
-
-add_task(function* test_form1_delete_second() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // skip insecure warning
- // Delete the second entry (of 3), "testuser3"
- doKey("down");
- doKey("down");
- doKey("delete", shiftModifier);
- checkACForm("", "");
- numLogins = LoginManager.countLogins("http://mochi.test:8888", "http://autocomplete:8888", null);
- is(numLogins, 3, "Correct number of logins after deleting one");
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("zzzuser4", "zzzpass4");
-});
-
-add_task(function* test_form1_first_after_deletion2() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // skip insecure warning
- // Check the new first entry (of 2)
- doKey("down");
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("testuser2", "testpass2");
-});
-
-add_task(function* test_form1_delete_last() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // skip insecure warning
- // test 54
- // Delete the last entry (of 2), "zzzuser4"
- doKey("down");
- doKey("down");
- doKey("delete", shiftModifier);
- checkACForm("", "");
- numLogins = LoginManager.countLogins("http://mochi.test:8888", "http://autocomplete:8888", null);
- is(numLogins, 2, "Correct number of logins after deleting one");
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("testuser2", "testpass2");
-});
-
-add_task(function* test_form1_first_after_3_deletions() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // skip insecure warning
- // Check the only remaining entry
- doKey("down");
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("testuser2", "testpass2");
-});
-
-add_task(function* test_form1_check_only_entry_remaining() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // skip insecure warning
- // test 56
- // Delete the only remaining entry, "testuser2"
- doKey("down");
- doKey("delete", shiftModifier);
- checkACForm("", "");
- numLogins = LoginManager.countLogins("http://mochi.test:8888", "http://autocomplete:8888", null);
- is(numLogins, 1, "Correct number of logins after deleting one");
-
- // remove the login that's not shown in the list.
- setupScript.sendSyncMessage("removeLogin", "login0");
-});
-
-// Tests for single-user forms for ignoring autocomplete=off
-add_task(function* test_form2() {
- // Turn our attention to form2
- uname = $_(2, "uname");
- pword = $_(2, "pword");
- checkACForm("singleuser5", "singlepass5");
-
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // skip insecure warning
- // Check first entry
- doKey("down");
- checkACForm("", ""); // value shouldn't update
- doKey("return"); // not "enter"!
- yield promiseFormsProcessed();
- checkACForm("singleuser5", "singlepass5");
-});
-
-add_task(function* test_form3() {
- uname = $_(3, "uname");
- pword = $_(3, "pword");
- checkACForm("singleuser5", "singlepass5");
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // skip insecure warning
- // Check first entry
- doKey("down");
- checkACForm("", ""); // value shouldn't update
- doKey("return"); // not "enter"!
- yield promiseFormsProcessed();
- checkACForm("singleuser5", "singlepass5");
-});
-
-add_task(function* test_form4() {
- uname = $_(4, "uname");
- pword = $_(4, "pword");
- checkACForm("singleuser5", "singlepass5");
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // skip insecure warning
- // Check first entry
- doKey("down");
- checkACForm("", ""); // value shouldn't update
- doKey("return"); // not "enter"!
- yield promiseFormsProcessed();
- checkACForm("singleuser5", "singlepass5");
-});
-
-add_task(function* test_form5() {
- uname = $_(5, "uname");
- pword = $_(5, "pword");
- checkACForm("singleuser5", "singlepass5");
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // skip insecure warning
- // Check first entry
- doKey("down");
- checkACForm("", ""); // value shouldn't update
- doKey("return"); // not "enter"!
- yield promiseFormsProcessed();
- checkACForm("singleuser5", "singlepass5");
-});
-
-add_task(function* test_form6() {
- // (this is a control, w/o autocomplete=off, to ensure the login
- // that was being suppressed would have been filled in otherwise)
- uname = $_(6, "uname");
- pword = $_(6, "pword");
- checkACForm("singleuser5", "singlepass5");
-});
-
-add_task(function* test_form6_changeUsername() {
- // Test that the password field remains filled in after changing
- // the username.
- uname.focus();
- doKey("right");
- sendChar("X");
- // Trigger the 'blur' event on uname
- pword.focus();
- yield spinEventLoop();
- checkACForm("singleuser5X", "singlepass5");
-
- setupScript.sendSyncMessage("removeLogin", "login5");
-});
-
-add_task(function* test_form7() {
- uname = $_(7, "uname");
- pword = $_(7, "pword");
- checkACForm("", "");
-
- // Insert a new username field into the form. We'll then make sure
- // that invoking the autocomplete doesn't try to fill the form.
- var newField = document.createElement("input");
- newField.setAttribute("type", "text");
- newField.setAttribute("name", "uname2");
- pword.parentNode.insertBefore(newField, pword);
- is($_(7, "uname2").value, "", "Verifying empty uname2");
-
- // Delete login6B. It was created just to prevent filling in a login
- // automatically, removing it makes it more likely that we'll catch a
- // future regression with form filling here.
- setupScript.sendSyncMessage("removeLogin", "login6B");
-});
-
-add_task(function* test_form7_2() {
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // skip insecure warning
- // Check first entry
- doKey("down");
- checkACForm("", ""); // value shouldn't update
- doKey("return"); // not "enter"!
- // The form changes, so we expect the old username field to get the
- // selected autocomplete value, but neither the new username field nor
- // the password field should have any values filled in.
- yield spinEventLoop();
- checkACForm("form7user1", "");
- is($_(7, "uname2").value, "", "Verifying empty uname2");
- restoreForm(); // clear field, so reloading test doesn't fail
-
- setupScript.sendSyncMessage("removeLogin", "login6A");
-});
-
-add_task(function* test_form8() {
- uname = $_(8, "uname");
- pword = $_(8, "pword");
- checkACForm("form8user", "form8pass");
- restoreForm();
-});
-
-add_task(function* test_form8_blur() {
- checkACForm("", "");
- // Focus the previous form to trigger a blur.
- $_(7, "uname").focus();
-});
-
-add_task(function* test_form8_2() {
- checkACForm("", "");
- restoreForm();
-});
-
-add_task(function* test_form8_3() {
- checkACForm("", "");
- setupScript.sendSyncMessage("removeLogin", "login7");
-});
-
-add_task(function* test_form9_filtering() {
- // Turn our attention to form9 to test the dropdown - bug 497541
- uname = $_(9, "uname");
- pword = $_(9, "pword");
- uname.focus();
- let shownPromise = promiseACShown();
- sendString("form9userAB");
- yield shownPromise;
-
- checkACForm("form9userAB", "");
- uname.focus();
- doKey("left");
- shownPromise = promiseACShown();
- sendChar("A");
- let results = yield shownPromise;
-
- checkACForm("form9userAAB", "");
- checkArrayValues(results, ["This connection is not secure. Logins entered here could be compromised. Learn More", "form9userAAB"],
- "Check dropdown is updated after inserting 'A'");
- doKey("down"); // skip insecure warning
- doKey("down");
- doKey("return");
- yield promiseFormsProcessed();
- checkACForm("form9userAAB", "form9pass");
-});
-
-add_task(function* test_form9_autocomplete_cache() {
- // Note that this addLogin call will only be seen by the autocomplete
- // attempt for the sendChar if we do not successfully cache the
- // autocomplete results.
- setupScript.sendSyncMessage("addLogin", "login8C");
- uname.focus();
- let promise0 = notifyMenuChanged(1);
- let shownPromise = promiseACShown();
- sendChar("z");
- yield promise0;
- yield shownPromise;
- let popupState = yield getPopupState();
- is(popupState.open, true, "Check popup should open");
-
- // check that empty results are cached - bug 496466
- promise0 = notifyMenuChanged(1);
- sendChar("z");
- yield promise0;
- popupState = yield getPopupState();
- is(popupState.open, true, "Check popup stays opened due to cached empty result");
-});
-
-add_task(function* test_form11_recipes() {
- yield loadRecipes({
- siteRecipes: [{
- "hosts": ["mochi.test:8888"],
- "usernameSelector": "input[name='1']",
- "passwordSelector": "input[name='2']"
- }],
- });
- uname = $_(11, "1");
- pword = $_(11, "2");
-
- // First test DOMAutocomplete
- // Switch the password field to type=password so _fillForm marks the username
- // field for autocomplete.
- pword.type = "password";
- yield promiseFormsProcessed();
- restoreForm();
- checkACForm("", "");
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // skip insecure warning
- doKey("down");
- checkACForm("", ""); // value shouldn't update
- doKey("return"); // not "enter"!
- yield promiseFormsProcessed();
- checkACForm("testuser10", "testpass10");
-
- // Now test recipes with blur on the username field.
- restoreForm();
- checkACForm("", "");
- uname.value = "testuser10";
- checkACForm("testuser10", "");
- doKey("tab");
- yield promiseFormsProcessed();
- checkACForm("testuser10", "testpass10");
- yield resetRecipes();
-});
-
-add_task(function* test_form12_formless() {
- // Test form-less autocomplete
- uname = $_(12, "uname");
- pword = $_(12, "pword");
- restoreForm();
- checkACForm("", "");
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- doKey("down"); // skip insecure warning
- // Trigger autocomplete
- doKey("down");
- checkACForm("", ""); // value shouldn't update
- let processedPromise = promiseFormsProcessed();
- doKey("return"); // not "enter"!
- yield processedPromise;
- checkACForm("testuser", "testpass");
-});
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_insecure_form_field_no_saved_login.html b/toolkit/components/passwordmgr/test/mochitest/test_insecure_form_field_no_saved_login.html
deleted file mode 100644
index c3a894958a..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_insecure_form_field_no_saved_login.html
+++ /dev/null
@@ -1,103 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test basic login, contextual inscure password warning without saved logins</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="satchel_common.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Login Manager test: contextual inscure password warning without saved logins
-
-<script>
-let chromeScript = runChecksAfterCommonInit();
-</script>
-<p id="display"></p>
-
-<!-- we presumably can't hide the content for this test. -->
-<div id="content">
-
- <form id="form1" action="http://autocomplete:8888/formtest.js" onsubmit="return false;">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Login Manager: contextual inscure password warning without saved logins. **/
-
-// Set to pref before the document loads.
-SpecialPowers.setBoolPref(
- "security.insecure_field_warning.contextual.enabled", true);
-
-SimpleTest.registerCleanupFunction(() => {
- SpecialPowers.clearUserPref(
- "security.insecure_field_warning.contextual.enabled");
-});
-
-let uname = $_(1, "uname");
-let pword = $_(1, "pword");
-const shiftModifier = SpecialPowers.Ci.nsIDOMEvent.SHIFT_MASK;
-
-// Restore the form to the default state.
-function restoreForm() {
- uname.value = "";
- pword.value = "";
- uname.focus();
-}
-
-// Check for expected username/password in form.
-function checkACForm(expectedUsername, expectedPassword) {
- let formID = uname.parentNode.id;
- is(uname.value, expectedUsername, "Checking " + formID + " username is: " + expectedUsername);
- is(pword.value, expectedPassword, "Checking " + formID + " password is: " + expectedPassword);
-}
-
-function spinEventLoop() {
- return Promise.resolve();
-}
-
-add_task(function* setup() {
- listenForUnexpectedPopupShown();
-});
-
-add_task(function* test_form1_initial_empty() {
- yield SimpleTest.promiseFocus(window);
-
- // Make sure initial form is empty.
- checkACForm("", "");
- let popupState = yield getPopupState();
- is(popupState.open, false, "Check popup is initially closed");
-});
-
-add_task(function* test_form1_warning_entry() {
- yield SimpleTest.promiseFocus(window);
- // Trigger autocomplete popup
- restoreForm();
- let shownPromise = promiseACShown();
- doKey("down"); // open
- yield shownPromise;
-
- let popupState = yield getPopupState();
- is(popupState.open, true, "Check popup is opened");
- is(popupState.selectedIndex, -1, "Check no entries are selected upon opening");
-
- doKey("down"); // select insecure warning
- checkACForm("", ""); // value shouldn't update just by selecting
- doKey("return"); // not "enter"!
- yield spinEventLoop(); // let focus happen
- checkACForm("", "");
-});
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_maxlength.html b/toolkit/components/passwordmgr/test/mochitest/test_maxlength.html
deleted file mode 100644
index 2b6da33ec2..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_maxlength.html
+++ /dev/null
@@ -1,137 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test for maxlength attributes</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Login Manager test: Bug 391514
-<script>
-runChecksAfterCommonInit(() => startTest());
-</script>
-<p id="display"></p>
-<div id="content" style="display: none">
- <!-- normal form. -->
- <form id="form1" action="formtest.js">
- <input type="text" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- limited username -->
- <form id="form2" action="formtest.js">
- <input type="text" name="uname" maxlength="4">
- <input type="password" name="pword">
- </form>
-
- <!-- limited password -->
- <form id="form3" action="formtest.js">
- <input type="text" name="uname">
- <input type="password" name="pword" maxlength="4">
- </form>
-
- <!-- limited username and password -->
- <form id="form4" action="formtest.js">
- <input type="text" name="uname" maxlength="4">
- <input type="password" name="pword" maxlength="4">
- </form>
-
-
- <!-- limited username -->
- <form id="form5" action="formtest.js">
- <input type="text" name="uname" maxlength="0">
- <input type="password" name="pword">
- </form>
-
- <!-- limited password -->
- <form id="form6" action="formtest.js">
- <input type="text" name="uname">
- <input type="password" name="pword" maxlength="0">
- </form>
-
- <!-- limited username and password -->
- <form id="form7" action="formtest.js">
- <input type="text" name="uname" maxlength="0">
- <input type="password" name="pword" maxlength="0">
- </form>
-
-
- <!-- limited, but ok, username -->
- <form id="form8" action="formtest.js">
- <input type="text" name="uname" maxlength="999">
- <input type="password" name="pword">
- </form>
-
- <!-- limited, but ok, password -->
- <form id="form9" action="formtest.js">
- <input type="text" name="uname">
- <input type="password" name="pword" maxlength="999">
- </form>
-
- <!-- limited, but ok, username and password -->
- <form id="form10" action="formtest.js">
- <input type="text" name="uname" maxlength="999">
- <input type="password" name="pword" maxlength="999">
- </form>
-
-
- <!-- limited, but ok, username -->
- <!-- (note that filled values are exactly 8 characters) -->
- <form id="form11" action="formtest.js">
- <input type="text" name="uname" maxlength="8">
- <input type="password" name="pword">
- </form>
-
- <!-- limited, but ok, password -->
- <!-- (note that filled values are exactly 8 characters) -->
- <form id="form12" action="formtest.js">
- <input type="text" name="uname">
- <input type="password" name="pword" maxlength="8">
- </form>
-
- <!-- limited, but ok, username and password -->
- <!-- (note that filled values are exactly 8 characters) -->
- <form id="form13" action="formtest.js">
- <input type="text" name="uname" maxlength="8">
- <input type="password" name="pword" maxlength="8">
- </form>
-
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/* Test for Login Manager: 391514 (Login Manager gets confused with
- * password/PIN on usaa.com)
- */
-
-function startTest() {
- var i;
-
- is($_(1, "uname").value, "testuser", "Checking for filled username 1");
- is($_(1, "pword").value, "testpass", "Checking for filled password 1");
-
- for (i = 2; i < 8; i++) {
- is($_(i, "uname").value, "", "Checking for unfilled username " + i);
- is($_(i, "pword").value, "", "Checking for unfilled password " + i);
- }
-
- for (i = 8; i < 14; i++) {
- is($_(i, "uname").value, "testuser", "Checking for filled username " + i);
- is($_(i, "pword").value, "testpass", "Checking for filled password " + i);
- }
-
- // Note that tests 11-13 are limited to exactly the expected value.
- // Assert this lest someone change the login we're testing with.
- is($_(11, "uname").value.length, 8, "asserting test assumption is valid.");
-
- SimpleTest.finish();
-}
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_password_field_autocomplete.html b/toolkit/components/passwordmgr/test/mochitest/test_password_field_autocomplete.html
deleted file mode 100644
index 443c8a5e9e..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_password_field_autocomplete.html
+++ /dev/null
@@ -1,291 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test basic login autocomplete</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="satchel_common.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Login Manager test: multiple login autocomplete
-
-<script>
-var chromeScript = runChecksAfterCommonInit();
-
-var setupScript = runInParent(function setup() {
- const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
- Cu.import("resource://gre/modules/Services.jsm");
-
- // Create some logins just for this form, since we'll be deleting them.
- var nsLoginInfo = Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
- Ci.nsILoginInfo, "init");
- assert.ok(nsLoginInfo != null, "nsLoginInfo constructor");
-
- // login0 has no username, so should be filtered out from the autocomplete list.
- var login0 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "", "user0pass", "", "pword");
-
- var login1 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "tempuser1", "temppass1", "uname", "pword");
-
- var login2 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "testuser2", "testpass2", "uname", "pword");
-
- var login3 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "testuser3", "testpass3", "uname", "pword");
-
- var login4 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "zzzuser4", "zzzpass4", "uname", "pword");
-
-
- // try/catch in case someone runs the tests manually, twice.
- try {
- Services.logins.addLogin(login0);
- Services.logins.addLogin(login1);
- Services.logins.addLogin(login2);
- Services.logins.addLogin(login3);
- Services.logins.addLogin(login4);
- } catch (e) {
- assert.ok(false, "addLogin threw: " + e);
- }
-
- addMessageListener("addLogin", loginVariableName => {
- let login = eval(loginVariableName);
- assert.ok(!!login, "Login to add is defined: " + loginVariableName);
- Services.logins.addLogin(login);
- });
- addMessageListener("removeLogin", loginVariableName => {
- let login = eval(loginVariableName);
- assert.ok(!!login, "Login to delete is defined: " + loginVariableName);
- Services.logins.removeLogin(login);
- });
-});
-</script>
-<p id="display"></p>
-
-<!-- we presumably can't hide the content for this test. -->
-<div id="content">
-
- <!-- form1 tests multiple matching logins -->
- <form id="form1" action="http://autocomplete:8888/formtest.js" onsubmit="return false;">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <form id="form2" action="http://autocomplete:8888/formtest.js" onsubmit="return false;">
- <input type="text" name="uname">
- <input type="password" name="pword" readonly="true">
- <button type="submit">Submit</button>
- </form>
-
- <form id="form3" action="http://autocomplete:8888/formtest.js" onsubmit="return false;">
- <input type="text" name="uname">
- <input type="password" name="pword" disabled="true">
- <button type="submit">Submit</button>
- </form>
-
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Login Manager: multiple login autocomplete. **/
-
-var uname = $_(1, "uname");
-var pword = $_(1, "pword");
-const shiftModifier = SpecialPowers.Ci.nsIDOMEvent.SHIFT_MASK;
-
-// Restore the form to the default state.
-function* reinitializeForm(index) {
- // Using innerHTML is for creating the autocomplete popup again, so the
- // preference value will be applied to the constructor of
- // UserAutoCompleteResult.
- let form = document.getElementById("form" + index);
- let temp = form.innerHTML;
- form.innerHTML = "";
- form.innerHTML = temp;
-
- yield new Promise(resolve => {
- let observer = SpecialPowers.wrapCallback(() => {
- SpecialPowers.removeObserver(observer, "passwordmgr-processed-form");
- resolve();
- });
- SpecialPowers.addObserver(observer, "passwordmgr-processed-form", false);
- });
-
- yield SimpleTest.promiseFocus(window);
-
- uname = $_(index, "uname");
- pword = $_(index, "pword");
- uname.value = "";
- pword.value = "";
- pword.focus();
-}
-
-function generateDateString(date) {
- let dateAndTimeFormatter = new Intl.DateTimeFormat(undefined,
- { day: "numeric", month: "short", year: "numeric" });
- return dateAndTimeFormatter.format(date);
-}
-
-const DATE_NOW_STRING = generateDateString(new Date());
-
-// Check for expected username/password in form.
-function checkACFormPasswordField(expectedPassword) {
- var formID = uname.parentNode.id;
- is(pword.value, expectedPassword, "Checking " + formID + " password is: " + expectedPassword);
-}
-
-function spinEventLoop() {
- return Promise.resolve();
-}
-
-add_task(function* setup() {
- listenForUnexpectedPopupShown();
-});
-
-add_task(function* test_form1_initial_empty() {
- yield SimpleTest.promiseFocus(window);
-
- // Make sure initial form is empty.
- checkACFormPasswordField("");
- let popupState = yield getPopupState();
- is(popupState.open, false, "Check popup is initially closed");
-});
-
-add_task(function* test_form2_password_readonly() {
- yield SpecialPowers.pushPrefEnv({"set": [
- ["security.insecure_field_warning.contextual.enabled", true],
- ["signon.autofillForms.http", true]
- ]});
- yield reinitializeForm(2);
-
- // Trigger autocomplete popup
- doKey("down"); // open
- let popupState = yield getPopupState();
- is(popupState.open, false, "Check popup is closed for a readonly field.");
-});
-
-add_task(function* test_form3_password_disabled() {
- yield SpecialPowers.pushPrefEnv({"set": [
- ["security.insecure_field_warning.contextual.enabled", true],
- ["signon.autofillForms.http", true]
- ]});
- yield reinitializeForm(3);
-
- // Trigger autocomplete popup
- doKey("down"); // open
- let popupState = yield getPopupState();
- is(popupState.open, false, "Check popup is closed for a disabled field.");
-});
-
-add_task(function* test_form1_enabledInsecureFieldWarning_enabledInsecureAutoFillForm() {
- yield SpecialPowers.pushPrefEnv({"set": [
- ["security.insecure_field_warning.contextual.enabled", true],
- ["signon.autofillForms.http", true]
- ]});
- yield reinitializeForm(1);
- // Trigger autocomplete popup
- let shownPromise = promiseACShown();
- doKey("down"); // open
- let results = yield shownPromise;
-
- let popupState = yield getPopupState();
- is(popupState.selectedIndex, -1, "Check no entries are selected upon opening");
-
- let expectedMenuItems = ["This connection is not secure. Logins entered here could be compromised. Learn More",
- "No username (" + DATE_NOW_STRING + ")",
- "tempuser1",
- "testuser2",
- "testuser3",
- "zzzuser4"];
- checkArrayValues(results, expectedMenuItems, "Check all menuitems are displayed correctly.");
-
- doKey("down"); // select insecure warning
- checkACFormPasswordField(""); // value shouldn't update just by selecting
- doKey("return"); // not "enter"!
- yield spinEventLoop(); // let focus happen
- checkACFormPasswordField("");
-});
-
-add_task(function* test_form1_disabledInsecureFieldWarning_enabledInsecureAutoFillForm() {
- yield SpecialPowers.pushPrefEnv({"set": [
- ["security.insecure_field_warning.contextual.enabled", false],
- ["signon.autofillForms.http", true]
- ]});
- yield reinitializeForm(1);
-
- // Trigger autocomplete popup
- let shownPromise = promiseACShown();
- doKey("down"); // open
- let results = yield shownPromise;
-
- let popupState = yield getPopupState();
- is(popupState.selectedIndex, -1, "Check no entries are selected upon opening");
-
- let expectedMenuItems = ["No username (" + DATE_NOW_STRING + ")",
- "tempuser1",
- "testuser2",
- "testuser3",
- "zzzuser4"];
- checkArrayValues(results, expectedMenuItems, "Check all menuitems are displayed correctly.");
-
- doKey("down"); // select first item
- checkACFormPasswordField(""); // value shouldn't update just by selecting
- doKey("return"); // not "enter"!
- yield spinEventLoop(); // let focus happen
- checkACFormPasswordField("user0pass");
-});
-
-add_task(function* test_form1_enabledInsecureFieldWarning_disabledInsecureAutoFillForm() {
- yield SpecialPowers.pushPrefEnv({"set": [
- ["security.insecure_field_warning.contextual.enabled", true],
- ["signon.autofillForms.http", false]
- ]});
- yield reinitializeForm(1);
-
- // Trigger autocomplete popup
- let shownPromise = promiseACShown();
- doKey("down"); // open
- let results = yield shownPromise;
-
- let popupState = yield getPopupState();
- is(popupState.selectedIndex, -1, "Check no entries are selected upon opening");
-
- let expectedMenuItems = ["This connection is not secure. Logins entered here could be compromised. Learn More",
- "No username (" + DATE_NOW_STRING + ")",
- "tempuser1",
- "testuser2",
- "testuser3",
- "zzzuser4"];
- checkArrayValues(results, expectedMenuItems, "Check all menuitems are displayed correctly.");
-
- doKey("down"); // select insecure warning
- checkACFormPasswordField(""); // value shouldn't update just by selecting
- doKey("return"); // not "enter"!
- yield spinEventLoop(); // let focus happen
- checkACFormPasswordField("");
-});
-
-add_task(function* test_form1_disabledInsecureFieldWarning_disabledInsecureAutoFillForm() {
- yield SpecialPowers.pushPrefEnv({"set": [
- ["security.insecure_field_warning.contextual.enabled", false],
- ["signon.autofillForms.http", false]
- ]});
- yield reinitializeForm(1);
-
- // Trigger autocomplete popup
- doKey("down"); // open
- let popupState = yield getPopupState();
- is(popupState.open, false, "Check popup is closed with no AutoFillForms.");
-});
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_passwords_in_type_password.html b/toolkit/components/passwordmgr/test/mochitest/test_passwords_in_type_password.html
deleted file mode 100644
index e107cebe60..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_passwords_in_type_password.html
+++ /dev/null
@@ -1,122 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test that passwords only get filled in type=password</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Login Manager test: Bug 242956
-<script>
-runChecksAfterCommonInit(() => startTest());
-</script>
-<p id="display"></p>
-<div id="content" style="display: none">
- <!-- pword is not a type=password input -->
- <form id="form1" action="formtest.js">
- <input type="text" name="uname">
- <input type="text" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- uname is not a type=text input -->
- <form id="form2" action="formtest.js">
- <input type="password" name="uname">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- two "pword" inputs, (text + password) -->
- <form id="form3" action="formtest.js">
- <input type="text" name="uname">
- <input type="text" name="pword">
- <input type="password" name="qword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- same thing, different order -->
- <form id="form4" action="formtest.js">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <input type="text" name="qword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- uname is not a type=text input (try a checkbox just for variety) -->
- <form id="form5" action="formtest.js">
- <input type="checkbox" name="uname" value="">
- <input type="password" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- pword is not a type=password input (try a checkbox just for variety) -->
- <form id="form6" action="formtest.js">
- <input type="text" name="uname">
- <input type="checkbox" name="pword" value="">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
- <!-- pword is not a type=password input -->
- <form id="form7" action="formtest.js">
- <input type="text" name="uname" value="testuser">
- <input type="text" name="pword">
-
- <button type="submit">Submit</button>
- <button type="reset"> Reset </button>
- </form>
-
-
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Login Manager: 242956 (Stored password is inserted into a
- readable text input on a second page) **/
-
-// Make sure that pwmgr only puts passwords into type=password <input>s.
-// Might as well test the converse, too (username in password field).
-
-function startTest() {
- is($_(1, "uname").value, "", "Checking for unfilled username 1");
- is($_(1, "pword").value, "", "Checking for unfilled password 1");
-
- is($_(2, "uname").value, "testpass", "Checking for password not username 2");
- is($_(2, "pword").value, "", "Checking for unfilled password 2");
-
- is($_(3, "uname").value, "", "Checking for unfilled username 3");
- is($_(3, "pword").value, "testuser", "Checking for unfilled password 3");
- is($_(3, "qword").value, "testpass", "Checking for unfilled qassword 3");
-
- is($_(4, "uname").value, "testuser", "Checking for password not username 4");
- is($_(4, "pword").value, "testpass", "Checking for unfilled password 4");
- is($_(4, "qword").value, "", "Checking for unfilled qassword 4");
-
- is($_(5, "uname").value, "", "Checking for unfilled username 5");
- is($_(5, "pword").value, "testpass", "Checking for filled password 5");
-
- is($_(6, "uname").value, "", "Checking for unfilled username 6");
- is($_(6, "pword").value, "", "Checking for unfilled password 6");
-
- is($_(7, "uname").value, "testuser", "Checking for unmodified username 7");
- is($_(7, "pword").value, "", "Checking for unfilled password 7");
-
- SimpleTest.finish();
-}
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_prompt.html b/toolkit/components/passwordmgr/test/mochitest/test_prompt.html
deleted file mode 100644
index 1050ab66b3..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_prompt.html
+++ /dev/null
@@ -1,705 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test prompter.{prompt,promptPassword,promptUsernameAndPassword}</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <script type="text/javascript" src="prompt_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-
-<div id="content" style="display: none">
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-var state, action;
-var uname = { value: null };
-var pword = { value: null };
-var result = { value: null };
-var isOk;
-
-// Force parent to not look for tab-modal prompts, as they're not used for auth prompts.
-isTabModal = false;
-
-let prompterParent = runInParent(() => {
- const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
- const promptFac = Cc["@mozilla.org/passwordmanager/authpromptfactory;1"].
- getService(Ci.nsIPromptFactory);
-
- Cu.import("resource://gre/modules/Services.jsm");
- let chromeWin = Services.wm.getMostRecentWindow("navigator:browser");
- let prompter1 = promptFac.getPrompt(chromeWin, Ci.nsIAuthPrompt);
-
- addMessageListener("proxyPrompter", function onMessage(msg) {
- let rv = prompter1[msg.methodName](...msg.args);
- return {
- rv,
- // Send the args back to content so out/inout args can be checked.
- args: msg.args,
- };
- });
-});
-
-let prompter1 = new PrompterProxy(prompterParent);
-
-const defaultTitle = "the title";
-const defaultMsg = "the message";
-
-function initLogins() {
- const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
- var login1, login2A, login2B, login2C, login2D, login2E;
- var pwmgr = Cc["@mozilla.org/login-manager;1"].
- getService(Ci.nsILoginManager);
-
- login1 = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- login2A = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- login2B = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- login2C = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- login2D = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- login2E = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
-
- login1.init("http://example.com", null, "http://example.com",
- "", "examplepass", "", "");
- login2A.init("http://example2.com", null, "http://example2.com",
- "user1name", "user1pass", "", "");
- login2B.init("http://example2.com", null, "http://example2.com",
- "user2name", "user2pass", "", "");
- login2C.init("http://example2.com", null, "http://example2.com",
- "user3.name@host", "user3pass", "", "");
- login2D.init("http://example2.com", null, "http://example2.com",
- "100@beef", "user3pass", "", "");
- login2E.init("http://example2.com", null, "http://example2.com",
- "100%beef", "user3pass", "", "");
-
- pwmgr.addLogin(login1);
- pwmgr.addLogin(login2A);
- pwmgr.addLogin(login2B);
- pwmgr.addLogin(login2C);
- pwmgr.addLogin(login2D);
- pwmgr.addLogin(login2E);
-}
-
-add_task(function* setup() {
- runInParent(initLogins);
-});
-
-add_task(function* test_prompt_accept() {
- state = {
- msg : "the message",
- title : "the title",
- textValue : "abc",
- passValue : "",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : true,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- textField : "xyz",
- };
- promptDone = handlePrompt(state, action);
- isOk = prompter1.prompt(defaultTitle, defaultMsg, "http://example.com",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_NEVER, "abc", result);
- yield promptDone;
-
- ok(isOk, "Checking dialog return value (accept)");
- is(result.value, "xyz", "Checking prompt() returned value");
-});
-
-add_task(function* test_prompt_cancel() {
- state = {
- msg : "the message",
- title : "the title",
- textValue : "abc",
- passValue : "",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : true,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "cancel",
- };
- promptDone = handlePrompt(state, action);
- isOk = prompter1.prompt(defaultTitle, defaultMsg, "http://example.com",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_NEVER, "abc", result);
- yield promptDone;
- ok(!isOk, "Checking dialog return value (cancel)");
-});
-
-add_task(function* test_promptPassword_defaultAccept() {
- // Default password provided, existing logins are ignored.
- state = {
- msg : "the message",
- title : "the title",
- textValue : "",
- passValue : "inputpw",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "passField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- passField : "secret",
- };
- pword.value = "inputpw";
- promptDone = handlePrompt(state, action);
- isOk = prompter1.promptPassword(defaultTitle, defaultMsg, "http://example.com",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_NEVER, pword);
- yield promptDone;
- ok(isOk, "Checking dialog return value (accept)");
- is(pword.value, "secret", "Checking returned password");
-});
-
-add_task(function* test_promptPassword_defaultCancel() {
- // Default password provided, existing logins are ignored.
- state = {
- msg : "the message",
- title : "the title",
- textValue : "",
- passValue : "inputpw",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "passField",
- defButton : "button0",
- };
- action = {
- buttonClick : "cancel",
- };
- pword.value = "inputpw";
- promptDone = handlePrompt(state, action);
- isOk = prompter1.promptPassword(defaultTitle, defaultMsg, "http://example.com",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_NEVER, pword);
- yield promptDone;
- ok(!isOk, "Checking dialog return value (cancel)");
-});
-
-add_task(function* test_promptPassword_emptyAccept() {
- // No default password provided, realm does not match existing login.
- state = {
- msg : "the message",
- title : "the title",
- textValue : "",
- passValue : "",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "passField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- passField : "secret",
- };
- pword.value = null;
- promptDone = handlePrompt(state, action);
- isOk = prompter1.promptPassword(defaultTitle, defaultMsg, "http://nonexample.com",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_NEVER, pword);
- yield promptDone;
- ok(isOk, "Checking dialog return value (accept)");
- is(pword.value, "secret", "Checking returned password");
-});
-
-add_task(function* test_promptPassword_saved() {
- // No default password provided, matching login is returned w/o prompting.
- pword.value = null;
- isOk = prompter1.promptPassword(defaultTitle, defaultMsg, "http://example.com",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_NEVER, pword);
- ok(isOk, "Checking dialog return value (accept)");
- is(pword.value, "examplepass", "Checking returned password");
-});
-
-add_task(function* test_promptPassword_noMatchingPasswordForEmptyUN() {
- // No default password provided, none of the logins from this host are
- // password-only so the user is prompted.
- state = {
- msg : "the message",
- title : "the title",
- textValue : "",
- passValue : "",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "passField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- passField : "secret",
- };
- pword.value = null;
- promptDone = handlePrompt(state, action);
- isOk = prompter1.promptPassword(defaultTitle, defaultMsg, "http://example2.com",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_NEVER, pword);
- yield promptDone;
- ok(isOk, "Checking dialog return value (accept)");
- is(pword.value, "secret", "Checking returned password");
-});
-
-add_task(function* test_promptPassword_matchingPWForUN() {
- // No default password provided, matching login is returned w/o prompting.
- pword.value = null;
- isOk = prompter1.promptPassword(defaultTitle, defaultMsg, "http://user1name@example2.com",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_NEVER, pword);
- ok(isOk, "Checking dialog return value (accept)");
- is(pword.value, "user1pass", "Checking returned password");
-});
-
-add_task(function* test_promptPassword_matchingPWForUN2() {
- // No default password provided, matching login is returned w/o prompting.
- pword.value = null;
- isOk = prompter1.promptPassword(defaultTitle, defaultMsg, "http://user2name@example2.com",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_NEVER, pword);
- ok(isOk, "Checking dialog return value (accept)");
- is(pword.value, "user2pass", "Checking returned password");
-});
-
-add_task(function* test_promptPassword_matchingPWForUN3() {
- // No default password provided, matching login is returned w/o prompting.
- pword.value = null;
- isOk = prompter1.promptPassword(defaultTitle, defaultMsg, "http://user3%2Ename%40host@example2.com",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_NEVER, pword);
- ok(isOk, "Checking dialog return value (accept)");
- is(pword.value, "user3pass", "Checking returned password");
-});
-
-add_task(function* test_promptPassword_extraAt() {
- // No default password provided, matching login is returned w/o prompting.
- pword.value = null;
- isOk = prompter1.promptPassword(defaultTitle, defaultMsg, "http://100@beef@example2.com",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_NEVER, pword);
- ok(isOk, "Checking dialog return value (accept)");
- is(pword.value, "user3pass", "Checking returned password");
-});
-
-add_task(function* test_promptPassword_usernameEncoding() {
- // No default password provided, matching login is returned w/o prompting.
- pword.value = null;
- isOk = prompter1.promptPassword(defaultTitle, defaultMsg, "http://100%25beef@example2.com",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_NEVER, pword);
- ok(isOk, "Checking dialog return value (accept)");
- is(pword.value, "user3pass", "Checking returned password");
-
- // XXX test saving a password with Ci.nsIAuthPrompt.SAVE_PASSWORD_PERMANENTLY
-});
-
-add_task(function* test_promptPassword_realm() {
- // We don't pre-fill or save for NS_GetAuthKey-generated realms, but we should still prompt
- state = {
- msg : "the message",
- title : "the title",
- textValue : "",
- passValue : "",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "passField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- passField : "fill2pass",
- };
- pword.value = null;
- promptDone = handlePrompt(state, action);
- isOk = prompter1.promptPassword(defaultTitle, defaultMsg, "example2.com:80 (somerealm)",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_NEVER, pword);
- yield promptDone;
- ok(isOk, "Checking dialog return value (accept)");
- is(pword.value, "fill2pass", "Checking returned password");
-});
-
-add_task(function* test_promptPassword_realm2() {
- // We don't pre-fill or save for NS_GetAuthKey-generated realms, but we should still prompt
- state = {
- msg : "the message",
- title : "the title",
- textValue : "",
- passValue : "",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "passField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- passField : "fill2pass",
- };
- pword.value = null;
- promptDone = handlePrompt(state, action);
- isOk = prompter1.promptPassword(defaultTitle, defaultMsg, "example2.com:80 (somerealm)",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_PERMANENTLY, pword);
- yield promptDone;
- ok(isOk, "Checking dialog return value (accept)");
- is(pword.value, "fill2pass", "Checking returned password");
-});
-
-add_task(function* test_promptUsernameAndPassword_accept() {
- state = {
- msg : "the message",
- title : "the title",
- textValue : "inuser",
- passValue : "inpass",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- textField : "outuser",
- passField : "outpass",
- };
- uname.value = "inuser";
- pword.value = "inpass";
- promptDone = handlePrompt(state, action);
- isOk = prompter1.promptUsernameAndPassword(defaultTitle, defaultMsg, "http://nonexample.com",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_NEVER, uname, pword);
- yield promptDone;
- ok(isOk, "Checking dialog return value (accept)");
- is(uname.value, "outuser", "Checking returned username");
- is(pword.value, "outpass", "Checking returned password");
-});
-
-add_task(function* test_promptUsernameAndPassword_cancel() {
- state = {
- msg : "the message",
- title : "the title",
- textValue : "inuser",
- passValue : "inpass",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "cancel",
- };
- uname.value = "inuser";
- pword.value = "inpass";
- promptDone = handlePrompt(state, action);
- isOk = prompter1.promptUsernameAndPassword(defaultTitle, defaultMsg, "http://nonexample.com",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_NEVER, uname, pword);
- yield promptDone;
- ok(!isOk, "Checking dialog return value (cancel)");
-});
-
-add_task(function* test_promptUsernameAndPassword_autofill() {
- // test filling in existing password-only login
- state = {
- msg : "the message",
- title : "the title",
- textValue : "",
- passValue : "examplepass",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : false,
- checkMsg : "Use Password Manager to remember this password.",
- checked : true,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- };
- uname.value = null;
- pword.value = null;
- promptDone = handlePrompt(state, action);
- isOk = prompter1.promptUsernameAndPassword(defaultTitle, defaultMsg, "http://example.com",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_PERMANENTLY, uname, pword);
- yield promptDone;
- ok(isOk, "Checking dialog return value (accept)");
- is(uname.value, "", "Checking returned username");
- is(pword.value, "examplepass", "Checking returned password");
-});
-
-add_task(function* test_promptUsernameAndPassword_multipleExisting() {
- // test filling in existing login (undetermined from multiple selection)
- // user2name/user2pass would also be valid to fill here.
- state = {
- msg : "the message",
- title : "the title",
- textValue : "user1name",
- passValue : "user1pass",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : false,
- checkMsg : "Use Password Manager to remember this password.",
- checked : true,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- };
- uname.value = null;
- pword.value = null;
- promptDone = handlePrompt(state, action);
- isOk = prompter1.promptUsernameAndPassword(defaultTitle, defaultMsg, "http://example2.com",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_PERMANENTLY, uname, pword);
- yield promptDone;
- ok(isOk, "Checking dialog return value (accept)");
- ok(uname.value == "user1name" || uname.value == "user2name", "Checking returned username");
- ok(pword.value == "user1pass" || uname.value == "user2pass", "Checking returned password");
-});
-
-add_task(function* test_promptUsernameAndPassword_multipleExisting1() {
- // test filling in existing login (user1 from multiple selection)
- state = {
- msg : "the message",
- title : "the title",
- textValue : "user1name",
- passValue : "user1pass",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : false,
- checkMsg : "Use Password Manager to remember this password.",
- checked : true,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- };
- uname.value = "user1name";
- pword.value = null;
- promptDone = handlePrompt(state, action);
- isOk = prompter1.promptUsernameAndPassword(defaultTitle, defaultMsg, "http://example2.com",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_PERMANENTLY, uname, pword);
- yield promptDone;
- ok(isOk, "Checking dialog return value (accept)");
- is(uname.value, "user1name", "Checking returned username");
- is(pword.value, "user1pass", "Checking returned password");
-});
-
-add_task(function* test_promptUsernameAndPassword_multipleExisting2() {
- // test filling in existing login (user2 from multiple selection)
- state = {
- msg : "the message",
- title : "the title",
- textValue : "user2name",
- passValue : "user2pass",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : false,
- checkMsg : "Use Password Manager to remember this password.",
- checked : true,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- };
- uname.value = "user2name";
- pword.value = null;
- promptDone = handlePrompt(state, action);
- isOk = prompter1.promptUsernameAndPassword(defaultTitle, defaultMsg, "http://example2.com",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_PERMANENTLY, uname, pword);
- yield promptDone;
- ok(isOk, "Checking dialog return value (accept)");
- is(uname.value, "user2name", "Checking returned username");
- is(pword.value, "user2pass", "Checking returned password");
-});
-
-add_task(function* test_promptUsernameAndPassword_passwordChange() {
- // test changing password
- state = {
- msg : "the message",
- title : "the title",
- textValue : "user2name",
- passValue : "user2pass",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : false,
- checkMsg : "Use Password Manager to remember this password.",
- checked : true,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- passField : "NEWuser2pass",
- };
- uname.value = "user2name";
- pword.value = null;
- promptDone = handlePrompt(state, action);
- isOk = prompter1.promptUsernameAndPassword(defaultTitle, defaultMsg, "http://example2.com",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_PERMANENTLY, uname, pword);
- yield promptDone;
- ok(isOk, "Checking dialog return value (accept)");
- is(uname.value, "user2name", "Checking returned username");
- is(pword.value, "NEWuser2pass", "Checking returned password");
-});
-
-add_task(function* test_promptUsernameAndPassword_changePasswordBack() {
- // test changing password (back to original value)
- state = {
- msg : "the message",
- title : "the title",
- textValue : "user2name",
- passValue : "NEWuser2pass",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : false,
- checkMsg : "Use Password Manager to remember this password.",
- checked : true,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- passField : "user2pass",
- };
- uname.value = "user2name";
- pword.value = null;
- promptDone = handlePrompt(state, action);
- isOk = prompter1.promptUsernameAndPassword(defaultTitle, defaultMsg, "http://example2.com",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_PERMANENTLY, uname, pword);
- yield promptDone;
- ok(isOk, "Checking dialog return value (accept)");
- is(uname.value, "user2name", "Checking returned username");
- is(pword.value, "user2pass", "Checking returned password");
-});
-
-add_task(function* test_promptUsernameAndPassword_realm() {
- // We don't pre-fill or save for NS_GetAuthKey-generated realms, but we should still prompt
- state = {
- msg : "the message",
- title : "the title",
- textValue : "",
- passValue : "",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- textField : "fill2user",
- passField : "fill2pass",
- };
- uname.value = null;
- pword.value = null;
- promptDone = handlePrompt(state, action);
- isOk = prompter1.promptUsernameAndPassword(defaultTitle, defaultMsg, "example2.com:80 (somerealm)",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_NEVER, uname, pword);
- yield promptDone;
- ok(isOk, "Checking dialog return value (accept)");
- is(uname.value, "fill2user", "Checking returned username");
- is(pword.value, "fill2pass", "Checking returned password");
-});
-
-add_task(function* test_promptUsernameAndPassword_realm2() {
- // We don't pre-fill or save for NS_GetAuthKey-generated realms, but we should still prompt
- state = {
- msg : "the message",
- title : "the title",
- textValue : "",
- passValue : "",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- textField : "fill2user",
- passField : "fill2pass",
- };
- uname.value = null;
- pword.value = null;
- promptDone = handlePrompt(state, action);
- isOk = prompter1.promptUsernameAndPassword(defaultTitle, defaultMsg, "example2.com:80 (somerealm)",
- Ci.nsIAuthPrompt.SAVE_PASSWORD_PERMANENTLY, uname, pword);
- yield promptDone;
- ok(isOk, "Checking dialog return value (accept)");
- is(uname.value, "fill2user", "Checking returned username");
- is(pword.value, "fill2pass", "Checking returned password");
-});
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_prompt_http.html b/toolkit/components/passwordmgr/test/mochitest/test_prompt_http.html
deleted file mode 100644
index 0dc8fdf9cb..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_prompt_http.html
+++ /dev/null
@@ -1,362 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test HTTP auth prompts by loading authenticate.sjs</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <script type="text/javascript" src="prompt_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-
-<div id="content" style="display: none">
- <iframe id="iframe"></iframe>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-var iframe = document.getElementById("iframe");
-
-// Force parent to not look for tab-modal prompts, as they're not used for auth prompts.
-isTabModal = false;
-
-const AUTHENTICATE_PATH = new URL("authenticate.sjs", window.location.href).pathname;
-
-let chromeScript = runInParent(SimpleTest.getTestFileURL("pwmgr_common.js"));
-
-runInParent(() => {
- const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
- Cu.import("resource://gre/modules/Services.jsm");
-
- let pwmgr = Cc["@mozilla.org/login-manager;1"].
- getService(Ci.nsILoginManager);
-
- let login3A, login3B, login4;
- login3A = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- login3B = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- login4 = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- let httpUpgradeLogin = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- let httpsDowngradeLogin = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- let dedupeHttpUpgradeLogin = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- let dedupeHttpsUpgradeLogin = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
-
-
- login3A.init("http://mochi.test:8888", null, "mochitest",
- "mochiuser1", "mochipass1", "", "");
- login3B.init("http://mochi.test:8888", null, "mochitest2",
- "mochiuser2", "mochipass2", "", "");
- login4.init("http://mochi.test:8888", null, "mochitest3",
- "mochiuser3", "mochipass3-old", "", "");
- // Logins to test scheme upgrades (allowed) and downgrades (disallowed)
- httpUpgradeLogin.init("http://example.com", null, "schemeUpgrade",
- "httpUser", "httpPass", "", "");
- httpsDowngradeLogin.init("https://example.com", null, "schemeDowngrade",
- "httpsUser", "httpsPass", "", "");
- // HTTP and HTTPS version of the same domain and realm but with different passwords.
- dedupeHttpUpgradeLogin.init("http://example.org", null, "schemeUpgradeDedupe",
- "dedupeUser", "httpPass", "", "");
- dedupeHttpsUpgradeLogin.init("https://example.org", null, "schemeUpgradeDedupe",
- "dedupeUser", "httpsPass", "", "");
-
-
- pwmgr.addLogin(login3A);
- pwmgr.addLogin(login3B);
- pwmgr.addLogin(login4);
- pwmgr.addLogin(httpUpgradeLogin);
- pwmgr.addLogin(httpsDowngradeLogin);
- pwmgr.addLogin(dedupeHttpUpgradeLogin);
- pwmgr.addLogin(dedupeHttpsUpgradeLogin);
-});
-
-add_task(function* test_iframe() {
- let state = {
- msg : "http://mochi.test:8888 is requesting your username and password. The site says: “mochitest”",
- title : "Authentication Required",
- textValue : "mochiuser1",
- passValue : "mochipass1",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- let action = {
- buttonClick : "ok",
- };
- promptDone = handlePrompt(state, action);
-
- // The following tests are driven by iframe loads
-
- var iframeLoaded = onloadPromiseFor("iframe");
- iframe.src = "authenticate.sjs?user=mochiuser1&pass=mochipass1";
- yield promptDone;
- yield iframeLoaded;
- checkEchoedAuthInfo({user: "mochiuser1", pass: "mochipass1"},
- iframe.contentDocument);
-
- state = {
- msg : "http://mochi.test:8888 is requesting your username and password. The site says: “mochitest2”",
- title : "Authentication Required",
- textValue : "mochiuser2",
- passValue : "mochipass2",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- };
- promptDone = handlePrompt(state, action);
- // We've already authenticated to this host:port. For this next
- // request, the existing auth should be sent, we'll get a 401 reply,
- // and we should prompt for new auth.
- iframeLoaded = onloadPromiseFor("iframe");
- iframe.src = "authenticate.sjs?user=mochiuser2&pass=mochipass2&realm=mochitest2";
- yield promptDone;
- yield iframeLoaded;
- checkEchoedAuthInfo({user: "mochiuser2", pass: "mochipass2"},
- iframe.contentDocument);
-
- // Now make a load that requests the realm from test 1000. It was
- // already provided there, so auth will *not* be prompted for -- the
- // networking layer already knows it!
- iframeLoaded = onloadPromiseFor("iframe");
- iframe.src = "authenticate.sjs?user=mochiuser1&pass=mochipass1";
- yield iframeLoaded;
- checkEchoedAuthInfo({user: "mochiuser1", pass: "mochipass1"},
- iframe.contentDocument);
-
- // Same realm we've already authenticated to, but with a different
- // expected password (to trigger an auth prompt, and change-password
- // popup notification).
- state = {
- msg : "http://mochi.test:8888 is requesting your username and password. The site says: “mochitest”",
- title : "Authentication Required",
- textValue : "mochiuser1",
- passValue : "mochipass1",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- passField : "mochipass1-new",
- };
- promptDone = handlePrompt(state, action);
- iframeLoaded = onloadPromiseFor("iframe");
- let promptShownPromise = promisePromptShown("passwordmgr-prompt-change");
- iframe.src = "authenticate.sjs?user=mochiuser1&pass=mochipass1-new";
- yield promptDone;
- yield iframeLoaded;
- checkEchoedAuthInfo({user: "mochiuser1", pass: "mochipass1-new"},
- iframe.contentDocument);
- yield promptShownPromise;
-
- // Same as last test, but for a realm we haven't already authenticated
- // to (but have an existing saved login for, so that we'll trigger
- // a change-password popup notification.
- state = {
- msg : "http://mochi.test:8888 is requesting your username and password. The site says: “mochitest3”",
- title : "Authentication Required",
- textValue : "mochiuser3",
- passValue : "mochipass3-old",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- passField : "mochipass3-new",
- };
- promptDone = handlePrompt(state, action);
- iframeLoaded = onloadPromiseFor("iframe");
- promptShownPromise = promisePromptShown("passwordmgr-prompt-change");
- iframe.src = "authenticate.sjs?user=mochiuser3&pass=mochipass3-new&realm=mochitest3";
- yield promptDone;
- yield iframeLoaded;
- checkEchoedAuthInfo({user: "mochiuser3", pass: "mochipass3-new"},
- iframe.contentDocument);
- yield promptShownPromise;
-
- // Housekeeping: Delete login4 to test the save prompt in the next test.
- runInParent(() => {
- const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
- Cu.import("resource://gre/modules/Services.jsm");
-
- var tmpLogin = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- tmpLogin.init("http://mochi.test:8888", null, "mochitest3",
- "mochiuser3", "mochipass3-old", "", "");
- Services.logins.removeLogin(tmpLogin);
-
- // Clear cached auth from this subtest, and avoid leaking due to bug 459620.
- var authMgr = Cc['@mozilla.org/network/http-auth-manager;1'].
- getService(Ci.nsIHttpAuthManager);
- authMgr.clearAll();
- });
-
- state = {
- msg : "http://mochi.test:8888 is requesting your username and password. The site says: “mochitest3”",
- title : "Authentication Required",
- textValue : "",
- passValue : "",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- textField : "mochiuser3",
- passField : "mochipass3-old",
- };
- // Trigger a new prompt, so we can test adding a new login.
- promptDone = handlePrompt(state, action);
-
- iframeLoaded = onloadPromiseFor("iframe");
- promptShownPromise = promisePromptShown("passwordmgr-prompt-save");
- iframe.src = "authenticate.sjs?user=mochiuser3&pass=mochipass3-old&realm=mochitest3";
- yield promptDone;
- yield iframeLoaded;
- checkEchoedAuthInfo({user: "mochiuser3", pass: "mochipass3-old"},
- iframe.contentDocument);
- yield promptShownPromise;
-});
-
-add_task(function* test_schemeUpgrade() {
- let state = {
- msg : "https://example.com is requesting your username and password. " +
- "WARNING: Your password will not be sent to the website you are currently visiting!",
- title : "Authentication Required",
- textValue : "httpUser",
- passValue : "httpPass",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- let action = {
- buttonClick : "ok",
- };
- let promptDone = handlePrompt(state, action);
-
- // The following tests are driven by iframe loads
-
- let iframeLoaded = onloadPromiseFor("iframe");
- iframe.src = "https://example.com" + AUTHENTICATE_PATH +
- "?user=httpUser&pass=httpPass&realm=schemeUpgrade";
- yield promptDone;
- yield iframeLoaded;
- checkEchoedAuthInfo({user: "httpUser", pass: "httpPass"},
- SpecialPowers.wrap(iframe).contentDocument);
-});
-
-add_task(function* test_schemeDowngrade() {
- let state = {
- msg : "http://example.com is requesting your username and password. " +
- "WARNING: Your password will not be sent to the website you are currently visiting!",
- title : "Authentication Required",
- textValue : "", // empty because we shouldn't downgrade
- passValue : "",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- let action = {
- buttonClick : "cancel",
- };
- let promptDone = handlePrompt(state, action);
-
- // The following tests are driven by iframe loads
-
- let iframeLoaded = onloadPromiseFor("iframe");
- iframe.src = "http://example.com" + AUTHENTICATE_PATH +
- "?user=unused&pass=unused&realm=schemeDowngrade";
- yield promptDone;
- yield iframeLoaded;
-});
-
-add_task(function* test_schemeUpgrade_dedupe() {
- let state = {
- msg : "https://example.org is requesting your username and password. " +
- "WARNING: Your password will not be sent to the website you are currently visiting!",
- title : "Authentication Required",
- textValue : "dedupeUser",
- passValue : "httpsPass",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- let action = {
- buttonClick : "ok",
- };
- let promptDone = handlePrompt(state, action);
-
- // The following tests are driven by iframe loads
-
- let iframeLoaded = onloadPromiseFor("iframe");
- iframe.src = "https://example.org" + AUTHENTICATE_PATH +
- "?user=dedupeUser&pass=httpsPass&realm=schemeUpgradeDedupe";
- yield promptDone;
- yield iframeLoaded;
- checkEchoedAuthInfo({user: "dedupeUser", pass: "httpsPass"},
- SpecialPowers.wrap(iframe).contentDocument);
-});
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_prompt_noWindow.html b/toolkit/components/passwordmgr/test/mochitest/test_prompt_noWindow.html
deleted file mode 100644
index 92af172ca1..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_prompt_noWindow.html
+++ /dev/null
@@ -1,81 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test HTTP auth prompts by loading authenticate.sjs with no window</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <script type="text/javascript" src="prompt_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-
-<div id="content" style="display: none">
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-// Force parent to not look for tab-modal prompts, as they're not used for auth prompts.
-isTabModal = false;
-
-let chromeScript = runInParent(SimpleTest.getTestFileURL("pwmgr_common.js"));
-
-runInParent(() => {
- const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
- Cu.import("resource://gre/modules/Services.jsm");
-
- let login = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- login.init("http://mochi.test:8888", null, "mochitest",
- "mochiuser1", "mochipass1", "", "");
- Services.logins.addLogin(login);
-});
-
-add_task(function* test_sandbox_xhr() {
- let state = {
- msg : "http://mochi.test:8888 is requesting your username and password. The site says: “mochitest”",
- title : "Authentication Required",
- textValue : "mochiuser1",
- passValue : "mochipass1",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- let action = {
- buttonClick : "ok",
- };
- let promptDone = handlePrompt(state, action);
-
- let url = new URL("authenticate.sjs?user=mochiuser1&pass=mochipass1", window.location.href);
- let sandboxConstructor = SpecialPowers.Cu.Sandbox;
- let sandbox = new sandboxConstructor(this, {wantXrays: true});
- function sandboxedRequest(sandboxedUrl) {
- let req = SpecialPowers.Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
- .createInstance(SpecialPowers.Ci.nsIXMLHttpRequest);
- req.open("GET", sandboxedUrl, true);
- req.send(null);
- }
-
- let loginModifiedPromise = promiseStorageChanged(["modifyLogin"]);
- sandbox.sandboxedRequest = sandboxedRequest(url);
- info("send the XHR request in the sandbox");
- SpecialPowers.Cu.evalInSandbox("sandboxedRequest;", sandbox);
-
- yield promptDone;
- info("prompt shown, waiting for metadata updates");
- // Ensure the timeLastUsed and timesUsed metadata are updated.
- yield loginModifiedPromise;
-});
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_prompt_promptAuth.html b/toolkit/components/passwordmgr/test/mochitest/test_prompt_promptAuth.html
deleted file mode 100644
index 36f53a54a0..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_prompt_promptAuth.html
+++ /dev/null
@@ -1,406 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test promptAuth prompts</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <script type="text/javascript" src="prompt_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-
-<div id="content" style="display: none">
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-var state, action;
-var isOk;
-
-var level = Ci.nsIAuthPrompt2.LEVEL_NONE;
-var authinfo = {
- username : "",
- password : "",
- domain : "",
-
- flags : Ci.nsIAuthInformation.AUTH_HOST,
- authenticationScheme : "basic",
- realm : ""
-};
-
-// Force parent to not look for tab-modal prompts, as they're not used for auth prompts.
-isTabModal = false;
-
-let chromeScript = runInParent(SimpleTest.getTestFileURL("pwmgr_common.js"));
-
-let prompterParent = runInParent(() => {
- const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
- const promptFac = Cc["@mozilla.org/passwordmanager/authpromptfactory;1"].
- getService(Ci.nsIPromptFactory);
-
- Cu.import("resource://gre/modules/Services.jsm");
- let chromeWin = Services.wm.getMostRecentWindow("navigator:browser");
- let prompter2 = promptFac.getPrompt(chromeWin, Ci.nsIAuthPrompt2);
-
- let ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
- let channels = {};
- channels.channel1 = ioService.newChannel2("http://example.com",
- null,
- null,
- null, // aLoadingNode
- Services.
- scriptSecurityManager.getSystemPrincipal(),
- null, // aTriggeringPrincipal
- Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
- Ci.nsIContentPolicy.TYPE_OTHER);
-
- channels.channel2 = ioService.newChannel2("http://example2.com",
- null,
- null,
- null, // aLoadingNode
- Services.
- scriptSecurityManager.getSystemPrincipal(),
- null, // aTriggeringPrincipal
- Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
- Ci.nsIContentPolicy.TYPE_OTHER);
-
- addMessageListener("proxyPrompter", function onMessage(msg) {
- let args = [...msg.args];
- let channelName = args.shift();
- // Replace the channel name string (arg. 0) with the channel by that name.
- args.unshift(channels[channelName]);
-
- let rv = prompter2[msg.methodName](...args);
- return {
- rv,
- // Send the args back to content so out/inout args can be checked.
- args: msg.args,
- };
- });
-
- Cu.import("resource://gre/modules/Services.jsm");
-
- let pwmgr = Cc["@mozilla.org/login-manager;1"].
- getService(Ci.nsILoginManager);
-
- let login1, login2A, login2B, login2C, login2D, login2E;
- login1 = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- login2A = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- login2B = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- login2C = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- login2D = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- login2E = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
-
- login1.init("http://example.com", null, "http://example.com",
- "", "examplepass", "", "");
- login2A.init("http://example2.com", null, "http://example2.com",
- "user1name", "user1pass", "", "");
- login2B.init("http://example2.com", null, "http://example2.com",
- "user2name", "user2pass", "", "");
- login2C.init("http://example2.com", null, "http://example2.com",
- "user3.name@host", "user3pass", "", "");
- login2D.init("http://example2.com", null, "http://example2.com",
- "100@beef", "user3pass", "", "");
- login2E.init("http://example2.com", null, "http://example2.com",
- "100%beef", "user3pass", "", "");
-
- pwmgr.addLogin(login1);
- pwmgr.addLogin(login2A);
- pwmgr.addLogin(login2B);
- pwmgr.addLogin(login2C);
- pwmgr.addLogin(login2D);
- pwmgr.addLogin(login2E);
-});
-
-let prompter2 = new PrompterProxy(prompterParent);
-
-add_task(function* test_accept() {
- state = {
- msg : "http://example.com is requesting your username and password. The site says: “some realm”",
- title : "Authentication Required",
- textValue : "inuser",
- passValue : "inpass",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- textField : "outuser",
- passField : "outpass",
- };
- authinfo.username = "inuser";
- authinfo.password = "inpass";
- authinfo.realm = "some realm";
-
- promptDone = handlePrompt(state, action);
- // Since prompter2 is actually a proxy to send a message to a chrome script and
- // we can't send a channel in a message, we instead send the channel name that
- // already exists in the chromeScript.
- isOk = prompter2.promptAuth("channel1", level, authinfo);
- yield promptDone;
-
- ok(isOk, "Checking dialog return value (accept)");
- is(authinfo.username, "outuser", "Checking returned username");
- is(authinfo.password, "outpass", "Checking returned password");
-});
-
-add_task(function* test_cancel() {
- state = {
- msg : "http://example.com is requesting your username and password. The site says: “some realm”",
- title : "Authentication Required",
- textValue : "outuser",
- passValue : "outpass",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "cancel",
- };
- promptDone = handlePrompt(state, action);
- isOk = prompter2.promptAuth("channel1", level, authinfo);
- yield promptDone;
-
- ok(!isOk, "Checking dialog return value (cancel)");
-});
-
-add_task(function* test_pwonly() {
- // test filling in password-only login
- state = {
- msg : "http://example.com is requesting your username and password. The site says: “http://example.com”",
- title : "Authentication Required",
- textValue : "",
- passValue : "examplepass",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- };
- authinfo.username = "";
- authinfo.password = "";
- authinfo.realm = "http://example.com";
-
- promptDone = handlePrompt(state, action);
- isOk = prompter2.promptAuth("channel1", level, authinfo);
- yield promptDone;
-
- ok(isOk, "Checking dialog return value (accept)");
- is(authinfo.username, "", "Checking returned username");
- is(authinfo.password, "examplepass", "Checking returned password");
-});
-
-add_task(function* test_multipleExisting() {
- // test filling in existing login (undetermined from multiple selection)
- // user2name/user2pass would also be valid to fill here.
- state = {
- msg : "http://example2.com is requesting your username and password. The site says: “http://example2.com”",
- title : "Authentication Required",
- textValue : "user1name",
- passValue : "user1pass",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- };
- authinfo.username = "";
- authinfo.password = "";
- authinfo.realm = "http://example2.com";
-
- promptDone = handlePrompt(state, action);
- isOk = prompter2.promptAuth("channel2", level, authinfo);
- yield promptDone;
-
- ok(isOk, "Checking dialog return value (accept)");
- ok(authinfo.username == "user1name" || authinfo.username == "user2name", "Checking returned username");
- ok(authinfo.password == "user1pass" || authinfo.password == "user2pass", "Checking returned password");
-});
-
-add_task(function* test_multipleExisting2() {
- // test filling in existing login (undetermined --> user1)
- // user2name/user2pass would also be valid to fill here.
- state = {
- msg : "http://example2.com is requesting your username and password. The site says: “http://example2.com”",
- title : "Authentication Required",
- textValue : "user1name",
- passValue : "user1pass",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- // enter one of the known logins, test 504+505 exercise the two possible states.
- action = {
- buttonClick : "ok",
- textField : "user1name",
- passField : "user1pass",
- };
- authinfo.username = "";
- authinfo.password = "";
- authinfo.realm = "http://example2.com";
-
- promptDone = handlePrompt(state, action);
- isOk = prompter2.promptAuth("channel2", level, authinfo);
- yield promptDone;
-
- ok(isOk, "Checking dialog return value (accept)");
- is(authinfo.username, "user1name", "Checking returned username");
- is(authinfo.password, "user1pass", "Checking returned password");
-});
-
-add_task(function* test_multipleExisting3() {
- // test filling in existing login (undetermined --> user2)
- // user2name/user2pass would also be valid to fill here.
- state = {
- msg : "http://example2.com is requesting your username and password. The site says: “http://example2.com”",
- title : "Authentication Required",
- textValue : "user1name",
- passValue : "user1pass",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- // enter one of the known logins, test 504+505 exercise the two possible states.
- action = {
- buttonClick : "ok",
- textField : "user2name",
- passField : "user2pass",
- };
- authinfo.username = "";
- authinfo.password = "";
- authinfo.realm = "http://example2.com";
-
- promptDone = handlePrompt(state, action);
- isOk = prompter2.promptAuth("channel2", level, authinfo);
- yield promptDone;
-
- ok(isOk, "Checking dialog return value (accept)");
- is(authinfo.username, "user2name", "Checking returned username");
- is(authinfo.password, "user2pass", "Checking returned password");
-});
-
-add_task(function* test_changingMultiple() {
- // test changing a password (undetermined --> user2 w/ newpass)
- // user2name/user2pass would also be valid to fill here.
- state = {
- msg : "http://example2.com is requesting your username and password. The site says: “http://example2.com”",
- title : "Authentication Required",
- textValue : "user1name",
- passValue : "user1pass",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- // force to user2, and change the password
- action = {
- buttonClick : "ok",
- textField : "user2name",
- passField : "NEWuser2pass",
- };
- authinfo.username = "";
- authinfo.password = "";
- authinfo.realm = "http://example2.com";
-
- promptDone = handlePrompt(state, action);
- isOk = prompter2.promptAuth("channel2", level, authinfo);
- yield promptDone;
-
- ok(isOk, "Checking dialog return value (accept)");
- is(authinfo.username, "user2name", "Checking returned username");
- is(authinfo.password, "NEWuser2pass", "Checking returned password");
-});
-
-add_task(function* test_changingMultiple2() {
- // test changing a password (undetermined --> user2 w/ origpass)
- // user2name/user2pass would also be valid to fill here.
- state = {
- msg : "http://example2.com is requesting your username and password. The site says: “http://example2.com”",
- title : "Authentication Required",
- textValue : "user1name",
- passValue : "user1pass",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- // force to user2, and change the password back
- action = {
- buttonClick : "ok",
- textField : "user2name",
- passField : "user2pass",
- };
- authinfo.username = "";
- authinfo.password = "";
- authinfo.realm = "http://example2.com";
-
- promptDone = handlePrompt(state, action);
- isOk = prompter2.promptAuth("channel2", level, authinfo);
- yield promptDone;
-
- ok(isOk, "Checking dialog return value (accept)");
- is(authinfo.username, "user2name", "Checking returned username");
- is(authinfo.password, "user2pass", "Checking returned password");
-});
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_prompt_promptAuth_proxy.html b/toolkit/components/passwordmgr/test/mochitest/test_prompt_promptAuth_proxy.html
deleted file mode 100644
index 95dd4c7bc7..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_prompt_promptAuth_proxy.html
+++ /dev/null
@@ -1,264 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test promptAuth proxy prompts</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <script type="text/javascript" src="prompt_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-
-<div id="content" style="display: none">
- <iframe id="iframe"></iframe>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-var state, action;
-var pwmgr;
-var proxyLogin;
-var isOk;
-var mozproxy, proxiedHost = "http://mochi.test:8888";
-var proxyChannel;
-var systemPrincipal = SpecialPowers.Services.scriptSecurityManager.getSystemPrincipal();
-var ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
-
-var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
-
-var level = Ci.nsIAuthPrompt2.LEVEL_NONE;
-
-var proxyAuthinfo = {
- username : "",
- password : "",
- domain : "",
-
- flags : Ci.nsIAuthInformation.AUTH_PROXY,
- authenticationScheme : "basic",
- realm : ""
-};
-
-// Force parent to not look for tab-modal prompts, as they're not used for auth prompts.
-isTabModal = false;
-
-const Cc_promptFac = Cc["@mozilla.org/passwordmanager/authpromptfactory;1"];
-ok(Cc_promptFac != null, "Access Cc[@mozilla.org/passwordmanager/authpromptfactory;1]");
-
-const Ci_promptFac = Ci.nsIPromptFactory;
-ok(Ci_promptFac != null, "Access Ci.nsIPromptFactory");
-
-const promptFac = Cc_promptFac.getService(Ci_promptFac);
-ok(promptFac != null, "promptFac getService()");
-
-var prompter2 = promptFac.getPrompt(window, Ci.nsIAuthPrompt2);
-
-function initLogins(pi) {
- pwmgr = Cc["@mozilla.org/login-manager;1"].
- getService(Ci.nsILoginManager);
-
- mozproxy = "moz-proxy://" + SpecialPowers.wrap(pi).host + ":" +
- SpecialPowers.wrap(pi).port;
-
- proxyLogin = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
-
- proxyLogin.init(mozproxy, null, "Proxy Realm",
- "proxuser", "proxpass", "", "");
-
- pwmgr.addLogin(proxyLogin);
-}
-
-var startupCompleteResolver;
-var startupComplete = new Promise(resolve => startupCompleteResolver = resolve);
-
-function proxyChannelListener() { }
-proxyChannelListener.prototype = {
- onStartRequest: function(request, context) {
- startupCompleteResolver();
- },
- onStopRequest: function(request, context, status) { }
-};
-
-var resolveCallback = SpecialPowers.wrapCallbackObject({
- QueryInterface : function (iid) {
- const interfaces = [Ci.nsIProtocolProxyCallback, Ci.nsISupports];
-
- if (!interfaces.some( function(v) { return iid.equals(v); } ))
- throw SpecialPowers.Cr.NS_ERROR_NO_INTERFACE;
- return this;
- },
-
- onProxyAvailable : function (req, uri, pi, status) {
- initLogins(pi);
-
- // I'm cheating a bit here... We should probably do some magic foo to get
- // something implementing nsIProxiedProtocolHandler and then call
- // NewProxiedChannel(), so we have something that's definately a proxied
- // channel. But Mochitests use a proxy for a number of hosts, so just
- // requesting a normal channel will give us a channel that's proxied.
- // The proxyChannel needs to move to at least on-modify-request to
- // have valid ProxyInfo, but we use OnStartRequest during startup()
- // for simplicity.
- proxyChannel = ioService.newChannel2(proxiedHost,
- null,
- null,
- null, // aLoadingNode
- systemPrincipal,
- null, // aTriggeringPrincipal
- Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
- Ci.nsIContentPolicy.TYPE_OTHER);
- proxyChannel.asyncOpen2(SpecialPowers.wrapCallbackObject(new proxyChannelListener()));
- }
-});
-
-function startup() {
- // Need to allow for arbitrary network servers defined in PAC instead of a hardcoded moz-proxy.
- var ios = SpecialPowers.Cc["@mozilla.org/network/io-service;1"].
- getService(SpecialPowers.Ci.nsIIOService);
-
- var pps = SpecialPowers.Cc["@mozilla.org/network/protocol-proxy-service;1"].getService();
-
- var channel = ios.newChannel2("http://example.com",
- null,
- null,
- null, // aLoadingNode
- systemPrincipal,
- null, // aTriggeringPrincipal
- Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
- Ci.nsIContentPolicy.TYPE_OTHER);
- pps.asyncResolve(channel, 0, resolveCallback);
-}
-
-startup();
-
-add_task(function* setup() {
- info("Waiting for startup to complete...");
- yield startupComplete;
-});
-
-add_task(function* test_noAutologin() {
- // test proxy login (default = no autologin), make sure it prompts.
- state = {
- msg : "The proxy moz-proxy://127.0.0.1:8888 is requesting a username and password. The site says: “Proxy Realm”",
- title : "Authentication Required",
- textValue : "proxuser",
- passValue : "proxpass",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- };
- proxyAuthinfo.username = "";
- proxyAuthinfo.password = "";
- proxyAuthinfo.realm = "Proxy Realm";
- proxyAuthinfo.flags = Ci.nsIAuthInformation.AUTH_PROXY;
-
- var time1 = pwmgr.findLogins({}, mozproxy, null, "Proxy Realm")[0].QueryInterface(Ci.nsILoginMetaInfo).timeLastUsed;
- promptDone = handlePrompt(state, action);
- isOk = prompter2.promptAuth(proxyChannel, level, proxyAuthinfo);
- yield promptDone;
- var time2 = pwmgr.findLogins({}, mozproxy, null, "Proxy Realm")[0].QueryInterface(Ci.nsILoginMetaInfo).timeLastUsed;
-
- ok(isOk, "Checking dialog return value (accept)");
- isnot(time1, time2, "Checking that timeLastUsed was updated");
- is(proxyAuthinfo.username, "proxuser", "Checking returned username");
- is(proxyAuthinfo.password, "proxpass", "Checking returned password");
-});
-
-add_task(function* test_autologin() {
- // test proxy login (with autologin)
-
- // Enable the autologin pref.
- prefs.setBoolPref("signon.autologin.proxy", true);
-
- proxyAuthinfo.username = "";
- proxyAuthinfo.password = "";
- proxyAuthinfo.realm = "Proxy Realm";
- proxyAuthinfo.flags = Ci.nsIAuthInformation.AUTH_PROXY;
-
- time1 = pwmgr.findLogins({}, mozproxy, null, "Proxy Realm")[0].QueryInterface(Ci.nsILoginMetaInfo).timeLastUsed;
- isOk = prompter2.promptAuth(proxyChannel, level, proxyAuthinfo);
- time2 = pwmgr.findLogins({}, mozproxy, null, "Proxy Realm")[0].QueryInterface(Ci.nsILoginMetaInfo).timeLastUsed;
-
- ok(isOk, "Checking dialog return value (accept)");
- isnot(time1, time2, "Checking that timeLastUsed was updated");
- is(proxyAuthinfo.username, "proxuser", "Checking returned username");
- is(proxyAuthinfo.password, "proxpass", "Checking returned password");
-});
-
-add_task(function* test_autologin_incorrect() {
- // test proxy login (with autologin), ensure it prompts after a failed auth.
- state = {
- msg : "The proxy moz-proxy://127.0.0.1:8888 is requesting a username and password. The site says: “Proxy Realm”",
- title : "Authentication Required",
- textValue : "proxuser",
- passValue : "proxpass",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- };
-
- proxyAuthinfo.username = "";
- proxyAuthinfo.password = "";
- proxyAuthinfo.realm = "Proxy Realm";
- proxyAuthinfo.flags = (Ci.nsIAuthInformation.AUTH_PROXY | Ci.nsIAuthInformation.PREVIOUS_FAILED);
-
- time1 = pwmgr.findLogins({}, mozproxy, null, "Proxy Realm")[0].QueryInterface(Ci.nsILoginMetaInfo).timeLastUsed;
- promptDone = handlePrompt(state, action);
- isOk = prompter2.promptAuth(proxyChannel, level, proxyAuthinfo);
- yield promptDone;
- time2 = pwmgr.findLogins({}, mozproxy, null, "Proxy Realm")[0].QueryInterface(Ci.nsILoginMetaInfo).timeLastUsed;
-
- ok(isOk, "Checking dialog return value (accept)");
- isnot(time1, time2, "Checking that timeLastUsed was updated");
- is(proxyAuthinfo.username, "proxuser", "Checking returned username");
- is(proxyAuthinfo.password, "proxpass", "Checking returned password");
-});
-
-add_task(function* test_autologin_private() {
- // test proxy login (with autologin), ensure it prompts in Private Browsing mode.
- state = {
- msg : "the message",
- title : "the title",
- textValue : "proxuser",
- passValue : "proxpass",
- };
- action = {
- buttonClick : "ok",
- };
-
- proxyAuthinfo.username = "";
- proxyAuthinfo.password = "";
- proxyAuthinfo.realm = "Proxy Realm";
- proxyAuthinfo.flags = Ci.nsIAuthInformation.AUTH_PROXY;
-
- prefs.clearUserPref("signon.autologin.proxy");
-
- // XXX check for and kill popup notification??
- // XXX check for checkbox / checkstate on old prompts?
- // XXX check NTLM domain stuff
-});
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_recipe_login_fields.html b/toolkit/components/passwordmgr/test/mochitest/test_recipe_login_fields.html
deleted file mode 100644
index 943bffc522..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_recipe_login_fields.html
+++ /dev/null
@@ -1,145 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test for recipes overriding login fields</title>
- <script src="/tests/SimpleTest/SimpleTest.js"></script>
- <script src="/tests/SimpleTest/SpawnTask.js"></script>
- <script src="pwmgr_common.js"></script>
- <link rel="stylesheet" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<script>
-var chromeScript = runChecksAfterCommonInit();
-
-let fillPromiseResolvers = [];
-
-function waitForFills(fillCount) {
- let promises = [];
- while (fillCount--) {
- let promise = new Promise(resolve => fillPromiseResolvers.push(resolve));
- promises.push(promise);
- }
-
- return Promise.all(promises);
-}
-
-add_task(function* setup() {
- if (document.readyState !== "complete") {
- yield new Promise((resolve) => {
- document.onreadystatechange = () => {
- if (document.readyState !== "complete") {
- return;
- }
- document.onreadystatechange = null;
- resolve();
- };
- });
- }
-
- document.getElementById("content")
- .addEventListener("input", function handleInputEvent(evt) {
- let resolve = fillPromiseResolvers.shift();
- if (!resolve) {
- ok(false, "Too many fills");
- return;
- }
-
- resolve(evt.target);
- });
-});
-
-add_task(function* loadUsernamePasswordSelectorRecipes() {
- yield loadRecipes({
- siteRecipes: [{
- hosts: ["mochi.test:8888"],
- usernameSelector: "input[name='uname1']",
- passwordSelector: "input[name='pword2']",
- }],
- });
-});
-
-add_task(function* testOverriddingFields() {
- // Insert the form dynamically so autofill is triggered after setup above.
- document.getElementById("content").innerHTML = `
- <!-- form with recipe for the username and password -->
- <form id="form1">
- <input type="text" name="uname1" data-expected="true">
- <input type="text" name="uname2" data-expected="false">
- <input type="password" name="pword1" data-expected="false">
- <input type="password" name="pword2" data-expected="true">
- </form>`;
-
- let elements = yield waitForFills(2);
- for (let element of elements) {
- is(element.dataset.expected, "true", `${element.name} was filled`);
- }
-});
-
-add_task(function* testDefaultHeuristics() {
- // Insert the form dynamically so autofill is triggered after setup above.
- document.getElementById("content").innerHTML = `
- <!-- Fallback to the default heuristics since the selectors don't match -->
- <form id="form2">
- <input type="text" name="uname3" data-expected="false">
- <input type="text" name="uname4" data-expected="true">
- <input type="password" name="pword3" data-expected="true">
- <input type="password" name="pword4" data-expected="false">
- </form>`;
-
- let elements = yield waitForFills(2);
- for (let element of elements) {
- is(element.dataset.expected, "true", `${element.name} was filled`);
- }
-});
-
-add_task(function* loadNotUsernameSelectorRecipes() {
- yield resetRecipes();
- yield loadRecipes({
- siteRecipes: [{
- hosts: ["mochi.test:8888"],
- notUsernameSelector: "input[name='not_uname1']"
- }],
- });
-});
-
-add_task(function* testNotUsernameField() {
- document.getElementById("content").innerHTML = `
- <!-- The field matching notUsernameSelector should be skipped -->
- <form id="form3">
- <input type="text" name="uname5" data-expected="true">
- <input type="text" name="not_uname1" data-expected="false">
- <input type="password" name="pword5" data-expected="true">
- </form>`;
-
- let elements = yield waitForFills(2);
- for (let element of elements) {
- is(element.dataset.expected, "true", `${element.name} was filled`);
- }
-});
-
-add_task(function* testNotUsernameFieldNoUsername() {
- document.getElementById("content").innerHTML = `
- <!-- The field matching notUsernameSelector should be skipped.
- No username field should be found and filled in this case -->
- <form id="form4">
- <input type="text" name="not_uname1" data-expected="false">
- <input type="password" name="pword6" data-expected="true">
- </form>`;
-
- let elements = yield waitForFills(1);
- for (let element of elements) {
- is(element.dataset.expected, "true", `${element.name} was filled`);
- }
-});
-
-</script>
-
-<p id="display"></p>
-
-<div id="content">
- // Forms are inserted dynamically
-</div>
-<pre id="test"></pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_username_focus.html b/toolkit/components/passwordmgr/test/mochitest/test_username_focus.html
deleted file mode 100644
index c93c1e9c9b..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_username_focus.html
+++ /dev/null
@@ -1,263 +0,0 @@
-
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test interaction between autocomplete and focus on username fields</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="satchel_common.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<script>
-let pwmgrCommonScript = runInParent(SimpleTest.getTestFileURL("pwmgr_common.js"));
-
-let readyPromise = registerRunTests();
-let chromeScript = runInParent(function chromeSetup() {
- const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
- let pwmgr = Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager);
-
- let login1A = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- let login1B = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- let login2A = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- let login2B = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- let login2C = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
-
- login1A.init("http://mochi.test:8888", "http://username-focus-1", null,
- "testuser1A", "testpass1A", "", "");
-
- login2A.init("http://mochi.test:8888", "http://username-focus-2", null,
- "testuser2A", "testpass2A", "", "");
- login2B.init("http://mochi.test:8888", "http://username-focus-2", null,
- "testuser2B", "testpass2B", "", "");
-
- pwmgr.addLogin(login1A);
- pwmgr.addLogin(login2A);
- pwmgr.addLogin(login2B);
-});
-</script>
-
-<p id="display"></p>
-<div id="content">
- <!-- first 3 forms have a matching user+pass login -->
-
- <!-- user+pass form. -->
- <form id="form-autofilled" action="http://username-focus-1">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <button type="submit" name="submit">Submit</button>
- </form>
-
- <!-- user+pass form, username prefilled -->
- <form id="form-autofilled-prefilled-un" action="http://username-focus-1">
- <input type="text" name="uname" value="testuser1A">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- user+pass form. -->
- <form id="form-autofilled-focused-dynamic" action="http://username-focus-1">
- <input type="text" name="uname">
- <input type="not-yet-password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
-
- <!-- next 5 forms have matching user+pass (2x) logins -->
-
- <!-- user+pass form. -->
- <form id="form-multiple" action="http://username-focus-2">
- <input type="text" name="uname">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- user+pass form dynamic with existing focus -->
- <form id="form-multiple-dynamic" action="http://username-focus-2">
- <input type="text" name="uname">
- <input type="not-yet-password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- user+pass form, username prefilled -->
- <form id="form-multiple-prefilled-un1" action="http://username-focus-2">
- <input type="text" name="uname" value="testuser2A">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- user+pass form, different username prefilled -->
- <form id="form-multiple-prefilled-un2" action="http://username-focus-2">
- <input type="text" name="uname" value="testuser2B">
- <input type="password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
- <!-- user+pass form, username prefilled with existing focus -->
- <form id="form-multiple-prefilled-focused-dynamic" action="http://username-focus-2">
- <input type="text" name="uname" value="testuser2B">
- <input type="not-yet-password" name="pword">
- <button type="submit">Submit</button>
- </form>
-
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-function removeFocus() {
- $_("-autofilled", "submit").focus();
-}
-
-add_task(function* setup() {
- yield SpecialPowers.pushPrefEnv({"set": [
- ["security.insecure_field_warning.contextual.enabled", false],
- ]});
-
- ok(readyPromise, "check promise is available");
- yield readyPromise;
-});
-
-add_task(function* test_autofilled() {
- let usernameField = $_("-autofilled", "uname");
- info("Username and password already filled so don't show autocomplete");
- let noPopupPromise = promiseNoUnexpectedPopupShown();
- usernameField.focus();
- yield noPopupPromise;
-
- removeFocus();
- usernameField.value = "testuser";
- info("Focus when we don't have an exact match");
- shownPromise = promiseACShown();
- usernameField.focus();
- yield shownPromise;
-});
-
-add_task(function* test_autofilled_prefilled_un() {
- let usernameField = $_("-autofilled-prefilled-un", "uname");
- info("Username and password already filled so don't show autocomplete");
- let noPopupPromise = promiseNoUnexpectedPopupShown();
- usernameField.focus();
- yield noPopupPromise;
-
- removeFocus();
- usernameField.value = "testuser";
- info("Focus when we don't have an exact match");
- shownPromise = promiseACShown();
- usernameField.focus();
- yield shownPromise;
-});
-
-add_task(function* test_autofilled_focused_dynamic() {
- let usernameField = $_("-autofilled-focused-dynamic", "uname");
- let passwordField = $_("-autofilled-focused-dynamic", "pword");
- info("Username and password will be filled while username focused");
- let noPopupPromise = promiseNoUnexpectedPopupShown();
- usernameField.focus();
- yield noPopupPromise;
- info("triggering autofill");
- noPopupPromise = promiseNoUnexpectedPopupShown();
- passwordField.type = "password";
- yield noPopupPromise;
-
- let popupState = yield getPopupState();
- is(popupState.open, false, "Check popup is closed");
-
- removeFocus();
- passwordField.value = "test";
- info("Focus when we don't have an exact match");
- shownPromise = promiseACShown();
- usernameField.focus();
- yield shownPromise;
-});
-
-// Begin testing forms that have multiple saved logins
-
-add_task(function* test_multiple() {
- let usernameField = $_("-multiple", "uname");
- info("Fields not filled due to multiple so autocomplete upon focus");
- shownPromise = promiseACShown();
- usernameField.focus();
- yield shownPromise;
-});
-
-add_task(function* test_multiple_dynamic() {
- let usernameField = $_("-multiple-dynamic", "uname");
- let passwordField = $_("-multiple-dynamic", "pword");
- info("Fields not filled but username is focused upon marking so open");
- let noPopupPromise = promiseNoUnexpectedPopupShown();
- usernameField.focus();
- yield noPopupPromise;
-
- info("triggering _fillForm code");
- let shownPromise = promiseACShown();
- passwordField.type = "password";
- yield shownPromise;
-});
-
-add_task(function* test_multiple_prefilled_un1() {
- let usernameField = $_("-multiple-prefilled-un1", "uname");
- info("Username and password already filled so don't show autocomplete");
- let noPopupPromise = promiseNoUnexpectedPopupShown();
- usernameField.focus();
- yield noPopupPromise;
-
- removeFocus();
- usernameField.value = "testuser";
- info("Focus when we don't have an exact match");
- shownPromise = promiseACShown();
- usernameField.focus();
- yield shownPromise;
-});
-
-add_task(function* test_multiple_prefilled_un2() {
- let usernameField = $_("-multiple-prefilled-un2", "uname");
- info("Username and password already filled so don't show autocomplete");
- let noPopupPromise = promiseNoUnexpectedPopupShown();
- usernameField.focus();
- yield noPopupPromise;
-
- removeFocus();
- usernameField.value = "testuser";
- info("Focus when we don't have an exact match");
- shownPromise = promiseACShown();
- usernameField.focus();
- yield shownPromise;
-});
-
-add_task(function* test_multiple_prefilled_focused_dynamic() {
- let usernameField = $_("-multiple-prefilled-focused-dynamic", "uname");
- let passwordField = $_("-multiple-prefilled-focused-dynamic", "pword");
- info("Username and password will be filled while username focused");
- let noPopupPromise = promiseNoUnexpectedPopupShown();
- usernameField.focus();
- yield noPopupPromise;
- info("triggering autofill");
- noPopupPromise = promiseNoUnexpectedPopupShown();
- passwordField.type = "password";
- yield noPopupPromise;
-
- let popupState = yield getPopupState();
- is(popupState.open, false, "Check popup is closed");
-
- removeFocus();
- passwordField.value = "test";
- info("Focus when we don't have an exact match");
- shownPromise = promiseACShown();
- usernameField.focus();
- yield shownPromise;
-});
-
-add_task(function* cleanup() {
- removeFocus();
-});
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_xhr_2.html b/toolkit/components/passwordmgr/test/mochitest/test_xhr_2.html
deleted file mode 100644
index fa8357792b..0000000000
--- a/toolkit/components/passwordmgr/test/mochitest/test_xhr_2.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=654348
--->
-<head>
- <meta charset="utf-8">
- <title>Test XHR auth with user and pass arguments</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body onload="startTest()">
-<script class="testbody" type="text/javascript">
-
-/**
- * This test checks we correctly ignore authentication entry
- * for a subpath and use creds from the URL when provided when XHR
- * is used with filled user name and password.
- *
- * 1. connect authenticate.sjs that excepts user1:pass1 password
- * 2. connect authenticate.sjs that this time expects differentuser2:pass2 password
- * we must use the creds that are provided to the xhr witch are different and expected
- */
-
-function doxhr(URL, user, pass, code, next) {
- var xhr = new XMLHttpRequest();
- if (user && pass)
- xhr.open("POST", URL, true, user, pass);
- else
- xhr.open("POST", URL, true);
- xhr.onload = function() {
- is(xhr.status, code, "expected response code " + code);
- next();
- };
- xhr.onerror = function() {
- ok(false, "request passed");
- finishTest();
- };
- xhr.send();
-}
-
-function startTest() {
- doxhr("authenticate.sjs?user=dummy&pass=pass1&realm=realm1&formauth=1", "dummy", "dummy", 403, function() {
- doxhr("authenticate.sjs?user=dummy&pass=pass1&realm=realm1&formauth=1", "dummy", "pass1", 200, finishTest);
- });
-}
-
-function finishTest() {
- SimpleTest.finish();
-}
-
-</script>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/prompt_common.js b/toolkit/components/passwordmgr/test/prompt_common.js
deleted file mode 100644
index 267e697ae6..0000000000
--- a/toolkit/components/passwordmgr/test/prompt_common.js
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * NOTE:
- * This file is currently only being used for tests which haven't been
- * fixed to work with e10s. Favor using the `prompt_common.js` file that
- * is in `toolkit/components/prompts/test/` instead.
- */
-
-var Ci = SpecialPowers.Ci;
-ok(Ci != null, "Access Ci");
-var Cc = SpecialPowers.Cc;
-ok(Cc != null, "Access Cc");
-
-var didDialog;
-
-var timer; // keep in outer scope so it's not GC'd before firing
-function startCallbackTimer() {
- didDialog = false;
-
- // Delay before the callback twiddles the prompt.
- const dialogDelay = 10;
-
- // Use a timer to invoke a callback to twiddle the authentication dialog
- timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
- timer.init(observer, dialogDelay, Ci.nsITimer.TYPE_ONE_SHOT);
-}
-
-
-var observer = SpecialPowers.wrapCallbackObject({
- QueryInterface : function (iid) {
- const interfaces = [Ci.nsIObserver,
- Ci.nsISupports, Ci.nsISupportsWeakReference];
-
- if (!interfaces.some( function(v) { return iid.equals(v); } ))
- throw SpecialPowers.Components.results.NS_ERROR_NO_INTERFACE;
- return this;
- },
-
- observe : function (subject, topic, data) {
- var doc = getDialogDoc();
- if (doc)
- handleDialog(doc, testNum);
- else
- startCallbackTimer(); // try again in a bit
- }
-});
-
-function getDialogDoc() {
- // Find the <browser> which contains notifyWindow, by looking
- // through all the open windows and all the <browsers> in each.
- var wm = Cc["@mozilla.org/appshell/window-mediator;1"].
- getService(Ci.nsIWindowMediator);
- // var enumerator = wm.getEnumerator("navigator:browser");
- var enumerator = wm.getXULWindowEnumerator(null);
-
- while (enumerator.hasMoreElements()) {
- var win = enumerator.getNext();
- var windowDocShell = win.QueryInterface(Ci.nsIXULWindow).docShell;
-
- var containedDocShells = windowDocShell.getDocShellEnumerator(
- Ci.nsIDocShellTreeItem.typeChrome,
- Ci.nsIDocShell.ENUMERATE_FORWARDS);
- while (containedDocShells.hasMoreElements()) {
- // Get the corresponding document for this docshell
- var childDocShell = containedDocShells.getNext();
- // We don't want it if it's not done loading.
- if (childDocShell.busyFlags != Ci.nsIDocShell.BUSY_FLAGS_NONE)
- continue;
- var childDoc = childDocShell.QueryInterface(Ci.nsIDocShell)
- .contentViewer
- .DOMDocument;
-
- // ok(true, "Got window: " + childDoc.location.href);
- if (childDoc.location.href == "chrome://global/content/commonDialog.xul")
- return childDoc;
- }
- }
-
- return null;
-}
diff --git a/toolkit/components/passwordmgr/test/pwmgr_common.js b/toolkit/components/passwordmgr/test/pwmgr_common.js
deleted file mode 100644
index fa7c4fd85b..0000000000
--- a/toolkit/components/passwordmgr/test/pwmgr_common.js
+++ /dev/null
@@ -1,509 +0,0 @@
-const TESTS_DIR = "/tests/toolkit/components/passwordmgr/test/";
-
-/**
- * Returns the element with the specified |name| attribute.
- */
-function $_(formNum, name) {
- var form = document.getElementById("form" + formNum);
- if (!form) {
- logWarning("$_ couldn't find requested form " + formNum);
- return null;
- }
-
- var element = form.children.namedItem(name);
- if (!element) {
- logWarning("$_ couldn't find requested element " + name);
- return null;
- }
-
- // Note that namedItem is a bit stupid, and will prefer an
- // |id| attribute over a |name| attribute when looking for
- // the element. Login Mananger happens to use .namedItem
- // anyway, but let's rigorously check it here anyway so
- // that we don't end up with tests that mistakenly pass.
-
- if (element.getAttribute("name") != name) {
- logWarning("$_ got confused.");
- return null;
- }
-
- return element;
-}
-
-/**
- * Check a form for expected values. If an argument is null, a field's
- * expected value will be the default value.
- *
- * <form id="form#">
- * checkForm(#, "foo");
- */
-function checkForm(formNum, val1, val2, val3) {
- var e, form = document.getElementById("form" + formNum);
- ok(form, "Locating form " + formNum);
-
- var numToCheck = arguments.length - 1;
-
- if (!numToCheck--)
- return;
- e = form.elements[0];
- if (val1 == null)
- is(e.value, e.defaultValue, "Test default value of field " + e.name +
- " in form " + formNum);
- else
- is(e.value, val1, "Test value of field " + e.name +
- " in form " + formNum);
-
-
- if (!numToCheck--)
- return;
- e = form.elements[1];
- if (val2 == null)
- is(e.value, e.defaultValue, "Test default value of field " + e.name +
- " in form " + formNum);
- else
- is(e.value, val2, "Test value of field " + e.name +
- " in form " + formNum);
-
-
- if (!numToCheck--)
- return;
- e = form.elements[2];
- if (val3 == null)
- is(e.value, e.defaultValue, "Test default value of field " + e.name +
- " in form " + formNum);
- else
- is(e.value, val3, "Test value of field " + e.name +
- " in form " + formNum);
-}
-
-/**
- * Check a form for unmodified values from when page was loaded.
- *
- * <form id="form#">
- * checkUnmodifiedForm(#);
- */
-function checkUnmodifiedForm(formNum) {
- var form = document.getElementById("form" + formNum);
- ok(form, "Locating form " + formNum);
-
- for (var i = 0; i < form.elements.length; i++) {
- var ele = form.elements[i];
-
- // No point in checking form submit/reset buttons.
- if (ele.type == "submit" || ele.type == "reset")
- continue;
-
- is(ele.value, ele.defaultValue, "Test to default value of field " +
- ele.name + " in form " + formNum);
- }
-}
-
-/**
- * Mochitest gives us a sendKey(), but it's targeted to a specific element.
- * This basically sends an untargeted key event, to whatever's focused.
- */
-function doKey(aKey, modifier) {
- var keyName = "DOM_VK_" + aKey.toUpperCase();
- var key = KeyEvent[keyName];
-
- // undefined --> null
- if (!modifier)
- modifier = null;
-
- // Window utils for sending fake sey events.
- var wutils = SpecialPowers.wrap(window).
- QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor).
- getInterface(SpecialPowers.Ci.nsIDOMWindowUtils);
-
- if (wutils.sendKeyEvent("keydown", key, 0, modifier)) {
- wutils.sendKeyEvent("keypress", key, 0, modifier);
- }
- wutils.sendKeyEvent("keyup", key, 0, modifier);
-}
-
-/**
- * Init with a common login
- * If selfFilling is true or non-undefined, fires an event at the page so that
- * the test can start checking filled-in values. Tests that check observer
- * notifications might be confused by this.
- */
-function commonInit(selfFilling) {
- var pwmgr = SpecialPowers.Cc["@mozilla.org/login-manager;1"].
- getService(SpecialPowers.Ci.nsILoginManager);
- ok(pwmgr != null, "Access LoginManager");
-
- // Check that initial state has no logins
- var logins = pwmgr.getAllLogins();
- is(logins.length, 0, "Not expecting logins to be present");
- var disabledHosts = pwmgr.getAllDisabledHosts();
- if (disabledHosts.length) {
- ok(false, "Warning: wasn't expecting disabled hosts to be present.");
- for (var host of disabledHosts)
- pwmgr.setLoginSavingEnabled(host, true);
- }
-
- // Add a login that's used in multiple tests
- var login = SpecialPowers.Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(SpecialPowers.Ci.nsILoginInfo);
- login.init("http://mochi.test:8888", "http://mochi.test:8888", null,
- "testuser", "testpass", "uname", "pword");
- pwmgr.addLogin(login);
-
- // Last sanity check
- logins = pwmgr.getAllLogins();
- is(logins.length, 1, "Checking for successful init login");
- disabledHosts = pwmgr.getAllDisabledHosts();
- is(disabledHosts.length, 0, "Checking for no disabled hosts");
-
- if (selfFilling)
- return;
-
- if (this.sendAsyncMessage) {
- sendAsyncMessage("registerRunTests");
- } else {
- registerRunTests();
- }
-}
-
-function registerRunTests() {
- return new Promise(resolve => {
- // We provide a general mechanism for our tests to know when they can
- // safely run: we add a final form that we know will be filled in, wait
- // for the login manager to tell us that it's filled in and then continue
- // with the rest of the tests.
- window.addEventListener("DOMContentLoaded", (event) => {
- var form = document.createElement('form');
- form.id = 'observerforcer';
- var username = document.createElement('input');
- username.name = 'testuser';
- form.appendChild(username);
- var password = document.createElement('input');
- password.name = 'testpass';
- password.type = 'password';
- form.appendChild(password);
-
- var observer = SpecialPowers.wrapCallback(function(subject, topic, data) {
- var formLikeRoot = subject.QueryInterface(SpecialPowers.Ci.nsIDOMNode);
- if (formLikeRoot.id !== 'observerforcer')
- return;
- SpecialPowers.removeObserver(observer, "passwordmgr-processed-form");
- formLikeRoot.remove();
- SimpleTest.executeSoon(() => {
- var runTestEvent = new Event("runTests");
- window.dispatchEvent(runTestEvent);
- resolve();
- });
- });
- SpecialPowers.addObserver(observer, "passwordmgr-processed-form", false);
-
- document.body.appendChild(form);
- });
- });
-}
-
-const masterPassword = "omgsecret!";
-
-function enableMasterPassword() {
- setMasterPassword(true);
-}
-
-function disableMasterPassword() {
- setMasterPassword(false);
-}
-
-function setMasterPassword(enable) {
- var oldPW, newPW;
- if (enable) {
- oldPW = "";
- newPW = masterPassword;
- } else {
- oldPW = masterPassword;
- newPW = "";
- }
- // Set master password. Note that this does not log you in, so the next
- // invocation of pwmgr can trigger a MP prompt.
-
- var pk11db = Cc["@mozilla.org/security/pk11tokendb;1"].getService(Ci.nsIPK11TokenDB);
- var token = pk11db.findTokenByName("");
- info("MP change from " + oldPW + " to " + newPW);
- token.changePassword(oldPW, newPW);
-}
-
-function logoutMasterPassword() {
- var sdr = Cc["@mozilla.org/security/sdr;1"].getService(Ci.nsISecretDecoderRing);
- sdr.logoutAndTeardown();
-}
-
-function dumpLogins(pwmgr) {
- var logins = pwmgr.getAllLogins();
- ok(true, "----- dumpLogins: have " + logins.length + " logins. -----");
- for (var i = 0; i < logins.length; i++)
- dumpLogin("login #" + i + " --- ", logins[i]);
-}
-
-function dumpLogin(label, login) {
- var loginText = "";
- loginText += "host: ";
- loginText += login.hostname;
- loginText += " / formURL: ";
- loginText += login.formSubmitURL;
- loginText += " / realm: ";
- loginText += login.httpRealm;
- loginText += " / user: ";
- loginText += login.username;
- loginText += " / pass: ";
- loginText += login.password;
- loginText += " / ufield: ";
- loginText += login.usernameField;
- loginText += " / pfield: ";
- loginText += login.passwordField;
- ok(true, label + loginText);
-}
-
-function getRecipeParent() {
- var { LoginManagerParent } = SpecialPowers.Cu.import("resource://gre/modules/LoginManagerParent.jsm", {});
- if (!LoginManagerParent.recipeParentPromise) {
- return null;
- }
- return LoginManagerParent.recipeParentPromise.then((recipeParent) => {
- return SpecialPowers.wrap(recipeParent);
- });
-}
-
-/**
- * Resolves when a specified number of forms have been processed.
- */
-function promiseFormsProcessed(expectedCount = 1) {
- var processedCount = 0;
- return new Promise((resolve, reject) => {
- function onProcessedForm(subject, topic, data) {
- processedCount++;
- if (processedCount == expectedCount) {
- SpecialPowers.removeObserver(onProcessedForm, "passwordmgr-processed-form");
- resolve(SpecialPowers.Cu.waiveXrays(subject), data);
- }
- }
- SpecialPowers.addObserver(onProcessedForm, "passwordmgr-processed-form", false);
- });
-}
-
-function loadRecipes(recipes) {
- info("Loading recipes");
- return new Promise(resolve => {
- chromeScript.addMessageListener("loadedRecipes", function loaded() {
- chromeScript.removeMessageListener("loadedRecipes", loaded);
- resolve(recipes);
- });
- chromeScript.sendAsyncMessage("loadRecipes", recipes);
- });
-}
-
-function resetRecipes() {
- info("Resetting recipes");
- return new Promise(resolve => {
- chromeScript.addMessageListener("recipesReset", function reset() {
- chromeScript.removeMessageListener("recipesReset", reset);
- resolve();
- });
- chromeScript.sendAsyncMessage("resetRecipes");
- });
-}
-
-function promiseStorageChanged(expectedChangeTypes) {
- return new Promise((resolve, reject) => {
- function onStorageChanged({ topic, data }) {
- let changeType = expectedChangeTypes.shift();
- is(data, changeType, "Check expected passwordmgr-storage-changed type");
- if (expectedChangeTypes.length === 0) {
- chromeScript.removeMessageListener("storageChanged", onStorageChanged);
- resolve();
- }
- }
- chromeScript.addMessageListener("storageChanged", onStorageChanged);
- });
-}
-
-function promisePromptShown(expectedTopic) {
- return new Promise((resolve, reject) => {
- function onPromptShown({ topic, data }) {
- is(topic, expectedTopic, "Check expected prompt topic");
- chromeScript.removeMessageListener("promptShown", onPromptShown);
- resolve();
- }
- chromeScript.addMessageListener("promptShown", onPromptShown);
- });
-}
-
-/**
- * Run a function synchronously in the parent process and destroy it in the test cleanup function.
- * @param {Function|String} aFunctionOrURL - either a function that will be stringified and run
- * or the URL to a JS file.
- * @return {Object} - the return value of loadChromeScript providing message-related methods.
- * @see loadChromeScript in specialpowersAPI.js
- */
-function runInParent(aFunctionOrURL) {
- let chromeScript = SpecialPowers.loadChromeScript(aFunctionOrURL);
- SimpleTest.registerCleanupFunction(() => {
- chromeScript.destroy();
- });
- return chromeScript;
-}
-
-/**
- * Run commonInit synchronously in the parent then run the test function after the runTests event.
- *
- * @param {Function} aFunction The test function to run
- */
-function runChecksAfterCommonInit(aFunction = null) {
- SimpleTest.waitForExplicitFinish();
- let pwmgrCommonScript = runInParent(SimpleTest.getTestFileURL("pwmgr_common.js"));
- if (aFunction) {
- window.addEventListener("runTests", aFunction);
- pwmgrCommonScript.addMessageListener("registerRunTests", () => registerRunTests());
- }
- pwmgrCommonScript.sendSyncMessage("setupParent");
- return pwmgrCommonScript;
-}
-
-// Code to run when loaded as a chrome script in tests via loadChromeScript
-if (this.addMessageListener) {
- const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
- var SpecialPowers = { Cc, Ci, Cr, Cu, };
- var ok, is;
- // Ignore ok/is in commonInit since they aren't defined in a chrome script.
- ok = is = () => {}; // eslint-disable-line no-native-reassign
-
- Cu.import("resource://gre/modules/LoginHelper.jsm");
- Cu.import("resource://gre/modules/LoginManagerParent.jsm");
- Cu.import("resource://gre/modules/Services.jsm");
- Cu.import("resource://gre/modules/Task.jsm");
-
- function onStorageChanged(subject, topic, data) {
- sendAsyncMessage("storageChanged", {
- topic,
- data,
- });
- }
- Services.obs.addObserver(onStorageChanged, "passwordmgr-storage-changed", false);
-
- function onPrompt(subject, topic, data) {
- sendAsyncMessage("promptShown", {
- topic,
- data,
- });
- }
- Services.obs.addObserver(onPrompt, "passwordmgr-prompt-change", false);
- Services.obs.addObserver(onPrompt, "passwordmgr-prompt-save", false);
-
- addMessageListener("setupParent", ({selfFilling = false} = {selfFilling: false}) => {
- // Force LoginManagerParent to init for the tests since it's normally delayed
- // by apps such as on Android.
- LoginManagerParent.init();
-
- commonInit(selfFilling);
- sendAsyncMessage("doneSetup");
- });
-
- addMessageListener("loadRecipes", Task.async(function*(recipes) {
- var recipeParent = yield LoginManagerParent.recipeParentPromise;
- yield recipeParent.load(recipes);
- sendAsyncMessage("loadedRecipes", recipes);
- }));
-
- addMessageListener("resetRecipes", Task.async(function*() {
- let recipeParent = yield LoginManagerParent.recipeParentPromise;
- yield recipeParent.reset();
- sendAsyncMessage("recipesReset");
- }));
-
- addMessageListener("proxyLoginManager", msg => {
- // Recreate nsILoginInfo objects from vanilla JS objects.
- let recreatedArgs = msg.args.map((arg, index) => {
- if (msg.loginInfoIndices.includes(index)) {
- return LoginHelper.vanillaObjectToLogin(arg);
- }
-
- return arg;
- });
-
- let rv = Services.logins[msg.methodName](...recreatedArgs);
- if (rv instanceof Ci.nsILoginInfo) {
- rv = LoginHelper.loginToVanillaObject(rv);
- }
- return rv;
- });
-
- var globalMM = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
- globalMM.addMessageListener("RemoteLogins:onFormSubmit", function onFormSubmit(message) {
- sendAsyncMessage("formSubmissionProcessed", message.data, message.objects);
- });
-} else {
- // Code to only run in the mochitest pages (not in the chrome script).
- SpecialPowers.pushPrefEnv({"set": [["signon.autofillForms.http", true],
- ["security.insecure_field_warning.contextual.enabled", false]]
- });
-
- SimpleTest.registerCleanupFunction(() => {
- SpecialPowers.popPrefEnv();
- runInParent(function cleanupParent() {
- const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
- Cu.import("resource://gre/modules/Services.jsm");
- Cu.import("resource://gre/modules/LoginManagerParent.jsm");
-
- // Remove all logins and disabled hosts
- Services.logins.removeAllLogins();
-
- let disabledHosts = Services.logins.getAllDisabledHosts();
- disabledHosts.forEach(host => Services.logins.setLoginSavingEnabled(host, true));
-
- let authMgr = Cc["@mozilla.org/network/http-auth-manager;1"].
- getService(Ci.nsIHttpAuthManager);
- authMgr.clearAll();
-
- if (LoginManagerParent._recipeManager) {
- LoginManagerParent._recipeManager.reset();
- }
-
- // Cleanup PopupNotifications (if on a relevant platform)
- let chromeWin = Services.wm.getMostRecentWindow("navigator:browser");
- if (chromeWin && chromeWin.PopupNotifications) {
- let notes = chromeWin.PopupNotifications._currentNotifications;
- if (notes.length > 0) {
- dump("Removing " + notes.length + " popup notifications.\n");
- }
- for (let note of notes) {
- note.remove();
- }
- }
- });
- });
-
-
- let { LoginHelper } = SpecialPowers.Cu.import("resource://gre/modules/LoginHelper.jsm", {});
- /**
- * Proxy for Services.logins (nsILoginManager).
- * Only supports arguments which support structured clone plus {nsILoginInfo}
- * Assumes properties are methods.
- */
- this.LoginManager = new Proxy({}, {
- get(target, prop, receiver) {
- return (...args) => {
- let loginInfoIndices = [];
- let cloneableArgs = args.map((val, index) => {
- if (SpecialPowers.call_Instanceof(val, SpecialPowers.Ci.nsILoginInfo)) {
- loginInfoIndices.push(index);
- return LoginHelper.loginToVanillaObject(val);
- }
-
- return val;
- });
-
- return chromeScript.sendSyncMessage("proxyLoginManager", {
- args: cloneableArgs,
- loginInfoIndices,
- methodName: prop,
- })[0][0];
- };
- },
- });
-}
diff --git a/toolkit/components/passwordmgr/test/subtst_master_pass.html b/toolkit/components/passwordmgr/test/subtst_master_pass.html
deleted file mode 100644
index 20211866ae..0000000000
--- a/toolkit/components/passwordmgr/test/subtst_master_pass.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<h2>MP subtest</h2>
-This form triggers a MP and gets filled in.<br>
-<form>
-Username: <input type="text" id="userfield" name="u"><br>
-Password: <input type="password" id="passfield" name="p"><br>
-<script>
- // Only notify when we fill in the password field.
- document.getElementById("passfield").addEventListener("input", function() {
- parent.postMessage("filled", "*");
- });
-</script>
-</form>
diff --git a/toolkit/components/passwordmgr/test/subtst_prompt_async.html b/toolkit/components/passwordmgr/test/subtst_prompt_async.html
deleted file mode 100644
index f60f638145..0000000000
--- a/toolkit/components/passwordmgr/test/subtst_prompt_async.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Multiple auth request</title>
-</head>
-<body>
- <iframe id="iframe1" src="http://example.com/tests/toolkit/components/passwordmgr/test/authenticate.sjs?r=1&user=user3name&pass=user3pass&realm=mochirealm3&proxy_user=proxy_user2&proxy_pass=proxy_pass2&proxy_realm=proxy_realm2"></iframe>
- <iframe id="iframe2" src="http://example.com/tests/toolkit/components/passwordmgr/test/authenticate.sjs?r=2&user=user3name&pass=user3pass&realm=mochirealm3&proxy_user=proxy_user2&proxy_pass=proxy_pass2&proxy_realm=proxy_realm2"></iframe>
- <iframe id="iframe3" src="http://example.com/tests/toolkit/components/passwordmgr/test/authenticate.sjs?r=3&user=user3name&pass=user3pass&realm=mochirealm3&proxy_user=proxy_user2&proxy_pass=proxy_pass2&proxy_realm=proxy_realm2"></iframe>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/test_master_password.html b/toolkit/components/passwordmgr/test/test_master_password.html
deleted file mode 100644
index c8884811f7..0000000000
--- a/toolkit/components/passwordmgr/test/test_master_password.html
+++ /dev/null
@@ -1,308 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test for master password</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <script type="text/javascript" src="prompt_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Login Manager test: master password.
-<script>
-"use strict";
-
-commonInit();
-SimpleTest.waitForExplicitFinish();
-SimpleTest.requestFlakyTimeout("untriaged");
-
-var pwmgr = SpecialPowers.Cc["@mozilla.org/login-manager;1"]
- .getService(SpecialPowers.Ci.nsILoginManager);
-var pwcrypt = SpecialPowers.Cc["@mozilla.org/login-manager/crypto/SDR;1"]
- .getService(Ci.nsILoginManagerCrypto);
-
-var nsLoginInfo = new SpecialPowers.wrap(SpecialPowers.Components).Constructor("@mozilla.org/login-manager/loginInfo;1", Ci.nsILoginInfo);
-
-var exampleCom = "http://example.com/tests/toolkit/components/passwordmgr/test/";
-var exampleOrg = "http://example.org/tests/toolkit/components/passwordmgr/test/";
-
-var login1 = new nsLoginInfo();
-var login2 = new nsLoginInfo();
-
-login1.init("http://example.com", "http://example.com", null,
- "user1", "pass1", "uname", "pword");
-login2.init("http://example.org", "http://example.org", null,
- "user2", "pass2", "uname", "pword");
-
-pwmgr.addLogin(login1);
-pwmgr.addLogin(login2);
-</script>
-
-<p id="display"></p>
-
-<div id="content" style="display: none">
-<iframe id="iframe1"></iframe>
-<iframe id="iframe2"></iframe>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-var testNum = 1;
-var iframe1 = document.getElementById("iframe1");
-var iframe2 = document.getElementById("iframe2");
-
-// A couple of tests have to wait until the password manager gets around to
-// filling in the password in the subtest (after we dismiss the master
-// password dialog). In order to accomplish this, the test waits for an event
-// and then posts a message back up to us telling us to continue.
-var continuation = null;
-addEventListener("message", () => {
- if (continuation) {
- var c = continuation;
- continuation = null;
- c();
- }
-});
-
-/*
- * handleDialog
- *
- * Invoked a short period of time after calling startCallbackTimer(), and
- * allows testing the actual auth dialog while it's being displayed. Tests
- * should call startCallbackTimer() each time the auth dialog is expected (the
- * timer is a one-shot).
- */
-function handleDialog(doc, testNumber) {
- ok(true, "handleDialog running for test " + testNumber);
-
- var clickOK = true;
- var doNothing = false;
- var passfield = doc.getElementById("password1Textbox");
- var dialog = doc.getElementById("commonDialog");
-
- switch (testNumber) {
- case 1:
- is(passfield.getAttribute("value"), "", "Checking empty prompt");
- passfield.setAttribute("value", masterPassword);
- is(passfield.getAttribute("value"), masterPassword, "Checking filled prompt");
- break;
-
- case 2:
- clickOK = false;
- break;
-
- case 3:
- is(passfield.getAttribute("value"), "", "Checking empty prompt");
- passfield.setAttribute("value", masterPassword);
- break;
-
- case 4:
- doNothing = true;
- break;
-
- case 5:
- is(passfield.getAttribute("value"), "", "Checking empty prompt");
- passfield.setAttribute("value", masterPassword);
- break;
-
- default:
- ok(false, "Uhh, unhandled switch for testNum #" + testNumber);
- break;
- }
-
- didDialog = true;
-
- if (!doNothing) {
- SpecialPowers.addObserver(outerWindowObserver, "outer-window-destroyed", false);
- if (clickOK)
- dialog.acceptDialog();
- else
- dialog.cancelDialog();
- }
-
- ok(true, "handleDialog done for test " + testNumber);
-
- if (testNumber == 4)
- checkTest4A();
-}
-
-var outerWindowObserver = {
- observe: function(id) {
- SpecialPowers.removeObserver(outerWindowObserver, "outer-window-destroyed");
- var func;
- if (testNum == 1)
- func = startTest2;
- else if (testNum == 2)
- func = startTest3;
-
- // For tests 3 and 4C, we use the 'continuation' mechanism, described
- // above.
- if (func)
- setTimeout(func, 300);
- }
-};
-
-
-function startTest1() {
- ok(pwcrypt.isLoggedIn, "should be initially logged in (no MP)");
- enableMasterPassword();
- ok(!pwcrypt.isLoggedIn, "should be logged out after setting MP");
-
- // --- Test 1 ---
- // Trigger a MP prompt via the API
- startCallbackTimer();
- var logins = pwmgr.getAllLogins();
- ok(didDialog, "handleDialog was invoked");
- is(logins.length, 3, "expected number of logins");
-
- ok(pwcrypt.isLoggedIn, "should be logged in after MP prompt");
- logoutMasterPassword();
- ok(!pwcrypt.isLoggedIn, "should be logged out");
-}
-
-function startTest2() {
- // Try again but click cancel.
- testNum++;
- startCallbackTimer();
- var failedAsExpected = false;
- logins = null;
- try {
- logins = pwmgr.getAllLogins();
- } catch (e) { failedAsExpected = true; }
- ok(didDialog, "handleDialog was invoked");
- ok(failedAsExpected, "getAllLogins should have thrown");
- is(logins, null, "shouldn't have gotten logins");
- ok(!pwcrypt.isLoggedIn, "should still be logged out");
-}
-
-function startTest3() {
- // Load a single iframe to trigger a MP
- testNum++;
- iframe1.src = exampleCom + "subtst_master_pass.html";
- continuation = checkTest3;
- startCallbackTimer();
-}
-
-function checkTest3() {
- ok(true, "checkTest3 starting");
- ok(didDialog, "handleDialog was invoked");
-
- // check contents of iframe1 fields
- var u = SpecialPowers.wrap(iframe1).contentDocument.getElementById("userfield");
- var p = SpecialPowers.wrap(iframe1).contentDocument.getElementById("passfield");
- is(u.value, "user1", "checking expected user to have been filled in");
- is(p.value, "pass1", "checking expected pass to have been filled in");
-
- ok(pwcrypt.isLoggedIn, "should be logged in");
- logoutMasterPassword();
- ok(!pwcrypt.isLoggedIn, "should be logged out");
-
-
- // --- Test 4 ---
- // first part of loading 2 MP-triggering iframes
- testNum++;
- iframe1.src = exampleOrg + "subtst_master_pass.html";
- // start the callback, but we'll not enter the MP, just call checkTest4A
- startCallbackTimer();
-}
-
-function checkTest4A() {
- ok(true, "checkTest4A starting");
- ok(didDialog, "handleDialog was invoked");
-
- // check contents of iframe1 fields
- var u = SpecialPowers.wrap(iframe1).contentDocument.getElementById("userfield");
- var p = SpecialPowers.wrap(iframe1).contentDocument.getElementById("passfield");
- is(u.value, "", "checking expected empty user");
- is(p.value, "", "checking expected empty pass");
-
-
- ok(!pwcrypt.isLoggedIn, "should be logged out");
-
- // XXX check that there's 1 MP window open
-
- // Load another iframe with a login form
- // This should detect that there's already a pending MP prompt, and not
- // put up a second one. The load event will fire (note that when pwmgr is
- // driven from DOMContentLoaded, if that blocks due to prompting for a MP,
- // the load even will also be blocked until the prompt is dismissed).
- iframe2.onload = checkTest4B_delay;
- iframe2.src = exampleCom + "subtst_master_pass.html";
-}
-
-function checkTest4B_delay() {
- // Testing a negative, wait a little to give the login manager a chance to
- // (incorrectly) fill in the form. Note, we cannot use setTimeout()
- // here because the modal window suspends all window timers. Instead we
- // must use a chrome script to use nsITimer directly.
- let chromeURL = SimpleTest.getTestFileURL("chrome_timeout.js");
- let script = SpecialPowers.loadChromeScript(chromeURL);
- script.addMessageListener('ready', _ => {
- script.sendAsyncMessage('setTimeout', { delay: 500 });
- });
- script.addMessageListener('timeout', checkTest4B);
-}
-
-function checkTest4B() {
- ok(true, "checkTest4B starting");
- // iframe2 should load without having triggered a MP prompt (because one
- // is already waiting)
-
- // check contents of iframe2 fields
- var u = SpecialPowers.wrap(iframe2).contentDocument.getElementById("userfield");
- var p = SpecialPowers.wrap(iframe2).contentDocument.getElementById("passfield");
- is(u.value, "", "checking expected empty user");
- is(p.value, "", "checking expected empty pass");
-
- // XXX check that there's 1 MP window open
- ok(!pwcrypt.isLoggedIn, "should be logged out");
-
- continuation = checkTest4C;
-
- // Ok, now enter the MP. The MP prompt is already up, but we'll just reuse startCallBackTimer.
- // --- Test 5 ---
- testNum++;
- startCallbackTimer();
-}
-
-function checkTest4C() {
- ok(true, "checkTest4C starting");
- ok(didDialog, "handleDialog was invoked");
-
- // We shouldn't have to worry about iframe1's load event racing with
- // filling of iframe2's data. We notify observers synchronously, so
- // iframe2's observer will process iframe2 before iframe1 even finishes
- // processing the form (which is blocking its load event).
- ok(pwcrypt.isLoggedIn, "should be logged in");
-
- // check contents of iframe1 fields
- var u = SpecialPowers.wrap(iframe1).contentDocument.getElementById("userfield");
- var p = SpecialPowers.wrap(iframe1).contentDocument.getElementById("passfield");
- is(u.value, "user2", "checking expected user to have been filled in");
- is(p.value, "pass2", "checking expected pass to have been filled in");
-
- // check contents of iframe2 fields
- u = SpecialPowers.wrap(iframe2).contentDocument.getElementById("userfield");
- p = SpecialPowers.wrap(iframe2).contentDocument.getElementById("passfield");
- is(u.value, "user1", "checking expected user to have been filled in");
- is(p.value, "pass1", "checking expected pass to have been filled in");
-
- SimpleTest.finish();
-}
-
-// XXX do a test5ABC with clicking cancel?
-
-SimpleTest.registerCleanupFunction(function finishTest() {
- disableMasterPassword();
-
- pwmgr.removeLogin(login1);
- pwmgr.removeLogin(login2);
-});
-
-window.addEventListener("runTests", startTest1);
-</script>
-</pre>
-</body>
-</html>
-
diff --git a/toolkit/components/passwordmgr/test/test_prompt_async.html b/toolkit/components/passwordmgr/test/test_prompt_async.html
deleted file mode 100644
index 38b34679aa..0000000000
--- a/toolkit/components/passwordmgr/test/test_prompt_async.html
+++ /dev/null
@@ -1,540 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test for Async Auth Prompt</title>
- <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="prompt_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-
- <script class="testbody" type="text/javascript">
- SimpleTest.waitForExplicitFinish();
- SimpleTest.requestFlakyTimeout("untriaged");
-
- const { NetUtil } = SpecialPowers.Cu.import('resource://gre/modules/NetUtil.jsm');
-
- var prefs = Cc["@mozilla.org/preferences-service;1"].
- getService(Ci.nsIPrefBranch);
- prefs.setIntPref("network.auth.subresource-http-auth-allow", 2);
- // Class monitoring number of open dialog windows
- // It checks there is always open just a single dialog per application
- function dialogMonitor() {
- var observerService = SpecialPowers.Cc["@mozilla.org/observer-service;1"]
- .getService(Ci.nsIObserverService);
- observerService.addObserver(this, "domwindowopened", false);
- observerService.addObserver(this, "domwindowclosed", false);
- }
-
- /*
- * As documented in Bug 718543, checking equality of objects pulled
- * from SpecialPowers-wrapped objects is unreliable. Because of that,
- * `dialogMonitor` now tracks the number of open windows rather than
- * specific window objects.
- *
- * NB: Because the constructor (above) adds |this| directly as an observer,
- * we need to do SpecialPowers.wrapCallbackObject directly on the prototype.
- */
- dialogMonitor.prototype = SpecialPowers.wrapCallbackObject({
- windowsOpen : 0,
- windowsRegistered : 0,
-
- QueryInterface : function (iid) {
- const interfaces = [Ci.nsIObserver, Ci.nsISupports];
-
- if (!interfaces.some( function(v) { return iid.equals(v); } ))
- throw SpecialPowers.Cr.NS_ERROR_NO_INTERFACE;
- return this;
- },
-
- observe: function(subject, topic, data) {
- if (topic === "domwindowopened") {
- this.windowsOpen++;
- this.windowsRegistered++;
- return;
- }
- if (topic === "domwindowclosed") {
- this.windowsOpen--;
- return;
- }
- },
-
- shutdown: function() {
- var observerService = SpecialPowers.Cc["@mozilla.org/observer-service;1"]
- .getService(Ci.nsIObserverService);
- observerService.removeObserver(this, "domwindowopened");
- observerService.removeObserver(this, "domwindowclosed");
- },
-
- reset: function() {
- this.windowsOpen = 0;
- this.windowsRegistered = 0;
- }
- });
-
- var monitor = new dialogMonitor();
-
- var pwmgr, logins = [];
-
- function initLogins(pi) {
- pwmgr = SpecialPowers.Cc["@mozilla.org/login-manager;1"]
- .getService(Ci.nsILoginManager);
-
- function addLogin(host, realm, user, pass) {
- var login = SpecialPowers.Cc["@mozilla.org/login-manager/loginInfo;1"]
- .createInstance(Ci.nsILoginInfo);
- login.init(host, null, realm, user, pass, "", "");
- pwmgr.addLogin(login);
- logins.push(login);
- }
-
- var mozproxy = "moz-proxy://" +
- SpecialPowers.wrap(pi).host + ":" +
- SpecialPowers.wrap(pi).port;
-
- addLogin(mozproxy, "proxy_realm",
- "proxy_user", "proxy_pass");
- addLogin(mozproxy, "proxy_realm2",
- "proxy_user2", "proxy_pass2");
- addLogin(mozproxy, "proxy_realm3",
- "proxy_user3", "proxy_pass3");
- addLogin(mozproxy, "proxy_realm4",
- "proxy_user4", "proxy_pass4");
- addLogin(mozproxy, "proxy_realm5",
- "proxy_user5", "proxy_pass5");
- addLogin("http://example.com", "mochirealm",
- "user1name", "user1pass");
- addLogin("http://example.org", "mochirealm2",
- "user2name", "user2pass");
- addLogin("http://example.com", "mochirealm3",
- "user3name", "user3pass");
- addLogin("http://example.com", "mochirealm4",
- "user4name", "user4pass");
- addLogin("http://example.com", "mochirealm5",
- "user5name", "user5pass");
- addLogin("http://example.com", "mochirealm6",
- "user6name", "user6pass");
- }
-
- function finishTest() {
- ok(true, "finishTest removing testing logins...");
- for (i in logins)
- pwmgr.removeLogin(logins[i]);
-
- var authMgr = SpecialPowers.Cc['@mozilla.org/network/http-auth-manager;1']
- .getService(Ci.nsIHttpAuthManager);
- authMgr.clearAll();
-
- monitor.shutdown();
- SimpleTest.finish();
- }
-
- var resolveCallback = SpecialPowers.wrapCallbackObject({
- QueryInterface : function (iid) {
- const interfaces = [Ci.nsIProtocolProxyCallback, Ci.nsISupports];
-
- if (!interfaces.some( function(v) { return iid.equals(v); } ))
- throw SpecialPowers.Cr.NS_ERROR_NO_INTERFACE;
- return this;
- },
-
- onProxyAvailable : function (req, uri, pi, status) {
- initLogins(pi);
- doTest(testNum);
- }
- });
-
- function startup() {
- // Need to allow for arbitrary network servers defined in PAC instead of a hardcoded moz-proxy.
- var channel = NetUtil.newChannel({
- uri: "http://example.com",
- loadUsingSystemPrincipal: true
- });
-
- var pps = SpecialPowers.Cc["@mozilla.org/network/protocol-proxy-service;1"]
- .getService();
-
- pps.asyncResolve(channel, 0, resolveCallback);
- }
-
- // --------------- Test loop spin ----------------
- var testNum = 1;
- var iframe1;
- var iframe2a;
- var iframe2b;
- window.onload = function () {
- iframe1 = document.getElementById("iframe1");
- iframe2a = document.getElementById("iframe2a");
- iframe2b = document.getElementById("iframe2b");
- iframe1.onload = onFrameLoad;
- iframe2a.onload = onFrameLoad;
- iframe2b.onload = onFrameLoad;
-
- startup();
- };
-
- var expectedLoads;
- var expectedDialogs;
- function onFrameLoad()
- {
- if (--expectedLoads == 0) {
- // All pages expected to load has loaded, continue with the next test
- ok(true, "Expected frames loaded");
-
- doCheck(testNum);
- monitor.reset();
-
- testNum++;
- doTest(testNum);
- }
- }
-
- function doTest(testNumber)
- {
- /*
- * These contentDocument variables are located here,
- * rather than in the global scope, because SpecialPowers threw
- * errors (complaining that the objects were deleted)
- * when these were in the global scope.
- */
- var iframe1Doc = SpecialPowers.wrap(iframe1).contentDocument;
- var iframe2aDoc = SpecialPowers.wrap(iframe2a).contentDocument;
- var iframe2bDoc = SpecialPowers.wrap(iframe2b).contentDocument;
- var exampleCom = "http://example.com/tests/toolkit/components/passwordmgr/test/";
- var exampleOrg = "http://example.org/tests/toolkit/components/passwordmgr/test/";
-
- switch (testNumber)
- {
- case 1:
- // Load through a single proxy with authentication required 3 different
- // pages, first with one login, other two with their own different login.
- // We expect to show just a single dialog for proxy authentication and
- // then two dialogs to authenticate to login 1 and then login 2.
- ok(true, "doTest testNum 1");
- expectedLoads = 3;
- expectedDialogs = 3;
- iframe1.src = exampleCom + "authenticate.sjs?" +
- "r=1&" +
- "user=user1name&" +
- "pass=user1pass&" +
- "realm=mochirealm&" +
- "proxy_user=proxy_user&" +
- "proxy_pass=proxy_pass&" +
- "proxy_realm=proxy_realm";
- iframe2a.src = exampleOrg + "authenticate.sjs?" +
- "r=2&" +
- "user=user2name&" +
- "pass=user2pass&" +
- "realm=mochirealm2&" +
- "proxy_user=proxy_user&" +
- "proxy_pass=proxy_pass&" +
- "proxy_realm=proxy_realm";
- iframe2b.src = exampleOrg + "authenticate.sjs?" +
- "r=3&" +
- "user=user2name&" +
- "pass=user2pass&" +
- "realm=mochirealm2&" +
- "proxy_user=proxy_user&" +
- "proxy_pass=proxy_pass&" +
- "proxy_realm=proxy_realm";
- break;
-
- case 2:
- // Load an iframe with 3 subpages all requiring the same login through
- // anuthenticated proxy. We expect 2 dialogs, proxy authentication
- // and web authentication.
- ok(true, "doTest testNum 2");
- expectedLoads = 3;
- expectedDialogs = 2;
- iframe1.src = exampleCom + "subtst_prompt_async.html";
- iframe2a.src = "about:blank";
- iframe2b.src = "about:blank";
- break;
-
- case 3:
- // Load in the iframe page through unauthenticated proxy
- // and discard the proxy authentication. We expect to see
- // unauthenticated page content and just a single dialog.
- ok(true, "doTest testNum 3");
- expectedLoads = 1;
- expectedDialogs = 1;
- iframe1.src = exampleCom + "authenticate.sjs?" +
- "user=user4name&" +
- "pass=user4pass&" +
- "realm=mochirealm4&" +
- "proxy_user=proxy_user3&" +
- "proxy_pass=proxy_pass3&" +
- "proxy_realm=proxy_realm3";
- break;
-
- case 4:
- // Reload the frame from previous step and pass the proxy authentication
- // but cancel the WWW authentication. We should get the proxy=ok and WWW=fail
- // content as a result.
- ok(true, "doTest testNum 4");
- expectedLoads = 1;
- expectedDialogs = 2;
- iframe1.src = exampleCom + "authenticate.sjs?" +
- "user=user4name&" +
- "pass=user4pass&" +
- "realm=mochirealm4&" +
- "proxy_user=proxy_user3&" +
- "proxy_pass=proxy_pass3&" +
- "proxy_realm=proxy_realm3";
-
-
- break;
-
- case 5:
- // Same as the previous two steps but let the server generate
- // huge content load to check http channel is capable to handle
- // case when auth dialog is canceled or accepted before unauthenticated
- // content data is load from the server. (This would be better to
- // implement using delay of server response).
- ok(true, "doTest testNum 5");
- expectedLoads = 1;
- expectedDialogs = 1;
- iframe1.src = exampleCom + "authenticate.sjs?" +
- "user=user5name&" +
- "pass=user5pass&" +
- "realm=mochirealm5&" +
- "proxy_user=proxy_user4&" +
- "proxy_pass=proxy_pass4&" +
- "proxy_realm=proxy_realm4&" +
- "huge=1";
- break;
-
- case 6:
- // Reload the frame from the previous step and let the proxy
- // authentication pass but WWW fail. We expect two dialogs
- // and an unathenticated page content load.
- ok(true, "doTest testNum 6");
- expectedLoads = 1;
- expectedDialogs = 2;
- iframe1.src = exampleCom + "authenticate.sjs?" +
- "user=user5name&" +
- "pass=user5pass&" +
- "realm=mochirealm5&" +
- "proxy_user=proxy_user4&" +
- "proxy_pass=proxy_pass4&" +
- "proxy_realm=proxy_realm4&" +
- "huge=1";
- break;
-
- case 7:
- // Reload again and let pass all authentication dialogs.
- // Check we get the authenticated content not broken by
- // the unauthenticated content.
- ok(true, "doTest testNum 7");
- expectedLoads = 1;
- expectedDialogs = 1;
- iframe1Doc.location.reload();
- break;
-
- case 8:
- // Check we proccess all challenges sent by server when
- // user cancels prompts
- ok(true, "doTest testNum 8");
- expectedLoads = 1;
- expectedDialogs = 5;
- iframe1.src = exampleCom + "authenticate.sjs?" +
- "user=user6name&" +
- "pass=user6pass&" +
- "realm=mochirealm6&" +
- "proxy_user=proxy_user5&" +
- "proxy_pass=proxy_pass5&" +
- "proxy_realm=proxy_realm5&" +
- "huge=1&" +
- "multiple=3";
- break;
-
- case 9:
- finishTest();
- return;
- }
-
- startCallbackTimer();
- }
-
- function handleDialog(doc, testNumber)
- {
- var dialog = doc.getElementById("commonDialog");
-
- switch (testNumber)
- {
- case 1:
- case 2:
- dialog.acceptDialog();
- break;
-
- case 3:
- dialog.cancelDialog();
- setTimeout(onFrameLoad, 10); // there are no successful frames for test 3
- break;
-
- case 4:
- if (expectedDialogs == 2)
- dialog.acceptDialog();
- else
- dialog.cancelDialog();
- break;
-
- case 5:
- dialog.cancelDialog();
- setTimeout(onFrameLoad, 10); // there are no successful frames for test 5
- break;
-
- case 6:
- if (expectedDialogs == 2)
- dialog.acceptDialog();
- else
- dialog.cancelDialog();
- break;
-
- case 7:
- dialog.acceptDialog();
- break;
-
- case 8:
- if (expectedDialogs == 3 || expectedDialogs == 1)
- dialog.acceptDialog();
- else
- dialog.cancelDialog();
- break;
-
- default:
- ok(false, "Unhandled testNum " + testNumber + " in handleDialog");
- }
-
- if (--expectedDialogs > 0)
- startCallbackTimer();
- }
-
- function doCheck(testNumber)
- {
- var iframe1Doc = SpecialPowers.wrap(iframe1).contentDocument;
- var iframe2aDoc = SpecialPowers.wrap(iframe2a).contentDocument;
- var iframe2bDoc = SpecialPowers.wrap(iframe2b).contentDocument;
- var authok1;
- var proxyok1;
- var footnote;
- switch (testNumber)
- {
- case 1:
- ok(true, "doCheck testNum 1");
- is(monitor.windowsRegistered, 3, "Registered 3 open dialogs");
-
- authok1 = iframe1Doc.getElementById("ok").textContent;
- proxyok1 = iframe1Doc.getElementById("proxy").textContent;
-
- var authok2a = iframe2aDoc.getElementById("ok").textContent;
- var proxyok2a = iframe2aDoc.getElementById("proxy").textContent;
-
- var authok2b = iframe2bDoc.getElementById("ok").textContent;
- var proxyok2b = iframe2bDoc.getElementById("proxy").textContent;
-
- is(authok1, "PASS", "WWW Authorization OK, frame1");
- is(authok2a, "PASS", "WWW Authorization OK, frame2a");
- is(authok2b, "PASS", "WWW Authorization OK, frame2b");
- is(proxyok1, "PASS", "Proxy Authorization OK, frame1");
- is(proxyok2a, "PASS", "Proxy Authorization OK, frame2a");
- is(proxyok2b, "PASS", "Proxy Authorization OK, frame2b");
- break;
-
- case 2:
- is(monitor.windowsRegistered, 2, "Registered 2 open dialogs");
- ok(true, "doCheck testNum 2");
-
- function checkIframe(frame) {
- var doc = SpecialPowers.wrap(frame).contentDocument;
-
- var authok = doc.getElementById("ok").textContent;
- var proxyok = doc.getElementById("proxy").textContent;
-
- is(authok, "PASS", "WWW Authorization OK, " + frame.id);
- is(proxyok, "PASS", "Proxy Authorization OK, " + frame.id);
- }
-
- checkIframe(iframe1Doc.getElementById("iframe1"));
- checkIframe(iframe1Doc.getElementById("iframe2"));
- checkIframe(iframe1Doc.getElementById("iframe3"));
- break;
-
- case 3:
- ok(true, "doCheck testNum 3");
- is(monitor.windowsRegistered, 1, "Registered 1 open dialog");
-
- // ensure that the page content is not displayed on failed proxy auth
- is(iframe1Doc.getElementById("ok"), null, "frame did not load");
- break;
-
- case 4:
- ok(true, "doCheck testNum 4");
- is(monitor.windowsRegistered, 2, "Registered 2 open dialogs");
- authok1 = iframe1Doc.getElementById("ok").textContent;
- proxyok1 = iframe1Doc.getElementById("proxy").textContent;
-
- is(authok1, "FAIL", "WWW Authorization FAILED, frame1");
- is(proxyok1, "PASS", "Proxy Authorization OK, frame1");
- break;
-
- case 5:
- ok(true, "doCheck testNum 5");
- is(monitor.windowsRegistered, 1, "Registered 1 open dialog");
-
- // ensure that the page content is not displayed on failed proxy auth
- is(iframe1Doc.getElementById("footnote"), null, "frame did not load");
- break;
-
- case 6:
- ok(true, "doCheck testNum 6");
- is(monitor.windowsRegistered, 2, "Registered 2 open dialogs");
- authok1 = iframe1Doc.getElementById("ok").textContent;
- proxyok1 = iframe1Doc.getElementById("proxy").textContent;
- footnote = iframe1Doc.getElementById("footnote").textContent;
-
- is(authok1, "FAIL", "WWW Authorization FAILED, frame1");
- is(proxyok1, "PASS", "Proxy Authorization OK, frame1");
- is(footnote, "This is a footnote after the huge content fill",
- "Footnote present and loaded completely");
- break;
-
- case 7:
- ok(true, "doCheck testNum 7");
- is(monitor.windowsRegistered, 1, "Registered 1 open dialogs");
- authok1 = iframe1Doc.getElementById("ok").textContent;
- proxyok1 = iframe1Doc.getElementById("proxy").textContent;
- footnote = iframe1Doc.getElementById("footnote").textContent;
-
- is(authok1, "PASS", "WWW Authorization OK, frame1");
- is(proxyok1, "PASS", "Proxy Authorization OK, frame1");
- is(footnote, "This is a footnote after the huge content fill",
- "Footnote present and loaded completely");
- break;
-
- case 8:
- ok(true, "doCheck testNum 8");
- is(monitor.windowsRegistered, 5, "Registered 5 open dialogs");
- authok1 = iframe1Doc.getElementById("ok").textContent;
- proxyok1 = iframe1Doc.getElementById("proxy").textContent;
- footnote = iframe1Doc.getElementById("footnote").textContent;
-
- is(authok1, "PASS", "WWW Authorization OK, frame1");
- is(proxyok1, "PASS", "Proxy Authorization OK, frame1");
- is(footnote, "This is a footnote after the huge content fill",
- "Footnote present and loaded completely");
- break;
-
- default:
- ok(false, "Unhandled testNum " + testNumber + " in doCheck");
- }
- }
-
- </script>
-</head>
-<body>
- <iframe id="iframe1"></iframe>
- <iframe id="iframe2a"></iframe>
- <iframe id="iframe2b"></iframe>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/test_xhr.html b/toolkit/components/passwordmgr/test/test_xhr.html
deleted file mode 100644
index 2963716852..0000000000
--- a/toolkit/components/passwordmgr/test/test_xhr.html
+++ /dev/null
@@ -1,201 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test for XHR prompts</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <script type="text/javascript" src="prompt_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Login Manager test: XHR prompt
-<p id="display"></p>
-
-<div id="content" style="display: none">
- <iframe id="iframe"></iframe>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Login Manager: XHR prompts. **/
-var pwmgr, login1, login2;
-
-function initLogins() {
- pwmgr = Cc["@mozilla.org/login-manager;1"].
- getService(Ci.nsILoginManager);
-
- login1 = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- login2 = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
-
- login1.init("http://mochi.test:8888", null, "xhr",
- "xhruser1", "xhrpass1", "", "");
- login2.init("http://mochi.test:8888", null, "xhr2",
- "xhruser2", "xhrpass2", "", "");
-
- pwmgr.addLogin(login1);
- pwmgr.addLogin(login2);
-}
-
-function finishTest() {
- ok(true, "finishTest removing testing logins...");
- pwmgr.removeLogin(login1);
- pwmgr.removeLogin(login2);
-
- SimpleTest.finish();
-}
-
-function handleDialog(doc, testNum) {
- ok(true, "handleDialog running for test " + testNum);
-
- var clickOK = true;
- var userfield = doc.getElementById("loginTextbox");
- var passfield = doc.getElementById("password1Textbox");
- var username = userfield.getAttribute("value");
- var password = passfield.getAttribute("value");
- var dialog = doc.getElementById("commonDialog");
-
- switch (testNum) {
- case 1:
- is(username, "xhruser1", "Checking provided username");
- is(password, "xhrpass1", "Checking provided password");
- break;
-
- case 2:
- is(username, "xhruser2", "Checking provided username");
- is(password, "xhrpass2", "Checking provided password");
-
- // Check that the dialog is modal, chrome and dependent;
- // We can't just check window.opener because that'll be
- // a content window, which therefore isn't exposed (it'll lie and
- // be null).
- var win = doc.defaultView;
- var Ci = SpecialPowers.Ci;
- var treeOwner = win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIWebNavigation).
- QueryInterface(Ci.nsIDocShellTreeItem).treeOwner;
- treeOwner.QueryInterface(Ci.nsIInterfaceRequestor);
- var flags = treeOwner.getInterface(Ci.nsIXULWindow).chromeFlags;
- var wbc = treeOwner.getInterface(Ci.nsIWebBrowserChrome);
- info("Flags: " + flags);
- ok((flags & Ci.nsIWebBrowserChrome.CHROME_OPENAS_CHROME) != 0,
- "Dialog should be opened as chrome");
- ok((flags & Ci.nsIWebBrowserChrome.CHROME_OPENAS_DIALOG) != 0,
- "Dialog should be opened as a dialog");
- ok((flags & Ci.nsIWebBrowserChrome.CHROME_DEPENDENT) != 0,
- "Dialog should be opened as dependent.");
- ok(wbc.isWindowModal(), "Dialog should be modal");
-
- // Check that the right tab is focused:
- var browserWin = SpecialPowers.Services.wm.getMostRecentWindow("navigator:browser");
- var spec = browserWin.gBrowser.selectedBrowser.currentURI.spec;
- ok(spec.startsWith("http://mochi.test:8888"),
- "Tab with remote URI (rather than about:blank) should be focused (" + spec + ")");
-
-
- break;
-
- default:
- ok(false, "Uhh, unhandled switch for testNum #" + testNum);
- break;
- }
-
- // Explicitly cancel the dialog and report a fail in this failure
- // case, rather than letting the dialog get stuck due to an auth
- // failure and having the test timeout.
- if (!username && !password) {
- ok(false, "No values prefilled");
- clickOK = false;
- }
-
- if (clickOK)
- dialog.acceptDialog();
- else
- dialog.cancelDialog();
-
- ok(true, "handleDialog done");
- didDialog = true;
-}
-
-var newWin;
-function xhrLoad(xmlDoc) {
- ok(true, "xhrLoad running for test " + testNum);
-
- // The server echos back the user/pass it received.
- var username = xmlDoc.getElementById("user").textContent;
- var password = xmlDoc.getElementById("pass").textContent;
- var authok = xmlDoc.getElementById("ok").textContent;
-
-
- switch (testNum) {
- case 1:
- is(username, "xhruser1", "Checking provided username");
- is(password, "xhrpass1", "Checking provided password");
- break;
-
- case 2:
- is(username, "xhruser2", "Checking provided username");
- is(password, "xhrpass2", "Checking provided password");
-
- newWin.close();
- break;
-
- default:
- ok(false, "Uhh, unhandled switch for testNum #" + testNum);
- break;
- }
-
- doTest();
-}
-
-function doTest() {
- switch (++testNum) {
- case 1:
- startCallbackTimer();
- makeRequest("authenticate.sjs?user=xhruser1&pass=xhrpass1&realm=xhr");
- break;
-
- case 2:
- // Test correct parenting, by opening another tab in the foreground,
- // and making sure the prompt re-focuses the original tab when shown:
- newWin = window.open();
- newWin.focus();
- startCallbackTimer();
- makeRequest("authenticate.sjs?user=xhruser2&pass=xhrpass2&realm=xhr2");
- break;
-
- default:
- finishTest();
- }
-}
-
-function makeRequest(uri) {
- var request = new XMLHttpRequest();
- request.open("GET", uri, true);
- request.onreadystatechange = function () {
- if (request.readyState == 4)
- xhrLoad(request.responseXML);
- };
- request.send(null);
-}
-
-
-initLogins();
-
-// clear plain HTTP auth sessions before the test, to allow
-// running them more than once.
-var authMgr = SpecialPowers.Cc['@mozilla.org/network/http-auth-manager;1']
- .getService(SpecialPowers.Ci.nsIHttpAuthManager);
-authMgr.clearAll();
-
-// start the tests
-testNum = 0;
-doTest();
-
-SimpleTest.waitForExplicitFinish();
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/test_xml_load.html b/toolkit/components/passwordmgr/test/test_xml_load.html
deleted file mode 100644
index 5672c7117f..0000000000
--- a/toolkit/components/passwordmgr/test/test_xml_load.html
+++ /dev/null
@@ -1,191 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test XML document prompts</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="pwmgr_common.js"></script>
- <script type="text/javascript" src="prompt_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Login Manager test: XML prompt
-<p id="display"></p>
-
-<div id="content" style="display: none">
- <iframe id="iframe"></iframe>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Login Manager: XML prompts. **/
-var pwmgr, login1, login2;
-
-function initLogins() {
- pwmgr = SpecialPowers.Cc["@mozilla.org/login-manager;1"]
- .getService(Ci.nsILoginManager);
-
- login1 = SpecialPowers.Cc["@mozilla.org/login-manager/loginInfo;1"]
- .createInstance(Ci.nsILoginInfo);
- login2 = SpecialPowers.Cc["@mozilla.org/login-manager/loginInfo;1"]
- .createInstance(Ci.nsILoginInfo);
-
- login1.init("http://mochi.test:8888", null, "xml",
- "xmluser1", "xmlpass1", "", "");
- login2.init("http://mochi.test:8888", null, "xml2",
- "xmluser2", "xmlpass2", "", "");
-
- pwmgr.addLogin(login1);
- pwmgr.addLogin(login2);
-}
-
-function handleDialog(doc, testNum) {
- ok(true, "handleDialog running for test " + testNum);
-
- var clickOK = true;
- var userfield = doc.getElementById("loginTextbox");
- var passfield = doc.getElementById("password1Textbox");
- var username = userfield.getAttribute("value");
- var password = passfield.getAttribute("value");
- var dialog = doc.getElementById("commonDialog");
-
- switch (testNum) {
- case 1:
- is(username, "xmluser1", "Checking provided username");
- is(password, "xmlpass1", "Checking provided password");
- break;
-
- case 2:
- is(username, "xmluser2", "Checking provided username");
- is(password, "xmlpass2", "Checking provided password");
-
- // Check that the dialog is modal, chrome and dependent;
- // We can't just check window.opener because that'll be
- // a content window, which therefore isn't exposed (it'll lie and
- // be null).
- var win = doc.defaultView;
- var Ci = SpecialPowers.Ci;
- var treeOwner = win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIWebNavigation).
- QueryInterface(Ci.nsIDocShellTreeItem).treeOwner;
- treeOwner.QueryInterface(Ci.nsIInterfaceRequestor);
- var flags = treeOwner.getInterface(Ci.nsIXULWindow).chromeFlags;
- var wbc = treeOwner.getInterface(Ci.nsIWebBrowserChrome);
- info("Flags: " + flags);
- ok((flags & Ci.nsIWebBrowserChrome.CHROME_OPENAS_CHROME) != 0,
- "Dialog should be opened as chrome");
- ok((flags & Ci.nsIWebBrowserChrome.CHROME_OPENAS_DIALOG) != 0,
- "Dialog should be opened as a dialog");
- ok((flags & Ci.nsIWebBrowserChrome.CHROME_DEPENDENT) != 0,
- "Dialog should be opened as dependent.");
- ok(wbc.isWindowModal(), "Dialog should be modal");
-
- // Check that the right tab is focused:
- var browserWin = SpecialPowers.Services.wm.getMostRecentWindow("navigator:browser");
- var spec = browserWin.gBrowser.selectedBrowser.currentURI.spec;
- ok(spec.startsWith("http://mochi.test:8888"),
- "Tab with remote URI (rather than about:blank) should be focused (" + spec + ")");
-
- break;
-
- default:
- ok(false, "Uhh, unhandled switch for testNum #" + testNum);
- break;
- }
-
- // Explicitly cancel the dialog and report a fail in this failure
- // case, rather than letting the dialog get stuck due to an auth
- // failure and having the test timeout.
- if (!username && !password) {
- ok(false, "No values prefilled");
- clickOK = false;
- }
-
- if (clickOK)
- dialog.acceptDialog();
- else
- dialog.cancelDialog();
-
- ok(true, "handleDialog done");
- didDialog = true;
-}
-
-var newWin;
-function xmlLoad(responseDoc) {
- ok(true, "xmlLoad running for test " + testNum);
-
- // The server echos back the user/pass it received.
- var username = responseDoc.getElementById("user").textContent;
- var password = responseDoc.getElementById("pass").textContent;
- var authok = responseDoc.getElementById("ok").textContent;
-
- switch (testNum) {
- case 1:
- is(username, "xmluser1", "Checking provided username");
- is(password, "xmlpass1", "Checking provided password");
- break;
-
- case 2:
- is(username, "xmluser2", "Checking provided username");
- is(password, "xmlpass2", "Checking provided password");
-
- newWin.close();
- break;
-
- default:
- ok(false, "Uhh, unhandled switch for testNum #" + testNum);
- break;
- }
-
- doTest();
-}
-
-function doTest() {
- switch (++testNum) {
- case 1:
- startCallbackTimer();
- makeRequest("authenticate.sjs?user=xmluser1&pass=xmlpass1&realm=xml");
- break;
-
- case 2:
- // Test correct parenting, by opening another tab in the foreground,
- // and making sure the prompt re-focuses the original tab when shown:
- newWin = window.open();
- newWin.focus();
- startCallbackTimer();
- makeRequest("authenticate.sjs?user=xmluser2&pass=xmlpass2&realm=xml2");
- break;
-
- default:
- SimpleTest.finish();
- }
-}
-
-function makeRequest(uri) {
- var xmlDoc = document.implementation.createDocument("", "test", null);
-
- function documentLoaded(e) {
- xmlLoad(xmlDoc);
- }
- xmlDoc.addEventListener("load", documentLoaded, false);
- xmlDoc.load(uri);
-}
-
-
-initLogins();
-
-// clear plain HTTP auth sessions before the test, to allow
-// running them more than once.
-var authMgr = SpecialPowers.Cc['@mozilla.org/network/http-auth-manager;1']
- .getService(SpecialPowers.Ci.nsIHttpAuthManager);
-authMgr.clearAll();
-
-// start the tests
-testNum = 0;
-doTest();
-
-SimpleTest.waitForExplicitFinish();
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/passwordmgr/test/unit/.eslintrc.js b/toolkit/components/passwordmgr/test/unit/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/passwordmgr/test/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/passwordmgr/test/unit/data/corruptDB.sqlite b/toolkit/components/passwordmgr/test/unit/data/corruptDB.sqlite
deleted file mode 100644
index b234246cac..0000000000
--- a/toolkit/components/passwordmgr/test/unit/data/corruptDB.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/passwordmgr/test/unit/data/key3.db b/toolkit/components/passwordmgr/test/unit/data/key3.db
deleted file mode 100644
index a83a0a577b..0000000000
--- a/toolkit/components/passwordmgr/test/unit/data/key3.db
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/passwordmgr/test/unit/data/signons-v1.sqlite b/toolkit/components/passwordmgr/test/unit/data/signons-v1.sqlite
deleted file mode 100644
index fe030b61fd..0000000000
--- a/toolkit/components/passwordmgr/test/unit/data/signons-v1.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/passwordmgr/test/unit/data/signons-v1v2.sqlite b/toolkit/components/passwordmgr/test/unit/data/signons-v1v2.sqlite
deleted file mode 100644
index 729512a12b..0000000000
--- a/toolkit/components/passwordmgr/test/unit/data/signons-v1v2.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/passwordmgr/test/unit/data/signons-v2.sqlite b/toolkit/components/passwordmgr/test/unit/data/signons-v2.sqlite
deleted file mode 100644
index a6c72b31e8..0000000000
--- a/toolkit/components/passwordmgr/test/unit/data/signons-v2.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/passwordmgr/test/unit/data/signons-v2v3.sqlite b/toolkit/components/passwordmgr/test/unit/data/signons-v2v3.sqlite
deleted file mode 100644
index 359df5d311..0000000000
--- a/toolkit/components/passwordmgr/test/unit/data/signons-v2v3.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/passwordmgr/test/unit/data/signons-v3.sqlite b/toolkit/components/passwordmgr/test/unit/data/signons-v3.sqlite
deleted file mode 100644
index 918f4142fe..0000000000
--- a/toolkit/components/passwordmgr/test/unit/data/signons-v3.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/passwordmgr/test/unit/data/signons-v3v4.sqlite b/toolkit/components/passwordmgr/test/unit/data/signons-v3v4.sqlite
deleted file mode 100644
index e06c33aae3..0000000000
--- a/toolkit/components/passwordmgr/test/unit/data/signons-v3v4.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/passwordmgr/test/unit/data/signons-v4.sqlite b/toolkit/components/passwordmgr/test/unit/data/signons-v4.sqlite
deleted file mode 100644
index 227c09c816..0000000000
--- a/toolkit/components/passwordmgr/test/unit/data/signons-v4.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/passwordmgr/test/unit/data/signons-v4v5.sqlite b/toolkit/components/passwordmgr/test/unit/data/signons-v4v5.sqlite
deleted file mode 100644
index 4534cf2553..0000000000
--- a/toolkit/components/passwordmgr/test/unit/data/signons-v4v5.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/passwordmgr/test/unit/data/signons-v5v6.sqlite b/toolkit/components/passwordmgr/test/unit/data/signons-v5v6.sqlite
deleted file mode 100644
index eb4ee6d01e..0000000000
--- a/toolkit/components/passwordmgr/test/unit/data/signons-v5v6.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/passwordmgr/test/unit/data/signons-v999-2.sqlite b/toolkit/components/passwordmgr/test/unit/data/signons-v999-2.sqlite
deleted file mode 100644
index e09c4f7100..0000000000
--- a/toolkit/components/passwordmgr/test/unit/data/signons-v999-2.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/passwordmgr/test/unit/data/signons-v999.sqlite b/toolkit/components/passwordmgr/test/unit/data/signons-v999.sqlite
deleted file mode 100644
index 0328a1a02a..0000000000
--- a/toolkit/components/passwordmgr/test/unit/data/signons-v999.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/passwordmgr/test/unit/head.js b/toolkit/components/passwordmgr/test/unit/head.js
deleted file mode 100644
index baf958ab40..0000000000
--- a/toolkit/components/passwordmgr/test/unit/head.js
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * Provides infrastructure for automated login components tests.
- */
-
-"use strict";
-
-// Globals
-
-let { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/LoginRecipes.jsm");
-Cu.import("resource://gre/modules/LoginHelper.jsm");
-Cu.import("resource://testing-common/MockDocument.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "DownloadPaths",
- "resource://gre/modules/DownloadPaths.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
- "resource://gre/modules/FileUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "OS",
- "resource://gre/modules/osfile.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Promise",
- "resource://gre/modules/Promise.jsm");
-
-const LoginInfo =
- Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
- "nsILoginInfo", "init");
-
-// Import LoginTestUtils.jsm as LoginTestUtils.
-XPCOMUtils.defineLazyModuleGetter(this, "LoginTestUtils",
- "resource://testing-common/LoginTestUtils.jsm");
-LoginTestUtils.Assert = Assert;
-const TestData = LoginTestUtils.testData;
-const newPropertyBag = LoginHelper.newPropertyBag;
-
-/**
- * All the tests are implemented with add_task, this starts them automatically.
- */
-function run_test()
-{
- do_get_profile();
- run_next_test();
-}
-
-// Global helpers
-
-// Some of these functions are already implemented in other parts of the source
-// tree, see bug 946708 about sharing more code.
-
-// While the previous test file should have deleted all the temporary files it
-// used, on Windows these might still be pending deletion on the physical file
-// system. Thus, start from a new base number every time, to make a collision
-// with a file that is still pending deletion highly unlikely.
-let gFileCounter = Math.floor(Math.random() * 1000000);
-
-/**
- * Returns a reference to a temporary file, that is guaranteed not to exist, and
- * to have never been created before.
- *
- * @param aLeafName
- * Suggested leaf name for the file to be created.
- *
- * @return nsIFile pointing to a non-existent file in a temporary directory.
- *
- * @note It is not enough to delete the file if it exists, or to delete the file
- * after calling nsIFile.createUnique, because on Windows the delete
- * operation in the file system may still be pending, preventing a new
- * file with the same name to be created.
- */
-function getTempFile(aLeafName)
-{
- // Prepend a serial number to the extension in the suggested leaf name.
- let [base, ext] = DownloadPaths.splitBaseNameAndExtension(aLeafName);
- let leafName = base + "-" + gFileCounter + ext;
- gFileCounter++;
-
- // Get a file reference under the temporary directory for this test file.
- let file = FileUtils.getFile("TmpD", [leafName]);
- do_check_false(file.exists());
-
- do_register_cleanup(function () {
- if (file.exists()) {
- file.remove(false);
- }
- });
-
- return file;
-}
-
-const RecipeHelpers = {
- initNewParent() {
- return (new LoginRecipesParent({ defaults: null })).initializationPromise;
- },
-};
-
-// Initialization functions common to all tests
-
-add_task(function* test_common_initialize()
-{
- // Before initializing the service for the first time, we should copy the key
- // file required to decrypt the logins contained in the SQLite databases used
- // by migration tests. This file is not required for the other tests.
- yield OS.File.copy(do_get_file("data/key3.db").path,
- OS.Path.join(OS.Constants.Path.profileDir, "key3.db"));
-
- // Ensure that the service and the storage module are initialized.
- yield Services.logins.initializationPromise;
-
- // Ensure that every test file starts with an empty database.
- LoginTestUtils.clearData();
-
- // Clean up after every test.
- do_register_cleanup(() => LoginTestUtils.clearData());
-});
-
-/**
- * Compare two FormLike to see if they represent the same information. Elements
- * are compared using their @id attribute.
- */
-function formLikeEqual(a, b) {
- Assert.strictEqual(Object.keys(a).length, Object.keys(b).length,
- "Check the formLikes have the same number of properties");
-
- for (let propName of Object.keys(a)) {
- if (propName == "elements") {
- Assert.strictEqual(a.elements.length, b.elements.length, "Check element count");
- for (let i = 0; i < a.elements.length; i++) {
- Assert.strictEqual(a.elements[i].id, b.elements[i].id, "Check element " + i + " id");
- }
- continue;
- }
- Assert.strictEqual(a[propName], b[propName], "Compare formLike " + propName + " property");
- }
-}
diff --git a/toolkit/components/passwordmgr/test/unit/test_OSCrypto_win.js b/toolkit/components/passwordmgr/test/unit/test_OSCrypto_win.js
deleted file mode 100644
index 94d2e50c05..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_OSCrypto_win.js
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * Tests the OSCrypto object.
- */
-
-"use strict";
-
-// Globals
-
-XPCOMUtils.defineLazyModuleGetter(this, "OSCrypto",
- "resource://gre/modules/OSCrypto.jsm");
-
-var crypto = new OSCrypto();
-
-// Tests
-
-add_task(function test_getIELoginHash()
-{
- do_check_eq(crypto.getIELoginHash("https://bugzilla.mozilla.org/page.cgi"),
- "4A66FE96607885790F8E67B56EEE52AB539BAFB47D");
-
- do_check_eq(crypto.getIELoginHash("https://github.com/login"),
- "0112F7DCE67B8579EA01367678AA44AB9868B5A143");
-
- do_check_eq(crypto.getIELoginHash("https://login.live.com/login.srf"),
- "FBF92E5D804C82717A57856533B779676D92903688");
-
- do_check_eq(crypto.getIELoginHash("https://preview.c9.io/riadh/w1/pass.1.html"),
- "6935CF27628830605927F86AB53831016FC8973D1A");
-
-
- do_check_eq(crypto.getIELoginHash("https://reviewboard.mozilla.org/account/login/"),
- "09141FD287E2E59A8B1D3BB5671537FD3D6B61337A");
-
- do_check_eq(crypto.getIELoginHash("https://www.facebook.com/"),
- "EF44D3E034009CB0FD1B1D81A1FF3F3335213BD796");
-
-});
-
-add_task(function test_decryptData_encryptData()
-{
- function decryptEncryptTest(key) {
- do_check_eq(crypto.decryptData(crypto.encryptData("", key), key),
- "");
-
- do_check_eq(crypto.decryptData(crypto.encryptData("secret", key), key),
- "secret");
-
- do_check_eq(crypto.decryptData(crypto.encryptData("https://www.mozilla.org", key),
- key),
- "https://www.mozilla.org");
-
- do_check_eq(crypto.decryptData(crypto.encryptData("https://reviewboard.mozilla.org", key),
- key),
- "https://reviewboard.mozilla.org");
-
- do_check_eq(crypto.decryptData(crypto.encryptData("https://bugzilla.mozilla.org/page.cgi",
- key),
- key),
- "https://bugzilla.mozilla.org/page.cgi");
- }
-
- let keys = [null, "a", "keys", "abcdedf", "pass", "https://bugzilla.mozilla.org/page.cgi",
- "https://login.live.com/login.srf"];
- for (let key of keys) {
- decryptEncryptTest(key);
- }
- let url = "https://twitter.com/";
- let value = [1, 0, 0, 0, 208, 140, 157, 223, 1, 21, 209, 17, 140, 122, 0, 192, 79, 194, 151, 235, 1, 0, 0, 0, 254, 58, 230, 75, 132, 228, 181, 79, 184, 160, 37, 106, 201, 29, 42, 152, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 16, 102, 0, 0, 0, 1, 0, 0, 32, 0, 0, 0, 90, 136, 17, 124, 122, 57, 178, 24, 34, 86, 209, 198, 184, 107, 58, 58, 32, 98, 61, 239, 129, 101, 56, 239, 114, 159, 139, 165, 183, 40, 183, 85, 0, 0, 0, 0, 14, 128, 0, 0, 0, 2, 0, 0, 32, 0, 0, 0, 147, 170, 34, 21, 53, 227, 191, 6, 201, 84, 106, 31, 57, 227, 46, 127, 219, 199, 80, 142, 37, 104, 112, 223, 26, 165, 223, 55, 176, 89, 55, 37, 112, 0, 0, 0, 98, 70, 221, 109, 5, 152, 46, 11, 190, 213, 226, 58, 244, 20, 180, 217, 63, 155, 227, 132, 7, 151, 235, 6, 37, 232, 176, 182, 141, 191, 251, 50, 20, 123, 53, 11, 247, 233, 112, 121, 130, 27, 168, 68, 92, 144, 192, 7, 12, 239, 53, 217, 253, 155, 54, 109, 236, 216, 225, 245, 79, 234, 165, 225, 104, 36, 77, 13, 195, 237, 143, 165, 100, 107, 230, 70, 54, 19, 179, 35, 8, 101, 93, 202, 121, 210, 222, 28, 93, 122, 36, 84, 185, 249, 238, 3, 102, 149, 248, 94, 137, 16, 192, 22, 251, 220, 22, 223, 16, 58, 104, 187, 64, 0, 0, 0, 70, 72, 15, 119, 144, 66, 117, 203, 190, 82, 131, 46, 111, 130, 238, 191, 170, 63, 186, 117, 46, 88, 171, 3, 94, 146, 75, 86, 243, 159, 63, 195, 149, 25, 105, 141, 42, 217, 108, 18, 63, 62, 98, 182, 241, 195, 12, 216, 152, 230, 176, 253, 202, 129, 41, 185, 135, 111, 226, 92, 27, 78, 27, 198];
-
- let arr1 = crypto.arrayToString(value);
- let arr2 = crypto.stringToArray(crypto.decryptData(crypto.encryptData(arr1, url), url));
- for (let i = 0; i < arr1.length; i++) {
- do_check_eq(arr2[i], value[i]);
- }
-});
diff --git a/toolkit/components/passwordmgr/test/unit/test_context_menu.js b/toolkit/components/passwordmgr/test/unit/test_context_menu.js
deleted file mode 100644
index 722c13e155..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_context_menu.js
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Test the password manager context menu.
- */
-
-"use strict";
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/LoginManagerContextMenu.jsm");
-
-XPCOMUtils.defineLazyGetter(this, "_stringBundle", function() {
- return Services.strings.
- createBundle("chrome://passwordmgr/locale/passwordmgr.properties");
-});
-
-/**
- * Prepare data for the following tests.
- */
-add_task(function* test_initialize() {
- for (let login of loginList()) {
- Services.logins.addLogin(login);
- }
-});
-
-/**
- * Tests if the LoginManagerContextMenu returns the correct login items.
- */
-add_task(function* test_contextMenuAddAndRemoveLogins() {
- const DOCUMENT_CONTENT = "<form><input id='pw' type=password></form>";
- const INPUT_QUERY = "input[type='password']";
-
- let testHostnames = [
- "http://www.example.com",
- "http://www2.example.com",
- "http://www3.example.com",
- "http://empty.example.com",
- ];
-
- for (let hostname of testHostnames) {
- do_print("test for hostname: " + hostname);
- // Get expected logins for this test.
- let logins = getExpectedLogins(hostname);
-
- // Create the logins menuitems fragment.
- let {fragment, document} = createLoginsFragment(hostname, DOCUMENT_CONTENT, INPUT_QUERY);
-
- if (!logins.length) {
- Assert.ok(fragment === null, "Null returned. No logins where found.");
- continue;
- }
- let items = [...fragment.querySelectorAll("menuitem")];
-
- // Check if the items are those expected to be listed.
- Assert.ok(checkLoginItems(logins, items), "All expected logins found.");
- document.body.appendChild(fragment);
-
- // Try to clear the fragment.
- LoginManagerContextMenu.clearLoginsFromMenu(document);
- Assert.equal(fragment.querySelectorAll("menuitem").length, 0, "All items correctly cleared.");
- }
-
- Services.logins.removeAllLogins();
-});
-
-/**
- * Create a fragment with a menuitem for each login.
- */
-function createLoginsFragment(url, content, elementQuery) {
- const CHROME_URL = "chrome://mock-chrome";
-
- // Create a mock document.
- let document = MockDocument.createTestDocument(CHROME_URL, content);
- let inputElement = document.querySelector(elementQuery);
- MockDocument.mockOwnerDocumentProperty(inputElement, document, url);
-
- // We also need a simple mock Browser object for this test.
- let browser = {
- ownerDocument: document
- };
-
- let URI = Services.io.newURI(url, null, null);
- return {
- document,
- fragment: LoginManagerContextMenu.addLoginsToMenu(inputElement, browser, URI),
- };
-}
-
-/**
- * Check if every login have it's corresponding menuitem.
- * Duplicates and empty usernames have a date appended.
- */
-function checkLoginItems(logins, items) {
- function findDuplicates(unfilteredLoginList) {
- var seen = new Set();
- var duplicates = new Set();
- for (let login of unfilteredLoginList) {
- if (seen.has(login.username)) {
- duplicates.add(login.username);
- }
- seen.add(login.username);
- }
- return duplicates;
- }
- let duplicates = findDuplicates(logins);
-
- let dateAndTimeFormatter = new Intl.DateTimeFormat(undefined,
- { day: "numeric", month: "short", year: "numeric" });
- for (let login of logins) {
- if (login.username && !duplicates.has(login.username)) {
- // If login is not duplicate and we can't find an item for it, fail.
- if (!items.find(item => item.label == login.username)) {
- return false;
- }
- continue;
- }
-
- let meta = login.QueryInterface(Ci.nsILoginMetaInfo);
- let time = dateAndTimeFormatter.format(new Date(meta.timePasswordChanged));
- // If login is duplicate, check if we have a login item with appended date.
- if (login.username && !items.find(item => item.label == login.username + " (" + time + ")")) {
- return false;
- }
- // If login is empty, check if we have a login item with appended date.
- if (!login.username &&
- !items.find(item => item.label == _stringBundle.GetStringFromName("noUsername") + " (" + time + ")")) {
- return false;
- }
- }
- return true;
-}
-
-/**
- * Gets the list of expected logins for a hostname.
- */
-function getExpectedLogins(hostname) {
- return Services.logins.getAllLogins().filter(entry => entry["hostname"] === hostname);
-}
-
-function loginList() {
- return [
- new LoginInfo("http://www.example.com", "http://www.example.com", null,
- "username1", "password",
- "form_field_username", "form_field_password"),
-
- new LoginInfo("http://www.example.com", "http://www.example.com", null,
- "username2", "password",
- "form_field_username", "form_field_password"),
-
- new LoginInfo("http://www2.example.com", "http://www.example.com", null,
- "username", "password",
- "form_field_username", "form_field_password"),
- new LoginInfo("http://www2.example.com", "http://www2.example.com", null,
- "username", "password2",
- "form_field_username", "form_field_password"),
- new LoginInfo("http://www2.example.com", "http://www2.example.com", null,
- "username2", "password2",
- "form_field_username", "form_field_password"),
-
- new LoginInfo("http://www3.example.com", "http://www.example.com", null,
- "", "password",
- "form_field_username", "form_field_password"),
- new LoginInfo("http://www3.example.com", "http://www3.example.com", null,
- "", "password2",
- "form_field_username", "form_field_password"),
- ];
-}
diff --git a/toolkit/components/passwordmgr/test/unit/test_dedupeLogins.js b/toolkit/components/passwordmgr/test/unit/test_dedupeLogins.js
deleted file mode 100644
index d688a6dbf0..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_dedupeLogins.js
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * Test LoginHelper.dedupeLogins
- */
-
-"use strict";
-
-Cu.import("resource://gre/modules/LoginHelper.jsm");
-
-const DOMAIN1_HTTP_TO_HTTP_U1_P1 = TestData.formLogin({
- timePasswordChanged: 3000,
- timeLastUsed: 2000,
-});
-const DOMAIN1_HTTP_TO_HTTP_U1_P2 = TestData.formLogin({
- password: "password two",
-});
-const DOMAIN1_HTTP_TO_HTTP_U2_P2 = TestData.formLogin({
- password: "password two",
- username: "username two",
-});
-const DOMAIN1_HTTPS_TO_HTTPS_U1_P1 = TestData.formLogin({
- formSubmitURL: "http://www.example.com",
- hostname: "https://www3.example.com",
- timePasswordChanged: 4000,
- timeLastUsed: 1000,
-});
-const DOMAIN1_HTTPS_TO_EMPTY_U1_P1 = TestData.formLogin({
- formSubmitURL: "",
- hostname: "https://www3.example.com",
-});
-const DOMAIN1_HTTPS_TO_EMPTYU_P1 = TestData.formLogin({
- hostname: "https://www3.example.com",
- username: "",
-});
-const DOMAIN1_HTTP_AUTH = TestData.authLogin({
- hostname: "http://www3.example.com",
-});
-const DOMAIN1_HTTPS_AUTH = TestData.authLogin({
- hostname: "https://www3.example.com",
-});
-
-
-add_task(function test_dedupeLogins() {
- // [description, expectedOutput, dedupe arg. 0, dedupe arg 1, ...]
- let testcases = [
- [
- "exact dupes",
- [DOMAIN1_HTTP_TO_HTTP_U1_P1],
- [DOMAIN1_HTTP_TO_HTTP_U1_P1, DOMAIN1_HTTP_TO_HTTP_U1_P1],
- undefined,
- [], // force no resolveBy logic to test behavior of preferring the first..
- ],
- [
- "default uniqueKeys is un + pw",
- [DOMAIN1_HTTP_TO_HTTP_U1_P1, DOMAIN1_HTTP_TO_HTTP_U1_P2],
- [DOMAIN1_HTTP_TO_HTTP_U1_P1, DOMAIN1_HTTP_TO_HTTP_U1_P2],
- undefined,
- [],
- ],
- [
- "same usernames, different passwords, dedupe username only",
- [DOMAIN1_HTTP_TO_HTTP_U1_P1],
- [DOMAIN1_HTTP_TO_HTTP_U1_P1, DOMAIN1_HTTP_TO_HTTP_U1_P2],
- ["username"],
- [],
- ],
- [
- "same un+pw, different scheme",
- [DOMAIN1_HTTP_TO_HTTP_U1_P1],
- [DOMAIN1_HTTP_TO_HTTP_U1_P1, DOMAIN1_HTTPS_TO_HTTPS_U1_P1],
- undefined,
- [],
- ],
- [
- "same un+pw, different scheme, reverse order",
- [DOMAIN1_HTTPS_TO_HTTPS_U1_P1],
- [DOMAIN1_HTTPS_TO_HTTPS_U1_P1, DOMAIN1_HTTP_TO_HTTP_U1_P1],
- undefined,
- [],
- ],
- [
- "same un+pw, different scheme, include hostname",
- [DOMAIN1_HTTP_TO_HTTP_U1_P1, DOMAIN1_HTTPS_TO_HTTPS_U1_P1],
- [DOMAIN1_HTTP_TO_HTTP_U1_P1, DOMAIN1_HTTPS_TO_HTTPS_U1_P1],
- ["hostname", "username", "password"],
- [],
- ],
- [
- "empty username is not deduped with non-empty",
- [DOMAIN1_HTTP_TO_HTTP_U1_P1, DOMAIN1_HTTPS_TO_EMPTYU_P1],
- [DOMAIN1_HTTP_TO_HTTP_U1_P1, DOMAIN1_HTTPS_TO_EMPTYU_P1],
- undefined,
- [],
- ],
- [
- "empty username is deduped with same passwords",
- [DOMAIN1_HTTPS_TO_EMPTYU_P1],
- [DOMAIN1_HTTPS_TO_EMPTYU_P1, DOMAIN1_HTTP_TO_HTTP_U1_P1],
- ["password"],
- [],
- ],
- [
- "mix of form and HTTP auth",
- [DOMAIN1_HTTP_TO_HTTP_U1_P1],
- [DOMAIN1_HTTP_TO_HTTP_U1_P1, DOMAIN1_HTTP_AUTH],
- undefined,
- [],
- ],
- ];
-
- for (let tc of testcases) {
- let description = tc.shift();
- let expected = tc.shift();
- let actual = LoginHelper.dedupeLogins(...tc);
- Assert.strictEqual(actual.length, expected.length, `Check: ${description}`);
- for (let [i, login] of expected.entries()) {
- Assert.strictEqual(actual[i], login, `Check index ${i}`);
- }
- }
-});
-
-
-add_task(function* test_dedupeLogins_resolveBy() {
- Assert.ok(DOMAIN1_HTTP_TO_HTTP_U1_P1.timeLastUsed > DOMAIN1_HTTPS_TO_HTTPS_U1_P1.timeLastUsed,
- "Sanity check timeLastUsed difference");
- Assert.ok(DOMAIN1_HTTP_TO_HTTP_U1_P1.timePasswordChanged < DOMAIN1_HTTPS_TO_HTTPS_U1_P1.timePasswordChanged,
- "Sanity check timePasswordChanged difference");
-
- let testcases = [
- [
- "default resolveBy is timeLastUsed",
- [DOMAIN1_HTTP_TO_HTTP_U1_P1],
- [DOMAIN1_HTTPS_TO_HTTPS_U1_P1, DOMAIN1_HTTP_TO_HTTP_U1_P1],
- ],
- [
- "default resolveBy is timeLastUsed, reversed input",
- [DOMAIN1_HTTP_TO_HTTP_U1_P1],
- [DOMAIN1_HTTP_TO_HTTP_U1_P1, DOMAIN1_HTTPS_TO_HTTPS_U1_P1],
- ],
- [
- "resolveBy timeLastUsed + timePasswordChanged",
- [DOMAIN1_HTTP_TO_HTTP_U1_P1],
- [DOMAIN1_HTTPS_TO_HTTPS_U1_P1, DOMAIN1_HTTP_TO_HTTP_U1_P1],
- undefined,
- ["timeLastUsed", "timePasswordChanged"],
- ],
- [
- "resolveBy timeLastUsed + timePasswordChanged, reversed input",
- [DOMAIN1_HTTP_TO_HTTP_U1_P1],
- [DOMAIN1_HTTP_TO_HTTP_U1_P1, DOMAIN1_HTTPS_TO_HTTPS_U1_P1],
- undefined,
- ["timeLastUsed", "timePasswordChanged"],
- ],
- [
- "resolveBy timePasswordChanged",
- [DOMAIN1_HTTPS_TO_HTTPS_U1_P1],
- [DOMAIN1_HTTPS_TO_HTTPS_U1_P1, DOMAIN1_HTTP_TO_HTTP_U1_P1],
- undefined,
- ["timePasswordChanged"],
- ],
- [
- "resolveBy timePasswordChanged, reversed",
- [DOMAIN1_HTTPS_TO_HTTPS_U1_P1],
- [DOMAIN1_HTTP_TO_HTTP_U1_P1, DOMAIN1_HTTPS_TO_HTTPS_U1_P1],
- undefined,
- ["timePasswordChanged"],
- ],
- [
- "resolveBy timePasswordChanged + timeLastUsed",
- [DOMAIN1_HTTPS_TO_HTTPS_U1_P1],
- [DOMAIN1_HTTPS_TO_HTTPS_U1_P1, DOMAIN1_HTTP_TO_HTTP_U1_P1],
- undefined,
- ["timePasswordChanged", "timeLastUsed"],
- ],
- [
- "resolveBy timePasswordChanged + timeLastUsed, reversed",
- [DOMAIN1_HTTPS_TO_HTTPS_U1_P1],
- [DOMAIN1_HTTP_TO_HTTP_U1_P1, DOMAIN1_HTTPS_TO_HTTPS_U1_P1],
- undefined,
- ["timePasswordChanged", "timeLastUsed"],
- ],
- [
- "resolveBy scheme + timePasswordChanged, prefer HTTP",
- [DOMAIN1_HTTP_TO_HTTP_U1_P1],
- [DOMAIN1_HTTPS_TO_HTTPS_U1_P1, DOMAIN1_HTTP_TO_HTTP_U1_P1],
- undefined,
- ["scheme", "timePasswordChanged"],
- DOMAIN1_HTTP_TO_HTTP_U1_P1.hostname,
- ],
- [
- "resolveBy scheme + timePasswordChanged, prefer HTTP, reversed input",
- [DOMAIN1_HTTP_TO_HTTP_U1_P1],
- [DOMAIN1_HTTP_TO_HTTP_U1_P1, DOMAIN1_HTTPS_TO_HTTPS_U1_P1],
- undefined,
- ["scheme", "timePasswordChanged"],
- DOMAIN1_HTTP_TO_HTTP_U1_P1.hostname,
- ],
- [
- "resolveBy scheme + timePasswordChanged, prefer HTTPS",
- [DOMAIN1_HTTPS_TO_HTTPS_U1_P1],
- [DOMAIN1_HTTPS_TO_HTTPS_U1_P1, DOMAIN1_HTTP_TO_HTTP_U1_P1],
- undefined,
- ["scheme", "timePasswordChanged"],
- DOMAIN1_HTTPS_TO_HTTPS_U1_P1.hostname,
- ],
- [
- "resolveBy scheme + timePasswordChanged, prefer HTTPS, reversed input",
- [DOMAIN1_HTTPS_TO_HTTPS_U1_P1],
- [DOMAIN1_HTTP_TO_HTTP_U1_P1, DOMAIN1_HTTPS_TO_HTTPS_U1_P1],
- undefined,
- ["scheme", "timePasswordChanged"],
- DOMAIN1_HTTPS_TO_HTTPS_U1_P1.hostname,
- ],
- [
- "resolveBy scheme HTTP auth",
- [DOMAIN1_HTTPS_AUTH],
- [DOMAIN1_HTTP_AUTH, DOMAIN1_HTTPS_AUTH],
- undefined,
- ["scheme"],
- DOMAIN1_HTTPS_AUTH.hostname,
- ],
- [
- "resolveBy scheme HTTP auth, reversed input",
- [DOMAIN1_HTTPS_AUTH],
- [DOMAIN1_HTTPS_AUTH, DOMAIN1_HTTP_AUTH],
- undefined,
- ["scheme"],
- DOMAIN1_HTTPS_AUTH.hostname,
- ],
- [
- "resolveBy scheme, empty form submit URL",
- [DOMAIN1_HTTPS_TO_HTTPS_U1_P1],
- [DOMAIN1_HTTPS_TO_HTTPS_U1_P1, DOMAIN1_HTTPS_TO_EMPTY_U1_P1],
- undefined,
- ["scheme"],
- DOMAIN1_HTTPS_TO_HTTPS_U1_P1.hostname,
- ],
- ];
-
- for (let tc of testcases) {
- let description = tc.shift();
- let expected = tc.shift();
- let actual = LoginHelper.dedupeLogins(...tc);
- Assert.strictEqual(actual.length, expected.length, `Check: ${description}`);
- for (let [i, login] of expected.entries()) {
- Assert.strictEqual(actual[i], login, `Check index ${i}`);
- }
- }
-
-});
-
-add_task(function* test_dedupeLogins_preferredOriginMissing() {
- let testcases = [
- [
- "resolveBy scheme + timePasswordChanged, missing preferredOrigin",
- /preferredOrigin/,
- [DOMAIN1_HTTPS_TO_HTTPS_U1_P1, DOMAIN1_HTTP_TO_HTTP_U1_P1],
- undefined,
- ["scheme", "timePasswordChanged"],
- ],
- [
- "resolveBy timePasswordChanged + scheme, missing preferredOrigin",
- /preferredOrigin/,
- [DOMAIN1_HTTPS_TO_HTTPS_U1_P1, DOMAIN1_HTTP_TO_HTTP_U1_P1],
- undefined,
- ["timePasswordChanged", "scheme"],
- ],
- [
- "resolveBy scheme + timePasswordChanged, empty preferredOrigin",
- /preferredOrigin/,
- [DOMAIN1_HTTPS_TO_HTTPS_U1_P1, DOMAIN1_HTTP_TO_HTTP_U1_P1],
- undefined,
- ["scheme", "timePasswordChanged"],
- "",
- ],
- ];
-
- for (let tc of testcases) {
- let description = tc.shift();
- let expectedException = tc.shift();
- Assert.throws(() => {
- LoginHelper.dedupeLogins(...tc);
- }, expectedException, `Check: ${description}`);
- }
-});
diff --git a/toolkit/components/passwordmgr/test/unit/test_disabled_hosts.js b/toolkit/components/passwordmgr/test/unit/test_disabled_hosts.js
deleted file mode 100644
index ff3b7e8686..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_disabled_hosts.js
+++ /dev/null
@@ -1,196 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests getLoginSavingEnabled, setLoginSavingEnabled, and getAllDisabledHosts.
- */
-
-"use strict";
-
-// Tests
-
-/**
- * Tests setLoginSavingEnabled and getAllDisabledHosts.
- */
-add_task(function test_setLoginSavingEnabled_getAllDisabledHosts()
-{
- // Add some disabled hosts, and verify that different schemes for the same
- // domain are considered different hosts.
- let hostname1 = "http://disabled1.example.com";
- let hostname2 = "http://disabled2.example.com";
- let hostname3 = "https://disabled2.example.com";
- Services.logins.setLoginSavingEnabled(hostname1, false);
- Services.logins.setLoginSavingEnabled(hostname2, false);
- Services.logins.setLoginSavingEnabled(hostname3, false);
-
- LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(),
- [hostname1, hostname2, hostname3]);
-
- // Adding the same host twice should not result in an error.
- Services.logins.setLoginSavingEnabled(hostname2, false);
- LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(),
- [hostname1, hostname2, hostname3]);
-
- // Removing a disabled host should work.
- Services.logins.setLoginSavingEnabled(hostname2, true);
- LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(),
- [hostname1, hostname3]);
-
- // Removing the last disabled host should work.
- Services.logins.setLoginSavingEnabled(hostname1, true);
- Services.logins.setLoginSavingEnabled(hostname3, true);
- LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(),
- []);
-});
-
-/**
- * Tests setLoginSavingEnabled and getLoginSavingEnabled.
- */
-add_task(function test_setLoginSavingEnabled_getLoginSavingEnabled()
-{
- let hostname1 = "http://disabled.example.com";
- let hostname2 = "https://disabled.example.com";
-
- // Hosts should not be disabled by default.
- do_check_true(Services.logins.getLoginSavingEnabled(hostname1));
- do_check_true(Services.logins.getLoginSavingEnabled(hostname2));
-
- // Test setting initial values.
- Services.logins.setLoginSavingEnabled(hostname1, false);
- Services.logins.setLoginSavingEnabled(hostname2, true);
- do_check_false(Services.logins.getLoginSavingEnabled(hostname1));
- do_check_true(Services.logins.getLoginSavingEnabled(hostname2));
-
- // Test changing values.
- Services.logins.setLoginSavingEnabled(hostname1, true);
- Services.logins.setLoginSavingEnabled(hostname2, false);
- do_check_true(Services.logins.getLoginSavingEnabled(hostname1));
- do_check_false(Services.logins.getLoginSavingEnabled(hostname2));
-
- // Clean up.
- Services.logins.setLoginSavingEnabled(hostname2, true);
-});
-
-/**
- * Tests setLoginSavingEnabled with invalid NUL characters in the hostname.
- */
-add_task(function test_setLoginSavingEnabled_invalid_characters()
-{
- let hostname = "http://null\0X.example.com";
- Assert.throws(() => Services.logins.setLoginSavingEnabled(hostname, false),
- /Invalid hostname/);
-
- // Verify that no data was stored by the previous call.
- LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(),
- []);
-});
-
-/**
- * Tests different values of the "signon.rememberSignons" property.
- */
-add_task(function test_rememberSignons()
-{
- let hostname1 = "http://example.com";
- let hostname2 = "http://localhost";
-
- // The default value for the preference should be true.
- do_check_true(Services.prefs.getBoolPref("signon.rememberSignons"));
-
- // Hosts should not be disabled by default.
- Services.logins.setLoginSavingEnabled(hostname1, false);
- do_check_false(Services.logins.getLoginSavingEnabled(hostname1));
- do_check_true(Services.logins.getLoginSavingEnabled(hostname2));
-
- // Disable storage of saved passwords globally.
- Services.prefs.setBoolPref("signon.rememberSignons", false);
- do_register_cleanup(
- () => Services.prefs.clearUserPref("signon.rememberSignons"));
-
- // All hosts should now appear disabled.
- do_check_false(Services.logins.getLoginSavingEnabled(hostname1));
- do_check_false(Services.logins.getLoginSavingEnabled(hostname2));
-
- // The list of disabled hosts should be unaltered.
- LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(),
- [hostname1]);
-
- // Changing values with the preference set should work.
- Services.logins.setLoginSavingEnabled(hostname1, true);
- Services.logins.setLoginSavingEnabled(hostname2, false);
-
- // All hosts should still appear disabled.
- do_check_false(Services.logins.getLoginSavingEnabled(hostname1));
- do_check_false(Services.logins.getLoginSavingEnabled(hostname2));
-
- // The list of disabled hosts should have been changed.
- LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(),
- [hostname2]);
-
- // Enable storage of saved passwords again.
- Services.prefs.setBoolPref("signon.rememberSignons", true);
-
- // Hosts should now appear enabled as requested.
- do_check_true(Services.logins.getLoginSavingEnabled(hostname1));
- do_check_false(Services.logins.getLoginSavingEnabled(hostname2));
-
- // Clean up.
- Services.logins.setLoginSavingEnabled(hostname2, true);
- LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(),
- []);
-});
-
-/**
- * Tests storing disabled hosts with non-ASCII characters where IDN is supported.
- */
-add_task(function* test_storage_setLoginSavingEnabled_nonascii_IDN_is_supported()
-{
- let hostname = "http://大.net";
- let encoding = "http://xn--pss.net";
-
- // Test adding disabled host with nonascii URL (http://大.net).
- Services.logins.setLoginSavingEnabled(hostname, false);
- yield* LoginTestUtils.reloadData();
- Assert.equal(Services.logins.getLoginSavingEnabled(hostname), false);
- Assert.equal(Services.logins.getLoginSavingEnabled(encoding), false);
- LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(), [hostname]);
-
- LoginTestUtils.clearData();
-
- // Test adding disabled host with IDN ("http://xn--pss.net").
- Services.logins.setLoginSavingEnabled(encoding, false);
- yield* LoginTestUtils.reloadData();
- Assert.equal(Services.logins.getLoginSavingEnabled(hostname), false);
- Assert.equal(Services.logins.getLoginSavingEnabled(encoding), false);
- LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(), [hostname]);
-
- LoginTestUtils.clearData();
-});
-
-/**
- * Tests storing disabled hosts with non-ASCII characters where IDN is not supported.
- */
-add_task(function* test_storage_setLoginSavingEnabled_nonascii_IDN_not_supported()
-{
- let hostname = "http://√.com";
- let encoding = "http://xn--19g.com";
-
- // Test adding disabled host with nonascii URL (http://√.com).
- Services.logins.setLoginSavingEnabled(hostname, false);
- yield* LoginTestUtils.reloadData();
- Assert.equal(Services.logins.getLoginSavingEnabled(hostname), false);
- Assert.equal(Services.logins.getLoginSavingEnabled(encoding), false);
- LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(), [encoding]);
-
- LoginTestUtils.clearData();
-
- // Test adding disabled host with IDN ("http://xn--19g.com").
- Services.logins.setLoginSavingEnabled(encoding, false);
- yield* LoginTestUtils.reloadData();
- Assert.equal(Services.logins.getLoginSavingEnabled(hostname), false);
- Assert.equal(Services.logins.getLoginSavingEnabled(encoding), false);
- LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(), [encoding]);
-
- LoginTestUtils.clearData();
-});
diff --git a/toolkit/components/passwordmgr/test/unit/test_getFormFields.js b/toolkit/components/passwordmgr/test/unit/test_getFormFields.js
deleted file mode 100644
index 46912ab8fe..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_getFormFields.js
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Test for LoginManagerContent._getFormFields.
- */
-
-"use strict";
-
-// Services.prefs.setBoolPref("signon.debug", true);
-
-Cu.importGlobalProperties(["URL"]);
-
-const LMCBackstagePass = Cu.import("resource://gre/modules/LoginManagerContent.jsm");
-const { LoginManagerContent, LoginFormFactory } = LMCBackstagePass;
-const TESTCASES = [
- {
- description: "1 password field outside of a <form>",
- document: `<input id="pw1" type=password>`,
- returnedFieldIDs: [null, "pw1", null],
- skipEmptyFields: undefined,
- },
- {
- description: "1 text field outside of a <form> without a password field",
- document: `<input id="un1">`,
- returnedFieldIDs: [null, null, null],
- skipEmptyFields: undefined,
- },
- {
- description: "1 username & password field outside of a <form>",
- document: `<input id="un1">
- <input id="pw1" type=password>`,
- returnedFieldIDs: ["un1", "pw1", null],
- skipEmptyFields: undefined,
- },
- {
- description: "1 username & password field in a <form>",
- document: `<form>
- <input id="un1">
- <input id="pw1" type=password>
- </form>`,
- returnedFieldIDs: ["un1", "pw1", null],
- skipEmptyFields: undefined,
- },
- {
- description: "4 empty password fields outside of a <form>",
- document: `<input id="pw1" type=password>
- <input id="pw2" type=password>
- <input id="pw3" type=password>
- <input id="pw4" type=password>`,
- returnedFieldIDs: [null, null, null],
- skipEmptyFields: undefined,
- },
- {
- description: "4 password fields outside of a <form> (1 empty, 3 full) with skipEmpty",
- document: `<input id="pw1" type=password>
- <input id="pw2" type=password value="pass2">
- <input id="pw3" type=password value="pass3">
- <input id="pw4" type=password value="pass4">`,
- returnedFieldIDs: [null, null, null],
- skipEmptyFields: true,
- },
- {
- description: "Form with 1 password field",
- document: `<form><input id="pw1" type=password></form>`,
- returnedFieldIDs: [null, "pw1", null],
- skipEmptyFields: undefined,
- },
- {
- description: "Form with 2 password fields",
- document: `<form><input id="pw1" type=password><input id='pw2' type=password></form>`,
- returnedFieldIDs: [null, "pw1", null],
- skipEmptyFields: undefined,
- },
- {
- description: "1 password field in a form, 1 outside (not processed)",
- document: `<form><input id="pw1" type=password></form><input id="pw2" type=password>`,
- returnedFieldIDs: [null, "pw1", null],
- skipEmptyFields: undefined,
- },
- {
- description: "1 password field in a form, 1 text field outside (not processed)",
- document: `<form><input id="pw1" type=password></form><input>`,
- returnedFieldIDs: [null, "pw1", null],
- skipEmptyFields: undefined,
- },
- {
- description: "1 text field in a form, 1 password field outside (not processed)",
- document: `<form><input></form><input id="pw1" type=password>`,
- returnedFieldIDs: [null, null, null],
- skipEmptyFields: undefined,
- },
- {
- description: "2 password fields outside of a <form> with 1 linked via @form",
- document: `<input id="pw1" type=password><input id="pw2" type=password form='form1'>
- <form id="form1"></form>`,
- returnedFieldIDs: [null, "pw1", null],
- skipEmptyFields: undefined,
- },
- {
- description: "2 password fields outside of a <form> with 1 linked via @form + skipEmpty",
- document: `<input id="pw1" type=password><input id="pw2" type=password form="form1">
- <form id="form1"></form>`,
- returnedFieldIDs: [null, null, null],
- skipEmptyFields: true,
- },
- {
- description: "2 password fields outside of a <form> with 1 linked via @form + skipEmpty with 1 empty",
- document: `<input id="pw1" type=password value="pass1"><input id="pw2" type=password form="form1">
- <form id="form1"></form>`,
- returnedFieldIDs: [null, "pw1", null],
- skipEmptyFields: true,
- },
-];
-
-for (let tc of TESTCASES) {
- do_print("Sanity checking the testcase: " + tc.description);
-
- (function() {
- let testcase = tc;
- add_task(function*() {
- do_print("Starting testcase: " + testcase.description);
- let document = MockDocument.createTestDocument("http://localhost:8080/test/",
- testcase.document);
-
- let input = document.querySelector("input");
- MockDocument.mockOwnerDocumentProperty(input, document, "http://localhost:8080/test/");
-
- let formLike = LoginFormFactory.createFromField(input);
-
- let actual = LoginManagerContent._getFormFields(formLike,
- testcase.skipEmptyFields,
- new Set());
-
- Assert.strictEqual(testcase.returnedFieldIDs.length, 3,
- "_getFormFields returns 3 elements");
-
- for (let i = 0; i < testcase.returnedFieldIDs.length; i++) {
- let expectedID = testcase.returnedFieldIDs[i];
- if (expectedID === null) {
- Assert.strictEqual(actual[i], expectedID,
- "Check returned field " + i + " is null");
- } else {
- Assert.strictEqual(actual[i].id, expectedID,
- "Check returned field " + i + " ID");
- }
- }
- });
- })();
-}
diff --git a/toolkit/components/passwordmgr/test/unit/test_getPasswordFields.js b/toolkit/components/passwordmgr/test/unit/test_getPasswordFields.js
deleted file mode 100644
index 08fa422abd..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_getPasswordFields.js
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Test for LoginManagerContent._getPasswordFields using LoginFormFactory.
- */
-
-"use strict";
-
-const LMCBackstagePass = Cu.import("resource://gre/modules/LoginManagerContent.jsm");
-const { LoginManagerContent, LoginFormFactory } = LMCBackstagePass;
-const TESTCASES = [
- {
- description: "Empty document",
- document: ``,
- returnedFieldIDsByFormLike: [],
- skipEmptyFields: undefined,
- },
- {
- description: "Non-password input with no <form> present",
- document: `<input>`,
- // Only the IDs of password fields should be in this array
- returnedFieldIDsByFormLike: [[]],
- skipEmptyFields: undefined,
- },
- {
- description: "1 password field outside of a <form>",
- document: `<input id="pw1" type=password>`,
- returnedFieldIDsByFormLike: [["pw1"]],
- skipEmptyFields: undefined,
- },
- {
- description: "4 empty password fields outside of a <form>",
- document: `<input id="pw1" type=password>
- <input id="pw2" type=password>
- <input id="pw3" type=password>
- <input id="pw4" type=password>`,
- returnedFieldIDsByFormLike: [[]],
- skipEmptyFields: undefined,
- },
- {
- description: "4 password fields outside of a <form> (1 empty, 3 full) with skipEmpty",
- document: `<input id="pw1" type=password>
- <input id="pw2" type=password value="pass2">
- <input id="pw3" type=password value="pass3">
- <input id="pw4" type=password value="pass4">`,
- returnedFieldIDsByFormLike: [["pw2", "pw3", "pw4"]],
- skipEmptyFields: true,
- },
- {
- description: "Form with 1 password field",
- document: `<form><input id="pw1" type=password></form>`,
- returnedFieldIDsByFormLike: [["pw1"]],
- skipEmptyFields: undefined,
- },
- {
- description: "Form with 2 password fields",
- document: `<form><input id="pw1" type=password><input id='pw2' type=password></form>`,
- returnedFieldIDsByFormLike: [["pw1", "pw2"]],
- skipEmptyFields: undefined,
- },
- {
- description: "1 password field in a form, 1 outside",
- document: `<form><input id="pw1" type=password></form><input id="pw2" type=password>`,
- returnedFieldIDsByFormLike: [["pw1"], ["pw2"]],
- skipEmptyFields: undefined,
- },
- {
- description: "2 password fields outside of a <form> with 1 linked via @form",
- document: `<input id="pw1" type=password><input id="pw2" type=password form='form1'>
- <form id="form1"></form>`,
- returnedFieldIDsByFormLike: [["pw1"], ["pw2"]],
- skipEmptyFields: undefined,
- },
- {
- description: "2 password fields outside of a <form> with 1 linked via @form + skipEmpty",
- document: `<input id="pw1" type=password><input id="pw2" type=password form="form1">
- <form id="form1"></form>`,
- returnedFieldIDsByFormLike: [[], []],
- skipEmptyFields: true,
- },
- {
- description: "skipEmptyFields should also skip white-space only fields",
- document: `<input id="pw-space" type=password value=" ">
- <input id="pw-tab" type=password value=" ">
- <input id="pw-newline" type=password form="form1" value="
-">
- <form id="form1"></form>`,
- returnedFieldIDsByFormLike: [[], []],
- skipEmptyFields: true,
- },
- {
- description: "2 password fields outside of a <form> with 1 linked via @form + skipEmpty with 1 empty",
- document: `<input id="pw1" type=password value=" pass1 "><input id="pw2" type=password form="form1">
- <form id="form1"></form>`,
- returnedFieldIDsByFormLike: [["pw1"], []],
- skipEmptyFields: true,
- },
-];
-
-for (let tc of TESTCASES) {
- do_print("Sanity checking the testcase: " + tc.description);
-
- (function() {
- let testcase = tc;
- add_task(function*() {
- do_print("Starting testcase: " + testcase.description);
- let document = MockDocument.createTestDocument("http://localhost:8080/test/",
- testcase.document);
-
- let mapRootElementToFormLike = new Map();
- for (let input of document.querySelectorAll("input")) {
- let formLike = LoginFormFactory.createFromField(input);
- let existingFormLike = mapRootElementToFormLike.get(formLike.rootElement);
- if (!existingFormLike) {
- mapRootElementToFormLike.set(formLike.rootElement, formLike);
- continue;
- }
-
- // If the formLike is already present, ensure that the properties are the same.
- do_print("Checking if the new FormLike for the same root has the same properties");
- formLikeEqual(formLike, existingFormLike);
- }
-
- Assert.strictEqual(mapRootElementToFormLike.size, testcase.returnedFieldIDsByFormLike.length,
- "Check the correct number of different formLikes were returned");
-
- let formLikeIndex = -1;
- for (let formLikeFromInput of mapRootElementToFormLike.values()) {
- formLikeIndex++;
- let pwFields = LoginManagerContent._getPasswordFields(formLikeFromInput,
- testcase.skipEmptyFields);
-
- if (formLikeFromInput.rootElement instanceof Ci.nsIDOMHTMLFormElement) {
- let formLikeFromForm = LoginFormFactory.createFromForm(formLikeFromInput.rootElement);
- do_print("Checking that the FormLike created for the <form> matches" +
- " the one from a password field");
- formLikeEqual(formLikeFromInput, formLikeFromForm);
- }
-
-
- if (testcase.returnedFieldIDsByFormLike[formLikeIndex].length === 0) {
- Assert.strictEqual(pwFields, null,
- "If no password fields were found null should be returned");
- } else {
- Assert.strictEqual(pwFields.length,
- testcase.returnedFieldIDsByFormLike[formLikeIndex].length,
- "Check the # of password fields for formLike #" + formLikeIndex);
- }
-
- for (let i = 0; i < testcase.returnedFieldIDsByFormLike[formLikeIndex].length; i++) {
- let expectedID = testcase.returnedFieldIDsByFormLike[formLikeIndex][i];
- Assert.strictEqual(pwFields[i].element.id, expectedID,
- "Check password field " + i + " ID");
- }
- }
- });
- })();
-}
diff --git a/toolkit/components/passwordmgr/test/unit/test_getPasswordOrigin.js b/toolkit/components/passwordmgr/test/unit/test_getPasswordOrigin.js
deleted file mode 100644
index f2773ec624..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_getPasswordOrigin.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Test for LoginUtils._getPasswordOrigin
- */
-
-"use strict";
-
-const LMCBackstagePass = Cu.import("resource://gre/modules/LoginManagerContent.jsm");
-const TESTCASES = [
- ["javascript:void(0);", null],
- ["javascript:void(0);", "javascript:", true],
- ["chrome://MyAccount", null],
- ["data:text/html,example", null],
- ["http://username:password@example.com:80/foo?bar=baz#fragment", "http://example.com", true],
- ["http://127.0.0.1:80/foo", "http://127.0.0.1"],
- ["http://[::1]:80/foo", "http://[::1]"],
- ["http://example.com:8080/foo", "http://example.com:8080"],
- ["http://127.0.0.1:8080/foo", "http://127.0.0.1:8080", true],
- ["http://[::1]:8080/foo", "http://[::1]:8080"],
- ["https://example.com:443/foo", "https://example.com"],
- ["https://[::1]:443/foo", "https://[::1]"],
- ["https://[::1]:8443/foo", "https://[::1]:8443"],
- ["ftp://username:password@[::1]:2121/foo", "ftp://[::1]:2121"],
-];
-
-for (let [input, expected, allowJS] of TESTCASES) {
- let actual = LMCBackstagePass.LoginUtils._getPasswordOrigin(input, allowJS);
- Assert.strictEqual(actual, expected, "Checking: " + input);
-}
diff --git a/toolkit/components/passwordmgr/test/unit/test_isOriginMatching.js b/toolkit/components/passwordmgr/test/unit/test_isOriginMatching.js
deleted file mode 100644
index 660910dffa..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_isOriginMatching.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Test LoginHelper.isOriginMatching
- */
-
-"use strict";
-
-Cu.import("resource://gre/modules/LoginHelper.jsm");
-
-add_task(function test_isOriginMatching() {
- let testcases = [
- // Index 0 holds the expected return value followed by arguments to isOriginMatching.
- [true, "http://example.com", "http://example.com"],
- [true, "http://example.com:8080", "http://example.com:8080"],
- [true, "https://example.com", "https://example.com"],
- [true, "https://example.com:8443", "https://example.com:8443"],
- [false, "http://example.com", "http://mozilla.org"],
- [false, "http://example.com", "http://example.com:8080"],
- [false, "https://example.com", "http://example.com"],
- [false, "https://example.com", "https://mozilla.org"],
- [false, "http://example.com", "http://sub.example.com"],
- [false, "https://example.com", "https://sub.example.com"],
- [false, "http://example.com", "https://example.com:8443"],
- [false, "http://example.com:8080", "http://example.com:8081"],
- [false, "http://example.com", ""],
- [false, "", "http://example.com"],
- [true, "http://example.com", "https://example.com", { schemeUpgrades: true }],
- [true, "https://example.com", "https://example.com", { schemeUpgrades: true }],
- [true, "http://example.com:8080", "http://example.com:8080", { schemeUpgrades: true }],
- [true, "https://example.com:8443", "https://example.com:8443", { schemeUpgrades: true }],
- [false, "https://example.com", "http://example.com", { schemeUpgrades: true }], // downgrade
- [false, "http://example.com:8080", "https://example.com", { schemeUpgrades: true }], // port mismatch
- [false, "http://example.com", "https://example.com:8443", { schemeUpgrades: true }], // port mismatch
- [false, "http://sub.example.com", "http://example.com", { schemeUpgrades: true }],
- ];
- for (let tc of testcases) {
- let expected = tc.shift();
- Assert.strictEqual(LoginHelper.isOriginMatching(...tc), expected,
- "Check " + JSON.stringify(tc));
- }
-});
diff --git a/toolkit/components/passwordmgr/test/unit/test_legacy_empty_formSubmitURL.js b/toolkit/components/passwordmgr/test/unit/test_legacy_empty_formSubmitURL.js
deleted file mode 100644
index 4e16aa267f..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_legacy_empty_formSubmitURL.js
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests the legacy case of a login store containing entries that have an empty
- * string in the formSubmitURL field.
- *
- * In normal conditions, for the purpose of login autocomplete, HTML forms are
- * identified using both the prePath of the URI on which they are located, and
- * the prePath of the URI where the data will be submitted. This is represented
- * by the hostname and formSubmitURL properties of the stored nsILoginInfo.
- *
- * When a new login for use in forms is saved (after the user replies to the
- * password prompt), it is always stored with both the hostname and the
- * formSubmitURL (that will be equal to the hostname when the form has no
- * "action" attribute).
- *
- * When the same form is displayed again, the password is autocompleted. If
- * there is another form on the same site that submits to a different site, it
- * is considered a different form, so the password is not autocompleted, but a
- * new password can be stored for the other form.
- *
- * However, the login database might contain data for an nsILoginInfo that has a
- * valid hostname, but an empty formSubmitURL. This means that the login
- * applies to all forms on the site, regardless of where they submit data to.
- *
- * A site can have at most one such login, and in case it is present, then it is
- * not possible to store separate logins for forms on the same site that submit
- * data to different sites.
- *
- * The only way to have such condition is to be using logins that were initially
- * saved by a very old version of the browser, or because of data manually added
- * by an extension in an old version.
- */
-
-"use strict";
-
-// Tests
-
-/**
- * Adds a login with an empty formSubmitURL, then it verifies that no other
- * form logins can be added for the same host.
- */
-add_task(function test_addLogin_wildcard()
-{
- let loginInfo = TestData.formLogin({ hostname: "http://any.example.com",
- formSubmitURL: "" });
- Services.logins.addLogin(loginInfo);
-
- // Normal form logins cannot be added anymore.
- loginInfo = TestData.formLogin({ hostname: "http://any.example.com" });
- Assert.throws(() => Services.logins.addLogin(loginInfo), /already exists/);
-
- // Authentication logins can still be added.
- loginInfo = TestData.authLogin({ hostname: "http://any.example.com" });
- Services.logins.addLogin(loginInfo);
-
- // Form logins can be added for other hosts.
- loginInfo = TestData.formLogin({ hostname: "http://other.example.com" });
- Services.logins.addLogin(loginInfo);
-});
-
-/**
- * Verifies that findLogins, searchLogins, and countLogins include all logins
- * that have an empty formSubmitURL in the store, even when a formSubmitURL is
- * specified.
- */
-add_task(function test_search_all_wildcard()
-{
- // Search a given formSubmitURL on any host.
- let matchData = newPropertyBag({ formSubmitURL: "http://www.example.com" });
- do_check_eq(Services.logins.searchLogins({}, matchData).length, 2);
-
- do_check_eq(Services.logins.findLogins({}, "", "http://www.example.com",
- null).length, 2);
-
- do_check_eq(Services.logins.countLogins("", "http://www.example.com",
- null), 2);
-
- // Restrict the search to one host.
- matchData.setProperty("hostname", "http://any.example.com");
- do_check_eq(Services.logins.searchLogins({}, matchData).length, 1);
-
- do_check_eq(Services.logins.findLogins({}, "http://any.example.com",
- "http://www.example.com",
- null).length, 1);
-
- do_check_eq(Services.logins.countLogins("http://any.example.com",
- "http://www.example.com",
- null), 1);
-});
-
-/**
- * Verifies that specifying an empty string for formSubmitURL in searchLogins
- * includes only logins that have an empty formSubmitURL in the store.
- */
-add_task(function test_searchLogins_wildcard()
-{
- let logins = Services.logins.searchLogins({},
- newPropertyBag({ formSubmitURL: "" }));
-
- let loginInfo = TestData.formLogin({ hostname: "http://any.example.com",
- formSubmitURL: "" });
- LoginTestUtils.assertLoginListsEqual(logins, [loginInfo]);
-});
diff --git a/toolkit/components/passwordmgr/test/unit/test_legacy_validation.js b/toolkit/components/passwordmgr/test/unit/test_legacy_validation.js
deleted file mode 100644
index 709bc98189..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_legacy_validation.js
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests the legacy validation made when storing nsILoginInfo or disabled hosts.
- *
- * These rules exist because of limitations of the "signons.txt" storage file,
- * that is not used anymore. They are still enforced by the Login Manager
- * service, despite these values can now be safely stored in the back-end.
- */
-
-"use strict";
-
-// Tests
-
-/**
- * Tests legacy validation with addLogin.
- */
-add_task(function test_addLogin_invalid_characters_legacy()
-{
- // Test newlines and carriage returns in properties that contain URLs.
- for (let testValue of ["http://newline\n.example.com",
- "http://carriagereturn.example.com\r"]) {
- let loginInfo = TestData.formLogin({ hostname: testValue });
- Assert.throws(() => Services.logins.addLogin(loginInfo),
- /login values can't contain newlines/);
-
- loginInfo = TestData.formLogin({ formSubmitURL: testValue });
- Assert.throws(() => Services.logins.addLogin(loginInfo),
- /login values can't contain newlines/);
-
- loginInfo = TestData.authLogin({ httpRealm: testValue });
- Assert.throws(() => Services.logins.addLogin(loginInfo),
- /login values can't contain newlines/);
- }
-
- // Test newlines and carriage returns in form field names.
- for (let testValue of ["newline_field\n", "carriagereturn\r_field"]) {
- let loginInfo = TestData.formLogin({ usernameField: testValue });
- Assert.throws(() => Services.logins.addLogin(loginInfo),
- /login values can't contain newlines/);
-
- loginInfo = TestData.formLogin({ passwordField: testValue });
- Assert.throws(() => Services.logins.addLogin(loginInfo),
- /login values can't contain newlines/);
- }
-
- // Test a single dot as the value of usernameField and formSubmitURL.
- let loginInfo = TestData.formLogin({ usernameField: "." });
- Assert.throws(() => Services.logins.addLogin(loginInfo),
- /login values can't be periods/);
-
- loginInfo = TestData.formLogin({ formSubmitURL: "." });
- Assert.throws(() => Services.logins.addLogin(loginInfo),
- /login values can't be periods/);
-
- // Test the sequence " (" inside the value of the "hostname" property.
- loginInfo = TestData.formLogin({ hostname: "http://parens (.example.com" });
- Assert.throws(() => Services.logins.addLogin(loginInfo),
- /bad parens in hostname/);
-});
-
-/**
- * Tests legacy validation with setLoginSavingEnabled.
- */
-add_task(function test_setLoginSavingEnabled_invalid_characters_legacy()
-{
- for (let hostname of ["http://newline\n.example.com",
- "http://carriagereturn.example.com\r",
- "."]) {
- Assert.throws(() => Services.logins.setLoginSavingEnabled(hostname, false),
- /Invalid hostname/);
- }
-});
diff --git a/toolkit/components/passwordmgr/test/unit/test_logins_change.js b/toolkit/components/passwordmgr/test/unit/test_logins_change.js
deleted file mode 100644
index 79c6d2f54a..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_logins_change.js
+++ /dev/null
@@ -1,384 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests methods that add, remove, and modify logins.
- */
-
-"use strict";
-
-// Globals
-
-/**
- * Verifies that the specified login is considered invalid by addLogin and by
- * modifyLogin with both nsILoginInfo and nsIPropertyBag arguments.
- *
- * This test requires that the login store is empty.
- *
- * @param aLoginInfo
- * nsILoginInfo corresponding to an invalid login.
- * @param aExpectedError
- * This argument is passed to the "Assert.throws" test to determine which
- * error is expected from the modification functions.
- */
-function checkLoginInvalid(aLoginInfo, aExpectedError)
-{
- // Try to add the new login, and verify that no data is stored.
- Assert.throws(() => Services.logins.addLogin(aLoginInfo), aExpectedError);
- LoginTestUtils.checkLogins([]);
-
- // Add a login for the modification tests.
- let testLogin = TestData.formLogin({ hostname: "http://modify.example.com" });
- Services.logins.addLogin(testLogin);
-
- // Try to modify the existing login using nsILoginInfo and nsIPropertyBag.
- Assert.throws(() => Services.logins.modifyLogin(testLogin, aLoginInfo),
- aExpectedError);
- Assert.throws(() => Services.logins.modifyLogin(testLogin, newPropertyBag({
- hostname: aLoginInfo.hostname,
- formSubmitURL: aLoginInfo.formSubmitURL,
- httpRealm: aLoginInfo.httpRealm,
- username: aLoginInfo.username,
- password: aLoginInfo.password,
- usernameField: aLoginInfo.usernameField,
- passwordField: aLoginInfo.passwordField,
- })), aExpectedError);
-
- // Verify that no data was stored by the previous calls.
- LoginTestUtils.checkLogins([testLogin]);
- Services.logins.removeLogin(testLogin);
-}
-
-/**
- * Verifies that two objects are not the same instance
- * but have equal attributes.
- *
- * @param {Object} objectA
- * An object to compare.
- *
- * @param {Object} objectB
- * Another object to compare.
- *
- * @param {string[]} attributes
- * Attributes to compare.
- *
- * @return true if all passed attributes are equal for both objects, false otherwise.
- */
-function compareAttributes(objectA, objectB, attributes) {
- // If it's the same object, we want to return false.
- if (objectA == objectB) {
- return false;
- }
- return attributes.every(attr => objectA[attr] == objectB[attr]);
-}
-
-// Tests
-
-/**
- * Tests that adding logins to the database works.
- */
-add_task(function test_addLogin_removeLogin()
-{
- // Each login from the test data should be valid and added to the list.
- for (let loginInfo of TestData.loginList()) {
- Services.logins.addLogin(loginInfo);
- }
- LoginTestUtils.checkLogins(TestData.loginList());
-
- // Trying to add each login again should result in an error.
- for (let loginInfo of TestData.loginList()) {
- Assert.throws(() => Services.logins.addLogin(loginInfo), /already exists/);
- }
-
- // Removing each login should succeed.
- for (let loginInfo of TestData.loginList()) {
- Services.logins.removeLogin(loginInfo);
- }
-
- LoginTestUtils.checkLogins([]);
-});
-
-/**
- * Tests invalid combinations of httpRealm and formSubmitURL.
- *
- * For an nsILoginInfo to be valid for storage, one of the two properties should
- * be strictly equal to null, and the other must not be null or an empty string.
- *
- * The legacy case of an empty string in formSubmitURL and a null value in
- * httpRealm is also supported for storage at the moment.
- */
-add_task(function test_invalid_httpRealm_formSubmitURL()
-{
- // httpRealm === null, formSubmitURL === null
- checkLoginInvalid(TestData.formLogin({ formSubmitURL: null }),
- /without a httpRealm or formSubmitURL/);
-
- // httpRealm === "", formSubmitURL === null
- checkLoginInvalid(TestData.authLogin({ httpRealm: "" }),
- /without a httpRealm or formSubmitURL/);
-
- // httpRealm === null, formSubmitURL === ""
- // This is not enforced for now.
- // checkLoginInvalid(TestData.formLogin({ formSubmitURL: "" }),
- // /without a httpRealm or formSubmitURL/);
-
- // httpRealm === "", formSubmitURL === ""
- checkLoginInvalid(TestData.formLogin({ formSubmitURL: "", httpRealm: "" }),
- /both a httpRealm and formSubmitURL/);
-
- // !!httpRealm, !!formSubmitURL
- checkLoginInvalid(TestData.formLogin({ httpRealm: "The HTTP Realm" }),
- /both a httpRealm and formSubmitURL/);
-
- // httpRealm === "", !!formSubmitURL
- checkLoginInvalid(TestData.formLogin({ httpRealm: "" }),
- /both a httpRealm and formSubmitURL/);
-
- // !!httpRealm, formSubmitURL === ""
- checkLoginInvalid(TestData.authLogin({ formSubmitURL: "" }),
- /both a httpRealm and formSubmitURL/);
-});
-
-/**
- * Tests null or empty values in required login properties.
- */
-add_task(function test_missing_properties()
-{
- checkLoginInvalid(TestData.formLogin({ hostname: null }),
- /null or empty hostname/);
-
- checkLoginInvalid(TestData.formLogin({ hostname: "" }),
- /null or empty hostname/);
-
- checkLoginInvalid(TestData.formLogin({ username: null }),
- /null username/);
-
- checkLoginInvalid(TestData.formLogin({ password: null }),
- /null or empty password/);
-
- checkLoginInvalid(TestData.formLogin({ password: "" }),
- /null or empty password/);
-});
-
-/**
- * Tests invalid NUL characters in nsILoginInfo properties.
- */
-add_task(function test_invalid_characters()
-{
- let loginList = [
- TestData.authLogin({ hostname: "http://null\0X.example.com" }),
- TestData.authLogin({ httpRealm: "realm\0" }),
- TestData.formLogin({ formSubmitURL: "http://null\0X.example.com" }),
- TestData.formLogin({ usernameField: "field\0_null" }),
- TestData.formLogin({ usernameField: ".\0" }), // Special single dot case
- TestData.formLogin({ passwordField: "field\0_null" }),
- TestData.formLogin({ username: "user\0name" }),
- TestData.formLogin({ password: "pass\0word" }),
- ];
- for (let loginInfo of loginList) {
- checkLoginInvalid(loginInfo, /login values can't contain nulls/);
- }
-});
-
-/**
- * Tests removing a login that does not exists.
- */
-add_task(function test_removeLogin_nonexisting()
-{
- Assert.throws(() => Services.logins.removeLogin(TestData.formLogin()),
- /No matching logins/);
-});
-
-/**
- * Tests removing all logins at once.
- */
-add_task(function test_removeAllLogins()
-{
- for (let loginInfo of TestData.loginList()) {
- Services.logins.addLogin(loginInfo);
- }
- Services.logins.removeAllLogins();
- LoginTestUtils.checkLogins([]);
-
- // The function should also work when there are no logins to delete.
- Services.logins.removeAllLogins();
-});
-
-/**
- * Tests the modifyLogin function with an nsILoginInfo argument.
- */
-add_task(function test_modifyLogin_nsILoginInfo()
-{
- let loginInfo = TestData.formLogin();
- let updatedLoginInfo = TestData.formLogin({
- username: "new username",
- password: "new password",
- usernameField: "new_form_field_username",
- passwordField: "new_form_field_password",
- });
- let differentLoginInfo = TestData.authLogin();
-
- // Trying to modify a login that does not exist should throw.
- Assert.throws(() => Services.logins.modifyLogin(loginInfo, updatedLoginInfo),
- /No matching logins/);
-
- // Add the first form login, then modify it to match the second.
- Services.logins.addLogin(loginInfo);
- Services.logins.modifyLogin(loginInfo, updatedLoginInfo);
-
- // The data should now match the second login.
- LoginTestUtils.checkLogins([updatedLoginInfo]);
- Assert.throws(() => Services.logins.modifyLogin(loginInfo, updatedLoginInfo),
- /No matching logins/);
-
- // The login can be changed to have a different type and hostname.
- Services.logins.modifyLogin(updatedLoginInfo, differentLoginInfo);
- LoginTestUtils.checkLogins([differentLoginInfo]);
-
- // It is now possible to add a login with the old type and hostname.
- Services.logins.addLogin(loginInfo);
- LoginTestUtils.checkLogins([loginInfo, differentLoginInfo]);
-
- // Modifying a login to match an existing one should not be possible.
- Assert.throws(
- () => Services.logins.modifyLogin(loginInfo, differentLoginInfo),
- /already exists/);
- LoginTestUtils.checkLogins([loginInfo, differentLoginInfo]);
-
- LoginTestUtils.clearData();
-});
-
-/**
- * Tests the modifyLogin function with an nsIPropertyBag argument.
- */
-add_task(function test_modifyLogin_nsIProperyBag()
-{
- let loginInfo = TestData.formLogin();
- let updatedLoginInfo = TestData.formLogin({
- username: "new username",
- password: "new password",
- usernameField: "",
- passwordField: "new_form_field_password",
- });
- let differentLoginInfo = TestData.authLogin();
- let differentLoginProperties = newPropertyBag({
- hostname: differentLoginInfo.hostname,
- formSubmitURL: differentLoginInfo.formSubmitURL,
- httpRealm: differentLoginInfo.httpRealm,
- username: differentLoginInfo.username,
- password: differentLoginInfo.password,
- usernameField: differentLoginInfo.usernameField,
- passwordField: differentLoginInfo.passwordField,
- });
-
- // Trying to modify a login that does not exist should throw.
- Assert.throws(() => Services.logins.modifyLogin(loginInfo, newPropertyBag()),
- /No matching logins/);
-
- // Add the first form login, then modify it to match the second, changing
- // only some of its properties and checking the behavior with an empty string.
- Services.logins.addLogin(loginInfo);
- Services.logins.modifyLogin(loginInfo, newPropertyBag({
- username: "new username",
- password: "new password",
- usernameField: "",
- passwordField: "new_form_field_password",
- }));
-
- // The data should now match the second login.
- LoginTestUtils.checkLogins([updatedLoginInfo]);
- Assert.throws(() => Services.logins.modifyLogin(loginInfo, newPropertyBag()),
- /No matching logins/);
-
- // It is also possible to provide no properties to be modified.
- Services.logins.modifyLogin(updatedLoginInfo, newPropertyBag());
-
- // Specifying a null property for a required value should throw.
- Assert.throws(() => Services.logins.modifyLogin(loginInfo, newPropertyBag({
- usernameField: null,
- })));
-
- // The login can be changed to have a different type and hostname.
- Services.logins.modifyLogin(updatedLoginInfo, differentLoginProperties);
- LoginTestUtils.checkLogins([differentLoginInfo]);
-
- // It is now possible to add a login with the old type and hostname.
- Services.logins.addLogin(loginInfo);
- LoginTestUtils.checkLogins([loginInfo, differentLoginInfo]);
-
- // Modifying a login to match an existing one should not be possible.
- Assert.throws(
- () => Services.logins.modifyLogin(loginInfo, differentLoginProperties),
- /already exists/);
- LoginTestUtils.checkLogins([loginInfo, differentLoginInfo]);
-
- LoginTestUtils.clearData();
-});
-
-/**
- * Tests the login deduplication function.
- */
-add_task(function test_deduplicate_logins() {
- // Different key attributes combinations and the amount of unique
- // results expected for the TestData login list.
- let keyCombinations = [
- {
- keyset: ["username", "password"],
- results: 13,
- },
- {
- keyset: ["hostname", "username"],
- results: 17,
- },
- {
- keyset: ["hostname", "username", "password"],
- results: 18,
- },
- {
- keyset: ["hostname", "username", "password", "formSubmitURL"],
- results: 23,
- },
- ];
-
- let logins = TestData.loginList();
-
- for (let testCase of keyCombinations) {
- // Deduplicate the logins using the current testcase keyset.
- let deduped = LoginHelper.dedupeLogins(logins, testCase.keyset);
- Assert.equal(deduped.length, testCase.results, "Correct amount of results.");
-
- // Checks that every login after deduping is unique.
- Assert.ok(deduped.every(loginA =>
- deduped.every(loginB => !compareAttributes(loginA, loginB, testCase.keyset))
- ), "Every login is unique.");
- }
-});
-
-/**
- * Ensure that the login deduplication function keeps the most recent login.
- */
-add_task(function test_deduplicate_keeps_most_recent() {
- // Logins to deduplicate.
- let logins = [
- TestData.formLogin({timeLastUsed: Date.UTC(2004, 11, 4, 0, 0, 0)}),
- TestData.formLogin({formSubmitURL: "http://example.com", timeLastUsed: Date.UTC(2015, 11, 4, 0, 0, 0)}),
- ];
-
- // Deduplicate the logins.
- let deduped = LoginHelper.dedupeLogins(logins);
- Assert.equal(deduped.length, 1, "Deduplicated the logins array.");
-
- // Verify that the remaining login have the most recent date.
- let loginTimeLastUsed = deduped[0].QueryInterface(Ci.nsILoginMetaInfo).timeLastUsed;
- Assert.equal(loginTimeLastUsed, Date.UTC(2015, 11, 4, 0, 0, 0), "Most recent login was kept.");
-
- // Deduplicate the reverse logins array.
- deduped = LoginHelper.dedupeLogins(logins.reverse());
- Assert.equal(deduped.length, 1, "Deduplicated the reversed logins array.");
-
- // Verify that the remaining login have the most recent date.
- loginTimeLastUsed = deduped[0].QueryInterface(Ci.nsILoginMetaInfo).timeLastUsed;
- Assert.equal(loginTimeLastUsed, Date.UTC(2015, 11, 4, 0, 0, 0), "Most recent login was kept.");
-});
diff --git a/toolkit/components/passwordmgr/test/unit/test_logins_decrypt_failure.js b/toolkit/components/passwordmgr/test/unit/test_logins_decrypt_failure.js
deleted file mode 100644
index ffbedb4de3..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_logins_decrypt_failure.js
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests the case where there are logins that cannot be decrypted.
- */
-
-"use strict";
-
-// Globals
-
-/**
- * Resets the token used to decrypt logins. This is equivalent to resetting the
- * master password when it is not known.
- */
-function resetMasterPassword()
-{
- let token = Cc["@mozilla.org/security/pk11tokendb;1"]
- .getService(Ci.nsIPK11TokenDB).getInternalKeyToken();
- token.reset();
- token.changePassword("", "");
-}
-
-// Tests
-
-/**
- * Resets the master password after some logins were added to the database.
- */
-add_task(function test_logins_decrypt_failure()
-{
- let logins = TestData.loginList();
- for (let loginInfo of logins) {
- Services.logins.addLogin(loginInfo);
- }
-
- // This makes the existing logins non-decryptable.
- resetMasterPassword();
-
- // These functions don't see the non-decryptable entries anymore.
- do_check_eq(Services.logins.getAllLogins().length, 0);
- do_check_eq(Services.logins.findLogins({}, "", "", "").length, 0);
- do_check_eq(Services.logins.searchLogins({}, newPropertyBag()).length, 0);
- Assert.throws(() => Services.logins.modifyLogin(logins[0], newPropertyBag()),
- /No matching logins/);
- Assert.throws(() => Services.logins.removeLogin(logins[0]),
- /No matching logins/);
-
- // The function that counts logins sees the non-decryptable entries also.
- do_check_eq(Services.logins.countLogins("", "", ""), logins.length);
-
- // Equivalent logins can be added.
- for (let loginInfo of logins) {
- Services.logins.addLogin(loginInfo);
- }
- LoginTestUtils.checkLogins(logins);
- do_check_eq(Services.logins.countLogins("", "", ""), logins.length * 2);
-
- // Finding logins doesn't return the non-decryptable duplicates.
- do_check_eq(Services.logins.findLogins({}, "http://www.example.com",
- "", "").length, 1);
- let matchData = newPropertyBag({ hostname: "http://www.example.com" });
- do_check_eq(Services.logins.searchLogins({}, matchData).length, 1);
-
- // Removing single logins does not remove non-decryptable logins.
- for (let loginInfo of TestData.loginList()) {
- Services.logins.removeLogin(loginInfo);
- }
- do_check_eq(Services.logins.getAllLogins().length, 0);
- do_check_eq(Services.logins.countLogins("", "", ""), logins.length);
-
- // Removing all logins removes the non-decryptable entries also.
- Services.logins.removeAllLogins();
- do_check_eq(Services.logins.getAllLogins().length, 0);
- do_check_eq(Services.logins.countLogins("", "", ""), 0);
-});
diff --git a/toolkit/components/passwordmgr/test/unit/test_logins_metainfo.js b/toolkit/components/passwordmgr/test/unit/test_logins_metainfo.js
deleted file mode 100644
index 38344aa7d9..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_logins_metainfo.js
+++ /dev/null
@@ -1,284 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests the handling of nsILoginMetaInfo by methods that add, remove, modify,
- * and find logins.
- */
-
-"use strict";
-
-// Globals
-
-XPCOMUtils.defineLazyServiceGetter(this, "gUUIDGenerator",
- "@mozilla.org/uuid-generator;1",
- "nsIUUIDGenerator");
-
-var gLooksLikeUUIDRegex = /^\{\w{8}-\w{4}-\w{4}-\w{4}-\w{12}\}$/;
-
-/**
- * Retrieves the only login among the current data that matches the hostname of
- * the given nsILoginInfo. In case there is more than one login for the
- * hostname, the test fails.
- */
-function retrieveLoginMatching(aLoginInfo)
-{
- let logins = Services.logins.findLogins({}, aLoginInfo.hostname, "", "");
- do_check_eq(logins.length, 1);
- return logins[0].QueryInterface(Ci.nsILoginMetaInfo);
-}
-
-/**
- * Checks that the nsILoginInfo and nsILoginMetaInfo properties of two different
- * login instances are equal.
- */
-function assertMetaInfoEqual(aActual, aExpected)
-{
- do_check_neq(aActual, aExpected);
-
- // Check the nsILoginInfo properties.
- do_check_true(aActual.equals(aExpected));
-
- // Check the nsILoginMetaInfo properties.
- do_check_eq(aActual.guid, aExpected.guid);
- do_check_eq(aActual.timeCreated, aExpected.timeCreated);
- do_check_eq(aActual.timeLastUsed, aExpected.timeLastUsed);
- do_check_eq(aActual.timePasswordChanged, aExpected.timePasswordChanged);
- do_check_eq(aActual.timesUsed, aExpected.timesUsed);
-}
-
-/**
- * nsILoginInfo instances with or without nsILoginMetaInfo properties.
- */
-var gLoginInfo1;
-var gLoginInfo2;
-var gLoginInfo3;
-
-/**
- * nsILoginInfo instances reloaded with all the nsILoginMetaInfo properties.
- * These are often used to provide the reference values to test against.
- */
-var gLoginMetaInfo1;
-var gLoginMetaInfo2;
-var gLoginMetaInfo3;
-
-// Tests
-
-/**
- * Prepare the test objects that will be used by the following tests.
- */
-add_task(function test_initialize()
-{
- // Use a reference time from ten minutes ago to initialize one instance of
- // nsILoginMetaInfo, to test that reference times are updated when needed.
- let baseTimeMs = Date.now() - 600000;
-
- gLoginInfo1 = TestData.formLogin();
- gLoginInfo2 = TestData.formLogin({
- hostname: "http://other.example.com",
- guid: gUUIDGenerator.generateUUID().toString(),
- timeCreated: baseTimeMs,
- timeLastUsed: baseTimeMs + 2,
- timePasswordChanged: baseTimeMs + 1,
- timesUsed: 2,
- });
- gLoginInfo3 = TestData.authLogin();
-});
-
-/**
- * Tests the behavior of addLogin with regard to metadata. The logins added
- * here are also used by the following tests.
- */
-add_task(function test_addLogin_metainfo()
-{
- // Add a login without metadata to the database.
- Services.logins.addLogin(gLoginInfo1);
-
- // The object provided to addLogin should not have been modified.
- do_check_eq(gLoginInfo1.guid, null);
- do_check_eq(gLoginInfo1.timeCreated, 0);
- do_check_eq(gLoginInfo1.timeLastUsed, 0);
- do_check_eq(gLoginInfo1.timePasswordChanged, 0);
- do_check_eq(gLoginInfo1.timesUsed, 0);
-
- // A login with valid metadata should have been stored.
- gLoginMetaInfo1 = retrieveLoginMatching(gLoginInfo1);
- do_check_true(gLooksLikeUUIDRegex.test(gLoginMetaInfo1.guid));
- let creationTime = gLoginMetaInfo1.timeCreated;
- LoginTestUtils.assertTimeIsAboutNow(creationTime);
- do_check_eq(gLoginMetaInfo1.timeLastUsed, creationTime);
- do_check_eq(gLoginMetaInfo1.timePasswordChanged, creationTime);
- do_check_eq(gLoginMetaInfo1.timesUsed, 1);
-
- // Add a login without metadata to the database.
- let originalLogin = gLoginInfo2.clone().QueryInterface(Ci.nsILoginMetaInfo);
- Services.logins.addLogin(gLoginInfo2);
-
- // The object provided to addLogin should not have been modified.
- assertMetaInfoEqual(gLoginInfo2, originalLogin);
-
- // A login with the provided metadata should have been stored.
- gLoginMetaInfo2 = retrieveLoginMatching(gLoginInfo2);
- assertMetaInfoEqual(gLoginMetaInfo2, gLoginInfo2);
-
- // Add an authentication login to the database before continuing.
- Services.logins.addLogin(gLoginInfo3);
- gLoginMetaInfo3 = retrieveLoginMatching(gLoginInfo3);
- LoginTestUtils.checkLogins([gLoginInfo1, gLoginInfo2, gLoginInfo3]);
-});
-
-/**
- * Tests that adding a login with a duplicate GUID throws an exception.
- */
-add_task(function test_addLogin_metainfo_duplicate()
-{
- let loginInfo = TestData.formLogin({
- hostname: "http://duplicate.example.com",
- guid: gLoginMetaInfo2.guid,
- });
- Assert.throws(() => Services.logins.addLogin(loginInfo),
- /specified GUID already exists/);
-
- // Verify that no data was stored by the previous call.
- LoginTestUtils.checkLogins([gLoginInfo1, gLoginInfo2, gLoginInfo3]);
-});
-
-/**
- * Tests that the existing metadata is not changed when modifyLogin is called
- * with an nsILoginInfo argument.
- */
-add_task(function test_modifyLogin_nsILoginInfo_metainfo_ignored()
-{
- let newLoginInfo = gLoginInfo1.clone().QueryInterface(Ci.nsILoginMetaInfo);
- newLoginInfo.guid = gUUIDGenerator.generateUUID().toString();
- newLoginInfo.timeCreated = Date.now();
- newLoginInfo.timeLastUsed = Date.now();
- newLoginInfo.timePasswordChanged = Date.now();
- newLoginInfo.timesUsed = 12;
- Services.logins.modifyLogin(gLoginInfo1, newLoginInfo);
-
- newLoginInfo = retrieveLoginMatching(gLoginInfo1);
- assertMetaInfoEqual(newLoginInfo, gLoginMetaInfo1);
-});
-
-/**
- * Tests the modifyLogin function with an nsIProperyBag argument.
- */
-add_task(function test_modifyLogin_nsIProperyBag_metainfo()
-{
- // Use a new reference time that is two minutes from now.
- let newTimeMs = Date.now() + 120000;
- let newUUIDValue = gUUIDGenerator.generateUUID().toString();
-
- // Check that properties are changed as requested.
- Services.logins.modifyLogin(gLoginInfo1, newPropertyBag({
- guid: newUUIDValue,
- timeCreated: newTimeMs,
- timeLastUsed: newTimeMs + 2,
- timePasswordChanged: newTimeMs + 1,
- timesUsed: 2,
- }));
-
- gLoginMetaInfo1 = retrieveLoginMatching(gLoginInfo1);
- do_check_eq(gLoginMetaInfo1.guid, newUUIDValue);
- do_check_eq(gLoginMetaInfo1.timeCreated, newTimeMs);
- do_check_eq(gLoginMetaInfo1.timeLastUsed, newTimeMs + 2);
- do_check_eq(gLoginMetaInfo1.timePasswordChanged, newTimeMs + 1);
- do_check_eq(gLoginMetaInfo1.timesUsed, 2);
-
- // Check that timePasswordChanged is updated when changing the password.
- let originalLogin = gLoginInfo2.clone().QueryInterface(Ci.nsILoginMetaInfo);
- Services.logins.modifyLogin(gLoginInfo2, newPropertyBag({
- password: "new password",
- }));
- gLoginInfo2.password = "new password";
-
- gLoginMetaInfo2 = retrieveLoginMatching(gLoginInfo2);
- do_check_eq(gLoginMetaInfo2.password, gLoginInfo2.password);
- do_check_eq(gLoginMetaInfo2.timeCreated, originalLogin.timeCreated);
- do_check_eq(gLoginMetaInfo2.timeLastUsed, originalLogin.timeLastUsed);
- LoginTestUtils.assertTimeIsAboutNow(gLoginMetaInfo2.timePasswordChanged);
-
- // Check that timePasswordChanged is not set to the current time when changing
- // the password and specifying a new value for the property at the same time.
- Services.logins.modifyLogin(gLoginInfo2, newPropertyBag({
- password: "other password",
- timePasswordChanged: newTimeMs,
- }));
- gLoginInfo2.password = "other password";
-
- gLoginMetaInfo2 = retrieveLoginMatching(gLoginInfo2);
- do_check_eq(gLoginMetaInfo2.password, gLoginInfo2.password);
- do_check_eq(gLoginMetaInfo2.timeCreated, originalLogin.timeCreated);
- do_check_eq(gLoginMetaInfo2.timeLastUsed, originalLogin.timeLastUsed);
- do_check_eq(gLoginMetaInfo2.timePasswordChanged, newTimeMs);
-
- // Check the special timesUsedIncrement property.
- Services.logins.modifyLogin(gLoginInfo2, newPropertyBag({
- timesUsedIncrement: 2,
- }));
-
- gLoginMetaInfo2 = retrieveLoginMatching(gLoginInfo2);
- do_check_eq(gLoginMetaInfo2.timeCreated, originalLogin.timeCreated);
- do_check_eq(gLoginMetaInfo2.timeLastUsed, originalLogin.timeLastUsed);
- do_check_eq(gLoginMetaInfo2.timePasswordChanged, newTimeMs);
- do_check_eq(gLoginMetaInfo2.timesUsed, 4);
-});
-
-/**
- * Tests that modifying a login to a duplicate GUID throws an exception.
- */
-add_task(function test_modifyLogin_nsIProperyBag_metainfo_duplicate()
-{
- Assert.throws(() => Services.logins.modifyLogin(gLoginInfo1, newPropertyBag({
- guid: gLoginInfo2.guid,
- })), /specified GUID already exists/);
- LoginTestUtils.checkLogins([gLoginInfo1, gLoginInfo2, gLoginInfo3]);
-});
-
-/**
- * Tests searching logins using nsILoginMetaInfo properties.
- */
-add_task(function test_searchLogins_metainfo()
-{
- // Find by GUID.
- let logins = Services.logins.searchLogins({}, newPropertyBag({
- guid: gLoginMetaInfo1.guid,
- }));
- do_check_eq(logins.length, 1);
- let foundLogin = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- assertMetaInfoEqual(foundLogin, gLoginMetaInfo1);
-
- // Find by timestamp.
- logins = Services.logins.searchLogins({}, newPropertyBag({
- timePasswordChanged: gLoginMetaInfo2.timePasswordChanged,
- }));
- do_check_eq(logins.length, 1);
- foundLogin = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- assertMetaInfoEqual(foundLogin, gLoginMetaInfo2);
-
- // Find using two properties at the same time.
- logins = Services.logins.searchLogins({}, newPropertyBag({
- guid: gLoginMetaInfo3.guid,
- timePasswordChanged: gLoginMetaInfo3.timePasswordChanged,
- }));
- do_check_eq(logins.length, 1);
- foundLogin = logins[0].QueryInterface(Ci.nsILoginMetaInfo);
- assertMetaInfoEqual(foundLogin, gLoginMetaInfo3);
-});
-
-/**
- * Tests that the default nsILoginManagerStorage module attached to the Login
- * Manager service is able to save and reload nsILoginMetaInfo properties.
- */
-add_task(function* test_storage_metainfo()
-{
- yield* LoginTestUtils.reloadData();
- LoginTestUtils.checkLogins([gLoginInfo1, gLoginInfo2, gLoginInfo3]);
-
- assertMetaInfoEqual(retrieveLoginMatching(gLoginInfo1), gLoginMetaInfo1);
- assertMetaInfoEqual(retrieveLoginMatching(gLoginInfo2), gLoginMetaInfo2);
- assertMetaInfoEqual(retrieveLoginMatching(gLoginInfo3), gLoginMetaInfo3);
-});
diff --git a/toolkit/components/passwordmgr/test/unit/test_logins_search.js b/toolkit/components/passwordmgr/test/unit/test_logins_search.js
deleted file mode 100644
index 7307719812..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_logins_search.js
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * Tests methods that find specific logins in the store (findLogins,
- * searchLogins, and countLogins).
- *
- * The getAllLogins method is not tested explicitly here, because it is used by
- * all tests to verify additions, removals and modifications to the login store.
- */
-
-"use strict";
-
-// Globals
-
-/**
- * Returns a list of new nsILoginInfo objects that are a subset of the test
- * data, built to match the specified query.
- *
- * @param aQuery
- * Each property and value of this object restricts the search to those
- * entries from the test data that match the property exactly.
- */
-function buildExpectedLogins(aQuery)
-{
- return TestData.loginList().filter(
- entry => Object.keys(aQuery).every(name => entry[name] === aQuery[name]));
-}
-
-/**
- * Tests the searchLogins function.
- *
- * @param aQuery
- * Each property and value of this object is translated to an entry in
- * the nsIPropertyBag parameter of searchLogins.
- * @param aExpectedCount
- * Number of logins from the test data that should be found. The actual
- * list of logins is obtained using the buildExpectedLogins helper, and
- * this value is just used to verify that modifications to the test data
- * don't make the current test meaningless.
- */
-function checkSearchLogins(aQuery, aExpectedCount)
-{
- do_print("Testing searchLogins for " + JSON.stringify(aQuery));
-
- let expectedLogins = buildExpectedLogins(aQuery);
- do_check_eq(expectedLogins.length, aExpectedCount);
-
- let outCount = {};
- let logins = Services.logins.searchLogins(outCount, newPropertyBag(aQuery));
- do_check_eq(outCount.value, expectedLogins.length);
- LoginTestUtils.assertLoginListsEqual(logins, expectedLogins);
-}
-
-/**
- * Tests findLogins, searchLogins, and countLogins with the same query.
- *
- * @param aQuery
- * The "hostname", "formSubmitURL", and "httpRealm" properties of this
- * object are passed as parameters to findLogins and countLogins. The
- * same object is then passed to the checkSearchLogins function.
- * @param aExpectedCount
- * Number of logins from the test data that should be found. The actual
- * list of logins is obtained using the buildExpectedLogins helper, and
- * this value is just used to verify that modifications to the test data
- * don't make the current test meaningless.
- */
-function checkAllSearches(aQuery, aExpectedCount)
-{
- do_print("Testing all search functions for " + JSON.stringify(aQuery));
-
- let expectedLogins = buildExpectedLogins(aQuery);
- do_check_eq(expectedLogins.length, aExpectedCount);
-
- // The findLogins and countLogins functions support wildcard matches by
- // specifying empty strings as parameters, while searchLogins requires
- // omitting the property entirely.
- let hostname = ("hostname" in aQuery) ? aQuery.hostname : "";
- let formSubmitURL = ("formSubmitURL" in aQuery) ? aQuery.formSubmitURL : "";
- let httpRealm = ("httpRealm" in aQuery) ? aQuery.httpRealm : "";
-
- // Test findLogins.
- let outCount = {};
- let logins = Services.logins.findLogins(outCount, hostname, formSubmitURL,
- httpRealm);
- do_check_eq(outCount.value, expectedLogins.length);
- LoginTestUtils.assertLoginListsEqual(logins, expectedLogins);
-
- // Test countLogins.
- let count = Services.logins.countLogins(hostname, formSubmitURL, httpRealm);
- do_check_eq(count, expectedLogins.length);
-
- // Test searchLogins.
- checkSearchLogins(aQuery, aExpectedCount);
-}
-
-// Tests
-
-/**
- * Prepare data for the following tests.
- */
-add_task(function test_initialize()
-{
- for (let login of TestData.loginList()) {
- Services.logins.addLogin(login);
- }
-});
-
-/**
- * Tests findLogins, searchLogins, and countLogins with basic queries.
- */
-add_task(function test_search_all_basic()
-{
- // Find all logins, using no filters in the search functions.
- checkAllSearches({}, 23);
-
- // Find all form logins, then all authentication logins.
- checkAllSearches({ httpRealm: null }, 14);
- checkAllSearches({ formSubmitURL: null }, 9);
-
- // Find all form logins on one host, then all authentication logins.
- checkAllSearches({ hostname: "http://www4.example.com",
- httpRealm: null }, 3);
- checkAllSearches({ hostname: "http://www2.example.org",
- formSubmitURL: null }, 2);
-
- // Verify that scheme and subdomain are distinct in the hostname.
- checkAllSearches({ hostname: "http://www.example.com" }, 1);
- checkAllSearches({ hostname: "https://www.example.com" }, 1);
- checkAllSearches({ hostname: "https://example.com" }, 1);
- checkAllSearches({ hostname: "http://www3.example.com" }, 3);
-
- // Verify that scheme and subdomain are distinct in formSubmitURL.
- checkAllSearches({ formSubmitURL: "http://www.example.com" }, 2);
- checkAllSearches({ formSubmitURL: "https://www.example.com" }, 2);
- checkAllSearches({ formSubmitURL: "http://example.com" }, 1);
-
- // Find by formSubmitURL on a single host.
- checkAllSearches({ hostname: "http://www3.example.com",
- formSubmitURL: "http://www.example.com" }, 1);
- checkAllSearches({ hostname: "http://www3.example.com",
- formSubmitURL: "https://www.example.com" }, 1);
- checkAllSearches({ hostname: "http://www3.example.com",
- formSubmitURL: "http://example.com" }, 1);
-
- // Find by httpRealm on all hosts.
- checkAllSearches({ httpRealm: "The HTTP Realm" }, 3);
- checkAllSearches({ httpRealm: "ftp://ftp.example.org" }, 1);
- checkAllSearches({ httpRealm: "The HTTP Realm Other" }, 2);
-
- // Find by httpRealm on a single host.
- checkAllSearches({ hostname: "http://example.net",
- httpRealm: "The HTTP Realm" }, 1);
- checkAllSearches({ hostname: "http://example.net",
- httpRealm: "The HTTP Realm Other" }, 1);
- checkAllSearches({ hostname: "ftp://example.net",
- httpRealm: "ftp://example.net" }, 1);
-});
-
-/**
- * Tests searchLogins with advanced queries.
- */
-add_task(function test_searchLogins()
-{
- checkSearchLogins({ usernameField: "form_field_username" }, 12);
- checkSearchLogins({ passwordField: "form_field_password" }, 13);
-
- // Find all logins with an empty usernameField, including for authentication.
- checkSearchLogins({ usernameField: "" }, 11);
-
- // Find form logins with an empty usernameField.
- checkSearchLogins({ httpRealm: null,
- usernameField: "" }, 2);
-
- // Find logins with an empty usernameField on one host.
- checkSearchLogins({ hostname: "http://www6.example.com",
- usernameField: "" }, 1);
-});
-
-/**
- * Tests searchLogins with invalid arguments.
- */
-add_task(function test_searchLogins_invalid()
-{
- Assert.throws(() => Services.logins.searchLogins({},
- newPropertyBag({ username: "value" })),
- /Unexpected field/);
-});
-
-/**
- * Tests that matches are case-sensitive, compare the full field value, and are
- * strict when interpreting the prePath of URIs.
- */
-add_task(function test_search_all_full_case_sensitive()
-{
- checkAllSearches({ hostname: "http://www.example.com" }, 1);
- checkAllSearches({ hostname: "http://www.example.com/" }, 0);
- checkAllSearches({ hostname: "example.com" }, 0);
-
- checkAllSearches({ formSubmitURL: "http://www.example.com" }, 2);
- checkAllSearches({ formSubmitURL: "http://www.example.com/" }, 0);
- checkAllSearches({ formSubmitURL: "http://" }, 0);
- checkAllSearches({ formSubmitURL: "example.com" }, 0);
-
- checkAllSearches({ httpRealm: "The HTTP Realm" }, 3);
- checkAllSearches({ httpRealm: "The http Realm" }, 0);
- checkAllSearches({ httpRealm: "The HTTP" }, 0);
- checkAllSearches({ httpRealm: "Realm" }, 0);
-});
-
-/**
- * Tests findLogins, searchLogins, and countLogins with queries that should
- * return no values.
- */
-add_task(function test_search_all_empty()
-{
- checkAllSearches({ hostname: "http://nonexistent.example.com" }, 0);
- checkAllSearches({ formSubmitURL: "http://www.example.com",
- httpRealm: "The HTTP Realm" }, 0);
-
- checkSearchLogins({ hostname: "" }, 0);
- checkSearchLogins({ id: "1000" }, 0);
-});
diff --git a/toolkit/components/passwordmgr/test/unit/test_maybeImportLogin.js b/toolkit/components/passwordmgr/test/unit/test_maybeImportLogin.js
deleted file mode 100644
index 19175df59b..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_maybeImportLogin.js
+++ /dev/null
@@ -1,169 +0,0 @@
-"use strict";
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/LoginHelper.jsm");
-
-const HOST1 = "https://www.example.com/";
-const HOST2 = "https://www.mozilla.org/";
-
-const USER1 = "myuser";
-const USER2 = "anotheruser";
-
-const PASS1 = "mypass";
-const PASS2 = "anotherpass";
-const PASS3 = "yetanotherpass";
-
-add_task(function test_new_logins() {
- let importedLogin = LoginHelper.maybeImportLogin({
- username: USER1,
- password: PASS1,
- hostname: HOST1,
- formSubmitURL: HOST1,
- });
- Assert.ok(importedLogin, "Return value should indicate imported login.");
- let matchingLogins = LoginHelper.searchLoginsWithObject({hostname: HOST1});
- Assert.equal(matchingLogins.length, 1, `There should be 1 login for ${HOST1}`);
-
- importedLogin = LoginHelper.maybeImportLogin({
- username: USER1,
- password: PASS1,
- hostname: HOST2,
- formSubmitURL: HOST2,
- });
-
- Assert.ok(importedLogin, "Return value should indicate another imported login.");
- matchingLogins = LoginHelper.searchLoginsWithObject({hostname: HOST1});
- Assert.equal(matchingLogins.length, 1, `There should still be 1 login for ${HOST1}`);
-
- matchingLogins = LoginHelper.searchLoginsWithObject({hostname: HOST2});
- Assert.equal(matchingLogins.length, 1, `There should also be 1 login for ${HOST2}`);
- Assert.equal(Services.logins.getAllLogins().length, 2, "There should be 2 logins in total");
- Services.logins.removeAllLogins();
-});
-
-add_task(function test_duplicate_logins() {
- let importedLogin = LoginHelper.maybeImportLogin({
- username: USER1,
- password: PASS1,
- hostname: HOST1,
- formSubmitURL: HOST1,
- });
- Assert.ok(importedLogin, "Return value should indicate imported login.");
- let matchingLogins = LoginHelper.searchLoginsWithObject({hostname: HOST1});
- Assert.equal(matchingLogins.length, 1, `There should be 1 login for ${HOST1}`);
-
- importedLogin = LoginHelper.maybeImportLogin({
- username: USER1,
- password: PASS1,
- hostname: HOST1,
- formSubmitURL: HOST1,
- });
- Assert.ok(!importedLogin, "Return value should indicate no new login was imported.");
- matchingLogins = LoginHelper.searchLoginsWithObject({hostname: HOST1});
- Assert.equal(matchingLogins.length, 1, `There should still be 1 login for ${HOST1}`);
- Services.logins.removeAllLogins();
-});
-
-add_task(function test_different_passwords() {
- let importedLogin = LoginHelper.maybeImportLogin({
- username: USER1,
- password: PASS1,
- hostname: HOST1,
- formSubmitURL: HOST1,
- timeCreated: new Date(Date.now() - 1000),
- });
- Assert.ok(importedLogin, "Return value should indicate imported login.");
- let matchingLogins = LoginHelper.searchLoginsWithObject({hostname: HOST1});
- Assert.equal(matchingLogins.length, 1, `There should be 1 login for ${HOST1}`);
-
- // This item will be newer, so its password should take precedence.
- importedLogin = LoginHelper.maybeImportLogin({
- username: USER1,
- password: PASS2,
- hostname: HOST1,
- formSubmitURL: HOST1,
- timeCreated: new Date(),
- });
- Assert.ok(!importedLogin, "Return value should not indicate imported login (as we updated an existing one).");
- matchingLogins = LoginHelper.searchLoginsWithObject({hostname: HOST1});
- Assert.equal(matchingLogins.length, 1, `There should still be 1 login for ${HOST1}`);
- Assert.equal(matchingLogins[0].password, PASS2, "We should have updated the password for this login.");
-
- // Now try to update with an older password:
- importedLogin = LoginHelper.maybeImportLogin({
- username: USER1,
- password: PASS3,
- hostname: HOST1,
- formSubmitURL: HOST1,
- timeCreated: new Date(Date.now() - 1000000),
- });
- Assert.ok(!importedLogin, "Return value should not indicate imported login (as we didn't update anything).");
- matchingLogins = LoginHelper.searchLoginsWithObject({hostname: HOST1});
- Assert.equal(matchingLogins.length, 1, `There should still be 1 login for ${HOST1}`);
- Assert.equal(matchingLogins[0].password, PASS2, "We should NOT have updated the password for this login.");
-
- Services.logins.removeAllLogins();
-});
-
-add_task(function test_different_usernames() {
- let importedLogin = LoginHelper.maybeImportLogin({
- username: USER1,
- password: PASS1,
- hostname: HOST1,
- formSubmitURL: HOST1,
- });
- Assert.ok(importedLogin, "Return value should indicate imported login.");
- let matchingLogins = LoginHelper.searchLoginsWithObject({hostname: HOST1});
- Assert.equal(matchingLogins.length, 1, `There should be 1 login for ${HOST1}`);
-
- importedLogin = LoginHelper.maybeImportLogin({
- username: USER2,
- password: PASS1,
- hostname: HOST1,
- formSubmitURL: HOST1,
- });
- Assert.ok(importedLogin, "Return value should indicate another imported login.");
- matchingLogins = LoginHelper.searchLoginsWithObject({hostname: HOST1});
- Assert.equal(matchingLogins.length, 2, `There should now be 2 logins for ${HOST1}`);
-
- Services.logins.removeAllLogins();
-});
-
-add_task(function test_different_targets() {
- let importedLogin = LoginHelper.maybeImportLogin({
- username: USER1,
- password: PASS1,
- hostname: HOST1,
- formSubmitURL: HOST1,
- });
- Assert.ok(importedLogin, "Return value should indicate imported login.");
- let matchingLogins = LoginHelper.searchLoginsWithObject({hostname: HOST1});
- Assert.equal(matchingLogins.length, 1, `There should be 1 login for ${HOST1}`);
-
- // Not passing either a formSubmitURL or a httpRealm should be treated as
- // the same as the previous login
- importedLogin = LoginHelper.maybeImportLogin({
- username: USER1,
- password: PASS1,
- hostname: HOST1,
- });
- Assert.ok(!importedLogin, "Return value should NOT indicate imported login " +
- "(because a missing formSubmitURL and httpRealm should be duped to the existing login).");
- matchingLogins = LoginHelper.searchLoginsWithObject({hostname: HOST1});
- Assert.equal(matchingLogins.length, 1, `There should still be 1 login for ${HOST1}`);
- Assert.equal(matchingLogins[0].formSubmitURL, HOST1, "The form submission URL should have been kept.");
-
- importedLogin = LoginHelper.maybeImportLogin({
- username: USER1,
- password: PASS1,
- hostname: HOST1,
- httpRealm: HOST1,
- });
- Assert.ok(importedLogin, "Return value should indicate another imported login " +
- "as an httpRealm login shouldn't be duped.");
- matchingLogins = LoginHelper.searchLoginsWithObject({hostname: HOST1});
- Assert.equal(matchingLogins.length, 2, `There should now be 2 logins for ${HOST1}`);
-
- Services.logins.removeAllLogins();
-});
-
diff --git a/toolkit/components/passwordmgr/test/unit/test_module_LoginImport.js b/toolkit/components/passwordmgr/test/unit/test_module_LoginImport.js
deleted file mode 100644
index b8793e1bd9..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_module_LoginImport.js
+++ /dev/null
@@ -1,243 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests the LoginImport object.
- */
-
-"use strict";
-
-// Globals
-
-Cu.import("resource://gre/modules/Task.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "LoginHelper",
- "resource://gre/modules/LoginHelper.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "LoginImport",
- "resource://gre/modules/LoginImport.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "LoginStore",
- "resource://gre/modules/LoginStore.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Sqlite",
- "resource://gre/modules/Sqlite.jsm");
-
-XPCOMUtils.defineLazyServiceGetter(this, "gLoginManagerCrypto",
- "@mozilla.org/login-manager/crypto/SDR;1",
- "nsILoginManagerCrypto");
-XPCOMUtils.defineLazyServiceGetter(this, "gUUIDGenerator",
- "@mozilla.org/uuid-generator;1",
- "nsIUUIDGenerator");
-
-/**
- * Creates empty login data tables in the given SQLite connection, resembling
- * the most recent schema version (excluding indices).
- */
-function promiseCreateDatabaseSchema(aConnection)
-{
- return Task.spawn(function* () {
- yield aConnection.setSchemaVersion(5);
- yield aConnection.execute("CREATE TABLE moz_logins (" +
- "id INTEGER PRIMARY KEY," +
- "hostname TEXT NOT NULL," +
- "httpRealm TEXT," +
- "formSubmitURL TEXT," +
- "usernameField TEXT NOT NULL," +
- "passwordField TEXT NOT NULL," +
- "encryptedUsername TEXT NOT NULL," +
- "encryptedPassword TEXT NOT NULL," +
- "guid TEXT," +
- "encType INTEGER," +
- "timeCreated INTEGER," +
- "timeLastUsed INTEGER," +
- "timePasswordChanged INTEGER," +
- "timesUsed INTEGER)");
- yield aConnection.execute("CREATE TABLE moz_disabledHosts (" +
- "id INTEGER PRIMARY KEY," +
- "hostname TEXT UNIQUE)");
- yield aConnection.execute("CREATE TABLE moz_deleted_logins (" +
- "id INTEGER PRIMARY KEY," +
- "guid TEXT," +
- "timeDeleted INTEGER)");
- });
-}
-
-/**
- * Inserts a new entry in the database resembling the given nsILoginInfo object.
- */
-function promiseInsertLoginInfo(aConnection, aLoginInfo)
-{
- aLoginInfo.QueryInterface(Ci.nsILoginMetaInfo);
-
- // We can't use the aLoginInfo object directly in the execute statement
- // because the bind code in Sqlite.jsm doesn't allow objects with extra
- // properties beyond those being binded. So we might as well use an array as
- // it is simpler.
- let values = [
- aLoginInfo.hostname,
- aLoginInfo.httpRealm,
- aLoginInfo.formSubmitURL,
- aLoginInfo.usernameField,
- aLoginInfo.passwordField,
- gLoginManagerCrypto.encrypt(aLoginInfo.username),
- gLoginManagerCrypto.encrypt(aLoginInfo.password),
- aLoginInfo.guid,
- aLoginInfo.encType,
- aLoginInfo.timeCreated,
- aLoginInfo.timeLastUsed,
- aLoginInfo.timePasswordChanged,
- aLoginInfo.timesUsed,
- ];
-
- return aConnection.execute("INSERT INTO moz_logins (hostname, " +
- "httpRealm, formSubmitURL, usernameField, " +
- "passwordField, encryptedUsername, " +
- "encryptedPassword, guid, encType, timeCreated, " +
- "timeLastUsed, timePasswordChanged, timesUsed) " +
- "VALUES (?" + ",?".repeat(12) + ")", values);
-}
-
-/**
- * Inserts a new disabled host entry in the database.
- */
-function promiseInsertDisabledHost(aConnection, aHostname)
-{
- return aConnection.execute("INSERT INTO moz_disabledHosts (hostname) " +
- "VALUES (?)", [aHostname]);
-}
-
-// Tests
-
-/**
- * Imports login data from a SQLite file constructed using the test data.
- */
-add_task(function* test_import()
-{
- let store = new LoginStore(getTempFile("test-import.json").path);
- let loginsSqlite = getTempFile("test-logins.sqlite").path;
-
- // Prepare the logins to be imported, including the nsILoginMetaInfo data.
- let loginList = TestData.loginList();
- for (let loginInfo of loginList) {
- loginInfo.QueryInterface(Ci.nsILoginMetaInfo);
- loginInfo.guid = gUUIDGenerator.generateUUID().toString();
- loginInfo.timeCreated = Date.now();
- loginInfo.timeLastUsed = Date.now();
- loginInfo.timePasswordChanged = Date.now();
- loginInfo.timesUsed = 1;
- }
-
- // Create and populate the SQLite database first.
- let connection = yield Sqlite.openConnection({ path: loginsSqlite });
- try {
- yield promiseCreateDatabaseSchema(connection);
- for (let loginInfo of loginList) {
- yield promiseInsertLoginInfo(connection, loginInfo);
- }
- yield promiseInsertDisabledHost(connection, "http://www.example.com");
- yield promiseInsertDisabledHost(connection, "https://www.example.org");
- } finally {
- yield connection.close();
- }
-
- // The "load" method must be called before importing data.
- yield store.load();
- yield new LoginImport(store, loginsSqlite).import();
-
- // Verify that every login in the test data has a matching imported row.
- do_check_eq(loginList.length, store.data.logins.length);
- do_check_true(loginList.every(function (loginInfo) {
- return store.data.logins.some(function (loginDataItem) {
- let username = gLoginManagerCrypto.decrypt(loginDataItem.encryptedUsername);
- let password = gLoginManagerCrypto.decrypt(loginDataItem.encryptedPassword);
- return loginDataItem.hostname == loginInfo.hostname &&
- loginDataItem.httpRealm == loginInfo.httpRealm &&
- loginDataItem.formSubmitURL == loginInfo.formSubmitURL &&
- loginDataItem.usernameField == loginInfo.usernameField &&
- loginDataItem.passwordField == loginInfo.passwordField &&
- username == loginInfo.username &&
- password == loginInfo.password &&
- loginDataItem.guid == loginInfo.guid &&
- loginDataItem.encType == loginInfo.encType &&
- loginDataItem.timeCreated == loginInfo.timeCreated &&
- loginDataItem.timeLastUsed == loginInfo.timeLastUsed &&
- loginDataItem.timePasswordChanged == loginInfo.timePasswordChanged &&
- loginDataItem.timesUsed == loginInfo.timesUsed;
- });
- }));
-
- // Verify that disabled hosts have been imported.
- do_check_eq(store.data.disabledHosts.length, 2);
- do_check_true(store.data.disabledHosts.indexOf("http://www.example.com") != -1);
- do_check_true(store.data.disabledHosts.indexOf("https://www.example.org") != -1);
-});
-
-/**
- * Tests imports of NULL values due to a downgraded database.
- */
-add_task(function* test_import_downgraded()
-{
- let store = new LoginStore(getTempFile("test-import-downgraded.json").path);
- let loginsSqlite = getTempFile("test-logins-downgraded.sqlite").path;
-
- // Create and populate the SQLite database first.
- let connection = yield Sqlite.openConnection({ path: loginsSqlite });
- try {
- yield promiseCreateDatabaseSchema(connection);
- yield connection.setSchemaVersion(3);
- yield promiseInsertLoginInfo(connection, TestData.formLogin({
- guid: gUUIDGenerator.generateUUID().toString(),
- timeCreated: null,
- timeLastUsed: null,
- timePasswordChanged: null,
- timesUsed: 0,
- }));
- } finally {
- yield connection.close();
- }
-
- // The "load" method must be called before importing data.
- yield store.load();
- yield new LoginImport(store, loginsSqlite).import();
-
- // Verify that the missing metadata was generated correctly.
- let loginItem = store.data.logins[0];
- let creationTime = loginItem.timeCreated;
- LoginTestUtils.assertTimeIsAboutNow(creationTime);
- do_check_eq(loginItem.timeLastUsed, creationTime);
- do_check_eq(loginItem.timePasswordChanged, creationTime);
- do_check_eq(loginItem.timesUsed, 1);
-});
-
-/**
- * Verifies that importing from a SQLite file with database version 2 fails.
- */
-add_task(function* test_import_v2()
-{
- let store = new LoginStore(getTempFile("test-import-v2.json").path);
- let loginsSqlite = do_get_file("data/signons-v2.sqlite").path;
-
- // The "load" method must be called before importing data.
- yield store.load();
- try {
- yield new LoginImport(store, loginsSqlite).import();
- do_throw("The operation should have failed.");
- } catch (ex) { }
-});
-
-/**
- * Imports login data from a SQLite file, with database version 3.
- */
-add_task(function* test_import_v3()
-{
- let store = new LoginStore(getTempFile("test-import-v3.json").path);
- let loginsSqlite = do_get_file("data/signons-v3.sqlite").path;
-
- // The "load" method must be called before importing data.
- yield store.load();
- yield new LoginImport(store, loginsSqlite).import();
-
- // We only execute basic integrity checks.
- do_check_eq(store.data.logins[0].usernameField, "u1");
- do_check_eq(store.data.disabledHosts.length, 0);
-});
diff --git a/toolkit/components/passwordmgr/test/unit/test_module_LoginStore.js b/toolkit/components/passwordmgr/test/unit/test_module_LoginStore.js
deleted file mode 100644
index 335eb601bf..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_module_LoginStore.js
+++ /dev/null
@@ -1,206 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests the LoginStore object.
- */
-
-"use strict";
-
-// Globals
-
-XPCOMUtils.defineLazyModuleGetter(this, "LoginStore",
- "resource://gre/modules/LoginStore.jsm");
-
-const TEST_STORE_FILE_NAME = "test-logins.json";
-
-// Tests
-
-/**
- * Saves login data to a file, then reloads it.
- */
-add_task(function* test_save_reload()
-{
- let storeForSave = new LoginStore(getTempFile(TEST_STORE_FILE_NAME).path);
-
- // The "load" method must be called before preparing the data to be saved.
- yield storeForSave.load();
-
- let rawLoginData = {
- id: storeForSave.data.nextId++,
- hostname: "http://www.example.com",
- httpRealm: null,
- formSubmitURL: "http://www.example.com/submit-url",
- usernameField: "field_" + String.fromCharCode(533, 537, 7570, 345),
- passwordField: "field_" + String.fromCharCode(421, 259, 349, 537),
- encryptedUsername: "(test)",
- encryptedPassword: "(test)",
- guid: "(test)",
- encType: Ci.nsILoginManagerCrypto.ENCTYPE_SDR,
- timeCreated: Date.now(),
- timeLastUsed: Date.now(),
- timePasswordChanged: Date.now(),
- timesUsed: 1,
- };
- storeForSave.data.logins.push(rawLoginData);
-
- storeForSave.data.disabledHosts.push("http://www.example.org");
-
- yield storeForSave._save();
-
- // Test the asynchronous initialization path.
- let storeForLoad = new LoginStore(storeForSave.path);
- yield storeForLoad.load();
-
- do_check_eq(storeForLoad.data.logins.length, 1);
- do_check_matches(storeForLoad.data.logins[0], rawLoginData);
- do_check_eq(storeForLoad.data.disabledHosts.length, 1);
- do_check_eq(storeForLoad.data.disabledHosts[0], "http://www.example.org");
-
- // Test the synchronous initialization path.
- storeForLoad = new LoginStore(storeForSave.path);
- storeForLoad.ensureDataReady();
-
- do_check_eq(storeForLoad.data.logins.length, 1);
- do_check_matches(storeForLoad.data.logins[0], rawLoginData);
- do_check_eq(storeForLoad.data.disabledHosts.length, 1);
- do_check_eq(storeForLoad.data.disabledHosts[0], "http://www.example.org");
-});
-
-/**
- * Checks that loading from a missing file results in empty arrays.
- */
-add_task(function* test_load_empty()
-{
- let store = new LoginStore(getTempFile(TEST_STORE_FILE_NAME).path);
-
- do_check_false(yield OS.File.exists(store.path));
-
- yield store.load();
-
- do_check_false(yield OS.File.exists(store.path));
-
- do_check_eq(store.data.logins.length, 0);
- do_check_eq(store.data.disabledHosts.length, 0);
-});
-
-/**
- * Checks that saving empty data still overwrites any existing file.
- */
-add_task(function* test_save_empty()
-{
- let store = new LoginStore(getTempFile(TEST_STORE_FILE_NAME).path);
-
- yield store.load();
-
- let createdFile = yield OS.File.open(store.path, { create: true });
- yield createdFile.close();
-
- yield store._save();
-
- do_check_true(yield OS.File.exists(store.path));
-});
-
-/**
- * Loads data from a string in a predefined format. The purpose of this test is
- * to verify that the JSON format used in previous versions can be loaded.
- */
-add_task(function* test_load_string_predefined()
-{
- let store = new LoginStore(getTempFile(TEST_STORE_FILE_NAME).path);
-
- let string = "{\"logins\":[{" +
- "\"id\":1," +
- "\"hostname\":\"http://www.example.com\"," +
- "\"httpRealm\":null," +
- "\"formSubmitURL\":\"http://www.example.com/submit-url\"," +
- "\"usernameField\":\"usernameField\"," +
- "\"passwordField\":\"passwordField\"," +
- "\"encryptedUsername\":\"(test)\"," +
- "\"encryptedPassword\":\"(test)\"," +
- "\"guid\":\"(test)\"," +
- "\"encType\":1," +
- "\"timeCreated\":1262304000000," +
- "\"timeLastUsed\":1262390400000," +
- "\"timePasswordChanged\":1262476800000," +
- "\"timesUsed\":1}],\"disabledHosts\":[" +
- "\"http://www.example.org\"]}";
-
- yield OS.File.writeAtomic(store.path,
- new TextEncoder().encode(string),
- { tmpPath: store.path + ".tmp" });
-
- yield store.load();
-
- do_check_eq(store.data.logins.length, 1);
- do_check_matches(store.data.logins[0], {
- id: 1,
- hostname: "http://www.example.com",
- httpRealm: null,
- formSubmitURL: "http://www.example.com/submit-url",
- usernameField: "usernameField",
- passwordField: "passwordField",
- encryptedUsername: "(test)",
- encryptedPassword: "(test)",
- guid: "(test)",
- encType: Ci.nsILoginManagerCrypto.ENCTYPE_SDR,
- timeCreated: 1262304000000,
- timeLastUsed: 1262390400000,
- timePasswordChanged: 1262476800000,
- timesUsed: 1,
- });
-
- do_check_eq(store.data.disabledHosts.length, 1);
- do_check_eq(store.data.disabledHosts[0], "http://www.example.org");
-});
-
-/**
- * Loads login data from a malformed JSON string.
- */
-add_task(function* test_load_string_malformed()
-{
- let store = new LoginStore(getTempFile(TEST_STORE_FILE_NAME).path);
-
- let string = "{\"logins\":[{\"hostname\":\"http://www.example.com\"," +
- "\"id\":1,";
-
- yield OS.File.writeAtomic(store.path, new TextEncoder().encode(string),
- { tmpPath: store.path + ".tmp" });
-
- yield store.load();
-
- // A backup file should have been created.
- do_check_true(yield OS.File.exists(store.path + ".corrupt"));
- yield OS.File.remove(store.path + ".corrupt");
-
- // The store should be ready to accept new data.
- do_check_eq(store.data.logins.length, 0);
- do_check_eq(store.data.disabledHosts.length, 0);
-});
-
-/**
- * Loads login data from a malformed JSON string, using the synchronous
- * initialization path.
- */
-add_task(function* test_load_string_malformed_sync()
-{
- let store = new LoginStore(getTempFile(TEST_STORE_FILE_NAME).path);
-
- let string = "{\"logins\":[{\"hostname\":\"http://www.example.com\"," +
- "\"id\":1,";
-
- yield OS.File.writeAtomic(store.path, new TextEncoder().encode(string),
- { tmpPath: store.path + ".tmp" });
-
- store.ensureDataReady();
-
- // A backup file should have been created.
- do_check_true(yield OS.File.exists(store.path + ".corrupt"));
- yield OS.File.remove(store.path + ".corrupt");
-
- // The store should be ready to accept new data.
- do_check_eq(store.data.logins.length, 0);
- do_check_eq(store.data.disabledHosts.length, 0);
-});
diff --git a/toolkit/components/passwordmgr/test/unit/test_notifications.js b/toolkit/components/passwordmgr/test/unit/test_notifications.js
deleted file mode 100644
index 41caa2c1b3..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_notifications.js
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Tests notifications dispatched when modifying stored logins.
- */
-
-var expectedNotification;
-var expectedData;
-
-var TestObserver = {
- QueryInterface : XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
-
- observe : function (subject, topic, data) {
- do_check_eq(topic, "passwordmgr-storage-changed");
- do_check_eq(data, expectedNotification);
-
- switch (data) {
- case "addLogin":
- do_check_true(subject instanceof Ci.nsILoginInfo);
- do_check_true(subject instanceof Ci.nsILoginMetaInfo);
- do_check_true(expectedData.equals(subject)); // nsILoginInfo.equals()
- break;
- case "modifyLogin":
- do_check_true(subject instanceof Ci.nsIArray);
- do_check_eq(subject.length, 2);
- var oldLogin = subject.queryElementAt(0, Ci.nsILoginInfo);
- var newLogin = subject.queryElementAt(1, Ci.nsILoginInfo);
- do_check_true(expectedData[0].equals(oldLogin)); // nsILoginInfo.equals()
- do_check_true(expectedData[1].equals(newLogin));
- break;
- case "removeLogin":
- do_check_true(subject instanceof Ci.nsILoginInfo);
- do_check_true(subject instanceof Ci.nsILoginMetaInfo);
- do_check_true(expectedData.equals(subject)); // nsILoginInfo.equals()
- break;
- case "removeAllLogins":
- do_check_eq(subject, null);
- break;
- case "hostSavingEnabled":
- case "hostSavingDisabled":
- do_check_true(subject instanceof Ci.nsISupportsString);
- do_check_eq(subject.data, expectedData);
- break;
- default:
- do_throw("Unhandled notification: " + data + " / " + topic);
- }
-
- expectedNotification = null; // ensure a duplicate is flagged as unexpected.
- expectedData = null;
- }
-};
-
-add_task(function test_notifications()
-{
-
-try {
-
-var testnum = 0;
-var testdesc = "Setup of nsLoginInfo test-users";
-
-var testuser1 = new LoginInfo("http://testhost1", "", null,
- "dummydude", "itsasecret", "put_user_here", "put_pw_here");
-
-var testuser2 = new LoginInfo("http://testhost2", "", null,
- "dummydude2", "itsasecret2", "put_user2_here", "put_pw2_here");
-
-Services.obs.addObserver(TestObserver, "passwordmgr-storage-changed", false);
-
-
-/* ========== 1 ========== */
-testnum = 1;
-testdesc = "Initial connection to storage module";
-
-/* ========== 2 ========== */
-testnum++;
-testdesc = "addLogin";
-
-expectedNotification = "addLogin";
-expectedData = testuser1;
-Services.logins.addLogin(testuser1);
-LoginTestUtils.checkLogins([testuser1]);
-do_check_eq(expectedNotification, null); // check that observer got a notification
-
-/* ========== 3 ========== */
-testnum++;
-testdesc = "modifyLogin";
-
-expectedNotification = "modifyLogin";
-expectedData = [testuser1, testuser2];
-Services.logins.modifyLogin(testuser1, testuser2);
-do_check_eq(expectedNotification, null);
-LoginTestUtils.checkLogins([testuser2]);
-
-/* ========== 4 ========== */
-testnum++;
-testdesc = "removeLogin";
-
-expectedNotification = "removeLogin";
-expectedData = testuser2;
-Services.logins.removeLogin(testuser2);
-do_check_eq(expectedNotification, null);
-LoginTestUtils.checkLogins([]);
-
-/* ========== 5 ========== */
-testnum++;
-testdesc = "removeAllLogins";
-
-expectedNotification = "removeAllLogins";
-expectedData = null;
-Services.logins.removeAllLogins();
-do_check_eq(expectedNotification, null);
-LoginTestUtils.checkLogins([]);
-
-/* ========== 6 ========== */
-testnum++;
-testdesc = "removeAllLogins (again)";
-
-expectedNotification = "removeAllLogins";
-expectedData = null;
-Services.logins.removeAllLogins();
-do_check_eq(expectedNotification, null);
-LoginTestUtils.checkLogins([]);
-
-/* ========== 7 ========== */
-testnum++;
-testdesc = "setLoginSavingEnabled / false";
-
-expectedNotification = "hostSavingDisabled";
-expectedData = "http://site.com";
-Services.logins.setLoginSavingEnabled("http://site.com", false);
-do_check_eq(expectedNotification, null);
-LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(),
- ["http://site.com"]);
-
-/* ========== 8 ========== */
-testnum++;
-testdesc = "setLoginSavingEnabled / false (again)";
-
-expectedNotification = "hostSavingDisabled";
-expectedData = "http://site.com";
-Services.logins.setLoginSavingEnabled("http://site.com", false);
-do_check_eq(expectedNotification, null);
-LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(),
- ["http://site.com"]);
-
-/* ========== 9 ========== */
-testnum++;
-testdesc = "setLoginSavingEnabled / true";
-
-expectedNotification = "hostSavingEnabled";
-expectedData = "http://site.com";
-Services.logins.setLoginSavingEnabled("http://site.com", true);
-do_check_eq(expectedNotification, null);
-LoginTestUtils.checkLogins([]);
-
-/* ========== 10 ========== */
-testnum++;
-testdesc = "setLoginSavingEnabled / true (again)";
-
-expectedNotification = "hostSavingEnabled";
-expectedData = "http://site.com";
-Services.logins.setLoginSavingEnabled("http://site.com", true);
-do_check_eq(expectedNotification, null);
-LoginTestUtils.checkLogins([]);
-
-Services.obs.removeObserver(TestObserver, "passwordmgr-storage-changed");
-
-LoginTestUtils.clearData();
-
-} catch (e) {
- throw new Error("FAILED in test #" + testnum + " -- " + testdesc + ": " + e);
-}
-
-});
diff --git a/toolkit/components/passwordmgr/test/unit/test_recipes_add.js b/toolkit/components/passwordmgr/test/unit/test_recipes_add.js
deleted file mode 100644
index ef5086c3b5..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_recipes_add.js
+++ /dev/null
@@ -1,177 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests adding and retrieving LoginRecipes in the parent process.
- */
-
-"use strict";
-
-add_task(function* test_init() {
- let parent = new LoginRecipesParent({ defaults: null });
- let initPromise1 = parent.initializationPromise;
- let initPromise2 = parent.initializationPromise;
- Assert.strictEqual(initPromise1, initPromise2, "Check that the same promise is returned");
-
- let recipesParent = yield initPromise1;
- Assert.ok(recipesParent instanceof LoginRecipesParent, "Check init return value");
- Assert.strictEqual(recipesParent._recipesByHost.size, 0, "Initially 0 recipes");
-});
-
-add_task(function* test_get_missing_host() {
- let recipesParent = yield RecipeHelpers.initNewParent();
- let exampleRecipes = recipesParent.getRecipesForHost("example.invalid");
- Assert.strictEqual(exampleRecipes.size, 0, "Check recipe count for example.invalid");
-
-});
-
-add_task(function* test_add_get_simple_host() {
- let recipesParent = yield RecipeHelpers.initNewParent();
- Assert.strictEqual(recipesParent._recipesByHost.size, 0, "Initially 0 recipes");
- recipesParent.add({
- hosts: ["example.com"],
- });
- Assert.strictEqual(recipesParent._recipesByHost.size, 1,
- "Check number of hosts after the addition");
-
- let exampleRecipes = recipesParent.getRecipesForHost("example.com");
- Assert.strictEqual(exampleRecipes.size, 1, "Check recipe count for example.com");
- let recipe = [...exampleRecipes][0];
- Assert.strictEqual(typeof(recipe), "object", "Check recipe type");
- Assert.strictEqual(recipe.hosts.length, 1, "Check that one host is present");
- Assert.strictEqual(recipe.hosts[0], "example.com", "Check the one host");
-});
-
-add_task(function* test_add_get_non_standard_port_host() {
- let recipesParent = yield RecipeHelpers.initNewParent();
- recipesParent.add({
- hosts: ["example.com:8080"],
- });
- Assert.strictEqual(recipesParent._recipesByHost.size, 1,
- "Check number of hosts after the addition");
-
- let exampleRecipes = recipesParent.getRecipesForHost("example.com:8080");
- Assert.strictEqual(exampleRecipes.size, 1, "Check recipe count for example.com:8080");
- let recipe = [...exampleRecipes][0];
- Assert.strictEqual(typeof(recipe), "object", "Check recipe type");
- Assert.strictEqual(recipe.hosts.length, 1, "Check that one host is present");
- Assert.strictEqual(recipe.hosts[0], "example.com:8080", "Check the one host");
-});
-
-add_task(function* test_add_multiple_hosts() {
- let recipesParent = yield RecipeHelpers.initNewParent();
- recipesParent.add({
- hosts: ["example.com", "foo.invalid"],
- });
- Assert.strictEqual(recipesParent._recipesByHost.size, 2,
- "Check number of hosts after the addition");
-
- let exampleRecipes = recipesParent.getRecipesForHost("example.com");
- Assert.strictEqual(exampleRecipes.size, 1, "Check recipe count for example.com");
- let recipe = [...exampleRecipes][0];
- Assert.strictEqual(typeof(recipe), "object", "Check recipe type");
- Assert.strictEqual(recipe.hosts.length, 2, "Check that two hosts are present");
- Assert.strictEqual(recipe.hosts[0], "example.com", "Check the first host");
- Assert.strictEqual(recipe.hosts[1], "foo.invalid", "Check the second host");
-
- let fooRecipes = recipesParent.getRecipesForHost("foo.invalid");
- Assert.strictEqual(fooRecipes.size, 1, "Check recipe count for foo.invalid");
- let fooRecipe = [...fooRecipes][0];
- Assert.strictEqual(fooRecipe, recipe, "Check that the recipe is shared");
- Assert.strictEqual(typeof(fooRecipe), "object", "Check recipe type");
- Assert.strictEqual(fooRecipe.hosts.length, 2, "Check that two hosts are present");
- Assert.strictEqual(fooRecipe.hosts[0], "example.com", "Check the first host");
- Assert.strictEqual(fooRecipe.hosts[1], "foo.invalid", "Check the second host");
-});
-
-add_task(function* test_add_pathRegex() {
- let recipesParent = yield RecipeHelpers.initNewParent();
- recipesParent.add({
- hosts: ["example.com"],
- pathRegex: /^\/mypath\//,
- });
- Assert.strictEqual(recipesParent._recipesByHost.size, 1,
- "Check number of hosts after the addition");
-
- let exampleRecipes = recipesParent.getRecipesForHost("example.com");
- Assert.strictEqual(exampleRecipes.size, 1, "Check recipe count for example.com");
- let recipe = [...exampleRecipes][0];
- Assert.strictEqual(typeof(recipe), "object", "Check recipe type");
- Assert.strictEqual(recipe.hosts.length, 1, "Check that one host is present");
- Assert.strictEqual(recipe.hosts[0], "example.com", "Check the one host");
- Assert.strictEqual(recipe.pathRegex.toString(), "/^\\/mypath\\//", "Check the pathRegex");
-});
-
-add_task(function* test_add_selectors() {
- let recipesParent = yield RecipeHelpers.initNewParent();
- recipesParent.add({
- hosts: ["example.com"],
- usernameSelector: "#my-username",
- passwordSelector: "#my-form > input.password",
- });
- Assert.strictEqual(recipesParent._recipesByHost.size, 1,
- "Check number of hosts after the addition");
-
- let exampleRecipes = recipesParent.getRecipesForHost("example.com");
- Assert.strictEqual(exampleRecipes.size, 1, "Check recipe count for example.com");
- let recipe = [...exampleRecipes][0];
- Assert.strictEqual(typeof(recipe), "object", "Check recipe type");
- Assert.strictEqual(recipe.hosts.length, 1, "Check that one host is present");
- Assert.strictEqual(recipe.hosts[0], "example.com", "Check the one host");
- Assert.strictEqual(recipe.usernameSelector, "#my-username", "Check the usernameSelector");
- Assert.strictEqual(recipe.passwordSelector, "#my-form > input.password", "Check the passwordSelector");
-});
-
-/* Begin checking errors with add */
-
-add_task(function* test_add_missing_prop() {
- let recipesParent = yield RecipeHelpers.initNewParent();
- Assert.throws(() => recipesParent.add({}), /required/, "Some properties are required");
-});
-
-add_task(function* test_add_unknown_prop() {
- let recipesParent = yield RecipeHelpers.initNewParent();
- Assert.throws(() => recipesParent.add({
- unknownProp: true,
- }), /supported/, "Unknown properties should cause an error to help with typos");
-});
-
-add_task(function* test_add_invalid_hosts() {
- let recipesParent = yield RecipeHelpers.initNewParent();
- Assert.throws(() => recipesParent.add({
- hosts: 404,
- }), /array/, "hosts should be an array");
-});
-
-add_task(function* test_add_empty_host_array() {
- let recipesParent = yield RecipeHelpers.initNewParent();
- Assert.throws(() => recipesParent.add({
- hosts: [],
- }), /array/, "hosts should be a non-empty array");
-});
-
-add_task(function* test_add_pathRegex_non_regexp() {
- let recipesParent = yield RecipeHelpers.initNewParent();
- Assert.throws(() => recipesParent.add({
- hosts: ["example.com"],
- pathRegex: "foo",
- }), /regular expression/, "pathRegex should be a RegExp");
-});
-
-add_task(function* test_add_usernameSelector_non_string() {
- let recipesParent = yield RecipeHelpers.initNewParent();
- Assert.throws(() => recipesParent.add({
- hosts: ["example.com"],
- usernameSelector: 404,
- }), /string/, "usernameSelector should be a string");
-});
-
-add_task(function* test_add_passwordSelector_non_string() {
- let recipesParent = yield RecipeHelpers.initNewParent();
- Assert.throws(() => recipesParent.add({
- hosts: ["example.com"],
- passwordSelector: 404,
- }), /string/, "passwordSelector should be a string");
-});
-
-/* End checking errors with add */
diff --git a/toolkit/components/passwordmgr/test/unit/test_recipes_content.js b/toolkit/components/passwordmgr/test/unit/test_recipes_content.js
deleted file mode 100644
index 3d37514520..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_recipes_content.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test filtering recipes in LoginRecipesContent.
- */
-
-"use strict";
-
-Cu.importGlobalProperties(["URL"]);
-
-add_task(function* test_getFieldOverrides() {
- let recipes = new Set([
- { // path doesn't match but otherwise good
- hosts: ["example.com:8080"],
- passwordSelector: "#password",
- pathRegex: /^\/$/,
- usernameSelector: ".username",
- },
- { // match with no field overrides
- hosts: ["example.com:8080"],
- },
- { // best match (field selectors + path match)
- description: "best match",
- hosts: ["a.invalid", "example.com:8080", "other.invalid"],
- passwordSelector: "#password",
- pathRegex: /^\/first\/second\/$/,
- usernameSelector: ".username",
- },
- ]);
-
- let form = MockDocument.createTestDocument("http://localhost:8080/first/second/", "<form>").
- forms[0];
- let override = LoginRecipesContent.getFieldOverrides(recipes, form);
- Assert.strictEqual(override.description, "best match",
- "Check the best field override recipe was returned");
- Assert.strictEqual(override.usernameSelector, ".username", "Check usernameSelector");
- Assert.strictEqual(override.passwordSelector, "#password", "Check passwordSelector");
-});
diff --git a/toolkit/components/passwordmgr/test/unit/test_removeLegacySignonFiles.js b/toolkit/components/passwordmgr/test/unit/test_removeLegacySignonFiles.js
deleted file mode 100644
index 51a107170d..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_removeLegacySignonFiles.js
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * Tests the LoginHelper object.
- */
-
-"use strict";
-
-
-Cu.import("resource://gre/modules/Task.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "LoginHelper",
- "resource://gre/modules/LoginHelper.jsm");
-
-
-function* createSignonFile(singon) {
- let {file, pref} = singon;
-
- if (pref) {
- Services.prefs.setCharPref(pref, file);
- }
-
- yield OS.File.writeAtomic(
- OS.Path.join(OS.Constants.Path.profileDir, file), new Uint8Array(1));
-}
-
-function* isSignonClear(singon) {
- const {file, pref} = singon;
- const fileExists = yield OS.File.exists(
- OS.Path.join(OS.Constants.Path.profileDir, file));
-
- if (pref) {
- try {
- Services.prefs.getCharPref(pref);
- return false;
- } catch (e) {}
- }
-
- return !fileExists;
-}
-
-add_task(function* test_remove_lagecy_signonfile() {
- // In the last test case, signons3.txt being deleted even when
- // it doesn't exist.
- const signonsSettings = [[
- { file: "signons.txt" },
- { file: "signons2.txt" },
- { file: "signons3.txt" }
- ], [
- { file: "signons.txt", pref: "signon.SignonFileName" },
- { file: "signons2.txt", pref: "signon.SignonFileName2" },
- { file: "signons3.txt", pref: "signon.SignonFileName3" }
- ], [
- { file: "signons2.txt" },
- { file: "singons.txt", pref: "signon.SignonFileName" },
- { file: "customized2.txt", pref: "signon.SignonFileName2" },
- { file: "customized3.txt", pref: "signon.SignonFileName3" }
- ]];
-
- for (let setting of signonsSettings) {
- for (let singon of setting) {
- yield createSignonFile(singon);
- }
-
- LoginHelper.removeLegacySignonFiles();
-
- for (let singon of setting) {
- equal(yield isSignonClear(singon), true);
- }
- }
-});
diff --git a/toolkit/components/passwordmgr/test/unit/test_search_schemeUpgrades.js b/toolkit/components/passwordmgr/test/unit/test_search_schemeUpgrades.js
deleted file mode 100644
index 3406becff2..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_search_schemeUpgrades.js
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Test Services.logins.searchLogins with the `schemeUpgrades` property.
- */
-
-const HTTP3_ORIGIN = "http://www3.example.com";
-const HTTPS_ORIGIN = "https://www.example.com";
-const HTTP_ORIGIN = "http://www.example.com";
-
-/**
- * Returns a list of new nsILoginInfo objects that are a subset of the test
- * data, built to match the specified query.
- *
- * @param {Object} aQuery
- * Each property and value of this object restricts the search to those
- * entries from the test data that match the property exactly.
- */
-function buildExpectedLogins(aQuery) {
- return TestData.loginList().filter(
- entry => Object.keys(aQuery).every(name => {
- if (name == "schemeUpgrades") {
- return true;
- }
- if (["hostname", "formSubmitURL"].includes(name)) {
- return LoginHelper.isOriginMatching(entry[name], aQuery[name], {
- schemeUpgrades: aQuery.schemeUpgrades,
- });
- }
- return entry[name] === aQuery[name];
- }));
-}
-
-/**
- * Tests the searchLogins function.
- *
- * @param {Object} aQuery
- * Each property and value of this object is translated to an entry in
- * the nsIPropertyBag parameter of searchLogins.
- * @param {Number} aExpectedCount
- * Number of logins from the test data that should be found. The actual
- * list of logins is obtained using the buildExpectedLogins helper, and
- * this value is just used to verify that modifications to the test data
- * don't make the current test meaningless.
- */
-function checkSearch(aQuery, aExpectedCount) {
- do_print("Testing searchLogins for " + JSON.stringify(aQuery));
-
- let expectedLogins = buildExpectedLogins(aQuery);
- do_check_eq(expectedLogins.length, aExpectedCount);
-
- let outCount = {};
- let logins = Services.logins.searchLogins(outCount, newPropertyBag(aQuery));
- do_check_eq(outCount.value, expectedLogins.length);
- LoginTestUtils.assertLoginListsEqual(logins, expectedLogins);
-}
-
-/**
- * Prepare data for the following tests.
- */
-add_task(function test_initialize() {
- for (let login of TestData.loginList()) {
- Services.logins.addLogin(login);
- }
-});
-
-/**
- * Tests searchLogins with the `schemeUpgrades` property
- */
-add_task(function test_search_schemeUpgrades_hostname() {
- // Hostname-only
- checkSearch({
- hostname: HTTPS_ORIGIN,
- }, 1);
- checkSearch({
- hostname: HTTPS_ORIGIN,
- schemeUpgrades: false,
- }, 1);
- checkSearch({
- hostname: HTTPS_ORIGIN,
- schemeUpgrades: undefined,
- }, 1);
- checkSearch({
- hostname: HTTPS_ORIGIN,
- schemeUpgrades: true,
- }, 2);
-});
-
-/**
- * Same as above but replacing hostname with formSubmitURL.
- */
-add_task(function test_search_schemeUpgrades_formSubmitURL() {
- checkSearch({
- formSubmitURL: HTTPS_ORIGIN,
- }, 2);
- checkSearch({
- formSubmitURL: HTTPS_ORIGIN,
- schemeUpgrades: false,
- }, 2);
- checkSearch({
- formSubmitURL: HTTPS_ORIGIN,
- schemeUpgrades: undefined,
- }, 2);
- checkSearch({
- formSubmitURL: HTTPS_ORIGIN,
- schemeUpgrades: true,
- }, 4);
-});
-
-
-add_task(function test_search_schemeUpgrades_hostname_formSubmitURL() {
- checkSearch({
- formSubmitURL: HTTPS_ORIGIN,
- hostname: HTTPS_ORIGIN,
- }, 1);
- checkSearch({
- formSubmitURL: HTTPS_ORIGIN,
- hostname: HTTPS_ORIGIN,
- schemeUpgrades: false,
- }, 1);
- checkSearch({
- formSubmitURL: HTTPS_ORIGIN,
- hostname: HTTPS_ORIGIN,
- schemeUpgrades: undefined,
- }, 1);
- checkSearch({
- formSubmitURL: HTTPS_ORIGIN,
- hostname: HTTPS_ORIGIN,
- schemeUpgrades: true,
- }, 2);
- checkSearch({
- formSubmitURL: HTTPS_ORIGIN,
- hostname: HTTPS_ORIGIN,
- schemeUpgrades: true,
- usernameField: "form_field_username",
- }, 2);
- checkSearch({
- formSubmitURL: HTTPS_ORIGIN,
- hostname: HTTPS_ORIGIN,
- passwordField: "form_field_password",
- schemeUpgrades: true,
- usernameField: "form_field_username",
- }, 2);
- checkSearch({
- formSubmitURL: HTTPS_ORIGIN,
- hostname: HTTPS_ORIGIN,
- httpRealm: null,
- passwordField: "form_field_password",
- schemeUpgrades: true,
- usernameField: "form_field_username",
- }, 2);
-});
-
-/**
- * HTTP submitting to HTTPS
- */
-add_task(function test_http_to_https() {
- checkSearch({
- formSubmitURL: HTTPS_ORIGIN,
- hostname: HTTP3_ORIGIN,
- httpRealm: null,
- schemeUpgrades: false,
- }, 1);
- checkSearch({
- formSubmitURL: HTTPS_ORIGIN,
- hostname: HTTP3_ORIGIN,
- httpRealm: null,
- schemeUpgrades: true,
- }, 2);
-});
-
-/**
- * schemeUpgrades shouldn't cause downgrades
- */
-add_task(function test_search_schemeUpgrades_downgrade() {
- checkSearch({
- formSubmitURL: HTTP_ORIGIN,
- hostname: HTTP_ORIGIN,
- }, 1);
- do_print("The same number should be found with schemeUpgrades since we're searching for HTTP");
- checkSearch({
- formSubmitURL: HTTP_ORIGIN,
- hostname: HTTP_ORIGIN,
- schemeUpgrades: true,
- }, 1);
-});
diff --git a/toolkit/components/passwordmgr/test/unit/test_storage.js b/toolkit/components/passwordmgr/test/unit/test_storage.js
deleted file mode 100644
index d65516d9b0..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_storage.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests that the default nsILoginManagerStorage module attached to the Login
- * Manager service is able to save and reload nsILoginInfo properties correctly,
- * even when they include special characters.
- */
-
-"use strict";
-
-// Globals
-
-function* reloadAndCheckLoginsGen(aExpectedLogins)
-{
- yield LoginTestUtils.reloadData();
- LoginTestUtils.checkLogins(aExpectedLogins);
- LoginTestUtils.clearData();
-}
-
-// Tests
-
-/**
- * Tests addLogin with valid non-ASCII characters.
- */
-add_task(function* test_storage_addLogin_nonascii()
-{
- let hostname = "http://" + String.fromCharCode(355) + ".example.com";
-
- // Store the strings "user" and "pass" using similarly looking glyphs.
- let loginInfo = TestData.formLogin({
- hostname: hostname,
- formSubmitURL: hostname,
- username: String.fromCharCode(533, 537, 7570, 345),
- password: String.fromCharCode(421, 259, 349, 537),
- usernameField: "field_" + String.fromCharCode(533, 537, 7570, 345),
- passwordField: "field_" + String.fromCharCode(421, 259, 349, 537),
- });
- Services.logins.addLogin(loginInfo);
- yield* reloadAndCheckLoginsGen([loginInfo]);
-
- // Store the string "test" using similarly looking glyphs.
- loginInfo = TestData.authLogin({
- httpRealm: String.fromCharCode(355, 277, 349, 357),
- });
- Services.logins.addLogin(loginInfo);
- yield* reloadAndCheckLoginsGen([loginInfo]);
-});
-
-/**
- * Tests addLogin with newline characters in the username and password.
- */
-add_task(function* test_storage_addLogin_newlines()
-{
- let loginInfo = TestData.formLogin({
- username: "user\r\nname",
- password: "password\r\n",
- });
- Services.logins.addLogin(loginInfo);
- yield* reloadAndCheckLoginsGen([loginInfo]);
-});
-
-/**
- * Tests addLogin with a single dot in fields where it is allowed.
- *
- * These tests exist to verify the legacy "signons.txt" storage format.
- */
-add_task(function* test_storage_addLogin_dot()
-{
- let loginInfo = TestData.formLogin({ hostname: ".", passwordField: "." });
- Services.logins.addLogin(loginInfo);
- yield* reloadAndCheckLoginsGen([loginInfo]);
-
- loginInfo = TestData.authLogin({ httpRealm: "." });
- Services.logins.addLogin(loginInfo);
- yield* reloadAndCheckLoginsGen([loginInfo]);
-});
-
-/**
- * Tests addLogin with parentheses in hostnames.
- *
- * These tests exist to verify the legacy "signons.txt" storage format.
- */
-add_task(function* test_storage_addLogin_parentheses()
-{
- let loginList = [
- TestData.authLogin({ httpRealm: "(realm" }),
- TestData.authLogin({ httpRealm: "realm)" }),
- TestData.authLogin({ httpRealm: "(realm)" }),
- TestData.authLogin({ httpRealm: ")realm(" }),
- TestData.authLogin({ hostname: "http://parens(.example.com" }),
- TestData.authLogin({ hostname: "http://parens).example.com" }),
- TestData.authLogin({ hostname: "http://parens(example).example.com" }),
- TestData.authLogin({ hostname: "http://parens)example(.example.com" }),
- ];
- for (let loginInfo of loginList) {
- Services.logins.addLogin(loginInfo);
- }
- yield* reloadAndCheckLoginsGen(loginList);
-});
diff --git a/toolkit/components/passwordmgr/test/unit/test_storage_mozStorage.js b/toolkit/components/passwordmgr/test/unit/test_storage_mozStorage.js
deleted file mode 100644
index 8eab6efe56..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_storage_mozStorage.js
+++ /dev/null
@@ -1,507 +0,0 @@
-/*
- * This test interfaces directly with the mozStorage password storage module,
- * bypassing the normal password manager usage.
- */
-
-
-const ENCTYPE_BASE64 = 0;
-const ENCTYPE_SDR = 1;
-const PERMISSION_SAVE_LOGINS = "login-saving";
-
-// Current schema version used by storage-mozStorage.js. This will need to be
-// kept in sync with the version there (or else the tests fail).
-const CURRENT_SCHEMA = 6;
-
-function* copyFile(aLeafName)
-{
- yield OS.File.copy(OS.Path.join(do_get_file("data").path, aLeafName),
- OS.Path.join(OS.Constants.Path.profileDir, aLeafName));
-}
-
-function openDB(aLeafName)
-{
- var dbFile = new FileUtils.File(OS.Constants.Path.profileDir);
- dbFile.append(aLeafName);
-
- return Services.storage.openDatabase(dbFile);
-}
-
-function deleteFile(pathname, filename)
-{
- var file = new FileUtils.File(pathname);
- file.append(filename);
-
- // Suppress failures, this happens in the mozstorage tests on Windows
- // because the module may still be holding onto the DB. (We don't
- // have a way to explicitly shutdown/GC the module).
- try {
- if (file.exists())
- file.remove(false);
- } catch (e) {}
-}
-
-function reloadStorage(aInputPathName, aInputFileName)
-{
- var inputFile = null;
- if (aInputFileName) {
- inputFile = Cc["@mozilla.org/file/local;1"].
- createInstance(Ci.nsILocalFile);
- inputFile.initWithPath(aInputPathName);
- inputFile.append(aInputFileName);
- }
-
- let storage = Cc["@mozilla.org/login-manager/storage/mozStorage;1"]
- .createInstance(Ci.nsILoginManagerStorage);
- storage.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIVariant)
- .initWithFile(inputFile);
-
- return storage;
-}
-
-function checkStorageData(storage, ref_disabledHosts, ref_logins)
-{
- LoginTestUtils.assertLoginListsEqual(storage.getAllLogins(), ref_logins);
- LoginTestUtils.assertDisabledHostsEqual(getAllDisabledHostsFromPermissionManager(),
- ref_disabledHosts);
-}
-
-function getAllDisabledHostsFromPermissionManager() {
- let disabledHosts = [];
- let enumerator = Services.perms.enumerator;
-
- while (enumerator.hasMoreElements()) {
- let perm = enumerator.getNext();
- if (perm.type == PERMISSION_SAVE_LOGINS && perm.capability == Services.perms.DENY_ACTION) {
- disabledHosts.push(perm.principal.URI.prePath);
- }
- }
-
- return disabledHosts;
-}
-
-function setLoginSavingEnabled(origin, enabled) {
- let uri = Services.io.newURI(origin, null, null);
-
- if (enabled) {
- Services.perms.remove(uri, PERMISSION_SAVE_LOGINS);
- } else {
- Services.perms.add(uri, PERMISSION_SAVE_LOGINS, Services.perms.DENY_ACTION);
- }
-}
-
-add_task(function* test_execute()
-{
-
-const OUTDIR = OS.Constants.Path.profileDir;
-
-try {
-
-var isGUID = /^\{[0-9a-f\d]{8}-[0-9a-f\d]{4}-[0-9a-f\d]{4}-[0-9a-f\d]{4}-[0-9a-f\d]{12}\}$/;
-function getGUIDforID(conn, id) {
- var stmt = conn.createStatement("SELECT guid from moz_logins WHERE id = " + id);
- stmt.executeStep();
- var guid = stmt.getString(0);
- stmt.finalize();
- return guid;
-}
-
-function getEncTypeForID(conn, id) {
- var stmt = conn.createStatement("SELECT encType from moz_logins WHERE id = " + id);
- stmt.executeStep();
- var encType = stmt.row.encType;
- stmt.finalize();
- return encType;
-}
-
-function getAllDisabledHostsFromMozStorage(conn) {
- let disabledHosts = [];
- let stmt = conn.createStatement("SELECT hostname from moz_disabledHosts");
-
- while (stmt.executeStep()) {
- disabledHosts.push(stmt.row.hostname);
- }
-
- return disabledHosts;
-}
-
-var storage;
-var dbConnection;
-var testnum = 0;
-var testdesc = "Setup of nsLoginInfo test-users";
-var nsLoginInfo = new Components.Constructor(
- "@mozilla.org/login-manager/loginInfo;1",
- Components.interfaces.nsILoginInfo);
-do_check_true(nsLoginInfo != null);
-
-var testuser1 = new nsLoginInfo;
-testuser1.init("http://test.com", "http://test.com", null,
- "testuser1", "testpass1", "u1", "p1");
-var testuser1B = new nsLoginInfo;
-testuser1B.init("http://test.com", "http://test.com", null,
- "testuser1B", "testpass1B", "u1", "p1");
-var testuser2 = new nsLoginInfo;
-testuser2.init("http://test.org", "http://test.org", null,
- "testuser2", "testpass2", "u2", "p2");
-var testuser3 = new nsLoginInfo;
-testuser3.init("http://test.gov", "http://test.gov", null,
- "testuser3", "testpass3", "u3", "p3");
-var testuser4 = new nsLoginInfo;
-testuser4.init("http://test.gov", "http://test.gov", null,
- "testuser1", "testpass2", "u4", "p4");
-var testuser5 = new nsLoginInfo;
-testuser5.init("http://test.gov", "http://test.gov", null,
- "testuser2", "testpass1", "u5", "p5");
-
-
-/* ========== 1 ========== */
-testnum++;
-testdesc = "Test downgrade from v999 storage";
-
-yield* copyFile("signons-v999.sqlite");
-// Verify the schema version in the test file.
-dbConnection = openDB("signons-v999.sqlite");
-do_check_eq(999, dbConnection.schemaVersion);
-dbConnection.close();
-
-storage = reloadStorage(OUTDIR, "signons-v999.sqlite");
-setLoginSavingEnabled("https://disabled.net", false);
-checkStorageData(storage, ["https://disabled.net"], [testuser1]);
-
-// Check to make sure we downgraded the schema version.
-dbConnection = openDB("signons-v999.sqlite");
-do_check_eq(CURRENT_SCHEMA, dbConnection.schemaVersion);
-dbConnection.close();
-
-deleteFile(OUTDIR, "signons-v999.sqlite");
-
-/* ========== 2 ========== */
-testnum++;
-testdesc = "Test downgrade from incompat v999 storage";
-// This file has a testuser999/testpass999, but is missing an expected column
-
-var origFile = OS.Path.join(OUTDIR, "signons-v999-2.sqlite");
-var failFile = OS.Path.join(OUTDIR, "signons-v999-2.sqlite.corrupt");
-
-// Make sure we always start clean in a clean state.
-yield* copyFile("signons-v999-2.sqlite");
-yield OS.File.remove(failFile);
-
-Assert.throws(() => reloadStorage(OUTDIR, "signons-v999-2.sqlite"),
- /Initialization failed/);
-
-// Check to ensure the DB file was renamed to .corrupt.
-do_check_false(yield OS.File.exists(origFile));
-do_check_true(yield OS.File.exists(failFile));
-
-yield OS.File.remove(failFile);
-
-/* ========== 3 ========== */
-testnum++;
-testdesc = "Test upgrade from v1->v2 storage";
-
-yield* copyFile("signons-v1.sqlite");
-// Sanity check the test file.
-dbConnection = openDB("signons-v1.sqlite");
-do_check_eq(1, dbConnection.schemaVersion);
-dbConnection.close();
-
-storage = reloadStorage(OUTDIR, "signons-v1.sqlite");
-checkStorageData(storage, ["https://disabled.net"], [testuser1, testuser2]);
-
-// Check to see that we added a GUIDs to the logins.
-dbConnection = openDB("signons-v1.sqlite");
-do_check_eq(CURRENT_SCHEMA, dbConnection.schemaVersion);
-var guid = getGUIDforID(dbConnection, 1);
-do_check_true(isGUID.test(guid));
-guid = getGUIDforID(dbConnection, 2);
-do_check_true(isGUID.test(guid));
-dbConnection.close();
-
-deleteFile(OUTDIR, "signons-v1.sqlite");
-
-/* ========== 4 ========== */
-testnum++;
-testdesc = "Test upgrade v2->v1 storage";
-// This is the case where a v2 DB has been accessed with v1 code, and now we
-// are upgrading it again. Any logins added by the v1 code must be properly
-// upgraded.
-
-yield* copyFile("signons-v1v2.sqlite");
-// Sanity check the test file.
-dbConnection = openDB("signons-v1v2.sqlite");
-do_check_eq(1, dbConnection.schemaVersion);
-dbConnection.close();
-
-storage = reloadStorage(OUTDIR, "signons-v1v2.sqlite");
-checkStorageData(storage, ["https://disabled.net"], [testuser1, testuser2, testuser3]);
-
-// While we're here, try modifying a login, to ensure that doing so doesn't
-// change the existing GUID.
-storage.modifyLogin(testuser1, testuser1B);
-checkStorageData(storage, ["https://disabled.net"], [testuser1B, testuser2, testuser3]);
-
-// Check the GUIDs. Logins 1 and 2 should retain their original GUID, login 3
-// should have one created (because it didn't have one previously).
-dbConnection = openDB("signons-v1v2.sqlite");
-do_check_eq(CURRENT_SCHEMA, dbConnection.schemaVersion);
-guid = getGUIDforID(dbConnection, 1);
-do_check_eq("{655c7358-f1d6-6446-adab-53f98ac5d80f}", guid);
-guid = getGUIDforID(dbConnection, 2);
-do_check_eq("{13d9bfdc-572a-4d4e-9436-68e9803e84c1}", guid);
-guid = getGUIDforID(dbConnection, 3);
-do_check_true(isGUID.test(guid));
-dbConnection.close();
-
-deleteFile(OUTDIR, "signons-v1v2.sqlite");
-
-/* ========== 5 ========== */
-testnum++;
-testdesc = "Test upgrade from v2->v3 storage";
-
-yield* copyFile("signons-v2.sqlite");
-// Sanity check the test file.
-dbConnection = openDB("signons-v2.sqlite");
-do_check_eq(2, dbConnection.schemaVersion);
-
-storage = reloadStorage(OUTDIR, "signons-v2.sqlite");
-
-// Check to see that we added the correct encType to the logins.
-do_check_eq(CURRENT_SCHEMA, dbConnection.schemaVersion);
-var encTypes = [ENCTYPE_BASE64, ENCTYPE_SDR, ENCTYPE_BASE64, ENCTYPE_BASE64];
-for (let i = 0; i < encTypes.length; i++)
- do_check_eq(encTypes[i], getEncTypeForID(dbConnection, i + 1));
-dbConnection.close();
-
-// There are 4 logins, but 3 will be invalid because we can no longer decrypt
-// base64-encoded items. (testuser1/4/5)
-checkStorageData(storage, ["https://disabled.net"],
- [testuser2]);
-
-deleteFile(OUTDIR, "signons-v2.sqlite");
-
-/* ========== 6 ========== */
-testnum++;
-testdesc = "Test upgrade v3->v2 storage";
-// This is the case where a v3 DB has been accessed with v2 code, and now we
-// are upgrading it again. Any logins added by the v2 code must be properly
-// upgraded.
-
-yield* copyFile("signons-v2v3.sqlite");
-// Sanity check the test file.
-dbConnection = openDB("signons-v2v3.sqlite");
-do_check_eq(2, dbConnection.schemaVersion);
-encTypes = [ENCTYPE_BASE64, ENCTYPE_SDR, ENCTYPE_BASE64, ENCTYPE_BASE64, null];
-for (let i = 0; i < encTypes.length; i++)
- do_check_eq(encTypes[i], getEncTypeForID(dbConnection, i + 1));
-
-// Reload storage, check that the new login now has encType=1, others untouched
-storage = reloadStorage(OUTDIR, "signons-v2v3.sqlite");
-do_check_eq(CURRENT_SCHEMA, dbConnection.schemaVersion);
-
-encTypes = [ENCTYPE_BASE64, ENCTYPE_SDR, ENCTYPE_BASE64, ENCTYPE_BASE64, ENCTYPE_SDR];
-for (let i = 0; i < encTypes.length; i++)
- do_check_eq(encTypes[i], getEncTypeForID(dbConnection, i + 1));
-
-// Sanity check that the data gets migrated
-// There are 5 logins, but 3 will be invalid because we can no longer decrypt
-// base64-encoded items. (testuser1/4/5). We no longer reencrypt with SDR.
-checkStorageData(storage, ["https://disabled.net"], [testuser2, testuser3]);
-encTypes = [ENCTYPE_BASE64, ENCTYPE_SDR, ENCTYPE_BASE64, ENCTYPE_BASE64, ENCTYPE_SDR];
-for (let i = 0; i < encTypes.length; i++)
- do_check_eq(encTypes[i], getEncTypeForID(dbConnection, i + 1));
-dbConnection.close();
-
-deleteFile(OUTDIR, "signons-v2v3.sqlite");
-
-
-/* ========== 7 ========== */
-testnum++;
-testdesc = "Test upgrade from v3->v4 storage";
-
-yield* copyFile("signons-v3.sqlite");
-// Sanity check the test file.
-dbConnection = openDB("signons-v3.sqlite");
-do_check_eq(3, dbConnection.schemaVersion);
-
-storage = reloadStorage(OUTDIR, "signons-v3.sqlite");
-do_check_eq(CURRENT_SCHEMA, dbConnection.schemaVersion);
-
-// Remove old entry from permission manager.
-setLoginSavingEnabled("https://disabled.net", true);
-
-// Check that timestamps and counts were initialized correctly
-checkStorageData(storage, [], [testuser1, testuser2]);
-
-var logins = storage.getAllLogins();
-for (var i = 0; i < 2; i++) {
- do_check_true(logins[i] instanceof Ci.nsILoginMetaInfo);
- do_check_eq(1, logins[i].timesUsed);
- LoginTestUtils.assertTimeIsAboutNow(logins[i].timeCreated);
- LoginTestUtils.assertTimeIsAboutNow(logins[i].timeLastUsed);
- LoginTestUtils.assertTimeIsAboutNow(logins[i].timePasswordChanged);
-}
-
-/* ========== 8 ========== */
-testnum++;
-testdesc = "Test upgrade from v3->v4->v3 storage";
-
-yield* copyFile("signons-v3v4.sqlite");
-// Sanity check the test file.
-dbConnection = openDB("signons-v3v4.sqlite");
-do_check_eq(3, dbConnection.schemaVersion);
-
-storage = reloadStorage(OUTDIR, "signons-v3v4.sqlite");
-do_check_eq(CURRENT_SCHEMA, dbConnection.schemaVersion);
-
-// testuser1 already has timestamps, testuser2 does not.
-checkStorageData(storage, [], [testuser1, testuser2]);
-
-logins = storage.getAllLogins();
-
-var t1, t2;
-if (logins[0].username == "testuser1") {
- t1 = logins[0];
- t2 = logins[1];
-} else {
- t1 = logins[1];
- t2 = logins[0];
-}
-
-do_check_true(t1 instanceof Ci.nsILoginMetaInfo);
-do_check_true(t2 instanceof Ci.nsILoginMetaInfo);
-
-do_check_eq(9, t1.timesUsed);
-do_check_eq(1262049951275, t1.timeCreated);
-do_check_eq(1262049951275, t1.timeLastUsed);
-do_check_eq(1262049951275, t1.timePasswordChanged);
-
-do_check_eq(1, t2.timesUsed);
-LoginTestUtils.assertTimeIsAboutNow(t2.timeCreated);
-LoginTestUtils.assertTimeIsAboutNow(t2.timeLastUsed);
-LoginTestUtils.assertTimeIsAboutNow(t2.timePasswordChanged);
-
-
-/* ========== 9 ========== */
-testnum++;
-testdesc = "Test upgrade from v4 storage";
-
-yield* copyFile("signons-v4.sqlite");
-// Sanity check the test file.
-dbConnection = openDB("signons-v4.sqlite");
-do_check_eq(4, dbConnection.schemaVersion);
-do_check_false(dbConnection.tableExists("moz_deleted_logins"));
-
-storage = reloadStorage(OUTDIR, "signons-v4.sqlite");
-do_check_eq(CURRENT_SCHEMA, dbConnection.schemaVersion);
-do_check_true(dbConnection.tableExists("moz_deleted_logins"));
-
-
-/* ========== 10 ========== */
-testnum++;
-testdesc = "Test upgrade from v4->v5->v4 storage";
-
-yield copyFile("signons-v4v5.sqlite");
-// Sanity check the test file.
-dbConnection = openDB("signons-v4v5.sqlite");
-do_check_eq(4, dbConnection.schemaVersion);
-do_check_true(dbConnection.tableExists("moz_deleted_logins"));
-
-storage = reloadStorage(OUTDIR, "signons-v4v5.sqlite");
-do_check_eq(CURRENT_SCHEMA, dbConnection.schemaVersion);
-do_check_true(dbConnection.tableExists("moz_deleted_logins"));
-
-/* ========== 11 ========== */
-testnum++;
-testdesc = "Test upgrade from v5->v6 storage";
-
-yield* copyFile("signons-v5v6.sqlite");
-
-// Sanity check the test file.
-dbConnection = openDB("signons-v5v6.sqlite");
-do_check_eq(5, dbConnection.schemaVersion);
-do_check_true(dbConnection.tableExists("moz_disabledHosts"));
-
-// Initial disabled hosts inside signons-v5v6.sqlite
-var disabledHosts = [
- "http://disabled1.example.com",
- "http://大.net",
- "http://xn--19g.com"
-];
-
-LoginTestUtils.assertDisabledHostsEqual(disabledHosts, getAllDisabledHostsFromMozStorage(dbConnection));
-
-// Reload storage
-storage = reloadStorage(OUTDIR, "signons-v5v6.sqlite");
-do_check_eq(CURRENT_SCHEMA, dbConnection.schemaVersion);
-
-// moz_disabledHosts should now be empty after migration.
-LoginTestUtils.assertDisabledHostsEqual([], getAllDisabledHostsFromMozStorage(dbConnection));
-
-// Get all the other hosts currently saved in the permission manager.
-let hostsInPermissionManager = getAllDisabledHostsFromPermissionManager();
-
-// All disabledHosts should have migrated to the permission manager
-LoginTestUtils.assertDisabledHostsEqual(disabledHosts, hostsInPermissionManager);
-
-// Remove all disabled hosts from the permission manager before test ends
-for (let host of disabledHosts) {
- setLoginSavingEnabled(host, true);
-}
-
-/* ========== 12 ========== */
-testnum++;
-testdesc = "Create nsILoginInfo instances for testing with";
-
-testuser1 = new nsLoginInfo;
-testuser1.init("http://dummyhost.mozilla.org", "", null,
- "dummydude", "itsasecret", "put_user_here", "put_pw_here");
-
-
-/*
- * ---------------------- DB Corruption ----------------------
- * Try to initialize with a corrupt database file. This should create a backup
- * file, then upon next use create a new database file.
- */
-
-/* ========== 13 ========== */
-testnum++;
-testdesc = "Corrupt database and backup";
-
-const filename = "signons-c.sqlite";
-const filepath = OS.Path.join(OS.Constants.Path.profileDir, filename);
-
-yield OS.File.copy(do_get_file("data/corruptDB.sqlite").path, filepath);
-
-// will init mozStorage module with corrupt database, init should fail
-Assert.throws(
- () => reloadStorage(OS.Constants.Path.profileDir, filename),
- /Initialization failed/);
-
-// check that the backup file exists
-do_check_true(yield OS.File.exists(filepath + ".corrupt"));
-
-// check that the original corrupt file has been deleted
-do_check_false(yield OS.File.exists(filepath));
-
-// initialize the storage module again
-storage = reloadStorage(OS.Constants.Path.profileDir, filename);
-
-// use the storage module again, should work now
-storage.addLogin(testuser1);
-checkStorageData(storage, [], [testuser1]);
-
-// check the file exists
-var file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
-file.initWithPath(OS.Constants.Path.profileDir);
-file.append(filename);
-do_check_true(file.exists());
-
-deleteFile(OS.Constants.Path.profileDir, filename + ".corrupt");
-deleteFile(OS.Constants.Path.profileDir, filename);
-
-} catch (e) {
- throw new Error("FAILED in test #" + testnum + " -- " + testdesc + ": " + e);
-}
-
-});
diff --git a/toolkit/components/passwordmgr/test/unit/test_telemetry.js b/toolkit/components/passwordmgr/test/unit/test_telemetry.js
deleted file mode 100644
index 1d8f80226d..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_telemetry.js
+++ /dev/null
@@ -1,187 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests the statistics and other counters reported through telemetry.
- */
-
-"use strict";
-
-// Globals
-
-const MS_PER_DAY = 24 * 60 * 60 * 1000;
-
-// To prevent intermittent failures when the test is executed at a time that is
-// very close to a day boundary, we make it deterministic by using a static
-// reference date for all the time-based statistics.
-const gReferenceTimeMs = new Date("2000-01-01T00:00:00").getTime();
-
-// Returns a milliseconds value to use with nsILoginMetaInfo properties, falling
-// approximately in the middle of the specified number of days before the
-// reference time, where zero days indicates a time within the past 24 hours.
-var daysBeforeMs = days => gReferenceTimeMs - (days + 0.5) * MS_PER_DAY;
-
-/**
- * Contains metadata that will be attached to test logins in order to verify
- * that the statistics collection is working properly. Most properties of the
- * logins are initialized to the default test values already.
- *
- * If you update this data or any of the telemetry histograms it checks, you'll
- * probably need to update the expected statistics in the test below.
- */
-const StatisticsTestData = [
- {
- timeLastUsed: daysBeforeMs(0),
- },
- {
- timeLastUsed: daysBeforeMs(1),
- },
- {
- timeLastUsed: daysBeforeMs(7),
- formSubmitURL: null,
- httpRealm: "The HTTP Realm",
- },
- {
- username: "",
- timeLastUsed: daysBeforeMs(7),
- },
- {
- username: "",
- timeLastUsed: daysBeforeMs(30),
- },
- {
- username: "",
- timeLastUsed: daysBeforeMs(31),
- },
- {
- timeLastUsed: daysBeforeMs(365),
- },
- {
- username: "",
- timeLastUsed: daysBeforeMs(366),
- },
- {
- // If the login was saved in the future, it is ignored for statistiscs.
- timeLastUsed: daysBeforeMs(-1),
- },
- {
- timeLastUsed: daysBeforeMs(1000),
- },
-];
-
-/**
- * Triggers the collection of those statistics that are not accumulated each
- * time an action is taken, but are a static snapshot of the current state.
- */
-function triggerStatisticsCollection() {
- Services.obs.notifyObservers(null, "gather-telemetry", "" + gReferenceTimeMs);
-}
-
-/**
- * Tests the telemetry histogram with the given ID contains only the specified
- * non-zero ranges, expressed in the format { range1: value1, range2: value2 }.
- */
-function testHistogram(histogramId, expectedNonZeroRanges) {
- let snapshot = Services.telemetry.getHistogramById(histogramId).snapshot();
-
- // Compute the actual ranges in the format { range1: value1, range2: value2 }.
- let actualNonZeroRanges = {};
- for (let [index, range] of snapshot.ranges.entries()) {
- let value = snapshot.counts[index];
- if (value > 0) {
- actualNonZeroRanges[range] = value;
- }
- }
-
- // These are stringified to visualize the differences between the values.
- do_print("Testing histogram: " + histogramId);
- do_check_eq(JSON.stringify(actualNonZeroRanges),
- JSON.stringify(expectedNonZeroRanges));
-}
-
-// Tests
-
-/**
- * Enable local telemetry recording for the duration of the tests, and prepare
- * the test data that will be used by the following tests.
- */
-add_task(function test_initialize() {
- let oldCanRecord = Services.telemetry.canRecordExtended;
- Services.telemetry.canRecordExtended = true;
- do_register_cleanup(function () {
- Services.telemetry.canRecordExtended = oldCanRecord;
- });
-
- let uniqueNumber = 1;
- for (let loginModifications of StatisticsTestData) {
- loginModifications.hostname = `http://${uniqueNumber++}.example.com`;
- Services.logins.addLogin(TestData.formLogin(loginModifications));
- }
-});
-
-/**
- * Tests the collection of statistics related to login metadata.
- */
-add_task(function test_logins_statistics() {
- // Repeat the operation twice to test that histograms are not accumulated.
- for (let repeating of [false, true]) {
- triggerStatisticsCollection();
-
- // Should record 1 in the bucket corresponding to the number of passwords.
- testHistogram("PWMGR_NUM_SAVED_PASSWORDS",
- { 10: 1 });
-
- // Should record 1 in the bucket corresponding to the number of passwords.
- testHistogram("PWMGR_NUM_HTTPAUTH_PASSWORDS",
- { 1: 1 });
-
- // For each saved login, should record 1 in the bucket corresponding to the
- // age in days since the login was last used.
- testHistogram("PWMGR_LOGIN_LAST_USED_DAYS",
- { 0: 1, 1: 1, 7: 2, 29: 2, 356: 2, 750: 1 });
-
- // Should record the number of logins without a username in bucket 0, and
- // the number of logins with a username in bucket 1.
- testHistogram("PWMGR_USERNAME_PRESENT",
- { 0: 4, 1: 6 });
- }
-});
-
-/**
- * Tests the collection of statistics related to hosts for which passowrd saving
- * has been explicitly disabled.
- */
-add_task(function test_disabledHosts_statistics() {
- // Should record 1 in the bucket corresponding to the number of sites for
- // which password saving is disabled.
- Services.logins.setLoginSavingEnabled("http://www.example.com", false);
- triggerStatisticsCollection();
- testHistogram("PWMGR_BLOCKLIST_NUM_SITES", { 1: 1 });
-
- Services.logins.setLoginSavingEnabled("http://www.example.com", true);
- triggerStatisticsCollection();
- testHistogram("PWMGR_BLOCKLIST_NUM_SITES", { 0: 1 });
-});
-
-/**
- * Tests the collection of statistics related to general settings.
- */
-add_task(function test_settings_statistics() {
- let oldRememberSignons = Services.prefs.getBoolPref("signon.rememberSignons");
- do_register_cleanup(function () {
- Services.prefs.setBoolPref("signon.rememberSignons", oldRememberSignons);
- });
-
- // Repeat the operation twice per value to test that histograms are reset.
- for (let remember of [false, true, false, true]) {
- // This change should be observed immediately by the login service.
- Services.prefs.setBoolPref("signon.rememberSignons", remember);
-
- triggerStatisticsCollection();
-
- // Should record 1 in either bucket 0 or bucket 1 based on the preference.
- testHistogram("PWMGR_SAVING_ENABLED", remember ? { 1: 1 } : { 0: 1 });
- }
-});
diff --git a/toolkit/components/passwordmgr/test/unit/test_user_autocomplete_result.js b/toolkit/components/passwordmgr/test/unit/test_user_autocomplete_result.js
deleted file mode 100644
index e1d250a76e..0000000000
--- a/toolkit/components/passwordmgr/test/unit/test_user_autocomplete_result.js
+++ /dev/null
@@ -1,488 +0,0 @@
-XPCOMUtils.defineLazyModuleGetter(this, "LoginHelper",
- "resource://gre/modules/LoginHelper.jsm");
-Cu.import("resource://gre/modules/LoginManagerContent.jsm");
-var nsLoginInfo = Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
- Ci.nsILoginInfo, "init");
-
-const PREF_INSECURE_FIELD_WARNING_ENABLED = "security.insecure_field_warning.contextual.enabled";
-const PREF_INSECURE_AUTOFILLFORMS_ENABLED = "signon.autofillForms.http";
-
-let matchingLogins = [];
-matchingLogins.push(new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "", "emptypass1", "uname", "pword"));
-
-matchingLogins.push(new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "tempuser1", "temppass1", "uname", "pword"));
-
-matchingLogins.push(new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "testuser2", "testpass2", "uname", "pword"));
-
-matchingLogins.push(new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "testuser3", "testpass3", "uname", "pword"));
-
-matchingLogins.push(new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
- "zzzuser4", "zzzpass4", "uname", "pword"));
-
-let meta = matchingLogins[0].QueryInterface(Ci.nsILoginMetaInfo);
-let dateAndTimeFormatter = new Intl.DateTimeFormat(undefined,
- { day: "numeric", month: "short", year: "numeric" });
-let time = dateAndTimeFormatter.format(new Date(meta.timePasswordChanged));
-const LABEL_NO_USERNAME = "No username (" + time + ")";
-
-let expectedResults = [
- {
- insecureFieldWarningEnabled: true,
- insecureAutoFillFormsEnabled: true,
- isSecure: true,
- isPasswordField: false,
- matchingLogins: matchingLogins,
- items: [{
- value: "",
- label: LABEL_NO_USERNAME,
- style: "login",
- }, {
- value: "tempuser1",
- label: "tempuser1",
- style: "login",
- }, {
- value: "testuser2",
- label: "testuser2",
- style: "login",
- }, {
- value: "testuser3",
- label: "testuser3",
- style: "login",
- }, {
- value: "zzzuser4",
- label: "zzzuser4",
- style: "login",
- }]
- },
- {
- insecureFieldWarningEnabled: true,
- insecureAutoFillFormsEnabled: true,
- isSecure: false,
- isPasswordField: false,
- matchingLogins: matchingLogins,
- items: [{
- value: "",
- label: "This connection is not secure. Logins entered here could be compromised. Learn More",
- style: "insecureWarning"
- }, {
- value: "",
- label: LABEL_NO_USERNAME,
- style: "login",
- }, {
- value: "tempuser1",
- label: "tempuser1",
- style: "login",
- }, {
- value: "testuser2",
- label: "testuser2",
- style: "login",
- }, {
- value: "testuser3",
- label: "testuser3",
- style: "login",
- }, {
- value: "zzzuser4",
- label: "zzzuser4",
- style: "login",
- }]
- },
- {
- insecureFieldWarningEnabled: true,
- insecureAutoFillFormsEnabled: true,
- isSecure: true,
- isPasswordField: true,
- matchingLogins: matchingLogins,
- items: [{
- value: "emptypass1",
- label: LABEL_NO_USERNAME,
- style: "login",
- }, {
- value: "temppass1",
- label: "tempuser1",
- style: "login",
- }, {
- value: "testpass2",
- label: "testuser2",
- style: "login",
- }, {
- value: "testpass3",
- label: "testuser3",
- style: "login",
- }, {
- value: "zzzpass4",
- label: "zzzuser4",
- style: "login",
- }]
- },
- {
- insecureFieldWarningEnabled: true,
- insecureAutoFillFormsEnabled: true,
- isSecure: false,
- isPasswordField: true,
- matchingLogins: matchingLogins,
- items: [{
- value: "",
- label: "This connection is not secure. Logins entered here could be compromised. Learn More",
- style: "insecureWarning"
- }, {
- value: "emptypass1",
- label: LABEL_NO_USERNAME,
- style: "login",
- }, {
- value: "temppass1",
- label: "tempuser1",
- style: "login",
- }, {
- value: "testpass2",
- label: "testuser2",
- style: "login",
- }, {
- value: "testpass3",
- label: "testuser3",
- style: "login",
- }, {
- value: "zzzpass4",
- label: "zzzuser4",
- style: "login",
- }]
- },
- {
- insecureFieldWarningEnabled: false,
- insecureAutoFillFormsEnabled: true,
- isSecure: true,
- isPasswordField: false,
- matchingLogins: matchingLogins,
- items: [{
- value: "",
- label: LABEL_NO_USERNAME,
- style: "login",
- }, {
- value: "tempuser1",
- label: "tempuser1",
- style: "login",
- }, {
- value: "testuser2",
- label: "testuser2",
- style: "login",
- }, {
- value: "testuser3",
- label: "testuser3",
- style: "login",
- }, {
- value: "zzzuser4",
- label: "zzzuser4",
- style: "login",
- }]
- },
- {
- insecureFieldWarningEnabled: false,
- insecureAutoFillFormsEnabled: true,
- isSecure: false,
- isPasswordField: false,
- matchingLogins: matchingLogins,
- items: [{
- value: "",
- label: LABEL_NO_USERNAME,
- style: "login",
- }, {
- value: "tempuser1",
- label: "tempuser1",
- style: "login",
- }, {
- value: "testuser2",
- label: "testuser2",
- style: "login",
- }, {
- value: "testuser3",
- label: "testuser3",
- style: "login",
- }, {
- value: "zzzuser4",
- label: "zzzuser4",
- style: "login",
- }]
- },
- {
- insecureFieldWarningEnabled: false,
- insecureAutoFillFormsEnabled: true,
- isSecure: true,
- isPasswordField: true,
- matchingLogins: matchingLogins,
- items: [{
- value: "emptypass1",
- label: LABEL_NO_USERNAME,
- style: "login",
- }, {
- value: "temppass1",
- label: "tempuser1",
- style: "login",
- }, {
- value: "testpass2",
- label: "testuser2",
- style: "login",
- }, {
- value: "testpass3",
- label: "testuser3",
- style: "login",
- }, {
- value: "zzzpass4",
- label: "zzzuser4",
- style: "login",
- }]
- },
- {
- insecureFieldWarningEnabled: false,
- insecureAutoFillFormsEnabled: true,
- isSecure: false,
- isPasswordField: true,
- matchingLogins: matchingLogins,
- items: [{
- value: "emptypass1",
- label: LABEL_NO_USERNAME,
- style: "login",
- }, {
- value: "temppass1",
- label: "tempuser1",
- style: "login",
- }, {
- value: "testpass2",
- label: "testuser2",
- style: "login",
- }, {
- value: "testpass3",
- label: "testuser3",
- style: "login",
- }, {
- value: "zzzpass4",
- label: "zzzuser4",
- style: "login",
- }]
- },
- {
- insecureFieldWarningEnabled: true,
- insecureAutoFillFormsEnabled: false,
- isSecure: true,
- isPasswordField: false,
- matchingLogins: matchingLogins,
- items: [{
- value: "",
- label: LABEL_NO_USERNAME,
- style: "login",
- }, {
- value: "tempuser1",
- label: "tempuser1",
- style: "login",
- }, {
- value: "testuser2",
- label: "testuser2",
- style: "login",
- }, {
- value: "testuser3",
- label: "testuser3",
- style: "login",
- }, {
- value: "zzzuser4",
- label: "zzzuser4",
- style: "login",
- }]
- },
- {
- insecureFieldWarningEnabled: true,
- insecureAutoFillFormsEnabled: false,
- isSecure: false,
- isPasswordField: false,
- matchingLogins: matchingLogins,
- items: [{
- value: "",
- label: "This connection is not secure. Logins entered here could be compromised. Learn More",
- style: "insecureWarning"
- }, {
- value: "",
- label: LABEL_NO_USERNAME,
- style: "login",
- }, {
- value: "tempuser1",
- label: "tempuser1",
- style: "login",
- }, {
- value: "testuser2",
- label: "testuser2",
- style: "login",
- }, {
- value: "testuser3",
- label: "testuser3",
- style: "login",
- }, {
- value: "zzzuser4",
- label: "zzzuser4",
- style: "login",
- }]
- },
- {
- insecureFieldWarningEnabled: true,
- insecureAutoFillFormsEnabled: false,
- isSecure: true,
- isPasswordField: true,
- matchingLogins: matchingLogins,
- items: [{
- value: "emptypass1",
- label: LABEL_NO_USERNAME,
- style: "login",
- }, {
- value: "temppass1",
- label: "tempuser1",
- style: "login",
- }, {
- value: "testpass2",
- label: "testuser2",
- style: "login",
- }, {
- value: "testpass3",
- label: "testuser3",
- style: "login",
- }, {
- value: "zzzpass4",
- label: "zzzuser4",
- style: "login",
- }]
- },
- {
- insecureFieldWarningEnabled: true,
- insecureAutoFillFormsEnabled: false,
- isSecure: false,
- isPasswordField: true,
- matchingLogins: matchingLogins,
- items: [{
- value: "",
- label: "This connection is not secure. Logins entered here could be compromised. Learn More",
- style: "insecureWarning"
- }, {
- value: "emptypass1",
- label: LABEL_NO_USERNAME,
- style: "login",
- }, {
- value: "temppass1",
- label: "tempuser1",
- style: "login",
- }, {
- value: "testpass2",
- label: "testuser2",
- style: "login",
- }, {
- value: "testpass3",
- label: "testuser3",
- style: "login",
- }, {
- value: "zzzpass4",
- label: "zzzuser4",
- style: "login",
- }]
- },
- {
- insecureFieldWarningEnabled: false,
- insecureAutoFillFormsEnabled: false,
- isSecure: true,
- isPasswordField: false,
- matchingLogins: matchingLogins,
- items: [{
- value: "",
- label: LABEL_NO_USERNAME,
- style: "login",
- }, {
- value: "tempuser1",
- label: "tempuser1",
- style: "login",
- }, {
- value: "testuser2",
- label: "testuser2",
- style: "login",
- }, {
- value: "testuser3",
- label: "testuser3",
- style: "login",
- }, {
- value: "zzzuser4",
- label: "zzzuser4",
- style: "login",
- }]
- },
- {
- insecureFieldWarningEnabled: false,
- insecureAutoFillFormsEnabled: false,
- isSecure: false,
- isPasswordField: false,
- matchingLogins: matchingLogins,
- items: []
- },
- {
- insecureFieldWarningEnabled: false,
- insecureAutoFillFormsEnabled: false,
- isSecure: true,
- isPasswordField: true,
- matchingLogins: matchingLogins,
- items: [{
- value: "emptypass1",
- label: LABEL_NO_USERNAME,
- style: "login",
- }, {
- value: "temppass1",
- label: "tempuser1",
- style: "login",
- }, {
- value: "testpass2",
- label: "testuser2",
- style: "login",
- }, {
- value: "testpass3",
- label: "testuser3",
- style: "login",
- }, {
- value: "zzzpass4",
- label: "zzzuser4",
- style: "login",
- }]
- },
- {
- insecureFieldWarningEnabled: false,
- insecureAutoFillFormsEnabled: false,
- isSecure: false,
- isPasswordField: true,
- matchingLogins: matchingLogins,
- items: []
- },
-];
-
-add_task(function* test_all_patterns() {
- LoginHelper.createLogger("UserAutoCompleteResult");
- expectedResults.forEach(pattern => {
- Services.prefs.setBoolPref(PREF_INSECURE_FIELD_WARNING_ENABLED,
- pattern.insecureFieldWarningEnabled);
- Services.prefs.setBoolPref(PREF_INSECURE_AUTOFILLFORMS_ENABLED,
- pattern.insecureAutoFillFormsEnabled);
- let actual = new UserAutoCompleteResult("", pattern.matchingLogins,
- {
- isSecure: pattern.isSecure,
- isPasswordField: pattern.isPasswordField
- });
- pattern.items.forEach((item, index) => {
- equal(actual.getValueAt(index), item.value);
- equal(actual.getLabelAt(index), item.label);
- equal(actual.getStyleAt(index), item.style);
- });
-
- if (pattern.items.length != 0) {
- Assert.throws(() => actual.getValueAt(pattern.items.length),
- /Index out of range\./);
-
- Assert.throws(() => actual.getLabelAt(pattern.items.length),
- /Index out of range\./);
-
- Assert.throws(() => actual.removeValueAt(pattern.items.length, true),
- /Index out of range\./);
- }
- });
-});
diff --git a/toolkit/components/passwordmgr/test/unit/xpcshell.ini b/toolkit/components/passwordmgr/test/unit/xpcshell.ini
deleted file mode 100644
index 8f8c92a28a..0000000000
--- a/toolkit/components/passwordmgr/test/unit/xpcshell.ini
+++ /dev/null
@@ -1,46 +0,0 @@
-[DEFAULT]
-head = head.js
-tail =
-support-files = data/**
-
-# Test JSON file access and import from SQLite, not applicable to Android.
-[test_module_LoginImport.js]
-skip-if = os == "android"
-[test_module_LoginStore.js]
-skip-if = os == "android"
-[test_removeLegacySignonFiles.js]
-skip-if = os == "android"
-
-# Test SQLite database backup and migration, applicable to Android only.
-[test_storage_mozStorage.js]
-skip-if = true || os != "android" # Bug 1171687: Needs fixing on Android
-
-# The following tests apply to any storage back-end.
-[test_context_menu.js]
-skip-if = os == "android" # The context menu isn't used on Android.
-# LoginManagerContextMenu is only included for MOZ_BUILD_APP == 'browser'.
-run-if = buildapp == "browser"
-[test_dedupeLogins.js]
-[test_disabled_hosts.js]
-[test_getFormFields.js]
-[test_getPasswordFields.js]
-[test_getPasswordOrigin.js]
-[test_isOriginMatching.js]
-[test_legacy_empty_formSubmitURL.js]
-[test_legacy_validation.js]
-[test_logins_change.js]
-[test_logins_decrypt_failure.js]
-skip-if = os == "android" # Bug 1171687: Needs fixing on Android
-[test_user_autocomplete_result.js]
-skip-if = os == "android"
-[test_logins_metainfo.js]
-[test_logins_search.js]
-[test_maybeImportLogin.js]
-[test_notifications.js]
-[test_OSCrypto_win.js]
-skip-if = os != "win"
-[test_recipes_add.js]
-[test_recipes_content.js]
-[test_search_schemeUpgrades.js]
-[test_storage.js]
-[test_telemetry.js]
diff --git a/toolkit/components/perf/chrome.ini b/toolkit/components/perf/chrome.ini
deleted file mode 100644
index eaa3c2401d..0000000000
--- a/toolkit/components/perf/chrome.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[DEFAULT]
-
-[test_pm.xul]
diff --git a/toolkit/components/perf/moz.build b/toolkit/components/perf/moz.build
index d153244c51..378d18feb2 100644
--- a/toolkit/components/perf/moz.build
+++ b/toolkit/components/perf/moz.build
@@ -17,5 +17,3 @@ FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'/js/xpconnect/loader',
]
-
-MOCHITEST_CHROME_MANIFESTS += ['chrome.ini']
diff --git a/toolkit/components/perf/test_pm.xul b/toolkit/components/perf/test_pm.xul
deleted file mode 100644
index 7dbf27b924..0000000000
--- a/toolkit/components/perf/test_pm.xul
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0"?>
-<!-- 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/. -->
-
-<window title="Performance measurement tests"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="test()">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
- <script type="application/javascript"><![CDATA[
-function test()
-{
- SimpleTest.waitForExplicitFinish();
-
- Components.utils.import("resource://gre/modules/PerfMeasurement.jsm");
- let pm = new PerfMeasurement(PerfMeasurement.ALL);
- if (pm.eventsMeasured == 0) {
- todo(false, "stub, skipping test");
- } else {
- pm.start();
- for (let i = 0; i < 10000; i++) ;
- pm.stop();
-
- events = ["cpu_cycles", "instructions", "cache_references", "cache_misses",
- "branch_instructions", "branch_misses", "bus_cycles", "page_faults",
- "major_page_faults", "context_switches", "cpu_migrations"];
-
- for (var i = 0; i < events.length; i++) {
- var e = events[i];
- ((pm.eventsMeasured & PerfMeasurement[e.toUpperCase()]) ? isnot : todo_is)(pm[e], -1, e);
- }
- }
- SimpleTest.finish();
-}
-]]></script>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display:none;"></div>
- <pre id="test"></pre>
- </body>
- <label id="test-result"/>
-</window>
diff --git a/toolkit/components/perfmonitoring/moz.build b/toolkit/components/perfmonitoring/moz.build
index 1effe5f009..53c73803e4 100644
--- a/toolkit/components/perfmonitoring/moz.build
+++ b/toolkit/components/perfmonitoring/moz.build
@@ -4,10 +4,16 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-BROWSER_CHROME_MANIFESTS += ['tests/browser/browser.ini']
-
XPIDL_MODULE = 'toolkit_perfmonitoring'
+XPIDL_SOURCES += ['nsIPerformanceStats.idl']
+
+EXPORTS += ['nsPerformanceStats.h']
+
+LOCAL_INCLUDES += ['/dom/base']
+
+UNIFIED_SOURCES += ['nsPerformanceStats.cpp']
+
EXTRA_JS_MODULES += [
'AddonWatcher.jsm',
'PerformanceStats-content.js',
@@ -16,20 +22,4 @@ EXTRA_JS_MODULES += [
'PerformanceWatcher.jsm',
]
-XPIDL_SOURCES += [
- 'nsIPerformanceStats.idl',
-]
-
-UNIFIED_SOURCES += [
- 'nsPerformanceStats.cpp'
-]
-
-EXPORTS += [
- 'nsPerformanceStats.h'
-]
-
-LOCAL_INCLUDES += [
- '/dom/base',
-]
-
FINAL_LIBRARY = 'xul'
diff --git a/toolkit/components/perfmonitoring/tests/browser/.eslintrc.js b/toolkit/components/perfmonitoring/tests/browser/.eslintrc.js
deleted file mode 100644
index 7c80211924..0000000000
--- a/toolkit/components/perfmonitoring/tests/browser/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/mochitest/browser.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/perfmonitoring/tests/browser/browser.ini b/toolkit/components/perfmonitoring/tests/browser/browser.ini
deleted file mode 100644
index 7f4ac8514c..0000000000
--- a/toolkit/components/perfmonitoring/tests/browser/browser.ini
+++ /dev/null
@@ -1,15 +0,0 @@
-[DEFAULT]
-head = head.js
-tags = addons
-support-files =
- browser_Addons_sample.xpi
- browser_compartments.html
- browser_compartments_frame.html
- browser_compartments_script.js
-
-[browser_AddonWatcher.js]
-[browser_compartments.js]
-skip-if = os == "linux" && !debug && e10s # Bug 1230018
-[browser_addonPerformanceAlerts.js]
-[browser_addonPerformanceAlerts_2.js]
-[browser_webpagePerformanceAlerts.js]
diff --git a/toolkit/components/perfmonitoring/tests/browser/browser_AddonWatcher.js b/toolkit/components/perfmonitoring/tests/browser/browser_AddonWatcher.js
deleted file mode 100644
index b4e80faa7a..0000000000
--- a/toolkit/components/perfmonitoring/tests/browser/browser_AddonWatcher.js
+++ /dev/null
@@ -1,151 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Tests for AddonWatcher.jsm
-
-"use strict";
-
-requestLongerTimeout(2);
-
-Cu.import("resource://gre/modules/Promise.jsm", this);
-Cu.import("resource://gre/modules/AddonManager.jsm", this);
-Cu.import("resource://gre/modules/Services.jsm", this);
-
-const ADDON_URL = "http://example.com/browser/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample.xpi";
-const ADDON_ID = "addonwatcher-test@mozilla.com";
-
-add_task(function* init() {
- info("Installing test add-on");
- let installer = yield new Promise(resolve => AddonManager.getInstallForURL(ADDON_URL, resolve, "application/x-xpinstall"));
- if (installer.error) {
- throw installer.error;
- }
- let installed = new Promise((resolve, reject) => installer.addListener({
- onInstallEnded: (_, addon) => resolve(addon),
- onInstallFailed: reject,
- onDownloadFailed: reject
- }));
-
- // We also need to wait for the add-on to report that it's ready
- // to be used in the test.
- let ready = TestUtils.topicObserved("test-addonwatcher-ready");
- installer.install();
-
- info("Waiting for installation to terminate");
- let addon = yield installed;
-
- yield ready;
-
- registerCleanupFunction(() => {
- info("Uninstalling test add-on");
- addon.uninstall()
- });
-
- Preferences.set("browser.addon-watch.warmup-ms", 0);
- Preferences.set("browser.addon-watch.freeze-threshold-micros", 0);
- Preferences.set("browser.addon-watch.jank-threshold-micros", 0);
- Preferences.set("browser.addon-watch.occurrences-between-alerts", 0);
- Preferences.set("browser.addon-watch.delay-between-alerts-ms", 0);
- Preferences.set("browser.addon-watch.delay-between-freeze-alerts-ms", 0);
- Preferences.set("browser.addon-watch.max-simultaneous-reports", 10000);
- Preferences.set("browser.addon-watch.deactivate-after-idle-ms", 100000000);
- registerCleanupFunction(() => {
- for (let k of [
- "browser.addon-watch.warmup-ms",
- "browser.addon-watch.freeze-threshold-micros",
- "browser.addon-watch.jank-threshold-micros",
- "browser.addon-watch.occurrences-between-alerts",
- "browser.addon-watch.delay-between-alerts-ms",
- "browser.addon-watch.delay-between-freeze-alerts-ms",
- "browser.addon-watch.max-simultaneous-reports",
- "browser.addon-watch.deactivate-after-idle-ms"
- ]) {
- Preferences.reset(k);
- }
- });
-
- let oldCanRecord = Services.telemetry.canRecordExtended;
- Services.telemetry.canRecordExtended = true;
- AddonWatcher.init();
-
- registerCleanupFunction(function () {
- AddonWatcher.paused = true;
- Services.telemetry.canRecordExtended = oldCanRecord;
- });
-});
-
-// Utility function to burn some resource, trigger a reaction of the add-on watcher
-// and check both its notification and telemetry.
-let burn_rubber = Task.async(function*({histogramName, topic, expectedMinSum}) {
- let detected = false;
- let observer = (_, topic, id) => {
- Assert.equal(id, ADDON_ID, "The add-on watcher has detected the misbehaving addon");
- detected = true;
- };
-
- try {
- info("Preparing add-on watcher");
-
- Services.obs.addObserver(observer, AddonWatcher.TOPIC_SLOW_ADDON_DETECTED, false);
-
- let histogram = Services.telemetry.getKeyedHistogramById(histogramName);
- histogram.clear();
- let snap1 = histogram.snapshot(ADDON_ID);
- Assert.equal(snap1.sum, 0, `Histogram ${histogramName} is initially empty for the add-on`);
-
- let histogramUpdated = false;
- do {
- info(`Burning some CPU with ${topic}. This should cause an add-on watcher notification`);
- yield new Promise(resolve => setTimeout(resolve, 100));
- Services.obs.notifyObservers(null, topic, "");
- yield new Promise(resolve => setTimeout(resolve, 100));
-
- let snap2 = histogram.snapshot(ADDON_ID);
- histogramUpdated = snap2.sum > 0;
- info(`For the moment, histogram ${histogramName} shows ${snap2.sum} => ${histogramUpdated}`);
- info(`For the moment, we have ${detected?"":"NOT "}detected the slow add-on`);
- } while (!histogramUpdated || !detected);
-
- let snap3 = histogram.snapshot(ADDON_ID);
- Assert.ok(snap3.sum >= expectedMinSum, `Histogram ${histogramName} recorded a gravity of ${snap3.sum}, expecting at least ${expectedMinSum}.`);
- } finally {
- Services.obs.removeObserver(observer, AddonWatcher.TOPIC_SLOW_ADDON_DETECTED);
- }
-});
-
-// Test that burning CPU will cause the add-on watcher to notice that
-// the add-on is misbehaving.
-add_task(function* test_burn_CPU() {
- yield burn_rubber({
- histogramName: "PERF_MONITORING_SLOW_ADDON_JANK_US",
- topic: "test-addonwatcher-burn-some-cpu",
- expectedMinSum: 7,
- });
-});
-
-// Test that burning content CPU will cause the add-on watcher to notice that
-// the add-on is misbehaving.
-/*
-Blocked by bug 1227283.
-add_task(function* test_burn_content_CPU() {
- yield burn_rubber({
- histogramName: "PERF_MONITORING_SLOW_ADDON_JANK_US",
- topic: "test-addonwatcher-burn-some-content-cpu",
- expectedMinSum: 7,
- });
-});
-*/
-
-// Test that burning CPOW will cause the add-on watcher to notice that
-// the add-on is misbehaving.
-add_task(function* test_burn_CPOW() {
- if (!gMultiProcessBrowser) {
- info("This is a single-process Firefox, we can't test for CPOW");
- return;
- }
- yield burn_rubber({
- histogramName: "PERF_MONITORING_SLOW_ADDON_CPOW_US",
- topic: "test-addonwatcher-burn-some-cpow",
- expectedMinSum: 400,
- });
-});
diff --git a/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample.xpi b/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample.xpi
deleted file mode 100644
index ae5bcc5ff3..0000000000
--- a/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample.xpi
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/bootstrap.js b/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/bootstrap.js
deleted file mode 100644
index 9a55758279..0000000000
--- a/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/bootstrap.js
+++ /dev/null
@@ -1,105 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Sample for browser_AddonWatcher.js
-
-"use strict";
-
-const {utils: Cu, classes: Cc, interfaces: Ci} = Components;
-
-const TOPIC_BURNCPU = "test-addonwatcher-burn-some-cpu";
-const TOPIC_BURNCPOW = "test-addonwatcher-burn-some-cpow";
-const TOPIC_BURNCONTENTCPU = "test-addonwatcher-burn-some-content-cpu";
-const TOPIC_READY = "test-addonwatcher-ready";
-
-const MESSAGE_BURNCPOW = "test-addonwatcher-cpow:init";
-const URL_FRAMESCRIPT = "chrome://addonwatcher-test/content/framescript.js";
-
-Cu.import("resource://gre/modules/Services.jsm", this);
-const { setTimeout } = Cu.import("resource://gre/modules/Timer.jsm", {});
-Cu.import("resource://gre/modules/Task.jsm", this);
-
-let globalMM = Cc["@mozilla.org/globalmessagemanager;1"]
- .getService(Ci.nsIMessageListenerManager);
-
-/**
- * Spend some time using CPU.
- */
-function burnCPU() {
- let ignored = [];
- let start = Date.now();
- let i = 0;
- while (Date.now() - start < 1000) {
- ignored[i++ % 2] = i;
- }
-}
-
-/**
- * Spend some time in CPOW.
- */
-function burnCPOW() {
- gBurnCPOW();
-}
-let gBurnCPOW = null;
-
-function burnContentCPU() {
- setTimeout(() => { try {
- gBurnContentCPU()
- } catch (ex) {
- dump(`test-addon error: ${ex}\n`);
- } }, 0);
-}
-let gBurnContentCPU = null;
-
-let gTab = null;
-let gTabBrowser = null;
-
-function startup() {
- Services.obs.addObserver(burnCPU, TOPIC_BURNCPU, false);
- Services.obs.addObserver(burnCPOW, TOPIC_BURNCPOW, false);
- Services.obs.addObserver(burnContentCPU, TOPIC_BURNCONTENTCPU, false);
-
- let windows = Services.wm.getEnumerator("navigator:browser");
- let win = windows.getNext();
- gTabBrowser = win.gBrowser;
- gTab = gTabBrowser.addTab("about:robots");
- gBurnContentCPU = function() {
- gTab.linkedBrowser.messageManager.sendAsyncMessage("test-addonwatcher-burn-some-content-cpu", {});
- }
-
- gTab.linkedBrowser.messageManager.loadFrameScript(URL_FRAMESCRIPT, false);
- globalMM.loadFrameScript(URL_FRAMESCRIPT, false);
-
- if (Services.appinfo.browserTabsRemoteAutostart) {
- // This profile has e10s enabled, which means we'll want to
- // test CPOW traffic.
- globalMM.addMessageListener("test-addonwatcher-cpow:init", function waitForCPOW(msg) {
- if (Components.utils.isCrossProcessWrapper(msg.objects.burnCPOW)) {
- gBurnCPOW = msg.objects.burnCPOW;
- globalMM.removeMessageListener("test-addonwatcher-cpow:init", waitForCPOW);
- Services.obs.notifyObservers(null, TOPIC_READY, null);
- } else {
- Cu.reportError("test-addonwatcher-cpow:init didn't give us a CPOW! Expect timeouts.");
- }
- });
- } else {
- // e10s is not enabled, so a CPOW is not necessary - we can report ready
- // right away.
- Services.obs.notifyObservers(null, TOPIC_READY, null);
- }
-}
-
-function shutdown() {
- Services.obs.removeObserver(burnCPU, TOPIC_BURNCPU);
- Services.obs.removeObserver(burnCPOW, TOPIC_BURNCPOW);
- Services.obs.removeObserver(burnContentCPU, TOPIC_BURNCONTENTCPU);
- gTabBrowser.removeTab(gTab);
-}
-
-function install() {
- // Nothing to do
-}
-
-function uninstall() {
- // Nothing to do
-}
diff --git a/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/build.sh b/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/build.sh
deleted file mode 100644
index 28d52ea3a8..0000000000
--- a/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/build.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-echo "Rebuilding browser_Addons_sample.xpi..."
-zip -r ../browser_Addons_sample.xpi .
-echo "
-Done! Don't forget to sign it: https://wiki.mozilla.org/EngineeringProductivity/HowTo/SignExtensions" \ No newline at end of file
diff --git a/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/chrome.manifest b/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/chrome.manifest
deleted file mode 100644
index 9f53da861b..0000000000
--- a/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/chrome.manifest
+++ /dev/null
@@ -1 +0,0 @@
-content addonwatcher-test content/
diff --git a/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/content/framescript.js b/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/content/framescript.js
deleted file mode 100644
index e7ebc2a616..0000000000
--- a/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/content/framescript.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-function burnCPOW(msg) {
- dump(`Addon: content burnCPU start ${Math.sin(Math.random())}\n`);
- let start = content.performance.now();
- let ignored = [];
- while (content.performance.now() - start < 5000) {
- ignored[ignored.length % 2] = ignored.length;
- }
- dump(`Addon: content burnCPU done: ${content.performance.now() - start}\n`);
-}
-
-if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT) {
- sendAsyncMessage("test-addonwatcher-cpow:init", {}, {burnCPOW});
-}
-
-addMessageListener("test-addonwatcher-burn-some-content-cpu", burnCPOW);
diff --git a/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/install.rdf b/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/install.rdf
deleted file mode 100644
index cae10ace66..0000000000
--- a/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/install.rdf
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:em="http://www.mozilla.org/2004/em-rdf#">
- <Description about="urn:mozilla:install-manifest">
- <em:id>addonwatcher-test@mozilla.com</em:id>
- <em:version>1.1</em:version>
-
- <em:targetApplication>
- <Description>
- <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
- <em:minVersion>0.3</em:minVersion>
- <em:maxVersion>*</em:maxVersion>
- </Description>
- </em:targetApplication>
-
- <em:targetApplication>
- <Description>
- <em:id>toolkit@mozilla.org</em:id>
- <em:minVersion>1</em:minVersion>
- <em:maxVersion>*</em:maxVersion>
- </Description>
- </em:targetApplication>
-
- <em:bootstrap>true</em:bootstrap>
-
- <em:name>Sample for browser_AddonWatcher.js</em:name>
-
- </Description>
-</RDF>
diff --git a/toolkit/components/perfmonitoring/tests/browser/browser_addonPerformanceAlerts.js b/toolkit/components/perfmonitoring/tests/browser/browser_addonPerformanceAlerts.js
deleted file mode 100644
index af78f00745..0000000000
--- a/toolkit/components/perfmonitoring/tests/browser/browser_addonPerformanceAlerts.js
+++ /dev/null
@@ -1,91 +0,0 @@
-"use strict";
-
-/**
- * Tests for PerformanceWatcher watching slow addons.
- */
-
-add_task(function* init() {
- // Get rid of buffering.
- let service = Cc["@mozilla.org/toolkit/performance-stats-service;1"].getService(
- Ci.nsIPerformanceStatsService);
- let oldDelay = service.jankAlertBufferingDelay;
-
- service.jankAlertBufferingDelay = 0 /* ms */;
- registerCleanupFunction(() => {
- info("Cleanup");
- service.jankAlertBufferingDelay = oldDelay;
- });
-});
-
-add_task(function* test_install_addon_then_watch_it() {
- for (let topic of ["burnCPU", "promiseBurnContentCPU", "promiseBurnCPOW"]) {
- info(`Starting subtest ${topic}`);
- info("Spawning fake add-on, making sure that the compartment is initialized");
- let addon = new AddonBurner();
- yield addon.promiseInitialized;
- addon.burnCPU();
-
- info(`Check that burning CPU triggers the real listener, but not the fake listener ${topic}`);
- let realListener = new AddonListener(addon.addonId, (group, details) => {
- if (group.addonId == addon.addonId) {
- return details.highestJank;
- }
- throw new Error(`I shouldn't have been called with addon ${group.addonId}`);
- });
- let fakeListener = new AddonListener(addon.addonId + "-fake-" + Math.random(), group => true); // This listener should never be triggered.
- let universalListener = new AddonListener("*", alerts => {
- info(`AddonListener: received alerts ${JSON.stringify(alerts)}`);
- let alert = alerts.find(({source}) => {
- return source.addonId == addon.addonId;
- });
- if (alert) {
- info(`AddonListener: I found an alert for ${addon.addonId}`);
- return alert.details.highestJank;
- }
- info(`AddonListener: I didn't find any alert for ${addon.addonId}`);
- return null;
- });
-
- // Waiting a little – listeners are buffered.
- yield new Promise(resolve => setTimeout(resolve, 100));
- yield addon.run(topic, 10, realListener);
- // Waiting a little – listeners are buffered.
- yield new Promise(resolve => setTimeout(resolve, 100));
-
- Assert.ok(realListener.triggered, `1. The real listener was triggered ${topic}`);
- Assert.ok(universalListener.triggered, `1. The universal listener was triggered ${topic}`);
- Assert.ok(!fakeListener.triggered, `1. The fake listener was not triggered ${topic}`);
- Assert.ok(realListener.result >= addon.jankThreshold, `1. jank is at least ${addon.jankThreshold/1000}ms (${realListener.result/1000}ms) ${topic}`);
-
- info(`Attempting to remove a performance listener incorrectly, check that this does not hurt our real listener ${topic}`);
- Assert.throws(() => PerformanceWatcher.removePerformanceListener({addonId: addon.addonId}, () => {}));
- Assert.throws(() => PerformanceWatcher.removePerformanceListener({addonId: addon.addonId + "-unbound-id-" + Math.random()}, realListener.listener));
-
- yield addon.run(topic, 10, realListener);
- // Waiting a little – listeners are buffered.
- yield new Promise(resolve => setTimeout(resolve, 300));
-
- Assert.ok(realListener.triggered, `2. The real listener was triggered ${topic}`);
- Assert.ok(universalListener.triggered, `2. The universal listener was triggered ${topic}`);
- Assert.ok(!fakeListener.triggered, `2. The fake listener was not triggered ${topic}`);
- Assert.ok(realListener.result >= 200000, `2. jank is at least 300ms (${realListener.result/1000}ms) ${topic}`);
-
- info(`Attempting to remove correctly, check if the listener is still triggered ${topic}`);
- realListener.unregister();
- yield addon.run(topic, 3, realListener);
- Assert.ok(!realListener.triggered, `3. After being unregistered, the real listener was not triggered ${topic}`);
- Assert.ok(universalListener.triggered, `3. The universal listener is still triggered ${topic}`);
-
- info("Unregistering universal listener");
- // Waiting a little – listeners are buffered.
- yield new Promise(resolve => setTimeout(resolve, 100));
- universalListener.unregister();
- // Waiting a little – listeners are buffered.
- yield new Promise(resolve => setTimeout(resolve, 100));
- yield addon.run(topic, 3, realListener);
- Assert.ok(!universalListener.triggered, `4. After being unregistered, the universal listener is not triggered ${topic}`);
-
- fakeListener.unregister();
- addon.dispose();
- }
-});
diff --git a/toolkit/components/perfmonitoring/tests/browser/browser_addonPerformanceAlerts_2.js b/toolkit/components/perfmonitoring/tests/browser/browser_addonPerformanceAlerts_2.js
deleted file mode 100644
index d39c38b1f6..0000000000
--- a/toolkit/components/perfmonitoring/tests/browser/browser_addonPerformanceAlerts_2.js
+++ /dev/null
@@ -1,25 +0,0 @@
-"use strict";
-
-/**
- * Tests for PerformanceWatcher watching slow addons.
- */
-
-add_task(function* test_watch_addon_then_install_it() {
- for (let topic of ["burnCPU", "promiseBurnContentCPU", "promiseBurnCPOW"]) {
- let addonId = "addon:test_watch_addons_before_installing" + Math.random();
- let realListener = new AddonListener(addonId, (group, details) => {
- if (group.addonId == addonId) {
- return details.highestJank;
- }
- throw new Error(`I shouldn't have been called with addon ${group.addonId}`);
- });
-
- info("Now install the add-on, *after* having installed the listener");
- let addon = new AddonBurner(addonId);
-
- Assert.ok((yield addon.run(topic, 10, realListener)), `5. The real listener was triggered ${topic}`);
- Assert.ok(realListener.result >= addon.jankThreshold, `5. jank is at least ${addon.jankThreshold/1000}ms (${realListener.result}µs) ${topic}`);
- realListener.unregister();
- addon.dispose();
- }
-});
diff --git a/toolkit/components/perfmonitoring/tests/browser/browser_compartments.html b/toolkit/components/perfmonitoring/tests/browser/browser_compartments.html
deleted file mode 100644
index d7ee6c4189..0000000000
--- a/toolkit/components/perfmonitoring/tests/browser/browser_compartments.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>
- Main frame for test browser_compartments.js
- </title>
-</head>
-<body>
-Main frame.
-
-<iframe src="browser_compartments_frame.html?frame=1">
- Subframe 1
-</iframe>
-
-<iframe src="browser_compartments_frame.html?frame=2">
- Subframe 2.
-</iframe>
-
-</body>
-</html>
diff --git a/toolkit/components/perfmonitoring/tests/browser/browser_compartments.js b/toolkit/components/perfmonitoring/tests/browser/browser_compartments.js
deleted file mode 100644
index f04fefb339..0000000000
--- a/toolkit/components/perfmonitoring/tests/browser/browser_compartments.js
+++ /dev/null
@@ -1,312 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-/**
- * Test that we see jank that takes place in a webpage,
- * and that jank from several iframes are actually charged
- * to the top window.
- */
-Cu.import("resource://gre/modules/PerformanceStats.jsm", this);
-Cu.import("resource://gre/modules/Services.jsm", this);
-Cu.import("resource://testing-common/ContentTask.jsm", this);
-
-
-const URL = "http://example.com/browser/toolkit/components/perfmonitoring/tests/browser/browser_compartments.html?test=" + Math.random();
-const PARENT_TITLE = `Main frame for test browser_compartments.js ${Math.random()}`;
-const FRAME_TITLE = `Subframe for test browser_compartments.js ${Math.random()}`;
-
-const PARENT_PID = Services.appinfo.processID;
-
-// This function is injected as source as a frameScript
-function frameScript() {
- try {
- "use strict";
-
- const { utils: Cu, classes: Cc, interfaces: Ci } = Components;
- Cu.import("resource://gre/modules/PerformanceStats.jsm");
- Cu.import("resource://gre/modules/Services.jsm");
-
- // Make sure that the stopwatch is now active.
- let monitor = PerformanceStats.getMonitor(["jank", "cpow", "ticks", "compartments"]);
-
- addMessageListener("compartments-test:getStatistics", () => {
- try {
- monitor.promiseSnapshot().then(snapshot => {
- sendAsyncMessage("compartments-test:getStatistics", {snapshot, pid: Services.appinfo.processID});
- });
- } catch (ex) {
- Cu.reportError("Error in content (getStatistics): " + ex);
- Cu.reportError(ex.stack);
- }
- });
-
- addMessageListener("compartments-test:setTitles", titles => {
- try {
- content.document.title = titles.data.parent;
- for (let i = 0; i < content.frames.length; ++i) {
- content.frames[i].postMessage({title: titles.data.frames}, "*");
- }
- console.log("content", "Done setting titles", content.document.title);
- sendAsyncMessage("compartments-test:setTitles");
- } catch (ex) {
- Cu.reportError("Error in content (setTitles): " + ex);
- Cu.reportError(ex.stack);
- }
- });
- } catch (ex) {
- Cu.reportError("Error in content (setup): " + ex);
- Cu.reportError(ex.stack);
- }
-}
-
-// A variant of `Assert` that doesn't spam the logs
-// in case of success.
-var SilentAssert = {
- equal: function(a, b, msg) {
- if (a == b) {
- return;
- }
- Assert.equal(a, b, msg);
- },
- notEqual: function(a, b, msg) {
- if (a != b) {
- return;
- }
- Assert.notEqual(a, b, msg);
- },
- ok: function(a, msg) {
- if (a) {
- return;
- }
- Assert.ok(a, msg);
- },
- leq: function(a, b, msg) {
- this.ok(a <= b, `${msg}: ${a} <= ${b}`);
- }
-};
-
-var isShuttingDown = false;
-function monotinicity_tester(source, testName) {
- // In the background, check invariants:
- // - numeric data can only ever increase;
- // - the name, addonId, isSystem of a component never changes;
- // - the name, addonId, isSystem of the process data;
- // - there is at most one component with a combination of `name` and `addonId`;
- // - types, etc.
- let previous = {
- processData: null,
- componentsMap: new Map(),
- };
-
- let sanityCheck = function(prev, next) {
- if (prev == null) {
- return;
- }
- for (let k of ["groupId", "addonId", "isSystem"]) {
- SilentAssert.equal(prev[k], next[k], `Sanity check (${testName}): ${k} hasn't changed (${prev.name}).`);
- }
- for (let [probe, k] of [
- ["jank", "totalUserTime"],
- ["jank", "totalSystemTime"],
- ["cpow", "totalCPOWTime"],
- ["ticks", "ticks"]
- ]) {
- SilentAssert.equal(typeof next[probe][k], "number", `Sanity check (${testName}): ${k} is a number.`);
- SilentAssert.leq(prev[probe][k], next[probe][k], `Sanity check (${testName}): ${k} is monotonic.`);
- SilentAssert.leq(0, next[probe][k], `Sanity check (${testName}): ${k} is >= 0.`)
- }
- SilentAssert.equal(prev.jank.durations.length, next.jank.durations.length);
- for (let i = 0; i < next.jank.durations.length; ++i) {
- SilentAssert.ok(typeof next.jank.durations[i] == "number" && next.jank.durations[i] >= 0,
- `Sanity check (${testName}): durations[${i}] is a non-negative number.`);
- SilentAssert.leq(prev.jank.durations[i], next.jank.durations[i],
- `Sanity check (${testName}): durations[${i}] is monotonic.`);
- }
- for (let i = 0; i < next.jank.durations.length - 1; ++i) {
- SilentAssert.leq(next.jank.durations[i + 1], next.jank.durations[i],
- `Sanity check (${testName}): durations[${i}] >= durations[${i + 1}].`)
- }
- };
- let iteration = 0;
- let frameCheck = Task.async(function*() {
- if (isShuttingDown) {
- window.clearInterval(interval);
- return;
- }
- let name = `${testName}: ${iteration++}`;
- let result = yield source();
- if (!result) {
- // This can happen at the end of the test when we attempt
- // to communicate too late with the content process.
- window.clearInterval(interval);
- return;
- }
- let {pid, snapshot} = result;
-
- // Sanity check on the process data.
- sanityCheck(previous.processData, snapshot.processData);
- SilentAssert.equal(snapshot.processData.isSystem, true);
- SilentAssert.equal(snapshot.processData.name, "<process>");
- SilentAssert.equal(snapshot.processData.addonId, "");
- SilentAssert.equal(snapshot.processData.processId, pid);
- previous.procesData = snapshot.processData;
-
- // Sanity check on components data.
- let map = new Map();
- for (let item of snapshot.componentsData) {
- for (let [probe, k] of [
- ["jank", "totalUserTime"],
- ["jank", "totalSystemTime"],
- ["cpow", "totalCPOWTime"]
- ]) {
- // Note that we cannot expect components data to be always smaller
- // than process data, as `getrusage` & co are not monotonic.
- SilentAssert.leq(item[probe][k], 3 * snapshot.processData[probe][k],
- `Sanity check (${name}): ${k} of component is not impossibly larger than that of process`);
- }
-
- let isCorrectPid = (item.processId == pid && !item.isChildProcess)
- || (item.processId != pid && item.isChildProcess);
- SilentAssert.ok(isCorrectPid, `Pid check (${name}): the item comes from the right process`);
-
- let key = item.groupId;
- if (map.has(key)) {
- let old = map.get(key);
- Assert.ok(false, `Component ${key} has already been seen. Latest: ${item.addonId||item.name}, previous: ${old.addonId||old.name}`);
- }
- map.set(key, item);
- }
- for (let item of snapshot.componentsData) {
- if (!item.parentId) {
- continue;
- }
- let parent = map.get(item.parentId);
- SilentAssert.ok(parent, `The parent exists ${item.parentId}`);
-
- for (let [probe, k] of [
- ["jank", "totalUserTime"],
- ["jank", "totalSystemTime"],
- ["cpow", "totalCPOWTime"]
- ]) {
- // Note that we cannot expect components data to be always smaller
- // than parent data, as `getrusage` & co are not monotonic.
- SilentAssert.leq(item[probe][k], 2 * parent[probe][k],
- `Sanity check (${testName}): ${k} of component is not impossibly larger than that of parent`);
- }
- }
- for (let [key, item] of map) {
- sanityCheck(previous.componentsMap.get(key), item);
- previous.componentsMap.set(key, item);
- }
- });
- let interval = window.setInterval(frameCheck, 300);
- registerCleanupFunction(() => {
- window.clearInterval(interval);
- });
-}
-
-add_task(function* test() {
- let monitor = PerformanceStats.getMonitor(["jank", "cpow", "ticks"]);
-
- info("Extracting initial state");
- let stats0 = yield monitor.promiseSnapshot();
- Assert.notEqual(stats0.componentsData.length, 0, "There is more than one component");
- Assert.ok(!stats0.componentsData.find(stat => stat.name.indexOf(URL) != -1),
- "The url doesn't appear yet");
-
- let newTab = gBrowser.addTab();
- let browser = newTab.linkedBrowser;
- // Setup monitoring in the tab
- info("Setting up monitoring in the tab");
- yield ContentTask.spawn(newTab.linkedBrowser, null, frameScript);
-
- info("Opening URL");
- newTab.linkedBrowser.loadURI(URL);
-
- if (Services.sysinfo.getPropertyAsAString("name") == "Windows_NT") {
- info("Deactivating sanity checks under Windows (bug 1151240)");
- } else {
- info("Setting up sanity checks");
- monotinicity_tester(() => monitor.promiseSnapshot().then(snapshot => ({snapshot, pid: PARENT_PID})), "parent process");
- monotinicity_tester(() => promiseContentResponseOrNull(browser, "compartments-test:getStatistics", null), "content process" );
- }
-
- let skipTotalUserTime = hasLowPrecision();
-
-
- while (true) {
- yield new Promise(resolve => setTimeout(resolve, 100));
-
- // We may have race conditions with DOM loading.
- // Don't waste too much brainpower here, let's just ask
- // repeatedly for the title to be changed, until this works.
- info("Setting titles");
- yield promiseContentResponse(browser, "compartments-test:setTitles", {
- parent: PARENT_TITLE,
- frames: FRAME_TITLE
- });
- info("Titles set");
-
- let {snapshot: stats} = (yield promiseContentResponse(browser, "compartments-test:getStatistics", null));
-
- // Attach titles to components.
- let titles = [];
- let map = new Map();
- let windows = Services.wm.getEnumerator("navigator:browser");
- while (windows.hasMoreElements()) {
- let window = windows.getNext();
- let tabbrowser = window.gBrowser;
- for (let browser of tabbrowser.browsers) {
- let id = browser.outerWindowID; // May be `null` if the browser isn't loaded yet
- if (id != null) {
- map.set(id, browser);
- }
- }
- }
- for (let stat of stats.componentsData) {
- if (!stat.windowId) {
- continue;
- }
- let browser = map.get(stat.windowId);
- if (!browser) {
- continue;
- }
- let title = browser.contentTitle;
- if (title) {
- stat.title = title;
- titles.push(title);
- }
- }
-
- // While the webpage consists in three compartments, we should see only
- // one `PerformanceData` in `componentsData`. Its `name` is undefined
- // (could be either the main frame or one of its subframes), but its
- // `title` should be the title of the main frame.
- info(`Searching for frame title '${FRAME_TITLE}' in ${JSON.stringify(titles)} (I hope not to find it)`);
- Assert.ok(!titles.includes(FRAME_TITLE), "Searching by title, the frames don't show up in the list of components");
-
- info(`Searching for window title '${PARENT_TITLE}' in ${JSON.stringify(titles)} (I hope to find it)`);
- let parent = stats.componentsData.find(x => x.title == PARENT_TITLE);
- if (!parent) {
- info("Searching by title, we didn't find the main frame");
- continue;
- }
- info("Found the main frame");
-
- if (skipTotalUserTime) {
- info("Not looking for total user time on this platform, we're done");
- break;
- } else if (parent.jank.totalUserTime > 1000) {
- info("Enough CPU time detected, we're done");
- break;
- } else {
- info(`Not enough CPU time detected: ${parent.jank.totalUserTime}`);
- }
- }
- isShuttingDown = true;
-
- // Cleanup
- gBrowser.removeTab(newTab, {skipPermitUnload: true});
-});
diff --git a/toolkit/components/perfmonitoring/tests/browser/browser_compartments_frame.html b/toolkit/components/perfmonitoring/tests/browser/browser_compartments_frame.html
deleted file mode 100644
index 69edfe871b..0000000000
--- a/toolkit/components/perfmonitoring/tests/browser/browser_compartments_frame.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>
- Subframe for test browser_compartments.html (do not change this title)
- </title>
- <script src="browser_compartments_script.js"></script>
-</head>
-<body>
-Subframe loaded.
-</body>
-</html>
diff --git a/toolkit/components/perfmonitoring/tests/browser/browser_compartments_script.js b/toolkit/components/perfmonitoring/tests/browser/browser_compartments_script.js
deleted file mode 100644
index 3d5f7114f6..0000000000
--- a/toolkit/components/perfmonitoring/tests/browser/browser_compartments_script.js
+++ /dev/null
@@ -1,29 +0,0 @@
-
-var carryOn = true;
-
-window.addEventListener("message", e => {
- console.log("frame content", "message", e);
- if ("title" in e.data) {
- document.title = e.data.title;
- }
- if ("stop" in e.data) {
- carryOn = false;
- }
-});
-
-// Use some CPU.
-var interval = window.setInterval(() => {
- if (!carryOn) {
- window.clearInterval(interval);
- return;
- }
-
- // Compute an arbitrary value, print it out to make sure that the JS
- // engine doesn't discard all our computation.
- var date = Date.now();
- var array = [];
- var i = 0;
- while (Date.now() - date <= 100) {
- array[i%2] = i++;
- }
-}, 300);
diff --git a/toolkit/components/perfmonitoring/tests/browser/browser_webpagePerformanceAlerts.js b/toolkit/components/perfmonitoring/tests/browser/browser_webpagePerformanceAlerts.js
deleted file mode 100644
index eb908c8dbf..0000000000
--- a/toolkit/components/perfmonitoring/tests/browser/browser_webpagePerformanceAlerts.js
+++ /dev/null
@@ -1,111 +0,0 @@
-"use strict";
-
-/**
- * Tests for PerformanceWatcher watching slow web pages.
- */
-
- /**
- * Simulate a slow webpage.
- */
-function WebpageBurner() {
- CPUBurner.call(this, "http://example.com/browser/toolkit/components/perfmonitoring/tests/browser/browser_compartments.html?test=" + Math.random(), 300000);
-}
-WebpageBurner.prototype = Object.create(CPUBurner.prototype);
-WebpageBurner.prototype.promiseBurnContentCPU = function() {
- return promiseContentResponse(this._browser, "test-performance-watcher:burn-content-cpu", {});
-};
-
-function WebpageListener(windowId, accept) {
- info(`Creating WebpageListener for ${windowId}`);
- AlertListener.call(this, accept, {
- register: () => PerformanceWatcher.addPerformanceListener({windowId}, this.listener),
- unregister: () => PerformanceWatcher.removePerformanceListener({windowId}, this.listener)
- });
-}
-WebpageListener.prototype = Object.create(AlertListener.prototype);
-
-add_task(function* init() {
- // Get rid of buffering.
- let service = Cc["@mozilla.org/toolkit/performance-stats-service;1"].getService(
- Ci.nsIPerformanceStatsService);
- let oldDelay = service.jankAlertBufferingDelay;
-
- service.jankAlertBufferingDelay = 0 /* ms */;
- registerCleanupFunction(() => {
- info("Cleanup");
- service.jankAlertBufferingDelay = oldDelay;
- });
-});
-
-add_task(function* test_open_window_then_watch_it() {
- let burner = new WebpageBurner();
- yield burner.promiseInitialized;
- yield burner.promiseBurnContentCPU();
-
- info(`Check that burning CPU triggers the real listener, but not the fake listener`);
- let realListener = new WebpageListener(burner.windowId, (group, details) => {
- info(`test: realListener for ${burner.tab.linkedBrowser.outerWindowID}: ${group}, ${details}\n`);
- Assert.equal(group.windowId, burner.windowId, "We should not receive data meant for another group");
- return details;
- }); // This listener should be triggered.
-
- info(`Creating fake burner`);
- let otherTab = gBrowser.addTab();
- 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 =>
- alerts.find(alert => alert.source.windowId == burner.windowId)
- );
-
- // Waiting a little – listeners are buffered.
- yield new Promise(resolve => setTimeout(resolve, 100));
-
- yield burner.run("promiseBurnContentCPU", 20, realListener);
- Assert.ok(realListener.triggered, `1. The real listener was triggered`);
- Assert.ok(universalListener.triggered, `1. The universal listener was triggered`);
- Assert.ok(!fakeListener.triggered, `1. The fake listener was not triggered`);
-
- if (realListener.result) {
- Assert.ok(realListener.result.highestJank >= 300, `1. jank is at least 300ms (${realListener.result.highestJank}ms)`);
- }
-
- info(`Attempting to remove a performance listener incorrectly, check that this does not hurt our real listener`);
- Assert.throws(() => PerformanceWatcher.removePerformanceListener({addonId: addon.addonId}, () => {}));
- Assert.throws(() => PerformanceWatcher.removePerformanceListener({addonId: addon.addonId + "-unbound-id-" + Math.random()}, realListener.listener));
-
- // Waiting a little – listeners are buffered.
- yield new Promise(resolve => setTimeout(resolve, 100));
- yield burner.run("promiseBurnContentCPU", 20, realListener);
- // Waiting a little – listeners are buffered.
- yield new Promise(resolve => setTimeout(resolve, 100));
-
- Assert.ok(realListener.triggered, `2. The real listener was triggered`);
- Assert.ok(universalListener.triggered, `2. The universal listener was triggered`);
- Assert.ok(!fakeListener.triggered, `2. The fake listener was not triggered`);
- if (realListener.result) {
- Assert.ok(realListener.result.highestJank >= 300, `2. jank is at least 300ms (${realListener.jank}ms)`);
- }
-
- info(`Attempting to remove correctly, check if the listener is still triggered`);
- // Waiting a little – listeners are buffered.
- yield new Promise(resolve => setTimeout(resolve, 100));
- realListener.unregister();
-
- // Waiting a little – listeners are buffered.
- yield new Promise(resolve => setTimeout(resolve, 100));
- yield burner.run("promiseBurnContentCPU", 3, realListener);
- Assert.ok(!realListener.triggered, `3. After being unregistered, the real listener was not triggered`);
- Assert.ok(universalListener.triggered, `3. The universal listener is still triggered`);
-
- universalListener.unregister();
-
- // Waiting a little – listeners are buffered.
- yield new Promise(resolve => setTimeout(resolve, 100));
- yield burner.run("promiseBurnContentCPU", 3, realListener);
- Assert.ok(!universalListener.triggered, `4. After being unregistered, the universal listener is not triggered`);
-
- fakeListener.unregister();
- burner.dispose();
- gBrowser.removeTab(otherTab);
-});
diff --git a/toolkit/components/perfmonitoring/tests/browser/head.js b/toolkit/components/perfmonitoring/tests/browser/head.js
deleted file mode 100644
index 92258fd1b9..0000000000
--- a/toolkit/components/perfmonitoring/tests/browser/head.js
+++ /dev/null
@@ -1,287 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-var { utils: Cu, interfaces: Ci, classes: Cc } = Components;
-
-Cu.import("resource://gre/modules/Promise.jsm", this);
-Cu.import("resource://gre/modules/AddonManager.jsm", this);
-Cu.import("resource://gre/modules/AddonWatcher.jsm", this);
-Cu.import("resource://gre/modules/PerformanceWatcher.jsm", this);
-Cu.import("resource://gre/modules/Services.jsm", this);
-Cu.import("resource://testing-common/ContentTaskUtils.jsm", this);
-
-/**
- * Base class for simulating slow addons/webpages.
- */
-function CPUBurner(url, jankThreshold) {
- info(`CPUBurner: Opening tab for ${url}\n`);
- this.url = url;
- this.tab = gBrowser.addTab(url);
- this.jankThreshold = jankThreshold;
- let browser = this.tab.linkedBrowser;
- this._browser = browser;
- ContentTask.spawn(this._browser, null, CPUBurner.frameScript);
- this.promiseInitialized = BrowserTestUtils.browserLoaded(browser);
-}
-CPUBurner.prototype = {
- get windowId() {
- return this._browser.outerWindowID;
- },
- /**
- * Burn CPU until it triggers a listener with the specified jank threshold.
- */
- run: Task.async(function*(burner, max, listener) {
- listener.reset();
- for (let i = 0; i < max; ++i) {
- yield new Promise(resolve => setTimeout(resolve, 50));
- try {
- yield this[burner]();
- } catch (ex) {
- return false;
- }
- if (listener.triggered && listener.result >= this.jankThreshold) {
- return true;
- }
- }
- return false;
- }),
- dispose: function() {
- info(`CPUBurner: Closing tab for ${this.url}\n`);
- gBrowser.removeTab(this.tab);
- }
-};
-// This function is injected in all frames
-CPUBurner.frameScript = function() {
- try {
- "use strict";
-
- const { utils: Cu, classes: Cc, interfaces: Ci } = Components;
- let sandboxes = new Map();
- let getSandbox = function(addonId) {
- let sandbox = sandboxes.get(addonId);
- if (!sandbox) {
- sandbox = Components.utils.Sandbox(Services.scriptSecurityManager.getSystemPrincipal(), { addonId });
- sandboxes.set(addonId, sandbox);
- }
- return sandbox;
- };
-
- let burnCPU = function() {
- var start = Date.now();
- var ignored = [];
- while (Date.now() - start < 500) {
- ignored[ignored.length % 2] = ignored.length;
- }
- };
- let burnCPUInSandbox = function(addonId) {
- let sandbox = getSandbox(addonId);
- Cu.evalInSandbox(burnCPU.toSource() + "()", sandbox);
- };
-
- {
- let topic = "test-performance-watcher:burn-content-cpu";
- addMessageListener(topic, function(msg) {
- try {
- if (msg.data && msg.data.addonId) {
- burnCPUInSandbox(msg.data.addonId);
- } else {
- burnCPU();
- }
- sendAsyncMessage(topic, {});
- } catch (ex) {
- dump(`This is the content attempting to burn CPU: error ${ex}\n`);
- dump(`${ex.stack}\n`);
- }
- });
- }
-
- // Bind the function to the global context or it might be GC'd during test
- // causing failures (bug 1230027)
- this.burnCPOWInSandbox = function(addonId) {
- try {
- burnCPUInSandbox(addonId);
- } catch (ex) {
- dump(`This is the addon attempting to burn CPOW: error ${ex}\n`);
- dump(`${ex.stack}\n`);
- }
- }
-
- sendAsyncMessage("test-performance-watcher:cpow-init", {}, {
- burnCPOWInSandbox: this.burnCPOWInSandbox
- });
-
- } catch (ex) {
- Cu.reportError("This is the addon: error " + ex);
- Cu.reportError(ex.stack);
- }
-};
-
-/**
- * Base class for listening to slow group alerts
- */
-function AlertListener(accept, {register, unregister}) {
- this.listener = (...args) => {
- if (this._unregistered) {
- throw new Error("Listener was unregistered");
- }
- let result = accept(...args);
- if (!result) {
- return;
- }
- this.result = result;
- this.triggered = true;
- return;
- };
- this.triggered = false;
- this.result = null;
- this._unregistered = false;
- this._unregister = unregister;
- registerCleanupFunction(() => {
- this.unregister();
- });
- register();
-}
-AlertListener.prototype = {
- unregister: function() {
- this.reset();
- if (this._unregistered) {
- info(`head.js: No need to unregister, we're already unregistered.\n`);
- return;
- }
- info(`head.js: Unregistering listener.\n`);
- this._unregistered = true;
- this._unregister();
- info(`head.js: Unregistration complete.\n`);
- },
- reset: function() {
- this.triggered = false;
- this.result = null;
- },
-};
-
-/**
- * Simulate a slow add-on.
- */
-function AddonBurner(addonId = "fake add-on id: " + Math.random()) {
- this.jankThreshold = 200000;
- CPUBurner.call(this, `http://example.com/?uri=${addonId}`, this.jankThreshold);
- this._addonId = addonId;
- this._sandbox = Components.utils.Sandbox(Services.scriptSecurityManager.getSystemPrincipal(), { addonId: this._addonId });
- this._CPOWBurner = null;
-
- this._promiseCPOWBurner = new Promise(resolve => {
- this._browser.messageManager.addMessageListener("test-performance-watcher:cpow-init", msg => {
- // Note that we cannot resolve Promises with CPOWs now that they
- // have been outlawed in bug 1233497, so we stash it in the
- // AddonBurner instance instead.
- this._CPOWBurner = msg.objects.burnCPOWInSandbox;
- resolve();
- });
- });
-}
-AddonBurner.prototype = Object.create(CPUBurner.prototype);
-Object.defineProperty(AddonBurner.prototype, "addonId", {
- get: function() {
- return this._addonId;
- }
-});
-
-/**
- * Simulate slow code being executed by the add-on in the chrome.
- */
-AddonBurner.prototype.burnCPU = function() {
- Cu.evalInSandbox(AddonBurner.burnCPU.toSource() + "()", this._sandbox);
-};
-
-/**
- * Simulate slow code being executed by the add-on in a CPOW.
- */
-AddonBurner.prototype.promiseBurnCPOW = Task.async(function*() {
- yield this._promiseCPOWBurner;
- ok(this._CPOWBurner, "Got the CPOW burner");
- let burner = this._CPOWBurner;
- info("Parent: Preparing to burn CPOW");
- try {
- yield burner(this._addonId);
- info("Parent: Done burning CPOW");
- } catch (ex) {
- info(`Parent: Error burning CPOW: ${ex}\n`);
- info(ex.stack + "\n");
- }
-});
-
-/**
- * Simulate slow code being executed by the add-on in the content.
- */
-AddonBurner.prototype.promiseBurnContentCPU = function() {
- return promiseContentResponse(this._browser, "test-performance-watcher:burn-content-cpu", {addonId: this._addonId});
-};
-AddonBurner.burnCPU = function() {
- var start = Date.now();
- var ignored = [];
- while (Date.now() - start < 500) {
- ignored[ignored.length % 2] = ignored.length;
- }
-};
-
-
-function AddonListener(addonId, accept) {
- let target = {addonId};
- AlertListener.call(this, accept, {
- register: () => {
- info(`AddonListener: registering ${JSON.stringify(target, null, "\t")}`);
- PerformanceWatcher.addPerformanceListener({addonId}, this.listener);
- },
- unregister: () => {
- info(`AddonListener: unregistering ${JSON.stringify(target, null, "\t")}`);
- PerformanceWatcher.removePerformanceListener({addonId}, this.listener);
- }
- });
-}
-AddonListener.prototype = Object.create(AlertListener.prototype);
-
-function promiseContentResponse(browser, name, message) {
- let mm = browser.messageManager;
- let promise = new Promise(resolve => {
- function removeListener() {
- mm.removeMessageListener(name, listener);
- }
-
- function listener(msg) {
- removeListener();
- resolve(msg.data);
- }
-
- mm.addMessageListener(name, listener);
- registerCleanupFunction(removeListener);
- });
- mm.sendAsyncMessage(name, message);
- return promise;
-}
-function promiseContentResponseOrNull(browser, name, message) {
- if (!browser.messageManager) {
- return null;
- }
- return promiseContentResponse(browser, name, message);
-}
-
-/**
- * `true` if we are running an OS in which the OS performance
- * clock has a low precision and might unpredictably
- * never be updated during the execution of the test.
- */
-function hasLowPrecision() {
- let [sysName, sysVersion] = [Services.sysinfo.getPropertyAsAString("name"), Services.sysinfo.getPropertyAsDouble("version")];
- info(`Running ${sysName} version ${sysVersion}`);
-
- if (sysName == "Windows_NT" && sysVersion < 6) {
- info("Running old Windows, need to deactivate tests due to bad precision.");
- return true;
- }
- if (sysName == "Linux" && sysVersion <= 2.6) {
- info("Running old Linux, need to deactivate tests due to bad precision.");
- return true;
- }
- info("This platform has good precision.")
- return false;
-}
diff --git a/toolkit/components/perfmonitoring/tests/browser/install.rdf b/toolkit/components/perfmonitoring/tests/browser/install.rdf
deleted file mode 100644
index 65add014f6..0000000000
--- a/toolkit/components/perfmonitoring/tests/browser/install.rdf
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:em="http://www.mozilla.org/2004/em-rdf#">
- <Description about="urn:mozilla:install-manifest">
- <em:id>addonwatcher-test@mozilla.com</em:id>
- <em:version>1.0</em:version>
-
- <em:targetApplication>
- <Description>
- <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
- <em:minVersion>0.3</em:minVersion>
- <em:maxVersion>*</em:maxVersion>
- </Description>
- </em:targetApplication>
-
- <em:targetApplication>
- <Description>
- <em:id>toolkit@mozilla.org</em:id>
- <em:minVersion>1</em:minVersion>
- <em:maxVersion>*</em:maxVersion>
- </Description>
- </em:targetApplication>
-
- <em:bootstrap>true</em:bootstrap>
-
- <em:name>Sample for browser_AddonWatcher.js</em:name>
-
- </Description>
-</RDF>
diff --git a/toolkit/components/places/moz.build b/toolkit/components/places/moz.build
index 478b18e02f..0d0ea77682 100644
--- a/toolkit/components/places/moz.build
+++ b/toolkit/components/places/moz.build
@@ -4,9 +4,6 @@
# 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/.
-if CONFIG['MOZ_PLACES']:
- TEST_DIRS += ['tests']
-
XPIDL_SOURCES += [
'nsINavHistoryService.idl',
]
@@ -93,8 +90,5 @@ if CONFIG['MOZ_PLACES']:
include('/ipc/chromium/chromium-config.mozbuild')
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'Places')
-
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wno-error=shadow']
diff --git a/toolkit/components/places/tests/.eslintrc.js b/toolkit/components/places/tests/.eslintrc.js
deleted file mode 100644
index d5283c9665..0000000000
--- a/toolkit/components/places/tests/.eslintrc.js
+++ /dev/null
@@ -1,9 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../testing/mochitest/mochitest.eslintrc.js",
- "../../../../testing/mochitest/chrome.eslintrc.js",
- "../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/places/tests/PlacesTestUtils.jsm b/toolkit/components/places/tests/PlacesTestUtils.jsm
deleted file mode 100644
index 36e425cae8..0000000000
--- a/toolkit/components/places/tests/PlacesTestUtils.jsm
+++ /dev/null
@@ -1,163 +0,0 @@
-"use strict";
-
-this.EXPORTED_SYMBOLS = [
- "PlacesTestUtils",
-];
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-Cu.importGlobalProperties(["URL"]);
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Task",
- "resource://gre/modules/Task.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
- "resource://gre/modules/PlacesUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
- "resource://gre/modules/NetUtil.jsm");
-
-this.PlacesTestUtils = Object.freeze({
- /**
- * Asynchronously adds visits to a page.
- *
- * @param aPlaceInfo
- * Can be an nsIURI, in such a case a single LINK visit will be added.
- * Otherwise can be an object describing the visit to add, or an array
- * of these objects:
- * { uri: nsIURI of the page,
- * [optional] transition: one of the TRANSITION_* from nsINavHistoryService,
- * [optional] title: title of the page,
- * [optional] visitDate: visit date, either in microseconds from the epoch or as a date object
- * [optional] referrer: nsIURI of the referrer for this visit
- * }
- *
- * @return {Promise}
- * @resolves When all visits have been added successfully.
- * @rejects JavaScript exception.
- */
- addVisits: Task.async(function* (placeInfo) {
- let places = [];
- let infos = [];
-
- if (placeInfo instanceof Ci.nsIURI ||
- placeInfo instanceof URL ||
- typeof placeInfo == "string") {
- places.push({ uri: placeInfo });
- }
- else if (Array.isArray(placeInfo)) {
- places = places.concat(placeInfo);
- } else if (typeof placeInfo == "object" && placeInfo.uri) {
- places.push(placeInfo)
- } else {
- throw new Error("Unsupported type passed to addVisits");
- }
-
- // Create a PageInfo for each entry.
- for (let place of places) {
- let info = {url: place.uri};
- info.title = (typeof place.title === "string") ? place.title : "test visit for " + info.url.spec ;
- if (typeof place.referrer == "string") {
- place.referrer = NetUtil.newURI(place.referrer);
- } else if (place.referrer && place.referrer instanceof URL) {
- place.referrer = NetUtil.newURI(place.referrer.href);
- }
- let visitDate = place.visitDate;
- if (visitDate) {
- if (!(visitDate instanceof Date)) {
- visitDate = PlacesUtils.toDate(visitDate);
- }
- } else {
- visitDate = new Date();
- }
- info.visits = [{
- transition: place.transition,
- date: visitDate,
- referrer: place.referrer
- }];
- infos.push(info);
- }
- return PlacesUtils.history.insertMany(infos);
- }),
-
- /**
- * Clear all history.
- *
- * @return {Promise}
- * @resolves When history was cleared successfully.
- * @rejects JavaScript exception.
- */
- clearHistory() {
- let expirationFinished = new Promise(resolve => {
- Services.obs.addObserver(function observe(subj, topic, data) {
- Services.obs.removeObserver(observe, topic);
- resolve();
- }, PlacesUtils.TOPIC_EXPIRATION_FINISHED, false);
- });
-
- return Promise.all([expirationFinished, PlacesUtils.history.clear()]);
- },
-
- /**
- * Waits for all pending async statements on the default connection.
- *
- * @return {Promise}
- * @resolves When all pending async statements finished.
- * @rejects Never.
- *
- * @note The result is achieved by asynchronously executing a query requiring
- * a write lock. Since all statements on the same connection are
- * serialized, the end of this write operation means that all writes are
- * complete. Note that WAL makes so that writers don't block readers, but
- * this is a problem only across different connections.
- */
- promiseAsyncUpdates() {
- return PlacesUtils.withConnectionWrapper("promiseAsyncUpdates", Task.async(function* (db) {
- try {
- yield db.executeCached("BEGIN EXCLUSIVE");
- yield db.executeCached("COMMIT");
- } catch (ex) {
- // If we fail to start a transaction, it's because there is already one.
- // In such a case we should not try to commit the existing transaction.
- }
- }));
- },
-
- /**
- * Asynchronously checks if an address is found in the database.
- * @param aURI
- * nsIURI or address to look for.
- *
- * @return {Promise}
- * @resolves Returns true if the page is found.
- * @rejects JavaScript exception.
- */
- isPageInDB: Task.async(function* (aURI) {
- let url = aURI instanceof Ci.nsIURI ? aURI.spec : aURI;
- let db = yield PlacesUtils.promiseDBConnection();
- let rows = yield db.executeCached(
- "SELECT id FROM moz_places WHERE url_hash = hash(:url) AND url = :url",
- { url });
- return rows.length > 0;
- }),
-
- /**
- * Asynchronously checks how many visits exist for a specified page.
- * @param aURI
- * nsIURI or address to look for.
- *
- * @return {Promise}
- * @resolves Returns the number of visits found.
- * @rejects JavaScript exception.
- */
- visitsInDB: Task.async(function* (aURI) {
- let url = aURI instanceof Ci.nsIURI ? aURI.spec : aURI;
- let db = yield PlacesUtils.promiseDBConnection();
- let rows = yield db.executeCached(
- `SELECT count(*) FROM moz_historyvisits v
- JOIN moz_places h ON h.id = v.place_id
- WHERE url_hash = hash(:url) AND url = :url`,
- { url });
- return rows[0].getResultByIndex(0);
- })
-});
diff --git a/toolkit/components/places/tests/bookmarks/.eslintrc.js b/toolkit/components/places/tests/bookmarks/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/places/tests/bookmarks/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/places/tests/bookmarks/head_bookmarks.js b/toolkit/components/places/tests/bookmarks/head_bookmarks.js
deleted file mode 100644
index 842a66b313..0000000000
--- a/toolkit/components/places/tests/bookmarks/head_bookmarks.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var Ci = Components.interfaces;
-var Cc = Components.classes;
-var Cr = Components.results;
-var Cu = Components.utils;
-
-Cu.import("resource://gre/modules/Services.jsm");
-
-// Import common head.
-{
- let commonFile = do_get_file("../head_common.js", false);
- let uri = Services.io.newFileURI(commonFile);
- Services.scriptloader.loadSubScript(uri.spec, this);
-}
-
-// Put any other stuff relative to this test folder below.
diff --git a/toolkit/components/places/tests/bookmarks/test_1016953-renaming-uncompressed.js b/toolkit/components/places/tests/bookmarks/test_1016953-renaming-uncompressed.js
deleted file mode 100644
index b6982987b5..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_1016953-renaming-uncompressed.js
+++ /dev/null
@@ -1,103 +0,0 @@
-function run_test() {
- run_next_test();
-}
-
-/* Bug 1016953 - When a previous bookmark backup exists with the same hash
-regardless of date, an automatic backup should attempt to either rename it to
-today's date if the backup was for an old date or leave it alone if it was for
-the same date. However if the file ext was json it will accidentally rename it
-to jsonlz4 while keeping the json contents
-*/
-
-add_task(function* test_same_date_same_hash() {
- // If old file has been created on the same date and has the same hash
- // the file should be left alone
- let backupFolder = yield PlacesBackups.getBackupFolder();
- // Save to profile dir to obtain hash and nodeCount to append to filename
- let tempPath = OS.Path.join(OS.Constants.Path.profileDir,
- "bug10169583_bookmarks.json");
- let {count, hash} = yield BookmarkJSONUtils.exportToFile(tempPath);
-
- // Save JSON file in backup folder with hash appended
- let dateObj = new Date();
- let filename = "bookmarks-" + PlacesBackups.toISODateString(dateObj) + "_" +
- count + "_" + hash + ".json";
- let backupFile = OS.Path.join(backupFolder, filename);
- yield OS.File.move(tempPath, backupFile);
-
- // Force a compressed backup which fallbacks to rename
- yield PlacesBackups.create();
- let mostRecentBackupFile = yield PlacesBackups.getMostRecentBackup();
- // check to ensure not renamed to jsonlz4
- Assert.equal(mostRecentBackupFile, backupFile);
- // inspect contents and check if valid json
- let converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"].
- createInstance(Ci.nsIScriptableUnicodeConverter);
- converter.charset = "UTF-8";
- let result = yield OS.File.read(mostRecentBackupFile);
- let jsonString = converter.convertFromByteArray(result, result.length);
- do_print("Check is valid JSON");
- JSON.parse(jsonString);
-
- // Cleanup
- yield OS.File.remove(backupFile);
- yield OS.File.remove(tempPath);
- PlacesBackups._backupFiles = null; // To force re-cache of backupFiles
-});
-
-add_task(function* test_same_date_diff_hash() {
- // If the old file has been created on the same date, but has a different hash
- // the existing file should be overwritten with the newer compressed version
- let backupFolder = yield PlacesBackups.getBackupFolder();
- let tempPath = OS.Path.join(OS.Constants.Path.profileDir,
- "bug10169583_bookmarks.json");
- let {count} = yield BookmarkJSONUtils.exportToFile(tempPath);
- let dateObj = new Date();
- let filename = "bookmarks-" + PlacesBackups.toISODateString(dateObj) + "_" +
- count + "_" + "differentHash==" + ".json";
- let backupFile = OS.Path.join(backupFolder, filename);
- yield OS.File.move(tempPath, backupFile);
- yield PlacesBackups.create(); // Force compressed backup
- mostRecentBackupFile = yield PlacesBackups.getMostRecentBackup();
-
- // Decode lz4 compressed file to json and check if json is valid
- let converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"].
- createInstance(Ci.nsIScriptableUnicodeConverter);
- converter.charset = "UTF-8";
- let result = yield OS.File.read(mostRecentBackupFile, { compression: "lz4" });
- let jsonString = converter.convertFromByteArray(result, result.length);
- do_print("Check is valid JSON");
- JSON.parse(jsonString);
-
- // Cleanup
- yield OS.File.remove(mostRecentBackupFile);
- yield OS.File.remove(tempPath);
- PlacesBackups._backupFiles = null; // To force re-cache of backupFiles
-});
-
-add_task(function* test_diff_date_same_hash() {
- // If the old file has been created on an older day but has the same hash
- // it should be renamed with today's date without altering the contents.
- let backupFolder = yield PlacesBackups.getBackupFolder();
- let tempPath = OS.Path.join(OS.Constants.Path.profileDir,
- "bug10169583_bookmarks.json");
- let {count, hash} = yield BookmarkJSONUtils.exportToFile(tempPath);
- let oldDate = new Date(2014, 1, 1);
- let curDate = new Date();
- let oldFilename = "bookmarks-" + PlacesBackups.toISODateString(oldDate) + "_" +
- count + "_" + hash + ".json";
- let newFilename = "bookmarks-" + PlacesBackups.toISODateString(curDate) + "_" +
- count + "_" + hash + ".json";
- let backupFile = OS.Path.join(backupFolder, oldFilename);
- let newBackupFile = OS.Path.join(backupFolder, newFilename);
- yield OS.File.move(tempPath, backupFile);
-
- // Ensure file has been renamed correctly
- yield PlacesBackups.create();
- let mostRecentBackupFile = yield PlacesBackups.getMostRecentBackup();
- Assert.equal(mostRecentBackupFile, newBackupFile);
-
- // Cleanup
- yield OS.File.remove(mostRecentBackupFile);
- yield OS.File.remove(tempPath);
-});
diff --git a/toolkit/components/places/tests/bookmarks/test_1017502-bookmarks_foreign_count.js b/toolkit/components/places/tests/bookmarks/test_1017502-bookmarks_foreign_count.js
deleted file mode 100644
index 13755e576e..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_1017502-bookmarks_foreign_count.js
+++ /dev/null
@@ -1,112 +0,0 @@
-/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/* Bug 1017502 - Add a foreign_count column to moz_places
-This tests, tests the triggers that adjust the foreign_count when a bookmark is
-added or removed and also the maintenance task to fix wrong counts.
-*/
-
-const T_URI = NetUtil.newURI("https://www.mozilla.org/firefox/nightly/firstrun/");
-
-function* getForeignCountForURL(conn, url) {
- yield PlacesTestUtils.promiseAsyncUpdates();
- url = url instanceof Ci.nsIURI ? url.spec : url;
- let rows = yield conn.executeCached(
- `SELECT foreign_count FROM moz_places WHERE url_hash = hash(:t_url)
- AND url = :t_url`, { t_url: url });
- return rows[0].getResultByName("foreign_count");
-}
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* add_remove_change_bookmark_test() {
- let conn = yield PlacesUtils.promiseDBConnection();
-
- // Simulate a visit to the url
- yield PlacesTestUtils.addVisits(T_URI);
- Assert.equal((yield getForeignCountForURL(conn, T_URI)), 0);
-
- // Add 1st bookmark which should increment foreign_count by 1
- let id1 = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- T_URI, PlacesUtils.bookmarks.DEFAULT_INDEX, "First Run");
- Assert.equal((yield getForeignCountForURL(conn, T_URI)), 1);
-
- // Add 2nd bookmark
- let id2 = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.bookmarksMenuFolderId,
- T_URI, PlacesUtils.bookmarks.DEFAULT_INDEX, "First Run");
- Assert.equal((yield getForeignCountForURL(conn, T_URI)), 2);
-
- // Remove 2nd bookmark which should decrement foreign_count by 1
- PlacesUtils.bookmarks.removeItem(id2);
- Assert.equal((yield getForeignCountForURL(conn, T_URI)), 1);
-
- // Change first bookmark's URI
- const URI2 = NetUtil.newURI("http://www.mozilla.org");
- PlacesUtils.bookmarks.changeBookmarkURI(id1, URI2);
- // Check foreign count for original URI
- Assert.equal((yield getForeignCountForURL(conn, T_URI)), 0);
- // Check foreign count for new URI
- Assert.equal((yield getForeignCountForURL(conn, URI2)), 1);
-
- // Cleanup - Remove changed bookmark
- let id = PlacesUtils.bookmarks.getBookmarkIdsForURI(URI2);
- PlacesUtils.bookmarks.removeItem(id);
- Assert.equal((yield getForeignCountForURL(conn, URI2)), 0);
-
-});
-
-add_task(function* maintenance_foreign_count_test() {
- let conn = yield PlacesUtils.promiseDBConnection();
-
- // Simulate a visit to the url
- yield PlacesTestUtils.addVisits(T_URI);
-
- // Adjust the foreign_count for the added entry to an incorrect value
- let deferred = Promise.defer();
- let stmt = DBConn().createAsyncStatement(
- `UPDATE moz_places SET foreign_count = 10 WHERE url_hash = hash(:t_url)
- AND url = :t_url `);
- stmt.params.t_url = T_URI.spec;
- stmt.executeAsync({
- handleCompletion: function() {
- deferred.resolve();
- }
- });
- stmt.finalize();
- yield deferred.promise;
- Assert.equal((yield getForeignCountForURL(conn, T_URI)), 10);
-
- // Run maintenance
- Components.utils.import("resource://gre/modules/PlacesDBUtils.jsm");
- let promiseMaintenanceFinished =
- promiseTopicObserved("places-maintenance-finished");
- PlacesDBUtils.maintenanceOnIdle();
- yield promiseMaintenanceFinished;
-
- // Check if the foreign_count has been adjusted to the correct value
- Assert.equal((yield getForeignCountForURL(conn, T_URI)), 0);
-});
-
-add_task(function* add_remove_tags_test() {
- let conn = yield PlacesUtils.promiseDBConnection();
-
- yield PlacesTestUtils.addVisits(T_URI);
- Assert.equal((yield getForeignCountForURL(conn, T_URI)), 0);
-
- // Check foreign count incremented by 1 for a single tag
- PlacesUtils.tagging.tagURI(T_URI, ["test tag"]);
- Assert.equal((yield getForeignCountForURL(conn, T_URI)), 1);
-
- // Check foreign count is incremented by 2 for two tags
- PlacesUtils.tagging.tagURI(T_URI, ["one", "two"]);
- Assert.equal((yield getForeignCountForURL(conn, T_URI)), 3);
-
- // Check foreign count is set to 0 when all tags are removed
- PlacesUtils.tagging.untagURI(T_URI, ["test tag", "one", "two"]);
- Assert.equal((yield getForeignCountForURL(conn, T_URI)), 0);
-});
diff --git a/toolkit/components/places/tests/bookmarks/test_1129529.js b/toolkit/components/places/tests/bookmarks/test_1129529.js
deleted file mode 100644
index da1ff708fa..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_1129529.js
+++ /dev/null
@@ -1,76 +0,0 @@
-var now = Date.now() * 1000;
-
-// Test that importing bookmark data where a bookmark has a tag longer than 100
-// chars imports everything except the tags for that bookmark.
-add_task(function* () {
- let aData = {
- guid: "root________",
- index: 0,
- id: 1,
- type: "text/x-moz-place-container",
- dateAdded: now,
- lastModified: now,
- root: "placesRoot",
- children: [{
- guid: "unfiled_____",
- index: 0,
- id: 2,
- type: "text/x-moz-place-container",
- dateAdded: now,
- lastModified: now,
- root: "unfiledBookmarksFolder",
- children: [
- {
- guid: "___guid1____",
- index: 0,
- id: 3,
- charset: "UTF-8",
- tags: "tag0",
- type: "text/x-moz-place",
- dateAdded: now,
- lastModified: now,
- uri: "http://test0.com/"
- },
- {
- guid: "___guid2____",
- index: 1,
- id: 4,
- charset: "UTF-8",
- tags: "tag1," + "a" + "0123456789".repeat(10), // 101 chars
- type: "text/x-moz-place",
- dateAdded: now,
- lastModified: now,
- uri: "http://test1.com/"
- },
- {
- guid: "___guid3____",
- index: 2,
- id: 5,
- charset: "UTF-8",
- tags: "tag2",
- type: "text/x-moz-place",
- dateAdded: now,
- lastModified: now,
- uri: "http://test2.com/"
- }
- ]
- }]
- };
-
- let contentType = "application/json";
- let uri = "data:" + contentType + "," + JSON.stringify(aData);
- yield BookmarkJSONUtils.importFromURL(uri, false);
-
- let [bookmarks] = yield PlacesBackups.getBookmarksTree();
- let unsortedBookmarks = bookmarks.children[2].children;
- Assert.equal(unsortedBookmarks.length, 3);
-
- for (let i = 0; i < unsortedBookmarks.length; ++i) {
- let bookmark = unsortedBookmarks[i];
- Assert.equal(bookmark.charset, "UTF-8");
- Assert.equal(bookmark.dateAdded, now);
- Assert.equal(bookmark.lastModified, now);
- Assert.equal(bookmark.uri, "http://test" + i + ".com/");
- Assert.equal(bookmark.tags, "tag" + i);
- }
-});
diff --git a/toolkit/components/places/tests/bookmarks/test_384228.js b/toolkit/components/places/tests/bookmarks/test_384228.js
deleted file mode 100644
index 9a52c97467..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_384228.js
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/**
- * test querying for bookmarks in multiple folders.
- */
-add_task(function* search_bookmark_in_folder() {
- let testFolder1 = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: "bug 384228 test folder 1"
- });
- Assert.equal(testFolder1.index, 0);
-
- let testFolder2 = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: "bug 384228 test folder 2"
- });
- Assert.equal(testFolder2.index, 1);
-
- let testFolder3 = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: "bug 384228 test folder 3"
- });
- Assert.equal(testFolder3.index, 2);
-
- let b1 = yield PlacesUtils.bookmarks.insert({
- parentGuid: testFolder1.guid,
- url: "http://foo.tld/",
- title: "title b1 (folder 1)"
- });
- Assert.equal(b1.index, 0);
-
- let b2 = yield PlacesUtils.bookmarks.insert({
- parentGuid: testFolder1.guid,
- url: "http://foo.tld/",
- title: "title b2 (folder 1)"
- });
- Assert.equal(b2.index, 1);
-
- let b3 = yield PlacesUtils.bookmarks.insert({
- parentGuid: testFolder2.guid,
- url: "http://foo.tld/",
- title: "title b3 (folder 2)"
- });
- Assert.equal(b3.index, 0);
-
- let b4 = yield PlacesUtils.bookmarks.insert({
- parentGuid: testFolder3.guid,
- url: "http://foo.tld/",
- title: "title b4 (folder 3)"
- });
- Assert.equal(b4.index, 0);
-
- // also test recursive search
- let testFolder1_1 = yield PlacesUtils.bookmarks.insert({
- parentGuid: testFolder1.guid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: "bug 384228 test folder 1.1"
- });
- Assert.equal(testFolder1_1.index, 2);
-
- let b5 = yield PlacesUtils.bookmarks.insert({
- parentGuid: testFolder1_1.guid,
- url: "http://foo.tld/",
- title: "title b5 (folder 1.1)"
- });
- Assert.equal(b5.index, 0);
-
-
- // query folder 1, folder 2 and get 4 bookmarks
- let folderIds = [];
- folderIds.push(yield PlacesUtils.promiseItemId(testFolder1.guid));
- folderIds.push(yield PlacesUtils.promiseItemId(testFolder2.guid));
-
- let hs = PlacesUtils.history;
- let options = hs.getNewQueryOptions();
- let query = hs.getNewQuery();
- query.searchTerms = "title";
- options.queryType = options.QUERY_TYPE_BOOKMARKS;
- query.setFolders(folderIds, folderIds.length);
- let rootNode = hs.executeQuery(query, options).root;
- rootNode.containerOpen = true;
-
- // should not match item from folder 3
- Assert.equal(rootNode.childCount, 4);
- Assert.equal(rootNode.getChild(0).bookmarkGuid, b1.guid);
- Assert.equal(rootNode.getChild(1).bookmarkGuid, b2.guid);
- Assert.equal(rootNode.getChild(2).bookmarkGuid, b3.guid);
- Assert.equal(rootNode.getChild(3).bookmarkGuid, b5.guid);
-
- rootNode.containerOpen = false;
-});
diff --git a/toolkit/components/places/tests/bookmarks/test_385829.js b/toolkit/components/places/tests/bookmarks/test_385829.js
deleted file mode 100644
index 63beee5f30..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_385829.js
+++ /dev/null
@@ -1,182 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-add_task(function* search_bookmark_by_lastModified_dateDated() {
- // test search on folder with various sorts and max results
- // see bug #385829 for more details
- let folder = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: "bug 385829 test"
- });
-
- let now = new Date();
- // ensure some unique values for date added and last modified
- // for date added: b1 < b2 < b3 < b4
- // for last modified: b1 > b2 > b3 > b4
- let b1 = yield PlacesUtils.bookmarks.insert({
- parentGuid: folder.guid,
- url: "http://a1.com/",
- title: "1 title",
- dateAdded: new Date(now.getTime() + 1000)
- });
- let b2 = yield PlacesUtils.bookmarks.insert({
- parentGuid: folder.guid,
- url: "http://a2.com/",
- title: "2 title",
- dateAdded: new Date(now.getTime() + 2000)
- });
- let b3 = yield PlacesUtils.bookmarks.insert({
- parentGuid: folder.guid,
- url: "http://a3.com/",
- title: "3 title",
- dateAdded: new Date(now.getTime() + 3000)
- });
- let b4 = yield PlacesUtils.bookmarks.insert({
- parentGuid: folder.guid,
- url: "http://a4.com/",
- title: "4 title",
- dateAdded: new Date(now.getTime() + 4000)
- });
-
- // make sure lastModified is larger than dateAdded
- let modifiedTime = new Date(now.getTime() + 5000);
- yield PlacesUtils.bookmarks.update({
- guid: b1.guid,
- lastModified: new Date(modifiedTime.getTime() + 4000)
- });
- yield PlacesUtils.bookmarks.update({
- guid: b2.guid,
- lastModified: new Date(modifiedTime.getTime() + 3000)
- });
- yield PlacesUtils.bookmarks.update({
- guid: b3.guid,
- lastModified: new Date(modifiedTime.getTime() + 2000)
- });
- yield PlacesUtils.bookmarks.update({
- guid: b4.guid,
- lastModified: new Date(modifiedTime.getTime() + 1000)
- });
-
- let hs = PlacesUtils.history;
- let options = hs.getNewQueryOptions();
- let query = hs.getNewQuery();
- options.queryType = options.QUERY_TYPE_BOOKMARKS;
- options.maxResults = 3;
- let folderIds = [];
- folderIds.push(yield PlacesUtils.promiseItemId(folder.guid));
- query.setFolders(folderIds, 1);
-
- let result = hs.executeQuery(query, options);
- let rootNode = result.root;
- rootNode.containerOpen = true;
-
- // test SORT_BY_DATEADDED_ASCENDING (live update)
- result.sortingMode = options.SORT_BY_DATEADDED_ASCENDING;
- Assert.equal(rootNode.childCount, 3);
- Assert.equal(rootNode.getChild(0).bookmarkGuid, b1.guid);
- Assert.equal(rootNode.getChild(1).bookmarkGuid, b2.guid);
- Assert.equal(rootNode.getChild(2).bookmarkGuid, b3.guid);
- Assert.ok(rootNode.getChild(0).dateAdded <
- rootNode.getChild(1).dateAdded);
- Assert.ok(rootNode.getChild(1).dateAdded <
- rootNode.getChild(2).dateAdded);
-
- // test SORT_BY_DATEADDED_DESCENDING (live update)
- result.sortingMode = options.SORT_BY_DATEADDED_DESCENDING;
- Assert.equal(rootNode.childCount, 3);
- Assert.equal(rootNode.getChild(0).bookmarkGuid, b3.guid);
- Assert.equal(rootNode.getChild(1).bookmarkGuid, b2.guid);
- Assert.equal(rootNode.getChild(2).bookmarkGuid, b1.guid);
- Assert.ok(rootNode.getChild(0).dateAdded >
- rootNode.getChild(1).dateAdded);
- Assert.ok(rootNode.getChild(1).dateAdded >
- rootNode.getChild(2).dateAdded);
-
- // test SORT_BY_LASTMODIFIED_ASCENDING (live update)
- result.sortingMode = options.SORT_BY_LASTMODIFIED_ASCENDING;
- Assert.equal(rootNode.childCount, 3);
- Assert.equal(rootNode.getChild(0).bookmarkGuid, b3.guid);
- Assert.equal(rootNode.getChild(1).bookmarkGuid, b2.guid);
- Assert.equal(rootNode.getChild(2).bookmarkGuid, b1.guid);
- Assert.ok(rootNode.getChild(0).lastModified <
- rootNode.getChild(1).lastModified);
- Assert.ok(rootNode.getChild(1).lastModified <
- rootNode.getChild(2).lastModified);
-
- // test SORT_BY_LASTMODIFIED_DESCENDING (live update)
- result.sortingMode = options.SORT_BY_LASTMODIFIED_DESCENDING;
-
- Assert.equal(rootNode.childCount, 3);
- Assert.equal(rootNode.getChild(0).bookmarkGuid, b1.guid);
- Assert.equal(rootNode.getChild(1).bookmarkGuid, b2.guid);
- Assert.equal(rootNode.getChild(2).bookmarkGuid, b3.guid);
- Assert.ok(rootNode.getChild(0).lastModified >
- rootNode.getChild(1).lastModified);
- Assert.ok(rootNode.getChild(1).lastModified >
- rootNode.getChild(2).lastModified);
- rootNode.containerOpen = false;
-
- // test SORT_BY_DATEADDED_ASCENDING
- options.sortingMode = options.SORT_BY_DATEADDED_ASCENDING;
- result = hs.executeQuery(query, options);
- rootNode = result.root;
- rootNode.containerOpen = true;
- Assert.equal(rootNode.childCount, 3);
- Assert.equal(rootNode.getChild(0).bookmarkGuid, b1.guid);
- Assert.equal(rootNode.getChild(1).bookmarkGuid, b2.guid);
- Assert.equal(rootNode.getChild(2).bookmarkGuid, b3.guid);
- Assert.ok(rootNode.getChild(0).dateAdded <
- rootNode.getChild(1).dateAdded);
- Assert.ok(rootNode.getChild(1).dateAdded <
- rootNode.getChild(2).dateAdded);
- rootNode.containerOpen = false;
-
- // test SORT_BY_DATEADDED_DESCENDING
- options.sortingMode = options.SORT_BY_DATEADDED_DESCENDING;
- result = hs.executeQuery(query, options);
- rootNode = result.root;
- rootNode.containerOpen = true;
- Assert.equal(rootNode.childCount, 3);
- Assert.equal(rootNode.getChild(0).bookmarkGuid, b4.guid);
- Assert.equal(rootNode.getChild(1).bookmarkGuid, b3.guid);
- Assert.equal(rootNode.getChild(2).bookmarkGuid, b2.guid);
- Assert.ok(rootNode.getChild(0).dateAdded >
- rootNode.getChild(1).dateAdded);
- Assert.ok(rootNode.getChild(1).dateAdded >
- rootNode.getChild(2).dateAdded);
- rootNode.containerOpen = false;
-
- // test SORT_BY_LASTMODIFIED_ASCENDING
- options.sortingMode = options.SORT_BY_LASTMODIFIED_ASCENDING;
- result = hs.executeQuery(query, options);
- rootNode = result.root;
- rootNode.containerOpen = true;
- Assert.equal(rootNode.childCount, 3);
- Assert.equal(rootNode.getChild(0).bookmarkGuid, b4.guid);
- Assert.equal(rootNode.getChild(1).bookmarkGuid, b3.guid);
- Assert.equal(rootNode.getChild(2).bookmarkGuid, b2.guid);
- Assert.ok(rootNode.getChild(0).lastModified <
- rootNode.getChild(1).lastModified);
- Assert.ok(rootNode.getChild(1).lastModified <
- rootNode.getChild(2).lastModified);
- rootNode.containerOpen = false;
-
- // test SORT_BY_LASTMODIFIED_DESCENDING
- options.sortingMode = options.SORT_BY_LASTMODIFIED_DESCENDING;
- result = hs.executeQuery(query, options);
- rootNode = result.root;
- rootNode.containerOpen = true;
- Assert.equal(rootNode.childCount, 3);
- Assert.equal(rootNode.getChild(0).bookmarkGuid, b1.guid);
- Assert.equal(rootNode.getChild(1).bookmarkGuid, b2.guid);
- Assert.equal(rootNode.getChild(2).bookmarkGuid, b3.guid);
- Assert.ok(rootNode.getChild(0).lastModified >
- rootNode.getChild(1).lastModified);
- Assert.ok(rootNode.getChild(1).lastModified >
- rootNode.getChild(2).lastModified);
- rootNode.containerOpen = false;
-});
diff --git a/toolkit/components/places/tests/bookmarks/test_388695.js b/toolkit/components/places/tests/bookmarks/test_388695.js
deleted file mode 100644
index 4e313c52f0..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_388695.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-// Get bookmark service
-try {
- var bmsvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
-} catch (ex) {
- do_throw("Could not get nav-bookmarks-service\n");
-}
-
-var gTestRoot;
-var gURI;
-var gItemId1;
-var gItemId2;
-
-// main
-function run_test() {
- gURI = uri("http://foo.tld.com/");
- gTestRoot = bmsvc.createFolder(bmsvc.placesRoot, "test folder",
- bmsvc.DEFAULT_INDEX);
-
- // test getBookmarkIdsForURI
- // getBookmarkIdsForURI sorts by the most recently added/modified (descending)
- //
- // we cannot rely on dateAdded growing when doing so in a simple iteration,
- // see PR_Now() documentation
- do_test_pending();
-
- gItemId1 = bmsvc.insertBookmark(gTestRoot, gURI, bmsvc.DEFAULT_INDEX, "");
- do_timeout(100, phase2);
-}
-
-function phase2() {
- 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);
- do_timeout(100, phase3);
-}
-
-function phase3() {
- // trigger last modified change
- bmsvc.setItemTitle(gItemId1, "");
- var b = bmsvc.getBookmarkIdsForURI(gURI);
- do_check_eq(b[0], gItemId1);
- do_check_eq(b[1], gItemId2);
- do_test_finished();
-}
diff --git a/toolkit/components/places/tests/bookmarks/test_393498.js b/toolkit/components/places/tests/bookmarks/test_393498.js
deleted file mode 100644
index 601f77a0a0..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_393498.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var observer = {
- __proto__: NavBookmarkObserver.prototype,
-
- onItemAdded: function (id, folder, index) {
- this._itemAddedId = id;
- this._itemAddedParent = folder;
- this._itemAddedIndex = index;
- },
- onItemChanged: function (id, property, isAnnotationProperty, value) {
- this._itemChangedId = id;
- this._itemChangedProperty = property;
- this._itemChanged_isAnnotationProperty = isAnnotationProperty;
- this._itemChangedValue = value;
- }
-};
-PlacesUtils.bookmarks.addObserver(observer, false);
-
-do_register_cleanup(function () {
- PlacesUtils.bookmarks.removeObserver(observer);
-});
-
-function run_test() {
- // We set times in the past to workaround a timing bug due to virtual
- // machines and the skew between PR_Now() and Date.now(), see bug 427142 and
- // bug 858377 for details.
- const PAST_PRTIME = (Date.now() - 86400000) * 1000;
-
- // Insert a new bookmark.
- let testFolder = PlacesUtils.bookmarks.createFolder(
- PlacesUtils.placesRootId, "test Folder",
- PlacesUtils.bookmarks.DEFAULT_INDEX);
- let bookmarkId = PlacesUtils.bookmarks.insertBookmark(
- testFolder, uri("http://google.com/"),
- PlacesUtils.bookmarks.DEFAULT_INDEX, "");
-
- // Sanity check.
- do_check_true(observer.itemChangedProperty === undefined);
-
- // Set dateAdded in the past and verify the bookmarks cache.
- PlacesUtils.bookmarks.setItemDateAdded(bookmarkId, PAST_PRTIME);
- do_check_eq(observer._itemChangedProperty, "dateAdded");
- do_check_eq(observer._itemChangedValue, PAST_PRTIME);
- let dateAdded = PlacesUtils.bookmarks.getItemDateAdded(bookmarkId);
- do_check_eq(dateAdded, PAST_PRTIME);
-
- // After just inserting, modified should be the same as dateAdded.
- do_check_eq(PlacesUtils.bookmarks.getItemLastModified(bookmarkId), dateAdded);
-
- // Set lastModified in the past and verify the bookmarks cache.
- PlacesUtils.bookmarks.setItemLastModified(bookmarkId, PAST_PRTIME);
- do_check_eq(observer._itemChangedProperty, "lastModified");
- do_check_eq(observer._itemChangedValue, PAST_PRTIME);
- do_check_eq(PlacesUtils.bookmarks.getItemLastModified(bookmarkId),
- PAST_PRTIME);
-
- // Set bookmark title
- PlacesUtils.bookmarks.setItemTitle(bookmarkId, "Google");
-
- // Test notifications.
- do_check_eq(observer._itemChangedId, bookmarkId);
- do_check_eq(observer._itemChangedProperty, "title");
- do_check_eq(observer._itemChangedValue, "Google");
-
- // Check lastModified has been updated.
- is_time_ordered(PAST_PRTIME,
- PlacesUtils.bookmarks.getItemLastModified(bookmarkId));
-
- // Check that node properties are updated.
- let root = PlacesUtils.getFolderContents(testFolder).root;
- do_check_eq(root.childCount, 1);
- let childNode = root.getChild(0);
-
- // confirm current dates match node properties
- do_check_eq(PlacesUtils.bookmarks.getItemDateAdded(bookmarkId),
- childNode.dateAdded);
- do_check_eq(PlacesUtils.bookmarks.getItemLastModified(bookmarkId),
- childNode.lastModified);
-
- // Test live update of lastModified when setting title.
- PlacesUtils.bookmarks.setItemLastModified(bookmarkId, PAST_PRTIME);
- PlacesUtils.bookmarks.setItemTitle(bookmarkId, "Google");
-
- // Check lastModified has been updated.
- is_time_ordered(PAST_PRTIME, childNode.lastModified);
- // Test that node value matches db value.
- do_check_eq(PlacesUtils.bookmarks.getItemLastModified(bookmarkId),
- childNode.lastModified);
-
- // Test live update of the exposed date apis.
- PlacesUtils.bookmarks.setItemDateAdded(bookmarkId, PAST_PRTIME);
- do_check_eq(childNode.dateAdded, PAST_PRTIME);
- PlacesUtils.bookmarks.setItemLastModified(bookmarkId, PAST_PRTIME);
- do_check_eq(childNode.lastModified, PAST_PRTIME);
-
- root.containerOpen = false;
-}
diff --git a/toolkit/components/places/tests/bookmarks/test_395101.js b/toolkit/components/places/tests/bookmarks/test_395101.js
deleted file mode 100644
index a507e73615..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_395101.js
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-// Get bookmark service
-try {
- var bmsvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].getService(Ci.nsINavBookmarksService);
-} catch (ex) {
- do_throw("Could not get nav-bookmarks-service\n");
-}
-
-// Get history service
-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 {
- var tagssvc = Cc["@mozilla.org/browser/tagging-service;1"].
- getService(Ci.nsITaggingService);
-} catch (ex) {
- do_throw("Could not get tagging service\n");
-}
-
-// get bookmarks root id
-var root = bmsvc.bookmarksMenuFolder;
-
-// main
-function run_test() {
- // test searching for tagged bookmarks
-
- // test folder
- var folder = bmsvc.createFolder(root, "bug 395101 test", bmsvc.DEFAULT_INDEX);
-
- // create a bookmark
- var testURI = uri("http://a1.com");
- var b1 = bmsvc.insertBookmark(folder, testURI,
- bmsvc.DEFAULT_INDEX, "1 title");
-
- // tag the bookmarked URI
- tagssvc.tagURI(testURI, ["elephant", "walrus", "giraffe", "turkey", "hiPPo", "BABOON", "alf"]);
-
- // search for the bookmark, using a tag
- var query = histsvc.getNewQuery();
- query.searchTerms = "elephant";
- var options = histsvc.getNewQueryOptions();
- options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS;
- query.setFolders([folder], 1);
-
- var result = histsvc.executeQuery(query, options);
- var rootNode = result.root;
- rootNode.containerOpen = true;
-
- do_check_eq(rootNode.childCount, 1);
- do_check_eq(rootNode.getChild(0).itemId, b1);
- rootNode.containerOpen = false;
-
- // partial matches are okay
- query.searchTerms = "wal";
- result = histsvc.executeQuery(query, options);
- rootNode = result.root;
- rootNode.containerOpen = true;
- do_check_eq(rootNode.childCount, 1);
- rootNode.containerOpen = false;
-
- // case insensitive search term
- query.searchTerms = "WALRUS";
- result = histsvc.executeQuery(query, options);
- rootNode = result.root;
- rootNode.containerOpen = true;
- do_check_eq(rootNode.childCount, 1);
- do_check_eq(rootNode.getChild(0).itemId, b1);
- rootNode.containerOpen = false;
-
- // case insensitive tag
- query.searchTerms = "baboon";
- result = histsvc.executeQuery(query, options);
- rootNode = result.root;
- rootNode.containerOpen = true;
- do_check_eq(rootNode.childCount, 1);
- do_check_eq(rootNode.getChild(0).itemId, b1);
- rootNode.containerOpen = false;
-}
diff --git a/toolkit/components/places/tests/bookmarks/test_395593.js b/toolkit/components/places/tests/bookmarks/test_395593.js
deleted file mode 100644
index 46d8f5b80e..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_395593.js
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-
-var bs = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
-var hs = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
-
-function check_queries_results(aQueries, aOptions, aExpectedItemIds) {
- var result = hs.executeQueries(aQueries, aQueries.length, aOptions);
- var root = result.root;
- root.containerOpen = true;
-
- // Dump found nodes.
- for (let i = 0; i < root.childCount; i++) {
- dump("nodes[" + i + "]: " + root.getChild(0).title + "\n");
- }
-
- do_check_eq(root.childCount, aExpectedItemIds.length);
- for (let i = 0; i < root.childCount; i++) {
- do_check_eq(root.getChild(i).itemId, aExpectedItemIds[i]);
- }
-
- root.containerOpen = false;
-}
-
-// main
-function run_test() {
- var id1 = bs.insertBookmark(bs.bookmarksMenuFolder, uri("http://foo.tld"),
- bs.DEFAULT_INDEX, "123 0");
- var id2 = bs.insertBookmark(bs.bookmarksMenuFolder, uri("http://foo.tld"),
- bs.DEFAULT_INDEX, "456");
- var id3 = bs.insertBookmark(bs.bookmarksMenuFolder, uri("http://foo.tld"),
- bs.DEFAULT_INDEX, "123 456");
- var id4 = bs.insertBookmark(bs.bookmarksMenuFolder, uri("http://foo.tld"),
- bs.DEFAULT_INDEX, "789 456");
-
- /**
- * All of the query objects are ORed together. Within a query, all the terms
- * are ANDed together. See nsINavHistory.idl.
- */
- var queries = [];
- queries.push(hs.getNewQuery());
- queries.push(hs.getNewQuery());
- var options = hs.getNewQueryOptions();
- options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS;
-
- // Test 1
- dump("Test searching for 123 OR 789\n");
- queries[0].searchTerms = "123";
- queries[1].searchTerms = "789";
- check_queries_results(queries, options, [id1, id3, id4]);
-
- // Test 2
- dump("Test searching for 123 OR 456\n");
- queries[0].searchTerms = "123";
- queries[1].searchTerms = "456";
- check_queries_results(queries, options, [id1, id2, id3, id4]);
-
- // Test 3
- dump("Test searching for 00 OR 789\n");
- queries[0].searchTerms = "00";
- queries[1].searchTerms = "789";
- check_queries_results(queries, options, [id4]);
-}
diff --git a/toolkit/components/places/tests/bookmarks/test_405938_restore_queries.js b/toolkit/components/places/tests/bookmarks/test_405938_restore_queries.js
deleted file mode 100644
index e317cc2e9e..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_405938_restore_queries.js
+++ /dev/null
@@ -1,221 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var tests = [];
-
-/*
-
-Backup/restore tests example:
-
-var myTest = {
- populate: function () { ... add bookmarks ... },
- validate: function () { ... query for your bookmarks ... }
-}
-
-this.push(myTest);
-
-*/
-
-/*
-
-test summary:
-- create folders with content
-- create a query bookmark for those folders
-- backs up bookmarks
-- restores bookmarks
-- confirms that the query has the new ids for the same folders
-
-scenarios:
-- 1 folder (folder shortcut)
-- n folders (single query)
-- n folders (multiple queries)
-
-*/
-
-const DEFAULT_INDEX = PlacesUtils.bookmarks.DEFAULT_INDEX;
-
-var test = {
- _testRootId: null,
- _testRootTitle: "test root",
- _folderIds: [],
- _bookmarkURIs: [],
- _count: 3,
-
- populate: function populate() {
- // folder to hold this test
- PlacesUtils.bookmarks.removeFolderChildren(PlacesUtils.toolbarFolderId);
- this._testRootId =
- PlacesUtils.bookmarks.createFolder(PlacesUtils.toolbarFolderId,
- this._testRootTitle, DEFAULT_INDEX);
-
- // create test folders each with a bookmark
- for (var i = 0; i < this._count; i++) {
- 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);
- this._bookmarkURIs.push(bookmarkURI);
- }
-
- // create a query URI with 1 folder (ie: folder shortcut)
- this._queryURI1 = uri("place:folder=" + this._folderIds[0] + "&queryType=1");
- this._queryTitle1 = "query1";
- PlacesUtils.bookmarks.insertBookmark(this._testRootId, this._queryURI1,
- DEFAULT_INDEX, this._queryTitle1);
-
- // create a query URI with _count folders
- this._queryURI2 = uri("place:folder=" + this._folderIds.join("&folder=") + "&queryType=1");
- this._queryTitle2 = "query2";
- PlacesUtils.bookmarks.insertBookmark(this._testRootId, this._queryURI2,
- DEFAULT_INDEX, this._queryTitle2);
-
- // create a query URI with _count queries (each with a folder)
- // first get a query object for each folder
- var queries = this._folderIds.map(function(aFolderId) {
- var query = PlacesUtils.history.getNewQuery();
- query.setFolders([aFolderId], 1);
- return query;
- });
- var options = PlacesUtils.history.getNewQueryOptions();
- options.queryType = options.QUERY_TYPE_BOOKMARKS;
- this._queryURI3 =
- uri(PlacesUtils.history.queriesToQueryString(queries, queries.length, options));
- this._queryTitle3 = "query3";
- PlacesUtils.bookmarks.insertBookmark(this._testRootId, this._queryURI3,
- DEFAULT_INDEX, this._queryTitle3);
- },
-
- clean: function () {},
-
- validate: function validate() {
- // Throw a wrench in the works by inserting some new bookmarks,
- // ensuring folder ids won't be the same, when restoring.
- for (let i = 0; i < 10; i++) {
- PlacesUtils.bookmarks.
- insertBookmark(PlacesUtils.bookmarksMenuFolderId, uri("http://aaaa"+i), DEFAULT_INDEX, "");
- }
-
- var toolbar =
- PlacesUtils.getFolderContents(PlacesUtils.toolbarFolderId,
- false, true).root;
- do_check_true(toolbar.childCount, 1);
-
- var folderNode = toolbar.getChild(0);
- do_check_eq(folderNode.type, folderNode.RESULT_TYPE_FOLDER);
- do_check_eq(folderNode.title, this._testRootTitle);
- folderNode.QueryInterface(Ci.nsINavHistoryQueryResultNode);
- folderNode.containerOpen = true;
-
- // |_count| folders + the query node
- do_check_eq(folderNode.childCount, this._count+3);
-
- for (let i = 0; i < this._count; i++) {
- var subFolder = folderNode.getChild(i);
- do_check_eq(subFolder.title, "folder"+i);
- subFolder.QueryInterface(Ci.nsINavHistoryContainerResultNode);
- subFolder.containerOpen = true;
- do_check_eq(subFolder.childCount, 1);
- var child = subFolder.getChild(0);
- do_check_eq(child.title, "bookmark"+i);
- do_check_true(uri(child.uri).equals(uri("http://" + i)))
- }
-
- // validate folder shortcut
- this.validateQueryNode1(folderNode.getChild(this._count));
-
- // validate folders query
- this.validateQueryNode2(folderNode.getChild(this._count + 1));
-
- // validate multiple queries query
- this.validateQueryNode3(folderNode.getChild(this._count + 2));
-
- // clean up
- folderNode.containerOpen = false;
- toolbar.containerOpen = false;
- },
-
- validateQueryNode1: function validateQueryNode1(aNode) {
- do_check_eq(aNode.title, this._queryTitle1);
- do_check_true(PlacesUtils.nodeIsFolder(aNode));
-
- aNode.QueryInterface(Ci.nsINavHistoryContainerResultNode);
- aNode.containerOpen = true;
- do_check_eq(aNode.childCount, 1);
- var child = aNode.getChild(0);
- do_check_true(uri(child.uri).equals(uri("http://0")))
- do_check_eq(child.title, "bookmark0")
- aNode.containerOpen = false;
- },
-
- validateQueryNode2: function validateQueryNode2(aNode) {
- do_check_eq(aNode.title, this._queryTitle2);
- do_check_true(PlacesUtils.nodeIsQuery(aNode));
-
- aNode.QueryInterface(Ci.nsINavHistoryContainerResultNode);
- aNode.containerOpen = true;
- do_check_eq(aNode.childCount, this._count);
- for (var i = 0; i < aNode.childCount; i++) {
- var child = aNode.getChild(i);
- do_check_true(uri(child.uri).equals(uri("http://" + i)))
- do_check_eq(child.title, "bookmark" + i)
- }
- aNode.containerOpen = false;
- },
-
- validateQueryNode3: function validateQueryNode3(aNode) {
- do_check_eq(aNode.title, this._queryTitle3);
- do_check_true(PlacesUtils.nodeIsQuery(aNode));
-
- aNode.QueryInterface(Ci.nsINavHistoryContainerResultNode);
- aNode.containerOpen = true;
- do_check_eq(aNode.childCount, this._count);
- for (var i = 0; i < aNode.childCount; i++) {
- var child = aNode.getChild(i);
- do_check_true(uri(child.uri).equals(uri("http://" + i)))
- do_check_eq(child.title, "bookmark" + i)
- }
- aNode.containerOpen = false;
- }
-}
-tests.push(test);
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* () {
- // make json file
- let jsonFile = OS.Path.join(OS.Constants.Path.profileDir, "bookmarks.json");
-
- // populate db
- tests.forEach(function(aTest) {
- aTest.populate();
- // sanity
- aTest.validate();
- });
-
- // export json to file
- yield BookmarkJSONUtils.exportToFile(jsonFile);
-
- // clean
- tests.forEach(function(aTest) {
- aTest.clean();
- });
-
- // restore json file
- yield BookmarkJSONUtils.importFromFile(jsonFile, true);
-
- // validate
- tests.forEach(function(aTest) {
- aTest.validate();
- });
-
- // clean up
- yield OS.File.remove(jsonFile);
-});
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
deleted file mode 100644
index 8584968561..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_417228-exclude-from-backup.js
+++ /dev/null
@@ -1,141 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-const EXCLUDE_FROM_BACKUP_ANNO = "places/excludeFromBackup";
-// Menu, Toolbar, Unsorted, Tags, Mobile
-const PLACES_ROOTS_COUNT = 5;
-var tests = [];
-
-/*
-
-Backup/restore tests example:
-
-var myTest = {
- populate: function () { ... add bookmarks ... },
- validate: function () { ... query for your bookmarks ... }
-}
-
-this.push(myTest);
-
-*/
-
-var test = {
- populate: function populate() {
- // check initial size
- var rootNode = PlacesUtils.getFolderContents(PlacesUtils.placesRootId,
- false, false).root;
- do_check_eq(rootNode.childCount, PLACES_ROOTS_COUNT );
- rootNode.containerOpen = false;
-
- var idx = PlacesUtils.bookmarks.DEFAULT_INDEX;
-
- // create a root to be restore
- this._restoreRootTitle = "restore root";
- var restoreRootId = PlacesUtils.bookmarks
- .createFolder(PlacesUtils.placesRootId,
- this._restoreRootTitle, idx);
- // add a test bookmark
- this._restoreRootURI = uri("http://restore.uri");
- PlacesUtils.bookmarks.insertBookmark(restoreRootId, this._restoreRootURI,
- idx, "restore uri");
- // add a test bookmark to be exclude
- this._restoreRootExcludeURI = uri("http://exclude.uri");
- var exItemId = PlacesUtils.bookmarks
- .insertBookmark(restoreRootId,
- this._restoreRootExcludeURI,
- idx, "exclude uri");
- // Annotate the bookmark for exclusion.
- PlacesUtils.annotations.setItemAnnotation(exItemId,
- EXCLUDE_FROM_BACKUP_ANNO, 1, 0,
- PlacesUtils.annotations.EXPIRE_NEVER);
-
- // create a root to be exclude
- this._excludeRootTitle = "exclude root";
- this._excludeRootId = PlacesUtils.bookmarks
- .createFolder(PlacesUtils.placesRootId,
- this._excludeRootTitle, idx);
- // Annotate the root for exclusion.
- PlacesUtils.annotations.setItemAnnotation(this._excludeRootId,
- EXCLUDE_FROM_BACKUP_ANNO, 1, 0,
- PlacesUtils.annotations.EXPIRE_NEVER);
- // add a test bookmark exclude by exclusion of its parent
- PlacesUtils.bookmarks.insertBookmark(this._excludeRootId,
- this._restoreRootExcludeURI,
- idx, "exclude uri");
- },
-
- validate: function validate(aEmptyBookmarks) {
- var rootNode = PlacesUtils.getFolderContents(PlacesUtils.placesRootId,
- false, false).root;
-
- if (!aEmptyBookmarks) {
- // since restore does not remove backup exclude items both
- // roots should still exist.
- do_check_eq(rootNode.childCount, PLACES_ROOTS_COUNT + 2);
- // open exclude root and check it still contains one item
- var restoreRootIndex = PLACES_ROOTS_COUNT;
- var excludeRootIndex = PLACES_ROOTS_COUNT+1;
- var excludeRootNode = rootNode.getChild(excludeRootIndex);
- do_check_eq(this._excludeRootTitle, excludeRootNode.title);
- excludeRootNode.QueryInterface(Ci.nsINavHistoryQueryResultNode);
- excludeRootNode.containerOpen = true;
- do_check_eq(excludeRootNode.childCount, 1);
- var excludeRootChildNode = excludeRootNode.getChild(0);
- do_check_eq(excludeRootChildNode.uri, this._restoreRootExcludeURI.spec);
- excludeRootNode.containerOpen = false;
- }
- else {
- // exclude root should not exist anymore
- do_check_eq(rootNode.childCount, PLACES_ROOTS_COUNT + 1);
- restoreRootIndex = PLACES_ROOTS_COUNT;
- }
-
- var restoreRootNode = rootNode.getChild(restoreRootIndex);
- do_check_eq(this._restoreRootTitle, restoreRootNode.title);
- restoreRootNode.QueryInterface(Ci.nsINavHistoryQueryResultNode);
- restoreRootNode.containerOpen = true;
- do_check_eq(restoreRootNode.childCount, 1);
- var restoreRootChildNode = restoreRootNode.getChild(0);
- do_check_eq(restoreRootChildNode.uri, this._restoreRootURI.spec);
- restoreRootNode.containerOpen = false;
-
- rootNode.containerOpen = false;
- }
-}
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function*() {
- // make json file
- let jsonFile = OS.Path.join(OS.Constants.Path.profileDir, "bookmarks.json");
-
- // populate db
- test.populate();
-
- yield BookmarkJSONUtils.exportToFile(jsonFile);
-
- // restore json file
- yield BookmarkJSONUtils.importFromFile(jsonFile, true);
-
- // validate without removing all bookmarks
- // restore do not remove backup exclude entries
- test.validate(false);
-
- // cleanup
- yield PlacesUtils.bookmarks.eraseEverything();
- // manually remove the excluded root
- PlacesUtils.bookmarks.removeItem(test._excludeRootId);
- // restore json file
- yield BookmarkJSONUtils.importFromFile(jsonFile, true);
-
- // validate after a complete bookmarks cleanup
- test.validate(true);
-
- // clean up
- yield OS.File.remove(jsonFile);
-});
diff --git a/toolkit/components/places/tests/bookmarks/test_417228-other-roots.js b/toolkit/components/places/tests/bookmarks/test_417228-other-roots.js
deleted file mode 100644
index 1def75d2da..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_417228-other-roots.js
+++ /dev/null
@@ -1,158 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var tests = [];
-
-/*
-
-Backup/restore tests example:
-
-var myTest = {
- populate: function () { ... add bookmarks ... },
- validate: function () { ... query for your bookmarks ... }
-}
-
-this.push(myTest);
-
-*/
-
-tests.push({
- excludeItemsFromRestore: [],
- populate: function populate() {
- // check initial size
- var rootNode = PlacesUtils.getFolderContents(PlacesUtils.placesRootId,
- false, false).root;
- do_check_eq(rootNode.childCount, 5);
-
- // create a test root
- this._folderTitle = "test folder";
- this._folderId =
- PlacesUtils.bookmarks.createFolder(PlacesUtils.placesRootId,
- this._folderTitle,
- PlacesUtils.bookmarks.DEFAULT_INDEX);
- do_check_eq(rootNode.childCount, 6);
-
- // add a tag
- this._testURI = PlacesUtils._uri("http://test");
- this._tags = ["a", "b"];
- PlacesUtils.tagging.tagURI(this._testURI, this._tags);
-
- // add a child to each root, including our test root
- this._roots = [PlacesUtils.bookmarksMenuFolderId, PlacesUtils.toolbarFolderId,
- PlacesUtils.unfiledBookmarksFolderId, PlacesUtils.mobileFolderId,
- this._folderId];
- this._roots.forEach(function(aRootId) {
- // clean slate
- PlacesUtils.bookmarks.removeFolderChildren(aRootId);
- // add a test bookmark
- PlacesUtils.bookmarks.insertBookmark(aRootId, this._testURI,
- PlacesUtils.bookmarks.DEFAULT_INDEX, "test");
- }, this);
-
- // add a folder to exclude from replacing during restore
- // this will still be present post-restore
- var excludedFolderId =
- PlacesUtils.bookmarks.createFolder(PlacesUtils.placesRootId,
- "excluded",
- PlacesUtils.bookmarks.DEFAULT_INDEX);
- do_check_eq(rootNode.childCount, 7);
- this.excludeItemsFromRestore.push(excludedFolderId);
-
- // add a test bookmark to it
- PlacesUtils.bookmarks.insertBookmark(excludedFolderId, this._testURI,
- PlacesUtils.bookmarks.DEFAULT_INDEX, "test");
- },
-
- inbetween: function inbetween() {
- // add some items that should be removed by the restore
-
- // add a folder
- this._litterTitle = "otter";
- PlacesUtils.bookmarks.createFolder(PlacesUtils.placesRootId,
- this._litterTitle, 0);
-
- // add some tags
- PlacesUtils.tagging.tagURI(this._testURI, ["c", "d"]);
- },
-
- validate: function validate() {
- // validate tags restored
- var tags = PlacesUtils.tagging.getTagsForURI(this._testURI);
- // also validates that litter tags are gone
- do_check_eq(this._tags.toString(), tags.toString());
-
- var rootNode = PlacesUtils.getFolderContents(PlacesUtils.placesRootId,
- false, false).root;
-
- // validate litter is gone
- do_check_neq(rootNode.getChild(0).title, this._litterTitle);
-
- // test root count is the same
- do_check_eq(rootNode.childCount, 7);
-
- var foundTestFolder = 0;
- for (var i = 0; i < rootNode.childCount; i++) {
- var node = rootNode.getChild(i);
-
- do_print("validating " + node.title);
- if (node.itemId != PlacesUtils.tagsFolderId) {
- if (node.title == this._folderTitle) {
- // check the test folder's properties
- do_check_eq(node.type, node.RESULT_TYPE_FOLDER);
- do_check_eq(node.title, this._folderTitle);
- foundTestFolder++;
- }
-
- // test contents
- node.QueryInterface(Ci.nsINavHistoryContainerResultNode).containerOpen = true;
- do_check_eq(node.childCount, 1);
- var child = node.getChild(0);
- do_check_true(PlacesUtils._uri(child.uri).equals(this._testURI));
-
- // clean up
- node.containerOpen = false;
- }
- }
- do_check_eq(foundTestFolder, 1);
- rootNode.containerOpen = false;
- }
-});
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* () {
- // make json file
- let jsonFile = OS.Path.join(OS.Constants.Path.profileDir, "bookmarks.json");
-
- // populate db
- tests.forEach(function(aTest) {
- aTest.populate();
- // sanity
- aTest.validate();
-
- if (aTest.excludedItemsFromRestore)
- excludedItemsFromRestore = excludedItems.concat(aTest.excludedItemsFromRestore);
- });
-
- yield BookmarkJSONUtils.exportToFile(jsonFile);
-
- tests.forEach(function(aTest) {
- aTest.inbetween();
- });
-
- // restore json file
- yield BookmarkJSONUtils.importFromFile(jsonFile, true);
-
- // validate
- tests.forEach(function(aTest) {
- aTest.validate();
- });
-
- // clean up
- yield OS.File.remove(jsonFile);
-});
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
deleted file mode 100644
index 7da1146cfc..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_424958-json-quoted-folders.js
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var tests = [];
-
-/*
-
-Backup/restore tests example:
-
-var myTest = {
- populate: function () { ... add bookmarks ... },
- validate: function () { ... query for your bookmarks ... }
-}
-
-this.push(myTest);
-
-*/
-
-var quotesTest = {
- _folderTitle: '"quoted folder"',
- _folderId: null,
-
- populate: function () {
- this._folderId =
- PlacesUtils.bookmarks.createFolder(PlacesUtils.toolbarFolderId,
- this._folderTitle,
- PlacesUtils.bookmarks.DEFAULT_INDEX);
- },
-
- clean: function () {
- PlacesUtils.bookmarks.removeItem(this._folderId);
- },
-
- validate: function () {
- var query = PlacesUtils.history.getNewQuery();
- query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
- var result = PlacesUtils.history.executeQuery(query, PlacesUtils.history.getNewQueryOptions());
-
- var toolbar = result.root;
- toolbar.containerOpen = true;
-
- // test for our quoted folder
- do_check_true(toolbar.childCount, 1);
- var folderNode = toolbar.getChild(0);
- do_check_eq(folderNode.type, folderNode.RESULT_TYPE_FOLDER);
- do_check_eq(folderNode.title, this._folderTitle);
-
- // clean up
- toolbar.containerOpen = false;
- }
-}
-tests.push(quotesTest);
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* () {
- // make json file
- let jsonFile = OS.Path.join(OS.Constants.Path.profileDir, "bookmarks.json");
-
- // populate db
- tests.forEach(function(aTest) {
- aTest.populate();
- // sanity
- aTest.validate();
- });
-
- // export json to file
- yield BookmarkJSONUtils.exportToFile(jsonFile);
-
- // clean
- tests.forEach(function(aTest) {
- aTest.clean();
- });
-
- // restore json file
- yield BookmarkJSONUtils.importFromFile(jsonFile, true);
-
- // validate
- tests.forEach(function(aTest) {
- aTest.validate();
- });
-
- // clean up
- yield OS.File.remove(jsonFile);
-
-});
diff --git a/toolkit/components/places/tests/bookmarks/test_448584.js b/toolkit/components/places/tests/bookmarks/test_448584.js
deleted file mode 100644
index 6e58bd83a9..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_448584.js
+++ /dev/null
@@ -1,113 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var tests = [];
-
-// Get database connection
-try {
- var mDBConn = PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
- .DBConnection;
-}
-catch (ex) {
- do_throw("Could not get database connection\n");
-}
-
-/*
- This test is:
- - don't try to add invalid uri nodes to a JSON backup
-*/
-
-var invalidURITest = {
- _itemTitle: "invalid uri",
- _itemUrl: "http://test.mozilla.org/",
- _itemId: null,
-
- populate: function () {
- // add a valid bookmark
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.toolbarFolderId,
- PlacesUtils._uri(this._itemUrl),
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- this._itemTitle);
- // this bookmark will go corrupt
- this._itemId =
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.toolbarFolderId,
- PlacesUtils._uri(this._itemUrl),
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- this._itemTitle);
- },
-
- clean: function () {
- PlacesUtils.bookmarks.removeItem(this._itemId);
- },
-
- validate: function (aExpectValidItemsCount) {
- var query = PlacesUtils.history.getNewQuery();
- query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
- var options = PlacesUtils.history.getNewQueryOptions();
- var result = PlacesUtils.history.executeQuery(query, options);
-
- var toolbar = result.root;
- toolbar.containerOpen = true;
-
- // test for our bookmark
- do_check_eq(toolbar.childCount, aExpectValidItemsCount);
- for (var i = 0; i < toolbar.childCount; i++) {
- var folderNode = toolbar.getChild(0);
- do_check_eq(folderNode.type, folderNode.RESULT_TYPE_URI);
- do_check_eq(folderNode.title, this._itemTitle);
- }
-
- // clean up
- toolbar.containerOpen = false;
- }
-}
-tests.push(invalidURITest);
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function*() {
- // make json file
- let jsonFile = OS.Path.join(OS.Constants.Path.profileDir, "bookmarks.json");
-
- // populate db
- tests.forEach(function(aTest) {
- aTest.populate();
- // sanity
- aTest.validate(2);
- // Something in the code went wrong and we finish up losing the place, so
- // the bookmark uri becomes null.
- var sql = "UPDATE moz_bookmarks SET fk = 1337 WHERE id = ?1";
- var stmt = mDBConn.createStatement(sql);
- stmt.bindByIndex(0, aTest._itemId);
- try {
- stmt.execute();
- } finally {
- stmt.finalize();
- }
- });
-
- yield BookmarkJSONUtils.exportToFile(jsonFile);
-
- // clean
- tests.forEach(function(aTest) {
- aTest.clean();
- });
-
- // restore json file
- try {
- yield BookmarkJSONUtils.importFromFile(jsonFile, true);
- } catch (ex) { do_throw("couldn't import the exported file: " + ex); }
-
- // validate
- tests.forEach(function(aTest) {
- aTest.validate(1);
- });
-
- // clean up
- yield OS.File.remove(jsonFile);
-});
diff --git a/toolkit/components/places/tests/bookmarks/test_458683.js b/toolkit/components/places/tests/bookmarks/test_458683.js
deleted file mode 100644
index c3722aab50..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_458683.js
+++ /dev/null
@@ -1,131 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var tests = [];
-
-// Get database connection
-try {
- var mDBConn = PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
- .DBConnection;
-}
-catch (ex) {
- do_throw("Could not get database connection\n");
-}
-
-/*
- This test is:
- - don't block while doing backup and restore if tag containers contain
- bogus items (separators, folders)
-*/
-
-var invalidTagChildTest = {
- _itemTitle: "invalid uri",
- _itemUrl: "http://test.mozilla.org/",
- _itemId: -1,
- _tag: "testTag",
- _tagItemId: -1,
-
- populate: function () {
- // add a valid bookmark
- this._itemId = PlacesUtils.bookmarks
- .insertBookmark(PlacesUtils.toolbarFolderId,
- PlacesUtils._uri(this._itemUrl),
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- this._itemTitle);
-
- // create a tag
- PlacesUtils.tagging.tagURI(PlacesUtils._uri(this._itemUrl), [this._tag]);
- // get tag folder id
- var options = PlacesUtils.history.getNewQueryOptions();
- var query = PlacesUtils.history.getNewQuery();
- query.setFolders([PlacesUtils.bookmarks.tagsFolder], 1);
- var result = PlacesUtils.history.executeQuery(query, options);
- var tagRoot = result.root;
- tagRoot.containerOpen = true;
- do_check_eq(tagRoot.childCount, 1);
- var tagNode = tagRoot.getChild(0)
- .QueryInterface(Ci.nsINavHistoryContainerResultNode);
- this._tagItemId = tagNode.itemId;
- tagRoot.containerOpen = false;
-
- // add a separator and a folder inside tag folder
- PlacesUtils.bookmarks.insertSeparator(this._tagItemId,
- PlacesUtils.bookmarks.DEFAULT_INDEX);
- PlacesUtils.bookmarks.createFolder(this._tagItemId,
- "test folder",
- PlacesUtils.bookmarks.DEFAULT_INDEX);
-
- // add a separator and a folder inside tag root
- PlacesUtils.bookmarks.insertSeparator(PlacesUtils.bookmarks.tagsFolder,
- PlacesUtils.bookmarks.DEFAULT_INDEX);
- PlacesUtils.bookmarks.createFolder(PlacesUtils.bookmarks.tagsFolder,
- "test tags root folder",
- PlacesUtils.bookmarks.DEFAULT_INDEX);
- },
-
- clean: function () {
- PlacesUtils.tagging.untagURI(PlacesUtils._uri(this._itemUrl), [this._tag]);
- PlacesUtils.bookmarks.removeItem(this._itemId);
- },
-
- validate: function () {
- var query = PlacesUtils.history.getNewQuery();
- query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
- var options = PlacesUtils.history.getNewQueryOptions();
- var result = PlacesUtils.history.executeQuery(query, options);
-
- var toolbar = result.root;
- toolbar.containerOpen = true;
-
- // test for our bookmark
- do_check_eq(toolbar.childCount, 1);
- for (var i = 0; i < toolbar.childCount; i++) {
- var folderNode = toolbar.getChild(0);
- do_check_eq(folderNode.type, folderNode.RESULT_TYPE_URI);
- do_check_eq(folderNode.title, this._itemTitle);
- }
- toolbar.containerOpen = false;
-
- // test for our tag
- var tags = PlacesUtils.tagging.getTagsForURI(PlacesUtils._uri(this._itemUrl));
- do_check_eq(tags.length, 1);
- do_check_eq(tags[0], this._tag);
- }
-}
-tests.push(invalidTagChildTest);
-
-function run_test() {
- run_next_test()
-}
-
-add_task(function* () {
- let jsonFile = OS.Path.join(OS.Constants.Path.profileDir, "bookmarks.json");
-
- // populate db
- tests.forEach(function(aTest) {
- aTest.populate();
- // sanity
- aTest.validate();
- });
-
- yield BookmarkJSONUtils.exportToFile(jsonFile);
-
- // clean
- tests.forEach(function(aTest) {
- aTest.clean();
- });
-
- // restore json file
- yield BookmarkJSONUtils.importFromFile(jsonFile, true);
-
- // validate
- tests.forEach(function(aTest) {
- aTest.validate();
- });
-
- // clean up
- yield OS.File.remove(jsonFile);
-});
diff --git a/toolkit/components/places/tests/bookmarks/test_466303-json-remove-backups.js b/toolkit/components/places/tests/bookmarks/test_466303-json-remove-backups.js
deleted file mode 100644
index 3ce0e6ad78..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_466303-json-remove-backups.js
+++ /dev/null
@@ -1,124 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-// Since PlacesBackups.getbackupFiles() is a lazy getter, these tests must
-// run in the given order, to avoid making it out-of-sync.
-
-add_task(function* check_max_backups_is_respected() {
- // Get bookmarkBackups directory
- let backupFolder = yield PlacesBackups.getBackupFolder();
-
- // Create 2 json dummy backups in the past.
- let oldJsonPath = OS.Path.join(backupFolder, "bookmarks-2008-01-01.json");
- let oldJsonFile = yield OS.File.open(oldJsonPath, { truncate: true });
- oldJsonFile.close();
- do_check_true(yield OS.File.exists(oldJsonPath));
-
- let jsonPath = OS.Path.join(backupFolder, "bookmarks-2008-01-31.json");
- let jsonFile = yield OS.File.open(jsonPath, { truncate: true });
- jsonFile.close();
- do_check_true(yield OS.File.exists(jsonPath));
-
- // Export bookmarks to JSON.
- // Allow 2 backups, the older one should be removed.
- yield PlacesBackups.create(2);
-
- let count = 0;
- let lastBackupPath = null;
- let iterator = new OS.File.DirectoryIterator(backupFolder);
- try {
- yield iterator.forEach(aEntry => {
- count++;
- if (PlacesBackups.filenamesRegex.test(aEntry.name))
- lastBackupPath = aEntry.path;
- });
- } finally {
- iterator.close();
- }
-
- do_check_eq(count, 2);
- do_check_neq(lastBackupPath, null);
- do_check_false(yield OS.File.exists(oldJsonPath));
- do_check_true(yield OS.File.exists(jsonPath));
-});
-
-add_task(function* check_max_backups_greater_than_backups() {
- // Get bookmarkBackups directory
- let backupFolder = yield PlacesBackups.getBackupFolder();
-
- // Export bookmarks to JSON.
- // Allow 3 backups, none should be removed.
- yield PlacesBackups.create(3);
-
- let count = 0;
- let lastBackupPath = null;
- let iterator = new OS.File.DirectoryIterator(backupFolder);
- try {
- yield iterator.forEach(aEntry => {
- count++;
- if (PlacesBackups.filenamesRegex.test(aEntry.name))
- lastBackupPath = aEntry.path;
- });
- } finally {
- iterator.close();
- }
- do_check_eq(count, 2);
- do_check_neq(lastBackupPath, null);
-});
-
-add_task(function* check_max_backups_null() {
- // Get bookmarkBackups directory
- let backupFolder = yield PlacesBackups.getBackupFolder();
-
- // Export bookmarks to JSON.
- // Allow infinite backups, none should be removed, a new one is not created
- // since one for today already exists.
- yield PlacesBackups.create(null);
-
- let count = 0;
- let lastBackupPath = null;
- let iterator = new OS.File.DirectoryIterator(backupFolder);
- try {
- yield iterator.forEach(aEntry => {
- count++;
- if (PlacesBackups.filenamesRegex.test(aEntry.name))
- lastBackupPath = aEntry.path;
- });
- } finally {
- iterator.close();
- }
- do_check_eq(count, 2);
- do_check_neq(lastBackupPath, null);
-});
-
-add_task(function* check_max_backups_undefined() {
- // Get bookmarkBackups directory
- let backupFolder = yield PlacesBackups.getBackupFolder();
-
- // Export bookmarks to JSON.
- // Allow infinite backups, none should be removed, a new one is not created
- // since one for today already exists.
- yield PlacesBackups.create();
-
- let count = 0;
- let lastBackupPath = null;
- let iterator = new OS.File.DirectoryIterator(backupFolder);
- try {
- yield iterator.forEach(aEntry => {
- count++;
- if (PlacesBackups.filenamesRegex.test(aEntry.name))
- lastBackupPath = aEntry.path;
- });
- } finally {
- iterator.close();
- }
- do_check_eq(count, 2);
- do_check_neq(lastBackupPath, null);
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/places/tests/bookmarks/test_477583_json-backup-in-future.js b/toolkit/components/places/tests/bookmarks/test_477583_json-backup-in-future.js
deleted file mode 100644
index 116352666c..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_477583_json-backup-in-future.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- do_test_pending();
-
- Task.spawn(function*() {
- let backupFolder = yield PlacesBackups.getBackupFolder();
- let bookmarksBackupDir = new FileUtils.File(backupFolder);
- // Remove all files from backups folder.
- let files = bookmarksBackupDir.directoryEntries;
- while (files.hasMoreElements()) {
- let entry = files.getNext().QueryInterface(Ci.nsIFile);
- entry.remove(false);
- }
-
- // Create a json dummy backup in the future.
- let dateObj = new Date();
- dateObj.setYear(dateObj.getFullYear() + 1);
- let name = PlacesBackups.getFilenameForDate(dateObj);
- do_check_eq(name, "bookmarks-" + PlacesBackups.toISODateString(dateObj) + ".json");
- files = bookmarksBackupDir.directoryEntries;
- while (files.hasMoreElements()) {
- let entry = files.getNext().QueryInterface(Ci.nsIFile);
- if (PlacesBackups.filenamesRegex.test(entry.leafName))
- entry.remove(false);
- }
-
- let futureBackupFile = bookmarksBackupDir.clone();
- futureBackupFile.append(name);
- futureBackupFile.create(Ci.nsILocalFile.NORMAL_FILE_TYPE, 0o600);
- do_check_true(futureBackupFile.exists());
-
- do_check_eq((yield PlacesBackups.getBackupFiles()).length, 0);
-
- yield PlacesBackups.create();
- // Check that a backup for today has been created.
- do_check_eq((yield PlacesBackups.getBackupFiles()).length, 1);
- let mostRecentBackupFile = yield PlacesBackups.getMostRecentBackup();
- do_check_neq(mostRecentBackupFile, null);
- do_check_true(PlacesBackups.filenamesRegex.test(OS.Path.basename(mostRecentBackupFile)));
-
- // Check that future backup has been removed.
- do_check_false(futureBackupFile.exists());
-
- // Cleanup.
- mostRecentBackupFile = new FileUtils.File(mostRecentBackupFile);
- mostRecentBackupFile.remove(false);
- do_check_false(mostRecentBackupFile.exists());
-
- do_test_finished()
- });
-}
diff --git a/toolkit/components/places/tests/bookmarks/test_675416.js b/toolkit/components/places/tests/bookmarks/test_675416.js
deleted file mode 100644
index 08b1c36205..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_675416.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function run_test() {
- /**
- * Requests information to the service, so that bookmark's data is cached.
- * @param aItemId
- * Id of the bookmark to be cached.
- */
- function forceBookmarkCaching(aItemId) {
- PlacesUtils.bookmarks.getFolderIdForItem(aItemId);
- }
-
- let observer = {
- onBeginUpdateBatch: () => forceBookmarkCaching(itemId1),
- onEndUpdateBatch: () => forceBookmarkCaching(itemId1),
- onItemAdded: forceBookmarkCaching,
- onItemChanged: forceBookmarkCaching,
- onItemMoved: forceBookmarkCaching,
- onItemRemoved: function(id) {
- try {
- forceBookmarkCaching(id);
- do_throw("trying to fetch a removed bookmark should throw");
- } catch (ex) {}
- },
- onItemVisited: forceBookmarkCaching,
- QueryInterface: XPCOMUtils.generateQI([Ci.nsINavBookmarkObserver])
- };
- PlacesUtils.bookmarks.addObserver(observer, false);
-
- let folderId1 = PlacesUtils.bookmarks
- .createFolder(PlacesUtils.bookmarksMenuFolderId,
- "Bookmarks",
- PlacesUtils.bookmarks.DEFAULT_INDEX);
- let itemId1 = PlacesUtils.bookmarks
- .insertBookmark(folderId1,
- NetUtil.newURI("http:/www.wired.com/wiredscience"),
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "Wired Science");
-
- PlacesUtils.bookmarks.removeItem(folderId1);
-
- let folderId2 = PlacesUtils.bookmarks
- .createFolder(PlacesUtils.bookmarksMenuFolderId,
- "Science",
- PlacesUtils.bookmarks.DEFAULT_INDEX);
- let folderId3 = PlacesUtils.bookmarks
- .createFolder(folderId2,
- "Blogs",
- PlacesUtils.bookmarks.DEFAULT_INDEX);
- // Check title is correctly reported.
- do_check_eq(PlacesUtils.bookmarks.getItemTitle(folderId3), "Blogs");
- do_check_eq(PlacesUtils.bookmarks.getItemTitle(folderId2), "Science");
-
- PlacesUtils.bookmarks.removeObserver(observer, false);
-}
diff --git a/toolkit/components/places/tests/bookmarks/test_711914.js b/toolkit/components/places/tests/bookmarks/test_711914.js
deleted file mode 100644
index 3712c8a77f..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_711914.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- /**
- * Requests information to the service, so that bookmark's data is cached.
- * @param aItemId
- * Id of the bookmark to be cached.
- */
- function forceBookmarkCaching(aItemId) {
- let parent = PlacesUtils.bookmarks.getFolderIdForItem(aItemId);
- PlacesUtils.bookmarks.getFolderIdForItem(parent);
- }
-
- let observer = {
- onBeginUpdateBatch: () => forceBookmarkCaching(itemId1),
- onEndUpdateBatch: () => forceBookmarkCaching(itemId1),
- onItemAdded: forceBookmarkCaching,
- onItemChanged: forceBookmarkCaching,
- onItemMoved: forceBookmarkCaching,
- onItemRemoved: function (id) {
- try {
- forceBookmarkCaching(id);
- do_throw("trying to fetch a removed bookmark should throw");
- } catch (ex) {}
- },
- onItemVisited: forceBookmarkCaching,
- QueryInterface: XPCOMUtils.generateQI([Ci.nsINavBookmarkObserver])
- };
- PlacesUtils.bookmarks.addObserver(observer, false);
-
- let folder1 = PlacesUtils.bookmarks
- .createFolder(PlacesUtils.bookmarksMenuFolderId,
- "Folder1",
- PlacesUtils.bookmarks.DEFAULT_INDEX);
- let folder2 = PlacesUtils.bookmarks
- .createFolder(folder1,
- "Folder2",
- PlacesUtils.bookmarks.DEFAULT_INDEX);
- PlacesUtils.bookmarks.insertBookmark(folder2,
- NetUtil.newURI("http://mozilla.org/"),
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "Mozilla");
-
- PlacesUtils.bookmarks.removeFolderChildren(folder1);
-
- // Check title is correctly reported.
- do_check_eq(PlacesUtils.bookmarks.getItemTitle(folder1), "Folder1");
- try {
- PlacesUtils.bookmarks.getItemTitle(folder2);
- do_throw("trying to fetch a removed bookmark should throw");
- } catch (ex) {}
-
- PlacesUtils.bookmarks.removeObserver(observer, false);
-}
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
deleted file mode 100644
index c88323478f..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_818584-discard-duplicate-backups.js
+++ /dev/null
@@ -1,59 +0,0 @@
-/* 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/. */
-
-/**
- * Checks that automatically created bookmark backups are discarded if they are
- * duplicate of an existing ones.
- */
-function run_test() {
- run_next_test();
-}
-
-add_task(function*() {
- // Create a backup for yesterday in the backups folder.
- let backupFolder = yield PlacesBackups.getBackupFolder();
- let dateObj = new Date();
- dateObj.setDate(dateObj.getDate() - 1);
- let oldBackupName = PlacesBackups.getFilenameForDate(dateObj);
- let oldBackup = OS.Path.join(backupFolder, oldBackupName);
- let {count: count, hash: hash} = yield BookmarkJSONUtils.exportToFile(oldBackup);
- do_check_true(count > 0);
- do_check_eq(hash.length, 24);
- oldBackupName = oldBackupName.replace(/\.json/, "_" + count + "_" + hash + ".json");
- yield OS.File.move(oldBackup, OS.Path.join(backupFolder, oldBackupName));
-
- // Create a backup.
- // This should just rename the existing backup, so in the end there should be
- // only one backup with today's date.
- yield PlacesBackups.create();
-
- // 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);
- do_check_eq(matches[3], hash);
-
- // Add a bookmark and create another backup.
- let bookmarkId = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.bookmarks.bookmarksMenuFolder,
- uri("http://foo.com"),
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "foo");
- // We must enforce a backup since one for today already exists. The forced
- // backup will replace the existing one.
- yield PlacesBackups.create(undefined, true);
- do_check_eq(backupFiles.length, 1);
- recentBackup = yield PlacesBackups.getMostRecentBackup();
- do_check_neq(recentBackup, OS.Path.join(backupFolder, oldBackupName));
- matches = OS.Path.basename(recentBackup).match(PlacesBackups.filenamesRegex);
- do_check_eq(matches[1], PlacesBackups.toISODateString(new Date()));
- do_check_eq(matches[2], count + 1);
- do_check_neq(matches[3], hash);
-
- // Clean up
- PlacesUtils.bookmarks.removeItem(bookmarkId);
- yield PlacesBackups.create(0);
-});
diff --git a/toolkit/components/places/tests/bookmarks/test_818587_compress-bookmarks-backups.js b/toolkit/components/places/tests/bookmarks/test_818587_compress-bookmarks-backups.js
deleted file mode 100644
index 2c84990b32..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_818587_compress-bookmarks-backups.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* compress_bookmark_backups_test() {
- // Check for jsonlz4 extension
- let todayFilename = PlacesBackups.getFilenameForDate(new Date(2014, 4, 15), true);
- do_check_eq(todayFilename, "bookmarks-2014-05-15.jsonlz4");
-
- yield PlacesBackups.create();
-
- // Check that a backup for today has been created and the regex works fine for lz4.
- do_check_eq((yield PlacesBackups.getBackupFiles()).length, 1);
- let mostRecentBackupFile = yield PlacesBackups.getMostRecentBackup();
- do_check_neq(mostRecentBackupFile, null);
- do_check_true(PlacesBackups.filenamesRegex.test(OS.Path.basename(mostRecentBackupFile)));
-
- // The most recent backup file has to be removed since saveBookmarksToJSONFile
- // will otherwise over-write the current backup, since it will be made on the
- // same date
- yield OS.File.remove(mostRecentBackupFile);
- do_check_false((yield OS.File.exists(mostRecentBackupFile)));
-
- // Check that, if the user created a custom backup out of the default
- // backups folder, it gets copied (compressed) into it.
- let jsonFile = OS.Path.join(OS.Constants.Path.profileDir, "bookmarks.json");
- yield PlacesBackups.saveBookmarksToJSONFile(jsonFile);
- do_check_eq((yield PlacesBackups.getBackupFiles()).length, 1);
-
- // Check if import works from lz4 compressed json
- let uri = NetUtil.newURI("http://www.mozilla.org/en-US/");
- let bm = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- uri,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "bookmark");
-
- // Force create a compressed backup, Remove the bookmark, the restore the backup
- yield PlacesBackups.create(undefined, true);
- let recentBackup = yield PlacesBackups.getMostRecentBackup();
- PlacesUtils.bookmarks.removeItem(bm);
- yield BookmarkJSONUtils.importFromFile(recentBackup, true);
- let root = PlacesUtils.getFolderContents(PlacesUtils.unfiledBookmarksFolderId).root;
- let node = root.getChild(0);
- do_check_eq(node.uri, uri.spec);
-
- root.containerOpen = false;
- PlacesUtils.bookmarks.removeFolderChildren(PlacesUtils.unfiledBookmarksFolderId);
-
- // Cleanup.
- yield OS.File.remove(jsonFile);
-});
diff --git a/toolkit/components/places/tests/bookmarks/test_818593-store-backup-metadata.js b/toolkit/components/places/tests/bookmarks/test_818593-store-backup-metadata.js
deleted file mode 100644
index 4ea07fb393..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_818593-store-backup-metadata.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/* 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/. */
-
-/**
- * To confirm that metadata i.e. bookmark count is set and retrieved for
- * automatic backups.
- */
-function run_test() {
- run_next_test();
-}
-
-add_task(function* test_saveBookmarksToJSONFile_and_create()
-{
- // Add a bookmark
- let uri = NetUtil.newURI("http://getfirefox.com/");
- let bookmarkId =
- PlacesUtils.bookmarks.insertBookmark(
- PlacesUtils.unfiledBookmarksFolderId, uri,
- PlacesUtils.bookmarks.DEFAULT_INDEX, "Get Firefox!");
-
- // Test saveBookmarksToJSONFile()
- let backupFile = FileUtils.getFile("TmpD", ["bookmarks.json"]);
- backupFile.create(Ci.nsILocalFile.NORMAL_FILE_TYPE, parseInt("0600", 8));
-
- let nodeCount = yield PlacesBackups.saveBookmarksToJSONFile(backupFile, true);
- do_check_true(nodeCount > 0);
- do_check_true(backupFile.exists());
- do_check_eq(backupFile.leafName, "bookmarks.json");
-
- // Ensure the backup would be copied to our backups folder when the original
- // backup is saved somewhere else.
- let recentBackup = yield PlacesBackups.getMostRecentBackup();
- let matches = OS.Path.basename(recentBackup).match(PlacesBackups.filenamesRegex);
- do_check_eq(matches[2], nodeCount);
- do_check_eq(matches[3].length, 24);
-
- // Clear all backups in our backups folder.
- yield PlacesBackups.create(0);
- do_check_eq((yield PlacesBackups.getBackupFiles()).length, 0);
-
- // Test create() which saves bookmarks with metadata on the filename.
- yield PlacesBackups.create();
- do_check_eq((yield PlacesBackups.getBackupFiles()).length, 1);
-
- mostRecentBackupFile = yield PlacesBackups.getMostRecentBackup();
- do_check_neq(mostRecentBackupFile, null);
- matches = OS.Path.basename(recentBackup).match(PlacesBackups.filenamesRegex);
- do_check_eq(matches[2], nodeCount);
- do_check_eq(matches[3].length, 24);
-
- // Cleanup
- backupFile.remove(false);
- yield PlacesBackups.create(0);
- PlacesUtils.bookmarks.removeItem(bookmarkId);
-});
-
diff --git a/toolkit/components/places/tests/bookmarks/test_992901-backup-unsorted-hierarchy.js b/toolkit/components/places/tests/bookmarks/test_992901-backup-unsorted-hierarchy.js
deleted file mode 100644
index f5e9f81877..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_992901-backup-unsorted-hierarchy.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/* 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/. */
-
-/**
- * Checks that backups properly include all of the bookmarks if the hierarchy
- * in the database is unordered so that a hierarchy is defined before its
- * ancestor in the bookmarks table.
- */
-function run_test() {
- run_next_test();
-}
-
-add_task(function*() {
- let bm = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- NetUtil.newURI("http://mozilla.org/"),
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "bookmark");
- let f2 = PlacesUtils.bookmarks.createFolder(PlacesUtils.unfiledBookmarksFolderId, "f2",
- PlacesUtils.bookmarks.DEFAULT_INDEX);
- PlacesUtils.bookmarks.moveItem(bm, f2, PlacesUtils.bookmarks.DEFAULT_INDEX);
- let f1 = PlacesUtils.bookmarks.createFolder(PlacesUtils.unfiledBookmarksFolderId, "f1",
- PlacesUtils.bookmarks.DEFAULT_INDEX);
- PlacesUtils.bookmarks.moveItem(f2, f1, PlacesUtils.bookmarks.DEFAULT_INDEX);
-
- // Create a backup.
- yield PlacesBackups.create();
-
- // Remove the bookmarks, then restore the backup.
- PlacesUtils.bookmarks.removeItem(f1);
- yield BookmarkJSONUtils.importFromFile((yield PlacesBackups.getMostRecentBackup()), true);
-
- do_print("Checking first level");
- let root = PlacesUtils.getFolderContents(PlacesUtils.unfiledBookmarksFolderId).root;
- let level1 = root.getChild(0);
- do_check_eq(level1.title, "f1");
- do_print("Checking second level");
- PlacesUtils.asContainer(level1).containerOpen = true
- let level2 = level1.getChild(0);
- do_check_eq(level2.title, "f2");
- do_print("Checking bookmark");
- PlacesUtils.asContainer(level2).containerOpen = true
- let bookmark = level2.getChild(0);
- do_check_eq(bookmark.title, "bookmark");
- level2.containerOpen = false;
- level1.containerOpen = false;
- root.containerOpen = false;
-});
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
deleted file mode 100644
index b900887b56..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_997030-bookmarks-html-encode.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/* 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/. */
-
-/**
- * Checks that we don't encodeURI twice when creating bookmarks.html.
- */
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* () {
- let uri = NetUtil.newURI("http://bt.ktxp.com/search.php?keyword=%E5%A6%84%E6%83%B3%E5%AD%A6%E7%94%9F%E4%BC%9A");
- let bm = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- uri,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "bookmark");
-
- let file = OS.Path.join(OS.Constants.Path.profileDir, "bookmarks.exported.997030.html");
- if ((yield OS.File.exists(file))) {
- yield OS.File.remove(file);
- }
- yield BookmarkHTMLUtils.exportToFile(file);
-
- // Remove the bookmarks, then restore the backup.
- PlacesUtils.bookmarks.removeItem(bm);
- yield BookmarkHTMLUtils.importFromFile(file, true);
-
- do_print("Checking first level");
- let root = PlacesUtils.getFolderContents(PlacesUtils.unfiledBookmarksFolderId).root;
- let node = root.getChild(0);
- do_check_eq(node.uri, uri.spec);
-
- root.containerOpen = false;
- PlacesUtils.bookmarks.removeFolderChildren(PlacesUtils.unfiledBookmarksFolderId);
-});
diff --git a/toolkit/components/places/tests/bookmarks/test_async_observers.js b/toolkit/components/places/tests/bookmarks/test_async_observers.js
deleted file mode 100644
index 86d48ac240..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_async_observers.js
+++ /dev/null
@@ -1,177 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/* This test checks that bookmarks service is correctly forwarding async
- * events like visit or favicon additions. */
-
-const NOW = Date.now() * 1000;
-
-var observer = {
- bookmarks: [],
- observedBookmarks: 0,
- observedVisitId: 0,
- deferred: null,
-
- /**
- * Returns a promise that is resolved when the observer determines that the
- * test can continue. This is required rather than calling run_next_test
- * directly in the observer because there are cases where we must wait for
- * other asynchronous events to be completed in addition to this.
- */
- setupCompletionPromise: function ()
- {
- this.observedBookmarks = 0;
- this.deferred = Promise.defer();
- return this.deferred.promise;
- },
-
- onBeginUpdateBatch: function () {},
- onEndUpdateBatch: function () {},
- onItemAdded: function () {},
- onItemRemoved: function () {},
- onItemMoved: function () {},
- onItemChanged: function(aItemId, aProperty, aIsAnnotation, aNewValue,
- aLastModified, aItemType)
- {
- do_print("Check that we got the correct change information.");
- do_check_neq(this.bookmarks.indexOf(aItemId), -1);
- if (aProperty == "favicon") {
- do_check_false(aIsAnnotation);
- do_check_eq(aNewValue, SMALLPNG_DATA_URI.spec);
- do_check_eq(aLastModified, 0);
- do_check_eq(aItemType, PlacesUtils.bookmarks.TYPE_BOOKMARK);
- }
- else if (aProperty == "cleartime") {
- do_check_false(aIsAnnotation);
- do_check_eq(aNewValue, "");
- do_check_eq(aLastModified, 0);
- do_check_eq(aItemType, PlacesUtils.bookmarks.TYPE_BOOKMARK);
- }
- else {
- do_throw("Unexpected property change " + aProperty);
- }
-
- if (++this.observedBookmarks == this.bookmarks.length) {
- this.deferred.resolve();
- }
- },
- onItemVisited: function(aItemId, aVisitId, aTime)
- {
- do_print("Check that we got the correct visit information.");
- do_check_neq(this.bookmarks.indexOf(aItemId), -1);
- this.observedVisitId = aVisitId;
- do_check_eq(aTime, NOW);
- if (++this.observedBookmarks == this.bookmarks.length) {
- this.deferred.resolve();
- }
- },
-
- QueryInterface: XPCOMUtils.generateQI([
- Ci.nsINavBookmarkObserver,
- ])
-};
-PlacesUtils.bookmarks.addObserver(observer, false);
-
-add_task(function* test_add_visit()
-{
- let observerPromise = observer.setupCompletionPromise();
-
- // Add a visit to the bookmark and wait for the observer.
- let visitId;
- let deferUpdatePlaces = Promise.defer();
- PlacesUtils.asyncHistory.updatePlaces({
- uri: NetUtil.newURI("http://book.ma.rk/"),
- visits: [{ transitionType: TRANSITION_TYPED, visitDate: NOW }]
- }, {
- handleError: function TAV_handleError() {
- deferUpdatePlaces.reject(new Error("Unexpected error in adding visit."));
- },
- handleResult: function (aPlaceInfo) {
- visitId = aPlaceInfo.visits[0].visitId;
- },
- handleCompletion: function TAV_handleCompletion() {
- deferUpdatePlaces.resolve();
- }
- });
-
- // Wait for both the observer and the asynchronous update, in any order.
- yield deferUpdatePlaces.promise;
- yield observerPromise;
-
- // Check that both asynchronous results are consistent.
- do_check_eq(observer.observedVisitId, visitId);
-});
-
-add_task(function* test_add_icon()
-{
- let observerPromise = observer.setupCompletionPromise();
- PlacesUtils.favicons.setAndFetchFaviconForPage(NetUtil.newURI("http://book.ma.rk/"),
- SMALLPNG_DATA_URI, true,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- null,
- Services.scriptSecurityManager.getSystemPrincipal());
- yield observerPromise;
-});
-
-add_task(function* test_remove_page()
-{
- let observerPromise = observer.setupCompletionPromise();
- PlacesUtils.history.removePage(NetUtil.newURI("http://book.ma.rk/"));
- yield observerPromise;
-});
-
-add_task(function cleanup()
-{
- PlacesUtils.bookmarks.removeObserver(observer, false);
-});
-
-add_task(function* shutdown()
-{
- // Check that async observers don't try to create async statements after
- // shutdown. That would cause assertions, since the async thread is gone
- // already. Note that in such a case the notifications are not fired, so we
- // cannot test for them.
- // Put an history notification that triggers AsyncGetBookmarksForURI between
- // asyncClose() and the actual connection closing. Enqueuing a main-thread
- // event just after places-will-close-connection should ensure it runs before
- // places-connection-closed.
- // Notice this code is not using helpers cause it depends on a very specific
- // order, a change in the helpers code could make this test useless.
- let deferred = Promise.defer();
-
- Services.obs.addObserver(function onNotification() {
- Services.obs.removeObserver(onNotification, "places-will-close-connection");
- do_check_true(true, "Observed fake places shutdown");
-
- Services.tm.mainThread.dispatch(() => {
- // WARNING: this is very bad, never use out of testing code.
- PlacesUtils.bookmarks.QueryInterface(Ci.nsINavHistoryObserver)
- .onPageChanged(NetUtil.newURI("http://book.ma.rk/"),
- Ci.nsINavHistoryObserver.ATTRIBUTE_FAVICON,
- "test", "test");
- deferred.resolve(promiseTopicObserved("places-connection-closed"));
- }, Ci.nsIThread.DISPATCH_NORMAL);
- }, "places-will-close-connection", false);
- shutdownPlaces();
-
- yield deferred.promise;
-});
-
-function run_test()
-{
- // Add multiple bookmarks to the same uri.
- observer.bookmarks.push(
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- NetUtil.newURI("http://book.ma.rk/"),
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "Bookmark")
- );
- observer.bookmarks.push(
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.toolbarFolderId,
- NetUtil.newURI("http://book.ma.rk/"),
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "Bookmark")
- );
-
- run_next_test();
-}
diff --git a/toolkit/components/places/tests/bookmarks/test_bmindex.js b/toolkit/components/places/tests/bookmarks/test_bmindex.js
deleted file mode 100644
index c764e43100..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_bmindex.js
+++ /dev/null
@@ -1,124 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
- * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
- * 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/. */
-
-const NUM_BOOKMARKS = 20;
-const NUM_SEPARATORS = 5;
-const NUM_FOLDERS = 10;
-const NUM_ITEMS = NUM_BOOKMARKS + NUM_SEPARATORS + NUM_FOLDERS;
-const MIN_RAND = -5;
-const MAX_RAND = 40;
-
-var bs = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
-
-function check_contiguous_indexes(aBookmarks) {
- var indexes = [];
- aBookmarks.forEach(function(aBookmarkId) {
- let bmIndex = bs.getItemIndex(aBookmarkId);
- dump("Index: " + bmIndex + "\n");
- dump("Checking duplicates\n");
- do_check_eq(indexes.indexOf(bmIndex), -1);
- dump("Checking out of range, found " + aBookmarks.length + " items\n");
- do_check_true(bmIndex >= 0 && bmIndex < aBookmarks.length);
- indexes.push(bmIndex);
- });
- dump("Checking all valid indexes have been used\n");
- do_check_eq(indexes.length, aBookmarks.length);
-}
-
-// main
-function run_test() {
- var bookmarks = [];
- // Insert bookmarks with random indexes.
- for (let i = 0; bookmarks.length < NUM_BOOKMARKS; i++) {
- let randIndex = Math.round(MIN_RAND + (Math.random() * (MAX_RAND - MIN_RAND)));
- try {
- let id = bs.insertBookmark(bs.unfiledBookmarksFolder,
- uri("http://" + i + ".mozilla.org/"),
- randIndex, "Test bookmark " + i);
- if (randIndex < -1)
- do_throw("Creating a bookmark at an invalid index should throw");
- bookmarks.push(id);
- }
- catch (ex) {
- if (randIndex >= -1)
- do_throw("Creating a bookmark at a valid index should not throw");
- }
- }
- check_contiguous_indexes(bookmarks);
-
- // Insert separators with random indexes.
- for (let i = 0; bookmarks.length < NUM_BOOKMARKS + NUM_SEPARATORS; i++) {
- let randIndex = Math.round(MIN_RAND + (Math.random() * (MAX_RAND - MIN_RAND)));
- try {
- let id = bs.insertSeparator(bs.unfiledBookmarksFolder, randIndex);
- if (randIndex < -1)
- do_throw("Creating a separator at an invalid index should throw");
- bookmarks.push(id);
- }
- catch (ex) {
- if (randIndex >= -1)
- do_throw("Creating a separator at a valid index should not throw");
- }
- }
- check_contiguous_indexes(bookmarks);
-
- // Insert folders with random indexes.
- for (let i = 0; bookmarks.length < NUM_ITEMS; i++) {
- let randIndex = Math.round(MIN_RAND + (Math.random() * (MAX_RAND - MIN_RAND)));
- try {
- let id = bs.createFolder(bs.unfiledBookmarksFolder,
- "Test folder " + i, randIndex);
- if (randIndex < -1)
- do_throw("Creating a folder at an invalid index should throw");
- bookmarks.push(id);
- }
- catch (ex) {
- if (randIndex >= -1)
- do_throw("Creating a folder at a valid index should not throw");
- }
- }
- check_contiguous_indexes(bookmarks);
-
- // Execute some random bookmark delete.
- for (let i = 0; i < Math.ceil(NUM_ITEMS / 4); i++) {
- let id = bookmarks.splice(Math.floor(Math.random() * bookmarks.length), 1);
- dump("Removing item with id " + id + "\n");
- bs.removeItem(id);
- }
- check_contiguous_indexes(bookmarks);
-
- // Execute some random bookmark move. This will also try to move it to
- // invalid index values.
- for (let i = 0; i < Math.ceil(NUM_ITEMS / 4); i++) {
- let randIndex = Math.floor(Math.random() * bookmarks.length);
- let id = bookmarks[randIndex];
- let newIndex = Math.round(MIN_RAND + (Math.random() * (MAX_RAND - MIN_RAND)));
- dump("Moving item with id " + id + " to index " + newIndex + "\n");
- try {
- bs.moveItem(id, bs.unfiledBookmarksFolder, newIndex);
- if (newIndex < -1)
- do_throw("Moving an item to a negative index should throw\n");
- }
- catch (ex) {
- if (newIndex >= -1)
- do_throw("Moving an item to a valid index should not throw\n");
- }
-
- }
- check_contiguous_indexes(bookmarks);
-
- // Ensure setItemIndex throws if we pass it a negative index.
- try {
- bs.setItemIndex(bookmarks[0], -1);
- do_throw("setItemIndex should throw for a negative index");
- } catch (ex) {}
- // Ensure setItemIndex throws if we pass it a bad itemId.
- try {
- bs.setItemIndex(0, 5);
- do_throw("setItemIndex should throw for a bad itemId");
- } catch (ex) {}
-}
diff --git a/toolkit/components/places/tests/bookmarks/test_bookmarks.js b/toolkit/components/places/tests/bookmarks/test_bookmarks.js
deleted file mode 100644
index b67482223c..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_bookmarks.js
+++ /dev/null
@@ -1,718 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var bs = PlacesUtils.bookmarks;
-var hs = PlacesUtils.history;
-var anno = PlacesUtils.annotations;
-
-
-var bookmarksObserver = {
- onBeginUpdateBatch: function() {
- this._beginUpdateBatch = true;
- },
- onEndUpdateBatch: function() {
- this._endUpdateBatch = true;
- },
- onItemAdded: function(id, folder, index, itemType, uri, title, dateAdded,
- guid) {
- this._itemAddedId = id;
- this._itemAddedParent = folder;
- this._itemAddedIndex = index;
- this._itemAddedURI = uri;
- this._itemAddedTitle = title;
-
- // Ensure that we've created a guid for this item.
- let stmt = DBConn().createStatement(
- `SELECT guid
- FROM moz_bookmarks
- WHERE id = :item_id`
- );
- stmt.params.item_id = id;
- do_check_true(stmt.executeStep());
- do_check_false(stmt.getIsNull(0));
- do_check_valid_places_guid(stmt.row.guid);
- do_check_eq(stmt.row.guid, guid);
- stmt.finalize();
- },
- onItemRemoved: function(id, folder, index, itemType) {
- this._itemRemovedId = id;
- this._itemRemovedFolder = folder;
- this._itemRemovedIndex = index;
- },
- onItemChanged: function(id, property, isAnnotationProperty, value,
- lastModified, itemType, parentId, guid, parentGuid,
- oldValue) {
- this._itemChangedId = id;
- this._itemChangedProperty = property;
- this._itemChanged_isAnnotationProperty = isAnnotationProperty;
- this._itemChangedValue = value;
- this._itemChangedOldValue = oldValue;
- },
- onItemVisited: function(id, visitID, time) {
- this._itemVisitedId = id;
- this._itemVisitedVistId = visitID;
- this._itemVisitedTime = time;
- },
- onItemMoved: function(id, oldParent, oldIndex, newParent, newIndex,
- itemType) {
- this._itemMovedId = id
- this._itemMovedOldParent = oldParent;
- this._itemMovedOldIndex = oldIndex;
- this._itemMovedNewParent = newParent;
- this._itemMovedNewIndex = newIndex;
- },
- QueryInterface: XPCOMUtils.generateQI([
- Ci.nsINavBookmarkObserver,
- ])
-};
-
-
-// Get bookmarks menu folder id.
-var root = bs.bookmarksMenuFolder;
-// Index at which items should begin.
-var bmStartIndex = 0;
-
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* test_bookmarks() {
- bs.addObserver(bookmarksObserver, false);
-
- // test special folders
- do_check_true(bs.placesRoot > 0);
- do_check_true(bs.bookmarksMenuFolder > 0);
- do_check_true(bs.tagsFolder > 0);
- do_check_true(bs.toolbarFolder > 0);
- do_check_true(bs.unfiledBookmarksFolder > 0);
-
- // test getFolderIdForItem() with bogus item id will throw
- try {
- bs.getFolderIdForItem(0);
- do_throw("getFolderIdForItem accepted bad input");
- } catch (ex) {}
-
- // test getFolderIdForItem() with bogus item id will throw
- try {
- bs.getFolderIdForItem(-1);
- do_throw("getFolderIdForItem accepted bad input");
- } catch (ex) {}
-
- // test root parentage
- do_check_eq(bs.getFolderIdForItem(bs.bookmarksMenuFolder), bs.placesRoot);
- do_check_eq(bs.getFolderIdForItem(bs.tagsFolder), bs.placesRoot);
- do_check_eq(bs.getFolderIdForItem(bs.toolbarFolder), bs.placesRoot);
- do_check_eq(bs.getFolderIdForItem(bs.unfiledBookmarksFolder), bs.placesRoot);
-
- // create a folder to hold all the tests
- // this makes the tests more tolerant of changes to default_places.html
- let testRoot = bs.createFolder(root, "places bookmarks xpcshell tests",
- bs.DEFAULT_INDEX);
- do_check_eq(bookmarksObserver._itemAddedId, testRoot);
- do_check_eq(bookmarksObserver._itemAddedParent, root);
- do_check_eq(bookmarksObserver._itemAddedIndex, bmStartIndex);
- do_check_eq(bookmarksObserver._itemAddedURI, null);
- let testStartIndex = 0;
-
- // test getItemIndex for folders
- do_check_eq(bs.getItemIndex(testRoot), bmStartIndex);
-
- // test getItemType for folders
- do_check_eq(bs.getItemType(testRoot), bs.TYPE_FOLDER);
-
- // insert a bookmark.
- // the time before we insert, in microseconds
- let beforeInsert = Date.now() * 1000;
- do_check_true(beforeInsert > 0);
-
- let newId = bs.insertBookmark(testRoot, uri("http://google.com/"),
- bs.DEFAULT_INDEX, "");
- do_check_eq(bookmarksObserver._itemAddedId, newId);
- do_check_eq(bookmarksObserver._itemAddedParent, testRoot);
- do_check_eq(bookmarksObserver._itemAddedIndex, testStartIndex);
- do_check_true(bookmarksObserver._itemAddedURI.equals(uri("http://google.com/")));
- do_check_eq(bs.getBookmarkURI(newId).spec, "http://google.com/");
-
- let dateAdded = bs.getItemDateAdded(newId);
- // dateAdded can equal beforeInsert
- do_check_true(is_time_ordered(beforeInsert, dateAdded));
-
- // after just inserting, modified should not be set
- let lastModified = bs.getItemLastModified(newId);
- do_check_eq(lastModified, dateAdded);
-
- // The time before we set the title, in microseconds.
- let beforeSetTitle = Date.now() * 1000;
- do_check_true(beforeSetTitle >= beforeInsert);
-
- // Workaround possible VM timers issues moving lastModified and dateAdded
- // to the past.
- lastModified -= 1000;
- bs.setItemLastModified(newId, lastModified);
- dateAdded -= 1000;
- bs.setItemDateAdded(newId, dateAdded);
-
- // set bookmark title
- bs.setItemTitle(newId, "Google");
- do_check_eq(bookmarksObserver._itemChangedId, newId);
- do_check_eq(bookmarksObserver._itemChangedProperty, "title");
- do_check_eq(bookmarksObserver._itemChangedValue, "Google");
-
- // check that dateAdded hasn't changed
- let dateAdded2 = bs.getItemDateAdded(newId);
- do_check_eq(dateAdded2, dateAdded);
-
- // check lastModified after we set the title
- let lastModified2 = bs.getItemLastModified(newId);
- do_print("test setItemTitle");
- do_print("dateAdded = " + dateAdded);
- do_print("beforeSetTitle = " + beforeSetTitle);
- do_print("lastModified = " + lastModified);
- do_print("lastModified2 = " + lastModified2);
- do_check_true(is_time_ordered(lastModified, lastModified2));
- do_check_true(is_time_ordered(dateAdded, lastModified2));
-
- // get item title
- let title = bs.getItemTitle(newId);
- do_check_eq(title, "Google");
-
- // test getItemType for bookmarks
- do_check_eq(bs.getItemType(newId), bs.TYPE_BOOKMARK);
-
- // get item title bad input
- try {
- bs.getItemTitle(-3);
- do_throw("getItemTitle accepted bad input");
- } catch (ex) {}
-
- // get the folder that the bookmark is in
- let folderId = bs.getFolderIdForItem(newId);
- do_check_eq(folderId, testRoot);
-
- // test getItemIndex for bookmarks
- do_check_eq(bs.getItemIndex(newId), testStartIndex);
-
- // create a folder at a specific index
- let workFolder = bs.createFolder(testRoot, "Work", 0);
- do_check_eq(bookmarksObserver._itemAddedId, workFolder);
- do_check_eq(bookmarksObserver._itemAddedParent, testRoot);
- do_check_eq(bookmarksObserver._itemAddedIndex, 0);
- do_check_eq(bookmarksObserver._itemAddedURI, null);
-
- do_check_eq(bs.getItemTitle(workFolder), "Work");
- bs.setItemTitle(workFolder, "Work #");
- do_check_eq(bs.getItemTitle(workFolder), "Work #");
-
- // add item into subfolder, specifying index
- let newId2 = bs.insertBookmark(workFolder,
- uri("http://developer.mozilla.org/"),
- 0, "");
- do_check_eq(bookmarksObserver._itemAddedId, newId2);
- do_check_eq(bookmarksObserver._itemAddedParent, workFolder);
- do_check_eq(bookmarksObserver._itemAddedIndex, 0);
-
- // change item
- bs.setItemTitle(newId2, "DevMo");
- do_check_eq(bookmarksObserver._itemChangedProperty, "title");
-
- // insert item into subfolder
- let newId3 = bs.insertBookmark(workFolder,
- uri("http://msdn.microsoft.com/"),
- bs.DEFAULT_INDEX, "");
- do_check_eq(bookmarksObserver._itemAddedId, newId3);
- do_check_eq(bookmarksObserver._itemAddedParent, workFolder);
- do_check_eq(bookmarksObserver._itemAddedIndex, 1);
-
- // change item
- bs.setItemTitle(newId3, "MSDN");
- do_check_eq(bookmarksObserver._itemChangedProperty, "title");
-
- // remove item
- bs.removeItem(newId2);
- do_check_eq(bookmarksObserver._itemRemovedId, newId2);
- do_check_eq(bookmarksObserver._itemRemovedFolder, workFolder);
- do_check_eq(bookmarksObserver._itemRemovedIndex, 0);
-
- // insert item into subfolder
- let newId4 = bs.insertBookmark(workFolder,
- uri("http://developer.mozilla.org/"),
- bs.DEFAULT_INDEX, "");
- do_check_eq(bookmarksObserver._itemAddedId, newId4);
- do_check_eq(bookmarksObserver._itemAddedParent, workFolder);
- do_check_eq(bookmarksObserver._itemAddedIndex, 1);
-
- // create folder
- let homeFolder = bs.createFolder(testRoot, "Home", bs.DEFAULT_INDEX);
- do_check_eq(bookmarksObserver._itemAddedId, homeFolder);
- do_check_eq(bookmarksObserver._itemAddedParent, testRoot);
- do_check_eq(bookmarksObserver._itemAddedIndex, 2);
-
- // insert item
- let newId5 = bs.insertBookmark(homeFolder, uri("http://espn.com/"),
- bs.DEFAULT_INDEX, "");
- do_check_eq(bookmarksObserver._itemAddedId, newId5);
- do_check_eq(bookmarksObserver._itemAddedParent, homeFolder);
- do_check_eq(bookmarksObserver._itemAddedIndex, 0);
-
- // change item
- bs.setItemTitle(newId5, "ESPN");
- do_check_eq(bookmarksObserver._itemChangedId, newId5);
- do_check_eq(bookmarksObserver._itemChangedProperty, "title");
-
- // insert query item
- let uri6 = uri("place:domain=google.com&type="+
- Ci.nsINavHistoryQueryOptions.RESULTS_AS_SITE_QUERY);
- let newId6 = bs.insertBookmark(testRoot, uri6, bs.DEFAULT_INDEX, "");
- do_check_eq(bookmarksObserver._itemAddedParent, testRoot);
- do_check_eq(bookmarksObserver._itemAddedIndex, 3);
-
- // change item
- bs.setItemTitle(newId6, "Google Sites");
- do_check_eq(bookmarksObserver._itemChangedProperty, "title");
-
- // test getIdForItemAt
- do_check_eq(bs.getIdForItemAt(testRoot, 0), workFolder);
- // wrong parent, should return -1
- do_check_eq(bs.getIdForItemAt(1337, 0), -1);
- // wrong index, should return -1
- do_check_eq(bs.getIdForItemAt(testRoot, 1337), -1);
- // wrong parent and index, should return -1
- do_check_eq(bs.getIdForItemAt(1337, 1337), -1);
-
- // move folder, appending, to different folder
- let oldParentCC = getChildCount(testRoot);
- bs.moveItem(workFolder, homeFolder, bs.DEFAULT_INDEX);
- do_check_eq(bookmarksObserver._itemMovedId, workFolder);
- do_check_eq(bookmarksObserver._itemMovedOldParent, testRoot);
- do_check_eq(bookmarksObserver._itemMovedOldIndex, 0);
- do_check_eq(bookmarksObserver._itemMovedNewParent, homeFolder);
- do_check_eq(bookmarksObserver._itemMovedNewIndex, 1);
-
- // test that the new index is properly stored
- do_check_eq(bs.getItemIndex(workFolder), 1);
- do_check_eq(bs.getFolderIdForItem(workFolder), homeFolder);
-
- // try to get index of the item from within the old parent folder
- // check that it has been really removed from there
- do_check_neq(bs.getIdForItemAt(testRoot, 0), workFolder);
- // check the last item from within the old parent folder
- do_check_neq(bs.getIdForItemAt(testRoot, -1), workFolder);
- // check the index of the item within the new parent folder
- do_check_eq(bs.getIdForItemAt(homeFolder, 1), workFolder);
- // try to get index of the last item within the new parent folder
- do_check_eq(bs.getIdForItemAt(homeFolder, -1), workFolder);
- // XXX expose FolderCount, and check that the old parent has one less child?
- do_check_eq(getChildCount(testRoot), oldParentCC-1);
-
- // move item, appending, to different folder
- bs.moveItem(newId5, testRoot, bs.DEFAULT_INDEX);
- do_check_eq(bookmarksObserver._itemMovedId, newId5);
- do_check_eq(bookmarksObserver._itemMovedOldParent, homeFolder);
- do_check_eq(bookmarksObserver._itemMovedOldIndex, 0);
- do_check_eq(bookmarksObserver._itemMovedNewParent, testRoot);
- do_check_eq(bookmarksObserver._itemMovedNewIndex, 3);
-
- // test get folder's index
- let tmpFolder = bs.createFolder(testRoot, "tmp", 2);
- do_check_eq(bs.getItemIndex(tmpFolder), 2);
-
- // test setKeywordForBookmark
- let kwTestItemId = bs.insertBookmark(testRoot, uri("http://keywordtest.com"),
- bs.DEFAULT_INDEX, "");
- bs.setKeywordForBookmark(kwTestItemId, "bar");
-
- // test getKeywordForBookmark
- let k = bs.getKeywordForBookmark(kwTestItemId);
- do_check_eq("bar", k);
-
- // test getURIForKeyword
- let u = bs.getURIForKeyword("bar");
- do_check_eq("http://keywordtest.com/", u.spec);
-
- // test removeFolderChildren
- // 1) add/remove each child type (bookmark, separator, folder)
- tmpFolder = bs.createFolder(testRoot, "removeFolderChildren",
- bs.DEFAULT_INDEX);
- bs.insertBookmark(tmpFolder, uri("http://foo9.com/"), bs.DEFAULT_INDEX, "");
- bs.createFolder(tmpFolder, "subfolder", bs.DEFAULT_INDEX);
- bs.insertSeparator(tmpFolder, bs.DEFAULT_INDEX);
- // 2) confirm that folder has 3 children
- let options = hs.getNewQueryOptions();
- let query = hs.getNewQuery();
- query.setFolders([tmpFolder], 1);
- try {
- let result = hs.executeQuery(query, options);
- let rootNode = result.root;
- rootNode.containerOpen = true;
- do_check_eq(rootNode.childCount, 3);
- rootNode.containerOpen = false;
- } catch (ex) {
- do_throw("test removeFolderChildren() - querying for children failed: " + ex);
- }
- // 3) remove all children
- bs.removeFolderChildren(tmpFolder);
- // 4) confirm that folder has 0 children
- try {
- result = hs.executeQuery(query, options);
- let rootNode = result.root;
- rootNode.containerOpen = true;
- do_check_eq(rootNode.childCount, 0);
- rootNode.containerOpen = false;
- } catch (ex) {
- do_throw("removeFolderChildren(): " + ex);
- }
-
- // XXX - test folderReadOnly
-
- // test bookmark id in query output
- try {
- options = hs.getNewQueryOptions();
- query = hs.getNewQuery();
- query.setFolders([testRoot], 1);
- let result = hs.executeQuery(query, options);
- let rootNode = result.root;
- rootNode.containerOpen = true;
- let cc = rootNode.childCount;
- do_print("bookmark itemId test: CC = " + cc);
- do_check_true(cc > 0);
- for (let i=0; i < cc; ++i) {
- let node = rootNode.getChild(i);
- if (node.type == node.RESULT_TYPE_FOLDER ||
- node.type == node.RESULT_TYPE_URI ||
- node.type == node.RESULT_TYPE_SEPARATOR ||
- node.type == node.RESULT_TYPE_QUERY) {
- do_check_true(node.itemId > 0);
- }
- else {
- do_check_eq(node.itemId, -1);
- }
- }
- rootNode.containerOpen = false;
- }
- catch (ex) {
- do_throw("bookmarks query: " + ex);
- }
-
- // test that multiple bookmarks with same URI show up right in bookmark
- // folder queries, todo: also to do for complex folder queries
- try {
- // test uri
- let mURI = uri("http://multiple.uris.in.query");
-
- let testFolder = bs.createFolder(testRoot, "test Folder", bs.DEFAULT_INDEX);
- // add 2 bookmarks
- bs.insertBookmark(testFolder, mURI, bs.DEFAULT_INDEX, "title 1");
- bs.insertBookmark(testFolder, mURI, bs.DEFAULT_INDEX, "title 2");
-
- // query
- options = hs.getNewQueryOptions();
- query = hs.getNewQuery();
- query.setFolders([testFolder], 1);
- let result = hs.executeQuery(query, options);
- let rootNode = result.root;
- rootNode.containerOpen = true;
- let cc = rootNode.childCount;
- do_check_eq(cc, 2);
- do_check_eq(rootNode.getChild(0).title, "title 1");
- do_check_eq(rootNode.getChild(1).title, "title 2");
- rootNode.containerOpen = false;
- }
- catch (ex) {
- do_throw("bookmarks query: " + ex);
- }
-
- // test change bookmark uri
- let newId10 = bs.insertBookmark(testRoot, uri("http://foo10.com/"),
- bs.DEFAULT_INDEX, "");
- dateAdded = bs.getItemDateAdded(newId10);
- // after just inserting, modified should not be set
- lastModified = bs.getItemLastModified(newId10);
- do_check_eq(lastModified, dateAdded);
-
- // Workaround possible VM timers issues moving lastModified and dateAdded
- // to the past.
- lastModified -= 1000;
- bs.setItemLastModified(newId10, lastModified);
- dateAdded -= 1000;
- bs.setItemDateAdded(newId10, dateAdded);
-
- bs.changeBookmarkURI(newId10, uri("http://foo11.com/"));
-
- // check that lastModified is set after we change the bookmark uri
- lastModified2 = bs.getItemLastModified(newId10);
- do_print("test changeBookmarkURI");
- do_print("dateAdded = " + dateAdded);
- do_print("lastModified = " + lastModified);
- do_print("lastModified2 = " + lastModified2);
- do_check_true(is_time_ordered(lastModified, lastModified2));
- do_check_true(is_time_ordered(dateAdded, lastModified2));
-
- do_check_eq(bookmarksObserver._itemChangedId, newId10);
- do_check_eq(bookmarksObserver._itemChangedProperty, "uri");
- do_check_eq(bookmarksObserver._itemChangedValue, "http://foo11.com/");
- do_check_eq(bookmarksObserver._itemChangedOldValue, "http://foo10.com/");
-
- // test getBookmarkURI
- let newId11 = bs.insertBookmark(testRoot, uri("http://foo11.com/"),
- bs.DEFAULT_INDEX, "");
- let bmURI = bs.getBookmarkURI(newId11);
- do_check_eq("http://foo11.com/", bmURI.spec);
-
- // test getBookmarkURI with non-bookmark items
- try {
- bs.getBookmarkURI(testRoot);
- do_throw("getBookmarkURI() should throw for non-bookmark items!");
- } catch (ex) {}
-
- // test getItemIndex
- let newId12 = bs.insertBookmark(testRoot, uri("http://foo11.com/"), 1, "");
- let bmIndex = bs.getItemIndex(newId12);
- do_check_eq(1, bmIndex);
-
- // insert a bookmark with title ZZZXXXYYY and then search for it.
- // this test confirms that we can find bookmarks that we haven't visited
- // (which are "hidden") and that we can find by title.
- // see bug #369887 for more details
- let newId13 = bs.insertBookmark(testRoot, uri("http://foobarcheese.com/"),
- bs.DEFAULT_INDEX, "");
- do_check_eq(bookmarksObserver._itemAddedId, newId13);
- do_check_eq(bookmarksObserver._itemAddedParent, testRoot);
- do_check_eq(bookmarksObserver._itemAddedIndex, 11);
-
- // set bookmark title
- bs.setItemTitle(newId13, "ZZZXXXYYY");
- do_check_eq(bookmarksObserver._itemChangedId, newId13);
- do_check_eq(bookmarksObserver._itemChangedProperty, "title");
- do_check_eq(bookmarksObserver._itemChangedValue, "ZZZXXXYYY");
-
- // check if setting an item annotation triggers onItemChanged
- bookmarksObserver._itemChangedId = -1;
- anno.setItemAnnotation(newId3, "test-annotation", "foo", 0, 0);
- do_check_eq(bookmarksObserver._itemChangedId, newId3);
- do_check_eq(bookmarksObserver._itemChangedProperty, "test-annotation");
- do_check_true(bookmarksObserver._itemChanged_isAnnotationProperty);
- do_check_eq(bookmarksObserver._itemChangedValue, "");
-
- // test search on bookmark title ZZZXXXYYY
- try {
- options = hs.getNewQueryOptions();
- options.excludeQueries = 1;
- options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS;
- query = hs.getNewQuery();
- query.searchTerms = "ZZZXXXYYY";
- let result = hs.executeQuery(query, options);
- let rootNode = result.root;
- rootNode.containerOpen = true;
- let cc = rootNode.childCount;
- do_check_eq(cc, 1);
- let node = rootNode.getChild(0);
- do_check_eq(node.title, "ZZZXXXYYY");
- do_check_true(node.itemId > 0);
- rootNode.containerOpen = false;
- }
- catch (ex) {
- do_throw("bookmarks query: " + ex);
- }
-
- // test dateAdded and lastModified properties
- // for a search query
- try {
- options = hs.getNewQueryOptions();
- options.excludeQueries = 1;
- options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS;
- query = hs.getNewQuery();
- query.searchTerms = "ZZZXXXYYY";
- let result = hs.executeQuery(query, options);
- let rootNode = result.root;
- rootNode.containerOpen = true;
- let cc = rootNode.childCount;
- do_check_eq(cc, 1);
- let node = rootNode.getChild(0);
-
- do_check_eq(typeof node.dateAdded, "number");
- do_check_true(node.dateAdded > 0);
-
- do_check_eq(typeof node.lastModified, "number");
- do_check_true(node.lastModified > 0);
-
- rootNode.containerOpen = false;
- }
- catch (ex) {
- do_throw("bookmarks query: " + ex);
- }
-
- // test dateAdded and lastModified properties
- // for a folder query
- try {
- options = hs.getNewQueryOptions();
- query = hs.getNewQuery();
- query.setFolders([testRoot], 1);
- let result = hs.executeQuery(query, options);
- let rootNode = result.root;
- rootNode.containerOpen = true;
- let cc = rootNode.childCount;
- do_check_true(cc > 0);
- for (let i = 0; i < cc; i++) {
- let node = rootNode.getChild(i);
-
- if (node.type == node.RESULT_TYPE_URI) {
- do_check_eq(typeof node.dateAdded, "number");
- do_check_true(node.dateAdded > 0);
-
- do_check_eq(typeof node.lastModified, "number");
- do_check_true(node.lastModified > 0);
- break;
- }
- }
- rootNode.containerOpen = false;
- }
- catch (ex) {
- do_throw("bookmarks query: " + ex);
- }
-
- // check setItemLastModified() and setItemDateAdded()
- let newId14 = bs.insertBookmark(testRoot, uri("http://bar.tld/"),
- bs.DEFAULT_INDEX, "");
- dateAdded = bs.getItemDateAdded(newId14);
- lastModified = bs.getItemLastModified(newId14);
- do_check_eq(lastModified, dateAdded);
- bs.setItemLastModified(newId14, 1234000000000000);
- let fakeLastModified = bs.getItemLastModified(newId14);
- do_check_eq(fakeLastModified, 1234000000000000);
- bs.setItemDateAdded(newId14, 4321000000000000);
- let fakeDateAdded = bs.getItemDateAdded(newId14);
- do_check_eq(fakeDateAdded, 4321000000000000);
-
- // ensure that removing an item removes its annotations
- do_check_true(anno.itemHasAnnotation(newId3, "test-annotation"));
- bs.removeItem(newId3);
- do_check_false(anno.itemHasAnnotation(newId3, "test-annotation"));
-
- // bug 378820
- let uri1 = uri("http://foo.tld/a");
- bs.insertBookmark(testRoot, uri1, bs.DEFAULT_INDEX, "");
- yield PlacesTestUtils.addVisits(uri1);
-
- // bug 646993 - test bookmark titles longer than the maximum allowed length
- let title15 = Array(TITLE_LENGTH_MAX + 5).join("X");
- let title15expected = title15.substring(0, TITLE_LENGTH_MAX);
- let newId15 = bs.insertBookmark(testRoot, uri("http://evil.com/"),
- bs.DEFAULT_INDEX, title15);
-
- do_check_eq(bs.getItemTitle(newId15).length,
- title15expected.length);
- do_check_eq(bookmarksObserver._itemAddedTitle, title15expected);
- // test title length after updates
- bs.setItemTitle(newId15, title15 + " updated");
- do_check_eq(bs.getItemTitle(newId15).length,
- title15expected.length);
- do_check_eq(bookmarksObserver._itemChangedId, newId15);
- do_check_eq(bookmarksObserver._itemChangedProperty, "title");
- do_check_eq(bookmarksObserver._itemChangedValue, title15expected);
-
- testSimpleFolderResult();
-});
-
-function testSimpleFolderResult() {
- // the time before we create a folder, in microseconds
- // Workaround possible VM timers issues subtracting 1us.
- let beforeCreate = Date.now() * 1000 - 1;
- do_check_true(beforeCreate > 0);
-
- // create a folder
- let parent = bs.createFolder(root, "test", bs.DEFAULT_INDEX);
-
- let dateCreated = bs.getItemDateAdded(parent);
- do_print("check that the folder was created with a valid dateAdded");
- do_print("beforeCreate = " + beforeCreate);
- do_print("dateCreated = " + dateCreated);
- do_check_true(is_time_ordered(beforeCreate, dateCreated));
-
- // the time before we insert, in microseconds
- // Workaround possible VM timers issues subtracting 1ms.
- let beforeInsert = Date.now() * 1000 - 1;
- do_check_true(beforeInsert > 0);
-
- // insert a separator
- let sep = bs.insertSeparator(parent, bs.DEFAULT_INDEX);
-
- let dateAdded = bs.getItemDateAdded(sep);
- do_print("check that the separator was created with a valid dateAdded");
- do_print("beforeInsert = " + beforeInsert);
- do_print("dateAdded = " + dateAdded);
- do_check_true(is_time_ordered(beforeInsert, dateAdded));
-
- // re-set item title separately so can test nodes' last modified
- let item = bs.insertBookmark(parent, uri("about:blank"),
- bs.DEFAULT_INDEX, "");
- bs.setItemTitle(item, "test bookmark");
-
- // see above
- let folder = bs.createFolder(parent, "test folder", bs.DEFAULT_INDEX);
- bs.setItemTitle(folder, "test folder");
-
- let longName = Array(TITLE_LENGTH_MAX + 5).join("A");
- let folderLongName = bs.createFolder(parent, longName, bs.DEFAULT_INDEX);
- do_check_eq(bookmarksObserver._itemAddedTitle, longName.substring(0, TITLE_LENGTH_MAX));
-
- let options = hs.getNewQueryOptions();
- let query = hs.getNewQuery();
- query.setFolders([parent], 1);
- let result = hs.executeQuery(query, options);
- let rootNode = result.root;
- rootNode.containerOpen = true;
- do_check_eq(rootNode.childCount, 4);
-
- let node = rootNode.getChild(0);
- do_check_true(node.dateAdded > 0);
- do_check_eq(node.lastModified, node.dateAdded);
- do_check_eq(node.itemId, sep);
- do_check_eq(node.title, "");
- node = rootNode.getChild(1);
- do_check_eq(node.itemId, item);
- do_check_true(node.dateAdded > 0);
- do_check_true(node.lastModified > 0);
- do_check_eq(node.title, "test bookmark");
- node = rootNode.getChild(2);
- do_check_eq(node.itemId, folder);
- do_check_eq(node.title, "test folder");
- do_check_true(node.dateAdded > 0);
- do_check_true(node.lastModified > 0);
- node = rootNode.getChild(3);
- do_check_eq(node.itemId, folderLongName);
- do_check_eq(node.title, longName.substring(0, TITLE_LENGTH_MAX));
- do_check_true(node.dateAdded > 0);
- do_check_true(node.lastModified > 0);
-
- // update with another long title
- bs.setItemTitle(folderLongName, longName + " updated");
- do_check_eq(bookmarksObserver._itemChangedId, folderLongName);
- do_check_eq(bookmarksObserver._itemChangedProperty, "title");
- do_check_eq(bookmarksObserver._itemChangedValue, longName.substring(0, TITLE_LENGTH_MAX));
-
- node = rootNode.getChild(3);
- do_check_eq(node.title, longName.substring(0, TITLE_LENGTH_MAX));
-
- rootNode.containerOpen = false;
-}
-
-function getChildCount(aFolderId) {
- let cc = -1;
- try {
- let options = hs.getNewQueryOptions();
- let query = hs.getNewQuery();
- query.setFolders([aFolderId], 1);
- let result = hs.executeQuery(query, options);
- let rootNode = result.root;
- rootNode.containerOpen = true;
- cc = rootNode.childCount;
- rootNode.containerOpen = false;
- } catch (ex) {
- do_throw("getChildCount failed: " + ex);
- }
- return cc;
-}
diff --git a/toolkit/components/places/tests/bookmarks/test_bookmarks_eraseEverything.js b/toolkit/components/places/tests/bookmarks/test_bookmarks_eraseEverything.js
deleted file mode 100644
index e8414359b5..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_bookmarks_eraseEverything.js
+++ /dev/null
@@ -1,116 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-add_task(function* test_eraseEverything() {
- yield PlacesTestUtils.addVisits({ uri: NetUtil.newURI("http://example.com/") });
- yield PlacesTestUtils.addVisits({ uri: NetUtil.newURI("http://mozilla.org/") });
- let frecencyForExample = frecencyForUrl("http://example.com/");
- let frecencyForMozilla = frecencyForUrl("http://example.com/");
- Assert.ok(frecencyForExample > 0);
- Assert.ok(frecencyForMozilla > 0);
- let unfiledFolder = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER });
- checkBookmarkObject(unfiledFolder);
- let unfiledBookmark = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://example.com/" });
- checkBookmarkObject(unfiledBookmark);
- let unfiledBookmarkInFolder =
- yield PlacesUtils.bookmarks.insert({ parentGuid: unfiledFolder.guid,
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://mozilla.org/" });
- checkBookmarkObject(unfiledBookmarkInFolder);
- PlacesUtils.annotations.setItemAnnotation((yield PlacesUtils.promiseItemId(unfiledBookmarkInFolder.guid)),
- "testanno1", "testvalue1", 0, 0);
-
- let menuFolder = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.menuGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER });
- checkBookmarkObject(menuFolder);
- let menuBookmark = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.menuGuid,
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://example.com/" });
- checkBookmarkObject(menuBookmark);
- let menuBookmarkInFolder =
- yield PlacesUtils.bookmarks.insert({ parentGuid: menuFolder.guid,
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://mozilla.org/" });
- checkBookmarkObject(menuBookmarkInFolder);
- PlacesUtils.annotations.setItemAnnotation((yield PlacesUtils.promiseItemId(menuBookmarkInFolder.guid)),
- "testanno1", "testvalue1", 0, 0);
-
- let toolbarFolder = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER });
- checkBookmarkObject(toolbarFolder);
- let toolbarBookmark = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://example.com/" });
- checkBookmarkObject(toolbarBookmark);
- let toolbarBookmarkInFolder =
- yield PlacesUtils.bookmarks.insert({ parentGuid: toolbarFolder.guid,
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://mozilla.org/" });
- checkBookmarkObject(toolbarBookmarkInFolder);
- PlacesUtils.annotations.setItemAnnotation((yield PlacesUtils.promiseItemId(toolbarBookmarkInFolder.guid)),
- "testanno1", "testvalue1", 0, 0);
-
- yield PlacesTestUtils.promiseAsyncUpdates();
- Assert.ok(frecencyForUrl("http://example.com/") > frecencyForExample);
- Assert.ok(frecencyForUrl("http://example.com/") > frecencyForMozilla);
-
- yield PlacesUtils.bookmarks.eraseEverything();
-
- Assert.equal(frecencyForUrl("http://example.com/"), frecencyForExample);
- Assert.equal(frecencyForUrl("http://example.com/"), frecencyForMozilla);
-
- // Check there are no orphan annotations.
- let conn = yield PlacesUtils.promiseDBConnection();
- let annoAttrs = yield conn.execute(`SELECT id, name FROM moz_anno_attributes`);
- // Bug 1306445 will eventually remove the mobile root anno.
- Assert.equal(annoAttrs.length, 1);
- Assert.equal(annoAttrs[0].getResultByName("name"), PlacesUtils.MOBILE_ROOT_ANNO);
- let annos = rows = yield conn.execute(`SELECT item_id, anno_attribute_id FROM moz_items_annos`);
- Assert.equal(annos.length, 1);
- Assert.equal(annos[0].getResultByName("item_id"), PlacesUtils.mobileFolderId);
- Assert.equal(annos[0].getResultByName("anno_attribute_id"), annoAttrs[0].getResultByName("id"));
-});
-
-add_task(function* test_eraseEverything_roots() {
- yield PlacesUtils.bookmarks.eraseEverything();
-
- // Ensure the roots have not been removed.
- Assert.ok(yield PlacesUtils.bookmarks.fetch(PlacesUtils.bookmarks.unfiledGuid));
- Assert.ok(yield PlacesUtils.bookmarks.fetch(PlacesUtils.bookmarks.toolbarGuid));
- Assert.ok(yield PlacesUtils.bookmarks.fetch(PlacesUtils.bookmarks.menuGuid));
- Assert.ok(yield PlacesUtils.bookmarks.fetch(PlacesUtils.bookmarks.tagsGuid));
- Assert.ok(yield PlacesUtils.bookmarks.fetch(PlacesUtils.bookmarks.rootGuid));
-});
-
-add_task(function* test_eraseEverything_reparented() {
- // Create a folder with 1 bookmark in it...
- let folder1 = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER
- });
- let bookmark1 = yield PlacesUtils.bookmarks.insert({
- parentGuid: folder1.guid,
- url: "http://example.com/"
- });
- // ...and a second folder.
- let folder2 = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER
- });
-
- // Reparent the bookmark to the 2nd folder.
- bookmark1.parentGuid = folder2.guid;
- yield PlacesUtils.bookmarks.update(bookmark1);
-
- // Erase everything.
- yield PlacesUtils.bookmarks.eraseEverything();
-
- // All the above items should no longer be in the GUIDHelper cache.
- for (let guid of [folder1.guid, bookmark1.guid, folder2.guid]) {
- yield Assert.rejects(PlacesUtils.promiseItemId(guid),
- /no item found for the given GUID/);
- }
-});
diff --git a/toolkit/components/places/tests/bookmarks/test_bookmarks_fetch.js b/toolkit/components/places/tests/bookmarks/test_bookmarks_fetch.js
deleted file mode 100644
index 9527f02e61..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_bookmarks_fetch.js
+++ /dev/null
@@ -1,310 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-var gAccumulator = {
- get callback() {
- this.results = [];
- return result => this.results.push(result);
- }
-};
-
-add_task(function* invalid_input_throws() {
- Assert.throws(() => PlacesUtils.bookmarks.fetch(),
- /Input should be a valid object/);
- Assert.throws(() => PlacesUtils.bookmarks.fetch(null),
- /Input should be a valid object/);
-
- Assert.throws(() => PlacesUtils.bookmarks.fetch({ guid: "123456789012",
- parentGuid: "012345678901" }),
- /The following properties were expected: index/);
- Assert.throws(() => PlacesUtils.bookmarks.fetch({ guid: "123456789012",
- index: 0 }),
- /The following properties were expected: parentGuid/);
-
- Assert.throws(() => PlacesUtils.bookmarks.fetch({}),
- /Unexpected number of conditions provided: 0/);
- Assert.throws(() => PlacesUtils.bookmarks.fetch({ guid: "123456789012",
- parentGuid: "012345678901",
- index: 0 }),
- /Unexpected number of conditions provided: 2/);
- Assert.throws(() => PlacesUtils.bookmarks.fetch({ guid: "123456789012",
- url: "http://example.com"}),
- /Unexpected number of conditions provided: 2/);
-
- Assert.throws(() => PlacesUtils.bookmarks.fetch("test"),
- /Invalid value for property 'guid'/);
- Assert.throws(() => PlacesUtils.bookmarks.fetch(123),
- /Invalid value for property 'guid'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.fetch({ guid: "test" }),
- /Invalid value for property 'guid'/);
- Assert.throws(() => PlacesUtils.bookmarks.fetch({ guid: null }),
- /Invalid value for property 'guid'/);
- Assert.throws(() => PlacesUtils.bookmarks.fetch({ guid: 123 }),
- /Invalid value for property 'guid'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.fetch({ parentGuid: "test",
- index: 0 }),
- /Invalid value for property 'parentGuid'/);
- Assert.throws(() => PlacesUtils.bookmarks.fetch({ parentGuid: null,
- index: 0 }),
- /Invalid value for property 'parentGuid'/);
- Assert.throws(() => PlacesUtils.bookmarks.fetch({ parentGuid: 123,
- index: 0 }),
- /Invalid value for property 'parentGuid'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.fetch({ parentGuid: "123456789012",
- index: "0" }),
- /Invalid value for property 'index'/);
- Assert.throws(() => PlacesUtils.bookmarks.fetch({ parentGuid: "123456789012",
- index: null }),
- /Invalid value for property 'index'/);
- Assert.throws(() => PlacesUtils.bookmarks.fetch({ parentGuid: "123456789012",
- index: -10 }),
- /Invalid value for property 'index'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.fetch({ url: "http://te st/" }),
- /Invalid value for property 'url'/);
- Assert.throws(() => PlacesUtils.bookmarks.fetch({ url: null }),
- /Invalid value for property 'url'/);
- Assert.throws(() => PlacesUtils.bookmarks.fetch({ url: -10 }),
- /Invalid value for property 'url'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.fetch("123456789012", "test"),
- /onResult callback must be a valid function/);
- Assert.throws(() => PlacesUtils.bookmarks.fetch("123456789012", {}),
- /onResult callback must be a valid function/);
-});
-
-add_task(function* fetch_nonexistent_guid() {
- let bm = yield PlacesUtils.bookmarks.fetch({ guid: "123456789012" },
- gAccumulator.callback);
- Assert.equal(bm, null);
- Assert.equal(gAccumulator.results.length, 0);
-});
-
-add_task(function* fetch_bookmark() {
- let bm1 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://example.com/",
- title: "a bookmark" });
- checkBookmarkObject(bm1);
-
- let bm2 = yield PlacesUtils.bookmarks.fetch(bm1.guid,
- gAccumulator.callback);
- checkBookmarkObject(bm2);
- Assert.equal(gAccumulator.results.length, 1);
- checkBookmarkObject(gAccumulator.results[0]);
- Assert.deepEqual(gAccumulator.results[0], bm1);
-
- Assert.deepEqual(bm1, bm2);
- Assert.equal(bm2.parentGuid, PlacesUtils.bookmarks.unfiledGuid);
- Assert.equal(bm2.index, 0);
- Assert.deepEqual(bm2.dateAdded, bm2.lastModified);
- Assert.equal(bm2.type, PlacesUtils.bookmarks.TYPE_BOOKMARK);
- Assert.equal(bm2.url.href, "http://example.com/");
- Assert.equal(bm2.title, "a bookmark");
-
- yield PlacesUtils.bookmarks.remove(bm1.guid);
-});
-
-add_task(function* fetch_bookmar_empty_title() {
- let bm1 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://example.com/",
- title: "" });
- checkBookmarkObject(bm1);
-
- let bm2 = yield PlacesUtils.bookmarks.fetch(bm1.guid);
- checkBookmarkObject(bm2);
-
- Assert.deepEqual(bm1, bm2);
- Assert.equal(bm2.index, 0);
- Assert.ok(!("title" in bm2));
-
- yield PlacesUtils.bookmarks.remove(bm1.guid);
-});
-
-add_task(function* fetch_folder() {
- let bm1 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: "a folder" });
- checkBookmarkObject(bm1);
-
- let bm2 = yield PlacesUtils.bookmarks.fetch(bm1.guid);
- checkBookmarkObject(bm2);
-
- Assert.deepEqual(bm1, bm2);
- Assert.equal(bm2.parentGuid, PlacesUtils.bookmarks.unfiledGuid);
- Assert.equal(bm2.index, 0);
- Assert.deepEqual(bm2.dateAdded, bm2.lastModified);
- Assert.equal(bm2.type, PlacesUtils.bookmarks.TYPE_FOLDER);
- Assert.equal(bm2.title, "a folder");
- Assert.ok(!("url" in bm2));
-
- yield PlacesUtils.bookmarks.remove(bm1.guid);
-});
-
-add_task(function* fetch_folder_empty_title() {
- let bm1 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: "" });
- checkBookmarkObject(bm1);
-
- let bm2 = yield PlacesUtils.bookmarks.fetch(bm1.guid);
- checkBookmarkObject(bm2);
-
- Assert.deepEqual(bm1, bm2);
- Assert.equal(bm2.index, 0);
- Assert.ok(!("title" in bm2));
-
- yield PlacesUtils.bookmarks.remove(bm1.guid);
-});
-
-add_task(function* fetch_separator() {
- let bm1 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_SEPARATOR });
- checkBookmarkObject(bm1);
-
- let bm2 = yield PlacesUtils.bookmarks.fetch(bm1.guid);
- checkBookmarkObject(bm2);
-
- Assert.deepEqual(bm1, bm2);
- Assert.equal(bm2.parentGuid, PlacesUtils.bookmarks.unfiledGuid);
- Assert.equal(bm2.index, 0);
- Assert.deepEqual(bm2.dateAdded, bm2.lastModified);
- Assert.equal(bm2.type, PlacesUtils.bookmarks.TYPE_SEPARATOR);
- Assert.ok(!("url" in bm2));
- Assert.ok(!("title" in bm2));
-
- yield PlacesUtils.bookmarks.remove(bm1.guid);
-});
-
-add_task(function* fetch_byposition_nonexisting_parentGuid() {
- let bm = yield PlacesUtils.bookmarks.fetch({ parentGuid: "123456789012",
- index: 0 },
- gAccumulator.callback);
- Assert.equal(bm, null);
- Assert.equal(gAccumulator.results.length, 0);
-});
-
-add_task(function* fetch_byposition_nonexisting_index() {
- let bm = yield PlacesUtils.bookmarks.fetch({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- index: 100 },
- gAccumulator.callback);
- Assert.equal(bm, null);
- Assert.equal(gAccumulator.results.length, 0);
-});
-
-add_task(function* fetch_byposition() {
- let bm1 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://example.com/",
- title: "a bookmark" });
- checkBookmarkObject(bm1);
-
- let bm2 = yield PlacesUtils.bookmarks.fetch({ parentGuid: bm1.parentGuid,
- index: bm1.index },
- gAccumulator.callback);
- checkBookmarkObject(bm2);
- Assert.equal(gAccumulator.results.length, 1);
- checkBookmarkObject(gAccumulator.results[0]);
- Assert.deepEqual(gAccumulator.results[0], bm1);
-
- Assert.deepEqual(bm1, bm2);
- Assert.equal(bm2.parentGuid, PlacesUtils.bookmarks.unfiledGuid);
- Assert.equal(bm2.index, 0);
- Assert.deepEqual(bm2.dateAdded, bm2.lastModified);
- Assert.equal(bm2.type, PlacesUtils.bookmarks.TYPE_BOOKMARK);
- Assert.equal(bm2.url.href, "http://example.com/");
- Assert.equal(bm2.title, "a bookmark");
-});
-
-add_task(function* fetch_byposition_default_index() {
- let bm1 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://example.com/last",
- title: "last child" });
- checkBookmarkObject(bm1);
-
- let bm2 = yield PlacesUtils.bookmarks.fetch({ parentGuid: bm1.parentGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX },
- gAccumulator.callback);
- checkBookmarkObject(bm2);
- Assert.equal(gAccumulator.results.length, 1);
- checkBookmarkObject(gAccumulator.results[0]);
- Assert.deepEqual(gAccumulator.results[0], bm1);
-
- Assert.deepEqual(bm1, bm2);
- Assert.equal(bm2.parentGuid, PlacesUtils.bookmarks.unfiledGuid);
- Assert.equal(bm2.index, 1);
- Assert.deepEqual(bm2.dateAdded, bm2.lastModified);
- Assert.equal(bm2.type, PlacesUtils.bookmarks.TYPE_BOOKMARK);
- Assert.equal(bm2.url.href, "http://example.com/last");
- Assert.equal(bm2.title, "last child");
-
- yield PlacesUtils.bookmarks.remove(bm1.guid);
-});
-
-add_task(function* fetch_byurl_nonexisting() {
- let bm = yield PlacesUtils.bookmarks.fetch({ url: "http://nonexisting.com/" },
- gAccumulator.callback);
- Assert.equal(bm, null);
- Assert.equal(gAccumulator.results.length, 0);
-});
-
-add_task(function* fetch_byurl() {
- let bm1 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://byurl.com/",
- title: "a bookmark" });
- checkBookmarkObject(bm1);
-
- // Also ensure that fecth-by-url excludes the tags folder.
- PlacesUtils.tagging.tagURI(uri(bm1.url.href), ["Test Tag"]);
-
- let bm2 = yield PlacesUtils.bookmarks.fetch({ url: bm1.url },
- gAccumulator.callback);
- checkBookmarkObject(bm2);
- Assert.equal(gAccumulator.results.length, 1);
- checkBookmarkObject(gAccumulator.results[0]);
- Assert.deepEqual(gAccumulator.results[0], bm1);
-
- Assert.deepEqual(bm1, bm2);
- Assert.equal(bm2.parentGuid, PlacesUtils.bookmarks.unfiledGuid);
- Assert.deepEqual(bm2.dateAdded, bm2.lastModified);
- Assert.equal(bm2.type, PlacesUtils.bookmarks.TYPE_BOOKMARK);
- Assert.equal(bm2.url.href, "http://byurl.com/");
- Assert.equal(bm2.title, "a bookmark");
-
- let bm3 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://byurl.com/",
- title: "a bookmark" });
- let bm4 = yield PlacesUtils.bookmarks.fetch({ url: bm1.url },
- gAccumulator.callback);
- checkBookmarkObject(bm4);
- Assert.deepEqual(bm3, bm4);
- Assert.equal(gAccumulator.results.length, 2);
- gAccumulator.results.forEach(checkBookmarkObject);
- Assert.deepEqual(gAccumulator.results[0], bm4);
-
- // After an update the returned bookmark should change.
- yield PlacesUtils.bookmarks.update({ guid: bm1.guid, title: "new title" });
- let bm5 = yield PlacesUtils.bookmarks.fetch({ url: bm1.url },
- gAccumulator.callback);
- checkBookmarkObject(bm5);
- // Cannot use deepEqual cause lastModified changed.
- Assert.equal(bm1.guid, bm5.guid);
- Assert.ok(bm5.lastModified > bm1.lastModified);
- Assert.equal(gAccumulator.results.length, 2);
- gAccumulator.results.forEach(checkBookmarkObject);
- Assert.deepEqual(gAccumulator.results[0], bm5);
-
- // cleanup
- PlacesUtils.tagging.untagURI(uri(bm1.url.href), ["Test Tag"]);
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/places/tests/bookmarks/test_bookmarks_getRecent.js b/toolkit/components/places/tests/bookmarks/test_bookmarks_getRecent.js
deleted file mode 100644
index 35166bd95d..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_bookmarks_getRecent.js
+++ /dev/null
@@ -1,44 +0,0 @@
-add_task(function* invalid_input_throws() {
- Assert.throws(() => PlacesUtils.bookmarks.getRecent(),
- /numberOfItems argument is required/);
- Assert.throws(() => PlacesUtils.bookmarks.getRecent("abc"),
- /numberOfItems argument must be an integer/);
- Assert.throws(() => PlacesUtils.bookmarks.getRecent(1.2),
- /numberOfItems argument must be an integer/);
- Assert.throws(() => PlacesUtils.bookmarks.getRecent(0),
- /numberOfItems argument must be greater than zero/);
- Assert.throws(() => PlacesUtils.bookmarks.getRecent(-1),
- /numberOfItems argument must be greater than zero/);
-});
-
-add_task(function* getRecent_returns_recent_bookmarks() {
- yield PlacesUtils.bookmarks.eraseEverything();
-
- let bm1 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "http://example.com/",
- title: "a bookmark" });
- let bm2 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "http://example.org/path",
- title: "another bookmark" });
- let bm3 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "http://example.net/",
- title: "another bookmark" });
- let bm4 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "http://example.net/path",
- title: "yet another bookmark" });
- checkBookmarkObject(bm1);
- checkBookmarkObject(bm2);
- checkBookmarkObject(bm3);
- checkBookmarkObject(bm4);
-
- let results = yield PlacesUtils.bookmarks.getRecent(3);
- Assert.equal(results.length, 3);
- checkBookmarkObject(results[0]);
- Assert.deepEqual(bm4, results[0]);
- checkBookmarkObject(results[1]);
- Assert.deepEqual(bm3, results[1]);
- checkBookmarkObject(results[2]);
- Assert.deepEqual(bm2, results[2]);
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
diff --git a/toolkit/components/places/tests/bookmarks/test_bookmarks_insert.js b/toolkit/components/places/tests/bookmarks/test_bookmarks_insert.js
deleted file mode 100644
index 0f772a92fc..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_bookmarks_insert.js
+++ /dev/null
@@ -1,264 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-add_task(function* invalid_input_throws() {
- Assert.throws(() => PlacesUtils.bookmarks.insert(),
- /Input should be a valid object/);
- Assert.throws(() => PlacesUtils.bookmarks.insert(null),
- /Input should be a valid object/);
- Assert.throws(() => PlacesUtils.bookmarks.insert({}),
- /The following properties were expected/);
-
- Assert.throws(() => PlacesUtils.bookmarks.insert({ guid: "test" }),
- /Invalid value for property 'guid'/);
- Assert.throws(() => PlacesUtils.bookmarks.insert({ guid: null }),
- /Invalid value for property 'guid'/);
- Assert.throws(() => PlacesUtils.bookmarks.insert({ guid: 123 }),
- /Invalid value for property 'guid'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.insert({ parentGuid: "test" }),
- /Invalid value for property 'parentGuid'/);
- Assert.throws(() => PlacesUtils.bookmarks.insert({ parentGuid: null }),
- /Invalid value for property 'parentGuid'/);
- Assert.throws(() => PlacesUtils.bookmarks.insert({ parentGuid: 123 }),
- /Invalid value for property 'parentGuid'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.insert({ index: "1" }),
- /Invalid value for property 'index'/);
- Assert.throws(() => PlacesUtils.bookmarks.insert({ index: -10 }),
- /Invalid value for property 'index'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.insert({ dateAdded: -10 }),
- /Invalid value for property 'dateAdded'/);
- Assert.throws(() => PlacesUtils.bookmarks.insert({ dateAdded: "today" }),
- /Invalid value for property 'dateAdded'/);
- Assert.throws(() => PlacesUtils.bookmarks.insert({ dateAdded: Date.now() }),
- /Invalid value for property 'dateAdded'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.insert({ lastModified: -10 }),
- /Invalid value for property 'lastModified'/);
- Assert.throws(() => PlacesUtils.bookmarks.insert({ lastModified: "today" }),
- /Invalid value for property 'lastModified'/);
- Assert.throws(() => PlacesUtils.bookmarks.insert({ lastModified: Date.now() }),
- /Invalid value for property 'lastModified'/);
- let time = new Date();
- let future = new Date(time + 86400000);
- Assert.throws(() => PlacesUtils.bookmarks.insert({ dateAdded: future,
- lastModified: time }),
- /Invalid value for property 'dateAdded'/);
- let past = new Date(time - 86400000);
- Assert.throws(() => PlacesUtils.bookmarks.insert({ lastModified: past }),
- /Invalid value for property 'lastModified'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.insert({ type: -1 }),
- /Invalid value for property 'type'/);
- Assert.throws(() => PlacesUtils.bookmarks.insert({ type: 100 }),
- /Invalid value for property 'type'/);
- Assert.throws(() => PlacesUtils.bookmarks.insert({ type: "bookmark" }),
- /Invalid value for property 'type'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- title: -1 }),
- /Invalid value for property 'title'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: 10 }),
- /Invalid value for property 'url'/);
- Assert.throws(() => PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://te st" }),
- /Invalid value for property 'url'/);
- let longurl = "http://www.example.com/";
- for (let i = 0; i < 65536; i++) {
- longurl += "a";
- }
- Assert.throws(() => PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: longurl }),
- /Invalid value for property 'url'/);
- Assert.throws(() => PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: NetUtil.newURI(longurl) }),
- /Invalid value for property 'url'/);
- Assert.throws(() => PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "te st" }),
- /Invalid value for property 'url'/);
-});
-
-add_task(function* invalid_properties_for_bookmark_type() {
- Assert.throws(() => PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_FOLDER,
- url: "http://www.moz.com/" }),
- /Invalid value for property 'url'/);
- Assert.throws(() => PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_SEPARATOR,
- url: "http://www.moz.com/" }),
- /Invalid value for property 'url'/);
- Assert.throws(() => PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_SEPARATOR,
- title: "test" }),
- /Invalid value for property 'title'/);
-});
-
-add_task(function* long_title_trim() {
- let longtitle = "a";
- for (let i = 0; i < 4096; i++) {
- longtitle += "a";
- }
- let bm = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: longtitle });
- checkBookmarkObject(bm);
- Assert.equal(bm.parentGuid, PlacesUtils.bookmarks.unfiledGuid);
- Assert.equal(bm.index, 0);
- Assert.equal(bm.dateAdded, bm.lastModified);
- Assert.equal(bm.type, PlacesUtils.bookmarks.TYPE_FOLDER);
- Assert.equal(bm.title.length, 4096, "title should have been trimmed");
- Assert.ok(!("url" in bm), "url should not be set");
-});
-
-add_task(function* create_separator() {
- let bm = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_SEPARATOR,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX });
- checkBookmarkObject(bm);
- Assert.equal(bm.parentGuid, PlacesUtils.bookmarks.unfiledGuid);
- Assert.equal(bm.index, 1);
- Assert.equal(bm.dateAdded, bm.lastModified);
- Assert.equal(bm.type, PlacesUtils.bookmarks.TYPE_SEPARATOR);
- Assert.ok(!("title" in bm), "title should not be set");
-});
-
-add_task(function* create_separator_w_title_fail() {
- try {
- yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_SEPARATOR,
- title: "a separator" });
- Assert.ok(false, "Trying to set title for a separator should reject");
- } catch (ex) {}
-});
-
-add_task(function* create_separator_invalid_parent_fail() {
- try {
- yield PlacesUtils.bookmarks.insert({ parentGuid: "123456789012",
- type: PlacesUtils.bookmarks.TYPE_SEPARATOR,
- title: "a separator" });
- Assert.ok(false, "Trying to create an item in a non existing parent reject");
- } catch (ex) {}
-});
-
-add_task(function* create_separator_given_guid() {
- let bm = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_SEPARATOR,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- guid: "123456789012" });
- checkBookmarkObject(bm);
- Assert.equal(bm.guid, "123456789012");
- Assert.equal(bm.parentGuid, PlacesUtils.bookmarks.unfiledGuid);
- Assert.equal(bm.index, 2);
- Assert.equal(bm.dateAdded, bm.lastModified);
- Assert.equal(bm.type, PlacesUtils.bookmarks.TYPE_SEPARATOR);
- Assert.ok(!("title" in bm), "title should not be set");
-});
-
-add_task(function* create_item_given_guid_no_type_fail() {
- try {
- yield PlacesUtils.bookmarks.insert({ parentGuid: "123456789012" });
- Assert.ok(false, "Trying to create an item with a given guid but no type should reject");
- } catch (ex) {}
-});
-
-add_task(function* create_separator_big_index() {
- let bm = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_SEPARATOR,
- index: 9999 });
- checkBookmarkObject(bm);
- Assert.equal(bm.parentGuid, PlacesUtils.bookmarks.unfiledGuid);
- Assert.equal(bm.index, 3);
- Assert.equal(bm.dateAdded, bm.lastModified);
- Assert.equal(bm.type, PlacesUtils.bookmarks.TYPE_SEPARATOR);
- Assert.ok(!("title" in bm), "title should not be set");
-});
-
-add_task(function* create_separator_given_dateAdded() {
- let time = new Date();
- let past = new Date(time - 86400000);
- let bm = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_SEPARATOR,
- dateAdded: past });
- checkBookmarkObject(bm);
- Assert.equal(bm.dateAdded, past);
- Assert.equal(bm.lastModified, past);
-});
-
-add_task(function* create_folder() {
- let bm = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER });
- checkBookmarkObject(bm);
- Assert.equal(bm.parentGuid, PlacesUtils.bookmarks.unfiledGuid);
- Assert.equal(bm.dateAdded, bm.lastModified);
- Assert.equal(bm.type, PlacesUtils.bookmarks.TYPE_FOLDER);
- Assert.ok(!("title" in bm), "title should not be set");
-
- // And then create a nested folder.
- let parentGuid = bm.guid;
- bm = yield PlacesUtils.bookmarks.insert({ parentGuid: parentGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: "a folder" });
- checkBookmarkObject(bm);
- Assert.equal(bm.parentGuid, parentGuid);
- Assert.equal(bm.index, 0);
- Assert.equal(bm.type, PlacesUtils.bookmarks.TYPE_FOLDER);
- Assert.strictEqual(bm.title, "a folder");
-});
-
-add_task(function* create_bookmark() {
- let bm = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER });
- let parentGuid = bm.guid;
-
- bm = yield PlacesUtils.bookmarks.insert({ parentGuid: parentGuid,
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://example.com/",
- title: "a bookmark" });
- checkBookmarkObject(bm);
- Assert.equal(bm.parentGuid, parentGuid);
- Assert.equal(bm.index, 0);
- Assert.equal(bm.type, PlacesUtils.bookmarks.TYPE_BOOKMARK);
- Assert.equal(bm.url.href, "http://example.com/");
- Assert.equal(bm.title, "a bookmark");
-
- // Check parent lastModified.
- let parent = yield PlacesUtils.bookmarks.fetch({ guid: bm.parentGuid });
- Assert.deepEqual(parent.lastModified, bm.dateAdded);
-
- bm = yield PlacesUtils.bookmarks.insert({ parentGuid: parentGuid,
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: new URL("http://example.com/") });
- checkBookmarkObject(bm);
- Assert.equal(bm.parentGuid, parentGuid);
- Assert.equal(bm.index, 1);
- Assert.equal(bm.type, PlacesUtils.bookmarks.TYPE_BOOKMARK);
- Assert.equal(bm.url.href, "http://example.com/");
- Assert.ok(!("title" in bm), "title should not be set");
-});
-
-add_task(function* create_bookmark_frecency() {
- let bm = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://example.com/",
- title: "a bookmark" });
- checkBookmarkObject(bm);
-
- yield PlacesTestUtils.promiseAsyncUpdates();
- Assert.ok(frecencyForUrl(bm.url) > 0, "Check frecency has been updated")
-});
-
-add_task(function* create_bookmark_without_type() {
- let bm = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "http://example.com/",
- title: "a bookmark" });
- checkBookmarkObject(bm);
- Assert.equal(bm.parentGuid, PlacesUtils.bookmarks.unfiledGuid);
- Assert.equal(bm.type, PlacesUtils.bookmarks.TYPE_BOOKMARK);
- Assert.equal(bm.url.href, "http://example.com/");
- Assert.equal(bm.title, "a bookmark");
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/places/tests/bookmarks/test_bookmarks_notifications.js b/toolkit/components/places/tests/bookmarks/test_bookmarks_notifications.js
deleted file mode 100644
index 02787425d9..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_bookmarks_notifications.js
+++ /dev/null
@@ -1,527 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-add_task(function* insert_separator_notification() {
- let observer = expectNotifications();
- let bm = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_SEPARATOR,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid});
- let itemId = yield PlacesUtils.promiseItemId(bm.guid);
- let parentId = yield PlacesUtils.promiseItemId(bm.parentGuid);
- observer.check([ { name: "onItemAdded",
- arguments: [ itemId, parentId, bm.index, bm.type,
- null, null, bm.dateAdded,
- bm.guid, bm.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] }
- ]);
-});
-
-add_task(function* insert_folder_notification() {
- let observer = expectNotifications();
- let bm = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_FOLDER,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- title: "a folder" });
- let itemId = yield PlacesUtils.promiseItemId(bm.guid);
- let parentId = yield PlacesUtils.promiseItemId(bm.parentGuid);
- observer.check([ { name: "onItemAdded",
- arguments: [ itemId, parentId, bm.index, bm.type,
- null, bm.title, bm.dateAdded,
- bm.guid, bm.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] }
- ]);
-});
-
-add_task(function* insert_folder_notitle_notification() {
- let observer = expectNotifications();
- let bm = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_FOLDER,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid });
- let itemId = yield PlacesUtils.promiseItemId(bm.guid);
- let parentId = yield PlacesUtils.promiseItemId(bm.parentGuid);
- observer.check([ { name: "onItemAdded",
- arguments: [ itemId, parentId, bm.index, bm.type,
- null, null, bm.dateAdded,
- bm.guid, bm.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] }
- ]);
-});
-
-add_task(function* insert_bookmark_notification() {
- let observer = expectNotifications();
- let bm = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: new URL("http://example.com/"),
- title: "a bookmark" });
- let itemId = yield PlacesUtils.promiseItemId(bm.guid);
- let parentId = yield PlacesUtils.promiseItemId(bm.parentGuid);
- observer.check([ { name: "onItemAdded",
- arguments: [ itemId, parentId, bm.index, bm.type,
- bm.url, bm.title, bm.dateAdded,
- bm.guid, bm.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] }
- ]);
-});
-
-add_task(function* insert_bookmark_notitle_notification() {
- let observer = expectNotifications();
- let bm = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: new URL("http://example.com/") });
- let itemId = yield PlacesUtils.promiseItemId(bm.guid);
- let parentId = yield PlacesUtils.promiseItemId(bm.parentGuid);
- observer.check([ { name: "onItemAdded",
- arguments: [ itemId, parentId, bm.index, bm.type,
- bm.url, null, bm.dateAdded,
- bm.guid, bm.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] }
- ]);
-});
-
-add_task(function* insert_bookmark_tag_notification() {
- let bm = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: new URL("http://tag.example.com/") });
- let itemId = yield PlacesUtils.promiseItemId(bm.guid);
- let parentId = yield PlacesUtils.promiseItemId(bm.parentGuid);
-
- let tagFolder = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_FOLDER,
- parentGuid: PlacesUtils.bookmarks.tagsGuid,
- title: "tag" });
- let observer = expectNotifications();
- let tag = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: tagFolder.guid,
- url: new URL("http://tag.example.com/") });
- let tagId = yield PlacesUtils.promiseItemId(tag.guid);
- let tagParentId = yield PlacesUtils.promiseItemId(tag.parentGuid);
-
- observer.check([ { name: "onItemAdded",
- arguments: [ tagId, tagParentId, tag.index, tag.type,
- tag.url, null, tag.dateAdded,
- tag.guid, tag.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] },
- { name: "onItemChanged",
- arguments: [ itemId, "tags", false, "",
- bm.lastModified, bm.type, parentId,
- bm.guid, bm.parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] }
- ]);
-});
-
-add_task(function* update_bookmark_lastModified() {
- let bm = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: new URL("http://lastmod.example.com/") });
- let observer = expectNotifications();
- bm = yield PlacesUtils.bookmarks.update({ guid: bm.guid,
- lastModified: new Date() });
- let itemId = yield PlacesUtils.promiseItemId(bm.guid);
- let parentId = yield PlacesUtils.promiseItemId(bm.parentGuid);
-
- observer.check([ { name: "onItemChanged",
- arguments: [ itemId, "lastModified", false,
- `${bm.lastModified * 1000}`, bm.lastModified,
- bm.type, parentId, bm.guid, bm.parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] }
- ]);
-});
-
-add_task(function* update_bookmark_title() {
- let bm = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: new URL("http://title.example.com/") });
- let observer = expectNotifications();
- bm = yield PlacesUtils.bookmarks.update({ guid: bm.guid,
- title: "new title" });
- let itemId = yield PlacesUtils.promiseItemId(bm.guid);
- let parentId = yield PlacesUtils.promiseItemId(bm.parentGuid);
-
- observer.check([ { name: "onItemChanged",
- arguments: [ itemId, "title", false, bm.title,
- bm.lastModified, bm.type, parentId, bm.guid,
- bm.parentGuid, "", Ci.nsINavBookmarksService.SOURCE_DEFAULT ] }
- ]);
-});
-
-add_task(function* update_bookmark_uri() {
- let bm = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: new URL("http://url.example.com/") });
- let observer = expectNotifications();
- bm = yield PlacesUtils.bookmarks.update({ guid: bm.guid,
- url: "http://mozilla.org/" });
- let itemId = yield PlacesUtils.promiseItemId(bm.guid);
- let parentId = yield PlacesUtils.promiseItemId(bm.parentGuid);
-
- observer.check([ { name: "onItemChanged",
- arguments: [ itemId, "uri", false, bm.url.href,
- bm.lastModified, bm.type, parentId, bm.guid,
- bm.parentGuid, "http://url.example.com/",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] }
- ]);
-});
-
-add_task(function* update_move_same_folder() {
- // Ensure there are at least two items in place (others test do so for us,
- // but we don't have to depend on that).
- yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_SEPARATOR,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid });
- let bm = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: new URL("http://move.example.com/") });
- let bmItemId = yield PlacesUtils.promiseItemId(bm.guid);
- let bmParentId = yield PlacesUtils.promiseItemId(bm.parentGuid);
- let bmOldIndex = bm.index;
-
- let observer = expectNotifications();
- bm = yield PlacesUtils.bookmarks.update({ guid: bm.guid,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- index: 0 });
- Assert.equal(bm.index, 0);
- observer.check([ { name: "onItemMoved",
- arguments: [ bmItemId, bmParentId, bmOldIndex, bmParentId, bm.index,
- bm.type, bm.guid, bm.parentGuid, bm.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] }
- ]);
-
- // Test that we get the right index for DEFAULT_INDEX input.
- bmOldIndex = 0;
- observer = expectNotifications();
- bm = yield PlacesUtils.bookmarks.update({ guid: bm.guid,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX });
- Assert.ok(bm.index > 0);
- observer.check([ { name: "onItemMoved",
- arguments: [ bmItemId, bmParentId, bmOldIndex, bmParentId, bm.index,
- bm.type, bm.guid, bm.parentGuid, bm.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] }
- ]);
-});
-
-add_task(function* update_move_different_folder() {
- let bm = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: new URL("http://move.example.com/") });
- let folder = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_FOLDER,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid });
- let bmItemId = yield PlacesUtils.promiseItemId(bm.guid);
- let bmOldParentId = PlacesUtils.unfiledBookmarksFolderId;
- let bmOldIndex = bm.index;
-
- let observer = expectNotifications();
- bm = yield PlacesUtils.bookmarks.update({ guid: bm.guid,
- parentGuid: folder.guid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX });
- Assert.equal(bm.index, 0);
- let bmNewParentId = yield PlacesUtils.promiseItemId(folder.guid);
- observer.check([ { name: "onItemMoved",
- arguments: [ bmItemId, bmOldParentId, bmOldIndex, bmNewParentId,
- bm.index, bm.type, bm.guid,
- PlacesUtils.bookmarks.unfiledGuid,
- bm.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] }
- ]);
-});
-
-add_task(function* remove_bookmark() {
- let bm = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: new URL("http://remove.example.com/") });
- let itemId = yield PlacesUtils.promiseItemId(bm.guid);
- let parentId = yield PlacesUtils.promiseItemId(bm.parentGuid);
-
- let observer = expectNotifications();
- bm = yield PlacesUtils.bookmarks.remove(bm.guid);
- // TODO (Bug 653910): onItemAnnotationRemoved notified even if there were no
- // annotations.
- observer.check([ { name: "onItemRemoved",
- arguments: [ itemId, parentId, bm.index, bm.type, bm.url,
- bm.guid, bm.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] }
- ]);
-});
-
-add_task(function* remove_folder() {
- let bm = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_FOLDER,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid });
- let itemId = yield PlacesUtils.promiseItemId(bm.guid);
- let parentId = yield PlacesUtils.promiseItemId(bm.parentGuid);
-
- let observer = expectNotifications();
- bm = yield PlacesUtils.bookmarks.remove(bm.guid);
- observer.check([ { name: "onItemRemoved",
- arguments: [ itemId, parentId, bm.index, bm.type, null,
- bm.guid, bm.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] }
- ]);
-});
-
-add_task(function* remove_bookmark_tag_notification() {
- let bm = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: new URL("http://untag.example.com/") });
- let itemId = yield PlacesUtils.promiseItemId(bm.guid);
- let parentId = yield PlacesUtils.promiseItemId(bm.parentGuid);
-
- let tagFolder = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_FOLDER,
- parentGuid: PlacesUtils.bookmarks.tagsGuid,
- title: "tag" });
- let tag = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: tagFolder.guid,
- url: new URL("http://untag.example.com/") });
- let tagId = yield PlacesUtils.promiseItemId(tag.guid);
- let tagParentId = yield PlacesUtils.promiseItemId(tag.parentGuid);
-
- let observer = expectNotifications();
- yield PlacesUtils.bookmarks.remove(tag.guid);
-
- observer.check([ { name: "onItemRemoved",
- arguments: [ tagId, tagParentId, tag.index, tag.type,
- tag.url, tag.guid, tag.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] },
- { name: "onItemChanged",
- arguments: [ itemId, "tags", false, "",
- bm.lastModified, bm.type, parentId,
- bm.guid, bm.parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] }
- ]);
-});
-
-add_task(function* remove_folder_notification() {
- let folder1 = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_FOLDER,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid });
- let folder1Id = yield PlacesUtils.promiseItemId(folder1.guid);
- let folder1ParentId = yield PlacesUtils.promiseItemId(folder1.parentGuid);
-
- let bm = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: folder1.guid,
- url: new URL("http://example.com/") });
- let bmItemId = yield PlacesUtils.promiseItemId(bm.guid);
-
- let folder2 = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_FOLDER,
- parentGuid: folder1.guid });
- let folder2Id = yield PlacesUtils.promiseItemId(folder2.guid);
-
- let bm2 = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: folder2.guid,
- url: new URL("http://example.com/") });
- let bm2ItemId = yield PlacesUtils.promiseItemId(bm2.guid);
-
- let observer = expectNotifications();
- yield PlacesUtils.bookmarks.remove(folder1.guid);
-
- observer.check([ { name: "onItemRemoved",
- arguments: [ bm2ItemId, folder2Id, bm2.index, bm2.type,
- bm2.url, bm2.guid, bm2.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] },
- { name: "onItemRemoved",
- arguments: [ folder2Id, folder1Id, folder2.index,
- folder2.type, null, folder2.guid,
- folder2.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] },
- { name: "onItemRemoved",
- arguments: [ bmItemId, folder1Id, bm.index, bm.type,
- bm.url, bm.guid, bm.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] },
- { name: "onItemRemoved",
- arguments: [ folder1Id, folder1ParentId, folder1.index,
- folder1.type, null, folder1.guid,
- folder1.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] }
- ]);
-});
-
-add_task(function* eraseEverything_notification() {
- // Let's start from a clean situation.
- yield PlacesUtils.bookmarks.eraseEverything();
-
- let folder1 = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_FOLDER,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid });
- let folder1Id = yield PlacesUtils.promiseItemId(folder1.guid);
- let folder1ParentId = yield PlacesUtils.promiseItemId(folder1.parentGuid);
-
- let bm = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: folder1.guid,
- url: new URL("http://example.com/") });
- let itemId = yield PlacesUtils.promiseItemId(bm.guid);
- let parentId = yield PlacesUtils.promiseItemId(bm.parentGuid);
-
- let folder2 = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_FOLDER,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid });
- let folder2Id = yield PlacesUtils.promiseItemId(folder2.guid);
- let folder2ParentId = yield PlacesUtils.promiseItemId(folder2.parentGuid);
-
- let toolbarBm = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- url: new URL("http://example.com/") });
- let toolbarBmId = yield PlacesUtils.promiseItemId(toolbarBm.guid);
- let toolbarBmParentId = yield PlacesUtils.promiseItemId(toolbarBm.parentGuid);
-
- let menuBm = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.menuGuid,
- url: new URL("http://example.com/") });
- let menuBmId = yield PlacesUtils.promiseItemId(menuBm.guid);
- let menuBmParentId = yield PlacesUtils.promiseItemId(menuBm.parentGuid);
-
- let observer = expectNotifications();
- yield PlacesUtils.bookmarks.eraseEverything();
-
- // Bookmarks should always be notified before their parents.
- observer.check([ { name: "onItemRemoved",
- arguments: [ itemId, parentId, bm.index, bm.type,
- bm.url, bm.guid, bm.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] },
- { name: "onItemRemoved",
- arguments: [ folder2Id, folder2ParentId, folder2.index,
- folder2.type, null, folder2.guid,
- folder2.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] },
- { name: "onItemRemoved",
- arguments: [ folder1Id, folder1ParentId, folder1.index,
- folder1.type, null, folder1.guid,
- folder1.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] },
- { name: "onItemRemoved",
- arguments: [ menuBmId, menuBmParentId,
- menuBm.index, menuBm.type,
- menuBm.url, menuBm.guid,
- menuBm.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] },
- { name: "onItemRemoved",
- arguments: [ toolbarBmId, toolbarBmParentId,
- toolbarBm.index, toolbarBm.type,
- toolbarBm.url, toolbarBm.guid,
- toolbarBm.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] },
- ]);
-});
-
-add_task(function* eraseEverything_reparented_notification() {
- // Let's start from a clean situation.
- yield PlacesUtils.bookmarks.eraseEverything();
-
- let folder1 = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_FOLDER,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid });
- let folder1Id = yield PlacesUtils.promiseItemId(folder1.guid);
- let folder1ParentId = yield PlacesUtils.promiseItemId(folder1.parentGuid);
-
- let bm = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: folder1.guid,
- url: new URL("http://example.com/") });
- let itemId = yield PlacesUtils.promiseItemId(bm.guid);
-
- let folder2 = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_FOLDER,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid });
- let folder2Id = yield PlacesUtils.promiseItemId(folder2.guid);
- let folder2ParentId = yield PlacesUtils.promiseItemId(folder2.parentGuid);
-
- bm.parentGuid = folder2.guid;
- bm = yield PlacesUtils.bookmarks.update(bm);
- let parentId = yield PlacesUtils.promiseItemId(bm.parentGuid);
-
- let observer = expectNotifications();
- yield PlacesUtils.bookmarks.eraseEverything();
-
- // Bookmarks should always be notified before their parents.
- observer.check([ { name: "onItemRemoved",
- arguments: [ itemId, parentId, bm.index, bm.type,
- bm.url, bm.guid, bm.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] },
- { name: "onItemRemoved",
- arguments: [ folder2Id, folder2ParentId, folder2.index,
- folder2.type, null, folder2.guid,
- folder2.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] },
- { name: "onItemRemoved",
- arguments: [ folder1Id, folder1ParentId, folder1.index,
- folder1.type, null, folder1.guid,
- folder1.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] },
- ]);
-});
-
-add_task(function* reorder_notification() {
- let bookmarks = [
- { type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://example1.com/",
- parentGuid: PlacesUtils.bookmarks.unfiledGuid
- },
- { type: PlacesUtils.bookmarks.TYPE_FOLDER,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid
- },
- { type: PlacesUtils.bookmarks.TYPE_SEPARATOR,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid
- },
- { type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://example2.com/",
- parentGuid: PlacesUtils.bookmarks.unfiledGuid
- },
- { type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://example3.com/",
- parentGuid: PlacesUtils.bookmarks.unfiledGuid
- },
- ];
- let sorted = [];
- for (let bm of bookmarks) {
- sorted.push(yield PlacesUtils.bookmarks.insert(bm));
- }
-
- // Randomly reorder the array.
- sorted.sort(() => 0.5 - Math.random());
-
- let observer = expectNotifications();
- yield PlacesUtils.bookmarks.reorder(PlacesUtils.bookmarks.unfiledGuid,
- sorted.map(bm => bm.guid));
-
- let expectedNotifications = [];
- for (let i = 0; i < sorted.length; ++i) {
- let child = sorted[i];
- let childId = yield PlacesUtils.promiseItemId(child.guid);
- expectedNotifications.push({ name: "onItemMoved",
- arguments: [ childId,
- PlacesUtils.unfiledBookmarksFolderId,
- child.index,
- PlacesUtils.unfiledBookmarksFolderId,
- i,
- child.type,
- child.guid,
- child.parentGuid,
- child.parentGuid,
- Ci.nsINavBookmarksService.SOURCE_DEFAULT
- ] });
- }
- observer.check(expectedNotifications);
-});
-
-function expectNotifications() {
- let notifications = [];
- let observer = new Proxy(NavBookmarkObserver, {
- get(target, name) {
- if (name == "check") {
- PlacesUtils.bookmarks.removeObserver(observer);
- return expectedNotifications =>
- Assert.deepEqual(notifications, expectedNotifications);
- }
-
- if (name.startsWith("onItem")) {
- return (...origArgs) => {
- let args = Array.from(origArgs, arg => {
- if (arg && arg instanceof Ci.nsIURI)
- return new URL(arg.spec);
- if (arg && typeof(arg) == "number" && arg >= Date.now() * 1000)
- return new Date(parseInt(arg/1000));
- return arg;
- });
- notifications.push({ name: name, arguments: args });
- }
- }
-
- if (name in target)
- return target[name];
- return undefined;
- }
- });
- PlacesUtils.bookmarks.addObserver(observer, false);
- return observer;
-}
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/places/tests/bookmarks/test_bookmarks_remove.js b/toolkit/components/places/tests/bookmarks/test_bookmarks_remove.js
deleted file mode 100644
index 19085a2823..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_bookmarks_remove.js
+++ /dev/null
@@ -1,204 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-add_task(function* invalid_input_throws() {
- Assert.throws(() => PlacesUtils.bookmarks.remove(),
- /Input should be a valid object/);
- Assert.throws(() => PlacesUtils.bookmarks.remove(null),
- /Input should be a valid object/);
-
- Assert.throws(() => PlacesUtils.bookmarks.remove("test"),
- /Invalid value for property 'guid'/);
- Assert.throws(() => PlacesUtils.bookmarks.remove(123),
- /Invalid value for property 'guid'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.remove({ guid: "test" }),
- /Invalid value for property 'guid'/);
- Assert.throws(() => PlacesUtils.bookmarks.remove({ guid: null }),
- /Invalid value for property 'guid'/);
- Assert.throws(() => PlacesUtils.bookmarks.remove({ guid: 123 }),
- /Invalid value for property 'guid'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.remove({ parentGuid: "test" }),
- /Invalid value for property 'parentGuid'/);
- Assert.throws(() => PlacesUtils.bookmarks.remove({ parentGuid: null }),
- /Invalid value for property 'parentGuid'/);
- Assert.throws(() => PlacesUtils.bookmarks.remove({ parentGuid: 123 }),
- /Invalid value for property 'parentGuid'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.remove({ url: "http://te st/" }),
- /Invalid value for property 'url'/);
- Assert.throws(() => PlacesUtils.bookmarks.remove({ url: null }),
- /Invalid value for property 'url'/);
- Assert.throws(() => PlacesUtils.bookmarks.remove({ url: -10 }),
- /Invalid value for property 'url'/);
-});
-
-add_task(function* remove_nonexistent_guid() {
- try {
- yield PlacesUtils.bookmarks.remove({ guid: "123456789012"});
- Assert.ok(false, "Should have thrown");
- } catch (ex) {
- Assert.ok(/No bookmarks found for the provided GUID/.test(ex));
- }
-});
-
-add_task(function* remove_roots_fail() {
- let guids = [PlacesUtils.bookmarks.rootGuid,
- PlacesUtils.bookmarks.unfiledGuid,
- PlacesUtils.bookmarks.menuGuid,
- PlacesUtils.bookmarks.toolbarGuid,
- PlacesUtils.bookmarks.tagsGuid,
- PlacesUtils.bookmarks.mobileGuid];
- for (let guid of guids) {
- Assert.throws(() => PlacesUtils.bookmarks.remove(guid),
- /It's not possible to remove Places root folders/);
- }
-});
-
-add_task(function* remove_normal_folder_under_root_succeeds() {
- let folder = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.rootGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER });
- checkBookmarkObject(folder);
- let removed_folder = yield PlacesUtils.bookmarks.remove(folder);
- Assert.deepEqual(folder, removed_folder);
- Assert.strictEqual((yield PlacesUtils.bookmarks.fetch(folder.guid)), null);
-});
-
-add_task(function* remove_bookmark() {
- let bm1 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://example.com/",
- title: "a bookmark" });
- checkBookmarkObject(bm1);
-
- let bm2 = yield PlacesUtils.bookmarks.remove(bm1.guid);
- checkBookmarkObject(bm2);
-
- Assert.deepEqual(bm1, bm2);
- Assert.equal(bm2.parentGuid, PlacesUtils.bookmarks.unfiledGuid);
- Assert.equal(bm2.index, 0);
- Assert.deepEqual(bm2.dateAdded, bm2.lastModified);
- Assert.equal(bm2.type, PlacesUtils.bookmarks.TYPE_BOOKMARK);
- Assert.equal(bm2.url.href, "http://example.com/");
- Assert.equal(bm2.title, "a bookmark");
-});
-
-
-add_task(function* remove_bookmark_orphans() {
- let bm1 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://example.com/",
- title: "a bookmark" });
- checkBookmarkObject(bm1);
- PlacesUtils.annotations.setItemAnnotation((yield PlacesUtils.promiseItemId(bm1.guid)),
- "testanno", "testvalue", 0, 0);
-
- let bm2 = yield PlacesUtils.bookmarks.remove(bm1.guid);
- checkBookmarkObject(bm2);
-
- // Check there are no orphan annotations.
- let conn = yield PlacesUtils.promiseDBConnection();
- let annoAttrs = yield conn.execute(`SELECT id, name FROM moz_anno_attributes`);
- // Bug 1306445 will eventually remove the mobile root anno.
- Assert.equal(annoAttrs.length, 1);
- Assert.equal(annoAttrs[0].getResultByName("name"), PlacesUtils.MOBILE_ROOT_ANNO);
- let annos = rows = yield conn.execute(`SELECT item_id, anno_attribute_id FROM moz_items_annos`);
- Assert.equal(annos.length, 1);
- Assert.equal(annos[0].getResultByName("item_id"), PlacesUtils.mobileFolderId);
- Assert.equal(annos[0].getResultByName("anno_attribute_id"), annoAttrs[0].getResultByName("id"));
-});
-
-add_task(function* remove_bookmark_empty_title() {
- let bm1 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://example.com/",
- title: "" });
- checkBookmarkObject(bm1);
-
- let bm2 = yield PlacesUtils.bookmarks.remove(bm1.guid);
- checkBookmarkObject(bm2);
-
- Assert.deepEqual(bm1, bm2);
- Assert.equal(bm2.index, 0);
- Assert.ok(!("title" in bm2));
-});
-
-add_task(function* remove_folder() {
- let bm1 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: "a folder" });
- checkBookmarkObject(bm1);
-
- let bm2 = yield PlacesUtils.bookmarks.remove(bm1.guid);
- checkBookmarkObject(bm2);
-
- Assert.deepEqual(bm1, bm2);
- Assert.equal(bm2.parentGuid, PlacesUtils.bookmarks.unfiledGuid);
- Assert.equal(bm2.index, 0);
- Assert.deepEqual(bm2.dateAdded, bm2.lastModified);
- Assert.equal(bm2.type, PlacesUtils.bookmarks.TYPE_FOLDER);
- Assert.equal(bm2.title, "a folder");
- Assert.ok(!("url" in bm2));
-});
-
-add_task(function* test_nested_contents_removed() {
- let folder1 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: "a folder" });
- let folder2 = yield PlacesUtils.bookmarks.insert({ parentGuid: folder1.guid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: "a folder" });
- let sep = yield PlacesUtils.bookmarks.insert({ parentGuid: folder2.guid,
- type: PlacesUtils.bookmarks.TYPE_SEPARATOR });
- yield PlacesUtils.bookmarks.remove(folder1);
- Assert.strictEqual((yield PlacesUtils.bookmarks.fetch(folder1.guid)), null);
- Assert.strictEqual((yield PlacesUtils.bookmarks.fetch(folder2.guid)), null);
- Assert.strictEqual((yield PlacesUtils.bookmarks.fetch(sep.guid)), null);
-});
-
-add_task(function* remove_folder_empty_title() {
- let bm1 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: "" });
- checkBookmarkObject(bm1);
-
- let bm2 = yield PlacesUtils.bookmarks.remove(bm1.guid);
- checkBookmarkObject(bm2);
-
- Assert.deepEqual(bm1, bm2);
- Assert.equal(bm2.index, 0);
- Assert.ok(!("title" in bm2));
-});
-
-add_task(function* remove_separator() {
- let bm1 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_SEPARATOR });
- checkBookmarkObject(bm1);
-
- let bm2 = yield PlacesUtils.bookmarks.remove(bm1.guid);
- checkBookmarkObject(bm2);
-
- Assert.deepEqual(bm1, bm2);
- Assert.equal(bm2.parentGuid, PlacesUtils.bookmarks.unfiledGuid);
- Assert.equal(bm2.index, 0);
- Assert.deepEqual(bm2.dateAdded, bm2.lastModified);
- Assert.equal(bm2.type, PlacesUtils.bookmarks.TYPE_SEPARATOR);
- Assert.ok(!("url" in bm2));
- Assert.ok(!("title" in bm2));
-});
-
-add_task(function* test_nested_content_fails_when_not_allowed() {
- let folder1 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: "a folder" });
- yield PlacesUtils.bookmarks.insert({ parentGuid: folder1.guid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: "a folder" });
- yield Assert.rejects(PlacesUtils.bookmarks.remove(folder1, {preventRemovalOfNonEmptyFolders: true}),
- /Cannot remove a non-empty folder./);
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/places/tests/bookmarks/test_bookmarks_reorder.js b/toolkit/components/places/tests/bookmarks/test_bookmarks_reorder.js
deleted file mode 100644
index 4f66172802..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_bookmarks_reorder.js
+++ /dev/null
@@ -1,177 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-add_task(function* invalid_input_throws() {
- Assert.throws(() => PlacesUtils.bookmarks.reorder(),
- /Invalid value for property 'guid'/);
- Assert.throws(() => PlacesUtils.bookmarks.reorder(null),
- /Invalid value for property 'guid'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.reorder("test"),
- /Invalid value for property 'guid'/);
- Assert.throws(() => PlacesUtils.bookmarks.reorder(123),
- /Invalid value for property 'guid'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.reorder({ guid: "test" }),
- /Invalid value for property 'guid'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.reorder("123456789012"),
- /Must provide a sorted array of children GUIDs./);
- Assert.throws(() => PlacesUtils.bookmarks.reorder("123456789012", {}),
- /Must provide a sorted array of children GUIDs./);
- Assert.throws(() => PlacesUtils.bookmarks.reorder("123456789012", null),
- /Must provide a sorted array of children GUIDs./);
- Assert.throws(() => PlacesUtils.bookmarks.reorder("123456789012", []),
- /Must provide a sorted array of children GUIDs./);
-
- Assert.throws(() => PlacesUtils.bookmarks.reorder("123456789012", [ null ]),
- /Invalid GUID found in the sorted children array/);
- Assert.throws(() => PlacesUtils.bookmarks.reorder("123456789012", [ "" ]),
- /Invalid GUID found in the sorted children array/);
- Assert.throws(() => PlacesUtils.bookmarks.reorder("123456789012", [ {} ]),
- /Invalid GUID found in the sorted children array/);
- Assert.throws(() => PlacesUtils.bookmarks.reorder("123456789012", [ "012345678901", null ]),
- /Invalid GUID found in the sorted children array/);
-});
-
-add_task(function* reorder_nonexistent_guid() {
- yield Assert.rejects(PlacesUtils.bookmarks.reorder("123456789012", [ "012345678901" ]),
- /No folder found for the provided GUID/,
- "Should throw for nonexisting guid");
-});
-
-add_task(function* reorder() {
- let bookmarks = [
- { url: "http://example1.com/",
- parentGuid: PlacesUtils.bookmarks.unfiledGuid
- },
- { type: PlacesUtils.bookmarks.TYPE_FOLDER,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid
- },
- { type: PlacesUtils.bookmarks.TYPE_SEPARATOR,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid
- },
- { url: "http://example2.com/",
- parentGuid: PlacesUtils.bookmarks.unfiledGuid
- },
- { url: "http://example3.com/",
- parentGuid: PlacesUtils.bookmarks.unfiledGuid
- }
- ];
-
- let sorted = [];
- for (let bm of bookmarks) {
- sorted.push(yield PlacesUtils.bookmarks.insert(bm));
- }
-
- // Check the initial append sorting.
- Assert.ok(sorted.every((bm, i) => bm.index == i),
- "Initial bookmarks sorting is correct");
-
- // Apply random sorting and run multiple tests.
- for (let t = 0; t < 4; t++) {
- sorted.sort(() => 0.5 - Math.random());
- let sortedGuids = sorted.map(child => child.guid);
- dump("Expected order: " + sortedGuids.join() + "\n");
- // Add a nonexisting guid to the array, to ensure nothing will break.
- sortedGuids.push("123456789012");
- yield PlacesUtils.bookmarks.reorder(PlacesUtils.bookmarks.unfiledGuid,
- sortedGuids);
- for (let i = 0; i < sorted.length; ++i) {
- let item = yield PlacesUtils.bookmarks.fetch(sorted[i].guid);
- Assert.equal(item.index, i);
- }
- }
-
- do_print("Test partial sorting");
- // Try a partial sorting by passing only 2 entries.
- // The unspecified entries should retain the original order.
- sorted = [ sorted[1], sorted[0] ].concat(sorted.slice(2));
- let sortedGuids = [ sorted[0].guid, sorted[1].guid ];
- dump("Expected order: " + sorted.map(b => b.guid).join() + "\n");
- yield PlacesUtils.bookmarks.reorder(PlacesUtils.bookmarks.unfiledGuid,
- sortedGuids);
- for (let i = 0; i < sorted.length; ++i) {
- let item = yield PlacesUtils.bookmarks.fetch(sorted[i].guid);
- Assert.equal(item.index, i);
- }
-
- // Use triangular numbers to detect skipped position.
- let db = yield PlacesUtils.promiseDBConnection();
- let rows = yield db.execute(
- `SELECT parent
- FROM moz_bookmarks
- GROUP BY parent
- HAVING (SUM(DISTINCT position + 1) - (count(*) * (count(*) + 1) / 2)) <> 0`);
- Assert.equal(rows.length, 0, "All the bookmarks should have consistent positions");
-});
-
-add_task(function* move_and_reorder() {
- // Start clean.
- yield PlacesUtils.bookmarks.eraseEverything();
-
- let bm1 = yield PlacesUtils.bookmarks.insert({
- url: "http://example1.com/",
- parentGuid: PlacesUtils.bookmarks.unfiledGuid
- });
- let f1 = yield PlacesUtils.bookmarks.insert({
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid
- });
- let bm2 = yield PlacesUtils.bookmarks.insert({
- url: "http://example2.com/",
- parentGuid: f1.guid
- });
- let f2 = yield PlacesUtils.bookmarks.insert({
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid
- });
- let bm3 = yield PlacesUtils.bookmarks.insert({
- url: "http://example3.com/",
- parentGuid: f2.guid
- });
- let bm4 = yield PlacesUtils.bookmarks.insert({
- url: "http://example4.com/",
- parentGuid: f2.guid
- });
- let bm5 = yield PlacesUtils.bookmarks.insert({
- url: "http://example5.com/",
- parentGuid: f2.guid
- });
-
- // Invert f2 children.
- // This is critical to reproduce the bug, cause it inverts the position
- // compared to the natural insertion order.
- yield PlacesUtils.bookmarks.reorder(f2.guid, [bm5.guid, bm4.guid, bm3.guid]);
-
- bm1.parentGuid = f1.guid;
- bm1.index = 0;
- yield PlacesUtils.bookmarks.update(bm1);
-
- bm1 = yield PlacesUtils.bookmarks.fetch(bm1.guid);
- Assert.equal(bm1.index, 0);
- bm2 = yield PlacesUtils.bookmarks.fetch(bm2.guid);
- Assert.equal(bm2.index, 1);
- bm3 = yield PlacesUtils.bookmarks.fetch(bm3.guid);
- Assert.equal(bm3.index, 2);
- bm4 = yield PlacesUtils.bookmarks.fetch(bm4.guid);
- Assert.equal(bm4.index, 1);
- bm5 = yield PlacesUtils.bookmarks.fetch(bm5.guid);
- Assert.equal(bm5.index, 0);
-
- // No-op reorder on f1 children.
- // Nothing should change. Though, due to bug 1293365 this was causing children
- // of other folders to get messed up.
- yield PlacesUtils.bookmarks.reorder(f1.guid, [bm1.guid, bm2.guid]);
-
- bm1 = yield PlacesUtils.bookmarks.fetch(bm1.guid);
- Assert.equal(bm1.index, 0);
- bm2 = yield PlacesUtils.bookmarks.fetch(bm2.guid);
- Assert.equal(bm2.index, 1);
- bm3 = yield PlacesUtils.bookmarks.fetch(bm3.guid);
- Assert.equal(bm3.index, 2);
- bm4 = yield PlacesUtils.bookmarks.fetch(bm4.guid);
- Assert.equal(bm4.index, 1);
- bm5 = yield PlacesUtils.bookmarks.fetch(bm5.guid);
- Assert.equal(bm5.index, 0);
-});
diff --git a/toolkit/components/places/tests/bookmarks/test_bookmarks_search.js b/toolkit/components/places/tests/bookmarks/test_bookmarks_search.js
deleted file mode 100644
index 02f7c5460a..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_bookmarks_search.js
+++ /dev/null
@@ -1,223 +0,0 @@
-add_task(function* invalid_input_throws() {
- Assert.throws(() => PlacesUtils.bookmarks.search(),
- /Query object is required/);
- Assert.throws(() => PlacesUtils.bookmarks.search(null),
- /Query object is required/);
- Assert.throws(() => PlacesUtils.bookmarks.search({title: 50}),
- /Title option must be a string/);
- Assert.throws(() => PlacesUtils.bookmarks.search({url: {url: "wombat"}}),
- /Url option must be a string or a URL object/);
- Assert.throws(() => PlacesUtils.bookmarks.search(50),
- /Query must be an object or a string/);
- Assert.throws(() => PlacesUtils.bookmarks.search(true),
- /Query must be an object or a string/);
-});
-
-add_task(function* search_bookmark() {
- yield PlacesUtils.bookmarks.eraseEverything();
-
- let bm1 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "http://example.com/",
- title: "a bookmark" });
- let bm2 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "http://example.org/",
- title: "another bookmark" });
- let bm3 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.menuGuid,
- url: "http://menu.org/",
- title: "an on-menu bookmark" });
- let bm4 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- url: "http://toolbar.org/",
- title: "an on-toolbar bookmark" });
- checkBookmarkObject(bm1);
- checkBookmarkObject(bm2);
- checkBookmarkObject(bm3);
- checkBookmarkObject(bm4);
-
- // finds a result by query
- let results = yield PlacesUtils.bookmarks.search("example.com");
- Assert.equal(results.length, 1);
- checkBookmarkObject(results[0]);
- Assert.deepEqual(bm1, results[0]);
-
- // finds multiple results
- results = yield PlacesUtils.bookmarks.search("example");
- Assert.equal(results.length, 2);
- checkBookmarkObject(results[0]);
- checkBookmarkObject(results[1]);
-
- // finds menu bookmarks
- results = yield PlacesUtils.bookmarks.search("an on-menu bookmark");
- Assert.equal(results.length, 1);
- checkBookmarkObject(results[0]);
- Assert.deepEqual(bm3, results[0]);
-
- // finds toolbar bookmarks
- results = yield PlacesUtils.bookmarks.search("an on-toolbar bookmark");
- Assert.equal(results.length, 1);
- checkBookmarkObject(results[0]);
- Assert.deepEqual(bm4, results[0]);
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* search_bookmark_by_query_object() {
- let bm1 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "http://example.com/",
- title: "a bookmark" });
- let bm2 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "http://example.org/",
- title: "another bookmark" });
- checkBookmarkObject(bm1);
- checkBookmarkObject(bm2);
-
- let results = yield PlacesUtils.bookmarks.search({query: "example.com"});
- Assert.equal(results.length, 1);
- checkBookmarkObject(results[0]);
-
- Assert.deepEqual(bm1, results[0]);
-
- results = yield PlacesUtils.bookmarks.search({query: "example"});
- Assert.equal(results.length, 2);
- checkBookmarkObject(results[0]);
- checkBookmarkObject(results[1]);
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* search_bookmark_by_url() {
- let bm1 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "http://example.com/",
- title: "a bookmark" });
- let bm2 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "http://example.org/path",
- title: "another bookmark" });
- let bm3 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "http://example.org/path",
- title: "third bookmark" });
- checkBookmarkObject(bm1);
- checkBookmarkObject(bm2);
- checkBookmarkObject(bm3);
-
- // finds the correct result by url
- let results = yield PlacesUtils.bookmarks.search({url: "http://example.com/"});
- Assert.equal(results.length, 1);
- checkBookmarkObject(results[0]);
- Assert.deepEqual(bm1, results[0]);
-
- // normalizes the url
- results = yield PlacesUtils.bookmarks.search({url: "http:/example.com"});
- Assert.equal(results.length, 1);
- checkBookmarkObject(results[0]);
- Assert.deepEqual(bm1, results[0]);
-
- // returns multiple matches
- results = yield PlacesUtils.bookmarks.search({url: "http://example.org/path"});
- Assert.equal(results.length, 2);
-
- // requires exact match
- results = yield PlacesUtils.bookmarks.search({url: "http://example.org/"});
- Assert.equal(results.length, 0);
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* search_bookmark_by_title() {
- let bm1 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "http://example.com/",
- title: "a bookmark" });
- let bm2 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "http://example.org/path",
- title: "another bookmark" });
- let bm3 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "http://example.net/",
- title: "another bookmark" });
- checkBookmarkObject(bm1);
- checkBookmarkObject(bm2);
- checkBookmarkObject(bm3);
-
- // finds the correct result by title
- let results = yield PlacesUtils.bookmarks.search({title: "a bookmark"});
- Assert.equal(results.length, 1);
- checkBookmarkObject(results[0]);
- Assert.deepEqual(bm1, results[0]);
-
- // returns multiple matches
- results = yield PlacesUtils.bookmarks.search({title: "another bookmark"});
- Assert.equal(results.length, 2);
-
- // requires exact match
- results = yield PlacesUtils.bookmarks.search({title: "bookmark"});
- Assert.equal(results.length, 0);
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* search_bookmark_combinations() {
- let bm1 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "http://example.com/",
- title: "a bookmark" });
- let bm2 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "http://example.org/path",
- title: "another bookmark" });
- let bm3 = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "http://example.net/",
- title: "third bookmark" });
- checkBookmarkObject(bm1);
- checkBookmarkObject(bm2);
- checkBookmarkObject(bm3);
-
- // finds the correct result if title and url match
- let results = yield PlacesUtils.bookmarks.search({url: "http://example.com/", title: "a bookmark"});
- Assert.equal(results.length, 1);
- checkBookmarkObject(results[0]);
- Assert.deepEqual(bm1, results[0]);
-
- // does not match if query is not matching but url and title match
- results = yield PlacesUtils.bookmarks.search({url: "http://example.com/", title: "a bookmark", query: "nonexistent"});
- Assert.equal(results.length, 0);
-
- // does not match if one parameter is not matching
- results = yield PlacesUtils.bookmarks.search({url: "http://what.ever", title: "a bookmark"});
- Assert.equal(results.length, 0);
-
- // query only matches if other fields match as well
- results = yield PlacesUtils.bookmarks.search({query: "bookmark", url: "http://example.net/"});
- Assert.equal(results.length, 1);
- checkBookmarkObject(results[0]);
- Assert.deepEqual(bm3, results[0]);
-
- // non-matching query will also return no results
- results = yield PlacesUtils.bookmarks.search({query: "nonexistent", url: "http://example.net/"});
- Assert.equal(results.length, 0);
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* search_folder() {
- let folder = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.menuGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: "a test folder" });
- let bm = yield PlacesUtils.bookmarks.insert({ parentGuid: folder.guid,
- url: "http://example.com/",
- title: "a bookmark" });
- checkBookmarkObject(folder);
- checkBookmarkObject(bm);
-
- // also finds folders
- let results = yield PlacesUtils.bookmarks.search("a test folder");
- Assert.equal(results.length, 1);
- checkBookmarkObject(results[0]);
- Assert.equal(folder.title, results[0].title);
- Assert.equal(folder.type, results[0].type);
- Assert.equal(folder.parentGuid, results[0].parentGuid);
-
- // finds elements in folders
- results = yield PlacesUtils.bookmarks.search("example.com");
- Assert.equal(results.length, 1);
- checkBookmarkObject(results[0]);
- Assert.deepEqual(bm, results[0]);
- Assert.equal(folder.guid, results[0].parentGuid);
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
diff --git a/toolkit/components/places/tests/bookmarks/test_bookmarks_update.js b/toolkit/components/places/tests/bookmarks/test_bookmarks_update.js
deleted file mode 100644
index d077fd6f3d..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_bookmarks_update.js
+++ /dev/null
@@ -1,414 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-add_task(function* invalid_input_throws() {
- Assert.throws(() => PlacesUtils.bookmarks.update(),
- /Input should be a valid object/);
- Assert.throws(() => PlacesUtils.bookmarks.update(null),
- /Input should be a valid object/);
- Assert.throws(() => PlacesUtils.bookmarks.update({}),
- /The following properties were expected/);
-
- Assert.throws(() => PlacesUtils.bookmarks.update({ guid: "test" }),
- /Invalid value for property 'guid'/);
- Assert.throws(() => PlacesUtils.bookmarks.update({ guid: null }),
- /Invalid value for property 'guid'/);
- Assert.throws(() => PlacesUtils.bookmarks.update({ guid: 123 }),
- /Invalid value for property 'guid'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.update({ parentGuid: "test" }),
- /Invalid value for property 'parentGuid'/);
- Assert.throws(() => PlacesUtils.bookmarks.update({ parentGuid: null }),
- /Invalid value for property 'parentGuid'/);
- Assert.throws(() => PlacesUtils.bookmarks.update({ parentGuid: 123 }),
- /Invalid value for property 'parentGuid'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.update({ index: "1" }),
- /Invalid value for property 'index'/);
- Assert.throws(() => PlacesUtils.bookmarks.update({ index: -10 }),
- /Invalid value for property 'index'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.update({ dateAdded: -10 }),
- /Invalid value for property 'dateAdded'/);
- Assert.throws(() => PlacesUtils.bookmarks.update({ dateAdded: "today" }),
- /Invalid value for property 'dateAdded'/);
- Assert.throws(() => PlacesUtils.bookmarks.update({ dateAdded: Date.now() }),
- /Invalid value for property 'dateAdded'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.update({ lastModified: -10 }),
- /Invalid value for property 'lastModified'/);
- Assert.throws(() => PlacesUtils.bookmarks.update({ lastModified: "today" }),
- /Invalid value for property 'lastModified'/);
- Assert.throws(() => PlacesUtils.bookmarks.update({ lastModified: Date.now() }),
- /Invalid value for property 'lastModified'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.update({ type: -1 }),
- /Invalid value for property 'type'/);
- Assert.throws(() => PlacesUtils.bookmarks.update({ type: 100 }),
- /Invalid value for property 'type'/);
- Assert.throws(() => PlacesUtils.bookmarks.update({ type: "bookmark" }),
- /Invalid value for property 'type'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.update({ url: 10 }),
- /Invalid value for property 'url'/);
- Assert.throws(() => PlacesUtils.bookmarks.update({ url: "http://te st" }),
- /Invalid value for property 'url'/);
- let longurl = "http://www.example.com/";
- for (let i = 0; i < 65536; i++) {
- longurl += "a";
- }
- Assert.throws(() => PlacesUtils.bookmarks.update({ url: longurl }),
- /Invalid value for property 'url'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.update({ url: NetUtil.newURI(longurl) }),
- /Invalid value for property 'url'/);
- Assert.throws(() => PlacesUtils.bookmarks.update({ url: "te st" }),
- /Invalid value for property 'url'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.update({ title: -1 }),
- /Invalid value for property 'title'/);
- Assert.throws(() => PlacesUtils.bookmarks.update({ title: {} }),
- /Invalid value for property 'title'/);
-
- Assert.throws(() => PlacesUtils.bookmarks.update({ guid: "123456789012" }),
- /Not enough properties to update/);
-
- Assert.throws(() => PlacesUtils.bookmarks.update({ guid: "123456789012",
- parentGuid: "012345678901" }),
- /The following properties were expected: index/);
-});
-
-add_task(function* nonexisting_bookmark_throws() {
- try {
- yield PlacesUtils.bookmarks.update({ guid: "123456789012",
- title: "test" });
- Assert.ok(false, "Should have thrown");
- } catch (ex) {
- Assert.ok(/No bookmarks found for the provided GUID/.test(ex));
- }
-});
-
-add_task(function* invalid_properties_for_existing_bookmark() {
- let bm = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "http://example.com/" });
-
- try {
- yield PlacesUtils.bookmarks.update({ guid: bm.guid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER });
- Assert.ok(false, "Should have thrown");
- } catch (ex) {
- Assert.ok(/The bookmark type cannot be changed/.test(ex));
- }
-
- try {
- yield PlacesUtils.bookmarks.update({ guid: bm.guid,
- dateAdded: new Date() });
- Assert.ok(false, "Should have thrown");
- } catch (ex) {
- Assert.ok(/The bookmark dateAdded cannot be changed/.test(ex));
- }
-
- try {
- yield PlacesUtils.bookmarks.update({ guid: bm.guid,
- dateAdded: new Date() });
- Assert.ok(false, "Should have thrown");
- } catch (ex) {
- Assert.ok(/The bookmark dateAdded cannot be changed/.test(ex));
- }
-
- try {
- yield PlacesUtils.bookmarks.update({ guid: bm.guid,
- parentGuid: "123456789012",
- index: 1 });
- Assert.ok(false, "Should have thrown");
- } catch (ex) {
- Assert.ok(/No bookmarks found for the provided parentGuid/.test(ex));
- }
-
- let past = new Date(Date.now() - 86400000);
- try {
- yield PlacesUtils.bookmarks.update({ guid: bm.guid,
- lastModified: past });
- Assert.ok(false, "Should have thrown");
- } catch (ex) {
- Assert.ok(/Invalid value for property 'lastModified'/.test(ex));
- }
-
- let folder = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_FOLDER,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid });
- try {
- yield PlacesUtils.bookmarks.update({ guid: folder.guid,
- url: "http://example.com/" });
- Assert.ok(false, "Should have thrown");
- } catch (ex) {
- Assert.ok(/Invalid value for property 'url'/.test(ex));
- }
-
- let separator = yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_SEPARATOR,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid });
- try {
- yield PlacesUtils.bookmarks.update({ guid: separator.guid,
- url: "http://example.com/" });
- Assert.ok(false, "Should have thrown");
- } catch (ex) {
- Assert.ok(/Invalid value for property 'url'/.test(ex));
- }
- try {
- yield PlacesUtils.bookmarks.update({ guid: separator.guid,
- title: "test" });
- Assert.ok(false, "Should have thrown");
- } catch (ex) {
- Assert.ok(/Invalid value for property 'title'/.test(ex));
- }
-});
-
-add_task(function* long_title_trim() {
- let longtitle = "a";
- for (let i = 0; i < 4096; i++) {
- longtitle += "a";
- }
- let bm = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: "title" });
- checkBookmarkObject(bm);
-
- bm = yield PlacesUtils.bookmarks.update({ guid: bm.guid,
- title: longtitle });
- let newTitle = bm.title;
- Assert.equal(newTitle.length, 4096, "title should have been trimmed");
-
- bm = yield PlacesUtils.bookmarks.fetch(bm.guid);
- Assert.equal(bm.title, newTitle);
-});
-
-add_task(function* update_lastModified() {
- let yesterday = new Date(Date.now() - 86400000);
- let bm = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: "title",
- dateAdded: yesterday });
- checkBookmarkObject(bm);
- Assert.deepEqual(bm.lastModified, yesterday);
-
- let time = new Date();
- bm = yield PlacesUtils.bookmarks.update({ guid: bm.guid,
- lastModified: time });
- checkBookmarkObject(bm);
- Assert.deepEqual(bm.lastModified, time);
-
- bm = yield PlacesUtils.bookmarks.fetch(bm.guid);
- Assert.deepEqual(bm.lastModified, time);
-
- bm = yield PlacesUtils.bookmarks.update({ guid: bm.guid,
- lastModified: yesterday });
- Assert.deepEqual(bm.lastModified, yesterday);
-
- bm = yield PlacesUtils.bookmarks.update({ guid: bm.guid,
- title: "title2" });
- Assert.ok(bm.lastModified >= time);
-
- bm = yield PlacesUtils.bookmarks.update({ guid: bm.guid,
- title: "" });
- Assert.ok(!("title" in bm));
-
- bm = yield PlacesUtils.bookmarks.fetch(bm.guid);
- Assert.ok(!("title" in bm));
-});
-
-add_task(function* update_url() {
- let bm = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://example.com/",
- title: "title" });
- checkBookmarkObject(bm);
- let lastModified = bm.lastModified;
- let frecency = frecencyForUrl(bm.url);
- Assert.ok(frecency > 0, "Check frecency has been updated");
-
- bm = yield PlacesUtils.bookmarks.update({ guid: bm.guid,
- url: "http://mozilla.org/" });
- checkBookmarkObject(bm);
- Assert.ok(bm.lastModified >= lastModified);
- Assert.equal(bm.url.href, "http://mozilla.org/");
-
- bm = yield PlacesUtils.bookmarks.fetch(bm.guid);
- Assert.equal(bm.url.href, "http://mozilla.org/");
- Assert.ok(bm.lastModified >= lastModified);
-
- Assert.equal(frecencyForUrl("http://example.com/"), frecency, "Check frecency for example.com");
- Assert.equal(frecencyForUrl("http://mozilla.org/"), frecency, "Check frecency for mozilla.org");
-});
-
-add_task(function* update_index() {
- let parent = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER }) ;
- let f1 = yield PlacesUtils.bookmarks.insert({ parentGuid: parent.guid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER });
- Assert.equal(f1.index, 0);
- let f2 = yield PlacesUtils.bookmarks.insert({ parentGuid: parent.guid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER });
- Assert.equal(f2.index, 1);
- let f3 = yield PlacesUtils.bookmarks.insert({ parentGuid: parent.guid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER });
- Assert.equal(f3.index, 2);
- let lastModified = f1.lastModified;
-
- f1 = yield PlacesUtils.bookmarks.update({ guid: f1.guid,
- parentGuid: f1.parentGuid,
- index: 1});
- checkBookmarkObject(f1);
- Assert.equal(f1.index, 1);
- Assert.ok(f1.lastModified >= lastModified);
-
- parent = yield PlacesUtils.bookmarks.fetch(f1.parentGuid);
- Assert.deepEqual(parent.lastModified, f1.lastModified);
-
- f2 = yield PlacesUtils.bookmarks.fetch(f2.guid);
- Assert.equal(f2.index, 0);
-
- f3 = yield PlacesUtils.bookmarks.fetch(f3.guid);
- Assert.equal(f3.index, 2);
-
- f3 = yield PlacesUtils.bookmarks.update({ guid: f3.guid,
- index: 0 });
- f1 = yield PlacesUtils.bookmarks.fetch(f1.guid);
- Assert.equal(f1.index, 2);
-
- f2 = yield PlacesUtils.bookmarks.fetch(f2.guid);
- Assert.equal(f2.index, 1);
-});
-
-add_task(function* update_move_folder_into_descendant_throws() {
- let parent = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER }) ;
- let descendant = yield PlacesUtils.bookmarks.insert({ parentGuid: parent.guid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER });
-
- try {
- yield PlacesUtils.bookmarks.update({ guid: parent.guid,
- parentGuid: parent.guid,
- index: 0 });
- Assert.ok(false, "Should have thrown");
- } catch (ex) {
- Assert.ok(/Cannot insert a folder into itself or one of its descendants/.test(ex));
- }
-
- try {
- yield PlacesUtils.bookmarks.update({ guid: parent.guid,
- parentGuid: descendant.guid,
- index: 0 });
- Assert.ok(false, "Should have thrown");
- } catch (ex) {
- Assert.ok(/Cannot insert a folder into itself or one of its descendants/.test(ex));
- }
-});
-
-add_task(function* update_move() {
- let parent = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER }) ;
- let bm = yield PlacesUtils.bookmarks.insert({ parentGuid: parent.guid,
- url: "http://example.com/",
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK }) ;
- let descendant = yield PlacesUtils.bookmarks.insert({ parentGuid: parent.guid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER });
- Assert.equal(descendant.index, 1);
- let lastModified = bm.lastModified;
-
- // This is moving to a nonexisting index by purpose, it will be appended.
- bm = yield PlacesUtils.bookmarks.update({ guid: bm.guid,
- parentGuid: descendant.guid,
- index: 1 });
- checkBookmarkObject(bm);
- Assert.equal(bm.parentGuid, descendant.guid);
- Assert.equal(bm.index, 0);
- Assert.ok(bm.lastModified >= lastModified);
-
- parent = yield PlacesUtils.bookmarks.fetch(parent.guid);
- descendant = yield PlacesUtils.bookmarks.fetch(descendant.guid);
- Assert.deepEqual(parent.lastModified, bm.lastModified);
- Assert.deepEqual(descendant.lastModified, bm.lastModified);
- Assert.equal(descendant.index, 0);
-
- bm = yield PlacesUtils.bookmarks.fetch(bm.guid);
- Assert.equal(bm.parentGuid, descendant.guid);
- Assert.equal(bm.index, 0);
-
- bm = yield PlacesUtils.bookmarks.update({ guid: bm.guid,
- parentGuid: parent.guid,
- index: 0 });
- Assert.equal(bm.parentGuid, parent.guid);
- Assert.equal(bm.index, 0);
-
- descendant = yield PlacesUtils.bookmarks.fetch(descendant.guid);
- Assert.equal(descendant.index, 1);
-});
-
-add_task(function* update_move_append() {
- let folder_a =
- yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER });
- checkBookmarkObject(folder_a);
- let folder_b =
- yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER });
- checkBookmarkObject(folder_b);
-
- /* folder_a: [sep_1, sep_2, sep_3], folder_b: [] */
- let sep_1 = yield PlacesUtils.bookmarks.insert({ parentGuid: folder_a.guid,
- type: PlacesUtils.bookmarks.TYPE_SEPARATOR });
- checkBookmarkObject(sep_1);
- let sep_2 = yield PlacesUtils.bookmarks.insert({ parentGuid: folder_a.guid,
- type: PlacesUtils.bookmarks.TYPE_SEPARATOR });
- checkBookmarkObject(sep_2);
- let sep_3 = yield PlacesUtils.bookmarks.insert({ parentGuid: folder_a.guid,
- type: PlacesUtils.bookmarks.TYPE_SEPARATOR });
- checkBookmarkObject(sep_3);
-
- function ensurePosition(info, parentGuid, index) {
- checkBookmarkObject(info);
- Assert.equal(info.parentGuid, parentGuid);
- Assert.equal(info.index, index);
- }
-
- // folder_a: [sep_2, sep_3, sep_1], folder_b: []
- sep_1.index = PlacesUtils.bookmarks.DEFAULT_INDEX;
- // Note sep_1 includes parentGuid even though we're not moving the item to
- // another folder
- sep_1 = yield PlacesUtils.bookmarks.update(sep_1);
- ensurePosition(sep_1, folder_a.guid, 2);
- sep_2 = yield PlacesUtils.bookmarks.fetch(sep_2.guid);
- ensurePosition(sep_2, folder_a.guid, 0);
- sep_3 = yield PlacesUtils.bookmarks.fetch(sep_3.guid);
- ensurePosition(sep_3, folder_a.guid, 1);
- sep_1 = yield PlacesUtils.bookmarks.fetch(sep_1.guid);
- ensurePosition(sep_1, folder_a.guid, 2);
-
- // folder_a: [sep_2, sep_1], folder_b: [sep_3]
- sep_3.index = PlacesUtils.bookmarks.DEFAULT_INDEX;
- sep_3.parentGuid = folder_b.guid;
- sep_3 = yield PlacesUtils.bookmarks.update(sep_3);
- ensurePosition(sep_3, folder_b.guid, 0);
- sep_2 = yield PlacesUtils.bookmarks.fetch(sep_2.guid);
- ensurePosition(sep_2, folder_a.guid, 0);
- sep_1 = yield PlacesUtils.bookmarks.fetch(sep_1.guid);
- ensurePosition(sep_1, folder_a.guid, 1);
- sep_3 = yield PlacesUtils.bookmarks.fetch(sep_3.guid);
- ensurePosition(sep_3, folder_b.guid, 0);
-
- // folder_a: [sep_1], folder_b: [sep_3, sep_2]
- sep_2.index = Number.MAX_SAFE_INTEGER;
- sep_2.parentGuid = folder_b.guid;
- sep_2 = yield PlacesUtils.bookmarks.update(sep_2);
- ensurePosition(sep_2, folder_b.guid, 1);
- sep_1 = yield PlacesUtils.bookmarks.fetch(sep_1.guid);
- ensurePosition(sep_1, folder_a.guid, 0);
- sep_3 = yield PlacesUtils.bookmarks.fetch(sep_3.guid);
- ensurePosition(sep_3, folder_b.guid, 0);
- sep_2 = yield PlacesUtils.bookmarks.fetch(sep_2.guid);
- ensurePosition(sep_2, folder_b.guid, 1);
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/places/tests/bookmarks/test_bookmarkstree_cache.js b/toolkit/components/places/tests/bookmarks/test_bookmarkstree_cache.js
deleted file mode 100644
index f5cf34641a..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_bookmarkstree_cache.js
+++ /dev/null
@@ -1,18 +0,0 @@
-
-// Bug 1192692 - promiseBookmarksTree caches items without adding observers to
-// invalidate the cache.
-add_task(function* boookmarks_tree_cache() {
- // Note that for this test to be effective, it needs to use the "old" sync
- // bookmarks methods - using, eg, PlacesUtils.bookmarks.insert() doesn't
- // demonstrate the problem as it indirectly arranges for the observers to
- // be added.
- let id = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- uri("http://example.com"),
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "A title");
- yield PlacesUtils.promiseBookmarksTree();
-
- PlacesUtils.bookmarks.removeItem(id);
-
- yield Assert.rejects(PlacesUtils.promiseItemGuid(id));
-});
diff --git a/toolkit/components/places/tests/bookmarks/test_changeBookmarkURI.js b/toolkit/components/places/tests/bookmarks/test_changeBookmarkURI.js
deleted file mode 100644
index 55ffecf2f6..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_changeBookmarkURI.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-// Get bookmark service
-var bmsvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
-
-/**
- * Ensures that the Places APIs recognize that aBookmarkedUri is bookmarked
- * via aBookmarkId and that aUnbookmarkedUri is not bookmarked at all.
- *
- * @param aBookmarkId
- * an item ID whose corresponding URI is aBookmarkedUri
- * @param aBookmarkedUri
- * a bookmarked URI that has a corresponding item ID aBookmarkId
- * @param aUnbookmarkedUri
- * a URI that is not currently bookmarked at all
- */
-function checkUris(aBookmarkId, aBookmarkedUri, aUnbookmarkedUri)
-{
- // Ensure that aBookmarkedUri equals some URI that is bookmarked
- var uri = bmsvc.getBookmarkedURIFor(aBookmarkedUri);
- do_check_neq(uri, null);
- do_check_true(uri.equals(aBookmarkedUri));
-
- // Ensure that aBookmarkedUri is considered bookmarked
- do_check_true(bmsvc.isBookmarked(aBookmarkedUri));
-
- // Ensure that the URI corresponding to aBookmarkId equals aBookmarkedUri
- do_check_true(bmsvc.getBookmarkURI(aBookmarkId).equals(aBookmarkedUri));
-
- // Ensure that aUnbookmarkedUri does not equal any URI that is bookmarked
- uri = bmsvc.getBookmarkedURIFor(aUnbookmarkedUri);
- do_check_eq(uri, null);
-
- // Ensure that aUnbookmarkedUri is not considered bookmarked
- do_check_false(bmsvc.isBookmarked(aUnbookmarkedUri));
-}
-
-// main
-function run_test() {
- // Create a folder
- var folderId = bmsvc.createFolder(bmsvc.toolbarFolder,
- "test",
- bmsvc.DEFAULT_INDEX);
-
- // Create 2 URIs
- var uri1 = uri("http://www.dogs.com");
- var uri2 = uri("http://www.cats.com");
-
- // Bookmark the first one
- var bookmarkId = bmsvc.insertBookmark(folderId,
- uri1,
- bmsvc.DEFAULT_INDEX,
- "Dogs");
-
- // uri1 is bookmarked via bookmarkId, uri2 is not
- checkUris(bookmarkId, uri1, uri2);
-
- // Change the URI of the bookmark to uri2
- bmsvc.changeBookmarkURI(bookmarkId, uri2);
-
- // uri2 is now bookmarked via bookmarkId, uri1 is not
- checkUris(bookmarkId, uri2, uri1);
-}
diff --git a/toolkit/components/places/tests/bookmarks/test_getBookmarkedURIFor.js b/toolkit/components/places/tests/bookmarks/test_getBookmarkedURIFor.js
deleted file mode 100644
index c43e8e2837..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_getBookmarkedURIFor.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
- /**
- * Test bookmarksService.getBookmarkedURIFor(aURI);
- */
-
-var hs = PlacesUtils.history;
-var bs = PlacesUtils.bookmarks;
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* test_getBookmarkedURIFor() {
- let now = Date.now() * 1000;
- const sourceURI = uri("http://test.mozilla.org/");
- // Add a visit and a bookmark.
- yield PlacesTestUtils.addVisits({ uri: sourceURI, visitDate: now });
- do_check_eq(bs.getBookmarkedURIFor(sourceURI), null);
-
- let sourceItemId = bs.insertBookmark(bs.unfiledBookmarksFolder,
- sourceURI,
- bs.DEFAULT_INDEX,
- "bookmark");
- do_check_true(bs.getBookmarkedURIFor(sourceURI).equals(sourceURI));
-
- // Add a redirected visit.
- const permaURI = uri("http://perma.mozilla.org/");
- yield PlacesTestUtils.addVisits({
- uri: permaURI,
- transition: TRANSITION_REDIRECT_PERMANENT,
- visitDate: now++,
- referrer: sourceURI
- });
- do_check_true(bs.getBookmarkedURIFor(sourceURI).equals(sourceURI));
- do_check_true(bs.getBookmarkedURIFor(permaURI).equals(sourceURI));
- // Add a bookmark to the destination.
- let permaItemId = bs.insertBookmark(bs.unfiledBookmarksFolder,
- permaURI,
- bs.DEFAULT_INDEX,
- "bookmark");
- do_check_true(bs.getBookmarkedURIFor(sourceURI).equals(sourceURI));
- do_check_true(bs.getBookmarkedURIFor(permaURI).equals(permaURI));
- // Now remove the bookmark on the destination.
- bs.removeItem(permaItemId);
- // We should see the source as bookmark.
- do_check_true(bs.getBookmarkedURIFor(permaURI).equals(sourceURI));
-
- // Add another redirected visit.
- const tempURI = uri("http://perma.mozilla.org/");
- yield PlacesTestUtils.addVisits({
- uri: tempURI,
- transition: TRANSITION_REDIRECT_TEMPORARY,
- visitDate: now++,
- referrer: permaURI
- });
-
- do_check_true(bs.getBookmarkedURIFor(sourceURI).equals(sourceURI));
- do_check_true(bs.getBookmarkedURIFor(tempURI).equals(sourceURI));
- // Add a bookmark to the destination.
- let tempItemId = bs.insertBookmark(bs.unfiledBookmarksFolder,
- tempURI,
- bs.DEFAULT_INDEX,
- "bookmark");
- do_check_true(bs.getBookmarkedURIFor(sourceURI).equals(sourceURI));
- do_check_true(bs.getBookmarkedURIFor(tempURI).equals(tempURI));
-
- // Now remove the bookmark on the destination.
- bs.removeItem(tempItemId);
- // We should see the source as bookmark.
- do_check_true(bs.getBookmarkedURIFor(tempURI).equals(sourceURI));
- // Remove the source bookmark as well.
- bs.removeItem(sourceItemId);
- do_check_eq(bs.getBookmarkedURIFor(tempURI), null);
-
- // Try to pass in a never seen URI, should return null and a new entry should
- // not be added to the database.
- do_check_eq(bs.getBookmarkedURIFor(uri("http://does.not.exist/")), null);
- do_check_false(page_in_database("http://does.not.exist/"));
-});
diff --git a/toolkit/components/places/tests/bookmarks/test_keywords.js b/toolkit/components/places/tests/bookmarks/test_keywords.js
deleted file mode 100644
index 149d6d0b08..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_keywords.js
+++ /dev/null
@@ -1,310 +0,0 @@
-const URI1 = NetUtil.newURI("http://test1.mozilla.org/");
-const URI2 = NetUtil.newURI("http://test2.mozilla.org/");
-const URI3 = NetUtil.newURI("http://test3.mozilla.org/");
-
-function check_keyword(aURI, aKeyword) {
- if (aKeyword)
- aKeyword = aKeyword.toLowerCase();
-
- for (let bm of PlacesUtils.getBookmarksForURI(aURI)) {
- let keyword = PlacesUtils.bookmarks.getKeywordForBookmark(bm);
- if (keyword && !aKeyword) {
- throw (`${aURI.spec} should not have a keyword`);
- } else if (aKeyword && keyword == aKeyword) {
- Assert.equal(keyword, aKeyword);
- }
- }
-
- if (aKeyword) {
- let uri = PlacesUtils.bookmarks.getURIForKeyword(aKeyword);
- Assert.equal(uri.spec, aURI.spec);
- // Check case insensitivity.
- uri = PlacesUtils.bookmarks.getURIForKeyword(aKeyword.toUpperCase());
- Assert.equal(uri.spec, aURI.spec);
- }
-}
-
-function* check_orphans() {
- let db = yield PlacesUtils.promiseDBConnection();
- let rows = yield db.executeCached(
- `SELECT id FROM moz_keywords k
- WHERE NOT EXISTS (SELECT 1 FROM moz_places WHERE id = k.place_id)
- `);
- Assert.equal(rows.length, 0);
-}
-
-function expectNotifications() {
- let notifications = [];
- let observer = new Proxy(NavBookmarkObserver, {
- get(target, name) {
- if (name == "check") {
- PlacesUtils.bookmarks.removeObserver(observer);
- return expectedNotifications =>
- Assert.deepEqual(notifications, expectedNotifications);
- }
-
- if (name.startsWith("onItemChanged")) {
- return function(id, prop, isAnno, val, lastMod, itemType, parentId, guid, parentGuid, oldVal) {
- if (prop != "keyword")
- return;
- let args = Array.from(arguments, arg => {
- if (arg && arg instanceof Ci.nsIURI)
- return new URL(arg.spec);
- if (arg && typeof(arg) == "number" && arg >= Date.now() * 1000)
- return new Date(parseInt(arg/1000));
- return arg;
- });
- notifications.push({ name: name, arguments: args });
- }
- }
-
- return target[name];
- }
- });
- PlacesUtils.bookmarks.addObserver(observer, false);
- return observer;
-}
-
-add_task(function test_invalid_input() {
- Assert.throws(() => PlacesUtils.bookmarks.getURIForKeyword(null),
- /NS_ERROR_ILLEGAL_VALUE/);
- Assert.throws(() => PlacesUtils.bookmarks.getURIForKeyword(""),
- /NS_ERROR_ILLEGAL_VALUE/);
- Assert.throws(() => PlacesUtils.bookmarks.getKeywordForBookmark(null),
- /NS_ERROR_ILLEGAL_VALUE/);
- Assert.throws(() => PlacesUtils.bookmarks.getKeywordForBookmark(0),
- /NS_ERROR_ILLEGAL_VALUE/);
- Assert.throws(() => PlacesUtils.bookmarks.setKeywordForBookmark(null, "k"),
- /NS_ERROR_ILLEGAL_VALUE/);
- Assert.throws(() => PlacesUtils.bookmarks.setKeywordForBookmark(0, "k"),
- /NS_ERROR_ILLEGAL_VALUE/);
-});
-
-add_task(function* test_addBookmarkAndKeyword() {
- check_keyword(URI1, null);
- let fc = yield foreign_count(URI1);
- let observer = expectNotifications();
-
- let itemId =
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- URI1,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "test");
-
- PlacesUtils.bookmarks.setKeywordForBookmark(itemId, "keyword");
- let bookmark = yield PlacesUtils.bookmarks.fetch({ url: URI1 });
- observer.check([ { name: "onItemChanged",
- arguments: [ itemId, "keyword", false, "keyword",
- bookmark.lastModified, bookmark.type,
- (yield PlacesUtils.promiseItemId(bookmark.parentGuid)),
- bookmark.guid, bookmark.parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] }
- ]);
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- check_keyword(URI1, "keyword");
- Assert.equal((yield foreign_count(URI1)), fc + 2); // + 1 bookmark + 1 keyword
-
- yield PlacesTestUtils.promiseAsyncUpdates();
- yield check_orphans();
-});
-
-add_task(function* test_addBookmarkToURIHavingKeyword() {
- // The uri has already a keyword.
- check_keyword(URI1, "keyword");
- let fc = yield foreign_count(URI1);
-
- let itemId =
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- URI1,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "test");
- check_keyword(URI1, "keyword");
- Assert.equal((yield foreign_count(URI1)), fc + 1); // + 1 bookmark
-
- PlacesUtils.bookmarks.removeItem(itemId);
- yield PlacesTestUtils.promiseAsyncUpdates();
- check_orphans();
-});
-
-add_task(function* test_sameKeywordDifferentURI() {
- let fc1 = yield foreign_count(URI1);
- let fc2 = yield foreign_count(URI2);
- let observer = expectNotifications();
-
- let itemId =
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- URI2,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "test2");
- check_keyword(URI1, "keyword");
- check_keyword(URI2, null);
-
- PlacesUtils.bookmarks.setKeywordForBookmark(itemId, "kEyWoRd");
-
- let bookmark1 = yield PlacesUtils.bookmarks.fetch({ url: URI1 });
- let bookmark2 = yield PlacesUtils.bookmarks.fetch({ url: URI2 });
- observer.check([ { name: "onItemChanged",
- arguments: [ (yield PlacesUtils.promiseItemId(bookmark1.guid)),
- "keyword", false, "",
- bookmark1.lastModified, bookmark1.type,
- (yield PlacesUtils.promiseItemId(bookmark1.parentGuid)),
- bookmark1.guid, bookmark1.parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] },
- { name: "onItemChanged",
- arguments: [ itemId, "keyword", false, "keyword",
- bookmark2.lastModified, bookmark2.type,
- (yield PlacesUtils.promiseItemId(bookmark2.parentGuid)),
- bookmark2.guid, bookmark2.parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] }
- ]);
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- // The keyword should have been "moved" to the new URI.
- check_keyword(URI1, null);
- Assert.equal((yield foreign_count(URI1)), fc1 - 1); // - 1 keyword
- check_keyword(URI2, "keyword");
- Assert.equal((yield foreign_count(URI2)), fc2 + 2); // + 1 bookmark + 1 keyword
-
- yield PlacesTestUtils.promiseAsyncUpdates();
- check_orphans();
-});
-
-add_task(function* test_sameURIDifferentKeyword() {
- let fc = yield foreign_count(URI2);
- let observer = expectNotifications();
-
- let itemId =
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- URI2,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "test2");
- check_keyword(URI2, "keyword");
-
- PlacesUtils.bookmarks.setKeywordForBookmark(itemId, "keyword2");
-
- let bookmarks = [];
- yield PlacesUtils.bookmarks.fetch({ url: URI2 }, bookmark => bookmarks.push(bookmark));
- observer.check([ { name: "onItemChanged",
- arguments: [ (yield PlacesUtils.promiseItemId(bookmarks[0].guid)),
- "keyword", false, "keyword2",
- bookmarks[0].lastModified, bookmarks[0].type,
- (yield PlacesUtils.promiseItemId(bookmarks[0].parentGuid)),
- bookmarks[0].guid, bookmarks[0].parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] },
- { name: "onItemChanged",
- arguments: [ (yield PlacesUtils.promiseItemId(bookmarks[1].guid)),
- "keyword", false, "keyword2",
- bookmarks[1].lastModified, bookmarks[1].type,
- (yield PlacesUtils.promiseItemId(bookmarks[1].parentGuid)),
- bookmarks[1].guid, bookmarks[1].parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] }
- ]);
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- check_keyword(URI2, "keyword2");
- Assert.equal((yield foreign_count(URI2)), fc + 2); // + 1 bookmark + 1 keyword
-
- yield PlacesTestUtils.promiseAsyncUpdates();
- check_orphans();
-});
-
-add_task(function* test_removeBookmarkWithKeyword() {
- let fc = yield foreign_count(URI2);
- let itemId =
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- URI2,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "test");
-
- // The keyword should not be removed, since there are other bookmarks yet.
- PlacesUtils.bookmarks.removeItem(itemId);
-
- check_keyword(URI2, "keyword2");
- Assert.equal((yield foreign_count(URI2)), fc); // + 1 bookmark - 1 bookmark
-
- yield PlacesTestUtils.promiseAsyncUpdates();
- check_orphans();
-});
-
-add_task(function* test_unsetKeyword() {
- let fc = yield foreign_count(URI2);
- let observer = expectNotifications();
-
- let itemId =
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- URI2,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "test");
-
- // The keyword should be removed from any bookmark.
- PlacesUtils.bookmarks.setKeywordForBookmark(itemId, null);
-
- let bookmarks = [];
- yield PlacesUtils.bookmarks.fetch({ url: URI2 }, bookmark => bookmarks.push(bookmark));
- do_print(bookmarks.length);
- observer.check([ { name: "onItemChanged",
- arguments: [ (yield PlacesUtils.promiseItemId(bookmarks[0].guid)),
- "keyword", false, "",
- bookmarks[0].lastModified, bookmarks[0].type,
- (yield PlacesUtils.promiseItemId(bookmarks[0].parentGuid)),
- bookmarks[0].guid, bookmarks[0].parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] },
- { name: "onItemChanged",
- arguments: [ (yield PlacesUtils.promiseItemId(bookmarks[1].guid)),
- "keyword", false, "",
- bookmarks[1].lastModified, bookmarks[1].type,
- (yield PlacesUtils.promiseItemId(bookmarks[1].parentGuid)),
- bookmarks[1].guid, bookmarks[1].parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] },
- { name: "onItemChanged",
- arguments: [ (yield PlacesUtils.promiseItemId(bookmarks[2].guid)),
- "keyword", false, "",
- bookmarks[2].lastModified, bookmarks[2].type,
- (yield PlacesUtils.promiseItemId(bookmarks[2].parentGuid)),
- bookmarks[2].guid, bookmarks[2].parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] }
- ]);
-
- check_keyword(URI1, null);
- check_keyword(URI2, null);
- Assert.equal((yield foreign_count(URI2)), fc - 1); // + 1 bookmark - 2 keyword
-
- yield PlacesTestUtils.promiseAsyncUpdates();
- check_orphans();
-});
-
-add_task(function* test_addRemoveBookmark() {
- let observer = expectNotifications();
-
- let itemId =
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- URI3,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "test3");
-
- PlacesUtils.bookmarks.setKeywordForBookmark(itemId, "keyword");
- let bookmark = yield PlacesUtils.bookmarks.fetch({ url: URI3 });
- let parentId = yield PlacesUtils.promiseItemId(bookmark.parentGuid);
- PlacesUtils.bookmarks.removeItem(itemId);
-
- observer.check([ { name: "onItemChanged",
- arguments: [ itemId,
- "keyword", false, "keyword",
- bookmark.lastModified, bookmark.type,
- parentId,
- bookmark.guid, bookmark.parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] }
- ]);
-
- check_keyword(URI3, null);
- // Don't check the foreign count since the process is async.
- // The new test_keywords.js in unit is checking this though.
-
- yield PlacesTestUtils.promiseAsyncUpdates();
- check_orphans();
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/places/tests/bookmarks/test_nsINavBookmarkObserver.js b/toolkit/components/places/tests/bookmarks/test_nsINavBookmarkObserver.js
deleted file mode 100644
index 06f45b18e0..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_nsINavBookmarkObserver.js
+++ /dev/null
@@ -1,640 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Tests that each nsINavBookmarksObserver method gets the correct input.
-Cu.import("resource://gre/modules/PromiseUtils.jsm");
-
-const GUID_RE = /^[a-zA-Z0-9\-_]{12}$/;
-
-var gBookmarksObserver = {
- expected: [],
- setup(expected) {
- this.expected = expected;
- this.deferred = PromiseUtils.defer();
- return this.deferred.promise;
- },
- validate: function (aMethodName, aArguments) {
- do_check_eq(this.expected[0].name, aMethodName);
-
- let args = this.expected.shift().args;
- do_check_eq(aArguments.length, args.length);
- for (let i = 0; i < aArguments.length; i++) {
- do_check_true(args[i].check(aArguments[i]), aMethodName + "(args[" + i + "]: " + args[i].name + ")");
- }
-
- if (this.expected.length === 0) {
- this.deferred.resolve();
- }
- },
-
- // nsINavBookmarkObserver
- onBeginUpdateBatch() {
- return this.validate("onBeginUpdateBatch", arguments);
- },
- onEndUpdateBatch() {
- return this.validate("onEndUpdateBatch", arguments);
- },
- onItemAdded() {
- return this.validate("onItemAdded", arguments);
- },
- onItemRemoved() {
- return this.validate("onItemRemoved", arguments);
- },
- onItemChanged() {
- return this.validate("onItemChanged", arguments);
- },
- onItemVisited() {
- return this.validate("onItemVisited", arguments);
- },
- onItemMoved() {
- return this.validate("onItemMoved", arguments);
- },
-
- // nsISupports
- QueryInterface: XPCOMUtils.generateQI([Ci.nsINavBookmarkObserver]),
-};
-
-var gBookmarkSkipObserver = {
- skipTags: true,
- skipDescendantsOnItemRemoval: true,
-
- expected: null,
- setup(expected) {
- this.expected = expected;
- this.deferred = PromiseUtils.defer();
- return this.deferred.promise;
- },
- validate: function (aMethodName) {
- do_check_eq(this.expected.shift(), aMethodName);
- if (this.expected.length === 0) {
- this.deferred.resolve();
- }
- },
-
- // nsINavBookmarkObserver
- onBeginUpdateBatch() {
- return this.validate("onBeginUpdateBatch", arguments);
- },
- onEndUpdateBatch() {
- return this.validate("onEndUpdateBatch", arguments);
- },
- onItemAdded() {
- return this.validate("onItemAdded", arguments);
- },
- onItemRemoved() {
- return this.validate("onItemRemoved", arguments);
- },
- onItemChanged() {
- return this.validate("onItemChanged", arguments);
- },
- onItemVisited() {
- return this.validate("onItemVisited", arguments);
- },
- onItemMoved() {
- return this.validate("onItemMoved", arguments);
- },
-
- // nsISupports
- QueryInterface: XPCOMUtils.generateQI([Ci.nsINavBookmarkObserver]),
-};
-
-
-add_task(function setup() {
- PlacesUtils.bookmarks.addObserver(gBookmarksObserver, false);
- PlacesUtils.bookmarks.addObserver(gBookmarkSkipObserver, false);
-});
-
-add_task(function* batch() {
- let promise = Promise.all([
- gBookmarksObserver.setup([
- { name: "onBeginUpdateBatch",
- args: [] },
- { name: "onEndUpdateBatch",
- args: [] },
- ]),
- gBookmarkSkipObserver.setup([
- "onBeginUpdateBatch", "onEndUpdateBatch"
- ])]);
- PlacesUtils.bookmarks.runInBatchMode({
- runBatched: function () {
- // Nothing.
- }
- }, null);
- yield promise;
-});
-
-add_task(function* onItemAdded_bookmark() {
- const TITLE = "Bookmark 1";
- let uri = NetUtil.newURI("http://1.mozilla.org/");
- let promise = Promise.all([
- gBookmarkSkipObserver.setup([
- "onItemAdded"
- ]),
- gBookmarksObserver.setup([
- { name: "onItemAdded",
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "parentId", check: v => v === PlacesUtils.unfiledBookmarksFolderId },
- { name: "index", check: v => v === 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_BOOKMARK },
- { name: "uri", check: v => v instanceof Ci.nsIURI && v.equals(uri) },
- { name: "title", check: v => v === TITLE },
- { name: "dateAdded", check: v => typeof(v) == "number" && v > 0 },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- ])]);
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- uri, PlacesUtils.bookmarks.DEFAULT_INDEX,
- TITLE);
- yield promise;
-});
-
-add_task(function* onItemAdded_separator() {
- let promise = Promise.all([
- gBookmarkSkipObserver.setup([
- "onItemAdded"
- ]),
- gBookmarksObserver.setup([
- { name: "onItemAdded",
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "parentId", check: v => v === PlacesUtils.unfiledBookmarksFolderId },
- { name: "index", check: v => v === 1 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_SEPARATOR },
- { name: "uri", check: v => v === null },
- { name: "title", check: v => v === null },
- { name: "dateAdded", check: v => typeof(v) == "number" && v > 0 },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- ])]);
- PlacesUtils.bookmarks.insertSeparator(PlacesUtils.unfiledBookmarksFolderId,
- PlacesUtils.bookmarks.DEFAULT_INDEX);
- yield promise;
-});
-
-add_task(function* onItemAdded_folder() {
- const TITLE = "Folder 1";
- let promise = Promise.all([
- gBookmarkSkipObserver.setup([
- "onItemAdded"
- ]),
- gBookmarksObserver.setup([
- { name: "onItemAdded",
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "parentId", check: v => v === PlacesUtils.unfiledBookmarksFolderId },
- { name: "index", check: v => v === 2 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_FOLDER },
- { name: "uri", check: v => v === null },
- { name: "title", check: v => v === TITLE },
- { name: "dateAdded", check: v => typeof(v) == "number" && v > 0 },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- ])]);
- PlacesUtils.bookmarks.createFolder(PlacesUtils.unfiledBookmarksFolderId,
- TITLE,
- PlacesUtils.bookmarks.DEFAULT_INDEX);
- yield promise;
-});
-
-add_task(function* onItemChanged_title_bookmark() {
- let id = PlacesUtils.bookmarks.getIdForItemAt(PlacesUtils.unfiledBookmarksFolderId, 0);
- const TITLE = "New title";
- let promise = Promise.all([
- gBookmarkSkipObserver.setup([
- "onItemChanged"
- ]),
- gBookmarksObserver.setup([
- { name: "onItemChanged", // This is an unfortunate effect of bug 653910.
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "property", check: v => v === "title" },
- { name: "isAnno", check: v => v === false },
- { name: "newValue", check: v => v === TITLE },
- { name: "lastModified", check: v => typeof(v) == "number" && v > 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_BOOKMARK },
- { name: "parentId", check: v => v === PlacesUtils.unfiledBookmarksFolderId },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "oldValue", check: v => typeof(v) == "string" },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- ])]);
- PlacesUtils.bookmarks.setItemTitle(id, TITLE);
- yield promise;
-});
-
-add_task(function* onItemChanged_tags_bookmark() {
- let id = PlacesUtils.bookmarks.getIdForItemAt(PlacesUtils.unfiledBookmarksFolderId, 0);
- let uri = PlacesUtils.bookmarks.getBookmarkURI(id);
- const TAG = "tag";
- let promise = Promise.all([
- gBookmarkSkipObserver.setup([
- "onItemChanged", "onItemChanged"
- ]),
- gBookmarksObserver.setup([
- { name: "onItemAdded", // This is the tag folder.
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "parentId", check: v => v === PlacesUtils.tagsFolderId },
- { name: "index", check: v => v === 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_FOLDER },
- { name: "uri", check: v => v === null },
- { name: "title", check: v => v === TAG },
- { name: "dateAdded", check: v => typeof(v) == "number" && v > 0 },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- { name: "onItemAdded", // This is the tag.
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "parentId", check: v => typeof(v) == "number" && v > 0 },
- { name: "index", check: v => v === 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_BOOKMARK },
- { name: "uri", check: v => v instanceof Ci.nsIURI && v.equals(uri) },
- { name: "title", check: v => v === null },
- { name: "dateAdded", check: v => typeof(v) == "number" && v > 0 },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- { name: "onItemChanged",
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "property", check: v => v === "tags" },
- { name: "isAnno", check: v => v === false },
- { name: "newValue", check: v => v === "" },
- { name: "lastModified", check: v => typeof(v) == "number" && v > 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_BOOKMARK },
- { name: "parentId", check: v => v === PlacesUtils.unfiledBookmarksFolderId },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "oldValue", check: v => typeof(v) == "string" },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- { name: "onItemRemoved", // This is the tag.
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "parentId", check: v => typeof(v) == "number" && v > 0 },
- { name: "index", check: v => v === 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_BOOKMARK },
- { name: "uri", check: v => v instanceof Ci.nsIURI && v.equals(uri) },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- { name: "onItemRemoved", // This is the tag folder.
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "parentId", check: v => v === PlacesUtils.tagsFolderId },
- { name: "index", check: v => v === 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_FOLDER },
- { name: "uri", check: v => v === null },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- { name: "onItemChanged",
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "property", check: v => v === "tags" },
- { name: "isAnno", check: v => v === false },
- { name: "newValue", check: v => v === "" },
- { name: "lastModified", check: v => typeof(v) == "number" && v > 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_BOOKMARK },
- { name: "parentId", check: v => v === PlacesUtils.unfiledBookmarksFolderId },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "oldValue", check: v => typeof(v) == "string" },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- ])]);
- PlacesUtils.tagging.tagURI(uri, [TAG]);
- PlacesUtils.tagging.untagURI(uri, [TAG]);
- yield promise;
-});
-
-add_task(function* onItemMoved_bookmark() {
- let id = PlacesUtils.bookmarks.getIdForItemAt(PlacesUtils.unfiledBookmarksFolderId, 0);
- let promise = Promise.all([
- gBookmarkSkipObserver.setup([
- "onItemMoved", "onItemMoved"
- ]),
- gBookmarksObserver.setup([
- { name: "onItemMoved",
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "oldParentId", check: v => v === PlacesUtils.unfiledBookmarksFolderId },
- { name: "oldIndex", check: v => v === 0 },
- { name: "newParentId", check: v => v === PlacesUtils.toolbarFolderId },
- { name: "newIndex", check: v => v === 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_BOOKMARK },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "oldParentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "newParentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- { name: "onItemMoved",
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "oldParentId", check: v => v === PlacesUtils.toolbarFolderId },
- { name: "oldIndex", check: v => v === 0 },
- { name: "newParentId", check: v => v === PlacesUtils.unfiledBookmarksFolderId },
- { name: "newIndex", check: v => v === 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_BOOKMARK },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "oldParentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "newParentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- ])]);
- PlacesUtils.bookmarks.moveItem(id, PlacesUtils.toolbarFolderId, 0);
- PlacesUtils.bookmarks.moveItem(id, PlacesUtils.unfiledBookmarksFolderId, 0);
- yield promise;
-});
-
-add_task(function* onItemMoved_bookmark() {
- let id = PlacesUtils.bookmarks.getIdForItemAt(PlacesUtils.unfiledBookmarksFolderId, 0);
- let uri = PlacesUtils.bookmarks.getBookmarkURI(id);
- let promise = Promise.all([
- gBookmarkSkipObserver.setup([
- "onItemVisited"
- ]),
- gBookmarksObserver.setup([
- { name: "onItemVisited",
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "visitId", check: v => typeof(v) == "number" && v > 0 },
- { name: "time", check: v => typeof(v) == "number" && v > 0 },
- { name: "transitionType", check: v => v === PlacesUtils.history.TRANSITION_TYPED },
- { name: "uri", check: v => v instanceof Ci.nsIURI && v.equals(uri) },
- { name: "parentId", check: v => v === PlacesUtils.unfiledBookmarksFolderId },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- ] },
- ])]);
- PlacesTestUtils.addVisits({ uri: uri, transition: TRANSITION_TYPED });
- yield promise;
-});
-
-add_task(function* onItemRemoved_bookmark() {
- let id = PlacesUtils.bookmarks.getIdForItemAt(PlacesUtils.unfiledBookmarksFolderId, 0);
- let uri = PlacesUtils.bookmarks.getBookmarkURI(id);
- let promise = Promise.all([
- gBookmarkSkipObserver.setup([
- "onItemChanged", "onItemRemoved"
- ]),
- gBookmarksObserver.setup([
- { name: "onItemChanged", // This is an unfortunate effect of bug 653910.
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "property", check: v => v === "" },
- { name: "isAnno", check: v => v === true },
- { name: "newValue", check: v => v === "" },
- { name: "lastModified", check: v => typeof(v) == "number" && v > 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_BOOKMARK },
- { name: "parentId", check: v => v === PlacesUtils.unfiledBookmarksFolderId },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "oldValue", check: v => typeof(v) == "string" },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- { name: "onItemRemoved",
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "parentId", check: v => v === PlacesUtils.unfiledBookmarksFolderId },
- { name: "index", check: v => v === 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_BOOKMARK },
- { name: "uri", check: v => v instanceof Ci.nsIURI && v.equals(uri) },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- ])]);
- PlacesUtils.bookmarks.removeItem(id);
- yield promise;
-});
-
-add_task(function* onItemRemoved_separator() {
- let id = PlacesUtils.bookmarks.getIdForItemAt(PlacesUtils.unfiledBookmarksFolderId, 0);
- let promise = Promise.all([
- gBookmarkSkipObserver.setup([
- "onItemChanged", "onItemRemoved"
- ]),
- gBookmarksObserver.setup([
- { name: "onItemChanged", // This is an unfortunate effect of bug 653910.
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "property", check: v => v === "" },
- { name: "isAnno", check: v => v === true },
- { name: "newValue", check: v => v === "" },
- { name: "lastModified", check: v => typeof(v) == "number" && v > 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_SEPARATOR },
- { name: "parentId", check: v => typeof(v) == "number" && v > 0 },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "oldValue", check: v => typeof(v) == "string" },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- { name: "onItemRemoved",
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "parentId", check: v => typeof(v) == "number" && v > 0 },
- { name: "index", check: v => v === 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_SEPARATOR },
- { name: "uri", check: v => v === null },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- ])]);
- PlacesUtils.bookmarks.removeItem(id);
- yield promise;
-});
-
-add_task(function* onItemRemoved_folder() {
- let id = PlacesUtils.bookmarks.getIdForItemAt(PlacesUtils.unfiledBookmarksFolderId, 0);
- let promise = Promise.all([
- gBookmarkSkipObserver.setup([
- "onItemChanged", "onItemRemoved"
- ]),
- gBookmarksObserver.setup([
- { name: "onItemChanged", // This is an unfortunate effect of bug 653910.
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "property", check: v => v === "" },
- { name: "isAnno", check: v => v === true },
- { name: "newValue", check: v => v === "" },
- { name: "lastModified", check: v => typeof(v) == "number" && v > 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_FOLDER },
- { name: "parentId", check: v => typeof(v) == "number" && v > 0 },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "oldValue", check: v => typeof(v) == "string" },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- { name: "onItemRemoved",
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "parentId", check: v => typeof(v) == "number" && v > 0 },
- { name: "index", check: v => v === 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_FOLDER },
- { name: "uri", check: v => v === null },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- ])]);
- PlacesUtils.bookmarks.removeItem(id);
- yield promise;
-});
-
-add_task(function* onItemRemoved_folder_recursive() {
- const TITLE = "Folder 3";
- const BMTITLE = "Bookmark 1";
- let uri = NetUtil.newURI("http://1.mozilla.org/");
- let promise = Promise.all([
- gBookmarkSkipObserver.setup([
- "onItemAdded", "onItemAdded", "onItemAdded", "onItemAdded",
- "onItemChanged", "onItemRemoved"
- ]),
- gBookmarksObserver.setup([
- { name: "onItemAdded",
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "parentId", check: v => v === PlacesUtils.unfiledBookmarksFolderId },
- { name: "index", check: v => v === 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_FOLDER },
- { name: "uri", check: v => v === null },
- { name: "title", check: v => v === TITLE },
- { name: "dateAdded", check: v => typeof(v) == "number" && v > 0 },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- { name: "onItemAdded",
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "parentId", check: v => v === PlacesUtils.bookmarks.getIdForItemAt(PlacesUtils.unfiledBookmarksFolderId, 0) },
- { name: "index", check: v => v === 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_BOOKMARK },
- { name: "uri", check: v => v instanceof Ci.nsIURI && v.equals(uri) },
- { name: "title", check: v => v === BMTITLE },
- { name: "dateAdded", check: v => typeof(v) == "number" && v > 0 },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- { name: "onItemAdded",
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "parentId", check: v => v === PlacesUtils.bookmarks.getIdForItemAt(PlacesUtils.unfiledBookmarksFolderId, 0) },
- { name: "index", check: v => v === 1 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_FOLDER },
- { name: "uri", check: v => v === null },
- { name: "title", check: v => v === TITLE },
- { name: "dateAdded", check: v => typeof(v) == "number" && v > 0 },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- { name: "onItemAdded",
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "parentId", check: v => v === PlacesUtils.bookmarks.getIdForItemAt(PlacesUtils.bookmarks.getIdForItemAt(PlacesUtils.unfiledBookmarksFolderId, 0), 1) },
- { name: "index", check: v => v === 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_BOOKMARK },
- { name: "uri", check: v => v instanceof Ci.nsIURI && v.equals(uri) },
- { name: "title", check: v => v === BMTITLE },
- { name: "dateAdded", check: v => typeof(v) == "number" && v > 0 },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- { name: "onItemChanged", // This is an unfortunate effect of bug 653910.
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "property", check: v => v === "" },
- { name: "isAnno", check: v => v === true },
- { name: "newValue", check: v => v === "" },
- { name: "lastModified", check: v => typeof(v) == "number" && v > 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_FOLDER },
- { name: "parentId", check: v => typeof(v) == "number" && v > 0 },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "oldValue", check: v => typeof(v) == "string" },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- { name: "onItemRemoved",
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "parentId", check: v => typeof(v) == "number" && v > 0 },
- { name: "index", check: v => v === 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_BOOKMARK },
- { name: "uri", check: v => v instanceof Ci.nsIURI && v.equals(uri) },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- { name: "onItemRemoved",
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "parentId", check: v => typeof(v) == "number" && v > 0 },
- { name: "index", check: v => v === 1 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_FOLDER },
- { name: "uri", check: v => v === null },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- { name: "onItemRemoved",
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "parentId", check: v => typeof(v) == "number" && v > 0 },
- { name: "index", check: v => v === 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_BOOKMARK },
- { name: "uri", check: v => v instanceof Ci.nsIURI && v.equals(uri) },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- { name: "onItemRemoved",
- args: [
- { name: "itemId", check: v => typeof(v) == "number" && v > 0 },
- { name: "parentId", check: v => typeof(v) == "number" && v > 0 },
- { name: "index", check: v => v === 0 },
- { name: "itemType", check: v => v === PlacesUtils.bookmarks.TYPE_FOLDER },
- { name: "uri", check: v => v === null },
- { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
- { name: "source", check: v => Object.values(PlacesUtils.bookmarks.SOURCES).includes(v) },
- ] },
- ])]);
- let folder = PlacesUtils.bookmarks.createFolder(PlacesUtils.unfiledBookmarksFolderId,
- TITLE,
- PlacesUtils.bookmarks.DEFAULT_INDEX);
- PlacesUtils.bookmarks.insertBookmark(folder,
- uri, PlacesUtils.bookmarks.DEFAULT_INDEX,
- BMTITLE);
- let folder2 = PlacesUtils.bookmarks.createFolder(folder, TITLE,
- PlacesUtils.bookmarks.DEFAULT_INDEX);
- PlacesUtils.bookmarks.insertBookmark(folder2,
- uri, PlacesUtils.bookmarks.DEFAULT_INDEX,
- BMTITLE);
-
- PlacesUtils.bookmarks.removeItem(folder);
- yield promise;
-});
-
-add_task(function cleanup()
-{
- PlacesUtils.bookmarks.removeObserver(gBookmarksObserver);
- PlacesUtils.bookmarks.removeObserver(gBookmarkSkipObserver);
-});
diff --git a/toolkit/components/places/tests/bookmarks/test_protectRoots.js b/toolkit/components/places/tests/bookmarks/test_protectRoots.js
deleted file mode 100644
index 0a59f16535..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_protectRoots.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function run_test()
-{
- const ROOTS = [
- PlacesUtils.bookmarksMenuFolderId,
- PlacesUtils.toolbarFolderId,
- PlacesUtils.unfiledBookmarksFolderId,
- PlacesUtils.tagsFolderId,
- PlacesUtils.placesRootId,
- PlacesUtils.mobileFolderId,
- ];
-
- for (let root of ROOTS) {
- do_check_true(PlacesUtils.isRootItem(root));
-
- try {
- PlacesUtils.bookmarks.removeItem(root);
- do_throw("Trying to remove a root should throw");
- } catch (ex) {}
-
- try {
- PlacesUtils.bookmarks.moveItem(root, PlacesUtils.placesRootId, 0);
- do_throw("Trying to move a root should throw");
- } catch (ex) {}
-
- try {
- PlacesUtils.bookmarks.removeFolderChildren(root);
- if (root == PlacesUtils.placesRootId)
- do_throw("Trying to remove children of the main root should throw");
- } catch (ex) {
- if (root != PlacesUtils.placesRootId)
- do_throw("Trying to remove children of other roots should not throw");
- }
- }
-}
diff --git a/toolkit/components/places/tests/bookmarks/test_removeFolderTransaction_reinsert.js b/toolkit/components/places/tests/bookmarks/test_removeFolderTransaction_reinsert.js
deleted file mode 100644
index 537974b38a..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_removeFolderTransaction_reinsert.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * This test ensures that reinserting a folder within a transaction gives it
- * a different GUID, and passes the GUID to the observers.
- */
-
-add_task(function* test_removeFolderTransaction_reinsert() {
- let folder = yield PlacesUtils.bookmarks.insert({
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- parentGuid: PlacesUtils.bookmarks.menuGuid,
- title: "Test folder",
- });
- let folderId = yield PlacesUtils.promiseItemId(folder.guid);
- let fx = yield PlacesUtils.bookmarks.insert({
- parentGuid: folder.guid,
- title: "Get Firefox!",
- url: "http://getfirefox.com",
- });
- let fxId = yield PlacesUtils.promiseItemId(fx.guid);
- let tb = yield PlacesUtils.bookmarks.insert({
- parentGuid: folder.guid,
- title: "Get Thunderbird!",
- url: "http://getthunderbird.com",
- });
- let tbId = yield PlacesUtils.promiseItemId(tb.guid);
-
- let notifications = [];
- function checkNotifications(expected, message) {
- deepEqual(notifications, expected, message);
- notifications.length = 0;
- }
-
- let observer = {
- onItemAdded(itemId, parentId, index, type, uri, title, dateAdded, guid,
- parentGuid) {
- notifications.push(["onItemAdded", itemId, parentId, guid, parentGuid]);
- },
- onItemRemoved(itemId, parentId, index, type, uri, guid, parentGuid) {
- notifications.push(["onItemRemoved", itemId, parentId, guid, parentGuid]);
- },
- };
- PlacesUtils.bookmarks.addObserver(observer, false);
- PlacesUtils.registerShutdownFunction(function() {
- PlacesUtils.bookmarks.removeObserver(observer);
- });
-
- let transaction = PlacesUtils.bookmarks.getRemoveFolderTransaction(folderId);
- deepEqual(notifications, [], "We haven't executed the transaction yet");
-
- transaction.doTransaction();
- checkNotifications([
- ["onItemRemoved", tbId, folderId, tb.guid, folder.guid],
- ["onItemRemoved", fxId, folderId, fx.guid, folder.guid],
- ["onItemRemoved", folderId, PlacesUtils.bookmarksMenuFolderId, folder.guid,
- PlacesUtils.bookmarks.menuGuid],
- ], "Executing transaction should remove folder and its descendants");
-
- transaction.undoTransaction();
- // At this point, the restored folder has the same ID, but a different GUID.
- let newFolderGuid = yield PlacesUtils.promiseItemGuid(folderId);
- checkNotifications([
- ["onItemAdded", folderId, PlacesUtils.bookmarksMenuFolderId, newFolderGuid,
- PlacesUtils.bookmarks.menuGuid],
- ], "Undo should reinsert folder with same ID and different GUID");
-
- transaction.redoTransaction();
- checkNotifications([
- ["onItemRemoved", folderId, PlacesUtils.bookmarksMenuFolderId,
- newFolderGuid, PlacesUtils.bookmarks.menuGuid],
- ], "Redo should forward new GUID to observer");
-});
diff --git a/toolkit/components/places/tests/bookmarks/test_removeItem.js b/toolkit/components/places/tests/bookmarks/test_removeItem.js
deleted file mode 100644
index ec846b28e0..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_removeItem.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var tests = [];
-
-
-const DEFAULT_INDEX = PlacesUtils.bookmarks.DEFAULT_INDEX;
-
-function run_test() {
- // folder to hold this test
- var folderId =
- PlacesUtils.bookmarks.createFolder(PlacesUtils.toolbarFolderId,
- "", DEFAULT_INDEX);
-
- // add a bookmark to the new folder
- var bookmarkURI = uri("http://iasdjkf");
- do_check_false(PlacesUtils.bookmarks.isBookmarked(bookmarkURI));
- var bookmarkId = PlacesUtils.bookmarks.insertBookmark(folderId, bookmarkURI,
- DEFAULT_INDEX, "");
- do_check_eq(PlacesUtils.bookmarks.getItemTitle(bookmarkId), "");
-
- // remove the folder using removeItem
- PlacesUtils.bookmarks.removeItem(folderId);
- do_check_eq(PlacesUtils.bookmarks.getBookmarkIdsForURI(bookmarkURI).length, 0);
- do_check_false(PlacesUtils.bookmarks.isBookmarked(bookmarkURI));
- do_check_eq(PlacesUtils.bookmarks.getItemIndex(bookmarkId), -1);
-}
diff --git a/toolkit/components/places/tests/bookmarks/test_savedsearches.js b/toolkit/components/places/tests/bookmarks/test_savedsearches.js
deleted file mode 100644
index eee2c4489d..0000000000
--- a/toolkit/components/places/tests/bookmarks/test_savedsearches.js
+++ /dev/null
@@ -1,209 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-// get bookmarks root id
-var root = PlacesUtils.bookmarksMenuFolderId;
-
-// a search term that matches a default bookmark
-const searchTerm = "about";
-
-var testRoot;
-
-// main
-function run_test() {
- // create a folder to hold all the tests
- // this makes the tests more tolerant of changes to the default bookmarks set
- // also, name it using the search term, for testing that containers that match don't show up in query results
- testRoot = PlacesUtils.bookmarks.createFolder(
- root, searchTerm, PlacesUtils.bookmarks.DEFAULT_INDEX);
-
- run_next_test();
-}
-
-add_test(function test_savedsearches_bookmarks() {
- // add a bookmark that matches the search term
- var bookmarkId = PlacesUtils.bookmarks.insertBookmark(
- root, uri("http://foo.com"), PlacesUtils.bookmarks.DEFAULT_INDEX,
- searchTerm);
-
- // create a saved-search that matches a default bookmark
- var searchId = PlacesUtils.bookmarks.insertBookmark(
- testRoot, uri("place:terms=" + searchTerm + "&excludeQueries=1&expandQueries=1&queryType=1"),
- PlacesUtils.bookmarks.DEFAULT_INDEX, searchTerm);
-
- // query for the test root, expandQueries=0
- // the query should show up as a regular bookmark
- try {
- let options = PlacesUtils.history.getNewQueryOptions();
- options.expandQueries = 0;
- let query = PlacesUtils.history.getNewQuery();
- query.setFolders([testRoot], 1);
- let result = PlacesUtils.history.executeQuery(query, options);
- let rootNode = result.root;
- rootNode.containerOpen = true;
- let cc = rootNode.childCount;
- do_check_eq(cc, 1);
- for (let i = 0; i < cc; i++) {
- let node = rootNode.getChild(i);
- // test that queries have valid itemId
- do_check_true(node.itemId > 0);
- // test that the container is closed
- node.QueryInterface(Ci.nsINavHistoryContainerResultNode);
- do_check_eq(node.containerOpen, false);
- }
- rootNode.containerOpen = false;
- }
- catch (ex) {
- do_throw("expandQueries=0 query error: " + ex);
- }
-
- // bookmark saved search
- // query for the test root, expandQueries=1
- // the query should show up as a query container, with 1 child
- try {
- let options = PlacesUtils.history.getNewQueryOptions();
- options.expandQueries = 1;
- let query = PlacesUtils.history.getNewQuery();
- query.setFolders([testRoot], 1);
- let result = PlacesUtils.history.executeQuery(query, options);
- let rootNode = result.root;
- rootNode.containerOpen = true;
- let cc = rootNode.childCount;
- do_check_eq(cc, 1);
- for (let i = 0; i < cc; i++) {
- let node = rootNode.getChild(i);
- // test that query node type is container when expandQueries=1
- do_check_eq(node.type, node.RESULT_TYPE_QUERY);
- // test that queries (as containers) have valid itemId
- do_check_true(node.itemId > 0);
- node.QueryInterface(Ci.nsINavHistoryContainerResultNode);
- node.containerOpen = true;
-
- // test that queries have children when excludeItems=1
- // test that query nodes don't show containers (shouldn't have our folder that matches)
- // test that queries don't show themselves in query results (shouldn't have our saved search)
- do_check_eq(node.childCount, 1);
-
- // test that bookmark shows in query results
- var item = node.getChild(0);
- do_check_eq(item.itemId, bookmarkId);
-
- // XXX - FAILING - test live-update of query results - add a bookmark that matches the query
- // var tmpBmId = PlacesUtils.bookmarks.insertBookmark(
- // root, uri("http://" + searchTerm + ".com"),
- // PlacesUtils.bookmarks.DEFAULT_INDEX, searchTerm + "blah");
- // do_check_eq(query.childCount, 2);
-
- // XXX - test live-update of query results - delete a bookmark that matches the query
- // PlacesUtils.bookmarks.removeItem(tmpBMId);
- // do_check_eq(query.childCount, 1);
-
- // test live-update of query results - add a folder that matches the query
- PlacesUtils.bookmarks.createFolder(
- root, searchTerm + "zaa", PlacesUtils.bookmarks.DEFAULT_INDEX);
- do_check_eq(node.childCount, 1);
- // test live-update of query results - add a query that matches the query
- PlacesUtils.bookmarks.insertBookmark(
- root, uri("place:terms=foo&excludeQueries=1&expandQueries=1&queryType=1"),
- PlacesUtils.bookmarks.DEFAULT_INDEX, searchTerm + "blah");
- do_check_eq(node.childCount, 1);
- }
- rootNode.containerOpen = false;
- }
- catch (ex) {
- do_throw("expandQueries=1 bookmarks query: " + ex);
- }
-
- // delete the bookmark search
- PlacesUtils.bookmarks.removeItem(searchId);
-
- run_next_test();
-});
-
-add_task(function* test_savedsearches_history() {
- // add a visit that matches the search term
- var testURI = uri("http://" + searchTerm + ".com");
- yield PlacesTestUtils.addVisits({ uri: testURI, title: searchTerm });
-
- // create a saved-search that matches the visit we added
- var searchId = PlacesUtils.bookmarks.insertBookmark(testRoot,
- uri("place:terms=" + searchTerm + "&excludeQueries=1&expandQueries=1&queryType=0"),
- PlacesUtils.bookmarks.DEFAULT_INDEX, searchTerm);
-
- // query for the test root, expandQueries=1
- // the query should show up as a query container, with 1 child
- try {
- var options = PlacesUtils.history.getNewQueryOptions();
- options.expandQueries = 1;
- var query = PlacesUtils.history.getNewQuery();
- query.setFolders([testRoot], 1);
- var result = PlacesUtils.history.executeQuery(query, options);
- var rootNode = result.root;
- rootNode.containerOpen = true;
- var cc = rootNode.childCount;
- do_check_eq(cc, 1);
- for (var i = 0; i < cc; i++) {
- var node = rootNode.getChild(i);
- // test that query node type is container when expandQueries=1
- do_check_eq(node.type, node.RESULT_TYPE_QUERY);
- // test that queries (as containers) have valid itemId
- do_check_eq(node.itemId, searchId);
- node.QueryInterface(Ci.nsINavHistoryContainerResultNode);
- node.containerOpen = true;
-
- // test that queries have children when excludeItems=1
- // test that query nodes don't show containers (shouldn't have our folder that matches)
- // test that queries don't show themselves in query results (shouldn't have our saved search)
- do_check_eq(node.childCount, 1);
-
- // test that history visit shows in query results
- var item = node.getChild(0);
- do_check_eq(item.type, item.RESULT_TYPE_URI);
- do_check_eq(item.itemId, -1); // history visit
- do_check_eq(item.uri, testURI.spec); // history visit
-
- // test live-update of query results - add a history visit that matches the query
- yield PlacesTestUtils.addVisits({
- uri: uri("http://foo.com"),
- title: searchTerm + "blah"
- });
- do_check_eq(node.childCount, 2);
-
- // test live-update of query results - delete a history visit that matches the query
- PlacesUtils.history.removePage(uri("http://foo.com"));
- do_check_eq(node.childCount, 1);
- node.containerOpen = false;
- }
-
- // test live-update of moved queries
- var tmpFolderId = PlacesUtils.bookmarks.createFolder(
- testRoot, "foo", PlacesUtils.bookmarks.DEFAULT_INDEX);
- PlacesUtils.bookmarks.moveItem(
- searchId, tmpFolderId, PlacesUtils.bookmarks.DEFAULT_INDEX);
- var tmpFolderNode = rootNode.getChild(0);
- do_check_eq(tmpFolderNode.itemId, tmpFolderId);
- tmpFolderNode.QueryInterface(Ci.nsINavHistoryContainerResultNode);
- tmpFolderNode.containerOpen = true;
- do_check_eq(tmpFolderNode.childCount, 1);
-
- // test live-update of renamed queries
- PlacesUtils.bookmarks.setItemTitle(searchId, "foo");
- do_check_eq(tmpFolderNode.title, "foo");
-
- // test live-update of deleted queries
- PlacesUtils.bookmarks.removeItem(searchId);
- try {
- tmpFolderNode = root.getChild(1);
- do_throw("query was not removed");
- } catch (ex) {}
-
- tmpFolderNode.containerOpen = false;
- rootNode.containerOpen = false;
- }
- catch (ex) {
- do_throw("expandQueries=1 bookmarks query: " + ex);
- }
-});
diff --git a/toolkit/components/places/tests/bookmarks/xpcshell.ini b/toolkit/components/places/tests/bookmarks/xpcshell.ini
deleted file mode 100644
index c290fd6934..0000000000
--- a/toolkit/components/places/tests/bookmarks/xpcshell.ini
+++ /dev/null
@@ -1,50 +0,0 @@
-[DEFAULT]
-head = head_bookmarks.js
-tail =
-skip-if = toolkit == 'android'
-
-[test_1016953-renaming-uncompressed.js]
-[test_1017502-bookmarks_foreign_count.js]
-[test_384228.js]
-[test_385829.js]
-[test_388695.js]
-[test_393498.js]
-[test_395101.js]
-[test_395593.js]
-[test_405938_restore_queries.js]
-[test_417228-exclude-from-backup.js]
-[test_417228-other-roots.js]
-[test_424958-json-quoted-folders.js]
-[test_448584.js]
-[test_458683.js]
-[test_466303-json-remove-backups.js]
-[test_477583_json-backup-in-future.js]
-[test_675416.js]
-[test_711914.js]
-[test_818584-discard-duplicate-backups.js]
-[test_818587_compress-bookmarks-backups.js]
-[test_818593-store-backup-metadata.js]
-[test_992901-backup-unsorted-hierarchy.js]
-[test_997030-bookmarks-html-encode.js]
-[test_1129529.js]
-[test_async_observers.js]
-[test_bmindex.js]
-[test_bookmarkstree_cache.js]
-[test_bookmarks.js]
-[test_bookmarks_eraseEverything.js]
-[test_bookmarks_fetch.js]
-[test_bookmarks_getRecent.js]
-[test_bookmarks_insert.js]
-[test_bookmarks_notifications.js]
-[test_bookmarks_remove.js]
-[test_bookmarks_reorder.js]
-[test_bookmarks_search.js]
-[test_bookmarks_update.js]
-[test_changeBookmarkURI.js]
-[test_getBookmarkedURIFor.js]
-[test_keywords.js]
-[test_nsINavBookmarkObserver.js]
-[test_protectRoots.js]
-[test_removeFolderTransaction_reinsert.js]
-[test_removeItem.js]
-[test_savedsearches.js]
diff --git a/toolkit/components/places/tests/browser/.eslintrc.js b/toolkit/components/places/tests/browser/.eslintrc.js
deleted file mode 100644
index 7a41a9cde0..0000000000
--- a/toolkit/components/places/tests/browser/.eslintrc.js
+++ /dev/null
@@ -1,8 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/mochitest/browser.eslintrc.js",
- "../../../../../testing/mochitest/mochitest.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/places/tests/browser/399606-history.go-0.html b/toolkit/components/places/tests/browser/399606-history.go-0.html
deleted file mode 100644
index 039708ed71..0000000000
--- a/toolkit/components/places/tests/browser/399606-history.go-0.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html>
-<head>
-<title>history.go(0)</title>
-<script>
-setTimeout('history.go(0)', 1000);
-</script>
-</head>
-<body>
-Testing history.go(0)
-</body>
-</html>
diff --git a/toolkit/components/places/tests/browser/399606-httprefresh.html b/toolkit/components/places/tests/browser/399606-httprefresh.html
deleted file mode 100644
index e43455ee05..0000000000
--- a/toolkit/components/places/tests/browser/399606-httprefresh.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<html><head>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8">
-
-<meta http-equiv="refresh" content="1">
-<title>httprefresh</title>
-</head><body>
-Testing httprefresh
-</body></html>
diff --git a/toolkit/components/places/tests/browser/399606-location.reload.html b/toolkit/components/places/tests/browser/399606-location.reload.html
deleted file mode 100644
index 0f46538cdd..0000000000
--- a/toolkit/components/places/tests/browser/399606-location.reload.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html>
-<head>
-<title>location.reload()</title>
-<script>
-setTimeout('location.reload();', 100);
-</script>
-</head>
-<body>
-Testing location.reload();
-</body>
-</html>
diff --git a/toolkit/components/places/tests/browser/399606-location.replace.html b/toolkit/components/places/tests/browser/399606-location.replace.html
deleted file mode 100644
index 36705402cc..0000000000
--- a/toolkit/components/places/tests/browser/399606-location.replace.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html>
-<head>
-<title>location.replace</title>
-<script>
-setTimeout('location.replace(window.location.href)', 1000);
-</script>
-</head>
-<body>
-Testing location.replace
-</body>
-</html>
diff --git a/toolkit/components/places/tests/browser/399606-window.location.href.html b/toolkit/components/places/tests/browser/399606-window.location.href.html
deleted file mode 100644
index 61a2c8ba01..0000000000
--- a/toolkit/components/places/tests/browser/399606-window.location.href.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html>
-<head>
-<title>window.location.href</title>
-<script>
-setTimeout('window.location.href = window.location.href', 1000);
-</script>
-</head>
-<body>
-Testing window.location.href
-</body>
-</html>
diff --git a/toolkit/components/places/tests/browser/399606-window.location.html b/toolkit/components/places/tests/browser/399606-window.location.html
deleted file mode 100644
index e77f730716..0000000000
--- a/toolkit/components/places/tests/browser/399606-window.location.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<html>
-<head>
-<title>window.location</title>
-<script>
-setTimeout('window.location = window.location', 1000);
-</script>
-</head>
-<body>
-Testing window.location
-</body>
-</html>
diff --git a/toolkit/components/places/tests/browser/461710_iframe.html b/toolkit/components/places/tests/browser/461710_iframe.html
deleted file mode 100644
index 7480fe58f8..0000000000
--- a/toolkit/components/places/tests/browser/461710_iframe.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- </head>
- <body>
- <iframe id="iframe"></iframe>
- </body>
-</html>
diff --git a/toolkit/components/places/tests/browser/461710_link_page-2.html b/toolkit/components/places/tests/browser/461710_link_page-2.html
deleted file mode 100644
index 1fc3e0959d..0000000000
--- a/toolkit/components/places/tests/browser/461710_link_page-2.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>Link page 2</title>
- <style type="text/css">
- a:link { color: #0000ff; }
- a:visited { color: #ff0000; }
- </style>
- </head>
- <body>
- <p><a href="461710_visited_page.html" id="link">Link to the second visited page</a></p>
- </body>
-</html> \ No newline at end of file
diff --git a/toolkit/components/places/tests/browser/461710_link_page-3.html b/toolkit/components/places/tests/browser/461710_link_page-3.html
deleted file mode 100644
index 5966618032..0000000000
--- a/toolkit/components/places/tests/browser/461710_link_page-3.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>Link page 3</title>
- <style type="text/css">
- a:link { color: #0000ff; }
- a:visited { color: #ff0000; }
- </style>
- </head>
- <body>
- <p><a href="461710_visited_page.html" id="link">Link to the third visited page</a></p>
- </body>
-</html> \ No newline at end of file
diff --git a/toolkit/components/places/tests/browser/461710_link_page.html b/toolkit/components/places/tests/browser/461710_link_page.html
deleted file mode 100644
index 6bea506284..0000000000
--- a/toolkit/components/places/tests/browser/461710_link_page.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>Link page</title>
- <style type="text/css">
- a:link { color: #0000ff; }
- a:visited { color: #ff0000; }
- </style>
- </head>
- <body>
- <p><a href="461710_visited_page.html" id="link">Link to the visited page</a></p>
- </body>
-</html> \ No newline at end of file
diff --git a/toolkit/components/places/tests/browser/461710_visited_page.html b/toolkit/components/places/tests/browser/461710_visited_page.html
deleted file mode 100644
index 90e65116b6..0000000000
--- a/toolkit/components/places/tests/browser/461710_visited_page.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>Visited page</title>
- </head>
- <body>
- <p>This page is marked as visited</p>
- </body>
-</html> \ No newline at end of file
diff --git a/toolkit/components/places/tests/browser/begin.html b/toolkit/components/places/tests/browser/begin.html
deleted file mode 100644
index da4c16dd25..0000000000
--- a/toolkit/components/places/tests/browser/begin.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!--
- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
--->
-
-<html>
- <body>
- <a id="clickme" href="redirect_twice.sjs">Redirect twice</a>
- </body>
-</html>
diff --git a/toolkit/components/places/tests/browser/browser.ini b/toolkit/components/places/tests/browser/browser.ini
deleted file mode 100644
index e6abe987f8..0000000000
--- a/toolkit/components/places/tests/browser/browser.ini
+++ /dev/null
@@ -1,26 +0,0 @@
-[DEFAULT]
-support-files =
- colorAnalyzer/category-discover.png
- colorAnalyzer/dictionaryGeneric-16.png
- colorAnalyzer/extensionGeneric-16.png
- colorAnalyzer/localeGeneric.png
- head.js
-
-[browser_bug248970.js]
-[browser_bug399606.js]
-[browser_bug461710.js]
-[browser_bug646422.js]
-[browser_bug680727.js]
-[browser_colorAnalyzer.js]
-[browser_double_redirect.js]
-[browser_favicon_privatebrowsing_perwindowpb.js]
-[browser_favicon_setAndFetchFaviconForPage.js]
-[browser_favicon_setAndFetchFaviconForPage_failures.js]
-[browser_history_post.js]
-[browser_notfound.js]
-[browser_redirect.js]
-[browser_settitle.js]
-[browser_visited_notfound.js]
-[browser_visituri.js]
-[browser_visituri_nohistory.js]
-[browser_visituri_privatebrowsing_perwindowpb.js] \ No newline at end of file
diff --git a/toolkit/components/places/tests/browser/browser_bug248970.js b/toolkit/components/places/tests/browser/browser_bug248970.js
deleted file mode 100644
index 5850a30383..0000000000
--- a/toolkit/components/places/tests/browser/browser_bug248970.js
+++ /dev/null
@@ -1,152 +0,0 @@
-/* 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 test performs checks on the history testing area as outlined
-// https://wiki.mozilla.org/Firefox3.1/PrivateBrowsing/TestPlan#History
-// http://developer.mozilla.org/en/Using_the_Places_history_service
-
-var visitedURIs = [
- "http://www.test-link.com/",
- "http://www.test-typed.com/",
- "http://www.test-bookmark.com/",
- "http://www.test-redirect-permanent.com/",
- "http://www.test-redirect-temporary.com/",
- "http://www.test-embed.com/",
- "http://www.test-framed.com/",
- "http://www.test-download.com/"
-].map(NetUtil.newURI.bind(NetUtil));
-
-add_task(function* () {
- let windowsToClose = [];
- let placeItemsCount = 0;
-
- registerCleanupFunction(function() {
- windowsToClose.forEach(function(win) {
- win.close();
- });
- });
-
- yield PlacesTestUtils.clearHistory();
-
- // Ensure we wait for the default bookmarks import.
- yield new Promise(resolve => {
- waitForCondition(() => {
- placeItemsCount = getPlacesItemsCount();
- return placeItemsCount > 0
- }, resolve, "Should have default bookmarks")
- });
-
- // Create a handful of history items with various visit types
- yield PlacesTestUtils.addVisits([
- { uri: visitedURIs[0], transition: TRANSITION_LINK },
- { uri: visitedURIs[1], transition: TRANSITION_TYPED },
- { uri: visitedURIs[2], transition: TRANSITION_BOOKMARK },
- { uri: visitedURIs[3], transition: TRANSITION_REDIRECT_PERMANENT },
- { uri: visitedURIs[4], transition: TRANSITION_REDIRECT_TEMPORARY },
- { uri: visitedURIs[5], transition: TRANSITION_EMBED },
- { uri: visitedURIs[6], transition: TRANSITION_FRAMED_LINK },
- { uri: visitedURIs[7], transition: TRANSITION_DOWNLOAD }
- ]);
-
- placeItemsCount += 7;
- // We added 7 new items to history.
- is(getPlacesItemsCount(), placeItemsCount,
- "Check the total items count");
-
- function* testOnWindow(aIsPrivate, aCount) {
- let win = yield new Promise(resolve => {
- whenNewWindowLoaded({ private: aIsPrivate }, resolve);
- });
- windowsToClose.push(win);
-
- // History items should be retrievable by query
- yield checkHistoryItems();
-
- // Updates the place items count
- let count = getPlacesItemsCount();
-
- // Create Bookmark
- let title = "title " + windowsToClose.length;
- let keyword = "keyword " + windowsToClose.length;
- let url = "http://test-a-" + windowsToClose.length + ".com/";
-
- yield PlacesUtils.bookmarks.insert({ url, title,
- parentGuid: PlacesUtils.bookmarks.menuGuid });
- yield PlacesUtils.keywords.insert({ url, keyword });
- count++;
-
- ok((yield PlacesUtils.bookmarks.fetch({ url })),
- "Bookmark should be bookmarked, data should be retrievable");
- is(getPlacesItemsCount(), count,
- "Check the new bookmark items count");
- is(isBookmarkAltered(), false, "Check if bookmark has been visited");
- }
-
- // Test on windows.
- yield testOnWindow(false);
- yield testOnWindow(true);
- yield testOnWindow(false);
-});
-
-/**
- * Function performs a really simple query on our places entries,
- * and makes sure that the number of entries equal num_places_entries.
- */
-function getPlacesItemsCount() {
- // Get bookmarks count
- let options = PlacesUtils.history.getNewQueryOptions();
- options.includeHidden = true;
- options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS;
- let root = PlacesUtils.history.executeQuery(
- PlacesUtils.history.getNewQuery(), options).root;
- root.containerOpen = true;
- let cc = root.childCount;
- root.containerOpen = false;
-
- // Get history item count
- options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_HISTORY;
- root = PlacesUtils.history.executeQuery(
- PlacesUtils.history.getNewQuery(), options).root;
- root.containerOpen = true;
- cc += root.childCount;
- root.containerOpen = false;
-
- return cc;
-}
-
-function* checkHistoryItems() {
- for (let i = 0; i < visitedURIs.length; i++) {
- let visitedUri = visitedURIs[i];
- ok((yield promiseIsURIVisited(visitedUri)), "");
- if (/embed/.test(visitedUri.spec)) {
- is((yield PlacesTestUtils.isPageInDB(visitedUri)), false, "Check if URI is in database");
- } else {
- ok((yield PlacesTestUtils.isPageInDB(visitedUri)), "Check if URI is in database");
- }
- }
-}
-
-/**
- * Function attempts to check if Bookmark-A has been visited
- * during private browsing mode, function should return false
- *
- * @returns false if the accessCount has not changed
- * true if the accessCount has changed
- */
-function isBookmarkAltered() {
- let options = PlacesUtils.history.getNewQueryOptions();
- options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS;
- options.maxResults = 1; // should only expect a new bookmark
-
- let query = PlacesUtils.history.getNewQuery();
- query.setFolders([PlacesUtils.bookmarks.bookmarksMenuFolder], 1);
-
- let root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
- is(root.childCount, options.maxResults, "Check new bookmarks results");
- let node = root.getChild(0);
- root.containerOpen = false;
-
- return (node.accessCount != 0);
-}
diff --git a/toolkit/components/places/tests/browser/browser_bug399606.js b/toolkit/components/places/tests/browser/browser_bug399606.js
deleted file mode 100644
index b5eee0f92b..0000000000
--- a/toolkit/components/places/tests/browser/browser_bug399606.js
+++ /dev/null
@@ -1,77 +0,0 @@
-/* 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/. */
-
-gBrowser.selectedTab = gBrowser.addTab();
-
-function test() {
- waitForExplicitFinish();
-
- var URIs = [
- "http://example.com/tests/toolkit/components/places/tests/browser/399606-window.location.href.html",
- "http://example.com/tests/toolkit/components/places/tests/browser/399606-history.go-0.html",
- "http://example.com/tests/toolkit/components/places/tests/browser/399606-location.replace.html",
- "http://example.com/tests/toolkit/components/places/tests/browser/399606-location.reload.html",
- "http://example.com/tests/toolkit/components/places/tests/browser/399606-httprefresh.html",
- "http://example.com/tests/toolkit/components/places/tests/browser/399606-window.location.html",
- ];
- var hs = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
-
- // Create and add history observer.
- var historyObserver = {
- visitCount: Array(),
- onBeginUpdateBatch: function () {},
- onEndUpdateBatch: function () {},
- onVisit: function (aURI, aVisitID, aTime, aSessionID, aReferringID,
- aTransitionType) {
- info("Received onVisit: " + aURI.spec);
- if (aURI.spec in this.visitCount)
- this.visitCount[aURI.spec]++;
- else
- this.visitCount[aURI.spec] = 1;
- },
- onTitleChanged: function () {},
- onDeleteURI: function () {},
- onClearHistory: function () {},
- onPageChanged: function () {},
- onDeleteVisits: function () {},
- QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryObserver])
- };
- hs.addObserver(historyObserver, false);
-
- function confirm_results() {
- gBrowser.removeCurrentTab();
- hs.removeObserver(historyObserver, false);
- for (let aURI in historyObserver.visitCount) {
- is(historyObserver.visitCount[aURI], 1,
- "onVisit has been received right number of times for " + aURI);
- }
- PlacesTestUtils.clearHistory().then(finish);
- }
-
- var loadCount = 0;
- function handleLoad(aEvent) {
- loadCount++;
- info("new load count is " + loadCount);
-
- if (loadCount == 3) {
- gBrowser.removeEventListener("DOMContentLoaded", handleLoad, true);
- gBrowser.loadURI("about:blank");
- executeSoon(check_next_uri);
- }
- }
-
- function check_next_uri() {
- if (URIs.length) {
- let uri = URIs.shift();
- loadCount = 0;
- gBrowser.addEventListener("DOMContentLoaded", handleLoad, true);
- gBrowser.loadURI(uri);
- }
- else {
- confirm_results();
- }
- }
- executeSoon(check_next_uri);
-}
diff --git a/toolkit/components/places/tests/browser/browser_bug461710.js b/toolkit/components/places/tests/browser/browser_bug461710.js
deleted file mode 100644
index 12af87a064..0000000000
--- a/toolkit/components/places/tests/browser/browser_bug461710.js
+++ /dev/null
@@ -1,82 +0,0 @@
-const kRed = "rgb(255, 0, 0)";
-const kBlue = "rgb(0, 0, 255)";
-
-const prefix = "http://example.com/tests/toolkit/components/places/tests/browser/461710_";
-
-add_task(function* () {
- let contentPage = prefix + "iframe.html";
- let normalWindow = yield BrowserTestUtils.openNewBrowserWindow();
-
- let browser = normalWindow.gBrowser.selectedBrowser;
- BrowserTestUtils.loadURI(browser, contentPage);
- yield BrowserTestUtils.browserLoaded(browser, contentPage);
-
- let privateWindow = yield BrowserTestUtils.openNewBrowserWindow({private: true});
-
- browser = privateWindow.gBrowser.selectedBrowser;
- BrowserTestUtils.loadURI(browser, contentPage);
- yield BrowserTestUtils.browserLoaded(browser, contentPage);
-
- let tests = [{
- win: normalWindow,
- topic: "uri-visit-saved",
- subtest: "visited_page.html"
- }, {
- win: normalWindow,
- topic: "visited-status-resolution",
- subtest: "link_page.html",
- color: kRed,
- message: "Visited link coloring should work outside of private mode"
- }, {
- win: privateWindow,
- topic: "visited-status-resolution",
- subtest: "link_page-2.html",
- color: kBlue,
- message: "Visited link coloring should not work inside of private mode"
- }, {
- win: normalWindow,
- topic: "visited-status-resolution",
- subtest: "link_page-3.html",
- color: kRed,
- message: "Visited link coloring should work outside of private mode"
- }];
-
- let visited_page_url = prefix + tests[0].subtest;
- for (let test of tests) {
- let promise = new Promise(resolve => {
- let uri = NetUtil.newURI(visited_page_url);
- Services.obs.addObserver(function observe(aSubject) {
- if (uri.equals(aSubject.QueryInterface(Ci.nsIURI))) {
- Services.obs.removeObserver(observe, test.topic);
- resolve();
- }
- }, test.topic, false);
- });
- ContentTask.spawn(test.win.gBrowser.selectedBrowser, prefix + test.subtest, function* (aSrc) {
- content.document.getElementById("iframe").src = aSrc;
- });
- yield promise;
-
- if (test.color) {
- // In e10s waiting for visited-status-resolution is not enough to ensure links
- // have been updated, because it only tells us that messages to update links
- // have been dispatched. We must still wait for the actual links to update.
- yield BrowserTestUtils.waitForCondition(function* () {
- let color = yield ContentTask.spawn(test.win.gBrowser.selectedBrowser, null, function* () {
- let iframe = content.document.getElementById("iframe");
- let elem = iframe.contentDocument.getElementById("link");
- return content.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindowUtils)
- .getVisitedDependentComputedStyle(elem, "", "color");
- });
- return (color == test.color);
- }, test.message);
- // The harness will consider the test as failed overall if there were no
- // passes or failures, so record it as a pass.
- ok(true, test.message);
- }
- }
-
- yield BrowserTestUtils.closeWindow(normalWindow);
- yield BrowserTestUtils.closeWindow(privateWindow);
-});
diff --git a/toolkit/components/places/tests/browser/browser_bug646422.js b/toolkit/components/places/tests/browser/browser_bug646422.js
deleted file mode 100644
index 1a81de4e15..0000000000
--- a/toolkit/components/places/tests/browser/browser_bug646422.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/* 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/. */
-
-/**
- * Test for Bug 646224. Make sure that after changing the URI via
- * history.pushState, the history service has a title stored for the new URI.
- **/
-
-add_task(function* () {
- let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, 'http://example.com');
-
- let newTitlePromise = new Promise(resolve => {
- let observer = {
- onTitleChanged: function(uri, title) {
- // If the uri of the page whose title is changing ends with 'new_page',
- // then it's the result of our pushState.
- if (/new_page$/.test(uri.spec)) {
- resolve(title);
- PlacesUtils.history.removeObserver(observer);
- }
- },
-
- onBeginUpdateBatch: function() { },
- onEndUpdateBatch: function() { },
- onVisit: function() { },
- onDeleteURI: function() { },
- onClearHistory: function() { },
- onPageChanged: function() { },
- onDeleteVisits: function() { },
- QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryObserver])
- };
-
- PlacesUtils.history.addObserver(observer, false);
- });
-
- yield ContentTask.spawn(tab.linkedBrowser, null, function* () {
- let title = content.document.title;
- content.history.pushState('', '', 'new_page');
- Assert.ok(title, "Content window should initially have a title.");
- });
-
- let newtitle = yield newTitlePromise;
-
- yield ContentTask.spawn(tab.linkedBrowser, { newtitle }, function* (args) {
- Assert.equal(args.newtitle, content.document.title, "Title after pushstate.");
- });
-
- yield PlacesTestUtils.clearHistory();
- gBrowser.removeTab(tab);
-});
diff --git a/toolkit/components/places/tests/browser/browser_bug680727.js b/toolkit/components/places/tests/browser/browser_bug680727.js
deleted file mode 100644
index 560cbfe6cc..0000000000
--- a/toolkit/components/places/tests/browser/browser_bug680727.js
+++ /dev/null
@@ -1,109 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/* Ensure that clicking the button in the Offline mode neterror page updates
- global history. See bug 680727. */
-/* TEST_PATH=toolkit/components/places/tests/browser/browser_bug680727.js make -C $(OBJDIR) mochitest-browser-chrome */
-
-
-const kUniqueURI = Services.io.newURI("http://mochi.test:8888/#bug_680727",
- null, null);
-var gAsyncHistory =
- Cc["@mozilla.org/browser/history;1"].getService(Ci.mozIAsyncHistory);
-
-var proxyPrefValue;
-var ourTab;
-
-function test() {
- waitForExplicitFinish();
-
- // Tests always connect to localhost, and per bug 87717, localhost is now
- // reachable in offline mode. To avoid this, disable any proxy.
- proxyPrefValue = Services.prefs.getIntPref("network.proxy.type");
- Services.prefs.setIntPref("network.proxy.type", 0);
-
- // Clear network cache.
- Components.classes["@mozilla.org/netwerk/cache-storage-service;1"]
- .getService(Components.interfaces.nsICacheStorageService)
- .clear();
-
- // Go offline, expecting the error page.
- Services.io.offline = true;
-
- BrowserTestUtils.openNewForegroundTab(gBrowser).then(tab => {
- ourTab = tab;
- BrowserTestUtils.waitForContentEvent(ourTab.linkedBrowser, "DOMContentLoaded")
- .then(errorListener);
- BrowserTestUtils.loadURI(ourTab.linkedBrowser, kUniqueURI.spec);
- });
-}
-
-// ------------------------------------------------------------------------------
-// listen to loading the neterror page. (offline mode)
-function errorListener() {
- ok(Services.io.offline, "Services.io.offline is true.");
-
- // This is an error page.
- ContentTask.spawn(ourTab.linkedBrowser, kUniqueURI.spec, function(uri) {
- Assert.equal(content.document.documentURI.substring(0, 27),
- "about:neterror?e=netOffline", "Document URI is the error page.");
-
- // But location bar should show the original request.
- Assert.equal(content.location.href, uri, "Docshell URI is the original URI.");
- }).then(() => {
- // Global history does not record URI of a failed request.
- return PlacesTestUtils.promiseAsyncUpdates().then(() => {
- gAsyncHistory.isURIVisited(kUniqueURI, errorAsyncListener);
- });
- });
-}
-
-function errorAsyncListener(aURI, aIsVisited) {
- ok(kUniqueURI.equals(aURI) && !aIsVisited,
- "The neterror page is not listed in global history.");
-
- Services.prefs.setIntPref("network.proxy.type", proxyPrefValue);
-
- // Now press the "Try Again" button, with offline mode off.
- Services.io.offline = false;
-
- BrowserTestUtils.waitForContentEvent(ourTab.linkedBrowser, "DOMContentLoaded")
- .then(reloadListener);
-
- ContentTask.spawn(ourTab.linkedBrowser, null, function() {
- Assert.ok(content.document.getElementById("errorTryAgain"),
- "The error page has got a #errorTryAgain element");
- content.document.getElementById("errorTryAgain").click();
- });
-}
-
-// ------------------------------------------------------------------------------
-// listen to reload of neterror.
-function reloadListener() {
- // This listener catches "DOMContentLoaded" on being called
- // nsIWPL::onLocationChange(...). That is right *AFTER*
- // IHistory::VisitURI(...) is called.
- ok(!Services.io.offline, "Services.io.offline is false.");
-
- ContentTask.spawn(ourTab.linkedBrowser, kUniqueURI.spec, function(uri) {
- // This is not an error page.
- Assert.equal(content.document.documentURI, uri,
- "Document URI is not the offline-error page, but the original URI.");
- }).then(() => {
- // Check if global history remembers the successfully-requested URI.
- PlacesTestUtils.promiseAsyncUpdates().then(() => {
- gAsyncHistory.isURIVisited(kUniqueURI, reloadAsyncListener);
- });
- });
-}
-
-function reloadAsyncListener(aURI, aIsVisited) {
- ok(kUniqueURI.equals(aURI) && aIsVisited, "We have visited the URI.");
- PlacesTestUtils.clearHistory().then(finish);
-}
-
-registerCleanupFunction(function* () {
- Services.prefs.setIntPref("network.proxy.type", proxyPrefValue);
- Services.io.offline = false;
- yield BrowserTestUtils.removeTab(ourTab);
-});
diff --git a/toolkit/components/places/tests/browser/browser_colorAnalyzer.js b/toolkit/components/places/tests/browser/browser_colorAnalyzer.js
deleted file mode 100644
index 7b7fe6ec54..0000000000
--- a/toolkit/components/places/tests/browser/browser_colorAnalyzer.js
+++ /dev/null
@@ -1,259 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-Cu.import("resource://gre/modules/Services.jsm");
-
-const CA = Cc["@mozilla.org/places/colorAnalyzer;1"].
- getService(Ci.mozIColorAnalyzer);
-
-const hiddenWindowDoc = Cc["@mozilla.org/appshell/appShellService;1"].
- getService(Ci.nsIAppShellService).
- hiddenDOMWindow.document;
-
-const XHTML_NS = "http://www.w3.org/1999/xhtml";
-
-/**
- * Passes the given uri to findRepresentativeColor.
- * If expected is null, you expect it to fail.
- * If expected is a function, it will call that function.
- * If expected is a color, you expect that color to be returned.
- * Message is used in the calls to is().
- */
-function frcTest(uri, expected, message) {
- return new Promise(resolve => {
- CA.findRepresentativeColor(Services.io.newURI(uri, "", null),
- function(success, color) {
- if (expected == null) {
- ok(!success, message);
- } else if (typeof expected == "function") {
- expected(color, message);
- } else {
- ok(success, "success: " + message);
- is(color, expected, message);
- }
- resolve();
- });
- });
-}
-
-/**
- * Handy function for getting an image into findRepresentativeColor and testing it.
- * Makes a canvas with the given dimensions, calls paintCanvasFunc with the 2d
- * context of the canvas, sticks the generated canvas into findRepresentativeColor.
- * See frcTest.
- */
-function canvasTest(width, height, paintCanvasFunc, expected, message) {
- let canvas = hiddenWindowDoc.createElementNS(XHTML_NS, "canvas");
- canvas.width = width;
- canvas.height = height;
- paintCanvasFunc(canvas.getContext("2d"));
- let uri = canvas.toDataURL();
- return frcTest(uri, expected, message);
-}
-
-// simple test - draw a red box in the center, make sure we get red back
-add_task(function* test_redSquare() {
- yield canvasTest(16, 16, function(ctx) {
- ctx.fillStyle = "red";
- ctx.fillRect(2, 2, 12, 12);
- }, 0xFF0000, "redSquare analysis returns red");
-});
-
-
-// draw a blue square in one corner, red in the other, such that blue overlaps
-// red by one pixel, making it the dominant color
-add_task(function* test_blueOverlappingRed() {
- yield canvasTest(16, 16, function(ctx) {
- ctx.fillStyle = "red";
- ctx.fillRect(0, 0, 8, 8);
- ctx.fillStyle = "blue";
- ctx.fillRect(7, 7, 8, 8);
- }, 0x0000FF, "blueOverlappingRed analysis returns blue");
-});
-
-// draw a red gradient next to a solid blue rectangle to ensure that a large
-// block of similar colors beats out a smaller block of one color
-add_task(function* test_redGradientBlueSolid() {
- yield canvasTest(16, 16, function(ctx) {
- let gradient = ctx.createLinearGradient(0, 0, 1, 15);
- gradient.addColorStop(0, "#FF0000");
- gradient.addColorStop(1, "#FF0808");
-
- ctx.fillStyle = gradient;
- ctx.fillRect(0, 0, 16, 16);
- ctx.fillStyle = "blue";
- ctx.fillRect(9, 0, 7, 16);
- }, function(actual, message) {
- ok(actual >= 0xFF0000 && actual <= 0xFF0808, message);
- }, "redGradientBlueSolid analysis returns redish");
-});
-
-// try a transparent image, should fail
-add_task(function* test_transparent() {
- yield canvasTest(16, 16, function(ctx) {
- // do nothing!
- }, null, "transparent analysis fails");
-});
-
-add_task(function* test_invalidURI() {
- yield frcTest("data:blah,Imnotavaliddatauri", null, "invalid URI analysis fails");
-});
-
-add_task(function* test_malformedPNGURI() {
- yield frcTest("data:image/png;base64,iVBORblahblahblah", null,
- "malformed PNG URI analysis fails");
-});
-
-add_task(function* test_unresolvableURI() {
- yield frcTest("http://www.example.com/blah/idontexist.png", null,
- "unresolvable URI analysis fails");
-});
-
-// draw a small blue box on a red background to make sure the algorithm avoids
-// using the background color
-add_task(function* test_blueOnRedBackground() {
- yield canvasTest(16, 16, function(ctx) {
- ctx.fillStyle = "red";
- ctx.fillRect(0, 0, 16, 16);
- ctx.fillStyle = "blue";
- ctx.fillRect(4, 4, 8, 8);
- }, 0x0000FF, "blueOnRedBackground analysis returns blue");
-});
-
-// draw a slightly different color in the corners to make sure the corner colors
-// don't have to be exactly equal to be considered the background color
-add_task(function* test_variableBackground() {
- yield canvasTest(16, 16, function(ctx) {
- ctx.fillStyle = "white";
- ctx.fillRect(0, 0, 16, 16);
- ctx.fillStyle = "#FEFEFE";
- ctx.fillRect(15, 0, 1, 1);
- ctx.fillStyle = "#FDFDFD";
- ctx.fillRect(15, 15, 1, 1);
- ctx.fillStyle = "#FCFCFC";
- ctx.fillRect(0, 15, 1, 1);
- ctx.fillStyle = "black";
- ctx.fillRect(4, 4, 8, 8);
- }, 0x000000, "variableBackground analysis returns black");
-});
-
-// like the above test, but make the colors different enough that they aren't
-// considered the background color
-add_task(function* test_tooVariableBackground() {
- yield canvasTest(16, 16, function(ctx) {
- ctx.fillStyle = "white";
- ctx.fillRect(0, 0, 16, 16);
- ctx.fillStyle = "#EEDDCC";
- ctx.fillRect(15, 0, 1, 1);
- ctx.fillStyle = "#DDDDDD";
- ctx.fillRect(15, 15, 1, 1);
- ctx.fillStyle = "#CCCCCC";
- ctx.fillRect(0, 15, 1, 1);
- ctx.fillStyle = "black";
- ctx.fillRect(4, 4, 8, 8);
- }, function(actual, message) {
- isnot(actual, 0x000000, message);
- }, "tooVariableBackground analysis doesn't return black");
-});
-
-// draw a small black/white box over transparent background to make sure the
-// algorithm doesn't think rgb(0,0,0) == rgba(0,0,0,0)
-add_task(function* test_transparentBackgroundConflation() {
- yield canvasTest(16, 16, function(ctx) {
- ctx.fillStyle = "black";
- ctx.fillRect(2, 2, 12, 12);
- ctx.fillStyle = "white";
- ctx.fillRect(5, 5, 6, 6);
- }, 0x000000, "transparentBackgroundConflation analysis returns black");
-});
-
-
-// make sure we fall back to the background color if we have no other choice
-// (instead of failing as if there were no colors)
-add_task(function* test_backgroundFallback() {
- yield canvasTest(16, 16, function(ctx) {
- ctx.fillStyle = "black";
- ctx.fillRect(0, 0, 16, 16);
- }, 0x000000, "backgroundFallback analysis returns black");
-});
-
-// draw red rectangle next to a pink one to make sure the algorithm picks the
-// more interesting color
-add_task(function* test_interestingColorPreference() {
- yield canvasTest(16, 16, function(ctx) {
- ctx.fillStyle = "#FFDDDD";
- ctx.fillRect(0, 0, 16, 16);
- ctx.fillStyle = "red";
- ctx.fillRect(0, 0, 3, 16);
- }, 0xFF0000, "interestingColorPreference analysis returns red");
-});
-
-// draw high saturation but dark red next to slightly less saturated color but
-// much lighter, to make sure the algorithm doesn't pick colors that are
-// nearly black just because of high saturation (in HSL terms)
-add_task(function* test_saturationDependence() {
- yield canvasTest(16, 16, function(ctx) {
- ctx.fillStyle = "hsl(0, 100%, 5%)";
- ctx.fillRect(0, 0, 16, 16);
- ctx.fillStyle = "hsl(0, 90%, 35%)";
- ctx.fillRect(0, 0, 8, 16);
- }, 0xA90808, "saturationDependence analysis returns lighter red");
-});
-
-// make sure the preference for interesting colors won't stupidly pick 1 pixel
-// of red over 169 black pixels
-add_task(function* test_interestingColorPreferenceLenient() {
- yield canvasTest(16, 16, function(ctx) {
- ctx.fillStyle = "black";
- ctx.fillRect(1, 1, 13, 13);
- ctx.fillStyle = "red";
- ctx.fillRect(3, 3, 1, 1);
- }, 0x000000, "interestingColorPreferenceLenient analysis returns black");
-});
-
-// ...but 6 pixels of red is more reasonable
-add_task(function* test_interestingColorPreferenceNotTooLenient() {
- yield canvasTest(16, 16, function(ctx) {
- ctx.fillStyle = "black";
- ctx.fillRect(1, 1, 13, 13);
- ctx.fillStyle = "red";
- ctx.fillRect(3, 3, 3, 2);
- }, 0xFF0000, "interestingColorPreferenceNotTooLenient analysis returns red");
-});
-
-var maxPixels = 144; // see ColorAnalyzer MAXIMUM_PIXELS const
-
-// make sure that images larger than maxPixels*maxPixels fail
-add_task(function* test_imageTooLarge() {
- yield canvasTest(1+maxPixels, 1+maxPixels, function(ctx) {
- ctx.fillStyle = "red";
- ctx.fillRect(0, 0, 1+maxPixels, 1+maxPixels);
- }, null, "imageTooLarge analysis fails");
-});
-
-// the rest of the tests are for coverage of "real" favicons
-// exact color isn't terribly important, just make sure it's reasonable
-const filePrefix = getRootDirectory(gTestPath) + "colorAnalyzer/";
-
-add_task(function* test_categoryDiscover() {
- yield frcTest(filePrefix + "category-discover.png", 0xB28D3A,
- "category-discover analysis returns red");
-});
-
-add_task(function* test_localeGeneric() {
- yield frcTest(filePrefix + "localeGeneric.png", 0x3EC23E,
- "localeGeneric analysis returns green");
-});
-
-add_task(function* test_dictionaryGeneric() {
- yield frcTest(filePrefix + "dictionaryGeneric-16.png", 0x854C30,
- "dictionaryGeneric-16 analysis returns brown");
-});
-
-add_task(function* test_extensionGeneric() {
- yield frcTest(filePrefix + "extensionGeneric-16.png", 0x53BA3F,
- "extensionGeneric-16 analysis returns green");
-});
diff --git a/toolkit/components/places/tests/browser/browser_double_redirect.js b/toolkit/components/places/tests/browser/browser_double_redirect.js
deleted file mode 100644
index 1e5dc9c166..0000000000
--- a/toolkit/components/places/tests/browser/browser_double_redirect.js
+++ /dev/null
@@ -1,63 +0,0 @@
-// Test for bug 411966.
-// When a page redirects multiple times, from_visit should point to the
-// previous visit in the chain, not to the first visit in the chain.
-
-add_task(function* () {
- yield PlacesTestUtils.clearHistory();
-
- const BASE_URL = "http://example.com/tests/toolkit/components/places/tests/browser/";
- const TEST_URI = NetUtil.newURI(BASE_URL + "begin.html");
- const FIRST_REDIRECTING_URI = NetUtil.newURI(BASE_URL + "redirect_twice.sjs");
- const FINAL_URI = NetUtil.newURI(BASE_URL + "final.html");
-
- let promiseVisits = new Promise(resolve => {
- PlacesUtils.history.addObserver({
- __proto__: NavHistoryObserver.prototype,
- _notified: [],
- onVisit: function (uri, id, time, sessionId, referrerId, transition) {
- info("Received onVisit: " + uri.spec);
- this._notified.push(uri);
-
- if (!uri.equals(FINAL_URI)) {
- return;
- }
-
- is(this._notified.length, 4);
- PlacesUtils.history.removeObserver(this);
-
- Task.spawn(function* () {
- // Get all pages visited from the original typed one
- let db = yield PlacesUtils.promiseDBConnection();
- let rows = yield db.execute(
- `SELECT url FROM moz_historyvisits
- JOIN moz_places h ON h.id = place_id
- WHERE from_visit IN
- (SELECT v.id FROM moz_historyvisits v
- JOIN moz_places p ON p.id = v.place_id
- WHERE p.url_hash = hash(:url) AND p.url = :url)
- `, { url: TEST_URI.spec });
-
- is(rows.length, 1, "Found right number of visits");
- let visitedUrl = rows[0].getResultByName("url");
- // Check that redirect from_visit is not from the original typed one
- is(visitedUrl, FIRST_REDIRECTING_URI.spec, "Check referrer for " + visitedUrl);
-
- resolve();
- });
- }
- }, false);
- });
-
- PlacesUtils.history.markPageAsTyped(TEST_URI);
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: TEST_URI.spec,
- }, function* (browser) {
- // Load begin page, click link on page to record visits.
- yield BrowserTestUtils.synthesizeMouseAtCenter("#clickme", {}, browser);
-
- yield promiseVisits;
- });
-
- yield PlacesTestUtils.clearHistory();
-});
diff --git a/toolkit/components/places/tests/browser/browser_favicon_privatebrowsing_perwindowpb.js b/toolkit/components/places/tests/browser/browser_favicon_privatebrowsing_perwindowpb.js
deleted file mode 100644
index 51d82adc68..0000000000
--- a/toolkit/components/places/tests/browser/browser_favicon_privatebrowsing_perwindowpb.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function test() {
- waitForExplicitFinish();
-
- const pageURI =
- "http://example.org/tests/toolkit/components/places/tests/browser/favicon.html";
- let windowsToClose = [];
-
- registerCleanupFunction(function() {
- windowsToClose.forEach(function(aWin) {
- aWin.close();
- });
- });
-
- function testOnWindow(aIsPrivate, aCallback) {
- whenNewWindowLoaded({private: aIsPrivate}, function(aWin) {
- windowsToClose.push(aWin);
- executeSoon(() => aCallback(aWin));
- });
- }
-
- function waitForTabLoad(aWin, aCallback) {
- aWin.gBrowser.selectedBrowser.addEventListener("load", function onLoad() {
- aWin.gBrowser.selectedBrowser.removeEventListener("load", onLoad, true);
- aCallback();
- }, true);
- aWin.gBrowser.selectedBrowser.loadURI(pageURI);
- }
-
- testOnWindow(true, function(win) {
- waitForTabLoad(win, function() {
- PlacesUtils.favicons.getFaviconURLForPage(NetUtil.newURI(pageURI),
- function(uri, dataLen, data, mimeType) {
- is(uri, null, "No result should be found");
- finish();
- }
- );
- });
- });
-}
diff --git a/toolkit/components/places/tests/browser/browser_favicon_setAndFetchFaviconForPage.js b/toolkit/components/places/tests/browser/browser_favicon_setAndFetchFaviconForPage.js
deleted file mode 100644
index 60df8ebd7c..0000000000
--- a/toolkit/components/places/tests/browser/browser_favicon_setAndFetchFaviconForPage.js
+++ /dev/null
@@ -1,152 +0,0 @@
-/* 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 file tests the normal operation of setAndFetchFaviconForPage.
-function test() {
- // Initialization
- waitForExplicitFinish();
- let windowsToClose = [];
- let favIconLocation =
- "http://example.org/tests/toolkit/components/places/tests/browser/favicon-normal32.png";
- let favIconURI = NetUtil.newURI(favIconLocation);
- let favIconMimeType= "image/png";
- let pageURI;
- let favIconData;
-
- function testOnWindow(aOptions, aCallback) {
- whenNewWindowLoaded(aOptions, function(aWin) {
- windowsToClose.push(aWin);
- executeSoon(() => aCallback(aWin));
- });
- }
-
- // This function is called after calling finish() on the test.
- registerCleanupFunction(function() {
- windowsToClose.forEach(function(aWin) {
- aWin.close();
- });
- });
-
- function getIconFile(aCallback) {
- NetUtil.asyncFetch({
- uri: favIconLocation,
- loadUsingSystemPrincipal: true,
- contentPolicyType: Ci.nsIContentPolicy.TYPE_INTERNAL_IMAGE_FAVICON
- }, function(inputStream, status) {
- if (!Components.isSuccessCode(status)) {
- ok(false, "Could not get the icon file");
- // Handle error.
- return;
- }
-
- // Check the returned size versus the expected size.
- let size = inputStream.available();
- favIconData = NetUtil.readInputStreamToString(inputStream, size);
- is(size, favIconData.length, "Check correct icon size");
- // Check that the favicon loaded correctly before starting the actual tests.
- is(favIconData.length, 344, "Check correct icon length (344)");
-
- if (aCallback) {
- aCallback();
- } else {
- finish();
- }
- });
- }
-
- function testNormal(aWindow, aCallback) {
- pageURI = NetUtil.newURI("http://example.com/normal");
- waitForFaviconChanged(pageURI, favIconURI, aWindow,
- function testNormalCallback() {
- checkFaviconDataForPage(pageURI, favIconMimeType, favIconData, aWindow,
- aCallback);
- }
- );
-
- addVisits({uri: pageURI, transition: TRANSITION_TYPED}, aWindow,
- function () {
- aWindow.PlacesUtils.favicons.setAndFetchFaviconForPage(pageURI, favIconURI,
- true, aWindow.PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE, null,
- Services.scriptSecurityManager.getSystemPrincipal());
- }
- );
- }
-
- function testAboutURIBookmarked(aWindow, aCallback) {
- pageURI = NetUtil.newURI("about:testAboutURI_bookmarked");
- waitForFaviconChanged(pageURI, favIconURI, aWindow,
- function testAboutURIBookmarkedCallback() {
- checkFaviconDataForPage(pageURI, favIconMimeType, favIconData, aWindow,
- aCallback);
- }
- );
-
- aWindow.PlacesUtils.bookmarks.insertBookmark(
- aWindow.PlacesUtils.unfiledBookmarksFolderId, pageURI,
- aWindow.PlacesUtils.bookmarks.DEFAULT_INDEX, pageURI.spec);
- aWindow.PlacesUtils.favicons.setAndFetchFaviconForPage(pageURI, favIconURI,
- true, aWindow.PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE, null,
- Services.scriptSecurityManager.getSystemPrincipal());
- }
-
- function testPrivateBrowsingBookmarked(aWindow, aCallback) {
- pageURI = NetUtil.newURI("http://example.com/privateBrowsing_bookmarked");
- waitForFaviconChanged(pageURI, favIconURI, aWindow,
- function testPrivateBrowsingBookmarkedCallback() {
- checkFaviconDataForPage(pageURI, favIconMimeType, favIconData, aWindow,
- aCallback);
- }
- );
-
- aWindow.PlacesUtils.bookmarks.insertBookmark(
- aWindow.PlacesUtils.unfiledBookmarksFolderId, pageURI,
- aWindow.PlacesUtils.bookmarks.DEFAULT_INDEX, pageURI.spec);
- aWindow.PlacesUtils.favicons.setAndFetchFaviconForPage(pageURI, favIconURI,
- true, aWindow.PlacesUtils.favicons.FAVICON_LOAD_PRIVATE, null,
- Services.scriptSecurityManager.getSystemPrincipal());
- }
-
- function testDisabledHistoryBookmarked(aWindow, aCallback) {
- pageURI = NetUtil.newURI("http://example.com/disabledHistory_bookmarked");
- waitForFaviconChanged(pageURI, favIconURI, aWindow,
- function testDisabledHistoryBookmarkedCallback() {
- checkFaviconDataForPage(pageURI, favIconMimeType, favIconData, aWindow,
- aCallback);
- }
- );
-
- // Disable history while changing the favicon.
- aWindow.Services.prefs.setBoolPref("places.history.enabled", false);
-
- aWindow.PlacesUtils.bookmarks.insertBookmark(
- aWindow.PlacesUtils.unfiledBookmarksFolderId, pageURI,
- aWindow.PlacesUtils.bookmarks.DEFAULT_INDEX, pageURI.spec);
- aWindow.PlacesUtils.favicons.setAndFetchFaviconForPage(pageURI, favIconURI,
- true, aWindow.PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE, null,
- Services.scriptSecurityManager.getSystemPrincipal());
-
- // The setAndFetchFaviconForPage function calls CanAddURI synchronously, thus
- // we can set the preference back to true immediately. We don't clear the
- // preference because not all products enable Places by default.
- aWindow.Services.prefs.setBoolPref("places.history.enabled", true);
- }
-
- getIconFile(function () {
- testOnWindow({}, function(aWin) {
- testNormal(aWin, function () {
- testOnWindow({}, function(aWin2) {
- testAboutURIBookmarked(aWin2, function () {
- testOnWindow({private: true}, function(aWin3) {
- testPrivateBrowsingBookmarked(aWin3, function () {
- testOnWindow({}, function(aWin4) {
- testDisabledHistoryBookmarked(aWin4, finish);
- });
- });
- });
- });
- });
- });
- });
- });
-}
diff --git a/toolkit/components/places/tests/browser/browser_favicon_setAndFetchFaviconForPage_failures.js b/toolkit/components/places/tests/browser/browser_favicon_setAndFetchFaviconForPage_failures.js
deleted file mode 100644
index bd73af4413..0000000000
--- a/toolkit/components/places/tests/browser/browser_favicon_setAndFetchFaviconForPage_failures.js
+++ /dev/null
@@ -1,261 +0,0 @@
-/* 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 file tests setAndFetchFaviconForPage when it is called with invalid
- * arguments, and when no favicon is stored for the given arguments.
- */
-function test() {
- // Initialization
- waitForExplicitFinish();
- let windowsToClose = [];
- let favIcon16Location =
- "http://example.org/tests/toolkit/components/places/tests/browser/favicon-normal16.png";
- let favIcon32Location =
- "http://example.org/tests/toolkit/components/places/tests/browser/favicon-normal32.png";
- let favIcon16URI = NetUtil.newURI(favIcon16Location);
- let favIcon32URI = NetUtil.newURI(favIcon32Location);
- let lastPageURI = NetUtil.newURI("http://example.com/verification");
- // This error icon must stay in sync with FAVICON_ERRORPAGE_URL in
- // nsIFaviconService.idl, aboutCertError.xhtml and netError.xhtml.
- let favIconErrorPageURI =
- NetUtil.newURI("chrome://global/skin/icons/warning-16.png");
- let favIconsResultCount = 0;
-
- function testOnWindow(aOptions, aCallback) {
- whenNewWindowLoaded(aOptions, function(aWin) {
- windowsToClose.push(aWin);
- executeSoon(() => aCallback(aWin));
- });
- }
-
- // This function is called after calling finish() on the test.
- registerCleanupFunction(function() {
- windowsToClose.forEach(function(aWin) {
- aWin.close();
- });
- });
-
- function checkFavIconsDBCount(aCallback) {
- let stmt = DBConn().createAsyncStatement("SELECT url FROM moz_favicons");
- stmt.executeAsync({
- handleResult: function final_handleResult(aResultSet) {
- while (aResultSet.getNextRow()) {
- favIconsResultCount++;
- }
- },
- handleError: function final_handleError(aError) {
- throw ("Unexpected error (" + aError.result + "): " + aError.message);
- },
- handleCompletion: function final_handleCompletion(aReason) {
- // begin testing
- info("Previous records in moz_favicons: " + favIconsResultCount);
- if (aCallback) {
- aCallback();
- }
- }
- });
- stmt.finalize();
- }
-
- function testNullPageURI(aWindow, aCallback) {
- try {
- aWindow.PlacesUtils.favicons.setAndFetchFaviconForPage(null, favIcon16URI,
- true, aWindow.PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE, null,
- Services.scriptSecurityManager.getSystemPrincipal());
- throw ("Exception expected because aPageURI is null.");
- } catch (ex) {
- // We expected an exception.
- ok(true, "Exception expected because aPageURI is null");
- }
-
- if (aCallback) {
- aCallback();
- }
- }
-
- function testNullFavIconURI(aWindow, aCallback) {
- try {
- aWindow.PlacesUtils.favicons.setAndFetchFaviconForPage(
- NetUtil.newURI("http://example.com/null_faviconURI"), null,
- true, aWindow.PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- null, Services.scriptSecurityManager.getSystemPrincipal());
- throw ("Exception expected because aFaviconURI is null.");
- } catch (ex) {
- // We expected an exception.
- ok(true, "Exception expected because aFaviconURI is null.");
- }
-
- if (aCallback) {
- aCallback();
- }
- }
-
- function testAboutURI(aWindow, aCallback) {
- aWindow.PlacesUtils.favicons.setAndFetchFaviconForPage(
- NetUtil.newURI("about:testAboutURI"), favIcon16URI,
- true, aWindow.PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- null, Services.scriptSecurityManager.getSystemPrincipal());
-
- if (aCallback) {
- aCallback();
- }
- }
-
- function testPrivateBrowsingNonBookmarkedURI(aWindow, aCallback) {
- let pageURI = NetUtil.newURI("http://example.com/privateBrowsing");
- addVisits({ uri: pageURI, transitionType: TRANSITION_TYPED }, aWindow,
- function () {
- aWindow.PlacesUtils.favicons.setAndFetchFaviconForPage(pageURI,
- favIcon16URI, true,
- aWindow.PlacesUtils.favicons.FAVICON_LOAD_PRIVATE, null,
- Services.scriptSecurityManager.getSystemPrincipal());
-
- if (aCallback) {
- aCallback();
- }
- });
- }
-
- function testDisabledHistory(aWindow, aCallback) {
- let pageURI = NetUtil.newURI("http://example.com/disabledHistory");
- addVisits({ uri: pageURI, transition: TRANSITION_TYPED }, aWindow,
- function () {
- aWindow.Services.prefs.setBoolPref("places.history.enabled", false);
-
- aWindow.PlacesUtils.favicons.setAndFetchFaviconForPage(pageURI,
- favIcon16URI, true,
- aWindow.PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE, null,
- Services.scriptSecurityManager.getSystemPrincipal());
-
- // The setAndFetchFaviconForPage function calls CanAddURI synchronously, thus
- // we can set the preference back to true immediately . We don't clear the
- // preference because not all products enable Places by default.
- aWindow.Services.prefs.setBoolPref("places.history.enabled", true);
-
- if (aCallback) {
- aCallback();
- }
- });
- }
-
- function testErrorIcon(aWindow, aCallback) {
- let pageURI = NetUtil.newURI("http://example.com/errorIcon");
- addVisits({ uri: pageURI, transition: TRANSITION_TYPED }, aWindow,
- function () {
- aWindow.PlacesUtils.favicons.setAndFetchFaviconForPage(pageURI,
- favIconErrorPageURI, true,
- aWindow.PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE, null,
- Services.scriptSecurityManager.getSystemPrincipal());
-
- if (aCallback) {
- aCallback();
- }
- });
- }
-
- function testNonExistingPage(aWindow, aCallback) {
- aWindow.PlacesUtils.favicons.setAndFetchFaviconForPage(
- NetUtil.newURI("http://example.com/nonexistingPage"), favIcon16URI,
- true, aWindow.PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE, null,
- Services.scriptSecurityManager.getSystemPrincipal());
-
- if (aCallback) {
- aCallback();
- }
- }
-
- function testFinalVerification(aWindow, aCallback) {
- // Only the last test should raise the onPageChanged notification,
- // executing the waitForFaviconChanged callback.
- waitForFaviconChanged(lastPageURI, favIcon32URI, aWindow,
- function final_callback() {
- // Check that only one record corresponding to the last favicon is present.
- let resultCount = 0;
- let stmt = DBConn().createAsyncStatement("SELECT url FROM moz_favicons");
- stmt.executeAsync({
- handleResult: function final_handleResult(aResultSet) {
-
- // If the moz_favicons DB had been previously loaded (before our
- // test began), we should focus only in the URI we are testing and
- // skip the URIs not related to our test.
- if (favIconsResultCount > 0) {
- for (let row; (row = aResultSet.getNextRow()); ) {
- if (favIcon32URI.spec === row.getResultByIndex(0)) {
- is(favIcon32URI.spec, row.getResultByIndex(0),
- "Check equal favicons");
- resultCount++;
- }
- }
- } else {
- for (let row; (row = aResultSet.getNextRow()); ) {
- is(favIcon32URI.spec, row.getResultByIndex(0),
- "Check equal favicons");
- resultCount++;
- }
- }
- },
- handleError: function final_handleError(aError) {
- throw ("Unexpected error (" + aError.result + "): " + aError.message);
- },
- handleCompletion: function final_handleCompletion(aReason) {
- is(Ci.mozIStorageStatementCallback.REASON_FINISHED, aReason,
- "Check reasons are equal");
- is(1, resultCount, "Check result count");
- if (aCallback) {
- aCallback();
- }
- }
- });
- stmt.finalize();
- });
-
- // This is the only test that should cause the waitForFaviconChanged
- // callback to be invoked. In turn, the callback will invoke
- // finish() causing the tests to finish.
- addVisits({ uri: lastPageURI, transition: TRANSITION_TYPED }, aWindow,
- function () {
- aWindow.PlacesUtils.favicons.setAndFetchFaviconForPage(lastPageURI,
- favIcon32URI, true,
- aWindow.PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE, null,
- Services.scriptSecurityManager.getSystemPrincipal());
- });
- }
-
- checkFavIconsDBCount(function () {
- testOnWindow({}, function(aWin) {
- testNullPageURI(aWin, function () {
- testOnWindow({}, function(aWin2) {
- testNullFavIconURI(aWin2, function() {
- testOnWindow({}, function(aWin3) {
- testAboutURI(aWin3, function() {
- testOnWindow({private: true}, function(aWin4) {
- testPrivateBrowsingNonBookmarkedURI(aWin4, function () {
- testOnWindow({}, function(aWin5) {
- testDisabledHistory(aWin5, function () {
- testOnWindow({}, function(aWin6) {
- testErrorIcon(aWin6, function() {
- testOnWindow({}, function(aWin7) {
- testNonExistingPage(aWin7, function() {
- testOnWindow({}, function(aWin8) {
- testFinalVerification(aWin8, function() {
- finish();
- });
- });
- });
- });
- });
- });
- });
- });
- });
- });
- });
- });
- });
- });
- });
- });
- });
-}
diff --git a/toolkit/components/places/tests/browser/browser_history_post.js b/toolkit/components/places/tests/browser/browser_history_post.js
deleted file mode 100644
index c85e720f8e..0000000000
--- a/toolkit/components/places/tests/browser/browser_history_post.js
+++ /dev/null
@@ -1,23 +0,0 @@
-const PAGE_URI = "http://example.com/tests/toolkit/components/places/tests/browser/history_post.html";
-const SJS_URI = NetUtil.newURI("http://example.com/tests/toolkit/components/places/tests/browser/history_post.sjs");
-
-add_task(function* () {
- yield BrowserTestUtils.withNewTab({gBrowser, url: PAGE_URI}, Task.async(function* (aBrowser) {
- yield ContentTask.spawn(aBrowser, null, function* () {
- let doc = content.document;
- let submit = doc.getElementById("submit");
- let iframe = doc.getElementById("post_iframe");
- let p = new Promise((resolve, reject) => {
- iframe.addEventListener("load", function onLoad() {
- iframe.removeEventListener("load", onLoad);
- resolve();
- });
- });
- submit.click();
- yield p;
- });
- let visited = yield promiseIsURIVisited(SJS_URI);
- ok(!visited, "The POST page should not be added to history");
- ok(!(yield PlacesTestUtils.isPageInDB(SJS_URI.spec)), "The page should not be in the database");
- }));
-});
diff --git a/toolkit/components/places/tests/browser/browser_notfound.js b/toolkit/components/places/tests/browser/browser_notfound.js
deleted file mode 100644
index 20467eef4b..0000000000
--- a/toolkit/components/places/tests/browser/browser_notfound.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/* 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/. */
-
-add_task(function* () {
- const TEST_URL = "http://mochi.test:8888/notFoundPage.html";
-
- // Used to verify errors are not marked as typed.
- PlacesUtils.history.markPageAsTyped(NetUtil.newURI(TEST_URL));
-
- // Create and add history observer.
- let visitedPromise = new Promise(resolve => {
- let historyObserver = {
- onVisit: function (aURI, aVisitID, aTime, aSessionID, aReferringID,
- aTransitionType) {
- PlacesUtils.history.removeObserver(historyObserver);
- info("Received onVisit: " + aURI.spec);
- fieldForUrl(aURI, "frecency", function (aFrecency) {
- is(aFrecency, 0, "Frecency should be 0");
- fieldForUrl(aURI, "hidden", function (aHidden) {
- is(aHidden, 0, "Page should not be hidden");
- fieldForUrl(aURI, "typed", function (aTyped) {
- is(aTyped, 0, "page should not be marked as typed");
- resolve();
- });
- });
- });
- },
- onBeginUpdateBatch: function () {},
- onEndUpdateBatch: function () {},
- onTitleChanged: function () {},
- onDeleteURI: function () {},
- onClearHistory: function () {},
- onPageChanged: function () {},
- onDeleteVisits: function () {},
- QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryObserver])
- };
- PlacesUtils.history.addObserver(historyObserver, false);
- });
-
- let newTabPromise = BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_URL);
- yield Promise.all([visitedPromise, newTabPromise]);
-
- yield PlacesTestUtils.clearHistory();
- gBrowser.removeCurrentTab();
-});
diff --git a/toolkit/components/places/tests/browser/browser_redirect.js b/toolkit/components/places/tests/browser/browser_redirect.js
deleted file mode 100644
index d8a19731a9..0000000000
--- a/toolkit/components/places/tests/browser/browser_redirect.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/* 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/. */
-
-add_task(function* () {
- const REDIRECT_URI = NetUtil.newURI("http://mochi.test:8888/tests/toolkit/components/places/tests/browser/redirect.sjs");
- const TARGET_URI = NetUtil.newURI("http://mochi.test:8888/tests/toolkit/components/places/tests/browser/redirect-target.html");
-
- // Create and add history observer.
- let visitedPromise = new Promise(resolve => {
- let historyObserver = {
- _redirectNotified: false,
- onVisit: function (aURI, aVisitID, aTime, aSessionID, aReferringID,
- aTransitionType) {
- info("Received onVisit: " + aURI.spec);
-
- if (aURI.equals(REDIRECT_URI)) {
- this._redirectNotified = true;
- // Wait for the target page notification.
- return;
- }
-
- PlacesUtils.history.removeObserver(historyObserver);
-
- ok(this._redirectNotified, "The redirect should have been notified");
-
- fieldForUrl(REDIRECT_URI, "frecency", function (aFrecency) {
- ok(aFrecency != 0, "Frecency or the redirecting page should not be 0");
-
- fieldForUrl(REDIRECT_URI, "hidden", function (aHidden) {
- is(aHidden, 1, "The redirecting page should be hidden");
-
- fieldForUrl(TARGET_URI, "frecency", function (aFrecency2) {
- ok(aFrecency2 != 0, "Frecency of the target page should not be 0");
-
- fieldForUrl(TARGET_URI, "hidden", function (aHidden2) {
- is(aHidden2, 0, "The target page should not be hidden");
- resolve();
- });
- });
- });
- });
- },
- onBeginUpdateBatch: function () {},
- onEndUpdateBatch: function () {},
- onTitleChanged: function () {},
- onDeleteURI: function () {},
- onClearHistory: function () {},
- onPageChanged: function () {},
- onDeleteVisits: function () {},
- QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryObserver])
- };
- PlacesUtils.history.addObserver(historyObserver, false);
- });
-
- let newTabPromise = BrowserTestUtils.openNewForegroundTab(gBrowser, REDIRECT_URI.spec);
- yield Promise.all([visitedPromise, newTabPromise]);
-
- yield PlacesTestUtils.clearHistory();
- gBrowser.removeCurrentTab();
-});
diff --git a/toolkit/components/places/tests/browser/browser_settitle.js b/toolkit/components/places/tests/browser/browser_settitle.js
deleted file mode 100644
index 68c8deda76..0000000000
--- a/toolkit/components/places/tests/browser/browser_settitle.js
+++ /dev/null
@@ -1,76 +0,0 @@
-var conn = PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase).DBConnection;
-
-/**
- * Gets a single column value from either the places or historyvisits table.
- */
-function getColumn(table, column, url)
-{
- var stmt = conn.createStatement(
- `SELECT ${column} FROM ${table} WHERE url_hash = hash(:val) AND url = :val`);
- try {
- stmt.params.val = url;
- stmt.executeStep();
- return stmt.row[column];
- }
- finally {
- stmt.finalize();
- }
-}
-
-add_task(function* ()
-{
- // Make sure titles are correctly saved for a URI with the proper
- // notifications.
-
- // Create and add history observer.
- let titleChangedPromise = new Promise(resolve => {
- var historyObserver = {
- data: [],
- onBeginUpdateBatch: function() {},
- onEndUpdateBatch: function() {},
- onVisit: function(aURI, aVisitID, aTime, aSessionID, aReferringID,
- aTransitionType) {
- },
- onTitleChanged: function(aURI, aPageTitle, aGUID) {
- this.data.push({ uri: aURI, title: aPageTitle, guid: aGUID });
-
- // We only expect one title change.
- //
- // Although we are loading two different pages, the first page does not
- // have a title. Since the title starts out as empty and then is set
- // to empty, there is no title change notification.
-
- PlacesUtils.history.removeObserver(this);
- resolve(this.data);
- },
- onDeleteURI: function() {},
- onClearHistory: function() {},
- onPageChanged: function() {},
- onDeleteVisits: function() {},
- QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryObserver])
- };
- PlacesUtils.history.addObserver(historyObserver, false);
- });
-
- const url1 = "http://example.com/tests/toolkit/components/places/tests/browser/title1.html";
- yield BrowserTestUtils.openNewForegroundTab(gBrowser, url1);
-
- const url2 = "http://example.com/tests/toolkit/components/places/tests/browser/title2.html";
- let loadPromise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
- BrowserTestUtils.loadURI(gBrowser.selectedBrowser, url2);
- yield loadPromise;
-
- let data = yield titleChangedPromise;
- is(data[0].uri.spec, "http://example.com/tests/toolkit/components/places/tests/browser/title2.html");
- is(data[0].title, "Some title");
- is(data[0].guid, getColumn("moz_places", "guid", data[0].uri.spec));
-
- data.forEach(function(item) {
- var title = getColumn("moz_places", "title", data[0].uri.spec);
- is(title, item.title);
- });
-
- gBrowser.removeCurrentTab();
- yield PlacesTestUtils.clearHistory();
-});
-
diff --git a/toolkit/components/places/tests/browser/browser_visited_notfound.js b/toolkit/components/places/tests/browser/browser_visited_notfound.js
deleted file mode 100644
index b2b4f25b8e..0000000000
--- a/toolkit/components/places/tests/browser/browser_visited_notfound.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/* 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/. */
-
-const TEST_URI = NetUtil.newURI("http://mochi.test:8888/notFoundPage.html");
-
-function test() {
- waitForExplicitFinish();
-
- gBrowser.selectedTab = gBrowser.addTab();
- registerCleanupFunction(function() {
- gBrowser.removeCurrentTab();
- });
-
- // First add a visit to the page, this will ensure that later we skip
- // updating the frecency for a newly not-found page.
- addVisits({ uri: TEST_URI }, window, () => {
- info("Added visit");
- fieldForUrl(TEST_URI, "frecency", aFrecency => {
- ok(aFrecency > 0, "Frecency should be > 0");
- continueTest(aFrecency);
- });
- });
-}
-
-function continueTest(aOldFrecency) {
- // Used to verify errors are not marked as typed.
- PlacesUtils.history.markPageAsTyped(TEST_URI);
- gBrowser.selectedBrowser.loadURI(TEST_URI.spec);
-
- // Create and add history observer.
- let historyObserver = {
- __proto__: NavHistoryObserver.prototype,
- onVisit: function (aURI, aVisitID, aTime, aSessionID, aReferringID,
- aTransitionType) {
- PlacesUtils.history.removeObserver(historyObserver);
- info("Received onVisit: " + aURI.spec);
- fieldForUrl(aURI, "frecency", function (aFrecency) {
- is(aFrecency, aOldFrecency, "Frecency should be unchanged");
- fieldForUrl(aURI, "hidden", function (aHidden) {
- is(aHidden, 0, "Page should not be hidden");
- fieldForUrl(aURI, "typed", function (aTyped) {
- is(aTyped, 0, "page should not be marked as typed");
- PlacesTestUtils.clearHistory().then(finish);
- });
- });
- });
- }
- };
- PlacesUtils.history.addObserver(historyObserver, false);
-}
diff --git a/toolkit/components/places/tests/browser/browser_visituri.js b/toolkit/components/places/tests/browser/browser_visituri.js
deleted file mode 100644
index 8ba2b72729..0000000000
--- a/toolkit/components/places/tests/browser/browser_visituri.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * One-time observer callback.
- */
-function promiseObserve(name, checkFn) {
- return new Promise(resolve => {
- Services.obs.addObserver(function observer(subject) {
- if (checkFn(subject)) {
- Services.obs.removeObserver(observer, name);
- resolve();
- }
- }, name, false);
- });
-}
-
-var conn = PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase).DBConnection;
-
-/**
- * Gets a single column value from either the places or historyvisits table.
- */
-function getColumn(table, column, fromColumnName, fromColumnValue) {
- let sql = `SELECT ${column}
- FROM ${table}
- WHERE ${fromColumnName} = :val
- ${fromColumnName == "url" ? "AND url_hash = hash(:val)" : ""}
- LIMIT 1`;
- let stmt = conn.createStatement(sql);
- try {
- stmt.params.val = fromColumnValue;
- ok(stmt.executeStep(), "Expect to get a row");
- return stmt.row[column];
- }
- finally {
- stmt.reset();
- }
-}
-
-add_task(function* () {
- // Make sure places visit chains are saved correctly with a redirect
- // transitions.
-
- // Part 1: observe history events that fire when a visit occurs.
- // Make sure visits appear in order, and that the visit chain is correct.
- var expectedUrls = [
- "http://example.com/tests/toolkit/components/places/tests/browser/begin.html",
- "http://example.com/tests/toolkit/components/places/tests/browser/redirect_twice.sjs",
- "http://example.com/tests/toolkit/components/places/tests/browser/redirect_once.sjs",
- "http://example.com/tests/toolkit/components/places/tests/browser/final.html"
- ];
- var currentIndex = 0;
-
- function checkObserver(subject) {
- var uri = subject.QueryInterface(Ci.nsIURI);
- var expected = expectedUrls[currentIndex];
- is(uri.spec, expected, "Saved URL visit " + uri.spec);
-
- var placeId = getColumn("moz_places", "id", "url", uri.spec);
- var fromVisitId = getColumn("moz_historyvisits", "from_visit", "place_id", placeId);
-
- if (currentIndex == 0) {
- is(fromVisitId, 0, "First visit has no from visit");
- }
- else {
- var lastVisitId = getColumn("moz_historyvisits", "place_id", "id", fromVisitId);
- var fromVisitUrl = getColumn("moz_places", "url", "id", lastVisitId);
- is(fromVisitUrl, expectedUrls[currentIndex - 1],
- "From visit was " + expectedUrls[currentIndex - 1]);
- }
-
- currentIndex++;
- return (currentIndex >= expectedUrls.length);
- }
- let visitUriPromise = promiseObserve("uri-visit-saved", checkObserver);
-
- const testUrl = "http://example.com/tests/toolkit/components/places/tests/browser/begin.html";
- yield BrowserTestUtils.openNewForegroundTab(gBrowser, testUrl);
-
- // Load begin page, click link on page to record visits.
- yield BrowserTestUtils.synthesizeMouseAtCenter("#clickme", { }, gBrowser.selectedBrowser);
- yield visitUriPromise;
-
- yield PlacesTestUtils.clearHistory();
-
- gBrowser.removeCurrentTab();
-});
diff --git a/toolkit/components/places/tests/browser/browser_visituri_nohistory.js b/toolkit/components/places/tests/browser/browser_visituri_nohistory.js
deleted file mode 100644
index a3a8e76261..0000000000
--- a/toolkit/components/places/tests/browser/browser_visituri_nohistory.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-const INITIAL_URL = "http://example.com/tests/toolkit/components/places/tests/browser/begin.html";
-const FINAL_URL = "http://example.com/tests/toolkit/components/places/tests/browser/final.html";
-
-/**
- * One-time observer callback.
- */
-function promiseObserve(name)
-{
- return new Promise(resolve => {
- Services.obs.addObserver(function observer(subject) {
- Services.obs.removeObserver(observer, name);
- resolve(subject);
- }, name, false);
- });
-}
-
-add_task(function* ()
-{
- yield new Promise(resolve => SpecialPowers.pushPrefEnv({"set": [["places.history.enabled", false]]}, resolve));
-
- let visitUriPromise = promiseObserve("uri-visit-saved");
-
- yield BrowserTestUtils.openNewForegroundTab(gBrowser, INITIAL_URL);
-
- yield new Promise(resolve => SpecialPowers.popPrefEnv(resolve));
-
- let browserLoadedPromise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
- gBrowser.loadURI(FINAL_URL);
- yield browserLoadedPromise;
-
- let subject = yield visitUriPromise;
- let uri = subject.QueryInterface(Ci.nsIURI);
- is(uri.spec, FINAL_URL, "received expected visit");
-
- yield PlacesTestUtils.clearHistory();
- gBrowser.removeCurrentTab();
-});
diff --git a/toolkit/components/places/tests/browser/browser_visituri_privatebrowsing_perwindowpb.js b/toolkit/components/places/tests/browser/browser_visituri_privatebrowsing_perwindowpb.js
deleted file mode 100644
index abde69a7d9..0000000000
--- a/toolkit/components/places/tests/browser/browser_visituri_privatebrowsing_perwindowpb.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function test() {
- // initialization
- waitForExplicitFinish();
- let windowsToClose = [];
- let initialURL =
- "http://example.com/tests/toolkit/components/places/tests/browser/begin.html";
- let finalURL =
- "http://example.com/tests/toolkit/components/places/tests/browser/final.html";
- let observer = null;
- let enumerator = null;
- let currentObserver = null;
- let uri = null;
-
- function doTest(aIsPrivateMode, aWindow, aTestURI, aCallback) {
- observer = {
- observe: function(aSubject, aTopic, aData) {
- // The uri-visit-saved topic should only work when on normal mode.
- if (aTopic == "uri-visit-saved") {
- // Remove the observers set on per window private mode and normal
- // mode.
- enumerator = aWindow.Services.obs.enumerateObservers("uri-visit-saved");
- while (enumerator.hasMoreElements()) {
- currentObserver = enumerator.getNext();
- aWindow.Services.obs.removeObserver(currentObserver, "uri-visit-saved");
- }
-
- // The expected visit should be the finalURL because private mode
- // should not register a visit with the initialURL.
- uri = aSubject.QueryInterface(Ci.nsIURI);
- is(uri.spec, finalURL, "Check received expected visit");
- }
- }
- };
-
- aWindow.Services.obs.addObserver(observer, "uri-visit-saved", false);
-
- BrowserTestUtils.browserLoaded(aWindow.gBrowser.selectedBrowser).then(aCallback);
- aWindow.gBrowser.selectedBrowser.loadURI(aTestURI);
- }
-
- function testOnWindow(aOptions, aCallback) {
- whenNewWindowLoaded(aOptions, function(aWin) {
- windowsToClose.push(aWin);
- // execute should only be called when need, like when you are opening
- // web pages on the test. If calling executeSoon() is not necesary, then
- // call whenNewWindowLoaded() instead of testOnWindow() on your test.
- executeSoon(() => aCallback(aWin));
- });
- }
-
- // This function is called after calling finish() on the test.
- registerCleanupFunction(function() {
- windowsToClose.forEach(function(aWin) {
- aWin.close();
- });
- });
-
- // test first when on private mode
- testOnWindow({private: true}, function(aWin) {
- doTest(true, aWin, initialURL, function() {
- // then test when not on private mode
- testOnWindow({}, function(aWin2) {
- doTest(false, aWin2, finalURL, function () {
- PlacesTestUtils.clearHistory().then(finish);
- });
- });
- });
- });
-}
diff --git a/toolkit/components/places/tests/browser/colorAnalyzer/category-discover.png b/toolkit/components/places/tests/browser/colorAnalyzer/category-discover.png
deleted file mode 100644
index a6f5b49b37..0000000000
--- a/toolkit/components/places/tests/browser/colorAnalyzer/category-discover.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/browser/colorAnalyzer/dictionaryGeneric-16.png b/toolkit/components/places/tests/browser/colorAnalyzer/dictionaryGeneric-16.png
deleted file mode 100644
index 4ad1a1a825..0000000000
--- a/toolkit/components/places/tests/browser/colorAnalyzer/dictionaryGeneric-16.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/browser/colorAnalyzer/extensionGeneric-16.png b/toolkit/components/places/tests/browser/colorAnalyzer/extensionGeneric-16.png
deleted file mode 100644
index fc6c8a2583..0000000000
--- a/toolkit/components/places/tests/browser/colorAnalyzer/extensionGeneric-16.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/browser/colorAnalyzer/localeGeneric.png b/toolkit/components/places/tests/browser/colorAnalyzer/localeGeneric.png
deleted file mode 100644
index 4d9ac5ad89..0000000000
--- a/toolkit/components/places/tests/browser/colorAnalyzer/localeGeneric.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/browser/favicon-normal16.png b/toolkit/components/places/tests/browser/favicon-normal16.png
deleted file mode 100644
index 62b69a3d03..0000000000
--- a/toolkit/components/places/tests/browser/favicon-normal16.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/browser/favicon-normal32.png b/toolkit/components/places/tests/browser/favicon-normal32.png
deleted file mode 100644
index 5535363c94..0000000000
--- a/toolkit/components/places/tests/browser/favicon-normal32.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/browser/favicon.html b/toolkit/components/places/tests/browser/favicon.html
deleted file mode 100644
index a0f5ea9594..0000000000
--- a/toolkit/components/places/tests/browser/favicon.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!--
- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
--->
-
-<html>
- <head>
- <link rel="shortcut icon" href="http://example.org/tests/toolkit/components/places/tests/browser/favicon-normal32.png">
- </head>
- <body>
- OK we're done!
- </body>
-</html>
diff --git a/toolkit/components/places/tests/browser/final.html b/toolkit/components/places/tests/browser/final.html
deleted file mode 100644
index ccd5819181..0000000000
--- a/toolkit/components/places/tests/browser/final.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!--
- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
--->
-
-<html>
- <body>
- OK we're done!
- </body>
-</html>
diff --git a/toolkit/components/places/tests/browser/head.js b/toolkit/components/places/tests/browser/head.js
deleted file mode 100644
index 897585a81f..0000000000
--- a/toolkit/components/places/tests/browser/head.js
+++ /dev/null
@@ -1,319 +0,0 @@
-Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
-Components.utils.import("resource://gre/modules/NetUtil.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "PlacesTestUtils",
- "resource://testing-common/PlacesTestUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "BrowserTestUtils",
- "resource://testing-common/BrowserTestUtils.jsm");
-
-const TRANSITION_LINK = PlacesUtils.history.TRANSITION_LINK;
-const TRANSITION_TYPED = PlacesUtils.history.TRANSITION_TYPED;
-const TRANSITION_BOOKMARK = PlacesUtils.history.TRANSITION_BOOKMARK;
-const TRANSITION_REDIRECT_PERMANENT = PlacesUtils.history.TRANSITION_REDIRECT_PERMANENT;
-const TRANSITION_REDIRECT_TEMPORARY = PlacesUtils.history.TRANSITION_REDIRECT_TEMPORARY;
-const TRANSITION_EMBED = PlacesUtils.history.TRANSITION_EMBED;
-const TRANSITION_FRAMED_LINK = PlacesUtils.history.TRANSITION_FRAMED_LINK;
-const TRANSITION_DOWNLOAD = PlacesUtils.history.TRANSITION_DOWNLOAD;
-
-/**
- * Returns a moz_places field value for a url.
- *
- * @param aURI
- * The URI or spec to get field for.
- * param aCallback
- * Callback function that will get the property value.
- */
-function fieldForUrl(aURI, aFieldName, aCallback)
-{
- let url = aURI instanceof Ci.nsIURI ? aURI.spec : aURI;
- let stmt = PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
- .DBConnection.createAsyncStatement(
- `SELECT ${aFieldName} FROM moz_places WHERE url_hash = hash(:page_url) AND url = :page_url`
- );
- stmt.params.page_url = url;
- stmt.executeAsync({
- _value: -1,
- handleResult: function(aResultSet) {
- let row = aResultSet.getNextRow();
- if (!row)
- ok(false, "The page should exist in the database");
- this._value = row.getResultByName(aFieldName);
- },
- handleError: function() {},
- handleCompletion: function(aReason) {
- if (aReason != Ci.mozIStorageStatementCallback.REASON_FINISHED)
- ok(false, "The statement should properly succeed");
- aCallback(this._value);
- }
- });
- stmt.finalize();
-}
-
-/**
- * Generic nsINavHistoryObserver that doesn't implement anything, but provides
- * dummy methods to prevent errors about an object not having a certain method.
- */
-function NavHistoryObserver() {}
-
-NavHistoryObserver.prototype = {
- onBeginUpdateBatch: function () {},
- onEndUpdateBatch: function () {},
- onVisit: function () {},
- onTitleChanged: function () {},
- onDeleteURI: function () {},
- onClearHistory: function () {},
- onPageChanged: function () {},
- onDeleteVisits: function () {},
- QueryInterface: XPCOMUtils.generateQI([
- Ci.nsINavHistoryObserver,
- ])
-};
-
-/**
- * Waits for the first OnPageChanged notification for ATTRIBUTE_FAVICON, and
- * verifies that it matches the expected page URI and associated favicon URI.
- *
- * This function also double-checks the GUID parameter of the notification.
- *
- * @param aExpectedPageURI
- * nsIURI object of the page whose favicon should change.
- * @param aExpectedFaviconURI
- * nsIURI object of the newly associated favicon.
- * @param aCallback
- * This function is called after the check finished.
- */
-function waitForFaviconChanged(aExpectedPageURI, aExpectedFaviconURI, aWindow,
- aCallback) {
- let historyObserver = {
- __proto__: NavHistoryObserver.prototype,
- onPageChanged: function WFFC_onPageChanged(aURI, aWhat, aValue, aGUID) {
- if (aWhat != Ci.nsINavHistoryObserver.ATTRIBUTE_FAVICON) {
- return;
- }
- aWindow.PlacesUtils.history.removeObserver(this);
-
- ok(aURI.equals(aExpectedPageURI),
- "Check URIs are equal for the page which favicon changed");
- is(aValue, aExpectedFaviconURI.spec,
- "Check changed favicon URI is the expected");
- checkGuidForURI(aURI, aGUID);
-
- if (aCallback) {
- aCallback();
- }
- }
- };
- aWindow.PlacesUtils.history.addObserver(historyObserver, false);
-}
-
-/**
- * Asynchronously adds visits to a page, invoking a callback function when done.
- *
- * @param aPlaceInfo
- * Either an nsIURI, in such a case a single LINK visit will be added.
- * Or can be an object describing the visit to add, or an array
- * of these objects:
- * { uri: nsIURI of the page,
- * transition: one of the TRANSITION_* from nsINavHistoryService,
- * [optional] title: title of the page,
- * [optional] visitDate: visit date in microseconds from the epoch
- * [optional] referrer: nsIURI of the referrer for this visit
- * }
- * @param [optional] aCallback
- * Function to be invoked on completion.
- * @param [optional] aStack
- * The stack frame used to report errors.
- */
-function addVisits(aPlaceInfo, aWindow, aCallback, aStack) {
- let places = [];
- if (aPlaceInfo instanceof Ci.nsIURI) {
- places.push({ uri: aPlaceInfo });
- }
- else if (Array.isArray(aPlaceInfo)) {
- places = places.concat(aPlaceInfo);
- } else {
- places.push(aPlaceInfo)
- }
-
- // Create mozIVisitInfo for each entry.
- let now = Date.now();
- for (let place of places) {
- if (!place.title) {
- place.title = "test visit for " + place.uri.spec;
- }
- place.visits = [{
- transitionType: place.transition === undefined ? TRANSITION_LINK
- : place.transition,
- visitDate: place.visitDate || (now++) * 1000,
- referrerURI: place.referrer
- }];
- }
-
- aWindow.PlacesUtils.asyncHistory.updatePlaces(
- places,
- {
- handleError: function AAV_handleError() {
- throw ("Unexpected error in adding visit.");
- },
- handleResult: function () {},
- handleCompletion: function UP_handleCompletion() {
- if (aCallback)
- aCallback();
- }
- }
- );
-}
-
-/**
- * Checks that the favicon for the given page matches the provided data.
- *
- * @param aPageURI
- * nsIURI object for the page to check.
- * @param aExpectedMimeType
- * Expected MIME type of the icon, for example "image/png".
- * @param aExpectedData
- * Expected icon data, expressed as an array of byte values.
- * @param aCallback
- * This function is called after the check finished.
- */
-function checkFaviconDataForPage(aPageURI, aExpectedMimeType, aExpectedData,
- aWindow, aCallback) {
- aWindow.PlacesUtils.favicons.getFaviconDataForPage(aPageURI,
- function (aURI, aDataLen, aData, aMimeType) {
- is(aExpectedMimeType, aMimeType, "Check expected MimeType");
- is(aExpectedData.length, aData.length,
- "Check favicon data for the given page matches the provided data");
- checkGuidForURI(aPageURI);
- aCallback();
- });
-}
-
-/**
- * Tests that a guid was set in moz_places for a given uri.
- *
- * @param aURI
- * The uri to check.
- * @param [optional] aGUID
- * The expected guid in the database.
- */
-function checkGuidForURI(aURI, aGUID) {
- let guid = doGetGuidForURI(aURI);
- if (aGUID) {
- doCheckValidPlacesGuid(aGUID);
- is(guid, aGUID, "Check equal guid for URIs");
- }
-}
-
-/**
- * Retrieves the guid for a given uri.
- *
- * @param aURI
- * The uri to check.
- * @return the associated the guid.
- */
-function doGetGuidForURI(aURI) {
- let stmt = DBConn().createStatement(
- `SELECT guid
- FROM moz_places
- WHERE url_hash = hash(:url) AND url = :url`
- );
- stmt.params.url = aURI.spec;
- ok(stmt.executeStep(), "Check get guid for uri from moz_places");
- let guid = stmt.row.guid;
- stmt.finalize();
- doCheckValidPlacesGuid(guid);
- return guid;
-}
-
-/**
- * Tests if a given guid is valid for use in Places or not.
- *
- * @param aGuid
- * The guid to test.
- */
-function doCheckValidPlacesGuid(aGuid) {
- ok(/^[a-zA-Z0-9\-_]{12}$/.test(aGuid), "Check guid for valid places");
-}
-
-/**
- * Gets the database connection. If the Places connection is invalid it will
- * try to create a new connection.
- *
- * @param [optional] aForceNewConnection
- * Forces creation of a new connection to the database. When a
- * connection is asyncClosed it cannot anymore schedule async statements,
- * though connectionReady will keep returning true (Bug 726990).
- *
- * @return The database connection or null if unable to get one.
- */
-function DBConn(aForceNewConnection) {
- let gDBConn;
- if (!aForceNewConnection) {
- let db = PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
- .DBConnection;
- if (db.connectionReady)
- return db;
- }
-
- // If the Places database connection has been closed, create a new connection.
- if (!gDBConn || aForceNewConnection) {
- let file = Services.dirsvc.get('ProfD', Ci.nsIFile);
- file.append("places.sqlite");
- let dbConn = gDBConn = Services.storage.openDatabase(file);
-
- // Be sure to cleanly close this connection.
- Services.obs.addObserver(function DBCloseCallback(aSubject, aTopic, aData) {
- Services.obs.removeObserver(DBCloseCallback, aTopic);
- dbConn.asyncClose();
- }, "profile-before-change", false);
- }
-
- return gDBConn.connectionReady ? gDBConn : null;
-}
-
-function whenNewWindowLoaded(aOptions, aCallback) {
- BrowserTestUtils.waitForNewWindow().then(aCallback);
- OpenBrowserWindow(aOptions);
-}
-
-/**
- * Asynchronously check a url is visited.
- *
- * @param aURI The URI.
- * @param aExpectedValue The expected value.
- * @return {Promise}
- * @resolves When the check has been added successfully.
- * @rejects JavaScript exception.
- */
-function promiseIsURIVisited(aURI, aExpectedValue) {
- return new Promise(resolve => {
- PlacesUtils.asyncHistory.isURIVisited(aURI, function(unused, aIsVisited) {
- resolve(aIsVisited);
- });
- });
-}
-
-function waitForCondition(condition, nextTest, errorMsg) {
- let tries = 0;
- let interval = setInterval(function() {
- if (tries >= 30) {
- ok(false, errorMsg);
- moveOn();
- }
- let conditionPassed;
- try {
- conditionPassed = condition();
- } catch (e) {
- ok(false, e + "\n" + e.stack);
- conditionPassed = false;
- }
- if (conditionPassed) {
- moveOn();
- }
- tries++;
- }, 200);
- function moveOn() {
- clearInterval(interval);
- nextTest();
- }
-}
diff --git a/toolkit/components/places/tests/browser/history_post.html b/toolkit/components/places/tests/browser/history_post.html
deleted file mode 100644
index a579a9b8ae..0000000000
--- a/toolkit/components/places/tests/browser/history_post.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>Test post pages are not added to history</title>
- </head>
- <body>
- <iframe name="post_iframe" id="post_iframe"></iframe>
- <form method="post" action="http://example.com/tests/toolkit/components/places/tests/browser/history_post.sjs" target="post_iframe">
- <input type="submit" id="submit"/>
- </form>
- </body>
-</html>
diff --git a/toolkit/components/places/tests/browser/history_post.sjs b/toolkit/components/places/tests/browser/history_post.sjs
deleted file mode 100644
index 3c86aad7bc..0000000000
--- a/toolkit/components/places/tests/browser/history_post.sjs
+++ /dev/null
@@ -1,6 +0,0 @@
-function handleRequest(request, response)
-{
- response.setStatusLine("1.0", 200, "OK");
- response.setHeader("Content-Type", "text/plain; charset=utf-8", false);
- response.write("Ciao");
-}
diff --git a/toolkit/components/places/tests/browser/redirect-target.html b/toolkit/components/places/tests/browser/redirect-target.html
deleted file mode 100644
index 3700263385..0000000000
--- a/toolkit/components/places/tests/browser/redirect-target.html
+++ /dev/null
@@ -1 +0,0 @@
-<!DOCTYPE html><html><body><p>Ciao!</p></body></html>
diff --git a/toolkit/components/places/tests/browser/redirect.sjs b/toolkit/components/places/tests/browser/redirect.sjs
deleted file mode 100644
index f55e78eb16..0000000000
--- a/toolkit/components/places/tests/browser/redirect.sjs
+++ /dev/null
@@ -1,14 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function handleRequest(request, response)
-{
- let page = "<!DOCTYPE html><html><body><p>Redirecting...</p></body></html>";
-
- response.setStatusLine(request.httpVersion, "301", "Moved Permanently");
- response.setHeader("Content-Type", "text/html", false);
- response.setHeader("Content-Length", page.length + "", false);
- response.setHeader("Location", "redirect-target.html", false);
- response.write(page);
-}
diff --git a/toolkit/components/places/tests/browser/redirect_once.sjs b/toolkit/components/places/tests/browser/redirect_once.sjs
deleted file mode 100644
index 8b2a8aa55e..0000000000
--- a/toolkit/components/places/tests/browser/redirect_once.sjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/**
- * Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-function handleRequest(request, response) {
- response.setStatusLine("1.1", 301, "Found");
- response.setHeader("Location", "final.html", false);
-}
diff --git a/toolkit/components/places/tests/browser/redirect_twice.sjs b/toolkit/components/places/tests/browser/redirect_twice.sjs
deleted file mode 100644
index 099d20022e..0000000000
--- a/toolkit/components/places/tests/browser/redirect_twice.sjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/**
- * Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-function handleRequest(request, response) {
- response.setStatusLine("1.1", 302, "Found");
- response.setHeader("Location", "redirect_once.sjs", false);
-}
diff --git a/toolkit/components/places/tests/browser/title1.html b/toolkit/components/places/tests/browser/title1.html
deleted file mode 100644
index 3c98d693ec..0000000000
--- a/toolkit/components/places/tests/browser/title1.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!--
- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
--->
-
-<html>
- <head>
- </head>
- <body>
- title1.html
- </body>
-</html>
diff --git a/toolkit/components/places/tests/browser/title2.html b/toolkit/components/places/tests/browser/title2.html
deleted file mode 100644
index 28a6b69b59..0000000000
--- a/toolkit/components/places/tests/browser/title2.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!--
- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
--->
-
-<html>
- <head>
- <title>Some title</title>
- </head>
- <body>
- title2.html
- </body>
-</html>
-
diff --git a/toolkit/components/places/tests/chrome/.eslintrc.js b/toolkit/components/places/tests/chrome/.eslintrc.js
deleted file mode 100644
index bf379df8df..0000000000
--- a/toolkit/components/places/tests/chrome/.eslintrc.js
+++ /dev/null
@@ -1,8 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/mochitest/chrome.eslintrc.js",
- "../../../../../testing/mochitest/mochitest.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/places/tests/chrome/bad_links.atom b/toolkit/components/places/tests/chrome/bad_links.atom
deleted file mode 100644
index 4469272524..0000000000
--- a/toolkit/components/places/tests/chrome/bad_links.atom
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<feed xmlns="http://www.w3.org/2005/Atom">
-
- <title>Example Feed</title>
- <link href="http://example.org/"/>
- <updated>2003-12-13T18:30:02Z</updated>
-
- <author>
- <name>John Doe</name>
- </author>
- <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
-
- <entry>
-
- <title>First good item</title>
- <link href="http://example.org/first"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
- <updated>2003-12-13T18:30:02Z</updated>
-
- <summary>Some text.</summary>
- </entry>
-
- <entry>
-
- <title>data: link</title>
- <link href="data:text/plain,Hi"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6b</id>
- <updated>2003-12-13T18:30:03Z</updated>
-
- <summary>Some text.</summary>
- </entry>
-
- <entry>
-
- <title>javascript: link</title>
- <link href="javascript:alert('Hi')"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6c</id>
- <updated>2003-12-13T18:30:04Z</updated>
-
- <summary>Some text.</summary>
- </entry>
-
- <entry>
-
- <title>file: link</title>
- <link href="file:///var/"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6d</id>
- <updated>2003-12-13T18:30:05Z</updated>
-
- <summary>Some text.</summary>
- </entry>
-
- <entry>
-
- <title>chrome: link</title>
- <link href="chrome://browser/content/browser.js"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6e</id>
- <updated>2003-12-13T18:30:06Z</updated>
-
- <summary>Some text.</summary>
- </entry>
-
- <entry>
-
- <title>Last good item</title>
- <link href="http://example.org/last"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6b</id>
- <updated>2003-12-13T18:30:07Z</updated>
-
- <summary>Some text.</summary>
- </entry>
-
-
-</feed>
diff --git a/toolkit/components/places/tests/chrome/browser_disableglobalhistory.xul b/toolkit/components/places/tests/chrome/browser_disableglobalhistory.xul
deleted file mode 100644
index d7bbfda673..0000000000
--- a/toolkit/components/places/tests/chrome/browser_disableglobalhistory.xul
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-
-<window title="Test disableglobalhistory attribute on remote browsers"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="run_test();">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SpawnTask.js"></script>
-
- <browser id="inprocess_disabled" src="about:blank" type="content" disableglobalhistory="true" />
- <browser id="inprocess_enabled" src="about:blank" type="content" />
-
- <browser id="remote_disabled" src="about:blank" type="content" disableglobalhistory="true" />
- <browser id="remote_enabled" src="about:blank" type="content" />
-
- <script type="text/javascript;version=1.7">
- const {interfaces: Ci, classes: Cc, results: Cr, utils: Cu} = Components;
-
- Cu.import("resource://testing-common/ContentTask.jsm");
- ContentTask.setTestScope(window.opener.wrappedJSObject);
-
- function expectUseGlobalHistory(id, expected) {
- let browser = document.getElementById(id);
- return ContentTask.spawn(browser, {id, expected}, function*({id, expected}) {
- Assert.equal(docShell.useGlobalHistory, expected,
- "Got the right useGlobalHistory state in the docShell of " + id);
- });
- }
-
- function run_test() {
- spawn_task(function*() {
- yield expectUseGlobalHistory("inprocess_disabled", false);
- yield expectUseGlobalHistory("inprocess_enabled", true);
-
- yield expectUseGlobalHistory("remote_disabled", false);
- yield expectUseGlobalHistory("remote_enabled", true);
- window.opener.done();
- });
- };
-
- </script>
-</window> \ No newline at end of file
diff --git a/toolkit/components/places/tests/chrome/chrome.ini b/toolkit/components/places/tests/chrome/chrome.ini
deleted file mode 100644
index 5ac753e730..0000000000
--- a/toolkit/components/places/tests/chrome/chrome.ini
+++ /dev/null
@@ -1,12 +0,0 @@
-[DEFAULT]
-
-[test_303567.xul]
-[test_341972a.xul]
-[test_341972b.xul]
-[test_342484.xul]
-[test_371798.xul]
-[test_381357.xul]
-[test_favicon_annotations.xul]
-[test_reloadLivemarks.xul]
-[test_browser_disableglobalhistory.xul]
-support-files = browser_disableglobalhistory.xul \ No newline at end of file
diff --git a/toolkit/components/places/tests/chrome/link-less-items-no-site-uri.rss b/toolkit/components/places/tests/chrome/link-less-items-no-site-uri.rss
deleted file mode 100644
index 612b0a5c2e..0000000000
--- a/toolkit/components/places/tests/chrome/link-less-items-no-site-uri.rss
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<rss version="2.0">
- <channel>
- <title>feed title</title>
- <ttl>180</ttl>
- <item>
- <title>linked feed item</title>
- <link>http://feed-item-link.com</link>
- </item>
- <item>
- <title>link-less feed item</title>
- </item>
- <item>
- <title>linked feed item</title>
- <link>http://feed-item-link.com</link>
- </item>
- </channel>
-</rss>
diff --git a/toolkit/components/places/tests/chrome/link-less-items.rss b/toolkit/components/places/tests/chrome/link-less-items.rss
deleted file mode 100644
index a30d4a3531..0000000000
--- a/toolkit/components/places/tests/chrome/link-less-items.rss
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<rss version="2.0">
- <channel>
- <title>feed title</title>
- <link>http://feed-link.com</link>
- <ttl>180</ttl>
- <item>
- <title>linked feed item</title>
- <link>http://feed-item-link.com</link>
- </item>
- <item>
- <title>link-less feed item</title>
- </item>
- <item>
- <title>linked feed item</title>
- <link>http://feed-item-link.com</link>
- </item>
- </channel>
-</rss>
diff --git a/toolkit/components/places/tests/chrome/rss_as_html.rss b/toolkit/components/places/tests/chrome/rss_as_html.rss
deleted file mode 100644
index e823050353..0000000000
--- a/toolkit/components/places/tests/chrome/rss_as_html.rss
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
-<channel>
-<title>sadfasdfasdfasfasdf</title>
-<link>http://www.example.com</link>
-<description>asdfasdfasdf.example.com</description>
-<language>de</language>
-<copyright>asdfasdfasdfasdf</copyright>
-<lastBuildDate>Tue, 11 Mar 2008 18:52:52 +0100</lastBuildDate>
-<docs>http://blogs.law.harvard.edu/tech/rss</docs>
-<ttl>10</ttl>
-<item>
-<title>The First Title</title>
-<link>http://www.example.com/index.html</link>
-<pubDate>Tue, 11 Mar 2008 18:24:43 +0100</pubDate>
-<content:encoded>
-<![CDATA[
-<p>
-askdlfjas;dfkjas;fkdj
-</p>
-]]>
-</content:encoded>
-<description>aklsjdhfasdjfahasdfhj</description>
-<guid>http://foo.example.com/asdfasdf</guid>
-</item>
-</channel>
-</rss>
diff --git a/toolkit/components/places/tests/chrome/rss_as_html.rss^headers^ b/toolkit/components/places/tests/chrome/rss_as_html.rss^headers^
deleted file mode 100644
index 04fbaa08fe..0000000000
--- a/toolkit/components/places/tests/chrome/rss_as_html.rss^headers^
+++ /dev/null
@@ -1,2 +0,0 @@
-HTTP 200 OK
-Content-Type: text/html
diff --git a/toolkit/components/places/tests/chrome/sample_feed.atom b/toolkit/components/places/tests/chrome/sample_feed.atom
deleted file mode 100644
index add75efb4d..0000000000
--- a/toolkit/components/places/tests/chrome/sample_feed.atom
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<feed xmlns="http://www.w3.org/2005/Atom">
-
- <title>Example Feed</title>
- <link href="http://example.org/"/>
- <updated>2003-12-13T18:30:02Z</updated>
-
- <author>
- <name>John Doe</name>
- </author>
- <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
-
- <entry>
-
- <title>Atom-Powered Robots Run Amok</title>
- <link href="http://example.org/2003/12/13/atom03"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
- <updated>2003-12-13T18:30:02Z</updated>
-
- <summary>Some text.</summary>
- </entry>
-
-</feed>
diff --git a/toolkit/components/places/tests/chrome/test_303567.xul b/toolkit/components/places/tests/chrome/test_303567.xul
deleted file mode 100644
index 37ae77cbbd..0000000000
--- a/toolkit/components/places/tests/chrome/test_303567.xul
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<window title="Add Bad Livemarks"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTest()">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <body xmlns="http://www.w3.org/1999/xhtml" />
-
-<script type="application/javascript">
-<![CDATA[
-// Test that for feeds with items that have no link:
-// * the link-less items are present in the database.
-// * the feed's site URI is substituted for each item's link.
-SimpleTest.waitForExplicitFinish();
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/NetUtil.jsm");
-Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
-
-const LIVEMARKS = [
- { feedURI: NetUtil.newURI("http://mochi.test:8888/tests/toolkit/components/places/tests/chrome/link-less-items.rss"),
- siteURI: NetUtil.newURI("http://mochi.test:8888/"),
- urls: [
- "http://feed-item-link.com/",
- "http://feed-link.com/",
- "http://feed-item-link.com/",
- ],
- message: "Ensure link-less livemark item picked up site uri.",
- },
- { feedURI: NetUtil.newURI("http://mochi.test:8888/tests/toolkit/components/places/tests/chrome/link-less-items-no-site-uri.rss"),
- siteURI: null,
- urls: [
- "http://feed-item-link.com/",
- "http://feed-item-link.com/",
- ],
- message: "Ensure livemark item links did not inherit site uri."
- },
-];
-
-function runTest()
-{
- let loadCount = 0;
-
- function testLivemark(aLivemarkData) {
- PlacesUtils.livemarks.addLivemark(
- { title: "foo"
- , parentGuid: PlacesUtils.bookmarks.toolbarGuid
- , feedURI: aLivemarkData.feedURI
- , siteURI: aLivemarkData.siteURI
- })
- .then(function (aLivemark) {
- is (aLivemark.feedURI.spec, aLivemarkData.feedURI.spec,
- "Get correct feedURI");
- if (aLivemarkData.siteURI) {
- is (aLivemark.siteURI.spec, aLivemarkData.siteURI.spec,
- "Get correct siteURI");
- }
- else {
- is (aLivemark.siteURI, null, "Get correct siteURI");
- }
-
- waitForLivemarkLoad(aLivemark, function (aLivemark) {
- let nodes = aLivemark.getNodesForContainer({});
- is(nodes.length, aLivemarkData.urls.length,
- "Ensure all the livemark items were created.");
- aLivemarkData.urls.forEach(function (aUrl, aIndex) {
- let node = nodes[aIndex];
- is(node.uri, aUrl, aLivemarkData.message);
- });
-
- PlacesUtils.livemarks.removeLivemark(aLivemark).then(() => {
- if (++loadCount == LIVEMARKS.length)
- SimpleTest.finish();
- });
- });
- }, function () {
- is(true, false, "Should not fail adding a livemark");
- }
- );
- }
-
- LIVEMARKS.forEach(testLivemark);
-}
-
-function waitForLivemarkLoad(aLivemark, aCallback) {
- // Don't need a real node here.
- let node = {};
- let resultObserver = {
- nodeInserted: function() {},
- nodeRemoved: function() {},
- nodeAnnotationChanged: function() {},
- nodeTitleChanged: function() {},
- nodeHistoryDetailsChanged: function() {},
- nodeMoved: function() {},
- ontainerStateChanged: function () {},
- sortingChanged: function() {},
- batching: function() {},
- invalidateContainer: function(node) {
- isnot(aLivemark.status, Ci.mozILivemark.STATUS_FAILED,
- "Loading livemark should success");
- if (aLivemark.status == Ci.mozILivemark.STATUS_READY) {
- aLivemark.unregisterForUpdates(node, resultObserver);
- aCallback(aLivemark);
- }
- }
- };
- aLivemark.registerForUpdates(node, resultObserver);
- aLivemark.reload();
-}
-
-]]>
-</script>
-</window>
diff --git a/toolkit/components/places/tests/chrome/test_341972a.xul b/toolkit/components/places/tests/chrome/test_341972a.xul
deleted file mode 100644
index 7c78136a9f..0000000000
--- a/toolkit/components/places/tests/chrome/test_341972a.xul
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<window title="Update Livemark SiteURI"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTest()">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <body xmlns="http://www.w3.org/1999/xhtml" />
-
-<script type="application/javascript">
-<![CDATA[
-/*
- Test updating livemark siteURI to the value from the feed
- */
-SimpleTest.waitForExplicitFinish();
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/NetUtil.jsm");
-Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
-
-function runTest() {
- const FEEDSPEC = "http://mochi.test:8888/tests/toolkit/components/places/tests/chrome/sample_feed.atom";
- const INITIALSITESPEC = "http://mochi.test:8888/";
- const FEEDSITESPEC = "http://example.org/";
-
- PlacesUtils.livemarks.addLivemark(
- { title: "foo"
- , parentGuid: PlacesUtils.bookmarks.toolbarGuid
- , feedURI: NetUtil.newURI(FEEDSPEC)
- , siteURI: NetUtil.newURI(INITIALSITESPEC)
- })
- .then(function (aLivemark) {
- is(aLivemark.siteURI.spec, INITIALSITESPEC,
- "Has correct initial livemark site URI");
-
- waitForLivemarkLoad(aLivemark, function (aLivemark) {
- is(aLivemark.siteURI.spec, FEEDSITESPEC,
- "livemark site URI set to value in feed");
-
- PlacesUtils.livemarks.removeLivemark(aLivemark).then(() => {
- SimpleTest.finish();
- });
- });
- }, function () {
- is(true, false, "Should not fail adding a livemark");
- }
- );
-}
-
-function waitForLivemarkLoad(aLivemark, aCallback) {
- // Don't need a real node here.
- let node = {};
- let resultObserver = {
- nodeInserted: function() {},
- nodeRemoved: function() {},
- nodeAnnotationChanged: function() {},
- nodeTitleChanged: function() {},
- nodeHistoryDetailsChanged: function() {},
- nodeMoved: function() {},
- ontainerStateChanged: function () {},
- sortingChanged: function() {},
- batching: function() {},
- invalidateContainer: function(node) {
- isnot(aLivemark.status, Ci.mozILivemark.STATUS_FAILED,
- "Loading livemark should success");
- if (aLivemark.status == Ci.mozILivemark.STATUS_READY) {
- aLivemark.unregisterForUpdates(node, resultObserver);
- aCallback(aLivemark);
- }
- }
- };
- aLivemark.registerForUpdates(node, resultObserver);
- aLivemark.reload();
-}
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/components/places/tests/chrome/test_341972b.xul b/toolkit/components/places/tests/chrome/test_341972b.xul
deleted file mode 100644
index 86cdc75f34..0000000000
--- a/toolkit/components/places/tests/chrome/test_341972b.xul
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<window title="Update Livemark SiteURI, null to start"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTest()">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <body xmlns="http://www.w3.org/1999/xhtml" />
-
-<script type="application/javascript">
-<![CDATA[
-/*
- Test updating livemark siteURI to the value from the feed, when it's null
- */
-SimpleTest.waitForExplicitFinish();
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/NetUtil.jsm");
-Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
-
-function runTest() {
- const FEEDSPEC = "http://mochi.test:8888/tests/toolkit/components/places/tests/chrome/sample_feed.atom";
- const FEEDSITESPEC = "http://example.org/";
-
- PlacesUtils.livemarks.addLivemark(
- { title: "foo"
- , parentGuid: PlacesUtils.bookmarks.toolbarGuid
- , feedURI: NetUtil.newURI(FEEDSPEC)
- })
- .then(function (aLivemark) {
- is(aLivemark.siteURI, null, "Has null livemark site URI");
-
- waitForLivemarkLoad(aLivemark, function (aLivemark) {
- is(aLivemark.siteURI.spec, FEEDSITESPEC,
- "livemark site URI set to value in feed");
-
- PlacesUtils.livemarks.removeLivemark(aLivemark).then(() => {
- SimpleTest.finish();
- });
- });
- }, function () {
- is(true, false, "Should not fail adding a livemark");
- }
- );
-}
-
-function waitForLivemarkLoad(aLivemark, aCallback) {
- // Don't need a real node here.
- let node = {};
- let resultObserver = {
- nodeInserted: function() {},
- nodeRemoved: function() {},
- nodeAnnotationChanged: function() {},
- nodeTitleChanged: function() {},
- nodeHistoryDetailsChanged: function() {},
- nodeMoved: function() {},
- ontainerStateChanged: function () {},
- sortingChanged: function() {},
- batching: function() {},
- invalidateContainer: function(node) {
- isnot(aLivemark.status, Ci.mozILivemark.STATUS_FAILED,
- "Loading livemark should success");
- if (aLivemark.status == Ci.mozILivemark.STATUS_READY) {
- aLivemark.unregisterForUpdates(node, resultObserver);
- aCallback(aLivemark);
- }
- }
- };
- aLivemark.registerForUpdates(node, resultObserver);
- aLivemark.reload();
-}
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/components/places/tests/chrome/test_342484.xul b/toolkit/components/places/tests/chrome/test_342484.xul
deleted file mode 100644
index 353313abb4..0000000000
--- a/toolkit/components/places/tests/chrome/test_342484.xul
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<window title="Add Bad Livemarks"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTest()">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <body xmlns="http://www.w3.org/1999/xhtml" />
-
-<script type="application/javascript">
-<![CDATA[
-/*
- Test loading feeds with items that aren't allowed
- */
-SimpleTest.waitForExplicitFinish();
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/NetUtil.jsm");
-Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
-
-function runTest() {
- const FEEDSPEC = "http://mochi.test:8888/tests/toolkit/components/places/tests/chrome/bad_links.atom";
- const GOOD_URLS = ["http://example.org/first", "http://example.org/last"];
-
- PlacesUtils.livemarks.addLivemark(
- { title: "foo"
- , parentGuid: PlacesUtils.bookmarks.toolbarGuid
- , feedURI: NetUtil.newURI(FEEDSPEC)
- , siteURI: NetUtil.newURI("http:/mochi.test/")
- })
- .then(function (aLivemark) {
- waitForLivemarkLoad(aLivemark, function (aLivemark) {
- let nodes = aLivemark.getNodesForContainer({});
-
- is(nodes.length, 2, "Created the two good livemark items");
- for (let i = 0; i < nodes.length; ++i) {
- let node = nodes[i];
- ok(GOOD_URLS.includes(node.uri), "livemark item created with bad uri " + node.uri);
- }
-
- PlacesUtils.livemarks.removeLivemark(aLivemark).then(() => {
- SimpleTest.finish();
- });
- });
- }, function () {
- is(true, false, "Should not fail adding a livemark");
- }
- );
-}
-
-function waitForLivemarkLoad(aLivemark, aCallback) {
- // Don't need a real node here.
- let node = {};
- let resultObserver = {
- nodeInserted: function() {},
- nodeRemoved: function() {},
- nodeAnnotationChanged: function() {},
- nodeTitleChanged: function() {},
- nodeHistoryDetailsChanged: function() {},
- nodeMoved: function() {},
- ontainerStateChanged: function () {},
- sortingChanged: function() {},
- batching: function() {},
- invalidateContainer: function(node) {
- isnot(aLivemark.status, Ci.mozILivemark.STATUS_FAILED,
- "Loading livemark should success");
- if (aLivemark.status == Ci.mozILivemark.STATUS_READY) {
- aLivemark.unregisterForUpdates(node, resultObserver);
- aCallback(aLivemark);
- }
- }
- };
- aLivemark.registerForUpdates(node, resultObserver);
- aLivemark.reload();
-}
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/components/places/tests/chrome/test_371798.xul b/toolkit/components/places/tests/chrome/test_371798.xul
deleted file mode 100644
index 241db75c3c..0000000000
--- a/toolkit/components/places/tests/chrome/test_371798.xul
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<window title="Bug 371798"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <body xmlns="http://www.w3.org/1999/xhtml" />
-
-<script type="application/javascript">
-<![CDATA[
-// Test the asynchronous live-updating of bookmarks query results
-SimpleTest.waitForExplicitFinish();
-
-var {utils: Cu, interfaces: Ci} = Components;
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/NetUtil.jsm");
-Cu.import("resource://gre/modules/Task.jsm");
-
-Cu.import("resource://gre/modules/PlacesUtils.jsm");
-
-const TEST_URI = NetUtil.newURI("http://foo.com");
-
-function promiseOnItemChanged() {
- return new Promise(resolve => {
- PlacesUtils.bookmarks.addObserver({
- onBeginUpdateBatch() {},
- onEndUpdateBatch() {},
- onItemAdded() {},
- onItemRemoved() {},
- onItemVisited() {},
- onItemMoved() {},
-
- onItemChanged() {
- PlacesUtils.bookmarks.removeObserver(this);
- resolve();
- },
-
- QueryInterface: XPCOMUtils.generateQI([Ci.nsINavBookmarkObserver])
- }, false);
- });
-}
-
-Task.spawn(function* () {
- // add 2 bookmarks to the toolbar, same URI, different titles (set later)
- let bm1 = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- url: TEST_URI
- });
-
- let bm2 = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- url: TEST_URI
- });
-
- // query for bookmarks
- let rootNode = PlacesUtils.getFolderContents(PlacesUtils.toolbarFolderId).root;
-
- // set up observer
- let promiseObserved = promiseOnItemChanged();
-
- // modify the bookmark's title
- yield PlacesUtils.bookmarks.update({
- guid: bm2.guid, title: "foo"
- });
-
- // wait for notification
- yield promiseObserved;
-
- // Continue after our observer gets notified of onItemChanged
- // which is triggered by updating the item's title.
- // After receiving the notification, our original query should also
- // have been live-updated, so we can iterate through its children,
- // to check that only the modified bookmark has changed.
-
- // result node should be updated
- let cc = rootNode.childCount;
- for (let i = 0; i < cc; ++i) {
- let node = rootNode.getChild(i);
- // test that bm1 does not have new title
- if (node.bookmarkGuid == bm1.guid)
- ok(node.title != "foo",
- "Changing a bookmark's title did not affect the title of other bookmarks with the same URI");
- }
- rootNode.containerOpen = false;
-
- // clean up
- yield PlacesUtils.bookmarks.remove(bm1);
- yield PlacesUtils.bookmarks.remove(bm2);
-}).catch(err => {
- ok(false, `uncaught error: ${err}`);
-}).then(() => {
- SimpleTest.finish();
-});
-]]>
-</script>
-
-</window>
diff --git a/toolkit/components/places/tests/chrome/test_381357.xul b/toolkit/components/places/tests/chrome/test_381357.xul
deleted file mode 100644
index 6bd6cb0245..0000000000
--- a/toolkit/components/places/tests/chrome/test_381357.xul
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<window title="Add Livemarks from RSS feed served as text/html"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTest()">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <body xmlns="http://www.w3.org/1999/xhtml" />
-
-<script type="application/javascript">
-<![CDATA[
-/*
- Test loading feeds with text/html
- */
-SimpleTest.waitForExplicitFinish();
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/NetUtil.jsm");
-Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
-
-function runTest() {
- const FEEDSPEC = "http://mochi.test:8888/tests/toolkit/components/places/tests/chrome/rss_as_html.rss";
-
- PlacesUtils.livemarks.addLivemark(
- { title: "foo"
- , parentGuid: PlacesUtils.bookmarks.toolbarGuid
- , feedURI: NetUtil.newURI(FEEDSPEC)
- , siteURI: NetUtil.newURI("http:/mochi.test/")
- })
- .then(function (aLivemark) {
- waitForLivemarkLoad(aLivemark, function (aLivemark) {
- let nodes = aLivemark.getNodesForContainer({});
-
- is(nodes[0].title, "The First Title",
- "livemark site URI set to value in feed");
-
- PlacesUtils.livemarks.removeLivemark(aLivemark).then(() => {
- SimpleTest.finish();
- });
- });
- }, function () {
- is(true, false, "Should not fail adding a livemark");
- SimpleTest.finish();
- }
- );
-}
-
-function waitForLivemarkLoad(aLivemark, aCallback) {
- // Don't need a real node here.
- let node = {};
- let resultObserver = {
- nodeInserted: function() {},
- nodeRemoved: function() {},
- nodeAnnotationChanged: function() {},
- nodeTitleChanged: function() {},
- nodeHistoryDetailsChanged: function() {},
- nodeMoved: function() {},
- ontainerStateChanged: function () {},
- sortingChanged: function() {},
- batching: function() {},
- invalidateContainer: function(node) {
- isnot(aLivemark.status, Ci.mozILivemark.STATUS_FAILED,
- "Loading livemark should success");
- if (aLivemark.status == Ci.mozILivemark.STATUS_READY) {
- aLivemark.unregisterForUpdates(node, resultObserver);
- aCallback(aLivemark);
- }
- }
- };
- aLivemark.registerForUpdates(node, resultObserver);
- aLivemark.reload();
-}
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/components/places/tests/chrome/test_browser_disableglobalhistory.xul b/toolkit/components/places/tests/chrome/test_browser_disableglobalhistory.xul
deleted file mode 100644
index 3a84f30303..0000000000
--- a/toolkit/components/places/tests/chrome/test_browser_disableglobalhistory.xul
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-
-<window title="Test disableglobalhistory attribute on remote browsers"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml">
- </body>
-
- <script type="text/javascript;version=1.7">
- SimpleTest.waitForExplicitFinish();
-
- let w = window.open('browser_disableglobalhistory.xul', '_blank', 'chrome,resizable=yes,width=400,height=600');
-
- function done() {
- w.close();
- SimpleTest.finish();
- }
- </script>
-
-</window> \ No newline at end of file
diff --git a/toolkit/components/places/tests/chrome/test_favicon_annotations.xul b/toolkit/components/places/tests/chrome/test_favicon_annotations.xul
deleted file mode 100644
index b7647cbc68..0000000000
--- a/toolkit/components/places/tests/chrome/test_favicon_annotations.xul
+++ /dev/null
@@ -1,168 +0,0 @@
-<?xml version="1.0"?>
-<!-- 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 file tests the moz-anno protocol, which was added in Bug 316077 and how
- * it loads favicons.
--->
-
-<window title="Favicon Annotation Protocol Test"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="test();">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
- <script type="application/javascript">
- <![CDATA[
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-
-let fs = Cc["@mozilla.org/browser/favicon-service;1"].
- getService(Ci.nsIFaviconService);
-
-// Test descriptions that will be printed in the case of failure.
-let testDescriptions = [
- "moz-anno URI with no data in the database loads default icon",
- "URI added to the database is properly loaded",
-];
-
-// URIs to load (will be compared with expectedURIs of the same index).
-let testURIs = [
- "http://mozilla.org/2009/made-up-favicon/places-rocks/",
- "http://mozilla.org/should-be-barney/",
-];
-
-// URIs to load for expected results.
-let expectedURIs = [
- fs.defaultFavicon.spec,
- "data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%04gAMA%00%00%AF%C87%05%8A%E9%00%00%00%19tEXtSoftware%00Adobe%20ImageReadyq%C9e%3C%00%00%01%D6IDATx%DAb%FC%FF%FF%3F%03%25%00%20%80%98%909%EF%DF%BFg%EF%EC%EC%FC%AD%AC%AC%FC%DF%95%91%F1%BF%89%89%C9%7F%20%FF%D7%EA%D5%AB%B7%DF%BBwO%16%9B%01%00%01%C4%00r%01%08%9F9s%C6%CD%D8%D8%F8%BF%0B%03%C3%FF3%40%BC%0A%88%EF%02q%1A%10%BB%40%F1%AAU%ABv%C1%D4%C30%40%00%81%89%993g%3E%06%1A%F6%3F%14%AA%11D%97%03%F1%7Fc%08%0D%E2%2B))%FD%17%04%89%A1%19%00%10%40%0C%D00%F8%0F3%00%C8%F8%BF%1B%E4%0Ac%88a%E5%60%17%19%FF%0F%0D%0D%05%1B%02v%D9%DD%BB%0A0%03%00%02%08%AC%B9%A3%A3%E3%17%03%D4v%90%01%EF%18%106%C3%0Cz%07%C5%BB%A1%DE%82y%07%20%80%A0%A6%08B%FCn%0C1%60%26%D4%20d%C3VA%C3%06%26%BE%0A%EA-%80%00%82%B9%E0%F7L4%0D%EF%90%F8%C6%60%2F%0A%82%BD%01%13%07%0700%D0%01%02%88%11%E4%02P%B41%DC%BB%C7%D0%014%0D%E8l%06W%20%06%BA%88%A1%1C%1AS%15%40%7C%16%CA6.%2Fgx%BFg%0F%83%CB%D9%B3%0C%7B%80%7C%80%00%02%BB%00%E8%9F%ED%20%1B%3A%A0%A6%9F%81%DA%DC%01%C5%B0%80%ED%80%FA%BF%BC%BC%FC%3F%83%12%90%9D%96%F6%1F%20%80%18%DE%BD%7B%C7%0E%8E%05AD%20%FEGr%A6%A0%A0%E0%7F%25P%80%02%9D%0F%D28%13%18%23%C6%C0%B0%02E%3D%C8%F5%00%01%04%8F%05P%A8%BA%40my%87%E4%12c%A8%8D%20%8B%D0%D3%00%08%03%04%10%9C%01R%E4%82d%3B%C8%A0%99%C6%90%90%C6%A5%19%84%01%02%08%9E%17%80%C9x%F7%7B%A0%DBVC%F9%A0%C0%5C%7D%16%2C%CE%00%F4%C6O%5C%99%09%20%800L%04y%A5%03%1A%95%A0%80%05%05%14.%DBA%18%20%80%18)%CD%CE%00%01%06%00%0C'%94%C7%C0k%C9%2C%00%00%00%00IEND%AEB%60%82",
-];
-
-
-/**
- * The event listener placed on our test windows used to determine when it is
- * safe to compare the two windows.
- */
-let _results = [];
-function loadEventHandler()
-{
- _results.push(snapshotWindow(window));
-
- loadNextTest();
-}
-
-/**
- * This runs the comparison.
- */
-function compareResults(aIndex, aImage1, aImage2)
-{
- let [correct, data1, data2] = compareSnapshots(aImage1, aImage2, true);
- SimpleTest.ok(correct,
- "Test '" + testDescriptions[aIndex] + "' matches expectations. " +
- "Data from window 1 is '" + data1 + "'. " +
- "Data from window 2 is '" + data2 + "'");
-}
-
-/**
- * Loads the next set of URIs to compare against.
- */
-let _counter = -1;
-function loadNextTest()
-{
- _counter++;
- // If we have no more tests, finish.
- if (_counter / 2 == testDescriptions.length) {
- for (let i = 0; i < _results.length; i = i + 2)
- compareResults(i / 2, _results[i], _results[i + 1]);
-
- SimpleTest.finish();
- return;
- }
-
- let nextURI = function() {
- let index = Math.floor(_counter / 2);
- if ((_counter % 2) == 0)
- return "moz-anno:favicon:" + testURIs[index];
- return expectedURIs[index];
- }
-
- let img = document.getElementById("favicon");
- img.setAttribute("src", nextURI());
-}
-
-function test()
-{
- SimpleTest.waitForExplicitFinish();
- let db = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsPIPlacesDatabase).
- DBConnection;
-
- // Empty any old favicons
- db.executeSimpleSQL("DELETE FROM moz_favicons");
-
- let ios = Cc["@mozilla.org/network/io-service;1"].
- getService(Ci.nsIIOService);
- let uri = function(aSpec) {
- return ios.newURI(aSpec, null, null);
- };
-
- let pageURI = uri("http://example.com/favicon_annotations");
- let history = Cc["@mozilla.org/browser/history;1"]
- .getService(Ci.mozIAsyncHistory);
- history.updatePlaces(
- {
- uri: pageURI,
- visits: [{ transitionType: Ci.nsINavHistoryService.TRANSITION_TYPED,
- visitDate: Date.now() * 1000
- }],
- },
- {
- handleError: function UP_handleError() {
- ok(false, "Unexpected error in adding visit.");
- },
- handleResult: function () {},
- handleCompletion: function UP_handleCompletion() {
- // Set the favicon data. Note that the "moz-anno:" protocol requires
- // the favicon to be stored in the database, but the
- // replaceFaviconDataFromDataURL function will not save the favicon
- // unless it is associated with a page. Thus, we must associate the
- // icon with a page explicitly in order for it to be visible through
- // the protocol.
- var systemPrincipal = Cc["@mozilla.org/systemprincipal;1"]
- .createInstance(Ci.nsIPrincipal);
-
- fs.replaceFaviconDataFromDataURL(uri(testURIs[1]), expectedURIs[1],
- (Date.now() + 60 * 60 * 24 * 1000) * 1000,
- systemPrincipal);
-
- fs.setAndFetchFaviconForPage(pageURI, uri(testURIs[1]), true,
- fs.FAVICON_LOAD_NON_PRIVATE,
- null, systemPrincipal);
-
- // And start our test process.
- loadNextTest();
- }
- }
- );
-
-
-}
-
- ]]>
- </script>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <img id="favicon" onload="loadEventHandler();"/>
- <p id="display"></p>
- <div id="content" style="display:none;"></div>
- <pre id="test"></pre>
- </body>
-</window>
diff --git a/toolkit/components/places/tests/chrome/test_reloadLivemarks.xul b/toolkit/components/places/tests/chrome/test_reloadLivemarks.xul
deleted file mode 100644
index 43772d09f4..0000000000
--- a/toolkit/components/places/tests/chrome/test_reloadLivemarks.xul
+++ /dev/null
@@ -1,155 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<window title="Reload Livemarks"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTest()" onunload="cleanup()">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <body xmlns="http://www.w3.org/1999/xhtml" />
-
-<script type="application/javascript">
-<![CDATA[
-// Test that for concurrent reload of livemarks.
-
-SimpleTest.waitForExplicitFinish();
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/NetUtil.jsm");
-Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
-
-let gLivemarks = [
- { id: -1,
- title: "foo",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- feedURI: NetUtil.newURI("http://mochi.test:8888/tests/toolkit/components/places/tests/chrome/link-less-items.rss")
- },
- { id: -1,
- title: "bar",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- feedURI: NetUtil.newURI("http://mochi.test:8888/tests/toolkit/components/places/tests/chrome/link-less-items-no-site-uri.rss")
- },
-];
-
-function runTest()
-{
- addLivemarks(function () {
- reloadLivemarks(false, function () {
- reloadLivemarks(true, function () {
- removeLivemarks(SimpleTest.finish);
- });
- });
- // Ensure this normal reload doesn't overwrite the forced one.
- PlacesUtils.livemarks.reloadLivemarks();
- });
-}
-
-function addLivemarks(aCallback) {
- info("Adding livemarks");
- let count = gLivemarks.length;
- gLivemarks.forEach(function(aLivemarkData) {
- PlacesUtils.livemarks.addLivemark(aLivemarkData)
- .then(function (aLivemark) {
- ok(aLivemark.feedURI.equals(aLivemarkData.feedURI), "Livemark added");
- aLivemarkData.id = aLivemark.id;
- if (--count == 0) {
- aCallback();
- }
- },
- function () {
- is(true, false, "Should not fail adding a livemark.");
- aCallback();
- });
- });
-}
-
-function reloadLivemarks(aForceUpdate, aCallback) {
- info("Reloading livemarks with forceUpdate: " + aForceUpdate);
- let count = gLivemarks.length;
- gLivemarks.forEach(function(aLivemarkData) {
- PlacesUtils.livemarks.getLivemark(aLivemarkData)
- .then(aLivemark => {
- ok(aLivemark.feedURI.equals(aLivemarkData.feedURI), "Livemark found");
- aLivemarkData._observer = new resultObserver(aLivemark, function() {
- if (++count == gLivemarks.length) {
- aCallback();
- }
- });
- if (--count == 0) {
- PlacesUtils.livemarks.reloadLivemarks(aForceUpdate);
- }
- },
- function() {
- is(true, false, "Should not fail getting a livemark.");
- aCallback();
- }
- );
- });
-}
-
-function removeLivemarks(aCallback) {
- info("Removing livemarks");
- let count = gLivemarks.length;
- gLivemarks.forEach(function(aLivemarkData) {
- PlacesUtils.livemarks.removeLivemark(aLivemarkData).then(
- function (aLivemark) {
- if (--count == 0) {
- aCallback();
- }
- },
- function() {
- is(true, false, "Should not fail adding a livemark.");
- aCallback();
- }
- );
- });
-}
-
-function resultObserver(aLivemark, aCallback) {
- this._node = {};
- this._livemark = aLivemark;
- this._callback = aCallback;
- this._livemark.registerForUpdates(this._node, this);
-}
-resultObserver.prototype = {
- nodeInserted: function() {},
- nodeRemoved: function() {},
- nodeAnnotationChanged: function() {},
- nodeTitleChanged: function() {},
- nodeHistoryDetailsChanged: function() {},
- nodeMoved: function() {},
- ontainerStateChanged: function () {},
- sortingChanged: function() {},
- batching: function() {},
- invalidateContainer: function(aContainer) {
- // Wait for load finish.
- if (this._livemark.status == Ci.mozILivemark.STATUS_LOADING)
- return;
-
- this._terminate();
- this._callback();
- },
- _terminate: function () {
- if (!this._terminated) {
- this._livemark.unregisterForUpdates(this._node);
- this._terminated = true;
- }
- }
-};
-
-function cleanup() {
- gLivemarks.forEach(function(aLivemarkData) {
- if (aLivemarkData._observer)
- aLivemarkData._observer._terminate();
- });
-}
-]]>
-</script>
-</window>
diff --git a/toolkit/components/places/tests/cpp/mock_Link.h b/toolkit/components/places/tests/cpp/mock_Link.h
deleted file mode 100644
index 92ef25d6a1..0000000000
--- a/toolkit/components/places/tests/cpp/mock_Link.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
- * 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 is a mock Link object which can be used in tests.
- */
-
-#ifndef mock_Link_h__
-#define mock_Link_h__
-
-#include "mozilla/MemoryReporting.h"
-#include "mozilla/dom/Link.h"
-#include "mozilla/dom/URLSearchParams.h"
-
-class mock_Link : public mozilla::dom::Link
-{
-public:
- NS_DECL_ISUPPORTS
-
- explicit mock_Link(void (*aHandlerFunction)(nsLinkState),
- bool aRunNextTest = true)
- : mozilla::dom::Link(nullptr)
- , mHandler(aHandlerFunction)
- , mRunNextTest(aRunNextTest)
- {
- // Create a cyclic ownership, so that the link will be released only
- // after its status has been updated. This will ensure that, when it should
- // run the next test, it will happen at the end of the test function, if
- // the link status has already been set before. Indeed the link status is
- // updated on a separate connection, thus may happen at any time.
- mDeathGrip = this;
- }
-
- virtual void SetLinkState(nsLinkState aState) override
- {
- // Notify our callback function.
- mHandler(aState);
-
- // Break the cycle so the object can be destroyed.
- mDeathGrip = nullptr;
- }
-
- virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override
- {
- return 0; // the value shouldn't matter
- }
-
-protected:
- ~mock_Link() {
- // Run the next test if we are supposed to.
- if (mRunNextTest) {
- run_next_test();
- }
- }
-
-private:
- void (*mHandler)(nsLinkState);
- bool mRunNextTest;
- RefPtr<Link> mDeathGrip;
-};
-
-NS_IMPL_ISUPPORTS(
- mock_Link,
- mozilla::dom::Link
-)
-
-////////////////////////////////////////////////////////////////////////////////
-//// Needed Link Methods
-
-namespace mozilla {
-namespace dom {
-
-Link::Link(Element* aElement)
-: mElement(aElement)
-, mLinkState(eLinkState_NotLink)
-, mRegistered(false)
-{
-}
-
-Link::~Link()
-{
-}
-
-bool
-Link::ElementHasHref() const
-{
- NS_NOTREACHED("Unexpected call to Link::ElementHasHref");
- return false; // suppress compiler warning
-}
-
-void
-Link::SetLinkState(nsLinkState aState)
-{
- NS_NOTREACHED("Unexpected call to Link::SetLinkState");
-}
-
-void
-Link::ResetLinkState(bool aNotify, bool aHasHref)
-{
- NS_NOTREACHED("Unexpected call to Link::ResetLinkState");
-}
-
-nsIURI*
-Link::GetURI() const
-{
- NS_NOTREACHED("Unexpected call to Link::GetURI");
- return nullptr; // suppress compiler warning
-}
-
-size_t
-Link::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
-{
- NS_NOTREACHED("Unexpected call to Link::SizeOfExcludingThis");
- return 0;
-}
-
-NS_IMPL_CYCLE_COLLECTION_CLASS(URLSearchParams)
-NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(URLSearchParams)
-NS_IMPL_CYCLE_COLLECTION_UNLINK_END
-NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(URLSearchParams)
-NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
-NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCACHE(URLSearchParams)
-
-NS_IMPL_CYCLE_COLLECTING_ADDREF(URLSearchParams)
-NS_IMPL_CYCLE_COLLECTING_RELEASE(URLSearchParams)
-
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(URLSearchParams)
- NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
- NS_INTERFACE_MAP_ENTRY(nsISupports)
-NS_INTERFACE_MAP_END
-
-
-URLSearchParams::URLSearchParams(nsISupports* aParent,
- URLSearchParamsObserver* aObserver)
-{
-}
-
-URLSearchParams::~URLSearchParams()
-{
-}
-
-JSObject*
-URLSearchParams::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
-{
- return nullptr;
-}
-
-void
-URLSearchParams::ParseInput(const nsACString& aInput)
-{
- NS_NOTREACHED("Unexpected call to URLSearchParams::ParseInput");
-}
-
-void
-URLSearchParams::Serialize(nsAString& aValue) const
-{
- NS_NOTREACHED("Unexpected call to URLSearchParams::Serialize");
-}
-
-void
-URLSearchParams::Get(const nsAString& aName, nsString& aRetval)
-{
- NS_NOTREACHED("Unexpected call to URLSearchParams::Get");
-}
-
-void
-URLSearchParams::GetAll(const nsAString& aName, nsTArray<nsString >& aRetval)
-{
- NS_NOTREACHED("Unexpected call to URLSearchParams::GetAll");
-}
-
-void
-URLSearchParams::Set(const nsAString& aName, const nsAString& aValue)
-{
- NS_NOTREACHED("Unexpected call to URLSearchParams::Set");
-}
-
-void
-URLSearchParams::Append(const nsAString& aName, const nsAString& aValue)
-{
- NS_NOTREACHED("Unexpected call to URLSearchParams::Append");
-}
-
-void
-URLSearchParams::AppendInternal(const nsAString& aName, const nsAString& aValue)
-{
- NS_NOTREACHED("Unexpected call to URLSearchParams::AppendInternal");
-}
-
-bool
-URLSearchParams::Has(const nsAString& aName)
-{
- NS_NOTREACHED("Unexpected call to URLSearchParams::Has");
- return false;
-}
-
-void
-URLSearchParams::Delete(const nsAString& aName)
-{
- NS_NOTREACHED("Unexpected call to URLSearchParams::Delete");
-}
-
-void
-URLSearchParams::DeleteAll()
-{
- NS_NOTREACHED("Unexpected call to URLSearchParams::DeleteAll");
-}
-
-void
-URLSearchParams::NotifyObserver()
-{
- NS_NOTREACHED("Unexpected call to URLSearchParams::NotifyObserver");
-}
-
-NS_IMETHODIMP
-URLSearchParams::GetSendInfo(nsIInputStream** aBody, uint64_t* aContentLength,
- nsACString& aContentType, nsACString& aCharset)
-{
- NS_NOTREACHED("Unexpected call to URLSearchParams::GetSendInfo");
- return NS_OK;
-}
-
-} // namespace dom
-} // namespace mozilla
-
-#endif // mock_Link_h__
diff --git a/toolkit/components/places/tests/cpp/moz.build b/toolkit/components/places/tests/cpp/moz.build
deleted file mode 100644
index f6bd91bd73..0000000000
--- a/toolkit/components/places/tests/cpp/moz.build
+++ /dev/null
@@ -1,14 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-GeckoCppUnitTests([
- 'test_IHistory',
-])
-
-if CONFIG['JS_SHARED_LIBRARY']:
- USE_LIBS += [
- 'js',
- ]
diff --git a/toolkit/components/places/tests/cpp/places_test_harness.h b/toolkit/components/places/tests/cpp/places_test_harness.h
deleted file mode 100644
index 557a25f901..0000000000
--- a/toolkit/components/places/tests/cpp/places_test_harness.h
+++ /dev/null
@@ -1,413 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "TestHarness.h"
-#include "nsMemory.h"
-#include "nsThreadUtils.h"
-#include "nsDocShellCID.h"
-
-#include "nsToolkitCompsCID.h"
-#include "nsINavHistoryService.h"
-#include "nsIObserverService.h"
-#include "nsIURI.h"
-#include "mozilla/IHistory.h"
-#include "mozIStorageConnection.h"
-#include "mozIStorageStatement.h"
-#include "mozIStorageAsyncStatement.h"
-#include "mozIStorageStatementCallback.h"
-#include "mozIStoragePendingStatement.h"
-#include "nsPIPlacesDatabase.h"
-#include "nsIObserver.h"
-#include "prinrval.h"
-#include "prtime.h"
-#include "mozilla/Attributes.h"
-
-#define WAITFORTOPIC_TIMEOUT_SECONDS 5
-
-
-static size_t gTotalTests = 0;
-static size_t gPassedTests = 0;
-
-#define do_check_true(aCondition) \
- PR_BEGIN_MACRO \
- gTotalTests++; \
- if (aCondition) { \
- gPassedTests++; \
- } else { \
- fail("%s | Expected true, got false at line %d", __FILE__, __LINE__); \
- } \
- PR_END_MACRO
-
-#define do_check_false(aCondition) \
- PR_BEGIN_MACRO \
- gTotalTests++; \
- if (!aCondition) { \
- gPassedTests++; \
- } else { \
- fail("%s | Expected false, got true at line %d", __FILE__, __LINE__); \
- } \
- PR_END_MACRO
-
-#define do_check_success(aResult) \
- do_check_true(NS_SUCCEEDED(aResult))
-
-#ifdef LINUX
-// XXX Linux opt builds on tinderbox are orange due to linking with stdlib.
-// This is sad and annoying, but it's a workaround that works.
-#define do_check_eq(aExpected, aActual) \
- do_check_true(aExpected == aActual)
-#else
-#include <sstream>
-
-#define do_check_eq(aActual, aExpected) \
- PR_BEGIN_MACRO \
- gTotalTests++; \
- if (aExpected == aActual) { \
- gPassedTests++; \
- } else { \
- std::ostringstream temp; \
- temp << __FILE__ << " | Expected '" << aExpected << "', got '"; \
- temp << aActual <<"' at line " << __LINE__; \
- fail(temp.str().c_str()); \
- } \
- PR_END_MACRO
-#endif
-
-struct Test
-{
- void (*func)(void);
- const char* const name;
-};
-#define TEST(aName) \
- {aName, #aName}
-
-/**
- * Runs the next text.
- */
-void run_next_test();
-
-/**
- * To be used around asynchronous work.
- */
-void do_test_pending();
-void do_test_finished();
-
-/**
- * Spins current thread until a topic is received.
- */
-class WaitForTopicSpinner final : public nsIObserver
-{
-public:
- NS_DECL_ISUPPORTS
-
- explicit WaitForTopicSpinner(const char* const aTopic)
- : mTopicReceived(false)
- , mStartTime(PR_IntervalNow())
- {
- nsCOMPtr<nsIObserverService> observerService =
- do_GetService(NS_OBSERVERSERVICE_CONTRACTID);
- do_check_true(observerService);
- (void)observerService->AddObserver(this, aTopic, false);
- }
-
- void Spin() {
- while (!mTopicReceived) {
- if ((PR_IntervalNow() - mStartTime) > (WAITFORTOPIC_TIMEOUT_SECONDS * PR_USEC_PER_SEC)) {
- // Timed out waiting for the topic.
- do_check_true(false);
- break;
- }
- (void)NS_ProcessNextEvent();
- }
- }
-
- NS_IMETHOD Observe(nsISupports* aSubject,
- const char* aTopic,
- const char16_t* aData) override
- {
- mTopicReceived = true;
- nsCOMPtr<nsIObserverService> observerService =
- do_GetService(NS_OBSERVERSERVICE_CONTRACTID);
- do_check_true(observerService);
- (void)observerService->RemoveObserver(this, aTopic);
- return NS_OK;
- }
-
-private:
- ~WaitForTopicSpinner() {}
-
- bool mTopicReceived;
- PRIntervalTime mStartTime;
-};
-NS_IMPL_ISUPPORTS(
- WaitForTopicSpinner,
- nsIObserver
-)
-
-/**
- * Spins current thread until an async statement is executed.
- */
-class AsyncStatementSpinner final : public mozIStorageStatementCallback
-{
-public:
- NS_DECL_ISUPPORTS
- NS_DECL_MOZISTORAGESTATEMENTCALLBACK
-
- AsyncStatementSpinner();
- void SpinUntilCompleted();
- uint16_t completionReason;
-
-protected:
- ~AsyncStatementSpinner() {}
-
- volatile bool mCompleted;
-};
-
-NS_IMPL_ISUPPORTS(AsyncStatementSpinner,
- mozIStorageStatementCallback)
-
-AsyncStatementSpinner::AsyncStatementSpinner()
-: completionReason(0)
-, mCompleted(false)
-{
-}
-
-NS_IMETHODIMP
-AsyncStatementSpinner::HandleResult(mozIStorageResultSet *aResultSet)
-{
- return NS_OK;
-}
-
-NS_IMETHODIMP
-AsyncStatementSpinner::HandleError(mozIStorageError *aError)
-{
- return NS_OK;
-}
-
-NS_IMETHODIMP
-AsyncStatementSpinner::HandleCompletion(uint16_t aReason)
-{
- completionReason = aReason;
- mCompleted = true;
- return NS_OK;
-}
-
-void AsyncStatementSpinner::SpinUntilCompleted()
-{
- nsCOMPtr<nsIThread> thread(::do_GetCurrentThread());
- nsresult rv = NS_OK;
- bool processed = true;
- while (!mCompleted && NS_SUCCEEDED(rv)) {
- rv = thread->ProcessNextEvent(true, &processed);
- }
-}
-
-struct PlaceRecord
-{
- int64_t id;
- int32_t hidden;
- int32_t typed;
- int32_t visitCount;
- nsCString guid;
-};
-
-struct VisitRecord
-{
- int64_t id;
- int64_t lastVisitId;
- int32_t transitionType;
-};
-
-already_AddRefed<mozilla::IHistory>
-do_get_IHistory()
-{
- nsCOMPtr<mozilla::IHistory> history = do_GetService(NS_IHISTORY_CONTRACTID);
- do_check_true(history);
- return history.forget();
-}
-
-already_AddRefed<nsINavHistoryService>
-do_get_NavHistory()
-{
- nsCOMPtr<nsINavHistoryService> serv =
- do_GetService(NS_NAVHISTORYSERVICE_CONTRACTID);
- do_check_true(serv);
- return serv.forget();
-}
-
-already_AddRefed<mozIStorageConnection>
-do_get_db()
-{
- nsCOMPtr<nsINavHistoryService> history = do_get_NavHistory();
- nsCOMPtr<nsPIPlacesDatabase> database = do_QueryInterface(history);
- do_check_true(database);
-
- nsCOMPtr<mozIStorageConnection> dbConn;
- nsresult rv = database->GetDBConnection(getter_AddRefs(dbConn));
- do_check_success(rv);
- return dbConn.forget();
-}
-
-/**
- * Get the place record from the database.
- *
- * @param aURI The unique URI of the place we are looking up
- * @param result Out parameter where the result is stored
- */
-void
-do_get_place(nsIURI* aURI, PlaceRecord& result)
-{
- nsCOMPtr<mozIStorageConnection> dbConn = do_get_db();
- nsCOMPtr<mozIStorageStatement> stmt;
-
- nsCString spec;
- nsresult rv = aURI->GetSpec(spec);
- do_check_success(rv);
-
- rv = dbConn->CreateStatement(NS_LITERAL_CSTRING(
- "SELECT id, hidden, typed, visit_count, guid FROM moz_places "
- "WHERE url_hash = hash(?1) AND url = ?1"
- ), getter_AddRefs(stmt));
- do_check_success(rv);
-
- rv = stmt->BindUTF8StringByIndex(0, spec);
- do_check_success(rv);
-
- bool hasResults;
- rv = stmt->ExecuteStep(&hasResults);
- do_check_success(rv);
- if (!hasResults) {
- result.id = 0;
- return;
- }
-
- rv = stmt->GetInt64(0, &result.id);
- do_check_success(rv);
- rv = stmt->GetInt32(1, &result.hidden);
- do_check_success(rv);
- rv = stmt->GetInt32(2, &result.typed);
- do_check_success(rv);
- rv = stmt->GetInt32(3, &result.visitCount);
- do_check_success(rv);
- rv = stmt->GetUTF8String(4, result.guid);
- do_check_success(rv);
-}
-
-/**
- * Gets the most recent visit to a place.
- *
- * @param placeID ID from the moz_places table
- * @param result Out parameter where visit is stored
- */
-void
-do_get_lastVisit(int64_t placeId, VisitRecord& result)
-{
- nsCOMPtr<mozIStorageConnection> dbConn = do_get_db();
- nsCOMPtr<mozIStorageStatement> stmt;
-
- nsresult rv = dbConn->CreateStatement(NS_LITERAL_CSTRING(
- "SELECT id, from_visit, visit_type FROM moz_historyvisits "
- "WHERE place_id=?1 "
- "LIMIT 1"
- ), getter_AddRefs(stmt));
- do_check_success(rv);
-
- rv = stmt->BindInt64ByIndex(0, placeId);
- do_check_success(rv);
-
- bool hasResults;
- rv = stmt->ExecuteStep(&hasResults);
- do_check_success(rv);
-
- if (!hasResults) {
- result.id = 0;
- return;
- }
-
- rv = stmt->GetInt64(0, &result.id);
- do_check_success(rv);
- rv = stmt->GetInt64(1, &result.lastVisitId);
- do_check_success(rv);
- rv = stmt->GetInt32(2, &result.transitionType);
- do_check_success(rv);
-}
-
-void
-do_wait_async_updates() {
- nsCOMPtr<mozIStorageConnection> db = do_get_db();
- nsCOMPtr<mozIStorageAsyncStatement> stmt;
-
- db->CreateAsyncStatement(NS_LITERAL_CSTRING("BEGIN EXCLUSIVE"),
- getter_AddRefs(stmt));
- nsCOMPtr<mozIStoragePendingStatement> pending;
- (void)stmt->ExecuteAsync(nullptr, getter_AddRefs(pending));
-
- db->CreateAsyncStatement(NS_LITERAL_CSTRING("COMMIT"),
- getter_AddRefs(stmt));
- RefPtr<AsyncStatementSpinner> spinner = new AsyncStatementSpinner();
- (void)stmt->ExecuteAsync(spinner, getter_AddRefs(pending));
-
- spinner->SpinUntilCompleted();
-}
-
-/**
- * Adds a URI to the database.
- *
- * @param aURI
- * The URI to add to the database.
- */
-void
-addURI(nsIURI* aURI)
-{
- nsCOMPtr<mozilla::IHistory> history = do_GetService(NS_IHISTORY_CONTRACTID);
- do_check_true(history);
- nsresult rv = history->VisitURI(aURI, nullptr, mozilla::IHistory::TOP_LEVEL);
- do_check_success(rv);
-
- do_wait_async_updates();
-}
-
-static const char TOPIC_PROFILE_CHANGE[] = "profile-before-change";
-static const char TOPIC_PLACES_CONNECTION_CLOSED[] = "places-connection-closed";
-
-class WaitForConnectionClosed final : public nsIObserver
-{
- RefPtr<WaitForTopicSpinner> mSpinner;
-
- ~WaitForConnectionClosed() {}
-
-public:
- NS_DECL_ISUPPORTS
-
- WaitForConnectionClosed()
- {
- nsCOMPtr<nsIObserverService> os =
- do_GetService(NS_OBSERVERSERVICE_CONTRACTID);
- MOZ_ASSERT(os);
- if (os) {
- MOZ_ALWAYS_SUCCEEDS(os->AddObserver(this, TOPIC_PROFILE_CHANGE, false));
- }
- mSpinner = new WaitForTopicSpinner(TOPIC_PLACES_CONNECTION_CLOSED);
- }
-
- NS_IMETHOD Observe(nsISupports* aSubject,
- const char* aTopic,
- const char16_t* aData) override
- {
- nsCOMPtr<nsIObserverService> os =
- do_GetService(NS_OBSERVERSERVICE_CONTRACTID);
- MOZ_ASSERT(os);
- if (os) {
- MOZ_ALWAYS_SUCCEEDS(os->RemoveObserver(this, aTopic));
- }
-
- mSpinner->Spin();
-
- return NS_OK;
- }
-};
-
-NS_IMPL_ISUPPORTS(WaitForConnectionClosed, nsIObserver)
diff --git a/toolkit/components/places/tests/cpp/places_test_harness_tail.h b/toolkit/components/places/tests/cpp/places_test_harness_tail.h
deleted file mode 100644
index 9e57c37244..0000000000
--- a/toolkit/components/places/tests/cpp/places_test_harness_tail.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsWidgetsCID.h"
-#include "nsIComponentRegistrar.h"
-
-#ifndef TEST_NAME
-#error "Must #define TEST_NAME before including places_test_harness_tail.h"
-#endif
-
-#ifndef TEST_FILE
-#error "Must #define TEST_FILE before include places_test_harness_tail.h"
-#endif
-
-int gTestsIndex = 0;
-
-#define TEST_INFO_STR "TEST-INFO | (%s) | "
-
-class RunNextTest : public mozilla::Runnable
-{
-public:
- NS_IMETHOD Run() override
- {
- NS_ASSERTION(NS_IsMainThread(), "Not running on the main thread?");
- if (gTestsIndex < int(mozilla::ArrayLength(gTests))) {
- do_test_pending();
- Test &test = gTests[gTestsIndex++];
- (void)fprintf(stderr, TEST_INFO_STR "Running %s.\n", TEST_FILE,
- test.name);
- test.func();
- }
-
- do_test_finished();
- return NS_OK;
- }
-};
-
-void
-run_next_test()
-{
- nsCOMPtr<nsIRunnable> event = new RunNextTest();
- do_check_success(NS_DispatchToCurrentThread(event));
-}
-
-int gPendingTests = 0;
-
-void
-do_test_pending()
-{
- NS_ASSERTION(NS_IsMainThread(), "Not running on the main thread?");
- gPendingTests++;
-}
-
-void
-do_test_finished()
-{
- NS_ASSERTION(NS_IsMainThread(), "Not running on the main thread?");
- NS_ASSERTION(gPendingTests > 0, "Invalid pending test count!");
- gPendingTests--;
-}
-
-void
-disable_idle_service()
-{
- (void)fprintf(stderr, TEST_INFO_STR "Disabling Idle Service.\n", TEST_FILE);
- static NS_DEFINE_IID(kIdleCID, NS_IDLE_SERVICE_CID);
- nsresult rv;
- nsCOMPtr<nsIFactory> idleFactory = do_GetClassObject(kIdleCID, &rv);
- do_check_success(rv);
- nsCOMPtr<nsIComponentRegistrar> registrar;
- rv = NS_GetComponentRegistrar(getter_AddRefs(registrar));
- do_check_success(rv);
- rv = registrar->UnregisterFactory(kIdleCID, idleFactory);
- do_check_success(rv);
-}
-
-int
-main(int aArgc,
- char** aArgv)
-{
- ScopedXPCOM xpcom(TEST_NAME);
- if (xpcom.failed())
- return -1;
- // Initialize a profile folder to ensure a clean shutdown.
- nsCOMPtr<nsIFile> profile = xpcom.GetProfileDirectory();
- if (!profile) {
- fail("Couldn't get the profile directory.");
- return -1;
- }
-
- RefPtr<WaitForConnectionClosed> spinClose = new WaitForConnectionClosed();
-
- // Tinderboxes are constantly on idle. Since idle tasks can interact with
- // tests, causing random failures, disable the idle service.
- disable_idle_service();
-
- do_test_pending();
- run_next_test();
-
- // Spin the event loop until we've run out of tests to run.
- while (gPendingTests) {
- (void)NS_ProcessNextEvent();
- }
-
- // And let any other events finish before we quit.
- (void)NS_ProcessPendingEvents(nullptr);
-
- // Check that we have passed all of our tests, and output accordingly.
- if (gPassedTests == gTotalTests) {
- passed(TEST_FILE);
- }
-
- (void)fprintf(stderr, TEST_INFO_STR "%u of %u tests passed\n",
- TEST_FILE, unsigned(gPassedTests), unsigned(gTotalTests));
-
- return gPassedTests == gTotalTests ? 0 : -1;
-}
diff --git a/toolkit/components/places/tests/cpp/test_IHistory.cpp b/toolkit/components/places/tests/cpp/test_IHistory.cpp
deleted file mode 100644
index 90998ce8c1..0000000000
--- a/toolkit/components/places/tests/cpp/test_IHistory.cpp
+++ /dev/null
@@ -1,639 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "places_test_harness.h"
-#include "nsIPrefService.h"
-#include "nsIPrefBranch.h"
-#include "mozilla/Attributes.h"
-#include "nsNetUtil.h"
-
-#include "mock_Link.h"
-using namespace mozilla;
-using namespace mozilla::dom;
-
-/**
- * This file tests the IHistory interface.
- */
-
-////////////////////////////////////////////////////////////////////////////////
-//// Helper Methods
-
-void
-expect_visit(nsLinkState aState)
-{
- do_check_true(aState == eLinkState_Visited);
-}
-
-void
-expect_no_visit(nsLinkState aState)
-{
- do_check_true(aState == eLinkState_Unvisited);
-}
-
-already_AddRefed<nsIURI>
-new_test_uri()
-{
- // Create a unique spec.
- static int32_t specNumber = 0;
- nsAutoCString spec = NS_LITERAL_CSTRING("http://mozilla.org/");
- spec.AppendInt(specNumber++);
-
- // Create the URI for the spec.
- nsCOMPtr<nsIURI> testURI;
- nsresult rv = NS_NewURI(getter_AddRefs(testURI), spec);
- do_check_success(rv);
- return testURI.forget();
-}
-
-class VisitURIObserver final : public nsIObserver
-{
- ~VisitURIObserver() {}
-
-public:
- NS_DECL_ISUPPORTS
-
- explicit VisitURIObserver(int aExpectedVisits = 1) :
- mVisits(0),
- mExpectedVisits(aExpectedVisits)
- {
- nsCOMPtr<nsIObserverService> observerService =
- do_GetService(NS_OBSERVERSERVICE_CONTRACTID);
- do_check_true(observerService);
- (void)observerService->AddObserver(this,
- "uri-visit-saved",
- false);
- }
-
- void WaitForNotification()
- {
- while (mVisits < mExpectedVisits) {
- (void)NS_ProcessNextEvent();
- }
- }
-
- NS_IMETHOD Observe(nsISupports* aSubject,
- const char* aTopic,
- const char16_t* aData) override
- {
- mVisits++;
-
- if (mVisits == mExpectedVisits) {
- nsCOMPtr<nsIObserverService> observerService =
- do_GetService(NS_OBSERVERSERVICE_CONTRACTID);
- (void)observerService->RemoveObserver(this, "uri-visit-saved");
- }
-
- return NS_OK;
- }
-private:
- int mVisits;
- int mExpectedVisits;
-};
-NS_IMPL_ISUPPORTS(
- VisitURIObserver,
- nsIObserver
-)
-
-////////////////////////////////////////////////////////////////////////////////
-//// Test Functions
-
-void
-test_set_places_enabled()
-{
- // Ensure places is enabled for everyone.
- nsresult rv;
- nsCOMPtr<nsIPrefBranch> prefBranch =
- do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
- do_check_success(rv);
-
- rv = prefBranch->SetBoolPref("places.history.enabled", true);
- do_check_success(rv);
-
- // Run the next test.
- run_next_test();
-}
-
-
-void
-test_wait_checkpoint()
-{
- // This "fake" test is here to wait for the initial WAL checkpoint we force
- // after creating the database schema, since that may happen at any time,
- // and cause concurrent readers to access an older checkpoint.
- nsCOMPtr<mozIStorageConnection> db = do_get_db();
- nsCOMPtr<mozIStorageAsyncStatement> stmt;
- db->CreateAsyncStatement(NS_LITERAL_CSTRING("SELECT 1"),
- getter_AddRefs(stmt));
- RefPtr<AsyncStatementSpinner> spinner = new AsyncStatementSpinner();
- nsCOMPtr<mozIStoragePendingStatement> pending;
- (void)stmt->ExecuteAsync(spinner, getter_AddRefs(pending));
- spinner->SpinUntilCompleted();
-
- // Run the next test.
- run_next_test();
-}
-
-// These variables are shared between part 1 and part 2 of the test. Part 2
-// sets the nsCOMPtr's to nullptr, freeing the reference.
-namespace test_unvisited_does_not_notify {
- nsCOMPtr<nsIURI> testURI;
- RefPtr<Link> testLink;
-} // namespace test_unvisited_does_not_notify
-void
-test_unvisited_does_not_notify_part1()
-{
- using namespace test_unvisited_does_not_notify;
-
- // This test is done in two parts. The first part registers for a URI that
- // should not be visited. We then run another test that will also do a
- // lookup and will be notified. Since requests are answered in the order they
- // are requested (at least as long as the same URI isn't asked for later), we
- // will know that the Link was not notified.
-
- // First, we need a test URI.
- testURI = new_test_uri();
-
- // Create our test Link.
- testLink = new mock_Link(expect_no_visit);
-
- // Now, register our Link to be notified.
- nsCOMPtr<IHistory> history = do_get_IHistory();
- nsresult rv = history->RegisterVisitedCallback(testURI, testLink);
- do_check_success(rv);
-
- // Run the next test.
- run_next_test();
-}
-
-void
-test_visited_notifies()
-{
- // First, we add our test URI to history.
- nsCOMPtr<nsIURI> testURI = new_test_uri();
- addURI(testURI);
-
- // Create our test Link. The callback function will release the reference we
- // have on the Link.
- RefPtr<Link> link = new mock_Link(expect_visit);
-
- // Now, register our Link to be notified.
- nsCOMPtr<IHistory> history = do_get_IHistory();
- nsresult rv = history->RegisterVisitedCallback(testURI, link);
- do_check_success(rv);
-
- // Note: test will continue upon notification.
-}
-
-void
-test_unvisited_does_not_notify_part2()
-{
- using namespace test_unvisited_does_not_notify;
-
- // We would have had a failure at this point had the content node been told it
- // was visited. Therefore, it is safe to unregister our content node.
- nsCOMPtr<IHistory> history = do_get_IHistory();
- nsresult rv = history->UnregisterVisitedCallback(testURI, testLink);
- do_check_success(rv);
-
- // Clear the stored variables now.
- testURI = nullptr;
- testLink = nullptr;
-
- // Run the next test.
- run_next_test();
-}
-
-void
-test_same_uri_notifies_both()
-{
- // First, we add our test URI to history.
- nsCOMPtr<nsIURI> testURI = new_test_uri();
- addURI(testURI);
-
- // Create our two test Links. The callback function will release the
- // reference we have on the Links. Only the second Link should run the next
- // test!
- RefPtr<Link> link1 = new mock_Link(expect_visit, false);
- RefPtr<Link> link2 = new mock_Link(expect_visit);
-
- // Now, register our Link to be notified.
- nsCOMPtr<IHistory> history = do_get_IHistory();
- nsresult rv = history->RegisterVisitedCallback(testURI, link1);
- do_check_success(rv);
- rv = history->RegisterVisitedCallback(testURI, link2);
- do_check_success(rv);
-
- // Note: test will continue upon notification.
-}
-
-void
-test_unregistered_visited_does_not_notify()
-{
- // This test must have a test that has a successful notification after it.
- // The Link would have been notified by now if we were buggy and notified
- // unregistered Links (due to request serialization).
-
- nsCOMPtr<nsIURI> testURI = new_test_uri();
- RefPtr<Link> link = new mock_Link(expect_no_visit);
-
- // Now, register our Link to be notified.
- nsCOMPtr<IHistory> history(do_get_IHistory());
- nsresult rv = history->RegisterVisitedCallback(testURI, link);
- do_check_success(rv);
-
- // Unregister the Link.
- rv = history->UnregisterVisitedCallback(testURI, link);
- do_check_success(rv);
-
- // And finally add a visit for the URI.
- addURI(testURI);
-
- // If history tries to notify us, we'll either crash because the Link will
- // have been deleted (we are the only thing holding a reference to it), or our
- // expect_no_visit call back will produce a failure. Either way, the test
- // will be reported as a failure.
-
- // Run the next test.
- run_next_test();
-}
-
-void
-test_new_visit_notifies_waiting_Link()
-{
- // Create our test Link. The callback function will release the reference we
- // have on the link.
- RefPtr<Link> link = new mock_Link(expect_visit);
-
- // Now, register our content node to be notified.
- nsCOMPtr<nsIURI> testURI = new_test_uri();
- nsCOMPtr<IHistory> history = do_get_IHistory();
- nsresult rv = history->RegisterVisitedCallback(testURI, link);
- do_check_success(rv);
-
- // Add ourselves to history.
- addURI(testURI);
-
- // Note: test will continue upon notification.
-}
-
-void
-test_RegisterVisitedCallback_returns_before_notifying()
-{
- // Add a URI so that it's already in history.
- nsCOMPtr<nsIURI> testURI = new_test_uri();
- addURI(testURI);
-
- // Create our test Link.
- RefPtr<Link> link = new mock_Link(expect_no_visit);
-
- // Now, register our content node to be notified. It should not be notified.
- nsCOMPtr<IHistory> history = do_get_IHistory();
- nsresult rv = history->RegisterVisitedCallback(testURI, link);
- do_check_success(rv);
-
- // Remove ourselves as an observer. We would have failed if we had been
- // notified.
- rv = history->UnregisterVisitedCallback(testURI, link);
- do_check_success(rv);
-
- run_next_test();
-}
-
-namespace test_observer_topic_dispatched_helpers {
- #define URI_VISITED "visited"
- #define URI_NOT_VISITED "not visited"
- #define URI_VISITED_RESOLUTION_TOPIC "visited-status-resolution"
- class statusObserver final : public nsIObserver
- {
- ~statusObserver() {}
-
- public:
- NS_DECL_ISUPPORTS
-
- statusObserver(nsIURI* aURI,
- const bool aExpectVisit,
- bool& _notified)
- : mURI(aURI)
- , mExpectVisit(aExpectVisit)
- , mNotified(_notified)
- {
- nsCOMPtr<nsIObserverService> observerService =
- do_GetService(NS_OBSERVERSERVICE_CONTRACTID);
- do_check_true(observerService);
- (void)observerService->AddObserver(this,
- URI_VISITED_RESOLUTION_TOPIC,
- false);
- }
-
- NS_IMETHOD Observe(nsISupports* aSubject,
- const char* aTopic,
- const char16_t* aData) override
- {
- // Make sure we got notified of the right topic.
- do_check_false(strcmp(aTopic, URI_VISITED_RESOLUTION_TOPIC));
-
- // If this isn't for our URI, do not do anything.
- nsCOMPtr<nsIURI> notifiedURI = do_QueryInterface(aSubject);
- do_check_true(notifiedURI);
-
- bool isOurURI;
- nsresult rv = notifiedURI->Equals(mURI, &isOurURI);
- do_check_success(rv);
- if (!isOurURI) {
- return NS_OK;
- }
-
- // Check that we have either the visited or not visited string.
- bool visited = !!NS_LITERAL_STRING(URI_VISITED).Equals(aData);
- bool notVisited = !!NS_LITERAL_STRING(URI_NOT_VISITED).Equals(aData);
- do_check_true(visited || notVisited);
-
- // Check to make sure we got the state we expected.
- do_check_eq(visited, mExpectVisit);
-
- // Indicate that we've been notified.
- mNotified = true;
-
- // Remove ourselves as an observer.
- nsCOMPtr<nsIObserverService> observerService =
- do_GetService(NS_OBSERVERSERVICE_CONTRACTID);
- (void)observerService->RemoveObserver(this,
- URI_VISITED_RESOLUTION_TOPIC);
- return NS_OK;
- }
- private:
- nsCOMPtr<nsIURI> mURI;
- const bool mExpectVisit;
- bool& mNotified;
- };
- NS_IMPL_ISUPPORTS(
- statusObserver,
- nsIObserver
- )
-} // namespace test_observer_topic_dispatched_helpers
-void
-test_observer_topic_dispatched()
-{
- using namespace test_observer_topic_dispatched_helpers;
-
- // Create two URIs, making sure only one is in history.
- nsCOMPtr<nsIURI> visitedURI = new_test_uri();
- nsCOMPtr<nsIURI> notVisitedURI = new_test_uri();
- bool urisEqual;
- nsresult rv = visitedURI->Equals(notVisitedURI, &urisEqual);
- do_check_success(rv);
- do_check_false(urisEqual);
- addURI(visitedURI);
-
- // Need two Link objects as well - one for each URI.
- RefPtr<Link> visitedLink = new mock_Link(expect_visit, false);
- RefPtr<Link> visitedLinkCopy = visitedLink;
- RefPtr<Link> notVisitedLink = new mock_Link(expect_no_visit);
-
- // Add the right observers for the URIs to check results.
- bool visitedNotified = false;
- nsCOMPtr<nsIObserver> visitedObs =
- new statusObserver(visitedURI, true, visitedNotified);
- bool notVisitedNotified = false;
- nsCOMPtr<nsIObserver> unvisitedObs =
- new statusObserver(notVisitedURI, false, notVisitedNotified);
-
- // Register our Links to be notified.
- nsCOMPtr<IHistory> history = do_get_IHistory();
- rv = history->RegisterVisitedCallback(visitedURI, visitedLink);
- do_check_success(rv);
- rv = history->RegisterVisitedCallback(notVisitedURI, notVisitedLink);
- do_check_success(rv);
-
- // Spin the event loop as long as we have not been properly notified.
- while (!visitedNotified || !notVisitedNotified) {
- (void)NS_ProcessNextEvent();
- }
-
- // Unregister our observer that would not have been released.
- rv = history->UnregisterVisitedCallback(notVisitedURI, notVisitedLink);
- do_check_success(rv);
-
- run_next_test();
-}
-
-void
-test_visituri_inserts()
-{
- nsCOMPtr<IHistory> history = do_get_IHistory();
- nsCOMPtr<nsIURI> lastURI = new_test_uri();
- nsCOMPtr<nsIURI> visitedURI = new_test_uri();
-
- history->VisitURI(visitedURI, lastURI, mozilla::IHistory::TOP_LEVEL);
-
- RefPtr<VisitURIObserver> finisher = new VisitURIObserver();
- finisher->WaitForNotification();
-
- PlaceRecord place;
- do_get_place(visitedURI, place);
-
- do_check_true(place.id > 0);
- do_check_false(place.hidden);
- do_check_false(place.typed);
- do_check_eq(place.visitCount, 1);
-
- run_next_test();
-}
-
-void
-test_visituri_updates()
-{
- nsCOMPtr<IHistory> history = do_get_IHistory();
- nsCOMPtr<nsIURI> lastURI = new_test_uri();
- nsCOMPtr<nsIURI> visitedURI = new_test_uri();
- RefPtr<VisitURIObserver> finisher;
-
- history->VisitURI(visitedURI, lastURI, mozilla::IHistory::TOP_LEVEL);
- finisher = new VisitURIObserver();
- finisher->WaitForNotification();
-
- history->VisitURI(visitedURI, lastURI, mozilla::IHistory::TOP_LEVEL);
- finisher = new VisitURIObserver();
- finisher->WaitForNotification();
-
- PlaceRecord place;
- do_get_place(visitedURI, place);
-
- do_check_eq(place.visitCount, 2);
-
- run_next_test();
-}
-
-void
-test_visituri_preserves_shown_and_typed()
-{
- nsCOMPtr<IHistory> history = do_get_IHistory();
- nsCOMPtr<nsIURI> lastURI = new_test_uri();
- nsCOMPtr<nsIURI> visitedURI = new_test_uri();
-
- history->VisitURI(visitedURI, lastURI, mozilla::IHistory::TOP_LEVEL);
- // this simulates the uri visit happening in a frame. Normally frame
- // transitions would be hidden unless it was previously loaded top-level
- history->VisitURI(visitedURI, lastURI, 0);
-
- RefPtr<VisitURIObserver> finisher = new VisitURIObserver(2);
- finisher->WaitForNotification();
-
- PlaceRecord place;
- do_get_place(visitedURI, place);
- do_check_false(place.hidden);
-
- run_next_test();
-}
-
-void
-test_visituri_creates_visit()
-{
- nsCOMPtr<IHistory> history = do_get_IHistory();
- nsCOMPtr<nsIURI> lastURI = new_test_uri();
- nsCOMPtr<nsIURI> visitedURI = new_test_uri();
-
- history->VisitURI(visitedURI, lastURI, mozilla::IHistory::TOP_LEVEL);
- RefPtr<VisitURIObserver> finisher = new VisitURIObserver();
- finisher->WaitForNotification();
-
- PlaceRecord place;
- VisitRecord visit;
- do_get_place(visitedURI, place);
- do_get_lastVisit(place.id, visit);
-
- do_check_true(visit.id > 0);
- do_check_eq(visit.lastVisitId, 0);
- do_check_eq(visit.transitionType, nsINavHistoryService::TRANSITION_LINK);
-
- run_next_test();
-}
-
-void
-test_visituri_transition_typed()
-{
- nsCOMPtr<nsINavHistoryService> navHistory = do_get_NavHistory();
- nsCOMPtr<IHistory> history = do_get_IHistory();
- nsCOMPtr<nsIURI> lastURI = new_test_uri();
- nsCOMPtr<nsIURI> visitedURI = new_test_uri();
-
- navHistory->MarkPageAsTyped(visitedURI);
- history->VisitURI(visitedURI, lastURI, mozilla::IHistory::TOP_LEVEL);
- RefPtr<VisitURIObserver> finisher = new VisitURIObserver();
- finisher->WaitForNotification();
-
- PlaceRecord place;
- VisitRecord visit;
- do_get_place(visitedURI, place);
- do_get_lastVisit(place.id, visit);
-
- do_check_true(visit.transitionType == nsINavHistoryService::TRANSITION_TYPED);
-
- run_next_test();
-}
-
-void
-test_visituri_transition_embed()
-{
- nsCOMPtr<IHistory> history = do_get_IHistory();
- nsCOMPtr<nsIURI> lastURI = new_test_uri();
- nsCOMPtr<nsIURI> visitedURI = new_test_uri();
-
- history->VisitURI(visitedURI, lastURI, 0);
- RefPtr<VisitURIObserver> finisher = new VisitURIObserver();
- finisher->WaitForNotification();
-
- PlaceRecord place;
- VisitRecord visit;
- do_get_place(visitedURI, place);
- do_get_lastVisit(place.id, visit);
-
- do_check_eq(place.id, 0);
- do_check_eq(visit.id, 0);
-
- run_next_test();
-}
-
-void
-test_new_visit_adds_place_guid()
-{
- // First, add a visit and wait. This will also add a place.
- nsCOMPtr<nsIURI> visitedURI = new_test_uri();
- nsCOMPtr<IHistory> history = do_get_IHistory();
- nsresult rv = history->VisitURI(visitedURI, nullptr,
- mozilla::IHistory::TOP_LEVEL);
- do_check_success(rv);
- RefPtr<VisitURIObserver> finisher = new VisitURIObserver();
- finisher->WaitForNotification();
-
- // Check that we have a guid for our visit.
- PlaceRecord place;
- do_get_place(visitedURI, place);
- do_check_eq(place.visitCount, 1);
- do_check_eq(place.guid.Length(), 12);
-
- run_next_test();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//// IPC-only Tests
-
-void
-test_two_null_links_same_uri()
-{
- // Tests that we do not crash when we have had two nullptr Links passed to
- // RegisterVisitedCallback and then the visit occurs (bug 607469). This only
- // happens in IPC builds.
- nsCOMPtr<nsIURI> testURI = new_test_uri();
-
- nsCOMPtr<IHistory> history = do_get_IHistory();
- nsresult rv = history->RegisterVisitedCallback(testURI, nullptr);
- do_check_success(rv);
- rv = history->RegisterVisitedCallback(testURI, nullptr);
- do_check_success(rv);
-
- rv = history->VisitURI(testURI, nullptr, mozilla::IHistory::TOP_LEVEL);
- do_check_success(rv);
-
- RefPtr<VisitURIObserver> finisher = new VisitURIObserver();
- finisher->WaitForNotification();
-
- run_next_test();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//// Test Harness
-
-/**
- * Note: for tests marked "Order Important!", please see the test for details.
- */
-Test gTests[] = {
- TEST(test_set_places_enabled), // Must come first!
- TEST(test_wait_checkpoint), // Must come second!
- TEST(test_unvisited_does_not_notify_part1), // Order Important!
- TEST(test_visited_notifies),
- TEST(test_unvisited_does_not_notify_part2), // Order Important!
- TEST(test_same_uri_notifies_both),
- TEST(test_unregistered_visited_does_not_notify), // Order Important!
- TEST(test_new_visit_notifies_waiting_Link),
- TEST(test_RegisterVisitedCallback_returns_before_notifying),
- TEST(test_observer_topic_dispatched),
- TEST(test_visituri_inserts),
- TEST(test_visituri_updates),
- TEST(test_visituri_preserves_shown_and_typed),
- TEST(test_visituri_creates_visit),
- TEST(test_visituri_transition_typed),
- TEST(test_visituri_transition_embed),
- TEST(test_new_visit_adds_place_guid),
-
- // The rest of these tests are tests that are only run in IPC builds.
- TEST(test_two_null_links_same_uri),
-};
-
-const char* file = __FILE__;
-#define TEST_NAME "IHistory"
-#define TEST_FILE file
-#include "places_test_harness_tail.h"
diff --git a/toolkit/components/places/tests/expiration/.eslintrc.js b/toolkit/components/places/tests/expiration/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/places/tests/expiration/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/places/tests/expiration/head_expiration.js b/toolkit/components/places/tests/expiration/head_expiration.js
deleted file mode 100644
index 2be4af307c..0000000000
--- a/toolkit/components/places/tests/expiration/head_expiration.js
+++ /dev/null
@@ -1,124 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
- * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
- * 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/. */
-
-var Ci = Components.interfaces;
-var Cc = Components.classes;
-var Cr = Components.results;
-var Cu = Components.utils;
-
-Cu.import("resource://gre/modules/Services.jsm");
-
-// Import common head.
-{
- let commonFile = do_get_file("../head_common.js", false);
- let uri = Services.io.newFileURI(commonFile);
- Services.scriptloader.loadSubScript(uri.spec, this);
-}
-
-// Put any other stuff relative to this test folder below.
-
-
-// Simulates an expiration at shutdown.
-function shutdownExpiration()
-{
- let expire = Cc["@mozilla.org/places/expiration;1"].getService(Ci.nsIObserver);
- expire.observe(null, "places-will-close-connection", null);
-}
-
-
-/**
- * Causes expiration component to start, otherwise it would wait for the first
- * history notification.
- */
-function force_expiration_start() {
- Cc["@mozilla.org/places/expiration;1"]
- .getService(Ci.nsIObserver)
- .observe(null, "testing-mode", null);
-}
-
-
-/**
- * Forces an expiration run.
- *
- * @param [optional] aLimit
- * Limit for the expiration. Pass -1 for unlimited.
- * Any other non-positive value will just expire orphans.
- *
- * @return {Promise}
- * @resolves When expiration finishes.
- * @rejects Never.
- */
-function promiseForceExpirationStep(aLimit) {
- let promise = promiseTopicObserved(PlacesUtils.TOPIC_EXPIRATION_FINISHED);
- let expire = Cc["@mozilla.org/places/expiration;1"].getService(Ci.nsIObserver);
- expire.observe(null, "places-debug-start-expiration", aLimit);
- return promise;
-}
-
-
-/**
- * Expiration preferences helpers.
- */
-
-function setInterval(aNewInterval) {
- Services.prefs.setIntPref("places.history.expiration.interval_seconds", aNewInterval);
-}
-function getInterval() {
- return Services.prefs.getIntPref("places.history.expiration.interval_seconds");
-}
-function clearInterval() {
- try {
- Services.prefs.clearUserPref("places.history.expiration.interval_seconds");
- }
- catch (ex) {}
-}
-
-
-function setMaxPages(aNewMaxPages) {
- Services.prefs.setIntPref("places.history.expiration.max_pages", aNewMaxPages);
-}
-function getMaxPages() {
- return Services.prefs.getIntPref("places.history.expiration.max_pages");
-}
-function clearMaxPages() {
- try {
- Services.prefs.clearUserPref("places.history.expiration.max_pages");
- }
- catch (ex) {}
-}
-
-
-function setHistoryEnabled(aHistoryEnabled) {
- Services.prefs.setBoolPref("places.history.enabled", aHistoryEnabled);
-}
-function getHistoryEnabled() {
- return Services.prefs.getBoolPref("places.history.enabled");
-}
-function clearHistoryEnabled() {
- try {
- Services.prefs.clearUserPref("places.history.enabled");
- }
- catch (ex) {}
-}
-
-/**
- * Returns a PRTime in the past usable to add expirable visits.
- *
- * param [optional] daysAgo
- * Expiration ignores any visit added in the last 7 days, so by default
- * this will be set to 7.
- * @note to be safe against DST issues we go back one day more.
- */
-function getExpirablePRTime(daysAgo = 7) {
- let dateObj = new Date();
- // Normalize to midnight
- dateObj.setHours(0);
- dateObj.setMinutes(0);
- dateObj.setSeconds(0);
- dateObj.setMilliseconds(0);
- dateObj = new Date(dateObj.getTime() - (daysAgo + 1) * 86400000);
- return dateObj.getTime() * 1000;
-}
diff --git a/toolkit/components/places/tests/expiration/test_analyze_runs.js b/toolkit/components/places/tests/expiration/test_analyze_runs.js
deleted file mode 100644
index 1a84e1b38c..0000000000
--- a/toolkit/components/places/tests/expiration/test_analyze_runs.js
+++ /dev/null
@@ -1,118 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Constants
-
-const TOPIC_AUTOCOMPLETE_FEEDBACK_INCOMING = "autocomplete-will-enter-text";
-
-// Helpers
-
-/**
- * Ensures that we have no data in the tables created by ANALYZE.
- */
-function clearAnalyzeData() {
- let db = DBConn();
- if (!db.tableExists("sqlite_stat1")) {
- return;
- }
- db.executeSimpleSQL("DELETE FROM sqlite_stat1");
-}
-
-/**
- * Checks that we ran ANALYZE on the specified table.
- *
- * @param aTableName
- * The table to check if ANALYZE was ran.
- * @param aRan
- * True if it was expected to run, false otherwise
- */
-function do_check_analyze_ran(aTableName, aRan) {
- let db = DBConn();
- do_check_true(db.tableExists("sqlite_stat1"));
- let stmt = db.createStatement("SELECT idx FROM sqlite_stat1 WHERE tbl = :table");
- stmt.params.table = aTableName;
- try {
- if (aRan) {
- do_check_true(stmt.executeStep());
- do_check_neq(stmt.row.idx, null);
- }
- else {
- do_check_false(stmt.executeStep());
- }
- }
- finally {
- stmt.finalize();
- }
-}
-
-// Tests
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* init_tests() {
- const TEST_URI = NetUtil.newURI("http://mozilla.org/");
- const TEST_TITLE = "This is a test";
-
- yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- title: TEST_TITLE,
- url: TEST_URI
- });
- yield PlacesTestUtils.addVisits(TEST_URI);
- let thing = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteInput,
- Ci.nsIAutoCompletePopup,
- Ci.nsIAutoCompleteController]),
- get popup() { return thing; },
- get controller() { return thing; },
- popupOpen: true,
- selectedIndex: 0,
- getValueAt: function() { return TEST_URI.spec; },
- searchString: TEST_TITLE,
- };
- Services.obs.notifyObservers(thing, TOPIC_AUTOCOMPLETE_FEEDBACK_INCOMING,
- null);
-});
-
-add_task(function* test_timed() {
- clearAnalyzeData();
-
- // Set a low interval and wait for the timed expiration to start.
- let promise = promiseTopicObserved(PlacesUtils.TOPIC_EXPIRATION_FINISHED);
- setInterval(3);
- yield promise;
- setInterval(3600);
-
- do_check_analyze_ran("moz_places", false);
- do_check_analyze_ran("moz_bookmarks", false);
- do_check_analyze_ran("moz_historyvisits", false);
- do_check_analyze_ran("moz_inputhistory", true);
-});
-
-add_task(function* test_debug() {
- clearAnalyzeData();
-
- yield promiseForceExpirationStep(1);
-
- do_check_analyze_ran("moz_places", true);
- do_check_analyze_ran("moz_bookmarks", true);
- do_check_analyze_ran("moz_historyvisits", true);
- do_check_analyze_ran("moz_inputhistory", true);
-});
-
-add_task(function* test_clear_history() {
- clearAnalyzeData();
-
- let promise = promiseTopicObserved(PlacesUtils.TOPIC_EXPIRATION_FINISHED);
- let listener = Cc["@mozilla.org/places/expiration;1"]
- .getService(Ci.nsINavHistoryObserver);
- listener.onClearHistory();
- yield promise;
-
- do_check_analyze_ran("moz_places", true);
- do_check_analyze_ran("moz_bookmarks", false);
- do_check_analyze_ran("moz_historyvisits", true);
- do_check_analyze_ran("moz_inputhistory", true);
-});
diff --git a/toolkit/components/places/tests/expiration/test_annos_expire_history.js b/toolkit/components/places/tests/expiration/test_annos_expire_history.js
deleted file mode 100644
index f9568a769c..0000000000
--- a/toolkit/components/places/tests/expiration/test_annos_expire_history.js
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
- * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
- * 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/. */
-
-/**
- * What this is aimed to test:
- *
- * EXPIRE_WITH_HISTORY annotations should be expired when a page has no more
- * visits, even if the page still exists in the database.
- * This expiration policy is only valid for page annotations.
- */
-
-var as = Cc["@mozilla.org/browser/annotation-service;1"].
- getService(Ci.nsIAnnotationService);
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* test_annos_expire_history() {
- // Set interval to a large value so we don't expire on it.
- setInterval(3600); // 1h
-
- // Expire all expirable pages.
- setMaxPages(0);
-
- // Add some visited page and a couple expire with history annotations for each.
- let now = getExpirablePRTime();
- for (let i = 0; i < 5; i++) {
- let pageURI = uri("http://page_anno." + i + ".mozilla.org/");
- yield PlacesTestUtils.addVisits({ uri: pageURI, visitDate: now++ });
- as.setPageAnnotation(pageURI, "page_expire1", "test", 0, as.EXPIRE_WITH_HISTORY);
- as.setPageAnnotation(pageURI, "page_expire2", "test", 0, as.EXPIRE_WITH_HISTORY);
- }
-
- let pages = as.getPagesWithAnnotation("page_expire1");
- do_check_eq(pages.length, 5);
- pages = as.getPagesWithAnnotation("page_expire2");
- do_check_eq(pages.length, 5);
-
- // Add some bookmarked page and a couple session annotations for each.
- for (let i = 0; i < 5; i++) {
- let pageURI = uri("http://item_anno." + i + ".mozilla.org/");
- // We also add a visit before bookmarking.
- yield PlacesTestUtils.addVisits({ uri: pageURI, visitDate: now++ });
- yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: pageURI,
- title: null
- });
- // Notice we use page annotations here, items annotations can't use this
- // kind of expiration policy.
- as.setPageAnnotation(pageURI, "item_persist1", "test", 0, as.EXPIRE_WITH_HISTORY);
- as.setPageAnnotation(pageURI, "item_persist2", "test", 0, as.EXPIRE_WITH_HISTORY);
- }
-
- let items = as.getPagesWithAnnotation("item_persist1");
- do_check_eq(items.length, 5);
- items = as.getPagesWithAnnotation("item_persist2");
- do_check_eq(items.length, 5);
-
- // Add other visited page and a couple expire with history annotations for each.
- // We won't expire these visits, so the annotations should survive.
- for (let i = 0; i < 5; i++) {
- let pageURI = uri("http://persist_page_anno." + i + ".mozilla.org/");
- yield PlacesTestUtils.addVisits({ uri: pageURI, visitDate: now++ });
- as.setPageAnnotation(pageURI, "page_persist1", "test", 0, as.EXPIRE_WITH_HISTORY);
- as.setPageAnnotation(pageURI, "page_persist2", "test", 0, as.EXPIRE_WITH_HISTORY);
- }
-
- pages = as.getPagesWithAnnotation("page_persist1");
- do_check_eq(pages.length, 5);
- pages = as.getPagesWithAnnotation("page_persist2");
- do_check_eq(pages.length, 5);
-
- // Expire all visits for the first 5 pages and the bookmarks.
- yield promiseForceExpirationStep(10);
-
- pages = as.getPagesWithAnnotation("page_expire1");
- do_check_eq(pages.length, 0);
- pages = as.getPagesWithAnnotation("page_expire2");
- do_check_eq(pages.length, 0);
- items = as.getItemsWithAnnotation("item_persist1");
- do_check_eq(items.length, 0);
- items = as.getItemsWithAnnotation("item_persist2");
- do_check_eq(items.length, 0);
- pages = as.getPagesWithAnnotation("page_persist1");
- do_check_eq(pages.length, 5);
- pages = as.getPagesWithAnnotation("page_persist2");
- do_check_eq(pages.length, 5);
-});
diff --git a/toolkit/components/places/tests/expiration/test_annos_expire_never.js b/toolkit/components/places/tests/expiration/test_annos_expire_never.js
deleted file mode 100644
index f146f25b5e..0000000000
--- a/toolkit/components/places/tests/expiration/test_annos_expire_never.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
- * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
- * 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/. */
-
-/**
- * What this is aimed to test:
- *
- * EXPIRE_NEVER annotations should be expired when a page is removed from the
- * database.
- * If the annotation is a page annotation this will happen when the page is
- * expired, namely when the page has no visits and is not bookmarked.
- * Otherwise if it's an item annotation the annotation will be expired when
- * the item is removed, thus expiration won't handle this case at all.
- */
-
-var as = Cc["@mozilla.org/browser/annotation-service;1"].
- getService(Ci.nsIAnnotationService);
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* test_annos_expire_never() {
- // Set interval to a large value so we don't expire on it.
- setInterval(3600); // 1h
-
- // Expire all expirable pages.
- setMaxPages(0);
-
- // Add some visited page and a couple expire never annotations for each.
- let now = getExpirablePRTime();
- for (let i = 0; i < 5; i++) {
- let pageURI = uri("http://page_anno." + i + ".mozilla.org/");
- yield PlacesTestUtils.addVisits({ uri: pageURI, visitDate: now++ });
- as.setPageAnnotation(pageURI, "page_expire1", "test", 0, as.EXPIRE_NEVER);
- as.setPageAnnotation(pageURI, "page_expire2", "test", 0, as.EXPIRE_NEVER);
- }
-
- let pages = as.getPagesWithAnnotation("page_expire1");
- do_check_eq(pages.length, 5);
- pages = as.getPagesWithAnnotation("page_expire2");
- do_check_eq(pages.length, 5);
-
- // Add some bookmarked page and a couple expire never annotations for each.
- for (let i = 0; i < 5; i++) {
- let pageURI = uri("http://item_anno." + i + ".mozilla.org/");
- // We also add a visit before bookmarking.
- yield PlacesTestUtils.addVisits({ uri: pageURI, visitDate: now++ });
- let bm = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: pageURI,
- title: null
- });
- let id = yield PlacesUtils.promiseItemId(bm.guid);
- as.setItemAnnotation(id, "item_persist1", "test", 0, as.EXPIRE_NEVER);
- as.setItemAnnotation(id, "item_persist2", "test", 0, as.EXPIRE_NEVER);
- }
-
- let items = as.getItemsWithAnnotation("item_persist1");
- do_check_eq(items.length, 5);
- items = as.getItemsWithAnnotation("item_persist2");
- do_check_eq(items.length, 5);
-
- // Add other visited page and a couple expire never annotations for each.
- // We won't expire these visits, so the annotations should survive.
- for (let i = 0; i < 5; i++) {
- let pageURI = uri("http://persist_page_anno." + i + ".mozilla.org/");
- yield PlacesTestUtils.addVisits({ uri: pageURI, visitDate: now++ });
- as.setPageAnnotation(pageURI, "page_persist1", "test", 0, as.EXPIRE_NEVER);
- as.setPageAnnotation(pageURI, "page_persist2", "test", 0, as.EXPIRE_NEVER);
- }
-
- pages = as.getPagesWithAnnotation("page_persist1");
- do_check_eq(pages.length, 5);
- pages = as.getPagesWithAnnotation("page_persist2");
- do_check_eq(pages.length, 5);
-
- // Expire all visits for the first 5 pages and the bookmarks.
- yield promiseForceExpirationStep(10);
-
- pages = as.getPagesWithAnnotation("page_expire1");
- do_check_eq(pages.length, 0);
- pages = as.getPagesWithAnnotation("page_expire2");
- do_check_eq(pages.length, 0);
- items = as.getItemsWithAnnotation("item_persist1");
- do_check_eq(items.length, 5);
- items = as.getItemsWithAnnotation("item_persist2");
- do_check_eq(items.length, 5);
- pages = as.getPagesWithAnnotation("page_persist1");
- do_check_eq(pages.length, 5);
- pages = as.getPagesWithAnnotation("page_persist2");
- do_check_eq(pages.length, 5);
-});
diff --git a/toolkit/components/places/tests/expiration/test_annos_expire_policy.js b/toolkit/components/places/tests/expiration/test_annos_expire_policy.js
deleted file mode 100644
index 2fe50e13e5..0000000000
--- a/toolkit/components/places/tests/expiration/test_annos_expire_policy.js
+++ /dev/null
@@ -1,189 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
- * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
- * 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/. */
-
-/**
- * What this is aimed to test:
- *
- * Annotations can be set with a timed expiration policy.
- * Supported policies are:
- * - EXPIRE_DAYS: annotation would be expired after 7 days
- * - EXPIRE_WEEKS: annotation would be expired after 30 days
- * - EXPIRE_MONTHS: annotation would be expired after 180 days
- */
-
-var as = Cc["@mozilla.org/browser/annotation-service;1"].
- getService(Ci.nsIAnnotationService);
-
-/**
- * Creates an aged annotation.
- *
- * @param aIdentifier Either a page url or an item id.
- * @param aIdentifier Name of the annotation.
- * @param aValue Value for the annotation.
- * @param aExpirePolicy Expiration policy of the annotation.
- * @param aAgeInDays Age in days of the annotation.
- * @param [optional] aLastModifiedAgeInDays Age in days of the annotation, for lastModified.
- */
-var now = Date.now();
-function add_old_anno(aIdentifier, aName, aValue, aExpirePolicy,
- aAgeInDays, aLastModifiedAgeInDays) {
- let expireDate = (now - (aAgeInDays * 86400 * 1000)) * 1000;
- let lastModifiedDate = 0;
- if (aLastModifiedAgeInDays)
- lastModifiedDate = (now - (aLastModifiedAgeInDays * 86400 * 1000)) * 1000;
-
- let sql;
- if (typeof(aIdentifier) == "number") {
- // Item annotation.
- as.setItemAnnotation(aIdentifier, aName, aValue, 0, aExpirePolicy);
- // Update dateAdded for the last added annotation.
- sql = "UPDATE moz_items_annos SET dateAdded = :expire_date, lastModified = :last_modified " +
- "WHERE id = (SELECT id FROM moz_items_annos " +
- "WHERE item_id = :id " +
- "ORDER BY dateAdded DESC LIMIT 1)";
- }
- else if (aIdentifier instanceof Ci.nsIURI) {
- // Page annotation.
- as.setPageAnnotation(aIdentifier, aName, aValue, 0, aExpirePolicy);
- // Update dateAdded for the last added annotation.
- sql = "UPDATE moz_annos SET dateAdded = :expire_date, lastModified = :last_modified " +
- "WHERE id = (SELECT a.id FROM moz_annos a " +
- "LEFT JOIN moz_places h on h.id = a.place_id " +
- "WHERE h.url_hash = hash(:id) AND h.url = :id " +
- "ORDER BY a.dateAdded DESC LIMIT 1)";
- }
- else
- do_throw("Wrong identifier type");
-
- let stmt = DBConn().createStatement(sql);
- stmt.params.id = (typeof(aIdentifier) == "number") ? aIdentifier
- : aIdentifier.spec;
- stmt.params.expire_date = expireDate;
- stmt.params.last_modified = lastModifiedDate;
- try {
- stmt.executeStep();
- }
- finally {
- stmt.finalize();
- }
-}
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* test_annos_expire_policy() {
- // Set interval to a large value so we don't expire on it.
- setInterval(3600); // 1h
-
- // Expire all expirable pages.
- setMaxPages(0);
-
- let now_specific_to_test = getExpirablePRTime();
- // Add some bookmarked page and timed annotations for each.
- for (let i = 0; i < 5; i++) {
- let pageURI = uri("http://item_anno." + i + ".mozilla.org/");
- yield PlacesTestUtils.addVisits({ uri: pageURI, visitDate: now_specific_to_test++ });
- let bm = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: pageURI,
- title: null
- });
- let id = yield PlacesUtils.promiseItemId(bm.guid);
- // Add a 6 days old anno.
- add_old_anno(id, "persist_days", "test", as.EXPIRE_DAYS, 6);
- // Add a 8 days old anno, modified 5 days ago.
- add_old_anno(id, "persist_lm_days", "test", as.EXPIRE_DAYS, 8, 6);
- // Add a 8 days old anno.
- add_old_anno(id, "expire_days", "test", as.EXPIRE_DAYS, 8);
-
- // Add a 29 days old anno.
- add_old_anno(id, "persist_weeks", "test", as.EXPIRE_WEEKS, 29);
- // Add a 31 days old anno, modified 29 days ago.
- add_old_anno(id, "persist_lm_weeks", "test", as.EXPIRE_WEEKS, 31, 29);
- // Add a 31 days old anno.
- add_old_anno(id, "expire_weeks", "test", as.EXPIRE_WEEKS, 31);
-
- // Add a 179 days old anno.
- add_old_anno(id, "persist_months", "test", as.EXPIRE_MONTHS, 179);
- // Add a 181 days old anno, modified 179 days ago.
- add_old_anno(id, "persist_lm_months", "test", as.EXPIRE_MONTHS, 181, 179);
- // Add a 181 days old anno.
- add_old_anno(id, "expire_months", "test", as.EXPIRE_MONTHS, 181);
-
- // Add a 6 days old anno.
- add_old_anno(pageURI, "persist_days", "test", as.EXPIRE_DAYS, 6);
- // Add a 8 days old anno, modified 5 days ago.
- add_old_anno(pageURI, "persist_lm_days", "test", as.EXPIRE_DAYS, 8, 6);
- // Add a 8 days old anno.
- add_old_anno(pageURI, "expire_days", "test", as.EXPIRE_DAYS, 8);
-
- // Add a 29 days old anno.
- add_old_anno(pageURI, "persist_weeks", "test", as.EXPIRE_WEEKS, 29);
- // Add a 31 days old anno, modified 29 days ago.
- add_old_anno(pageURI, "persist_lm_weeks", "test", as.EXPIRE_WEEKS, 31, 29);
- // Add a 31 days old anno.
- add_old_anno(pageURI, "expire_weeks", "test", as.EXPIRE_WEEKS, 31);
-
- // Add a 179 days old anno.
- add_old_anno(pageURI, "persist_months", "test", as.EXPIRE_MONTHS, 179);
- // Add a 181 days old anno, modified 179 days ago.
- add_old_anno(pageURI, "persist_lm_months", "test", as.EXPIRE_MONTHS, 181, 179);
- // Add a 181 days old anno.
- add_old_anno(pageURI, "expire_months", "test", as.EXPIRE_MONTHS, 181);
- }
-
- // Add some visited page and timed annotations for each.
- for (let i = 0; i < 5; i++) {
- let pageURI = uri("http://page_anno." + i + ".mozilla.org/");
- yield PlacesTestUtils.addVisits({ uri: pageURI, visitDate: now_specific_to_test++ });
- // Add a 6 days old anno.
- add_old_anno(pageURI, "persist_days", "test", as.EXPIRE_DAYS, 6);
- // Add a 8 days old anno, modified 5 days ago.
- add_old_anno(pageURI, "persist_lm_days", "test", as.EXPIRE_DAYS, 8, 6);
- // Add a 8 days old anno.
- add_old_anno(pageURI, "expire_days", "test", as.EXPIRE_DAYS, 8);
-
- // Add a 29 days old anno.
- add_old_anno(pageURI, "persist_weeks", "test", as.EXPIRE_WEEKS, 29);
- // Add a 31 days old anno, modified 29 days ago.
- add_old_anno(pageURI, "persist_lm_weeks", "test", as.EXPIRE_WEEKS, 31, 29);
- // Add a 31 days old anno.
- add_old_anno(pageURI, "expire_weeks", "test", as.EXPIRE_WEEKS, 31);
-
- // Add a 179 days old anno.
- add_old_anno(pageURI, "persist_months", "test", as.EXPIRE_MONTHS, 179);
- // Add a 181 days old anno, modified 179 days ago.
- add_old_anno(pageURI, "persist_lm_months", "test", as.EXPIRE_MONTHS, 181, 179);
- // Add a 181 days old anno.
- add_old_anno(pageURI, "expire_months", "test", as.EXPIRE_MONTHS, 181);
- }
-
- // Expire all visits for the bookmarks.
- yield promiseForceExpirationStep(5);
-
- ["expire_days", "expire_weeks", "expire_months"].forEach(function(aAnno) {
- let pages = as.getPagesWithAnnotation(aAnno);
- do_check_eq(pages.length, 0);
- });
-
- ["expire_days", "expire_weeks", "expire_months"].forEach(function(aAnno) {
- let items = as.getItemsWithAnnotation(aAnno);
- do_check_eq(items.length, 0);
- });
-
- ["persist_days", "persist_lm_days", "persist_weeks", "persist_lm_weeks",
- "persist_months", "persist_lm_months"].forEach(function(aAnno) {
- let pages = as.getPagesWithAnnotation(aAnno);
- do_check_eq(pages.length, 10);
- });
-
- ["persist_days", "persist_lm_days", "persist_weeks", "persist_lm_weeks",
- "persist_months", "persist_lm_months"].forEach(function(aAnno) {
- let items = as.getItemsWithAnnotation(aAnno);
- do_check_eq(items.length, 5);
- });
-});
diff --git a/toolkit/components/places/tests/expiration/test_annos_expire_session.js b/toolkit/components/places/tests/expiration/test_annos_expire_session.js
deleted file mode 100644
index 68c995f80e..0000000000
--- a/toolkit/components/places/tests/expiration/test_annos_expire_session.js
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
- * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
- * 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/. */
-
-/**
- * What this is aimed to test:
- *
- * Session annotations should be expired when browsing session ends.
- */
-
-var as = Cc["@mozilla.org/browser/annotation-service;1"].
- getService(Ci.nsIAnnotationService);
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* test_annos_expire_session() {
- // Set interval to a large value so we don't expire on it.
- setInterval(3600); // 1h
-
- // Add some visited page and a couple session annotations for each.
- let now = Date.now() * 1000;
- for (let i = 0; i < 10; i++) {
- let pageURI = uri("http://session_page_anno." + i + ".mozilla.org/");
- yield PlacesTestUtils.addVisits({ uri: pageURI, visitDate: now++ });
- as.setPageAnnotation(pageURI, "test1", "test", 0, as.EXPIRE_SESSION);
- as.setPageAnnotation(pageURI, "test2", "test", 0, as.EXPIRE_SESSION);
- }
-
- // Add some bookmarked page and a couple session annotations for each.
- for (let i = 0; i < 10; i++) {
- let pageURI = uri("http://session_item_anno." + i + ".mozilla.org/");
- let bm = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: pageURI,
- title: null
- });
- let id = yield PlacesUtils.promiseItemId(bm.guid);
- as.setItemAnnotation(id, "test1", "test", 0, as.EXPIRE_SESSION);
- as.setItemAnnotation(id, "test2", "test", 0, as.EXPIRE_SESSION);
- }
-
-
- let pages = as.getPagesWithAnnotation("test1");
- do_check_eq(pages.length, 10);
- pages = as.getPagesWithAnnotation("test2");
- do_check_eq(pages.length, 10);
- let items = as.getItemsWithAnnotation("test1");
- do_check_eq(items.length, 10);
- items = as.getItemsWithAnnotation("test2");
- do_check_eq(items.length, 10);
-
- let deferred = Promise.defer();
- waitForConnectionClosed(function() {
- let stmt = DBConn(true).createAsyncStatement(
- `SELECT id FROM moz_annos
- UNION ALL
- SELECT id FROM moz_items_annos
- WHERE expiration = :expiration`
- );
- stmt.params.expiration = as.EXPIRE_SESSION;
- stmt.executeAsync({
- handleResult: function(aResultSet) {
- dump_table("moz_annos");
- dump_table("moz_items_annos");
- do_throw("Should not find any leftover session annotations");
- },
- handleError: function(aError) {
- do_throw("Error code " + aError.result + " with message '" +
- aError.message + "' returned.");
- },
- handleCompletion: function(aReason) {
- do_check_eq(aReason, Ci.mozIStorageStatementCallback.REASON_FINISHED);
- deferred.resolve();
- }
- });
- stmt.finalize();
- });
- yield deferred.promise;
-});
diff --git a/toolkit/components/places/tests/expiration/test_clearHistory.js b/toolkit/components/places/tests/expiration/test_clearHistory.js
deleted file mode 100644
index d3879d7ad9..0000000000
--- a/toolkit/components/places/tests/expiration/test_clearHistory.js
+++ /dev/null
@@ -1,157 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
- * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
- * 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/. */
-
-/**
- * What this is aimed to test:
- *
- * History.clear() should expire everything but bookmarked pages and valid
- * annos.
- */
-
-var hs = PlacesUtils.history;
-var as = PlacesUtils.annotations;
-
-/**
- * Creates an aged annotation.
- *
- * @param aIdentifier Either a page url or an item id.
- * @param aIdentifier Name of the annotation.
- * @param aValue Value for the annotation.
- * @param aExpirePolicy Expiration policy of the annotation.
- * @param aAgeInDays Age in days of the annotation.
- * @param [optional] aLastModifiedAgeInDays Age in days of the annotation, for lastModified.
- */
-var now = Date.now();
-function add_old_anno(aIdentifier, aName, aValue, aExpirePolicy,
- aAgeInDays, aLastModifiedAgeInDays) {
- let expireDate = (now - (aAgeInDays * 86400 * 1000)) * 1000;
- let lastModifiedDate = 0;
- if (aLastModifiedAgeInDays)
- lastModifiedDate = (now - (aLastModifiedAgeInDays * 86400 * 1000)) * 1000;
-
- let sql;
- if (typeof(aIdentifier) == "number") {
- // Item annotation.
- as.setItemAnnotation(aIdentifier, aName, aValue, 0, aExpirePolicy);
- // Update dateAdded for the last added annotation.
- sql = "UPDATE moz_items_annos SET dateAdded = :expire_date, lastModified = :last_modified " +
- "WHERE id = ( " +
- "SELECT a.id FROM moz_items_annos a " +
- "JOIN moz_anno_attributes n ON n.id = a.anno_attribute_id " +
- "WHERE a.item_id = :id " +
- "AND n.name = :anno_name " +
- "ORDER BY a.dateAdded DESC LIMIT 1 " +
- ")";
- }
- else if (aIdentifier instanceof Ci.nsIURI) {
- // Page annotation.
- as.setPageAnnotation(aIdentifier, aName, aValue, 0, aExpirePolicy);
- // Update dateAdded for the last added annotation.
- sql = "UPDATE moz_annos SET dateAdded = :expire_date, lastModified = :last_modified " +
- "WHERE id = ( " +
- "SELECT a.id FROM moz_annos a " +
- "JOIN moz_anno_attributes n ON n.id = a.anno_attribute_id " +
- "JOIN moz_places h on h.id = a.place_id " +
- "WHERE h.url_hash = hash(:id) AND h.url = :id " +
- "AND n.name = :anno_name " +
- "ORDER BY a.dateAdded DESC LIMIT 1 " +
- ")";
- }
- else
- do_throw("Wrong identifier type");
-
- let stmt = DBConn().createStatement(sql);
- stmt.params.id = (typeof(aIdentifier) == "number") ? aIdentifier
- : aIdentifier.spec;
- stmt.params.expire_date = expireDate;
- stmt.params.last_modified = lastModifiedDate;
- stmt.params.anno_name = aName;
- try {
- stmt.executeStep();
- }
- finally {
- stmt.finalize();
- }
-}
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* test_historyClear() {
- // Set interval to a large value so we don't expire on it.
- setInterval(3600); // 1h
-
- // Expire all expirable pages.
- setMaxPages(0);
-
- // Add some bookmarked page with visit and annotations.
- for (let i = 0; i < 5; i++) {
- let pageURI = uri("http://item_anno." + i + ".mozilla.org/");
- // This visit will be expired.
- yield PlacesTestUtils.addVisits({ uri: pageURI });
- let bm = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: pageURI,
- title: null
- });
- let id = yield PlacesUtils.promiseItemId(bm.guid);
- // Will persist because it's an EXPIRE_NEVER item anno.
- as.setItemAnnotation(id, "persist", "test", 0, as.EXPIRE_NEVER);
- // Will persist because the page is bookmarked.
- as.setPageAnnotation(pageURI, "persist", "test", 0, as.EXPIRE_NEVER);
- // All EXPIRE_SESSION annotations are expected to expire on clear history.
- as.setItemAnnotation(id, "expire_session", "test", 0, as.EXPIRE_SESSION);
- as.setPageAnnotation(pageURI, "expire_session", "test", 0, as.EXPIRE_SESSION);
- // Annotations with timed policy will expire regardless bookmarked status.
- add_old_anno(id, "expire_days", "test", as.EXPIRE_DAYS, 8);
- add_old_anno(id, "expire_weeks", "test", as.EXPIRE_WEEKS, 31);
- add_old_anno(id, "expire_months", "test", as.EXPIRE_MONTHS, 181);
- add_old_anno(pageURI, "expire_days", "test", as.EXPIRE_DAYS, 8);
- add_old_anno(pageURI, "expire_weeks", "test", as.EXPIRE_WEEKS, 31);
- add_old_anno(pageURI, "expire_months", "test", as.EXPIRE_MONTHS, 181);
- }
-
- // Add some visited page and annotations for each.
- for (let i = 0; i < 5; i++) {
- // All page annotations related to these expired pages are expected to
- // expire as well.
- let pageURI = uri("http://page_anno." + i + ".mozilla.org/");
- yield PlacesTestUtils.addVisits({ uri: pageURI });
- as.setPageAnnotation(pageURI, "expire", "test", 0, as.EXPIRE_NEVER);
- as.setPageAnnotation(pageURI, "expire_session", "test", 0, as.EXPIRE_SESSION);
- add_old_anno(pageURI, "expire_days", "test", as.EXPIRE_DAYS, 8);
- add_old_anno(pageURI, "expire_weeks", "test", as.EXPIRE_WEEKS, 31);
- add_old_anno(pageURI, "expire_months", "test", as.EXPIRE_MONTHS, 181);
- }
-
- // Expire all visits for the bookmarks
- yield PlacesUtils.history.clear();
-
- ["expire_days", "expire_weeks", "expire_months", "expire_session",
- "expire"].forEach(function(aAnno) {
- let pages = as.getPagesWithAnnotation(aAnno);
- do_check_eq(pages.length, 0);
- });
-
- ["expire_days", "expire_weeks", "expire_months", "expire_session",
- "expire"].forEach(function(aAnno) {
- let items = as.getItemsWithAnnotation(aAnno);
- do_check_eq(items.length, 0);
- });
-
- let pages = as.getPagesWithAnnotation("persist");
- do_check_eq(pages.length, 5);
-
- let items = as.getItemsWithAnnotation("persist");
- do_check_eq(items.length, 5);
-
- for (let itemId of items) {
- // Check item exists.
- let guid = yield PlacesUtils.promiseItemGuid(itemId);
- do_check_true((yield PlacesUtils.bookmarks.fetch({guid})), "item exists");
- }
-});
diff --git a/toolkit/components/places/tests/expiration/test_debug_expiration.js b/toolkit/components/places/tests/expiration/test_debug_expiration.js
deleted file mode 100644
index 456c03363e..0000000000
--- a/toolkit/components/places/tests/expiration/test_debug_expiration.js
+++ /dev/null
@@ -1,225 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * What this is aimed to test:
- *
- * Expiration can be manually triggered through a debug topic, but that should
- * only expire orphan entries, unless -1 is passed as limit.
- */
-
-var gNow = getExpirablePRTime(60);
-
-add_task(function* test_expire_orphans()
-{
- // Add visits to 2 pages and force a orphan expiration. Visits should survive.
- yield PlacesTestUtils.addVisits({
- uri: uri("http://page1.mozilla.org/"),
- visitDate: gNow++
- });
- yield PlacesTestUtils.addVisits({
- uri: uri("http://page2.mozilla.org/"),
- visitDate: gNow++
- });
- // Create a orphan place.
- let bm = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "http://page3.mozilla.org/",
- title: ""
- });
- yield PlacesUtils.bookmarks.remove(bm);
-
- // Expire now.
- yield promiseForceExpirationStep(0);
-
- // Check that visits survived.
- do_check_eq(visits_in_database("http://page1.mozilla.org/"), 1);
- do_check_eq(visits_in_database("http://page2.mozilla.org/"), 1);
- do_check_false(page_in_database("http://page3.mozilla.org/"));
-
- // Clean up.
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* test_expire_orphans_optionalarg()
-{
- // Add visits to 2 pages and force a orphan expiration. Visits should survive.
- yield PlacesTestUtils.addVisits({
- uri: uri("http://page1.mozilla.org/"),
- visitDate: gNow++
- });
- yield PlacesTestUtils.addVisits({
- uri: uri("http://page2.mozilla.org/"),
- visitDate: gNow++
- });
- // Create a orphan place.
- let bm = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "http://page3.mozilla.org/",
- title: ""
- });
- yield PlacesUtils.bookmarks.remove(bm);
-
- // Expire now.
- yield promiseForceExpirationStep();
-
- // Check that visits survived.
- do_check_eq(visits_in_database("http://page1.mozilla.org/"), 1);
- do_check_eq(visits_in_database("http://page2.mozilla.org/"), 1);
- do_check_false(page_in_database("http://page3.mozilla.org/"));
-
- // Clean up.
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* test_expire_limited()
-{
- yield PlacesTestUtils.addVisits([
- { // Should be expired cause it's the oldest visit
- uri: "http://old.mozilla.org/",
- visitDate: gNow++
- },
- { // Should not be expired cause we limit 1
- uri: "http://new.mozilla.org/",
- visitDate: gNow++
- },
- ]);
-
- // Expire now.
- yield promiseForceExpirationStep(1);
-
- // Check that newer visit survived.
- do_check_eq(visits_in_database("http://new.mozilla.org/"), 1);
- // Other visits should have been expired.
- do_check_false(page_in_database("http://old.mozilla.org/"));
-
- // Clean up.
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* test_expire_limited_longurl()
-{
- let longurl = "http://long.mozilla.org/" + "a".repeat(232);
- yield PlacesTestUtils.addVisits([
- { // Should be expired cause it's the oldest visit
- uri: "http://old.mozilla.org/",
- visitDate: gNow++
- },
- { // Should be expired cause it's a long url older than 60 days.
- uri: longurl,
- visitDate: gNow++
- },
- { // Should not be expired cause younger than 60 days.
- uri: longurl,
- visitDate: getExpirablePRTime(58)
- }
- ]);
-
- yield promiseForceExpirationStep(1);
-
- // Check that some visits survived.
- do_check_eq(visits_in_database(longurl), 1);
- // Other visits should have been expired.
- do_check_false(page_in_database("http://old.mozilla.org/"));
-
- // Clean up.
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* test_expire_limited_exoticurl()
-{
- yield PlacesTestUtils.addVisits([
- { // Should be expired cause it's the oldest visit
- uri: "http://old.mozilla.org/",
- visitDate: gNow++
- },
- { // Should be expired cause it's a long url older than 60 days.
- uri: "http://download.mozilla.org",
- visitDate: gNow++,
- transition: 7
- },
- { // Should not be expired cause younger than 60 days.
- uri: "http://nonexpirable-download.mozilla.org",
- visitDate: getExpirablePRTime(58),
- transition: 7
- }
- ]);
-
- yield promiseForceExpirationStep(1);
-
- // Check that some visits survived.
- do_check_eq(visits_in_database("http://nonexpirable-download.mozilla.org/"), 1);
- // The visits are gone, the url is not yet, cause we limited the expiration
- // to one entry, and we already removed http://old.mozilla.org/.
- // The page normally would be expired by the next expiration run.
- do_check_eq(visits_in_database("http://download.mozilla.org/"), 0);
- // Other visits should have been expired.
- do_check_false(page_in_database("http://old.mozilla.org/"));
-
- // Clean up.
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* test_expire_unlimited()
-{
- let longurl = "http://long.mozilla.org/" + "a".repeat(232);
- yield PlacesTestUtils.addVisits([
- {
- uri: "http://old.mozilla.org/",
- visitDate: gNow++
- },
- {
- uri: "http://new.mozilla.org/",
- visitDate: gNow++
- },
- // Add expirable visits.
- {
- uri: "http://download.mozilla.org/",
- visitDate: gNow++,
- transition: PlacesUtils.history.TRANSITION_DOWNLOAD
- },
- {
- uri: longurl,
- visitDate: gNow++
- },
-
- // Add non-expirable visits
- {
- uri: "http://nonexpirable.mozilla.org/",
- visitDate: getExpirablePRTime(5)
- },
- {
- uri: "http://nonexpirable-download.mozilla.org/",
- visitDate: getExpirablePRTime(5),
- transition: PlacesUtils.history.TRANSITION_DOWNLOAD
- },
- {
- uri: longurl,
- visitDate: getExpirablePRTime(5)
- }
- ]);
-
- yield promiseForceExpirationStep(-1);
-
- // Check that some visits survived.
- do_check_eq(visits_in_database("http://nonexpirable.mozilla.org/"), 1);
- do_check_eq(visits_in_database("http://nonexpirable-download.mozilla.org/"), 1);
- do_check_eq(visits_in_database(longurl), 1);
- // Other visits should have been expired.
- do_check_false(page_in_database("http://old.mozilla.org/"));
- do_check_false(page_in_database("http://download.mozilla.org/"));
- do_check_false(page_in_database("http://new.mozilla.org/"));
-
- // Clean up.
- yield PlacesTestUtils.clearHistory();
-});
-
-function run_test()
-{
- // Set interval to a large value so we don't expire on it.
- setInterval(3600); // 1h
- // Set maxPages to a low value, so it's easy to go over it.
- setMaxPages(1);
-
- run_next_test();
-}
diff --git a/toolkit/components/places/tests/expiration/test_idle_daily.js b/toolkit/components/places/tests/expiration/test_idle_daily.js
deleted file mode 100644
index 05e5a8125a..0000000000
--- a/toolkit/components/places/tests/expiration/test_idle_daily.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Test that expiration runs on idle-daily.
-
-function run_test() {
- do_test_pending();
-
- // Set interval to a large value so we don't expire on it.
- setInterval(3600); // 1h
-
- Services.obs.addObserver(function observeExpiration(aSubject, aTopic, aData) {
- Services.obs.removeObserver(observeExpiration,
- PlacesUtils.TOPIC_EXPIRATION_FINISHED);
- do_test_finished();
- }, PlacesUtils.TOPIC_EXPIRATION_FINISHED, false);
-
- let expire = Cc["@mozilla.org/places/expiration;1"].
- getService(Ci.nsIObserver);
- expire.observe(null, "idle-daily", null);
-}
diff --git a/toolkit/components/places/tests/expiration/test_notifications.js b/toolkit/components/places/tests/expiration/test_notifications.js
deleted file mode 100644
index 06e585c6cd..0000000000
--- a/toolkit/components/places/tests/expiration/test_notifications.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
- * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
- * 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/. */
-
-/**
- * What this is aimed to test:
- *
- * Ensure that History (through category cache) notifies us just once.
- */
-
-var os = Cc["@mozilla.org/observer-service;1"].
- getService(Ci.nsIObserverService);
-
-var gObserver = {
- notifications: 0,
- observe: function(aSubject, aTopic, aData) {
- this.notifications++;
- }
-};
-os.addObserver(gObserver, PlacesUtils.TOPIC_EXPIRATION_FINISHED, false);
-
-function run_test() {
- // Set interval to a large value so we don't expire on it.
- setInterval(3600); // 1h
-
- PlacesTestUtils.clearHistory();
-
- do_timeout(2000, check_result);
- do_test_pending();
-}
-
-function check_result() {
- os.removeObserver(gObserver, PlacesUtils.TOPIC_EXPIRATION_FINISHED);
- do_check_eq(gObserver.notifications, 1);
- do_test_finished();
-}
diff --git a/toolkit/components/places/tests/expiration/test_notifications_onDeleteURI.js b/toolkit/components/places/tests/expiration/test_notifications_onDeleteURI.js
deleted file mode 100644
index f70cd2b586..0000000000
--- a/toolkit/components/places/tests/expiration/test_notifications_onDeleteURI.js
+++ /dev/null
@@ -1,114 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
- * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
- * 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/. */
-
-/**
- * What this is aimed to test:
- *
- * Expiring a full page should fire an onDeleteURI notification.
- */
-
-var hs = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
-
-var tests = [
-
- { desc: "Add 1 bookmarked page.",
- addPages: 1,
- addBookmarks: 1,
- expectedNotifications: 0, // No expirable pages.
- },
-
- { desc: "Add 2 pages, 1 bookmarked.",
- addPages: 2,
- addBookmarks: 1,
- expectedNotifications: 1, // Only one expirable page.
- },
-
- { desc: "Add 10 pages, none bookmarked.",
- addPages: 10,
- addBookmarks: 0,
- expectedNotifications: 10, // Will expire everything.
- },
-
- { desc: "Add 10 pages, all bookmarked.",
- addPages: 10,
- addBookmarks: 10,
- expectedNotifications: 0, // No expirable pages.
- },
-
-];
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* test_notifications_onDeleteURI() {
- // Set interval to a large value so we don't expire on it.
- setInterval(3600); // 1h
-
- // Expire anything that is expirable.
- setMaxPages(0);
-
- for (let testIndex = 1; testIndex <= tests.length; testIndex++) {
- let currentTest = tests[testIndex -1];
- print("\nTEST " + testIndex + ": " + currentTest.desc);
- currentTest.receivedNotifications = 0;
-
- // Setup visits.
- let now = getExpirablePRTime();
- for (let i = 0; i < currentTest.addPages; i++) {
- let page = "http://" + testIndex + "." + i + ".mozilla.org/";
- yield PlacesTestUtils.addVisits({ uri: uri(page), visitDate: now++ });
- }
-
- // Setup bookmarks.
- currentTest.bookmarks = [];
- for (let i = 0; i < currentTest.addBookmarks; i++) {
- let page = "http://" + testIndex + "." + i + ".mozilla.org/";
- yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- title: null,
- url: page
- });
- currentTest.bookmarks.push(page);
- }
-
- // Observe history.
- historyObserver = {
- onBeginUpdateBatch: function PEX_onBeginUpdateBatch() {},
- onEndUpdateBatch: function PEX_onEndUpdateBatch() {},
- onClearHistory: function() {},
- onVisit: function() {},
- onTitleChanged: function() {},
- onDeleteURI: function(aURI, aGUID, aReason) {
- currentTest.receivedNotifications++;
- // Check this uri was not bookmarked.
- do_check_eq(currentTest.bookmarks.indexOf(aURI.spec), -1);
- do_check_valid_places_guid(aGUID);
- do_check_eq(aReason, Ci.nsINavHistoryObserver.REASON_EXPIRED);
- },
- onPageChanged: function() {},
- onDeleteVisits: function(aURI, aTime) { },
- };
- hs.addObserver(historyObserver, false);
-
- // Expire now.
- yield promiseForceExpirationStep(-1);
-
- hs.removeObserver(historyObserver, false);
-
- do_check_eq(currentTest.receivedNotifications,
- currentTest.expectedNotifications);
-
- // Clean up.
- yield PlacesUtils.bookmarks.eraseEverything();
- yield PlacesTestUtils.clearHistory();
- }
-
- clearMaxPages();
- yield PlacesUtils.bookmarks.eraseEverything();
- yield PlacesTestUtils.clearHistory();
-});
diff --git a/toolkit/components/places/tests/expiration/test_notifications_onDeleteVisits.js b/toolkit/components/places/tests/expiration/test_notifications_onDeleteVisits.js
deleted file mode 100644
index e6b99ff8ba..0000000000
--- a/toolkit/components/places/tests/expiration/test_notifications_onDeleteVisits.js
+++ /dev/null
@@ -1,142 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
- * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
- * 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/. */
-
-/**
- * What this is aimed to test:
- *
- * Expiring only visits for a page, but not the full page, should fire an
- * onDeleteVisits notification.
- */
-
-var hs = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
-
-var tests = [
-
- { desc: "Add 1 bookmarked page.",
- addPages: 1,
- visitsPerPage: 1,
- addBookmarks: 1,
- limitExpiration: -1,
- expectedNotifications: 1, // Will expire visits for 1 page.
- },
-
- { desc: "Add 2 pages, 1 bookmarked.",
- addPages: 2,
- visitsPerPage: 1,
- addBookmarks: 1,
- limitExpiration: -1,
- expectedNotifications: 1, // Will expire visits for 1 page.
- },
-
- { desc: "Add 10 pages, none bookmarked.",
- addPages: 10,
- visitsPerPage: 1,
- addBookmarks: 0,
- limitExpiration: -1,
- expectedNotifications: 0, // Will expire only full pages.
- },
-
- { desc: "Add 10 pages, all bookmarked.",
- addPages: 10,
- visitsPerPage: 1,
- addBookmarks: 10,
- limitExpiration: -1,
- expectedNotifications: 10, // Will expire visist for all pages.
- },
-
- { desc: "Add 10 pages with lot of visits, none bookmarked.",
- addPages: 10,
- visitsPerPage: 10,
- addBookmarks: 0,
- limitExpiration: 10,
- expectedNotifications: 10, // Will expire 1 visist for each page, but won't
- }, // expire pages since they still have visits.
-
-];
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* test_notifications_onDeleteVisits() {
- // Set interval to a large value so we don't expire on it.
- setInterval(3600); // 1h
-
- // Expire anything that is expirable.
- setMaxPages(0);
-
- for (let testIndex = 1; testIndex <= tests.length; testIndex++) {
- let currentTest = tests[testIndex -1];
- print("\nTEST " + testIndex + ": " + currentTest.desc);
- currentTest.receivedNotifications = 0;
-
- // Setup visits.
- let timeInMicroseconds = getExpirablePRTime(8);
-
- function newTimeInMicroseconds() {
- timeInMicroseconds = timeInMicroseconds + 1000;
- return timeInMicroseconds;
- }
-
- for (let j = 0; j < currentTest.visitsPerPage; j++) {
- for (let i = 0; i < currentTest.addPages; i++) {
- let page = "http://" + testIndex + "." + i + ".mozilla.org/";
- yield PlacesTestUtils.addVisits({ uri: uri(page), visitDate: newTimeInMicroseconds() });
- }
- }
-
- // Setup bookmarks.
- currentTest.bookmarks = [];
- for (let i = 0; i < currentTest.addBookmarks; i++) {
- let page = "http://" + testIndex + "." + i + ".mozilla.org/";
- yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- title: null,
- url: page
- });
- currentTest.bookmarks.push(page);
- }
-
- // Observe history.
- historyObserver = {
- onBeginUpdateBatch: function PEX_onBeginUpdateBatch() {},
- onEndUpdateBatch: function PEX_onEndUpdateBatch() {},
- onClearHistory: function() {},
- onVisit: function() {},
- onTitleChanged: function() {},
- onDeleteURI: function(aURI, aGUID, aReason) {
- // Check this uri was not bookmarked.
- do_check_eq(currentTest.bookmarks.indexOf(aURI.spec), -1);
- do_check_valid_places_guid(aGUID);
- do_check_eq(aReason, Ci.nsINavHistoryObserver.REASON_EXPIRED);
- },
- onPageChanged: function() {},
- onDeleteVisits: function(aURI, aTime, aGUID, aReason) {
- currentTest.receivedNotifications++;
- do_check_guid_for_uri(aURI, aGUID);
- do_check_eq(aReason, Ci.nsINavHistoryObserver.REASON_EXPIRED);
- },
- };
- hs.addObserver(historyObserver, false);
-
- // Expire now.
- yield promiseForceExpirationStep(currentTest.limitExpiration);
-
- hs.removeObserver(historyObserver, false);
-
- do_check_eq(currentTest.receivedNotifications,
- currentTest.expectedNotifications);
-
- // Clean up.
- yield PlacesUtils.bookmarks.eraseEverything();
- yield PlacesTestUtils.clearHistory();
- }
-
- clearMaxPages();
- yield PlacesUtils.bookmarks.eraseEverything();
- yield PlacesTestUtils.clearHistory();
-});
diff --git a/toolkit/components/places/tests/expiration/test_outdated_analyze.js b/toolkit/components/places/tests/expiration/test_outdated_analyze.js
deleted file mode 100644
index 9cf61f06b2..0000000000
--- a/toolkit/components/places/tests/expiration/test_outdated_analyze.js
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Test that expiration executes ANALYZE when statistics are outdated.
-
-const TEST_URL = "http://www.mozilla.org/";
-
-XPCOMUtils.defineLazyServiceGetter(this, "gHistory",
- "@mozilla.org/browser/history;1",
- "mozIAsyncHistory");
-
-/**
- * Object that represents a mozIVisitInfo object.
- *
- * @param [optional] aTransitionType
- * The transition type of the visit. Defaults to TRANSITION_LINK if not
- * provided.
- * @param [optional] aVisitTime
- * The time of the visit. Defaults to now if not provided.
- */
-function VisitInfo(aTransitionType, aVisitTime) {
- this.transitionType =
- aTransitionType === undefined ? TRANSITION_LINK : aTransitionType;
- this.visitDate = aVisitTime || Date.now() * 1000;
-}
-
-function run_test() {
- do_test_pending();
-
- // Init expiration before "importing".
- force_expiration_start();
-
- // Add a bunch of pages (at laast IMPORT_PAGES_THRESHOLD pages).
- let places = [];
- for (let i = 0; i < 100; i++) {
- places.push({
- uri: NetUtil.newURI(TEST_URL + i),
- title: "Title" + i,
- visits: [new VisitInfo]
- });
- }
- gHistory.updatePlaces(places);
-
- // Set interval to a small value to expire on it.
- setInterval(1); // 1s
-
- Services.obs.addObserver(function observeExpiration(aSubject, aTopic, aData) {
- Services.obs.removeObserver(observeExpiration,
- PlacesUtils.TOPIC_EXPIRATION_FINISHED);
-
- // Check that statistica are up-to-date.
- let stmt = DBConn().createAsyncStatement(
- "SELECT (SELECT COUNT(*) FROM moz_places) - "
- + "(SELECT SUBSTR(stat,1,LENGTH(stat)-2) FROM sqlite_stat1 "
- + "WHERE idx = 'moz_places_url_hashindex')"
- );
- stmt.executeAsync({
- handleResult: function(aResultSet) {
- let row = aResultSet.getNextRow();
- this._difference = row.getResultByIndex(0);
- },
- handleError: function(aError) {
- do_throw("Unexpected error (" + aError.result + "): " + aError.message);
- },
- handleCompletion: function(aReason) {
- do_check_true(this._difference === 0);
- do_test_finished();
- }
- });
- stmt.finalize();
- }, PlacesUtils.TOPIC_EXPIRATION_FINISHED, false);
-}
diff --git a/toolkit/components/places/tests/expiration/test_pref_interval.js b/toolkit/components/places/tests/expiration/test_pref_interval.js
deleted file mode 100644
index 44c749d7a0..0000000000
--- a/toolkit/components/places/tests/expiration/test_pref_interval.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * What this is aimed to test:
- *
- * Expiration relies on an interval, that is user-preffable setting
- * "places.history.expiration.interval_seconds".
- * On pref change it will stop current interval timer and fire a new one,
- * that will obey the new value.
- * If the pref is set to a number <= 0 we will use the default value.
- */
-
-// Default timer value for expiration in seconds. Must have same value as
-// PREF_INTERVAL_SECONDS_NOTSET in nsPlacesExpiration.
-const DEFAULT_TIMER_DELAY_SECONDS = 3 * 60;
-
-// Sync this with the const value in the component.
-const EXPIRE_AGGRESSIVITY_MULTIPLIER = 3;
-
-var tests = [
-
- // This test should be the first, so the interval won't be influenced by
- // status of history.
- { desc: "Set interval to 1s.",
- interval: 1,
- expectedTimerDelay: 1
- },
-
- { desc: "Set interval to a negative value.",
- interval: -1,
- expectedTimerDelay: DEFAULT_TIMER_DELAY_SECONDS
- },
-
- { desc: "Set interval to 0.",
- interval: 0,
- expectedTimerDelay: DEFAULT_TIMER_DELAY_SECONDS
- },
-
- { desc: "Set interval to a large value.",
- interval: 100,
- expectedTimerDelay: 100
- },
-
-];
-
-add_task(function* test() {
- // The pref should not exist by default.
- Assert.throws(() => getInterval());
-
- // Force the component, so it will start observing preferences.
- force_expiration_start();
-
- for (let currentTest of tests) {
- print(currentTest.desc);
- let promise = promiseTopicObserved("test-interval-changed");
- setInterval(currentTest.interval);
- let [, data] = yield promise;
- Assert.equal(data, currentTest.expectedTimerDelay * EXPIRE_AGGRESSIVITY_MULTIPLIER);
- }
-
- clearInterval();
-});
-
diff --git a/toolkit/components/places/tests/expiration/test_pref_maxpages.js b/toolkit/components/places/tests/expiration/test_pref_maxpages.js
deleted file mode 100644
index 6a237afbb9..0000000000
--- a/toolkit/components/places/tests/expiration/test_pref_maxpages.js
+++ /dev/null
@@ -1,124 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
- * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
- * 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/. */
-
-/**
- * What this is aimed to test:
- *
- * Expiration will obey to hardware spec, but user can set a custom maximum
- * number of pages to retain, to restrict history, through
- * "places.history.expiration.max_pages".
- * This limit is used at next expiration run.
- * If the pref is set to a number < 0 we will use the default value.
- */
-
-var hs = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
-
-var tests = [
-
- { desc: "Set max_pages to a negative value, with 1 page.",
- maxPages: -1,
- addPages: 1,
- expectedNotifications: 0, // Will ignore and won't expire anything.
- },
-
- { desc: "Set max_pages to 0.",
- maxPages: 0,
- addPages: 1,
- expectedNotifications: 1,
- },
-
- { desc: "Set max_pages to 0, with 2 pages.",
- maxPages: 0,
- addPages: 2,
- expectedNotifications: 2, // Will expire everything.
- },
-
- // Notice if we are over limit we do a full step of expiration. So we ensure
- // that we will expire if we are over the limit, but we don't ensure that we
- // will expire exactly up to the limit. Thus in this case we expire
- // everything.
- { desc: "Set max_pages to 1 with 2 pages.",
- maxPages: 1,
- addPages: 2,
- expectedNotifications: 2, // Will expire everything (in this case).
- },
-
- { desc: "Set max_pages to 10, with 9 pages.",
- maxPages: 10,
- addPages: 9,
- expectedNotifications: 0, // We are at the limit, won't expire anything.
- },
-
- { desc: "Set max_pages to 10 with 10 pages.",
- maxPages: 10,
- addPages: 10,
- expectedNotifications: 0, // We are below the limit, won't expire anything.
- },
-];
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* test_pref_maxpages() {
- // The pref should not exist by default.
- try {
- getMaxPages();
- do_throw("interval pref should not exist by default");
- }
- catch (ex) {}
-
- // Set interval to a large value so we don't expire on it.
- setInterval(3600); // 1h
-
- for (let testIndex = 1; testIndex <= tests.length; testIndex++) {
- let currentTest = tests[testIndex -1];
- print("\nTEST " + testIndex + ": " + currentTest.desc);
- currentTest.receivedNotifications = 0;
-
- // Setup visits.
- let now = getExpirablePRTime();
- for (let i = 0; i < currentTest.addPages; i++) {
- let page = "http://" + testIndex + "." + i + ".mozilla.org/";
- yield PlacesTestUtils.addVisits({ uri: uri(page), visitDate: now++ });
- }
-
- // Observe history.
- let historyObserver = {
- onBeginUpdateBatch: function PEX_onBeginUpdateBatch() {},
- onEndUpdateBatch: function PEX_onEndUpdateBatch() {},
- onClearHistory: function() {},
- onVisit: function() {},
- onTitleChanged: function() {},
- onDeleteURI: function(aURI) {
- print("onDeleteURI " + aURI.spec);
- currentTest.receivedNotifications++;
- },
- onPageChanged: function() {},
- onDeleteVisits: function(aURI, aTime) {
- print("onDeleteVisits " + aURI.spec + " " + aTime);
- },
- };
- hs.addObserver(historyObserver, false);
-
- setMaxPages(currentTest.maxPages);
-
- // Expire now.
- yield promiseForceExpirationStep(-1);
-
- hs.removeObserver(historyObserver, false);
-
- do_check_eq(currentTest.receivedNotifications,
- currentTest.expectedNotifications);
-
- // Clean up.
- yield PlacesTestUtils.clearHistory();
- }
-
- clearMaxPages();
- yield PlacesTestUtils.clearHistory();
-});
diff --git a/toolkit/components/places/tests/expiration/xpcshell.ini b/toolkit/components/places/tests/expiration/xpcshell.ini
deleted file mode 100644
index cda7ac052c..0000000000
--- a/toolkit/components/places/tests/expiration/xpcshell.ini
+++ /dev/null
@@ -1,22 +0,0 @@
-[DEFAULT]
-head = head_expiration.js
-tail =
-skip-if = toolkit == 'android'
-
-[test_analyze_runs.js]
-# Bug 676989: test hangs consistently on Android
-skip-if = os == "android"
-[test_annos_expire_history.js]
-[test_annos_expire_never.js]
-[test_annos_expire_policy.js]
-[test_annos_expire_session.js]
-[test_clearHistory.js]
-[test_debug_expiration.js]
-[test_idle_daily.js]
-[test_notifications.js]
-[test_notifications_onDeleteURI.js]
-[test_notifications_onDeleteVisits.js]
-[test_outdated_analyze.js]
-[test_pref_interval.js]
-[test_pref_maxpages.js]
-skip-if = os == "linux" # bug 1284083
diff --git a/toolkit/components/places/tests/favicons/.eslintrc.js b/toolkit/components/places/tests/favicons/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/places/tests/favicons/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/places/tests/favicons/expected-favicon-big32.jpg.png b/toolkit/components/places/tests/favicons/expected-favicon-big32.jpg.png
deleted file mode 100644
index 7230087710..0000000000
--- a/toolkit/components/places/tests/favicons/expected-favicon-big32.jpg.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/favicons/expected-favicon-big4.jpg.png b/toolkit/components/places/tests/favicons/expected-favicon-big4.jpg.png
deleted file mode 100644
index 9932c18fb8..0000000000
--- a/toolkit/components/places/tests/favicons/expected-favicon-big4.jpg.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/favicons/expected-favicon-big48.ico.png b/toolkit/components/places/tests/favicons/expected-favicon-big48.ico.png
deleted file mode 100644
index 9f16bef433..0000000000
--- a/toolkit/components/places/tests/favicons/expected-favicon-big48.ico.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/favicons/expected-favicon-big64.png.png b/toolkit/components/places/tests/favicons/expected-favicon-big64.png.png
deleted file mode 100644
index ed158d1611..0000000000
--- a/toolkit/components/places/tests/favicons/expected-favicon-big64.png.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/favicons/expected-favicon-scale160x3.jpg.png b/toolkit/components/places/tests/favicons/expected-favicon-scale160x3.jpg.png
deleted file mode 100644
index 585c9e897e..0000000000
--- a/toolkit/components/places/tests/favicons/expected-favicon-scale160x3.jpg.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/favicons/expected-favicon-scale3x160.jpg.png b/toolkit/components/places/tests/favicons/expected-favicon-scale3x160.jpg.png
deleted file mode 100644
index e07dabc793..0000000000
--- a/toolkit/components/places/tests/favicons/expected-favicon-scale3x160.jpg.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/favicons/favicon-big16.ico b/toolkit/components/places/tests/favicons/favicon-big16.ico
deleted file mode 100644
index d44438903b..0000000000
--- a/toolkit/components/places/tests/favicons/favicon-big16.ico
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/favicons/favicon-big32.jpg b/toolkit/components/places/tests/favicons/favicon-big32.jpg
deleted file mode 100644
index b2131bf0c1..0000000000
--- a/toolkit/components/places/tests/favicons/favicon-big32.jpg
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/favicons/favicon-big4.jpg b/toolkit/components/places/tests/favicons/favicon-big4.jpg
deleted file mode 100644
index b84fcd35a6..0000000000
--- a/toolkit/components/places/tests/favicons/favicon-big4.jpg
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/favicons/favicon-big48.ico b/toolkit/components/places/tests/favicons/favicon-big48.ico
deleted file mode 100644
index f22522411d..0000000000
--- a/toolkit/components/places/tests/favicons/favicon-big48.ico
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/favicons/favicon-big64.png b/toolkit/components/places/tests/favicons/favicon-big64.png
deleted file mode 100644
index 2756cf0cb3..0000000000
--- a/toolkit/components/places/tests/favicons/favicon-big64.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/favicons/favicon-normal16.png b/toolkit/components/places/tests/favicons/favicon-normal16.png
deleted file mode 100644
index 62b69a3d03..0000000000
--- a/toolkit/components/places/tests/favicons/favicon-normal16.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/favicons/favicon-normal32.png b/toolkit/components/places/tests/favicons/favicon-normal32.png
deleted file mode 100644
index 5535363c94..0000000000
--- a/toolkit/components/places/tests/favicons/favicon-normal32.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/favicons/favicon-scale160x3.jpg b/toolkit/components/places/tests/favicons/favicon-scale160x3.jpg
deleted file mode 100644
index 422ee7ea0b..0000000000
--- a/toolkit/components/places/tests/favicons/favicon-scale160x3.jpg
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/favicons/favicon-scale3x160.jpg b/toolkit/components/places/tests/favicons/favicon-scale3x160.jpg
deleted file mode 100644
index e8514966a0..0000000000
--- a/toolkit/components/places/tests/favicons/favicon-scale3x160.jpg
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/favicons/head_favicons.js b/toolkit/components/places/tests/favicons/head_favicons.js
deleted file mode 100644
index cc81791e87..0000000000
--- a/toolkit/components/places/tests/favicons/head_favicons.js
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var Ci = Components.interfaces;
-var Cc = Components.classes;
-var Cr = Components.results;
-var Cu = Components.utils;
-
-Cu.import("resource://gre/modules/Services.jsm");
-
-// Import common head.
-{
- let commonFile = do_get_file("../head_common.js", false);
- let uri = Services.io.newFileURI(commonFile);
- Services.scriptloader.loadSubScript(uri.spec, this);
-}
-
-// Put any other stuff relative to this test folder below.
-
-
-// This error icon must stay in sync with FAVICON_ERRORPAGE_URL in
-// nsIFaviconService.idl, aboutCertError.xhtml and netError.xhtml.
-const FAVICON_ERRORPAGE_URI =
- NetUtil.newURI("chrome://global/skin/icons/warning-16.png");
-
-/**
- * Waits for the first OnPageChanged notification for ATTRIBUTE_FAVICON, and
- * verifies that it matches the expected page URI and associated favicon URI.
- *
- * This function also double-checks the GUID parameter of the notification.
- *
- * @param aExpectedPageURI
- * nsIURI object of the page whose favicon should change.
- * @param aExpectedFaviconURI
- * nsIURI object of the newly associated favicon.
- * @param aCallback
- * This function is called after the check finished.
- */
-function waitForFaviconChanged(aExpectedPageURI, aExpectedFaviconURI,
- aCallback) {
- let historyObserver = {
- __proto__: NavHistoryObserver.prototype,
- onPageChanged: function WFFC_onPageChanged(aURI, aWhat, aValue, aGUID) {
- if (aWhat != Ci.nsINavHistoryObserver.ATTRIBUTE_FAVICON) {
- return;
- }
- PlacesUtils.history.removeObserver(this);
-
- do_check_true(aURI.equals(aExpectedPageURI));
- do_check_eq(aValue, aExpectedFaviconURI.spec);
- do_check_guid_for_uri(aURI, aGUID);
- aCallback();
- }
- };
- PlacesUtils.history.addObserver(historyObserver, false);
-}
-
-/**
- * Checks that the favicon for the given page matches the provided data.
- *
- * @param aPageURI
- * nsIURI object for the page to check.
- * @param aExpectedMimeType
- * Expected MIME type of the icon, for example "image/png".
- * @param aExpectedData
- * Expected icon data, expressed as an array of byte values.
- * @param aCallback
- * This function is called after the check finished.
- */
-function checkFaviconDataForPage(aPageURI, aExpectedMimeType, aExpectedData,
- aCallback) {
- PlacesUtils.favicons.getFaviconDataForPage(aPageURI,
- function (aURI, aDataLen, aData, aMimeType) {
- do_check_eq(aExpectedMimeType, aMimeType);
- do_check_true(compareArrays(aExpectedData, aData));
- do_check_guid_for_uri(aPageURI);
- aCallback();
- });
-}
-
-/**
- * Checks that the given page has no associated favicon.
- *
- * @param aPageURI
- * nsIURI object for the page to check.
- * @param aCallback
- * This function is called after the check finished.
- */
-function checkFaviconMissingForPage(aPageURI, aCallback) {
- PlacesUtils.favicons.getFaviconURLForPage(aPageURI,
- function (aURI, aDataLen, aData, aMimeType) {
- do_check_true(aURI === null);
- aCallback();
- });
-}
-
-function promiseFaviconMissingForPage(aPageURI) {
- return new Promise(resolve => checkFaviconMissingForPage(aPageURI, resolve));
-}
-
-function promiseFaviconChanged(aExpectedPageURI, aExpectedFaviconURI) {
- return new Promise(resolve => waitForFaviconChanged(aExpectedPageURI, aExpectedFaviconURI, resolve));
-}
diff --git a/toolkit/components/places/tests/favicons/test_expireAllFavicons.js b/toolkit/components/places/tests/favicons/test_expireAllFavicons.js
deleted file mode 100644
index c5d8edfdda..0000000000
--- a/toolkit/components/places/tests/favicons/test_expireAllFavicons.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * This file tests that favicons are correctly expired by expireAllFavicons.
- */
-
-"use strict";
-
-const TEST_PAGE_URI = NetUtil.newURI("http://example.com/");
-const BOOKMARKED_PAGE_URI = NetUtil.newURI("http://example.com/bookmarked");
-
-add_task(function* test_expireAllFavicons() {
- // Add a visited page.
- yield PlacesTestUtils.addVisits({ uri: TEST_PAGE_URI, transition: TRANSITION_TYPED });
-
- // Set a favicon for our test page.
- yield promiseSetIconForPage(TEST_PAGE_URI, SMALLPNG_DATA_URI);
-
- // Add a page with a bookmark.
- yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- url: BOOKMARKED_PAGE_URI,
- title: "Test bookmark"
- });
-
- // Set a favicon for our bookmark.
- yield promiseSetIconForPage(BOOKMARKED_PAGE_URI, SMALLPNG_DATA_URI);
-
- // Start expiration only after data has been saved in the database.
- let promise = promiseTopicObserved(PlacesUtils.TOPIC_FAVICONS_EXPIRED);
- PlacesUtils.favicons.expireAllFavicons();
- yield promise;
-
- // Check that the favicons for the pages we added were removed.
- yield promiseFaviconMissingForPage(TEST_PAGE_URI);
- yield promiseFaviconMissingForPage(BOOKMARKED_PAGE_URI);
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/places/tests/favicons/test_favicons_conversions.js b/toolkit/components/places/tests/favicons/test_favicons_conversions.js
deleted file mode 100644
index fa0d332ecf..0000000000
--- a/toolkit/components/places/tests/favicons/test_favicons_conversions.js
+++ /dev/null
@@ -1,131 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * This file tests the image conversions done by the favicon service.
- */
-
-// Globals
-
-// The pixel values we get on Windows are sometimes +/- 1 value compared to
-// other platforms, so we need to skip some image content tests.
-var isWindows = ("@mozilla.org/windows-registry-key;1" in Cc);
-
-/**
- * Checks the conversion of the given test image file.
- *
- * @param aFileName
- * File that contains the favicon image, located in the test folder.
- * @param aFileMimeType
- * MIME type of the image contained in the file.
- * @param aFileLength
- * Expected length of the file.
- * @param aExpectConversion
- * If false, the icon should be stored as is. If true, the expected data
- * is loaded from a file named "expected-" + aFileName + ".png".
- * @param aVaryOnWindows
- * Indicates that the content of the converted image can be different on
- * Windows and should not be checked on that platform.
- * @param aCallback
- * This function is called after the check finished.
- */
-function checkFaviconDataConversion(aFileName, aFileMimeType, aFileLength,
- aExpectConversion, aVaryOnWindows,
- aCallback) {
- let pageURI = NetUtil.newURI("http://places.test/page/" + aFileName);
- PlacesTestUtils.addVisits({ uri: pageURI, transition: TRANSITION_TYPED }).then(
- function () {
- let faviconURI = NetUtil.newURI("http://places.test/icon/" + aFileName);
- let fileData = readFileOfLength(aFileName, aFileLength);
-
- PlacesUtils.favicons.replaceFaviconData(faviconURI, fileData, fileData.length,
- aFileMimeType);
- PlacesUtils.favicons.setAndFetchFaviconForPage(pageURI, faviconURI, true,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- function CFDC_verify(aURI, aDataLen, aData, aMimeType) {
- if (!aExpectConversion) {
- do_check_true(compareArrays(aData, fileData));
- do_check_eq(aMimeType, aFileMimeType);
- } else {
- if (!aVaryOnWindows || !isWindows) {
- let expectedFile = do_get_file("expected-" + aFileName + ".png");
- do_check_true(compareArrays(aData, readFileData(expectedFile)));
- }
- do_check_eq(aMimeType, "image/png");
- }
-
- aCallback();
- }, Services.scriptSecurityManager.getSystemPrincipal());
- });
-}
-
-// Tests
-
-function run_test() {
- run_next_test();
-}
-
-add_test(function test_storing_a_normal_16x16_icon() {
- // 16x16 png, 286 bytes.
- // optimized: no
- checkFaviconDataConversion("favicon-normal16.png", "image/png", 286,
- false, false, run_next_test);
-});
-
-add_test(function test_storing_a_normal_32x32_icon() {
- // 32x32 png, 344 bytes.
- // optimized: no
- checkFaviconDataConversion("favicon-normal32.png", "image/png", 344,
- false, false, run_next_test);
-});
-
-add_test(function test_storing_a_big_16x16_icon() {
- // in: 16x16 ico, 1406 bytes.
- // optimized: no
- checkFaviconDataConversion("favicon-big16.ico", "image/x-icon", 1406,
- false, false, run_next_test);
-});
-
-add_test(function test_storing_an_oversize_4x4_icon() {
- // in: 4x4 jpg, 4751 bytes.
- // optimized: yes
- checkFaviconDataConversion("favicon-big4.jpg", "image/jpeg", 4751,
- true, false, run_next_test);
-});
-
-add_test(function test_storing_an_oversize_32x32_icon() {
- // in: 32x32 jpg, 3494 bytes.
- // optimized: yes
- checkFaviconDataConversion("favicon-big32.jpg", "image/jpeg", 3494,
- true, true, run_next_test);
-});
-
-add_test(function test_storing_an_oversize_48x48_icon() {
- // in: 48x48 ico, 56646 bytes.
- // (howstuffworks.com icon, contains 13 icons with sizes from 16x16 to
- // 48x48 in varying depths)
- // optimized: yes
- checkFaviconDataConversion("favicon-big48.ico", "image/x-icon", 56646,
- true, false, run_next_test);
-});
-
-add_test(function test_storing_an_oversize_64x64_icon() {
- // in: 64x64 png, 10698 bytes.
- // optimized: yes
- checkFaviconDataConversion("favicon-big64.png", "image/png", 10698,
- true, false, run_next_test);
-});
-
-add_test(function test_scaling_an_oversize_160x3_icon() {
- // in: 160x3 jpg, 5095 bytes.
- // optimized: yes
- checkFaviconDataConversion("favicon-scale160x3.jpg", "image/jpeg", 5095,
- true, false, run_next_test);
-});
-
-add_test(function test_scaling_an_oversize_3x160_icon() {
- // in: 3x160 jpg, 5059 bytes.
- // optimized: yes
- checkFaviconDataConversion("favicon-scale3x160.jpg", "image/jpeg", 5059,
- true, false, run_next_test);
-});
diff --git a/toolkit/components/places/tests/favicons/test_getFaviconDataForPage.js b/toolkit/components/places/tests/favicons/test_getFaviconDataForPage.js
deleted file mode 100644
index 73eea7436a..0000000000
--- a/toolkit/components/places/tests/favicons/test_getFaviconDataForPage.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * This file tests getFaviconDataForPage.
- */
-
-// Globals
-
-const FAVICON_URI = NetUtil.newURI(do_get_file("favicon-normal32.png"));
-const FAVICON_DATA = readFileData(do_get_file("favicon-normal32.png"));
-const FAVICON_MIMETYPE = "image/png";
-
-// Tests
-
-function run_test()
-{
- // Check that the favicon loaded correctly before starting the actual tests.
- do_check_eq(FAVICON_DATA.length, 344);
- run_next_test();
-}
-
-add_test(function test_normal()
-{
- let pageURI = NetUtil.newURI("http://example.com/normal");
-
- PlacesTestUtils.addVisits(pageURI).then(function () {
- PlacesUtils.favicons.setAndFetchFaviconForPage(
- pageURI, FAVICON_URI, true,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- function () {
- PlacesUtils.favicons.getFaviconDataForPage(pageURI,
- function (aURI, aDataLen, aData, aMimeType) {
- do_check_true(aURI.equals(FAVICON_URI));
- do_check_eq(FAVICON_DATA.length, aDataLen);
- do_check_true(compareArrays(FAVICON_DATA, aData));
- do_check_eq(FAVICON_MIMETYPE, aMimeType);
- run_next_test();
- });
- }, Services.scriptSecurityManager.getSystemPrincipal());
- });
-});
-
-add_test(function test_missing()
-{
- let pageURI = NetUtil.newURI("http://example.com/missing");
-
- PlacesUtils.favicons.getFaviconDataForPage(pageURI,
- function (aURI, aDataLen, aData, aMimeType) {
- // Check also the expected data types.
- do_check_true(aURI === null);
- do_check_true(aDataLen === 0);
- do_check_true(aData.length === 0);
- do_check_true(aMimeType === "");
- run_next_test();
- });
-});
diff --git a/toolkit/components/places/tests/favicons/test_getFaviconURLForPage.js b/toolkit/components/places/tests/favicons/test_getFaviconURLForPage.js
deleted file mode 100644
index fb2e23ff99..0000000000
--- a/toolkit/components/places/tests/favicons/test_getFaviconURLForPage.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * This file tests getFaviconURLForPage.
- */
-
-// Tests
-
-function run_test()
-{
- run_next_test();
-}
-
-add_test(function test_normal()
-{
- let pageURI = NetUtil.newURI("http://example.com/normal");
-
- PlacesTestUtils.addVisits(pageURI).then(function () {
- PlacesUtils.favicons.setAndFetchFaviconForPage(
- pageURI, SMALLPNG_DATA_URI, true,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- function () {
- PlacesUtils.favicons.getFaviconURLForPage(pageURI,
- function (aURI, aDataLen, aData, aMimeType) {
- do_check_true(aURI.equals(SMALLPNG_DATA_URI));
-
- // Check also the expected data types.
- do_check_true(aDataLen === 0);
- do_check_true(aData.length === 0);
- do_check_true(aMimeType === "");
- run_next_test();
- });
- }, Services.scriptSecurityManager.getSystemPrincipal());
- });
-});
-
-add_test(function test_missing()
-{
- let pageURI = NetUtil.newURI("http://example.com/missing");
-
- PlacesUtils.favicons.getFaviconURLForPage(pageURI,
- function (aURI, aDataLen, aData, aMimeType) {
- // Check also the expected data types.
- do_check_true(aURI === null);
- do_check_true(aDataLen === 0);
- do_check_true(aData.length === 0);
- do_check_true(aMimeType === "");
- run_next_test();
- });
-});
diff --git a/toolkit/components/places/tests/favicons/test_moz-anno_favicon_mime_type.js b/toolkit/components/places/tests/favicons/test_moz-anno_favicon_mime_type.js
deleted file mode 100644
index d055d8d61e..0000000000
--- a/toolkit/components/places/tests/favicons/test_moz-anno_favicon_mime_type.js
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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 test ensures that the mime type is set for moz-anno channels of favicons
- * properly. Added with work in bug 481227.
- */
-
-// Constants
-Cu.import("resource://gre/modules/NetUtil.jsm");
-
-const testFaviconData = "data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%04gAMA%00%00%AF%C87%05%8A%E9%00%00%00%19tEXtSoftware%00Adobe%20ImageReadyq%C9e%3C%00%00%01%D6IDATx%DAb%FC%FF%FF%3F%03%25%00%20%80%98%909%EF%DF%BFg%EF%EC%EC%FC%AD%AC%AC%FC%DF%95%91%F1%BF%89%89%C9%7F%20%FF%D7%EA%D5%AB%B7%DF%BBwO%16%9B%01%00%01%C4%00r%01%08%9F9s%C6%CD%D8%D8%F8%BF%0B%03%C3%FF3%40%BC%0A%88%EF%02q%1A%10%BB%40%F1%AAU%ABv%C1%D4%C30%40%00%81%89%993g%3E%06%1A%F6%3F%14%AA%11D%97%03%F1%7Fc%08%0D%E2%2B))%FD%17%04%89%A1%19%00%10%40%0C%D00%F8%0F3%00%C8%F8%BF%1B%E4%0Ac%88a%E5%60%17%19%FF%0F%0D%0D%05%1B%02v%D9%DD%BB%0A0%03%00%02%08%AC%B9%A3%A3%E3%17%03%D4v%90%01%EF%18%106%C3%0Cz%07%C5%BB%A1%DE%82y%07%20%80%A0%A6%08B%FCn%0C1%60%26%D4%20d%C3VA%C3%06%26%BE%0A%EA-%80%00%82%B9%E0%F7L4%0D%EF%90%F8%C6%60%2F%0A%82%BD%01%13%07%0700%D0%01%02%88%11%E4%02P%B41%DC%BB%C7%D0%014%0D%E8l%06W%20%06%BA%88%A1%1C%1AS%15%40%7C%16%CA6.%2Fgx%BFg%0F%83%CB%D9%B3%0C%7B%80%7C%80%00%02%BB%00%E8%9F%ED%20%1B%3A%A0%A6%9F%81%DA%DC%01%C5%B0%80%ED%80%FA%BF%BC%BC%FC%3F%83%12%90%9D%96%F6%1F%20%80%18%DE%BD%7B%C7%0E%8E%05AD%20%FEGr%A6%A0%A0%E0%7F%25P%80%02%9D%0F%D28%13%18%23%C6%C0%B0%02E%3D%C8%F5%00%01%04%8F%05P%A8%BA%40my%87%E4%12c%A8%8D%20%8B%D0%D3%00%08%03%04%10%9C%01R%E4%82d%3B%C8%A0%99%C6%90%90%C6%A5%19%84%01%02%08%9E%17%80%C9x%F7%7B%A0%DBVC%F9%A0%C0%5C%7D%16%2C%CE%00%F4%C6O%5C%99%09%20%800L%04y%A5%03%1A%95%A0%80%05%05%14.%DBA%18%20%80%18)%CD%CE%00%01%06%00%0C'%94%C7%C0k%C9%2C%00%00%00%00IEND%AEB%60%82";
-const moz_anno_favicon_prefix = "moz-anno:favicon:";
-
-// streamListener
-
-function streamListener(aExpectedContentType)
-{
- this._expectedContentType = aExpectedContentType;
-}
-streamListener.prototype =
-{
- onStartRequest: function(aRequest, aContext)
- {
- // We have other tests that make sure the data is what we expect. We just
- // need to check the content type here.
- let channel = aRequest.QueryInterface(Ci.nsIChannel);
- dump("*** Checking " + channel.URI.spec + "\n");
- do_check_eq(channel.contentType, this._expectedContentType);
-
- // If we somehow throw before doing the above check, the test will pass, so
- // we do this for extra sanity.
- this._checked = true;
- },
- onStopRequest: function()
- {
- do_check_true(this._checked);
- do_test_finished();
- },
- onDataAvailable: function(aRequest, aContext, aInputStream, aOffset, aCount)
- {
- aRequest.cancel(Cr.NS_ERROR_ABORT);
- }
-};
-
-// Test Runner
-
-function run_test()
-{
- let fs = Cc["@mozilla.org/browser/favicon-service;1"].
- getService(Ci.nsIFaviconService);
-
- // Test that the default icon has the content type of image/png.
- let channel = NetUtil.newChannel({
- uri: fs.defaultFavicon,
- loadUsingSystemPrincipal: true,
- contentPolicyType: Ci.nsIContentPolicy.TYPE_INTERNAL_IMAGE_FAVICON
- });
- channel.asyncOpen2(new streamListener("image/png"));
- do_test_pending();
-
- // Test URI that we don't know anything about. Will end up being the default
- // icon, so expect image/png.
- channel = NetUtil.newChannel({
- uri: moz_anno_favicon_prefix + "http://mozilla.org",
- loadUsingSystemPrincipal: true,
- contentPolicyType: Ci.nsIContentPolicy.TYPE_INTERNAL_IMAGE_FAVICON
- });
- channel.asyncOpen2(new streamListener("image/png"));
- do_test_pending();
-
- // Test that the content type of a favicon we add ends up being image/png.
- let testURI = uri("http://mozilla.org/");
- // Add the data before opening
- fs.replaceFaviconDataFromDataURL(testURI, testFaviconData,
- (Date.now() + 60 * 60 * 24 * 1000) * 1000,
- Services.scriptSecurityManager.getSystemPrincipal());
-
- // Open the channel
- channel = NetUtil.newChannel({
- uri: moz_anno_favicon_prefix + testURI.spec,
- loadUsingSystemPrincipal: true,
- contentPolicyType: Ci.nsIContentPolicy.TYPE_INTERNAL_IMAGE_FAVICON
- });
- channel.asyncOpen2(new streamListener("image/png"));
- do_test_pending();
-}
diff --git a/toolkit/components/places/tests/favicons/test_page-icon_protocol.js b/toolkit/components/places/tests/favicons/test_page-icon_protocol.js
deleted file mode 100644
index 5533d5135f..0000000000
--- a/toolkit/components/places/tests/favicons/test_page-icon_protocol.js
+++ /dev/null
@@ -1,66 +0,0 @@
-const ICON_DATA = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==";
-const TEST_URI = NetUtil.newURI("http://mozilla.org/");
-const ICON_URI = NetUtil.newURI("http://mozilla.org/favicon.ico");
-
-function fetchIconForSpec(spec) {
- return new Promise((resolve, reject) => {
- NetUtil.asyncFetch({
- uri: NetUtil.newURI("page-icon:" + TEST_URI.spec),
- loadUsingSystemPrincipal: true,
- contentPolicyType: Ci.nsIContentPolicy.TYPE_INTERNAL_IMAGE_FAVICON
- }, (input, status, request) => {
- if (!Components.isSuccessCode(status)) {
- reject(new Error("unable to load icon"));
- return;
- }
-
- try {
- let data = NetUtil.readInputStreamToString(input, input.available());
- let contentType = request.QueryInterface(Ci.nsIChannel).contentType;
- input.close();
- resolve({ data, contentType });
- } catch (ex) {
- reject(ex);
- }
- });
- });
-}
-
-var gDefaultFavicon;
-var gFavicon;
-
-add_task(function* setup() {
- yield PlacesTestUtils.addVisits({ uri: TEST_URI });
-
- PlacesUtils.favicons.replaceFaviconDataFromDataURL(
- ICON_URI, ICON_DATA, (Date.now() + 8640000) * 1000,
- Services.scriptSecurityManager.getSystemPrincipal());
-
- yield new Promise(resolve => {
- PlacesUtils.favicons.setAndFetchFaviconForPage(
- TEST_URI, ICON_URI, false,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- resolve, Services.scriptSecurityManager.getSystemPrincipal());
- });
-
- gDefaultFavicon = yield fetchIconForSpec(PlacesUtils.favicons.defaultFavicon);
- gFavicon = yield fetchIconForSpec(ICON_DATA);
-});
-
-add_task(function* known_url() {
- let {data, contentType} = yield fetchIconForSpec(TEST_URI.spec);
- Assert.equal(contentType, gFavicon.contentType);
- Assert.ok(data == gFavicon.data, "Got the favicon data");
-});
-
-add_task(function* unknown_url() {
- let {data, contentType} = yield fetchIconForSpec("http://www.moz.org/");
- Assert.equal(contentType, gDefaultFavicon.contentType);
- Assert.ok(data == gDefaultFavicon.data, "Got the default favicon data");
-});
-
-add_task(function* invalid_url() {
- let {data, contentType} = yield fetchIconForSpec("test");
- Assert.equal(contentType, gDefaultFavicon.contentType);
- Assert.ok(data == gDefaultFavicon.data, "Got the default favicon data");
-});
diff --git a/toolkit/components/places/tests/favicons/test_query_result_favicon_changed_on_child.js b/toolkit/components/places/tests/favicons/test_query_result_favicon_changed_on_child.js
deleted file mode 100644
index df61c22cd0..0000000000
--- a/toolkit/components/places/tests/favicons/test_query_result_favicon_changed_on_child.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * Test for bug 451499 <https://bugzilla.mozilla.org/show_bug.cgi?id=451499>:
- * Wrong folder icon appears on smart bookmarks.
- */
-
-"use strict";
-
-const PAGE_URI = NetUtil.newURI("http://example.com/test_query_result");
-
-add_task(function* test_query_result_favicon_changed_on_child() {
- // Bookmark our test page, so it will appear in the query resultset.
- yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.menuGuid,
- title: "test_bookmark",
- url: PAGE_URI
- });
-
- // Get the last 10 bookmarks added to the menu or the toolbar.
- let query = PlacesUtils.history.getNewQuery();
- query.setFolders([PlacesUtils.bookmarksMenuFolderId,
- PlacesUtils.toolbarFolderId], 2);
-
- let options = PlacesUtils.history.getNewQueryOptions();
- options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS;
- options.maxResults = 10;
- options.excludeQueries = 1;
- options.sortingMode = options.SORT_BY_DATE_DESCENDING;
-
- let result = PlacesUtils.history.executeQuery(query, options);
- let resultObserver = {
- __proto__: NavHistoryResultObserver.prototype,
- containerStateChanged(aContainerNode, aOldState, aNewState) {
- if (aNewState == Ci.nsINavHistoryContainerResultNode.STATE_OPENED) {
- // We set a favicon on PAGE_URI while the container is open. The
- // favicon for the page must have data associated with it in order for
- // the icon changed notifications to be sent, so we use a valid image
- // data URI.
- PlacesUtils.favicons.setAndFetchFaviconForPage(PAGE_URI,
- SMALLPNG_DATA_URI,
- false,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- null,
- Services.scriptSecurityManager.getSystemPrincipal());
- }
- },
- nodeIconChanged(aNode) {
- do_throw("The icon should be set only for the page," +
- " not for the containing query.");
- }
- };
- result.addObserver(resultObserver, false);
-
- // Open the container and wait for containerStateChanged. We should start
- // observing before setting |containerOpen| as that's caused by the
- // setAndFetchFaviconForPage() call caused by the containerStateChanged
- // observer above.
- let promise = promiseFaviconChanged(PAGE_URI, SMALLPNG_DATA_URI);
- result.root.containerOpen = true;
- yield promise;
-
- // We must wait for the asynchronous database thread to finish the
- // operation, and then for the main thread to process any pending
- // notifications that came from the asynchronous thread, before we can be
- // sure that nodeIconChanged was not invoked in the meantime.
- yield PlacesTestUtils.promiseAsyncUpdates();
- result.removeObserver(resultObserver);
-
- // Free the resources immediately.
- result.root.containerOpen = false;
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/places/tests/favicons/test_replaceFaviconData.js b/toolkit/components/places/tests/favicons/test_replaceFaviconData.js
deleted file mode 100644
index ac53e70e98..0000000000
--- a/toolkit/components/places/tests/favicons/test_replaceFaviconData.js
+++ /dev/null
@@ -1,264 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Tests for mozIAsyncFavicons::replaceFaviconData()
- */
-
-var iconsvc = PlacesUtils.favicons;
-var histsvc = PlacesUtils.history;
-var systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
-
-var originalFavicon = {
- file: do_get_file("favicon-normal16.png"),
- uri: uri(do_get_file("favicon-normal16.png")),
- data: readFileData(do_get_file("favicon-normal16.png")),
- mimetype: "image/png"
-};
-
-var uniqueFaviconId = 0;
-function createFavicon(fileName) {
- let tempdir = Services.dirsvc.get("TmpD", Ci.nsILocalFile);
-
- // remove any existing file at the path we're about to copy to
- let outfile = tempdir.clone();
- outfile.append(fileName);
- try { outfile.remove(false); } catch (e) {}
-
- originalFavicon.file.copyToFollowingLinks(tempdir, fileName);
-
- let stream = Cc["@mozilla.org/network/file-output-stream;1"]
- .createInstance(Ci.nsIFileOutputStream);
- stream.init(outfile, 0x02 | 0x08 | 0x10, 0o600, 0);
-
- // append some data that sniffers/encoders will ignore that will distinguish
- // the different favicons we'll create
- uniqueFaviconId++;
- let uniqueStr = "uid:" + uniqueFaviconId;
- stream.write(uniqueStr, uniqueStr.length);
- stream.close();
-
- do_check_eq(outfile.leafName.substr(0, fileName.length), fileName);
-
- return {
- file: outfile,
- uri: uri(outfile),
- data: readFileData(outfile),
- mimetype: "image/png"
- };
-}
-
-function checkCallbackSucceeded(callbackMimetype, callbackData, sourceMimetype, sourceData) {
- do_check_eq(callbackMimetype, sourceMimetype);
- do_check_true(compareArrays(callbackData, sourceData));
-}
-
-function run_test() {
- // check that the favicon loaded correctly
- do_check_eq(originalFavicon.data.length, 286);
- run_next_test();
-}
-
-add_task(function* test_replaceFaviconData_validHistoryURI() {
- do_print("test replaceFaviconData for valid history uri");
-
- let pageURI = uri("http://test1.bar/");
- yield PlacesTestUtils.addVisits(pageURI);
-
- let favicon = createFavicon("favicon1.png");
-
- iconsvc.replaceFaviconData(favicon.uri, favicon.data, favicon.data.length,
- favicon.mimetype);
-
- let deferSetAndFetchFavicon = Promise.defer();
- iconsvc.setAndFetchFaviconForPage(pageURI, favicon.uri, true,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- function test_replaceFaviconData_validHistoryURI_check(aURI, aDataLen, aData, aMimeType) {
- checkCallbackSucceeded(aMimeType, aData, favicon.mimetype, favicon.data);
- checkFaviconDataForPage(
- pageURI, favicon.mimetype, favicon.data,
- function test_replaceFaviconData_validHistoryURI_callback() {
- favicon.file.remove(false);
- deferSetAndFetchFavicon.resolve();
- });
- }, systemPrincipal);
- yield deferSetAndFetchFavicon.promise;
-
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* test_replaceFaviconData_overrideDefaultFavicon() {
- do_print("test replaceFaviconData to override a later setAndFetchFaviconForPage");
-
- let pageURI = uri("http://test2.bar/");
- yield PlacesTestUtils.addVisits(pageURI);
-
- let firstFavicon = createFavicon("favicon2.png");
- let secondFavicon = createFavicon("favicon3.png");
-
- iconsvc.replaceFaviconData(
- firstFavicon.uri, secondFavicon.data, secondFavicon.data.length,
- secondFavicon.mimetype);
-
- let deferSetAndFetchFavicon = Promise.defer();
- iconsvc.setAndFetchFaviconForPage(
- pageURI, firstFavicon.uri, true,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- function test_replaceFaviconData_overrideDefaultFavicon_check(aURI, aDataLen, aData, aMimeType) {
- checkCallbackSucceeded(aMimeType, aData, secondFavicon.mimetype, secondFavicon.data);
- checkFaviconDataForPage(
- pageURI, secondFavicon.mimetype, secondFavicon.data,
- function test_replaceFaviconData_overrideDefaultFavicon_callback() {
- firstFavicon.file.remove(false);
- secondFavicon.file.remove(false);
- deferSetAndFetchFavicon.resolve();
- });
- }, systemPrincipal);
- yield deferSetAndFetchFavicon.promise;
-
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* test_replaceFaviconData_replaceExisting() {
- do_print("test replaceFaviconData to override a previous setAndFetchFaviconForPage");
-
- let pageURI = uri("http://test3.bar");
- yield PlacesTestUtils.addVisits(pageURI);
-
- let firstFavicon = createFavicon("favicon4.png");
- let secondFavicon = createFavicon("favicon5.png");
-
- let deferSetAndFetchFavicon = Promise.defer();
- iconsvc.setAndFetchFaviconForPage(
- pageURI, firstFavicon.uri, true,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- function test_replaceFaviconData_replaceExisting_firstSet_check(aURI, aDataLen, aData, aMimeType) {
- checkCallbackSucceeded(aMimeType, aData, firstFavicon.mimetype, firstFavicon.data);
- checkFaviconDataForPage(
- pageURI, firstFavicon.mimetype, firstFavicon.data,
- function test_replaceFaviconData_overrideDefaultFavicon_firstCallback() {
- iconsvc.replaceFaviconData(
- firstFavicon.uri, secondFavicon.data, secondFavicon.data.length,
- secondFavicon.mimetype);
- PlacesTestUtils.promiseAsyncUpdates().then(() => {
- checkFaviconDataForPage(
- pageURI, secondFavicon.mimetype, secondFavicon.data,
- function test_replaceFaviconData_overrideDefaultFavicon_secondCallback() {
- firstFavicon.file.remove(false);
- secondFavicon.file.remove(false);
- deferSetAndFetchFavicon.resolve();
- }, systemPrincipal);
- });
- });
- }, systemPrincipal);
- yield deferSetAndFetchFavicon.promise;
-
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* test_replaceFaviconData_unrelatedReplace() {
- do_print("test replaceFaviconData to not make unrelated changes");
-
- let pageURI = uri("http://test4.bar/");
- yield PlacesTestUtils.addVisits(pageURI);
-
- let favicon = createFavicon("favicon6.png");
- let unrelatedFavicon = createFavicon("favicon7.png");
-
- iconsvc.replaceFaviconData(
- unrelatedFavicon.uri, unrelatedFavicon.data, unrelatedFavicon.data.length,
- unrelatedFavicon.mimetype);
-
- let deferSetAndFetchFavicon = Promise.defer();
- iconsvc.setAndFetchFaviconForPage(
- pageURI, favicon.uri, true,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- function test_replaceFaviconData_unrelatedReplace_check(aURI, aDataLen, aData, aMimeType) {
- checkCallbackSucceeded(aMimeType, aData, favicon.mimetype, favicon.data);
- checkFaviconDataForPage(
- pageURI, favicon.mimetype, favicon.data,
- function test_replaceFaviconData_unrelatedReplace_callback() {
- favicon.file.remove(false);
- unrelatedFavicon.file.remove(false);
- deferSetAndFetchFavicon.resolve();
- });
- }, systemPrincipal);
- yield deferSetAndFetchFavicon.promise;
-
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* test_replaceFaviconData_badInputs() {
- do_print("test replaceFaviconData to throw on bad inputs");
-
- let favicon = createFavicon("favicon8.png");
-
- let ex = null;
- try {
- iconsvc.replaceFaviconData(
- favicon.uri, favicon.data, favicon.data.length, "");
- } catch (e) {
- ex = e;
- } finally {
- do_check_true(!!ex);
- }
-
- ex = null;
- try {
- iconsvc.replaceFaviconData(
- null, favicon.data, favicon.data.length, favicon.mimeType);
- } catch (e) {
- ex = e;
- } finally {
- do_check_true(!!ex);
- }
-
- ex = null;
- try {
- iconsvc.replaceFaviconData(
- favicon.uri, null, 0, favicon.mimeType);
- } catch (e) {
- ex = e;
- } finally {
- do_check_true(!!ex);
- }
-
- favicon.file.remove(false);
-
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* test_replaceFaviconData_twiceReplace() {
- do_print("test replaceFaviconData on multiple replacements");
-
- let pageURI = uri("http://test5.bar/");
- yield PlacesTestUtils.addVisits(pageURI);
-
- let firstFavicon = createFavicon("favicon9.png");
- let secondFavicon = createFavicon("favicon10.png");
-
- iconsvc.replaceFaviconData(
- firstFavicon.uri, firstFavicon.data, firstFavicon.data.length,
- firstFavicon.mimetype);
- iconsvc.replaceFaviconData(
- firstFavicon.uri, secondFavicon.data, secondFavicon.data.length,
- secondFavicon.mimetype);
-
- let deferSetAndFetchFavicon = Promise.defer();
- iconsvc.setAndFetchFaviconForPage(
- pageURI, firstFavicon.uri, true,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- function test_replaceFaviconData_twiceReplace_check(aURI, aDataLen, aData, aMimeType) {
- checkCallbackSucceeded(aMimeType, aData, secondFavicon.mimetype, secondFavicon.data);
- checkFaviconDataForPage(
- pageURI, secondFavicon.mimetype, secondFavicon.data,
- function test_replaceFaviconData_twiceReplace_callback() {
- firstFavicon.file.remove(false);
- secondFavicon.file.remove(false);
- deferSetAndFetchFavicon.resolve();
- }, systemPrincipal);
- }, systemPrincipal);
- yield deferSetAndFetchFavicon.promise;
-
- yield PlacesTestUtils.clearHistory();
-});
diff --git a/toolkit/components/places/tests/favicons/test_replaceFaviconDataFromDataURL.js b/toolkit/components/places/tests/favicons/test_replaceFaviconDataFromDataURL.js
deleted file mode 100644
index 69a5ba8523..0000000000
--- a/toolkit/components/places/tests/favicons/test_replaceFaviconDataFromDataURL.js
+++ /dev/null
@@ -1,352 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Tests for mozIAsyncFavicons::replaceFaviconData()
- */
-
-var iconsvc = PlacesUtils.favicons;
-var histsvc = PlacesUtils.history;
-
-var originalFavicon = {
- file: do_get_file("favicon-normal16.png"),
- uri: uri(do_get_file("favicon-normal16.png")),
- data: readFileData(do_get_file("favicon-normal16.png")),
- mimetype: "image/png"
-};
-
-var uniqueFaviconId = 0;
-function createFavicon(fileName) {
- let tempdir = Services.dirsvc.get("TmpD", Ci.nsILocalFile);
-
- // remove any existing file at the path we're about to copy to
- let outfile = tempdir.clone();
- outfile.append(fileName);
- try { outfile.remove(false); } catch (e) {}
-
- originalFavicon.file.copyToFollowingLinks(tempdir, fileName);
-
- let stream = Cc["@mozilla.org/network/file-output-stream;1"]
- .createInstance(Ci.nsIFileOutputStream);
- stream.init(outfile, 0x02 | 0x08 | 0x10, 0o600, 0);
-
- // append some data that sniffers/encoders will ignore that will distinguish
- // the different favicons we'll create
- uniqueFaviconId++;
- let uniqueStr = "uid:" + uniqueFaviconId;
- stream.write(uniqueStr, uniqueStr.length);
- stream.close();
-
- do_check_eq(outfile.leafName.substr(0, fileName.length), fileName);
-
- return {
- file: outfile,
- uri: uri(outfile),
- data: readFileData(outfile),
- mimetype: "image/png"
- };
-}
-
-function createDataURLForFavicon(favicon) {
- return "data:" + favicon.mimetype + ";base64," + toBase64(favicon.data);
-}
-
-function checkCallbackSucceeded(callbackMimetype, callbackData, sourceMimetype, sourceData) {
- do_check_eq(callbackMimetype, sourceMimetype);
- do_check_true(compareArrays(callbackData, sourceData));
-}
-
-function run_test() {
- // check that the favicon loaded correctly
- do_check_eq(originalFavicon.data.length, 286);
- run_next_test();
-}
-
-add_task(function* test_replaceFaviconDataFromDataURL_validHistoryURI() {
- do_print("test replaceFaviconDataFromDataURL for valid history uri");
-
- let pageURI = uri("http://test1.bar/");
- yield PlacesTestUtils.addVisits(pageURI);
-
- let favicon = createFavicon("favicon1.png");
- iconsvc.replaceFaviconDataFromDataURL(favicon.uri, createDataURLForFavicon(favicon), 0,
- Services.scriptSecurityManager.getSystemPrincipal());
-
- let deferSetAndFetchFavicon = Promise.defer();
- iconsvc.setAndFetchFaviconForPage(pageURI, favicon.uri, true,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- function test_replaceFaviconDataFromDataURL_validHistoryURI_check(aURI, aDataLen, aData, aMimeType) {
- checkCallbackSucceeded(aMimeType, aData, favicon.mimetype, favicon.data);
- checkFaviconDataForPage(
- pageURI, favicon.mimetype, favicon.data,
- function test_replaceFaviconDataFromDataURL_validHistoryURI_callback() {
- favicon.file.remove(false);
- deferSetAndFetchFavicon.resolve();
- });
- }, Services.scriptSecurityManager.getSystemPrincipal());
- yield deferSetAndFetchFavicon.promise;
-
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* test_replaceFaviconDataFromDataURL_overrideDefaultFavicon() {
- do_print("test replaceFaviconDataFromDataURL to override a later setAndFetchFaviconForPage");
-
- let pageURI = uri("http://test2.bar/");
- yield PlacesTestUtils.addVisits(pageURI);
-
- let firstFavicon = createFavicon("favicon2.png");
- let secondFavicon = createFavicon("favicon3.png");
-
- iconsvc.replaceFaviconDataFromDataURL(firstFavicon.uri, createDataURLForFavicon(secondFavicon), 0,
- Services.scriptSecurityManager.getSystemPrincipal());
-
- let deferSetAndFetchFavicon = Promise.defer();
- iconsvc.setAndFetchFaviconForPage(
- pageURI, firstFavicon.uri, true,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- function test_replaceFaviconDataFromDataURL_overrideDefaultFavicon_check(aURI, aDataLen, aData, aMimeType) {
- checkCallbackSucceeded(aMimeType, aData, secondFavicon.mimetype, secondFavicon.data);
- checkFaviconDataForPage(
- pageURI, secondFavicon.mimetype, secondFavicon.data,
- function test_replaceFaviconDataFromDataURL_overrideDefaultFavicon_callback() {
- firstFavicon.file.remove(false);
- secondFavicon.file.remove(false);
- deferSetAndFetchFavicon.resolve();
- });
- }, Services.scriptSecurityManager.getSystemPrincipal());
- yield deferSetAndFetchFavicon.promise;
-
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* test_replaceFaviconDataFromDataURL_replaceExisting() {
- do_print("test replaceFaviconDataFromDataURL to override a previous setAndFetchFaviconForPage");
-
- let pageURI = uri("http://test3.bar");
- yield PlacesTestUtils.addVisits(pageURI);
-
- let firstFavicon = createFavicon("favicon4.png");
- let secondFavicon = createFavicon("favicon5.png");
-
- let deferSetAndFetchFavicon = Promise.defer();
- iconsvc.setAndFetchFaviconForPage(
- pageURI, firstFavicon.uri, true,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- function test_replaceFaviconDataFromDataURL_replaceExisting_firstSet_check(aURI, aDataLen, aData, aMimeType) {
- checkCallbackSucceeded(aMimeType, aData, firstFavicon.mimetype, firstFavicon.data);
- checkFaviconDataForPage(
- pageURI, firstFavicon.mimetype, firstFavicon.data,
- function test_replaceFaviconDataFromDataURL_replaceExisting_firstCallback() {
- iconsvc.replaceFaviconDataFromDataURL(firstFavicon.uri, createDataURLForFavicon(secondFavicon), 0,
- Services.scriptSecurityManager.getSystemPrincipal());
- checkFaviconDataForPage(
- pageURI, secondFavicon.mimetype, secondFavicon.data,
- function test_replaceFaviconDataFromDataURL_replaceExisting_secondCallback() {
- firstFavicon.file.remove(false);
- secondFavicon.file.remove(false);
- deferSetAndFetchFavicon.resolve();
- });
- });
- }, Services.scriptSecurityManager.getSystemPrincipal());
- yield deferSetAndFetchFavicon.promise;
-
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* test_replaceFaviconDataFromDataURL_unrelatedReplace() {
- do_print("test replaceFaviconDataFromDataURL to not make unrelated changes");
-
- let pageURI = uri("http://test4.bar/");
- yield PlacesTestUtils.addVisits(pageURI);
-
- let favicon = createFavicon("favicon6.png");
- let unrelatedFavicon = createFavicon("favicon7.png");
-
- iconsvc.replaceFaviconDataFromDataURL(unrelatedFavicon.uri, createDataURLForFavicon(unrelatedFavicon), 0,
- Services.scriptSecurityManager.getSystemPrincipal());
-
- let deferSetAndFetchFavicon = Promise.defer();
- iconsvc.setAndFetchFaviconForPage(
- pageURI, favicon.uri, true,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- function test_replaceFaviconDataFromDataURL_unrelatedReplace_check(aURI, aDataLen, aData, aMimeType) {
- checkCallbackSucceeded(aMimeType, aData, favicon.mimetype, favicon.data);
- checkFaviconDataForPage(
- pageURI, favicon.mimetype, favicon.data,
- function test_replaceFaviconDataFromDataURL_unrelatedReplace_callback() {
- favicon.file.remove(false);
- unrelatedFavicon.file.remove(false);
- deferSetAndFetchFavicon.resolve();
- });
- }, Services.scriptSecurityManager.getSystemPrincipal());
- yield deferSetAndFetchFavicon.promise;
-
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* test_replaceFaviconDataFromDataURL_badInputs() {
- do_print("test replaceFaviconDataFromDataURL to throw on bad inputs");
-
- let favicon = createFavicon("favicon8.png");
-
- let ex = null;
- try {
- iconsvc.replaceFaviconDataFromDataURL(favicon.uri, "", 0,
- Services.scriptSecurityManager.getSystemPrincipal());
- } catch (e) {
- ex = e;
- } finally {
- do_check_true(!!ex);
- }
-
- ex = null;
- try {
- iconsvc.replaceFaviconDataFromDataURL(null, createDataURLForFavicon(favicon), 0,
- Services.scriptSecurityManager.getSystemPrincipal());
- } catch (e) {
- ex = e;
- } finally {
- do_check_true(!!ex);
- }
-
- favicon.file.remove(false);
-
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* test_replaceFaviconDataFromDataURL_twiceReplace() {
- do_print("test replaceFaviconDataFromDataURL on multiple replacements");
-
- let pageURI = uri("http://test5.bar/");
- yield PlacesTestUtils.addVisits(pageURI);
-
- let firstFavicon = createFavicon("favicon9.png");
- let secondFavicon = createFavicon("favicon10.png");
-
- iconsvc.replaceFaviconDataFromDataURL(firstFavicon.uri, createDataURLForFavicon(firstFavicon), 0,
- Services.scriptSecurityManager.getSystemPrincipal());
- iconsvc.replaceFaviconDataFromDataURL(firstFavicon.uri, createDataURLForFavicon(secondFavicon), 0,
- Services.scriptSecurityManager.getSystemPrincipal());
-
- let deferSetAndFetchFavicon = Promise.defer();
- iconsvc.setAndFetchFaviconForPage(
- pageURI, firstFavicon.uri, true,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- function test_replaceFaviconDataFromDataURL_twiceReplace_check(aURI, aDataLen, aData, aMimeType) {
- checkCallbackSucceeded(aMimeType, aData, secondFavicon.mimetype, secondFavicon.data);
- checkFaviconDataForPage(
- pageURI, secondFavicon.mimetype, secondFavicon.data,
- function test_replaceFaviconDataFromDataURL_twiceReplace_callback() {
- firstFavicon.file.remove(false);
- secondFavicon.file.remove(false);
- deferSetAndFetchFavicon.resolve();
- });
- }, Services.scriptSecurityManager.getSystemPrincipal());
- yield deferSetAndFetchFavicon.promise;
-
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* test_replaceFaviconDataFromDataURL_afterRegularAssign() {
- do_print("test replaceFaviconDataFromDataURL after replaceFaviconData");
-
- let pageURI = uri("http://test6.bar/");
- yield PlacesTestUtils.addVisits(pageURI);
-
- let firstFavicon = createFavicon("favicon11.png");
- let secondFavicon = createFavicon("favicon12.png");
-
- iconsvc.replaceFaviconData(
- firstFavicon.uri, firstFavicon.data, firstFavicon.data.length,
- firstFavicon.mimetype);
- iconsvc.replaceFaviconDataFromDataURL(firstFavicon.uri, createDataURLForFavicon(secondFavicon), 0,
- Services.scriptSecurityManager.getSystemPrincipal());
-
- let deferSetAndFetchFavicon = Promise.defer();
- iconsvc.setAndFetchFaviconForPage(
- pageURI, firstFavicon.uri, true,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- function test_replaceFaviconDataFromDataURL_afterRegularAssign_check(aURI, aDataLen, aData, aMimeType) {
- checkCallbackSucceeded(aMimeType, aData, secondFavicon.mimetype, secondFavicon.data);
- checkFaviconDataForPage(
- pageURI, secondFavicon.mimetype, secondFavicon.data,
- function test_replaceFaviconDataFromDataURL_afterRegularAssign_callback() {
- firstFavicon.file.remove(false);
- secondFavicon.file.remove(false);
- deferSetAndFetchFavicon.resolve();
- });
- }, Services.scriptSecurityManager.getSystemPrincipal());
- yield deferSetAndFetchFavicon.promise;
-
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* test_replaceFaviconDataFromDataURL_beforeRegularAssign() {
- do_print("test replaceFaviconDataFromDataURL before replaceFaviconData");
-
- let pageURI = uri("http://test7.bar/");
- yield PlacesTestUtils.addVisits(pageURI);
-
- let firstFavicon = createFavicon("favicon13.png");
- let secondFavicon = createFavicon("favicon14.png");
-
- iconsvc.replaceFaviconDataFromDataURL(firstFavicon.uri, createDataURLForFavicon(firstFavicon), 0,
- Services.scriptSecurityManager.getSystemPrincipal());
- iconsvc.replaceFaviconData(
- firstFavicon.uri, secondFavicon.data, secondFavicon.data.length,
- secondFavicon.mimetype);
-
- let deferSetAndFetchFavicon = Promise.defer();
- iconsvc.setAndFetchFaviconForPage(
- pageURI, firstFavicon.uri, true,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- function test_replaceFaviconDataFromDataURL_beforeRegularAssign_check(aURI, aDataLen, aData, aMimeType) {
- checkCallbackSucceeded(aMimeType, aData, secondFavicon.mimetype, secondFavicon.data);
- checkFaviconDataForPage(
- pageURI, secondFavicon.mimetype, secondFavicon.data,
- function test_replaceFaviconDataFromDataURL_beforeRegularAssign_callback() {
- firstFavicon.file.remove(false);
- secondFavicon.file.remove(false);
- deferSetAndFetchFavicon.resolve();
- });
- }, Services.scriptSecurityManager.getSystemPrincipal());
- yield deferSetAndFetchFavicon.promise;
-
- yield PlacesTestUtils.clearHistory();
-});
-
-/* toBase64 copied from image/test/unit/test_encoder_png.js */
-
-/* Convert data (an array of integers) to a Base64 string. */
-const toBase64Table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' +
- '0123456789+/';
-const base64Pad = '=';
-function toBase64(data) {
- let result = '';
- let length = data.length;
- let i;
- // Convert every three bytes to 4 ascii characters.
- for (i = 0; i < (length - 2); i += 3) {
- result += toBase64Table[data[i] >> 2];
- result += toBase64Table[((data[i] & 0x03) << 4) + (data[i+1] >> 4)];
- result += toBase64Table[((data[i+1] & 0x0f) << 2) + (data[i+2] >> 6)];
- result += toBase64Table[data[i+2] & 0x3f];
- }
-
- // Convert the remaining 1 or 2 bytes, pad out to 4 characters.
- if (length%3) {
- i = length - (length%3);
- result += toBase64Table[data[i] >> 2];
- if ((length%3) == 2) {
- result += toBase64Table[((data[i] & 0x03) << 4) + (data[i+1] >> 4)];
- result += toBase64Table[(data[i+1] & 0x0f) << 2];
- result += base64Pad;
- } else {
- result += toBase64Table[(data[i] & 0x03) << 4];
- result += base64Pad + base64Pad;
- }
- }
-
- return result;
-}
diff --git a/toolkit/components/places/tests/favicons/xpcshell.ini b/toolkit/components/places/tests/favicons/xpcshell.ini
deleted file mode 100644
index 851f193c79..0000000000
--- a/toolkit/components/places/tests/favicons/xpcshell.ini
+++ /dev/null
@@ -1,32 +0,0 @@
-[DEFAULT]
-head = head_favicons.js
-tail =
-skip-if = toolkit == 'android'
-support-files =
- expected-favicon-big32.jpg.png
- expected-favicon-big4.jpg.png
- expected-favicon-big48.ico.png
- expected-favicon-big64.png.png
- expected-favicon-scale160x3.jpg.png
- expected-favicon-scale3x160.jpg.png
- favicon-big16.ico
- favicon-big32.jpg
- favicon-big4.jpg
- favicon-big48.ico
- favicon-big64.png
- favicon-normal16.png
- favicon-normal32.png
- favicon-scale160x3.jpg
- favicon-scale3x160.jpg
-
-[test_expireAllFavicons.js]
-[test_favicons_conversions.js]
-# Bug 676989: test fails consistently on Android
-fail-if = os == "android"
-[test_getFaviconDataForPage.js]
-[test_getFaviconURLForPage.js]
-[test_moz-anno_favicon_mime_type.js]
-[test_page-icon_protocol.js]
-[test_query_result_favicon_changed_on_child.js]
-[test_replaceFaviconData.js]
-[test_replaceFaviconDataFromDataURL.js]
diff --git a/toolkit/components/places/tests/head_common.js b/toolkit/components/places/tests/head_common.js
deleted file mode 100644
index ddb6dcbd7e..0000000000
--- a/toolkit/components/places/tests/head_common.js
+++ /dev/null
@@ -1,869 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-const CURRENT_SCHEMA_VERSION = 35;
-const FIRST_UPGRADABLE_SCHEMA_VERSION = 11;
-
-const NS_APP_USER_PROFILE_50_DIR = "ProfD";
-const NS_APP_PROFILE_DIR_STARTUP = "ProfDS";
-
-// Shortcuts to transitions type.
-const TRANSITION_LINK = Ci.nsINavHistoryService.TRANSITION_LINK;
-const TRANSITION_TYPED = Ci.nsINavHistoryService.TRANSITION_TYPED;
-const TRANSITION_BOOKMARK = Ci.nsINavHistoryService.TRANSITION_BOOKMARK;
-const TRANSITION_EMBED = Ci.nsINavHistoryService.TRANSITION_EMBED;
-const TRANSITION_FRAMED_LINK = Ci.nsINavHistoryService.TRANSITION_FRAMED_LINK;
-const TRANSITION_REDIRECT_PERMANENT = Ci.nsINavHistoryService.TRANSITION_REDIRECT_PERMANENT;
-const TRANSITION_REDIRECT_TEMPORARY = Ci.nsINavHistoryService.TRANSITION_REDIRECT_TEMPORARY;
-const TRANSITION_DOWNLOAD = Ci.nsINavHistoryService.TRANSITION_DOWNLOAD;
-const TRANSITION_RELOAD = Ci.nsINavHistoryService.TRANSITION_RELOAD;
-
-const TITLE_LENGTH_MAX = 4096;
-
-Cu.importGlobalProperties(["URL"]);
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
- "resource://gre/modules/FileUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
- "resource://gre/modules/NetUtil.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Promise",
- "resource://gre/modules/Promise.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Services",
- "resource://gre/modules/Services.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Task",
- "resource://gre/modules/Task.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "BookmarkJSONUtils",
- "resource://gre/modules/BookmarkJSONUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "BookmarkHTMLUtils",
- "resource://gre/modules/BookmarkHTMLUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "PlacesBackups",
- "resource://gre/modules/PlacesBackups.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "PlacesTestUtils",
- "resource://testing-common/PlacesTestUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "PlacesTransactions",
- "resource://gre/modules/PlacesTransactions.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "OS",
- "resource://gre/modules/osfile.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Sqlite",
- "resource://gre/modules/Sqlite.jsm");
-
-// This imports various other objects in addition to PlacesUtils.
-Cu.import("resource://gre/modules/PlacesUtils.jsm");
-
-XPCOMUtils.defineLazyGetter(this, "SMALLPNG_DATA_URI", function() {
- return NetUtil.newURI(
- "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAA" +
- "AAAA6fptVAAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==");
-});
-XPCOMUtils.defineLazyGetter(this, "SMALLSVG_DATA_URI", function() {
- return NetUtil.newURI(
- "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy5" +
- "3My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiBmaWxs" +
- "PSIjNDI0ZTVhIj4NCiAgPGNpcmNsZSBjeD0iNTAiIGN5PSI1MCIgcj0iN" +
- "DQiIHN0cm9rZT0iIzQyNGU1YSIgc3Ryb2tlLXdpZHRoPSIxMSIgZmlsbD" +
- "0ibm9uZSIvPg0KICA8Y2lyY2xlIGN4PSI1MCIgY3k9IjI0LjYiIHI9IjY" +
- "uNCIvPg0KICA8cmVjdCB4PSI0NSIgeT0iMzkuOSIgd2lkdGg9IjEwLjEi" +
- "IGhlaWdodD0iNDEuOCIvPg0KPC9zdmc%2BDQo%3D");
-});
-
-var gTestDir = do_get_cwd();
-
-// Initialize profile.
-var gProfD = do_get_profile(true);
-
-// Remove any old database.
-clearDB();
-
-/**
- * Shortcut to create a nsIURI.
- *
- * @param aSpec
- * URLString of the uri.
- */
-function uri(aSpec) {
- return NetUtil.newURI(aSpec);
-}
-
-
-/**
- * Gets the database connection. If the Places connection is invalid it will
- * try to create a new connection.
- *
- * @param [optional] aForceNewConnection
- * Forces creation of a new connection to the database. When a
- * connection is asyncClosed it cannot anymore schedule async statements,
- * though connectionReady will keep returning true (Bug 726990).
- *
- * @return The database connection or null if unable to get one.
- */
-var gDBConn;
-function DBConn(aForceNewConnection) {
- if (!aForceNewConnection) {
- let db = PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
- .DBConnection;
- if (db.connectionReady)
- return db;
- }
-
- // If the Places database connection has been closed, create a new connection.
- if (!gDBConn || aForceNewConnection) {
- let file = Services.dirsvc.get('ProfD', Ci.nsIFile);
- file.append("places.sqlite");
- let dbConn = gDBConn = Services.storage.openDatabase(file);
-
- // Be sure to cleanly close this connection.
- promiseTopicObserved("profile-before-change").then(() => dbConn.asyncClose());
- }
-
- return gDBConn.connectionReady ? gDBConn : null;
-}
-
-/**
- * Reads data from the provided inputstream.
- *
- * @return an array of bytes.
- */
-function readInputStreamData(aStream) {
- let bistream = Cc["@mozilla.org/binaryinputstream;1"].
- createInstance(Ci.nsIBinaryInputStream);
- try {
- bistream.setInputStream(aStream);
- let expectedData = [];
- let avail;
- while ((avail = bistream.available())) {
- expectedData = expectedData.concat(bistream.readByteArray(avail));
- }
- return expectedData;
- } finally {
- bistream.close();
- }
-}
-
-/**
- * Reads the data from the specified nsIFile.
- *
- * @param aFile
- * The nsIFile to read from.
- * @return an array of bytes.
- */
-function readFileData(aFile) {
- let inputStream = Cc["@mozilla.org/network/file-input-stream;1"].
- createInstance(Ci.nsIFileInputStream);
- // init the stream as RD_ONLY, -1 == default permissions.
- inputStream.init(aFile, 0x01, -1, null);
-
- // Check the returned size versus the expected size.
- let size = inputStream.available();
- let bytes = readInputStreamData(inputStream);
- if (size != bytes.length) {
- throw "Didn't read expected number of bytes";
- }
- return bytes;
-}
-
-/**
- * Reads the data from the named file, verifying the expected file length.
- *
- * @param aFileName
- * This file should be located in the same folder as the test.
- * @param aExpectedLength
- * Expected length of the file.
- *
- * @return The array of bytes read from the file.
- */
-function readFileOfLength(aFileName, aExpectedLength) {
- let data = readFileData(do_get_file(aFileName));
- do_check_eq(data.length, aExpectedLength);
- return data;
-}
-
-
-/**
- * Returns the base64-encoded version of the given string. This function is
- * similar to window.btoa, but is available to xpcshell tests also.
- *
- * @param aString
- * Each character in this string corresponds to a byte, and must be a
- * code point in the range 0-255.
- *
- * @return The base64-encoded string.
- */
-function base64EncodeString(aString) {
- var stream = Cc["@mozilla.org/io/string-input-stream;1"]
- .createInstance(Ci.nsIStringInputStream);
- stream.setData(aString, aString.length);
- var encoder = Cc["@mozilla.org/scriptablebase64encoder;1"]
- .createInstance(Ci.nsIScriptableBase64Encoder);
- return encoder.encodeToString(stream, aString.length);
-}
-
-
-/**
- * Compares two arrays, and returns true if they are equal.
- *
- * @param aArray1
- * First array to compare.
- * @param aArray2
- * Second array to compare.
- */
-function compareArrays(aArray1, aArray2) {
- if (aArray1.length != aArray2.length) {
- print("compareArrays: array lengths differ\n");
- return false;
- }
-
- for (let i = 0; i < aArray1.length; i++) {
- if (aArray1[i] != aArray2[i]) {
- print("compareArrays: arrays differ at index " + i + ": " +
- "(" + aArray1[i] + ") != (" + aArray2[i] +")\n");
- return false;
- }
- }
-
- return true;
-}
-
-
-/**
- * Deletes a previously created sqlite file from the profile folder.
- */
-function clearDB() {
- try {
- let file = Services.dirsvc.get('ProfD', Ci.nsIFile);
- file.append("places.sqlite");
- if (file.exists())
- file.remove(false);
- } catch (ex) { dump("Exception: " + ex); }
-}
-
-
-/**
- * Dumps the rows of a table out to the console.
- *
- * @param aName
- * The name of the table or view to output.
- */
-function dump_table(aName)
-{
- let stmt = DBConn().createStatement("SELECT * FROM " + aName);
-
- print("\n*** Printing data from " + aName);
- let count = 0;
- while (stmt.executeStep()) {
- let columns = stmt.numEntries;
-
- if (count == 0) {
- // Print the column names.
- for (let i = 0; i < columns; i++)
- dump(stmt.getColumnName(i) + "\t");
- dump("\n");
- }
-
- // Print the rows.
- for (let i = 0; i < columns; i++) {
- switch (stmt.getTypeOfIndex(i)) {
- case Ci.mozIStorageValueArray.VALUE_TYPE_NULL:
- dump("NULL\t");
- break;
- case Ci.mozIStorageValueArray.VALUE_TYPE_INTEGER:
- dump(stmt.getInt64(i) + "\t");
- break;
- case Ci.mozIStorageValueArray.VALUE_TYPE_FLOAT:
- dump(stmt.getDouble(i) + "\t");
- break;
- case Ci.mozIStorageValueArray.VALUE_TYPE_TEXT:
- dump(stmt.getString(i) + "\t");
- break;
- }
- }
- dump("\n");
-
- count++;
- }
- print("*** There were a total of " + count + " rows of data.\n");
-
- stmt.finalize();
-}
-
-
-/**
- * Checks if an address is found in the database.
- * @param aURI
- * nsIURI or address to look for.
- * @return place id of the page or 0 if not found
- */
-function page_in_database(aURI)
-{
- let url = aURI instanceof Ci.nsIURI ? aURI.spec : aURI;
- let stmt = DBConn().createStatement(
- "SELECT id FROM moz_places WHERE url_hash = hash(:url) AND url = :url"
- );
- stmt.params.url = url;
- try {
- if (!stmt.executeStep())
- return 0;
- return stmt.getInt64(0);
- }
- finally {
- stmt.finalize();
- }
-}
-
-/**
- * Checks how many visits exist for a specified page.
- * @param aURI
- * nsIURI or address to look for.
- * @return number of visits found.
- */
-function visits_in_database(aURI)
-{
- let url = aURI instanceof Ci.nsIURI ? aURI.spec : aURI;
- let stmt = DBConn().createStatement(
- `SELECT count(*) FROM moz_historyvisits v
- JOIN moz_places h ON h.id = v.place_id
- WHERE url_hash = hash(:url) AND url = :url`
- );
- stmt.params.url = url;
- try {
- if (!stmt.executeStep())
- return 0;
- return stmt.getInt64(0);
- }
- finally {
- stmt.finalize();
- }
-}
-
-/**
- * Checks that we don't have any bookmark
- */
-function check_no_bookmarks() {
- let query = PlacesUtils.history.getNewQuery();
- let folders = [
- PlacesUtils.bookmarks.toolbarFolder,
- PlacesUtils.bookmarks.bookmarksMenuFolder,
- PlacesUtils.bookmarks.unfiledBookmarksFolder,
- ];
- query.setFolders(folders, 3);
- let options = PlacesUtils.history.getNewQueryOptions();
- options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS;
- let root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
- if (root.childCount != 0)
- do_throw("Unable to remove all bookmarks");
- root.containerOpen = false;
-}
-
-/**
- * Allows waiting for an observer notification once.
- *
- * @param aTopic
- * Notification topic to observe.
- *
- * @return {Promise}
- * @resolves The array [aSubject, aData] from the observed notification.
- * @rejects Never.
- */
-function promiseTopicObserved(aTopic)
-{
- return new Promise(resolve => {
- Services.obs.addObserver(function observe(aObsSubject, aObsTopic, aObsData) {
- Services.obs.removeObserver(observe, aObsTopic);
- resolve([aObsSubject, aObsData]);
- }, aTopic, false);
- });
-}
-
-/**
- * Simulates a Places shutdown.
- */
-var shutdownPlaces = function() {
- do_print("shutdownPlaces: starting");
- let promise = new Promise(resolve => {
- Services.obs.addObserver(resolve, "places-connection-closed", false);
- });
- let hs = PlacesUtils.history.QueryInterface(Ci.nsIObserver);
- hs.observe(null, "profile-change-teardown", null);
- do_print("shutdownPlaces: sent profile-change-teardown");
- hs.observe(null, "test-simulate-places-shutdown", null);
- do_print("shutdownPlaces: sent test-simulate-places-shutdown");
- return promise.then(() => {
- do_print("shutdownPlaces: complete");
- });
-};
-
-const FILENAME_BOOKMARKS_HTML = "bookmarks.html";
-const FILENAME_BOOKMARKS_JSON = "bookmarks-" +
- (PlacesBackups.toISODateString(new Date())) + ".json";
-
-/**
- * Creates a bookmarks.html file in the profile folder from a given source file.
- *
- * @param aFilename
- * Name of the file to copy to the profile folder. This file must
- * exist in the directory that contains the test files.
- *
- * @return nsIFile object for the file.
- */
-function create_bookmarks_html(aFilename) {
- if (!aFilename)
- do_throw("you must pass a filename to create_bookmarks_html function");
- remove_bookmarks_html();
- let bookmarksHTMLFile = gTestDir.clone();
- bookmarksHTMLFile.append(aFilename);
- do_check_true(bookmarksHTMLFile.exists());
- bookmarksHTMLFile.copyTo(gProfD, FILENAME_BOOKMARKS_HTML);
- let profileBookmarksHTMLFile = gProfD.clone();
- profileBookmarksHTMLFile.append(FILENAME_BOOKMARKS_HTML);
- do_check_true(profileBookmarksHTMLFile.exists());
- return profileBookmarksHTMLFile;
-}
-
-
-/**
- * Remove bookmarks.html file from the profile folder.
- */
-function remove_bookmarks_html() {
- let profileBookmarksHTMLFile = gProfD.clone();
- profileBookmarksHTMLFile.append(FILENAME_BOOKMARKS_HTML);
- if (profileBookmarksHTMLFile.exists()) {
- profileBookmarksHTMLFile.remove(false);
- do_check_false(profileBookmarksHTMLFile.exists());
- }
-}
-
-
-/**
- * Check bookmarks.html file exists in the profile folder.
- *
- * @return nsIFile object for the file.
- */
-function check_bookmarks_html() {
- let profileBookmarksHTMLFile = gProfD.clone();
- profileBookmarksHTMLFile.append(FILENAME_BOOKMARKS_HTML);
- do_check_true(profileBookmarksHTMLFile.exists());
- return profileBookmarksHTMLFile;
-}
-
-
-/**
- * Creates a JSON backup in the profile folder folder from a given source file.
- *
- * @param aFilename
- * Name of the file to copy to the profile folder. This file must
- * exist in the directory that contains the test files.
- *
- * @return nsIFile object for the file.
- */
-function create_JSON_backup(aFilename) {
- if (!aFilename)
- do_throw("you must pass a filename to create_JSON_backup function");
- let bookmarksBackupDir = gProfD.clone();
- bookmarksBackupDir.append("bookmarkbackups");
- if (!bookmarksBackupDir.exists()) {
- bookmarksBackupDir.create(Ci.nsIFile.DIRECTORY_TYPE, parseInt("0755", 8));
- do_check_true(bookmarksBackupDir.exists());
- }
- let profileBookmarksJSONFile = bookmarksBackupDir.clone();
- profileBookmarksJSONFile.append(FILENAME_BOOKMARKS_JSON);
- if (profileBookmarksJSONFile.exists()) {
- profileBookmarksJSONFile.remove();
- }
- let bookmarksJSONFile = gTestDir.clone();
- bookmarksJSONFile.append(aFilename);
- do_check_true(bookmarksJSONFile.exists());
- bookmarksJSONFile.copyTo(bookmarksBackupDir, FILENAME_BOOKMARKS_JSON);
- profileBookmarksJSONFile = bookmarksBackupDir.clone();
- profileBookmarksJSONFile.append(FILENAME_BOOKMARKS_JSON);
- do_check_true(profileBookmarksJSONFile.exists());
- return profileBookmarksJSONFile;
-}
-
-
-/**
- * Remove bookmarksbackup dir and all backups from the profile folder.
- */
-function remove_all_JSON_backups() {
- let bookmarksBackupDir = gProfD.clone();
- bookmarksBackupDir.append("bookmarkbackups");
- if (bookmarksBackupDir.exists()) {
- bookmarksBackupDir.remove(true);
- do_check_false(bookmarksBackupDir.exists());
- }
-}
-
-
-/**
- * Check a JSON backup file for today exists in the profile folder.
- *
- * @param aIsAutomaticBackup The boolean indicates whether it's an automatic
- * backup.
- * @return nsIFile object for the file.
- */
-function check_JSON_backup(aIsAutomaticBackup) {
- let profileBookmarksJSONFile;
- if (aIsAutomaticBackup) {
- let bookmarksBackupDir = gProfD.clone();
- bookmarksBackupDir.append("bookmarkbackups");
- let files = bookmarksBackupDir.directoryEntries;
- while (files.hasMoreElements()) {
- let entry = files.getNext().QueryInterface(Ci.nsIFile);
- if (PlacesBackups.filenamesRegex.test(entry.leafName)) {
- profileBookmarksJSONFile = entry;
- break;
- }
- }
- } else {
- profileBookmarksJSONFile = gProfD.clone();
- profileBookmarksJSONFile.append("bookmarkbackups");
- profileBookmarksJSONFile.append(FILENAME_BOOKMARKS_JSON);
- }
- do_check_true(profileBookmarksJSONFile.exists());
- return profileBookmarksJSONFile;
-}
-
-/**
- * Returns the frecency of a url.
- *
- * @param aURI
- * The URI or spec to get frecency for.
- * @return the frecency value.
- */
-function frecencyForUrl(aURI)
-{
- let url = aURI;
- if (aURI instanceof Ci.nsIURI) {
- url = aURI.spec;
- } else if (aURI instanceof URL) {
- url = aURI.href;
- }
- let stmt = DBConn().createStatement(
- "SELECT frecency FROM moz_places WHERE url_hash = hash(?1) AND url = ?1"
- );
- stmt.bindByIndex(0, url);
- try {
- if (!stmt.executeStep()) {
- throw new Error("No result for frecency.");
- }
- return stmt.getInt32(0);
- } finally {
- stmt.finalize();
- }
-}
-
-/**
- * Returns the hidden status of a url.
- *
- * @param aURI
- * The URI or spec to get hidden for.
- * @return @return true if the url is hidden, false otherwise.
- */
-function isUrlHidden(aURI)
-{
- let url = aURI instanceof Ci.nsIURI ? aURI.spec : aURI;
- let stmt = DBConn().createStatement(
- "SELECT hidden FROM moz_places WHERE url_hash = hash(?1) AND url = ?1"
- );
- stmt.bindByIndex(0, url);
- if (!stmt.executeStep())
- throw new Error("No result for hidden.");
- let hidden = stmt.getInt32(0);
- stmt.finalize();
-
- return !!hidden;
-}
-
-/**
- * Compares two times in usecs, considering eventual platform timers skews.
- *
- * @param aTimeBefore
- * The older time in usecs.
- * @param aTimeAfter
- * The newer time in usecs.
- * @return true if times are ordered, false otherwise.
- */
-function is_time_ordered(before, after) {
- // Windows has an estimated 16ms timers precision, since Date.now() and
- // PR_Now() use different code atm, the results can be unordered by this
- // amount of time. See bug 558745 and bug 557406.
- let isWindows = ("@mozilla.org/windows-registry-key;1" in Cc);
- // Just to be safe we consider 20ms.
- let skew = isWindows ? 20000000 : 0;
- return after - before > -skew;
-}
-
-/**
- * Shutdowns Places, invoking the callback when the connection has been closed.
- *
- * @param aCallback
- * Function to be called when done.
- */
-function waitForConnectionClosed(aCallback)
-{
- promiseTopicObserved("places-connection-closed").then(aCallback);
- shutdownPlaces();
-}
-
-/**
- * Tests if a given guid is valid for use in Places or not.
- *
- * @param aGuid
- * The guid to test.
- * @param [optional] aStack
- * The stack frame used to report the error.
- */
-function do_check_valid_places_guid(aGuid,
- aStack)
-{
- if (!aStack) {
- aStack = Components.stack.caller;
- }
- do_check_true(/^[a-zA-Z0-9\-_]{12}$/.test(aGuid), aStack);
-}
-
-/**
- * Retrieves the guid for a given uri.
- *
- * @param aURI
- * The uri to check.
- * @param [optional] aStack
- * The stack frame used to report the error.
- * @return the associated the guid.
- */
-function do_get_guid_for_uri(aURI,
- aStack)
-{
- if (!aStack) {
- aStack = Components.stack.caller;
- }
- let stmt = DBConn().createStatement(
- `SELECT guid
- FROM moz_places
- WHERE url_hash = hash(:url) AND url = :url`
- );
- stmt.params.url = aURI.spec;
- do_check_true(stmt.executeStep(), aStack);
- let guid = stmt.row.guid;
- stmt.finalize();
- do_check_valid_places_guid(guid, aStack);
- return guid;
-}
-
-/**
- * Tests that a guid was set in moz_places for a given uri.
- *
- * @param aURI
- * The uri to check.
- * @param [optional] aGUID
- * The expected guid in the database.
- */
-function do_check_guid_for_uri(aURI,
- aGUID)
-{
- let caller = Components.stack.caller;
- let guid = do_get_guid_for_uri(aURI, caller);
- if (aGUID) {
- do_check_valid_places_guid(aGUID, caller);
- do_check_eq(guid, aGUID, caller);
- }
-}
-
-/**
- * Retrieves the guid for a given bookmark.
- *
- * @param aId
- * The bookmark id to check.
- * @param [optional] aStack
- * The stack frame used to report the error.
- * @return the associated the guid.
- */
-function do_get_guid_for_bookmark(aId,
- aStack)
-{
- if (!aStack) {
- aStack = Components.stack.caller;
- }
- let stmt = DBConn().createStatement(
- `SELECT guid
- FROM moz_bookmarks
- WHERE id = :item_id`
- );
- stmt.params.item_id = aId;
- do_check_true(stmt.executeStep(), aStack);
- let guid = stmt.row.guid;
- stmt.finalize();
- do_check_valid_places_guid(guid, aStack);
- return guid;
-}
-
-/**
- * Tests that a guid was set in moz_places for a given bookmark.
- *
- * @param aId
- * The bookmark id to check.
- * @param [optional] aGUID
- * The expected guid in the database.
- */
-function do_check_guid_for_bookmark(aId,
- aGUID)
-{
- let caller = Components.stack.caller;
- let guid = do_get_guid_for_bookmark(aId, caller);
- if (aGUID) {
- do_check_valid_places_guid(aGUID, caller);
- do_check_eq(guid, aGUID, caller);
- }
-}
-
-/**
- * Compares 2 arrays returning whether they contains the same elements.
- *
- * @param a1
- * First array to compare.
- * @param a2
- * Second array to compare.
- * @param [optional] sorted
- * Whether the comparison should take in count position of the elements.
- * @return true if the arrays contain the same elements, false otherwise.
- */
-function do_compare_arrays(a1, a2, sorted)
-{
- if (a1.length != a2.length)
- return false;
-
- if (sorted) {
- return a1.every((e, i) => e == a2[i]);
- }
- return a1.filter(e => !a2.includes(e)).length == 0 &&
- a2.filter(e => !a1.includes(e)).length == 0;
-}
-
-/**
- * Generic nsINavBookmarkObserver that doesn't implement anything, but provides
- * dummy methods to prevent errors about an object not having a certain method.
- */
-function NavBookmarkObserver() {}
-
-NavBookmarkObserver.prototype = {
- onBeginUpdateBatch: function () {},
- onEndUpdateBatch: function () {},
- onItemAdded: function () {},
- onItemRemoved: function () {},
- onItemChanged: function () {},
- onItemVisited: function () {},
- onItemMoved: function () {},
- QueryInterface: XPCOMUtils.generateQI([
- Ci.nsINavBookmarkObserver,
- ])
-};
-
-/**
- * Generic nsINavHistoryObserver that doesn't implement anything, but provides
- * dummy methods to prevent errors about an object not having a certain method.
- */
-function NavHistoryObserver() {}
-
-NavHistoryObserver.prototype = {
- onBeginUpdateBatch: function () {},
- onEndUpdateBatch: function () {},
- onVisit: function () {},
- onTitleChanged: function () {},
- onDeleteURI: function () {},
- onClearHistory: function () {},
- onPageChanged: function () {},
- onDeleteVisits: function () {},
- QueryInterface: XPCOMUtils.generateQI([
- Ci.nsINavHistoryObserver,
- ])
-};
-
-/**
- * Generic nsINavHistoryResultObserver that doesn't implement anything, but
- * provides dummy methods to prevent errors about an object not having a certain
- * method.
- */
-function NavHistoryResultObserver() {}
-
-NavHistoryResultObserver.prototype = {
- batching: function () {},
- containerStateChanged: function () {},
- invalidateContainer: function () {},
- nodeAnnotationChanged: function () {},
- nodeDateAddedChanged: function () {},
- nodeHistoryDetailsChanged: function () {},
- nodeIconChanged: function () {},
- nodeInserted: function () {},
- nodeKeywordChanged: function () {},
- nodeLastModifiedChanged: function () {},
- nodeMoved: function () {},
- nodeRemoved: function () {},
- nodeTagsChanged: function () {},
- nodeTitleChanged: function () {},
- nodeURIChanged: function () {},
- sortingChanged: function () {},
- QueryInterface: XPCOMUtils.generateQI([
- Ci.nsINavHistoryResultObserver,
- ])
-};
-
-/**
- * Asynchronously check a url is visited.
- *
- * @param aURI The URI.
- * @return {Promise}
- * @resolves When the check has been added successfully.
- * @rejects JavaScript exception.
- */
-function promiseIsURIVisited(aURI) {
- let deferred = Promise.defer();
-
- PlacesUtils.asyncHistory.isURIVisited(aURI, function(unused, aIsVisited) {
- deferred.resolve(aIsVisited);
- });
-
- return deferred.promise;
-}
-
-/**
- * Asynchronously set the favicon associated with a page.
- * @param aPageURI
- * The page's URI
- * @param aIconURI
- * The URI of the favicon to be set.
- */
-function promiseSetIconForPage(aPageURI, aIconURI) {
- let deferred = Promise.defer();
- PlacesUtils.favicons.setAndFetchFaviconForPage(
- aPageURI, aIconURI, true,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- () => { deferred.resolve(); },
- Services.scriptSecurityManager.getSystemPrincipal());
- return deferred.promise;
-}
-
-function checkBookmarkObject(info) {
- do_check_valid_places_guid(info.guid);
- do_check_valid_places_guid(info.parentGuid);
- Assert.ok(typeof info.index == "number", "index should be a number");
- Assert.ok(info.dateAdded.constructor.name == "Date", "dateAdded should be a Date");
- Assert.ok(info.lastModified.constructor.name == "Date", "lastModified should be a Date");
- Assert.ok(info.lastModified >= info.dateAdded, "lastModified should never be smaller than dateAdded");
- Assert.ok(typeof info.type == "number", "type should be a number");
-}
-
-/**
- * Reads foreign_count value for a given url.
- */
-function* foreign_count(url) {
- if (url instanceof Ci.nsIURI)
- url = url.spec;
- let db = yield PlacesUtils.promiseDBConnection();
- let rows = yield db.executeCached(
- `SELECT foreign_count FROM moz_places
- WHERE url_hash = hash(:url) AND url = :url
- `, { url });
- return rows.length == 0 ? 0 : rows[0].getResultByName("foreign_count");
-}
diff --git a/toolkit/components/places/tests/history/.eslintrc.js b/toolkit/components/places/tests/history/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/places/tests/history/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/places/tests/history/head_history.js b/toolkit/components/places/tests/history/head_history.js
deleted file mode 100644
index 870802dc1d..0000000000
--- a/toolkit/components/places/tests/history/head_history.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var Ci = Components.interfaces;
-var Cc = Components.classes;
-var Cr = Components.results;
-var Cu = Components.utils;
-
-Cu.import("resource://gre/modules/Services.jsm");
-
-// Import common head.
-{
- let commonFile = do_get_file("../head_common.js", false);
- let uri = Services.io.newFileURI(commonFile);
- Services.scriptloader.loadSubScript(uri.spec, this);
-}
diff --git a/toolkit/components/places/tests/history/test_insert.js b/toolkit/components/places/tests/history/test_insert.js
deleted file mode 100644
index e2884af8c9..0000000000
--- a/toolkit/components/places/tests/history/test_insert.js
+++ /dev/null
@@ -1,257 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-
-// Tests for `History.insert` and `History.insertMany`, as implemented in History.jsm
-
-"use strict";
-
-add_task(function* test_insert_error_cases() {
- const TEST_URL = "http://mozilla.com";
-
- Assert.throws(
- () => PlacesUtils.history.insert(),
- /TypeError: pageInfo must be an object/,
- "passing a null into History.insert should throw a TypeError"
- );
- Assert.throws(
- () => PlacesUtils.history.insert(1),
- /TypeError: pageInfo must be an object/,
- "passing a non object into History.insert should throw a TypeError"
- );
- Assert.throws(
- () => PlacesUtils.history.insert({}),
- /TypeError: PageInfo object must have a url property/,
- "passing an object without a url to History.insert should throw a TypeError"
- );
- Assert.throws(
- () => PlacesUtils.history.insert({url: 123}),
- /TypeError: Invalid url or guid: 123/,
- "passing an object with an invalid url to History.insert should throw a TypeError"
- );
- Assert.throws(
- () => PlacesUtils.history.insert({url: TEST_URL}),
- /TypeError: PageInfo object must have an array of visits/,
- "passing an object without a visits property to History.insert should throw a TypeError"
- );
- Assert.throws(
- () => PlacesUtils.history.insert({url: TEST_URL, visits: 1}),
- /TypeError: PageInfo object must have an array of visits/,
- "passing an object with a non-array visits property to History.insert should throw a TypeError"
- );
- Assert.throws(
- () => PlacesUtils.history.insert({url: TEST_URL, visits: []}),
- /TypeError: PageInfo object must have an array of visits/,
- "passing an object with an empty array as the visits property to History.insert should throw a TypeError"
- );
- Assert.throws(
- () => PlacesUtils.history.insert({
- url: TEST_URL,
- visits: [
- {
- transition: TRANSITION_LINK,
- date: "a"
- }
- ]}),
- /TypeError: Expected a Date, got a/,
- "passing a visit object with an invalid date to History.insert should throw a TypeError"
- );
- Assert.throws(
- () => PlacesUtils.history.insert({
- url: TEST_URL,
- visits: [
- {
- transition: TRANSITION_LINK
- },
- {
- transition: TRANSITION_LINK,
- date: "a"
- }
- ]}),
- /TypeError: Expected a Date, got a/,
- "passing a second visit object with an invalid date to History.insert should throw a TypeError"
- );
- let futureDate = new Date();
- futureDate.setDate(futureDate.getDate() + 1000);
- Assert.throws(
- () => PlacesUtils.history.insert({
- url: TEST_URL,
- visits: [
- {
- transition: TRANSITION_LINK,
- date: futureDate,
- }
- ]}),
- `TypeError: date: ${futureDate} is not a valid date`,
- "passing a visit object with a future date to History.insert should throw a TypeError"
- );
- Assert.throws(
- () => PlacesUtils.history.insert({
- url: TEST_URL,
- visits: [
- {transition: "a"}
- ]}),
- /TypeError: transition: a is not a valid transition type/,
- "passing a visit object with an invalid transition to History.insert should throw a TypeError"
- );
-});
-
-add_task(function* test_history_insert() {
- const TEST_URL = "http://mozilla.com/";
-
- let inserter = Task.async(function*(name, filter, referrer, date, transition) {
- do_print(name);
- do_print(`filter: ${filter}, referrer: ${referrer}, date: ${date}, transition: ${transition}`);
-
- let uri = NetUtil.newURI(TEST_URL + Math.random());
- let title = "Visit " + Math.random();
-
- let pageInfo = {
- title,
- visits: [
- {transition: transition, referrer: referrer, date: date, }
- ]
- };
-
- pageInfo.url = yield filter(uri);
-
- let result = yield PlacesUtils.history.insert(pageInfo);
-
- Assert.ok(PlacesUtils.isValidGuid(result.guid), "guid for pageInfo object is valid");
- Assert.equal(uri.spec, result.url.href, "url is correct for pageInfo object");
- Assert.equal(title, result.title, "title is correct for pageInfo object");
- Assert.equal(TRANSITION_LINK, result.visits[0].transition, "transition is correct for pageInfo object");
- if (referrer) {
- Assert.equal(referrer, result.visits[0].referrer.href, "url of referrer for visit is correct");
- } else {
- Assert.equal(null, result.visits[0].referrer, "url of referrer for visit is correct");
- }
- if (date) {
- Assert.equal(Number(date),
- Number(result.visits[0].date),
- "date of visit is correct");
- }
-
- Assert.ok(yield PlacesTestUtils.isPageInDB(uri), "Page was added");
- Assert.ok(yield PlacesTestUtils.visitsInDB(uri), "Visit was added");
- });
-
- try {
- for (let referrer of [TEST_URL, null]) {
- for (let date of [new Date(), null]) {
- for (let transition of [TRANSITION_LINK, null]) {
- yield inserter("Testing History.insert() with an nsIURI", x => x, referrer, date, transition);
- yield inserter("Testing History.insert() with a string url", x => x.spec, referrer, date, transition);
- yield inserter("Testing History.insert() with a URL object", x => new URL(x.spec), referrer, date, transition);
- }
- }
- }
- } finally {
- yield PlacesTestUtils.clearHistory();
- }
-});
-
-add_task(function* test_insert_multiple_error_cases() {
- let validPageInfo = {
- url: "http://mozilla.com",
- visits: [
- {transition: TRANSITION_LINK}
- ]
- };
-
- Assert.throws(
- () => PlacesUtils.history.insertMany(),
- /TypeError: pageInfos must be an array/,
- "passing a null into History.insertMany should throw a TypeError"
- );
- Assert.throws(
- () => PlacesUtils.history.insertMany([]),
- /TypeError: pageInfos may not be an empty array/,
- "passing an empty array into History.insertMany should throw a TypeError"
- );
- Assert.throws(
- () => PlacesUtils.history.insertMany([validPageInfo, {}]),
- /TypeError: PageInfo object must have a url property/,
- "passing a second invalid PageInfo object to History.insertMany should throw a TypeError"
- );
-});
-
-add_task(function* test_history_insertMany() {
- const BAD_URLS = ["about:config", "chrome://browser/content/browser.xul"];
- const GOOD_URLS = [1, 2, 3].map(x => { return `http://mozilla.com/${x}`; });
-
- let makePageInfos = Task.async(function*(urls, filter = x => x) {
- let pageInfos = [];
- for (let url of urls) {
- let uri = NetUtil.newURI(url);
-
- let pageInfo = {
- title: `Visit to ${url}`,
- visits: [
- {transition: TRANSITION_LINK}
- ]
- };
-
- pageInfo.url = yield filter(uri);
- pageInfos.push(pageInfo);
- }
- return pageInfos;
- });
-
- let inserter = Task.async(function*(name, filter, useCallbacks) {
- do_print(name);
- do_print(`filter: ${filter}`);
- do_print(`useCallbacks: ${useCallbacks}`);
- yield PlacesTestUtils.clearHistory();
-
- let result;
- let allUrls = GOOD_URLS.concat(BAD_URLS);
- let pageInfos = yield makePageInfos(allUrls, filter);
-
- if (useCallbacks) {
- let onResultUrls = [];
- let onErrorUrls = [];
- result = yield PlacesUtils.history.insertMany(pageInfos, pageInfo => {
- let url = pageInfo.url.href;
- Assert.ok(GOOD_URLS.includes(url), "onResult callback called for correct url");
- onResultUrls.push(url);
- Assert.equal(`Visit to ${url}`, pageInfo.title, "onResult callback provides the correct title");
- Assert.ok(PlacesUtils.isValidGuid(pageInfo.guid), "onResult callback provides a valid guid");
- }, pageInfo => {
- let url = pageInfo.url.href;
- Assert.ok(BAD_URLS.includes(url), "onError callback called for correct uri");
- onErrorUrls.push(url);
- Assert.equal(undefined, pageInfo.title, "onError callback provides the correct title");
- Assert.equal(undefined, pageInfo.guid, "onError callback provides the expected guid");
- });
- Assert.equal(GOOD_URLS.sort().toString(), onResultUrls.sort().toString(), "onResult callback was called for each good url");
- Assert.equal(BAD_URLS.sort().toString(), onErrorUrls.sort().toString(), "onError callback was called for each bad url");
- } else {
- result = yield PlacesUtils.history.insertMany(pageInfos);
- }
-
- Assert.equal(undefined, result, "insertMany returned undefined");
-
- for (let url of allUrls) {
- let expected = GOOD_URLS.includes(url);
- Assert.equal(expected, yield PlacesTestUtils.isPageInDB(url), `isPageInDB for ${url} is ${expected}`);
- Assert.equal(expected, yield PlacesTestUtils.visitsInDB(url), `visitsInDB for ${url} is ${expected}`);
- }
- });
-
- try {
- for (let useCallbacks of [false, true]) {
- yield inserter("Testing History.insertMany() with an nsIURI", x => x, useCallbacks);
- yield inserter("Testing History.insertMany() with a string url", x => x.spec, useCallbacks);
- yield inserter("Testing History.insertMany() with a URL object", x => new URL(x.spec), useCallbacks);
- }
- // Test rejection when no items added
- let pageInfos = yield makePageInfos(BAD_URLS);
- PlacesUtils.history.insertMany(pageInfos).then(() => {
- Assert.ok(false, "History.insertMany rejected promise with all bad URLs");
- }, error => {
- Assert.equal("No items were added to history.", error.message, "History.insertMany rejected promise with all bad URLs");
- });
- } finally {
- yield PlacesTestUtils.clearHistory();
- }
-});
diff --git a/toolkit/components/places/tests/history/test_remove.js b/toolkit/components/places/tests/history/test_remove.js
deleted file mode 100644
index 7423f64649..0000000000
--- a/toolkit/components/places/tests/history/test_remove.js
+++ /dev/null
@@ -1,360 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-
-// Tests for `History.remove`, as implemented in History.jsm
-
-"use strict";
-
-Cu.importGlobalProperties(["URL"]);
-
-
-// Test removing a single page
-add_task(function* test_remove_single() {
- yield PlacesTestUtils.clearHistory();
- yield PlacesUtils.bookmarks.eraseEverything();
-
-
- let WITNESS_URI = NetUtil.newURI("http://mozilla.com/test_browserhistory/test_remove/" + Math.random());
- yield PlacesTestUtils.addVisits(WITNESS_URI);
- Assert.ok(page_in_database(WITNESS_URI));
-
- let remover = Task.async(function*(name, filter, options) {
- do_print(name);
- do_print(JSON.stringify(options));
- do_print("Setting up visit");
-
- let uri = NetUtil.newURI("http://mozilla.com/test_browserhistory/test_remove/" + Math.random());
- let title = "Visit " + Math.random();
- yield PlacesTestUtils.addVisits({uri: uri, title: title});
- Assert.ok(visits_in_database(uri), "History entry created");
-
- let removeArg = yield filter(uri);
-
- if (options.addBookmark) {
- PlacesUtils.bookmarks.insertBookmark(
- PlacesUtils.unfiledBookmarksFolderId,
- uri,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "test bookmark");
- }
-
- let shouldRemove = !options.addBookmark;
- let observer;
- let promiseObserved = new Promise((resolve, reject) => {
- observer = {
- onBeginUpdateBatch: function() {},
- onEndUpdateBatch: function() {},
- onVisit: function(aUri) {
- reject(new Error("Unexpected call to onVisit " + aUri.spec));
- },
- onTitleChanged: function(aUri) {
- reject(new Error("Unexpected call to onTitleChanged " + aUri.spec));
- },
- onClearHistory: function() {
- reject("Unexpected call to onClearHistory");
- },
- onPageChanged: function(aUri) {
- reject(new Error("Unexpected call to onPageChanged " + aUri.spec));
- },
- onFrecencyChanged: function(aURI) {
- try {
- Assert.ok(!shouldRemove, "Observing onFrecencyChanged");
- Assert.equal(aURI.spec, uri.spec, "Observing effect on the right uri");
- } finally {
- resolve();
- }
- },
- onManyFrecenciesChanged: function() {
- try {
- Assert.ok(!shouldRemove, "Observing onManyFrecenciesChanged");
- } finally {
- resolve();
- }
- },
- onDeleteURI: function(aURI) {
- try {
- Assert.ok(shouldRemove, "Observing onDeleteURI");
- Assert.equal(aURI.spec, uri.spec, "Observing effect on the right uri");
- } finally {
- resolve();
- }
- },
- onDeleteVisits: function(aURI) {
- Assert.equal(aURI.spec, uri.spec, "Observing onDeleteVisits on the right uri");
- }
- };
- });
- PlacesUtils.history.addObserver(observer, false);
-
- do_print("Performing removal");
- let removed = false;
- if (options.useCallback) {
- let onRowCalled = false;
- let guid = do_get_guid_for_uri(uri);
- removed = yield PlacesUtils.history.remove(removeArg, page => {
- Assert.equal(onRowCalled, false, "Callback has not been called yet");
- onRowCalled = true;
- Assert.equal(page.url.href, uri.spec, "Callback provides the correct url");
- Assert.equal(page.guid, guid, "Callback provides the correct guid");
- Assert.equal(page.title, title, "Callback provides the correct title");
- });
- Assert.ok(onRowCalled, "Callback has been called");
- } else {
- removed = yield PlacesUtils.history.remove(removeArg);
- }
-
- yield promiseObserved;
- PlacesUtils.history.removeObserver(observer);
-
- Assert.equal(visits_in_database(uri), 0, "History entry has disappeared");
- Assert.notEqual(visits_in_database(WITNESS_URI), 0, "Witness URI still has visits");
- Assert.notEqual(page_in_database(WITNESS_URI), 0, "Witness URI is still here");
- if (shouldRemove) {
- Assert.ok(removed, "Something was removed");
- Assert.equal(page_in_database(uri), 0, "Page has disappeared");
- } else {
- Assert.ok(!removed, "The page was not removed, as there was a bookmark");
- Assert.notEqual(page_in_database(uri), 0, "The page is still present");
- }
- });
-
- try {
- for (let useCallback of [false, true]) {
- for (let addBookmark of [false, true]) {
- let options = { useCallback: useCallback, addBookmark: addBookmark };
- yield remover("Testing History.remove() with a single URI", x => x, options);
- yield remover("Testing History.remove() with a single string url", x => x.spec, options);
- yield remover("Testing History.remove() with a single string guid", x => do_get_guid_for_uri(x), options);
- yield remover("Testing History.remove() with a single URI in an array", x => [x], options);
- yield remover("Testing History.remove() with a single string url in an array", x => [x.spec], options);
- yield remover("Testing History.remove() with a single string guid in an array", x => [do_get_guid_for_uri(x)], options);
- }
- }
- } finally {
- yield PlacesTestUtils.clearHistory();
- }
- return;
-});
-
-// Test removing a list of pages
-add_task(function* test_remove_many() {
- const SIZE = 10;
-
- yield PlacesTestUtils.clearHistory();
- yield PlacesUtils.bookmarks.eraseEverything();
-
- do_print("Adding a witness page");
- let WITNESS_URI = NetUtil.newURI("http://mozilla.com/test_browserhistory/test_remove/" + Math.random());
- yield PlacesTestUtils.addVisits(WITNESS_URI);
- Assert.ok(page_in_database(WITNESS_URI), "Witness page added");
-
- do_print("Generating samples");
- let pages = [];
- for (let i = 0; i < SIZE; ++i) {
- let uri = NetUtil.newURI("http://mozilla.com/test_browserhistory/test_remove?sample=" + i + "&salt=" + Math.random());
- let title = "Visit " + i + ", " + Math.random();
- let hasBookmark = i % 3 == 0;
- let page = {
- uri: uri,
- title: title,
- hasBookmark: hasBookmark,
- // `true` once `onResult` has been called for this page
- onResultCalled: false,
- // `true` once `onDeleteVisits` has been called for this page
- onDeleteVisitsCalled: false,
- // `true` once `onFrecencyChangedCalled` has been called for this page
- onFrecencyChangedCalled: false,
- // `true` once `onDeleteURI` has been called for this page
- onDeleteURICalled: false,
- };
- do_print("Pushing: " + uri.spec);
- pages.push(page);
-
- yield PlacesTestUtils.addVisits(page);
- page.guid = do_get_guid_for_uri(uri);
- if (hasBookmark) {
- PlacesUtils.bookmarks.insertBookmark(
- PlacesUtils.unfiledBookmarksFolderId,
- uri,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "test bookmark " + i);
- }
- Assert.ok(page_in_database(uri), "Page added");
- }
-
- do_print("Mixing key types and introducing dangling keys");
- let keys = [];
- for (let i = 0; i < SIZE; ++i) {
- if (i % 4 == 0) {
- keys.push(pages[i].uri);
- keys.push(NetUtil.newURI("http://example.org/dangling/nsIURI/" + i));
- } else if (i % 4 == 1) {
- keys.push(new URL(pages[i].uri.spec));
- keys.push(new URL("http://example.org/dangling/URL/" + i));
- } else if (i % 4 == 2) {
- keys.push(pages[i].uri.spec);
- keys.push("http://example.org/dangling/stringuri/" + i);
- } else {
- keys.push(pages[i].guid);
- keys.push(("guid_" + i + "_01234567890").substr(0, 12));
- }
- }
-
- let observer = {
- onBeginUpdateBatch: function() {},
- onEndUpdateBatch: function() {},
- onVisit: function(aURI) {
- Assert.ok(false, "Unexpected call to onVisit " + aURI.spec);
- },
- onTitleChanged: function(aURI) {
- Assert.ok(false, "Unexpected call to onTitleChanged " + aURI.spec);
- },
- onClearHistory: function() {
- Assert.ok(false, "Unexpected call to onClearHistory");
- },
- onPageChanged: function(aURI) {
- Assert.ok(false, "Unexpected call to onPageChanged " + aURI.spec);
- },
- onFrecencyChanged: function(aURI) {
- let origin = pages.find(x => x.uri.spec == aURI.spec);
- Assert.ok(origin);
- Assert.ok(origin.hasBookmark, "Observing onFrecencyChanged on a page with a bookmark");
- origin.onFrecencyChangedCalled = true;
- // We do not make sure that `origin.onFrecencyChangedCalled` is `false`, as
- },
- onManyFrecenciesChanged: function() {
- Assert.ok(false, "Observing onManyFrecenciesChanges, this is most likely correct but not covered by this test");
- },
- onDeleteURI: function(aURI) {
- let origin = pages.find(x => x.uri.spec == aURI.spec);
- Assert.ok(origin);
- Assert.ok(!origin.hasBookmark, "Observing onDeleteURI on a page without a bookmark");
- Assert.ok(!origin.onDeleteURICalled, "Observing onDeleteURI for the first time");
- origin.onDeleteURICalled = true;
- },
- onDeleteVisits: function(aURI) {
- let origin = pages.find(x => x.uri.spec == aURI.spec);
- Assert.ok(origin);
- Assert.ok(!origin.onDeleteVisitsCalled, "Observing onDeleteVisits for the first time");
- origin.onDeleteVisitsCalled = true;
- }
- };
- PlacesUtils.history.addObserver(observer, false);
-
- do_print("Removing the pages and checking the callbacks");
- let removed = yield PlacesUtils.history.remove(keys, page => {
- let origin = pages.find(candidate => candidate.uri.spec == page.url.href);
-
- Assert.ok(origin, "onResult has a valid page");
- Assert.ok(!origin.onResultCalled, "onResult has not seen this page yet");
- origin.onResultCalled = true;
- Assert.equal(page.guid, origin.guid, "onResult has the right guid");
- Assert.equal(page.title, origin.title, "onResult has the right title");
- });
- Assert.ok(removed, "Something was removed");
-
- PlacesUtils.history.removeObserver(observer);
-
- do_print("Checking out results");
- // By now the observers should have been called.
- for (let i = 0; i < pages.length; ++i) {
- let page = pages[i];
- do_print("Page: " + i);
- Assert.ok(page.onResultCalled, "We have reached the page from the callback");
- Assert.ok(visits_in_database(page.uri) == 0, "History entry has disappeared");
- Assert.equal(page_in_database(page.uri) != 0, page.hasBookmark, "Page is present only if it also has bookmarks");
- Assert.equal(page.onFrecencyChangedCalled, page.onDeleteVisitsCalled, "onDeleteVisits was called iff onFrecencyChanged was called");
- Assert.ok(page.onFrecencyChangedCalled ^ page.onDeleteURICalled, "Either onFrecencyChanged or onDeleteURI was called");
- }
-
- Assert.notEqual(visits_in_database(WITNESS_URI), 0, "Witness URI still has visits");
- Assert.notEqual(page_in_database(WITNESS_URI), 0, "Witness URI is still here");
-});
-
-add_task(function* cleanup() {
- yield PlacesTestUtils.clearHistory();
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-// Test the various error cases
-add_task(function* test_error_cases() {
- Assert.throws(
- () => PlacesUtils.history.remove(),
- /TypeError: Invalid url/,
- "History.remove with no argument should throw a TypeError"
- );
- Assert.throws(
- () => PlacesUtils.history.remove(null),
- /TypeError: Invalid url/,
- "History.remove with `null` should throw a TypeError"
- );
- Assert.throws(
- () => PlacesUtils.history.remove(undefined),
- /TypeError: Invalid url/,
- "History.remove with `undefined` should throw a TypeError"
- );
- Assert.throws(
- () => PlacesUtils.history.remove("not a guid, obviously"),
- /TypeError: .* is not a valid URL/,
- "History.remove with an ill-formed guid/url argument should throw a TypeError"
- );
- Assert.throws(
- () => PlacesUtils.history.remove({"not the kind of object we know how to handle": true}),
- /TypeError: Invalid url/,
- "History.remove with an unexpected object should throw a TypeError"
- );
- Assert.throws(
- () => PlacesUtils.history.remove([]),
- /TypeError: Expected at least one page/,
- "History.remove with an empty array should throw a TypeError"
- );
- Assert.throws(
- () => PlacesUtils.history.remove([null]),
- /TypeError: Invalid url or guid/,
- "History.remove with an array containing null should throw a TypeError"
- );
- Assert.throws(
- () => PlacesUtils.history.remove(["http://example.org", "not a guid, obviously"]),
- /TypeError: .* is not a valid URL/,
- "History.remove with an array containing an ill-formed guid/url argument should throw a TypeError"
- );
- Assert.throws(
- () => PlacesUtils.history.remove(["0123456789ab"/* valid guid*/, null]),
- /TypeError: Invalid url or guid: null/,
- "History.remove with an array containing a guid and a second argument that is null should throw a TypeError"
- );
- Assert.throws(
- () => PlacesUtils.history.remove(["http://example.org", {"not the kind of object we know how to handle": true}]),
- /TypeError: Invalid url/,
- "History.remove with an array containing an unexpected objecgt should throw a TypeError"
- );
- Assert.throws(
- () => PlacesUtils.history.remove("http://example.org", "not a function, obviously"),
- /TypeError: Invalid function/,
- "History.remove with a second argument that is not a function argument should throw a TypeError"
- );
- try {
- PlacesUtils.history.remove("http://example.org/I/have/clearly/not/been/added", null);
- Assert.ok(true, "History.remove should ignore `null` as a second argument");
- } catch (ex) {
- Assert.ok(false, "History.remove should ignore `null` as a second argument");
- }
-});
-
-add_task(function* test_orphans() {
- let uri = NetUtil.newURI("http://moz.org/");
- yield PlacesTestUtils.addVisits({ uri });
-
- PlacesUtils.favicons.setAndFetchFaviconForPage(
- uri, SMALLPNG_DATA_URI, true, PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- null, Services.scriptSecurityManager.getSystemPrincipal());
- PlacesUtils.annotations.setPageAnnotation(uri, "test", "restval", 0,
- PlacesUtils.annotations.EXPIRE_NEVER);
-
- yield PlacesUtils.history.remove(uri);
- Assert.ok(!(yield PlacesTestUtils.isPageInDB(uri)), "Page should have been removed");
- let db = yield PlacesUtils.promiseDBConnection();
- let rows = yield db.execute(`SELECT (SELECT count(*) FROM moz_annos) +
- (SELECT count(*) FROM moz_favicons) AS count`);
- Assert.equal(rows[0].getResultByName("count"), 0, "Should not find orphans");
-});
diff --git a/toolkit/components/places/tests/history/test_removeVisits.js b/toolkit/components/places/tests/history/test_removeVisits.js
deleted file mode 100644
index 8df0c81a96..0000000000
--- a/toolkit/components/places/tests/history/test_removeVisits.js
+++ /dev/null
@@ -1,316 +0,0 @@
-const JS_NOW = Date.now();
-const DB_NOW = JS_NOW * 1000;
-const TEST_URI = uri("http://example.com/");
-const PLACE_URI = uri("place:queryType=0&sort=8&maxResults=10");
-
-function* cleanup() {
- yield PlacesTestUtils.clearHistory();
- yield PlacesUtils.bookmarks.eraseEverything();
- // This is needed to remove place: entries.
- DBConn().executeSimpleSQL("DELETE FROM moz_places");
-}
-
-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++) {
- visits.push({ uri: TEST_URI, visitDate: DB_NOW - 100000 - (i * 1000) });
- }
- yield PlacesTestUtils.addVisits(visits);
-
- do_print("Remove visits using timerange outside the URI's visits.");
- let filter = {
- beginDate: new Date(JS_NOW - 10),
- endDate: new Date(JS_NOW)
- };
- yield PlacesUtils.history.removeVisitsByFilter(filter);
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- do_print("URI should still exist in moz_places.");
- do_check_true(page_in_database(TEST_URI.spec));
-
- do_print("Run a history query and check that all visits still exist.");
- let query = PlacesUtils.history.getNewQuery();
- let opts = PlacesUtils.history.getNewQueryOptions();
- opts.resultType = opts.RESULTS_AS_VISIT;
- opts.sortingMode = opts.SORT_BY_DATE_DESCENDING;
- let root = PlacesUtils.history.executeQuery(query, opts).root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 10);
- for (let i = 0; i < root.childCount; i++) {
- let visitTime = root.getChild(i).time;
- do_check_eq(visitTime, DB_NOW - 100000 - (i * 1000));
- }
- root.containerOpen = false;
-
- do_print("asyncHistory.isURIVisited should return true.");
- do_check_true(yield promiseIsURIVisited(TEST_URI));
-
- yield PlacesTestUtils.promiseAsyncUpdates();
- do_print("Frecency should be positive.")
- do_check_true(frecencyForUrl(TEST_URI) > 0);
-
- yield cleanup();
-});
-
-add_task(function* remove_visits_outside_bookmarked_uri() {
- do_print("*** TEST: Remove some visits outside valid timeframe from a bookmarked URI");
-
- do_print("Add 10 visits for the URI from way in the past.");
- let visits = [];
- for (let i = 0; i < 10; i++) {
- visits.push({ uri: TEST_URI, visitDate: DB_NOW - 100000 - (i * 1000) });
- }
- yield PlacesTestUtils.addVisits(visits);
- do_print("Bookmark the URI.");
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- TEST_URI,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "bookmark title");
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- do_print("Remove visits using timerange outside the URI's visits.");
- let filter = {
- beginDate: new Date(JS_NOW - 10),
- endDate: new Date(JS_NOW)
- };
- yield PlacesUtils.history.removeVisitsByFilter(filter);
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- do_print("URI should still exist in moz_places.");
- do_check_true(page_in_database(TEST_URI.spec));
-
- do_print("Run a history query and check that all visits still exist.");
- let query = PlacesUtils.history.getNewQuery();
- let opts = PlacesUtils.history.getNewQueryOptions();
- opts.resultType = opts.RESULTS_AS_VISIT;
- opts.sortingMode = opts.SORT_BY_DATE_DESCENDING;
- let root = PlacesUtils.history.executeQuery(query, opts).root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 10);
- for (let i = 0; i < root.childCount; i++) {
- let visitTime = root.getChild(i).time;
- do_check_eq(visitTime, DB_NOW - 100000 - (i * 1000));
- }
- root.containerOpen = false;
-
- do_print("asyncHistory.isURIVisited should return true.");
- do_check_true(yield promiseIsURIVisited(TEST_URI));
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- do_print("Frecency should be positive.")
- do_check_true(frecencyForUrl(TEST_URI) > 0);
-
- yield cleanup();
-});
-
-add_task(function* remove_visits_unbookmarked_uri() {
- do_print("*** TEST: Remove some visits from an unbookmarked URI");
-
- do_print("Add 10 visits for the URI from now to 9 usecs in the past.");
- let visits = [];
- for (let i = 0; i < 10; i++) {
- visits.push({ uri: TEST_URI, visitDate: DB_NOW - (i * 1000) });
- }
- yield PlacesTestUtils.addVisits(visits);
-
- do_print("Remove the 5 most recent visits.");
- let filter = {
- beginDate: new Date(JS_NOW - 4),
- endDate: new Date(JS_NOW)
- };
- yield PlacesUtils.history.removeVisitsByFilter(filter);
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- do_print("URI should still exist in moz_places.");
- do_check_true(page_in_database(TEST_URI.spec));
-
- do_print("Run a history query and check that only the older 5 visits still exist.");
- let query = PlacesUtils.history.getNewQuery();
- let opts = PlacesUtils.history.getNewQueryOptions();
- opts.resultType = opts.RESULTS_AS_VISIT;
- opts.sortingMode = opts.SORT_BY_DATE_DESCENDING;
- let root = PlacesUtils.history.executeQuery(query, opts).root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 5);
- for (let i = 0; i < root.childCount; i++) {
- let visitTime = root.getChild(i).time;
- do_check_eq(visitTime, DB_NOW - (i * 1000) - 5000);
- }
- root.containerOpen = false;
-
- do_print("asyncHistory.isURIVisited should return true.");
- do_check_true(yield promiseIsURIVisited(TEST_URI));
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- do_print("Frecency should be positive.")
- do_check_true(frecencyForUrl(TEST_URI) > 0);
-
- yield cleanup();
-});
-
-add_task(function* remove_visits_bookmarked_uri() {
- do_print("*** TEST: Remove some visits from a bookmarked URI");
-
- do_print("Add 10 visits for the URI from now to 9 usecs in the past.");
- let visits = [];
- for (let i = 0; i < 10; i++) {
- visits.push({ uri: TEST_URI, visitDate: DB_NOW - (i * 1000) });
- }
- yield PlacesTestUtils.addVisits(visits);
- do_print("Bookmark the URI.");
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- TEST_URI,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "bookmark title");
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- do_print("Remove the 5 most recent visits.");
- let filter = {
- beginDate: new Date(JS_NOW - 4),
- endDate: new Date(JS_NOW)
- };
- yield PlacesUtils.history.removeVisitsByFilter(filter);
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- do_print("URI should still exist in moz_places.");
- do_check_true(page_in_database(TEST_URI.spec));
-
- do_print("Run a history query and check that only the older 5 visits still exist.");
- let query = PlacesUtils.history.getNewQuery();
- let opts = PlacesUtils.history.getNewQueryOptions();
- opts.resultType = opts.RESULTS_AS_VISIT;
- opts.sortingMode = opts.SORT_BY_DATE_DESCENDING;
- let root = PlacesUtils.history.executeQuery(query, opts).root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 5);
- for (let i = 0; i < root.childCount; i++) {
- let visitTime = root.getChild(i).time;
- do_check_eq(visitTime, DB_NOW - (i * 1000) - 5000);
- }
- root.containerOpen = false;
-
- do_print("asyncHistory.isURIVisited should return true.");
- do_check_true(yield promiseIsURIVisited(TEST_URI));
- yield PlacesTestUtils.promiseAsyncUpdates()
-
- do_print("Frecency should be positive.")
- do_check_true(frecencyForUrl(TEST_URI) > 0);
-
- yield cleanup();
-});
-
-add_task(function* remove_all_visits_unbookmarked_uri() {
- do_print("*** TEST: Remove all visits from an unbookmarked URI");
-
- do_print("Add some visits for the URI.");
- let visits = [];
- for (let i = 0; i < 10; i++) {
- visits.push({ uri: TEST_URI, visitDate: DB_NOW - (i * 1000) });
- }
- yield PlacesTestUtils.addVisits(visits);
-
- do_print("Remove all visits.");
- let filter = {
- beginDate: new Date(JS_NOW - 10),
- endDate: new Date(JS_NOW)
- };
- yield PlacesUtils.history.removeVisitsByFilter(filter);
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- do_print("URI should no longer exist in moz_places.");
- do_check_false(page_in_database(TEST_URI.spec));
-
- do_print("Run a history query and check that no visits exist.");
- let query = PlacesUtils.history.getNewQuery();
- let opts = PlacesUtils.history.getNewQueryOptions();
- opts.resultType = opts.RESULTS_AS_VISIT;
- opts.sortingMode = opts.SORT_BY_DATE_DESCENDING;
- let root = PlacesUtils.history.executeQuery(query, opts).root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 0);
- root.containerOpen = false;
-
- do_print("asyncHistory.isURIVisited should return false.");
- do_check_false(yield promiseIsURIVisited(TEST_URI));
-
- yield cleanup();
-});
-
-add_task(function* remove_all_visits_bookmarked_uri() {
- do_print("*** TEST: Remove all visits from a bookmarked URI");
-
- do_print("Add some visits for the URI.");
- let visits = [];
- for (let i = 0; i < 10; i++) {
- visits.push({ uri: TEST_URI, visitDate: DB_NOW - (i * 1000) });
- }
- yield PlacesTestUtils.addVisits(visits);
- do_print("Bookmark the URI.");
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- TEST_URI,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "bookmark title");
- yield PlacesTestUtils.promiseAsyncUpdates();
- let initialFrecency = frecencyForUrl(TEST_URI);
-
- do_print("Remove all visits.");
- let filter = {
- beginDate: new Date(JS_NOW - 10),
- endDate: new Date(JS_NOW)
- };
- yield PlacesUtils.history.removeVisitsByFilter(filter);
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- do_print("URI should still exist in moz_places.");
- do_check_true(page_in_database(TEST_URI.spec));
-
- do_print("Run a history query and check that no visits exist.");
- let query = PlacesUtils.history.getNewQuery();
- let opts = PlacesUtils.history.getNewQueryOptions();
- opts.resultType = opts.RESULTS_AS_VISIT;
- opts.sortingMode = opts.SORT_BY_DATE_DESCENDING;
- let root = PlacesUtils.history.executeQuery(query, opts).root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 0);
- root.containerOpen = false;
-
- do_print("asyncHistory.isURIVisited should return false.");
- do_check_false(yield promiseIsURIVisited(TEST_URI));
-
- do_print("nsINavBookmarksService.isBookmarked should return true.");
- do_check_true(PlacesUtils.bookmarks.isBookmarked(TEST_URI));
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- do_print("Frecency should be smaller.")
- do_check_true(frecencyForUrl(TEST_URI) < initialFrecency);
-
- yield cleanup();
-});
-
-add_task(function* remove_all_visits_bookmarked_uri() {
- do_print("*** TEST: Remove some visits from a zero frecency URI retains zero frecency");
-
- do_print("Add some visits for the URI.");
- yield PlacesTestUtils.addVisits([
- { uri: TEST_URI, transition: TRANSITION_FRAMED_LINK, visitDate: (DB_NOW - 86400000000000) },
- { uri: TEST_URI, transition: TRANSITION_FRAMED_LINK, visitDate: DB_NOW }
- ]);
-
- do_print("Remove newer visit.");
- let filter = {
- beginDate: new Date(JS_NOW - 10),
- endDate: new Date(JS_NOW)
- };
- yield PlacesUtils.history.removeVisitsByFilter(filter);
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- do_print("URI should still exist in moz_places.");
- do_check_true(page_in_database(TEST_URI.spec));
- do_print("Frecency should be zero.")
- do_check_eq(frecencyForUrl(TEST_URI), 0);
-
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/history/test_removeVisitsByFilter.js b/toolkit/components/places/tests/history/test_removeVisitsByFilter.js
deleted file mode 100644
index 699420e432..0000000000
--- a/toolkit/components/places/tests/history/test_removeVisitsByFilter.js
+++ /dev/null
@@ -1,345 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-
-// Tests for `History.removeVisitsByFilter`, as implemented in History.jsm
-
-"use strict";
-
-Cu.importGlobalProperties(["URL"]);
-
-Cu.import("resource://gre/modules/PromiseUtils.jsm", this);
-
-add_task(function* test_removeVisitsByFilter() {
- let referenceDate = new Date(1999, 9, 9, 9, 9);
-
- // Populate a database with 20 entries, remove a subset of entries,
- // ensure consistency.
- let remover = Task.async(function*(options) {
- do_print("Remover with options " + JSON.stringify(options));
- let SAMPLE_SIZE = options.sampleSize;
-
- yield PlacesTestUtils.clearHistory();
- yield PlacesUtils.bookmarks.eraseEverything();
-
- // Populate the database.
- // Create `SAMPLE_SIZE` visits, from the oldest to the newest.
-
- let bookmarkIndices = new Set(options.bookmarks);
- let visits = [];
- let frecencyChangePromises = new Map();
- let uriDeletePromises = new Map();
- let getURL = options.url ?
- i => "http://mozilla.com/test_browserhistory/test_removeVisitsByFilter/removeme/byurl/" + Math.floor(i / (SAMPLE_SIZE / 5)) + "/" :
- i => "http://mozilla.com/test_browserhistory/test_removeVisitsByFilter/removeme/" + i + "/" + Math.random();
- for (let i = 0; i < SAMPLE_SIZE; ++i) {
- let spec = getURL(i);
- let uri = NetUtil.newURI(spec);
- let jsDate = new Date(Number(referenceDate) + 3600 * 1000 * i);
- let dbDate = jsDate * 1000;
- let hasBookmark = bookmarkIndices.has(i);
- let hasOwnBookmark = hasBookmark;
- if (!hasOwnBookmark && options.url) {
- // Also mark as bookmarked if one of the earlier bookmarked items has the same URL.
- hasBookmark =
- options.bookmarks.filter(n => n < i).some(n => visits[n].uri.spec == spec && visits[n].test.hasBookmark);
- }
- do_print("Generating " + uri.spec + ", " + dbDate);
- let visit = {
- uri,
- title: "visit " + i,
- visitDate: dbDate,
- test: {
- // `visitDate`, as a Date
- jsDate: jsDate,
- // `true` if we expect that the visit will be removed
- toRemove: false,
- // `true` if `onRow` informed of the removal of this visit
- announcedByOnRow: false,
- // `true` if there is a bookmark for this URI, i.e. of the page
- // should not be entirely removed.
- hasBookmark: hasBookmark,
- onFrecencyChanged: null,
- onDeleteURI: null,
- },
- };
- visits.push(visit);
- if (hasOwnBookmark) {
- do_print("Adding a bookmark to visit " + i);
- yield PlacesUtils.bookmarks.insert({
- url: uri,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- title: "test bookmark"
- });
- do_print("Bookmark added");
- }
- }
-
- do_print("Adding visits");
- yield PlacesTestUtils.addVisits(visits);
-
- do_print("Preparing filters");
- let filter = {
- };
- let beginIndex = 0;
- let endIndex = visits.length - 1;
- if ("begin" in options) {
- let ms = Number(visits[options.begin].test.jsDate) - 1000;
- filter.beginDate = new Date(ms);
- beginIndex = options.begin;
- }
- if ("end" in options) {
- let ms = Number(visits[options.end].test.jsDate) + 1000;
- filter.endDate = new Date(ms);
- endIndex = options.end;
- }
- if ("limit" in options) {
- endIndex = beginIndex + options.limit - 1; // -1 because the start index is inclusive.
- filter.limit = options.limit;
- }
- let removedItems = visits.slice(beginIndex);
- endIndex -= beginIndex;
- if (options.url) {
- let rawURL = "";
- switch (options.url) {
- case 1:
- filter.url = new URL(removedItems[0].uri.spec);
- rawURL = filter.url.href;
- break;
- case 2:
- filter.url = removedItems[0].uri;
- rawURL = filter.url.spec;
- break;
- case 3:
- filter.url = removedItems[0].uri.spec;
- rawURL = filter.url;
- break;
- }
- endIndex = Math.min(endIndex, removedItems.findIndex((v, index) => v.uri.spec != rawURL) - 1);
- }
- removedItems.splice(endIndex + 1);
- let remainingItems = visits.filter(v => !removedItems.includes(v));
- for (let i = 0; i < removedItems.length; i++) {
- let test = removedItems[i].test;
- do_print("Marking visit " + (beginIndex + i) + " as expecting removal");
- test.toRemove = true;
- if (test.hasBookmark ||
- (options.url && remainingItems.some(v => v.uri.spec == removedItems[i].uri.spec))) {
- frecencyChangePromises.set(removedItems[i].uri.spec, PromiseUtils.defer());
- } else if (!options.url || i == 0) {
- uriDeletePromises.set(removedItems[i].uri.spec, PromiseUtils.defer());
- }
- }
-
- let observer = {
- deferred: PromiseUtils.defer(),
- onBeginUpdateBatch: function() {},
- onEndUpdateBatch: function() {},
- onVisit: function(uri) {
- this.deferred.reject(new Error("Unexpected call to onVisit " + uri.spec));
- },
- onTitleChanged: function(uri) {
- this.deferred.reject(new Error("Unexpected call to onTitleChanged " + uri.spec));
- },
- onClearHistory: function() {
- this.deferred.reject("Unexpected call to onClearHistory");
- },
- onPageChanged: function(uri) {
- this.deferred.reject(new Error("Unexpected call to onPageChanged " + uri.spec));
- },
- onFrecencyChanged: function(aURI) {
- do_print("onFrecencyChanged " + aURI.spec);
- let deferred = frecencyChangePromises.get(aURI.spec);
- Assert.ok(!!deferred, "Observing onFrecencyChanged");
- deferred.resolve();
- },
- onManyFrecenciesChanged: function() {
- do_print("Many frecencies changed");
- for (let [, deferred] of frecencyChangePromises) {
- deferred.resolve();
- }
- },
- onDeleteURI: function(aURI) {
- do_print("onDeleteURI " + aURI.spec);
- let deferred = uriDeletePromises.get(aURI.spec);
- Assert.ok(!!deferred, "Observing onDeleteURI");
- deferred.resolve();
- },
- onDeleteVisits: function(aURI) {
- // Not sure we can test anything.
- }
- };
- PlacesUtils.history.addObserver(observer, false);
-
- let cbarg;
- if (options.useCallback) {
- do_print("Setting up callback");
- cbarg = [info => {
- for (let visit of visits) {
- do_print("Comparing " + info.date + " and " + visit.test.jsDate);
- if (Math.abs(visit.test.jsDate - info.date) < 100) { // Assume rounding errors
- Assert.ok(!visit.test.announcedByOnRow,
- "This is the first time we announce the removal of this visit");
- Assert.ok(visit.test.toRemove,
- "This is a visit we intended to remove");
- visit.test.announcedByOnRow = true;
- return;
- }
- }
- Assert.ok(false, "Could not find the visit we attempt to remove");
- }];
- } else {
- do_print("No callback");
- cbarg = [];
- }
- let result = yield PlacesUtils.history.removeVisitsByFilter(filter, ...cbarg);
-
- Assert.ok(result, "Removal succeeded");
-
- // Make sure that we have eliminated exactly the entries we expected
- // to eliminate.
- for (let i = 0; i < visits.length; ++i) {
- let visit = visits[i];
- do_print("Controlling the results on visit " + i);
- let remainingVisitsForURI = remainingItems.filter(v => visit.uri.spec == v.uri.spec).length;
- Assert.equal(
- visits_in_database(visit.uri),
- remainingVisitsForURI,
- "Visit is still present iff expected");
- if (options.useCallback) {
- Assert.equal(
- visit.test.toRemove,
- visit.test.announcedByOnRow,
- "Visit removal has been announced by onResult iff expected");
- }
- if (visit.test.hasBookmark || remainingVisitsForURI) {
- Assert.notEqual(page_in_database(visit.uri), 0, "The page should still appear in the db");
- } else {
- Assert.equal(page_in_database(visit.uri), 0, "The page should have been removed from the db");
- }
- }
-
- // Make sure that the observer has been called wherever applicable.
- do_print("Checking URI delete promises.");
- yield Promise.all(Array.from(uriDeletePromises.values()));
- do_print("Checking frecency change promises.");
- yield Promise.all(Array.from(frecencyChangePromises.values()));
- PlacesUtils.history.removeObserver(observer);
- });
-
- let size = 20;
- for (let range of [
- {begin: 0},
- {end: 19},
- {begin: 0, end: 10},
- {begin: 3, end: 4},
- {begin: 5, end: 8, limit: 2},
- {begin: 10, end: 18, limit: 5},
- ]) {
- for (let bookmarks of [[], [5, 6]]) {
- let options = {
- sampleSize: size,
- bookmarks: bookmarks,
- };
- if ("begin" in range) {
- options.begin = range.begin;
- }
- if ("end" in range) {
- options.end = range.end;
- }
- if ("limit" in range) {
- options.limit = range.limit;
- }
- yield remover(options);
- options.url = 1;
- yield remover(options);
- options.url = 2;
- yield remover(options);
- options.url = 3;
- yield remover(options);
- }
- }
- yield PlacesTestUtils.clearHistory();
-});
-
-// Test the various error cases
-add_task(function* test_error_cases() {
- Assert.throws(
- () => PlacesUtils.history.removeVisitsByFilter(),
- /TypeError: Expected a filter/
- );
- Assert.throws(
- () => PlacesUtils.history.removeVisitsByFilter("obviously, not a filter"),
- /TypeError: Expected a filter/
- );
- Assert.throws(
- () => PlacesUtils.history.removeVisitsByFilter({}),
- /TypeError: Expected a non-empty filter/
- );
- Assert.throws(
- () => PlacesUtils.history.removeVisitsByFilter({beginDate: "now"}),
- /TypeError: Expected a Date/
- );
- Assert.throws(
- () => PlacesUtils.history.removeVisitsByFilter({beginDate: Date.now()}),
- /TypeError: Expected a Date/
- );
- Assert.throws(
- () => PlacesUtils.history.removeVisitsByFilter({beginDate: new Date()}, "obviously, not a callback"),
- /TypeError: Invalid function/
- );
- Assert.throws(
- () => PlacesUtils.history.removeVisitsByFilter({beginDate: new Date(1000), endDate: new Date(0)}),
- /TypeError: `beginDate` should be at least as old/
- );
- Assert.throws(
- () => PlacesUtils.history.removeVisitsByFilter({limit: {}}),
- /Expected a non-zero positive integer as a limit/
- );
- Assert.throws(
- () => PlacesUtils.history.removeVisitsByFilter({limit: -1}),
- /Expected a non-zero positive integer as a limit/
- );
- Assert.throws(
- () => PlacesUtils.history.removeVisitsByFilter({limit: 0.1}),
- /Expected a non-zero positive integer as a limit/
- );
- Assert.throws(
- () => PlacesUtils.history.removeVisitsByFilter({limit: Infinity}),
- /Expected a non-zero positive integer as a limit/
- );
- Assert.throws(
- () => PlacesUtils.history.removeVisitsByFilter({url: {}}),
- /Expected a valid URL for `url`/
- );
- Assert.throws(
- () => PlacesUtils.history.removeVisitsByFilter({url: 0}),
- /Expected a valid URL for `url`/
- );
- Assert.throws(
- () => PlacesUtils.history.removeVisitsByFilter({beginDate: new Date(1000), endDate: new Date(0)}),
- /TypeError: `beginDate` should be at least as old/
- );
- Assert.throws(
- () => PlacesUtils.history.removeVisitsByFilter({beginDate: new Date(1000), endDate: new Date(0)}),
- /TypeError: `beginDate` should be at least as old/
- );
-});
-
-add_task(function* test_orphans() {
- let uri = NetUtil.newURI("http://moz.org/");
- yield PlacesTestUtils.addVisits({ uri });
-
- PlacesUtils.favicons.setAndFetchFaviconForPage(
- uri, SMALLPNG_DATA_URI, true, PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- null, Services.scriptSecurityManager.getSystemPrincipal());
- PlacesUtils.annotations.setPageAnnotation(uri, "test", "restval", 0,
- PlacesUtils.annotations.EXPIRE_NEVER);
-
- yield PlacesUtils.history.removeVisitsByFilter({ beginDate: new Date(1999, 9, 9, 9, 9),
- endDate: new Date() });
- Assert.ok(!(yield PlacesTestUtils.isPageInDB(uri)), "Page should have been removed");
- let db = yield PlacesUtils.promiseDBConnection();
- let rows = yield db.execute(`SELECT (SELECT count(*) FROM moz_annos) +
- (SELECT count(*) FROM moz_favicons) AS count`);
- Assert.equal(rows[0].getResultByName("count"), 0, "Should not find orphans");
-});
diff --git a/toolkit/components/places/tests/history/test_updatePlaces_sameUri_titleChanged.js b/toolkit/components/places/tests/history/test_updatePlaces_sameUri_titleChanged.js
deleted file mode 100644
index 832df9d9a3..0000000000
--- a/toolkit/components/places/tests/history/test_updatePlaces_sameUri_titleChanged.js
+++ /dev/null
@@ -1,52 +0,0 @@
-// Test that repeated additions of the same URI through updatePlaces, properly
-// update from_visit and notify titleChanged.
-
-add_task(function* test() {
- let uri = "http://test.com/";
-
- let promiseTitleChangedNotifications = new Promise(resolve => {
- let historyObserver = {
- _count: 0,
- __proto__: NavHistoryObserver.prototype,
- onTitleChanged(aURI, aTitle, aGUID) {
- Assert.equal(aURI.spec, uri, "Should notify the proper url");
- if (++this._count == 2) {
- PlacesUtils.history.removeObserver(historyObserver);
- resolve();
- }
- }
- };
- PlacesUtils.history.addObserver(historyObserver, false);
- });
-
- // This repeats the url on purpose, don't merge it into a single place entry.
- yield PlacesTestUtils.addVisits([
- { uri, title: "test" },
- { uri, referrer: uri, title: "test2" },
- ]);
-
- let options = PlacesUtils.history.getNewQueryOptions();
- let query = PlacesUtils.history.getNewQuery();
- query.uri = NetUtil.newURI(uri);
- options.resultType = options.RESULTS_AS_VISIT;
- let root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
-
- Assert.equal(root.childCount, 2);
-
- let child = root.getChild(0);
- Assert.equal(child.visitType, TRANSITION_LINK, "Visit type should be TRANSITION_LINK");
- Assert.equal(child.visitId, 1, "Visit ID should be 1");
- Assert.equal(child.fromVisitId, -1, "Should have no referrer visit ID");
- Assert.equal(child.title, "test2", "Should have the correct title");
-
- child = root.getChild(1);
- Assert.equal(child.visitType, TRANSITION_LINK, "Visit type should be TRANSITION_LINK");
- Assert.equal(child.visitId, 2, "Visit ID should be 2");
- Assert.equal(child.fromVisitId, 1, "First visit should be the referring visit");
- Assert.equal(child.title, "test2", "Should have the correct title");
-
- root.containerOpen = false;
-
- yield promiseTitleChangedNotifications;
-});
diff --git a/toolkit/components/places/tests/history/xpcshell.ini b/toolkit/components/places/tests/history/xpcshell.ini
deleted file mode 100644
index ee182e0905..0000000000
--- a/toolkit/components/places/tests/history/xpcshell.ini
+++ /dev/null
@@ -1,9 +0,0 @@
-[DEFAULT]
-head = head_history.js
-tail =
-
-[test_insert.js]
-[test_remove.js]
-[test_removeVisits.js]
-[test_removeVisitsByFilter.js]
-[test_updatePlaces_sameUri_titleChanged.js]
diff --git a/toolkit/components/places/tests/migration/.eslintrc.js b/toolkit/components/places/tests/migration/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/places/tests/migration/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/places/tests/migration/head_migration.js b/toolkit/components/places/tests/migration/head_migration.js
deleted file mode 100644
index 1ebecd4c0f..0000000000
--- a/toolkit/components/places/tests/migration/head_migration.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict"
-
-var { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
-
-Cu.import("resource://gre/modules/Services.jsm");
-
-// Import common head.
-{
- let commonFile = do_get_file("../head_common.js", false);
- let uri = Services.io.newFileURI(commonFile);
- Services.scriptloader.loadSubScript(uri.spec, this);
-}
-
-// Put any other stuff relative to this test folder below.
-
-const DB_FILENAME = "places.sqlite";
-
-/**
- * Sets the database to use for the given test. This should be the very first
- * thing in the test, otherwise this database will not be used!
- *
- * @param aFileName
- * The filename of the database to use. This database must exist in
- * toolkit/components/places/tests/migration!
- * @return {Promise}
- */
-var setupPlacesDatabase = Task.async(function* (aFileName) {
- let currentDir = yield OS.File.getCurrentDirectory();
-
- let src = OS.Path.join(currentDir, aFileName);
- Assert.ok((yield OS.File.exists(src)), "Database file found");
-
- // Ensure that our database doesn't already exist.
- let dest = OS.Path.join(OS.Constants.Path.profileDir, DB_FILENAME);
- Assert.ok(!(yield OS.File.exists(dest)), "Database file should not exist yet");
-
- yield OS.File.copy(src, dest);
-});
-
-// This works provided all tests in this folder use add_task.
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/places/tests/migration/places_v10.sqlite b/toolkit/components/places/tests/migration/places_v10.sqlite
deleted file mode 100644
index 80a8ecd6ad..0000000000
--- a/toolkit/components/places/tests/migration/places_v10.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/migration/places_v11.sqlite b/toolkit/components/places/tests/migration/places_v11.sqlite
deleted file mode 100644
index bef27d5f59..0000000000
--- a/toolkit/components/places/tests/migration/places_v11.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/migration/places_v17.sqlite b/toolkit/components/places/tests/migration/places_v17.sqlite
deleted file mode 100644
index 5183cde83d..0000000000
--- a/toolkit/components/places/tests/migration/places_v17.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/migration/places_v19.sqlite b/toolkit/components/places/tests/migration/places_v19.sqlite
deleted file mode 100644
index 11e2e6247b..0000000000
--- a/toolkit/components/places/tests/migration/places_v19.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/migration/places_v21.sqlite b/toolkit/components/places/tests/migration/places_v21.sqlite
deleted file mode 100644
index f729308261..0000000000
--- a/toolkit/components/places/tests/migration/places_v21.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/migration/places_v22.sqlite b/toolkit/components/places/tests/migration/places_v22.sqlite
deleted file mode 100644
index 30bf840b0f..0000000000
--- a/toolkit/components/places/tests/migration/places_v22.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/migration/places_v23.sqlite b/toolkit/components/places/tests/migration/places_v23.sqlite
deleted file mode 100644
index b519b97d27..0000000000
--- a/toolkit/components/places/tests/migration/places_v23.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/migration/places_v24.sqlite b/toolkit/components/places/tests/migration/places_v24.sqlite
deleted file mode 100644
index b35f958a66..0000000000
--- a/toolkit/components/places/tests/migration/places_v24.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/migration/places_v25.sqlite b/toolkit/components/places/tests/migration/places_v25.sqlite
deleted file mode 100644
index 2afd1da1fd..0000000000
--- a/toolkit/components/places/tests/migration/places_v25.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/migration/places_v26.sqlite b/toolkit/components/places/tests/migration/places_v26.sqlite
deleted file mode 100644
index b4b2381797..0000000000
--- a/toolkit/components/places/tests/migration/places_v26.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/migration/places_v27.sqlite b/toolkit/components/places/tests/migration/places_v27.sqlite
deleted file mode 100644
index 57dfb75627..0000000000
--- a/toolkit/components/places/tests/migration/places_v27.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/migration/places_v28.sqlite b/toolkit/components/places/tests/migration/places_v28.sqlite
deleted file mode 100644
index 9a27db3240..0000000000
--- a/toolkit/components/places/tests/migration/places_v28.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/migration/places_v29.sqlite b/toolkit/components/places/tests/migration/places_v29.sqlite
deleted file mode 100644
index f6de0fe8a4..0000000000
--- a/toolkit/components/places/tests/migration/places_v29.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/migration/places_v30.sqlite b/toolkit/components/places/tests/migration/places_v30.sqlite
deleted file mode 100644
index 9cbabe005b..0000000000
--- a/toolkit/components/places/tests/migration/places_v30.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/migration/places_v31.sqlite b/toolkit/components/places/tests/migration/places_v31.sqlite
deleted file mode 100644
index 9d33b9effc..0000000000
--- a/toolkit/components/places/tests/migration/places_v31.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/migration/places_v32.sqlite b/toolkit/components/places/tests/migration/places_v32.sqlite
deleted file mode 100644
index 239f6c5fe3..0000000000
--- a/toolkit/components/places/tests/migration/places_v32.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/migration/places_v33.sqlite b/toolkit/components/places/tests/migration/places_v33.sqlite
deleted file mode 100644
index 6071dc6a68..0000000000
--- a/toolkit/components/places/tests/migration/places_v33.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/migration/places_v34.sqlite b/toolkit/components/places/tests/migration/places_v34.sqlite
deleted file mode 100644
index 474628996f..0000000000
--- a/toolkit/components/places/tests/migration/places_v34.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/migration/places_v35.sqlite b/toolkit/components/places/tests/migration/places_v35.sqlite
deleted file mode 100644
index 5e157d7780..0000000000
--- a/toolkit/components/places/tests/migration/places_v35.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/migration/places_v6.sqlite b/toolkit/components/places/tests/migration/places_v6.sqlite
deleted file mode 100644
index 2852a4cf97..0000000000
--- a/toolkit/components/places/tests/migration/places_v6.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/migration/test_current_from_downgraded.js b/toolkit/components/places/tests/migration/test_current_from_downgraded.js
deleted file mode 100644
index 6d36cab144..0000000000
--- a/toolkit/components/places/tests/migration/test_current_from_downgraded.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-add_task(function* setup() {
- yield setupPlacesDatabase(`places_v${CURRENT_SCHEMA_VERSION}.sqlite`);
- // Downgrade the schema version to the first supported one.
- let path = OS.Path.join(OS.Constants.Path.profileDir, DB_FILENAME);
- let db = yield Sqlite.openConnection({ path: path });
- yield db.setSchemaVersion(FIRST_UPGRADABLE_SCHEMA_VERSION);
- yield db.close();
-});
-
-add_task(function* database_is_valid() {
- Assert.equal(PlacesUtils.history.databaseStatus,
- PlacesUtils.history.DATABASE_STATUS_UPGRADED);
-
- let db = yield PlacesUtils.promiseDBConnection();
- Assert.equal((yield db.getSchemaVersion()), CURRENT_SCHEMA_VERSION);
-});
diff --git a/toolkit/components/places/tests/migration/test_current_from_v11.js b/toolkit/components/places/tests/migration/test_current_from_v11.js
deleted file mode 100644
index 43b8fb1f64..0000000000
--- a/toolkit/components/places/tests/migration/test_current_from_v11.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-add_task(function* setup() {
- yield setupPlacesDatabase("places_v11.sqlite");
-});
-
-add_task(function* database_is_valid() {
- Assert.equal(PlacesUtils.history.databaseStatus,
- PlacesUtils.history.DATABASE_STATUS_UPGRADED);
-
- let db = yield PlacesUtils.promiseDBConnection();
- Assert.equal((yield db.getSchemaVersion()), CURRENT_SCHEMA_VERSION);
-});
-
-add_task(function* test_moz_hosts() {
- let db = yield PlacesUtils.promiseDBConnection();
-
- // This will throw if the column does not exist.
- yield db.execute("SELECT host, frecency, typed, prefix FROM moz_hosts");
-
- // moz_hosts is populated asynchronously, so we need to wait.
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- // check the number of entries in moz_hosts equals the number of
- // unique rev_host in moz_places
- let rows = yield db.execute(
- `SELECT (SELECT COUNT(host) FROM moz_hosts),
- (SELECT COUNT(DISTINCT rev_host)
- FROM moz_places
- WHERE LENGTH(rev_host) > 1)
- `);
-
- Assert.equal(rows.length, 1);
- let mozHostsCount = rows[0].getResultByIndex(0);
- let mozPlacesCount = rows[0].getResultByIndex(1);
-
- Assert.ok(mozPlacesCount > 0, "There is some url in the database");
- Assert.equal(mozPlacesCount, mozHostsCount, "moz_hosts has the expected number of entries");
-});
-
-add_task(function* test_journal() {
- let db = yield PlacesUtils.promiseDBConnection();
- let rows = yield db.execute("PRAGMA journal_mode");
- Assert.equal(rows.length, 1);
- // WAL journal mode should be set on this database.
- Assert.equal(rows[0].getResultByIndex(0), "wal");
-});
diff --git a/toolkit/components/places/tests/migration/test_current_from_v19.js b/toolkit/components/places/tests/migration/test_current_from_v19.js
deleted file mode 100644
index b8d837e681..0000000000
--- a/toolkit/components/places/tests/migration/test_current_from_v19.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-const ANNO_LEGACYGUID = "placesInternal/GUID";
-
-var getTotalGuidAnnotationsCount = Task.async(function* (db) {
- let rows = yield db.execute(
- `SELECT count(*)
- FROM moz_items_annos a
- JOIN moz_anno_attributes b ON a.anno_attribute_id = b.id
- WHERE b.name = :attr_name
- `, { attr_name: ANNO_LEGACYGUID });
- return rows[0].getResultByIndex(0);
-});
-
-add_task(function* setup() {
- yield setupPlacesDatabase("places_v19.sqlite");
-});
-
-add_task(function* initial_state() {
- let path = OS.Path.join(OS.Constants.Path.profileDir, DB_FILENAME);
- let db = yield Sqlite.openConnection({ path: path });
-
- Assert.equal((yield getTotalGuidAnnotationsCount(db)), 1,
- "There should be 1 obsolete guid annotation");
- yield db.close();
-});
-
-add_task(function* database_is_valid() {
- Assert.equal(PlacesUtils.history.databaseStatus,
- PlacesUtils.history.DATABASE_STATUS_UPGRADED);
-
- let db = yield PlacesUtils.promiseDBConnection();
- Assert.equal((yield db.getSchemaVersion()), CURRENT_SCHEMA_VERSION);
-});
-
-add_task(function* test_bookmark_guid_annotation_removed()
-{
- let db = yield PlacesUtils.promiseDBConnection();
- Assert.equal((yield getTotalGuidAnnotationsCount(db)), 0,
- "There should be no more obsolete GUID annotations.");
-});
diff --git a/toolkit/components/places/tests/migration/test_current_from_v24.js b/toolkit/components/places/tests/migration/test_current_from_v24.js
deleted file mode 100644
index 0561b49229..0000000000
--- a/toolkit/components/places/tests/migration/test_current_from_v24.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-add_task(function* setup() {
- yield setupPlacesDatabase("places_v24.sqlite");
-});
-
-add_task(function* database_is_valid() {
- Assert.equal(PlacesUtils.history.databaseStatus,
- PlacesUtils.history.DATABASE_STATUS_UPGRADED);
-
- let db = yield PlacesUtils.promiseDBConnection();
- Assert.equal((yield db.getSchemaVersion()), CURRENT_SCHEMA_VERSION);
-});
-
-add_task(function* test_bookmark_guid_annotation_removed()
-{
- yield PlacesUtils.bookmarks.eraseEverything();
-
- let db = yield PlacesUtils.promiseDBConnection();
- let m = new Map([
- [PlacesUtils.placesRootId, PlacesUtils.bookmarks.rootGuid],
- [PlacesUtils.bookmarksMenuFolderId, PlacesUtils.bookmarks.menuGuid],
- [PlacesUtils.toolbarFolderId, PlacesUtils.bookmarks.toolbarGuid],
- [PlacesUtils.unfiledBookmarksFolderId, PlacesUtils.bookmarks.unfiledGuid],
- [PlacesUtils.tagsFolderId, PlacesUtils.bookmarks.tagsGuid],
- [PlacesUtils.mobileFolderId, PlacesUtils.bookmarks.mobileGuid],
- ]);
-
- let rows = yield db.execute(`SELECT id, guid FROM moz_bookmarks`);
- for (let row of rows) {
- let id = row.getResultByName("id");
- let guid = row.getResultByName("guid");
- Assert.equal(m.get(id), guid, "The root folder has the correct GUID");
- }
-});
diff --git a/toolkit/components/places/tests/migration/test_current_from_v25.js b/toolkit/components/places/tests/migration/test_current_from_v25.js
deleted file mode 100644
index b066975fc5..0000000000
--- a/toolkit/components/places/tests/migration/test_current_from_v25.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-add_task(function* setup() {
- yield setupPlacesDatabase("places_v25.sqlite");
-});
-
-add_task(function* database_is_valid() {
- Assert.equal(PlacesUtils.history.databaseStatus,
- PlacesUtils.history.DATABASE_STATUS_UPGRADED);
-
- let db = yield PlacesUtils.promiseDBConnection();
- Assert.equal((yield db.getSchemaVersion()), CURRENT_SCHEMA_VERSION);
-});
-
-add_task(function* test_dates_rounded() {
- let root = yield PlacesUtils.promiseBookmarksTree();
- function ensureDates(node) {
- // When/if promiseBookmarksTree returns these as Date objects, switch this
- // test to use getItemDateAdded and getItemLastModified. And when these
- // methods are removed, this test can be eliminated altogether.
- Assert.strictEqual(typeof(node.dateAdded), "number");
- Assert.strictEqual(typeof(node.lastModified), "number");
- Assert.strictEqual(node.dateAdded % 1000, 0);
- Assert.strictEqual(node.lastModified % 1000, 0);
- if ("children" in node)
- node.children.forEach(ensureDates);
- }
- ensureDates(root);
-});
diff --git a/toolkit/components/places/tests/migration/test_current_from_v26.js b/toolkit/components/places/tests/migration/test_current_from_v26.js
deleted file mode 100644
index 7ff4bc3521..0000000000
--- a/toolkit/components/places/tests/migration/test_current_from_v26.js
+++ /dev/null
@@ -1,98 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-add_task(function* setup() {
- yield setupPlacesDatabase("places_v26.sqlite");
- // Setup database contents to be migrated.
- let path = OS.Path.join(OS.Constants.Path.profileDir, DB_FILENAME);
- let db = yield Sqlite.openConnection({ path });
- // Add pages.
- yield db.execute(`INSERT INTO moz_places (url, guid)
- VALUES ("http://test1.com/", "test1_______")
- , ("http://test2.com/", "test2_______")
- , ("http://test3.com/", "test3_______")
- `);
- // Add keywords.
- yield db.execute(`INSERT INTO moz_keywords (keyword)
- VALUES ("kw1")
- , ("kw2")
- , ("kw3")
- , ("kw4")
- , ("kw5")
- `);
- // Add bookmarks.
- let now = Date.now() * 1000;
- let index = 0;
- yield db.execute(`INSERT INTO moz_bookmarks (type, fk, parent, position, dateAdded, lastModified, keyword_id, guid)
- VALUES (1, (SELECT id FROM moz_places WHERE guid = 'test1_______'), 3, ${index++}, ${now}, ${now},
- (SELECT id FROM moz_keywords WHERE keyword = 'kw1'), "bookmark1___")
- /* same uri, different keyword */
- , (1, (SELECT id FROM moz_places WHERE guid = 'test1_______'), 3, ${index++}, ${now}, ${now},
- (SELECT id FROM moz_keywords WHERE keyword = 'kw2'), "bookmark2___")
- /* different uri, same keyword as 1 */
- , (1, (SELECT id FROM moz_places WHERE guid = 'test2_______'), 3, ${index++}, ${now}, ${now},
- (SELECT id FROM moz_keywords WHERE keyword = 'kw1'), "bookmark3___")
- /* same uri, same keyword as 1 */
- , (1, (SELECT id FROM moz_places WHERE guid = 'test1_______'), 3, ${index++}, ${now}, ${now},
- (SELECT id FROM moz_keywords WHERE keyword = 'kw1'), "bookmark4___")
- /* same uri, same keyword as 2 */
- , (1, (SELECT id FROM moz_places WHERE guid = 'test2_______'), 3, ${index++}, ${now}, ${now},
- (SELECT id FROM moz_keywords WHERE keyword = 'kw2'), "bookmark5___")
- /* different uri, same keyword as 1 */
- , (1, (SELECT id FROM moz_places WHERE guid = 'test1_______'), 3, ${index++}, ${now}, ${now},
- (SELECT id FROM moz_keywords WHERE keyword = 'kw3'), "bookmark6___")
- , (1, (SELECT id FROM moz_places WHERE guid = 'test3_______'), 3, ${index++}, ${now}, ${now},
- (SELECT id FROM moz_keywords WHERE keyword = 'kw4'), "bookmark7___")
- /* same uri and post_data as bookmark7, different keyword */
- , (1, (SELECT id FROM moz_places WHERE guid = 'test3_______'), 3, ${index++}, ${now}, ${now},
- (SELECT id FROM moz_keywords WHERE keyword = 'kw5'), "bookmark8___")
- `);
- // Add postData.
- yield db.execute(`INSERT INTO moz_anno_attributes (name)
- VALUES ("bookmarkProperties/POSTData")
- , ("someOtherAnno")`);
- yield db.execute(`INSERT INTO moz_items_annos(anno_attribute_id, item_id, content)
- VALUES ((SELECT id FROM moz_anno_attributes where name = "bookmarkProperties/POSTData"),
- (SELECT id FROM moz_bookmarks WHERE guid = "bookmark3___"), "postData1")
- , ((SELECT id FROM moz_anno_attributes where name = "bookmarkProperties/POSTData"),
- (SELECT id FROM moz_bookmarks WHERE guid = "bookmark5___"), "postData2")
- , ((SELECT id FROM moz_anno_attributes where name = "someOtherAnno"),
- (SELECT id FROM moz_bookmarks WHERE guid = "bookmark5___"), "zzzzzzzzzz")
- , ((SELECT id FROM moz_anno_attributes where name = "bookmarkProperties/POSTData"),
- (SELECT id FROM moz_bookmarks WHERE guid = "bookmark7___"), "postData3")
- , ((SELECT id FROM moz_anno_attributes where name = "bookmarkProperties/POSTData"),
- (SELECT id FROM moz_bookmarks WHERE guid = "bookmark8___"), "postData3")
- `);
- yield db.close();
-});
-
-add_task(function* database_is_valid() {
- Assert.equal(PlacesUtils.history.databaseStatus,
- PlacesUtils.history.DATABASE_STATUS_UPGRADED);
-
- let db = yield PlacesUtils.promiseDBConnection();
- Assert.equal((yield db.getSchemaVersion()), CURRENT_SCHEMA_VERSION);
-});
-
-add_task(function* test_keywords() {
- // When 2 urls have the same keyword, if one has postData it will be
- // preferred.
- let entry1 = yield PlacesUtils.keywords.fetch("kw1");
- Assert.equal(entry1.url.href, "http://test2.com/");
- Assert.equal(entry1.postData, "postData1");
- let entry2 = yield PlacesUtils.keywords.fetch("kw2");
- Assert.equal(entry2.url.href, "http://test2.com/");
- Assert.equal(entry2.postData, "postData2");
- let entry3 = yield PlacesUtils.keywords.fetch("kw3");
- Assert.equal(entry3.url.href, "http://test1.com/");
- Assert.equal(entry3.postData, null);
- let entry4 = yield PlacesUtils.keywords.fetch("kw4");
- Assert.equal(entry4, null);
- let entry5 = yield PlacesUtils.keywords.fetch("kw5");
- Assert.equal(entry5.url.href, "http://test3.com/");
- Assert.equal(entry5.postData, "postData3");
-
- Assert.equal((yield foreign_count("http://test1.com/")), 5); // 4 bookmark2 + 1 keywords
- Assert.equal((yield foreign_count("http://test2.com/")), 4); // 2 bookmark2 + 2 keywords
- Assert.equal((yield foreign_count("http://test3.com/")), 3); // 2 bookmark2 + 1 keywords
-});
diff --git a/toolkit/components/places/tests/migration/test_current_from_v27.js b/toolkit/components/places/tests/migration/test_current_from_v27.js
deleted file mode 100644
index 1675901eb7..0000000000
--- a/toolkit/components/places/tests/migration/test_current_from_v27.js
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-add_task(function* setup() {
- yield setupPlacesDatabase("places_v27.sqlite");
- // Setup database contents to be migrated.
- let path = OS.Path.join(OS.Constants.Path.profileDir, DB_FILENAME);
- let db = yield Sqlite.openConnection({ path });
- // Add pages.
- yield db.execute(`INSERT INTO moz_places (url, guid)
- VALUES ("http://test1.com/", "test1_______")
- , ("http://test2.com/", "test2_______")
- `);
- // Add keywords.
- yield db.execute(`INSERT INTO moz_keywords (keyword, place_id, post_data)
- VALUES ("kw1", (SELECT id FROM moz_places WHERE guid = "test2_______"), "broken data")
- , ("kw2", (SELECT id FROM moz_places WHERE guid = "test2_______"), NULL)
- , ("kw3", (SELECT id FROM moz_places WHERE guid = "test1_______"), "zzzzzzzzzz")
- `);
- // Add bookmarks.
- let now = Date.now() * 1000;
- let index = 0;
- yield db.execute(`INSERT INTO moz_bookmarks (type, fk, parent, position, dateAdded, lastModified, keyword_id, guid)
- VALUES (1, (SELECT id FROM moz_places WHERE guid = "test1_______"), 3, ${index++}, ${now}, ${now},
- (SELECT id FROM moz_keywords WHERE keyword = "kw1"), "bookmark1___")
- /* same uri, different keyword */
- , (1, (SELECT id FROM moz_places WHERE guid = "test1_______"), 3, ${index++}, ${now}, ${now},
- (SELECT id FROM moz_keywords WHERE keyword = "kw2"), "bookmark2___")
- /* different uri, same keyword as 1 */
- , (1, (SELECT id FROM moz_places WHERE guid = "test2_______"), 3, ${index++}, ${now}, ${now},
- (SELECT id FROM moz_keywords WHERE keyword = "kw1"), "bookmark3___")
- /* same uri, same keyword as 1 */
- , (1, (SELECT id FROM moz_places WHERE guid = "test1_______"), 3, ${index++}, ${now}, ${now},
- (SELECT id FROM moz_keywords WHERE keyword = "kw1"), "bookmark4___")
- /* same uri, same keyword as 2 */
- , (1, (SELECT id FROM moz_places WHERE guid = "test2_______"), 3, ${index++}, ${now}, ${now},
- (SELECT id FROM moz_keywords WHERE keyword = "kw2"), "bookmark5___")
- /* different uri, same keyword as 1 */
- , (1, (SELECT id FROM moz_places WHERE guid = "test1_______"), 3, ${index++}, ${now}, ${now},
- (SELECT id FROM moz_keywords WHERE keyword = "kw3"), "bookmark6___")
- `);
- // Add postData.
- yield db.execute(`INSERT INTO moz_anno_attributes (name)
- VALUES ("bookmarkProperties/POSTData")
- , ("someOtherAnno")`);
- yield db.execute(`INSERT INTO moz_items_annos(anno_attribute_id, item_id, content)
- VALUES ((SELECT id FROM moz_anno_attributes where name = "bookmarkProperties/POSTData"),
- (SELECT id FROM moz_bookmarks WHERE guid = "bookmark3___"), "postData1")
- , ((SELECT id FROM moz_anno_attributes where name = "bookmarkProperties/POSTData"),
- (SELECT id FROM moz_bookmarks WHERE guid = "bookmark5___"), "postData2")
- , ((SELECT id FROM moz_anno_attributes where name = "someOtherAnno"),
- (SELECT id FROM moz_bookmarks WHERE guid = "bookmark5___"), "zzzzzzzzzz")
- `);
- yield db.close();
-});
-
-add_task(function* database_is_valid() {
- Assert.equal(PlacesUtils.history.databaseStatus,
- PlacesUtils.history.DATABASE_STATUS_UPGRADED);
-
- let db = yield PlacesUtils.promiseDBConnection();
- Assert.equal((yield db.getSchemaVersion()), CURRENT_SCHEMA_VERSION);
-});
-
-add_task(function* test_keywords() {
- // When 2 urls have the same keyword, if one has postData it will be
- // preferred.
- let entry1 = yield PlacesUtils.keywords.fetch("kw1");
- Assert.equal(entry1.url.href, "http://test2.com/");
- Assert.equal(entry1.postData, "postData1");
- let entry2 = yield PlacesUtils.keywords.fetch("kw2");
- Assert.equal(entry2.url.href, "http://test2.com/");
- Assert.equal(entry2.postData, "postData2");
- let entry3 = yield PlacesUtils.keywords.fetch("kw3");
- Assert.equal(entry3.url.href, "http://test1.com/");
- Assert.equal(entry3.postData, null);
-});
diff --git a/toolkit/components/places/tests/migration/test_current_from_v31.js b/toolkit/components/places/tests/migration/test_current_from_v31.js
deleted file mode 100644
index 6b9131daa3..0000000000
--- a/toolkit/components/places/tests/migration/test_current_from_v31.js
+++ /dev/null
@@ -1,46 +0,0 @@
-// Add pages.
-let shorturl = "http://example.com/" + "a".repeat(1981);
-let longurl = "http://example.com/" + "a".repeat(1982);
-let bmurl = "http://example.com/" + "a".repeat(1983);
-
-add_task(function* setup() {
- yield setupPlacesDatabase("places_v31.sqlite");
- // Setup database contents to be migrated.
- let path = OS.Path.join(OS.Constants.Path.profileDir, DB_FILENAME);
- let db = yield Sqlite.openConnection({ path });
-
- yield db.execute(`INSERT INTO moz_places (url, guid, foreign_count)
- VALUES (:shorturl, "test1_______", 0)
- , (:longurl, "test2_______", 0)
- , (:bmurl, "test3_______", 1)
- `, { shorturl, longurl, bmurl });
- // Add visits.
- yield db.execute(`INSERT INTO moz_historyvisits (place_id)
- VALUES ((SELECT id FROM moz_places WHERE url = :shorturl))
- , ((SELECT id FROM moz_places WHERE url = :longurl))
- `, { shorturl, longurl });
- yield db.close();
-});
-
-add_task(function* database_is_valid() {
- Assert.equal(PlacesUtils.history.databaseStatus,
- PlacesUtils.history.DATABASE_STATUS_UPGRADED);
-
- let db = yield PlacesUtils.promiseDBConnection();
- Assert.equal((yield db.getSchemaVersion()), CURRENT_SCHEMA_VERSION);
-});
-
-add_task(function* test_longurls() {
- let db = yield PlacesUtils.promiseDBConnection();
- let rows = yield db.execute(`SELECT 1 FROM moz_places where url = :longurl`,
- { longurl });
- Assert.equal(rows.length, 0, "Long url should have been removed");
- rows = yield db.execute(`SELECT 1 FROM moz_places where url = :shorturl`,
- { shorturl });
- Assert.equal(rows.length, 1, "Short url should have been retained");
- rows = yield db.execute(`SELECT 1 FROM moz_places where url = :bmurl`,
- { bmurl });
- Assert.equal(rows.length, 1, "Bookmarked url should have been retained");
- rows = yield db.execute(`SELECT count(*) FROM moz_historyvisits`);
- Assert.equal(rows.length, 1, "Orphan visists should have been removed");
-});
diff --git a/toolkit/components/places/tests/migration/test_current_from_v34.js b/toolkit/components/places/tests/migration/test_current_from_v34.js
deleted file mode 100644
index 115bcec679..0000000000
--- a/toolkit/components/places/tests/migration/test_current_from_v34.js
+++ /dev/null
@@ -1,141 +0,0 @@
-Cu.importGlobalProperties(["URL", "crypto"]);
-
-const { TYPE_BOOKMARK, TYPE_FOLDER } = Ci.nsINavBookmarksService;
-const { EXPIRE_NEVER, TYPE_INT32 } = Ci.nsIAnnotationService;
-
-function makeGuid() {
- return ChromeUtils.base64URLEncode(crypto.getRandomValues(new Uint8Array(9)), {
- pad: false,
- });
-}
-
-// These queries are more or less copied directly from Bookmarks.jsm, but
-// operate on the old, pre-migration DB. We can't use any of the Places SQL
-// functions yet, because those are only registered for the main connection.
-function* insertItem(db, info) {
- let [parentInfo] = yield db.execute(`
- SELECT b.id, (SELECT count(*) FROM moz_bookmarks
- WHERE parent = b.id) AS childCount
- FROM moz_bookmarks b
- WHERE b.guid = :parentGuid`,
- { parentGuid: info.parentGuid });
-
- let guid = makeGuid();
- yield db.execute(`
- INSERT INTO moz_bookmarks (fk, type, parent, position, guid)
- VALUES ((SELECT id FROM moz_places WHERE url = :url),
- :type, :parent, :position, :guid)`,
- { url: info.url || "nonexistent", type: info.type, guid,
- // Just append items.
- position: parentInfo.getResultByName("childCount"),
- parent: parentInfo.getResultByName("id") });
-
- let id = (yield db.execute(`
- SELECT id FROM moz_bookmarks WHERE guid = :guid LIMIT 1`,
- { guid }))[0].getResultByName("id");
-
- return { id, guid };
-}
-
-function insertBookmark(db, info) {
- return db.executeTransaction(function* () {
- if (info.type == TYPE_BOOKMARK) {
- // We don't have access to the hash function here, so we omit the
- // `url_hash` column. These will be fixed up automatically during
- // migration.
- let url = new URL(info.url);
- let placeGuid = makeGuid();
- yield db.execute(`
- INSERT INTO moz_places (url, rev_host, hidden, frecency, guid)
- VALUES (:url, :rev_host, 0, -1, :guid)`,
- { url: url.href, guid: placeGuid,
- rev_host: PlacesUtils.getReversedHost(url) });
- }
- return yield* insertItem(db, info);
- });
-}
-
-function* insertAnno(db, itemId, name, value) {
- yield db.execute(`INSERT OR IGNORE INTO moz_anno_attributes (name)
- VALUES (:name)`, { name });
- yield db.execute(`
- INSERT INTO moz_items_annos
- (item_id, anno_attribute_id, content, flags,
- expiration, type, dateAdded, lastModified)
- VALUES (:itemId,
- (SELECT id FROM moz_anno_attributes
- WHERE name = :name),
- 1, 0, :expiration, :type, 0, 0)
- `, { itemId, name, expiration: EXPIRE_NEVER, type: TYPE_INT32 });
-}
-
-function insertMobileFolder(db) {
- return db.executeTransaction(function* () {
- let item = yield* insertItem(db, {
- type: TYPE_FOLDER,
- parentGuid: "root________",
- });
- yield* insertAnno(db, item.id, "mobile/bookmarksRoot", 1);
- return item;
- });
-}
-
-var mobileId, mobileGuid, fxGuid;
-var dupeMobileId, dupeMobileGuid, tbGuid;
-
-add_task(function* setup() {
- yield setupPlacesDatabase("places_v34.sqlite");
- // Setup database contents to be migrated.
- let path = OS.Path.join(OS.Constants.Path.profileDir, DB_FILENAME);
- let db = yield Sqlite.openConnection({ path });
-
- do_print("Create mobile folder with bookmarks");
- ({ id: mobileId, guid: mobileGuid } = yield insertMobileFolder(db));
- ({ guid: fxGuid } = yield insertBookmark(db, {
- type: TYPE_BOOKMARK,
- url: "http://getfirefox.com",
- parentGuid: mobileGuid,
- }));
-
- // We should only have one mobile folder, but, in case an old version of Sync
- // did the wrong thing and created multiple mobile folders, we should merge
- // their contents into the new mobile root.
- do_print("Create second mobile folder with different bookmarks");
- ({ id: dupeMobileId, guid: dupeMobileGuid } = yield insertMobileFolder(db));
- ({ guid: tbGuid } = yield insertBookmark(db, {
- type: TYPE_BOOKMARK,
- url: "http://getthunderbird.com",
- parentGuid: dupeMobileGuid,
- }));
-
- yield db.close();
-});
-
-add_task(function* database_is_valid() {
- // Accessing the database for the first time triggers migration.
- Assert.equal(PlacesUtils.history.databaseStatus,
- PlacesUtils.history.DATABASE_STATUS_UPGRADED);
-
- let db = yield PlacesUtils.promiseDBConnection();
- Assert.equal((yield db.getSchemaVersion()), CURRENT_SCHEMA_VERSION);
-});
-
-add_task(function* test_mobile_root() {
- let fxBmk = yield PlacesUtils.bookmarks.fetch(fxGuid);
- equal(fxBmk.parentGuid, PlacesUtils.bookmarks.mobileGuid,
- "Firefox bookmark should be moved to new mobile root");
- equal(fxBmk.index, 0, "Firefox bookmark should be first child of new root");
-
- let tbBmk = yield PlacesUtils.bookmarks.fetch(tbGuid);
- equal(tbBmk.parentGuid, PlacesUtils.bookmarks.mobileGuid,
- "Thunderbird bookmark should be moved to new mobile root");
- equal(tbBmk.index, 1,
- "Thunderbird bookmark should be second child of new root");
-
- let mobileRootId = PlacesUtils.promiseItemId(
- PlacesUtils.bookmarks.mobileGuid);
- let annoItemIds = PlacesUtils.annotations.getItemsWithAnnotation(
- PlacesUtils.MOBILE_ROOT_ANNO, {});
- deepEqual(annoItemIds, [mobileRootId],
- "Only mobile root should have mobile anno");
-});
diff --git a/toolkit/components/places/tests/migration/test_current_from_v34_no_roots.js b/toolkit/components/places/tests/migration/test_current_from_v34_no_roots.js
deleted file mode 100644
index 871fe89932..0000000000
--- a/toolkit/components/places/tests/migration/test_current_from_v34_no_roots.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-add_task(function* setup() {
- yield setupPlacesDatabase("places_v34.sqlite");
- // Setup database contents to be migrated.
- let path = OS.Path.join(OS.Constants.Path.profileDir, DB_FILENAME);
- let db = yield Sqlite.openConnection({ path });
- // Remove all the roots.
- yield db.execute("DELETE FROM moz_bookmarks");
- yield db.close();
-});
-
-add_task(function* database_is_valid() {
- // Accessing the database for the first time triggers migration.
- Assert.equal(PlacesUtils.history.databaseStatus,
- PlacesUtils.history.DATABASE_STATUS_UPGRADED);
-
- let db = yield PlacesUtils.promiseDBConnection();
- Assert.equal((yield db.getSchemaVersion()), CURRENT_SCHEMA_VERSION);
-});
diff --git a/toolkit/components/places/tests/migration/test_current_from_v6.js b/toolkit/components/places/tests/migration/test_current_from_v6.js
deleted file mode 100644
index a3f9dc2291..0000000000
--- a/toolkit/components/places/tests/migration/test_current_from_v6.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * This file tests migration from a preliminary schema version 6 that
- * lacks frecency column and moz_inputhistory table.
- */
-
-add_task(function* setup() {
- yield setupPlacesDatabase("places_v6.sqlite");
-});
-
-add_task(function* corrupt_database_not_exists() {
- let corruptPath = OS.Path.join(OS.Constants.Path.profileDir,
- "places.sqlite.corrupt");
- Assert.ok(!(yield OS.File.exists(corruptPath)), "Corrupt file should not exist");
-});
-
-add_task(function* database_is_valid() {
- Assert.equal(PlacesUtils.history.databaseStatus,
- PlacesUtils.history.DATABASE_STATUS_CORRUPT);
-
- let db = yield PlacesUtils.promiseDBConnection();
- Assert.equal((yield db.getSchemaVersion()), CURRENT_SCHEMA_VERSION);
-});
-
-add_task(function* check_columns() {
- // Check the database has been replaced, these would throw otherwise.
- let db = yield PlacesUtils.promiseDBConnection();
- yield db.execute("SELECT frecency from moz_places");
- yield db.execute("SELECT 1 from moz_inputhistory");
-});
-
-add_task(function* corrupt_database_exists() {
- let corruptPath = OS.Path.join(OS.Constants.Path.profileDir,
- "places.sqlite.corrupt");
- Assert.ok((yield OS.File.exists(corruptPath)), "Corrupt file should exist");
-});
diff --git a/toolkit/components/places/tests/migration/xpcshell.ini b/toolkit/components/places/tests/migration/xpcshell.ini
deleted file mode 100644
index aae0f75ee2..0000000000
--- a/toolkit/components/places/tests/migration/xpcshell.ini
+++ /dev/null
@@ -1,36 +0,0 @@
-[DEFAULT]
-head = head_migration.js
-tail =
-
-support-files =
- places_v6.sqlite
- places_v10.sqlite
- places_v11.sqlite
- places_v17.sqlite
- places_v19.sqlite
- places_v21.sqlite
- places_v22.sqlite
- places_v23.sqlite
- places_v24.sqlite
- places_v25.sqlite
- places_v26.sqlite
- places_v27.sqlite
- places_v28.sqlite
- places_v30.sqlite
- places_v31.sqlite
- places_v32.sqlite
- places_v33.sqlite
- places_v34.sqlite
- places_v35.sqlite
-
-[test_current_from_downgraded.js]
-[test_current_from_v6.js]
-[test_current_from_v11.js]
-[test_current_from_v19.js]
-[test_current_from_v24.js]
-[test_current_from_v25.js]
-[test_current_from_v26.js]
-[test_current_from_v27.js]
-[test_current_from_v31.js]
-[test_current_from_v34.js]
-[test_current_from_v34_no_roots.js]
diff --git a/toolkit/components/places/tests/moz.build b/toolkit/components/places/tests/moz.build
deleted file mode 100644
index a40c0e93a2..0000000000
--- a/toolkit/components/places/tests/moz.build
+++ /dev/null
@@ -1,67 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-TEST_DIRS += ['cpp']
-
-TESTING_JS_MODULES += [
- 'PlacesTestUtils.jsm',
-]
-
-XPCSHELL_TESTS_MANIFESTS += [
- 'bookmarks/xpcshell.ini',
- 'expiration/xpcshell.ini',
- 'favicons/xpcshell.ini',
- 'history/xpcshell.ini',
- 'migration/xpcshell.ini',
- 'queries/xpcshell.ini',
- 'unifiedcomplete/xpcshell.ini',
- 'unit/xpcshell.ini',
-]
-
-BROWSER_CHROME_MANIFESTS += ['browser/browser.ini']
-MOCHITEST_CHROME_MANIFESTS += [
- 'chrome/chrome.ini',
-]
-
-TEST_HARNESS_FILES.xpcshell.toolkit.components.places.tests += [
- 'head_common.js',
-]
-
-TEST_HARNESS_FILES.testing.mochitest.tests.toolkit.components.places.tests.browser += [
- 'browser/399606-history.go-0.html',
- 'browser/399606-httprefresh.html',
- 'browser/399606-location.reload.html',
- 'browser/399606-location.replace.html',
- 'browser/399606-window.location.href.html',
- 'browser/399606-window.location.html',
- 'browser/461710_iframe.html',
- 'browser/461710_link_page-2.html',
- 'browser/461710_link_page-3.html',
- 'browser/461710_link_page.html',
- 'browser/461710_visited_page.html',
- 'browser/begin.html',
- 'browser/favicon-normal16.png',
- 'browser/favicon-normal32.png',
- 'browser/favicon.html',
- 'browser/final.html',
- 'browser/history_post.html',
- 'browser/history_post.sjs',
- 'browser/redirect-target.html',
- 'browser/redirect.sjs',
- 'browser/redirect_once.sjs',
- 'browser/redirect_twice.sjs',
- 'browser/title1.html',
- 'browser/title2.html',
-]
-
-TEST_HARNESS_FILES.testing.mochitest.tests.toolkit.components.places.tests.chrome += [
- 'chrome/bad_links.atom',
- 'chrome/link-less-items-no-site-uri.rss',
- 'chrome/link-less-items.rss',
- 'chrome/rss_as_html.rss',
- 'chrome/rss_as_html.rss^headers^',
- 'chrome/sample_feed.atom',
-]
diff --git a/toolkit/components/places/tests/queries/.eslintrc.js b/toolkit/components/places/tests/queries/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/places/tests/queries/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/places/tests/queries/head_queries.js b/toolkit/components/places/tests/queries/head_queries.js
deleted file mode 100644
index d37b3365fc..0000000000
--- a/toolkit/components/places/tests/queries/head_queries.js
+++ /dev/null
@@ -1,370 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var Ci = Components.interfaces;
-var Cc = Components.classes;
-var Cr = Components.results;
-var Cu = Components.utils;
-
-Cu.import("resource://gre/modules/Services.jsm");
-
-// Import common head.
-{
- let commonFile = do_get_file("../head_common.js", false);
- let uri = Services.io.newFileURI(commonFile);
- Services.scriptloader.loadSubScript(uri.spec, this);
-}
-
-// Put any other stuff relative to this test folder below.
-
-
-// Some Useful Date constants - PRTime uses microseconds, so convert
-const DAY_MICROSEC = 86400000000;
-const today = PlacesUtils.toPRTime(Date.now());
-const yesterday = today - DAY_MICROSEC;
-const lastweek = today - (DAY_MICROSEC * 7);
-const daybefore = today - (DAY_MICROSEC * 2);
-const old = today - (DAY_MICROSEC * 3);
-const futureday = today + (DAY_MICROSEC * 3);
-const olderthansixmonths = today - (DAY_MICROSEC * 31 * 7);
-
-
-/**
- * Generalized function to pull in an array of objects of data and push it into
- * the database. It does NOT do any checking to see that the input is
- * appropriate. This function is an asynchronous task, it can be called using
- * "Task.spawn" or using the "yield" function inside another task.
- */
-function* task_populateDB(aArray)
-{
- // Iterate over aArray and execute all instructions.
- for (let arrayItem of aArray) {
- try {
- // make the data object into a query data object in order to create proper
- // default values for anything left unspecified
- var qdata = new queryData(arrayItem);
- if (qdata.isVisit) {
- // Then we should add a visit for this node
- yield PlacesTestUtils.addVisits({
- uri: uri(qdata.uri),
- transition: qdata.transType,
- visitDate: qdata.lastVisit,
- referrer: qdata.referrer ? uri(qdata.referrer) : null,
- title: qdata.title
- });
- if (qdata.visitCount && !qdata.isDetails) {
- // Set a fake visit_count, this is not a real count but can be used
- // to test sorting by visit_count.
- let stmt = DBConn().createAsyncStatement(
- "UPDATE moz_places SET visit_count = :vc WHERE url_hash = hash(:url) AND url = :url");
- stmt.params.vc = qdata.visitCount;
- stmt.params.url = qdata.uri;
- try {
- stmt.executeAsync();
- }
- catch (ex) {
- print("Error while setting visit_count.");
- }
- finally {
- stmt.finalize();
- }
- }
- }
-
- if (qdata.isRedirect) {
- // This must be async to properly enqueue after the updateFrecency call
- // done by the visit addition.
- let stmt = DBConn().createAsyncStatement(
- "UPDATE moz_places SET hidden = 1 WHERE url_hash = hash(:url) AND url = :url");
- stmt.params.url = qdata.uri;
- try {
- stmt.executeAsync();
- }
- catch (ex) {
- print("Error while setting hidden.");
- }
- finally {
- stmt.finalize();
- }
- }
-
- if (qdata.isDetails) {
- // Then we add extraneous page details for testing
- yield PlacesTestUtils.addVisits({
- uri: uri(qdata.uri),
- visitDate: qdata.lastVisit,
- title: qdata.title
- });
- }
-
- if (qdata.markPageAsTyped) {
- PlacesUtils.history.markPageAsTyped(uri(qdata.uri));
- }
-
- if (qdata.isPageAnnotation) {
- if (qdata.removeAnnotation)
- PlacesUtils.annotations.removePageAnnotation(uri(qdata.uri),
- qdata.annoName);
- else {
- PlacesUtils.annotations.setPageAnnotation(uri(qdata.uri),
- qdata.annoName,
- qdata.annoVal,
- qdata.annoFlags,
- qdata.annoExpiration);
- }
- }
-
- if (qdata.isItemAnnotation) {
- if (qdata.removeAnnotation)
- PlacesUtils.annotations.removeItemAnnotation(qdata.itemId,
- qdata.annoName);
- else {
- PlacesUtils.annotations.setItemAnnotation(qdata.itemId,
- qdata.annoName,
- qdata.annoVal,
- qdata.annoFlags,
- qdata.annoExpiration);
- }
- }
-
- if (qdata.isFolder) {
- yield PlacesUtils.bookmarks.insert({
- parentGuid: qdata.parentGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: qdata.title,
- index: qdata.index
- });
- }
-
- if (qdata.isLivemark) {
- yield PlacesUtils.livemarks.addLivemark({ title: qdata.title
- , parentId: (yield PlacesUtils.promiseItemId(qdata.parentGuid))
- , index: qdata.index
- , feedURI: uri(qdata.feedURI)
- , siteURI: uri(qdata.uri)
- });
- }
-
- if (qdata.isBookmark) {
- let data = {
- parentGuid: qdata.parentGuid,
- index: qdata.index,
- title: qdata.title,
- url: qdata.uri
- };
-
- if (qdata.dateAdded) {
- data.dateAdded = new Date(qdata.dateAdded / 1000);
- }
-
- if (qdata.lastModified) {
- data.lastModified = new Date(qdata.lastModified / 1000);
- }
-
- yield PlacesUtils.bookmarks.insert(data);
-
- if (qdata.keyword) {
- yield PlacesUtils.keywords.insert({ url: qdata.uri,
- keyword: qdata.keyword });
- }
- }
-
- if (qdata.isTag) {
- PlacesUtils.tagging.tagURI(uri(qdata.uri), qdata.tagArray);
- }
-
- if (qdata.isSeparator) {
- yield PlacesUtils.bookmarks.insert({
- parentGuid: qdata.parentGuid,
- type: PlacesUtils.bookmarks.TYPE_SEPARATOR,
- index: qdata.index
- });
- }
- } catch (ex) {
- // use the arrayItem object here in case instantiation of qdata failed
- do_print("Problem with this URI: " + arrayItem.uri);
- do_throw("Error creating database: " + ex + "\n");
- }
- }
-}
-
-
-/**
- * The Query Data Object - this object encapsulates data for our queries and is
- * used to parameterize our calls to the Places APIs to put data into the
- * database. It also has some interesting meta functions to determine which APIs
- * should be called, and to determine if this object should show up in the
- * resulting query.
- * Its parameter is an object specifying which attributes you want to set.
- * For ex:
- * var myobj = new queryData({isVisit: true, uri:"http://mozilla.com", title="foo"});
- * Note that it doesn't do any input checking on that object.
- */
-function queryData(obj) {
- this.isVisit = obj.isVisit ? obj.isVisit : false;
- this.isBookmark = obj.isBookmark ? obj.isBookmark: false;
- this.uri = obj.uri ? obj.uri : "";
- this.lastVisit = obj.lastVisit ? obj.lastVisit : today;
- this.referrer = obj.referrer ? obj.referrer : null;
- this.transType = obj.transType ? obj.transType : Ci.nsINavHistoryService.TRANSITION_TYPED;
- this.isRedirect = obj.isRedirect ? obj.isRedirect : false;
- this.isDetails = obj.isDetails ? obj.isDetails : false;
- this.title = obj.title ? obj.title : "";
- this.markPageAsTyped = obj.markPageAsTyped ? obj.markPageAsTyped : false;
- this.isPageAnnotation = obj.isPageAnnotation ? obj.isPageAnnotation : false;
- this.removeAnnotation= obj.removeAnnotation ? true : false;
- this.annoName = obj.annoName ? obj.annoName : "";
- this.annoVal = obj.annoVal ? obj.annoVal : "";
- this.annoFlags = obj.annoFlags ? obj.annoFlags : 0;
- this.annoExpiration = obj.annoExpiration ? obj.annoExpiration : 0;
- this.isItemAnnotation = obj.isItemAnnotation ? obj.isItemAnnotation : false;
- this.itemId = obj.itemId ? obj.itemId : 0;
- this.annoMimeType = obj.annoMimeType ? obj.annoMimeType : "";
- this.isTag = obj.isTag ? obj.isTag : false;
- this.tagArray = obj.tagArray ? obj.tagArray : null;
- this.isLivemark = obj.isLivemark ? obj.isLivemark : false;
- this.parentGuid = obj.parentGuid || PlacesUtils.bookmarks.rootGuid;
- this.feedURI = obj.feedURI ? obj.feedURI : "";
- this.index = obj.index ? obj.index : PlacesUtils.bookmarks.DEFAULT_INDEX;
- this.isFolder = obj.isFolder ? obj.isFolder : false;
- this.contractId = obj.contractId ? obj.contractId : "";
- this.lastModified = obj.lastModified ? obj.lastModified : null;
- this.dateAdded = obj.dateAdded ? obj.dateAdded : null;
- this.keyword = obj.keyword ? obj.keyword : "";
- this.visitCount = obj.visitCount ? obj.visitCount : 0;
- this.isSeparator = obj.hasOwnProperty("isSeparator") && obj.isSeparator;
-
- // And now, the attribute for whether or not this object should appear in the
- // resulting query
- this.isInQuery = obj.isInQuery ? obj.isInQuery : false;
-}
-
-// All attributes are set in the constructor above
-queryData.prototype = { }
-
-
-/**
- * Helper function to compare an array of query objects with a result set.
- * It assumes the array of query objects contains the SAME SORT as the result
- * set. It checks the the uri, title, time, and bookmarkIndex properties of
- * the results, where appropriate.
- */
-function compareArrayToResult(aArray, aRoot) {
- do_print("Comparing Array to Results");
-
- var wasOpen = aRoot.containerOpen;
- if (!wasOpen)
- aRoot.containerOpen = true;
-
- // check expected number of results against actual
- var expectedResultCount = aArray.filter(function(aEl) { return aEl.isInQuery; }).length;
- if (expectedResultCount != aRoot.childCount) {
- // Debugging code for failures.
- dump_table("moz_places");
- dump_table("moz_historyvisits");
- do_print("Found children:");
- for (let i = 0; i < aRoot.childCount; i++) {
- do_print(aRoot.getChild(i).uri);
- }
- do_print("Expected:");
- for (let i = 0; i < aArray.length; i++) {
- if (aArray[i].isInQuery)
- do_print(aArray[i].uri);
- }
- }
- do_check_eq(expectedResultCount, aRoot.childCount);
-
- var inQueryIndex = 0;
- for (var i = 0; i < aArray.length; i++) {
- if (aArray[i].isInQuery) {
- var child = aRoot.getChild(inQueryIndex);
- // do_print("testing testData[" + i + "] vs result[" + inQueryIndex + "]");
- if (!aArray[i].isFolder && !aArray[i].isSeparator) {
- do_print("testing testData[" + aArray[i].uri + "] vs result[" + child.uri + "]");
- if (aArray[i].uri != child.uri) {
- dump_table("moz_places");
- do_throw("Expected " + aArray[i].uri + " found " + child.uri);
- }
- }
- if (!aArray[i].isSeparator && aArray[i].title != child.title)
- do_throw("Expected " + aArray[i].title + " found " + child.title);
- if (aArray[i].hasOwnProperty("lastVisit") &&
- aArray[i].lastVisit != child.time)
- do_throw("Expected " + aArray[i].lastVisit + " found " + child.time);
- if (aArray[i].hasOwnProperty("index") &&
- aArray[i].index != PlacesUtils.bookmarks.DEFAULT_INDEX &&
- aArray[i].index != child.bookmarkIndex)
- do_throw("Expected " + aArray[i].index + " found " + child.bookmarkIndex);
-
- inQueryIndex++;
- }
- }
-
- if (!wasOpen)
- aRoot.containerOpen = false;
- do_print("Comparing Array to Results passes");
-}
-
-
-/**
- * Helper function to check to see if one object either is or is not in the
- * result set. It can accept either a queryData object or an array of queryData
- * objects. If it gets an array, it only compares the first object in the array
- * to see if it is in the result set.
- * Returns: True if item is in query set, and false if item is not in query set
- * If input is an array, returns True if FIRST object in array is in
- * query set. To compare entire array, use the function above.
- */
-function isInResult(aQueryData, aRoot) {
- var rv = false;
- var uri;
- var wasOpen = aRoot.containerOpen;
- if (!wasOpen)
- aRoot.containerOpen = true;
-
- // If we have an array, pluck out the first item. If an object, pluc out the
- // URI, we just compare URI's here.
- if ("uri" in aQueryData) {
- uri = aQueryData.uri;
- } else {
- uri = aQueryData[0].uri;
- }
-
- for (var i=0; i < aRoot.childCount; i++) {
- if (uri == aRoot.getChild(i).uri) {
- rv = true;
- break;
- }
- }
- if (!wasOpen)
- aRoot.containerOpen = false;
- return rv;
-}
-
-
-/**
- * A nice helper function for debugging things. It prints the contents of a
- * result set.
- */
-function displayResultSet(aRoot) {
-
- var wasOpen = aRoot.containerOpen;
- if (!wasOpen)
- aRoot.containerOpen = true;
-
- if (!aRoot.hasChildren) {
- // Something wrong? Empty result set?
- do_print("Result Set Empty");
- return;
- }
-
- for (var i=0; i < aRoot.childCount; ++i) {
- do_print("Result Set URI: " + aRoot.getChild(i).uri + " Title: " +
- aRoot.getChild(i).title + " Visit Time: " + aRoot.getChild(i).time);
- }
- if (!wasOpen)
- aRoot.containerOpen = false;
-}
diff --git a/toolkit/components/places/tests/queries/readme.txt b/toolkit/components/places/tests/queries/readme.txt
deleted file mode 100644
index 19414f96ed..0000000000
--- a/toolkit/components/places/tests/queries/readme.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-These are tests specific to the Places Query API.
-
-We are tracking the coverage of these tests here:
-http://wiki.mozilla.org/QA/TDAI/Projects/Places_Tests
-
-When creating one of these tests, you need to update those tables so that we
-know how well our test coverage is of this area. Furthermore, when adding tests
-ensure to cover live update (changing the query set) by performing the following
-operations on the query set you get after running the query:
-* Adding a new item to the query set
-* Updating an existing item so that it matches the query set
-* Change an existing item so that it does not match the query set
-* Do multiple of the above inside an Update Batch transaction.
-* Try these transactions in different orders.
-
-Use the stub test to help you create a test with the proper structure.
diff --git a/toolkit/components/places/tests/queries/test_415716.js b/toolkit/components/places/tests/queries/test_415716.js
deleted file mode 100644
index 754a73e7cc..0000000000
--- a/toolkit/components/places/tests/queries/test_415716.js
+++ /dev/null
@@ -1,108 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function modHistoryTypes(val) {
- switch (val % 8) {
- case 0:
- case 1:
- return TRANSITION_LINK;
- case 2:
- return TRANSITION_TYPED;
- case 3:
- return TRANSITION_BOOKMARK;
- case 4:
- return TRANSITION_EMBED;
- case 5:
- return TRANSITION_REDIRECT_PERMANENT;
- case 6:
- return TRANSITION_REDIRECT_TEMPORARY;
- case 7:
- return TRANSITION_DOWNLOAD;
- case 8:
- return TRANSITION_FRAMED_LINK;
- }
- return TRANSITION_TYPED;
-}
-
-function run_test()
-{
- run_next_test();
-}
-
-/**
- * Builds a test database by hand using various times, annotations and
- * visit numbers for this test
- */
-add_task(function* test_buildTestDatabase()
-{
- // This is the set of visits that we will match - our min visit is 2 so that's
- // why we add more visits to the same URIs.
- let testURI = uri("http://www.foo.com");
- let places = [];
-
- for (let i = 0; i < 12; ++i) {
- places.push({
- uri: testURI,
- transition: modHistoryTypes(i),
- visitDate: today
- });
- }
-
- testURI = uri("http://foo.com/youdontseeme.html");
- let testAnnoName = "moz-test-places/testing123";
- let testAnnoVal = "test";
- for (let i = 0; i < 12; ++i) {
- places.push({
- uri: testURI,
- transition: modHistoryTypes(i),
- visitDate: today
- });
- }
-
- yield PlacesTestUtils.addVisits(places);
-
- PlacesUtils.annotations.setPageAnnotation(testURI, testAnnoName,
- testAnnoVal, 0, 0);
-});
-
-/**
- * This test will test Queries that use relative Time Range, minVists, maxVisits,
- * annotation.
- * The Query:
- * Annotation == "moz-test-places/testing123" &&
- * TimeRange == "now() - 2d" &&
- * minVisits == 2 &&
- * maxVisits == 10
- */
-add_task(function test_execute()
-{
- let query = PlacesUtils.history.getNewQuery();
- query.annotation = "moz-test-places/testing123";
- query.beginTime = daybefore * 1000;
- query.beginTimeReference = PlacesUtils.history.TIME_RELATIVE_NOW;
- query.endTime = today * 1000;
- query.endTimeReference = PlacesUtils.history.TIME_RELATIVE_NOW;
- query.minVisits = 2;
- query.maxVisits = 10;
-
- // Options
- let options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = options.SORT_BY_DATE_DESCENDING;
- options.resultType = options.RESULTS_AS_VISIT;
-
- // Results
- let root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
- let cc = root.childCount;
- dump("----> cc is: " + cc + "\n");
- for (let i = 0; i < root.childCount; ++i) {
- let resultNode = root.getChild(i);
- let accesstime = Date(resultNode.time / 1000);
- dump("----> result: " + resultNode.uri + " Date: " + accesstime.toLocaleString() + "\n");
- }
- do_check_eq(cc, 0);
- root.containerOpen = false;
-});
diff --git a/toolkit/components/places/tests/queries/test_abstime-annotation-domain.js b/toolkit/components/places/tests/queries/test_abstime-annotation-domain.js
deleted file mode 100644
index 199fc0865e..0000000000
--- a/toolkit/components/places/tests/queries/test_abstime-annotation-domain.js
+++ /dev/null
@@ -1,210 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-const DAY_MSEC = 86400000;
-const MIN_MSEC = 60000;
-const HOUR_MSEC = 3600000;
-// Jan 6 2008 at 8am is our begin edge of the query
-var beginTimeDate = new Date(2008, 0, 6, 8, 0, 0, 0);
-// Jan 15 2008 at 9:30pm is our ending edge of the query
-var endTimeDate = new Date(2008, 0, 15, 21, 30, 0, 0);
-
-// These as millisecond values
-var beginTime = beginTimeDate.getTime();
-var endTime = endTimeDate.getTime();
-
-// Some range dates inside our query - mult by 1000 to convert to PRTIME
-var jan7_800 = (beginTime + DAY_MSEC) * 1000;
-var jan6_815 = (beginTime + (MIN_MSEC * 15)) * 1000;
-var jan11_800 = (beginTime + (DAY_MSEC * 5)) * 1000;
-var jan14_2130 = (endTime - DAY_MSEC) * 1000;
-var jan15_2045 = (endTime - (MIN_MSEC * 45)) * 1000;
-var jan12_1730 = (endTime - (DAY_MSEC * 3) - (HOUR_MSEC*4)) * 1000;
-
-// Dates outside our query - mult by 1000 to convert to PRTIME
-var jan6_700 = (beginTime - HOUR_MSEC) * 1000;
-var jan5_800 = (beginTime - DAY_MSEC) * 1000;
-var dec27_800 = (beginTime - (DAY_MSEC * 10)) * 1000;
-var jan15_2145 = (endTime + (MIN_MSEC * 15)) * 1000;
-var jan16_2130 = (endTime + (DAY_MSEC)) * 1000;
-var jan25_2130 = (endTime + (DAY_MSEC * 10)) * 1000;
-
-// So that we can easily use these too, convert them to PRTIME
-beginTime *= 1000;
-endTime *= 1000;
-
-/**
- * Array of objects to build our test database
- */
-var goodAnnoName = "moz-test-places/testing123";
-var val = "test";
-var badAnnoName = "text/foo";
-
-// The test data for our database, note that the ordering of the results that
-// will be returned by the query (the isInQuery: true objects) is IMPORTANT.
-// see compareArrayToResult in head_queries.js for more info.
-var testData = [
- // Test ftp protocol - vary the title length
- {isInQuery: true, isVisit: true, isDetails: true,
- uri: "ftp://foo.com/ftp", lastVisit: jan12_1730,
- title: "hugelongconfmozlagurationofwordswithasearchtermsinit whoo-hoo"},
-
- // Test flat domain with annotation
- {isInQuery: true, isVisit: true, isDetails: true, isPageAnnotation: true,
- uri: "http://foo.com/", annoName: goodAnnoName, annoVal: val,
- lastVisit: jan14_2130, title: "moz"},
-
- // Test subdomain included with isRedirect=true, different transtype
- {isInQuery: true, isVisit: true, isDetails: true, title: "moz",
- isRedirect: true, uri: "http://mail.foo.com/redirect", lastVisit: jan11_800,
- transType: PlacesUtils.history.TRANSITION_LINK},
-
- // Test subdomain inclued at the leading time edge
- {isInQuery: true, isVisit: true, isDetails: true,
- uri: "http://mail.foo.com/yiihah", title: "moz", lastVisit: jan6_815},
-
- // Test www. style URI is included, with an annotation
- {isInQuery: true, isVisit: true, isDetails: true, isPageAnnotation: true,
- uri: "http://www.foo.com/yiihah", annoName: goodAnnoName, annoVal: val,
- lastVisit: jan7_800, title: "moz"},
-
- // Test https protocol
- {isInQuery: true, isVisit: true, isDetails: true, title: "moz",
- uri: "https://foo.com/", lastVisit: jan15_2045},
-
- // Test begin edge of time
- {isInQuery: true, isVisit: true, isDetails: true, title: "moz mozilla",
- uri: "https://foo.com/begin.html", lastVisit: beginTime},
-
- // Test end edge of time
- {isInQuery: true, isVisit: true, isDetails: true, title: "moz mozilla",
- uri: "https://foo.com/end.html", lastVisit: endTime},
-
- // Test an image link, with annotations
- {isInQuery: true, isVisit: true, isDetails: true, isPageAnnotation: true,
- title: "mozzie the dino", uri: "https://foo.com/mozzie.png",
- annoName: goodAnnoName, annoVal: val, lastVisit: jan14_2130},
-
- // Begin the invalid queries: Test too early
- {isInQuery: false, isVisit:true, isDetails: true, title: "moz",
- uri: "http://foo.com/tooearly.php", lastVisit: jan6_700},
-
- // Test Bad Annotation
- {isInQuery: false, isVisit:true, isDetails: true, isPageAnnotation: true,
- title: "moz", uri: "http://foo.com/badanno.htm", lastVisit: jan12_1730,
- annoName: badAnnoName, annoVal: val},
-
- // Test bad URI
- {isInQuery: false, isVisit:true, isDetails: true, title: "moz",
- uri: "http://somefoo.com/justwrong.htm", lastVisit: jan11_800},
-
- // Test afterward, one to update
- {isInQuery: false, isVisit:true, isDetails: true, title: "changeme",
- uri: "http://foo.com/changeme1.htm", lastVisit: jan12_1730},
-
- // Test invalid title
- {isInQuery: false, isVisit:true, isDetails: true, title: "changeme2",
- uri: "http://foo.com/changeme2.htm", lastVisit: jan7_800},
-
- // Test changing the lastVisit
- {isInQuery: false, isVisit:true, isDetails: true, title: "moz",
- uri: "http://foo.com/changeme3.htm", lastVisit: dec27_800}];
-
-/**
- * This test will test a Query using several terms and do a bit of negative
- * testing for items that should be ignored while querying over history.
- * The Query:WHERE absoluteTime(matches) AND searchTerms AND URI
- * AND annotationIsNot(match) GROUP BY Domain, Day SORT BY uri,ascending
- * excludeITems(should be ignored)
- */
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_abstime_annotation_domain()
-{
- // Initialize database
- yield task_populateDB(testData);
-
- // Query
- var query = PlacesUtils.history.getNewQuery();
- query.beginTime = beginTime;
- query.endTime = endTime;
- query.beginTimeReference = PlacesUtils.history.TIME_RELATIVE_EPOCH;
- query.endTimeReference = PlacesUtils.history.TIME_RELATIVE_EPOCH;
- query.searchTerms = "moz";
- query.domain = "foo.com";
- query.domainIsHost = false;
- query.annotation = "text/foo";
- query.annotationIsNot = true;
-
- // Options
- var options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = options.SORT_BY_URI_ASCENDING;
- options.resultType = options.RESULTS_AS_URI;
- // The next two options should be ignored
- // can't use this one, breaks test - bug 419779
- // options.excludeItems = true;
-
- // Results
- var result = PlacesUtils.history.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
-
- // Ensure the result set is correct
- compareArrayToResult(testData, root);
-
- // Make some changes to the result set
- // Let's add something first
- var addItem = [{isInQuery: true, isVisit: true, isDetails: true, title: "moz",
- uri: "http://www.foo.com/i-am-added.html", lastVisit: jan11_800}];
- yield task_populateDB(addItem);
- do_print("Adding item foo.com/i-am-added.html");
- do_check_eq(isInResult(addItem, root), true);
-
- // Let's update something by title
- var change1 = [{isDetails: true, uri: "http://foo.com/changeme1",
- lastVisit: jan12_1730, title: "moz moz mozzie"}];
- yield task_populateDB(change1);
- do_print("LiveUpdate by changing title");
- do_check_eq(isInResult(change1, root), true);
-
- // Let's update something by annotation
- // Updating a page by removing an annotation does not cause it to join this
- // query set. I tend to think that it should cause that page to join this
- // query set, because this visit fits all theother specified criteria once the
- // annotation is removed. Uncommenting this will fail the test.
- // Bug 424050
- /* var change2 = [{isPageAnnotation: true, uri: "http://foo.com/badannotaion.html",
- annoName: "text/mozilla", annoVal: "test"}];
- yield task_populateDB(change2);
- do_print("LiveUpdate by removing annotation");
- do_check_eq(isInResult(change2, root), true);*/
-
- // Let's update by adding a visit in the time range for an existing URI
- var change3 = [{isDetails: true, uri: "http://foo.com/changeme3.htm",
- title: "moz", lastVisit: jan15_2045}];
- yield task_populateDB(change3);
- do_print("LiveUpdate by adding visit within timerange");
- do_check_eq(isInResult(change3, root), true);
-
- // And delete something from the result set - using annotation
- // Once again, bug 424050 prevents this from passing
- /* var change4 = [{isPageAnnotation: true, uri: "ftp://foo.com/ftp",
- annoVal: "test", annoName: badAnnoName}];
- yield task_populateDB(change4);
- do_print("LiveUpdate by deleting item from set by adding annotation");
- do_check_eq(isInResult(change4, root), false);*/
-
- // Delete something by changing the title
- var change5 = [{isDetails: true, uri: "http://foo.com/end.html", title: "deleted"}];
- yield task_populateDB(change5);
- do_print("LiveUpdate by deleting item by changing title");
- do_check_eq(isInResult(change5, root), false);
-
- root.containerOpen = false;
-});
diff --git a/toolkit/components/places/tests/queries/test_abstime-annotation-uri.js b/toolkit/components/places/tests/queries/test_abstime-annotation-uri.js
deleted file mode 100644
index 145d2cb596..0000000000
--- a/toolkit/components/places/tests/queries/test_abstime-annotation-uri.js
+++ /dev/null
@@ -1,162 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-const DAY_MSEC = 86400000;
-const MIN_MSEC = 60000;
-const HOUR_MSEC = 3600000;
-// Jan 6 2008 at 8am is our begin edge of the query
-var beginTimeDate = new Date(2008, 0, 6, 8, 0, 0, 0);
-// Jan 15 2008 at 9:30pm is our ending edge of the query
-var endTimeDate = new Date(2008, 0, 15, 21, 30, 0, 0);
-
-// These as millisecond values
-var beginTime = beginTimeDate.getTime();
-var endTime = endTimeDate.getTime();
-
-// Some range dates inside our query - mult by 1000 to convert to PRTIME
-var jan7_800 = (beginTime + DAY_MSEC) * 1000;
-var jan6_815 = (beginTime + (MIN_MSEC * 15)) * 1000;
-var jan11_800 = (beginTime + (DAY_MSEC * 5)) * 1000;
-var jan14_2130 = (endTime - DAY_MSEC) * 1000;
-var jan15_2045 = (endTime - (MIN_MSEC * 45)) * 1000;
-var jan12_1730 = (endTime - (DAY_MSEC * 3) - (HOUR_MSEC*4)) * 1000;
-
-// Dates outside our query - mult by 1000 to convert to PRTIME
-var jan6_700 = (beginTime - HOUR_MSEC) * 1000;
-var jan5_800 = (beginTime - DAY_MSEC) * 1000;
-var dec27_800 = (beginTime - (DAY_MSEC * 10)) * 1000;
-var jan15_2145 = (endTime + (MIN_MSEC * 15)) * 1000;
-var jan16_2130 = (endTime + (DAY_MSEC)) * 1000;
-var jan25_2130 = (endTime + (DAY_MSEC * 10)) * 1000;
-
-// So that we can easily use these too, convert them to PRTIME
-beginTime *= 1000;
-endTime *= 1000;
-
-/**
- * Array of objects to build our test database
- */
-var goodAnnoName = "moz-test-places/testing123";
-var val = "test";
-var badAnnoName = "text/foo";
-
-// The test data for our database, note that the ordering of the results that
-// will be returned by the query (the isInQuery: true objects) is IMPORTANT.
-// see compareArrayToResult in head_queries.js for more info.
-var testData = [
-
- // Test flat domain with annotation
- {isInQuery: true, isVisit: true, isDetails: true, isPageAnnotation: true,
- uri: "http://foo.com/", annoName: goodAnnoName, annoVal: val,
- lastVisit: jan14_2130, title: "moz"},
-
- // Begin the invalid queries:
- // Test www. style URI is not included, with an annotation
- {isInQuery: false, isVisit: true, isDetails: true, isPageAnnotation: true,
- uri: "http://www.foo.com/yiihah", annoName: goodAnnoName, annoVal: val,
- lastVisit: jan7_800, title: "moz"},
-
- // Test subdomain not inclued at the leading time edge
- {isInQuery: false, isVisit: true, isDetails: true,
- uri: "http://mail.foo.com/yiihah", title: "moz", lastVisit: jan6_815},
-
- // Test https protocol
- {isInQuery: false, isVisit: true, isDetails: true, title: "moz",
- uri: "https://foo.com/", lastVisit: jan15_2045},
-
- // Test ftp protocol
- {isInQuery: false, isVisit: true, isDetails: true,
- uri: "ftp://foo.com/ftp", lastVisit: jan12_1730,
- title: "hugelongconfmozlagurationofwordswithasearchtermsinit whoo-hoo"},
-
- // Test too early
- {isInQuery: false, isVisit:true, isDetails: true, title: "moz",
- uri: "http://foo.com/tooearly.php", lastVisit: jan6_700},
-
- // Test Bad Annotation
- {isInQuery: false, isVisit:true, isDetails: true, isPageAnnotation: true,
- title: "moz", uri: "http://foo.com/badanno.htm", lastVisit: jan12_1730,
- annoName: badAnnoName, annoVal: val},
-
- // Test afterward, one to update
- {isInQuery: false, isVisit:true, isDetails: true, title: "changeme",
- uri: "http://foo.com/changeme1.htm", lastVisit: jan12_1730},
-
- // Test invalid title
- {isInQuery: false, isVisit:true, isDetails: true, title: "changeme2",
- uri: "http://foo.com/changeme2.htm", lastVisit: jan7_800},
-
- // Test changing the lastVisit
- {isInQuery: false, isVisit:true, isDetails: true, title: "moz",
- uri: "http://foo.com/changeme3.htm", lastVisit: dec27_800}];
-
-/**
- * This test will test a Query using several terms and do a bit of negative
- * testing for items that should be ignored while querying over history.
- * The Query:WHERE absoluteTime(matches) AND searchTerms AND URI
- * AND annotationIsNot(match) GROUP BY Domain, Day SORT BY uri,ascending
- * excludeITems(should be ignored)
- */
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_abstime_annotation_uri()
-{
- // Initialize database
- yield task_populateDB(testData);
-
- // Query
- var query = PlacesUtils.history.getNewQuery();
- query.beginTime = beginTime;
- query.endTime = endTime;
- query.beginTimeReference = PlacesUtils.history.TIME_RELATIVE_EPOCH;
- query.endTimeReference = PlacesUtils.history.TIME_RELATIVE_EPOCH;
- query.searchTerms = "moz";
- query.uri = uri("http://foo.com");
- query.annotation = "text/foo";
- query.annotationIsNot = true;
-
- // Options
- var options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = options.SORT_BY_URI_ASCENDING;
- options.resultType = options.RESULTS_AS_URI;
- // The next two options should be ignored
- // can't use this one, breaks test - bug 419779
- // options.excludeItems = true;
-
- // Results
- var result = PlacesUtils.history.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
-
- // Ensure the result set is correct
- compareArrayToResult(testData, root);
-
- // live update.
- do_print("change title");
- var change1 = [{isDetails: true, uri:"http://foo.com/",
- title: "mo"}, ];
- yield task_populateDB(change1);
- do_check_false(isInResult({uri: "http://foo.com/"}, root));
-
- var change2 = [{isDetails: true, uri:"http://foo.com/",
- title: "moz", lastvisit: endTime}, ];
- yield task_populateDB(change2);
- dump_table("moz_places");
- do_check_false(isInResult({uri: "http://foo.com/"}, root));
-
- // Let's delete something from the result set - using annotation
- var change3 = [{isPageAnnotation: true,
- uri: "http://foo.com/",
- annoName: badAnnoName, annoVal: "test"}];
- yield task_populateDB(change3);
- do_print("LiveUpdate by removing annotation");
- do_check_false(isInResult({uri: "http://foo.com/"}, root));
-
- root.containerOpen = false;
-});
diff --git a/toolkit/components/places/tests/queries/test_async.js b/toolkit/components/places/tests/queries/test_async.js
deleted file mode 100644
index 0ec99f8fc2..0000000000
--- a/toolkit/components/places/tests/queries/test_async.js
+++ /dev/null
@@ -1,371 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var tests = [
- {
- desc: "nsNavHistoryFolderResultNode: Basic test, asynchronously open and " +
- "close container with a single child",
-
- loading: function (node, newState, oldState) {
- this.checkStateChanged("loading", 1);
- this.checkArgs("loading", node, oldState, node.STATE_CLOSED);
- },
-
- opened: function (node, newState, oldState) {
- this.checkStateChanged("opened", 1);
- this.checkState("loading", 1);
- this.checkArgs("opened", node, oldState, node.STATE_LOADING);
-
- print("Checking node children");
- compareArrayToResult(this.data, node);
-
- print("Closing container");
- node.containerOpen = false;
- },
-
- closed: function (node, newState, oldState) {
- this.checkStateChanged("closed", 1);
- this.checkState("opened", 1);
- this.checkArgs("closed", node, oldState, node.STATE_OPENED);
- this.success();
- }
- },
-
- {
- desc: "nsNavHistoryFolderResultNode: After async open and no changes, " +
- "second open should be synchronous",
-
- loading: function (node, newState, oldState) {
- this.checkStateChanged("loading", 1);
- this.checkState("closed", 0);
- this.checkArgs("loading", node, oldState, node.STATE_CLOSED);
- },
-
- opened: function (node, newState, oldState) {
- let cnt = this.checkStateChanged("opened", 1, 2);
- let expectOldState = cnt === 1 ? node.STATE_LOADING : node.STATE_CLOSED;
- this.checkArgs("opened", node, oldState, expectOldState);
-
- print("Checking node children");
- compareArrayToResult(this.data, node);
-
- print("Closing container");
- node.containerOpen = false;
- },
-
- closed: function (node, newState, oldState) {
- let cnt = this.checkStateChanged("closed", 1, 2);
- this.checkArgs("closed", node, oldState, node.STATE_OPENED);
-
- switch (cnt) {
- case 1:
- node.containerOpen = true;
- break;
- case 2:
- this.success();
- break;
- }
- }
- },
-
- {
- desc: "nsNavHistoryFolderResultNode: After closing container in " +
- "loading(), opened() should not be called",
-
- loading: function (node, newState, oldState) {
- this.checkStateChanged("loading", 1);
- this.checkArgs("loading", node, oldState, node.STATE_CLOSED);
- print("Closing container");
- node.containerOpen = false;
- },
-
- opened: function (node, newState, oldState) {
- do_throw("opened should not be called");
- },
-
- closed: function (node, newState, oldState) {
- this.checkStateChanged("closed", 1);
- this.checkState("loading", 1);
- this.checkArgs("closed", node, oldState, node.STATE_LOADING);
- this.success();
- }
- }
-];
-
-
-/**
- * Instances of this class become the prototypes of the test objects above.
- * Each test can therefore use the methods of this class, or they can override
- * them if they want. To run a test, call setup() and then run().
- */
-function Test() {
- // This maps a state name to the number of times it's been observed.
- this.stateCounts = {};
- // Promise object resolved when the next test can be run.
- this.deferNextTest = Promise.defer();
-}
-
-Test.prototype = {
- /**
- * Call this when an observer observes a container state change to sanity
- * check the arguments.
- *
- * @param aNewState
- * The name of the new state. Used only for printing out helpful info.
- * @param aNode
- * The node argument passed to containerStateChanged.
- * @param aOldState
- * The old state argument passed to containerStateChanged.
- * @param aExpectOldState
- * The expected old state.
- */
- checkArgs: function (aNewState, aNode, aOldState, aExpectOldState) {
- print("Node passed on " + aNewState + " should be result.root");
- do_check_eq(this.result.root, aNode);
- print("Old state passed on " + aNewState + " should be " + aExpectOldState);
-
- // aOldState comes from xpconnect and will therefore be defined. It may be
- // zero, though, so use strict equality just to make sure aExpectOldState is
- // also defined.
- do_check_true(aOldState === aExpectOldState);
- },
-
- /**
- * Call this when an observer observes a container state change. It registers
- * the state change and ensures that it has been observed the given number
- * of times. See checkState for parameter explanations.
- *
- * @return The number of times aState has been observed, including the new
- * observation.
- */
- checkStateChanged: function (aState, aExpectedMin, aExpectedMax) {
- print(aState + " state change observed");
- if (!this.stateCounts.hasOwnProperty(aState))
- this.stateCounts[aState] = 0;
- this.stateCounts[aState]++;
- return this.checkState(aState, aExpectedMin, aExpectedMax);
- },
-
- /**
- * Ensures that the state has been observed the given number of times.
- *
- * @param aState
- * The name of the state.
- * @param aExpectedMin
- * The state must have been observed at least this number of times.
- * @param aExpectedMax
- * The state must have been observed at most this number of times.
- * This parameter is optional. If undefined, it's set to
- * aExpectedMin.
- * @return The number of times aState has been observed, including the new
- * observation.
- */
- checkState: function (aState, aExpectedMin, aExpectedMax) {
- let cnt = this.stateCounts[aState] || 0;
- if (aExpectedMax === undefined)
- aExpectedMax = aExpectedMin;
- if (aExpectedMin === aExpectedMax) {
- print(aState + " should be observed only " + aExpectedMin +
- " times (actual = " + cnt + ")");
- }
- else {
- print(aState + " should be observed at least " + aExpectedMin +
- " times and at most " + aExpectedMax + " times (actual = " +
- cnt + ")");
- }
- do_check_true(cnt >= aExpectedMin && cnt <= aExpectedMax);
- return cnt;
- },
-
- /**
- * Asynchronously opens the root of the test's result.
- */
- openContainer: function () {
- // Set up the result observer. It delegates to this object's callbacks and
- // wraps them in a try-catch so that errors don't get eaten.
- let self = this;
- this.observer = {
- containerStateChanged: function (container, oldState, newState) {
- print("New state passed to containerStateChanged() should equal the " +
- "container's current state");
- do_check_eq(newState, container.state);
-
- try {
- switch (newState) {
- case Ci.nsINavHistoryContainerResultNode.STATE_LOADING:
- self.loading(container, newState, oldState);
- break;
- case Ci.nsINavHistoryContainerResultNode.STATE_OPENED:
- self.opened(container, newState, oldState);
- break;
- case Ci.nsINavHistoryContainerResultNode.STATE_CLOSED:
- self.closed(container, newState, oldState);
- break;
- default:
- do_throw("Unexpected new state! " + newState);
- }
- }
- catch (err) {
- do_throw(err);
- }
- },
- };
- this.result.addObserver(this.observer, false);
-
- print("Opening container");
- this.result.root.containerOpen = true;
- },
-
- /**
- * Starts the test and returns a promise resolved when the test completes.
- */
- run: function () {
- this.openContainer();
- return this.deferNextTest.promise;
- },
-
- /**
- * This must be called before run(). It adds a bookmark and sets up the
- * test's result. Override if need be.
- */
- setup: function*() {
- // Populate the database with different types of bookmark items.
- this.data = DataHelper.makeDataArray([
- { type: "bookmark" },
- { type: "separator" },
- { type: "folder" },
- { type: "bookmark", uri: "place:terms=foo" }
- ]);
- yield task_populateDB(this.data);
-
- // Make a query.
- this.query = PlacesUtils.history.getNewQuery();
- this.query.setFolders([DataHelper.defaults.bookmark.parent], 1);
- this.opts = PlacesUtils.history.getNewQueryOptions();
- this.opts.asyncEnabled = true;
- this.result = PlacesUtils.history.executeQuery(this.query, this.opts);
- },
-
- /**
- * Call this when the test has succeeded. It cleans up resources and starts
- * the next test.
- */
- success: function () {
- this.result.removeObserver(this.observer);
-
- // Resolve the promise object that indicates that the next test can be run.
- this.deferNextTest.resolve();
- }
-};
-
-/**
- * This makes it a little bit easier to use the functions of head_queries.js.
- */
-var DataHelper = {
- defaults: {
- bookmark: {
- parent: PlacesUtils.bookmarks.unfiledBookmarksFolder,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- uri: "http://example.com/",
- title: "test bookmark"
- },
-
- folder: {
- parent: PlacesUtils.bookmarks.unfiledBookmarksFolder,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- title: "test folder"
- },
-
- separator: {
- parent: PlacesUtils.bookmarks.unfiledBookmarksFolder,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid
- }
- },
-
- /**
- * Converts an array of simple bookmark item descriptions to the more verbose
- * format required by task_populateDB() in head_queries.js.
- *
- * @param aData
- * An array of objects, each of which describes a bookmark item.
- * @return An array of objects suitable for passing to populateDB().
- */
- makeDataArray: function DH_makeDataArray(aData) {
- let self = this;
- return aData.map(function (dat) {
- let type = dat.type;
- dat = self._makeDataWithDefaults(dat, self.defaults[type]);
- switch (type) {
- case "bookmark":
- return {
- isBookmark: true,
- uri: dat.uri,
- parentGuid: dat.parentGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: dat.title,
- isInQuery: true
- };
- case "separator":
- return {
- isSeparator: true,
- parentGuid: dat.parentGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- isInQuery: true
- };
- case "folder":
- return {
- isFolder: true,
- parentGuid: dat.parentGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: dat.title,
- isInQuery: true
- };
- default:
- do_throw("Unknown data type when populating DB: " + type);
- return undefined;
- }
- });
- },
-
- /**
- * Returns a copy of aData, except that any properties that are undefined but
- * defined in aDefaults are set to the corresponding values in aDefaults.
- *
- * @param aData
- * An object describing a bookmark item.
- * @param aDefaults
- * An object describing the default bookmark item.
- * @return A copy of aData with defaults values set.
- */
- _makeDataWithDefaults: function DH__makeDataWithDefaults(aData, aDefaults) {
- let dat = {};
- for (let [prop, val] of Object.entries(aDefaults)) {
- dat[prop] = aData.hasOwnProperty(prop) ? aData[prop] : val;
- }
- return dat;
- }
-};
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_async()
-{
- for (let test of tests) {
- yield PlacesUtils.bookmarks.eraseEverything();
-
- test.__proto__ = new Test();
- yield test.setup();
-
- print("------ Running test: " + test.desc);
- yield test.run();
- }
-
- yield PlacesUtils.bookmarks.eraseEverything();
- print("All tests done, exiting");
-});
diff --git a/toolkit/components/places/tests/queries/test_containersQueries_sorting.js b/toolkit/components/places/tests/queries/test_containersQueries_sorting.js
deleted file mode 100644
index ab9f2bf901..0000000000
--- a/toolkit/components/places/tests/queries/test_containersQueries_sorting.js
+++ /dev/null
@@ -1,411 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/**
- * Testing behavior of bug 473157
- * "Want to sort history in container view without sorting the containers"
- * and regression bug 488783
- * Tags list no longer sorted (alphabetized).
- * This test is for global testing sorting containers queries.
- */
-
-// Globals and Constants
-
-var hs = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
-var bh = hs.QueryInterface(Ci.nsIBrowserHistory);
-var tagging = Cc["@mozilla.org/browser/tagging-service;1"].
- getService(Ci.nsITaggingService);
-
-var resultTypes = [
- {value: Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_QUERY, name: "RESULTS_AS_DATE_QUERY"},
- {value: Ci.nsINavHistoryQueryOptions.RESULTS_AS_SITE_QUERY, name: "RESULTS_AS_SITE_QUERY"},
- {value: Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_SITE_QUERY, name: "RESULTS_AS_DATE_SITE_QUERY"},
- {value: Ci.nsINavHistoryQueryOptions.RESULTS_AS_TAG_QUERY, name: "RESULTS_AS_TAG_QUERY"},
-];
-
-var sortingModes = [
- {value: Ci.nsINavHistoryQueryOptions.SORT_BY_TITLE_ASCENDING, name: "SORT_BY_TITLE_ASCENDING"},
- {value: Ci.nsINavHistoryQueryOptions.SORT_BY_TITLE_DESCENDING, name: "SORT_BY_TITLE_DESCENDING"},
- {value: Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_ASCENDING, name: "SORT_BY_DATE_ASCENDING"},
- {value: Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING, name: "SORT_BY_DATE_DESCENDING"},
- {value: Ci.nsINavHistoryQueryOptions.SORT_BY_DATEADDED_ASCENDING, name: "SORT_BY_DATEADDED_ASCENDING"},
- {value: Ci.nsINavHistoryQueryOptions.SORT_BY_DATEADDED_DESCENDING, name: "SORT_BY_DATEADDED_DESCENDING"},
-];
-
-// These pages will be added from newest to oldest and from less visited to most
-// visited.
-var pages = [
- "http://www.mozilla.org/c/",
- "http://www.mozilla.org/a/",
- "http://www.mozilla.org/b/",
- "http://www.mozilla.com/c/",
- "http://www.mozilla.com/a/",
- "http://www.mozilla.com/b/",
-];
-
-var tags = [
- "mozilla",
- "Development",
- "test",
-];
-
-// Test Runner
-
-/**
- * Enumerates all the sequences of the cartesian product of the arrays contained
- * in aSequences. Examples:
- *
- * cartProd([[1, 2, 3], ["a", "b"]], callback);
- * // callback is called 3 * 2 = 6 times with the following arrays:
- * // [1, "a"], [1, "b"], [2, "a"], [2, "b"], [3, "a"], [3, "b"]
- *
- * cartProd([["a"], [1, 2, 3], ["X", "Y"]], callback);
- * // callback is called 1 * 3 * 2 = 6 times with the following arrays:
- * // ["a", 1, "X"], ["a", 1, "Y"], ["a", 2, "X"], ["a", 2, "Y"],
- * // ["a", 3, "X"], ["a", 3, "Y"]
- *
- * cartProd([[1], [2], [3], [4]], callback);
- * // callback is called 1 * 1 * 1 * 1 = 1 time with the following array:
- * // [1, 2, 3, 4]
- *
- * cartProd([], callback);
- * // callback is 0 times
- *
- * cartProd([[1, 2, 3, 4]], callback);
- * // callback is called 4 times with the following arrays:
- * // [1], [2], [3], [4]
- *
- * @param aSequences
- * an array that contains an arbitrary number of arrays
- * @param aCallback
- * a function that is passed each sequence of the product as it's
- * computed
- * @return the total number of sequences in the product
- */
-function cartProd(aSequences, aCallback)
-{
- if (aSequences.length === 0)
- return 0;
-
- // For each sequence in aSequences, we maintain a pointer (an array index,
- // really) to the element we're currently enumerating in that sequence
- var seqEltPtrs = aSequences.map(i => 0);
-
- var numProds = 0;
- var done = false;
- while (!done) {
- numProds++;
-
- // prod = sequence in product we're currently enumerating
- var prod = [];
- for (var i = 0; i < aSequences.length; i++) {
- prod.push(aSequences[i][seqEltPtrs[i]]);
- }
- aCallback(prod);
-
- // The next sequence in the product differs from the current one by just a
- // single element. Determine which element that is. We advance the
- // "rightmost" element pointer to the "right" by one. If we move past the
- // end of that pointer's sequence, reset the pointer to the first element
- // in its sequence and then try the sequence to the "left", and so on.
-
- // seqPtr = index of rightmost input sequence whose element pointer is not
- // past the end of the sequence
- var seqPtr = aSequences.length - 1;
- while (!done) {
- // Advance the rightmost element pointer.
- seqEltPtrs[seqPtr]++;
-
- // The rightmost element pointer is past the end of its sequence.
- if (seqEltPtrs[seqPtr] >= aSequences[seqPtr].length) {
- seqEltPtrs[seqPtr] = 0;
- seqPtr--;
-
- // All element pointers are past the ends of their sequences.
- if (seqPtr < 0)
- done = true;
- }
- else break;
- }
- }
- return numProds;
-}
-
-/**
- * Test a query based on passed-in options.
- *
- * @param aSequence
- * array of options we will use to query.
- */
-function test_query_callback(aSequence) {
- do_check_eq(aSequence.length, 2);
- var resultType = aSequence[0];
- var sortingMode = aSequence[1];
- print("\n\n*** Testing default sorting for resultType (" + resultType.name + ") and sortingMode (" + sortingMode.name + ")");
-
- // Skip invalid combinations sorting queries by none.
- if (resultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_TAG_QUERY &&
- (sortingMode.value == Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_ASCENDING ||
- sortingMode.value == Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING)) {
- // This is a bookmark query, we can't sort by visit date.
- sortingMode.value = Ci.nsINavHistoryQueryOptions.SORT_BY_NONE;
- }
- if (resultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_QUERY ||
- resultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_SITE_QUERY ||
- resultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_SITE_QUERY) {
- // This is an history query, we can't sort by date added.
- if (sortingMode.value == Ci.nsINavHistoryQueryOptions.SORT_BY_DATEADDED_ASCENDING ||
- sortingMode.value == Ci.nsINavHistoryQueryOptions.SORT_BY_DATEADDED_DESCENDING)
- sortingMode.value = Ci.nsINavHistoryQueryOptions.SORT_BY_NONE;
- }
-
- // Create a new query with required options.
- var query = PlacesUtils.history.getNewQuery();
- var options = PlacesUtils.history.getNewQueryOptions();
- options.resultType = resultType.value;
- options.sortingMode = sortingMode.value;
-
- // Compare resultset with expectedData.
- var result = PlacesUtils.history.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
-
- if (resultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_QUERY ||
- resultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_SITE_QUERY) {
- // Date containers are always sorted by date descending.
- check_children_sorting(root,
- Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING);
- }
- else
- check_children_sorting(root, sortingMode.value);
-
- // Now Check sorting of the first child container.
- var container = root.getChild(0)
- .QueryInterface(Ci.nsINavHistoryContainerResultNode);
- container.containerOpen = true;
-
- if (resultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_SITE_QUERY) {
- // Has more than one level of containers, first we check the sorting of
- // the first level (site containers), those won't inherit sorting...
- check_children_sorting(container,
- Ci.nsINavHistoryQueryOptions.SORT_BY_TITLE_ASCENDING);
- // ...then we check sorting of the contained urls, we can't inherit sorting
- // since the above level does not inherit it, so they will be sorted by
- // title ascending.
- let innerContainer = container.getChild(0)
- .QueryInterface(Ci.nsINavHistoryContainerResultNode);
- innerContainer.containerOpen = true;
- check_children_sorting(innerContainer,
- Ci.nsINavHistoryQueryOptions.SORT_BY_TITLE_ASCENDING);
- innerContainer.containerOpen = false;
- }
- else if (resultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_TAG_QUERY) {
- // Sorting mode for tag contents is hardcoded for now, to allow for faster
- // duplicates filtering.
- check_children_sorting(container,
- Ci.nsINavHistoryQueryOptions.SORT_BY_NONE);
- }
- else
- check_children_sorting(container, sortingMode.value);
-
- container.containerOpen = false;
- root.containerOpen = false;
-
- test_result_sortingMode_change(result, resultType, sortingMode);
-}
-
-/**
- * Sets sortingMode on aResult and checks for correct sorting of children.
- * Containers should not change their sorting, while contained uri nodes should.
- *
- * @param aResult
- * nsINavHistoryResult generated by our query.
- * @param aResultType
- * required result type.
- * @param aOriginalSortingMode
- * the sorting mode from query's options.
- */
-function test_result_sortingMode_change(aResult, aResultType, aOriginalSortingMode) {
- var root = aResult.root;
- // Now we set sortingMode on the result and check that containers are not
- // sorted while children are.
- sortingModes.forEach(function sortingModeChecker(aForcedSortingMode) {
- print("\n* Test setting sortingMode (" + aForcedSortingMode.name + ") " +
- "on result with resultType (" + aResultType.name + ") " +
- "currently sorted as (" + aOriginalSortingMode.name + ")");
-
- aResult.sortingMode = aForcedSortingMode.value;
- root.containerOpen = true;
-
- if (aResultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_QUERY ||
- aResultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_SITE_QUERY) {
- // Date containers are always sorted by date descending.
- check_children_sorting(root,
- Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING);
- }
- else if (aResultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_SITE_QUERY &&
- (aOriginalSortingMode.value == Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_ASCENDING ||
- aOriginalSortingMode.value == Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING)) {
- // Site containers don't have a good time property to sort by.
- check_children_sorting(root,
- Ci.nsINavHistoryQueryOptions.SORT_BY_NONE);
- }
- else
- check_children_sorting(root, aOriginalSortingMode.value);
-
- // Now Check sorting of the first child container.
- var container = root.getChild(0)
- .QueryInterface(Ci.nsINavHistoryContainerResultNode);
- container.containerOpen = true;
-
- if (aResultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_SITE_QUERY) {
- // Has more than one level of containers, first we check the sorting of
- // the first level (site containers), those won't be sorted...
- check_children_sorting(container,
- Ci.nsINavHistoryQueryOptions.SORT_BY_TITLE_ASCENDING);
- // ...then we check sorting of the second level of containers, result
- // will sort them through recursiveSort.
- let innerContainer = container.getChild(0)
- .QueryInterface(Ci.nsINavHistoryContainerResultNode);
- innerContainer.containerOpen = true;
- check_children_sorting(innerContainer, aForcedSortingMode.value);
- innerContainer.containerOpen = false;
- }
- else {
- if (aResultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_QUERY ||
- aResultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_SITE_QUERY ||
- aResultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_SITE_QUERY) {
- // Date containers are always sorted by date descending.
- check_children_sorting(root, Ci.nsINavHistoryQueryOptions.SORT_BY_NONE);
- }
- else if (aResultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_SITE_QUERY &&
- (aOriginalSortingMode.value == Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_ASCENDING ||
- aOriginalSortingMode.value == Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING)) {
- // Site containers don't have a good time property to sort by.
- check_children_sorting(root, Ci.nsINavHistoryQueryOptions.SORT_BY_NONE);
- }
- else
- check_children_sorting(root, aOriginalSortingMode.value);
-
- // Children should always be sorted.
- check_children_sorting(container, aForcedSortingMode.value);
- }
-
- container.containerOpen = false;
- root.containerOpen = false;
- });
-}
-
-/**
- * Test if children of aRootNode are correctly sorted.
- * @param aRootNode
- * already opened root node from our query's result.
- * @param aExpectedSortingMode
- * The sortingMode we expect results to be.
- */
-function check_children_sorting(aRootNode, aExpectedSortingMode) {
- var results = [];
- print("Found children:");
- for (let i = 0; i < aRootNode.childCount; i++) {
- results[i] = aRootNode.getChild(i);
- print(i + " " + results[i].title);
- }
-
- // Helper for case insensitive string comparison.
- function caseInsensitiveStringComparator(a, b) {
- var aLC = a.toLowerCase();
- var bLC = b.toLowerCase();
- if (aLC < bLC)
- return -1;
- if (aLC > bLC)
- return 1;
- return 0;
- }
-
- // Get a comparator based on expected sortingMode.
- var comparator;
- switch (aExpectedSortingMode) {
- case Ci.nsINavHistoryQueryOptions.SORT_BY_NONE:
- comparator = function (a, b) {
- return 0;
- }
- break;
- case Ci.nsINavHistoryQueryOptions.SORT_BY_TITLE_ASCENDING:
- comparator = function (a, b) {
- return caseInsensitiveStringComparator(a.title, b.title);
- }
- break;
- case Ci.nsINavHistoryQueryOptions.SORT_BY_TITLE_DESCENDING:
- comparator = function (a, b) {
- return -caseInsensitiveStringComparator(a.title, b.title);
- }
- break;
- case Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_ASCENDING:
- comparator = function (a, b) {
- return a.time - b.time;
- }
- break;
- case Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING:
- comparator = function (a, b) {
- return b.time - a.time;
- }
- case Ci.nsINavHistoryQueryOptions.SORT_BY_DATEADDED_ASCENDING:
- comparator = function (a, b) {
- return a.dateAdded - b.dateAdded;
- }
- break;
- case Ci.nsINavHistoryQueryOptions.SORT_BY_DATEADDED_DESCENDING:
- comparator = function (a, b) {
- return b.dateAdded - a.dateAdded;
- }
- break;
- default:
- do_throw("Unknown sorting type: " + aExpectedSortingMode);
- }
-
- // Make an independent copy of the results array and sort it.
- var sortedResults = results.slice();
- sortedResults.sort(comparator);
- // Actually compare returned children with our sorted array.
- for (let i = 0; i < sortedResults.length; i++) {
- if (sortedResults[i].title != results[i].title)
- print(i + " index wrong, expected " + sortedResults[i].title +
- " found " + results[i].title);
- do_check_eq(sortedResults[i].title, results[i].title);
- }
-}
-
-// Main
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_containersQueries_sorting()
-{
- // Add visits, bookmarks and tags to our database.
- var timeInMilliseconds = Date.now();
- var visitCount = 0;
- var dayOffset = 0;
- var visits = [];
- pages.forEach(aPageUrl => visits.push(
- { isVisit: true,
- isBookmark: true,
- transType: Ci.nsINavHistoryService.TRANSITION_TYPED,
- uri: aPageUrl,
- title: aPageUrl,
- // subtract 5 hours per iteration, to expose more than one day container.
- lastVisit: (timeInMilliseconds - (18000 * 1000 * dayOffset++)) * 1000,
- visitCount: visitCount++,
- isTag: true,
- tagArray: tags,
- isInQuery: true }));
- yield task_populateDB(visits);
-
- cartProd([resultTypes, sortingModes], test_query_callback);
-});
diff --git a/toolkit/components/places/tests/queries/test_history_queries_tags_liveUpdate.js b/toolkit/components/places/tests/queries/test_history_queries_tags_liveUpdate.js
deleted file mode 100644
index fbbacf6c9e..0000000000
--- a/toolkit/components/places/tests/queries/test_history_queries_tags_liveUpdate.js
+++ /dev/null
@@ -1,200 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// This test ensures that tags changes are correctly live-updated in a history
-// query.
-
-let timeInMicroseconds = PlacesUtils.toPRTime(Date.now() - 10000);
-
-function newTimeInMicroseconds() {
- timeInMicroseconds = timeInMicroseconds + 1000;
- return timeInMicroseconds;
-}
-
-var gTestData = [
- {
- isVisit: true,
- uri: "http://example.com/1/",
- lastVisit: newTimeInMicroseconds(),
- isInQuery: true,
- isBookmark: true,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "example1",
- },
- {
- isVisit: true,
- uri: "http://example.com/2/",
- lastVisit: newTimeInMicroseconds(),
- isInQuery: true,
- isBookmark: true,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "example2",
- },
- {
- isVisit: true,
- uri: "http://example.com/3/",
- lastVisit: newTimeInMicroseconds(),
- isInQuery: true,
- isBookmark: true,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "example3",
- },
-];
-
-function newQueryWithOptions()
-{
- return [ PlacesUtils.history.getNewQuery(),
- PlacesUtils.history.getNewQueryOptions() ];
-}
-
-function testQueryContents(aQuery, aOptions, aCallback)
-{
- let root = PlacesUtils.history.executeQuery(aQuery, aOptions).root;
- root.containerOpen = true;
- aCallback(root);
- root.containerOpen = false;
-}
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_initialize()
-{
- yield task_populateDB(gTestData);
-});
-
-add_task(function pages_query()
-{
- let [query, options] = newQueryWithOptions();
- testQueryContents(query, options, function (root) {
- compareArrayToResult([gTestData[0], gTestData[1], gTestData[2]], root);
- for (let i = 0; i < root.childCount; i++) {
- let node = root.getChild(i);
- let uri = NetUtil.newURI(node.uri);
- do_check_eq(node.tags, null);
- PlacesUtils.tagging.tagURI(uri, ["test-tag"]);
- do_check_eq(node.tags, "test-tag");
- PlacesUtils.tagging.untagURI(uri, ["test-tag"]);
- do_check_eq(node.tags, null);
- }
- });
-});
-
-add_task(function visits_query()
-{
- let [query, options] = newQueryWithOptions();
- options.resultType = Ci.nsINavHistoryQueryOptions.RESULTS_AS_VISIT;
- testQueryContents(query, options, function (root) {
- compareArrayToResult([gTestData[0], gTestData[1], gTestData[2]], root);
- for (let i = 0; i < root.childCount; i++) {
- let node = root.getChild(i);
- let uri = NetUtil.newURI(node.uri);
- do_check_eq(node.tags, null);
- PlacesUtils.tagging.tagURI(uri, ["test-tag"]);
- do_check_eq(node.tags, "test-tag");
- PlacesUtils.tagging.untagURI(uri, ["test-tag"]);
- do_check_eq(node.tags, null);
- }
- });
-});
-
-add_task(function bookmarks_query()
-{
- let [query, options] = newQueryWithOptions();
- query.setFolders([PlacesUtils.unfiledBookmarksFolderId], 1);
- testQueryContents(query, options, function (root) {
- compareArrayToResult([gTestData[0], gTestData[1], gTestData[2]], root);
- for (let i = 0; i < root.childCount; i++) {
- let node = root.getChild(i);
- let uri = NetUtil.newURI(node.uri);
- do_check_eq(node.tags, null);
- PlacesUtils.tagging.tagURI(uri, ["test-tag"]);
- do_check_eq(node.tags, "test-tag");
- PlacesUtils.tagging.untagURI(uri, ["test-tag"]);
- do_check_eq(node.tags, null);
- }
- });
-});
-
-add_task(function pages_searchterm_query()
-{
- let [query, options] = newQueryWithOptions();
- query.searchTerms = "example";
- testQueryContents(query, options, function (root) {
- compareArrayToResult([gTestData[0], gTestData[1], gTestData[2]], root);
- for (let i = 0; i < root.childCount; i++) {
- let node = root.getChild(i);
- let uri = NetUtil.newURI(node.uri);
- do_check_eq(node.tags, null);
- PlacesUtils.tagging.tagURI(uri, ["test-tag"]);
- do_check_eq(node.tags, "test-tag");
- PlacesUtils.tagging.untagURI(uri, ["test-tag"]);
- do_check_eq(node.tags, null);
- }
- });
-});
-
-add_task(function visits_searchterm_query()
-{
- let [query, options] = newQueryWithOptions();
- query.searchTerms = "example";
- options.resultType = Ci.nsINavHistoryQueryOptions.RESULTS_AS_VISIT;
- testQueryContents(query, options, function (root) {
- compareArrayToResult([gTestData[0], gTestData[1], gTestData[2]], root);
- for (let i = 0; i < root.childCount; i++) {
- let node = root.getChild(i);
- let uri = NetUtil.newURI(node.uri);
- do_check_eq(node.tags, null);
- PlacesUtils.tagging.tagURI(uri, ["test-tag"]);
- do_check_eq(node.tags, "test-tag");
- PlacesUtils.tagging.untagURI(uri, ["test-tag"]);
- do_check_eq(node.tags, null);
- }
- });
-});
-
-add_task(function pages_searchterm_is_tag_query()
-{
- let [query, options] = newQueryWithOptions();
- query.searchTerms = "test-tag";
- testQueryContents(query, options, function (root) {
- compareArrayToResult([], root);
- gTestData.forEach(function (data) {
- let uri = NetUtil.newURI(data.uri);
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- uri,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- data.title);
- PlacesUtils.tagging.tagURI(uri, ["test-tag"]);
- compareArrayToResult([data], root);
- PlacesUtils.tagging.untagURI(uri, ["test-tag"]);
- compareArrayToResult([], root);
- });
- });
-});
-
-add_task(function visits_searchterm_is_tag_query()
-{
- let [query, options] = newQueryWithOptions();
- query.searchTerms = "test-tag";
- options.resultType = Ci.nsINavHistoryQueryOptions.RESULTS_AS_VISIT;
- testQueryContents(query, options, function (root) {
- compareArrayToResult([], root);
- gTestData.forEach(function (data) {
- let uri = NetUtil.newURI(data.uri);
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- uri,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- data.title);
- PlacesUtils.tagging.tagURI(uri, ["test-tag"]);
- compareArrayToResult([data], root);
- PlacesUtils.tagging.untagURI(uri, ["test-tag"]);
- compareArrayToResult([], root);
- });
- });
-});
diff --git a/toolkit/components/places/tests/queries/test_history_queries_titles_liveUpdate.js b/toolkit/components/places/tests/queries/test_history_queries_titles_liveUpdate.js
deleted file mode 100644
index eec87fe0ea..0000000000
--- a/toolkit/components/places/tests/queries/test_history_queries_titles_liveUpdate.js
+++ /dev/null
@@ -1,210 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// This test ensures that tags changes are correctly live-updated in a history
-// query.
-
-let timeInMicroseconds = PlacesUtils.toPRTime(Date.now() - 10000);
-
-function newTimeInMicroseconds() {
- timeInMicroseconds = timeInMicroseconds + 1000;
- return timeInMicroseconds;
-}
-
-var gTestData = [
- {
- isVisit: true,
- uri: "http://example.com/1/",
- lastVisit: newTimeInMicroseconds(),
- isInQuery: true,
- title: "title1",
- },
- {
- isVisit: true,
- uri: "http://example.com/2/",
- lastVisit: newTimeInMicroseconds(),
- isInQuery: true,
- title: "title2",
- },
- {
- isVisit: true,
- uri: "http://example.com/3/",
- lastVisit: newTimeInMicroseconds(),
- isInQuery: true,
- title: "title3",
- },
-];
-
-function searchNodeHavingUrl(aRoot, aUrl) {
- for (let i = 0; i < aRoot.childCount; i++) {
- if (aRoot.getChild(i).uri == aUrl) {
- return aRoot.getChild(i);
- }
- }
- return undefined;
-}
-
-function newQueryWithOptions()
-{
- return [ PlacesUtils.history.getNewQuery(),
- PlacesUtils.history.getNewQueryOptions() ];
-}
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* pages_query()
-{
- yield task_populateDB(gTestData);
-
- let [query, options] = newQueryWithOptions();
- let root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
-
- compareArrayToResult([gTestData[0], gTestData[1], gTestData[2]], root);
- for (let i = 0; i < root.childCount; i++) {
- let node = root.getChild(i);
- do_check_eq(node.title, gTestData[i].title);
- let uri = NetUtil.newURI(node.uri);
- yield PlacesTestUtils.addVisits({uri: uri, title: "changedTitle"});
- do_check_eq(node.title, "changedTitle");
- yield PlacesTestUtils.addVisits({uri: uri, title: gTestData[i].title});
- do_check_eq(node.title, gTestData[i].title);
- }
-
- root.containerOpen = false;
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* visits_query()
-{
- yield task_populateDB(gTestData);
-
- let [query, options] = newQueryWithOptions();
- options.resultType = Ci.nsINavHistoryQueryOptions.RESULTS_AS_VISIT;
- let root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
-
- compareArrayToResult([gTestData[0], gTestData[1], gTestData[2]], root);
-
- for (let testData of gTestData) {
- let uri = NetUtil.newURI(testData.uri);
- let node = searchNodeHavingUrl(root, testData.uri);
- do_check_eq(node.title, testData.title);
- yield PlacesTestUtils.addVisits({uri: uri, title: "changedTitle"});
- node = searchNodeHavingUrl(root, testData.uri);
- do_check_eq(node.title, "changedTitle");
- yield PlacesTestUtils.addVisits({uri: uri, title: testData.title});
- node = searchNodeHavingUrl(root, testData.uri);
- do_check_eq(node.title, testData.title);
- }
-
- root.containerOpen = false;
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* pages_searchterm_query()
-{
- yield task_populateDB(gTestData);
-
- let [query, options] = newQueryWithOptions();
- query.searchTerms = "example";
- let root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
-
- compareArrayToResult([gTestData[0], gTestData[1], gTestData[2]], root);
- for (let i = 0; i < root.childCount; i++) {
- let node = root.getChild(i);
- let uri = NetUtil.newURI(node.uri);
- do_check_eq(node.title, gTestData[i].title);
- yield PlacesTestUtils.addVisits({uri: uri, title: "changedTitle"});
- do_check_eq(node.title, "changedTitle");
- yield PlacesTestUtils.addVisits({uri: uri, title: gTestData[i].title});
- do_check_eq(node.title, gTestData[i].title);
- }
-
- root.containerOpen = false;
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* visits_searchterm_query()
-{
- yield task_populateDB(gTestData);
-
- let [query, options] = newQueryWithOptions();
- query.searchTerms = "example";
- options.resultType = Ci.nsINavHistoryQueryOptions.RESULTS_AS_VISIT;
- let root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
-
- compareArrayToResult([gTestData[0], gTestData[1], gTestData[2]], root);
- for (let testData of gTestData) {
- let uri = NetUtil.newURI(testData.uri);
- let node = searchNodeHavingUrl(root, testData.uri);
- do_check_eq(node.title, testData.title);
- yield PlacesTestUtils.addVisits({uri: uri, title: "changedTitle"});
- node = searchNodeHavingUrl(root, testData.uri);
- do_check_eq(node.title, "changedTitle");
- yield PlacesTestUtils.addVisits({uri: uri, title: testData.title});
- node = searchNodeHavingUrl(root, testData.uri);
- do_check_eq(node.title, testData.title);
- }
-
- root.containerOpen = false;
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* pages_searchterm_is_title_query()
-{
- yield task_populateDB(gTestData);
-
- let [query, options] = newQueryWithOptions();
- query.searchTerms = "match";
- let root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
- compareArrayToResult([], root);
- for (let data of gTestData) {
- let uri = NetUtil.newURI(data.uri);
- let origTitle = data.title;
- data.title = "match";
- yield PlacesTestUtils.addVisits({ uri: uri, title: data.title,
- visitDate: data.lastVisit });
- compareArrayToResult([data], root);
- data.title = origTitle;
- yield PlacesTestUtils.addVisits({ uri: uri, title: data.title,
- visitDate: data.lastVisit });
- compareArrayToResult([], root);
- }
-
- root.containerOpen = false;
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* visits_searchterm_is_title_query()
-{
- yield task_populateDB(gTestData);
-
- let [query, options] = newQueryWithOptions();
- query.searchTerms = "match";
- options.resultType = Ci.nsINavHistoryQueryOptions.RESULTS_AS_VISIT;
- let root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
- compareArrayToResult([], root);
- for (let data of gTestData) {
- let uri = NetUtil.newURI(data.uri);
- let origTitle = data.title;
- data.title = "match";
- yield PlacesTestUtils.addVisits({ uri: uri, title: data.title,
- visitDate: data.lastVisit });
- compareArrayToResult([data], root);
- data.title = origTitle;
- yield PlacesTestUtils.addVisits({ uri: uri, title: data.title,
- visitDate: data.lastVisit });
- compareArrayToResult([], root);
- }
-
- root.containerOpen = false;
- yield PlacesTestUtils.clearHistory();
-});
diff --git a/toolkit/components/places/tests/queries/test_onlyBookmarked.js b/toolkit/components/places/tests/queries/test_onlyBookmarked.js
deleted file mode 100644
index 45704c1098..0000000000
--- a/toolkit/components/places/tests/queries/test_onlyBookmarked.js
+++ /dev/null
@@ -1,128 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/**
- * The next thing we do is create a test database for us. Each test runs with
- * its own database (tail_queries.js will clear it after the run). Take a look
- * at the queryData object in head_queries.js, and you'll see how this object
- * works. You can call it anything you like, but I usually use "testData".
- * I'll include a couple of example entries in the database.
- *
- * Note that to use the compareArrayToResult API, you need to put all the
- * results that are in the query set at the top of the testData list, and those
- * results MUST be in the same sort order as the items in the resulting query.
- */
-
-var testData = [
- // Add a bookmark that should be in the results
- { isBookmark: true,
- uri: "http://bookmarked.com/",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- isInQuery: true },
-
- // Add a bookmark that should not be in the results
- { isBookmark: true,
- uri: "http://bookmarked-elsewhere.com/",
- parentGuid: PlacesUtils.bookmarks.menuGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- isInQuery: false },
-
- // Add an un-bookmarked visit
- { isVisit: true,
- uri: "http://notbookmarked.com/",
- isInQuery: false }
-];
-
-
-/**
- * run_test is where the magic happens. This is automatically run by the test
- * harness. It is where you do the work of creating the query, running it, and
- * playing with the result set.
- */
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_onlyBookmarked()
-{
- // This function in head_queries.js creates our database with the above data
- yield task_populateDB(testData);
-
- // Query
- 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;
-
- // Results - this gets the result set and opens it for reading and modification.
- 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.
- do_print("begin first test");
- compareArrayToResult(testData, root);
- do_print("end first test");
-
- // Test live-update
- var liveUpdateTestData = [
- // Add a bookmark that should show up
- { isBookmark: true,
- uri: "http://bookmarked2.com/",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- isInQuery: true },
-
- // Add a bookmark that should not show up
- { isBookmark: true,
- uri: "http://bookmarked-elsewhere2.com/",
- parentGuid: PlacesUtils.bookmarks.menuGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- isInQuery: false }
- ];
-
- yield task_populateDB(liveUpdateTestData); // add to the db
-
- // add to the test data
- testData.push(liveUpdateTestData[0]);
- testData.push(liveUpdateTestData[1]);
-
- // re-query and test
- do_print("begin live-update test");
- compareArrayToResult(testData, root);
- do_print("end live-update test");
-/*
- // we are actually not updating during a batch.
- // see bug 432706 for details.
-
- // Here's a batch update
- var updateBatch = {
- runBatched: function (aUserData) {
- liveUpdateTestData[0].uri = "http://bookmarked3.com";
- liveUpdateTestData[1].uri = "http://bookmarked-elsewhere3.com";
- populateDB(liveUpdateTestData);
- testData.push(liveUpdateTestData[0]);
- testData.push(liveUpdateTestData[1]);
- }
- };
-
- PlacesUtils.history.runInBatchMode(updateBatch, null);
-
- // re-query and test
- do_print("begin batched test");
- compareArrayToResult(testData, root);
- do_print("end batched test");
-*/
- // Close the container when finished
- root.containerOpen = false;
-});
diff --git a/toolkit/components/places/tests/queries/test_queryMultipleFolder.js b/toolkit/components/places/tests/queries/test_queryMultipleFolder.js
deleted file mode 100644
index 694728a437..0000000000
--- a/toolkit/components/places/tests/queries/test_queryMultipleFolder.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* test_queryMultipleFolders() {
- // adding bookmarks in the folders
- let folderIds = [];
- let bookmarkIds = [];
- for (let i = 0; i < 3; ++i) {
- let folder = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.menuGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: `Folder${i}`
- });
- folderIds.push(yield PlacesUtils.promiseItemId(folder.guid));
-
- for (let j = 0; j < 7; ++j) {
- let bm = yield PlacesUtils.bookmarks.insert({
- parentGuid: (yield PlacesUtils.promiseItemGuid(folderIds[i])),
- url: `http://Bookmark${i}_${j}.com`,
- title: ""
- });
- bookmarkIds.push(yield PlacesUtils.promiseItemId(bm.guid));
- }
- }
-
- // using queryStringToQueries
- let query = {};
- let options = {};
- let maxResults = 20;
- let queryString = "place:" + folderIds.map((id) => {
- return "folder=" + id;
- }).join('&') + "&sort=5&maxResults=" + maxResults;
- PlacesUtils.history.queryStringToQueries(queryString, query, {}, options);
- let rootNode = PlacesUtils.history.executeQuery(query.value[0], options.value).root;
- rootNode.containerOpen = true;
- let resultLength = rootNode.childCount;
- Assert.equal(resultLength, maxResults);
- for (let i = 0; i < resultLength; ++i) {
- let node = rootNode.getChild(i);
- Assert.equal(bookmarkIds[i], node.itemId, node.uri);
- }
- rootNode.containerOpen = false;
-
- // using getNewQuery and getNewQueryOptions
- query = PlacesUtils.history.getNewQuery();
- options = PlacesUtils.history.getNewQueryOptions();
- query.setFolders(folderIds, folderIds.length);
- options.sortingMode = options.SORT_BY_URI_ASCENDING;
- options.maxResults = maxResults;
- rootNode = PlacesUtils.history.executeQuery(query, options).root;
- rootNode.containerOpen = true;
- resultLength = rootNode.childCount;
- Assert.equal(resultLength, maxResults);
- for (let i = 0; i < resultLength; ++i) {
- let node = rootNode.getChild(i);
- Assert.equal(bookmarkIds[i], node.itemId, node.uri);
- }
- rootNode.containerOpen = false;
-});
diff --git a/toolkit/components/places/tests/queries/test_querySerialization.js b/toolkit/components/places/tests/queries/test_querySerialization.js
deleted file mode 100644
index 24cf8aa9b6..0000000000
--- a/toolkit/components/places/tests/queries/test_querySerialization.js
+++ /dev/null
@@ -1,797 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/**
- * Tests Places query serialization. Associated bug is
- * https://bugzilla.mozilla.org/show_bug.cgi?id=370197
- *
- * The simple idea behind this test is to try out different combinations of
- * query switches and ensure that queries are the same before serialization
- * as they are after de-serialization.
- *
- * In the code below, "switch" refers to a query option -- "option" in a broad
- * sense, not nsINavHistoryQueryOptions specifically (which is why we refer to
- * them as switches, not options). Both nsINavHistoryQuery and
- * nsINavHistoryQueryOptions allow you to specify switches that affect query
- * strings. nsINavHistoryQuery instances have attributes hasBeginTime,
- * hasEndTime, hasSearchTerms, and so on. nsINavHistoryQueryOptions instances
- * have attributes sortingMode, resultType, excludeItems, etc.
- *
- * Ideally we would like to test all 2^N subsets of switches, where N is the
- * total number of switches; switches might interact in erroneous or other ways
- * we do not expect. However, since N is large (21 at this time), that's
- * impractical for a single test in a suite.
- *
- * Instead we choose all possible subsets of a certain, smaller size. In fact
- * we begin by choosing CHOOSE_HOW_MANY_SWITCHES_LO and ramp up to
- * CHOOSE_HOW_MANY_SWITCHES_HI.
- *
- * There are two more wrinkles. First, for some switches we'd like to be able to
- * test multiple values. For example, it seems like a good idea to test both an
- * empty string and a non-empty string for switch nsINavHistoryQuery.searchTerms.
- * When switches have more than one value for a test run, we use the Cartesian
- * product of their values to generate all possible combinations of values.
- *
- * Second, we need to also test serialization of multiple nsINavHistoryQuery
- * objects at once. To do this, we remember the previous NUM_MULTIPLE_QUERIES
- * queries we tested individually and then serialize them together. We do this
- * each time we test an individual query. Thus the set of queries we test
- * together loses one query and gains another each time.
- *
- * To summarize, here's how this test works:
- *
- * - For n = CHOOSE_HOW_MANY_SWITCHES_LO to CHOOSE_HOW_MANY_SWITCHES_HI:
- * - From the total set of switches choose all possible subsets of size n.
- * For each of those subsets s:
- * - Collect the test runs of each switch in subset s and take their
- * Cartesian product. For each sequence in the product:
- * - Create nsINavHistoryQuery and nsINavHistoryQueryOptions objects
- * with the chosen switches and test run values.
- * - Serialize the query.
- * - De-serialize and ensure that the de-serialized query objects equal
- * the originals.
- * - For each of the previous NUM_MULTIPLE_QUERIES
- * nsINavHistoryQueryOptions objects o we created:
- * - Serialize the previous NUM_MULTIPLE_QUERIES nsINavHistoryQuery
- * objects together with o.
- * - De-serialize and ensure that the de-serialized query objects
- * equal the originals.
- */
-
-const CHOOSE_HOW_MANY_SWITCHES_LO = 1;
-const CHOOSE_HOW_MANY_SWITCHES_HI = 2;
-
-const NUM_MULTIPLE_QUERIES = 2;
-
-// The switches are represented by objects below, in arrays querySwitches and
-// queryOptionSwitches. Use them to set up test runs.
-//
-// Some switches have special properties (where noted), but all switches must
-// have the following properties:
-//
-// matches: A function that takes two nsINavHistoryQuery objects (in the case
-// of nsINavHistoryQuery switches) or two nsINavHistoryQueryOptions
-// objects (for nsINavHistoryQueryOptions switches) and returns true
-// if the values of the switch in the two objects are equal. This is
-// the foundation of how we determine if two queries are equal.
-// runs: An array of functions. Each function takes an nsINavHistoryQuery
-// object and an nsINavHistoryQueryOptions object. The functions
-// should set the attributes of one of the two objects as appropriate
-// to their switches. This is how switch values are set for each test
-// run.
-//
-// The following properties are optional:
-//
-// desc: An informational string to print out during runs when the switch
-// is chosen. Hopefully helpful if the test fails.
-
-// nsINavHistoryQuery switches
-const querySwitches = [
- // hasBeginTime
- {
- // flag and subswitches are used by the flagSwitchMatches function. Several
- // of the nsINavHistoryQuery switches (like this one) are really guard flags
- // that indicate if other "subswitches" are enabled.
- flag: "hasBeginTime",
- subswitches: ["beginTime", "beginTimeReference", "absoluteBeginTime"],
- desc: "nsINavHistoryQuery.hasBeginTime",
- matches: flagSwitchMatches,
- runs: [
- function (aQuery, aQueryOptions) {
- aQuery.beginTime = Date.now() * 1000;
- aQuery.beginTimeReference = Ci.nsINavHistoryQuery.TIME_RELATIVE_EPOCH;
- },
- function (aQuery, aQueryOptions) {
- aQuery.beginTime = Date.now() * 1000;
- aQuery.beginTimeReference = Ci.nsINavHistoryQuery.TIME_RELATIVE_TODAY;
- }
- ]
- },
- // hasEndTime
- {
- flag: "hasEndTime",
- subswitches: ["endTime", "endTimeReference", "absoluteEndTime"],
- desc: "nsINavHistoryQuery.hasEndTime",
- matches: flagSwitchMatches,
- runs: [
- function (aQuery, aQueryOptions) {
- aQuery.endTime = Date.now() * 1000;
- aQuery.endTimeReference = Ci.nsINavHistoryQuery.TIME_RELATIVE_EPOCH;
- },
- function (aQuery, aQueryOptions) {
- aQuery.endTime = Date.now() * 1000;
- aQuery.endTimeReference = Ci.nsINavHistoryQuery.TIME_RELATIVE_TODAY;
- }
- ]
- },
- // hasSearchTerms
- {
- flag: "hasSearchTerms",
- subswitches: ["searchTerms"],
- desc: "nsINavHistoryQuery.hasSearchTerms",
- matches: flagSwitchMatches,
- runs: [
- function (aQuery, aQueryOptions) {
- aQuery.searchTerms = "shrimp and white wine";
- },
- function (aQuery, aQueryOptions) {
- aQuery.searchTerms = "";
- }
- ]
- },
- // hasDomain
- {
- flag: "hasDomain",
- subswitches: ["domain", "domainIsHost"],
- desc: "nsINavHistoryQuery.hasDomain",
- matches: flagSwitchMatches,
- runs: [
- function (aQuery, aQueryOptions) {
- aQuery.domain = "mozilla.com";
- aQuery.domainIsHost = false;
- },
- function (aQuery, aQueryOptions) {
- aQuery.domain = "www.mozilla.com";
- aQuery.domainIsHost = true;
- },
- function (aQuery, aQueryOptions) {
- aQuery.domain = "";
- }
- ]
- },
- // hasUri
- {
- flag: "hasUri",
- subswitches: ["uri"],
- desc: "nsINavHistoryQuery.hasUri",
- matches: flagSwitchMatches,
- runs: [
- function (aQuery, aQueryOptions) {
- aQuery.uri = uri("http://mozilla.com");
- },
- ]
- },
- // hasAnnotation
- {
- flag: "hasAnnotation",
- subswitches: ["annotation", "annotationIsNot"],
- desc: "nsINavHistoryQuery.hasAnnotation",
- matches: flagSwitchMatches,
- runs: [
- function (aQuery, aQueryOptions) {
- aQuery.annotation = "bookmarks/toolbarFolder";
- aQuery.annotationIsNot = false;
- },
- function (aQuery, aQueryOptions) {
- aQuery.annotation = "bookmarks/toolbarFolder";
- aQuery.annotationIsNot = true;
- }
- ]
- },
- // minVisits
- {
- // property is used by function simplePropertyMatches.
- property: "minVisits",
- desc: "nsINavHistoryQuery.minVisits",
- matches: simplePropertyMatches,
- runs: [
- function (aQuery, aQueryOptions) {
- aQuery.minVisits = 0x7fffffff; // 2^31 - 1
- }
- ]
- },
- // maxVisits
- {
- property: "maxVisits",
- desc: "nsINavHistoryQuery.maxVisits",
- matches: simplePropertyMatches,
- runs: [
- function (aQuery, aQueryOptions) {
- aQuery.maxVisits = 0x7fffffff; // 2^31 - 1
- }
- ]
- },
- // onlyBookmarked
- {
- property: "onlyBookmarked",
- desc: "nsINavHistoryQuery.onlyBookmarked",
- matches: simplePropertyMatches,
- runs: [
- function (aQuery, aQueryOptions) {
- aQuery.onlyBookmarked = true;
- }
- ]
- },
- // getFolders
- {
- desc: "nsINavHistoryQuery.getFolders",
- matches: function (aQuery1, aQuery2) {
- var q1Folders = aQuery1.getFolders();
- var q2Folders = aQuery2.getFolders();
- if (q1Folders.length !== q2Folders.length)
- return false;
- for (let i = 0; i < q1Folders.length; i++) {
- if (q2Folders.indexOf(q1Folders[i]) < 0)
- return false;
- }
- for (let i = 0; i < q2Folders.length; i++) {
- if (q1Folders.indexOf(q2Folders[i]) < 0)
- return false;
- }
- return true;
- },
- runs: [
- function (aQuery, aQueryOptions) {
- aQuery.setFolders([], 0);
- },
- function (aQuery, aQueryOptions) {
- aQuery.setFolders([PlacesUtils.placesRootId], 1);
- },
- function (aQuery, aQueryOptions) {
- aQuery.setFolders([PlacesUtils.placesRootId, PlacesUtils.tagsFolderId], 2);
- }
- ]
- },
- // tags
- {
- desc: "nsINavHistoryQuery.getTags",
- matches: function (aQuery1, aQuery2) {
- if (aQuery1.tagsAreNot !== aQuery2.tagsAreNot)
- return false;
- var q1Tags = aQuery1.tags;
- var q2Tags = aQuery2.tags;
- if (q1Tags.length !== q2Tags.length)
- return false;
- for (let i = 0; i < q1Tags.length; i++) {
- if (q2Tags.indexOf(q1Tags[i]) < 0)
- return false;
- }
- for (let i = 0; i < q2Tags.length; i++) {
- if (q1Tags.indexOf(q2Tags[i]) < 0)
- return false;
- }
- return true;
- },
- runs: [
- function (aQuery, aQueryOptions) {
- aQuery.tags = [];
- },
- function (aQuery, aQueryOptions) {
- aQuery.tags = [""];
- },
- function (aQuery, aQueryOptions) {
- aQuery.tags = [
- "foo",
- "七難",
- "",
- "いっぱいおっぱい",
- "Abracadabra",
- "123",
- "Here's a pretty long tag name with some = signs and 1 2 3s and spaces oh jeez will it work I hope so!",
- "アスキーでございません",
- "あいうえお",
- ];
- },
- function (aQuery, aQueryOptions) {
- aQuery.tags = [
- "foo",
- "七難",
- "",
- "いっぱいおっぱい",
- "Abracadabra",
- "123",
- "Here's a pretty long tag name with some = signs and 1 2 3s and spaces oh jeez will it work I hope so!",
- "アスキーでございません",
- "あいうえお",
- ];
- aQuery.tagsAreNot = true;
- }
- ]
- },
- // transitions
- {
- desc: "tests nsINavHistoryQuery.getTransitions",
- matches: function (aQuery1, aQuery2) {
- var q1Trans = aQuery1.getTransitions();
- var q2Trans = aQuery2.getTransitions();
- if (q1Trans.length !== q2Trans.length)
- return false;
- for (let i = 0; i < q1Trans.length; i++) {
- if (q2Trans.indexOf(q1Trans[i]) < 0)
- return false;
- }
- for (let i = 0; i < q2Trans.length; i++) {
- if (q1Trans.indexOf(q2Trans[i]) < 0)
- return false;
- }
- return true;
- },
- runs: [
- function (aQuery, aQueryOptions) {
- aQuery.setTransitions([], 0);
- },
- function (aQuery, aQueryOptions) {
- aQuery.setTransitions([Ci.nsINavHistoryService.TRANSITION_DOWNLOAD],
- 1);
- },
- function (aQuery, aQueryOptions) {
- aQuery.setTransitions([Ci.nsINavHistoryService.TRANSITION_TYPED,
- Ci.nsINavHistoryService.TRANSITION_BOOKMARK], 2);
- }
- ]
- },
-];
-
-// nsINavHistoryQueryOptions switches
-const queryOptionSwitches = [
- // sortingMode
- {
- desc: "nsINavHistoryQueryOptions.sortingMode",
- matches: function (aOptions1, aOptions2) {
- if (aOptions1.sortingMode === aOptions2.sortingMode) {
- switch (aOptions1.sortingMode) {
- case aOptions1.SORT_BY_ANNOTATION_ASCENDING:
- case aOptions1.SORT_BY_ANNOTATION_DESCENDING:
- return aOptions1.sortingAnnotation === aOptions2.sortingAnnotation;
- }
- return true;
- }
- return false;
- },
- runs: [
- function (aQuery, aQueryOptions) {
- aQueryOptions.sortingMode = aQueryOptions.SORT_BY_DATE_ASCENDING;
- },
- function (aQuery, aQueryOptions) {
- aQueryOptions.sortingMode = aQueryOptions.SORT_BY_ANNOTATION_ASCENDING;
- aQueryOptions.sortingAnnotation = "bookmarks/toolbarFolder";
- }
- ]
- },
- // resultType
- {
- // property is used by function simplePropertyMatches.
- property: "resultType",
- desc: "nsINavHistoryQueryOptions.resultType",
- matches: simplePropertyMatches,
- runs: [
- function (aQuery, aQueryOptions) {
- aQueryOptions.resultType = aQueryOptions.RESULTS_AS_URI;
- },
- function (aQuery, aQueryOptions) {
- aQueryOptions.resultType = aQueryOptions.RESULTS_AS_FULL_VISIT;
- }
- ]
- },
- // excludeItems
- {
- property: "excludeItems",
- desc: "nsINavHistoryQueryOptions.excludeItems",
- matches: simplePropertyMatches,
- runs: [
- function (aQuery, aQueryOptions) {
- aQueryOptions.excludeItems = true;
- }
- ]
- },
- // excludeQueries
- {
- property: "excludeQueries",
- desc: "nsINavHistoryQueryOptions.excludeQueries",
- matches: simplePropertyMatches,
- runs: [
- function (aQuery, aQueryOptions) {
- aQueryOptions.excludeQueries = true;
- }
- ]
- },
- // expandQueries
- {
- property: "expandQueries",
- desc: "nsINavHistoryQueryOptions.expandQueries",
- matches: simplePropertyMatches,
- runs: [
- function (aQuery, aQueryOptions) {
- aQueryOptions.expandQueries = true;
- }
- ]
- },
- // includeHidden
- {
- property: "includeHidden",
- desc: "nsINavHistoryQueryOptions.includeHidden",
- matches: simplePropertyMatches,
- runs: [
- function (aQuery, aQueryOptions) {
- aQueryOptions.includeHidden = true;
- }
- ]
- },
- // maxResults
- {
- property: "maxResults",
- desc: "nsINavHistoryQueryOptions.maxResults",
- matches: simplePropertyMatches,
- runs: [
- function (aQuery, aQueryOptions) {
- aQueryOptions.maxResults = 0xffffffff; // 2^32 - 1
- }
- ]
- },
- // queryType
- {
- property: "queryType",
- desc: "nsINavHistoryQueryOptions.queryType",
- matches: simplePropertyMatches,
- runs: [
- function (aQuery, aQueryOptions) {
- aQueryOptions.queryType = aQueryOptions.QUERY_TYPE_HISTORY;
- },
- function (aQuery, aQueryOptions) {
- aQueryOptions.queryType = aQueryOptions.QUERY_TYPE_UNIFIED;
- }
- ]
- },
-];
-
-/**
- * Enumerates all the sequences of the cartesian product of the arrays contained
- * in aSequences. Examples:
- *
- * cartProd([[1, 2, 3], ["a", "b"]], callback);
- * // callback is called 3 * 2 = 6 times with the following arrays:
- * // [1, "a"], [1, "b"], [2, "a"], [2, "b"], [3, "a"], [3, "b"]
- *
- * cartProd([["a"], [1, 2, 3], ["X", "Y"]], callback);
- * // callback is called 1 * 3 * 2 = 6 times with the following arrays:
- * // ["a", 1, "X"], ["a", 1, "Y"], ["a", 2, "X"], ["a", 2, "Y"],
- * // ["a", 3, "X"], ["a", 3, "Y"]
- *
- * cartProd([[1], [2], [3], [4]], callback);
- * // callback is called 1 * 1 * 1 * 1 = 1 time with the following array:
- * // [1, 2, 3, 4]
- *
- * cartProd([], callback);
- * // callback is 0 times
- *
- * cartProd([[1, 2, 3, 4]], callback);
- * // callback is called 4 times with the following arrays:
- * // [1], [2], [3], [4]
- *
- * @param aSequences
- * an array that contains an arbitrary number of arrays
- * @param aCallback
- * a function that is passed each sequence of the product as it's
- * computed
- * @return the total number of sequences in the product
- */
-function cartProd(aSequences, aCallback)
-{
- if (aSequences.length === 0)
- return 0;
-
- // For each sequence in aSequences, we maintain a pointer (an array index,
- // really) to the element we're currently enumerating in that sequence
- var seqEltPtrs = aSequences.map(i => 0);
-
- var numProds = 0;
- var done = false;
- while (!done) {
- numProds++;
-
- // prod = sequence in product we're currently enumerating
- let prod = [];
- for (let i = 0; i < aSequences.length; i++) {
- prod.push(aSequences[i][seqEltPtrs[i]]);
- }
- aCallback(prod);
-
- // The next sequence in the product differs from the current one by just a
- // single element. Determine which element that is. We advance the
- // "rightmost" element pointer to the "right" by one. If we move past the
- // end of that pointer's sequence, reset the pointer to the first element
- // in its sequence and then try the sequence to the "left", and so on.
-
- // seqPtr = index of rightmost input sequence whose element pointer is not
- // past the end of the sequence
- let seqPtr = aSequences.length - 1;
- while (!done) {
- // Advance the rightmost element pointer.
- seqEltPtrs[seqPtr]++;
-
- // The rightmost element pointer is past the end of its sequence.
- if (seqEltPtrs[seqPtr] >= aSequences[seqPtr].length) {
- seqEltPtrs[seqPtr] = 0;
- seqPtr--;
-
- // All element pointers are past the ends of their sequences.
- if (seqPtr < 0)
- done = true;
- }
- else break;
- }
- }
- return numProds;
-}
-
-/**
- * Enumerates all the subsets in aSet of size aHowMany. There are
- * C(aSet.length, aHowMany) such subsets. aCallback will be passed each subset
- * as it is generated. Note that aSet and the subsets enumerated are -- even
- * though they're arrays -- not sequences; the ordering of their elements is not
- * important. Example:
- *
- * choose([1, 2, 3, 4], 2, callback);
- * // callback is called C(4, 2) = 6 times with the following sets (arrays):
- * // [1, 2], [1, 3], [1, 4], [2, 3], [2, 4], [3, 4]
- *
- * @param aSet
- * an array from which to choose elements, aSet.length > 0
- * @param aHowMany
- * the number of elements to choose, > 0 and <= aSet.length
- * @return the total number of sets chosen
- */
-function choose(aSet, aHowMany, aCallback)
-{
- // ptrs = indices of the elements in aSet we're currently choosing
- var ptrs = [];
- for (let i = 0; i < aHowMany; i++) {
- ptrs.push(i);
- }
-
- var numFound = 0;
- var done = false;
- while (!done) {
- numFound++;
- aCallback(ptrs.map(p => aSet[p]));
-
- // The next subset to be chosen differs from the current one by just a
- // single element. Determine which element that is. Advance the "rightmost"
- // pointer to the "right" by one. If we move past the end of set, move the
- // next non-adjacent rightmost pointer to the right by one, and reset all
- // succeeding pointers so that they're adjacent to it. When all pointers
- // are clustered all the way to the right, we're done.
-
- // Advance the rightmost pointer.
- ptrs[ptrs.length - 1]++;
-
- // The rightmost pointer has gone past the end of set.
- if (ptrs[ptrs.length - 1] >= aSet.length) {
- // Find the next rightmost pointer that is not adjacent to the current one.
- let si = aSet.length - 2; // aSet index
- let pi = ptrs.length - 2; // ptrs index
- while (pi >= 0 && ptrs[pi] === si) {
- pi--;
- si--;
- }
-
- // All pointers are adjacent and clustered all the way to the right.
- if (pi < 0)
- done = true;
- else {
- // pi = index of rightmost pointer with a gap between it and its
- // succeeding pointer. Move it right and reset all succeeding pointers
- // so that they're adjacent to it.
- ptrs[pi]++;
- for (let i = 0; i < ptrs.length - pi - 1; i++) {
- ptrs[i + pi + 1] = ptrs[pi] + i + 1;
- }
- }
- }
- }
- return numFound;
-}
-
-/**
- * Convenience function for nsINavHistoryQuery switches that act as flags. This
- * is attached to switch objects. See querySwitches array above.
- *
- * @param aQuery1
- * an nsINavHistoryQuery object
- * @param aQuery2
- * another nsINavHistoryQuery object
- * @return true if this switch is the same in both aQuery1 and aQuery2
- */
-function flagSwitchMatches(aQuery1, aQuery2)
-{
- if (aQuery1[this.flag] && aQuery2[this.flag]) {
- for (let p in this.subswitches) {
- if (p in aQuery1 && p in aQuery2) {
- if (aQuery1[p] instanceof Ci.nsIURI) {
- if (!aQuery1[p].equals(aQuery2[p]))
- return false;
- }
- else if (aQuery1[p] !== aQuery2[p])
- return false;
- }
- }
- }
- else if (aQuery1[this.flag] || aQuery2[this.flag])
- return false;
-
- return true;
-}
-
-/**
- * Tests if aObj1 and aObj2 are equal. This function is general and may be used
- * for either nsINavHistoryQuery or nsINavHistoryQueryOptions objects. aSwitches
- * determines which set of switches is used for comparison. Pass in either
- * querySwitches or queryOptionSwitches.
- *
- * @param aSwitches
- * determines which set of switches applies to aObj1 and aObj2, either
- * querySwitches or queryOptionSwitches
- * @param aObj1
- * an nsINavHistoryQuery or nsINavHistoryQueryOptions object
- * @param aObj2
- * another nsINavHistoryQuery or nsINavHistoryQueryOptions object
- * @return true if aObj1 and aObj2 are equal
- */
-function queryObjsEqual(aSwitches, aObj1, aObj2)
-{
- for (let i = 0; i < aSwitches.length; i++) {
- if (!aSwitches[i].matches(aObj1, aObj2))
- return false;
- }
- return true;
-}
-
-/**
- * This drives the test runs. See the comment at the top of this file.
- *
- * @param aHowManyLo
- * the size of the switch subsets to start with
- * @param aHowManyHi
- * the size of the switch subsets to end with (inclusive)
- */
-function runQuerySequences(aHowManyLo, aHowManyHi)
-{
- var allSwitches = querySwitches.concat(queryOptionSwitches);
- var prevQueries = [];
- var prevOpts = [];
-
- // Choose aHowManyLo switches up to aHowManyHi switches.
- for (let howMany = aHowManyLo; howMany <= aHowManyHi; howMany++) {
- let numIters = 0;
- print("CHOOSING " + howMany + " SWITCHES");
-
- // Choose all subsets of size howMany from allSwitches.
- choose(allSwitches, howMany, function (chosenSwitches) {
- print(numIters);
- numIters++;
-
- // Collect the runs.
- // runs = [ [runs from switch 1], ..., [runs from switch howMany] ]
- var runs = chosenSwitches.map(function (s) {
- if (s.desc)
- print(" " + s.desc);
- return s.runs;
- });
-
- // cartProd(runs) => [
- // [switch 1 run 1, switch 2 run 1, ..., switch howMany run 1 ],
- // ...,
- // [switch 1 run 1, switch 2 run 1, ..., switch howMany run N ],
- // ..., ...,
- // [switch 1 run N, switch 2 run N, ..., switch howMany run 1 ],
- // ...,
- // [switch 1 run N, switch 2 run N, ..., switch howMany run N ],
- // ]
- cartProd(runs, function (runSet) {
- // Create a new query, apply the switches in runSet, and test it.
- var query = PlacesUtils.history.getNewQuery();
- var opts = PlacesUtils.history.getNewQueryOptions();
- for (let i = 0; i < runSet.length; i++) {
- runSet[i](query, opts);
- }
- serializeDeserialize([query], opts);
-
- // Test the previous NUM_MULTIPLE_QUERIES queries together.
- prevQueries.push(query);
- prevOpts.push(opts);
- if (prevQueries.length >= NUM_MULTIPLE_QUERIES) {
- // We can serialize multiple nsINavHistoryQuery objects together but
- // only one nsINavHistoryQueryOptions object with them. So, test each
- // of the previous NUM_MULTIPLE_QUERIES nsINavHistoryQueryOptions.
- for (let i = 0; i < prevOpts.length; i++) {
- serializeDeserialize(prevQueries, prevOpts[i]);
- }
- prevQueries.shift();
- prevOpts.shift();
- }
- });
- });
- }
- print("\n");
-}
-
-/**
- * Serializes the nsINavHistoryQuery objects in aQueryArr and the
- * nsINavHistoryQueryOptions object aQueryOptions, de-serializes the
- * serialization, and ensures (using do_check_* functions) that the
- * de-serialized objects equal the originals.
- *
- * @param aQueryArr
- * an array containing nsINavHistoryQuery objects
- * @param aQueryOptions
- * an nsINavHistoryQueryOptions object
- */
-function serializeDeserialize(aQueryArr, aQueryOptions)
-{
- var queryStr = PlacesUtils.history.queriesToQueryString(aQueryArr,
- aQueryArr.length,
- aQueryOptions);
- print(" " + queryStr);
- var queryArr2 = {};
- var opts2 = {};
- PlacesUtils.history.queryStringToQueries(queryStr, queryArr2, {}, opts2);
- queryArr2 = queryArr2.value;
- opts2 = opts2.value;
-
- // The two sets of queries cannot be the same if their lengths differ.
- do_check_eq(aQueryArr.length, queryArr2.length);
-
- // Although the query serialization code as it is written now practically
- // ensures that queries appear in the query string in the same order they
- // appear in both the array to be serialized and the array resulting from
- // de-serialization, the interface does not guarantee any ordering. So, for
- // each query in aQueryArr, find its equivalent in queryArr2 and delete it
- // from queryArr2. If queryArr2 is empty after looping through aQueryArr,
- // the two sets of queries are equal.
- for (let i = 0; i < aQueryArr.length; i++) {
- let j = 0;
- for (; j < queryArr2.length; j++) {
- if (queryObjsEqual(querySwitches, aQueryArr[i], queryArr2[j]))
- break;
- }
- if (j < queryArr2.length)
- queryArr2.splice(j, 1);
- }
- do_check_eq(queryArr2.length, 0);
-
- // Finally check the query options objects.
- do_check_true(queryObjsEqual(queryOptionSwitches, aQueryOptions, opts2));
-}
-
-/**
- * Convenience function for switches that have simple values. This is attached
- * to switch objects. See querySwitches and queryOptionSwitches arrays above.
- *
- * @param aObj1
- * an nsINavHistoryQuery or nsINavHistoryQueryOptions object
- * @param aObj2
- * another nsINavHistoryQuery or nsINavHistoryQueryOptions object
- * @return true if this switch is the same in both aObj1 and aObj2
- */
-function simplePropertyMatches(aObj1, aObj2)
-{
- return aObj1[this.property] === aObj2[this.property];
-}
-
-function run_test()
-{
- runQuerySequences(CHOOSE_HOW_MANY_SWITCHES_LO, CHOOSE_HOW_MANY_SWITCHES_HI);
-}
diff --git a/toolkit/components/places/tests/queries/test_redirects.js b/toolkit/components/places/tests/queries/test_redirects.js
deleted file mode 100644
index 1be5a626fe..0000000000
--- a/toolkit/components/places/tests/queries/test_redirects.js
+++ /dev/null
@@ -1,311 +0,0 @@
-/* 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/. */
-
-// Array of visits we will add to the database, will be populated later
-// in the test.
-var visits = [];
-
-/**
- * Takes a sequence of query options, and compare query results obtained through
- * them with a custom filtered array of visits, based on the values we are
- * expecting from the query.
- *
- * @param aSequence
- * an array that contains query options in the form:
- * [includeHidden, maxResults, sortingMode]
- */
-function check_results_callback(aSequence) {
- // Sanity check: we should receive 3 parameters.
- do_check_eq(aSequence.length, 3);
- let includeHidden = aSequence[0];
- let maxResults = aSequence[1];
- let sortingMode = aSequence[2];
- print("\nTESTING: includeHidden(" + includeHidden + ")," +
- " maxResults(" + maxResults + ")," +
- " sortingMode(" + sortingMode + ").");
-
- function isHidden(aVisit) {
- return aVisit.transType == Ci.nsINavHistoryService.TRANSITION_FRAMED_LINK ||
- aVisit.isRedirect;
- }
-
- // Build expectedData array.
- let expectedData = visits.filter(function (aVisit, aIndex, aArray) {
- // Embed visits never appear in results.
- if (aVisit.transType == Ci.nsINavHistoryService.TRANSITION_EMBED)
- return false;
-
- if (!includeHidden && isHidden(aVisit)) {
- // If the page has any non-hidden visit, then it's visible.
- if (visits.filter(function (refVisit) {
- return refVisit.uri == aVisit.uri && !isHidden(refVisit);
- }).length == 0)
- return false;
- }
-
- return true;
- });
-
- // Remove duplicates, since queries are RESULTS_AS_URI (unique pages).
- let seen = [];
- expectedData = expectedData.filter(function (aData) {
- if (seen.includes(aData.uri)) {
- return false;
- }
- seen.push(aData.uri);
- return true;
- });
-
- // Sort expectedData.
- function getFirstIndexFor(aEntry) {
- for (let i = 0; i < visits.length; i++) {
- if (visits[i].uri == aEntry.uri)
- return i;
- }
- return undefined;
- }
- function comparator(a, b) {
- if (sortingMode == Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING) {
- return b.lastVisit - a.lastVisit;
- }
- if (sortingMode == Ci.nsINavHistoryQueryOptions.SORT_BY_VISITCOUNT_DESCENDING) {
- return b.visitCount - a.visitCount;
- }
- return getFirstIndexFor(a) - getFirstIndexFor(b);
- }
- expectedData.sort(comparator);
-
- // Crop results to maxResults if it's defined.
- if (maxResults) {
- expectedData = expectedData.slice(0, maxResults);
- }
-
- // Create a new query with required options.
- let query = PlacesUtils.history.getNewQuery();
- let options = PlacesUtils.history.getNewQueryOptions();
- options.includeHidden = includeHidden;
- options.sortingMode = sortingMode;
- if (maxResults)
- options.maxResults = maxResults;
-
- // Compare resultset with expectedData.
- let result = PlacesUtils.history.executeQuery(query, options);
- let root = result.root;
- root.containerOpen = true;
- compareArrayToResult(expectedData, root);
- root.containerOpen = false;
-}
-
-/**
- * Enumerates all the sequences of the cartesian product of the arrays contained
- * in aSequences. Examples:
- *
- * cartProd([[1, 2, 3], ["a", "b"]], callback);
- * // callback is called 3 * 2 = 6 times with the following arrays:
- * // [1, "a"], [1, "b"], [2, "a"], [2, "b"], [3, "a"], [3, "b"]
- *
- * cartProd([["a"], [1, 2, 3], ["X", "Y"]], callback);
- * // callback is called 1 * 3 * 2 = 6 times with the following arrays:
- * // ["a", 1, "X"], ["a", 1, "Y"], ["a", 2, "X"], ["a", 2, "Y"],
- * // ["a", 3, "X"], ["a", 3, "Y"]
- *
- * cartProd([[1], [2], [3], [4]], callback);
- * // callback is called 1 * 1 * 1 * 1 = 1 time with the following array:
- * // [1, 2, 3, 4]
- *
- * cartProd([], callback);
- * // callback is 0 times
- *
- * cartProd([[1, 2, 3, 4]], callback);
- * // callback is called 4 times with the following arrays:
- * // [1], [2], [3], [4]
- *
- * @param aSequences
- * an array that contains an arbitrary number of arrays
- * @param aCallback
- * a function that is passed each sequence of the product as it's
- * computed
- * @return the total number of sequences in the product
- */
-function cartProd(aSequences, aCallback)
-{
- if (aSequences.length === 0)
- return 0;
-
- // For each sequence in aSequences, we maintain a pointer (an array index,
- // really) to the element we're currently enumerating in that sequence
- let seqEltPtrs = aSequences.map(i => 0);
-
- let numProds = 0;
- let done = false;
- while (!done) {
- numProds++;
-
- // prod = sequence in product we're currently enumerating
- let prod = [];
- for (let i = 0; i < aSequences.length; i++) {
- prod.push(aSequences[i][seqEltPtrs[i]]);
- }
- aCallback(prod);
-
- // The next sequence in the product differs from the current one by just a
- // single element. Determine which element that is. We advance the
- // "rightmost" element pointer to the "right" by one. If we move past the
- // end of that pointer's sequence, reset the pointer to the first element
- // in its sequence and then try the sequence to the "left", and so on.
-
- // seqPtr = index of rightmost input sequence whose element pointer is not
- // past the end of the sequence
- let seqPtr = aSequences.length - 1;
- while (!done) {
- // Advance the rightmost element pointer.
- seqEltPtrs[seqPtr]++;
-
- // The rightmost element pointer is past the end of its sequence.
- if (seqEltPtrs[seqPtr] >= aSequences[seqPtr].length) {
- seqEltPtrs[seqPtr] = 0;
- seqPtr--;
-
- // All element pointers are past the ends of their sequences.
- if (seqPtr < 0)
- done = true;
- }
- else break;
- }
- }
- return numProds;
-}
-
-function run_test()
-{
- run_next_test();
-}
-
-/**
- * Populate the visits array and add visits to the database.
- * We will generate visit-chains like:
- * visit -> redirect_temp -> redirect_perm
- */
-add_task(function* test_add_visits_to_database()
-{
- yield PlacesUtils.bookmarks.eraseEverything();
-
- // We don't really bother on this, but we need a time to add visits.
- let timeInMicroseconds = Date.now() * 1000;
- let visitCount = 1;
-
- // Array of all possible transition types we could be redirected from.
- let t = [
- Ci.nsINavHistoryService.TRANSITION_LINK,
- Ci.nsINavHistoryService.TRANSITION_TYPED,
- Ci.nsINavHistoryService.TRANSITION_BOOKMARK,
- // Embed visits are not added to the database and we don't want redirects
- // to them, thus just avoid addition.
- // Ci.nsINavHistoryService.TRANSITION_EMBED,
- Ci.nsINavHistoryService.TRANSITION_FRAMED_LINK,
- // Would make hard sorting by visit date because last_visit_date is actually
- // calculated excluding download transitions, but the query includes
- // downloads.
- // TODO: Bug 488966 could fix this behavior.
- //Ci.nsINavHistoryService.TRANSITION_DOWNLOAD,
- ];
-
- function newTimeInMicroseconds() {
- timeInMicroseconds = timeInMicroseconds - 1000;
- return timeInMicroseconds;
- }
-
- // we add a visit for each of the above transition types.
- t.forEach(transition => visits.push(
- { isVisit: true,
- transType: transition,
- uri: "http://" + transition + ".example.com/",
- title: transition + "-example",
- isRedirect: true,
- lastVisit: newTimeInMicroseconds(),
- visitCount: (transition == Ci.nsINavHistoryService.TRANSITION_EMBED ||
- transition == Ci.nsINavHistoryService.TRANSITION_FRAMED_LINK) ? 0 : visitCount++,
- isInQuery: true }));
-
- // Add a REDIRECT_TEMPORARY layer of visits for each of the above visits.
- t.forEach(transition => visits.push(
- { isVisit: true,
- transType: Ci.nsINavHistoryService.TRANSITION_REDIRECT_TEMPORARY,
- uri: "http://" + transition + ".redirect.temp.example.com/",
- title: transition + "-redirect-temp-example",
- lastVisit: newTimeInMicroseconds(),
- isRedirect: true,
- referrer: "http://" + transition + ".example.com/",
- visitCount: visitCount++,
- isInQuery: true }));
-
- // Add a REDIRECT_PERMANENT layer of visits for each of the above redirects.
- t.forEach(transition => visits.push(
- { isVisit: true,
- transType: Ci.nsINavHistoryService.TRANSITION_REDIRECT_PERMANENT,
- uri: "http://" + transition + ".redirect.perm.example.com/",
- title: transition + "-redirect-perm-example",
- lastVisit: newTimeInMicroseconds(),
- isRedirect: true,
- referrer: "http://" + transition + ".redirect.temp.example.com/",
- visitCount: visitCount++,
- isInQuery: true }));
-
- // Add a REDIRECT_PERMANENT layer of visits that loop to the first visit.
- // These entries should not change visitCount or lastVisit, otherwise
- // guessing an order would be a nightmare.
- function getLastValue(aURI, aProperty) {
- for (let i = 0; i < visits.length; i++) {
- if (visits[i].uri == aURI) {
- return visits[i][aProperty];
- }
- }
- do_throw("Unknown uri.");
- return null;
- }
- t.forEach(transition => visits.push(
- { isVisit: true,
- transType: Ci.nsINavHistoryService.TRANSITION_REDIRECT_PERMANENT,
- uri: "http://" + transition + ".example.com/",
- title: getLastValue("http://" + transition + ".example.com/", "title"),
- lastVisit: getLastValue("http://" + transition + ".example.com/", "lastVisit"),
- isRedirect: true,
- referrer: "http://" + transition + ".redirect.perm.example.com/",
- visitCount: getLastValue("http://" + transition + ".example.com/", "visitCount"),
- isInQuery: true }));
-
- // Add an unvisited bookmark in the database, it should never appear.
- visits.push({ isBookmark: true,
- uri: "http://unvisited.bookmark.com/",
- parentGuid: PlacesUtils.bookmarks.menuGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "Unvisited Bookmark",
- isInQuery: false });
-
- // Put visits in the database.
- yield task_populateDB(visits);
-});
-
-add_task(function* test_redirects()
-{
- // Frecency and hidden are updated asynchronously, wait for them.
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- // This array will be used by cartProd to generate a matrix of all possible
- // combinations.
- let includeHidden_options = [true, false];
- let maxResults_options = [5, 10, 20, null];
- // These sortingMode are choosen to toggle using special queries for history
- // menu and most visited smart bookmark.
- let sorting_options = [Ci.nsINavHistoryQueryOptions.SORT_BY_NONE,
- Ci.nsINavHistoryQueryOptions.SORT_BY_VISITCOUNT_DESCENDING,
- Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING];
- // Will execute check_results_callback() for each generated combination.
- cartProd([includeHidden_options, maxResults_options, sorting_options],
- check_results_callback);
-
- yield PlacesUtils.bookmarks.eraseEverything();
-
- yield PlacesTestUtils.clearHistory();
-});
diff --git a/toolkit/components/places/tests/queries/test_results-as-tag-contents-query.js b/toolkit/components/places/tests/queries/test_results-as-tag-contents-query.js
deleted file mode 100644
index f1cbfd4d82..0000000000
--- a/toolkit/components/places/tests/queries/test_results-as-tag-contents-query.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var testData = [
- { isInQuery: true,
- isDetails: true,
- title: "bmoz",
- uri: "http://foo.com/",
- isBookmark: true,
- isTag: true,
- tagArray: ["bugzilla"] },
-
- { isInQuery: true,
- isDetails: true,
- title: "C Moz",
- uri: "http://foo.com/changeme1.html",
- isBookmark: true,
- isTag: true,
- tagArray: ["moz", "bugzilla"] },
-
- { isInQuery: false,
- isDetails: true,
- title: "amo",
- uri: "http://foo2.com/",
- isBookmark: true,
- isTag: true,
- tagArray: ["moz"] },
-
- { isInQuery: false,
- isDetails: true,
- title: "amo",
- uri: "http://foo.com/changeme2.html",
- isBookmark: true },
-];
-
-function getIdForTag(aTagName) {
- var id = -1;
- var query = PlacesUtils.history.getNewQuery();
- query.setFolders([PlacesUtils.tagsFolderId], 1);
- var options = PlacesUtils.history.getNewQueryOptions();
- var root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
- var cc = root.childCount;
- do_check_eq(root.childCount, 2);
- for (let i = 0; i < cc; i++) {
- let node = root.getChild(i);
- if (node.title == aTagName) {
- id = node.itemId;
- break;
- }
- }
- root.containerOpen = false;
- return id;
-}
-
- /**
- * This test will test Queries that use relative search terms and URI options
- */
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_results_as_tag_contents_query()
-{
- yield task_populateDB(testData);
-
- // Get tag id.
- let tagId = getIdForTag("bugzilla");
- do_check_true(tagId > 0);
-
- var options = PlacesUtils.history.getNewQueryOptions();
- options.resultType = options.RESULTS_AS_TAG_CONTENTS;
- var query = PlacesUtils.history.getNewQuery();
- query.setFolders([tagId], 1);
-
- var root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
-
- displayResultSet(root);
- // Cannot use compare array to results, since results ordering is hardcoded
- // and depending on lastModified (that could have VM timers issues).
- testData.forEach(function(aEntry) {
- if (aEntry.isInResult)
- do_check_true(isInResult({uri: "http://foo.com/added.html"}, root));
- });
-
- // If that passes, check liveupdate
- // Add to the query set
- var change1 = { isVisit: true,
- isDetails: true,
- uri: "http://foo.com/added.html",
- title: "mozadded",
- isBookmark: true,
- isTag: true,
- tagArray: ["moz", "bugzilla"] };
- do_print("Adding item to query");
- yield task_populateDB([change1]);
- do_print("These results should have been LIVE UPDATED with the new addition");
- displayResultSet(root);
- do_check_true(isInResult(change1, root));
-
- // Add one by adding a tag, remove one by removing search term.
- do_print("Updating items");
- var change2 = [{ isDetails: true,
- uri: "http://foo3.com/",
- title: "foo"},
- { isDetails: true,
- uri: "http://foo.com/changeme2.html",
- title: "zydeco",
- isBookmark:true,
- isTag: true,
- tagArray: ["bugzilla", "moz"] }];
- yield task_populateDB(change2);
- do_check_false(isInResult({uri: "http://fooz.com/"}, root));
- do_check_true(isInResult({uri: "http://foo.com/changeme2.html"}, root));
-
- // Test removing a tag updates us.
- do_print("Deleting item");
- PlacesUtils.tagging.untagURI(uri("http://foo.com/changeme2.html"), ["bugzilla"]);
- do_check_false(isInResult({uri: "http://foo.com/changeme2.html"}, root));
-
- root.containerOpen = false;
-});
diff --git a/toolkit/components/places/tests/queries/test_results-as-visit.js b/toolkit/components/places/tests/queries/test_results-as-visit.js
deleted file mode 100644
index d0f270bd20..0000000000
--- a/toolkit/components/places/tests/queries/test_results-as-visit.js
+++ /dev/null
@@ -1,119 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-var testData = [];
-var timeInMicroseconds = PlacesUtils.toPRTime(Date.now() - 10000);
-
-function newTimeInMicroseconds() {
- timeInMicroseconds = timeInMicroseconds + 1000;
- return timeInMicroseconds;
-}
-
-function createTestData() {
- function generateVisits(aPage) {
- for (var i = 0; i < aPage.visitCount; i++) {
- testData.push({ isInQuery: aPage.inQuery,
- isVisit: true,
- title: aPage.title,
- uri: aPage.uri,
- lastVisit: newTimeInMicroseconds(),
- isTag: aPage.tags && aPage.tags.length > 0,
- tagArray: aPage.tags });
- }
- }
-
- var pages = [
- { uri: "http://foo.com/", title: "amo", tags: ["moz"], visitCount: 3, inQuery: true },
- { uri: "http://moilla.com/", title: "bMoz", tags: ["bugzilla"], visitCount: 5, inQuery: true },
- { uri: "http://foo.mail.com/changeme1.html", title: "c Moz", visitCount: 7, inQuery: true },
- { uri: "http://foo.mail.com/changeme2.html", tags: ["moz"], title: "", visitCount: 1, inQuery: false },
- { uri: "http://foo.mail.com/changeme3.html", title: "zydeco", visitCount: 5, inQuery: false },
- ];
- pages.forEach(generateVisits);
-}
-
-/**
- * This test will test Queries that use relative search terms and URI options
- */
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_results_as_visit()
-{
- createTestData();
- yield task_populateDB(testData);
- var query = PlacesUtils.history.getNewQuery();
- query.searchTerms = "moz";
- query.minVisits = 2;
-
- // Options
- var options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = options.SORT_BY_VISITCOUNT_ASCENDING;
- options.resultType = options.RESULTS_AS_VISIT;
-
- // Results
- var result = PlacesUtils.history.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
-
- do_print("Number of items in result set: " + root.childCount);
- for (let i=0; i < root.childCount; ++i) {
- do_print("result: " + root.getChild(i).uri + " Title: " + root.getChild(i).title);
- }
-
- // Check our inital result set
- compareArrayToResult(testData, root);
-
- // If that passes, check liveupdate
- // Add to the query set
- do_print("Adding item to query")
- var tmp = [];
- for (let i=0; i < 2; i++) {
- tmp.push({ isVisit: true,
- uri: "http://foo.com/added.html",
- title: "ab moz" });
- }
- yield task_populateDB(tmp);
- for (let i=0; i < 2; i++)
- do_check_eq(root.getChild(i).title, "ab moz");
-
- // Update an existing URI
- do_print("Updating Item");
- var change2 = [{ isVisit: true,
- title: "moz",
- uri: "http://foo.mail.com/changeme2.html" }];
- yield task_populateDB(change2);
- do_check_true(isInResult(change2, root));
-
- // Update some visits - add one and take one out of query set, and simply
- // change one so that it still applies to the query.
- do_print("Updating More Items");
- var change3 = [{ isVisit: true,
- lastVisit: newTimeInMicroseconds(),
- uri: "http://foo.mail.com/changeme1.html",
- title: "foo"},
- { isVisit: true,
- lastVisit: newTimeInMicroseconds(),
- uri: "http://foo.mail.com/changeme3.html",
- title: "moz",
- isTag: true,
- tagArray: ["foo", "moz"] }];
- yield task_populateDB(change3);
- do_check_false(isInResult({uri: "http://foo.mail.com/changeme1.html"}, root));
- do_check_true(isInResult({uri: "http://foo.mail.com/changeme3.html"}, root));
-
- // And now, delete one
- do_print("Delete item outside of batch");
- var change4 = [{ isVisit: true,
- lastVisit: newTimeInMicroseconds(),
- uri: "http://moilla.com/",
- title: "mo,z" }];
- yield task_populateDB(change4);
- do_check_false(isInResult(change4, root));
-
- root.containerOpen = false;
-});
diff --git a/toolkit/components/places/tests/queries/test_searchTerms_includeHidden.js b/toolkit/components/places/tests/queries/test_searchTerms_includeHidden.js
deleted file mode 100644
index 038367c0ba..0000000000
--- a/toolkit/components/places/tests/queries/test_searchTerms_includeHidden.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-// Tests the interaction of includeHidden and searchTerms search options.
-
-var timeInMicroseconds = Date.now() * 1000;
-
-const VISITS = [
- { isVisit: true,
- transType: TRANSITION_TYPED,
- uri: "http://redirect.example.com/",
- title: "example",
- isRedirect: true,
- lastVisit: timeInMicroseconds--
- },
- { isVisit: true,
- transType: TRANSITION_TYPED,
- uri: "http://target.example.com/",
- title: "example",
- lastVisit: timeInMicroseconds--
- }
-];
-
-const HIDDEN_VISITS = [
- { isVisit: true,
- transType: TRANSITION_FRAMED_LINK,
- uri: "http://hidden.example.com/",
- title: "red",
- lastVisit: timeInMicroseconds--
- },
-];
-
-const TEST_DATA = [
- { searchTerms: "example",
- includeHidden: true,
- expectedResults: 2
- },
- { searchTerms: "example",
- includeHidden: false,
- expectedResults: 1
- },
- { searchTerms: "red",
- includeHidden: true,
- expectedResults: 1
- }
-];
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_initalize()
-{
- yield task_populateDB(VISITS);
-});
-
-add_task(function* test_searchTerms_includeHidden()
-{
- for (let data of TEST_DATA) {
- let query = PlacesUtils.history.getNewQuery();
- query.searchTerms = data.searchTerms;
- let options = PlacesUtils.history.getNewQueryOptions();
- options.includeHidden = data.includeHidden;
-
- let root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
-
- let cc = root.childCount;
- // Live update with hidden visits.
- yield task_populateDB(HIDDEN_VISITS);
- let cc_update = root.childCount;
-
- root.containerOpen = false;
-
- do_check_eq(cc, data.expectedResults);
- do_check_eq(cc_update, data.expectedResults + (data.includeHidden ? 1 : 0));
-
- PlacesUtils.bhistory.removePage(uri("http://hidden.example.com/"));
- }
-});
diff --git a/toolkit/components/places/tests/queries/test_searchterms-bookmarklets.js b/toolkit/components/places/tests/queries/test_searchterms-bookmarklets.js
deleted file mode 100644
index 7bd91f057b..0000000000
--- a/toolkit/components/places/tests/queries/test_searchterms-bookmarklets.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Check that bookmarklets are returned by searches with searchTerms.
-
-var testData = [
- { isInQuery: true
- , isBookmark: true
- , title: "bookmark 1"
- , uri: "http://mozilla.org/script/"
- },
-
- { isInQuery: true
- , isBookmark: true
- , title: "bookmark 2"
- , uri: "javascript:alert('moz');"
- }
-];
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_initalize()
-{
- yield task_populateDB(testData);
-});
-
-add_test(function test_search_by_title()
-{
- let query = PlacesUtils.history.getNewQuery();
- query.searchTerms = "bookmark";
- let options = PlacesUtils.history.getNewQueryOptions();
- options.queryType = options.QUERY_TYPE_BOOKMARKS;
- let root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
- compareArrayToResult(testData, root);
- root.containerOpen = false;
-
- run_next_test();
-});
-
-add_test(function test_search_by_schemeToken()
-{
- let query = PlacesUtils.history.getNewQuery();
- query.searchTerms = "script";
- let options = PlacesUtils.history.getNewQueryOptions();
- options.queryType = options.QUERY_TYPE_BOOKMARKS;
- let root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
- compareArrayToResult(testData, root);
- root.containerOpen = false;
-
- run_next_test();
-});
-
-add_test(function test_search_by_uriAndTitle()
-{
- let query = PlacesUtils.history.getNewQuery();
- query.searchTerms = "moz";
- let options = PlacesUtils.history.getNewQueryOptions();
- options.queryType = options.QUERY_TYPE_BOOKMARKS;
- let root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
- compareArrayToResult(testData, root);
- root.containerOpen = false;
-
- run_next_test();
-});
diff --git a/toolkit/components/places/tests/queries/test_searchterms-domain.js b/toolkit/components/places/tests/queries/test_searchterms-domain.js
deleted file mode 100644
index 4f42e70005..0000000000
--- a/toolkit/components/places/tests/queries/test_searchterms-domain.js
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
- // The test data for our database, note that the ordering of the results that
- // will be returned by the query (the isInQuery: true objects) is IMPORTANT.
- // see compareArrayToResult in head_queries.js for more info.
- var testData = [
- // Test ftp protocol - vary the title length, embed search term
- {isInQuery: true, isVisit: true, isDetails: true,
- uri: "ftp://foo.com/ftp", lastVisit: lastweek,
- title: "hugelongconfmozlagurationofwordswithasearchtermsinit whoo-hoo"},
-
- // Test flat domain with annotation, search term in sentence
- {isInQuery: true, isVisit: true, isDetails: true, isPageAnnotation: true,
- uri: "http://foo.com/", annoName: "moz/test", annoVal: "val",
- lastVisit: lastweek, title: "you know, moz is cool"},
-
- // Test subdomain included with isRedirect=true, different transtype
- {isInQuery: true, isVisit: true, isDetails: true, title: "amozzie",
- isRedirect: true, uri: "http://mail.foo.com/redirect", lastVisit: old,
- referrer: "http://myreferrer.com", transType: PlacesUtils.history.TRANSITION_LINK},
-
- // Test subdomain inclued, search term at end
- {isInQuery: true, isVisit: true, isDetails: true,
- uri: "http://mail.foo.com/yiihah", title: "blahmoz", lastVisit: daybefore},
-
- // Test www. style URI is included, with a tag
- {isInQuery: true, isVisit: true, isDetails: true, isTag: true,
- uri: "http://www.foo.com/yiihah", tagArray: ["moz"],
- lastVisit: yesterday, title: "foo"},
-
- // Test https protocol
- {isInQuery: true, isVisit: true, isDetails: true, title: "moz",
- uri: "https://foo.com/", lastVisit: today},
-
- // Begin the invalid queries: wrong search term
- {isInQuery: false, isVisit:true, isDetails: true, title: "m o z",
- uri: "http://foo.com/tooearly.php", lastVisit: today},
-
- // Test bad URI
- {isInQuery: false, isVisit:true, isDetails: true, title: "moz",
- uri: "http://sffoo.com/justwrong.htm", lastVisit: yesterday},
-
- // Test what we do with escaping in titles
- {isInQuery: false, isVisit:true, isDetails: true, title: "m%0o%0z",
- uri: "http://foo.com/changeme1.htm", lastVisit: yesterday},
-
- // Test another invalid title - for updating later
- {isInQuery: false, isVisit:true, isDetails: true, title: "m,oz",
- uri: "http://foo.com/changeme2.htm", lastVisit: yesterday}];
-
-/**
- * This test will test Queries that use relative search terms and domain options
- */
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_searchterms_domain()
-{
- yield task_populateDB(testData);
- var query = PlacesUtils.history.getNewQuery();
- query.searchTerms = "moz";
- query.domain = "foo.com";
- query.domainIsHost = false;
-
- // Options
- var options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = options.SORT_BY_DATE_ASCENDING;
- options.resultType = options.RESULTS_AS_URI;
-
- // Results
- var result = PlacesUtils.history.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
-
- do_print("Number of items in result set: " + root.childCount);
- for (var i=0; i < root.childCount; ++i) {
- do_print("result: " + root.getChild(i).uri + " Title: " + root.getChild(i).title);
- }
-
- // Check our inital result set
- compareArrayToResult(testData, root);
-
- // If that passes, check liveupdate
- // Add to the query set
- do_print("Adding item to query");
- var change1 = [{isVisit: true, isDetails: true, uri: "http://foo.com/added.htm",
- title: "moz", transType: PlacesUtils.history.TRANSITION_LINK}];
- yield task_populateDB(change1);
- do_check_true(isInResult(change1, root));
-
- // Update an existing URI
- do_print("Updating Item");
- var change2 = [{isDetails: true, uri: "http://foo.com/changeme1.htm",
- title: "moz" }];
- yield task_populateDB(change2);
- do_check_true(isInResult(change2, root));
-
- // Add one and take one out of query set, and simply change one so that it
- // still applies to the query.
- do_print("Updating More Items");
- var change3 = [{isDetails: true, uri:"http://foo.com/changeme2.htm",
- title: "moz"},
- {isDetails: true, uri: "http://mail.foo.com/yiihah",
- title: "moz now updated"},
- {isDetails: true, uri: "ftp://foo.com/ftp", title: "gone"}];
- yield task_populateDB(change3);
- do_check_true(isInResult({uri: "http://foo.com/changeme2.htm"}, root));
- do_check_true(isInResult({uri: "http://mail.foo.com/yiihah"}, root));
- do_check_false(isInResult({uri: "ftp://foo.com/ftp"}, root));
-
- // And now, delete one
- do_print("Deleting items");
- var change4 = [{isDetails: true, uri: "https://foo.com/",
- title: "mo,z"}];
- yield task_populateDB(change4);
- do_check_false(isInResult(change4, root));
-
- root.containerOpen = false;
-});
diff --git a/toolkit/components/places/tests/queries/test_searchterms-uri.js b/toolkit/components/places/tests/queries/test_searchterms-uri.js
deleted file mode 100644
index af4efe196e..0000000000
--- a/toolkit/components/places/tests/queries/test_searchterms-uri.js
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
- // The test data for our database, note that the ordering of the results that
- // will be returned by the query (the isInQuery: true objects) is IMPORTANT.
- // see compareArrayToResult in head_queries.js for more info.
- var testData = [
- // Test flat domain with annotation, search term in sentence
- {isInQuery: true, isVisit: true, isDetails: true, isPageAnnotation: true,
- uri: "http://foo.com/", annoName: "moz/test", annoVal: "val",
- lastVisit: lastweek, title: "you know, moz is cool"},
-
- // Test https protocol
- {isInQuery: false, isVisit: true, isDetails: true, title: "moz",
- uri: "https://foo.com/", lastVisit: today},
-
- // Begin the invalid queries: wrong search term
- {isInQuery: false, isVisit:true, isDetails: true, title: "m o z",
- uri: "http://foo.com/wrongsearch.php", lastVisit: today},
-
- // Test subdomain inclued, search term at end
- {isInQuery: false, isVisit: true, isDetails: true,
- uri: "http://mail.foo.com/yiihah", title: "blahmoz", lastVisit: daybefore},
-
- // Test ftp protocol - vary the title length, embed search term
- {isInQuery: false, isVisit: true, isDetails: true,
- uri: "ftp://foo.com/ftp", lastVisit: lastweek,
- title: "hugelongconfmozlagurationofwordswithasearchtermsinit whoo-hoo"},
-
- // Test what we do with escaping in titles
- {isInQuery: false, isVisit:true, isDetails: true, title: "m%0o%0z",
- uri: "http://foo.com/changeme1.htm", lastVisit: yesterday},
-
- // Test another invalid title - for updating later
- {isInQuery: false, isVisit:true, isDetails: true, title: "m,oz",
- uri: "http://foo.com/changeme2.htm", lastVisit: yesterday}];
-
-/**
- * This test will test Queries that use relative search terms and URI options
- */
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_searchterms_uri()
-{
- yield task_populateDB(testData);
- var query = PlacesUtils.history.getNewQuery();
- query.searchTerms = "moz";
- query.uri = uri("http://foo.com");
-
- // Options
- var options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = options.SORT_BY_DATE_ASCENDING;
- options.resultType = options.RESULTS_AS_URI;
-
- // Results
- var result = PlacesUtils.history.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
-
- do_print("Number of items in result set: " + root.childCount);
- for (var i=0; i < root.childCount; ++i) {
- do_print("result: " + root.getChild(i).uri + " Title: " + root.getChild(i).title);
- }
-
- // Check our inital result set
- compareArrayToResult(testData, root);
-
- // live update.
- do_print("change title");
- var change1 = [{isDetails: true, uri:"http://foo.com/",
- title: "mo"}, ];
- yield task_populateDB(change1);
-
- do_check_false(isInResult({uri: "http://foo.com/"}, root));
- var change2 = [{isDetails: true, uri:"http://foo.com/",
- title: "moz"}, ];
- yield task_populateDB(change2);
- do_check_true(isInResult({uri: "http://foo.com/"}, root));
-
- root.containerOpen = false;
-});
diff --git a/toolkit/components/places/tests/queries/test_sort-date-site-grouping.js b/toolkit/components/places/tests/queries/test_sort-date-site-grouping.js
deleted file mode 100644
index 7ca50e6de3..0000000000
--- a/toolkit/components/places/tests/queries/test_sort-date-site-grouping.js
+++ /dev/null
@@ -1,225 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* ***** BEGIN LICENSE BLOCK *****
- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
- * ***** END LICENSE BLOCK ***** */
-
-// This test ensures that the date and site type of |place:| query maintains
-// its quantifications correctly. Namely, it ensures that the date part of the
-// query is not lost when the domain queries are made.
-
-// We specifically craft these entries so that if a by Date and Site sorting is
-// applied, we find one domain in the today range, and two domains in the older
-// than six months range.
-// The correspondence between item in |testData| and date range is stored in
-// leveledTestData.
-var testData = [
- {
- isVisit: true,
- uri: "file:///directory/1",
- lastVisit: today,
- title: "test visit",
- isInQuery: true
- },
- {
- isVisit: true,
- uri: "http://example.com/1",
- lastVisit: today,
- title: "test visit",
- isInQuery: true
- },
- {
- isVisit: true,
- uri: "http://example.com/2",
- lastVisit: today,
- title: "test visit",
- isInQuery: true
- },
- {
- isVisit: true,
- uri: "file:///directory/2",
- lastVisit: olderthansixmonths,
- title: "test visit",
- isInQuery: true
- },
- {
- isVisit: true,
- uri: "http://example.com/3",
- lastVisit: olderthansixmonths,
- title: "test visit",
- isInQuery: true
- },
- {
- isVisit: true,
- uri: "http://example.com/4",
- lastVisit: olderthansixmonths,
- title: "test visit",
- isInQuery: true
- },
- {
- isVisit: true,
- uri: "http://example.net/1",
- lastVisit: olderthansixmonths + 1000,
- title: "test visit",
- isInQuery: true
- }
-];
-var domainsInRange = [2, 3];
-var leveledTestData = [// Today
- [[0], // Today, local files
- [1, 2]], // Today, example.com
- // Older than six months
- [[3], // Older than six months, local files
- [4, 5], // Older than six months, example.com
- [6] // Older than six months, example.net
- ]];
-
-// This test data is meant for live updating. The |levels| property indicates
-// date range index and then domain index.
-var testDataAddedLater = [
- {
- isVisit: true,
- uri: "http://example.com/5",
- lastVisit: olderthansixmonths,
- title: "test visit",
- isInQuery: true,
- levels: [1, 1]
- },
- {
- isVisit: true,
- uri: "http://example.com/6",
- lastVisit: olderthansixmonths,
- title: "test visit",
- isInQuery: true,
- levels: [1, 1]
- },
- {
- isVisit: true,
- uri: "http://example.com/7",
- lastVisit: today,
- title: "test visit",
- isInQuery: true,
- levels: [0, 1]
- },
- {
- isVisit: true,
- uri: "file:///directory/3",
- lastVisit: today,
- title: "test visit",
- isInQuery: true,
- levels: [0, 0]
- }
-];
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_sort_date_site_grouping()
-{
- yield task_populateDB(testData);
-
- // On Linux, the (local files) folder is shown after sites unlike Mac/Windows.
- // Thus, we avoid running this test on Linux but this should be re-enabled
- // after bug 624024 is resolved.
- let isLinux = ("@mozilla.org/gnome-gconf-service;1" in Components.classes);
- if (isLinux)
- return;
-
- // In this test, there are three levels of results:
- // 1st: Date queries. e.g., today, last week, or older than 6 months.
- // 2nd: Domain queries restricted to a date. e.g. mozilla.com today.
- // 3rd: Actual visits. e.g. mozilla.com/index.html today.
- //
- // We store all the third level result roots so that we can easily close all
- // containers and test live updating into specific results.
- let roots = [];
-
- let query = PlacesUtils.history.getNewQuery();
- let options = PlacesUtils.history.getNewQueryOptions();
- options.resultType = Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_SITE_QUERY;
-
- let root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
-
- // This corresponds to the number of date ranges.
- do_check_eq(root.childCount, leveledTestData.length);
-
- // We pass off to |checkFirstLevel| to check the first level of results.
- for (let index = 0; index < leveledTestData.length; index++) {
- let node = root.getChild(index);
- checkFirstLevel(index, node, roots);
- }
-
- // Test live updating.
- for (let visit of testDataAddedLater) {
- yield task_populateDB([visit]);
- let oldLength = testData.length;
- let i = visit.levels[0];
- let j = visit.levels[1];
- testData.push(visit);
- leveledTestData[i][j].push(oldLength);
- compareArrayToResult(leveledTestData[i][j].
- map(x => testData[x]), roots[i][j]);
- }
-
- for (let i = 0; i < roots.length; i++) {
- for (let j = 0; j < roots[i].length; j++)
- roots[i][j].containerOpen = false;
- }
-
- root.containerOpen = false;
-});
-
-function checkFirstLevel(index, node, roots) {
- PlacesUtils.asContainer(node).containerOpen = true;
-
- do_check_true(PlacesUtils.nodeIsDay(node));
- PlacesUtils.asQuery(node);
- let queries = node.getQueries();
- let options = node.queryOptions;
-
- do_check_eq(queries.length, 1);
- let query = queries[0];
-
- do_check_true(query.hasBeginTime && query.hasEndTime);
-
- // Here we check the second level of results.
- let root = PlacesUtils.history.executeQuery(query, options).root;
- roots.push([]);
- root.containerOpen = true;
-
- do_check_eq(root.childCount, leveledTestData[index].length);
- for (var secondIndex = 0; secondIndex < root.childCount; secondIndex++) {
- let child = PlacesUtils.asQuery(root.getChild(secondIndex));
- checkSecondLevel(index, secondIndex, child, roots);
- }
- root.containerOpen = false;
- node.containerOpen = false;
-}
-
-function checkSecondLevel(index, secondIndex, child, roots) {
- let queries = child.getQueries();
- let options = child.queryOptions;
-
- do_check_eq(queries.length, 1);
- let query = queries[0];
-
- do_check_true(query.hasDomain);
- do_check_true(query.hasBeginTime && query.hasEndTime);
-
- let root = PlacesUtils.history.executeQuery(query, options).root;
- // We should now have that roots[index][secondIndex] is set to the second
- // level's results root.
- roots[index].push(root);
-
- // We pass off to compareArrayToResult to check the third level of
- // results.
- root.containerOpen = true;
- compareArrayToResult(leveledTestData[index][secondIndex].
- map(x => testData[x]), root);
- // We close |root|'s container later so that we can test live
- // updates into it.
-}
diff --git a/toolkit/components/places/tests/queries/test_sorting.js b/toolkit/components/places/tests/queries/test_sorting.js
deleted file mode 100644
index 4d8e1146d3..0000000000
--- a/toolkit/components/places/tests/queries/test_sorting.js
+++ /dev/null
@@ -1,1265 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var tests = [];
-
-tests.push({
- _sortingMode: Ci.nsINavHistoryQueryOptions.SORT_BY_NONE,
-
- *setup() {
- do_print("Sorting test 1: SORT BY NONE");
-
- this._unsortedData = [
- { isBookmark: true,
- uri: "http://example.com/b",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "y",
- keyword: "b",
- isInQuery: true },
-
- { isBookmark: true,
- uri: "http://example.com/a",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "z",
- keyword: "a",
- isInQuery: true },
-
- { isBookmark: true,
- uri: "http://example.com/c",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "x",
- keyword: "c",
- isInQuery: true },
- ];
-
- this._sortedData = this._unsortedData;
-
- // This function in head_queries.js creates our database with the above data
- yield task_populateDB(this._unsortedData);
- },
-
- check: function() {
- // Query
- var query = PlacesUtils.history.getNewQuery();
- query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
- query.onlyBookmarked = true;
-
- // query options
- var options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = this._sortingMode;
-
- // Results - this gets the result set and opens it for reading and modification.
- var result = PlacesUtils.history.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- compareArrayToResult(this._sortedData, root);
- root.containerOpen = false;
- },
-
- check_reverse: function() {
- // no reverse sorting for SORT BY NONE
- }
-});
-
-tests.push({
- _sortingMode: Ci.nsINavHistoryQueryOptions.SORT_BY_TITLE_ASCENDING,
-
- *setup() {
- do_print("Sorting test 2: SORT BY TITLE");
-
- this._unsortedData = [
- { isBookmark: true,
- uri: "http://example.com/b1",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "y",
- isInQuery: true },
-
- { isBookmark: true,
- uri: "http://example.com/a",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "z",
- isInQuery: true },
-
- { isBookmark: true,
- uri: "http://example.com/c",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "x",
- isInQuery: true },
-
- // if titles are equal, should fall back to URI
- { isBookmark: true,
- uri: "http://example.com/b2",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "y",
- isInQuery: true },
- ];
-
- this._sortedData = [
- this._unsortedData[2],
- this._unsortedData[0],
- this._unsortedData[3],
- this._unsortedData[1],
- ];
-
- // This function in head_queries.js creates our database with the above data
- yield task_populateDB(this._unsortedData);
- },
-
- check: function() {
- // Query
- var query = PlacesUtils.history.getNewQuery();
- query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
- query.onlyBookmarked = true;
-
- // query options
- var options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = this._sortingMode;
-
- // Results - this gets the result set and opens it for reading and modification.
- var result = PlacesUtils.history.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- compareArrayToResult(this._sortedData, root);
- root.containerOpen = false;
- },
-
- check_reverse: function() {
- this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_TITLE_DESCENDING;
- this._sortedData.reverse();
- this.check();
- }
-});
-
-tests.push({
- _sortingMode: Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_ASCENDING,
-
- *setup() {
- do_print("Sorting test 3: SORT BY DATE");
-
- var timeInMicroseconds = Date.now() * 1000;
- this._unsortedData = [
- { isVisit: true,
- isDetails: true,
- isBookmark: true,
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 0,
- uri: "http://example.com/c1",
- lastVisit: timeInMicroseconds - 2000,
- title: "x1",
- isInQuery: true },
-
- { isVisit: true,
- isDetails: true,
- isBookmark: true,
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 1,
- uri: "http://example.com/a",
- lastVisit: timeInMicroseconds - 1000,
- title: "z",
- isInQuery: true },
-
- { isVisit: true,
- isDetails: true,
- isBookmark: true,
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 2,
- uri: "http://example.com/b",
- lastVisit: timeInMicroseconds - 3000,
- title: "y",
- isInQuery: true },
-
- // if dates are equal, should fall back to title
- { isVisit: true,
- isDetails: true,
- isBookmark: true,
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 3,
- uri: "http://example.com/c2",
- lastVisit: timeInMicroseconds - 2000,
- title: "x2",
- isInQuery: true },
-
- // if dates and title are equal, should fall back to bookmark index
- { isVisit: true,
- isDetails: true,
- isBookmark: true,
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 4,
- uri: "http://example.com/c2",
- lastVisit: timeInMicroseconds - 2000,
- title: "x2",
- isInQuery: true },
- ];
-
- this._sortedData = [
- this._unsortedData[2],
- this._unsortedData[0],
- this._unsortedData[3],
- this._unsortedData[4],
- this._unsortedData[1],
- ];
-
- // This function in head_queries.js creates our database with the above data
- yield task_populateDB(this._unsortedData);
- },
-
- check: function() {
- // Query
- var query = PlacesUtils.history.getNewQuery();
- query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
- query.onlyBookmarked = true;
-
- // query options
- var options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = this._sortingMode;
-
- // Results - this gets the result set and opens it for reading and modification.
- var result = PlacesUtils.history.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- compareArrayToResult(this._sortedData, root);
- root.containerOpen = false;
- },
-
- check_reverse: function() {
- this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING;
- this._sortedData.reverse();
- this.check();
- }
-});
-
-tests.push({
- _sortingMode: Ci.nsINavHistoryQueryOptions.SORT_BY_URI_ASCENDING,
-
- *setup() {
- do_print("Sorting test 4: SORT BY URI");
-
- var timeInMicroseconds = Date.now() * 1000;
- this._unsortedData = [
- { isBookmark: true,
- isDetails: true,
- lastVisit: timeInMicroseconds,
- uri: "http://example.com/b",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 0,
- title: "y",
- isInQuery: true },
-
- { isBookmark: true,
- uri: "http://example.com/c",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 1,
- title: "x",
- isInQuery: true },
-
- { isBookmark: true,
- uri: "http://example.com/a",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 2,
- title: "z",
- isInQuery: true },
-
- // if URIs are equal, should fall back to date
- { isBookmark: true,
- isDetails: true,
- lastVisit: timeInMicroseconds + 1000,
- uri: "http://example.com/c",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 3,
- title: "x",
- isInQuery: true },
-
- // if no URI (e.g., node is a folder), should fall back to title
- { isFolder: true,
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 4,
- title: "a",
- isInQuery: true },
-
- // if URIs and dates are equal, should fall back to bookmark index
- { isBookmark: true,
- isDetails: true,
- lastVisit: timeInMicroseconds + 1000,
- uri: "http://example.com/c",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 5,
- title: "x",
- isInQuery: true },
-
- // if no URI and titles are equal, should fall back to bookmark index
- { isFolder: true,
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 6,
- title: "a",
- isInQuery: true },
- ];
-
- this._sortedData = [
- this._unsortedData[4],
- this._unsortedData[6],
- this._unsortedData[2],
- this._unsortedData[0],
- this._unsortedData[1],
- this._unsortedData[3],
- this._unsortedData[5],
- ];
-
- // This function in head_queries.js creates our database with the above data
- yield task_populateDB(this._unsortedData);
- },
-
- check: function() {
- // Query
- var query = PlacesUtils.history.getNewQuery();
- query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
-
- // query options
- var options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = this._sortingMode;
-
- // Results - this gets the result set and opens it for reading and modification.
- var result = PlacesUtils.history.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- compareArrayToResult(this._sortedData, root);
- root.containerOpen = false;
- },
-
- check_reverse: function() {
- this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_URI_DESCENDING;
- this._sortedData.reverse();
- this.check();
- }
-});
-
-tests.push({
- _sortingMode: Ci.nsINavHistoryQueryOptions.SORT_BY_VISITCOUNT_ASCENDING,
-
- *setup() {
- do_print("Sorting test 5: SORT BY VISITCOUNT");
-
- var timeInMicroseconds = Date.now() * 1000;
- this._unsortedData = [
- { isBookmark: true,
- uri: "http://example.com/a",
- lastVisit: timeInMicroseconds,
- title: "z",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 0,
- isInQuery: true },
-
- { isBookmark: true,
- uri: "http://example.com/c",
- lastVisit: timeInMicroseconds,
- title: "x",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 1,
- isInQuery: true },
-
- { isBookmark: true,
- uri: "http://example.com/b1",
- lastVisit: timeInMicroseconds,
- title: "y1",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 2,
- isInQuery: true },
-
- // if visitCounts are equal, should fall back to date
- { isBookmark: true,
- uri: "http://example.com/b2",
- lastVisit: timeInMicroseconds + 1000,
- title: "y2a",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 3,
- isInQuery: true },
-
- // if visitCounts and dates are equal, should fall back to bookmark index
- { isBookmark: true,
- uri: "http://example.com/b2",
- lastVisit: timeInMicroseconds + 1000,
- title: "y2b",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 4,
- isInQuery: true },
- ];
-
- this._sortedData = [
- this._unsortedData[0],
- this._unsortedData[2],
- this._unsortedData[3],
- this._unsortedData[4],
- this._unsortedData[1],
- ];
-
- // This function in head_queries.js creates our database with the above data
- yield task_populateDB(this._unsortedData);
- // add visits to increase visit count
- yield PlacesTestUtils.addVisits([
- { uri: uri("http://example.com/a"), transition: TRANSITION_TYPED, visitDate: timeInMicroseconds },
- { uri: uri("http://example.com/b1"), transition: TRANSITION_TYPED, visitDate: timeInMicroseconds },
- { uri: uri("http://example.com/b1"), transition: TRANSITION_TYPED, visitDate: timeInMicroseconds },
- { uri: uri("http://example.com/b2"), transition: TRANSITION_TYPED, visitDate: timeInMicroseconds + 1000 },
- { uri: uri("http://example.com/b2"), transition: TRANSITION_TYPED, visitDate: timeInMicroseconds + 1000 },
- { uri: uri("http://example.com/c"), transition: TRANSITION_TYPED, visitDate: timeInMicroseconds },
- { uri: uri("http://example.com/c"), transition: TRANSITION_TYPED, visitDate: timeInMicroseconds },
- { uri: uri("http://example.com/c"), transition: TRANSITION_TYPED, visitDate: timeInMicroseconds },
- ]);
- },
-
- check: function() {
- // Query
- var query = PlacesUtils.history.getNewQuery();
- query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
- query.onlyBookmarked = true;
-
- // query options
- var options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = this._sortingMode;
-
- // Results - this gets the result set and opens it for reading and modification.
- var result = PlacesUtils.history.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- compareArrayToResult(this._sortedData, root);
- root.containerOpen = false;
- },
-
- check_reverse: function() {
- this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_VISITCOUNT_DESCENDING;
- this._sortedData.reverse();
- this.check();
- }
-});
-
-tests.push({
- _sortingMode: Ci.nsINavHistoryQueryOptions.SORT_BY_KEYWORD_ASCENDING,
-
- *setup() {
- do_print("Sorting test 6: SORT BY KEYWORD");
-
- this._unsortedData = [
- { isBookmark: true,
- uri: "http://example.com/a",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "z",
- keyword: "a",
- isInQuery: true },
-
- { isBookmark: true,
- uri: "http://example.com/c",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "x",
- keyword: "c",
- isInQuery: true },
-
- { isBookmark: true,
- uri: "http://example.com/b1",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "y9",
- keyword: "b",
- isInQuery: true },
-
- // without a keyword, should fall back to title
- { isBookmark: true,
- uri: "http://example.com/null2",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "null8",
- keyword: null,
- isInQuery: true },
-
- // without a keyword, should fall back to title
- { isBookmark: true,
- uri: "http://example.com/null1",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "null9",
- keyword: null,
- isInQuery: true },
-
- // if keywords are equal, should fall back to title
- { isBookmark: true,
- uri: "http://example.com/b1",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "y8",
- keyword: "b",
- isInQuery: true },
- ];
-
- this._sortedData = [
- this._unsortedData[3],
- this._unsortedData[4],
- this._unsortedData[0],
- this._unsortedData[5],
- this._unsortedData[2],
- this._unsortedData[1],
- ];
-
- // This function in head_queries.js creates our database with the above data
- yield task_populateDB(this._unsortedData);
- },
-
- check: function() {
- // Query
- var query = PlacesUtils.history.getNewQuery();
- query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
- query.onlyBookmarked = true;
-
- // query options
- var options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = this._sortingMode;
-
- // Results - this gets the result set and opens it for reading and modification.
- var result = PlacesUtils.history.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- compareArrayToResult(this._sortedData, root);
- root.containerOpen = false;
- },
-
- check_reverse: function() {
- this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_KEYWORD_DESCENDING;
- this._sortedData.reverse();
- this.check();
- }
-});
-
-tests.push({
- _sortingMode: Ci.nsINavHistoryQueryOptions.SORT_BY_DATEADDED_ASCENDING,
-
- *setup() {
- do_print("Sorting test 7: SORT BY DATEADDED");
-
- var timeInMicroseconds = Date.now() * 1000;
- this._unsortedData = [
- { isBookmark: true,
- uri: "http://example.com/b1",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 0,
- title: "y1",
- dateAdded: timeInMicroseconds - 1000,
- isInQuery: true },
-
- { isBookmark: true,
- uri: "http://example.com/a",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 1,
- title: "z",
- dateAdded: timeInMicroseconds - 2000,
- isInQuery: true },
-
- { isBookmark: true,
- uri: "http://example.com/c",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 2,
- title: "x",
- dateAdded: timeInMicroseconds,
- isInQuery: true },
-
- // if dateAddeds are equal, should fall back to title
- { isBookmark: true,
- uri: "http://example.com/b2",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 3,
- title: "y2",
- dateAdded: timeInMicroseconds - 1000,
- isInQuery: true },
-
- // if dateAddeds and titles are equal, should fall back to bookmark index
- { isBookmark: true,
- uri: "http://example.com/b3",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 4,
- title: "y3",
- dateAdded: timeInMicroseconds - 1000,
- isInQuery: true },
- ];
-
- this._sortedData = [
- this._unsortedData[1],
- this._unsortedData[0],
- this._unsortedData[3],
- this._unsortedData[4],
- this._unsortedData[2],
- ];
-
- // This function in head_queries.js creates our database with the above data
- yield task_populateDB(this._unsortedData);
- },
-
- check: function() {
- // Query
- var query = PlacesUtils.history.getNewQuery();
- query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
- query.onlyBookmarked = true;
-
- // query options
- var options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = this._sortingMode;
-
- // Results - this gets the result set and opens it for reading and modification.
- var result = PlacesUtils.history.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- compareArrayToResult(this._sortedData, root);
- root.containerOpen = false;
- },
-
- check_reverse: function() {
- this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_DATEADDED_DESCENDING;
- this._sortedData.reverse();
- this.check();
- }
-});
-
-tests.push({
- _sortingMode: Ci.nsINavHistoryQueryOptions.SORT_BY_LASTMODIFIED_ASCENDING,
-
- *setup() {
- do_print("Sorting test 8: SORT BY LASTMODIFIED");
-
- var timeInMicroseconds = Date.now() * 1000;
- var timeAddedInMicroseconds = timeInMicroseconds - 10000;
-
- this._unsortedData = [
- { isBookmark: true,
- uri: "http://example.com/b1",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 0,
- title: "y1",
- dateAdded: timeAddedInMicroseconds,
- lastModified: timeInMicroseconds - 1000,
- isInQuery: true },
-
- { isBookmark: true,
- uri: "http://example.com/a",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 1,
- title: "z",
- dateAdded: timeAddedInMicroseconds,
- lastModified: timeInMicroseconds - 2000,
- isInQuery: true },
-
- { isBookmark: true,
- uri: "http://example.com/c",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 2,
- title: "x",
- dateAdded: timeAddedInMicroseconds,
- lastModified: timeInMicroseconds,
- isInQuery: true },
-
- // if lastModifieds are equal, should fall back to title
- { isBookmark: true,
- uri: "http://example.com/b2",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 3,
- title: "y2",
- dateAdded: timeAddedInMicroseconds,
- lastModified: timeInMicroseconds - 1000,
- isInQuery: true },
-
- // if lastModifieds and titles are equal, should fall back to bookmark
- // index
- { isBookmark: true,
- uri: "http://example.com/b3",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: 4,
- title: "y3",
- dateAdded: timeAddedInMicroseconds,
- lastModified: timeInMicroseconds - 1000,
- isInQuery: true },
- ];
-
- this._sortedData = [
- this._unsortedData[1],
- this._unsortedData[0],
- this._unsortedData[3],
- this._unsortedData[4],
- this._unsortedData[2],
- ];
-
- // This function in head_queries.js creates our database with the above data
- yield task_populateDB(this._unsortedData);
- },
-
- check: function() {
- // Query
- var query = PlacesUtils.history.getNewQuery();
- query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
- query.onlyBookmarked = true;
-
- // query options
- var options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = this._sortingMode;
-
- // Results - this gets the result set and opens it for reading and modification.
- var result = PlacesUtils.history.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- compareArrayToResult(this._sortedData, root);
- root.containerOpen = false;
- },
-
- check_reverse: function() {
- this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_LASTMODIFIED_DESCENDING;
- this._sortedData.reverse();
- this.check();
- }
-});
-
-tests.push({
- _sortingMode: Ci.nsINavHistoryQueryOptions.SORT_BY_TAGS_ASCENDING,
-
- *setup() {
- do_print("Sorting test 9: SORT BY TAGS");
-
- this._unsortedData = [
- { isBookmark: true,
- uri: "http://url2.com/",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "title x",
- isTag: true,
- tagArray: ["x", "y", "z"],
- isInQuery: true },
-
- { isBookmark: true,
- uri: "http://url1a.com/",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "title y1",
- isTag: true,
- tagArray: ["a", "b"],
- isInQuery: true },
-
- { isBookmark: true,
- uri: "http://url3a.com/",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "title w1",
- isInQuery: true },
-
- { isBookmark: true,
- uri: "http://url0.com/",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "title z",
- isTag: true,
- tagArray: ["a", "y", "z"],
- isInQuery: true },
-
- // if tags are equal, should fall back to title
- { isBookmark: true,
- uri: "http://url1b.com/",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "title y2",
- isTag: true,
- tagArray: ["b", "a"],
- isInQuery: true },
-
- // if tags are equal, should fall back to title
- { isBookmark: true,
- uri: "http://url3b.com/",
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- title: "title w2",
- isInQuery: true },
- ];
-
- this._sortedData = [
- this._unsortedData[2],
- this._unsortedData[5],
- this._unsortedData[1],
- this._unsortedData[4],
- this._unsortedData[3],
- this._unsortedData[0],
- ];
-
- // This function in head_queries.js creates our database with the above data
- yield task_populateDB(this._unsortedData);
- },
-
- check: function() {
- // Query
- var query = PlacesUtils.history.getNewQuery();
- query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
- query.onlyBookmarked = true;
-
- // query options
- var options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = this._sortingMode;
-
- // Results - this gets the result set and opens it for reading and modification.
- var result = PlacesUtils.history.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- compareArrayToResult(this._sortedData, root);
- root.containerOpen = false;
- },
-
- check_reverse: function() {
- this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_TAGS_DESCENDING;
- this._sortedData.reverse();
- this.check();
- }
-});
-
-// SORT_BY_ANNOTATION_* (int32)
-
-tests.push({
- _sortingMode: Ci.nsINavHistoryQueryOptions.SORT_BY_ANNOTATION_ASCENDING,
-
- *setup() {
- do_print("Sorting test 10: SORT BY ANNOTATION (int32)");
-
- var timeInMicroseconds = Date.now() * 1000;
- this._unsortedData = [
- { isVisit: true,
- isDetails: true,
- lastVisit: timeInMicroseconds,
- uri: "http://example.com/b1",
- title: "y1",
- isPageAnnotation: true,
- annoName: "sorting",
- annoVal: 2,
- annoFlags: 0,
- annoExpiration: Ci.nsIAnnotationService.EXPIRE_NEVER,
- isInQuery: true },
-
- { isVisit: true,
- isDetails: true,
- lastVisit: timeInMicroseconds,
- uri: "http://example.com/a",
- title: "z",
- isPageAnnotation: true,
- annoName: "sorting",
- annoVal: 1,
- annoFlags: 0,
- annoExpiration: Ci.nsIAnnotationService.EXPIRE_NEVER,
- isInQuery: true },
-
- { isVisit: true,
- isDetails: true,
- lastVisit: timeInMicroseconds,
- uri: "http://example.com/c",
- title: "x",
- isPageAnnotation: true,
- annoName: "sorting",
- annoVal: 3,
- annoFlags: 0,
- annoExpiration: Ci.nsIAnnotationService.EXPIRE_NEVER,
- isInQuery: true },
-
- // if annotations are equal, should fall back to title
- { isVisit: true,
- isDetails: true,
- lastVisit: timeInMicroseconds,
- uri: "http://example.com/b2",
- title: "y2",
- isPageAnnotation: true,
- annoName: "sorting",
- annoVal: 2,
- annoFlags: 0,
- annoExpiration: Ci.nsIAnnotationService.EXPIRE_NEVER,
- isInQuery: true },
- ];
-
- this._sortedData = [
- this._unsortedData[1],
- this._unsortedData[0],
- this._unsortedData[3],
- this._unsortedData[2],
- ];
-
- // This function in head_queries.js creates our database with the above data
- yield task_populateDB(this._unsortedData);
- },
-
- check: function() {
- // Query
- var query = PlacesUtils.history.getNewQuery();
-
- // query options
- var options = PlacesUtils.history.getNewQueryOptions();
- options.sortingAnnotation = "sorting";
- options.sortingMode = this._sortingMode;
-
- // Results - this gets the result set and opens it for reading and modification.
- var result = PlacesUtils.history.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- compareArrayToResult(this._sortedData, root);
- root.containerOpen = false;
- },
-
- check_reverse: function() {
- this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_ANNOTATION_DESCENDING;
- this._sortedData.reverse();
- this.check();
- }
-});
-
-// SORT_BY_ANNOTATION_* (int64)
-
-tests.push({
- _sortingMode: Ci.nsINavHistoryQueryOptions.SORT_BY_ANNOTATION_ASCENDING,
-
- *setup() {
- do_print("Sorting test 11: SORT BY ANNOTATION (int64)");
-
- var timeInMicroseconds = Date.now() * 1000;
- this._unsortedData = [
- { isVisit: true,
- isDetails: true,
- uri: "http://moz.com/",
- lastVisit: timeInMicroseconds,
- title: "I",
- isPageAnnotation: true,
- annoName: "sorting",
- annoVal: 0xffffffff1,
- annoFlags: 0,
- annoExpiration: Ci.nsIAnnotationService.EXPIRE_NEVER,
- isInQuery: true },
-
- { isVisit: true,
- isDetails: true,
- uri: "http://is.com/",
- lastVisit: timeInMicroseconds,
- title: "love",
- isPageAnnotation: true,
- annoName: "sorting",
- annoVal: 0xffffffff0,
- annoFlags: 0,
- annoExpiration: Ci.nsIAnnotationService.EXPIRE_NEVER,
- isInQuery: true },
-
- { isVisit: true,
- isDetails: true,
- uri: "http://best.com/",
- lastVisit: timeInMicroseconds,
- title: "moz",
- isPageAnnotation: true,
- annoName: "sorting",
- annoVal: 0xffffffff2,
- annoFlags: 0,
- annoExpiration: Ci.nsIAnnotationService.EXPIRE_NEVER,
- isInQuery: true },
- ];
-
- this._sortedData = [
- this._unsortedData[1],
- this._unsortedData[0],
- this._unsortedData[2],
- ];
-
- // This function in head_queries.js creates our database with the above data
- yield task_populateDB(this._unsortedData);
- },
-
- check: function() {
- // Query
- var query = PlacesUtils.history.getNewQuery();
-
- // query options
- var options = PlacesUtils.history.getNewQueryOptions();
- options.sortingAnnotation = "sorting";
- options.sortingMode = this._sortingMode;
-
- // Results - this gets the result set and opens it for reading and modification.
- var result = PlacesUtils.history.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- compareArrayToResult(this._sortedData, root);
- root.containerOpen = false;
- },
-
- check_reverse: function() {
- this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_ANNOTATION_DESCENDING;
- this._sortedData.reverse();
- this.check();
- }
-});
-
-// SORT_BY_ANNOTATION_* (string)
-
-tests.push({
- _sortingMode: Ci.nsINavHistoryQueryOptions.SORT_BY_ANNOTATION_ASCENDING,
-
- *setup() {
- do_print("Sorting test 12: SORT BY ANNOTATION (string)");
-
- var timeInMicroseconds = Date.now() * 1000;
- this._unsortedData = [
- { isVisit: true,
- isDetails: true,
- uri: "http://moz.com/",
- lastVisit: timeInMicroseconds,
- title: "I",
- isPageAnnotation: true,
- annoName: "sorting",
- annoVal: "a",
- annoFlags: 0,
- annoExpiration: Ci.nsIAnnotationService.EXPIRE_NEVER,
- isInQuery: true },
-
- { isVisit: true,
- isDetails: true,
- uri: "http://is.com/",
- lastVisit: timeInMicroseconds,
- title: "love",
- isPageAnnotation: true,
- annoName: "sorting",
- annoVal: "",
- annoFlags: 0,
- annoExpiration: Ci.nsIAnnotationService.EXPIRE_NEVER,
- isInQuery: true },
-
- { isVisit: true,
- isDetails: true,
- uri: "http://best.com/",
- lastVisit: timeInMicroseconds,
- title: "moz",
- isPageAnnotation: true,
- annoName: "sorting",
- annoVal: "z",
- annoFlags: 0,
- annoExpiration: Ci.nsIAnnotationService.EXPIRE_NEVER,
- isInQuery: true },
- ];
-
- this._sortedData = [
- this._unsortedData[1],
- this._unsortedData[0],
- this._unsortedData[2],
- ];
-
- // This function in head_queries.js creates our database with the above data
- yield task_populateDB(this._unsortedData);
- },
-
- check: function() {
- // Query
- var query = PlacesUtils.history.getNewQuery();
-
- // query options
- var options = PlacesUtils.history.getNewQueryOptions();
- options.sortingAnnotation = "sorting";
- options.sortingMode = this._sortingMode;
-
- // Results - this gets the result set and opens it for reading and modification.
- var result = PlacesUtils.history.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- compareArrayToResult(this._sortedData, root);
- root.containerOpen = false;
- },
-
- check_reverse: function() {
- this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_ANNOTATION_DESCENDING;
- this._sortedData.reverse();
- this.check();
- }
-});
-
-// SORT_BY_ANNOTATION_* (double)
-
-tests.push({
- _sortingMode: Ci.nsINavHistoryQueryOptions.SORT_BY_ANNOTATION_ASCENDING,
-
- *setup() {
- do_print("Sorting test 13: SORT BY ANNOTATION (double)");
-
- var timeInMicroseconds = Date.now() * 1000;
- this._unsortedData = [
- { isVisit: true,
- isDetails: true,
- uri: "http://moz.com/",
- lastVisit: timeInMicroseconds,
- title: "I",
- isPageAnnotation: true,
- annoName: "sorting",
- annoVal: 1.2,
- annoFlags: 0,
- annoExpiration: Ci.nsIAnnotationService.EXPIRE_NEVER,
- isInQuery: true },
-
- { isVisit: true,
- isDetails: true,
- uri: "http://is.com/",
- lastVisit: timeInMicroseconds,
- title: "love",
- isPageAnnotation: true,
- annoName: "sorting",
- annoVal: 1.1,
- annoFlags: 0,
- annoExpiration: Ci.nsIAnnotationService.EXPIRE_NEVER,
- isInQuery: true },
-
- { isVisit: true,
- isDetails: true,
- uri: "http://best.com/",
- lastVisit: timeInMicroseconds,
- title: "moz",
- isPageAnnotation: true,
- annoName: "sorting",
- annoVal: 1.3,
- annoFlags: 0,
- annoExpiration: Ci.nsIAnnotationService.EXPIRE_NEVER,
- isInQuery: true },
- ];
-
- this._sortedData = [
- this._unsortedData[1],
- this._unsortedData[0],
- this._unsortedData[2],
- ];
-
- // This function in head_queries.js creates our database with the above data
- yield task_populateDB(this._unsortedData);
- },
-
- check: function() {
- // Query
- var query = PlacesUtils.history.getNewQuery();
-
- // query options
- var options = PlacesUtils.history.getNewQueryOptions();
- options.sortingAnnotation = "sorting";
- options.sortingMode = this._sortingMode;
-
- // Results - this gets the result set and opens it for reading and modification.
- var result = PlacesUtils.history.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- compareArrayToResult(this._sortedData, root);
- root.containerOpen = false;
- },
-
- check_reverse: function() {
- this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_ANNOTATION_DESCENDING;
- this._sortedData.reverse();
- this.check();
- }
-});
-
-// SORT_BY_FRECENCY_*
-
-tests.push({
- _sortingMode: Ci.nsINavHistoryQueryOptions.SORT_BY_FRECENCY_ASCENDING,
-
- *setup() {
- do_print("Sorting test 13: SORT BY FRECENCY ");
-
- let timeInMicroseconds = PlacesUtils.toPRTime(Date.now() - 10000);
-
- function newTimeInMicroseconds() {
- timeInMicroseconds = timeInMicroseconds + 1000;
- return timeInMicroseconds;
- }
-
- this._unsortedData = [
- { isVisit: true,
- isDetails: true,
- uri: "http://moz.com/",
- lastVisit: newTimeInMicroseconds(),
- title: "I",
- isInQuery: true },
-
- { isVisit: true,
- isDetails: true,
- uri: "http://moz.com/",
- lastVisit: newTimeInMicroseconds(),
- title: "I",
- isInQuery: true },
-
- { isVisit: true,
- isDetails: true,
- uri: "http://moz.com/",
- lastVisit: newTimeInMicroseconds(),
- title: "I",
- isInQuery: true },
-
- { isVisit: true,
- isDetails: true,
- uri: "http://is.com/",
- lastVisit: newTimeInMicroseconds(),
- title: "love",
- isInQuery: true },
-
- { isVisit: true,
- isDetails: true,
- uri: "http://best.com/",
- lastVisit: newTimeInMicroseconds(),
- title: "moz",
- isInQuery: true },
-
- { isVisit: true,
- isDetails: true,
- uri: "http://best.com/",
- lastVisit: newTimeInMicroseconds(),
- title: "moz",
- isInQuery: true },
- ];
-
- this._sortedData = [
- this._unsortedData[3],
- this._unsortedData[5],
- this._unsortedData[2],
- ];
-
- // This function in head_queries.js creates our database with the above data
- yield task_populateDB(this._unsortedData);
- },
-
- check: function() {
- var query = PlacesUtils.history.getNewQuery();
- var options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = this._sortingMode;
-
- var root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
- compareArrayToResult(this._sortedData, root);
- root.containerOpen = false;
- },
-
- check_reverse: function() {
- this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_FRECENCY_DESCENDING;
- this._sortedData.reverse();
- this.check();
- }
-});
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_sorting()
-{
- for (let test of tests) {
- yield test.setup();
- yield PlacesTestUtils.promiseAsyncUpdates();
- test.check();
- // sorting reversed, usually SORT_BY have ASC and DESC
- test.check_reverse();
- // Execute cleanup tasks
- yield PlacesUtils.bookmarks.eraseEverything();
- yield PlacesTestUtils.clearHistory();
- }
-});
diff --git a/toolkit/components/places/tests/queries/test_tags.js b/toolkit/components/places/tests/queries/test_tags.js
deleted file mode 100644
index afda3f03f7..0000000000
--- a/toolkit/components/places/tests/queries/test_tags.js
+++ /dev/null
@@ -1,743 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/**
- * Tests bookmark and history queries with tags. See bug 399799.
- */
-
-"use strict";
-
-add_task(function* tags_getter_setter() {
- do_print("Tags getter/setter should work correctly");
- do_print("Without setting tags, tags getter should return empty array");
- var [query] = makeQuery();
- do_check_eq(query.tags.length, 0);
-
- do_print("Setting tags to an empty array, tags getter should return "+
- "empty array");
- [query] = makeQuery([]);
- do_check_eq(query.tags.length, 0);
-
- do_print("Setting a few tags, tags getter should return correct array");
- var tags = ["bar", "baz", "foo"];
- [query] = makeQuery(tags);
- setsAreEqual(query.tags, tags, true);
-
- do_print("Setting some dupe tags, tags getter return unique tags");
- [query] = makeQuery(["foo", "foo", "bar", "foo", "baz", "bar"]);
- setsAreEqual(query.tags, ["bar", "baz", "foo"], true);
-});
-
-add_task(function* invalid_setter_calls() {
- do_print("Invalid calls to tags setter should fail");
- try {
- var query = PlacesUtils.history.getNewQuery();
- query.tags = null;
- do_throw("Passing null to SetTags should fail");
- }
- catch (exc) {}
-
- try {
- query = PlacesUtils.history.getNewQuery();
- query.tags = "this should not work";
- do_throw("Passing a string to SetTags should fail");
- }
- catch (exc) {}
-
- try {
- makeQuery([null]);
- do_throw("Passing one-element array with null to SetTags should fail");
- }
- catch (exc) {}
-
- try {
- makeQuery([undefined]);
- do_throw("Passing one-element array with undefined to SetTags " +
- "should fail");
- }
- catch (exc) {}
-
- try {
- makeQuery(["foo", null, "bar"]);
- do_throw("Passing mixture of tags and null to SetTags should fail");
- }
- catch (exc) {}
-
- try {
- makeQuery(["foo", undefined, "bar"]);
- do_throw("Passing mixture of tags and undefined to SetTags " +
- "should fail");
- }
- catch (exc) {}
-
- try {
- makeQuery([1, 2, 3]);
- do_throw("Passing numbers to SetTags should fail");
- }
- catch (exc) {}
-
- try {
- makeQuery(["foo", 1, 2, 3]);
- do_throw("Passing mixture of tags and numbers to SetTags should fail");
- }
- catch (exc) {}
-
- try {
- var str = PlacesUtils.toISupportsString("foo");
- query = PlacesUtils.history.getNewQuery();
- query.tags = str;
- do_throw("Passing nsISupportsString to SetTags should fail");
- }
- catch (exc) {}
-
- try {
- makeQuery([str]);
- do_throw("Passing array of nsISupportsStrings to SetTags should fail");
- }
- catch (exc) {}
-});
-
-add_task(function* not_setting_tags() {
- do_print("Not setting tags at all should not affect query URI");
- checkQueryURI();
-});
-
-add_task(function* empty_array_tags() {
- do_print("Setting tags with an empty array should not affect query URI");
- checkQueryURI([]);
-});
-
-add_task(function* set_tags() {
- do_print("Setting some tags should result in correct query URI");
- checkQueryURI([
- "foo",
- "七難",
- "",
- "いっぱいおっぱい",
- "Abracadabra",
- "123",
- "Here's a pretty long tag name with some = signs and 1 2 3s and spaces oh jeez will it work I hope so!",
- "アスキーでございません",
- "あいうえお",
- ]);
-});
-
-add_task(function* no_tags_tagsAreNot() {
- do_print("Not setting tags at all but setting tagsAreNot should " +
- "affect query URI");
- checkQueryURI(null, true);
-});
-
-add_task(function* empty_array_tags_tagsAreNot() {
- do_print("Setting tags with an empty array and setting tagsAreNot " +
- "should affect query URI");
- checkQueryURI([], true);
-});
-
-add_task(function* () {
- do_print("Setting some tags and setting tagsAreNot should result in " +
- "correct query URI");
- checkQueryURI([
- "foo",
- "七難",
- "",
- "いっぱいおっぱい",
- "Abracadabra",
- "123",
- "Here's a pretty long tag name with some = signs and 1 2 3s and spaces oh jeez will it work I hope so!",
- "アスキーでございません",
- "あいうえお",
- ], true);
-});
-
-add_task(function* tag_to_uri() {
- do_print("Querying history on tag associated with a URI should return " +
- "that URI");
- yield task_doWithVisit(["foo", "bar", "baz"], function (aURI) {
- var [query, opts] = makeQuery(["foo"]);
- executeAndCheckQueryResults(query, opts, [aURI.spec]);
- [query, opts] = makeQuery(["bar"]);
- executeAndCheckQueryResults(query, opts, [aURI.spec]);
- [query, opts] = makeQuery(["baz"]);
- executeAndCheckQueryResults(query, opts, [aURI.spec]);
- });
-});
-
-add_task(function* tags_to_uri() {
- do_print("Querying history on many tags associated with a URI should " +
- "return that URI");
- yield task_doWithVisit(["foo", "bar", "baz"], function (aURI) {
- var [query, opts] = makeQuery(["foo", "bar"]);
- executeAndCheckQueryResults(query, opts, [aURI.spec]);
- [query, opts] = makeQuery(["foo", "baz"]);
- executeAndCheckQueryResults(query, opts, [aURI.spec]);
- [query, opts] = makeQuery(["bar", "baz"]);
- executeAndCheckQueryResults(query, opts, [aURI.spec]);
- [query, opts] = makeQuery(["foo", "bar", "baz"]);
- executeAndCheckQueryResults(query, opts, [aURI.spec]);
- });
-});
-
-add_task(function* repeated_tag() {
- do_print("Specifying the same tag multiple times in a history query " +
- "should not matter");
- yield task_doWithVisit(["foo", "bar", "baz"], function (aURI) {
- var [query, opts] = makeQuery(["foo", "foo"]);
- executeAndCheckQueryResults(query, opts, [aURI.spec]);
- [query, opts] = makeQuery(["foo", "foo", "foo", "bar", "bar", "baz"]);
- executeAndCheckQueryResults(query, opts, [aURI.spec]);
- });
-});
-
-add_task(function* many_tags_no_uri() {
- do_print("Querying history on many tags associated with a URI and " +
- "tags not associated with that URI should not return that URI");
- yield task_doWithVisit(["foo", "bar", "baz"], function (aURI) {
- var [query, opts] = makeQuery(["foo", "bogus"]);
- executeAndCheckQueryResults(query, opts, []);
- [query, opts] = makeQuery(["foo", "bar", "bogus"]);
- executeAndCheckQueryResults(query, opts, []);
- [query, opts] = makeQuery(["foo", "bar", "baz", "bogus"]);
- executeAndCheckQueryResults(query, opts, []);
- });
-});
-
-add_task(function* nonexistent_tags() {
- do_print("Querying history on nonexistent tags should return no results");
- yield task_doWithVisit(["foo", "bar", "baz"], function (aURI) {
- var [query, opts] = makeQuery(["bogus"]);
- executeAndCheckQueryResults(query, opts, []);
- [query, opts] = makeQuery(["bogus", "gnarly"]);
- executeAndCheckQueryResults(query, opts, []);
- });
-});
-
-add_task(function* tag_to_bookmark() {
- do_print("Querying bookmarks on tag associated with a URI should " +
- "return that URI");
- yield task_doWithBookmark(["foo", "bar", "baz"], function (aURI) {
- var [query, opts] = makeQuery(["foo"]);
- opts.queryType = opts.QUERY_TYPE_BOOKMARKS;
- executeAndCheckQueryResults(query, opts, [aURI.spec]);
- [query, opts] = makeQuery(["bar"]);
- opts.queryType = opts.QUERY_TYPE_BOOKMARKS;
- executeAndCheckQueryResults(query, opts, [aURI.spec]);
- [query, opts] = makeQuery(["baz"]);
- opts.queryType = opts.QUERY_TYPE_BOOKMARKS;
- executeAndCheckQueryResults(query, opts, [aURI.spec]);
- });
-});
-
-add_task(function* many_tags_to_bookmark() {
- do_print("Querying bookmarks on many tags associated with a URI " +
- "should return that URI");
- yield task_doWithBookmark(["foo", "bar", "baz"], function (aURI) {
- var [query, opts] = makeQuery(["foo", "bar"]);
- opts.queryType = opts.QUERY_TYPE_BOOKMARKS;
- executeAndCheckQueryResults(query, opts, [aURI.spec]);
- [query, opts] = makeQuery(["foo", "baz"]);
- opts.queryType = opts.QUERY_TYPE_BOOKMARKS;
- executeAndCheckQueryResults(query, opts, [aURI.spec]);
- [query, opts] = makeQuery(["bar", "baz"]);
- opts.queryType = opts.QUERY_TYPE_BOOKMARKS;
- executeAndCheckQueryResults(query, opts, [aURI.spec]);
- [query, opts] = makeQuery(["foo", "bar", "baz"]);
- opts.queryType = opts.QUERY_TYPE_BOOKMARKS;
- executeAndCheckQueryResults(query, opts, [aURI.spec]);
- });
-});
-
-add_task(function* repeated_tag_to_bookmarks() {
- do_print("Specifying the same tag multiple times in a bookmark query " +
- "should not matter");
- yield task_doWithBookmark(["foo", "bar", "baz"], function (aURI) {
- var [query, opts] = makeQuery(["foo", "foo"]);
- opts.queryType = opts.QUERY_TYPE_BOOKMARKS;
- executeAndCheckQueryResults(query, opts, [aURI.spec]);
- [query, opts] = makeQuery(["foo", "foo", "foo", "bar", "bar", "baz"]);
- opts.queryType = opts.QUERY_TYPE_BOOKMARKS;
- executeAndCheckQueryResults(query, opts, [aURI.spec]);
- });
-});
-
-add_task(function* many_tags_no_bookmark() {
- do_print("Querying bookmarks on many tags associated with a URI and " +
- "tags not associated with that URI should not return that URI");
- yield task_doWithBookmark(["foo", "bar", "baz"], function (aURI) {
- var [query, opts] = makeQuery(["foo", "bogus"]);
- opts.queryType = opts.QUERY_TYPE_BOOKMARKS;
- executeAndCheckQueryResults(query, opts, []);
- [query, opts] = makeQuery(["foo", "bar", "bogus"]);
- opts.queryType = opts.QUERY_TYPE_BOOKMARKS;
- executeAndCheckQueryResults(query, opts, []);
- [query, opts] = makeQuery(["foo", "bar", "baz", "bogus"]);
- opts.queryType = opts.QUERY_TYPE_BOOKMARKS;
- executeAndCheckQueryResults(query, opts, []);
- });
-});
-
-add_task(function* nonexistent_tags_bookmark() {
- do_print("Querying bookmarks on nonexistent tag should return no results");
- yield task_doWithBookmark(["foo", "bar", "baz"], function (aURI) {
- var [query, opts] = makeQuery(["bogus"]);
- opts.queryType = opts.QUERY_TYPE_BOOKMARKS;
- executeAndCheckQueryResults(query, opts, []);
- [query, opts] = makeQuery(["bogus", "gnarly"]);
- opts.queryType = opts.QUERY_TYPE_BOOKMARKS;
- executeAndCheckQueryResults(query, opts, []);
- });
-});
-
-add_task(function* tagsAreNot_history() {
- do_print("Querying history using tagsAreNot should work correctly");
- var urisAndTags = {
- "http://example.com/1": ["foo", "bar"],
- "http://example.com/2": ["baz", "qux"],
- "http://example.com/3": null
- };
-
- do_print("Add visits and tag the URIs");
- for (let [pURI, tags] of Object.entries(urisAndTags)) {
- let nsiuri = uri(pURI);
- yield PlacesTestUtils.addVisits(nsiuri);
- if (tags)
- PlacesUtils.tagging.tagURI(nsiuri, tags);
- }
-
- do_print(' Querying for "foo" should match only /2 and /3');
- var [query, opts] = makeQuery(["foo"], true);
- queryResultsAre(PlacesUtils.history.executeQuery(query, opts).root,
- ["http://example.com/2", "http://example.com/3"]);
-
- do_print(' Querying for "foo" and "bar" should match only /2 and /3');
- [query, opts] = makeQuery(["foo", "bar"], true);
- queryResultsAre(PlacesUtils.history.executeQuery(query, opts).root,
- ["http://example.com/2", "http://example.com/3"]);
-
- do_print(' Querying for "foo" and "bogus" should match only /2 and /3');
- [query, opts] = makeQuery(["foo", "bogus"], true);
- queryResultsAre(PlacesUtils.history.executeQuery(query, opts).root,
- ["http://example.com/2", "http://example.com/3"]);
-
- do_print(' Querying for "foo" and "baz" should match only /3');
- [query, opts] = makeQuery(["foo", "baz"], true);
- queryResultsAre(PlacesUtils.history.executeQuery(query, opts).root,
- ["http://example.com/3"]);
-
- do_print(' Querying for "bogus" should match all');
- [query, opts] = makeQuery(["bogus"], true);
- queryResultsAre(PlacesUtils.history.executeQuery(query, opts).root,
- ["http://example.com/1",
- "http://example.com/2",
- "http://example.com/3"]);
-
- // Clean up.
- for (let [pURI, tags] of Object.entries(urisAndTags)) {
- let nsiuri = uri(pURI);
- if (tags)
- PlacesUtils.tagging.untagURI(nsiuri, tags);
- }
- yield task_cleanDatabase();
-});
-
-add_task(function* tagsAreNot_bookmarks() {
- do_print("Querying bookmarks using tagsAreNot should work correctly");
- var urisAndTags = {
- "http://example.com/1": ["foo", "bar"],
- "http://example.com/2": ["baz", "qux"],
- "http://example.com/3": null
- };
-
- do_print("Add bookmarks and tag the URIs");
- for (let [pURI, tags] of Object.entries(urisAndTags)) {
- let nsiuri = uri(pURI);
- yield addBookmark(nsiuri);
- if (tags)
- PlacesUtils.tagging.tagURI(nsiuri, tags);
- }
-
- do_print(' Querying for "foo" should match only /2 and /3');
- var [query, opts] = makeQuery(["foo"], true);
- opts.queryType = opts.QUERY_TYPE_BOOKMARKS;
- queryResultsAre(PlacesUtils.history.executeQuery(query, opts).root,
- ["http://example.com/2", "http://example.com/3"]);
-
- do_print(' Querying for "foo" and "bar" should match only /2 and /3');
- [query, opts] = makeQuery(["foo", "bar"], true);
- opts.queryType = opts.QUERY_TYPE_BOOKMARKS;
- queryResultsAre(PlacesUtils.history.executeQuery(query, opts).root,
- ["http://example.com/2", "http://example.com/3"]);
-
- do_print(' Querying for "foo" and "bogus" should match only /2 and /3');
- [query, opts] = makeQuery(["foo", "bogus"], true);
- opts.queryType = opts.QUERY_TYPE_BOOKMARKS;
- queryResultsAre(PlacesUtils.history.executeQuery(query, opts).root,
- ["http://example.com/2", "http://example.com/3"]);
-
- do_print(' Querying for "foo" and "baz" should match only /3');
- [query, opts] = makeQuery(["foo", "baz"], true);
- opts.queryType = opts.QUERY_TYPE_BOOKMARKS;
- queryResultsAre(PlacesUtils.history.executeQuery(query, opts).root,
- ["http://example.com/3"]);
-
- do_print(' Querying for "bogus" should match all');
- [query, opts] = makeQuery(["bogus"], true);
- opts.queryType = opts.QUERY_TYPE_BOOKMARKS;
- queryResultsAre(PlacesUtils.history.executeQuery(query, opts).root,
- ["http://example.com/1",
- "http://example.com/2",
- "http://example.com/3"]);
-
- // Clean up.
- for (let [pURI, tags] of Object.entries(urisAndTags)) {
- let nsiuri = uri(pURI);
- if (tags)
- PlacesUtils.tagging.untagURI(nsiuri, tags);
- }
- yield task_cleanDatabase();
-});
-
-add_task(function* duplicate_tags() {
- do_print("Duplicate existing tags (i.e., multiple tag folders with " +
- "same name) should not throw off query results");
- var tagName = "foo";
-
- do_print("Add bookmark and tag it normally");
- yield addBookmark(TEST_URI);
- PlacesUtils.tagging.tagURI(TEST_URI, [tagName]);
-
- do_print("Manually create tag folder with same name as tag and insert " +
- "bookmark");
- let dupTag = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.tagsGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: tagName
- });
-
- yield PlacesUtils.bookmarks.insert({
- parentGuid: dupTag.guid,
- title: "title",
- url: TEST_URI
- });
-
- do_print("Querying for tag should match URI");
- var [query, opts] = makeQuery([tagName]);
- opts.queryType = opts.QUERY_TYPE_BOOKMARKS;
- queryResultsAre(PlacesUtils.history.executeQuery(query, opts).root, [TEST_URI.spec]);
-
- PlacesUtils.tagging.untagURI(TEST_URI, [tagName]);
- yield task_cleanDatabase();
-});
-
-add_task(function* folder_named_as_tag() {
- do_print("Regular folders with the same name as tag should not throw " +
- "off query results");
- var tagName = "foo";
-
- do_print("Add bookmark and tag it");
- yield addBookmark(TEST_URI);
- PlacesUtils.tagging.tagURI(TEST_URI, [tagName]);
-
- do_print("Create folder with same name as tag");
- yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: tagName
- });
-
- do_print("Querying for tag should match URI");
- var [query, opts] = makeQuery([tagName]);
- opts.queryType = opts.QUERY_TYPE_BOOKMARKS;
- queryResultsAre(PlacesUtils.history.executeQuery(query, opts).root, [TEST_URI.spec]);
-
- PlacesUtils.tagging.untagURI(TEST_URI, [tagName]);
- yield task_cleanDatabase();
-});
-
-add_task(function* ORed_queries() {
- do_print("Multiple queries ORed together should work");
- var urisAndTags = {
- "http://example.com/1": [],
- "http://example.com/2": []
- };
-
- // Search with lots of tags to make sure tag parameter substitution in SQL
- // can handle it with more than one query.
- for (let i = 0; i < 11; i++) {
- urisAndTags["http://example.com/1"].push("/1 tag " + i);
- urisAndTags["http://example.com/2"].push("/2 tag " + i);
- }
-
- do_print("Add visits and tag the URIs");
- for (let [pURI, tags] of Object.entries(urisAndTags)) {
- let nsiuri = uri(pURI);
- yield PlacesTestUtils.addVisits(nsiuri);
- if (tags)
- PlacesUtils.tagging.tagURI(nsiuri, tags);
- }
-
- do_print("Query for /1 OR query for /2 should match both /1 and /2");
- var [query1, opts] = makeQuery(urisAndTags["http://example.com/1"]);
- var [query2] = makeQuery(urisAndTags["http://example.com/2"]);
- var root = PlacesUtils.history.executeQueries([query1, query2], 2, opts).root;
- queryResultsAre(root, ["http://example.com/1", "http://example.com/2"]);
-
- do_print("Query for /1 OR query on bogus tag should match only /1");
- [query1, opts] = makeQuery(urisAndTags["http://example.com/1"]);
- [query2] = makeQuery(["bogus"]);
- root = PlacesUtils.history.executeQueries([query1, query2], 2, opts).root;
- queryResultsAre(root, ["http://example.com/1"]);
-
- do_print("Query for /1 OR query for /1 should match only /1");
- [query1, opts] = makeQuery(urisAndTags["http://example.com/1"]);
- [query2] = makeQuery(urisAndTags["http://example.com/1"]);
- root = PlacesUtils.history.executeQueries([query1, query2], 2, opts).root;
- queryResultsAre(root, ["http://example.com/1"]);
-
- do_print("Query for /1 with tagsAreNot OR query for /2 with tagsAreNot " +
- "should match both /1 and /2");
- [query1, opts] = makeQuery(urisAndTags["http://example.com/1"], true);
- [query2] = makeQuery(urisAndTags["http://example.com/2"], true);
- root = PlacesUtils.history.executeQueries([query1, query2], 2, opts).root;
- queryResultsAre(root, ["http://example.com/1", "http://example.com/2"]);
-
- do_print("Query for /1 OR query for /2 with tagsAreNot should match " +
- "only /1");
- [query1, opts] = makeQuery(urisAndTags["http://example.com/1"]);
- [query2] = makeQuery(urisAndTags["http://example.com/2"], true);
- root = PlacesUtils.history.executeQueries([query1, query2], 2, opts).root;
- queryResultsAre(root, ["http://example.com/1"]);
-
- do_print("Query for /1 OR query for /1 with tagsAreNot should match " +
- "both URIs");
- [query1, opts] = makeQuery(urisAndTags["http://example.com/1"]);
- [query2] = makeQuery(urisAndTags["http://example.com/1"], true);
- root = PlacesUtils.history.executeQueries([query1, query2], 2, opts).root;
- queryResultsAre(root, ["http://example.com/1", "http://example.com/2"]);
-
- // Clean up.
- for (let [pURI, tags] of Object.entries(urisAndTags)) {
- let nsiuri = uri(pURI);
- if (tags)
- PlacesUtils.tagging.untagURI(nsiuri, tags);
- }
- yield task_cleanDatabase();
-});
-
-// The tag keys in query URIs, i.e., "place:tag=foo&!tags=1"
-// --- -----
-const QUERY_KEY_TAG = "tag";
-const QUERY_KEY_NOT_TAGS = "!tags";
-
-const TEST_URI = uri("http://example.com/");
-
-/**
- * Adds a bookmark.
- *
- * @param aURI
- * URI of the page (an nsIURI)
- */
-function addBookmark(aURI) {
- return PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- title: aURI.spec,
- url: aURI
- });
-}
-
-/**
- * Asynchronous task that removes all pages from history and bookmarks.
- */
-function* task_cleanDatabase(aCallback) {
- yield PlacesUtils.bookmarks.eraseEverything();
- yield PlacesTestUtils.clearHistory();
-}
-
-/**
- * Sets up a query with the specified tags, converts it to a URI, and makes sure
- * the URI is what we expect it to be.
- *
- * @param aTags
- * The query's tags will be set to those in this array
- * @param aTagsAreNot
- * The query's tagsAreNot property will be set to this
- */
-function checkQueryURI(aTags, aTagsAreNot) {
- var pairs = (aTags || []).sort().map(t => QUERY_KEY_TAG + "=" + encodeTag(t));
- if (aTagsAreNot)
- pairs.push(QUERY_KEY_NOT_TAGS + "=1");
- var expURI = "place:" + pairs.join("&");
- var [query, opts] = makeQuery(aTags, aTagsAreNot);
- var actualURI = queryURI(query, opts);
- do_print("Query URI should be what we expect for the given tags");
- do_check_eq(actualURI, expURI);
-}
-
-/**
- * Asynchronous task that executes a callback task in a "scoped" database state.
- * A bookmark is added and tagged before the callback is called, and afterward
- * the database is cleared.
- *
- * @param aTags
- * A bookmark will be added and tagged with this array of tags
- * @param aCallback
- * A task function that will be called after the bookmark has been tagged
- */
-function* task_doWithBookmark(aTags, aCallback) {
- yield addBookmark(TEST_URI);
- PlacesUtils.tagging.tagURI(TEST_URI, aTags);
- yield aCallback(TEST_URI);
- PlacesUtils.tagging.untagURI(TEST_URI, aTags);
- yield task_cleanDatabase();
-}
-
-/**
- * Asynchronous task that executes a callback function in a "scoped" database
- * state. A history visit is added and tagged before the callback is called,
- * and afterward the database is cleared.
- *
- * @param aTags
- * A history visit will be added and tagged with this array of tags
- * @param aCallback
- * A function that will be called after the visit has been tagged
- */
-function* task_doWithVisit(aTags, aCallback) {
- yield PlacesTestUtils.addVisits(TEST_URI);
- PlacesUtils.tagging.tagURI(TEST_URI, aTags);
- yield aCallback(TEST_URI);
- PlacesUtils.tagging.untagURI(TEST_URI, aTags);
- yield task_cleanDatabase();
-}
-
-/**
- * queriesToQueryString() encodes every character in the query URI that doesn't
- * match /[a-zA-Z]/. There's no simple JavaScript function that does the same,
- * but encodeURIComponent() comes close, only missing some punctuation. This
- * function takes care of all of that.
- *
- * @param aTag
- * A tag name to encode
- * @return A UTF-8 escaped string suitable for inclusion in a query URI
- */
-function encodeTag(aTag) {
- return encodeURIComponent(aTag).
- replace(/[-_.!~*'()]/g, // '
- s => "%" + s.charCodeAt(0).toString(16));
-}
-
-/**
- * Executes the given query and compares the results to the given URIs.
- * See queryResultsAre().
- *
- * @param aQuery
- * An nsINavHistoryQuery
- * @param aQueryOpts
- * An nsINavHistoryQueryOptions
- * @param aExpectedURIs
- * Array of URIs (as strings) that aResultRoot should contain
- */
-function executeAndCheckQueryResults(aQuery, aQueryOpts, aExpectedURIs) {
- var root = PlacesUtils.history.executeQuery(aQuery, aQueryOpts).root;
- root.containerOpen = true;
- queryResultsAre(root, aExpectedURIs);
- root.containerOpen = false;
-}
-
-/**
- * Returns new query and query options objects. The query's tags will be
- * set to aTags. aTags may be null, in which case setTags() is not called at
- * all on the query.
- *
- * @param aTags
- * The query's tags will be set to those in this array
- * @param aTagsAreNot
- * The query's tagsAreNot property will be set to this
- * @return [query, queryOptions]
- */
-function makeQuery(aTags, aTagsAreNot) {
- aTagsAreNot = !!aTagsAreNot;
- do_print("Making a query " +
- (aTags ?
- "with tags " + aTags.toSource() :
- "without calling setTags() at all") +
- " and with tagsAreNot=" +
- aTagsAreNot);
- var query = PlacesUtils.history.getNewQuery();
- query.tagsAreNot = aTagsAreNot;
- if (aTags) {
- query.tags = aTags;
- var uniqueTags = [];
- aTags.forEach(function (t) {
- if (typeof(t) === "string" && uniqueTags.indexOf(t) < 0)
- uniqueTags.push(t);
- });
- uniqueTags.sort();
- }
-
- do_print("Made query should be correct for tags and tagsAreNot");
- if (uniqueTags)
- setsAreEqual(query.tags, uniqueTags, true);
- var expCount = uniqueTags ? uniqueTags.length : 0;
- do_check_eq(query.tags.length, expCount);
- do_check_eq(query.tagsAreNot, aTagsAreNot);
-
- return [query, PlacesUtils.history.getNewQueryOptions()];
-}
-
-/**
- * Ensures that the URIs of aResultRoot are the same as those in aExpectedURIs.
- *
- * @param aResultRoot
- * The nsINavHistoryContainerResultNode root of an nsINavHistoryResult
- * @param aExpectedURIs
- * Array of URIs (as strings) that aResultRoot should contain
- */
-function queryResultsAre(aResultRoot, aExpectedURIs) {
- var rootWasOpen = aResultRoot.containerOpen;
- if (!rootWasOpen)
- aResultRoot.containerOpen = true;
- var actualURIs = [];
- for (let i = 0; i < aResultRoot.childCount; i++) {
- actualURIs.push(aResultRoot.getChild(i).uri);
- }
- setsAreEqual(actualURIs, aExpectedURIs);
- if (!rootWasOpen)
- aResultRoot.containerOpen = false;
-}
-
-/**
- * Converts the given query into its query URI.
- *
- * @param aQuery
- * An nsINavHistoryQuery
- * @param aQueryOpts
- * An nsINavHistoryQueryOptions
- * @return The query's URI
- */
-function queryURI(aQuery, aQueryOpts) {
- return PlacesUtils.history.queriesToQueryString([aQuery], 1, aQueryOpts);
-}
-
-/**
- * Ensures that the arrays contain the same elements and, optionally, in the
- * same order.
- */
-function setsAreEqual(aArr1, aArr2, aIsOrdered) {
- do_check_eq(aArr1.length, aArr2.length);
- if (aIsOrdered) {
- for (let i = 0; i < aArr1.length; i++) {
- do_check_eq(aArr1[i], aArr2[i]);
- }
- }
- else {
- aArr1.forEach(u => do_check_true(aArr2.indexOf(u) >= 0));
- aArr2.forEach(u => do_check_true(aArr1.indexOf(u) >= 0));
- }
-}
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/places/tests/queries/test_transitions.js b/toolkit/components/places/tests/queries/test_transitions.js
deleted file mode 100644
index bbd4c9e01b..0000000000
--- a/toolkit/components/places/tests/queries/test_transitions.js
+++ /dev/null
@@ -1,178 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* ***** BEGIN LICENSE BLOCK *****
- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
- * ***** END LICENSE BLOCK ***** */
-var beginTime = Date.now();
-var testData = [
- {
- isVisit: true,
- title: "page 0",
- uri: "http://mozilla.com/",
- transType: Ci.nsINavHistoryService.TRANSITION_TYPED
- },
- {
- isVisit: true,
- title: "page 1",
- uri: "http://google.com/",
- transType: Ci.nsINavHistoryService.TRANSITION_DOWNLOAD
- },
- {
- isVisit: true,
- title: "page 2",
- uri: "http://microsoft.com/",
- transType: Ci.nsINavHistoryService.TRANSITION_DOWNLOAD
- },
- {
- isVisit: true,
- title: "page 3",
- uri: "http://en.wikipedia.org/",
- transType: Ci.nsINavHistoryService.TRANSITION_BOOKMARK
- },
- {
- isVisit: true,
- title: "page 4",
- uri: "http://fr.wikipedia.org/",
- transType: Ci.nsINavHistoryService.TRANSITION_DOWNLOAD
- },
- {
- isVisit: true,
- title: "page 5",
- uri: "http://apple.com/",
- transType: Ci.nsINavHistoryService.TRANSITION_TYPED
- },
- {
- isVisit: true,
- title: "page 6",
- uri: "http://campus-bike-store.com/",
- transType: Ci.nsINavHistoryService.TRANSITION_DOWNLOAD
- },
- {
- isVisit: true,
- title: "page 7",
- uri: "http://uwaterloo.ca/",
- transType: Ci.nsINavHistoryService.TRANSITION_TYPED
- },
- {
- isVisit: true,
- title: "page 8",
- uri: "http://pugcleaner.com/",
- transType: Ci.nsINavHistoryService.TRANSITION_BOOKMARK
- },
- {
- isVisit: true,
- title: "page 9",
- uri: "http://de.wikipedia.org/",
- transType: Ci.nsINavHistoryService.TRANSITION_TYPED
- },
- {
- isVisit: true,
- title: "arewefastyet",
- uri: "http://arewefastyet.com/",
- transType: Ci.nsINavHistoryService.TRANSITION_DOWNLOAD
- },
- {
- isVisit: true,
- title: "arewefastyet",
- uri: "http://arewefastyet.com/",
- transType: Ci.nsINavHistoryService.TRANSITION_BOOKMARK
- }];
-// sets of indices of testData array by transition type
-var testDataTyped = [0, 5, 7, 9];
-var testDataDownload = [1, 2, 4, 6, 10];
-var testDataBookmark = [3, 8, 11];
-
-/**
- * run_test is where the magic happens. This is automatically run by the test
- * harness. It is where you do the work of creating the query, running it, and
- * playing with the result set.
- */
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_transitions()
-{
- let timeNow = Date.now();
- for (let item of testData) {
- yield PlacesTestUtils.addVisits({
- uri: uri(item.uri),
- transition: item.transType,
- visitDate: timeNow++ * 1000,
- title: item.title
- });
- }
-
- // dump_table("moz_places");
- // dump_table("moz_historyvisits");
-
- var numSortFunc = function (a, b) { return (a - b); };
- var arrs = testDataTyped.concat(testDataDownload).concat(testDataBookmark)
- .sort(numSortFunc);
-
- // Four tests which compare the result of a query to an expected set.
- var data = arrs.filter(function (index) {
- return (testData[index].uri.match(/arewefastyet\.com/) &&
- testData[index].transType ==
- Ci.nsINavHistoryService.TRANSITION_DOWNLOAD);
- });
-
- compareQueryToTestData("place:domain=arewefastyet.com&transition=" +
- Ci.nsINavHistoryService.TRANSITION_DOWNLOAD,
- data.slice());
-
- compareQueryToTestData("place:transition=" +
- Ci.nsINavHistoryService.TRANSITION_DOWNLOAD,
- testDataDownload.slice());
-
- compareQueryToTestData("place:transition=" +
- Ci.nsINavHistoryService.TRANSITION_TYPED,
- testDataTyped.slice());
-
- compareQueryToTestData("place:transition=" +
- Ci.nsINavHistoryService.TRANSITION_DOWNLOAD +
- "&transition=" +
- Ci.nsINavHistoryService.TRANSITION_BOOKMARK,
- data);
-
- // Tests the live update property of transitions.
- var query = {};
- var options = {};
- PlacesUtils.history.
- queryStringToQueries("place:transition=" +
- Ci.nsINavHistoryService.TRANSITION_DOWNLOAD,
- query, {}, options);
- query = (query.value)[0];
- options = PlacesUtils.history.getNewQueryOptions();
- var result = PlacesUtils.history.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- do_check_eq(testDataDownload.length, root.childCount);
- yield PlacesTestUtils.addVisits({
- uri: uri("http://getfirefox.com"),
- transition: TRANSITION_DOWNLOAD
- });
- do_check_eq(testDataDownload.length + 1, root.childCount);
- root.containerOpen = false;
-});
-
-/*
- * Takes a query and a set of indices. The indices correspond to elements
- * of testData that are the result of the query.
- */
-function compareQueryToTestData(queryStr, data) {
- var query = {};
- var options = {};
- PlacesUtils.history.queryStringToQueries(queryStr, query, {}, options);
- query = query.value[0];
- options = options.value;
- var result = PlacesUtils.history.executeQuery(query, options);
- var root = result.root;
- for (var i = 0; i < data.length; i++) {
- data[i] = testData[data[i]];
- data[i].isInQuery = true;
- }
- compareArrayToResult(data, root);
-}
diff --git a/toolkit/components/places/tests/queries/xpcshell.ini b/toolkit/components/places/tests/queries/xpcshell.ini
deleted file mode 100644
index 7ff864679a..0000000000
--- a/toolkit/components/places/tests/queries/xpcshell.ini
+++ /dev/null
@@ -1,34 +0,0 @@
-[DEFAULT]
-head = head_queries.js
-tail =
-skip-if = toolkit == 'android'
-
-[test_415716.js]
-[test_abstime-annotation-domain.js]
-[test_abstime-annotation-uri.js]
-[test_async.js]
-[test_containersQueries_sorting.js]
-[test_history_queries_tags_liveUpdate.js]
-[test_history_queries_titles_liveUpdate.js]
-[test_onlyBookmarked.js]
-[test_queryMultipleFolder.js]
-[test_querySerialization.js]
-[test_redirects.js]
-# Bug 676989: test hangs consistently on Android
-skip-if = os == "android"
-[test_results-as-tag-contents-query.js]
-[test_results-as-visit.js]
-[test_searchterms-domain.js]
-[test_searchterms-uri.js]
-[test_searchterms-bookmarklets.js]
-[test_sort-date-site-grouping.js]
-[test_sorting.js]
-# Bug 676989: test hangs consistently on Android
-skip-if = os == "android"
-[test_tags.js]
-# Bug 676989: test hangs consistently on Android
-skip-if = os == "android"
-[test_transitions.js]
-# Bug 676989: test hangs consistently on Android
-skip-if = os == "android"
-[test_searchTerms_includeHidden.js]
diff --git a/toolkit/components/places/tests/unifiedcomplete/.eslintrc.js b/toolkit/components/places/tests/unifiedcomplete/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/places/tests/unifiedcomplete/data/engine-rel-searchform.xml b/toolkit/components/places/tests/unifiedcomplete/data/engine-rel-searchform.xml
deleted file mode 100644
index f4baad28ab..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/data/engine-rel-searchform.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
-<ShortName>engine-rel-searchform.xml</ShortName>
-<Url type="text/html" method="GET" template="http://example.com/?search" rel="searchform"/>
-</SearchPlugin>
diff --git a/toolkit/components/places/tests/unifiedcomplete/data/engine-suggestions.xml b/toolkit/components/places/tests/unifiedcomplete/data/engine-suggestions.xml
deleted file mode 100644
index a322a7c86e..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/data/engine-suggestions.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Any copyright is dedicated to the Public Domain.
- - http://creativecommons.org/publicdomain/zero/1.0/ -->
-
-<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
-<ShortName>engine-suggestions.xml</ShortName>
-<Url type="application/x-suggestions+json"
- method="GET"
- template="http://localhost:9000/suggest?{searchTerms}"/>
-<Url type="text/html"
- method="GET"
- template="http://localhost:9000/search"
- rel="searchform"/>
-</SearchPlugin>
diff --git a/toolkit/components/places/tests/unifiedcomplete/head_autocomplete.js b/toolkit/components/places/tests/unifiedcomplete/head_autocomplete.js
deleted file mode 100644
index bc252efe0b..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/head_autocomplete.js
+++ /dev/null
@@ -1,505 +0,0 @@
-/* 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/. */
-
-var Ci = Components.interfaces;
-var Cc = Components.classes;
-var Cr = Components.results;
-var Cu = Components.utils;
-
-const FRECENCY_DEFAULT = 10000;
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://testing-common/httpd.js");
-
-// Import common head.
-{
- let commonFile = do_get_file("../head_common.js", false);
- let uri = Services.io.newFileURI(commonFile);
- Services.scriptloader.loadSubScript(uri.spec, this);
-}
-
-// Put any other stuff relative to this test folder below.
-
-const TITLE_SEARCH_ENGINE_SEPARATOR = " \u00B7\u2013\u00B7 ";
-
-function run_test() {
- run_next_test();
-}
-
-function* cleanup() {
- Services.prefs.clearUserPref("browser.urlbar.autocomplete.enabled");
- Services.prefs.clearUserPref("browser.urlbar.autoFill");
- Services.prefs.clearUserPref("browser.urlbar.autoFill.typed");
- Services.prefs.clearUserPref("browser.urlbar.autoFill.searchEngines");
- let suggestPrefs = [
- "history",
- "bookmark",
- "history.onlyTyped",
- "openpage",
- "searches",
- ];
- for (let type of suggestPrefs) {
- Services.prefs.clearUserPref("browser.urlbar.suggest." + type);
- }
- Services.prefs.clearUserPref("browser.search.suggest.enabled");
- yield PlacesUtils.bookmarks.eraseEverything();
- yield PlacesTestUtils.clearHistory();
-}
-do_register_cleanup(cleanup);
-
-/**
- * @param aSearches
- * Array of AutoCompleteSearch names.
- */
-function AutoCompleteInput(aSearches) {
- this.searches = aSearches;
-}
-AutoCompleteInput.prototype = {
- popup: {
- selectedIndex: -1,
- invalidate: function () {},
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompletePopup])
- },
- popupOpen: false,
-
- disableAutoComplete: false,
- completeDefaultIndex: true,
- completeSelectedIndex: true,
- forceComplete: false,
-
- minResultsForPopup: 0,
- maxRows: 0,
-
- showCommentColumn: false,
- showImageColumn: false,
-
- timeout: 10,
- searchParam: "",
-
- get searchCount() {
- return this.searches.length;
- },
- getSearchAt: function(aIndex) {
- return this.searches[aIndex];
- },
-
- textValue: "",
- // Text selection range
- _selStart: 0,
- _selEnd: 0,
- get selectionStart() {
- return this._selStart;
- },
- get selectionEnd() {
- return this._selEnd;
- },
- selectTextRange: function(aStart, aEnd) {
- this._selStart = aStart;
- this._selEnd = aEnd;
- },
-
- onSearchBegin: function () {},
- onSearchComplete: function () {},
-
- onTextEntered: () => false,
- onTextReverted: () => false,
-
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteInput])
-}
-
-// A helper for check_autocomplete to check a specific match against data from
-// the controller.
-function _check_autocomplete_matches(match, result) {
- let { uri, title, tags, style } = match;
- if (tags)
- title += " \u2013 " + tags.sort().join(", ");
- if (style)
- style = style.sort();
- else
- style = ["favicon"];
-
- do_print(`Checking against expected "${uri.spec}", "${title}"`);
- // Got a match on both uri and title?
- if (stripPrefix(uri.spec) != stripPrefix(result.value) || title != result.comment) {
- return false;
- }
-
- let actualStyle = result.style.split(/\s+/).sort();
- if (style)
- Assert.equal(actualStyle.toString(), style.toString(), "Match should have expected style");
- if (uri.spec.startsWith("moz-action:")) {
- Assert.ok(actualStyle.includes("action"), "moz-action results should always have 'action' in their style");
- }
-
- if (match.icon)
- Assert.equal(result.image, match.icon, "Match should have expected image");
-
- return true;
-}
-
-function* check_autocomplete(test) {
- // At this point frecency could still be updating due to latest pages
- // updates.
- // This is not a problem in real life, but autocomplete tests should
- // return reliable resultsets, thus we have to wait.
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- // Make an AutoCompleteInput that uses our searches and confirms results.
- let input = new AutoCompleteInput(["unifiedcomplete"]);
- input.textValue = test.search;
-
- if (test.searchParam)
- input.searchParam = test.searchParam;
-
- // Caret must be at the end for autoFill to happen.
- let strLen = test.search.length;
- input.selectTextRange(strLen, strLen);
- Assert.equal(input.selectionStart, strLen, "Selection starts at end");
- Assert.equal(input.selectionEnd, strLen, "Selection ends at the end");
-
- let controller = Cc["@mozilla.org/autocomplete/controller;1"]
- .getService(Ci.nsIAutoCompleteController);
- controller.input = input;
-
- let numSearchesStarted = 0;
- input.onSearchBegin = () => {
- do_print("onSearchBegin received");
- numSearchesStarted++;
- };
- let searchCompletePromise = new Promise(resolve => {
- input.onSearchComplete = () => {
- do_print("onSearchComplete received");
- resolve();
- }
- });
- let expectedSearches = 1;
- if (test.incompleteSearch) {
- controller.startSearch(test.incompleteSearch);
- expectedSearches++;
- }
-
- do_print("Searching for: '" + test.search + "'");
- controller.startSearch(test.search);
- yield searchCompletePromise;
-
- Assert.equal(numSearchesStarted, expectedSearches, "All searches started");
-
- // Check to see the expected uris and titles match up. If 'enable-actions'
- // is specified, we check that the first specified match is the first
- // controller value (as this is the "special" always selected item), but the
- // rest can match in any order.
- // If 'enable-actions' is not specified, they can match in any order.
- if (test.matches) {
- // Do not modify the test original matches.
- let matches = test.matches.slice();
-
- if (matches.length) {
- let firstIndexToCheck = 0;
- if (test.searchParam && test.searchParam.includes("enable-actions")) {
- firstIndexToCheck = 1;
- do_print("Checking first match is first autocomplete entry")
- let result = {
- value: controller.getValueAt(0),
- comment: controller.getCommentAt(0),
- style: controller.getStyleAt(0),
- image: controller.getImageAt(0),
- }
- do_print(`First match is "${result.value}", "${result.comment}"`);
- Assert.ok(_check_autocomplete_matches(matches[0], result), "first item is correct");
- do_print("Checking rest of the matches");
- }
-
- for (let i = firstIndexToCheck; i < controller.matchCount; i++) {
- let result = {
- value: controller.getValueAt(i),
- comment: controller.getCommentAt(i),
- style: controller.getStyleAt(i),
- image: controller.getImageAt(i),
- }
- do_print(`Looking for "${result.value}", "${result.comment}" in expected results...`);
- let lowerBound = test.checkSorting ? i : firstIndexToCheck;
- let upperBound = test.checkSorting ? i + 1 : matches.length;
- let found = false;
- for (let j = lowerBound; j < upperBound; ++j) {
- // Skip processed expected results
- if (matches[j] == undefined)
- continue;
- if (_check_autocomplete_matches(matches[j], result)) {
- do_print("Got a match at index " + j + "!");
- // Make it undefined so we don't process it again
- matches[j] = undefined;
- found = true;
- break;
- }
- }
-
- if (!found)
- do_throw(`Didn't find the current result ("${result.value}", "${result.comment}") in matches`); // ' (Emacs syntax highlighting fix)
- }
- }
-
- Assert.equal(controller.matchCount, matches.length,
- "Got as many results as expected");
-
- // If we expect results, make sure we got matches.
- do_check_eq(controller.searchStatus, matches.length ?
- Ci.nsIAutoCompleteController.STATUS_COMPLETE_MATCH :
- Ci.nsIAutoCompleteController.STATUS_COMPLETE_NO_MATCH);
- }
-
- if (test.autofilled) {
- // Check the autoFilled result.
- Assert.equal(input.textValue, test.autofilled,
- "Autofilled value is correct");
-
- // Now force completion and check correct casing of the result.
- // This ensures the controller is able to do its magic case-preserving
- // stuff and correct replacement of the user's casing with result's one.
- controller.handleEnter(false);
- Assert.equal(input.textValue, test.completed,
- "Completed value is correct");
- }
-}
-
-var addBookmark = Task.async(function* (aBookmarkObj) {
- Assert.ok(!!aBookmarkObj.uri, "Bookmark object contains an uri");
- let parentId = aBookmarkObj.parentId ? aBookmarkObj.parentId
- : PlacesUtils.unfiledBookmarksFolderId;
-
- let bm = yield PlacesUtils.bookmarks.insert({
- parentGuid: (yield PlacesUtils.promiseItemGuid(parentId)),
- title: aBookmarkObj.title || "A bookmark",
- url: aBookmarkObj.uri
- });
- yield PlacesUtils.promiseItemId(bm.guid);
-
- if (aBookmarkObj.keyword) {
- yield PlacesUtils.keywords.insert({ keyword: aBookmarkObj.keyword,
- url: aBookmarkObj.uri.spec,
- postData: aBookmarkObj.postData
- });
- }
-
- if (aBookmarkObj.tags) {
- PlacesUtils.tagging.tagURI(aBookmarkObj.uri, aBookmarkObj.tags);
- }
-});
-
-function addOpenPages(aUri, aCount=1) {
- let ac = Cc["@mozilla.org/autocomplete/search;1?name=unifiedcomplete"]
- .getService(Ci.mozIPlacesAutoComplete);
- for (let i = 0; i < aCount; i++) {
- ac.registerOpenPage(aUri);
- }
-}
-
-function removeOpenPages(aUri, aCount=1) {
- let ac = Cc["@mozilla.org/autocomplete/search;1?name=unifiedcomplete"]
- .getService(Ci.mozIPlacesAutoComplete);
- for (let i = 0; i < aCount; i++) {
- ac.unregisterOpenPage(aUri);
- }
-}
-
-function changeRestrict(aType, aChar) {
- let branch = "browser.urlbar.";
- // "title" and "url" are different from everything else, so special case them.
- if (aType == "title" || aType == "url")
- branch += "match.";
- else
- branch += "restrict.";
-
- do_print("changing restrict for " + aType + " to '" + aChar + "'");
- Services.prefs.setCharPref(branch + aType, aChar);
-}
-
-function resetRestrict(aType) {
- let branch = "browser.urlbar.";
- // "title" and "url" are different from everything else, so special case them.
- if (aType == "title" || aType == "url")
- branch += "match.";
- else
- branch += "restrict.";
-
- Services.prefs.clearUserPref(branch + aType);
-}
-
-/**
- * Strip prefixes from the URI that we don't care about for searching.
- *
- * @param spec
- * The text to modify.
- * @return the modified spec.
- */
-function stripPrefix(spec)
-{
- ["http://", "https://", "ftp://"].some(scheme => {
- if (spec.startsWith(scheme)) {
- spec = spec.slice(scheme.length);
- return true;
- }
- return false;
- });
-
- if (spec.startsWith("www.")) {
- spec = spec.slice(4);
- }
- return spec;
-}
-
-function makeActionURI(action, params) {
- let encodedParams = {};
- for (let key in params) {
- encodedParams[key] = encodeURIComponent(params[key]);
- }
- let url = "moz-action:" + action + "," + JSON.stringify(encodedParams);
- return NetUtil.newURI(url);
-}
-
-// Creates a full "match" entry for a search result, suitable for passing as
-// an entry to check_autocomplete.
-function makeSearchMatch(input, extra = {}) {
- // Note that counter-intuitively, the order the object properties are defined
- // in the object passed to makeActionURI is important for check_autocomplete
- // to match them :(
- let params = {
- engineName: extra.engineName || "MozSearch",
- input,
- searchQuery: "searchQuery" in extra ? extra.searchQuery : input,
- };
- if ("alias" in extra) {
- // May be undefined, which is expected, but in that case make sure it's not
- // included in the params of the moz-action URL.
- params.alias = extra.alias;
- }
- let style = [ "action", "searchengine" ];
- if (Array.isArray(extra.style)) {
- style.push(...extra.style);
- }
- if (extra.heuristic) {
- style.push("heuristic");
- }
- return {
- uri: makeActionURI("searchengine", params),
- title: params.engineName,
- style,
- }
-}
-
-// Creates a full "match" entry for a search result, suitable for passing as
-// an entry to check_autocomplete.
-function makeVisitMatch(input, url, extra = {}) {
- // Note that counter-intuitively, the order the object properties are defined
- // in the object passed to makeActionURI is important for check_autocomplete
- // to match them :(
- let params = {
- url,
- input,
- }
- let style = [ "action", "visiturl" ];
- if (extra.heuristic) {
- style.push("heuristic");
- }
- return {
- uri: makeActionURI("visiturl", params),
- title: extra.title || url,
- style,
- }
-}
-
-function makeSwitchToTabMatch(url, extra = {}) {
- return {
- uri: makeActionURI("switchtab", {url}),
- title: extra.title || url,
- style: [ "action", "switchtab" ],
- }
-}
-
-function makeExtensionMatch(extra = {}) {
- let style = [ "action", "extension" ];
- if (extra.heuristic) {
- style.push("heuristic");
- }
-
- return {
- uri: makeActionURI("extension", {
- content: extra.content,
- keyword: extra.keyword,
- }),
- title: extra.description,
- style,
- };
-}
-
-function setFaviconForHref(href, iconHref) {
- return new Promise(resolve => {
- PlacesUtils.favicons.setAndFetchFaviconForPage(
- NetUtil.newURI(href),
- NetUtil.newURI(iconHref),
- true,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- resolve,
- Services.scriptSecurityManager.getSystemPrincipal()
- );
- });
-}
-
-function makeTestServer(port=-1) {
- let httpServer = new HttpServer();
- httpServer.start(port);
- do_register_cleanup(() => httpServer.stop(() => {}));
- return httpServer;
-}
-
-function* addTestEngine(basename, httpServer=undefined) {
- httpServer = httpServer || makeTestServer();
- httpServer.registerDirectory("/", do_get_cwd());
- let dataUrl =
- "http://localhost:" + httpServer.identity.primaryPort + "/data/";
-
- do_print("Adding engine: " + basename);
- return yield new Promise(resolve => {
- Services.obs.addObserver(function obs(subject, topic, data) {
- let engine = subject.QueryInterface(Ci.nsISearchEngine);
- do_print("Observed " + data + " for " + engine.name);
- if (data != "engine-added" || engine.name != basename) {
- return;
- }
-
- Services.obs.removeObserver(obs, "browser-search-engine-modified");
- do_register_cleanup(() => Services.search.removeEngine(engine));
- resolve(engine);
- }, "browser-search-engine-modified", false);
-
- do_print("Adding engine from URL: " + dataUrl + basename);
- Services.search.addEngine(dataUrl + basename, null, null, false);
- });
-}
-
-// Ensure we have a default search engine and the keyword.enabled preference
-// set.
-add_task(function* ensure_search_engine() {
- // keyword.enabled is necessary for the tests to see keyword searches.
- Services.prefs.setBoolPref("keyword.enabled", true);
-
- // Initialize the search service, but first set this geo IP pref to a dummy
- // string. When the search service is initialized, it contacts the URI named
- // in this pref, which breaks the test since outside connections aren't
- // allowed.
- let geoPref = "browser.search.geoip.url";
- Services.prefs.setCharPref(geoPref, "");
- do_register_cleanup(() => Services.prefs.clearUserPref(geoPref));
- yield new Promise(resolve => {
- Services.search.init(resolve);
- });
-
- // Remove any existing engines before adding ours.
- for (let engine of Services.search.getEngines()) {
- Services.search.removeEngine(engine);
- }
- Services.search.addEngineWithDetails("MozSearch", "", "", "", "GET",
- "http://s.example.com/search");
- let engine = Services.search.getEngineByName("MozSearch");
- Services.search.currentEngine = engine;
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_416211.js b/toolkit/components/places/tests/unifiedcomplete/test_416211.js
deleted file mode 100644
index e02906ddce..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_416211.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/* 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/. */
-
-/*
- * Test bug 416211 to make sure results that match the tag show the bookmark
- * title instead of the page title.
- */
-
-add_task(function* test_tag_match_has_bookmark_title() {
- do_print("Make sure the tag match gives the bookmark title");
- let uri = NetUtil.newURI("http://theuri/");
- yield PlacesTestUtils.addVisits({ uri: uri, title: "Page title" });
- yield addBookmark({ uri: uri,
- title: "Bookmark title",
- tags: [ "superTag" ]});
- yield check_autocomplete({
- search: "superTag",
- matches: [ { uri: uri, title: "Bookmark title", tags: [ "superTag" ], style: [ "bookmark-tag" ] } ]
- });
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_416214.js b/toolkit/components/places/tests/unifiedcomplete/test_416214.js
deleted file mode 100644
index a30b3fe742..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_416214.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/* 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/. */
-
-/*
- * Test autocomplete for non-English URLs that match the tag bug 416214. Also
- * test bug 417441 by making sure escaped ascii characters like "+" remain
- * escaped.
- *
- * - add a visit for a page with a non-English URL
- * - add a tag for the page
- * - search for the tag
- * - test number of matches (should be exactly one)
- * - make sure the url is decoded
- */
-
-add_task(function* test_tag_match_url() {
- do_print("Make sure tag matches return the right url as well as '+' remain escaped");
- let uri1 = NetUtil.newURI("http://escaped/ユニコード");
- let uri2 = NetUtil.newURI("http://asciiescaped/blocking-firefox3%2B");
- yield PlacesTestUtils.addVisits([
- { uri: uri1, title: "title" },
- { uri: uri2, title: "title" }
- ]);
- yield addBookmark({ uri: uri1,
- title: "title",
- tags: [ "superTag" ],
- style: [ "bookmark-tag" ] });
- yield addBookmark({ uri: uri2,
- title: "title",
- tags: [ "superTag" ],
- style: [ "bookmark-tag" ] });
- yield check_autocomplete({
- search: "superTag",
- matches: [ { uri: uri1, title: "title", tags: [ "superTag" ], style: [ "bookmark-tag" ] },
- { uri: uri2, title: "title", tags: [ "superTag" ], style: [ "bookmark-tag" ] } ]
- });
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_417798.js b/toolkit/components/places/tests/unifiedcomplete/test_417798.js
deleted file mode 100644
index bed14b2cea..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_417798.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/* 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/. */
-
-/**
- * Test for bug 417798 to make sure javascript: URIs don't show up unless the
- * user searches for javascript: explicitly.
- */
-
-add_task(function* test_javascript_match() {
- Services.prefs.setBoolPref("browser.urlbar.autoFill.searchEngines", false);
-
- let uri1 = NetUtil.newURI("http://abc/def");
- let uri2 = NetUtil.newURI("javascript:5");
- yield PlacesTestUtils.addVisits([ { uri: uri1, title: "Title with javascript:" } ]);
- yield addBookmark({ uri: uri2,
- title: "Title with javascript:" });
-
- do_print("Match non-javascript: with plain search");
- yield check_autocomplete({
- search: "a",
- matches: [ { uri: uri1, title: "Title with javascript:" } ]
- });
-
- do_print("Match non-javascript: with almost javascript:");
- yield check_autocomplete({
- search: "javascript",
- matches: [ { uri: uri1, title: "Title with javascript:" } ]
- });
-
- do_print("Match javascript:");
- yield check_autocomplete({
- search: "javascript:",
- matches: [ { uri: uri1, title: "Title with javascript:" },
- { uri: uri2, title: "Title with javascript:", style: [ "bookmark" ]} ]
- });
-
- do_print("Match nothing with non-first javascript:");
- yield check_autocomplete({
- search: "5 javascript:",
- matches: [ ]
- });
-
- do_print("Match javascript: with multi-word search");
- yield check_autocomplete({
- search: "javascript: 5",
- matches: [ { uri: uri2, title: "Title with javascript:", style: [ "bookmark" ]} ]
- });
-
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_418257.js b/toolkit/components/places/tests/unifiedcomplete/test_418257.js
deleted file mode 100644
index 323c2a7af3..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_418257.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/* 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/. */
-
-/**
- * Test bug 418257 by making sure tags are returned with the title as part of
- * the "comment" if there are tags even if we didn't match in the tags. They
- * are separated from the title by a endash.
- */
-
-add_task(function* test_javascript_match() {
- let uri1 = NetUtil.newURI("http://page1");
- let uri2 = NetUtil.newURI("http://page2");
- let uri3 = NetUtil.newURI("http://page3");
- let uri4 = NetUtil.newURI("http://page4");
- yield PlacesTestUtils.addVisits([
- { uri: uri1, title: "tagged" },
- { uri: uri2, title: "tagged" },
- { uri: uri3, title: "tagged" },
- { uri: uri4, title: "tagged" }
- ]);
- yield addBookmark({ uri: uri1,
- title: "tagged",
- tags: [ "tag1" ] });
- yield addBookmark({ uri: uri2,
- title: "tagged",
- tags: [ "tag1", "tag2" ] });
- yield addBookmark({ uri: uri3,
- title: "tagged",
- tags: [ "tag1", "tag3" ] });
- yield addBookmark({ uri: uri4,
- title: "tagged",
- tags: [ "tag1", "tag2", "tag3" ] });
-
- do_print("Make sure tags come back in the title when matching tags");
- yield check_autocomplete({
- search: "page1 tag",
- matches: [ { uri: uri1, title: "tagged", tags: [ "tag1" ], style: [ "bookmark-tag" ] } ]
- });
-
- do_print("Check tags in title for page2");
- yield check_autocomplete({
- search: "page2 tag",
- matches: [ { uri: uri2, title: "tagged", tags: [ "tag1", "tag2" ], style: [ "bookmark-tag" ] } ]
- });
-
- do_print("Make sure tags appear even when not matching the tag");
- yield check_autocomplete({
- search: "page3",
- matches: [ { uri: uri3, title: "tagged", tags: [ "tag1", "tag3" ], style: [ "bookmark-tag" ] } ]
- });
-
- do_print("Multiple tags come in commas for page4");
- yield check_autocomplete({
- search: "page4",
- matches: [ { uri: uri4, title: "tagged", tags: [ "tag1", "tag2", "tag3" ], style: [ "bookmark-tag" ] } ]
- });
-
- do_print("Extra test just to make sure we match the title");
- yield check_autocomplete({
- search: "tag2",
- matches: [ { uri: uri2, title: "tagged", tags: [ "tag1", "tag2" ], style: [ "bookmark-tag" ] },
- { uri: uri4, title: "tagged", tags: [ "tag1", "tag2", "tag3" ], style: [ "bookmark-tag" ] } ]
- });
-
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_422277.js b/toolkit/components/places/tests/unifiedcomplete/test_422277.js
deleted file mode 100644
index df6f7601a4..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_422277.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/* 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/. */
-
-/**
- * Test bug 422277 to make sure bad escaped uris don't get escaped. This makes
- * sure we don't hit an assertion for "not a UTF8 string".
- */
-
-add_task(function* test_javascript_match() {
- do_print("Bad escaped uri stays escaped");
- let uri1 = NetUtil.newURI("http://site/%EAid");
- yield PlacesTestUtils.addVisits([ { uri: uri1, title: "title" } ]);
- yield check_autocomplete({
- search: "site",
- matches: [ { uri: uri1, title: "title" } ]
- });
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_autocomplete_functional.js b/toolkit/components/places/tests/unifiedcomplete/test_autocomplete_functional.js
deleted file mode 100644
index cd2dfdb17a..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_autocomplete_functional.js
+++ /dev/null
@@ -1,171 +0,0 @@
-/* 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/. */
-
-// Functional tests for inline autocomplete
-
-const PREF_AUTOCOMPLETE_ENABLED = "browser.urlbar.autocomplete.enabled";
-
-add_task(function* test_disabling_autocomplete() {
- do_print("Check disabling autocomplete disables autofill");
- Services.prefs.setBoolPref(PREF_AUTOCOMPLETE_ENABLED, false);
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://visit.mozilla.org"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "vis",
- autofilled: "vis",
- completed: "vis"
- });
- yield cleanup();
-});
-
-add_task(function* test_urls_order() {
- do_print("Add urls, check for correct order");
- let places = [{ uri: NetUtil.newURI("http://visit1.mozilla.org") },
- { uri: NetUtil.newURI("http://visit2.mozilla.org"),
- transition: TRANSITION_TYPED }];
- yield PlacesTestUtils.addVisits(places);
- yield check_autocomplete({
- search: "vis",
- autofilled: "visit2.mozilla.org/",
- completed: "visit2.mozilla.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_ignore_prefix() {
- do_print("Add urls, make sure www and http are ignored");
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", false);
- yield PlacesTestUtils.addVisits(NetUtil.newURI("http://www.visit1.mozilla.org"));
- yield check_autocomplete({
- search: "visit1",
- autofilled: "visit1.mozilla.org/",
- completed: "visit1.mozilla.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_after_host() {
- do_print("Autocompleting after an existing host completes to the url");
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", false);
- yield PlacesTestUtils.addVisits(NetUtil.newURI("http://www.visit3.mozilla.org"));
- yield check_autocomplete({
- search: "visit3.mozilla.org/",
- autofilled: "visit3.mozilla.org/",
- completed: "visit3.mozilla.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_respect_www() {
- do_print("Searching for www.me should yield www.me.mozilla.org/");
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", false);
- yield PlacesTestUtils.addVisits(NetUtil.newURI("http://www.me.mozilla.org"));
- yield check_autocomplete({
- search: "www.me",
- autofilled: "www.me.mozilla.org/",
- completed: "www.me.mozilla.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_bookmark_first() {
- do_print("With a bookmark and history, the query result should be the bookmark");
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", false);
- yield addBookmark({ uri: NetUtil.newURI("http://bookmark1.mozilla.org/") });
- yield PlacesTestUtils.addVisits(NetUtil.newURI("http://bookmark1.mozilla.org/foo"));
- yield check_autocomplete({
- search: "bookmark",
- autofilled: "bookmark1.mozilla.org/",
- completed: "bookmark1.mozilla.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_full_path() {
- do_print("Check to make sure we get the proper results with full paths");
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", false);
- let places = [{ uri: NetUtil.newURI("http://smokey.mozilla.org/foo/bar/baz?bacon=delicious") },
- { uri: NetUtil.newURI("http://smokey.mozilla.org/foo/bar/baz?bacon=smokey") }];
- yield PlacesTestUtils.addVisits(places);
- yield check_autocomplete({
- search: "smokey",
- autofilled: "smokey.mozilla.org/",
- completed: "smokey.mozilla.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_complete_to_slash() {
- do_print("Check to make sure we autocomplete to the following '/'");
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", false);
- let places = [{ uri: NetUtil.newURI("http://smokey.mozilla.org/foo/bar/baz?bacon=delicious") },
- { uri: NetUtil.newURI("http://smokey.mozilla.org/foo/bar/baz?bacon=smokey") }];
- yield PlacesTestUtils.addVisits(places);
- yield check_autocomplete({
- search: "smokey.mozilla.org/fo",
- autofilled: "smokey.mozilla.org/foo/",
- completed: "http://smokey.mozilla.org/foo/",
- });
- yield cleanup();
-});
-
-add_task(function* test_complete_to_slash_with_www() {
- do_print("Check to make sure we autocomplete to the following '/'");
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", false);
- let places = [{ uri: NetUtil.newURI("http://www.smokey.mozilla.org/foo/bar/baz?bacon=delicious") },
- { uri: NetUtil.newURI("http://www.smokey.mozilla.org/foo/bar/baz?bacon=smokey") }];
- yield PlacesTestUtils.addVisits(places);
- yield check_autocomplete({
- search: "smokey.mozilla.org/fo",
- autofilled: "smokey.mozilla.org/foo/",
- completed: "http://www.smokey.mozilla.org/foo/",
- });
- yield cleanup();
-});
-
-add_task(function* test_complete_querystring() {
- do_print("Check to make sure we autocomplete after ?");
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", false);
- yield PlacesTestUtils.addVisits(NetUtil.newURI("http://smokey.mozilla.org/foo?bacon=delicious"));
- yield check_autocomplete({
- search: "smokey.mozilla.org/foo?",
- autofilled: "smokey.mozilla.org/foo?bacon=delicious",
- completed: "http://smokey.mozilla.org/foo?bacon=delicious",
- });
- yield cleanup();
-});
-
-add_task(function* test_complete_fragment() {
- do_print("Check to make sure we autocomplete after #");
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", false);
- yield PlacesTestUtils.addVisits(NetUtil.newURI("http://smokey.mozilla.org/foo?bacon=delicious#bar"));
- yield check_autocomplete({
- search: "smokey.mozilla.org/foo?bacon=delicious#bar",
- autofilled: "smokey.mozilla.org/foo?bacon=delicious#bar",
- completed: "http://smokey.mozilla.org/foo?bacon=delicious#bar",
- });
- yield cleanup();
-});
-
-add_task(function* test_autocomplete_enabled_pref() {
- Services.prefs.setBoolPref(PREF_AUTOCOMPLETE_ENABLED, false);
- let types = ["history", "bookmark", "openpage"];
- for (type of types) {
- do_check_eq(Services.prefs.getBoolPref("browser.urlbar.suggest." + type), false,
- "suggest." + type + "pref should be false");
- }
- Services.prefs.setBoolPref(PREF_AUTOCOMPLETE_ENABLED, true);
- for (type of types) {
- do_check_eq(Services.prefs.getBoolPref("browser.urlbar.suggest." + type), true,
- "suggest." + type + "pref should be true");
- }
-
- // Clear prefs.
- Services.prefs.clearUserPref(PREF_AUTOCOMPLETE_ENABLED);
- for (type of types) {
- Services.prefs.clearUserPref("browser.urlbar.suggest." + type);
- }
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_autocomplete_on_value_removed_479089.js b/toolkit/components/places/tests/unifiedcomplete/test_autocomplete_on_value_removed_479089.js
deleted file mode 100644
index ecc96266b4..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_autocomplete_on_value_removed_479089.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/*
- * Need to test that removing a page from autocomplete actually removes a page
- * Description From Shawn Wilsher :sdwilsh 2009-02-18 11:29:06 PST
- * We don't test the code path of onValueRemoved
- * for the autocomplete implementation
- * Bug 479089
- */
-
-add_task(function* test_autocomplete_on_value_removed() {
- let listener = Cc["@mozilla.org/autocomplete/search;1?name=unifiedcomplete"].
- getService(Components.interfaces.nsIAutoCompleteSimpleResultListener);
-
- let testUri = NetUtil.newURI("http://foo.mozilla.com/");
- yield PlacesTestUtils.addVisits({
- uri: testUri,
- referrer: uri("http://mozilla.com/")
- });
-
- let query = PlacesUtils.history.getNewQuery();
- let options = PlacesUtils.history.getNewQueryOptions();
- // look for this uri only
- query.uri = testUri;
-
- let root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
- Assert.equal(root.childCount, 1);
- // call the untested code path
- listener.onValueRemoved(null, testUri.spec, true);
- // make sure it is GONE from the DB
- Assert.equal(root.childCount, 0);
- // close the container
- root.containerOpen = false;
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_autofill_default_behavior.js b/toolkit/components/places/tests/unifiedcomplete/test_autofill_default_behavior.js
deleted file mode 100644
index 482fcf4853..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_autofill_default_behavior.js
+++ /dev/null
@@ -1,310 +0,0 @@
-/* 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/. */
-
-/**
- * Test autoFill for different default behaviors.
- */
-
-add_task(function* test_default_behavior_host() {
- let uri1 = NetUtil.newURI("http://typed/");
- let uri2 = NetUtil.newURI("http://visited/");
- let uri3 = NetUtil.newURI("http://bookmarked/");
- let uri4 = NetUtil.newURI("http://tpbk/");
- let uri5 = NetUtil.newURI("http://tagged/");
-
- yield PlacesTestUtils.addVisits([
- { uri: uri1, title: "typed", transition: TRANSITION_TYPED },
- { uri: uri2, title: "visited" },
- { uri: uri4, title: "tpbk", transition: TRANSITION_TYPED },
- ]);
- yield addBookmark( { uri: uri3, title: "bookmarked" } );
- yield addBookmark( { uri: uri4, title: "tpbk" } );
- yield addBookmark( { uri: uri5, title: "title", tags: ["foo"] } );
-
- yield setFaviconForHref(uri1.spec, "chrome://global/skin/icons/information-16.png");
- yield setFaviconForHref(uri3.spec, "chrome://global/skin/icons/error-16.png");
-
- // RESTRICT TO HISTORY.
- Services.prefs.setBoolPref("browser.urlbar.suggest.history", true);
- Services.prefs.setBoolPref("browser.urlbar.suggest.history.onlyTyped", false);
- Services.prefs.setBoolPref("browser.urlbar.suggest.bookmark", false);
-
- do_print("Restrict history, common visit, should not autoFill");
- yield check_autocomplete({
- search: "vi",
- matches: [ { uri: uri2, title: "visited" } ],
- autofilled: "vi",
- completed: "vi"
- });
-
- do_print("Restrict history, typed visit, should autoFill");
- yield check_autocomplete({
- search: "ty",
- matches: [ { uri: uri1, title: "typed", style: [ "autofill", "heuristic" ],
- icon: "chrome://global/skin/icons/information-16.png" } ],
- autofilled: "typed/",
- completed: "typed/"
- });
-
- // Don't autoFill this one cause it's not typed.
- do_print("Restrict history, bookmark, should not autoFill");
- yield check_autocomplete({
- search: "bo",
- matches: [ ],
- autofilled: "bo",
- completed: "bo"
- });
-
- // Note we don't show this one cause it's not typed.
- do_print("Restrict history, typed bookmark, should autoFill");
- yield check_autocomplete({
- search: "tp",
- matches: [ { uri: uri4, title: "tpbk", style: [ "autofill", "heuristic" ] } ],
- autofilled: "tpbk/",
- completed: "tpbk/"
- });
-
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", false);
-
- // We are not restricting on typed, so we autoFill the bookmark even if we
- // are restricted to history. We accept that cause not doing that
- // would be a perf hit and the privacy implications are very weak.
- do_print("Restrict history, bookmark, autoFill.typed = false, should autoFill");
- yield check_autocomplete({
- search: "bo",
- matches: [ { uri: uri3, title: "bookmarked", style: [ "autofill", "heuristic" ],
- icon: "chrome://global/skin/icons/error-16.png" } ],
- autofilled: "bookmarked/",
- completed: "bookmarked/"
- });
-
- do_print("Restrict history, common visit, autoFill.typed = false, should autoFill");
- yield check_autocomplete({
- search: "vi",
- matches: [ { uri: uri2, title: "visited", style: [ "autofill", "heuristic" ] } ],
- autofilled: "visited/",
- completed: "visited/"
- });
-
- // RESTRICT TO TYPED.
- // This should basically ignore autoFill.typed and acts as if it would be set.
- Services.prefs.setBoolPref("browser.urlbar.suggest.history.onlyTyped", true);
-
- // Typed behavior basically acts like history, but filters on typed.
- do_print("Restrict typed, common visit, autoFill.typed = false, should not autoFill");
- yield check_autocomplete({
- search: "vi",
- matches: [ ],
- autofilled: "vi",
- completed: "vi"
- });
-
- do_print("Restrict typed, typed visit, autofill.typed = false, should autoFill");
- yield check_autocomplete({
- search: "ty",
- matches: [ { uri: uri1, title: "typed", style: [ "autofill", "heuristic" ],
- icon: "chrome://global/skin/icons/information-16.png"} ],
- autofilled: "typed/",
- completed: "typed/"
- });
-
- do_print("Restrict typed, bookmark, autofill.typed = false, should not autoFill");
- yield check_autocomplete({
- search: "bo",
- matches: [ ],
- autofilled: "bo",
- completed: "bo"
- });
-
- do_print("Restrict typed, typed bookmark, autofill.typed = false, should autoFill");
- yield check_autocomplete({
- search: "tp",
- matches: [ { uri: uri4, title: "tpbk", style: [ "autofill", "heuristic" ] } ],
- autofilled: "tpbk/",
- completed: "tpbk/"
- });
-
- // RESTRICT BOOKMARKS.
- Services.prefs.setBoolPref("browser.urlbar.suggest.history", false);
- Services.prefs.setBoolPref("browser.urlbar.suggest.bookmark", true);
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", true);
-
- do_print("Restrict bookmarks, common visit, should not autoFill");
- yield check_autocomplete({
- search: "vi",
- matches: [ ],
- autofilled: "vi",
- completed: "vi"
- });
-
- do_print("Restrict bookmarks, typed visit, should not autoFill");
- yield check_autocomplete({
- search: "ty",
- matches: [ ],
- autofilled: "ty",
- completed: "ty"
- });
-
- // Don't autoFill this one cause it's not typed.
- do_print("Restrict bookmarks, bookmark, should not autoFill");
- yield check_autocomplete({
- search: "bo",
- matches: [ { uri: uri3, title: "bookmarked", style: [ "bookmark" ],
- icon: "chrome://global/skin/icons/error-16.png"} ],
- autofilled: "bo",
- completed: "bo"
- });
-
- // Note we don't show this one cause it's not typed.
- do_print("Restrict bookmarks, typed bookmark, should autoFill");
- yield check_autocomplete({
- search: "tp",
- matches: [ { uri: uri4, title: "tpbk", style: [ "autofill", "heuristic" ] } ],
- autofilled: "tpbk/",
- completed: "tpbk/"
- });
-
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", false);
-
- do_print("Restrict bookmarks, bookmark, autofill.typed = false, should autoFill");
- yield check_autocomplete({
- search: "bo",
- matches: [ { uri: uri3, title: "bookmarked", style: [ "autofill", "heuristic" ],
- icon: "chrome://global/skin/icons/error-16.png" } ],
- autofilled: "bookmarked/",
- completed: "bookmarked/"
- });
-
- // Don't autofill because it's a title.
- do_print("Restrict bookmarks, title, autofill.typed = false, should not autoFill");
- yield check_autocomplete({
- search: "# ta",
- matches: [ ],
- autofilled: "# ta",
- completed: "# ta"
- });
-
- // Don't autofill because it's a tag.
- do_print("Restrict bookmarks, tag, autofill.typed = false, should not autoFill");
- yield check_autocomplete({
- search: "+ ta",
- matches: [ { uri: uri5, title: "title", tags: [ "foo" ], style: [ "tag" ] } ],
- autofilled: "+ ta",
- completed: "+ ta"
- });
-
- yield cleanup();
-});
-
-add_task(function* test_default_behavior_url() {
- let uri1 = NetUtil.newURI("http://typed/ty/");
- let uri2 = NetUtil.newURI("http://visited/vi/");
- let uri3 = NetUtil.newURI("http://bookmarked/bo/");
- let uri4 = NetUtil.newURI("http://tpbk/tp/");
-
- yield PlacesTestUtils.addVisits([
- { uri: uri1, title: "typed", transition: TRANSITION_TYPED },
- { uri: uri2, title: "visited" },
- { uri: uri4, title: "tpbk", transition: TRANSITION_TYPED },
- ]);
- yield addBookmark( { uri: uri3, title: "bookmarked" } );
- yield addBookmark( { uri: uri4, title: "tpbk" } );
-
- yield setFaviconForHref(uri1.spec, "chrome://global/skin/icons/information-16.png");
- yield setFaviconForHref(uri3.spec, "chrome://global/skin/icons/error-16.png");
-
- // RESTRICT TO HISTORY.
- Services.prefs.setBoolPref("browser.urlbar.suggest.history", true);
- Services.prefs.setBoolPref("browser.urlbar.suggest.history.onlyTyped", false);
- Services.prefs.setBoolPref("browser.urlbar.suggest.bookmark", false);
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", true);
- Services.prefs.setBoolPref("browser.urlbar.autoFill.searchEngines", false);
-
- do_print("URL: Restrict history, common visit, should not autoFill");
- yield check_autocomplete({
- search: "visited/v",
- matches: [ { uri: uri2, title: "visited" } ],
- autofilled: "visited/v",
- completed: "visited/v"
- });
-
- do_print("URL: Restrict history, typed visit, should autoFill");
- yield check_autocomplete({
- search: "typed/t",
- matches: [ { uri: uri1, title: "typed/ty/", style: [ "autofill", "heuristic" ],
- icon: "chrome://global/skin/icons/information-16.png"} ],
- autofilled: "typed/ty/",
- completed: "http://typed/ty/"
- });
-
- // Don't autoFill this one cause it's not typed.
- do_print("URL: Restrict history, bookmark, should not autoFill");
- yield check_autocomplete({
- search: "bookmarked/b",
- matches: [ ],
- autofilled: "bookmarked/b",
- completed: "bookmarked/b"
- });
-
- // Note we don't show this one cause it's not typed.
- do_print("URL: Restrict history, typed bookmark, should autoFill");
- yield check_autocomplete({
- search: "tpbk/t",
- matches: [ { uri: uri4, title: "tpbk/tp/", style: [ "autofill", "heuristic" ] } ],
- autofilled: "tpbk/tp/",
- completed: "http://tpbk/tp/"
- });
-
- // RESTRICT BOOKMARKS.
- Services.prefs.setBoolPref("browser.urlbar.suggest.history", false);
- Services.prefs.setBoolPref("browser.urlbar.suggest.bookmark", true);
-
- do_print("URL: Restrict bookmarks, common visit, should not autoFill");
- yield check_autocomplete({
- search: "visited/v",
- matches: [ ],
- autofilled: "visited/v",
- completed: "visited/v"
- });
-
- do_print("URL: Restrict bookmarks, typed visit, should not autoFill");
- yield check_autocomplete({
- search: "typed/t",
- matches: [ ],
- autofilled: "typed/t",
- completed: "typed/t"
- });
-
- // Don't autoFill this one cause it's not typed.
- do_print("URL: Restrict bookmarks, bookmark, should not autoFill");
- yield check_autocomplete({
- search: "bookmarked/b",
- matches: [ { uri: uri3, title: "bookmarked", style: [ "bookmark" ],
- icon: "chrome://global/skin/icons/error-16.png" } ],
- autofilled: "bookmarked/b",
- completed: "bookmarked/b"
- });
-
- // Note we don't show this one cause it's not typed.
- do_print("URL: Restrict bookmarks, typed bookmark, should autoFill");
- yield check_autocomplete({
- search: "tpbk/t",
- matches: [ { uri: uri4, title: "tpbk/tp/", style: [ "autofill", "heuristic" ] } ],
- autofilled: "tpbk/tp/",
- completed: "http://tpbk/tp/"
- });
-
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", false);
-
- do_print("URL: Restrict bookmarks, bookmark, autofill.typed = false, should autoFill");
- yield check_autocomplete({
- search: "bookmarked/b",
- matches: [ { uri: uri3, title: "bookmarked/bo/", style: [ "autofill", "heuristic" ],
- icon: "chrome://global/skin/icons/error-16.png" } ],
- autofilled: "bookmarked/bo/",
- completed: "http://bookmarked/bo/"
- });
-
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_avoid_middle_complete.js b/toolkit/components/places/tests/unifiedcomplete/test_avoid_middle_complete.js
deleted file mode 100644
index 54fc343cac..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_avoid_middle_complete.js
+++ /dev/null
@@ -1,179 +0,0 @@
-/* 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/. */
-
-add_task(function* test_prefix_space_noautofill() {
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://moz.org/test/"),
- transition: TRANSITION_TYPED
- });
-
- do_print("Should not try to autoFill if search string contains a space");
- yield check_autocomplete({
- search: " mo",
- autofilled: " mo",
- completed: " mo"
- });
-
- yield cleanup();
-});
-
-add_task(function* test_trailing_space_noautofill() {
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://moz.org/test/"),
- transition: TRANSITION_TYPED
- });
-
- do_print("Should not try to autoFill if search string contains a space");
- yield check_autocomplete({
- search: "mo ",
- autofilled: "mo ",
- completed: "mo "
- });
-
- yield cleanup();
-});
-
-add_task(function* test_searchEngine_autofill() {
- Services.prefs.setBoolPref("browser.urlbar.autoFill.searchEngines", true);
- Services.search.addEngineWithDetails("CakeSearch", "", "", "",
- "GET", "http://cake.search/");
- let engine = Services.search.getEngineByName("CakeSearch");
- engine.addParam("q", "{searchTerms}", null);
- do_register_cleanup(() => Services.search.removeEngine(engine));
-
- do_print("Should autoFill search engine if search string does not contains a space");
- yield check_autocomplete({
- search: "ca",
- autofilled: "cake.search",
- completed: "http://cake.search"
- });
-
- yield cleanup();
-});
-
-add_task(function* test_searchEngine_prefix_space_noautofill() {
- Services.prefs.setBoolPref("browser.urlbar.autoFill.searchEngines", true);
- Services.search.addEngineWithDetails("CupcakeSearch", "", "", "",
- "GET", "http://cupcake.search/");
- let engine = Services.search.getEngineByName("CupcakeSearch");
- engine.addParam("q", "{searchTerms}", null);
- do_register_cleanup(() => Services.search.removeEngine(engine));
-
- do_print("Should not try to autoFill search engine if search string contains a space");
- yield check_autocomplete({
- search: " cu",
- autofilled: " cu",
- completed: " cu"
- });
-
- yield cleanup();
-});
-
-add_task(function* test_searchEngine_trailing_space_noautofill() {
- Services.prefs.setBoolPref("browser.urlbar.autoFill.searchEngines", true);
- Services.search.addEngineWithDetails("BaconSearch", "", "", "",
- "GET", "http://bacon.search/");
- let engine = Services.search.getEngineByName("BaconSearch");
- engine.addParam("q", "{searchTerms}", null);
- do_register_cleanup(() => Services.search.removeEngine(engine));
-
- do_print("Should not try to autoFill search engine if search string contains a space");
- yield check_autocomplete({
- search: "ba ",
- autofilled: "ba ",
- completed: "ba "
- });
-
- yield cleanup();
-});
-
-add_task(function* test_searchEngine_www_noautofill() {
- Services.prefs.setBoolPref("browser.urlbar.autoFill.searchEngines", true);
- Services.search.addEngineWithDetails("HamSearch", "", "", "",
- "GET", "http://ham.search/");
- let engine = Services.search.getEngineByName("HamSearch");
- engine.addParam("q", "{searchTerms}", null);
- do_register_cleanup(() => Services.search.removeEngine(engine));
-
- do_print("Should not autoFill search engine if search string contains www. but engine doesn't");
- yield check_autocomplete({
- search: "www.ham",
- autofilled: "www.ham",
- completed: "www.ham"
- });
-
- yield cleanup();
-});
-
-add_task(function* test_searchEngine_different_scheme_noautofill() {
- Services.prefs.setBoolPref("browser.urlbar.autoFill.searchEngines", true);
- Services.search.addEngineWithDetails("PieSearch", "", "", "",
- "GET", "https://pie.search/");
- let engine = Services.search.getEngineByName("PieSearch");
- engine.addParam("q", "{searchTerms}", null);
- do_register_cleanup(() => Services.search.removeEngine(engine));
-
- do_print("Should not autoFill search engine if search string has a different scheme.");
- yield check_autocomplete({
- search: "http://pie",
- autofilled: "http://pie",
- completed: "http://pie"
- });
-
- yield cleanup();
-});
-
-add_task(function* test_searchEngine_matching_prefix_autofill() {
- Services.prefs.setBoolPref("browser.urlbar.autoFill.searchEngines", true);
- Services.search.addEngineWithDetails("BeanSearch", "", "", "",
- "GET", "http://www.bean.search/");
- let engine = Services.search.getEngineByName("BeanSearch");
- engine.addParam("q", "{searchTerms}", null);
- do_register_cleanup(() => Services.search.removeEngine(engine));
-
-
- do_print("Should autoFill search engine if search string has matching prefix.");
- yield check_autocomplete({
- search: "http://www.be",
- autofilled: "http://www.bean.search",
- completed: "http://www.bean.search"
- })
-
- do_print("Should autoFill search engine if search string has www prefix.");
- yield check_autocomplete({
- search: "www.be",
- autofilled: "www.bean.search",
- completed: "http://www.bean.search"
- });
-
- do_print("Should autoFill search engine if search string has matching scheme.");
- yield check_autocomplete({
- search: "http://be",
- autofilled: "http://bean.search",
- completed: "http://www.bean.search"
- });
-
- yield cleanup();
-});
-
-add_task(function* test_prefix_autofill() {
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/test/"),
- transition: TRANSITION_TYPED
- });
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://moz.org/test/"),
- transition: TRANSITION_TYPED
- });
-
- do_print("Should not try to autoFill in-the-middle if a search is canceled immediately");
- yield check_autocomplete({
- incompleteSearch: "moz",
- search: "mozi",
- autofilled: "mozilla.org/",
- completed: "mozilla.org/"
- });
-
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_avoid_stripping_to_empty_tokens.js b/toolkit/components/places/tests/unifiedcomplete/test_avoid_stripping_to_empty_tokens.js
deleted file mode 100644
index 1fcfe1c751..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_avoid_stripping_to_empty_tokens.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/* 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/. */
-
-add_task(function* test_protocol_trimming() {
- for (let prot of ["http", "https", "ftp"]) {
- let visit = {
- // Include the protocol in the query string to ensure we get matches (see bug 1059395)
- uri: NetUtil.newURI(prot + "://www.mozilla.org/test/?q=" + prot + encodeURIComponent("://") + "www.foo"),
- title: "Test title",
- transition: TRANSITION_TYPED
- };
- yield PlacesTestUtils.addVisits(visit);
- let matches = [{uri: visit.uri, title: visit.title}];
-
- let inputs = [
- prot + "://",
- prot + ":// ",
- prot + ":// mo",
- prot + "://mo te",
- prot + "://www.",
- prot + "://www. ",
- prot + "://www. mo",
- prot + "://www.mo te",
- "www.",
- "www. ",
- "www. mo",
- "www.mo te"
- ];
- for (let input of inputs) {
- do_print("Searching for: " + input);
- yield check_autocomplete({
- search: input,
- matches: matches
- });
- }
-
- yield cleanup();
- }
-});
-
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_casing.js b/toolkit/components/places/tests/unifiedcomplete/test_casing.js
deleted file mode 100644
index 585b51be10..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_casing.js
+++ /dev/null
@@ -1,157 +0,0 @@
-/* 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/. */
-
-add_task(function* test_casing_1() {
- do_print("Searching for cased entry 1");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/test/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "MOZ",
- autofilled: "MOZilla.org/",
- completed: "mozilla.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_casing_2() {
- do_print("Searching for cased entry 2");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/test/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "mozilla.org/T",
- autofilled: "mozilla.org/T",
- completed: "mozilla.org/T"
- });
- yield cleanup();
-});
-
-add_task(function* test_casing_3() {
- do_print("Searching for cased entry 3");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/Test/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "mozilla.org/T",
- autofilled: "mozilla.org/Test/",
- completed: "http://mozilla.org/Test/"
- });
- yield cleanup();
-});
-
-add_task(function* test_casing_4() {
- do_print("Searching for cased entry 4");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/Test/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "mOzilla.org/t",
- autofilled: "mOzilla.org/t",
- completed: "mOzilla.org/t"
- });
- yield cleanup();
-});
-
-add_task(function* test_casing_5() {
- do_print("Searching for cased entry 5");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/Test/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "mOzilla.org/T",
- autofilled: "mOzilla.org/Test/",
- completed: "http://mozilla.org/Test/"
- });
- yield cleanup();
-});
-
-add_task(function* test_untrimmed_casing() {
- do_print("Searching for untrimmed cased entry");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/Test/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "http://mOz",
- autofilled: "http://mOzilla.org/",
- completed: "http://mozilla.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_untrimmed_www_casing() {
- do_print("Searching for untrimmed cased entry with www");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://www.mozilla.org/Test/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "http://www.mOz",
- autofilled: "http://www.mOzilla.org/",
- completed: "http://www.mozilla.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_untrimmed_path_casing() {
- do_print("Searching for untrimmed cased entry with path");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/Test/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "http://mOzilla.org/t",
- autofilled: "http://mOzilla.org/t",
- completed: "http://mOzilla.org/t"
- });
- yield cleanup();
-});
-
-add_task(function* test_untrimmed_path_casing_2() {
- do_print("Searching for untrimmed cased entry with path 2");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/Test/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "http://mOzilla.org/T",
- autofilled: "http://mOzilla.org/Test/",
- completed: "http://mozilla.org/Test/"
- });
- yield cleanup();
-});
-
-add_task(function* test_untrimmed_path_www_casing() {
- do_print("Searching for untrimmed cased entry with www and path");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://www.mozilla.org/Test/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "http://www.mOzilla.org/t",
- autofilled: "http://www.mOzilla.org/t",
- completed: "http://www.mOzilla.org/t"
- });
- yield cleanup();
-});
-
-add_task(function* test_untrimmed_path_www_casing_2() {
- do_print("Searching for untrimmed cased entry with www and path 2");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://www.mozilla.org/Test/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "http://www.mOzilla.org/T",
- autofilled: "http://www.mOzilla.org/Test/",
- completed: "http://www.mozilla.org/Test/"
- });
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_do_not_trim.js b/toolkit/components/places/tests/unifiedcomplete/test_do_not_trim.js
deleted file mode 100644
index 014d749988..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_do_not_trim.js
+++ /dev/null
@@ -1,91 +0,0 @@
-/* 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/. */
-
-// Inline should never return matches shorter than the search string, since
-// that largely confuses completeDefaultIndex
-
-add_task(function* test_not_autofill_ws_1() {
- do_print("Do not autofill whitespaced entry 1");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/link/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "mozilla.org ",
- autofilled: "mozilla.org ",
- completed: "mozilla.org "
- });
- yield cleanup();
-});
-
-add_task(function* test_not_autofill_ws_2() {
- do_print("Do not autofill whitespaced entry 2");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/link/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "mozilla.org/ ",
- autofilled: "mozilla.org/ ",
- completed: "mozilla.org/ "
- });
- yield cleanup();
-});
-
-add_task(function* test_not_autofill_ws_3() {
- do_print("Do not autofill whitespaced entry 3");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/link/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "mozilla.org/link ",
- autofilled: "mozilla.org/link ",
- completed: "mozilla.org/link "
- });
- yield cleanup();
-});
-
-add_task(function* test_not_autofill_ws_4() {
- do_print("Do not autofill whitespaced entry 4");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/link/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "mozilla.org/link/ ",
- autofilled: "mozilla.org/link/ ",
- completed: "mozilla.org/link/ "
- });
- yield cleanup();
-});
-
-
-add_task(function* test_not_autofill_ws_5() {
- do_print("Do not autofill whitespaced entry 5");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/link/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "moz illa ",
- autofilled: "moz illa ",
- completed: "moz illa "
- });
- yield cleanup();
-});
-
-add_task(function* test_not_autofill_ws_6() {
- do_print("Do not autofill whitespaced entry 6");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/link/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: " mozilla",
- autofilled: " mozilla",
- completed: " mozilla"
- });
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_download_embed_bookmarks.js b/toolkit/components/places/tests/unifiedcomplete/test_download_embed_bookmarks.js
deleted file mode 100644
index 72661d0750..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_download_embed_bookmarks.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
- * vim:set ts=2 sw=2 sts=2 et:
- * 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/. */
-
-/**
- * Tests bug 449406 to ensure that TRANSITION_DOWNLOAD, TRANSITION_EMBED and
- * TRANSITION_FRAMED_LINK bookmarked uri's show up in the location bar.
- */
-
-add_task(function* test_download_embed_bookmarks() {
- let uri1 = NetUtil.newURI("http://download/bookmarked");
- let uri2 = NetUtil.newURI("http://embed/bookmarked");
- let uri3 = NetUtil.newURI("http://framed/bookmarked");
- let uri4 = NetUtil.newURI("http://download");
- let uri5 = NetUtil.newURI("http://embed");
- let uri6 = NetUtil.newURI("http://framed");
- yield PlacesTestUtils.addVisits([
- { uri: uri1, title: "download-bookmark", transition: TRANSITION_DOWNLOAD },
- { uri: uri2, title: "embed-bookmark", transition: TRANSITION_EMBED },
- { uri: uri3, title: "framed-bookmark", transition: TRANSITION_FRAMED_LINK},
- { uri: uri4, title: "download2", transition: TRANSITION_DOWNLOAD },
- { uri: uri5, title: "embed2", transition: TRANSITION_EMBED },
- { uri: uri6, title: "framed2", transition: TRANSITION_FRAMED_LINK }
- ]);
- yield addBookmark({ uri: uri1,
- title: "download-bookmark" });
- yield addBookmark({ uri: uri2,
- title: "embed-bookmark" });
- yield addBookmark({ uri: uri3,
- title: "framed-bookmark" });
-
- do_print("Searching for bookmarked download uri matches");
- yield check_autocomplete({
- search: "download-bookmark",
- matches: [ { uri: uri1, title: "download-bookmark", style: [ "bookmark" ] } ]
- });
-
- do_print("Searching for bookmarked embed uri matches");
- yield check_autocomplete({
- search: "embed-bookmark",
- matches: [ { uri: uri2, title: "embed-bookmark", style: [ "bookmark" ] } ]
- });
-
- do_print("Searching for bookmarked framed uri matches");
- yield check_autocomplete({
- search: "framed-bookmark",
- matches: [ { uri: uri3, title: "framed-bookmark", style: [ "bookmark" ] } ]
- });
-
- do_print("Searching for download uri does not match");
- yield check_autocomplete({
- search: "download2",
- matches: [ ]
- });
-
- do_print("Searching for embed uri does not match");
- yield check_autocomplete({
- search: "embed2",
- matches: [ ]
- });
-
- do_print("Searching for framed uri does not match");
- yield check_autocomplete({
- search: "framed2",
- matches: [ ]
- });
-
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_dupe_urls.js b/toolkit/components/places/tests/unifiedcomplete/test_dupe_urls.js
deleted file mode 100644
index a39c152364..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_dupe_urls.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Ensure inline autocomplete doesn't return zero frecency pages.
-
-add_task(function* test_dupe_urls() {
- do_print("Searching for urls with dupes should only show one");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/"),
- transition: TRANSITION_TYPED
- }, {
- uri: NetUtil.newURI("http://mozilla.org/?")
- });
- yield check_autocomplete({
- search: "moz",
- autofilled: "mozilla.org/",
- completed: "mozilla.org/",
- matches: [ { uri: NetUtil.newURI("http://mozilla.org/"),
- title: "mozilla.org",
- style: [ "autofill", "heuristic" ] } ]
- });
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_empty_search.js b/toolkit/components/places/tests/unifiedcomplete/test_empty_search.js
deleted file mode 100644
index ef1159705d..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_empty_search.js
+++ /dev/null
@@ -1,98 +0,0 @@
-/* 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/. */
-
-/**
- * Test for bug 426864 that makes sure the empty search (drop down list) only
- * shows typed pages from history.
- */
-
-add_task(function* test_javascript_match() {
- let uri1 = NetUtil.newURI("http://t.foo/0");
- let uri2 = NetUtil.newURI("http://t.foo/1");
- let uri3 = NetUtil.newURI("http://t.foo/2");
- let uri4 = NetUtil.newURI("http://t.foo/3");
- let uri5 = NetUtil.newURI("http://t.foo/4");
- let uri6 = NetUtil.newURI("http://t.foo/5");
- let uri7 = NetUtil.newURI("http://t.foo/6");
-
- yield PlacesTestUtils.addVisits([
- { uri: uri1, title: "title" },
- { uri: uri2, title: "title" },
- { uri: uri3, title: "title", transition: TRANSITION_TYPED},
- { uri: uri4, title: "title", transition: TRANSITION_TYPED },
- { uri: uri6, title: "title", transition: TRANSITION_TYPED },
- { uri: uri7, title: "title" }
- ]);
-
- yield addBookmark({ uri: uri2,
- title: "title" });
- yield addBookmark({ uri: uri4,
- title: "title" });
- yield addBookmark({ uri: uri5,
- title: "title" });
- yield addBookmark({ uri: uri6,
- title: "title" });
-
- addOpenPages(uri7, 1);
-
- // Now remove page 6 from history, so it is an unvisited bookmark.
- PlacesUtils.history.removePage(uri6);
-
- do_print("Match everything");
- yield check_autocomplete({
- search: "foo",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch("foo", { heuristic: true }),
- { uri: uri1, title: "title" },
- { uri: uri2, title: "title", style: ["bookmark"] },
- { uri: uri3, title: "title" },
- { uri: uri4, title: "title", style: ["bookmark"] },
- { uri: uri5, title: "title", style: ["bookmark"] },
- { uri: uri6, title: "title", style: ["bookmark"] },
- makeSwitchToTabMatch("http://t.foo/6", { title: "title" }),
- ]
- });
-
- // Note the next few tests do *not* get a search result as enable-actions
- // isn't specified.
- do_print("Match only typed history");
- yield check_autocomplete({
- search: "foo ^ ~",
- matches: [ { uri: uri3, title: "title" },
- { uri: uri4, title: "title" } ]
- });
-
- do_print("Drop-down empty search matches only typed history");
- yield check_autocomplete({
- search: "",
- matches: [ { uri: uri3, title: "title" },
- { uri: uri4, title: "title" } ]
- });
-
- do_print("Drop-down empty search matches only bookmarks");
- Services.prefs.setBoolPref("browser.urlbar.suggest.history", false);
- Services.prefs.setBoolPref("browser.urlbar.suggest.bookmark", true);
- yield check_autocomplete({
- search: "",
- matches: [ { uri: uri2, title: "title", style: ["bookmark"] },
- { uri: uri4, title: "title", style: ["bookmark"] },
- { uri: uri5, title: "title", style: ["bookmark"] },
- { uri: uri6, title: "title", style: ["bookmark"] } ]
- });
-
- do_print("Drop-down empty search matches only open tabs");
- Services.prefs.setBoolPref("browser.urlbar.suggest.bookmark", false);
- yield check_autocomplete({
- search: "",
- searchParam: "enable-actions",
- matches: [
- makeSwitchToTabMatch("http://t.foo/6", { title: "title" }),
- ]
- });
-
- Services.prefs.clearUserPref("browser.urlbar.suggest.history");
- Services.prefs.clearUserPref("browser.urlbar.suggest.bookmark");
-
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_enabled.js b/toolkit/components/places/tests/unifiedcomplete/test_enabled.js
deleted file mode 100644
index dee8df8ecf..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_enabled.js
+++ /dev/null
@@ -1,68 +0,0 @@
-add_task(function* test_enabled() {
- // Test for bug 471903 to make sure searching in autocomplete can be turned on
- // and off. Also test bug 463535 for pref changing search.
- let uri = NetUtil.newURI("http://url/0");
- yield PlacesTestUtils.addVisits([ { uri: uri, title: "title" } ]);
-
- do_print("plain search");
- yield check_autocomplete({
- search: "url",
- matches: [ { uri: uri, title: "title" } ]
- });
-
- do_print("search disabled");
- Services.prefs.setBoolPref("browser.urlbar.autocomplete.enabled", false);
- yield check_autocomplete({
- search: "url",
- matches: [ ]
- });
-
- do_print("resume normal search");
- Services.prefs.setBoolPref("browser.urlbar.autocomplete.enabled", true);
- yield check_autocomplete({
- search: "url",
- matches: [ { uri: uri, title: "title" } ]
- });
-
- yield cleanup();
-});
-
-add_task(function* test_sync_enabled() {
- // Initialize unified complete.
- Cc["@mozilla.org/autocomplete/search;1?name=unifiedcomplete"]
- .getService(Ci.mozIPlacesAutoComplete);
-
- let types = [ "history", "bookmark", "openpage", "searches" ];
-
- // Test the service keeps browser.urlbar.autocomplete.enabled synchronized
- // with browser.urlbar.suggest prefs.
- for (let type of types) {
- Services.prefs.setBoolPref("browser.urlbar.suggest." + type, true);
- }
- Assert.equal(Services.prefs.getBoolPref("browser.urlbar.autocomplete.enabled"), true);
-
- // Disable autocomplete and check all the suggest prefs are set to false.
- Services.prefs.setBoolPref("browser.urlbar.autocomplete.enabled", false);
- for (let type of types) {
- Assert.equal(Services.prefs.getBoolPref("browser.urlbar.suggest." + type), false);
- }
-
- // Setting even a single suggest pref to true should enable autocomplete.
- Services.prefs.setBoolPref("browser.urlbar.suggest.history", true);
- for (let type of types.filter(t => t != "history")) {
- Assert.equal(Services.prefs.getBoolPref("browser.urlbar.suggest." + type), false);
- }
- Assert.equal(Services.prefs.getBoolPref("browser.urlbar.autocomplete.enabled"), true);
-
- // Disable autocoplete again, then re-enable it and check suggest prefs
- // have been reset.
- Services.prefs.setBoolPref("browser.urlbar.autocomplete.enabled", false);
- Services.prefs.setBoolPref("browser.urlbar.autocomplete.enabled", true);
- for (let type of types.filter(t => t != "history")) {
- if (type == "searches") {
- Assert.equal(Services.prefs.getBoolPref("browser.urlbar.suggest." + type), false);
- } else {
- Assert.equal(Services.prefs.getBoolPref("browser.urlbar.suggest." + type), true);
- }
- }
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_escape_self.js b/toolkit/components/places/tests/unifiedcomplete/test_escape_self.js
deleted file mode 100644
index ff6e5f929e..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_escape_self.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/* 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/. */
-
-/**
- * Test bug 422698 to make sure searches with urls from the location bar
- * correctly match itself when it contains escaped characters.
- */
-
-add_task(function* test_escape() {
- let uri1 = NetUtil.newURI("http://unescapeduri/");
- let uri2 = NetUtil.newURI("http://escapeduri/%40/");
- yield PlacesTestUtils.addVisits([
- { uri: uri1, title: "title" },
- { uri: uri2, title: "title" }
- ]);
-
- do_print("Unescaped location matches itself");
- yield check_autocomplete({
- search: "http://unescapeduri/",
- matches: [ { uri: uri1, title: "title" } ]
- });
-
- do_print("Escaped location matches itself");
- yield check_autocomplete({
- search: "http://escapeduri/%40/",
- matches: [ { uri: uri2, title: "title" } ]
- });
-
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_extension_matches.js b/toolkit/components/places/tests/unifiedcomplete/test_extension_matches.js
deleted file mode 100644
index 76af20558d..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_extension_matches.js
+++ /dev/null
@@ -1,384 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
- * vim:set ts=2 sw=2 sts=2 et:
- * 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/. */
-
-Cu.import("resource://gre/modules/ExtensionSearchHandler.jsm");
-
-let controller = Cc["@mozilla.org/autocomplete/controller;1"].getService(Ci.nsIAutoCompleteController);
-
-add_task(function* test_correct_errors_are_thrown() {
- let keyword = "foo";
- let anotherKeyword = "bar";
- let unregisteredKeyword = "baz";
-
- // Register a keyword.
- ExtensionSearchHandler.registerKeyword(keyword, { emit: () => {} });
-
- // Try registering the keyword again.
- Assert.throws(() => ExtensionSearchHandler.registerKeyword(keyword, { emit: () => {} }));
-
- // Register a different keyword.
- ExtensionSearchHandler.registerKeyword(anotherKeyword, { emit: () => {} });
-
- // Try calling handleSearch for an unregistered keyword.
- Assert.throws(() => ExtensionSearchHandler.handleSearch(unregisteredKeyword, `${unregisteredKeyword} `, () => {}));
-
- // Try calling handleSearch without a callback.
- Assert.throws(() => ExtensionSearchHandler.handleSearch(unregisteredKeyword, `${unregisteredKeyword} `));
-
- // Try getting the description for a keyword which isn't registered.
- Assert.throws(() => ExtensionSearchHandler.getDescription(unregisteredKeyword));
-
- // Try getting the extension name for a keyword which isn't registered.
- Assert.throws(() => ExtensionSearchHandler.getExtensionName(unregisteredKeyword));
-
- // Try setting the default suggestion for a keyword which isn't registered.
- Assert.throws(() => ExtensionSearchHandler.setDefaultSuggestion(unregisteredKeyword, "suggestion"));
-
- // Try calling handleInputCancelled when there is no active input session.
- Assert.throws(() => ExtensionSearchHandler.handleInputCancelled());
-
- // Try calling handleInputEntered when there is no active input session.
- Assert.throws(() => ExtensionSearchHandler.handleInputEntered(anotherKeyword, `${anotherKeyword} test`, "tab"));
-
- // Start a session by calling handleSearch with the registered keyword.
- ExtensionSearchHandler.handleSearch(keyword, `${keyword} test`, () => {});
-
- // Try providing suggestions for an unregistered keyword.
- Assert.throws(() => ExtensionSearchHandler.addSuggestions(unregisteredKeyword, 0, []));
-
- // Try providing suggestions for an inactive keyword.
- Assert.throws(() => ExtensionSearchHandler.addSuggestions(anotherKeyword, 0, []));
-
- // Try calling handleSearch for an inactive keyword.
- Assert.throws(() => ExtensionSearchHandler.handleSearch(anotherKeyword, `${anotherKeyword} `, () => {}));
-
- // Try calling addSuggestions with an old callback ID.
- Assert.throws(() => ExtensionSearchHandler.addSuggestions(keyword, 0, []));
-
- // Add suggestions with a valid callback ID.
- ExtensionSearchHandler.addSuggestions(keyword, 1, []);
-
- // Add suggestions again with a valid callback ID.
- ExtensionSearchHandler.addSuggestions(keyword, 1, []);
-
- // Try calling addSuggestions with a future callback ID.
- Assert.throws(() => ExtensionSearchHandler.addSuggestions(keyword, 2, []));
-
- // End the input session by calling handleInputCancelled.
- ExtensionSearchHandler.handleInputCancelled();
-
- // Try calling handleInputCancelled after the session has ended.
- Assert.throws(() => ExtensionSearchHandler.handleInputCancelled());
-
- // Try calling handleSearch that doesn't have a space after the keyword.
- Assert.throws(() => ExtensionSearchHandler.handleSearch(anotherKeyword, `${anotherKeyword}`, () => {}));
-
- // Try calling handleSearch with text starting with the wrong keyword.
- Assert.throws(() => ExtensionSearchHandler.handleSearch(anotherKeyword, `${keyword} test`, () => {}));
-
- // Start a new session by calling handleSearch with a different keyword
- ExtensionSearchHandler.handleSearch(anotherKeyword, `${anotherKeyword} test`, () => {});
-
- // Try adding suggestions again with the same callback ID now that the input session has ended.
- Assert.throws(() => ExtensionSearchHandler.addSuggestions(keyword, 1, []));
-
- // Add suggestions with a valid callback ID.
- ExtensionSearchHandler.addSuggestions(anotherKeyword, 2, []);
-
- // Try adding suggestions with a valid callback ID but a different keyword.
- Assert.throws(() => ExtensionSearchHandler.addSuggestions(keyword, 2, []));
-
- // Try adding suggestions with a valid callback ID but an unregistered keyword.
- Assert.throws(() => ExtensionSearchHandler.addSuggestions(unregisteredKeyword, 2, []));
-
- // Set the default suggestion.
- ExtensionSearchHandler.setDefaultSuggestion(anotherKeyword, {description: "test result"});
-
- // Try ending the session using handleInputEntered with a different keyword.
- Assert.throws(() => ExtensionSearchHandler.handleInputEntered(keyword, `${keyword} test`, "tab"));
-
- // Try calling handleInputEntered with invalid text.
- Assert.throws(() => ExtensionSearchHandler.handleInputEntered(anotherKeyword, ` test`, "tab"));
-
- // Try calling handleInputEntered with an invalid disposition.
- Assert.throws(() => ExtensionSearchHandler.handleInputEntered(anotherKeyword, `${anotherKeyword} test`, "invalid"));
-
- // End the session by calling handleInputEntered.
- ExtensionSearchHandler.handleInputEntered(anotherKeyword, `${anotherKeyword} test`, "tab");
-
- // Try calling handleInputEntered after the session has ended.
- Assert.throws(() => ExtensionSearchHandler.handleInputEntered(anotherKeyword, `${anotherKeyword} test`, "tab"));
-
- // Unregister the keyword.
- ExtensionSearchHandler.unregisterKeyword(keyword);
-
- // Try setting the default suggestion for the unregistered keyword.
- Assert.throws(() => ExtensionSearchHandler.setDefaultSuggestion(keyword, {description: "test"}));
-
- // Try handling a search with the unregistered keyword.
- Assert.throws(() => ExtensionSearchHandler.handleSearch(keyword, `${keyword} test`, () => {}));
-
- // Try unregistering the keyword again.
- Assert.throws(() => ExtensionSearchHandler.unregisterKeyword(keyword));
-
- // Unregister the other keyword.
- ExtensionSearchHandler.unregisterKeyword(anotherKeyword);
-
- // Try unregistering the word which was never registered.
- Assert.throws(() => ExtensionSearchHandler.unregisterKeyword(unregisteredKeyword));
-
- // Try setting the default suggestion for a word that was never registered.
- Assert.throws(() => ExtensionSearchHandler.setDefaultSuggestion(unregisteredKeyword, {description: "test"}));
-
- yield cleanup();
-});
-
-add_task(function* test_correct_events_are_emitted() {
- let events = [];
- function checkEvents(expectedEvents) {
- Assert.equal(events.length, expectedEvents.length, "The correct number of events fired");
- expectedEvents.forEach((e, i) => Assert.equal(e, events[i], `Expected "${e}" event to fire`));
- events = [];
- }
-
- let mockExtension = { emit: message => events.push(message) };
-
- let keyword = "foo";
- let anotherKeyword = "bar";
-
- ExtensionSearchHandler.registerKeyword(keyword, mockExtension);
- ExtensionSearchHandler.registerKeyword(anotherKeyword, mockExtension);
-
- ExtensionSearchHandler.handleSearch(keyword, `${keyword} `, () => {});
- checkEvents([ExtensionSearchHandler.MSG_INPUT_STARTED]);
-
- ExtensionSearchHandler.handleSearch(keyword, `${keyword} f`, () => {});
- checkEvents([ExtensionSearchHandler.MSG_INPUT_CHANGED]);
-
- ExtensionSearchHandler.handleInputEntered(keyword, `${keyword} f`, "tab");
- checkEvents([ExtensionSearchHandler.MSG_INPUT_ENTERED]);
-
- ExtensionSearchHandler.handleSearch(keyword, `${keyword} f`, () => {});
- checkEvents([
- ExtensionSearchHandler.MSG_INPUT_STARTED,
- ExtensionSearchHandler.MSG_INPUT_CHANGED
- ]);
-
- ExtensionSearchHandler.handleInputCancelled();
- checkEvents([ExtensionSearchHandler.MSG_INPUT_CANCELLED]);
-
- ExtensionSearchHandler.handleSearch(anotherKeyword, `${anotherKeyword} baz`, () => {});
- checkEvents([
- ExtensionSearchHandler.MSG_INPUT_STARTED,
- ExtensionSearchHandler.MSG_INPUT_CHANGED
- ]);
-
- ExtensionSearchHandler.handleInputEntered(anotherKeyword, `${anotherKeyword} baz`, "tab");
- checkEvents([ExtensionSearchHandler.MSG_INPUT_ENTERED]);
-
- ExtensionSearchHandler.unregisterKeyword(keyword);
-});
-
-add_task(function* test_removes_suggestion_if_its_content_is_typed_in() {
- let keyword = "test";
- let extensionName = "Foo Bar";
-
- let mockExtension = {
- name: extensionName,
- emit(message, text, id) {
- if (message === ExtensionSearchHandler.MSG_INPUT_CHANGED) {
- ExtensionSearchHandler.addSuggestions(keyword, id, [
- {content: "foo", description: "first suggestion"},
- {content: "bar", description: "second suggestion"},
- {content: "baz", description: "third suggestion"},
- ]);
- controller.stopSearch();
- }
- }
- };
-
- ExtensionSearchHandler.registerKeyword(keyword, mockExtension);
-
- yield check_autocomplete({
- search: `${keyword} unmatched`,
- searchParam: "enable-actions",
- matches: [
- makeExtensionMatch({heuristic: true, keyword, description: extensionName, content: `${keyword} unmatched`}),
- makeExtensionMatch({keyword, content: `${keyword} foo`, description: "first suggestion"}),
- makeExtensionMatch({keyword, content: `${keyword} bar`, description: "second suggestion"}),
- makeExtensionMatch({keyword, content: `${keyword} baz`, description: "third suggestion"})
- ]
- });
-
- yield check_autocomplete({
- search: `${keyword} foo`,
- searchParam: "enable-actions",
- matches: [
- makeExtensionMatch({heuristic: true, keyword, description: extensionName, content: `${keyword} foo`}),
- makeExtensionMatch({keyword, content: `${keyword} bar`, description: "second suggestion"}),
- makeExtensionMatch({keyword, content: `${keyword} baz`, description: "third suggestion"})
- ]
- });
-
- yield check_autocomplete({
- search: `${keyword} bar`,
- searchParam: "enable-actions",
- matches: [
- makeExtensionMatch({heuristic: true, keyword, description: extensionName, content: `${keyword} bar`}),
- makeExtensionMatch({keyword, content: `${keyword} foo`, description: "first suggestion"}),
- makeExtensionMatch({keyword, content: `${keyword} baz`, description: "third suggestion"})
- ]
- });
-
- yield check_autocomplete({
- search: `${keyword} baz`,
- searchParam: "enable-actions",
- matches: [
- makeExtensionMatch({heuristic: true, keyword, description: extensionName, content: `${keyword} baz`}),
- makeExtensionMatch({keyword, content: `${keyword} foo`, description: "first suggestion"}),
- makeExtensionMatch({keyword, content: `${keyword} bar`, description: "second suggestion"})
- ]
- });
-
- ExtensionSearchHandler.unregisterKeyword(keyword);
- yield cleanup();
-});
-
-add_task(function* test_extension_results_should_come_first() {
- let keyword = "test";
- let extensionName = "Omnibox Example";
-
- let uri = NetUtil.newURI(`http://a.com/b`);
- yield PlacesTestUtils.addVisits([
- { uri, title: `${keyword} -` },
- ]);
-
- let mockExtension = {
- name: extensionName,
- emit(message, text, id) {
- if (message === ExtensionSearchHandler.MSG_INPUT_CHANGED) {
- ExtensionSearchHandler.addSuggestions(keyword, id, [
- {content: "foo", description: "first suggestion"},
- {content: "bar", description: "second suggestion"},
- {content: "baz", description: "third suggestion"},
- ]);
- }
- controller.stopSearch();
- }
- };
-
- ExtensionSearchHandler.registerKeyword(keyword, mockExtension);
-
- // Start an input session before testing MSG_INPUT_CHANGED.
- ExtensionSearchHandler.handleSearch(keyword, `${keyword} `, () => {});
-
- yield check_autocomplete({
- search: `${keyword} -`,
- searchParam: "enable-actions",
- matches: [
- makeExtensionMatch({heuristic: true, keyword, description: extensionName, content: `${keyword} -`}),
- makeExtensionMatch({keyword, content: `${keyword} foo`, description: "first suggestion"}),
- makeExtensionMatch({keyword, content: `${keyword} bar`, description: "second suggestion"}),
- makeExtensionMatch({keyword, content: `${keyword} baz`, description: "third suggestion"}),
- { uri, title: `${keyword} -` }
- ]
- });
-
- ExtensionSearchHandler.unregisterKeyword(keyword);
- yield cleanup();
-});
-
-add_task(function* test_setting_the_default_suggestion() {
- let keyword = "test";
- let extensionName = "Omnibox Example";
-
- let mockExtension = {
- name: extensionName,
- emit(message, text, id) {
- if (message === ExtensionSearchHandler.MSG_INPUT_CHANGED) {
- ExtensionSearchHandler.addSuggestions(keyword, id, []);
- }
- controller.stopSearch();
- }
- };
-
- ExtensionSearchHandler.registerKeyword(keyword, mockExtension);
-
- ExtensionSearchHandler.setDefaultSuggestion(keyword, {
- description: "hello world"
- });
-
- let searchString = `${keyword} search query`;
- yield check_autocomplete({
- search: searchString,
- searchParam: "enable-actions",
- matches: [
- makeExtensionMatch({heuristic: true, keyword, description: "hello world", content: searchString}),
- ]
- });
-
- ExtensionSearchHandler.setDefaultSuggestion(keyword, {
- description: "foo bar"
- });
-
- yield check_autocomplete({
- search: searchString,
- searchParam: "enable-actions",
- matches: [
- makeExtensionMatch({heuristic: true, keyword, description: "foo bar", content: searchString}),
- ]
- });
-
- ExtensionSearchHandler.unregisterKeyword(keyword);
- yield cleanup();
-});
-
-add_task(function* test_maximum_number_of_suggestions_is_enforced() {
- let keyword = "test";
- let extensionName = "Omnibox Example";
-
- let mockExtension = {
- name: extensionName,
- emit(message, text, id) {
- if (message === ExtensionSearchHandler.MSG_INPUT_CHANGED) {
- ExtensionSearchHandler.addSuggestions(keyword, id, [
- {content: "a", description: "first suggestion"},
- {content: "b", description: "second suggestion"},
- {content: "c", description: "third suggestion"},
- {content: "d", description: "fourth suggestion"},
- {content: "e", description: "fifth suggestion"},
- {content: "f", description: "sixth suggestion"},
- {content: "g", description: "seventh suggestion"},
- {content: "h", description: "eigth suggestion"},
- {content: "i", description: "ninth suggestion"},
- {content: "j", description: "tenth suggestion"},
- ]);
- controller.stopSearch();
- }
- }
- };
-
- ExtensionSearchHandler.registerKeyword(keyword, mockExtension);
-
- // Start an input session before testing MSG_INPUT_CHANGED.
- ExtensionSearchHandler.handleSearch(keyword, `${keyword} `, () => {});
-
- yield check_autocomplete({
- search: `${keyword} #`,
- searchParam: "enable-actions",
- matches: [
- makeExtensionMatch({heuristic: true, keyword, description: extensionName, content: `${keyword} #`}),
- makeExtensionMatch({keyword, content: `${keyword} a`, description: "first suggestion"}),
- makeExtensionMatch({keyword, content: `${keyword} b`, description: "second suggestion"}),
- makeExtensionMatch({keyword, content: `${keyword} c`, description: "third suggestion"}),
- makeExtensionMatch({keyword, content: `${keyword} d`, description: "fourth suggestion"}),
- makeExtensionMatch({keyword, content: `${keyword} e`, description: "fifth suggestion"}),
- ]
- });
-
- ExtensionSearchHandler.unregisterKeyword(keyword);
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_ignore_protocol.js b/toolkit/components/places/tests/unifiedcomplete/test_ignore_protocol.js
deleted file mode 100644
index 92e7f601a1..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_ignore_protocol.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/* 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/. */
-
-/**
- * Test bug 424509 to make sure searching for "h" doesn't match "http" of urls.
- */
-
-add_task(function* test_escape() {
- let uri1 = NetUtil.newURI("http://site/");
- let uri2 = NetUtil.newURI("http://happytimes/");
- yield PlacesTestUtils.addVisits([
- { uri: uri1, title: "title" },
- { uri: uri2, title: "title" }
- ]);
-
- do_print("Searching for h matches site and not http://");
- yield check_autocomplete({
- search: "h",
- matches: [ { uri: uri2, title: "title" } ]
- });
-
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_keyword_search.js b/toolkit/components/places/tests/unifiedcomplete/test_keyword_search.js
deleted file mode 100644
index 12b7fea777..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_keyword_search.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/* 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/. */
-
-/**
- * Test for bug 392143 that puts keyword results into the autocomplete. Makes
- * sure that multiple parameter queries get spaces converted to +, + converted
- * to %2B, non-ascii become escaped, and pages in history that match the
- * keyword uses the page's title.
- *
- * Also test for bug 249468 by making sure multiple keyword bookmarks with the
- * same keyword appear in the list.
- */
-
-add_task(function* test_keyword_searc() {
- let uri1 = NetUtil.newURI("http://abc/?search=%s");
- let uri2 = NetUtil.newURI("http://abc/?search=ThisPageIsInHistory");
- yield PlacesTestUtils.addVisits([
- { uri: uri1, title: "Generic page title" },
- { uri: uri2, title: "Generic page title" }
- ]);
- yield addBookmark({ uri: uri1, title: "Bookmark title", keyword: "key"});
-
- do_print("Plain keyword query");
- yield check_autocomplete({
- search: "key term",
- matches: [ { uri: NetUtil.newURI("http://abc/?search=term"), title: "abc", style: ["keyword", "heuristic"] } ]
- });
-
- do_print("Plain keyword UC");
- yield check_autocomplete({
- search: "key TERM",
- matches: [ { uri: NetUtil.newURI("http://abc/?search=TERM"), title: "abc", style: ["keyword", "heuristic"] } ]
- });
-
- do_print("Multi-word keyword query");
- yield check_autocomplete({
- search: "key multi word",
- matches: [ { uri: NetUtil.newURI("http://abc/?search=multi%20word"), title: "abc", style: ["keyword", "heuristic"] } ]
- });
-
- do_print("Keyword query with +");
- yield check_autocomplete({
- search: "key blocking+",
- matches: [ { uri: NetUtil.newURI("http://abc/?search=blocking%2B"), title: "abc", style: ["keyword", "heuristic"] } ]
- });
-
- do_print("Unescaped term in query");
- yield check_autocomplete({
- search: "key ユニコード",
- matches: [ { uri: NetUtil.newURI("http://abc/?search=ユニコード"), title: "abc", style: ["keyword", "heuristic"] } ]
- });
-
- do_print("Keyword that happens to match a page");
- yield check_autocomplete({
- search: "key ThisPageIsInHistory",
- matches: [ { uri: NetUtil.newURI("http://abc/?search=ThisPageIsInHistory"), title: "abc", style: ["keyword", "heuristic"] } ]
- });
-
- do_print("Keyword without query (without space)");
- yield check_autocomplete({
- search: "key",
- matches: [ { uri: NetUtil.newURI("http://abc/?search="), title: "abc", style: ["keyword", "heuristic"] } ]
- });
-
- do_print("Keyword without query (with space)");
- yield check_autocomplete({
- search: "key ",
- matches: [ { uri: NetUtil.newURI("http://abc/?search="), title: "abc", style: ["keyword", "heuristic"] } ]
- });
-
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_keyword_search_actions.js b/toolkit/components/places/tests/unifiedcomplete/test_keyword_search_actions.js
deleted file mode 100644
index 61d98f72d6..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_keyword_search_actions.js
+++ /dev/null
@@ -1,149 +0,0 @@
-/* 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/. */
-
-/**
- * Test for bug 392143 that puts keyword results into the autocomplete. Makes
- * sure that multiple parameter queries get spaces converted to +, + converted
- * to %2B, non-ascii become escaped, and pages in history that match the
- * keyword uses the page's title.
- *
- * Also test for bug 249468 by making sure multiple keyword bookmarks with the
- * same keyword appear in the list.
- */
-
-add_task(function* test_keyword_search() {
- let uri1 = NetUtil.newURI("http://abc/?search=%s");
- let uri2 = NetUtil.newURI("http://abc/?search=ThisPageIsInHistory");
- let uri3 = NetUtil.newURI("http://abc/?search=%s&raw=%S");
- let uri4 = NetUtil.newURI("http://abc/?search=%s&raw=%S&mozcharset=ISO-8859-1");
- yield PlacesTestUtils.addVisits([{ uri: uri1 },
- { uri: uri2 },
- { uri: uri3 }]);
- yield addBookmark({ uri: uri1, title: "Keyword", keyword: "key"});
- yield addBookmark({ uri: uri1, title: "Post", keyword: "post", postData: "post_search=%s"});
- yield addBookmark({ uri: uri3, title: "Encoded", keyword: "encoded"});
- yield addBookmark({ uri: uri4, title: "Charset", keyword: "charset"});
- yield addBookmark({ uri: uri2, title: "Noparam", keyword: "noparam"});
- yield addBookmark({ uri: uri2, title: "Noparam-Post", keyword: "post_noparam", postData: "noparam=1"});
-
- do_print("Plain keyword query");
- yield check_autocomplete({
- search: "key term",
- searchParam: "enable-actions",
- matches: [ { uri: makeActionURI("keyword", {url: "http://abc/?search=term", input: "key term"}),
- title: "abc", style: [ "action", "keyword", "heuristic" ] } ]
- });
-
- do_print("Plain keyword UC");
- yield check_autocomplete({
- search: "key TERM",
- matches: [ { uri: NetUtil.newURI("http://abc/?search=TERM"),
- title: "abc", style: ["keyword", "heuristic"] } ]
- });
-
- do_print("Multi-word keyword query");
- yield check_autocomplete({
- search: "key multi word",
- searchParam: "enable-actions",
- matches: [ { uri: makeActionURI("keyword", {url: "http://abc/?search=multi%20word", input: "key multi word"}),
- title: "abc", style: [ "action", "keyword", "heuristic" ] } ]
- });
-
- do_print("Keyword query with +");
- yield check_autocomplete({
- search: "key blocking+",
- searchParam: "enable-actions",
- matches: [ { uri: makeActionURI("keyword", {url: "http://abc/?search=blocking%2B", input: "key blocking+"}),
- title: "abc", style: [ "action", "keyword", "heuristic" ] } ]
- });
-
- do_print("Unescaped term in query");
- // ... but note that UnifiedComplete calls encodeURIComponent() on the query
- // string when it builds the URL, so the expected result will have the
- // ユニコード substring encoded in the URL.
- yield check_autocomplete({
- search: "key ユニコード",
- searchParam: "enable-actions",
- matches: [ { uri: makeActionURI("keyword", {url: "http://abc/?search=" + encodeURIComponent("ユニコード"), input: "key ユニコード"}),
- title: "abc", style: [ "action", "keyword", "heuristic" ] } ]
- });
-
- do_print("Keyword that happens to match a page");
- yield check_autocomplete({
- search: "key ThisPageIsInHistory",
- searchParam: "enable-actions",
- matches: [ { uri: makeActionURI("keyword", {url: "http://abc/?search=ThisPageIsInHistory", input: "key ThisPageIsInHistory"}),
- title: "abc", style: [ "action", "keyword", "heuristic" ] } ]
- });
-
- do_print("Keyword without query (without space)");
- yield check_autocomplete({
- search: "key",
- searchParam: "enable-actions",
- matches: [ { uri: makeActionURI("keyword", {url: "http://abc/?search=", input: "key"}),
- title: "abc", style: [ "action", "keyword", "heuristic" ] } ]
- });
-
- do_print("Keyword without query (with space)");
- yield check_autocomplete({
- search: "key ",
- searchParam: "enable-actions",
- matches: [ { uri: makeActionURI("keyword", {url: "http://abc/?search=", input: "key "}),
- title: "abc", style: [ "action", "keyword", "heuristic" ] } ]
- });
-
- do_print("POST Keyword");
- yield check_autocomplete({
- search: "post foo",
- searchParam: "enable-actions",
- matches: [ { uri: makeActionURI("keyword", {url: "http://abc/?search=foo", input: "post foo", postData: "post_search=foo"}),
- title: "abc", style: [ "action", "keyword", "heuristic" ] } ]
- });
-
- do_print("Bug 420328: no-param keyword with a param");
- yield check_autocomplete({
- search: "noparam foo",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch("noparam foo", { heuristic: true }) ]
- });
- yield check_autocomplete({
- search: "post_noparam foo",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch("post_noparam foo", { heuristic: true }) ]
- });
-
- do_print("escaping with default UTF-8 charset");
- yield check_autocomplete({
- search: "encoded foé",
- searchParam: "enable-actions",
- matches: [ { uri: makeActionURI("keyword", {url: "http://abc/?search=fo%C3%A9&raw=foé", input: "encoded foé" }),
- title: "abc", style: [ "action", "keyword", "heuristic" ] } ]
- });
-
- do_print("escaping with forced ISO-8859-1 charset");
- yield check_autocomplete({
- search: "charset foé",
- searchParam: "enable-actions",
- matches: [ { uri: makeActionURI("keyword", {url: "http://abc/?search=fo%E9&raw=foé", input: "charset foé" }),
- title: "abc", style: [ "action", "keyword", "heuristic" ] } ]
- });
-
- do_print("Bug 359809: escaping +, / and @ with default UTF-8 charset");
- yield check_autocomplete({
- search: "encoded +/@",
- searchParam: "enable-actions",
- matches: [ { uri: makeActionURI("keyword", {url: "http://abc/?search=%2B%2F%40&raw=+/@", input: "encoded +/@" }),
- title: "abc", style: [ "action", "keyword", "heuristic" ] } ]
- });
-
- do_print("Bug 359809: escaping +, / and @ with forced ISO-8859-1 charset");
- yield check_autocomplete({
- search: "charset +/@",
- searchParam: "enable-actions",
- matches: [ { uri: makeActionURI("keyword", {url: "http://abc/?search=%2B%2F%40&raw=+/@", input: "charset +/@" }),
- title: "abc", style: [ "action", "keyword", "heuristic" ] } ]
- });
-
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_keywords.js b/toolkit/components/places/tests/unifiedcomplete/test_keywords.js
deleted file mode 100644
index 93e8d7a6f1..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_keywords.js
+++ /dev/null
@@ -1,78 +0,0 @@
-/* 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/. */
-
-add_task(function* test_non_keyword() {
- do_print("Searching for non-keyworded entry should autoFill it");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/test/"),
- transition: TRANSITION_TYPED
- });
- yield addBookmark({ uri: NetUtil.newURI("http://mozilla.org/test/") });
- yield check_autocomplete({
- search: "moz",
- autofilled: "mozilla.org/",
- completed: "mozilla.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_keyword() {
- do_print("Searching for keyworded entry should not autoFill it");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/test/"),
- transition: TRANSITION_TYPED
- });
- yield addBookmark({ uri: NetUtil.newURI("http://mozilla.org/test/"), keyword: "moz" });
- yield check_autocomplete({
- search: "moz",
- autofilled: "moz",
- completed: "moz",
- });
- yield cleanup();
-});
-
-add_task(function* test_more_than_keyword() {
- do_print("Searching for more than keyworded entry should autoFill it");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/test/"),
- transition: TRANSITION_TYPED
- });
- yield addBookmark({ uri: NetUtil.newURI("http://mozilla.org/test/"), keyword: "moz" });
- yield check_autocomplete({
- search: "mozi",
- autofilled: "mozilla.org/",
- completed: "mozilla.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_less_than_keyword() {
- do_print("Searching for less than keyworded entry should autoFill it");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/test/"),
- transition: TRANSITION_TYPED
- });
- yield addBookmark({ uri: NetUtil.newURI("http://mozilla.org/test/"), keyword: "moz" });
- yield check_autocomplete({
- search: "mo",
- autofilled: "mozilla.org/",
- completed: "mozilla.org/",
- });
- yield cleanup();
-});
-
-add_task(function* test_keyword_casing() {
- do_print("Searching for keyworded entry is case-insensitive");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/test/"),
- transition: TRANSITION_TYPED
- });
- yield addBookmark({ uri: NetUtil.newURI("http://mozilla.org/test/"), keyword: "moz" });
- yield check_autocomplete({
- search: "MoZ",
- autofilled: "MoZ",
- completed: "MoZ"
- });
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_match_beginning.js b/toolkit/components/places/tests/unifiedcomplete/test_match_beginning.js
deleted file mode 100644
index 57a1efaeb5..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_match_beginning.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/* 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/. */
-
-/**
- * Test bug 451760 which allows matching only at the beginning of urls or
- * titles to simulate Firefox 2 functionality.
- */
-
-add_task(function* test_match_beginning() {
- Services.prefs.setBoolPref("browser.urlbar.autoFill.searchEngines", false);
-
- let uri1 = NetUtil.newURI("http://x.com/y");
- let uri2 = NetUtil.newURI("https://y.com/x");
- yield PlacesTestUtils.addVisits([
- { uri: uri1, title: "a b" },
- { uri: uri2, title: "b a" }
- ]);
-
- do_print("Match at the beginning of titles");
- Services.prefs.setIntPref("browser.urlbar.matchBehavior", 3);
- yield check_autocomplete({
- search: "a",
- matches: [ { uri: uri1, title: "a b" } ]
- });
-
- do_print("Match at the beginning of titles");
- yield check_autocomplete({
- search: "b",
- matches: [ { uri: uri2, title: "b a" } ]
- });
-
- do_print("Match at the beginning of urls");
- yield check_autocomplete({
- search: "x",
- matches: [ { uri: uri1, title: "a b" } ]
- });
-
- do_print("Match at the beginning of urls");
- yield check_autocomplete({
- search: "y",
- matches: [ { uri: uri2, title: "b a" } ]
- });
-
- do_print("Sanity check that matching anywhere finds more");
- Services.prefs.setIntPref("browser.urlbar.matchBehavior", 1);
- yield check_autocomplete({
- search: "a",
- matches: [ { uri: uri1, title: "a b" },
- { uri: uri2, title: "b a" } ]
- });
-
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_multi_word_search.js b/toolkit/components/places/tests/unifiedcomplete/test_multi_word_search.js
deleted file mode 100644
index c6c9e952ee..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_multi_word_search.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/* 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/. */
-
-/**
- * Test for bug 401869 to allow multiple words separated by spaces to match in
- * the page title, page url, or bookmark title to be considered a match. All
- * terms must match but not all terms need to be in the title, etc.
- *
- * Test bug 424216 by making sure bookmark titles are always shown if one is
- * available. Also bug 425056 makes sure matches aren't found partially in the
- * page title and partially in the bookmark.
- */
-
-add_task(function* test_match_beginning() {
- let uri1 = NetUtil.newURI("http://a.b.c/d-e_f/h/t/p");
- let uri2 = NetUtil.newURI("http://d.e.f/g-h_i/h/t/p");
- let uri3 = NetUtil.newURI("http://g.h.i/j-k_l/h/t/p");
- let uri4 = NetUtil.newURI("http://j.k.l/m-n_o/h/t/p");
- yield PlacesTestUtils.addVisits([
- { uri: uri1, title: "f(o)o b<a>r" },
- { uri: uri2, title: "b(a)r b<a>z" },
- { uri: uri3, title: "f(o)o b<a>r" },
- { uri: uri4, title: "f(o)o b<a>r" }
- ]);
- yield addBookmark({ uri: uri3, title: "f(o)o b<a>r" });
- yield addBookmark({ uri: uri4, title: "b(a)r b<a>z" });
-
- do_print("Match 2 terms all in url");
- yield check_autocomplete({
- search: "c d",
- matches: [ { uri: uri1, title: "f(o)o b<a>r" } ]
- });
-
- do_print("Match 1 term in url and 1 term in title");
- yield check_autocomplete({
- search: "b e",
- matches: [ { uri: uri1, title: "f(o)o b<a>r" },
- { uri: uri2, title: "b(a)r b<a>z" } ]
- });
-
- do_print("Match 3 terms all in title; display bookmark title if matched");
- yield check_autocomplete({
- search: "b a z",
- matches: [ { uri: uri2, title: "b(a)r b<a>z" },
- { uri: uri4, title: "b(a)r b<a>z", style: [ "bookmark" ] } ]
- });
-
- do_print("Match 2 terms in url and 1 in title; make sure bookmark title is used for search");
- yield check_autocomplete({
- search: "k f t",
- matches: [ { uri: uri3, title: "f(o)o b<a>r", style: [ "bookmark" ] } ]
- });
-
- do_print("Match 3 terms in url and 1 in title");
- yield check_autocomplete({
- search: "d i g z",
- matches: [ { uri: uri2, title: "b(a)r b<a>z" } ]
- });
-
- do_print("Match nothing");
- yield check_autocomplete({
- search: "m o z i",
- matches: [ ]
- });
-
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_query_url.js b/toolkit/components/places/tests/unifiedcomplete/test_query_url.js
deleted file mode 100644
index 915ba770ef..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_query_url.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/* 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/. */
-
-add_task(function* test_no_slash() {
- do_print("Searching for host match without slash should match host");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://file.org/test/"),
- transition: TRANSITION_TYPED
- }, {
- uri: NetUtil.newURI("file:///c:/test.html"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "file",
- autofilled: "file.org/",
- completed: "file.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_w_slash() {
- do_print("Searching match with slash at the end should do nothing");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://file.org/test/"),
- transition: TRANSITION_TYPED
- }, {
- uri: NetUtil.newURI("file:///c:/test.html"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "file.org/",
- autofilled: "file.org/",
- completed: "file.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_middle() {
- do_print("Searching match with slash in the middle should match url");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://file.org/test/"),
- transition: TRANSITION_TYPED
- }, {
- uri: NetUtil.newURI("file:///c:/test.html"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "file.org/t",
- autofilled: "file.org/test/",
- completed: "http://file.org/test/"
- });
- yield cleanup();
-});
-
-add_task(function* test_nonhost() {
- do_print("Searching for non-host match without slash should not match url");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("file:///c:/test.html"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "file",
- autofilled: "file",
- completed: "file"
- });
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_remote_tab_matches.js b/toolkit/components/places/tests/unifiedcomplete/test_remote_tab_matches.js
deleted file mode 100644
index 56998d4d69..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_remote_tab_matches.js
+++ /dev/null
@@ -1,203 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
- * vim:set ts=2 sw=2 sts=2 et:
-*/
-"use strict";
-
-Cu.import("resource://services-sync/main.js");
-
-Services.prefs.setCharPref("services.sync.username", "someone@somewhere.com");
-
-// A mock "Tabs" engine which autocomplete will use instead of the real
-// engine. We pass a constructor that Sync creates.
-function MockTabsEngine() {
- this.clients = null; // We'll set this dynamically
-}
-
-MockTabsEngine.prototype = {
- name: "tabs",
-
- getAllClients() {
- return this.clients;
- },
-}
-
-// A clients engine that doesn't need to be a constructor.
-let MockClientsEngine = {
- isMobile(guid) {
- Assert.ok(guid.endsWith("desktop") || guid.endsWith("mobile"));
- return guid.endsWith("mobile");
- },
-}
-
-// Tell Sync about the mocks.
-Weave.Service.engineManager.register(MockTabsEngine);
-Weave.Service.clientsEngine = MockClientsEngine;
-
-// Tell the Sync XPCOM service it is initialized.
-let weaveXPCService = Cc["@mozilla.org/weave/service;1"]
- .getService(Ci.nsISupports)
- .wrappedJSObject;
-weaveXPCService.ready = true;
-
-// Configure the singleton engine for a test.
-function configureEngine(clients) {
- // Configure the instance Sync created.
- let engine = Weave.Service.engineManager.get("tabs");
- engine.clients = clients;
- // Send an observer that pretends the engine just finished a sync.
- Services.obs.notifyObservers(null, "weave:engine:sync:finish", "tabs");
-}
-
-// Make a match object suitable for passing to check_autocomplete.
-function makeRemoteTabMatch(url, deviceName, extra = {}) {
- return {
- uri: makeActionURI("remotetab", {url, deviceName}),
- title: extra.title || url,
- style: [ "action", "remotetab" ],
- icon: extra.icon,
- }
-}
-
-// The tests.
-add_task(function* test_nomatch() {
- // Nothing matches.
- configureEngine({
- guid_desktop: {
- clientName: "My Desktop",
- tabs: [{
- urlHistory: ["http://foo.com/"],
- }],
- }
- });
-
- // No remote tabs match here, so we only expect search results.
- yield check_autocomplete({
- search: "ex",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch("ex", { heuristic: true }) ],
- });
-});
-
-add_task(function* test_minimal() {
- // The minimal client and tabs info we can get away with.
- configureEngine({
- guid_desktop: {
- clientName: "My Desktop",
- tabs: [{
- urlHistory: ["http://example.com/"],
- }],
- }
- });
-
- yield check_autocomplete({
- search: "ex",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch("ex", { heuristic: true }),
- makeRemoteTabMatch("http://example.com/", "My Desktop") ],
- });
-});
-
-add_task(function* test_maximal() {
- // Every field that could possibly exist on a remote record.
- configureEngine({
- guid_mobile: {
- clientName: "My Phone",
- tabs: [{
- urlHistory: ["http://example.com/"],
- title: "An Example",
- icon: "http://favicon",
- }],
- }
- });
-
- yield check_autocomplete({
- search: "ex",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch("ex", { heuristic: true }),
- makeRemoteTabMatch("http://example.com/", "My Phone",
- { title: "An Example",
- icon: "moz-anno:favicon:http://favicon/"
- }),
- ],
- });
-});
-
-add_task(function* test_noShowIcons() {
- Services.prefs.setBoolPref("services.sync.syncedTabs.showRemoteIcons", false);
- configureEngine({
- guid_mobile: {
- clientName: "My Phone",
- tabs: [{
- urlHistory: ["http://example.com/"],
- title: "An Example",
- icon: "http://favicon",
- }],
- }
- });
-
- yield check_autocomplete({
- search: "ex",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch("ex", { heuristic: true }),
- makeRemoteTabMatch("http://example.com/", "My Phone",
- { title: "An Example",
- // expecting the default favicon due to that pref.
- icon: "",
- }),
- ],
- });
- Services.prefs.clearUserPref("services.sync.syncedTabs.showRemoteIcons");
-});
-
-add_task(function* test_matches_title() {
- // URL doesn't match search expression, should still match the title.
- configureEngine({
- guid_mobile: {
- clientName: "My Phone",
- tabs: [{
- urlHistory: ["http://foo.com/"],
- title: "An Example",
- }],
- }
- });
-
- yield check_autocomplete({
- search: "ex",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch("ex", { heuristic: true }),
- makeRemoteTabMatch("http://foo.com/", "My Phone",
- { title: "An Example" }),
- ],
- });
-});
-
-add_task(function* test_localtab_matches_override() {
- // We have an open tab to the same page on a remote device, only "switch to
- // tab" should appear as duplicate detection removed the remote one.
-
- // First setup Sync to have the page as a remote tab.
- configureEngine({
- guid_mobile: {
- clientName: "My Phone",
- tabs: [{
- urlHistory: ["http://foo.com/"],
- title: "An Example",
- }],
- }
- });
-
- // Setup Places to think the tab is open locally.
- let uri = NetUtil.newURI("http://foo.com/");
- yield PlacesTestUtils.addVisits([
- { uri: uri, title: "An Example" },
- ]);
- addOpenPages(uri, 1);
-
- yield check_autocomplete({
- search: "ex",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch("ex", { heuristic: true }),
- makeSwitchToTabMatch("http://foo.com/", { title: "An Example" }),
- ],
- });
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_search_engine_alias.js b/toolkit/components/places/tests/unifiedcomplete/test_search_engine_alias.js
deleted file mode 100644
index f35242e210..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_search_engine_alias.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-
-add_task(function*() {
- // Note that head_autocomplete.js has already added a MozSearch engine.
- // Here we add another engine with a search alias.
- Services.search.addEngineWithDetails("AliasedGETMozSearch", "", "get", "",
- "GET", "http://s.example.com/search");
- Services.search.addEngineWithDetails("AliasedPOSTMozSearch", "", "post", "",
- "POST", "http://s.example.com/search");
-
- for (let alias of ["get", "post"]) {
- yield check_autocomplete({
- search: alias,
- searchParam: "enable-actions",
- matches: [ makeSearchMatch(alias, { engineName: `Aliased${alias.toUpperCase()}MozSearch`,
- searchQuery: "", alias, heuristic: true }) ]
- });
-
- yield check_autocomplete({
- search: `${alias} `,
- searchParam: "enable-actions",
- matches: [ makeSearchMatch(`${alias} `, { engineName: `Aliased${alias.toUpperCase()}MozSearch`,
- searchQuery: "", alias, heuristic: true }) ]
- });
-
- yield check_autocomplete({
- search: `${alias} mozilla`,
- searchParam: "enable-actions",
- matches: [ makeSearchMatch(`${alias} mozilla`, { engineName: `Aliased${alias.toUpperCase()}MozSearch`,
- searchQuery: "mozilla", alias, heuristic: true }) ]
- });
-
- yield check_autocomplete({
- search: `${alias} MoZiLlA`,
- searchParam: "enable-actions",
- matches: [ makeSearchMatch(`${alias} MoZiLlA`, { engineName: `Aliased${alias.toUpperCase()}MozSearch`,
- searchQuery: "MoZiLlA", alias, heuristic: true }) ]
- });
-
- yield check_autocomplete({
- search: `${alias} mozzarella mozilla`,
- searchParam: "enable-actions",
- matches: [ makeSearchMatch(`${alias} mozzarella mozilla`, { engineName: `Aliased${alias.toUpperCase()}MozSearch`,
- searchQuery: "mozzarella mozilla", alias, heuristic: true }) ]
- });
- }
-
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_search_engine_current.js b/toolkit/components/places/tests/unifiedcomplete/test_search_engine_current.js
deleted file mode 100644
index b41d9884bd..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_search_engine_current.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-
-add_task(function*() {
- // Note that head_autocomplete.js has already added a MozSearch engine.
- // Here we add another engine with a search alias.
- Services.search.addEngineWithDetails("AliasedMozSearch", "", "doit", "",
- "GET", "http://s.example.com/search");
-
- do_print("search engine");
- yield check_autocomplete({
- search: "mozilla",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch("mozilla", { heuristic: true }) ]
- });
-
- do_print("search engine, uri-like input");
- yield check_autocomplete({
- search: "http:///",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch("http:///", { heuristic: true }) ]
- });
-
- do_print("search engine, multiple words");
- yield check_autocomplete({
- search: "mozzarella cheese",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch("mozzarella cheese", { heuristic: true }) ]
- });
-
- do_print("search engine, after current engine has changed");
- Services.search.addEngineWithDetails("MozSearch2", "", "", "", "GET",
- "http://s.example.com/search2");
- engine = Services.search.getEngineByName("MozSearch2");
- notEqual(Services.search.currentEngine, engine, "New engine shouldn't be the current engine yet");
- Services.search.currentEngine = engine;
- yield check_autocomplete({
- search: "mozilla",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch("mozilla", { engineName: "MozSearch2", heuristic: true }) ]
- });
-
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_search_engine_host.js b/toolkit/components/places/tests/unifiedcomplete/test_search_engine_host.js
deleted file mode 100644
index 61b9826f7c..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_search_engine_host.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-add_task(function* test_searchEngine_autoFill() {
- Services.prefs.setBoolPref("browser.urlbar.autoFill.searchEngines", true);
- Services.search.addEngineWithDetails("MySearchEngine", "", "", "",
- "GET", "http://my.search.com/");
- let engine = Services.search.getEngineByName("MySearchEngine");
- do_register_cleanup(() => Services.search.removeEngine(engine));
-
- // Add an uri that matches the search string with high frecency.
- let uri = NetUtil.newURI("http://www.example.com/my/");
- let visits = [];
- for (let i = 0; i < 100; ++i) {
- visits.push({ uri, title: "Terms - SearchEngine Search" });
- }
- yield PlacesTestUtils.addVisits(visits);
- yield addBookmark({ uri: uri, title: "Example bookmark" });
- yield PlacesTestUtils.promiseAsyncUpdates();
- ok(frecencyForUrl(uri) > 10000, "Added URI should have expected high frecency");
-
- do_print("Check search domain is autoFilled even if there's an higher frecency match");
- yield check_autocomplete({
- search: "my",
- autofilled: "my.search.com",
- completed: "http://my.search.com"
- });
-
- yield cleanup();
-});
-
-add_task(function* test_searchEngine_noautoFill() {
- let engineName = "engine-rel-searchform.xml";
- let engine = yield addTestEngine(engineName);
- equal(engine.searchForm, "http://example.com/?search");
-
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", false);
- yield PlacesTestUtils.addVisits(NetUtil.newURI("http://example.com/my/"));
-
- do_print("Check search domain is not autoFilled if it matches a visited domain");
- yield check_autocomplete({
- search: "example",
- autofilled: "example.com/",
- completed: "example.com/"
- });
-
- yield cleanup();
-});
-
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_search_engine_restyle.js b/toolkit/components/places/tests/unifiedcomplete/test_search_engine_restyle.js
deleted file mode 100644
index 2a5f2d78e1..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_search_engine_restyle.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/* 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/. */
-
-add_task(function* test_searchEngine() {
- Services.search.addEngineWithDetails("SearchEngine", "", "", "",
- "GET", "http://s.example.com/search");
- let engine = Services.search.getEngineByName("SearchEngine");
- engine.addParam("q", "{searchTerms}", null);
- do_register_cleanup(() => Services.search.removeEngine(engine));
-
- let uri1 = NetUtil.newURI("http://s.example.com/search?q=Terms&client=1");
- let uri2 = NetUtil.newURI("http://s.example.com/search?q=Terms&client=2");
- yield PlacesTestUtils.addVisits({ uri: uri1, title: "Terms - SearchEngine Search" });
- yield addBookmark({ uri: uri2, title: "Terms - SearchEngine Search" });
-
- do_print("Past search terms should be styled, unless bookmarked");
- Services.prefs.setBoolPref("browser.urlbar.restyleSearches", true);
- yield check_autocomplete({
- search: "term",
- matches: [
- makeSearchMatch("Terms", {
- engineName: "SearchEngine",
- style: ["favicon"]
- }),
- {
- uri: uri2,
- title: "Terms - SearchEngine Search",
- style: ["bookmark"]
- }
- ]
- });
-
- do_print("Past search terms should not be styled if restyling is disabled");
- Services.prefs.setBoolPref("browser.urlbar.restyleSearches", false);
- yield check_autocomplete({
- search: "term",
- matches: [ { uri: uri1, title: "Terms - SearchEngine Search" },
- { uri: uri2, title: "Terms - SearchEngine Search", style: ["bookmark"] } ]
- });
-
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_search_suggestions.js b/toolkit/components/places/tests/unifiedcomplete/test_search_suggestions.js
deleted file mode 100644
index 63b428cd4c..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_search_suggestions.js
+++ /dev/null
@@ -1,651 +0,0 @@
-Cu.import("resource://gre/modules/FormHistory.jsm");
-
-const ENGINE_NAME = "engine-suggestions.xml";
-const SERVER_PORT = 9000;
-const SUGGEST_PREF = "browser.urlbar.suggest.searches";
-const SUGGEST_ENABLED_PREF = "browser.search.suggest.enabled";
-const SUGGEST_RESTRICT_TOKEN = "$";
-
-var suggestionsFn;
-var previousSuggestionsFn;
-
-function setSuggestionsFn(fn) {
- previousSuggestionsFn = suggestionsFn;
- suggestionsFn = fn;
-}
-
-function* cleanUpSuggestions() {
- yield cleanup();
- if (previousSuggestionsFn) {
- suggestionsFn = previousSuggestionsFn;
- previousSuggestionsFn = null;
- }
-}
-
-add_task(function* setUp() {
- // Set up a server that provides some suggestions by appending strings onto
- // the search query.
- let server = makeTestServer(SERVER_PORT);
- server.registerPathHandler("/suggest", (req, resp) => {
- // URL query params are x-www-form-urlencoded, which converts spaces into
- // plus signs, so un-convert any plus signs back to spaces.
- let searchStr = decodeURIComponent(req.queryString.replace(/\+/g, " "));
- let suggestions = suggestionsFn(searchStr);
- let data = [searchStr, suggestions];
- resp.setHeader("Content-Type", "application/json", false);
- resp.write(JSON.stringify(data));
- });
- setSuggestionsFn(searchStr => {
- let suffixes = ["foo", "bar"];
- return suffixes.map(s => searchStr + " " + s);
- });
-
- // Install the test engine.
- let oldCurrentEngine = Services.search.currentEngine;
- do_register_cleanup(() => Services.search.currentEngine = oldCurrentEngine);
- let engine = yield addTestEngine(ENGINE_NAME, server);
- Services.search.currentEngine = engine;
-});
-
-add_task(function* disabled_urlbarSuggestions() {
- Services.prefs.setBoolPref(SUGGEST_PREF, false);
- Services.prefs.setBoolPref(SUGGEST_ENABLED_PREF, true);
- yield check_autocomplete({
- search: "hello",
- searchParam: "enable-actions",
- matches: [
- makeSearchMatch("hello", { engineName: ENGINE_NAME, heuristic: true }),
- ],
- });
- yield cleanUpSuggestions();
-});
-
-add_task(function* disabled_allSuggestions() {
- Services.prefs.setBoolPref(SUGGEST_PREF, true);
- Services.prefs.setBoolPref(SUGGEST_ENABLED_PREF, false);
- yield check_autocomplete({
- search: "hello",
- searchParam: "enable-actions",
- matches: [
- makeSearchMatch("hello", { engineName: ENGINE_NAME, heuristic: true }),
- ],
- });
- yield cleanUpSuggestions();
-});
-
-add_task(function* disabled_privateWindow() {
- Services.prefs.setBoolPref(SUGGEST_PREF, true);
- Services.prefs.setBoolPref(SUGGEST_ENABLED_PREF, true);
- yield check_autocomplete({
- search: "hello",
- searchParam: "private-window enable-actions",
- matches: [
- makeSearchMatch("hello", { engineName: ENGINE_NAME, heuristic: true }),
- ],
- });
- yield cleanUpSuggestions();
-});
-
-add_task(function* singleWordQuery() {
- Services.prefs.setBoolPref(SUGGEST_PREF, true);
- Services.prefs.setBoolPref(SUGGEST_ENABLED_PREF, true);
-
- yield check_autocomplete({
- search: "hello",
- searchParam: "enable-actions",
- matches: [
- makeSearchMatch("hello", { engineName: ENGINE_NAME, heuristic: true }),
- { uri: makeActionURI(("searchengine"), {
- engineName: ENGINE_NAME,
- input: "hello foo",
- searchQuery: "hello",
- searchSuggestion: "hello foo",
- }),
- title: ENGINE_NAME,
- style: ["action", "searchengine"],
- icon: "",
- }, {
- uri: makeActionURI(("searchengine"), {
- engineName: ENGINE_NAME,
- input: "hello bar",
- searchQuery: "hello",
- searchSuggestion: "hello bar",
- }),
- title: ENGINE_NAME,
- style: ["action", "searchengine"],
- icon: "",
- }],
- });
-
- yield cleanUpSuggestions();
-});
-
-add_task(function* multiWordQuery() {
- Services.prefs.setBoolPref(SUGGEST_PREF, true);
- Services.prefs.setBoolPref(SUGGEST_ENABLED_PREF, true);
-
- yield check_autocomplete({
- search: "hello world",
- searchParam: "enable-actions",
- matches: [
- makeSearchMatch("hello world", { engineName: ENGINE_NAME, heuristic: true }),
- { uri: makeActionURI(("searchengine"), {
- engineName: ENGINE_NAME,
- input: "hello world foo",
- searchQuery: "hello world",
- searchSuggestion: "hello world foo",
- }),
- title: ENGINE_NAME,
- style: ["action", "searchengine"],
- icon: "",
- }, {
- uri: makeActionURI(("searchengine"), {
- engineName: ENGINE_NAME,
- input: "hello world bar",
- searchQuery: "hello world",
- searchSuggestion: "hello world bar",
- }),
- title: ENGINE_NAME,
- style: ["action", "searchengine"],
- icon: "",
- }],
- });
-
- yield cleanUpSuggestions();
-});
-
-add_task(function* suffixMatch() {
- Services.prefs.setBoolPref(SUGGEST_PREF, true);
- Services.prefs.setBoolPref(SUGGEST_ENABLED_PREF, true);
-
- setSuggestionsFn(searchStr => {
- let prefixes = ["baz", "quux"];
- return prefixes.map(p => p + " " + searchStr);
- });
-
- yield check_autocomplete({
- search: "hello",
- searchParam: "enable-actions",
- matches: [
- makeSearchMatch("hello", { engineName: ENGINE_NAME, heuristic: true }),
- { uri: makeActionURI(("searchengine"), {
- engineName: ENGINE_NAME,
- input: "baz hello",
- searchQuery: "hello",
- searchSuggestion: "baz hello",
- }),
- title: ENGINE_NAME,
- style: ["action", "searchengine"],
- icon: "",
- }, {
- uri: makeActionURI(("searchengine"), {
- engineName: ENGINE_NAME,
- input: "quux hello",
- searchQuery: "hello",
- searchSuggestion: "quux hello",
- }),
- title: ENGINE_NAME,
- style: ["action", "searchengine"],
- icon: "",
- }],
- });
-
- yield cleanUpSuggestions();
-});
-
-add_task(function* queryIsNotASubstring() {
- Services.prefs.setBoolPref(SUGGEST_PREF, true);
-
- setSuggestionsFn(searchStr => {
- return ["aaa", "bbb"];
- });
-
- yield check_autocomplete({
- search: "hello",
- searchParam: "enable-actions",
- matches: [
- makeSearchMatch("hello", { engineName: ENGINE_NAME, heuristic: true }),
- { uri: makeActionURI(("searchengine"), {
- engineName: ENGINE_NAME,
- input: "aaa",
- searchQuery: "hello",
- searchSuggestion: "aaa",
- }),
- title: ENGINE_NAME,
- style: ["action", "searchengine"],
- icon: "",
- }, {
- uri: makeActionURI(("searchengine"), {
- engineName: ENGINE_NAME,
- input: "bbb",
- searchQuery: "hello",
- searchSuggestion: "bbb",
- }),
- title: ENGINE_NAME,
- style: ["action", "searchengine"],
- icon: "",
- }],
- });
-
- yield cleanUpSuggestions();
-});
-
-add_task(function* restrictToken() {
- Services.prefs.setBoolPref(SUGGEST_PREF, true);
- Services.prefs.setBoolPref(SUGGEST_ENABLED_PREF, true);
-
- // Add a visit and a bookmark. Actually, make the bookmark visited too so
- // that it's guaranteed, with its higher frecency, to appear above the search
- // suggestions.
- yield PlacesTestUtils.addVisits([
- {
- uri: NetUtil.newURI("http://example.com/hello-visit"),
- title: "hello visit",
- },
- {
- uri: NetUtil.newURI("http://example.com/hello-bookmark"),
- title: "hello bookmark",
- },
- ]);
-
- yield addBookmark({
- uri: NetUtil.newURI("http://example.com/hello-bookmark"),
- title: "hello bookmark",
- });
-
- // Do an unrestricted search to make sure everything appears in it, including
- // the visit and bookmark.
- yield check_autocomplete({
- search: "hello",
- searchParam: "enable-actions",
- matches: [
- makeSearchMatch("hello", { engineName: ENGINE_NAME, heuristic: true }),
- {
- uri: NetUtil.newURI("http://example.com/hello-visit"),
- title: "hello visit",
- },
- {
- uri: NetUtil.newURI("http://example.com/hello-bookmark"),
- title: "hello bookmark",
- style: ["bookmark"],
- },
- {
- uri: makeActionURI(("searchengine"), {
- engineName: ENGINE_NAME,
- input: "hello foo",
- searchQuery: "hello",
- searchSuggestion: "hello foo",
- }),
- title: ENGINE_NAME,
- style: ["action", "searchengine"],
- icon: "",
- },
- {
- uri: makeActionURI(("searchengine"), {
- engineName: ENGINE_NAME,
- input: "hello bar",
- searchQuery: "hello",
- searchSuggestion: "hello bar",
- }),
- title: ENGINE_NAME,
- style: ["action", "searchengine"],
- icon: "",
- },
- ],
- });
-
- // Now do a restricted search to make sure only suggestions appear.
- yield check_autocomplete({
- search: SUGGEST_RESTRICT_TOKEN + " hello",
- searchParam: "enable-actions",
- matches: [
- // TODO (bug 1177895) This is wrong.
- makeSearchMatch(SUGGEST_RESTRICT_TOKEN + " hello", { engineName: ENGINE_NAME, heuristic: true }),
- {
- uri: makeActionURI(("searchengine"), {
- engineName: ENGINE_NAME,
- input: "hello foo",
- searchQuery: "hello",
- searchSuggestion: "hello foo",
- }),
- title: ENGINE_NAME,
- style: ["action", "searchengine"],
- icon: "",
- },
- {
- uri: makeActionURI(("searchengine"), {
- engineName: ENGINE_NAME,
- input: "hello bar",
- searchQuery: "hello",
- searchSuggestion: "hello bar",
- }),
- title: ENGINE_NAME,
- style: ["action", "searchengine"],
- icon: "",
- }
- ],
- });
-
- yield cleanUpSuggestions();
-});
-
-add_task(function* mixup_frecency() {
- Services.prefs.setBoolPref(SUGGEST_PREF, true);
-
- // Add a visit and a bookmark. Actually, make the bookmark visited too so
- // that it's guaranteed, with its higher frecency, to appear above the search
- // suggestions.
- yield PlacesTestUtils.addVisits([
- { uri: NetUtil.newURI("http://example.com/lo0"),
- title: "low frecency 0" },
- { uri: NetUtil.newURI("http://example.com/lo1"),
- title: "low frecency 1" },
- { uri: NetUtil.newURI("http://example.com/lo2"),
- title: "low frecency 2" },
- { uri: NetUtil.newURI("http://example.com/lo3"),
- title: "low frecency 3" },
- { uri: NetUtil.newURI("http://example.com/lo4"),
- title: "low frecency 4" },
- ]);
-
- for (let i = 0; i < 4; i++) {
- let href = `http://example.com/lo${i}`;
- let frecency = frecencyForUrl(href);
- Assert.ok(frecency < FRECENCY_DEFAULT,
- `frecency for ${href}: ${frecency}, should be lower than ${FRECENCY_DEFAULT}`);
- }
-
- for (let i = 0; i < 5; i++) {
- yield PlacesTestUtils.addVisits([
- { uri: NetUtil.newURI("http://example.com/hi0"),
- title: "high frecency 0",
- transition: TRANSITION_TYPED },
- { uri: NetUtil.newURI("http://example.com/hi1"),
- title: "high frecency 1",
- transition: TRANSITION_TYPED },
- { uri: NetUtil.newURI("http://example.com/hi2"),
- title: "high frecency 2",
- transition: TRANSITION_TYPED },
- { uri: NetUtil.newURI("http://example.com/hi3"),
- title: "high frecency 3",
- transition: TRANSITION_TYPED },
- ]);
- }
-
- for (let i = 0; i < 4; i++) {
- let href = `http://example.com/hi${i}`;
- yield addBookmark({ uri: href, title: `high frecency ${i}` });
- let frecency = frecencyForUrl(href);
- Assert.ok(frecency > FRECENCY_DEFAULT,
- `frecency for ${href}: ${frecency}, should be higher than ${FRECENCY_DEFAULT}`);
- }
-
- // Do an unrestricted search to make sure everything appears in it, including
- // the visit and bookmark.
- yield check_autocomplete({
- checkSorting: true,
- search: "frecency",
- searchParam: "enable-actions",
- matches: [
- makeSearchMatch("frecency", { engineName: ENGINE_NAME, heuristic: true }),
- { uri: NetUtil.newURI("http://example.com/hi3"),
- title: "high frecency 3",
- style: [ "bookmark" ] },
- { uri: NetUtil.newURI("http://example.com/hi2"),
- title: "high frecency 2",
- style: [ "bookmark" ] },
- { uri: NetUtil.newURI("http://example.com/hi1"),
- title: "high frecency 1",
- style: [ "bookmark" ] },
- { uri: NetUtil.newURI("http://example.com/hi0"),
- title: "high frecency 0",
- style: [ "bookmark" ] },
- { uri: NetUtil.newURI("http://example.com/lo4"),
- title: "low frecency 4" },
- {
- uri: makeActionURI(("searchengine"), {
- engineName: ENGINE_NAME,
- input: "frecency foo",
- searchQuery: "frecency",
- searchSuggestion: "frecency foo",
- }),
- title: ENGINE_NAME,
- style: ["action", "searchengine"],
- icon: "",
- },
- {
- uri: makeActionURI(("searchengine"), {
- engineName: ENGINE_NAME,
- input: "frecency bar",
- searchQuery: "frecency",
- searchSuggestion: "frecency bar",
- }),
- title: ENGINE_NAME,
- style: ["action", "searchengine"],
- icon: "",
- },
- { uri: NetUtil.newURI("http://example.com/lo3"),
- title: "low frecency 3" },
- { uri: NetUtil.newURI("http://example.com/lo2"),
- title: "low frecency 2" },
- { uri: NetUtil.newURI("http://example.com/lo1"),
- title: "low frecency 1" },
- { uri: NetUtil.newURI("http://example.com/lo0"),
- title: "low frecency 0" },
- ],
- });
-
- yield cleanUpSuggestions();
-});
-
-add_task(function* prohibit_suggestions() {
- Services.prefs.setBoolPref(SUGGEST_PREF, true);
-
- yield check_autocomplete({
- search: "localhost",
- searchParam: "enable-actions",
- matches: [
- makeSearchMatch("localhost", { engineName: ENGINE_NAME, heuristic: true }),
- {
- uri: makeActionURI(("searchengine"), {
- engineName: ENGINE_NAME,
- input: "localhost foo",
- searchQuery: "localhost",
- searchSuggestion: "localhost foo",
- }),
- title: ENGINE_NAME,
- style: ["action", "searchengine"],
- icon: "",
- },
- {
- uri: makeActionURI(("searchengine"), {
- engineName: ENGINE_NAME,
- input: "localhost bar",
- searchQuery: "localhost",
- searchSuggestion: "localhost bar",
- }),
- title: ENGINE_NAME,
- style: ["action", "searchengine"],
- icon: "",
- },
- ],
- });
- Services.prefs.setBoolPref("browser.fixup.domainwhitelist.localhost", true);
- do_register_cleanup(() => {
- Services.prefs.clearUserPref("browser.fixup.domainwhitelist.localhost");
- });
- yield check_autocomplete({
- search: "localhost",
- searchParam: "enable-actions",
- matches: [
- makeVisitMatch("localhost", "http://localhost/", { heuristic: true }),
- makeSearchMatch("localhost", { engineName: ENGINE_NAME, heuristic: false })
- ],
- });
-
- // When using multiple words, we should still get suggestions:
- yield check_autocomplete({
- search: "localhost other",
- searchParam: "enable-actions",
- matches: [
- makeSearchMatch("localhost other", { engineName: ENGINE_NAME, heuristic: true }),
- {
- uri: makeActionURI(("searchengine"), {
- engineName: ENGINE_NAME,
- input: "localhost other foo",
- searchQuery: "localhost other",
- searchSuggestion: "localhost other foo",
- }),
- title: ENGINE_NAME,
- style: ["action", "searchengine"],
- icon: "",
- },
- {
- uri: makeActionURI(("searchengine"), {
- engineName: ENGINE_NAME,
- input: "localhost other bar",
- searchQuery: "localhost other",
- searchSuggestion: "localhost other bar",
- }),
- title: ENGINE_NAME,
- style: ["action", "searchengine"],
- icon: "",
- },
- ],
- });
-
- // Clear the whitelist for localhost, and try preferring DNS for any single
- // word instead:
- Services.prefs.clearUserPref("browser.fixup.domainwhitelist.localhost");
- Services.prefs.setBoolPref("browser.fixup.dns_first_for_single_words", true);
- do_register_cleanup(() => {
- Services.prefs.clearUserPref("browser.fixup.dns_first_for_single_words");
- });
-
- yield check_autocomplete({
- search: "localhost",
- searchParam: "enable-actions",
- matches: [
- makeVisitMatch("localhost", "http://localhost/", { heuristic: true }),
- makeSearchMatch("localhost", { engineName: ENGINE_NAME, heuristic: false })
- ],
- });
-
- yield check_autocomplete({
- search: "somethingelse",
- searchParam: "enable-actions",
- matches: [
- makeVisitMatch("somethingelse", "http://somethingelse/", { heuristic: true }),
- makeSearchMatch("somethingelse", { engineName: ENGINE_NAME, heuristic: false })
- ],
- });
-
- // When using multiple words, we should still get suggestions:
- yield check_autocomplete({
- search: "localhost other",
- searchParam: "enable-actions",
- matches: [
- makeSearchMatch("localhost other", { engineName: ENGINE_NAME, heuristic: true }),
- {
- uri: makeActionURI(("searchengine"), {
- engineName: ENGINE_NAME,
- input: "localhost other foo",
- searchQuery: "localhost other",
- searchSuggestion: "localhost other foo",
- }),
- title: ENGINE_NAME,
- style: ["action", "searchengine"],
- icon: "",
- },
- {
- uri: makeActionURI(("searchengine"), {
- engineName: ENGINE_NAME,
- input: "localhost other bar",
- searchQuery: "localhost other",
- searchSuggestion: "localhost other bar",
- }),
- title: ENGINE_NAME,
- style: ["action", "searchengine"],
- icon: "",
- },
- ],
- });
-
- Services.prefs.clearUserPref("browser.fixup.dns_first_for_single_words");
-
- yield check_autocomplete({
- search: "1.2.3.4",
- searchParam: "enable-actions",
- matches: [
- makeVisitMatch("1.2.3.4", "http://1.2.3.4/", { heuristic: true }),
- ],
- });
- yield check_autocomplete({
- search: "[2001::1]:30",
- searchParam: "enable-actions",
- matches: [
- makeVisitMatch("[2001::1]:30", "http://[2001::1]:30/", { heuristic: true }),
- ],
- });
- yield check_autocomplete({
- search: "user:pass@test",
- searchParam: "enable-actions",
- matches: [
- makeVisitMatch("user:pass@test", "http://user:pass@test/", { heuristic: true }),
- ],
- });
- yield check_autocomplete({
- search: "test/test",
- searchParam: "enable-actions",
- matches: [
- makeVisitMatch("test/test", "http://test/test", { heuristic: true }),
- ],
- });
- yield check_autocomplete({
- search: "data:text/plain,Content",
- searchParam: "enable-actions",
- matches: [
- makeVisitMatch("data:text/plain,Content", "data:text/plain,Content", { heuristic: true }),
- ],
- });
-
- yield check_autocomplete({
- search: "a",
- searchParam: "enable-actions",
- matches: [
- makeSearchMatch("a", { engineName: ENGINE_NAME, heuristic: true }),
- ],
- });
-
- yield cleanUpSuggestions();
-});
-
-add_task(function* avoid_url_suggestions() {
- Services.prefs.setBoolPref(SUGGEST_PREF, true);
-
- setSuggestionsFn(searchStr => {
- let suffixes = [".com", "/test", ":1]", "@test", ". com"];
- return suffixes.map(s => searchStr + s);
- });
-
- yield check_autocomplete({
- search: "test",
- searchParam: "enable-actions",
- matches: [
- makeSearchMatch("test", { engineName: ENGINE_NAME, heuristic: true }),
- {
- uri: makeActionURI(("searchengine"), {
- engineName: ENGINE_NAME,
- input: "test. com",
- searchQuery: "test",
- searchSuggestion: "test. com",
- }),
- title: ENGINE_NAME,
- style: ["action", "searchengine"],
- icon: "",
- },
- ],
- });
-
- yield cleanUpSuggestions();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_special_search.js b/toolkit/components/places/tests/unifiedcomplete/test_special_search.js
deleted file mode 100644
index 21df7046cc..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_special_search.js
+++ /dev/null
@@ -1,447 +0,0 @@
-/* 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/. */
-
-/**
- * Test for bug 395161 that allows special searches that restrict results to
- * history/bookmark/tagged items and title/url matches.
- *
- * Test 485122 by making sure results don't have tags when restricting result
- * to just history either by default behavior or dynamic query restrict.
- */
-
-function setSuggestPrefsToFalse() {
- Services.prefs.setBoolPref("browser.urlbar.suggest.history", false);
- Services.prefs.setBoolPref("browser.urlbar.suggest.history.onlyTyped", false);
- Services.prefs.setBoolPref("browser.urlbar.suggest.bookmark", false);
-}
-
-add_task(function* test_special_searches() {
- let uri1 = NetUtil.newURI("http://url/");
- let uri2 = NetUtil.newURI("http://url/2");
- let uri3 = NetUtil.newURI("http://foo.bar/");
- let uri4 = NetUtil.newURI("http://foo.bar/2");
- let uri5 = NetUtil.newURI("http://url/star");
- let uri6 = NetUtil.newURI("http://url/star/2");
- let uri7 = NetUtil.newURI("http://foo.bar/star");
- let uri8 = NetUtil.newURI("http://foo.bar/star/2");
- let uri9 = NetUtil.newURI("http://url/tag");
- let uri10 = NetUtil.newURI("http://url/tag/2");
- let uri11 = NetUtil.newURI("http://foo.bar/tag");
- let uri12 = NetUtil.newURI("http://foo.bar/tag/2");
- yield PlacesTestUtils.addVisits([
- { uri: uri1, title: "title", transition: TRANSITION_TYPED },
- { uri: uri2, title: "foo.bar" },
- { uri: uri3, title: "title" },
- { uri: uri4, title: "foo.bar", transition: TRANSITION_TYPED },
- { uri: uri6, title: "foo.bar" },
- { uri: uri11, title: "title", transition: TRANSITION_TYPED }
- ]);
- yield addBookmark( { uri: uri5, title: "title" } );
- yield addBookmark( { uri: uri6, title: "foo.bar" } );
- yield addBookmark( { uri: uri7, title: "title" } );
- yield addBookmark( { uri: uri8, title: "foo.bar" } );
- yield addBookmark( { uri: uri9, title: "title", tags: [ "foo.bar" ] } );
- yield addBookmark( { uri: uri10, title: "foo.bar", tags: [ "foo.bar" ] } );
- yield addBookmark( { uri: uri11, title: "title", tags: [ "foo.bar" ] } );
- yield addBookmark( { uri: uri12, title: "foo.bar", tags: [ "foo.bar" ] } );
-
- // Test restricting searches
- do_print("History restrict");
- yield check_autocomplete({
- search: "^",
- matches: [ { uri: uri1, title: "title" },
- { uri: uri2, title: "foo.bar" },
- { uri: uri3, title: "title" },
- { uri: uri4, title: "foo.bar" },
- { uri: uri6, title: "foo.bar" },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- do_print("Star restrict");
- yield check_autocomplete({
- search: "*",
- matches: [ { uri: uri5, title: "title", style: [ "bookmark" ] },
- { uri: uri6, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri7, title: "title", style: [ "bookmark" ] },
- { uri: uri8, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri9, title: "title", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri10, title: "foo.bar", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri11, title: "title", tags: [ "foo.bar"], style: [ "bookmark-tag" ] },
- { uri: uri12, title: "foo.bar", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] } ]
- });
-
- do_print("Tag restrict");
- yield check_autocomplete({
- search: "+",
- matches: [ { uri: uri9, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] },
- { uri: uri10, title: "foo.bar", tags: [ "foo.bar" ], style: [ "tag" ] },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] },
- { uri: uri12, title: "foo.bar", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- // Test specials as any word position
- do_print("Special as first word");
- yield check_autocomplete({
- search: "^ foo bar",
- matches: [ { uri: uri2, title: "foo.bar" },
- { uri: uri3, title: "title" },
- { uri: uri4, title: "foo.bar" },
- { uri: uri6, title: "foo.bar" },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- do_print("Special as middle word");
- yield check_autocomplete({
- search: "foo ^ bar",
- matches: [ { uri: uri2, title: "foo.bar" },
- { uri: uri3, title: "title" },
- { uri: uri4, title: "foo.bar" },
- { uri: uri6, title: "foo.bar" },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- do_print("Special as last word");
- yield check_autocomplete({
- search: "foo bar ^",
- matches: [ { uri: uri2, title: "foo.bar" },
- { uri: uri3, title: "title" },
- { uri: uri4, title: "foo.bar" },
- { uri: uri6, title: "foo.bar" },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- // Test restricting and matching searches with a term
- do_print("foo ^ -> history");
- yield check_autocomplete({
- search: "foo ^",
- matches: [ { uri: uri2, title: "foo.bar" },
- { uri: uri3, title: "title" },
- { uri: uri4, title: "foo.bar" },
- { uri: uri6, title: "foo.bar" },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- do_print("foo | -> history (change pref)");
- changeRestrict("history", "|");
- yield check_autocomplete({
- search: "foo |",
- matches: [ { uri: uri2, title: "foo.bar" },
- { uri: uri3, title: "title" },
- { uri: uri4, title: "foo.bar" },
- { uri: uri6, title: "foo.bar" },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- do_print("foo * -> is star");
- resetRestrict("history");
- yield check_autocomplete({
- search: "foo *",
- matches: [ { uri: uri6, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri7, title: "title", style: [ "bookmark" ] },
- { uri: uri8, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri9, title: "title", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri10, title: "foo.bar", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri12, title: "foo.bar", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] } ]
- });
-
- do_print("foo | -> is star (change pref)");
- changeRestrict("bookmark", "|");
- yield check_autocomplete({
- search: "foo |",
- matches: [ { uri: uri6, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri7, title: "title", style: [ "bookmark" ] },
- { uri: uri8, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri9, title: "title", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri10, title: "foo.bar", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri12, title: "foo.bar", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] } ]
- });
-
- do_print("foo # -> in title");
- resetRestrict("bookmark");
- yield check_autocomplete({
- search: "foo #",
- matches: [ { uri: uri2, title: "foo.bar" },
- { uri: uri4, title: "foo.bar" },
- { uri: uri6, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri8, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri9, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] },
- { uri: uri10, title: "foo.bar", tags: [ "foo.bar" ], style: [ "tag" ] },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] },
- { uri: uri12, title: "foo.bar", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- do_print("foo | -> in title (change pref)");
- changeRestrict("title", "|");
- yield check_autocomplete({
- search: "foo |",
- matches: [ { uri: uri2, title: "foo.bar" },
- { uri: uri4, title: "foo.bar" },
- { uri: uri6, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri8, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri9, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] },
- { uri: uri10, title: "foo.bar", tags: [ "foo.bar" ], style: [ "tag" ] },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] },
- { uri: uri12, title: "foo.bar", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- do_print("foo @ -> in url");
- resetRestrict("title");
- yield check_autocomplete({
- search: "foo @",
- matches: [ { uri: uri3, title: "title" },
- { uri: uri4, title: "foo.bar" },
- { uri: uri7, title: "title", style: [ "bookmark" ] },
- { uri: uri8, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] },
- { uri: uri12, title: "foo.bar", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- do_print("foo | -> in url (change pref)");
- changeRestrict("url", "|");
- yield check_autocomplete({
- search: "foo |",
- matches: [ { uri: uri3, title: "title" },
- { uri: uri4, title: "foo.bar" },
- { uri: uri7, title: "title", style: [ "bookmark" ] },
- { uri: uri8, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] },
- { uri: uri12, title: "foo.bar", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- do_print("foo + -> is tag");
- resetRestrict("url");
- yield check_autocomplete({
- search: "foo +",
- matches: [ { uri: uri9, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] },
- { uri: uri10, title: "foo.bar", tags: [ "foo.bar" ], style: [ "tag" ] },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] },
- { uri: uri12, title: "foo.bar", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- do_print("foo | -> is tag (change pref)");
- changeRestrict("tag", "|");
- yield check_autocomplete({
- search: "foo |",
- matches: [ { uri: uri9, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] },
- { uri: uri10, title: "foo.bar", tags: [ "foo.bar" ], style: [ "tag" ] },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] },
- { uri: uri12, title: "foo.bar", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- do_print("foo ~ -> is typed");
- resetRestrict("tag");
- yield check_autocomplete({
- search: "foo ~",
- matches: [ { uri: uri4, title: "foo.bar" },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- do_print("foo | -> is typed (change pref)");
- changeRestrict("typed", "|");
- yield check_autocomplete({
- search: "foo |",
- matches: [ { uri: uri4, title: "foo.bar" },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- // Test various pairs of special searches
- do_print("foo ^ * -> history, is star");
- resetRestrict("typed");
- yield check_autocomplete({
- search: "foo ^ *",
- matches: [ { uri: uri6, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] } ]
- });
-
- do_print("foo ^ # -> history, in title");
- yield check_autocomplete({
- search: "foo ^ #",
- matches: [ { uri: uri2, title: "foo.bar" },
- { uri: uri4, title: "foo.bar" },
- { uri: uri6, title: "foo.bar" },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- do_print("foo ^ @ -> history, in url");
- yield check_autocomplete({
- search: "foo ^ @",
- matches: [ { uri: uri3, title: "title" },
- { uri: uri4, title: "foo.bar" },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- do_print("foo ^ + -> history, is tag");
- yield check_autocomplete({
- search: "foo ^ +",
- matches: [ { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- do_print("foo ^ ~ -> history, is typed");
- yield check_autocomplete({
- search: "foo ^ ~",
- matches: [ { uri: uri4, title: "foo.bar" },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- do_print("foo * # -> is star, in title");
- yield check_autocomplete({
- search: "foo * #",
- matches: [ { uri: uri6, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri8, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri9, title: "title", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri10, title: "foo.bar", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri12, title: "foo.bar", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] } ]
- });
-
- do_print("foo * @ -> is star, in url");
- yield check_autocomplete({
- search: "foo * @",
- matches: [ { uri: uri7, title: "title", style: [ "bookmark" ] },
- { uri: uri8, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri12, title: "foo.bar", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] } ]
- });
-
- do_print("foo * + -> same as +");
- yield check_autocomplete({
- search: "foo * +",
- matches: [ { uri: uri9, title: "title", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri10, title: "foo.bar", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri12, title: "foo.bar", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] } ]
- });
-
- do_print("foo * ~ -> is star, is typed");
- yield check_autocomplete({
- search: "foo * ~",
- matches: [ { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] } ]
- });
-
- do_print("foo # @ -> in title, in url");
- yield check_autocomplete({
- search: "foo # @",
- matches: [ { uri: uri4, title: "foo.bar" },
- { uri: uri8, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] },
- { uri: uri12, title: "foo.bar", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- do_print("foo # + -> in title, is tag");
- yield check_autocomplete({
- search: "foo # +",
- matches: [ { uri: uri9, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] },
- { uri: uri10, title: "foo.bar", tags: [ "foo.bar" ], style: [ "tag" ] },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] },
- { uri: uri12, title: "foo.bar", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- do_print("foo # ~ -> in title, is typed");
- yield check_autocomplete({
- search: "foo # ~",
- matches: [ { uri: uri4, title: "foo.bar" },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- do_print("foo @ + -> in url, is tag");
- yield check_autocomplete({
- search: "foo @ +",
- matches: [ { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] },
- { uri: uri12, title: "foo.bar", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- do_print("foo @ ~ -> in url, is typed");
- yield check_autocomplete({
- search: "foo @ ~",
- matches: [ { uri: uri4, title: "foo.bar" },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- do_print("foo + ~ -> is tag, is typed");
- yield check_autocomplete({
- search: "foo + ~",
- matches: [ { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "tag" ] } ]
- });
-
- // Disable autoFill for the next tests, see test_autoFill_default_behavior.js
- // for specific tests.
- Services.prefs.setBoolPref("browser.urlbar.autoFill", false);
-
- // Test default usage by setting certain browser.urlbar.suggest.* prefs
- do_print("foo -> default history");
- setSuggestPrefsToFalse();
- Services.prefs.setBoolPref("browser.urlbar.suggest.history", true);
- yield check_autocomplete({
- search: "foo",
- matches: [ { uri: uri2, title: "foo.bar" },
- { uri: uri3, title: "title" },
- { uri: uri4, title: "foo.bar" },
- { uri: uri6, title: "foo.bar" },
- { uri: uri11, title: "title", tags: ["foo.bar"], style: [ "tag" ] } ]
- });
-
- do_print("foo -> default history, is star");
- setSuggestPrefsToFalse();
- Services.prefs.setBoolPref("browser.urlbar.suggest.history", true);
- Services.prefs.setBoolPref("browser.urlbar.suggest.bookmark", true);
- yield check_autocomplete({
- search: "foo",
- matches: [ { uri: uri2, title: "foo.bar" },
- { uri: uri3, title: "title" },
- { uri: uri4, title: "foo.bar" },
- { uri: uri6, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri7, title: "title", style: [ "bookmark" ] },
- { uri: uri8, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri9, title: "title", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri10, title: "foo.bar", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri11, title: "title", tags: [ "foo.bar"], style: [ "bookmark-tag" ] },
- { uri: uri12, title: "foo.bar", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] } ]
- });
-
- do_print("foo -> default history, is star, is typed");
- setSuggestPrefsToFalse();
- Services.prefs.setBoolPref("browser.urlbar.suggest.history", true);
- Services.prefs.setBoolPref("browser.urlbar.suggest.history.onlyTyped", true);
- Services.prefs.setBoolPref("browser.urlbar.suggest.bookmark", true);
- yield check_autocomplete({
- search: "foo",
- matches: [ { uri: uri4, title: "foo.bar" },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] } ]
- });
-
- do_print("foo -> is star");
- setSuggestPrefsToFalse();
- Services.prefs.setBoolPref("browser.urlbar.suggest.history", false);
- Services.prefs.setBoolPref("browser.urlbar.suggest.bookmark", true);
- yield check_autocomplete({
- search: "foo",
- matches: [ { uri: uri6, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri7, title: "title", style: [ "bookmark" ] },
- { uri: uri8, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri9, title: "title", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri10, title: "foo.bar", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri12, title: "foo.bar", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] } ]
- });
-
- do_print("foo -> is star, is typed");
- setSuggestPrefsToFalse();
- // only typed should be ignored
- Services.prefs.setBoolPref("browser.urlbar.suggest.history.onlyTyped", true);
- Services.prefs.setBoolPref("browser.urlbar.suggest.bookmark", true);
- yield check_autocomplete({
- search: "foo",
- matches: [ { uri: uri6, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri7, title: "title", style: [ "bookmark" ] },
- { uri: uri8, title: "foo.bar", style: [ "bookmark" ] },
- { uri: uri9, title: "title", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri10, title: "foo.bar", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri11, title: "title", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] },
- { uri: uri12, title: "foo.bar", tags: [ "foo.bar" ], style: [ "bookmark-tag" ] } ]
- });
-
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_swap_protocol.js b/toolkit/components/places/tests/unifiedcomplete/test_swap_protocol.js
deleted file mode 100644
index 89ccc3206e..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_swap_protocol.js
+++ /dev/null
@@ -1,153 +0,0 @@
-/* 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/. */
-
-/**
- * Test bug 424717 to make sure searching with an existing location like
- * http://site/ also matches https://site/ or ftp://site/. Same thing for
- * ftp://site/ and https://site/.
- *
- * Test bug 461483 to make sure a search for "w" doesn't match the "www." from
- * site subdomains.
- */
-
-add_task(function* test_swap_protocol() {
- let uri1 = NetUtil.newURI("http://www.site/");
- let uri2 = NetUtil.newURI("http://site/");
- let uri3 = NetUtil.newURI("ftp://ftp.site/");
- let uri4 = NetUtil.newURI("ftp://site/");
- let uri5 = NetUtil.newURI("https://www.site/");
- let uri6 = NetUtil.newURI("https://site/");
- let uri7 = NetUtil.newURI("http://woohoo/");
- let uri8 = NetUtil.newURI("http://wwwwwwacko/");
- yield PlacesTestUtils.addVisits([
- { uri: uri1, title: "title" },
- { uri: uri2, title: "title" },
- { uri: uri3, title: "title" },
- { uri: uri4, title: "title" },
- { uri: uri5, title: "title" },
- { uri: uri6, title: "title" },
- { uri: uri7, title: "title" },
- { uri: uri8, title: "title" }
- ]);
-
- let allMatches = [
- { uri: uri1, title: "title" },
- { uri: uri2, title: "title" },
- { uri: uri3, title: "title" },
- { uri: uri4, title: "title" },
- { uri: uri5, title: "title" },
- { uri: uri6, title: "title" }
- ];
-
- // Disable autoFill to avoid handling the first result.
- Services.prefs.setBoolPref("browser.urlbar.autoFill", "false");
- Services.prefs.setBoolPref("browser.urlbar.autoFill.searchEngines", false);
-
- do_print("http://www.site matches all site");
- yield check_autocomplete({
- search: "http://www.site",
- matches: allMatches
- });
-
- do_print("http://site matches all site");
- yield check_autocomplete({
- search: "http://site",
- matches: allMatches
- });
-
- do_print("ftp://ftp.site matches itself");
- yield check_autocomplete({
- search: "ftp://ftp.site",
- matches: [ { uri: uri3, title: "title" } ]
- });
-
- do_print("ftp://site matches all site");
- yield check_autocomplete({
- search: "ftp://site",
- matches: allMatches
- });
-
- do_print("https://www.site matches all site");
- yield check_autocomplete({
- search: "https://www.site",
- matches: allMatches
- });
-
- do_print("https://site matches all site");
- yield check_autocomplete({
- search: "https://site",
- matches: allMatches
- });
-
- do_print("www.site matches all site");
- yield check_autocomplete({
- search: "www.site",
- matches: allMatches
- });
-
- do_print("w matches none of www.");
- yield check_autocomplete({
- search: "w",
- matches: [ { uri: uri7, title: "title" },
- { uri: uri8, title: "title" } ]
- });
-
- do_print("http://w matches none of www.");
- yield check_autocomplete({
- search: "http://w",
- matches: [ { uri: uri7, title: "title" },
- { uri: uri8, title: "title" } ]
- });
-
- do_print("http://w matches none of www.");
- yield check_autocomplete({
- search: "http://www.w",
- matches: [ { uri: uri7, title: "title" },
- { uri: uri8, title: "title" } ]
- });
-
- do_print("ww matches none of www.");
- yield check_autocomplete({
- search: "ww",
- matches: [ { uri: uri8, title: "title" } ]
- });
-
- do_print("ww matches none of www.");
- yield check_autocomplete({
- search: "ww",
- matches: [ { uri: uri8, title: "title" } ]
- });
-
- do_print("http://ww matches none of www.");
- yield check_autocomplete({
- search: "http://ww",
- matches: [ { uri: uri8, title: "title" } ]
- });
-
- do_print("http://www.ww matches none of www.");
- yield check_autocomplete({
- search: "http://www.ww",
- matches: [ { uri: uri8, title: "title" } ]
- });
-
- do_print("www matches none of www.");
- yield check_autocomplete({
- search: "www",
- matches: [ { uri: uri8, title: "title" } ]
- });
-
- do_print("http://www matches none of www.");
- yield check_autocomplete({
- search: "http://www",
- matches: [ { uri: uri8, title: "title" } ]
- });
-
- do_print("http://www.www matches none of www.");
- yield check_autocomplete({
- search: "http://www.www",
- matches: [ { uri: uri8, title: "title" } ]
- });
-
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_tab_matches.js b/toolkit/components/places/tests/unifiedcomplete/test_tab_matches.js
deleted file mode 100644
index 646519c322..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_tab_matches.js
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
- * vim:set ts=2 sw=2 sts=2 et:
- * 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/. */
-
-var gTabRestrictChar = "%";
-
-add_task(function* test_tab_matches() {
- let uri1 = NetUtil.newURI("http://abc.com/");
- let uri2 = NetUtil.newURI("http://xyz.net/");
- let uri3 = NetUtil.newURI("about:mozilla");
- let uri4 = NetUtil.newURI("data:text/html,test");
- yield PlacesTestUtils.addVisits([
- { uri: uri1, title: "ABC rocks" },
- { uri: uri2, title: "xyz.net - we're better than ABC" }
- ]);
- addOpenPages(uri1, 1);
- // Pages that cannot be registered in history.
- addOpenPages(uri3, 1);
- addOpenPages(uri4, 1);
-
- do_print("two results, normal result is a tab match");
- yield check_autocomplete({
- search: "abc.com",
- searchParam: "enable-actions",
- matches: [ makeVisitMatch("abc.com", "http://abc.com/", { heuristic: true }),
- makeSwitchToTabMatch("http://abc.com/", { title: "ABC rocks" }),
- makeSearchMatch("abc.com", { heuristic: false }) ]
- });
-
- do_print("three results, one tab match");
- yield check_autocomplete({
- search: "abc",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch("abc", { heuristic: true }),
- makeSwitchToTabMatch("http://abc.com/", { title: "ABC rocks" }),
- { uri: uri2, title: "xyz.net - we're better than ABC", style: [ "favicon" ] } ]
- });
-
- do_print("three results, both normal results are tab matches");
- addOpenPages(uri2, 1);
- yield check_autocomplete({
- search: "abc",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch("abc", { heuristic: true }),
- makeSwitchToTabMatch("http://abc.com/", { title: "ABC rocks" }),
- makeSwitchToTabMatch("http://xyz.net/", { title: "xyz.net - we're better than ABC" }) ]
- });
-
- do_print("three results, both normal results are tab matches, one has multiple tabs");
- addOpenPages(uri2, 5);
- yield check_autocomplete({
- search: "abc",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch("abc", { heuristic: true }),
- makeSwitchToTabMatch("http://abc.com/", { title: "ABC rocks" }),
- makeSwitchToTabMatch("http://xyz.net/", { title: "xyz.net - we're better than ABC" }) ]
- });
-
- do_print("three results, no tab matches (disable-private-actions)");
- yield check_autocomplete({
- search: "abc",
- searchParam: "enable-actions disable-private-actions",
- matches: [ makeSearchMatch("abc", { heuristic: true }),
- { uri: uri1, title: "ABC rocks", style: [ "favicon" ] },
- { uri: uri2, title: "xyz.net - we're better than ABC", style: [ "favicon" ] } ]
- });
-
- do_print("two results (actions disabled)");
- yield check_autocomplete({
- search: "abc",
- searchParam: "",
- matches: [ { uri: uri1, title: "ABC rocks", style: [ "favicon" ] },
- { uri: uri2, title: "xyz.net - we're better than ABC", style: [ "favicon" ] } ]
- });
-
- do_print("three results, no tab matches");
- removeOpenPages(uri1, 1);
- removeOpenPages(uri2, 6);
- yield check_autocomplete({
- search: "abc",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch("abc", { heuristic: true }),
- { uri: uri1, title: "ABC rocks", style: [ "favicon" ] },
- { uri: uri2, title: "xyz.net - we're better than ABC", style: [ "favicon" ] } ]
- });
-
- do_print("tab match search with restriction character");
- addOpenPages(uri1, 1);
- yield check_autocomplete({
- search: gTabRestrictChar + " abc",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch(gTabRestrictChar + " abc", { heuristic: true }),
- makeSwitchToTabMatch("http://abc.com/", { title: "ABC rocks" }) ]
- });
-
- do_print("tab match with not-addable pages");
- yield check_autocomplete({
- search: "mozilla",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch("mozilla", { heuristic: true }),
- makeSwitchToTabMatch("about:mozilla") ]
- });
-
- do_print("tab match with not-addable pages and restriction character");
- yield check_autocomplete({
- search: gTabRestrictChar + " mozilla",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch(gTabRestrictChar + " mozilla", { heuristic: true }),
- makeSwitchToTabMatch("about:mozilla") ]
- });
-
- do_print("tab match with not-addable pages and only restriction character");
- yield check_autocomplete({
- search: gTabRestrictChar,
- searchParam: "enable-actions",
- matches: [ makeSearchMatch(gTabRestrictChar, { heuristic: true }),
- makeSwitchToTabMatch("http://abc.com/", { title: "ABC rocks" }),
- makeSwitchToTabMatch("about:mozilla"),
- makeSwitchToTabMatch("data:text/html,test") ]
- });
-
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_trimming.js b/toolkit/components/places/tests/unifiedcomplete/test_trimming.js
deleted file mode 100644
index e55b009ff9..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_trimming.js
+++ /dev/null
@@ -1,313 +0,0 @@
-/* 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/. */
-
-add_task(function* test_untrimmed_secure_www() {
- do_print("Searching for untrimmed https://www entry");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("https://www.mozilla.org/test/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "mo",
- autofilled: "mozilla.org/",
- completed: "https://www.mozilla.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_untrimmed_secure_www_path() {
- do_print("Searching for untrimmed https://www entry with path");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("https://www.mozilla.org/test/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "mozilla.org/t",
- autofilled: "mozilla.org/test/",
- completed: "https://www.mozilla.org/test/"
- });
- yield cleanup();
-});
-
-add_task(function* test_untrimmed_secure() {
- do_print("Searching for untrimmed https:// entry");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("https://mozilla.org/test/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "mo",
- autofilled: "mozilla.org/",
- completed: "https://mozilla.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_untrimmed_secure_path() {
- do_print("Searching for untrimmed https:// entry with path");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("https://mozilla.org/test/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "mozilla.org/t",
- autofilled: "mozilla.org/test/",
- completed: "https://mozilla.org/test/"
- });
- yield cleanup();
-});
-
-add_task(function* test_untrimmed_www() {
- do_print("Searching for untrimmed http://www entry");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://www.mozilla.org/test/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "mo",
- autofilled: "mozilla.org/",
- completed: "www.mozilla.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_untrimmed_www_path() {
- do_print("Searching for untrimmed http://www entry with path");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://www.mozilla.org/test/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "mozilla.org/t",
- autofilled: "mozilla.org/test/",
- completed: "http://www.mozilla.org/test/"
- });
- yield cleanup();
-});
-
-add_task(function* test_untrimmed_ftp() {
- do_print("Searching for untrimmed ftp:// entry");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("ftp://mozilla.org/test/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "mo",
- autofilled: "mozilla.org/",
- completed: "ftp://mozilla.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_untrimmed_ftp_path() {
- do_print("Searching for untrimmed ftp:// entry with path");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("ftp://mozilla.org/test/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "mozilla.org/t",
- autofilled: "mozilla.org/test/",
- completed: "ftp://mozilla.org/test/"
- });
- yield cleanup();
-});
-
-add_task(function* test_priority_1() {
- do_print("Ensuring correct priority 1");
- yield PlacesTestUtils.addVisits([
- { uri: NetUtil.newURI("https://www.mozilla.org/test/"), transition: TRANSITION_TYPED },
- { uri: NetUtil.newURI("https://mozilla.org/test/"), transition: TRANSITION_TYPED },
- { uri: NetUtil.newURI("ftp://mozilla.org/test/"), transition: TRANSITION_TYPED },
- { uri: NetUtil.newURI("http://www.mozilla.org/test/"), transition: TRANSITION_TYPED },
- { uri: NetUtil.newURI("http://mozilla.org/test/"), transition: TRANSITION_TYPED }
- ]);
- yield check_autocomplete({
- search: "mo",
- autofilled: "mozilla.org/",
- completed: "mozilla.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_periority_2() {
- do_print( "Ensuring correct priority 2");
- yield PlacesTestUtils.addVisits([
- { uri: NetUtil.newURI("https://mozilla.org/test/"), transition: TRANSITION_TYPED },
- { uri: NetUtil.newURI("ftp://mozilla.org/test/"), transition: TRANSITION_TYPED },
- { uri: NetUtil.newURI("http://www.mozilla.org/test/"), transition: TRANSITION_TYPED },
- { uri: NetUtil.newURI("http://mozilla.org/test/"), transition: TRANSITION_TYPED }
- ]);
- yield check_autocomplete({
- search: "mo",
- autofilled: "mozilla.org/",
- completed: "mozilla.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_periority_3() {
- do_print("Ensuring correct priority 3");
- yield PlacesTestUtils.addVisits([
- { uri: NetUtil.newURI("ftp://mozilla.org/test/"), transition: TRANSITION_TYPED },
- { uri: NetUtil.newURI("http://www.mozilla.org/test/"), transition: TRANSITION_TYPED },
- { uri: NetUtil.newURI("http://mozilla.org/test/"), transition: TRANSITION_TYPED }
- ]);
- yield check_autocomplete({
- search: "mo",
- autofilled: "mozilla.org/",
- completed: "mozilla.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_periority_4() {
- do_print("Ensuring correct priority 4");
- yield PlacesTestUtils.addVisits([
- { uri: NetUtil.newURI("http://www.mozilla.org/test/"), transition: TRANSITION_TYPED },
- { uri: NetUtil.newURI("http://mozilla.org/test/"), transition: TRANSITION_TYPED }
- ]);
- yield check_autocomplete({
- search: "mo",
- autofilled: "mozilla.org/",
- completed: "mozilla.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_priority_5() {
- do_print("Ensuring correct priority 5");
- yield PlacesTestUtils.addVisits([
- { uri: NetUtil.newURI("ftp://mozilla.org/test/"), transition: TRANSITION_TYPED },
- { uri: NetUtil.newURI("ftp://www.mozilla.org/test/"), transition: TRANSITION_TYPED }
- ]);
- yield check_autocomplete({
- search: "mo",
- autofilled: "mozilla.org/",
- completed: "ftp://mozilla.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_priority_6() {
- do_print("Ensuring correct priority 6");
- yield PlacesTestUtils.addVisits([
- { uri: NetUtil.newURI("http://www.mozilla.org/test1/"), transition: TRANSITION_TYPED },
- { uri: NetUtil.newURI("http://www.mozilla.org/test2/"), transition: TRANSITION_TYPED }
- ]);
- yield check_autocomplete({
- search: "mo",
- autofilled: "mozilla.org/",
- completed: "www.mozilla.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_longer_domain() {
- do_print("Ensuring longer domain can't match");
- // The .co should be preferred, but should not get the https from the .com.
- // The .co domain must be added later to activate the trigger bug.
- yield PlacesTestUtils.addVisits([
- { uri: NetUtil.newURI("https://mozilla.com/"), transition: TRANSITION_TYPED },
- { uri: NetUtil.newURI("http://mozilla.co/"), transition: TRANSITION_TYPED },
- { uri: NetUtil.newURI("http://mozilla.co/"), transition: TRANSITION_TYPED }
- ]);
- yield check_autocomplete({
- search: "mo",
- autofilled: "mozilla.co/",
- completed: "mozilla.co/"
- });
-
- yield cleanup();
-});
-
-add_task(function* test_escaped_chars() {
- do_print("Searching for URL with characters that are normally escaped");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("https://www.mozilla.org/啊-test"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "https://www.mozilla.org/啊-test",
- autofilled: "https://www.mozilla.org/啊-test",
- completed: "https://www.mozilla.org/啊-test"
- });
- yield cleanup();
-});
-
-add_task(function* test_unsecure_secure() {
- do_print("Don't return unsecure URL when searching for secure ones");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://test.moz.org/test/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "https://test.moz.org/t",
- autofilled: "https://test.moz.org/test/",
- completed: "https://test.moz.org/test/"
- });
- yield cleanup();
-});
-
-add_task(function* test_unsecure_secure_domain() {
- do_print("Don't return unsecure domain when searching for secure ones");
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://test.moz.org/test/"),
- transition: TRANSITION_TYPED
- });
- yield check_autocomplete({
- search: "https://test.moz",
- autofilled: "https://test.moz.org/",
- completed: "https://test.moz.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_untyped_www() {
- do_print("Untyped is not accounted for www");
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", false);
- yield PlacesTestUtils.addVisits({ uri: NetUtil.newURI("http://www.moz.org/test/") });
- yield check_autocomplete({
- search: "mo",
- autofilled: "moz.org/",
- completed: "moz.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_untyped_ftp() {
- do_print("Untyped is not accounted for ftp");
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", false);
- yield PlacesTestUtils.addVisits({ uri: NetUtil.newURI("ftp://moz.org/test/") });
- yield check_autocomplete({
- search: "mo",
- autofilled: "moz.org/",
- completed: "moz.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_untyped_secure() {
- do_print("Untyped is not accounted for https");
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", false);
- yield PlacesTestUtils.addVisits({ uri: NetUtil.newURI("https://moz.org/test/") });
- yield check_autocomplete({
- search: "mo",
- autofilled: "moz.org/",
- completed: "moz.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_untyped_secure_www() {
- do_print("Untyped is not accounted for https://www");
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", false);
- yield PlacesTestUtils.addVisits({ uri: NetUtil.newURI("https://www.moz.org/test/") });
- yield check_autocomplete({
- search: "mo",
- autofilled: "moz.org/",
- completed: "moz.org/"
- });
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_typed.js b/toolkit/components/places/tests/unifiedcomplete/test_typed.js
deleted file mode 100644
index 72f76159c1..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_typed.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/* 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/. */
-
-// First do searches with typed behavior forced to false, so later tests will
-// ensure autocomplete is able to dinamically switch behavior.
-
-const FAVICON_HREF = NetUtil.newURI(do_get_file("../favicons/favicon-normal16.png")).spec;
-
-add_task(function* test_domain() {
- do_print("Searching for domain should autoFill it");
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", false);
- yield PlacesTestUtils.addVisits(NetUtil.newURI("http://mozilla.org/link/"));
- yield setFaviconForHref("http://mozilla.org/link/", FAVICON_HREF);
- yield check_autocomplete({
- search: "moz",
- autofilled: "mozilla.org/",
- completed: "mozilla.org/",
- icon: "moz-anno:favicon:" + FAVICON_HREF
- });
- yield cleanup();
-});
-
-add_task(function* test_url() {
- do_print("Searching for url should autoFill it");
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", false);
- yield PlacesTestUtils.addVisits(NetUtil.newURI("http://mozilla.org/link/"));
- yield setFaviconForHref("http://mozilla.org/link/", FAVICON_HREF);
- yield check_autocomplete({
- search: "mozilla.org/li",
- autofilled: "mozilla.org/link/",
- completed: "http://mozilla.org/link/",
- icon: "moz-anno:favicon:" + FAVICON_HREF
- });
- yield cleanup();
-});
-
-// Now do searches with typed behavior forced to true.
-
-add_task(function* test_untyped_domain() {
- do_print("Searching for non-typed domain should not autoFill it");
- yield PlacesTestUtils.addVisits(NetUtil.newURI("http://mozilla.org/link/"));
- yield check_autocomplete({
- search: "moz",
- autofilled: "moz",
- completed: "moz"
- });
- yield cleanup();
-});
-
-add_task(function* test_typed_domain() {
- do_print("Searching for typed domain should autoFill it");
- yield PlacesTestUtils.addVisits({ uri: NetUtil.newURI("http://mozilla.org/typed/"),
- transition: TRANSITION_TYPED });
- yield check_autocomplete({
- search: "moz",
- autofilled: "mozilla.org/",
- completed: "mozilla.org/"
- });
- yield cleanup();
-});
-
-add_task(function* test_untyped_url() {
- do_print("Searching for non-typed url should not autoFill it");
- yield PlacesTestUtils.addVisits(NetUtil.newURI("http://mozilla.org/link/"));
- yield check_autocomplete({
- search: "mozilla.org/li",
- autofilled: "mozilla.org/li",
- completed: "mozilla.org/li"
- });
- yield cleanup();
-});
-
-add_task(function* test_typed_url() {
- do_print("Searching for typed url should autoFill it");
- yield PlacesTestUtils.addVisits({ uri: NetUtil.newURI("http://mozilla.org/link/"),
- transition: TRANSITION_TYPED });
- yield check_autocomplete({
- search: "mozilla.org/li",
- autofilled: "mozilla.org/link/",
- completed: "http://mozilla.org/link/"
- });
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_visit_url.js b/toolkit/components/places/tests/unifiedcomplete/test_visit_url.js
deleted file mode 100644
index eaccb23e5d..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_visit_url.js
+++ /dev/null
@@ -1,186 +0,0 @@
-add_task(function*() {
- do_print("visit url, no protocol");
- yield check_autocomplete({
- search: "mozilla.org",
- searchParam: "enable-actions",
- matches: [
- { uri: makeActionURI("visiturl", {url: "http://mozilla.org/", input: "mozilla.org"}), title: "http://mozilla.org/", style: [ "action", "visiturl", "heuristic" ] },
- { uri: makeActionURI("searchengine", {engineName: "MozSearch", input: "mozilla.org", searchQuery: "mozilla.org"}), title: "MozSearch", style: ["action", "searchengine"] }
- ]
- });
-
- do_print("visit url, no protocol but with 2 dots");
- yield check_autocomplete({
- search: "www.mozilla.org",
- searchParam: "enable-actions",
- matches: [
- { uri: makeActionURI("visiturl", {url: "http://www.mozilla.org/", input: "www.mozilla.org"}), title: "http://www.mozilla.org/", style: [ "action", "visiturl", "heuristic" ] },
- { uri: makeActionURI("searchengine", {engineName: "MozSearch", input: "www.mozilla.org", searchQuery: "www.mozilla.org"}), title: "MozSearch", style: ["action", "searchengine"] }
- ]
- });
-
- do_print("visit url, no protocol but with 3 dots");
- yield check_autocomplete({
- search: "www.mozilla.org.tw",
- searchParam: "enable-actions",
- matches: [ { uri: makeActionURI("visiturl", {url: "http://www.mozilla.org.tw/", input: "www.mozilla.org.tw"}), title: "http://www.mozilla.org.tw/", style: [ "action", "visiturl", "heuristic" ] } ]
- });
-
- do_print("visit url, with protocol but with 2 dots");
- yield check_autocomplete({
- search: "https://www.mozilla.org",
- searchParam: "enable-actions",
- matches: [ { uri: makeActionURI("visiturl", {url: "https://www.mozilla.org/", input: "https://www.mozilla.org"}), title: "https://www.mozilla.org/", style: [ "action", "visiturl", "heuristic" ] } ]
- });
-
- do_print("visit url, with protocol but with 3 dots");
- yield check_autocomplete({
- search: "https://www.mozilla.org.tw",
- searchParam: "enable-actions",
- matches: [ { uri: makeActionURI("visiturl", {url: "https://www.mozilla.org.tw/", input: "https://www.mozilla.org.tw"}), title: "https://www.mozilla.org.tw/", style: [ "action", "visiturl", "heuristic" ] } ]
- });
-
- do_print("visit url, with protocol");
- yield check_autocomplete({
- search: "https://mozilla.org",
- searchParam: "enable-actions",
- matches: [ { uri: makeActionURI("visiturl", {url: "https://mozilla.org/", input: "https://mozilla.org"}), title: "https://mozilla.org/", style: [ "action", "visiturl", "heuristic" ] } ]
- });
-
- do_print("visit url, about: protocol (no host)");
- yield check_autocomplete({
- search: "about:config",
- searchParam: "enable-actions",
- matches: [ { uri: makeActionURI("visiturl", {url: "about:config", input: "about:config"}), title: "about:config", style: [ "action", "visiturl", "heuristic" ] } ]
- });
-
- // This is distinct because of how we predict being able to url autofill via
- // host lookups.
- do_print("visit url, host matching visited host but not visited url");
- yield PlacesTestUtils.addVisits([
- { uri: NetUtil.newURI("http://mozilla.org/wine/"), title: "Mozilla Wine", transition: TRANSITION_TYPED },
- ]);
- yield check_autocomplete({
- search: "mozilla.org/rum",
- searchParam: "enable-actions",
- matches: [ makeVisitMatch("mozilla.org/rum", "http://mozilla.org/rum", { heuristic: true }) ]
- });
-
- // And hosts with no dot in them are special, due to requiring whitelisting.
- do_print("non-whitelisted host");
- yield check_autocomplete({
- search: "firefox",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch("firefox", { heuristic: true }) ]
- });
-
- do_print("url with non-whitelisted host");
- yield check_autocomplete({
- search: "firefox/get",
- searchParam: "enable-actions",
- matches: [ makeVisitMatch("firefox/get", "http://firefox/get", { heuristic: true }) ]
- });
-
- Services.prefs.setBoolPref("browser.fixup.domainwhitelist.firefox", true);
- do_register_cleanup(() => {
- Services.prefs.clearUserPref("browser.fixup.domainwhitelist.firefox");
- });
-
- do_print("whitelisted host");
- yield check_autocomplete({
- search: "firefox",
- searchParam: "enable-actions",
- matches: [
- makeVisitMatch("firefox", "http://firefox/", { heuristic: true }),
- makeSearchMatch("firefox", { heuristic: false })
- ]
- });
-
- do_print("url with whitelisted host");
- yield check_autocomplete({
- search: "firefox/get",
- searchParam: "enable-actions",
- matches: [ makeVisitMatch("firefox/get", "http://firefox/get", { heuristic: true }) ]
- });
-
- do_print("visit url, host matching visited host but not visited url, whitelisted host");
- Services.prefs.setBoolPref("browser.fixup.domainwhitelist.mozilla", true);
- do_register_cleanup(() => {
- Services.prefs.clearUserPref("browser.fixup.domainwhitelist.mozilla");
- });
- yield check_autocomplete({
- search: "mozilla/rum",
- searchParam: "enable-actions",
- matches: [ makeVisitMatch("mozilla/rum", "http://mozilla/rum", { heuristic: true }) ]
- });
-
- // ipv4 and ipv6 literal addresses should offer to visit.
- do_print("visit url, ipv4 literal");
- yield check_autocomplete({
- search: "127.0.0.1",
- searchParam: "enable-actions",
- matches: [ makeVisitMatch("127.0.0.1", "http://127.0.0.1/", { heuristic: true }) ]
- });
-
- do_print("visit url, ipv6 literal");
- yield check_autocomplete({
- search: "[2001:db8::1]",
- searchParam: "enable-actions",
- matches: [ makeVisitMatch("[2001:db8::1]", "http://[2001:db8::1]/", { heuristic: true }) ]
- });
-
- // Setting keyword.enabled to false should always try to visit.
- let keywordEnabled = Services.prefs.getBoolPref("keyword.enabled");
- Services.prefs.setBoolPref("keyword.enabled", false);
- do_register_cleanup(() => {
- Services.prefs.clearUserPref("keyword.enabled");
- });
- do_print("visit url, keyword.enabled = false");
- yield check_autocomplete({
- search: "bacon",
- searchParam: "enable-actions",
- matches: [ makeVisitMatch("bacon", "http://bacon/", { heuristic: true }) ]
- });
- do_print("visit two word query, keyword.enabled = false");
- yield check_autocomplete({
- search: "bacon lovers",
- searchParam: "enable-actions",
- matches: [ makeVisitMatch("bacon lovers", "bacon lovers", { heuristic: true }) ]
- });
- Services.prefs.setBoolPref("keyword.enabled", keywordEnabled);
-
- do_print("visit url, scheme+host");
- yield check_autocomplete({
- search: "http://example",
- searchParam: "enable-actions",
- matches: [ makeVisitMatch("http://example", "http://example/", { heuristic: true }) ]
- });
-
- do_print("visit url, scheme+host");
- yield check_autocomplete({
- search: "ftp://example",
- searchParam: "enable-actions",
- matches: [ makeVisitMatch("ftp://example", "ftp://example/", { heuristic: true }) ]
- });
-
- do_print("visit url, host+port");
- yield check_autocomplete({
- search: "example:8080",
- searchParam: "enable-actions",
- matches: [ makeVisitMatch("example:8080", "http://example:8080/", { heuristic: true }) ]
- });
-
- do_print("numerical operations that look like urls should search");
- yield check_autocomplete({
- search: "123/12",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch("123/12", { heuristic: true }) ]
- });
-
- do_print("numerical operations that look like urls should search");
- yield check_autocomplete({
- search: "123.12/12.1",
- searchParam: "enable-actions",
- matches: [ makeSearchMatch("123.12/12.1", { heuristic: true }) ]
- });
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_word_boundary_search.js b/toolkit/components/places/tests/unifiedcomplete/test_word_boundary_search.js
deleted file mode 100644
index f79573ae6c..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_word_boundary_search.js
+++ /dev/null
@@ -1,175 +0,0 @@
-/* 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/. */
-
-/**
- * Test bug 393678 to make sure matches against the url, title, tags are only
- * made on word boundaries instead of in the middle of words.
- *
- * Make sure we don't try matching one after a CamelCase because the upper-case
- * isn't really a word boundary. (bug 429498)
- *
- * Bug 429531 provides switching between "must match on word boundary" and "can
- * match," so leverage "must match" pref for checking word boundary logic and
- * make sure "can match" matches anywhere.
- */
-
-var katakana = ["\u30a8", "\u30c9"]; // E, Do
-var ideograph = ["\u4efb", "\u5929", "\u5802"]; // Nin Ten Do
-
-add_task(function* test_escape() {
- Services.prefs.setBoolPref("browser.urlbar.autoFill.searchEngines", false);
-
- let uri1 = NetUtil.newURI("http://matchme/");
- let uri2 = NetUtil.newURI("http://dontmatchme/");
- let uri3 = NetUtil.newURI("http://title/1");
- let uri4 = NetUtil.newURI("http://title/2");
- let uri5 = NetUtil.newURI("http://tag/1");
- let uri6 = NetUtil.newURI("http://tag/2");
- let uri7 = NetUtil.newURI("http://crazytitle/");
- let uri8 = NetUtil.newURI("http://katakana/");
- let uri9 = NetUtil.newURI("http://ideograph/");
- let uri10 = NetUtil.newURI("http://camel/pleaseMatchMe/");
-
- yield PlacesTestUtils.addVisits([
- { uri: uri1, title: "title1" },
- { uri: uri2, title: "title1" },
- { uri: uri3, title: "matchme2" },
- { uri: uri4, title: "dontmatchme3" },
- { uri: uri5, title: "title1" },
- { uri: uri6, title: "title1" },
- { uri: uri7, title: "!@#$%^&*()_+{}|:<>?word" },
- { uri: uri8, title: katakana.join("") },
- { uri: uri9, title: ideograph.join("") },
- { uri: uri10, title: "title1" }
- ]);
- yield addBookmark( { uri: uri5, title: "title1", tags: [ "matchme2" ] } );
- yield addBookmark( { uri: uri6, title: "title1", tags: [ "dontmatchme3" ] } );
-
- // match only on word boundaries
- Services.prefs.setIntPref("browser.urlbar.matchBehavior", 2);
-
- do_print("Match 'match' at the beginning or after / or on a CamelCase");
- yield check_autocomplete({
- search: "match",
- matches: [ { uri: uri1, title: "title1" },
- { uri: uri3, title: "matchme2" },
- { uri: uri5, title: "title1", tags: [ "matchme2" ], style: [ "bookmark-tag" ] },
- { uri: uri10, title: "title1" } ]
- });
-
- do_print("Match 'dont' at the beginning or after /");
- yield check_autocomplete({
- search: "dont",
- matches: [ { uri: uri2, title: "title1" },
- { uri: uri4, title: "dontmatchme3" },
- { uri: uri6, title: "title1", tags: [ "dontmatchme3" ], style: [ "bookmark-tag" ] } ]
- });
-
- do_print("Match 'match' at the beginning or after / or on a CamelCase");
- yield check_autocomplete({
- search: "2",
- matches: [ { uri: uri3, title: "matchme2" },
- { uri: uri4, title: "dontmatchme3" },
- { uri: uri5, title: "title1", tags: [ "matchme2" ], style: [ "bookmark-tag" ] },
- { uri: uri6, title: "title1", tags: [ "dontmatchme3" ], style: [ "bookmark-tag" ] } ]
- });
-
- do_print("Match 't' at the beginning or after /");
- yield check_autocomplete({
- search: "t",
- matches: [ { uri: uri1, title: "title1" },
- { uri: uri2, title: "title1" },
- { uri: uri3, title: "matchme2" },
- { uri: uri4, title: "dontmatchme3" },
- { uri: uri5, title: "title1", tags: [ "matchme2" ], style: [ "bookmark-tag" ] },
- { uri: uri6, title: "title1", tags: [ "dontmatchme3" ], style: [ "bookmark-tag" ] },
- { uri: uri10, title: "title1" } ]
- });
-
- do_print("Match 'word' after many consecutive word boundaries");
- yield check_autocomplete({
- search: "word",
- matches: [ { uri: uri7, title: "!@#$%^&*()_+{}|:<>?word" } ]
- });
-
- do_print("Match a word boundary '/' for everything");
- yield check_autocomplete({
- search: "/",
- matches: [ { uri: uri1, title: "title1" },
- { uri: uri2, title: "title1" },
- { uri: uri3, title: "matchme2" },
- { uri: uri4, title: "dontmatchme3" },
- { uri: uri5, title: "title1", tags: [ "matchme2" ], style: [ "bookmark-tag" ] },
- { uri: uri6, title: "title1", tags: [ "dontmatchme3" ], style: [ "bookmark-tag" ] },
- { uri: uri7, title: "!@#$%^&*()_+{}|:<>?word" },
- { uri: uri8, title: katakana.join("") },
- { uri: uri9, title: ideograph.join("") },
- { uri: uri10, title: "title1" } ]
- });
-
- do_print("Match word boundaries '()_+' that are among word boundaries");
- yield check_autocomplete({
- search: "()_+",
- matches: [ { uri: uri7, title: "!@#$%^&*()_+{}|:<>?word" } ]
- });
-
- do_print("Katakana characters form a string, so match the beginning");
- yield check_autocomplete({
- search: katakana[0],
- matches: [ { uri: uri8, title: katakana.join("") } ]
- });
-
-/*
- do_print("Middle of a katakana word shouldn't be matched");
- yield check_autocomplete({
- search: katakana[1],
- matches: [ ]
- });
-*/
- do_print("Ideographs are treated as words so 'nin' is one word");
- yield check_autocomplete({
- search: ideograph[0],
- matches: [ { uri: uri9, title: ideograph.join("") } ]
- });
-
- do_print("Ideographs are treated as words so 'ten' is another word");
- yield check_autocomplete({
- search: ideograph[1],
- matches: [ { uri: uri9, title: ideograph.join("") } ]
- });
-
- do_print("Ideographs are treated as words so 'do' is yet another word");
- yield check_autocomplete({
- search: ideograph[2],
- matches: [ { uri: uri9, title: ideograph.join("") } ]
- });
-
- do_print("Extra negative assert that we don't match in the middle");
- yield check_autocomplete({
- search: "ch",
- matches: [ ]
- });
-
- do_print("Don't match one character after a camel-case word boundary (bug 429498)");
- yield check_autocomplete({
- search: "atch",
- matches: [ ]
- });
-
- // match against word boundaries and anywhere
- Services.prefs.setIntPref("browser.urlbar.matchBehavior", 1);
-
- yield check_autocomplete({
- search: "tch",
- matches: [ { uri: uri1, title: "title1" },
- { uri: uri2, title: "title1" },
- { uri: uri3, title: "matchme2" },
- { uri: uri4, title: "dontmatchme3" },
- { uri: uri5, title: "title1", tags: [ "matchme2" ], style: [ "bookmark-tag" ] },
- { uri: uri6, title: "title1", tags: [ "dontmatchme3" ], style: [ "bookmark-tag" ] },
- { uri: uri10, title: "title1" } ]
- });
-
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/test_zero_frecency.js b/toolkit/components/places/tests/unifiedcomplete/test_zero_frecency.js
deleted file mode 100644
index adf6388869..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/test_zero_frecency.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/* 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/. */
-
-// Ensure inline autocomplete doesn't return zero frecency pages.
-
-add_task(function* test_zzero_frec_domain() {
- do_print("Searching for zero frecency domain should not autoFill it");
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", false);
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/framed_link/"),
- transition: TRANSITION_FRAMED_LINK
- });
- yield check_autocomplete({
- search: "moz",
- autofilled: "moz",
- completed: "moz"
- });
- yield cleanup();
-});
-
-add_task(function* test_zzero_frec_url() {
- do_print("Searching for zero frecency url should not autoFill it");
- Services.prefs.setBoolPref("browser.urlbar.autoFill.typed", false);
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://mozilla.org/framed_link/"),
- transition: TRANSITION_FRAMED_LINK
- });
- yield check_autocomplete({
- search: "mozilla.org/f",
- autofilled: "mozilla.org/f",
- completed: "mozilla.org/f"
- });
- yield cleanup();
-});
diff --git a/toolkit/components/places/tests/unifiedcomplete/xpcshell.ini b/toolkit/components/places/tests/unifiedcomplete/xpcshell.ini
deleted file mode 100644
index 60ef8c48af..0000000000
--- a/toolkit/components/places/tests/unifiedcomplete/xpcshell.ini
+++ /dev/null
@@ -1,49 +0,0 @@
-[DEFAULT]
-head = head_autocomplete.js
-tail =
-skip-if = toolkit == 'android'
-support-files =
- data/engine-rel-searchform.xml
- data/engine-suggestions.xml
- !/toolkit/components/places/tests/favicons/favicon-normal16.png
-
-[test_416211.js]
-[test_416214.js]
-[test_417798.js]
-[test_418257.js]
-[test_422277.js]
-[test_autocomplete_functional.js]
-[test_autocomplete_on_value_removed_479089.js]
-[test_autofill_default_behavior.js]
-[test_avoid_middle_complete.js]
-[test_avoid_stripping_to_empty_tokens.js]
-[test_casing.js]
-[test_do_not_trim.js]
-[test_download_embed_bookmarks.js]
-[test_dupe_urls.js]
-[test_empty_search.js]
-[test_enabled.js]
-[test_escape_self.js]
-[test_extension_matches.js]
-[test_ignore_protocol.js]
-[test_keyword_search.js]
-[test_keyword_search_actions.js]
-[test_keywords.js]
-[test_match_beginning.js]
-[test_multi_word_search.js]
-[test_query_url.js]
-[test_remote_tab_matches.js]
-skip-if = !sync
-[test_search_engine_alias.js]
-[test_search_engine_current.js]
-[test_search_engine_host.js]
-[test_search_engine_restyle.js]
-[test_search_suggestions.js]
-[test_special_search.js]
-[test_swap_protocol.js]
-[test_tab_matches.js]
-[test_trimming.js]
-[test_typed.js]
-[test_visit_url.js]
-[test_word_boundary_search.js]
-[test_zero_frecency.js]
diff --git a/toolkit/components/places/tests/unit/.eslintrc.js b/toolkit/components/places/tests/unit/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/places/tests/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/places/tests/unit/bookmarks.corrupt.html b/toolkit/components/places/tests/unit/bookmarks.corrupt.html
deleted file mode 100644
index 3cf43367fb..0000000000
--- a/toolkit/components/places/tests/unit/bookmarks.corrupt.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE NETSCAPE-Bookmark-file-1>
-<!-- This is an automatically generated file.
- It will be read and overwritten.
- DO NOT EDIT! -->
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<TITLE>Bookmarks</TITLE>
-<H1 LAST_MODIFIED="1177541029">Bookmarks</H1>
-
-<DL><p>
- <DT><H3 ID="rdf:#$ZvPhC3">Mozilla Firefox</H3>
- <DL><p>
- <DT><A HREF="http://en-US.www.mozilla.com/en-US/firefox/help/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" ID="rdf:#$22iCK1">Help and Tutorials</A>
- <DT><A HREF="http://en-US.www.mozilla.com/en-US/firefox/customize/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" ID="rdf:#$32iCK1">Customize Firefox</A>
- <DT><A HREF="http://en-US.www.mozilla.com/en-US/firefox/community/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" ID="rdf:#$42iCK1">Get Involved</A>
- <DT><A HREF="http://en-US.www.mozilla.com/en-US/about/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" ID="rdf:#$52iCK1">About Us</A>
- <DT><A HREF="b0rked" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" ID="rdf:#$52iCK1">About Us</A>
- </DL><p>
- <DT><H3 ADD_DATE="1177541020" LAST_MODIFIED="1177541050" ID="rdf:#$74Gpx2">test</H3>
-<DD>folder test comment
- <DL><p>
- <DT><A HREF="http://test/post" ADD_DATE="1177375336" LAST_MODIFIED="1177375423" SHORTCUTURL="test" WEB_PANEL="true" POST_DATA="hidden1%3Dbar&amp;text1%3D%25s" LAST_CHARSET="ISO-8859-1" ID="rdf:#$pYFe7">test post keyword</A>
-<DD>item description
- </DL>
- <DT><H3 UNFILED_BOOKMARKS_FOLDER="true">Unsorted Bookmarks</H3>
- <DL><p>
- <DT><A HREF="http://example.tld">Example.tld</A>
- </DL><p>
- <DT><H3 LAST_MODIFIED="1177541040" PERSONAL_TOOLBAR_FOLDER="true" ID="rdf:#$FvPhC3">Bookmarks Toolbar Folder</H3>
-<DD>Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar
- <DL><p>
- <DT><A HREF="http://en-US.www.mozilla.com/en-US/firefox/central/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" ID="rdf:#$GvPhC3">Getting Started</A>
- <DT><A HREF="http://en-US.fxfeeds.mozilla.com/en-US/firefox/livebookmarks/" LAST_MODIFIED="1177541035" FEEDURL="http://en-US.fxfeeds.mozilla.com/en-US/firefox/headlines.xml" ID="rdf:#$HvPhC3">Latest Headlines</A>
- <DT><A HREF="http://bogus-icon.mozilla.com/" ICON="b0rked" ID="rdf:#$GvPhC3">Getting Started</A>
-<DD>Livemark test comment
- </DL><p>
-</DL><p>
diff --git a/toolkit/components/places/tests/unit/bookmarks.json b/toolkit/components/places/tests/unit/bookmarks.json
deleted file mode 100644
index afe62abae6..0000000000
--- a/toolkit/components/places/tests/unit/bookmarks.json
+++ /dev/null
@@ -1 +0,0 @@
-{"guid":"root________","title":"","id":1,"dateAdded":1361551978957783,"lastModified":1361551978957783,"type":"text/x-moz-place-container","root":"placesRoot","children":[{"guid":"menu________","title":"Bookmarks Menu","id":2,"parent":1,"dateAdded":1361551978957783,"lastModified":1361551979382837,"type":"text/x-moz-place-container","root":"bookmarksMenuFolder","children":[{"guid":"OCyeUO5uu9FF","title":"Mozilla Firefox","id":6,"parent":2,"dateAdded":1361551979350273,"lastModified":1361551979376699,"type":"text/x-moz-place-container","children":[{"guid":"OCyeUO5uu9FG","title":"Help and Tutorials","id":7,"parent":6,"dateAdded":1361551979356436,"lastModified":1361551979362718,"type":"text/x-moz-place","uri":"http://en-us.www.mozilla.com/en-US/firefox/help/", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg=="},{"guid":"OCyeUO5uu9FH","index":1,"title":"Customize Firefox","id":8,"parent":6,"dateAdded":1361551979365662,"lastModified":1361551979368077,"type":"text/x-moz-place","uri":"http://en-us.www.mozilla.com/en-US/firefox/customize/", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg=="},{"guid":"OCyeUO5uu9FI","index":2,"title":"Get Involved","id":9,"parent":6,"dateAdded":1361551979371071,"lastModified":1361551979373745,"type":"text/x-moz-place","uri":"http://en-us.www.mozilla.com/en-US/firefox/community/", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg=="},{"guid":"OCyeUO5uu9FJ","index":3,"title":"About Us","id":10,"parent":6,"dateAdded":1361551979376699,"lastModified":1361551979379060,"type":"text/x-moz-place","uri":"http://en-us.www.mozilla.com/en-US/about/", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg=="}]},{"guid":"OCyeUO5uu9FK","index":1,"title":"","id":11,"parent":2,"dateAdded":1361551979380988,"lastModified":1361551979380988,"type":"text/x-moz-place-separator"},{"guid":"OCyeUO5uu9FL","index":2,"title":"test","id":12,"parent":2,"dateAdded":1177541020000000,"lastModified":1177541050000000,"annos":[{"name":"bookmarkProperties/description","flags":0,"expires":4,"mimeType":null,"type":3,"value":"folder test comment"}],"type":"text/x-moz-place-container","children":[{"guid":"OCyeUO5uu9GX","title":"test post keyword","id":13,"parent":12,"dateAdded":1177375336000000,"lastModified":1177375423000000,"annos":[{"name":"bookmarkProperties/description","flags":0,"expires":4,"mimeType":null,"type":3,"value":"item description"},{"name":"bookmarkProperties/POSTData","flags":0,"expires":4,"mimeType":null,"type":3,"value":"hidden1%3Dbar&text1%3D%25s"},{"name":"bookmarkProperties/loadInSidebar","flags":0,"expires":4,"mimeType":null,"type":1,"value":1}],"type":"text/x-moz-place","uri":"http://test/post","keyword":"test","charset":"ISO-8859-1"}]}]},{"index":1,"title":"Bookmarks Toolbar","id":3,"parent":1,"dateAdded":1361551978957783,"lastModified":1177541050000000,"annos":[{"name":"bookmarkProperties/description","flags":0,"expires":4,"mimeType":null,"type":3,"value":"Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar"}],"type":"text/x-moz-place-container","root":"toolbarFolder","children":[{"guid":"OCyeUO5uu9FB","title":"Getting Started","id":15,"parent":3,"dateAdded":1361551979409695,"lastModified":1361551979412080,"type":"text/x-moz-place","uri":"http://en-us.www.mozilla.com/en-US/firefox/central/", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg=="},{"guid":"OCyeUO5uu9FR","index":1,"title":"Latest Headlines","id":16,"parent":3,"dateAdded":1361551979451584,"lastModified":1361551979457086,"livemark":1,"annos":[{"name":"placesInternal/READ_ONLY","flags":0,"expires":4,"mimeType":null,"type":1,"value":1},{"name":"livemark/feedURI","flags":0,"expires":4,"mimeType":null,"type":3,"value":"http://en-us.fxfeeds.mozilla.com/en-US/firefox/headlines.xml"},{"name":"livemark/siteURI","flags":0,"expires":4,"mimeType":null,"type":3,"value":"http://en-us.fxfeeds.mozilla.com/en-US/firefox/livebookmarks/"}],"type":"text/x-moz-place-container","children":[]}]},{"index":2,"title":"Tags","id":4,"parent":1,"dateAdded":1361551978957783,"lastModified":1361551978957783,"type":"text/x-moz-place-container","root":"tagsFolder","children":[]},{"index":3,"title":"Unsorted Bookmarks","id":5,"parent":1,"dateAdded":1361551978957783,"lastModified":1177541050000000,"type":"text/x-moz-place-container","root":"unfiledBookmarksFolder","children":[{"guid":"OCyeUO5uu9FW","title":"Example.tld","id":14,"parent":5,"dateAdded":1361551979401846,"lastModified":1361551979402952,"type":"text/x-moz-place","uri":"http://example.tld/"}]}]}
diff --git a/toolkit/components/places/tests/unit/bookmarks.preplaces.html b/toolkit/components/places/tests/unit/bookmarks.preplaces.html
deleted file mode 100644
index 2e5a1baf02..0000000000
--- a/toolkit/components/places/tests/unit/bookmarks.preplaces.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE NETSCAPE-Bookmark-file-1>
-<!-- This is an automatically generated file.
- It will be read and overwritten.
- DO NOT EDIT! -->
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
-<TITLE>Bookmarks</TITLE>
-<H1 LAST_MODIFIED="1177541029">Bookmarks</H1>
-
-<DL><p>
- <DT><H3 ID="rdf:#$ZvPhC3">Mozilla Firefox</H3>
- <DL><p>
- <DT><A HREF="http://en-US.www.mozilla.com/en-US/firefox/help/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" ID="rdf:#$22iCK1">Help and Tutorials</A>
- <DT><A HREF="http://en-US.www.mozilla.com/en-US/firefox/customize/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" ID="rdf:#$32iCK1">Customize Firefox</A>
- <DT><A HREF="http://en-US.www.mozilla.com/en-US/firefox/community/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" ID="rdf:#$42iCK1">Get Involved</A>
- <DT><A HREF="http://en-US.www.mozilla.com/en-US/about/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" ID="rdf:#$52iCK1">About Us</A>
- </DL><p>
- <HR>
- <DT><H3 ADD_DATE="1177541020" LAST_MODIFIED="1177541050" ID="rdf:#$74Gpx2">test</H3>
-<DD>folder test comment
- <DL><p>
- <DT><A HREF="http://test/post" ADD_DATE="1177375336" LAST_MODIFIED="1177375423" SHORTCUTURL="test" WEB_PANEL="true" POST_DATA="hidden1%3Dbar&amp;text1%3D%25s" LAST_CHARSET="ISO-8859-1" ID="rdf:#$pYFe7">test post keyword</A>
-<DD>item description
- </DL>
- <DT><H3 UNFILED_BOOKMARKS_FOLDER="true">Unsorted Bookmarks</H3>
- <DL><p>
- <DT><A HREF="http://example.tld">Example.tld</A>
- </DL><p>
- <DT><H3 LAST_MODIFIED="1177541040" PERSONAL_TOOLBAR_FOLDER="true" ID="rdf:#$FvPhC3">Bookmarks Toolbar Folder</H3>
-<DD>Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar
- <DL><p>
- <DT><A HREF="http://en-US.www.mozilla.com/en-US/firefox/central/" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg==" ID="rdf:#$GvPhC3">Getting Started</A>
- <DT><A HREF="http://en-US.fxfeeds.mozilla.com/en-US/firefox/livebookmarks/" LAST_MODIFIED="1177541035" FEEDURL="http://en-US.fxfeeds.mozilla.com/en-US/firefox/headlines.xml" ID="rdf:#$HvPhC3">Latest Headlines</A>
-<DD>Livemark test comment
- </DL><p>
-</DL><p>
diff --git a/toolkit/components/places/tests/unit/bookmarks_html_singleframe.html b/toolkit/components/places/tests/unit/bookmarks_html_singleframe.html
deleted file mode 100644
index 9fe662f320..0000000000
--- a/toolkit/components/places/tests/unit/bookmarks_html_singleframe.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE NETSCAPE-Bookmark-file-1>
- <HTML>
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
- <Title>Bookmarks</Title>
- <H1>Bookmarks</H1>
- <DT><H3>Subtitle</H3>
- <DL><p>
- <DT><A HREF="http://www.mozilla.org/">Mozilla</A>
- </DL><p>
-</HTML>
diff --git a/toolkit/components/places/tests/unit/bug476292.sqlite b/toolkit/components/places/tests/unit/bug476292.sqlite
deleted file mode 100644
index 43130cb51e..0000000000
--- a/toolkit/components/places/tests/unit/bug476292.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/unit/corruptDB.sqlite b/toolkit/components/places/tests/unit/corruptDB.sqlite
deleted file mode 100644
index b234246cac..0000000000
--- a/toolkit/components/places/tests/unit/corruptDB.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/unit/default.sqlite b/toolkit/components/places/tests/unit/default.sqlite
deleted file mode 100644
index 8fbd3bc9ac..0000000000
--- a/toolkit/components/places/tests/unit/default.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/unit/head_bookmarks.js b/toolkit/components/places/tests/unit/head_bookmarks.js
deleted file mode 100644
index 842a66b313..0000000000
--- a/toolkit/components/places/tests/unit/head_bookmarks.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var Ci = Components.interfaces;
-var Cc = Components.classes;
-var Cr = Components.results;
-var Cu = Components.utils;
-
-Cu.import("resource://gre/modules/Services.jsm");
-
-// Import common head.
-{
- let commonFile = do_get_file("../head_common.js", false);
- let uri = Services.io.newFileURI(commonFile);
- Services.scriptloader.loadSubScript(uri.spec, this);
-}
-
-// Put any other stuff relative to this test folder below.
diff --git a/toolkit/components/places/tests/unit/livemark.xml b/toolkit/components/places/tests/unit/livemark.xml
deleted file mode 100644
index db2ea9023c..0000000000
--- a/toolkit/components/places/tests/unit/livemark.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<feed xmlns="http://www.w3.org/2005/Atom">
- <title>Livemark Feed</title>
- <link href="https://example.com/"/>
- <updated>2016-08-09T19:51:45.147Z</updated>
- <author>
- <name>John Doe</name>
- </author>
- <id>urn:uuid:e7947414-6ee0-4009-ae75-8b0ad3c6894b</id>
- <entry>
- <title>Some awesome article</title>
- <link href="https://example.com/some-article"/>
- <id>urn:uuid:d72ce019-0a56-4a0b-ac03-f66117d78141</id>
- <updated>2016-08-09T19:57:22.178Z</updated>
- <summary>My great article summary.</summary>
- </entry>
-</feed>
diff --git a/toolkit/components/places/tests/unit/mobile_bookmarks_folder_import.json b/toolkit/components/places/tests/unit/mobile_bookmarks_folder_import.json
deleted file mode 100644
index 38762b3f18..0000000000
--- a/toolkit/components/places/tests/unit/mobile_bookmarks_folder_import.json
+++ /dev/null
@@ -1 +0,0 @@
-{"guid":"root________","title":"","index":0,"dateAdded":1475084731479000,"lastModified":1475084731479000,"id":1,"type":"text/x-moz-place-container","root":"placesRoot","children":[{"guid":"menu________","title":"Bookmarks Menu","index":0,"dateAdded":1475084731479000,"lastModified":1475084731768000,"id":2,"type":"text/x-moz-place-container","root":"bookmarksMenuFolder","children":[{"guid":"X6lUyOspVYwi","title":"Test Pilot","index":0,"dateAdded":1475084731768000,"lastModified":1475084731768000,"id":3,"type":"text/x-moz-place","uri":"https://testpilot.firefox.com/"},{"guid":"XF4yRP6bTuil","title":"Mobile bookmarks query","index":1,"dateAdded":1475084731768000,"lastModified":1475084731768000,"id":11,"type":"text/x-moz-place","uri":"place:folder=101"}]},{"guid":"toolbar_____","title":"Bookmarks Toolbar","index":1,"dateAdded":1475084731479000,"lastModified":1475084731742000,"id":4,"type":"text/x-moz-place-container","root":"toolbarFolder","children":[{"guid":"buy7711R3ZgE","title":"MDN","index":0,"dateAdded":1475084731769000,"lastModified":1475084731769000,"id":5,"type":"text/x-moz-place","uri":"https://developer.mozilla.org"}]},{"guid":"3qmd_imziEBE","title":"Mobile Bookmarks","index":5,"dateAdded":1475084731479000,"lastModified":1475084731770000,"id":101,"annos":[{"name":"mobile/bookmarksRoot","flags":0,"expires":4,"value":1},{"name":"bookmarkProperties/description","flags":0,"expires":4,"mimeType":null,"type":3,"value":"A description of the mobile folder that should be ignored on import"}],"type":"text/x-moz-place-container","children":[{"guid":"_o8e1_zxTJFg","title":"Get Firefox!","index":0,"dateAdded":1475084731769000,"lastModified":1475084731769000,"id":7,"type":"text/x-moz-place","uri":"http://getfirefox.com/"},{"guid":"QCtSqkVYUbXB","title":"Get Thunderbird!","index":1,"dateAdded":1475084731770000,"lastModified":1475084731770000,"id":8,"type":"text/x-moz-place","uri":"http://getthunderbird.com/"}]},{"guid":"unfiled_____","title":"Other Bookmarks","index":3,"dateAdded":1475084731479000,"lastModified":1475084731742000,"id":9,"type":"text/x-moz-place-container","root":"unfiledBookmarksFolder","children":[{"guid":"KIa9iKZab2Z5","title":"Add-ons","index":0,"dateAdded":1475084731769000,"lastModified":1475084731769000,"id":10,"type":"text/x-moz-place","uri":"https://addons.mozilla.org"}]}]} \ No newline at end of file
diff --git a/toolkit/components/places/tests/unit/mobile_bookmarks_folder_merge.json b/toolkit/components/places/tests/unit/mobile_bookmarks_folder_merge.json
deleted file mode 100644
index 7319a3a52a..0000000000
--- a/toolkit/components/places/tests/unit/mobile_bookmarks_folder_merge.json
+++ /dev/null
@@ -1 +0,0 @@
-{"guid":"root________","title":"","index":0,"dateAdded":1475084731479000,"lastModified":1475084731479000,"id":1,"type":"text/x-moz-place-container","root":"placesRoot","children":[{"guid":"menu________","title":"Bookmarks Menu","index":0,"dateAdded":1475084731479000,"lastModified":1475084731768000,"id":2,"type":"text/x-moz-place-container","root":"bookmarksMenuFolder","children":[{"guid":"Utodo9b0oVws","title":"Firefox Accounts","index":0,"dateAdded":1475084731955000,"lastModified":1475084731955000,"id":3,"type":"text/x-moz-place","uri":"https://accounts.firefox.com/"}]},{"guid":"toolbar_____","title":"Bookmarks Toolbar","index":1,"dateAdded":1475084731479000,"lastModified":1475084731742000,"id":4,"type":"text/x-moz-place-container","root":"toolbarFolder"},{"guid":"3qmd_imziEBE","title":"Mobile Bookmarks","index":5,"dateAdded":1475084731479000,"lastModified":1475084731770000,"id":5,"annos":[{"name":"mobile/bookmarksRoot","flags":0,"expires":4,"value":1},{"name":"bookmarkProperties/description","flags":0,"expires":4,"mimeType":null,"type":3,"value":"A description of the mobile folder that should be ignored on import"}],"type":"text/x-moz-place-container","children":[{"guid":"a17yW6-nTxEJ","title":"Mozilla","index":0,"dateAdded":1475084731959000,"lastModified":1475084731959000,"id":6,"type":"text/x-moz-place","uri":"https://mozilla.org/"},{"guid":"xV10h9Wi3FBM","title":"Bugzilla","index":1,"dateAdded":1475084731961000,"lastModified":1475084731961000,"id":7,"type":"text/x-moz-place","uri":"https://bugzilla.mozilla.org/"}]},{"guid":"unfiled_____","title":"Other Bookmarks","index":3,"dateAdded":1475084731479000,"lastModified":1475084731742000,"id":8,"type":"text/x-moz-place-container","root":"unfiledBookmarksFolder"}]} \ No newline at end of file
diff --git a/toolkit/components/places/tests/unit/mobile_bookmarks_multiple_folders.json b/toolkit/components/places/tests/unit/mobile_bookmarks_multiple_folders.json
deleted file mode 100644
index afe13c975c..0000000000
--- a/toolkit/components/places/tests/unit/mobile_bookmarks_multiple_folders.json
+++ /dev/null
@@ -1 +0,0 @@
-{"guid":"root________","title":"","index":0,"dateAdded":1475084731479000,"lastModified":1475084731479000,"id":1,"type":"text/x-moz-place-container","root":"placesRoot","children":[{"guid":"menu________","title":"Bookmarks Menu","index":0,"dateAdded":1475084731479000,"lastModified":1475084731768000,"id":2,"type":"text/x-moz-place-container","root":"bookmarksMenuFolder","children":[{"guid":"buy7711R3ZgE","title":"MDN","index":0,"dateAdded":1475084731769000,"lastModified":1475084731769000,"id":3,"type":"text/x-moz-place","uri":"https://developer.mozilla.org"},{"guid":"F_LBgd1fS_uQ","title":"Mobile bookmarks query for first folder","index":1,"dateAdded":1475084731768000,"lastModified":1475084731768000,"id":11,"type":"text/x-moz-place","uri":"place:folder=101"},{"guid":"oIpmQXMWsXvY","title":"Mobile bookmarks query for second folder","index":2,"dateAdded":1475084731768000,"lastModified":1475084731768000,"id":12,"type":"text/x-moz-place","uri":"place:folder=102"}]},{"guid":"3qmd_imziEBE","title":"Mobile Bookmarks","index":5,"dateAdded":1475084731479000,"lastModified":1475084731770000,"id":101,"annos":[{"name":"mobile/bookmarksRoot","flags":0,"expires":4,"value":1},{"name":"bookmarkProperties/description","flags":0,"expires":4,"mimeType":null,"type":3,"value":"A description of the mobile folder that should be ignored on import"}],"type":"text/x-moz-place-container","children":[{"guid":"a17yW6-nTxEJ","title":"Mozilla","index":0,"dateAdded":1475084731959000,"lastModified":1475084731959000,"id":5,"type":"text/x-moz-place","uri":"https://mozilla.org/"}]},{"guid":"toolbar_____","title":"Bookmarks Toolbar","index":1,"dateAdded":1475084731479000,"lastModified":1475084731742000,"id":6,"type":"text/x-moz-place-container","root":"toolbarFolder","children":[{"guid":"Utodo9b0oVws","title":"Firefox Accounts","index":0,"dateAdded":1475084731955000,"lastModified":1475084731955000,"id":7,"type":"text/x-moz-place","uri":"https://accounts.firefox.com/"}]},{"guid":"o4YjJpgsufU-","title":"Mobile Bookmarks","index":7,"dateAdded":1475084731479000,"lastModified":1475084731770000,"id":102,"annos":[{"name":"mobile/bookmarksRoot","flags":0,"expires":4,"value":1}],"type":"text/x-moz-place-container","children":[{"guid":"sSZ86WT9WbN3","title":"DXR","index":0,"dateAdded":1475084731769000,"lastModified":1475084731769000,"id":9,"type":"text/x-moz-place","uri":"https://dxr.mozilla.org"}]},{"guid":"unfiled_____","title":"Other Bookmarks","index":3,"dateAdded":1475084731479000,"lastModified":1475084731742000,"id":10,"type":"text/x-moz-place-container","root":"unfiledBookmarksFolder","children":[{"guid":"xV10h9Wi3FBM","title":"Bugzilla","index":1,"dateAdded":1475084731961000,"lastModified":1475084731961000,"id":11,"type":"text/x-moz-place","uri":"https://bugzilla.mozilla.org/"}]}]} \ No newline at end of file
diff --git a/toolkit/components/places/tests/unit/mobile_bookmarks_root_import.json b/toolkit/components/places/tests/unit/mobile_bookmarks_root_import.json
deleted file mode 100644
index 27f5825ecb..0000000000
--- a/toolkit/components/places/tests/unit/mobile_bookmarks_root_import.json
+++ /dev/null
@@ -1 +0,0 @@
-{"guid":"root________","title":"","index":0,"dateAdded":1475084731479000,"lastModified":1475084731479000,"id":1,"type":"text/x-moz-place-container","root":"placesRoot","children":[{"guid":"menu________","title":"Bookmarks Menu","index":0,"dateAdded":1475084731479000,"lastModified":1475084731768000,"id":2,"type":"text/x-moz-place-container","root":"bookmarksMenuFolder","children":[{"guid":"X6lUyOspVYwi","title":"Test Pilot","index":0,"dateAdded":1475084731768000,"lastModified":1475084731768000,"id":3,"type":"text/x-moz-place","uri":"https://testpilot.firefox.com/"}]},{"guid":"toolbar_____","title":"Bookmarks Toolbar","index":1,"dateAdded":1475084731479000,"lastModified":1475084731742000,"id":4,"type":"text/x-moz-place-container","root":"toolbarFolder"},{"guid":"unfiled_____","title":"Other Bookmarks","index":3,"dateAdded":1475084731479000,"lastModified":1475084731742000,"id":5,"type":"text/x-moz-place-container","root":"unfiledBookmarksFolder"},{"guid":"mobile______","title":"Mobile Bookmarks","index":4,"dateAdded":1475084731479000,"lastModified":1475084731770000,"id":6,"annos":[{"name":"mobile/bookmarksRoot","flags":0,"expires":4,"value":1}],"type":"text/x-moz-place-container","root":"mobileFolder","children":[{"guid":"_o8e1_zxTJFg","title":"Get Firefox!","index":0,"dateAdded":1475084731769000,"lastModified":1475084731769000,"id":7,"type":"text/x-moz-place","uri":"http://getfirefox.com/"},{"guid":"QCtSqkVYUbXB","title":"Get Thunderbird!","index":1,"dateAdded":1475084731770000,"lastModified":1475084731770000,"id":8,"type":"text/x-moz-place","uri":"http://getthunderbird.com/"}]}]} \ No newline at end of file
diff --git a/toolkit/components/places/tests/unit/mobile_bookmarks_root_merge.json b/toolkit/components/places/tests/unit/mobile_bookmarks_root_merge.json
deleted file mode 100644
index 85721f2fa0..0000000000
--- a/toolkit/components/places/tests/unit/mobile_bookmarks_root_merge.json
+++ /dev/null
@@ -1 +0,0 @@
-{"guid":"root________","title":"","index":0,"dateAdded":1475084731479000,"lastModified":1475084731479000,"id":1,"type":"text/x-moz-place-container","root":"placesRoot","children":[{"guid":"menu________","title":"Bookmarks Menu","index":0,"dateAdded":1475084731479000,"lastModified":1475084731955000,"id":2,"type":"text/x-moz-place-container","root":"bookmarksMenuFolder","children":[{"guid":"Utodo9b0oVws","title":"Firefox Accounts","index":0,"dateAdded":1475084731955000,"lastModified":1475084731955000,"id":3,"type":"text/x-moz-place","uri":"https://accounts.firefox.com/"}]},{"guid":"toolbar_____","title":"Bookmarks Toolbar","index":1,"dateAdded":1475084731479000,"lastModified":1475084731938000,"id":4,"type":"text/x-moz-place-container","root":"toolbarFolder"},{"guid":"unfiled_____","title":"Other Bookmarks","index":3,"dateAdded":1475084731479000,"lastModified":1475084731938000,"id":5,"type":"text/x-moz-place-container","root":"unfiledBookmarksFolder"},{"guid":"mobile______","title":"Mobile Bookmarks","index":4,"dateAdded":1475084731479000,"lastModified":1475084731961000,"id":6,"annos":[{"name":"mobile/bookmarksRoot","flags":0,"expires":4,"value":1}],"type":"text/x-moz-place-container","root":"mobileFolder","children":[{"guid":"a17yW6-nTxEJ","title":"Mozilla","index":0,"dateAdded":1475084731959000,"lastModified":1475084731959000,"id":7,"type":"text/x-moz-place","uri":"https://mozilla.org/"},{"guid":"xV10h9Wi3FBM","title":"Bugzilla","index":1,"dateAdded":1475084731961000,"lastModified":1475084731961000,"id":8,"type":"text/x-moz-place","uri":"https://bugzilla.mozilla.org/"}]}]} \ No newline at end of file
diff --git a/toolkit/components/places/tests/unit/nsDummyObserver.js b/toolkit/components/places/tests/unit/nsDummyObserver.js
deleted file mode 100644
index 9049d04b3f..0000000000
--- a/toolkit/components/places/tests/unit/nsDummyObserver.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/* 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/. */
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-
-// Dummy boomark/history observer
-function DummyObserver() {
- Services.obs.notifyObservers(null, "dummy-observer-created", null);
-}
-
-DummyObserver.prototype = {
- // history observer
- onBeginUpdateBatch: function () {},
- onEndUpdateBatch: function () {},
- onVisit: function (aURI, aVisitID, aTime, aSessionID, aReferringID, aTransitionType) {
- Services.obs.notifyObservers(null, "dummy-observer-visited", null);
- },
- onTitleChanged: function () {},
- onDeleteURI: function () {},
- onClearHistory: function () {},
- onPageChanged: function () {},
- onDeleteVisits: function () {},
-
- // bookmark observer
- // onBeginUpdateBatch: function() {},
- // onEndUpdateBatch: function() {},
- onItemAdded: function(aItemId, aParentId, aIndex, aItemType, aURI) {
- Services.obs.notifyObservers(null, "dummy-observer-item-added", null);
- },
- onItemChanged: function () {},
- onItemRemoved: function() {},
- onItemVisited: function() {},
- onItemMoved: function() {},
-
- classID: Components.ID("62e221d3-68c3-4e1a-8943-a27beb5005fe"),
-
- QueryInterface: XPCOMUtils.generateQI([
- Ci.nsINavBookmarkObserver,
- Ci.nsINavHistoryObserver,
- ])
-};
-
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([DummyObserver]);
diff --git a/toolkit/components/places/tests/unit/nsDummyObserver.manifest b/toolkit/components/places/tests/unit/nsDummyObserver.manifest
deleted file mode 100644
index ed4d87fffa..0000000000
--- a/toolkit/components/places/tests/unit/nsDummyObserver.manifest
+++ /dev/null
@@ -1,4 +0,0 @@
-component 62e221d3-68c3-4e1a-8943-a27beb5005fe nsDummyObserver.js
-contract @mozilla.org/places/test/dummy-observer;1 62e221d3-68c3-4e1a-8943-a27beb5005fe
-category bookmark-observers nsDummyObserver @mozilla.org/places/test/dummy-observer;1
-category history-observers nsDummyObserver @mozilla.org/places/test/dummy-observer;1
diff --git a/toolkit/components/places/tests/unit/places.sparse.sqlite b/toolkit/components/places/tests/unit/places.sparse.sqlite
deleted file mode 100644
index 915089021c..0000000000
--- a/toolkit/components/places/tests/unit/places.sparse.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/places/tests/unit/test_000_frecency.js b/toolkit/components/places/tests/unit/test_000_frecency.js
deleted file mode 100644
index 64ee86b593..0000000000
--- a/toolkit/components/places/tests/unit/test_000_frecency.js
+++ /dev/null
@@ -1,267 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/*
-
-Autocomplete Frecency Tests
-
-- add a visit for each score permutation
-- search
-- test number of matches
-- test each item's location in results
-
-*/
-
-try {
- var histsvc = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
- var bmsvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
- var prefs = Cc["@mozilla.org/preferences-service;1"].
- getService(Ci.nsIPrefBranch);
-} catch (ex) {
- do_throw("Could not get services\n");
-}
-
-var bucketPrefs = [
- [ "firstBucketCutoff", "firstBucketWeight"],
- [ "secondBucketCutoff", "secondBucketWeight"],
- [ "thirdBucketCutoff", "thirdBucketWeight"],
- [ "fourthBucketCutoff", "fourthBucketWeight"],
- [ null, "defaultBucketWeight"]
-];
-
-var bonusPrefs = {
- embedVisitBonus: Ci.nsINavHistoryService.TRANSITION_EMBED,
- framedLinkVisitBonus: Ci.nsINavHistoryService.TRANSITION_FRAMED_LINK,
- linkVisitBonus: Ci.nsINavHistoryService.TRANSITION_LINK,
- typedVisitBonus: Ci.nsINavHistoryService.TRANSITION_TYPED,
- bookmarkVisitBonus: Ci.nsINavHistoryService.TRANSITION_BOOKMARK,
- downloadVisitBonus: Ci.nsINavHistoryService.TRANSITION_DOWNLOAD,
- permRedirectVisitBonus: Ci.nsINavHistoryService.TRANSITION_REDIRECT_PERMANENT,
- tempRedirectVisitBonus: Ci.nsINavHistoryService.TRANSITION_REDIRECT_TEMPORARY,
- reloadVisitBonus: Ci.nsINavHistoryService.TRANSITION_RELOAD,
-};
-
-// create test data
-var searchTerm = "frecency";
-var results = [];
-var matchCount = 0;
-var now = Date.now();
-var prefPrefix = "places.frecency.";
-
-function* task_initializeBucket(bucket) {
- let [cutoffName, weightName] = bucket;
- // get pref values
- var weight = prefs.getIntPref(prefPrefix + weightName, 0);
- var cutoff = prefs.getIntPref(prefPrefix + cutoffName, 0);
- if (cutoff < 1)
- return;
-
- // generate a date within the cutoff period
- var dateInPeriod = (now - ((cutoff - 1) * 86400 * 1000)) * 1000;
-
- for (let [bonusName, visitType] of Object.entries(bonusPrefs)) {
- var frecency = -1;
- var calculatedURI = null;
- var matchTitle = "";
- var bonusValue = prefs.getIntPref(prefPrefix + bonusName);
- // unvisited (only for first cutoff date bucket)
- if (bonusName == "unvisitedBookmarkBonus" || bonusName == "unvisitedTypedBonus") {
- if (cutoffName == "firstBucketCutoff") {
- let points = Math.ceil(bonusValue / parseFloat(100.0) * weight);
- var visitCount = 1; // bonusName == "unvisitedBookmarkBonus" ? 1 : 0;
- frecency = Math.ceil(visitCount * points);
- calculatedURI = uri("http://" + searchTerm + ".com/" +
- bonusName + ":" + bonusValue + "/cutoff:" + cutoff +
- "/weight:" + weight + "/frecency:" + frecency);
- if (bonusName == "unvisitedBookmarkBonus") {
- matchTitle = searchTerm + "UnvisitedBookmark";
- bmsvc.insertBookmark(bmsvc.unfiledBookmarksFolder, calculatedURI, bmsvc.DEFAULT_INDEX, matchTitle);
- }
- else {
- matchTitle = searchTerm + "UnvisitedTyped";
- yield PlacesTestUtils.addVisits({
- uri: calculatedURI,
- title: matchTitle,
- transition: visitType,
- visitDate: now
- });
- histsvc.markPageAsTyped(calculatedURI);
- }
- }
- }
- else {
- // visited
- // visited bookmarks get the visited bookmark bonus twice
- if (visitType == Ci.nsINavHistoryService.TRANSITION_BOOKMARK)
- bonusValue = bonusValue * 2;
-
- let points = Math.ceil(1 * ((bonusValue / parseFloat(100.000000)).toFixed(6) * weight) / 1);
- if (!points) {
- if (visitType == Ci.nsINavHistoryService.TRANSITION_EMBED ||
- visitType == Ci.nsINavHistoryService.TRANSITION_FRAMED_LINK ||
- visitType == Ci.nsINavHistoryService.TRANSITION_DOWNLOAD ||
- visitType == Ci.nsINavHistoryService.TRANSITION_RELOAD ||
- bonusName == "defaultVisitBonus")
- frecency = 0;
- else
- frecency = -1;
- }
- else
- frecency = points;
- calculatedURI = uri("http://" + searchTerm + ".com/" +
- bonusName + ":" + bonusValue + "/cutoff:" + cutoff +
- "/weight:" + weight + "/frecency:" + frecency);
- if (visitType == Ci.nsINavHistoryService.TRANSITION_BOOKMARK) {
- matchTitle = searchTerm + "Bookmarked";
- bmsvc.insertBookmark(bmsvc.unfiledBookmarksFolder, calculatedURI, bmsvc.DEFAULT_INDEX, matchTitle);
- }
- else
- matchTitle = calculatedURI.spec.substr(calculatedURI.spec.lastIndexOf("/")+1);
- yield PlacesTestUtils.addVisits({
- uri: calculatedURI,
- transition: visitType,
- visitDate: dateInPeriod
- });
- }
-
- if (calculatedURI && frecency) {
- results.push([calculatedURI, frecency, matchTitle]);
- yield PlacesTestUtils.addVisits({
- uri: calculatedURI,
- title: matchTitle,
- transition: visitType,
- visitDate: dateInPeriod
- });
- }
- }
-}
-
-function AutoCompleteInput(aSearches) {
- this.searches = aSearches;
-}
-AutoCompleteInput.prototype = {
- constructor: AutoCompleteInput,
-
- searches: null,
-
- minResultsForPopup: 0,
- timeout: 10,
- searchParam: "",
- textValue: "",
- disableAutoComplete: false,
- completeDefaultIndex: false,
-
- get searchCount() {
- return this.searches.length;
- },
-
- getSearchAt: function(aIndex) {
- return this.searches[aIndex];
- },
-
- onSearchBegin: function() {},
- onSearchComplete: function() {},
-
- popupOpen: false,
-
- popup: {
- setSelectedIndex: function(aIndex) {},
- invalidate: function() {},
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompletePopup))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
- },
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompleteInput))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
-}
-
-add_task(function* test_frecency()
-{
- // Disable autoFill for this test.
- Services.prefs.setBoolPref("browser.urlbar.autoFill", false);
- do_register_cleanup(() => Services.prefs.clearUserPref("browser.urlbar.autoFill"));
- for (let bucket of bucketPrefs) {
- yield task_initializeBucket(bucket);
- }
-
- // sort results by frecency
- results.sort((a, b) => b[1] - a[1]);
- // Make sure there's enough results returned
- prefs.setIntPref("browser.urlbar.maxRichResults", results.length);
-
- // DEBUG
- // results.every(function(el) { dump("result: " + el[1] + ": " + el[0].spec + " (" + el[2] + ")\n"); return true; })
-
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- var controller = Components.classes["@mozilla.org/autocomplete/controller;1"].
- getService(Components.interfaces.nsIAutoCompleteController);
-
- // Make an AutoCompleteInput that uses our searches
- // and confirms results on search complete
- var input = new AutoCompleteInput(["unifiedcomplete"]);
-
- controller.input = input;
-
- // always search in history + bookmarks, no matter what the default is
- prefs.setIntPref("browser.urlbar.search.sources", 3);
- prefs.setIntPref("browser.urlbar.default.behavior", 0);
-
- var numSearchesStarted = 0;
- input.onSearchBegin = function() {
- numSearchesStarted++;
- do_check_eq(numSearchesStarted, 1);
- };
-
- let deferred = Promise.defer();
- input.onSearchComplete = function() {
- do_check_eq(numSearchesStarted, 1);
- do_check_eq(controller.searchStatus,
- Ci.nsIAutoCompleteController.STATUS_COMPLETE_MATCH);
-
- // test that all records with non-zero frecency were matched
- do_check_eq(controller.matchCount, results.length);
-
- // test that matches are sorted by frecency
- for (var i = 0; i < controller.matchCount; i++) {
- let searchURL = controller.getValueAt(i);
- let expectURL = results[i][0].spec;
- if (searchURL == expectURL) {
- do_check_eq(controller.getValueAt(i), results[i][0].spec);
- do_check_eq(controller.getCommentAt(i), results[i][2]);
- } else {
- // If the results didn't match exactly, perhaps it's still the right
- // frecency just in the wrong "order" (order of same frecency is
- // undefined), so check if frecency matches. This is okay because we
- // can still ensure the correct number of expected frecencies.
- let getFrecency = aURL => aURL.match(/frecency:(-?\d+)$/)[1];
- print("### checking for same frecency between '" + searchURL +
- "' and '" + expectURL + "'");
- do_check_eq(getFrecency(searchURL), getFrecency(expectURL));
- }
- }
- deferred.resolve();
- };
-
- controller.startSearch(searchTerm);
-
- yield deferred.promise;
-});
diff --git a/toolkit/components/places/tests/unit/test_1085291.js b/toolkit/components/places/tests/unit/test_1085291.js
deleted file mode 100644
index 3159ff8bc7..0000000000
--- a/toolkit/components/places/tests/unit/test_1085291.js
+++ /dev/null
@@ -1,42 +0,0 @@
-add_task(function* () {
- // test that nodes inserted by incremental update for bookmarks of all types
- // have the extra bookmark properties (bookmarkGuid, dateAdded, lastModified).
-
- // getFolderContents opens the root node.
- let root = PlacesUtils.getFolderContents(PlacesUtils.toolbarFolderId).root;
-
- function* insertAndTest(bmInfo) {
- bmInfo = yield PlacesUtils.bookmarks.insert(bmInfo);
- let node = root.getChild(root.childCount - 1);
- Assert.equal(node.bookmarkGuid, bmInfo.guid);
- Assert.equal(node.dateAdded, bmInfo.dateAdded * 1000);
- Assert.equal(node.lastModified, bmInfo.lastModified * 1000);
- }
-
- // Normal bookmark.
- yield insertAndTest({ parentGuid: root.bookmarkGuid
- , type: PlacesUtils.bookmarks.TYPE_BOOKMARK
- , title: "Test Bookmark"
- , url: "http://test.url.tld" });
-
- // place: query
- yield insertAndTest({ parentGuid: root.bookmarkGuid
- , type: PlacesUtils.bookmarks.TYPE_BOOKMARK
- , title: "Test Query"
- , url: "place:folder=BOOKMARKS_MENU" });
-
- // folder
- yield insertAndTest({ parentGuid: root.bookmarkGuid
- , type: PlacesUtils.bookmarks.TYPE_FOLDER
- , title: "Test Folder" });
-
- // separator
- yield insertAndTest({ parentGuid: root.bookmarkGuid
- , type: PlacesUtils.bookmarks.TYPE_SEPARATOR });
-
- root.containerOpen = false;
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/places/tests/unit/test_1105208.js b/toolkit/components/places/tests/unit/test_1105208.js
deleted file mode 100644
index 39a27c95f0..0000000000
--- a/toolkit/components/places/tests/unit/test_1105208.js
+++ /dev/null
@@ -1,24 +0,0 @@
-// Test that result node for folder shortcuts get the target folder title if
-// the shortcut itself has no title set.
-add_task(function* () {
- let shortcutInfo = yield PlacesUtils.bookmarks.insert({
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "place:folder=TOOLBAR"
- });
-
- let unfiledRoot =
- PlacesUtils.getFolderContents(PlacesUtils.unfiledBookmarksFolderId).root;
- let shortcutNode = unfiledRoot.getChild(unfiledRoot.childCount - 1);
- Assert.equal(shortcutNode.bookmarkGuid, shortcutInfo.guid);
-
- let toolbarInfo =
- yield PlacesUtils.bookmarks.fetch(PlacesUtils.bookmarks.toolbarGuid);
- Assert.equal(shortcutNode.title, toolbarInfo.title);
-
- unfiledRoot.containerOpen = false;
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/places/tests/unit/test_1105866.js b/toolkit/components/places/tests/unit/test_1105866.js
deleted file mode 100644
index eb376bbe20..0000000000
--- a/toolkit/components/places/tests/unit/test_1105866.js
+++ /dev/null
@@ -1,63 +0,0 @@
-add_task(function* test_folder_shortcuts() {
- let shortcutInfo = yield PlacesUtils.bookmarks.insert({
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "place:folder=TOOLBAR"
- });
-
- let unfiledRoot =
- PlacesUtils.getFolderContents(PlacesUtils.unfiledBookmarksFolderId).root;
- let shortcutNode = unfiledRoot.getChild(unfiledRoot.childCount - 1);
- Assert.strictEqual(shortcutNode.itemId,
- yield PlacesUtils.promiseItemId(shortcutInfo.guid));
- Assert.strictEqual(PlacesUtils.asQuery(shortcutNode).folderItemId,
- PlacesUtils.toolbarFolderId);
- Assert.strictEqual(shortcutNode.bookmarkGuid, shortcutInfo.guid);
- Assert.strictEqual(PlacesUtils.asQuery(shortcutNode).targetFolderGuid,
- PlacesUtils.bookmarks.toolbarGuid);
-
- // test that a node added incrementally also behaves just as well.
- shortcutInfo = yield PlacesUtils.bookmarks.insert({
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: "place:folder=BOOKMARKS_MENU"
- });
- shortcutNode = unfiledRoot.getChild(unfiledRoot.childCount - 1);
- Assert.strictEqual(shortcutNode.itemId,
- yield PlacesUtils.promiseItemId(shortcutInfo.guid));
- Assert.strictEqual(PlacesUtils.asQuery(shortcutNode).folderItemId,
- PlacesUtils.bookmarksMenuFolderId);
- Assert.strictEqual(shortcutNode.bookmarkGuid, shortcutInfo.guid);
- Assert.strictEqual(PlacesUtils.asQuery(shortcutNode).targetFolderGuid,
- PlacesUtils.bookmarks.menuGuid);
-
- unfiledRoot.containerOpen = false;
-});
-
-add_task(function* test_plain_folder() {
- let folderInfo = yield PlacesUtils.bookmarks.insert({
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid
- });
-
- let unfiledRoot =
- PlacesUtils.getFolderContents(PlacesUtils.unfiledBookmarksFolderId).root;
- let lastChild = unfiledRoot.getChild(unfiledRoot.childCount - 1);
- Assert.strictEqual(lastChild.bookmarkGuid, folderInfo.guid);
- Assert.strictEqual(PlacesUtils.asQuery(lastChild).targetFolderGuid,
- folderInfo.guid);
-});
-
-add_task(function* test_non_item_query() {
- let options = PlacesUtils.history.getNewQueryOptions();
- let root = PlacesUtils.history.executeQuery(
- PlacesUtils.history.getNewQuery(), options).root;
- Assert.strictEqual(root.itemId, -1);
- Assert.strictEqual(PlacesUtils.asQuery(root).folderItemId, -1);
- Assert.strictEqual(root.bookmarkGuid, "");
- Assert.strictEqual(PlacesUtils.asQuery(root).targetFolderGuid, "");
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/places/tests/unit/test_317472.js b/toolkit/components/places/tests/unit/test_317472.js
deleted file mode 100644
index a086519161..0000000000
--- a/toolkit/components/places/tests/unit/test_317472.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-const charset = "UTF-8";
-const CHARSET_ANNO = "URIProperties/characterSet";
-
-const TEST_URI = uri("http://foo.com");
-const TEST_BOOKMARKED_URI = uri("http://bar.com");
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_execute()
-{
- // add pages to history
- yield PlacesTestUtils.addVisits(TEST_URI);
- yield PlacesTestUtils.addVisits(TEST_BOOKMARKED_URI);
-
- // create bookmarks on TEST_BOOKMARKED_URI
- PlacesUtils.bookmarks.insertBookmark(
- PlacesUtils.unfiledBookmarksFolderId,
- TEST_BOOKMARKED_URI, PlacesUtils.bookmarks.DEFAULT_INDEX,
- TEST_BOOKMARKED_URI.spec);
- PlacesUtils.bookmarks.insertBookmark(
- PlacesUtils.toolbarFolderId,
- TEST_BOOKMARKED_URI, PlacesUtils.bookmarks.DEFAULT_INDEX,
- TEST_BOOKMARKED_URI.spec);
-
- // set charset on not-bookmarked page
- yield PlacesUtils.setCharsetForURI(TEST_URI, charset);
- // set charset on bookmarked page
- yield PlacesUtils.setCharsetForURI(TEST_BOOKMARKED_URI, charset);
-
- // check that we have created a page annotation
- do_check_eq(PlacesUtils.annotations.getPageAnnotation(TEST_URI, CHARSET_ANNO), charset);
-
- // get charset from not-bookmarked page
- do_check_eq((yield PlacesUtils.getCharsetForURI(TEST_URI)), charset);
-
- // get charset from bookmarked page
- do_check_eq((yield PlacesUtils.getCharsetForURI(TEST_BOOKMARKED_URI)), charset);
-
- yield PlacesTestUtils.clearHistory();
-
- // ensure that charset has gone for not-bookmarked page
- do_check_neq((yield PlacesUtils.getCharsetForURI(TEST_URI)), charset);
-
- // check that page annotation has been removed
- try {
- PlacesUtils.annotations.getPageAnnotation(TEST_URI, CHARSET_ANNO);
- do_throw("Charset page annotation has not been removed correctly");
- } catch (e) {}
-
- // ensure that charset still exists for bookmarked page
- do_check_eq((yield PlacesUtils.getCharsetForURI(TEST_BOOKMARKED_URI)), charset);
-
- // remove charset from bookmark and check that has gone
- yield PlacesUtils.setCharsetForURI(TEST_BOOKMARKED_URI, "");
- do_check_neq((yield PlacesUtils.getCharsetForURI(TEST_BOOKMARKED_URI)), charset);
-});
diff --git a/toolkit/components/places/tests/unit/test_331487.js b/toolkit/components/places/tests/unit/test_331487.js
deleted file mode 100644
index 55d41aebf4..0000000000
--- a/toolkit/components/places/tests/unit/test_331487.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-// Get history service
-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);
-
-// main
-function run_test() {
- // add a folder
- var folder = bmsvc.createFolder(bmsvc.placesRoot, "test folder", bmsvc.DEFAULT_INDEX);
-
- // add a bookmark to the folder
- var b1 = bmsvc.insertBookmark(folder, uri("http://a1.com/"),
- bmsvc.DEFAULT_INDEX, "1 title");
- // add a subfolder
- var sf1 = bmsvc.createFolder(folder, "subfolder 1", bmsvc.DEFAULT_INDEX);
-
- // add a bookmark to the subfolder
- var b2 = bmsvc.insertBookmark(sf1, uri("http://a2.com/"),
- bmsvc.DEFAULT_INDEX, "2 title");
-
- // add a subfolder to the subfolder
- var sf2 = bmsvc.createFolder(sf1, "subfolder 2", bmsvc.DEFAULT_INDEX);
-
- // add a bookmark to the subfolder of the subfolder
- var b3 = bmsvc.insertBookmark(sf2, uri("http://a3.com/"),
- bmsvc.DEFAULT_INDEX, "3 title");
-
- // bookmark query that should result in the "hierarchical" result
- // because there is one query, one folder,
- // no begin time, no end time, no domain, no uri, no search term
- // and no max results. See GetSimpleBookmarksQueryFolder()
- // for more details.
- var options = histsvc.getNewQueryOptions();
- options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS;
- var query = histsvc.getNewQuery();
- query.setFolders([folder], 1);
- var result = histsvc.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 2);
- do_check_eq(root.getChild(0).itemId, b1);
- do_check_eq(root.getChild(1).itemId, sf1);
-
- // check the contents of the subfolder
- var sf1Node = root.getChild(1);
- sf1Node = sf1Node.QueryInterface(Ci.nsINavHistoryContainerResultNode);
- sf1Node.containerOpen = true;
- do_check_eq(sf1Node.childCount, 2);
- do_check_eq(sf1Node.getChild(0).itemId, b2);
- do_check_eq(sf1Node.getChild(1).itemId, sf2);
-
- // check the contents of the subfolder's subfolder
- var sf2Node = sf1Node.getChild(1);
- sf2Node = sf2Node.QueryInterface(Ci.nsINavHistoryContainerResultNode);
- sf2Node.containerOpen = true;
- do_check_eq(sf2Node.childCount, 1);
- do_check_eq(sf2Node.getChild(0).itemId, b3);
-
- sf2Node.containerOpen = false;
- sf1Node.containerOpen = false;
- root.containerOpen = false;
-
- // bookmark query that should result in a flat list
- // because we specified max results
- options = histsvc.getNewQueryOptions();
- options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS;
- options.maxResults = 10;
- query = histsvc.getNewQuery();
- query.setFolders([folder], 1);
- result = histsvc.executeQuery(query, options);
- root = result.root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 3);
- do_check_eq(root.getChild(0).itemId, b1);
- do_check_eq(root.getChild(1).itemId, b2);
- do_check_eq(root.getChild(2).itemId, b3);
- root.containerOpen = false;
-
- // XXX TODO
- // 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
deleted file mode 100644
index ec6f43683e..0000000000
--- a/toolkit/components/places/tests/unit/test_384370.js
+++ /dev/null
@@ -1,173 +0,0 @@
-const LOAD_IN_SIDEBAR_ANNO = "bookmarkProperties/loadInSidebar";
-const DESCRIPTION_ANNO = "bookmarkProperties/description";
-
-var tagData = [
- { uri: uri("http://slint.us"), tags: ["indie", "kentucky", "music"] },
- { uri: uri("http://en.wikipedia.org/wiki/Diplodocus"), tags: ["dinosaur", "dj", "rad word"] }
-];
-
-var bookmarkData = [
- { uri: uri("http://slint.us"), title: "indie, kentucky, music" },
- { uri: uri("http://en.wikipedia.org/wiki/Diplodocus"), title: "dinosaur, dj, rad word" }
-];
-
-function run_test() {
- run_next_test();
-}
-
-/*
- HTML+FEATURES SUMMARY:
- - import legacy bookmarks
- - export as json, import, test (tests integrity of html > json)
- - export as html, import, test (tests integrity of json > html)
-
- BACKUP/RESTORE SUMMARY:
- - create a bookmark in each root
- - tag multiple URIs with multiple tags
- - export as json, import, test
-*/
-add_task(function* () {
- // Remove eventual bookmarks.exported.json.
- let jsonFile = OS.Path.join(OS.Constants.Path.profileDir, "bookmarks.exported.json");
- if ((yield OS.File.exists(jsonFile)))
- yield OS.File.remove(jsonFile);
-
- // Test importing a pre-Places canonical bookmarks file.
- // Note: we do not empty the db before this import to catch bugs like 380999
- let htmlFile = OS.Path.join(do_get_cwd().path, "bookmarks.preplaces.html");
- yield BookmarkHTMLUtils.importFromFile(htmlFile, true);
-
- // Populate the database.
- for (let { uri, tags } of tagData) {
- PlacesUtils.tagging.tagURI(uri, tags);
- }
- for (let { uri, title } of bookmarkData) {
- yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: uri,
- title });
- }
- for (let { uri, title } of bookmarkData) {
- yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- url: uri,
- title });
- }
-
- yield validate();
-
- // Test exporting a Places canonical json file.
- // 1. export to bookmarks.exported.json
- yield BookmarkJSONUtils.exportToFile(jsonFile);
- do_print("exported json");
-
- // 2. empty bookmarks db
- // 3. import bookmarks.exported.json
- yield BookmarkJSONUtils.importFromFile(jsonFile, true);
- do_print("imported json");
-
- // 4. run the test-suite
- yield validate();
- do_print("validated import");
-});
-
-function* validate() {
- yield testMenuBookmarks();
- yield testToolbarBookmarks();
- testUnfiledBookmarks();
- testTags();
- yield PlacesTestUtils.promiseAsyncUpdates();
-}
-
-// Tests a bookmarks datastore that has a set of bookmarks, etc
-// that flex each supported field and feature.
-function* testMenuBookmarks() {
- let root = PlacesUtils.getFolderContents(PlacesUtils.bookmarksMenuFolderId).root;
- Assert.equal(root.childCount, 3);
-
- let separatorNode = root.getChild(1);
- Assert.equal(separatorNode.type, separatorNode.RESULT_TYPE_SEPARATOR);
-
- let folderNode = root.getChild(2);
- Assert.equal(folderNode.type, folderNode.RESULT_TYPE_FOLDER);
- Assert.equal(folderNode.title, "test");
- let folder = yield PlacesUtils.bookmarks.fetch(folderNode.bookmarkGuid);
- Assert.equal(folder.dateAdded.getTime(), 1177541020000);
-
- Assert.equal(PlacesUtils.asQuery(folderNode).hasChildren, true);
-
- Assert.equal("folder test comment",
- PlacesUtils.annotations.getItemAnnotation(folderNode.itemId,
- DESCRIPTION_ANNO));
-
- // open test folder, and test the children
- folderNode.containerOpen = true;
- Assert.equal(folderNode.childCount, 1);
-
- let bookmarkNode = folderNode.getChild(0);
- Assert.equal("http://test/post", bookmarkNode.uri);
- Assert.equal("test post keyword", bookmarkNode.title);
- Assert.ok(PlacesUtils.annotations.itemHasAnnotation(bookmarkNode.itemId,
- LOAD_IN_SIDEBAR_ANNO));
- Assert.equal(bookmarkNode.dateAdded, 1177375336000000);
-
- let entry = yield PlacesUtils.keywords.fetch({ url: bookmarkNode.uri });
- Assert.equal("test", entry.keyword);
- Assert.equal("hidden1%3Dbar&text1%3D%25s", entry.postData);
-
- Assert.equal("ISO-8859-1",
- (yield PlacesUtils.getCharsetForURI(NetUtil.newURI(bookmarkNode.uri))));
- Assert.equal("item description",
- PlacesUtils.annotations.getItemAnnotation(bookmarkNode.itemId,
- DESCRIPTION_ANNO));
-
- folderNode.containerOpen = false;
- root.containerOpen = false;
-}
-
-function* testToolbarBookmarks() {
- let root = PlacesUtils.getFolderContents(PlacesUtils.toolbarFolderId).root;
-
- // 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);
-
- let livemark = yield PlacesUtils.livemarks.getLivemark({ id: livemarkNode.itemId });
- Assert.equal("http://en-us.fxfeeds.mozilla.com/en-US/firefox/livebookmarks/",
- livemark.siteURI.spec);
- Assert.equal("http://en-us.fxfeeds.mozilla.com/en-US/firefox/headlines.xml",
- livemark.feedURI.spec);
-
- // test added bookmark data
- let bookmarkNode = root.getChild(2);
- Assert.equal(bookmarkNode.uri, bookmarkData[0].uri.spec);
- Assert.equal(bookmarkNode.title, bookmarkData[0].title);
- bookmarkNode = root.getChild(3);
- Assert.equal(bookmarkNode.uri, bookmarkData[1].uri.spec);
- Assert.equal(bookmarkNode.title, bookmarkData[1].title);
-
- root.containerOpen = false;
-}
-
-function testUnfiledBookmarks() {
- let root = PlacesUtils.getFolderContents(PlacesUtils.unfiledBookmarksFolderId).root;
- // child count (add 1 for pre-existing item)
- Assert.equal(root.childCount, bookmarkData.length + 1);
- for (let i = 1; i < root.childCount; ++i) {
- let child = root.getChild(i);
- Assert.equal(child.uri, bookmarkData[i - 1].uri.spec);
- Assert.equal(child.title, bookmarkData[i - 1].title);
- if (child.tags)
- Assert.equal(child.tags, bookmarkData[i - 1].title);
- }
- root.containerOpen = false;
-}
-
-function testTags() {
- for (let { uri, tags } of tagData) {
- do_print("Test tags for " + uri.spec + ": " + tags + "\n");
- let foundTags = PlacesUtils.tagging.getTagsForURI(uri);
- Assert.equal(foundTags.length, tags.length);
- Assert.ok(tags.every(tag => foundTags.includes(tag)));
- }
-}
diff --git a/toolkit/components/places/tests/unit/test_385397.js b/toolkit/components/places/tests/unit/test_385397.js
deleted file mode 100644
index 4b60d47683..0000000000
--- a/toolkit/components/places/tests/unit/test_385397.js
+++ /dev/null
@@ -1,142 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-const TOTAL_SITES = 20;
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_execute()
-{
- let now = (Date.now() - 10000) * 1000;
-
- for (let i = 0; i < TOTAL_SITES; i++) {
- let site = "http://www.test-" + i + ".com/";
- let testURI = uri(site);
- let testImageURI = uri(site + "blank.gif");
- let when = now + (i * TOTAL_SITES * 1000);
- yield PlacesTestUtils.addVisits([
- { uri: testURI, visitDate: when, transition: TRANSITION_TYPED },
- { uri: testImageURI, visitDate: when + 1000, transition: TRANSITION_EMBED },
- { uri: testImageURI, visitDate: when + 2000, transition: TRANSITION_FRAMED_LINK },
- { uri: testURI, visitDate: when + 3000, transition: TRANSITION_LINK },
- ]);
- }
-
- // verify our visits AS_VISIT, ordered by date descending
- // including hidden
- // we should get 80 visits:
- // http://www.test-19.com/
- // http://www.test-19.com/blank.gif
- // http://www.test-19.com/
- // http://www.test-19.com/
- // ...
- // http://www.test-0.com/
- // http://www.test-0.com/blank.gif
- // http://www.test-0.com/
- // http://www.test-0.com/
- let options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = options.SORT_BY_DATE_DESCENDING;
- options.resultType = options.RESULTS_AS_VISIT;
- options.includeHidden = true;
- let root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(),
- options).root;
- root.containerOpen = true;
- let cc = root.childCount;
- // Embed visits are not added to the database, thus they won't appear.
- do_check_eq(cc, 3 * TOTAL_SITES);
- for (let i = 0; i < TOTAL_SITES; i++) {
- let index = i * 3;
- let node = root.getChild(index);
- let site = "http://www.test-" + (TOTAL_SITES - 1 - i) + ".com/";
- do_check_eq(node.uri, site);
- do_check_eq(node.type, Ci.nsINavHistoryResultNode.RESULT_TYPE_URI);
- node = root.getChild(++index);
- do_check_eq(node.uri, site + "blank.gif");
- do_check_eq(node.type, Ci.nsINavHistoryResultNode.RESULT_TYPE_URI);
- node = root.getChild(++index);
- do_check_eq(node.uri, site);
- do_check_eq(node.type, Ci.nsINavHistoryResultNode.RESULT_TYPE_URI);
- }
- root.containerOpen = false;
-
- // verify our visits AS_VISIT, ordered by date descending
- // we should get 40 visits:
- // http://www.test-19.com/
- // http://www.test-19.com/
- // ...
- // http://www.test-0.com/
- // http://www.test-0.com/
- options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = options.SORT_BY_DATE_DESCENDING;
- options.resultType = options.RESULTS_AS_VISIT;
- root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(),
- options).root;
- 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);
- for (let i=0; i < TOTAL_SITES; i++) {
- let index = i * 2;
- let node = root.getChild(index);
- let site = "http://www.test-" + (TOTAL_SITES - 1 - i) + ".com/";
- do_check_eq(node.uri, site);
- do_check_eq(node.type, Ci.nsINavHistoryResultNode.RESULT_TYPE_URI);
- node = root.getChild(++index);
- do_check_eq(node.uri, site);
- do_check_eq(node.type, Ci.nsINavHistoryResultNode.RESULT_TYPE_URI);
- }
- root.containerOpen = false;
-
- // test our optimized query for the places menu
- // place:type=0&sort=4&maxResults=10
- // verify our visits AS_URI, ordered by date descending
- // we should get 10 visits:
- // http://www.test-19.com/
- // ...
- // http://www.test-10.com/
- options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = options.SORT_BY_DATE_DESCENDING;
- options.maxResults = 10;
- options.resultType = options.RESULTS_AS_URI;
- root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(),
- options).root;
- root.containerOpen = true;
- cc = root.childCount;
- do_check_eq(cc, options.maxResults);
- for (let i=0; i < cc; i++) {
- let node = root.getChild(i);
- let site = "http://www.test-" + (TOTAL_SITES - 1 - i) + ".com/";
- do_check_eq(node.uri, site);
- do_check_eq(node.type, Ci.nsINavHistoryResultNode.RESULT_TYPE_URI);
- }
- root.containerOpen = false;
-
- // test without a maxResults, which executes a different query
- // but the first 10 results should be the same.
- // verify our visits AS_URI, ordered by date descending
- // we should get 20 visits, but the first 10 should be
- // http://www.test-19.com/
- // ...
- // http://www.test-10.com/
- options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = options.SORT_BY_DATE_DESCENDING;
- options.resultType = options.RESULTS_AS_URI;
- root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(),
- options).root;
- root.containerOpen = true;
- cc = root.childCount;
- do_check_eq(cc, TOTAL_SITES);
- for (let i=0; i < 10; i++) {
- let node = root.getChild(i);
- let site = "http://www.test-" + (TOTAL_SITES - 1 - i) + ".com/";
- do_check_eq(node.uri, site);
- do_check_eq(node.type, Ci.nsINavHistoryResultNode.RESULT_TYPE_URI);
- }
- root.containerOpen = false;
-});
diff --git a/toolkit/components/places/tests/unit/test_399264_query_to_string.js b/toolkit/components/places/tests/unit/test_399264_query_to_string.js
deleted file mode 100644
index 6e6cc279c3..0000000000
--- a/toolkit/components/places/tests/unit/test_399264_query_to_string.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/**
- * Obtains the id of the folder obtained from the query.
- *
- * @param aFolderID
- * The id of the folder we want to generate a query for.
- * @returns the string representation of the query for the given folder.
- */
-function query_string(aFolderID)
-{
- var hs = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
-
- var query = hs.getNewQuery();
- query.setFolders([aFolderID], 1);
- var options = hs.getNewQueryOptions();
- return hs.queriesToQueryString([query], 1, options);
-}
-
-function run_test()
-{
- var bs = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
-
- const QUERIES = [
- "folder=PLACES_ROOT"
- , "folder=BOOKMARKS_MENU"
- , "folder=TAGS"
- , "folder=UNFILED_BOOKMARKS"
- , "folder=TOOLBAR"
- ];
- const FOLDER_IDS = [
- bs.placesRoot
- , bs.bookmarksMenuFolder
- , bs.tagsFolder
- , bs.unfiledBookmarksFolder
- , bs.toolbarFolder
- ];
-
-
- for (var i = 0; i < QUERIES.length; i++) {
- var result = query_string(FOLDER_IDS[i]);
- dump("Looking for '" + QUERIES[i] + "' in '" + result + "'\n");
- do_check_neq(-1, result.indexOf(QUERIES[i]));
- }
-}
diff --git a/toolkit/components/places/tests/unit/test_399264_string_to_query.js b/toolkit/components/places/tests/unit/test_399264_string_to_query.js
deleted file mode 100644
index bd29316d9a..0000000000
--- a/toolkit/components/places/tests/unit/test_399264_string_to_query.js
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/**
- * Obtains the id of the folder obtained from the query.
- *
- * @param aQuery
- * The query to obtain the folder id from.
- * @returns the folder id of the folder of the root node of the query.
- */
-function folder_id(aQuery)
-{
- var hs = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
-
- dump("Checking query '" + aQuery + "'\n");
- var options = { };
- var queries = { };
- var size = { };
- hs.queryStringToQueries(aQuery, queries, size, options);
- var result = hs.executeQueries(queries.value, size.value, options.value);
- var root = result.root;
- root.containerOpen = true;
- do_check_true(root.hasChildren);
- var folderID = root.getChild(0).parent.itemId;
- root.containerOpen = false;
- return folderID;
-}
-
-function run_test()
-{
- var bs = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
-
- const QUERIES = [
- "place:folder=PLACES_ROOT"
- , "place:folder=BOOKMARKS_MENU"
- , "place:folder=TAGS"
- , "place:folder=UNFILED_BOOKMARKS"
- , "place:folder=TOOLBAR"
- ];
- const FOLDER_IDS = [
- bs.placesRoot
- , bs.bookmarksMenuFolder
- , bs.tagsFolder
- , bs.unfiledBookmarksFolder
- , bs.toolbarFolder
- ];
-
- // add something in the bookmarks menu folder so a query to it returns results
- bs.insertBookmark(bs.bookmarksMenuFolder, uri("http://example.com/bmf/"),
- Ci.nsINavBookmarksService.DEFAULT_INDEX, "bmf");
-
- // add something to the tags folder
- var ts = Cc["@mozilla.org/browser/tagging-service;1"].
- getService(Ci.nsITaggingService);
- ts.tagURI(uri("http://www.example.com/"), ["tag"]);
-
- // add something to the unfiled bookmarks folder
- bs.insertBookmark(bs.unfiledBookmarksFolder, uri("http://example.com/ubf/"),
- Ci.nsINavBookmarksService.DEFAULT_INDEX, "ubf");
-
- // add something to the toolbar folder
- bs.insertBookmark(bs.toolbarFolder, uri("http://example.com/tf/"),
- Ci.nsINavBookmarksService.DEFAULT_INDEX, "tf");
-
- for (var i = 0; i < QUERIES.length; i++) {
- var result = folder_id(QUERIES[i]);
- dump("expected " + FOLDER_IDS[i] + ", got " + result + "\n");
- do_check_eq(FOLDER_IDS[i], result);
- }
-}
diff --git a/toolkit/components/places/tests/unit/test_399266.js b/toolkit/components/places/tests/unit/test_399266.js
deleted file mode 100644
index 296d69414a..0000000000
--- a/toolkit/components/places/tests/unit/test_399266.js
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-const TOTAL_SITES = 20;
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_execute()
-{
- let places = [];
- for (let i = 0; i < TOTAL_SITES; i++) {
- for (let j = 0; j <= i; j++) {
- places.push({ uri: uri("http://www.test-" + i + ".com/"),
- transition: TRANSITION_TYPED });
- // because these are embedded visits, they should not show up on our
- // query results. If they do, we have a problem.
- places.push({ uri: uri("http://www.hidden.com/hidden.gif"),
- transition: TRANSITION_EMBED });
- places.push({ uri: uri("http://www.alsohidden.com/hidden.gif"),
- transition: TRANSITION_FRAMED_LINK });
- }
- }
- yield PlacesTestUtils.addVisits(places);
-
- // test our optimized query for the "Most Visited" item
- // in the "Smart Bookmarks" folder
- // place:queryType=0&sort=8&maxResults=10
- // verify our visits AS_URI, ordered by visit count descending
- // we should get 10 visits:
- // http://www.test-19.com/
- // ...
- // http://www.test-10.com/
- let options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = options.SORT_BY_VISITCOUNT_DESCENDING;
- options.maxResults = 10;
- options.resultType = options.RESULTS_AS_URI;
- let root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(),
- options).root;
- root.containerOpen = true;
- let cc = root.childCount;
- do_check_eq(cc, options.maxResults);
- for (let i = 0; i < cc; i++) {
- let node = root.getChild(i);
- let site = "http://www.test-" + (TOTAL_SITES - 1 - i) + ".com/";
- do_check_eq(node.uri, site);
- do_check_eq(node.type, Ci.nsINavHistoryResultNode.RESULT_TYPE_URI);
- }
- root.containerOpen = false;
-
- // test without a maxResults, which executes a different query
- // but the first 10 results should be the same.
- // verify our visits AS_URI, ordered by visit count descending
- // we should get 20 visits, but the first 10 should be
- // http://www.test-19.com/
- // ...
- // http://www.test-10.com/
- options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = options.SORT_BY_VISITCOUNT_DESCENDING;
- options.resultType = options.RESULTS_AS_URI;
- root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(),
- options).root;
- root.containerOpen = true;
- cc = root.childCount;
- do_check_eq(cc, TOTAL_SITES);
- for (let i = 0; i < 10; i++) {
- let node = root.getChild(i);
- let site = "http://www.test-" + (TOTAL_SITES - 1 - i) + ".com/";
- do_check_eq(node.uri, site);
- do_check_eq(node.type, Ci.nsINavHistoryResultNode.RESULT_TYPE_URI);
- }
- root.containerOpen = false;
-});
diff --git a/toolkit/components/places/tests/unit/test_402799.js b/toolkit/components/places/tests/unit/test_402799.js
deleted file mode 100644
index 263e20aa5b..0000000000
--- a/toolkit/components/places/tests/unit/test_402799.js
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-// Get history services
-try {
- var histsvc = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
- var bhist = histsvc.QueryInterface(Ci.nsIBrowserHistory);
-} catch (ex) {
- do_throw("Could not get history services\n");
-}
-
-// Get bookmark service
-try {
- var bmsvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
-}
-catch (ex) {
- do_throw("Could not get the nav-bookmarks-service\n");
-}
-
-// Get tagging service
-try {
- var tagssvc = Cc["@mozilla.org/browser/tagging-service;1"].
- getService(Ci.nsITaggingService);
-} catch (ex) {
- do_throw("Could not get tagging service\n");
-}
-
-
-// main
-function run_test() {
- var uri1 = uri("http://foo.bar/");
-
- // create 2 bookmarks on the same uri
- bmsvc.insertBookmark(bmsvc.bookmarksMenuFolder, uri1,
- bmsvc.DEFAULT_INDEX, "title 1");
- bmsvc.insertBookmark(bmsvc.toolbarFolder, uri1,
- bmsvc.DEFAULT_INDEX, "title 2");
- // add some tags
- tagssvc.tagURI(uri1, ["foo", "bar", "foobar", "foo bar"]);
-
- // check that a generic bookmark query returns only real bookmarks
- var options = histsvc.getNewQueryOptions();
- options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS;
-
- var query = histsvc.getNewQuery();
- var result = histsvc.executeQuery(query, options);
- var root = result.root;
-
- root.containerOpen = true;
- var cc = root.childCount;
- do_check_eq(cc, 2);
- var node1 = root.getChild(0);
- do_check_eq(bmsvc.getFolderIdForItem(node1.itemId), bmsvc.bookmarksMenuFolder);
- var node2 = root.getChild(1);
- do_check_eq(bmsvc.getFolderIdForItem(node2.itemId), bmsvc.toolbarFolder);
- root.containerOpen = false;
-}
diff --git a/toolkit/components/places/tests/unit/test_405497.js b/toolkit/components/places/tests/unit/test_405497.js
deleted file mode 100644
index 951302b849..0000000000
--- a/toolkit/components/places/tests/unit/test_405497.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-var hs = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
-var bs = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
-
-/**
- * The callback object for runInBatchMode.
- *
- * @param aService
- * Takes a reference to the history service or the bookmark service.
- * This determines which service should be called when calling the second
- * runInBatchMode the second time.
- */
-function callback(aService)
-{
- this.callCount = 0;
- this.service = aService;
-}
-callback.prototype = {
- // nsINavHistoryBatchCallback
-
- runBatched: function(aUserData)
- {
- this.callCount++;
-
- if (this.callCount == 1) {
- // We want to call run in batched once more.
- this.service.runInBatchMode(this, null);
- return;
- }
-
- do_check_eq(this.callCount, 2);
- do_test_finished();
- },
-
- // nsISupports
-
- QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryBatchCallback])
-};
-
-function run_test() {
- // checking the history service
- do_test_pending();
- hs.runInBatchMode(new callback(hs), null);
-
- // checking the bookmark service
- do_test_pending();
- bs.runInBatchMode(new callback(bs), null);
-}
diff --git a/toolkit/components/places/tests/unit/test_408221.js b/toolkit/components/places/tests/unit/test_408221.js
deleted file mode 100644
index 2b41ce1a24..0000000000
--- a/toolkit/components/places/tests/unit/test_408221.js
+++ /dev/null
@@ -1,165 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var current_test = 0;
-
-function AutoCompleteInput(aSearches) {
- this.searches = aSearches;
-}
-AutoCompleteInput.prototype = {
- constructor: AutoCompleteInput,
-
- searches: null,
-
- minResultsForPopup: 0,
- timeout: 10,
- searchParam: "",
- textValue: "",
- disableAutoComplete: false,
- completeDefaultIndex: false,
-
- get searchCount() {
- return this.searches.length;
- },
-
- getSearchAt: function(aIndex) {
- return this.searches[aIndex];
- },
-
- onSearchBegin: function() {},
- onSearchComplete: function() {},
-
- popupOpen: false,
-
- popup: {
- setSelectedIndex: function(aIndex) {},
- invalidate: function() {},
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompletePopup))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
- },
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompleteInput))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
-}
-
-// Get tagging service
-try {
- var tagssvc = Cc["@mozilla.org/browser/tagging-service;1"].
- getService(Ci.nsITaggingService);
-} catch (ex) {
- do_throw("Could not get tagging service\n");
-}
-
-function ensure_tag_results(uris, searchTerm)
-{
- var controller = Components.classes["@mozilla.org/autocomplete/controller;1"].
- getService(Components.interfaces.nsIAutoCompleteController);
-
- // Make an AutoCompleteInput that uses our searches
- // and confirms results on search complete
- var input = new AutoCompleteInput(["unifiedcomplete"]);
-
- controller.input = input;
-
- // Search is asynchronous, so don't let the test finish immediately
- do_test_pending();
-
- var numSearchesStarted = 0;
- input.onSearchBegin = function() {
- numSearchesStarted++;
- do_check_eq(numSearchesStarted, 1);
- };
-
- input.onSearchComplete = function() {
- do_check_eq(numSearchesStarted, 1);
- do_check_eq(controller.searchStatus,
- Ci.nsIAutoCompleteController.STATUS_COMPLETE_MATCH);
- do_check_eq(controller.matchCount, uris.length);
- let vals = [];
- for (let i=0; i<controller.matchCount; i++) {
- // Keep the URL for later because order of tag results is undefined
- vals.push(controller.getValueAt(i));
- do_check_eq(controller.getStyleAt(i), "bookmark-tag");
- }
- // 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]();
- }
-
- do_test_finished();
- };
-
- controller.startSearch(searchTerm);
-}
-
-var uri1 = uri("http://site.tld/1");
-var uri2 = uri("http://site.tld/2");
-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"); },
- 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"); },
- function() { ensure_tag_results([uri4, uri5, uri6], "Bar Mud"); }];
-
-/**
- * Properly tags a uri adding it to bookmarks.
- *
- * @param aURI
- * The nsIURI to tag.
- * @param aTags
- * The tags to add.
- */
-function tagURI(aURI, aTags) {
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- aURI,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "A title");
- tagssvc.tagURI(aURI, aTags);
-}
-
-/**
- * Test bug #408221
- */
-function run_test() {
- // always search in history + bookmarks, no matter what the default is
- var prefs = Cc["@mozilla.org/preferences-service;1"].
- getService(Ci.nsIPrefBranch);
- prefs.setIntPref("browser.urlbar.search.sources", 3);
- prefs.setIntPref("browser.urlbar.default.behavior", 0);
-
- tagURI(uri1, ["Foo"]);
- tagURI(uri2, ["FOO"]);
- tagURI(uri3, ["foO"]);
- tagURI(uri4, ["BAR"]);
- tagURI(uri4, ["MUD"]);
- tagURI(uri5, ["bar"]);
- tagURI(uri5, ["mud"]);
- tagURI(uri6, ["baR"]);
- tagURI(uri6, ["muD"]);
-
- tests[0]();
-}
diff --git a/toolkit/components/places/tests/unit/test_412132.js b/toolkit/components/places/tests/unit/test_412132.js
deleted file mode 100644
index 827391f189..0000000000
--- a/toolkit/components/places/tests/unit/test_412132.js
+++ /dev/null
@@ -1,136 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/*
- * TEST DESCRIPTION:
- *
- * Tests patch to Bug 412132:
- * https://bugzilla.mozilla.org/show_bug.cgi?id=412132
- */
-
-add_task(function* changeuri_unvisited_bookmark()
-{
- do_print("After changing URI of bookmark, frecency of bookmark's " +
- "original URI should be zero if original URI is unvisited and " +
- "no longer bookmarked.");
- const TEST_URI = NetUtil.newURI("http://example.com/1");
- let id = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- TEST_URI,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "bookmark title");
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- do_print("Bookmarked => frecency of URI should be != 0");
- do_check_neq(frecencyForUrl(TEST_URI), 0);
-
- PlacesUtils.bookmarks.changeBookmarkURI(id, uri("http://example.com/2"));
-
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- do_print("Unvisited URI no longer bookmarked => frecency should = 0");
- do_check_eq(frecencyForUrl(TEST_URI), 0);
-
- yield PlacesUtils.bookmarks.eraseEverything();
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* changeuri_visited_bookmark()
-{
- do_print("After changing URI of bookmark, frecency of bookmark's " +
- "original URI should not be zero if original URI is visited.");
- const TEST_URI = NetUtil.newURI("http://example.com/1");
- let id = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- TEST_URI,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "bookmark title");
-
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- do_print("Bookmarked => frecency of URI should be != 0");
- do_check_neq(frecencyForUrl(TEST_URI), 0);
-
- yield PlacesTestUtils.addVisits(TEST_URI);
-
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- PlacesUtils.bookmarks.changeBookmarkURI(id, uri("http://example.com/2"));
-
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- do_print("*Visited* URI no longer bookmarked => frecency should != 0");
- do_check_neq(frecencyForUrl(TEST_URI), 0);
-
- yield PlacesUtils.bookmarks.eraseEverything();
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* changeuri_bookmark_still_bookmarked()
-{
- do_print("After changing URI of bookmark, frecency of bookmark's " +
- "original URI should not be zero if original URI is still " +
- "bookmarked.");
- const TEST_URI = NetUtil.newURI("http://example.com/1");
- let id1 = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- TEST_URI,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "bookmark 1 title");
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- TEST_URI,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "bookmark 2 title");
-
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- do_print("Bookmarked => frecency of URI should be != 0");
- do_check_neq(frecencyForUrl(TEST_URI), 0);
-
- PlacesUtils.bookmarks.changeBookmarkURI(id1, uri("http://example.com/2"));
-
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- do_print("URI still bookmarked => frecency should != 0");
- do_check_neq(frecencyForUrl(TEST_URI), 0);
-
- yield PlacesUtils.bookmarks.eraseEverything();
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* changeuri_nonexistent_bookmark()
-{
- do_print("Changing the URI of a nonexistent bookmark should fail.");
- function tryChange(itemId)
- {
- try {
- PlacesUtils.bookmarks.changeBookmarkURI(itemId + 1, uri("http://example.com/2"));
- do_throw("Nonexistent bookmark should throw.");
- }
- catch (ex) {}
- }
-
- // First try a straight-up bogus item ID, one greater than the current max
- // ID.
- let stmt = DBConn().createStatement("SELECT MAX(id) FROM moz_bookmarks");
- stmt.executeStep();
- let maxId = stmt.getInt32(0);
- stmt.finalize();
- tryChange(maxId + 1);
-
- // Now add a bookmark, delete it, and check.
- let id = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- uri("http://example.com/"),
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "bookmark title");
- PlacesUtils.bookmarks.removeItem(id);
- tryChange(id);
-
- yield PlacesUtils.bookmarks.eraseEverything();
- yield PlacesTestUtils.clearHistory();
-});
-
-function run_test()
-{
- run_next_test();
-}
diff --git a/toolkit/components/places/tests/unit/test_413784.js b/toolkit/components/places/tests/unit/test_413784.js
deleted file mode 100644
index 6df4dfbbbb..0000000000
--- a/toolkit/components/places/tests/unit/test_413784.js
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/*
-
-Test autocomplete for non-English URLs
-
-- add a visit for a page with a non-English URL
-- search
-- test number of matches (should be exactly one)
-
-*/
-
-var histsvc = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
-var bmsvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
-
-// create test data
-var searchTerm = "ユニコード";
-var decoded = "http://www.foobar.com/" + searchTerm + "/";
-var url = uri(decoded);
-
-function AutoCompleteInput(aSearches) {
- this.searches = aSearches;
-}
-
-AutoCompleteInput.prototype = {
- constructor: AutoCompleteInput,
-
- searches: null,
-
- minResultsForPopup: 0,
- timeout: 10,
- searchParam: "",
- textValue: "",
- disableAutoComplete: false,
- completeDefaultIndex: false,
-
- get searchCount() {
- return this.searches.length;
- },
-
- getSearchAt: function(aIndex) {
- return this.searches[aIndex];
- },
-
- onSearchBegin: function() {},
- onSearchComplete: function() {},
-
- popupOpen: false,
-
- popup: {
- setSelectedIndex: function(aIndex) {},
- invalidate: function() {},
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompletePopup))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
- },
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompleteInput))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
-}
-
-function run_test()
-{
- do_test_pending();
- PlacesTestUtils.addVisits(url).then(continue_test);
-}
-
-function continue_test()
-{
- var controller = Components.classes["@mozilla.org/autocomplete/controller;1"].
- getService(Components.interfaces.nsIAutoCompleteController);
-
- // Make an AutoCompleteInput that uses our searches
- // and confirms results on search complete
- var input = new AutoCompleteInput(["unifiedcomplete"]);
-
- controller.input = input;
-
- var numSearchesStarted = 0;
- input.onSearchBegin = function() {
- numSearchesStarted++;
- do_check_eq(numSearchesStarted, 1);
- };
-
- input.onSearchComplete = function() {
- do_check_eq(numSearchesStarted, 1);
- do_check_eq(controller.searchStatus,
- Ci.nsIAutoCompleteController.STATUS_COMPLETE_MATCH);
-
- // test that we found the entry we added
- do_check_eq(controller.matchCount, 1);
-
- // Make sure the url is the same according to spec, so it can be deleted
- do_check_eq(controller.getValueAt(0), url.spec);
-
- do_test_finished();
- };
-
- controller.startSearch(searchTerm);
-}
diff --git a/toolkit/components/places/tests/unit/test_415460.js b/toolkit/components/places/tests/unit/test_415460.js
deleted file mode 100644
index f2e049f099..0000000000
--- a/toolkit/components/places/tests/unit/test_415460.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var hs = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
-
-/**
- * Checks to see that a search has exactly one result in the database.
- *
- * @param aTerms
- * The terms to search for.
- * @returns true if the search returns one result, false otherwise.
- */
-function search_has_result(aTerms)
-{
- var options = hs.getNewQueryOptions();
- options.maxResults = 1;
- options.resultType = options.RESULTS_AS_URI;
- var query = hs.getNewQuery();
- query.searchTerms = aTerms;
- var result = hs.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- var cc = root.childCount;
- root.containerOpen = false;
- return (cc == 1);
-}
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_execute()
-{
- const SEARCH_TERM = "ユニコード";
- const TEST_URL = "http://example.com/" + SEARCH_TERM + "/";
- yield PlacesTestUtils.addVisits(uri(TEST_URL));
- do_check_true(search_has_result(SEARCH_TERM));
-});
diff --git a/toolkit/components/places/tests/unit/test_415757.js b/toolkit/components/places/tests/unit/test_415757.js
deleted file mode 100644
index afd396183a..0000000000
--- a/toolkit/components/places/tests/unit/test_415757.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/**
- * Checks to see that a URI is in the database.
- *
- * @param aURI
- * The URI to check.
- * @returns true if the URI is in the DB, false otherwise.
- */
-function uri_in_db(aURI) {
- var options = PlacesUtils.history.getNewQueryOptions();
- options.maxResults = 1;
- options.resultType = options.RESULTS_AS_URI
- var query = PlacesUtils.history.getNewQuery();
- query.uri = aURI;
- var result = PlacesUtils.history.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- var cc = root.childCount;
- root.containerOpen = false;
- return (cc == 1);
-}
-
-const TOTAL_SITES = 20;
-
-// main
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_execute()
-{
- // add pages to global history
- for (let i = 0; i < TOTAL_SITES; i++) {
- let site = "http://www.test-" + i + ".com/";
- let testURI = uri(site);
- let when = Date.now() * 1000 + (i * TOTAL_SITES);
- yield PlacesTestUtils.addVisits({ uri: testURI, visitDate: when });
- }
- for (let i = 0; i < TOTAL_SITES; i++) {
- let site = "http://www.test.com/" + i + "/";
- let testURI = uri(site);
- let when = Date.now() * 1000 + (i * TOTAL_SITES);
- yield PlacesTestUtils.addVisits({ uri: testURI, visitDate: when });
- }
-
- // set a page annotation on one of the urls that will be removed
- var testAnnoDeletedURI = uri("http://www.test.com/1/");
- var testAnnoDeletedName = "foo";
- var testAnnoDeletedValue = "bar";
- PlacesUtils.annotations.setPageAnnotation(testAnnoDeletedURI,
- testAnnoDeletedName,
- testAnnoDeletedValue, 0,
- PlacesUtils.annotations.EXPIRE_WITH_HISTORY);
-
- // set a page annotation on one of the urls that will NOT be removed
- var testAnnoRetainedURI = uri("http://www.test-1.com/");
- var testAnnoRetainedName = "foo";
- var testAnnoRetainedValue = "bar";
- PlacesUtils.annotations.setPageAnnotation(testAnnoRetainedURI,
- testAnnoRetainedName,
- testAnnoRetainedValue, 0,
- PlacesUtils.annotations.EXPIRE_WITH_HISTORY);
-
- // remove pages from www.test.com
- PlacesUtils.history.removePagesFromHost("www.test.com", false);
-
- // check that all pages in www.test.com have been removed
- for (let i = 0; i < TOTAL_SITES; i++) {
- let site = "http://www.test.com/" + i + "/";
- let testURI = uri(site);
- do_check_false(uri_in_db(testURI));
- }
-
- // check that all pages in www.test-X.com have NOT been removed
- for (let i = 0; i < TOTAL_SITES; i++) {
- let site = "http://www.test-" + i + ".com/";
- let testURI = uri(site);
- do_check_true(uri_in_db(testURI));
- }
-
- // check that annotation on the removed item does not exists
- try {
- PlacesUtils.annotations.getPageAnnotation(testAnnoDeletedURI, testAnnoName);
- do_throw("fetching page-annotation that doesn't exist, should've thrown");
- } catch (ex) {}
-
- // check that annotation on the NOT removed item still exists
- try {
- var annoVal = PlacesUtils.annotations.getPageAnnotation(testAnnoRetainedURI,
- testAnnoRetainedName);
- } catch (ex) {
- do_throw("The annotation has been removed erroneously");
- }
- do_check_eq(annoVal, testAnnoRetainedValue);
-
-});
diff --git a/toolkit/components/places/tests/unit/test_418643_removeFolderChildren.js b/toolkit/components/places/tests/unit/test_418643_removeFolderChildren.js
deleted file mode 100644
index 2eed029214..0000000000
--- a/toolkit/components/places/tests/unit/test_418643_removeFolderChildren.js
+++ /dev/null
@@ -1,143 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-// Get services.
-try {
- var histSvc = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
- var bmSvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
- var annoSvc = Cc["@mozilla.org/browser/annotation-service;1"]
- .getService(Ci.nsIAnnotationService);
-} catch (ex) {
- do_throw("Could not get services\n");
-}
-
-var validAnnoName = "validAnno";
-var validItemName = "validItem";
-var deletedAnnoName = "deletedAnno";
-var deletedItemName = "deletedItem";
-var bookmarkedURI = uri("http://www.mozilla.org/");
-// set lastModified to the past to prevent VM timing bugs
-var pastDate = Date.now() * 1000 - 1;
-var deletedBookmarkIds = [];
-
-// bookmarks observer
-var observer = {
- // cached ordered array of notified items
- _onItemRemovedItemIds: [],
- onItemRemoved: function(aItemId, aParentId, aIndex) {
- // We should first get notifications for children, then for their parent
- do_check_eq(this._onItemRemovedItemIds.indexOf(aParentId), -1);
- // Ensure we are not wrongly removing 1 level up
- do_check_neq(aParentId, bmSvc.toolbarFolder);
- // Removed item must be one of those we have manually deleted
- do_check_neq(deletedBookmarkIds.indexOf(aItemId), -1);
- this._onItemRemovedItemIds.push(aItemId);
- },
-
- QueryInterface: function(aIID) {
- if (aIID.equals(Ci.nsINavBookmarkObserver) ||
- aIID.equals(Ci.nsISupports)) {
- return this;
- }
- throw Cr.NS_ERROR_NO_INTERFACE;
- }
-};
-
-bmSvc.addObserver(observer, false);
-
-function add_bookmarks() {
- // This is the folder we will cleanup
- var validFolderId = bmSvc.createFolder(bmSvc.toolbarFolder,
- validItemName,
- bmSvc.DEFAULT_INDEX);
- annoSvc.setItemAnnotation(validFolderId, validAnnoName,
- "annotation", 0,
- annoSvc.EXPIRE_NEVER);
- bmSvc.setItemLastModified(validFolderId, pastDate);
-
- // This bookmark should not be deleted
- var validItemId = bmSvc.insertBookmark(bmSvc.toolbarFolder,
- bookmarkedURI,
- bmSvc.DEFAULT_INDEX,
- validItemName);
- annoSvc.setItemAnnotation(validItemId, validAnnoName,
- "annotation", 0, annoSvc.EXPIRE_NEVER);
-
- // The following contents should be deleted
- var deletedItemId = bmSvc.insertBookmark(validFolderId,
- bookmarkedURI,
- bmSvc.DEFAULT_INDEX,
- deletedItemName);
- annoSvc.setItemAnnotation(deletedItemId, deletedAnnoName,
- "annotation", 0, annoSvc.EXPIRE_NEVER);
- deletedBookmarkIds.push(deletedItemId);
-
- var internalFolderId = bmSvc.createFolder(validFolderId,
- deletedItemName,
- bmSvc.DEFAULT_INDEX);
- annoSvc.setItemAnnotation(internalFolderId, deletedAnnoName,
- "annotation", 0, annoSvc.EXPIRE_NEVER);
- deletedBookmarkIds.push(internalFolderId);
-
- deletedItemId = bmSvc.insertBookmark(internalFolderId,
- bookmarkedURI,
- bmSvc.DEFAULT_INDEX,
- deletedItemName);
- annoSvc.setItemAnnotation(deletedItemId, deletedAnnoName,
- "annotation", 0, annoSvc.EXPIRE_NEVER);
- deletedBookmarkIds.push(deletedItemId);
-
- return validFolderId;
-}
-
-function check_bookmarks(aFolderId) {
- // check that we still have valid bookmarks
- var bookmarks = bmSvc.getBookmarkIdsForURI(bookmarkedURI);
- for (var i = 0; i < bookmarks.length; i++) {
- do_check_eq(bmSvc.getItemTitle(bookmarks[i]), validItemName);
- do_check_true(annoSvc.itemHasAnnotation(bookmarks[i], validAnnoName));
- }
-
- // check that folder exists and has still its annotation
- do_check_eq(bmSvc.getItemTitle(aFolderId), validItemName);
- do_check_true(annoSvc.itemHasAnnotation(aFolderId, validAnnoName));
-
- // check that folder is empty
- var options = histSvc.getNewQueryOptions();
- var query = histSvc.getNewQuery();
- query.setFolders([aFolderId], 1);
- var result = histSvc.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 0);
- root.containerOpen = false;
-
- // test that lastModified got updated
- do_check_true(pastDate < bmSvc.getItemLastModified(aFolderId));
-
- // test that all children have been deleted, we use annos for that
- var deletedItems = annoSvc.getItemsWithAnnotation(deletedAnnoName);
- do_check_eq(deletedItems.length, 0);
-
- // test that observer has been called for (and only for) deleted items
- do_check_eq(observer._onItemRemovedItemIds.length, deletedBookmarkIds.length);
-
- // Sanity check: all roots should be intact
- do_check_eq(bmSvc.getFolderIdForItem(bmSvc.placesRoot), 0);
- do_check_eq(bmSvc.getFolderIdForItem(bmSvc.bookmarksMenuFolder), bmSvc.placesRoot);
- do_check_eq(bmSvc.getFolderIdForItem(bmSvc.tagsFolder), bmSvc.placesRoot);
- do_check_eq(bmSvc.getFolderIdForItem(bmSvc.unfiledBookmarksFolder), bmSvc.placesRoot);
- do_check_eq(bmSvc.getFolderIdForItem(bmSvc.toolbarFolder), bmSvc.placesRoot);
-}
-
-// main
-function run_test() {
- var folderId = add_bookmarks();
- bmSvc.removeFolderChildren(folderId);
- check_bookmarks(folderId);
-}
diff --git a/toolkit/components/places/tests/unit/test_419731.js b/toolkit/components/places/tests/unit/test_419731.js
deleted file mode 100644
index b1a434e12a..0000000000
--- a/toolkit/components/places/tests/unit/test_419731.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- let uri1 = NetUtil.newURI("http://foo.bar/");
-
- // create 2 bookmarks
- let bookmark1id = PlacesUtils.bookmarks
- .insertBookmark(PlacesUtils.bookmarksMenuFolderId,
- uri1,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "title 1");
- let bookmark2id = PlacesUtils.bookmarks
- .insertBookmark(PlacesUtils.toolbarFolderId,
- uri1,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "title 2");
- // add a new tag
- PlacesUtils.tagging.tagURI(uri1, ["foo"]);
-
- // get tag folder id
- let options = PlacesUtils.history.getNewQueryOptions();
- let query = PlacesUtils.history.getNewQuery();
- query.setFolders([PlacesUtils.tagsFolderId], 1);
- let result = PlacesUtils.history.executeQuery(query, options);
- let tagRoot = result.root;
- tagRoot.containerOpen = true;
- let tagNode = tagRoot.getChild(0)
- .QueryInterface(Ci.nsINavHistoryContainerResultNode);
- let tagItemId = tagNode.itemId;
- tagRoot.containerOpen = false;
-
- // change bookmark 1 title
- PlacesUtils.bookmarks.setItemTitle(bookmark1id, "new title 1");
-
- // Workaround timers resolution and time skews.
- let bookmark2LastMod = PlacesUtils.bookmarks.getItemLastModified(bookmark2id);
- PlacesUtils.bookmarks.setItemLastModified(bookmark1id, bookmark2LastMod + 1000);
-
- // Query the tag.
- options = PlacesUtils.history.getNewQueryOptions();
- options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS;
- options.resultType = options.RESULTS_AS_TAG_QUERY;
-
- query = PlacesUtils.history.getNewQuery();
- result = PlacesUtils.history.executeQuery(query, options);
- let root = result.root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 1);
-
- let theTag = root.getChild(0)
- .QueryInterface(Ci.nsINavHistoryContainerResultNode);
- // Bug 524219: Check that renaming the tag shows up in the result.
- do_check_eq(theTag.title, "foo")
- PlacesUtils.bookmarks.setItemTitle(tagItemId, "bar");
-
- // Check that the item has been replaced
- do_check_neq(theTag, root.getChild(0));
- theTag = root.getChild(0)
- .QueryInterface(Ci.nsINavHistoryContainerResultNode);
- do_check_eq(theTag.title, "bar");
-
- // Check that tag container contains new title
- theTag.containerOpen = true;
- do_check_eq(theTag.childCount, 1);
- let node = theTag.getChild(0);
- do_check_eq(node.title, "new title 1");
- theTag.containerOpen = false;
- root.containerOpen = false;
-
- // Change bookmark 2 title.
- PlacesUtils.bookmarks.setItemTitle(bookmark2id, "new title 2");
-
- // Workaround timers resolution and time skews.
- let bookmark1LastMod = PlacesUtils.bookmarks.getItemLastModified(bookmark1id);
- PlacesUtils.bookmarks.setItemLastModified(bookmark2id, bookmark1LastMod + 1000);
-
- // Check that tag container contains new title
- options = PlacesUtils.history.getNewQueryOptions();
- options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS;
- options.resultType = options.RESULTS_AS_TAG_CONTENTS;
-
- query = PlacesUtils.history.getNewQuery();
- query.setFolders([tagItemId], 1);
- result = PlacesUtils.history.executeQuery(query, options);
- root = result.root;
-
- root.containerOpen = true;
- do_check_eq(root.childCount, 1);
- node = root.getChild(0);
- do_check_eq(node.title, "new title 2");
- root.containerOpen = false;
-}
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
deleted file mode 100644
index 4c726d6672..0000000000
--- a/toolkit/components/places/tests/unit/test_419792_node_tags_property.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-// get services
-var histsvc = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
-var bmsvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
-var tagssvc = Cc["@mozilla.org/browser/tagging-service;1"].
- getService(Ci.nsITaggingService);
-
-function run_test() {
- // get toolbar node
- var options = histsvc.getNewQueryOptions();
- var query = histsvc.getNewQuery();
- query.setFolders([bmsvc.toolbarFolder], 1);
- var result = histsvc.executeQuery(query, options);
- var toolbarNode = result.root;
- toolbarNode.containerOpen = true;
-
- // add a bookmark
- var bookmarkURI = uri("http://foo.com");
- var bookmarkId = bmsvc.insertBookmark(bmsvc.toolbarFolder, bookmarkURI,
- bmsvc.DEFAULT_INDEX, "");
-
- // get the node for the new bookmark
- var node = toolbarNode.getChild(toolbarNode.childCount-1);
- do_check_eq(node.itemId, bookmarkId);
-
- // confirm there's no tags via the .tags property
- do_check_eq(node.tags, null);
-
- // add a tag
- tagssvc.tagURI(bookmarkURI, ["foo"]);
- do_check_eq(node.tags, "foo");
-
- // add another tag, to test delimiter and sorting
- tagssvc.tagURI(bookmarkURI, ["bar"]);
- do_check_eq(node.tags, "bar, foo");
-
- // remove the tags, confirming the property is cleared
- tagssvc.untagURI(bookmarkURI, null);
- do_check_eq(node.tags, null);
-
- toolbarNode.containerOpen = false;
-}
diff --git a/toolkit/components/places/tests/unit/test_425563.js b/toolkit/components/places/tests/unit/test_425563.js
deleted file mode 100644
index bee3a4a546..0000000000
--- a/toolkit/components/places/tests/unit/test_425563.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_execute()
-{
- let count_visited_URIs = ["http://www.test-link.com/",
- "http://www.test-typed.com/",
- "http://www.test-bookmark.com/",
- "http://www.test-redirect-permanent.com/",
- "http://www.test-redirect-temporary.com/"];
-
- let notcount_visited_URIs = ["http://www.test-embed.com/",
- "http://www.test-download.com/",
- "http://www.test-framed.com/",
- "http://www.test-reload.com/"];
-
- // add visits, one for each transition type
- yield PlacesTestUtils.addVisits([
- { uri: uri("http://www.test-link.com/"),
- transition: TRANSITION_LINK },
- { uri: uri("http://www.test-typed.com/"),
- transition: TRANSITION_TYPED },
- { uri: uri("http://www.test-bookmark.com/"),
- transition: TRANSITION_BOOKMARK },
- { uri: uri("http://www.test-embed.com/"),
- transition: TRANSITION_EMBED },
- { uri: uri("http://www.test-framed.com/"),
- transition: TRANSITION_FRAMED_LINK },
- { uri: uri("http://www.test-redirect-permanent.com/"),
- transition: TRANSITION_REDIRECT_PERMANENT },
- { uri: uri("http://www.test-redirect-temporary.com/"),
- transition: TRANSITION_REDIRECT_TEMPORARY },
- { uri: uri("http://www.test-download.com/"),
- transition: TRANSITION_DOWNLOAD },
- { uri: uri("http://www.test-reload.com/"),
- transition: TRANSITION_RELOAD },
- ]);
-
- // check that all links are marked as visited
- for (let visited_uri of count_visited_URIs) {
- do_check_true(yield promiseIsURIVisited(uri(visited_uri)));
- }
- for (let visited_uri of notcount_visited_URIs) {
- do_check_true(yield promiseIsURIVisited(uri(visited_uri)));
- }
-
- // check that visit_count does not take in count embed and downloads
- // maxVisits query are directly binded to visit_count
- let options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = options.SORT_BY_VISITCOUNT_DESCENDING;
- options.resultType = options.RESULTS_AS_VISIT;
- options.includeHidden = true;
- let query = PlacesUtils.history.getNewQuery();
- query.minVisits = 1;
- let root = PlacesUtils.history.executeQuery(query, options).root;
-
- root.containerOpen = true;
- let cc = root.childCount;
- do_check_eq(cc, count_visited_URIs.length);
-
- for (let i = 0; i < cc; i++) {
- let node = root.getChild(i);
- do_check_neq(count_visited_URIs.indexOf(node.uri), -1);
- }
- root.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
deleted file mode 100644
index e0b6be64cd..0000000000
--- a/toolkit/components/places/tests/unit/test_429505_remove_shortcuts.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/*
-
-- add a folder
-- add a folder-shortcut to the new folder
-- query for the shortcut
-- remove the folder-shortcut
-- confirm the shortcut is removed from the query results
-
-*/
-
-function run_test() {
- const IDX = PlacesUtils.bookmarks.DEFAULT_INDEX;
- 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;
-
- PlacesUtils.bookmarks.removeItem(queryId);
-
- do_check_eq(root.childCount, oldCount-1);
-
- root.containerOpen = false;
-}
diff --git a/toolkit/components/places/tests/unit/test_433317_query_title_update.js b/toolkit/components/places/tests/unit/test_433317_query_title_update.js
deleted file mode 100644
index 52558e844b..0000000000
--- a/toolkit/components/places/tests/unit/test_433317_query_title_update.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- try {
- var histsvc = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
- var bmsvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
- } catch (ex) {
- do_throw("Unable to initialize Places services");
- }
-
- // create a query bookmark
- var queryId = bmsvc.insertBookmark(bmsvc.toolbarFolder, uri("place:"),
- 0 /* first item */, "test query");
-
- // query for that query
- var options = histsvc.getNewQueryOptions();
- var query = histsvc.getNewQuery();
- query.setFolders([bmsvc.toolbarFolder], 1);
- var result = histsvc.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- var queryNode = root.getChild(0);
- do_check_eq(queryNode.title, "test query");
-
- // change the title
- bmsvc.setItemTitle(queryId, "foo");
-
- // confirm the node was updated
- do_check_eq(queryNode.title, "foo");
-
- root.containerOpen = false;
-}
diff --git a/toolkit/components/places/tests/unit/test_433525_hasChildren_crash.js b/toolkit/components/places/tests/unit/test_433525_hasChildren_crash.js
deleted file mode 100644
index 92dac0b17d..0000000000
--- a/toolkit/components/places/tests/unit/test_433525_hasChildren_crash.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_execute()
-{
- try {
- var histsvc = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
- var bmsvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
- } catch (ex) {
- do_throw("Unable to initialize Places services");
- }
-
- // add a visit
- var testURI = uri("http://test");
- yield PlacesTestUtils.addVisits(testURI);
-
- // query for the visit
- var options = histsvc.getNewQueryOptions();
- options.maxResults = 1;
- options.resultType = options.RESULTS_AS_URI;
- var query = histsvc.getNewQuery();
- query.uri = testURI;
- var result = histsvc.executeQuery(query, options);
- var root = result.root;
-
- // check hasChildren while the container is closed
- do_check_eq(root.hasChildren, true);
-
- // now check via the saved search path
- var queryURI = histsvc.queriesToQueryString([query], 1, options);
- bmsvc.insertBookmark(bmsvc.toolbarFolder, uri(queryURI),
- 0 /* first item */, "test query");
-
- // query for that query
- options = histsvc.getNewQueryOptions();
- query = histsvc.getNewQuery();
- query.setFolders([bmsvc.toolbarFolder], 1);
- result = histsvc.executeQuery(query, options);
- root = result.root;
- root.containerOpen = true;
- var queryNode = root.getChild(0);
- do_check_eq(queryNode.title, "test query");
- queryNode.QueryInterface(Ci.nsINavHistoryContainerResultNode);
- do_check_eq(queryNode.hasChildren, true);
- root.containerOpen = false;
-});
diff --git a/toolkit/components/places/tests/unit/test_452777.js b/toolkit/components/places/tests/unit/test_452777.js
deleted file mode 100644
index 97b2852f6d..0000000000
--- a/toolkit/components/places/tests/unit/test_452777.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
- * vim:set ts=2 sw=2 sts=2 expandtab
- * 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 test ensures that when removing a folder within a transaction, undoing
- * the transaction restores it with the same id (as received by the observers).
- */
-
-var bs = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
-
-function run_test()
-{
- const TITLE = "test folder";
-
- // Create two test folders; remove the first one. This ensures that undoing
- // the removal will not get the same id by chance (the insert id's can be
- // reused in SQLite).
- let id = bs.createFolder(bs.placesRoot, TITLE, -1);
- bs.createFolder(bs.placesRoot, "test folder 2", -1);
- let transaction = bs.getRemoveFolderTransaction(id);
- transaction.doTransaction();
-
- // Now check to make sure it gets added with the right id
- bs.addObserver({
- onItemAdded: function(aItemId, aFolder, aIndex, aItemType, aURI, aTitle)
- {
- do_check_eq(aItemId, id);
- do_check_eq(aTitle, TITLE);
- }
- }, false);
- transaction.undoTransaction();
-}
diff --git a/toolkit/components/places/tests/unit/test_454977.js b/toolkit/components/places/tests/unit/test_454977.js
deleted file mode 100644
index 606e830488..0000000000
--- a/toolkit/components/places/tests/unit/test_454977.js
+++ /dev/null
@@ -1,124 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-// Cache actual visit_count value, filled by add_visit, used by check_results
-var visit_count = 0;
-
-// Returns the Place ID corresponding to an added visit.
-function* task_add_visit(aURI, aVisitType)
-{
- // Add the visit asynchronously, and save its visit ID.
- let deferUpdatePlaces = new Promise((resolve, reject) =>
- {
- PlacesUtils.asyncHistory.updatePlaces({
- uri: aURI,
- visits: [{ transitionType: aVisitType, visitDate: Date.now() * 1000 }]
- }, {
- handleError: function TAV_handleError() {
- reject(new Error("Unexpected error in adding visit."));
- },
- handleResult: function (aPlaceInfo) {
- this.visitId = aPlaceInfo.visits[0].visitId;
- },
- handleCompletion: function TAV_handleCompletion() {
- resolve(this.visitId);
- }
- });
- });
-
- let visitId = yield deferUpdatePlaces;
-
- // Increase visit_count if applicable
- if (aVisitType != 0 &&
- aVisitType != TRANSITION_EMBED &&
- aVisitType != TRANSITION_FRAMED_LINK &&
- aVisitType != TRANSITION_DOWNLOAD &&
- aVisitType != TRANSITION_RELOAD) {
- visit_count ++;
- }
-
- // Get the place id
- if (visitId > 0) {
- let sql = "SELECT place_id FROM moz_historyvisits WHERE id = ?1";
- let stmt = DBConn().createStatement(sql);
- stmt.bindByIndex(0, visitId);
- do_check_true(stmt.executeStep());
- let placeId = stmt.getInt64(0);
- stmt.finalize();
- do_check_true(placeId > 0);
- return placeId;
- }
- return 0;
-}
-
-/**
- * Checks for results consistency, using visit_count as constraint
- * @param aExpectedCount
- * Number of history results we are expecting (excluded hidden ones)
- * @param aExpectedCountWithHidden
- * Number of history results we are expecting (included hidden ones)
- */
-function check_results(aExpectedCount, aExpectedCountWithHidden)
-{
- let query = PlacesUtils.history.getNewQuery();
- // used to check visit_count
- query.minVisits = visit_count;
- query.maxVisits = visit_count;
- let options = PlacesUtils.history.getNewQueryOptions();
- options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_HISTORY;
- let root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
- // Children without hidden ones
- do_check_eq(root.childCount, aExpectedCount);
- root.containerOpen = false;
-
- // Execute again with includeHidden = true
- // This will ensure visit_count is correct
- options.includeHidden = true;
- root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
- // Children with hidden ones
- do_check_eq(root.childCount, aExpectedCountWithHidden);
- root.containerOpen = false;
-}
-
-// main
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_execute()
-{
- const TEST_URI = uri("http://test.mozilla.org/");
-
- // Add a visit that force hidden
- yield task_add_visit(TEST_URI, TRANSITION_EMBED);
- check_results(0, 0);
-
- let placeId = yield task_add_visit(TEST_URI, TRANSITION_FRAMED_LINK);
- check_results(0, 1);
-
- // Add a visit that force unhide and check the place id.
- // - We expect that the place gets hidden = 0 while retaining the same
- // place id and a correct visit_count.
- do_check_eq((yield task_add_visit(TEST_URI, TRANSITION_TYPED)), placeId);
- check_results(1, 1);
-
- // Add a visit that should not increase visit_count
- do_check_eq((yield task_add_visit(TEST_URI, TRANSITION_RELOAD)), placeId);
- check_results(1, 1);
-
- // Add a visit that should not increase visit_count
- do_check_eq((yield task_add_visit(TEST_URI, TRANSITION_DOWNLOAD)), placeId);
- check_results(1, 1);
-
- // Add a visit, check that hidden is not overwritten
- // - We expect that the place has still hidden = 0, while retaining
- // correct visit_count.
- yield task_add_visit(TEST_URI, TRANSITION_EMBED);
- check_results(1, 1);
-});
diff --git a/toolkit/components/places/tests/unit/test_463863.js b/toolkit/components/places/tests/unit/test_463863.js
deleted file mode 100644
index 2f7cece4ac..0000000000
--- a/toolkit/components/places/tests/unit/test_463863.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/*
- * TEST DESCRIPTION:
- *
- * This test checks that in a basic history query all transition types visits
- * appear but TRANSITION_EMBED and TRANSITION_FRAMED_LINK ones.
- */
-
-var transitions = [
- TRANSITION_LINK
-, TRANSITION_TYPED
-, TRANSITION_BOOKMARK
-, TRANSITION_EMBED
-, TRANSITION_FRAMED_LINK
-, TRANSITION_REDIRECT_PERMANENT
-, TRANSITION_REDIRECT_TEMPORARY
-, TRANSITION_DOWNLOAD
-];
-
-function runQuery(aResultType) {
- let options = PlacesUtils.history.getNewQueryOptions();
- options.resultType = aResultType;
- let root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(),
- options).root;
- root.containerOpen = true;
- let cc = root.childCount;
- do_check_eq(cc, transitions.length - 2);
-
- for (let i = 0; i < cc; i++) {
- let node = root.getChild(i);
- // Check that all transition types but EMBED and FRAMED appear in results
- do_check_neq(node.uri.substr(6, 1), TRANSITION_EMBED);
- do_check_neq(node.uri.substr(6, 1), TRANSITION_FRAMED_LINK);
- }
- root.containerOpen = false;
-}
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_execute()
-{
- // add visits, one for each transition type
- for (let transition of transitions) {
- yield PlacesTestUtils.addVisits({
- uri: uri("http://" + transition + ".mozilla.org/"),
- transition: transition
- });
- }
-
- runQuery(Ci.nsINavHistoryQueryOptions.RESULTS_AS_VISIT);
- runQuery(Ci.nsINavHistoryQueryOptions.RESULTS_AS_URI);
-});
diff --git a/toolkit/components/places/tests/unit/test_485442_crash_bug_nsNavHistoryQuery_GetUri.js b/toolkit/components/places/tests/unit/test_485442_crash_bug_nsNavHistoryQuery_GetUri.js
deleted file mode 100644
index 873174ffd0..0000000000
--- a/toolkit/components/places/tests/unit/test_485442_crash_bug_nsNavHistoryQuery_GetUri.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var hs = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
-
-function run_test() {
- var query = hs.getNewQuery();
- var options = hs.getNewQueryOptions();
- options.resultType = options.RESULT_TYPE_QUERY;
- var result = hs.executeQuery(query, options);
- result.root.containerOpen = true;
- var rootNode = result.root;
- rootNode.QueryInterface(Ci.nsINavHistoryQueryResultNode);
- var queries = rootNode.getQueries();
- do_check_eq(queries[0].uri, null); // Should be null, instead of crashing the browser
- rootNode.containerOpen = false;
-}
diff --git a/toolkit/components/places/tests/unit/test_486978_sort_by_date_queries.js b/toolkit/components/places/tests/unit/test_486978_sort_by_date_queries.js
deleted file mode 100644
index 05f3f83e7f..0000000000
--- a/toolkit/components/places/tests/unit/test_486978_sort_by_date_queries.js
+++ /dev/null
@@ -1,129 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/*
- * TEST DESCRIPTION:
- *
- * This test checks that setting a sort on a RESULTS_AS_DATE_QUERY query,
- * children of inside containers are sorted accordingly.
- */
-
-var hs = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
-
-// Will be inserted in this order, so last one will be the newest visit.
-var pages = [
- "http://a.mozilla.org/1/",
- "http://a.mozilla.org/2/",
- "http://a.mozilla.org/3/",
- "http://a.mozilla.org/4/",
- "http://b.mozilla.org/5/",
- "http://b.mozilla.org/6/",
- "http://b.mozilla.org/7/",
- "http://b.mozilla.org/8/",
-];
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_initialize()
-{
- var noon = new Date();
- noon.setHours(12);
-
- // Add visits.
- for (let pageIndex = 0; pageIndex < pages.length; ++pageIndex) {
- let page = pages[pageIndex];
- yield PlacesTestUtils.addVisits({
- uri: uri(page),
- visitDate: noon - (pages.length - pageIndex) * 1000
- });
- }
-});
-
-/**
- * Tests that sorting date query by none will sort by title asc.
- */
-add_task(function() {
- var options = hs.getNewQueryOptions();
- options.resultType = options.RESULTS_AS_DATE_QUERY;
- // This should sort by title asc.
- options.sortingMode = options.SORT_BY_NONE;
- var query = hs.getNewQuery();
- var result = hs.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- var dayContainer = root.getChild(0).QueryInterface(Ci.nsINavHistoryContainerResultNode);
- dayContainer.containerOpen = true;
-
- var cc = dayContainer.childCount;
- do_check_eq(cc, pages.length);
- for (var i = 0; i < cc; i++) {
- var node = dayContainer.getChild(i);
- do_check_eq(pages[i], node.uri);
- }
-
- dayContainer.containerOpen = false;
- root.containerOpen = false;
-});
-
-/**
- * Tests that sorting date query by date will sort accordingly.
- */
-add_task(function() {
- var options = hs.getNewQueryOptions();
- options.resultType = options.RESULTS_AS_DATE_QUERY;
- // This should sort by title asc.
- options.sortingMode = options.SORT_BY_DATE_DESCENDING;
- var query = hs.getNewQuery();
- var result = hs.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- var dayContainer = root.getChild(0).QueryInterface(Ci.nsINavHistoryContainerResultNode);
- dayContainer.containerOpen = true;
-
- var cc = dayContainer.childCount;
- do_check_eq(cc, pages.length);
- for (var i = 0; i < cc; i++) {
- var node = dayContainer.getChild(i);
- do_check_eq(pages[pages.length - i - 1], node.uri);
- }
-
- dayContainer.containerOpen = false;
- root.containerOpen = false;
-});
-
-/**
- * Tests that sorting date site query by date will still sort by title asc.
- */
-add_task(function() {
- var options = hs.getNewQueryOptions();
- options.resultType = options.RESULTS_AS_DATE_SITE_QUERY;
- // This should sort by title asc.
- options.sortingMode = options.SORT_BY_DATE_DESCENDING;
- var query = hs.getNewQuery();
- var result = hs.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- var dayContainer = root.getChild(0).QueryInterface(Ci.nsINavHistoryContainerResultNode);
- dayContainer.containerOpen = true;
- var siteContainer = dayContainer.getChild(0).QueryInterface(Ci.nsINavHistoryContainerResultNode);
- do_check_eq(siteContainer.title, "a.mozilla.org");
- siteContainer.containerOpen = true;
-
- var cc = siteContainer.childCount;
- do_check_eq(cc, pages.length / 2);
- for (var i = 0; i < cc / 2; i++) {
- var node = siteContainer.getChild(i);
- do_check_eq(pages[i], node.uri);
- }
-
- siteContainer.containerOpen = false;
- dayContainer.containerOpen = false;
- root.containerOpen = false;
-});
diff --git a/toolkit/components/places/tests/unit/test_536081.js b/toolkit/components/places/tests/unit/test_536081.js
deleted file mode 100644
index b61b918666..0000000000
--- a/toolkit/components/places/tests/unit/test_536081.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var hs = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
-var bh = hs.QueryInterface(Ci.nsIBrowserHistory);
-var db = hs.QueryInterface(Ci.nsPIPlacesDatabase).DBConnection;
-
-const URLS = [
- { u: "http://www.google.com/search?q=testing%3Bthis&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:unofficial&client=firefox-a",
- s: "goog" },
-];
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_execute()
-{
- for (let url of URLS) {
- yield task_test_url(url);
- }
-});
-
-function* task_test_url(aURL) {
- print("Testing url: " + aURL.u);
- yield PlacesTestUtils.addVisits(uri(aURL.u));
- let query = hs.getNewQuery();
- query.searchTerms = aURL.s;
- let options = hs.getNewQueryOptions();
- let root = hs.executeQuery(query, options).root;
- root.containerOpen = true;
- let cc = root.childCount;
- do_check_eq(cc, 1);
- print("Checking url is in the query.");
- let node = root.getChild(0);
- print("Found " + node.uri);
- root.containerOpen = false;
- bh.removePage(uri(node.uri));
-}
-
-function check_empty_table(table_name) {
- print("Checking url has been removed.");
- let stmt = db.createStatement("SELECT count(*) FROM " + table_name);
- try {
- stmt.executeStep();
- do_check_eq(stmt.getInt32(0), 0);
- }
- finally {
- stmt.finalize();
- }
-}
diff --git a/toolkit/components/places/tests/unit/test_PlacesSearchAutocompleteProvider.js b/toolkit/components/places/tests/unit/test_PlacesSearchAutocompleteProvider.js
deleted file mode 100644
index 1280ce3e79..0000000000
--- a/toolkit/components/places/tests/unit/test_PlacesSearchAutocompleteProvider.js
+++ /dev/null
@@ -1,133 +0,0 @@
-/* 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/. */
-
-Cu.import("resource://gre/modules/PlacesSearchAutocompleteProvider.jsm");
-
-function run_test() {
- // Tell the search service we are running in the US. This also has the
- // desired side-effect of preventing our geoip lookup.
- Services.prefs.setBoolPref("browser.search.isUS", true);
- Services.prefs.setCharPref("browser.search.countryCode", "US");
- Services.prefs.setBoolPref("browser.search.geoSpecificDefaults", false);
- run_next_test();
-}
-
-add_task(function* search_engine_match() {
- let engine = yield promiseDefaultSearchEngine();
- let token = engine.getResultDomain();
- let match = yield PlacesSearchAutocompleteProvider.findMatchByToken(token.substr(0, 1));
- do_check_eq(match.url, engine.searchForm);
- do_check_eq(match.engineName, engine.name);
- do_check_eq(match.iconUrl, engine.iconURI ? engine.iconURI.spec : null);
-});
-
-add_task(function* no_match() {
- do_check_eq(null, yield PlacesSearchAutocompleteProvider.findMatchByToken("test"));
-});
-
-add_task(function* hide_search_engine_nomatch() {
- let engine = yield promiseDefaultSearchEngine();
- let token = engine.getResultDomain();
- let promiseTopic = promiseSearchTopic("engine-changed");
- Services.search.removeEngine(engine);
- yield promiseTopic;
- do_check_true(engine.hidden);
- do_check_eq(null, yield PlacesSearchAutocompleteProvider.findMatchByToken(token.substr(0, 1)));
-});
-
-add_task(function* add_search_engine_match() {
- let promiseTopic = promiseSearchTopic("engine-added");
- do_check_eq(null, yield PlacesSearchAutocompleteProvider.findMatchByToken("bacon"));
- Services.search.addEngineWithDetails("bacon", "", "pork", "Search Bacon",
- "GET", "http://www.bacon.moz/?search={searchTerms}");
- yield promiseTopic;
- let match = yield PlacesSearchAutocompleteProvider.findMatchByToken("bacon");
- do_check_eq(match.url, "http://www.bacon.moz");
- do_check_eq(match.engineName, "bacon");
- do_check_eq(match.iconUrl, null);
-});
-
-add_task(function* test_aliased_search_engine_match() {
- do_check_eq(null, yield PlacesSearchAutocompleteProvider.findMatchByAlias("sober"));
- // Lower case
- let match = yield PlacesSearchAutocompleteProvider.findMatchByAlias("pork");
- do_check_eq(match.engineName, "bacon");
- do_check_eq(match.alias, "pork");
- do_check_eq(match.iconUrl, null);
- // Upper case
- let match1 = yield PlacesSearchAutocompleteProvider.findMatchByAlias("PORK");
- do_check_eq(match1.engineName, "bacon");
- do_check_eq(match1.alias, "pork");
- do_check_eq(match1.iconUrl, null);
- // Cap case
- let match2 = yield PlacesSearchAutocompleteProvider.findMatchByAlias("Pork");
- do_check_eq(match2.engineName, "bacon");
- do_check_eq(match2.alias, "pork");
- do_check_eq(match2.iconUrl, null);
-});
-
-add_task(function* test_aliased_search_engine_match_upper_case_alias() {
- let promiseTopic = promiseSearchTopic("engine-added");
- do_check_eq(null, yield PlacesSearchAutocompleteProvider.findMatchByToken("patch"));
- Services.search.addEngineWithDetails("patch", "", "PR", "Search Patch",
- "GET", "http://www.patch.moz/?search={searchTerms}");
- yield promiseTopic;
- // lower case
- let match = yield PlacesSearchAutocompleteProvider.findMatchByAlias("pr");
- do_check_eq(match.engineName, "patch");
- do_check_eq(match.alias, "PR");
- do_check_eq(match.iconUrl, null);
- // Upper case
- let match1 = yield PlacesSearchAutocompleteProvider.findMatchByAlias("PR");
- do_check_eq(match1.engineName, "patch");
- do_check_eq(match1.alias, "PR");
- do_check_eq(match1.iconUrl, null);
- // Cap case
- let match2 = yield PlacesSearchAutocompleteProvider.findMatchByAlias("Pr");
- do_check_eq(match2.engineName, "patch");
- do_check_eq(match2.alias, "PR");
- do_check_eq(match2.iconUrl, null);
-});
-
-add_task(function* remove_search_engine_nomatch() {
- let engine = Services.search.getEngineByName("bacon");
- let promiseTopic = promiseSearchTopic("engine-removed");
- Services.search.removeEngine(engine);
- yield promiseTopic;
- do_check_eq(null, yield PlacesSearchAutocompleteProvider.findMatchByToken("bacon"));
-});
-
-add_task(function* test_parseSubmissionURL_basic() {
- // Most of the logic of parseSubmissionURL is tested in the search service
- // itself, thus we only do a sanity check of the wrapper here.
- let engine = yield promiseDefaultSearchEngine();
- let submissionURL = engine.getSubmission("terms").uri.spec;
-
- let result = PlacesSearchAutocompleteProvider.parseSubmissionURL(submissionURL);
- do_check_eq(result.engineName, engine.name);
- do_check_eq(result.terms, "terms");
-
- result = PlacesSearchAutocompleteProvider.parseSubmissionURL("http://example.org/");
- do_check_eq(result, null);
-});
-
-function promiseDefaultSearchEngine() {
- let deferred = Promise.defer();
- Services.search.init( () => {
- deferred.resolve(Services.search.defaultEngine);
- });
- return deferred.promise;
-}
-
-function promiseSearchTopic(expectedVerb) {
- let deferred = Promise.defer();
- Services.obs.addObserver( function observe(subject, topic, verb) {
- do_print("browser-search-engine-modified: " + verb);
- if (verb == expectedVerb) {
- Services.obs.removeObserver(observe, "browser-search-engine-modified");
- deferred.resolve();
- }
- }, "browser-search-engine-modified", false);
- return deferred.promise;
-}
diff --git a/toolkit/components/places/tests/unit/test_PlacesUtils_asyncGetBookmarkIds.js b/toolkit/components/places/tests/unit/test_PlacesUtils_asyncGetBookmarkIds.js
deleted file mode 100644
index 182f75eac8..0000000000
--- a/toolkit/components/places/tests/unit/test_PlacesUtils_asyncGetBookmarkIds.js
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * This file tests PlacesUtils.asyncGetBookmarkIds method.
- */
-
-const TEST_URL = "http://www.example.com/";
-
-var promiseAsyncGetBookmarkIds = Task.async(function* (url) {
- yield PlacesTestUtils.promiseAsyncUpdates();
- return new Promise(resolve => {
- PlacesUtils.asyncGetBookmarkIds(url, (itemIds, uri) => {
- Assert.equal(uri, url);
- resolve({ itemIds, url });
- });
- });
-});
-
-add_task(function* test_no_bookmark() {
- let { itemIds, url } = yield promiseAsyncGetBookmarkIds(TEST_URL);
- Assert.equal(itemIds.length, 0);
- Assert.equal(url, TEST_URL);
-});
-
-add_task(function* test_one_bookmark() {
- let bookmark = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: TEST_URL,
- title: "test"
- });
- let itemId = yield PlacesUtils.promiseItemId(bookmark.guid);
- {
- let { itemIds, url } = yield promiseAsyncGetBookmarkIds(NetUtil.newURI(TEST_URL));
- Assert.equal(itemIds.length, 1);
- Assert.equal(itemIds[0], itemId);
- Assert.equal(url.spec, TEST_URL);
- }
- {
- let { itemIds, url } = yield promiseAsyncGetBookmarkIds(TEST_URL);
- Assert.equal(itemIds.length, 1);
- Assert.equal(itemIds[0], itemId);
- Assert.equal(url, TEST_URL);
- }
- yield PlacesUtils.bookmarks.remove(bookmark);
-});
-
-add_task(function* test_multiple_bookmarks() {
- let ids = [];
- let bookmark1 = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: TEST_URL,
- title: "test"
- });
- ids.push((yield PlacesUtils.promiseItemId(bookmark1.guid)));
- let bookmark2 = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: TEST_URL,
- title: "test"
- });
- ids.push((yield PlacesUtils.promiseItemId(bookmark2.guid)));
-
- let { itemIds, url } = yield promiseAsyncGetBookmarkIds(TEST_URL);
- Assert.deepEqual(ids, itemIds);
- Assert.equal(url, TEST_URL);
-
- yield PlacesUtils.bookmarks.remove(bookmark1);
- yield PlacesUtils.bookmarks.remove(bookmark2);
-});
-
-add_task(function* test_cancel() {
- let pending = PlacesUtils.asyncGetBookmarkIds(TEST_URL, () => {
- Assert.ok(false, "A canceled pending statement should not be invoked");
- });
- pending.cancel();
-
- let { itemIds, url } = yield promiseAsyncGetBookmarkIds(TEST_URL);
- Assert.equal(itemIds.length, 0);
- Assert.equal(url, TEST_URL);
-});
diff --git a/toolkit/components/places/tests/unit/test_PlacesUtils_invalidateCachedGuidFor.js b/toolkit/components/places/tests/unit/test_PlacesUtils_invalidateCachedGuidFor.js
deleted file mode 100644
index b7906ec5c0..0000000000
--- a/toolkit/components/places/tests/unit/test_PlacesUtils_invalidateCachedGuidFor.js
+++ /dev/null
@@ -1,25 +0,0 @@
-add_task(function* () {
- do_print("Add a bookmark.");
- let bm = yield PlacesUtils.bookmarks.insert({ url: "http://example.com/",
- parentGuid: PlacesUtils.bookmarks.unfiledGuid });
- let id = yield PlacesUtils.promiseItemId(bm.guid);
- Assert.equal((yield PlacesUtils.promiseItemGuid(id)), bm.guid);
-
- // Ensure invalidating a non-existent itemId doesn't throw.
- PlacesUtils.invalidateCachedGuidFor(null);
- PlacesUtils.invalidateCachedGuidFor(9999);
-
- do_print("Change the GUID.");
- yield PlacesUtils.withConnectionWrapper("test", Task.async(function*(db) {
- yield db.execute("UPDATE moz_bookmarks SET guid = :guid WHERE id = :id",
- { guid: "123456789012", id});
- }));
- // The cache should still point to the wrong id.
- Assert.equal((yield PlacesUtils.promiseItemGuid(id)), bm.guid);
-
- do_print("Invalidate the cache.");
- PlacesUtils.invalidateCachedGuidFor(id);
- Assert.equal((yield PlacesUtils.promiseItemGuid(id)), "123456789012");
- Assert.equal((yield PlacesUtils.promiseItemId("123456789012")), id);
- yield Assert.rejects(PlacesUtils.promiseItemId(bm.guid), /no item found for the given GUID/);
-});
diff --git a/toolkit/components/places/tests/unit/test_PlacesUtils_lazyobservers.js b/toolkit/components/places/tests/unit/test_PlacesUtils_lazyobservers.js
deleted file mode 100644
index f0e9c5517a..0000000000
--- a/toolkit/components/places/tests/unit/test_PlacesUtils_lazyobservers.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function run_test() {
- do_test_pending();
-
- const TEST_URI = NetUtil.newURI("http://moz.org/")
- let observer = {
- QueryInterface: XPCOMUtils.generateQI([
- Ci.nsINavBookmarkObserver,
- ]),
-
- onBeginUpdateBatch: function () {},
- onEndUpdateBatch: function () {},
- onItemAdded: function (aItemId, aParentId, aIndex, aItemType, aURI) {
- do_check_true(aURI.equals(TEST_URI));
- PlacesUtils.removeLazyBookmarkObserver(this);
- do_test_finished();
- },
- onItemRemoved: function () {},
- onItemChanged: function () {},
- onItemVisited: function () {},
- onItemMoved: function () {},
- };
-
- // Check registration and removal with uninitialized bookmarks service.
- PlacesUtils.addLazyBookmarkObserver(observer);
- PlacesUtils.removeLazyBookmarkObserver(observer);
-
- // Add a proper lazy observer we will test.
- PlacesUtils.addLazyBookmarkObserver(observer);
-
- // Check that we don't leak when adding and removing an observer while the
- // bookmarks service is instantiated but no change happened (bug 721319).
- PlacesUtils.bookmarks;
- PlacesUtils.addLazyBookmarkObserver(observer);
- PlacesUtils.removeLazyBookmarkObserver(observer);
- try {
- PlacesUtils.bookmarks.removeObserver(observer);
- do_throw("Trying to remove a nonexisting observer should throw!");
- } catch (ex) {}
-
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- TEST_URI,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "Bookmark title");
-}
diff --git a/toolkit/components/places/tests/unit/test_adaptive.js b/toolkit/components/places/tests/unit/test_adaptive.js
deleted file mode 100644
index 78ffaedb51..0000000000
--- a/toolkit/components/places/tests/unit/test_adaptive.js
+++ /dev/null
@@ -1,406 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/**
- * Test for bug 395739 to make sure the feedback to the search results in those
- * entries getting better ranks. Additionally, exact matches should be ranked
- * higher. Because the interactions among adaptive rank and visit counts is not
- * well defined, this test holds one of the two values constant when modifying
- * the other.
- *
- * This also tests bug 395735 for the instrumentation feedback mechanism.
- *
- * Bug 411293 is tested to make sure the drop down strongly prefers previously
- * typed pages that have been selected and are moved to the top with adaptive
- * learning.
- */
-
-function AutoCompleteInput(aSearches) {
- this.searches = aSearches;
-}
-AutoCompleteInput.prototype = {
- constructor: AutoCompleteInput,
-
- get minResultsForPopup() {
- return 0;
- },
- get timeout() {
- return 10;
- },
- get searchParam() {
- return "";
- },
- get textValue() {
- return "";
- },
- get disableAutoComplete() {
- return false;
- },
- get completeDefaultIndex() {
- return false;
- },
-
- get searchCount() {
- return this.searches.length;
- },
- getSearchAt: function (aIndex) {
- return this.searches[aIndex];
- },
-
- onSearchBegin: function () {},
- onSearchComplete: function() {},
-
- get popupOpen() {
- return false;
- },
- popup: {
- set selectedIndex(aIndex) {},
- invalidate: function () {},
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompletePopup])
- },
-
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteInput])
-}
-
-/**
- * Checks that autocomplete results are ordered correctly.
- */
-function ensure_results(expected, searchTerm)
-{
- let controller = Cc["@mozilla.org/autocomplete/controller;1"].
- getService(Ci.nsIAutoCompleteController);
-
- // Make an AutoCompleteInput that uses our searches
- // and confirms results on search complete.
- let input = new AutoCompleteInput(["unifiedcomplete"]);
-
- controller.input = input;
-
- input.onSearchComplete = function() {
- do_check_eq(controller.searchStatus,
- Ci.nsIAutoCompleteController.STATUS_COMPLETE_MATCH);
- do_check_eq(controller.matchCount, expected.length);
- for (let i = 0; i < controller.matchCount; i++) {
- print("Testing for '" + expected[i].uri.spec + "' got '" + controller.getValueAt(i) + "'");
- do_check_eq(controller.getValueAt(i), expected[i].uri.spec);
- do_check_eq(controller.getStyleAt(i), expected[i].style);
- }
-
- deferEnsureResults.resolve();
- };
-
- controller.startSearch(searchTerm);
-}
-
-/**
- * Asynchronous task that bumps up the rank for an uri.
- */
-function* task_setCountRank(aURI, aCount, aRank, aSearch, aBookmark)
-{
- // Bump up the visit count for the uri.
- let visits = [];
- for (let i = 0; i < aCount; i++) {
- visits.push({ uri: aURI, visitDate: d1, transition: TRANSITION_TYPED });
- }
- yield PlacesTestUtils.addVisits(visits);
-
- // Make a nsIAutoCompleteController and friends for instrumentation feedback.
- let thing = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteInput,
- Ci.nsIAutoCompletePopup,
- Ci.nsIAutoCompleteController]),
- get popup() {
- return thing;
- },
- get controller() {
- return thing;
- },
- popupOpen: true,
- selectedIndex: 0,
- getValueAt: function() {
- return aURI.spec;
- },
- searchString: aSearch
- };
-
- // Bump up the instrumentation feedback.
- for (let i = 0; i < aRank; i++) {
- Services.obs.notifyObservers(thing, "autocomplete-will-enter-text", null);
- }
-
- // If this is supposed to be a bookmark, add it.
- if (aBookmark) {
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- aURI,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "test_book");
-
- // And add the tag if we need to.
- if (aBookmark == "tag") {
- PlacesUtils.tagging.tagURI(aURI, ["test_tag"]);
- }
- }
-}
-
-/**
- * Decay the adaptive entries by sending the daily idle topic.
- */
-function doAdaptiveDecay()
-{
- PlacesUtils.history.runInBatchMode({
- runBatched: function() {
- for (let i = 0; i < 10; i++) {
- PlacesUtils.history.QueryInterface(Ci.nsIObserver)
- .observe(null, "idle-daily", null);
- }
- }
- }, this);
-}
-
-var uri1 = uri("http://site.tld/1");
-var uri2 = uri("http://site.tld/2");
-
-// d1 is some date for the page visit
-var d1 = new Date(Date.now() - 1000 * 60 * 60) * 1000;
-// c1 is larger (should show up higher) than c2
-var c1 = 10;
-var c2 = 1;
-// s1 is a partial match of s2
-var s0 = "";
-var s1 = "si";
-var s2 = "site";
-
-var observer = {
- results: null,
- search: null,
- runCount: -1,
- observe: function(aSubject, aTopic, aData)
- {
- if (--this.runCount > 0)
- return;
- ensure_results(this.results, this.search);
- }
-};
-Services.obs.addObserver(observer, PlacesUtils.TOPIC_FEEDBACK_UPDATED, false);
-
-/**
- * Make the result object for a given URI that will be passed to ensure_results.
- */
-function makeResult(aURI, aStyle = "favicon") {
- return {
- uri: aURI,
- style: aStyle,
- };
-}
-
-var tests = [
- // Test things without a search term.
- function*() {
- print("Test 0 same count, diff rank, same term; no search");
- observer.results = [
- makeResult(uri1),
- makeResult(uri2),
- ];
- observer.search = s0;
- observer.runCount = c1 + c2;
- yield task_setCountRank(uri1, c1, c1, s2);
- yield task_setCountRank(uri2, c1, c2, s2);
- },
- function*() {
- print("Test 1 same count, diff rank, same term; no search");
- observer.results = [
- makeResult(uri2),
- makeResult(uri1),
- ];
- observer.search = s0;
- observer.runCount = c1 + c2;
- yield task_setCountRank(uri1, c1, c2, s2);
- yield task_setCountRank(uri2, c1, c1, s2);
- },
- function*() {
- print("Test 2 diff count, same rank, same term; no search");
- observer.results = [
- makeResult(uri1),
- makeResult(uri2),
- ];
- observer.search = s0;
- observer.runCount = c1 + c1;
- yield task_setCountRank(uri1, c1, c1, s2);
- yield task_setCountRank(uri2, c2, c1, s2);
- },
- function*() {
- print("Test 3 diff count, same rank, same term; no search");
- observer.results = [
- makeResult(uri2),
- makeResult(uri1),
- ];
- observer.search = s0;
- observer.runCount = c1 + c1;
- yield task_setCountRank(uri1, c2, c1, s2);
- yield task_setCountRank(uri2, c1, c1, s2);
- },
-
- // Test things with a search term (exact match one, partial other).
- function*() {
- print("Test 4 same count, same rank, diff term; one exact/one partial search");
- observer.results = [
- makeResult(uri1),
- makeResult(uri2),
- ];
- observer.search = s1;
- observer.runCount = c1 + c1;
- yield task_setCountRank(uri1, c1, c1, s1);
- yield task_setCountRank(uri2, c1, c1, s2);
- },
- function*() {
- print("Test 5 same count, same rank, diff term; one exact/one partial search");
- observer.results = [
- makeResult(uri2),
- makeResult(uri1),
- ];
- observer.search = s1;
- observer.runCount = c1 + c1;
- yield task_setCountRank(uri1, c1, c1, s2);
- yield task_setCountRank(uri2, c1, c1, s1);
- },
-
- // Test things with a search term (exact match both).
- function*() {
- print("Test 6 same count, diff rank, same term; both exact search");
- observer.results = [
- makeResult(uri1),
- makeResult(uri2),
- ];
- observer.search = s1;
- observer.runCount = c1 + c2;
- yield task_setCountRank(uri1, c1, c1, s1);
- yield task_setCountRank(uri2, c1, c2, s1);
- },
- function*() {
- print("Test 7 same count, diff rank, same term; both exact search");
- observer.results = [
- makeResult(uri2),
- makeResult(uri1),
- ];
- observer.search = s1;
- observer.runCount = c1 + c2;
- yield task_setCountRank(uri1, c1, c2, s1);
- yield task_setCountRank(uri2, c1, c1, s1);
- },
-
- // Test things with a search term (partial match both).
- function*() {
- print("Test 8 same count, diff rank, same term; both partial search");
- observer.results = [
- makeResult(uri1),
- makeResult(uri2),
- ];
- observer.search = s1;
- observer.runCount = c1 + c2;
- yield task_setCountRank(uri1, c1, c1, s2);
- yield task_setCountRank(uri2, c1, c2, s2);
- },
- function*() {
- print("Test 9 same count, diff rank, same term; both partial search");
- observer.results = [
- makeResult(uri2),
- makeResult(uri1),
- ];
- observer.search = s1;
- observer.runCount = c1 + c2;
- yield task_setCountRank(uri1, c1, c2, s2);
- yield task_setCountRank(uri2, c1, c1, s2);
- },
- function*() {
- print("Test 10 same count, same rank, same term, decay first; exact match");
- observer.results = [
- makeResult(uri2),
- makeResult(uri1),
- ];
- observer.search = s1;
- observer.runCount = c1 + c1;
- yield task_setCountRank(uri1, c1, c1, s1);
- doAdaptiveDecay();
- yield task_setCountRank(uri2, c1, c1, s1);
- },
- function*() {
- print("Test 11 same count, same rank, same term, decay second; exact match");
- observer.results = [
- makeResult(uri1),
- makeResult(uri2),
- ];
- observer.search = s1;
- observer.runCount = c1 + c1;
- yield task_setCountRank(uri2, c1, c1, s1);
- doAdaptiveDecay();
- yield task_setCountRank(uri1, c1, c1, s1);
- },
- // Test that bookmarks are hidden if the preferences are set right.
- function*() {
- print("Test 12 same count, diff rank, same term; no search; history only");
- Services.prefs.setBoolPref("browser.urlbar.suggest.history", true);
- Services.prefs.setBoolPref("browser.urlbar.suggest.bookmark", false);
- Services.prefs.setBoolPref("browser.urlbar.suggest.openpage", false);
- observer.results = [
- makeResult(uri1),
- makeResult(uri2),
- ];
- observer.search = s0;
- observer.runCount = c1 + c2;
- yield task_setCountRank(uri1, c1, c1, s2, "bookmark");
- yield task_setCountRank(uri2, c1, c2, s2);
- },
- // Test that tags are shown if the preferences are set right.
- function*() {
- print("Test 13 same count, diff rank, same term; no search; history only with tag");
- Services.prefs.setBoolPref("browser.urlbar.suggest.history", true);
- Services.prefs.setBoolPref("browser.urlbar.suggest.bookmark", false);
- Services.prefs.setBoolPref("browser.urlbar.suggest.openpage", false);
- observer.results = [
- makeResult(uri1, "tag"),
- makeResult(uri2),
- ];
- observer.search = s0;
- observer.runCount = c1 + c2;
- yield task_setCountRank(uri1, c1, c1, s2, "tag");
- yield task_setCountRank(uri2, c1, c2, s2);
- },
-];
-
-/**
- * This deferred object contains a promise that is resolved when the
- * ensure_results function has finished its execution.
- */
-var deferEnsureResults;
-
-/**
- * Test adaptive autocomplete.
- */
-add_task(function* test_adaptive()
-{
- // Disable autoFill for this test.
- Services.prefs.setBoolPref("browser.urlbar.autoFill", false);
- do_register_cleanup(() => Services.prefs.clearUserPref("browser.urlbar.autoFill"));
- for (let test of tests) {
- // Cleanup.
- PlacesUtils.bookmarks.removeFolderChildren(PlacesUtils.unfiledBookmarksFolderId);
- PlacesUtils.bookmarks.removeFolderChildren(PlacesUtils.tagsFolderId);
- observer.runCount = -1;
-
- let types = ["history", "bookmark", "openpage"];
- for (let type of types) {
- Services.prefs.clearUserPref("browser.urlbar.suggest." + type);
- }
-
- yield PlacesTestUtils.clearHistory();
-
- deferEnsureResults = Promise.defer();
- yield test();
- yield deferEnsureResults.promise;
- }
-
- Services.obs.removeObserver(observer, PlacesUtils.TOPIC_FEEDBACK_UPDATED);
-});
diff --git a/toolkit/components/places/tests/unit/test_adaptive_bug527311.js b/toolkit/components/places/tests/unit/test_adaptive_bug527311.js
deleted file mode 100644
index 024553bba5..0000000000
--- a/toolkit/components/places/tests/unit/test_adaptive_bug527311.js
+++ /dev/null
@@ -1,141 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-const TEST_URL = "http://adapt.mozilla.org/";
-const SEARCH_STRING = "adapt";
-const SUGGEST_TYPES = ["history", "bookmark", "openpage"];
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-var hs = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
-var bs = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
-var os = Cc["@mozilla.org/observer-service;1"].
- getService(Ci.nsIObserverService);
-var ps = Cc["@mozilla.org/preferences-service;1"].
- getService(Ci.nsIPrefBranch);
-
-const PLACES_AUTOCOMPLETE_FEEDBACK_UPDATED_TOPIC =
- "places-autocomplete-feedback-updated";
-
-function cleanup() {
- for (let type of SUGGEST_TYPES) {
- ps.clearUserPref("browser.urlbar.suggest." + type);
- }
-}
-
-function AutoCompleteInput(aSearches) {
- this.searches = aSearches;
-}
-AutoCompleteInput.prototype = {
- constructor: AutoCompleteInput,
- searches: null,
- minResultsForPopup: 0,
- timeout: 10,
- searchParam: "",
- textValue: "",
- disableAutoComplete: false,
- completeDefaultIndex: false,
-
- get searchCount() {
- return this.searches.length;
- },
-
- getSearchAt: function ACI_getSearchAt(aIndex) {
- return this.searches[aIndex];
- },
-
- onSearchComplete: function ACI_onSearchComplete() {},
-
- popupOpen: false,
-
- popup: {
- setSelectedIndex: function() {},
- invalidate: function() {},
-
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompletePopup))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
- },
-
- onSearchBegin: function() {},
-
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompleteInput))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
-}
-
-
-function check_results() {
- let controller = Cc["@mozilla.org/autocomplete/controller;1"].
- getService(Ci.nsIAutoCompleteController);
- let input = new AutoCompleteInput(["unifiedcomplete"]);
- controller.input = input;
-
- input.onSearchComplete = function() {
- do_check_eq(controller.searchStatus,
- Ci.nsIAutoCompleteController.STATUS_COMPLETE_NO_MATCH);
- do_check_eq(controller.matchCount, 0);
-
- PlacesUtils.bookmarks.eraseEverything().then(() => {
- cleanup();
- do_test_finished();
- });
- };
-
- controller.startSearch(SEARCH_STRING);
-}
-
-
-function addAdaptiveFeedback(aUrl, aSearch, aCallback) {
- let observer = {
- observe: function(aSubject, aTopic, aData) {
- os.removeObserver(observer, PLACES_AUTOCOMPLETE_FEEDBACK_UPDATED_TOPIC);
- do_timeout(0, aCallback);
- }
- };
- os.addObserver(observer, PLACES_AUTOCOMPLETE_FEEDBACK_UPDATED_TOPIC, false);
-
- let thing = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteInput,
- Ci.nsIAutoCompletePopup,
- Ci.nsIAutoCompleteController]),
- get popup() { return thing; },
- get controller() { return thing; },
- popupOpen: true,
- selectedIndex: 0,
- getValueAt: () => aUrl,
- searchString: aSearch
- };
-
- os.notifyObservers(thing, "autocomplete-will-enter-text", null);
-}
-
-
-function run_test() {
- do_test_pending();
-
- // Add a bookmark to our 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) {
- type == "history" ? ps.setBoolPref("browser.urlbar.suggest." + type, true)
- : ps.setBoolPref("browser.urlbar.suggest." + type, false);
- }
-
- // Add an adaptive entry.
- addAdaptiveFeedback(TEST_URL, SEARCH_STRING, check_results);
-}
diff --git a/toolkit/components/places/tests/unit/test_analyze.js b/toolkit/components/places/tests/unit/test_analyze.js
deleted file mode 100644
index 456270101e..0000000000
--- a/toolkit/components/places/tests/unit/test_analyze.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Tests sqlite_sta1 table exists, it should be created by analyze.
-// Since the bookmark roots are created when the DB is created (bug 704855),
-// the table will contain data.
-
-function run_test() {
- do_test_pending();
-
- let stmt = DBConn().createAsyncStatement(
- "SELECT ROWID FROM sqlite_stat1"
- );
- stmt.executeAsync({
- _gotResult: false,
- handleResult: function(aResultSet) {
- this._gotResult = true;
- },
- handleError: function(aError) {
- do_throw("Unexpected error (" + aError.result + "): " + aError.message);
- },
- handleCompletion: function(aReason) {
- do_check_true(this._gotResult);
- do_test_finished();
- }
- });
- stmt.finalize();
-}
diff --git a/toolkit/components/places/tests/unit/test_annotations.js b/toolkit/components/places/tests/unit/test_annotations.js
deleted file mode 100644
index a37d7e6c9f..0000000000
--- a/toolkit/components/places/tests/unit/test_annotations.js
+++ /dev/null
@@ -1,363 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-// Get bookmark service
-try {
- var bmsvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].getService(Ci.nsINavBookmarksService);
-} catch (ex) {
- do_throw("Could not get nav-bookmarks-service\n");
-}
-
-// Get annotation service
-try {
- var annosvc= Cc["@mozilla.org/browser/annotation-service;1"].getService(Ci.nsIAnnotationService);
-} catch (ex) {
- do_throw("Could not get annotation service\n");
-}
-
-var annoObserver = {
- PAGE_lastSet_URI: "",
- PAGE_lastSet_AnnoName: "",
-
- onPageAnnotationSet: function(aURI, aName) {
- this.PAGE_lastSet_URI = aURI.spec;
- this.PAGE_lastSet_AnnoName = aName;
- },
-
- ITEM_lastSet_Id: -1,
- ITEM_lastSet_AnnoName: "",
- onItemAnnotationSet: function(aItemId, aName) {
- this.ITEM_lastSet_Id = aItemId;
- this.ITEM_lastSet_AnnoName = aName;
- },
-
- PAGE_lastRemoved_URI: "",
- PAGE_lastRemoved_AnnoName: "",
- onPageAnnotationRemoved: function(aURI, aName) {
- this.PAGE_lastRemoved_URI = aURI.spec;
- this.PAGE_lastRemoved_AnnoName = aName;
- },
-
- ITEM_lastRemoved_Id: -1,
- ITEM_lastRemoved_AnnoName: "",
- onItemAnnotationRemoved: function(aItemId, aName) {
- this.ITEM_lastRemoved_Id = aItemId;
- this.ITEM_lastRemoved_AnnoName = aName;
- }
-};
-
-// main
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_execute()
-{
- var testURI = uri("http://mozilla.com/");
- var testItemId = bmsvc.insertBookmark(bmsvc.bookmarksMenuFolder, testURI, -1, "");
- var testAnnoName = "moz-test-places/annotations";
- var testAnnoVal = "test";
-
- annosvc.addObserver(annoObserver);
- // create new string annotation
- try {
- annosvc.setPageAnnotation(testURI, testAnnoName, testAnnoVal, 0, 0);
- } catch (ex) {
- do_throw("unable to add page-annotation");
- }
- do_check_eq(annoObserver.PAGE_lastSet_URI, testURI.spec);
- do_check_eq(annoObserver.PAGE_lastSet_AnnoName, testAnnoName);
-
- // get string annotation
- do_check_true(annosvc.pageHasAnnotation(testURI, testAnnoName));
- var storedAnnoVal = annosvc.getPageAnnotation(testURI, testAnnoName);
- do_check_true(testAnnoVal === storedAnnoVal);
- // string item-annotation
- try {
- var lastModified = bmsvc.getItemLastModified(testItemId);
- // Verify that lastModified equals dateAdded before we set the annotation.
- do_check_eq(lastModified, bmsvc.getItemDateAdded(testItemId));
- // Workaround possible VM timers issues moving last modified to the past.
- bmsvc.setItemLastModified(testItemId, --lastModified);
- annosvc.setItemAnnotation(testItemId, testAnnoName, testAnnoVal, 0, 0);
- var lastModified2 = bmsvc.getItemLastModified(testItemId);
- // verify that setting the annotation updates the last modified time
- do_check_true(lastModified2 > lastModified);
- } catch (ex) {
- do_throw("unable to add item annotation");
- }
- do_check_eq(annoObserver.ITEM_lastSet_Id, testItemId);
- do_check_eq(annoObserver.ITEM_lastSet_AnnoName, testAnnoName);
-
- try {
- var annoVal = annosvc.getItemAnnotation(testItemId, testAnnoName);
- // verify the anno value
- do_check_true(testAnnoVal === annoVal);
- } catch (ex) {
- do_throw("unable to get item annotation");
- }
-
- // test getPagesWithAnnotation
- var uri2 = uri("http://www.tests.tld");
- yield PlacesTestUtils.addVisits(uri2);
- annosvc.setPageAnnotation(uri2, testAnnoName, testAnnoVal, 0, 0);
- var pages = annosvc.getPagesWithAnnotation(testAnnoName);
- do_check_eq(pages.length, 2);
- // Don't rely on the order
- do_check_false(pages[0].equals(pages[1]));
- do_check_true(pages[0].equals(testURI) || pages[1].equals(testURI));
- do_check_true(pages[0].equals(uri2) || pages[1].equals(uri2));
-
- // test getItemsWithAnnotation
- var testItemId2 = bmsvc.insertBookmark(bmsvc.bookmarksMenuFolder, uri2, -1, "");
- annosvc.setItemAnnotation(testItemId2, testAnnoName, testAnnoVal, 0, 0);
- var items = annosvc.getItemsWithAnnotation(testAnnoName);
- do_check_eq(items.length, 2);
- // Don't rely on the order
- do_check_true(items[0] != items[1]);
- do_check_true(items[0] == testItemId || items[1] == testItemId);
- do_check_true(items[0] == testItemId2 || items[1] == testItemId2);
-
- // get annotation that doesn't exist
- try {
- annosvc.getPageAnnotation(testURI, "blah");
- do_throw("fetching page-annotation that doesn't exist, should've thrown");
- } catch (ex) {}
- try {
- annosvc.getItemAnnotation(testURI, "blah");
- do_throw("fetching item-annotation that doesn't exist, should've thrown");
- } catch (ex) {}
-
- // get annotation info
- var flags = {}, exp = {}, storageType = {};
- annosvc.getPageAnnotationInfo(testURI, testAnnoName, flags, exp, storageType);
- do_check_eq(flags.value, 0);
- do_check_eq(exp.value, 0);
- do_check_eq(storageType.value, Ci.nsIAnnotationService.TYPE_STRING);
- annosvc.getItemAnnotationInfo(testItemId, testAnnoName, flags, exp, storageType);
- do_check_eq(flags.value, 0);
- do_check_eq(exp.value, 0);
- do_check_eq(storageType.value, Ci.nsIAnnotationService.TYPE_STRING);
-
- // get annotation names for a uri
- var annoNames = annosvc.getPageAnnotationNames(testURI);
- do_check_eq(annoNames.length, 1);
- do_check_eq(annoNames[0], "moz-test-places/annotations");
-
- // get annotation names for an item
- annoNames = annosvc.getItemAnnotationNames(testItemId);
- do_check_eq(annoNames.length, 1);
- do_check_eq(annoNames[0], "moz-test-places/annotations");
-
- // copy annotations to another uri
- var newURI = uri("http://mozilla.org");
- yield PlacesTestUtils.addVisits(newURI);
- annosvc.setPageAnnotation(testURI, "oldAnno", "new", 0, 0);
- annosvc.setPageAnnotation(newURI, "oldAnno", "old", 0, 0);
- annoNames = annosvc.getPageAnnotationNames(newURI);
- do_check_eq(annoNames.length, 1);
- do_check_eq(annoNames[0], "oldAnno");
- var oldAnnoNames = annosvc.getPageAnnotationNames(testURI);
- do_check_eq(oldAnnoNames.length, 2);
- var copiedAnno = oldAnnoNames[0];
- annosvc.copyPageAnnotations(testURI, newURI, false);
- var newAnnoNames = annosvc.getPageAnnotationNames(newURI);
- do_check_eq(newAnnoNames.length, 2);
- do_check_true(annosvc.pageHasAnnotation(newURI, "oldAnno"));
- do_check_true(annosvc.pageHasAnnotation(newURI, copiedAnno));
- do_check_eq(annosvc.getPageAnnotation(newURI, "oldAnno"), "old");
- annosvc.setPageAnnotation(newURI, "oldAnno", "new", 0, 0);
- annosvc.copyPageAnnotations(testURI, newURI, true);
- newAnnoNames = annosvc.getPageAnnotationNames(newURI);
- do_check_eq(newAnnoNames.length, 2);
- do_check_true(annosvc.pageHasAnnotation(newURI, "oldAnno"));
- do_check_true(annosvc.pageHasAnnotation(newURI, copiedAnno));
- do_check_eq(annosvc.getPageAnnotation(newURI, "oldAnno"), "new");
-
-
- // copy annotations to another item
- newURI = uri("http://mozilla.org");
- var newItemId = bmsvc.insertBookmark(bmsvc.bookmarksMenuFolder, newURI, -1, "");
- var itemId = bmsvc.insertBookmark(bmsvc.bookmarksMenuFolder, testURI, -1, "");
- annosvc.setItemAnnotation(itemId, "oldAnno", "new", 0, 0);
- annosvc.setItemAnnotation(itemId, "testAnno", "test", 0, 0);
- annosvc.setItemAnnotation(newItemId, "oldAnno", "old", 0, 0);
- annoNames = annosvc.getItemAnnotationNames(newItemId);
- do_check_eq(annoNames.length, 1);
- do_check_eq(annoNames[0], "oldAnno");
- oldAnnoNames = annosvc.getItemAnnotationNames(itemId);
- do_check_eq(oldAnnoNames.length, 2);
- copiedAnno = oldAnnoNames[0];
- annosvc.copyItemAnnotations(itemId, newItemId, false);
- newAnnoNames = annosvc.getItemAnnotationNames(newItemId);
- do_check_eq(newAnnoNames.length, 2);
- do_check_true(annosvc.itemHasAnnotation(newItemId, "oldAnno"));
- do_check_true(annosvc.itemHasAnnotation(newItemId, copiedAnno));
- do_check_eq(annosvc.getItemAnnotation(newItemId, "oldAnno"), "old");
- annosvc.setItemAnnotation(newItemId, "oldAnno", "new", 0, 0);
- annosvc.copyItemAnnotations(itemId, newItemId, true);
- newAnnoNames = annosvc.getItemAnnotationNames(newItemId);
- do_check_eq(newAnnoNames.length, 2);
- do_check_true(annosvc.itemHasAnnotation(newItemId, "oldAnno"));
- do_check_true(annosvc.itemHasAnnotation(newItemId, copiedAnno));
- do_check_eq(annosvc.getItemAnnotation(newItemId, "oldAnno"), "new");
-
- // test int32 anno type
- var int32Key = testAnnoName + "/types/Int32";
- var int32Val = 23;
- annosvc.setPageAnnotation(testURI, int32Key, int32Val, 0, 0);
- do_check_true(annosvc.pageHasAnnotation(testURI, int32Key));
- flags = {}, exp = {}, storageType = {};
- annosvc.getPageAnnotationInfo(testURI, int32Key, flags, exp, storageType);
- do_check_eq(flags.value, 0);
- do_check_eq(exp.value, 0);
- do_check_eq(storageType.value, Ci.nsIAnnotationService.TYPE_INT32);
- var storedVal = annosvc.getPageAnnotation(testURI, int32Key);
- do_check_true(int32Val === storedVal);
- annosvc.setItemAnnotation(testItemId, int32Key, int32Val, 0, 0);
- do_check_true(annosvc.itemHasAnnotation(testItemId, int32Key));
- annosvc.getItemAnnotationInfo(testItemId, int32Key, flags, exp, storageType);
- do_check_eq(flags.value, 0);
- do_check_eq(exp.value, 0);
- storedVal = annosvc.getItemAnnotation(testItemId, int32Key);
- do_check_true(int32Val === storedVal);
-
- // test int64 anno type
- var int64Key = testAnnoName + "/types/Int64";
- var int64Val = 4294967296;
- annosvc.setPageAnnotation(testURI, int64Key, int64Val, 0, 0);
- annosvc.getPageAnnotationInfo(testURI, int64Key, flags, exp, storageType);
- do_check_eq(flags.value, 0);
- do_check_eq(exp.value, 0);
- storedVal = annosvc.getPageAnnotation(testURI, int64Key);
- do_check_true(int64Val === storedVal);
- annosvc.setItemAnnotation(testItemId, int64Key, int64Val, 0, 0);
- do_check_true(annosvc.itemHasAnnotation(testItemId, int64Key));
- annosvc.getItemAnnotationInfo(testItemId, int64Key, flags, exp, storageType);
- do_check_eq(flags.value, 0);
- do_check_eq(exp.value, 0);
- storedVal = annosvc.getItemAnnotation(testItemId, int64Key);
- do_check_true(int64Val === storedVal);
-
- // test double anno type
- var doubleKey = testAnnoName + "/types/Double";
- var doubleVal = 0.000002342;
- annosvc.setPageAnnotation(testURI, doubleKey, doubleVal, 0, 0);
- annosvc.getPageAnnotationInfo(testURI, doubleKey, flags, exp, storageType);
- do_check_eq(flags.value, 0);
- do_check_eq(exp.value, 0);
- storedVal = annosvc.getPageAnnotation(testURI, doubleKey);
- do_check_true(doubleVal === storedVal);
- annosvc.setItemAnnotation(testItemId, doubleKey, doubleVal, 0, 0);
- do_check_true(annosvc.itemHasAnnotation(testItemId, doubleKey));
- annosvc.getItemAnnotationInfo(testItemId, doubleKey, flags, exp, storageType);
- do_check_eq(flags.value, 0);
- do_check_eq(exp.value, 0);
- do_check_eq(storageType.value, Ci.nsIAnnotationService.TYPE_DOUBLE);
- storedVal = annosvc.getItemAnnotation(testItemId, doubleKey);
- do_check_true(doubleVal === storedVal);
-
- // test annotation removal
- annosvc.removePageAnnotation(testURI, int32Key);
-
- annosvc.setItemAnnotation(testItemId, testAnnoName, testAnnoVal, 0, 0);
- // verify that removing an annotation updates the last modified date
- var lastModified3 = bmsvc.getItemLastModified(testItemId);
- // Workaround possible VM timers issues moving last modified to the past.
- bmsvc.setItemLastModified(testItemId, --lastModified3);
- annosvc.removeItemAnnotation(testItemId, int32Key);
- var lastModified4 = bmsvc.getItemLastModified(testItemId);
- do_print("verify that removing an annotation updates the last modified date");
- do_print("lastModified3 = " + lastModified3);
- do_print("lastModified4 = " + lastModified4);
- do_check_true(lastModified4 > lastModified3);
-
- do_check_eq(annoObserver.PAGE_lastRemoved_URI, testURI.spec);
- do_check_eq(annoObserver.PAGE_lastRemoved_AnnoName, int32Key);
- do_check_eq(annoObserver.ITEM_lastRemoved_Id, testItemId);
- do_check_eq(annoObserver.ITEM_lastRemoved_AnnoName, int32Key);
-
- // test that getItems/PagesWithAnnotation returns an empty array after
- // removing all items/pages which had the annotation set, see bug 380317.
- do_check_eq(annosvc.getItemsWithAnnotation(int32Key).length, 0);
- do_check_eq(annosvc.getPagesWithAnnotation(int32Key).length, 0);
-
- // Setting item annotations on invalid item ids should throw
- var invalidIds = [-1, 0, 37643];
- for (var id of invalidIds) {
- try {
- annosvc.setItemAnnotation(id, "foo", "bar", 0, 0);
- do_throw("setItemAnnotation* should throw for invalid item id: " + id)
- }
- catch (ex) { }
- }
-
- // setting an annotation with EXPIRE_HISTORY for an item should throw
- itemId = bmsvc.insertBookmark(bmsvc.bookmarksMenuFolder, testURI, -1, "");
- try {
- annosvc.setItemAnnotation(itemId, "foo", "bar", 0, annosvc.EXPIRE_WITH_HISTORY);
- do_throw("setting an item annotation with EXPIRE_HISTORY should throw");
- }
- catch (ex) {
- }
-
- annosvc.removeObserver(annoObserver);
-});
-
-add_test(function test_getAnnotationsHavingName() {
- let uri = NetUtil.newURI("http://cat.mozilla.org");
- let id = PlacesUtils.bookmarks.insertBookmark(
- PlacesUtils.unfiledBookmarksFolderId, uri,
- PlacesUtils.bookmarks.DEFAULT_INDEX, "cat");
- let fid = PlacesUtils.bookmarks.createFolder(
- PlacesUtils.unfiledBookmarksFolderId, "pillow",
- PlacesUtils.bookmarks.DEFAULT_INDEX);
-
- const ANNOS = {
- "int": 7,
- "double": 7.7,
- "string": "seven"
- };
- for (let name in ANNOS) {
- PlacesUtils.annotations.setPageAnnotation(
- uri, name, ANNOS[name], 0,
- PlacesUtils.annotations.EXPIRE_SESSION);
- PlacesUtils.annotations.setItemAnnotation(
- id, name, ANNOS[name], 0,
- PlacesUtils.annotations.EXPIRE_SESSION);
- PlacesUtils.annotations.setItemAnnotation(
- fid, name, ANNOS[name], 0,
- PlacesUtils.annotations.EXPIRE_SESSION);
- }
-
- for (let name in ANNOS) {
- let results = PlacesUtils.annotations.getAnnotationsWithName(name);
- do_check_eq(results.length, 3);
-
- for (let result of results) {
- do_check_eq(result.annotationName, name);
- do_check_eq(result.annotationValue, ANNOS[name]);
- if (result.uri)
- do_check_true(result.uri.equals(uri));
- else
- do_check_true(result.itemId > 0);
-
- if (result.itemId != -1) {
- if (result.uri)
- do_check_eq(result.itemId, id);
- else
- do_check_eq(result.itemId, fid);
- do_check_guid_for_bookmark(result.itemId, result.guid);
- }
- else {
- do_check_guid_for_uri(result.uri, result.guid);
- }
- }
- }
-
- run_next_test();
-});
diff --git a/toolkit/components/places/tests/unit/test_asyncExecuteLegacyQueries.js b/toolkit/components/places/tests/unit/test_asyncExecuteLegacyQueries.js
deleted file mode 100644
index 7296fe0610..0000000000
--- a/toolkit/components/places/tests/unit/test_asyncExecuteLegacyQueries.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-// This is a test for asyncExecuteLegacyQueries API.
-
-var tests = [
-
-function test_history_query() {
- let uri = NetUtil.newURI("http://test.visit.mozilla.com/");
- let title = "Test visit";
- PlacesTestUtils.addVisits({ uri: uri, title: title }).then(function () {
- let options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING;
- let query = PlacesUtils.history.getNewQuery();
-
- PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
- .asyncExecuteLegacyQueries([query], 1, options, {
- handleResult: function (aResultSet) {
- for (let row; (row = aResultSet.getNextRow());) {
- try {
- do_check_eq(row.getResultByIndex(1), uri.spec);
- do_check_eq(row.getResultByIndex(2), title);
- } catch (e) {
- do_throw("Error while fetching page data.");
- }
- }
- },
- handleError: function (aError) {
- do_throw("Async execution error (" + aError.result + "): " + aError.message);
- },
- handleCompletion: function (aReason) {
- run_next_test();
- },
- });
- });
-},
-
-function test_bookmarks_query() {
- let uri = NetUtil.newURI("http://test.bookmark.mozilla.com/");
- let title = "Test bookmark";
- bookmark(uri, title);
- let options = PlacesUtils.history.getNewQueryOptions();
- options.sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_LASMODIFIED_DESCENDING;
- options.queryType = options.QUERY_TYPE_BOOKMARKS;
- let query = PlacesUtils.history.getNewQuery();
-
- PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
- .asyncExecuteLegacyQueries([query], 1, options, {
- handleResult: function (aResultSet) {
- for (let row; (row = aResultSet.getNextRow());) {
- try {
- do_check_eq(row.getResultByIndex(1), uri.spec);
- do_check_eq(row.getResultByIndex(2), title);
- } catch (e) {
- do_throw("Error while fetching page data.");
- }
- }
- },
- handleError: function (aError) {
- do_throw("Async execution error (" + aError.result + "): " + aError.message);
- },
- handleCompletion: function (aReason) {
- run_next_test();
- },
- });
-},
-
-];
-
-function bookmark(aURI, aTitle)
-{
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- aURI,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- aTitle);
-}
-
-function run_test()
-{
- do_test_pending();
- run_next_test();
-}
-
-function run_next_test() {
- if (tests.length == 0) {
- do_test_finished();
- return;
- }
-
- Promise.all([
- PlacesTestUtils.clearHistory(),
- PlacesUtils.bookmarks.eraseEverything()
- ]).then(tests.shift());
-}
diff --git a/toolkit/components/places/tests/unit/test_async_history_api.js b/toolkit/components/places/tests/unit/test_async_history_api.js
deleted file mode 100644
index a012fcda2d..0000000000
--- a/toolkit/components/places/tests/unit/test_async_history_api.js
+++ /dev/null
@@ -1,1118 +0,0 @@
-/**
- * This file tests the async history API exposed by mozIAsyncHistory.
- */
-
-// Globals
-
-const TEST_DOMAIN = "http://mozilla.org/";
-const URI_VISIT_SAVED = "uri-visit-saved";
-const RECENT_EVENT_THRESHOLD = 15 * 60 * 1000000;
-
-// Helpers
-/**
- * Object that represents a mozIVisitInfo object.
- *
- * @param [optional] aTransitionType
- * The transition type of the visit. Defaults to TRANSITION_LINK if not
- * provided.
- * @param [optional] aVisitTime
- * The time of the visit. Defaults to now if not provided.
- */
-function VisitInfo(aTransitionType,
- aVisitTime) {
- this.transitionType =
- aTransitionType === undefined ? TRANSITION_LINK : aTransitionType;
- this.visitDate = aVisitTime || Date.now() * 1000;
-}
-
-function promiseUpdatePlaces(aPlaces) {
- return new Promise((resolve, reject) => {
- PlacesUtils.asyncHistory.updatePlaces(aPlaces, {
- _errors: [],
- _results: [],
- handleError(aResultCode, aPlace) {
- this._errors.push({ resultCode: aResultCode, info: aPlace});
- },
- handleResult(aPlace) {
- this._results.push(aPlace);
- },
- handleCompletion() {
- resolve({ errors: this._errors, results: this._results });
- }
- });
- });
-}
-
-/**
- * Listens for a title change notification, and calls aCallback when it gets it.
- *
- * @param aURI
- * The URI of the page we expect a notification for.
- * @param aExpectedTitle
- * The expected title of the URI we expect a notification for.
- * @param aCallback
- * The method to call when we have gotten the proper notification about
- * the title changing.
- */
-function TitleChangedObserver(aURI,
- aExpectedTitle,
- aCallback) {
- this.uri = aURI;
- this.expectedTitle = aExpectedTitle;
- this.callback = aCallback;
-}
-TitleChangedObserver.prototype = {
- __proto__: NavHistoryObserver.prototype,
- onTitleChanged(aURI, aTitle, aGUID) {
- do_print("onTitleChanged(" + aURI.spec + ", " + aTitle + ", " + aGUID + ")");
- if (!this.uri.equals(aURI)) {
- return;
- }
- do_check_eq(aTitle, this.expectedTitle);
- do_check_guid_for_uri(aURI, aGUID);
- this.callback();
- },
-};
-
-/**
- * Listens for a visit notification, and calls aCallback when it gets it.
- *
- * @param aURI
- * The URI of the page we expect a notification for.
- * @param aCallback
- * The method to call when we have gotten the proper notification about
- * being visited.
- */
-function VisitObserver(aURI,
- aGUID,
- aCallback)
-{
- this.uri = aURI;
- this.guid = aGUID;
- this.callback = aCallback;
-}
-VisitObserver.prototype = {
- __proto__: NavHistoryObserver.prototype,
- onVisit: function(aURI,
- aVisitId,
- aTime,
- aSessionId,
- aReferringId,
- aTransitionType,
- aGUID)
- {
- do_print("onVisit(" + aURI.spec + ", " + aVisitId + ", " + aTime +
- ", " + aSessionId + ", " + aReferringId + ", " +
- aTransitionType + ", " + aGUID + ")");
- if (!this.uri.equals(aURI) || this.guid != aGUID) {
- return;
- }
- this.callback(aTime, aTransitionType);
- },
-};
-
-/**
- * Tests that a title was set properly in the database.
- *
- * @param aURI
- * The uri to check.
- * @param aTitle
- * The expected title in the database.
- */
-function do_check_title_for_uri(aURI,
- aTitle)
-{
- let stack = Components.stack.caller;
- let stmt = DBConn().createStatement(
- `SELECT title
- FROM moz_places
- WHERE url_hash = hash(:url) AND url = :url`
- );
- stmt.params.url = aURI.spec;
- do_check_true(stmt.executeStep(), stack);
- do_check_eq(stmt.row.title, aTitle, stack);
- stmt.finalize();
-}
-
-// Test Functions
-
-add_task(function* test_interface_exists() {
- let history = Cc["@mozilla.org/browser/history;1"].getService(Ci.nsISupports);
- do_check_true(history instanceof Ci.mozIAsyncHistory);
-});
-
-add_task(function* test_invalid_uri_throws() {
- // First, test passing in nothing.
- let place = {
- visits: [
- new VisitInfo(),
- ],
- };
- try {
- yield promiseUpdatePlaces(place);
- do_throw("Should have thrown!");
- }
- catch (e) {
- do_check_eq(e.result, Cr.NS_ERROR_INVALID_ARG);
- }
-
- // Now, test other bogus things.
- const TEST_VALUES = [
- null,
- undefined,
- {},
- [],
- TEST_DOMAIN + "test_invalid_id_throws",
- ];
- for (let i = 0; i < TEST_VALUES.length; i++) {
- place.uri = TEST_VALUES[i];
- try {
- yield promiseUpdatePlaces(place);
- do_throw("Should have thrown!");
- }
- catch (e) {
- do_check_eq(e.result, Cr.NS_ERROR_INVALID_ARG);
- }
- }
-});
-
-add_task(function* test_invalid_places_throws() {
- // First, test passing in nothing.
- try {
- PlacesUtils.asyncHistory.updatePlaces();
- do_throw("Should have thrown!");
- }
- catch (e) {
- do_check_eq(e.result, Cr.NS_ERROR_XPC_NOT_ENOUGH_ARGS);
- }
-
- // Now, test other bogus things.
- const TEST_VALUES = [
- null,
- undefined,
- {},
- [],
- "",
- ];
- for (let i = 0; i < TEST_VALUES.length; i++) {
- let value = TEST_VALUES[i];
- try {
- yield promiseUpdatePlaces(value);
- do_throw("Should have thrown!");
- }
- catch (e) {
- do_check_eq(e.result, Cr.NS_ERROR_INVALID_ARG);
- }
- }
-});
-
-add_task(function* test_invalid_guid_throws() {
- // First check invalid length guid.
- let place = {
- guid: "BAD_GUID",
- uri: NetUtil.newURI(TEST_DOMAIN + "test_invalid_guid_throws"),
- visits: [
- new VisitInfo(),
- ],
- };
- try {
- yield promiseUpdatePlaces(place);
- do_throw("Should have thrown!");
- }
- catch (e) {
- do_check_eq(e.result, Cr.NS_ERROR_INVALID_ARG);
- }
-
- // Now check invalid character guid.
- place.guid = "__BADGUID+__";
- do_check_eq(place.guid.length, 12);
- try {
- yield promiseUpdatePlaces(place);
- do_throw("Should have thrown!");
- }
- catch (e) {
- do_check_eq(e.result, Cr.NS_ERROR_INVALID_ARG);
- }
-});
-
-add_task(function* test_no_visits_throws() {
- const TEST_URI =
- NetUtil.newURI(TEST_DOMAIN + "test_no_id_or_guid_no_visits_throws");
- const TEST_GUID = "_RANDOMGUID_";
-
- let log_test_conditions = function(aPlace) {
- let str = "Testing place with " +
- (aPlace.uri ? "uri" : "no uri") + ", " +
- (aPlace.guid ? "guid" : "no guid") + ", " +
- (aPlace.visits ? "visits array" : "no visits array");
- do_print(str);
- };
-
- // Loop through every possible case. Note that we don't actually care about
- // the case where we have no uri, place id, or guid (covered by another test),
- // but it is easier to just make sure it too throws than to exclude it.
- let place = { };
- for (let uri = 1; uri >= 0; uri--) {
- place.uri = uri ? TEST_URI : undefined;
-
- for (let guid = 1; guid >= 0; guid--) {
- place.guid = guid ? TEST_GUID : undefined;
-
- for (let visits = 1; visits >= 0; visits--) {
- place.visits = visits ? [] : undefined;
-
- log_test_conditions(place);
- try {
- yield promiseUpdatePlaces(place);
- do_throw("Should have thrown!");
- }
- catch (e) {
- do_check_eq(e.result, Cr.NS_ERROR_INVALID_ARG);
- }
- }
- }
- }
-});
-
-add_task(function* test_add_visit_no_date_throws() {
- let place = {
- uri: NetUtil.newURI(TEST_DOMAIN + "test_add_visit_no_date_throws"),
- visits: [
- new VisitInfo(),
- ],
- };
- delete place.visits[0].visitDate;
- try {
- yield promiseUpdatePlaces(place);
- do_throw("Should have thrown!");
- }
- catch (e) {
- do_check_eq(e.result, Cr.NS_ERROR_INVALID_ARG);
- }
-});
-
-add_task(function* test_add_visit_no_transitionType_throws() {
- let place = {
- uri: NetUtil.newURI(TEST_DOMAIN + "test_add_visit_no_transitionType_throws"),
- visits: [
- new VisitInfo(),
- ],
- };
- delete place.visits[0].transitionType;
- try {
- yield promiseUpdatePlaces(place);
- do_throw("Should have thrown!");
- }
- catch (e) {
- do_check_eq(e.result, Cr.NS_ERROR_INVALID_ARG);
- }
-});
-
-add_task(function* test_add_visit_invalid_transitionType_throws() {
- // First, test something that has a transition type lower than the first one.
- let place = {
- uri: NetUtil.newURI(TEST_DOMAIN +
- "test_add_visit_invalid_transitionType_throws"),
- visits: [
- new VisitInfo(TRANSITION_LINK - 1),
- ],
- };
- try {
- yield promiseUpdatePlaces(place);
- do_throw("Should have thrown!");
- }
- catch (e) {
- do_check_eq(e.result, Cr.NS_ERROR_INVALID_ARG);
- }
-
- // Now, test something that has a transition type greater than the last one.
- place.visits[0] = new VisitInfo(TRANSITION_RELOAD + 1);
- try {
- yield promiseUpdatePlaces(place);
- do_throw("Should have thrown!");
- }
- catch (e) {
- do_check_eq(e.result, Cr.NS_ERROR_INVALID_ARG);
- }
-});
-
-add_task(function* test_non_addable_uri_errors() {
- // Array of protocols that nsINavHistoryService::canAddURI returns false for.
- const URLS = [
- "about:config",
- "imap://cyrus.andrew.cmu.edu/archive.imap",
- "news://new.mozilla.org/mozilla.dev.apps.firefox",
- "mailbox:Inbox",
- "moz-anno:favicon:http://mozilla.org/made-up-favicon",
- "view-source:http://mozilla.org",
- "chrome://browser/content/browser.xul",
- "resource://gre-resources/hiddenWindow.html",
- "data:,Hello%2C%20World!",
- "wyciwyg:/0/http://mozilla.org",
- "javascript:alert('hello wolrd!');",
- "blob:foo",
- ];
- let places = [];
- URLS.forEach(function(url) {
- try {
- let place = {
- uri: NetUtil.newURI(url),
- title: "test for " + url,
- visits: [
- new VisitInfo(),
- ],
- };
- places.push(place);
- }
- catch (e) {
- if (e.result != Cr.NS_ERROR_FAILURE) {
- throw e;
- }
- // NetUtil.newURI() can throw if e.g. our app knows about imap://
- // but the account is not set up and so the URL is invalid for us.
- // Note this in the log but ignore as it's not the subject of this test.
- do_print("Could not construct URI for '" + url + "'; ignoring");
- }
- });
-
- let placesResult = yield promiseUpdatePlaces(places);
- if (placesResult.results.length > 0) {
- do_throw("Unexpected success.");
- }
- for (let place of placesResult.errors) {
- do_print("Checking '" + place.info.uri.spec + "'");
- do_check_eq(place.resultCode, Cr.NS_ERROR_INVALID_ARG);
- do_check_false(yield promiseIsURIVisited(place.info.uri));
- }
- yield PlacesTestUtils.promiseAsyncUpdates();
-});
-
-add_task(function* test_duplicate_guid_errors() {
- // This test ensures that trying to add a visit, with a guid already found in
- // another visit, fails.
- let place = {
- uri: NetUtil.newURI(TEST_DOMAIN + "test_duplicate_guid_fails_first"),
- visits: [
- new VisitInfo(),
- ],
- };
-
- do_check_false(yield promiseIsURIVisited(place.uri));
- let placesResult = yield promiseUpdatePlaces(place);
- if (placesResult.errors.length > 0) {
- do_throw("Unexpected error.");
- }
- let placeInfo = placesResult.results[0];
- do_check_true(yield promiseIsURIVisited(placeInfo.uri));
-
- let badPlace = {
- uri: NetUtil.newURI(TEST_DOMAIN + "test_duplicate_guid_fails_second"),
- visits: [
- new VisitInfo(),
- ],
- guid: placeInfo.guid,
- };
-
- do_check_false(yield promiseIsURIVisited(badPlace.uri));
- placesResult = yield promiseUpdatePlaces(badPlace);
- if (placesResult.results.length > 0) {
- do_throw("Unexpected success.");
- }
- let badPlaceInfo = placesResult.errors[0];
- do_check_eq(badPlaceInfo.resultCode, Cr.NS_ERROR_STORAGE_CONSTRAINT);
- do_check_false(yield promiseIsURIVisited(badPlaceInfo.info.uri));
-
- yield PlacesTestUtils.promiseAsyncUpdates();
-});
-
-add_task(function* test_invalid_referrerURI_ignored() {
- let place = {
- uri: NetUtil.newURI(TEST_DOMAIN +
- "test_invalid_referrerURI_ignored"),
- visits: [
- new VisitInfo(),
- ],
- };
- place.visits[0].referrerURI = NetUtil.newURI(place.uri.spec + "_unvisistedURI");
- do_check_false(yield promiseIsURIVisited(place.uri));
- do_check_false(yield promiseIsURIVisited(place.visits[0].referrerURI));
-
- let placesResult = yield promiseUpdatePlaces(place);
- if (placesResult.errors.length > 0) {
- do_throw("Unexpected error.");
- }
- let placeInfo = placesResult.results[0];
- do_check_true(yield promiseIsURIVisited(placeInfo.uri));
-
- // Check to make sure we do not visit the invalid referrer.
- do_check_false(yield promiseIsURIVisited(place.visits[0].referrerURI));
-
- // Check to make sure from_visit is zero in database.
- let stmt = DBConn().createStatement(
- `SELECT from_visit
- FROM moz_historyvisits
- WHERE id = :visit_id`
- );
- stmt.params.visit_id = placeInfo.visits[0].visitId;
- do_check_true(stmt.executeStep());
- do_check_eq(stmt.row.from_visit, 0);
- stmt.finalize();
-
- yield PlacesTestUtils.promiseAsyncUpdates();
-});
-
-add_task(function* test_nonnsIURI_referrerURI_ignored() {
- let place = {
- uri: NetUtil.newURI(TEST_DOMAIN +
- "test_nonnsIURI_referrerURI_ignored"),
- visits: [
- new VisitInfo(),
- ],
- };
- place.visits[0].referrerURI = place.uri.spec + "_nonnsIURI";
- do_check_false(yield promiseIsURIVisited(place.uri));
-
- let placesResult = yield promiseUpdatePlaces(place);
- if (placesResult.errors.length > 0) {
- do_throw("Unexpected error.");
- }
- let placeInfo = placesResult.results[0];
- do_check_true(yield promiseIsURIVisited(placeInfo.uri));
-
- // Check to make sure from_visit is zero in database.
- let stmt = DBConn().createStatement(
- `SELECT from_visit
- FROM moz_historyvisits
- WHERE id = :visit_id`
- );
- stmt.params.visit_id = placeInfo.visits[0].visitId;
- do_check_true(stmt.executeStep());
- do_check_eq(stmt.row.from_visit, 0);
- stmt.finalize();
-
- yield PlacesTestUtils.promiseAsyncUpdates();
-});
-
-add_task(function* test_old_referrer_ignored() {
- // This tests that a referrer for a visit which is not recent (specifically,
- // older than 15 minutes as per RECENT_EVENT_THRESHOLD) is not saved by
- // updatePlaces.
- let oldTime = (Date.now() * 1000) - (RECENT_EVENT_THRESHOLD + 1);
- let referrerPlace = {
- uri: NetUtil.newURI(TEST_DOMAIN + "test_old_referrer_ignored_referrer"),
- visits: [
- new VisitInfo(TRANSITION_LINK, oldTime),
- ],
- };
-
- // First we must add our referrer to the history so that it is not ignored
- // as being invalid.
- do_check_false(yield promiseIsURIVisited(referrerPlace.uri));
- let placesResult = yield promiseUpdatePlaces(referrerPlace);
- if (placesResult.errors.length > 0) {
- do_throw("Unexpected error.");
- }
-
- // Now that the referrer is added, we can add a page with a valid
- // referrer to determine if the recency of the referrer is taken into
- // account.
- do_check_true(yield promiseIsURIVisited(referrerPlace.uri));
-
- let visitInfo = new VisitInfo();
- visitInfo.referrerURI = referrerPlace.uri;
- let place = {
- uri: NetUtil.newURI(TEST_DOMAIN + "test_old_referrer_ignored_page"),
- visits: [
- visitInfo,
- ],
- };
-
- do_check_false(yield promiseIsURIVisited(place.uri));
- placesResult = yield promiseUpdatePlaces(place);
- if (placesResult.errors.length > 0) {
- do_throw("Unexpected error.");
- }
- let placeInfo = placesResult.results[0];
- do_check_true(yield promiseIsURIVisited(place.uri));
-
- // Though the visit will not contain the referrer, we must examine the
- // database to be sure.
- do_check_eq(placeInfo.visits[0].referrerURI, null);
- let stmt = DBConn().createStatement(
- `SELECT COUNT(1) AS count
- FROM moz_historyvisits
- JOIN moz_places h ON h.id = place_id
- WHERE url_hash = hash(:page_url) AND url = :page_url
- AND from_visit = 0`
- );
- stmt.params.page_url = place.uri.spec;
- do_check_true(stmt.executeStep());
- do_check_eq(stmt.row.count, 1);
- stmt.finalize();
-
- yield PlacesTestUtils.promiseAsyncUpdates();
-});
-
-add_task(function* test_place_id_ignored() {
- let place = {
- uri: NetUtil.newURI(TEST_DOMAIN + "test_place_id_ignored_first"),
- visits: [
- new VisitInfo(),
- ],
- };
-
- do_check_false(yield promiseIsURIVisited(place.uri));
- let placesResult = yield promiseUpdatePlaces(place);
- if (placesResult.errors.length > 0) {
- do_throw("Unexpected error.");
- }
- let placeInfo = placesResult.results[0];
- do_check_true(yield promiseIsURIVisited(place.uri));
-
- let placeId = placeInfo.placeId;
- do_check_neq(placeId, 0);
-
- let badPlace = {
- uri: NetUtil.newURI(TEST_DOMAIN + "test_place_id_ignored_second"),
- visits: [
- new VisitInfo(),
- ],
- placeId: placeId,
- };
-
- do_check_false(yield promiseIsURIVisited(badPlace.uri));
- placesResult = yield promiseUpdatePlaces(badPlace);
- if (placesResult.errors.length > 0) {
- do_throw("Unexpected error.");
- }
- placeInfo = placesResult.results[0];
-
- do_check_neq(placeInfo.placeId, placeId);
- do_check_true(yield promiseIsURIVisited(badPlace.uri));
-
- yield PlacesTestUtils.promiseAsyncUpdates();
-});
-
-add_task(function* test_handleCompletion_called_when_complete() {
- // We test a normal visit, and embeded visit, and a uri that would fail
- // the canAddURI test to make sure that the notification happens after *all*
- // of them have had a callback.
- let places = [
- { uri: NetUtil.newURI(TEST_DOMAIN +
- "test_handleCompletion_called_when_complete"),
- visits: [
- new VisitInfo(),
- new VisitInfo(TRANSITION_EMBED),
- ],
- },
- { uri: NetUtil.newURI("data:,Hello%2C%20World!"),
- visits: [
- new VisitInfo(),
- ],
- },
- ];
- do_check_false(yield promiseIsURIVisited(places[0].uri));
- do_check_false(yield promiseIsURIVisited(places[1].uri));
-
- const EXPECTED_COUNT_SUCCESS = 2;
- const EXPECTED_COUNT_FAILURE = 1;
-
- let {results, errors} = yield promiseUpdatePlaces(places);
-
- do_check_eq(results.length, EXPECTED_COUNT_SUCCESS);
- do_check_eq(errors.length, EXPECTED_COUNT_FAILURE);
-
- yield PlacesTestUtils.promiseAsyncUpdates();
-});
-
-add_task(function* test_add_visit() {
- const VISIT_TIME = Date.now() * 1000;
- let place = {
- uri: NetUtil.newURI(TEST_DOMAIN + "test_add_visit"),
- title: "test_add_visit title",
- visits: [],
- };
- for (let t in PlacesUtils.history.TRANSITIONS) {
- let transitionType = PlacesUtils.history.TRANSITIONS[t];
- place.visits.push(new VisitInfo(transitionType, VISIT_TIME));
- }
- do_check_false(yield promiseIsURIVisited(place.uri));
-
- let callbackCount = 0;
- let placesResult = yield promiseUpdatePlaces(place);
- if (placesResult.errors.length > 0) {
- do_throw("Unexpected error.");
- }
- for (let placeInfo of placesResult.results) {
- do_check_true(yield promiseIsURIVisited(place.uri));
-
- // Check mozIPlaceInfo properties.
- do_check_true(place.uri.equals(placeInfo.uri));
- do_check_eq(placeInfo.frecency, -1); // We don't pass frecency here!
- do_check_eq(placeInfo.title, place.title);
-
- // Check mozIVisitInfo properties.
- let visits = placeInfo.visits;
- do_check_eq(visits.length, 1);
- let visit = visits[0];
- do_check_eq(visit.visitDate, VISIT_TIME);
- do_check_true(Object.values(PlacesUtils.history.TRANSITIONS).includes(visit.transitionType));
- do_check_true(visit.referrerURI === null);
-
- // For TRANSITION_EMBED visits, many properties will always be zero or
- // undefined.
- if (visit.transitionType == TRANSITION_EMBED) {
- // Check mozIPlaceInfo properties.
- do_check_eq(placeInfo.placeId, 0, '//');
- do_check_eq(placeInfo.guid, null);
-
- // Check mozIVisitInfo properties.
- do_check_eq(visit.visitId, 0);
- }
- // But they should be valid for non-embed visits.
- else {
- // Check mozIPlaceInfo properties.
- do_check_true(placeInfo.placeId > 0);
- do_check_valid_places_guid(placeInfo.guid);
-
- // Check mozIVisitInfo properties.
- do_check_true(visit.visitId > 0);
- }
-
- // If we have had all of our callbacks, continue running tests.
- if (++callbackCount == place.visits.length) {
- yield PlacesTestUtils.promiseAsyncUpdates();
- }
- }
-});
-
-add_task(function* test_properties_saved() {
- // Check each transition type to make sure it is saved properly.
- let places = [];
- for (let t in PlacesUtils.history.TRANSITIONS) {
- let transitionType = PlacesUtils.history.TRANSITIONS[t];
- let place = {
- uri: NetUtil.newURI(TEST_DOMAIN + "test_properties_saved/" +
- transitionType),
- title: "test_properties_saved test",
- visits: [
- new VisitInfo(transitionType),
- ],
- };
- do_check_false(yield promiseIsURIVisited(place.uri));
- places.push(place);
- }
-
- let callbackCount = 0;
- let placesResult = yield promiseUpdatePlaces(places);
- if (placesResult.errors.length > 0) {
- do_throw("Unexpected error.");
- }
- for (let placeInfo of placesResult.results) {
- let uri = placeInfo.uri;
- do_check_true(yield promiseIsURIVisited(uri));
- let visit = placeInfo.visits[0];
- print("TEST-INFO | test_properties_saved | updatePlaces callback for " +
- "transition type " + visit.transitionType);
-
- // Note that TRANSITION_EMBED should not be in the database.
- const EXPECTED_COUNT = visit.transitionType == TRANSITION_EMBED ? 0 : 1;
-
- // mozIVisitInfo::date
- let stmt = DBConn().createStatement(
- `SELECT COUNT(1) AS count
- FROM moz_places h
- JOIN moz_historyvisits v
- ON h.id = v.place_id
- WHERE h.url_hash = hash(:page_url) AND h.url = :page_url
- AND v.visit_date = :visit_date`
- );
- stmt.params.page_url = uri.spec;
- stmt.params.visit_date = visit.visitDate;
- do_check_true(stmt.executeStep());
- do_check_eq(stmt.row.count, EXPECTED_COUNT);
- stmt.finalize();
-
- // mozIVisitInfo::transitionType
- stmt = DBConn().createStatement(
- `SELECT COUNT(1) AS count
- FROM moz_places h
- JOIN moz_historyvisits v
- ON h.id = v.place_id
- WHERE h.url_hash = hash(:page_url) AND h.url = :page_url
- AND v.visit_type = :transition_type`
- );
- stmt.params.page_url = uri.spec;
- stmt.params.transition_type = visit.transitionType;
- do_check_true(stmt.executeStep());
- do_check_eq(stmt.row.count, EXPECTED_COUNT);
- stmt.finalize();
-
- // mozIPlaceInfo::title
- stmt = DBConn().createStatement(
- `SELECT COUNT(1) AS count
- FROM moz_places h
- WHERE h.url_hash = hash(:page_url) AND h.url = :page_url
- AND h.title = :title`
- );
- stmt.params.page_url = uri.spec;
- stmt.params.title = placeInfo.title;
- do_check_true(stmt.executeStep());
- do_check_eq(stmt.row.count, EXPECTED_COUNT);
- stmt.finalize();
-
- // If we have had all of our callbacks, continue running tests.
- if (++callbackCount == places.length) {
- yield PlacesTestUtils.promiseAsyncUpdates();
- }
- }
-});
-
-add_task(function* test_guid_saved() {
- let place = {
- uri: NetUtil.newURI(TEST_DOMAIN + "test_guid_saved"),
- guid: "__TESTGUID__",
- visits: [
- new VisitInfo(),
- ],
- };
- do_check_valid_places_guid(place.guid);
- do_check_false(yield promiseIsURIVisited(place.uri));
-
- let placesResult = yield promiseUpdatePlaces(place);
- if (placesResult.errors.length > 0) {
- do_throw("Unexpected error.");
- }
- let placeInfo = placesResult.results[0];
- let uri = placeInfo.uri;
- do_check_true(yield promiseIsURIVisited(uri));
- do_check_eq(placeInfo.guid, place.guid);
- do_check_guid_for_uri(uri, place.guid);
- yield PlacesTestUtils.promiseAsyncUpdates();
-});
-
-add_task(function* test_referrer_saved() {
- let places = [
- { uri: NetUtil.newURI(TEST_DOMAIN + "test_referrer_saved/referrer"),
- visits: [
- new VisitInfo(),
- ],
- },
- { uri: NetUtil.newURI(TEST_DOMAIN + "test_referrer_saved/test"),
- visits: [
- new VisitInfo(),
- ],
- },
- ];
- places[1].visits[0].referrerURI = places[0].uri;
- do_check_false(yield promiseIsURIVisited(places[0].uri));
- do_check_false(yield promiseIsURIVisited(places[1].uri));
-
- let resultCount = 0;
- let placesResult = yield promiseUpdatePlaces(places);
- if (placesResult.errors.length > 0) {
- do_throw("Unexpected error.");
- }
- for (let placeInfo of placesResult.results) {
- let uri = placeInfo.uri;
- do_check_true(yield promiseIsURIVisited(uri));
- let visit = placeInfo.visits[0];
-
- // We need to insert all of our visits before we can test conditions.
- if (++resultCount == places.length) {
- do_check_true(places[0].uri.equals(visit.referrerURI));
-
- let stmt = DBConn().createStatement(
- `SELECT COUNT(1) AS count
- FROM moz_historyvisits
- JOIN moz_places h ON h.id = place_id
- WHERE url_hash = hash(:page_url) AND url = :page_url
- AND from_visit = (
- SELECT v.id
- FROM moz_historyvisits v
- JOIN moz_places h ON h.id = place_id
- WHERE url_hash = hash(:referrer) AND url = :referrer
- )`
- );
- stmt.params.page_url = uri.spec;
- stmt.params.referrer = visit.referrerURI.spec;
- do_check_true(stmt.executeStep());
- do_check_eq(stmt.row.count, 1);
- stmt.finalize();
-
- yield PlacesTestUtils.promiseAsyncUpdates();
- }
- }
-});
-
-add_task(function* test_guid_change_saved() {
- // First, add a visit for it.
- let place = {
- uri: NetUtil.newURI(TEST_DOMAIN + "test_guid_change_saved"),
- visits: [
- new VisitInfo(),
- ],
- };
- do_check_false(yield promiseIsURIVisited(place.uri));
-
- let placesResult = yield promiseUpdatePlaces(place);
- if (placesResult.errors.length > 0) {
- do_throw("Unexpected error.");
- }
- // Then, change the guid with visits.
- place.guid = "_GUIDCHANGE_";
- place.visits = [new VisitInfo()];
- placesResult = yield promiseUpdatePlaces(place);
- if (placesResult.errors.length > 0) {
- do_throw("Unexpected error.");
- }
- do_check_guid_for_uri(place.uri, place.guid);
-
- yield PlacesTestUtils.promiseAsyncUpdates();
-});
-
-add_task(function* test_title_change_saved() {
- // First, add a visit for it.
- let place = {
- uri: NetUtil.newURI(TEST_DOMAIN + "test_title_change_saved"),
- title: "original title",
- visits: [
- new VisitInfo(),
- ],
- };
- do_check_false(yield promiseIsURIVisited(place.uri));
-
- let placesResult = yield promiseUpdatePlaces(place);
- if (placesResult.errors.length > 0) {
- do_throw("Unexpected error.");
- }
-
- // Now, make sure the empty string clears the title.
- place.title = "";
- place.visits = [new VisitInfo()];
- placesResult = yield promiseUpdatePlaces(place);
- if (placesResult.errors.length > 0) {
- do_throw("Unexpected error.");
- }
- do_check_title_for_uri(place.uri, null);
-
- // Then, change the title with visits.
- place.title = "title change";
- place.visits = [new VisitInfo()];
- placesResult = yield promiseUpdatePlaces(place);
- if (placesResult.errors.length > 0) {
- do_throw("Unexpected error.");
- }
- do_check_title_for_uri(place.uri, place.title);
-
- // Lastly, check that the title is cleared if we set it to null.
- place.title = null;
- place.visits = [new VisitInfo()];
- placesResult = yield promiseUpdatePlaces(place);
- if (placesResult.errors.length > 0) {
- do_throw("Unexpected error.");
- }
- do_check_title_for_uri(place.uri, place.title);
-
- yield PlacesTestUtils.promiseAsyncUpdates();
-});
-
-add_task(function* test_no_title_does_not_clear_title() {
- const TITLE = "test title";
- // First, add a visit for it.
- let place = {
- uri: NetUtil.newURI(TEST_DOMAIN + "test_no_title_does_not_clear_title"),
- title: TITLE,
- visits: [
- new VisitInfo(),
- ],
- };
- do_check_false(yield promiseIsURIVisited(place.uri));
-
- let placesResult = yield promiseUpdatePlaces(place);
- if (placesResult.errors.length > 0) {
- do_throw("Unexpected error.");
- }
- // Now, make sure that not specifying a title does not clear it.
- delete place.title;
- place.visits = [new VisitInfo()];
- placesResult = yield promiseUpdatePlaces(place);
- if (placesResult.errors.length > 0) {
- do_throw("Unexpected error.");
- }
- do_check_title_for_uri(place.uri, TITLE);
-
- yield PlacesTestUtils.promiseAsyncUpdates();
-});
-
-add_task(function* test_title_change_notifies() {
- // There are three cases to test. The first case is to make sure we do not
- // get notified if we do not specify a title.
- let place = {
- uri: NetUtil.newURI(TEST_DOMAIN + "test_title_change_notifies"),
- visits: [
- new VisitInfo(),
- ],
- };
- do_check_false(yield promiseIsURIVisited(place.uri));
-
- let silentObserver =
- new TitleChangedObserver(place.uri, "DO NOT WANT", function() {
- do_throw("unexpected callback!");
- });
-
- PlacesUtils.history.addObserver(silentObserver, false);
- let placesResult = yield promiseUpdatePlaces(place);
- if (placesResult.errors.length > 0) {
- do_throw("Unexpected error.");
- }
-
- // The second case to test is that we get the notification when we add
- // it for the first time. The first case will fail before our callback if it
- // is busted, so we can do this now.
- place.uri = NetUtil.newURI(place.uri.spec + "/new-visit-with-title");
- place.title = "title 1";
- function promiseTitleChangedObserver(aPlace) {
- return new Promise((resolve, reject) => {
- let callbackCount = 0;
- let observer = new TitleChangedObserver(aPlace.uri, aPlace.title, function() {
- switch (++callbackCount) {
- case 1:
- // The third case to test is to make sure we get a notification when
- // we change an existing place.
- observer.expectedTitle = place.title = "title 2";
- place.visits = [new VisitInfo()];
- PlacesUtils.asyncHistory.updatePlaces(place);
- break;
- case 2:
- PlacesUtils.history.removeObserver(silentObserver);
- PlacesUtils.history.removeObserver(observer);
- resolve();
- break;
- }
- });
-
- PlacesUtils.history.addObserver(observer, false);
- PlacesUtils.asyncHistory.updatePlaces(aPlace);
- });
- }
-
- yield promiseTitleChangedObserver(place);
- yield PlacesTestUtils.promiseAsyncUpdates();
-});
-
-add_task(function* test_visit_notifies() {
- // There are two observers we need to see for each visit. One is an
- // nsINavHistoryObserver and the other is the uri-visit-saved observer topic.
- let place = {
- guid: "abcdefghijkl",
- uri: NetUtil.newURI(TEST_DOMAIN + "test_visit_notifies"),
- visits: [
- new VisitInfo(),
- ],
- };
- do_check_false(yield promiseIsURIVisited(place.uri));
-
- function promiseVisitObserver(aPlace) {
- return new Promise((resolve, reject) => {
- let callbackCount = 0;
- let finisher = function() {
- if (++callbackCount == 2) {
- resolve();
- }
- }
- let visitObserver = new VisitObserver(place.uri, place.guid,
- function(aVisitDate,
- aTransitionType) {
- let visit = place.visits[0];
- do_check_eq(visit.visitDate, aVisitDate);
- do_check_eq(visit.transitionType, aTransitionType);
-
- PlacesUtils.history.removeObserver(visitObserver);
- finisher();
- });
- PlacesUtils.history.addObserver(visitObserver, false);
- let observer = function(aSubject, aTopic, aData) {
- do_print("observe(" + aSubject + ", " + aTopic + ", " + aData + ")");
- do_check_true(aSubject instanceof Ci.nsIURI);
- do_check_true(aSubject.equals(place.uri));
-
- Services.obs.removeObserver(observer, URI_VISIT_SAVED);
- finisher();
- };
- Services.obs.addObserver(observer, URI_VISIT_SAVED, false);
- PlacesUtils.asyncHistory.updatePlaces(place);
- });
- }
-
- yield promiseVisitObserver(place);
- yield PlacesTestUtils.promiseAsyncUpdates();
-});
-
-// test with empty mozIVisitInfoCallback object
-add_task(function* test_callbacks_not_supplied() {
- const URLS = [
- "imap://cyrus.andrew.cmu.edu/archive.imap", // bad URI
- "http://mozilla.org/" // valid URI
- ];
- let places = [];
- URLS.forEach(function(url) {
- try {
- let place = {
- uri: NetUtil.newURI(url),
- title: "test for " + url,
- visits: [
- new VisitInfo(),
- ],
- };
- places.push(place);
- }
- catch (e) {
- if (e.result != Cr.NS_ERROR_FAILURE) {
- throw e;
- }
- // NetUtil.newURI() can throw if e.g. our app knows about imap://
- // but the account is not set up and so the URL is invalid for us.
- // Note this in the log but ignore as it's not the subject of this test.
- do_print("Could not construct URI for '" + url + "'; ignoring");
- }
- });
-
- PlacesUtils.asyncHistory.updatePlaces(places, {});
- yield PlacesTestUtils.promiseAsyncUpdates();
-});
-
-// Test that we don't wrongly overwrite typed and hidden when adding new visits.
-add_task(function* test_typed_hidden_not_overwritten() {
- yield PlacesTestUtils.clearHistory();
- let places = [
- { uri: NetUtil.newURI("http://mozilla.org/"),
- title: "test",
- visits: [
- new VisitInfo(TRANSITION_TYPED),
- new VisitInfo(TRANSITION_LINK)
- ]
- },
- { uri: NetUtil.newURI("http://mozilla.org/"),
- title: "test",
- visits: [
- new VisitInfo(TRANSITION_FRAMED_LINK)
- ]
- },
- ];
- yield promiseUpdatePlaces(places);
-
- let db = yield PlacesUtils.promiseDBConnection();
- let rows = yield db.execute(
- "SELECT hidden, typed FROM moz_places WHERE url_hash = hash(:url) AND url = :url",
- { url: "http://mozilla.org/" });
- Assert.equal(rows[0].getResultByName("typed"), 1,
- "The page should be marked as typed");
- Assert.equal(rows[0].getResultByName("hidden"), 0,
- "The page should be marked as not hidden");
-});
-
-function run_test()
-{
- run_next_test();
-}
diff --git a/toolkit/components/places/tests/unit/test_async_in_batchmode.js b/toolkit/components/places/tests/unit/test_async_in_batchmode.js
deleted file mode 100644
index b39b26519d..0000000000
--- a/toolkit/components/places/tests/unit/test_async_in_batchmode.js
+++ /dev/null
@@ -1,55 +0,0 @@
-// This is testing the frankenstein situation Sync forces Places into.
-// Sync does runInBatchMode() and before the callback returns the Places async
-// APIs are used (either by Sync itself, or by any other code in the system)
-// As seen in bug 1197856 and bug 1190131.
-
-Cu.import("resource://gre/modules/PlacesUtils.jsm");
-
-// This function "waits" for a promise to resolve by spinning a nested event
-// loop.
-function waitForPromise(promise) {
- let thread = Cc["@mozilla.org/thread-manager;1"].getService().currentThread;
-
- let finalResult, finalException;
-
- promise.then(result => {
- finalResult = result;
- }, err => {
- finalException = err;
- });
-
- // Keep waiting until our callback is triggered (unless the app is quitting).
- while (!finalResult && !finalException) {
- thread.processNextEvent(true);
- }
- if (finalException) {
- throw finalException;
- }
- return finalResult;
-}
-
-add_test(function() {
- let testCompleted = false;
- PlacesUtils.bookmarks.runInBatchMode({
- runBatched() {
- // create a bookmark.
- let info = { parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "http://example.com/" };
- let insertPromise = PlacesUtils.bookmarks.insert(info);
- let bookmark = waitForPromise(insertPromise);
- // Check we got a bookmark (bookmark creation failed completely in
- // bug 1190131)
- equal(bookmark.url, info.url);
- // Check the promiseItemGuid and promiseItemId helpers - failure in these
- // was the underlying reason for the failure.
- let id = waitForPromise(PlacesUtils.promiseItemId(bookmark.guid));
- let guid = waitForPromise(PlacesUtils.promiseItemGuid(id));
- equal(guid, bookmark.guid, "id and guid round-tripped correctly");
- testCompleted = true;
- }
- }, null);
- // make sure we tested what we think we tested.
- ok(testCompleted);
- run_next_test();
-});
diff --git a/toolkit/components/places/tests/unit/test_async_transactions.js b/toolkit/components/places/tests/unit/test_async_transactions.js
deleted file mode 100644
index edc9abf870..0000000000
--- a/toolkit/components/places/tests/unit/test_async_transactions.js
+++ /dev/null
@@ -1,1739 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-const bmsvc = PlacesUtils.bookmarks;
-const tagssvc = PlacesUtils.tagging;
-const annosvc = PlacesUtils.annotations;
-const PT = PlacesTransactions;
-const rootGuid = PlacesUtils.bookmarks.rootGuid;
-
-Components.utils.importGlobalProperties(["URL"]);
-
-// Create and add bookmarks observer.
-var observer = {
- __proto__: NavBookmarkObserver.prototype,
-
- tagRelatedGuids: new Set(),
-
- reset: function () {
- this.itemsAdded = new Map();
- this.itemsRemoved = new Map();
- this.itemsChanged = new Map();
- this.itemsMoved = new Map();
- this.beginUpdateBatch = false;
- this.endUpdateBatch = false;
- },
-
- onBeginUpdateBatch: function () {
- this.beginUpdateBatch = true;
- },
-
- onEndUpdateBatch: function () {
- this.endUpdateBatch = true;
- },
-
- onItemAdded:
- function (aItemId, aParentId, aIndex, aItemType, aURI, aTitle, aDateAdded,
- aGuid, aParentGuid) {
- // Ignore tag items.
- if (aParentId == PlacesUtils.tagsFolderId ||
- (aParentId != PlacesUtils.placesRootId &&
- bmsvc.getFolderIdForItem(aParentId) == PlacesUtils.tagsFolderId)) {
- this.tagRelatedGuids.add(aGuid);
- return;
- }
-
- this.itemsAdded.set(aGuid, { itemId: aItemId
- , parentGuid: aParentGuid
- , index: aIndex
- , itemType: aItemType
- , title: aTitle
- , url: aURI });
- },
-
- onItemRemoved:
- function (aItemId, aParentId, aIndex, aItemType, aURI, aGuid, aParentGuid) {
- if (this.tagRelatedGuids.has(aGuid))
- return;
-
- this.itemsRemoved.set(aGuid, { parentGuid: aParentGuid
- , index: aIndex
- , itemType: aItemType });
- },
-
- onItemChanged:
- function (aItemId, aProperty, aIsAnnoProperty, aNewValue, aLastModified,
- aItemType, aParentId, aGuid, aParentGuid) {
- if (this.tagRelatedGuids.has(aGuid))
- return;
-
- let changesForGuid = this.itemsChanged.get(aGuid);
- if (changesForGuid === undefined) {
- changesForGuid = new Map();
- this.itemsChanged.set(aGuid, changesForGuid);
- }
-
- let newValue = aNewValue;
- if (aIsAnnoProperty) {
- if (annosvc.itemHasAnnotation(aItemId, aProperty))
- newValue = annosvc.getItemAnnotation(aItemId, aProperty);
- else
- newValue = null;
- }
- let change = { isAnnoProperty: aIsAnnoProperty
- , newValue: newValue
- , lastModified: aLastModified
- , itemType: aItemType };
- changesForGuid.set(aProperty, change);
- },
-
- onItemVisited: () => {},
-
- onItemMoved:
- function (aItemId, aOldParent, aOldIndex, aNewParent, aNewIndex, aItemType,
- aGuid, aOldParentGuid, aNewParentGuid) {
- this.itemsMoved.set(aGuid, { oldParentGuid: aOldParentGuid
- , oldIndex: aOldIndex
- , newParentGuid: aNewParentGuid
- , newIndex: aNewIndex
- , itemType: aItemType });
- }
-};
-observer.reset();
-
-// index at which items should begin
-var bmStartIndex = 0;
-
-function run_test() {
- bmsvc.addObserver(observer, false);
- do_register_cleanup(function () {
- bmsvc.removeObserver(observer);
- });
-
- run_next_test();
-}
-
-function sanityCheckTransactionHistory() {
- do_check_true(PT.undoPosition <= PT.length);
-
- let check_entry_throws = f => {
- try {
- f();
- do_throw("PT.entry should throw for invalid input");
- } catch (ex) {}
- };
- check_entry_throws( () => PT.entry(-1) );
- check_entry_throws( () => PT.entry({}) );
- check_entry_throws( () => PT.entry(PT.length) );
-
- if (PT.undoPosition < PT.length)
- do_check_eq(PT.topUndoEntry, PT.entry(PT.undoPosition));
- else
- do_check_null(PT.topUndoEntry);
- if (PT.undoPosition > 0)
- do_check_eq(PT.topRedoEntry, PT.entry(PT.undoPosition - 1));
- else
- do_check_null(PT.topRedoEntry);
-}
-
-function getTransactionsHistoryState() {
- let history = [];
- for (let i = 0; i < PT.length; i++) {
- history.push(PT.entry(i));
- }
- return [history, PT.undoPosition];
-}
-
-function ensureUndoState(aExpectedEntries = [], aExpectedUndoPosition = 0) {
- // ensureUndoState is called in various places during this test, so it's
- // a good places to sanity-check the transaction-history APIs in all
- // cases.
- sanityCheckTransactionHistory();
-
- let [actualEntries, actualUndoPosition] = getTransactionsHistoryState();
- do_check_eq(actualEntries.length, aExpectedEntries.length);
- do_check_eq(actualUndoPosition, aExpectedUndoPosition);
-
- function checkEqualEntries(aExpectedEntry, aActualEntry) {
- do_check_eq(aExpectedEntry.length, aActualEntry.length);
- aExpectedEntry.forEach( (t, i) => do_check_eq(t, aActualEntry[i]) );
- }
- aExpectedEntries.forEach( (e, i) => checkEqualEntries(e, actualEntries[i]) );
-}
-
-function ensureItemsAdded(...items) {
- Assert.equal(observer.itemsAdded.size, items.length);
- for (let item of items) {
- Assert.ok(observer.itemsAdded.has(item.guid));
- let info = observer.itemsAdded.get(item.guid);
- Assert.equal(info.parentGuid, item.parentGuid);
- for (let propName of ["title", "index", "itemType"]) {
- if (propName in item)
- Assert.equal(info[propName], item[propName]);
- }
- if ("url" in item)
- Assert.ok(info.url.equals(item.url));
- }
-}
-
-function ensureItemsRemoved(...items) {
- Assert.equal(observer.itemsRemoved.size, items.length);
- for (let item of items) {
- // We accept both guids and full info object here.
- if (typeof(item) == "string") {
- Assert.ok(observer.itemsRemoved.has(item));
- }
- else {
- Assert.ok(observer.itemsRemoved.has(item.guid));
- let info = observer.itemsRemoved.get(item.guid);
- Assert.equal(info.parentGuid, item.parentGuid);
- if ("index" in item)
- Assert.equal(info.index, item.index);
- }
- }
-}
-
-function ensureItemsChanged(...items) {
- for (let item of items) {
- do_check_true(observer.itemsChanged.has(item.guid));
- let changes = observer.itemsChanged.get(item.guid);
- do_check_true(changes.has(item.property));
- let info = changes.get(item.property);
- do_check_eq(info.isAnnoProperty, Boolean(item.isAnnoProperty));
- do_check_eq(info.newValue, item.newValue);
- if ("url" in item)
- do_check_true(item.url.equals(info.url));
- }
-}
-
-function ensureAnnotationsSet(aGuid, aAnnos) {
- do_check_true(observer.itemsChanged.has(aGuid));
- let changes = observer.itemsChanged.get(aGuid);
- for (let anno of aAnnos) {
- do_check_true(changes.has(anno.name));
- let changeInfo = changes.get(anno.name);
- do_check_true(changeInfo.isAnnoProperty);
- do_check_eq(changeInfo.newValue, anno.value);
- }
-}
-
-function ensureItemsMoved(...items) {
- do_check_true(observer.itemsMoved.size, items.length);
- for (let item of items) {
- do_check_true(observer.itemsMoved.has(item.guid));
- let info = observer.itemsMoved.get(item.guid);
- do_check_eq(info.oldParentGuid, item.oldParentGuid);
- do_check_eq(info.oldIndex, item.oldIndex);
- do_check_eq(info.newParentGuid, item.newParentGuid);
- do_check_eq(info.newIndex, item.newIndex);
- }
-}
-
-function ensureTimestampsUpdated(aGuid, aCheckDateAdded = false) {
- do_check_true(observer.itemsChanged.has(aGuid));
- let changes = observer.itemsChanged.get(aGuid);
- if (aCheckDateAdded)
- do_check_true(changes.has("dateAdded"))
- do_check_true(changes.has("lastModified"));
-}
-
-function ensureTagsForURI(aURI, aTags) {
- let tagsSet = tagssvc.getTagsForURI(aURI);
- do_check_eq(tagsSet.length, aTags.length);
- do_check_true(aTags.every( t => tagsSet.includes(t)));
-}
-
-function createTestFolderInfo(aTitle = "Test Folder") {
- return { parentGuid: rootGuid, title: "Test Folder" };
-}
-
-function isLivemarkTree(aTree) {
- return !!aTree.annos &&
- aTree.annos.some( a => a.name == PlacesUtils.LMANNO_FEEDURI );
-}
-
-function* ensureLivemarkCreatedByAddLivemark(aLivemarkGuid) {
- // This throws otherwise.
- yield PlacesUtils.livemarks.getLivemark({ guid: aLivemarkGuid });
-}
-
-// Checks if two bookmark trees (as returned by promiseBookmarksTree) are the
-// same.
-// false value for aCheckParentAndPosition is ignored if aIsRestoredItem is set.
-function* ensureEqualBookmarksTrees(aOriginal,
- aNew,
- aIsRestoredItem = true,
- aCheckParentAndPosition = false) {
- // Note "id" is not-enumerable, and is therefore skipped by Object.keys (both
- // ours and the one at deepEqual). This is fine for us because ids are not
- // restored by Redo.
- if (aIsRestoredItem) {
- Assert.deepEqual(aOriginal, aNew);
- if (isLivemarkTree(aNew))
- yield ensureLivemarkCreatedByAddLivemark(aNew.guid);
- return;
- }
-
- for (let property of Object.keys(aOriginal)) {
- if (property == "children") {
- Assert.equal(aOriginal.children.length, aNew.children.length);
- for (let i = 0; i < aOriginal.children.length; i++) {
- yield ensureEqualBookmarksTrees(aOriginal.children[i],
- aNew.children[i],
- false,
- true);
- }
- }
- else if (property == "guid") {
- // guid shouldn't be copied if the item was not restored.
- Assert.notEqual(aOriginal.guid, aNew.guid);
- }
- else if (property == "dateAdded") {
- // dateAdded shouldn't be copied if the item was not restored.
- Assert.ok(is_time_ordered(aOriginal.dateAdded, aNew.dateAdded));
- }
- else if (property == "lastModified") {
- // same same, except for the never-changed case
- if (!aOriginal.lastModified)
- Assert.ok(!aNew.lastModified);
- else
- Assert.ok(is_time_ordered(aOriginal.lastModified, aNew.lastModified));
- }
- else if (aCheckParentAndPosition ||
- (property != "parentGuid" && property != "index")) {
- Assert.deepEqual(aOriginal[property], aNew[property]);
- }
- }
-
- if (isLivemarkTree(aNew))
- yield ensureLivemarkCreatedByAddLivemark(aNew.guid);
-}
-
-function* ensureBookmarksTreeRestoredCorrectly(...aOriginalBookmarksTrees) {
- for (let originalTree of aOriginalBookmarksTrees) {
- let restoredTree =
- yield PlacesUtils.promiseBookmarksTree(originalTree.guid);
- yield ensureEqualBookmarksTrees(originalTree, restoredTree);
- }
-}
-
-function* ensureNonExistent(...aGuids) {
- for (let guid of aGuids) {
- Assert.strictEqual((yield PlacesUtils.promiseBookmarksTree(guid)), null);
- }
-}
-
-add_task(function* test_recycled_transactions() {
- function* ensureTransactThrowsFor(aTransaction) {
- let [txns, undoPosition] = getTransactionsHistoryState();
- try {
- yield aTransaction.transact();
- do_throw("Shouldn't be able to use the same transaction twice");
- }
- catch (ex) { }
- ensureUndoState(txns, undoPosition);
- }
-
- let txn_a = PT.NewFolder(createTestFolderInfo());
- yield txn_a.transact();
- ensureUndoState([[txn_a]], 0);
- yield ensureTransactThrowsFor(txn_a);
-
- yield PT.undo();
- ensureUndoState([[txn_a]], 1);
- ensureTransactThrowsFor(txn_a);
-
- yield PT.clearTransactionsHistory();
- ensureUndoState();
- ensureTransactThrowsFor(txn_a);
-
- let txn_b = PT.NewFolder(createTestFolderInfo());
- yield PT.batch(function* () {
- try {
- yield txn_a.transact();
- do_throw("Shouldn't be able to use the same transaction twice");
- }
- catch (ex) { }
- ensureUndoState();
- yield txn_b.transact();
- });
- ensureUndoState([[txn_b]], 0);
-
- yield PT.undo();
- ensureUndoState([[txn_b]], 1);
- ensureTransactThrowsFor(txn_a);
- ensureTransactThrowsFor(txn_b);
-
- yield PT.clearTransactionsHistory();
- ensureUndoState();
- observer.reset();
-});
-
-add_task(function* test_new_folder_with_annotation() {
- const ANNO = { name: "TestAnno", value: "TestValue" };
- let folder_info = createTestFolderInfo();
- folder_info.index = bmStartIndex;
- folder_info.annotations = [ANNO];
- ensureUndoState();
- let txn = PT.NewFolder(folder_info);
- folder_info.guid = yield txn.transact();
- let ensureDo = function* (aRedo = false) {
- ensureUndoState([[txn]], 0);
- yield ensureItemsAdded(folder_info);
- ensureAnnotationsSet(folder_info.guid, [ANNO]);
- if (aRedo)
- ensureTimestampsUpdated(folder_info.guid, true);
- observer.reset();
- };
-
- let ensureUndo = () => {
- ensureUndoState([[txn]], 1);
- ensureItemsRemoved({ guid: folder_info.guid
- , parentGuid: folder_info.parentGuid
- , index: bmStartIndex });
- observer.reset();
- };
-
- yield ensureDo();
- yield PT.undo();
- yield ensureUndo();
- yield PT.redo();
- yield ensureDo(true);
- yield PT.undo();
- ensureUndo();
- yield PT.clearTransactionsHistory();
- ensureUndoState();
-});
-
-add_task(function* test_new_bookmark() {
- let bm_info = { parentGuid: rootGuid
- , url: NetUtil.newURI("http://test_create_item.com")
- , index: bmStartIndex
- , title: "Test creating an item" };
-
- ensureUndoState();
- let txn = PT.NewBookmark(bm_info);
- bm_info.guid = yield txn.transact();
-
- let ensureDo = function* (aRedo = false) {
- ensureUndoState([[txn]], 0);
- yield ensureItemsAdded(bm_info);
- if (aRedo)
- ensureTimestampsUpdated(bm_info.guid, true);
- observer.reset();
- };
- let ensureUndo = () => {
- ensureUndoState([[txn]], 1);
- ensureItemsRemoved({ guid: bm_info.guid
- , parentGuid: bm_info.parentGuid
- , index: bmStartIndex });
- observer.reset();
- };
-
- yield ensureDo();
- yield PT.undo();
- ensureUndo();
- yield PT.redo(true);
- yield ensureDo();
- yield PT.undo();
- ensureUndo();
-
- yield PT.clearTransactionsHistory();
- ensureUndoState();
-});
-
-add_task(function* test_merge_create_folder_and_item() {
- let folder_info = createTestFolderInfo();
- let bm_info = { url: NetUtil.newURI("http://test_create_item_to_folder.com")
- , title: "Test Bookmark"
- , index: bmStartIndex };
-
- let [folderTxnResult, bkmTxnResult] = yield PT.batch(function* () {
- let folderTxn = PT.NewFolder(folder_info);
- folder_info.guid = bm_info.parentGuid = yield folderTxn.transact();
- let bkmTxn = PT.NewBookmark(bm_info);
- bm_info.guid = yield bkmTxn.transact();
- return [folderTxn, bkmTxn];
- });
-
- let ensureDo = function* () {
- ensureUndoState([[bkmTxnResult, folderTxnResult]], 0);
- yield ensureItemsAdded(folder_info, bm_info);
- observer.reset();
- };
-
- let ensureUndo = () => {
- ensureUndoState([[bkmTxnResult, folderTxnResult]], 1);
- ensureItemsRemoved(folder_info, bm_info);
- observer.reset();
- };
-
- yield ensureDo();
- yield PT.undo();
- ensureUndo();
- yield PT.redo();
- yield ensureDo();
- yield PT.undo();
- ensureUndo();
-
- yield PT.clearTransactionsHistory();
- ensureUndoState();
-});
-
-add_task(function* test_move_items_to_folder() {
- let folder_a_info = createTestFolderInfo("Folder A");
- let bkm_a_info = { url: new URL("http://test_move_items.com")
- , title: "Bookmark A" };
- let bkm_b_info = { url: NetUtil.newURI("http://test_move_items.com")
- , title: "Bookmark B" };
-
- // Test moving items within the same folder.
- let [folder_a_txn_result, bkm_a_txn_result, bkm_b_txn_result] = yield PT.batch(function* () {
- let folder_a_txn = PT.NewFolder(folder_a_info);
-
- folder_a_info.guid = bkm_a_info.parentGuid = bkm_b_info.parentGuid =
- yield folder_a_txn.transact();
- let bkm_a_txn = PT.NewBookmark(bkm_a_info);
- bkm_a_info.guid = yield bkm_a_txn.transact();
- let bkm_b_txn = PT.NewBookmark(bkm_b_info);
- bkm_b_info.guid = yield bkm_b_txn.transact();
- return [folder_a_txn, bkm_a_txn, bkm_b_txn];
- });
-
- ensureUndoState([[bkm_b_txn_result, bkm_a_txn_result, folder_a_txn_result]], 0);
-
- let moveTxn = PT.Move({ guid: bkm_a_info.guid
- , newParentGuid: folder_a_info.guid });
- yield moveTxn.transact();
-
- let ensureDo = () => {
- ensureUndoState([[moveTxn], [bkm_b_txn_result, bkm_a_txn_result, folder_a_txn_result]], 0);
- ensureItemsMoved({ guid: bkm_a_info.guid
- , oldParentGuid: folder_a_info.guid
- , newParentGuid: folder_a_info.guid
- , oldIndex: 0
- , newIndex: 1 });
- observer.reset();
- };
- let ensureUndo = () => {
- ensureUndoState([[moveTxn], [bkm_b_txn_result, bkm_a_txn_result, folder_a_txn_result]], 1);
- ensureItemsMoved({ guid: bkm_a_info.guid
- , oldParentGuid: folder_a_info.guid
- , newParentGuid: folder_a_info.guid
- , oldIndex: 1
- , newIndex: 0 });
- observer.reset();
- };
-
- ensureDo();
- yield PT.undo();
- ensureUndo();
- yield PT.redo();
- ensureDo();
- yield PT.undo();
- ensureUndo();
-
- yield PT.clearTransactionsHistory(false, true);
- ensureUndoState([[bkm_b_txn_result, bkm_a_txn_result, folder_a_txn_result]], 0);
-
- // Test moving items between folders.
- let folder_b_info = createTestFolderInfo("Folder B");
- let folder_b_txn = PT.NewFolder(folder_b_info);
- folder_b_info.guid = yield folder_b_txn.transact();
- ensureUndoState([ [folder_b_txn]
- , [bkm_b_txn_result, bkm_a_txn_result, folder_a_txn_result] ], 0);
-
- moveTxn = PT.Move({ guid: bkm_a_info.guid
- , newParentGuid: folder_b_info.guid
- , newIndex: bmsvc.DEFAULT_INDEX });
- yield moveTxn.transact();
-
- ensureDo = () => {
- ensureUndoState([ [moveTxn]
- , [folder_b_txn]
- , [bkm_b_txn_result, bkm_a_txn_result, folder_a_txn_result] ], 0);
- ensureItemsMoved({ guid: bkm_a_info.guid
- , oldParentGuid: folder_a_info.guid
- , newParentGuid: folder_b_info.guid
- , oldIndex: 0
- , newIndex: 0 });
- observer.reset();
- };
- ensureUndo = () => {
- ensureUndoState([ [moveTxn]
- , [folder_b_txn]
- , [bkm_b_txn_result, bkm_a_txn_result, folder_a_txn_result] ], 1);
- ensureItemsMoved({ guid: bkm_a_info.guid
- , oldParentGuid: folder_b_info.guid
- , newParentGuid: folder_a_info.guid
- , oldIndex: 0
- , newIndex: 0 });
- observer.reset();
- };
-
- ensureDo();
- yield PT.undo();
- ensureUndo();
- yield PT.redo();
- ensureDo();
- yield PT.undo();
- ensureUndo();
-
- // Clean up
- yield PT.undo(); // folder_b_txn
- yield PT.undo(); // folder_a_txn + the bookmarks;
- do_check_eq(observer.itemsRemoved.size, 4);
- ensureUndoState([ [moveTxn]
- , [folder_b_txn]
- , [bkm_b_txn_result, bkm_a_txn_result, folder_a_txn_result] ], 3);
- yield PT.clearTransactionsHistory();
- ensureUndoState();
-});
-
-add_task(function* test_remove_folder() {
- let folder_level_1_info = createTestFolderInfo("Folder Level 1");
- let folder_level_2_info = { title: "Folder Level 2" };
- let [folder_level_1_txn_result,
- folder_level_2_txn_result] = yield PT.batch(function* () {
- let folder_level_1_txn = PT.NewFolder(folder_level_1_info);
- folder_level_1_info.guid = yield folder_level_1_txn.transact();
- folder_level_2_info.parentGuid = folder_level_1_info.guid;
- let folder_level_2_txn = PT.NewFolder(folder_level_2_info);
- folder_level_2_info.guid = yield folder_level_2_txn.transact();
- return [folder_level_1_txn, folder_level_2_txn];
- });
-
- ensureUndoState([[folder_level_2_txn_result, folder_level_1_txn_result]]);
- yield ensureItemsAdded(folder_level_1_info, folder_level_2_info);
- observer.reset();
-
- let remove_folder_2_txn = PT.Remove(folder_level_2_info);
- yield remove_folder_2_txn.transact();
-
- ensureUndoState([ [remove_folder_2_txn]
- , [folder_level_2_txn_result, folder_level_1_txn_result] ]);
- yield ensureItemsRemoved(folder_level_2_info);
-
- // Undo Remove "Folder Level 2"
- yield PT.undo();
- ensureUndoState([ [remove_folder_2_txn]
- , [folder_level_2_txn_result, folder_level_1_txn_result] ], 1);
- yield ensureItemsAdded(folder_level_2_info);
- ensureTimestampsUpdated(folder_level_2_info.guid, true);
- observer.reset();
-
- // Redo Remove "Folder Level 2"
- yield PT.redo();
- ensureUndoState([ [remove_folder_2_txn]
- , [folder_level_2_txn_result, folder_level_1_txn_result] ]);
- yield ensureItemsRemoved(folder_level_2_info);
- observer.reset();
-
- // Undo it again
- yield PT.undo();
- ensureUndoState([ [remove_folder_2_txn]
- , [folder_level_2_txn_result, folder_level_1_txn_result] ], 1);
- yield ensureItemsAdded(folder_level_2_info);
- ensureTimestampsUpdated(folder_level_2_info.guid, true);
- observer.reset();
-
- // Undo the creation of both folders
- yield PT.undo();
- ensureUndoState([ [remove_folder_2_txn]
- , [folder_level_2_txn_result, folder_level_1_txn_result] ], 2);
- yield ensureItemsRemoved(folder_level_2_info, folder_level_1_info);
- observer.reset();
-
- // Redo the creation of both folders
- yield PT.redo();
- ensureUndoState([ [remove_folder_2_txn]
- , [folder_level_2_txn_result, folder_level_1_txn_result] ], 1);
- yield ensureItemsAdded(folder_level_1_info, folder_level_2_info);
- ensureTimestampsUpdated(folder_level_1_info.guid, true);
- ensureTimestampsUpdated(folder_level_2_info.guid, true);
- observer.reset();
-
- // Redo Remove "Folder Level 2"
- yield PT.redo();
- ensureUndoState([ [remove_folder_2_txn]
- , [folder_level_2_txn_result, folder_level_1_txn_result] ]);
- yield ensureItemsRemoved(folder_level_2_info);
- observer.reset();
-
- // Undo everything one last time
- yield PT.undo();
- ensureUndoState([ [remove_folder_2_txn]
- , [folder_level_2_txn_result, folder_level_1_txn_result] ], 1);
- yield ensureItemsAdded(folder_level_2_info);
- observer.reset();
-
- yield PT.undo();
- ensureUndoState([ [remove_folder_2_txn]
- , [folder_level_2_txn_result, folder_level_1_txn_result] ], 2);
- yield ensureItemsRemoved(folder_level_2_info, folder_level_2_info);
- observer.reset();
-
- yield PT.clearTransactionsHistory();
- ensureUndoState();
-});
-
-add_task(function* test_add_and_remove_bookmarks_with_additional_info() {
- const testURI = NetUtil.newURI("http://add.remove.tag");
- const TAG_1 = "TestTag1";
- const TAG_2 = "TestTag2";
- const KEYWORD = "test_keyword";
- const POST_DATA = "post_data";
- const ANNO = { name: "TestAnno", value: "TestAnnoValue" };
-
- let folder_info = createTestFolderInfo();
- folder_info.guid = yield PT.NewFolder(folder_info).transact();
- let ensureTags = ensureTagsForURI.bind(null, testURI);
-
- // Check that the NewBookmark transaction preserves tags.
- observer.reset();
- let b1_info = { parentGuid: folder_info.guid, url: testURI, tags: [TAG_1] };
- b1_info.guid = yield PT.NewBookmark(b1_info).transact();
- ensureTags([TAG_1]);
- yield PT.undo();
- ensureTags([]);
-
- observer.reset();
- yield PT.redo();
- ensureTimestampsUpdated(b1_info.guid, true);
- ensureTags([TAG_1]);
-
- // Check if the Remove transaction removes and restores tags of children
- // correctly.
- yield PT.Remove(folder_info.guid).transact();
- ensureTags([]);
-
- observer.reset();
- yield PT.undo();
- ensureTimestampsUpdated(b1_info.guid, true);
- ensureTags([TAG_1]);
-
- yield PT.redo();
- ensureTags([]);
-
- observer.reset();
- yield PT.undo();
- ensureTimestampsUpdated(b1_info.guid, true);
- ensureTags([TAG_1]);
-
- // * Check that no-op tagging (the uri is already tagged with TAG_1) is
- // also a no-op on undo.
- // * Test the "keyword" property of the NewBookmark transaction.
- observer.reset();
- let b2_info = { parentGuid: folder_info.guid
- , url: testURI, tags: [TAG_1, TAG_2]
- , keyword: KEYWORD
- , postData: POST_DATA
- , annotations: [ANNO] };
- b2_info.guid = yield PT.NewBookmark(b2_info).transact();
- let b2_post_creation_changes = [
- { guid: b2_info.guid
- , isAnnoProperty: true
- , property: ANNO.name
- , newValue: ANNO.value },
- { guid: b2_info.guid
- , property: "keyword"
- , newValue: KEYWORD } ];
- ensureItemsChanged(...b2_post_creation_changes);
- ensureTags([TAG_1, TAG_2]);
-
- observer.reset();
- yield PT.undo();
- yield ensureItemsRemoved(b2_info);
- ensureTags([TAG_1]);
-
- // Check if Remove correctly restores keywords, tags and annotations.
- // Since both bookmarks share the same uri, they also share the keyword that
- // is not removed along with one of the bookmarks.
- observer.reset();
- yield PT.redo();
- ensureItemsChanged({ guid: b2_info.guid
- , isAnnoProperty: true
- , property: ANNO.name
- , newValue: ANNO.value });
- ensureTags([TAG_1, TAG_2]);
-
- // Test Remove for multiple items.
- observer.reset();
- yield PT.Remove(b1_info.guid).transact();
- yield PT.Remove(b2_info.guid).transact();
- yield PT.Remove(folder_info.guid).transact();
- yield ensureItemsRemoved(b1_info, b2_info, folder_info);
- ensureTags([]);
- // There is no keyword removal notification cause all bookmarks are removed
- // before the keyword itself, so there's no one to notify.
- let entry = yield PlacesUtils.keywords.fetch(KEYWORD);
- Assert.equal(entry, null, "keyword has been removed");
-
- observer.reset();
- yield PT.undo();
- yield ensureItemsAdded(folder_info);
- ensureTags([]);
-
- observer.reset();
- yield PT.undo();
- ensureItemsChanged(...b2_post_creation_changes);
- ensureTags([TAG_1, TAG_2]);
-
- observer.reset();
- yield PT.undo();
- yield ensureItemsAdded(b1_info);
- ensureTags([TAG_1, TAG_2]);
-
- // The redo calls below cleanup everything we did.
- observer.reset();
- yield PT.redo();
- yield ensureItemsRemoved(b1_info);
- ensureTags([TAG_1, TAG_2]);
-
- observer.reset();
- yield PT.redo();
- yield ensureItemsRemoved(b2_info);
- ensureTags([]);
-
- observer.reset();
- yield PT.redo();
- yield ensureItemsRemoved(folder_info);
- ensureTags([]);
-
- yield PT.clearTransactionsHistory();
- ensureUndoState();
-});
-
-add_task(function* test_creating_and_removing_a_separator() {
- let folder_info = createTestFolderInfo();
- let separator_info = {};
- let undoEntries = [];
-
- observer.reset();
- let create_txns = yield PT.batch(function* () {
- let folder_txn = PT.NewFolder(folder_info);
- folder_info.guid = separator_info.parentGuid = yield folder_txn.transact();
- let separator_txn = PT.NewSeparator(separator_info);
- separator_info.guid = yield separator_txn.transact();
- return [separator_txn, folder_txn];
- });
- undoEntries.unshift(create_txns);
- ensureUndoState(undoEntries, 0);
- ensureItemsAdded(folder_info, separator_info);
-
- observer.reset();
- yield PT.undo();
- ensureUndoState(undoEntries, 1);
- ensureItemsRemoved(folder_info, separator_info);
-
- observer.reset();
- yield PT.redo();
- ensureUndoState(undoEntries, 0);
- ensureItemsAdded(folder_info, separator_info);
-
- observer.reset();
- let remove_sep_txn = PT.Remove(separator_info);
- yield remove_sep_txn.transact();
- undoEntries.unshift([remove_sep_txn]);
- ensureUndoState(undoEntries, 0);
- ensureItemsRemoved(separator_info);
-
- observer.reset();
- yield PT.undo();
- ensureUndoState(undoEntries, 1);
- ensureItemsAdded(separator_info);
-
- observer.reset();
- yield PT.undo();
- ensureUndoState(undoEntries, 2);
- ensureItemsRemoved(folder_info, separator_info);
-
- observer.reset();
- yield PT.redo();
- ensureUndoState(undoEntries, 1);
- ensureItemsAdded(folder_info, separator_info);
-
- // Clear redo entries and check that |redo| does nothing
- observer.reset();
- yield PT.clearTransactionsHistory(false, true);
- undoEntries.shift();
- ensureUndoState(undoEntries, 0);
- yield PT.redo();
- ensureItemsAdded();
- ensureItemsRemoved();
-
- // Cleanup
- observer.reset();
- yield PT.undo();
- ensureUndoState(undoEntries, 1);
- ensureItemsRemoved(folder_info, separator_info);
- yield PT.clearTransactionsHistory();
- ensureUndoState();
-});
-
-add_task(function* test_add_and_remove_livemark() {
- let createLivemarkTxn = PT.NewLivemark(
- { feedUrl: NetUtil.newURI("http://test.remove.livemark")
- , parentGuid: rootGuid
- , title: "Test Remove Livemark" });
- let guid = yield createLivemarkTxn.transact();
- let originalInfo = yield PlacesUtils.promiseBookmarksTree(guid);
- Assert.ok(originalInfo);
- yield ensureLivemarkCreatedByAddLivemark(guid);
-
- let removeTxn = PT.Remove(guid);
- yield removeTxn.transact();
- yield ensureNonExistent(guid);
- function* undo() {
- ensureUndoState([[removeTxn], [createLivemarkTxn]], 0);
- yield PT.undo();
- ensureUndoState([[removeTxn], [createLivemarkTxn]], 1);
- yield ensureBookmarksTreeRestoredCorrectly(originalInfo);
- yield PT.undo();
- ensureUndoState([[removeTxn], [createLivemarkTxn]], 2);
- yield ensureNonExistent(guid);
- }
- function* redo() {
- ensureUndoState([[removeTxn], [createLivemarkTxn]], 2);
- yield PT.redo();
- ensureUndoState([[removeTxn], [createLivemarkTxn]], 1);
- yield ensureBookmarksTreeRestoredCorrectly(originalInfo);
- yield PT.redo();
- ensureUndoState([[removeTxn], [createLivemarkTxn]], 0);
- yield ensureNonExistent(guid);
- }
-
- yield undo();
- yield redo();
- yield undo();
- yield redo();
-
- // Cleanup
- yield undo();
- observer.reset();
- yield PT.clearTransactionsHistory();
-});
-
-add_task(function* test_edit_title() {
- let bm_info = { parentGuid: rootGuid
- , url: NetUtil.newURI("http://test_create_item.com")
- , title: "Original Title" };
-
- function ensureTitleChange(aCurrentTitle) {
- ensureItemsChanged({ guid: bm_info.guid
- , property: "title"
- , newValue: aCurrentTitle});
- }
-
- bm_info.guid = yield PT.NewBookmark(bm_info).transact();
-
- observer.reset();
- yield PT.EditTitle({ guid: bm_info.guid, title: "New Title" }).transact();
- ensureTitleChange("New Title");
-
- observer.reset();
- yield PT.undo();
- ensureTitleChange("Original Title");
-
- observer.reset();
- yield PT.redo();
- ensureTitleChange("New Title");
-
- // Cleanup
- observer.reset();
- yield PT.undo();
- ensureTitleChange("Original Title");
- yield PT.undo();
- ensureItemsRemoved(bm_info);
-
- yield PT.clearTransactionsHistory();
- ensureUndoState();
-});
-
-add_task(function* test_edit_url() {
- let oldURI = NetUtil.newURI("http://old.test_editing_item_uri.com/");
- let newURI = NetUtil.newURI("http://new.test_editing_item_uri.com/");
- let bm_info = { parentGuid: rootGuid, url: oldURI, tags: ["TestTag"] };
- function ensureURIAndTags(aPreChangeURI, aPostChangeURI, aOLdURITagsPreserved) {
- ensureItemsChanged({ guid: bm_info.guid
- , property: "uri"
- , newValue: aPostChangeURI.spec });
- ensureTagsForURI(aPostChangeURI, bm_info.tags);
- ensureTagsForURI(aPreChangeURI, aOLdURITagsPreserved ? bm_info.tags : []);
- }
-
- bm_info.guid = yield PT.NewBookmark(bm_info).transact();
- ensureTagsForURI(oldURI, bm_info.tags);
-
- // When there's a single bookmark for the same url, tags should be moved.
- observer.reset();
- yield PT.EditUrl({ guid: bm_info.guid, url: newURI }).transact();
- ensureURIAndTags(oldURI, newURI, false);
-
- observer.reset();
- yield PT.undo();
- ensureURIAndTags(newURI, oldURI, false);
-
- observer.reset();
- yield PT.redo();
- ensureURIAndTags(oldURI, newURI, false);
-
- observer.reset();
- yield PT.undo();
- ensureURIAndTags(newURI, oldURI, false);
-
- // When there're multiple bookmarks for the same url, tags should be copied.
- let bm2_info = Object.create(bm_info);
- bm2_info.guid = yield PT.NewBookmark(bm2_info).transact();
- let bm3_info = Object.create(bm_info);
- bm3_info.url = newURI;
- bm3_info.guid = yield PT.NewBookmark(bm3_info).transact();
-
- observer.reset();
- yield PT.EditUrl({ guid: bm_info.guid, url: newURI }).transact();
- ensureURIAndTags(oldURI, newURI, true);
-
- observer.reset();
- yield PT.undo();
- ensureURIAndTags(newURI, oldURI, true);
-
- observer.reset();
- yield PT.redo();
- ensureURIAndTags(oldURI, newURI, true);
-
- // Cleanup
- observer.reset();
- yield PT.undo();
- ensureURIAndTags(newURI, oldURI, true);
- yield PT.undo();
- yield PT.undo();
- yield PT.undo();
- ensureItemsRemoved(bm3_info, bm2_info, bm_info);
-
- yield PT.clearTransactionsHistory();
- ensureUndoState();
-});
-
-add_task(function* test_edit_keyword() {
- let bm_info = { parentGuid: rootGuid
- , url: NetUtil.newURI("http://test.edit.keyword") };
- const KEYWORD = "test_keyword";
- bm_info.guid = yield PT.NewBookmark(bm_info).transact();
- function ensureKeywordChange(aCurrentKeyword = "") {
- ensureItemsChanged({ guid: bm_info.guid
- , property: "keyword"
- , newValue: aCurrentKeyword });
- }
-
- bm_info.guid = yield PT.NewBookmark(bm_info).transact();
-
- observer.reset();
- yield PT.EditKeyword({ guid: bm_info.guid, keyword: KEYWORD, postData: "postData" }).transact();
- ensureKeywordChange(KEYWORD);
- let entry = yield PlacesUtils.keywords.fetch(KEYWORD);
- Assert.equal(entry.url.href, bm_info.url.spec);
- Assert.equal(entry.postData, "postData");
-
- observer.reset();
- yield PT.undo();
- ensureKeywordChange();
- entry = yield PlacesUtils.keywords.fetch(KEYWORD);
- Assert.equal(entry, null);
-
- observer.reset();
- yield PT.redo();
- ensureKeywordChange(KEYWORD);
- entry = yield PlacesUtils.keywords.fetch(KEYWORD);
- Assert.equal(entry.url.href, bm_info.url.spec);
- Assert.equal(entry.postData, "postData");
-
- // Cleanup
- observer.reset();
- yield PT.undo();
- ensureKeywordChange();
- yield PT.undo();
- ensureItemsRemoved(bm_info);
-
- yield PT.clearTransactionsHistory();
- ensureUndoState();
-});
-
-add_task(function* test_edit_specific_keyword() {
- let bm_info = { parentGuid: rootGuid
- , url: NetUtil.newURI("http://test.edit.keyword") };
- bm_info.guid = yield PT.NewBookmark(bm_info).transact();
- function ensureKeywordChange(aCurrentKeyword = "", aPreviousKeyword = "") {
- ensureItemsChanged({ guid: bm_info.guid
- , property: "keyword"
- , newValue: aCurrentKeyword
- });
- }
-
- yield PlacesUtils.keywords.insert({ keyword: "kw1", url: bm_info.url.spec, postData: "postData1" });
- yield PlacesUtils.keywords.insert({ keyword: "kw2", url: bm_info.url.spec, postData: "postData2" });
- bm_info.guid = yield PT.NewBookmark(bm_info).transact();
-
- observer.reset();
- yield PT.EditKeyword({ guid: bm_info.guid, keyword: "keyword", oldKeyword: "kw2" }).transact();
- ensureKeywordChange("keyword", "kw2");
- let entry = yield PlacesUtils.keywords.fetch("kw1");
- Assert.equal(entry.url.href, bm_info.url.spec);
- Assert.equal(entry.postData, "postData1");
- entry = yield PlacesUtils.keywords.fetch("keyword");
- Assert.equal(entry.url.href, bm_info.url.spec);
- Assert.equal(entry.postData, "postData2");
- entry = yield PlacesUtils.keywords.fetch("kw2");
- Assert.equal(entry, null);
-
- observer.reset();
- yield PT.undo();
- ensureKeywordChange("kw2", "keyword");
- entry = yield PlacesUtils.keywords.fetch("kw1");
- Assert.equal(entry.url.href, bm_info.url.spec);
- Assert.equal(entry.postData, "postData1");
- entry = yield PlacesUtils.keywords.fetch("kw2");
- Assert.equal(entry.url.href, bm_info.url.spec);
- Assert.equal(entry.postData, "postData2");
- entry = yield PlacesUtils.keywords.fetch("keyword");
- Assert.equal(entry, null);
-
- observer.reset();
- yield PT.redo();
- ensureKeywordChange("keyword", "kw2");
- entry = yield PlacesUtils.keywords.fetch("kw1");
- Assert.equal(entry.url.href, bm_info.url.spec);
- Assert.equal(entry.postData, "postData1");
- entry = yield PlacesUtils.keywords.fetch("keyword");
- Assert.equal(entry.url.href, bm_info.url.spec);
- Assert.equal(entry.postData, "postData2");
- entry = yield PlacesUtils.keywords.fetch("kw2");
- Assert.equal(entry, null);
-
- // Cleanup
- observer.reset();
- yield PT.undo();
- ensureKeywordChange("kw2");
- yield PT.undo();
- ensureItemsRemoved(bm_info);
-
- yield PT.clearTransactionsHistory();
- ensureUndoState();
-});
-
-add_task(function* test_tag_uri() {
- // This also tests passing uri specs.
- let bm_info_a = { url: "http://bookmarked.uri"
- , parentGuid: rootGuid };
- let bm_info_b = { url: NetUtil.newURI("http://bookmarked2.uri")
- , parentGuid: rootGuid };
- let unbookmarked_uri = NetUtil.newURI("http://un.bookmarked.uri");
-
- function* promiseIsBookmarked(aURI) {
- let deferred = Promise.defer();
- PlacesUtils.asyncGetBookmarkIds(aURI, ids => {
- deferred.resolve(ids.length > 0);
- });
- return deferred.promise;
- }
-
- yield PT.batch(function* () {
- bm_info_a.guid = yield PT.NewBookmark(bm_info_a).transact();
- bm_info_b.guid = yield PT.NewBookmark(bm_info_b).transact();
- });
-
- function* doTest(aInfo) {
- let urls = "url" in aInfo ? [aInfo.url] : aInfo.urls;
- let tags = "tag" in aInfo ? [aInfo.tag] : aInfo.tags;
-
- let ensureURI = url => typeof(url) == "string" ? NetUtil.newURI(url) : url;
- urls = urls.map(ensureURI);
-
- let tagWillAlsoBookmark = new Set();
- for (let url of urls) {
- if (!(yield promiseIsBookmarked(url))) {
- tagWillAlsoBookmark.add(url);
- }
- }
-
- function* ensureTagsSet() {
- for (let url of urls) {
- ensureTagsForURI(url, tags);
- Assert.ok(yield promiseIsBookmarked(url));
- }
- }
- function* ensureTagsUnset() {
- for (let url of urls) {
- ensureTagsForURI(url, []);
- if (tagWillAlsoBookmark.has(url))
- Assert.ok(!(yield promiseIsBookmarked(url)));
- else
- Assert.ok(yield promiseIsBookmarked(url));
- }
- }
-
- yield PT.Tag(aInfo).transact();
- yield ensureTagsSet();
- yield PT.undo();
- yield ensureTagsUnset();
- yield PT.redo();
- yield ensureTagsSet();
- yield PT.undo();
- yield ensureTagsUnset();
- }
-
- yield doTest({ url: bm_info_a.url, tags: ["MyTag"] });
- yield doTest({ urls: [bm_info_a.url], tag: "MyTag" });
- yield doTest({ urls: [bm_info_a.url, bm_info_b.url], tags: ["A, B"] });
- yield doTest({ urls: [bm_info_a.url, unbookmarked_uri], tag: "C" });
-
- // Cleanup
- observer.reset();
- yield PT.undo();
- ensureItemsRemoved(bm_info_a, bm_info_b);
-
- yield PT.clearTransactionsHistory();
- ensureUndoState();
-});
-
-add_task(function* test_untag_uri() {
- let bm_info_a = { url: NetUtil.newURI("http://bookmarked.uri")
- , parentGuid: rootGuid
- , tags: ["A", "B"] };
- let bm_info_b = { url: NetUtil.newURI("http://bookmarked2.uri")
- , parentGuid: rootGuid
- , tag: "B" };
-
- yield PT.batch(function* () {
- bm_info_a.guid = yield PT.NewBookmark(bm_info_a).transact();
- ensureTagsForURI(bm_info_a.url, bm_info_a.tags);
- bm_info_b.guid = yield PT.NewBookmark(bm_info_b).transact();
- ensureTagsForURI(bm_info_b.url, [bm_info_b.tag]);
- });
-
- function* doTest(aInfo) {
- let urls, tagsRemoved;
- if (aInfo instanceof Ci.nsIURI) {
- urls = [aInfo];
- tagsRemoved = [];
- }
- else if (Array.isArray(aInfo)) {
- urls = aInfo;
- tagsRemoved = [];
- }
- else {
- urls = "url" in aInfo ? [aInfo.url] : aInfo.urls;
- tagsRemoved = "tag" in aInfo ? [aInfo.tag] : aInfo.tags;
- }
-
- let preRemovalTags = new Map();
- for (let url of urls) {
- preRemovalTags.set(url, tagssvc.getTagsForURI(url));
- }
-
- function ensureTagsSet() {
- for (let url of urls) {
- ensureTagsForURI(url, preRemovalTags.get(url));
- }
- }
- function ensureTagsUnset() {
- for (let url of urls) {
- let expectedTags = tagsRemoved.length == 0 ?
- [] : preRemovalTags.get(url).filter(tag => !tagsRemoved.includes(tag));
- ensureTagsForURI(url, expectedTags);
- }
- }
-
- yield PT.Untag(aInfo).transact();
- yield ensureTagsUnset();
- yield PT.undo();
- yield ensureTagsSet();
- yield PT.redo();
- yield ensureTagsUnset();
- yield PT.undo();
- yield ensureTagsSet();
- }
-
- yield doTest(bm_info_a);
- yield doTest(bm_info_b);
- yield doTest(bm_info_a.url);
- yield doTest(bm_info_b.url);
- yield doTest([bm_info_a.url, bm_info_b.url]);
- yield doTest({ urls: [bm_info_a.url, bm_info_b.url], tags: ["A", "B"] });
- yield doTest({ urls: [bm_info_a.url, bm_info_b.url], tag: "B" });
- yield doTest({ urls: [bm_info_a.url, bm_info_b.url], tag: "C" });
- yield doTest({ urls: [bm_info_a.url, bm_info_b.url], tags: ["C"] });
-
- // Cleanup
- observer.reset();
- yield PT.undo();
- ensureItemsRemoved(bm_info_a, bm_info_b);
-
- yield PT.clearTransactionsHistory();
- ensureUndoState();
-});
-
-add_task(function* test_annotate() {
- let bm_info = { url: NetUtil.newURI("http://test.item.annotation")
- , parentGuid: rootGuid };
- let anno_info = { name: "TestAnno", value: "TestValue" };
- function ensureAnnoState(aSet) {
- ensureAnnotationsSet(bm_info.guid,
- [{ name: anno_info.name
- , value: aSet ? anno_info.value : null }]);
- }
-
- bm_info.guid = yield PT.NewBookmark(bm_info).transact();
-
- observer.reset();
- yield PT.Annotate({ guid: bm_info.guid, annotation: anno_info }).transact();
- ensureAnnoState(true);
-
- observer.reset();
- yield PT.undo();
- ensureAnnoState(false);
-
- observer.reset();
- yield PT.redo();
- ensureAnnoState(true);
-
- // Test removing the annotation by not passing the |value| property.
- observer.reset();
- yield PT.Annotate({ guid: bm_info.guid,
- annotation: { name: anno_info.name }}).transact();
- ensureAnnoState(false);
-
- observer.reset();
- yield PT.undo();
- ensureAnnoState(true);
-
- observer.reset();
- yield PT.redo();
- ensureAnnoState(false);
-
- // Cleanup
- yield PT.undo();
- observer.reset();
-});
-
-add_task(function* test_annotate_multiple() {
- let guid = yield PT.NewFolder(createTestFolderInfo()).transact();
- let itemId = yield PlacesUtils.promiseItemId(guid);
-
- function AnnoObj(aName, aValue) {
- this.name = aName;
- this.value = aValue;
- this.flags = 0;
- this.expires = Ci.nsIAnnotationService.EXPIRE_NEVER;
- }
-
- function annos(a = null, b = null) {
- return [new AnnoObj("A", a), new AnnoObj("B", b)];
- }
-
- function verifyAnnoValues(a = null, b = null) {
- let currentAnnos = PlacesUtils.getAnnotationsForItem(itemId);
- let expectedAnnos = [];
- if (a !== null)
- expectedAnnos.push(new AnnoObj("A", a));
- if (b !== null)
- expectedAnnos.push(new AnnoObj("B", b));
-
- Assert.deepEqual(currentAnnos, expectedAnnos);
- }
-
- yield PT.Annotate({ guid: guid, annotations: annos(1, 2) }).transact();
- verifyAnnoValues(1, 2);
- yield PT.undo();
- verifyAnnoValues();
- yield PT.redo();
- verifyAnnoValues(1, 2);
-
- yield PT.Annotate({ guid: guid
- , annotation: { name: "A" } }).transact();
- verifyAnnoValues(null, 2);
-
- yield PT.Annotate({ guid: guid
- , annotation: { name: "B", value: 0 } }).transact();
- verifyAnnoValues(null, 0);
- yield PT.undo();
- verifyAnnoValues(null, 2);
- yield PT.redo();
- verifyAnnoValues(null, 0);
- yield PT.undo();
- verifyAnnoValues(null, 2);
- yield PT.undo();
- verifyAnnoValues(1, 2);
- yield PT.undo();
- verifyAnnoValues();
-
- // Cleanup
- yield PT.undo();
- observer.reset();
-});
-
-add_task(function* test_sort_folder_by_name() {
- let folder_info = createTestFolderInfo();
-
- let url = NetUtil.newURI("http://sort.by.name/");
- let preSep = ["3", "2", "1"].map(i => ({ title: i, url }));
- let sep = {};
- let postSep = ["c", "b", "a"].map(l => ({ title: l, url }));
- let originalOrder = [...preSep, sep, ...postSep];
- let sortedOrder = [...preSep.slice(0).reverse(),
- sep,
- ...postSep.slice(0).reverse()];
- yield PT.batch(function* () {
- folder_info.guid = yield PT.NewFolder(folder_info).transact();
- for (let info of originalOrder) {
- info.parentGuid = folder_info.guid;
- info.guid = yield info == sep ?
- PT.NewSeparator(info).transact() :
- PT.NewBookmark(info).transact();
- }
- });
-
- let folderId = yield PlacesUtils.promiseItemId(folder_info.guid);
- let folderContainer = PlacesUtils.getFolderContents(folderId).root;
- function ensureOrder(aOrder) {
- for (let i = 0; i < folderContainer.childCount; i++) {
- do_check_eq(folderContainer.getChild(i).bookmarkGuid, aOrder[i].guid);
- }
- }
-
- ensureOrder(originalOrder);
- yield PT.SortByName(folder_info.guid).transact();
- ensureOrder(sortedOrder);
- yield PT.undo();
- ensureOrder(originalOrder);
- yield PT.redo();
- ensureOrder(sortedOrder);
-
- // Cleanup
- observer.reset();
- yield PT.undo();
- ensureOrder(originalOrder);
- yield PT.undo();
- ensureItemsRemoved(...originalOrder, folder_info);
-});
-
-add_task(function* test_livemark_txns() {
- let livemark_info =
- { feedUrl: NetUtil.newURI("http://test.feed.uri")
- , parentGuid: rootGuid
- , title: "Test Livemark" };
- function ensureLivemarkAdded() {
- ensureItemsAdded({ guid: livemark_info.guid
- , title: livemark_info.title
- , parentGuid: livemark_info.parentGuid
- , itemType: bmsvc.TYPE_FOLDER });
- let annos = [{ name: PlacesUtils.LMANNO_FEEDURI
- , value: livemark_info.feedUrl.spec }];
- if ("siteUrl" in livemark_info) {
- annos.push({ name: PlacesUtils.LMANNO_SITEURI
- , value: livemark_info.siteUrl.spec });
- }
- ensureAnnotationsSet(livemark_info.guid, annos);
- }
- function ensureLivemarkRemoved() {
- ensureItemsRemoved({ guid: livemark_info.guid
- , parentGuid: livemark_info.parentGuid });
- }
-
- function* _testDoUndoRedoUndo() {
- observer.reset();
- livemark_info.guid = yield PT.NewLivemark(livemark_info).transact();
- ensureLivemarkAdded();
-
- observer.reset();
- yield PT.undo();
- ensureLivemarkRemoved();
-
- observer.reset();
- yield PT.redo();
- ensureLivemarkAdded();
-
- yield PT.undo();
- ensureLivemarkRemoved();
- }
-
- yield* _testDoUndoRedoUndo()
- livemark_info.siteUrl = NetUtil.newURI("http://feed.site.uri");
- yield* _testDoUndoRedoUndo();
-
- // Cleanup
- observer.reset();
- yield PT.clearTransactionsHistory();
-});
-
-add_task(function* test_copy() {
- function* duplicate_and_test(aOriginalGuid) {
- let txn = PT.Copy({ guid: aOriginalGuid, newParentGuid: rootGuid });
- yield duplicateGuid = yield txn.transact();
- let originalInfo = yield PlacesUtils.promiseBookmarksTree(aOriginalGuid);
- let duplicateInfo = yield PlacesUtils.promiseBookmarksTree(duplicateGuid);
- yield ensureEqualBookmarksTrees(originalInfo, duplicateInfo, false);
-
- function* redo() {
- yield PT.redo();
- yield ensureBookmarksTreeRestoredCorrectly(originalInfo);
- yield PT.redo();
- yield ensureBookmarksTreeRestoredCorrectly(duplicateInfo);
- }
- function* undo() {
- yield PT.undo();
- // also undo the original item addition.
- yield PT.undo();
- yield ensureNonExistent(aOriginalGuid, duplicateGuid);
- }
-
- yield undo();
- yield redo();
- yield undo();
- yield redo();
-
- // Cleanup. This also remove the original item.
- yield PT.undo();
- observer.reset();
- yield PT.clearTransactionsHistory();
- }
-
- // Test duplicating leafs (bookmark, separator, empty folder)
- PT.NewBookmark({ url: new URL("http://test.item.duplicate")
- , parentGuid: rootGuid
- , annos: [{ name: "Anno", value: "AnnoValue"}] });
- let sepTxn = PT.NewSeparator({ parentGuid: rootGuid, index: 1 });
- let livemarkTxn = PT.NewLivemark(
- { feedUrl: new URL("http://test.feed.uri")
- , parentGuid: rootGuid
- , title: "Test Livemark", index: 1 });
- let emptyFolderTxn = PT.NewFolder(createTestFolderInfo());
- for (let txn of [livemarkTxn, sepTxn, emptyFolderTxn]) {
- let guid = yield txn.transact();
- yield duplicate_and_test(guid);
- }
-
- // Test duplicating a folder having some contents.
- let filledFolderGuid = yield PT.batch(function *() {
- let folderGuid = yield PT.NewFolder(createTestFolderInfo()).transact();
- let nestedFolderGuid =
- yield PT.NewFolder({ parentGuid: folderGuid
- , title: "Nested Folder" }).transact();
- // Insert a bookmark under the nested folder.
- yield PT.NewBookmark({ url: new URL("http://nested.nested.bookmark")
- , parentGuid: nestedFolderGuid }).transact();
- // Insert a separator below the nested folder
- yield PT.NewSeparator({ parentGuid: folderGuid }).transact();
- // And another bookmark.
- yield PT.NewBookmark({ url: new URL("http://nested.bookmark")
- , parentGuid: folderGuid }).transact();
- return folderGuid;
- });
-
- yield duplicate_and_test(filledFolderGuid);
-
- // Cleanup
- yield PT.clearTransactionsHistory();
-});
-
-add_task(function* test_array_input_for_batch() {
- let folderTxn = PT.NewFolder(createTestFolderInfo());
- let folderGuid = yield folderTxn.transact();
-
- let sep1_txn = PT.NewSeparator({ parentGuid: folderGuid });
- let sep2_txn = PT.NewSeparator({ parentGuid: folderGuid });
- yield PT.batch([sep1_txn, sep2_txn]);
- ensureUndoState([[sep2_txn, sep1_txn], [folderTxn]], 0);
-
- let ensureChildCount = function* (count) {
- let tree = yield PlacesUtils.promiseBookmarksTree(folderGuid);
- if (count == 0)
- Assert.ok(!("children" in tree));
- else
- Assert.equal(tree.children.length, count);
- };
-
- yield ensureChildCount(2);
- yield PT.undo();
- yield ensureChildCount(0);
- yield PT.redo()
- yield ensureChildCount(2);
- yield PT.undo();
- yield ensureChildCount(0);
-
- yield PT.undo();
- Assert.equal((yield PlacesUtils.promiseBookmarksTree(folderGuid)), null);
-
- // Cleanup
- yield PT.clearTransactionsHistory();
-});
-
-add_task(function* test_copy_excluding_annotations() {
- let folderInfo = createTestFolderInfo();
- let anno = n => { return { name: n, value: 1 } };
- folderInfo.annotations = [anno("a"), anno("b"), anno("c")];
- let folderGuid = yield PT.NewFolder(folderInfo).transact();
-
- let ensureAnnosSet = function* (guid, ...expectedAnnoNames) {
- let tree = yield PlacesUtils.promiseBookmarksTree(guid);
- let annoNames = "annos" in tree ?
- tree.annos.map(a => a.name).sort() : [];
- Assert.deepEqual(annoNames, expectedAnnoNames);
- };
-
- yield ensureAnnosSet(folderGuid, "a", "b", "c");
-
- let excluding_a_dupeGuid =
- yield PT.Copy({ guid: folderGuid
- , newParentGuid: rootGuid
- , excludingAnnotation: "a" }).transact();
- yield ensureAnnosSet(excluding_a_dupeGuid, "b", "c");
-
- let excluding_ac_dupeGuid =
- yield PT.Copy({ guid: folderGuid
- , newParentGuid: rootGuid
- , excludingAnnotations: ["a", "c"] }).transact();
- yield ensureAnnosSet(excluding_ac_dupeGuid, "b");
-
- // Cleanup
- yield PT.undo();
- yield PT.undo();
- yield PT.undo();
- yield PT.clearTransactionsHistory();
-});
-
-add_task(function* test_invalid_uri_spec_throws() {
- Assert.throws(() =>
- PT.NewBookmark({ parentGuid: rootGuid
- , url: "invalid uri spec"
- , title: "test bookmark" }));
- Assert.throws(() =>
- PT.Tag({ tag: "TheTag"
- , urls: ["invalid uri spec"] }));
- Assert.throws(() =>
- PT.Tag({ tag: "TheTag"
- , urls: ["about:blank", "invalid uri spec"] }));
-});
-
-add_task(function* test_annotate_multiple_items() {
- let parentGuid = rootGuid;
- let guids = [
- yield PT.NewBookmark({ url: "about:blank", parentGuid }).transact(),
- yield PT.NewFolder({ title: "Test Folder", parentGuid }).transact()];
-
- let annotation = { name: "TestAnno", value: "TestValue" };
- yield PT.Annotate({ guids, annotation }).transact();
-
- function *ensureAnnoSet() {
- for (let guid of guids) {
- let itemId = yield PlacesUtils.promiseItemId(guid);
- Assert.equal(annosvc.getItemAnnotation(itemId, annotation.name),
- annotation.value);
- }
- }
- function *ensureAnnoUnset() {
- for (let guid of guids) {
- let itemId = yield PlacesUtils.promiseItemId(guid);
- Assert.ok(!annosvc.itemHasAnnotation(itemId, annotation.name));
- }
- }
-
- yield ensureAnnoSet();
- yield PT.undo();
- yield ensureAnnoUnset();
- yield PT.redo();
- yield ensureAnnoSet();
- yield PT.undo();
- yield ensureAnnoUnset();
-
- // Cleanup
- yield PT.undo();
- yield PT.undo();
- yield ensureNonExistent(...guids);
- yield PT.clearTransactionsHistory();
- observer.reset();
-});
-
-add_task(function* test_remove_multiple() {
- let guids = [];
- yield PT.batch(function* () {
- let folderGuid = yield PT.NewFolder({ title: "Test Folder"
- , parentGuid: rootGuid }).transact();
- let nestedFolderGuid =
- yield PT.NewFolder({ title: "Nested Test Folder"
- , parentGuid: folderGuid }).transact();
- yield PT.NewSeparator(nestedFolderGuid).transact();
-
- guids.push(folderGuid);
-
- let bmGuid =
- yield PT.NewBookmark({ url: new URL("http://test.bookmark.removed")
- , parentGuid: rootGuid }).transact();
- guids.push(bmGuid);
- });
-
- let originalInfos = [];
- for (let guid of guids) {
- originalInfos.push(yield PlacesUtils.promiseBookmarksTree(guid));
- }
-
- yield PT.Remove(guids).transact();
- yield ensureNonExistent(...guids);
- yield PT.undo();
- yield ensureBookmarksTreeRestoredCorrectly(...originalInfos);
- yield PT.redo();
- yield ensureNonExistent(...guids);
- yield PT.undo();
- yield ensureBookmarksTreeRestoredCorrectly(...originalInfos);
-
- // Undo the New* transactions batch.
- yield PT.undo();
- yield ensureNonExistent(...guids);
-
- // Redo it.
- yield PT.redo();
- yield ensureBookmarksTreeRestoredCorrectly(...originalInfos);
-
- // Redo remove.
- yield PT.redo();
- yield ensureNonExistent(...guids);
-
- // Cleanup
- yield PT.clearTransactionsHistory();
- observer.reset();
-});
-
-add_task(function* test_remove_bookmarks_for_urls() {
- let urls = [new URL("http://test.url.1"), new URL("http://test.url.2")];
- let guids = [];
- yield PT.batch(function* () {
- for (let url of urls) {
- for (let title of ["test title a", "test title b"]) {
- let txn = PT.NewBookmark({ url, title, parentGuid: rootGuid });
- guids.push(yield txn.transact());
- }
- }
- });
-
- let originalInfos = [];
- for (let guid of guids) {
- originalInfos.push(yield PlacesUtils.promiseBookmarksTree(guid));
- }
-
- yield PT.RemoveBookmarksForUrls(urls).transact();
- yield ensureNonExistent(...guids);
- yield PT.undo();
- yield ensureBookmarksTreeRestoredCorrectly(...originalInfos);
- yield PT.redo();
- yield ensureNonExistent(...guids);
- yield PT.undo();
- yield ensureBookmarksTreeRestoredCorrectly(...originalInfos);
-
- // Cleanup.
- yield PT.redo();
- yield ensureNonExistent(...guids);
- yield PT.clearTransactionsHistory();
- observer.reset();
-});
diff --git a/toolkit/components/places/tests/unit/test_autocomplete_stopSearch_no_throw.js b/toolkit/components/places/tests/unit/test_autocomplete_stopSearch_no_throw.js
deleted file mode 100644
index 7d5df565f3..0000000000
--- a/toolkit/components/places/tests/unit/test_autocomplete_stopSearch_no_throw.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/**
- * Added with bug 508102 to make sure that calling stopSearch on our
- * AutoComplete implementation does not throw.
- */
-
-// Globals and Constants
-
-var hs = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
-var ac = Cc["@mozilla.org/autocomplete/search;1?name=unifiedcomplete"].
- getService(Ci.nsIAutoCompleteSearch);
-
-// Test Functions
-
-function test_stopSearch()
-{
- try {
- ac.stopSearch();
- }
- catch (e) {
- do_throw("we should not have caught anything!");
- }
-}
-
-// Test Runner
-
-var tests = [
- test_stopSearch,
-];
-function run_test()
-{
- tests.forEach(test => test());
-}
diff --git a/toolkit/components/places/tests/unit/test_bookmark_catobs.js b/toolkit/components/places/tests/unit/test_bookmark_catobs.js
deleted file mode 100644
index e2b589090f..0000000000
--- a/toolkit/components/places/tests/unit/test_bookmark_catobs.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function run_test() {
- run_next_test()
-}
-
-add_task(function* test_observers() {
- do_load_manifest("nsDummyObserver.manifest");
-
- let dummyCreated = false;
- let dummyReceivedOnItemAdded = false;
-
- Services.obs.addObserver(function created() {
- Services.obs.removeObserver(created, "dummy-observer-created");
- dummyCreated = true;
- }, "dummy-observer-created", false);
- Services.obs.addObserver(function added() {
- Services.obs.removeObserver(added, "dummy-observer-item-added");
- dummyReceivedOnItemAdded = true;
- }, "dummy-observer-item-added", false);
-
- let initialObservers = PlacesUtils.bookmarks.getObservers();
-
- // Add a common observer, it should be invoked after the category observer.
- let notificationsPromised = new Promise((resolve, reject) => {
- PlacesUtils.bookmarks.addObserver( {
- __proto__: NavBookmarkObserver.prototype,
- onItemAdded() {
- let observers = PlacesUtils.bookmarks.getObservers();
- Assert.equal(observers.length, initialObservers.length + 1);
-
- // Check the common observer is the last one.
- for (let i = 0; i < initialObservers.length; ++i) {
- Assert.equal(initialObservers[i], observers[i]);
- }
-
- PlacesUtils.bookmarks.removeObserver(this);
- observers = PlacesUtils.bookmarks.getObservers();
- Assert.equal(observers.length, initialObservers.length);
-
- // Check the category observer has been invoked before this one.
- Assert.ok(dummyCreated);
- Assert.ok(dummyReceivedOnItemAdded);
- resolve();
- }
- }, false);
- });
-
- // Add a bookmark
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- uri("http://typed.mozilla.org"),
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "bookmark");
-
- yield notificationsPromised;
-});
diff --git a/toolkit/components/places/tests/unit/test_bookmarks_html.js b/toolkit/components/places/tests/unit/test_bookmarks_html.js
deleted file mode 100644
index b10dc61851..0000000000
--- a/toolkit/components/places/tests/unit/test_bookmarks_html.js
+++ /dev/null
@@ -1,385 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-const LOAD_IN_SIDEBAR_ANNO = "bookmarkProperties/loadInSidebar";
-const DESCRIPTION_ANNO = "bookmarkProperties/description";
-
-// An object representing the contents of bookmarks.preplaces.html.
-var test_bookmarks = {
- menu: [
- { title: "Mozilla Firefox",
- children: [
- { title: "Help and Tutorials",
- url: "http://en-us.www.mozilla.com/en-US/firefox/help/",
- icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg=="
- },
- { title: "Customize Firefox",
- url: "http://en-us.www.mozilla.com/en-US/firefox/customize/",
- icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg=="
- },
- { title: "Get Involved",
- url: "http://en-us.www.mozilla.com/en-US/firefox/community/",
- icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg=="
- },
- { title: "About Us",
- url: "http://en-us.www.mozilla.com/en-US/about/",
- icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg=="
- }
- ]
- },
- {
- type: Ci.nsINavHistoryResultNode.RESULT_TYPE_SEPARATOR
- },
- { title: "test",
- description: "folder test comment",
- dateAdded: 1177541020000000,
- lastModified: 1177541050000000,
- children: [
- { title: "test post keyword",
- description: "item description",
- dateAdded: 1177375336000000,
- lastModified: 1177375423000000,
- keyword: "test",
- sidebar: true,
- postData: "hidden1%3Dbar&text1%3D%25s",
- charset: "ISO-8859-1",
- url: "http://test/post"
- }
- ]
- }
- ],
- toolbar: [
- { title: "Getting Started",
- url: "http://en-us.www.mozilla.com/en-US/firefox/central/",
- icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg=="
- },
- { title: "Latest Headlines",
- url: "http://en-us.fxfeeds.mozilla.com/en-US/firefox/livebookmarks/",
- feedUrl: "http://en-us.fxfeeds.mozilla.com/en-US/firefox/headlines.xml"
- }
- ],
- unfiled: [
- { title: "Example.tld",
- url: "http://example.tld/"
- }
- ]
-};
-
-// Pre-Places bookmarks.html file pointer.
-var gBookmarksFileOld;
-// Places bookmarks.html file pointer.
-var gBookmarksFileNew;
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* setup() {
- // Avoid creating smart bookmarks during the test.
- Services.prefs.setIntPref("browser.places.smartBookmarksVersion", -1);
-
- // File pointer to legacy bookmarks file.
- gBookmarksFileOld = do_get_file("bookmarks.preplaces.html");
-
- // File pointer to a new Places-exported bookmarks file.
- gBookmarksFileNew = Services.dirsvc.get("ProfD", Ci.nsILocalFile);
- gBookmarksFileNew.append("bookmarks.exported.html");
- if (gBookmarksFileNew.exists()) {
- gBookmarksFileNew.remove(false);
- }
-
- // This test must be the first one, since it setups the new bookmarks.html.
- // Test importing a pre-Places canonical bookmarks file.
- // 1. import bookmarks.preplaces.html
- // 2. run the test-suite
- // Note: we do not empty the db before this import to catch bugs like 380999
- yield BookmarkHTMLUtils.importFromFile(gBookmarksFileOld, true);
- yield PlacesTestUtils.promiseAsyncUpdates();
- yield testImportedBookmarks();
-
- yield BookmarkHTMLUtils.exportToFile(gBookmarksFileNew);
- yield PlacesTestUtils.promiseAsyncUpdates();
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_import_new()
-{
- // Test importing a Places bookmarks.html file.
- // 1. import bookmarks.exported.html
- // 2. run the test-suite
- yield BookmarkHTMLUtils.importFromFile(gBookmarksFileNew, true);
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- yield testImportedBookmarks();
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_emptytitle_export()
-{
- // Test exporting and importing with an empty-titled bookmark.
- // 1. import bookmarks
- // 2. create an empty-titled bookmark.
- // 3. export to bookmarks.exported.html
- // 4. empty bookmarks db
- // 5. import bookmarks.exported.html
- // 6. run the test-suite
- // 7. remove the empty-titled bookmark
- // 8. export to bookmarks.exported.html
- // 9. empty bookmarks db and continue
-
- yield BookmarkHTMLUtils.importFromFile(gBookmarksFileNew, true);
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- const NOTITLE_URL = "http://notitle.mozilla.org/";
- let bookmark = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: NOTITLE_URL
- });
- test_bookmarks.unfiled.push({ title: "", url: NOTITLE_URL });
-
- yield BookmarkHTMLUtils.exportToFile(gBookmarksFileNew);
- yield PlacesTestUtils.promiseAsyncUpdates();
- yield PlacesUtils.bookmarks.eraseEverything();
-
- yield BookmarkHTMLUtils.importFromFile(gBookmarksFileNew, true);
- yield PlacesTestUtils.promiseAsyncUpdates();
- yield testImportedBookmarks();
-
- // Cleanup.
- test_bookmarks.unfiled.pop();
- // HTML imports don't restore GUIDs yet.
- let reimportedBookmark = yield PlacesUtils.bookmarks.fetch({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX
- });
- Assert.equal(reimportedBookmark.url.href, bookmark.url.href);
- yield PlacesUtils.bookmarks.remove(reimportedBookmark);
-
- yield BookmarkHTMLUtils.exportToFile(gBookmarksFileNew);
- yield PlacesTestUtils.promiseAsyncUpdates();
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_import_chromefavicon()
-{
- // Test exporting and importing with a bookmark pointing to a chrome favicon.
- // 1. import bookmarks
- // 2. create a bookmark pointing to a chrome favicon.
- // 3. export to bookmarks.exported.html
- // 4. empty bookmarks db
- // 5. import bookmarks.exported.html
- // 6. run the test-suite
- // 7. remove the bookmark pointing to a chrome favicon.
- // 8. export to bookmarks.exported.html
- // 9. empty bookmarks db and continue
-
- const PAGE_URI = NetUtil.newURI("http://example.com/chromefavicon_page");
- const CHROME_FAVICON_URI = NetUtil.newURI("chrome://global/skin/icons/information-16.png");
- const CHROME_FAVICON_URI_2 = NetUtil.newURI("chrome://global/skin/icons/error-16.png");
-
- do_print("Importing from html");
- yield BookmarkHTMLUtils.importFromFile(gBookmarksFileNew, true);
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- do_print("Insert bookmark");
- yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: PAGE_URI,
- title: "Test"
- });
-
- do_print("Set favicon");
- yield new Promise(resolve => {
- PlacesUtils.favicons.setAndFetchFaviconForPage(
- PAGE_URI, CHROME_FAVICON_URI, true,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- resolve, Services.scriptSecurityManager.getSystemPrincipal());
- });
-
- let data = yield new Promise(resolve => {
- PlacesUtils.favicons.getFaviconDataForPage(
- PAGE_URI, (uri, dataLen, faviconData, mimeType) => resolve(faviconData));
- });
-
- let base64Icon = "data:image/png;base64," +
- base64EncodeString(String.fromCharCode.apply(String, data));
-
- test_bookmarks.unfiled.push(
- { title: "Test", url: PAGE_URI.spec, icon: base64Icon });
-
- do_print("Export to html");
- yield BookmarkHTMLUtils.exportToFile(gBookmarksFileNew);
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- do_print("Set favicon");
- // Change the favicon to check it's really imported again later.
- yield new Promise(resolve => {
- PlacesUtils.favicons.setAndFetchFaviconForPage(
- PAGE_URI, CHROME_FAVICON_URI_2, true,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- resolve, Services.scriptSecurityManager.getSystemPrincipal());
- });
-
- do_print("import from html");
- yield PlacesUtils.bookmarks.eraseEverything();
- yield BookmarkHTMLUtils.importFromFile(gBookmarksFileNew, true);
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- do_print("Test imported bookmarks");
- yield testImportedBookmarks();
-
- // Cleanup.
- test_bookmarks.unfiled.pop();
- // HTML imports don't restore GUIDs yet.
- let reimportedBookmark = yield PlacesUtils.bookmarks.fetch({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX
- });
- yield PlacesUtils.bookmarks.remove(reimportedBookmark);
-
- yield BookmarkHTMLUtils.exportToFile(gBookmarksFileNew);
- yield PlacesTestUtils.promiseAsyncUpdates();
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_import_ontop()
-{
- // Test importing the exported bookmarks.html file *on top of* the existing
- // bookmarks.
- // 1. empty bookmarks db
- // 2. import the exported bookmarks file
- // 3. export to file
- // 3. import the exported bookmarks file
- // 4. run the test-suite
-
- yield BookmarkHTMLUtils.importFromFile(gBookmarksFileNew, true);
- yield PlacesTestUtils.promiseAsyncUpdates();
- yield BookmarkHTMLUtils.exportToFile(gBookmarksFileNew);
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- yield BookmarkHTMLUtils.importFromFile(gBookmarksFileNew, true);
- yield PlacesTestUtils.promiseAsyncUpdates();
- yield testImportedBookmarks();
- yield PlacesTestUtils.promiseAsyncUpdates();
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-function* testImportedBookmarks()
-{
- for (let group in test_bookmarks) {
- do_print("[testImportedBookmarks()] Checking group '" + group + "'");
-
- let root;
- switch (group) {
- case "menu":
- root = PlacesUtils.getFolderContents(PlacesUtils.bookmarksMenuFolderId).root;
- break;
- case "toolbar":
- root = PlacesUtils.getFolderContents(PlacesUtils.toolbarFolderId).root;
- break;
- case "unfiled":
- root = PlacesUtils.getFolderContents(PlacesUtils.unfiledBookmarksFolderId).root;
- break;
- }
-
- let items = test_bookmarks[group];
- do_check_eq(root.childCount, items.length);
-
- for (let key in items) {
- yield checkItem(items[key], root.getChild(key));
- }
-
- root.containerOpen = false;
- }
-}
-
-function* checkItem(aExpected, aNode)
-{
- let id = aNode.itemId;
-
- return Task.spawn(function* () {
- for (prop in aExpected) {
- switch (prop) {
- case "type":
- do_check_eq(aNode.type, aExpected.type);
- break;
- case "title":
- do_check_eq(aNode.title, aExpected.title);
- break;
- case "description":
- do_check_eq(PlacesUtils.annotations
- .getItemAnnotation(id, DESCRIPTION_ANNO),
- aExpected.description);
- break;
- case "dateAdded":
- do_check_eq(PlacesUtils.bookmarks.getItemDateAdded(id),
- aExpected.dateAdded);
- break;
- case "lastModified":
- do_check_eq(PlacesUtils.bookmarks.getItemLastModified(id),
- aExpected.lastModified);
- break;
- case "url":
- if (!("feedUrl" in aExpected))
- do_check_eq(aNode.uri, aExpected.url)
- break;
- case "icon":
- let deferred = Promise.defer();
- PlacesUtils.favicons.getFaviconDataForPage(
- NetUtil.newURI(aExpected.url),
- function (aURI, aDataLen, aData, aMimeType) {
- deferred.resolve(aData);
- });
- let data = yield deferred.promise;
- let base64Icon = "data:image/png;base64," +
- base64EncodeString(String.fromCharCode.apply(String, data));
- do_check_true(base64Icon == aExpected.icon);
- break;
- case "keyword": {
- let entry = yield PlacesUtils.keywords.fetch({ url: aNode.uri });
- Assert.equal(entry.keyword, aExpected.keyword);
- break;
- }
- case "sidebar":
- do_check_eq(PlacesUtils.annotations
- .itemHasAnnotation(id, LOAD_IN_SIDEBAR_ANNO),
- aExpected.sidebar);
- break;
- case "postData": {
- let entry = yield PlacesUtils.keywords.fetch({ url: aNode.uri });
- Assert.equal(entry.postData, aExpected.postData);
- break;
- }
- case "charset":
- let testURI = NetUtil.newURI(aNode.uri);
- do_check_eq((yield PlacesUtils.getCharsetForURI(testURI)), aExpected.charset);
- break;
- case "feedUrl":
- let livemark = yield PlacesUtils.livemarks.getLivemark({ id: id });
- do_check_eq(livemark.siteURI.spec, aExpected.url);
- do_check_eq(livemark.feedURI.spec, aExpected.feedUrl);
- break;
- case "children":
- let folder = aNode.QueryInterface(Ci.nsINavHistoryContainerResultNode);
- do_check_eq(folder.hasChildren, aExpected.children.length > 0);
- folder.containerOpen = true;
- do_check_eq(folder.childCount, aExpected.children.length);
-
- for (let index = 0; index < aExpected.children.length; index++) {
- yield checkItem(aExpected.children[index], folder.getChild(index));
- }
-
- folder.containerOpen = false;
- break;
- default:
- throw new Error("Unknown property");
- }
- }
- });
-}
diff --git a/toolkit/components/places/tests/unit/test_bookmarks_html_corrupt.js b/toolkit/components/places/tests/unit/test_bookmarks_html_corrupt.js
deleted file mode 100644
index 845b2227ba..0000000000
--- a/toolkit/components/places/tests/unit/test_bookmarks_html_corrupt.js
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * This test ensures that importing/exporting to HTML does not stop
- * if a malformed uri is found.
- */
-
-const DESCRIPTION_ANNO = "bookmarkProperties/description";
-const LOAD_IN_SIDEBAR_ANNO = "bookmarkProperties/loadInSidebar";
-
-const TEST_FAVICON_PAGE_URL = "http://en-US.www.mozilla.com/en-US/firefox/central/";
-const TEST_FAVICON_DATA_SIZE = 580;
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* test_corrupt_file() {
- // avoid creating the places smart folder during tests
- Services.prefs.setIntPref("browser.places.smartBookmarksVersion", -1);
-
- // Import bookmarks from the corrupt file.
- let corruptHtml = OS.Path.join(do_get_cwd().path, "bookmarks.corrupt.html");
- yield BookmarkHTMLUtils.importFromFile(corruptHtml, true);
-
- // Check that bookmarks that are not corrupt have been imported.
- yield PlacesTestUtils.promiseAsyncUpdates();
- yield database_check();
-});
-
-add_task(function* test_corrupt_database() {
- // Create corruption in the database, then export.
- let corruptBookmark = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- url: "http://test.mozilla.org",
- title: "We love belugas" });
- yield PlacesUtils.withConnectionWrapper("test", Task.async(function*(db) {
- yield db.execute("UPDATE moz_bookmarks SET fk = NULL WHERE guid = :guid",
- { guid: corruptBookmark.guid });
- }));
-
- let bookmarksFile = OS.Path.join(OS.Constants.Path.profileDir, "bookmarks.exported.html");
- if ((yield OS.File.exists(bookmarksFile)))
- yield OS.File.remove(bookmarksFile);
- yield BookmarkHTMLUtils.exportToFile(bookmarksFile);
-
- // Import again and check for correctness.
- yield PlacesUtils.bookmarks.eraseEverything();
- yield BookmarkHTMLUtils.importFromFile(bookmarksFile, true);
- yield PlacesTestUtils.promiseAsyncUpdates();
- yield database_check();
-});
-
-/*
- * Check for imported bookmarks correctness
- *
- * @return {Promise}
- * @resolves When the checks are finished.
- * @rejects Never.
- */
-var database_check = Task.async(function* () {
- // BOOKMARKS MENU
- let root = PlacesUtils.getFolderContents(PlacesUtils.bookmarksMenuFolderId).root;
- Assert.equal(root.childCount, 2);
-
- let folderNode = root.getChild(1);
- Assert.equal(folderNode.type, folderNode.RESULT_TYPE_FOLDER);
- Assert.equal(folderNode.title, "test");
- Assert.equal(PlacesUtils.bookmarks.getItemDateAdded(folderNode.itemId), 1177541020000000);
- Assert.equal(PlacesUtils.bookmarks.getItemLastModified(folderNode.itemId), 1177541050000000);
- Assert.equal("folder test comment",
- PlacesUtils.annotations.getItemAnnotation(folderNode.itemId,
- DESCRIPTION_ANNO));
- // open test folder, and test the children
- PlacesUtils.asQuery(folderNode);
- Assert.equal(folderNode.hasChildren, true);
- folderNode.containerOpen = true;
- Assert.equal(folderNode.childCount, 1);
-
- let bookmarkNode = folderNode.getChild(0);
- Assert.equal("http://test/post", bookmarkNode.uri);
- Assert.equal("test post keyword", bookmarkNode.title);
-
- let entry = yield PlacesUtils.keywords.fetch({ url: bookmarkNode.uri });
- Assert.equal("test", entry.keyword);
- Assert.equal("hidden1%3Dbar&text1%3D%25s", entry.postData);
-
- Assert.ok(PlacesUtils.annotations.itemHasAnnotation(bookmarkNode.itemId,
- LOAD_IN_SIDEBAR_ANNO));
- Assert.equal(bookmarkNode.dateAdded, 1177375336000000);
- Assert.equal(bookmarkNode.lastModified, 1177375423000000);
-
- Assert.equal((yield PlacesUtils.getCharsetForURI(NetUtil.newURI(bookmarkNode.uri))),
- "ISO-8859-1");
-
- Assert.equal("item description",
- PlacesUtils.annotations.getItemAnnotation(bookmarkNode.itemId,
- DESCRIPTION_ANNO));
-
- // clean up
- folderNode.containerOpen = false;
- root.containerOpen = false;
-
- // BOOKMARKS TOOLBAR
- root = PlacesUtils.getFolderContents(PlacesUtils.toolbarFolderId).root;
- Assert.equal(root.childCount, 3);
-
- // For now some promises are resolved later, so we can't guarantee an order.
- let foundLivemark = false;
- for (let i = 0; i < root.childCount; ++i) {
- let node = root.getChild(i);
- if (node.title == "Latest Headlines") {
- foundLivemark = true;
- Assert.equal("Latest Headlines", node.title);
-
- let livemark = yield PlacesUtils.livemarks.getLivemark({ guid: node.bookmarkGuid });
- Assert.equal("http://en-us.fxfeeds.mozilla.com/en-US/firefox/livebookmarks/",
- livemark.siteURI.spec);
- Assert.equal("http://en-us.fxfeeds.mozilla.com/en-US/firefox/headlines.xml",
- livemark.feedURI.spec);
- }
- }
- Assert.ok(foundLivemark);
-
- // cleanup
- root.containerOpen = false;
-
- // UNFILED BOOKMARKS
- root = PlacesUtils.getFolderContents(PlacesUtils.unfiledBookmarksFolderId).root;
- Assert.equal(root.childCount, 1);
- root.containerOpen = false;
-
- // favicons
- yield new Promise(resolve => {
- PlacesUtils.favicons.getFaviconDataForPage(uri(TEST_FAVICON_PAGE_URL),
- (aURI, aDataLen, aData, aMimeType) => {
- // aURI should never be null when aDataLen > 0.
- Assert.notEqual(aURI, null);
- // Favicon data is stored in the bookmarks file as a "data:" URI. For
- // simplicity, instead of converting the data we receive to a "data:" URI
- // and comparing it, we just check the data size.
- Assert.equal(TEST_FAVICON_DATA_SIZE, aDataLen);
- resolve();
- });
- });
-});
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
deleted file mode 100644
index e4ba433a34..0000000000
--- a/toolkit/components/places/tests/unit/test_bookmarks_html_import_tags.js
+++ /dev/null
@@ -1,57 +0,0 @@
-var bookmarkData = [
- { uri: uri("http://www.toastytech.com"),
- title: "Nathan's Toasty Technology Page",
- tags: ["technology", "personal", "retro"] },
- { uri: uri("http://www.reddit.com"),
- title: "reddit: the front page of the internet",
- tags: ["social media", "news", "humour"] },
- { uri: uri("http://www.4chan.org"),
- title: "4chan",
- tags: ["discussion", "imageboard", "anime"] }
-];
-
-/*
- TEST SUMMARY
- - Add bookmarks with tags
- - Export tagged bookmarks as HTML file
- - Delete bookmarks
- - Import bookmarks from HTML file
- - Check that all bookmarks are successfully imported with tags
-*/
-
-add_task(function* test_import_tags() {
- // Removes bookmarks.html if the file already exists.
- let HTMLFile = OS.Path.join(OS.Constants.Path.profileDir, "bookmarks.html");
- if ((yield OS.File.exists(HTMLFile)))
- yield OS.File.remove(HTMLFile);
-
- // Adds bookmarks and tags to the database.
- let bookmarkList = new Set();
- for (let { uri, title, tags } of bookmarkData) {
- bookmarkList.add(yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- url: uri,
- title }));
- PlacesUtils.tagging.tagURI(uri, tags);
- }
-
- // Exports the bookmarks as a HTML file.
- yield BookmarkHTMLUtils.exportToFile(HTMLFile);
-
- // Deletes bookmarks and tags from the database.
- for (let bookmark of bookmarkList) {
- yield PlacesUtils.bookmarks.remove(bookmark.guid);
- }
-
- // Re-imports the bookmarks from the HTML file.
- yield BookmarkHTMLUtils.importFromFile(HTMLFile, true);
-
- // Tests to ensure that the tags are still present for each bookmark URI.
- for (let { uri, tags } of bookmarkData) {
- do_print("Test tags for " + uri.spec + ": " + tags + "\n");
- let foundTags = PlacesUtils.tagging.getTagsForURI(uri);
- Assert.equal(foundTags.length, tags.length);
- Assert.ok(tags.every(tag => foundTags.includes(tag)));
- }
-});
-
diff --git a/toolkit/components/places/tests/unit/test_bookmarks_html_singleframe.js b/toolkit/components/places/tests/unit/test_bookmarks_html_singleframe.js
deleted file mode 100644
index 02b430ff23..0000000000
--- a/toolkit/components/places/tests/unit/test_bookmarks_html_singleframe.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-// Test for bug #801450
-
-// Get Services
-Cu.import("resource://gre/modules/BookmarkHTMLUtils.jsm");
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_bookmarks_html_singleframe()
-{
- let bookmarksFile = OS.Path.join(do_get_cwd().path, "bookmarks_html_singleframe.html");
- yield BookmarkHTMLUtils.importFromFile(bookmarksFile, true);
-
- let root = PlacesUtils.getFolderContents(PlacesUtils.bookmarksMenuFolderId).root;
- do_check_eq(root.childCount, 1);
- let folder = root.getChild(0);
- PlacesUtils.asContainer(folder).containerOpen = true;
- do_check_eq(folder.title, "Subtitle");
- do_check_eq(folder.childCount, 1);
- let bookmark = folder.getChild(0);
- do_check_eq(bookmark.uri, "http://www.mozilla.org/");
- do_check_eq(bookmark.title, "Mozilla");
- folder.containerOpen = false;
-});
diff --git a/toolkit/components/places/tests/unit/test_bookmarks_json.js b/toolkit/components/places/tests/unit/test_bookmarks_json.js
deleted file mode 100644
index a6801540a7..0000000000
--- a/toolkit/components/places/tests/unit/test_bookmarks_json.js
+++ /dev/null
@@ -1,241 +0,0 @@
-/* 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/. */
-
-Cu.import("resource://gre/modules/BookmarkJSONUtils.jsm");
-
-function run_test() {
- run_next_test();
-}
-
-const LOAD_IN_SIDEBAR_ANNO = "bookmarkProperties/loadInSidebar";
-const DESCRIPTION_ANNO = "bookmarkProperties/description";
-
-// An object representing the contents of bookmarks.json.
-var test_bookmarks = {
- menu: [
- { guid: "OCyeUO5uu9FF",
- title: "Mozilla Firefox",
- children: [
- { guid:"OCyeUO5uu9FG",
- title: "Help and Tutorials",
- url: "http://en-us.www.mozilla.com/en-US/firefox/help/",
- icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg=="
- },
- { guid:"OCyeUO5uu9FH",
- title: "Customize Firefox",
- url: "http://en-us.www.mozilla.com/en-US/firefox/customize/",
- icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg=="
- },
- { guid:"OCyeUO5uu9FI",
- title: "Get Involved",
- url: "http://en-us.www.mozilla.com/en-US/firefox/community/",
- icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg=="
- },
- { guid:"OCyeUO5uu9FJ",
- title: "About Us",
- url: "http://en-us.www.mozilla.com/en-US/about/",
- icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg=="
- }
- ]
- },
- {
- guid: "OCyeUO5uu9FK",
- type: Ci.nsINavHistoryResultNode.RESULT_TYPE_SEPARATOR
- },
- {
- guid:"OCyeUO5uu9FL",
- title: "test",
- description: "folder test comment",
- dateAdded: 1177541020000000,
- // lastModified: 1177541050000000,
- children: [
- { guid:"OCyeUO5uu9GX",
- title: "test post keyword",
- description: "item description",
- dateAdded: 1177375336000000,
- // lastModified: 1177375423000000,
- keyword: "test",
- sidebar: true,
- postData: "hidden1%3Dbar&text1%3D%25s",
- charset: "ISO-8859-1"
- }
- ]
- }
- ],
- toolbar: [
- { guid: "OCyeUO5uu9FB",
- title: "Getting Started",
- url: "http://en-us.www.mozilla.com/en-US/firefox/central/",
- icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJmTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwxYCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAECCJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzgABBgAMJ5THwGvJLAAAAABJRU5ErkJggg=="
- },
- { guid:"OCyeUO5uu9FR",
- title: "Latest Headlines",
- url: "http://en-us.fxfeeds.mozilla.com/en-US/firefox/livebookmarks/",
- feedUrl: "http://en-us.fxfeeds.mozilla.com/en-US/firefox/headlines.xml"
- }
- ],
- unfiled: [
- { guid: "OCyeUO5uu9FW",
- title: "Example.tld",
- url: "http://example.tld/"
- }
- ]
-};
-
-// Exported bookmarks file pointer.
-var bookmarksExportedFile;
-
-add_task(function* test_import_bookmarks() {
- let bookmarksFile = OS.Path.join(do_get_cwd().path, "bookmarks.json");
-
- yield BookmarkJSONUtils.importFromFile(bookmarksFile, true);
- yield PlacesTestUtils.promiseAsyncUpdates();
- yield testImportedBookmarks();
-});
-
-add_task(function* test_export_bookmarks() {
- bookmarksExportedFile = OS.Path.join(OS.Constants.Path.profileDir,
- "bookmarks.exported.json");
- yield BookmarkJSONUtils.exportToFile(bookmarksExportedFile);
- yield PlacesTestUtils.promiseAsyncUpdates();
-});
-
-add_task(function* test_import_exported_bookmarks() {
- yield PlacesUtils.bookmarks.eraseEverything();
- yield BookmarkJSONUtils.importFromFile(bookmarksExportedFile, true);
- yield PlacesTestUtils.promiseAsyncUpdates();
- yield testImportedBookmarks();
-});
-
-add_task(function* test_import_ontop() {
- yield PlacesUtils.bookmarks.eraseEverything();
- yield BookmarkJSONUtils.importFromFile(bookmarksExportedFile, true);
- yield PlacesTestUtils.promiseAsyncUpdates();
- yield BookmarkJSONUtils.exportToFile(bookmarksExportedFile);
- yield PlacesTestUtils.promiseAsyncUpdates();
- yield BookmarkJSONUtils.importFromFile(bookmarksExportedFile, true);
- yield PlacesTestUtils.promiseAsyncUpdates();
- yield testImportedBookmarks();
-});
-
-add_task(function* test_clean() {
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-function* testImportedBookmarks() {
- for (let group in test_bookmarks) {
- do_print("[testImportedBookmarks()] Checking group '" + group + "'");
-
- let root;
- switch (group) {
- case "menu":
- root =
- PlacesUtils.getFolderContents(PlacesUtils.bookmarksMenuFolderId).root;
- break;
- case "toolbar":
- root =
- PlacesUtils.getFolderContents(PlacesUtils.toolbarFolderId).root;
- break;
- case "unfiled":
- root =
- PlacesUtils.getFolderContents(PlacesUtils.unfiledBookmarksFolderId).root;
- break;
- }
-
- let items = test_bookmarks[group];
- do_check_eq(root.childCount, items.length);
-
- for (let key in items) {
- yield checkItem(items[key], root.getChild(key));
- }
-
- root.containerOpen = false;
- }
-}
-
-function* checkItem(aExpected, aNode) {
- let id = aNode.itemId;
-
- return Task.spawn(function* () {
- for (prop in aExpected) {
- switch (prop) {
- case "type":
- do_check_eq(aNode.type, aExpected.type);
- break;
- case "title":
- do_check_eq(aNode.title, aExpected.title);
- break;
- case "description":
- do_check_eq(PlacesUtils.annotations.getItemAnnotation(
- id, DESCRIPTION_ANNO), aExpected.description);
- break;
- case "dateAdded":
- do_check_eq(PlacesUtils.bookmarks.getItemDateAdded(id),
- aExpected.dateAdded);
- break;
- case "lastModified":
- do_check_eq(PlacesUtils.bookmarks.getItemLastModified(id),
- aExpected.lastModified);
- break;
- case "url":
- if (!("feedUrl" in aExpected))
- do_check_eq(aNode.uri, aExpected.url);
- break;
- case "icon":
- let deferred = Promise.defer();
- PlacesUtils.favicons.getFaviconDataForPage(
- NetUtil.newURI(aExpected.url),
- function (aURI, aDataLen, aData, aMimeType) {
- deferred.resolve(aData);
- });
- let data = yield deferred.promise;
- let base64Icon = "data:image/png;base64," +
- base64EncodeString(String.fromCharCode.apply(String, data));
- do_check_true(base64Icon == aExpected.icon);
- break;
- case "keyword": {
- let entry = yield PlacesUtils.keywords.fetch({ url: aNode.uri });
- Assert.equal(entry.keyword, aExpected.keyword);
- break;
- }
- case "guid":
- let guid = yield PlacesUtils.promiseItemGuid(id);
- do_check_eq(guid, aExpected.guid);
- break;
- case "sidebar":
- do_check_eq(PlacesUtils.annotations.itemHasAnnotation(
- id, LOAD_IN_SIDEBAR_ANNO), aExpected.sidebar);
- break;
- case "postData": {
- let entry = yield PlacesUtils.keywords.fetch({ url: aNode.uri });
- Assert.equal(entry.postData, aExpected.postData);
- break;
- }
- case "charset":
- let testURI = NetUtil.newURI(aNode.uri);
- do_check_eq((yield PlacesUtils.getCharsetForURI(testURI)), aExpected.charset);
- break;
- case "feedUrl":
- let livemark = yield PlacesUtils.livemarks.getLivemark({ id: id });
- do_check_eq(livemark.siteURI.spec, aExpected.url);
- do_check_eq(livemark.feedURI.spec, aExpected.feedUrl);
- break;
- case "children":
- let folder = aNode.QueryInterface(Ci.nsINavHistoryContainerResultNode);
- do_check_eq(folder.hasChildren, aExpected.children.length > 0);
- folder.containerOpen = true;
- do_check_eq(folder.childCount, aExpected.children.length);
-
- for (let index = 0; index < aExpected.children.length; index++) {
- yield checkItem(aExpected.children[index], folder.getChild(index));
- }
-
- folder.containerOpen = false;
- break;
- default:
- throw new Error("Unknown property");
- }
- }
- });
-}
diff --git a/toolkit/components/places/tests/unit/test_bookmarks_restore_notification.js b/toolkit/components/places/tests/unit/test_bookmarks_restore_notification.js
deleted file mode 100644
index 2f8022c6b6..0000000000
--- a/toolkit/components/places/tests/unit/test_bookmarks_restore_notification.js
+++ /dev/null
@@ -1,325 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-Cu.import("resource://gre/modules/BookmarkHTMLUtils.jsm");
-
-/**
- * Tests the bookmarks-restore-* nsIObserver notifications after restoring
- * bookmarks from JSON and HTML. See bug 470314.
- */
-
-// The topics and data passed to nsIObserver.observe() on bookmarks restore
-const NSIOBSERVER_TOPIC_BEGIN = "bookmarks-restore-begin";
-const NSIOBSERVER_TOPIC_SUCCESS = "bookmarks-restore-success";
-const NSIOBSERVER_TOPIC_FAILED = "bookmarks-restore-failed";
-const NSIOBSERVER_DATA_JSON = "json";
-const NSIOBSERVER_DATA_HTML = "html";
-const NSIOBSERVER_DATA_HTML_INIT = "html-initial";
-
-// Bookmarks are added for these URIs
-var uris = [
- "http://example.com/1",
- "http://example.com/2",
- "http://example.com/3",
- "http://example.com/4",
- "http://example.com/5",
-];
-
-/**
- * Adds some bookmarks for the URIs in |uris|.
- */
-function* addBookmarks() {
- for (let url of uris) {
- yield PlacesUtils.bookmarks.insert({
- url: url, parentGuid: PlacesUtils.bookmarks.menuGuid
- })
- }
- checkBookmarksExist();
-}
-
-/**
- * Checks that all of the bookmarks created for |uris| exist. It works by
- * creating one query per URI and then ORing all the queries. The number of
- * results returned should be uris.length.
- */
-function checkBookmarksExist() {
- let hs = PlacesUtils.history;
- let queries = uris.map(function (u) {
- let q = hs.getNewQuery();
- q.uri = uri(u);
- return q;
- });
- let options = hs.getNewQueryOptions();
- options.queryType = options.QUERY_TYPE_BOOKMARKS;
- let root = hs.executeQueries(queries, uris.length, options).root;
- root.containerOpen = true;
- Assert.equal(root.childCount, uris.length);
- root.containerOpen = false;
-}
-
-/**
- * Creates an file in the profile directory.
- *
- * @param aBasename
- * e.g., "foo.txt" in the path /some/long/path/foo.txt
- * @return {Promise}
- * @resolves to an OS.File path
- */
-function promiseFile(aBasename) {
- let path = OS.Path.join(OS.Constants.Path.profileDir, aBasename);
- do_print("opening " + path);
- return OS.File.open(path, { truncate: true })
- .then(aFile => {
- aFile.close();
- return path;
- });
-}
-
-/**
- * Register observers via promiseTopicObserved helper.
- *
- * @param {boolean} expectSuccess pass true when expect a success notification
- * @return {Promise[]}
- */
-function registerObservers(expectSuccess) {
- let promiseBegin = promiseTopicObserved(NSIOBSERVER_TOPIC_BEGIN);
- let promiseResult;
- if (expectSuccess) {
- promiseResult = promiseTopicObserved(NSIOBSERVER_TOPIC_SUCCESS);
- } else {
- promiseResult = promiseTopicObserved(NSIOBSERVER_TOPIC_FAILED);
- }
-
- return [promiseBegin, promiseResult];
-}
-
-/**
- * Check notification results.
- *
- * @param {Promise[]} expectPromises array contain promiseBegin and promiseResult
- * @param {object} expectedData contain data and folderId
- */
-function* checkObservers(expectPromises, expectedData) {
- let [promiseBegin, promiseResult] = expectPromises;
-
- let beginData = (yield promiseBegin)[1];
- Assert.equal(beginData, expectedData.data,
- "Data for current test should be what is expected");
-
- let [resultSubject, resultData] = yield promiseResult;
- Assert.equal(resultData, expectedData.data,
- "Data for current test should be what is expected");
-
- // Make sure folder ID is what is expected. For importing HTML into a
- // folder, this will be an integer, otherwise null.
- if (resultSubject) {
- Assert.equal(aSubject.QueryInterface(Ci.nsISupportsPRInt64).data,
- expectedData.folderId);
- } else {
- Assert.equal(expectedData.folderId, null);
- }
-}
-
-/**
- * Run after every test cases.
- */
-function* teardown(file, begin, success, fail) {
- // On restore failed, file may not exist, so wrap in try-catch.
- try {
- yield OS.File.remove(file, {ignoreAbsent: true});
- } catch (e) {}
-
- // clean up bookmarks
- yield PlacesUtils.bookmarks.eraseEverything();
-}
-
-add_task(function* test_json_restore_normal() {
- // data: the data passed to nsIObserver.observe() corresponding to the test
- // folderId: for HTML restore into a folder, the folder ID to restore into;
- // otherwise, set it to null
- let expectedData = {
- data: NSIOBSERVER_DATA_JSON,
- folderId: null
- }
- let expectPromises = registerObservers(true);
-
- do_print("JSON restore: normal restore should succeed");
- let file = yield promiseFile("bookmarks-test_restoreNotification.json");
- yield addBookmarks();
-
- yield BookmarkJSONUtils.exportToFile(file);
- yield PlacesUtils.bookmarks.eraseEverything();
- try {
- yield BookmarkJSONUtils.importFromFile(file, true);
- } catch (e) {
- do_throw(" Restore should not have failed" + e);
- }
-
- yield checkObservers(expectPromises, expectedData);
- yield teardown(file);
-});
-
-add_task(function* test_json_restore_empty() {
- let expectedData = {
- data: NSIOBSERVER_DATA_JSON,
- folderId: null
- }
- let expectPromises = registerObservers(true);
-
- do_print("JSON restore: empty file should succeed");
- let file = yield promiseFile("bookmarks-test_restoreNotification.json");
- try {
- yield BookmarkJSONUtils.importFromFile(file, true);
- } catch (e) {
- do_throw(" Restore should not have failed" + e);
- }
-
- yield checkObservers(expectPromises, expectedData);
- yield teardown(file);
-});
-
-add_task(function* test_json_restore_nonexist() {
- let expectedData = {
- data: NSIOBSERVER_DATA_JSON,
- folderId: null
- }
- let expectPromises = registerObservers(false);
-
- do_print("JSON restore: nonexistent file should fail");
- let file = Services.dirsvc.get("ProfD", Ci.nsILocalFile);
- file.append("this file doesn't exist because nobody created it 1");
- try {
- yield BookmarkJSONUtils.importFromFile(file, true);
- do_throw(" Restore should have failed");
- } catch (e) {}
-
- yield checkObservers(expectPromises, expectedData);
- yield teardown(file);
-});
-
-add_task(function* test_html_restore_normal() {
- let expectedData = {
- data: NSIOBSERVER_DATA_HTML,
- folderId: null
- }
- let expectPromises = registerObservers(true);
-
- do_print("HTML restore: normal restore should succeed");
- let file = yield promiseFile("bookmarks-test_restoreNotification.html");
- yield addBookmarks();
- yield BookmarkHTMLUtils.exportToFile(file);
- yield PlacesUtils.bookmarks.eraseEverything();
- try {
- BookmarkHTMLUtils.importFromFile(file, false)
- .then(null, do_report_unexpected_exception);
- } catch (e) {
- do_throw(" Restore should not have failed");
- }
-
- yield checkObservers(expectPromises, expectedData);
- yield teardown(file);
-});
-
-add_task(function* test_html_restore_empty() {
- let expectedData = {
- data: NSIOBSERVER_DATA_HTML,
- folderId: null
- }
- let expectPromises = registerObservers(true);
-
- do_print("HTML restore: empty file should succeed");
- let file = yield promiseFile("bookmarks-test_restoreNotification.init.html");
- try {
- BookmarkHTMLUtils.importFromFile(file, false)
- .then(null, do_report_unexpected_exception);
- } catch (e) {
- do_throw(" Restore should not have failed");
- }
-
- yield checkObservers(expectPromises, expectedData);
- yield teardown(file);
-});
-
-add_task(function* test_html_restore_nonexist() {
- let expectedData = {
- data: NSIOBSERVER_DATA_HTML,
- folderId: null
- }
- let expectPromises = registerObservers(false);
-
- do_print("HTML restore: nonexistent file should fail");
- let file = Services.dirsvc.get("ProfD", Ci.nsILocalFile);
- file.append("this file doesn't exist because nobody created it 2");
- try {
- yield BookmarkHTMLUtils.importFromFile(file, false);
- do_throw("Should fail!");
- } catch (e) {}
-
- yield checkObservers(expectPromises, expectedData);
- yield teardown(file);
-});
-
-add_task(function* test_html_init_restore_normal() {
- let expectedData = {
- data: NSIOBSERVER_DATA_HTML_INIT,
- folderId: null
- }
- let expectPromises = registerObservers(true);
-
- do_print("HTML initial restore: normal restore should succeed");
- let file = yield promiseFile("bookmarks-test_restoreNotification.init.html");
- yield addBookmarks();
- yield BookmarkHTMLUtils.exportToFile(file);
- yield PlacesUtils.bookmarks.eraseEverything();
- try {
- BookmarkHTMLUtils.importFromFile(file, true)
- .then(null, do_report_unexpected_exception);
- } catch (e) {
- do_throw(" Restore should not have failed");
- }
-
- yield checkObservers(expectPromises, expectedData);
- yield teardown(file);
-});
-
-add_task(function* test_html_init_restore_empty() {
- let expectedData = {
- data: NSIOBSERVER_DATA_HTML_INIT,
- folderId: null
- }
- let expectPromises = registerObservers(true);
-
- do_print("HTML initial restore: empty file should succeed");
- let file = yield promiseFile("bookmarks-test_restoreNotification.init.html");
- try {
- BookmarkHTMLUtils.importFromFile(file, true)
- .then(null, do_report_unexpected_exception);
- } catch (e) {
- do_throw(" Restore should not have failed");
- }
-
- yield checkObservers(expectPromises, expectedData);
- yield teardown(file);
-});
-
-add_task(function* test_html_init_restore_nonexist() {
- let expectedData = {
- data: NSIOBSERVER_DATA_HTML_INIT,
- folderId: null
- }
- let expectPromises = registerObservers(false);
-
- do_print("HTML initial restore: nonexistent file should fail");
- let file = Services.dirsvc.get("ProfD", Ci.nsILocalFile);
- file.append("this file doesn't exist because nobody created it 3");
- try {
- yield BookmarkHTMLUtils.importFromFile(file, true);
- do_throw("Should fail!");
- } catch (e) {}
-
- yield checkObservers(expectPromises, expectedData);
- yield teardown(file);
-});
diff --git a/toolkit/components/places/tests/unit/test_bookmarks_setNullTitle.js b/toolkit/components/places/tests/unit/test_bookmarks_setNullTitle.js
deleted file mode 100644
index 959dfe85f9..0000000000
--- a/toolkit/components/places/tests/unit/test_bookmarks_setNullTitle.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/**
- * Both SetItemtitle and insertBookmark should allow for null titles.
- */
-
-const bs = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
-
-const TEST_URL = "http://www.mozilla.org";
-
-function run_test() {
- // Insert a bookmark with an empty title.
- var itemId = bs.insertBookmark(bs.toolbarFolder,
- uri(TEST_URL),
- bs.DEFAULT_INDEX,
- "");
- // Check returned title is an empty string.
- do_check_eq(bs.getItemTitle(itemId), "");
- // Set title to null.
- bs.setItemTitle(itemId, null);
- // Check returned title is null.
- do_check_eq(bs.getItemTitle(itemId), null);
- // Cleanup.
- bs.removeItem(itemId);
-
- // Insert a bookmark with a null title.
- itemId = bs.insertBookmark(bs.toolbarFolder,
- uri(TEST_URL),
- bs.DEFAULT_INDEX,
- null);
- // Check returned title is null.
- do_check_eq(bs.getItemTitle(itemId), null);
- // Set title to an empty string.
- bs.setItemTitle(itemId, "");
- // Check returned title is an empty string.
- do_check_eq(bs.getItemTitle(itemId), "");
- // Cleanup.
- bs.removeItem(itemId);
-}
diff --git a/toolkit/components/places/tests/unit/test_broken_folderShortcut_result.js b/toolkit/components/places/tests/unit/test_broken_folderShortcut_result.js
deleted file mode 100644
index b67e141e66..0000000000
--- a/toolkit/components/places/tests/unit/test_broken_folderShortcut_result.js
+++ /dev/null
@@ -1,79 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_execute()
-{
- PlacesUtils.bookmarks.insertBookmark(
- PlacesUtils.unfiledBookmarksFolderId, NetUtil.newURI("http://1.moz.org/"),
- PlacesUtils.bookmarks.DEFAULT_INDEX, "Bookmark 1"
- );
- let id1 = PlacesUtils.bookmarks.insertBookmark(
- PlacesUtils.unfiledBookmarksFolderId, NetUtil.newURI("place:folder=1234"),
- PlacesUtils.bookmarks.DEFAULT_INDEX, "Shortcut 1"
- );
- let id2 = PlacesUtils.bookmarks.insertBookmark(
- PlacesUtils.unfiledBookmarksFolderId, NetUtil.newURI("place:folder=-1"),
- PlacesUtils.bookmarks.DEFAULT_INDEX, "Shortcut 2"
- );
- PlacesUtils.bookmarks.insertBookmark(
- PlacesUtils.unfiledBookmarksFolderId, NetUtil.newURI("http://2.moz.org/"),
- PlacesUtils.bookmarks.DEFAULT_INDEX, "Bookmark 2"
- );
-
- // Add also a simple visit.
- yield PlacesTestUtils.addVisits(uri(("http://3.moz.org/")));
-
- // Query containing a broken folder shortcuts among results.
- let query = PlacesUtils.history.getNewQuery();
- query.setFolders([PlacesUtils.unfiledBookmarksFolderId], 1);
- let options = PlacesUtils.history.getNewQueryOptions();
- let root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
-
- do_check_eq(root.childCount, 4);
-
- let shortcut = root.getChild(1);
- do_check_eq(shortcut.uri, "place:folder=1234");
- PlacesUtils.asContainer(shortcut);
- shortcut.containerOpen = true;
- do_check_eq(shortcut.childCount, 0);
- shortcut.containerOpen = false;
- // Remove the broken shortcut while the containing result is open.
- PlacesUtils.bookmarks.removeItem(id1);
- do_check_eq(root.childCount, 3);
-
- shortcut = root.getChild(1);
- do_check_eq(shortcut.uri, "place:folder=-1");
- PlacesUtils.asContainer(shortcut);
- shortcut.containerOpen = true;
- do_check_eq(shortcut.childCount, 0);
- shortcut.containerOpen = false;
- // Remove the broken shortcut while the containing result is open.
- PlacesUtils.bookmarks.removeItem(id2);
- do_check_eq(root.childCount, 2);
-
- root.containerOpen = false;
-
- // Broken folder shortcut as root node.
- query = PlacesUtils.history.getNewQuery();
- query.setFolders([1234], 1);
- options = PlacesUtils.history.getNewQueryOptions();
- root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 0);
- root.containerOpen = false;
-
- // Broken folder shortcut as root node with folder=-1.
- query = PlacesUtils.history.getNewQuery();
- query.setFolders([-1], 1);
- options = PlacesUtils.history.getNewQueryOptions();
- root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 0);
- root.containerOpen = false;
-});
diff --git a/toolkit/components/places/tests/unit/test_browserhistory.js b/toolkit/components/places/tests/unit/test_browserhistory.js
deleted file mode 100644
index 5f88c26e3a..0000000000
--- a/toolkit/components/places/tests/unit/test_browserhistory.js
+++ /dev/null
@@ -1,129 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-const TEST_URI = NetUtil.newURI("http://mozilla.com/");
-const TEST_SUBDOMAIN_URI = NetUtil.newURI("http://foobar.mozilla.com/");
-
-add_task(function* test_addPage() {
- yield PlacesTestUtils.addVisits(TEST_URI);
- do_check_eq(1, PlacesUtils.history.hasHistoryEntries);
-});
-
-add_task(function* test_removePage() {
- PlacesUtils.bhistory.removePage(TEST_URI);
- do_check_eq(0, PlacesUtils.history.hasHistoryEntries);
-});
-
-add_task(function* test_removePages() {
- let pages = [];
- for (let i = 0; i < 8; i++) {
- pages.push(NetUtil.newURI(TEST_URI.spec + i));
- }
-
- yield PlacesTestUtils.addVisits(pages.map(uri => ({ uri: uri })));
- // Bookmarked item should not be removed from moz_places.
- const ANNO_INDEX = 1;
- const ANNO_NAME = "testAnno";
- const ANNO_VALUE = "foo";
- const BOOKMARK_INDEX = 2;
- PlacesUtils.annotations.setPageAnnotation(pages[ANNO_INDEX],
- ANNO_NAME, ANNO_VALUE, 0,
- Ci.nsIAnnotationService.EXPIRE_NEVER);
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- pages[BOOKMARK_INDEX],
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "test bookmark");
- PlacesUtils.annotations.setPageAnnotation(pages[BOOKMARK_INDEX],
- ANNO_NAME, ANNO_VALUE, 0,
- Ci.nsIAnnotationService.EXPIRE_NEVER);
-
- PlacesUtils.bhistory.removePages(pages, pages.length);
- do_check_eq(0, PlacesUtils.history.hasHistoryEntries);
-
- // Check that the bookmark and its annotation still exist.
- do_check_true(PlacesUtils.bookmarks.getIdForItemAt(PlacesUtils.unfiledBookmarksFolderId, 0) > 0);
- do_check_eq(PlacesUtils.annotations.getPageAnnotation(pages[BOOKMARK_INDEX], ANNO_NAME),
- ANNO_VALUE);
-
- // Check the annotation on the non-bookmarked page does not exist anymore.
- try {
- PlacesUtils.annotations.getPageAnnotation(pages[ANNO_INDEX], ANNO_NAME);
- do_throw("did not expire expire_never anno on a not bookmarked item");
- } catch (ex) {}
-
- // Cleanup.
- PlacesUtils.bookmarks.removeFolderChildren(PlacesUtils.unfiledBookmarksFolderId);
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* test_removePagesByTimeframe() {
- let visits = [];
- let startDate = (Date.now() - 10000) * 1000;
- for (let i = 0; i < 10; i++) {
- visits.push({
- uri: NetUtil.newURI(TEST_URI.spec + i),
- visitDate: startDate + i * 1000
- });
- }
-
- yield PlacesTestUtils.addVisits(visits);
-
- // Delete all pages except the first and the last.
- PlacesUtils.bhistory.removePagesByTimeframe(startDate + 1000, startDate + 8000);
-
- // Check that we have removed the correct pages.
- for (let i = 0; i < 10; i++) {
- do_check_eq(page_in_database(NetUtil.newURI(TEST_URI.spec + i)) == 0,
- i > 0 && i < 9);
- }
-
- // Clear remaining items and check that all pages have been removed.
- PlacesUtils.bhistory.removePagesByTimeframe(startDate, startDate + 9000);
- do_check_eq(0, PlacesUtils.history.hasHistoryEntries);
-});
-
-add_task(function* test_removePagesFromHost() {
- yield PlacesTestUtils.addVisits(TEST_URI);
- PlacesUtils.bhistory.removePagesFromHost("mozilla.com", true);
- do_check_eq(0, PlacesUtils.history.hasHistoryEntries);
-});
-
-add_task(function* test_removePagesFromHost_keepSubdomains() {
- yield PlacesTestUtils.addVisits([{ uri: TEST_URI }, { uri: TEST_SUBDOMAIN_URI }]);
- PlacesUtils.bhistory.removePagesFromHost("mozilla.com", false);
- do_check_eq(1, PlacesUtils.history.hasHistoryEntries);
-});
-
-add_task(function* test_history_clear() {
- yield PlacesTestUtils.clearHistory();
- do_check_eq(0, PlacesUtils.history.hasHistoryEntries);
-});
-
-add_task(function* test_getObservers() {
- // Ensure that getObservers() invalidates the hasHistoryEntries cache.
- yield PlacesTestUtils.addVisits(TEST_URI);
- do_check_eq(1, PlacesUtils.history.hasHistoryEntries);
- // This is just for testing purposes, never do it.
- return new Promise((resolve, reject) => {
- DBConn().executeSimpleSQLAsync("DELETE FROM moz_historyvisits", {
- handleError: function(error) {
- reject(error);
- },
- handleResult: function(result) {
- },
- handleCompletion: function(result) {
- // Just invoking getObservers should be enough to invalidate the cache.
- PlacesUtils.history.getObservers();
- do_check_eq(0, PlacesUtils.history.hasHistoryEntries);
- resolve();
- }
- });
- });
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/places/tests/unit/test_bug636917_isLivemark.js b/toolkit/components/places/tests/unit/test_bug636917_isLivemark.js
deleted file mode 100644
index a7ad1257ad..0000000000
--- a/toolkit/components/places/tests/unit/test_bug636917_isLivemark.js
+++ /dev/null
@@ -1,35 +0,0 @@
-// Test that asking for a livemark in a annotationChanged notification works.
-add_task(function* () {
- let annoPromise = new Promise(resolve => {
- let annoObserver = {
- onItemAnnotationSet(id, name) {
- if (name == PlacesUtils.LMANNO_FEEDURI) {
- PlacesUtils.annotations.removeObserver(this);
- resolve();
- }
- },
- onItemAnnotationRemoved() {},
- onPageAnnotationSet() {},
- onPageAnnotationRemoved() {},
- QueryInterface: XPCOMUtils.generateQI([
- Ci.nsIAnnotationObserver
- ]),
- };
- PlacesUtils.annotations.addObserver(annoObserver, false);
- });
-
-
- let livemark = yield PlacesUtils.livemarks.addLivemark(
- { title: "livemark title"
- , parentGuid: PlacesUtils.bookmarks.unfiledGuid
- , index: PlacesUtils.bookmarks.DEFAULT_INDEX
- , siteURI: uri("http://example.com/")
- , feedURI: uri("http://example.com/rdf")
- });
-
- yield annoPromise;
-
- livemark = yield PlacesUtils.livemarks.getLivemark({ guid: livemark.guid });
- Assert.ok(livemark);
- yield PlacesUtils.livemarks.removeLivemark({ guid: livemark.guid });
-});
diff --git a/toolkit/components/places/tests/unit/test_childlessTags.js b/toolkit/components/places/tests/unit/test_childlessTags.js
deleted file mode 100644
index 4c3e38fa45..0000000000
--- a/toolkit/components/places/tests/unit/test_childlessTags.js
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/**
- * Ensures that removal of a bookmark untags the bookmark if it's no longer
- * contained in any regular, non-tag folders. See bug 444849.
- */
-
-// Add your tests here. Each is an object with a summary string |desc| and a
-// method run() that's called to run the test.
-var tests = [
- {
- desc: "Removing a tagged bookmark should cause the tag to be removed.",
- run: function () {
- print(" Make a bookmark.");
- var bmId = bmsvc.insertBookmark(bmsvc.unfiledBookmarksFolder,
- BOOKMARK_URI,
- bmsvc.DEFAULT_INDEX,
- "test bookmark");
- do_check_true(bmId > 0);
-
- print(" Tag it up.");
- var tags = ["foo", "bar"];
- tagssvc.tagURI(BOOKMARK_URI, tags);
- ensureTagsExist(tags);
-
- print(" Remove the bookmark. The tags should no longer exist.");
- bmsvc.removeItem(bmId);
- ensureTagsExist([]);
- }
- },
-
- {
- desc: "Removing a folder containing a tagged bookmark should cause the " +
- "tag to be removed.",
- run: function () {
- print(" Make a folder.");
- var folderId = bmsvc.createFolder(bmsvc.unfiledBookmarksFolder,
- "test folder",
- bmsvc.DEFAULT_INDEX);
- do_check_true(folderId > 0);
-
- print(" Stick a bookmark in the folder.");
- var bmId = bmsvc.insertBookmark(folderId,
- BOOKMARK_URI,
- bmsvc.DEFAULT_INDEX,
- "test bookmark");
- do_check_true(bmId > 0);
-
- print(" Tag the bookmark.");
- var tags = ["foo", "bar"];
- tagssvc.tagURI(BOOKMARK_URI, tags);
- ensureTagsExist(tags);
-
- print(" Remove the folder. The tags should no longer exist.");
- bmsvc.removeItem(folderId);
- ensureTagsExist([]);
- }
- }
-];
-
-var bmsvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
-
-var histsvc = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
-
-var tagssvc = Cc["@mozilla.org/browser/tagging-service;1"].
- getService(Ci.nsITaggingService);
-
-const BOOKMARK_URI = uri("http://example.com/");
-
-/**
- * Runs a tag query and ensures that the tags returned are those and only those
- * in aTags. aTags may be empty, in which case this function ensures that no
- * tags exist.
- *
- * @param aTags
- * An array of tags (strings)
- */
-function ensureTagsExist(aTags) {
- var query = histsvc.getNewQuery();
- var opts = histsvc.getNewQueryOptions();
- opts.resultType = opts.RESULTS_AS_TAG_QUERY;
- var resultRoot = histsvc.executeQuery(query, opts).root;
-
- // Dupe aTags.
- var tags = aTags.slice(0);
-
- resultRoot.containerOpen = true;
-
- // Ensure that the number of tags returned from the query is the same as the
- // number in |tags|.
- do_check_eq(resultRoot.childCount, tags.length);
-
- // For each tag result from the query, ensure that it's contained in |tags|.
- // Remove the tag from |tags| so that we ensure the sets are equal.
- for (let i = 0; i < resultRoot.childCount; i++) {
- var tag = resultRoot.getChild(i).title;
- var indexOfTag = tags.indexOf(tag);
- do_check_true(indexOfTag >= 0);
- tags.splice(indexOfTag, 1);
- }
-
- resultRoot.containerOpen = false;
-}
-
-function run_test()
-{
- tests.forEach(function (test) {
- print("Running test: " + test.desc);
- test.run();
- });
-}
diff --git a/toolkit/components/places/tests/unit/test_corrupt_telemetry.js b/toolkit/components/places/tests/unit/test_corrupt_telemetry.js
deleted file mode 100644
index cd9e9ec0c4..0000000000
--- a/toolkit/components/places/tests/unit/test_corrupt_telemetry.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Tests that history initialization correctly handles a request to forcibly
-// replace the current database.
-
-add_task(function* () {
- let profileDBPath = yield OS.Path.join(OS.Constants.Path.profileDir, "places.sqlite");
- yield OS.File.remove(profileDBPath, {ignoreAbsent: true});
- // Ensure that our database doesn't already exist.
- Assert.ok(!(yield OS.File.exists(profileDBPath)), "places.sqlite shouldn't exist");
- let dir = yield OS.File.getCurrentDirectory();
- let src = OS.Path.join(dir, "corruptDB.sqlite");
- yield OS.File.copy(src, profileDBPath);
- Assert.ok(yield OS.File.exists(profileDBPath), "places.sqlite should exist");
-
- let count = Services.telemetry
- .getHistogramById("PLACES_DATABASE_CORRUPTION_HANDLING_STAGE")
- .snapshot()
- .counts[3];
- Assert.equal(count, 0, "There should be no telemetry");
-
- do_check_eq(PlacesUtils.history.databaseStatus,
- PlacesUtils.history.DATABASE_STATUS_CORRUPT);
-
- count = Services.telemetry
- .getHistogramById("PLACES_DATABASE_CORRUPTION_HANDLING_STAGE")
- .snapshot()
- .counts[3];
- Assert.equal(count, 1, "Telemetry should have been added");
-});
diff --git a/toolkit/components/places/tests/unit/test_crash_476292.js b/toolkit/components/places/tests/unit/test_crash_476292.js
deleted file mode 100644
index 8f08620224..0000000000
--- a/toolkit/components/places/tests/unit/test_crash_476292.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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 tests a crash during startup found in bug 476292 that was caused by
- * getting the bookmarks service during nsNavHistory::Init when the bookmarks
- * service was created before the history service was.
- */
-
-function run_test()
-{
- // First, we need to move our old database file into our test profile
- // directory. This will trigger DATABASE_STATUS_UPGRADED (CREATE is not
- // sufficient since there will be no entries to update frecencies for, which
- // causes us to get the bookmarks service in the first place).
- let dbFile = do_get_file("bug476292.sqlite");
- let profD = Cc["@mozilla.org/file/directory_service;1"].
- getService(Ci.nsIProperties).
- get(NS_APP_USER_PROFILE_50_DIR, Ci.nsIFile);
- dbFile.copyTo(profD, "places.sqlite");
-
- // Now get the bookmarks service. This will crash when the bug exists.
- Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
-}
diff --git a/toolkit/components/places/tests/unit/test_database_replaceOnStartup.js b/toolkit/components/places/tests/unit/test_database_replaceOnStartup.js
deleted file mode 100644
index e83d0fdaeb..0000000000
--- a/toolkit/components/places/tests/unit/test_database_replaceOnStartup.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Tests that history initialization correctly handles a request to forcibly
-// replace the current database.
-
-function run_test() {
- // Ensure that our database doesn't already exist.
- let dbFile = gProfD.clone();
- dbFile.append("places.sqlite");
- do_check_false(dbFile.exists());
-
- dbFile = gProfD.clone();
- dbFile.append("places.sqlite.corrupt");
- do_check_false(dbFile.exists());
-
- let file = do_get_file("default.sqlite");
- file.copyToFollowingLinks(gProfD, "places.sqlite");
- file = gProfD.clone();
- file.append("places.sqlite");
-
- // Create some unique stuff to check later.
- let db = Services.storage.openUnsharedDatabase(file);
- db.executeSimpleSQL("CREATE TABLE test (id INTEGER PRIMARY KEY)");
- db.close();
-
- Services.prefs.setBoolPref("places.database.replaceOnStartup", true);
- do_check_eq(PlacesUtils.history.databaseStatus,
- PlacesUtils.history.DATABASE_STATUS_CORRUPT);
-
- dbFile = gProfD.clone();
- dbFile.append("places.sqlite");
- do_check_true(dbFile.exists());
-
- // Check the new database is really a new one.
- db = Services.storage.openUnsharedDatabase(file);
- try {
- db.executeSimpleSQL("DELETE * FROM test");
- do_throw("The new database should not have our unique content");
- } catch (ex) {}
- db.close();
-
- dbFile = gProfD.clone();
- dbFile.append("places.sqlite.corrupt");
- do_check_true(dbFile.exists());
-}
diff --git a/toolkit/components/places/tests/unit/test_download_history.js b/toolkit/components/places/tests/unit/test_download_history.js
deleted file mode 100644
index 643360b20a..0000000000
--- a/toolkit/components/places/tests/unit/test_download_history.js
+++ /dev/null
@@ -1,283 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * This file tests the nsIDownloadHistory Places implementation.
- */
-
-XPCOMUtils.defineLazyServiceGetter(this, "gDownloadHistory",
- "@mozilla.org/browser/download-history;1",
- "nsIDownloadHistory");
-
-const DOWNLOAD_URI = NetUtil.newURI("http://www.example.com/");
-const REFERRER_URI = NetUtil.newURI("http://www.example.org/");
-const PRIVATE_URI = NetUtil.newURI("http://www.example.net/");
-
-/**
- * Waits for the first visit notification to be received.
- *
- * @param aCallback
- * Callback function to be called with the same arguments of onVisit.
- */
-function waitForOnVisit(aCallback) {
- let historyObserver = {
- __proto__: NavHistoryObserver.prototype,
- onVisit: function HO_onVisit() {
- PlacesUtils.history.removeObserver(this);
- aCallback.apply(null, arguments);
- }
- };
- PlacesUtils.history.addObserver(historyObserver, false);
-}
-
-/**
- * Waits for the first onDeleteURI notification to be received.
- *
- * @param aCallback
- * Callback function to be called with the same arguments of onDeleteURI.
- */
-function waitForOnDeleteURI(aCallback) {
- let historyObserver = {
- __proto__: NavHistoryObserver.prototype,
- onDeleteURI: function HO_onDeleteURI() {
- PlacesUtils.history.removeObserver(this);
- aCallback.apply(null, arguments);
- }
- };
- PlacesUtils.history.addObserver(historyObserver, false);
-}
-
-/**
- * Waits for the first onDeleteVisits notification to be received.
- *
- * @param aCallback
- * Callback function to be called with the same arguments of onDeleteVisits.
- */
-function waitForOnDeleteVisits(aCallback) {
- let historyObserver = {
- __proto__: NavHistoryObserver.prototype,
- onDeleteVisits: function HO_onDeleteVisits() {
- PlacesUtils.history.removeObserver(this);
- aCallback.apply(null, arguments);
- }
- };
- PlacesUtils.history.addObserver(historyObserver, false);
-}
-
-function run_test()
-{
- run_next_test();
-}
-
-add_test(function test_dh_is_from_places()
-{
- // Test that this nsIDownloadHistory is the one places implements.
- do_check_true(gDownloadHistory instanceof Ci.mozIAsyncHistory);
-
- run_next_test();
-});
-
-add_test(function test_dh_addRemoveDownload()
-{
- waitForOnVisit(function DHAD_onVisit(aURI) {
- do_check_true(aURI.equals(DOWNLOAD_URI));
-
- // Verify that the URI is already available in results at this time.
- do_check_true(!!page_in_database(DOWNLOAD_URI));
-
- waitForOnDeleteURI(function DHRAD_onDeleteURI(aDeletedURI) {
- do_check_true(aDeletedURI.equals(DOWNLOAD_URI));
-
- // Verify that the URI is already available in results at this time.
- do_check_false(!!page_in_database(DOWNLOAD_URI));
-
- run_next_test();
- });
- gDownloadHistory.removeAllDownloads();
- });
-
- gDownloadHistory.addDownload(DOWNLOAD_URI, null, Date.now() * 1000);
-});
-
-add_test(function test_dh_addMultiRemoveDownload()
-{
- PlacesTestUtils.addVisits({
- uri: DOWNLOAD_URI,
- transition: TRANSITION_TYPED
- }).then(function () {
- waitForOnVisit(function DHAD_onVisit(aURI) {
- do_check_true(aURI.equals(DOWNLOAD_URI));
- do_check_true(!!page_in_database(DOWNLOAD_URI));
-
- waitForOnDeleteVisits(function DHRAD_onDeleteVisits(aDeletedURI) {
- do_check_true(aDeletedURI.equals(DOWNLOAD_URI));
- do_check_true(!!page_in_database(DOWNLOAD_URI));
-
- PlacesTestUtils.clearHistory().then(run_next_test);
- });
- gDownloadHistory.removeAllDownloads();
- });
-
- gDownloadHistory.addDownload(DOWNLOAD_URI, null, Date.now() * 1000);
- });
-});
-
-add_test(function test_dh_addBookmarkRemoveDownload()
-{
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- DOWNLOAD_URI,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "A bookmark");
- waitForOnVisit(function DHAD_onVisit(aURI) {
- do_check_true(aURI.equals(DOWNLOAD_URI));
- do_check_true(!!page_in_database(DOWNLOAD_URI));
-
- waitForOnDeleteVisits(function DHRAD_onDeleteVisits(aDeletedURI) {
- do_check_true(aDeletedURI.equals(DOWNLOAD_URI));
- do_check_true(!!page_in_database(DOWNLOAD_URI));
-
- PlacesTestUtils.clearHistory().then(run_next_test);
- });
- gDownloadHistory.removeAllDownloads();
- });
-
- gDownloadHistory.addDownload(DOWNLOAD_URI, null, Date.now() * 1000);
-});
-
-add_test(function test_dh_addDownload_referrer()
-{
- waitForOnVisit(function DHAD_prepareReferrer(aURI, aVisitID) {
- do_check_true(aURI.equals(REFERRER_URI));
- let referrerVisitId = aVisitID;
-
- waitForOnVisit(function DHAD_onVisit(aVisitedURI, unused, unused2, unused3,
- aReferringID) {
- do_check_true(aVisitedURI.equals(DOWNLOAD_URI));
- do_check_eq(aReferringID, referrerVisitId);
-
- // Verify that the URI is already available in results at this time.
- do_check_true(!!page_in_database(DOWNLOAD_URI));
-
- PlacesTestUtils.clearHistory().then(run_next_test);
- });
-
- gDownloadHistory.addDownload(DOWNLOAD_URI, REFERRER_URI, Date.now() * 1000);
- });
-
- // Note that we don't pass the optional callback argument here because we must
- // ensure that we receive the onVisit notification before we call addDownload.
- PlacesUtils.asyncHistory.updatePlaces({
- uri: REFERRER_URI,
- visits: [{
- transitionType: Ci.nsINavHistoryService.TRANSITION_TYPED,
- visitDate: Date.now() * 1000
- }]
- });
-});
-
-add_test(function test_dh_addDownload_disabledHistory()
-{
- waitForOnVisit(function DHAD_onVisit(aURI) {
- // We should only receive the notification for the non-private URI. This
- // test is based on the assumption that visit notifications are received in
- // the same order of the addDownload calls, which is currently true because
- // database access is serialized on the same worker thread.
- do_check_true(aURI.equals(DOWNLOAD_URI));
-
- do_check_true(!!page_in_database(DOWNLOAD_URI));
- do_check_false(!!page_in_database(PRIVATE_URI));
-
- PlacesTestUtils.clearHistory().then(run_next_test);
- });
-
- Services.prefs.setBoolPref("places.history.enabled", false);
- gDownloadHistory.addDownload(PRIVATE_URI, REFERRER_URI, Date.now() * 1000);
-
- // The addDownload functions calls CanAddURI synchronously, thus we can set
- // the preference back to true immediately (not all apps enable places by
- // default).
- Services.prefs.setBoolPref("places.history.enabled", true);
- gDownloadHistory.addDownload(DOWNLOAD_URI, REFERRER_URI, Date.now() * 1000);
-});
-
-/**
- * Tests that nsIDownloadHistory::AddDownload saves the additional download
- * details if the optional destination URL is specified.
- */
-add_test(function test_dh_details()
-{
- const REMOTE_URI = NetUtil.newURI("http://localhost/");
- const SOURCE_URI = NetUtil.newURI("http://example.com/test_dh_details");
- const DEST_FILE_NAME = "dest.txt";
-
- // We must build a real, valid file URI for the destination.
- let destFileUri = NetUtil.newURI(FileUtils.getFile("TmpD", [DEST_FILE_NAME]));
-
- let titleSet = false;
- let destinationFileUriSet = false;
- let destinationFileNameSet = false;
-
- function checkFinished()
- {
- if (titleSet && destinationFileUriSet && destinationFileNameSet) {
- PlacesUtils.annotations.removeObserver(annoObserver);
- PlacesUtils.history.removeObserver(historyObserver);
-
- PlacesTestUtils.clearHistory().then(run_next_test);
- }
- }
-
- let annoObserver = {
- onPageAnnotationSet: function AO_onPageAnnotationSet(aPage, aName)
- {
- if (aPage.equals(SOURCE_URI)) {
- let value = PlacesUtils.annotations.getPageAnnotation(aPage, aName);
- switch (aName)
- {
- case "downloads/destinationFileURI":
- destinationFileUriSet = true;
- do_check_eq(value, destFileUri.spec);
- break;
- case "downloads/destinationFileName":
- destinationFileNameSet = true;
- do_check_eq(value, DEST_FILE_NAME);
- break;
- }
- checkFinished();
- }
- },
- onItemAnnotationSet: function() {},
- onPageAnnotationRemoved: function() {},
- onItemAnnotationRemoved: function() {}
- }
-
- let historyObserver = {
- onBeginUpdateBatch: function() {},
- onEndUpdateBatch: function() {},
- onVisit: function() {},
- onTitleChanged: function HO_onTitleChanged(aURI, aPageTitle)
- {
- if (aURI.equals(SOURCE_URI)) {
- titleSet = true;
- do_check_eq(aPageTitle, DEST_FILE_NAME);
- checkFinished();
- }
- },
- onDeleteURI: function() {},
- onClearHistory: function() {},
- onPageChanged: function() {},
- onDeleteVisits: function() {}
- };
-
- PlacesUtils.annotations.addObserver(annoObserver, false);
- PlacesUtils.history.addObserver(historyObserver, false);
-
- // Both null values and remote URIs should not cause errors.
- gDownloadHistory.addDownload(SOURCE_URI, null, Date.now() * 1000);
- gDownloadHistory.addDownload(SOURCE_URI, null, Date.now() * 1000, null);
- gDownloadHistory.addDownload(SOURCE_URI, null, Date.now() * 1000, REMOTE_URI);
-
- // Valid local file URIs should cause the download details to be saved.
- gDownloadHistory.addDownload(SOURCE_URI, null, Date.now() * 1000,
- destFileUri);
-});
diff --git a/toolkit/components/places/tests/unit/test_frecency.js b/toolkit/components/places/tests/unit/test_frecency.js
deleted file mode 100644
index a04befe009..0000000000
--- a/toolkit/components/places/tests/unit/test_frecency.js
+++ /dev/null
@@ -1,294 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/**
- * Test for bug 406358 to make sure frecency works for empty input/search, but
- * this also tests for non-empty inputs as well. Because the interactions among
- * *DIFFERENT* visit counts and visit dates is not well defined, this test
- * holds one of the two values constant when modifying the other.
- *
- * Also test bug 419068 to make sure tagged pages don't necessarily have to be
- * first in the results.
- *
- * Also test bug 426166 to make sure that the results of autocomplete searches
- * are stable. Note that failures of this test will be intermittent by nature
- * since we are testing to make sure that the unstable sort algorithm used
- * by SQLite is not changing the order of the results on us.
- */
-
-function AutoCompleteInput(aSearches) {
- this.searches = aSearches;
-}
-AutoCompleteInput.prototype = {
- constructor: AutoCompleteInput,
-
- searches: null,
-
- minResultsForPopup: 0,
- timeout: 10,
- searchParam: "",
- textValue: "",
- disableAutoComplete: false,
- completeDefaultIndex: false,
-
- get searchCount() {
- return this.searches.length;
- },
-
- getSearchAt: function(aIndex) {
- return this.searches[aIndex];
- },
-
- onSearchBegin: function() {},
- onSearchComplete: function() {},
-
- popupOpen: false,
-
- popup: {
- setSelectedIndex: function(aIndex) {},
- invalidate: function() {},
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompletePopup))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
- },
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompleteInput))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
-}
-
-function ensure_results(uris, searchTerm)
-{
- PlacesTestUtils.promiseAsyncUpdates()
- .then(() => ensure_results_internal(uris, searchTerm));
-}
-
-function ensure_results_internal(uris, searchTerm)
-{
- var controller = Components.classes["@mozilla.org/autocomplete/controller;1"].
- getService(Components.interfaces.nsIAutoCompleteController);
-
- // Make an AutoCompleteInput that uses our searches
- // and confirms results on search complete
- var input = new AutoCompleteInput(["unifiedcomplete"]);
-
- controller.input = input;
-
- var numSearchesStarted = 0;
- input.onSearchBegin = function() {
- numSearchesStarted++;
- do_check_eq(numSearchesStarted, 1);
- };
-
- input.onSearchComplete = function() {
- do_check_eq(numSearchesStarted, 1);
- do_check_eq(controller.searchStatus,
- Ci.nsIAutoCompleteController.STATUS_COMPLETE_MATCH);
- do_check_eq(controller.matchCount, uris.length);
- for (var i=0; i<controller.matchCount; i++) {
- do_check_eq(controller.getValueAt(i), uris[i].spec);
- }
-
- deferEnsureResults.resolve();
- };
-
- controller.startSearch(searchTerm);
-}
-
-// Get history service
-try {
- var histsvc = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
- var bhist = histsvc.QueryInterface(Ci.nsIBrowserHistory);
- var tagssvc = Cc["@mozilla.org/browser/tagging-service;1"].
- getService(Ci.nsITaggingService);
- var bmksvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
-} catch (ex) {
- do_throw("Could not get history service\n");
-}
-
-function* task_setCountDate(aURI, aCount, aDate)
-{
- // We need visits so that frecency can be computed over multiple visits
- let visits = [];
- for (let i = 0; i < aCount; i++) {
- visits.push({ uri: aURI, visitDate: aDate, transition: TRANSITION_TYPED });
- }
- yield PlacesTestUtils.addVisits(visits);
-}
-
-function setBookmark(aURI)
-{
- bmksvc.insertBookmark(bmksvc.bookmarksMenuFolder, aURI, -1, "bleh");
-}
-
-function tagURI(aURI, aTags) {
- bmksvc.insertBookmark(bmksvc.unfiledBookmarksFolder, aURI,
- bmksvc.DEFAULT_INDEX, "bleh");
- tagssvc.tagURI(aURI, aTags);
-}
-
-var uri1 = uri("http://site.tld/1");
-var uri2 = uri("http://site.tld/2");
-var uri3 = uri("http://aaaaaaaaaa/1");
-var uri4 = uri("http://aaaaaaaaaa/2");
-
-// d1 is younger (should show up higher) than d2 (PRTime is in usecs not msec)
-// Make sure the dates fall into different frecency buckets
-var d1 = new Date(Date.now() - 1000 * 60 * 60) * 1000;
-var d2 = new Date(Date.now() - 1000 * 60 * 60 * 24 * 10) * 1000;
-// c1 is larger (should show up higher) than c2
-var c1 = 10;
-var c2 = 1;
-
-var tests = [
-// test things without a search term
-function*() {
- print("TEST-INFO | Test 0: same count, different date");
- yield task_setCountDate(uri1, c1, d1);
- yield task_setCountDate(uri2, c1, d2);
- tagURI(uri1, ["site"]);
- ensure_results([uri1, uri2], "");
-},
-function*() {
- print("TEST-INFO | Test 1: same count, different date");
- yield task_setCountDate(uri1, c1, d2);
- yield task_setCountDate(uri2, c1, d1);
- tagURI(uri1, ["site"]);
- ensure_results([uri2, uri1], "");
-},
-function*() {
- print("TEST-INFO | Test 2: different count, same date");
- yield task_setCountDate(uri1, c1, d1);
- yield task_setCountDate(uri2, c2, d1);
- tagURI(uri1, ["site"]);
- ensure_results([uri1, uri2], "");
-},
-function*() {
- print("TEST-INFO | Test 3: different count, same date");
- yield task_setCountDate(uri1, c2, d1);
- yield task_setCountDate(uri2, c1, d1);
- tagURI(uri1, ["site"]);
- ensure_results([uri2, uri1], "");
-},
-
-// test things with a search term
-function*() {
- print("TEST-INFO | Test 4: same count, different date");
- yield task_setCountDate(uri1, c1, d1);
- yield task_setCountDate(uri2, c1, d2);
- tagURI(uri1, ["site"]);
- ensure_results([uri1, uri2], "site");
-},
-function*() {
- print("TEST-INFO | Test 5: same count, different date");
- yield task_setCountDate(uri1, c1, d2);
- yield task_setCountDate(uri2, c1, d1);
- tagURI(uri1, ["site"]);
- ensure_results([uri2, uri1], "site");
-},
-function*() {
- print("TEST-INFO | Test 6: different count, same date");
- yield task_setCountDate(uri1, c1, d1);
- yield task_setCountDate(uri2, c2, d1);
- tagURI(uri1, ["site"]);
- ensure_results([uri1, uri2], "site");
-},
-function*() {
- print("TEST-INFO | Test 7: different count, same date");
- yield task_setCountDate(uri1, c2, d1);
- yield task_setCountDate(uri2, c1, d1);
- tagURI(uri1, ["site"]);
- ensure_results([uri2, uri1], "site");
-},
-// There are multiple tests for 8, hence the multiple functions
-// Bug 426166 section
-function*() {
- print("TEST-INFO | Test 8.1a: same count, same date");
- setBookmark(uri3);
- setBookmark(uri4);
- ensure_results([uri4, uri3], "a");
-},
-function*() {
- print("TEST-INFO | Test 8.1b: same count, same date");
- setBookmark(uri3);
- setBookmark(uri4);
- ensure_results([uri4, uri3], "aa");
-},
-function*() {
- print("TEST-INFO | Test 8.2: same count, same date");
- setBookmark(uri3);
- setBookmark(uri4);
- ensure_results([uri4, uri3], "aaa");
-},
-function*() {
- print("TEST-INFO | Test 8.3: same count, same date");
- setBookmark(uri3);
- setBookmark(uri4);
- ensure_results([uri4, uri3], "aaaa");
-},
-function*() {
- print("TEST-INFO | Test 8.4: same count, same date");
- setBookmark(uri3);
- setBookmark(uri4);
- ensure_results([uri4, uri3], "aaa");
-},
-function*() {
- print("TEST-INFO | Test 8.5: same count, same date");
- setBookmark(uri3);
- setBookmark(uri4);
- ensure_results([uri4, uri3], "aa");
-},
-function*() {
- print("TEST-INFO | Test 8.6: same count, same date");
- setBookmark(uri3);
- setBookmark(uri4);
- ensure_results([uri4, uri3], "a");
-}
-];
-
-/**
- * This deferred object contains a promise that is resolved when the
- * ensure_results_internal function has finished its execution.
- */
-var deferEnsureResults;
-
-add_task(function* test_frecency()
-{
- // Disable autoFill for this test.
- Services.prefs.setBoolPref("browser.urlbar.autoFill", false);
- do_register_cleanup(() => Services.prefs.clearUserPref("browser.urlbar.autoFill"));
- // always search in history + bookmarks, no matter what the default is
- var prefs = Cc["@mozilla.org/preferences-service;1"].
- getService(Ci.nsIPrefBranch);
-
- prefs.setBoolPref("browser.urlbar.suggest.history", true);
- prefs.setBoolPref("browser.urlbar.suggest.bookmark", true);
- prefs.setBoolPref("browser.urlbar.suggest.openpage", false);
- for (let test of tests) {
- yield PlacesUtils.bookmarks.eraseEverything();
- yield PlacesTestUtils.clearHistory();
-
- deferEnsureResults = Promise.defer();
- yield test();
- yield deferEnsureResults.promise;
- }
- for (let type of ["history", "bookmark", "openpage"]) {
- prefs.clearUserPref("browser.urlbar.suggest." + type);
- }
-});
diff --git a/toolkit/components/places/tests/unit/test_frecency_observers.js b/toolkit/components/places/tests/unit/test_frecency_observers.js
deleted file mode 100644
index 7fadd4ae92..0000000000
--- a/toolkit/components/places/tests/unit/test_frecency_observers.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function run_test() {
- run_next_test();
-}
-
-// Each of these tests a path that triggers a frecency update. Together they
-// hit all sites that update a frecency.
-
-// InsertVisitedURIs::UpdateFrecency and History::InsertPlace
-add_task(function* test_InsertVisitedURIs_UpdateFrecency_and_History_InsertPlace() {
- // InsertPlace is at the end of a path that UpdateFrecency is also on, so kill
- // two birds with one stone and expect two notifications. Trigger the path by
- // adding a download.
- let uri = NetUtil.newURI("http://example.com/a");
- Cc["@mozilla.org/browser/download-history;1"].
- getService(Ci.nsIDownloadHistory).
- addDownload(uri);
- yield Promise.all([onFrecencyChanged(uri), onFrecencyChanged(uri)]);
-});
-
-// nsNavHistory::UpdateFrecency
-add_task(function* test_nsNavHistory_UpdateFrecency() {
- let bm = PlacesUtils.bookmarks;
- let uri = NetUtil.newURI("http://example.com/b");
- bm.insertBookmark(bm.unfiledBookmarksFolder, uri,
- Ci.nsINavBookmarksService.DEFAULT_INDEX, "test");
- yield onFrecencyChanged(uri);
-});
-
-// nsNavHistory::invalidateFrecencies for particular pages
-add_task(function* test_nsNavHistory_invalidateFrecencies_somePages() {
- let uri = NetUtil.newURI("http://test-nsNavHistory-invalidateFrecencies-somePages.com/");
- // Bookmarking the URI is enough to add it to moz_places, and importantly, it
- // means that removePagesFromHost doesn't remove it from moz_places, so its
- // frecency is able to be changed.
- let bm = PlacesUtils.bookmarks;
- bm.insertBookmark(bm.unfiledBookmarksFolder, uri,
- Ci.nsINavBookmarksService.DEFAULT_INDEX, "test");
- PlacesUtils.history.removePagesFromHost(uri.host, false);
- yield onFrecencyChanged(uri);
-});
-
-// nsNavHistory::invalidateFrecencies for all pages
-add_task(function* test_nsNavHistory_invalidateFrecencies_allPages() {
- yield Promise.all([onManyFrecenciesChanged(), PlacesTestUtils.clearHistory()]);
-});
-
-// nsNavHistory::DecayFrecency and nsNavHistory::FixInvalidFrecencies
-add_task(function* test_nsNavHistory_DecayFrecency_and_nsNavHistory_FixInvalidFrecencies() {
- // FixInvalidFrecencies is at the end of a path that DecayFrecency is also on,
- // so expect two notifications. Trigger the path by making nsNavHistory
- // observe the idle-daily notification.
- PlacesUtils.history.QueryInterface(Ci.nsIObserver).
- observe(null, "idle-daily", "");
- yield Promise.all([onManyFrecenciesChanged(), onManyFrecenciesChanged()]);
-});
-
-function onFrecencyChanged(expectedURI) {
- let deferred = Promise.defer();
- let obs = new NavHistoryObserver();
- obs.onFrecencyChanged =
- (uri, newFrecency, guid, hidden, visitDate) => {
- PlacesUtils.history.removeObserver(obs);
- do_check_true(!!uri);
- do_check_true(uri.equals(expectedURI));
- deferred.resolve();
- };
- PlacesUtils.history.addObserver(obs, false);
- return deferred.promise;
-}
-
-function onManyFrecenciesChanged() {
- let deferred = Promise.defer();
- let obs = new NavHistoryObserver();
- obs.onManyFrecenciesChanged = () => {
- PlacesUtils.history.removeObserver(obs);
- do_check_true(true);
- deferred.resolve();
- };
- PlacesUtils.history.addObserver(obs, false);
- return deferred.promise;
-}
diff --git a/toolkit/components/places/tests/unit/test_frecency_zero_updated.js b/toolkit/components/places/tests/unit/test_frecency_zero_updated.js
deleted file mode 100644
index e60030ca56..0000000000
--- a/toolkit/components/places/tests/unit/test_frecency_zero_updated.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Tests a zero frecency is correctly updated when inserting new valid visits.
-
-function run_test()
-{
- run_next_test()
-}
-
-add_task(function* ()
-{
- const TEST_URI = NetUtil.newURI("http://example.com/");
- let id = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- TEST_URI,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "A title");
- yield PlacesTestUtils.promiseAsyncUpdates();
- do_check_true(frecencyForUrl(TEST_URI) > 0);
-
- // Removing the bookmark should leave an orphan page with zero frecency.
- // Note this would usually be expired later by expiration.
- PlacesUtils.bookmarks.removeItem(id);
- yield PlacesTestUtils.promiseAsyncUpdates();
- do_check_eq(frecencyForUrl(TEST_URI), 0);
-
- // Now add a valid visit to the page, frecency should increase.
- yield PlacesTestUtils.addVisits({ uri: TEST_URI });
- do_check_true(frecencyForUrl(TEST_URI) > 0);
-});
diff --git a/toolkit/components/places/tests/unit/test_getChildIndex.js b/toolkit/components/places/tests/unit/test_getChildIndex.js
deleted file mode 100644
index 4cf164d453..0000000000
--- a/toolkit/components/places/tests/unit/test_getChildIndex.js
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
- * vim:set ts=2 sw=2 sts=2 et:
- * 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/. */
-
-/*
- * Tests nsNavHistoryContainerResultNode::GetChildIndex(aNode) functionality.
- */
-
-function run_test() {
- // Add a bookmark to the menu.
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.bookmarksMenuFolderId,
- uri("http://test.mozilla.org/bookmark/"),
- Ci.nsINavBookmarksService.DEFAULT_INDEX,
- "Test bookmark");
-
- // Add a bookmark to unfiled folder.
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- uri("http://test.mozilla.org/unfiled/"),
- Ci.nsINavBookmarksService.DEFAULT_INDEX,
- "Unfiled bookmark");
-
- // Get the unfiled bookmark node.
- let unfiledNode = getNodeAt(PlacesUtils.unfiledBookmarksFolderId, 0);
- if (!unfiledNode)
- do_throw("Unable to find bookmark in hierarchy!");
- do_check_eq(unfiledNode.title, "Unfiled bookmark");
-
- let hs = PlacesUtils.history;
- let query = hs.getNewQuery();
- query.setFolders([PlacesUtils.bookmarksMenuFolderId], 1);
- let options = hs.getNewQueryOptions();
- options.queryType = options.QUERY_TYPE_BOOKMARKS;
- let root = hs.executeQuery(query, options).root;
- root.containerOpen = true;
-
- // Check functionality for proper nodes.
- for (let i = 0; i < root.childCount; i++) {
- let node = root.getChild(i);
- print("Now testing: " + node.title);
- do_check_eq(root.getChildIndex(node), i);
- }
-
- // Now search for an invalid node and expect an exception.
- try {
- root.getChildIndex(unfiledNode);
- do_throw("Searching for an invalid node should have thrown.");
- } catch (ex) {
- print("We correctly got an exception.");
- }
-
- root.containerOpen = false;
-}
-
-function getNodeAt(aFolderId, aIndex) {
- let hs = PlacesUtils.history;
- let query = hs.getNewQuery();
- query.setFolders([aFolderId], 1);
- let options = hs.getNewQueryOptions();
- options.queryType = options.QUERY_TYPE_BOOKMARKS;
- let root = hs.executeQuery(query, options).root;
- root.containerOpen = true;
- if (root.childCount < aIndex)
- do_throw("Not enough children to find bookmark!");
- let node = root.getChild(aIndex);
- root.containerOpen = false;
- return node;
-}
diff --git a/toolkit/components/places/tests/unit/test_getPlacesInfo.js b/toolkit/components/places/tests/unit/test_getPlacesInfo.js
deleted file mode 100644
index 3dfecb934a..0000000000
--- a/toolkit/components/places/tests/unit/test_getPlacesInfo.js
+++ /dev/null
@@ -1,112 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function promiseGetPlacesInfo(aPlacesIdentifiers) {
- let deferred = Promise.defer();
- PlacesUtils.asyncHistory.getPlacesInfo(aPlacesIdentifiers, {
- _results: [],
- _errors: [],
-
- handleResult: function handleResult(aPlaceInfo) {
- this._results.push(aPlaceInfo);
- },
- handleError: function handleError(aResultCode, aPlaceInfo) {
- this._errors.push({ resultCode: aResultCode, info: aPlaceInfo });
- },
- handleCompletion: function handleCompletion() {
- deferred.resolve({ errors: this._errors, results: this._results });
- }
- });
-
- return deferred.promise;
-}
-
-function ensurePlacesInfoObjectsAreEqual(a, b) {
- do_check_true(a.uri.equals(b.uri));
- do_check_eq(a.title, b.title);
- do_check_eq(a.guid, b.guid);
- do_check_eq(a.placeId, b.placeId);
-}
-
-function* test_getPlacesInfoExistentPlace() {
- let testURI = NetUtil.newURI("http://www.example.tld");
- yield PlacesTestUtils.addVisits(testURI);
-
- let getPlacesInfoResult = yield promiseGetPlacesInfo([testURI]);
- do_check_eq(getPlacesInfoResult.results.length, 1);
- do_check_eq(getPlacesInfoResult.errors.length, 0);
-
- let placeInfo = getPlacesInfoResult.results[0];
- do_check_true(placeInfo instanceof Ci.mozIPlaceInfo);
-
- do_check_true(placeInfo.uri.equals(testURI));
- do_check_eq(placeInfo.title, "test visit for " + testURI.spec);
- do_check_true(placeInfo.guid.length > 0);
- do_check_eq(placeInfo.visits, null);
-}
-add_task(test_getPlacesInfoExistentPlace);
-
-function* test_getPlacesInfoNonExistentPlace() {
- let testURI = NetUtil.newURI("http://www.example_non_existent.tld");
- let getPlacesInfoResult = yield promiseGetPlacesInfo(testURI);
- do_check_eq(getPlacesInfoResult.results.length, 0);
- do_check_eq(getPlacesInfoResult.errors.length, 1);
-}
-add_task(test_getPlacesInfoNonExistentPlace);
-
-function* test_promisedHelper() {
- let uri = NetUtil.newURI("http://www.helper_existent_example.tld");
- yield PlacesTestUtils.addVisits(uri);
- let placeInfo = yield PlacesUtils.promisePlaceInfo(uri);
- do_check_true(placeInfo instanceof Ci.mozIPlaceInfo);
-
- uri = NetUtil.newURI("http://www.helper_non_existent_example.tld");
- try {
- yield PlacesUtils.promisePlaceInfo(uri);
- do_throw("PlacesUtils.promisePlaceInfo should have rejected the promise");
- }
- catch (ex) { }
-}
-add_task(test_promisedHelper);
-
-function* test_infoByGUID() {
- let testURI = NetUtil.newURI("http://www.guid_example.tld");
- yield PlacesTestUtils.addVisits(testURI);
-
- let placeInfoByURI = yield PlacesUtils.promisePlaceInfo(testURI);
- let placeInfoByGUID = yield PlacesUtils.promisePlaceInfo(placeInfoByURI.guid);
- ensurePlacesInfoObjectsAreEqual(placeInfoByURI, placeInfoByGUID);
-}
-add_task(test_infoByGUID);
-
-function* test_invalid_guid() {
- try {
- yield PlacesUtils.promisePlaceInfo("###");
- do_throw("getPlacesInfo should fail for invalid guids")
- }
- catch (ex) { }
-}
-add_task(test_invalid_guid);
-
-function* test_mixed_selection() {
- let placeInfo1, placeInfo2;
- let uri = NetUtil.newURI("http://www.mixed_selection_test_1.tld");
- yield PlacesTestUtils.addVisits(uri);
- placeInfo1 = yield PlacesUtils.promisePlaceInfo(uri);
-
- uri = NetUtil.newURI("http://www.mixed_selection_test_2.tld");
- yield PlacesTestUtils.addVisits(uri);
- placeInfo2 = yield PlacesUtils.promisePlaceInfo(uri);
-
- let getPlacesInfoResult = yield promiseGetPlacesInfo([placeInfo1.uri, placeInfo2.guid]);
- do_check_eq(getPlacesInfoResult.results.length, 2);
- do_check_eq(getPlacesInfoResult.errors.length, 0);
-
- do_check_eq(getPlacesInfoResult.results[0].uri.spec, placeInfo1.uri.spec);
- do_check_eq(getPlacesInfoResult.results[1].guid, placeInfo2.guid);
-}
-add_task(test_mixed_selection);
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/places/tests/unit/test_history.js b/toolkit/components/places/tests/unit/test_history.js
deleted file mode 100644
index 8d194cde1b..0000000000
--- a/toolkit/components/places/tests/unit/test_history.js
+++ /dev/null
@@ -1,184 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-// Get history services
-var histsvc = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
-
-/**
- * Checks to see that a URI is in the database.
- *
- * @param aURI
- * The URI to check.
- * @returns true if the URI is in the DB, false otherwise.
- */
-function uri_in_db(aURI) {
- var options = histsvc.getNewQueryOptions();
- options.maxResults = 1;
- options.resultType = options.RESULTS_AS_URI
- var query = histsvc.getNewQuery();
- query.uri = aURI;
- var result = histsvc.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- var cc = root.childCount;
- root.containerOpen = false;
- return (cc == 1);
-}
-
-// main
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_execute()
-{
- // we have a new profile, so we should have imported bookmarks
- do_check_eq(histsvc.databaseStatus, histsvc.DATABASE_STATUS_CREATE);
-
- // add a visit
- var testURI = uri("http://mozilla.com");
- yield PlacesTestUtils.addVisits(testURI);
-
- // now query for the visit, setting sorting and limit such that
- // we should retrieve only the visit we just added
- var options = histsvc.getNewQueryOptions();
- options.sortingMode = options.SORT_BY_DATE_DESCENDING;
- options.maxResults = 1;
- // TODO: using full visit crashes in xpcshell test
- // options.resultType = options.RESULTS_AS_FULL_VISIT;
- options.resultType = options.RESULTS_AS_VISIT;
- var query = histsvc.getNewQuery();
- var result = histsvc.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- var cc = root.childCount;
- for (var i=0; i < cc; ++i) {
- var node = root.getChild(i);
- // test node properties in RESULTS_AS_VISIT
- do_check_eq(node.uri, testURI.spec);
- do_check_eq(node.type, Ci.nsINavHistoryResultNode.RESULT_TYPE_URI);
- // TODO: change query type to RESULTS_AS_FULL_VISIT and test this
- // do_check_eq(node.transitionType, histsvc.TRANSITION_TYPED);
- }
- root.containerOpen = false;
-
- // add another visit for the same URI, and a third visit for a different URI
- var testURI2 = uri("http://google.com/");
- yield PlacesTestUtils.addVisits(testURI);
- yield PlacesTestUtils.addVisits(testURI2);
-
- options.maxResults = 5;
- options.resultType = options.RESULTS_AS_URI;
-
- // test minVisits
- query.minVisits = 0;
- result = histsvc.executeQuery(query, options);
- result.root.containerOpen = true;
- do_check_eq(result.root.childCount, 2);
- result.root.containerOpen = false;
- query.minVisits = 1;
- result = histsvc.executeQuery(query, options);
- result.root.containerOpen = true;
- do_check_eq(result.root.childCount, 2);
- result.root.containerOpen = false;
- query.minVisits = 2;
- result = histsvc.executeQuery(query, options);
- result.root.containerOpen = true;
- do_check_eq(result.root.childCount, 1);
- query.minVisits = 3;
- result.root.containerOpen = false;
- result = histsvc.executeQuery(query, options);
- result.root.containerOpen = true;
- do_check_eq(result.root.childCount, 0);
- result.root.containerOpen = false;
-
- // test maxVisits
- query.minVisits = -1;
- query.maxVisits = -1;
- result = histsvc.executeQuery(query, options);
- result.root.containerOpen = true;
- do_check_eq(result.root.childCount, 2);
- result.root.containerOpen = false;
- query.maxVisits = 0;
- result = histsvc.executeQuery(query, options);
- result.root.containerOpen = true;
- do_check_eq(result.root.childCount, 0);
- result.root.containerOpen = false;
- query.maxVisits = 1;
- result = histsvc.executeQuery(query, options);
- result.root.containerOpen = true;
- do_check_eq(result.root.childCount, 1);
- result.root.containerOpen = false;
- query.maxVisits = 2;
- result = histsvc.executeQuery(query, options);
- result.root.containerOpen = true;
- do_check_eq(result.root.childCount, 2);
- result.root.containerOpen = false;
- query.maxVisits = 3;
- result = histsvc.executeQuery(query, options);
- 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);
- annos.setPageAnnotation(uri("http://mozilla.com/"), "testAnno", 0, 0,
- Ci.nsIAnnotationService.EXPIRE_NEVER);
- query.annotation = "testAnno";
- result = histsvc.executeQuery(query, options);
- result.root.containerOpen = true;
- do_check_eq(result.root.childCount, 1);
- do_check_eq(result.root.getChild(0).uri, "http://mozilla.com/");
- result.root.containerOpen = false;
-
- // test annotationIsNot
- query.annotationIsNot = true;
- result = histsvc.executeQuery(query, options);
- result.root.containerOpen = true;
- do_check_eq(result.root.childCount, 1);
- do_check_eq(result.root.getChild(0).uri, "http://google.com/");
- result.root.containerOpen = false;
-
- // By default history is enabled.
- do_check_true(!histsvc.historyDisabled);
-
- // test getPageTitle
- yield PlacesTestUtils.addVisits({ uri: uri("http://example.com"), title: "title" });
- let placeInfo = yield PlacesUtils.promisePlaceInfo(uri("http://example.com"));
- do_check_eq(placeInfo.title, "title");
-
- // query for the visit
- do_check_true(uri_in_db(testURI));
-
- // test for schema changes in bug 373239
- // get direct db connection
- var db = histsvc.QueryInterface(Ci.nsPIPlacesDatabase).DBConnection;
- var q = "SELECT id FROM moz_bookmarks";
- var statement;
- try {
- statement = db.createStatement(q);
- } catch (ex) {
- do_throw("bookmarks table does not have id field, schema is too old!");
- }
- finally {
- statement.finalize();
- }
-
- // bug 394741 - regressed history text searches
- yield PlacesTestUtils.addVisits(uri("http://mozilla.com"));
- options = histsvc.getNewQueryOptions();
- // options.resultType = options.RESULTS_AS_VISIT;
- query = histsvc.getNewQuery();
- query.searchTerms = "moz";
- result = histsvc.executeQuery(query, options);
- root = result.root;
- root.containerOpen = true;
- do_check_true(root.childCount > 0);
- root.containerOpen = false;
-});
diff --git a/toolkit/components/places/tests/unit/test_history_autocomplete_tags.js b/toolkit/components/places/tests/unit/test_history_autocomplete_tags.js
deleted file mode 100644
index a5e0e1cb1d..0000000000
--- a/toolkit/components/places/tests/unit/test_history_autocomplete_tags.js
+++ /dev/null
@@ -1,185 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var current_test = 0;
-
-function AutoCompleteInput(aSearches) {
- this.searches = aSearches;
-}
-AutoCompleteInput.prototype = {
- constructor: AutoCompleteInput,
-
- searches: null,
-
- minResultsForPopup: 0,
- timeout: 10,
- searchParam: "",
- textValue: "",
- disableAutoComplete: false,
- completeDefaultIndex: false,
-
- get searchCount() {
- return this.searches.length;
- },
-
- getSearchAt: function(aIndex) {
- return this.searches[aIndex];
- },
-
- onSearchBegin: function() {},
- onSearchComplete: function() {},
-
- popupOpen: false,
-
- popup: {
- setSelectedIndex: function(aIndex) {},
- invalidate: function() {},
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompletePopup))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
- },
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompleteInput))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
-}
-
-// Get tagging service
-try {
- var tagssvc = Cc["@mozilla.org/browser/tagging-service;1"].
- getService(Ci.nsITaggingService);
-} catch (ex) {
- do_throw("Could not get tagging service\n");
-}
-
-function ensure_tag_results(uris, searchTerm)
-{
- print("Searching for '" + searchTerm + "'");
- var controller = Components.classes["@mozilla.org/autocomplete/controller;1"].
- getService(Components.interfaces.nsIAutoCompleteController);
-
- // Make an AutoCompleteInput that uses our searches
- // and confirms results on search complete
- var input = new AutoCompleteInput(["unifiedcomplete"]);
-
- controller.input = input;
-
- // Search is asynchronous, so don't let the test finish immediately
- do_test_pending();
-
- var numSearchesStarted = 0;
- input.onSearchBegin = function() {
- numSearchesStarted++;
- do_check_eq(numSearchesStarted, 1);
- };
-
- input.onSearchComplete = function() {
- do_check_eq(numSearchesStarted, 1);
- do_check_eq(controller.searchStatus,
- uris.length ?
- Ci.nsIAutoCompleteController.STATUS_COMPLETE_MATCH :
- Ci.nsIAutoCompleteController.STATUS_COMPLETE_NO_MATCH);
- do_check_eq(controller.matchCount, uris.length);
- let vals = [];
- for (let i=0; i<controller.matchCount; i++) {
- // Keep the URL for later because order of tag results is undefined
- vals.push(controller.getValueAt(i));
- do_check_eq(controller.getStyleAt(i), "bookmark-tag");
- }
- // 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]();
- }
-
- do_test_finished();
- };
-
- controller.startSearch(searchTerm);
-}
-
-var uri1 = uri("http://site.tld/1/aaa");
-var uri2 = uri("http://site.tld/2/bbb");
-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"),
- () => ensure_tag_results([uri4, uri6], "foo bbb"),
- () => ensure_tag_results([uri2, uri4, uri5, uri6], "bar"),
- () => ensure_tag_results([uri5], "bar aaa"),
- () => ensure_tag_results([uri2, uri4, uri6], "bar bbb"),
- () => ensure_tag_results([uri3, uri5, uri6], "cheese"),
- () => ensure_tag_results([uri3, uri5], "chees aaa"),
- () => ensure_tag_results([uri6], "chees bbb"),
- () => ensure_tag_results([uri4, uri6], "fo bar"),
- () => ensure_tag_results([], "fo bar aaa"),
- () => ensure_tag_results([uri4, uri6], "fo bar bbb"),
- () => ensure_tag_results([uri4, uri6], "ba foo"),
- () => ensure_tag_results([], "ba foo aaa"),
- () => ensure_tag_results([uri4, uri6], "ba foo bbb"),
- () => ensure_tag_results([uri5, uri6], "ba chee"),
- () => ensure_tag_results([uri5], "ba chee aaa"),
- () => ensure_tag_results([uri6], "ba chee bbb"),
- () => ensure_tag_results([uri5, uri6], "cheese bar"),
- () => ensure_tag_results([uri5], "cheese bar aaa"),
- () => ensure_tag_results([uri6], "chees bar bbb"),
- () => ensure_tag_results([uri6], "cheese bar foo"),
- () => ensure_tag_results([], "foo bar cheese aaa"),
- () => ensure_tag_results([uri6], "foo bar cheese bbb"),
-];
-
-/**
- * Properly tags a uri adding it to bookmarks.
- *
- * @param aURI
- * The nsIURI to tag.
- * @param aTags
- * The tags to add.
- */
-function tagURI(aURI, aTags) {
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- aURI,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "A title");
- tagssvc.tagURI(aURI, aTags);
-}
-
-/**
- * Test history autocomplete
- */
-function run_test() {
- // always search in history + bookmarks, no matter what the default is
- var prefs = Cc["@mozilla.org/preferences-service;1"].
- getService(Ci.nsIPrefBranch);
- prefs.setIntPref("browser.urlbar.search.sources", 3);
- prefs.setIntPref("browser.urlbar.default.behavior", 0);
-
- tagURI(uri1, ["foo"]);
- tagURI(uri2, ["bar"]);
- tagURI(uri3, ["cheese"]);
- tagURI(uri4, ["foo bar"]);
- tagURI(uri5, ["bar cheese"]);
- tagURI(uri6, ["foo bar cheese"]);
-
- tests[0]();
-}
diff --git a/toolkit/components/places/tests/unit/test_history_catobs.js b/toolkit/components/places/tests/unit/test_history_catobs.js
deleted file mode 100644
index e0a81d67bc..0000000000
--- a/toolkit/components/places/tests/unit/test_history_catobs.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* () {
- do_load_manifest("nsDummyObserver.manifest");
-
- let dummyCreated = false;
- let dummyReceivedOnVisit = false;
-
- Services.obs.addObserver(function created() {
- Services.obs.removeObserver(created, "dummy-observer-created");
- dummyCreated = true;
- }, "dummy-observer-created", false);
- Services.obs.addObserver(function visited() {
- Services.obs.removeObserver(visited, "dummy-observer-visited");
- dummyReceivedOnVisit = true;
- }, "dummy-observer-visited", false);
-
- let initialObservers = PlacesUtils.history.getObservers();
-
- // Add a common observer, it should be invoked after the category observer.
- let notificationsPromised = new Promise((resolve, reject) => {
- PlacesUtils.history.addObserver({
- __proto__: NavHistoryObserver.prototype,
- onVisit() {
- let observers = PlacesUtils.history.getObservers();
- Assert.equal(observers.length, initialObservers.length + 1);
-
- // Check the common observer is the last one.
- for (let i = 0; i < initialObservers.length; ++i) {
- Assert.equal(initialObservers[i], observers[i]);
- }
-
- PlacesUtils.history.removeObserver(this);
- observers = PlacesUtils.history.getObservers();
- Assert.equal(observers.length, initialObservers.length);
-
- // Check the category observer has been invoked before this one.
- Assert.ok(dummyCreated);
- Assert.ok(dummyReceivedOnVisit);
- resolve();
- }
- }, false);
- });
-
- // Add a visit.
- yield PlacesTestUtils.addVisits(uri("http://typed.mozilla.org"));
-
- yield notificationsPromised;
-});
diff --git a/toolkit/components/places/tests/unit/test_history_clear.js b/toolkit/components/places/tests/unit/test_history_clear.js
deleted file mode 100644
index 56d34994f7..0000000000
--- a/toolkit/components/places/tests/unit/test_history_clear.js
+++ /dev/null
@@ -1,169 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var mDBConn = DBConn();
-
-function promiseOnClearHistoryObserved() {
- let deferred = Promise.defer();
-
- let historyObserver = {
- onBeginUpdateBatch: function() {},
- onEndUpdateBatch: function() {},
- onVisit: function() {},
- onTitleChanged: function() {},
- onDeleteURI: function(aURI) {},
- onPageChanged: function() {},
- onDeleteVisits: function() {},
-
- onClearHistory: function() {
- PlacesUtils.history.removeObserver(this, false);
- deferred.resolve();
- },
-
- QueryInterface: XPCOMUtils.generateQI([
- Ci.nsINavHistoryObserver,
- ])
- }
- PlacesUtils.history.addObserver(historyObserver, false);
- return deferred.promise;
-}
-
-// This global variable is a promise object, initialized in run_test and waited
-// upon in the first asynchronous test. It is resolved when the
-// "places-init-complete" notification is received. We cannot initialize it in
-// the asynchronous test, because then it's too late to register the observer.
-var promiseInit;
-
-function run_test() {
- // places-init-complete is notified after run_test, and it will
- // run a first frecency fix through async statements.
- // To avoid random failures we have to run after all of this.
- promiseInit = promiseTopicObserved(PlacesUtils.TOPIC_INIT_COMPLETE);
-
- run_next_test();
-}
-
-add_task(function* test_history_clear()
-{
- yield promiseInit;
-
- yield PlacesTestUtils.addVisits([
- { uri: uri("http://typed.mozilla.org/"),
- transition: TRANSITION_TYPED },
- { uri: uri("http://link.mozilla.org/"),
- transition: TRANSITION_LINK },
- { uri: uri("http://download.mozilla.org/"),
- transition: TRANSITION_DOWNLOAD },
- { uri: uri("http://redir_temp.mozilla.org/"),
- transition: TRANSITION_REDIRECT_TEMPORARY,
- referrer: "http://link.mozilla.org/"},
- { uri: uri("http://redir_perm.mozilla.org/"),
- transition: TRANSITION_REDIRECT_PERMANENT,
- referrer: "http://link.mozilla.org/"},
- ]);
-
- // add a place: bookmark
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- uri("place:folder=4"),
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "shortcut");
-
- // Add an expire never annotation
- // Actually expire never annotations are removed as soon as a page is removed
- // from the database, so this should act as a normal visit.
- PlacesUtils.annotations.setPageAnnotation(uri("http://download.mozilla.org/"),
- "never", "never", 0,
- PlacesUtils.annotations.EXPIRE_NEVER);
-
- // Add a bookmark
- // Bookmarked page should have history cleared and frecency = -1
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- uri("http://typed.mozilla.org/"),
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "bookmark");
-
- yield PlacesTestUtils.addVisits([
- { uri: uri("http://typed.mozilla.org/"),
- transition: TRANSITION_BOOKMARK },
- { uri: uri("http://frecency.mozilla.org/"),
- transition: TRANSITION_LINK },
- ]);
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- // Clear history and wait for the onClearHistory notification.
- let promiseWaitClearHistory = promiseOnClearHistoryObserved();
- PlacesUtils.history.clear();
- yield promiseWaitClearHistory;
-
- // check browserHistory returns no entries
- do_check_eq(0, PlacesUtils.history.hasHistoryEntries);
-
- yield promiseTopicObserved(PlacesUtils.TOPIC_EXPIRATION_FINISHED);
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- // Check that frecency for not cleared items (bookmarks) has been converted
- // to -1.
- stmt = mDBConn.createStatement(
- "SELECT h.id FROM moz_places h WHERE h.frecency > 0 ");
- do_check_false(stmt.executeStep());
- stmt.finalize();
-
- stmt = mDBConn.createStatement(
- `SELECT h.id FROM moz_places h WHERE h.frecency < 0
- AND EXISTS (SELECT id FROM moz_bookmarks WHERE fk = h.id) LIMIT 1`);
- do_check_true(stmt.executeStep());
- stmt.finalize();
-
- // Check that all visit_counts have been brought to 0
- stmt = mDBConn.createStatement(
- "SELECT id FROM moz_places WHERE visit_count <> 0 LIMIT 1");
- do_check_false(stmt.executeStep());
- stmt.finalize();
-
- // Check that history tables are empty
- stmt = mDBConn.createStatement(
- "SELECT * FROM (SELECT id FROM moz_historyvisits LIMIT 1)");
- do_check_false(stmt.executeStep());
- stmt.finalize();
-
- // Check that all moz_places entries except bookmarks and place: have been removed
- stmt = mDBConn.createStatement(
- `SELECT h.id FROM moz_places h WHERE
- url_hash NOT BETWEEN hash('place', 'prefix_lo') AND hash('place', 'prefix_hi')
- AND NOT EXISTS (SELECT id FROM moz_bookmarks WHERE fk = h.id) LIMIT 1`);
- do_check_false(stmt.executeStep());
- stmt.finalize();
-
- // Check that we only have favicons for retained places
- stmt = mDBConn.createStatement(
- `SELECT f.id FROM moz_favicons f WHERE NOT EXISTS
- (SELECT id FROM moz_places WHERE favicon_id = f.id) LIMIT 1`);
- do_check_false(stmt.executeStep());
- stmt.finalize();
-
- // Check that we only have annotations for retained places
- stmt = mDBConn.createStatement(
- `SELECT a.id FROM moz_annos a WHERE NOT EXISTS
- (SELECT id FROM moz_places WHERE id = a.place_id) LIMIT 1`);
- do_check_false(stmt.executeStep());
- stmt.finalize();
-
- // Check that we only have inputhistory for retained places
- stmt = mDBConn.createStatement(
- `SELECT i.place_id FROM moz_inputhistory i WHERE NOT EXISTS
- (SELECT id FROM moz_places WHERE id = i.place_id) LIMIT 1`);
- do_check_false(stmt.executeStep());
- stmt.finalize();
-
- // Check that place:uris have frecency 0
- stmt = mDBConn.createStatement(
- `SELECT h.id FROM moz_places h
- WHERE url_hash BETWEEN hash('place', 'prefix_lo')
- AND hash('place', 'prefix_hi')
- AND h.frecency <> 0 LIMIT 1`);
- do_check_false(stmt.executeStep());
- stmt.finalize();
-});
diff --git a/toolkit/components/places/tests/unit/test_history_notifications.js b/toolkit/components/places/tests/unit/test_history_notifications.js
deleted file mode 100644
index 4e1e635a0d..0000000000
--- a/toolkit/components/places/tests/unit/test_history_notifications.js
+++ /dev/null
@@ -1,38 +0,0 @@
-const NS_PLACES_INIT_COMPLETE_TOPIC = "places-init-complete";
-const NS_PLACES_DATABASE_LOCKED_TOPIC = "places-database-locked";
-
-add_task(function* () {
- // Create a dummy places.sqlite and open an unshared connection on it
- let db = Services.dirsvc.get('ProfD', Ci.nsIFile);
- db.append("places.sqlite");
- let dbConn = Services.storage.openUnsharedDatabase(db);
- Assert.ok(db.exists(), "The database should have been created");
-
- // We need an exclusive lock on the db
- dbConn.executeSimpleSQL("PRAGMA locking_mode = EXCLUSIVE");
- // Exclusive locking is lazy applied, we need to make a write to activate it
- dbConn.executeSimpleSQL("PRAGMA USER_VERSION = 1");
-
- // Try to create history service while the db is locked
- let promiseLocked = promiseTopicObserved(NS_PLACES_DATABASE_LOCKED_TOPIC);
- Assert.throws(() => Cc["@mozilla.org/browser/nav-history-service;1"]
- .getService(Ci.nsINavHistoryService),
- /NS_ERROR_XPC_GS_RETURNED_FAILURE/);
- yield promiseLocked;
-
- // Close our connection and try to cleanup the file (could fail on Windows)
- dbConn.close();
- if (db.exists()) {
- try {
- db.remove(false);
- } catch (e) {
- do_print("Unable to remove dummy places.sqlite");
- }
- }
-
- // Create history service correctly
- let promiseComplete = promiseTopicObserved(NS_PLACES_INIT_COMPLETE_TOPIC);
- Cc["@mozilla.org/browser/nav-history-service;1"]
- .getService(Ci.nsINavHistoryService);
- yield promiseComplete;
-});
diff --git a/toolkit/components/places/tests/unit/test_history_observer.js b/toolkit/components/places/tests/unit/test_history_observer.js
deleted file mode 100644
index c101cfb61b..0000000000
--- a/toolkit/components/places/tests/unit/test_history_observer.js
+++ /dev/null
@@ -1,215 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Generic nsINavHistoryObserver that doesn't implement anything, but provides
- * dummy methods to prevent errors about an object not having a certain method.
- */
-function NavHistoryObserver() {
-}
-NavHistoryObserver.prototype = {
- onBeginUpdateBatch: function() { },
- onEndUpdateBatch: function() { },
- onVisit: function() { },
- onTitleChanged: function() { },
- onDeleteURI: function() { },
- onClearHistory: function() { },
- onPageChanged: function() { },
- onDeleteVisits: function() { },
- QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryObserver])
-};
-
-/**
- * Registers a one-time history observer for and calls the callback
- * when the specified nsINavHistoryObserver method is called.
- * Returns a promise that is resolved when the callback returns.
- */
-function onNotify(callback) {
- return new Promise(resolve => {
- let obs = new NavHistoryObserver();
- obs[callback.name] = function () {
- PlacesUtils.history.removeObserver(this);
- callback.apply(this, arguments);
- resolve();
- };
- PlacesUtils.history.addObserver(obs, false);
- });
-}
-
-/**
- * Asynchronous task that adds a visit to the history database.
- */
-function* task_add_visit(uri, timestamp, transition) {
- uri = uri || NetUtil.newURI("http://firefox.com/");
- timestamp = timestamp || Date.now() * 1000;
- yield PlacesTestUtils.addVisits({
- uri: uri,
- transition: transition || TRANSITION_TYPED,
- visitDate: timestamp
- });
- return [uri, timestamp];
-}
-
-add_task(function* test_onVisit() {
- let promiseNotify = onNotify(function onVisit(aURI, aVisitID, aTime,
- aSessionID, aReferringID,
- aTransitionType, aGUID,
- aHidden, aVisitCount, aTyped) {
- Assert.ok(aURI.equals(testuri));
- Assert.ok(aVisitID > 0);
- Assert.equal(aTime, testtime);
- Assert.equal(aSessionID, 0);
- Assert.equal(aReferringID, 0);
- Assert.equal(aTransitionType, TRANSITION_TYPED);
- do_check_guid_for_uri(aURI, aGUID);
- Assert.ok(!aHidden);
- Assert.equal(aVisitCount, 1);
- Assert.equal(aTyped, 1);
- });
- let testuri = NetUtil.newURI("http://firefox.com/");
- let testtime = Date.now() * 1000;
- yield task_add_visit(testuri, testtime);
- yield promiseNotify;
-});
-
-add_task(function* test_onVisit() {
- let promiseNotify = onNotify(function onVisit(aURI, aVisitID, aTime,
- aSessionID, aReferringID,
- aTransitionType, aGUID,
- aHidden, aVisitCount, aTyped) {
- Assert.ok(aURI.equals(testuri));
- Assert.ok(aVisitID > 0);
- Assert.equal(aTime, testtime);
- Assert.equal(aSessionID, 0);
- Assert.equal(aReferringID, 0);
- Assert.equal(aTransitionType, TRANSITION_FRAMED_LINK);
- do_check_guid_for_uri(aURI, aGUID);
- Assert.ok(aHidden);
- Assert.equal(aVisitCount, 1);
- Assert.equal(aTyped, 0);
- });
- let testuri = NetUtil.newURI("http://hidden.firefox.com/");
- let testtime = Date.now() * 1000;
- yield task_add_visit(testuri, testtime, TRANSITION_FRAMED_LINK);
- yield promiseNotify;
-});
-
-add_task(function* test_multiple_onVisit() {
- let testuri = NetUtil.newURI("http://self.firefox.com/");
- let promiseNotifications = new Promise(resolve => {
- let observer = {
- _c: 0,
- __proto__: NavHistoryObserver.prototype,
- onVisit(uri, id, time, unused, referrerId, transition, guid,
- hidden, visitCount, typed) {
- Assert.ok(testuri.equals(uri));
- Assert.ok(id > 0);
- Assert.ok(time > 0);
- Assert.ok(!hidden);
- do_check_guid_for_uri(uri, guid);
- switch (++this._c) {
- case 1:
- Assert.equal(referrerId, 0);
- Assert.equal(transition, TRANSITION_LINK);
- Assert.equal(visitCount, 1);
- Assert.equal(typed, 0);
- break;
- case 2:
- Assert.ok(referrerId > 0);
- Assert.equal(transition, TRANSITION_LINK);
- Assert.equal(visitCount, 2);
- Assert.equal(typed, 0);
- break;
- case 3:
- Assert.equal(referrerId, 0);
- Assert.equal(transition, TRANSITION_TYPED);
- Assert.equal(visitCount, 3);
- Assert.equal(typed, 1);
-
- PlacesUtils.history.removeObserver(observer, false);
- resolve();
- break;
- }
- }
- };
- PlacesUtils.history.addObserver(observer, false);
- });
- yield PlacesTestUtils.addVisits([
- { uri: testuri, transition: TRANSITION_LINK },
- { uri: testuri, referrer: testuri, transition: TRANSITION_LINK },
- { uri: testuri, transition: TRANSITION_TYPED },
- ]);
- yield promiseNotifications;
-});
-
-add_task(function* test_onDeleteURI() {
- let promiseNotify = onNotify(function onDeleteURI(aURI, aGUID, aReason) {
- Assert.ok(aURI.equals(testuri));
- // Can't use do_check_guid_for_uri() here because the visit is already gone.
- Assert.equal(aGUID, testguid);
- Assert.equal(aReason, Ci.nsINavHistoryObserver.REASON_DELETED);
- });
- let [testuri] = yield task_add_visit();
- let testguid = do_get_guid_for_uri(testuri);
- PlacesUtils.bhistory.removePage(testuri);
- yield promiseNotify;
-});
-
-add_task(function* test_onDeleteVisits() {
- let promiseNotify = onNotify(function onDeleteVisits(aURI, aVisitTime, aGUID,
- aReason) {
- Assert.ok(aURI.equals(testuri));
- // Can't use do_check_guid_for_uri() here because the visit is already gone.
- Assert.equal(aGUID, testguid);
- Assert.equal(aReason, Ci.nsINavHistoryObserver.REASON_DELETED);
- Assert.equal(aVisitTime, 0); // All visits have been removed.
- });
- let msecs24hrsAgo = Date.now() - (86400 * 1000);
- let [testuri] = yield task_add_visit(undefined, msecs24hrsAgo * 1000);
- // Add a bookmark so the page is not removed.
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- testuri,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "test");
- let testguid = do_get_guid_for_uri(testuri);
- PlacesUtils.bhistory.removePage(testuri);
- yield promiseNotify;
-});
-
-add_task(function* test_onTitleChanged() {
- let promiseNotify = onNotify(function onTitleChanged(aURI, aTitle, aGUID) {
- Assert.ok(aURI.equals(testuri));
- Assert.equal(aTitle, title);
- do_check_guid_for_uri(aURI, aGUID);
- });
-
- let [testuri] = yield task_add_visit();
- let title = "test-title";
- yield PlacesTestUtils.addVisits({
- uri: testuri,
- title: title
- });
- yield promiseNotify;
-});
-
-add_task(function* test_onPageChanged() {
- let promiseNotify = onNotify(function onPageChanged(aURI, aChangedAttribute,
- aNewValue, aGUID) {
- Assert.equal(aChangedAttribute, Ci.nsINavHistoryObserver.ATTRIBUTE_FAVICON);
- Assert.ok(aURI.equals(testuri));
- Assert.equal(aNewValue, SMALLPNG_DATA_URI.spec);
- do_check_guid_for_uri(aURI, aGUID);
- });
-
- let [testuri] = yield task_add_visit();
-
- // The new favicon for the page must have data associated with it in order to
- // receive the onPageChanged notification. To keep this test self-contained,
- // we use an URI representing the smallest possible PNG file.
- PlacesUtils.favicons.setAndFetchFaviconForPage(testuri, SMALLPNG_DATA_URI,
- false,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- null,
- Services.scriptSecurityManager.getSystemPrincipal());
- yield promiseNotify;
-});
diff --git a/toolkit/components/places/tests/unit/test_history_sidebar.js b/toolkit/components/places/tests/unit/test_history_sidebar.js
deleted file mode 100644
index 1c03547d7f..0000000000
--- a/toolkit/components/places/tests/unit/test_history_sidebar.js
+++ /dev/null
@@ -1,447 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-// Get history service
-var hs = Cc["@mozilla.org/browser/nav-history-service;1"].
- getService(Ci.nsINavHistoryService);
-var bh = hs.QueryInterface(Ci.nsIBrowserHistory);
-var bs = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
-var ps = Cc["@mozilla.org/preferences-service;1"].
- getService(Ci.nsIPrefBranch);
-
-/**
- * Adds a test URI visit to the database.
- *
- * @param aURI
- * The URI to add a visit for.
- * @param aTime
- * Reference "now" time.
- * @param aDayOffset
- * number of days to add, pass a negative value to subtract them.
- */
-function* task_add_normalized_visit(aURI, aTime, aDayOffset) {
- var dateObj = new Date(aTime);
- // Normalize to midnight
- dateObj.setHours(0);
- dateObj.setMinutes(0);
- dateObj.setSeconds(0);
- dateObj.setMilliseconds(0);
- // Days where DST changes should be taken in count.
- var previousDateObj = new Date(dateObj.getTime() + aDayOffset * 86400000);
- var DSTCorrection = (dateObj.getTimezoneOffset() -
- previousDateObj.getTimezoneOffset()) * 60 * 1000;
- // Substract aDayOffset
- var PRTimeWithOffset = (previousDateObj.getTime() - DSTCorrection) * 1000;
- var timeInMs = new Date(PRTimeWithOffset/1000);
- print("Adding visit to " + aURI.spec + " at " + timeInMs);
- yield PlacesTestUtils.addVisits({
- uri: aURI,
- visitDate: PRTimeWithOffset
- });
-}
-
-function days_for_x_months_ago(aNowObj, aMonths) {
- var oldTime = new Date();
- // Set day before month, otherwise we could try to calculate 30 February, or
- // other nonexistent days.
- oldTime.setDate(1);
- oldTime.setMonth(aNowObj.getMonth() - aMonths);
- oldTime.setHours(0);
- oldTime.setMinutes(0);
- oldTime.setSeconds(0);
- // Stay larger for eventual timezone issues, add 2 days.
- return parseInt((aNowObj - oldTime) / (1000*60*60*24)) + 2;
-}
-
-var nowObj = new Date();
-// This test relies on en-US locale
-// Offset is number of days
-/* eslint-disable comma-spacing */
-var containers = [
- { label: "Today" , offset: 0 , visible: true },
- { label: "Yesterday" , offset: -1 , visible: true },
- { label: "Last 7 days" , offset: -3 , visible: true },
- { label: "This month" , offset: -8 , visible: nowObj.getDate() > 8 },
- { label: "" , offset: -days_for_x_months_ago(nowObj, 0) , visible: true },
- { label: "" , offset: -days_for_x_months_ago(nowObj, 1) , visible: true },
- { label: "" , offset: -days_for_x_months_ago(nowObj, 2) , visible: true },
- { label: "" , offset: -days_for_x_months_ago(nowObj, 3) , visible: true },
- { label: "" , offset: -days_for_x_months_ago(nowObj, 4) , visible: true },
- { label: "Older than 6 months" , offset: -days_for_x_months_ago(nowObj, 5) , visible: true },
-];
-/* eslint-enable comma-spacing */
-
-var visibleContainers = containers.filter(
- function(aContainer) { return aContainer.visible });
-
-/**
- * Asynchronous task that fills history and checks containers' labels.
- */
-function* task_fill_history() {
- print("\n\n*** TEST Fill History\n");
- // We can't use "now" because our hardcoded offsets would be invalid for some
- // date. So we hardcode a date.
- for (let i = 0; i < containers.length; i++) {
- let container = containers[i];
- var testURI = uri("http://mirror"+i+".mozilla.com/b");
- yield task_add_normalized_visit(testURI, nowObj.getTime(), container.offset);
- testURI = uri("http://mirror"+i+".mozilla.com/a");
- yield task_add_normalized_visit(testURI, nowObj.getTime(), container.offset);
- testURI = uri("http://mirror"+i+".google.com/b");
- yield task_add_normalized_visit(testURI, nowObj.getTime(), container.offset);
- testURI = uri("http://mirror"+i+".google.com/a");
- yield task_add_normalized_visit(testURI, nowObj.getTime(), container.offset);
- // Bug 485703 - Hide date containers not containing additional entries
- // compared to previous ones.
- // Check after every new container is added.
- check_visit(container.offset);
- }
-
- var options = hs.getNewQueryOptions();
- options.resultType = options.RESULTS_AS_DATE_SITE_QUERY;
- var query = hs.getNewQuery();
-
- var result = hs.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
-
- var cc = root.childCount;
- print("Found containers:");
- var previousLabels = [];
- for (let i = 0; i < cc; i++) {
- let container = visibleContainers[i];
- var node = root.getChild(i);
- print(node.title);
- if (container.label)
- do_check_eq(node.title, container.label);
- // Check labels are not repeated.
- do_check_eq(previousLabels.indexOf(node.title), -1);
- previousLabels.push(node.title);
- }
- do_check_eq(cc, visibleContainers.length);
- root.containerOpen = false;
-}
-
-/**
- * Bug 485703 - Hide date containers not containing additional entries compared
- * to previous ones.
- */
-function check_visit(aOffset) {
- var options = hs.getNewQueryOptions();
- options.resultType = options.RESULTS_AS_DATE_SITE_QUERY;
- var query = hs.getNewQuery();
- var result = hs.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- var cc = root.childCount;
-
- var unexpected = [];
- switch (aOffset) {
- case 0:
- unexpected = ["Yesterday", "Last 7 days", "This month"];
- break;
- case -1:
- unexpected = ["Last 7 days", "This month"];
- break;
- case -3:
- unexpected = ["This month"];
- break;
- default:
- // Other containers are tested later.
- }
-
- print("Found containers:");
- for (var i = 0; i < cc; i++) {
- var node = root.getChild(i);
- print(node.title);
- do_check_eq(unexpected.indexOf(node.title), -1);
- }
-
- root.containerOpen = false;
-}
-
-/**
- * Queries history grouped by date and site, checking containers' labels and
- * children.
- */
-function test_RESULTS_AS_DATE_SITE_QUERY() {
- print("\n\n*** TEST RESULTS_AS_DATE_SITE_QUERY\n");
- var options = hs.getNewQueryOptions();
- options.resultType = options.RESULTS_AS_DATE_SITE_QUERY;
- var query = hs.getNewQuery();
- var result = hs.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
-
- // Check one of the days
- var dayNode = root.getChild(0)
- .QueryInterface(Ci.nsINavHistoryContainerResultNode);
- dayNode.containerOpen = true;
- do_check_eq(dayNode.childCount, 2);
-
- // Items should be sorted by host
- var site1 = dayNode.getChild(0)
- .QueryInterface(Ci.nsINavHistoryContainerResultNode);
- do_check_eq(site1.title, "mirror0.google.com");
-
- var site2 = dayNode.getChild(1)
- .QueryInterface(Ci.nsINavHistoryContainerResultNode);
- do_check_eq(site2.title, "mirror0.mozilla.com");
-
- site1.containerOpen = true;
- do_check_eq(site1.childCount, 2);
-
- // Inside of host sites are sorted by title
- var site1visit = site1.getChild(0);
- do_check_eq(site1visit.uri, "http://mirror0.google.com/a");
-
- // Bug 473157: changing sorting mode should not affect the containers
- result.sortingMode = options.SORT_BY_TITLE_DESCENDING;
-
- // Check one of the days
- dayNode = root.getChild(0)
- .QueryInterface(Ci.nsINavHistoryContainerResultNode);
- dayNode.containerOpen = true;
- do_check_eq(dayNode.childCount, 2);
-
- // Hosts are still sorted by title
- site1 = dayNode.getChild(0)
- .QueryInterface(Ci.nsINavHistoryContainerResultNode);
- do_check_eq(site1.title, "mirror0.google.com");
-
- site2 = dayNode.getChild(1)
- .QueryInterface(Ci.nsINavHistoryContainerResultNode);
- do_check_eq(site2.title, "mirror0.mozilla.com");
-
- site1.containerOpen = true;
- do_check_eq(site1.childCount, 2);
-
- // But URLs are now sorted by title descending
- site1visit = site1.getChild(0);
- do_check_eq(site1visit.uri, "http://mirror0.google.com/b");
-
- site1.containerOpen = false;
- dayNode.containerOpen = false;
- root.containerOpen = false;
-}
-
-/**
- * Queries history grouped by date, checking containers' labels and children.
- */
-function test_RESULTS_AS_DATE_QUERY() {
- print("\n\n*** TEST RESULTS_AS_DATE_QUERY\n");
- var options = hs.getNewQueryOptions();
- options.resultType = options.RESULTS_AS_DATE_QUERY;
- var query = hs.getNewQuery();
- var result = hs.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
-
- var cc = root.childCount;
- do_check_eq(cc, visibleContainers.length);
- print("Found containers:");
- for (var i = 0; i < cc; i++) {
- var container = visibleContainers[i];
- var node = root.getChild(i);
- print(node.title);
- if (container.label)
- do_check_eq(node.title, container.label);
- }
-
- // Check one of the days
- var dayNode = root.getChild(0)
- .QueryInterface(Ci.nsINavHistoryContainerResultNode);
- dayNode.containerOpen = true;
- do_check_eq(dayNode.childCount, 4);
-
- // Items should be sorted by title
- var visit1 = dayNode.getChild(0);
- do_check_eq(visit1.uri, "http://mirror0.google.com/a");
-
- var visit2 = dayNode.getChild(3);
- do_check_eq(visit2.uri, "http://mirror0.mozilla.com/b");
-
- // Bug 473157: changing sorting mode should not affect the containers
- result.sortingMode = options.SORT_BY_TITLE_DESCENDING;
-
- // Check one of the days
- dayNode = root.getChild(0)
- .QueryInterface(Ci.nsINavHistoryContainerResultNode);
- dayNode.containerOpen = true;
- do_check_eq(dayNode.childCount, 4);
-
- // But URLs are now sorted by title descending
- visit1 = dayNode.getChild(0);
- do_check_eq(visit1.uri, "http://mirror0.mozilla.com/b");
-
- visit2 = dayNode.getChild(3);
- do_check_eq(visit2.uri, "http://mirror0.google.com/a");
-
- dayNode.containerOpen = false;
- root.containerOpen = false;
-}
-
-/**
- * Queries history grouped by site, checking containers' labels and children.
- */
-function test_RESULTS_AS_SITE_QUERY() {
- print("\n\n*** TEST RESULTS_AS_SITE_QUERY\n");
- // add a bookmark with a domain not in the set of visits in the db
- var itemId = bs.insertBookmark(bs.toolbarFolder, uri("http://foobar"),
- bs.DEFAULT_INDEX, "");
-
- var options = hs.getNewQueryOptions();
- options.resultType = options.RESULTS_AS_SITE_QUERY;
- options.sortingMode = options.SORT_BY_TITLE_ASCENDING;
- var query = hs.getNewQuery();
- var result = hs.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- do_check_eq(root.childCount, containers.length * 2);
-
-/* Expected results:
- "mirror0.google.com",
- "mirror0.mozilla.com",
- "mirror1.google.com",
- "mirror1.mozilla.com",
- "mirror2.google.com",
- "mirror2.mozilla.com",
- "mirror3.google.com", <== We check for this site (index 6)
- "mirror3.mozilla.com",
- "mirror4.google.com",
- "mirror4.mozilla.com",
- "mirror5.google.com",
- "mirror5.mozilla.com",
- ...
-*/
-
- // Items should be sorted by host
- var siteNode = root.getChild(6)
- .QueryInterface(Ci.nsINavHistoryContainerResultNode);
- do_check_eq(siteNode.title, "mirror3.google.com");
-
- siteNode.containerOpen = true;
- do_check_eq(siteNode.childCount, 2);
-
- // Inside of host sites are sorted by title
- var visitNode = siteNode.getChild(0);
- do_check_eq(visitNode.uri, "http://mirror3.google.com/a");
-
- // Bug 473157: changing sorting mode should not affect the containers
- result.sortingMode = options.SORT_BY_TITLE_DESCENDING;
- siteNode = root.getChild(6)
- .QueryInterface(Ci.nsINavHistoryContainerResultNode);
- do_check_eq(siteNode.title, "mirror3.google.com");
-
- siteNode.containerOpen = true;
- do_check_eq(siteNode.childCount, 2);
-
- // But URLs are now sorted by title descending
- var visit = siteNode.getChild(0);
- do_check_eq(visit.uri, "http://mirror3.google.com/b");
-
- siteNode.containerOpen = false;
- root.containerOpen = false;
-
- // Cleanup.
- bs.removeItem(itemId);
-}
-
-/**
- * Checks that queries grouped by date do liveupdate correctly.
- */
-function* task_test_date_liveupdate(aResultType) {
- var midnight = nowObj;
- midnight.setHours(0);
- midnight.setMinutes(0);
- midnight.setSeconds(0);
- midnight.setMilliseconds(0);
-
- // TEST 1. Test that the query correctly updates when it is root.
- var options = hs.getNewQueryOptions();
- options.resultType = aResultType;
- var query = hs.getNewQuery();
- var result = hs.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
-
- do_check_eq(root.childCount, visibleContainers.length);
- // Remove "Today".
- hs.removePagesByTimeframe(midnight.getTime() * 1000, Date.now() * 1000);
- do_check_eq(root.childCount, visibleContainers.length - 1);
-
- // Open "Last 7 days" container, this way we will have a container accepting
- // the new visit, but we should still add back "Today" container.
- var last7Days = root.getChild(1)
- .QueryInterface(Ci.nsINavHistoryContainerResultNode);
- last7Days.containerOpen = true;
-
- // Add a visit for "Today". This should add back the missing "Today"
- // container.
- yield task_add_normalized_visit(uri("http://www.mozilla.org/"), nowObj.getTime(), 0);
- do_check_eq(root.childCount, visibleContainers.length);
-
- last7Days.containerOpen = false;
- root.containerOpen = false;
-
- // TEST 2. Test that the query correctly updates even if it is not root.
- var itemId = bs.insertBookmark(bs.toolbarFolder,
- uri("place:type=" + aResultType),
- bs.DEFAULT_INDEX, "");
-
- // Query toolbar and open our query container, then check again liveupdate.
- options = hs.getNewQueryOptions();
- query = hs.getNewQuery();
- query.setFolders([bs.toolbarFolder], 1);
- result = hs.executeQuery(query, options);
- root = result.root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 1);
- var dateContainer = root.getChild(0).QueryInterface(Ci.nsINavHistoryContainerResultNode);
- dateContainer.containerOpen = true;
-
- do_check_eq(dateContainer.childCount, visibleContainers.length);
- // Remove "Today".
- hs.removePagesByTimeframe(midnight.getTime() * 1000, Date.now() * 1000);
- do_check_eq(dateContainer.childCount, visibleContainers.length - 1);
- // Add a visit for "Today".
- yield task_add_normalized_visit(uri("http://www.mozilla.org/"), nowObj.getTime(), 0);
- do_check_eq(dateContainer.childCount, visibleContainers.length);
-
- dateContainer.containerOpen = false;
- root.containerOpen = false;
-
- // Cleanup.
- bs.removeItem(itemId);
-}
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_history_sidebar()
-{
- // If we're dangerously close to a date change, just bail out.
- if (nowObj.getHours() == 23 && nowObj.getMinutes() >= 50) {
- return;
- }
-
- yield task_fill_history();
- test_RESULTS_AS_DATE_SITE_QUERY();
- test_RESULTS_AS_DATE_QUERY();
- test_RESULTS_AS_SITE_QUERY();
-
- yield task_test_date_liveupdate(Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_SITE_QUERY);
- yield task_test_date_liveupdate(Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_QUERY);
-
- // The remaining views are
- // 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_hosts_triggers.js b/toolkit/components/places/tests/unit/test_hosts_triggers.js
deleted file mode 100644
index 9c3359e76d..0000000000
--- a/toolkit/components/places/tests/unit/test_hosts_triggers.js
+++ /dev/null
@@ -1,226 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * This file tests the validity of various triggers that add remove hosts from moz_hosts
- */
-
-XPCOMUtils.defineLazyServiceGetter(this, "gHistory",
- "@mozilla.org/browser/history;1",
- "mozIAsyncHistory");
-
-// add some visits and remove them, add a bookmark,
-// change its uri, then remove it, and
-// for each change check that moz_hosts has correctly been updated.
-
-function isHostInMozPlaces(aURI)
-{
- let stmt = DBConn().createStatement(
- `SELECT url
- FROM moz_places
- WHERE url_hash = hash(:host) AND url = :host`
- );
- let result = false;
- stmt.params.host = aURI.spec;
- while (stmt.executeStep()) {
- if (stmt.row.url == aURI.spec) {
- result = true;
- break;
- }
- }
- stmt.finalize();
- return result;
-}
-
-function isHostInMozHosts(aURI, aTyped, aPrefix)
-{
- let stmt = DBConn().createStatement(
- `SELECT host, typed, prefix
- FROM moz_hosts
- WHERE host = fixup_url(:host)
- AND frecency NOTNULL`
- );
- let result = false;
- stmt.params.host = aURI.host;
- if (stmt.executeStep()) {
- result = aTyped == stmt.row.typed && aPrefix == stmt.row.prefix;
- }
- stmt.finalize();
- return result;
-}
-
-var urls = [{uri: NetUtil.newURI("http://visit1.mozilla.org"),
- expected: "visit1.mozilla.org",
- typed: 0,
- prefix: null
- },
- {uri: NetUtil.newURI("http://visit2.mozilla.org"),
- expected: "visit2.mozilla.org",
- typed: 0,
- prefix: null
- },
- {uri: NetUtil.newURI("http://www.foo.mozilla.org"),
- expected: "foo.mozilla.org",
- typed: 1,
- prefix: "www."
- },
- ];
-
-const NEW_URL = "http://different.mozilla.org/";
-
-add_task(function* test_moz_hosts_update()
-{
- let places = [];
- urls.forEach(function(url) {
- let place = { uri: url.uri,
- title: "test for " + url.url,
- transition: url.typed ? TRANSITION_TYPED : undefined };
- places.push(place);
- });
-
- yield PlacesTestUtils.addVisits(places);
-
- do_check_true(isHostInMozHosts(urls[0].uri, urls[0].typed, urls[0].prefix));
- do_check_true(isHostInMozHosts(urls[1].uri, urls[1].typed, urls[1].prefix));
- do_check_true(isHostInMozHosts(urls[2].uri, urls[2].typed, urls[2].prefix));
-});
-
-add_task(function* test_remove_places()
-{
- for (let idx in urls) {
- PlacesUtils.history.removePage(urls[idx].uri);
- }
-
- yield PlacesTestUtils.clearHistory();
-
- for (let idx in urls) {
- do_check_false(isHostInMozHosts(urls[idx].uri, urls[idx].typed, urls[idx].prefix));
- }
-});
-
-add_task(function* test_bookmark_changes()
-{
- let testUri = NetUtil.newURI("http://test.mozilla.org");
-
- let itemId = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- testUri,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "bookmark title");
-
- do_check_true(isHostInMozPlaces(testUri));
-
- // Change the hostname
- PlacesUtils.bookmarks.changeBookmarkURI(itemId, NetUtil.newURI(NEW_URL));
-
- yield PlacesTestUtils.clearHistory();
-
- let newUri = NetUtil.newURI(NEW_URL);
- do_check_true(isHostInMozPlaces(newUri));
- do_check_true(isHostInMozHosts(newUri, false, null));
- do_check_false(isHostInMozHosts(NetUtil.newURI("http://test.mozilla.org"), false, null));
-});
-
-add_task(function* test_bookmark_removal()
-{
- let itemId = PlacesUtils.bookmarks.getIdForItemAt(PlacesUtils.unfiledBookmarksFolderId,
- PlacesUtils.bookmarks.DEFAULT_INDEX);
- let newUri = NetUtil.newURI(NEW_URL);
- PlacesUtils.bookmarks.removeItem(itemId);
- yield PlacesTestUtils.clearHistory();
-
- do_check_false(isHostInMozHosts(newUri, false, null));
-});
-
-add_task(function* test_moz_hosts_typed_update()
-{
- const TEST_URI = NetUtil.newURI("http://typed.mozilla.com");
- let places = [{ uri: TEST_URI
- , title: "test for " + TEST_URI.spec
- },
- { uri: TEST_URI
- , title: "test for " + TEST_URI.spec
- , transition: TRANSITION_TYPED
- }];
-
- yield PlacesTestUtils.addVisits(places);
-
- do_check_true(isHostInMozHosts(TEST_URI, true, null));
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* test_moz_hosts_www_remove()
-{
- function* test_removal(aURIToRemove, aURIToKeep, aCallback) {
- let places = [{ uri: aURIToRemove
- , title: "test for " + aURIToRemove.spec
- , transition: TRANSITION_TYPED
- },
- { uri: aURIToKeep
- , title: "test for " + aURIToKeep.spec
- , transition: TRANSITION_TYPED
- }];
-
- yield PlacesTestUtils.addVisits(places);
- print("removing " + aURIToRemove.spec + " keeping " + aURIToKeep);
- dump_table("moz_hosts");
- dump_table("moz_places");
- PlacesUtils.history.removePage(aURIToRemove);
- let prefix = /www/.test(aURIToKeep.spec) ? "www." : null;
- dump_table("moz_hosts");
- dump_table("moz_places");
- do_check_true(isHostInMozHosts(aURIToKeep, true, prefix));
- }
-
- const TEST_URI = NetUtil.newURI("http://rem.mozilla.com");
- const TEST_WWW_URI = NetUtil.newURI("http://www.rem.mozilla.com");
- yield test_removal(TEST_URI, TEST_WWW_URI);
- yield test_removal(TEST_WWW_URI, TEST_URI);
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* test_moz_hosts_ftp_matchall()
-{
- const TEST_URI_1 = NetUtil.newURI("ftp://www.mozilla.com/");
- const TEST_URI_2 = NetUtil.newURI("ftp://mozilla.com/");
-
- yield PlacesTestUtils.addVisits([
- { uri: TEST_URI_1, transition: TRANSITION_TYPED },
- { uri: TEST_URI_2, transition: TRANSITION_TYPED }
- ]);
-
- do_check_true(isHostInMozHosts(TEST_URI_1, true, "ftp://"));
-});
-
-add_task(function* test_moz_hosts_ftp_not_matchall()
-{
- const TEST_URI_1 = NetUtil.newURI("http://mozilla.com/");
- const TEST_URI_2 = NetUtil.newURI("ftp://mozilla.com/");
-
- yield PlacesTestUtils.addVisits([
- { uri: TEST_URI_1, transition: TRANSITION_TYPED },
- { uri: TEST_URI_2, transition: TRANSITION_TYPED }
- ]);
-
- do_check_true(isHostInMozHosts(TEST_URI_1, true, null));
-});
-
-add_task(function* test_moz_hosts_update_2()
-{
- // Check that updating trigger takes into account prefixes for different
- // rev_hosts.
- const TEST_URI_1 = NetUtil.newURI("https://www.google.it/");
- const TEST_URI_2 = NetUtil.newURI("https://google.it/");
- let places = [{ uri: TEST_URI_1
- , transition: TRANSITION_TYPED
- },
- { uri: TEST_URI_2
- }];
- yield PlacesTestUtils.addVisits(places);
-
- do_check_true(isHostInMozHosts(TEST_URI_1, true, "https://www."));
-});
-
-function run_test()
-{
- run_next_test();
-}
diff --git a/toolkit/components/places/tests/unit/test_import_mobile_bookmarks.js b/toolkit/components/places/tests/unit/test_import_mobile_bookmarks.js
deleted file mode 100644
index 771a6ac173..0000000000
--- a/toolkit/components/places/tests/unit/test_import_mobile_bookmarks.js
+++ /dev/null
@@ -1,292 +0,0 @@
-function* importFromFixture(fixture, replace) {
- let cwd = yield OS.File.getCurrentDirectory();
- let path = OS.Path.join(cwd, fixture);
-
- do_print(`Importing from ${path}`);
- yield BookmarkJSONUtils.importFromFile(path, replace);
- yield PlacesTestUtils.promiseAsyncUpdates();
-}
-
-function* treeEquals(guid, expected, message) {
- let root = yield PlacesUtils.promiseBookmarksTree(guid);
- let bookmarks = (function nodeToEntry(node) {
- let entry = { guid: node.guid, index: node.index }
- if (node.children) {
- entry.children = node.children.map(nodeToEntry);
- }
- if (node.annos) {
- entry.annos = node.annos;
- }
- return entry;
- }(root));
-
- do_print(`Checking if ${guid} tree matches ${JSON.stringify(expected)}`);
- do_print(`Got bookmarks tree for ${guid}: ${JSON.stringify(bookmarks)}`);
-
- deepEqual(bookmarks, expected, message);
-}
-
-add_task(function* test_restore_mobile_bookmarks_root() {
- yield* importFromFixture("mobile_bookmarks_root_import.json",
- /* replace */ true);
-
- yield* treeEquals(PlacesUtils.bookmarks.rootGuid, {
- guid: PlacesUtils.bookmarks.rootGuid,
- index: 0,
- children: [{
- guid: PlacesUtils.bookmarks.menuGuid,
- index: 0,
- children: [
- { guid: "X6lUyOspVYwi", index: 0 },
- ],
- }, {
- guid: PlacesUtils.bookmarks.toolbarGuid,
- index: 1,
- }, {
- guid: PlacesUtils.bookmarks.unfiledGuid,
- index: 3,
- }, {
- guid: PlacesUtils.bookmarks.mobileGuid,
- index: 4,
- annos: [{
- name: "mobile/bookmarksRoot",
- flags: 0,
- expires: 4,
- value: 1,
- }],
- children: [
- { guid: "_o8e1_zxTJFg", index: 0 },
- { guid: "QCtSqkVYUbXB", index: 1 },
- ],
- }],
- }, "Should restore mobile bookmarks from root");
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_import_mobile_bookmarks_root() {
- yield* importFromFixture("mobile_bookmarks_root_import.json",
- /* replace */ false);
- yield* importFromFixture("mobile_bookmarks_root_merge.json",
- /* replace */ false);
-
- yield* treeEquals(PlacesUtils.bookmarks.rootGuid, {
- guid: PlacesUtils.bookmarks.rootGuid,
- index: 0,
- children: [{
- guid: PlacesUtils.bookmarks.menuGuid,
- index: 0,
- children: [
- { guid: "Utodo9b0oVws", index: 0 },
- { guid: "X6lUyOspVYwi", index: 1 },
- ],
- }, {
- guid: PlacesUtils.bookmarks.toolbarGuid,
- index: 1,
- }, {
- guid: PlacesUtils.bookmarks.unfiledGuid,
- index: 3,
- }, {
- guid: PlacesUtils.bookmarks.mobileGuid,
- index: 4,
- annos: [{
- name: "mobile/bookmarksRoot",
- flags: 0,
- expires: 4,
- value: 1,
- }],
- children: [
- { guid: "a17yW6-nTxEJ", index: 0 },
- { guid: "xV10h9Wi3FBM", index: 1 },
- { guid: "_o8e1_zxTJFg", index: 2 },
- { guid: "QCtSqkVYUbXB", index: 3 },
- ],
- }],
- }, "Should merge bookmarks root contents");
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_restore_mobile_bookmarks_folder() {
- yield* importFromFixture("mobile_bookmarks_folder_import.json",
- /* replace */ true);
-
- yield* treeEquals(PlacesUtils.bookmarks.rootGuid, {
- guid: PlacesUtils.bookmarks.rootGuid,
- index: 0,
- children: [{
- guid: PlacesUtils.bookmarks.menuGuid,
- index: 0,
- children: [
- { guid: "X6lUyOspVYwi", index: 0 },
- { guid: "XF4yRP6bTuil", index: 1 },
- ],
- }, {
- guid: PlacesUtils.bookmarks.toolbarGuid,
- index: 1,
- children: [{ guid: "buy7711R3ZgE", index: 0 }],
- }, {
- guid: PlacesUtils.bookmarks.unfiledGuid,
- index: 3,
- children: [{ guid: "KIa9iKZab2Z5", index: 0 }],
- }, {
- guid: PlacesUtils.bookmarks.mobileGuid,
- index: 4,
- annos: [{
- name: "mobile/bookmarksRoot",
- flags: 0,
- expires: 4,
- value: 1,
- }],
- children: [
- { guid: "_o8e1_zxTJFg", index: 0 },
- { guid: "QCtSqkVYUbXB", index: 1 },
- ],
- }],
- }, "Should restore mobile bookmark folder contents into mobile root");
-
- // We rewrite queries to point to the root ID instead of the name
- // ("MOBILE_BOOKMARKS") so that we don't break them if the user downgrades
- // to an earlier release channel. This can be removed along with the anno in
- // bug 1306445.
- let queryById = yield PlacesUtils.bookmarks.fetch("XF4yRP6bTuil");
- equal(queryById.url.href, "place:folder=" + PlacesUtils.mobileFolderId,
- "Should rewrite mobile query to point to root ID");
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_import_mobile_bookmarks_folder() {
- yield* importFromFixture("mobile_bookmarks_folder_import.json",
- /* replace */ false);
- yield* importFromFixture("mobile_bookmarks_folder_merge.json",
- /* replace */ false);
-
- yield* treeEquals(PlacesUtils.bookmarks.rootGuid, {
- guid: PlacesUtils.bookmarks.rootGuid,
- index: 0,
- children: [{
- guid: PlacesUtils.bookmarks.menuGuid,
- index: 0,
- children: [
- { guid: "Utodo9b0oVws", index: 0 },
- { guid: "X6lUyOspVYwi", index: 1 },
- { guid: "XF4yRP6bTuil", index: 2 },
- ],
- }, {
- guid: PlacesUtils.bookmarks.toolbarGuid,
- index: 1,
- children: [{ guid: "buy7711R3ZgE", index: 0 }],
- }, {
- guid: PlacesUtils.bookmarks.unfiledGuid,
- index: 3,
- children: [{ guid: "KIa9iKZab2Z5", index: 0 }],
- }, {
- guid: PlacesUtils.bookmarks.mobileGuid,
- index: 4,
- annos: [{
- name: "mobile/bookmarksRoot",
- flags: 0,
- expires: 4,
- value: 1,
- }],
- children: [
- { guid: "a17yW6-nTxEJ", index: 0 },
- { guid: "xV10h9Wi3FBM", index: 1 },
- { guid: "_o8e1_zxTJFg", index: 2 },
- { guid: "QCtSqkVYUbXB", index: 3 },
- ],
- }],
- }, "Should merge bookmarks folder contents into mobile root");
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_restore_multiple_bookmarks_folders() {
- yield* importFromFixture("mobile_bookmarks_multiple_folders.json",
- /* replace */ true);
-
- yield* treeEquals(PlacesUtils.bookmarks.rootGuid, {
- guid: PlacesUtils.bookmarks.rootGuid,
- index: 0,
- children: [{
- guid: PlacesUtils.bookmarks.menuGuid,
- index: 0,
- children: [
- { guid: "buy7711R3ZgE", index: 0 },
- { guid: "F_LBgd1fS_uQ", index: 1 },
- { guid: "oIpmQXMWsXvY", index: 2 },
- ],
- }, {
- guid: PlacesUtils.bookmarks.toolbarGuid,
- index: 1,
- children: [{ guid: "Utodo9b0oVws", index: 0 }],
- }, {
- guid: PlacesUtils.bookmarks.unfiledGuid,
- index: 3,
- children: [{ guid: "xV10h9Wi3FBM", index: 0 }],
- }, {
- guid: PlacesUtils.bookmarks.mobileGuid,
- index: 4,
- annos: [{
- name: "mobile/bookmarksRoot",
- flags: 0,
- expires: 4,
- value: 1,
- }],
- children: [
- { guid: "sSZ86WT9WbN3", index: 0 },
- { guid: "a17yW6-nTxEJ", index: 1 },
- ],
- }],
- }, "Should restore multiple bookmarks folder contents into root");
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_import_multiple_bookmarks_folders() {
- yield* importFromFixture("mobile_bookmarks_root_import.json",
- /* replace */ false);
- yield* importFromFixture("mobile_bookmarks_multiple_folders.json",
- /* replace */ false);
-
- yield* treeEquals(PlacesUtils.bookmarks.rootGuid, {
- guid: PlacesUtils.bookmarks.rootGuid,
- index: 0,
- children: [{
- guid: PlacesUtils.bookmarks.menuGuid,
- index: 0,
- children: [
- { guid: "buy7711R3ZgE", index: 0 },
- { guid: "F_LBgd1fS_uQ", index: 1 },
- { guid: "oIpmQXMWsXvY", index: 2 },
- { guid: "X6lUyOspVYwi", index: 3 },
- ],
- }, {
- guid: PlacesUtils.bookmarks.toolbarGuid,
- index: 1,
- children: [{ guid: "Utodo9b0oVws", index: 0 }],
- }, {
- guid: PlacesUtils.bookmarks.unfiledGuid,
- index: 3,
- children: [{ guid: "xV10h9Wi3FBM", index: 0 }],
- }, {
- guid: PlacesUtils.bookmarks.mobileGuid,
- index: 4,
- annos: [{
- name: "mobile/bookmarksRoot",
- flags: 0,
- expires: 4,
- value: 1,
- }],
- children: [
- { guid: "sSZ86WT9WbN3", index: 0 },
- { guid: "a17yW6-nTxEJ", index: 1 },
- { guid: "_o8e1_zxTJFg", index: 2 },
- { guid: "QCtSqkVYUbXB", index: 3 },
- ],
- }],
- }, "Should merge multiple mobile folders into root");
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
diff --git a/toolkit/components/places/tests/unit/test_isPageInDB.js b/toolkit/components/places/tests/unit/test_isPageInDB.js
deleted file mode 100644
index 249853fa9a..0000000000
--- a/toolkit/components/places/tests/unit/test_isPageInDB.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-
-add_task(function* test_execute() {
- var good_uri = uri("http://mozilla.com");
- var bad_uri = uri("http://google.com");
- yield PlacesTestUtils.addVisits({uri: good_uri});
- do_check_true(yield PlacesTestUtils.isPageInDB(good_uri));
- do_check_false(yield PlacesTestUtils.isPageInDB(bad_uri));
-});
diff --git a/toolkit/components/places/tests/unit/test_isURIVisited.js b/toolkit/components/places/tests/unit/test_isURIVisited.js
deleted file mode 100644
index 93c010e83e..0000000000
--- a/toolkit/components/places/tests/unit/test_isURIVisited.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Tests functionality of the isURIVisited API.
-
-const SCHEMES = {
- "http://": true,
- "https://": true,
- "ftp://": true,
- "file:///": true,
- "about:": false,
-// nsIIOService.newURI() can throw if e.g. the app knows about imap://
-// but the account is not set up and so the URL is invalid for it.
-// "imap://": false,
- "news://": false,
- "mailbox:": false,
- "moz-anno:favicon:http://": false,
- "view-source:http://": false,
- "chrome://browser/content/browser.xul?": false,
- "resource://": false,
- "data:,": false,
- "wyciwyg:/0/http://": false,
- "javascript:": false,
-};
-
-var gRunner;
-function run_test()
-{
- do_test_pending();
- gRunner = step();
- gRunner.next();
-}
-
-function* step()
-{
- let history = Cc["@mozilla.org/browser/history;1"]
- .getService(Ci.mozIAsyncHistory);
-
- for (let scheme in SCHEMES) {
- do_print("Testing scheme " + scheme);
- for (let t in PlacesUtils.history.TRANSITIONS) {
- do_print("With transition " + t);
- let transition = PlacesUtils.history.TRANSITIONS[t];
-
- let uri = NetUtil.newURI(scheme + "mozilla.org/");
-
- history.isURIVisited(uri, function(aURI, aIsVisited) {
- do_check_true(uri.equals(aURI));
- do_check_false(aIsVisited);
-
- let callback = {
- handleError: function () {},
- handleResult: function () {},
- handleCompletion: function () {
- do_print("Added visit to " + uri.spec);
-
- history.isURIVisited(uri, function (aURI2, aIsVisited2) {
- do_check_true(uri.equals(aURI2));
- let checker = SCHEMES[scheme] ? do_check_true : do_check_false;
- checker(aIsVisited2);
-
- PlacesTestUtils.clearHistory().then(function () {
- history.isURIVisited(uri, function(aURI3, aIsVisited3) {
- do_check_true(uri.equals(aURI3));
- do_check_false(aIsVisited3);
- gRunner.next();
- });
- });
- });
- },
- };
-
- history.updatePlaces({ uri: uri
- , visits: [ { transitionType: transition
- , visitDate: Date.now() * 1000
- } ]
- }, callback);
- });
- yield undefined;
- }
- }
-
- do_test_finished();
-}
diff --git a/toolkit/components/places/tests/unit/test_isvisited.js b/toolkit/components/places/tests/unit/test_isvisited.js
deleted file mode 100644
index d7bcc2851a..0000000000
--- a/toolkit/components/places/tests/unit/test_isvisited.js
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_execute()
-{
- var referrer = uri("about:blank");
-
- // 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});
- do_check_guid_for_uri(uri2);
- do_check_true(yield promiseIsURIVisited(uri2));
-
- // add a ftp:// uri
- var uri3 = uri("ftp://ftp.mozilla.org");
- yield PlacesTestUtils.addVisits({uri: uri3, referrer: referrer});
- do_check_guid_for_uri(uri3);
- do_check_true(yield promiseIsURIVisited(uri3));
-
- // check if a nonexistent uri is visited
- var uri4 = uri("http://foobarcheese.com");
- do_check_false(yield promiseIsURIVisited(uri4));
-
- // check that certain schemes never show up as visited
- // even if we attempt to add them to history
- // see CanAddURI() in nsNavHistory.cpp
- const URLS = [
- "about:config",
- "imap://cyrus.andrew.cmu.edu/archive.imap",
- "news://new.mozilla.org/mozilla.dev.apps.firefox",
- "mailbox:Inbox",
- "moz-anno:favicon:http://mozilla.org/made-up-favicon",
- "view-source:http://mozilla.org",
- "chrome://browser/content/browser.xul",
- "resource://gre-resources/hiddenWindow.html",
- "data:,Hello%2C%20World!",
- "wyciwyg:/0/http://mozilla.org",
- "javascript:alert('hello wolrd!');",
- "http://localhost/" + "a".repeat(1984),
- ];
- for (let currentURL of URLS) {
- try {
- var cantAddUri = uri(currentURL);
- }
- catch (e) {
- // nsIIOService.newURI() can throw if e.g. our app knows about imap://
- // but the account is not set up and so the URL is invalid for us.
- // Note this in the log but ignore as it's not the subject of this test.
- do_print("Could not construct URI for '" + currentURL + "'; ignoring");
- }
- if (cantAddUri) {
- PlacesTestUtils.addVisits({uri: cantAddUri, referrer: referrer}).then(() => {
- do_throw("Should not have added history for invalid URI.");
- }, error => {
- do_check_true(error.message.includes("No items were added to history"));
- });
- do_check_false(yield promiseIsURIVisited(cantAddUri));
- }
- }
-});
-
diff --git a/toolkit/components/places/tests/unit/test_keywords.js b/toolkit/components/places/tests/unit/test_keywords.js
deleted file mode 100644
index 57b734c5d8..0000000000
--- a/toolkit/components/places/tests/unit/test_keywords.js
+++ /dev/null
@@ -1,548 +0,0 @@
-"use strict"
-
-function* check_keyword(aExpectExists, aHref, aKeyword, aPostData = null) {
- // Check case-insensitivity.
- aKeyword = aKeyword.toUpperCase();
-
- let entry = yield PlacesUtils.keywords.fetch(aKeyword);
-
- Assert.deepEqual(entry, yield PlacesUtils.keywords.fetch({ keyword: aKeyword }));
-
- if (aExpectExists) {
- Assert.ok(!!entry, "A keyword should exist");
- Assert.equal(entry.url.href, aHref);
- Assert.equal(entry.postData, aPostData);
- Assert.deepEqual(entry, yield PlacesUtils.keywords.fetch({ keyword: aKeyword, url: aHref }));
- let entries = [];
- yield PlacesUtils.keywords.fetch({ url: aHref }, e => entries.push(e));
- Assert.ok(entries.some(e => e.url.href == aHref && e.keyword == aKeyword.toLowerCase()));
- } else {
- Assert.ok(!entry || entry.url.href != aHref,
- "The given keyword entry should not exist");
- Assert.equal(null, yield PlacesUtils.keywords.fetch({ keyword: aKeyword, url: aHref }));
- }
-}
-
-/**
- * Polls the keywords cache waiting for the given keyword entry.
- */
-function* promiseKeyword(keyword, expectedHref) {
- let href = null;
- do {
- yield new Promise(resolve => do_timeout(100, resolve));
- let entry = yield PlacesUtils.keywords.fetch(keyword);
- if (entry)
- href = entry.url.href;
- } while (href != expectedHref);
-}
-
-function* check_no_orphans() {
- let db = yield PlacesUtils.promiseDBConnection();
- let rows = yield db.executeCached(
- `SELECT id FROM moz_keywords k
- WHERE NOT EXISTS (SELECT 1 FROM moz_places WHERE id = k.place_id)
- `);
- Assert.equal(rows.length, 0);
-}
-
-function expectBookmarkNotifications() {
- let notifications = [];
- let observer = new Proxy(NavBookmarkObserver, {
- get(target, name) {
- if (name == "check") {
- PlacesUtils.bookmarks.removeObserver(observer);
- return expectedNotifications =>
- Assert.deepEqual(notifications, expectedNotifications);
- }
-
- if (name.startsWith("onItemChanged")) {
- return function(itemId, property) {
- if (property != "keyword")
- return;
- let args = Array.from(arguments, arg => {
- if (arg && arg instanceof Ci.nsIURI)
- return new URL(arg.spec);
- if (arg && typeof(arg) == "number" && arg >= Date.now() * 1000)
- return new Date(parseInt(arg/1000));
- return arg;
- });
- notifications.push({ name: name, arguments: args });
- }
- }
-
- if (name in target)
- return target[name];
- return undefined;
- }
- });
- PlacesUtils.bookmarks.addObserver(observer, false);
- return observer;
-}
-
-add_task(function* test_invalid_input() {
- Assert.throws(() => PlacesUtils.keywords.fetch(null),
- /Invalid keyword/);
- Assert.throws(() => PlacesUtils.keywords.fetch(5),
- /Invalid keyword/);
- Assert.throws(() => PlacesUtils.keywords.fetch(undefined),
- /Invalid keyword/);
- Assert.throws(() => PlacesUtils.keywords.fetch({ keyword: null }),
- /Invalid keyword/);
- Assert.throws(() => PlacesUtils.keywords.fetch({ keyword: {} }),
- /Invalid keyword/);
- Assert.throws(() => PlacesUtils.keywords.fetch({ keyword: 5 }),
- /Invalid keyword/);
- Assert.throws(() => PlacesUtils.keywords.fetch({}),
- /At least keyword or url must be provided/);
- Assert.throws(() => PlacesUtils.keywords.fetch({ keyword: "test" }, "test"),
- /onResult callback must be a valid function/);
- Assert.throws(() => PlacesUtils.keywords.fetch({ url: "test" }),
- /is not a valid URL/);
- Assert.throws(() => PlacesUtils.keywords.fetch({ url: {} }),
- /is not a valid URL/);
- Assert.throws(() => PlacesUtils.keywords.fetch({ url: null }),
- /is not a valid URL/);
- Assert.throws(() => PlacesUtils.keywords.fetch({ url: "" }),
- /is not a valid URL/);
-
- Assert.throws(() => PlacesUtils.keywords.insert(null),
- /Input should be a valid object/);
- Assert.throws(() => PlacesUtils.keywords.insert("test"),
- /Input should be a valid object/);
- Assert.throws(() => PlacesUtils.keywords.insert(undefined),
- /Input should be a valid object/);
- Assert.throws(() => PlacesUtils.keywords.insert({ }),
- /Invalid keyword/);
- Assert.throws(() => PlacesUtils.keywords.insert({ keyword: null }),
- /Invalid keyword/);
- Assert.throws(() => PlacesUtils.keywords.insert({ keyword: 5 }),
- /Invalid keyword/);
- Assert.throws(() => PlacesUtils.keywords.insert({ keyword: "" }),
- /Invalid keyword/);
- Assert.throws(() => PlacesUtils.keywords.insert({ keyword: "test", postData: 5 }),
- /Invalid POST data/);
- Assert.throws(() => PlacesUtils.keywords.insert({ keyword: "test", postData: {} }),
- /Invalid POST data/);
- Assert.throws(() => PlacesUtils.keywords.insert({ keyword: "test" }),
- /is not a valid URL/);
- Assert.throws(() => PlacesUtils.keywords.insert({ keyword: "test", url: 5 }),
- /is not a valid URL/);
- Assert.throws(() => PlacesUtils.keywords.insert({ keyword: "test", url: "" }),
- /is not a valid URL/);
- Assert.throws(() => PlacesUtils.keywords.insert({ keyword: "test", url: null }),
- /is not a valid URL/);
- Assert.throws(() => PlacesUtils.keywords.insert({ keyword: "test", url: "mozilla" }),
- /is not a valid URL/);
-
- Assert.throws(() => PlacesUtils.keywords.remove(null),
- /Invalid keyword/);
- Assert.throws(() => PlacesUtils.keywords.remove(""),
- /Invalid keyword/);
- Assert.throws(() => PlacesUtils.keywords.remove(5),
- /Invalid keyword/);
-});
-
-add_task(function* test_addKeyword() {
- yield check_keyword(false, "http://example.com/", "keyword");
- let fc = yield foreign_count("http://example.com/");
- let observer = expectBookmarkNotifications();
-
- yield PlacesUtils.keywords.insert({ keyword: "keyword", url: "http://example.com/" });
- observer.check([]);
-
- yield check_keyword(true, "http://example.com/", "keyword");
- Assert.equal((yield foreign_count("http://example.com/")), fc + 1); // +1 keyword
-
- // Now remove the keyword.
- observer = expectBookmarkNotifications();
- yield PlacesUtils.keywords.remove("keyword");
- observer.check([]);
-
- yield check_keyword(false, "http://example.com/", "keyword");
- Assert.equal((yield foreign_count("http://example.com/")), fc); // -1 keyword
-
- // Check using URL.
- yield PlacesUtils.keywords.insert({ keyword: "keyword", url: new URL("http://example.com/") });
- yield check_keyword(true, "http://example.com/", "keyword");
- yield PlacesUtils.keywords.remove("keyword");
- yield check_keyword(false, "http://example.com/", "keyword");
-
- yield check_no_orphans();
-});
-
-add_task(function* test_addBookmarkAndKeyword() {
- yield check_keyword(false, "http://example.com/", "keyword");
- let fc = yield foreign_count("http://example.com/");
- let bookmark = yield PlacesUtils.bookmarks.insert({ url: "http://example.com/",
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid });
-
- let observer = expectBookmarkNotifications();
- yield PlacesUtils.keywords.insert({ keyword: "keyword", url: "http://example.com/" });
-
- observer.check([{ name: "onItemChanged",
- arguments: [ (yield PlacesUtils.promiseItemId(bookmark.guid)),
- "keyword", false, "keyword",
- bookmark.lastModified, bookmark.type,
- (yield PlacesUtils.promiseItemId(bookmark.parentGuid)),
- bookmark.guid, bookmark.parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] } ]);
-
- yield check_keyword(true, "http://example.com/", "keyword");
- Assert.equal((yield foreign_count("http://example.com/")), fc + 2); // +1 bookmark +1 keyword
-
- // Now remove the keyword.
- observer = expectBookmarkNotifications();
- yield PlacesUtils.keywords.remove("keyword");
-
- observer.check([{ name: "onItemChanged",
- arguments: [ (yield PlacesUtils.promiseItemId(bookmark.guid)),
- "keyword", false, "",
- bookmark.lastModified, bookmark.type,
- (yield PlacesUtils.promiseItemId(bookmark.parentGuid)),
- bookmark.guid, bookmark.parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] } ]);
-
- yield check_keyword(false, "http://example.com/", "keyword");
- Assert.equal((yield foreign_count("http://example.com/")), fc + 1); // -1 keyword
-
- // Add again the keyword, then remove the bookmark.
- yield PlacesUtils.keywords.insert({ keyword: "keyword", url: "http://example.com/" });
-
- observer = expectBookmarkNotifications();
- yield PlacesUtils.bookmarks.remove(bookmark.guid);
- // the notification is synchronous but the removal process is async.
- // Unfortunately there's nothing explicit we can wait for.
- while ((yield foreign_count("http://example.com/")));
- // We don't get any itemChanged notification since the bookmark has been
- // removed already.
- observer.check([]);
-
- yield check_keyword(false, "http://example.com/", "keyword");
-
- yield check_no_orphans();
-});
-
-add_task(function* test_addKeywordToURIHavingKeyword() {
- yield check_keyword(false, "http://example.com/", "keyword");
- let fc = yield foreign_count("http://example.com/");
-
- let observer = expectBookmarkNotifications();
- yield PlacesUtils.keywords.insert({ keyword: "keyword", url: "http://example.com/" });
- observer.check([]);
-
- yield check_keyword(true, "http://example.com/", "keyword");
- Assert.equal((yield foreign_count("http://example.com/")), fc + 1); // +1 keyword
-
- yield PlacesUtils.keywords.insert({ keyword: "keyword2", url: "http://example.com/" });
-
- yield check_keyword(true, "http://example.com/", "keyword");
- yield check_keyword(true, "http://example.com/", "keyword2");
- Assert.equal((yield foreign_count("http://example.com/")), fc + 2); // +1 keyword
- let entries = [];
- let entry = yield PlacesUtils.keywords.fetch({ url: "http://example.com/" }, e => entries.push(e));
- Assert.equal(entries.length, 2);
- Assert.deepEqual(entries[0], entry);
-
- // Now remove the keywords.
- observer = expectBookmarkNotifications();
- yield PlacesUtils.keywords.remove("keyword");
- yield PlacesUtils.keywords.remove("keyword2");
- observer.check([]);
-
- yield check_keyword(false, "http://example.com/", "keyword");
- yield check_keyword(false, "http://example.com/", "keyword2");
- Assert.equal((yield foreign_count("http://example.com/")), fc); // -1 keyword
-
- yield check_no_orphans();
-});
-
-add_task(function* test_addBookmarkToURIHavingKeyword() {
- yield check_keyword(false, "http://example.com/", "keyword");
- let fc = yield foreign_count("http://example.com/");
- let observer = expectBookmarkNotifications();
-
- yield PlacesUtils.keywords.insert({ keyword: "keyword", url: "http://example.com/" });
- observer.check([]);
-
- yield check_keyword(true, "http://example.com/", "keyword");
- Assert.equal((yield foreign_count("http://example.com/")), fc + 1); // +1 keyword
-
- observer = expectBookmarkNotifications();
- let bookmark = yield PlacesUtils.bookmarks.insert({ url: "http://example.com/",
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid });
- Assert.equal((yield foreign_count("http://example.com/")), fc + 2); // +1 bookmark
- observer.check([]);
-
- observer = expectBookmarkNotifications();
- yield PlacesUtils.bookmarks.remove(bookmark.guid);
- // the notification is synchronous but the removal process is async.
- // Unfortunately there's nothing explicit we can wait for.
- while ((yield foreign_count("http://example.com/")));
- // We don't get any itemChanged notification since the bookmark has been
- // removed already.
- observer.check([]);
-
- yield check_keyword(false, "http://example.com/", "keyword");
-
- yield check_no_orphans();
-});
-
-add_task(function* test_sameKeywordDifferentURL() {
- let fc1 = yield foreign_count("http://example1.com/");
- let bookmark1 = yield PlacesUtils.bookmarks.insert({ url: "http://example1.com/",
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid });
- let fc2 = yield foreign_count("http://example2.com/");
- let bookmark2 = yield PlacesUtils.bookmarks.insert({ url: "http://example2.com/",
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid });
- yield PlacesUtils.keywords.insert({ keyword: "keyword", url: "http://example1.com/" });
-
- yield check_keyword(true, "http://example1.com/", "keyword");
- Assert.equal((yield foreign_count("http://example1.com/")), fc1 + 2); // +1 bookmark +1 keyword
- yield check_keyword(false, "http://example2.com/", "keyword");
- Assert.equal((yield foreign_count("http://example2.com/")), fc2 + 1); // +1 bookmark
-
- // Assign the same keyword to another url.
- let observer = expectBookmarkNotifications();
- yield PlacesUtils.keywords.insert({ keyword: "keyword", url: "http://example2.com/" });
-
- observer.check([{ name: "onItemChanged",
- arguments: [ (yield PlacesUtils.promiseItemId(bookmark1.guid)),
- "keyword", false, "",
- bookmark1.lastModified, bookmark1.type,
- (yield PlacesUtils.promiseItemId(bookmark1.parentGuid)),
- bookmark1.guid, bookmark1.parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] },
- { name: "onItemChanged",
- arguments: [ (yield PlacesUtils.promiseItemId(bookmark2.guid)),
- "keyword", false, "keyword",
- bookmark2.lastModified, bookmark2.type,
- (yield PlacesUtils.promiseItemId(bookmark2.parentGuid)),
- bookmark2.guid, bookmark2.parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] } ]);
-
- yield check_keyword(false, "http://example1.com/", "keyword");
- Assert.equal((yield foreign_count("http://example1.com/")), fc1 + 1); // -1 keyword
- yield check_keyword(true, "http://example2.com/", "keyword");
- Assert.equal((yield foreign_count("http://example2.com/")), fc2 + 2); // +1 keyword
-
- // Now remove the keyword.
- observer = expectBookmarkNotifications();
- yield PlacesUtils.keywords.remove("keyword");
- observer.check([{ name: "onItemChanged",
- arguments: [ (yield PlacesUtils.promiseItemId(bookmark2.guid)),
- "keyword", false, "",
- bookmark2.lastModified, bookmark2.type,
- (yield PlacesUtils.promiseItemId(bookmark2.parentGuid)),
- bookmark2.guid, bookmark2.parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] } ]);
-
- yield check_keyword(false, "http://example1.com/", "keyword");
- yield check_keyword(false, "http://example2.com/", "keyword");
- Assert.equal((yield foreign_count("http://example1.com/")), fc1 + 1);
- Assert.equal((yield foreign_count("http://example2.com/")), fc2 + 1); // -1 keyword
-
- yield PlacesUtils.bookmarks.remove(bookmark1);
- yield PlacesUtils.bookmarks.remove(bookmark2);
- Assert.equal((yield foreign_count("http://example1.com/")), fc1); // -1 bookmark
- while ((yield foreign_count("http://example2.com/"))); // -1 keyword
-
- yield check_no_orphans();
-});
-
-add_task(function* test_sameURIDifferentKeyword() {
- let fc = yield foreign_count("http://example.com/");
-
- let observer = expectBookmarkNotifications();
- let bookmark = yield PlacesUtils.bookmarks.insert({ url: "http://example.com/",
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid });
- yield PlacesUtils.keywords.insert({keyword: "keyword", url: "http://example.com/" });
-
- yield check_keyword(true, "http://example.com/", "keyword");
- Assert.equal((yield foreign_count("http://example.com/")), fc + 2); // +1 bookmark +1 keyword
-
- observer.check([{ name: "onItemChanged",
- arguments: [ (yield PlacesUtils.promiseItemId(bookmark.guid)),
- "keyword", false, "keyword",
- bookmark.lastModified, bookmark.type,
- (yield PlacesUtils.promiseItemId(bookmark.parentGuid)),
- bookmark.guid, bookmark.parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] } ]);
-
- observer = expectBookmarkNotifications();
- yield PlacesUtils.keywords.insert({ keyword: "keyword2", url: "http://example.com/" });
- yield check_keyword(true, "http://example.com/", "keyword");
- yield check_keyword(true, "http://example.com/", "keyword2");
- Assert.equal((yield foreign_count("http://example.com/")), fc + 3); // +1 keyword
- observer.check([{ name: "onItemChanged",
- arguments: [ (yield PlacesUtils.promiseItemId(bookmark.guid)),
- "keyword", false, "keyword2",
- bookmark.lastModified, bookmark.type,
- (yield PlacesUtils.promiseItemId(bookmark.parentGuid)),
- bookmark.guid, bookmark.parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] } ]);
-
- // Add a third keyword.
- yield PlacesUtils.keywords.insert({ keyword: "keyword3", url: "http://example.com/" });
- yield check_keyword(true, "http://example.com/", "keyword");
- yield check_keyword(true, "http://example.com/", "keyword2");
- yield check_keyword(true, "http://example.com/", "keyword3");
- Assert.equal((yield foreign_count("http://example.com/")), fc + 4); // +1 keyword
-
- // Remove one of the keywords.
- observer = expectBookmarkNotifications();
- yield PlacesUtils.keywords.remove("keyword");
- yield check_keyword(false, "http://example.com/", "keyword");
- yield check_keyword(true, "http://example.com/", "keyword2");
- yield check_keyword(true, "http://example.com/", "keyword3");
- observer.check([{ name: "onItemChanged",
- arguments: [ (yield PlacesUtils.promiseItemId(bookmark.guid)),
- "keyword", false, "",
- bookmark.lastModified, bookmark.type,
- (yield PlacesUtils.promiseItemId(bookmark.parentGuid)),
- bookmark.guid, bookmark.parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] } ]);
- Assert.equal((yield foreign_count("http://example.com/")), fc + 3); // -1 keyword
-
- // Now remove the bookmark.
- yield PlacesUtils.bookmarks.remove(bookmark);
- while ((yield foreign_count("http://example.com/")));
- yield check_keyword(false, "http://example.com/", "keyword");
- yield check_keyword(false, "http://example.com/", "keyword2");
- yield check_keyword(false, "http://example.com/", "keyword3");
-
- check_no_orphans();
-});
-
-add_task(function* test_deleteKeywordMultipleBookmarks() {
- let fc = yield foreign_count("http://example.com/");
-
- let observer = expectBookmarkNotifications();
- let bookmark1 = yield PlacesUtils.bookmarks.insert({ url: "http://example.com/",
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid });
- let bookmark2 = yield PlacesUtils.bookmarks.insert({ url: "http://example.com/",
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid });
- yield PlacesUtils.keywords.insert({ keyword: "keyword", url: "http://example.com/" });
-
- yield check_keyword(true, "http://example.com/", "keyword");
- Assert.equal((yield foreign_count("http://example.com/")), fc + 3); // +2 bookmark +1 keyword
- observer.check([{ name: "onItemChanged",
- arguments: [ (yield PlacesUtils.promiseItemId(bookmark2.guid)),
- "keyword", false, "keyword",
- bookmark2.lastModified, bookmark2.type,
- (yield PlacesUtils.promiseItemId(bookmark2.parentGuid)),
- bookmark2.guid, bookmark2.parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] },
- { name: "onItemChanged",
- arguments: [ (yield PlacesUtils.promiseItemId(bookmark1.guid)),
- "keyword", false, "keyword",
- bookmark1.lastModified, bookmark1.type,
- (yield PlacesUtils.promiseItemId(bookmark1.parentGuid)),
- bookmark1.guid, bookmark1.parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] } ]);
-
- observer = expectBookmarkNotifications();
- yield PlacesUtils.keywords.remove("keyword");
- yield check_keyword(false, "http://example.com/", "keyword");
- Assert.equal((yield foreign_count("http://example.com/")), fc + 2); // -1 keyword
- observer.check([{ name: "onItemChanged",
- arguments: [ (yield PlacesUtils.promiseItemId(bookmark2.guid)),
- "keyword", false, "",
- bookmark2.lastModified, bookmark2.type,
- (yield PlacesUtils.promiseItemId(bookmark2.parentGuid)),
- bookmark2.guid, bookmark2.parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] },
- { name: "onItemChanged",
- arguments: [ (yield PlacesUtils.promiseItemId(bookmark1.guid)),
- "keyword", false, "",
- bookmark1.lastModified, bookmark1.type,
- (yield PlacesUtils.promiseItemId(bookmark1.parentGuid)),
- bookmark1.guid, bookmark1.parentGuid, "",
- Ci.nsINavBookmarksService.SOURCE_DEFAULT ] } ]);
-
- // Now remove the bookmarks.
- yield PlacesUtils.bookmarks.remove(bookmark1);
- yield PlacesUtils.bookmarks.remove(bookmark2);
- Assert.equal((yield foreign_count("http://example.com/")), fc); // -2 bookmarks
-
- check_no_orphans();
-});
-
-add_task(function* test_multipleKeywordsSamePostData() {
- yield PlacesUtils.keywords.insert({ keyword: "keyword", url: "http://example.com/", postData: "postData1" });
- yield check_keyword(true, "http://example.com/", "keyword", "postData1");
- // Add another keyword with same postData, should fail.
- yield Assert.rejects(PlacesUtils.keywords.insert({ keyword: "keyword2", url: "http://example.com/", postData: "postData1" }),
- /constraint failed/);
- yield check_keyword(false, "http://example.com/", "keyword2", "postData1");
-
- yield PlacesUtils.keywords.remove("keyword");
-
- check_no_orphans();
-});
-
-add_task(function* test_oldPostDataAPI() {
- let bookmark = yield PlacesUtils.bookmarks.insert({ url: "http://example.com/",
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid });
- yield PlacesUtils.keywords.insert({ keyword: "keyword", url: "http://example.com/" });
- let itemId = yield PlacesUtils.promiseItemId(bookmark.guid);
- yield PlacesUtils.setPostDataForBookmark(itemId, "postData");
- yield check_keyword(true, "http://example.com/", "keyword", "postData");
- Assert.equal(PlacesUtils.getPostDataForBookmark(itemId), "postData");
-
- yield PlacesUtils.keywords.remove("keyword");
- yield PlacesUtils.bookmarks.remove(bookmark);
-
- check_no_orphans();
-});
-
-add_task(function* test_oldKeywordsAPI() {
- let bookmark = yield PlacesUtils.bookmarks.insert({ url: "http://example.com/",
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid });
- yield check_keyword(false, "http://example.com/", "keyword");
- let itemId = yield PlacesUtils.promiseItemId(bookmark.guid);
-
- PlacesUtils.bookmarks.setKeywordForBookmark(itemId, "keyword");
- yield promiseKeyword("keyword", "http://example.com/");
-
- // Remove the keyword.
- PlacesUtils.bookmarks.setKeywordForBookmark(itemId, "");
- yield promiseKeyword("keyword", null);
-
- yield PlacesUtils.keywords.insert({ keyword: "keyword", url: "http://example.com" });
- Assert.equal(PlacesUtils.bookmarks.getKeywordForBookmark(itemId), "keyword");
- Assert.equal(PlacesUtils.bookmarks.getURIForKeyword("keyword").spec, "http://example.com/");
- yield PlacesUtils.bookmarks.remove(bookmark);
-
- check_no_orphans();
-});
-
-add_task(function* test_bookmarkURLChange() {
- let fc1 = yield foreign_count("http://example1.com/");
- let fc2 = yield foreign_count("http://example2.com/");
- let bookmark = yield PlacesUtils.bookmarks.insert({ url: "http://example1.com/",
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- parentGuid: PlacesUtils.bookmarks.unfiledGuid });
- yield PlacesUtils.keywords.insert({ keyword: "keyword",
- url: "http://example1.com/" });
-
- yield check_keyword(true, "http://example1.com/", "keyword");
- Assert.equal((yield foreign_count("http://example1.com/")), fc1 + 2); // +1 bookmark +1 keyword
-
- yield PlacesUtils.bookmarks.update({ guid: bookmark.guid,
- url: "http://example2.com/"});
- yield promiseKeyword("keyword", "http://example2.com/");
-
- yield check_keyword(false, "http://example1.com/", "keyword");
- yield check_keyword(true, "http://example2.com/", "keyword");
- Assert.equal((yield foreign_count("http://example1.com/")), fc1); // -1 bookmark -1 keyword
- Assert.equal((yield foreign_count("http://example2.com/")), fc2 + 2); // +1 bookmark +1 keyword
-});
diff --git a/toolkit/components/places/tests/unit/test_lastModified.js b/toolkit/components/places/tests/unit/test_lastModified.js
deleted file mode 100644
index c754949327..0000000000
--- a/toolkit/components/places/tests/unit/test_lastModified.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
- /**
- * Test that inserting a new bookmark will set lastModified to the same
- * values as dateAdded.
- */
-// main
-function run_test() {
- var bs = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
- var itemId = bs.insertBookmark(bs.bookmarksMenuFolder,
- uri("http://www.mozilla.org/"),
- bs.DEFAULT_INDEX,
- "itemTitle");
- var dateAdded = bs.getItemDateAdded(itemId);
- do_check_eq(dateAdded, bs.getItemLastModified(itemId));
-
- // Change lastModified, then change dateAdded. LastModified should be set
- // to the new dateAdded.
- // This could randomly fail on virtual machines due to timing issues, so
- // we manually increase the time value. See bug 500640 for details.
- bs.setItemLastModified(itemId, dateAdded + 1000);
- do_check_true(bs.getItemLastModified(itemId) === dateAdded + 1000);
- do_check_true(bs.getItemDateAdded(itemId) < bs.getItemLastModified(itemId));
- bs.setItemDateAdded(itemId, dateAdded + 2000);
- do_check_true(bs.getItemDateAdded(itemId) === dateAdded + 2000);
- do_check_eq(bs.getItemDateAdded(itemId), bs.getItemLastModified(itemId));
-
- bs.removeItem(itemId);
-}
diff --git a/toolkit/components/places/tests/unit/test_markpageas.js b/toolkit/components/places/tests/unit/test_markpageas.js
deleted file mode 100644
index ba4f740c66..0000000000
--- a/toolkit/components/places/tests/unit/test_markpageas.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var gVisits = [{url: "http://www.mozilla.com/",
- transition: TRANSITION_TYPED},
- {url: "http://www.google.com/",
- transition: TRANSITION_BOOKMARK},
- {url: "http://www.espn.com/",
- transition: TRANSITION_LINK}];
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_execute()
-{
- let observer;
- let completionPromise = new Promise(resolveCompletionPromise => {
- observer = {
- __proto__: NavHistoryObserver.prototype,
- _visitCount: 0,
- onVisit: function (aURI, aVisitID, aTime, aSessionID, aReferringID,
- aTransitionType, aAdded)
- {
- do_check_eq(aURI.spec, gVisits[this._visitCount].url);
- do_check_eq(aTransitionType, gVisits[this._visitCount].transition);
- this._visitCount++;
-
- if (this._visitCount == gVisits.length) {
- resolveCompletionPromise();
- }
- },
- };
- });
-
- PlacesUtils.history.addObserver(observer, false);
-
- for (var visit of gVisits) {
- if (visit.transition == TRANSITION_TYPED)
- PlacesUtils.history.markPageAsTyped(uri(visit.url));
- else if (visit.transition == TRANSITION_BOOKMARK)
- PlacesUtils.history.markPageAsFollowedBookmark(uri(visit.url))
- else {
- // because it is a top level visit with no referrer,
- // it will result in TRANSITION_LINK
- }
- yield PlacesTestUtils.addVisits({
- uri: uri(visit.url),
- transition: visit.transition
- });
- }
-
- yield completionPromise;
-
- PlacesUtils.history.removeObserver(observer);
-});
-
diff --git a/toolkit/components/places/tests/unit/test_mozIAsyncLivemarks.js b/toolkit/components/places/tests/unit/test_mozIAsyncLivemarks.js
deleted file mode 100644
index 5136591ba4..0000000000
--- a/toolkit/components/places/tests/unit/test_mozIAsyncLivemarks.js
+++ /dev/null
@@ -1,514 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Tests functionality of the mozIAsyncLivemarks interface.
-
-const FEED_URI = NetUtil.newURI("http://feed.rss/");
-const SITE_URI = NetUtil.newURI("http://site.org/");
-
-// This test must be the first one, since it's testing the cache.
-add_task(function* test_livemark_cache() {
- // Add a livemark through other APIs.
- let folder = yield PlacesUtils.bookmarks.insert({
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: "test",
- parentGuid: PlacesUtils.bookmarks.unfiledGuid
- });
- let id = yield PlacesUtils.promiseItemId(folder.guid);
- PlacesUtils.annotations
- .setItemAnnotation(id, PlacesUtils.LMANNO_FEEDURI,
- "http://example.com/feed",
- 0, PlacesUtils.annotations.EXPIRE_NEVER);
- PlacesUtils.annotations
- .setItemAnnotation(id, PlacesUtils.LMANNO_SITEURI,
- "http://example.com/site",
- 0, PlacesUtils.annotations.EXPIRE_NEVER);
-
- let livemark = yield PlacesUtils.livemarks.getLivemark({ guid: folder.guid });
- Assert.equal(folder.guid, livemark.guid);
- Assert.equal(folder.dateAdded * 1000, livemark.dateAdded);
- Assert.equal(folder.parentGuid, livemark.parentGuid);
- Assert.equal(folder.index, livemark.index);
- Assert.equal(folder.title, livemark.title);
- Assert.equal(id, livemark.id);
- Assert.equal(PlacesUtils.unfiledBookmarksFolderId, livemark.parentId);
- Assert.equal("http://example.com/feed", livemark.feedURI.spec);
- Assert.equal("http://example.com/site", livemark.siteURI.spec);
-
- yield PlacesUtils.livemarks.removeLivemark(livemark);
-});
-
-add_task(function* test_addLivemark_noArguments_throws() {
- try {
- yield PlacesUtils.livemarks.addLivemark();
- do_throw("Invoking addLivemark with no arguments should throw");
- } catch (ex) {
- do_check_eq(ex.result, Cr.NS_ERROR_XPC_NOT_ENOUGH_ARGS);
- }
-});
-
-add_task(function* test_addLivemark_emptyObject_throws() {
- try {
- yield PlacesUtils.livemarks.addLivemark({});
- do_throw("Invoking addLivemark with empty object should throw");
- } catch (ex) {
- do_check_eq(ex.result, Cr.NS_ERROR_INVALID_ARG);
- }
-});
-
-add_task(function* test_addLivemark_badParentId_throws() {
- try {
- yield PlacesUtils.livemarks.addLivemark({ parentId: "test" });
- do_throw("Invoking addLivemark with a bad parent id should throw");
- } catch (ex) {
- do_check_eq(ex.result, Cr.NS_ERROR_INVALID_ARG);
- }
-});
-
-add_task(function* test_addLivemark_invalidParentId_throws() {
- try {
- yield PlacesUtils.livemarks.addLivemark({ parentId: -2 });
- do_throw("Invoking addLivemark with an invalid parent id should throw");
- } catch (ex) {
- do_check_eq(ex.result, Cr.NS_ERROR_INVALID_ARG);
- }
-});
-
-add_task(function* test_addLivemark_noIndex_throws() {
- try {
- yield PlacesUtils.livemarks.addLivemark({
- parentId: PlacesUtils.unfiledBookmarksFolderId });
- do_throw("Invoking addLivemark with no index should throw");
- } catch (ex) {
- do_check_eq(ex.result, Cr.NS_ERROR_INVALID_ARG);
- }
-});
-
-add_task(function* test_addLivemark_badIndex_throws() {
- try {
- yield PlacesUtils.livemarks.addLivemark(
- { parentId: PlacesUtils.unfiledBookmarksFolderId
- , index: "test" });
- do_throw("Invoking addLivemark with a bad index should throw");
- } catch (ex) {
- do_check_eq(ex.result, Cr.NS_ERROR_INVALID_ARG);
- }
-});
-
-add_task(function* test_addLivemark_invalidIndex_throws() {
- try {
- yield PlacesUtils.livemarks.addLivemark(
- { parentId: PlacesUtils.unfiledBookmarksFolderId
- , index: -2
- });
- do_throw("Invoking addLivemark with an invalid index should throw");
- } catch (ex) {
- do_check_eq(ex.result, Cr.NS_ERROR_INVALID_ARG);
- }
-});
-
-add_task(function* test_addLivemark_noFeedURI_throws() {
- try {
- yield PlacesUtils.livemarks.addLivemark(
- { parentGuid: PlacesUtils.bookmarks.unfiledGuid });
- do_throw("Invoking addLivemark with no feedURI should throw");
- } catch (ex) {
- do_check_eq(ex.result, Cr.NS_ERROR_INVALID_ARG);
- }
-});
-
-add_task(function* test_addLivemark_badFeedURI_throws() {
- try {
- yield PlacesUtils.livemarks.addLivemark(
- { parentGuid: PlacesUtils.bookmarks.unfiledGuid
- , feedURI: "test" });
- do_throw("Invoking addLivemark with a bad feedURI should throw");
- } catch (ex) {
- do_check_eq(ex.result, Cr.NS_ERROR_INVALID_ARG);
- }
-});
-
-add_task(function* test_addLivemark_badSiteURI_throws() {
- try {
- yield PlacesUtils.livemarks.addLivemark(
- { parentGuid: PlacesUtils.bookmarks.unfiledGuid
- , feedURI: FEED_URI
- , siteURI: "test" });
- do_throw("Invoking addLivemark with a bad siteURI should throw");
- } catch (ex) {
- do_check_eq(ex.result, Cr.NS_ERROR_INVALID_ARG);
- }
-});
-
-add_task(function* test_addLivemark_badGuid_throws() {
- try {
- yield PlacesUtils.livemarks.addLivemark(
- { parentGuid: PlacesUtils.bookmarks.unfileGuid
- , feedURI: FEED_URI
- , guid: "123456" });
- do_throw("Invoking addLivemark with a bad guid should throw");
- } catch (ex) {
- do_check_eq(ex.result, Cr.NS_ERROR_INVALID_ARG);
- }
-});
-
-add_task(function* test_addLivemark_parentId_succeeds() {
- let onItemAddedCalled = false;
- PlacesUtils.bookmarks.addObserver({
- __proto__: NavBookmarkObserver.prototype,
- onItemAdded: function onItemAdded(aItemId, aParentId, aIndex, aItemType,
- aURI, aTitle)
- {
- onItemAddedCalled = true;
- PlacesUtils.bookmarks.removeObserver(this);
- do_check_eq(aParentId, PlacesUtils.unfiledBookmarksFolderId);
- do_check_eq(aIndex, 0);
- do_check_eq(aItemType, Ci.nsINavBookmarksService.TYPE_FOLDER);
- do_check_eq(aTitle, "test");
- }
- }, false);
-
- yield PlacesUtils.livemarks.addLivemark(
- { title: "test"
- , parentId: PlacesUtils.unfiledBookmarksFolderId
- , feedURI: FEED_URI });
- do_check_true(onItemAddedCalled);
-});
-
-
-add_task(function* test_addLivemark_noSiteURI_succeeds() {
- let livemark = yield PlacesUtils.livemarks.addLivemark(
- { title: "test"
- , parentGuid: PlacesUtils.bookmarks.unfiledGuid
- , feedURI: FEED_URI
- });
- do_check_true(livemark.id > 0);
- do_check_valid_places_guid(livemark.guid);
- do_check_eq(livemark.title, "test");
- do_check_eq(livemark.parentId, PlacesUtils.unfiledBookmarksFolderId);
- do_check_eq(livemark.parentGuid, PlacesUtils.bookmarks.unfiledGuid);
- do_check_true(livemark.feedURI.equals(FEED_URI));
- do_check_eq(livemark.siteURI, null);
- do_check_true(livemark.lastModified > 0);
- do_check_true(is_time_ordered(livemark.dateAdded, livemark.lastModified));
-
- let bookmark = yield PlacesUtils.bookmarks.fetch(livemark.guid);
- do_check_eq(livemark.index, bookmark.index);
- do_check_eq(livemark.dateAdded, bookmark.dateAdded * 1000);
-});
-
-add_task(function* test_addLivemark_succeeds() {
- let livemark = yield PlacesUtils.livemarks.addLivemark(
- { title: "test"
- , parentGuid: PlacesUtils.bookmarks.unfiledGuid
- , feedURI: FEED_URI
- , siteURI: SITE_URI
- });
-
- do_check_true(livemark.id > 0);
- do_check_valid_places_guid(livemark.guid);
- do_check_eq(livemark.title, "test");
- do_check_eq(livemark.parentId, PlacesUtils.unfiledBookmarksFolderId);
- do_check_eq(livemark.parentGuid, PlacesUtils.bookmarks.unfiledGuid);
- do_check_true(livemark.feedURI.equals(FEED_URI));
- do_check_true(livemark.siteURI.equals(SITE_URI));
- do_check_true(PlacesUtils.annotations
- .itemHasAnnotation(livemark.id,
- PlacesUtils.LMANNO_FEEDURI));
- do_check_true(PlacesUtils.annotations
- .itemHasAnnotation(livemark.id,
- PlacesUtils.LMANNO_SITEURI));
-});
-
-add_task(function* test_addLivemark_bogusid_succeeds() {
- let livemark = yield PlacesUtils.livemarks.addLivemark(
- { id: 100 // Should be ignored.
- , title: "test"
- , parentGuid: PlacesUtils.bookmarks.unfiledGuid
- , feedURI: FEED_URI
- , siteURI: SITE_URI
- });
- do_check_true(livemark.id > 0);
- do_check_neq(livemark.id, 100);
-});
-
-add_task(function* test_addLivemark_bogusParentId_fails() {
- try {
- yield PlacesUtils.livemarks.addLivemark(
- { title: "test"
- , parentId: 187
- , feedURI: FEED_URI
- });
- do_throw("Adding a livemark with a bogus parent should fail");
- } catch (ex) {}
-});
-
-add_task(function* test_addLivemark_bogusParentGuid_fails() {
- try {
- yield PlacesUtils.livemarks.addLivemark(
- { title: "test"
- , parentGuid: "123456789012"
- , feedURI: FEED_URI
- });
- do_throw("Adding a livemark with a bogus parent should fail");
- } catch (ex) {}
-})
-
-add_task(function* test_addLivemark_intoLivemark_fails() {
- let livemark = yield PlacesUtils.livemarks.addLivemark(
- { title: "test"
- , parentGuid: PlacesUtils.bookmarks.unfiledGuid
- , feedURI: FEED_URI
- });
-
- try {
- yield PlacesUtils.livemarks.addLivemark(
- { title: "test"
- , parentGuid: livemark.guid
- , feedURI: FEED_URI
- });
- do_throw("Adding a livemark into a livemark should fail");
- } catch (ex) {
- do_check_eq(ex.result, Cr.NS_ERROR_INVALID_ARG);
- }
-});
-
-add_task(function* test_addLivemark_forceGuid_succeeds() {
- let livemark = yield PlacesUtils.livemarks.addLivemark(
- { title: "test"
- , parentGuid: PlacesUtils.bookmarks.unfiledGuid
- , feedURI: FEED_URI
- , guid: "1234567890AB"
- });
- do_check_eq(livemark.guid, "1234567890AB");
- do_check_guid_for_bookmark(livemark.id, "1234567890AB");
-});
-
-add_task(function* test_addLivemark_dateAdded_succeeds() {
- let dateAdded = new Date("2013-03-01T01:10:00") * 1000;
- let livemark = yield PlacesUtils.livemarks.addLivemark(
- { title: "test"
- , parentGuid: PlacesUtils.bookmarks.unfiledGuid
- , feedURI: FEED_URI
- , dateAdded
- });
- do_check_eq(livemark.dateAdded, dateAdded);
-});
-
-add_task(function* test_addLivemark_lastModified_succeeds() {
- let now = Date.now() * 1000;
- let livemark = yield PlacesUtils.livemarks.addLivemark(
- { title: "test"
- , parentGuid: PlacesUtils.bookmarks.unfiledGuid
- , feedURI: FEED_URI
- , lastModified: now
- });
- do_check_eq(livemark.dateAdded, now);
- do_check_eq(livemark.lastModified, now);
-});
-
-add_task(function* test_removeLivemark_emptyObject_throws() {
- try {
- yield PlacesUtils.livemarks.removeLivemark({});
- do_throw("Invoking removeLivemark with empty object should throw");
- } catch (ex) {
- do_check_eq(ex.result, Cr.NS_ERROR_INVALID_ARG);
- }
-});
-
-add_task(function* test_removeLivemark_noValidId_throws() {
- try {
- yield PlacesUtils.livemarks.removeLivemark({ id: -10, guid: "test"});
- do_throw("Invoking removeLivemark with no valid id should throw");
- } catch (ex) {
- do_check_eq(ex.result, Cr.NS_ERROR_INVALID_ARG);
- }
-});
-
-add_task(function* test_removeLivemark_nonExistent_fails() {
- try {
- yield PlacesUtils.livemarks.removeLivemark({ id: 1337 });
- do_throw("Removing a non-existent livemark should fail");
- }
- catch (ex) {
- }
-});
-
-add_task(function* test_removeLivemark_guid_succeeds() {
- let livemark = yield PlacesUtils.livemarks.addLivemark(
- { title: "test"
- , parentGuid: PlacesUtils.bookmarks.unfiledGuid
- , feedURI: FEED_URI
- , guid: "234567890ABC"
- });
-
- do_check_eq(livemark.guid, "234567890ABC");
-
- yield PlacesUtils.livemarks.removeLivemark({
- id: 789, guid: "234567890ABC"
- });
-
- do_check_eq((yield PlacesUtils.bookmarks.fetch("234567890ABC")), null);
-});
-
-add_task(function* test_removeLivemark_id_succeeds() {
- let livemark = yield PlacesUtils.livemarks.addLivemark(
- { title: "test"
- , parentGuid: PlacesUtils.bookmarks.unfiledGuid
- , feedURI: FEED_URI
- });
-
- yield PlacesUtils.livemarks.removeLivemark({ id: livemark.id });
-
- do_check_eq((yield PlacesUtils.bookmarks.fetch("234567890ABC")), null);
-});
-
-add_task(function* test_getLivemark_emptyObject_throws() {
- try {
- yield PlacesUtils.livemarks.getLivemark({});
- do_throw("Invoking getLivemark with empty object should throw");
- } catch (ex) {
- do_check_eq(ex.result, Cr.NS_ERROR_INVALID_ARG);
- }
-});
-
-add_task(function* test_getLivemark_noValidId_throws() {
- try {
- yield PlacesUtils.livemarks.getLivemark({ id: -10, guid: "test"});
- do_throw("Invoking getLivemark with no valid id should throw");
- } catch (ex) {
- do_check_eq(ex.result, Cr.NS_ERROR_INVALID_ARG);
- }
-});
-
-add_task(function* test_getLivemark_nonExistentId_fails() {
- try {
- yield PlacesUtils.livemarks.getLivemark({ id: 1234 });
- do_throw("getLivemark for a non existent id should fail");
- } catch (ex) {}
-});
-
-add_task(function* test_getLivemark_nonExistentGUID_fails() {
- try {
- yield PlacesUtils.livemarks.getLivemark({ guid: "34567890ABCD" });
- do_throw("getLivemark for a non-existent guid should fail");
- } catch (ex) {}
-});
-
-add_task(function* test_getLivemark_guid_succeeds() {
- yield PlacesUtils.livemarks.addLivemark(
- { title: "test"
- , parentGuid: PlacesUtils.bookmarks.unfiledGuid
- , feedURI: FEED_URI
- , guid: "34567890ABCD" });
-
- // invalid id to check the guid wins.
- let livemark =
- yield PlacesUtils.livemarks.getLivemark({ id: 789, guid: "34567890ABCD" });
-
- do_check_eq(livemark.title, "test");
- do_check_eq(livemark.parentId, PlacesUtils.unfiledBookmarksFolderId);
- do_check_eq(livemark.parentGuid, PlacesUtils.bookmarks.unfiledGuid);
- do_check_true(livemark.feedURI.equals(FEED_URI));
- do_check_eq(livemark.siteURI, null);
- do_check_eq(livemark.guid, "34567890ABCD");
-
- let bookmark = yield PlacesUtils.bookmarks.fetch("34567890ABCD");
- do_check_eq(livemark.index, bookmark.index);
-});
-
-add_task(function* test_getLivemark_id_succeeds() {
- let livemark = yield PlacesUtils.livemarks.addLivemark(
- { title: "test"
- , parentGuid: PlacesUtils.bookmarks.unfiledGuid
- , feedURI: FEED_URI
- });
-
- livemark = yield PlacesUtils.livemarks.getLivemark({ id: livemark.id });
-
- do_check_eq(livemark.title, "test");
- do_check_eq(livemark.parentId, PlacesUtils.unfiledBookmarksFolderId);
- do_check_eq(livemark.parentGuid, PlacesUtils.bookmarks.unfiledGuid);
- do_check_true(livemark.feedURI.equals(FEED_URI));
- do_check_eq(livemark.siteURI, null);
- do_check_guid_for_bookmark(livemark.id, livemark.guid);
-
- let bookmark = yield PlacesUtils.bookmarks.fetch(livemark.guid);
- do_check_eq(livemark.index, bookmark.index);
-});
-
-add_task(function* test_getLivemark_removeItem_contention() {
- // do not yield.
- PlacesUtils.livemarks.addLivemark({ title: "test"
- , parentGuid: PlacesUtils.bookmarks.unfiledGuid
- , feedURI: FEED_URI
- }).catch(() => { /* swallow errors*/ });
- yield PlacesUtils.bookmarks.eraseEverything();
- let livemark = yield PlacesUtils.livemarks.addLivemark(
- { title: "test"
- , parentGuid: PlacesUtils.bookmarks.unfiledGuid
- , feedURI: FEED_URI
- });
-
- livemark = yield PlacesUtils.livemarks.getLivemark({ guid: livemark.guid });
-
- do_check_eq(livemark.title, "test");
- do_check_eq(livemark.parentId, PlacesUtils.unfiledBookmarksFolderId);
- do_check_true(livemark.feedURI.equals(FEED_URI));
- do_check_eq(livemark.siteURI, null);
- do_check_guid_for_bookmark(livemark.id, livemark.guid);
-});
-
-add_task(function* test_title_change() {
- let livemark = yield PlacesUtils.livemarks.addLivemark(
- { title: "test"
- , parentGuid: PlacesUtils.bookmarks.unfiledGuid
- , feedURI: FEED_URI
- });
-
- yield PlacesUtils.bookmarks.update({ guid: livemark.guid,
- title: "test2" });
- // Poll for the title change.
- while (true) {
- let lm = yield PlacesUtils.livemarks.getLivemark({ guid: livemark.guid });
- if (lm.title == "test2")
- break;
- yield new Promise(resolve => do_timeout(resolve, 100));
- }
-});
-
-add_task(function* test_livemark_move() {
- let livemark = yield PlacesUtils.livemarks.addLivemark(
- { title: "test"
- , parentGuid: PlacesUtils.bookmarks.unfiledGuid
- , feedURI: FEED_URI } );
-
- yield PlacesUtils.bookmarks.update({ guid: livemark.guid,
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX });
- // Poll for the parent change.
- while (true) {
- let lm = yield PlacesUtils.livemarks.getLivemark({ guid: livemark.guid });
- if (lm.parentGuid == PlacesUtils.bookmarks.toolbarGuid)
- break;
- yield new Promise(resolve => do_timeout(resolve, 100));
- }
-});
-
-add_task(function* test_livemark_removed() {
- let livemark = yield PlacesUtils.livemarks.addLivemark(
- { title: "test"
- , parentGuid: PlacesUtils.bookmarks.unfiledGuid
- , feedURI: FEED_URI } );
-
- yield PlacesUtils.bookmarks.remove(livemark.guid);
- // Poll for the livemark removal.
- while (true) {
- try {
- yield PlacesUtils.livemarks.getLivemark({ guid: livemark.guid });
- } catch (ex) {
- break;
- }
- yield new Promise(resolve => do_timeout(resolve, 100));
- }
-});
diff --git a/toolkit/components/places/tests/unit/test_multi_queries.js b/toolkit/components/places/tests/unit/test_multi_queries.js
deleted file mode 100644
index d485355a5c..0000000000
--- a/toolkit/components/places/tests/unit/test_multi_queries.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/**
- * Adds a test URI visit to history.
- *
- * @param aURI
- * The URI to add a visit for.
- * @param aReferrer
- * The referring URI for the given URI. This can be null.
- */
-function* add_visit(aURI, aDayOffset, aTransition) {
- yield PlacesTestUtils.addVisits({
- uri: aURI,
- transition: aTransition,
- visitDate: (Date.now() + aDayOffset*86400000) * 1000
- });
-}
-
-function run_test()
-{
- run_next_test();
-}
-
-add_task(function* test_execute()
-{
- yield add_visit(uri("http://mirror1.mozilla.com/a"), -1, TRANSITION_LINK);
- yield add_visit(uri("http://mirror2.mozilla.com/b"), -2, TRANSITION_LINK);
- yield add_visit(uri("http://mirror3.mozilla.com/c"), -4, TRANSITION_FRAMED_LINK);
- yield add_visit(uri("http://mirror1.google.com/b"), -1, TRANSITION_EMBED);
- yield add_visit(uri("http://mirror2.google.com/a"), -2, TRANSITION_LINK);
- yield add_visit(uri("http://mirror1.apache.org/b"), -3, TRANSITION_LINK);
- yield add_visit(uri("http://mirror2.apache.org/a"), -4, TRANSITION_FRAMED_LINK);
-
- let queries = [
- PlacesUtils.history.getNewQuery(),
- PlacesUtils.history.getNewQuery()
- ];
- queries[0].domain = "mozilla.com";
- queries[1].domain = "google.com";
-
- let root = PlacesUtils.history.executeQueries(
- queries, queries.length, PlacesUtils.history.getNewQueryOptions()
- ).root;
- root.containerOpen = true;
- let childCount = root.childCount;
- root.containerOpen = false;
-
- do_check_eq(childCount, 3);
-});
diff --git a/toolkit/components/places/tests/unit/test_multi_word_tags.js b/toolkit/components/places/tests/unit/test_multi_word_tags.js
deleted file mode 100644
index 6a0e5f1304..0000000000
--- a/toolkit/components/places/tests/unit/test_multi_word_tags.js
+++ /dev/null
@@ -1,150 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-// Get history service
-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 bookmark service
-try {
- var bmsvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
-}
-catch (ex) {
- do_throw("Could not get the nav-bookmarks-service\n");
-}
-
-// Get tagging service
-try {
- var tagssvc = Cc["@mozilla.org/browser/tagging-service;1"].
- getService(Ci.nsITaggingService);
-} catch (ex) {
- do_throw("Could not get tagging service\n");
-}
-
-// main
-function run_test() {
- var uri1 = uri("http://site.tld/1");
- var uri2 = uri("http://site.tld/2");
- 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");
-
- bmsvc.insertBookmark(bmsvc.bookmarksMenuFolder, uri1, bmsvc.DEFAULT_INDEX, null);
- bmsvc.insertBookmark(bmsvc.bookmarksMenuFolder, uri2, bmsvc.DEFAULT_INDEX, null);
- bmsvc.insertBookmark(bmsvc.bookmarksMenuFolder, uri3, bmsvc.DEFAULT_INDEX, null);
- bmsvc.insertBookmark(bmsvc.bookmarksMenuFolder, uri4, bmsvc.DEFAULT_INDEX, null);
- bmsvc.insertBookmark(bmsvc.bookmarksMenuFolder, uri5, bmsvc.DEFAULT_INDEX, null);
- bmsvc.insertBookmark(bmsvc.bookmarksMenuFolder, uri6, bmsvc.DEFAULT_INDEX, null);
-
- tagssvc.tagURI(uri1, ["foo"]);
- tagssvc.tagURI(uri2, ["bar"]);
- tagssvc.tagURI(uri3, ["cheese"]);
- tagssvc.tagURI(uri4, ["foo bar"]);
- tagssvc.tagURI(uri5, ["bar cheese"]);
- tagssvc.tagURI(uri6, ["foo bar cheese"]);
-
- // exclude livemark items, search for "item", should get one result
- var options = histsvc.getNewQueryOptions();
- options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS;
-
- var query = histsvc.getNewQuery();
- query.searchTerms = "foo";
- var result = histsvc.executeQuery(query, options);
- var root = result.root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 3);
- do_check_eq(root.getChild(0).uri, "http://site.tld/1");
- do_check_eq(root.getChild(1).uri, "http://site.tld/4");
- do_check_eq(root.getChild(2).uri, "http://site.tld/6");
- root.containerOpen = false;
-
- query.searchTerms = "bar";
- result = histsvc.executeQuery(query, options);
- root = result.root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 4);
- do_check_eq(root.getChild(0).uri, "http://site.tld/2");
- do_check_eq(root.getChild(1).uri, "http://site.tld/4");
- do_check_eq(root.getChild(2).uri, "http://site.tld/5");
- do_check_eq(root.getChild(3).uri, "http://site.tld/6");
- root.containerOpen = false;
-
- query.searchTerms = "cheese";
- result = histsvc.executeQuery(query, options);
- root = result.root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 3);
- do_check_eq(root.getChild(0).uri, "http://site.tld/3");
- do_check_eq(root.getChild(1).uri, "http://site.tld/5");
- do_check_eq(root.getChild(2).uri, "http://site.tld/6");
- root.containerOpen = false;
-
- query.searchTerms = "foo bar";
- result = histsvc.executeQuery(query, options);
- root = result.root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 2);
- do_check_eq(root.getChild(0).uri, "http://site.tld/4");
- do_check_eq(root.getChild(1).uri, "http://site.tld/6");
- root.containerOpen = false;
-
- query.searchTerms = "bar foo";
- result = histsvc.executeQuery(query, options);
- root = result.root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 2);
- do_check_eq(root.getChild(0).uri, "http://site.tld/4");
- do_check_eq(root.getChild(1).uri, "http://site.tld/6");
- root.containerOpen = false;
-
- query.searchTerms = "bar cheese";
- result = histsvc.executeQuery(query, options);
- root = result.root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 2);
- do_check_eq(root.getChild(0).uri, "http://site.tld/5");
- do_check_eq(root.getChild(1).uri, "http://site.tld/6");
- root.containerOpen = false;
-
- query.searchTerms = "cheese bar";
- result = histsvc.executeQuery(query, options);
- root = result.root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 2);
- do_check_eq(root.getChild(0).uri, "http://site.tld/5");
- do_check_eq(root.getChild(1).uri, "http://site.tld/6");
- root.containerOpen = false;
-
- query.searchTerms = "foo bar cheese";
- result = histsvc.executeQuery(query, options);
- root = result.root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 1);
- do_check_eq(root.getChild(0).uri, "http://site.tld/6");
- root.containerOpen = false;
-
- query.searchTerms = "cheese foo bar";
- result = histsvc.executeQuery(query, options);
- root = result.root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 1);
- do_check_eq(root.getChild(0).uri, "http://site.tld/6");
- root.containerOpen = false;
-
- query.searchTerms = "cheese bar foo";
- result = histsvc.executeQuery(query, options);
- root = result.root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 1);
- do_check_eq(root.getChild(0).uri, "http://site.tld/6");
- root.containerOpen = false;
-}
diff --git a/toolkit/components/places/tests/unit/test_nsINavHistoryViewer.js b/toolkit/components/places/tests/unit/test_nsINavHistoryViewer.js
deleted file mode 100644
index 037ab7d085..0000000000
--- a/toolkit/components/places/tests/unit/test_nsINavHistoryViewer.js
+++ /dev/null
@@ -1,256 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-// Get history service
-var histsvc = PlacesUtils.history;
-var bhist = PlacesUtils.bhistory;
-var bmsvc = PlacesUtils.bookmarks;
-
-var resultObserver = {
- insertedNode: null,
- nodeInserted: function(parent, node, newIndex) {
- this.insertedNode = node;
- },
- removedNode: null,
- nodeRemoved: function(parent, node, oldIndex) {
- this.removedNode = node;
- },
-
- nodeAnnotationChanged: function() {},
-
- newTitle: "",
- nodeChangedByTitle: null,
- nodeTitleChanged: function(node, newTitle) {
- this.nodeChangedByTitle = node;
- this.newTitle = newTitle;
- },
-
- newAccessCount: 0,
- newTime: 0,
- nodeChangedByHistoryDetails: null,
- nodeHistoryDetailsChanged: function(node,
- updatedVisitDate,
- updatedVisitCount) {
- this.nodeChangedByHistoryDetails = node
- this.newTime = updatedVisitDate;
- this.newAccessCount = updatedVisitCount;
- },
-
- movedNode: null,
- nodeMoved: function(node, oldParent, oldIndex, newParent, newIndex) {
- this.movedNode = node;
- },
- openedContainer: null,
- closedContainer: null,
- containerStateChanged: function (aNode, aOldState, aNewState) {
- if (aNewState == Ci.nsINavHistoryContainerResultNode.STATE_OPENED) {
- this.openedContainer = aNode;
- }
- else if (aNewState == Ci.nsINavHistoryContainerResultNode.STATE_CLOSED) {
- this.closedContainer = aNode;
- }
- },
- invalidatedContainer: null,
- invalidateContainer: function(node) {
- this.invalidatedContainer = node;
- },
- sortingMode: null,
- sortingChanged: function(sortingMode) {
- this.sortingMode = sortingMode;
- },
- inBatchMode: false,
- batching: function(aToggleMode) {
- do_check_neq(this.inBatchMode, aToggleMode);
- this.inBatchMode = aToggleMode;
- },
- result: null,
- reset: function() {
- this.insertedNode = null;
- this.removedNode = null;
- this.nodeChangedByTitle = null;
- this.nodeChangedByHistoryDetails = null;
- this.replacedNode = null;
- this.movedNode = null;
- this.openedContainer = null;
- this.closedContainer = null;
- this.invalidatedContainer = null;
- this.sortingMode = null;
- }
-};
-
-var testURI = uri("http://mozilla.com");
-
-function run_test() {
- run_next_test();
-}
-
-add_test(function check_history_query() {
- var options = histsvc.getNewQueryOptions();
- options.sortingMode = options.SORT_BY_DATE_DESCENDING;
- options.resultType = options.RESULTS_AS_VISIT;
- var query = histsvc.getNewQuery();
- var result = histsvc.executeQuery(query, options);
- result.addObserver(resultObserver, false);
- var root = result.root;
- root.containerOpen = true;
-
- do_check_neq(resultObserver.openedContainer, null);
-
- // nsINavHistoryResultObserver.nodeInserted
- // add a visit
- PlacesTestUtils.addVisits(testURI).then(function() {
- do_check_eq(testURI.spec, resultObserver.insertedNode.uri);
-
- // nsINavHistoryResultObserver.nodeHistoryDetailsChanged
- // adding a visit causes nodeHistoryDetailsChanged for the folder
- do_check_eq(root.uri, resultObserver.nodeChangedByHistoryDetails.uri);
-
- // nsINavHistoryResultObserver.itemTitleChanged for a leaf node
- PlacesTestUtils.addVisits({ uri: testURI, title: "baz" }).then(function () {
- do_check_eq(resultObserver.nodeChangedByTitle.title, "baz");
-
- // nsINavHistoryResultObserver.nodeRemoved
- var removedURI = uri("http://google.com");
- PlacesTestUtils.addVisits(removedURI).then(function() {
- bhist.removePage(removedURI);
- do_check_eq(removedURI.spec, resultObserver.removedNode.uri);
-
- // nsINavHistoryResultObserver.invalidateContainer
- bhist.removePagesFromHost("mozilla.com", false);
- do_check_eq(root.uri, resultObserver.invalidatedContainer.uri);
-
- // nsINavHistoryResultObserver.sortingChanged
- resultObserver.invalidatedContainer = null;
- result.sortingMode = options.SORT_BY_TITLE_ASCENDING;
- do_check_eq(resultObserver.sortingMode, options.SORT_BY_TITLE_ASCENDING);
- do_check_eq(resultObserver.invalidatedContainer, result.root);
-
- // nsINavHistoryResultObserver.invalidateContainer
- PlacesTestUtils.clearHistoryEnabled().then(() => {
- do_check_eq(root.uri, resultObserver.invalidatedContainer.uri);
-
- // nsINavHistoryResultObserver.batching
- do_check_false(resultObserver.inBatchMode);
- histsvc.runInBatchMode({
- runBatched: function (aUserData) {
- do_check_true(resultObserver.inBatchMode);
- }
- }, null);
- do_check_false(resultObserver.inBatchMode);
- bmsvc.runInBatchMode({
- runBatched: function (aUserData) {
- do_check_true(resultObserver.inBatchMode);
- }
- }, null);
- do_check_false(resultObserver.inBatchMode);
-
- root.containerOpen = false;
- do_check_eq(resultObserver.closedContainer, resultObserver.openedContainer);
- result.removeObserver(resultObserver);
- resultObserver.reset();
- PlacesTestUtils.promiseAsyncUpdates().then(run_next_test);
- });
- });
- });
- });
-});
-
-add_test(function check_bookmarks_query() {
- var options = histsvc.getNewQueryOptions();
- var query = histsvc.getNewQuery();
- query.setFolders([bmsvc.bookmarksMenuFolder], 1);
- var result = histsvc.executeQuery(query, options);
- result.addObserver(resultObserver, false);
- var root = result.root;
- root.containerOpen = true;
-
- do_check_neq(resultObserver.openedContainer, null);
-
- // nsINavHistoryResultObserver.nodeInserted
- // add a bookmark
- var testBookmark = bmsvc.insertBookmark(bmsvc.bookmarksMenuFolder, testURI, bmsvc.DEFAULT_INDEX, "foo");
- do_check_eq("foo", resultObserver.insertedNode.title);
- do_check_eq(testURI.spec, resultObserver.insertedNode.uri);
-
- // nsINavHistoryResultObserver.nodeHistoryDetailsChanged
- // adding a visit causes nodeHistoryDetailsChanged for the folder
- do_check_eq(root.uri, resultObserver.nodeChangedByHistoryDetails.uri);
-
- // nsINavHistoryResultObserver.nodeTitleChanged for a leaf node
- bmsvc.setItemTitle(testBookmark, "baz");
- do_check_eq(resultObserver.nodeChangedByTitle.title, "baz");
- do_check_eq(resultObserver.newTitle, "baz");
-
- var testBookmark2 = bmsvc.insertBookmark(bmsvc.bookmarksMenuFolder, uri("http://google.com"), bmsvc.DEFAULT_INDEX, "foo");
- bmsvc.moveItem(testBookmark2, bmsvc.bookmarksMenuFolder, 0);
- do_check_eq(resultObserver.movedNode.itemId, testBookmark2);
-
- // nsINavHistoryResultObserver.nodeRemoved
- bmsvc.removeItem(testBookmark2);
- do_check_eq(testBookmark2, resultObserver.removedNode.itemId);
-
- // XXX nsINavHistoryResultObserver.invalidateContainer
-
- // nsINavHistoryResultObserver.sortingChanged
- resultObserver.invalidatedContainer = null;
- result.sortingMode = options.SORT_BY_TITLE_ASCENDING;
- do_check_eq(resultObserver.sortingMode, options.SORT_BY_TITLE_ASCENDING);
- do_check_eq(resultObserver.invalidatedContainer, result.root);
-
- // nsINavHistoryResultObserver.batching
- do_check_false(resultObserver.inBatchMode);
- histsvc.runInBatchMode({
- runBatched: function (aUserData) {
- do_check_true(resultObserver.inBatchMode);
- }
- }, null);
- do_check_false(resultObserver.inBatchMode);
- bmsvc.runInBatchMode({
- runBatched: function (aUserData) {
- do_check_true(resultObserver.inBatchMode);
- }
- }, null);
- do_check_false(resultObserver.inBatchMode);
-
- root.containerOpen = false;
- do_check_eq(resultObserver.closedContainer, resultObserver.openedContainer);
- result.removeObserver(resultObserver);
- resultObserver.reset();
- PlacesTestUtils.promiseAsyncUpdates().then(run_next_test);
-});
-
-add_test(function check_mixed_query() {
- var options = histsvc.getNewQueryOptions();
- var query = histsvc.getNewQuery();
- query.onlyBookmarked = true;
- var result = histsvc.executeQuery(query, options);
- result.addObserver(resultObserver, false);
- var root = result.root;
- root.containerOpen = true;
-
- do_check_neq(resultObserver.openedContainer, null);
-
- // nsINavHistoryResultObserver.batching
- do_check_false(resultObserver.inBatchMode);
- histsvc.runInBatchMode({
- runBatched: function (aUserData) {
- do_check_true(resultObserver.inBatchMode);
- }
- }, null);
- do_check_false(resultObserver.inBatchMode);
- bmsvc.runInBatchMode({
- runBatched: function (aUserData) {
- do_check_true(resultObserver.inBatchMode);
- }
- }, null);
- do_check_false(resultObserver.inBatchMode);
-
- root.containerOpen = false;
- do_check_eq(resultObserver.closedContainer, resultObserver.openedContainer);
- result.removeObserver(resultObserver);
- resultObserver.reset();
- PlacesTestUtils.promiseAsyncUpdates().then(run_next_test);
-});
diff --git a/toolkit/components/places/tests/unit/test_null_interfaces.js b/toolkit/components/places/tests/unit/test_null_interfaces.js
deleted file mode 100644
index 524837ca3d..0000000000
--- a/toolkit/components/places/tests/unit/test_null_interfaces.js
+++ /dev/null
@@ -1,98 +0,0 @@
-/* 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/. */
-
-/**
- * Test bug 489872 to make sure passing nulls to nsNavHistory doesn't crash.
- */
-
-// Make an array of services to test, each specifying a class id, interface
-// and an array of function names that don't throw when passed nulls
-var testServices = [
- ["browser/nav-history-service;1",
- ["nsINavHistoryService"],
- ["queryStringToQueries", "removePagesByTimeframe", "removePagesFromHost", "getObservers"]
- ],
- ["browser/nav-bookmarks-service;1",
- ["nsINavBookmarksService", "nsINavHistoryObserver", "nsIAnnotationObserver"],
- ["createFolder", "getObservers", "onFrecencyChanged", "onTitleChanged",
- "onPageAnnotationSet", "onPageAnnotationRemoved", "onDeleteURI"]
- ],
- ["browser/livemark-service;2", ["mozIAsyncLivemarks"], ["reloadLivemarks"]],
- ["browser/annotation-service;1", ["nsIAnnotationService"], []],
- ["browser/favicon-service;1", ["nsIFaviconService"], []],
- ["browser/tagging-service;1", ["nsITaggingService"], []],
-];
-do_print(testServices.join("\n"));
-
-function run_test()
-{
- for (let [cid, ifaces, nothrow] of testServices) {
- do_print(`Running test with ${cid} ${ifaces.join(", ")} ${nothrow}`);
- let s = Cc["@mozilla.org/" + cid].getService(Ci.nsISupports);
- for (let iface of ifaces) {
- s.QueryInterface(Ci[iface]);
- }
-
- let okName = function(name) {
- do_print(`Checking if function is okay to test: ${name}`);
- let func = s[name];
-
- let mesg = "";
- if (typeof func != "function")
- mesg = "Not a function!";
- else if (func.length == 0)
- mesg = "No args needed!";
- else if (name == "QueryInterface")
- mesg = "Ignore QI!";
-
- if (mesg) {
- do_print(`${mesg} Skipping: ${name}`);
- return false;
- }
-
- return true;
- }
-
- do_print(`Generating an array of functions to test service: ${s}`);
- for (let n of Object.keys(s).filter(i => okName(i)).sort()) {
- do_print(`\nTesting ${ifaces.join(", ")} function with null args: ${n}`);
-
- let func = s[n];
- let num = func.length;
- do_print(`Generating array of nulls for #args: ${num}`);
- let args = Array(num).fill(null);
-
- let tryAgain = true;
- while (tryAgain == true) {
- try {
- do_print(`Calling with args: ${JSON.stringify(args)}`);
- func.apply(s, args);
-
- do_print(`The function did not throw! Is it one of the nothrow? ${nothrow}`);
- Assert.notEqual(nothrow.indexOf(n), -1);
-
- do_print("Must have been an expected nothrow, so no need to try again");
- tryAgain = false;
- }
- catch (ex) {
- if (ex.result == Cr.NS_ERROR_ILLEGAL_VALUE) {
- do_print(`Caught an expected exception: ${ex.name}`);
- do_print("Moving on to the next test..");
- tryAgain = false;
- } else if (ex.result == Cr.NS_ERROR_XPC_NEED_OUT_OBJECT) {
- let pos = Number(ex.message.match(/object arg (\d+)/)[1]);
- do_print(`Function call expects an out object at ${pos}`);
- args[pos] = {};
- } else if (ex.result == Cr.NS_ERROR_NOT_IMPLEMENTED) {
- do_print(`Method not implemented exception: ${ex.name}`);
- do_print("Moving on to the next test..");
- tryAgain = false;
- } else {
- throw ex;
- }
- }
- }
- }
- }
-}
diff --git a/toolkit/components/places/tests/unit/test_onItemChanged_tags.js b/toolkit/components/places/tests/unit/test_onItemChanged_tags.js
deleted file mode 100644
index 7a0eb354d0..0000000000
--- a/toolkit/components/places/tests/unit/test_onItemChanged_tags.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// This test checks that changing a tag for a bookmark with multiple tags
-// notifies OnItemChanged("tags") only once, and not once per tag.
-
-function run_test() {
- do_test_pending();
-
- let tags = ["a", "b", "c"];
- let uri = NetUtil.newURI("http://1.moz.org/");
-
- let id = PlacesUtils.bookmarks.insertBookmark(
- PlacesUtils.unfiledBookmarksFolderId, uri,
- PlacesUtils.bookmarks.DEFAULT_INDEX, "Bookmark 1"
- );
- PlacesUtils.tagging.tagURI(uri, tags);
-
- let bookmarksObserver = {
- QueryInterface: XPCOMUtils.generateQI([
- Ci.nsINavBookmarkObserver
- ]),
-
- _changedCount: 0,
- onItemChanged: function (aItemId, aProperty, aIsAnnotationProperty, aValue,
- aLastModified, aItemType) {
- if (aProperty == "tags") {
- do_check_eq(aItemId, id);
- this._changedCount++;
- }
- },
-
- onItemRemoved: function (aItemId, aParentId, aIndex, aItemType) {
- if (aItemId == id) {
- PlacesUtils.bookmarks.removeObserver(this);
- do_check_eq(this._changedCount, 2);
- do_test_finished();
- }
- },
-
- onItemAdded: function () {},
- onBeginUpdateBatch: function () {},
- onEndUpdateBatch: function () {},
- onItemVisited: function () {},
- onItemMoved: function () {},
- };
- PlacesUtils.bookmarks.addObserver(bookmarksObserver, false);
-
- PlacesUtils.tagging.tagURI(uri, ["d"]);
- PlacesUtils.tagging.tagURI(uri, ["e"]);
- PlacesUtils.bookmarks.removeItem(id);
-}
diff --git a/toolkit/components/places/tests/unit/test_pageGuid_bookmarkGuid.js b/toolkit/components/places/tests/unit/test_pageGuid_bookmarkGuid.js
deleted file mode 100644
index f6131b2118..0000000000
--- a/toolkit/components/places/tests/unit/test_pageGuid_bookmarkGuid.js
+++ /dev/null
@@ -1,179 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-const bmsvc = PlacesUtils.bookmarks;
-const histsvc = PlacesUtils.history;
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* test_addBookmarksAndCheckGuids() {
- let folder = bmsvc.createFolder(bmsvc.placesRoot, "test folder", bmsvc.DEFAULT_INDEX);
- bmsvc.insertBookmark(folder, uri("http://test1.com/"),
- bmsvc.DEFAULT_INDEX, "1 title");
- bmsvc.insertBookmark(folder, uri("http://test2.com/"),
- bmsvc.DEFAULT_INDEX, "2 title");
- bmsvc.insertBookmark(folder, uri("http://test3.com/"),
- bmsvc.DEFAULT_INDEX, "3 title");
- bmsvc.insertSeparator(folder, bmsvc.DEFAULT_INDEX);
- bmsvc.createFolder(folder, "test folder 2", bmsvc.DEFAULT_INDEX);
-
- let root = PlacesUtils.getFolderContents(folder).root;
- do_check_eq(root.childCount, 5);
-
- // check bookmark guids
- let bookmarkGuidZero = root.getChild(0).bookmarkGuid;
- do_check_eq(bookmarkGuidZero.length, 12);
- // bookmarks have bookmark guids
- do_check_eq(root.getChild(1).bookmarkGuid.length, 12);
- do_check_eq(root.getChild(2).bookmarkGuid.length, 12);
- // separator has bookmark guid
- do_check_eq(root.getChild(3).bookmarkGuid.length, 12);
- // folder has bookmark guid
- do_check_eq(root.getChild(4).bookmarkGuid.length, 12);
- // all bookmark guids are different.
- do_check_neq(bookmarkGuidZero, root.getChild(1).bookmarkGuid);
- do_check_neq(root.getChild(1).bookmarkGuid, root.getChild(2).bookmarkGuid);
- do_check_neq(root.getChild(2).bookmarkGuid, root.getChild(3).bookmarkGuid);
- do_check_neq(root.getChild(3).bookmarkGuid, root.getChild(4).bookmarkGuid);
-
- // check page guids
- let pageGuidZero = root.getChild(0).pageGuid;
- do_check_eq(pageGuidZero.length, 12);
- // bookmarks have page guids
- do_check_eq(root.getChild(1).pageGuid.length, 12);
- do_check_eq(root.getChild(2).pageGuid.length, 12);
- // folder and separator don't have page guids
- do_check_eq(root.getChild(3).pageGuid, "");
- do_check_eq(root.getChild(4).pageGuid, "");
-
- do_check_neq(pageGuidZero, root.getChild(1).pageGuid);
- do_check_neq(root.getChild(1).pageGuid, root.getChild(2).pageGuid);
-
- root.containerOpen = false;
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_updateBookmarksAndCheckGuids() {
- let folder = bmsvc.createFolder(bmsvc.placesRoot, "test folder", bmsvc.DEFAULT_INDEX);
- let b1 = bmsvc.insertBookmark(folder, uri("http://test1.com/"),
- bmsvc.DEFAULT_INDEX, "1 title");
- let f1 = bmsvc.createFolder(folder, "test folder 2", bmsvc.DEFAULT_INDEX);
-
- let root = PlacesUtils.getFolderContents(folder).root;
- do_check_eq(root.childCount, 2);
-
- // ensure the bookmark and page guids remain the same after modifing other property.
- let bookmarkGuidZero = root.getChild(0).bookmarkGuid;
- let pageGuidZero = root.getChild(0).pageGuid;
- bmsvc.setItemTitle(b1, "1 title mod");
- do_check_eq(root.getChild(0).title, "1 title mod");
- do_check_eq(root.getChild(0).bookmarkGuid, bookmarkGuidZero);
- do_check_eq(root.getChild(0).pageGuid, pageGuidZero);
-
- let bookmarkGuidOne = root.getChild(1).bookmarkGuid;
- let pageGuidOne = root.getChild(1).pageGuid;
- bmsvc.setItemTitle(f1, "test foolder 234");
- do_check_eq(root.getChild(1).title, "test foolder 234");
- do_check_eq(root.getChild(1).bookmarkGuid, bookmarkGuidOne);
- do_check_eq(root.getChild(1).pageGuid, pageGuidOne);
-
- root.containerOpen = false;
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_addVisitAndCheckGuid() {
- // add a visit and test page guid and non-existing bookmark guids.
- let sourceURI = uri("http://test4.com/");
- yield PlacesTestUtils.addVisits({ uri: sourceURI });
- do_check_eq(bmsvc.getBookmarkedURIFor(sourceURI), null);
-
- let options = histsvc.getNewQueryOptions();
- let query = histsvc.getNewQuery();
- query.uri = sourceURI;
- let root = histsvc.executeQuery(query, options).root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 1);
-
- do_check_valid_places_guid(root.getChild(0).pageGuid);
- do_check_eq(root.getChild(0).bookmarkGuid, "");
- root.containerOpen = false;
-
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* test_addItemsWithInvalidGUIDsFails() {
- const INVALID_GUID = "XYZ";
- try {
- bmsvc.createFolder(bmsvc.placesRoot, "XYZ folder",
- bmsvc.DEFAULT_INDEX, INVALID_GUID);
- do_throw("Adding a folder with an invalid guid should fail");
- }
- catch (ex) { }
-
- let folder = bmsvc.createFolder(bmsvc.placesRoot, "test folder",
- bmsvc.DEFAULT_INDEX);
- try {
- bmsvc.insertBookmark(folder, uri("http://test.tld"), bmsvc.DEFAULT_INDEX,
- "title", INVALID_GUID);
- do_throw("Adding a bookmark with an invalid guid should fail");
- }
- catch (ex) { }
-
- try {
- bmsvc.insertSeparator(folder, bmsvc.DEFAULT_INDEX, INVALID_GUID);
- do_throw("Adding a separator with an invalid guid should fail");
- }
- catch (ex) { }
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_addItemsWithGUIDs() {
- const FOLDER_GUID = "FOLDER--GUID";
- const BOOKMARK_GUID = "BM------GUID";
- const SEPARATOR_GUID = "SEP-----GUID";
-
- let folder = bmsvc.createFolder(bmsvc.placesRoot, "test folder",
- bmsvc.DEFAULT_INDEX, FOLDER_GUID);
- bmsvc.insertBookmark(folder, uri("http://test1.com/"), bmsvc.DEFAULT_INDEX,
- "1 title", BOOKMARK_GUID);
- bmsvc.insertSeparator(folder, bmsvc.DEFAULT_INDEX, SEPARATOR_GUID);
-
- let root = PlacesUtils.getFolderContents(folder).root;
- do_check_eq(root.childCount, 2);
- do_check_eq(root.bookmarkGuid, FOLDER_GUID);
- do_check_eq(root.getChild(0).bookmarkGuid, BOOKMARK_GUID);
- do_check_eq(root.getChild(1).bookmarkGuid, SEPARATOR_GUID);
-
- root.containerOpen = false;
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_emptyGUIDIgnored() {
- let folder = bmsvc.createFolder(bmsvc.placesRoot, "test folder",
- bmsvc.DEFAULT_INDEX, "");
- do_check_valid_places_guid(PlacesUtils.getFolderContents(folder)
- .root.bookmarkGuid);
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_usingSameGUIDFails() {
- const GUID = "XYZXYZXYZXYZ";
- bmsvc.createFolder(bmsvc.placesRoot, "test folder",
- bmsvc.DEFAULT_INDEX, GUID);
- try {
- bmsvc.createFolder(bmsvc.placesRoot, "test folder 2",
- bmsvc.DEFAULT_INDEX, GUID);
- do_throw("Using the same guid twice should fail");
- }
- catch (ex) { }
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
diff --git a/toolkit/components/places/tests/unit/test_placeURIs.js b/toolkit/components/places/tests/unit/test_placeURIs.js
deleted file mode 100644
index 0f585ca514..0000000000
--- a/toolkit/components/places/tests/unit/test_placeURIs.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-
-// Get history service
-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() {
- // XXX Full testing coverage for QueriesToQueryString and
- // QueryStringToQueries
-
- var bs = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
- getService(Ci.nsINavBookmarksService);
- const NHQO = Ci.nsINavHistoryQueryOptions;
- // Bug 376798
- var query = histsvc.getNewQuery();
- query.setFolders([bs.placesRoot], 1);
- do_check_eq(histsvc.queriesToQueryString([query], 1, histsvc.getNewQueryOptions()),
- "place:folder=PLACES_ROOT");
-
- // Bug 378828
- var options = histsvc.getNewQueryOptions();
- options.sortingAnnotation = "test anno";
- options.sortingMode = NHQO.SORT_BY_ANNOTATION_DESCENDING;
- var placeURI =
- "place:folder=PLACES_ROOT&sort=" + NHQO.SORT_BY_ANNOTATION_DESCENDING +
- "&sortingAnnotation=test%20anno";
- do_check_eq(histsvc.queriesToQueryString([query], 1, options),
- placeURI);
- options = {};
- histsvc.queryStringToQueries(placeURI, { }, {}, options);
- do_check_eq(options.value.sortingAnnotation, "test anno");
- do_check_eq(options.value.sortingMode, NHQO.SORT_BY_ANNOTATION_DESCENDING);
-}
diff --git a/toolkit/components/places/tests/unit/test_placesTxn.js b/toolkit/components/places/tests/unit/test_placesTxn.js
deleted file mode 100644
index 3cc9809bb3..0000000000
--- a/toolkit/components/places/tests/unit/test_placesTxn.js
+++ /dev/null
@@ -1,937 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var bmsvc = PlacesUtils.bookmarks;
-var tagssvc = PlacesUtils.tagging;
-var annosvc = PlacesUtils.annotations;
-var txnManager = PlacesUtils.transactionManager;
-const DESCRIPTION_ANNO = "bookmarkProperties/description";
-
-function* promiseKeyword(keyword, href, postData) {
- while (true) {
- let entry = yield PlacesUtils.keywords.fetch(keyword);
- if (href == null && !entry)
- break;
- if (entry && entry.url.href == href && entry.postData == postData) {
- break;
- }
-
- yield new Promise(resolve => do_timeout(100, resolve));
- }
-}
-
-// create and add bookmarks observer
-var observer = {
-
- onBeginUpdateBatch: function() {
- this._beginUpdateBatch = true;
- },
- _beginUpdateBatch: false,
-
- onEndUpdateBatch: function() {
- this._endUpdateBatch = true;
- },
- _endUpdateBatch: false,
-
- onItemAdded: function(id, folder, index, itemType, uri) {
- this._itemAddedId = id;
- this._itemAddedParent = folder;
- this._itemAddedIndex = index;
- this._itemAddedType = itemType;
- },
- _itemAddedId: null,
- _itemAddedParent: null,
- _itemAddedIndex: null,
- _itemAddedType: null,
-
- onItemRemoved: function(id, folder, index, itemType) {
- this._itemRemovedId = id;
- this._itemRemovedFolder = folder;
- this._itemRemovedIndex = index;
- },
- _itemRemovedId: null,
- _itemRemovedFolder: null,
- _itemRemovedIndex: null,
-
- onItemChanged: function(id, property, isAnnotationProperty, newValue,
- lastModified, itemType) {
- // The transaction manager is being rewritten in bug 891303, so just
- // skip checking this for now.
- if (property == "tags")
- return;
- this._itemChangedId = id;
- this._itemChangedProperty = property;
- this._itemChanged_isAnnotationProperty = isAnnotationProperty;
- this._itemChangedValue = newValue;
- },
- _itemChangedId: null,
- _itemChangedProperty: null,
- _itemChanged_isAnnotationProperty: null,
- _itemChangedValue: null,
-
- onItemVisited: function(id, visitID, time) {
- this._itemVisitedId = id;
- this._itemVisitedVistId = visitID;
- this._itemVisitedTime = time;
- },
- _itemVisitedId: null,
- _itemVisitedVistId: null,
- _itemVisitedTime: null,
-
- onItemMoved: function(id, oldParent, oldIndex, newParent, newIndex,
- itemType) {
- this._itemMovedId = id;
- this._itemMovedOldParent = oldParent;
- this._itemMovedOldIndex = oldIndex;
- this._itemMovedNewParent = newParent;
- this._itemMovedNewIndex = newIndex;
- },
- _itemMovedId: null,
- _itemMovedOldParent: null,
- _itemMovedOldIndex: null,
- _itemMovedNewParent: null,
- _itemMovedNewIndex: null,
-
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsINavBookmarkObserver) ||
- iid.equals(Ci.nsISupports)) {
- return this;
- }
- throw Cr.NS_ERROR_NO_INTERFACE;
- }
-};
-
-// index at which items should begin
-var bmStartIndex = 0;
-
-// get bookmarks root id
-var root = PlacesUtils.bookmarksMenuFolderId;
-
-add_task(function* init() {
- bmsvc.addObserver(observer, false);
- do_register_cleanup(function () {
- bmsvc.removeObserver(observer);
- });
-});
-
-add_task(function* test_create_folder_with_description() {
- const TEST_FOLDERNAME = "Test creating a folder with a description";
- const TEST_DESCRIPTION = "this is my test description";
-
- let annos = [{ name: DESCRIPTION_ANNO,
- type: annosvc.TYPE_STRING,
- flags: 0,
- value: TEST_DESCRIPTION,
- expires: annosvc.EXPIRE_NEVER }];
- let txn = new PlacesCreateFolderTransaction(TEST_FOLDERNAME, root, bmStartIndex, annos);
- txnManager.doTransaction(txn);
-
- // This checks that calling undoTransaction on an "empty batch" doesn't
- // undo the previous transaction (getItemTitle will fail)
- txnManager.beginBatch(null);
- txnManager.endBatch(false);
- txnManager.undoTransaction();
-
- let folderId = observer._itemAddedId;
- do_check_eq(bmsvc.getItemTitle(folderId), TEST_FOLDERNAME);
- do_check_eq(observer._itemAddedIndex, bmStartIndex);
- do_check_eq(observer._itemAddedParent, root);
- do_check_eq(observer._itemAddedId, folderId);
- do_check_eq(TEST_DESCRIPTION, annosvc.getItemAnnotation(folderId, DESCRIPTION_ANNO));
-
- txn.undoTransaction();
- do_check_eq(observer._itemRemovedId, folderId);
- do_check_eq(observer._itemRemovedFolder, root);
- do_check_eq(observer._itemRemovedIndex, bmStartIndex);
-
- txn.redoTransaction();
- do_check_eq(observer._itemAddedIndex, bmStartIndex);
- do_check_eq(observer._itemAddedParent, root);
- do_check_eq(observer._itemAddedId, folderId);
-
- txn.undoTransaction();
- do_check_eq(observer._itemRemovedId, folderId);
- do_check_eq(observer._itemRemovedFolder, root);
- do_check_eq(observer._itemRemovedIndex, bmStartIndex);
-});
-
-add_task(function* test_create_item() {
- let testURI = NetUtil.newURI("http://test_create_item.com");
-
- let txn = new PlacesCreateBookmarkTransaction(testURI, root, bmStartIndex,
- "Test creating an item");
-
- txnManager.doTransaction(txn);
- let id = bmsvc.getBookmarkIdsForURI(testURI)[0];
- do_check_eq(observer._itemAddedId, id);
- do_check_eq(observer._itemAddedIndex, bmStartIndex);
- do_check_true(bmsvc.isBookmarked(testURI));
-
- txn.undoTransaction();
- do_check_eq(observer._itemRemovedId, id);
- do_check_eq(observer._itemRemovedIndex, bmStartIndex);
- do_check_false(bmsvc.isBookmarked(testURI));
-
- txn.redoTransaction();
- do_check_true(bmsvc.isBookmarked(testURI));
- let newId = bmsvc.getBookmarkIdsForURI(testURI)[0];
- do_check_eq(observer._itemAddedIndex, bmStartIndex);
- do_check_eq(observer._itemAddedParent, root);
- do_check_eq(observer._itemAddedId, newId);
-
- txn.undoTransaction();
- do_check_eq(observer._itemRemovedId, newId);
- do_check_eq(observer._itemRemovedFolder, root);
- do_check_eq(observer._itemRemovedIndex, bmStartIndex);
-});
-
-add_task(function* test_create_item_to_folder() {
- const TEST_FOLDERNAME = "Test creating item to a folder";
- let testURI = NetUtil.newURI("http://test_create_item_to_folder.com");
- let folderId = bmsvc.createFolder(root, TEST_FOLDERNAME, bmsvc.DEFAULT_INDEX);
-
- let txn = new PlacesCreateBookmarkTransaction(testURI, folderId, bmStartIndex,
- "Test creating item");
- txnManager.doTransaction(txn);
- let bkmId = bmsvc.getBookmarkIdsForURI(testURI)[0];
- do_check_eq(observer._itemAddedId, bkmId);
- do_check_eq(observer._itemAddedIndex, bmStartIndex);
- do_check_true(bmsvc.isBookmarked(testURI));
-
- txn.undoTransaction();
- do_check_eq(observer._itemRemovedId, bkmId);
- do_check_eq(observer._itemRemovedIndex, bmStartIndex);
-
- txn.redoTransaction();
- let newBkmId = bmsvc.getBookmarkIdsForURI(testURI)[0];
- do_check_eq(observer._itemAddedIndex, bmStartIndex);
- do_check_eq(observer._itemAddedParent, folderId);
- do_check_eq(observer._itemAddedId, newBkmId);
-
- txn.undoTransaction();
- do_check_eq(observer._itemRemovedId, newBkmId);
- do_check_eq(observer._itemRemovedFolder, folderId);
- do_check_eq(observer._itemRemovedIndex, bmStartIndex);
-});
-
-add_task(function* test_move_items_to_folder() {
- let testFolderId = bmsvc.createFolder(root, "Test move items", bmsvc.DEFAULT_INDEX);
- let testURI = NetUtil.newURI("http://test_move_items.com");
- let testBkmId = bmsvc.insertBookmark(testFolderId, testURI, bmsvc.DEFAULT_INDEX, "1: Test move items");
- bmsvc.insertBookmark(testFolderId, testURI, bmsvc.DEFAULT_INDEX, "2: Test move items");
-
- // Moving items between the same folder
- let sameTxn = new PlacesMoveItemTransaction(testBkmId, testFolderId, bmsvc.DEFAULT_INDEX);
-
- sameTxn.doTransaction();
- do_check_eq(observer._itemMovedId, testBkmId);
- do_check_eq(observer._itemMovedOldParent, testFolderId);
- do_check_eq(observer._itemMovedOldIndex, 0);
- do_check_eq(observer._itemMovedNewParent, testFolderId);
- do_check_eq(observer._itemMovedNewIndex, 1);
-
- sameTxn.undoTransaction();
- do_check_eq(observer._itemMovedId, testBkmId);
- do_check_eq(observer._itemMovedOldParent, testFolderId);
- do_check_eq(observer._itemMovedOldIndex, 1);
- do_check_eq(observer._itemMovedNewParent, testFolderId);
- do_check_eq(observer._itemMovedNewIndex, 0);
-
- sameTxn.redoTransaction();
- do_check_eq(observer._itemMovedId, testBkmId);
- do_check_eq(observer._itemMovedOldParent, testFolderId);
- do_check_eq(observer._itemMovedOldIndex, 0);
- do_check_eq(observer._itemMovedNewParent, testFolderId);
- do_check_eq(observer._itemMovedNewIndex, 1);
-
- sameTxn.undoTransaction();
- do_check_eq(observer._itemMovedId, testBkmId);
- do_check_eq(observer._itemMovedOldParent, testFolderId);
- do_check_eq(observer._itemMovedOldIndex, 1);
- do_check_eq(observer._itemMovedNewParent, testFolderId);
- do_check_eq(observer._itemMovedNewIndex, 0);
-
- // Moving items between different folders
- let folderId = bmsvc.createFolder(testFolderId,
- "Test move items between different folders",
- bmsvc.DEFAULT_INDEX);
- let diffTxn = new PlacesMoveItemTransaction(testBkmId, folderId, bmsvc.DEFAULT_INDEX);
-
- diffTxn.doTransaction();
- do_check_eq(observer._itemMovedId, testBkmId);
- do_check_eq(observer._itemMovedOldParent, testFolderId);
- do_check_eq(observer._itemMovedOldIndex, 0);
- do_check_eq(observer._itemMovedNewParent, folderId);
- do_check_eq(observer._itemMovedNewIndex, 0);
-
- sameTxn.undoTransaction();
- do_check_eq(observer._itemMovedId, testBkmId);
- do_check_eq(observer._itemMovedOldParent, folderId);
- do_check_eq(observer._itemMovedOldIndex, 0);
- do_check_eq(observer._itemMovedNewParent, testFolderId);
- do_check_eq(observer._itemMovedNewIndex, 0);
-
- diffTxn.redoTransaction();
- do_check_eq(observer._itemMovedId, testBkmId);
- do_check_eq(observer._itemMovedOldParent, testFolderId);
- do_check_eq(observer._itemMovedOldIndex, 0);
- do_check_eq(observer._itemMovedNewParent, folderId);
- do_check_eq(observer._itemMovedNewIndex, 0);
-
- sameTxn.undoTransaction();
- do_check_eq(observer._itemMovedId, testBkmId);
- do_check_eq(observer._itemMovedOldParent, folderId);
- do_check_eq(observer._itemMovedOldIndex, 0);
- do_check_eq(observer._itemMovedNewParent, testFolderId);
- do_check_eq(observer._itemMovedNewIndex, 0);
-});
-
-add_task(function* test_remove_folder() {
- let testFolder = bmsvc.createFolder(root, "Test Removing a Folder", bmsvc.DEFAULT_INDEX);
- let folderId = bmsvc.createFolder(testFolder, "Removed Folder", bmsvc.DEFAULT_INDEX);
-
- let txn = new PlacesRemoveItemTransaction(folderId);
-
- txn.doTransaction();
- do_check_eq(observer._itemRemovedId, folderId);
- do_check_eq(observer._itemRemovedFolder, testFolder);
- do_check_eq(observer._itemRemovedIndex, 0);
-
- txn.undoTransaction();
- do_check_eq(observer._itemAddedId, folderId);
- do_check_eq(observer._itemAddedParent, testFolder);
- do_check_eq(observer._itemAddedIndex, 0);
-
- txn.redoTransaction();
- do_check_eq(observer._itemRemovedId, folderId);
- do_check_eq(observer._itemRemovedFolder, testFolder);
- do_check_eq(observer._itemRemovedIndex, 0);
-
- txn.undoTransaction();
- do_check_eq(observer._itemAddedId, folderId);
- do_check_eq(observer._itemAddedParent, testFolder);
- do_check_eq(observer._itemAddedIndex, 0);
-});
-
-add_task(function* test_remove_item_with_tag() {
- // Notice in this case the tag persists since other bookmarks have same uri.
- let testFolder = bmsvc.createFolder(root, "Test removing an item with a tag",
- bmsvc.DEFAULT_INDEX);
-
- const TAG_NAME = "tag-test_remove_item_with_tag";
- let testURI = NetUtil.newURI("http://test_remove_item_with_tag.com");
- let testBkmId = bmsvc.insertBookmark(testFolder, testURI, bmsvc.DEFAULT_INDEX, "test-item1");
-
- // create bookmark for not removing tag.
- bmsvc.insertBookmark(testFolder, testURI, bmsvc.DEFAULT_INDEX, "test-item2");
-
- // set tag
- tagssvc.tagURI(testURI, [TAG_NAME]);
-
- let txn = new PlacesRemoveItemTransaction(testBkmId);
-
- txn.doTransaction();
- do_check_eq(observer._itemRemovedId, testBkmId);
- do_check_eq(observer._itemRemovedFolder, testFolder);
- do_check_eq(observer._itemRemovedIndex, 0);
- do_check_eq(tagssvc.getTagsForURI(testURI), TAG_NAME);
-
- txn.undoTransaction();
- let newbkmk2Id = observer._itemAddedId;
- do_check_eq(observer._itemAddedParent, testFolder);
- do_check_eq(observer._itemAddedIndex, 0);
- do_check_eq(tagssvc.getTagsForURI(testURI)[0], TAG_NAME);
-
- txn.redoTransaction();
- do_check_eq(observer._itemRemovedId, newbkmk2Id);
- do_check_eq(observer._itemRemovedFolder, testFolder);
- do_check_eq(observer._itemRemovedIndex, 0);
- do_check_eq(tagssvc.getTagsForURI(testURI)[0], TAG_NAME);
-
- txn.undoTransaction();
- do_check_eq(observer._itemAddedParent, testFolder);
- do_check_eq(observer._itemAddedIndex, 0);
- do_check_eq(tagssvc.getTagsForURI(testURI)[0], TAG_NAME);
-});
-
-add_task(function* test_remove_item_with_keyword() {
- // Notice in this case the tag persists since other bookmarks have same uri.
- let testFolder = bmsvc.createFolder(root, "Test removing an item with a keyword",
- bmsvc.DEFAULT_INDEX);
-
- const KEYWORD = "test: test removing an item with a keyword";
- let testURI = NetUtil.newURI("http://test_remove_item_with_keyword.com");
- let testBkmId = bmsvc.insertBookmark(testFolder, testURI, bmsvc.DEFAULT_INDEX, "test-item1");
-
- // set keyword
- yield PlacesUtils.keywords.insert({ url: testURI.spec, keyword: KEYWORD});
-
- let txn = new PlacesRemoveItemTransaction(testBkmId);
-
- txn.doTransaction();
- do_check_eq(observer._itemRemovedId, testBkmId);
- do_check_eq(observer._itemRemovedFolder, testFolder);
- do_check_eq(observer._itemRemovedIndex, 0);
- yield promiseKeyword(KEYWORD, null);
-
- txn.undoTransaction();
- let newbkmk2Id = observer._itemAddedId;
- do_check_eq(observer._itemAddedParent, testFolder);
- do_check_eq(observer._itemAddedIndex, 0);
- yield promiseKeyword(KEYWORD, testURI.spec);
-
- txn.redoTransaction();
- do_check_eq(observer._itemRemovedId, newbkmk2Id);
- do_check_eq(observer._itemRemovedFolder, testFolder);
- do_check_eq(observer._itemRemovedIndex, 0);
- yield promiseKeyword(KEYWORD, null);
-
- txn.undoTransaction();
- do_check_eq(observer._itemAddedParent, testFolder);
- do_check_eq(observer._itemAddedIndex, 0);
-});
-
-add_task(function* test_creating_separator() {
- let testFolder = bmsvc.createFolder(root, "Test creating a separator", bmsvc.DEFAULT_INDEX);
-
- let txn = new PlacesCreateSeparatorTransaction(testFolder, 0);
- txn.doTransaction();
-
- let sepId = observer._itemAddedId;
- do_check_eq(observer._itemAddedIndex, 0);
- do_check_eq(observer._itemAddedParent, testFolder);
-
- txn.undoTransaction();
- do_check_eq(observer._itemRemovedId, sepId);
- do_check_eq(observer._itemRemovedFolder, testFolder);
- do_check_eq(observer._itemRemovedIndex, 0);
-
- txn.redoTransaction();
- let newSepId = observer._itemAddedId;
- do_check_eq(observer._itemAddedIndex, 0);
- do_check_eq(observer._itemAddedParent, testFolder);
-
- txn.undoTransaction();
- do_check_eq(observer._itemRemovedId, newSepId);
- do_check_eq(observer._itemRemovedFolder, testFolder);
- do_check_eq(observer._itemRemovedIndex, 0);
-});
-
-add_task(function* test_removing_separator() {
- let testFolder = bmsvc.createFolder(root, "Test removing a separator", bmsvc.DEFAULT_INDEX);
-
- let sepId = bmsvc.insertSeparator(testFolder, 0);
- let txn = new PlacesRemoveItemTransaction(sepId);
-
- txn.doTransaction();
- do_check_eq(observer._itemRemovedId, sepId);
- do_check_eq(observer._itemRemovedFolder, testFolder);
- do_check_eq(observer._itemRemovedIndex, 0);
-
- txn.undoTransaction();
- do_check_eq(observer._itemAddedId, sepId); // New separator created
- do_check_eq(observer._itemAddedParent, testFolder);
- do_check_eq(observer._itemAddedIndex, 0);
-
- txn.redoTransaction();
- do_check_eq(observer._itemRemovedId, sepId);
- do_check_eq(observer._itemRemovedFolder, testFolder);
- do_check_eq(observer._itemRemovedIndex, 0);
-
- txn.undoTransaction();
- do_check_eq(observer._itemAddedId, sepId); // New separator created
- do_check_eq(observer._itemAddedParent, testFolder);
- do_check_eq(observer._itemAddedIndex, 0);
-});
-
-add_task(function* test_editing_item_title() {
- const TITLE = "Test editing item title";
- const MOD_TITLE = "Mod: Test editing item title";
- let testURI = NetUtil.newURI("http://www.test_editing_item_title.com");
- let testBkmId = bmsvc.insertBookmark(root, testURI, bmsvc.DEFAULT_INDEX, TITLE);
-
- let txn = new PlacesEditItemTitleTransaction(testBkmId, MOD_TITLE);
-
- txn.doTransaction();
- do_check_eq(observer._itemChangedId, testBkmId);
- do_check_eq(observer._itemChangedProperty, "title");
- do_check_eq(observer._itemChangedValue, MOD_TITLE);
-
- txn.undoTransaction();
- do_check_eq(observer._itemChangedId, testBkmId);
- do_check_eq(observer._itemChangedProperty, "title");
- do_check_eq(observer._itemChangedValue, TITLE);
-
- txn.redoTransaction();
- do_check_eq(observer._itemChangedId, testBkmId);
- do_check_eq(observer._itemChangedProperty, "title");
- do_check_eq(observer._itemChangedValue, MOD_TITLE);
-
- txn.undoTransaction();
- do_check_eq(observer._itemChangedId, testBkmId);
- do_check_eq(observer._itemChangedProperty, "title");
- do_check_eq(observer._itemChangedValue, TITLE);
-});
-
-add_task(function* test_editing_item_uri() {
- const OLD_TEST_URI = NetUtil.newURI("http://old.test_editing_item_uri.com/");
- const NEW_TEST_URI = NetUtil.newURI("http://new.test_editing_item_uri.com/");
- let testBkmId = bmsvc.insertBookmark(root, OLD_TEST_URI, bmsvc.DEFAULT_INDEX,
- "Test editing item title");
- tagssvc.tagURI(OLD_TEST_URI, ["tag"]);
-
- let txn = new PlacesEditBookmarkURITransaction(testBkmId, NEW_TEST_URI);
-
- txn.doTransaction();
- do_check_eq(observer._itemChangedId, testBkmId);
- do_check_eq(observer._itemChangedProperty, "uri");
- do_check_eq(observer._itemChangedValue, NEW_TEST_URI.spec);
- do_check_eq(JSON.stringify(tagssvc.getTagsForURI(NEW_TEST_URI)), JSON.stringify(["tag"]));
- do_check_eq(JSON.stringify(tagssvc.getTagsForURI(OLD_TEST_URI)), JSON.stringify([]));
-
- txn.undoTransaction();
- do_check_eq(observer._itemChangedId, testBkmId);
- do_check_eq(observer._itemChangedProperty, "uri");
- do_check_eq(observer._itemChangedValue, OLD_TEST_URI.spec);
- do_check_eq(JSON.stringify(tagssvc.getTagsForURI(OLD_TEST_URI)), JSON.stringify(["tag"]));
- do_check_eq(JSON.stringify(tagssvc.getTagsForURI(NEW_TEST_URI)), JSON.stringify([]));
-
- txn.redoTransaction();
- do_check_eq(observer._itemChangedId, testBkmId);
- do_check_eq(observer._itemChangedProperty, "uri");
- do_check_eq(observer._itemChangedValue, NEW_TEST_URI.spec);
- do_check_eq(JSON.stringify(tagssvc.getTagsForURI(NEW_TEST_URI)), JSON.stringify(["tag"]));
- do_check_eq(JSON.stringify(tagssvc.getTagsForURI(OLD_TEST_URI)), JSON.stringify([]));
-
- txn.undoTransaction();
- do_check_eq(observer._itemChangedId, testBkmId);
- do_check_eq(observer._itemChangedProperty, "uri");
- do_check_eq(observer._itemChangedValue, OLD_TEST_URI.spec);
- do_check_eq(JSON.stringify(tagssvc.getTagsForURI(OLD_TEST_URI)), JSON.stringify(["tag"]));
- do_check_eq(JSON.stringify(tagssvc.getTagsForURI(NEW_TEST_URI)), JSON.stringify([]));
-});
-
-add_task(function* test_edit_description_transaction() {
- let testURI = NetUtil.newURI("http://test_edit_description_transaction.com");
- let testBkmId = bmsvc.insertBookmark(root, testURI, bmsvc.DEFAULT_INDEX, "Test edit description transaction");
-
- let anno = {
- name: DESCRIPTION_ANNO,
- type: Ci.nsIAnnotationService.TYPE_STRING,
- flags: 0,
- value: "Test edit Description",
- expires: Ci.nsIAnnotationService.EXPIRE_NEVER,
- };
- let txn = new PlacesSetItemAnnotationTransaction(testBkmId, anno);
-
- txn.doTransaction();
- do_check_eq(observer._itemChangedId, testBkmId);
- do_check_eq(observer._itemChangedProperty, DESCRIPTION_ANNO);
-});
-
-add_task(function* test_edit_keyword() {
- const KEYWORD = "keyword-test_edit_keyword";
-
- let testURI = NetUtil.newURI("http://test_edit_keyword.com");
- let testBkmId = bmsvc.insertBookmark(root, testURI, bmsvc.DEFAULT_INDEX, "Test edit keyword");
-
- let txn = new PlacesEditBookmarkKeywordTransaction(testBkmId, KEYWORD, "postData");
-
- txn.doTransaction();
- do_check_eq(observer._itemChangedId, testBkmId);
- do_check_eq(observer._itemChangedProperty, "keyword");
- do_check_eq(observer._itemChangedValue, KEYWORD);
- do_check_eq(PlacesUtils.getPostDataForBookmark(testBkmId), "postData");
-
- txn.undoTransaction();
- do_check_eq(observer._itemChangedId, testBkmId);
- do_check_eq(observer._itemChangedProperty, "keyword");
- do_check_eq(observer._itemChangedValue, "");
- do_check_eq(PlacesUtils.getPostDataForBookmark(testBkmId), null);
-});
-
-add_task(function* test_edit_specific_keyword() {
- const KEYWORD = "keyword-test_edit_keyword2";
-
- let testURI = NetUtil.newURI("http://test_edit_keyword2.com");
- let testBkmId = bmsvc.insertBookmark(root, testURI, bmsvc.DEFAULT_INDEX, "Test edit keyword");
- // Add multiple keyword to this uri.
- yield PlacesUtils.keywords.insert({ keyword: "kw1", url: testURI.spec, postData: "postData1" });
- yield PlacesUtils.keywords.insert({keyword: "kw2", url: testURI.spec, postData: "postData2" });
-
- // Try to change only kw2.
- let txn = new PlacesEditBookmarkKeywordTransaction(testBkmId, KEYWORD, "postData2", "kw2");
-
- txn.doTransaction();
- do_check_eq(observer._itemChangedId, testBkmId);
- do_check_eq(observer._itemChangedProperty, "keyword");
- do_check_eq(observer._itemChangedValue, KEYWORD);
- let entry = yield PlacesUtils.keywords.fetch("kw1");
- Assert.equal(entry.url.href, testURI.spec);
- Assert.equal(entry.postData, "postData1");
- yield promiseKeyword(KEYWORD, testURI.spec, "postData2");
- yield promiseKeyword("kw2", null);
-
- txn.undoTransaction();
- do_check_eq(observer._itemChangedId, testBkmId);
- do_check_eq(observer._itemChangedProperty, "keyword");
- do_check_eq(observer._itemChangedValue, "kw2");
- do_check_eq(PlacesUtils.getPostDataForBookmark(testBkmId), "postData1");
- entry = yield PlacesUtils.keywords.fetch("kw1");
- Assert.equal(entry.url.href, testURI.spec);
- Assert.equal(entry.postData, "postData1");
- yield promiseKeyword("kw2", testURI.spec, "postData2");
- yield promiseKeyword("keyword", null);
-});
-
-add_task(function* test_LoadInSidebar_transaction() {
- let testURI = NetUtil.newURI("http://test_LoadInSidebar_transaction.com");
- let testBkmId = bmsvc.insertBookmark(root, testURI, bmsvc.DEFAULT_INDEX, "Test LoadInSidebar transaction");
-
- const LOAD_IN_SIDEBAR_ANNO = "bookmarkProperties/loadInSidebar";
- let anno = { name: LOAD_IN_SIDEBAR_ANNO,
- type: Ci.nsIAnnotationService.TYPE_INT32,
- flags: 0,
- value: true,
- expires: Ci.nsIAnnotationService.EXPIRE_NEVER };
- let txn = new PlacesSetItemAnnotationTransaction(testBkmId, anno);
-
- txn.doTransaction();
- do_check_eq(observer._itemChangedId, testBkmId);
- do_check_eq(observer._itemChangedProperty, LOAD_IN_SIDEBAR_ANNO);
- do_check_eq(observer._itemChanged_isAnnotationProperty, true);
-
- txn.undoTransaction();
- do_check_eq(observer._itemChangedId, testBkmId);
- do_check_eq(observer._itemChangedProperty, LOAD_IN_SIDEBAR_ANNO);
- do_check_eq(observer._itemChanged_isAnnotationProperty, true);
-});
-
-add_task(function* test_generic_item_annotation() {
- let testURI = NetUtil.newURI("http://test_generic_item_annotation.com");
- let testBkmId = bmsvc.insertBookmark(root, testURI, bmsvc.DEFAULT_INDEX, "Test generic item annotation");
-
- let itemAnnoObj = { name: "testAnno/testInt",
- type: Ci.nsIAnnotationService.TYPE_INT32,
- flags: 0,
- value: 123,
- expires: Ci.nsIAnnotationService.EXPIRE_NEVER };
- let txn = new PlacesSetItemAnnotationTransaction(testBkmId, itemAnnoObj);
-
- txn.doTransaction();
- do_check_eq(observer._itemChangedId, testBkmId);
- do_check_eq(observer._itemChangedProperty, "testAnno/testInt");
- do_check_eq(observer._itemChanged_isAnnotationProperty, true);
-
- txn.undoTransaction();
- do_check_eq(observer._itemChangedId, testBkmId);
- do_check_eq(observer._itemChangedProperty, "testAnno/testInt");
- do_check_eq(observer._itemChanged_isAnnotationProperty, true);
-
- txn.redoTransaction();
- do_check_eq(observer._itemChangedId, testBkmId);
- do_check_eq(observer._itemChangedProperty, "testAnno/testInt");
- do_check_eq(observer._itemChanged_isAnnotationProperty, true);
-});
-
-add_task(function* test_editing_item_date_added() {
- let testURI = NetUtil.newURI("http://test_editing_item_date_added.com");
- let testBkmId = bmsvc.insertBookmark(root, testURI, bmsvc.DEFAULT_INDEX,
- "Test editing item date added");
-
- let oldAdded = bmsvc.getItemDateAdded(testBkmId);
- let newAdded = Date.now() * 1000 + 1000;
- let txn = new PlacesEditItemDateAddedTransaction(testBkmId, newAdded);
-
- txn.doTransaction();
- do_check_eq(newAdded, bmsvc.getItemDateAdded(testBkmId));
-
- txn.undoTransaction();
- do_check_eq(oldAdded, bmsvc.getItemDateAdded(testBkmId));
-});
-
-add_task(function* test_edit_item_last_modified() {
- let testURI = NetUtil.newURI("http://test_edit_item_last_modified.com");
- let testBkmId = bmsvc.insertBookmark(root, testURI, bmsvc.DEFAULT_INDEX,
- "Test editing item last modified");
-
- let oldModified = bmsvc.getItemLastModified(testBkmId);
- let newModified = Date.now() * 1000 + 1000;
- let txn = new PlacesEditItemLastModifiedTransaction(testBkmId, newModified);
-
- txn.doTransaction();
- do_check_eq(newModified, bmsvc.getItemLastModified(testBkmId));
-
- txn.undoTransaction();
- do_check_eq(oldModified, bmsvc.getItemLastModified(testBkmId));
-});
-
-add_task(function* test_generic_page_annotation() {
- const TEST_ANNO = "testAnno/testInt";
- let testURI = NetUtil.newURI("http://www.mozilla.org/");
- PlacesTestUtils.addVisits(testURI).then(function () {
- let pageAnnoObj = { name: TEST_ANNO,
- type: Ci.nsIAnnotationService.TYPE_INT32,
- flags: 0,
- value: 123,
- expires: Ci.nsIAnnotationService.EXPIRE_NEVER };
- let txn = new PlacesSetPageAnnotationTransaction(testURI, pageAnnoObj);
-
- txn.doTransaction();
- do_check_true(annosvc.pageHasAnnotation(testURI, TEST_ANNO));
-
- txn.undoTransaction();
- do_check_false(annosvc.pageHasAnnotation(testURI, TEST_ANNO));
-
- txn.redoTransaction();
- do_check_true(annosvc.pageHasAnnotation(testURI, TEST_ANNO));
- });
-});
-
-add_task(function* test_sort_folder_by_name() {
- let testFolder = bmsvc.createFolder(root, "Test PlacesSortFolderByNameTransaction",
- bmsvc.DEFAULT_INDEX);
- let testURI = NetUtil.newURI("http://test_sort_folder_by_name.com");
-
- bmsvc.insertBookmark(testFolder, testURI, bmsvc.DEFAULT_INDEX, "bookmark3");
- bmsvc.insertBookmark(testFolder, testURI, bmsvc.DEFAULT_INDEX, "bookmark2");
- bmsvc.insertBookmark(testFolder, testURI, bmsvc.DEFAULT_INDEX, "bookmark1");
-
- let bkmIds = bmsvc.getBookmarkIdsForURI(testURI);
- bkmIds.sort();
-
- let b1 = bkmIds[0];
- let b2 = bkmIds[1];
- let b3 = bkmIds[2];
-
- do_check_eq(0, bmsvc.getItemIndex(b1));
- do_check_eq(1, bmsvc.getItemIndex(b2));
- do_check_eq(2, bmsvc.getItemIndex(b3));
-
- let txn = new PlacesSortFolderByNameTransaction(testFolder);
-
- txn.doTransaction();
- do_check_eq(2, bmsvc.getItemIndex(b1));
- do_check_eq(1, bmsvc.getItemIndex(b2));
- do_check_eq(0, bmsvc.getItemIndex(b3));
-
- txn.undoTransaction();
- do_check_eq(0, bmsvc.getItemIndex(b1));
- do_check_eq(1, bmsvc.getItemIndex(b2));
- do_check_eq(2, bmsvc.getItemIndex(b3));
-
- txn.redoTransaction();
- do_check_eq(2, bmsvc.getItemIndex(b1));
- do_check_eq(1, bmsvc.getItemIndex(b2));
- do_check_eq(0, bmsvc.getItemIndex(b3));
-
- txn.undoTransaction();
- do_check_eq(0, bmsvc.getItemIndex(b1));
- do_check_eq(1, bmsvc.getItemIndex(b2));
- do_check_eq(2, bmsvc.getItemIndex(b3));
-});
-
-add_task(function* test_tagURI_untagURI() {
- const TAG_1 = "tag-test_tagURI_untagURI-bar";
- const TAG_2 = "tag-test_tagURI_untagURI-foo";
- let tagURI = NetUtil.newURI("http://test_tagURI_untagURI.com");
-
- // Test tagURI
- let tagTxn = new PlacesTagURITransaction(tagURI, [TAG_1, TAG_2]);
-
- tagTxn.doTransaction();
- do_check_eq(JSON.stringify(tagssvc.getTagsForURI(tagURI)), JSON.stringify([TAG_1, TAG_2]));
-
- tagTxn.undoTransaction();
- do_check_eq(tagssvc.getTagsForURI(tagURI).length, 0);
-
- tagTxn.redoTransaction();
- do_check_eq(JSON.stringify(tagssvc.getTagsForURI(tagURI)), JSON.stringify([TAG_1, TAG_2]));
-
- // Test untagURI
- let untagTxn = new PlacesUntagURITransaction(tagURI, [TAG_1]);
-
- untagTxn.doTransaction();
- do_check_eq(JSON.stringify(tagssvc.getTagsForURI(tagURI)), JSON.stringify([TAG_2]));
-
- untagTxn.undoTransaction();
- do_check_eq(JSON.stringify(tagssvc.getTagsForURI(tagURI)), JSON.stringify([TAG_1, TAG_2]));
-
- untagTxn.redoTransaction();
- do_check_eq(JSON.stringify(tagssvc.getTagsForURI(tagURI)), JSON.stringify([TAG_2]));
-});
-
-add_task(function* test_aggregate_removeItem_Txn() {
- let testFolder = bmsvc.createFolder(root, "Test aggregate removeItem transaction", bmsvc.DEFAULT_INDEX);
-
- const TEST_URL = "http://test_aggregate_removeitem_txn.com/";
- const FOLDERNAME = "Folder";
- let testURI = NetUtil.newURI(TEST_URL);
-
- let bkmk1Id = bmsvc.insertBookmark(testFolder, testURI, 0, "Mozilla");
- let bkmk2Id = bmsvc.insertSeparator(testFolder, 1);
- let bkmk3Id = bmsvc.createFolder(testFolder, FOLDERNAME, 2);
-
- let bkmk3_1Id = bmsvc.insertBookmark(bkmk3Id, testURI, 0, "Mozilla");
- let bkmk3_2Id = bmsvc.insertSeparator(bkmk3Id, 1);
- let bkmk3_3Id = bmsvc.createFolder(bkmk3Id, FOLDERNAME, 2);
-
- let childTxn1 = new PlacesRemoveItemTransaction(bkmk1Id);
- let childTxn2 = new PlacesRemoveItemTransaction(bkmk2Id);
- let childTxn3 = new PlacesRemoveItemTransaction(bkmk3Id);
- let transactions = [childTxn1, childTxn2, childTxn3];
- let txn = new PlacesAggregatedTransaction("RemoveItems", transactions);
-
- txn.doTransaction();
- do_check_eq(bmsvc.getItemIndex(bkmk1Id), -1);
- do_check_eq(bmsvc.getItemIndex(bkmk2Id), -1);
- do_check_eq(bmsvc.getItemIndex(bkmk3Id), -1);
- do_check_eq(bmsvc.getItemIndex(bkmk3_1Id), -1);
- do_check_eq(bmsvc.getItemIndex(bkmk3_2Id), -1);
- do_check_eq(bmsvc.getItemIndex(bkmk3_3Id), -1);
- // Check last removed item id.
- do_check_eq(observer._itemRemovedId, bkmk3Id);
-
- txn.undoTransaction();
- let newBkmk1Id = bmsvc.getIdForItemAt(testFolder, 0);
- let newBkmk2Id = bmsvc.getIdForItemAt(testFolder, 1);
- let newBkmk3Id = bmsvc.getIdForItemAt(testFolder, 2);
- let newBkmk3_1Id = bmsvc.getIdForItemAt(newBkmk3Id, 0);
- let newBkmk3_2Id = bmsvc.getIdForItemAt(newBkmk3Id, 1);
- let newBkmk3_3Id = bmsvc.getIdForItemAt(newBkmk3Id, 2);
- do_check_eq(bmsvc.getItemType(newBkmk1Id), bmsvc.TYPE_BOOKMARK);
- do_check_eq(bmsvc.getBookmarkURI(newBkmk1Id).spec, TEST_URL);
- do_check_eq(bmsvc.getItemType(newBkmk2Id), bmsvc.TYPE_SEPARATOR);
- do_check_eq(bmsvc.getItemType(newBkmk3Id), bmsvc.TYPE_FOLDER);
- do_check_eq(bmsvc.getItemTitle(newBkmk3Id), FOLDERNAME);
- do_check_eq(bmsvc.getFolderIdForItem(newBkmk3_1Id), newBkmk3Id);
- do_check_eq(bmsvc.getItemType(newBkmk3_1Id), bmsvc.TYPE_BOOKMARK);
- do_check_eq(bmsvc.getBookmarkURI(newBkmk3_1Id).spec, TEST_URL);
- do_check_eq(bmsvc.getFolderIdForItem(newBkmk3_2Id), newBkmk3Id);
- do_check_eq(bmsvc.getItemType(newBkmk3_2Id), bmsvc.TYPE_SEPARATOR);
- do_check_eq(bmsvc.getFolderIdForItem(newBkmk3_3Id), newBkmk3Id);
- do_check_eq(bmsvc.getItemType(newBkmk3_3Id), bmsvc.TYPE_FOLDER);
- do_check_eq(bmsvc.getItemTitle(newBkmk3_3Id), FOLDERNAME);
- // Check last added back item id.
- // Notice items are restored in reverse order.
- do_check_eq(observer._itemAddedId, newBkmk1Id);
-
- txn.redoTransaction();
- do_check_eq(bmsvc.getItemIndex(newBkmk1Id), -1);
- do_check_eq(bmsvc.getItemIndex(newBkmk2Id), -1);
- do_check_eq(bmsvc.getItemIndex(newBkmk3Id), -1);
- do_check_eq(bmsvc.getItemIndex(newBkmk3_1Id), -1);
- do_check_eq(bmsvc.getItemIndex(newBkmk3_2Id), -1);
- do_check_eq(bmsvc.getItemIndex(newBkmk3_3Id), -1);
- // Check last removed item id.
- do_check_eq(observer._itemRemovedId, newBkmk3Id);
-
- txn.undoTransaction();
- newBkmk1Id = bmsvc.getIdForItemAt(testFolder, 0);
- newBkmk2Id = bmsvc.getIdForItemAt(testFolder, 1);
- newBkmk3Id = bmsvc.getIdForItemAt(testFolder, 2);
- newBkmk3_1Id = bmsvc.getIdForItemAt(newBkmk3Id, 0);
- newBkmk3_2Id = bmsvc.getIdForItemAt(newBkmk3Id, 1);
- newBkmk3_3Id = bmsvc.getIdForItemAt(newBkmk3Id, 2);
- do_check_eq(bmsvc.getItemType(newBkmk1Id), bmsvc.TYPE_BOOKMARK);
- do_check_eq(bmsvc.getBookmarkURI(newBkmk1Id).spec, TEST_URL);
- do_check_eq(bmsvc.getItemType(newBkmk2Id), bmsvc.TYPE_SEPARATOR);
- do_check_eq(bmsvc.getItemType(newBkmk3Id), bmsvc.TYPE_FOLDER);
- do_check_eq(bmsvc.getItemTitle(newBkmk3Id), FOLDERNAME);
- do_check_eq(bmsvc.getFolderIdForItem(newBkmk3_1Id), newBkmk3Id);
- do_check_eq(bmsvc.getItemType(newBkmk3_1Id), bmsvc.TYPE_BOOKMARK);
- do_check_eq(bmsvc.getBookmarkURI(newBkmk3_1Id).spec, TEST_URL);
- do_check_eq(bmsvc.getFolderIdForItem(newBkmk3_2Id), newBkmk3Id);
- do_check_eq(bmsvc.getItemType(newBkmk3_2Id), bmsvc.TYPE_SEPARATOR);
- do_check_eq(bmsvc.getFolderIdForItem(newBkmk3_3Id), newBkmk3Id);
- do_check_eq(bmsvc.getItemType(newBkmk3_3Id), bmsvc.TYPE_FOLDER);
- do_check_eq(bmsvc.getItemTitle(newBkmk3_3Id), FOLDERNAME);
- // Check last added back item id.
- // Notice items are restored in reverse order.
- do_check_eq(observer._itemAddedId, newBkmk1Id);
-});
-
-add_task(function* test_create_item_with_childTxn() {
- let testFolder = bmsvc.createFolder(root, "Test creating an item with childTxns", bmsvc.DEFAULT_INDEX);
-
- const BOOKMARK_TITLE = "parent item";
- let testURI = NetUtil.newURI("http://test_create_item_with_childTxn.com");
- let childTxns = [];
- let newDateAdded = Date.now() * 1000 - 20000;
- let editDateAdddedTxn = new PlacesEditItemDateAddedTransaction(null, newDateAdded);
- childTxns.push(editDateAdddedTxn);
-
- let itemChildAnnoObj = { name: "testAnno/testInt",
- type: Ci.nsIAnnotationService.TYPE_INT32,
- flags: 0,
- value: 123,
- expires: Ci.nsIAnnotationService.EXPIRE_NEVER };
- let annoTxn = new PlacesSetItemAnnotationTransaction(null, itemChildAnnoObj);
- childTxns.push(annoTxn);
-
- let itemWChildTxn = new PlacesCreateBookmarkTransaction(testURI, testFolder, bmStartIndex,
- BOOKMARK_TITLE, null, null,
- childTxns);
- try {
- txnManager.doTransaction(itemWChildTxn);
- let itemId = bmsvc.getBookmarkIdsForURI(testURI)[0];
- do_check_eq(observer._itemAddedId, itemId);
- do_check_eq(newDateAdded, bmsvc.getItemDateAdded(itemId));
- do_check_eq(observer._itemChangedProperty, "testAnno/testInt");
- do_check_eq(observer._itemChanged_isAnnotationProperty, true);
- do_check_true(annosvc.itemHasAnnotation(itemId, itemChildAnnoObj.name))
- do_check_eq(annosvc.getItemAnnotation(itemId, itemChildAnnoObj.name), itemChildAnnoObj.value);
-
- itemWChildTxn.undoTransaction();
- do_check_eq(observer._itemRemovedId, itemId);
-
- itemWChildTxn.redoTransaction();
- do_check_true(bmsvc.isBookmarked(testURI));
- let newId = bmsvc.getBookmarkIdsForURI(testURI)[0];
- do_check_eq(newDateAdded, bmsvc.getItemDateAdded(newId));
- do_check_eq(observer._itemAddedId, newId);
- do_check_eq(observer._itemChangedProperty, "testAnno/testInt");
- do_check_eq(observer._itemChanged_isAnnotationProperty, true);
- do_check_true(annosvc.itemHasAnnotation(newId, itemChildAnnoObj.name))
- do_check_eq(annosvc.getItemAnnotation(newId, itemChildAnnoObj.name), itemChildAnnoObj.value);
-
- itemWChildTxn.undoTransaction();
- do_check_eq(observer._itemRemovedId, newId);
- }
- catch (ex) {
- do_throw("Setting a child transaction in a createItem transaction did throw: " + ex);
- }
-});
-
-add_task(function* test_create_folder_with_child_itemTxn() {
- let childURI = NetUtil.newURI("http://test_create_folder_with_child_itemTxn.com");
- let childItemTxn = new PlacesCreateBookmarkTransaction(childURI, root,
- bmStartIndex, "childItem");
- let txn = new PlacesCreateFolderTransaction("Test creating a folder with child itemTxns",
- root, bmStartIndex, null, [childItemTxn]);
- try {
- txnManager.doTransaction(txn);
- let childItemId = bmsvc.getBookmarkIdsForURI(childURI)[0];
- do_check_eq(observer._itemAddedId, childItemId);
- do_check_eq(observer._itemAddedIndex, 0);
- do_check_true(bmsvc.isBookmarked(childURI));
-
- txn.undoTransaction();
- do_check_false(bmsvc.isBookmarked(childURI));
-
- txn.redoTransaction();
- let newchildItemId = bmsvc.getBookmarkIdsForURI(childURI)[0];
- do_check_eq(observer._itemAddedIndex, 0);
- do_check_eq(observer._itemAddedId, newchildItemId);
- do_check_true(bmsvc.isBookmarked(childURI));
-
- txn.undoTransaction();
- do_check_false(bmsvc.isBookmarked(childURI));
- }
- catch (ex) {
- do_throw("Setting a child item transaction in a createFolder transaction did throw: " + ex);
- }
-});
diff --git a/toolkit/components/places/tests/unit/test_preventive_maintenance.js b/toolkit/components/places/tests/unit/test_preventive_maintenance.js
deleted file mode 100644
index a533c8295a..0000000000
--- a/toolkit/components/places/tests/unit/test_preventive_maintenance.js
+++ /dev/null
@@ -1,1356 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
- /**
- * Test preventive maintenance
- * For every maintenance query create an uncoherent db and check that we take
- * correct fix steps, without polluting valid data.
- */
-
-// Include PlacesDBUtils module
-Components.utils.import("resource://gre/modules/PlacesDBUtils.jsm");
-
-const FINISHED_MAINTENANCE_NOTIFICATION_TOPIC = "places-maintenance-finished";
-
-// Get services and database connection
-var hs = PlacesUtils.history;
-var bs = PlacesUtils.bookmarks;
-var ts = PlacesUtils.tagging;
-var as = PlacesUtils.annotations;
-var fs = PlacesUtils.favicons;
-
-var mDBConn = hs.QueryInterface(Ci.nsPIPlacesDatabase).DBConnection;
-
-// ------------------------------------------------------------------------------
-// Helpers
-
-var defaultBookmarksMaxId = 0;
-function cleanDatabase() {
- mDBConn.executeSimpleSQL("DELETE FROM moz_places");
- mDBConn.executeSimpleSQL("DELETE FROM moz_historyvisits");
- mDBConn.executeSimpleSQL("DELETE FROM moz_anno_attributes");
- mDBConn.executeSimpleSQL("DELETE FROM moz_annos");
- mDBConn.executeSimpleSQL("DELETE FROM moz_items_annos");
- mDBConn.executeSimpleSQL("DELETE FROM moz_inputhistory");
- mDBConn.executeSimpleSQL("DELETE FROM moz_keywords");
- mDBConn.executeSimpleSQL("DELETE FROM moz_favicons");
- mDBConn.executeSimpleSQL("DELETE FROM moz_bookmarks WHERE id > " + defaultBookmarksMaxId);
-}
-
-function addPlace(aUrl, aFavicon) {
- let stmt = mDBConn.createStatement(
- "INSERT INTO moz_places (url, url_hash, favicon_id) VALUES (:url, hash(:url), :favicon)");
- stmt.params["url"] = aUrl || "http://www.mozilla.org";
- stmt.params["favicon"] = aFavicon || null;
- stmt.execute();
- stmt.finalize();
- return mDBConn.lastInsertRowID;
-}
-
-function addBookmark(aPlaceId, aType, aParent, aKeywordId, aFolderType, aTitle) {
- let stmt = mDBConn.createStatement(
- `INSERT INTO moz_bookmarks (fk, type, parent, keyword_id, folder_type,
- title, guid)
- VALUES (:place_id, :type, :parent, :keyword_id, :folder_type, :title,
- GENERATE_GUID())`);
- stmt.params["place_id"] = aPlaceId || null;
- stmt.params["type"] = aType || bs.TYPE_BOOKMARK;
- stmt.params["parent"] = aParent || bs.unfiledBookmarksFolder;
- stmt.params["keyword_id"] = aKeywordId || null;
- stmt.params["folder_type"] = aFolderType || null;
- stmt.params["title"] = typeof(aTitle) == "string" ? aTitle : null;
- stmt.execute();
- stmt.finalize();
- return mDBConn.lastInsertRowID;
-}
-
-// ------------------------------------------------------------------------------
-// Tests
-
-var tests = [];
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "A.1",
- desc: "Remove obsolete annotations from moz_annos",
-
- _obsoleteWeaveAttribute: "weave/test",
- _placeId: null,
-
- setup: function() {
- // Add a place to ensure place_id = 1 is valid.
- this._placeId = addPlace();
- // Add an obsolete attribute.
- let stmt = mDBConn.createStatement(
- "INSERT INTO moz_anno_attributes (name) VALUES (:anno)"
- );
- stmt.params['anno'] = this._obsoleteWeaveAttribute;
- stmt.execute();
- stmt.finalize();
- stmt = mDBConn.createStatement(
- `INSERT INTO moz_annos (place_id, anno_attribute_id)
- VALUES (:place_id,
- (SELECT id FROM moz_anno_attributes WHERE name = :anno)
- )`
- );
- stmt.params['place_id'] = this._placeId;
- stmt.params['anno'] = this._obsoleteWeaveAttribute;
- stmt.execute();
- stmt.finalize();
- },
-
- check: function() {
- // Check that the obsolete annotation has been removed.
- let stmt = mDBConn.createStatement(
- "SELECT id FROM moz_anno_attributes WHERE name = :anno"
- );
- stmt.params['anno'] = this._obsoleteWeaveAttribute;
- do_check_false(stmt.executeStep());
- stmt.finalize();
- }
-});
-
-tests.push({
- name: "A.2",
- desc: "Remove obsolete annotations from moz_items_annos",
-
- _obsoleteSyncAttribute: "sync/children",
- _obsoleteGuidAttribute: "placesInternal/GUID",
- _obsoleteWeaveAttribute: "weave/test",
- _placeId: null,
- _bookmarkId: null,
-
- setup: function() {
- // Add a place to ensure place_id = 1 is valid.
- this._placeId = addPlace();
- // Add a bookmark.
- this._bookmarkId = addBookmark(this._placeId);
- // Add an obsolete attribute.
- let stmt = mDBConn.createStatement(
- `INSERT INTO moz_anno_attributes (name)
- VALUES (:anno1), (:anno2), (:anno3)`
- );
- stmt.params['anno1'] = this._obsoleteSyncAttribute;
- stmt.params['anno2'] = this._obsoleteGuidAttribute;
- stmt.params['anno3'] = this._obsoleteWeaveAttribute;
- stmt.execute();
- stmt.finalize();
- stmt = mDBConn.createStatement(
- `INSERT INTO moz_items_annos (item_id, anno_attribute_id)
- SELECT :item_id, id
- FROM moz_anno_attributes
- WHERE name IN (:anno1, :anno2, :anno3)`
- );
- stmt.params['item_id'] = this._bookmarkId;
- stmt.params['anno1'] = this._obsoleteSyncAttribute;
- stmt.params['anno2'] = this._obsoleteGuidAttribute;
- stmt.params['anno3'] = this._obsoleteWeaveAttribute;
- stmt.execute();
- stmt.finalize();
- },
-
- check: function() {
- // Check that the obsolete annotations have been removed.
- let stmt = mDBConn.createStatement(
- `SELECT id FROM moz_anno_attributes
- WHERE name IN (:anno1, :anno2, :anno3)`
- );
- stmt.params['anno1'] = this._obsoleteSyncAttribute;
- stmt.params['anno2'] = this._obsoleteGuidAttribute;
- stmt.params['anno3'] = this._obsoleteWeaveAttribute;
- do_check_false(stmt.executeStep());
- stmt.finalize();
- }
-});
-
-tests.push({
- name: "A.3",
- desc: "Remove unused attributes",
-
- _usedPageAttribute: "usedPage",
- _usedItemAttribute: "usedItem",
- _unusedAttribute: "unused",
- _placeId: null,
- _bookmarkId: null,
-
- setup: function() {
- // Add a place to ensure place_id = 1 is valid
- this._placeId = addPlace();
- // add a bookmark
- this._bookmarkId = addBookmark(this._placeId);
- // Add a used attribute and an unused one.
- let stmt = mDBConn.createStatement("INSERT INTO moz_anno_attributes (name) VALUES (:anno)");
- stmt.params['anno'] = this._usedPageAttribute;
- stmt.execute();
- stmt.reset();
- stmt.params['anno'] = this._usedItemAttribute;
- stmt.execute();
- stmt.reset();
- stmt.params['anno'] = this._unusedAttribute;
- stmt.execute();
- stmt.finalize();
-
- stmt = mDBConn.createStatement("INSERT INTO moz_annos (place_id, anno_attribute_id) VALUES(:place_id, (SELECT id FROM moz_anno_attributes WHERE name = :anno))");
- stmt.params['place_id'] = this._placeId;
- stmt.params['anno'] = this._usedPageAttribute;
- stmt.execute();
- stmt.finalize();
- stmt = mDBConn.createStatement("INSERT INTO moz_items_annos (item_id, anno_attribute_id) VALUES(:item_id, (SELECT id FROM moz_anno_attributes WHERE name = :anno))");
- stmt.params['item_id'] = this._bookmarkId;
- stmt.params['anno'] = this._usedItemAttribute;
- stmt.execute();
- stmt.finalize();
- },
-
- check: function() {
- // Check that used attributes are still there
- let stmt = mDBConn.createStatement("SELECT id FROM moz_anno_attributes WHERE name = :anno");
- stmt.params['anno'] = this._usedPageAttribute;
- do_check_true(stmt.executeStep());
- stmt.reset();
- stmt.params['anno'] = this._usedItemAttribute;
- do_check_true(stmt.executeStep());
- stmt.reset();
- // Check that unused attribute has been removed
- stmt.params['anno'] = this._unusedAttribute;
- do_check_false(stmt.executeStep());
- stmt.finalize();
- }
-});
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "B.1",
- desc: "Remove annotations with an invalid attribute",
-
- _usedPageAttribute: "usedPage",
- _placeId: null,
-
- setup: function() {
- // Add a place to ensure place_id = 1 is valid
- this._placeId = addPlace();
- // Add a used attribute.
- let stmt = mDBConn.createStatement("INSERT INTO moz_anno_attributes (name) VALUES (:anno)");
- stmt.params['anno'] = this._usedPageAttribute;
- stmt.execute();
- stmt.finalize();
- stmt = mDBConn.createStatement("INSERT INTO moz_annos (place_id, anno_attribute_id) VALUES(:place_id, (SELECT id FROM moz_anno_attributes WHERE name = :anno))");
- stmt.params['place_id'] = this._placeId;
- stmt.params['anno'] = this._usedPageAttribute;
- stmt.execute();
- stmt.finalize();
- // Add an annotation with a nonexistent attribute
- stmt = mDBConn.createStatement("INSERT INTO moz_annos (place_id, anno_attribute_id) VALUES(:place_id, 1337)");
- stmt.params['place_id'] = this._placeId;
- stmt.execute();
- stmt.finalize();
- },
-
- check: function() {
- // Check that used attribute is still there
- let stmt = mDBConn.createStatement("SELECT id FROM moz_anno_attributes WHERE name = :anno");
- stmt.params['anno'] = this._usedPageAttribute;
- do_check_true(stmt.executeStep());
- stmt.finalize();
- // check that annotation with valid attribute is still there
- stmt = mDBConn.createStatement("SELECT id FROM moz_annos WHERE anno_attribute_id = (SELECT id FROM moz_anno_attributes WHERE name = :anno)");
- stmt.params['anno'] = this._usedPageAttribute;
- do_check_true(stmt.executeStep());
- stmt.finalize();
- // Check that annotation with bogus attribute has been removed
- stmt = mDBConn.createStatement("SELECT id FROM moz_annos WHERE anno_attribute_id = 1337");
- do_check_false(stmt.executeStep());
- stmt.finalize();
- }
-});
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "B.2",
- desc: "Remove orphan page annotations",
-
- _usedPageAttribute: "usedPage",
- _placeId: null,
-
- setup: function() {
- // Add a place to ensure place_id = 1 is valid
- this._placeId = addPlace();
- // Add a used attribute.
- let stmt = mDBConn.createStatement("INSERT INTO moz_anno_attributes (name) VALUES (:anno)");
- stmt.params['anno'] = this._usedPageAttribute;
- stmt.execute();
- stmt.finalize();
- stmt = mDBConn.createStatement("INSERT INTO moz_annos (place_id, anno_attribute_id) VALUES(:place_id, (SELECT id FROM moz_anno_attributes WHERE name = :anno))");
- stmt.params['place_id'] = this._placeId;
- stmt.params['anno'] = this._usedPageAttribute;
- stmt.execute();
- stmt.reset();
- // Add an annotation to a nonexistent page
- stmt.params['place_id'] = 1337;
- stmt.params['anno'] = this._usedPageAttribute;
- stmt.execute();
- stmt.finalize();
- },
-
- check: function() {
- // Check that used attribute is still there
- let stmt = mDBConn.createStatement("SELECT id FROM moz_anno_attributes WHERE name = :anno");
- stmt.params['anno'] = this._usedPageAttribute;
- do_check_true(stmt.executeStep());
- stmt.finalize();
- // check that annotation with valid attribute is still there
- stmt = mDBConn.createStatement("SELECT id FROM moz_annos WHERE anno_attribute_id = (SELECT id FROM moz_anno_attributes WHERE name = :anno)");
- stmt.params['anno'] = this._usedPageAttribute;
- do_check_true(stmt.executeStep());
- stmt.finalize();
- // Check that an annotation to a nonexistent page has been removed
- stmt = mDBConn.createStatement("SELECT id FROM moz_annos WHERE place_id = 1337");
- do_check_false(stmt.executeStep());
- stmt.finalize();
- }
-});
-
-// ------------------------------------------------------------------------------
-tests.push({
- name: "C.1",
- desc: "fix missing Places root",
-
- setup: function() {
- // Sanity check: ensure that roots are intact.
- do_check_eq(bs.getFolderIdForItem(bs.placesRoot), 0);
- do_check_eq(bs.getFolderIdForItem(bs.bookmarksMenuFolder), bs.placesRoot);
- do_check_eq(bs.getFolderIdForItem(bs.tagsFolder), bs.placesRoot);
- do_check_eq(bs.getFolderIdForItem(bs.unfiledBookmarksFolder), bs.placesRoot);
- do_check_eq(bs.getFolderIdForItem(bs.toolbarFolder), bs.placesRoot);
-
- // Remove the root.
- mDBConn.executeSimpleSQL("DELETE FROM moz_bookmarks WHERE parent = 0");
- let stmt = mDBConn.createStatement("SELECT id FROM moz_bookmarks WHERE parent = 0");
- do_check_false(stmt.executeStep());
- stmt.finalize();
- },
-
- check: function() {
- // Ensure the roots have been correctly restored.
- do_check_eq(bs.getFolderIdForItem(bs.placesRoot), 0);
- do_check_eq(bs.getFolderIdForItem(bs.bookmarksMenuFolder), bs.placesRoot);
- do_check_eq(bs.getFolderIdForItem(bs.tagsFolder), bs.placesRoot);
- do_check_eq(bs.getFolderIdForItem(bs.unfiledBookmarksFolder), bs.placesRoot);
- do_check_eq(bs.getFolderIdForItem(bs.toolbarFolder), bs.placesRoot);
- }
-});
-
-// ------------------------------------------------------------------------------
-tests.push({
- name: "C.2",
- desc: "Fix roots titles",
-
- setup: function() {
- // Sanity check: ensure that roots titles are correct. We can use our check.
- this.check();
- // Change some roots' titles.
- bs.setItemTitle(bs.placesRoot, "bad title");
- do_check_eq(bs.getItemTitle(bs.placesRoot), "bad title");
- bs.setItemTitle(bs.unfiledBookmarksFolder, "bad title");
- do_check_eq(bs.getItemTitle(bs.unfiledBookmarksFolder), "bad title");
- },
-
- check: function() {
- // Ensure all roots titles are correct.
- do_check_eq(bs.getItemTitle(bs.placesRoot), "");
- do_check_eq(bs.getItemTitle(bs.bookmarksMenuFolder),
- PlacesUtils.getString("BookmarksMenuFolderTitle"));
- do_check_eq(bs.getItemTitle(bs.tagsFolder),
- PlacesUtils.getString("TagsFolderTitle"));
- do_check_eq(bs.getItemTitle(bs.unfiledBookmarksFolder),
- PlacesUtils.getString("OtherBookmarksFolderTitle"));
- do_check_eq(bs.getItemTitle(bs.toolbarFolder),
- PlacesUtils.getString("BookmarksToolbarFolderTitle"));
- }
-});
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "D.1",
- desc: "Remove items without a valid place",
-
- _validItemId: null,
- _invalidItemId: null,
- _placeId: null,
-
- setup: function() {
- // Add a place to ensure place_id = 1 is valid
- this.placeId = addPlace();
- // Insert a valid bookmark
- this._validItemId = addBookmark(this.placeId);
- // Insert a bookmark with an invalid place
- this._invalidItemId = addBookmark(1337);
- },
-
- check: function() {
- // Check that valid bookmark is still there
- let stmt = mDBConn.createStatement("SELECT id FROM moz_bookmarks WHERE id = :item_id");
- stmt.params["item_id"] = this._validItemId;
- do_check_true(stmt.executeStep());
- stmt.reset();
- // Check that invalid bookmark has been removed
- stmt.params["item_id"] = this._invalidItemId;
- do_check_false(stmt.executeStep());
- stmt.finalize();
- }
-});
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "D.2",
- desc: "Remove items that are not uri bookmarks from tag containers",
-
- _tagId: null,
- _bookmarkId: null,
- _separatorId: null,
- _folderId: null,
- _placeId: null,
-
- setup: function() {
- // Add a place to ensure place_id = 1 is valid
- this._placeId = addPlace();
- // Create a tag
- this._tagId = addBookmark(null, bs.TYPE_FOLDER, bs.tagsFolder);
- // Insert a bookmark in the tag
- this._bookmarkId = addBookmark(this._placeId, bs.TYPE_BOOKMARK, this._tagId);
- // Insert a separator in the tag
- this._separatorId = addBookmark(null, bs.TYPE_SEPARATOR, this._tagId);
- // Insert a folder in the tag
- this._folderId = addBookmark(null, bs.TYPE_FOLDER, this._tagId);
- },
-
- check: function() {
- // Check that valid bookmark is still there
- let stmt = mDBConn.createStatement("SELECT id FROM moz_bookmarks WHERE type = :type AND parent = :parent");
- stmt.params["type"] = bs.TYPE_BOOKMARK;
- stmt.params["parent"] = this._tagId;
- do_check_true(stmt.executeStep());
- stmt.reset();
- // Check that separator is no more there
- stmt.params["type"] = bs.TYPE_SEPARATOR;
- stmt.params["parent"] = this._tagId;
- do_check_false(stmt.executeStep());
- stmt.reset();
- // Check that folder is no more there
- stmt.params["type"] = bs.TYPE_FOLDER;
- stmt.params["parent"] = this._tagId;
- do_check_false(stmt.executeStep());
- stmt.finalize();
- }
-});
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "D.3",
- desc: "Remove empty tags",
-
- _tagId: null,
- _bookmarkId: null,
- _emptyTagId: null,
- _placeId: null,
-
- setup: function() {
- // Add a place to ensure place_id = 1 is valid
- this._placeId = addPlace();
- // Create a tag
- this._tagId = addBookmark(null, bs.TYPE_FOLDER, bs.tagsFolder);
- // Insert a bookmark in the tag
- this._bookmarkId = addBookmark(this._placeId, bs.TYPE_BOOKMARK, this._tagId);
- // Create another tag (empty)
- this._emptyTagId = addBookmark(null, bs.TYPE_FOLDER, bs.tagsFolder);
- },
-
- check: function() {
- // Check that valid bookmark is still there
- let stmt = mDBConn.createStatement("SELECT id FROM moz_bookmarks WHERE id = :id AND type = :type AND parent = :parent");
- stmt.params["id"] = this._bookmarkId;
- stmt.params["type"] = bs.TYPE_BOOKMARK;
- stmt.params["parent"] = this._tagId;
- do_check_true(stmt.executeStep());
- stmt.reset();
- stmt.params["id"] = this._tagId;
- stmt.params["type"] = bs.TYPE_FOLDER;
- stmt.params["parent"] = bs.tagsFolder;
- do_check_true(stmt.executeStep());
- stmt.reset();
- stmt.params["id"] = this._emptyTagId;
- stmt.params["type"] = bs.TYPE_FOLDER;
- stmt.params["parent"] = bs.tagsFolder;
- do_check_false(stmt.executeStep());
- stmt.finalize();
- }
-});
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "D.4",
- desc: "Move orphan items to unsorted folder",
-
- _orphanBookmarkId: null,
- _orphanSeparatorId: null,
- _orphanFolderId: null,
- _bookmarkId: null,
- _placeId: null,
-
- setup: function() {
- // Add a place to ensure place_id = 1 is valid
- this._placeId = addPlace();
- // Insert an orphan bookmark
- this._orphanBookmarkId = addBookmark(this._placeId, bs.TYPE_BOOKMARK, 8888);
- // Insert an orphan separator
- this._orphanSeparatorId = addBookmark(null, bs.TYPE_SEPARATOR, 8888);
- // Insert a orphan folder
- this._orphanFolderId = addBookmark(null, bs.TYPE_FOLDER, 8888);
- // Create a child of the last created folder
- this._bookmarkId = addBookmark(this._placeId, bs.TYPE_BOOKMARK, this._orphanFolderId);
- },
-
- check: function() {
- // Check that bookmarks are now children of a real folder (unsorted)
- let stmt = mDBConn.createStatement("SELECT id FROM moz_bookmarks WHERE id = :item_id AND parent = :parent");
- stmt.params["item_id"] = this._orphanBookmarkId;
- stmt.params["parent"] = bs.unfiledBookmarksFolder;
- do_check_true(stmt.executeStep());
- stmt.reset();
- stmt.params["item_id"] = this._orphanSeparatorId;
- stmt.params["parent"] = bs.unfiledBookmarksFolder;
- do_check_true(stmt.executeStep());
- stmt.reset();
- stmt.params["item_id"] = this._orphanFolderId;
- stmt.params["parent"] = bs.unfiledBookmarksFolder;
- do_check_true(stmt.executeStep());
- stmt.reset();
- stmt.params["item_id"] = this._bookmarkId;
- stmt.params["parent"] = this._orphanFolderId;
- do_check_true(stmt.executeStep());
- stmt.finalize();
- }
-});
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "D.6",
- desc: "Fix wrong item types | bookmarks",
-
- _separatorId: null,
- _folderId: null,
- _placeId: null,
-
- setup: function() {
- // Add a place to ensure place_id = 1 is valid
- this._placeId = addPlace();
- // Add a separator with a fk
- this._separatorId = addBookmark(this._placeId, bs.TYPE_SEPARATOR);
- // Add a folder with a fk
- this._folderId = addBookmark(this._placeId, bs.TYPE_FOLDER);
- },
-
- check: function() {
- // Check that items with an fk have been converted to bookmarks
- let stmt = mDBConn.createStatement("SELECT id FROM moz_bookmarks WHERE id = :item_id AND type = :type");
- stmt.params["item_id"] = this._separatorId;
- stmt.params["type"] = bs.TYPE_BOOKMARK;
- do_check_true(stmt.executeStep());
- stmt.reset();
- stmt.params["item_id"] = this._folderId;
- stmt.params["type"] = bs.TYPE_BOOKMARK;
- do_check_true(stmt.executeStep());
- stmt.finalize();
- }
-});
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "D.7",
- desc: "Fix wrong item types | bookmarks",
-
- _validBookmarkId: null,
- _invalidBookmarkId: null,
- _placeId: null,
-
- setup: function() {
- // Add a place to ensure place_id = 1 is valid
- this._placeId = addPlace();
- // Add a bookmark with a valid place id
- this._validBookmarkId = addBookmark(this._placeId, bs.TYPE_BOOKMARK);
- // Add a bookmark with a null place id
- this._invalidBookmarkId = addBookmark(null, bs.TYPE_BOOKMARK);
- },
-
- check: function() {
- // Check valid bookmark
- let stmt = mDBConn.createStatement("SELECT id FROM moz_bookmarks WHERE id = :item_id AND type = :type");
- stmt.params["item_id"] = this._validBookmarkId;
- stmt.params["type"] = bs.TYPE_BOOKMARK;
- do_check_true(stmt.executeStep());
- stmt.reset();
- // Check invalid bookmark has been converted to a folder
- stmt.params["item_id"] = this._invalidBookmarkId;
- stmt.params["type"] = bs.TYPE_FOLDER;
- do_check_true(stmt.executeStep());
- stmt.finalize();
- }
-});
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "D.9",
- desc: "Fix wrong parents",
-
- _bookmarkId: null,
- _separatorId: null,
- _bookmarkId1: null,
- _bookmarkId2: null,
- _placeId: null,
-
- setup: function() {
- // Add a place to ensure place_id = 1 is valid
- this._placeId = addPlace();
- // Insert a bookmark
- this._bookmarkId = addBookmark(this._placeId, bs.TYPE_BOOKMARK);
- // Insert a separator
- this._separatorId = addBookmark(null, bs.TYPE_SEPARATOR);
- // Create 3 children of these items
- this._bookmarkId1 = addBookmark(this._placeId, bs.TYPE_BOOKMARK, this._bookmarkId);
- this._bookmarkId2 = addBookmark(this._placeId, bs.TYPE_BOOKMARK, this._separatorId);
- },
-
- check: function() {
- // Check that bookmarks are now children of a real folder (unsorted)
- let stmt = mDBConn.createStatement("SELECT id FROM moz_bookmarks WHERE id = :item_id AND parent = :parent");
- stmt.params["item_id"] = this._bookmarkId1;
- stmt.params["parent"] = bs.unfiledBookmarksFolder;
- do_check_true(stmt.executeStep());
- stmt.reset();
- stmt.params["item_id"] = this._bookmarkId2;
- stmt.params["parent"] = bs.unfiledBookmarksFolder;
- do_check_true(stmt.executeStep());
- stmt.finalize();
- }
-});
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "D.10",
- desc: "Recalculate positions",
-
- _unfiledBookmarks: [],
- _toolbarBookmarks: [],
-
- setup: function() {
- const NUM_BOOKMARKS = 20;
- bs.runInBatchMode({
- runBatched: function (aUserData) {
- // Add bookmarks to two folders to better perturbate the table.
- for (let i = 0; i < NUM_BOOKMARKS; i++) {
- bs.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
- NetUtil.newURI("http://example.com/"),
- bs.DEFAULT_INDEX, "testbookmark");
- }
- for (let i = 0; i < NUM_BOOKMARKS; i++) {
- bs.insertBookmark(PlacesUtils.toolbarFolderId,
- NetUtil.newURI("http://example.com/"),
- bs.DEFAULT_INDEX, "testbookmark");
- }
- }
- }, null);
-
- function randomize_positions(aParent, aResultArray) {
- let stmt = mDBConn.createStatement(
- `UPDATE moz_bookmarks SET position = :rand
- WHERE id IN (
- SELECT id FROM moz_bookmarks WHERE parent = :parent
- ORDER BY RANDOM() LIMIT 1
- )`
- );
- for (let i = 0; i < (NUM_BOOKMARKS / 2); i++) {
- stmt.params["parent"] = aParent;
- stmt.params["rand"] = Math.round(Math.random() * (NUM_BOOKMARKS - 1));
- stmt.execute();
- stmt.reset();
- }
- stmt.finalize();
-
- // Build the expected ordered list of bookmarks.
- stmt = mDBConn.createStatement(
- `SELECT id, position
- FROM moz_bookmarks WHERE parent = :parent
- ORDER BY position ASC, ROWID ASC`
- );
- stmt.params["parent"] = aParent;
- while (stmt.executeStep()) {
- aResultArray.push(stmt.row.id);
- print(stmt.row.id + "\t" + stmt.row.position + "\t" +
- (aResultArray.length - 1));
- }
- stmt.finalize();
- }
-
- // Set random positions for the added bookmarks.
- randomize_positions(PlacesUtils.unfiledBookmarksFolderId,
- this._unfiledBookmarks);
- randomize_positions(PlacesUtils.toolbarFolderId, this._toolbarBookmarks);
- },
-
- check: function() {
- function check_order(aParent, aResultArray) {
- // Build the expected ordered list of bookmarks.
- let stmt = mDBConn.createStatement(
- `SELECT id, position FROM moz_bookmarks WHERE parent = :parent
- ORDER BY position ASC`
- );
- stmt.params["parent"] = aParent;
- let pass = true;
- while (stmt.executeStep()) {
- print(stmt.row.id + "\t" + stmt.row.position);
- if (aResultArray.indexOf(stmt.row.id) != stmt.row.position) {
- pass = false;
- }
- }
- stmt.finalize();
- if (!pass) {
- dump_table("moz_bookmarks");
- do_throw("Unexpected unfiled bookmarks order.");
- }
- }
-
- check_order(PlacesUtils.unfiledBookmarksFolderId, this._unfiledBookmarks);
- check_order(PlacesUtils.toolbarFolderId, this._toolbarBookmarks);
- }
-});
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "D.12",
- desc: "Fix empty-named tags",
-
- setup: function() {
- // Add a place to ensure place_id = 1 is valid
- let placeId = addPlace();
- // Create a empty-named tag.
- this._untitledTagId = addBookmark(null, bs.TYPE_FOLDER, bs.tagsFolder, null, null, "");
- // Insert a bookmark in the tag, otherwise it will be removed.
- addBookmark(placeId, bs.TYPE_BOOKMARK, this._untitledTagId);
- // Create a empty-named folder.
- this._untitledFolderId = addBookmark(null, bs.TYPE_FOLDER, bs.toolbarFolder, null, null, "");
- // Create a titled tag.
- this._titledTagId = addBookmark(null, bs.TYPE_FOLDER, bs.tagsFolder, null, null, "titledTag");
- // Insert a bookmark in the tag, otherwise it will be removed.
- addBookmark(placeId, bs.TYPE_BOOKMARK, this._titledTagId);
- // Create a titled folder.
- this._titledFolderId = addBookmark(null, bs.TYPE_FOLDER, bs.toolbarFolder, null, null, "titledFolder");
- },
-
- check: function() {
- // Check that valid bookmark is still there
- let stmt = mDBConn.createStatement(
- "SELECT title FROM moz_bookmarks WHERE id = :id"
- );
- stmt.params["id"] = this._untitledTagId;
- do_check_true(stmt.executeStep());
- do_check_eq(stmt.row.title, "(notitle)");
- stmt.reset();
- stmt.params["id"] = this._untitledFolderId;
- do_check_true(stmt.executeStep());
- do_check_eq(stmt.row.title, "");
- stmt.reset();
- stmt.params["id"] = this._titledTagId;
- do_check_true(stmt.executeStep());
- do_check_eq(stmt.row.title, "titledTag");
- stmt.reset();
- stmt.params["id"] = this._titledFolderId;
- do_check_true(stmt.executeStep());
- do_check_eq(stmt.row.title, "titledFolder");
- stmt.finalize();
- }
-});
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "E.1",
- desc: "Remove orphan icons",
-
- _placeId: null,
-
- setup: function() {
- // Insert favicon entries
- let stmt = mDBConn.createStatement("INSERT INTO moz_favicons (id, url) VALUES(:favicon_id, :url)");
- stmt.params["favicon_id"] = 1;
- stmt.params["url"] = "http://www1.mozilla.org/favicon.ico";
- stmt.execute();
- stmt.reset();
- stmt.params["favicon_id"] = 2;
- stmt.params["url"] = "http://www2.mozilla.org/favicon.ico";
- stmt.execute();
- stmt.finalize();
- // Insert a place using the existing favicon entry
- this._placeId = addPlace("http://www.mozilla.org", 1);
- },
-
- check: function() {
- // Check that used icon is still there
- let stmt = mDBConn.createStatement("SELECT id FROM moz_favicons WHERE id = :favicon_id");
- stmt.params["favicon_id"] = 1;
- do_check_true(stmt.executeStep());
- stmt.reset();
- // Check that unused icon has been removed
- stmt.params["favicon_id"] = 2;
- do_check_false(stmt.executeStep());
- stmt.finalize();
- }
-});
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "F.1",
- desc: "Remove orphan visits",
-
- _placeId: null,
- _invalidPlaceId: 1337,
-
- setup: function() {
- // Add a place to ensure place_id = 1 is valid
- this._placeId = addPlace();
- // Add a valid visit and an invalid one
- stmt = mDBConn.createStatement("INSERT INTO moz_historyvisits(place_id) VALUES (:place_id)");
- stmt.params["place_id"] = this._placeId;
- stmt.execute();
- stmt.reset();
- stmt.params["place_id"] = this._invalidPlaceId;
- stmt.execute();
- stmt.finalize();
- },
-
- check: function() {
- // Check that valid visit is still there
- let stmt = mDBConn.createStatement("SELECT id FROM moz_historyvisits WHERE place_id = :place_id");
- stmt.params["place_id"] = this._placeId;
- do_check_true(stmt.executeStep());
- stmt.reset();
- // Check that invalid visit has been removed
- stmt.params["place_id"] = this._invalidPlaceId;
- do_check_false(stmt.executeStep());
- stmt.finalize();
- }
-});
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "G.1",
- desc: "Remove orphan input history",
-
- _placeId: null,
- _invalidPlaceId: 1337,
-
- setup: function() {
- // Add a place to ensure place_id = 1 is valid
- this._placeId = addPlace();
- // Add input history entries
- let stmt = mDBConn.createStatement("INSERT INTO moz_inputhistory (place_id, input) VALUES (:place_id, :input)");
- stmt.params["place_id"] = this._placeId;
- stmt.params["input"] = "moz";
- stmt.execute();
- stmt.reset();
- stmt.params["place_id"] = this._invalidPlaceId;
- stmt.params["input"] = "moz";
- stmt.execute();
- stmt.finalize();
- },
-
- check: function() {
- // Check that inputhistory on valid place is still there
- let stmt = mDBConn.createStatement("SELECT place_id FROM moz_inputhistory WHERE place_id = :place_id");
- stmt.params["place_id"] = this._placeId;
- do_check_true(stmt.executeStep());
- stmt.reset();
- // Check that inputhistory on invalid place has gone
- stmt.params["place_id"] = this._invalidPlaceId;
- do_check_false(stmt.executeStep());
- stmt.finalize();
- }
-});
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "H.1",
- desc: "Remove item annos with an invalid attribute",
-
- _usedItemAttribute: "usedItem",
- _bookmarkId: null,
- _placeId: null,
-
- setup: function() {
- // Add a place to ensure place_id = 1 is valid
- this._placeId = addPlace();
- // Insert a bookmark
- this._bookmarkId = addBookmark(this._placeId);
- // Add a used attribute.
- let stmt = mDBConn.createStatement("INSERT INTO moz_anno_attributes (name) VALUES (:anno)");
- stmt.params['anno'] = this._usedItemAttribute;
- stmt.execute();
- stmt.finalize();
- stmt = mDBConn.createStatement("INSERT INTO moz_items_annos (item_id, anno_attribute_id) VALUES(:item_id, (SELECT id FROM moz_anno_attributes WHERE name = :anno))");
- stmt.params['item_id'] = this._bookmarkId;
- stmt.params['anno'] = this._usedItemAttribute;
- stmt.execute();
- stmt.finalize();
- // Add an annotation with a nonexistent attribute
- stmt = mDBConn.createStatement("INSERT INTO moz_items_annos (item_id, anno_attribute_id) VALUES(:item_id, 1337)");
- stmt.params['item_id'] = this._bookmarkId;
- stmt.execute();
- stmt.finalize();
- },
-
- check: function() {
- // Check that used attribute is still there
- let stmt = mDBConn.createStatement("SELECT id FROM moz_anno_attributes WHERE name = :anno");
- stmt.params['anno'] = this._usedItemAttribute;
- do_check_true(stmt.executeStep());
- stmt.finalize();
- // check that annotation with valid attribute is still there
- stmt = mDBConn.createStatement("SELECT id FROM moz_items_annos WHERE anno_attribute_id = (SELECT id FROM moz_anno_attributes WHERE name = :anno)");
- stmt.params['anno'] = this._usedItemAttribute;
- do_check_true(stmt.executeStep());
- stmt.finalize();
- // Check that annotation with bogus attribute has been removed
- stmt = mDBConn.createStatement("SELECT id FROM moz_items_annos WHERE anno_attribute_id = 1337");
- do_check_false(stmt.executeStep());
- stmt.finalize();
- }
-});
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "H.2",
- desc: "Remove orphan item annotations",
-
- _usedItemAttribute: "usedItem",
- _bookmarkId: null,
- _invalidBookmarkId: 8888,
- _placeId: null,
-
- setup: function() {
- // Add a place to ensure place_id = 1 is valid
- this._placeId = addPlace();
- // Insert a bookmark
- this._bookmarkId = addBookmark(this._placeId);
- // Add a used attribute.
- stmt = mDBConn.createStatement("INSERT INTO moz_anno_attributes (name) VALUES (:anno)");
- stmt.params['anno'] = this._usedItemAttribute;
- stmt.execute();
- stmt.finalize();
- stmt = mDBConn.createStatement("INSERT INTO moz_items_annos (item_id, anno_attribute_id) VALUES (:item_id, (SELECT id FROM moz_anno_attributes WHERE name = :anno))");
- stmt.params["item_id"] = this._bookmarkId;
- stmt.params["anno"] = this._usedItemAttribute;
- stmt.execute();
- stmt.reset();
- // Add an annotation to a nonexistent item
- stmt.params["item_id"] = this._invalidBookmarkId;
- stmt.params["anno"] = this._usedItemAttribute;
- stmt.execute();
- stmt.finalize();
- },
-
- check: function() {
- // Check that used attribute is still there
- let stmt = mDBConn.createStatement("SELECT id FROM moz_anno_attributes WHERE name = :anno");
- stmt.params['anno'] = this._usedItemAttribute;
- do_check_true(stmt.executeStep());
- stmt.finalize();
- // check that annotation with valid attribute is still there
- stmt = mDBConn.createStatement("SELECT id FROM moz_items_annos WHERE anno_attribute_id = (SELECT id FROM moz_anno_attributes WHERE name = :anno)");
- stmt.params['anno'] = this._usedItemAttribute;
- do_check_true(stmt.executeStep());
- stmt.finalize();
- // Check that an annotation to a nonexistent page has been removed
- stmt = mDBConn.createStatement("SELECT id FROM moz_items_annos WHERE item_id = 8888");
- do_check_false(stmt.executeStep());
- stmt.finalize();
- }
-});
-
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "I.1",
- desc: "Remove unused keywords",
-
- _bookmarkId: null,
- _placeId: null,
-
- setup: function() {
- // Insert 2 keywords
- let stmt = mDBConn.createStatement("INSERT INTO moz_keywords (id, keyword, place_id) VALUES(:id, :keyword, :place_id)");
- stmt.params["id"] = 1;
- stmt.params["keyword"] = "unused";
- stmt.params["place_id"] = 100;
- stmt.execute();
- stmt.finalize();
- },
-
- check: function() {
- // Check that "used" keyword is still there
- let stmt = mDBConn.createStatement("SELECT id FROM moz_keywords WHERE keyword = :keyword");
- // Check that "unused" keyword has gone
- stmt.params["keyword"] = "unused";
- do_check_false(stmt.executeStep());
- stmt.finalize();
- }
-});
-
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "L.1",
- desc: "Fix wrong favicon ids",
-
- _validIconPlaceId: null,
- _invalidIconPlaceId: null,
-
- setup: function() {
- // Insert a favicon entry
- let stmt = mDBConn.createStatement("INSERT INTO moz_favicons (id, url) VALUES(1, :url)");
- stmt.params["url"] = "http://www.mozilla.org/favicon.ico";
- stmt.execute();
- stmt.finalize();
- // Insert a place using the existing favicon entry
- this._validIconPlaceId = addPlace("http://www1.mozilla.org", 1);
-
- // Insert a place using a nonexistent favicon entry
- this._invalidIconPlaceId = addPlace("http://www2.mozilla.org", 1337);
- },
-
- check: function() {
- // Check that bogus favicon is not there
- let stmt = mDBConn.createStatement("SELECT id FROM moz_places WHERE favicon_id = :favicon_id");
- stmt.params["favicon_id"] = 1337;
- do_check_false(stmt.executeStep());
- stmt.reset();
- // Check that valid favicon is still there
- stmt.params["favicon_id"] = 1;
- do_check_true(stmt.executeStep());
- stmt.finalize();
- // Check that place entries are there
- stmt = mDBConn.createStatement("SELECT id FROM moz_places WHERE id = :place_id");
- stmt.params["place_id"] = this._validIconPlaceId;
- do_check_true(stmt.executeStep());
- stmt.reset();
- stmt.params["place_id"] = this._invalidIconPlaceId;
- do_check_true(stmt.executeStep());
- stmt.finalize();
- }
-});
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "L.2",
- desc: "Recalculate visit_count and last_visit_date",
-
- setup: function* () {
- function setVisitCount(aURL, aValue) {
- let stmt = mDBConn.createStatement(
- `UPDATE moz_places SET visit_count = :count WHERE url_hash = hash(:url)
- AND url = :url`
- );
- stmt.params.count = aValue;
- stmt.params.url = aURL;
- stmt.execute();
- stmt.finalize();
- }
- function setLastVisitDate(aURL, aValue) {
- let stmt = mDBConn.createStatement(
- `UPDATE moz_places SET last_visit_date = :date WHERE url_hash = hash(:url)
- AND url = :url`
- );
- stmt.params.date = aValue;
- stmt.params.url = aURL;
- stmt.execute();
- stmt.finalize();
- }
-
- let now = Date.now() * 1000;
- // Add a page with 1 visit.
- let url = "http://1.moz.org/";
- yield PlacesTestUtils.addVisits({ uri: uri(url), visitDate: now++ });
- // Add a page with 1 visit and set wrong visit_count.
- url = "http://2.moz.org/";
- yield PlacesTestUtils.addVisits({ uri: uri(url), visitDate: now++ });
- setVisitCount(url, 10);
- // Add a page with 1 visit and set wrong last_visit_date.
- url = "http://3.moz.org/";
- yield PlacesTestUtils.addVisits({ uri: uri(url), visitDate: now++ });
- setLastVisitDate(url, now++);
- // Add a page with 1 visit and set wrong stats.
- url = "http://4.moz.org/";
- yield PlacesTestUtils.addVisits({ uri: uri(url), visitDate: now++ });
- setVisitCount(url, 10);
- setLastVisitDate(url, now++);
-
- // Add a page without visits.
- url = "http://5.moz.org/";
- addPlace(url);
- // Add a page without visits and set wrong visit_count.
- url = "http://6.moz.org/";
- addPlace(url);
- setVisitCount(url, 10);
- // Add a page without visits and set wrong last_visit_date.
- url = "http://7.moz.org/";
- addPlace(url);
- setLastVisitDate(url, now++);
- // Add a page without visits and set wrong stats.
- url = "http://8.moz.org/";
- addPlace(url);
- setVisitCount(url, 10);
- setLastVisitDate(url, now++);
- },
-
- check: function() {
- let stmt = mDBConn.createStatement(
- `SELECT h.id FROM moz_places h
- JOIN moz_historyvisits v ON v.place_id = h.id AND visit_type NOT IN (0,4,7,8,9)
- GROUP BY h.id HAVING h.visit_count <> count(*)
- UNION ALL
- SELECT h.id FROM moz_places h
- JOIN moz_historyvisits v ON v.place_id = h.id
- GROUP BY h.id HAVING h.last_visit_date <> MAX(v.visit_date)`
- );
- do_check_false(stmt.executeStep());
- stmt.finalize();
- }
-});
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "L.3",
- desc: "recalculate hidden for redirects.",
-
- *setup() {
- yield PlacesTestUtils.addVisits([
- { uri: NetUtil.newURI("http://l3.moz.org/"),
- transition: TRANSITION_TYPED },
- { uri: NetUtil.newURI("http://l3.moz.org/redirecting/"),
- transition: TRANSITION_TYPED },
- { uri: NetUtil.newURI("http://l3.moz.org/redirecting2/"),
- transition: TRANSITION_REDIRECT_TEMPORARY,
- referrer: NetUtil.newURI("http://l3.moz.org/redirecting/") },
- { uri: NetUtil.newURI("http://l3.moz.org/target/"),
- transition: TRANSITION_REDIRECT_PERMANENT,
- referrer: NetUtil.newURI("http://l3.moz.org/redirecting2/") },
- ]);
- },
-
- check: function () {
- return new Promise(resolve => {
- let stmt = mDBConn.createAsyncStatement(
- "SELECT h.url FROM moz_places h WHERE h.hidden = 1"
- );
- stmt.executeAsync({
- _count: 0,
- handleResult: function(aResultSet) {
- for (let row; (row = aResultSet.getNextRow());) {
- let url = row.getResultByIndex(0);
- do_check_true(/redirecting/.test(url));
- this._count++;
- }
- },
- handleError: function(aError) {
- },
- handleCompletion: function(aReason) {
- dump_table("moz_places");
- dump_table("moz_historyvisits");
- do_check_eq(aReason, Ci.mozIStorageStatementCallback.REASON_FINISHED);
- do_check_eq(this._count, 2);
- resolve();
- }
- });
- stmt.finalize();
- });
- }
-});
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "L.4",
- desc: "recalculate foreign_count.",
-
- *setup() {
- this._pageGuid = (yield PlacesUtils.history.insert({ url: "http://l4.moz.org/",
- visits: [{ date: new Date() }] })).guid;
- yield PlacesUtils.bookmarks.insert({ url: "http://l4.moz.org/",
- parentGuid: PlacesUtils.bookmarks.unfiledGuid});
- yield PlacesUtils.keywords.insert({ url: "http://l4.moz.org/", keyword: "kw" });
- Assert.equal((yield this._getForeignCount()), 2);
- },
-
- *_getForeignCount() {
- let db = yield PlacesUtils.promiseDBConnection();
- let rows = yield db.execute(`SELECT foreign_count FROM moz_places
- WHERE guid = :guid`, { guid: this._pageGuid });
- return rows[0].getResultByName("foreign_count");
- },
-
- *check() {
- Assert.equal((yield this._getForeignCount()), 2);
- }
-});
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "L.5",
- desc: "recalculate hashes when missing.",
-
- *setup() {
- this._pageGuid = (yield PlacesUtils.history.insert({ url: "http://l5.moz.org/",
- visits: [{ date: new Date() }] })).guid;
- Assert.ok((yield this._getHash()) > 0);
- yield PlacesUtils.withConnectionWrapper("change url hash", Task.async(function* (db) {
- yield db.execute(`UPDATE moz_places SET url_hash = 0`);
- }));
- Assert.equal((yield this._getHash()), 0);
- },
-
- *_getHash() {
- let db = yield PlacesUtils.promiseDBConnection();
- let rows = yield db.execute(`SELECT url_hash FROM moz_places
- WHERE guid = :guid`, { guid: this._pageGuid });
- return rows[0].getResultByName("url_hash");
- },
-
- *check() {
- Assert.ok((yield this._getHash()) > 0);
- }
-});
-
-// ------------------------------------------------------------------------------
-
-tests.push({
- name: "Z",
- desc: "Sanity: Preventive maintenance does not touch valid items",
-
- _uri1: uri("http://www1.mozilla.org"),
- _uri2: uri("http://www2.mozilla.org"),
- _folderId: null,
- _bookmarkId: null,
- _separatorId: null,
-
- setup: function* () {
- // use valid api calls to create a bunch of items
- yield PlacesTestUtils.addVisits([
- { uri: this._uri1 },
- { uri: this._uri2 },
- ]);
-
- this._folderId = bs.createFolder(bs.toolbarFolder, "testfolder",
- bs.DEFAULT_INDEX);
- do_check_true(this._folderId > 0);
- this._bookmarkId = bs.insertBookmark(this._folderId, this._uri1,
- bs.DEFAULT_INDEX, "testbookmark");
- do_check_true(this._bookmarkId > 0);
- this._separatorId = bs.insertSeparator(bs.unfiledBookmarksFolder,
- bs.DEFAULT_INDEX);
- do_check_true(this._separatorId > 0);
- ts.tagURI(this._uri1, ["testtag"]);
- fs.setAndFetchFaviconForPage(this._uri2, SMALLPNG_DATA_URI, false,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- null,
- Services.scriptSecurityManager.getSystemPrincipal());
- yield PlacesUtils.keywords.insert({ url: this._uri1.spec, keyword: "testkeyword" });
- as.setPageAnnotation(this._uri2, "anno", "anno", 0, as.EXPIRE_NEVER);
- as.setItemAnnotation(this._bookmarkId, "anno", "anno", 0, as.EXPIRE_NEVER);
- },
-
- check: Task.async(function* () {
- // Check that all items are correct
- let isVisited = yield promiseIsURIVisited(this._uri1);
- do_check_true(isVisited);
- isVisited = yield promiseIsURIVisited(this._uri2);
- do_check_true(isVisited);
-
- do_check_eq(bs.getBookmarkURI(this._bookmarkId).spec, this._uri1.spec);
- do_check_eq(bs.getItemIndex(this._folderId), 0);
- do_check_eq(bs.getItemType(this._folderId), bs.TYPE_FOLDER);
- do_check_eq(bs.getItemType(this._separatorId), bs.TYPE_SEPARATOR);
-
- do_check_eq(ts.getTagsForURI(this._uri1).length, 1);
- do_check_eq((yield PlacesUtils.keywords.fetch({ url: this._uri1.spec })).keyword, "testkeyword");
- do_check_eq(as.getPageAnnotation(this._uri2, "anno"), "anno");
- do_check_eq(as.getItemAnnotation(this._bookmarkId, "anno"), "anno");
-
- yield new Promise(resolve => {
- fs.getFaviconURLForPage(this._uri2, aFaviconURI => {
- do_check_true(aFaviconURI.equals(SMALLPNG_DATA_URI));
- resolve();
- });
- });
- })
-});
-
-// ------------------------------------------------------------------------------
-
-add_task(function* test_preventive_maintenance()
-{
- // Get current bookmarks max ID for cleanup
- let stmt = mDBConn.createStatement("SELECT MAX(id) FROM moz_bookmarks");
- stmt.executeStep();
- defaultBookmarksMaxId = stmt.getInt32(0);
- stmt.finalize();
- do_check_true(defaultBookmarksMaxId > 0);
-
- for (let test of tests) {
- dump("\nExecuting test: " + test.name + "\n" + "*** " + test.desc + "\n");
- yield test.setup();
-
- let promiseMaintenanceFinished =
- promiseTopicObserved(FINISHED_MAINTENANCE_NOTIFICATION_TOPIC);
- Services.prefs.clearUserPref("places.database.lastMaintenance");
- let callbackInvoked = false;
- PlacesDBUtils.maintenanceOnIdle(() => callbackInvoked = true);
- yield promiseMaintenanceFinished;
- do_check_true(callbackInvoked);
-
- // Check the lastMaintenance time has been saved.
- do_check_neq(Services.prefs.getIntPref("places.database.lastMaintenance"), null);
-
- yield test.check();
-
- cleanDatabase();
- }
-
- // Sanity check: all roots should be intact
- do_check_eq(bs.getFolderIdForItem(bs.placesRoot), 0);
- do_check_eq(bs.getFolderIdForItem(bs.bookmarksMenuFolder), bs.placesRoot);
- do_check_eq(bs.getFolderIdForItem(bs.tagsFolder), bs.placesRoot);
- do_check_eq(bs.getFolderIdForItem(bs.unfiledBookmarksFolder), bs.placesRoot);
- do_check_eq(bs.getFolderIdForItem(bs.toolbarFolder), bs.placesRoot);
-});
diff --git a/toolkit/components/places/tests/unit/test_preventive_maintenance_checkAndFixDatabase.js b/toolkit/components/places/tests/unit/test_preventive_maintenance_checkAndFixDatabase.js
deleted file mode 100644
index a8acb4be05..0000000000
--- a/toolkit/components/places/tests/unit/test_preventive_maintenance_checkAndFixDatabase.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
- /**
- * Test preventive maintenance checkAndFixDatabase.
- */
-
-// Include PlacesDBUtils module.
-Components.utils.import("resource://gre/modules/PlacesDBUtils.jsm");
-
-function run_test() {
- do_test_pending();
- PlacesDBUtils.checkAndFixDatabase(function(aLog) {
- let sections = [];
- let positives = [];
- let negatives = [];
- let infos = [];
-
- aLog.forEach(function (aMsg) {
- print (aMsg);
- switch (aMsg.substr(0, 1)) {
- case "+":
- positives.push(aMsg);
- break;
- case "-":
- negatives.push(aMsg);
- break;
- case ">":
- sections.push(aMsg);
- break;
- default:
- infos.push(aMsg);
- }
- });
-
- print("Check that we have run all sections.");
- do_check_eq(sections.length, 5);
- print("Check that we have no negatives.");
- do_check_false(!!negatives.length);
- print("Check that we have positives.");
- do_check_true(!!positives.length);
- print("Check that we have info.");
- do_check_true(!!infos.length);
-
- do_test_finished();
- });
-}
diff --git a/toolkit/components/places/tests/unit/test_preventive_maintenance_runTasks.js b/toolkit/components/places/tests/unit/test_preventive_maintenance_runTasks.js
deleted file mode 100644
index ebe308f03c..0000000000
--- a/toolkit/components/places/tests/unit/test_preventive_maintenance_runTasks.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/* 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/. */
-
- /**
- * Test preventive maintenance runTasks.
- */
-
-// Include PlacesDBUtils module.
-Components.utils.import("resource://gre/modules/PlacesDBUtils.jsm");
-
-function run_test() {
- do_test_pending();
- PlacesDBUtils.runTasks([PlacesDBUtils.reindex], function(aLog) {
- let sections = [];
- let positives = [];
- let negatives = [];
- let infos = [];
-
- aLog.forEach(function (aMsg) {
- print (aMsg);
- switch (aMsg.substr(0, 1)) {
- case "+":
- positives.push(aMsg);
- break;
- case "-":
- negatives.push(aMsg);
- break;
- case ">":
- sections.push(aMsg);
- break;
- default:
- infos.push(aMsg);
- }
- });
-
- print("Check that we have run all sections.");
- do_check_eq(sections.length, 1);
- print("Check that we have no negatives.");
- do_check_false(!!negatives.length);
- print("Check that we have positives.");
- do_check_true(!!positives.length);
-
- do_test_finished();
- });
-}
diff --git a/toolkit/components/places/tests/unit/test_promiseBookmarksTree.js b/toolkit/components/places/tests/unit/test_promiseBookmarksTree.js
deleted file mode 100644
index 0719a0cd43..0000000000
--- a/toolkit/components/places/tests/unit/test_promiseBookmarksTree.js
+++ /dev/null
@@ -1,256 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function* check_has_child(aParentGuid, aChildGuid) {
- let parentTree = yield PlacesUtils.promiseBookmarksTree(aParentGuid);
- do_check_true("children" in parentTree);
- do_check_true(parentTree.children.find( e => e.guid == aChildGuid ) != null);
-}
-
-function* compareToNode(aItem, aNode, aIsRootItem, aExcludedGuids = []) {
- // itemId==-1 indicates a non-bookmark node, which is unexpected.
- do_check_neq(aNode.itemId, -1);
-
- function check_unset(...aProps) {
- aProps.forEach( p => { do_check_false(p in aItem); } );
- }
- function strict_eq_check(v1, v2) {
- dump("v1: " + v1 + " v2: " + v2 + "\n");
- do_check_eq(typeof v1, typeof v2);
- do_check_eq(v1, v2);
- }
- function compare_prop(aItemProp, aNodeProp = aItemProp, aOptional = false) {
- if (aOptional && aNode[aNodeProp] === null)
- check_unset(aItemProp);
- else
- strict_eq_check(aItem[aItemProp], aNode[aNodeProp]);
- }
- function compare_prop_to_value(aItemProp, aValue, aOptional = true) {
- if (aOptional && aValue === null)
- check_unset(aItemProp);
- else
- strict_eq_check(aItem[aItemProp], aValue);
- }
-
- // Bug 1013053 - bookmarkIndex is unavailable for the query's root
- if (aNode.bookmarkIndex == -1) {
- compare_prop_to_value("index",
- PlacesUtils.bookmarks.getItemIndex(aNode.itemId),
- false);
- }
- else {
- compare_prop("index", "bookmarkIndex");
- }
-
- compare_prop("dateAdded");
- compare_prop("lastModified");
-
- if (aIsRootItem && aNode.itemId != PlacesUtils.placesRootId) {
- do_check_true("parentGuid" in aItem);
- yield check_has_child(aItem.parentGuid, aItem.guid)
- }
- else {
- check_unset("parentGuid");
- }
-
- let expectedAnnos = PlacesUtils.getAnnotationsForItem(aItem.id);
- if (expectedAnnos.length > 0) {
- let annosToString = annos => {
- return annos.map(a => a.name + ":" + a.value).sort().join(",");
- };
- do_check_true(Array.isArray(aItem.annos))
- do_check_eq(annosToString(aItem.annos), annosToString(expectedAnnos));
- }
- else {
- check_unset("annos");
- }
- const BOOKMARK_ONLY_PROPS = ["uri", "iconuri", "tags", "charset", "keyword"];
- const FOLDER_ONLY_PROPS = ["children", "root"];
-
- let nodesCount = 1;
-
- switch (aNode.type) {
- case Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER:
- do_check_eq(aItem.type, PlacesUtils.TYPE_X_MOZ_PLACE_CONTAINER);
- compare_prop("title", "title", true);
- check_unset(...BOOKMARK_ONLY_PROPS);
-
- let expectedChildrenNodes = [];
-
- PlacesUtils.asContainer(aNode);
- if (!aNode.containerOpen)
- aNode.containerOpen = true;
-
- for (let i = 0; i < aNode.childCount; i++) {
- let childNode = aNode.getChild(i);
- if (childNode.itemId == PlacesUtils.tagsFolderId ||
- aExcludedGuids.includes(childNode.bookmarkGuid)) {
- continue;
- }
- expectedChildrenNodes.push(childNode);
- }
-
- if (expectedChildrenNodes.length > 0) {
- do_check_true(Array.isArray(aItem.children));
- do_check_eq(aItem.children.length, expectedChildrenNodes.length);
- for (let i = 0; i < aItem.children.length; i++) {
- nodesCount +=
- yield compareToNode(aItem.children[i], expectedChildrenNodes[i],
- false, aExcludedGuids);
- }
- }
- else {
- check_unset("children");
- }
-
- switch (aItem.id) {
- case PlacesUtils.placesRootId:
- compare_prop_to_value("root", "placesRoot");
- break;
- case PlacesUtils.bookmarksMenuFolderId:
- compare_prop_to_value("root", "bookmarksMenuFolder");
- break;
- case PlacesUtils.toolbarFolderId:
- compare_prop_to_value("root", "toolbarFolder");
- break;
- case PlacesUtils.unfiledBookmarksFolderId:
- compare_prop_to_value("root", "unfiledBookmarksFolder");
- break;
- case PlacesUtils.mobileFolderId:
- compare_prop_to_value("root", "mobileFolder");
- break;
- default:
- check_unset("root");
- }
- break;
- case Ci.nsINavHistoryResultNode.RESULT_TYPE_SEPARATOR:
- do_check_eq(aItem.type, PlacesUtils.TYPE_X_MOZ_PLACE_SEPARATOR);
- check_unset(...BOOKMARK_ONLY_PROPS, ...FOLDER_ONLY_PROPS);
- break;
- default:
- do_check_eq(aItem.type, PlacesUtils.TYPE_X_MOZ_PLACE);
- compare_prop("uri");
- // node.tags's format is "a, b" whilst promiseBoookmarksTree is "a,b"
- if (aNode.tags === null)
- check_unset("tags");
- else
- compare_prop_to_value("tags", aNode.tags.replace(/, /g, ","), false);
-
- if (aNode.icon) {
- let nodeIconData = aNode.icon.replace("moz-anno:favicon:", "");
- compare_prop_to_value("iconuri", nodeIconData);
- }
- else {
- check_unset(aItem.iconuri);
- }
-
- check_unset(...FOLDER_ONLY_PROPS);
-
- let itemURI = uri(aNode.uri);
- compare_prop_to_value("charset",
- yield PlacesUtils.getCharsetForURI(itemURI));
-
- let entry = yield PlacesUtils.keywords.fetch({ url: aNode.uri });
- compare_prop_to_value("keyword", entry ? entry.keyword : null);
-
- if ("title" in aItem)
- compare_prop("title");
- else
- do_check_null(aNode.title);
- }
-
- if (aIsRootItem)
- do_check_eq(aItem.itemsCount, nodesCount);
-
- return nodesCount;
-}
-
-var itemsCount = 0;
-function* new_bookmark(aInfo) {
- ++itemsCount;
- if (!("url" in aInfo))
- aInfo.url = uri("http://test.item." + itemsCount);
-
- if (!("title" in aInfo))
- aInfo.title = "Test Item (bookmark) " + itemsCount;
-
- yield PlacesTransactions.NewBookmark(aInfo).transact();
-}
-
-function* new_folder(aInfo) {
- if (!("title" in aInfo))
- aInfo.title = "Test Item (folder) " + itemsCount;
- return yield PlacesTransactions.NewFolder(aInfo).transact();
-}
-
-// Walks a result nodes tree and test promiseBookmarksTree for each node.
-// DO NOT COPY THIS LOGIC: It is done here to accomplish a more comprehensive
-// test of the API (the entire hierarchy data is available in the very test).
-function* test_promiseBookmarksTreeForEachNode(aNode, aOptions, aExcludedGuids) {
- do_check_true(aNode.bookmarkGuid && aNode.bookmarkGuid.length > 0);
- let item = yield PlacesUtils.promiseBookmarksTree(aNode.bookmarkGuid, aOptions);
- yield* compareToNode(item, aNode, true, aExcludedGuids);
-
- for (let i = 0; i < aNode.childCount; i++) {
- let child = aNode.getChild(i);
- if (child.itemId != PlacesUtils.tagsFolderId)
- yield test_promiseBookmarksTreeForEachNode(child,
- { includeItemIds: true },
- aExcludedGuids);
- }
- return item;
-}
-
-function* test_promiseBookmarksTreeAgainstResult(aItemGuid = "",
- aOptions = { includeItemIds: true },
- aExcludedGuids) {
- let itemId = aItemGuid ?
- yield PlacesUtils.promiseItemId(aItemGuid) : PlacesUtils.placesRootId;
- let node = PlacesUtils.getFolderContents(itemId).root;
- return yield test_promiseBookmarksTreeForEachNode(node, aOptions, aExcludedGuids);
-}
-
-add_task(function* () {
- // Add some bookmarks to cover various use cases.
- yield new_bookmark({ parentGuid: PlacesUtils.bookmarks.toolbarGuid });
- yield new_folder({ parentGuid: PlacesUtils.bookmarks.menuGuid,
- annotations: [{ name: "TestAnnoA", value: "TestVal" },
- { name: "TestAnnoB", value: 0 }]});
- let sepInfo = { parentGuid: PlacesUtils.bookmarks.menuGuid };
- yield PlacesTransactions.NewSeparator(sepInfo).transact();
- let folderGuid = yield new_folder({ parentGuid: PlacesUtils.bookmarks.menuGuid });
- yield new_bookmark({ title: null,
- parentGuid: folderGuid,
- keyword: "test_keyword",
- tags: ["TestTagA", "TestTagB"],
- annotations: [{ name: "TestAnnoA", value: "TestVal2"}]});
- let urlWithCharsetAndFavicon = uri("http://charset.and.favicon");
- yield new_bookmark({ parentGuid: folderGuid, url: urlWithCharsetAndFavicon });
- yield PlacesUtils.setCharsetForURI(urlWithCharsetAndFavicon, "UTF-8");
- yield promiseSetIconForPage(urlWithCharsetAndFavicon, SMALLPNG_DATA_URI);
- // Test the default places root without specifying it.
- yield test_promiseBookmarksTreeAgainstResult();
-
- // Do specify it
- yield test_promiseBookmarksTreeAgainstResult(PlacesUtils.bookmarks.rootGuid);
-
- // Exclude the bookmarks menu.
- // The calllback should be four times - once for the toolbar, once for
- // the bookmark we inserted under, and once for the menu (and not
- // at all for any of its descendants) and once for the unsorted bookmarks
- // folder. However, promiseBookmarksTree is called multiple times, so
- // rather than counting the calls, we count the number of unique items
- // passed in.
- let guidsPassedToExcludeCallback = new Set();
- let placesRootWithoutTheMenu =
- yield test_promiseBookmarksTreeAgainstResult(PlacesUtils.bookmarks.rootGuid, {
- excludeItemsCallback: aItem => {
- guidsPassedToExcludeCallback.add(aItem.guid);
- return aItem.root == "bookmarksMenuFolder";
- },
- includeItemIds: true
- }, [PlacesUtils.bookmarks.menuGuid]);
- do_check_eq(guidsPassedToExcludeCallback.size, 5);
- do_check_eq(placesRootWithoutTheMenu.children.length, 3);
-});
diff --git a/toolkit/components/places/tests/unit/test_resolveNullBookmarkTitles.js b/toolkit/components/places/tests/unit/test_resolveNullBookmarkTitles.js
deleted file mode 100644
index 01fb3eef93..0000000000
--- a/toolkit/components/places/tests/unit/test_resolveNullBookmarkTitles.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function run_test() {
- run_next_test();
-}
-
-add_test(function test_resolveNullBookmarkTitles() {
- let uri1 = uri("http://foo.tld/");
- let uri2 = uri("https://bar.tld/");
-
- PlacesTestUtils.addVisits([
- { uri: uri1, title: "foo title" },
- { uri: uri2, title: "bar title" }
- ]).then(function () {
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.bookmarksMenuFolderId,
- uri1,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- null);
- PlacesUtils.bookmarks.insertBookmark(PlacesUtils.bookmarksMenuFolderId,
- uri2,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- null);
-
- PlacesUtils.tagging.tagURI(uri1, ["tag 1"]);
- PlacesUtils.tagging.tagURI(uri2, ["tag 2"]);
-
- let options = PlacesUtils.history.getNewQueryOptions();
- options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS;
- options.resultType = options.RESULTS_AS_TAG_CONTENTS;
-
- let query = PlacesUtils.history.getNewQuery();
- // if we don't set a tag folder, RESULTS_AS_TAG_CONTENTS will return all
- // tagged URIs
- let root = PlacesUtils.history.executeQuery(query, options).root;
- root.containerOpen = true;
- do_check_eq(root.childCount, 2);
- // actually RESULTS_AS_TAG_CONTENTS return results ordered by place_id DESC
- // so they are reversed
- do_check_eq(root.getChild(0).title, "bar title");
- do_check_eq(root.getChild(1).title, "foo title");
- root.containerOpen = false;
-
- run_next_test();
- });
-});
diff --git a/toolkit/components/places/tests/unit/test_result_sort.js b/toolkit/components/places/tests/unit/test_result_sort.js
deleted file mode 100644
index 35405ac506..0000000000
--- a/toolkit/components/places/tests/unit/test_result_sort.js
+++ /dev/null
@@ -1,139 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-const NHQO = Ci.nsINavHistoryQueryOptions;
-
-/**
- * Waits for onItemVisited notifications to be received.
- */
-function promiseOnItemVisited() {
- let defer = Promise.defer();
- let bookmarksObserver = {
- __proto__: NavBookmarkObserver.prototype,
- onItemVisited: function BO_onItemVisited() {
- PlacesUtils.bookmarks.removeObserver(this);
- // Enqueue to be sure that all onItemVisited notifications ran.
- do_execute_soon(defer.resolve);
- }
- };
- PlacesUtils.bookmarks.addObserver(bookmarksObserver, false);
- return defer.promise;
-}
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* test() {
- let testFolder = PlacesUtils.bookmarks.createFolder(
- PlacesUtils.bookmarks.placesRoot,
- "Result-sort functionality tests root",
- PlacesUtils.bookmarks.DEFAULT_INDEX);
-
- let uri1 = NetUtil.newURI("http://foo.tld/a");
- let uri2 = NetUtil.newURI("http://foo.tld/b");
-
- let id1 = PlacesUtils.bookmarks.insertBookmark(
- testFolder, uri1, PlacesUtils.bookmarks.DEFAULT_INDEX, "b");
- let id2 = PlacesUtils.bookmarks.insertBookmark(
- testFolder, uri2, PlacesUtils.bookmarks.DEFAULT_INDEX, "a");
- // url of id1, title of id2
- let id3 = PlacesUtils.bookmarks.insertBookmark(
- testFolder, uri1, PlacesUtils.bookmarks.DEFAULT_INDEX, "a");
-
- // query with natural order
- let result = PlacesUtils.getFolderContents(testFolder);
- let root = result.root;
-
- do_check_eq(root.childCount, 3);
-
- function checkOrder(a, b, c) {
- do_check_eq(root.getChild(0).itemId, a);
- do_check_eq(root.getChild(1).itemId, b);
- do_check_eq(root.getChild(2).itemId, c);
- }
-
- // natural order
- do_print("Natural order");
- checkOrder(id1, id2, id3);
-
- // title: id3 should precede id2 since we fall-back to URI-based sorting
- do_print("Sort by title asc");
- result.sortingMode = NHQO.SORT_BY_TITLE_ASCENDING;
- checkOrder(id3, id2, id1);
-
- // In reverse
- do_print("Sort by title desc");
- result.sortingMode = NHQO.SORT_BY_TITLE_DESCENDING;
- checkOrder(id1, id2, id3);
-
- // uri sort: id1 should precede id3 since we fall-back to natural order
- do_print("Sort by uri asc");
- result.sortingMode = NHQO.SORT_BY_URI_ASCENDING;
- checkOrder(id1, id3, id2);
-
- // test live update
- do_print("Change bookmark uri liveupdate");
- PlacesUtils.bookmarks.changeBookmarkURI(id1, uri2);
- checkOrder(id3, id1, id2);
- PlacesUtils.bookmarks.changeBookmarkURI(id1, uri1);
- checkOrder(id1, id3, id2);
-
- // keyword sort
- do_print("Sort by keyword asc");
- result.sortingMode = NHQO.SORT_BY_KEYWORD_ASCENDING;
- checkOrder(id3, id2, id1); // no keywords set - falling back to title sort
- yield PlacesUtils.keywords.insert({ url: uri1.spec, keyword: "a" });
- yield PlacesUtils.keywords.insert({ url: uri2.spec, keyword: "z" });
- checkOrder(id3, id1, id2);
-
- // XXXtodo: test history sortings (visit count, visit date)
- // XXXtodo: test different item types once folderId and bookmarkId are merged.
- // XXXtodo: test sortingAnnotation functionality with non-bookmark nodes
-
- do_print("Sort by annotation desc");
- PlacesUtils.annotations.setItemAnnotation(id1, "testAnno", "a", 0, 0);
- PlacesUtils.annotations.setItemAnnotation(id3, "testAnno", "b", 0, 0);
- result.sortingAnnotation = "testAnno";
- result.sortingMode = NHQO.SORT_BY_ANNOTATION_DESCENDING;
-
- // id1 precedes id2 per title-descending fallback
- checkOrder(id3, id1, id2);
-
- // XXXtodo: test dateAdded sort
- // XXXtodo: test lastModified sort
-
- // test live update
- do_print("Annotation liveupdate");
- PlacesUtils.annotations.setItemAnnotation(id1, "testAnno", "c", 0, 0);
- checkOrder(id1, id3, id2);
-
- // Add a visit, then check frecency ordering.
-
- // When the bookmarks service gets onVisit, it asynchronously fetches all
- // items for that visit, and then notifies onItemVisited. Thus we must
- // explicitly wait for that.
- let waitForVisited = promiseOnItemVisited();
- yield PlacesTestUtils.addVisits({ uri: uri2, transition: TRANSITION_TYPED });
- yield waitForVisited;
-
- do_print("Sort by frecency desc");
- result.sortingMode = NHQO.SORT_BY_FRECENCY_DESCENDING;
- for (let i = 0; i < root.childCount; ++i) {
- print(root.getChild(i).uri + " " + root.getChild(i).title);
- }
- // For id1 and id3, since they have same frecency and no visits, fallback
- // to sort by the newest bookmark.
- checkOrder(id2, id3, id1);
- do_print("Sort by frecency asc");
- result.sortingMode = NHQO.SORT_BY_FRECENCY_ASCENDING;
- for (let i = 0; i < root.childCount; ++i) {
- print(root.getChild(i).uri + " " + root.getChild(i).title);
- }
- checkOrder(id1, id3, id2);
-
- root.containerOpen = false;
-});
diff --git a/toolkit/components/places/tests/unit/test_resultsAsVisit_details.js b/toolkit/components/places/tests/unit/test_resultsAsVisit_details.js
deleted file mode 100644
index 8e71ffd0dc..0000000000
--- a/toolkit/components/places/tests/unit/test_resultsAsVisit_details.js
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-
-const {bookmarks, history} = PlacesUtils
-
-add_task(function* test_addVisitCheckFields() {
- let uri = NetUtil.newURI("http://test4.com/");
- yield PlacesTestUtils.addVisits([
- { uri },
- { uri, referrer: uri },
- { uri, transition: history.TRANSITION_TYPED },
- ]);
-
-
- let options = history.getNewQueryOptions();
- let query = history.getNewQuery();
-
- query.uri = uri;
-
-
- // Check RESULTS_AS_VISIT node.
- options.resultType = options.RESULTS_AS_VISIT;
-
- let root = history.executeQuery(query, options).root;
- root.containerOpen = true;
-
- equal(root.childCount, 3);
-
- let child = root.getChild(0);
- equal(child.visitType, history.TRANSITION_LINK, "Visit type should be TRANSITION_LINK");
- equal(child.visitId, 1, "Visit ID should be 1");
- equal(child.fromVisitId, -1, "Should have no referrer visit ID");
-
- child = root.getChild(1);
- equal(child.visitType, history.TRANSITION_LINK, "Visit type should be TRANSITION_LINK");
- equal(child.visitId, 2, "Visit ID should be 2");
- equal(child.fromVisitId, 1, "First visit should be the referring visit");
-
- child = root.getChild(2);
- equal(child.visitType, history.TRANSITION_TYPED, "Visit type should be TRANSITION_TYPED");
- equal(child.visitId, 3, "Visit ID should be 3");
- equal(child.fromVisitId, -1, "Should have no referrer visit ID");
-
- root.containerOpen = false;
-
-
- // Check RESULTS_AS_URI node.
- options.resultType = options.RESULTS_AS_URI;
-
- root = history.executeQuery(query, options).root;
- root.containerOpen = true;
-
- equal(root.childCount, 1);
-
- child = root.getChild(0);
- equal(child.visitType, 0, "Visit type should be 0");
- equal(child.visitId, -1, "Visit ID should be -1");
- equal(child.fromVisitId, -1, "Referrer visit id should be -1");
-
- root.containerOpen = false;
-
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* test_bookmarkFields() {
- let folder = bookmarks.createFolder(bookmarks.placesRoot, "test folder", bookmarks.DEFAULT_INDEX);
- bookmarks.insertBookmark(folder, uri("http://test4.com/"),
- bookmarks.DEFAULT_INDEX, "test4 title");
-
- let root = PlacesUtils.getFolderContents(folder).root;
- equal(root.childCount, 1);
-
- equal(root.visitType, 0, "Visit type should be 0");
- equal(root.visitId, -1, "Visit ID should be -1");
- equal(root.fromVisitId, -1, "Referrer visit id should be -1");
-
- let child = root.getChild(0);
- equal(child.visitType, 0, "Visit type should be 0");
- equal(child.visitId, -1, "Visit ID should be -1");
- equal(child.fromVisitId, -1, "Referrer visit id should be -1");
-
- root.containerOpen = false;
-
- yield bookmarks.eraseEverything();
-});
diff --git a/toolkit/components/places/tests/unit/test_sql_guid_functions.js b/toolkit/components/places/tests/unit/test_sql_guid_functions.js
deleted file mode 100644
index 41e6bab9e7..0000000000
--- a/toolkit/components/places/tests/unit/test_sql_guid_functions.js
+++ /dev/null
@@ -1,106 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * This file tests that the guid function generates a guid of the proper length,
- * with no invalid characters.
- */
-
-/**
- * Checks all our invariants about our guids for a given result.
- *
- * @param aGuid
- * The guid to check.
- */
-function check_invariants(aGuid)
-{
- do_print("Checking guid '" + aGuid + "'");
-
- do_check_valid_places_guid(aGuid);
-}
-
-// Test Functions
-
-function test_guid_invariants()
-{
- const kExpectedChars = 64;
- const kAllowedChars =
- "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_"
- do_check_eq(kAllowedChars.length, kExpectedChars);
- const kGuidLength = 12;
-
- let checkedChars = [];
- for (let i = 0; i < kGuidLength; i++) {
- checkedChars[i] = {};
- for (let j = 0; j < kAllowedChars; j++) {
- checkedChars[i][kAllowedChars[j]] = false;
- }
- }
-
- // We run this until we've seen every character that we expect to see in every
- // position.
- let seenChars = 0;
- let stmt = DBConn().createStatement("SELECT GENERATE_GUID()");
- while (seenChars != (kExpectedChars * kGuidLength)) {
- do_check_true(stmt.executeStep());
- let guid = stmt.getString(0);
- check_invariants(guid);
-
- for (let i = 0; i < guid.length; i++) {
- let character = guid[i];
- if (!checkedChars[i][character]) {
- checkedChars[i][character] = true;
- seenChars++;
- }
- }
- stmt.reset();
- }
- stmt.finalize();
-
- // One last reality check - make sure all of our characters were seen.
- for (let i = 0; i < kGuidLength; i++) {
- for (let j = 0; j < kAllowedChars; j++) {
- do_check_true(checkedChars[i][kAllowedChars[j]]);
- }
- }
-
- run_next_test();
-}
-
-function test_guid_on_background()
-{
- // We should not assert if we execute this asynchronously.
- let stmt = DBConn().createAsyncStatement("SELECT GENERATE_GUID()");
- let checked = false;
- stmt.executeAsync({
- handleResult: function(aResult) {
- try {
- let row = aResult.getNextRow();
- check_invariants(row.getResultByIndex(0));
- do_check_eq(aResult.getNextRow(), null);
- checked = true;
- }
- catch (e) {
- do_throw(e);
- }
- },
- handleCompletion: function(aReason) {
- do_check_eq(aReason, Ci.mozIStorageStatementCallback.REASON_FINISHED);
- do_check_true(checked);
- run_next_test();
- }
- });
- stmt.finalize();
-}
-
-// Test Runner
-
-[
- test_guid_invariants,
- test_guid_on_background,
-].forEach(add_test);
-
-function run_test()
-{
- run_next_test();
-}
diff --git a/toolkit/components/places/tests/unit/test_svg_favicon.js b/toolkit/components/places/tests/unit/test_svg_favicon.js
deleted file mode 100644
index cec40ddef4..0000000000
--- a/toolkit/components/places/tests/unit/test_svg_favicon.js
+++ /dev/null
@@ -1,31 +0,0 @@
-const PAGEURI = NetUtil.newURI("http://deliciousbacon.com/");
-
-add_task(function* () {
- // First, add a history entry or else Places can't save a favicon.
- yield PlacesTestUtils.addVisits({
- uri: PAGEURI,
- transition: TRANSITION_LINK,
- visitDate: Date.now() * 1000
- });
-
- yield new Promise(resolve => {
- function onSetComplete(aURI, aDataLen, aData, aMimeType) {
- equal(aURI.spec, SMALLSVG_DATA_URI.spec, "setFavicon aURI check");
- equal(aDataLen, 263, "setFavicon aDataLen check");
- equal(aMimeType, "image/svg+xml", "setFavicon aMimeType check");
- resolve();
- }
-
- PlacesUtils.favicons.setAndFetchFaviconForPage(PAGEURI, SMALLSVG_DATA_URI,
- false,
- PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
- onSetComplete,
- Services.scriptSecurityManager.getSystemPrincipal());
- });
-
- let data = yield PlacesUtils.promiseFaviconData(PAGEURI.spec);
- equal(data.uri.spec, SMALLSVG_DATA_URI.spec, "getFavicon aURI check");
- equal(data.dataLen, 263, "getFavicon aDataLen check");
- equal(data.mimeType, "image/svg+xml", "getFavicon aMimeType check");
-});
-
diff --git a/toolkit/components/places/tests/unit/test_sync_utils.js b/toolkit/components/places/tests/unit/test_sync_utils.js
deleted file mode 100644
index f8c7e6b58f..0000000000
--- a/toolkit/components/places/tests/unit/test_sync_utils.js
+++ /dev/null
@@ -1,1150 +0,0 @@
-Cu.import("resource://gre/modules/PlacesSyncUtils.jsm");
-Cu.import("resource://testing-common/httpd.js");
-Cu.importGlobalProperties(["crypto", "URLSearchParams"]);
-
-const DESCRIPTION_ANNO = "bookmarkProperties/description";
-const LOAD_IN_SIDEBAR_ANNO = "bookmarkProperties/loadInSidebar";
-const SYNC_PARENT_ANNO = "sync/parent";
-
-function makeGuid() {
- return ChromeUtils.base64URLEncode(crypto.getRandomValues(new Uint8Array(9)), {
- pad: false,
- });
-}
-
-function makeLivemarkServer() {
- let server = new HttpServer();
- server.registerPrefixHandler("/feed/", do_get_file("./livemark.xml"));
- server.start(-1);
- return {
- server,
- get site() {
- let { identity } = server;
- let host = identity.primaryHost.includes(":") ?
- `[${identity.primaryHost}]` : identity.primaryHost;
- return `${identity.primaryScheme}://${host}:${identity.primaryPort}`;
- },
- stopServer() {
- return new Promise(resolve => server.stop(resolve));
- },
- };
-}
-
-function shuffle(array) {
- let results = [];
- for (let i = 0; i < array.length; ++i) {
- let randomIndex = Math.floor(Math.random() * (i + 1));
- results[i] = results[randomIndex];
- results[randomIndex] = array[i];
- }
- return results;
-}
-
-function compareAscending(a, b) {
- if (a > b) {
- return 1;
- }
- if (a < b) {
- return -1;
- }
- return 0;
-}
-
-function assertTagForURLs(tag, urls, message) {
- let taggedURLs = PlacesUtils.tagging.getURIsForTag(tag).map(uri => uri.spec);
- deepEqual(taggedURLs.sort(compareAscending), urls.sort(compareAscending), message);
-}
-
-function assertURLHasTags(url, tags, message) {
- let actualTags = PlacesUtils.tagging.getTagsForURI(uri(url));
- deepEqual(actualTags.sort(compareAscending), tags, message);
-}
-
-var populateTree = Task.async(function* populate(parentGuid, ...items) {
- let guids = {};
-
- for (let index = 0; index < items.length; index++) {
- let item = items[index];
- let guid = makeGuid();
-
- switch (item.kind) {
- case "bookmark":
- case "query":
- yield PlacesUtils.bookmarks.insert({
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: item.url,
- title: item.title,
- parentGuid, guid, index,
- });
- break;
-
- case "separator":
- yield PlacesUtils.bookmarks.insert({
- type: PlacesUtils.bookmarks.TYPE_SEPARATOR,
- parentGuid, guid,
- });
- break;
-
- case "folder":
- yield PlacesUtils.bookmarks.insert({
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: item.title,
- parentGuid, guid,
- });
- if (item.children) {
- Object.assign(guids, yield* populate(guid, ...item.children));
- }
- break;
-
- default:
- throw new Error(`Unsupported item type: ${item.type}`);
- }
-
- if (item.exclude) {
- let itemId = yield PlacesUtils.promiseItemId(guid);
- PlacesUtils.annotations.setItemAnnotation(
- itemId, PlacesUtils.EXCLUDE_FROM_BACKUP_ANNO, "Don't back this up", 0,
- PlacesUtils.annotations.EXPIRE_NEVER);
- }
-
- guids[item.title] = guid;
- }
-
- return guids;
-});
-
-var syncIdToId = Task.async(function* syncIdToId(syncId) {
- let guid = yield PlacesSyncUtils.bookmarks.syncIdToGuid(syncId);
- return PlacesUtils.promiseItemId(guid);
-});
-
-add_task(function* test_order() {
- do_print("Insert some bookmarks");
- let guids = yield populateTree(PlacesUtils.bookmarks.menuGuid, {
- kind: "bookmark",
- title: "childBmk",
- url: "http://getfirefox.com",
- }, {
- kind: "bookmark",
- title: "siblingBmk",
- url: "http://getthunderbird.com",
- }, {
- kind: "folder",
- title: "siblingFolder",
- }, {
- kind: "separator",
- title: "siblingSep",
- });
-
- do_print("Reorder inserted bookmarks");
- {
- let order = [guids.siblingFolder, guids.siblingSep, guids.childBmk,
- guids.siblingBmk];
- yield PlacesSyncUtils.bookmarks.order(PlacesUtils.bookmarks.menuGuid, order);
- let childSyncIds = yield PlacesSyncUtils.bookmarks.fetchChildSyncIds(PlacesUtils.bookmarks.menuGuid);
- deepEqual(childSyncIds, order, "New bookmarks should be reordered according to array");
- }
-
- do_print("Reorder with unspecified children");
- {
- yield PlacesSyncUtils.bookmarks.order(PlacesUtils.bookmarks.menuGuid, [
- guids.siblingSep, guids.siblingBmk,
- ]);
- let childSyncIds = yield PlacesSyncUtils.bookmarks.fetchChildSyncIds(
- PlacesUtils.bookmarks.menuGuid);
- deepEqual(childSyncIds, [guids.siblingSep, guids.siblingBmk,
- guids.siblingFolder, guids.childBmk],
- "Unordered children should be moved to end");
- }
-
- do_print("Reorder with nonexistent children");
- {
- yield PlacesSyncUtils.bookmarks.order(PlacesUtils.bookmarks.menuGuid, [
- guids.childBmk, makeGuid(), guids.siblingBmk, guids.siblingSep,
- makeGuid(), guids.siblingFolder, makeGuid()]);
- let childSyncIds = yield PlacesSyncUtils.bookmarks.fetchChildSyncIds(
- PlacesUtils.bookmarks.menuGuid);
- deepEqual(childSyncIds, [guids.childBmk, guids.siblingBmk, guids.siblingSep,
- guids.siblingFolder], "Nonexistent children should be ignored");
- }
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_changeGuid_invalid() {
- yield rejects(PlacesSyncUtils.bookmarks.changeGuid(makeGuid()),
- "Should require a new GUID");
- yield rejects(PlacesSyncUtils.bookmarks.changeGuid(makeGuid(), "!@#$"),
- "Should reject invalid GUIDs");
- yield rejects(PlacesSyncUtils.bookmarks.changeGuid(makeGuid(), makeGuid()),
- "Should reject nonexistent item GUIDs");
- yield rejects(
- PlacesSyncUtils.bookmarks.changeGuid(PlacesUtils.bookmarks.menuGuid,
- makeGuid()),
- "Should reject roots");
-});
-
-add_task(function* test_changeGuid() {
- let item = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.menuGuid,
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "https://mozilla.org",
- });
- let id = yield PlacesUtils.promiseItemId(item.guid);
-
- let newGuid = makeGuid();
- let result = yield PlacesSyncUtils.bookmarks.changeGuid(item.guid, newGuid);
- equal(result, newGuid, "Should return new GUID");
-
- equal(yield PlacesUtils.promiseItemId(newGuid), id, "Should map ID to new GUID");
- yield rejects(PlacesUtils.promiseItemId(item.guid), "Should not map ID to old GUID");
- equal(yield PlacesUtils.promiseItemGuid(id), newGuid, "Should map new GUID to ID");
-});
-
-add_task(function* test_order_roots() {
- let oldOrder = yield PlacesSyncUtils.bookmarks.fetchChildSyncIds(
- PlacesUtils.bookmarks.rootGuid);
- yield PlacesSyncUtils.bookmarks.order(PlacesUtils.bookmarks.rootGuid,
- shuffle(oldOrder));
- let newOrder = yield PlacesSyncUtils.bookmarks.fetchChildSyncIds(
- PlacesUtils.bookmarks.rootGuid);
- deepEqual(oldOrder, newOrder, "Should ignore attempts to reorder roots");
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_update_tags() {
- do_print("Insert item without tags");
- let item = yield PlacesSyncUtils.bookmarks.insert({
- kind: "bookmark",
- url: "https://mozilla.org",
- syncId: makeGuid(),
- parentSyncId: "menu",
- });
-
- do_print("Add tags");
- {
- let updatedItem = yield PlacesSyncUtils.bookmarks.update({
- syncId: item.syncId,
- tags: ["foo", "bar"],
- });
- deepEqual(updatedItem.tags, ["foo", "bar"], "Should return new tags");
- assertURLHasTags("https://mozilla.org", ["bar", "foo"],
- "Should set new tags for URL");
- }
-
- do_print("Add new tag, remove existing tag");
- {
- let updatedItem = yield PlacesSyncUtils.bookmarks.update({
- syncId: item.syncId,
- tags: ["foo", "baz"],
- });
- deepEqual(updatedItem.tags, ["foo", "baz"], "Should return updated tags");
- assertURLHasTags("https://mozilla.org", ["baz", "foo"],
- "Should update tags for URL");
- assertTagForURLs("bar", [], "Should remove existing tag");
- }
-
- do_print("Tags with whitespace");
- {
- let updatedItem = yield PlacesSyncUtils.bookmarks.update({
- syncId: item.syncId,
- tags: [" leading", "trailing ", " baz ", " "],
- });
- deepEqual(updatedItem.tags, ["leading", "trailing", "baz"],
- "Should return filtered tags");
- assertURLHasTags("https://mozilla.org", ["baz", "leading", "trailing"],
- "Should trim whitespace and filter blank tags");
- }
-
- do_print("Remove all tags");
- {
- let updatedItem = yield PlacesSyncUtils.bookmarks.update({
- syncId: item.syncId,
- tags: null,
- });
- deepEqual(updatedItem.tags, [], "Should return empty tag array");
- assertURLHasTags("https://mozilla.org", [],
- "Should remove all existing tags");
- }
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_update_keyword() {
- do_print("Insert item without keyword");
- let item = yield PlacesSyncUtils.bookmarks.insert({
- kind: "bookmark",
- parentSyncId: "menu",
- url: "https://mozilla.org",
- syncId: makeGuid(),
- });
-
- do_print("Add item keyword");
- {
- let updatedItem = yield PlacesSyncUtils.bookmarks.update({
- syncId: item.syncId,
- keyword: "moz",
- });
- equal(updatedItem.keyword, "moz", "Should return new keyword");
- let entryByKeyword = yield PlacesUtils.keywords.fetch("moz");
- equal(entryByKeyword.url.href, "https://mozilla.org/",
- "Should set new keyword for URL");
- let entryByURL = yield PlacesUtils.keywords.fetch({
- url: "https://mozilla.org",
- });
- equal(entryByURL.keyword, "moz", "Looking up URL should return new keyword");
- }
-
- do_print("Change item keyword");
- {
- let updatedItem = yield PlacesSyncUtils.bookmarks.update({
- syncId: item.syncId,
- keyword: "m",
- });
- equal(updatedItem.keyword, "m", "Should return updated keyword");
- let newEntry = yield PlacesUtils.keywords.fetch("m");
- equal(newEntry.url.href, "https://mozilla.org/", "Should update keyword for URL");
- let oldEntry = yield PlacesUtils.keywords.fetch("moz");
- ok(!oldEntry, "Should remove old keyword");
- }
-
- do_print("Remove existing keyword");
- {
- let updatedItem = yield PlacesSyncUtils.bookmarks.update({
- syncId: item.syncId,
- keyword: null,
- });
- ok(!updatedItem.keyword,
- "Should not include removed keyword in properties");
- let entry = yield PlacesUtils.keywords.fetch({
- url: "https://mozilla.org",
- });
- ok(!entry, "Should remove new keyword from URL");
- }
-
- do_print("Remove keyword for item without keyword");
- {
- yield PlacesSyncUtils.bookmarks.update({
- syncId: item.syncId,
- keyword: null,
- });
- let entry = yield PlacesUtils.keywords.fetch({
- url: "https://mozilla.org",
- });
- ok(!entry,
- "Removing keyword for URL without existing keyword should succeed");
- }
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_update_annos() {
- let guids = yield populateTree(PlacesUtils.bookmarks.menuGuid, {
- kind: "folder",
- title: "folder",
- }, {
- kind: "bookmark",
- title: "bmk",
- url: "https://example.com",
- });
-
- do_print("Add folder description");
- {
- let updatedItem = yield PlacesSyncUtils.bookmarks.update({
- syncId: guids.folder,
- description: "Folder description",
- });
- equal(updatedItem.description, "Folder description",
- "Should return new description");
- let id = yield syncIdToId(updatedItem.syncId);
- equal(PlacesUtils.annotations.getItemAnnotation(id, DESCRIPTION_ANNO),
- "Folder description", "Should set description anno");
- }
-
- do_print("Clear folder description");
- {
- let updatedItem = yield PlacesSyncUtils.bookmarks.update({
- syncId: guids.folder,
- description: null,
- });
- ok(!updatedItem.description, "Should not return cleared description");
- let id = yield syncIdToId(updatedItem.syncId);
- ok(!PlacesUtils.annotations.itemHasAnnotation(id, DESCRIPTION_ANNO),
- "Should remove description anno");
- }
-
- do_print("Add bookmark sidebar anno");
- {
- let updatedItem = yield PlacesSyncUtils.bookmarks.update({
- syncId: guids.bmk,
- loadInSidebar: true,
- });
- ok(updatedItem.loadInSidebar, "Should return sidebar anno");
- let id = yield syncIdToId(updatedItem.syncId);
- ok(PlacesUtils.annotations.itemHasAnnotation(id, LOAD_IN_SIDEBAR_ANNO),
- "Should set sidebar anno for existing bookmark");
- }
-
- do_print("Clear bookmark sidebar anno");
- {
- let updatedItem = yield PlacesSyncUtils.bookmarks.update({
- syncId: guids.bmk,
- loadInSidebar: false,
- });
- ok(!updatedItem.loadInSidebar, "Should not return cleared sidebar anno");
- let id = yield syncIdToId(updatedItem.syncId);
- ok(!PlacesUtils.annotations.itemHasAnnotation(id, LOAD_IN_SIDEBAR_ANNO),
- "Should clear sidebar anno for existing bookmark");
- }
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_update_move_root() {
- do_print("Move root to same parent");
- {
- // This should be a no-op.
- let sameRoot = yield PlacesSyncUtils.bookmarks.update({
- syncId: "menu",
- parentSyncId: "places",
- });
- equal(sameRoot.syncId, "menu",
- "Menu root GUID should not change");
- equal(sameRoot.parentSyncId, "places",
- "Parent Places root GUID should not change");
- }
-
- do_print("Try reparenting root");
- yield rejects(PlacesSyncUtils.bookmarks.update({
- syncId: "menu",
- parentSyncId: "toolbar",
- }));
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_insert() {
- do_print("Insert bookmark");
- {
- let item = yield PlacesSyncUtils.bookmarks.insert({
- kind: "bookmark",
- syncId: makeGuid(),
- parentSyncId: "menu",
- url: "https://example.org",
- });
- let { type } = yield PlacesUtils.bookmarks.fetch({ guid: item.syncId });
- equal(type, PlacesUtils.bookmarks.TYPE_BOOKMARK,
- "Bookmark should have correct type");
- }
-
- do_print("Insert query");
- {
- let item = yield PlacesSyncUtils.bookmarks.insert({
- kind: "query",
- syncId: makeGuid(),
- parentSyncId: "menu",
- url: "place:terms=term&folder=TOOLBAR&queryType=1",
- folder: "Saved search",
- });
- let { type } = yield PlacesUtils.bookmarks.fetch({ guid: item.syncId });
- equal(type, PlacesUtils.bookmarks.TYPE_BOOKMARK,
- "Queries should be stored as bookmarks");
- }
-
- do_print("Insert folder");
- {
- let item = yield PlacesSyncUtils.bookmarks.insert({
- kind: "folder",
- syncId: makeGuid(),
- parentSyncId: "menu",
- title: "New folder",
- });
- let { type } = yield PlacesUtils.bookmarks.fetch({ guid: item.syncId });
- equal(type, PlacesUtils.bookmarks.TYPE_FOLDER,
- "Folder should have correct type");
- }
-
- do_print("Insert separator");
- {
- let item = yield PlacesSyncUtils.bookmarks.insert({
- kind: "separator",
- syncId: makeGuid(),
- parentSyncId: "menu",
- });
- let { type } = yield PlacesUtils.bookmarks.fetch({ guid: item.syncId });
- equal(type, PlacesUtils.bookmarks.TYPE_SEPARATOR,
- "Separator should have correct type");
- }
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_insert_livemark() {
- let { site, stopServer } = makeLivemarkServer();
-
- try {
- do_print("Insert livemark with feed URL");
- {
- let livemark = yield PlacesSyncUtils.bookmarks.insert({
- kind: "livemark",
- syncId: makeGuid(),
- feed: site + "/feed/1",
- parentSyncId: "menu",
- });
- let bmk = yield PlacesUtils.bookmarks.fetch({
- guid: yield PlacesSyncUtils.bookmarks.syncIdToGuid(livemark.syncId),
- })
- equal(bmk.type, PlacesUtils.bookmarks.TYPE_FOLDER,
- "Livemarks should be stored as folders");
- }
-
- let livemarkSyncId;
- do_print("Insert livemark with site and feed URLs");
- {
- let livemark = yield PlacesSyncUtils.bookmarks.insert({
- kind: "livemark",
- syncId: makeGuid(),
- site,
- feed: site + "/feed/1",
- parentSyncId: "menu",
- });
- livemarkSyncId = livemark.syncId;
- }
-
- do_print("Try inserting livemark into livemark");
- {
- let livemark = yield PlacesSyncUtils.bookmarks.insert({
- kind: "livemark",
- syncId: makeGuid(),
- site,
- feed: site + "/feed/1",
- parentSyncId: livemarkSyncId,
- });
- ok(!livemark, "Should not insert livemark as child of livemark");
- }
- } finally {
- yield stopServer();
- }
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_update_livemark() {
- let { site, stopServer } = makeLivemarkServer();
- let feedURI = uri(site + "/feed/1");
-
- try {
- // We shouldn't reinsert the livemark if the URLs are the same.
- do_print("Update livemark with same URLs");
- {
- let livemark = yield PlacesUtils.livemarks.addLivemark({
- parentGuid: PlacesUtils.bookmarks.menuGuid,
- feedURI,
- siteURI: uri(site),
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- });
-
- yield PlacesSyncUtils.bookmarks.update({
- syncId: livemark.guid,
- feed: feedURI,
- });
- // `nsLivemarkService` returns references to `Livemark` instances, so we
- // can compare them with `==` to make sure they haven't been replaced.
- equal(yield PlacesUtils.livemarks.getLivemark({
- guid: livemark.guid,
- }), livemark, "Livemark with same feed URL should not be replaced");
-
- yield PlacesSyncUtils.bookmarks.update({
- syncId: livemark.guid,
- site,
- });
- equal(yield PlacesUtils.livemarks.getLivemark({
- guid: livemark.guid,
- }), livemark, "Livemark with same site URL should not be replaced");
-
- yield PlacesSyncUtils.bookmarks.update({
- syncId: livemark.guid,
- feed: feedURI,
- site,
- });
- equal(yield PlacesUtils.livemarks.getLivemark({
- guid: livemark.guid,
- }), livemark, "Livemark with same feed and site URLs should not be replaced");
- }
-
- do_print("Change livemark feed URL");
- {
- let livemark = yield PlacesUtils.livemarks.addLivemark({
- parentGuid: PlacesUtils.bookmarks.menuGuid,
- feedURI,
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- });
-
- // Since we're reinserting, we need to pass all properties required
- // for a new livemark. `update` won't merge the old and new ones.
- yield rejects(PlacesSyncUtils.bookmarks.update({
- syncId: livemark.guid,
- feed: site + "/feed/2",
- }), "Reinserting livemark with changed feed URL requires full record");
-
- let newLivemark = yield PlacesSyncUtils.bookmarks.update({
- kind: "livemark",
- parentSyncId: "menu",
- syncId: livemark.guid,
- feed: site + "/feed/2",
- });
- equal(newLivemark.syncId, livemark.guid,
- "GUIDs should match for reinserted livemark with changed feed URL");
- equal(newLivemark.feed.href, site + "/feed/2",
- "Reinserted livemark should have changed feed URI");
- }
-
- do_print("Add livemark site URL");
- {
- let livemark = yield PlacesUtils.livemarks.addLivemark({
- parentGuid: PlacesUtils.bookmarks.menuGuid,
- feedURI,
- });
- ok(livemark.feedURI.equals(feedURI), "Livemark feed URI should match");
- ok(!livemark.siteURI, "Livemark should not have site URI");
-
- yield rejects(PlacesSyncUtils.bookmarks.update({
- syncId: livemark.guid,
- site,
- }), "Reinserting livemark with new site URL requires full record");
-
- let newLivemark = yield PlacesSyncUtils.bookmarks.update({
- kind: "livemark",
- parentSyncId: "menu",
- syncId: livemark.guid,
- feed: feedURI,
- site,
- });
- notEqual(newLivemark, livemark,
- "Livemark with new site URL should replace old livemark");
- equal(newLivemark.syncId, livemark.guid,
- "GUIDs should match for reinserted livemark with new site URL");
- equal(newLivemark.site.href, site + "/",
- "Reinserted livemark should have new site URI");
- equal(newLivemark.feed.href, feedURI.spec,
- "Reinserted livemark with new site URL should have same feed URI");
- }
-
- do_print("Remove livemark site URL");
- {
- let livemark = yield PlacesUtils.livemarks.addLivemark({
- parentGuid: PlacesUtils.bookmarks.menuGuid,
- feedURI,
- siteURI: uri(site),
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- });
-
- yield rejects(PlacesSyncUtils.bookmarks.update({
- syncId: livemark.guid,
- site: null,
- }), "Reinserting livemark witout site URL requires full record");
-
- let newLivemark = yield PlacesSyncUtils.bookmarks.update({
- kind: "livemark",
- parentSyncId: "menu",
- syncId: livemark.guid,
- feed: feedURI,
- site: null,
- });
- notEqual(newLivemark, livemark,
- "Livemark without site URL should replace old livemark");
- equal(newLivemark.syncId, livemark.guid,
- "GUIDs should match for reinserted livemark without site URL");
- ok(!newLivemark.site, "Reinserted livemark should not have site URI");
- }
-
- do_print("Change livemark site URL");
- {
- let livemark = yield PlacesUtils.livemarks.addLivemark({
- parentGuid: PlacesUtils.bookmarks.menuGuid,
- feedURI,
- siteURI: uri(site),
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- });
-
- yield rejects(PlacesSyncUtils.bookmarks.update({
- syncId: livemark.guid,
- site: site + "/new",
- }), "Reinserting livemark with changed site URL requires full record");
-
- let newLivemark = yield PlacesSyncUtils.bookmarks.update({
- kind: "livemark",
- parentSyncId: "menu",
- syncId: livemark.guid,
- feed:feedURI,
- site: site + "/new",
- });
- notEqual(newLivemark, livemark,
- "Livemark with changed site URL should replace old livemark");
- equal(newLivemark.syncId, livemark.guid,
- "GUIDs should match for reinserted livemark with changed site URL");
- equal(newLivemark.site.href, site + "/new",
- "Reinserted livemark should have changed site URI");
- }
-
- // Livemarks are stored as folders, but have different kinds. We should
- // remove the folder and insert a livemark with the same GUID instead of
- // trying to update the folder in-place.
- do_print("Replace folder with livemark");
- {
- let folder = yield PlacesUtils.bookmarks.insert({
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- parentGuid: PlacesUtils.bookmarks.menuGuid,
- title: "Plain folder",
- });
- let livemark = yield PlacesSyncUtils.bookmarks.update({
- kind: "livemark",
- parentSyncId: "menu",
- syncId: folder.guid,
- feed: feedURI,
- });
- equal(livemark.guid, folder.syncId,
- "Livemark should have same GUID as replaced folder");
- }
- } finally {
- yield stopServer();
- }
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_insert_tags() {
- yield Promise.all([{
- kind: "bookmark",
- url: "https://example.com",
- syncId: makeGuid(),
- parentSyncId: "menu",
- tags: ["foo", "bar"],
- }, {
- kind: "bookmark",
- url: "https://example.org",
- syncId: makeGuid(),
- parentSyncId: "toolbar",
- tags: ["foo", "baz"],
- }, {
- kind: "query",
- url: "place:queryType=1&sort=12&maxResults=10",
- syncId: makeGuid(),
- parentSyncId: "toolbar",
- folder: "bar",
- tags: ["baz", "qux"],
- title: "bar",
- }].map(info => PlacesSyncUtils.bookmarks.insert(info)));
-
- assertTagForURLs("foo", ["https://example.com/", "https://example.org/"],
- "2 URLs with new tag");
- assertTagForURLs("bar", ["https://example.com/"], "1 URL with existing tag");
- assertTagForURLs("baz", ["https://example.org/",
- "place:queryType=1&sort=12&maxResults=10"],
- "Should support tagging URLs and tag queries");
- assertTagForURLs("qux", ["place:queryType=1&sort=12&maxResults=10"],
- "Should support tagging tag queries");
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_insert_tags_whitespace() {
- do_print("Untrimmed and blank tags");
- let taggedBlanks = yield PlacesSyncUtils.bookmarks.insert({
- kind: "bookmark",
- url: "https://example.org",
- syncId: makeGuid(),
- parentSyncId: "menu",
- tags: [" untrimmed ", " ", "taggy"],
- });
- deepEqual(taggedBlanks.tags, ["untrimmed", "taggy"],
- "Should not return empty tags");
- assertURLHasTags("https://example.org/", ["taggy", "untrimmed"],
- "Should set trimmed tags and ignore dupes");
-
- do_print("Dupe tags");
- let taggedDupes = yield PlacesSyncUtils.bookmarks.insert({
- kind: "bookmark",
- url: "https://example.net",
- syncId: makeGuid(),
- parentSyncId: "toolbar",
- tags: [" taggy", "taggy ", " taggy ", "taggy"],
- });
- deepEqual(taggedDupes.tags, ["taggy", "taggy", "taggy", "taggy"],
- "Should return trimmed and dupe tags");
- assertURLHasTags("https://example.net/", ["taggy"],
- "Should ignore dupes when setting tags");
-
- assertTagForURLs("taggy", ["https://example.net/", "https://example.org/"],
- "Should exclude falsy tags");
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_insert_keyword() {
- do_print("Insert item with new keyword");
- {
- yield PlacesSyncUtils.bookmarks.insert({
- kind: "bookmark",
- parentSyncId: "menu",
- url: "https://example.com",
- keyword: "moz",
- syncId: makeGuid(),
- });
- let entry = yield PlacesUtils.keywords.fetch("moz");
- equal(entry.url.href, "https://example.com/",
- "Should add keyword for item");
- }
-
- do_print("Insert item with existing keyword");
- {
- yield PlacesSyncUtils.bookmarks.insert({
- kind: "bookmark",
- parentSyncId: "menu",
- url: "https://mozilla.org",
- keyword: "moz",
- syncId: makeGuid(),
- });
- let entry = yield PlacesUtils.keywords.fetch("moz");
- equal(entry.url.href, "https://mozilla.org/",
- "Should reassign keyword to new item");
- }
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_insert_annos() {
- do_print("Bookmark with description");
- let descBmk = yield PlacesSyncUtils.bookmarks.insert({
- kind: "bookmark",
- url: "https://example.com",
- syncId: makeGuid(),
- parentSyncId: "menu",
- description: "Bookmark description",
- });
- {
- equal(descBmk.description, "Bookmark description",
- "Should return new bookmark description");
- let id = yield syncIdToId(descBmk.syncId);
- equal(PlacesUtils.annotations.getItemAnnotation(id, DESCRIPTION_ANNO),
- "Bookmark description", "Should set new bookmark description");
- }
-
- do_print("Folder with description");
- let descFolder = yield PlacesSyncUtils.bookmarks.insert({
- kind: "folder",
- syncId: makeGuid(),
- parentSyncId: "menu",
- description: "Folder description",
- });
- {
- equal(descFolder.description, "Folder description",
- "Should return new folder description");
- let id = yield syncIdToId(descFolder.syncId);
- equal(PlacesUtils.annotations.getItemAnnotation(id, DESCRIPTION_ANNO),
- "Folder description", "Should set new folder description");
- }
-
- do_print("Bookmark with sidebar anno");
- let sidebarBmk = yield PlacesSyncUtils.bookmarks.insert({
- kind: "bookmark",
- url: "https://example.com",
- syncId: makeGuid(),
- parentSyncId: "menu",
- loadInSidebar: true,
- });
- {
- ok(sidebarBmk.loadInSidebar, "Should return sidebar anno for new bookmark");
- let id = yield syncIdToId(sidebarBmk.syncId);
- ok(PlacesUtils.annotations.itemHasAnnotation(id, LOAD_IN_SIDEBAR_ANNO),
- "Should set sidebar anno for new bookmark");
- }
-
- do_print("Bookmark without sidebar anno");
- let noSidebarBmk = yield PlacesSyncUtils.bookmarks.insert({
- kind: "bookmark",
- url: "https://example.org",
- syncId: makeGuid(),
- parentSyncId: "toolbar",
- loadInSidebar: false,
- });
- {
- ok(!noSidebarBmk.loadInSidebar,
- "Should not return sidebar anno for new bookmark");
- let id = yield syncIdToId(noSidebarBmk.syncId);
- ok(!PlacesUtils.annotations.itemHasAnnotation(id, LOAD_IN_SIDEBAR_ANNO),
- "Should not set sidebar anno for new bookmark");
- }
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_insert_tag_query() {
- let tagFolder = -1;
-
- do_print("Insert tag query for new tag");
- {
- deepEqual(PlacesUtils.tagging.allTags, [], "New tag should not exist yet");
- let query = yield PlacesSyncUtils.bookmarks.insert({
- kind: "query",
- syncId: makeGuid(),
- parentSyncId: "toolbar",
- url: "place:type=7&folder=90",
- folder: "taggy",
- title: "Tagged stuff",
- });
- notEqual(query.url.href, "place:type=7&folder=90",
- "Tag query URL for new tag should differ");
-
- [, tagFolder] = /\bfolder=(\d+)\b/.exec(query.url.pathname);
- ok(tagFolder > 0, "New tag query URL should contain valid folder");
- deepEqual(PlacesUtils.tagging.allTags, ["taggy"], "New tag should exist");
- }
-
- do_print("Insert tag query for existing tag");
- {
- let url = "place:type=7&folder=90&maxResults=15";
- let query = yield PlacesSyncUtils.bookmarks.insert({
- kind: "query",
- url,
- folder: "taggy",
- title: "Sorted and tagged",
- syncId: makeGuid(),
- parentSyncId: "menu",
- });
- notEqual(query.url.href, url, "Tag query URL for existing tag should differ");
- let params = new URLSearchParams(query.url.pathname);
- equal(params.get("type"), "7", "Should preserve query type");
- equal(params.get("maxResults"), "15", "Should preserve additional params");
- equal(params.get("folder"), tagFolder, "Should update tag folder");
- deepEqual(PlacesUtils.tagging.allTags, ["taggy"], "Should not duplicate existing tags");
- }
-
- do_print("Use the public tagging API to ensure we added the tag correctly");
- {
- yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.menuGuid,
- type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
- url: "https://mozilla.org",
- title: "Mozilla",
- });
- PlacesUtils.tagging.tagURI(uri("https://mozilla.org"), ["taggy"]);
- assertURLHasTags("https://mozilla.org/", ["taggy"],
- "Should set tags using the tagging API");
- }
-
- do_print("Removing the tag should clean up the tag folder");
- {
- PlacesUtils.tagging.untagURI(uri("https://mozilla.org"), null);
- deepEqual(PlacesUtils.tagging.allTags, [],
- "Should remove tag folder once last item is untagged");
- }
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_insert_orphans() {
- let grandParentGuid = makeGuid();
- let parentGuid = makeGuid();
- let childGuid = makeGuid();
- let childId;
-
- do_print("Insert an orphaned child");
- {
- let child = yield PlacesSyncUtils.bookmarks.insert({
- kind: "bookmark",
- parentSyncId: parentGuid,
- syncId: childGuid,
- url: "https://mozilla.org",
- });
- equal(child.syncId, childGuid,
- "Should insert orphan with requested GUID");
- equal(child.parentSyncId, "unfiled",
- "Should reparent orphan to unfiled");
-
- childId = yield PlacesUtils.promiseItemId(childGuid);
- equal(PlacesUtils.annotations.getItemAnnotation(childId, SYNC_PARENT_ANNO),
- parentGuid, "Should set anno to missing parent GUID");
- }
-
- do_print("Insert the grandparent");
- {
- yield PlacesSyncUtils.bookmarks.insert({
- kind: "folder",
- parentSyncId: "menu",
- syncId: grandParentGuid,
- });
- equal(PlacesUtils.annotations.getItemAnnotation(childId, SYNC_PARENT_ANNO),
- parentGuid, "Child should still have orphan anno");
- }
-
- // Note that only `PlacesSyncUtils` reparents orphans, though Sync adds an
- // observer that removes the orphan anno if the orphan is manually moved.
- do_print("Insert the missing parent");
- {
- let parent = yield PlacesSyncUtils.bookmarks.insert({
- kind: "folder",
- parentSyncId: grandParentGuid,
- syncId: parentGuid,
- });
- equal(parent.syncId, parentGuid, "Should insert parent with requested GUID");
- equal(parent.parentSyncId, grandParentGuid,
- "Parent should be child of grandparent");
- ok(!PlacesUtils.annotations.itemHasAnnotation(childId, SYNC_PARENT_ANNO),
- "Orphan anno should be removed after reparenting");
-
- let child = yield PlacesUtils.bookmarks.fetch({ guid: childGuid });
- equal(child.parentGuid, parentGuid,
- "Should reparent child after inserting missing parent");
- }
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_fetch() {
- let folder = yield PlacesSyncUtils.bookmarks.insert({
- syncId: makeGuid(),
- parentSyncId: "menu",
- kind: "folder",
- description: "Folder description",
- });
- let bmk = yield PlacesSyncUtils.bookmarks.insert({
- syncId: makeGuid(),
- parentSyncId: "menu",
- kind: "bookmark",
- url: "https://example.com",
- description: "Bookmark description",
- loadInSidebar: true,
- tags: ["taggy"],
- });
- let folderBmk = yield PlacesSyncUtils.bookmarks.insert({
- syncId: makeGuid(),
- parentSyncId: folder.syncId,
- kind: "bookmark",
- url: "https://example.org",
- keyword: "kw",
- });
- let folderSep = yield PlacesSyncUtils.bookmarks.insert({
- syncId: makeGuid(),
- parentSyncId: folder.syncId,
- kind: "separator",
- });
- let tagQuery = yield PlacesSyncUtils.bookmarks.insert({
- kind: "query",
- syncId: makeGuid(),
- parentSyncId: "toolbar",
- url: "place:type=7&folder=90",
- folder: "taggy",
- title: "Tagged stuff",
- });
- let [, tagFolderId] = /\bfolder=(\d+)\b/.exec(tagQuery.url.pathname);
- let smartBmk = yield PlacesSyncUtils.bookmarks.insert({
- kind: "query",
- syncId: makeGuid(),
- parentSyncId: "toolbar",
- url: "place:folder=TOOLBAR",
- query: "BookmarksToolbar",
- title: "Bookmarks toolbar query",
- });
-
- do_print("Fetch empty folder with description");
- {
- let item = yield PlacesSyncUtils.bookmarks.fetch(folder.syncId);
- deepEqual(item, {
- syncId: folder.syncId,
- kind: "folder",
- parentSyncId: "menu",
- description: "Folder description",
- childSyncIds: [folderBmk.syncId, folderSep.syncId],
- parentTitle: "Bookmarks Menu",
- title: "",
- }, "Should include description, children, title, and parent title in folder");
- }
-
- do_print("Fetch bookmark with description, sidebar anno, and tags");
- {
- let item = yield PlacesSyncUtils.bookmarks.fetch(bmk.syncId);
- deepEqual(Object.keys(item).sort(), ["syncId", "kind", "parentSyncId",
- "url", "tags", "description", "loadInSidebar", "parentTitle", "title"].sort(),
- "Should include bookmark-specific properties");
- equal(item.syncId, bmk.syncId, "Sync ID should match");
- equal(item.url.href, "https://example.com/", "Should return URL");
- equal(item.parentSyncId, "menu", "Should return parent sync ID");
- deepEqual(item.tags, ["taggy"], "Should return tags");
- equal(item.description, "Bookmark description", "Should return bookmark description");
- strictEqual(item.loadInSidebar, true, "Should return sidebar anno");
- equal(item.parentTitle, "Bookmarks Menu", "Should return parent title");
- strictEqual(item.title, "", "Should return empty title");
- }
-
- do_print("Fetch bookmark with keyword; without parent title or annos");
- {
- let item = yield PlacesSyncUtils.bookmarks.fetch(folderBmk.syncId);
- deepEqual(Object.keys(item).sort(), ["syncId", "kind", "parentSyncId",
- "url", "keyword", "tags", "loadInSidebar", "parentTitle", "title"].sort(),
- "Should omit blank bookmark-specific properties");
- strictEqual(item.loadInSidebar, false, "Should not load bookmark in sidebar");
- deepEqual(item.tags, [], "Tags should be empty");
- equal(item.keyword, "kw", "Should return keyword");
- strictEqual(item.parentTitle, "", "Should include parent title even if empty");
- strictEqual(item.title, "", "Should include bookmark title even if empty");
- }
-
- do_print("Fetch separator");
- {
- let item = yield PlacesSyncUtils.bookmarks.fetch(folderSep.syncId);
- strictEqual(item.index, 1, "Should return separator position");
- }
-
- do_print("Fetch tag query");
- {
- let item = yield PlacesSyncUtils.bookmarks.fetch(tagQuery.syncId);
- deepEqual(Object.keys(item).sort(), ["syncId", "kind", "parentSyncId",
- "url", "title", "folder", "parentTitle"].sort(),
- "Should include query-specific properties");
- equal(item.url.href, `place:type=7&folder=${tagFolderId}`, "Should not rewrite outgoing tag queries");
- equal(item.folder, "taggy", "Should return tag name for tag queries");
- }
-
- do_print("Fetch smart bookmark");
- {
- let item = yield PlacesSyncUtils.bookmarks.fetch(smartBmk.syncId);
- deepEqual(Object.keys(item).sort(), ["syncId", "kind", "parentSyncId",
- "url", "title", "query", "parentTitle"].sort(),
- "Should include smart bookmark-specific properties");
- equal(item.query, "BookmarksToolbar", "Should return query name for smart bookmarks");
- }
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
-
-add_task(function* test_fetch_livemark() {
- let { site, stopServer } = makeLivemarkServer();
-
- try {
- do_print("Create livemark");
- let livemark = yield PlacesUtils.livemarks.addLivemark({
- parentGuid: PlacesUtils.bookmarks.menuGuid,
- feedURI: uri(site + "/feed/1"),
- siteURI: uri(site),
- index: PlacesUtils.bookmarks.DEFAULT_INDEX,
- });
- PlacesUtils.annotations.setItemAnnotation(livemark.id, DESCRIPTION_ANNO,
- "Livemark description", 0, PlacesUtils.annotations.EXPIRE_NEVER);
-
- do_print("Fetch livemark");
- let item = yield PlacesSyncUtils.bookmarks.fetch(livemark.guid);
- deepEqual(Object.keys(item).sort(), ["syncId", "kind", "parentSyncId",
- "description", "feed", "site", "parentTitle", "title"].sort(),
- "Should include livemark-specific properties");
- equal(item.description, "Livemark description", "Should return description");
- equal(item.feed.href, site + "/feed/1", "Should return feed URL");
- equal(item.site.href, site + "/", "Should return site URL");
- strictEqual(item.title, "", "Should include livemark title even if empty");
- } finally {
- yield stopServer();
- }
-
- yield PlacesUtils.bookmarks.eraseEverything();
-});
diff --git a/toolkit/components/places/tests/unit/test_tag_autocomplete_search.js b/toolkit/components/places/tests/unit/test_tag_autocomplete_search.js
deleted file mode 100644
index 92930e329e..0000000000
--- a/toolkit/components/places/tests/unit/test_tag_autocomplete_search.js
+++ /dev/null
@@ -1,137 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-var current_test = 0;
-
-function AutoCompleteInput(aSearches) {
- this.searches = aSearches;
-}
-AutoCompleteInput.prototype = {
- constructor: AutoCompleteInput,
-
- searches: null,
-
- minResultsForPopup: 0,
- timeout: 10,
- searchParam: "",
- textValue: "",
- disableAutoComplete: false,
- completeDefaultIndex: false,
-
- get searchCount() {
- return this.searches.length;
- },
-
- getSearchAt: function(aIndex) {
- return this.searches[aIndex];
- },
-
- onSearchBegin: function() {},
- onSearchComplete: function() {},
-
- popupOpen: false,
-
- popup: {
- setSelectedIndex: function(aIndex) {},
- invalidate: function() {},
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompletePopup))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
- },
-
- // nsISupports implementation
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIAutoCompleteInput))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
-}
-
-// Get tagging service
-try {
- var tagssvc = Cc["@mozilla.org/browser/tagging-service;1"].
- getService(Ci.nsITaggingService);
-} catch (ex) {
- do_throw("Could not get tagging service\n");
-}
-
-function ensure_tag_results(results, searchTerm)
-{
- var controller = Cc["@mozilla.org/autocomplete/controller;1"].
- getService(Ci.nsIAutoCompleteController);
-
- // Make an AutoCompleteInput that uses our searches
- // and confirms results on search complete
- var input = new AutoCompleteInput(["places-tag-autocomplete"]);
-
- controller.input = input;
-
- var numSearchesStarted = 0;
- input.onSearchBegin = function input_onSearchBegin() {
- numSearchesStarted++;
- do_check_eq(numSearchesStarted, 1);
- };
-
- input.onSearchComplete = function input_onSearchComplete() {
- do_check_eq(numSearchesStarted, 1);
- if (results.length)
- do_check_eq(controller.searchStatus,
- Ci.nsIAutoCompleteController.STATUS_COMPLETE_MATCH);
- else
- do_check_eq(controller.searchStatus,
- Ci.nsIAutoCompleteController.STATUS_COMPLETE_NO_MATCH);
-
- do_check_eq(controller.matchCount, results.length);
- for (var i=0; i<controller.matchCount; i++) {
- do_check_eq(controller.getValueAt(i), results[i]);
- }
-
- if (current_test < (tests.length - 1)) {
- current_test++;
- tests[current_test]();
- }
- else {
- // finish once all tests have run
- do_test_finished();
- }
- };
-
- controller.startSearch(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 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() {
- // Search is asynchronous, so don't let the test finish immediately
- do_test_pending();
-
- tagssvc.tagURI(uri1, ["bar", "Baz", "boo", "*nix"]);
-
- tests[0]();
-}
diff --git a/toolkit/components/places/tests/unit/test_tagging.js b/toolkit/components/places/tests/unit/test_tagging.js
deleted file mode 100644
index ccb2870502..0000000000
--- a/toolkit/components/places/tests/unit/test_tagging.js
+++ /dev/null
@@ -1,189 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-// Notice we use createInstance because later we will have to terminate the
-// service and restart it.
-var tagssvc = Cc["@mozilla.org/browser/tagging-service;1"].
- createInstance().QueryInterface(Ci.nsITaggingService);
-
-function run_test() {
- var options = PlacesUtils.history.getNewQueryOptions();
- var query = PlacesUtils.history.getNewQuery();
-
- query.setFolders([PlacesUtils.tagsFolderId], 1);
- var result = PlacesUtils.history.executeQuery(query, options);
- var tagRoot = result.root;
- tagRoot.containerOpen = true;
-
- do_check_eq(tagRoot.childCount, 0);
-
- var uri1 = uri("http://foo.tld/");
- var uri2 = uri("https://bar.tld/");
-
- // this also tests that the multiple folders are not created for the same tag
- tagssvc.tagURI(uri1, ["tag 1"]);
- tagssvc.tagURI(uri2, ["tag 1"]);
- do_check_eq(tagRoot.childCount, 1);
-
- var tag1node = tagRoot.getChild(0)
- .QueryInterface(Ci.nsINavHistoryContainerResultNode);
- var tag1itemId = tag1node.itemId;
-
- do_check_eq(tag1node.title, "tag 1");
- tag1node.containerOpen = true;
- do_check_eq(tag1node.childCount, 2);
-
- // Tagging the same url twice (or even thrice!) with the same tag should be a
- // no-op
- tagssvc.tagURI(uri1, ["tag 1"]);
- do_check_eq(tag1node.childCount, 2);
- tagssvc.tagURI(uri1, [tag1itemId]);
- do_check_eq(tag1node.childCount, 2);
- do_check_eq(tagRoot.childCount, 1);
-
- // also tests bug 407575
- tagssvc.tagURI(uri1, [tag1itemId, "tag 1", "tag 2", "Tag 1", "Tag 2"]);
- do_check_eq(tagRoot.childCount, 2);
- do_check_eq(tag1node.childCount, 2);
-
- // test getTagsForURI
- var uri1tags = tagssvc.getTagsForURI(uri1);
- do_check_eq(uri1tags.length, 2);
- do_check_eq(uri1tags[0], "Tag 1");
- do_check_eq(uri1tags[1], "Tag 2");
- var uri2tags = tagssvc.getTagsForURI(uri2);
- do_check_eq(uri2tags.length, 1);
- do_check_eq(uri2tags[0], "Tag 1");
-
- // test getURIsForTag
- var tag1uris = tagssvc.getURIsForTag("tag 1");
- do_check_eq(tag1uris.length, 2);
- do_check_true(tag1uris[0].equals(uri1));
- do_check_true(tag1uris[1].equals(uri2));
-
- // test allTags attribute
- var allTags = tagssvc.allTags;
- do_check_eq(allTags.length, 2);
- do_check_eq(allTags[0], "Tag 1");
- do_check_eq(allTags[1], "Tag 2");
-
- // test untagging
- tagssvc.untagURI(uri1, ["tag 1"]);
- do_check_eq(tag1node.childCount, 1);
-
- // removing the last uri from a tag should remove the tag-container
- tagssvc.untagURI(uri2, ["tag 1"]);
- do_check_eq(tagRoot.childCount, 1);
-
- // cleanup
- tag1node.containerOpen = false;
-
- // get array of tag folder ids => title
- // for testing tagging with mixed folder ids and tags
- var child = tagRoot.getChild(0);
- var tagId = child.itemId;
- var tagTitle = child.title;
-
- // test mixed id/name tagging
- // as well as non-id numeric tags
- var uri3 = uri("http://testuri/3");
- tagssvc.tagURI(uri3, [tagId, "tag 3", "456"]);
- var tags = tagssvc.getTagsForURI(uri3);
- do_check_true(tags.includes(tagTitle));
- do_check_true(tags.includes("tag 3"));
- do_check_true(tags.includes("456"));
-
- // test mixed id/name tagging
- tagssvc.untagURI(uri3, [tagId, "tag 3", "456"]);
- tags = tagssvc.getTagsForURI(uri3);
- do_check_eq(tags.length, 0);
-
- // Terminate tagging service, fire up a new instance and check that existing
- // tags are there. This will ensure that any internal caching system is
- // correctly filled at startup and we are not losing previously existing tags.
- var uri4 = uri("http://testuri/4");
- tagssvc.tagURI(uri4, [tagId, "tag 3", "456"]);
- tagssvc = null;
- tagssvc = Cc["@mozilla.org/browser/tagging-service;1"].
- getService(Ci.nsITaggingService);
- var uri4Tags = tagssvc.getTagsForURI(uri4);
- do_check_eq(uri4Tags.length, 3);
- do_check_true(uri4Tags.includes(tagTitle));
- do_check_true(uri4Tags.includes("tag 3"));
- do_check_true(uri4Tags.includes("456"));
-
- // Test sparse arrays.
- let curChildCount = tagRoot.childCount;
-
- try {
- tagssvc.tagURI(uri1, [, "tagSparse"]);
- do_check_eq(tagRoot.childCount, curChildCount + 1);
- } catch (ex) {
- do_throw("Passing a sparse array should not throw");
- }
- try {
- tagssvc.untagURI(uri1, [, "tagSparse"]);
- do_check_eq(tagRoot.childCount, curChildCount);
- } catch (ex) {
- do_throw("Passing a sparse array should not throw");
- }
-
- // Test that the API throws for bad arguments.
- try {
- tagssvc.tagURI(uri1, ["", "test"]);
- do_throw("Passing a bad tags array should throw");
- } catch (ex) {
- do_check_eq(ex.name, "NS_ERROR_ILLEGAL_VALUE");
- }
- try {
- tagssvc.untagURI(uri1, ["", "test"]);
- do_throw("Passing a bad tags array should throw");
- } catch (ex) {
- do_check_eq(ex.name, "NS_ERROR_ILLEGAL_VALUE");
- }
- try {
- tagssvc.tagURI(uri1, [0, "test"]);
- do_throw("Passing a bad tags array should throw");
- } catch (ex) {
- do_check_eq(ex.name, "NS_ERROR_ILLEGAL_VALUE");
- }
- try {
- tagssvc.tagURI(uri1, [0, "test"]);
- do_throw("Passing a bad tags array should throw");
- } catch (ex) {
- do_check_eq(ex.name, "NS_ERROR_ILLEGAL_VALUE");
- }
-
- // Tag name length should be limited to nsITaggingService.MAX_TAG_LENGTH (bug407821)
- try {
-
- // generate a long tag name. i.e. looooo...oong_tag
- var n = Ci.nsITaggingService.MAX_TAG_LENGTH;
- var someOos = new Array(n).join('o');
- var longTagName = "l" + someOos + "ng_tag";
-
- tagssvc.tagURI(uri1, ["short_tag", longTagName]);
- do_throw("Passing a bad tags array should throw");
-
- } catch (ex) {
- do_check_eq(ex.name, "NS_ERROR_ILLEGAL_VALUE");
- }
-
- // cleanup
- tagRoot.containerOpen = false;
-
- // Tagging service should trim tags (Bug967196)
- let exampleURI = uri("http://www.example.com/");
- PlacesUtils.tagging.tagURI(exampleURI, [ " test " ]);
-
- let exampleTags = PlacesUtils.tagging.getTagsForURI(exampleURI);
- do_check_eq(exampleTags.length, 1);
- do_check_eq(exampleTags[0], "test");
-
- PlacesUtils.tagging.untagURI(exampleURI, [ "test" ]);
- exampleTags = PlacesUtils.tagging.getTagsForURI(exampleURI);
- do_check_eq(exampleTags.length, 0);
-}
diff --git a/toolkit/components/places/tests/unit/test_telemetry.js b/toolkit/components/places/tests/unit/test_telemetry.js
deleted file mode 100644
index 99f36d78c8..0000000000
--- a/toolkit/components/places/tests/unit/test_telemetry.js
+++ /dev/null
@@ -1,166 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Tests common Places telemetry probes by faking the telemetry service.
-
-Components.utils.import("resource://gre/modules/PlacesDBUtils.jsm");
-
-var histograms = {
- PLACES_PAGES_COUNT: val => do_check_eq(val, 1),
- PLACES_BOOKMARKS_COUNT: val => do_check_eq(val, 1),
- PLACES_TAGS_COUNT: val => do_check_eq(val, 1),
- PLACES_KEYWORDS_COUNT: val => do_check_eq(val, 1),
- PLACES_SORTED_BOOKMARKS_PERC: val => do_check_eq(val, 100),
- PLACES_TAGGED_BOOKMARKS_PERC: val => do_check_eq(val, 100),
- PLACES_DATABASE_FILESIZE_MB: val => do_check_true(val > 0),
- PLACES_DATABASE_PAGESIZE_B: val => do_check_eq(val, 32768),
- PLACES_DATABASE_SIZE_PER_PAGE_B: val => do_check_true(val > 0),
- PLACES_EXPIRATION_STEPS_TO_CLEAN2: val => do_check_true(val > 1),
- // PLACES_AUTOCOMPLETE_1ST_RESULT_TIME_MS: val => do_check_true(val > 1),
- PLACES_IDLE_FRECENCY_DECAY_TIME_MS: val => do_check_true(val >= 0),
- PLACES_IDLE_MAINTENANCE_TIME_MS: val => do_check_true(val > 0),
- // One from the `setItemAnnotation` call; the other from the mobile root.
- // This can be removed along with the anno in bug 1306445.
- PLACES_ANNOS_BOOKMARKS_COUNT: val => do_check_eq(val, 2),
- PLACES_ANNOS_PAGES_COUNT: val => do_check_eq(val, 1),
- PLACES_MAINTENANCE_DAYSFROMLAST: val => do_check_true(val >= 0),
-}
-
-/**
- * Forces an expiration run.
- *
- * @param [optional] aLimit
- * Limit for the expiration. Pass -1 for unlimited.
- * Any other non-positive value will just expire orphans.
- *
- * @return {Promise}
- * @resolves When expiration finishes.
- * @rejects Never.
- */
-function promiseForceExpirationStep(aLimit) {
- let promise = promiseTopicObserved(PlacesUtils.TOPIC_EXPIRATION_FINISHED);
- let expire = Cc["@mozilla.org/places/expiration;1"].getService(Ci.nsIObserver);
- expire.observe(null, "places-debug-start-expiration", aLimit);
- return promise;
-}
-
-/**
- * Returns a PRTime in the past usable to add expirable visits.
- *
- * param [optional] daysAgo
- * Expiration ignores any visit added in the last 7 days, so by default
- * this will be set to 7.
- * @note to be safe against DST issues we go back one day more.
- */
-function getExpirablePRTime(daysAgo = 7) {
- let dateObj = new Date();
- // Normalize to midnight
- dateObj.setHours(0);
- dateObj.setMinutes(0);
- dateObj.setSeconds(0);
- dateObj.setMilliseconds(0);
- dateObj = new Date(dateObj.getTime() - (daysAgo + 1) * 86400000);
- return dateObj.getTime() * 1000;
-}
-
-add_task(function* test_execute()
-{
- // Put some trash in the database.
- let uri = NetUtil.newURI("http://moz.org/");
-
- let folderId = PlacesUtils.bookmarks.createFolder(PlacesUtils.unfiledBookmarksFolderId,
- "moz test",
- PlacesUtils.bookmarks.DEFAULT_INDEX);
- let itemId = PlacesUtils.bookmarks.insertBookmark(folderId,
- uri,
- PlacesUtils.bookmarks.DEFAULT_INDEX,
- "moz test");
- PlacesUtils.tagging.tagURI(uri, ["tag"]);
- yield PlacesUtils.keywords.insert({ url: uri.spec, keyword: "keyword"});
-
- // Set a large annotation.
- let content = "";
- while (content.length < 1024) {
- content += "0";
- }
- PlacesUtils.annotations.setItemAnnotation(itemId, "test-anno", content, 0,
- PlacesUtils.annotations.EXPIRE_NEVER);
- PlacesUtils.annotations.setPageAnnotation(uri, "test-anno", content, 0,
- PlacesUtils.annotations.EXPIRE_NEVER);
-
- // Request to gather telemetry data.
- Cc["@mozilla.org/places/categoriesStarter;1"]
- .getService(Ci.nsIObserver)
- .observe(null, "gather-telemetry", null);
-
- yield PlacesTestUtils.promiseAsyncUpdates();
-
- // Test expiration probes.
- let timeInMicroseconds = getExpirablePRTime(8);
-
- function newTimeInMicroseconds() {
- timeInMicroseconds = timeInMicroseconds + 1000;
- return timeInMicroseconds;
- }
-
- for (let i = 0; i < 3; i++) {
- yield PlacesTestUtils.addVisits({
- uri: NetUtil.newURI("http://" + i + ".moz.org/"),
- visitDate: newTimeInMicroseconds()
- });
- }
- Services.prefs.setIntPref("places.history.expiration.max_pages", 0);
- yield promiseForceExpirationStep(2);
- yield promiseForceExpirationStep(2);
-
- // Test autocomplete probes.
- /*
- // This is useful for manual testing by changing the minimum time for
- // autocomplete telemetry to 0, but there is no way to artificially delay
- // autocomplete by more than 50ms in a realiable way.
- Services.prefs.setIntPref("browser.urlbar.search.sources", 3);
- Services.prefs.setIntPref("browser.urlbar.default.behavior", 0);
- function AutoCompleteInput(aSearches) {
- this.searches = aSearches;
- }
- AutoCompleteInput.prototype = {
- timeout: 10,
- textValue: "",
- searchParam: "",
- popupOpen: false,
- minResultsForPopup: 0,
- invalidate: function() {},
- disableAutoComplete: false,
- completeDefaultIndex: false,
- get popup() { return this; },
- onSearchBegin: function() {},
- onSearchComplete: function() {},
- setSelectedIndex: function() {},
- get searchCount() { return this.searches.length; },
- getSearchAt: function(aIndex) { return this.searches[aIndex]; },
- QueryInterface: XPCOMUtils.generateQI([
- Ci.nsIAutoCompleteInput,
- Ci.nsIAutoCompletePopup,
- ])
- };
- let controller = Cc["@mozilla.org/autocomplete/controller;1"].
- getService(Ci.nsIAutoCompleteController);
- controller.input = new AutoCompleteInput(["unifiedcomplete"]);
- controller.startSearch("moz");
- */
-
- // Test idle probes.
- PlacesUtils.history.QueryInterface(Ci.nsIObserver)
- .observe(null, "idle-daily", null);
- PlacesDBUtils.maintenanceOnIdle();
-
- yield promiseTopicObserved("places-maintenance-finished");
-
- for (let histogramId in histograms) {
- do_print("checking histogram " + histogramId);
- let validate = histograms[histogramId];
- let snapshot = Services.telemetry.getHistogramById(histogramId).snapshot();
- validate(snapshot.sum);
- do_check_true(snapshot.counts.reduce((a, b) => a + b) > 0);
- }
-});
diff --git a/toolkit/components/places/tests/unit/test_update_frecency_after_delete.js b/toolkit/components/places/tests/unit/test_update_frecency_after_delete.js
deleted file mode 100644
index 662ea0841f..0000000000
--- a/toolkit/components/places/tests/unit/test_update_frecency_after_delete.js
+++ /dev/null
@@ -1,151 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
-/**
- * Bug 455315
- * https://bugzilla.mozilla.org/show_bug.cgi?id=412132
- *
- * Ensures that the frecency of a bookmark's URI is what it should be after the
- * bookmark is deleted.
- */
-
-add_task(function* removed_bookmark() {
- do_print("After removing bookmark, frecency of bookmark's URI should be " +
- "zero if URI is unvisited and no longer bookmarked.");
- const TEST_URI = NetUtil.newURI("http://example.com/1");
- let bm = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- title: "bookmark title",
- url: TEST_URI
- });
-
- yield PlacesTestUtils.promiseAsyncUpdates();
- do_print("Bookmarked => frecency of URI should be != 0");
- do_check_neq(frecencyForUrl(TEST_URI), 0);
-
- yield PlacesUtils.bookmarks.remove(bm);
-
- yield PlacesTestUtils.promiseAsyncUpdates();
- do_print("Unvisited URI no longer bookmarked => frecency should = 0");
- do_check_eq(frecencyForUrl(TEST_URI), 0);
-
- yield PlacesUtils.bookmarks.eraseEverything();
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* removed_but_visited_bookmark() {
- do_print("After removing bookmark, frecency of bookmark's URI should " +
- "not be zero if URI is visited.");
- const TEST_URI = NetUtil.newURI("http://example.com/1");
- let bm = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- title: "bookmark title",
- url: TEST_URI
- });
-
- yield PlacesTestUtils.promiseAsyncUpdates();
- do_print("Bookmarked => frecency of URI should be != 0");
- do_check_neq(frecencyForUrl(TEST_URI), 0);
-
- yield PlacesTestUtils.addVisits(TEST_URI);
- yield PlacesUtils.bookmarks.remove(bm);
-
- yield PlacesTestUtils.promiseAsyncUpdates();
- do_print("*Visited* URI no longer bookmarked => frecency should != 0");
- do_check_neq(frecencyForUrl(TEST_URI), 0);
-
- yield PlacesUtils.bookmarks.eraseEverything();
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* remove_bookmark_still_bookmarked() {
- do_print("After removing bookmark, frecency of bookmark's URI should " +
- "not be zero if URI is still bookmarked.");
- const TEST_URI = NetUtil.newURI("http://example.com/1");
- let bm1 = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- title: "bookmark 1 title",
- url: TEST_URI
- });
- yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- title: "bookmark 2 title",
- url: TEST_URI
- });
-
- yield PlacesTestUtils.promiseAsyncUpdates();
- do_print("Bookmarked => frecency of URI should be != 0");
- do_check_neq(frecencyForUrl(TEST_URI), 0);
-
- yield PlacesUtils.bookmarks.remove(bm1);
-
- yield PlacesTestUtils.promiseAsyncUpdates();
- do_print("URI still bookmarked => frecency should != 0");
- do_check_neq(frecencyForUrl(TEST_URI), 0);
-
- yield PlacesUtils.bookmarks.eraseEverything();
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* cleared_parent_of_visited_bookmark() {
- do_print("After removing all children from bookmark's parent, frecency " +
- "of bookmark's URI should not be zero if URI is visited.");
- const TEST_URI = NetUtil.newURI("http://example.com/1");
- yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- title: "bookmark title",
- url: TEST_URI
- });
-
- yield PlacesTestUtils.promiseAsyncUpdates();
- do_print("Bookmarked => frecency of URI should be != 0");
- do_check_neq(frecencyForUrl(TEST_URI), 0);
-
- yield PlacesTestUtils.addVisits(TEST_URI);
- PlacesUtils.bookmarks.removeFolderChildren(PlacesUtils.unfiledBookmarksFolderId);
-
- yield PlacesTestUtils.promiseAsyncUpdates();
- do_print("*Visited* URI no longer bookmarked => frecency should != 0");
- do_check_neq(frecencyForUrl(TEST_URI), 0);
-
- yield PlacesUtils.bookmarks.eraseEverything();
- yield PlacesTestUtils.clearHistory();
-});
-
-add_task(function* cleared_parent_of_bookmark_still_bookmarked() {
- do_print("After removing all children from bookmark's parent, frecency " +
- "of bookmark's URI should not be zero if URI is still " +
- "bookmarked.");
- const TEST_URI = NetUtil.newURI("http://example.com/1");
- yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.toolbarGuid,
- title: "bookmark 1 title",
- url: TEST_URI
- });
-
- let folder = yield PlacesUtils.bookmarks.insert({
- parentGuid: PlacesUtils.bookmarks.unfiledGuid,
- type: PlacesUtils.bookmarks.TYPE_FOLDER,
- title: "bookmark 2 folder"
- });
- yield PlacesUtils.bookmarks.insert({
- title: "bookmark 2 title",
- parentGuid: folder.guid,
- url: TEST_URI
- });
-
- yield PlacesTestUtils.promiseAsyncUpdates();
- do_print("Bookmarked => frecency of URI should be != 0");
- do_check_neq(frecencyForUrl(TEST_URI), 0);
-
- yield PlacesUtils.bookmarks.remove(folder);
- yield PlacesTestUtils.promiseAsyncUpdates();
- // URI still bookmarked => frecency should != 0.
- do_check_neq(frecencyForUrl(TEST_URI), 0);
-
- yield PlacesUtils.bookmarks.eraseEverything();
- yield PlacesTestUtils.clearHistory();
-});
diff --git a/toolkit/components/places/tests/unit/test_utils_backups_create.js b/toolkit/components/places/tests/unit/test_utils_backups_create.js
deleted file mode 100644
index a30589c44f..0000000000
--- a/toolkit/components/places/tests/unit/test_utils_backups_create.js
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
- /**
- * Check for correct functionality of bookmarks backups
- */
-
-const NUMBER_OF_BACKUPS = 10;
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* () {
- // Generate random dates.
- let dateObj = new Date();
- let dates = [];
- while (dates.length < NUMBER_OF_BACKUPS) {
- // Use last year to ensure today's backup is the newest.
- let randomDate = new Date(dateObj.getFullYear() - 1,
- Math.floor(12 * Math.random()),
- Math.floor(28 * Math.random()));
- if (!dates.includes(randomDate.getTime()))
- dates.push(randomDate.getTime());
- }
- // Sort dates from oldest to newest.
- dates.sort();
-
- // Get and cleanup the backups folder.
- let backupFolderPath = yield PlacesBackups.getBackupFolder();
- let bookmarksBackupDir = new FileUtils.File(backupFolderPath);
-
- // Fake backups are created backwards to ensure we won't consider file
- // creation time.
- // Create fake backups for the newest dates.
- for (let i = dates.length - 1; i >= 0; i--) {
- let backupFilename = PlacesBackups.getFilenameForDate(new Date(dates[i]));
- let backupFile = bookmarksBackupDir.clone();
- backupFile.append(backupFilename);
- backupFile.create(Ci.nsIFile.NORMAL_FILE_TYPE, parseInt("0666", 8));
- do_print("Creating fake backup " + backupFile.leafName);
- if (!backupFile.exists())
- do_throw("Unable to create fake backup " + backupFile.leafName);
- }
-
- yield PlacesBackups.create(NUMBER_OF_BACKUPS);
- // Add today's backup.
- dates.push(dateObj.getTime());
-
- // Check backups. We have 11 dates but we the max number is 10 so the
- // oldest backup should have been removed.
- for (let i = 0; i < dates.length; i++) {
- let backupFilename;
- let shouldExist;
- let backupFile;
- if (i > 0) {
- let files = bookmarksBackupDir.directoryEntries;
- while (files.hasMoreElements()) {
- let entry = files.getNext().QueryInterface(Ci.nsIFile);
- if (PlacesBackups.filenamesRegex.test(entry.leafName)) {
- backupFilename = entry.leafName;
- backupFile = entry;
- break;
- }
- }
- shouldExist = true;
- }
- else {
- backupFilename = PlacesBackups.getFilenameForDate(new Date(dates[i]));
- backupFile = bookmarksBackupDir.clone();
- backupFile.append(backupFilename);
- shouldExist = false;
- }
- if (backupFile.exists() != shouldExist)
- do_throw("Backup should " + (shouldExist ? "" : "not") + " exist: " + backupFilename);
- }
-
- // Cleanup backups folder.
- // XXX: Can't use bookmarksBackupDir.remove(true) because file lock happens
- // on WIN XP.
- let files = bookmarksBackupDir.directoryEntries;
- while (files.hasMoreElements()) {
- let entry = files.getNext().QueryInterface(Ci.nsIFile);
- entry.remove(false);
- }
- do_check_false(bookmarksBackupDir.directoryEntries.hasMoreElements());
-});
diff --git a/toolkit/components/places/tests/unit/test_utils_getURLsForContainerNode.js b/toolkit/components/places/tests/unit/test_utils_getURLsForContainerNode.js
deleted file mode 100644
index 3e2f88c21d..0000000000
--- a/toolkit/components/places/tests/unit/test_utils_getURLsForContainerNode.js
+++ /dev/null
@@ -1,181 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
- /**
- * Check for correct functionality of PlacesUtils.getURLsForContainerNode and
- * PlacesUtils.hasChildURIs (those helpers share almost all of their code)
- */
-
-var PU = PlacesUtils;
-var hs = PU.history;
-var bs = PU.bookmarks;
-
-var tests = [
-
-function() {
- dump("\n\n*** TEST: folder\n");
- // This is the folder we will check for children.
- var folderId = bs.createFolder(bs.toolbarFolder, "folder", bs.DEFAULT_INDEX);
-
- // Create a folder and a query node inside it, these should not be considered
- // uri nodes.
- bs.createFolder(folderId, "inside folder", bs.DEFAULT_INDEX);
- bs.insertBookmark(folderId, uri("place:sort=1"),
- bs.DEFAULT_INDEX, "inside query");
-
- var query = hs.getNewQuery();
- query.setFolders([bs.toolbarFolder], 1);
- var options = hs.getNewQueryOptions();
-
- dump("Check folder without uri nodes\n");
- check_uri_nodes(query, options, 0);
-
- dump("Check folder with uri nodes\n");
- // Add an uri node, this should be considered.
- bs.insertBookmark(folderId, uri("http://www.mozilla.org/"),
- bs.DEFAULT_INDEX, "bookmark");
- check_uri_nodes(query, options, 1);
-},
-
-function() {
- dump("\n\n*** TEST: folder in an excludeItems root\n");
- // This is the folder we will check for children.
- var folderId = bs.createFolder(bs.toolbarFolder, "folder", bs.DEFAULT_INDEX);
-
- // Create a folder and a query node inside it, these should not be considered
- // uri nodes.
- bs.createFolder(folderId, "inside folder", bs.DEFAULT_INDEX);
- bs.insertBookmark(folderId, uri("place:sort=1"), bs.DEFAULT_INDEX, "inside query");
-
- var query = hs.getNewQuery();
- query.setFolders([bs.toolbarFolder], 1);
- var options = hs.getNewQueryOptions();
- options.excludeItems = true;
-
- dump("Check folder without uri nodes\n");
- check_uri_nodes(query, options, 0);
-
- dump("Check folder with uri nodes\n");
- // Add an uri node, this should be considered.
- bs.insertBookmark(folderId, uri("http://www.mozilla.org/"),
- bs.DEFAULT_INDEX, "bookmark");
- check_uri_nodes(query, options, 1);
-},
-
-function() {
- dump("\n\n*** TEST: query\n");
- // This is the query we will check for children.
- bs.insertBookmark(bs.toolbarFolder, uri("place:folder=BOOKMARKS_MENU&sort=1"),
- bs.DEFAULT_INDEX, "inside query");
-
- // Create a folder and a query node inside it, these should not be considered
- // uri nodes.
- bs.createFolder(bs.bookmarksMenuFolder, "inside folder", bs.DEFAULT_INDEX);
- bs.insertBookmark(bs.bookmarksMenuFolder, uri("place:sort=1"),
- bs.DEFAULT_INDEX, "inside query");
-
- var query = hs.getNewQuery();
- query.setFolders([bs.toolbarFolder], 1);
- var options = hs.getNewQueryOptions();
-
- dump("Check query without uri nodes\n");
- check_uri_nodes(query, options, 0);
-
- dump("Check query with uri nodes\n");
- // Add an uri node, this should be considered.
- bs.insertBookmark(bs.bookmarksMenuFolder, uri("http://www.mozilla.org/"),
- bs.DEFAULT_INDEX, "bookmark");
- check_uri_nodes(query, options, 1);
-},
-
-function() {
- dump("\n\n*** TEST: excludeItems Query\n");
- // This is the query we will check for children.
- bs.insertBookmark(bs.toolbarFolder, uri("place:folder=BOOKMARKS_MENU&sort=8"),
- bs.DEFAULT_INDEX, "inside query");
-
- // Create a folder and a query node inside it, these should not be considered
- // uri nodes.
- bs.createFolder(bs.bookmarksMenuFolder, "inside folder", bs.DEFAULT_INDEX);
- bs.insertBookmark(bs.bookmarksMenuFolder, uri("place:sort=1"),
- bs.DEFAULT_INDEX, "inside query");
-
- var query = hs.getNewQuery();
- query.setFolders([bs.toolbarFolder], 1);
- var options = hs.getNewQueryOptions();
- options.excludeItems = true;
-
- dump("Check folder without uri nodes\n");
- check_uri_nodes(query, options, 0);
-
- dump("Check folder with uri nodes\n");
- // Add an uri node, this should be considered.
- bs.insertBookmark(bs.bookmarksMenuFolder, uri("http://www.mozilla.org/"),
- bs.DEFAULT_INDEX, "bookmark");
- check_uri_nodes(query, options, 1);
-},
-
-function() {
- dump("\n\n*** TEST: !expandQueries Query\n");
- // This is the query we will check for children.
- bs.insertBookmark(bs.toolbarFolder, uri("place:folder=BOOKMARKS_MENU&sort=8"),
- bs.DEFAULT_INDEX, "inside query");
-
- // Create a folder and a query node inside it, these should not be considered
- // uri nodes.
- bs.createFolder(bs.bookmarksMenuFolder, "inside folder", bs.DEFAULT_INDEX);
- bs.insertBookmark(bs.bookmarksMenuFolder, uri("place:sort=1"),
- bs.DEFAULT_INDEX, "inside query");
-
- var query = hs.getNewQuery();
- query.setFolders([bs.toolbarFolder], 1);
- var options = hs.getNewQueryOptions();
- options.expandQueries = false;
-
- dump("Check folder without uri nodes\n");
- check_uri_nodes(query, options, 0);
-
- dump("Check folder with uri nodes\n");
- // Add an uri node, this should be considered.
- bs.insertBookmark(bs.bookmarksMenuFolder, uri("http://www.mozilla.org/"),
- bs.DEFAULT_INDEX, "bookmark");
- check_uri_nodes(query, options, 1);
-}
-
-];
-
-/**
- * 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.
- *
- * @param aQuery
- * nsINavHistoryQuery object defining the query
- * @param aOptions
- * nsINavHistoryQueryOptions object defining the query's options
- * @param aExpectedURINodes
- * number of expected uri nodes
- */
-function check_uri_nodes(aQuery, aOptions, aExpectedURINodes) {
- var result = hs.executeQuery(aQuery, aOptions);
- var root = result.root;
- root.containerOpen = true;
- var node = root.getChild(0);
- do_check_eq(PU.hasChildURIs(node), aExpectedURINodes > 0);
- do_check_eq(PU.hasChildURIs(node, true), aExpectedURINodes > 1);
- do_check_eq(PU.getURLsForContainerNode(node).length, aExpectedURINodes);
- root.containerOpen = false;
-}
-
-add_task(function* () {
- for (let test of tests) {
- yield PlacesUtils.bookmarks.eraseEverything();
- test();
- }
-
- // Cleanup.
- yield PlacesUtils.bookmarks.eraseEverything();
-});
diff --git a/toolkit/components/places/tests/unit/test_utils_setAnnotationsFor.js b/toolkit/components/places/tests/unit/test_utils_setAnnotationsFor.js
deleted file mode 100644
index 62947620d5..0000000000
--- a/toolkit/components/places/tests/unit/test_utils_setAnnotationsFor.js
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* 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/. */
-
- /**
- * Check for correct functionality of PlacesUtils.setAnnotationsForItem/URI
- */
-
-var hs = PlacesUtils.history;
-var bs = PlacesUtils.bookmarks;
-var as = PlacesUtils.annotations;
-
-const TEST_URL = "http://test.mozilla.org/";
-
-function run_test() {
- var testURI = uri(TEST_URL);
- // add a bookmark
- var itemId = bs.insertBookmark(bs.unfiledBookmarksFolder, testURI,
- bs.DEFAULT_INDEX, "test");
-
- // create annotations array
- var testAnnos = [{ name: "testAnno/test0",
- flags: 0,
- value: "test0",
- expires: Ci.nsIAnnotationService.EXPIRE_NEVER },
- { name: "testAnno/test1",
- flags: 0,
- value: "test1",
- expires: Ci.nsIAnnotationService.EXPIRE_NEVER },
- { name: "testAnno/test2",
- flags: 0,
- value: "test2",
- expires: Ci.nsIAnnotationService.EXPIRE_NEVER },
- { name: "testAnno/test3",
- flags: 0,
- value: 0,
- expires: Ci.nsIAnnotationService.EXPIRE_NEVER }];
-
- // Add item annotations
- PlacesUtils.setAnnotationsForItem(itemId, testAnnos);
- // Check for correct addition
- testAnnos.forEach(function(anno) {
- do_check_true(as.itemHasAnnotation(itemId, anno.name));
- do_check_eq(as.getItemAnnotation(itemId, anno.name), anno.value);
- });
-
- // Add page annotations
- PlacesUtils.setAnnotationsForURI(testURI, testAnnos);
- // Check for correct addition
- testAnnos.forEach(function(anno) {
- do_check_true(as.pageHasAnnotation(testURI, anno.name));
- do_check_eq(as.getPageAnnotation(testURI, anno.name), anno.value);
- });
-
- // To unset annotations we unset their values or set them to
- // null/undefined
- testAnnos[0].value = null;
- testAnnos[1].value = undefined;
- delete testAnnos[2].value;
- delete testAnnos[3].value;
-
- // Unset all item annotations
- PlacesUtils.setAnnotationsForItem(itemId, testAnnos);
- // Check for correct removal
- testAnnos.forEach(function(anno) {
- do_check_false(as.itemHasAnnotation(itemId, anno.name));
- // sanity: page annotations should not be removed here
- do_check_true(as.pageHasAnnotation(testURI, anno.name));
- });
-
- // Unset all page annotations
- PlacesUtils.setAnnotationsForURI(testURI, testAnnos);
- // Check for correct removal
- testAnnos.forEach(function(anno) {
- do_check_false(as.pageHasAnnotation(testURI, anno.name));
- });
-}
diff --git a/toolkit/components/places/tests/unit/test_visitsInDB.js b/toolkit/components/places/tests/unit/test_visitsInDB.js
deleted file mode 100644
index 3cab39ed98..0000000000
--- a/toolkit/components/places/tests/unit/test_visitsInDB.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim:set ts=2 sw=2 sts=2 et: */
-
-add_task(function* test_execute() {
- const TEST_URI = uri("http://mozilla.com");
-
- do_check_eq(0, yield PlacesTestUtils.visitsInDB(TEST_URI));
- yield PlacesTestUtils.addVisits({uri: TEST_URI});
- do_check_eq(1, yield PlacesTestUtils.visitsInDB(TEST_URI));
- yield PlacesTestUtils.addVisits({uri: TEST_URI});
- do_check_eq(2, yield PlacesTestUtils.visitsInDB(TEST_URI));
-});
diff --git a/toolkit/components/places/tests/unit/xpcshell.ini b/toolkit/components/places/tests/unit/xpcshell.ini
deleted file mode 100644
index 60bba47582..0000000000
--- a/toolkit/components/places/tests/unit/xpcshell.ini
+++ /dev/null
@@ -1,163 +0,0 @@
-[DEFAULT]
-head = head_bookmarks.js
-tail =
-firefox-appdir = browser
-skip-if = toolkit == 'android'
-support-files =
- bookmarks.corrupt.html
- bookmarks.json
- bookmarks.preplaces.html
- bookmarks_html_singleframe.html
- bug476292.sqlite
- corruptDB.sqlite
- default.sqlite
- livemark.xml
- mobile_bookmarks_folder_import.json
- mobile_bookmarks_folder_merge.json
- mobile_bookmarks_multiple_folders.json
- mobile_bookmarks_root_import.json
- mobile_bookmarks_root_merge.json
- nsDummyObserver.js
- nsDummyObserver.manifest
- places.sparse.sqlite
-
-[test_000_frecency.js]
-[test_317472.js]
-# Bug 676989: test hangs consistently on Android
-skip-if = os == "android"
-[test_331487.js]
-[test_384370.js]
-[test_385397.js]
-# Bug 676989: test fails consistently on Android
-fail-if = os == "android"
-[test_399264_query_to_string.js]
-[test_399264_string_to_query.js]
-[test_399266.js]
-# Bug 676989: test fails consistently on Android
-fail-if = os == "android"
-# Bug 821781: test fails intermittently on Linux
-skip-if = os == "linux"
-[test_402799.js]
-[test_405497.js]
-[test_408221.js]
-[test_412132.js]
-# Bug 676989: test hangs consistently on Android
-skip-if = os == "android"
-[test_413784.js]
-[test_415460.js]
-[test_415757.js]
-[test_418643_removeFolderChildren.js]
-[test_419731.js]
-[test_419792_node_tags_property.js]
-[test_425563.js]
-[test_429505_remove_shortcuts.js]
-[test_433317_query_title_update.js]
-[test_433525_hasChildren_crash.js]
-[test_452777.js]
-[test_454977.js]
-[test_463863.js]
-[test_485442_crash_bug_nsNavHistoryQuery_GetUri.js]
-[test_486978_sort_by_date_queries.js]
-[test_536081.js]
-[test_1085291.js]
-[test_1105208.js]
-[test_1105866.js]
-[test_adaptive.js]
-# Bug 676989: test hangs consistently on Android
-skip-if = os == "android"
-[test_adaptive_bug527311.js]
-[test_analyze.js]
-[test_annotations.js]
-[test_asyncExecuteLegacyQueries.js]
-# Bug 676989: test hangs consistently on Android
-skip-if = os == "android"
-[test_async_history_api.js]
-[test_async_in_batchmode.js]
-[test_async_transactions.js]
-skip-if = (os == "win" && os_version == "5.1") # Bug 1158887
-[test_autocomplete_stopSearch_no_throw.js]
-[test_bookmark_catobs.js]
-[test_bookmarks_json.js]
-[test_bookmarks_html.js]
-[test_bookmarks_html_corrupt.js]
-[test_bookmarks_html_import_tags.js]
-[test_bookmarks_html_singleframe.js]
-[test_bookmarks_restore_notification.js]
-[test_bookmarks_setNullTitle.js]
-[test_broken_folderShortcut_result.js]
-[test_browserhistory.js]
-[test_bug636917_isLivemark.js]
-[test_childlessTags.js]
-[test_corrupt_telemetry.js]
-[test_crash_476292.js]
-[test_database_replaceOnStartup.js]
-[test_download_history.js]
-# Bug 676989: test fails consistently on Android
-fail-if = os == "android"
-[test_frecency.js]
-[test_frecency_zero_updated.js]
-# Bug 676989: test hangs consistently on Android
-skip-if = os == "android"
-[test_getChildIndex.js]
-[test_getPlacesInfo.js]
-[test_history.js]
-[test_history_autocomplete_tags.js]
-[test_history_catobs.js]
-[test_history_clear.js]
-[test_history_notifications.js]
-[test_history_observer.js]
-# Bug 676989: test hangs consistently on Android
-skip-if = os == "android"
-[test_history_sidebar.js]
-[test_hosts_triggers.js]
-[test_import_mobile_bookmarks.js]
-[test_isPageInDB.js]
-[test_isURIVisited.js]
-[test_isvisited.js]
-[test_keywords.js]
-[test_lastModified.js]
-[test_markpageas.js]
-[test_mozIAsyncLivemarks.js]
-[test_multi_queries.js]
-# Bug 676989: test fails consistently on Android
-fail-if = os == "android"
-[test_multi_word_tags.js]
-[test_nsINavHistoryViewer.js]
-# Bug 902248: intermittent timeouts on all platforms
-skip-if = true
-[test_null_interfaces.js]
-[test_onItemChanged_tags.js]
-[test_pageGuid_bookmarkGuid.js]
-[test_frecency_observers.js]
-[test_placeURIs.js]
-[test_PlacesSearchAutocompleteProvider.js]
-[test_PlacesUtils_asyncGetBookmarkIds.js]
-[test_PlacesUtils_invalidateCachedGuidFor.js]
-[test_PlacesUtils_lazyobservers.js]
-[test_placesTxn.js]
-[test_preventive_maintenance.js]
-# Bug 676989: test hangs consistently on Android
-skip-if = os == "android"
-[test_preventive_maintenance_checkAndFixDatabase.js]
-# Bug 676989: test hangs consistently on Android
-skip-if = os == "android"
-[test_preventive_maintenance_runTasks.js]
-[test_promiseBookmarksTree.js]
-# Bug 676989: test hangs consistently on Android
-skip-if = os == "android"
-[test_resolveNullBookmarkTitles.js]
-[test_result_sort.js]
-[test_resultsAsVisit_details.js]
-[test_sql_guid_functions.js]
-[test_svg_favicon.js]
-[test_sync_utils.js]
-[test_tag_autocomplete_search.js]
-[test_tagging.js]
-[test_telemetry.js]
-[test_update_frecency_after_delete.js]
-# Bug 676989: test hangs consistently on Android
-skip-if = os == "android"
-[test_utils_backups_create.js]
-[test_utils_getURLsForContainerNode.js]
-[test_utils_setAnnotationsFor.js]
-[test_visitsInDB.js]
diff --git a/toolkit/components/printing/moz.build b/toolkit/components/printing/moz.build
index dc8204b8ca..aac3a838c4 100644
--- a/toolkit/components/printing/moz.build
+++ b/toolkit/components/printing/moz.build
@@ -5,10 +5,3 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
JAR_MANIFESTS += ['jar.mn']
-
-BROWSER_CHROME_MANIFESTS += [
- 'tests/browser.ini'
-]
-
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'Printing')
diff --git a/toolkit/components/printing/tests/browser.ini b/toolkit/components/printing/tests/browser.ini
deleted file mode 100644
index 5f2867189a..0000000000
--- a/toolkit/components/printing/tests/browser.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[browser_page_change_print_original.js]
-support-files =
- file_page_change_print_original_1.html
- file_page_change_print_original_2.html
-skip-if = os == "mac"
diff --git a/toolkit/components/printing/tests/browser_page_change_print_original.js b/toolkit/components/printing/tests/browser_page_change_print_original.js
deleted file mode 100644
index 8641504519..0000000000
--- a/toolkit/components/printing/tests/browser_page_change_print_original.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * Verify that if the page contents change after print preview is initialized,
- * and we re-initialize print preview (e.g. by changing page orientation),
- * we still show (and will therefore print) the original contents.
- */
-const TEST_PATH = getRootDirectory(gTestPath)
- .replace("chrome://mochitests/content", "http://example.com");
-
-add_task(function* pp_after_orientation_change() {
- const URI = TEST_PATH + "file_page_change_print_original_1.html";
- // Can only do something if we have a print preview UI:
- if (AppConstants.platform != "win" && AppConstants.platform != "linux") {
- ok(true, "Can't test if there's no print preview.");
- return;
- }
-
- // Ensure we get a browserStopped for this browser
- let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, URI, false, true);
- let browserToPrint = tab.linkedBrowser;
- let ppBrowser = PrintPreviewListener.getPrintPreviewBrowser();
-
- // Get a promise now that resolves when the original tab's location changes.
- let originalTabNavigated = BrowserTestUtils.browserStopped(browserToPrint);
-
- // Enter print preview:
- let printPreviewEntered = BrowserTestUtils.waitForMessage(ppBrowser.messageManager, "Printing:Preview:Entered");
- document.getElementById("cmd_printPreview").doCommand();
- yield printPreviewEntered;
-
- // Assert that we are showing the original page
- yield ContentTask.spawn(ppBrowser, null, function* () {
- is(content.document.body.textContent.trim(), "INITIAL PAGE", "Should have initial page print previewed.");
- });
-
- yield originalTabNavigated;
-
- // Change orientation and wait for print preview to re-enter:
- let orient = PrintUtils.getPrintSettings().orientation;
- let orientToSwitchTo = orient != Ci.nsIPrintSettings.kPortraitOrientation ?
- "portrait" : "landscape";
- let printPreviewToolbar = document.querySelector("toolbar[printpreview=true]");
-
- printPreviewEntered = BrowserTestUtils.waitForMessage(ppBrowser.messageManager, "Printing:Preview:Entered");
- printPreviewToolbar.orient(orientToSwitchTo);
- yield printPreviewEntered;
-
- // Check that we're still showing the original page.
- yield ContentTask.spawn(ppBrowser, null, function* () {
- is(content.document.body.textContent.trim(), "INITIAL PAGE", "Should still have initial page print previewed.");
- });
-
- // Check that the other tab is definitely showing the new page:
- yield ContentTask.spawn(browserToPrint, null, function* () {
- is(content.document.body.textContent.trim(), "REPLACED PAGE!", "Original page should have changed.");
- });
-
- PrintUtils.exitPrintPreview();
-
- yield BrowserTestUtils.removeTab(tab);
-});
diff --git a/toolkit/components/printing/tests/file_page_change_print_original_1.html b/toolkit/components/printing/tests/file_page_change_print_original_1.html
deleted file mode 100644
index 76e3be1374..0000000000
--- a/toolkit/components/printing/tests/file_page_change_print_original_1.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<script>
-window.onafterprint = function() {
- setTimeout(function() {
- window.location = "file_page_change_print_original_2.html"
- }, 0);
-}
-</script>
-<pre>INITIAL PAGE</pre>
diff --git a/toolkit/components/printing/tests/file_page_change_print_original_2.html b/toolkit/components/printing/tests/file_page_change_print_original_2.html
deleted file mode 100644
index 44f33281c9..0000000000
--- a/toolkit/components/printing/tests/file_page_change_print_original_2.html
+++ /dev/null
@@ -1 +0,0 @@
-REPLACED PAGE!
diff --git a/toolkit/components/promiseworker/moz.build b/toolkit/components/promiseworker/moz.build
index 44a90e6792..1c771464d7 100644
--- a/toolkit/components/promiseworker/moz.build
+++ b/toolkit/components/promiseworker/moz.build
@@ -4,15 +4,6 @@
# 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/.
-DIRS += [
- 'worker'
-]
+DIRS += ['worker']
-EXTRA_JS_MODULES += [
- 'PromiseWorker.jsm',
-]
-
-XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell/xpcshell.ini']
-
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'Async Tooling')
+EXTRA_JS_MODULES += ['PromiseWorker.jsm']
diff --git a/toolkit/components/promiseworker/tests/xpcshell/.eslintrc.js b/toolkit/components/promiseworker/tests/xpcshell/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/promiseworker/tests/xpcshell/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/promiseworker/tests/xpcshell/data/chrome.manifest b/toolkit/components/promiseworker/tests/xpcshell/data/chrome.manifest
deleted file mode 100644
index 9e5dd29b22..0000000000
--- a/toolkit/components/promiseworker/tests/xpcshell/data/chrome.manifest
+++ /dev/null
@@ -1 +0,0 @@
-content promiseworker ./
diff --git a/toolkit/components/promiseworker/tests/xpcshell/data/worker.js b/toolkit/components/promiseworker/tests/xpcshell/data/worker.js
deleted file mode 100644
index b4750788b5..0000000000
--- a/toolkit/components/promiseworker/tests/xpcshell/data/worker.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-// Trivial worker definition
-
-importScripts("resource://gre/modules/workers/require.js");
-var PromiseWorker = require("resource://gre/modules/workers/PromiseWorker.js");
-
-var worker = new PromiseWorker.AbstractWorker();
-worker.dispatch = function(method, args = []) {
- return Agent[method](...args);
-},
-worker.postMessage = function(...args) {
- self.postMessage(...args);
-};
-worker.close = function() {
- self.close();
-};
-worker.log = function(...args) {
- dump("Worker: " + args.join(" ") + "\n");
-};
-self.addEventListener("message", msg => worker.handleMessage(msg));
-
-var Agent = {
- bounce: function(...args) {
- return args;
- },
-
- throwError: function(msg, ...args) {
- throw new Error(msg);
- },
-};
diff --git a/toolkit/components/promiseworker/tests/xpcshell/test_Promise.js b/toolkit/components/promiseworker/tests/xpcshell/test_Promise.js
deleted file mode 100644
index 70f49e92e0..0000000000
--- a/toolkit/components/promiseworker/tests/xpcshell/test_Promise.js
+++ /dev/null
@@ -1,117 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-var Cu = Components.utils;
-
-Cu.import("resource://gre/modules/PromiseWorker.jsm", this);
-Cu.import("resource://gre/modules/Timer.jsm", this);
-
-// Worker must be loaded from a chrome:// uri, not a file://
-// uri, so we first need to load it.
-
-var WORKER_SOURCE_URI = "chrome://promiseworker/content/worker.js";
-do_load_manifest("data/chrome.manifest");
-var worker = new BasePromiseWorker(WORKER_SOURCE_URI);
-worker.log = function(...args) {
- do_print("Controller: " + args.join(" "));
-};
-
-// Test that simple messages work
-add_task(function* test_simple_args() {
- let message = ["test_simple_args", Math.random()];
- let result = yield worker.post("bounce", message);
- Assert.equal(JSON.stringify(result), JSON.stringify(message));
-});
-
-// Test that it works when we don't provide a message
-add_task(function* test_no_args() {
- let result = yield worker.post("bounce");
- Assert.equal(JSON.stringify(result), JSON.stringify([]));
-});
-
-// Test that messages with promise work
-add_task(function* test_promise_args() {
- let message = ["test_promise_args", Promise.resolve(Math.random())];
- let stringified = JSON.stringify((yield Promise.resolve(Promise.all(message))));
- let result = yield worker.post("bounce", message);
- Assert.equal(JSON.stringify(result), stringified);
-});
-
-// Test that messages with delayed promise work
-add_task(function* test_delayed_promise_args() {
- let promise = new Promise(resolve => setTimeout(() => resolve(Math.random()), 10));
- let message = ["test_delayed_promise_args", promise];
- let stringified = JSON.stringify((yield Promise.resolve(Promise.all(message))));
- let result = yield worker.post("bounce", message);
- Assert.equal(JSON.stringify(result), stringified);
-});
-
-// Test that messages with rejected promise cause appropriate errors
-add_task(function* test_rejected_promise_args() {
- let error = new Error();
- let message = ["test_promise_args", Promise.reject(error)];
- try {
- yield worker.post("bounce", message);
- do_throw("I shound have thrown an error by now");
- } catch (ex) {
- if (ex != error)
- throw ex;
- do_print("I threw the right error");
- }
-});
-
-// Test that we can transfer to the worker using argument `transfer`
-add_task(function* test_transfer_args() {
- let array = new Uint8Array(4);
- for (let i = 0; i < 4; ++i) {
- array[i] = i;
- }
- Assert.equal(array.buffer.byteLength, 4, "The buffer is not detached yet");
-
- let result = (yield worker.post("bounce", [array.buffer], [], [array.buffer]))[0];
-
- // Check that the buffer has been sent
- Assert.equal(array.buffer.byteLength, 0, "The buffer has been detached");
-
- // Check that the result is correct
- Assert.equal(result.byteLength, 4, "The result has the right size");
- let array2 = new Uint8Array(result);
- for (let i = 0; i < 4; ++i) {
- Assert.equal(array2[i], i);
- }
-});
-
-// Test that we can transfer to the worker using an instance of `Meta`
-add_task(function* test_transfer_with_meta() {
- let array = new Uint8Array(4);
- for (let i = 0; i < 4; ++i) {
- array[i] = i;
- }
- Assert.equal(array.buffer.byteLength, 4, "The buffer is not detached yet");
-
- let message = new BasePromiseWorker.Meta(array, {transfers: [array.buffer]});
- let result = (yield worker.post("bounce", [message]))[0];
-
- // Check that the buffer has been sent
- Assert.equal(array.buffer.byteLength, 0, "The buffer has been detached");
-
- // Check that the result is correct
- Assert.equal(Object.prototype.toString.call(result), "[object Uint8Array]",
- "The result appears to be a Typed Array");
- Assert.equal(result.byteLength, 4, "The result has the right size");
-
- for (let i = 0; i < 4; ++i) {
- Assert.equal(result[i], i);
- }
-});
-
-add_task(function* test_throw_error() {
- try {
- yield worker.post("throwError", ["error message"]);
- Assert.ok(false, "should have thrown");
- } catch (ex) {
- Assert.equal(ex.message, "Error: error message");
- }
-});
diff --git a/toolkit/components/promiseworker/tests/xpcshell/xpcshell.ini b/toolkit/components/promiseworker/tests/xpcshell/xpcshell.ini
deleted file mode 100644
index 1efcd8c9e0..0000000000
--- a/toolkit/components/promiseworker/tests/xpcshell/xpcshell.ini
+++ /dev/null
@@ -1,9 +0,0 @@
-[DEFAULT]
-head=
-tail=
-skip-if = toolkit == 'android'
-support-files=
- data/worker.js
- data/chrome.manifest
-
-[test_Promise.js]
diff --git a/toolkit/components/prompts/moz.build b/toolkit/components/prompts/moz.build
index 1dc21cca62..b827a11b6d 100644
--- a/toolkit/components/prompts/moz.build
+++ b/toolkit/components/prompts/moz.build
@@ -6,6 +6,4 @@
DIRS += ['src']
-MOCHITEST_MANIFESTS += ['test/mochitest.ini']
-
JAR_MANIFESTS += ['jar.mn']
diff --git a/toolkit/components/prompts/test/.eslintrc.js b/toolkit/components/prompts/test/.eslintrc.js
deleted file mode 100644
index 3c788d6d68..0000000000
--- a/toolkit/components/prompts/test/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../testing/mochitest/mochitest.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/prompts/test/bug619644_inner.html b/toolkit/components/prompts/test/bug619644_inner.html
deleted file mode 100644
index f929c56499..0000000000
--- a/toolkit/components/prompts/test/bug619644_inner.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<head></head><body><p>Original content</p>
-<script>
- window.opener.postMessage("", "*");
- confirm ("Message");
- document.write ("Extra content");
- window.opener.postMessage(document.documentElement.innerHTML, "*");
-</script></body>
diff --git a/toolkit/components/prompts/test/bug625187_iframe.html b/toolkit/components/prompts/test/bug625187_iframe.html
deleted file mode 100644
index 740d59a617..0000000000
--- a/toolkit/components/prompts/test/bug625187_iframe.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<html>
-<head>
- <title>Test for Bug 625187 - the iframe</title>
-<!--
- - Any copyright is dedicated to the Public Domain.
- - http://creativecommons.org/publicdomain/zero/1.0/
- -
- - Contributor(s):
- - Mihai Sucan <mihai.sucan@gmail.com>
- -->
-</head>
-<body>
-<p><button id="btn1" onclick="alert('hello world 2')">Button 2</button></p>
-<p><button id="btn2" onclick="window.parent.alert('hello world 3')">Button 3</button></p>
-</body>
-</html>
diff --git a/toolkit/components/prompts/test/chromeScript.js b/toolkit/components/prompts/test/chromeScript.js
deleted file mode 100644
index 7b2d371007..0000000000
--- a/toolkit/components/prompts/test/chromeScript.js
+++ /dev/null
@@ -1,241 +0,0 @@
-const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/Timer.jsm");
-
-// Define these to make EventUtils happy.
-let window = this;
-let parent = {};
-
-let EventUtils = {};
-Services.scriptloader.loadSubScript(
- "chrome://mochikit/content/tests/SimpleTest/EventUtils.js",
- EventUtils
-);
-
-addMessageListener("handlePrompt", msg => {
- handlePromptWhenItAppears(msg.action, msg.isTabModal, msg.isSelect);
-});
-
-function handlePromptWhenItAppears(action, isTabModal, isSelect) {
- let interval = setInterval(() => {
- if (handlePrompt(action, isTabModal, isSelect)) {
- clearInterval(interval);
- }
- }, 100);
-}
-
-function handlePrompt(action, isTabModal, isSelect) {
- let ui;
-
- if (isTabModal) {
- let browserWin = Services.wm.getMostRecentWindow("navigator:browser");
- let gBrowser = browserWin.gBrowser;
- let promptManager = gBrowser.getTabModalPromptBox(gBrowser.selectedBrowser);
- let prompts = promptManager.listPrompts();
- if (!prompts.length) {
- return false; // try again in a bit
- }
-
- ui = prompts[0].Dialog.ui;
- } else {
- let doc = getDialogDoc();
- if (!doc) {
- return false; // try again in a bit
- }
-
- if (isSelect)
- ui = doc;
- else
- ui = doc.defaultView.Dialog.ui;
-
- }
-
- let promptState;
- if (isSelect) {
- promptState = getSelectState(ui);
- dismissSelect(ui, action);
- } else {
- promptState = getPromptState(ui);
- dismissPrompt(ui, action);
- }
- sendAsyncMessage("promptHandled", { promptState: promptState });
- return true;
-}
-
-function getSelectState(ui) {
- let listbox = ui.getElementById("list");
-
- let state = {};
- state.msg = ui.getElementById("info.txt").value;
- state.selectedIndex = listbox.selectedIndex;
- state.items = [];
-
- for (let i = 0; i < listbox.itemCount; i++) {
- let item = listbox.getItemAtIndex(i).label;
- state.items.push(item);
- }
-
- return state;
-}
-
-function getPromptState(ui) {
- let state = {};
- state.msg = ui.infoBody.textContent;
- state.titleHidden = ui.infoTitle.getAttribute("hidden") == "true";
- state.textHidden = ui.loginContainer.hidden;
- state.passHidden = ui.password1Container.hidden;
- state.checkHidden = ui.checkboxContainer.hidden;
- state.checkMsg = ui.checkbox.label;
- state.checked = ui.checkbox.checked;
- // tab-modal prompts don't have an infoIcon
- state.iconClass = ui.infoIcon ? ui.infoIcon.className : null;
- state.textValue = ui.loginTextbox.getAttribute("value");
- state.passValue = ui.password1Textbox.getAttribute("value");
-
- state.butt0Label = ui.button0.label;
- state.butt1Label = ui.button1.label;
- state.butt2Label = ui.button2.label;
-
- state.butt0Disabled = ui.button0.disabled;
- state.butt1Disabled = ui.button1.disabled;
- state.butt2Disabled = ui.button2.disabled;
-
- function isDefaultButton(b) {
- return (b.hasAttribute("default") &&
- b.getAttribute("default") == "true");
- }
- state.defButton0 = isDefaultButton(ui.button0);
- state.defButton1 = isDefaultButton(ui.button1);
- state.defButton2 = isDefaultButton(ui.button2);
-
- let fm = Cc["@mozilla.org/focus-manager;1"].
- getService(Ci.nsIFocusManager);
- let e = fm.focusedElement;
-
- if (e == null) {
- state.focused = null;
- } else if (ui.button0.isSameNode(e)) {
- state.focused = "button0";
- } else if (ui.button1.isSameNode(e)) {
- state.focused = "button1";
- } else if (ui.button2.isSameNode(e)) {
- state.focused = "button2";
- } else if (ui.loginTextbox.inputField.isSameNode(e)) {
- state.focused = "textField";
- } else if (ui.password1Textbox.inputField.isSameNode(e)) {
- state.focused = "passField";
- } else if (ui.infoBody.isSameNode(e)) {
- state.focused = "infoBody";
- } else {
- state.focused = "ERROR: unexpected element focused: " + (e ? e.localName : "<null>");
- }
-
- return state;
-}
-
-function dismissSelect(ui, action) {
- let dialog = ui.getElementsByTagName("dialog")[0];
- let listbox = ui.getElementById("list");
-
- if (action.selectItem) {
- listbox.selectedIndex = 1;
- }
-
- if (action.buttonClick == "ok") {
- dialog.acceptDialog();
- } else if (action.buttonClick == "cancel") {
- dialog.cancelDialog();
- }
-}
-
-function dismissPrompt(ui, action) {
- if (action.setCheckbox) {
- // Annoyingly, the prompt code is driven by oncommand.
- ui.checkbox.setChecked(true);
- ui.checkbox.doCommand();
- }
-
- if ("textField" in action) {
- ui.loginTextbox.setAttribute("value", action.textField);
- }
-
- if ("passField" in action) {
- ui.password1Textbox.setAttribute("value", action.passField);
- }
-
- switch (action.buttonClick) {
- case "ok":
- case 0:
- ui.button0.click();
- break;
- case "cancel":
- case 1:
- ui.button1.click();
- break;
- case 2:
- ui.button2.click();
- break;
- case "ESC":
- // XXX This is assuming tab-modal.
- let browserWin = Services.wm.getMostRecentWindow("navigator:browser");
- EventUtils.synthesizeKey("KEY_Escape", { code: "Escape" }, browserWin);
- break;
- case "pollOK":
- // Buttons are disabled at the moment, poll until they're reenabled.
- // Can't use setInterval here, because the window's in a modal state
- // and thus DOM events are suppressed.
- let interval = setInterval(() => {
- if (ui.button0.disabled)
- return;
- ui.button0.click();
- clearInterval(interval);
- }, 100);
- break;
-
- default:
- throw "dismissPrompt action listed unknown button.";
- }
-}
-
-function getDialogDoc() {
- // Trudge through all the open windows, until we find the one
- // that has either commonDialog.xul or selectDialog.xul loaded.
- var wm = Cc["@mozilla.org/appshell/window-mediator;1"].
- getService(Ci.nsIWindowMediator);
- // var enumerator = wm.getEnumerator("navigator:browser");
- var enumerator = wm.getXULWindowEnumerator(null);
-
- while (enumerator.hasMoreElements()) {
- var win = enumerator.getNext();
- var windowDocShell = win.QueryInterface(Ci.nsIXULWindow).docShell;
-
- var containedDocShells = windowDocShell.getDocShellEnumerator(
- Ci.nsIDocShellTreeItem.typeChrome,
- Ci.nsIDocShell.ENUMERATE_FORWARDS);
- while (containedDocShells.hasMoreElements()) {
- // Get the corresponding document for this docshell
- var childDocShell = containedDocShells.getNext();
- // We don't want it if it's not done loading.
- if (childDocShell.busyFlags != Ci.nsIDocShell.BUSY_FLAGS_NONE)
- continue;
- var childDoc = childDocShell.QueryInterface(Ci.nsIDocShell)
- .contentViewer
- .DOMDocument;
-
- if (childDoc.location.href != "chrome://global/content/commonDialog.xul" &&
- childDoc.location.href != "chrome://global/content/selectDialog.xul")
- continue;
-
- // We're expecting the dialog to be focused. If it's not yet, try later.
- // (In particular, this is needed on Linux to reliably check focused elements.)
- let fm = Cc["@mozilla.org/focus-manager;1"].
- getService(Ci.nsIFocusManager);
- if (fm.focusedWindow != childDoc.defaultView)
- continue;
-
- return childDoc;
- }
- }
-
- return null;
-}
diff --git a/toolkit/components/prompts/test/mochitest.ini b/toolkit/components/prompts/test/mochitest.ini
deleted file mode 100644
index 7f87650d6b..0000000000
--- a/toolkit/components/prompts/test/mochitest.ini
+++ /dev/null
@@ -1,19 +0,0 @@
-[DEFAULT]
-support-files =
- ../../passwordmgr/test/authenticate.sjs
- bug619644_inner.html
- bug625187_iframe.html
- prompt_common.js
- chromeScript.js
-
-[test_bug619644.html]
-[test_bug620145.html]
-skip-if = toolkit == 'android' #TIMED_OUT
-[test_subresources_prompts.html]
-skip-if = toolkit == 'android'
-[test_dom_prompts.html]
-skip-if = toolkit == 'android' #android: bug 1267092
-[test_modal_prompts.html]
-skip-if = toolkit == 'android' || (os == 'linux' && (debug || asan)) #android: TIMED_OUT (For Linux : 950636)
-[test_modal_select.html]
-skip-if = toolkit == 'android' #android: TIMED_OUT
diff --git a/toolkit/components/prompts/test/prompt_common.js b/toolkit/components/prompts/test/prompt_common.js
deleted file mode 100644
index e3a69b3474..0000000000
--- a/toolkit/components/prompts/test/prompt_common.js
+++ /dev/null
@@ -1,158 +0,0 @@
-const Ci = SpecialPowers.Ci;
-const Cc = SpecialPowers.Cc;
-ok(Ci != null, "Access Ci");
-ok(Cc != null, "Access Cc");
-
-function hasTabModalPrompts() {
- var prefName = "prompts.tab_modal.enabled";
- var Services = SpecialPowers.Cu.import("resource://gre/modules/Services.jsm").Services;
- return Services.prefs.getPrefType(prefName) == Services.prefs.PREF_BOOL &&
- Services.prefs.getBoolPref(prefName);
-}
-var isTabModal = hasTabModalPrompts();
-var isSelectDialog = false;
-var isOSX = ("nsILocalFileMac" in SpecialPowers.Ci);
-var isE10S = SpecialPowers.Services.appinfo.processType == 2;
-
-
-var gChromeScript = SpecialPowers.loadChromeScript(SimpleTest.getTestFileURL("chromeScript.js"));
-SimpleTest.registerCleanupFunction(() => gChromeScript.destroy());
-
-function onloadPromiseFor(id) {
- var iframe = document.getElementById(id);
- return new Promise(resolve => {
- iframe.addEventListener("load", function onload(e) {
- iframe.removeEventListener("load", onload);
- resolve(true);
- });
- });
-}
-
-function handlePrompt(state, action) {
- return new Promise(resolve => {
- gChromeScript.addMessageListener("promptHandled", function handled(msg) {
- gChromeScript.removeMessageListener("promptHandled", handled);
- checkPromptState(msg.promptState, state);
- resolve(true);
- });
- gChromeScript.sendAsyncMessage("handlePrompt", { action: action, isTabModal: isTabModal});
- });
-}
-
-function checkPromptState(promptState, expectedState) {
- // XXX check title? OS X has title in content
- is(promptState.msg, expectedState.msg, "Checking expected message");
- if (isOSX && !isTabModal)
- ok(!promptState.titleHidden, "Checking title always visible on OS X");
- else
- is(promptState.titleHidden, expectedState.titleHidden, "Checking title visibility");
- is(promptState.textHidden, expectedState.textHidden, "Checking textbox visibility");
- is(promptState.passHidden, expectedState.passHidden, "Checking passbox visibility");
- is(promptState.checkHidden, expectedState.checkHidden, "Checking checkbox visibility");
- is(promptState.checkMsg, expectedState.checkMsg, "Checking checkbox label");
- is(promptState.checked, expectedState.checked, "Checking checkbox checked");
- if (!isTabModal)
- is(promptState.iconClass, "spaced " + expectedState.iconClass, "Checking expected icon CSS class");
- is(promptState.textValue, expectedState.textValue, "Checking textbox value");
- is(promptState.passValue, expectedState.passValue, "Checking passbox value");
-
- if (expectedState.butt0Label) {
- is(promptState.butt0Label, expectedState.butt0Label, "Checking accept-button label");
- }
- if (expectedState.butt1Label) {
- is(promptState.butt1Label, expectedState.butt1Label, "Checking cancel-button label");
- }
- if (expectedState.butt2Label) {
- is(promptState.butt2Label, expectedState.butt2Label, "Checking extra1-button label");
- }
-
- // For prompts with a time-delay button.
- if (expectedState.butt0Disabled) {
- is(promptState.butt0Disabled, true, "Checking accept-button is disabled");
- is(promptState.butt1Disabled, false, "Checking cancel-button isn't disabled");
- }
-
- is(promptState.defButton0, expectedState.defButton == "button0", "checking button0 default");
- is(promptState.defButton1, expectedState.defButton == "button1", "checking button1 default");
- is(promptState.defButton2, expectedState.defButton == "button2", "checking button2 default");
-
- if (isOSX && expectedState.focused && expectedState.focused.startsWith("button")) {
- is(promptState.focused, "infoBody", "buttons don't focus on OS X, but infoBody does instead");
- } else {
- is(promptState.focused, expectedState.focused, "Checking focused element");
- }
-}
-
-function checkEchoedAuthInfo(expectedState, doc) {
- // The server echos back the HTTP auth info it received.
- let username = doc.getElementById("user").textContent;
- let password = doc.getElementById("pass").textContent;
- let authok = doc.getElementById("ok").textContent;
-
- is(authok, "PASS", "Checking for successful authentication");
- is(username, expectedState.user, "Checking for echoed username");
- is(password, expectedState.pass, "Checking for echoed password");
-}
-
-/**
- * Create a Proxy to relay method calls on an nsIAuthPrompt[2] prompter to a chrome script which can
- * perform the calls in the parent. Out and inout params will be copied back from the parent to
- * content.
- *
- * @param chromeScript The reference to the chrome script that will listen to `proxyPrompter`
- * messages in the parent and call the `methodName` method.
- * The return value from the message handler should be an object with properties:
- * `rv` - containing the return value of the method call.
- * `args` - containing the array of arguments passed to the method since out or inout ones could have
- * been modified.
- */
-function PrompterProxy(chromeScript) {
- return new Proxy({}, {
- get(target, prop, receiver) {
- return (...args) => {
- // Array of indices of out/inout params to copy from the parent back to the caller.
- let outParams = [];
-
- switch (prop) {
- case "prompt": {
- outParams = [/* result */ 5];
- break;
- }
- case "promptAuth": {
- outParams = [];
- break;
- }
- case "promptPassword": {
- outParams = [/* pwd */ 4];
- break;
- }
- case "promptUsernameAndPassword": {
- outParams = [/* user */ 4, /* pwd */ 5];
- break;
- }
- default: {
- throw new Error("Unknown nsIAuthPrompt method");
- }
- }
-
- let result = chromeScript.sendSyncMessage("proxyPrompter", {
- args,
- methodName: prop,
- })[0][0];
-
- for (let outParam of outParams) {
- // Copy the out or inout param value over the original
- args[outParam].value = result.args[outParam].value;
- }
-
- if (prop == "promptAuth") {
- args[2].username = result.args[2].username;
- args[2].password = result.args[2].password;
- args[2].domain = result.args[2].domain;
- }
-
- return result.rv;
- };
- },
- });
-}
diff --git a/toolkit/components/prompts/test/test_bug619644.html b/toolkit/components/prompts/test/test_bug619644.html
deleted file mode 100644
index 9f61eb18bd..0000000000
--- a/toolkit/components/prompts/test/test_bug619644.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=619644
--->
-<head>
- <title>Test for Bug 619644</title>
- <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="prompt_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=619644">Mozilla Bug 619644</a>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-// This is a little yucky, but it works
-// The contents of bug619644_inner.html
-const expectedFinalDoc =
-"<head><\/head><body><p>Original content<\/p>\n<script>\n window.opener.postMessage(\"\", \"*\");\n confirm (\"Message\");\n document.write (\"Extra content\");\n window.opener.postMessage(document.documentElement.innerHTML, \"*\");\n<\/script>Extra content<\/body>";
-
-if (!isTabModal) {
- todo(false, "Test disabled when tab modal prompts are not enabled.");
-} else {
- inittest();
-}
-
-var promptDone;
-
-function inittest() {
- window.addEventListener("message", runtest, false);
- window.open("bug619644_inner.html", "619644");
-
- SimpleTest.waitForExplicitFinish();
-}
-
-function runtest(e) {
- window.removeEventListener("message", runtest, false);
- window.addEventListener("message", checktest, false);
-
- let state = {
- msg : "Message",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "button0",
- defButton : "button0",
- };
- let action = {
- buttonClick: "ESC",
- };
-
- promptDone = handlePrompt(state, action);
-}
-
-function checktest(e) {
- is(e.data, expectedFinalDoc, "ESC press should not abort document load");
- e.source.close();
- promptDone.then(endtest);
-}
-
-function endtest() {
- info("Ending test");
- SimpleTest.finish();
-}
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/prompts/test/test_bug620145.html b/toolkit/components/prompts/test/test_bug620145.html
deleted file mode 100644
index bb4470259d..0000000000
--- a/toolkit/components/prompts/test/test_bug620145.html
+++ /dev/null
@@ -1,105 +0,0 @@
-<html>
-<head>
- <title>Test for Bug 620145</title>
- <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="prompt_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=620145">Mozilla Bug 620145</a>
-<pre id="test">
-</pre>
-
-<div id="text" style="max-width: 100px" onmouseup="openAlert()">
- This is a short piece of text used for testing that mouse selecting is
- stopped when an alert appears.
-</div>
-<div id="text2" style="max-width: 100px">
- This is another short piece of text used for testing that mouse selecting is
- stopped when an alert appears.
-</div>
-<button id="button" onmouseup="openAlert()">Button</button>
-
-<script class="testbody" type="text/javascript">
-var selectionTest = false;
-
-function openAlert() {
- info("opening alert...");
- alert("hello!");
- info("...alert done.");
-}
-
-add_task(function* runTest() {
- var state, action;
- // The <button> in this test's HTML opens a prompt when clicked.
- // Here we send the events to simulate clicking it.
- info("isTabModal? " + isTabModal);
- selectionTest = isTabModal;
-
- state = {
- msg : "hello!",
- iconClass : "alert-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "button0",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- };
-
- promptDone = handlePrompt(state, action);
-
- var button = $("button");
- dispatchMouseEvent(button, "mousedown");
- dispatchMouseEvent(button, "mouseup");
- // alert appears at this point, to be closed by the chrome script.
-
- yield promptDone;
- checkSelection();
-
- // using same state and action.
- promptDone = handlePrompt(state, action);
-
- var text = $("text");
- dispatchMouseEvent(text, "mousedown");
- dispatchMouseEvent(text, "mouseup");
- // alert appears at this point, to be closed by the chrome script.
-
- yield promptDone;
- checkSelection();
-});
-
-function dispatchMouseEvent(target, type)
-{
- var win = target.ownerDocument.defaultView;
- e = document.createEvent("MouseEvent");
- e.initEvent(type, false, false, win, 0, 1, 1, 1, 1,
- false, false, false, false, 0, null);
- var utils = SpecialPowers.getDOMWindowUtils(win);
- utils.dispatchDOMEventViaPresShell(target, e, true);
- ok(true, type + " sent to " + target.id);
-}
-
-function checkSelection()
-{
- if (!selectionTest) {
- todo(false, "Selection test is disabled when tab modal prompts are not enabled.");
- } else {
- synthesizeMouse($("text"), 25, 55, { type: "mousemove" });
- is(window.getSelection().toString(), "", "selection not made");
- }
-}
-</script>
-
-</body>
-</html>
diff --git a/toolkit/components/prompts/test/test_dom_prompts.html b/toolkit/components/prompts/test/test_dom_prompts.html
deleted file mode 100644
index 413ed8fd51..0000000000
--- a/toolkit/components/prompts/test/test_dom_prompts.html
+++ /dev/null
@@ -1,208 +0,0 @@
-<html>
-<head>
- <title>Test for DOM prompts</title>
- <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="prompt_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<pre id="test">
-</pre>
-
-<script class="testbody" type="text/javascript">
-var rv;
-var state, action;
-
-add_task(function* test_alert_ok() {
- info("Starting test: Alert");
- state = {
- msg : "This is the alert text.",
- iconClass : "alert-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "button0",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- };
-
- promptDone = handlePrompt(state, action);
-
- alert("This is the alert text.");
-
- yield promptDone;
-});
-
-// bug 861605 made the arguments to alert/confirm optional (prompt already was).
-add_task(function* test_alert_noargs() {
- info("Starting test: Alert with no args");
- state = {
- msg : "",
- iconClass : "alert-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "button0",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- };
-
- promptDone = handlePrompt(state, action);
-
- try {
- alert();
- ok(true, "alert() without arguments should not throw!");
- } catch (e) {
- ok(false, "alert() without arguments should not throw!");
- }
-
- yield promptDone;
-});
-
-
-add_task(function* test_confirm_ok() {
- info("Starting test: Confirm");
- state = {
- msg : "This is the confirm text.",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "button0",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- };
-
- promptDone = handlePrompt(state, action);
-
- rv = confirm("This is the confirm text.");
- is(rv, true, "check prompt return value");
-
- yield promptDone;
-});
-
-// bug 861605 made the arguments to alert/confirm optional (prompt already was).
-add_task(function* test_confirm_noargs() {
- info("Starting test: Confirm with no args");
- state = {
- msg : "",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "button0",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- };
-
- promptDone = handlePrompt(state, action);
-
- try {
- rv = confirm();
- ok(true, "confirm() without arguments should not throw!");
- } catch (e) {
- ok(false, "confirm() without arguments should not throw!");
- }
- is(rv, true, "check prompt return value");
-
- yield promptDone;
-});
-
-
-add_task(function* test_prompt_ok() {
- info("Starting test: Prompt");
- state = {
- msg : "This is the Prompt text.",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- };
-
- promptDone = handlePrompt(state, action);
-
- rv = prompt("This is the Prompt text.");
- is(rv, "", "check prompt return value");
-
- yield promptDone;
-});
-
-// bug 861605 made the arguments to alert/confirm optional (prompt already was).
-add_task(function* test_prompt_noargs() {
- info("Starting test: Prompt with no args");
- state = {
- msg : "",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- };
-
- promptDone = handlePrompt(state, action);
-
- try {
- rv = prompt();
- ok(true, "prompt() without arguments should not throw!");
- } catch (e) {
- ok(false, "prompt() without arguments should not throw!");
- }
- is(rv, "", "check prompt return value");
-
- yield promptDone;
-});
-
-</script>
-
-</body>
-</html>
diff --git a/toolkit/components/prompts/test/test_modal_prompts.html b/toolkit/components/prompts/test/test_modal_prompts.html
deleted file mode 100644
index 42e6be52c3..0000000000
--- a/toolkit/components/prompts/test/test_modal_prompts.html
+++ /dev/null
@@ -1,1184 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Modal Prompts Test</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="prompt_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Prompter tests: modal prompts
-<p id="display"></p>
-
-<div id="content" style="display: none">
- <iframe id="iframe"></iframe>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript;version=1.8">
-
-function* runTests() {
- const { NetUtil } = SpecialPowers.Cu.import('resource://gre/modules/NetUtil.jsm');
- let state, action;
- ok(true, "Running tests (isTabModal=" + isTabModal + ", usePromptService=" + usePromptService + ")");
-
- let prompter, promptArgs;
- if (usePromptService) {
- prompter = Cc["@mozilla.org/embedcomp/prompt-service;1"].
- getService(Ci.nsIPromptService2);
- } else {
- prompter = Cc["@mozilla.org/prompter;1"].
- getService(Ci.nsIPromptFactory).
- getPrompt(window, Ci.nsIPrompt);
- if (isTabModal) {
- let bag = prompter.QueryInterface(Ci.nsIWritablePropertyBag2);
- bag.setPropertyAsBool("allowTabModal", true);
- }
- }
-
- let checkVal = {};
- let textVal = {};
- let passVal = {};
- let flags;
- let isOK, clickedButton;
-
- // =====
- info("Starting test: Alert");
- state = {
- msg : "This is the alert text.",
- title : "TestTitle",
- iconClass : "alert-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "button0",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- };
-
- promptDone = handlePrompt(state, action);
-
- promptArgs = ["TestTitle", "This is the alert text."];
- if (usePromptService)
- promptArgs.unshift(window);
- prompter.alert.apply(null, promptArgs);
-
- yield promptDone;
-
- // =====
- info("Starting test: AlertCheck (null checkbox label, so it's hidden)");
- state = {
- msg : "This is the alertCheck text.",
- title : "TestTitle",
- iconClass : "alert-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "button0",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- };
-
- promptDone = handlePrompt(state, action);
-
- promptArgs = ["TestTitle", "This is the alertCheck text.", null, {}];
- if (usePromptService)
- promptArgs.unshift(window);
- prompter.alertCheck.apply(null, promptArgs);
-
- yield promptDone;
-
- // =====
- info("Starting test: AlertCheck");
- state = {
- msg : "This is the alertCheck text.",
- title : "TestTitle",
- iconClass : "alert-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : false,
- textValue : "",
- passValue : "",
- checkMsg : "Check me out!",
- checked : false,
- focused : "button0",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- setCheckbox: true,
- };
-
- promptDone = handlePrompt(state, action);
-
- checkVal.value = false;
- promptArgs = ["TestTitle", "This is the alertCheck text.", "Check me out!", checkVal];
- if (usePromptService)
- promptArgs.unshift(window);
- prompter.alertCheck.apply(null, promptArgs);
- is(checkVal.value, true, "checkbox was checked");
-
- yield promptDone;
-
- // =====
- info("Starting test: Confirm (ok)");
- state = {
- msg : "This is the confirm text.",
- title : "TestTitle",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "button0",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- };
-
- promptDone = handlePrompt(state, action);
-
- promptArgs = ["TestTitle", "This is the confirm text."];
- if (usePromptService)
- promptArgs.unshift(window);
- isOK = prompter.confirm.apply(null, promptArgs);
- is(isOK, true, "checked expected retval");
-
- yield promptDone;
-
- // =====
- info("Starting test: Confirm (cancel)");
- state = {
- msg : "This is the confirm text.",
- title : "TestTitle",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "button0",
- defButton : "button0",
- };
- action = {
- buttonClick: "cancel",
- };
-
- promptDone = handlePrompt(state, action);
-
- promptArgs = ["TestTitle", "This is the confirm text."];
- if (usePromptService)
- promptArgs.unshift(window);
- isOK = prompter.confirm.apply(null, promptArgs);
- is(isOK, false, "checked expected retval");
-
- yield promptDone;
-
- // =====
- info("Starting test: ConfirmCheck (ok, null checkbox label)");
- state = {
- msg : "This is the confirmCheck text.",
- title : "TestTitle",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "button0",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- };
-
- promptDone = handlePrompt(state, action);
-
- promptArgs = ["TestTitle", "This is the confirmCheck text.", null, {}];
- if (usePromptService)
- promptArgs.unshift(window);
- isOK = prompter.confirmCheck.apply(null, promptArgs);
- is(isOK, true, "checked expected retval");
-
- yield promptDone;
-
- // =====
- info("Starting test: ConfirmCheck (cancel, null checkbox label)");
- state = {
- msg : "This is the confirmCheck text.",
- title : "TestTitle",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "button0",
- defButton : "button0",
- };
- action = {
- buttonClick: "cancel",
- };
-
- promptDone = handlePrompt(state, action);
-
- promptArgs = ["TestTitle", "This is the confirmCheck text.", null, {}];
- if (usePromptService)
- promptArgs.unshift(window);
- isOK = prompter.confirmCheck.apply(null, promptArgs);
- is(isOK, false, "checked expected retval");
-
- yield promptDone;
-
- // =====
- info("Starting test: ConfirmCheck (ok)");
- state = {
- msg : "This is the confirmCheck text.",
- title : "TestTitle",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : false,
- textValue : "",
- passValue : "",
- checkMsg : "Check me out!",
- checked : false,
- focused : "button0",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- setCheckbox: true,
- };
-
- promptDone = handlePrompt(state, action);
-
- checkVal.value = false;
- promptArgs = ["TestTitle", "This is the confirmCheck text.", "Check me out!", checkVal];
- if (usePromptService)
- promptArgs.unshift(window);
- isOK = prompter.confirmCheck.apply(null, promptArgs);
- is(isOK, true, "checked expected retval");
- is(checkVal.value, true, "expected checkbox setting");
-
- yield promptDone;
-
- // =====
- info("Starting test: ConfirmCheck (cancel)");
- state = {
- msg : "This is the confirmCheck text.",
- title : "TestTitle",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : false,
- textValue : "",
- passValue : "",
- checkMsg : "Check me out!",
- checked : false,
- focused : "button0",
- defButton : "button0",
- };
- action = {
- buttonClick: "cancel",
- setCheckbox: true,
- };
-
- promptDone = handlePrompt(state, action);
-
- checkVal.value = false;
- promptArgs = ["TestTitle", "This is the confirmCheck text.", "Check me out!", checkVal];
- if (usePromptService)
- promptArgs.unshift(window);
- isOK = prompter.confirmCheck.apply(null, promptArgs);
- is(isOK, false, "checked expected retval");
- is(checkVal.value, true, "expected checkbox setting");
-
- yield promptDone;
-
- // =====
- info("Starting test: Prompt (ok, no default text)");
- state = {
- msg : "This is the prompt text.",
- title : "TestTitle",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- textField : "bacon",
- };
-
- promptDone = handlePrompt(state, action);
-
- textVal.value = "";
- promptArgs = ["TestTitle", "This is the prompt text.", textVal, null, {}];
- if (usePromptService)
- promptArgs.unshift(window);
- isOK = prompter.prompt.apply(null, promptArgs);
- is(isOK, true, "checked expected retval");
- is(textVal.value, "bacon", "checking expected text value");
-
- yield promptDone;
-
- // =====
- info("Starting test: Prompt (ok, default text)");
- state = {
- msg : "This is the prompt text.",
- title : "TestTitle",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : true,
- checkHidden : true,
- textValue : "kittens",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- };
-
- promptDone = handlePrompt(state, action);
-
- textVal.value = "kittens";
- promptArgs = ["TestTitle", "This is the prompt text.", textVal, null, {}];
- if (usePromptService)
- promptArgs.unshift(window);
- isOK = prompter.prompt.apply(null, promptArgs);
- is(isOK, true, "checked expected retval");
- is(textVal.value, "kittens", "checking expected text value");
-
- yield promptDone;
-
- // =====
- info("Starting test: Prompt (cancel, default text)");
- state = {
- msg : "This is the prompt text.",
- title : "TestTitle",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : true,
- checkHidden : true,
- textValue : "puppies",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick: "cancel",
- };
-
- promptDone = handlePrompt(state, action);
-
- textVal.value = "puppies";
- promptArgs = ["TestTitle", "This is the prompt text.", textVal, null, {}];
- if (usePromptService)
- promptArgs.unshift(window);
- isOK = prompter.prompt.apply(null, promptArgs);
- is(isOK, false, "checked expected retval");
- is(textVal.value, "puppies", "checking expected text value");
-
- yield promptDone;
-
- // =====
- info("Starting test: Prompt (cancel, default text modified)");
- state = {
- msg : "This is the prompt text.",
- title : "TestTitle",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : true,
- checkHidden : true,
- textValue : "puppies",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "cancel",
- textField : "bacon",
- };
-
- promptDone = handlePrompt(state, action);
-
- textVal.value = "puppies";
- promptArgs = ["TestTitle", "This is the prompt text.", textVal, null, {}];
- if (usePromptService)
- promptArgs.unshift(window);
- isOK = prompter.prompt.apply(null, promptArgs);
- is(isOK, false, "checked expected retval");
- is(textVal.value, "puppies", "checking expected text value");
-
- yield promptDone;
-
- // =====
- info("Starting test: Prompt (ok, with checkbox)");
- state = {
- msg : "This is the prompt text.",
- title : "TestTitle",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : true,
- checkHidden : false,
- textValue : "tribbles",
- passValue : "",
- checkMsg : "Check me out!",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- setCheckbox: true,
- };
-
- promptDone = handlePrompt(state, action);
-
- textVal.value = "tribbles";
- checkVal.value = false;
- promptArgs = ["TestTitle", "This is the prompt text.", textVal, "Check me out!", checkVal];
- if (usePromptService)
- promptArgs.unshift(window);
- isOK = prompter.prompt.apply(null, promptArgs);
- is(isOK, true, "checked expected retval");
- is(textVal.value, "tribbles", "checking expected text value");
- is(checkVal.value, true, "expected checkbox setting");
-
- yield promptDone;
-
- // =====
- info("Starting test: Prompt (cancel, with checkbox)");
- state = {
- msg : "This is the prompt text.",
- title : "TestTitle",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : true,
- checkHidden : false,
- textValue : "tribbles",
- passValue : "",
- checkMsg : "Check me out!",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick: "cancel",
- setCheckbox: true,
- };
-
- promptDone = handlePrompt(state, action);
-
- textVal.value = "tribbles";
- checkVal.value = false;
- promptArgs = ["TestTitle", "This is the prompt text.", textVal, "Check me out!", checkVal];
- if (usePromptService)
- promptArgs.unshift(window);
- isOK = prompter.prompt.apply(null, promptArgs);
- is(isOK, false, "checked expected retval");
- is(textVal.value, "tribbles", "checking expected text value");
- is(checkVal.value, false, "expected checkbox setting");
-
- yield promptDone;
-
- // =====
- // Just two tests for this, since password manager already tests this extensively.
- info("Starting test: PromptUsernameAndPassword (ok)");
- state = {
- msg : "This is the pUAP text.",
- title : "TestTitle",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : false,
- textValue : "usr",
- passValue : "ssh",
- checkMsg : "Check me out!",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- setCheckbox: true,
- textField: "newusr",
- passField: "newssh",
- };
-
- promptDone = handlePrompt(state, action);
-
- textVal.value = "usr";
- passVal.value = "ssh";
- checkVal.value = false;
- promptArgs = ["TestTitle", "This is the pUAP text.", textVal, passVal, "Check me out!", checkVal];
- if (usePromptService)
- promptArgs.unshift(window);
- isOK = prompter.promptUsernameAndPassword.apply(null, promptArgs);
- is(isOK, true, "checked expected retval");
- is(textVal.value, "newusr", "checking expected text value");
- is(passVal.value, "newssh", "checking expected pass value");
- is(checkVal.value, true, "expected checkbox setting");
-
- yield promptDone;
-
- // =====
- info("Starting test: PromptUsernameAndPassword (cancel)");
- state = {
- msg : "This is the pUAP text.",
- title : "TestTitle",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : false,
- textValue : "usr",
- passValue : "ssh",
- checkMsg : "Check me out!",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "cancel",
- setCheckbox : true,
- textField : "newusr",
- passField : "newssh",
- };
-
- promptDone = handlePrompt(state, action);
-
- textVal.value = "usr";
- passVal.value = "ssh";
- checkVal.value = false;
- promptArgs = ["TestTitle", "This is the pUAP text.", textVal, passVal, "Check me out!", checkVal];
- if (usePromptService)
- promptArgs.unshift(window);
- isOK = prompter.promptUsernameAndPassword.apply(null, promptArgs);
- is(isOK, false, "checked expected retval");
- is(textVal.value, "usr", "checking expected text value");
- is(passVal.value, "ssh", "checking expected pass value");
- is(checkVal.value, false, "expected checkbox setting");
-
- yield promptDone;
-
- // =====
- info("Starting test: PromptPassword (ok)");
- state = {
- msg : "This is the promptPassword text.",
- title : "TestTitle",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : false,
- checkHidden : false,
- textValue : "",
- passValue : "ssh",
- checkMsg : "Check me out!",
- checked : false,
- focused : "passField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- setCheckbox : true,
- passField : "newssh",
- };
-
- promptDone = handlePrompt(state, action);
-
- passVal.value = "ssh";
- checkVal.value = false;
- promptArgs = ["TestTitle", "This is the promptPassword text.", passVal, "Check me out!", checkVal];
- if (usePromptService)
- promptArgs.unshift(window);
- isOK = prompter.promptPassword.apply(null, promptArgs);
- is(isOK, true, "checked expected retval");
- is(passVal.value, "newssh", "checking expected pass value");
- is(checkVal.value, true, "expected checkbox setting");
-
- yield promptDone;
-
- // =====
- info("Starting test: PromptPassword (cancel)");
- state = {
- msg : "This is the promptPassword text.",
- title : "TestTitle",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : false,
- checkHidden : false,
- textValue : "",
- passValue : "ssh",
- checkMsg : "Check me out!",
- checked : false,
- focused : "passField",
- defButton : "button0",
- };
- action = {
- buttonClick : "cancel",
- setCheckbox : true,
- passField : "newssh",
- };
-
- promptDone = handlePrompt(state, action);
-
- passVal.value = "ssh";
- checkVal.value = false;
- promptArgs = ["TestTitle", "This is the promptPassword text.", passVal, "Check me out!", checkVal];
- if (usePromptService)
- promptArgs.unshift(window);
- isOK = prompter.promptPassword.apply(null, promptArgs);
- is(isOK, false, "checked expected retval");
- is(passVal.value, "ssh", "checking expected pass value");
- is(checkVal.value, false, "expected checkbox setting");
-
- yield promptDone;
-
- // =====
- info("Starting test: ConfirmEx (ok/cancel, ok)");
- state = {
- msg : "This is the confirmEx text.",
- title : "TestTitle",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "button0",
- defButton : "button0",
- butt0Label : "OK",
- butt1Label : "Cancel",
- };
- action = {
- buttonClick: "ok",
- };
-
- promptDone = handlePrompt(state, action);
-
- flags = Ci.nsIPromptService.STD_OK_CANCEL_BUTTONS;
- promptArgs = ["TestTitle", "This is the confirmEx text.", flags, null, null, null, null, {}];
- if (usePromptService)
- promptArgs.unshift(window);
- clickedButton = prompter.confirmEx.apply(null, promptArgs);
- is(clickedButton, 0, "checked expected button num click");
-
- yield promptDone;
-
- // =====
- info("Starting test: ConfirmEx (yes/no, cancel)");
- state = {
- msg : "This is the confirmEx text.",
- title : "TestTitle",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "button0",
- defButton : "button0",
- butt0Label : "Yes",
- butt1Label : "No",
- };
- action = {
- buttonClick: "cancel",
- };
-
- promptDone = handlePrompt(state, action);
-
- flags = Ci.nsIPromptService.STD_YES_NO_BUTTONS;
- promptArgs = ["TestTitle", "This is the confirmEx text.", flags, null, null, null, null, {}];
- if (usePromptService)
- promptArgs.unshift(window);
- clickedButton = prompter.confirmEx.apply(null, promptArgs);
- is(clickedButton, 1, "checked expected button num click");
-
- yield promptDone;
-
- // =====
- info("Starting test: ConfirmEx (buttons from args, checkbox, ok)");
- state = {
- msg : "This is the confirmEx text.",
- title : "TestTitle",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : false,
- textValue : "",
- passValue : "",
- checkMsg : "Check me out!",
- checked : false,
- focused : "button0",
- defButton : "button0",
- butt0Label : "butt0",
- butt1Label : "butt1",
- butt2Label : "butt2",
- };
- action = {
- buttonClick: "ok",
- setCheckbox: true,
- };
-
- promptDone = handlePrompt(state, action);
-
- let b = Ci.nsIPromptService.BUTTON_TITLE_IS_STRING;
- flags = b * Ci.nsIPromptService.BUTTON_POS_2 +
- b * Ci.nsIPromptService.BUTTON_POS_1 +
- b * Ci.nsIPromptService.BUTTON_POS_0;
- checkVal.value = false;
- promptArgs = ["TestTitle", "This is the confirmEx text.", flags,
- "butt0", "butt1", "butt2", "Check me out!", checkVal];
- if (usePromptService)
- promptArgs.unshift(window);
- clickedButton = prompter.confirmEx.apply(null, promptArgs);
- is(clickedButton, 0, "checked expected button num click");
- is(checkVal.value, true, "expected checkbox setting");
-
- yield promptDone;
-
- // =====
- info("Starting test: ConfirmEx (buttons from args, checkbox, cancel)");
- state = {
- msg : "This is the confirmEx text.",
- title : "TestTitle",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : false,
- textValue : "",
- passValue : "",
- checkMsg : "Check me out!",
- checked : false,
- focused : "button1", // Default changed!
- defButton : "button1",
- butt0Label : "butt0",
- butt1Label : "butt1",
- butt2Label : "butt2",
- };
- action = {
- buttonClick: "cancel",
- setCheckbox: true,
- };
-
- promptDone = handlePrompt(state, action);
-
- b = Ci.nsIPromptService.BUTTON_TITLE_IS_STRING;
- flags = b * Ci.nsIPromptService.BUTTON_POS_2 +
- b * Ci.nsIPromptService.BUTTON_POS_1 +
- b * Ci.nsIPromptService.BUTTON_POS_0;
- flags ^= Ci.nsIPromptService.BUTTON_POS_1_DEFAULT;
- checkVal.value = false;
- promptArgs = ["TestTitle", "This is the confirmEx text.", flags,
- "butt0", "butt1", "butt2", "Check me out!", checkVal];
- if (usePromptService)
- promptArgs.unshift(window);
- clickedButton = prompter.confirmEx.apply(null, promptArgs);
- is(clickedButton, 1, "checked expected button num click");
- is(checkVal.value, true, "expected checkbox setting");
-
- yield promptDone;
-
- // =====
- info("Starting test: ConfirmEx (buttons from args, checkbox, button3)");
- state = {
- msg : "This is the confirmEx text.",
- title : "TestTitle",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : false,
- textValue : "",
- passValue : "",
- checkMsg : "Check me out!",
- checked : false,
- focused : "button2", // Default changed!
- defButton : "button2",
- butt0Label : "butt0",
- butt1Label : "butt1",
- butt2Label : "butt2",
- };
- action = {
- buttonClick: 2,
- setCheckbox: true,
- };
-
- promptDone = handlePrompt(state, action);
-
- b = Ci.nsIPromptService.BUTTON_TITLE_IS_STRING;
- flags = b * Ci.nsIPromptService.BUTTON_POS_2 +
- b * Ci.nsIPromptService.BUTTON_POS_1 +
- b * Ci.nsIPromptService.BUTTON_POS_0;
- flags ^= Ci.nsIPromptService.BUTTON_POS_2_DEFAULT;
- checkVal.value = false;
- promptArgs = ["TestTitle", "This is the confirmEx text.", flags,
- "butt0", "butt1", "butt2", "Check me out!", checkVal];
- if (usePromptService)
- promptArgs.unshift(window);
- clickedButton = prompter.confirmEx.apply(null, promptArgs);
- is(clickedButton, 2, "checked expected button num click");
- is(checkVal.value, true, "expected checkbox setting");
-
- yield promptDone;
-
- // =====
- // (skipped for E10S and tabmodal tests: window is required)
- info("Starting test: Alert, no window");
- state = {
- msg : "This is the alert text.",
- title : "TestTitle",
- iconClass : "alert-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "button0",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- };
- if (!isTabModal && !isE10S) {
- promptDone = handlePrompt(state, action);
-
- promptArgs = ["TestTitle", "This is the alert text."];
- if (usePromptService)
- promptArgs.unshift(null);
- prompter.alert.apply(null, promptArgs);
-
- yield promptDone;
- }
-
-
- // =====
- // (skipped for tabmodal tests: delay not supported)
- info("Starting test: ConfirmEx (delay, ok)");
- state = {
- msg : "This is the confirmEx delay text.",
- title : "TestTitle",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : null, // nothing focused until after delay fires
- defButton : "button0",
- butt0Label : "OK",
- butt1Label : "Cancel",
- butt0Disabled: true,
- };
-
- // OS X doesn't initially focus the button, but rather the infoBody.
- // The focus stays there even after the button-enable delay has fired.
- if (isOSX)
- state.focused = "infoBody";
-
- action = {
- buttonClick: "pollOK",
- };
- if (!isTabModal) {
- promptDone = handlePrompt(state, action);
-
- flags = (Ci.nsIPromptService.STD_OK_CANCEL_BUTTONS | Ci.nsIPromptService.BUTTON_DELAY_ENABLE);
- promptArgs = ["TestTitle", "This is the confirmEx delay text.", flags, null, null, null, null, {}];
- if (usePromptService)
- promptArgs.unshift(window);
- clickedButton = prompter.confirmEx.apply(null, promptArgs);
- is(clickedButton, 0, "checked expected button num click");
-
- yield promptDone;
- }
-
- // promptAuth already tested via password manager but do a few specific things here.
- var channel = NetUtil.newChannel({
- uri: "http://example.com",
- loadUsingSystemPrincipal: true
- });
-
- var level = Ci.nsIAuthPrompt2.LEVEL_NONE;
- var authinfo = {
- username : "",
- password : "",
- domain : "",
- flags : Ci.nsIAuthInformation.AUTH_HOST,
- authenticationScheme : "basic",
- realm : ""
- };
-
-
- // =====
- // (promptAuth is only accessible from the prompt service)
- info("Starting test: promptAuth with empty realm");
- state = {
- msg : 'http://example.com is requesting your username and password.',
- title : "TestTitle",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : false,
- textValue : "",
- passValue : "",
- checkMsg : "Check me out!",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- setCheckbox : true,
- textField : "username",
- passField : "password",
- };
- if (usePromptService) {
- promptDone = handlePrompt(state, action);
-
- checkVal.value = false;
- isOK = prompter.promptAuth(window, channel, level, authinfo, "Check me out!", checkVal);
- is(isOK, true, "checked expected retval");
- is(authinfo.username, "username", "checking filled username");
- is(authinfo.password, "password", "checking filled password");
- is(checkVal.value, true, "expected checkbox setting");
-
- yield promptDone;
- }
-
-
- // =====
- // (promptAuth is only accessible from the prompt service)
- info("Starting test: promptAuth with long realm");
- state = {
- msg : 'http://example.com is requesting your username and password. The site ' +
- 'says: \u201cabcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi ' +
- 'abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi ' +
- 'abcdefghi \u2026\u201d',
- title : "TestTitle",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : false,
- textValue : "",
- passValue : "",
- checkMsg : "Check me out!",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- setCheckbox : true,
- textField : "username",
- passField : "password",
- };
- if (usePromptService) {
- promptDone = handlePrompt(state, action);
-
- checkVal.value = false;
- var longString = "";
- for (var i = 0; i < 20; i++)
- longString += "abcdefghi "; // 200 chars long
- authinfo.realm = longString;
- authinfo.username = "";
- authinfo.password = "";
- isOK = prompter.promptAuth(window, channel, level, authinfo, "Check me out!", checkVal);
- is(isOK, true, "checked expected retval");
- is(authinfo.username, "username", "checking filled username");
- is(authinfo.password, "password", "checking filled password");
- is(checkVal.value, true, "expected checkbox setting");
-
- yield promptDone;
- }
-
- info("Starting test: promptAuth for a cross-origin and a empty realm");
- authinfo = {
- username : "",
- password : "",
- domain : "",
- flags : Ci. nsIAuthInformation.AUTH_HOST |
- Ci.nsIAuthInformation.CROSS_ORIGIN_SUB_RESOURCE,
- authenticationScheme : "basic",
- realm : ""
- }
- state = {
- msg : 'http://example.com is requesting your username and password. ' +
- 'WARNING: Your password will not be sent to the website you are currently visiting!',
- title : "TestTitle",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : false,
- textValue : "",
- passValue : "",
- checkMsg : "Check me out!",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- setCheckbox : false,
- textField : "username",
- passField : "password",
- };
- if (usePromptService) {
- promptDone = handlePrompt(state, action);
- checkVal.value = false;
- isOK = prompter.promptAuth(window, channel, level, authinfo, "Check me out!", checkVal);
- is(isOK, true, "checked expected retval");
- is(authinfo.username, "username", "checking filled username");
- is(authinfo.password, "password", "checking filled password");
- is(checkVal.value, false, "expected checkbox setting");
-
- yield promptDone;
- }
-
- info("Starting test: promptAuth for a cross-origin with realm");
- authinfo = {
- username : "",
- password : "",
- domain : "",
- flags : Ci. nsIAuthInformation.AUTH_HOST | Ci.nsIAuthInformation.CROSS_ORIGIN_SUB_RESOURCE,
- authenticationScheme : "basic",
- realm : "Something!!!"
- }
- state = {
- msg : 'http://example.com is requesting your username and password. ' +
- 'WARNING: Your password will not be sent to the website you are currently visiting!',
- title : "TestTitle",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : false,
- textValue : "",
- passValue : "",
- checkMsg : "Check me out!",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick : "ok",
- setCheckbox : false,
- textField : "username",
- passField : "password",
- };
- if (usePromptService) {
- promptDone = handlePrompt(state, action);
-
- checkVal.value = false;
- isOK = prompter.promptAuth(window, channel, level, authinfo, "Check me out!", checkVal);
- is(isOK, true, "checked expected retval");
- is(authinfo.username, "username", "checking filled username");
- is(authinfo.password, "password", "checking filled password");
- is(checkVal.value, false, "expected checkbox setting");
-
- yield promptDone;
- }
-}
-
-let usePromptService;
-
-/*
- * Run the body of the 3 times:
- * - 1st pass: with window-modal prompts, using nsIPromptService
- * - 2nd pass: still window-modal, using nsIPrompt directly (via nsIPromptFactory)
- * - 3rd pass: with tab-modal prompts. Can't opt into these via * nsIPromptService.
- */
-
-add_task(function* runPromptTests() {
- info("Process type: " + SpecialPowers.Services.appinfo.processType);
-
- isTabModal = false; usePromptService = true;
- info("Running tests with: isTabModal=" + isTabModal + ", usePromptService=" + usePromptService);
- yield* runTests();
-
- isTabModal = false; usePromptService = false;
- info("Running tests with: isTabModal=" + isTabModal + ", usePromptService=" + usePromptService);
- yield* runTests();
-
- if (SpecialPowers.getBoolPref("prompts.tab_modal.enabled")) {
- isTabModal = true; usePromptService = false;
- info("Running tests with: isTabModal=" + isTabModal + ", usePromptService=" + usePromptService);
- yield* runTests();
- }
-});
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/prompts/test/test_modal_select.html b/toolkit/components/prompts/test/test_modal_select.html
deleted file mode 100644
index 1e008d0f44..0000000000
--- a/toolkit/components/prompts/test/test_modal_select.html
+++ /dev/null
@@ -1,146 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Modal Prompts Test</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="prompt_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Prompter tests: modal prompts
-<p id="display"></p>
-
-<div id="content" style="display: none">
- <iframe id="iframe"></iframe>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript;version=1.8">
-
-let prompter = Cc["@mozilla.org/embedcomp/prompt-service;1"].
- getService(Ci.nsIPromptService2);
-
-function checkPromptState(promptState, expectedState) {
- // XXX check title? OS X has title in content
- // XXX check focused element
- // XXX check button labels?
-
- is(promptState.msg, expectedState.msg, "Checking expected message");
-
- // Compare listbox contents
- is(promptState.items.length, expectedState.items.length, "Checking listbox length");
-
- if (promptState.items.length)
- is(promptState.selectedIndex, 0, "Checking selected index");
-
- for (let i = 0; i < promptState.items; i++) {
- is(promptState.items[i], expectedState.items[i], "Checking list item #" + i);
- }
-}
-
-let selectVal = {};
-let isOK;
-let state, action;
-
-function handlePrompt(state, action) {
- return new Promise(resolve => {
- gChromeScript.addMessageListener("promptHandled", function handled(msg) {
- gChromeScript.removeMessageListener("promptHandled", handled);
- checkPromptState(msg.promptState, state);
- resolve(true);
- });
- gChromeScript.sendAsyncMessage("handlePrompt", { action: action, isSelect: true});
- });
-}
-
-
-// =====
-add_task(function* test_select_empty_list() {
- info("Starting test: Select (0 items, ok)");
- state = {
- msg : "This is the select text.",
- title : "TestTitle",
- items : [],
- };
- action = {
- buttonClick: "ok",
- };
- promptDone = handlePrompt(state, action);
- items = [];
- selectVal.value = null; // outparam, just making sure.
- isOK = prompter.select(window, "TestTitle", "This is the select text.", items.length, items, selectVal);
- is(isOK, true, "checked expected retval");
- is(selectVal.value, -1, "checking selected index");
-
- yield promptDone;
-});
-
-// =====
-add_task(function* test_select_ok() {
- info("Starting test: Select (3 items, ok)");
- state = {
- msg : "This is the select text.",
- title : "TestTitle",
- items : ["one", "two", "three"],
- };
- action = {
- buttonClick: "ok",
- };
- promptDone = handlePrompt(state, action);
- items = ["one", "two", "three"];
- selectVal.value = null; // outparam, just making sure.
- isOK = prompter.select(window, "TestTitle", "This is the select text.", items.length, items, selectVal);
- is(isOK, true, "checked expected retval");
- is(selectVal.value, 0, "checking selected index");
-
- yield promptDone;
-});
-
-// =====
-add_task(function* test_select_item() {
- info("Starting test: Select (3 items, selection changed, ok)");
- state = {
- msg : "This is the select text.",
- title : "TestTitle",
- items : ["one", "two", "three"],
- };
- action = {
- buttonClick: "ok",
- selectItem: 1,
- };
- promptDone = handlePrompt(state, action);
- items = ["one", "two", "three"];
- selectVal.value = null; // outparam, just making sure.
- isOK = prompter.select(window, "TestTitle", "This is the select text.", items.length, items, selectVal);
- is(isOK, true, "checked expected retval");
- is(selectVal.value, 1, "checking selected index");
-
- yield promptDone;
-});
-
-// =====
-add_task(function* test_cancel_prompt() {
- info("Starting test: Select (3 items, cancel)");
- state = {
- msg : "This is the select text.",
- title : "TestTitle",
- items : ["one", "two", "three"],
- };
- action = {
- buttonClick: "cancel",
- };
- promptDone = handlePrompt(state, action);
- items = ["one", "two", "three"];
- selectVal.value = null; // outparam, just making sure.
- isOK = prompter.select(window, "TestTitle", "This is the select text.", items.length, items, selectVal);
- is(isOK, false, "checked expected retval");
- is(selectVal.value, 0, "checking selected index");
-
- yield promptDone;
-});
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/prompts/test/test_subresources_prompts.html b/toolkit/components/prompts/test/test_subresources_prompts.html
deleted file mode 100644
index 241ce430f9..0000000000
--- a/toolkit/components/prompts/test/test_subresources_prompts.html
+++ /dev/null
@@ -1,202 +0,0 @@
-<html>
-<head>
- <title>Test subresources prompts (Bug 625187 and bug 1230462)</title>
- <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="prompt_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
-<!--
- - Any copyright is dedicated to the Public Domain.
- - http://creativecommons.org/publicdomain/zero/1.0/
- -
- - Contributor(s):
- - Mihai Sucan <mihai.sucan@gmail.com>
- -->
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=625187">Mozilla Bug 625187</a>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1230462">Mozilla Bug 1230462</a>
-
-<p><button onclick="alert('hello world')">Button</button></p>
-
-<iframe id="iframe_diff_origin" src="http://example.com/tests/toolkit/components/prompts/test/bug625187_iframe.html"></iframe>
-
-<iframe id="iframe_same_origin" src="bug625187_iframe.html"></iframe>
-
-<iframe id="iframe_prompt"></iframe>
-
-<pre id="test"></pre>
-
-<script class="testbody" type="text/javascript">
-var iframe1Loaded = onloadPromiseFor("iframe_diff_origin");
-var iframe2Loaded = onloadPromiseFor("iframe_same_origin");
-var iframe_prompt = document.getElementById("iframe_prompt");
-
-add_task(function* runTest()
-{
- // This test depends on tab modal prompts being enabled.
- if (!isTabModal) {
- todo(false, "Test disabled when tab modal prompts are not enabled.");
- return;
- }
-
- info("Ensuring iframe1 has loaded...");
- yield iframe1Loaded;
- info("Ensuring iframe2 has loaded...");
- yield iframe2Loaded;
- let state, action;
-
- state = {
- msg : "hello world",
- iconClass : "alert-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "button0",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- };
-
- promptDone = handlePrompt(state, action);
-
- var button = document.querySelector("button");
- dispatchMouseEvent(button, "click");
-
- yield promptDone;
-
-
- // mostly reusing same state/action
- state.titleHidden = false;
- state.msg = "hello world 2";
- promptDone = handlePrompt(state, action);
-
- var iframe = document.getElementById("iframe_diff_origin");
- button = SpecialPowers.wrap(iframe.contentWindow).document.getElementById("btn1");
- dispatchMouseEvent(button, "click");
-
- yield promptDone;
-
-
- // mostly reusing same state/action
- state.titleHidden = true;
- state.msg = "hello world 2";
- promptDone = handlePrompt(state, action);
-
- iframe = document.getElementById("iframe_same_origin");
- button = iframe.contentWindow.document.getElementById("btn1");
- dispatchMouseEvent(button, "click");
-
- yield promptDone;
-
-
- // mostly reusing same state/action
- state.msg = "hello world 3";
- promptDone = handlePrompt(state, action);
-
- button = iframe.contentWindow.document.getElementById("btn2");
- dispatchMouseEvent(button, "click");
-
- yield promptDone;
-});
-
-add_task(function* runTestAuth()
-{
- // Following tests chack prompt message for a cross-origin and not
- // cross-origin subresources load
-
- // Force parent to not look for tab-modal prompts, as they're not
- // used for auth prompts.
- isTabModal = false;
-
- state = {
- msg : "http://mochi.test:8888 is requesting your username " +
- "and password. The site says: “mochitest”",
- title : "Authentication Required",
- textValue : "",
- passValue : "",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
-
- action = {
- buttonClick : "ok",
- setCheckbox : false,
- textField : "mochiuser1",
- passField : "mochipass1",
- };
-
- promptDone = handlePrompt(state, action);
-
- var iframe3Loaded = onloadPromiseFor("iframe_prompt");
- iframe_prompt.src = "authenticate.sjs?user=mochiuser1&pass=mochipass1";
- yield promptDone;
- yield iframe3Loaded;
- checkEchoedAuthInfo({user: "mochiuser1", pass: "mochipass1"},
- iframe_prompt.contentDocument);
-
- // Cross-origin subresourse test.
-
- // Force parent to not look for tab-modal prompts, as they're not used for auth prompts.
- isTabModal =false;
- state = {
- msg : "http://example.com is requesting your username and password. " +
- "WARNING: Your password will not be sent to the website you are currently visiting!",
- title : "Authentication Required",
- textValue : "",
- passValue : "",
- iconClass : "authentication-icon question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : false,
- checkHidden : true,
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
-
- action = {
- buttonClick : "ok",
- setCheckbox : false,
- textField : "mochiuser2",
- passField : "mochipass2",
- };
-
- promptDone = handlePrompt(state, action);
-
- iframe3Loaded = onloadPromiseFor("iframe_prompt");
- iframe_prompt.src = "http://example.com/tests/toolkit/components/prompts/test/authenticate.sjs?user=mochiuser2&pass=mochipass2&realm=mochitest";
- yield promptDone;
- yield iframe3Loaded;
- checkEchoedAuthInfo({user: "mochiuser2", pass: "mochipass2"},
- SpecialPowers.wrap(iframe_prompt.contentWindow).document);
-});
-
-function dispatchMouseEvent(target, type)
-{
- var win = SpecialPowers.unwrap(target.ownerDocument.defaultView);
- var e = document.createEvent("MouseEvent");
- e.initEvent(type, false, false, win, 0, 1, 1, 1, 1,
- false, false, false, false, 0, null);
- var utils = SpecialPowers.getDOMWindowUtils(win);
- utils.dispatchDOMEventViaPresShell(SpecialPowers.unwrap(target), e, true);
-}
-</script>
-</body>
-</html>
diff --git a/toolkit/components/protobuf/src/google/protobuf/stubs/platform_macros.h b/toolkit/components/protobuf/src/google/protobuf/stubs/platform_macros.h
index 7956d076dc..b05f2f8536 100644
--- a/toolkit/components/protobuf/src/google/protobuf/stubs/platform_macros.h
+++ b/toolkit/components/protobuf/src/google/protobuf/stubs/platform_macros.h
@@ -67,7 +67,7 @@
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
#elif defined(sparc)
#define GOOGLE_PROTOBUF_ARCH_SPARC 1
-#ifdef SOLARIS_64BIT_ENABLED
+#ifdef __arch64__
#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
#else
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
diff --git a/toolkit/components/reader/moz.build b/toolkit/components/reader/moz.build
index d49bda14fc..4ffca04210 100644
--- a/toolkit/components/reader/moz.build
+++ b/toolkit/components/reader/moz.build
@@ -11,9 +11,7 @@ EXTRA_JS_MODULES += [
'ReaderMode.jsm'
]
-EXTRA_PP_JS_MODULES += [
- 'Readerable.jsm'
-]
+EXTRA_PP_JS_MODULES += ['Readerable.jsm']
EXTRA_JS_MODULES.reader = [
'JSDOMParser.js',
@@ -21,10 +19,3 @@ EXTRA_JS_MODULES.reader = [
'ReaderWorker.js',
'ReaderWorker.jsm'
]
-
-BROWSER_CHROME_MANIFESTS += [
- 'test/browser.ini'
-]
-
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'Reader Mode')
diff --git a/toolkit/components/reader/test/browser.ini b/toolkit/components/reader/test/browser.ini
deleted file mode 100644
index 4f9df23b37..0000000000
--- a/toolkit/components/reader/test/browser.ini
+++ /dev/null
@@ -1,15 +0,0 @@
-[DEFAULT]
-support-files = head.js
-[browser_readerMode.js]
-support-files =
- readerModeArticle.html
- readerModeArticleHiddenNodes.html
-[browser_readerMode_hidden_nodes.js]
-support-files =
- readerModeArticleHiddenNodes.html
-[browser_readerMode_with_anchor.js]
-support-files =
- readerModeArticle.html
-[browser_bug1124271_readerModePinnedTab.js]
-support-files =
- readerModeArticle.html
diff --git a/toolkit/components/reader/test/browser_bug1124271_readerModePinnedTab.js b/toolkit/components/reader/test/browser_bug1124271_readerModePinnedTab.js
deleted file mode 100644
index 39913aa3ed..0000000000
--- a/toolkit/components/reader/test/browser_bug1124271_readerModePinnedTab.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/* 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/. */
-
-// Test that the reader mode button won't open in a new tab when clicked from a pinned tab
-
-const PREF = "reader.parse-on-load.enabled";
-
-const TEST_PATH = getRootDirectory(gTestPath).replace("chrome://mochitests/content", "http://example.com");
-
-var readerButton = document.getElementById("reader-mode-button");
-
-add_task(function* () {
- registerCleanupFunction(function() {
- Services.prefs.clearUserPref(PREF);
- while (gBrowser.tabs.length > 1) {
- gBrowser.removeCurrentTab();
- }
- });
-
- // Enable the reader mode button.
- Services.prefs.setBoolPref(PREF, true);
-
- let tab = gBrowser.selectedTab = gBrowser.addTab();
- gBrowser.pinTab(tab);
-
- let initialTabsCount = gBrowser.tabs.length;
-
- // Point tab to a test page that is reader-able.
- let url = TEST_PATH + "readerModeArticle.html";
- yield promiseTabLoadEvent(tab, url);
- yield promiseWaitForCondition(() => !readerButton.hidden);
-
- readerButton.click();
- yield promiseTabLoadEvent(tab);
-
- // Ensure no new tabs are opened when exiting reader mode in a pinned tab
- is(gBrowser.tabs.length, initialTabsCount, "No additional tabs were opened.");
-
- let pageShownPromise = BrowserTestUtils.waitForContentEvent(tab.linkedBrowser, "pageshow");
- readerButton.click();
- yield pageShownPromise;
- // Ensure no new tabs are opened when exiting reader mode in a pinned tab
- is(gBrowser.tabs.length, initialTabsCount, "No additional tabs were opened.");
-
- gBrowser.removeCurrentTab();
-});
diff --git a/toolkit/components/reader/test/browser_readerMode.js b/toolkit/components/reader/test/browser_readerMode.js
deleted file mode 100644
index 70290c3b5f..0000000000
--- a/toolkit/components/reader/test/browser_readerMode.js
+++ /dev/null
@@ -1,220 +0,0 @@
-/* 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/. */
-
-/**
- * Test that the reader mode button appears and works properly on
- * reader-able content.
- */
-const TEST_PREFS = [
- ["reader.parse-on-load.enabled", true],
-];
-
-const TEST_PATH = getRootDirectory(gTestPath).replace("chrome://mochitests/content", "http://example.com");
-
-var readerButton = document.getElementById("reader-mode-button");
-
-add_task(function* test_reader_button() {
- registerCleanupFunction(function() {
- // Reset test prefs.
- TEST_PREFS.forEach(([name, value]) => {
- Services.prefs.clearUserPref(name);
- });
- while (gBrowser.tabs.length > 1) {
- gBrowser.removeCurrentTab();
- }
- });
-
- // Set required test prefs.
- TEST_PREFS.forEach(([name, value]) => {
- Services.prefs.setBoolPref(name, value);
- });
- Services.prefs.setBoolPref("browser.reader.detectedFirstArticle", false);
-
- let tab = gBrowser.selectedTab = gBrowser.addTab();
- is_element_hidden(readerButton, "Reader mode button is not present on a new tab");
- ok(!UITour.isInfoOnTarget(window, "readerMode-urlBar"),
- "Info panel shouldn't appear without the reader mode button");
- ok(!Services.prefs.getBoolPref("browser.reader.detectedFirstArticle"),
- "Shouldn't have detected the first article");
-
- // We're going to show the reader mode intro popup, make sure we wait for it:
- let tourPopupShownPromise =
- BrowserTestUtils.waitForEvent(document.getElementById("UITourTooltip"), "popupshown");
- // Point tab to a test page that is reader-able.
- let url = TEST_PATH + "readerModeArticle.html";
- yield promiseTabLoadEvent(tab, url);
- yield promiseWaitForCondition(() => !readerButton.hidden);
- yield tourPopupShownPromise;
- is_element_visible(readerButton, "Reader mode button is present on a reader-able page");
- ok(UITour.isInfoOnTarget(window, "readerMode-urlBar"),
- "Info panel should be anchored at the reader mode button");
- ok(Services.prefs.getBoolPref("browser.reader.detectedFirstArticle"),
- "Should have detected the first article");
-
- // Switch page into reader mode.
- readerButton.click();
- yield promiseTabLoadEvent(tab);
- ok(!UITour.isInfoOnTarget(window, "readerMode-urlBar"), "Info panel should have closed");
-
- let readerUrl = gBrowser.selectedBrowser.currentURI.spec;
- ok(readerUrl.startsWith("about:reader"), "about:reader loaded after clicking reader mode button");
- is_element_visible(readerButton, "Reader mode button is present on about:reader");
-
- is(gURLBar.value, readerUrl, "gURLBar value is about:reader URL");
- is(gURLBar.textValue, url.substring("http://".length), "gURLBar is displaying original article URL");
-
- // Check selected value for URL bar
- yield new Promise((resolve, reject) => {
- waitForClipboard(url, function () {
- gURLBar.focus();
- gURLBar.select();
- goDoCommand("cmd_copy");
- }, resolve, reject);
- });
-
- info("Got correct URL when copying");
-
- // Switch page back out of reader mode.
- let promisePageShow = BrowserTestUtils.waitForContentEvent(tab.linkedBrowser, "pageshow");
- readerButton.click();
- yield promisePageShow;
- is(gBrowser.selectedBrowser.currentURI.spec, url,
- "Back to the original page after clicking active reader mode button");
- ok(gBrowser.selectedBrowser.canGoForward,
- "Moved one step back in the session history.");
-
- // Load a new tab that is NOT reader-able.
- let newTab = gBrowser.selectedTab = gBrowser.addTab();
- yield promiseTabLoadEvent(newTab, "about:robots");
- yield promiseWaitForCondition(() => readerButton.hidden);
- is_element_hidden(readerButton, "Reader mode button is not present on a non-reader-able page");
-
- // Switch back to the original tab to make sure reader mode button is still visible.
- gBrowser.removeCurrentTab();
- yield promiseWaitForCondition(() => !readerButton.hidden);
- is_element_visible(readerButton, "Reader mode button is present on a reader-able page");
-});
-
-add_task(function* test_getOriginalUrl() {
- let { ReaderMode } = Cu.import("resource://gre/modules/ReaderMode.jsm", {});
- let url = "http://foo.com/article.html";
-
- is(ReaderMode.getOriginalUrl("about:reader?url=" + encodeURIComponent(url)), url, "Found original URL from encoded URL");
- is(ReaderMode.getOriginalUrl("about:reader?foobar"), null, "Did not find original URL from malformed reader URL");
- is(ReaderMode.getOriginalUrl(url), null, "Did not find original URL from non-reader URL");
-
- let badUrl = "http://foo.com/?;$%^^";
- is(ReaderMode.getOriginalUrl("about:reader?url=" + encodeURIComponent(badUrl)), badUrl, "Found original URL from encoded malformed URL");
- is(ReaderMode.getOriginalUrl("about:reader?url=" + badUrl), badUrl, "Found original URL from non-encoded malformed URL");
-});
-
-add_task(function* test_reader_view_element_attribute_transform() {
- registerCleanupFunction(function() {
- while (gBrowser.tabs.length > 1) {
- gBrowser.removeCurrentTab();
- }
- });
-
- function observeAttribute(element, attribute, triggerFn, checkFn) {
- return new Promise(resolve => {
- let observer = new MutationObserver((mutations) => {
- mutations.forEach( mu => {
- if (element.getAttribute(attribute) !== mu.oldValue) {
- checkFn();
- resolve();
- observer.disconnect();
- }
- });
- });
-
- observer.observe(element, {
- attributes: true,
- attributeOldValue: true,
- attributeFilter: [attribute]
- });
-
- triggerFn();
- });
- }
-
- let command = document.getElementById("View:ReaderView");
- let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser);
- is(command.hidden, true, "Command element should have the hidden attribute");
-
- info("Navigate a reader-able page");
- let waitForPageshow = BrowserTestUtils.waitForContentEvent(tab.linkedBrowser, "pageshow");
- yield observeAttribute(command, "hidden",
- () => {
- let url = TEST_PATH + "readerModeArticle.html";
- tab.linkedBrowser.loadURI(url);
- },
- () => {
- is(command.hidden, false, "Command's hidden attribute should be false on a reader-able page");
- }
- );
- yield waitForPageshow;
-
- info("Navigate a non-reader-able page");
- waitForPageshow = BrowserTestUtils.waitForContentEvent(tab.linkedBrowser, "pageshow");
- yield observeAttribute(command, "hidden",
- () => {
- let url = TEST_PATH + "readerModeArticleHiddenNodes.html";
- tab.linkedBrowser.loadURI(url);
- },
- () => {
- is(command.hidden, true, "Command's hidden attribute should be true on a non-reader-able page");
- }
- );
- yield waitForPageshow;
-
- info("Navigate a reader-able page");
- waitForPageshow = BrowserTestUtils.waitForContentEvent(tab.linkedBrowser, "pageshow");
- yield observeAttribute(command, "hidden",
- () => {
- let url = TEST_PATH + "readerModeArticle.html";
- tab.linkedBrowser.loadURI(url);
- },
- () => {
- is(command.hidden, false, "Command's hidden attribute should be false on a reader-able page");
- }
- );
- yield waitForPageshow;
-
- info("Enter Reader Mode");
- waitForPageshow = BrowserTestUtils.waitForContentEvent(tab.linkedBrowser, "pageshow");
- yield observeAttribute(readerButton, "readeractive",
- () => {
- readerButton.click();
- },
- () => {
- is(readerButton.getAttribute("readeractive"), "true", "readerButton's readeractive attribute should be true when entering reader mode");
- }
- );
- yield waitForPageshow;
-
- info("Exit Reader Mode");
- waitForPageshow = BrowserTestUtils.waitForContentEvent(tab.linkedBrowser, "pageshow");
- yield observeAttribute(readerButton, "readeractive",
- () => {
- readerButton.click();
- },
- () => {
- is(readerButton.getAttribute("readeractive"), "", "readerButton's readeractive attribute should be empty when reader mode is exited");
- }
- );
- yield waitForPageshow;
-
- info("Navigate a non-reader-able page");
- waitForPageshow = BrowserTestUtils.waitForContentEvent(tab.linkedBrowser, "pageshow");
- yield observeAttribute(command, "hidden",
- () => {
- let url = TEST_PATH + "readerModeArticleHiddenNodes.html";
- tab.linkedBrowser.loadURI(url);
- },
- () => {
- is(command.hidden, true, "Command's hidden attribute should be true on a non-reader-able page");
- }
- );
- yield waitForPageshow;
-});
diff --git a/toolkit/components/reader/test/browser_readerMode_hidden_nodes.js b/toolkit/components/reader/test/browser_readerMode_hidden_nodes.js
deleted file mode 100644
index b73eab58de..0000000000
--- a/toolkit/components/reader/test/browser_readerMode_hidden_nodes.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/* 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/. */
-
-/**
- * Test that the reader mode button appears and works properly on
- * reader-able content.
- */
-const TEST_PREFS = [
- ["reader.parse-on-load.enabled", true],
- ["browser.reader.detectedFirstArticle", false],
-];
-
-const TEST_PATH = getRootDirectory(gTestPath).replace("chrome://mochitests/content", "http://example.com");
-
-var readerButton = document.getElementById("reader-mode-button");
-
-add_task(function* test_reader_button() {
- registerCleanupFunction(function() {
- // Reset test prefs.
- TEST_PREFS.forEach(([name, value]) => {
- Services.prefs.clearUserPref(name);
- });
- while (gBrowser.tabs.length > 1) {
- gBrowser.removeCurrentTab();
- }
- });
-
- // Set required test prefs.
- TEST_PREFS.forEach(([name, value]) => {
- Services.prefs.setBoolPref(name, value);
- });
-
- let tab = gBrowser.selectedTab = gBrowser.addTab();
- is_element_hidden(readerButton, "Reader mode button is not present on a new tab");
- // Point tab to a test page that is not reader-able due to hidden nodes.
- let url = TEST_PATH + "readerModeArticleHiddenNodes.html";
- let paintPromise = ContentTask.spawn(tab.linkedBrowser, "", function() {
- return new Promise(resolve => {
- addEventListener("DOMContentLoaded", function onDCL() {
- removeEventListener("DOMContentLoaded", onDCL);
- addEventListener("MozAfterPaint", function onPaint() {
- removeEventListener("MozAfterPaint", onPaint);
- resolve();
- });
- });
- });
- });
- tab.linkedBrowser.loadURI(url);
- yield paintPromise;
-
- is_element_hidden(readerButton, "Reader mode button is still not present on tab with unreadable content.");
-});
diff --git a/toolkit/components/reader/test/browser_readerMode_with_anchor.js b/toolkit/components/reader/test/browser_readerMode_with_anchor.js
deleted file mode 100644
index 24c23c49f0..0000000000
--- a/toolkit/components/reader/test/browser_readerMode_with_anchor.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-const TEST_PATH = getRootDirectory(gTestPath).replace("chrome://mochitests/content", "http://example.com");
-
-add_task(function* () {
- yield BrowserTestUtils.withNewTab(TEST_PATH + "readerModeArticle.html#foo", function* (browser) {
- let pageShownPromise = BrowserTestUtils.waitForContentEvent(browser, "AboutReaderContentReady");
- let readerButton = document.getElementById("reader-mode-button");
- readerButton.click();
- yield pageShownPromise;
- yield ContentTask.spawn(browser, null, function* () {
- // Check if offset != 0
- ok(content.document.getElementById("foo") !== null, "foo element should be in document");
- ok(content.pageYOffset != 0, "pageYOffset should be > 0");
- });
- });
-});
diff --git a/toolkit/components/reader/test/head.js b/toolkit/components/reader/test/head.js
deleted file mode 100644
index 3d8d989bc0..0000000000
--- a/toolkit/components/reader/test/head.js
+++ /dev/null
@@ -1,126 +0,0 @@
-XPCOMUtils.defineLazyModuleGetter(this, "Promise",
- "resource://gre/modules/Promise.jsm");
-
-/* exported promiseTabLoadEvent, promiseWaitForCondition, is_element_visible, is_element_hidden */
-
-/**
- * Waits for a load (or custom) event to finish in a given tab. If provided
- * load an uri into the tab.
- *
- * @param tab
- * The tab to load into.
- * @param [optional] url
- * The url to load, or the current url.
- * @return {Promise} resolved when the event is handled.
- * @resolves to the received event
- * @rejects if a valid load event is not received within a meaningful interval
- */
-function promiseTabLoadEvent(tab, url) {
- let deferred = Promise.defer();
- info("Wait tab event: load");
-
- function handle(loadedUrl) {
- if (loadedUrl === "about:blank" || (url && loadedUrl !== url)) {
- info(`Skipping spurious load event for ${loadedUrl}`);
- return false;
- }
-
- info("Tab event received: load");
- return true;
- }
-
- // Create two promises: one resolved from the content process when the page
- // loads and one that is rejected if we take too long to load the url.
- let loaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser, false, handle);
-
- let timeout = setTimeout(() => {
- deferred.reject(new Error("Timed out while waiting for a 'load' event"));
- }, 30000);
-
- loaded.then(() => {
- clearTimeout(timeout);
- deferred.resolve();
- });
-
- if (url)
- BrowserTestUtils.loadURI(tab.linkedBrowser, url);
-
- // Promise.all rejects if either promise rejects (i.e. if we time out) and
- // if our loaded promise resolves before the timeout, then we resolve the
- // timeout promise as well, causing the all promise to resolve.
- return Promise.all([deferred.promise, loaded]);
-}
-
-function waitForCondition(condition, nextTest, errorMsg, retryTimes) {
- retryTimes = typeof retryTimes !== 'undefined' ? retryTimes : 30;
- var tries = 0;
- var interval = setInterval(function() {
- if (tries >= retryTimes) {
- ok(false, errorMsg);
- moveOn();
- }
- var conditionPassed;
- try {
- conditionPassed = condition();
- } catch (e) {
- ok(false, e + "\n" + e.stack);
- conditionPassed = false;
- }
- if (conditionPassed) {
- moveOn();
- }
- tries++;
- }, 100);
- var moveOn = function() {
- clearInterval(interval);
- nextTest();
- };
-}
-
-function promiseWaitForCondition(aConditionFn) {
- let deferred = Promise.defer();
- waitForCondition(aConditionFn, deferred.resolve, "Condition didn't pass.");
- return deferred.promise;
-}
-
-function is_element_visible(element, msg) {
- isnot(element, null, "Element should not be null, when checking visibility");
- ok(is_visible(element), msg || "Element should be visible");
-
-}
-function is_element_hidden(element, msg) {
- isnot(element, null, "Element should not be null, when checking visibility");
- ok(is_hidden(element), msg || "Element should be hidden");
-}
-
-function is_visible(element) {
- var style = element.ownerGlobal.getComputedStyle(element);
- if (style.display == "none")
- return false;
- if (style.visibility != "visible")
- return false;
- if (style.display == "-moz-popup" && element.state != "open")
- return false;
-
- // Hiding a parent element will hide all its children
- if (element.parentNode != element.ownerDocument)
- return is_visible(element.parentNode);
-
- return true;
-}
-
-function is_hidden(element) {
- var style = element.ownerGlobal.getComputedStyle(element);
- if (style.display == "none")
- return true;
- if (style.visibility != "visible")
- return true;
- if (style.display == "-moz-popup")
- return ["hiding", "closed"].indexOf(element.state) != -1;
-
- // Hiding a parent element will hide all its children
- if (element.parentNode != element.ownerDocument)
- return is_hidden(element.parentNode);
-
- return false;
-}
diff --git a/toolkit/components/reader/test/readerModeArticle.html b/toolkit/components/reader/test/readerModeArticle.html
deleted file mode 100644
index 7c5033d5b7..0000000000
--- a/toolkit/components/reader/test/readerModeArticle.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<title>Article title</title>
-<meta name="description" content="This is the article description." />
-</head>
-<body>
-<header>Site header</header>
-<div>
-<h1>Article title</h1>
-<h2 class="author">by Jane Doe</h2>
-<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In rutrum accumsan ultricies. Mauris vitae nisi at sem facilisis semper ac in est.</p>
-<p>Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper ultricies. Curabitur ornare, ligula semper consectetur sagittis, nisi diam iaculis velit, id fringilla sem nunc vel mi. Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna et turpis. Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci. Fusce eget orci a orci congue vestibulum. Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenatis pulvinar tellus gravida ornare. Sed et erat faucibus nunc euismod ultricies ut id justo. Nullam cursus suscipit nisi, et ultrices justo sodales nec. Fusce venenatis facilisis lectus ac semper. Aliquam at massa ipsum. Quisque bibendum purus convallis nulla ultrices ultricies. Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra pretium nisi quam vitae mi. Fusce vel volutpat elit. Nam sagittis nisi dui.</p>
-<p>Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper ultricies. Curabitur ornare, ligula semper consectetur sagittis, nisi diam iaculis velit, id fringilla sem nunc vel mi. Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna et turpis. Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci. Fusce eget orci a orci congue vestibulum. Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenatis pulvinar tellus gravida ornare. Sed et erat faucibus nunc euismod ultricies ut id justo. Nullam cursus suscipit nisi, et ultrices justo sodales nec. Fusce venenatis facilisis lectus ac semper. Aliquam at massa ipsum. Quisque bibendum purus convallis nulla ultrices ultricies. Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra pretium nisi quam vitae mi. Fusce vel volutpat elit. Nam sagittis nisi dui.</p>
-<p>Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper ultricies. Curabitur ornare, ligula semper consectetur sagittis, nisi diam iaculis velit, id fringilla sem nunc vel mi. Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna et turpis. Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci. Fusce eget orci a orci congue vestibulum. Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenatis pulvinar tellus gravida ornare. Sed et erat faucibus nunc euismod ultricies ut id justo. Nullam cursus suscipit nisi, et ultrices justo sodales nec. Fusce venenatis facilisis lectus ac semper. Aliquam at massa ipsum. Quisque bibendum purus convallis nulla ultrices ultricies. Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra pretium nisi quam vitae mi. Fusce vel volutpat elit. Nam sagittis nisi dui.</p>
-<p>Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper ultricies. Curabitur ornare, ligula semper consectetur sagittis, nisi diam iaculis velit, id fringilla sem nunc vel mi. Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna et turpis. Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci. Fusce eget orci a orci congue vestibulum. Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenatis pulvinar tellus gravida ornare. Sed et erat faucibus nunc euismod ultricies ut id justo. Nullam cursus suscipit nisi, et ultrices justo sodales nec. Fusce venenatis facilisis lectus ac semper. Aliquam at massa ipsum. Quisque bibendum purus convallis nulla ultrices ultricies. Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra pretium nisi quam vitae mi. Fusce vel volutpat elit. Nam sagittis nisi dui.</p>
-<div id="foo">by John Doe</div>
-<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In rutrum accumsan ultricies. Mauris vitae nisi at sem facilisis semper ac in est.</p>
-<p>Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper ultricies. Curabitur ornare, ligula semper consectetur sagittis, nisi diam iaculis velit, id fringilla sem nunc vel mi. Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna et turpis. Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci. Fusce eget orci a orci congue vestibulum. Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenatis pulvinar tellus gravida ornare. Sed et erat faucibus nunc euismod ultricies ut id justo. Nullam cursus suscipit nisi, et ultrices justo sodales nec. Fusce venenatis facilisis lectus ac semper. Aliquam at massa ipsum. Quisque bibendum purus convallis nulla ultrices ultricies. Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra pretium nisi quam vitae mi. Fusce vel volutpat elit. Nam sagittis nisi dui.</p>
-<p>Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper ultricies. Curabitur ornare, ligula semper consectetur sagittis, nisi diam iaculis velit, id fringilla sem nunc vel mi. Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna et turpis. Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci. Fusce eget orci a orci congue vestibulum. Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenatis pulvinar tellus gravida ornare. Sed et erat faucibus nunc euismod ultricies ut id justo. Nullam cursus suscipit nisi, et ultrices justo sodales nec. Fusce venenatis facilisis lectus ac semper. Aliquam at massa ipsum. Quisque bibendum purus convallis nulla ultrices ultricies. Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra pretium nisi quam vitae mi. Fusce vel volutpat elit. Nam sagittis nisi dui.</p>
-<p>Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper ultricies. Curabitur ornare, ligula semper consectetur sagittis, nisi diam iaculis velit, id fringilla sem nunc vel mi. Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna et turpis. Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci. Fusce eget orci a orci congue vestibulum. Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenatis pulvinar tellus gravida ornare. Sed et erat faucibus nunc euismod ultricies ut id justo. Nullam cursus suscipit nisi, et ultrices justo sodales nec. Fusce venenatis facilisis lectus ac semper. Aliquam at massa ipsum. Quisque bibendum purus convallis nulla ultrices ultricies. Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra pretium nisi quam vitae mi. Fusce vel volutpat elit. Nam sagittis nisi dui.</p>
-<p>Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper ultricies. Curabitur ornare, ligula semper consectetur sagittis, nisi diam iaculis velit, id fringilla sem nunc vel mi. Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna et turpis. Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci. Fusce eget orci a orci congue vestibulum. Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenatis pulvinar tellus gravida ornare. Sed et erat faucibus nunc euismod ultricies ut id justo. Nullam cursus suscipit nisi, et ultrices justo sodales nec. Fusce venenatis facilisis lectus ac semper. Aliquam at massa ipsum. Quisque bibendum purus convallis nulla ultrices ultricies. Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra pretium nisi quam vitae mi. Fusce vel volutpat elit. Nam sagittis nisi dui.</p>
-</div>
-</body>
-</html>
diff --git a/toolkit/components/reader/test/readerModeArticleHiddenNodes.html b/toolkit/components/reader/test/readerModeArticleHiddenNodes.html
deleted file mode 100644
index 92441b7978..0000000000
--- a/toolkit/components/reader/test/readerModeArticleHiddenNodes.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<title>Article title</title>
-<meta name="description" content="This is the article description." />
-</head>
-<body>
-<style>
-p { display: none }
-</style>
-<header>Site header</header>
-<div>
-<h1>Article title</h1>
-<h2 class="author">by Jane Doe</h2>
-<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In rutrum accumsan ultricies. Mauris vitae nisi at sem facilisis semper ac in est.</p>
-<p>Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper ultricies. Curabitur ornare, ligula semper consectetur sagittis, nisi diam iaculis velit, id fringilla sem nunc vel mi. Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna et turpis. Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci. Fusce eget orci a orci congue vestibulum. Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenatis pulvinar tellus gravida ornare. Sed et erat faucibus nunc euismod ultricies ut id justo. Nullam cursus suscipit nisi, et ultrices justo sodales nec. Fusce venenatis facilisis lectus ac semper. Aliquam at massa ipsum. Quisque bibendum purus convallis nulla ultrices ultricies. Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra pretium nisi quam vitae mi. Fusce vel volutpat elit. Nam sagittis nisi dui.</p>
-<p>Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper ultricies. Curabitur ornare, ligula semper consectetur sagittis, nisi diam iaculis velit, id fringilla sem nunc vel mi. Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna et turpis. Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci. Fusce eget orci a orci congue vestibulum. Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenatis pulvinar tellus gravida ornare. Sed et erat faucibus nunc euismod ultricies ut id justo. Nullam cursus suscipit nisi, et ultrices justo sodales nec. Fusce venenatis facilisis lectus ac semper. Aliquam at massa ipsum. Quisque bibendum purus convallis nulla ultrices ultricies. Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra pretium nisi quam vitae mi. Fusce vel volutpat elit. Nam sagittis nisi dui.</p>
-<p>Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper ultricies. Curabitur ornare, ligula semper consectetur sagittis, nisi diam iaculis velit, id fringilla sem nunc vel mi. Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna et turpis. Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci. Fusce eget orci a orci congue vestibulum. Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenatis pulvinar tellus gravida ornare. Sed et erat faucibus nunc euismod ultricies ut id justo. Nullam cursus suscipit nisi, et ultrices justo sodales nec. Fusce venenatis facilisis lectus ac semper. Aliquam at massa ipsum. Quisque bibendum purus convallis nulla ultrices ultricies. Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra pretium nisi quam vitae mi. Fusce vel volutpat elit. Nam sagittis nisi dui.</p>
-<p>Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper ultricies. Curabitur ornare, ligula semper consectetur sagittis, nisi diam iaculis velit, id fringilla sem nunc vel mi. Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna et turpis. Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci. Fusce eget orci a orci congue vestibulum. Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenatis pulvinar tellus gravida ornare. Sed et erat faucibus nunc euismod ultricies ut id justo. Nullam cursus suscipit nisi, et ultrices justo sodales nec. Fusce venenatis facilisis lectus ac semper. Aliquam at massa ipsum. Quisque bibendum purus convallis nulla ultrices ultricies. Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra pretium nisi quam vitae mi. Fusce vel volutpat elit. Nam sagittis nisi dui.</p>
-</div>
-</body>
-</html>
diff --git a/toolkit/components/remotebrowserutils/moz.build b/toolkit/components/remotebrowserutils/moz.build
index 9cfc4a9762..47ee6a4837 100644
--- a/toolkit/components/remotebrowserutils/moz.build
+++ b/toolkit/components/remotebrowserutils/moz.build
@@ -8,5 +8,3 @@ EXTRA_COMPONENTS += [
'remotebrowserutils.manifest',
'RemoteWebNavigation.js',
]
-
-BROWSER_CHROME_MANIFESTS += ['tests/browser/browser.ini']
diff --git a/toolkit/components/remotebrowserutils/tests/browser/.eslintrc.js b/toolkit/components/remotebrowserutils/tests/browser/.eslintrc.js
deleted file mode 100644
index 7c80211924..0000000000
--- a/toolkit/components/remotebrowserutils/tests/browser/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/mochitest/browser.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/remotebrowserutils/tests/browser/browser.ini b/toolkit/components/remotebrowserutils/tests/browser/browser.ini
deleted file mode 100644
index 916d0f9cb6..0000000000
--- a/toolkit/components/remotebrowserutils/tests/browser/browser.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[DEFAULT]
-run-if = e10s
-support-files =
- dummy_page.html
-
-[browser_RemoteWebNavigation.js]
diff --git a/toolkit/components/remotebrowserutils/tests/browser/browser_RemoteWebNavigation.js b/toolkit/components/remotebrowserutils/tests/browser/browser_RemoteWebNavigation.js
deleted file mode 100644
index 106758e81a..0000000000
--- a/toolkit/components/remotebrowserutils/tests/browser/browser_RemoteWebNavigation.js
+++ /dev/null
@@ -1,156 +0,0 @@
-/* eslint-env mozilla/frame-script */
-
-const DUMMY1 = "http://example.com/browser/toolkit/modules/tests/browser/dummy_page.html";
-const DUMMY2 = "http://example.org/browser/toolkit/modules/tests/browser/dummy_page.html"
-
-function waitForLoad(uri) {
- return BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false, uri);
-}
-
-function waitForPageShow(browser = gBrowser.selectedBrowser) {
- return BrowserTestUtils.waitForContentEvent(browser, "pageshow", true);
-}
-
-function makeURI(url) {
- return Cc["@mozilla.org/network/io-service;1"].
- getService(Ci.nsIIOService).
- newURI(url, null, null);
-}
-
-// Tests that loadURI accepts a referrer and it is included in the load.
-add_task(function* test_referrer() {
- gBrowser.selectedTab = gBrowser.addTab();
- let browser = gBrowser.selectedBrowser;
-
- browser.webNavigation.loadURI(DUMMY1,
- Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
- makeURI(DUMMY2),
- null, null);
- yield waitForLoad(DUMMY1);
-
- yield ContentTask.spawn(browser, [ DUMMY1, DUMMY2 ], function([dummy1, dummy2]) {
- is(content.location.href, dummy1, "Should have loaded the right URL");
- is(content.document.referrer, dummy2, "Should have the right referrer");
- });
-
- gBrowser.removeCurrentTab();
-});
-
-// Tests that remote access to webnavigation.sessionHistory works.
-add_task(function* test_history() {
- function checkHistoryIndex(browser, n) {
- return ContentTask.spawn(browser, n, function(n) {
- let history = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsISHistory);
- is(history.index, n, "Should be at the right place in history");
- });
- }
- gBrowser.selectedTab = gBrowser.addTab();
- let browser = gBrowser.selectedBrowser;
-
- browser.webNavigation.loadURI(DUMMY1,
- Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
- null, null, null);
- yield waitForLoad(DUMMY1);
-
- browser.webNavigation.loadURI(DUMMY2,
- Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
- null, null, null);
- yield waitForLoad(DUMMY2);
-
- yield ContentTask.spawn(browser, [DUMMY1, DUMMY2], function([dummy1, dummy2]) {
- let history = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsISHistory);
- is(history.count, 2, "Should be two history items");
- is(history.index, 1, "Should be at the right place in history");
- let entry = history.getEntryAtIndex(0, false);
- is(entry.URI.spec, dummy1, "Should have the right history entry");
- entry = history.getEntryAtIndex(1, false);
- is(entry.URI.spec, dummy2, "Should have the right history entry");
- });
-
- let promise = waitForPageShow();
- browser.webNavigation.goBack();
- yield promise;
- yield checkHistoryIndex(browser, 0);
-
- promise = waitForPageShow();
- browser.webNavigation.goForward();
- yield promise;
- yield checkHistoryIndex(browser, 1);
-
- promise = waitForPageShow();
- browser.webNavigation.gotoIndex(0);
- yield promise;
- yield checkHistoryIndex(browser, 0);
-
- gBrowser.removeCurrentTab();
-});
-
-// Tests that load flags are passed through to the content process.
-add_task(function* test_flags() {
- function checkHistory(browser, { count, index }) {
- return ContentTask.spawn(browser, [ DUMMY2, count, index ],
- function([ dummy2, count, index ]) {
- let history = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsISHistory);
- is(history.count, count, "Should be one history item");
- is(history.index, index, "Should be at the right place in history");
- let entry = history.getEntryAtIndex(index, false);
- is(entry.URI.spec, dummy2, "Should have the right history entry");
- });
- }
-
- gBrowser.selectedTab = gBrowser.addTab();
- let browser = gBrowser.selectedBrowser;
-
- browser.webNavigation.loadURI(DUMMY1,
- Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
- null, null, null);
- yield waitForLoad(DUMMY1);
-
- browser.webNavigation.loadURI(DUMMY2,
- Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY,
- null, null, null);
- yield waitForLoad(DUMMY2);
- yield checkHistory(browser, { count: 1, index: 0 });
-
- browser.webNavigation.loadURI(DUMMY1,
- Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY,
- null, null, null);
- yield waitForLoad(DUMMY1);
- yield checkHistory(browser, { count: 1, index: 0 });
-
- gBrowser.removeCurrentTab();
-});
-
-// Tests that attempts to use unsupported arguments throw an exception.
-add_task(function* test_badarguments() {
- if (!gMultiProcessBrowser)
- return;
-
- gBrowser.selectedTab = gBrowser.addTab();
- let browser = gBrowser.selectedBrowser;
-
- try {
- browser.webNavigation.loadURI(DUMMY1,
- Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
- null, {}, null);
- ok(false, "Should have seen an exception from trying to pass some postdata");
- }
- catch (e) {
- ok(true, "Should have seen an exception from trying to pass some postdata");
- }
-
- try {
- browser.webNavigation.loadURI(DUMMY1,
- Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
- null, null, {});
- ok(false, "Should have seen an exception from trying to pass some headers");
- }
- catch (e) {
- ok(true, "Should have seen an exception from trying to pass some headers");
- }
-
- gBrowser.removeCurrentTab();
-});
diff --git a/toolkit/components/remotebrowserutils/tests/browser/dummy_page.html b/toolkit/components/remotebrowserutils/tests/browser/dummy_page.html
deleted file mode 100644
index c1c9a4e043..0000000000
--- a/toolkit/components/remotebrowserutils/tests/browser/dummy_page.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-<body>
-<p>Page</p>
-</body>
-</html>
diff --git a/toolkit/components/satchel/FormHistory.jsm b/toolkit/components/satchel/FormHistory.jsm
index ca9a28f1f6..2182fbfb7c 100644
--- a/toolkit/components/satchel/FormHistory.jsm
+++ b/toolkit/components/satchel/FormHistory.jsm
@@ -101,11 +101,7 @@ const DAY_IN_MS = 86400000; // 1 day in milliseconds
const MAX_SEARCH_TOKENS = 10;
const NOOP = function noop() {};
-#ifdef MOZ_WIDGET_ANDROID
-var supportsDeletedTable = true;
-#else
var supportsDeletedTable = false;
-#endif
var Prefs = {
initialized: false,
diff --git a/toolkit/components/satchel/moz.build b/toolkit/components/satchel/moz.build
index 883ee9f230..920f4afff4 100644
--- a/toolkit/components/satchel/moz.build
+++ b/toolkit/components/satchel/moz.build
@@ -4,10 +4,6 @@
# 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/.
-MOCHITEST_MANIFESTS += ['test/mochitest.ini']
-XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
-BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
-
XPIDL_SOURCES += [
'nsIFormAutoComplete.idl',
'nsIFormFillController.idl',
@@ -17,13 +13,9 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'satchel'
-SOURCES += [
- 'nsFormFillController.cpp',
-]
+SOURCES += ['nsFormFillController.cpp']
-LOCAL_INCLUDES += [
- '../build',
-]
+LOCAL_INCLUDES += ['../build']
EXTRA_COMPONENTS += [
'FormHistoryStartup.js',
diff --git a/toolkit/components/satchel/nsFormFillController.cpp b/toolkit/components/satchel/nsFormFillController.cpp
index d70036635d..d8dae41ed6 100644
--- a/toolkit/components/satchel/nsFormFillController.cpp
+++ b/toolkit/components/satchel/nsFormFillController.cpp
@@ -985,7 +985,6 @@ nsFormFillController::Focus(nsIDOMEvent* aEvent)
return NS_OK;
}
-#ifndef ANDROID
nsCOMPtr<nsIFormControl> formControl = do_QueryInterface(mFocusedInputNode);
MOZ_ASSERT(formControl);
@@ -995,7 +994,6 @@ nsFormFillController::Focus(nsIDOMEvent* aEvent)
&& formControl->GetType() == NS_FORM_INPUT_PASSWORD) {
ShowPopup();
}
-#endif
mContextMenuFiredBeforeFocus = false;
return NS_OK;
diff --git a/toolkit/components/satchel/nsFormHistory.js b/toolkit/components/satchel/nsFormHistory.js
index 9d67f0729f..f940e104dd 100644
--- a/toolkit/components/satchel/nsFormHistory.js
+++ b/toolkit/components/satchel/nsFormHistory.js
@@ -349,26 +349,6 @@ FormHistory.prototype = {
},
moveToDeletedTable : function moveToDeletedTable(values, params) {
-#ifdef MOZ_WIDGET_ANDROID
- this.log("Moving entries to deleted table.");
-
- let stmt;
-
- try {
- // Move the entries to the deleted items table.
- let query = "INSERT INTO moz_deleted_formhistory (guid, timeDeleted) ";
- if (values) query += values;
- stmt = this.dbCreateStatement(query, params);
- stmt.execute();
- } catch (e) {
- this.log("Moving deleted entries failed: " + e);
- throw e;
- } finally {
- if (stmt) {
- stmt.reset();
- }
- }
-#endif
},
get dbConnection() {
diff --git a/toolkit/components/satchel/test/.eslintrc.js b/toolkit/components/satchel/test/.eslintrc.js
deleted file mode 100644
index 3c788d6d68..0000000000
--- a/toolkit/components/satchel/test/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../testing/mochitest/mochitest.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/satchel/test/browser/.eslintrc.js b/toolkit/components/satchel/test/browser/.eslintrc.js
deleted file mode 100644
index 7c80211924..0000000000
--- a/toolkit/components/satchel/test/browser/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/mochitest/browser.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/satchel/test/browser/browser.ini b/toolkit/components/satchel/test/browser/browser.ini
deleted file mode 100644
index 6a3fc452e3..0000000000
--- a/toolkit/components/satchel/test/browser/browser.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[DEFAULT]
-support-files =
- !/toolkit/components/satchel/test/subtst_privbrowsing.html
-
-[browser_privbrowsing_perwindowpb.js]
diff --git a/toolkit/components/satchel/test/browser/browser_privbrowsing_perwindowpb.js b/toolkit/components/satchel/test/browser/browser_privbrowsing_perwindowpb.js
deleted file mode 100644
index 982480648f..0000000000
--- a/toolkit/components/satchel/test/browser/browser_privbrowsing_perwindowpb.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/* 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/. */
-
-var FormHistory = (Components.utils.import("resource://gre/modules/FormHistory.jsm", {})).FormHistory;
-
-/** Test for Bug 472396 **/
-add_task(function* test() {
- // initialization
- let windowsToClose = [];
- let testURI =
- "http://example.com/tests/toolkit/components/satchel/test/subtst_privbrowsing.html";
-
- function* doTest(aShouldValueExist, aWindow) {
- let browser = aWindow.gBrowser.selectedBrowser;
- BrowserTestUtils.loadURI(browser, testURI);
- yield BrowserTestUtils.browserLoaded(browser);
-
- // Wait for the page to reload itself.
- yield BrowserTestUtils.browserLoaded(browser);
-
- let count = 0;
- let doneCounting = {};
- doneCounting.promise = new Promise(resolve => doneCounting.resolve = resolve);
- FormHistory.count({ fieldname: "field", value: "value" },
- {
- handleResult(result) {
- count = result;
- },
- handleError(error) {
- do_throw("Error occurred searching form history: " + error);
- },
- handleCompletion(num) {
- if (aShouldValueExist) {
- is(count, 1, "In non-PB mode, we add a single entry");
- } else {
- is(count, 0, "In PB mode, we don't add any entries");
- }
-
- doneCounting.resolve();
- }
- });
- yield doneCounting.promise;
- }
-
- function testOnWindow(aOptions, aCallback) {
- return BrowserTestUtils.openNewBrowserWindow(aOptions)
- .then(win => { windowsToClose.push(win); return win; });
- }
-
-
- yield testOnWindow({private: true}).then((aWin) => {
- return Task.spawn(doTest(false, aWin));
- });
-
- // Test when not on private mode after visiting a site on private
- // mode. The form history should not exist.
- yield testOnWindow({}).then((aWin) => {
- return Task.spawn(doTest(true, aWin));
- });
-
- yield Promise.all(windowsToClose.map(win => BrowserTestUtils.closeWindow(win)));
-});
diff --git a/toolkit/components/satchel/test/mochitest.ini b/toolkit/components/satchel/test/mochitest.ini
deleted file mode 100644
index 5a65baeb6f..0000000000
--- a/toolkit/components/satchel/test/mochitest.ini
+++ /dev/null
@@ -1,19 +0,0 @@
-[DEFAULT]
-skip-if = toolkit == 'android' || os == 'linux' # linux - bug 1022386
-support-files =
- satchel_common.js
- subtst_form_submission_1.html
- subtst_privbrowsing.html
- parent_utils.js
-
-[test_bug_511615.html]
-[test_bug_787624.html]
-[test_datalist_with_caching.html]
-[test_form_autocomplete.html]
-[test_form_autocomplete_with_list.html]
-[test_form_submission.html]
-[test_form_submission_cap.html]
-[test_form_submission_cap2.html]
-[test_password_autocomplete.html]
-[test_popup_direction.html]
-[test_popup_enter_event.html]
diff --git a/toolkit/components/satchel/test/parent_utils.js b/toolkit/components/satchel/test/parent_utils.js
deleted file mode 100644
index 87738bdb5a..0000000000
--- a/toolkit/components/satchel/test/parent_utils.js
+++ /dev/null
@@ -1,149 +0,0 @@
-const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
-
-Cu.import("resource://gre/modules/FormHistory.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://testing-common/ContentTaskUtils.jsm");
-
-var gAutocompletePopup = Services.ww.activeWindow.
- document.
- getElementById("PopupAutoComplete");
-assert.ok(gAutocompletePopup, "Got autocomplete popup");
-
-var ParentUtils = {
- getMenuEntries() {
- let entries = [];
- let numRows = gAutocompletePopup.view.matchCount;
- for (let i = 0; i < numRows; i++) {
- entries.push(gAutocompletePopup.view.getValueAt(i));
- }
- return entries;
- },
-
- cleanUpFormHist() {
- FormHistory.update({ op: "remove" });
- },
-
- updateFormHistory(changes) {
- let handler = {
- handleError: function (error) {
- assert.ok(false, error);
- sendAsyncMessage("formHistoryUpdated", { ok: false });
- },
- handleCompletion: function (reason) {
- if (!reason)
- sendAsyncMessage("formHistoryUpdated", { ok: true });
- },
- };
- FormHistory.update(changes, handler);
- },
-
- popupshownListener() {
- let results = this.getMenuEntries();
- sendAsyncMessage("onpopupshown", { results });
- },
-
- countEntries(name, value) {
- let obj = {};
- if (name)
- obj.fieldname = name;
- if (value)
- obj.value = value;
-
- let count = 0;
- let listener = {
- handleResult(result) { count = result },
- handleError(error) {
- assert.ok(false, error);
- sendAsyncMessage("entriesCounted", { ok: false });
- },
- handleCompletion(reason) {
- if (!reason) {
- sendAsyncMessage("entriesCounted", { ok: true, count });
- }
- }
- };
-
- FormHistory.count(obj, listener);
- },
-
- checkRowCount(expectedCount, expectedFirstValue = null) {
- ContentTaskUtils.waitForCondition(() => {
- // This may be called before gAutocompletePopup has initialised
- // which causes it to throw
- try {
- return gAutocompletePopup.view.matchCount === expectedCount &&
- (!expectedFirstValue ||
- expectedCount <= 1 ||
- gAutocompletePopup.view.getValueAt(0) === expectedFirstValue);
- } catch (e) {
- return false;
- }
- }, "Waiting for row count change: " + expectedCount + " First value: " + expectedFirstValue).then(() => {
- let results = this.getMenuEntries();
- sendAsyncMessage("gotMenuChange", { results });
- });
- },
-
- checkSelectedIndex(expectedIndex) {
- ContentTaskUtils.waitForCondition(() => {
- return gAutocompletePopup.popupOpen &&
- gAutocompletePopup.selectedIndex === expectedIndex;
- }, "Checking selected index").then(() => {
- sendAsyncMessage("gotSelectedIndex");
- });
- },
-
- getPopupState() {
- sendAsyncMessage("gotPopupState", {
- open: gAutocompletePopup.popupOpen,
- selectedIndex: gAutocompletePopup.selectedIndex,
- direction: gAutocompletePopup.style.direction,
- });
- },
-
- observe(subject, topic, data) {
- assert.ok(topic === "satchel-storage-changed");
- sendAsyncMessage("satchel-storage-changed", { subject: null, topic, data });
- },
-
- cleanup() {
- gAutocompletePopup.removeEventListener("popupshown", this._popupshownListener);
- this.cleanUpFormHist();
- }
-};
-
-ParentUtils._popupshownListener =
- ParentUtils.popupshownListener.bind(ParentUtils);
-gAutocompletePopup.addEventListener("popupshown", ParentUtils._popupshownListener);
-ParentUtils.cleanUpFormHist();
-
-addMessageListener("updateFormHistory", (msg) => {
- ParentUtils.updateFormHistory(msg.changes);
-});
-
-addMessageListener("countEntries", ({ name, value }) => {
- ParentUtils.countEntries(name, value);
-});
-
-addMessageListener("waitForMenuChange", ({ expectedCount, expectedFirstValue }) => {
- ParentUtils.checkRowCount(expectedCount, expectedFirstValue);
-});
-
-addMessageListener("waitForSelectedIndex", ({ expectedIndex }) => {
- ParentUtils.checkSelectedIndex(expectedIndex);
-});
-
-addMessageListener("getPopupState", () => {
- ParentUtils.getPopupState();
-});
-
-addMessageListener("addObserver", () => {
- Services.obs.addObserver(ParentUtils, "satchel-storage-changed", false);
-});
-addMessageListener("removeObserver", () => {
- Services.obs.removeObserver(ParentUtils, "satchel-storage-changed");
-});
-
-addMessageListener("cleanup", () => {
- ParentUtils.cleanup();
-});
diff --git a/toolkit/components/satchel/test/satchel_common.js b/toolkit/components/satchel/test/satchel_common.js
deleted file mode 100644
index c047f40af2..0000000000
--- a/toolkit/components/satchel/test/satchel_common.js
+++ /dev/null
@@ -1,274 +0,0 @@
-/* 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/. */
-
-var gPopupShownExpected = false;
-var gPopupShownListener;
-var gLastAutoCompleteResults;
-var gChromeScript;
-
-/*
- * Returns the element with the specified |name| attribute.
- */
-function $_(formNum, name) {
- var form = document.getElementById("form" + formNum);
- if (!form) {
- ok(false, "$_ couldn't find requested form " + formNum);
- return null;
- }
-
- var element = form.elements.namedItem(name);
- if (!element) {
- ok(false, "$_ couldn't find requested element " + name);
- return null;
- }
-
- // Note that namedItem is a bit stupid, and will prefer an
- // |id| attribute over a |name| attribute when looking for
- // the element.
-
- if (element.hasAttribute("name") && element.getAttribute("name") != name) {
- ok(false, "$_ got confused.");
- return null;
- }
-
- return element;
-}
-
-// Mochitest gives us a sendKey(), but it's targeted to a specific element.
-// This basically sends an untargeted key event, to whatever's focused.
-function doKey(aKey, modifier) {
- var keyName = "DOM_VK_" + aKey.toUpperCase();
- var key = SpecialPowers.Ci.nsIDOMKeyEvent[keyName];
-
- // undefined --> null
- if (!modifier)
- modifier = null;
-
- // Window utils for sending fake key events.
- var wutils = SpecialPowers.getDOMWindowUtils(window);
-
- if (wutils.sendKeyEvent("keydown", key, 0, modifier)) {
- wutils.sendKeyEvent("keypress", key, 0, modifier);
- }
- wutils.sendKeyEvent("keyup", key, 0, modifier);
-}
-
-function registerPopupShownListener(listener) {
- if (gPopupShownListener) {
- ok(false, "got too many popupshownlisteners");
- return;
- }
- gPopupShownListener = listener;
-}
-
-function getMenuEntries() {
- if (!gLastAutoCompleteResults) {
- throw new Error("no autocomplete results");
- }
-
- var results = gLastAutoCompleteResults;
- gLastAutoCompleteResults = null;
- return results;
-}
-
-function checkArrayValues(actualValues, expectedValues, msg) {
- is(actualValues.length, expectedValues.length, "Checking array values: " + msg);
- for (var i = 0; i < expectedValues.length; i++)
- is(actualValues[i], expectedValues[i], msg + " Checking array entry #" + i);
-}
-
-var checkObserver = {
- verifyStack: [],
- callback: null,
-
- init() {
- gChromeScript.sendAsyncMessage("addObserver");
- gChromeScript.addMessageListener("satchel-storage-changed", this.observe.bind(this));
- },
-
- uninit() {
- gChromeScript.sendAsyncMessage("removeObserver");
- },
-
- waitForChecks: function(callback) {
- if (this.verifyStack.length == 0)
- callback();
- else
- this.callback = callback;
- },
-
- observe: function({ subject, topic, data }) {
- if (data != "formhistory-add" && data != "formhistory-update")
- return;
- ok(this.verifyStack.length > 0, "checking if saved form data was expected");
-
- // Make sure that every piece of data we expect to be saved is saved, and no
- // more. Here it is assumed that for every entry satchel saves or modifies, a
- // message is sent.
- //
- // We don't actually check the content of the message, but just that the right
- // quantity of messages is received.
- // - if there are too few messages, test will time out
- // - if there are too many messages, test will error out here
- //
- var expected = this.verifyStack.shift();
-
- countEntries(expected.name, expected.value,
- function(num) {
- ok(num > 0, expected.message);
- if (checkObserver.verifyStack.length == 0) {
- var callback = checkObserver.callback;
- checkObserver.callback = null;
- callback();
- }
- });
- }
-};
-
-function checkForSave(name, value, message) {
- checkObserver.verifyStack.push({ name : name, value: value, message: message });
-}
-
-function getFormSubmitButton(formNum) {
- var form = $("form" + formNum); // by id, not name
- ok(form != null, "getting form " + formNum);
-
- // we can't just call form.submit(), because that doesn't seem to
- // invoke the form onsubmit handler.
- var button = form.firstChild;
- while (button && button.type != "submit") { button = button.nextSibling; }
- ok(button != null, "getting form submit button");
-
- return button;
-}
-
-// Count the number of entries with the given name and value, and call then(number)
-// when done. If name or value is null, then the value of that field does not matter.
-function countEntries(name, value, then = null) {
- return new Promise(resolve => {
- gChromeScript.sendAsyncMessage("countEntries", { name, value });
- gChromeScript.addMessageListener("entriesCounted", function counted(data) {
- gChromeScript.removeMessageListener("entriesCounted", counted);
- if (!data.ok) {
- ok(false, "Error occurred counting form history");
- SimpleTest.finish();
- return;
- }
-
- if (then) {
- then(data.count);
- }
- resolve(data.count);
- });
- });
-}
-
-// Wrapper around FormHistory.update which handles errors. Calls then() when done.
-function updateFormHistory(changes, then = null) {
- return new Promise(resolve => {
- gChromeScript.sendAsyncMessage("updateFormHistory", { changes });
- gChromeScript.addMessageListener("formHistoryUpdated", function updated({ ok }) {
- gChromeScript.removeMessageListener("formHistoryUpdated", updated);
- if (!ok) {
- ok(false, "Error occurred updating form history");
- SimpleTest.finish();
- return;
- }
-
- if (then) {
- then();
- }
- resolve();
- });
- });
-}
-
-function notifyMenuChanged(expectedCount, expectedFirstValue, then = null) {
- return new Promise(resolve => {
- gChromeScript.sendAsyncMessage("waitForMenuChange",
- { expectedCount,
- expectedFirstValue });
- gChromeScript.addMessageListener("gotMenuChange", function changed({ results }) {
- gChromeScript.removeMessageListener("gotMenuChange", changed);
- gLastAutoCompleteResults = results;
- if (then) {
- then(results);
- }
- resolve(results);
- });
- });
-}
-
-function notifySelectedIndex(expectedIndex, then = null) {
- return new Promise(resolve => {
- gChromeScript.sendAsyncMessage("waitForSelectedIndex", { expectedIndex });
- gChromeScript.addMessageListener("gotSelectedIndex", function changed() {
- gChromeScript.removeMessageListener("gotSelectedIndex", changed);
- if (then) {
- then();
- }
- resolve();
- });
- });
-}
-
-function getPopupState(then = null) {
- return new Promise(resolve => {
- gChromeScript.sendAsyncMessage("getPopupState");
- gChromeScript.addMessageListener("gotPopupState", function listener(state) {
- gChromeScript.removeMessageListener("gotPopupState", listener);
- if (then) {
- then(state);
- }
- resolve(state);
- });
- });
-}
-
-function listenForUnexpectedPopupShown() {
- gPopupShownListener = function onPopupShown() {
- if (!gPopupShownExpected) {
- ok(false, "Unexpected autocomplete popupshown event");
- }
- };
-}
-
-function* promiseNoUnexpectedPopupShown() {
- gPopupShownExpected = false;
- listenForUnexpectedPopupShown();
- SimpleTest.requestFlakyTimeout("Giving a chance for an unexpected popupshown to occur");
- yield new Promise(resolve => setTimeout(resolve, 1000));
-}
-
-/**
- * Resolve at the next popupshown event for the autocomplete popup
- * @return {Promise} with the results
- */
-function promiseACShown() {
- gPopupShownExpected = true;
- return new Promise(resolve => {
- gPopupShownListener = ({ results }) => {
- gPopupShownExpected = false;
- resolve(results);
- };
- });
-}
-
-function satchelCommonSetup() {
- var chromeURL = SimpleTest.getTestFileURL("parent_utils.js");
- gChromeScript = SpecialPowers.loadChromeScript(chromeURL);
- gChromeScript.addMessageListener("onpopupshown", ({ results }) => {
- gLastAutoCompleteResults = results;
- if (gPopupShownListener)
- gPopupShownListener({results});
- });
-
- SimpleTest.registerCleanupFunction(() => {
- gChromeScript.sendAsyncMessage("cleanup");
- gChromeScript.destroy();
- });
-}
-
-
-satchelCommonSetup();
diff --git a/toolkit/components/satchel/test/subtst_form_submission_1.html b/toolkit/components/satchel/test/subtst_form_submission_1.html
deleted file mode 100644
index f7441668a1..0000000000
--- a/toolkit/components/satchel/test/subtst_form_submission_1.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-
-<head>
-</head>
-
-<body>
-
-<form id="subform1" onsubmit="return checkSubmit(21)">
- <input id="subtest1" type="text" name="subtest1">
- <button type="submit">Submit</button>
-</form>
-
-<form id="subform2" onsubmit="return checkSubmit(100)">
- <input id="subtest2" type="text" name="subtest2">
- <button type="submit">Submit</button>
-</form>
-
-<script>
- function checkSubmit(num) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
- return parent.checkSubmit(num);
- }
-
- function clickButton(num) {
- if (num == 21)
- document.querySelectorAll("button")[0].click();
- else if (num == 100)
- document.querySelectorAll("button")[1].click();
- }
-
- // set the input's value (can't use a default value, as satchel will ignore it)
- document.getElementById("subtest1").value = "subtestValue";
- document.getElementById("subtest2").value = "subtestValue";
-</script>
-
-</body>
-</html>
diff --git a/toolkit/components/satchel/test/subtst_privbrowsing.html b/toolkit/components/satchel/test/subtst_privbrowsing.html
deleted file mode 100644
index b53e0b2291..0000000000
--- a/toolkit/components/satchel/test/subtst_privbrowsing.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<html>
-<head>
- <meta charset=UTF-8>
- <title>Subtest for bug 472396</title>
- <script>
- function submitForm() {
- if (location.search.indexOf("field") == -1) {
- var form = document.getElementById("form");
- var field = document.getElementById("field");
- field.value = "value";
- form.submit();
- }
- }
- </script>
-</head>
-<body onload="submitForm();">
- <h2>Subtest for bug 472396</h2>
- <form id="form">
- <input name="field" id="field">
- </form>
-</body>
-</html>
diff --git a/toolkit/components/satchel/test/test_bug_511615.html b/toolkit/components/satchel/test/test_bug_511615.html
deleted file mode 100644
index 66972d9b30..0000000000
--- a/toolkit/components/satchel/test/test_bug_511615.html
+++ /dev/null
@@ -1,194 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test for Form History Autocomplete Untrusted Events: Bug 511615</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="satchel_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Test for Form History Autocomplete Untrusted Events: Bug 511615
-<p id="display"></p>
-
-<!-- we presumably can't hide the content for this test. -->
-<div id="content">
- <!-- normal, basic form -->
- <form id="form1" onsubmit="return false;">
- <input type="text" name="field1">
- <button type="submit">Submit</button>
- </form>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-var resolvePopupShownListener;
-registerPopupShownListener(() => resolvePopupShownListener());
-
-function waitForNextPopup() {
- return new Promise(resolve => { resolvePopupShownListener = resolve; });
-}
-
-/**
- * Indicates the time to wait before checking that the state of the autocomplete
- * popup, including whether it is open, has not changed in response to events.
- *
- * Manual testing on a fast machine revealed that 80ms was still unreliable,
- * while 100ms detected a simulated failure reliably. Unfortunately, this means
- * that to take into account slower machines we should use a larger value.
- *
- * Note that if a machine takes more than this time to show the popup, this
- * would not cause a failure, conversely the machine would not be able to detect
- * whether the test should have failed. In other words, this use of timeouts is
- * never expected to cause intermittent failures with test automation.
- */
-const POPUP_RESPONSE_WAIT_TIME_MS = 200;
-
-SimpleTest.requestFlakyTimeout("Must ensure that an event does not happen.");
-
-/**
- * Checks that the popup does not open in response to the given function.
- */
-function expectPopupDoesNotOpen(triggerFn) {
- let popupShown = waitForNextPopup();
- triggerFn();
- return Promise.race([
- popupShown.then(() => Promise.reject("Popup opened unexpectedly.")),
- new Promise(resolve => setTimeout(resolve, POPUP_RESPONSE_WAIT_TIME_MS)),
- ]);
-}
-
-/**
- * Checks that the selected index in the popup still matches the given value.
- */
-function checkSelectedIndexAfterResponseTime(expectedIndex) {
- return new Promise(resolve => {
- setTimeout(() => getPopupState(resolve), POPUP_RESPONSE_WAIT_TIME_MS);
- }).then(popupState => {
- is(popupState.open, true, "Popup should still be open.");
- is(popupState.selectedIndex, expectedIndex, "Selected index should match.");
- });
-}
-
-function doKeyUnprivileged(key) {
- let keyName = "DOM_VK_" + key.toUpperCase();
- let keycode, charcode;
-
- if (key.length == 1) {
- keycode = 0;
- charcode = key.charCodeAt(0);
- alwaysval = charcode;
- } else {
- keycode = KeyEvent[keyName];
- if (!keycode)
- throw "invalid keyname in test";
- charcode = 0;
- alwaysval = keycode;
- }
-
- let dnEvent = document.createEvent('KeyboardEvent');
- let prEvent = document.createEvent('KeyboardEvent');
- let upEvent = document.createEvent('KeyboardEvent');
-
- dnEvent.initKeyEvent("keydown", true, true, null, false, false, false, false, alwaysval, 0);
- prEvent.initKeyEvent("keypress", true, true, null, false, false, false, false, keycode, charcode);
- upEvent.initKeyEvent("keyup", true, true, null, false, false, false, false, alwaysval, 0);
-
- input.dispatchEvent(dnEvent);
- input.dispatchEvent(prEvent);
- input.dispatchEvent(upEvent);
-}
-
-function doClickWithMouseEventUnprivileged() {
- let dnEvent = document.createEvent('MouseEvent');
- let upEvent = document.createEvent('MouseEvent');
- let ckEvent = document.createEvent('MouseEvent');
-
- dnEvent.initMouseEvent("mousedown", true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
- upEvent.initMouseEvent("mouseup", true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
- ckEvent.initMouseEvent("mouseclick", true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
-
- input.dispatchEvent(dnEvent);
- input.dispatchEvent(upEvent);
- input.dispatchEvent(ckEvent);
-}
-
-let input = $_(1, "field1");
-
-add_task(function* test_initialize() {
- yield new Promise(resolve => updateFormHistory([
- { op : "remove" },
- { op : "add", fieldname : "field1", value : "value1" },
- { op : "add", fieldname : "field1", value : "value2" },
- { op : "add", fieldname : "field1", value : "value3" },
- { op : "add", fieldname : "field1", value : "value4" },
- { op : "add", fieldname : "field1", value : "value5" },
- { op : "add", fieldname : "field1", value : "value6" },
- { op : "add", fieldname : "field1", value : "value7" },
- { op : "add", fieldname : "field1", value : "value8" },
- { op : "add", fieldname : "field1", value : "value9" },
- ], resolve));
-});
-
-add_task(function* test_untrusted_events_ignored() {
- // The autocomplete popup should not open from untrusted events.
- for (let triggerFn of [
- () => input.focus(),
- () => input.click(),
- () => doClickWithMouseEventUnprivileged(),
- () => doKeyUnprivileged("down"),
- () => doKeyUnprivileged("page_down"),
- () => doKeyUnprivileged("return"),
- () => doKeyUnprivileged("v"),
- () => doKeyUnprivileged(" "),
- () => doKeyUnprivileged("back_space"),
- ]) {
- // We must wait for the entire timeout for each individual test, because the
- // next event in the list might prevent the popup from opening.
- yield expectPopupDoesNotOpen(triggerFn);
- }
-
- // A privileged key press will actually open the popup.
- let popupShown = waitForNextPopup();
- doKey("down");
- yield popupShown;
-
- // The selected autocomplete item should not change from untrusted events.
- for (let triggerFn of [
- () => doKeyUnprivileged("down"),
- () => doKeyUnprivileged("page_down"),
- ]) {
- triggerFn();
- yield checkSelectedIndexAfterResponseTime(-1);
- }
-
- // A privileged key press will actually change the selected index.
- let indexChanged = new Promise(resolve => notifySelectedIndex(0, resolve));
- doKey("down");
- yield indexChanged;
-
- // The selected autocomplete item should not change and it should not be
- // possible to use it from untrusted events.
- for (let triggerFn of [
- () => doKeyUnprivileged("down"),
- () => doKeyUnprivileged("page_down"),
- () => doKeyUnprivileged("right"),
- () => doKeyUnprivileged(" "),
- () => doKeyUnprivileged("back_space"),
- () => doKeyUnprivileged("back_space"),
- () => doKeyUnprivileged("return"),
- ]) {
- triggerFn();
- yield checkSelectedIndexAfterResponseTime(0);
- is(input.value, "", "The selected item should not have been used.");
- }
-
- // Close the popup.
- input.blur();
-});
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/satchel/test/test_bug_787624.html b/toolkit/components/satchel/test/test_bug_787624.html
deleted file mode 100644
index 6ca5136cd8..0000000000
--- a/toolkit/components/satchel/test/test_bug_787624.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test for Layout of Form History Autocomplete: Bug 787624</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="satchel_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
- <style>
- .container {
- border: 1px solid #333;
- width: 80px;
- height: 26px;
- position: absolute;
- z-index: 2;
- }
-
- .subcontainer {
- width: 100%;
- overflow: hidden;
- }
-
- .subcontainer input {
- width: 120px;
- margin: 2px 6px;
- padding-right: 4px;
- border: none;
- height: 22px;
- z-index: 1;
- outline: 1px dashed #555
- }
- </style>
-</head>
-<body>
-Form History Layout test: form field autocomplete: Bug 787624
-<p id="display"></p>
-
-<!-- we presumably can't hide the content for this test. -->
-<div id="content">
- <!-- in this form, the input field is partially hidden and can scroll -->
- <div class="container">
- <div class="subcontainer">
- <form id="form1" onsubmit="return false;">
- <input type="text" name="field1">
- <button type="submit">Submit</button>
- </form>
- </div>
- </div>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Form History autocomplete Layout: Bug 787624 **/
-
-var resolvePopupShownListener;
-registerPopupShownListener(() => resolvePopupShownListener());
-
-function waitForNextPopup() {
- return new Promise(resolve => { resolvePopupShownListener = resolve; });
-}
-
-add_task(function* test_popup_not_move_input() {
- var input = $_(1, "field1");
- var rect = input.getBoundingClientRect();
-
- yield new Promise(resolve => updateFormHistory([
- { op : "remove" },
- { op : "add", fieldname : "field1", value : "value1" },
- { op : "add", fieldname : "field1", value : "value2" },
- ], resolve));
-
- let popupShown = waitForNextPopup();
- input.focus();
- doKey("down");
- yield popupShown;
-
- var newRect = input.getBoundingClientRect();
- is(newRect.left, rect.left,
- "autocomplete popup does not disturb the input position");
- is(newRect.top, rect.top,
- "autocomplete popup does not disturb the input position");
-});
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/satchel/test/test_datalist_with_caching.html b/toolkit/components/satchel/test/test_datalist_with_caching.html
deleted file mode 100644
index 8445cb1591..0000000000
--- a/toolkit/components/satchel/test/test_datalist_with_caching.html
+++ /dev/null
@@ -1,139 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test for Form History Autocomplete</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="satchel_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Form History test: form field autocomplete
-<p id="display"></p>
-
-<!-- we presumably can't hide the content for this test. -->
-<div id="content">
-
- <!-- normal, basic form -->
- <form id="form1" onsubmit="return false;">
- <input list="suggest" type="text" name="field1">
- <button type="submit">Submit</button>
- </form>
-
- <datalist id="suggest">
- <option value="First"></option>
- <option value="Second"></option>
- <option value="Secomundo"></option>
- </datalist>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-var input = $_(1, "field1");
-
-function setupFormHistory(aCallback) {
- updateFormHistory([
- { op : "remove" },
- { op : "add", fieldname : "field1", value : "Sec" },
- ], () => {
- spawn_task(aCallback);
- });
-}
-
-function setForm(value) {
- input.value = value;
- input.focus();
-}
-
-// Restore the form to the default state.
-function restoreForm() {
- setForm("");
-}
-
-// Check for expected form data.
-function checkForm(expectedValue) {
- var formID = input.parentNode.id;
- is(input.value, expectedValue, "Checking " + formID + " input");
-}
-
-SimpleTest.waitForExplicitFinish();
-
-var expectingPopup = null;
-
-function expectPopup() {
- info("expecting a popup");
- return new Promise(resolve => {
- expectingPopup = resolve;
- });
-}
-
-var testNum = 0;
-
-function popupShownListener() {
- info("popup shown for test " + testNum);
- if (expectingPopup) {
- expectingPopup();
- expectingPopup = null;
- }
- else {
- ok(false, "Autocomplete popup not expected during test " + testNum);
- }
-}
-
-function waitForMenuChange(expectedCount) {
- return new Promise(resolve => {
- notifyMenuChanged(expectedCount, null, resolve);
- });
-}
-
-registerPopupShownListener(popupShownListener);
-
-function checkMenuEntries(expectedValues) {
- var actualValues = getMenuEntries();
- is(actualValues.length, expectedValues.length, testNum + " Checking length of expected menu");
- for (var i = 0; i < expectedValues.length; i++)
- is(actualValues[i], expectedValues[i], testNum + " Checking menu entry #"+i);
-}
-
-function* runTests() {
- testNum++;
- restoreForm();
- doKey("down");
- yield expectPopup();
-
- checkMenuEntries(["Sec", "First", "Second", "Secomundo"]);
- doKey("down");
- doKey("return");
- checkForm("Sec");
-
- testNum++;
- restoreForm();
- sendString("Sec");
- doKey("down");
- yield expectPopup();
-
- testNum++;
- checkMenuEntries(["Sec", "Second", "Secomundo"]);
- sendString("o");
- yield waitForMenuChange(2);
-
- testNum++;
- checkMenuEntries(["Second", "Secomundo"]);
- doKey("down");
- doKey("return");
- checkForm("Second");
- SimpleTest.finish();
-}
-
-function startTest() {
- setupFormHistory(runTests);
-}
-
-window.onload = startTest;
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/satchel/test/test_form_autocomplete.html b/toolkit/components/satchel/test/test_form_autocomplete.html
deleted file mode 100644
index d2c22a3db0..0000000000
--- a/toolkit/components/satchel/test/test_form_autocomplete.html
+++ /dev/null
@@ -1,1074 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test for Form History Autocomplete</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="satchel_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Form History test: form field autocomplete
-<p id="display"></p>
-
-<!-- We presumably can't hide the content for this test. The large top padding is to allow
- listening for scrolls to occur. -->
-<div id="content" style="padding-top: 20000px;">
-
- <!-- normal, basic form -->
- <form id="form1" onsubmit="return false;">
- <input type="text" name="field1">
- <button type="submit">Submit</button>
- </form>
-
- <!-- normal, basic form (new fieldname) -->
- <form id="form2" onsubmit="return false;">
- <input type="text" name="field2">
- <button type="submit">Submit</button>
- </form>
-
- <!-- form with autocomplete=off on input -->
- <form id="form3" onsubmit="return false;">
- <input type="text" name="field2" autocomplete="off">
- <button type="submit">Submit</button>
- </form>
-
- <!-- form with autocomplete=off on form -->
- <form id="form4" autocomplete="off" onsubmit="return false;">
- <input type="text" name="field2">
- <button type="submit">Submit</button>
- </form>
-
- <!-- normal form for testing filtering -->
- <form id="form5" onsubmit="return false;">
- <input type="text" name="field3">
- <button type="submit">Submit</button>
- </form>
-
- <!-- normal form for testing word boundary filtering -->
- <form id="form6" onsubmit="return false;">
- <input type="text" name="field4">
- <button type="submit">Submit</button>
- </form>
-
- <!-- form with maxlength attribute on input -->
- <form id="form7" onsubmit="return false;">
- <input type="text" name="field5" maxlength="10">
- <button type="submit">Submit</button>
- </form>
-
- <!-- form with input type='email' -->
- <form id="form8" onsubmit="return false;">
- <input type="email" name="field6">
- <button type="submit">Submit</button>
- </form>
-
- <!-- form with input type='tel' -->
- <form id="form9" onsubmit="return false;">
- <input type="tel" name="field7">
- <button type="submit">Submit</button>
- </form>
-
- <!-- form with input type='url' -->
- <form id="form10" onsubmit="return false;">
- <input type="url" name="field8">
- <button type="submit">Submit</button>
- </form>
-
- <!-- form with input type='search' -->
- <form id="form11" onsubmit="return false;">
- <input type="search" name="field9">
- <button type="submit">Submit</button>
- </form>
-
- <!-- form with input type='number' -->
- <form id="form12" onsubmit="return false;">
- <input type="text" name="field10"> <!-- TODO: change back to type=number -->
- <button type="submit">Submit</button>
- </form>
-
- <!-- normal, basic form (with fieldname='searchbar-history') -->
- <form id="form13" onsubmit="return false;">
- <input type="text" name="searchbar-history">
- <button type="submit">Submit</button>
- </form>
-
- <!-- form with input type='date' -->
- <form id="form14" onsubmit="return false;">
- <input type="date" name="field11">
- <button type="submit">Submit</button>
- </form>
-
- <!-- form with input type='time' -->
- <form id="form15" onsubmit="return false;">
- <input type="time" name="field12">
- <button type="submit">Submit</button>
- </form>
-
- <!-- form with input type='range' -->
- <form id="form16" onsubmit="return false;">
- <input type="range" name="field13" max="64">
- <button type="submit">Submit</button>
- </form>
-
- <!-- form with input type='color' -->
- <form id="form17" onsubmit="return false;">
- <input type="color" name="field14">
- <button type="submit">Submit</button>
- </form>
-
- <!-- form with input type='month' -->
- <form id="form18" onsubmit="return false;">
- <input type="month" name="field15">
- <button type="submit">Submit</button>
- </form>
-
- <!-- form with input type='week' -->
- <form id="form19" onsubmit="return false;">
- <input type="week" name="field16">
- <button type="submit">Submit</button>
- </form>
-
- <!-- form with input type='datetime-local' -->
- <form id="form20" onsubmit="return false;">
- <input type="datetime-local" name="field17">
- <button type="submit">Submit</button>
- </form>
-
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Form History autocomplete **/
-
-var input = $_(1, "field1");
-const shiftModifier = Event.SHIFT_MASK;
-
-function setupFormHistory(aCallback) {
- updateFormHistory([
- { op : "remove" },
- { op : "add", fieldname : "field1", value : "value1" },
- { op : "add", fieldname : "field1", value : "value2" },
- { op : "add", fieldname : "field1", value : "value3" },
- { op : "add", fieldname : "field1", value : "value4" },
- { op : "add", fieldname : "field2", value : "value1" },
- { op : "add", fieldname : "field3", value : "a" },
- { op : "add", fieldname : "field3", value : "aa" },
- { op : "add", fieldname : "field3", value : "aaz" },
- { op : "add", fieldname : "field3", value : "aa\xe6" }, // 0xae == latin ae pair (0xc6 == AE)
- { op : "add", fieldname : "field3", value : "az" },
- { op : "add", fieldname : "field3", value : "z" },
- { op : "add", fieldname : "field4", value : "a\xe6" },
- { op : "add", fieldname : "field4", value : "aa a\xe6" },
- { op : "add", fieldname : "field4", value : "aba\xe6" },
- { op : "add", fieldname : "field4", value : "bc d\xe6" },
- { op : "add", fieldname : "field5", value : "1" },
- { op : "add", fieldname : "field5", value : "12" },
- { op : "add", fieldname : "field5", value : "123" },
- { op : "add", fieldname : "field5", value : "1234" },
- { op : "add", fieldname : "field6", value : "value" },
- { op : "add", fieldname : "field7", value : "value" },
- { op : "add", fieldname : "field8", value : "value" },
- { op : "add", fieldname : "field9", value : "value" },
- { op : "add", fieldname : "field10", value : "42" },
- { op : "add", fieldname : "field11", value : "2010-10-10" }, // not used, since type=date doesn't have autocomplete currently
- { op : "add", fieldname : "field12", value : "21:21" }, // not used, since type=time doesn't have autocomplete currently
- { op : "add", fieldname : "field13", value : "32" }, // not used, since type=range doesn't have a drop down menu
- { op : "add", fieldname : "field14", value : "#ffffff" }, // not used, since type=color doesn't have autocomplete currently
- { op : "add", fieldname : "field15", value : "2016-08" },
- { op : "add", fieldname : "field16", value : "2016-W32" },
- { op : "add", fieldname : "field17", value : "2016-10-21T10:10" },
- { op : "add", fieldname : "searchbar-history", value : "blacklist test" },
- ], aCallback);
-}
-
-function setForm(value) {
- input.value = value;
- input.focus();
-}
-
-// Restore the form to the default state.
-function restoreForm() {
- setForm("");
-}
-
-// Check for expected form data.
-function checkForm(expectedValue) {
- var formID = input.parentNode.id;
- is(input.value, expectedValue, "Checking " + formID + " input");
-}
-
-var testNum = 0;
-var expectingPopup = false;
-
-function expectPopup()
-{
- info("expecting popup for test " + testNum);
- expectingPopup = true;
-}
-
-function popupShownListener()
-{
- info("popup shown for test " + testNum);
- if (expectingPopup) {
- expectingPopup = false;
- SimpleTest.executeSoon(runTest);
- }
- else {
- ok(false, "Autocomplete popup not expected during test " + testNum);
- }
-}
-
-registerPopupShownListener(popupShownListener);
-
-/*
- * Main section of test...
- *
- * 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
- * - 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
- * to listen to for when the search is complete.
- * - some items still use setTimeout
- */
-function runTest() {
- testNum++;
-
- ok(true, "Starting test #" + testNum);
-
- switch (testNum) {
- case 1:
- // Make sure initial form is empty.
- checkForm("");
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 2:
- checkMenuEntries(["value1", "value2", "value3", "value4"], testNum);
- // Check first entry
- doKey("down");
- checkForm(""); // value shouldn't update
- doKey("return"); // not "enter"!
- checkForm("value1");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 3:
- // Check second entry
- doKey("down");
- doKey("down");
- doKey("return"); // not "enter"!
- checkForm("value2");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 4:
- // Check third entry
- doKey("down");
- doKey("down");
- doKey("down");
- doKey("return");
- checkForm("value3");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 5:
- // Check fourth entry
- doKey("down");
- doKey("down");
- doKey("down");
- doKey("down");
- doKey("return");
- checkForm("value4");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 6:
- // Check first entry (wraparound)
- doKey("down");
- doKey("down");
- doKey("down");
- doKey("down");
- doKey("down"); // deselects
- doKey("down");
- doKey("return");
- checkForm("value1");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 7:
- // Check the last entry via arrow-up
- doKey("up");
- doKey("return");
- checkForm("value4");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 8:
- // Check the last entry via arrow-up
- doKey("down"); // select first entry
- doKey("up"); // selects nothing!
- doKey("up"); // select last entry
- doKey("return");
- checkForm("value4");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 9:
- // Check the last entry via arrow-up (wraparound)
- doKey("down");
- doKey("up"); // deselects
- doKey("up"); // last entry
- doKey("up");
- doKey("up");
- doKey("up"); // first entry
- doKey("up"); // deselects
- doKey("up"); // last entry
- doKey("return");
- checkForm("value4");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 10:
- // Set first entry w/o triggering autocomplete
- doKey("down");
- doKey("right");
- checkForm("value1");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 11:
- // Set first entry w/o triggering autocomplete
- doKey("down");
- doKey("left");
- checkForm("value1");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 12:
- // Check first entry (page up)
- doKey("down");
- doKey("down");
- doKey("page_up");
- doKey("return");
- checkForm("value1");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 13:
- // Check last entry (page down)
- doKey("down");
- doKey("page_down");
- doKey("return");
- checkForm("value4");
-
- // Trigger autocomplete popup
- testNum = 49;
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- /* Test removing entries from the dropdown */
-
- case 50:
- checkMenuEntries(["value1", "value2", "value3", "value4"], testNum);
- // Delete the first entry (of 4)
- setForm("value");
- doKey("down");
-
- // On OS X, shift-backspace and shift-delete work, just delete does not.
- // On Win/Linux, shift-backspace does not work, delete and shift-delete do.
- if (SpecialPowers.OS == "Darwin")
- doKey("back_space", shiftModifier);
- else
- doKey("delete", shiftModifier);
-
- // This tests that on OS X shift-backspace didn't delete the last character
- // in the input (bug 480262).
- waitForMenuChange(3);
- break;
-
- case 51:
- checkForm("value");
- countEntries("field1", "value1",
- function (num) {
- ok(!num, testNum + " checking that f1/v1 was deleted");
- runTest();
- });
- break;
-
- case 52:
- doKey("return");
- checkForm("value2");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 53:
- checkMenuEntries(["value2", "value3", "value4"], testNum);
- // Check the new first entry (of 3)
- doKey("down");
- doKey("return");
- checkForm("value2");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 54:
- // Delete the second entry (of 3)
- doKey("down");
- doKey("down");
- doKey("delete", shiftModifier);
- waitForMenuChange(2);
- break;
-
- case 55:
- checkForm("");
- countEntries("field1", "value3",
- function (num) {
- ok(!num, testNum + " checking that f1/v3 was deleted");
- runTest();
- });
- break;
-
- case 56:
- doKey("return");
- checkForm("value4")
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 57:
- checkMenuEntries(["value2", "value4"], testNum);
- // Check the new first entry (of 2)
- doKey("down");
- doKey("return");
- checkForm("value2");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 58:
- // Delete the last entry (of 2)
- doKey("down");
- doKey("down");
- doKey("delete", shiftModifier);
- checkForm("");
- waitForMenuChange(1);
- break;
-
- case 59:
- countEntries("field1", "value4",
- function (num) {
- ok(!num, testNum + " checking that f1/v4 was deleted");
- runTest();
- });
- break;
-
- case 60:
- doKey("return");
- checkForm("value2");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 61:
- checkMenuEntries(["value2"], testNum);
- // Check the new first entry (of 1)
- doKey("down");
- doKey("return");
- checkForm("value2");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 62:
- // Delete the only remaining entry
- doKey("down");
- doKey("delete", shiftModifier);
- waitForMenuChange(0);
- break;
-
- case 63:
- checkForm("");
- countEntries("field1", "value2",
- function (num) {
- ok(!num, testNum + " checking that f1/v2 was deleted");
- runTest();
- });
- break;
-
- case 64:
- // Look at form 2, trigger autocomplete popup
- input = $_(2, "field2");
- testNum = 99;
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- /* Test entries with autocomplete=off */
-
- case 100:
- // Select first entry
- doKey("down");
- doKey("return");
- checkForm("value1");
-
- // Look at form 3, try to trigger autocomplete popup
- input = $_(3, "field2");
- restoreForm();
- // Sometimes, this will fail if scrollTo(0, 0) is called, so that doesn't
- // happen here. Fortunately, a different input is used from the last test,
- // so a scroll should still occur.
- doKey("down");
- waitForScroll();
- break;
-
- case 101:
- // Ensure there's no autocomplete dropdown (autocomplete=off is present)
- doKey("down");
- doKey("return");
- checkForm("");
-
- // Look at form 4, try to trigger autocomplete popup
- input = $_(4, "field2");
- restoreForm();
- doKey("down");
- waitForMenuChange(0);
- break;
-
- case 102:
- // Ensure there's no autocomplete dropdown (autocomplete=off is present)
- doKey("down");
- doKey("return");
- checkForm("");
-
- // Look at form 5, try to trigger autocomplete popup
- input = $_(5, "field3");
- restoreForm();
- testNum = 199;
- expectPopup();
- input.focus();
- sendChar("a");
- break;
-
- /* Test filtering as characters are typed. */
-
- case 200:
- checkMenuEntries(["a", "aa", "aaz", "aa\xe6", "az"], testNum);
- input.focus();
- sendChar("a");
- waitForMenuChange(3);
- break;
-
- case 201:
- checkMenuEntries(["aa", "aaz", "aa\xe6"], testNum);
- input.focus();
- sendChar("\xc6");
- waitForMenuChange(1);
- break;
-
- case 202:
- checkMenuEntries(["aa\xe6"], testNum);
- doKey("back_space");
- waitForMenuChange(3);
- break;
-
- case 203:
- checkMenuEntries(["aa", "aaz", "aa\xe6"], testNum);
- doKey("back_space");
- waitForMenuChange(5);
- break;
-
- case 204:
- checkMenuEntries(["a", "aa", "aaz", "aa\xe6", "az"], testNum);
- input.focus();
- sendChar("z");
- waitForMenuChange(2);
- break;
-
- case 205:
- checkMenuEntries(["az", "aaz"], testNum);
- input.focus();
- doKey("left");
- expectPopup();
- // Check case-insensitivity.
- sendChar("A");
- break;
-
- case 206:
- checkMenuEntries(["aaz"], testNum);
- addEntry("field3", "aazq");
- break;
-
- case 207:
- // check that results were cached
- input.focus();
- doKey("right");
- sendChar("q");
- waitForMenuChange(0);
- break;
-
- case 208:
- // check that results were cached
- checkMenuEntries([], testNum);
- addEntry("field3", "aazqq");
- break;
-
- case 209:
- input.focus();
- window.scrollTo(0, 0);
- sendChar("q");
- waitForMenuChange(0);
- break;
-
- case 210:
- // check that empty results were cached - bug 496466
- checkMenuEntries([], testNum);
- doKey("escape");
-
- // Look at form 6, try to trigger autocomplete popup
- input = $_(6, "field4");
- restoreForm();
- testNum = 249;
- expectPopup();
- input.focus();
- sendChar("a");
- break;
-
- /* Test substring matches and word boundary bonuses */
-
- case 250:
- // alphabetical results for first character
- checkMenuEntries(["aa a\xe6", "aba\xe6", "a\xe6"], testNum);
- input.focus();
-
- sendChar("\xe6");
- waitForMenuChange(3, "a\xe6");
- break;
-
- case 251:
- // prefix match comes first, then word boundary match
- // followed by substring match
- checkMenuEntries(["a\xe6", "aa a\xe6", "aba\xe6"], testNum);
-
- restoreForm();
- input.focus();
- sendChar("b");
- waitForMenuChange(1, "bc d\xe6");
- break;
-
- case 252:
- checkMenuEntries(["bc d\xe6"], testNum);
- input.focus();
- sendChar(" ");
- waitForMenuChange(1);
- break;
-
- case 253:
- // check that trailing space has no effect after single char.
- checkMenuEntries(["bc d\xe6"], testNum);
- input.focus();
- sendChar("\xc6");
- waitForMenuChange(2);
- break;
-
- case 254:
- // check multi-word substring matches
- checkMenuEntries(["bc d\xe6", "aba\xe6"]);
- input.focus();
- expectPopup();
- doKey("left");
- sendChar("d");
- break;
-
- case 255:
- // check inserting in multi-word searches
- checkMenuEntries(["bc d\xe6"], testNum);
- input.focus();
- sendChar("z");
- waitForMenuChange(0);
- break;
-
- case 256:
- checkMenuEntries([], testNum);
-
- // Look at form 7, try to trigger autocomplete popup
- input = $_(7, "field5");
- testNum = 299;
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 300:
- checkMenuEntries(["1", "12", "123", "1234"], testNum);
- input.maxLength = 4;
- expectPopup();
- doKey("escape");
- doKey("down");
- break;
-
- case 301:
- checkMenuEntries(["1", "12", "123", "1234"], testNum);
- input.maxLength = 3;
- expectPopup();
- doKey("escape");
- doKey("down");
- break;
-
- case 302:
- checkMenuEntries(["1", "12", "123"], testNum);
- input.maxLength = 2;
- expectPopup();
- doKey("escape");
- doKey("down");
- break;
-
- case 303:
- checkMenuEntries(["1", "12"], testNum);
- input.maxLength = 1;
- expectPopup();
- doKey("escape");
- doKey("down");
- break;
-
- case 304:
- checkMenuEntries(["1"], testNum);
- input.maxLength = 0;
- doKey("escape");
- doKey("down");
- waitForMenuChange(0);
- break;
-
- case 305:
- checkMenuEntries([], testNum);
- input.maxLength = 4;
-
- // now again with a character typed
- input.focus();
- sendChar("1");
- expectPopup();
- doKey("escape");
- doKey("down");
- break;
-
- case 306:
- checkMenuEntries(["1", "12", "123", "1234"], testNum);
- input.maxLength = 3;
- expectPopup();
- doKey("escape");
- doKey("down");
- break;
-
- case 307:
- checkMenuEntries(["1", "12", "123"], testNum);
- input.maxLength = 2;
- expectPopup();
- doKey("escape");
- doKey("down");
- break;
-
- case 308:
- checkMenuEntries(["1", "12"], testNum);
- input.maxLength = 1;
- expectPopup();
- doKey("escape");
- doKey("down");
- break;
-
- case 309:
- checkMenuEntries(["1"], testNum);
- input.maxLength = 0;
- doKey("escape");
- doKey("down");
- waitForMenuChange(0);
- break;
-
- case 310:
- checkMenuEntries([], testNum);
-
- input = $_(8, "field6");
- testNum = 399;
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 400:
- case 401:
- case 402:
- case 403:
- checkMenuEntries(["value"], testNum);
- doKey("down");
- doKey("return");
- checkForm("value");
-
- if (testNum == 400) {
- input = $_(9, "field7");
- } else if (testNum == 401) {
- input = $_(10, "field8");
- } else if (testNum == 402) {
- input = $_(11, "field9");
- } else if (testNum == 403) {
- todo(false, "Fix input type=number");
- input = $_(12, "field10");
- }
-
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 404:
- checkMenuEntries(["42"], testNum);
- doKey("down");
- doKey("return");
- checkForm("42");
-
- input = $_(14, "field11");
- restoreForm();
- waitForMenuChange(0);
- break;
-
- case 405:
- checkMenuEntries([]); // type=date with it's own control frame does not
- // have a drop down menu for now
- checkForm("");
-
- input = $_(15, "field12");
- restoreForm();
- waitForMenuChange(0);
- break;
-
- case 406:
- checkMenuEntries([]); // type=time with it's own control frame does not
- // have a drop down menu for now
- checkForm("");
-
- input = $_(16, "field13");
- restoreForm();
- doKey("down");
- waitForMenuChange(0);
- break;
-
- case 407:
- checkMenuEntries([]); // type=range does not have a drop down menu
- doKey("down");
- doKey("return");
- checkForm("30"); // default (midway between minimum (0) and maximum (64)) - step
-
- input = $_(17, "field14");
- restoreForm();
- waitForMenuChange(0);
- break;
-
- case 408:
- checkMenuEntries([]); // type=color does not have a drop down menu
- checkForm("#000000"); // default color value
-
- input = $_(18, "field15");
- restoreForm();
- expectPopup();
- doKey("down");
- break;
-
- case 409:
- checkMenuEntries(["2016-08"]);
- doKey("down");
- doKey("return");
- checkForm("2016-08");
-
- input = $_(19, "field16");
- restoreForm();
- expectPopup();
- doKey("down");
- break;
-
- case 410:
- checkMenuEntries(["2016-W32"]);
- doKey("down");
- doKey("return");
- checkForm("2016-W32");
-
- input = $_(20, "field17");
- restoreForm();
- expectPopup();
- doKey("down");
- break;
-
- case 411:
- checkMenuEntries(["2016-10-21T10:10"]);
- doKey("down");
- doKey("return");
- checkForm("2016-10-21T10:10");
-
- addEntry("field1", "value1");
- break;
-
- case 412:
- input = $_(1, "field1");
- // Go to test 500.
- testNum = 499;
-
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- // Check that the input event is fired.
- case 500:
- input.addEventListener("input", function(event) {
- input.removeEventListener("input", arguments.callee, false);
- ok(true, testNum + " oninput should have been received");
- ok(event.bubbles, testNum + " input event should bubble");
- ok(event.cancelable, testNum + " input event should be cancelable");
- }, false);
-
- doKey("down");
- checkForm("");
- doKey("return");
- checkForm("value1");
- testNum = 599;
- setTimeout(runTest, 100);
- break;
-
- case 600:
- // check we don't show autocomplete for searchbar-history
- input = $_(13, "searchbar-history");
-
- // Trigger autocomplete popup
- checkForm("");
- restoreForm();
- doKey("down");
- waitForMenuChange(0);
- break;
-
- case 601:
- checkMenuEntries([], testNum);
- input.blur();
- SimpleTest.finish();
- return;
-
- default:
- ok(false, "Unexpected invocation of test #" + testNum);
- SimpleTest.finish();
- return;
- }
-}
-
-function addEntry(name, value)
-{
- updateFormHistory({ op : "add", fieldname : name, value: value }, runTest);
-}
-
-// Runs the next test when scroll event occurs
-function waitForScroll()
-{
- addEventListener("scroll", function() {
- if (!window.pageYOffset)
- return;
-
- removeEventListener("scroll", arguments.callee, false);
- setTimeout(runTest, 100);
- }, false);
-}
-
-function waitForMenuChange(expectedCount, expectedFirstValue)
-{
- notifyMenuChanged(expectedCount, expectedFirstValue, runTest);
-}
-
-function checkMenuEntries(expectedValues, testNumber) {
- var actualValues = getMenuEntries();
- is(actualValues.length, expectedValues.length, testNumber + " Checking length of expected menu");
- for (var i = 0; i < expectedValues.length; i++)
- is(actualValues[i], expectedValues[i], testNumber + " Checking menu entry #"+i);
-}
-
-function startTest() {
- setupFormHistory(function() {
- runTest();
- });
-}
-
-window.onload = startTest;
-
-SimpleTest.waitForExplicitFinish();
-SimpleTest.requestFlakyTimeout("untriaged");
-</script>
-</pre>
-</body>
-</html>
-
diff --git a/toolkit/components/satchel/test/test_form_autocomplete_with_list.html b/toolkit/components/satchel/test/test_form_autocomplete_with_list.html
deleted file mode 100644
index 04fb080c93..0000000000
--- a/toolkit/components/satchel/test/test_form_autocomplete_with_list.html
+++ /dev/null
@@ -1,506 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test for Form History Autocomplete</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="satchel_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Form History test: form field autocomplete
-<p id="display"></p>
-
-<!-- we presumably can't hide the content for this test. -->
-<div id="content">
-
- <!-- normal, basic form -->
- <form id="form1" onsubmit="return false;">
- <input list="suggest" type="text" name="field1">
- <button type="submit">Submit</button>
- </form>
-
- <!-- form with autocomplete=off on input -->
- <form id="form3" onsubmit="return false;">
- <input list="suggest" type="text" name="field2" autocomplete="off">
- <button type="submit">Submit</button>
- </form>
-
- <!-- form with autocomplete=off on form -->
- <form id="form4" autocomplete="off" onsubmit="return false;">
- <input list="suggest" type="text" name="field2">
- <button type="submit">Submit</button>
- </form>
-
- <datalist id="suggest">
- <option value="Google" label="PASS1">FAIL</option>
- <option value="Reddit">PASS2</option>
- <option value="final"></option>
- </datalist>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/** Test for Form History autocomplete **/
-
-var input = $_(1, "field1");
-const shiftModifier = Components.interfaces.nsIDOMEvent.SHIFT_MASK;
-
-function setupFormHistory(aCallback) {
- updateFormHistory([
- { op : "remove" },
- { op : "add", fieldname : "field1", value : "historyvalue" },
- { op : "add", fieldname : "field2", value : "othervalue" },
- ], aCallback);
-}
-
-function setForm(value) {
- input.value = value;
- input.focus();
-}
-
-// Restore the form to the default state.
-function restoreForm() {
- setForm("");
-}
-
-// Check for expected form data.
-function checkForm(expectedValue) {
- var formID = input.parentNode.id;
- is(input.value, expectedValue, "Checking " + formID + " input");
-}
-
-var testNum = 0;
-var prevValue;
-var expectingPopup = false;
-
-function expectPopup() {
- info("expecting popup for test " + testNum);
- expectingPopup = true;
-}
-
-function popupShownListener() {
- info("popup shown for test " + testNum);
- if (expectingPopup) {
- expectingPopup = false;
- SimpleTest.executeSoon(runTest);
- }
- else {
- ok(false, "Autocomplete popup not expected during test " + testNum);
- }
-}
-
-registerPopupShownListener(popupShownListener);
-
-/*
-* Main section of test...
-*
-* 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
-*/
-function runTest() {
- testNum++;
-
- info("Starting test #" + testNum);
-
- switch (testNum) {
- case 1:
- // Make sure initial form is empty.
- checkForm("");
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
- case 2:
- checkMenuEntries(["historyvalue", "PASS1", "PASS2", "final"], testNum);
- // Check first entry
- doKey("down");
- checkForm(""); // value shouldn't update
- doKey("return"); // not "enter"!
- checkForm("historyvalue");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 3:
- // Check second entry
- doKey("down");
- doKey("down");
- doKey("return"); // not "enter"!
- checkForm("Google");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 4:
- // Check third entry
- doKey("down");
- doKey("down");
- doKey("down");
- doKey("return");
- checkForm("Reddit");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 5:
- // Check fourth entry
- doKey("down");
- doKey("down");
- doKey("down");
- doKey("down");
- doKey("return");
- checkForm("final");
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 6:
- // Delete the first entry (of 3)
- doKey("down");
- doKey("delete", shiftModifier);
- waitForMenuChange(3);
- break;
-
- case 7:
- checkForm("");
- countEntries("field1", "historyvalue",
- function (num) {
- ok(!num, testNum + " checking that form history value was deleted");
- runTest();
- });
- break;
-
- case 8:
- doKey("return");
- checkForm("Google")
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 9:
- // Test deletion
- checkMenuEntries(["PASS1", "PASS2", "final"], testNum);
- // Check the new first entry (of 3)
- doKey("down");
- doKey("return");
- checkForm("Google");
-
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 10:
- // Test autocompletion of datalists with cached results.
- sendString("PAS");
- waitForMenuChange(2);
- break;
-
- case 11:
- // Continuation of test 10
- sendString("S1");
- waitForMenuChange(1);
- break;
-
- case 12:
- doKey("down");
- doKey("return");
- checkForm("Google");
-
- // Trigger autocomplete popup
- // Look at form 3, try to trigger autocomplete popup
- input.value = "";
- input = $_(3, "field2");
- testNum = 99;
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 100:
- checkMenuEntries(["PASS1", "PASS2", "final"], testNum);
- // Check first entry
- doKey("down");
- checkForm(""); // value shouldn't update
- doKey("return"); // not "enter"!
- checkForm("Google");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 101:
- // Check second entry
- doKey("down");
- doKey("down");
- doKey("return"); // not "enter"!
- checkForm("Reddit");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 102:
- // Check third entry
- doKey("down");
- doKey("down");
- doKey("down");
- doKey("return");
- checkForm("final");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 103:
- checkMenuEntries(["PASS1", "PASS2", "final"], testNum);
- // Check first entry
- doKey("down");
- checkForm(""); // value shouldn't update
- doKey("return"); // not "enter"!
- checkForm("Google");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 104:
- // Check second entry
- doKey("down");
- doKey("down");
- doKey("return"); // not "enter"!
- checkForm("Reddit");
-
- // Trigger autocomplete popup
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 105:
- // Check third entry
- doKey("down");
- doKey("down");
- doKey("down");
- doKey("return");
- checkForm("final");
-
- testNum = 199;
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- // Test dynamic updates.
- // For some reasons, when there is an update of the list, the selection is
- // lost so we need to go down like if we were at the beginning of the list
- // again.
- case 200:
- // Removing the second element while on the first then going down and
- // push enter. Value should be one from the third suggesion.
- doKey("down");
- var datalist = document.getElementById('suggest');
- var toRemove = datalist.children[1]
- datalist.removeChild(toRemove);
-
- SimpleTest.executeSoon(function() {
- doKey("down");
- doKey("down");
- doKey("return");
- checkForm("final");
-
- // Restore the element.
- datalist.insertBefore(toRemove, datalist.children[1]);
- expectPopup();
- restoreForm();
- doKey("down");
- });
- break;
-
- case 201:
- // Adding an attribute after the first one while on the first then going
- // down and push enter. Value should be the on from the new suggestion.
- doKey("down");
- datalist = document.getElementById('suggest');
- var added = new Option("Foo");
- datalist.insertBefore(added, datalist.children[1]);
- waitForMenuChange(4);
- break;
-
- case 202:
- doKey("down");
- doKey("down");
- doKey("return");
- checkForm("Foo");
-
- // Remove the element.
- datalist = document.getElementById('suggest');
- datalist.removeChild(datalist.children[1]);
- waitForMenuChange(0);
- break;
-
- case 203:
- // Change the first element value attribute.
- restoreForm();
- datalist = document.getElementById('suggest');
- prevValue = datalist.children[0].value;
- datalist.children[0].value = "foo";
- expectPopup();
- break;
-
- case 204:
- doKey("down");
- doKey("return");
- checkForm("foo");
-
- datalist = document.getElementById('suggest');
- datalist.children[0].value = prevValue;
- waitForMenuChange(0);
- break;
-
- case 205:
- // Change the textContent to update the value attribute.
- restoreForm();
- datalist = document.getElementById('suggest');
- prevValue = datalist.children[0].getAttribute('value');
- datalist.children[0].removeAttribute('value');
- datalist.children[0].textContent = "foobar";
- expectPopup();
- break;
-
- case 206:
- doKey("down");
- doKey("return");
- checkForm("foobar");
-
- datalist = document.getElementById('suggest');
- datalist.children[0].setAttribute('value', prevValue);
- testNum = 299;
- waitForMenuChange(0);
- break;
-
- // Tests for filtering (or not).
- case 300:
- // Filters with first letter of the word.
- restoreForm();
- synthesizeKey("f", {});
- expectPopup();
- break;
-
- case 301:
- doKey("down");
- doKey("return");
- checkForm("final");
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 302:
- // Filter with a letter in the middle of the word.
- synthesizeKey("i", {});
- synthesizeKey("n", {});
- waitForMenuChange(1);
- break;
-
- case 303:
- // Continuation of test 302.
- doKey("down");
- doKey("return");
- checkForm("final");
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 304:
- // Filter is disabled with mozNoFilter.
- input.setAttribute('mozNoFilter', 'true');
- synthesizeKey("f", {});
- waitForMenuChange(3); // no change
- break;
-
- case 305:
- // Continuation of test 304.
- doKey("down");
- doKey("return");
- checkForm("Google");
- input.removeAttribute('mozNoFilter');
- testNum = 399;
- expectPopup();
- restoreForm();
- doKey("down");
- break;
-
- case 400:
- // Check that the input event is fired.
- input.addEventListener("input", function(event) {
- input.removeEventListener("input", arguments.callee, false);
- ok(true, "oninput should have been received");
- ok(event.bubbles, "input event should bubble");
- ok(event.cancelable, "input event should be cancelable");
- checkForm("Google");
- input.blur();
- SimpleTest.finish();
- }, false);
-
- doKey("down");
- checkForm("");
- doKey("return");
- break;
-
- default:
- ok(false, "Unexpected invocation of test #" + testNum);
- SimpleTest.finish();
- return;
- }
-}
-
-function waitForMenuChange(expectedCount) {
- notifyMenuChanged(expectedCount, null, runTest);
-}
-
-function checkMenuEntries(expectedValues, testNumber) {
- var actualValues = getMenuEntries();
- is(actualValues.length, expectedValues.length, testNumber + " Checking length of expected menu");
- for (var i = 0; i < expectedValues.length; i++)
- is(actualValues[i], expectedValues[i], testNumber + " Checking menu entry #"+i);
-}
-
-function startTest() {
- setupFormHistory(runTest);
-}
-
-window.onload = startTest;
-
-SimpleTest.waitForExplicitFinish();
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/satchel/test/test_form_submission.html b/toolkit/components/satchel/test/test_form_submission.html
deleted file mode 100644
index ecccabcafd..0000000000
--- a/toolkit/components/satchel/test/test_form_submission.html
+++ /dev/null
@@ -1,537 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Satchel Test for Form Submisstion</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="satchel_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-<iframe id="iframe" src="https://example.com/tests/toolkit/components/satchel/test/subtst_form_submission_1.html"></iframe>
-<div id="content" style="display: none">
-
- <!-- ===== Things that should not be saved. ===== -->
-
- <!-- autocomplete=off for input -->
- <form id="form1" onsubmit="return checkSubmit(1)">
- <input type="text" name="test1" autocomplete="off">
- <button type="submit">Submit</button>
- </form>
-
- <!-- autocomplete=off for form -->
- <form id="form2" onsubmit="return checkSubmit(2)" autocomplete="off">
- <input type="text" name="test1">
- <button type="submit">Submit</button>
- </form>
-
- <!-- don't save type=hidden -->
- <form id="form3" onsubmit="return checkSubmit(3)">
- <input type="hidden" name="test1">
- <button type="submit">Submit</button>
- </form>
-
- <!-- don't save type=checkbox -->
- <form id="form4" onsubmit="return checkSubmit(4)">
- <input type="checkbox" name="test1">
- <button type="submit">Submit</button>
- </form>
-
- <!-- Don't save empty values. -->
- <form id="form5" onsubmit="return checkSubmit(5)">
- <input type="text" name="test1" value="originalValue">
- <button type="submit">Submit</button>
- </form>
-
- <!-- Don't save unchanged values. -->
- <form id="form6" onsubmit="return checkSubmit(6)">
- <input type="text" name="test1" value="dontSaveThis">
- <button type="submit">Submit</button>
- </form>
-
- <!-- Don't save unchanged values. (.value not touched) -->
- <form id="form7" onsubmit="return checkSubmit(7)">
- <input type="text" name="test1" value="dontSaveThis">
- <button type="submit">Submit</button>
- </form>
-
- <!-- No field name or ID. -->
- <form id="form8" onsubmit="return checkSubmit(8)">
- <input type="text">
- <button type="submit">Submit</button>
- </form>
-
- <!-- Nothing to save! -->
- <form id="form9" onsubmit="return checkSubmit(9)">
- <button type="submit">Submit</button>
- </form>
-
- <!-- input with name too long (300 chars.) -->
- <form id="form10" onsubmit="return checkSubmit(10)">
- <input type="text" name="12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890">
- <button type="submit">Submit</button>
- </form>
-
- <!-- input with value too long (300 chars.) -->
- <form id="form11" onsubmit="return checkSubmit(11)">
- <input type="text" name="test1">
- <button type="submit">Submit</button>
- </form>
-
- <!-- input with value of one space (which should be trimmed) -->
- <form id="form12" onsubmit="return checkSubmit(12)">
- <input type="text" name="test1">
- <button type="submit">Submit</button>
- </form>
-
- <!-- password field -->
- <form id="form13" onsubmit="return checkSubmit(13)">
- <input type="password" name="test1">
- <button type="submit">Submit</button>
- </form>
-
- <!-- password field (type changed after pageload) -->
- <form id="form14" onsubmit="return checkSubmit(14)">
- <input type="text" name="test1">
- <button type="submit">Submit</button>
- </form>
-
- <!-- input with sensitive data (16 digit credit card number) -->
- <form id="form15" onsubmit="return checkSubmit(15)">
- <script type="text/javascript">
- var form = document.getElementById('form15');
- for (let i = 0; i != 10; i++)
- {
- let input = document.createElement('input');
- input.type = 'text';
- input.name = 'test' + (i + 1);
- form.appendChild(input);
- }
- </script>
- <button type="submit">Submit</button>
- </form>
-
- <!-- input with sensitive data (15 digit credit card number) -->
- <form id="form16" onsubmit="return checkSubmit(16)">
- <script type="text/javascript">
- form = document.getElementById('form16');
- for (let i = 0; i != 10; i++)
- {
- let input = document.createElement('input');
- input.type = 'text';
- input.name = 'test' + (i + 1);
- form.appendChild(input);
- }
- </script>
- <button type="submit">Submit</button>
- </form>
-
- <!-- input with sensitive data (9 digit credit card number) -->
- <form id="form17" onsubmit="return checkSubmit(17)">
- <input type="text" name="test1">
- <button type="submit">Submit</button>
- </form>
-
- <!-- input with sensitive data (16 digit hyphenated credit card number) -->
- <form id="form18" onsubmit="return checkSubmit(18)">
- <input type="text" name="test1">
- <button type="submit">Submit</button>
- </form>
-
- <!-- input with sensitive data (15 digit whitespace-separated credit card number) -->
- <form id="form19" onsubmit="return checkSubmit(19)">
- <input type="text" name="test1">
- <button type="submit">Submit</button>
- </form>
-
- <!-- form data submitted through HTTPS, when browser.formfill.saveHttpsForms is false -->
- <form id="form20" action="https://www.example.com/" onsubmit="return checkSubmit(20)">
- <input type="text" name="test1">
- <button type="submit">Submit</button>
- </form>
-
- <!-- Form 21 is submitted into an iframe, not declared here. -->
-
- <!-- Don't save values if the form is invalid. -->
- <form id="form22" onsubmit="return checkSubmit(22);">
- <input type='email' name='test1' oninvalid="return checkSubmit(22);">
- <button type='submit'>Submit</button>
- </form>
-
- <!-- Don't save values if the form is invalid. -->
- <form id="form23" onsubmit="return checkSubmit(23);">
- <input type='email' value='foo' oninvalid="return checkSubmit(23);">
- <input type='text' name='test1'>
- <button type='submit'>Submit</button>
- </form>
-
- <!-- Don't save values if the input name is 'searchbar-history' -->
- <form id="form24" onsubmit="return checkSubmit(24);">
- <input type='text' name='searchbar-history'>
- <button type='submit'>Submit</button>
- </form>
-
- <!-- ===== Things that should be saved ===== -->
-
- <!-- Form 100 is submitted into an iframe, not declared here. -->
-
- <!-- input with no default value -->
- <form id="form101" onsubmit="return checkSubmit(101)">
- <input type="text" name="test1">
- <button type="submit">Submit</button>
- </form>
-
- <!-- input with a default value -->
- <form id="form102" onsubmit="return checkSubmit(102)">
- <input type="text" name="test2" value="originalValue">
- <button type="submit">Submit</button>
- </form>
-
- <!-- input uses id but not name -->
- <form id="form103" onsubmit="return checkSubmit(103)">
- <input type="text" id="test3">
- <button type="submit">Submit</button>
- </form>
-
- <!-- input with leading and trailing space -->
- <form id="form104" onsubmit="return checkSubmit(104)">
- <input type="text" name="test4">
- <button type="submit">Submit</button>
- </form>
-
- <!-- input with leading and trailing whitespace -->
- <form id="form105" onsubmit="return checkSubmit(105)">
- <input type="text" name="test5">
- <button type="submit">Submit</button>
- </form>
-
- <!-- input that looks like sensitive data but doesn't
- satisfy the requirements (incorrect length) -->
- <form id="form106" onsubmit="return checkSubmit(106)">
- <input type="text" name="test6">
- <button type="submit">Submit</button>
- </form>
-
- <!-- input that looks like sensitive data but doesn't
- satisfy the requirements (Luhn check fails for 16 chars) -->
- <form id="form107" onsubmit="return checkSubmit(107)">
- <script type="text/javascript">
- form = document.getElementById('form107');
- for (let i = 0; i != 10; i++)
- {
- let input = document.createElement('input');
- input.type = 'text';
- input.name = 'test7_' + (i + 1);
- form.appendChild(input);
- }
- </script>
- <button type="submit">Submit</button>
- </form>
-
- <!-- input that looks like sensitive data but doesn't
- satisfy the requirements (Luhn check fails for 15 chars) -->
- <form id="form108" onsubmit="return checkSubmit(108)">
- <script type="text/javascript">
- form = document.getElementById('form108');
- for (let i = 0; i != 10; i++)
- {
- let input = document.createElement('input');
- input.type = 'text';
- input.name = 'test8_' + (i + 1);
- form.appendChild(input);
- }
- </script>
- <button type="submit">Submit</button>
- </form>
-
- <!-- form data submitted through HTTPS, when browser.formfill.saveHttpsForms is true -->
- <form id="form109" action="https://www.example.com/" onsubmit="return checkSubmit(109)">
- <input type="text" name="test9">
- <button type="submit">Submit</button>
- </form>
-
- <!-- regular form data, when browser.formfill.saveHttpsForms is false -->
- <form id="form110" onsubmit="return checkSubmit(110)">
- <input type="text" name="test10">
- <button type="submit">Submit</button>
- </form>
-
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-var numSubmittedForms = 0;
-
-var ccNumbers = {
- valid15: [
- "930771457288760", "474915027480942",
- "924894781317325", "714816113937185",
- "790466087343106", "474320195408363",
- "219211148122351", "633038472250799",
- "354236732906484", "095347810189325",
- ],
- valid16: [
- "3091269135815020", "5471839082338112",
- "0580828863575793", "5015290610002932",
- "9465714503078607", "4302068493801686",
- "2721398408985465", "6160334316984331",
- "8643619970075142", "0218246069710785"
- ],
- invalid15: [
- "526931005800649", "724952425140686",
- "379761391174135", "030551436468583",
- "947377014076746", "254848023655752",
- "226871580283345", "708025346034339",
- "917585839076788", "918632588027666"
- ],
- invalid16: [
- "9946177098017064", "4081194386488872",
- "3095975979578034", "3662215692222536",
- "6723210018630429", "4411962856225025",
- "8276996369036686", "4449796938248871",
- "3350852696538147", "5011802870046957"
- ],
-};
-
-function checkInitialState() {
- countEntries(null, null,
- function (num) {
- ok(!num, "checking for initially empty storage");
- startTest();
- });
-}
-
-function startTest() {
- // Fill in values for the various fields. We could just set the <input>'s
- // value attribute, but we don't save default form values (and we want to
- // ensure unsaved values are because of autocomplete=off or whatever).
- $_(1, "test1").value = "dontSaveThis";
- $_(2, "test1").value = "dontSaveThis";
- $_(3, "test1").value = "dontSaveThis";
- $_(4, "test1").value = "dontSaveThis";
- $_(5, "test1").value = "";
- $_(6, "test1").value = "dontSaveThis";
- // Form 7 deliberately left untouched.
- // Form 8 has an input with no name or input attribute.
- let input = document.getElementById("form8").elements[0];
- is(input.type, "text", "checking we got unidentified input");
- input.value = "dontSaveThis";
- // Form 9 has nothing to modify.
- $_(10, "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890").value = "dontSaveThis";
- $_(11, "test1").value = "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
- $_(12, "test1").value = " ";
- $_(13, "test1").value = "dontSaveThis";
- $_(14, "test1").type = "password";
- $_(14, "test1").value = "dontSaveThis";
-
- var testData = ccNumbers.valid16;
- for (let i = 0; i != testData.length; i++) {
- $_(15, "test" + (i + 1)).value = testData[i];
- }
-
- testData = ccNumbers.valid15;
- for (let i = 0; i != testData.length; i++) {
- $_(16, "test" + (i + 1)).value = testData[i];
- }
- $_(17, "test1").value = "001064088";
- $_(18, "test1").value = "0000-0000-0080-4609";
- $_(19, "test1").value = "0000 0000 0222 331";
- $_(20, "test1").value = "dontSaveThis";
- $_(22, "test1").value = "dontSaveThis";
- $_(23, "test1").value = "dontSaveThis";
- $_(24, "searchbar-history").value = "dontSaveThis";
-
- $_(101, "test1").value = "savedValue";
- $_(102, "test2").value = "savedValue";
- $_(103, "test3").value = "savedValue";
- $_(104, "test4").value = " trimTrailingAndLeadingSpace ";
- $_(105, "test5").value = "\t trimTrailingAndLeadingWhitespace\t ";
- $_(106, "test6").value = "00000000109181";
-
- testData = ccNumbers.invalid16;
- for (let i = 0; i != testData.length; i++) {
- $_(107, "test7_" + (i + 1)).value = testData[i];
- }
-
- testData = ccNumbers.invalid15;
- for (let i = 0; i != testData.length; i++) {
- $_(108, "test8_" + (i + 1)).value = testData[i];
- }
-
- $_(109, "test9").value = "savedValue";
- $_(110, "test10").value = "savedValue";
-
- // submit the first form.
- var button = getFormSubmitButton(1);
- button.click();
-}
-
-
-// Called by each form's onsubmit handler.
-function checkSubmit(formNum) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
-
- ok(true, "form " + formNum + " submitted");
- numSubmittedForms++;
-
- // Check for expected storage state.
- switch (formNum) {
- // Test 1-24 should not save anything.
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- case 10:
- case 11:
- case 12:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- case 20:
- case 21:
- case 22:
- case 23:
- case 24:
- countEntries(null, null,
- function (num) {
- ok(!num, "checking for empty storage");
- submitForm(formNum);
- });
- return false;
- case 100:
- checkForSave("subtest2", "subtestValue", "checking saved subtest value");
- break;
- case 101:
- checkForSave("test1", "savedValue", "checking saved value");
- break;
- case 102:
- checkForSave("test2", "savedValue", "checking saved value");
- break;
- case 103:
- checkForSave("test3", "savedValue", "checking saved value");
- break;
- case 104:
- checkForSave("test4", "trimTrailingAndLeadingSpace", "checking saved value is trimmed on both sides");
- break;
- case 105:
- checkForSave("test5", "trimTrailingAndLeadingWhitespace", "checking saved value is trimmed on both sides");
- break;
- case 106:
- checkForSave("test6", "00000000109181", "checking saved value");
- break;
- case 107:
- for (let i = 0; i != ccNumbers.invalid16.length; i++) {
- checkForSave("test7_" + (i + 1), ccNumbers.invalid16[i], "checking saved value");
- }
- break;
- case 108:
- for (let i = 0; i != ccNumbers.invalid15.length; i++) {
- checkForSave("test8_" + (i + 1), ccNumbers.invalid15[i], "checking saved value");
- }
- break;
- case 109:
- checkForSave("test9", "savedValue", "checking saved value");
- break;
- case 110:
- checkForSave("test10", "savedValue", "checking saved value");
- break;
- default:
- ok(false, "Unexpected form submission");
- break;
- }
-
- return submitForm(formNum);
-}
-
-function submitForm(formNum)
-{
- // Forms 13 and 14 would trigger a save-password notification. Temporarily
- // disable pwmgr, then reenable it.
- if (formNum == 12)
- SpecialPowers.setBoolPref("signon.rememberSignons", false);
- if (formNum == 14)
- SpecialPowers.clearUserPref("signon.rememberSignons");
-
- // Forms 20 and 21 requires browser.formfill.saveHttpsForms to be false
- if (formNum == 19)
- SpecialPowers.setBoolPref("browser.formfill.saveHttpsForms", false);
- // Reset preference now that 20 and 21 are over
- if (formNum == 21)
- SpecialPowers.clearUserPref("browser.formfill.saveHttpsForms");
-
- // End the test now on SeaMonkey.
- if (formNum == 21 && navigator.userAgent.match(/ SeaMonkey\//)) {
- checkObserver.uninit();
- is(numSubmittedForms, 21, "Ensuring all forms were submitted.");
-
- todo(false, "Skipping remaining checks on SeaMonkey ftb. (Bug 589471)");
- // finish(), yet let the test actually end first, to be safe.
- SimpleTest.executeSoon(SimpleTest.finish);
-
- return false; // return false to cancel current form submission
- }
-
- // Form 109 requires browser.formfill.save_https_forms to be true;
- // Form 110 requires it to be false.
- if (formNum == 108)
- SpecialPowers.setBoolPref("browser.formfill.saveHttpsForms", true);
- if (formNum == 109)
- SpecialPowers.setBoolPref("browser.formfill.saveHttpsForms", false);
- if (formNum == 110)
- SpecialPowers.clearUserPref("browser.formfill.saveHttpsForms");
-
- // End the test at the last form.
- if (formNum == 110) {
- is(numSubmittedForms, 35, "Ensuring all forms were submitted.");
- checkObserver.uninit();
- SimpleTest.finish();
- return false; // return false to cancel current form submission
- }
-
- // This timeout is here so that button.click() is never called before this
- // function returns. If button.click() is called before returning, a long
- // chain of submits will happen recursively since the submit is dispatched
- // immediately.
- //
- // This in itself is fine, but if there are errors in the code, mochitests
- // will in some cases give you "server too busy", which is hard to debug!
- //
- setTimeout(function() {
- checkObserver.waitForChecks(function() {
- var nextFormNum = formNum == 24 ? 100 : (formNum + 1);
-
- // Submit the next form. Special cases are Forms 21 and 100, which happen
- // from an HTTPS domain in an iframe.
- if (nextFormNum == 21 || nextFormNum == 100) {
- ok(true, "submitting iframe test " + nextFormNum);
- document.getElementById("iframe").contentWindow.clickButton(nextFormNum);
- }
- else {
- var button = getFormSubmitButton(nextFormNum);
- button.click();
- }
- });
- }, 0);
-
- return false; // cancel current form submission
-}
-
-checkObserver.init();
-
-window.onload = checkInitialState;
-
-SimpleTest.waitForExplicitFinish();
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/satchel/test/test_form_submission_cap.html b/toolkit/components/satchel/test/test_form_submission_cap.html
deleted file mode 100644
index 96112f1c1c..0000000000
--- a/toolkit/components/satchel/test/test_form_submission_cap.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Satchel Test for Form Submisstion Field Cap</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="satchel_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-
- <form id="form1" onsubmit="return checkSubmit(1)">
- <button type="submit">Submit</button>
- </form>
-
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/* Test for bug 492701.
- Save only the first MAX_FIELDS_SAVED changed fields in a form.
- Generate numInputFields = MAX_FIELDS_SAVED + 1 fields, change all values,
- and test that only MAX_FIELDS_SAVED are actually saved and that
- field # numInputFields was not saved.
-*/
-
-var numSubmittedForms = 0;
-var numInputFields = 101;
-
-function checkInitialState() {
- countEntries(null, null,
- function (num) {
- ok(!num, "checking for initially empty storage");
- startTest();
- });
-}
-
-function startTest() {
- var form = document.getElementById("form1");
- for (i = 1; i <= numInputFields; i++) {
- var newField = document.createElement("input");
- newField.setAttribute("type", "text");
- newField.setAttribute("name", "test" + i);
- form.appendChild(newField);
- }
-
- // Fill in values for the various fields. We could just set the <input>'s
- // value attribute, but we don't save default form values (and we want to
- // ensure unsaved values are because of autocomplete=off or whatever).
- for (i = 1; i <= numInputFields; i++) {
- $_(1, "test" + i).value = i;
- }
-
- // submit the first form.
- var button = getFormSubmitButton(1);
- button.click();
-}
-
-
-// Called by each form's onsubmit handler.
-function checkSubmit(formNum) {
- ok(true, "form " + formNum + " submitted");
- numSubmittedForms++;
-
- // check that the first (numInputFields - 1) CHANGED fields are saved
- for (i = 1; i < numInputFields; i++) { // check all but last
- checkForSave("test" + i, i, "checking saved value " + i);
- }
-
- // End the test.
- is(numSubmittedForms, 1, "Ensuring all forms were submitted.");
- SimpleTest.finish();
- return false; // return false to cancel current form submission
-}
-
-
-window.onload = checkInitialState;
-
-SimpleTest.waitForExplicitFinish();
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/satchel/test/test_form_submission_cap2.html b/toolkit/components/satchel/test/test_form_submission_cap2.html
deleted file mode 100644
index f51fb5f47d..0000000000
--- a/toolkit/components/satchel/test/test_form_submission_cap2.html
+++ /dev/null
@@ -1,190 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Satchel Test for Form Submisstion Field Cap</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="satchel_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-<!--
- Test for bug 492701.
- Only change field # numInputFields (= MAX_FIELDS_SAVED + 1)
- and test that it is actually saved and the other (unmodified) ones are not.
--->
- <form id="form1" onsubmit="return checkSubmit(1)">
- <input type="text" name="test1" value="1">
- <input type="text" name="test2" value="2">
- <input type="text" name="test3" value="3">
- <input type="text" name="test4" value="4">
- <input type="text" name="test5" value="5">
- <input type="text" name="test6" value="6">
- <input type="text" name="test7" value="7">
- <input type="text" name="test8" value="8">
- <input type="text" name="test9" value="9">
- <input type="text" name="test10" value="10">
- <input type="text" name="test11" value="11">
- <input type="text" name="test12" value="12">
- <input type="text" name="test13" value="13">
- <input type="text" name="test14" value="14">
- <input type="text" name="test15" value="15">
- <input type="text" name="test16" value="16">
- <input type="text" name="test17" value="17">
- <input type="text" name="test18" value="18">
- <input type="text" name="test19" value="19">
- <input type="text" name="test20" value="20">
- <input type="text" name="test21" value="21">
- <input type="text" name="test22" value="22">
- <input type="text" name="test23" value="23">
- <input type="text" name="test24" value="24">
- <input type="text" name="test25" value="25">
- <input type="text" name="test26" value="26">
- <input type="text" name="test27" value="27">
- <input type="text" name="test28" value="28">
- <input type="text" name="test29" value="29">
- <input type="text" name="test30" value="30">
- <input type="text" name="test31" value="31">
- <input type="text" name="test32" value="32">
- <input type="text" name="test33" value="33">
- <input type="text" name="test34" value="34">
- <input type="text" name="test35" value="35">
- <input type="text" name="test36" value="36">
- <input type="text" name="test37" value="37">
- <input type="text" name="test38" value="38">
- <input type="text" name="test39" value="39">
- <input type="text" name="test40" value="40">
- <input type="text" name="test41" value="41">
- <input type="text" name="test42" value="42">
- <input type="text" name="test43" value="43">
- <input type="text" name="test44" value="44">
- <input type="text" name="test45" value="45">
- <input type="text" name="test46" value="46">
- <input type="text" name="test47" value="47">
- <input type="text" name="test48" value="48">
- <input type="text" name="test49" value="49">
- <input type="text" name="test50" value="50">
- <input type="text" name="test51" value="51">
- <input type="text" name="test52" value="52">
- <input type="text" name="test53" value="53">
- <input type="text" name="test54" value="54">
- <input type="text" name="test55" value="55">
- <input type="text" name="test56" value="56">
- <input type="text" name="test57" value="57">
- <input type="text" name="test58" value="58">
- <input type="text" name="test59" value="59">
- <input type="text" name="test60" value="60">
- <input type="text" name="test61" value="61">
- <input type="text" name="test62" value="62">
- <input type="text" name="test63" value="63">
- <input type="text" name="test64" value="64">
- <input type="text" name="test65" value="65">
- <input type="text" name="test66" value="66">
- <input type="text" name="test67" value="67">
- <input type="text" name="test68" value="68">
- <input type="text" name="test69" value="69">
- <input type="text" name="test70" value="70">
- <input type="text" name="test71" value="71">
- <input type="text" name="test72" value="72">
- <input type="text" name="test73" value="73">
- <input type="text" name="test74" value="74">
- <input type="text" name="test75" value="75">
- <input type="text" name="test76" value="76">
- <input type="text" name="test77" value="77">
- <input type="text" name="test78" value="78">
- <input type="text" name="test79" value="79">
- <input type="text" name="test80" value="80">
- <input type="text" name="test81" value="81">
- <input type="text" name="test82" value="82">
- <input type="text" name="test83" value="83">
- <input type="text" name="test84" value="84">
- <input type="text" name="test85" value="85">
- <input type="text" name="test86" value="86">
- <input type="text" name="test87" value="87">
- <input type="text" name="test88" value="88">
- <input type="text" name="test89" value="89">
- <input type="text" name="test90" value="90">
- <input type="text" name="test91" value="91">
- <input type="text" name="test92" value="92">
- <input type="text" name="test93" value="93">
- <input type="text" name="test94" value="94">
- <input type="text" name="test95" value="95">
- <input type="text" name="test96" value="96">
- <input type="text" name="test97" value="97">
- <input type="text" name="test98" value="98">
- <input type="text" name="test99" value="99">
- <input type="text" name="test100" value="100">
- <input type="text" name="test101" value="101">
- <button type="submit">Submit</button>
- </form>
-
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-var numSubmittedForms = 0;
-var numInputFields = 101;
-
-function checkInitialState() {
- countEntries(null, null,
- function (num) {
- ok(!num, "checking for initially empty storage");
- startTest();
- });
-}
-
-function startTest() {
- // Fill in values for the various fields. We could just set the <input>'s
- // value attribute, but we don't save default form values (and we want to
- // ensure unsaved values are because of autocomplete=off or whatever).
- $_(1, "test" + numInputFields).value = numInputFields + " changed";
-
- // submit the first form.
- var button = getFormSubmitButton(1);
- button.click();
-}
-
-// Make sure that the first (numInputFields - 1) were not saved (as they were not changed).
-// Call done() when finished.
-function checkCountEntries(formNum, index, done)
-{
- countEntries("test" + index, index,
- function (num) {
- ok(!num, "checking unsaved value " + index);
- if (index < numInputFields) {
- checkCountEntries(formNum, index + 1, done);
- }
- else {
- done(formNum);
- }
- });
-}
-
-// Called by each form's onsubmit handler.
-function checkSubmit(formNum) {
- ok(true, "form " + formNum + " submitted");
- numSubmittedForms++;
-
- // make sure that the field # numInputFields was saved
- checkForSave("test" + numInputFields, numInputFields + " changed", "checking saved value " + numInputFields);
-
- checkCountEntries(formNum, 1, checkSubmitCounted);
-
- return false; // cancel current form submission
-}
-
-function checkSubmitCounted(formNum) {
- is(numSubmittedForms, 1, "Ensuring all forms were submitted.");
- SimpleTest.finish();
- return false;
-}
-
-window.onload = checkInitialState;
-
-SimpleTest.waitForExplicitFinish();
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/satchel/test/test_password_autocomplete.html b/toolkit/components/satchel/test/test_password_autocomplete.html
deleted file mode 100644
index 82781ae355..0000000000
--- a/toolkit/components/satchel/test/test_password_autocomplete.html
+++ /dev/null
@@ -1,107 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test for form history on type=password</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="satchel_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
- Test for form history on type=password
- (based on test_bug_511615.html)
-<p id="display"></p>
-
-<!-- we presumably can't hide the content for this test. -->
-<div id="content">
- <datalist id="datalist1">
- <option>value10</option>
- <option>value11</option>
- <option>value12</option>
- </datalist>
- <form id="form1" onsubmit="return false;">
- <!-- Don't set the type to password until rememberSignons is false since we
- want to test when rememberSignons is false. -->
- <input type="to-be-password" name="field1" list="datalist1">
- <button type="submit">Submit</button>
- </form>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-/* import-globals-from satchel_common.js */
-
-var resolvePopupShownListener;
-registerPopupShownListener(() => resolvePopupShownListener());
-
-function waitForNextPopup() {
- return new Promise(resolve => { resolvePopupShownListener = resolve; });
-}
-
-/**
- * Indicates the time to wait before checking that the state of the autocomplete
- * popup, including whether it is open, has not changed in response to events.
- *
- * Manual testing on a fast machine revealed that 80ms was still unreliable,
- * while 100ms detected a simulated failure reliably. Unfortunately, this means
- * that to take into account slower machines we should use a larger value.
- *
- * Note that if a machine takes more than this time to show the popup, this
- * would not cause a failure, conversely the machine would not be able to detect
- * whether the test should have failed. In other words, this use of timeouts is
- * never expected to cause intermittent failures with test automation.
- */
-const POPUP_RESPONSE_WAIT_TIME_MS = 200;
-
-SimpleTest.requestFlakyTimeout("Must ensure that an event does not happen.");
-
-/**
- * Checks that the popup does not open in response to the given function.
- */
-function expectPopupDoesNotOpen(triggerFn) {
- let popupShown = waitForNextPopup();
- triggerFn();
- return Promise.race([
- popupShown.then(() => Promise.reject("Popup opened unexpectedly.")),
- new Promise(resolve => setTimeout(resolve, POPUP_RESPONSE_WAIT_TIME_MS)),
- ]);
-}
-
-add_task(function* test_initialize() {
- yield SpecialPowers.pushPrefEnv({"set": [["signon.rememberSignons", false]]});
-
- // Now that rememberSignons is false, create the password field
- $_(1, "field1").type = "password";
-
- yield new Promise(resolve => updateFormHistory([
- { op : "remove" },
- { op : "add", fieldname : "field1", value : "value1" },
- { op : "add", fieldname : "field1", value : "value2" },
- { op : "add", fieldname : "field1", value : "value3" },
- { op : "add", fieldname : "field1", value : "value4" },
- { op : "add", fieldname : "field1", value : "value5" },
- { op : "add", fieldname : "field1", value : "value6" },
- { op : "add", fieldname : "field1", value : "value7" },
- { op : "add", fieldname : "field1", value : "value8" },
- { op : "add", fieldname : "field1", value : "value9" },
- ], resolve));
-});
-
-add_task(function* test_insecure_focusWarning() {
- // The form is insecure so should show the warning even if password manager is disabled.
- let input = $_(1, "field1");
- let shownPromise = waitForNextPopup();
- input.focus();
- yield shownPromise;
-
- ok(getMenuEntries()[0].includes("Logins entered here could be compromised"),
- "Check warning is first")
-
- // Close the popup
- input.blur();
-});
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/satchel/test/test_popup_direction.html b/toolkit/components/satchel/test/test_popup_direction.html
deleted file mode 100644
index 02e044bbdb..0000000000
--- a/toolkit/components/satchel/test/test_popup_direction.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test for Popup Direction</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="satchel_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Test for Popup Direction
-<p id="display"></p>
-
-<!-- we presumably can't hide the content for this test. -->
-<div id="content">
- <!-- normal, basic form -->
- <form id="form1" onsubmit="return false;">
- <input type="text" name="field1">
- <button type="submit">Submit</button>
- </form>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-var resolvePopupShownListener;
-registerPopupShownListener(() => resolvePopupShownListener());
-
-function waitForNextPopup() {
- return new Promise(resolve => { resolvePopupShownListener = resolve; });
-}
-
-add_task(function* test_popup_direction() {
- var input = $_(1, "field1");
-
- yield new Promise(resolve => updateFormHistory([
- { op : "remove" },
- { op : "add", fieldname : "field1", value : "value1" },
- { op : "add", fieldname : "field1", value : "value2" },
- ], resolve));
-
- for (let direction of ["ltr", "rtl"]) {
- document.getElementById("content").style.direction = direction;
-
- let popupShown = waitForNextPopup();
- input.focus();
- doKey("down");
- yield popupShown;
-
- let popupState = yield new Promise(resolve => getPopupState(resolve));
- is(popupState.direction, direction, "Direction should match.");
-
- // Close the popup.
- input.blur();
- }
-});
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/satchel/test/test_popup_enter_event.html b/toolkit/components/satchel/test/test_popup_enter_event.html
deleted file mode 100644
index 1a7aa8c196..0000000000
--- a/toolkit/components/satchel/test/test_popup_enter_event.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="utf-8">
- <title>Test for events while the form history popup is open</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="satchel_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-Form History test: Test for events while the form history popup is open
-<p id="display"></p>
-
-<div id="content">
- <form id="form1">
- <input type="text" name="field1">
- <button type="submit">Submit</button>
- </form>
-</div>
-
-<pre id="test">
-<script class="testbody">
-var form = document.getElementById("form1");
-var input = $_(1, "field1");
-var expectedValue = "value1";
-
-function setupFormHistory(aCallback) {
- updateFormHistory([
- { op : "remove" },
- { op : "add", fieldname : "field1", value : "value1" },
- ], aCallback);
-}
-
-registerPopupShownListener(popupShownListener);
-
-function handleEnter(evt) {
- if (evt.keyCode != KeyEvent.DOM_VK_RETURN) {
- return;
- }
-
- info("RETURN received for phase: " + evt.eventPhase);
- if (input.value == expectedValue) {
- ok(true, "RETURN should be received when the popup is closed");
- is(input.value, expectedValue, "Check input value when enter is pressed the 2nd time");
- info("form should submit with the default handler");
- } else {
- ok(false, "RETURN keypress shouldn't have been received when a popup item is selected");
- }
-}
-
-function popupShownListener(evt) {
- doKey("down");
- doKey("return"); // select the first entry in the popup
- doKey("return"); // try to submit the form with the filled value
-}
-
-function runTest() {
- input.addEventListener("keypress", handleEnter, true);
- form.addEventListener("submit", evt => {
- is(input.value, expectedValue, "Check input value in the submit handler");
- evt.preventDefault();
- SimpleTest.finish();
- });
-
- // Focus the input before adjusting.value so that the caret goes to the end
- // (since OS X doesn't show the dropdown otherwise).
- input.focus();
- input.value = "value"
- input.focus();
- doKey("down");
-}
-
-function startTest() {
- setupFormHistory(function() {
- runTest();
- });
-}
-
-window.onload = startTest;
-
-SimpleTest.waitForExplicitFinish();
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/satchel/test/unit/.eslintrc.js b/toolkit/components/satchel/test/unit/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/satchel/test/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/satchel/test/unit/asyncformhistory_expire.sqlite b/toolkit/components/satchel/test/unit/asyncformhistory_expire.sqlite
deleted file mode 100644
index 07b43c2096..0000000000
--- a/toolkit/components/satchel/test/unit/asyncformhistory_expire.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/satchel/test/unit/formhistory_1000.sqlite b/toolkit/components/satchel/test/unit/formhistory_1000.sqlite
deleted file mode 100644
index 5eeab074fd..0000000000
--- a/toolkit/components/satchel/test/unit/formhistory_1000.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/satchel/test/unit/formhistory_CORRUPT.sqlite b/toolkit/components/satchel/test/unit/formhistory_CORRUPT.sqlite
deleted file mode 100644
index 5f7498bfc2..0000000000
--- a/toolkit/components/satchel/test/unit/formhistory_CORRUPT.sqlite
+++ /dev/null
@@ -1 +0,0 @@
-BACON
diff --git a/toolkit/components/satchel/test/unit/formhistory_apitest.sqlite b/toolkit/components/satchel/test/unit/formhistory_apitest.sqlite
deleted file mode 100644
index 00daf03c27..0000000000
--- a/toolkit/components/satchel/test/unit/formhistory_apitest.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/satchel/test/unit/formhistory_autocomplete.sqlite b/toolkit/components/satchel/test/unit/formhistory_autocomplete.sqlite
deleted file mode 100644
index 724cff73f6..0000000000
--- a/toolkit/components/satchel/test/unit/formhistory_autocomplete.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/satchel/test/unit/formhistory_v3.sqlite b/toolkit/components/satchel/test/unit/formhistory_v3.sqlite
deleted file mode 100644
index e0e8fe2468..0000000000
--- a/toolkit/components/satchel/test/unit/formhistory_v3.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/satchel/test/unit/formhistory_v3v4.sqlite b/toolkit/components/satchel/test/unit/formhistory_v3v4.sqlite
deleted file mode 100644
index 8eab177e97..0000000000
--- a/toolkit/components/satchel/test/unit/formhistory_v3v4.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/satchel/test/unit/formhistory_v999a.sqlite b/toolkit/components/satchel/test/unit/formhistory_v999a.sqlite
deleted file mode 100644
index 14279f05ff..0000000000
--- a/toolkit/components/satchel/test/unit/formhistory_v999a.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/satchel/test/unit/formhistory_v999b.sqlite b/toolkit/components/satchel/test/unit/formhistory_v999b.sqlite
deleted file mode 100644
index 21d9c1f1cc..0000000000
--- a/toolkit/components/satchel/test/unit/formhistory_v999b.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/satchel/test/unit/head_satchel.js b/toolkit/components/satchel/test/unit/head_satchel.js
deleted file mode 100644
index 282d07ba52..0000000000
--- a/toolkit/components/satchel/test/unit/head_satchel.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/* 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/. */
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/FormHistory.jsm");
-
-var Ci = Components.interfaces;
-var Cc = Components.classes;
-var Cu = Components.utils;
-
-const CURRENT_SCHEMA = 4;
-const PR_HOURS = 60 * 60 * 1000000;
-
-do_get_profile();
-
-var dirSvc = Cc["@mozilla.org/file/directory_service;1"].
- getService(Ci.nsIProperties);
-
-// Send the profile-after-change notification to the form history component to ensure
-// that it has been initialized.
-var formHistoryStartup = Cc["@mozilla.org/satchel/form-history-startup;1"].
- getService(Ci.nsIObserver);
-formHistoryStartup.observe(null, "profile-after-change", null);
-
-function getDBVersion(dbfile) {
- var ss = Cc["@mozilla.org/storage/service;1"].
- getService(Ci.mozIStorageService);
- var dbConnection = ss.openDatabase(dbfile);
- var version = dbConnection.schemaVersion;
- dbConnection.close();
-
- return version;
-}
-
-const isGUID = /[A-Za-z0-9\+\/]{16}/;
-
-// Find form history entries.
-function searchEntries(terms, params, iter) {
- let results = [];
- FormHistory.search(terms, params, { handleResult: result => results.push(result),
- handleError: function (error) {
- do_throw("Error occurred searching form history: " + error);
- },
- handleCompletion: function (reason) { if (!reason) iter.next(results); }
- });
-}
-
-// Count the number of entries with the given name and value, and call then(number)
-// when done. If name or value is null, then the value of that field does not matter.
-function countEntries(name, value, then) {
- var obj = {};
- if (name !== null)
- obj.fieldname = name;
- if (value !== null)
- obj.value = value;
-
- let count = 0;
- FormHistory.count(obj, { handleResult: result => count = result,
- handleError: function (error) {
- do_throw("Error occurred searching form history: " + error);
- },
- handleCompletion: function (reason) { if (!reason) then(count); }
- });
-}
-
-// Perform a single form history update and call then() when done.
-function updateEntry(op, name, value, then) {
- var obj = { op: op };
- if (name !== null)
- obj.fieldname = name;
- if (value !== null)
- obj.value = value;
- updateFormHistory(obj, then);
-}
-
-// Add a single form history entry with the current time and call then() when done.
-function addEntry(name, value, then) {
- let now = Date.now() * 1000;
- updateFormHistory({ op: "add", fieldname: name, value: value, timesUsed: 1,
- firstUsed: now, lastUsed: now }, then);
-}
-
-// Wrapper around FormHistory.update which handles errors. Calls then() when done.
-function updateFormHistory(changes, then) {
- FormHistory.update(changes, { handleError: function (error) {
- do_throw("Error occurred updating form history: " + error);
- },
- handleCompletion: function (reason) { if (!reason) then(); },
- });
-}
-
-/**
- * Logs info to the console in the standard way (includes the filename).
- *
- * @param aMessage
- * The message to log to the console.
- */
-function do_log_info(aMessage) {
- print("TEST-INFO | " + _TEST_FILE + " | " + aMessage);
-}
diff --git a/toolkit/components/satchel/test/unit/perf_autocomplete.js b/toolkit/components/satchel/test/unit/perf_autocomplete.js
deleted file mode 100644
index 6e8bb5125c..0000000000
--- a/toolkit/components/satchel/test/unit/perf_autocomplete.js
+++ /dev/null
@@ -1,140 +0,0 @@
-/* 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/. */
-
-var testnum = 0;
-var fh;
-var fac;
-var prefs;
-
-function countAllEntries() {
- let stmt = fh.DBConnection.createStatement("SELECT COUNT(*) as numEntries FROM moz_formhistory");
- do_check_true(stmt.executeStep());
- let numEntries = stmt.row.numEntries;
- stmt.finalize();
- return numEntries;
-}
-
-function do_AC_search(searchTerm, previousResult) {
- var duration = 0;
- var searchCount = 5;
- var tempPrevious = null;
- var startTime;
- for (var i = 0; i < searchCount; i++) {
- if (previousResult !== null)
- tempPrevious = fac.autoCompleteSearch("searchbar-history", previousResult, null, null);
- startTime = Date.now();
- results = fac.autoCompleteSearch("searchbar-history", searchTerm, null, tempPrevious);
- duration += Date.now() - startTime;
- }
- dump("[autoCompleteSearch][test " + testnum + "] for '" + searchTerm + "' ");
- if (previousResult !== null)
- dump("with '" + previousResult + "' previous result ");
- else
- dump("w/o previous result ");
- dump("took " + duration + " ms with " + results.matchCount + " matches. ");
- dump("Average of " + Math.round(duration / searchCount) + " ms per search\n");
- return results;
-}
-
-function run_test() {
- try {
-
- // ===== test init =====
- var testfile = do_get_file("formhistory_1000.sqlite");
- var profileDir = dirSvc.get("ProfD", Ci.nsIFile);
- var results;
-
- // Cleanup from any previous tests or failures.
- var destFile = profileDir.clone();
- destFile.append("formhistory.sqlite");
- if (destFile.exists())
- destFile.remove(false);
-
- testfile.copyTo(profileDir, "formhistory.sqlite");
-
- fh = Cc["@mozilla.org/satchel/form-history;1"].
- getService(Ci.nsIFormHistory2);
- fac = Cc["@mozilla.org/satchel/form-autocomplete;1"].
- getService(Ci.nsIFormAutoComplete);
- prefs = Cc["@mozilla.org/preferences-service;1"].
- getService(Ci.nsIPrefBranch);
-
- timeGroupingSize = prefs.getIntPref("browser.formfill.timeGroupingSize") * 1000 * 1000;
- maxTimeGroupings = prefs.getIntPref("browser.formfill.maxTimeGroupings");
- bucketSize = prefs.getIntPref("browser.formfill.bucketSize");
-
- // ===== 1 =====
- // Check initial state is as expected
- testnum++;
- do_check_true(fh.hasEntries);
- do_check_eq(1000, countAllEntries());
- fac.autoCompleteSearch("searchbar-history", "zzzzzzzzzz", null, null); // warm-up search
- do_check_true(fh.nameExists("searchbar-history"));
-
- // ===== 2 =====
- // Search for '' with no previous result
- testnum++;
- results = do_AC_search("", null);
- do_check_true(results.matchCount > 0);
-
- // ===== 3 =====
- // Search for 'r' with no previous result
- testnum++;
- results = do_AC_search("r", null);
- do_check_true(results.matchCount > 0);
-
- // ===== 4 =====
- // Search for 'r' with '' previous result
- testnum++;
- results = do_AC_search("r", "");
- do_check_true(results.matchCount > 0);
-
- // ===== 5 =====
- // Search for 're' with no previous result
- testnum++;
- results = do_AC_search("re", null);
- do_check_true(results.matchCount > 0);
-
- // ===== 6 =====
- // Search for 're' with 'r' previous result
- testnum++;
- results = do_AC_search("re", "r");
- do_check_true(results.matchCount > 0);
-
- // ===== 7 =====
- // Search for 'rea' without previous result
- testnum++;
- results = do_AC_search("rea", null);
- let countREA = results.matchCount;
-
- // ===== 8 =====
- // Search for 'rea' with 're' previous result
- testnum++;
- results = do_AC_search("rea", "re");
- do_check_eq(countREA, results.matchCount);
-
- // ===== 9 =====
- // Search for 'real' with 'rea' previous result
- testnum++;
- results = do_AC_search("real", "rea");
- let countREAL = results.matchCount;
- do_check_true(results.matchCount <= countREA);
-
- // ===== 10 =====
- // Search for 'real' with 're' previous result
- testnum++;
- results = do_AC_search("real", "re");
- do_check_eq(countREAL, results.matchCount);
-
- // ===== 11 =====
- // Search for 'real' with no previous result
- testnum++;
- results = do_AC_search("real", null);
- do_check_eq(countREAL, results.matchCount);
-
-
- } catch (e) {
- throw "FAILED in test #" + testnum + " -- " + e;
- }
-}
diff --git a/toolkit/components/satchel/test/unit/test_async_expire.js b/toolkit/components/satchel/test/unit/test_async_expire.js
deleted file mode 100644
index 501cbdfe55..0000000000
--- a/toolkit/components/satchel/test/unit/test_async_expire.js
+++ /dev/null
@@ -1,168 +0,0 @@
-/* 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/. */
-
-var dbFile, oldSize;
-var currentTestIndex = 0;
-
-function triggerExpiration() {
- // We can't easily fake a "daily idle" event, so for testing purposes form
- // history listens for another notification to trigger an immediate
- // expiration.
- Services.obs.notifyObservers(null, "formhistory-expire-now", null);
-}
-
-var checkExists = function(num) { do_check_true(num > 0); next_test(); }
-var checkNotExists = function(num) { do_check_true(!num); next_test(); }
-
-var TestObserver = {
- QueryInterface : XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
-
- observe : function (subject, topic, data) {
- do_check_eq(topic, "satchel-storage-changed");
-
- if (data == "formhistory-expireoldentries") {
- next_test();
- }
- }
-};
-
-function test_finished() {
- // Make sure we always reset prefs.
- if (Services.prefs.prefHasUserValue("browser.formfill.expire_days"))
- Services.prefs.clearUserPref("browser.formfill.expire_days");
-
- do_test_finished();
-}
-
-var iter = tests();
-
-function run_test()
-{
- do_test_pending();
- iter.next();
-}
-
-function next_test()
-{
- iter.next();
-}
-
-function* tests()
-{
- Services.obs.addObserver(TestObserver, "satchel-storage-changed", true);
-
- // ===== test init =====
- var testfile = do_get_file("asyncformhistory_expire.sqlite");
- var profileDir = do_get_profile();
-
- // Cleanup from any previous tests or failures.
- dbFile = profileDir.clone();
- dbFile.append("formhistory.sqlite");
- if (dbFile.exists())
- dbFile.remove(false);
-
- testfile.copyTo(profileDir, "formhistory.sqlite");
- do_check_true(dbFile.exists());
-
- // We're going to clear this at the end, so it better have the default value now.
- do_check_false(Services.prefs.prefHasUserValue("browser.formfill.expire_days"));
-
- // Sanity check initial state
- yield countEntries(null, null, function(num) { do_check_eq(508, num); next_test(); });
- yield countEntries("name-A", "value-A", checkExists); // lastUsed == distant past
- yield countEntries("name-B", "value-B", checkExists); // lastUsed == distant future
-
- do_check_eq(CURRENT_SCHEMA, FormHistory.schemaVersion);
-
- // Add a new entry
- yield countEntries("name-C", "value-C", checkNotExists);
- yield addEntry("name-C", "value-C", next_test);
- yield countEntries("name-C", "value-C", checkExists);
-
- // Update some existing entries to have ages relative to when the test runs.
- var now = 1000 * Date.now();
- let updateLastUsed = function updateLastUsedFn(results, age)
- {
- let lastUsed = now - age * 24 * PR_HOURS;
-
- let changes = [ ];
- for (let r = 0; r < results.length; r++) {
- changes.push({ op: "update", lastUsed: lastUsed, guid: results[r].guid });
- }
-
- return changes;
- }
-
- let results = yield searchEntries(["guid"], { lastUsed: 181 }, iter);
- yield updateFormHistory(updateLastUsed(results, 181), next_test);
-
- results = yield searchEntries(["guid"], { lastUsed: 179 }, iter);
- yield updateFormHistory(updateLastUsed(results, 179), next_test);
-
- results = yield searchEntries(["guid"], { lastUsed: 31 }, iter);
- yield updateFormHistory(updateLastUsed(results, 31), next_test);
-
- results = yield searchEntries(["guid"], { lastUsed: 29 }, iter);
- yield updateFormHistory(updateLastUsed(results, 29), next_test);
-
- results = yield searchEntries(["guid"], { lastUsed: 9999 }, iter);
- yield updateFormHistory(updateLastUsed(results, 11), next_test);
-
- results = yield searchEntries(["guid"], { lastUsed: 9 }, iter);
- yield updateFormHistory(updateLastUsed(results, 9), next_test);
-
- yield countEntries("name-A", "value-A", checkExists);
- yield countEntries("181DaysOld", "foo", checkExists);
- yield countEntries("179DaysOld", "foo", checkExists);
- yield countEntries(null, null, function(num) { do_check_eq(509, num); next_test(); });
-
- // 2 entries are expected to expire.
- triggerExpiration();
- yield;
-
- yield countEntries("name-A", "value-A", checkNotExists);
- yield countEntries("181DaysOld", "foo", checkNotExists);
- yield countEntries("179DaysOld", "foo", checkExists);
- yield countEntries(null, null, function(num) { do_check_eq(507, num); next_test(); });
-
- // And again. No change expected.
- triggerExpiration();
- yield;
-
- yield countEntries(null, null, function(num) { do_check_eq(507, num); next_test(); });
-
- // Set formfill pref to 30 days.
- Services.prefs.setIntPref("browser.formfill.expire_days", 30);
- yield countEntries("179DaysOld", "foo", checkExists);
- yield countEntries("bar", "31days", checkExists);
- yield countEntries("bar", "29days", checkExists);
- yield countEntries(null, null, function(num) { do_check_eq(507, num); next_test(); });
-
- triggerExpiration();
- yield;
-
- yield countEntries("179DaysOld", "foo", checkNotExists);
- yield countEntries("bar", "31days", checkNotExists);
- yield countEntries("bar", "29days", checkExists);
- yield countEntries(null, null, function(num) { do_check_eq(505, num); next_test(); });
-
- // Set override pref to 10 days and expire. This expires a large batch of
- // entries, and should trigger a VACCUM to reduce file size.
- Services.prefs.setIntPref("browser.formfill.expire_days", 10);
-
- yield countEntries("bar", "29days", checkExists);
- yield countEntries("9DaysOld", "foo", checkExists);
- yield countEntries(null, null, function(num) { do_check_eq(505, num); next_test(); });
-
- triggerExpiration();
- yield;
-
- yield countEntries("bar", "29days", checkNotExists);
- yield countEntries("9DaysOld", "foo", checkExists);
- yield countEntries("name-B", "value-B", checkExists);
- yield countEntries("name-C", "value-C", checkExists);
- yield countEntries(null, null, function(num) { do_check_eq(3, num); next_test(); });
-
- test_finished();
-}
diff --git a/toolkit/components/satchel/test/unit/test_autocomplete.js b/toolkit/components/satchel/test/unit/test_autocomplete.js
deleted file mode 100644
index 2117538099..0000000000
--- a/toolkit/components/satchel/test/unit/test_autocomplete.js
+++ /dev/null
@@ -1,266 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-var testnum = 0;
-var fac;
-var prefs;
-
-var numRecords, timeGroupingSize, now;
-
-const DEFAULT_EXPIRE_DAYS = 180;
-
-function padLeft(number, length) {
- var str = number + '';
- while (str.length < length)
- str = '0' + str;
- return str;
-}
-
-function getFormExpiryDays() {
- if (prefs.prefHasUserValue("browser.formfill.expire_days")) {
- return prefs.getIntPref("browser.formfill.expire_days");
- }
- return DEFAULT_EXPIRE_DAYS;
-}
-
-function run_test() {
- // ===== test init =====
- var testfile = do_get_file("formhistory_autocomplete.sqlite");
- var profileDir = dirSvc.get("ProfD", Ci.nsIFile);
-
- // Cleanup from any previous tests or failures.
- var destFile = profileDir.clone();
- destFile.append("formhistory.sqlite");
- if (destFile.exists())
- destFile.remove(false);
-
- testfile.copyTo(profileDir, "formhistory.sqlite");
-
- fac = Cc["@mozilla.org/satchel/form-autocomplete;1"].
- getService(Ci.nsIFormAutoComplete);
- prefs = Cc["@mozilla.org/preferences-service;1"].
- getService(Ci.nsIPrefBranch);
-
- timeGroupingSize = prefs.getIntPref("browser.formfill.timeGroupingSize") * 1000 * 1000;
-
- run_next_test();
-}
-
-add_test(function test0() {
- var maxTimeGroupings = prefs.getIntPref("browser.formfill.maxTimeGroupings");
- var bucketSize = prefs.getIntPref("browser.formfill.bucketSize");
-
- // ===== Tests with constant timesUsed and varying lastUsed date =====
- // insert 2 records per bucket to check alphabetical sort within
- now = 1000 * Date.now();
- numRecords = Math.ceil(maxTimeGroupings / bucketSize) * 2;
-
- let changes = [ ];
- for (let i = 0; i < numRecords; i+=2) {
- let useDate = now - (i/2 * bucketSize * timeGroupingSize);
-
- changes.push({ op : "add", fieldname: "field1", value: "value" + padLeft(numRecords - 1 - i, 2),
- timesUsed: 1, firstUsed: useDate, lastUsed: useDate });
- changes.push({ op : "add", fieldname: "field1", value: "value" + padLeft(numRecords - 2 - i, 2),
- timesUsed: 1, firstUsed: useDate, lastUsed: useDate });
- }
-
- updateFormHistory(changes, run_next_test);
-});
-
-add_test(function test1() {
- do_log_info("Check initial state is as expected");
-
- countEntries(null, null, function () {
- countEntries("field1", null, function (count) {
- do_check_true(count > 0);
- run_next_test();
- });
- });
-});
-
-add_test(function test2() {
- do_log_info("Check search contains all entries");
-
- fac.autoCompleteSearchAsync("field1", "", null, null, null, {
- onSearchCompletion : function(aResults) {
- do_check_eq(numRecords, aResults.matchCount);
- run_next_test();
- }
- });
-});
-
-add_test(function test3() {
- do_log_info("Check search result ordering with empty search term");
-
- let lastFound = numRecords;
- fac.autoCompleteSearchAsync("field1", "", null, null, null, {
- onSearchCompletion : function(aResults) {
- for (let i = 0; i < numRecords; i+=2) {
- do_check_eq(parseInt(aResults.getValueAt(i + 1).substr(5), 10), --lastFound);
- do_check_eq(parseInt(aResults.getValueAt(i).substr(5), 10), --lastFound);
- }
- run_next_test();
- }
- });
-});
-
-add_test(function test4() {
- do_log_info("Check search result ordering with \"v\"");
-
- let lastFound = numRecords;
- fac.autoCompleteSearchAsync("field1", "v", null, null, null, {
- onSearchCompletion : function(aResults) {
- for (let i = 0; i < numRecords; i+=2) {
- do_check_eq(parseInt(aResults.getValueAt(i + 1).substr(5), 10), --lastFound);
- do_check_eq(parseInt(aResults.getValueAt(i).substr(5), 10), --lastFound);
- }
- run_next_test();
- }
- });
-});
-
-const timesUsedSamples = 20;
-
-add_test(function test5() {
- do_log_info("Begin tests with constant use dates and varying timesUsed");
-
- let changes = [];
- for (let i = 0; i < timesUsedSamples; i++) {
- let timesUsed = (timesUsedSamples - i);
- let change = { op : "add", fieldname: "field2", value: "value" + (timesUsedSamples - 1 - i),
- timesUsed: timesUsed * timeGroupingSize, firstUsed: now, lastUsed: now };
- changes.push(change);
- }
- updateFormHistory(changes, run_next_test);
-});
-
-add_test(function test6() {
- do_log_info("Check search result ordering with empty search term");
-
- let lastFound = timesUsedSamples;
- fac.autoCompleteSearchAsync("field2", "", null, null, null, {
- onSearchCompletion : function(aResults) {
- for (let i = 0; i < timesUsedSamples; i++) {
- do_check_eq(parseInt(aResults.getValueAt(i).substr(5)), --lastFound);
- }
- run_next_test();
- }
- });
-});
-
-add_test(function test7() {
- do_log_info("Check search result ordering with \"v\"");
-
- let lastFound = timesUsedSamples;
- fac.autoCompleteSearchAsync("field2", "v", null, null, null, {
- onSearchCompletion : function(aResults) {
- for (let i = 0; i < timesUsedSamples; i++) {
- do_check_eq(parseInt(aResults.getValueAt(i).substr(5)), --lastFound);
- }
- run_next_test();
- }
- });
-});
-
-add_test(function test8() {
- do_log_info("Check that \"senior citizen\" entries get a bonus (browser.formfill.agedBonus)");
-
- let agedDate = 1000 * (Date.now() - getFormExpiryDays() * 24 * 60 * 60 * 1000);
-
- let changes = [ ];
- changes.push({ op : "add", fieldname: "field3", value: "old but not senior",
- timesUsed: 100, firstUsed: (agedDate + 60 * 1000 * 1000), lastUsed: now });
- changes.push({ op : "add", fieldname: "field3", value: "senior citizen",
- timesUsed: 100, firstUsed: (agedDate - 60 * 1000 * 1000), lastUsed: now });
- updateFormHistory(changes, run_next_test);
-});
-
-add_test(function test9() {
- fac.autoCompleteSearchAsync("field3", "", null, null, null, {
- onSearchCompletion : function(aResults) {
- do_check_eq(aResults.getValueAt(0), "senior citizen");
- do_check_eq(aResults.getValueAt(1), "old but not senior");
- run_next_test();
- }
- });
-});
-
-add_test(function test10() {
- do_log_info("Check entries that are really old or in the future");
-
- let changes = [ ];
- changes.push({ op : "add", fieldname: "field4", value: "date of 0",
- timesUsed: 1, firstUsed: 0, lastUsed: 0 });
- changes.push({ op : "add", fieldname: "field4", value: "in the future 1",
- timesUsed: 1, firstUsed: 0, lastUsed: now * 2 });
- changes.push({ op : "add", fieldname: "field4", value: "in the future 2",
- timesUsed: 1, firstUsed: now * 2, lastUsed: now * 2 });
- updateFormHistory(changes, run_next_test);
-});
-
-add_test(function test11() {
- fac.autoCompleteSearchAsync("field4", "", null, null, null, {
- onSearchCompletion : function(aResults) {
- do_check_eq(aResults.matchCount, 3);
- run_next_test();
- }
- });
-});
-
-var syncValues = ["sync1", "sync1a", "sync2", "sync3"]
-
-add_test(function test12() {
- do_log_info("Check old synchronous api");
-
- let changes = [ ];
- for (let value of syncValues) {
- changes.push({ op : "add", fieldname: "field5", value: value });
- }
- updateFormHistory(changes, run_next_test);
-});
-
-add_test(function test_token_limit_DB() {
- function test_token_limit_previousResult(previousResult) {
- do_log_info("Check that the number of tokens used in a search is not capped to " +
- "MAX_SEARCH_TOKENS when using a previousResult");
- // This provide more accuracy since performance is less of an issue.
- // Search for a string where the first 10 tokens match the previous value but the 11th does not
- // when re-using a previous result.
- fac.autoCompleteSearchAsync("field_token_cap",
- "a b c d e f g h i j .",
- null, previousResult, null, {
- onSearchCompletion : function(aResults) {
- do_check_eq(aResults.matchCount, 0,
- "All search tokens should be used with " +
- "previous results");
- run_next_test();
- }
- });
- }
-
- do_log_info("Check that the number of tokens used in a search is capped to MAX_SEARCH_TOKENS " +
- "for performance when querying the DB");
- let changes = [ ];
- changes.push({ op : "add", fieldname: "field_token_cap",
- // value with 15 unique tokens
- value: "a b c d e f g h i j k l m n o",
- timesUsed: 1, firstUsed: 0, lastUsed: 0 });
- updateFormHistory(changes, () => {
- // Search for a string where the first 10 tokens match the value above but the 11th does not
- // (which would prevent the result from being returned if the 11th term was used).
- fac.autoCompleteSearchAsync("field_token_cap",
- "a b c d e f g h i j .",
- null, null, null, {
- onSearchCompletion : function(aResults) {
- do_check_eq(aResults.matchCount, 1,
- "Only the first MAX_SEARCH_TOKENS tokens " +
- "should be used for DB queries");
- test_token_limit_previousResult(aResults);
- }
- });
- });
-});
diff --git a/toolkit/components/satchel/test/unit/test_db_corrupt.js b/toolkit/components/satchel/test/unit/test_db_corrupt.js
deleted file mode 100644
index a6fdc4c02e..0000000000
--- a/toolkit/components/satchel/test/unit/test_db_corrupt.js
+++ /dev/null
@@ -1,89 +0,0 @@
-/* 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/. */
-
-var bakFile;
-
-function run_test() {
- // ===== test init =====
- let testfile = do_get_file("formhistory_CORRUPT.sqlite");
- let profileDir = dirSvc.get("ProfD", Ci.nsIFile);
-
- // Cleanup from any previous tests or failures.
- let destFile = profileDir.clone();
- destFile.append("formhistory.sqlite");
- if (destFile.exists())
- destFile.remove(false);
-
- bakFile = profileDir.clone();
- bakFile.append("formhistory.sqlite.corrupt");
- if (bakFile.exists())
- bakFile.remove(false);
-
- testfile.copyTo(profileDir, "formhistory.sqlite");
- run_next_test();
-}
-
-add_test(function test_corruptFormHistoryDB_lazyCorruptInit1() {
- do_log_info("ensure FormHistory backs up a corrupt DB on initialization.");
-
- // DB init is done lazily so the DB shouldn't be created yet.
- do_check_false(bakFile.exists());
- // Doing any request to the DB should create it.
- countEntries(null, null, run_next_test);
-});
-
-add_test(function test_corruptFormHistoryDB_lazyCorruptInit2() {
- do_check_true(bakFile.exists());
- bakFile.remove(false);
- run_next_test();
-});
-
-
-add_test(function test_corruptFormHistoryDB_emptyInit() {
- do_log_info("test that FormHistory initializes an empty DB in place of corrupt DB.");
-
- FormHistory.count({}, {
- handleResult : function(aNumEntries) {
- do_check_true(aNumEntries == 0);
- FormHistory.count({ fieldname : "name-A", value : "value-A" }, {
- handleResult : function(aNumEntries2) {
- do_check_true(aNumEntries2 == 0);
- run_next_test();
- },
- handleError : function(aError2) {
- do_throw("DB initialized after reading a corrupt DB file found an entry.");
- }
- });
- },
- handleError : function (aError) {
- do_throw("DB initialized after reading a corrupt DB file is not empty.");
- }
- });
-});
-
-add_test(function test_corruptFormHistoryDB_addEntry() {
- do_log_info("test adding an entry to the empty DB.");
-
- updateEntry("add", "name-A", "value-A",
- function() {
- countEntries("name-A", "value-A",
- function(count) {
- do_check_true(count == 1);
- run_next_test();
- });
- });
- });
-
-add_test(function test_corruptFormHistoryDB_removeEntry() {
- do_log_info("test removing an entry to the empty DB.");
-
- updateEntry("remove", "name-A", "value-A",
- function() {
- countEntries("name-A", "value-A",
- function(count) {
- do_check_true(count == 0);
- run_next_test();
- });
- });
- });
diff --git a/toolkit/components/satchel/test/unit/test_db_update_v4.js b/toolkit/components/satchel/test/unit/test_db_update_v4.js
deleted file mode 100644
index 84b17e8a06..0000000000
--- a/toolkit/components/satchel/test/unit/test_db_update_v4.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/* 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/. */
-
-var testnum = 0;
-
-var iter;
-
-function run_test()
-{
- do_test_pending();
- iter = next_test();
- iter.next();
-}
-
-function* next_test()
-{
- try {
-
- // ===== test init =====
- var testfile = do_get_file("formhistory_v3.sqlite");
- var profileDir = dirSvc.get("ProfD", Ci.nsIFile);
-
- // Cleanup from any previous tests or failures.
- var destFile = profileDir.clone();
- destFile.append("formhistory.sqlite");
- if (destFile.exists())
- destFile.remove(false);
-
- testfile.copyTo(profileDir, "formhistory.sqlite");
- do_check_eq(3, getDBVersion(testfile));
-
- // ===== 1 =====
- testnum++;
-
- destFile = profileDir.clone();
- destFile.append("formhistory.sqlite");
- let dbConnection = Services.storage.openUnsharedDatabase(destFile);
-
- // check for upgraded schema.
- do_check_eq(CURRENT_SCHEMA, FormHistory.schemaVersion);
-
- // Check that the index was added
- do_check_true(dbConnection.tableExists("moz_deleted_formhistory"));
- dbConnection.close();
-
- // check for upgraded schema.
- do_check_eq(CURRENT_SCHEMA, FormHistory.schemaVersion);
- // check that an entry still exists
- yield countEntries("name-A", "value-A",
- function (num) {
- do_check_true(num > 0);
- do_test_finished();
- }
- );
-
- } catch (e) {
- throw "FAILED in test #" + testnum + " -- " + e;
- }
-}
diff --git a/toolkit/components/satchel/test/unit/test_db_update_v4b.js b/toolkit/components/satchel/test/unit/test_db_update_v4b.js
deleted file mode 100644
index 356d34a48b..0000000000
--- a/toolkit/components/satchel/test/unit/test_db_update_v4b.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/* 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/. */
-
-var testnum = 0;
-
-var iter;
-
-function run_test()
-{
- do_test_pending();
- iter = next_test();
- iter.next();
-}
-
-function* next_test()
-{
- try {
-
- // ===== test init =====
- var testfile = do_get_file("formhistory_v3v4.sqlite");
- var profileDir = dirSvc.get("ProfD", Ci.nsIFile);
-
- // Cleanup from any previous tests or failures.
- var destFile = profileDir.clone();
- destFile.append("formhistory.sqlite");
- if (destFile.exists())
- destFile.remove(false);
-
- testfile.copyTo(profileDir, "formhistory.sqlite");
- do_check_eq(3, getDBVersion(testfile));
-
- // ===== 1 =====
- testnum++;
-
- destFile = profileDir.clone();
- destFile.append("formhistory.sqlite");
- dbConnection = Services.storage.openUnsharedDatabase(destFile);
-
- // check for upgraded schema.
- do_check_eq(CURRENT_SCHEMA, FormHistory.schemaVersion);
-
- // Check that the index was added
- do_check_true(dbConnection.tableExists("moz_deleted_formhistory"));
- dbConnection.close();
-
- // check that an entry still exists
- yield countEntries("name-A", "value-A",
- function (num) {
- do_check_true(num > 0);
- do_test_finished();
- }
- );
-
- } catch (e) {
- throw "FAILED in test #" + testnum + " -- " + e;
- }
-}
diff --git a/toolkit/components/satchel/test/unit/test_db_update_v999a.js b/toolkit/components/satchel/test/unit/test_db_update_v999a.js
deleted file mode 100644
index 0a44d06aac..0000000000
--- a/toolkit/components/satchel/test/unit/test_db_update_v999a.js
+++ /dev/null
@@ -1,75 +0,0 @@
-/* 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 test uses a formhistory.sqlite with schema version set to 999 (a
- * future version). This exercies the code that allows using a future schema
- * version as long as the expected columns are present.
- *
- * Part A tests this when the columns do match, so the DB is used.
- * Part B tests this when the columns do *not* match, so the DB is reset.
- */
-
-var iter = tests();
-
-function run_test()
-{
- do_test_pending();
- iter.next();
-}
-
-function next_test()
-{
- iter.next();
-}
-
-function* tests()
-{
- try {
- var testnum = 0;
-
- // ===== test init =====
- var testfile = do_get_file("formhistory_v999a.sqlite");
- var profileDir = dirSvc.get("ProfD", Ci.nsIFile);
-
- // Cleanup from any previous tests or failures.
- var destFile = profileDir.clone();
- destFile.append("formhistory.sqlite");
- if (destFile.exists())
- destFile.remove(false);
-
- testfile.copyTo(profileDir, "formhistory.sqlite");
- do_check_eq(999, getDBVersion(testfile));
-
- let checkZero = function(num) { do_check_eq(num, 0); next_test(); }
- let checkOne = function(num) { do_check_eq(num, 1); next_test(); }
-
- // ===== 1 =====
- testnum++;
- // Check for expected contents.
- yield countEntries(null, null, function(num) { do_check_true(num > 0); next_test(); });
- yield countEntries("name-A", "value-A", checkOne);
- yield countEntries("name-B", "value-B", checkOne);
- yield countEntries("name-C", "value-C1", checkOne);
- yield countEntries("name-C", "value-C2", checkOne);
- yield countEntries("name-E", "value-E", checkOne);
-
- // check for downgraded schema.
- do_check_eq(CURRENT_SCHEMA, FormHistory.schemaVersion);
-
- // ===== 2 =====
- testnum++;
- // Exercise adding and removing a name/value pair
- yield countEntries("name-D", "value-D", checkZero);
- yield updateEntry("add", "name-D", "value-D", next_test);
- yield countEntries("name-D", "value-D", checkOne);
- yield updateEntry("remove", "name-D", "value-D", next_test);
- yield countEntries("name-D", "value-D", checkZero);
-
- } catch (e) {
- throw "FAILED in test #" + testnum + " -- " + e;
- }
-
- do_test_finished();
-}
diff --git a/toolkit/components/satchel/test/unit/test_db_update_v999b.js b/toolkit/components/satchel/test/unit/test_db_update_v999b.js
deleted file mode 100644
index fb0ecd1b7e..0000000000
--- a/toolkit/components/satchel/test/unit/test_db_update_v999b.js
+++ /dev/null
@@ -1,92 +0,0 @@
-/* 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 test uses a formhistory.sqlite with schema version set to 999 (a
- * future version). This exercies the code that allows using a future schema
- * version as long as the expected columns are present.
- *
- * Part A tests this when the columns do match, so the DB is used.
- * Part B tests this when the columns do *not* match, so the DB is reset.
- */
-
-var iter = tests();
-
-function run_test()
-{
- do_test_pending();
- iter.next();
-}
-
-function next_test()
-{
- iter.next();
-}
-
-function* tests()
-{
- try {
- var testnum = 0;
-
- // ===== test init =====
- var testfile = do_get_file("formhistory_v999b.sqlite");
- var profileDir = dirSvc.get("ProfD", Ci.nsIFile);
-
- // Cleanup from any previous tests or failures.
- var destFile = profileDir.clone();
- destFile.append("formhistory.sqlite");
- if (destFile.exists())
- destFile.remove(false);
-
- var bakFile = profileDir.clone();
- bakFile.append("formhistory.sqlite.corrupt");
- if (bakFile.exists())
- bakFile.remove(false);
-
- testfile.copyTo(profileDir, "formhistory.sqlite");
- do_check_eq(999, getDBVersion(testfile));
-
- let checkZero = function(num) { do_check_eq(num, 0); next_test(); }
- let checkOne = function(num) { do_check_eq(num, 1); next_test(); }
-
- // ===== 1 =====
- testnum++;
-
- // Open the DB, ensure that a backup of the corrupt DB is made.
- // DB init is done lazily so the DB shouldn't be created yet.
- do_check_false(bakFile.exists());
- // Doing any request to the DB should create it.
- yield countEntries("", "", next_test);
-
- do_check_true(bakFile.exists());
- bakFile.remove(false);
-
- // ===== 2 =====
- testnum++;
- // File should be empty
- yield countEntries(null, null, function(num) { do_check_false(num); next_test(); });
- yield countEntries("name-A", "value-A", checkZero);
- // check for current schema.
- do_check_eq(CURRENT_SCHEMA, FormHistory.schemaVersion);
-
- // ===== 3 =====
- testnum++;
- // Try adding an entry
- yield updateEntry("add", "name-A", "value-A", next_test);
- yield countEntries(null, null, checkOne);
- yield countEntries("name-A", "value-A", checkOne);
-
- // ===== 4 =====
- testnum++;
- // Try removing an entry
- yield updateEntry("remove", "name-A", "value-A", next_test);
- yield countEntries(null, null, checkZero);
- yield countEntries("name-A", "value-A", checkZero);
-
- } catch (e) {
- throw "FAILED in test #" + testnum + " -- " + e;
- }
-
- do_test_finished();
-}
diff --git a/toolkit/components/satchel/test/unit/test_history_api.js b/toolkit/components/satchel/test/unit/test_history_api.js
deleted file mode 100644
index 7535041830..0000000000
--- a/toolkit/components/satchel/test/unit/test_history_api.js
+++ /dev/null
@@ -1,457 +0,0 @@
-/* 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/. */
-
-var testnum = 0;
-var dbConnection; // used for deleted table tests
-
-Cu.import("resource://gre/modules/Promise.jsm");
-
-function countDeletedEntries(expected)
-{
- let deferred = Promise.defer();
- let stmt = dbConnection.createAsyncStatement("SELECT COUNT(*) AS numEntries FROM moz_deleted_formhistory");
- stmt.executeAsync({
- handleResult: function(resultSet) {
- do_check_eq(expected, resultSet.getNextRow().getResultByName("numEntries"));
- deferred.resolve();
- },
- handleError : function () {
- do_throw("Error occurred counting deleted entries: " + error);
- deferred.reject();
- },
- handleCompletion : function () {
- stmt.finalize();
- }
- });
- return deferred.promise;
-}
-
-function checkTimeDeleted(guid, checkFunction)
-{
- let deferred = Promise.defer();
- let stmt = dbConnection.createAsyncStatement("SELECT timeDeleted FROM moz_deleted_formhistory WHERE guid = :guid");
- stmt.params.guid = guid;
- stmt.executeAsync({
- handleResult: function(resultSet) {
- checkFunction(resultSet.getNextRow().getResultByName("timeDeleted"));
- deferred.resolve();
- },
- handleError : function () {
- do_throw("Error occurred getting deleted entries: " + error);
- deferred.reject();
- },
- handleCompletion : function () {
- stmt.finalize();
- }
- });
- return deferred.promise;
-}
-
-function promiseUpdateEntry(op, name, value)
-{
- var change = { op: op };
- if (name !== null)
- change.fieldname = name;
- if (value !== null)
- change.value = value;
- return promiseUpdate(change);
-}
-
-function promiseUpdate(change) {
- return new Promise((resolve, reject) => {
- FormHistory.update(change, {
- handleError(error) {
- this._error = error;
- },
- handleCompletion(reason) {
- if (reason) {
- reject(this._error);
- } else {
- resolve();
- }
- }
- });
- });
-}
-
-function promiseSearchEntries(terms, params)
-{
- let deferred = Promise.defer();
- let results = [];
- FormHistory.search(terms, params,
- { handleResult: result => results.push(result),
- handleError: function (error) {
- do_throw("Error occurred searching form history: " + error);
- deferred.reject(error);
- },
- handleCompletion: function (reason) { if (!reason) deferred.resolve(results); }
- });
- return deferred.promise;
-}
-
-function promiseCountEntries(name, value, checkFn)
-{
- let deferred = Promise.defer();
- countEntries(name, value, function (result) { checkFn(result); deferred.resolve(); } );
- return deferred.promise;
-}
-
-add_task(function* ()
-{
- let oldSupportsDeletedTable = FormHistory._supportsDeletedTable;
- FormHistory._supportsDeletedTable = true;
-
- try {
-
- // ===== test init =====
- var testfile = do_get_file("formhistory_apitest.sqlite");
- var profileDir = dirSvc.get("ProfD", Ci.nsIFile);
-
- // Cleanup from any previous tests or failures.
- var destFile = profileDir.clone();
- destFile.append("formhistory.sqlite");
- if (destFile.exists())
- destFile.remove(false);
-
- testfile.copyTo(profileDir, "formhistory.sqlite");
-
- function checkExists(num) { do_check_true(num > 0); }
- function checkNotExists(num) { do_check_true(num == 0); }
-
- // ===== 1 =====
- // Check initial state is as expected
- testnum++;
- yield promiseCountEntries("name-A", null, checkExists);
- yield promiseCountEntries("name-B", null, checkExists);
- yield promiseCountEntries("name-C", null, checkExists);
- yield promiseCountEntries("name-D", null, checkExists);
- yield promiseCountEntries("name-A", "value-A", checkExists);
- yield promiseCountEntries("name-B", "value-B1", checkExists);
- yield promiseCountEntries("name-B", "value-B2", checkExists);
- yield promiseCountEntries("name-C", "value-C", checkExists);
- yield promiseCountEntries("name-D", "value-D", checkExists);
- // time-A/B/C/D checked below.
-
- // Delete anything from the deleted table
- let dbFile = Services.dirsvc.get("ProfD", Ci.nsIFile).clone();
- dbFile.append("formhistory.sqlite");
- dbConnection = Services.storage.openUnsharedDatabase(dbFile);
-
- let deferred = Promise.defer();
-
- let stmt = dbConnection.createAsyncStatement("DELETE FROM moz_deleted_formhistory");
- stmt.executeAsync({
- handleResult: function(resultSet) { },
- handleError : function () {
- do_throw("Error occurred counting deleted all entries: " + error);
- },
- handleCompletion : function () {
- stmt.finalize();
- deferred.resolve();
- }
- });
- yield deferred.promise;
-
- // ===== 2 =====
- // Test looking for nonexistent / bogus data.
- testnum++;
- yield promiseCountEntries("blah", null, checkNotExists);
- yield promiseCountEntries("", null, checkNotExists);
- yield promiseCountEntries("name-A", "blah", checkNotExists);
- yield promiseCountEntries("name-A", "", checkNotExists);
- yield promiseCountEntries("name-A", null, checkExists);
- yield promiseCountEntries("blah", "value-A", checkNotExists);
- yield promiseCountEntries("", "value-A", checkNotExists);
- yield promiseCountEntries(null, "value-A", checkExists);
-
- // Cannot use promiseCountEntries when name and value are null because it treats null values as not set
- // and here a search should be done explicity for null.
- deferred = Promise.defer();
- yield FormHistory.count({ fieldname: null, value: null },
- { handleResult: result => checkNotExists(result),
- handleError: function (error) {
- do_throw("Error occurred searching form history: " + error);
- },
- handleCompletion: function(reason) { if (!reason) deferred.resolve() }
- });
- yield deferred.promise;
-
- // ===== 3 =====
- // Test removeEntriesForName with a single matching value
- testnum++;
- yield promiseUpdateEntry("remove", "name-A", null);
-
- yield promiseCountEntries("name-A", "value-A", checkNotExists);
- yield promiseCountEntries("name-B", "value-B1", checkExists);
- yield promiseCountEntries("name-B", "value-B2", checkExists);
- yield promiseCountEntries("name-C", "value-C", checkExists);
- yield promiseCountEntries("name-D", "value-D", checkExists);
- yield countDeletedEntries(1);
-
- // ===== 4 =====
- // Test removeEntriesForName with multiple matching values
- testnum++;
- yield promiseUpdateEntry("remove", "name-B", null);
-
- yield promiseCountEntries("name-A", "value-A", checkNotExists);
- yield promiseCountEntries("name-B", "value-B1", checkNotExists);
- yield promiseCountEntries("name-B", "value-B2", checkNotExists);
- yield promiseCountEntries("name-C", "value-C", checkExists);
- yield promiseCountEntries("name-D", "value-D", checkExists);
- yield countDeletedEntries(3);
-
- // ===== 5 =====
- // Test removing by time range (single entry, not surrounding entries)
- testnum++;
- yield promiseCountEntries("time-A", null, checkExists); // firstUsed=1000, lastUsed=1000
- yield promiseCountEntries("time-B", null, checkExists); // firstUsed=1000, lastUsed=1099
- yield promiseCountEntries("time-C", null, checkExists); // firstUsed=1099, lastUsed=1099
- yield promiseCountEntries("time-D", null, checkExists); // firstUsed=2001, lastUsed=2001
- yield promiseUpdate({ op : "remove", firstUsedStart: 1050, firstUsedEnd: 2000 });
-
- yield promiseCountEntries("time-A", null, checkExists);
- yield promiseCountEntries("time-B", null, checkExists);
- yield promiseCountEntries("time-C", null, checkNotExists);
- yield promiseCountEntries("time-D", null, checkExists);
- yield countDeletedEntries(4);
-
- // ===== 6 =====
- // Test removing by time range (multiple entries)
- testnum++;
- yield promiseUpdate({ op : "remove", firstUsedStart: 1000, firstUsedEnd: 2000 });
-
- yield promiseCountEntries("time-A", null, checkNotExists);
- yield promiseCountEntries("time-B", null, checkNotExists);
- yield promiseCountEntries("time-C", null, checkNotExists);
- yield promiseCountEntries("time-D", null, checkExists);
- yield countDeletedEntries(6);
-
- // ===== 7 =====
- // test removeAllEntries
- testnum++;
- yield promiseUpdateEntry("remove", null, null);
-
- yield promiseCountEntries("name-C", null, checkNotExists);
- yield promiseCountEntries("name-D", null, checkNotExists);
- yield promiseCountEntries("name-C", "value-C", checkNotExists);
- yield promiseCountEntries("name-D", "value-D", checkNotExists);
-
- yield promiseCountEntries(null, null, checkNotExists);
- yield countDeletedEntries(6);
-
- // ===== 8 =====
- // Add a single entry back
- testnum++;
- yield promiseUpdateEntry("add", "newname-A", "newvalue-A");
- yield promiseCountEntries("newname-A", "newvalue-A", checkExists);
-
- // ===== 9 =====
- // Remove the single entry
- testnum++;
- yield promiseUpdateEntry("remove", "newname-A", "newvalue-A");
- yield promiseCountEntries("newname-A", "newvalue-A", checkNotExists);
-
- // ===== 10 =====
- // Add a single entry
- testnum++;
- yield promiseUpdateEntry("add", "field1", "value1");
- yield promiseCountEntries("field1", "value1", checkExists);
-
- let processFirstResult = function processResults(results)
- {
- // Only handle the first result
- if (results.length > 0) {
- let result = results[0];
- return [result.timesUsed, result.firstUsed, result.lastUsed, result.guid];
- }
- return undefined;
- }
-
- results = yield promiseSearchEntries(["timesUsed", "firstUsed", "lastUsed"],
- { fieldname: "field1", value: "value1" });
- let [timesUsed, firstUsed, lastUsed] = processFirstResult(results);
- do_check_eq(1, timesUsed);
- do_check_true(firstUsed > 0);
- do_check_true(lastUsed > 0);
- yield promiseCountEntries(null, null, num => do_check_eq(num, 1));
-
- // ===== 11 =====
- // Add another single entry
- testnum++;
- yield promiseUpdateEntry("add", "field1", "value1b");
- yield promiseCountEntries("field1", "value1", checkExists);
- yield promiseCountEntries("field1", "value1b", checkExists);
- yield promiseCountEntries(null, null, num => do_check_eq(num, 2));
-
- // ===== 12 =====
- // Update a single entry
- testnum++;
-
- results = yield promiseSearchEntries(["guid"], { fieldname: "field1", value: "value1" });
- let guid = processFirstResult(results)[3];
-
- yield promiseUpdate({ op : "update", guid: guid, value: "modifiedValue" });
- yield promiseCountEntries("field1", "modifiedValue", checkExists);
- yield promiseCountEntries("field1", "value1", checkNotExists);
- yield promiseCountEntries("field1", "value1b", checkExists);
- yield promiseCountEntries(null, null, num => do_check_eq(num, 2));
-
- // ===== 13 =====
- // Add a single entry with times
- testnum++;
- yield promiseUpdate({ op : "add", fieldname: "field2", value: "value2",
- timesUsed: 20, firstUsed: 100, lastUsed: 500 });
-
- results = yield promiseSearchEntries(["timesUsed", "firstUsed", "lastUsed"],
- { fieldname: "field2", value: "value2" });
- [timesUsed, firstUsed, lastUsed] = processFirstResult(results);
-
- do_check_eq(20, timesUsed);
- do_check_eq(100, firstUsed);
- do_check_eq(500, lastUsed);
- yield promiseCountEntries(null, null, num => do_check_eq(num, 3));
-
- // ===== 14 =====
- // Bump an entry, which updates its lastUsed field
- testnum++;
- yield promiseUpdate({ op : "bump", fieldname: "field2", value: "value2",
- timesUsed: 20, firstUsed: 100, lastUsed: 500 });
- results = yield promiseSearchEntries(["timesUsed", "firstUsed", "lastUsed"],
- { fieldname: "field2", value: "value2" });
- [timesUsed, firstUsed, lastUsed] = processFirstResult(results);
- do_check_eq(21, timesUsed);
- do_check_eq(100, firstUsed);
- do_check_true(lastUsed > 500);
- yield promiseCountEntries(null, null, num => do_check_eq(num, 3));
-
- // ===== 15 =====
- // Bump an entry that does not exist
- testnum++;
- yield promiseUpdate({ op : "bump", fieldname: "field3", value: "value3",
- timesUsed: 10, firstUsed: 50, lastUsed: 400 });
- results = yield promiseSearchEntries(["timesUsed", "firstUsed", "lastUsed"],
- { fieldname: "field3", value: "value3" });
- [timesUsed, firstUsed, lastUsed] = processFirstResult(results);
- do_check_eq(10, timesUsed);
- do_check_eq(50, firstUsed);
- do_check_eq(400, lastUsed);
- yield promiseCountEntries(null, null, num => do_check_eq(num, 4));
-
- // ===== 16 =====
- // Bump an entry with a guid
- testnum++;
- results = yield promiseSearchEntries(["guid"], { fieldname: "field3", value: "value3" });
- guid = processFirstResult(results)[3];
- yield promiseUpdate({ op : "bump", guid: guid, timesUsed: 20, firstUsed: 55, lastUsed: 400 });
- results = yield promiseSearchEntries(["timesUsed", "firstUsed", "lastUsed"],
- { fieldname: "field3", value: "value3" });
- [timesUsed, firstUsed, lastUsed] = processFirstResult(results);
- do_check_eq(11, timesUsed);
- do_check_eq(50, firstUsed);
- do_check_true(lastUsed > 400);
- yield promiseCountEntries(null, null, num => do_check_eq(num, 4));
-
- // ===== 17 =====
- // Remove an entry
- testnum++;
- yield countDeletedEntries(7);
-
- results = yield promiseSearchEntries(["guid"], { fieldname: "field1", value: "value1b" });
- guid = processFirstResult(results)[3];
-
- yield promiseUpdate({ op : "remove", guid: guid});
- yield promiseCountEntries("field1", "modifiedValue", checkExists);
- yield promiseCountEntries("field1", "value1b", checkNotExists);
- yield promiseCountEntries(null, null, num => do_check_eq(num, 3));
-
- yield countDeletedEntries(8);
- yield checkTimeDeleted(guid, timeDeleted => do_check_true(timeDeleted > 10000));
-
- // ===== 18 =====
- // Add yet another single entry
- testnum++;
- yield promiseUpdate({ op : "add", fieldname: "field4", value: "value4",
- timesUsed: 5, firstUsed: 230, lastUsed: 600 });
- yield promiseCountEntries(null, null, num => do_check_eq(num, 4));
-
- // ===== 19 =====
- // Remove an entry by time
- testnum++;
- yield promiseUpdate({ op : "remove", firstUsedStart: 60, firstUsedEnd: 250 });
- yield promiseCountEntries("field1", "modifiedValue", checkExists);
- yield promiseCountEntries("field2", "value2", checkNotExists);
- yield promiseCountEntries("field3", "value3", checkExists);
- yield promiseCountEntries("field4", "value4", checkNotExists);
- yield promiseCountEntries(null, null, num => do_check_eq(num, 2));
- yield countDeletedEntries(10);
-
- // ===== 20 =====
- // Bump multiple existing entries at once
- testnum++;
-
- yield promiseUpdate([{ op : "add", fieldname: "field5", value: "value5",
- timesUsed: 5, firstUsed: 230, lastUsed: 600 },
- { op : "add", fieldname: "field6", value: "value6",
- timesUsed: 12, firstUsed: 430, lastUsed: 700 }]);
- yield promiseCountEntries(null, null, num => do_check_eq(num, 4));
-
- yield promiseUpdate([
- { op : "bump", fieldname: "field5", value: "value5" },
- { op : "bump", fieldname: "field6", value: "value6" }]);
- results = yield promiseSearchEntries(["fieldname", "timesUsed", "firstUsed", "lastUsed"], { });
-
- do_check_eq(6, results[2].timesUsed);
- do_check_eq(13, results[3].timesUsed);
- do_check_eq(230, results[2].firstUsed);
- do_check_eq(430, results[3].firstUsed);
- do_check_true(results[2].lastUsed > 600);
- do_check_true(results[3].lastUsed > 700);
-
- yield promiseCountEntries(null, null, num => do_check_eq(num, 4));
-
- // ===== 21 =====
- // Check update fails if form history is disabled and the operation is not a
- // pure removal.
- testnum++;
- Services.prefs.setBoolPref("browser.formfill.enable", false);
-
- // Cannot use arrow functions, see bug 1237961.
- Assert.rejects(promiseUpdate(
- { op : "bump", fieldname: "field5", value: "value5" }),
- function(err) { return err.result == Ci.mozIStorageError.MISUSE; },
- "bumping when form history is disabled should fail");
- Assert.rejects(promiseUpdate(
- { op : "add", fieldname: "field5", value: "value5" }),
- function(err) { return err.result == Ci.mozIStorageError.MISUSE; },
- "Adding when form history is disabled should fail");
- Assert.rejects(promiseUpdate([
- { op : "update", fieldname: "field5", value: "value5" },
- { op : "remove", fieldname: "field5", value: "value5" }
- ]),
- function(err) { return err.result == Ci.mozIStorageError.MISUSE; },
- "mixed operations when form history is disabled should fail");
- Assert.rejects(promiseUpdate([
- null, undefined, "", 1, {},
- { op : "remove", fieldname: "field5", value: "value5" }
- ]),
- function(err) { return err.result == Ci.mozIStorageError.MISUSE; },
- "Invalid entries when form history is disabled should fail");
-
- // Remove should work though.
- yield promiseUpdate([{ op: "remove", fieldname: "field5", value: null },
- { op: "remove", fieldname: null, value: null }]);
- Services.prefs.clearUserPref("browser.formfill.enable");
-
- } catch (e) {
- throw "FAILED in test #" + testnum + " -- " + e;
- }
- finally {
- FormHistory._supportsDeletedTable = oldSupportsDeletedTable;
- dbConnection.asyncClose(do_test_finished);
- }
-});
-
-function run_test() {
- return run_next_test();
-}
diff --git a/toolkit/components/satchel/test/unit/test_notify.js b/toolkit/components/satchel/test/unit/test_notify.js
deleted file mode 100644
index 556ecd4b08..0000000000
--- a/toolkit/components/satchel/test/unit/test_notify.js
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Test suite for satchel notifications
- *
- * Tests notifications dispatched when modifying form history.
- *
- */
-
-var expectedNotification;
-var expectedData;
-
-var TestObserver = {
- QueryInterface : XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
-
- observe : function (subject, topic, data) {
- do_check_eq(topic, "satchel-storage-changed");
- do_check_eq(data, expectedNotification);
-
- switch (data) {
- case "formhistory-add":
- case "formhistory-update":
- do_check_true(subject instanceof Ci.nsISupportsString);
- do_check_true(isGUID.test(subject.toString()));
- break;
- case "formhistory-remove":
- do_check_eq(null, subject);
- break;
- default:
- do_throw("Unhandled notification: " + data + " / " + topic);
- }
-
- expectedNotification = null;
- expectedData = null;
- }
-};
-
-var testIterator = null;
-
-function run_test() {
- do_test_pending();
- testIterator = run_test_steps();
- testIterator.next();
-}
-
-function next_test()
-{
- testIterator.next();
-}
-
-function* run_test_steps() {
-
-try {
-
-var testnum = 0;
-var testdesc = "Setup of test form history entries";
-
-var entry1 = ["entry1", "value1"];
-
-/* ========== 1 ========== */
-testnum = 1;
-testdesc = "Initial connection to storage module"
-
-yield updateEntry("remove", null, null, next_test);
-yield countEntries(null, null, function (num) { do_check_false(num, "Checking initial DB is empty"); next_test(); });
-
-// Add the observer
-var os = Cc["@mozilla.org/observer-service;1"].
- getService(Ci.nsIObserverService);
-os.addObserver(TestObserver, "satchel-storage-changed", false);
-
-/* ========== 2 ========== */
-testnum++;
-testdesc = "addEntry";
-
-expectedNotification = "formhistory-add";
-expectedData = entry1;
-
-yield updateEntry("add", entry1[0], entry1[1], next_test);
-do_check_eq(expectedNotification, null); // check that observer got a notification
-
-yield countEntries(entry1[0], entry1[1], function (num) { do_check_true(num > 0); next_test(); });
-
-/* ========== 3 ========== */
-testnum++;
-testdesc = "modifyEntry";
-
-expectedNotification = "formhistory-update";
-expectedData = entry1;
-// will update previous entry
-yield updateEntry("update", entry1[0], entry1[1], next_test);
-yield countEntries(entry1[0], entry1[1], function (num) { do_check_true(num > 0); next_test(); });
-
-do_check_eq(expectedNotification, null);
-
-/* ========== 4 ========== */
-testnum++;
-testdesc = "removeEntry";
-
-expectedNotification = "formhistory-remove";
-expectedData = entry1;
-yield updateEntry("remove", entry1[0], entry1[1], next_test);
-
-do_check_eq(expectedNotification, null);
-yield countEntries(entry1[0], entry1[1], function(num) { do_check_false(num, "doesn't exist after remove"); next_test(); });
-
-/* ========== 5 ========== */
-testnum++;
-testdesc = "removeAllEntries";
-
-expectedNotification = "formhistory-remove";
-expectedData = null; // no data expected
-yield updateEntry("remove", null, null, next_test);
-
-do_check_eq(expectedNotification, null);
-
-/* ========== 6 ========== */
-testnum++;
-testdesc = "removeAllEntries (again)";
-
-expectedNotification = "formhistory-remove";
-expectedData = null;
-yield updateEntry("remove", null, null, next_test);
-
-do_check_eq(expectedNotification, null);
-
-/* ========== 7 ========== */
-testnum++;
-testdesc = "removeEntriesForName";
-
-expectedNotification = "formhistory-remove";
-expectedData = "field2";
-yield updateEntry("remove", null, "field2", next_test);
-
-do_check_eq(expectedNotification, null);
-
-/* ========== 8 ========== */
-testnum++;
-testdesc = "removeEntriesByTimeframe";
-
-expectedNotification = "formhistory-remove";
-expectedData = [10, 99999999999];
-
-yield FormHistory.update({ op: "remove", firstUsedStart: expectedData[0], firstUsedEnd: expectedData[1] },
- { handleCompletion: function(reason) { if (!reason) next_test() },
- handleErrors: function (error) {
- do_throw("Error occurred updating form history: " + error);
- }
- });
-
-do_check_eq(expectedNotification, null);
-
-os.removeObserver(TestObserver, "satchel-storage-changed", false);
-
-do_test_finished();
-
-} catch (e) {
- throw "FAILED in test #" + testnum + " -- " + testdesc + ": " + e;
-}
-}
diff --git a/toolkit/components/satchel/test/unit/test_previous_result.js b/toolkit/components/satchel/test/unit/test_previous_result.js
deleted file mode 100644
index 06e5a385b2..0000000000
--- a/toolkit/components/satchel/test/unit/test_previous_result.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/* 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/. */
-
-var aaaListener = {
- onSearchResult: function(search, result) {
- do_check_eq(result.searchString, "aaa");
- do_test_finished();
- }
-};
-
-var aaListener = {
- onSearchResult: function(search, result) {
- do_check_eq(result.searchString, "aa");
- search.startSearch("aaa", "", result, aaaListener);
- }
-};
-
-function run_test()
-{
- do_test_pending();
- let search = Cc['@mozilla.org/autocomplete/search;1?name=form-history'].
- getService(Components.interfaces.nsIAutoCompleteSearch);
- search.startSearch("aa", "", null, aaListener);
-}
diff --git a/toolkit/components/satchel/test/unit/xpcshell.ini b/toolkit/components/satchel/test/unit/xpcshell.ini
deleted file mode 100644
index 4a41b47d65..0000000000
--- a/toolkit/components/satchel/test/unit/xpcshell.ini
+++ /dev/null
@@ -1,26 +0,0 @@
-[DEFAULT]
-head = head_satchel.js
-tail =
-skip-if = toolkit == 'android'
-support-files =
- asyncformhistory_expire.sqlite
- formhistory_1000.sqlite
- formhistory_CORRUPT.sqlite
- formhistory_apitest.sqlite
- formhistory_autocomplete.sqlite
- formhistory_v3.sqlite
- formhistory_v3v4.sqlite
- formhistory_v999a.sqlite
- formhistory_v999b.sqlite
- perf_autocomplete.js
-
-[test_async_expire.js]
-[test_autocomplete.js]
-[test_db_corrupt.js]
-[test_db_update_v4.js]
-[test_db_update_v4b.js]
-[test_db_update_v999a.js]
-[test_db_update_v999b.js]
-[test_history_api.js]
-[test_notify.js]
-[test_previous_result.js]
diff --git a/toolkit/components/search/nsSearchService.js b/toolkit/components/search/nsSearchService.js
index f6303bca11..f3e8b94a75 100644
--- a/toolkit/components/search/nsSearchService.js
+++ b/toolkit/components/search/nsSearchService.js
@@ -2213,32 +2213,8 @@ Engine.prototype = {
this.lazySerializeTask.arm();
},
-#ifdef ANDROID
- get _defaultMobileResponseType() {
- let type = URLTYPE_SEARCH_HTML;
-
- let sysInfo = Cc["@mozilla.org/system-info;1"].getService(Ci.nsIPropertyBag2);
- let isTablet = sysInfo.get("tablet");
- if (isTablet && this.supportsResponseType("application/x-moz-tabletsearch")) {
- // Check for a tablet-specific search URL override
- type = "application/x-moz-tabletsearch";
- } else if (!isTablet && this.supportsResponseType("application/x-moz-phonesearch")) {
- // Check for a phone-specific search URL override
- type = "application/x-moz-phonesearch";
- }
-
- delete this._defaultMobileResponseType;
- return this._defaultMobileResponseType = type;
- },
-#endif
-
// from nsISearchEngine
getSubmission: function SRCH_ENG_getSubmission(aData, aResponseType, aPurpose) {
-#ifdef ANDROID
- if (!aResponseType) {
- aResponseType = this._defaultMobileResponseType;
- }
-#endif
if (!aResponseType) {
aResponseType = URLTYPE_SEARCH_HTML;
}
@@ -2272,11 +2248,6 @@ Engine.prototype = {
// from nsISearchEngine
getResultDomain: function SRCH_ENG_getResultDomain(aResponseType) {
-#ifdef ANDROID
- if (!aResponseType) {
- aResponseType = this._defaultMobileResponseType;
- }
-#endif
if (!aResponseType) {
aResponseType = URLTYPE_SEARCH_HTML;
}
@@ -2293,11 +2264,7 @@ Engine.prototype = {
* Returns URL parsing properties used by _buildParseSubmissionMap.
*/
getURLParsingInfo: function () {
-#ifdef ANDROID
- let responseType = this._defaultMobileResponseType;
-#else
let responseType = URLTYPE_SEARCH_HTML;
-#endif
LOG("getURLParsingInfo: responseType: \"" + responseType + "\"");
diff --git a/toolkit/components/social/test/xpcshell/.eslintrc.js b/toolkit/components/social/test/xpcshell/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/social/test/xpcshell/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/sqlite/moz.build b/toolkit/components/sqlite/moz.build
deleted file mode 100644
index bbe5b8b969..0000000000
--- a/toolkit/components/sqlite/moz.build
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell/xpcshell.ini']
-
-EXTRA_JS_MODULES.sqlite += [
- 'sqlite_internal.js',
-]
diff --git a/toolkit/components/sqlite/sqlite_internal.js b/toolkit/components/sqlite/sqlite_internal.js
deleted file mode 100644
index 18b07ff50d..0000000000
--- a/toolkit/components/sqlite/sqlite_internal.js
+++ /dev/null
@@ -1,323 +0,0 @@
-/* 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 file defines an Sqlite object containing js-ctypes bindings for
- * sqlite3. It should be included from a worker thread using require.
- *
- * It serves the following purposes:
- * - opens libxul;
- * - defines sqlite3 API functions;
- * - defines the necessary sqlite3 types.
- */
-
-"use strict";
-
-importScripts("resource://gre/modules/workers/require.js");
-
-var SharedAll = require(
- "resource://gre/modules/osfile/osfile_shared_allthreads.jsm");
-
-// Open the sqlite3 library.
-var path;
-if (SharedAll.Constants.Sys.Name === "Android") {
- path = ctypes.libraryName("sqlite3");
-} else if (SharedAll.Constants.Win) {
- path = ctypes.libraryName("nss3");
-} else {
- path = SharedAll.Constants.Path.libxul;
-}
-
-var lib;
-try {
- lib = ctypes.open(path);
-} catch (ex) {
- throw new Error("Could not open system library: " + ex.message);
-}
-
-var declareLazyFFI = SharedAll.declareLazyFFI;
-
-var Type = Object.create(SharedAll.Type);
-
-/**
- * Opaque Structure |sqlite3_ptr|.
- * |sqlite3_ptr| is equivalent to a void*.
- */
-Type.sqlite3_ptr = Type.voidptr_t.withName("sqlite3_ptr");
-
-/**
- * |sqlite3_stmt_ptr| an instance of an object representing a single SQL
- * statement.
- * |sqlite3_stmt_ptr| is equivalent to a void*.
- */
-Type.sqlite3_stmt_ptr = Type.voidptr_t.withName("sqlite3_stmt_ptr");
-
-/**
- * |sqlite3_destructor_ptr| a constant defining a special destructor behaviour.
- * |sqlite3_destructor_ptr| is equivalent to a void*.
- */
-Type.sqlite3_destructor_ptr = Type.voidptr_t.withName(
- "sqlite3_destructor_ptr");
-
-/**
- * A C double.
- */
-Type.double = new SharedAll.Type("double", ctypes.double);
-
-/**
- * |sqlite3_int64| typedef for 64-bit integer.
- */
-Type.sqlite3_int64 = Type.int64_t.withName("sqlite3_int64");
-
-/**
- * Sqlite3 constants.
- */
-var Constants = {};
-
-/**
- * |SQLITE_STATIC| a special value for the destructor that is passed as an
- * argument to routines like bind_blob, bind_text and bind_text16. It means that
- * the content pointer is constant and will never change and does need to be
- * destroyed.
- */
-Constants.SQLITE_STATIC = Type.sqlite3_destructor_ptr.implementation(0);
-
-/**
- * |SQLITE_TRANSIENT| a special value for the destructor that is passed as an
- * argument to routines like bind_blob, bind_text and bind_text16. It means that
- * the content will likely change in the near future and that SQLite should make
- * its own private copy of the content before returning.
- */
-Constants.SQLITE_TRANSIENT = Type.sqlite3_destructor_ptr.implementation(-1);
-
-/**
- * |SQLITE_OK|
- * Successful result.
- */
-Constants.SQLITE_OK = 0;
-
-/**
- * |SQLITE_ROW|
- * sqlite3_step() has another row ready.
- */
-Constants.SQLITE_ROW = 100;
-
-/**
- * |SQLITE_DONE|
- * sqlite3_step() has finished executing.
- */
-Constants.SQLITE_DONE = 101;
-
-var Sqlite3 = {
- Constants: Constants,
- Type: Type
-};
-
-declareLazyFFI(Sqlite3, "open", lib, "sqlite3_open", null,
- /* return*/ Type.int,
- /* path*/ Type.char.in_ptr,
- /* db handle*/ Type.sqlite3_ptr.out_ptr);
-
-declareLazyFFI(Sqlite3, "open_v2", lib, "sqlite3_open_v2", null,
- /* return*/ Type.int,
- /* path*/ Type.char.in_ptr,
- /* db handle*/ Type.sqlite3_ptr.out_ptr,
- /* flags*/ Type.int,
- /* VFS*/ Type.char.in_ptr);
-
-declareLazyFFI(Sqlite3, "close", lib, "sqlite3_close", null,
- /* return*/ Type.int,
- /* db handle*/ Type.sqlite3_ptr);
-
-declareLazyFFI(Sqlite3, "prepare_v2", lib, "sqlite3_prepare_v2", null,
- /* return*/ Type.int,
- /* db handle*/ Type.sqlite3_ptr,
- /* zSql*/ Type.char.in_ptr,
- /* nByte*/ Type.int,
- /* statement*/ Type.sqlite3_stmt_ptr.out_ptr,
- /* unused*/ Type.cstring.out_ptr);
-
-declareLazyFFI(Sqlite3, "step", lib, "sqlite3_step", null,
- /* return*/ Type.int,
- /* statement*/ Type.sqlite3_stmt_ptr);
-
-declareLazyFFI(Sqlite3, "finalize", lib, "sqlite3_finalize", null,
- /* return*/ Type.int,
- /* statement*/ Type.sqlite3_stmt_ptr);
-
-declareLazyFFI(Sqlite3, "reset", lib, "sqlite3_reset", null,
- /* return*/ Type.int,
- /* statement*/ Type.sqlite3_stmt_ptr);
-
-declareLazyFFI(Sqlite3, "column_int", lib, "sqlite3_column_int", null,
- /* return*/ Type.int,
- /* statement*/ Type.sqlite3_stmt_ptr,
- /* col*/ Type.int);
-
-declareLazyFFI(Sqlite3, "column_blob", lib, "sqlite3_column_blob", null,
- /* return*/ Type.voidptr_t,
- /* statement*/ Type.sqlite3_stmt_ptr,
- /* col*/ Type.int);
-
-declareLazyFFI(Sqlite3, "column_bytes", lib, "sqlite3_column_bytes", null,
- /* return*/ Type.int,
- /* statement*/ Type.sqlite3_stmt_ptr,
- /* col*/ Type.int);
-
-declareLazyFFI(Sqlite3, "column_bytes16", lib, "sqlite3_column_bytes16",
- null,
- /* return*/ Type.int,
- /* statement*/ Type.sqlite3_stmt_ptr,
- /* col*/ Type.int);
-
-declareLazyFFI(Sqlite3, "column_double", lib, "sqlite3_column_double", null,
- /* return*/ Type.double,
- /* statement*/ Type.sqlite3_stmt_ptr,
- /* col*/ Type.int);
-
-declareLazyFFI(Sqlite3, "column_int64", lib, "sqlite3_column_int64", null,
- /* return*/ Type.sqlite3_int64,
- /* statement*/ Type.sqlite3_stmt_ptr,
- /* col*/ Type.int);
-
-declareLazyFFI(Sqlite3, "column_text", lib, "sqlite3_column_text", null,
- /* return*/ Type.cstring,
- /* statement*/ Type.sqlite3_stmt_ptr,
- /* col*/ Type.int);
-
-declareLazyFFI(Sqlite3, "column_text16", lib, "sqlite3_column_text16", null,
- /* return*/ Type.wstring,
- /* statement*/ Type.sqlite3_stmt_ptr,
- /* col*/ Type.int);
-
-declareLazyFFI(Sqlite3, "bind_int", lib, "sqlite3_bind_int", null,
- /* return*/ Type.int,
- /* statement*/ Type.sqlite3_stmt_ptr,
- /* index*/ Type.int,
- /* value*/ Type.int);
-
-declareLazyFFI(Sqlite3, "bind_int64", lib, "sqlite3_bind_int64", null,
- /* return*/ Type.int,
- /* statement*/ Type.sqlite3_stmt_ptr,
- /* index*/ Type.int,
- /* value*/ Type.sqlite3_int64);
-
-declareLazyFFI(Sqlite3, "bind_double", lib, "sqlite3_bind_double", null,
- /* return*/ Type.int,
- /* statement*/ Type.sqlite3_stmt_ptr,
- /* index*/ Type.int,
- /* value*/ Type.double);
-
-declareLazyFFI(Sqlite3, "bind_null", lib, "sqlite3_bind_null", null,
- /* return*/ Type.int,
- /* statement*/ Type.sqlite3_stmt_ptr,
- /* index*/ Type.int);
-
-declareLazyFFI(Sqlite3, "bind_zeroblob", lib, "sqlite3_bind_zeroblob", null,
- /* return*/ Type.int,
- /* statement*/ Type.sqlite3_stmt_ptr,
- /* index*/ Type.int,
- /* nBytes*/ Type.int);
-
-declareLazyFFI(Sqlite3, "bind_text", lib, "sqlite3_bind_text", null,
- /* return*/ Type.int,
- /* statement*/ Type.sqlite3_stmt_ptr,
- /* index*/ Type.int,
- /* value*/ Type.cstring,
- /* nBytes*/ Type.int,
- /* destructor*/ Type.sqlite3_destructor_ptr);
-
-declareLazyFFI(Sqlite3, "bind_text16", lib, "sqlite3_bind_text16", null,
- /* return*/ Type.int,
- /* statement*/ Type.sqlite3_stmt_ptr,
- /* index*/ Type.int,
- /* value*/ Type.wstring,
- /* nBytes*/ Type.int,
- /* destructor*/ Type.sqlite3_destructor_ptr);
-
-declareLazyFFI(Sqlite3, "bind_blob", lib, "sqlite3_bind_blob", null,
- /* return*/ Type.int,
- /* statement*/ Type.sqlite3_stmt_ptr,
- /* index*/ Type.int,
- /* value*/ Type.voidptr_t,
- /* nBytes*/ Type.int,
- /* destructor*/ Type.sqlite3_destructor_ptr);
-
-module.exports = {
- get Constants() {
- return Sqlite3.Constants;
- },
- get Type() {
- return Sqlite3.Type;
- },
- get open() {
- return Sqlite3.open;
- },
- get open_v2() {
- return Sqlite3.open_v2;
- },
- get close() {
- return Sqlite3.close;
- },
- get prepare_v2() {
- return Sqlite3.prepare_v2;
- },
- get step() {
- return Sqlite3.step;
- },
- get finalize() {
- return Sqlite3.finalize;
- },
- get reset() {
- return Sqlite3.reset;
- },
- get column_int() {
- return Sqlite3.column_int;
- },
- get column_blob() {
- return Sqlite3.column_blob;
- },
- get column_bytes() {
- return Sqlite3.column_bytes;
- },
- get column_bytes16() {
- return Sqlite3.column_bytes16;
- },
- get column_double() {
- return Sqlite3.column_double;
- },
- get column_int64() {
- return Sqlite3.column_int64;
- },
- get column_text() {
- return Sqlite3.column_text;
- },
- get column_text16() {
- return Sqlite3.column_text16;
- },
- get bind_int() {
- return Sqlite3.bind_int;
- },
- get bind_int64() {
- return Sqlite3.bind_int64;
- },
- get bind_double() {
- return Sqlite3.bind_double;
- },
- get bind_null() {
- return Sqlite3.bind_null;
- },
- get bind_zeroblob() {
- return Sqlite3.bind_zeroblob;
- },
- get bind_text() {
- return Sqlite3.bind_text;
- },
- get bind_text16() {
- return Sqlite3.bind_text16;
- },
- get bind_blob() {
- return Sqlite3.bind_blob;
- }
-};
diff --git a/toolkit/components/sqlite/tests/xpcshell/.eslintrc.js b/toolkit/components/sqlite/tests/xpcshell/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/sqlite/tests/xpcshell/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/sqlite/tests/xpcshell/data/chrome.manifest b/toolkit/components/sqlite/tests/xpcshell/data/chrome.manifest
deleted file mode 100644
index 92b9cf60bb..0000000000
--- a/toolkit/components/sqlite/tests/xpcshell/data/chrome.manifest
+++ /dev/null
@@ -1 +0,0 @@
-content test_sqlite_internal ./
diff --git a/toolkit/components/sqlite/tests/xpcshell/data/worker_sqlite_internal.js b/toolkit/components/sqlite/tests/xpcshell/data/worker_sqlite_internal.js
deleted file mode 100644
index 7f0b3af03d..0000000000
--- a/toolkit/components/sqlite/tests/xpcshell/data/worker_sqlite_internal.js
+++ /dev/null
@@ -1,279 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-importScripts("worker_sqlite_shared.js",
- "resource://gre/modules/workers/require.js");
-
-self.onmessage = function onmessage(msg) {
- try {
- run_test();
- } catch (ex) {
- let {message, moduleStack, moduleName, lineNumber} = ex;
- let error = new Error(message, moduleName, lineNumber);
- error.stack = moduleStack;
- dump("Uncaught error: " + error + "\n");
- dump("Full stack: " + moduleStack + "\n");
- throw error;
- }
-};
-
-var Sqlite;
-
-var SQLITE_OK; /* Successful result */
-var SQLITE_ROW; /* sqlite3_step() has another row ready */
-var SQLITE_DONE; /* sqlite3_step() has finished executing */
-
-function test_init() {
- do_print("Starting test_init");
- // Sqlite should be loaded.
- Sqlite = require("resource://gre/modules/sqlite/sqlite_internal.js");
- do_check_neq(typeof Sqlite, "undefined");
- do_check_neq(typeof Sqlite.Constants, "undefined");
- SQLITE_OK = Sqlite.Constants.SQLITE_OK;
- SQLITE_ROW = Sqlite.Constants.SQLITE_ROW;
- SQLITE_DONE = Sqlite.Constants.SQLITE_DONE;
-}
-
-/**
- * Clean up the database.
- * @param {sqlite3_ptr} db A pointer to the database.
- */
-function cleanupDB(db) {
- withQuery(db, "DROP TABLE IF EXISTS TEST;", SQLITE_DONE);
-}
-
-/**
- * Open and close sqlite3 database.
- * @param {String} open A name of the sqlite3 open function to be
- * used.
- * @param {Array} openArgs = [] Optional arguments to open function.
- * @param {Function} callback = null An optional callback to be run after the
- * database is opened but before it is
- * closed.
- */
-function withDB(open, openArgs = [], callback = null) {
- let db = Sqlite.Type.sqlite3_ptr.implementation();
- let dbPtr = db.address();
-
- // Open database.
- let result = Sqlite[open].apply(Sqlite, ["data/test.db", dbPtr].concat(
- openArgs));
- do_check_eq(result, SQLITE_OK);
-
- // Drop the test table if it already exists.
- cleanupDB(db);
-
- try {
- if (callback) {
- callback(db);
- }
- } catch (ex) {
- do_check_true(false);
- throw ex;
- } finally {
- // Drop the test table if it still exists.
- cleanupDB(db);
- // Close data base.
- result = Sqlite.close(db);
- do_check_eq(result, SQLITE_OK);
- }
-}
-
-/**
- * Execute an SQL query using sqlite3 API.
- * @param {sqlite3_ptr} db A pointer to the database.
- * @param {String} sql A SQL query string.
- * @param {Number} stepResult Expected result code after evaluating the
- * SQL statement.
- * @param {Function} bind An optional callback with SQL binding steps.
- * @param {Function} callback An optional callback that runs after the SQL
- * query completes.
- */
-function withQuery(db, sql, stepResult, bind, callback) {
- // Create an instance of a single SQL statement.
- let sqlStmt = Sqlite.Type.sqlite3_stmt_ptr.implementation();
- let sqlStmtPtr = sqlStmt.address();
-
- // Unused portion of an SQL query.
- let unused = Sqlite.Type.cstring.implementation();
- let unusedPtr = unused.address();
-
- // Compile an SQL statement.
- let result = Sqlite.prepare_v2(db, sql, sql.length, sqlStmtPtr, unusedPtr);
- do_check_eq(result, SQLITE_OK);
-
- try {
- if (bind) {
- bind(sqlStmt);
- }
-
- // Evaluate an SQL statement.
- result = Sqlite.step(sqlStmt);
- do_check_eq(result, stepResult);
-
- if (callback) {
- callback(sqlStmt);
- }
- } catch (ex) {
- do_check_true(false);
- throw ex;
- } finally {
- // Destroy a prepared statement object.
- result = Sqlite.finalize(sqlStmt);
- do_check_eq(result, SQLITE_OK);
- }
-}
-
-function test_open_close() {
- do_print("Starting test_open_close");
- do_check_eq(typeof Sqlite.open, "function");
- do_check_eq(typeof Sqlite.close, "function");
-
- withDB("open");
-}
-
-function test_open_v2_close() {
- do_print("Starting test_open_v2_close");
- do_check_eq(typeof Sqlite.open_v2, "function");
-
- withDB("open_v2", [0x02, null]);
-}
-
-function createTableOnOpen(db) {
- withQuery(db, "CREATE TABLE TEST(" +
- "ID INT PRIMARY KEY NOT NULL," +
- "FIELD1 INT," +
- "FIELD2 REAL," +
- "FIELD3 TEXT," +
- "FIELD4 TEXT," +
- "FIELD5 BLOB" +
- ");", SQLITE_DONE);
-}
-
-function test_create_table() {
- do_print("Starting test_create_table");
- do_check_eq(typeof Sqlite.prepare_v2, "function");
- do_check_eq(typeof Sqlite.step, "function");
- do_check_eq(typeof Sqlite.finalize, "function");
-
- withDB("open", [], createTableOnOpen);
-}
-
-/**
- * Read column values after evaluating the SQL SELECT statement.
- * @param {sqlite3_stmt_ptr} sqlStmt A pointer to the SQL statement.
- */
-function onSqlite3Step(sqlStmt) {
- // Get an int value from a query result from the ID (column 0).
- let field = Sqlite.column_int(sqlStmt, 0);
- do_check_eq(field, 3);
-
- // Get an int value from a query result from the column 1.
- field = Sqlite.column_int(sqlStmt, 1);
- do_check_eq(field, 2);
- // Get an int64 value from a query result from the column 1.
- field = Sqlite.column_int64(sqlStmt, 1);
- do_check_eq(field, 2);
-
- // Get a double value from a query result from the column 2.
- field = Sqlite.column_double(sqlStmt, 2);
- do_check_eq(field, 1.2);
-
- // Get a number of bytes of the value in the column 3.
- let bytes = Sqlite.column_bytes(sqlStmt, 3);
- do_check_eq(bytes, 4);
- // Get a text(cstring) value from a query result from the column 3.
- field = Sqlite.column_text(sqlStmt, 3);
- do_check_eq(field.readString(), "DATA");
-
- // Get a number of bytes of the UTF-16 value in the column 4.
- bytes = Sqlite.column_bytes16(sqlStmt, 4);
- do_check_eq(bytes, 8);
- // Get a text16(wstring) value from a query result from the column 4.
- field = Sqlite.column_text16(sqlStmt, 4);
- do_check_eq(field.readString(), "TADA");
-
- // Get a blob value from a query result from the column 5.
- field = Sqlite.column_blob(sqlStmt, 5);
- do_check_eq(ctypes.cast(field,
- Sqlite.Type.cstring.implementation).readString(), "BLOB");
-}
-
-function test_insert_select() {
- do_print("Starting test_insert_select");
- do_check_eq(typeof Sqlite.column_int, "function");
- do_check_eq(typeof Sqlite.column_int64, "function");
- do_check_eq(typeof Sqlite.column_double, "function");
- do_check_eq(typeof Sqlite.column_bytes, "function");
- do_check_eq(typeof Sqlite.column_text, "function");
- do_check_eq(typeof Sqlite.column_text16, "function");
- do_check_eq(typeof Sqlite.column_blob, "function");
-
- function onOpen(db) {
- createTableOnOpen(db);
- withQuery(db,
- "INSERT INTO TEST VALUES (3, 2, 1.2, \"DATA\", \"TADA\", \"BLOB\");",
- SQLITE_DONE);
- withQuery(db, "SELECT * FROM TEST;", SQLITE_ROW, null, onSqlite3Step);
- }
-
- withDB("open", [], onOpen);
-}
-
-function test_insert_bind_select() {
- do_print("Starting test_insert_bind_select");
- do_check_eq(typeof Sqlite.bind_int, "function");
- do_check_eq(typeof Sqlite.bind_int64, "function");
- do_check_eq(typeof Sqlite.bind_double, "function");
- do_check_eq(typeof Sqlite.bind_text, "function");
- do_check_eq(typeof Sqlite.bind_text16, "function");
- do_check_eq(typeof Sqlite.bind_blob, "function");
-
- function onBind(sqlStmt) {
- // Bind an int value to the ID (column 0).
- let result = Sqlite.bind_int(sqlStmt, 1, 3);
- do_check_eq(result, SQLITE_OK);
-
- // Bind an int64 value to the FIELD1 (column 1).
- result = Sqlite.bind_int64(sqlStmt, 2, 2);
- do_check_eq(result, SQLITE_OK);
-
- // Bind a double value to the FIELD2 (column 2).
- result = Sqlite.bind_double(sqlStmt, 3, 1.2);
- do_check_eq(result, SQLITE_OK);
-
- // Destructor.
- let destructor = Sqlite.Constants.SQLITE_TRANSIENT;
- // Bind a text value to the FIELD3 (column 3).
- result = Sqlite.bind_text(sqlStmt, 4, "DATA", 4, destructor);
- do_check_eq(result, SQLITE_OK);
-
- // Bind a text16 value to the FIELD4 (column 4).
- result = Sqlite.bind_text16(sqlStmt, 5, "TADA", 8, destructor);
- do_check_eq(result, SQLITE_OK);
-
- // Bind a blob value to the FIELD5 (column 5).
- result = Sqlite.bind_blob(sqlStmt, 6, ctypes.char.array()("BLOB"), 4,
- destructor);
- do_check_eq(result, SQLITE_OK);
- }
-
- function onOpen(db) {
- createTableOnOpen(db);
- withQuery(db, "INSERT INTO TEST VALUES (?, ?, ?, ?, ?, ?);", SQLITE_DONE,
- onBind);
- withQuery(db, "SELECT * FROM TEST;", SQLITE_ROW, null, onSqlite3Step);
- }
-
- withDB("open", [], onOpen);
-}
-
-function run_test() {
- test_init();
- test_open_close();
- test_open_v2_close();
- test_create_table();
- test_insert_select();
- test_insert_bind_select();
- do_test_complete();
-}
diff --git a/toolkit/components/sqlite/tests/xpcshell/data/worker_sqlite_shared.js b/toolkit/components/sqlite/tests/xpcshell/data/worker_sqlite_shared.js
deleted file mode 100644
index 54351a02a4..0000000000
--- a/toolkit/components/sqlite/tests/xpcshell/data/worker_sqlite_shared.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function send(message) {
- self.postMessage(message);
-}
-
-function do_test_complete() {
- send({kind: "do_test_complete", args: []});
-}
-
-function do_check_true(x) {
- send({kind: "do_check_true", args: [!!x]});
- if (x) {
- dump("TEST-PASS: " + x + "\n");
- } else {
- throw new Error("do_check_true failed");
- }
-}
-
-function do_check_eq(a, b) {
- let result = a == b;
- send({kind: "do_check_true", args: [result]});
- if (!result) {
- throw new Error("do_check_eq failed " + a + " != " + b);
- }
-}
-
-function do_check_neq(a, b) {
- let result = a != b;
- send({kind: "do_check_true", args: [result]});
- if (!result) {
- throw new Error("do_check_neq failed " + a + " == " + b);
- }
-}
-
-function do_print(x) {
- dump("TEST-INFO: " + x + "\n");
-}
diff --git a/toolkit/components/sqlite/tests/xpcshell/test_sqlite_internal.js b/toolkit/components/sqlite/tests/xpcshell/test_sqlite_internal.js
deleted file mode 100644
index 725cbfaeae..0000000000
--- a/toolkit/components/sqlite/tests/xpcshell/test_sqlite_internal.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-Components.utils.import("resource://gre/modules/Promise.jsm");
-
-var WORKER_SOURCE_URI =
- "chrome://test_sqlite_internal/content/worker_sqlite_internal.js";
-do_load_manifest("data/chrome.manifest");
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function() {
- let worker = new ChromeWorker(WORKER_SOURCE_URI);
- let deferred = Promise.defer();
- worker.onmessage = function(event) {
- let data = event.data;
- switch (data.kind) {
- case "do_check_true":
- try {
- do_check_true(data.args[0]);
- } catch (ex) {
- // Ignore errors
- }
- break;
- case "do_test_complete":
- deferred.resolve();
- worker.terminate();
- break;
- case "do_print":
- do_print(data.args[0]);
- break;
- }
- };
- worker.onerror = function(event) {
- let error = new Error(event.message, event.filename, event.lineno);
- worker.terminate();
- deferred.reject(error);
- };
- worker.postMessage("START");
- return deferred.promise;
-});
diff --git a/toolkit/components/sqlite/tests/xpcshell/xpcshell.ini b/toolkit/components/sqlite/tests/xpcshell/xpcshell.ini
deleted file mode 100644
index d652dbb1df..0000000000
--- a/toolkit/components/sqlite/tests/xpcshell/xpcshell.ini
+++ /dev/null
@@ -1,10 +0,0 @@
-[DEFAULT]
-head =
-tail =
-skip-if = toolkit == 'android' || (os == 'mac' && appname == 'thunderbird')
-support-files =
- data/worker_sqlite_shared.js
- data/worker_sqlite_internal.js
- data/chrome.manifest
-
-[test_sqlite_internal.js]
diff --git a/toolkit/components/startup/moz.build b/toolkit/components/startup/moz.build
index 5f290b7839..6c9515c159 100644
--- a/toolkit/components/startup/moz.build
+++ b/toolkit/components/startup/moz.build
@@ -6,12 +6,7 @@
DIRS += ['public']
-EXPORTS.mozilla += [
- 'StartupTimeline.h',
-]
-
-BROWSER_CHROME_MANIFESTS += ['tests/browser/browser.ini']
-XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
+EXPORTS.mozilla += ['StartupTimeline.h']
UNIFIED_SOURCES += [
'nsAppStartup.cpp',
@@ -28,6 +23,3 @@ if CONFIG['MOZ_USERINFO']:
UNIFIED_SOURCES += ['nsUserInfoUnix.cpp']
FINAL_LIBRARY = 'xul'
-
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'Startup and Profile System')
diff --git a/toolkit/components/startup/tests/browser/.eslintrc.js b/toolkit/components/startup/tests/browser/.eslintrc.js
deleted file mode 100644
index 7c80211924..0000000000
--- a/toolkit/components/startup/tests/browser/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/mochitest/browser.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/startup/tests/browser/beforeunload.html b/toolkit/components/startup/tests/browser/beforeunload.html
deleted file mode 100644
index 93ddd5f143..0000000000
--- a/toolkit/components/startup/tests/browser/beforeunload.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
- <script>
- window.onbeforeunload = function(event) {
- event.returnValue = 'Test beforeunload handler';
- }
- </script>
- <body>
- Test page
- </body>
-</html>
diff --git a/toolkit/components/startup/tests/browser/browser.ini b/toolkit/components/startup/tests/browser/browser.ini
deleted file mode 100644
index 0c02f73b68..0000000000
--- a/toolkit/components/startup/tests/browser/browser.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[DEFAULT]
-support-files =
- head.js
- beforeunload.html
-
-[browser_bug511456.js]
-[browser_bug537449.js]
-[browser_crash_detection.js]
diff --git a/toolkit/components/startup/tests/browser/browser_bug511456.js b/toolkit/components/startup/tests/browser/browser_bug511456.js
deleted file mode 100644
index 652a34ea23..0000000000
--- a/toolkit/components/startup/tests/browser/browser_bug511456.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-const TEST_URL = "http://example.com/browser/toolkit/components/startup/tests/browser/beforeunload.html";
-
-SpecialPowers.pushPrefEnv({"set": [["dom.require_user_interaction_for_beforeunload", false]]});
-
-function test() {
- waitForExplicitFinish();
- ignoreAllUncaughtExceptions();
-
- let win2 = window.openDialog(location, "", "chrome,all,dialog=no", "about:blank");
- win2.addEventListener("load", function onLoad() {
- win2.removeEventListener("load", onLoad);
-
- gBrowser.selectedTab = gBrowser.addTab(TEST_URL);
- let browser = gBrowser.selectedBrowser;
-
- whenBrowserLoaded(browser, function () {
- let seenDialog = false;
-
- // Cancel the prompt the first time.
- waitForOnBeforeUnloadDialog(browser, (btnLeave, btnStay) => {
- seenDialog = true;
- btnStay.click();
- });
-
- let appStartup = Cc['@mozilla.org/toolkit/app-startup;1'].
- getService(Ci.nsIAppStartup);
- appStartup.quit(Ci.nsIAppStartup.eAttemptQuit);
- ok(seenDialog, "Should have seen a prompt dialog");
- ok(!win2.closed, "Shouldn't have closed the additional window");
- win2.close();
-
- // Leave the page the second time.
- waitForOnBeforeUnloadDialog(browser, (btnLeave, btnStay) => {
- btnLeave.click();
- });
-
- gBrowser.removeTab(gBrowser.selectedTab);
- executeSoon(finish);
- });
- });
-}
diff --git a/toolkit/components/startup/tests/browser/browser_bug537449.js b/toolkit/components/startup/tests/browser/browser_bug537449.js
deleted file mode 100644
index ed3446f8dd..0000000000
--- a/toolkit/components/startup/tests/browser/browser_bug537449.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-//
-// Whitelisting this test.
-// As part of bug 1077403, the leaking uncaught rejection should be fixed.
-//
-thisTestLeaksUncaughtRejectionsAndShouldBeFixed("TypeError: this.docShell is null");
-
-SpecialPowers.pushPrefEnv({"set": [["dom.require_user_interaction_for_beforeunload", false]]});
-
-const TEST_URL = "http://example.com/browser/toolkit/components/startup/tests/browser/beforeunload.html";
-
-function test() {
- waitForExplicitFinish();
-
- gBrowser.selectedTab = gBrowser.addTab(TEST_URL);
- let browser = gBrowser.selectedBrowser;
-
- whenBrowserLoaded(browser, function () {
- let seenDialog = false;
-
- // Cancel the prompt the first time.
- waitForOnBeforeUnloadDialog(browser, (btnLeave, btnStay) => {
- seenDialog = true;
- btnStay.click();
- });
-
- let appStartup = Cc['@mozilla.org/toolkit/app-startup;1'].
- getService(Ci.nsIAppStartup);
- appStartup.quit(Ci.nsIAppStartup.eAttemptQuit);
- ok(seenDialog, "Should have seen a prompt dialog");
- ok(!window.closed, "Shouldn't have closed the window");
-
- let win2 = window.openDialog(location, "", "chrome,all,dialog=no", "about:blank");
- ok(win2 != null, "Should have been able to open a new window");
- win2.addEventListener("load", function onLoad() {
- win2.removeEventListener("load", onLoad);
- win2.close();
-
- // Leave the page the second time.
- waitForOnBeforeUnloadDialog(browser, (btnLeave, btnStay) => {
- btnLeave.click();
- });
-
- gBrowser.removeTab(gBrowser.selectedTab);
- executeSoon(finish);
- });
- });
-}
diff --git a/toolkit/components/startup/tests/browser/browser_crash_detection.js b/toolkit/components/startup/tests/browser/browser_crash_detection.js
deleted file mode 100644
index 039f80dde7..0000000000
--- a/toolkit/components/startup/tests/browser/browser_crash_detection.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-function test() {
- function checkLastSuccess() {
- let lastSuccess = Services.prefs.getIntPref("toolkit.startup.last_success");
- let si = Services.startup.getStartupInfo();
- is(lastSuccess, parseInt(si["main"].getTime() / 1000, 10),
- "Startup tracking pref should be set after a delay at the end of startup");
- finish();
- }
-
- if (Services.prefs.getPrefType("toolkit.startup.max_resumed_crashes") == Services.prefs.PREF_INVALID) {
- info("Skipping this test since startup crash detection is disabled");
- return;
- }
-
- const startupCrashEndDelay = 35 * 1000;
- waitForExplicitFinish();
- requestLongerTimeout(2);
- setTimeout(checkLastSuccess, startupCrashEndDelay);
-}
diff --git a/toolkit/components/startup/tests/browser/head.js b/toolkit/components/startup/tests/browser/head.js
deleted file mode 100644
index c17da2ff78..0000000000
--- a/toolkit/components/startup/tests/browser/head.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
-
-function whenBrowserLoaded(browser, callback) {
- return BrowserTestUtils.browserLoaded(browser).then(callback);
-}
-
-function waitForOnBeforeUnloadDialog(browser, callback) {
- browser.addEventListener("DOMWillOpenModalDialog", function onModalDialog(event) {
- if (Cu.isCrossProcessWrapper(event.target)) {
- // This event fires in both the content and chrome processes. We
- // want to ignore the one in the content process.
- return;
- }
-
- browser.removeEventListener("DOMWillOpenModalDialog", onModalDialog, true);
-
- executeSoon(() => {
- let stack = browser.parentNode;
- let dialogs = stack.getElementsByTagNameNS(XUL_NS, "tabmodalprompt");
- let {button0, button1} = dialogs[0].ui;
- callback(button0, button1);
- });
- }, true);
-}
diff --git a/toolkit/components/startup/tests/unit/.eslintrc.js b/toolkit/components/startup/tests/unit/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/startup/tests/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/startup/tests/unit/head_startup.js b/toolkit/components/startup/tests/unit/head_startup.js
deleted file mode 100644
index 2466f70eed..0000000000
--- a/toolkit/components/startup/tests/unit/head_startup.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-const XULRUNTIME_CONTRACTID = "@mozilla.org/xre/runtime;1";
-const XULRUNTIME_CID = Components.ID("7685dac8-3637-4660-a544-928c5ec0e714}");
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-var gAppInfo = null;
-
-function createAppInfo(ID, name, version, platformVersion="1.0") {
- let tmp = {};
- Components.utils.import("resource://testing-common/AppInfo.jsm", tmp);
- gAppInfo = tmp.newAppInfo({
- ID, name, version, platformVersion,
- crashReporter: true,
- replacedLockTime: 0,
- });
-
- let XULAppInfoFactory = {
- createInstance: function (outer, iid) {
- if (outer != null)
- throw Components.results.NS_ERROR_NO_AGGREGATION;
- return gAppInfo.QueryInterface(iid);
- }
- };
- let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
- registrar.registerFactory(XULRUNTIME_CID, "XULRuntime",
- XULRUNTIME_CONTRACTID, XULAppInfoFactory);
-}
diff --git a/toolkit/components/startup/tests/unit/test_startup_crash.js b/toolkit/components/startup/tests/unit/test_startup_crash.js
deleted file mode 100644
index 2836330866..0000000000
--- a/toolkit/components/startup/tests/unit/test_startup_crash.js
+++ /dev/null
@@ -1,300 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-
-createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "10.0");
-
-var prefService = Services.prefs;
-var appStartup = Cc["@mozilla.org/toolkit/app-startup;1"].
- getService(Ci.nsIAppStartup);
-
-const pref_last_success = "toolkit.startup.last_success";
-const pref_recent_crashes = "toolkit.startup.recent_crashes";
-const pref_max_resumed_crashes = "toolkit.startup.max_resumed_crashes";
-const pref_always_use_safe_mode = "toolkit.startup.always_use_safe_mode";
-
-function run_test() {
- prefService.setBoolPref(pref_always_use_safe_mode, true);
-
- resetTestEnv(0);
-
- test_trackStartupCrashBegin();
- test_trackStartupCrashEnd();
- test_trackStartupCrashBegin_safeMode();
- test_trackStartupCrashEnd_safeMode();
- test_maxResumed();
- resetTestEnv(0);
-
- prefService.clearUserPref(pref_always_use_safe_mode);
-}
-
-// reset prefs to default
-function resetTestEnv(replacedLockTime) {
- try {
- // call begin to reset mStartupCrashTrackingEnded
- appStartup.trackStartupCrashBegin();
- } catch (x) { }
- prefService.setIntPref(pref_max_resumed_crashes, 2);
- prefService.clearUserPref(pref_recent_crashes);
- gAppInfo.replacedLockTime = replacedLockTime;
- prefService.clearUserPref(pref_last_success);
-}
-
-function now_seconds() {
- return ms_to_s(Date.now());
-}
-
-function ms_to_s(ms) {
- return Math.floor(ms / 1000);
-}
-
-function test_trackStartupCrashBegin() {
- let max_resumed = prefService.getIntPref(pref_max_resumed_crashes);
- do_check_false(gAppInfo.inSafeMode);
-
- // first run with startup crash tracking - existing profile lock
- let replacedLockTime = Date.now();
- resetTestEnv(replacedLockTime);
- do_check_false(prefService.prefHasUserValue(pref_recent_crashes));
- do_check_false(prefService.prefHasUserValue(pref_last_success));
- do_check_eq(replacedLockTime, gAppInfo.replacedLockTime);
- try {
- do_check_false(appStartup.trackStartupCrashBegin());
- do_throw("Should have thrown since last_success is not set");
- } catch (x) { }
-
- do_check_false(prefService.prefHasUserValue(pref_last_success));
- do_check_false(prefService.prefHasUserValue(pref_recent_crashes));
- do_check_false(appStartup.automaticSafeModeNecessary);
-
- // first run with startup crash tracking - no existing profile lock
- replacedLockTime = 0;
- resetTestEnv(replacedLockTime);
- do_check_false(prefService.prefHasUserValue(pref_recent_crashes));
- do_check_false(prefService.prefHasUserValue(pref_last_success));
- do_check_eq(replacedLockTime, gAppInfo.replacedLockTime);
- try {
- do_check_false(appStartup.trackStartupCrashBegin());
- do_throw("Should have thrown since last_success is not set");
- } catch (x) { }
-
- do_check_false(prefService.prefHasUserValue(pref_last_success));
- do_check_false(prefService.prefHasUserValue(pref_recent_crashes));
- do_check_false(appStartup.automaticSafeModeNecessary);
-
- // normal startup - last startup was success
- replacedLockTime = Date.now();
- resetTestEnv(replacedLockTime);
- do_check_false(prefService.prefHasUserValue(pref_recent_crashes));
- prefService.setIntPref(pref_last_success, ms_to_s(replacedLockTime));
- do_check_eq(ms_to_s(replacedLockTime), prefService.getIntPref(pref_last_success));
- do_check_false(appStartup.trackStartupCrashBegin());
- do_check_eq(ms_to_s(replacedLockTime), prefService.getIntPref(pref_last_success));
- do_check_false(prefService.prefHasUserValue(pref_recent_crashes));
- do_check_false(appStartup.automaticSafeModeNecessary);
-
- // normal startup with 1 recent crash
- resetTestEnv(replacedLockTime);
- prefService.setIntPref(pref_recent_crashes, 1);
- prefService.setIntPref(pref_last_success, ms_to_s(replacedLockTime));
- do_check_false(appStartup.trackStartupCrashBegin());
- do_check_eq(ms_to_s(replacedLockTime), prefService.getIntPref(pref_last_success));
- do_check_eq(1, prefService.getIntPref(pref_recent_crashes));
- do_check_false(appStartup.automaticSafeModeNecessary);
-
- // normal startup with max_resumed_crashes crash
- resetTestEnv(replacedLockTime);
- prefService.setIntPref(pref_recent_crashes, max_resumed);
- prefService.setIntPref(pref_last_success, ms_to_s(replacedLockTime));
- do_check_false(appStartup.trackStartupCrashBegin());
- do_check_eq(ms_to_s(replacedLockTime), prefService.getIntPref(pref_last_success));
- do_check_eq(max_resumed, prefService.getIntPref(pref_recent_crashes));
- do_check_false(appStartup.automaticSafeModeNecessary);
-
- // normal startup with too many recent crashes
- resetTestEnv(replacedLockTime);
- prefService.setIntPref(pref_recent_crashes, max_resumed + 1);
- prefService.setIntPref(pref_last_success, ms_to_s(replacedLockTime));
- do_check_true(appStartup.trackStartupCrashBegin());
- // should remain the same since the last startup was not a crash
- do_check_eq(max_resumed + 1, prefService.getIntPref(pref_recent_crashes));
- do_check_true(appStartup.automaticSafeModeNecessary);
-
- // normal startup with too many recent crashes and startup crash tracking disabled
- resetTestEnv(replacedLockTime);
- prefService.setIntPref(pref_max_resumed_crashes, -1);
- prefService.setIntPref(pref_recent_crashes, max_resumed + 1);
- prefService.setIntPref(pref_last_success, ms_to_s(replacedLockTime));
- do_check_false(appStartup.trackStartupCrashBegin());
- // should remain the same since the last startup was not a crash
- do_check_eq(max_resumed + 1, prefService.getIntPref(pref_recent_crashes));
- // returns false when disabled
- do_check_false(appStartup.automaticSafeModeNecessary);
- do_check_eq(-1, prefService.getIntPref(pref_max_resumed_crashes));
-
- // normal startup after 1 non-recent crash (1 year ago), no other recent
- replacedLockTime = Date.now() - 365 * 24 * 60 * 60 * 1000;
- resetTestEnv(replacedLockTime);
- prefService.setIntPref(pref_last_success, ms_to_s(replacedLockTime) - 365 * 24 * 60 * 60);
- do_check_false(appStartup.trackStartupCrashBegin());
- // recent crash count pref should be unset since the last crash was not recent
- do_check_false(prefService.prefHasUserValue(pref_recent_crashes));
- do_check_false(appStartup.automaticSafeModeNecessary);
-
- // normal startup after 1 crash (1 minute ago), no other recent
- replacedLockTime = Date.now() - 60 * 1000;
- resetTestEnv(replacedLockTime);
- prefService.setIntPref(pref_last_success, ms_to_s(replacedLockTime) - 60 * 60); // last success - 1 hour ago
- do_check_false(appStartup.trackStartupCrashBegin());
- // recent crash count pref should be created with value 1
- do_check_eq(1, prefService.getIntPref(pref_recent_crashes));
- do_check_false(appStartup.automaticSafeModeNecessary);
-
- // normal startup after another crash (1 minute ago), 1 already
- prefService.setIntPref(pref_last_success, ms_to_s(replacedLockTime) - 60 * 60); // last success - 1 hour ago
- replacedLockTime = Date.now() - 60 * 1000;
- gAppInfo.replacedLockTime = replacedLockTime;
- do_check_false(appStartup.trackStartupCrashBegin());
- // recent crash count pref should be incremented by 1
- do_check_eq(2, prefService.getIntPref(pref_recent_crashes));
- do_check_false(appStartup.automaticSafeModeNecessary);
-
- // normal startup after another crash (1 minute ago), 2 already
- prefService.setIntPref(pref_last_success, ms_to_s(replacedLockTime) - 60 * 60); // last success - 1 hour ago
- do_check_true(appStartup.trackStartupCrashBegin());
- // recent crash count pref should be incremented by 1
- do_check_eq(3, prefService.getIntPref(pref_recent_crashes));
- do_check_true(appStartup.automaticSafeModeNecessary);
-
- // normal startup after 1 non-recent crash (1 year ago), 3 crashes already
- replacedLockTime = Date.now() - 365 * 24 * 60 * 60 * 1000;
- resetTestEnv(replacedLockTime);
- prefService.setIntPref(pref_last_success, ms_to_s(replacedLockTime) - 60 * 60); // last success - 1 hour ago
- do_check_false(appStartup.trackStartupCrashBegin());
- // recent crash count should be unset since the last crash was not recent
- do_check_false(prefService.prefHasUserValue(pref_recent_crashes));
- do_check_false(appStartup.automaticSafeModeNecessary);
-}
-
-function test_trackStartupCrashEnd() {
- // successful startup with no last_success (upgrade test)
- let replacedLockTime = Date.now() - 10 * 1000; // 10s ago
- resetTestEnv(replacedLockTime);
- try {
- appStartup.trackStartupCrashBegin(); // required to be called before end
- do_throw("Should have thrown since last_success is not set");
- } catch (x) { }
- appStartup.trackStartupCrashEnd();
- do_check_false(prefService.prefHasUserValue(pref_recent_crashes));
- do_check_false(prefService.prefHasUserValue(pref_last_success));
-
- // successful startup - should set last_success
- replacedLockTime = Date.now() - 10 * 1000; // 10s ago
- resetTestEnv(replacedLockTime);
- prefService.setIntPref(pref_last_success, ms_to_s(replacedLockTime));
- appStartup.trackStartupCrashBegin(); // required to be called before end
- appStartup.trackStartupCrashEnd();
- // ensure last_success was set since we have declared a succesful startup
- // main timestamp doesn't get set in XPCShell so approximate with now
- do_check_true(prefService.getIntPref(pref_last_success) <= now_seconds());
- do_check_true(prefService.getIntPref(pref_last_success) >= now_seconds() - 4 * 60 * 60);
- do_check_false(prefService.prefHasUserValue(pref_recent_crashes));
-
- // successful startup with 1 recent crash
- resetTestEnv(replacedLockTime);
- prefService.setIntPref(pref_last_success, ms_to_s(replacedLockTime));
- prefService.setIntPref(pref_recent_crashes, 1);
- appStartup.trackStartupCrashBegin(); // required to be called before end
- appStartup.trackStartupCrashEnd();
- // ensure recent_crashes was cleared since we have declared a succesful startup
- do_check_false(prefService.prefHasUserValue(pref_recent_crashes));
-}
-
-function test_trackStartupCrashBegin_safeMode() {
- gAppInfo.inSafeMode = true;
- resetTestEnv(0);
- let max_resumed = prefService.getIntPref(pref_max_resumed_crashes);
-
- // check manual safe mode doesn't change prefs without crash
- let replacedLockTime = Date.now() - 10 * 1000; // 10s ago
- resetTestEnv(replacedLockTime);
- prefService.setIntPref(pref_last_success, ms_to_s(replacedLockTime));
-
- do_check_false(prefService.prefHasUserValue(pref_recent_crashes));
- do_check_true(prefService.prefHasUserValue(pref_last_success));
- do_check_false(appStartup.automaticSafeModeNecessary);
- do_check_false(appStartup.trackStartupCrashBegin());
- do_check_false(prefService.prefHasUserValue(pref_recent_crashes));
- do_check_true(prefService.prefHasUserValue(pref_last_success));
- do_check_false(appStartup.automaticSafeModeNecessary);
-
- // check forced safe mode doesn't change prefs without crash
- replacedLockTime = Date.now() - 10 * 1000; // 10s ago
- resetTestEnv(replacedLockTime);
- prefService.setIntPref(pref_last_success, ms_to_s(replacedLockTime));
- prefService.setIntPref(pref_recent_crashes, max_resumed + 1);
-
- do_check_eq(max_resumed + 1, prefService.getIntPref(pref_recent_crashes));
- do_check_true(prefService.prefHasUserValue(pref_last_success));
- do_check_false(appStartup.automaticSafeModeNecessary);
- do_check_true(appStartup.trackStartupCrashBegin());
- do_check_eq(max_resumed + 1, prefService.getIntPref(pref_recent_crashes));
- do_check_true(prefService.prefHasUserValue(pref_last_success));
- do_check_true(appStartup.automaticSafeModeNecessary);
-
- // check forced safe mode after old crash
- replacedLockTime = Date.now() - 365 * 24 * 60 * 60 * 1000;
- resetTestEnv(replacedLockTime);
- // one year ago
- let last_success = ms_to_s(replacedLockTime) - 365 * 24 * 60 * 60;
- prefService.setIntPref(pref_last_success, last_success);
- prefService.setIntPref(pref_recent_crashes, max_resumed + 1);
- do_check_eq(max_resumed + 1, prefService.getIntPref(pref_recent_crashes));
- do_check_true(prefService.prefHasUserValue(pref_last_success));
- do_check_true(appStartup.automaticSafeModeNecessary);
- do_check_true(appStartup.trackStartupCrashBegin());
- do_check_eq(max_resumed + 1, prefService.getIntPref(pref_recent_crashes));
- do_check_eq(last_success, prefService.getIntPref(pref_last_success));
- do_check_true(appStartup.automaticSafeModeNecessary);
-}
-
-function test_trackStartupCrashEnd_safeMode() {
- gAppInfo.inSafeMode = true;
- let replacedLockTime = Date.now();
- resetTestEnv(replacedLockTime);
- let max_resumed = prefService.getIntPref(pref_max_resumed_crashes);
- prefService.setIntPref(pref_last_success, ms_to_s(replacedLockTime) - 24 * 60 * 60);
-
- // ensure recent_crashes were not cleared in manual safe mode
- prefService.setIntPref(pref_recent_crashes, 1);
- appStartup.trackStartupCrashBegin(); // required to be called before end
- appStartup.trackStartupCrashEnd();
- do_check_eq(1, prefService.getIntPref(pref_recent_crashes));
-
- // recent_crashes should be set to max_resumed in forced safe mode to allow the user
- // to try and start in regular mode after making changes.
- prefService.setIntPref(pref_recent_crashes, max_resumed + 1);
- appStartup.trackStartupCrashBegin(); // required to be called before end
- appStartup.trackStartupCrashEnd();
- do_check_eq(max_resumed, prefService.getIntPref(pref_recent_crashes));
-}
-
-function test_maxResumed() {
- resetTestEnv(0);
- gAppInfo.inSafeMode = false;
- let max_resumed = prefService.getIntPref(pref_max_resumed_crashes);
- let replacedLockTime = Date.now();
- resetTestEnv(replacedLockTime);
- prefService.setIntPref(pref_max_resumed_crashes, -1);
-
- prefService.setIntPref(pref_recent_crashes, max_resumed + 1);
- prefService.setIntPref(pref_last_success, ms_to_s(replacedLockTime) - 24 * 60 * 60);
- appStartup.trackStartupCrashBegin();
- // should remain the same since the last startup was not a crash
- do_check_eq(max_resumed + 2, prefService.getIntPref(pref_recent_crashes));
- do_check_false(appStartup.automaticSafeModeNecessary);
-}
diff --git a/toolkit/components/startup/tests/unit/xpcshell.ini b/toolkit/components/startup/tests/unit/xpcshell.ini
deleted file mode 100644
index 294800ee30..0000000000
--- a/toolkit/components/startup/tests/unit/xpcshell.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[DEFAULT]
-head = head_startup.js
-tail =
-skip-if = toolkit == 'android'
-
-[test_startup_crash.js]
diff --git a/toolkit/components/telemetry/Makefile.in b/toolkit/components/telemetry/Makefile.in
deleted file mode 100644
index 52016707cc..0000000000
--- a/toolkit/components/telemetry/Makefile.in
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-include $(topsrcdir)/config/rules.mk
-
-# This is so hacky. Waiting on bug 988938.
-addondir = $(srcdir)/tests/addons
-testdir = $(topobjdir)/_tests/xpcshell/toolkit/components/telemetry/tests/unit
-
-misc:: $(call mkdir_deps,$(testdir))
- $(EXIT_ON_ERROR) \
- for dir in $(addondir)/*; do \
- base=`basename $$dir`; \
- (cd $$dir && zip -qr $(testdir)/$$base.xpi *); \
- done
diff --git a/toolkit/components/telemetry/TelemetryController.jsm b/toolkit/components/telemetry/TelemetryController.jsm
index b8de776da3..86de87d02d 100644
--- a/toolkit/components/telemetry/TelemetryController.jsm
+++ b/toolkit/components/telemetry/TelemetryController.jsm
@@ -365,7 +365,7 @@ var Impl = {
let updateChannel = null;
try {
- updateChannel = UpdateUtils.getUpdateChannel(false);
+ updateChannel = UpdateUtils.UpdateChannel;
} catch (e) {
this._log.trace("_getApplicationSection - Unable to get update channel.", e);
}
diff --git a/toolkit/components/telemetry/TelemetryEnvironment.jsm b/toolkit/components/telemetry/TelemetryEnvironment.jsm
index 391ea4bb4a..f88dfc5f0d 100644
--- a/toolkit/components/telemetry/TelemetryEnvironment.jsm
+++ b/toolkit/components/telemetry/TelemetryEnvironment.jsm
@@ -1106,7 +1106,7 @@ EnvironmentCache.prototype = {
_updateSettings: function () {
let updateChannel = null;
try {
- updateChannel = UpdateUtils.getUpdateChannel(false);
+ updateChannel = UpdateUtils.UpdateChannel;
} catch (e) {}
this._currentEnvironment.settings = {
diff --git a/toolkit/components/telemetry/TelemetryReportingPolicy.jsm b/toolkit/components/telemetry/TelemetryReportingPolicy.jsm
index d9c99df492..6ad534f530 100644
--- a/toolkit/components/telemetry/TelemetryReportingPolicy.jsm
+++ b/toolkit/components/telemetry/TelemetryReportingPolicy.jsm
@@ -254,7 +254,7 @@ var TelemetryReportingPolicyImpl = {
// use the general minimum policy version.
let channel = "";
try {
- channel = UpdateUtils.getUpdateChannel(false);
+ channel = UpdateUtils.UpdateChannel;
} catch (e) {
this._log.error("minimumPolicyVersion - Unable to retrieve the current channel.");
return minPolicyVersion;
diff --git a/toolkit/components/telemetry/moz.build b/toolkit/components/telemetry/moz.build
index 7765c59b43..712da7999b 100644
--- a/toolkit/components/telemetry/moz.build
+++ b/toolkit/components/telemetry/moz.build
@@ -22,9 +22,6 @@ SPHINX_TREES['telemetry'] = 'docs'
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wno-error=shadow']
-XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
-BROWSER_CHROME_MANIFESTS += ['tests/browser/browser.ini']
-
XPIDL_SOURCES += [
'nsITelemetry.idl',
]
@@ -71,10 +68,6 @@ EXTRA_JS_MODULES += [
'UITelemetry.jsm',
]
-TESTING_JS_MODULES += [
- 'tests/unit/TelemetryArchiveTesting.jsm',
-]
-
GENERATED_FILES = [
'TelemetryEventData.h',
'TelemetryEventEnums.h',
@@ -125,5 +118,3 @@ event_enums = GENERATED_FILES['TelemetryEventEnums.h']
event_enums.script = 'gen-event-enum.py'
event_enums.inputs = event_files
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'Telemetry')
diff --git a/toolkit/components/telemetry/tests/addons/dictionary/install.rdf b/toolkit/components/telemetry/tests/addons/dictionary/install.rdf
deleted file mode 100644
index ff0039b39d..0000000000
--- a/toolkit/components/telemetry/tests/addons/dictionary/install.rdf
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-
- <Description about="urn:mozilla:install-manifest">
- <em:id>telemetry-dictionary@tests.mozilla.org</em:id>
- <em:version>1</em:version>
- <em:type>64</em:type>
-
- <em:targetApplication>
- <Description>
- <em:id>toolkit@mozilla.org</em:id>
- <em:minVersion>0</em:minVersion>
- <em:maxVersion>*</em:maxVersion>
- </Description>
- </em:targetApplication>
-
- <!-- Front End MetaData -->
- <em:name>Telemetry test dictionary</em:name>
- <em:description>A nice dictionary to prevent all typos for Telemetry.</em:description>
- <em:bootstrap>true</em:bootstrap>
-
- </Description>
-</RDF>
diff --git a/toolkit/components/telemetry/tests/addons/experiment/install.rdf b/toolkit/components/telemetry/tests/addons/experiment/install.rdf
deleted file mode 100644
index d12f06816d..0000000000
--- a/toolkit/components/telemetry/tests/addons/experiment/install.rdf
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-
- <Description about="urn:mozilla:install-manifest">
- <em:id>telemetry-experiment-1@tests.mozilla.org</em:id>
- <em:version>1</em:version>
- <em:type>128</em:type>
-
- <!-- Front End MetaData -->
- <em:name>Telemetry test experiment</em:name>
- <em:description>Yet another experiment that experiments experimentally.</em:description>
-
- </Description>
-</RDF>
diff --git a/toolkit/components/telemetry/tests/addons/extension-2/install.rdf b/toolkit/components/telemetry/tests/addons/extension-2/install.rdf
deleted file mode 100644
index ddb5904f86..0000000000
--- a/toolkit/components/telemetry/tests/addons/extension-2/install.rdf
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-
- <Description about="urn:mozilla:install-manifest">
- <em:id>telemetry-ext-2@tests.mozilla.org</em:id>
- <em:version>2</em:version>
- <em:type>2</em:type>
-
- <!-- Front End MetaData -->
- <em:name>Telemetry test extension 2</em:name>
- <em:description>Yet another extension that extends twice.</em:description>
-
- </Description>
-</RDF>
diff --git a/toolkit/components/telemetry/tests/addons/extension/install.rdf b/toolkit/components/telemetry/tests/addons/extension/install.rdf
deleted file mode 100644
index 4b1bd2da7f..0000000000
--- a/toolkit/components/telemetry/tests/addons/extension/install.rdf
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-
- <Description about="urn:mozilla:install-manifest">
- <em:id>telemetry-ext-1@tests.mozilla.org</em:id>
- <em:version>1</em:version>
- <em:type>2</em:type>
-
- <!-- Front End MetaData -->
- <em:name>Telemetry test extension</em:name>
- <em:description>Yet another extension that extends.</em:description>
-
- </Description>
-</RDF>
diff --git a/toolkit/components/telemetry/tests/addons/long-fields/install.rdf b/toolkit/components/telemetry/tests/addons/long-fields/install.rdf
deleted file mode 100644
index 23ca7523cf..0000000000
--- a/toolkit/components/telemetry/tests/addons/long-fields/install.rdf
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-
- <Description about="urn:mozilla:install-manifest">
- <em:id>tel-longfields-xpi@tests.mozilla.org</em:id>
- <em:version>This is a really long addon version, that will get limited to 100 characters. We're much longer, we're at about 116.</em:version>
-
- <em:targetApplication>
- <Description>
- <em:id>toolkit@mozilla.org</em:id>
- <em:minVersion>0</em:minVersion>
- <em:maxVersion>*</em:maxVersion>
- </Description>
- </em:targetApplication>
-
- <!-- Front End MetaData -->
- <em:name>This is a really long addon name, that will get limited to 100 characters. We're much longer, we're at about 219. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus nullam sodales. Yeah, Latin placeholder.</em:name>
- <em:description>This is a really long addon description, that will get limited to 100 characters. We're much longer, we're at about 200. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus nullam sodales.</em:description>
- <em:bootstrap>true</em:bootstrap>
-
- </Description>
-</RDF>
diff --git a/toolkit/components/telemetry/tests/addons/restartless/install.rdf b/toolkit/components/telemetry/tests/addons/restartless/install.rdf
deleted file mode 100644
index f6cda9f252..0000000000
--- a/toolkit/components/telemetry/tests/addons/restartless/install.rdf
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-
- <Description about="urn:mozilla:install-manifest">
- <em:id>tel-restartless-xpi@tests.mozilla.org</em:id>
- <em:version>1.0</em:version>
-
- <em:targetApplication>
- <Description>
- <em:id>toolkit@mozilla.org</em:id>
- <em:minVersion>0</em:minVersion>
- <em:maxVersion>*</em:maxVersion>
- </Description>
- </em:targetApplication>
-
- <!-- Front End MetaData -->
- <em:name>XPI Telemetry Restartless Test</em:name>
- <em:description>A restartless addon which gets enabled without a reboot.</em:description>
- <em:bootstrap>true</em:bootstrap>
-
- </Description>
-</RDF>
diff --git a/toolkit/components/telemetry/tests/addons/signed/META-INF/manifest.mf b/toolkit/components/telemetry/tests/addons/signed/META-INF/manifest.mf
deleted file mode 100644
index e6e279dbc2..0000000000
--- a/toolkit/components/telemetry/tests/addons/signed/META-INF/manifest.mf
+++ /dev/null
@@ -1,7 +0,0 @@
-Manifest-Version: 1.0
-
-Name: install.rdf
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: YEilRfaecTg2bMNPoYqexQ==
-SHA1-Digest: GEnQKM8Coyw83phx/z1oNh327+0=
-
diff --git a/toolkit/components/telemetry/tests/addons/signed/META-INF/mozilla.rsa b/toolkit/components/telemetry/tests/addons/signed/META-INF/mozilla.rsa
deleted file mode 100644
index 8e5a92650e..0000000000
--- a/toolkit/components/telemetry/tests/addons/signed/META-INF/mozilla.rsa
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/telemetry/tests/addons/signed/META-INF/mozilla.sf b/toolkit/components/telemetry/tests/addons/signed/META-INF/mozilla.sf
deleted file mode 100644
index 21ce46081d..0000000000
--- a/toolkit/components/telemetry/tests/addons/signed/META-INF/mozilla.sf
+++ /dev/null
@@ -1,4 +0,0 @@
-Signature-Version: 1.0
-MD5-Digest-Manifest: Ko2bKTrwTXCdstWHWqCR4w==
-SHA1-Digest-Manifest: k6+jfNGFxXtDd1cSX0ZoIyQ1cww=
-
diff --git a/toolkit/components/telemetry/tests/addons/signed/install.rdf b/toolkit/components/telemetry/tests/addons/signed/install.rdf
deleted file mode 100644
index 5fdca172c7..0000000000
--- a/toolkit/components/telemetry/tests/addons/signed/install.rdf
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-
- <Description about="urn:mozilla:install-manifest">
- <em:id>tel-signed-xpi@tests.mozilla.org</em:id>
- <em:version>1.0</em:version>
-
- <em:targetApplication>
- <Description>
- <em:id>toolkit@mozilla.org</em:id>
- <em:minVersion>0</em:minVersion>
- <em:maxVersion>*</em:maxVersion>
- </Description>
- </em:targetApplication>
-
- <!-- Front End MetaData -->
- <em:name>XPI Telemetry Signed Test</em:name>
- <em:description>A signed addon which gets enabled without a reboot.</em:description>
- <em:bootstrap>true</em:bootstrap>
-
- </Description>
-</RDF>
diff --git a/toolkit/components/telemetry/tests/addons/system/install.rdf b/toolkit/components/telemetry/tests/addons/system/install.rdf
deleted file mode 100644
index 12cb143a7d..0000000000
--- a/toolkit/components/telemetry/tests/addons/system/install.rdf
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-
- <Description about="urn:mozilla:install-manifest">
- <em:id>tel-system-xpi@tests.mozilla.org</em:id>
- <em:version>1.0</em:version>
-
- <em:targetApplication>
- <Description>
- <em:id>toolkit@mozilla.org</em:id>
- <em:minVersion>0</em:minVersion>
- <em:maxVersion>*</em:maxVersion>
- </Description>
- </em:targetApplication>
-
- <!-- Front End MetaData -->
- <em:name>XPI Telemetry System Add-on Test</em:name>
- <em:description>A system addon which is shipped with Firefox.</em:description>
- <em:bootstrap>true</em:bootstrap>
-
- </Description>
-</RDF>
diff --git a/toolkit/components/telemetry/tests/addons/theme/install.rdf b/toolkit/components/telemetry/tests/addons/theme/install.rdf
deleted file mode 100644
index a35249dba7..0000000000
--- a/toolkit/components/telemetry/tests/addons/theme/install.rdf
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-
- <Description about="urn:mozilla:install-manifest">
- <em:id>telemetry-theme@tests.mozilla.org</em:id>
- <em:version>1</em:version>
- <em:type>4</em:type>
-
- <!-- Front End MetaData -->
- <em:name>Telemetry test theme</em:name>
- <em:description>A good looking test theme for Telemetry.</em:description>
-
- </Description>
-</RDF>
diff --git a/toolkit/components/telemetry/tests/browser/browser.ini b/toolkit/components/telemetry/tests/browser/browser.ini
deleted file mode 100644
index a1725d54d3..0000000000
--- a/toolkit/components/telemetry/tests/browser/browser.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-[browser_TelemetryGC.js]
diff --git a/toolkit/components/telemetry/tests/browser/browser_TelemetryGC.js b/toolkit/components/telemetry/tests/browser/browser_TelemetryGC.js
deleted file mode 100644
index 262fd69ffa..0000000000
--- a/toolkit/components/telemetry/tests/browser/browser_TelemetryGC.js
+++ /dev/null
@@ -1,193 +0,0 @@
-"use strict";
-
-/*
- *********************************************************************************
- * *
- * WARNING *
- * *
- * If you adjust any of the constants here (slice limit, number of keys, etc.) *
- * make sure to update the JSON schema at: *
- * https://github.com/mozilla-services/mozilla-pipeline-schemas/blob/master/ *
- * telemetry/main.schema.json *
- * *
- * Otherwise, pings may be dropped by the telemetry backend! *
- * *
- ********************************************************************************/
-
-const {GCTelemetry} = Cu.import("resource://gre/modules/GCTelemetry.jsm", {});
-
-function check(entries) {
- const FIELDS = ["random", "worst"];
-
- // Check that all FIELDS are in |entries|.
- for (let f of FIELDS) {
- ok(f in entries, `${f} found in entries`);
- }
-
- // Check that only FIELDS are in |entries|.
- for (let k of Object.keys(entries)) {
- ok(FIELDS.includes(k), `${k} found in FIELDS`);
- }
-
- let foundGCs = 0;
-
- for (let f of FIELDS) {
- ok(Array.isArray(entries[f]), "have an array of GCs");
-
- ok(entries[f].length <= 2, "not too many GCs");
-
- for (let gc of entries[f]) {
- ok(gc !== null, "GC is non-null");
-
- foundGCs++;
-
- ok(Object.keys(gc).length <= 25, "number of keys in GC is not too large");
-
- // Sanity check the GC data.
- ok("total_time" in gc, "total_time field present");
- ok("max_pause" in gc, "max_pause field present");
-
- ok("slices" in gc, "slices field present");
- ok(Array.isArray(gc.slices), "slices is an array");
- ok(gc.slices.length > 0, "slices array non-empty");
- ok(gc.slices.length <= 4, "slices array is not too long");
-
- ok("totals" in gc, "totals field present");
- ok(typeof(gc.totals) == "object", "totals is an object");
- ok(Object.keys(gc.totals).length <= 65, "totals array is not too long");
-
- // Make sure we don't skip any big objects.
- for (let key in gc) {
- if (key != "slices" && key != "totals") {
- ok(typeof(gc[key]) != "object", `${key} property should be primitive`);
- }
- }
-
- let phases = new Set();
-
- for (let slice of gc.slices) {
- ok(Object.keys(slice).length <= 15, "slice is not too large");
-
- ok("pause" in slice, "pause field present in slice");
- ok("reason" in slice, "reason field present in slice");
- ok("times" in slice, "times field present in slice");
-
- // Make sure we don't skip any big objects.
- for (let key in slice) {
- if (key != "times") {
- ok(typeof(slice[key]) != "object", `${key} property should be primitive`);
- }
- }
-
- ok(Object.keys(slice.times).length <= 65, "no more than 65 phases");
-
- for (let phase in slice.times) {
- phases.add(phase);
- ok(typeof(slice.times[phase]) == "number", `${phase} property should be a number`);
- }
- }
-
- let totals = gc.totals;
- // Make sure we don't skip any big objects.
- for (let phase in totals) {
- ok(typeof(totals[phase]) == "number", `${phase} property should be a number`);
- }
-
- for (let phase of phases) {
- ok(phase in totals, `${phase} is in totals`);
- }
- }
- }
-
- ok(foundGCs > 0, "saw at least one GC");
-}
-
-add_task(function* test() {
- let multiprocess = Services.appinfo.browserTabsRemoteAutostart;
-
- // Set these prefs to ensure that we get measurements.
- const prefs = {"set": [["javascript.options.mem.notify", true]]};
- yield new Promise(resolve => SpecialPowers.pushPrefEnv(prefs, resolve));
-
- function runRemote(f) {
- gBrowser.selectedBrowser.messageManager.loadFrameScript(`data:,(${f})()`, false);
- }
-
- function initScript() {
- const {GCTelemetry} = Components.utils.import("resource://gre/modules/GCTelemetry.jsm", {});
-
- /*
- * Don't shut down GC telemetry if it was already running before the test!
- * Note: We need to use a multiline comment here since this code is turned into a data: URI.
- */
- let shutdown = GCTelemetry.init();
-
- function listener() {
- removeMessageListener("GCTelemTest:Shutdown", listener);
- if (shutdown) {
- GCTelemetry.shutdown();
- }
- }
- addMessageListener("GCTelemTest:Shutdown", listener);
- }
-
- if (multiprocess) {
- runRemote(initScript);
- }
-
- // Don't shut down GC telemetry if it was already running before the test!
- let shutdown = GCTelemetry.init();
- registerCleanupFunction(() => {
- if (shutdown) {
- GCTelemetry.shutdown();
- }
-
- gBrowser.selectedBrowser.messageManager.sendAsyncMessage("GCTelemTest:Shutdown");
- });
-
- let localPromise = new Promise(resolve => {
- function obs() {
- Services.obs.removeObserver(obs, "garbage-collection-statistics");
- resolve();
- }
- Services.obs.addObserver(obs, "garbage-collection-statistics", false);
- });
-
- let remotePromise;
- if (multiprocess) {
- remotePromise = new Promise(resolve => {
- function obs() {
- Services.ppmm.removeMessageListener("Telemetry:GCStatistics", obs);
- resolve();
- }
- Services.ppmm.addMessageListener("Telemetry:GCStatistics", obs);
- });
- } else {
- remotePromise = Promise.resolve();
- }
-
- // Make sure we have a GC to work with in both processes.
- Cu.forceGC();
- if (multiprocess) {
- runRemote(() => Components.utils.forceGC());
- }
-
- info("Waiting for GCs");
-
- yield Promise.all([localPromise, remotePromise]);
-
- let localEntries = GCTelemetry.entries("main", true);
- let remoteEntries = multiprocess ? GCTelemetry.entries("content", true) : localEntries;
-
- check(localEntries);
- check(remoteEntries);
-
- localEntries = GCTelemetry.entries("main", false);
- remoteEntries = multiprocess ? GCTelemetry.entries("content", false) : localEntries;
-
- is(localEntries.random.length, 0, "no random GCs after reset");
- is(localEntries.worst.length, 0, "no worst GCs after reset");
-
- is(remoteEntries.random.length, 0, "no random GCs after reset");
- is(remoteEntries.worst.length, 0, "no worst GCs after reset");
-});
diff --git a/toolkit/components/telemetry/tests/search/chrome.manifest b/toolkit/components/telemetry/tests/search/chrome.manifest
deleted file mode 100644
index ec412e0508..0000000000
--- a/toolkit/components/telemetry/tests/search/chrome.manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-locale testsearchplugin ar jar:jar:searchTest.jar!/chrome/searchTest.jar!/
-content testsearchplugin ./
-
diff --git a/toolkit/components/telemetry/tests/search/searchTest.jar b/toolkit/components/telemetry/tests/search/searchTest.jar
deleted file mode 100644
index b10fc0c3ec..0000000000
--- a/toolkit/components/telemetry/tests/search/searchTest.jar
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/telemetry/tests/unit/.eslintrc.js b/toolkit/components/telemetry/tests/unit/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/telemetry/tests/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/telemetry/tests/unit/TelemetryArchiveTesting.jsm b/toolkit/components/telemetry/tests/unit/TelemetryArchiveTesting.jsm
deleted file mode 100644
index 9be82c8835..0000000000
--- a/toolkit/components/telemetry/tests/unit/TelemetryArchiveTesting.jsm
+++ /dev/null
@@ -1,86 +0,0 @@
-const {utils: Cu} = Components;
-Cu.import("resource://gre/modules/TelemetryArchive.jsm");
-Cu.import("resource://testing-common/Assert.jsm");
-Cu.import("resource://gre/modules/Task.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/TelemetryController.jsm");
-
-this.EXPORTED_SYMBOLS = [
- "TelemetryArchiveTesting",
-];
-
-function checkForProperties(ping, expected) {
- for (let [props, val] of expected) {
- let test = ping;
- for (let prop of props) {
- test = test[prop];
- if (test === undefined) {
- return false;
- }
- }
- if (test !== val) {
- return false;
- }
- }
- return true;
-}
-
-/**
- * A helper object that allows test code to check whether a telemetry ping
- * was properly saved. To use, first initialize to collect the starting pings
- * and then check for new ping data.
- */
-function Checker() {
-}
-Checker.prototype = {
- promiseInit: function() {
- this._pingMap = new Map();
- return TelemetryArchive.promiseArchivedPingList().then((plist) => {
- for (let ping of plist) {
- this._pingMap.set(ping.id, ping);
- }
- });
- },
-
- /**
- * Find and return a new ping with certain properties.
- *
- * @param expected: an array of [['prop'...], 'value'] to check
- * For example:
- * [
- * [['environment', 'build', 'applicationId'], '20150101010101'],
- * [['version'], 1],
- * [['metadata', 'OOMAllocationSize'], 123456789],
- * ]
- * @returns a matching ping if found, or null
- */
- promiseFindPing: Task.async(function*(type, expected) {
- let candidates = [];
- let plist = yield TelemetryArchive.promiseArchivedPingList();
- for (let ping of plist) {
- if (this._pingMap.has(ping.id)) {
- continue;
- }
- if (ping.type == type) {
- candidates.push(ping);
- }
- }
-
- for (let candidate of candidates) {
- let ping = yield TelemetryArchive.promiseArchivedPingById(candidate.id);
- if (checkForProperties(ping, expected)) {
- return ping;
- }
- }
- return null;
- }),
-};
-
-const TelemetryArchiveTesting = {
- setup: function() {
- Services.prefs.setCharPref("toolkit.telemetry.log.level", "Trace");
- Services.prefs.setBoolPref("toolkit.telemetry.archive.enabled", true);
- },
-
- Checker: Checker,
-};
diff --git a/toolkit/components/telemetry/tests/unit/engine.xml b/toolkit/components/telemetry/tests/unit/engine.xml
deleted file mode 100644
index 2304fcdd7b..0000000000
--- a/toolkit/components/telemetry/tests/unit/engine.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
-<ShortName>engine-telemetry</ShortName>
-<Url type="text/html" method="GET" template="http://www.example.com/search">
- <Param name="q" value="{searchTerms}"/>
-</Url>
-</SearchPlugin>
diff --git a/toolkit/components/telemetry/tests/unit/head.js b/toolkit/components/telemetry/tests/unit/head.js
deleted file mode 100644
index 87afd36178..0000000000
--- a/toolkit/components/telemetry/tests/unit/head.js
+++ /dev/null
@@ -1,319 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-var { classes: Cc, utils: Cu, interfaces: Ci, results: Cr } = Components;
-
-Cu.import("resource://gre/modules/TelemetryController.jsm", this);
-Cu.import("resource://gre/modules/Services.jsm", this);
-Cu.import("resource://gre/modules/PromiseUtils.jsm", this);
-Cu.import("resource://gre/modules/Task.jsm", this);
-Cu.import("resource://gre/modules/FileUtils.jsm", this);
-Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
-Cu.import("resource://testing-common/httpd.js", this);
-Cu.import("resource://gre/modules/AppConstants.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "AddonTestUtils",
- "resource://testing-common/AddonTestUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "OS",
- "resource://gre/modules/osfile.jsm");
-
-const gIsWindows = AppConstants.platform == "win";
-const gIsMac = AppConstants.platform == "macosx";
-const gIsAndroid = AppConstants.platform == "android";
-const gIsGonk = false;
-const gIsLinux = AppConstants.platform == "linux";
-
-const Telemetry = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry);
-
-const MILLISECONDS_PER_MINUTE = 60 * 1000;
-const MILLISECONDS_PER_HOUR = 60 * MILLISECONDS_PER_MINUTE;
-const MILLISECONDS_PER_DAY = 24 * MILLISECONDS_PER_HOUR;
-
-const PREF_TELEMETRY_ENABLED = "toolkit.telemetry.enabled";
-
-const UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
-
-var gGlobalScope = this;
-
-const PingServer = {
- _httpServer: null,
- _started: false,
- _defers: [ PromiseUtils.defer() ],
- _currentDeferred: 0,
-
- get port() {
- return this._httpServer.identity.primaryPort;
- },
-
- get started() {
- return this._started;
- },
-
- registerPingHandler: function(handler) {
- const wrapped = wrapWithExceptionHandler(handler);
- this._httpServer.registerPrefixHandler("/submit/telemetry/", wrapped);
- },
-
- resetPingHandler: function() {
- this.registerPingHandler((request, response) => {
- let deferred = this._defers[this._defers.length - 1];
- this._defers.push(PromiseUtils.defer());
- deferred.resolve(request);
- });
- },
-
- start: function() {
- this._httpServer = new HttpServer();
- this._httpServer.start(-1);
- this._started = true;
- this.clearRequests();
- this.resetPingHandler();
- },
-
- stop: function() {
- return new Promise(resolve => {
- this._httpServer.stop(resolve);
- this._started = false;
- });
- },
-
- clearRequests: function() {
- this._defers = [ PromiseUtils.defer() ];
- this._currentDeferred = 0;
- },
-
- promiseNextRequest: function() {
- const deferred = this._defers[this._currentDeferred++];
- // Send the ping to the consumer on the next tick, so that the completion gets
- // signaled to Telemetry.
- return new Promise(r => Services.tm.currentThread.dispatch(() => r(deferred.promise),
- Ci.nsIThread.DISPATCH_NORMAL));
- },
-
- promiseNextPing: function() {
- return this.promiseNextRequest().then(request => decodeRequestPayload(request));
- },
-
- promiseNextRequests: Task.async(function*(count) {
- let results = [];
- for (let i=0; i<count; ++i) {
- results.push(yield this.promiseNextRequest());
- }
-
- return results;
- }),
-
- promiseNextPings: function(count) {
- return this.promiseNextRequests(count).then(requests => {
- return Array.from(requests, decodeRequestPayload);
- });
- },
-};
-
-/**
- * Decode the payload of an HTTP request into a ping.
- * @param {Object} request The data representing an HTTP request (nsIHttpRequest).
- * @return {Object} The decoded ping payload.
- */
-function decodeRequestPayload(request) {
- let s = request.bodyInputStream;
- let payload = null;
- let decoder = Cc["@mozilla.org/dom/json;1"].createInstance(Ci.nsIJSON)
-
- if (request.getHeader("content-encoding") == "gzip") {
- let observer = {
- buffer: "",
- onStreamComplete: function(loader, context, status, length, result) {
- this.buffer = String.fromCharCode.apply(this, result);
- }
- };
-
- let scs = Cc["@mozilla.org/streamConverters;1"]
- .getService(Ci.nsIStreamConverterService);
- let listener = Cc["@mozilla.org/network/stream-loader;1"]
- .createInstance(Ci.nsIStreamLoader);
- listener.init(observer);
- let converter = scs.asyncConvertData("gzip", "uncompressed",
- listener, null);
- converter.onStartRequest(null, null);
- converter.onDataAvailable(null, null, s, 0, s.available());
- converter.onStopRequest(null, null, null);
- let unicodeConverter = Cc["@mozilla.org/intl/scriptableunicodeconverter"]
- .createInstance(Ci.nsIScriptableUnicodeConverter);
- unicodeConverter.charset = "UTF-8";
- let utf8string = unicodeConverter.ConvertToUnicode(observer.buffer);
- utf8string += unicodeConverter.Finish();
- payload = JSON.parse(utf8string);
- } else {
- payload = decoder.decodeFromStream(s, s.available());
- }
-
- return payload;
-}
-
-function wrapWithExceptionHandler(f) {
- function wrapper(...args) {
- try {
- f(...args);
- } catch (ex) {
- if (typeof(ex) != 'object') {
- throw ex;
- }
- dump("Caught exception: " + ex.message + "\n");
- dump(ex.stack);
- do_test_finished();
- }
- }
- return wrapper;
-}
-
-function loadAddonManager(...args) {
- AddonTestUtils.init(gGlobalScope);
- AddonTestUtils.overrideCertDB();
- createAppInfo(...args);
-
- // As we're not running in application, we need to setup the features directory
- // used by system add-ons.
- const distroDir = FileUtils.getDir("ProfD", ["sysfeatures", "app0"], true);
- AddonTestUtils.registerDirectory("XREAppFeat", distroDir);
- return AddonTestUtils.promiseStartupManager();
-}
-
-var gAppInfo = null;
-
-function createAppInfo(ID="xpcshell@tests.mozilla.org", name="XPCShell",
- version="1.0", platformVersion="1.0") {
- AddonTestUtils.createAppInfo(ID, name, version, platformVersion);
- gAppInfo = AddonTestUtils.appInfo;
-}
-
-// Fake the timeout functions for the TelemetryScheduler.
-function fakeSchedulerTimer(set, clear) {
- let session = Cu.import("resource://gre/modules/TelemetrySession.jsm");
- session.Policy.setSchedulerTickTimeout = set;
- session.Policy.clearSchedulerTickTimeout = clear;
-}
-
-/**
- * Fake the current date.
- * This passes all received arguments to a new Date constructor and
- * uses the resulting date to fake the time in Telemetry modules.
- *
- * @return Date The new faked date.
- */
-function fakeNow(...args) {
- const date = new Date(...args);
- const modules = [
- Cu.import("resource://gre/modules/TelemetrySession.jsm"),
- Cu.import("resource://gre/modules/TelemetryEnvironment.jsm"),
- Cu.import("resource://gre/modules/TelemetryController.jsm"),
- Cu.import("resource://gre/modules/TelemetryStorage.jsm"),
- Cu.import("resource://gre/modules/TelemetrySend.jsm"),
- Cu.import("resource://gre/modules/TelemetryReportingPolicy.jsm"),
- ];
-
- for (let m of modules) {
- m.Policy.now = () => date;
- }
-
- return new Date(date);
-}
-
-function fakeMonotonicNow(ms) {
- const m = Cu.import("resource://gre/modules/TelemetrySession.jsm");
- m.Policy.monotonicNow = () => ms;
- return ms;
-}
-
-// Fake the timeout functions for TelemetryController sending.
-function fakePingSendTimer(set, clear) {
- let module = Cu.import("resource://gre/modules/TelemetrySend.jsm");
- let obj = Cu.cloneInto({set, clear}, module, {cloneFunctions:true});
- module.Policy.setSchedulerTickTimeout = obj.set;
- module.Policy.clearSchedulerTickTimeout = obj.clear;
-}
-
-function fakeMidnightPingFuzzingDelay(delayMs) {
- let module = Cu.import("resource://gre/modules/TelemetrySend.jsm");
- module.Policy.midnightPingFuzzingDelay = () => delayMs;
-}
-
-function fakeGeneratePingId(func) {
- let module = Cu.import("resource://gre/modules/TelemetryController.jsm");
- module.Policy.generatePingId = func;
-}
-
-function fakeCachedClientId(uuid) {
- let module = Cu.import("resource://gre/modules/TelemetryController.jsm");
- module.Policy.getCachedClientID = () => uuid;
-}
-
-// Return a date that is |offset| ms in the future from |date|.
-function futureDate(date, offset) {
- return new Date(date.getTime() + offset);
-}
-
-function truncateToDays(aMsec) {
- return Math.floor(aMsec / MILLISECONDS_PER_DAY);
-}
-
-// Returns a promise that resolves to true when the passed promise rejects,
-// false otherwise.
-function promiseRejects(promise) {
- return promise.then(() => false, () => true);
-}
-
-// Generates a random string of at least a specific length.
-function generateRandomString(length) {
- let string = "";
-
- while (string.length < length) {
- string += Math.random().toString(36);
- }
-
- return string.substring(0, length);
-}
-
-// Short-hand for retrieving the histogram with that id.
-function getHistogram(histogramId) {
- return Telemetry.getHistogramById(histogramId);
-}
-
-// Short-hand for retrieving the snapshot of the Histogram with that id.
-function getSnapshot(histogramId) {
- return Telemetry.getHistogramById(histogramId).snapshot();
-}
-
-// Helper for setting an empty list of Environment preferences to watch.
-function setEmptyPrefWatchlist() {
- let TelemetryEnvironment =
- Cu.import("resource://gre/modules/TelemetryEnvironment.jsm").TelemetryEnvironment;
- return TelemetryEnvironment.onInitialized().then(() => {
- TelemetryEnvironment.testWatchPreferences(new Map());
- });
-}
-
-if (runningInParent) {
- // Set logging preferences for all the tests.
- Services.prefs.setCharPref("toolkit.telemetry.log.level", "Trace");
- // Telemetry archiving should be on.
- Services.prefs.setBoolPref("toolkit.telemetry.archive.enabled", true);
- // Telemetry xpcshell tests cannot show the infobar.
- Services.prefs.setBoolPref("datareporting.policy.dataSubmissionPolicyBypassNotification", true);
- // FHR uploads should be enabled.
- Services.prefs.setBoolPref("datareporting.healthreport.uploadEnabled", true);
-
- fakePingSendTimer((callback, timeout) => {
- Services.tm.mainThread.dispatch(() => callback(), Ci.nsIThread.DISPATCH_NORMAL);
- },
- () => {});
-
- do_register_cleanup(() => TelemetrySend.shutdown());
-}
-
-TelemetryController.testInitLogging();
-
-// Avoid timers interrupting test behavior.
-fakeSchedulerTimer(() => {}, () => {});
-// Make pind sending predictable.
-fakeMidnightPingFuzzingDelay(0);
diff --git a/toolkit/components/telemetry/tests/unit/test_ChildHistograms.js b/toolkit/components/telemetry/tests/unit/test_ChildHistograms.js
deleted file mode 100644
index 11d730499e..0000000000
--- a/toolkit/components/telemetry/tests/unit/test_ChildHistograms.js
+++ /dev/null
@@ -1,107 +0,0 @@
-
-Cu.import("resource://gre/modules/TelemetryController.jsm", this);
-Cu.import("resource://gre/modules/TelemetrySession.jsm", this);
-Cu.import("resource://gre/modules/PromiseUtils.jsm", this);
-Cu.import("resource://testing-common/ContentTaskUtils.jsm", this);
-
-const MESSAGE_TELEMETRY_PAYLOAD = "Telemetry:Payload";
-const MESSAGE_TELEMETRY_GET_CHILD_PAYLOAD = "Telemetry:GetChildPayload";
-const MESSAGE_CHILD_TEST_DONE = "ChildTest:Done";
-
-const PLATFORM_VERSION = "1.9.2";
-const APP_VERSION = "1";
-const APP_ID = "xpcshell@tests.mozilla.org";
-const APP_NAME = "XPCShell";
-
-function run_child_test() {
- // Setup histograms with some fixed values.
- let flagHist = Telemetry.getHistogramById("TELEMETRY_TEST_FLAG");
- flagHist.add(1);
- let countHist = Telemetry.getHistogramById("TELEMETRY_TEST_COUNT");
- Telemetry.setHistogramRecordingEnabled("TELEMETRY_TEST_COUNT", false);
- countHist.add();
- Telemetry.setHistogramRecordingEnabled("TELEMETRY_TEST_COUNT", true);
- countHist.add();
- countHist.add();
- let categHist = Telemetry.getHistogramById("TELEMETRY_TEST_CATEGORICAL");
- categHist.add("Label2");
- categHist.add("Label3");
-
- let flagKeyed = Telemetry.getKeyedHistogramById("TELEMETRY_TEST_KEYED_FLAG");
- flagKeyed.add("a", 1);
- flagKeyed.add("b", 1);
- let countKeyed = Telemetry.getKeyedHistogramById("TELEMETRY_TEST_KEYED_COUNT");
- Telemetry.setHistogramRecordingEnabled("TELEMETRY_TEST_KEYED_COUNT", false);
- countKeyed.add("a");
- countKeyed.add("b");
- Telemetry.setHistogramRecordingEnabled("TELEMETRY_TEST_KEYED_COUNT", true);
- countKeyed.add("a");
- countKeyed.add("b");
- countKeyed.add("b");
-}
-
-function check_histogram_values(payload) {
- const hs = payload.histograms;
- Assert.ok("TELEMETRY_TEST_COUNT" in hs, "Should have count test histogram.");
- Assert.ok("TELEMETRY_TEST_FLAG" in hs, "Should have flag test histogram.");
- Assert.ok("TELEMETRY_TEST_CATEGORICAL" in hs, "Should have categorical test histogram.");
- Assert.equal(hs["TELEMETRY_TEST_COUNT"].sum, 2,
- "Count test histogram should have the right value.");
- Assert.equal(hs["TELEMETRY_TEST_FLAG"].sum, 1,
- "Flag test histogram should have the right value.");
- Assert.equal(hs["TELEMETRY_TEST_CATEGORICAL"].sum, 3,
- "Categorical test histogram should have the right sum.");
-
- const kh = payload.keyedHistograms;
- Assert.ok("TELEMETRY_TEST_KEYED_COUNT" in kh, "Should have keyed count test histogram.");
- Assert.ok("TELEMETRY_TEST_KEYED_FLAG" in kh, "Should have keyed flag test histogram.");
- Assert.equal(kh["TELEMETRY_TEST_KEYED_COUNT"]["a"].sum, 1,
- "Keyed count test histogram should have the right value.");
- Assert.equal(kh["TELEMETRY_TEST_KEYED_COUNT"]["b"].sum, 2,
- "Keyed count test histogram should have the right value.");
- Assert.equal(kh["TELEMETRY_TEST_KEYED_FLAG"]["a"].sum, 1,
- "Keyed flag test histogram should have the right value.");
- Assert.equal(kh["TELEMETRY_TEST_KEYED_FLAG"]["b"].sum, 1,
- "Keyed flag test histogram should have the right value.");
-}
-
-add_task(function*() {
- if (!runningInParent) {
- TelemetryController.testSetupContent();
- run_child_test();
- dump("... done with child test\n");
- do_send_remote_message(MESSAGE_CHILD_TEST_DONE);
- return;
- }
-
- // Setup.
- do_get_profile(true);
- loadAddonManager(APP_ID, APP_NAME, APP_VERSION, PLATFORM_VERSION);
- Services.prefs.setBoolPref(PREF_TELEMETRY_ENABLED, true);
- yield TelemetryController.testSetup();
- if (runningInParent) {
- // Make sure we don't generate unexpected pings due to pref changes.
- yield setEmptyPrefWatchlist();
- }
-
- // Run test in child, don't wait for it to finish.
- run_test_in_child("test_ChildHistograms.js");
- yield do_await_remote_message(MESSAGE_CHILD_TEST_DONE);
-
- yield ContentTaskUtils.waitForCondition(() => {
- let payload = TelemetrySession.getPayload("test-ping");
- return payload &&
- "processes" in payload &&
- "content" in payload.processes &&
- "histograms" in payload.processes.content &&
- "TELEMETRY_TEST_COUNT" in payload.processes.content.histograms;
- });
- const payload = TelemetrySession.getPayload("test-ping");
- Assert.ok("processes" in payload, "Should have processes section");
- Assert.ok("content" in payload.processes, "Should have child process section");
- Assert.ok("histograms" in payload.processes.content, "Child process section should have histograms.");
- Assert.ok("keyedHistograms" in payload.processes.content, "Child process section should have keyed histograms.");
- check_histogram_values(payload.processes.content);
-
- do_test_finished();
-});
diff --git a/toolkit/components/telemetry/tests/unit/test_PingAPI.js b/toolkit/components/telemetry/tests/unit/test_PingAPI.js
deleted file mode 100644
index d4d79aad4e..0000000000
--- a/toolkit/components/telemetry/tests/unit/test_PingAPI.js
+++ /dev/null
@@ -1,502 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
-*/
-
-// This tests the public Telemetry API for submitting pings.
-
-"use strict";
-
-Cu.import("resource://gre/modules/ClientID.jsm", this);
-Cu.import("resource://gre/modules/TelemetryController.jsm", this);
-Cu.import("resource://gre/modules/TelemetryArchive.jsm", this);
-Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
-Cu.import("resource://gre/modules/osfile.jsm", this);
-Cu.import("resource://gre/modules/Task.jsm", this);
-Cu.import("resource://gre/modules/Services.jsm", this);
-
-XPCOMUtils.defineLazyGetter(this, "gPingsArchivePath", function() {
- return OS.Path.join(OS.Constants.Path.profileDir, "datareporting", "archived");
-});
-
-/**
- * Fakes the archive storage quota.
- * @param {Integer} aArchiveQuota The new quota, in bytes.
- */
-function fakeStorageQuota(aArchiveQuota) {
- let storage = Cu.import("resource://gre/modules/TelemetryStorage.jsm");
- storage.Policy.getArchiveQuota = () => aArchiveQuota;
-}
-
-/**
- * Lists all the valid archived pings and their metadata, sorted by creation date.
- *
- * @param aFileName {String} The filename.
- * @return {Object[]} A list of objects with the extracted data in the form:
- * { timestamp: <number>,
- * id: <string>,
- * type: <string>,
- * size: <integer> }
- */
-var getArchivedPingsInfo = Task.async(function*() {
- let dirIterator = new OS.File.DirectoryIterator(gPingsArchivePath);
- let subdirs = (yield dirIterator.nextBatch()).filter(e => e.isDir);
- let archivedPings = [];
-
- // Iterate through the subdirs of |gPingsArchivePath|.
- for (let dir of subdirs) {
- let fileIterator = new OS.File.DirectoryIterator(dir.path);
- let files = (yield fileIterator.nextBatch()).filter(e => !e.isDir);
-
- // Then get a list of the files for the current subdir.
- for (let f of files) {
- let pingInfo = TelemetryStorage._testGetArchivedPingDataFromFileName(f.name);
- if (!pingInfo) {
- // This is not a valid archived ping, skip it.
- continue;
- }
- // Find the size of the ping and then add the info to the array.
- pingInfo.size = (yield OS.File.stat(f.path)).size;
- archivedPings.push(pingInfo);
- }
- }
-
- // Sort the list by creation date and then return it.
- archivedPings.sort((a, b) => b.timestamp - a.timestamp);
- return archivedPings;
-});
-
-add_task(function* test_setup() {
- do_get_profile(true);
- // Make sure we don't generate unexpected pings due to pref changes.
- yield setEmptyPrefWatchlist();
- Services.prefs.setBoolPref(PREF_TELEMETRY_ENABLED, true);
-});
-
-add_task(function* test_archivedPings() {
- // TelemetryController should not be fully initialized at this point.
- // Submitting pings should still work fine.
-
- const PINGS = [
- {
- type: "test-ping-api-1",
- payload: { foo: "bar"},
- dateCreated: new Date(2010, 1, 1, 10, 0, 0),
- },
- {
- type: "test-ping-api-2",
- payload: { moo: "meh"},
- dateCreated: new Date(2010, 2, 1, 10, 0, 0),
- },
- ];
-
- // Submit pings and check the ping list.
- let expectedPingList = [];
-
- for (let data of PINGS) {
- fakeNow(data.dateCreated);
- data.id = yield TelemetryController.submitExternalPing(data.type, data.payload);
- let list = yield TelemetryArchive.promiseArchivedPingList();
-
- expectedPingList.push({
- id: data.id,
- type: data.type,
- timestampCreated: data.dateCreated.getTime(),
- });
- Assert.deepEqual(list, expectedPingList, "Archived ping list should contain submitted pings");
- }
-
- // Check loading the archived pings.
- let checkLoadingPings = Task.async(function*() {
- for (let data of PINGS) {
- let ping = yield TelemetryArchive.promiseArchivedPingById(data.id);
- Assert.equal(ping.id, data.id, "Archived ping should have matching id");
- Assert.equal(ping.type, data.type, "Archived ping should have matching type");
- Assert.equal(ping.creationDate, data.dateCreated.toISOString(),
- "Archived ping should have matching creation date");
- }
- });
-
- yield checkLoadingPings();
-
- // Check that we find the archived pings again by scanning after a restart.
- yield TelemetryController.testReset();
-
- let pingList = yield TelemetryArchive.promiseArchivedPingList();
- Assert.deepEqual(expectedPingList, pingList,
- "Should have submitted pings in archive list after restart");
- yield checkLoadingPings();
-
- // Write invalid pings into the archive with both valid and invalid names.
- let writeToArchivedDir = Task.async(function*(dirname, filename, content, compressed) {
- const dirPath = OS.Path.join(gPingsArchivePath, dirname);
- yield OS.File.makeDir(dirPath, { ignoreExisting: true });
- const filePath = OS.Path.join(dirPath, filename);
- const options = { tmpPath: filePath + ".tmp", noOverwrite: false };
- if (compressed) {
- options.compression = "lz4";
- }
- yield OS.File.writeAtomic(filePath, content, options);
- });
-
- const FAKE_ID1 = "10000000-0123-0123-0123-0123456789a1";
- const FAKE_ID2 = "20000000-0123-0123-0123-0123456789a2";
- const FAKE_ID3 = "20000000-0123-0123-0123-0123456789a3";
- const FAKE_TYPE = "foo";
-
- // These should get rejected.
- yield writeToArchivedDir("xx", "foo.json", "{}");
- yield writeToArchivedDir("2010-02", "xx.xx.xx.json", "{}");
- // This one should get picked up...
- yield writeToArchivedDir("2010-02", "1." + FAKE_ID1 + "." + FAKE_TYPE + ".json", "{}");
- // ... but get overwritten by this one.
- yield writeToArchivedDir("2010-02", "2." + FAKE_ID1 + "." + FAKE_TYPE + ".json", "");
- // This should get picked up fine.
- yield writeToArchivedDir("2010-02", "3." + FAKE_ID2 + "." + FAKE_TYPE + ".json", "");
- // This compressed ping should get picked up fine as well.
- yield writeToArchivedDir("2010-02", "4." + FAKE_ID3 + "." + FAKE_TYPE + ".jsonlz4", "");
-
- expectedPingList.push({
- id: FAKE_ID1,
- type: "foo",
- timestampCreated: 2,
- });
- expectedPingList.push({
- id: FAKE_ID2,
- type: "foo",
- timestampCreated: 3,
- });
- expectedPingList.push({
- id: FAKE_ID3,
- type: "foo",
- timestampCreated: 4,
- });
- expectedPingList.sort((a, b) => a.timestampCreated - b.timestampCreated);
-
- // Reset the TelemetryArchive so we scan the archived dir again.
- yield TelemetryController.testReset();
-
- // Check that we are still picking up the valid archived pings on disk,
- // plus the valid ones above.
- pingList = yield TelemetryArchive.promiseArchivedPingList();
- Assert.deepEqual(expectedPingList, pingList, "Should have picked up valid archived pings");
- yield checkLoadingPings();
-
- // Now check that we fail to load the two invalid pings from above.
- Assert.ok((yield promiseRejects(TelemetryArchive.promiseArchivedPingById(FAKE_ID1))),
- "Should have rejected invalid ping");
- Assert.ok((yield promiseRejects(TelemetryArchive.promiseArchivedPingById(FAKE_ID2))),
- "Should have rejected invalid ping");
-});
-
-add_task(function* test_archiveCleanup() {
- const PING_TYPE = "foo";
-
- // Empty the archive.
- yield OS.File.removeDir(gPingsArchivePath);
-
- Telemetry.getHistogramById("TELEMETRY_ARCHIVE_SCAN_PING_COUNT").clear();
- Telemetry.getHistogramById("TELEMETRY_ARCHIVE_DIRECTORIES_COUNT").clear();
- // Also reset these histograms to make sure normal sized pings don't get counted.
- Telemetry.getHistogramById("TELEMETRY_PING_SIZE_EXCEEDED_ARCHIVED").clear();
- Telemetry.getHistogramById("TELEMETRY_DISCARDED_ARCHIVED_PINGS_SIZE_MB").clear();
-
- // Build the cache. Nothing should be evicted as there's no ping directory.
- yield TelemetryController.testReset();
- yield TelemetryStorage.testCleanupTaskPromise();
- yield TelemetryArchive.promiseArchivedPingList();
-
- let h = Telemetry.getHistogramById("TELEMETRY_ARCHIVE_SCAN_PING_COUNT").snapshot();
- Assert.equal(h.sum, 0, "Telemetry must report 0 pings scanned if no archive dir exists.");
- // One directory out of four was removed as well.
- h = Telemetry.getHistogramById("TELEMETRY_ARCHIVE_EVICTED_OLD_DIRS").snapshot();
- Assert.equal(h.sum, 0, "Telemetry must report 0 evicted dirs if no archive dir exists.");
-
- let expectedPrunedInfo = [];
- let expectedNotPrunedInfo = [];
-
- let checkArchive = Task.async(function*() {
- // Check that the pruned pings are not on disk anymore.
- for (let prunedInfo of expectedPrunedInfo) {
- yield Assert.rejects(TelemetryArchive.promiseArchivedPingById(prunedInfo.id),
- "Ping " + prunedInfo.id + " should have been pruned.");
- const pingPath =
- TelemetryStorage._testGetArchivedPingPath(prunedInfo.id, prunedInfo.creationDate, PING_TYPE);
- Assert.ok(!(yield OS.File.exists(pingPath)), "The ping should not be on the disk anymore.");
- }
-
- // Check that the expected pings are there.
- for (let expectedInfo of expectedNotPrunedInfo) {
- Assert.ok((yield TelemetryArchive.promiseArchivedPingById(expectedInfo.id)),
- "Ping" + expectedInfo.id + " should be in the archive.");
- }
- });
-
- Telemetry.getHistogramById("TELEMETRY_ARCHIVE_SESSION_PING_COUNT").clear();
-
- // Create a ping which should be pruned because it is past the retention period.
- let date = fakeNow(2010, 1, 1, 1, 0, 0);
- let firstDate = date;
- let pingId = yield TelemetryController.submitExternalPing(PING_TYPE, {}, {});
- expectedPrunedInfo.push({ id: pingId, creationDate: date });
-
- // Create a ping which should be kept because it is within the retention period.
- const oldestDirectoryDate = fakeNow(2010, 2, 1, 1, 0, 0);
- pingId = yield TelemetryController.submitExternalPing(PING_TYPE, {}, {});
- expectedNotPrunedInfo.push({ id: pingId, creationDate: oldestDirectoryDate });
-
- // Create 20 other pings which are within the retention period, but would be affected
- // by the disk quota.
- for (let month of [3, 4]) {
- for (let minute = 0; minute < 10; minute++) {
- date = fakeNow(2010, month, 1, 1, minute, 0);
- pingId = yield TelemetryController.submitExternalPing(PING_TYPE, {}, {});
- expectedNotPrunedInfo.push({ id: pingId, creationDate: date });
- }
- }
-
- // We expect all the pings we archived to be in this histogram.
- h = Telemetry.getHistogramById("TELEMETRY_ARCHIVE_SESSION_PING_COUNT");
- Assert.equal(h.snapshot().sum, 22, "All the pings must be live-accumulated in the histogram.");
- // Reset the histogram that will be populated by the archive scan.
- Telemetry.getHistogramById("TELEMETRY_ARCHIVE_EVICTED_OLD_DIRS").clear();
- Telemetry.getHistogramById("TELEMETRY_ARCHIVE_OLDEST_DIRECTORY_AGE").clear();
-
- // Move the current date 60 days ahead of the first ping.
- fakeNow(futureDate(firstDate, 60 * MILLISECONDS_PER_DAY));
- // Reset TelemetryArchive and TelemetryController to start the startup cleanup.
- yield TelemetryController.testReset();
- // Wait for the cleanup to finish.
- yield TelemetryStorage.testCleanupTaskPromise();
- // Then scan the archived dir.
- yield TelemetryArchive.promiseArchivedPingList();
-
- // Check that the archive is in the correct state.
- yield checkArchive();
-
- // Make sure the ping count is correct after the scan (one ping was removed).
- h = Telemetry.getHistogramById("TELEMETRY_ARCHIVE_SCAN_PING_COUNT").snapshot();
- Assert.equal(h.sum, 21, "The histogram must count all the pings in the archive.");
- // One directory out of four was removed as well.
- h = Telemetry.getHistogramById("TELEMETRY_ARCHIVE_EVICTED_OLD_DIRS").snapshot();
- Assert.equal(h.sum, 1, "Telemetry must correctly report removed archive directories.");
- // Check that the remaining directories are correctly counted.
- h = Telemetry.getHistogramById("TELEMETRY_ARCHIVE_DIRECTORIES_COUNT").snapshot();
- Assert.equal(h.sum, 3, "Telemetry must correctly report the remaining archive directories.");
- // Check that the remaining directories are correctly counted.
- const oldestAgeInMonths = 1;
- h = Telemetry.getHistogramById("TELEMETRY_ARCHIVE_OLDEST_DIRECTORY_AGE").snapshot();
- Assert.equal(h.sum, oldestAgeInMonths,
- "Telemetry must correctly report age of the oldest directory in the archive.");
-
- // We need to test the archive size before we hit the quota, otherwise a special
- // value is recorded.
- Telemetry.getHistogramById("TELEMETRY_ARCHIVE_SIZE_MB").clear();
- Telemetry.getHistogramById("TELEMETRY_ARCHIVE_EVICTED_OVER_QUOTA").clear();
- Telemetry.getHistogramById("TELEMETRY_ARCHIVE_EVICTING_OVER_QUOTA_MS").clear();
-
- // Move the current date 60 days ahead of the second ping.
- fakeNow(futureDate(oldestDirectoryDate, 60 * MILLISECONDS_PER_DAY));
- // Reset TelemetryController and TelemetryArchive.
- yield TelemetryController.testReset();
- // Wait for the cleanup to finish.
- yield TelemetryStorage.testCleanupTaskPromise();
- // Then scan the archived dir again.
- yield TelemetryArchive.promiseArchivedPingList();
-
- // Move the oldest ping to the unexpected pings list.
- expectedPrunedInfo.push(expectedNotPrunedInfo.shift());
- // Check that the archive is in the correct state.
- yield checkArchive();
-
- // Find how much disk space the archive takes.
- const archivedPingsInfo = yield getArchivedPingsInfo();
- let archiveSizeInBytes =
- archivedPingsInfo.reduce((lastResult, element) => lastResult + element.size, 0);
-
- // Check that the correct values for quota probes are reported when no quota is hit.
- h = Telemetry.getHistogramById("TELEMETRY_ARCHIVE_SIZE_MB").snapshot();
- Assert.equal(h.sum, Math.round(archiveSizeInBytes / 1024 / 1024),
- "Telemetry must report the correct archive size.");
- h = Telemetry.getHistogramById("TELEMETRY_ARCHIVE_EVICTED_OVER_QUOTA").snapshot();
- Assert.equal(h.sum, 0, "Telemetry must report 0 evictions if quota is not hit.");
- h = Telemetry.getHistogramById("TELEMETRY_ARCHIVE_EVICTING_OVER_QUOTA_MS").snapshot();
- Assert.equal(h.sum, 0, "Telemetry must report a null elapsed time if quota is not hit.");
-
- // Set the quota to 80% of the space.
- const testQuotaInBytes = archiveSizeInBytes * 0.8;
- fakeStorageQuota(testQuotaInBytes);
-
- // The storage prunes archived pings until we reach 90% of the requested storage quota.
- // Based on that, find how many pings should be kept.
- const safeQuotaSize = testQuotaInBytes * 0.9;
- let sizeInBytes = 0;
- let pingsWithinQuota = [];
- let pingsOutsideQuota = [];
-
- for (let pingInfo of archivedPingsInfo) {
- sizeInBytes += pingInfo.size;
- if (sizeInBytes >= safeQuotaSize) {
- pingsOutsideQuota.push({ id: pingInfo.id, creationDate: new Date(pingInfo.timestamp) });
- continue;
- }
- pingsWithinQuota.push({ id: pingInfo.id, creationDate: new Date(pingInfo.timestamp) });
- }
-
- expectedNotPrunedInfo = pingsWithinQuota;
- expectedPrunedInfo = expectedPrunedInfo.concat(pingsOutsideQuota);
-
- // Reset TelemetryArchive and TelemetryController to start the startup cleanup.
- yield TelemetryController.testReset();
- yield TelemetryStorage.testCleanupTaskPromise();
- yield TelemetryArchive.promiseArchivedPingList();
- // Check that the archive is in the correct state.
- yield checkArchive();
-
- h = Telemetry.getHistogramById("TELEMETRY_ARCHIVE_EVICTED_OVER_QUOTA").snapshot();
- Assert.equal(h.sum, pingsOutsideQuota.length,
- "Telemetry must correctly report the over quota pings evicted from the archive.");
- h = Telemetry.getHistogramById("TELEMETRY_ARCHIVE_SIZE_MB").snapshot();
- Assert.equal(h.sum, 300, "Archive quota was hit, a special size must be reported.");
-
- // Trigger a cleanup again and make sure we're not removing anything.
- yield TelemetryController.testReset();
- yield TelemetryStorage.testCleanupTaskPromise();
- yield TelemetryArchive.promiseArchivedPingList();
- yield checkArchive();
-
- const OVERSIZED_PING_ID = "9b21ec8f-f762-4d28-a2c1-44e1c4694f24";
- // Create and archive an oversized, uncompressed, ping.
- const OVERSIZED_PING = {
- id: OVERSIZED_PING_ID,
- type: PING_TYPE,
- creationDate: (new Date()).toISOString(),
- // Generate a ~2MB string to use as the payload.
- payload: generateRandomString(2 * 1024 * 1024)
- };
- yield TelemetryArchive.promiseArchivePing(OVERSIZED_PING);
-
- // Get the size of the archived ping.
- const oversizedPingPath =
- TelemetryStorage._testGetArchivedPingPath(OVERSIZED_PING.id, new Date(OVERSIZED_PING.creationDate), PING_TYPE) + "lz4";
- const archivedPingSizeMB = Math.floor((yield OS.File.stat(oversizedPingPath)).size / 1024 / 1024);
-
- // We expect the oversized ping to be pruned when scanning the archive.
- expectedPrunedInfo.push({ id: OVERSIZED_PING_ID, creationDate: new Date(OVERSIZED_PING.creationDate) });
-
- // Scan the archive.
- yield TelemetryController.testReset();
- yield TelemetryStorage.testCleanupTaskPromise();
- yield TelemetryArchive.promiseArchivedPingList();
- // The following also checks that non oversized pings are not removed.
- yield checkArchive();
-
- // Make sure we're correctly updating the related histograms.
- h = Telemetry.getHistogramById("TELEMETRY_PING_SIZE_EXCEEDED_ARCHIVED").snapshot();
- Assert.equal(h.sum, 1, "Telemetry must report 1 oversized ping in the archive.");
- h = Telemetry.getHistogramById("TELEMETRY_DISCARDED_ARCHIVED_PINGS_SIZE_MB").snapshot();
- Assert.equal(h.counts[archivedPingSizeMB], 1,
- "Telemetry must report the correct size for the oversized ping.");
-});
-
-add_task(function* test_clientId() {
- // Check that a ping submitted after the delayed telemetry initialization completed
- // should get a valid client id.
- yield TelemetryController.testReset();
- const clientId = yield ClientID.getClientID();
-
- let id = yield TelemetryController.submitExternalPing("test-type", {}, {addClientId: true});
- let ping = yield TelemetryArchive.promiseArchivedPingById(id);
-
- Assert.ok(!!ping, "Should have loaded the ping.");
- Assert.ok("clientId" in ping, "Ping should have a client id.");
- Assert.ok(UUID_REGEX.test(ping.clientId), "Client id is in UUID format.");
- Assert.equal(ping.clientId, clientId, "Ping client id should match the global client id.");
-
- // We should have cached the client id now. Lets confirm that by
- // checking the client id on a ping submitted before the async
- // controller setup is finished.
- let promiseSetup = TelemetryController.testReset();
- id = yield TelemetryController.submitExternalPing("test-type", {}, {addClientId: true});
- ping = yield TelemetryArchive.promiseArchivedPingById(id);
- Assert.equal(ping.clientId, clientId);
-
- // Finish setup.
- yield promiseSetup;
-});
-
-add_task(function* test_InvalidPingType() {
- const TYPES = [
- "a",
- "-",
- "¿€€€?",
- "-foo-",
- "-moo",
- "zoo-",
- ".bar",
- "asfd.asdf",
- ];
-
- for (let type of TYPES) {
- let histogram = Telemetry.getKeyedHistogramById("TELEMETRY_INVALID_PING_TYPE_SUBMITTED");
- Assert.equal(histogram.snapshot(type).sum, 0,
- "Should not have counted this invalid ping yet: " + type);
- Assert.ok(promiseRejects(TelemetryController.submitExternalPing(type, {})),
- "Ping type should have been rejected.");
- Assert.equal(histogram.snapshot(type).sum, 1,
- "Should have counted this as an invalid ping type.");
- }
-});
-
-add_task(function* test_InvalidPayloadType() {
- const PAYLOAD_TYPES = [
- 19,
- "string",
- [1, 2, 3, 4],
- null,
- undefined,
- ];
-
- let histogram = Telemetry.getHistogramById("TELEMETRY_INVALID_PAYLOAD_SUBMITTED");
- for (let i = 0; i < PAYLOAD_TYPES.length; i++) {
- histogram.clear();
- Assert.equal(histogram.snapshot().sum, 0,
- "Should not have counted this invalid payload yet: " + JSON.stringify(PAYLOAD_TYPES[i]));
- Assert.ok(yield promiseRejects(TelemetryController.submitExternalPing("payload-test", PAYLOAD_TYPES[i])),
- "Payload type should have been rejected.");
- Assert.equal(histogram.snapshot().sum, 1,
- "Should have counted this as an invalid payload type.");
- }
-});
-
-add_task(function* test_currentPingData() {
- yield TelemetryController.testSetup();
-
- // Setup test data.
- let h = Telemetry.getHistogramById("TELEMETRY_TEST_RELEASE_OPTOUT");
- h.clear();
- h.add(1);
- let k = Telemetry.getKeyedHistogramById("TELEMETRY_TEST_KEYED_RELEASE_OPTOUT");
- k.clear();
- k.add("a", 1);
-
- // Get current ping data objects and check that their data is sane.
- for (let subsession of [true, false]) {
- let ping = TelemetryController.getCurrentPingData(subsession);
-
- Assert.ok(!!ping, "Should have gotten a ping.");
- Assert.equal(ping.type, "main", "Ping should have correct type.");
- const expectedReason = subsession ? "gather-subsession-payload" : "gather-payload";
- Assert.equal(ping.payload.info.reason, expectedReason, "Ping should have the correct reason.");
-
- let id = "TELEMETRY_TEST_RELEASE_OPTOUT";
- Assert.ok(id in ping.payload.histograms, "Payload should have test count histogram.");
- Assert.equal(ping.payload.histograms[id].sum, 1, "Test count value should match.");
- id = "TELEMETRY_TEST_KEYED_RELEASE_OPTOUT";
- Assert.ok(id in ping.payload.keyedHistograms, "Payload should have keyed test histogram.");
- Assert.equal(ping.payload.keyedHistograms[id]["a"].sum, 1, "Keyed test value should match.");
- }
-});
-
-add_task(function* test_shutdown() {
- yield TelemetryController.testShutdown();
-});
diff --git a/toolkit/components/telemetry/tests/unit/test_SubsessionChaining.js b/toolkit/components/telemetry/tests/unit/test_SubsessionChaining.js
deleted file mode 100644
index c86fb04998..0000000000
--- a/toolkit/components/telemetry/tests/unit/test_SubsessionChaining.js
+++ /dev/null
@@ -1,236 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
-*/
-
-Cu.import("resource://gre/modules/Preferences.jsm", this);
-Cu.import("resource://gre/modules/Promise.jsm", this);
-Cu.import("resource://gre/modules/Task.jsm", this);
-Cu.import("resource://gre/modules/TelemetryArchive.jsm", this);
-Cu.import("resource://gre/modules/TelemetryController.jsm", this);
-Cu.import("resource://gre/modules/TelemetryEnvironment.jsm", this);
-Cu.import("resource://gre/modules/osfile.jsm", this);
-Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
-
-const MS_IN_ONE_HOUR = 60 * 60 * 1000;
-const MS_IN_ONE_DAY = 24 * MS_IN_ONE_HOUR;
-
-const PREF_BRANCH = "toolkit.telemetry.";
-const PREF_ARCHIVE_ENABLED = PREF_BRANCH + "archive.enabled";
-
-const REASON_ABORTED_SESSION = "aborted-session";
-const REASON_DAILY = "daily";
-const REASON_ENVIRONMENT_CHANGE = "environment-change";
-const REASON_SHUTDOWN = "shutdown";
-
-XPCOMUtils.defineLazyGetter(this, "DATAREPORTING_PATH", function() {
- return OS.Path.join(OS.Constants.Path.profileDir, "datareporting");
-});
-
-var promiseValidateArchivedPings = Task.async(function*(aExpectedReasons) {
- // The list of ping reasons which mark the session end (and must reset the subsession
- // count).
- const SESSION_END_PING_REASONS = new Set([ REASON_ABORTED_SESSION, REASON_SHUTDOWN ]);
-
- let list = yield TelemetryArchive.promiseArchivedPingList();
-
- // We're just interested in the "main" pings.
- list = list.filter(p => p.type == "main");
-
- Assert.equal(aExpectedReasons.length, list.length, "All the expected pings must be received.");
-
- let previousPing = yield TelemetryArchive.promiseArchivedPingById(list[0].id);
- Assert.equal(aExpectedReasons.shift(), previousPing.payload.info.reason,
- "Telemetry should only get pings with expected reasons.");
- Assert.equal(previousPing.payload.info.previousSessionId, null,
- "The first session must report a null previous session id.");
- Assert.equal(previousPing.payload.info.previousSubsessionId, null,
- "The first subsession must report a null previous subsession id.");
- Assert.equal(previousPing.payload.info.profileSubsessionCounter, 1,
- "profileSubsessionCounter must be 1 the first time.");
- Assert.equal(previousPing.payload.info.subsessionCounter, 1,
- "subsessionCounter must be 1 the first time.");
-
- let expectedSubsessionCounter = 1;
- let expectedPreviousSessionId = previousPing.payload.info.sessionId;
-
- for (let i = 1; i < list.length; i++) {
- let currentPing = yield TelemetryArchive.promiseArchivedPingById(list[i].id);
- let currentInfo = currentPing.payload.info;
- let previousInfo = previousPing.payload.info;
- do_print("Archive entry " + i + " - id: " + currentPing.id + ", reason: " + currentInfo.reason);
-
- Assert.equal(aExpectedReasons.shift(), currentInfo.reason,
- "Telemetry should only get pings with expected reasons.");
- Assert.equal(currentInfo.previousSessionId, expectedPreviousSessionId,
- "Telemetry must correctly chain session identifiers.");
- Assert.equal(currentInfo.previousSubsessionId, previousInfo.subsessionId,
- "Telemetry must correctly chain subsession identifiers.");
- Assert.equal(currentInfo.profileSubsessionCounter, previousInfo.profileSubsessionCounter + 1,
- "Telemetry must correctly track the profile subsessions count.");
- Assert.equal(currentInfo.subsessionCounter, expectedSubsessionCounter,
- "The subsession counter should be monotonically increasing.");
-
- // Store the current ping as previous.
- previousPing = currentPing;
- // Reset the expected subsession counter, if required. Otherwise increment the expected
- // subsession counter.
- // If this is the final subsession of a session we need to update expected values accordingly.
- if (SESSION_END_PING_REASONS.has(currentInfo.reason)) {
- expectedSubsessionCounter = 1;
- expectedPreviousSessionId = currentInfo.sessionId;
- } else {
- expectedSubsessionCounter++;
- }
- }
-});
-
-add_task(function* test_setup() {
- do_test_pending();
-
- // Addon manager needs a profile directory
- do_get_profile();
- loadAddonManager("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
- // Make sure we don't generate unexpected pings due to pref changes.
- yield setEmptyPrefWatchlist();
-
- Preferences.set(PREF_TELEMETRY_ENABLED, true);
-});
-
-add_task(function* test_subsessionsChaining() {
- if (gIsAndroid) {
- // We don't support subsessions yet on Android, so skip the next checks.
- return;
- }
-
- const PREF_TEST = PREF_BRANCH + "test.pref1";
- const PREFS_TO_WATCH = new Map([
- [PREF_TEST, {what: TelemetryEnvironment.RECORD_PREF_VALUE}],
- ]);
- Preferences.reset(PREF_TEST);
-
- // Fake the clock data to manually trigger an aborted-session ping and a daily ping.
- // This is also helpful to make sure we get the archived pings in an expected order.
- let now = fakeNow(2009, 9, 18, 0, 0, 0);
- let monotonicNow = fakeMonotonicNow(1000);
-
- let moveClockForward = (minutes) => {
- let ms = minutes * MILLISECONDS_PER_MINUTE;
- now = fakeNow(futureDate(now, ms));
- monotonicNow = fakeMonotonicNow(monotonicNow + ms);
- }
-
- // Keep track of the ping reasons we're expecting in this test.
- let expectedReasons = [];
-
- // Start and shut down Telemetry. We expect a shutdown ping with profileSubsessionCounter: 1,
- // subsessionCounter: 1, subsessionId: A, and previousSubsessionId: null to be archived.
- yield TelemetryController.testSetup();
- yield TelemetryController.testShutdown();
- expectedReasons.push(REASON_SHUTDOWN);
-
- // Start Telemetry but don't wait for it to initialise before shutting down. We expect a
- // shutdown ping with profileSubsessionCounter: 2, subsessionCounter: 1, subsessionId: B
- // and previousSubsessionId: A to be archived.
- moveClockForward(30);
- TelemetryController.testReset();
- yield TelemetryController.testShutdown();
- expectedReasons.push(REASON_SHUTDOWN);
-
- // Start Telemetry and simulate an aborted-session ping. We expect an aborted-session ping
- // with profileSubsessionCounter: 3, subsessionCounter: 1, subsessionId: C and
- // previousSubsessionId: B to be archived.
- let schedulerTickCallback = null;
- fakeSchedulerTimer(callback => schedulerTickCallback = callback, () => {});
- yield TelemetryController.testReset();
- moveClockForward(6);
- // Trigger the an aborted session ping save. When testing,we are not saving the aborted-session
- // ping as soon as Telemetry starts, otherwise we would end up with unexpected pings being
- // sent when calling |TelemetryController.testReset()|, thus breaking some tests.
- Assert.ok(!!schedulerTickCallback);
- yield schedulerTickCallback();
- expectedReasons.push(REASON_ABORTED_SESSION);
-
- // Start Telemetry and trigger an environment change through a pref modification. We expect
- // an environment-change ping with profileSubsessionCounter: 4, subsessionCounter: 1,
- // subsessionId: D and previousSubsessionId: C to be archived.
- moveClockForward(30);
- yield TelemetryController.testReset();
- TelemetryEnvironment.testWatchPreferences(PREFS_TO_WATCH);
- moveClockForward(30);
- Preferences.set(PREF_TEST, 1);
- expectedReasons.push(REASON_ENVIRONMENT_CHANGE);
-
- // Shut down Telemetry. We expect a shutdown ping with profileSubsessionCounter: 5,
- // subsessionCounter: 2, subsessionId: E and previousSubsessionId: D to be archived.
- moveClockForward(30);
- yield TelemetryController.testShutdown();
- expectedReasons.push(REASON_SHUTDOWN);
-
- // Start Telemetry and trigger a daily ping. We expect a daily ping with
- // profileSubsessionCounter: 6, subsessionCounter: 1, subsessionId: F and
- // previousSubsessionId: E to be archived.
- moveClockForward(30);
- yield TelemetryController.testReset();
-
- // Delay the callback around midnight.
- now = fakeNow(futureDate(now, MS_IN_ONE_DAY));
- // Trigger the daily ping.
- yield schedulerTickCallback();
- expectedReasons.push(REASON_DAILY);
-
- // Trigger an environment change ping. We expect an environment-changed ping with
- // profileSubsessionCounter: 7, subsessionCounter: 2, subsessionId: G and
- // previousSubsessionId: F to be archived.
- moveClockForward(30);
- Preferences.set(PREF_TEST, 0);
- expectedReasons.push(REASON_ENVIRONMENT_CHANGE);
-
- // Shut down Telemetry and trigger a shutdown ping.
- moveClockForward(30);
- yield TelemetryController.testShutdown();
- expectedReasons.push(REASON_SHUTDOWN);
-
- // Start Telemetry and trigger an environment change.
- yield TelemetryController.testReset();
- TelemetryEnvironment.testWatchPreferences(PREFS_TO_WATCH);
- moveClockForward(30);
- Preferences.set(PREF_TEST, 1);
- expectedReasons.push(REASON_ENVIRONMENT_CHANGE);
-
- // Don't shut down, instead trigger an aborted-session ping.
- moveClockForward(6);
- // Trigger the an aborted session ping save.
- yield schedulerTickCallback();
- expectedReasons.push(REASON_ABORTED_SESSION);
-
- // Start Telemetry and trigger a daily ping.
- moveClockForward(30);
- yield TelemetryController.testReset();
- // Delay the callback around midnight.
- now = futureDate(now, MS_IN_ONE_DAY);
- fakeNow(now);
- // Trigger the daily ping.
- yield schedulerTickCallback();
- expectedReasons.push(REASON_DAILY);
-
- // Trigger an environment change.
- moveClockForward(30);
- Preferences.set(PREF_TEST, 0);
- expectedReasons.push(REASON_ENVIRONMENT_CHANGE);
-
- // And an aborted-session ping again.
- moveClockForward(6);
- // Trigger the an aborted session ping save.
- yield schedulerTickCallback();
- expectedReasons.push(REASON_ABORTED_SESSION);
-
- // Make sure the aborted-session ping gets archived.
- yield TelemetryController.testReset();
-
- yield promiseValidateArchivedPings(expectedReasons);
-});
-
-add_task(function* () {
- yield TelemetryController.testShutdown();
- do_test_finished();
-});
diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryController.js b/toolkit/components/telemetry/tests/unit/test_TelemetryController.js
deleted file mode 100644
index b383de6bf1..0000000000
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryController.js
+++ /dev/null
@@ -1,507 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
-*/
-/* This testcase triggers two telemetry pings.
- *
- * Telemetry code keeps histograms of past telemetry pings. The first
- * ping populates these histograms. One of those histograms is then
- * checked in the second request.
- */
-
-Cu.import("resource://gre/modules/ClientID.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
-Cu.import("resource://gre/modules/TelemetryController.jsm", this);
-Cu.import("resource://gre/modules/TelemetryStorage.jsm", this);
-Cu.import("resource://gre/modules/TelemetrySend.jsm", this);
-Cu.import("resource://gre/modules/TelemetryArchive.jsm", this);
-Cu.import("resource://gre/modules/Task.jsm", this);
-Cu.import("resource://gre/modules/Promise.jsm", this);
-Cu.import("resource://gre/modules/Preferences.jsm");
-
-const PING_FORMAT_VERSION = 4;
-const DELETION_PING_TYPE = "deletion";
-const TEST_PING_TYPE = "test-ping-type";
-
-const PLATFORM_VERSION = "1.9.2";
-const APP_VERSION = "1";
-const APP_NAME = "XPCShell";
-
-const PREF_BRANCH = "toolkit.telemetry.";
-const PREF_ENABLED = PREF_BRANCH + "enabled";
-const PREF_ARCHIVE_ENABLED = PREF_BRANCH + "archive.enabled";
-const PREF_FHR_UPLOAD_ENABLED = "datareporting.healthreport.uploadEnabled";
-const PREF_UNIFIED = PREF_BRANCH + "unified";
-
-var gClientID = null;
-
-function sendPing(aSendClientId, aSendEnvironment) {
- if (PingServer.started) {
- TelemetrySend.setServer("http://localhost:" + PingServer.port);
- } else {
- TelemetrySend.setServer("http://doesnotexist");
- }
-
- let options = {
- addClientId: aSendClientId,
- addEnvironment: aSendEnvironment,
- };
- return TelemetryController.submitExternalPing(TEST_PING_TYPE, {}, options);
-}
-
-function checkPingFormat(aPing, aType, aHasClientId, aHasEnvironment) {
- const MANDATORY_PING_FIELDS = [
- "type", "id", "creationDate", "version", "application", "payload"
- ];
-
- const APPLICATION_TEST_DATA = {
- buildId: gAppInfo.appBuildID,
- name: APP_NAME,
- version: APP_VERSION,
- displayVersion: AppConstants.MOZ_APP_VERSION_DISPLAY,
- vendor: "Mozilla",
- platformVersion: PLATFORM_VERSION,
- xpcomAbi: "noarch-spidermonkey",
- };
-
- // Check that the ping contains all the mandatory fields.
- for (let f of MANDATORY_PING_FIELDS) {
- Assert.ok(f in aPing, f + " must be available.");
- }
-
- Assert.equal(aPing.type, aType, "The ping must have the correct type.");
- Assert.equal(aPing.version, PING_FORMAT_VERSION, "The ping must have the correct version.");
-
- // Test the application section.
- for (let f in APPLICATION_TEST_DATA) {
- Assert.equal(aPing.application[f], APPLICATION_TEST_DATA[f],
- f + " must have the correct value.");
- }
-
- // We can't check the values for channel and architecture. Just make
- // sure they are in.
- Assert.ok("architecture" in aPing.application,
- "The application section must have an architecture field.");
- Assert.ok("channel" in aPing.application,
- "The application section must have a channel field.");
-
- // Check the clientId and environment fields, as needed.
- Assert.equal("clientId" in aPing, aHasClientId);
- Assert.equal("environment" in aPing, aHasEnvironment);
-}
-
-add_task(function* test_setup() {
- // Addon manager needs a profile directory
- do_get_profile();
- loadAddonManager("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
- // Make sure we don't generate unexpected pings due to pref changes.
- yield setEmptyPrefWatchlist();
-
- Services.prefs.setBoolPref(PREF_ENABLED, true);
- Services.prefs.setBoolPref(PREF_FHR_UPLOAD_ENABLED, true);
-
- yield new Promise(resolve =>
- Telemetry.asyncFetchTelemetryData(wrapWithExceptionHandler(resolve)));
-});
-
-add_task(function* asyncSetup() {
- yield TelemetryController.testSetup();
-});
-
-// Ensure that not overwriting an existing file fails silently
-add_task(function* test_overwritePing() {
- let ping = {id: "foo"};
- yield TelemetryStorage.savePing(ping, true);
- yield TelemetryStorage.savePing(ping, false);
- yield TelemetryStorage.cleanupPingFile(ping);
-});
-
-// Checks that a sent ping is correctly received by a dummy http server.
-add_task(function* test_simplePing() {
- PingServer.start();
- // Update the Telemetry Server preference with the address of the local server.
- // Otherwise we might end up sending stuff to a non-existing server after
- // |TelemetryController.testReset| is called.
- Preferences.set(TelemetryController.Constants.PREF_SERVER, "http://localhost:" + PingServer.port);
-
- yield sendPing(false, false);
- let request = yield PingServer.promiseNextRequest();
-
- // Check that we have a version query parameter in the URL.
- Assert.notEqual(request.queryString, "");
-
- // Make sure the version in the query string matches the new ping format version.
- let params = request.queryString.split("&");
- Assert.ok(params.find(p => p == ("v=" + PING_FORMAT_VERSION)));
-
- let ping = decodeRequestPayload(request);
- checkPingFormat(ping, TEST_PING_TYPE, false, false);
-});
-
-add_task(function* test_disableDataUpload() {
- const isUnified = Preferences.get(PREF_UNIFIED, false);
- if (!isUnified) {
- // Skipping the test if unified telemetry is off, as no deletion ping will
- // be generated.
- return;
- }
-
- // Disable FHR upload: this should trigger a deletion ping.
- Preferences.set(PREF_FHR_UPLOAD_ENABLED, false);
-
- let ping = yield PingServer.promiseNextPing();
- checkPingFormat(ping, DELETION_PING_TYPE, true, false);
- // Wait on ping activity to settle.
- yield TelemetrySend.testWaitOnOutgoingPings();
-
- // Restore FHR Upload.
- Preferences.set(PREF_FHR_UPLOAD_ENABLED, true);
-
- // Simulate a failure in sending the deletion ping by disabling the HTTP server.
- yield PingServer.stop();
-
- // Try to send a ping. It will be saved as pending and get deleted when disabling upload.
- TelemetryController.submitExternalPing(TEST_PING_TYPE, {});
-
- // Disable FHR upload to send a deletion ping again.
- Preferences.set(PREF_FHR_UPLOAD_ENABLED, false);
-
- // Wait on sending activity to settle, as |TelemetryController.testReset()| doesn't do that.
- yield TelemetrySend.testWaitOnOutgoingPings();
- // Wait for the pending pings to be deleted. Resetting TelemetryController doesn't
- // trigger the shutdown, so we need to call it ourselves.
- yield TelemetryStorage.shutdown();
- // Simulate a restart, and spin the send task.
- yield TelemetryController.testReset();
-
- // Disabling Telemetry upload must clear out all the pending pings.
- let pendingPings = yield TelemetryStorage.loadPendingPingList();
- Assert.equal(pendingPings.length, 1,
- "All the pending pings but the deletion ping should have been deleted");
-
- // Enable the ping server again.
- PingServer.start();
- // We set the new server using the pref, otherwise it would get reset with
- // |TelemetryController.testReset|.
- Preferences.set(TelemetryController.Constants.PREF_SERVER, "http://localhost:" + PingServer.port);
-
- // Stop the sending task and then start it again.
- yield TelemetrySend.shutdown();
- // Reset the controller to spin the ping sending task.
- yield TelemetryController.testReset();
- ping = yield PingServer.promiseNextPing();
- checkPingFormat(ping, DELETION_PING_TYPE, true, false);
-
- // Wait on ping activity to settle before moving on to the next test. If we were
- // to shut down telemetry, even though the PingServer caught the expected pings,
- // TelemetrySend could still be processing them (clearing pings would happen in
- // a couple of ticks). Shutting down would cancel the request and save them as
- // pending pings.
- yield TelemetrySend.testWaitOnOutgoingPings();
- // Restore FHR Upload.
- Preferences.set(PREF_FHR_UPLOAD_ENABLED, true);
-});
-
-add_task(function* test_pingHasClientId() {
- const PREF_CACHED_CLIENTID = "toolkit.telemetry.cachedClientID";
-
- // Make sure we have no cached client ID for this test: we'll try to send
- // a ping with it while Telemetry is being initialized.
- Preferences.reset(PREF_CACHED_CLIENTID);
- yield TelemetryController.testShutdown();
- yield ClientID._reset();
- yield TelemetryStorage.testClearPendingPings();
- // And also clear the counter histogram since we're here.
- let h = Telemetry.getHistogramById("TELEMETRY_PING_SUBMISSION_WAITING_CLIENTID");
- h.clear();
-
- // Init telemetry and try to send a ping with a client ID.
- let promisePingSetup = TelemetryController.testReset();
- yield sendPing(true, false);
- Assert.equal(h.snapshot().sum, 1,
- "We must have a ping waiting for the clientId early during startup.");
- // Wait until we are fully initialized. Pings will be assembled but won't get
- // sent before then.
- yield promisePingSetup;
-
- let ping = yield PingServer.promiseNextPing();
- // Fetch the client ID after initializing and fetching the the ping, so we
- // don't unintentionally trigger its loading. We'll still need the client ID
- // to see if the ping looks sane.
- gClientID = yield ClientID.getClientID();
-
- checkPingFormat(ping, TEST_PING_TYPE, true, false);
- Assert.equal(ping.clientId, gClientID, "The correct clientId must be reported.");
-
- // Shutdown Telemetry so we can safely restart it.
- yield TelemetryController.testShutdown();
- yield TelemetryStorage.testClearPendingPings();
-
- // We should have cached the client ID now. Lets confirm that by checking it before
- // the async ping setup is finished.
- h.clear();
- promisePingSetup = TelemetryController.testReset();
- yield sendPing(true, false);
- yield promisePingSetup;
-
- // Check that we received the cached client id.
- Assert.equal(h.snapshot().sum, 0, "We must have used the cached clientId.");
- ping = yield PingServer.promiseNextPing();
- checkPingFormat(ping, TEST_PING_TYPE, true, false);
- Assert.equal(ping.clientId, gClientID,
- "Telemetry should report the correct cached clientId.");
-
- // Check that sending a ping without relying on the cache, after the
- // initialization, still works.
- Preferences.reset(PREF_CACHED_CLIENTID);
- yield TelemetryController.testShutdown();
- yield TelemetryStorage.testClearPendingPings();
- yield TelemetryController.testReset();
- yield sendPing(true, false);
- ping = yield PingServer.promiseNextPing();
- checkPingFormat(ping, TEST_PING_TYPE, true, false);
- Assert.equal(ping.clientId, gClientID, "The correct clientId must be reported.");
- Assert.equal(h.snapshot().sum, 0, "No ping should have been waiting for a clientId.");
-});
-
-add_task(function* test_pingHasEnvironment() {
- // Send a ping with the environment data.
- yield sendPing(false, true);
- let ping = yield PingServer.promiseNextPing();
- checkPingFormat(ping, TEST_PING_TYPE, false, true);
-
- // Test a field in the environment build section.
- Assert.equal(ping.application.buildId, ping.environment.build.buildId);
-});
-
-add_task(function* test_pingHasEnvironmentAndClientId() {
- // Send a ping with the environment data and client id.
- yield sendPing(true, true);
- let ping = yield PingServer.promiseNextPing();
- checkPingFormat(ping, TEST_PING_TYPE, true, true);
-
- // Test a field in the environment build section.
- Assert.equal(ping.application.buildId, ping.environment.build.buildId);
- // Test that we have the correct clientId.
- Assert.equal(ping.clientId, gClientID, "The correct clientId must be reported.");
-});
-
-add_task(function* test_archivePings() {
- let now = new Date(2009, 10, 18, 12, 0, 0);
- fakeNow(now);
-
- // Disable ping upload so that pings don't get sent.
- // With unified telemetry the FHR upload pref controls this,
- // with non-unified telemetry the Telemetry enabled pref.
- const isUnified = Preferences.get(PREF_UNIFIED, false);
- const uploadPref = isUnified ? PREF_FHR_UPLOAD_ENABLED : PREF_ENABLED;
- Preferences.set(uploadPref, false);
-
- // If we're using unified telemetry, disabling ping upload will generate a "deletion"
- // ping. Catch it.
- if (isUnified) {
- let ping = yield PingServer.promiseNextPing();
- checkPingFormat(ping, DELETION_PING_TYPE, true, false);
- }
-
- // Register a new Ping Handler that asserts if a ping is received, then send a ping.
- PingServer.registerPingHandler(() => Assert.ok(false, "Telemetry must not send pings if not allowed to."));
- let pingId = yield sendPing(true, true);
-
- // Check that the ping was archived, even with upload disabled.
- let ping = yield TelemetryArchive.promiseArchivedPingById(pingId);
- Assert.equal(ping.id, pingId, "TelemetryController should still archive pings.");
-
- // Check that pings don't get archived if not allowed to.
- now = new Date(2010, 10, 18, 12, 0, 0);
- fakeNow(now);
- Preferences.set(PREF_ARCHIVE_ENABLED, false);
- pingId = yield sendPing(true, true);
- let promise = TelemetryArchive.promiseArchivedPingById(pingId);
- Assert.ok((yield promiseRejects(promise)),
- "TelemetryController should not archive pings if the archive pref is disabled.");
-
- // Enable archiving and the upload so that pings get sent and archived again.
- Preferences.set(uploadPref, true);
- Preferences.set(PREF_ARCHIVE_ENABLED, true);
-
- now = new Date(2014, 6, 18, 22, 0, 0);
- fakeNow(now);
- // Restore the non asserting ping handler.
- PingServer.resetPingHandler();
- pingId = yield sendPing(true, true);
-
- // Check that we archive pings when successfully sending them.
- yield PingServer.promiseNextPing();
- ping = yield TelemetryArchive.promiseArchivedPingById(pingId);
- Assert.equal(ping.id, pingId,
- "TelemetryController should still archive pings if ping upload is enabled.");
-});
-
-// Test that we fuzz the submission time around midnight properly
-// to avoid overloading the telemetry servers.
-add_task(function* test_midnightPingSendFuzzing() {
- const fuzzingDelay = 60 * 60 * 1000;
- fakeMidnightPingFuzzingDelay(fuzzingDelay);
- let now = new Date(2030, 5, 1, 11, 0, 0);
- fakeNow(now);
-
- let waitForTimer = () => new Promise(resolve => {
- fakePingSendTimer((callback, timeout) => {
- resolve([callback, timeout]);
- }, () => {});
- });
-
- PingServer.clearRequests();
- yield TelemetryController.testReset();
-
- // A ping after midnight within the fuzzing delay should not get sent.
- now = new Date(2030, 5, 2, 0, 40, 0);
- fakeNow(now);
- PingServer.registerPingHandler((req, res) => {
- Assert.ok(false, "No ping should be received yet.");
- });
- let timerPromise = waitForTimer();
- yield sendPing(true, true);
- let [timerCallback, timerTimeout] = yield timerPromise;
- Assert.ok(!!timerCallback);
- Assert.deepEqual(futureDate(now, timerTimeout), new Date(2030, 5, 2, 1, 0, 0));
-
- // A ping just before the end of the fuzzing delay should not get sent.
- now = new Date(2030, 5, 2, 0, 59, 59);
- fakeNow(now);
- timerPromise = waitForTimer();
- yield sendPing(true, true);
- [timerCallback, timerTimeout] = yield timerPromise;
- Assert.deepEqual(timerTimeout, 1 * 1000);
-
- // Restore the previous ping handler.
- PingServer.resetPingHandler();
-
- // Setting the clock to after the fuzzing delay, we should trigger the two ping sends
- // with the timer callback.
- now = futureDate(now, timerTimeout);
- fakeNow(now);
- yield timerCallback();
- const pings = yield PingServer.promiseNextPings(2);
- for (let ping of pings) {
- checkPingFormat(ping, TEST_PING_TYPE, true, true);
- }
- yield TelemetrySend.testWaitOnOutgoingPings();
-
- // Moving the clock further we should still send pings immediately.
- now = futureDate(now, 5 * 60 * 1000);
- yield sendPing(true, true);
- let ping = yield PingServer.promiseNextPing();
- checkPingFormat(ping, TEST_PING_TYPE, true, true);
- yield TelemetrySend.testWaitOnOutgoingPings();
-
- // Check that pings shortly before midnight are immediately sent.
- now = fakeNow(2030, 5, 3, 23, 59, 0);
- yield sendPing(true, true);
- ping = yield PingServer.promiseNextPing();
- checkPingFormat(ping, TEST_PING_TYPE, true, true);
- yield TelemetrySend.testWaitOnOutgoingPings();
-
- // Clean-up.
- fakeMidnightPingFuzzingDelay(0);
- fakePingSendTimer(() => {}, () => {});
-});
-
-add_task(function* test_changePingAfterSubmission() {
- // Submit a ping with a custom payload.
- let payload = { canary: "test" };
- let pingPromise = TelemetryController.submitExternalPing(TEST_PING_TYPE, payload, options);
-
- // Change the payload with a predefined value.
- payload.canary = "changed";
-
- // Wait for the ping to be archived.
- const pingId = yield pingPromise;
-
- // Make sure our changes didn't affect the submitted payload.
- let archivedCopy = yield TelemetryArchive.promiseArchivedPingById(pingId);
- Assert.equal(archivedCopy.payload.canary, "test",
- "The payload must not be changed after being submitted.");
-});
-
-add_task(function* test_telemetryEnabledUnexpectedValue() {
- // Remove the default value for toolkit.telemetry.enabled from the default prefs.
- // Otherwise, we wouldn't be able to set the pref to a string.
- let defaultPrefBranch = Services.prefs.getDefaultBranch(null);
- defaultPrefBranch.deleteBranch(PREF_ENABLED);
-
- // Set the preferences controlling the Telemetry status to a string.
- Preferences.set(PREF_ENABLED, "false");
- // Check that Telemetry is not enabled.
- yield TelemetryController.testReset();
- Assert.equal(Telemetry.canRecordExtended, false,
- "Invalid values must not enable Telemetry recording.");
-
- // Delete the pref again.
- defaultPrefBranch.deleteBranch(PREF_ENABLED);
-
- // Make sure that flipping it to true works.
- Preferences.set(PREF_ENABLED, true);
- yield TelemetryController.testReset();
- Assert.equal(Telemetry.canRecordExtended, true,
- "True must enable Telemetry recording.");
-
- // Also check that the false works as well.
- Preferences.set(PREF_ENABLED, false);
- yield TelemetryController.testReset();
- Assert.equal(Telemetry.canRecordExtended, false,
- "False must disable Telemetry recording.");
-});
-
-add_task(function* test_telemetryCleanFHRDatabase() {
- const FHR_DBNAME_PREF = "datareporting.healthreport.dbName";
- const CUSTOM_DB_NAME = "unlikely.to.be.used.sqlite";
- const DEFAULT_DB_NAME = "healthreport.sqlite";
-
- // Check that we're able to remove a FHR DB with a custom name.
- const CUSTOM_DB_PATHS = [
- OS.Path.join(OS.Constants.Path.profileDir, CUSTOM_DB_NAME),
- OS.Path.join(OS.Constants.Path.profileDir, CUSTOM_DB_NAME + "-wal"),
- OS.Path.join(OS.Constants.Path.profileDir, CUSTOM_DB_NAME + "-shm"),
- ];
- Preferences.set(FHR_DBNAME_PREF, CUSTOM_DB_NAME);
-
- // Write fake DB files to the profile directory.
- for (let dbFilePath of CUSTOM_DB_PATHS) {
- yield OS.File.writeAtomic(dbFilePath, "some data");
- }
-
- // Trigger the cleanup and check that the files were removed.
- yield TelemetryStorage.removeFHRDatabase();
- for (let dbFilePath of CUSTOM_DB_PATHS) {
- Assert.ok(!(yield OS.File.exists(dbFilePath)), "The DB must not be on the disk anymore: " + dbFilePath);
- }
-
- // We should not break anything if there's no DB file.
- yield TelemetryStorage.removeFHRDatabase();
-
- // Check that we're able to remove a FHR DB with the default name.
- Preferences.reset(FHR_DBNAME_PREF);
-
- const DEFAULT_DB_PATHS = [
- OS.Path.join(OS.Constants.Path.profileDir, DEFAULT_DB_NAME),
- OS.Path.join(OS.Constants.Path.profileDir, DEFAULT_DB_NAME + "-wal"),
- OS.Path.join(OS.Constants.Path.profileDir, DEFAULT_DB_NAME + "-shm"),
- ];
-
- // Write fake DB files to the profile directory.
- for (let dbFilePath of DEFAULT_DB_PATHS) {
- yield OS.File.writeAtomic(dbFilePath, "some data");
- }
-
- // Trigger the cleanup and check that the files were removed.
- yield TelemetryStorage.removeFHRDatabase();
- for (let dbFilePath of DEFAULT_DB_PATHS) {
- Assert.ok(!(yield OS.File.exists(dbFilePath)), "The DB must not be on the disk anymore: " + dbFilePath);
- }
-});
-
-add_task(function* stopServer() {
- yield PingServer.stop();
-});
diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryControllerBuildID.js b/toolkit/components/telemetry/tests/unit/test_TelemetryControllerBuildID.js
deleted file mode 100644
index b8a88afa29..0000000000
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryControllerBuildID.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
-*/
-/* Test inclusion of previous build ID in telemetry pings when build ID changes.
- * bug 841028
- *
- * Cases to cover:
- * 1) Run with no "previousBuildID" stored in prefs:
- * -> no previousBuildID in telemetry system info, new value set in prefs.
- * 2) previousBuildID in prefs, equal to current build ID:
- * -> no previousBuildID in telemetry, prefs not updated.
- * 3) previousBuildID in prefs, not equal to current build ID:
- * -> previousBuildID in telemetry, new value set in prefs.
- */
-
-"use strict";
-
-Cu.import("resource://gre/modules/Services.jsm", this);
-Cu.import("resource://gre/modules/TelemetryController.jsm", this);
-Cu.import("resource://gre/modules/TelemetrySession.jsm", this);
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-// Force the Telemetry enabled preference so that TelemetrySession.testReset() doesn't exit early.
-Services.prefs.setBoolPref(PREF_TELEMETRY_ENABLED, true);
-
-// Set up our dummy AppInfo object so we can control the appBuildID.
-Cu.import("resource://testing-common/AppInfo.jsm", this);
-updateAppInfo();
-
-// Check that when run with no previous build ID stored, we update the pref but do not
-// put anything into the metadata.
-add_task(function* test_firstRun() {
- yield TelemetryController.testReset();
- let metadata = TelemetrySession.getMetadata();
- do_check_false("previousBuildID" in metadata);
- let appBuildID = getAppInfo().appBuildID;
- let buildIDPref = Services.prefs.getCharPref(TelemetrySession.Constants.PREF_PREVIOUS_BUILDID);
- do_check_eq(appBuildID, buildIDPref);
-});
-
-// Check that a subsequent run with the same build ID does not put prev build ID in
-// metadata. Assumes testFirstRun() has already been called to set the previousBuildID pref.
-add_task(function* test_secondRun() {
- yield TelemetryController.testReset();
- let metadata = TelemetrySession.getMetadata();
- do_check_false("previousBuildID" in metadata);
-});
-
-// Set up telemetry with a different app build ID and check that the old build ID
-// is returned in the metadata and the pref is updated to the new build ID.
-// Assumes testFirstRun() has been called to set the previousBuildID pref.
-const NEW_BUILD_ID = "20130314";
-add_task(function* test_newBuild() {
- let info = getAppInfo();
- let oldBuildID = info.appBuildID;
- info.appBuildID = NEW_BUILD_ID;
- yield TelemetryController.testReset();
- let metadata = TelemetrySession.getMetadata();
- do_check_eq(metadata.previousBuildId, oldBuildID);
- let buildIDPref = Services.prefs.getCharPref(TelemetrySession.Constants.PREF_PREVIOUS_BUILDID);
- do_check_eq(NEW_BUILD_ID, buildIDPref);
-});
-
-
-function run_test() {
- // Make sure we have a profile directory.
- do_get_profile();
-
- run_next_test();
-}
diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryControllerShutdown.js b/toolkit/components/telemetry/tests/unit/test_TelemetryControllerShutdown.js
deleted file mode 100644
index 391db0d9de..0000000000
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryControllerShutdown.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Test that TelemetryController sends close to shutdown don't lead
-// to AsyncShutdown timeouts.
-
-"use strict";
-
-Cu.import("resource://gre/modules/Services.jsm", this);
-Cu.import("resource://gre/modules/TelemetryController.jsm", this);
-Cu.import("resource://gre/modules/TelemetrySend.jsm", this);
-Cu.import("resource://gre/modules/Timer.jsm", this);
-Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
-Cu.import("resource://gre/modules/AsyncShutdown.jsm", this);
-Cu.import("resource://testing-common/httpd.js", this);
-
-const PREF_BRANCH = "toolkit.telemetry.";
-const PREF_FHR_UPLOAD_ENABLED = "datareporting.healthreport.uploadEnabled";
-
-function contentHandler(metadata, response)
-{
- dump("contentHandler called for path: " + metadata._path + "\n");
- // We intentionally don't finish writing the response here to let the
- // client time out.
- response.processAsync();
- response.setHeader("Content-Type", "text/plain");
-}
-
-add_task(function* test_setup() {
- // Addon manager needs a profile directory
- do_get_profile();
- loadAddonManager("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
- // Make sure we don't generate unexpected pings due to pref changes.
- yield setEmptyPrefWatchlist();
-
- Services.prefs.setBoolPref(PREF_TELEMETRY_ENABLED, true);
- Services.prefs.setBoolPref(PREF_FHR_UPLOAD_ENABLED, true);
-});
-
-/**
- * Ensures that TelemetryController does not hang processing shutdown
- * phases. Assumes that Telemetry shutdown routines do not take longer than
- * CRASH_TIMEOUT_MS to complete.
- */
-add_task(function* test_sendTelemetryShutsDownWithinReasonableTimeout() {
- const CRASH_TIMEOUT_MS = 5 * 1000;
- // Enable testing mode for AsyncShutdown, otherwise some testing-only functionality
- // is not available.
- Services.prefs.setBoolPref("toolkit.asyncshutdown.testing", true);
- // Reducing the max delay for waitiing on phases to complete from 1 minute
- // (standard) to 10 seconds to avoid blocking the tests in case of misbehavior.
- Services.prefs.setIntPref("toolkit.asyncshutdown.crash_timeout", CRASH_TIMEOUT_MS);
-
- let httpServer = new HttpServer();
- httpServer.registerPrefixHandler("/", contentHandler);
- httpServer.start(-1);
-
- yield TelemetryController.testSetup();
- TelemetrySend.setServer("http://localhost:" + httpServer.identity.primaryPort);
- let submissionPromise = TelemetryController.submitExternalPing("test-ping-type", {});
-
- // Trigger the AsyncShutdown phase TelemetryController hangs off.
- AsyncShutdown.profileBeforeChange._trigger();
- AsyncShutdown.sendTelemetry._trigger();
- // Now wait for the ping submission.
- yield submissionPromise;
-
- // If we get here, we didn't time out in the shutdown routines.
- Assert.ok(true, "Didn't time out on shutdown.");
-});
diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryController_idle.js b/toolkit/components/telemetry/tests/unit/test_TelemetryController_idle.js
deleted file mode 100644
index ca5d1820b3..0000000000
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryController_idle.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Check that TelemetrySession notifies correctly on idle-daily.
-
-Cu.import("resource://testing-common/httpd.js", this);
-Cu.import("resource://gre/modules/PromiseUtils.jsm", this);
-Cu.import("resource://gre/modules/Services.jsm", this);
-Cu.import("resource://gre/modules/Task.jsm", this);
-Cu.import("resource://gre/modules/TelemetryStorage.jsm", this);
-Cu.import("resource://gre/modules/TelemetryController.jsm", this);
-Cu.import("resource://gre/modules/TelemetrySession.jsm", this);
-Cu.import("resource://gre/modules/TelemetrySend.jsm", this);
-
-const PREF_FHR_UPLOAD_ENABLED = "datareporting.healthreport.uploadEnabled";
-
-var gHttpServer = null;
-
-add_task(function* test_setup() {
- do_get_profile();
-
- // Make sure we don't generate unexpected pings due to pref changes.
- yield setEmptyPrefWatchlist();
-
- Services.prefs.setBoolPref(PREF_TELEMETRY_ENABLED, true);
- Services.prefs.setBoolPref(PREF_FHR_UPLOAD_ENABLED, true);
-
- // Start the webserver to check if the pending ping correctly arrives.
- gHttpServer = new HttpServer();
- gHttpServer.start(-1);
-});
-
-add_task(function* testSendPendingOnIdleDaily() {
- // Create a valid pending ping.
- const PENDING_PING = {
- id: "2133234d-4ea1-44f4-909e-ce8c6c41e0fc",
- type: "test-ping",
- version: 4,
- application: {},
- payload: {},
- };
- yield TelemetryStorage.savePing(PENDING_PING, true);
-
- // Telemetry will not send this ping at startup, because it's not overdue.
- yield TelemetryController.testSetup();
- TelemetrySend.setServer("http://localhost:" + gHttpServer.identity.primaryPort);
-
- let pendingPromise = new Promise(resolve =>
- gHttpServer.registerPrefixHandler("/submit/telemetry/", request => resolve(request)));
-
- let gatherPromise = PromiseUtils.defer();
- Services.obs.addObserver(gatherPromise.resolve, "gather-telemetry", false);
-
- // Check that we are correctly receiving the gather-telemetry notification.
- TelemetrySession.observe(null, "idle-daily", null);
- yield gatherPromise;
- Assert.ok(true, "Received gather-telemetry notification.");
-
- Services.obs.removeObserver(gatherPromise.resolve, "gather-telemetry");
-
- // Check that the pending ping is correctly received.
- let ns = {};
- let module = Cu.import("resource://gre/modules/TelemetrySend.jsm", ns);
- module.TelemetrySendImpl.observe(null, "idle-daily", null);
- let request = yield pendingPromise;
- let ping = decodeRequestPayload(request);
-
- // Validate the ping data.
- Assert.equal(ping.id, PENDING_PING.id);
- Assert.equal(ping.type, PENDING_PING.type);
-
- yield new Promise(resolve => gHttpServer.stop(resolve));
-});
diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
deleted file mode 100644
index 2518a80ba1..0000000000
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
+++ /dev/null
@@ -1,1522 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-Cu.import("resource://gre/modules/AddonManager.jsm");
-Cu.import("resource://gre/modules/TelemetryEnvironment.jsm", this);
-Cu.import("resource://gre/modules/Preferences.jsm", this);
-Cu.import("resource://gre/modules/PromiseUtils.jsm", this);
-Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
-Cu.import("resource://testing-common/AddonManagerTesting.jsm");
-Cu.import("resource://testing-common/httpd.js");
-Cu.import("resource://testing-common/MockRegistrar.jsm", this);
-Cu.import("resource://gre/modules/FileUtils.jsm");
-
-// AttributionCode is only needed for Firefox
-XPCOMUtils.defineLazyModuleGetter(this, "AttributionCode",
- "resource:///modules/AttributionCode.jsm");
-
-// Lazy load |LightweightThemeManager|, we won't be using it on Gonk.
-XPCOMUtils.defineLazyModuleGetter(this, "LightweightThemeManager",
- "resource://gre/modules/LightweightThemeManager.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "ProfileAge",
- "resource://gre/modules/ProfileAge.jsm");
-
-// The webserver hosting the addons.
-var gHttpServer = null;
-// The URL of the webserver root.
-var gHttpRoot = null;
-// The URL of the data directory, on the webserver.
-var gDataRoot = null;
-
-const PLATFORM_VERSION = "1.9.2";
-const APP_VERSION = "1";
-const APP_ID = "xpcshell@tests.mozilla.org";
-const APP_NAME = "XPCShell";
-
-const DISTRIBUTION_ID = "distributor-id";
-const DISTRIBUTION_VERSION = "4.5.6b";
-const DISTRIBUTOR_NAME = "Some Distributor";
-const DISTRIBUTOR_CHANNEL = "A Channel";
-const PARTNER_NAME = "test";
-const PARTNER_ID = "NicePartner-ID-3785";
-const DISTRIBUTION_CUSTOMIZATION_COMPLETE_TOPIC = "distribution-customization-complete";
-
-const GFX_VENDOR_ID = "0xabcd";
-const GFX_DEVICE_ID = "0x1234";
-
-// The profile reset date, in milliseconds (Today)
-const PROFILE_RESET_DATE_MS = Date.now();
-// The profile creation date, in milliseconds (Yesterday).
-const PROFILE_CREATION_DATE_MS = PROFILE_RESET_DATE_MS - MILLISECONDS_PER_DAY;
-
-const FLASH_PLUGIN_NAME = "Shockwave Flash";
-const FLASH_PLUGIN_DESC = "A mock flash plugin";
-const FLASH_PLUGIN_VERSION = "\u201c1.1.1.1\u201d";
-const PLUGIN_MIME_TYPE1 = "application/x-shockwave-flash";
-const PLUGIN_MIME_TYPE2 = "text/plain";
-
-const PLUGIN2_NAME = "Quicktime";
-const PLUGIN2_DESC = "A mock Quicktime plugin";
-const PLUGIN2_VERSION = "2.3";
-
-const PERSONA_ID = "3785";
-// Defined by LightweightThemeManager, it is appended to the PERSONA_ID.
-const PERSONA_ID_SUFFIX = "@personas.mozilla.org";
-const PERSONA_NAME = "Test Theme";
-const PERSONA_DESCRIPTION = "A nice theme/persona description.";
-
-const PLUGIN_UPDATED_TOPIC = "plugins-list-updated";
-
-// system add-ons are enabled at startup, so record date when the test starts
-const SYSTEM_ADDON_INSTALL_DATE = Date.now();
-
-// Valid attribution code to write so that settings.attribution can be tested.
-const ATTRIBUTION_CODE = "source%3Dgoogle.com";
-
-/**
- * Used to mock plugin tags in our fake plugin host.
- */
-function PluginTag(aName, aDescription, aVersion, aEnabled) {
- this.name = aName;
- this.description = aDescription;
- this.version = aVersion;
- this.disabled = !aEnabled;
-}
-
-PluginTag.prototype = {
- name: null,
- description: null,
- version: null,
- filename: null,
- fullpath: null,
- disabled: false,
- blocklisted: false,
- clicktoplay: true,
-
- mimeTypes: [ PLUGIN_MIME_TYPE1, PLUGIN_MIME_TYPE2 ],
-
- getMimeTypes: function(count) {
- count.value = this.mimeTypes.length;
- return this.mimeTypes;
- }
-};
-
-// A container for the plugins handled by the fake plugin host.
-var gInstalledPlugins = [
- new PluginTag("Java", "A mock Java plugin", "1.0", false /* Disabled */),
- new PluginTag(FLASH_PLUGIN_NAME, FLASH_PLUGIN_DESC, FLASH_PLUGIN_VERSION, true),
-];
-
-// A fake plugin host for testing plugin telemetry environment.
-var PluginHost = {
- getPluginTags: function(countRef) {
- countRef.value = gInstalledPlugins.length;
- return gInstalledPlugins;
- },
-
- QueryInterface: function(iid) {
- if (iid.equals(Ci.nsIPluginHost)
- || iid.equals(Ci.nsISupports))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
-}
-
-function registerFakePluginHost() {
- MockRegistrar.register("@mozilla.org/plugin/host;1", PluginHost);
-}
-
-var SysInfo = {
- overrides: {},
-
- getProperty(name) {
- // Assert.ok(false, "Mock SysInfo: " + name + ", " + JSON.stringify(this.overrides));
- if (name in this.overrides) {
- return this.overrides[name];
- }
- try {
- return this._genuine.getProperty(name);
- } catch (ex) {
- throw ex;
- }
- },
-
- get(name) {
- return this._genuine.get(name);
- },
-
- QueryInterface(iid) {
- if (iid.equals(Ci.nsIPropertyBag2)
- || iid.equals(Ci.nsISupports))
- return this;
-
- throw Cr.NS_ERROR_NO_INTERFACE;
- }
-};
-
-function registerFakeSysInfo() {
- MockRegistrar.register("@mozilla.org/system-info;1", SysInfo);
-}
-
-function MockAddonWrapper(aAddon) {
- this.addon = aAddon;
-}
-MockAddonWrapper.prototype = {
- get id() {
- return this.addon.id;
- },
-
- get type() {
- return "service";
- },
-
- get appDisabled() {
- return false;
- },
-
- get isCompatible() {
- return true;
- },
-
- get isPlatformCompatible() {
- return true;
- },
-
- get scope() {
- return AddonManager.SCOPE_PROFILE;
- },
-
- get foreignInstall() {
- return false;
- },
-
- get providesUpdatesSecurely() {
- return true;
- },
-
- get blocklistState() {
- return 0; // Not blocked.
- },
-
- get pendingOperations() {
- return AddonManager.PENDING_NONE;
- },
-
- get permissions() {
- return AddonManager.PERM_CAN_UNINSTALL | AddonManager.PERM_CAN_DISABLE;
- },
-
- get isActive() {
- return true;
- },
-
- get name() {
- return this.addon.name;
- },
-
- get version() {
- return this.addon.version;
- },
-
- get creator() {
- return new AddonManagerPrivate.AddonAuthor(this.addon.author);
- },
-
- get userDisabled() {
- return this.appDisabled;
- },
-};
-
-function createMockAddonProvider(aName) {
- let mockProvider = {
- _addons: [],
-
- get name() {
- return aName;
- },
-
- addAddon: function(aAddon) {
- this._addons.push(aAddon);
- AddonManagerPrivate.callAddonListeners("onInstalled", new MockAddonWrapper(aAddon));
- },
-
- getAddonsByTypes: function (aTypes, aCallback) {
- aCallback(this._addons.map(a => new MockAddonWrapper(a)));
- },
-
- shutdown() {
- return Promise.resolve();
- },
- };
-
- return mockProvider;
-}
-
-/**
- * Used to spoof the Persona Id.
- */
-function spoofTheme(aId, aName, aDesc) {
- return {
- id: aId,
- name: aName,
- description: aDesc,
- headerURL: "http://lwttest.invalid/a.png",
- footerURL: "http://lwttest.invalid/b.png",
- textcolor: Math.random().toString(),
- accentcolor: Math.random().toString()
- };
-}
-
-function spoofGfxAdapter() {
- try {
- let gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfoDebug);
- gfxInfo.spoofVendorID(GFX_VENDOR_ID);
- gfxInfo.spoofDeviceID(GFX_DEVICE_ID);
- } catch (x) {
- // If we can't test gfxInfo, that's fine, we'll note it later.
- }
-}
-
-function spoofProfileReset() {
- let profileAccessor = new ProfileAge();
-
- return profileAccessor.writeTimes({
- created: PROFILE_CREATION_DATE_MS,
- reset: PROFILE_RESET_DATE_MS
- });
-}
-
-function spoofPartnerInfo() {
- let prefsToSpoof = {};
- prefsToSpoof["distribution.id"] = DISTRIBUTION_ID;
- prefsToSpoof["distribution.version"] = DISTRIBUTION_VERSION;
- prefsToSpoof["app.distributor"] = DISTRIBUTOR_NAME;
- prefsToSpoof["app.distributor.channel"] = DISTRIBUTOR_CHANNEL;
- prefsToSpoof["app.partner.test"] = PARTNER_NAME;
- prefsToSpoof["mozilla.partner.id"] = PARTNER_ID;
-
- // Spoof the preferences.
- for (let pref in prefsToSpoof) {
- Preferences.set(pref, prefsToSpoof[pref]);
- }
-}
-
-function getAttributionFile() {
- let file = Services.dirsvc.get("LocalAppData", Ci.nsIFile);
- file.append("mozilla");
- file.append(AppConstants.MOZ_APP_NAME);
- file.append("postSigningData");
- return file;
-}
-
-function spoofAttributionData() {
- if (gIsWindows) {
- AttributionCode._clearCache();
- let stream = Cc["@mozilla.org/network/file-output-stream;1"].
- createInstance(Ci.nsIFileOutputStream);
- stream.init(getAttributionFile(), -1, -1, 0);
- stream.write(ATTRIBUTION_CODE, ATTRIBUTION_CODE.length);
- }
-}
-
-function cleanupAttributionData() {
- if (gIsWindows) {
- getAttributionFile().remove(false);
- AttributionCode._clearCache();
- }
-}
-
-/**
- * Check that a value is a string and not empty.
- *
- * @param aValue The variable to check.
- * @return True if |aValue| has type "string" and is not empty, False otherwise.
- */
-function checkString(aValue) {
- return (typeof aValue == "string") && (aValue != "");
-}
-
-/**
- * If value is non-null, check if it's a valid string.
- *
- * @param aValue The variable to check.
- * @return True if it's null or a valid string, false if it's non-null and an invalid
- * string.
- */
-function checkNullOrString(aValue) {
- if (aValue) {
- return checkString(aValue);
- } else if (aValue === null) {
- return true;
- }
-
- return false;
-}
-
-/**
- * If value is non-null, check if it's a boolean.
- *
- * @param aValue The variable to check.
- * @return True if it's null or a valid boolean, false if it's non-null and an invalid
- * boolean.
- */
-function checkNullOrBool(aValue) {
- return aValue === null || (typeof aValue == "boolean");
-}
-
-function checkBuildSection(data) {
- const expectedInfo = {
- applicationId: APP_ID,
- applicationName: APP_NAME,
- buildId: gAppInfo.appBuildID,
- version: APP_VERSION,
- vendor: "Mozilla",
- platformVersion: PLATFORM_VERSION,
- xpcomAbi: "noarch-spidermonkey",
- };
-
- Assert.ok("build" in data, "There must be a build section in Environment.");
-
- for (let f in expectedInfo) {
- Assert.ok(checkString(data.build[f]), f + " must be a valid string.");
- Assert.equal(data.build[f], expectedInfo[f], f + " must have the correct value.");
- }
-
- // Make sure architecture is in the environment.
- Assert.ok(checkString(data.build.architecture));
-
- if (gIsMac) {
- let macUtils = Cc["@mozilla.org/xpcom/mac-utils;1"].getService(Ci.nsIMacUtils);
- if (macUtils && macUtils.isUniversalBinary) {
- Assert.ok(checkString(data.build.architecturesInBinary));
- }
- }
-}
-
-function checkSettingsSection(data) {
- const EXPECTED_FIELDS_TYPES = {
- blocklistEnabled: "boolean",
- e10sEnabled: "boolean",
- e10sCohort: "string",
- telemetryEnabled: "boolean",
- locale: "string",
- update: "object",
- userPrefs: "object",
- };
-
- Assert.ok("settings" in data, "There must be a settings section in Environment.");
-
- for (let f in EXPECTED_FIELDS_TYPES) {
- Assert.equal(typeof data.settings[f], EXPECTED_FIELDS_TYPES[f],
- f + " must have the correct type.");
- }
-
- // Check "addonCompatibilityCheckEnabled" separately, as it is not available
- // on Gonk.
- if (gIsGonk) {
- Assert.ok(!("addonCompatibilityCheckEnabled" in data.settings), "Must not be available on Gonk.");
- } else {
- Assert.equal(data.settings.addonCompatibilityCheckEnabled, AddonManager.checkCompatibility);
- }
-
- // Check "isDefaultBrowser" separately, as it is not available on Android an can either be
- // null or boolean on other platforms.
- if (gIsAndroid) {
- Assert.ok(!("isDefaultBrowser" in data.settings), "Must not be available on Android.");
- } else {
- Assert.ok(checkNullOrBool(data.settings.isDefaultBrowser));
- }
-
- // Check "channel" separately, as it can either be null or string.
- let update = data.settings.update;
- Assert.ok(checkNullOrString(update.channel));
- Assert.equal(typeof update.enabled, "boolean");
- Assert.equal(typeof update.autoDownload, "boolean");
-
- // Check "defaultSearchEngine" separately, as it can either be undefined or string.
- if ("defaultSearchEngine" in data.settings) {
- checkString(data.settings.defaultSearchEngine);
- Assert.equal(typeof data.settings.defaultSearchEngineData, "object");
- }
-
- if ("attribution" in data.settings) {
- Assert.equal(typeof data.settings.attribution, "object");
- Assert.equal(data.settings.attribution.source, "google.com");
- }
-}
-
-function checkProfileSection(data) {
- Assert.ok("profile" in data, "There must be a profile section in Environment.");
- Assert.equal(data.profile.creationDate, truncateToDays(PROFILE_CREATION_DATE_MS));
- Assert.equal(data.profile.resetDate, truncateToDays(PROFILE_RESET_DATE_MS));
-}
-
-function checkPartnerSection(data, isInitial) {
- const EXPECTED_FIELDS = {
- distributionId: DISTRIBUTION_ID,
- distributionVersion: DISTRIBUTION_VERSION,
- partnerId: PARTNER_ID,
- distributor: DISTRIBUTOR_NAME,
- distributorChannel: DISTRIBUTOR_CHANNEL,
- };
-
- Assert.ok("partner" in data, "There must be a partner section in Environment.");
-
- for (let f in EXPECTED_FIELDS) {
- let expected = isInitial ? null : EXPECTED_FIELDS[f];
- Assert.strictEqual(data.partner[f], expected, f + " must have the correct value.");
- }
-
- // Check that "partnerNames" exists and contains the correct element.
- Assert.ok(Array.isArray(data.partner.partnerNames));
- if (isInitial) {
- Assert.equal(data.partner.partnerNames.length, 0);
- } else {
- Assert.ok(data.partner.partnerNames.includes(PARTNER_NAME));
- }
-}
-
-function checkGfxAdapter(data) {
- const EXPECTED_ADAPTER_FIELDS_TYPES = {
- description: "string",
- vendorID: "string",
- deviceID: "string",
- subsysID: "string",
- RAM: "number",
- driver: "string",
- driverVersion: "string",
- driverDate: "string",
- GPUActive: "boolean",
- };
-
- for (let f in EXPECTED_ADAPTER_FIELDS_TYPES) {
- Assert.ok(f in data, f + " must be available.");
-
- if (data[f]) {
- // Since we have a non-null value, check if it has the correct type.
- Assert.equal(typeof data[f], EXPECTED_ADAPTER_FIELDS_TYPES[f],
- f + " must have the correct type.");
- }
- }
-}
-
-function checkSystemSection(data) {
- const EXPECTED_FIELDS = [ "memoryMB", "cpu", "os", "hdd", "gfx" ];
- const EXPECTED_HDD_FIELDS = [ "profile", "binary", "system" ];
-
- Assert.ok("system" in data, "There must be a system section in Environment.");
-
- // Make sure we have all the top level sections and fields.
- for (let f of EXPECTED_FIELDS) {
- Assert.ok(f in data.system, f + " must be available.");
- }
-
- Assert.ok(Number.isFinite(data.system.memoryMB), "MemoryMB must be a number.");
-
- if (gIsWindows || gIsMac || gIsLinux) {
- let EXTRA_CPU_FIELDS = ["cores", "model", "family", "stepping",
- "l2cacheKB", "l3cacheKB", "speedMHz", "vendor"];
-
- for (let f of EXTRA_CPU_FIELDS) {
- // Note this is testing TelemetryEnvironment.js only, not that the
- // values are valid - null is the fallback.
- Assert.ok(f in data.system.cpu, f + " must be available under cpu.");
- }
-
- if (gIsWindows) {
- Assert.equal(typeof data.system.isWow64, "boolean",
- "isWow64 must be available on Windows and have the correct type.");
- Assert.ok("virtualMaxMB" in data.system, "virtualMaxMB must be available.");
- Assert.ok(Number.isFinite(data.system.virtualMaxMB),
- "virtualMaxMB must be a number.");
- }
-
- // We insist these are available
- for (let f of ["cores"]) {
- Assert.ok(!(f in data.system.cpu) ||
- Number.isFinite(data.system.cpu[f]),
- f + " must be a number if non null.");
- }
-
- // These should be numbers if they are not null
- for (let f of ["model", "family", "stepping", "l2cacheKB",
- "l3cacheKB", "speedMHz"]) {
- Assert.ok(!(f in data.system.cpu) ||
- data.system.cpu[f] === null ||
- Number.isFinite(data.system.cpu[f]),
- f + " must be a number if non null.");
- }
- }
-
- let cpuData = data.system.cpu;
- Assert.ok(Number.isFinite(cpuData.count), "CPU count must be a number.");
- Assert.ok(Array.isArray(cpuData.extensions), "CPU extensions must be available.");
-
- // Device data is only available on Android or Gonk.
- if (gIsAndroid || gIsGonk) {
- let deviceData = data.system.device;
- Assert.ok(checkNullOrString(deviceData.model));
- Assert.ok(checkNullOrString(deviceData.manufacturer));
- Assert.ok(checkNullOrString(deviceData.hardware));
- Assert.ok(checkNullOrBool(deviceData.isTablet));
- }
-
- let osData = data.system.os;
- Assert.ok(checkNullOrString(osData.name));
- Assert.ok(checkNullOrString(osData.version));
- Assert.ok(checkNullOrString(osData.locale));
-
- // Service pack is only available on Windows.
- if (gIsWindows) {
- Assert.ok(Number.isFinite(osData["servicePackMajor"]),
- "ServicePackMajor must be a number.");
- Assert.ok(Number.isFinite(osData["servicePackMinor"]),
- "ServicePackMinor must be a number.");
- if ("windowsBuildNumber" in osData) {
- // This might not be available on all Windows platforms.
- Assert.ok(Number.isFinite(osData["windowsBuildNumber"]),
- "windowsBuildNumber must be a number.");
- }
- if ("windowsUBR" in osData) {
- // This might not be available on all Windows platforms.
- Assert.ok((osData["windowsUBR"] === null) || Number.isFinite(osData["windowsUBR"]),
- "windowsUBR must be null or a number.");
- }
- } else if (gIsAndroid || gIsGonk) {
- Assert.ok(checkNullOrString(osData.kernelVersion));
- }
-
- let check = gIsWindows ? checkString : checkNullOrString;
- for (let disk of EXPECTED_HDD_FIELDS) {
- Assert.ok(check(data.system.hdd[disk].model));
- Assert.ok(check(data.system.hdd[disk].revision));
- }
-
- let gfxData = data.system.gfx;
- Assert.ok("D2DEnabled" in gfxData);
- Assert.ok("DWriteEnabled" in gfxData);
- // DWriteVersion is disabled due to main thread jank and will be enabled
- // again as part of bug 1154500.
- // Assert.ok("DWriteVersion" in gfxData);
- if (gIsWindows) {
- Assert.equal(typeof gfxData.D2DEnabled, "boolean");
- Assert.equal(typeof gfxData.DWriteEnabled, "boolean");
- // As above, will be enabled again as part of bug 1154500.
- // Assert.ok(checkString(gfxData.DWriteVersion));
- }
-
- Assert.ok("adapters" in gfxData);
- Assert.ok(gfxData.adapters.length > 0, "There must be at least one GFX adapter.");
- for (let adapter of gfxData.adapters) {
- checkGfxAdapter(adapter);
- }
- Assert.equal(typeof gfxData.adapters[0].GPUActive, "boolean");
- Assert.ok(gfxData.adapters[0].GPUActive, "The first GFX adapter must be active.");
-
- Assert.ok(Array.isArray(gfxData.monitors));
- if (gIsWindows || gIsMac) {
- Assert.ok(gfxData.monitors.length >= 1, "There is at least one monitor.");
- Assert.equal(typeof gfxData.monitors[0].screenWidth, "number");
- Assert.equal(typeof gfxData.monitors[0].screenHeight, "number");
- if (gIsWindows) {
- Assert.equal(typeof gfxData.monitors[0].refreshRate, "number");
- Assert.equal(typeof gfxData.monitors[0].pseudoDisplay, "boolean");
- }
- if (gIsMac) {
- Assert.equal(typeof gfxData.monitors[0].scale, "number");
- }
- }
-
- Assert.equal(typeof gfxData.features, "object");
- Assert.equal(typeof gfxData.features.compositor, "string");
-
- try {
- // If we've not got nsIGfxInfoDebug, then this will throw and stop us doing
- // this test.
- let gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfoDebug);
-
- if (gIsWindows || gIsMac) {
- Assert.equal(GFX_VENDOR_ID, gfxData.adapters[0].vendorID);
- Assert.equal(GFX_DEVICE_ID, gfxData.adapters[0].deviceID);
- }
-
- let features = gfxInfo.getFeatures();
- Assert.equal(features.compositor, gfxData.features.compositor);
- Assert.equal(features.opengl, gfxData.features.opengl);
- Assert.equal(features.webgl, gfxData.features.webgl);
- }
- catch (e) {}
-}
-
-function checkActiveAddon(data) {
- let signedState = mozinfo.addon_signing ? "number" : "undefined";
- // system add-ons have an undefined signState
- if (data.isSystem)
- signedState = "undefined";
-
- const EXPECTED_ADDON_FIELDS_TYPES = {
- blocklisted: "boolean",
- name: "string",
- userDisabled: "boolean",
- appDisabled: "boolean",
- version: "string",
- scope: "number",
- type: "string",
- foreignInstall: "boolean",
- hasBinaryComponents: "boolean",
- installDay: "number",
- updateDay: "number",
- signedState: signedState,
- isSystem: "boolean",
- };
-
- for (let f in EXPECTED_ADDON_FIELDS_TYPES) {
- Assert.ok(f in data, f + " must be available.");
- Assert.equal(typeof data[f], EXPECTED_ADDON_FIELDS_TYPES[f],
- f + " must have the correct type.");
- }
-
- // We check "description" separately, as it can be null.
- Assert.ok(checkNullOrString(data.description));
-}
-
-function checkPlugin(data) {
- const EXPECTED_PLUGIN_FIELDS_TYPES = {
- name: "string",
- version: "string",
- description: "string",
- blocklisted: "boolean",
- disabled: "boolean",
- clicktoplay: "boolean",
- updateDay: "number",
- };
-
- for (let f in EXPECTED_PLUGIN_FIELDS_TYPES) {
- Assert.ok(f in data, f + " must be available.");
- Assert.equal(typeof data[f], EXPECTED_PLUGIN_FIELDS_TYPES[f],
- f + " must have the correct type.");
- }
-
- Assert.ok(Array.isArray(data.mimeTypes));
- for (let type of data.mimeTypes) {
- Assert.ok(checkString(type));
- }
-}
-
-function checkTheme(data) {
- // "hasBinaryComponents" is not available when testing.
- const EXPECTED_THEME_FIELDS_TYPES = {
- id: "string",
- blocklisted: "boolean",
- name: "string",
- userDisabled: "boolean",
- appDisabled: "boolean",
- version: "string",
- scope: "number",
- foreignInstall: "boolean",
- installDay: "number",
- updateDay: "number",
- };
-
- for (let f in EXPECTED_THEME_FIELDS_TYPES) {
- Assert.ok(f in data, f + " must be available.");
- Assert.equal(typeof data[f], EXPECTED_THEME_FIELDS_TYPES[f],
- f + " must have the correct type.");
- }
-
- // We check "description" separately, as it can be null.
- Assert.ok(checkNullOrString(data.description));
-}
-
-function checkActiveGMPlugin(data) {
- // GMP plugin version defaults to null until GMPDownloader runs to update it.
- if (data.version) {
- Assert.equal(typeof data.version, "string");
- }
- Assert.equal(typeof data.userDisabled, "boolean");
- Assert.equal(typeof data.applyBackgroundUpdates, "number");
-}
-
-function checkAddonsSection(data, expectBrokenAddons) {
- const EXPECTED_FIELDS = [
- "activeAddons", "theme", "activePlugins", "activeGMPlugins", "activeExperiment",
- "persona",
- ];
-
- Assert.ok("addons" in data, "There must be an addons section in Environment.");
- for (let f of EXPECTED_FIELDS) {
- Assert.ok(f in data.addons, f + " must be available.");
- }
-
- // Check the active addons, if available.
- if (!expectBrokenAddons) {
- let activeAddons = data.addons.activeAddons;
- for (let addon in activeAddons) {
- checkActiveAddon(activeAddons[addon]);
- }
- }
-
- // Check "theme" structure.
- if (Object.keys(data.addons.theme).length !== 0) {
- checkTheme(data.addons.theme);
- }
-
- // Check the active plugins.
- Assert.ok(Array.isArray(data.addons.activePlugins));
- for (let plugin of data.addons.activePlugins) {
- checkPlugin(plugin);
- }
-
- // Check active GMPlugins
- let activeGMPlugins = data.addons.activeGMPlugins;
- for (let gmPlugin in activeGMPlugins) {
- checkActiveGMPlugin(activeGMPlugins[gmPlugin]);
- }
-
- // Check the active Experiment
- let experiment = data.addons.activeExperiment;
- if (Object.keys(experiment).length !== 0) {
- Assert.ok(checkString(experiment.id));
- Assert.ok(checkString(experiment.branch));
- }
-
- // Check persona
- Assert.ok(checkNullOrString(data.addons.persona));
-}
-
-function checkEnvironmentData(data, isInitial = false, expectBrokenAddons = false) {
- checkBuildSection(data);
- checkSettingsSection(data);
- checkProfileSection(data);
- checkPartnerSection(data, isInitial);
- checkSystemSection(data);
- checkAddonsSection(data, expectBrokenAddons);
-}
-
-add_task(function* setup() {
- // Load a custom manifest to provide search engine loading from JAR files.
- do_load_manifest("chrome.manifest");
- registerFakeSysInfo();
- spoofGfxAdapter();
- do_get_profile();
-
- // The system add-on must be installed before AddonManager is started.
- const distroDir = FileUtils.getDir("ProfD", ["sysfeatures", "app0"], true);
- do_get_file("system.xpi").copyTo(distroDir, "tel-system-xpi@tests.mozilla.org.xpi");
- let system_addon = FileUtils.File(distroDir.path);
- system_addon.append("tel-system-xpi@tests.mozilla.org.xpi");
- system_addon.lastModifiedTime = SYSTEM_ADDON_INSTALL_DATE;
- loadAddonManager(APP_ID, APP_NAME, APP_VERSION, PLATFORM_VERSION);
-
- // Spoof the persona ID, but not on Gonk.
- if (!gIsGonk) {
- LightweightThemeManager.currentTheme =
- spoofTheme(PERSONA_ID, PERSONA_NAME, PERSONA_DESCRIPTION);
- }
- // Register a fake plugin host for consistent flash version data.
- registerFakePluginHost();
-
- // Setup a webserver to serve Addons, Plugins, etc.
- gHttpServer = new HttpServer();
- gHttpServer.start(-1);
- let port = gHttpServer.identity.primaryPort;
- gHttpRoot = "http://localhost:" + port + "/";
- gDataRoot = gHttpRoot + "data/";
- gHttpServer.registerDirectory("/data/", do_get_cwd());
- do_register_cleanup(() => gHttpServer.stop(() => {}));
-
- // Create the attribution data file, so that settings.attribution will exist.
- // The attribution functionality only exists in Firefox.
- if (AppConstants.MOZ_BUILD_APP == "browser") {
- spoofAttributionData();
- do_register_cleanup(cleanupAttributionData);
- }
-
- yield spoofProfileReset();
- TelemetryEnvironment.delayedInit();
-});
-
-add_task(function* test_checkEnvironment() {
- let environmentData = yield TelemetryEnvironment.onInitialized();
- checkEnvironmentData(environmentData, true);
-
- spoofPartnerInfo();
- Services.obs.notifyObservers(null, DISTRIBUTION_CUSTOMIZATION_COMPLETE_TOPIC, null);
-
- environmentData = TelemetryEnvironment.currentEnvironment;
- checkEnvironmentData(environmentData);
-});
-
-add_task(function* test_prefWatchPolicies() {
- const PREF_TEST_1 = "toolkit.telemetry.test.pref_new";
- const PREF_TEST_2 = "toolkit.telemetry.test.pref1";
- const PREF_TEST_3 = "toolkit.telemetry.test.pref2";
- const PREF_TEST_4 = "toolkit.telemetry.test.pref_old";
- const PREF_TEST_5 = "toolkit.telemetry.test.requiresRestart";
-
- const expectedValue = "some-test-value";
- const unexpectedValue = "unexpected-test-value";
-
- const PREFS_TO_WATCH = new Map([
- [PREF_TEST_1, {what: TelemetryEnvironment.RECORD_PREF_VALUE}],
- [PREF_TEST_2, {what: TelemetryEnvironment.RECORD_PREF_STATE}],
- [PREF_TEST_3, {what: TelemetryEnvironment.RECORD_PREF_STATE}],
- [PREF_TEST_4, {what: TelemetryEnvironment.RECORD_PREF_VALUE}],
- [PREF_TEST_5, {what: TelemetryEnvironment.RECORD_PREF_VALUE, requiresRestart: true}],
- ]);
-
- Preferences.set(PREF_TEST_4, expectedValue);
- Preferences.set(PREF_TEST_5, expectedValue);
-
- // Set the Environment preferences to watch.
- TelemetryEnvironment.testWatchPreferences(PREFS_TO_WATCH);
- let deferred = PromiseUtils.defer();
-
- // Check that the pref values are missing or present as expected
- Assert.strictEqual(TelemetryEnvironment.currentEnvironment.settings.userPrefs[PREF_TEST_1], undefined);
- Assert.strictEqual(TelemetryEnvironment.currentEnvironment.settings.userPrefs[PREF_TEST_4], expectedValue);
- Assert.strictEqual(TelemetryEnvironment.currentEnvironment.settings.userPrefs[PREF_TEST_5], expectedValue);
-
- TelemetryEnvironment.registerChangeListener("testWatchPrefs",
- (reason, data) => deferred.resolve(data));
- let oldEnvironmentData = TelemetryEnvironment.currentEnvironment;
-
- // Trigger a change in the watched preferences.
- Preferences.set(PREF_TEST_1, expectedValue);
- Preferences.set(PREF_TEST_2, false);
- Preferences.set(PREF_TEST_5, unexpectedValue);
- let eventEnvironmentData = yield deferred.promise;
-
- // Unregister the listener.
- TelemetryEnvironment.unregisterChangeListener("testWatchPrefs");
-
- // Check environment contains the correct data.
- Assert.deepEqual(oldEnvironmentData, eventEnvironmentData);
- let userPrefs = TelemetryEnvironment.currentEnvironment.settings.userPrefs;
-
- Assert.equal(userPrefs[PREF_TEST_1], expectedValue,
- "Environment contains the correct preference value.");
- Assert.equal(userPrefs[PREF_TEST_2], "<user-set>",
- "Report that the pref was user set but the value is not shown.");
- Assert.ok(!(PREF_TEST_3 in userPrefs),
- "Do not report if preference not user set.");
- Assert.equal(userPrefs[PREF_TEST_5], expectedValue,
- "The pref value in the environment data should still be the same");
-});
-
-add_task(function* test_prefWatch_prefReset() {
- const PREF_TEST = "toolkit.telemetry.test.pref1";
- const PREFS_TO_WATCH = new Map([
- [PREF_TEST, {what: TelemetryEnvironment.RECORD_PREF_STATE}],
- ]);
-
- // Set the preference to a non-default value.
- Preferences.set(PREF_TEST, false);
-
- // Set the Environment preferences to watch.
- TelemetryEnvironment.testWatchPreferences(PREFS_TO_WATCH);
- let deferred = PromiseUtils.defer();
- TelemetryEnvironment.registerChangeListener("testWatchPrefs_reset", deferred.resolve);
-
- Assert.strictEqual(TelemetryEnvironment.currentEnvironment.settings.userPrefs[PREF_TEST], "<user-set>");
-
- // Trigger a change in the watched preferences.
- Preferences.reset(PREF_TEST);
- yield deferred.promise;
-
- Assert.strictEqual(TelemetryEnvironment.currentEnvironment.settings.userPrefs[PREF_TEST], undefined);
-
- // Unregister the listener.
- TelemetryEnvironment.unregisterChangeListener("testWatchPrefs_reset");
-});
-
-add_task(function* test_addonsWatch_InterestingChange() {
- const ADDON_INSTALL_URL = gDataRoot + "restartless.xpi";
- const ADDON_ID = "tel-restartless-xpi@tests.mozilla.org";
- // We only expect a single notification for each install, uninstall, enable, disable.
- const EXPECTED_NOTIFICATIONS = 4;
-
- let receivedNotifications = 0;
-
- let registerCheckpointPromise = (aExpected) => {
- return new Promise(resolve => TelemetryEnvironment.registerChangeListener(
- "testWatchAddons_Changes" + aExpected, (reason, data) => {
- Assert.equal(reason, "addons-changed");
- receivedNotifications++;
- resolve();
- }));
- };
-
- let assertCheckpoint = (aExpected) => {
- Assert.equal(receivedNotifications, aExpected);
- TelemetryEnvironment.unregisterChangeListener("testWatchAddons_Changes" + aExpected);
- };
-
- // Test for receiving one notification after each change.
- let checkpointPromise = registerCheckpointPromise(1);
- yield AddonManagerTesting.installXPIFromURL(ADDON_INSTALL_URL);
- yield checkpointPromise;
- assertCheckpoint(1);
- Assert.ok(ADDON_ID in TelemetryEnvironment.currentEnvironment.addons.activeAddons);
-
- checkpointPromise = registerCheckpointPromise(2);
- let addon = yield AddonManagerTesting.getAddonById(ADDON_ID);
- addon.userDisabled = true;
- yield checkpointPromise;
- assertCheckpoint(2);
- Assert.ok(!(ADDON_ID in TelemetryEnvironment.currentEnvironment.addons.activeAddons));
-
- checkpointPromise = registerCheckpointPromise(3);
- addon.userDisabled = false;
- yield checkpointPromise;
- assertCheckpoint(3);
- Assert.ok(ADDON_ID in TelemetryEnvironment.currentEnvironment.addons.activeAddons);
-
- checkpointPromise = registerCheckpointPromise(4);
- yield AddonManagerTesting.uninstallAddonByID(ADDON_ID);
- yield checkpointPromise;
- assertCheckpoint(4);
- Assert.ok(!(ADDON_ID in TelemetryEnvironment.currentEnvironment.addons.activeAddons));
-
- Assert.equal(receivedNotifications, EXPECTED_NOTIFICATIONS,
- "We must only receive the notifications we expect.");
-});
-
-add_task(function* test_pluginsWatch_Add() {
- if (gIsAndroid) {
- Assert.ok(true, "Skipping: there is no Plugin Manager on Android.");
- return;
- }
-
- Assert.equal(TelemetryEnvironment.currentEnvironment.addons.activePlugins.length, 1);
-
- let newPlugin = new PluginTag(PLUGIN2_NAME, PLUGIN2_DESC, PLUGIN2_VERSION, true);
- gInstalledPlugins.push(newPlugin);
-
- let deferred = PromiseUtils.defer();
- let receivedNotifications = 0;
- let callback = (reason, data) => {
- receivedNotifications++;
- Assert.equal(reason, "addons-changed");
- deferred.resolve();
- };
- TelemetryEnvironment.registerChangeListener("testWatchPlugins_Add", callback);
-
- Services.obs.notifyObservers(null, PLUGIN_UPDATED_TOPIC, null);
- yield deferred.promise;
-
- Assert.equal(TelemetryEnvironment.currentEnvironment.addons.activePlugins.length, 2);
-
- TelemetryEnvironment.unregisterChangeListener("testWatchPlugins_Add");
-
- Assert.equal(receivedNotifications, 1, "We must only receive one notification.");
-});
-
-add_task(function* test_pluginsWatch_Remove() {
- if (gIsAndroid) {
- Assert.ok(true, "Skipping: there is no Plugin Manager on Android.");
- return;
- }
-
- // Find the test plugin.
- let plugin = gInstalledPlugins.find(p => (p.name == PLUGIN2_NAME));
- Assert.ok(plugin, "The test plugin must exist.");
-
- // Remove it from the PluginHost.
- gInstalledPlugins = gInstalledPlugins.filter(p => p != plugin);
-
- let deferred = PromiseUtils.defer();
- let receivedNotifications = 0;
- let callback = () => {
- receivedNotifications++;
- deferred.resolve();
- };
- TelemetryEnvironment.registerChangeListener("testWatchPlugins_Remove", callback);
-
- Services.obs.notifyObservers(null, PLUGIN_UPDATED_TOPIC, null);
- yield deferred.promise;
-
- TelemetryEnvironment.unregisterChangeListener("testWatchPlugins_Remove");
-
- Assert.equal(receivedNotifications, 1, "We must only receive one notification.");
-});
-
-add_task(function* test_addonsWatch_NotInterestingChange() {
- // We are not interested to dictionary addons changes.
- const DICTIONARY_ADDON_INSTALL_URL = gDataRoot + "dictionary.xpi";
- const INTERESTING_ADDON_INSTALL_URL = gDataRoot + "restartless.xpi";
-
- let receivedNotification = false;
- let deferred = PromiseUtils.defer();
- TelemetryEnvironment.registerChangeListener("testNotInteresting",
- () => {
- Assert.ok(!receivedNotification, "Should not receive multiple notifications");
- receivedNotification = true;
- deferred.resolve();
- });
-
- yield AddonManagerTesting.installXPIFromURL(DICTIONARY_ADDON_INSTALL_URL);
- yield AddonManagerTesting.installXPIFromURL(INTERESTING_ADDON_INSTALL_URL);
-
- yield deferred.promise;
- Assert.ok(!("telemetry-dictionary@tests.mozilla.org" in
- TelemetryEnvironment.currentEnvironment.addons.activeAddons),
- "Dictionaries should not appear in active addons.");
-
- TelemetryEnvironment.unregisterChangeListener("testNotInteresting");
-});
-
-add_task(function* test_addonsAndPlugins() {
- const ADDON_INSTALL_URL = gDataRoot + "restartless.xpi";
- const ADDON_ID = "tel-restartless-xpi@tests.mozilla.org";
- const ADDON_INSTALL_DATE = truncateToDays(Date.now());
- const EXPECTED_ADDON_DATA = {
- blocklisted: false,
- description: "A restartless addon which gets enabled without a reboot.",
- name: "XPI Telemetry Restartless Test",
- userDisabled: false,
- appDisabled: false,
- version: "1.0",
- scope: 1,
- type: "extension",
- foreignInstall: false,
- hasBinaryComponents: false,
- installDay: ADDON_INSTALL_DATE,
- updateDay: ADDON_INSTALL_DATE,
- signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_SIGNED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
- isSystem: false,
- };
- const SYSTEM_ADDON_ID = "tel-system-xpi@tests.mozilla.org";
- const EXPECTED_SYSTEM_ADDON_DATA = {
- blocklisted: false,
- description: "A system addon which is shipped with Firefox.",
- name: "XPI Telemetry System Add-on Test",
- userDisabled: false,
- appDisabled: false,
- version: "1.0",
- scope: 1,
- type: "extension",
- foreignInstall: false,
- hasBinaryComponents: false,
- installDay: truncateToDays(SYSTEM_ADDON_INSTALL_DATE),
- updateDay: truncateToDays(SYSTEM_ADDON_INSTALL_DATE),
- signedState: undefined,
- isSystem: true,
- };
-
- const EXPECTED_PLUGIN_DATA = {
- name: FLASH_PLUGIN_NAME,
- version: FLASH_PLUGIN_VERSION,
- description: FLASH_PLUGIN_DESC,
- blocklisted: false,
- disabled: false,
- clicktoplay: true,
- };
-
- // Install an addon so we have some data.
- yield AddonManagerTesting.installXPIFromURL(ADDON_INSTALL_URL);
-
- let data = TelemetryEnvironment.currentEnvironment;
- checkEnvironmentData(data);
-
- // Check addon data.
- Assert.ok(ADDON_ID in data.addons.activeAddons, "We must have one active addon.");
- let targetAddon = data.addons.activeAddons[ADDON_ID];
- for (let f in EXPECTED_ADDON_DATA) {
- Assert.equal(targetAddon[f], EXPECTED_ADDON_DATA[f], f + " must have the correct value.");
- }
-
- // Check system add-on data.
- Assert.ok(SYSTEM_ADDON_ID in data.addons.activeAddons, "We must have one active system addon.");
- let targetSystemAddon = data.addons.activeAddons[SYSTEM_ADDON_ID];
- for (let f in EXPECTED_SYSTEM_ADDON_DATA) {
- Assert.equal(targetSystemAddon[f], EXPECTED_SYSTEM_ADDON_DATA[f], f + " must have the correct value.");
- }
-
- // Check theme data.
- let theme = data.addons.theme;
- Assert.equal(theme.id, (PERSONA_ID + PERSONA_ID_SUFFIX));
- Assert.equal(theme.name, PERSONA_NAME);
- Assert.equal(theme.description, PERSONA_DESCRIPTION);
-
- // Check plugin data.
- Assert.equal(data.addons.activePlugins.length, 1, "We must have only one active plugin.");
- let targetPlugin = data.addons.activePlugins[0];
- for (let f in EXPECTED_PLUGIN_DATA) {
- Assert.equal(targetPlugin[f], EXPECTED_PLUGIN_DATA[f], f + " must have the correct value.");
- }
-
- // Check plugin mime types.
- Assert.ok(targetPlugin.mimeTypes.find(m => m == PLUGIN_MIME_TYPE1));
- Assert.ok(targetPlugin.mimeTypes.find(m => m == PLUGIN_MIME_TYPE2));
- Assert.ok(!targetPlugin.mimeTypes.find(m => m == "Not There."));
-
- let personaId = (gIsGonk) ? null : PERSONA_ID;
- Assert.equal(data.addons.persona, personaId, "The correct Persona Id must be reported.");
-
- // Uninstall the addon.
- yield AddonManagerTesting.uninstallAddonByID(ADDON_ID);
-});
-
-add_task(function* test_signedAddon() {
- const ADDON_INSTALL_URL = gDataRoot + "signed.xpi";
- const ADDON_ID = "tel-signed-xpi@tests.mozilla.org";
- const ADDON_INSTALL_DATE = truncateToDays(Date.now());
- const EXPECTED_ADDON_DATA = {
- blocklisted: false,
- description: "A signed addon which gets enabled without a reboot.",
- name: "XPI Telemetry Signed Test",
- userDisabled: false,
- appDisabled: false,
- version: "1.0",
- scope: 1,
- type: "extension",
- foreignInstall: false,
- hasBinaryComponents: false,
- installDay: ADDON_INSTALL_DATE,
- updateDay: ADDON_INSTALL_DATE,
- signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_SIGNED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
- };
-
- let deferred = PromiseUtils.defer();
- TelemetryEnvironment.registerChangeListener("test_signedAddon", deferred.resolve);
-
- // Install the addon.
- yield AddonManagerTesting.installXPIFromURL(ADDON_INSTALL_URL);
-
- yield deferred.promise;
- // Unregister the listener.
- TelemetryEnvironment.unregisterChangeListener("test_signedAddon");
-
- let data = TelemetryEnvironment.currentEnvironment;
- checkEnvironmentData(data);
-
- // Check addon data.
- Assert.ok(ADDON_ID in data.addons.activeAddons, "Add-on should be in the environment.");
- let targetAddon = data.addons.activeAddons[ADDON_ID];
- for (let f in EXPECTED_ADDON_DATA) {
- Assert.equal(targetAddon[f], EXPECTED_ADDON_DATA[f], f + " must have the correct value.");
- }
-});
-
-add_task(function* test_addonsFieldsLimit() {
- const ADDON_INSTALL_URL = gDataRoot + "long-fields.xpi";
- const ADDON_ID = "tel-longfields-xpi@tests.mozilla.org";
-
- // Install the addon and wait for the TelemetryEnvironment to pick it up.
- let deferred = PromiseUtils.defer();
- TelemetryEnvironment.registerChangeListener("test_longFieldsAddon", deferred.resolve);
- yield AddonManagerTesting.installXPIFromURL(ADDON_INSTALL_URL);
- yield deferred.promise;
- TelemetryEnvironment.unregisterChangeListener("test_longFieldsAddon");
-
- let data = TelemetryEnvironment.currentEnvironment;
- checkEnvironmentData(data);
-
- // Check that the addon is available and that the string fields are limited.
- Assert.ok(ADDON_ID in data.addons.activeAddons, "Add-on should be in the environment.");
- let targetAddon = data.addons.activeAddons[ADDON_ID];
-
- // TelemetryEnvironment limits the length of string fields for activeAddons to 100 chars,
- // to mitigate misbehaving addons.
- Assert.lessOrEqual(targetAddon.version.length, 100,
- "The version string must have been limited");
- Assert.lessOrEqual(targetAddon.name.length, 100,
- "The name string must have been limited");
- Assert.lessOrEqual(targetAddon.description.length, 100,
- "The description string must have been limited");
-});
-
-add_task(function* test_collectionWithbrokenAddonData() {
- const BROKEN_ADDON_ID = "telemetry-test2.example.com@services.mozilla.org";
- const BROKEN_MANIFEST = {
- id: "telemetry-test2.example.com@services.mozilla.org",
- name: "telemetry broken addon",
- origin: "https://telemetry-test2.example.com",
- version: 1, // This is intentionally not a string.
- signedState: AddonManager.SIGNEDSTATE_SIGNED,
- };
-
- const ADDON_INSTALL_URL = gDataRoot + "restartless.xpi";
- const ADDON_ID = "tel-restartless-xpi@tests.mozilla.org";
- const ADDON_INSTALL_DATE = truncateToDays(Date.now());
- const EXPECTED_ADDON_DATA = {
- blocklisted: false,
- description: "A restartless addon which gets enabled without a reboot.",
- name: "XPI Telemetry Restartless Test",
- userDisabled: false,
- appDisabled: false,
- version: "1.0",
- scope: 1,
- type: "extension",
- foreignInstall: false,
- hasBinaryComponents: false,
- installDay: ADDON_INSTALL_DATE,
- updateDay: ADDON_INSTALL_DATE,
- signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_MISSING :
- AddonManager.SIGNEDSTATE_NOT_REQUIRED,
- };
-
- let receivedNotifications = 0;
-
- let registerCheckpointPromise = (aExpected) => {
- return new Promise(resolve => TelemetryEnvironment.registerChangeListener(
- "testBrokenAddon_collection" + aExpected, (reason, data) => {
- Assert.equal(reason, "addons-changed");
- receivedNotifications++;
- resolve();
- }));
- };
-
- let assertCheckpoint = (aExpected) => {
- Assert.equal(receivedNotifications, aExpected);
- TelemetryEnvironment.unregisterChangeListener("testBrokenAddon_collection" + aExpected);
- };
-
- // Register the broken provider and install the broken addon.
- let checkpointPromise = registerCheckpointPromise(1);
- let brokenAddonProvider = createMockAddonProvider("Broken Extensions Provider");
- AddonManagerPrivate.registerProvider(brokenAddonProvider);
- brokenAddonProvider.addAddon(BROKEN_MANIFEST);
- yield checkpointPromise;
- assertCheckpoint(1);
-
- // Now install an addon which returns the correct information.
- checkpointPromise = registerCheckpointPromise(2);
- yield AddonManagerTesting.installXPIFromURL(ADDON_INSTALL_URL);
- yield checkpointPromise;
- assertCheckpoint(2);
-
- // Check that the new environment contains the Social addon installed with the broken
- // manifest and the rest of the data.
- let data = TelemetryEnvironment.currentEnvironment;
- checkEnvironmentData(data, false, true /* expect broken addons*/);
-
- let activeAddons = data.addons.activeAddons;
- Assert.ok(BROKEN_ADDON_ID in activeAddons,
- "The addon with the broken manifest must be reported.");
- Assert.equal(activeAddons[BROKEN_ADDON_ID].version, null,
- "null should be reported for invalid data.");
- Assert.ok(ADDON_ID in activeAddons,
- "The valid addon must be reported.");
- Assert.equal(activeAddons[ADDON_ID].description, EXPECTED_ADDON_DATA.description,
- "The description for the valid addon should be correct.");
-
- // Unregister the broken provider so we don't mess with other tests.
- AddonManagerPrivate.unregisterProvider(brokenAddonProvider);
-
- // Uninstall the valid addon.
- yield AddonManagerTesting.uninstallAddonByID(ADDON_ID);
-});
-
-add_task(function* test_defaultSearchEngine() {
- // Check that no default engine is in the environment before the search service is
- // initialized.
- let data = TelemetryEnvironment.currentEnvironment;
- checkEnvironmentData(data);
- Assert.ok(!("defaultSearchEngine" in data.settings));
- Assert.ok(!("defaultSearchEngineData" in data.settings));
-
- // Load the engines definitions from a custom JAR file: that's needed so that
- // the search provider reports an engine identifier.
- let url = "chrome://testsearchplugin/locale/searchplugins/";
- let resProt = Services.io.getProtocolHandler("resource")
- .QueryInterface(Ci.nsIResProtocolHandler);
- resProt.setSubstitution("search-plugins",
- Services.io.newURI(url, null, null));
-
- // Initialize the search service.
- yield new Promise(resolve => Services.search.init(resolve));
-
- // Our default engine from the JAR file has an identifier. Check if it is correctly
- // reported.
- data = TelemetryEnvironment.currentEnvironment;
- checkEnvironmentData(data);
- Assert.equal(data.settings.defaultSearchEngine, "telemetrySearchIdentifier");
- let expectedSearchEngineData = {
- name: "telemetrySearchIdentifier",
- loadPath: "jar:[other]/searchTest.jar!testsearchplugin/telemetrySearchIdentifier.xml",
- origin: "default",
- submissionURL: "http://ar.wikipedia.org/wiki/%D8%AE%D8%A7%D8%B5:%D8%A8%D8%AD%D8%AB?search=&sourceid=Mozilla-search"
- };
- Assert.deepEqual(data.settings.defaultSearchEngineData, expectedSearchEngineData);
-
- // Remove all the search engines.
- for (let engine of Services.search.getEngines()) {
- Services.search.removeEngine(engine);
- }
- // The search service does not notify "engine-current" when removing a default engine.
- // Manually force the notification.
- // TODO: remove this when bug 1165341 is resolved.
- Services.obs.notifyObservers(null, "browser-search-engine-modified", "engine-current");
-
- // Then check that no default engine is reported if none is available.
- data = TelemetryEnvironment.currentEnvironment;
- checkEnvironmentData(data);
- Assert.equal(data.settings.defaultSearchEngine, "NONE");
- Assert.deepEqual(data.settings.defaultSearchEngineData, {name:"NONE"});
-
- // Add a new search engine (this will have no engine identifier).
- const SEARCH_ENGINE_ID = "telemetry_default";
- const SEARCH_ENGINE_URL = "http://www.example.org/?search={searchTerms}";
- Services.search.addEngineWithDetails(SEARCH_ENGINE_ID, "", null, "", "get", SEARCH_ENGINE_URL);
-
- // Register a new change listener and then wait for the search engine change to be notified.
- let deferred = PromiseUtils.defer();
- TelemetryEnvironment.registerChangeListener("testWatch_SearchDefault", deferred.resolve);
- Services.search.defaultEngine = Services.search.getEngineByName(SEARCH_ENGINE_ID);
- yield deferred.promise;
-
- data = TelemetryEnvironment.currentEnvironment;
- checkEnvironmentData(data);
-
- const EXPECTED_SEARCH_ENGINE = "other-" + SEARCH_ENGINE_ID;
- Assert.equal(data.settings.defaultSearchEngine, EXPECTED_SEARCH_ENGINE);
-
- const EXPECTED_SEARCH_ENGINE_DATA = {
- name: "telemetry_default",
- loadPath: "[other]addEngineWithDetails",
- origin: "verified"
- };
- Assert.deepEqual(data.settings.defaultSearchEngineData, EXPECTED_SEARCH_ENGINE_DATA);
- TelemetryEnvironment.unregisterChangeListener("testWatch_SearchDefault");
-
- // Cleanly install an engine from an xml file, and check if origin is
- // recorded as "verified".
- let promise = new Promise(resolve => {
- TelemetryEnvironment.registerChangeListener("testWatch_SearchDefault", resolve);
- });
- let engine = yield new Promise((resolve, reject) => {
- Services.obs.addObserver(function obs(obsSubject, obsTopic, obsData) {
- try {
- let searchEngine = obsSubject.QueryInterface(Ci.nsISearchEngine);
- do_print("Observed " + obsData + " for " + searchEngine.name);
- if (obsData != "engine-added" || searchEngine.name != "engine-telemetry") {
- return;
- }
-
- Services.obs.removeObserver(obs, "browser-search-engine-modified");
- resolve(searchEngine);
- } catch (ex) {
- reject(ex);
- }
- }, "browser-search-engine-modified", false);
- Services.search.addEngine("file://" + do_get_cwd().path + "/engine.xml",
- null, null, false);
- });
- Services.search.defaultEngine = engine;
- yield promise;
- TelemetryEnvironment.unregisterChangeListener("testWatch_SearchDefault");
- data = TelemetryEnvironment.currentEnvironment;
- checkEnvironmentData(data);
- Assert.deepEqual(data.settings.defaultSearchEngineData,
- {"name":"engine-telemetry", "loadPath":"[other]/engine.xml", "origin":"verified"});
-
- // Now break this engine's load path hash.
- promise = new Promise(resolve => {
- TelemetryEnvironment.registerChangeListener("testWatch_SearchDefault", resolve);
- });
- engine.wrappedJSObject.setAttr("loadPathHash", "broken");
- Services.obs.notifyObservers(null, "browser-search-engine-modified", "engine-current");
- yield promise;
- TelemetryEnvironment.unregisterChangeListener("testWatch_SearchDefault");
- data = TelemetryEnvironment.currentEnvironment;
- Assert.equal(data.settings.defaultSearchEngineData.origin, "invalid");
- Services.search.removeEngine(engine);
-
- // Define and reset the test preference.
- const PREF_TEST = "toolkit.telemetry.test.pref1";
- const PREFS_TO_WATCH = new Map([
- [PREF_TEST, {what: TelemetryEnvironment.RECORD_PREF_STATE}],
- ]);
- Preferences.reset(PREF_TEST);
-
- // Watch the test preference.
- TelemetryEnvironment.testWatchPreferences(PREFS_TO_WATCH);
- deferred = PromiseUtils.defer();
- TelemetryEnvironment.registerChangeListener("testSearchEngine_pref", deferred.resolve);
- // Trigger an environment change.
- Preferences.set(PREF_TEST, 1);
- yield deferred.promise;
- TelemetryEnvironment.unregisterChangeListener("testSearchEngine_pref");
-
- // Check that the search engine information is correctly retained when prefs change.
- data = TelemetryEnvironment.currentEnvironment;
- checkEnvironmentData(data);
- Assert.equal(data.settings.defaultSearchEngine, EXPECTED_SEARCH_ENGINE);
-
- // Check that by default we are not sending a cohort identifier...
- Assert.equal(data.settings.searchCohort, undefined);
-
- // ... but that if a cohort identifier is set, we send it.
- Services.prefs.setCharPref("browser.search.cohort", "testcohort");
- Services.obs.notifyObservers(null, "browser-search-service", "init-complete");
- data = TelemetryEnvironment.currentEnvironment;
- Assert.equal(data.settings.searchCohort, "testcohort");
-});
-
-add_task(function* test_osstrings() {
- // First test that numbers in sysinfo properties are converted to string fields
- // in system.os.
- SysInfo.overrides = {
- version: 1,
- name: 2,
- kernel_version: 3,
- };
-
- yield TelemetryEnvironment.testCleanRestart().onInitialized();
- let data = TelemetryEnvironment.currentEnvironment;
- checkEnvironmentData(data);
-
- Assert.equal(data.system.os.version, "1");
- Assert.equal(data.system.os.name, "2");
- if (AppConstants.platform == "android") {
- Assert.equal(data.system.os.kernelVersion, "3");
- }
-
- // Check that null values are also handled.
- SysInfo.overrides = {
- version: null,
- name: null,
- kernel_version: null,
- };
-
- yield TelemetryEnvironment.testCleanRestart().onInitialized();
- data = TelemetryEnvironment.currentEnvironment;
- checkEnvironmentData(data);
-
- Assert.equal(data.system.os.version, null);
- Assert.equal(data.system.os.name, null);
- if (AppConstants.platform == "android") {
- Assert.equal(data.system.os.kernelVersion, null);
- }
-
- // Clean up.
- SysInfo.overrides = {};
- yield TelemetryEnvironment.testCleanRestart().onInitialized();
-});
-
-add_task(function* test_environmentShutdown() {
- // Define and reset the test preference.
- const PREF_TEST = "toolkit.telemetry.test.pref1";
- const PREFS_TO_WATCH = new Map([
- [PREF_TEST, {what: TelemetryEnvironment.RECORD_PREF_STATE}],
- ]);
- Preferences.reset(PREF_TEST);
-
- // Set up the preferences and listener, then the trigger shutdown
- TelemetryEnvironment.testWatchPreferences(PREFS_TO_WATCH);
- TelemetryEnvironment.registerChangeListener("test_environmentShutdownChange", () => {
- // Register a new change listener that asserts if change is propogated
- Assert.ok(false, "No change should be propagated after shutdown.");
- });
- TelemetryEnvironment.shutdown();
-
- // Flipping the test preference after shutdown should not trigger the listener
- Preferences.set(PREF_TEST, 1);
-
- // Unregister the listener.
- TelemetryEnvironment.unregisterChangeListener("test_environmentShutdownChange");
-});
diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryEvents.js b/toolkit/components/telemetry/tests/unit/test_TelemetryEvents.js
deleted file mode 100644
index 2bfb62c147..0000000000
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryEvents.js
+++ /dev/null
@@ -1,249 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
-*/
-
-const OPTIN = Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN;
-const OPTOUT = Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTOUT;
-
-function checkEventFormat(events) {
- Assert.ok(Array.isArray(events), "Events should be serialized to an array.");
- for (let e of events) {
- Assert.ok(Array.isArray(e), "Event should be an array.");
- Assert.greaterOrEqual(e.length, 4, "Event should have at least 4 elements.");
- Assert.lessOrEqual(e.length, 6, "Event should have at most 6 elements.");
-
- Assert.equal(typeof(e[0]), "number", "Element 0 should be a number.");
- Assert.equal(typeof(e[1]), "string", "Element 1 should be a string.");
- Assert.equal(typeof(e[2]), "string", "Element 2 should be a string.");
- Assert.equal(typeof(e[3]), "string", "Element 3 should be a string.");
-
- if (e.length > 4) {
- Assert.ok(e[4] === null || typeof(e[4]) == "string",
- "Event element 4 should be null or a string.");
- }
- if (e.length > 5) {
- Assert.ok(e[5] === null || typeof(e[5]) == "object",
- "Event element 5 should be null or an object.");
- }
-
- let extra = e[5];
- if (extra) {
- Assert.ok(Object.keys(extra).every(k => typeof(k) == "string"),
- "All extra keys should be strings.");
- Assert.ok(Object.values(extra).every(v => typeof(v) == "string"),
- "All extra values should be strings.");
- }
- }
-}
-
-add_task(function* test_recording() {
- Telemetry.clearEvents();
-
- // Record some events.
- let expected = [
- {optout: false, event: ["telemetry.test", "test1", "object1"]},
- {optout: false, event: ["telemetry.test", "test2", "object2"]},
-
- {optout: false, event: ["telemetry.test", "test1", "object1", "value"]},
- {optout: false, event: ["telemetry.test", "test1", "object1", "value", null]},
- {optout: false, event: ["telemetry.test", "test1", "object1", null, {"key1": "value1"}]},
- {optout: false, event: ["telemetry.test", "test1", "object1", "value", {"key1": "value1", "key2": "value2"}]},
-
- {optout: true, event: ["telemetry.test", "optout", "object1"]},
- {optout: false, event: ["telemetry.test.second", "test", "object1"]},
- {optout: false, event: ["telemetry.test.second", "test", "object1", null, {"key1": "value1"}]},
- ];
-
- for (let entry of expected) {
- entry.tsBefore = Math.floor(Telemetry.msSinceProcessStart());
- try {
- Telemetry.recordEvent(...entry.event);
- } catch (ex) {
- Assert.ok(false, `Failed to record event ${JSON.stringify(entry.event)}: ${ex}`);
- }
- entry.tsAfter = Math.floor(Telemetry.msSinceProcessStart());
- }
-
- // Strip off trailing null values to match the serialized events.
- for (let entry of expected) {
- let e = entry.event;
- while ((e.length >= 3) && (e[e.length - 1] === null)) {
- e.pop();
- }
- }
-
- // The following should not result in any recorded events.
- Assert.throws(() => Telemetry.recordEvent("unknown.category", "test1", "object1"),
- /Error: Unknown event: \["unknown.category", "test1", "object1"\]/,
- "Should throw on unknown category.");
- Assert.throws(() => Telemetry.recordEvent("telemetry.test", "unknown", "object1"),
- /Error: Unknown event: \["telemetry.test", "unknown", "object1"\]/,
- "Should throw on unknown method.");
- Assert.throws(() => Telemetry.recordEvent("telemetry.test", "test1", "unknown"),
- /Error: Unknown event: \["telemetry.test", "test1", "unknown"\]/,
- "Should throw on unknown object.");
-
- let checkEvents = (events, expectedEvents) => {
- checkEventFormat(events);
- Assert.equal(events.length, expectedEvents.length,
- "Snapshot should have the right number of events.");
-
- for (let i = 0; i < events.length; ++i) {
- let {tsBefore, tsAfter} = expectedEvents[i];
- let ts = events[i][0];
- Assert.greaterOrEqual(ts, tsBefore, "The recorded timestamp should be greater than the one before recording.");
- Assert.lessOrEqual(ts, tsAfter, "The recorded timestamp should be less than the one after recording.");
-
- let recordedData = events[i].slice(1);
- let expectedData = expectedEvents[i].event.slice();
- Assert.deepEqual(recordedData, expectedData, "The recorded event data should match.");
- }
- };
-
- // Check that the expected events were recorded.
- let events = Telemetry.snapshotBuiltinEvents(OPTIN, false);
- checkEvents(events, expected);
-
- // Check serializing only opt-out events.
- events = Telemetry.snapshotBuiltinEvents(OPTOUT, false);
- filtered = expected.filter(e => e.optout == true);
- checkEvents(events, filtered);
-});
-
-add_task(function* test_clear() {
- Telemetry.clearEvents();
-
- const COUNT = 10;
- for (let i = 0; i < COUNT; ++i) {
- Telemetry.recordEvent("telemetry.test", "test1", "object1");
- Telemetry.recordEvent("telemetry.test.second", "test", "object1");
- }
-
- // Check that events were recorded.
- // The events are cleared by passing the respective flag.
- let events = Telemetry.snapshotBuiltinEvents(OPTIN, true);
- Assert.equal(events.length, 2 * COUNT, `Should have recorded ${2 * COUNT} events.`);
-
- // Now the events should be cleared.
- events = Telemetry.snapshotBuiltinEvents(OPTIN, false);
- Assert.equal(events.length, 0, `Should have cleared the events.`);
-});
-
-add_task(function* test_expiry() {
- Telemetry.clearEvents();
-
- // Recording call with event that is expired by version.
- Telemetry.recordEvent("telemetry.test", "expired_version", "object1");
- let events = Telemetry.snapshotBuiltinEvents(OPTIN, true);
- Assert.equal(events.length, 0, "Should not record event with expired version.");
-
- // Recording call with event that is expired by date.
- Telemetry.recordEvent("telemetry.test", "expired_date", "object1");
- events = Telemetry.snapshotBuiltinEvents(OPTIN, true);
- Assert.equal(events.length, 0, "Should not record event with expired date.");
-
- // Recording call with event that has expiry_version and expiry_date in the future.
- Telemetry.recordEvent("telemetry.test", "not_expired_optout", "object1");
- events = Telemetry.snapshotBuiltinEvents(OPTOUT, true);
- Assert.equal(events.length, 1, "Should record event when date and version are not expired.");
-});
-
-add_task(function* test_invalidParams() {
- Telemetry.clearEvents();
-
- // Recording call with wrong type for value argument.
- Telemetry.recordEvent("telemetry.test", "test1", "object1", 1);
- let events = Telemetry.snapshotBuiltinEvents(OPTIN, true);
- Assert.equal(events.length, 0, "Should not record event when value argument with invalid type is passed.");
-
- // Recording call with wrong type for extra argument.
- Telemetry.recordEvent("telemetry.test", "test1", "object1", null, "invalid");
- events = Telemetry.snapshotBuiltinEvents(OPTIN, true);
- Assert.equal(events.length, 0, "Should not record event when extra argument with invalid type is passed.");
-
- // Recording call with unknown extra key.
- Telemetry.recordEvent("telemetry.test", "test1", "object1", null, {"key3": "x"});
- events = Telemetry.snapshotBuiltinEvents(OPTIN, true);
- Assert.equal(events.length, 0, "Should not record event when extra argument with invalid key is passed.");
-
- // Recording call with invalid value type.
- Telemetry.recordEvent("telemetry.test", "test1", "object1", null, {"key3": 1});
- events = Telemetry.snapshotBuiltinEvents(OPTIN, true);
- Assert.equal(events.length, 0, "Should not record event when extra argument with invalid value type is passed.");
-});
-
-add_task(function* test_storageLimit() {
- Telemetry.clearEvents();
-
- // Record more events than the storage limit allows.
- let LIMIT = 1000;
- let COUNT = LIMIT + 10;
- for (let i = 0; i < COUNT; ++i) {
- Telemetry.recordEvent("telemetry.test", "test1", "object1", String(i));
- }
-
- // Check that the right events were recorded.
- let events = Telemetry.snapshotBuiltinEvents(OPTIN, true);
- Assert.equal(events.length, LIMIT, `Should have only recorded ${LIMIT} events`);
- Assert.ok(events.every((e, idx) => e[4] === String(idx)),
- "Should have recorded all events from before hitting the limit.");
-});
-
-add_task(function* test_valueLimits() {
- Telemetry.clearEvents();
-
- // Record values that are at or over the limits for string lengths.
- let LIMIT = 80;
- let expected = [
- ["telemetry.test", "test1", "object1", "a".repeat(LIMIT - 10), null],
- ["telemetry.test", "test1", "object1", "a".repeat(LIMIT ), null],
- ["telemetry.test", "test1", "object1", "a".repeat(LIMIT + 1), null],
- ["telemetry.test", "test1", "object1", "a".repeat(LIMIT + 10), null],
-
- ["telemetry.test", "test1", "object1", null, {key1: "a".repeat(LIMIT - 10)}],
- ["telemetry.test", "test1", "object1", null, {key1: "a".repeat(LIMIT )}],
- ["telemetry.test", "test1", "object1", null, {key1: "a".repeat(LIMIT + 1)}],
- ["telemetry.test", "test1", "object1", null, {key1: "a".repeat(LIMIT + 10)}],
- ];
-
- for (let event of expected) {
- Telemetry.recordEvent(...event);
- if (event[3]) {
- event[3] = event[3].substr(0, LIMIT);
- }
- if (event[4]) {
- event[4].key1 = event[4].key1.substr(0, LIMIT);
- }
- }
-
- // Strip off trailing null values to match the serialized events.
- for (let e of expected) {
- while ((e.length >= 3) && (e[e.length - 1] === null)) {
- e.pop();
- }
- }
-
- // Check that the right events were recorded.
- let events = Telemetry.snapshotBuiltinEvents(OPTIN, true);
- Assert.equal(events.length, expected.length,
- "Should have recorded the expected number of events");
- for (let i = 0; i < expected.length; ++i) {
- Assert.deepEqual(events[i].slice(1), expected[i],
- "Should have recorded the expected event data.");
- }
-});
-
-add_task(function* test_unicodeValues() {
- Telemetry.clearEvents();
-
- // Record string values containing unicode characters.
- let value = "漢語";
- Telemetry.recordEvent("telemetry.test", "test1", "object1", value);
- Telemetry.recordEvent("telemetry.test", "test1", "object1", null, {"key1": value});
-
- // Check that the values were correctly recorded.
- let events = Telemetry.snapshotBuiltinEvents(OPTIN, true);
- Assert.equal(events.length, 2, "Should have recorded 2 events.");
- Assert.equal(events[0][4], value, "Should have recorded the right value.");
- Assert.equal(events[1][5]["key1"], value, "Should have recorded the right extra value.");
-});
diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryFlagClear.js b/toolkit/components/telemetry/tests/unit/test_TelemetryFlagClear.js
deleted file mode 100644
index 712aceb3bd..0000000000
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryFlagClear.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function run_test()
-{
- let testFlag = Services.telemetry.getHistogramById("TELEMETRY_TEST_FLAG");
- equal(JSON.stringify(testFlag.snapshot().counts), "[1,0,0]", "Original value is correct");
- testFlag.add(1);
- equal(JSON.stringify(testFlag.snapshot().counts), "[0,1,0]", "Value is correct after ping.");
- testFlag.clear();
- equal(JSON.stringify(testFlag.snapshot().counts), "[1,0,0]", "Value is correct after calling clear()");
- testFlag.add(1);
- equal(JSON.stringify(testFlag.snapshot().counts), "[0,1,0]", "Value is correct after ping.");
-}
diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryLateWrites.js b/toolkit/components/telemetry/tests/unit/test_TelemetryLateWrites.js
deleted file mode 100644
index f2b2b3bba4..0000000000
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryLateWrites.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
-*/
-/* A testcase to make sure reading late writes stacks works. */
-
-Cu.import("resource://gre/modules/Services.jsm", this);
-
-// Constants from prio.h for nsIFileOutputStream.init
-const PR_WRONLY = 0x2;
-const PR_CREATE_FILE = 0x8;
-const PR_TRUNCATE = 0x20;
-const RW_OWNER = parseInt("0600", 8);
-
-const STACK_SUFFIX1 = "stack1.txt";
-const STACK_SUFFIX2 = "stack2.txt";
-const STACK_BOGUS_SUFFIX = "bogus.txt";
-const LATE_WRITE_PREFIX = "Telemetry.LateWriteFinal-";
-
-// The names and IDs don't matter, but the format of the IDs does.
-const LOADED_MODULES = {
- '4759A7E6993548C89CAF716A67EC242D00': 'libtest.so',
- 'F77AF15BB8D6419FA875954B4A3506CA00': 'libxul.so',
- '1E2F7FB590424E8F93D60BB88D66B8C500': 'libc.so'
-};
-const N_MODULES = Object.keys(LOADED_MODULES).length;
-
-// Format of individual items is [index, offset-in-library].
-const STACK1 = [
- [ 0, 0 ],
- [ 1, 1 ],
- [ 2, 2 ]
-];
-const STACK2 = [
- [ 0, 0 ],
- [ 1, 5 ],
- [ 2, 10 ],
-];
-// XXX The only error checking is for a zero-sized stack.
-const STACK_BOGUS = [];
-
-function write_string_to_file(file, contents) {
- let ostream = Cc["@mozilla.org/network/safe-file-output-stream;1"]
- .createInstance(Ci.nsIFileOutputStream);
- ostream.init(file, PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE,
- RW_OWNER, ostream.DEFER_OPEN);
- ostream.write(contents, contents.length);
- ostream.QueryInterface(Ci.nsISafeOutputStream).finish();
- ostream.close();
-}
-
-function construct_file(suffix) {
- let profileDirectory = Services.dirsvc.get("ProfD", Ci.nsIFile);
- let file = profileDirectory.clone();
- file.append(LATE_WRITE_PREFIX + suffix);
- return file;
-}
-
-function write_late_writes_file(stack, suffix)
-{
- let file = construct_file(suffix);
- let contents = N_MODULES + "\n";
- for (let id in LOADED_MODULES) {
- contents += id + " " + LOADED_MODULES[id] + "\n";
- }
-
- contents += stack.length + "\n";
- for (let element of stack) {
- contents += element[0] + " " + element[1].toString(16) + "\n";
- }
-
- write_string_to_file(file, contents);
-}
-
-function run_test() {
- do_get_profile();
-
- write_late_writes_file(STACK1, STACK_SUFFIX1);
- write_late_writes_file(STACK2, STACK_SUFFIX2);
- write_late_writes_file(STACK_BOGUS, STACK_BOGUS_SUFFIX);
-
- let lateWrites = Telemetry.lateWrites;
- do_check_true("memoryMap" in lateWrites);
- do_check_eq(lateWrites.memoryMap.length, 0);
- do_check_true("stacks" in lateWrites);
- do_check_eq(lateWrites.stacks.length, 0);
-
- do_test_pending();
- Telemetry.asyncFetchTelemetryData(function () {
- actual_test();
- });
-}
-
-function actual_test() {
- do_check_false(construct_file(STACK_SUFFIX1).exists());
- do_check_false(construct_file(STACK_SUFFIX2).exists());
- do_check_false(construct_file(STACK_BOGUS_SUFFIX).exists());
-
- let lateWrites = Telemetry.lateWrites;
-
- do_check_true("memoryMap" in lateWrites);
- do_check_eq(lateWrites.memoryMap.length, N_MODULES);
- for (let id in LOADED_MODULES) {
- let matchingLibrary = lateWrites.memoryMap.filter(function(library, idx, array) {
- return library[1] == id;
- });
- do_check_eq(matchingLibrary.length, 1);
- let library = matchingLibrary[0]
- let name = library[0];
- do_check_eq(LOADED_MODULES[id], name);
- }
-
- do_check_true("stacks" in lateWrites);
- do_check_eq(lateWrites.stacks.length, 2);
- let uneval_STACKS = [uneval(STACK1), uneval(STACK2)];
- let first_stack = lateWrites.stacks[0];
- let second_stack = lateWrites.stacks[1];
- function stackChecker(canonicalStack) {
- let unevalCanonicalStack = uneval(canonicalStack);
- return function(obj, idx, array) {
- return unevalCanonicalStack == obj;
- }
- }
- do_check_eq(uneval_STACKS.filter(stackChecker(first_stack)).length, 1);
- do_check_eq(uneval_STACKS.filter(stackChecker(second_stack)).length, 1);
-
- do_test_finished();
-}
diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryLockCount.js b/toolkit/components/telemetry/tests/unit/test_TelemetryLockCount.js
deleted file mode 100644
index 808f2f3ec9..0000000000
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryLockCount.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
-*/
-/* A testcase to make sure reading the failed profile lock count works. */
-
-Cu.import("resource://gre/modules/Services.jsm", this);
-
-const LOCK_FILE_NAME = "Telemetry.FailedProfileLocks.txt";
-const N_FAILED_LOCKS = 10;
-
-// Constants from prio.h for nsIFileOutputStream.init
-const PR_WRONLY = 0x2;
-const PR_CREATE_FILE = 0x8;
-const PR_TRUNCATE = 0x20;
-const RW_OWNER = parseInt("0600", 8);
-
-function write_string_to_file(file, contents) {
- let ostream = Cc["@mozilla.org/network/safe-file-output-stream;1"]
- .createInstance(Ci.nsIFileOutputStream);
- ostream.init(file, PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE,
- RW_OWNER, ostream.DEFER_OPEN);
- ostream.write(contents, contents.length);
- ostream.QueryInterface(Ci.nsISafeOutputStream).finish();
- ostream.close();
-}
-
-function construct_file() {
- let profileDirectory = Services.dirsvc.get("ProfD", Ci.nsIFile);
- let file = profileDirectory.clone();
- file.append(LOCK_FILE_NAME);
- return file;
-}
-
-function run_test() {
- do_get_profile();
-
- do_check_eq(Telemetry.failedProfileLockCount, 0);
-
- write_string_to_file(construct_file(), N_FAILED_LOCKS.toString());
-
- // Make sure that we're not eagerly reading the count now that the
- // file exists.
- do_check_eq(Telemetry.failedProfileLockCount, 0);
-
- do_test_pending();
- Telemetry.asyncFetchTelemetryData(actual_test);
-}
-
-function actual_test() {
- do_check_eq(Telemetry.failedProfileLockCount, N_FAILED_LOCKS);
- do_check_false(construct_file().exists());
- do_test_finished();
-}
diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryLog.js b/toolkit/components/telemetry/tests/unit/test_TelemetryLog.js
deleted file mode 100644
index ea37a1bc51..0000000000
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryLog.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-Cu.import("resource://gre/modules/TelemetryLog.jsm", this);
-Cu.import("resource://gre/modules/TelemetrySession.jsm", this);
-
-const TEST_PREFIX = "TEST-";
-const TEST_REGEX = new RegExp("^" + TEST_PREFIX);
-
-function check_event(event, id, data)
-{
- do_print("Checking message " + id);
- do_check_eq(event[0], id);
- do_check_true(event[1] > 0);
-
- if (data === undefined) {
- do_check_true(event.length == 2);
- } else {
- do_check_eq(event.length, data.length + 2);
- for (var i = 0; i < data.length; ++i) {
- do_check_eq(typeof(event[i + 2]), "string");
- do_check_eq(event[i + 2], data[i]);
- }
- }
-}
-
-add_task(function* ()
-{
- do_get_profile();
- // TODO: After Bug 1254550 lands we should not need to set the pref here.
- Services.prefs.setBoolPref(PREF_TELEMETRY_ENABLED, true);
- yield TelemetryController.testSetup();
-
- TelemetryLog.log(TEST_PREFIX + "1", ["val", 123, undefined]);
- TelemetryLog.log(TEST_PREFIX + "2", []);
- TelemetryLog.log(TEST_PREFIX + "3");
-
- var log = TelemetrySession.getPayload().log.filter(function(e) {
- // Only want events that were generated by the test.
- return TEST_REGEX.test(e[0]);
- });
-
- do_check_eq(log.length, 3);
- check_event(log[0], TEST_PREFIX + "1", ["val", "123", "undefined"]);
- check_event(log[1], TEST_PREFIX + "2", []);
- check_event(log[2], TEST_PREFIX + "3", undefined);
- do_check_true(log[0][1] <= log[1][1]);
- do_check_true(log[1][1] <= log[2][1]);
-
- yield TelemetryController.testShutdown();
-});
diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryReportingPolicy.js b/toolkit/components/telemetry/tests/unit/test_TelemetryReportingPolicy.js
deleted file mode 100644
index 68606a98e3..0000000000
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryReportingPolicy.js
+++ /dev/null
@@ -1,268 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Test that TelemetryController sends close to shutdown don't lead
-// to AsyncShutdown timeouts.
-
-"use strict";
-
-Cu.import("resource://gre/modules/Preferences.jsm", this);
-Cu.import("resource://gre/modules/Services.jsm", this);
-Cu.import("resource://gre/modules/TelemetryController.jsm", this);
-Cu.import("resource://gre/modules/TelemetrySend.jsm", this);
-Cu.import("resource://gre/modules/TelemetryReportingPolicy.jsm", this);
-Cu.import("resource://gre/modules/TelemetryUtils.jsm", this);
-Cu.import("resource://gre/modules/Timer.jsm", this);
-Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
-Cu.import("resource://gre/modules/UpdateUtils.jsm", this);
-
-const PREF_BRANCH = "toolkit.telemetry.";
-const PREF_SERVER = PREF_BRANCH + "server";
-
-const TEST_CHANNEL = "TestChannelABC";
-
-const PREF_POLICY_BRANCH = "datareporting.policy.";
-const PREF_BYPASS_NOTIFICATION = PREF_POLICY_BRANCH + "dataSubmissionPolicyBypassNotification";
-const PREF_DATA_SUBMISSION_ENABLED = PREF_POLICY_BRANCH + "dataSubmissionEnabled";
-const PREF_CURRENT_POLICY_VERSION = PREF_POLICY_BRANCH + "currentPolicyVersion";
-const PREF_MINIMUM_POLICY_VERSION = PREF_POLICY_BRANCH + "minimumPolicyVersion";
-const PREF_MINIMUM_CHANNEL_POLICY_VERSION = PREF_MINIMUM_POLICY_VERSION + ".channel-" + TEST_CHANNEL;
-const PREF_ACCEPTED_POLICY_VERSION = PREF_POLICY_BRANCH + "dataSubmissionPolicyAcceptedVersion";
-const PREF_ACCEPTED_POLICY_DATE = PREF_POLICY_BRANCH + "dataSubmissionPolicyNotifiedTime";
-
-function fakeShowPolicyTimeout(set, clear) {
- let reportingPolicy = Cu.import("resource://gre/modules/TelemetryReportingPolicy.jsm");
- reportingPolicy.Policy.setShowInfobarTimeout = set;
- reportingPolicy.Policy.clearShowInfobarTimeout = clear;
-}
-
-function fakeResetAcceptedPolicy() {
- Preferences.reset(PREF_ACCEPTED_POLICY_DATE);
- Preferences.reset(PREF_ACCEPTED_POLICY_VERSION);
-}
-
-function setMinimumPolicyVersion(aNewPolicyVersion) {
- const CHANNEL_NAME = UpdateUtils.getUpdateChannel(false);
- // We might have channel-dependent minimum policy versions.
- const CHANNEL_DEPENDENT_PREF = PREF_MINIMUM_POLICY_VERSION + ".channel-" + CHANNEL_NAME;
-
- // Does the channel-dependent pref exist? If so, set its value.
- if (Preferences.get(CHANNEL_DEPENDENT_PREF, undefined)) {
- Preferences.set(CHANNEL_DEPENDENT_PREF, aNewPolicyVersion);
- return;
- }
-
- // We don't have a channel specific minimu, so set the common one.
- Preferences.set(PREF_MINIMUM_POLICY_VERSION, aNewPolicyVersion);
-}
-
-add_task(function* test_setup() {
- // Addon manager needs a profile directory
- do_get_profile(true);
- loadAddonManager("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
-
- // Make sure we don't generate unexpected pings due to pref changes.
- yield setEmptyPrefWatchlist();
-
- Services.prefs.setBoolPref(PREF_TELEMETRY_ENABLED, true);
- // Don't bypass the notifications in this test, we'll fake it.
- Services.prefs.setBoolPref(PREF_BYPASS_NOTIFICATION, false);
-
- TelemetryReportingPolicy.setup();
-});
-
-add_task(function* test_firstRun() {
- const PREF_FIRST_RUN = "toolkit.telemetry.reportingpolicy.firstRun";
- const FIRST_RUN_TIMEOUT_MSEC = 60 * 1000; // 60s
- const OTHER_RUNS_TIMEOUT_MSEC = 10 * 1000; // 10s
-
- Preferences.reset(PREF_FIRST_RUN);
-
- let startupTimeout = 0;
- fakeShowPolicyTimeout((callback, timeout) => startupTimeout = timeout, () => {});
- TelemetryReportingPolicy.reset();
-
- Services.obs.notifyObservers(null, "sessionstore-windows-restored", null);
- Assert.equal(startupTimeout, FIRST_RUN_TIMEOUT_MSEC,
- "The infobar display timeout should be 60s on the first run.");
-
- // Run again, and check that we actually wait only 10 seconds.
- TelemetryReportingPolicy.reset();
- Services.obs.notifyObservers(null, "sessionstore-windows-restored", null);
- Assert.equal(startupTimeout, OTHER_RUNS_TIMEOUT_MSEC,
- "The infobar display timeout should be 10s on other runs.");
-});
-
-add_task(function* test_prefs() {
- TelemetryReportingPolicy.reset();
-
- let now = fakeNow(2009, 11, 18);
-
- // If the date is not valid (earlier than 2012), we don't regard the policy as accepted.
- TelemetryReportingPolicy.testInfobarShown();
- Assert.ok(!TelemetryReportingPolicy.testIsUserNotified());
- Assert.equal(Preferences.get(PREF_ACCEPTED_POLICY_DATE, null), 0,
- "Invalid dates should not make the policy accepted.");
-
- // Check that the notification date and version are correctly saved to the prefs.
- now = fakeNow(2012, 11, 18);
- TelemetryReportingPolicy.testInfobarShown();
- Assert.equal(Preferences.get(PREF_ACCEPTED_POLICY_DATE, null), now.getTime(),
- "A valid date must correctly be saved.");
-
- // Now that user is notified, check if we are allowed to upload.
- Assert.ok(TelemetryReportingPolicy.canUpload(),
- "We must be able to upload after the policy is accepted.");
-
- // Disable submission and check that we're no longer allowed to upload.
- Preferences.set(PREF_DATA_SUBMISSION_ENABLED, false);
- Assert.ok(!TelemetryReportingPolicy.canUpload(),
- "We must not be able to upload if data submission is disabled.");
-
- // Turn the submission back on.
- Preferences.set(PREF_DATA_SUBMISSION_ENABLED, true);
- Assert.ok(TelemetryReportingPolicy.canUpload(),
- "We must be able to upload if data submission is enabled and the policy was accepted.");
-
- // Set a new minimum policy version and check that user is no longer notified.
- let newMinimum = Preferences.get(PREF_CURRENT_POLICY_VERSION, 1) + 1;
- setMinimumPolicyVersion(newMinimum);
- Assert.ok(!TelemetryReportingPolicy.testIsUserNotified(),
- "A greater minimum policy version must invalidate the policy and disable upload.");
-
- // Eventually accept the policy and make sure user is notified.
- Preferences.set(PREF_CURRENT_POLICY_VERSION, newMinimum);
- TelemetryReportingPolicy.testInfobarShown();
- Assert.ok(TelemetryReportingPolicy.testIsUserNotified(),
- "Accepting the policy again should show the user as notified.");
- Assert.ok(TelemetryReportingPolicy.canUpload(),
- "Accepting the policy again should let us upload data.");
-
- // Set a new, per channel, minimum policy version. Start by setting a test current channel.
- let defaultPrefs = new Preferences({ defaultBranch: true });
- defaultPrefs.set("app.update.channel", TEST_CHANNEL);
-
- // Increase and set the new minimum version, then check that we're not notified anymore.
- newMinimum++;
- Preferences.set(PREF_MINIMUM_CHANNEL_POLICY_VERSION, newMinimum);
- Assert.ok(!TelemetryReportingPolicy.testIsUserNotified(),
- "Increasing the minimum policy version should invalidate the policy.");
-
- // Eventually accept the policy and make sure user is notified.
- Preferences.set(PREF_CURRENT_POLICY_VERSION, newMinimum);
- TelemetryReportingPolicy.testInfobarShown();
- Assert.ok(TelemetryReportingPolicy.testIsUserNotified(),
- "Accepting the policy again should show the user as notified.");
- Assert.ok(TelemetryReportingPolicy.canUpload(),
- "Accepting the policy again should let us upload data.");
-});
-
-add_task(function* test_migratePrefs() {
- const DEPRECATED_FHR_PREFS = {
- "datareporting.policy.dataSubmissionPolicyAccepted": true,
- "datareporting.policy.dataSubmissionPolicyBypassAcceptance": true,
- "datareporting.policy.dataSubmissionPolicyResponseType": "foxyeah",
- "datareporting.policy.dataSubmissionPolicyResponseTime": Date.now().toString(),
- };
-
- // Make sure the preferences are set before setting up the policy.
- for (let name in DEPRECATED_FHR_PREFS) {
- Preferences.set(name, DEPRECATED_FHR_PREFS[name]);
- }
- // Set up the policy.
- TelemetryReportingPolicy.reset();
- // They should have been removed by now.
- for (let name in DEPRECATED_FHR_PREFS) {
- Assert.ok(!Preferences.has(name), name + " should have been removed.");
- }
-});
-
-add_task(function* test_userNotifiedOfCurrentPolicy() {
- fakeResetAcceptedPolicy();
- TelemetryReportingPolicy.reset();
-
- // User should be reported as not notified by default.
- Assert.ok(!TelemetryReportingPolicy.testIsUserNotified(),
- "The initial state should be unnotified.");
-
- // Forcing a policy version should not automatically make the user notified.
- Preferences.set(PREF_ACCEPTED_POLICY_VERSION,
- TelemetryReportingPolicy.DEFAULT_DATAREPORTING_POLICY_VERSION);
- Assert.ok(!TelemetryReportingPolicy.testIsUserNotified(),
- "The default state of the date should have a time of 0 and it should therefore fail");
-
- // Showing the notification bar should make the user notified.
- fakeNow(2012, 11, 11);
- TelemetryReportingPolicy.testInfobarShown();
- Assert.ok(TelemetryReportingPolicy.testIsUserNotified(),
- "Using the proper API causes user notification to report as true.");
-
- // It is assumed that later versions of the policy will incorporate previous
- // ones, therefore this should also return true.
- let newVersion =
- Preferences.get(PREF_CURRENT_POLICY_VERSION, 1) + 1;
- Preferences.set(PREF_ACCEPTED_POLICY_VERSION, newVersion);
- Assert.ok(TelemetryReportingPolicy.testIsUserNotified(),
- "A future version of the policy should pass.");
-
- newVersion =
- Preferences.get(PREF_CURRENT_POLICY_VERSION, 1) - 1;
- Preferences.set(PREF_ACCEPTED_POLICY_VERSION, newVersion);
- Assert.ok(!TelemetryReportingPolicy.testIsUserNotified(),
- "A previous version of the policy should fail.");
-});
-
-add_task(function* test_canSend() {
- const TEST_PING_TYPE = "test-ping";
-
- PingServer.start();
- Preferences.set(PREF_SERVER, "http://localhost:" + PingServer.port);
-
- yield TelemetryController.testReset();
- TelemetryReportingPolicy.reset();
-
- // User should be reported as not notified by default.
- Assert.ok(!TelemetryReportingPolicy.testIsUserNotified(),
- "The initial state should be unnotified.");
-
- // Assert if we receive any ping before the policy is accepted.
- PingServer.registerPingHandler(() => Assert.ok(false, "Should not have received any pings now"));
- yield TelemetryController.submitExternalPing(TEST_PING_TYPE, {});
-
- // Reset the ping handler.
- PingServer.resetPingHandler();
-
- // Fake the infobar: this should also trigger the ping send task.
- TelemetryReportingPolicy.testInfobarShown();
- let ping = yield PingServer.promiseNextPings(1);
- Assert.equal(ping.length, 1, "We should have received one ping.");
- Assert.equal(ping[0].type, TEST_PING_TYPE,
- "We should have received the previous ping.");
-
- // Submit another ping, to make sure it gets sent.
- yield TelemetryController.submitExternalPing(TEST_PING_TYPE, {});
-
- // Get the ping and check its type.
- ping = yield PingServer.promiseNextPings(1);
- Assert.equal(ping.length, 1, "We should have received one ping.");
- Assert.equal(ping[0].type, TEST_PING_TYPE, "We should have received the new ping.");
-
- // Fake a restart with a pending ping.
- yield TelemetryController.addPendingPing(TEST_PING_TYPE, {});
- yield TelemetryController.testReset();
-
- // We should be immediately sending the ping out.
- ping = yield PingServer.promiseNextPings(1);
- Assert.equal(ping.length, 1, "We should have received one ping.");
- Assert.equal(ping[0].type, TEST_PING_TYPE, "We should have received the pending ping.");
-
- // Submit another ping, to make sure it gets sent.
- yield TelemetryController.submitExternalPing(TEST_PING_TYPE, {});
-
- // Get the ping and check its type.
- ping = yield PingServer.promiseNextPings(1);
- Assert.equal(ping.length, 1, "We should have received one ping.");
- Assert.equal(ping[0].type, TEST_PING_TYPE, "We should have received the new ping.");
-
- yield PingServer.stop();
-});
diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryScalars.js b/toolkit/components/telemetry/tests/unit/test_TelemetryScalars.js
deleted file mode 100644
index 5914a42356..0000000000
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryScalars.js
+++ /dev/null
@@ -1,574 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
-*/
-
-const UINT_SCALAR = "telemetry.test.unsigned_int_kind";
-const STRING_SCALAR = "telemetry.test.string_kind";
-const BOOLEAN_SCALAR = "telemetry.test.boolean_kind";
-const KEYED_UINT_SCALAR = "telemetry.test.keyed_unsigned_int";
-
-add_task(function* test_serializationFormat() {
- Telemetry.clearScalars();
-
- // Set the scalars to a known value.
- const expectedUint = 3785;
- const expectedString = "some value";
- Telemetry.scalarSet(UINT_SCALAR, expectedUint);
- Telemetry.scalarSet(STRING_SCALAR, expectedString);
- Telemetry.scalarSet(BOOLEAN_SCALAR, true);
- Telemetry.keyedScalarSet(KEYED_UINT_SCALAR, "first_key", 1234);
-
- // Get a snapshot of the scalars.
- const scalars =
- Telemetry.snapshotScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN);
-
- // Check that they are serialized to the correct format.
- Assert.equal(typeof(scalars[UINT_SCALAR]), "number",
- UINT_SCALAR + " must be serialized to the correct format.");
- Assert.ok(Number.isInteger(scalars[UINT_SCALAR]),
- UINT_SCALAR + " must be a finite integer.");
- Assert.equal(scalars[UINT_SCALAR], expectedUint,
- UINT_SCALAR + " must have the correct value.");
- Assert.equal(typeof(scalars[STRING_SCALAR]), "string",
- STRING_SCALAR + " must be serialized to the correct format.");
- Assert.equal(scalars[STRING_SCALAR], expectedString,
- STRING_SCALAR + " must have the correct value.");
- Assert.equal(typeof(scalars[BOOLEAN_SCALAR]), "boolean",
- BOOLEAN_SCALAR + " must be serialized to the correct format.");
- Assert.equal(scalars[BOOLEAN_SCALAR], true,
- BOOLEAN_SCALAR + " must have the correct value.");
- Assert.ok(!(KEYED_UINT_SCALAR in scalars),
- "Keyed scalars must be reported in a separate section.");
-});
-
-add_task(function* test_keyedSerializationFormat() {
- Telemetry.clearScalars();
-
- const expectedKey = "first_key";
- const expectedOtherKey = "漢語";
- const expectedUint = 3785;
- const expectedOtherValue = 1107;
-
- Telemetry.scalarSet(UINT_SCALAR, expectedUint);
- Telemetry.keyedScalarSet(KEYED_UINT_SCALAR, expectedKey, expectedUint);
- Telemetry.keyedScalarSet(KEYED_UINT_SCALAR, expectedOtherKey, expectedOtherValue);
-
- // Get a snapshot of the scalars.
- const keyedScalars =
- Telemetry.snapshotKeyedScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN);
-
- Assert.ok(!(UINT_SCALAR in keyedScalars),
- UINT_SCALAR + " must not be serialized with the keyed scalars.");
- Assert.ok(KEYED_UINT_SCALAR in keyedScalars,
- KEYED_UINT_SCALAR + " must be serialized with the keyed scalars.");
- Assert.equal(Object.keys(keyedScalars[KEYED_UINT_SCALAR]).length, 2,
- "The keyed scalar must contain exactly 2 keys.");
- Assert.ok(expectedKey in keyedScalars[KEYED_UINT_SCALAR],
- KEYED_UINT_SCALAR + " must contain the expected keys.");
- Assert.ok(expectedOtherKey in keyedScalars[KEYED_UINT_SCALAR],
- KEYED_UINT_SCALAR + " must contain the expected keys.");
- Assert.ok(Number.isInteger(keyedScalars[KEYED_UINT_SCALAR][expectedKey]),
- KEYED_UINT_SCALAR + "." + expectedKey + " must be a finite integer.");
- Assert.equal(keyedScalars[KEYED_UINT_SCALAR][expectedKey], expectedUint,
- KEYED_UINT_SCALAR + "." + expectedKey + " must have the correct value.");
- Assert.equal(keyedScalars[KEYED_UINT_SCALAR][expectedOtherKey], expectedOtherValue,
- KEYED_UINT_SCALAR + "." + expectedOtherKey + " must have the correct value.");
-});
-
-add_task(function* test_nonexistingScalar() {
- const NON_EXISTING_SCALAR = "telemetry.test.non_existing";
-
- Telemetry.clearScalars();
-
- // Make sure we throw on any operation for non-existing scalars.
- Assert.throws(() => Telemetry.scalarAdd(NON_EXISTING_SCALAR, 11715),
- /NS_ERROR_ILLEGAL_VALUE/,
- "Adding to a non existing scalar must throw.");
- Assert.throws(() => Telemetry.scalarSet(NON_EXISTING_SCALAR, 11715),
- /NS_ERROR_ILLEGAL_VALUE/,
- "Setting a non existing scalar must throw.");
- Assert.throws(() => Telemetry.scalarSetMaximum(NON_EXISTING_SCALAR, 11715),
- /NS_ERROR_ILLEGAL_VALUE/,
- "Setting the maximum of a non existing scalar must throw.");
-
- // Make sure we throw on any operation for non-existing scalars.
- Assert.throws(() => Telemetry.keyedScalarAdd(NON_EXISTING_SCALAR, "some_key", 11715),
- /NS_ERROR_ILLEGAL_VALUE/,
- "Adding to a non existing keyed scalar must throw.");
- Assert.throws(() => Telemetry.keyedScalarSet(NON_EXISTING_SCALAR, "some_key", 11715),
- /NS_ERROR_ILLEGAL_VALUE/,
- "Setting a non existing keyed scalar must throw.");
- Assert.throws(() => Telemetry.keyedScalarSetMaximum(NON_EXISTING_SCALAR, "some_key", 11715),
- /NS_ERROR_ILLEGAL_VALUE/,
- "Setting the maximum of a non keyed existing scalar must throw.");
-
- // Get a snapshot of the scalars.
- const scalars =
- Telemetry.snapshotScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN);
-
- Assert.ok(!(NON_EXISTING_SCALAR in scalars), "The non existing scalar must not be persisted.");
-
- const keyedScalars =
- Telemetry.snapshotKeyedScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN);
-
- Assert.ok(!(NON_EXISTING_SCALAR in keyedScalars),
- "The non existing keyed scalar must not be persisted.");
-});
-
-add_task(function* test_expiredScalar() {
- const EXPIRED_SCALAR = "telemetry.test.expired";
- const EXPIRED_KEYED_SCALAR = "telemetry.test.keyed_expired";
- const UNEXPIRED_SCALAR = "telemetry.test.unexpired";
-
- Telemetry.clearScalars();
-
- // Try to set the expired scalar to some value. We will not be recording the value,
- // but we shouldn't throw.
- Telemetry.scalarAdd(EXPIRED_SCALAR, 11715);
- Telemetry.scalarSet(EXPIRED_SCALAR, 11715);
- Telemetry.scalarSetMaximum(EXPIRED_SCALAR, 11715);
- Telemetry.keyedScalarAdd(EXPIRED_KEYED_SCALAR, "some_key", 11715);
- Telemetry.keyedScalarSet(EXPIRED_KEYED_SCALAR, "some_key", 11715);
- Telemetry.keyedScalarSetMaximum(EXPIRED_KEYED_SCALAR, "some_key", 11715);
-
- // The unexpired scalar has an expiration version, but far away in the future.
- const expectedValue = 11716;
- Telemetry.scalarSet(UNEXPIRED_SCALAR, expectedValue);
-
- // Get a snapshot of the scalars.
- const scalars =
- Telemetry.snapshotScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN);
- const keyedScalars =
- Telemetry.snapshotKeyedScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN);
-
- Assert.ok(!(EXPIRED_SCALAR in scalars), "The expired scalar must not be persisted.");
- Assert.equal(scalars[UNEXPIRED_SCALAR], expectedValue,
- "The unexpired scalar must be persisted with the correct value.");
- Assert.ok(!(EXPIRED_KEYED_SCALAR in keyedScalars),
- "The expired keyed scalar must not be persisted.");
-});
-
-add_task(function* test_unsignedIntScalar() {
- let checkScalar = (expectedValue) => {
- const scalars =
- Telemetry.snapshotScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN);
- Assert.equal(scalars[UINT_SCALAR], expectedValue,
- UINT_SCALAR + " must contain the expected value.");
- };
-
- Telemetry.clearScalars();
-
- // Let's start with an accumulation without a prior set.
- Telemetry.scalarAdd(UINT_SCALAR, 1);
- Telemetry.scalarAdd(UINT_SCALAR, 2);
- // Do we get what we expect?
- checkScalar(3);
-
- // Let's test setting the scalar to a value.
- Telemetry.scalarSet(UINT_SCALAR, 3785);
- checkScalar(3785);
- Telemetry.scalarAdd(UINT_SCALAR, 1);
- checkScalar(3786);
-
- // Does setMaximum work?
- Telemetry.scalarSet(UINT_SCALAR, 2);
- checkScalar(2);
- Telemetry.scalarSetMaximum(UINT_SCALAR, 5);
- checkScalar(5);
- // The value of the probe should still be 5, as the previous value
- // is greater than the one we want to set.
- Telemetry.scalarSetMaximum(UINT_SCALAR, 3);
- checkScalar(5);
-
- // Check that non-integer numbers get truncated and set.
- Telemetry.scalarSet(UINT_SCALAR, 3.785);
- checkScalar(3);
-
- // Setting or adding a negative number must report an error through
- // the console and drop the change (shouldn't throw).
- Telemetry.scalarAdd(UINT_SCALAR, -5);
- Telemetry.scalarSet(UINT_SCALAR, -5);
- Telemetry.scalarSetMaximum(UINT_SCALAR, -1);
- checkScalar(3);
-
- // What happens if we try to set a value of a different type?
- Telemetry.scalarSet(UINT_SCALAR, 1);
- Assert.throws(() => Telemetry.scalarSet(UINT_SCALAR, "unexpected value"),
- /NS_ERROR_ILLEGAL_VALUE/,
- "Setting the scalar to an unexpected value type must throw.");
- Assert.throws(() => Telemetry.scalarAdd(UINT_SCALAR, "unexpected value"),
- /NS_ERROR_ILLEGAL_VALUE/,
- "Adding an unexpected value type must throw.");
- Assert.throws(() => Telemetry.scalarSetMaximum(UINT_SCALAR, "unexpected value"),
- /NS_ERROR_ILLEGAL_VALUE/,
- "Setting the scalar to an unexpected value type must throw.");
- // The stored value must not be compromised.
- checkScalar(1);
-});
-
-add_task(function* test_stringScalar() {
- let checkExpectedString = (expectedString) => {
- const scalars =
- Telemetry.snapshotScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN);
- Assert.equal(scalars[STRING_SCALAR], expectedString,
- STRING_SCALAR + " must contain the expected string value.");
- };
-
- Telemetry.clearScalars();
-
- // Let's check simple strings...
- let expected = "test string";
- Telemetry.scalarSet(STRING_SCALAR, expected);
- checkExpectedString(expected);
- expected = "漢語";
- Telemetry.scalarSet(STRING_SCALAR, expected);
- checkExpectedString(expected);
-
- // We have some unsupported operations for strings.
- Assert.throws(() => Telemetry.scalarAdd(STRING_SCALAR, 1),
- /NS_ERROR_NOT_AVAILABLE/,
- "Using an unsupported operation must throw.");
- Assert.throws(() => Telemetry.scalarAdd(STRING_SCALAR, "string value"),
- /NS_ERROR_NOT_AVAILABLE/,
- "Using an unsupported operation must throw.");
- Assert.throws(() => Telemetry.scalarSetMaximum(STRING_SCALAR, 1),
- /NS_ERROR_NOT_AVAILABLE/,
- "Using an unsupported operation must throw.");
- Assert.throws(() => Telemetry.scalarSetMaximum(STRING_SCALAR, "string value"),
- /NS_ERROR_NOT_AVAILABLE/,
- "Using an unsupported operation must throw.");
- Assert.throws(() => Telemetry.scalarSet(STRING_SCALAR, 1),
- /NS_ERROR_ILLEGAL_VALUE/,
- "The string scalar must throw if we're not setting a string.");
-
- // Try to set the scalar to a string longer than the maximum length limit.
- const LONG_STRING = "browser.qaxfiuosnzmhlg.rpvxicawolhtvmbkpnludhedobxvkjwqyeyvmv";
- Telemetry.scalarSet(STRING_SCALAR, LONG_STRING);
- checkExpectedString(LONG_STRING.substr(0, 50));
-});
-
-add_task(function* test_booleanScalar() {
- let checkExpectedBool = (expectedBoolean) => {
- const scalars =
- Telemetry.snapshotScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN);
- Assert.equal(scalars[BOOLEAN_SCALAR], expectedBoolean,
- BOOLEAN_SCALAR + " must contain the expected boolean value.");
- };
-
- Telemetry.clearScalars();
-
- // Set a test boolean value.
- let expected = false;
- Telemetry.scalarSet(BOOLEAN_SCALAR, expected);
- checkExpectedBool(expected);
- expected = true;
- Telemetry.scalarSet(BOOLEAN_SCALAR, expected);
- checkExpectedBool(expected);
-
- // Check that setting a numeric value implicitly converts to boolean.
- Telemetry.scalarSet(BOOLEAN_SCALAR, 1);
- checkExpectedBool(true);
- Telemetry.scalarSet(BOOLEAN_SCALAR, 0);
- checkExpectedBool(false);
- Telemetry.scalarSet(BOOLEAN_SCALAR, 1.0);
- checkExpectedBool(true);
- Telemetry.scalarSet(BOOLEAN_SCALAR, 0.0);
- checkExpectedBool(false);
-
- // Check that unsupported operations for booleans throw.
- Assert.throws(() => Telemetry.scalarAdd(BOOLEAN_SCALAR, 1),
- /NS_ERROR_NOT_AVAILABLE/,
- "Using an unsupported operation must throw.");
- Assert.throws(() => Telemetry.scalarAdd(BOOLEAN_SCALAR, "string value"),
- /NS_ERROR_NOT_AVAILABLE/,
- "Using an unsupported operation must throw.");
- Assert.throws(() => Telemetry.scalarSetMaximum(BOOLEAN_SCALAR, 1),
- /NS_ERROR_NOT_AVAILABLE/,
- "Using an unsupported operation must throw.");
- Assert.throws(() => Telemetry.scalarSetMaximum(BOOLEAN_SCALAR, "string value"),
- /NS_ERROR_NOT_AVAILABLE/,
- "Using an unsupported operation must throw.");
- Assert.throws(() => Telemetry.scalarSet(BOOLEAN_SCALAR, "true"),
- /NS_ERROR_ILLEGAL_VALUE/,
- "The boolean scalar must throw if we're not setting a boolean.");
-});
-
-add_task(function* test_scalarRecording() {
- const OPTIN_SCALAR = "telemetry.test.release_optin";
- const OPTOUT_SCALAR = "telemetry.test.release_optout";
-
- let checkValue = (scalarName, expectedValue) => {
- const scalars =
- Telemetry.snapshotScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN);
- Assert.equal(scalars[scalarName], expectedValue,
- scalarName + " must contain the expected value.");
- };
-
- let checkNotSerialized = (scalarName) => {
- const scalars =
- Telemetry.snapshotScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN);
- Assert.ok(!(scalarName in scalars), scalarName + " was not recorded.");
- };
-
- Telemetry.canRecordBase = false;
- Telemetry.canRecordExtended = false;
- Telemetry.clearScalars();
-
- // Check that no scalar is recorded if both base and extended recording are off.
- Telemetry.scalarSet(OPTOUT_SCALAR, 3);
- Telemetry.scalarSet(OPTIN_SCALAR, 3);
- checkNotSerialized(OPTOUT_SCALAR);
- checkNotSerialized(OPTIN_SCALAR);
-
- // Check that opt-out scalars are recorded, while opt-in are not.
- Telemetry.canRecordBase = true;
- Telemetry.scalarSet(OPTOUT_SCALAR, 3);
- Telemetry.scalarSet(OPTIN_SCALAR, 3);
- checkValue(OPTOUT_SCALAR, 3);
- checkNotSerialized(OPTIN_SCALAR);
-
- // Check that both opt-out and opt-in scalars are recorded.
- Telemetry.canRecordExtended = true;
- Telemetry.scalarSet(OPTOUT_SCALAR, 5);
- Telemetry.scalarSet(OPTIN_SCALAR, 6);
- checkValue(OPTOUT_SCALAR, 5);
- checkValue(OPTIN_SCALAR, 6);
-});
-
-add_task(function* test_keyedScalarRecording() {
- const OPTIN_SCALAR = "telemetry.test.keyed_release_optin";
- const OPTOUT_SCALAR = "telemetry.test.keyed_release_optout";
- const testKey = "policy_key";
-
- let checkValue = (scalarName, expectedValue) => {
- const scalars =
- Telemetry.snapshotKeyedScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN);
- Assert.equal(scalars[scalarName][testKey], expectedValue,
- scalarName + " must contain the expected value.");
- };
-
- let checkNotSerialized = (scalarName) => {
- const scalars =
- Telemetry.snapshotKeyedScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN);
- Assert.ok(!(scalarName in scalars), scalarName + " was not recorded.");
- };
-
- Telemetry.canRecordBase = false;
- Telemetry.canRecordExtended = false;
- Telemetry.clearScalars();
-
- // Check that no scalar is recorded if both base and extended recording are off.
- Telemetry.keyedScalarSet(OPTOUT_SCALAR, testKey, 3);
- Telemetry.keyedScalarSet(OPTIN_SCALAR, testKey, 3);
- checkNotSerialized(OPTOUT_SCALAR);
- checkNotSerialized(OPTIN_SCALAR);
-
- // Check that opt-out scalars are recorded, while opt-in are not.
- Telemetry.canRecordBase = true;
- Telemetry.keyedScalarSet(OPTOUT_SCALAR, testKey, 3);
- Telemetry.keyedScalarSet(OPTIN_SCALAR, testKey, 3);
- checkValue(OPTOUT_SCALAR, 3);
- checkNotSerialized(OPTIN_SCALAR);
-
- // Check that both opt-out and opt-in scalars are recorded.
- Telemetry.canRecordExtended = true;
- Telemetry.keyedScalarSet(OPTOUT_SCALAR, testKey, 5);
- Telemetry.keyedScalarSet(OPTIN_SCALAR, testKey, 6);
- checkValue(OPTOUT_SCALAR, 5);
- checkValue(OPTIN_SCALAR, 6);
-});
-
-add_task(function* test_subsession() {
- Telemetry.clearScalars();
-
- // Set the scalars to a known value.
- Telemetry.scalarSet(UINT_SCALAR, 3785);
- Telemetry.scalarSet(STRING_SCALAR, "some value");
- Telemetry.scalarSet(BOOLEAN_SCALAR, false);
- Telemetry.keyedScalarSet(KEYED_UINT_SCALAR, "some_random_key", 12);
-
- // Get a snapshot and reset the subsession. The value we set must be there.
- let scalars =
- Telemetry.snapshotScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, true);
- let keyedScalars =
- Telemetry.snapshotKeyedScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, true);
-
- Assert.equal(scalars[UINT_SCALAR], 3785,
- UINT_SCALAR + " must contain the expected value.");
- Assert.equal(scalars[STRING_SCALAR], "some value",
- STRING_SCALAR + " must contain the expected value.");
- Assert.equal(scalars[BOOLEAN_SCALAR], false,
- BOOLEAN_SCALAR + " must contain the expected value.");
- Assert.equal(keyedScalars[KEYED_UINT_SCALAR]["some_random_key"], 12,
- KEYED_UINT_SCALAR + " must contain the expected value.");
-
- // Get a new snapshot and reset the subsession again. Since no new value
- // was set, the scalars should not be reported.
- scalars =
- Telemetry.snapshotScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, true);
- keyedScalars =
- Telemetry.snapshotKeyedScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, true);
-
- Assert.ok(!(UINT_SCALAR in scalars), UINT_SCALAR + " must be empty and not reported.");
- Assert.ok(!(STRING_SCALAR in scalars), STRING_SCALAR + " must be empty and not reported.");
- Assert.ok(!(BOOLEAN_SCALAR in scalars), BOOLEAN_SCALAR + " must be empty and not reported.");
- Assert.ok(!(KEYED_UINT_SCALAR in keyedScalars), KEYED_UINT_SCALAR + " must be empty and not reported.");
-});
-
-add_task(function* test_keyed_uint() {
- Telemetry.clearScalars();
-
- const KEYS = [ "a_key", "another_key", "third_key" ];
- let expectedValues = [ 1, 1, 1 ];
-
- // Set all the keys to a baseline value.
- for (let key of KEYS) {
- Telemetry.keyedScalarSet(KEYED_UINT_SCALAR, key, 1);
- }
-
- // Increment only one key.
- Telemetry.keyedScalarAdd(KEYED_UINT_SCALAR, KEYS[1], 1);
- expectedValues[1]++;
-
- // Use SetMaximum on the third key.
- Telemetry.keyedScalarSetMaximum(KEYED_UINT_SCALAR, KEYS[2], 37);
- expectedValues[2] = 37;
-
- // Get a snapshot of the scalars and make sure the keys contain
- // the correct values.
- const keyedScalars =
- Telemetry.snapshotKeyedScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN);
-
- for (let k = 0; k < 3; k++) {
- const keyName = KEYS[k];
- Assert.equal(keyedScalars[KEYED_UINT_SCALAR][keyName], expectedValues[k],
- KEYED_UINT_SCALAR + "." + keyName + " must contain the correct value.");
- }
-
- // Are we still throwing when doing unsupported things on uint keyed scalars?
- // Just test one single unsupported operation, the other are covered in the plain
- // unsigned scalar test.
- Assert.throws(() => Telemetry.scalarSet(KEYED_UINT_SCALAR, "new_key", "unexpected value"),
- /NS_ERROR_ILLEGAL_VALUE/,
- "Setting the scalar to an unexpected value type must throw.");
-});
-
-add_task(function* test_keyed_boolean() {
- Telemetry.clearScalars();
-
- const KEYED_BOOLEAN_TYPE = "telemetry.test.keyed_boolean_kind";
- const first_key = "first_key";
- const second_key = "second_key";
-
- // Set the initial values.
- Telemetry.keyedScalarSet(KEYED_BOOLEAN_TYPE, first_key, true);
- Telemetry.keyedScalarSet(KEYED_BOOLEAN_TYPE, second_key, false);
-
- // Get a snapshot of the scalars and make sure the keys contain
- // the correct values.
- let keyedScalars =
- Telemetry.snapshotKeyedScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN);
- Assert.equal(keyedScalars[KEYED_BOOLEAN_TYPE][first_key], true,
- "The key must contain the expected value.");
- Assert.equal(keyedScalars[KEYED_BOOLEAN_TYPE][second_key], false,
- "The key must contain the expected value.");
-
- // Now flip the values and make sure we get the expected values back.
- Telemetry.keyedScalarSet(KEYED_BOOLEAN_TYPE, first_key, false);
- Telemetry.keyedScalarSet(KEYED_BOOLEAN_TYPE, second_key, true);
-
- keyedScalars =
- Telemetry.snapshotKeyedScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN);
- Assert.equal(keyedScalars[KEYED_BOOLEAN_TYPE][first_key], false,
- "The key must contain the expected value.");
- Assert.equal(keyedScalars[KEYED_BOOLEAN_TYPE][second_key], true,
- "The key must contain the expected value.");
-
- // Are we still throwing when doing unsupported things on a boolean keyed scalars?
- // Just test one single unsupported operation, the other are covered in the plain
- // boolean scalar test.
- Assert.throws(() => Telemetry.keyedScalarAdd(KEYED_BOOLEAN_TYPE, "somehey", 1),
- /NS_ERROR_NOT_AVAILABLE/,
- "Using an unsupported operation must throw.");
-});
-
-add_task(function* test_keyed_keys_length() {
- Telemetry.clearScalars();
-
- const LONG_KEY_STRING =
- "browser.qaxfiuosnzmhlg.rpvxicawolhtvmbkpnludhedobxvkjwqyeyvmv.somemoresowereach70chars";
- const NORMAL_KEY = "a_key";
-
- // Set the value for a key within the length limits.
- Telemetry.keyedScalarSet(KEYED_UINT_SCALAR, NORMAL_KEY, 1);
-
- // Now try to set and modify the value for a very long key.
- Assert.throws(() => Telemetry.keyedScalarAdd(KEYED_UINT_SCALAR, LONG_KEY_STRING, 10),
- /NS_ERROR_ILLEGAL_VALUE/,
- "Using keys longer than 70 characters must throw.");
- Assert.throws(() => Telemetry.keyedScalarSet(KEYED_UINT_SCALAR, LONG_KEY_STRING, 1),
- /NS_ERROR_ILLEGAL_VALUE/,
- "Using keys longer than 70 characters must throw.");
- Assert.throws(() => Telemetry.keyedScalarSetMaximum(KEYED_UINT_SCALAR, LONG_KEY_STRING, 10),
- /NS_ERROR_ILLEGAL_VALUE/,
- "Using keys longer than 70 characters must throw.");
-
- // Make sure the key with the right length contains the expected value.
- let keyedScalars =
- Telemetry.snapshotKeyedScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN);
- Assert.equal(Object.keys(keyedScalars[KEYED_UINT_SCALAR]).length, 1,
- "The keyed scalar must contain exactly 1 key.");
- Assert.ok(NORMAL_KEY in keyedScalars[KEYED_UINT_SCALAR],
- "The keyed scalar must contain the expected key.");
- Assert.equal(keyedScalars[KEYED_UINT_SCALAR][NORMAL_KEY], 1,
- "The key must contain the expected value.");
- Assert.ok(!(LONG_KEY_STRING in keyedScalars[KEYED_UINT_SCALAR]),
- "The data for the long key should not have been recorded.");
-});
-
-add_task(function* test_keyed_max_keys() {
- Telemetry.clearScalars();
-
- // Generate the names for the first 100 keys.
- let keyNamesSet = new Set();
- for (let k = 0; k < 100; k++) {
- keyNamesSet.add("key_" + k);
- }
-
- // Add 100 keys to an histogram and set their initial value.
- let valueToSet = 0;
- keyNamesSet.forEach(keyName => {
- Telemetry.keyedScalarSet(KEYED_UINT_SCALAR, keyName, valueToSet++);
- });
-
- // Perform some operations on the 101th key. This should throw, as
- // we're not allowed to have more than 100 keys.
- const LAST_KEY_NAME = "overflowing_key";
- Assert.throws(() => Telemetry.keyedScalarAdd(KEYED_UINT_SCALAR, LAST_KEY_NAME, 10),
- /NS_ERROR_FAILURE/,
- "Using more than 100 keys must throw.");
- Assert.throws(() => Telemetry.keyedScalarSet(KEYED_UINT_SCALAR, LAST_KEY_NAME, 1),
- /NS_ERROR_FAILURE/,
- "Using more than 100 keys must throw.");
- Assert.throws(() => Telemetry.keyedScalarSetMaximum(KEYED_UINT_SCALAR, LAST_KEY_NAME, 10),
- /NS_ERROR_FAILURE/,
- "Using more than 100 keys must throw.");
-
- // Make sure all the keys except the last one are available and have the correct
- // values.
- let keyedScalars =
- Telemetry.snapshotKeyedScalars(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN);
-
- // Check that the keyed scalar only contain the first 100 keys.
- const reportedKeysSet = new Set(Object.keys(keyedScalars[KEYED_UINT_SCALAR]));
- Assert.ok([...keyNamesSet].filter(x => reportedKeysSet.has(x)) &&
- [...reportedKeysSet].filter(x => keyNamesSet.has(x)),
- "The keyed scalar must contain all the 100 keys, and drop the others.");
-
- // Check that all the keys recorded the expected values.
- let expectedValue = 0;
- keyNamesSet.forEach(keyName => {
- Assert.equal(keyedScalars[KEYED_UINT_SCALAR][keyName], expectedValue++,
- "The key must contain the expected value.");
- });
-});
diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetrySend.js b/toolkit/components/telemetry/tests/unit/test_TelemetrySend.js
deleted file mode 100644
index 88ff8cf44f..0000000000
--- a/toolkit/components/telemetry/tests/unit/test_TelemetrySend.js
+++ /dev/null
@@ -1,427 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
-*/
-
-// This tests the public Telemetry API for submitting pings.
-
-"use strict";
-
-Cu.import("resource://gre/modules/TelemetryController.jsm", this);
-Cu.import("resource://gre/modules/TelemetrySession.jsm", this);
-Cu.import("resource://gre/modules/TelemetrySend.jsm", this);
-Cu.import("resource://gre/modules/TelemetryUtils.jsm", this);
-Cu.import("resource://gre/modules/Services.jsm", this);
-Cu.import("resource://gre/modules/Preferences.jsm", this);
-Cu.import("resource://gre/modules/osfile.jsm", this);
-
-const PREF_TELEMETRY_SERVER = "toolkit.telemetry.server";
-
-const MS_IN_A_MINUTE = 60 * 1000;
-
-function countPingTypes(pings) {
- let countByType = new Map();
- for (let p of pings) {
- countByType.set(p.type, 1 + (countByType.get(p.type) || 0));
- }
- return countByType;
-}
-
-function setPingLastModified(id, timestamp) {
- const path = OS.Path.join(TelemetryStorage.pingDirectoryPath, id);
- return OS.File.setDates(path, null, timestamp);
-}
-
-// Mock out the send timer activity.
-function waitForTimer() {
- return new Promise(resolve => {
- fakePingSendTimer((callback, timeout) => {
- resolve([callback, timeout]);
- }, () => {});
- });
-}
-
-// Allow easy faking of readable ping ids.
-// This helps with debugging issues with e.g. ordering in the send logic.
-function fakePingId(type, number) {
- const HEAD = "93bd0011-2c8f-4e1c-bee0-";
- const TAIL = "000000000000";
- const N = String(number);
- const id = HEAD + type + TAIL.slice(type.length, - N.length) + N;
- fakeGeneratePingId(() => id);
- return id;
-}
-
-var checkPingsSaved = Task.async(function* (pingIds) {
- let allFound = true;
- for (let id of pingIds) {
- const path = OS.Path.join(TelemetryStorage.pingDirectoryPath, id);
- let exists = false;
- try {
- exists = yield OS.File.exists(path);
- } catch (ex) {}
-
- if (!exists) {
- dump("checkPingsSaved - failed to find ping: " + path + "\n");
- allFound = false;
- }
- }
-
- return allFound;
-});
-
-function histogramValueCount(h) {
- return h.counts.reduce((a, b) => a + b);
-}
-
-add_task(function* test_setup() {
- // Trigger a proper telemetry init.
- do_get_profile(true);
- // Make sure we don't generate unexpected pings due to pref changes.
- yield setEmptyPrefWatchlist();
- Services.prefs.setBoolPref(PREF_TELEMETRY_ENABLED, true);
-});
-
-// Test the ping sending logic.
-add_task(function* test_sendPendingPings() {
- const TYPE_PREFIX = "test-sendPendingPings-";
- const TEST_TYPE_A = TYPE_PREFIX + "A";
- const TEST_TYPE_B = TYPE_PREFIX + "B";
-
- const TYPE_A_COUNT = 20;
- const TYPE_B_COUNT = 5;
-
- let histSuccess = Telemetry.getHistogramById("TELEMETRY_SUCCESS");
- let histSendTimeSuccess = Telemetry.getHistogramById("TELEMETRY_SEND_SUCCESS");
- let histSendTimeFail = Telemetry.getHistogramById("TELEMETRY_SEND_FAILURE");
- histSuccess.clear();
- histSendTimeSuccess.clear();
- histSendTimeFail.clear();
-
- // Fake a current date.
- let now = TelemetryUtils.truncateToDays(new Date());
- now = fakeNow(futureDate(now, 10 * 60 * MS_IN_A_MINUTE));
-
- // Enable test-mode for TelemetrySend, otherwise we won't store pending pings
- // before the module is fully initialized later.
- TelemetrySend.setTestModeEnabled(true);
-
- // Submit some pings without the server and telemetry started yet.
- for (let i = 0; i < TYPE_A_COUNT; ++i) {
- fakePingId("a", i);
- const id = yield TelemetryController.submitExternalPing(TEST_TYPE_A, {});
- yield setPingLastModified(id, now.getTime() + (i * 1000));
- }
-
- Assert.equal(TelemetrySend.pendingPingCount, TYPE_A_COUNT,
- "Should have correct pending ping count");
-
- // Submit some more pings of a different type.
- now = fakeNow(futureDate(now, 5 * MS_IN_A_MINUTE));
- for (let i = 0; i < TYPE_B_COUNT; ++i) {
- fakePingId("b", i);
- const id = yield TelemetryController.submitExternalPing(TEST_TYPE_B, {});
- yield setPingLastModified(id, now.getTime() + (i * 1000));
- }
-
- Assert.equal(TelemetrySend.pendingPingCount, TYPE_A_COUNT + TYPE_B_COUNT,
- "Should have correct pending ping count");
-
- Assert.deepEqual(histSuccess.snapshot().counts, [0, 0, 0],
- "Should not have recorded any sending in histograms yet.");
- Assert.equal(histSendTimeSuccess.snapshot().sum, 0,
- "Should not have recorded any sending in histograms yet.");
- Assert.equal(histSendTimeFail.snapshot().sum, 0,
- "Should not have recorded any sending in histograms yet.");
-
- // Now enable sending to the ping server.
- now = fakeNow(futureDate(now, MS_IN_A_MINUTE));
- PingServer.start();
- Preferences.set(PREF_TELEMETRY_SERVER, "http://localhost:" + PingServer.port);
-
- let timerPromise = waitForTimer();
- yield TelemetryController.testReset();
- let [pingSendTimerCallback, pingSendTimeout] = yield timerPromise;
- Assert.ok(!!pingSendTimerCallback, "Should have a timer callback");
-
- // We should have received 10 pings from the first send batch:
- // 5 of type B and 5 of type A, as sending is newest-first.
- // The other pings should be delayed by the 10-pings-per-minute limit.
- let pings = yield PingServer.promiseNextPings(10);
- Assert.equal(TelemetrySend.pendingPingCount, TYPE_A_COUNT - 5,
- "Should have correct pending ping count");
- PingServer.registerPingHandler(() => Assert.ok(false, "Should not have received any pings now"));
- let countByType = countPingTypes(pings);
-
- Assert.equal(countByType.get(TEST_TYPE_B), TYPE_B_COUNT,
- "Should have received the correct amount of type B pings");
- Assert.equal(countByType.get(TEST_TYPE_A), 10 - TYPE_B_COUNT,
- "Should have received the correct amount of type A pings");
-
- Assert.deepEqual(histSuccess.snapshot().counts, [0, 10, 0],
- "Should have recorded sending success in histograms.");
- Assert.equal(histogramValueCount(histSendTimeSuccess.snapshot()), 10,
- "Should have recorded successful send times in histograms.");
- Assert.equal(histogramValueCount(histSendTimeFail.snapshot()), 0,
- "Should not have recorded any failed sending in histograms yet.");
-
- // As we hit the ping send limit and still have pending pings, a send tick should
- // be scheduled in a minute.
- Assert.ok(!!pingSendTimerCallback, "Timer callback should be set");
- Assert.equal(pingSendTimeout, MS_IN_A_MINUTE, "Send tick timeout should be correct");
-
- // Trigger the next tick - we should receive the next 10 type A pings.
- PingServer.resetPingHandler();
- now = fakeNow(futureDate(now, pingSendTimeout));
- timerPromise = waitForTimer();
- pingSendTimerCallback();
- [pingSendTimerCallback, pingSendTimeout] = yield timerPromise;
-
- pings = yield PingServer.promiseNextPings(10);
- PingServer.registerPingHandler(() => Assert.ok(false, "Should not have received any pings now"));
- countByType = countPingTypes(pings);
-
- Assert.equal(countByType.get(TEST_TYPE_A), 10, "Should have received the correct amount of type A pings");
-
- // We hit the ping send limit again and still have pending pings, a send tick should
- // be scheduled in a minute.
- Assert.equal(pingSendTimeout, MS_IN_A_MINUTE, "Send tick timeout should be correct");
-
- // Trigger the next tick - we should receive the remaining type A pings.
- PingServer.resetPingHandler();
- now = fakeNow(futureDate(now, pingSendTimeout));
- yield pingSendTimerCallback();
-
- pings = yield PingServer.promiseNextPings(5);
- PingServer.registerPingHandler(() => Assert.ok(false, "Should not have received any pings now"));
- countByType = countPingTypes(pings);
-
- Assert.equal(countByType.get(TEST_TYPE_A), 5, "Should have received the correct amount of type A pings");
-
- yield TelemetrySend.testWaitOnOutgoingPings();
- PingServer.resetPingHandler();
-});
-
-add_task(function* test_sendDateHeader() {
- fakeNow(new Date(Date.UTC(2011, 1, 1, 11, 0, 0)));
- yield TelemetrySend.reset();
-
- let pingId = yield TelemetryController.submitExternalPing("test-send-date-header", {});
- let req = yield PingServer.promiseNextRequest();
- let ping = decodeRequestPayload(req);
- Assert.equal(req.getHeader("Date"), "Tue, 01 Feb 2011 11:00:00 GMT",
- "Telemetry should send the correct Date header with requests.");
- Assert.equal(ping.id, pingId, "Should have received the correct ping id.");
-});
-
-// Test the backoff timeout behavior after send failures.
-add_task(function* test_backoffTimeout() {
- const TYPE_PREFIX = "test-backoffTimeout-";
- const TEST_TYPE_C = TYPE_PREFIX + "C";
- const TEST_TYPE_D = TYPE_PREFIX + "D";
- const TEST_TYPE_E = TYPE_PREFIX + "E";
-
- let histSuccess = Telemetry.getHistogramById("TELEMETRY_SUCCESS");
- let histSendTimeSuccess = Telemetry.getHistogramById("TELEMETRY_SEND_SUCCESS");
- let histSendTimeFail = Telemetry.getHistogramById("TELEMETRY_SEND_FAILURE");
-
- // Failing a ping send now should trigger backoff behavior.
- let now = fakeNow(2010, 1, 1, 11, 0, 0);
- yield TelemetrySend.reset();
- PingServer.stop();
-
- histSuccess.clear();
- histSendTimeSuccess.clear();
- histSendTimeFail.clear();
-
- fakePingId("c", 0);
- now = fakeNow(futureDate(now, MS_IN_A_MINUTE));
- let sendAttempts = 0;
- let timerPromise = waitForTimer();
- yield TelemetryController.submitExternalPing(TEST_TYPE_C, {});
- let [pingSendTimerCallback, pingSendTimeout] = yield timerPromise;
- Assert.equal(TelemetrySend.pendingPingCount, 1, "Should have one pending ping.");
- ++sendAttempts;
-
- const MAX_BACKOFF_TIMEOUT = 120 * MS_IN_A_MINUTE;
- for (let timeout = 2 * MS_IN_A_MINUTE; timeout <= MAX_BACKOFF_TIMEOUT; timeout *= 2) {
- Assert.ok(!!pingSendTimerCallback, "Should have received a timer callback");
- Assert.equal(pingSendTimeout, timeout, "Send tick timeout should be correct");
-
- let callback = pingSendTimerCallback;
- now = fakeNow(futureDate(now, pingSendTimeout));
- timerPromise = waitForTimer();
- yield callback();
- [pingSendTimerCallback, pingSendTimeout] = yield timerPromise;
- ++sendAttempts;
- }
-
- timerPromise = waitForTimer();
- yield pingSendTimerCallback();
- [pingSendTimerCallback, pingSendTimeout] = yield timerPromise;
- Assert.equal(pingSendTimeout, MAX_BACKOFF_TIMEOUT, "Tick timeout should be capped");
- ++sendAttempts;
-
- Assert.deepEqual(histSuccess.snapshot().counts, [sendAttempts, 0, 0],
- "Should have recorded sending failure in histograms.");
- Assert.equal(histSendTimeSuccess.snapshot().sum, 0,
- "Should not have recorded any sending success in histograms yet.");
- Assert.greater(histSendTimeFail.snapshot().sum, 0,
- "Should have recorded send failure times in histograms.");
- Assert.equal(histogramValueCount(histSendTimeFail.snapshot()), sendAttempts,
- "Should have recorded send failure times in histograms.");
-
- // Submitting a new ping should reset the backoff behavior.
- fakePingId("d", 0);
- now = fakeNow(futureDate(now, MS_IN_A_MINUTE));
- timerPromise = waitForTimer();
- yield TelemetryController.submitExternalPing(TEST_TYPE_D, {});
- [pingSendTimerCallback, pingSendTimeout] = yield timerPromise;
- Assert.equal(pingSendTimeout, 2 * MS_IN_A_MINUTE, "Send tick timeout should be correct");
- sendAttempts += 2;
-
- // With the server running again, we should send out the pending pings immediately
- // when a new ping is submitted.
- PingServer.start();
- TelemetrySend.setServer("http://localhost:" + PingServer.port);
- fakePingId("e", 0);
- now = fakeNow(futureDate(now, MS_IN_A_MINUTE));
- timerPromise = waitForTimer();
- yield TelemetryController.submitExternalPing(TEST_TYPE_E, {});
-
- let pings = yield PingServer.promiseNextPings(3);
- let countByType = countPingTypes(pings);
-
- Assert.equal(countByType.get(TEST_TYPE_C), 1, "Should have received the correct amount of type C pings");
- Assert.equal(countByType.get(TEST_TYPE_D), 1, "Should have received the correct amount of type D pings");
- Assert.equal(countByType.get(TEST_TYPE_E), 1, "Should have received the correct amount of type E pings");
-
- yield TelemetrySend.testWaitOnOutgoingPings();
- Assert.equal(TelemetrySend.pendingPingCount, 0, "Should have no pending pings left");
-
- Assert.deepEqual(histSuccess.snapshot().counts, [sendAttempts, 3, 0],
- "Should have recorded sending failure in histograms.");
- Assert.greater(histSendTimeSuccess.snapshot().sum, 0,
- "Should have recorded sending success in histograms.");
- Assert.equal(histogramValueCount(histSendTimeSuccess.snapshot()), 3,
- "Should have recorded sending success in histograms.");
- Assert.equal(histogramValueCount(histSendTimeFail.snapshot()), sendAttempts,
- "Should have recorded send failure times in histograms.");
-});
-
-add_task(function* test_discardBigPings() {
- const TEST_PING_TYPE = "test-ping-type";
-
- let histSizeExceeded = Telemetry.getHistogramById("TELEMETRY_PING_SIZE_EXCEEDED_SEND");
- let histDiscardedSize = Telemetry.getHistogramById("TELEMETRY_DISCARDED_SEND_PINGS_SIZE_MB");
- let histSuccess = Telemetry.getHistogramById("TELEMETRY_SUCCESS");
- let histSendTimeSuccess = Telemetry.getHistogramById("TELEMETRY_SEND_SUCCESS");
- let histSendTimeFail = Telemetry.getHistogramById("TELEMETRY_SEND_FAILURE");
- for (let h of [histSizeExceeded, histDiscardedSize, histSuccess, histSendTimeSuccess, histSendTimeFail]) {
- h.clear();
- }
-
- // Generate a 2MB string and create an oversized payload.
- const OVERSIZED_PAYLOAD = {"data": generateRandomString(2 * 1024 * 1024)};
-
- // Reset the histograms.
- Telemetry.getHistogramById("TELEMETRY_PING_SIZE_EXCEEDED_SEND").clear();
- Telemetry.getHistogramById("TELEMETRY_DISCARDED_SEND_PINGS_SIZE_MB").clear();
-
- // Submit a ping of a normal size and check that we don't count it in the histogram.
- yield TelemetryController.submitExternalPing(TEST_PING_TYPE, { test: "test" });
- yield TelemetrySend.testWaitOnOutgoingPings();
-
- Assert.equal(histSizeExceeded.snapshot().sum, 0, "Telemetry must report no oversized ping submitted.");
- Assert.equal(histDiscardedSize.snapshot().sum, 0, "Telemetry must report no oversized pings.");
- Assert.deepEqual(histSuccess.snapshot().counts, [0, 1, 0], "Should have recorded sending success.");
- Assert.equal(histogramValueCount(histSendTimeSuccess.snapshot()), 1, "Should have recorded send success time.");
- Assert.greater(histSendTimeSuccess.snapshot().sum, 0, "Should have recorded send success time.");
- Assert.equal(histogramValueCount(histSendTimeFail.snapshot()), 0, "Should not have recorded send failure time.");
-
- // Submit an oversized ping and check that it gets discarded.
- yield TelemetryController.submitExternalPing(TEST_PING_TYPE, OVERSIZED_PAYLOAD);
- yield TelemetrySend.testWaitOnOutgoingPings();
-
- Assert.equal(histSizeExceeded.snapshot().sum, 1, "Telemetry must report 1 oversized ping submitted.");
- Assert.equal(histDiscardedSize.snapshot().counts[2], 1, "Telemetry must report a 2MB, oversized, ping submitted.");
- Assert.deepEqual(histSuccess.snapshot().counts, [0, 1, 0], "Should have recorded sending success.");
- Assert.equal(histogramValueCount(histSendTimeSuccess.snapshot()), 1, "Should have recorded send success time.");
- Assert.greater(histSendTimeSuccess.snapshot().sum, 0, "Should have recorded send success time.");
- Assert.equal(histogramValueCount(histSendTimeFail.snapshot()), 0, "Should not have recorded send failure time.");
-});
-
-add_task(function* test_evictedOnServerErrors() {
- const TEST_TYPE = "test-evicted";
-
- yield TelemetrySend.reset();
-
- let histEvicted = Telemetry.getHistogramById("TELEMETRY_PING_EVICTED_FOR_SERVER_ERRORS");
- let histSuccess = Telemetry.getHistogramById("TELEMETRY_SUCCESS");
- let histSendTimeSuccess = Telemetry.getHistogramById("TELEMETRY_SEND_SUCCESS");
- let histSendTimeFail = Telemetry.getHistogramById("TELEMETRY_SEND_FAILURE");
- for (let h of [histEvicted, histSuccess, histSendTimeSuccess, histSendTimeFail]) {
- h.clear();
- }
-
- // Write a custom ping handler which will return 403. This will trigger ping eviction
- // on client side.
- PingServer.registerPingHandler((req, res) => {
- res.setStatusLine(null, 403, "Forbidden");
- res.processAsync();
- res.finish();
- });
-
- // Clear the histogram and submit a ping.
- let pingId = yield TelemetryController.submitExternalPing(TEST_TYPE, {});
- yield TelemetrySend.testWaitOnOutgoingPings();
-
- Assert.equal(histEvicted.snapshot().sum, 1,
- "Telemetry must report a ping evicted due to server errors");
- Assert.deepEqual(histSuccess.snapshot().counts, [0, 1, 0]);
- Assert.equal(histogramValueCount(histSendTimeSuccess.snapshot()), 1);
- Assert.greater(histSendTimeSuccess.snapshot().sum, 0);
- Assert.equal(histogramValueCount(histSendTimeFail.snapshot()), 0);
-
- // The ping should not be persisted.
- yield Assert.rejects(TelemetryStorage.loadPendingPing(pingId), "The ping must not be persisted.");
-
- // Reset the ping handler and submit a new ping.
- PingServer.resetPingHandler();
- pingId = yield TelemetryController.submitExternalPing(TEST_TYPE, {});
-
- let ping = yield PingServer.promiseNextPings(1);
- Assert.equal(ping[0].id, pingId, "The correct ping must be received");
-
- // We should not have updated the error histogram.
- yield TelemetrySend.testWaitOnOutgoingPings();
- Assert.equal(histEvicted.snapshot().sum, 1, "Telemetry must report only one ping evicted due to server errors");
- Assert.deepEqual(histSuccess.snapshot().counts, [0, 2, 0]);
- Assert.equal(histogramValueCount(histSendTimeSuccess.snapshot()), 2);
- Assert.equal(histogramValueCount(histSendTimeFail.snapshot()), 0);
-});
-
-// Test that the current, non-persisted pending pings are properly saved on shutdown.
-add_task(function* test_persistCurrentPingsOnShutdown() {
- const TEST_TYPE = "test-persistCurrentPingsOnShutdown";
- const PING_COUNT = 5;
- yield TelemetrySend.reset();
- PingServer.stop();
- Assert.equal(TelemetrySend.pendingPingCount, 0, "Should have no pending pings yet");
-
- // Submit new pings that shouldn't be persisted yet.
- let ids = [];
- for (let i=0; i<5; ++i) {
- ids.push(fakePingId("f", i));
- TelemetryController.submitExternalPing(TEST_TYPE, {});
- }
-
- Assert.equal(TelemetrySend.pendingPingCount, PING_COUNT, "Should have the correct pending ping count");
-
- // Triggering a shutdown should persist the pings.
- yield TelemetrySend.shutdown();
- Assert.ok((yield checkPingsSaved(ids)), "All pending pings should have been persisted");
-
- // After a restart the pings should have been found when scanning.
- yield TelemetrySend.reset();
- Assert.equal(TelemetrySend.pendingPingCount, PING_COUNT, "Should have the correct pending ping count");
-});
diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetrySendOldPings.js b/toolkit/components/telemetry/tests/unit/test_TelemetrySendOldPings.js
deleted file mode 100644
index 221b6bcab7..0000000000
--- a/toolkit/components/telemetry/tests/unit/test_TelemetrySendOldPings.js
+++ /dev/null
@@ -1,547 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
-
-/**
- * This test case populates the profile with some fake stored
- * pings, and checks that pending pings are immediatlely sent
- * after delayed init.
- */
-
-"use strict"
-
-Cu.import("resource://gre/modules/osfile.jsm", this);
-Cu.import("resource://gre/modules/Services.jsm", this);
-Cu.import("resource://gre/modules/Promise.jsm", this);
-Cu.import("resource://gre/modules/TelemetryStorage.jsm", this);
-Cu.import("resource://gre/modules/TelemetryController.jsm", this);
-Cu.import("resource://gre/modules/TelemetrySend.jsm", this);
-Cu.import("resource://gre/modules/Task.jsm", this);
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-var {OS: {File, Path, Constants}} = Cu.import("resource://gre/modules/osfile.jsm", {});
-
-// We increment TelemetryStorage's MAX_PING_FILE_AGE and
-// OVERDUE_PING_FILE_AGE by 1 minute so that our test pings exceed
-// those points in time, even taking into account file system imprecision.
-const ONE_MINUTE_MS = 60 * 1000;
-const OVERDUE_PING_FILE_AGE = TelemetrySend.OVERDUE_PING_FILE_AGE + ONE_MINUTE_MS;
-
-const PING_SAVE_FOLDER = "saved-telemetry-pings";
-const PING_TIMEOUT_LENGTH = 5000;
-const OVERDUE_PINGS = 6;
-const OLD_FORMAT_PINGS = 4;
-const RECENT_PINGS = 4;
-
-const TOTAL_EXPECTED_PINGS = OVERDUE_PINGS + RECENT_PINGS + OLD_FORMAT_PINGS;
-
-const PREF_FHR_UPLOAD = "datareporting.healthreport.uploadEnabled";
-
-var gCreatedPings = 0;
-var gSeenPings = 0;
-
-/**
- * Creates some Telemetry pings for the and saves them to disk. Each ping gets a
- * unique ID based on an incrementor.
- *
- * @param {Array} aPingInfos An array of ping type objects. Each entry must be an
- * object containing a "num" field for the number of pings to create and
- * an "age" field. The latter representing the age in milliseconds to offset
- * from now. A value of 10 would make the ping 10ms older than now, for
- * example.
- * @returns Promise
- * @resolve an Array with the created pings ids.
- */
-var createSavedPings = Task.async(function* (aPingInfos) {
- let pingIds = [];
- let now = Date.now();
-
- for (let type in aPingInfos) {
- let num = aPingInfos[type].num;
- let age = now - (aPingInfos[type].age || 0);
- for (let i = 0; i < num; ++i) {
- let pingId = yield TelemetryController.addPendingPing("test-ping", {}, { overwrite: true });
- if (aPingInfos[type].age) {
- // savePing writes to the file synchronously, so we're good to
- // modify the lastModifedTime now.
- let filePath = getSavePathForPingId(pingId);
- yield File.setDates(filePath, null, age);
- }
- gCreatedPings++;
- pingIds.push(pingId);
- }
- }
-
- return pingIds;
-});
-
-/**
- * Deletes locally saved pings if they exist.
- *
- * @param aPingIds an Array of ping ids to delete.
- * @returns Promise
- */
-var clearPings = Task.async(function* (aPingIds) {
- for (let pingId of aPingIds) {
- yield TelemetryStorage.removePendingPing(pingId);
- }
-});
-
-/**
- * Fakes the pending pings storage quota.
- * @param {Integer} aPendingQuota The new quota, in bytes.
- */
-function fakePendingPingsQuota(aPendingQuota) {
- let storage = Cu.import("resource://gre/modules/TelemetryStorage.jsm");
- storage.Policy.getPendingPingsQuota = () => aPendingQuota;
-}
-
-/**
- * Returns a handle for the file that a ping should be
- * stored in locally.
- *
- * @returns path
- */
-function getSavePathForPingId(aPingId) {
- return Path.join(Constants.Path.profileDir, PING_SAVE_FOLDER, aPingId);
-}
-
-/**
- * Check if the number of Telemetry pings received by the HttpServer is not equal
- * to aExpectedNum.
- *
- * @param aExpectedNum the number of pings we expect to receive.
- */
-function assertReceivedPings(aExpectedNum) {
- do_check_eq(gSeenPings, aExpectedNum);
-}
-
-/**
- * Throws if any pings with the id in aPingIds is saved locally.
- *
- * @param aPingIds an Array of pings ids to check.
- * @returns Promise
- */
-var assertNotSaved = Task.async(function* (aPingIds) {
- let saved = 0;
- for (let id of aPingIds) {
- let filePath = getSavePathForPingId(id);
- if (yield File.exists(filePath)) {
- saved++;
- }
- }
- if (saved > 0) {
- do_throw("Found " + saved + " unexpected saved pings.");
- }
-});
-
-/**
- * Our handler function for the HttpServer that simply
- * increments the gSeenPings global when it successfully
- * receives and decodes a Telemetry payload.
- *
- * @param aRequest the HTTP request sent from HttpServer.
- */
-function pingHandler(aRequest) {
- gSeenPings++;
-}
-
-add_task(function* test_setup() {
- PingServer.start();
- PingServer.registerPingHandler(pingHandler);
- do_get_profile();
- loadAddonManager("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
- // Make sure we don't generate unexpected pings due to pref changes.
- yield setEmptyPrefWatchlist();
-
- Services.prefs.setBoolPref(PREF_TELEMETRY_ENABLED, true);
- Services.prefs.setCharPref(TelemetryController.Constants.PREF_SERVER,
- "http://localhost:" + PingServer.port);
-});
-
-/**
- * Setup the tests by making sure the ping storage directory is available, otherwise
- * |TelemetryController.testSaveDirectoryToFile| could fail.
- */
-add_task(function* setupEnvironment() {
- // The following tests assume this pref to be true by default.
- Services.prefs.setBoolPref(PREF_FHR_UPLOAD, true);
-
- yield TelemetryController.testSetup();
-
- let directory = TelemetryStorage.pingDirectoryPath;
- yield File.makeDir(directory, { ignoreExisting: true, unixMode: OS.Constants.S_IRWXU });
-
- yield TelemetryStorage.testClearPendingPings();
-});
-
-/**
- * Test that really recent pings are sent on Telemetry initialization.
- */
-add_task(function* test_recent_pings_sent() {
- let pingTypes = [{ num: RECENT_PINGS }];
- yield createSavedPings(pingTypes);
-
- yield TelemetryController.testReset();
- yield TelemetrySend.testWaitOnOutgoingPings();
- assertReceivedPings(RECENT_PINGS);
-
- yield TelemetryStorage.testClearPendingPings();
-});
-
-/**
- * Create an overdue ping in the old format and try to send it.
- */
-add_task(function* test_overdue_old_format() {
- // A test ping in the old, standard format.
- const PING_OLD_FORMAT = {
- slug: "1234567abcd",
- reason: "test-ping",
- payload: {
- info: {
- reason: "test-ping",
- OS: "XPCShell",
- appID: "SomeId",
- appVersion: "1.0",
- appName: "XPCShell",
- appBuildID: "123456789",
- appUpdateChannel: "Test",
- platformBuildID: "987654321",
- },
- },
- };
-
- // A ping with no info section, but with a slug.
- const PING_NO_INFO = {
- slug: "1234-no-info-ping",
- reason: "test-ping",
- payload: {}
- };
-
- // A ping with no payload.
- const PING_NO_PAYLOAD = {
- slug: "5678-no-payload",
- reason: "test-ping",
- };
-
- // A ping with no info and no slug.
- const PING_NO_SLUG = {
- reason: "test-ping",
- payload: {}
- };
-
- const PING_FILES_PATHS = [
- getSavePathForPingId(PING_OLD_FORMAT.slug),
- getSavePathForPingId(PING_NO_INFO.slug),
- getSavePathForPingId(PING_NO_PAYLOAD.slug),
- getSavePathForPingId("no-slug-file"),
- ];
-
- // Write the ping to file and make it overdue.
- yield TelemetryStorage.savePing(PING_OLD_FORMAT, true);
- yield TelemetryStorage.savePing(PING_NO_INFO, true);
- yield TelemetryStorage.savePing(PING_NO_PAYLOAD, true);
- yield TelemetryStorage.savePingToFile(PING_NO_SLUG, PING_FILES_PATHS[3], true);
-
- for (let f in PING_FILES_PATHS) {
- yield File.setDates(PING_FILES_PATHS[f], null, Date.now() - OVERDUE_PING_FILE_AGE);
- }
-
- gSeenPings = 0;
- yield TelemetryController.testReset();
- yield TelemetrySend.testWaitOnOutgoingPings();
- assertReceivedPings(OLD_FORMAT_PINGS);
-
- // |TelemetryStorage.cleanup| doesn't know how to remove a ping with no slug or id,
- // so remove it manually so that the next test doesn't fail.
- yield OS.File.remove(PING_FILES_PATHS[3]);
-
- yield TelemetryStorage.testClearPendingPings();
-});
-
-add_task(function* test_corrupted_pending_pings() {
- const TEST_TYPE = "test_corrupted";
-
- Telemetry.getHistogramById("TELEMETRY_PENDING_LOAD_FAILURE_READ").clear();
- Telemetry.getHistogramById("TELEMETRY_PENDING_LOAD_FAILURE_PARSE").clear();
-
- // Save a pending ping and get its id.
- let pendingPingId = yield TelemetryController.addPendingPing(TEST_TYPE, {}, {});
-
- // Try to load it: there should be no error.
- yield TelemetryStorage.loadPendingPing(pendingPingId);
-
- let h = Telemetry.getHistogramById("TELEMETRY_PENDING_LOAD_FAILURE_READ").snapshot();
- Assert.equal(h.sum, 0, "Telemetry must not report a pending ping load failure");
- h = Telemetry.getHistogramById("TELEMETRY_PENDING_LOAD_FAILURE_PARSE").snapshot();
- Assert.equal(h.sum, 0, "Telemetry must not report a pending ping parse failure");
-
- // Delete it from the disk, so that its id will be kept in the cache but it will
- // fail loading the file.
- yield OS.File.remove(getSavePathForPingId(pendingPingId));
-
- // Try to load a pending ping which isn't there anymore.
- yield Assert.rejects(TelemetryStorage.loadPendingPing(pendingPingId),
- "Telemetry must fail loading a ping which isn't there");
-
- h = Telemetry.getHistogramById("TELEMETRY_PENDING_LOAD_FAILURE_READ").snapshot();
- Assert.equal(h.sum, 1, "Telemetry must report a pending ping load failure");
- h = Telemetry.getHistogramById("TELEMETRY_PENDING_LOAD_FAILURE_PARSE").snapshot();
- Assert.equal(h.sum, 0, "Telemetry must not report a pending ping parse failure");
-
- // Save a new ping, so that it gets in the pending pings cache.
- pendingPingId = yield TelemetryController.addPendingPing(TEST_TYPE, {}, {});
- // Overwrite it with a corrupted JSON file and then try to load it.
- const INVALID_JSON = "{ invalid,JSON { {1}";
- yield OS.File.writeAtomic(getSavePathForPingId(pendingPingId), INVALID_JSON, { encoding: "utf-8" });
-
- // Try to load the ping with the corrupted JSON content.
- yield Assert.rejects(TelemetryStorage.loadPendingPing(pendingPingId),
- "Telemetry must fail loading a corrupted ping");
-
- h = Telemetry.getHistogramById("TELEMETRY_PENDING_LOAD_FAILURE_READ").snapshot();
- Assert.equal(h.sum, 1, "Telemetry must report a pending ping load failure");
- h = Telemetry.getHistogramById("TELEMETRY_PENDING_LOAD_FAILURE_PARSE").snapshot();
- Assert.equal(h.sum, 1, "Telemetry must report a pending ping parse failure");
-
- let exists = yield OS.File.exists(getSavePathForPingId(pendingPingId));
- Assert.ok(!exists, "The unparseable ping should have been removed");
-
- yield TelemetryStorage.testClearPendingPings();
-});
-
-/**
- * Create some recent and overdue pings and verify that they get sent.
- */
-add_task(function* test_overdue_pings_trigger_send() {
- let pingTypes = [
- { num: RECENT_PINGS },
- { num: OVERDUE_PINGS, age: OVERDUE_PING_FILE_AGE },
- ];
- let pings = yield createSavedPings(pingTypes);
- let recentPings = pings.slice(0, RECENT_PINGS);
- let overduePings = pings.slice(-OVERDUE_PINGS);
-
- yield TelemetryController.testReset();
- yield TelemetrySend.testWaitOnOutgoingPings();
- assertReceivedPings(TOTAL_EXPECTED_PINGS);
-
- yield assertNotSaved(recentPings);
- yield assertNotSaved(overduePings);
-
- Assert.equal(TelemetrySend.overduePingsCount, overduePings.length,
- "Should have tracked the correct amount of overdue pings");
-
- yield TelemetryStorage.testClearPendingPings();
-});
-
-/**
- * Create a ping in the old format, send it, and make sure the request URL contains
- * the correct version query parameter.
- */
-add_task(function* test_overdue_old_format() {
- // A test ping in the old, standard format.
- const PING_OLD_FORMAT = {
- slug: "1234567abcd",
- reason: "test-ping",
- payload: {
- info: {
- reason: "test-ping",
- OS: "XPCShell",
- appID: "SomeId",
- appVersion: "1.0",
- appName: "XPCShell",
- appBuildID: "123456789",
- appUpdateChannel: "Test",
- platformBuildID: "987654321",
- },
- },
- };
-
- const filePath =
- Path.join(Constants.Path.profileDir, PING_SAVE_FOLDER, PING_OLD_FORMAT.slug);
-
- // Write the ping to file and make it overdue.
- yield TelemetryStorage.savePing(PING_OLD_FORMAT, true);
- yield File.setDates(filePath, null, Date.now() - OVERDUE_PING_FILE_AGE);
-
- let receivedPings = 0;
- // Register a new prefix handler to validate the URL.
- PingServer.registerPingHandler(request => {
- // Check that we have a version query parameter in the URL.
- Assert.notEqual(request.queryString, "");
-
- // Make sure the version in the query string matches the old ping format version.
- let params = request.queryString.split("&");
- Assert.ok(params.find(p => p == "v=1"));
-
- receivedPings++;
- });
-
- yield TelemetryController.testReset();
- yield TelemetrySend.testWaitOnOutgoingPings();
- Assert.equal(receivedPings, 1, "We must receive a ping in the old format.");
-
- yield TelemetryStorage.testClearPendingPings();
- PingServer.resetPingHandler();
-});
-
-add_task(function* test_pendingPingsQuota() {
- const PING_TYPE = "foo";
-
- // Disable upload so pings don't get sent and removed from the pending pings directory.
- Services.prefs.setBoolPref(PREF_FHR_UPLOAD, false);
-
- // Remove all the pending pings then startup and wait for the cleanup task to complete.
- // There should be nothing to remove.
- yield TelemetryStorage.testClearPendingPings();
- yield TelemetryController.testReset();
- yield TelemetrySend.testWaitOnOutgoingPings();
- yield TelemetryStorage.testPendingQuotaTaskPromise();
-
- // Remove the pending deletion ping generated when flipping FHR upload off.
- yield TelemetryStorage.testClearPendingPings();
-
- let expectedPrunedPings = [];
- let expectedNotPrunedPings = [];
-
- let checkPendingPings = Task.async(function*() {
- // Check that the pruned pings are not on disk anymore.
- for (let prunedPingId of expectedPrunedPings) {
- yield Assert.rejects(TelemetryStorage.loadPendingPing(prunedPingId),
- "Ping " + prunedPingId + " should have been pruned.");
- const pingPath = getSavePathForPingId(prunedPingId);
- Assert.ok(!(yield OS.File.exists(pingPath)), "The ping should not be on the disk anymore.");
- }
-
- // Check that the expected pings are there.
- for (let expectedPingId of expectedNotPrunedPings) {
- Assert.ok((yield TelemetryStorage.loadPendingPing(expectedPingId)),
- "Ping" + expectedPingId + " should be among the pending pings.");
- }
- });
-
- let pendingPingsInfo = [];
- let pingsSizeInBytes = 0;
-
- // Create 10 pings to test the pending pings quota.
- for (let days = 1; days < 11; days++) {
- const date = fakeNow(2010, 1, days, 1, 1, 0);
- const pingId = yield TelemetryController.addPendingPing(PING_TYPE, {}, {});
-
- // Find the size of the ping.
- const pingFilePath = getSavePathForPingId(pingId);
- const pingSize = (yield OS.File.stat(pingFilePath)).size;
- // Add the info at the beginning of the array, so that most recent pings come first.
- pendingPingsInfo.unshift({id: pingId, size: pingSize, timestamp: date.getTime() });
-
- // Set the last modification date.
- yield OS.File.setDates(pingFilePath, null, date.getTime());
-
- // Add it to the pending ping directory size.
- pingsSizeInBytes += pingSize;
- }
-
- // We need to test the pending pings size before we hit the quota, otherwise a special
- // value is recorded.
- Telemetry.getHistogramById("TELEMETRY_PENDING_PINGS_SIZE_MB").clear();
- Telemetry.getHistogramById("TELEMETRY_PENDING_PINGS_EVICTED_OVER_QUOTA").clear();
- Telemetry.getHistogramById("TELEMETRY_PENDING_EVICTING_OVER_QUOTA_MS").clear();
-
- yield TelemetryController.testReset();
- yield TelemetryStorage.testPendingQuotaTaskPromise();
-
- // Check that the correct values for quota probes are reported when no quota is hit.
- let h = Telemetry.getHistogramById("TELEMETRY_PENDING_PINGS_SIZE_MB").snapshot();
- Assert.equal(h.sum, Math.round(pingsSizeInBytes / 1024 / 1024),
- "Telemetry must report the correct pending pings directory size.");
- h = Telemetry.getHistogramById("TELEMETRY_PENDING_PINGS_EVICTED_OVER_QUOTA").snapshot();
- Assert.equal(h.sum, 0, "Telemetry must report 0 evictions if quota is not hit.");
- h = Telemetry.getHistogramById("TELEMETRY_PENDING_EVICTING_OVER_QUOTA_MS").snapshot();
- Assert.equal(h.sum, 0, "Telemetry must report a null elapsed time if quota is not hit.");
-
- // Set the quota to 80% of the space.
- const testQuotaInBytes = pingsSizeInBytes * 0.8;
- fakePendingPingsQuota(testQuotaInBytes);
-
- // The storage prunes pending pings until we reach 90% of the requested storage quota.
- // Based on that, find how many pings should be kept.
- const safeQuotaSize = Math.round(testQuotaInBytes * 0.9);
- let sizeInBytes = 0;
- let pingsWithinQuota = [];
- let pingsOutsideQuota = [];
-
- for (let pingInfo of pendingPingsInfo) {
- sizeInBytes += pingInfo.size;
- if (sizeInBytes >= safeQuotaSize) {
- pingsOutsideQuota.push(pingInfo.id);
- continue;
- }
- pingsWithinQuota.push(pingInfo.id);
- }
-
- expectedNotPrunedPings = pingsWithinQuota;
- expectedPrunedPings = pingsOutsideQuota;
-
- // Reset TelemetryController to start the pending pings cleanup.
- yield TelemetryController.testReset();
- yield TelemetryStorage.testPendingQuotaTaskPromise();
- yield checkPendingPings();
-
- h = Telemetry.getHistogramById("TELEMETRY_PENDING_PINGS_EVICTED_OVER_QUOTA").snapshot();
- Assert.equal(h.sum, pingsOutsideQuota.length,
- "Telemetry must correctly report the over quota pings evicted from the pending pings directory.");
- h = Telemetry.getHistogramById("TELEMETRY_PENDING_PINGS_SIZE_MB").snapshot();
- Assert.equal(h.sum, 17, "Pending pings quota was hit, a special size must be reported.");
-
- // Trigger a cleanup again and make sure we're not removing anything.
- yield TelemetryController.testReset();
- yield TelemetryStorage.testPendingQuotaTaskPromise();
- yield checkPendingPings();
-
- const OVERSIZED_PING_ID = "9b21ec8f-f762-4d28-a2c1-44e1c4694f24";
- // Create a pending oversized ping.
- const OVERSIZED_PING = {
- id: OVERSIZED_PING_ID,
- type: PING_TYPE,
- creationDate: (new Date()).toISOString(),
- // Generate a 2MB string to use as the ping payload.
- payload: generateRandomString(2 * 1024 * 1024),
- };
- yield TelemetryStorage.savePendingPing(OVERSIZED_PING);
-
- // Reset the histograms.
- Telemetry.getHistogramById("TELEMETRY_PING_SIZE_EXCEEDED_PENDING").clear();
- Telemetry.getHistogramById("TELEMETRY_DISCARDED_PENDING_PINGS_SIZE_MB").clear();
-
- // Try to manually load the oversized ping.
- yield Assert.rejects(TelemetryStorage.loadPendingPing(OVERSIZED_PING_ID),
- "The oversized ping should have been pruned.");
- Assert.ok(!(yield OS.File.exists(getSavePathForPingId(OVERSIZED_PING_ID))),
- "The ping should not be on the disk anymore.");
-
- // Make sure we're correctly updating the related histograms.
- h = Telemetry.getHistogramById("TELEMETRY_PING_SIZE_EXCEEDED_PENDING").snapshot();
- Assert.equal(h.sum, 1, "Telemetry must report 1 oversized ping in the pending pings directory.");
- h = Telemetry.getHistogramById("TELEMETRY_DISCARDED_PENDING_PINGS_SIZE_MB").snapshot();
- Assert.equal(h.counts[2], 1, "Telemetry must report a 2MB, oversized, ping.");
-
- // Save the ping again to check if it gets pruned when scanning the pings directory.
- yield TelemetryStorage.savePendingPing(OVERSIZED_PING);
- expectedPrunedPings.push(OVERSIZED_PING_ID);
-
- // Scan the pending pings directory.
- yield TelemetryController.testReset();
- yield TelemetryStorage.testPendingQuotaTaskPromise();
- yield checkPendingPings();
-
- // Make sure we're correctly updating the related histograms.
- h = Telemetry.getHistogramById("TELEMETRY_PING_SIZE_EXCEEDED_PENDING").snapshot();
- Assert.equal(h.sum, 2, "Telemetry must report 1 oversized ping in the pending pings directory.");
- h = Telemetry.getHistogramById("TELEMETRY_DISCARDED_PENDING_PINGS_SIZE_MB").snapshot();
- Assert.equal(h.counts[2], 2, "Telemetry must report two 2MB, oversized, pings.");
-
- Services.prefs.setBoolPref(PREF_FHR_UPLOAD, true);
-});
-
-add_task(function* teardown() {
- yield PingServer.stop();
-});
diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetrySession.js b/toolkit/components/telemetry/tests/unit/test_TelemetrySession.js
deleted file mode 100644
index 6981331629..0000000000
--- a/toolkit/components/telemetry/tests/unit/test_TelemetrySession.js
+++ /dev/null
@@ -1,2029 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
-*/
-/* This testcase triggers two telemetry pings.
- *
- * Telemetry code keeps histograms of past telemetry pings. The first
- * ping populates these histograms. One of those histograms is then
- * checked in the second request.
- */
-
-Cu.import("resource://services-common/utils.js");
-Cu.import("resource://gre/modules/ClientID.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/LightweightThemeManager.jsm", this);
-Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
-Cu.import("resource://gre/modules/TelemetryController.jsm", this);
-Cu.import("resource://gre/modules/TelemetrySession.jsm", this);
-Cu.import("resource://gre/modules/TelemetryStorage.jsm", this);
-Cu.import("resource://gre/modules/TelemetryEnvironment.jsm", this);
-Cu.import("resource://gre/modules/TelemetrySend.jsm", this);
-Cu.import("resource://gre/modules/Task.jsm", this);
-Cu.import("resource://gre/modules/Promise.jsm", this);
-Cu.import("resource://gre/modules/Preferences.jsm");
-Cu.import("resource://gre/modules/osfile.jsm", this);
-
-const PING_FORMAT_VERSION = 4;
-const PING_TYPE_MAIN = "main";
-const PING_TYPE_SAVED_SESSION = "saved-session";
-
-const REASON_ABORTED_SESSION = "aborted-session";
-const REASON_SAVED_SESSION = "saved-session";
-const REASON_SHUTDOWN = "shutdown";
-const REASON_TEST_PING = "test-ping";
-const REASON_DAILY = "daily";
-const REASON_ENVIRONMENT_CHANGE = "environment-change";
-
-const PLATFORM_VERSION = "1.9.2";
-const APP_VERSION = "1";
-const APP_ID = "xpcshell@tests.mozilla.org";
-const APP_NAME = "XPCShell";
-
-const IGNORE_HISTOGRAM_TO_CLONE = "MEMORY_HEAP_ALLOCATED";
-const IGNORE_CLONED_HISTOGRAM = "test::ignore_me_also";
-const ADDON_NAME = "Telemetry test addon";
-const ADDON_HISTOGRAM = "addon-histogram";
-// Add some unicode characters here to ensure that sending them works correctly.
-const SHUTDOWN_TIME = 10000;
-const FAILED_PROFILE_LOCK_ATTEMPTS = 2;
-
-// Constants from prio.h for nsIFileOutputStream.init
-const PR_WRONLY = 0x2;
-const PR_CREATE_FILE = 0x8;
-const PR_TRUNCATE = 0x20;
-const RW_OWNER = parseInt("0600", 8);
-
-const NUMBER_OF_THREADS_TO_LAUNCH = 30;
-var gNumberOfThreadsLaunched = 0;
-
-const MS_IN_ONE_HOUR = 60 * 60 * 1000;
-const MS_IN_ONE_DAY = 24 * MS_IN_ONE_HOUR;
-
-const PREF_BRANCH = "toolkit.telemetry.";
-const PREF_SERVER = PREF_BRANCH + "server";
-const PREF_FHR_UPLOAD_ENABLED = "datareporting.healthreport.uploadEnabled";
-
-const DATAREPORTING_DIR = "datareporting";
-const ABORTED_PING_FILE_NAME = "aborted-session-ping";
-const ABORTED_SESSION_UPDATE_INTERVAL_MS = 5 * 60 * 1000;
-
-XPCOMUtils.defineLazyGetter(this, "DATAREPORTING_PATH", function() {
- return OS.Path.join(OS.Constants.Path.profileDir, DATAREPORTING_DIR);
-});
-
-var gClientID = null;
-var gMonotonicNow = 0;
-
-function generateUUID() {
- let str = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator).generateUUID().toString();
- // strip {}
- return str.substring(1, str.length - 1);
-}
-
-function truncateDateToDays(date) {
- return new Date(date.getFullYear(),
- date.getMonth(),
- date.getDate(),
- 0, 0, 0, 0);
-}
-
-function sendPing() {
- TelemetrySession.gatherStartup();
- if (PingServer.started) {
- TelemetrySend.setServer("http://localhost:" + PingServer.port);
- return TelemetrySession.testPing();
- }
- TelemetrySend.setServer("http://doesnotexist");
- return TelemetrySession.testPing();
-}
-
-function fakeGenerateUUID(sessionFunc, subsessionFunc) {
- let session = Cu.import("resource://gre/modules/TelemetrySession.jsm");
- session.Policy.generateSessionUUID = sessionFunc;
- session.Policy.generateSubsessionUUID = subsessionFunc;
-}
-
-function fakeIdleNotification(topic) {
- let session = Cu.import("resource://gre/modules/TelemetrySession.jsm");
- return session.TelemetryScheduler.observe(null, topic, null);
-}
-
-function setupTestData() {
-
- Services.startup.interrupted = true;
- Telemetry.registerAddonHistogram(ADDON_NAME, ADDON_HISTOGRAM,
- Telemetry.HISTOGRAM_LINEAR,
- 1, 5, 6);
- let h1 = Telemetry.getAddonHistogram(ADDON_NAME, ADDON_HISTOGRAM);
- h1.add(1);
- let h2 = Telemetry.getHistogramById("TELEMETRY_TEST_COUNT");
- h2.add();
-
- let k1 = Telemetry.getKeyedHistogramById("TELEMETRY_TEST_KEYED_COUNT");
- k1.add("a");
- k1.add("a");
- k1.add("b");
-}
-
-function getSavedPingFile(basename) {
- let tmpDir = Services.dirsvc.get("ProfD", Ci.nsIFile);
- let pingFile = tmpDir.clone();
- pingFile.append(basename);
- if (pingFile.exists()) {
- pingFile.remove(true);
- }
- do_register_cleanup(function () {
- try {
- pingFile.remove(true);
- } catch (e) {
- }
- });
- return pingFile;
-}
-
-function checkPingFormat(aPing, aType, aHasClientId, aHasEnvironment) {
- const MANDATORY_PING_FIELDS = [
- "type", "id", "creationDate", "version", "application", "payload"
- ];
-
- const APPLICATION_TEST_DATA = {
- buildId: gAppInfo.appBuildID,
- name: APP_NAME,
- version: APP_VERSION,
- vendor: "Mozilla",
- platformVersion: PLATFORM_VERSION,
- xpcomAbi: "noarch-spidermonkey",
- };
-
- // Check that the ping contains all the mandatory fields.
- for (let f of MANDATORY_PING_FIELDS) {
- Assert.ok(f in aPing, f + "must be available.");
- }
-
- Assert.equal(aPing.type, aType, "The ping must have the correct type.");
- Assert.equal(aPing.version, PING_FORMAT_VERSION, "The ping must have the correct version.");
-
- // Test the application section.
- for (let f in APPLICATION_TEST_DATA) {
- Assert.equal(aPing.application[f], APPLICATION_TEST_DATA[f],
- f + " must have the correct value.");
- }
-
- // We can't check the values for channel and architecture. Just make
- // sure they are in.
- Assert.ok("architecture" in aPing.application,
- "The application section must have an architecture field.");
- Assert.ok("channel" in aPing.application,
- "The application section must have a channel field.");
-
- // Check the clientId and environment fields, as needed.
- Assert.equal("clientId" in aPing, aHasClientId);
- Assert.equal("environment" in aPing, aHasEnvironment);
-}
-
-function checkPayloadInfo(data) {
- const ALLOWED_REASONS = [
- "environment-change", "shutdown", "daily", "saved-session", "test-ping"
- ];
- let numberCheck = arg => { return (typeof arg == "number"); };
- let positiveNumberCheck = arg => { return numberCheck(arg) && (arg >= 0); };
- let stringCheck = arg => { return (typeof arg == "string") && (arg != ""); };
- let revisionCheck = arg => {
- return (Services.appinfo.isOfficial) ? stringCheck(arg) : (typeof arg == "string");
- };
- let uuidCheck = arg => {
- return UUID_REGEX.test(arg);
- };
- let isoDateCheck = arg => {
- // We expect use of this version of the ISO format:
- // 2015-04-12T18:51:19.1+00:00
- const isoDateRegEx = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+[+-]\d{2}:\d{2}$/;
- return stringCheck(arg) && !Number.isNaN(Date.parse(arg)) &&
- isoDateRegEx.test(arg);
- };
-
- const EXPECTED_INFO_FIELDS_TYPES = {
- reason: stringCheck,
- revision: revisionCheck,
- timezoneOffset: numberCheck,
- sessionId: uuidCheck,
- subsessionId: uuidCheck,
- // Special cases: previousSessionId and previousSubsessionId are null on first run.
- previousSessionId: (arg) => { return (arg) ? uuidCheck(arg) : true; },
- previousSubsessionId: (arg) => { return (arg) ? uuidCheck(arg) : true; },
- subsessionCounter: positiveNumberCheck,
- profileSubsessionCounter: positiveNumberCheck,
- sessionStartDate: isoDateCheck,
- subsessionStartDate: isoDateCheck,
- subsessionLength: positiveNumberCheck,
- };
-
- for (let f in EXPECTED_INFO_FIELDS_TYPES) {
- Assert.ok(f in data, f + " must be available.");
-
- let checkFunc = EXPECTED_INFO_FIELDS_TYPES[f];
- Assert.ok(checkFunc(data[f]),
- f + " must have the correct type and valid data " + data[f]);
- }
-
- // Previous buildId is not mandatory.
- if (data.previousBuildId) {
- Assert.ok(stringCheck(data.previousBuildId));
- }
-
- Assert.ok(ALLOWED_REASONS.find(r => r == data.reason),
- "Payload must contain an allowed reason.");
-
- Assert.ok(Date.parse(data.subsessionStartDate) >= Date.parse(data.sessionStartDate));
- Assert.ok(data.profileSubsessionCounter >= data.subsessionCounter);
- Assert.ok(data.timezoneOffset >= -12*60, "The timezone must be in a valid range.");
- Assert.ok(data.timezoneOffset <= 12*60, "The timezone must be in a valid range.");
-}
-
-function checkScalars(processes) {
- // Check that the scalars section is available in the ping payload.
- const parentProcess = processes.parent;
- Assert.ok("scalars" in parentProcess, "The scalars section must be available in the parent process.");
- Assert.ok("keyedScalars" in parentProcess, "The keyedScalars section must be available in the parent process.");
- Assert.equal(typeof parentProcess.scalars, "object", "The scalars entry must be an object.");
- Assert.equal(typeof parentProcess.keyedScalars, "object", "The keyedScalars entry must be an object.");
-
- let checkScalar = function(scalar) {
- // Check if the value is of a supported type.
- const valueType = typeof(scalar);
- switch (valueType) {
- case "string":
- Assert.ok(scalar.length <= 50,
- "String values can't have more than 50 characters");
- break;
- case "number":
- Assert.ok(scalar >= 0,
- "We only support unsigned integer values in scalars.");
- break;
- case "boolean":
- Assert.ok(true,
- "Boolean scalar found.");
- break;
- default:
- Assert.ok(false,
- name + " contains an unsupported value type (" + valueType + ")");
- }
- }
-
- // Check that we have valid scalar entries.
- const scalars = parentProcess.scalars;
- for (let name in scalars) {
- Assert.equal(typeof name, "string", "Scalar names must be strings.");
- checkScalar(scalar[name]);
- }
-
- // Check that we have valid keyed scalar entries.
- const keyedScalars = parentProcess.keyedScalars;
- for (let name in keyedScalars) {
- Assert.equal(typeof name, "string", "Scalar names must be strings.");
- Assert.ok(Object.keys(keyedScalars[name]).length,
- "The reported keyed scalars must contain at least 1 key.");
- for (let key in keyedScalars[name]) {
- Assert.equal(typeof key, "string", "Keyed scalar keys must be strings.");
- Assert.ok(key.length <= 70, "Keyed scalar keys can't have more than 70 characters.");
- checkScalar(scalar[name][key]);
- }
- }
-}
-
-function checkEvents(processes) {
- // Check that the events section is available in the ping payload.
- const parent = processes.parent;
- Assert.ok("events" in parent, "The events section must be available in the parent process.");
-
- // Check that the events section has the right format.
- Assert.ok(Array.isArray(parent.events), "The events entry must be an array.");
- for (let [ts, category, method, object, value, extra] of parent.events) {
- Assert.equal(typeof(ts), "number", "Timestamp field should be a number.");
- Assert.greaterOrEqual(ts, 0, "Timestamp should be >= 0.");
-
- Assert.equal(typeof(category), "string", "Category should have the right type.");
- Assert.lessOrEqual(category.length, 100, "Category should have the right string length.");
-
- Assert.equal(typeof(method), "string", "Method should have the right type.");
- Assert.lessOrEqual(method.length, 40, "Method should have the right string length.");
-
- Assert.equal(typeof(object), "string", "Object should have the right type.");
- Assert.lessOrEqual(object.length, 40, "Object should have the right string length.");
-
- Assert.ok(value === null || typeof(value) === "string",
- "Value should be null or a string.");
- if (value) {
- Assert.lessOrEqual(value.length, 100, "Value should have the right string length.");
- }
-
- Assert.ok(extra === null || typeof(extra) === "object",
- "Extra should be null or an object.");
- if (extra) {
- let keys = Object.keys(extra);
- let keyTypes = keys.map(k => typeof(k));
- Assert.lessOrEqual(keys.length, 20, "Should not have too many extra keys.");
- Assert.ok(keyTypes.every(t => t === "string"),
- "All extra keys should be strings.");
- Assert.ok(keys.every(k => k.length <= 20),
- "All extra keys should have the right string length.");
-
- let values = Object.values(extra);
- let valueTypes = values.map(v => typeof(v));
- Assert.ok(valueTypes.every(t => t === "string"),
- "All extra values should be strings.");
- Assert.ok(values.every(v => v.length <= 100),
- "All extra values should have the right string length.");
- }
- }
-}
-
-function checkPayload(payload, reason, successfulPings, savedPings) {
- Assert.ok("info" in payload, "Payload must contain an info section.");
- checkPayloadInfo(payload.info);
-
- Assert.ok(payload.simpleMeasurements.totalTime >= 0);
- Assert.ok(payload.simpleMeasurements.uptime >= 0);
- Assert.equal(payload.simpleMeasurements.startupInterrupted, 1);
- Assert.equal(payload.simpleMeasurements.shutdownDuration, SHUTDOWN_TIME);
- Assert.equal(payload.simpleMeasurements.savedPings, savedPings);
- Assert.ok("maximalNumberOfConcurrentThreads" in payload.simpleMeasurements);
- Assert.ok(payload.simpleMeasurements.maximalNumberOfConcurrentThreads >= gNumberOfThreadsLaunched);
-
- let activeTicks = payload.simpleMeasurements.activeTicks;
- Assert.ok(activeTicks >= 0);
-
- Assert.equal(payload.simpleMeasurements.failedProfileLockCount,
- FAILED_PROFILE_LOCK_ATTEMPTS);
- let profileDirectory = Services.dirsvc.get("ProfD", Ci.nsIFile);
- let failedProfileLocksFile = profileDirectory.clone();
- failedProfileLocksFile.append("Telemetry.FailedProfileLocks.txt");
- Assert.ok(!failedProfileLocksFile.exists());
-
-
- let isWindows = ("@mozilla.org/windows-registry-key;1" in Components.classes);
- if (isWindows) {
- Assert.ok(payload.simpleMeasurements.startupSessionRestoreReadBytes > 0);
- Assert.ok(payload.simpleMeasurements.startupSessionRestoreWriteBytes > 0);
- }
-
- const TELEMETRY_SEND_SUCCESS = "TELEMETRY_SEND_SUCCESS";
- const TELEMETRY_SUCCESS = "TELEMETRY_SUCCESS";
- const TELEMETRY_TEST_FLAG = "TELEMETRY_TEST_FLAG";
- const TELEMETRY_TEST_COUNT = "TELEMETRY_TEST_COUNT";
- const TELEMETRY_TEST_KEYED_FLAG = "TELEMETRY_TEST_KEYED_FLAG";
- const TELEMETRY_TEST_KEYED_COUNT = "TELEMETRY_TEST_KEYED_COUNT";
-
- if (successfulPings > 0) {
- Assert.ok(TELEMETRY_SEND_SUCCESS in payload.histograms);
- }
- Assert.ok(TELEMETRY_TEST_FLAG in payload.histograms);
- Assert.ok(TELEMETRY_TEST_COUNT in payload.histograms);
-
- Assert.ok(!(IGNORE_CLONED_HISTOGRAM in payload.histograms));
-
- // Flag histograms should automagically spring to life.
- const expected_flag = {
- range: [1, 2],
- bucket_count: 3,
- histogram_type: 3,
- values: {0:1, 1:0},
- sum: 0
- };
- let flag = payload.histograms[TELEMETRY_TEST_FLAG];
- Assert.equal(uneval(flag), uneval(expected_flag));
-
- // We should have a test count.
- const expected_count = {
- range: [1, 2],
- bucket_count: 3,
- histogram_type: 4,
- values: {0:1, 1:0},
- sum: 1,
- };
- let count = payload.histograms[TELEMETRY_TEST_COUNT];
- Assert.equal(uneval(count), uneval(expected_count));
-
- // There should be one successful report from the previous telemetry ping.
- if (successfulPings > 0) {
- const expected_tc = {
- range: [1, 2],
- bucket_count: 3,
- histogram_type: 2,
- values: {0:2, 1:successfulPings, 2:0},
- sum: successfulPings
- };
- let tc = payload.histograms[TELEMETRY_SUCCESS];
- Assert.equal(uneval(tc), uneval(expected_tc));
- }
-
- // The ping should include data from memory reporters. We can't check that
- // this data is correct, because we can't control the values returned by the
- // memory reporters. But we can at least check that the data is there.
- //
- // It's important to check for the presence of reporters with a mix of units,
- // because TelemetryController has separate logic for each one. But we can't
- // currently check UNITS_COUNT_CUMULATIVE or UNITS_PERCENTAGE because
- // Telemetry doesn't touch a memory reporter with these units that's
- // available on all platforms.
-
- Assert.ok('MEMORY_JS_GC_HEAP' in payload.histograms); // UNITS_BYTES
- Assert.ok('MEMORY_JS_COMPARTMENTS_SYSTEM' in payload.histograms); // UNITS_COUNT
-
- // We should have included addon histograms.
- Assert.ok("addonHistograms" in payload);
- Assert.ok(ADDON_NAME in payload.addonHistograms);
- Assert.ok(ADDON_HISTOGRAM in payload.addonHistograms[ADDON_NAME]);
-
- Assert.ok(("mainThread" in payload.slowSQL) &&
- ("otherThreads" in payload.slowSQL));
-
- Assert.ok(("IceCandidatesStats" in payload.webrtc) &&
- ("webrtc" in payload.webrtc.IceCandidatesStats));
-
- // Check keyed histogram payload.
-
- Assert.ok("keyedHistograms" in payload);
- let keyedHistograms = payload.keyedHistograms;
- Assert.ok(!(TELEMETRY_TEST_KEYED_FLAG in keyedHistograms));
- Assert.ok(TELEMETRY_TEST_KEYED_COUNT in keyedHistograms);
-
- const expected_keyed_count = {
- "a": {
- range: [1, 2],
- bucket_count: 3,
- histogram_type: 4,
- values: {0:2, 1:0},
- sum: 2,
- },
- "b": {
- range: [1, 2],
- bucket_count: 3,
- histogram_type: 4,
- values: {0:1, 1:0},
- sum: 1,
- },
- };
- Assert.deepEqual(expected_keyed_count, keyedHistograms[TELEMETRY_TEST_KEYED_COUNT]);
-
- Assert.ok("processes" in payload, "The payload must have a processes section.");
- Assert.ok("parent" in payload.processes, "There must be at least a parent process.");
- checkScalars(payload.processes);
- checkEvents(payload.processes);
-}
-
-function writeStringToFile(file, contents) {
- let ostream = Cc["@mozilla.org/network/safe-file-output-stream;1"]
- .createInstance(Ci.nsIFileOutputStream);
- ostream.init(file, PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE,
- RW_OWNER, ostream.DEFER_OPEN);
- ostream.write(contents, contents.length);
- ostream.QueryInterface(Ci.nsISafeOutputStream).finish();
- ostream.close();
-}
-
-function write_fake_shutdown_file() {
- let profileDirectory = Services.dirsvc.get("ProfD", Ci.nsIFile);
- let file = profileDirectory.clone();
- file.append("Telemetry.ShutdownTime.txt");
- let contents = "" + SHUTDOWN_TIME;
- writeStringToFile(file, contents);
-}
-
-function write_fake_failedprofilelocks_file() {
- let profileDirectory = Services.dirsvc.get("ProfD", Ci.nsIFile);
- let file = profileDirectory.clone();
- file.append("Telemetry.FailedProfileLocks.txt");
- let contents = "" + FAILED_PROFILE_LOCK_ATTEMPTS;
- writeStringToFile(file, contents);
-}
-
-add_task(function* test_setup() {
- // Addon manager needs a profile directory
- do_get_profile();
- loadAddonManager(APP_ID, APP_NAME, APP_VERSION, PLATFORM_VERSION);
- // Make sure we don't generate unexpected pings due to pref changes.
- yield setEmptyPrefWatchlist();
-
- Services.prefs.setBoolPref(PREF_TELEMETRY_ENABLED, true);
- Services.prefs.setBoolPref(PREF_FHR_UPLOAD_ENABLED, true);
-
- // Make it look like we've previously failed to lock a profile a couple times.
- write_fake_failedprofilelocks_file();
-
- // Make it look like we've shutdown before.
- write_fake_shutdown_file();
-
- let currentMaxNumberOfThreads = Telemetry.maximalNumberOfConcurrentThreads;
- do_check_true(currentMaxNumberOfThreads > 0);
-
- // Try to augment the maximal number of threads currently launched
- let threads = [];
- try {
- for (let i = 0; i < currentMaxNumberOfThreads + 10; ++i) {
- threads.push(Services.tm.newThread(0));
- }
- } catch (ex) {
- // If memory is too low, it is possible that not all threads will be launched.
- }
- gNumberOfThreadsLaunched = threads.length;
-
- do_check_true(Telemetry.maximalNumberOfConcurrentThreads >= gNumberOfThreadsLaunched);
-
- do_register_cleanup(function() {
- threads.forEach(function(thread) {
- thread.shutdown();
- });
- });
-
- yield new Promise(resolve =>
- Telemetry.asyncFetchTelemetryData(wrapWithExceptionHandler(resolve)));
-});
-
-add_task(function* asyncSetup() {
- yield TelemetryController.testSetup();
- // Load the client ID from the client ID provider to check for pings sanity.
- gClientID = yield ClientID.getClientID();
-});
-
-// Ensures that expired histograms are not part of the payload.
-add_task(function* test_expiredHistogram() {
-
- let dummy = Telemetry.getHistogramById("TELEMETRY_TEST_EXPIRED");
-
- dummy.add(1);
-
- do_check_eq(TelemetrySession.getPayload()["histograms"]["TELEMETRY_TEST_EXPIRED"], undefined);
-});
-
-// Sends a ping to a non existing server. If we remove this test, we won't get
-// all the histograms we need in the main ping.
-add_task(function* test_noServerPing() {
- yield sendPing();
- // We need two pings in order to make sure STARTUP_MEMORY_STORAGE_SQLIE histograms
- // are initialised. See bug 1131585.
- yield sendPing();
- // Allowing Telemetry to persist unsent pings as pending. If omitted may cause
- // problems to the consequent tests.
- yield TelemetryController.testShutdown();
-});
-
-// Checks that a sent ping is correctly received by a dummy http server.
-add_task(function* test_simplePing() {
- yield TelemetryStorage.testClearPendingPings();
- PingServer.start();
- Preferences.set(PREF_SERVER, "http://localhost:" + PingServer.port);
-
- let now = new Date(2020, 1, 1, 12, 0, 0);
- let expectedDate = new Date(2020, 1, 1, 0, 0, 0);
- fakeNow(now);
- gMonotonicNow = fakeMonotonicNow(gMonotonicNow + 5000);
-
- const expectedSessionUUID = "bd314d15-95bf-4356-b682-b6c4a8942202";
- const expectedSubsessionUUID = "3e2e5f6c-74ba-4e4d-a93f-a48af238a8c7";
- fakeGenerateUUID(() => expectedSessionUUID, () => expectedSubsessionUUID);
- yield TelemetryController.testReset();
-
- // Session and subsession start dates are faked during TelemetrySession setup. We can
- // now fake the session duration.
- const SESSION_DURATION_IN_MINUTES = 15;
- fakeNow(new Date(2020, 1, 1, 12, SESSION_DURATION_IN_MINUTES, 0));
- gMonotonicNow = fakeMonotonicNow(gMonotonicNow + SESSION_DURATION_IN_MINUTES * 60 * 1000);
-
- yield sendPing();
- let ping = yield PingServer.promiseNextPing();
-
- checkPingFormat(ping, PING_TYPE_MAIN, true, true);
-
- // Check that we get the data we expect.
- let payload = ping.payload;
- Assert.equal(payload.info.sessionId, expectedSessionUUID);
- Assert.equal(payload.info.subsessionId, expectedSubsessionUUID);
- let sessionStartDate = new Date(payload.info.sessionStartDate);
- Assert.equal(sessionStartDate.toISOString(), expectedDate.toISOString());
- let subsessionStartDate = new Date(payload.info.subsessionStartDate);
- Assert.equal(subsessionStartDate.toISOString(), expectedDate.toISOString());
- Assert.equal(payload.info.subsessionLength, SESSION_DURATION_IN_MINUTES * 60);
-
- // Restore the UUID generator so we don't mess with other tests.
- fakeGenerateUUID(generateUUID, generateUUID);
-});
-
-// Saves the current session histograms, reloads them, performs a ping
-// and checks that the dummy http server received both the previously
-// saved ping and the new one.
-add_task(function* test_saveLoadPing() {
- // Let's start out with a defined state.
- yield TelemetryStorage.testClearPendingPings();
- yield TelemetryController.testReset();
- PingServer.clearRequests();
-
- // Setup test data and trigger pings.
- setupTestData();
- yield TelemetrySession.testSavePendingPing();
- yield sendPing();
-
- // Get requests received by dummy server.
- const requests = yield PingServer.promiseNextRequests(2);
-
- for (let req of requests) {
- Assert.equal(req.getHeader("content-type"), "application/json; charset=UTF-8",
- "The request must have the correct content-type.");
- }
-
- // We decode both requests to check for the |reason|.
- let pings = Array.from(requests, decodeRequestPayload);
-
- // Check we have the correct two requests. Ordering is not guaranteed. The ping type
- // is encoded in the URL.
- if (pings[0].type != PING_TYPE_MAIN) {
- pings.reverse();
- }
-
- checkPingFormat(pings[0], PING_TYPE_MAIN, true, true);
- checkPayload(pings[0].payload, REASON_TEST_PING, 0, 1);
- checkPingFormat(pings[1], PING_TYPE_SAVED_SESSION, true, true);
- checkPayload(pings[1].payload, REASON_SAVED_SESSION, 0, 0);
-});
-
-add_task(function* test_checkSubsessionScalars() {
- if (gIsAndroid) {
- // We don't support subsessions yet on Android.
- return;
- }
-
- // Clear the scalars.
- Telemetry.clearScalars();
- yield TelemetryController.testReset();
-
- // Set some scalars.
- const UINT_SCALAR = "telemetry.test.unsigned_int_kind";
- const STRING_SCALAR = "telemetry.test.string_kind";
- let expectedUint = 37;
- let expectedString = "Test value. Yay.";
- Telemetry.scalarSet(UINT_SCALAR, expectedUint);
- Telemetry.scalarSet(STRING_SCALAR, expectedString);
-
- // Check that scalars are not available in classic pings but are in subsession
- // pings. Also clear the subsession.
- let classic = TelemetrySession.getPayload();
- let subsession = TelemetrySession.getPayload("environment-change", true);
-
- const TEST_SCALARS = [ UINT_SCALAR, STRING_SCALAR ];
- for (let name of TEST_SCALARS) {
- // Scalar must be reported in subsession pings (e.g. main).
- Assert.ok(name in subsession.processes.parent.scalars,
- name + " must be reported in a subsession ping.");
- }
- // No scalar must be reported in classic pings (e.g. saved-session).
- Assert.ok(Object.keys(classic.processes.parent.scalars).length == 0,
- "Scalars must not be reported in a classic ping.");
-
- // And make sure that we're getting the right values in the
- // subsession ping.
- Assert.equal(subsession.processes.parent.scalars[UINT_SCALAR], expectedUint,
- UINT_SCALAR + " must contain the expected value.");
- Assert.equal(subsession.processes.parent.scalars[STRING_SCALAR], expectedString,
- STRING_SCALAR + " must contain the expected value.");
-
- // Since we cleared the subsession in the last getPayload(), check that
- // breaking subsessions clears the scalars.
- subsession = TelemetrySession.getPayload("environment-change");
- for (let name of TEST_SCALARS) {
- Assert.ok(!(name in subsession.processes.parent.scalars),
- name + " must be cleared with the new subsession.");
- }
-
- // Check if setting the scalars again works as expected.
- expectedUint = 85;
- expectedString = "A creative different value";
- Telemetry.scalarSet(UINT_SCALAR, expectedUint);
- Telemetry.scalarSet(STRING_SCALAR, expectedString);
- subsession = TelemetrySession.getPayload("environment-change");
- Assert.equal(subsession.processes.parent.scalars[UINT_SCALAR], expectedUint,
- UINT_SCALAR + " must contain the expected value.");
- Assert.equal(subsession.processes.parent.scalars[STRING_SCALAR], expectedString,
- STRING_SCALAR + " must contain the expected value.");
-});
-
-add_task(function* test_checkSubsessionEvents() {
- if (gIsAndroid) {
- // We don't support subsessions yet on Android.
- return;
- }
-
- // Clear the events.
- Telemetry.clearEvents();
- yield TelemetryController.testReset();
-
- // Record some events.
- let expected = [
- ["telemetry.test", "test1", "object1", "a", null],
- ["telemetry.test", "test1", "object1", null, {key1: "value"}],
- ];
- for (let event of expected) {
- Telemetry.recordEvent(...event);
- }
-
- // Strip off trailing null values to match the serialized events.
- for (let e of expected) {
- while ((e.length >= 3) && (e[e.length - 1] === null)) {
- e.pop();
- }
- }
-
- // Check that events are not available in classic pings but are in subsession
- // pings. Also clear the subsession.
- let classic = TelemetrySession.getPayload();
- let subsession = TelemetrySession.getPayload("environment-change", true);
-
- Assert.ok("events" in classic.processes.parent, "Should have an events field in classic payload.");
- Assert.ok("events" in subsession.processes.parent, "Should have an events field in subsession payload.");
-
- // They should be empty in the classic payload.
- Assert.deepEqual(classic.processes.parent.events, [], "Events in classic payload should be empty.");
-
- // In the subsession payload, they should contain the recorded test events.
- let events = subsession.processes.parent.events.filter(e => e[1] === "telemetry.test");
- Assert.equal(events.length, expected.length, "Should have the right amount of events in the payload.");
- for (let i = 0; i < expected.length; ++i) {
- Assert.deepEqual(events[i].slice(1), expected[i],
- "Should have the right event data in the ping.");
- }
-
- // As we cleared the subsession above, the events entry should now be empty.
- subsession = TelemetrySession.getPayload("environment-change", false);
- Assert.ok("events" in subsession.processes.parent, "Should have an events field in subsession payload.");
- events = subsession.processes.parent.events.filter(e => e[1] === "telemetry.test");
- Assert.equal(events.length, 0, "Should have no test events in the subsession payload now.");
-});
-
-add_task(function* test_checkSubsessionHistograms() {
- if (gIsAndroid) {
- // We don't support subsessions yet on Android.
- return;
- }
-
- let now = new Date(2020, 1, 1, 12, 0, 0);
- let expectedDate = new Date(2020, 1, 1, 0, 0, 0);
- fakeNow(now);
- yield TelemetryController.testReset();
-
- const COUNT_ID = "TELEMETRY_TEST_COUNT";
- const KEYED_ID = "TELEMETRY_TEST_KEYED_COUNT";
- const count = Telemetry.getHistogramById(COUNT_ID);
- const keyed = Telemetry.getKeyedHistogramById(KEYED_ID);
- const registeredIds =
- new Set(Telemetry.registeredHistograms(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, []));
-
- const stableHistograms = new Set([
- "TELEMETRY_TEST_FLAG",
- "TELEMETRY_TEST_COUNT",
- "TELEMETRY_TEST_RELEASE_OPTOUT",
- "TELEMETRY_TEST_RELEASE_OPTIN",
- "STARTUP_CRASH_DETECTED",
- ]);
-
- const stableKeyedHistograms = new Set([
- "TELEMETRY_TEST_KEYED_FLAG",
- "TELEMETRY_TEST_KEYED_COUNT",
- "TELEMETRY_TEST_KEYED_RELEASE_OPTIN",
- "TELEMETRY_TEST_KEYED_RELEASE_OPTOUT",
- ]);
-
- // Compare the two sets of histograms.
- // The "subsession" histograms should match the registered
- // "classic" histograms. However, histograms can change
- // between us collecting the different payloads, so we only
- // check for deep equality on known stable histograms.
- checkHistograms = (classic, subsession) => {
- for (let id of Object.keys(classic)) {
- if (!registeredIds.has(id)) {
- continue;
- }
-
- Assert.ok(id in subsession);
- if (stableHistograms.has(id)) {
- Assert.deepEqual(classic[id],
- subsession[id]);
- } else {
- Assert.equal(classic[id].histogram_type,
- subsession[id].histogram_type);
- }
- }
- };
-
- // Same as above, except for keyed histograms.
- checkKeyedHistograms = (classic, subsession) => {
- for (let id of Object.keys(classic)) {
- if (!registeredIds.has(id)) {
- continue;
- }
-
- Assert.ok(id in subsession);
- if (stableKeyedHistograms.has(id)) {
- Assert.deepEqual(classic[id],
- subsession[id]);
- }
- }
- };
-
- // Both classic and subsession payload histograms should start the same.
- // The payloads should be identical for now except for the reason.
- count.clear();
- keyed.clear();
- let classic = TelemetrySession.getPayload();
- let subsession = TelemetrySession.getPayload("environment-change");
-
- Assert.equal(classic.info.reason, "gather-payload");
- Assert.equal(subsession.info.reason, "environment-change");
- Assert.ok(!(COUNT_ID in classic.histograms));
- Assert.ok(!(COUNT_ID in subsession.histograms));
- Assert.ok(!(KEYED_ID in classic.keyedHistograms));
- Assert.ok(!(KEYED_ID in subsession.keyedHistograms));
-
- checkHistograms(classic.histograms, subsession.histograms);
- checkKeyedHistograms(classic.keyedHistograms, subsession.keyedHistograms);
-
- // Adding values should get picked up in both.
- count.add(1);
- keyed.add("a", 1);
- keyed.add("b", 1);
- classic = TelemetrySession.getPayload();
- subsession = TelemetrySession.getPayload("environment-change");
-
- Assert.ok(COUNT_ID in classic.histograms);
- Assert.ok(COUNT_ID in subsession.histograms);
- Assert.ok(KEYED_ID in classic.keyedHistograms);
- Assert.ok(KEYED_ID in subsession.keyedHistograms);
- Assert.equal(classic.histograms[COUNT_ID].sum, 1);
- Assert.equal(classic.keyedHistograms[KEYED_ID]["a"].sum, 1);
- Assert.equal(classic.keyedHistograms[KEYED_ID]["b"].sum, 1);
-
- checkHistograms(classic.histograms, subsession.histograms);
- checkKeyedHistograms(classic.keyedHistograms, subsession.keyedHistograms);
-
- // Values should still reset properly.
- count.clear();
- keyed.clear();
- classic = TelemetrySession.getPayload();
- subsession = TelemetrySession.getPayload("environment-change");
-
- Assert.ok(!(COUNT_ID in classic.histograms));
- Assert.ok(!(COUNT_ID in subsession.histograms));
- Assert.ok(!(KEYED_ID in classic.keyedHistograms));
- Assert.ok(!(KEYED_ID in subsession.keyedHistograms));
-
- checkHistograms(classic.histograms, subsession.histograms);
- checkKeyedHistograms(classic.keyedHistograms, subsession.keyedHistograms);
-
- // Adding values should get picked up in both.
- count.add(1);
- keyed.add("a", 1);
- keyed.add("b", 1);
- classic = TelemetrySession.getPayload();
- subsession = TelemetrySession.getPayload("environment-change");
-
- Assert.ok(COUNT_ID in classic.histograms);
- Assert.ok(COUNT_ID in subsession.histograms);
- Assert.ok(KEYED_ID in classic.keyedHistograms);
- Assert.ok(KEYED_ID in subsession.keyedHistograms);
- Assert.equal(classic.histograms[COUNT_ID].sum, 1);
- Assert.equal(classic.keyedHistograms[KEYED_ID]["a"].sum, 1);
- Assert.equal(classic.keyedHistograms[KEYED_ID]["b"].sum, 1);
-
- checkHistograms(classic.histograms, subsession.histograms);
- checkKeyedHistograms(classic.keyedHistograms, subsession.keyedHistograms);
-
- // We should be able to reset only the subsession histograms.
- // First check that "snapshot and clear" still returns the old state...
- classic = TelemetrySession.getPayload();
- subsession = TelemetrySession.getPayload("environment-change", true);
-
- let subsessionStartDate = new Date(classic.info.subsessionStartDate);
- Assert.equal(subsessionStartDate.toISOString(), expectedDate.toISOString());
- subsessionStartDate = new Date(subsession.info.subsessionStartDate);
- Assert.equal(subsessionStartDate.toISOString(), expectedDate.toISOString());
- checkHistograms(classic.histograms, subsession.histograms);
- checkKeyedHistograms(classic.keyedHistograms, subsession.keyedHistograms);
-
- // ... then check that the next snapshot shows the subsession
- // histograms got reset.
- classic = TelemetrySession.getPayload();
- subsession = TelemetrySession.getPayload("environment-change");
-
- Assert.ok(COUNT_ID in classic.histograms);
- Assert.ok(COUNT_ID in subsession.histograms);
- Assert.equal(classic.histograms[COUNT_ID].sum, 1);
- Assert.equal(subsession.histograms[COUNT_ID].sum, 0);
-
- Assert.ok(KEYED_ID in classic.keyedHistograms);
- Assert.ok(!(KEYED_ID in subsession.keyedHistograms));
- Assert.equal(classic.keyedHistograms[KEYED_ID]["a"].sum, 1);
- Assert.equal(classic.keyedHistograms[KEYED_ID]["b"].sum, 1);
-
- // Adding values should get picked up in both again.
- count.add(1);
- keyed.add("a", 1);
- keyed.add("b", 1);
- classic = TelemetrySession.getPayload();
- subsession = TelemetrySession.getPayload("environment-change");
-
- Assert.ok(COUNT_ID in classic.histograms);
- Assert.ok(COUNT_ID in subsession.histograms);
- Assert.equal(classic.histograms[COUNT_ID].sum, 2);
- Assert.equal(subsession.histograms[COUNT_ID].sum, 1);
-
- Assert.ok(KEYED_ID in classic.keyedHistograms);
- Assert.ok(KEYED_ID in subsession.keyedHistograms);
- Assert.equal(classic.keyedHistograms[KEYED_ID]["a"].sum, 2);
- Assert.equal(classic.keyedHistograms[KEYED_ID]["b"].sum, 2);
- Assert.equal(subsession.keyedHistograms[KEYED_ID]["a"].sum, 1);
- Assert.equal(subsession.keyedHistograms[KEYED_ID]["b"].sum, 1);
-});
-
-add_task(function* test_checkSubsessionData() {
- if (gIsAndroid) {
- // We don't support subsessions yet on Android.
- return;
- }
-
- // Keep track of the active ticks count if the session recorder is available.
- let sessionRecorder = TelemetryController.getSessionRecorder();
- let activeTicksAtSubsessionStart = sessionRecorder.activeTicks;
- let expectedActiveTicks = activeTicksAtSubsessionStart;
-
- incrementActiveTicks = () => {
- sessionRecorder.incrementActiveTicks();
- ++expectedActiveTicks;
- }
-
- yield TelemetryController.testReset();
-
- // Both classic and subsession payload data should be the same on the first subsession.
- incrementActiveTicks();
- let classic = TelemetrySession.getPayload();
- let subsession = TelemetrySession.getPayload("environment-change");
- Assert.equal(classic.simpleMeasurements.activeTicks, expectedActiveTicks,
- "Classic pings must count active ticks since the beginning of the session.");
- Assert.equal(subsession.simpleMeasurements.activeTicks, expectedActiveTicks,
- "Subsessions must count active ticks as classic pings on the first subsession.");
-
- // Start a new subsession and check that the active ticks are correctly reported.
- incrementActiveTicks();
- activeTicksAtSubsessionStart = sessionRecorder.activeTicks;
- classic = TelemetrySession.getPayload();
- subsession = TelemetrySession.getPayload("environment-change", true);
- Assert.equal(classic.simpleMeasurements.activeTicks, expectedActiveTicks,
- "Classic pings must count active ticks since the beginning of the session.");
- Assert.equal(subsession.simpleMeasurements.activeTicks, expectedActiveTicks,
- "Pings must not loose the tick count when starting a new subsession.");
-
- // Get a new subsession payload without clearing the subsession.
- incrementActiveTicks();
- classic = TelemetrySession.getPayload();
- subsession = TelemetrySession.getPayload("environment-change");
- Assert.equal(classic.simpleMeasurements.activeTicks, expectedActiveTicks,
- "Classic pings must count active ticks since the beginning of the session.");
- Assert.equal(subsession.simpleMeasurements.activeTicks,
- expectedActiveTicks - activeTicksAtSubsessionStart,
- "Subsessions must count active ticks since the last new subsession.");
-});
-
-add_task(function* test_dailyCollection() {
- if (gIsAndroid) {
- // We don't do daily collections yet on Android.
- return;
- }
-
- let now = new Date(2030, 1, 1, 12, 0, 0);
- let nowDay = new Date(2030, 1, 1, 0, 0, 0);
- let schedulerTickCallback = null;
-
- PingServer.clearRequests();
-
- fakeNow(now);
-
- // Fake scheduler functions to control daily collection flow in tests.
- fakeSchedulerTimer(callback => schedulerTickCallback = callback, () => {});
-
- // Init and check timer.
- yield TelemetryStorage.testClearPendingPings();
- yield TelemetryController.testSetup();
- TelemetrySend.setServer("http://localhost:" + PingServer.port);
-
- // Set histograms to expected state.
- const COUNT_ID = "TELEMETRY_TEST_COUNT";
- const KEYED_ID = "TELEMETRY_TEST_KEYED_COUNT";
- const count = Telemetry.getHistogramById(COUNT_ID);
- const keyed = Telemetry.getKeyedHistogramById(KEYED_ID);
-
- count.clear();
- keyed.clear();
- count.add(1);
- keyed.add("a", 1);
- keyed.add("b", 1);
- keyed.add("b", 1);
-
- // Make sure the daily ping gets triggered.
- let expectedDate = nowDay;
- now = futureDate(nowDay, MS_IN_ONE_DAY);
- fakeNow(now);
-
- Assert.ok(!!schedulerTickCallback);
- // Run a scheduler tick: it should trigger the daily ping.
- yield schedulerTickCallback();
-
- // Collect the daily ping.
- let ping = yield PingServer.promiseNextPing();
- Assert.ok(!!ping);
-
- Assert.equal(ping.type, PING_TYPE_MAIN);
- Assert.equal(ping.payload.info.reason, REASON_DAILY);
- let subsessionStartDate = new Date(ping.payload.info.subsessionStartDate);
- Assert.equal(subsessionStartDate.toISOString(), expectedDate.toISOString());
-
- Assert.equal(ping.payload.histograms[COUNT_ID].sum, 1);
- Assert.equal(ping.payload.keyedHistograms[KEYED_ID]["a"].sum, 1);
- Assert.equal(ping.payload.keyedHistograms[KEYED_ID]["b"].sum, 2);
-
- // The daily ping is rescheduled for "tomorrow".
- expectedDate = futureDate(expectedDate, MS_IN_ONE_DAY);
- now = futureDate(now, MS_IN_ONE_DAY);
- fakeNow(now);
-
- // Run a scheduler tick. Trigger and collect another ping. The histograms should be reset.
- yield schedulerTickCallback();
-
- ping = yield PingServer.promiseNextPing();
- Assert.ok(!!ping);
-
- Assert.equal(ping.type, PING_TYPE_MAIN);
- Assert.equal(ping.payload.info.reason, REASON_DAILY);
- subsessionStartDate = new Date(ping.payload.info.subsessionStartDate);
- Assert.equal(subsessionStartDate.toISOString(), expectedDate.toISOString());
-
- Assert.equal(ping.payload.histograms[COUNT_ID].sum, 0);
- Assert.ok(!(KEYED_ID in ping.payload.keyedHistograms));
-
- // Trigger and collect another daily ping, with the histograms being set again.
- count.add(1);
- keyed.add("a", 1);
- keyed.add("b", 1);
-
- // The daily ping is rescheduled for "tomorrow".
- expectedDate = futureDate(expectedDate, MS_IN_ONE_DAY);
- now = futureDate(now, MS_IN_ONE_DAY);
- fakeNow(now);
-
- yield schedulerTickCallback();
- ping = yield PingServer.promiseNextPing();
- Assert.ok(!!ping);
-
- Assert.equal(ping.type, PING_TYPE_MAIN);
- Assert.equal(ping.payload.info.reason, REASON_DAILY);
- subsessionStartDate = new Date(ping.payload.info.subsessionStartDate);
- Assert.equal(subsessionStartDate.toISOString(), expectedDate.toISOString());
-
- Assert.equal(ping.payload.histograms[COUNT_ID].sum, 1);
- Assert.equal(ping.payload.keyedHistograms[KEYED_ID]["a"].sum, 1);
- Assert.equal(ping.payload.keyedHistograms[KEYED_ID]["b"].sum, 1);
-
- // Shutdown to cleanup the aborted-session if it gets created.
- yield TelemetryController.testShutdown();
-});
-
-add_task(function* test_dailyDuplication() {
- if (gIsAndroid) {
- // We don't do daily collections yet on Android.
- return;
- }
-
- yield TelemetrySend.reset();
- yield TelemetryStorage.testClearPendingPings();
- PingServer.clearRequests();
-
- let schedulerTickCallback = null;
- let now = new Date(2030, 1, 1, 0, 0, 0);
- fakeNow(now);
- // Fake scheduler functions to control daily collection flow in tests.
- fakeSchedulerTimer(callback => schedulerTickCallback = callback, () => {});
- yield TelemetryController.testReset();
-
- // Make sure the daily ping gets triggered at midnight.
- // We need to make sure that we trigger this after the period where we wait for
- // the user to become idle.
- let firstDailyDue = new Date(2030, 1, 2, 0, 0, 0);
- fakeNow(firstDailyDue);
-
- // Run a scheduler tick: it should trigger the daily ping.
- Assert.ok(!!schedulerTickCallback);
- yield schedulerTickCallback();
-
- // Get the first daily ping.
- let ping = yield PingServer.promiseNextPing();
- Assert.ok(!!ping);
-
- Assert.equal(ping.type, PING_TYPE_MAIN);
- Assert.equal(ping.payload.info.reason, REASON_DAILY);
-
- // We don't expect to receive any other daily ping in this test, so assert if we do.
- PingServer.registerPingHandler((req, res) => {
- Assert.ok(false, "No more daily pings should be sent/received in this test.");
- });
-
- // Set the current time to a bit after midnight.
- let secondDailyDue = new Date(firstDailyDue);
- secondDailyDue.setHours(0);
- secondDailyDue.setMinutes(15);
- fakeNow(secondDailyDue);
-
- // Run a scheduler tick: it should NOT trigger the daily ping.
- Assert.ok(!!schedulerTickCallback);
- yield schedulerTickCallback();
-
- // Shutdown to cleanup the aborted-session if it gets created.
- PingServer.resetPingHandler();
- yield TelemetryController.testShutdown();
-});
-
-add_task(function* test_dailyOverdue() {
- if (gIsAndroid) {
- // We don't do daily collections yet on Android.
- return;
- }
-
- let schedulerTickCallback = null;
- let now = new Date(2030, 1, 1, 11, 0, 0);
- fakeNow(now);
- // Fake scheduler functions to control daily collection flow in tests.
- fakeSchedulerTimer(callback => schedulerTickCallback = callback, () => {});
- yield TelemetryStorage.testClearPendingPings();
- yield TelemetryController.testReset();
-
- // Skip one hour ahead: nothing should be due.
- now.setHours(now.getHours() + 1);
- fakeNow(now);
-
- // Assert if we receive something!
- PingServer.registerPingHandler((req, res) => {
- Assert.ok(false, "No daily ping should be received if not overdue!.");
- });
-
- // This tick should not trigger any daily ping.
- Assert.ok(!!schedulerTickCallback);
- yield schedulerTickCallback();
-
- // Restore the non asserting ping handler.
- PingServer.resetPingHandler();
- PingServer.clearRequests();
-
- // Simulate an overdue ping: we're not close to midnight, but the last daily ping
- // time is too long ago.
- let dailyOverdue = new Date(2030, 1, 2, 13, 0, 0);
- fakeNow(dailyOverdue);
-
- // Run a scheduler tick: it should trigger the daily ping.
- Assert.ok(!!schedulerTickCallback);
- yield schedulerTickCallback();
-
- // Get the first daily ping.
- let ping = yield PingServer.promiseNextPing();
- Assert.ok(!!ping);
-
- Assert.equal(ping.type, PING_TYPE_MAIN);
- Assert.equal(ping.payload.info.reason, REASON_DAILY);
-
- // Shutdown to cleanup the aborted-session if it gets created.
- yield TelemetryController.testShutdown();
-});
-
-add_task(function* test_environmentChange() {
- if (gIsAndroid) {
- // We don't split subsessions on environment changes yet on Android.
- return;
- }
-
- yield TelemetryStorage.testClearPendingPings();
- PingServer.clearRequests();
-
- let now = fakeNow(2040, 1, 1, 12, 0, 0);
- gMonotonicNow = fakeMonotonicNow(gMonotonicNow + 10 * MILLISECONDS_PER_MINUTE);
-
- const PREF_TEST = "toolkit.telemetry.test.pref1";
- Preferences.reset(PREF_TEST);
-
- const PREFS_TO_WATCH = new Map([
- [PREF_TEST, {what: TelemetryEnvironment.RECORD_PREF_VALUE}],
- ]);
-
- // Setup.
- yield TelemetryController.testReset();
- TelemetrySend.setServer("http://localhost:" + PingServer.port);
- TelemetryEnvironment.testWatchPreferences(PREFS_TO_WATCH);
-
- // Set histograms to expected state.
- const COUNT_ID = "TELEMETRY_TEST_COUNT";
- const KEYED_ID = "TELEMETRY_TEST_KEYED_COUNT";
- const count = Telemetry.getHistogramById(COUNT_ID);
- const keyed = Telemetry.getKeyedHistogramById(KEYED_ID);
-
- count.clear();
- keyed.clear();
- count.add(1);
- keyed.add("a", 1);
- keyed.add("b", 1);
-
- // Trigger and collect environment-change ping.
- gMonotonicNow = fakeMonotonicNow(gMonotonicNow + 10 * MILLISECONDS_PER_MINUTE);
- let startDay = truncateDateToDays(now);
- now = fakeNow(futureDate(now, 10 * MILLISECONDS_PER_MINUTE));
-
- Preferences.set(PREF_TEST, 1);
- let ping = yield PingServer.promiseNextPing();
- Assert.ok(!!ping);
-
- Assert.equal(ping.type, PING_TYPE_MAIN);
- Assert.equal(ping.environment.settings.userPrefs[PREF_TEST], undefined);
- Assert.equal(ping.payload.info.reason, REASON_ENVIRONMENT_CHANGE);
- let subsessionStartDate = new Date(ping.payload.info.subsessionStartDate);
- Assert.equal(subsessionStartDate.toISOString(), startDay.toISOString());
-
- Assert.equal(ping.payload.histograms[COUNT_ID].sum, 1);
- Assert.equal(ping.payload.keyedHistograms[KEYED_ID]["a"].sum, 1);
-
- // Trigger and collect another ping. The histograms should be reset.
- startDay = truncateDateToDays(now);
- gMonotonicNow = fakeMonotonicNow(gMonotonicNow + 10 * MILLISECONDS_PER_MINUTE);
- now = fakeNow(futureDate(now, 10 * MILLISECONDS_PER_MINUTE));
-
- Preferences.set(PREF_TEST, 2);
- ping = yield PingServer.promiseNextPing();
- Assert.ok(!!ping);
-
- Assert.equal(ping.type, PING_TYPE_MAIN);
- Assert.equal(ping.environment.settings.userPrefs[PREF_TEST], 1);
- Assert.equal(ping.payload.info.reason, REASON_ENVIRONMENT_CHANGE);
- subsessionStartDate = new Date(ping.payload.info.subsessionStartDate);
- Assert.equal(subsessionStartDate.toISOString(), startDay.toISOString());
-
- Assert.equal(ping.payload.histograms[COUNT_ID].sum, 0);
- Assert.ok(!(KEYED_ID in ping.payload.keyedHistograms));
-});
-
-add_task(function* test_savedPingsOnShutdown() {
- // On desktop, we expect both "saved-session" and "shutdown" pings. We only expect
- // the former on Android.
- const expectedPingCount = (gIsAndroid) ? 1 : 2;
- // Assure that we store the ping properly when saving sessions on shutdown.
- // We make the TelemetryController shutdown to trigger a session save.
- const dir = TelemetryStorage.pingDirectoryPath;
- yield OS.File.removeDir(dir, {ignoreAbsent: true});
- yield OS.File.makeDir(dir);
- yield TelemetryController.testShutdown();
-
- PingServer.clearRequests();
- yield TelemetryController.testReset();
-
- const pings = yield PingServer.promiseNextPings(expectedPingCount);
-
- for (let ping of pings) {
- Assert.ok("type" in ping);
-
- let expectedReason =
- (ping.type == PING_TYPE_SAVED_SESSION) ? REASON_SAVED_SESSION : REASON_SHUTDOWN;
-
- checkPingFormat(ping, ping.type, true, true);
- Assert.equal(ping.payload.info.reason, expectedReason);
- Assert.equal(ping.clientId, gClientID);
- }
-});
-
-add_task(function* test_savedSessionData() {
- // Create the directory which will contain the data file, if it doesn't already
- // exist.
- yield OS.File.makeDir(DATAREPORTING_PATH);
- getHistogram("TELEMETRY_SESSIONDATA_FAILED_LOAD").clear();
- getHistogram("TELEMETRY_SESSIONDATA_FAILED_PARSE").clear();
- getHistogram("TELEMETRY_SESSIONDATA_FAILED_VALIDATION").clear();
-
- // Write test data to the session data file.
- const dataFilePath = OS.Path.join(DATAREPORTING_PATH, "session-state.json");
- const sessionState = {
- sessionId: null,
- subsessionId: null,
- profileSubsessionCounter: 3785,
- };
- yield CommonUtils.writeJSON(sessionState, dataFilePath);
-
- const PREF_TEST = "toolkit.telemetry.test.pref1";
- Preferences.reset(PREF_TEST);
- const PREFS_TO_WATCH = new Map([
- [PREF_TEST, {what: TelemetryEnvironment.RECORD_PREF_VALUE}],
- ]);
-
- // We expect one new subsession when starting TelemetrySession and one after triggering
- // an environment change.
- const expectedSubsessions = sessionState.profileSubsessionCounter + 2;
- const expectedSessionUUID = "ff602e52-47a1-b7e8-4c1a-ffffffffc87a";
- const expectedSubsessionUUID = "009fd1ad-b85e-4817-b3e5-000000003785";
- fakeGenerateUUID(() => expectedSessionUUID, () => expectedSubsessionUUID);
-
- if (gIsAndroid) {
- // We don't support subsessions yet on Android, so skip the next checks.
- return;
- }
-
- // Start TelemetrySession so that it loads the session data file.
- yield TelemetryController.testReset();
- Assert.equal(0, getSnapshot("TELEMETRY_SESSIONDATA_FAILED_LOAD").sum);
- Assert.equal(0, getSnapshot("TELEMETRY_SESSIONDATA_FAILED_PARSE").sum);
- Assert.equal(0, getSnapshot("TELEMETRY_SESSIONDATA_FAILED_VALIDATION").sum);
-
- // Watch a test preference, trigger and environment change and wait for it to propagate.
- // _watchPreferences triggers a subsession notification
- gMonotonicNow = fakeMonotonicNow(gMonotonicNow + 10 * MILLISECONDS_PER_MINUTE);
- fakeNow(new Date(2050, 1, 1, 12, 0, 0));
- TelemetryEnvironment.testWatchPreferences(PREFS_TO_WATCH);
- let changePromise = new Promise(resolve =>
- TelemetryEnvironment.registerChangeListener("test_fake_change", resolve));
- Preferences.set(PREF_TEST, 1);
- yield changePromise;
- TelemetryEnvironment.unregisterChangeListener("test_fake_change");
-
- let payload = TelemetrySession.getPayload();
- Assert.equal(payload.info.profileSubsessionCounter, expectedSubsessions);
- yield TelemetryController.testShutdown();
-
- // Restore the UUID generator so we don't mess with other tests.
- fakeGenerateUUID(generateUUID, generateUUID);
-
- // Load back the serialised session data.
- let data = yield CommonUtils.readJSON(dataFilePath);
- Assert.equal(data.profileSubsessionCounter, expectedSubsessions);
- Assert.equal(data.sessionId, expectedSessionUUID);
- Assert.equal(data.subsessionId, expectedSubsessionUUID);
-});
-
-add_task(function* test_sessionData_ShortSession() {
- if (gIsAndroid) {
- // We don't support subsessions yet on Android, so skip the next checks.
- return;
- }
-
- const SESSION_STATE_PATH = OS.Path.join(DATAREPORTING_PATH, "session-state.json");
-
- // Shut down Telemetry and remove the session state file.
- yield TelemetryController.testReset();
- yield OS.File.remove(SESSION_STATE_PATH, { ignoreAbsent: true });
- getHistogram("TELEMETRY_SESSIONDATA_FAILED_LOAD").clear();
- getHistogram("TELEMETRY_SESSIONDATA_FAILED_PARSE").clear();
- getHistogram("TELEMETRY_SESSIONDATA_FAILED_VALIDATION").clear();
-
- const expectedSessionUUID = "ff602e52-47a1-b7e8-4c1a-ffffffffc87a";
- const expectedSubsessionUUID = "009fd1ad-b85e-4817-b3e5-000000003785";
- fakeGenerateUUID(() => expectedSessionUUID, () => expectedSubsessionUUID);
-
- // We intentionally don't wait for the setup to complete and shut down to simulate
- // short sessions. We expect the profile subsession counter to be 1.
- TelemetryController.testReset();
- yield TelemetryController.testShutdown();
-
- Assert.equal(1, getSnapshot("TELEMETRY_SESSIONDATA_FAILED_LOAD").sum);
- Assert.equal(0, getSnapshot("TELEMETRY_SESSIONDATA_FAILED_PARSE").sum);
- Assert.equal(0, getSnapshot("TELEMETRY_SESSIONDATA_FAILED_VALIDATION").sum);
-
- // Restore the UUID generation functions.
- fakeGenerateUUID(generateUUID, generateUUID);
-
- // Start TelemetryController so that it loads the session data file. We expect the profile
- // subsession counter to be incremented by 1 again.
- yield TelemetryController.testReset();
-
- // We expect 2 profile subsession counter updates.
- let payload = TelemetrySession.getPayload();
- Assert.equal(payload.info.profileSubsessionCounter, 2);
- Assert.equal(payload.info.previousSessionId, expectedSessionUUID);
- Assert.equal(payload.info.previousSubsessionId, expectedSubsessionUUID);
- Assert.equal(1, getSnapshot("TELEMETRY_SESSIONDATA_FAILED_LOAD").sum);
- Assert.equal(0, getSnapshot("TELEMETRY_SESSIONDATA_FAILED_PARSE").sum);
- Assert.equal(0, getSnapshot("TELEMETRY_SESSIONDATA_FAILED_VALIDATION").sum);
-});
-
-add_task(function* test_invalidSessionData() {
- // Create the directory which will contain the data file, if it doesn't already
- // exist.
- yield OS.File.makeDir(DATAREPORTING_PATH);
- getHistogram("TELEMETRY_SESSIONDATA_FAILED_LOAD").clear();
- getHistogram("TELEMETRY_SESSIONDATA_FAILED_PARSE").clear();
- getHistogram("TELEMETRY_SESSIONDATA_FAILED_VALIDATION").clear();
-
- // Write test data to the session data file. This should fail to parse.
- const dataFilePath = OS.Path.join(DATAREPORTING_PATH, "session-state.json");
- const unparseableData = "{asdf:@äü";
- OS.File.writeAtomic(dataFilePath, unparseableData,
- {encoding: "utf-8", tmpPath: dataFilePath + ".tmp"});
-
- // Start TelemetryController so that it loads the session data file.
- yield TelemetryController.testReset();
-
- // The session data file should not load. Only expect the current subsession.
- Assert.equal(0, getSnapshot("TELEMETRY_SESSIONDATA_FAILED_LOAD").sum);
- Assert.equal(1, getSnapshot("TELEMETRY_SESSIONDATA_FAILED_PARSE").sum);
- Assert.equal(0, getSnapshot("TELEMETRY_SESSIONDATA_FAILED_VALIDATION").sum);
-
- // Write test data to the session data file. This should fail validation.
- const sessionState = {
- profileSubsessionCounter: "not-a-number?",
- someOtherField: 12,
- };
- yield CommonUtils.writeJSON(sessionState, dataFilePath);
-
- // The session data file should not load. Only expect the current subsession.
- const expectedSubsessions = 1;
- const expectedSessionUUID = "ff602e52-47a1-b7e8-4c1a-ffffffffc87a";
- const expectedSubsessionUUID = "009fd1ad-b85e-4817-b3e5-000000003785";
- fakeGenerateUUID(() => expectedSessionUUID, () => expectedSubsessionUUID);
-
- // Start TelemetryController so that it loads the session data file.
- yield TelemetryController.testReset();
-
- let payload = TelemetrySession.getPayload();
- Assert.equal(payload.info.profileSubsessionCounter, expectedSubsessions);
- Assert.equal(0, getSnapshot("TELEMETRY_SESSIONDATA_FAILED_LOAD").sum);
- Assert.equal(1, getSnapshot("TELEMETRY_SESSIONDATA_FAILED_PARSE").sum);
- Assert.equal(1, getSnapshot("TELEMETRY_SESSIONDATA_FAILED_VALIDATION").sum);
-
- yield TelemetryController.testShutdown();
-
- // Restore the UUID generator so we don't mess with other tests.
- fakeGenerateUUID(generateUUID, generateUUID);
-
- // Load back the serialised session data.
- let data = yield CommonUtils.readJSON(dataFilePath);
- Assert.equal(data.profileSubsessionCounter, expectedSubsessions);
- Assert.equal(data.sessionId, expectedSessionUUID);
- Assert.equal(data.subsessionId, expectedSubsessionUUID);
-});
-
-add_task(function* test_abortedSession() {
- if (gIsAndroid || gIsGonk) {
- // We don't have the aborted session ping here.
- return;
- }
-
- const ABORTED_FILE = OS.Path.join(DATAREPORTING_PATH, ABORTED_PING_FILE_NAME);
-
- // Make sure the aborted sessions directory does not exist to test its creation.
- yield OS.File.removeDir(DATAREPORTING_PATH, { ignoreAbsent: true });
-
- let schedulerTickCallback = null;
- let now = new Date(2040, 1, 1, 0, 0, 0);
- fakeNow(now);
- // Fake scheduler functions to control aborted-session flow in tests.
- fakeSchedulerTimer(callback => schedulerTickCallback = callback, () => {});
- yield TelemetryController.testReset();
-
- Assert.ok((yield OS.File.exists(DATAREPORTING_PATH)),
- "Telemetry must create the aborted session directory when starting.");
-
- // Fake now again so that the scheduled aborted-session save takes place.
- now = futureDate(now, ABORTED_SESSION_UPDATE_INTERVAL_MS);
- fakeNow(now);
- // The first aborted session checkpoint must take place right after the initialisation.
- Assert.ok(!!schedulerTickCallback);
- // Execute one scheduler tick.
- yield schedulerTickCallback();
- // Check that the aborted session is due at the correct time.
- Assert.ok((yield OS.File.exists(ABORTED_FILE)),
- "There must be an aborted session ping.");
-
- // This ping is not yet in the pending pings folder, so we can't access it using
- // TelemetryStorage.popPendingPings().
- let pingContent = yield OS.File.read(ABORTED_FILE, { encoding: "utf-8" });
- let abortedSessionPing = JSON.parse(pingContent);
-
- // Validate the ping.
- checkPingFormat(abortedSessionPing, PING_TYPE_MAIN, true, true);
- Assert.equal(abortedSessionPing.payload.info.reason, REASON_ABORTED_SESSION);
-
- // Trigger a another aborted-session ping and check that it overwrites the previous one.
- now = futureDate(now, ABORTED_SESSION_UPDATE_INTERVAL_MS);
- fakeNow(now);
- yield schedulerTickCallback();
-
- pingContent = yield OS.File.read(ABORTED_FILE, { encoding: "utf-8" });
- let updatedAbortedSessionPing = JSON.parse(pingContent);
- checkPingFormat(updatedAbortedSessionPing, PING_TYPE_MAIN, true, true);
- Assert.equal(updatedAbortedSessionPing.payload.info.reason, REASON_ABORTED_SESSION);
- Assert.notEqual(abortedSessionPing.id, updatedAbortedSessionPing.id);
- Assert.notEqual(abortedSessionPing.creationDate, updatedAbortedSessionPing.creationDate);
-
- yield TelemetryController.testShutdown();
- Assert.ok(!(yield OS.File.exists(ABORTED_FILE)),
- "No aborted session ping must be available after a shutdown.");
-
- // Write the ping to the aborted-session file. TelemetrySession will add it to the
- // saved pings directory when it starts.
- yield TelemetryStorage.savePingToFile(abortedSessionPing, ABORTED_FILE, false);
- Assert.ok((yield OS.File.exists(ABORTED_FILE)),
- "The aborted session ping must exist in the aborted session ping directory.");
-
- yield TelemetryStorage.testClearPendingPings();
- PingServer.clearRequests();
- yield TelemetryController.testReset();
-
- Assert.ok(!(yield OS.File.exists(ABORTED_FILE)),
- "The aborted session ping must be removed from the aborted session ping directory.");
-
- // Restarting Telemetry again to trigger sending pings in TelemetrySend.
- yield TelemetryController.testReset();
-
- // We should have received an aborted-session ping.
- const receivedPing = yield PingServer.promiseNextPing();
- Assert.equal(receivedPing.type, PING_TYPE_MAIN, "Should have the correct type");
- Assert.equal(receivedPing.payload.info.reason, REASON_ABORTED_SESSION, "Ping should have the correct reason");
-
- yield TelemetryController.testShutdown();
-});
-
-add_task(function* test_abortedSession_Shutdown() {
- if (gIsAndroid || gIsGonk) {
- // We don't have the aborted session ping here.
- return;
- }
-
- const ABORTED_FILE = OS.Path.join(DATAREPORTING_PATH, ABORTED_PING_FILE_NAME);
-
- let schedulerTickCallback = null;
- let now = fakeNow(2040, 1, 1, 0, 0, 0);
- // Fake scheduler functions to control aborted-session flow in tests.
- fakeSchedulerTimer(callback => schedulerTickCallback = callback, () => {});
- yield TelemetryController.testReset();
-
- Assert.ok((yield OS.File.exists(DATAREPORTING_PATH)),
- "Telemetry must create the aborted session directory when starting.");
-
- // Fake now again so that the scheduled aborted-session save takes place.
- fakeNow(futureDate(now, ABORTED_SESSION_UPDATE_INTERVAL_MS));
- // The first aborted session checkpoint must take place right after the initialisation.
- Assert.ok(!!schedulerTickCallback);
- // Execute one scheduler tick.
- yield schedulerTickCallback();
- // Check that the aborted session is due at the correct time.
- Assert.ok((yield OS.File.exists(ABORTED_FILE)), "There must be an aborted session ping.");
-
- // Remove the aborted session file and then shut down to make sure exceptions (e.g file
- // not found) do not compromise the shutdown.
- yield OS.File.remove(ABORTED_FILE);
-
- yield TelemetryController.testShutdown();
-});
-
-add_task(function* test_abortedDailyCoalescing() {
- if (gIsAndroid || gIsGonk) {
- // We don't have the aborted session or the daily ping here.
- return;
- }
-
- const ABORTED_FILE = OS.Path.join(DATAREPORTING_PATH, ABORTED_PING_FILE_NAME);
-
- // Make sure the aborted sessions directory does not exist to test its creation.
- yield OS.File.removeDir(DATAREPORTING_PATH, { ignoreAbsent: true });
-
- let schedulerTickCallback = null;
- PingServer.clearRequests();
-
- let nowDate = new Date(2009, 10, 18, 0, 0, 0);
- fakeNow(nowDate);
-
- // Fake scheduler functions to control aborted-session flow in tests.
- fakeSchedulerTimer(callback => schedulerTickCallback = callback, () => {});
- yield TelemetryStorage.testClearPendingPings();
- PingServer.clearRequests();
- yield TelemetryController.testReset();
-
- Assert.ok((yield OS.File.exists(DATAREPORTING_PATH)),
- "Telemetry must create the aborted session directory when starting.");
-
- // Delay the callback around midnight so that the aborted-session ping gets merged with the
- // daily ping.
- let dailyDueDate = futureDate(nowDate, MS_IN_ONE_DAY);
- fakeNow(dailyDueDate);
- // Trigger both the daily ping and the saved-session.
- Assert.ok(!!schedulerTickCallback);
- // Execute one scheduler tick.
- yield schedulerTickCallback();
-
- // Wait for the daily ping.
- let dailyPing = yield PingServer.promiseNextPing();
- Assert.equal(dailyPing.payload.info.reason, REASON_DAILY);
-
- // Check that an aborted session ping was also written to disk.
- Assert.ok((yield OS.File.exists(ABORTED_FILE)),
- "There must be an aborted session ping.");
-
- // Read aborted session ping and check that the session/subsession ids equal the
- // ones in the daily ping.
- let pingContent = yield OS.File.read(ABORTED_FILE, { encoding: "utf-8" });
- let abortedSessionPing = JSON.parse(pingContent);
- Assert.equal(abortedSessionPing.payload.info.sessionId, dailyPing.payload.info.sessionId);
- Assert.equal(abortedSessionPing.payload.info.subsessionId, dailyPing.payload.info.subsessionId);
-
- yield TelemetryController.testShutdown();
-});
-
-add_task(function* test_schedulerComputerSleep() {
- if (gIsAndroid || gIsGonk) {
- // We don't have the aborted session or the daily ping here.
- return;
- }
-
- const ABORTED_FILE = OS.Path.join(DATAREPORTING_PATH, ABORTED_PING_FILE_NAME);
-
- yield TelemetryStorage.testClearPendingPings();
- yield TelemetryController.testReset();
- PingServer.clearRequests();
-
- // Remove any aborted-session ping from the previous tests.
- yield OS.File.removeDir(DATAREPORTING_PATH, { ignoreAbsent: true });
-
- // Set a fake current date and start Telemetry.
- let nowDate = fakeNow(2009, 10, 18, 0, 0, 0);
- let schedulerTickCallback = null;
- fakeSchedulerTimer(callback => schedulerTickCallback = callback, () => {});
- yield TelemetryController.testReset();
-
- // Set the current time 3 days in the future at midnight, before running the callback.
- nowDate = fakeNow(futureDate(nowDate, 3 * MS_IN_ONE_DAY));
- Assert.ok(!!schedulerTickCallback);
- // Execute one scheduler tick.
- yield schedulerTickCallback();
-
- let dailyPing = yield PingServer.promiseNextPing();
- Assert.equal(dailyPing.payload.info.reason, REASON_DAILY,
- "The wake notification should have triggered a daily ping.");
- Assert.equal(dailyPing.creationDate, nowDate.toISOString(),
- "The daily ping date should be correct.");
-
- Assert.ok((yield OS.File.exists(ABORTED_FILE)),
- "There must be an aborted session ping.");
-
- // Now also test if we are sending a daily ping if we wake up on the next
- // day even when the timer doesn't trigger.
- // This can happen due to timeouts not running out during sleep times,
- // see bug 1262386, bug 1204823 et al.
- // Note that we don't get wake notifications on Linux due to bug 758848.
- nowDate = fakeNow(futureDate(nowDate, 1 * MS_IN_ONE_DAY));
-
- // We emulate the mentioned timeout behavior by sending the wake notification
- // instead of triggering the timeout callback.
- // This should trigger a daily ping, because we passed midnight.
- Services.obs.notifyObservers(null, "wake_notification", null);
-
- dailyPing = yield PingServer.promiseNextPing();
- Assert.equal(dailyPing.payload.info.reason, REASON_DAILY,
- "The wake notification should have triggered a daily ping.");
- Assert.equal(dailyPing.creationDate, nowDate.toISOString(),
- "The daily ping date should be correct.");
-
- yield TelemetryController.testShutdown();
-});
-
-add_task(function* test_schedulerEnvironmentReschedules() {
- if (gIsAndroid || gIsGonk) {
- // We don't have the aborted session or the daily ping here.
- return;
- }
-
- // Reset the test preference.
- const PREF_TEST = "toolkit.telemetry.test.pref1";
- Preferences.reset(PREF_TEST);
- const PREFS_TO_WATCH = new Map([
- [PREF_TEST, {what: TelemetryEnvironment.RECORD_PREF_VALUE}],
- ]);
-
- yield TelemetryStorage.testClearPendingPings();
- PingServer.clearRequests();
- yield TelemetryController.testReset();
-
- // Set a fake current date and start Telemetry.
- let nowDate = fakeNow(2060, 10, 18, 0, 0, 0);
- gMonotonicNow = fakeMonotonicNow(gMonotonicNow + 10 * MILLISECONDS_PER_MINUTE);
- let schedulerTickCallback = null;
- fakeSchedulerTimer(callback => schedulerTickCallback = callback, () => {});
- yield TelemetryController.testReset();
- TelemetryEnvironment.testWatchPreferences(PREFS_TO_WATCH);
-
- // Set the current time at midnight.
- fakeNow(futureDate(nowDate, MS_IN_ONE_DAY));
- gMonotonicNow = fakeMonotonicNow(gMonotonicNow + 10 * MILLISECONDS_PER_MINUTE);
-
- // Trigger the environment change.
- Preferences.set(PREF_TEST, 1);
-
- // Wait for the environment-changed ping.
- yield PingServer.promiseNextPing();
-
- // We don't expect to receive any daily ping in this test, so assert if we do.
- PingServer.registerPingHandler((req, res) => {
- Assert.ok(false, "No ping should be sent/received in this test.");
- });
-
- // Execute one scheduler tick. It should not trigger a daily ping.
- Assert.ok(!!schedulerTickCallback);
- yield schedulerTickCallback();
- yield TelemetryController.testShutdown();
-});
-
-add_task(function* test_schedulerNothingDue() {
- if (gIsAndroid || gIsGonk) {
- // We don't have the aborted session or the daily ping here.
- return;
- }
-
- const ABORTED_FILE = OS.Path.join(DATAREPORTING_PATH, ABORTED_PING_FILE_NAME);
-
- // Remove any aborted-session ping from the previous tests.
- yield OS.File.removeDir(DATAREPORTING_PATH, { ignoreAbsent: true });
- yield TelemetryStorage.testClearPendingPings();
- yield TelemetryController.testReset();
-
- // We don't expect to receive any ping in this test, so assert if we do.
- PingServer.registerPingHandler((req, res) => {
- Assert.ok(false, "No ping should be sent/received in this test.");
- });
-
- // Set a current date/time away from midnight, so that the daily ping doesn't get
- // sent.
- let nowDate = new Date(2009, 10, 18, 11, 0, 0);
- fakeNow(nowDate);
- let schedulerTickCallback = null;
- fakeSchedulerTimer(callback => schedulerTickCallback = callback, () => {});
- yield TelemetryController.testReset();
-
- // Delay the callback execution to a time when no ping should be due.
- let nothingDueDate = futureDate(nowDate, ABORTED_SESSION_UPDATE_INTERVAL_MS / 2);
- fakeNow(nothingDueDate);
- Assert.ok(!!schedulerTickCallback);
- // Execute one scheduler tick.
- yield schedulerTickCallback();
-
- // Check that no aborted session ping was written to disk.
- Assert.ok(!(yield OS.File.exists(ABORTED_FILE)));
-
- yield TelemetryController.testShutdown();
- PingServer.resetPingHandler();
-});
-
-add_task(function* test_pingExtendedStats() {
- const EXTENDED_PAYLOAD_FIELDS = [
- "chromeHangs", "threadHangStats", "log", "slowSQL", "fileIOReports", "lateWrites",
- "addonHistograms", "addonDetails", "UIMeasurements", "webrtc"
- ];
-
- // Reset telemetry and disable sending extended statistics.
- yield TelemetryStorage.testClearPendingPings();
- PingServer.clearRequests();
- yield TelemetryController.testReset();
- Telemetry.canRecordExtended = false;
-
- yield sendPing();
-
- let ping = yield PingServer.promiseNextPing();
- checkPingFormat(ping, PING_TYPE_MAIN, true, true);
-
- // Check that the payload does not contain extended statistics fields.
- for (let f in EXTENDED_PAYLOAD_FIELDS) {
- Assert.ok(!(EXTENDED_PAYLOAD_FIELDS[f] in ping.payload),
- EXTENDED_PAYLOAD_FIELDS[f] + " must not be in the payload if the extended set is off.");
- }
-
- // We check this one separately so that we can reuse EXTENDED_PAYLOAD_FIELDS below, since
- // slowSQLStartup might not be there.
- Assert.ok(!("slowSQLStartup" in ping.payload),
- "slowSQLStartup must not be sent if the extended set is off");
-
- Assert.ok(!("addonManager" in ping.payload.simpleMeasurements),
- "addonManager must not be sent if the extended set is off.");
- Assert.ok(!("UITelemetry" in ping.payload.simpleMeasurements),
- "UITelemetry must not be sent if the extended set is off.");
-
- // Restore the preference.
- Telemetry.canRecordExtended = true;
-
- // Send a new ping that should contain the extended data.
- yield sendPing();
- ping = yield PingServer.promiseNextPing();
- checkPingFormat(ping, PING_TYPE_MAIN, true, true);
-
- // Check that the payload now contains extended statistics fields.
- for (let f in EXTENDED_PAYLOAD_FIELDS) {
- Assert.ok(EXTENDED_PAYLOAD_FIELDS[f] in ping.payload,
- EXTENDED_PAYLOAD_FIELDS[f] + " must be in the payload if the extended set is on.");
- }
-
- Assert.ok("addonManager" in ping.payload.simpleMeasurements,
- "addonManager must be sent if the extended set is on.");
- Assert.ok("UITelemetry" in ping.payload.simpleMeasurements,
- "UITelemetry must be sent if the extended set is on.");
-});
-
-add_task(function* test_schedulerUserIdle() {
- if (gIsAndroid || gIsGonk) {
- // We don't have the aborted session or the daily ping here.
- return;
- }
-
- const SCHEDULER_TICK_INTERVAL_MS = 5 * 60 * 1000;
- const SCHEDULER_TICK_IDLE_INTERVAL_MS = 60 * 60 * 1000;
-
- let now = new Date(2010, 1, 1, 11, 0, 0);
- fakeNow(now);
-
- let schedulerTimeout = 0;
- fakeSchedulerTimer((callback, timeout) => {
- schedulerTimeout = timeout;
- }, () => {});
- yield TelemetryController.testReset();
- yield TelemetryStorage.testClearPendingPings();
- PingServer.clearRequests();
-
- // When not idle, the scheduler should have a 5 minutes tick interval.
- Assert.equal(schedulerTimeout, SCHEDULER_TICK_INTERVAL_MS);
-
- // Send an "idle" notification to the scheduler.
- fakeIdleNotification("idle");
-
- // When idle, the scheduler should have a 1hr tick interval.
- Assert.equal(schedulerTimeout, SCHEDULER_TICK_IDLE_INTERVAL_MS);
-
- // Send an "active" notification to the scheduler.
- fakeIdleNotification("active");
-
- // When user is back active, the scheduler tick should be 5 minutes again.
- Assert.equal(schedulerTimeout, SCHEDULER_TICK_INTERVAL_MS);
-
- // We should not miss midnight when going to idle.
- now.setHours(23);
- now.setMinutes(50);
- fakeNow(now);
- fakeIdleNotification("idle");
- Assert.equal(schedulerTimeout, 10 * 60 * 1000);
-
- yield TelemetryController.testShutdown();
-});
-
-add_task(function* test_DailyDueAndIdle() {
- if (gIsAndroid || gIsGonk) {
- // We don't have the aborted session or the daily ping here.
- return;
- }
-
- yield TelemetryStorage.testClearPendingPings();
- PingServer.clearRequests();
-
- let receivedPingRequest = null;
- // Register a ping handler that will assert when receiving multiple daily pings.
- PingServer.registerPingHandler(req => {
- Assert.ok(!receivedPingRequest, "Telemetry must only send one daily ping.");
- receivedPingRequest = req;
- });
-
- // Faking scheduler timer has to happen before resetting TelemetryController
- // to be effective.
- let schedulerTickCallback = null;
- let now = new Date(2030, 1, 1, 0, 0, 0);
- fakeNow(now);
- // Fake scheduler functions to control daily collection flow in tests.
- fakeSchedulerTimer(callback => schedulerTickCallback = callback, () => {});
- yield TelemetryController.testReset();
-
- // Trigger the daily ping.
- let firstDailyDue = new Date(2030, 1, 2, 0, 0, 0);
- fakeNow(firstDailyDue);
-
- // Run a scheduler tick: it should trigger the daily ping.
- Assert.ok(!!schedulerTickCallback);
- let tickPromise = schedulerTickCallback();
-
- // Send an idle and then an active user notification.
- fakeIdleNotification("idle");
- fakeIdleNotification("active");
-
- // Wait on the tick promise.
- yield tickPromise;
-
- yield TelemetrySend.testWaitOnOutgoingPings();
-
- // Decode the ping contained in the request and check that's a daily ping.
- Assert.ok(receivedPingRequest, "Telemetry must send one daily ping.");
- const receivedPing = decodeRequestPayload(receivedPingRequest);
- checkPingFormat(receivedPing, PING_TYPE_MAIN, true, true);
- Assert.equal(receivedPing.payload.info.reason, REASON_DAILY);
-
- yield TelemetryController.testShutdown();
-});
-
-add_task(function* test_userIdleAndSchedlerTick() {
- if (gIsAndroid || gIsGonk) {
- // We don't have the aborted session or the daily ping here.
- return;
- }
-
- let receivedPingRequest = null;
- // Register a ping handler that will assert when receiving multiple daily pings.
- PingServer.registerPingHandler(req => {
- Assert.ok(!receivedPingRequest, "Telemetry must only send one daily ping.");
- receivedPingRequest = req;
- });
-
- let schedulerTickCallback = null;
- let now = new Date(2030, 1, 1, 0, 0, 0);
- fakeNow(now);
- // Fake scheduler functions to control daily collection flow in tests.
- fakeSchedulerTimer(callback => schedulerTickCallback = callback, () => {});
- yield TelemetryStorage.testClearPendingPings();
- yield TelemetryController.testReset();
- PingServer.clearRequests();
-
- // Move the current date/time to midnight.
- let firstDailyDue = new Date(2030, 1, 2, 0, 0, 0);
- fakeNow(firstDailyDue);
-
- // The active notification should trigger a scheduler tick. The latter will send the
- // due daily ping.
- fakeIdleNotification("active");
-
- // Immediately running another tick should not send a daily ping again.
- Assert.ok(!!schedulerTickCallback);
- yield schedulerTickCallback();
-
- // A new "idle" notification should not send a new daily ping.
- fakeIdleNotification("idle");
-
- yield TelemetrySend.testWaitOnOutgoingPings();
-
- // Decode the ping contained in the request and check that's a daily ping.
- Assert.ok(receivedPingRequest, "Telemetry must send one daily ping.");
- const receivedPing = decodeRequestPayload(receivedPingRequest);
- checkPingFormat(receivedPing, PING_TYPE_MAIN, true, true);
- Assert.equal(receivedPing.payload.info.reason, REASON_DAILY);
-
- PingServer.resetPingHandler();
- yield TelemetryController.testShutdown();
-});
-
-add_task(function* test_changeThrottling() {
- if (gIsAndroid) {
- // We don't support subsessions yet on Android.
- return;
- }
-
- let getSubsessionCount = () => {
- return TelemetrySession.getPayload().info.subsessionCounter;
- };
-
- const PREF_TEST = "toolkit.telemetry.test.pref1";
- const PREFS_TO_WATCH = new Map([
- [PREF_TEST, {what: TelemetryEnvironment.RECORD_PREF_STATE}],
- ]);
- Preferences.reset(PREF_TEST);
-
- let now = fakeNow(2050, 1, 2, 0, 0, 0);
- gMonotonicNow = fakeMonotonicNow(gMonotonicNow + 10 * MILLISECONDS_PER_MINUTE);
- yield TelemetryController.testReset();
- Assert.equal(getSubsessionCount(), 1);
-
- // Set the Environment preferences to watch.
- TelemetryEnvironment.testWatchPreferences(PREFS_TO_WATCH);
-
- // The first pref change should not trigger a notification.
- Preferences.set(PREF_TEST, 1);
- Assert.equal(getSubsessionCount(), 1);
-
- // We should get a change notification after the 5min throttling interval.
- fakeNow(futureDate(now, 5 * MILLISECONDS_PER_MINUTE + 1));
- gMonotonicNow = fakeMonotonicNow(gMonotonicNow + 5 * MILLISECONDS_PER_MINUTE + 1);
- Preferences.set(PREF_TEST, 2);
- Assert.equal(getSubsessionCount(), 2);
-
- // After that, changes should be throttled again.
- now = fakeNow(futureDate(now, 1 * MILLISECONDS_PER_MINUTE));
- gMonotonicNow = fakeMonotonicNow(gMonotonicNow + 1 * MILLISECONDS_PER_MINUTE);
- Preferences.set(PREF_TEST, 3);
- Assert.equal(getSubsessionCount(), 2);
-
- // ... for 5min.
- now = fakeNow(futureDate(now, 4 * MILLISECONDS_PER_MINUTE + 1));
- gMonotonicNow = fakeMonotonicNow(gMonotonicNow + 4 * MILLISECONDS_PER_MINUTE + 1);
- Preferences.set(PREF_TEST, 4);
- Assert.equal(getSubsessionCount(), 3);
-
- // Unregister the listener.
- TelemetryEnvironment.unregisterChangeListener("testWatchPrefs_throttling");
-});
-
-add_task(function* stopServer() {
- yield PingServer.stop();
-});
diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryTimestamps.js b/toolkit/components/telemetry/tests/unit/test_TelemetryTimestamps.js
deleted file mode 100644
index 75bf3157aa..0000000000
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryTimestamps.js
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-var Cu = Components.utils;
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/TelemetryController.jsm", this);
-Cu.import("resource://gre/modules/TelemetrySession.jsm", this);
-Cu.import('resource://gre/modules/XPCOMUtils.jsm');
-
-// The @mozilla/xre/app-info;1 XPCOM object provided by the xpcshell test harness doesn't
-// implement the nsIXULAppInfo interface, which is needed by Services.jsm and
-// TelemetrySession.jsm. updateAppInfo() creates and registers a minimal mock app-info.
-Cu.import("resource://testing-common/AppInfo.jsm");
-updateAppInfo();
-
-var gGlobalScope = this;
-
-function getSimpleMeasurementsFromTelemetryController() {
- return TelemetrySession.getPayload().simpleMeasurements;
-}
-
-add_task(function* test_setup() {
- // Telemetry needs the AddonManager.
- loadAddonManager();
- // Make profile available for |TelemetryController.testShutdown()|.
- do_get_profile();
-
- // Make sure we don't generate unexpected pings due to pref changes.
- yield setEmptyPrefWatchlist();
-
- yield new Promise(resolve =>
- Services.telemetry.asyncFetchTelemetryData(resolve));
-});
-
-add_task(function* actualTest() {
- yield TelemetryController.testSetup();
-
- // Test the module logic
- let tmp = {};
- Cu.import("resource://gre/modules/TelemetryTimestamps.jsm", tmp);
- let TelemetryTimestamps = tmp.TelemetryTimestamps;
- let now = Date.now();
- TelemetryTimestamps.add("foo");
- do_check_true(TelemetryTimestamps.get().foo != null); // foo was added
- do_check_true(TelemetryTimestamps.get().foo >= now); // foo has a reasonable value
-
- // Add timestamp with value
- // Use a value far in the future since TelemetryController substracts the time of
- // process initialization.
- const YEAR_4000_IN_MS = 64060588800000;
- TelemetryTimestamps.add("bar", YEAR_4000_IN_MS);
- do_check_eq(TelemetryTimestamps.get().bar, YEAR_4000_IN_MS); // bar has the right value
-
- // Can't add the same timestamp twice
- TelemetryTimestamps.add("bar", 2);
- do_check_eq(TelemetryTimestamps.get().bar, YEAR_4000_IN_MS); // bar wasn't overwritten
-
- let threw = false;
- try {
- TelemetryTimestamps.add("baz", "this isn't a number");
- } catch (ex) {
- threw = true;
- }
- do_check_true(threw); // adding non-number threw
- do_check_null(TelemetryTimestamps.get().baz); // no baz was added
-
- // Test that the data gets added to the telemetry ping properly
- let simpleMeasurements = getSimpleMeasurementsFromTelemetryController();
- do_check_true(simpleMeasurements != null); // got simple measurements from ping data
- do_check_true(simpleMeasurements.foo > 1); // foo was included
- do_check_true(simpleMeasurements.bar > 1); // bar was included
- do_check_eq(undefined, simpleMeasurements.baz); // baz wasn't included since it wasn't added
-
- yield TelemetryController.testShutdown();
-});
diff --git a/toolkit/components/telemetry/tests/unit/test_ThreadHangStats.js b/toolkit/components/telemetry/tests/unit/test_ThreadHangStats.js
deleted file mode 100644
index e8c9f868ab..0000000000
--- a/toolkit/components/telemetry/tests/unit/test_ThreadHangStats.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-Cu.import("resource://gre/modules/Services.jsm");
-
-function getMainThreadHangStats() {
- let threads = Services.telemetry.threadHangStats;
- return threads.find((thread) => (thread.name === "Gecko"));
-}
-
-function run_test() {
- let startHangs = getMainThreadHangStats();
-
- // We disable hang reporting in several situations (e.g. debug builds,
- // official releases). In those cases, we don't have hang stats available
- // and should exit the test early.
- if (!startHangs) {
- ok("Hang reporting not enabled.");
- return;
- }
-
- if (Services.appinfo.OS === 'Linux' || Services.appinfo.OS === 'Android') {
- // We use the rt_tgsigqueueinfo syscall on Linux which requires a
- // certain kernel version. It's not an error if the system running
- // the test is older than that.
- let kernel = Services.sysinfo.get('kernel_version') ||
- Services.sysinfo.get('version');
- if (Services.vc.compare(kernel, '2.6.31') < 0) {
- ok("Hang reporting not supported for old kernel.");
- return;
- }
- }
-
- // Run three events in the event loop:
- // the first event causes a transient hang;
- // the second event causes a permanent hang;
- // the third event checks results from previous events.
-
- do_execute_soon(() => {
- // Cause a hang lasting 1 second (transient hang).
- let startTime = Date.now();
- while ((Date.now() - startTime) < 1000);
- });
-
- do_execute_soon(() => {
- // Cause a hang lasting 10 seconds (permanent hang).
- let startTime = Date.now();
- while ((Date.now() - startTime) < 10000);
- });
-
- do_execute_soon(() => {
- do_test_pending();
-
- let check_results = () => {
- let endHangs = getMainThreadHangStats();
-
- // Because hangs are recorded asynchronously, if we don't see new hangs,
- // we should wait for pending hangs to be recorded. On the other hand,
- // if hang monitoring is broken, this test will time out.
- if (endHangs.hangs.length === startHangs.hangs.length) {
- do_timeout(100, check_results);
- return;
- }
-
- let check_histogram = (histogram) => {
- equal(typeof histogram, "object");
- equal(histogram.histogram_type, 0);
- equal(typeof histogram.min, "number");
- equal(typeof histogram.max, "number");
- equal(typeof histogram.sum, "number");
- ok(Array.isArray(histogram.ranges));
- ok(Array.isArray(histogram.counts));
- equal(histogram.counts.length, histogram.ranges.length);
- };
-
- // Make sure the hang stats structure is what we expect.
- equal(typeof endHangs, "object");
- check_histogram(endHangs.activity);
-
- ok(Array.isArray(endHangs.hangs));
- notEqual(endHangs.hangs.length, 0);
-
- ok(Array.isArray(endHangs.hangs[0].stack));
- notEqual(endHangs.hangs[0].stack.length, 0);
- equal(typeof endHangs.hangs[0].stack[0], "string");
-
- // Make sure one of the hangs is a permanent
- // hang containing a native stack.
- ok(endHangs.hangs.some((hang) => (
- Array.isArray(hang.nativeStack) &&
- hang.nativeStack.length !== 0 &&
- typeof hang.nativeStack[0] === "string"
- )));
-
- check_histogram(endHangs.hangs[0].histogram);
-
- do_test_finished();
- };
-
- check_results();
- });
-}
diff --git a/toolkit/components/telemetry/tests/unit/test_nsITelemetry.js b/toolkit/components/telemetry/tests/unit/test_nsITelemetry.js
deleted file mode 100644
index 8dc5526043..0000000000
--- a/toolkit/components/telemetry/tests/unit/test_nsITelemetry.js
+++ /dev/null
@@ -1,883 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-const INT_MAX = 0x7FFFFFFF;
-
-Cu.import("resource://gre/modules/Services.jsm", this);
-Cu.import("resource://gre/modules/TelemetryUtils.jsm", this);
-
-// Return an array of numbers from lower up to, excluding, upper
-function numberRange(lower, upper)
-{
- let a = [];
- for (let i=lower; i<upper; ++i) {
- a.push(i);
- }
- return a;
-}
-
-function expect_fail(f) {
- let failed = false;
- try {
- f();
- failed = false;
- } catch (e) {
- failed = true;
- }
- do_check_true(failed);
-}
-
-function expect_success(f) {
- let succeeded = false;
- try {
- f();
- succeeded = true;
- } catch (e) {
- succeeded = false;
- }
- do_check_true(succeeded);
-}
-
-function compareHistograms(h1, h2) {
- let s1 = h1.snapshot();
- let s2 = h2.snapshot();
-
- do_check_eq(s1.histogram_type, s2.histogram_type);
- do_check_eq(s1.min, s2.min);
- do_check_eq(s1.max, s2.max);
- do_check_eq(s1.sum, s2.sum);
-
- do_check_eq(s1.counts.length, s2.counts.length);
- for (let i = 0; i < s1.counts.length; i++)
- do_check_eq(s1.counts[i], s2.counts[i]);
-
- do_check_eq(s1.ranges.length, s2.ranges.length);
- for (let i = 0; i < s1.ranges.length; i++)
- do_check_eq(s1.ranges[i], s2.ranges[i]);
-}
-
-function check_histogram(histogram_type, name, min, max, bucket_count) {
- var h = Telemetry.getHistogramById(name);
- var r = h.snapshot().ranges;
- var sum = 0;
- for (let i=0;i<r.length;i++) {
- var v = r[i];
- sum += v;
- h.add(v);
- }
- var s = h.snapshot();
- // verify properties
- do_check_eq(sum, s.sum);
-
- // there should be exactly one element per bucket
- for (let i of s.counts) {
- do_check_eq(i, 1);
- }
- var hgrams = Telemetry.histogramSnapshots
- let gh = hgrams[name]
- do_check_eq(gh.histogram_type, histogram_type);
-
- do_check_eq(gh.min, min)
- do_check_eq(gh.max, max)
-
- // Check that booleans work with nonboolean histograms
- h.add(false);
- h.add(true);
- s = h.snapshot().counts;
- do_check_eq(s[0], 2)
- do_check_eq(s[1], 2)
-
- // Check that clearing works.
- h.clear();
- s = h.snapshot();
- for (var i of s.counts) {
- do_check_eq(i, 0);
- }
- do_check_eq(s.sum, 0);
-
- h.add(0);
- h.add(1);
- var c = h.snapshot().counts;
- do_check_eq(c[0], 1);
- do_check_eq(c[1], 1);
-}
-
-// This MUST be the very first test of this file.
-add_task({
- skip_if: () => gIsAndroid
-},
-function* test_instantiate() {
- const ID = "TELEMETRY_TEST_COUNT";
- let h = Telemetry.getHistogramById(ID);
-
- // Instantiate the subsession histogram through |add| and make sure they match.
- // This MUST be the first use of "TELEMETRY_TEST_COUNT" in this file, otherwise
- // |add| will not instantiate the histogram.
- h.add(1);
- let snapshot = h.snapshot();
- let subsession = Telemetry.snapshotSubsessionHistograms();
- Assert.equal(snapshot.sum, subsession[ID].sum,
- "Histogram and subsession histogram sum must match.");
- // Clear the histogram, so we don't void the assumptions from the other tests.
- h.clear();
-});
-
-add_task(function* test_parameterChecks() {
- let kinds = [Telemetry.HISTOGRAM_EXPONENTIAL, Telemetry.HISTOGRAM_LINEAR]
- let testNames = ["TELEMETRY_TEST_EXPONENTIAL", "TELEMETRY_TEST_LINEAR"]
- for (let i = 0; i < kinds.length; i++) {
- let histogram_type = kinds[i];
- let test_type = testNames[i];
- let [min, max, bucket_count] = [1, INT_MAX - 1, 10]
- check_histogram(histogram_type, test_type, min, max, bucket_count);
- }
-});
-
-add_task(function* test_noSerialization() {
- // Instantiate the storage for this histogram and make sure it doesn't
- // get reflected into JS, as it has no interesting data in it.
- Telemetry.getHistogramById("NEWTAB_PAGE_PINNED_SITES_COUNT");
- do_check_false("NEWTAB_PAGE_PINNED_SITES_COUNT" in Telemetry.histogramSnapshots);
-});
-
-add_task(function* test_boolean_histogram() {
- var h = Telemetry.getHistogramById("TELEMETRY_TEST_BOOLEAN");
- var r = h.snapshot().ranges;
- // boolean histograms ignore numeric parameters
- do_check_eq(uneval(r), uneval([0, 1, 2]))
- for (var i=0;i<r.length;i++) {
- var v = r[i];
- h.add(v);
- }
- h.add(true);
- h.add(false);
- var s = h.snapshot();
- do_check_eq(s.histogram_type, Telemetry.HISTOGRAM_BOOLEAN);
- // last bucket should always be 0 since .add parameters are normalized to either 0 or 1
- do_check_eq(s.counts[2], 0);
- do_check_eq(s.sum, 3);
- do_check_eq(s.counts[0], 2);
-});
-
-add_task(function* test_flag_histogram() {
- var h = Telemetry.getHistogramById("TELEMETRY_TEST_FLAG");
- var r = h.snapshot().ranges;
- // Flag histograms ignore numeric parameters.
- do_check_eq(uneval(r), uneval([0, 1, 2]));
- // Should already have a 0 counted.
- var c = h.snapshot().counts;
- var s = h.snapshot().sum;
- do_check_eq(uneval(c), uneval([1, 0, 0]));
- do_check_eq(s, 0);
- // Should switch counts.
- h.add(1);
- var c2 = h.snapshot().counts;
- var s2 = h.snapshot().sum;
- do_check_eq(uneval(c2), uneval([0, 1, 0]));
- do_check_eq(s2, 1);
- // Should only switch counts once.
- h.add(1);
- var c3 = h.snapshot().counts;
- var s3 = h.snapshot().sum;
- do_check_eq(uneval(c3), uneval([0, 1, 0]));
- do_check_eq(s3, 1);
- do_check_eq(h.snapshot().histogram_type, Telemetry.HISTOGRAM_FLAG);
-});
-
-add_task(function* test_count_histogram() {
- let h = Telemetry.getHistogramById("TELEMETRY_TEST_COUNT2");
- let s = h.snapshot();
- do_check_eq(uneval(s.ranges), uneval([0, 1, 2]));
- do_check_eq(uneval(s.counts), uneval([0, 0, 0]));
- do_check_eq(s.sum, 0);
- h.add();
- s = h.snapshot();
- do_check_eq(uneval(s.counts), uneval([1, 0, 0]));
- do_check_eq(s.sum, 1);
- h.add();
- s = h.snapshot();
- do_check_eq(uneval(s.counts), uneval([2, 0, 0]));
- do_check_eq(s.sum, 2);
-});
-
-add_task(function* test_categorical_histogram()
-{
- let h1 = Telemetry.getHistogramById("TELEMETRY_TEST_CATEGORICAL");
- for (let v of ["CommonLabel", "Label2", "Label3", "Label3", 0, 0, 1]) {
- h1.add(v);
- }
- for (let s of ["", "Label4", "1234"]) {
- Assert.throws(() => h1.add(s));
- }
-
- let snapshot = h1.snapshot();
- Assert.equal(snapshot.sum, 6);
- Assert.deepEqual(snapshot.ranges, [0, 1, 2, 3]);
- Assert.deepEqual(snapshot.counts, [3, 2, 2, 0]);
-
- let h2 = Telemetry.getHistogramById("TELEMETRY_TEST_CATEGORICAL_OPTOUT");
- for (let v of ["CommonLabel", "CommonLabel", "Label4", "Label5", "Label6", 0, 1]) {
- h2.add(v);
- }
- for (let s of ["", "Label3", "1234"]) {
- Assert.throws(() => h2.add(s));
- }
-
- snapshot = h2.snapshot();
- Assert.equal(snapshot.sum, 7);
- Assert.deepEqual(snapshot.ranges, [0, 1, 2, 3, 4]);
- Assert.deepEqual(snapshot.counts, [3, 2, 1, 1, 0]);
-});
-
-add_task(function* test_getHistogramById() {
- try {
- Telemetry.getHistogramById("nonexistent");
- do_throw("This can't happen");
- } catch (e) {
-
- }
- var h = Telemetry.getHistogramById("CYCLE_COLLECTOR");
- var s = h.snapshot();
- do_check_eq(s.histogram_type, Telemetry.HISTOGRAM_EXPONENTIAL);
- do_check_eq(s.min, 1);
- do_check_eq(s.max, 10000);
-});
-
-add_task(function* test_getSlowSQL() {
- var slow = Telemetry.slowSQL;
- do_check_true(("mainThread" in slow) && ("otherThreads" in slow));
-});
-
-add_task(function* test_getWebrtc() {
- var webrtc = Telemetry.webrtcStats;
- do_check_true("IceCandidatesStats" in webrtc);
- var icestats = webrtc.IceCandidatesStats;
- do_check_true("webrtc" in icestats);
-});
-
-// Check that telemetry doesn't record in private mode
-add_task(function* test_privateMode() {
- var h = Telemetry.getHistogramById("TELEMETRY_TEST_BOOLEAN");
- var orig = h.snapshot();
- Telemetry.canRecordExtended = false;
- h.add(1);
- do_check_eq(uneval(orig), uneval(h.snapshot()));
- Telemetry.canRecordExtended = true;
- h.add(1);
- do_check_neq(uneval(orig), uneval(h.snapshot()));
-});
-
-// Check that telemetry records only when it is suppose to.
-add_task(function* test_histogramRecording() {
- // Check that no histogram is recorded if both base and extended recording are off.
- Telemetry.canRecordBase = false;
- Telemetry.canRecordExtended = false;
-
- let h = Telemetry.getHistogramById("TELEMETRY_TEST_RELEASE_OPTOUT");
- h.clear();
- let orig = h.snapshot();
- h.add(1);
- Assert.equal(orig.sum, h.snapshot().sum);
-
- // Check that only base histograms are recorded.
- Telemetry.canRecordBase = true;
- h.add(1);
- Assert.equal(orig.sum + 1, h.snapshot().sum,
- "Histogram value should have incremented by 1 due to recording.");
-
- // Extended histograms should not be recorded.
- h = Telemetry.getHistogramById("TELEMETRY_TEST_RELEASE_OPTIN");
- orig = h.snapshot();
- h.add(1);
- Assert.equal(orig.sum, h.snapshot().sum,
- "Histograms should be equal after recording.");
-
- // Runtime created histograms should not be recorded.
- h = Telemetry.getHistogramById("TELEMETRY_TEST_BOOLEAN");
- orig = h.snapshot();
- h.add(1);
- Assert.equal(orig.sum, h.snapshot().sum,
- "Histograms should be equal after recording.");
-
- // Check that extended histograms are recorded when required.
- Telemetry.canRecordExtended = true;
-
- h.add(1);
- Assert.equal(orig.sum + 1, h.snapshot().sum,
- "Runtime histogram value should have incremented by 1 due to recording.");
-
- h = Telemetry.getHistogramById("TELEMETRY_TEST_RELEASE_OPTIN");
- orig = h.snapshot();
- h.add(1);
- Assert.equal(orig.sum + 1, h.snapshot().sum,
- "Histogram value should have incremented by 1 due to recording.");
-
- // Check that base histograms are still being recorded.
- h = Telemetry.getHistogramById("TELEMETRY_TEST_RELEASE_OPTOUT");
- h.clear();
- orig = h.snapshot();
- h.add(1);
- Assert.equal(orig.sum + 1, h.snapshot().sum,
- "Histogram value should have incremented by 1 due to recording.");
-});
-
-add_task(function* test_addons() {
- var addon_id = "testing-addon";
- var fake_addon_id = "fake-addon";
- var name1 = "testing-histogram1";
- var register = Telemetry.registerAddonHistogram;
- expect_success(() =>
- register(addon_id, name1, Telemetry.HISTOGRAM_LINEAR, 1, 5, 6));
- // Can't register the same histogram multiple times.
- expect_fail(() =>
- register(addon_id, name1, Telemetry.HISTOGRAM_LINEAR, 1, 5, 6));
- // Make sure we can't get at it with another name.
- expect_fail(() => Telemetry.getAddonHistogram(fake_addon_id, name1));
-
- // Check for reflection capabilities.
- var h1 = Telemetry.getAddonHistogram(addon_id, name1);
- // Verify that although we've created storage for it, we don't reflect it into JS.
- var snapshots = Telemetry.addonHistogramSnapshots;
- do_check_false(name1 in snapshots[addon_id]);
- h1.add(1);
- h1.add(3);
- var s1 = h1.snapshot();
- do_check_eq(s1.histogram_type, Telemetry.HISTOGRAM_LINEAR);
- do_check_eq(s1.min, 1);
- do_check_eq(s1.max, 5);
- do_check_eq(s1.counts[1], 1);
- do_check_eq(s1.counts[3], 1);
-
- var name2 = "testing-histogram2";
- expect_success(() =>
- register(addon_id, name2, Telemetry.HISTOGRAM_LINEAR, 2, 4, 4));
-
- var h2 = Telemetry.getAddonHistogram(addon_id, name2);
- h2.add(2);
- h2.add(3);
- var s2 = h2.snapshot();
- do_check_eq(s2.histogram_type, Telemetry.HISTOGRAM_LINEAR);
- do_check_eq(s2.min, 2);
- do_check_eq(s2.max, 4);
- do_check_eq(s2.counts[1], 1);
- do_check_eq(s2.counts[2], 1);
-
- // Check that we can register histograms for a different addon with
- // identical names.
- var extra_addon = "testing-extra-addon";
- expect_success(() =>
- register(extra_addon, name1, Telemetry.HISTOGRAM_BOOLEAN));
-
- // Check that we can register flag histograms.
- var flag_addon = "testing-flag-addon";
- var flag_histogram = "flag-histogram";
- expect_success(() =>
- register(flag_addon, flag_histogram, Telemetry.HISTOGRAM_FLAG));
- expect_success(() =>
- register(flag_addon, name2, Telemetry.HISTOGRAM_LINEAR, 2, 4, 4));
-
- // Check that we reflect registered addons and histograms.
- snapshots = Telemetry.addonHistogramSnapshots;
- do_check_true(addon_id in snapshots)
- do_check_true(extra_addon in snapshots);
- do_check_true(flag_addon in snapshots);
-
- // Check that we have data for our created histograms.
- do_check_true(name1 in snapshots[addon_id]);
- do_check_true(name2 in snapshots[addon_id]);
- var s1_alt = snapshots[addon_id][name1];
- var s2_alt = snapshots[addon_id][name2];
- do_check_eq(s1_alt.min, s1.min);
- do_check_eq(s1_alt.max, s1.max);
- do_check_eq(s1_alt.histogram_type, s1.histogram_type);
- do_check_eq(s2_alt.min, s2.min);
- do_check_eq(s2_alt.max, s2.max);
- do_check_eq(s2_alt.histogram_type, s2.histogram_type);
-
- // Even though we've registered it, it shouldn't show up until data is added to it.
- do_check_false(name1 in snapshots[extra_addon]);
-
- // Flag histograms should show up automagically.
- do_check_true(flag_histogram in snapshots[flag_addon]);
- do_check_false(name2 in snapshots[flag_addon]);
-
- // Check that we can remove addon histograms.
- Telemetry.unregisterAddonHistograms(addon_id);
- snapshots = Telemetry.addonHistogramSnapshots;
- do_check_false(addon_id in snapshots);
- // Make sure other addons are unaffected.
- do_check_true(extra_addon in snapshots);
-});
-
-add_task(function* test_expired_histogram() {
- var test_expired_id = "TELEMETRY_TEST_EXPIRED";
- var dummy = Telemetry.getHistogramById(test_expired_id);
- var rh = Telemetry.registeredHistograms(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, []);
- Assert.ok(!!rh);
-
- dummy.add(1);
-
- do_check_eq(Telemetry.histogramSnapshots["__expired__"], undefined);
- do_check_eq(Telemetry.histogramSnapshots[test_expired_id], undefined);
- do_check_eq(rh[test_expired_id], undefined);
-});
-
-add_task(function* test_keyed_histogram() {
- // Check that invalid names get rejected.
-
- let threw = false;
- try {
- Telemetry.getKeyedHistogramById("test::unknown histogram", "never", Telemetry.HISTOGRAM_BOOLEAN);
- } catch (e) {
- // This should throw as it is an unknown ID
- threw = true;
- }
- Assert.ok(threw, "getKeyedHistogramById should have thrown");
-});
-
-add_task(function* test_keyed_boolean_histogram() {
- const KEYED_ID = "TELEMETRY_TEST_KEYED_BOOLEAN";
- let KEYS = numberRange(0, 2).map(i => "key" + (i + 1));
- KEYS.push("漢語");
- let histogramBase = {
- "min": 1,
- "max": 2,
- "histogram_type": 2,
- "sum": 1,
- "ranges": [0, 1, 2],
- "counts": [0, 1, 0]
- };
- let testHistograms = numberRange(0, 3).map(i => JSON.parse(JSON.stringify(histogramBase)));
- let testKeys = [];
- let testSnapShot = {};
-
- let h = Telemetry.getKeyedHistogramById(KEYED_ID);
- for (let i=0; i<2; ++i) {
- let key = KEYS[i];
- h.add(key, true);
- testSnapShot[key] = testHistograms[i];
- testKeys.push(key);
-
- Assert.deepEqual(h.keys().sort(), testKeys);
- Assert.deepEqual(h.snapshot(), testSnapShot);
- }
-
- h = Telemetry.getKeyedHistogramById(KEYED_ID);
- Assert.deepEqual(h.keys().sort(), testKeys);
- Assert.deepEqual(h.snapshot(), testSnapShot);
-
- let key = KEYS[2];
- h.add(key, false);
- testKeys.push(key);
- testSnapShot[key] = testHistograms[2];
- testSnapShot[key].sum = 0;
- testSnapShot[key].counts = [1, 0, 0];
- Assert.deepEqual(h.keys().sort(), testKeys);
- Assert.deepEqual(h.snapshot(), testSnapShot);
-
- let allSnapshots = Telemetry.keyedHistogramSnapshots;
- Assert.deepEqual(allSnapshots[KEYED_ID], testSnapShot);
-
- h.clear();
- Assert.deepEqual(h.keys(), []);
- Assert.deepEqual(h.snapshot(), {});
-});
-
-add_task(function* test_keyed_count_histogram() {
- const KEYED_ID = "TELEMETRY_TEST_KEYED_COUNT";
- const KEYS = numberRange(0, 5).map(i => "key" + (i + 1));
- let histogramBase = {
- "min": 1,
- "max": 2,
- "histogram_type": 4,
- "sum": 0,
- "ranges": [0, 1, 2],
- "counts": [1, 0, 0]
- };
- let testHistograms = numberRange(0, 5).map(i => JSON.parse(JSON.stringify(histogramBase)));
- let testKeys = [];
- let testSnapShot = {};
-
- let h = Telemetry.getKeyedHistogramById(KEYED_ID);
- for (let i=0; i<4; ++i) {
- let key = KEYS[i];
- let value = i*2 + 1;
-
- for (let k=0; k<value; ++k) {
- h.add(key);
- }
- testHistograms[i].counts[0] = value;
- testHistograms[i].sum = value;
- testSnapShot[key] = testHistograms[i];
- testKeys.push(key);
-
- Assert.deepEqual(h.keys().sort(), testKeys);
- Assert.deepEqual(h.snapshot(key), testHistograms[i]);
- Assert.deepEqual(h.snapshot(), testSnapShot);
- }
-
- h = Telemetry.getKeyedHistogramById(KEYED_ID);
- Assert.deepEqual(h.keys().sort(), testKeys);
- Assert.deepEqual(h.snapshot(), testSnapShot);
-
- let key = KEYS[4];
- h.add(key);
- testKeys.push(key);
- testHistograms[4].counts[0] = 1;
- testHistograms[4].sum = 1;
- testSnapShot[key] = testHistograms[4];
-
- Assert.deepEqual(h.keys().sort(), testKeys);
- Assert.deepEqual(h.snapshot(), testSnapShot);
-
- let allSnapshots = Telemetry.keyedHistogramSnapshots;
- Assert.deepEqual(allSnapshots[KEYED_ID], testSnapShot);
-
- h.clear();
- Assert.deepEqual(h.keys(), []);
- Assert.deepEqual(h.snapshot(), {});
-});
-
-add_task(function* test_keyed_flag_histogram() {
- const KEYED_ID = "TELEMETRY_TEST_KEYED_FLAG";
- let h = Telemetry.getKeyedHistogramById(KEYED_ID);
-
- const KEY = "default";
- h.add(KEY, true);
-
- let testSnapshot = {};
- testSnapshot[KEY] = {
- "min": 1,
- "max": 2,
- "histogram_type": 3,
- "sum": 1,
- "ranges": [0, 1, 2],
- "counts": [0, 1, 0]
- };
-
- Assert.deepEqual(h.keys().sort(), [KEY]);
- Assert.deepEqual(h.snapshot(), testSnapshot);
-
- let allSnapshots = Telemetry.keyedHistogramSnapshots;
- Assert.deepEqual(allSnapshots[KEYED_ID], testSnapshot);
-
- h.clear();
- Assert.deepEqual(h.keys(), []);
- Assert.deepEqual(h.snapshot(), {});
-});
-
-add_task(function* test_keyed_histogram_recording() {
- // Check that no histogram is recorded if both base and extended recording are off.
- Telemetry.canRecordBase = false;
- Telemetry.canRecordExtended = false;
-
- const TEST_KEY = "record_foo";
- let h = Telemetry.getKeyedHistogramById("TELEMETRY_TEST_KEYED_RELEASE_OPTOUT");
- h.clear();
- h.add(TEST_KEY, 1);
- Assert.equal(h.snapshot(TEST_KEY).sum, 0);
-
- // Check that only base histograms are recorded.
- Telemetry.canRecordBase = true;
- h.add(TEST_KEY, 1);
- Assert.equal(h.snapshot(TEST_KEY).sum, 1,
- "The keyed histogram should record the correct value.");
-
- // Extended set keyed histograms should not be recorded.
- h = Telemetry.getKeyedHistogramById("TELEMETRY_TEST_KEYED_RELEASE_OPTIN");
- h.clear();
- h.add(TEST_KEY, 1);
- Assert.equal(h.snapshot(TEST_KEY).sum, 0,
- "The keyed histograms should not record any data.");
-
- // Check that extended histograms are recorded when required.
- Telemetry.canRecordExtended = true;
-
- h.add(TEST_KEY, 1);
- Assert.equal(h.snapshot(TEST_KEY).sum, 1,
- "The runtime keyed histogram should record the correct value.");
-
- h = Telemetry.getKeyedHistogramById("TELEMETRY_TEST_KEYED_RELEASE_OPTIN");
- h.clear();
- h.add(TEST_KEY, 1);
- Assert.equal(h.snapshot(TEST_KEY).sum, 1,
- "The keyed histogram should record the correct value.");
-
- // Check that base histograms are still being recorded.
- h = Telemetry.getKeyedHistogramById("TELEMETRY_TEST_KEYED_RELEASE_OPTOUT");
- h.clear();
- h.add(TEST_KEY, 1);
- Assert.equal(h.snapshot(TEST_KEY).sum, 1);
-});
-
-add_task(function* test_histogram_recording_enabled() {
- Telemetry.canRecordBase = true;
- Telemetry.canRecordExtended = true;
-
- // Check that a "normal" histogram respects recording-enabled on/off
- var h = Telemetry.getHistogramById("TELEMETRY_TEST_COUNT");
- var orig = h.snapshot();
-
- h.add(1);
- Assert.equal(orig.sum + 1, h.snapshot().sum,
- "add should record by default.");
-
- // Check that when recording is disabled - add is ignored
- Telemetry.setHistogramRecordingEnabled("TELEMETRY_TEST_COUNT", false);
- h.add(1);
- Assert.equal(orig.sum + 1, h.snapshot().sum,
- "When recording is disabled add should not record.");
-
- // Check that we're back to normal after recording is enabled
- Telemetry.setHistogramRecordingEnabled("TELEMETRY_TEST_COUNT", true);
- h.add(1);
- Assert.equal(orig.sum + 2, h.snapshot().sum,
- "When recording is re-enabled add should record.");
-
- // Check that we're correctly accumulating values other than 1.
- h.clear();
- h.add(3);
- Assert.equal(3, h.snapshot().sum, "Recording counts greater than 1 should work.");
-
- // Check that a histogram with recording disabled by default behaves correctly
- h = Telemetry.getHistogramById("TELEMETRY_TEST_COUNT_INIT_NO_RECORD");
- orig = h.snapshot();
-
- h.add(1);
- Assert.equal(orig.sum, h.snapshot().sum,
- "When recording is disabled by default, add should not record by default.");
-
- Telemetry.setHistogramRecordingEnabled("TELEMETRY_TEST_COUNT_INIT_NO_RECORD", true);
- h.add(1);
- Assert.equal(orig.sum + 1, h.snapshot().sum,
- "When recording is enabled add should record.");
-
- // Restore to disabled
- Telemetry.setHistogramRecordingEnabled("TELEMETRY_TEST_COUNT_INIT_NO_RECORD", false);
- h.add(1);
- Assert.equal(orig.sum + 1, h.snapshot().sum,
- "When recording is disabled add should not record.");
-});
-
-add_task(function* test_keyed_histogram_recording_enabled() {
- Telemetry.canRecordBase = true;
- Telemetry.canRecordExtended = true;
-
- // Check RecordingEnabled for keyed histograms which are recording by default
- const TEST_KEY = "record_foo";
- let h = Telemetry.getKeyedHistogramById("TELEMETRY_TEST_KEYED_RELEASE_OPTOUT");
-
- h.clear();
- h.add(TEST_KEY, 1);
- Assert.equal(h.snapshot(TEST_KEY).sum, 1,
- "Keyed histogram add should record by default");
-
- Telemetry.setHistogramRecordingEnabled("TELEMETRY_TEST_KEYED_RELEASE_OPTOUT", false);
- h.add(TEST_KEY, 1);
- Assert.equal(h.snapshot(TEST_KEY).sum, 1,
- "Keyed histogram add should not record when recording is disabled");
-
- Telemetry.setHistogramRecordingEnabled("TELEMETRY_TEST_KEYED_RELEASE_OPTOUT", true);
- h.clear();
- h.add(TEST_KEY, 1);
- Assert.equal(h.snapshot(TEST_KEY).sum, 1,
- "Keyed histogram add should record when recording is re-enabled");
-
- // Check that a histogram with recording disabled by default behaves correctly
- h = Telemetry.getKeyedHistogramById("TELEMETRY_TEST_KEYED_COUNT_INIT_NO_RECORD");
- h.clear();
-
- h.add(TEST_KEY, 1);
- Assert.equal(h.snapshot(TEST_KEY).sum, 0,
- "Keyed histogram add should not record by default for histograms which don't record by default");
-
- Telemetry.setHistogramRecordingEnabled("TELEMETRY_TEST_KEYED_COUNT_INIT_NO_RECORD", true);
- h.add(TEST_KEY, 1);
- Assert.equal(h.snapshot(TEST_KEY).sum, 1,
- "Keyed histogram add should record when recording is enabled");
-
- // Restore to disabled
- Telemetry.setHistogramRecordingEnabled("TELEMETRY_TEST_KEYED_COUNT_INIT_NO_RECORD", false);
- h.add(TEST_KEY, 1);
- Assert.equal(h.snapshot(TEST_KEY).sum, 1,
- "Keyed histogram add should not record when recording is disabled");
-});
-
-add_task(function* test_datasets() {
- // Check that datasets work as expected.
-
- const RELEASE_CHANNEL_OPTOUT = Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTOUT;
- const RELEASE_CHANNEL_OPTIN = Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN;
-
- // Histograms should default to the extended dataset
- let h = Telemetry.getHistogramById("TELEMETRY_TEST_FLAG");
- Assert.equal(h.dataset(), RELEASE_CHANNEL_OPTIN);
- h = Telemetry.getKeyedHistogramById("TELEMETRY_TEST_KEYED_FLAG");
- Assert.equal(h.dataset(), RELEASE_CHANNEL_OPTIN);
-
- // Check test histograms with explicit dataset definitions
- h = Telemetry.getHistogramById("TELEMETRY_TEST_RELEASE_OPTIN");
- Assert.equal(h.dataset(), RELEASE_CHANNEL_OPTIN);
- h = Telemetry.getHistogramById("TELEMETRY_TEST_RELEASE_OPTOUT");
- Assert.equal(h.dataset(), RELEASE_CHANNEL_OPTOUT);
- h = Telemetry.getKeyedHistogramById("TELEMETRY_TEST_KEYED_RELEASE_OPTIN");
- Assert.equal(h.dataset(), RELEASE_CHANNEL_OPTIN);
- h = Telemetry.getKeyedHistogramById("TELEMETRY_TEST_KEYED_RELEASE_OPTOUT");
- Assert.equal(h.dataset(), RELEASE_CHANNEL_OPTOUT);
-
- // Check that registeredHistogram works properly
- let registered = Telemetry.registeredHistograms(RELEASE_CHANNEL_OPTIN, []);
- registered = new Set(registered);
- Assert.ok(registered.has("TELEMETRY_TEST_FLAG"));
- Assert.ok(registered.has("TELEMETRY_TEST_RELEASE_OPTIN"));
- Assert.ok(registered.has("TELEMETRY_TEST_RELEASE_OPTOUT"));
- registered = Telemetry.registeredHistograms(RELEASE_CHANNEL_OPTOUT, []);
- registered = new Set(registered);
- Assert.ok(!registered.has("TELEMETRY_TEST_FLAG"));
- Assert.ok(!registered.has("TELEMETRY_TEST_RELEASE_OPTIN"));
- Assert.ok(registered.has("TELEMETRY_TEST_RELEASE_OPTOUT"));
-
- // Check that registeredKeyedHistograms works properly
- registered = Telemetry.registeredKeyedHistograms(RELEASE_CHANNEL_OPTIN, []);
- registered = new Set(registered);
- Assert.ok(registered.has("TELEMETRY_TEST_KEYED_FLAG"));
- Assert.ok(registered.has("TELEMETRY_TEST_KEYED_RELEASE_OPTOUT"));
- registered = Telemetry.registeredKeyedHistograms(RELEASE_CHANNEL_OPTOUT, []);
- registered = new Set(registered);
- Assert.ok(!registered.has("TELEMETRY_TEST_KEYED_FLAG"));
- Assert.ok(registered.has("TELEMETRY_TEST_KEYED_RELEASE_OPTOUT"));
-});
-
-add_task({
- skip_if: () => gIsAndroid
-},
-function* test_subsession() {
- const ID = "TELEMETRY_TEST_COUNT";
- const FLAG = "TELEMETRY_TEST_FLAG";
- let h = Telemetry.getHistogramById(ID);
- let flag = Telemetry.getHistogramById(FLAG);
-
- // Both original and duplicate should start out the same.
- h.clear();
- let snapshot = Telemetry.histogramSnapshots;
- let subsession = Telemetry.snapshotSubsessionHistograms();
- Assert.ok(!(ID in snapshot));
- Assert.ok(!(ID in subsession));
-
- // They should instantiate and pick-up the count.
- h.add(1);
- snapshot = Telemetry.histogramSnapshots;
- subsession = Telemetry.snapshotSubsessionHistograms();
- Assert.ok(ID in snapshot);
- Assert.ok(ID in subsession);
- Assert.equal(snapshot[ID].sum, 1);
- Assert.equal(subsession[ID].sum, 1);
-
- // They should still reset properly.
- h.clear();
- snapshot = Telemetry.histogramSnapshots;
- subsession = Telemetry.snapshotSubsessionHistograms();
- Assert.ok(!(ID in snapshot));
- Assert.ok(!(ID in subsession));
-
- // Both should instantiate and pick-up the count.
- h.add(1);
- snapshot = Telemetry.histogramSnapshots;
- subsession = Telemetry.snapshotSubsessionHistograms();
- Assert.equal(snapshot[ID].sum, 1);
- Assert.equal(subsession[ID].sum, 1);
-
- // Check that we are able to only reset the duplicate histogram.
- h.clear(true);
- snapshot = Telemetry.histogramSnapshots;
- subsession = Telemetry.snapshotSubsessionHistograms();
- Assert.ok(ID in snapshot);
- Assert.ok(ID in subsession);
- Assert.equal(snapshot[ID].sum, 1);
- Assert.equal(subsession[ID].sum, 0);
-
- // Both should register the next count.
- h.add(1);
- snapshot = Telemetry.histogramSnapshots;
- subsession = Telemetry.snapshotSubsessionHistograms();
- Assert.equal(snapshot[ID].sum, 2);
- Assert.equal(subsession[ID].sum, 1);
-
- // Retrieve a subsession snapshot and pass the flag to
- // clear subsession histograms too.
- h.clear();
- flag.clear();
- h.add(1);
- flag.add(1);
- snapshot = Telemetry.histogramSnapshots;
- subsession = Telemetry.snapshotSubsessionHistograms(true);
- Assert.ok(ID in snapshot);
- Assert.ok(ID in subsession);
- Assert.ok(FLAG in snapshot);
- Assert.ok(FLAG in subsession);
- Assert.equal(snapshot[ID].sum, 1);
- Assert.equal(subsession[ID].sum, 1);
- Assert.equal(snapshot[FLAG].sum, 1);
- Assert.equal(subsession[FLAG].sum, 1);
-
- // The next subsesssion snapshot should show the histograms
- // got reset.
- snapshot = Telemetry.histogramSnapshots;
- subsession = Telemetry.snapshotSubsessionHistograms();
- Assert.ok(ID in snapshot);
- Assert.ok(ID in subsession);
- Assert.ok(FLAG in snapshot);
- Assert.ok(FLAG in subsession);
- Assert.equal(snapshot[ID].sum, 1);
- Assert.equal(subsession[ID].sum, 0);
- Assert.equal(snapshot[FLAG].sum, 1);
- Assert.equal(subsession[FLAG].sum, 0);
-});
-
-add_task({
- skip_if: () => gIsAndroid
-},
-function* test_keyed_subsession() {
- let h = Telemetry.getKeyedHistogramById("TELEMETRY_TEST_KEYED_FLAG");
- const KEY = "foo";
-
- // Both original and subsession should start out the same.
- h.clear();
- Assert.ok(!(KEY in h.snapshot()));
- Assert.ok(!(KEY in h.subsessionSnapshot()));
- Assert.equal(h.snapshot(KEY).sum, 0);
- Assert.equal(h.subsessionSnapshot(KEY).sum, 0);
-
- // Both should register the flag.
- h.add(KEY, 1);
- Assert.ok(KEY in h.snapshot());
- Assert.ok(KEY in h.subsessionSnapshot());
- Assert.equal(h.snapshot(KEY).sum, 1);
- Assert.equal(h.subsessionSnapshot(KEY).sum, 1);
-
- // Check that we are able to only reset the subsession histogram.
- h.clear(true);
- Assert.ok(KEY in h.snapshot());
- Assert.ok(!(KEY in h.subsessionSnapshot()));
- Assert.equal(h.snapshot(KEY).sum, 1);
- Assert.equal(h.subsessionSnapshot(KEY).sum, 0);
-
- // Setting the flag again should make both match again.
- h.add(KEY, 1);
- Assert.ok(KEY in h.snapshot());
- Assert.ok(KEY in h.subsessionSnapshot());
- Assert.equal(h.snapshot(KEY).sum, 1);
- Assert.equal(h.subsessionSnapshot(KEY).sum, 1);
-
- // Check that "snapshot and clear" works properly.
- let snapshot = h.snapshot();
- let subsession = h.snapshotSubsessionAndClear();
- Assert.ok(KEY in snapshot);
- Assert.ok(KEY in subsession);
- Assert.equal(snapshot[KEY].sum, 1);
- Assert.equal(subsession[KEY].sum, 1);
-
- subsession = h.subsessionSnapshot();
- Assert.ok(!(KEY in subsession));
- Assert.equal(h.subsessionSnapshot(KEY).sum, 0);
-});
diff --git a/toolkit/components/telemetry/tests/unit/xpcshell.ini b/toolkit/components/telemetry/tests/unit/xpcshell.ini
deleted file mode 100644
index 224516f575..0000000000
--- a/toolkit/components/telemetry/tests/unit/xpcshell.ini
+++ /dev/null
@@ -1,61 +0,0 @@
-[DEFAULT]
-head = head.js
-tail =
-firefox-appdir = browser
-# The *.xpi files are only needed for test_TelemetryEnvironment.js, but
-# xpcshell fails to install tests if we move them under the test entry.
-support-files =
- ../search/chrome.manifest
- ../search/searchTest.jar
- dictionary.xpi
- experiment.xpi
- extension.xpi
- extension-2.xpi
- engine.xml
- system.xpi
- restartless.xpi
- theme.xpi
-generated-files =
- dictionary.xpi
- experiment.xpi
- extension.xpi
- extension-2.xpi
- system.xpi
- restartless.xpi
- theme.xpi
-
-[test_nsITelemetry.js]
-[test_SubsessionChaining.js]
-tags = addons
-[test_TelemetryEnvironment.js]
-skip-if = os == "android"
-tags = addons
-[test_PingAPI.js]
-skip-if = os == "android"
-[test_TelemetryFlagClear.js]
-[test_TelemetryLateWrites.js]
-[test_TelemetryLockCount.js]
-[test_TelemetryLog.js]
-[test_TelemetryController.js]
-tags = addons
-[test_TelemetryController_idle.js]
-[test_TelemetryControllerShutdown.js]
-tags = addons
-[test_TelemetryControllerBuildID.js]
-[test_TelemetrySendOldPings.js]
-skip-if = os == "android" # Disabled due to intermittent orange on Android
-tags = addons
-[test_TelemetrySession.js]
-tags = addons
-[test_ThreadHangStats.js]
-run-sequentially = Bug 1046307, test can fail intermittently when CPU load is high
-[test_TelemetrySend.js]
-[test_ChildHistograms.js]
-skip-if = os == "android"
-tags = addons
-[test_TelemetryReportingPolicy.js]
-tags = addons
-[test_TelemetryScalars.js]
-[test_TelemetryTimestamps.js]
-skip-if = toolkit == 'android'
-[test_TelemetryEvents.js]
diff --git a/toolkit/components/terminator/moz.build b/toolkit/components/terminator/moz.build
index 7e230ed4df..c0b2aa1c87 100644
--- a/toolkit/components/terminator/moz.build
+++ b/toolkit/components/terminator/moz.build
@@ -4,15 +4,9 @@
# 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/.
-XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell/xpcshell.ini']
+EXPORTS += ['nsTerminator.h']
-SOURCES += [
- 'nsTerminator.cpp',
-]
-
-EXPORTS += [
- 'nsTerminator.h',
-]
+SOURCES += ['nsTerminator.cpp']
EXTRA_COMPONENTS += [
'nsTerminatorTelemetry.js',
diff --git a/toolkit/components/terminator/tests/xpcshell/.eslintrc.js b/toolkit/components/terminator/tests/xpcshell/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/terminator/tests/xpcshell/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/terminator/tests/xpcshell/test_terminator_record.js b/toolkit/components/terminator/tests/xpcshell/test_terminator_record.js
deleted file mode 100644
index 248ead9ce3..0000000000
--- a/toolkit/components/terminator/tests/xpcshell/test_terminator_record.js
+++ /dev/null
@@ -1,108 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-
-// Test that the Shutdown Terminator records durations correctly
-
-var Cu = Components.utils;
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-
-Cu.import("resource://gre/modules/Services.jsm", this);
-Cu.import("resource://gre/modules/osfile.jsm", this);
-Cu.import("resource://gre/modules/Timer.jsm", this);
-Cu.import("resource://gre/modules/Task.jsm", this);
-
-var {Path, File, Constants} = OS;
-
-var PATH;
-var PATH_TMP;
-var terminator;
-
-add_task(function* init() {
- do_get_profile();
- PATH = Path.join(Constants.Path.localProfileDir, "ShutdownDuration.json");
- PATH_TMP = PATH + ".tmp";
-
- // Initialize the terminator
- // (normally, this is done through the manifest file, but xpcshell
- // doesn't take them into account).
- do_print("Initializing the Terminator");
- terminator = Cc["@mozilla.org/toolkit/shutdown-terminator;1"].
- createInstance(Ci.nsIObserver);
- terminator.observe(null, "profile-after-change", null);
-});
-
-var promiseShutdownDurationData = Task.async(function*() {
- // Wait until PATH exists.
- // Timeout if it is never created.
- do_print("Waiting for file creation: " + PATH);
- while (true) {
- if ((yield OS.File.exists(PATH))) {
- break;
- }
-
- do_print("The file does not exist yet. Waiting 1 second.");
- yield new Promise(resolve => setTimeout(resolve, 1000));
- }
-
- do_print("The file has been created");
- let raw = yield OS.File.read(PATH, { encoding: "utf-8"} );
- do_print(raw);
- return JSON.parse(raw);
-});
-
-add_task(function* test_record() {
- let PHASE0 = "profile-change-teardown";
- let PHASE1 = "profile-before-change";
- let PHASE2 = "xpcom-will-shutdown";
- let t0 = Date.now();
-
- do_print("Starting shutdown");
- terminator.observe(null, "profile-change-teardown", null);
-
- do_print("Moving to next phase");
- terminator.observe(null, PHASE1, null);
-
- let data = yield promiseShutdownDurationData();
-
- let t1 = Date.now();
-
- Assert.ok(PHASE0 in data, "The file contains the expected key");
- let duration = data[PHASE0];
- Assert.equal(typeof duration, "number");
- Assert.ok(duration >= 0, "Duration is a non-negative number");
- Assert.ok(duration <= Math.ceil((t1 - t0) / 1000) + 1,
- "Duration is reasonable");
-
- Assert.equal(Object.keys(data).length, 1, "Data does not contain other durations");
-
- do_print("Cleaning up and moving to next phase");
- yield File.remove(PATH);
- yield File.remove(PATH_TMP);
-
- do_print("Waiting at least one tick");
- let WAIT_MS = 2000;
- yield new Promise(resolve => setTimeout(resolve, WAIT_MS));
-
- terminator.observe(null, PHASE2, null);
- data = yield promiseShutdownDurationData();
-
- let t2 = Date.now();
-
- Assert.equal(Object.keys(data).sort().join(", "),
- [PHASE0, PHASE1].sort().join(", "),
- "The file contains the expected keys");
- Assert.equal(data[PHASE0], duration, "Duration of phase 0 hasn't changed");
- let duration2 = data[PHASE1];
- Assert.equal(typeof duration2, "number");
- Assert.ok(duration2 >= WAIT_MS / 2000, "We have waited at least " + (WAIT_MS / 2000) + " ticks");
- Assert.ok(duration2 <= Math.ceil((t2 - t1) / 1000) + 1,
- "Duration is reasonable");
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/terminator/tests/xpcshell/test_terminator_reload.js b/toolkit/components/terminator/tests/xpcshell/test_terminator_reload.js
deleted file mode 100644
index 1c16395b35..0000000000
--- a/toolkit/components/terminator/tests/xpcshell/test_terminator_reload.js
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-
-// Test that the Shutdown Terminator reloads durations correctly
-
-var Cu = Components.utils;
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-
-Cu.import("resource://gre/modules/Services.jsm", this);
-Cu.import("resource://gre/modules/osfile.jsm", this);
-Cu.import("resource://gre/modules/Timer.jsm", this);
-Cu.import("resource://gre/modules/Task.jsm", this);
-
-var {Path, File, Constants} = OS;
-
-var PATH;
-
-var HISTOGRAMS = {
- "quit-application": "SHUTDOWN_PHASE_DURATION_TICKS_QUIT_APPLICATION",
- "profile-change-teardown": "SHUTDOWN_PHASE_DURATION_TICKS_PROFILE_CHANGE_TEARDOWN",
- "profile-before-change": "SHUTDOWN_PHASE_DURATION_TICKS_PROFILE_BEFORE_CHANGE",
- "xpcom-will-shutdown": "SHUTDOWN_PHASE_DURATION_TICKS_XPCOM_WILL_SHUTDOWN",
-};
-
-add_task(function* init() {
- do_get_profile();
- PATH = Path.join(Constants.Path.localProfileDir, "ShutdownDuration.json");
-});
-
-add_task(function* test_reload() {
- do_print("Forging data");
- let data = {};
- let telemetrySnapshots = Services.telemetry.histogramSnapshots;
- let i = 0;
- for (let k of Object.keys(HISTOGRAMS)) {
- let id = HISTOGRAMS[k];
- data[k] = i++;
- Assert.equal(telemetrySnapshots[id] || undefined, undefined, "Histogram " + id + " is empty");
- }
-
-
- yield OS.File.writeAtomic(PATH, JSON.stringify(data));
-
- const TOPIC = "shutdown-terminator-telemetry-updated";
-
- let wait = new Promise(resolve =>
- Services.obs.addObserver(
- function observer() {
- do_print("Telemetry has been updated");
- Services.obs.removeObserver(observer, TOPIC);
- resolve();
- },
- TOPIC,
- false));
-
- do_print("Starting nsTerminatorTelemetry");
- let tt = Cc["@mozilla.org/toolkit/shutdown-terminator-telemetry;1"].
- createInstance(Ci.nsIObserver);
- tt.observe(null, "profile-after-change", "");
-
- do_print("Waiting until telemetry is updated");
- // Now wait until Telemetry is updated
- yield wait;
-
- telemetrySnapshots = Services.telemetry.histogramSnapshots;
- for (let k of Object.keys(HISTOGRAMS)) {
- let id = HISTOGRAMS[k];
- do_print("Testing histogram " + id);
- let snapshot = telemetrySnapshots[id];
- let count = 0;
- for (let x of snapshot.counts) {
- count += x;
- }
- Assert.equal(count, 1, "We have added one item");
- }
-
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/components/terminator/tests/xpcshell/xpcshell.ini b/toolkit/components/terminator/tests/xpcshell/xpcshell.ini
deleted file mode 100644
index 7f77938aa1..0000000000
--- a/toolkit/components/terminator/tests/xpcshell/xpcshell.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[DEFAULT]
-head=
-tail=
-
-[test_terminator_record.js]
-skip-if = debug # Disabled by bug 1242084, bug 1255484 will enable it again.
-[test_terminator_reload.js]
-skip-if = os == "android"
diff --git a/toolkit/components/thumbnails/moz.build b/toolkit/components/thumbnails/moz.build
index bd7c1d3444..bd88532c06 100644
--- a/toolkit/components/thumbnails/moz.build
+++ b/toolkit/components/thumbnails/moz.build
@@ -4,9 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
-XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell.ini']
-
EXTRA_COMPONENTS += [
'BrowserPageThumbs.manifest',
'PageThumbsProtocol.js',
@@ -22,5 +19,4 @@ EXTRA_PP_JS_MODULES += [
'PageThumbUtils.jsm',
]
-
JAR_MANIFESTS += ['jar.mn']
diff --git a/toolkit/components/thumbnails/test/.eslintrc.js b/toolkit/components/thumbnails/test/.eslintrc.js
deleted file mode 100644
index f6f8d62c24..0000000000
--- a/toolkit/components/thumbnails/test/.eslintrc.js
+++ /dev/null
@@ -1,8 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../testing/mochitest/browser.eslintrc.js",
- "../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/thumbnails/test/authenticate.sjs b/toolkit/components/thumbnails/test/authenticate.sjs
deleted file mode 100644
index 58da655cf9..0000000000
--- a/toolkit/components/thumbnails/test/authenticate.sjs
+++ /dev/null
@@ -1,220 +0,0 @@
-function handleRequest(request, response)
-{
- try {
- reallyHandleRequest(request, response);
- } catch (e) {
- response.setStatusLine("1.0", 200, "AlmostOK");
- response.write("Error handling request: " + e);
- }
-}
-
-
-function reallyHandleRequest(request, response) {
- var match;
- var requestAuth = true, requestProxyAuth = true;
-
- // Allow the caller to drive how authentication is processed via the query.
- // Eg, http://localhost:8888/authenticate.sjs?user=foo&realm=bar
- // The extra ? allows the user/pass/realm checks to succeed if the name is
- // at the beginning of the query string.
- var query = "?" + request.queryString;
-
- var expected_user = "", expected_pass = "", realm = "mochitest";
- var proxy_expected_user = "", proxy_expected_pass = "", proxy_realm = "mochi-proxy";
- var huge = false, plugin = false, anonymous = false;
- var authHeaderCount = 1;
- // user=xxx
- match = /[^_]user=([^&]*)/.exec(query);
- if (match)
- expected_user = match[1];
-
- // pass=xxx
- match = /[^_]pass=([^&]*)/.exec(query);
- if (match)
- expected_pass = match[1];
-
- // realm=xxx
- match = /[^_]realm=([^&]*)/.exec(query);
- if (match)
- realm = match[1];
-
- // proxy_user=xxx
- match = /proxy_user=([^&]*)/.exec(query);
- if (match)
- proxy_expected_user = match[1];
-
- // proxy_pass=xxx
- match = /proxy_pass=([^&]*)/.exec(query);
- if (match)
- proxy_expected_pass = match[1];
-
- // proxy_realm=xxx
- match = /proxy_realm=([^&]*)/.exec(query);
- if (match)
- proxy_realm = match[1];
-
- // huge=1
- match = /huge=1/.exec(query);
- if (match)
- huge = true;
-
- // plugin=1
- match = /plugin=1/.exec(query);
- if (match)
- plugin = true;
-
- // multiple=1
- match = /multiple=([^&]*)/.exec(query);
- if (match)
- authHeaderCount = match[1]+0;
-
- // anonymous=1
- match = /anonymous=1/.exec(query);
- if (match)
- anonymous = true;
-
- // Look for an authentication header, if any, in the request.
- //
- // EG: Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
- //
- // This test only supports Basic auth. The value sent by the client is
- // "username:password", obscured with base64 encoding.
-
- var actual_user = "", actual_pass = "", authHeader, authPresent = false;
- if (request.hasHeader("Authorization")) {
- authPresent = true;
- authHeader = request.getHeader("Authorization");
- match = /Basic (.+)/.exec(authHeader);
- if (match.length != 2)
- throw "Couldn't parse auth header: " + authHeader;
-
- var userpass = base64ToString(match[1]); // no atob() :-(
- match = /(.*):(.*)/.exec(userpass);
- if (match.length != 3)
- throw "Couldn't decode auth header: " + userpass;
- actual_user = match[1];
- actual_pass = match[2];
- }
-
- var proxy_actual_user = "", proxy_actual_pass = "";
- if (request.hasHeader("Proxy-Authorization")) {
- authHeader = request.getHeader("Proxy-Authorization");
- match = /Basic (.+)/.exec(authHeader);
- if (match.length != 2)
- throw "Couldn't parse auth header: " + authHeader;
-
- var userpass = base64ToString(match[1]); // no atob() :-(
- match = /(.*):(.*)/.exec(userpass);
- if (match.length != 3)
- throw "Couldn't decode auth header: " + userpass;
- proxy_actual_user = match[1];
- proxy_actual_pass = match[2];
- }
-
- // Don't request authentication if the credentials we got were what we
- // expected.
- if (expected_user == actual_user &&
- expected_pass == actual_pass) {
- requestAuth = false;
- }
- if (proxy_expected_user == proxy_actual_user &&
- proxy_expected_pass == proxy_actual_pass) {
- requestProxyAuth = false;
- }
-
- if (anonymous) {
- if (authPresent) {
- response.setStatusLine("1.0", 400, "Unexpected authorization header found");
- } else {
- response.setStatusLine("1.0", 200, "Authorization header not found");
- }
- } else {
- if (requestProxyAuth) {
- response.setStatusLine("1.0", 407, "Proxy authentication required");
- for (i = 0; i < authHeaderCount; ++i)
- response.setHeader("Proxy-Authenticate", "basic realm=\"" + proxy_realm + "\"", true);
- } else if (requestAuth) {
- response.setStatusLine("1.0", 401, "Authentication required");
- for (i = 0; i < authHeaderCount; ++i)
- response.setHeader("WWW-Authenticate", "basic realm=\"" + realm + "\"", true);
- } else {
- response.setStatusLine("1.0", 200, "OK");
- }
- }
-
- response.setHeader("Content-Type", "application/xhtml+xml", false);
- response.write("<html xmlns='http://www.w3.org/1999/xhtml'>");
- response.write("<p>Login: <span id='ok'>" + (requestAuth ? "FAIL" : "PASS") + "</span></p>\n");
- response.write("<p>Proxy: <span id='proxy'>" + (requestProxyAuth ? "FAIL" : "PASS") + "</span></p>\n");
- response.write("<p>Auth: <span id='auth'>" + authHeader + "</span></p>\n");
- response.write("<p>User: <span id='user'>" + actual_user + "</span></p>\n");
- response.write("<p>Pass: <span id='pass'>" + actual_pass + "</span></p>\n");
-
- if (huge) {
- response.write("<div style='display: none'>");
- for (i = 0; i < 100000; i++) {
- response.write("123456789\n");
- }
- response.write("</div>");
- response.write("<span id='footnote'>This is a footnote after the huge content fill</span>");
- }
-
- if (plugin) {
- response.write("<embed id='embedtest' style='width: 400px; height: 100px;' " +
- "type='application/x-test'></embed>\n");
- }
-
- response.write("</html>");
-}
-
-
-// base64 decoder
-//
-// Yoinked from extensions/xml-rpc/src/nsXmlRpcClient.js because btoa()
-// doesn't seem to exist. :-(
-/* Convert Base64 data to a string */
-const toBinaryTable = [
- -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
- -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
- -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, -1,-1,-1,63,
- 52,53,54,55, 56,57,58,59, 60,61,-1,-1, -1, 0,-1,-1,
- -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,
- 15,16,17,18, 19,20,21,22, 23,24,25,-1, -1,-1,-1,-1,
- -1,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
- 41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1
-];
-const base64Pad = '=';
-
-function base64ToString(data) {
-
- var result = '';
- var leftbits = 0; // number of bits decoded, but yet to be appended
- var leftdata = 0; // bits decoded, but yet to be appended
-
- // Convert one by one.
- for (var i = 0; i < data.length; i++) {
- var c = toBinaryTable[data.charCodeAt(i) & 0x7f];
- var padding = (data[i] == base64Pad);
- // Skip illegal characters and whitespace
- if (c == -1) continue;
-
- // Collect data into leftdata, update bitcount
- leftdata = (leftdata << 6) | c;
- leftbits += 6;
-
- // If we have 8 or more bits, append 8 bits to the result
- if (leftbits >= 8) {
- leftbits -= 8;
- // Append if not padding.
- if (!padding)
- result += String.fromCharCode((leftdata >> leftbits) & 0xff);
- leftdata &= (1 << leftbits) - 1;
- }
- }
-
- // If there are any bits left, the base64 string was corrupted
- if (leftbits)
- throw Components.Exception('Corrupted base64 string');
-
- return result;
-}
diff --git a/toolkit/components/thumbnails/test/background_red.html b/toolkit/components/thumbnails/test/background_red.html
deleted file mode 100644
index 95159dd297..0000000000
--- a/toolkit/components/thumbnails/test/background_red.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<html>
- <body bgcolor=ff0000></body>
-</html>
diff --git a/toolkit/components/thumbnails/test/background_red_redirect.sjs b/toolkit/components/thumbnails/test/background_red_redirect.sjs
deleted file mode 100644
index 5f0852e194..0000000000
--- a/toolkit/components/thumbnails/test/background_red_redirect.sjs
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function handleRequest(aRequest, aResponse) {
- // Set HTTP Status.
- aResponse.setStatusLine(aRequest.httpVersion, 301, "Moved Permanently");
-
- // Set redirect URI.
- aResponse.setHeader("Location", "http://mochi.test:8888/browser/toolkit/components/thumbnails/test/background_red.html");
-}
diff --git a/toolkit/components/thumbnails/test/background_red_scroll.html b/toolkit/components/thumbnails/test/background_red_scroll.html
deleted file mode 100644
index 1e30bd3c67..0000000000
--- a/toolkit/components/thumbnails/test/background_red_scroll.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<html>
- <body bgcolor=ff0000 style="overflow: scroll;"></body>
-</html>
diff --git a/toolkit/components/thumbnails/test/browser.ini b/toolkit/components/thumbnails/test/browser.ini
deleted file mode 100644
index 3b87815ff0..0000000000
--- a/toolkit/components/thumbnails/test/browser.ini
+++ /dev/null
@@ -1,38 +0,0 @@
-[DEFAULT]
-support-files =
- authenticate.sjs
- background_red.html
- background_red_redirect.sjs
- background_red_scroll.html
- head.js
- privacy_cache_control.sjs
- thumbnails_background.sjs
- thumbnails_crash_content_helper.js
- thumbnails_update.sjs
-
-[browser_thumbnails_bg_bad_url.js]
-[browser_thumbnails_bg_crash_during_capture.js]
-skip-if = !crashreporter
-[browser_thumbnails_bg_crash_while_idle.js]
-skip-if = !crashreporter
-[browser_thumbnails_bg_basic.js]
-[browser_thumbnails_bg_queueing.js]
-[browser_thumbnails_bg_timeout.js]
-[browser_thumbnails_bg_redirect.js]
-[browser_thumbnails_bg_destroy_browser.js]
-[browser_thumbnails_bg_no_cookies_sent.js]
-[browser_thumbnails_bg_no_cookies_stored.js]
-[browser_thumbnails_bg_no_auth_prompt.js]
-[browser_thumbnails_bg_no_alert.js]
-[browser_thumbnails_bg_no_duplicates.js]
-[browser_thumbnails_bg_captureIfMissing.js]
-[browser_thumbnails_bug726727.js]
-[browser_thumbnails_bug727765.js]
-[browser_thumbnails_bug818225.js]
-[browser_thumbnails_capture.js]
-[browser_thumbnails_expiration.js]
-[browser_thumbnails_privacy.js]
-[browser_thumbnails_redirect.js]
-[browser_thumbnails_storage.js]
-[browser_thumbnails_storage_migrate3.js]
-[browser_thumbnails_update.js]
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_bg_bad_url.js b/toolkit/components/thumbnails/test/browser_thumbnails_bg_bad_url.js
deleted file mode 100644
index df8ef8d965..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_bg_bad_url.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function* runTests() {
- let url = "invalid-protocol://ffggfsdfsdf/";
- ok(!thumbnailExists(url), "Thumbnail should not be cached already.");
- let numCalls = 0;
- BackgroundPageThumbs.capture(url, {
- onDone: function onDone(capturedURL) {
- is(capturedURL, url, "Captured URL should be URL passed to capture");
- is(numCalls++, 0, "onDone should be called only once");
- ok(!thumbnailExists(url),
- "Capture failed so thumbnail should not be cached");
- next();
- },
- });
- yield new Promise(resolve => {
- bgAddPageThumbObserver(url).catch(function(err) {
- ok(true, "page-thumbnail error produced");
- resolve();
- });
- });
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_bg_basic.js b/toolkit/components/thumbnails/test/browser_thumbnails_bg_basic.js
deleted file mode 100644
index 027e0bfb74..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_bg_basic.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function* runTests() {
- let url = "http://www.example.com/";
- ok(!thumbnailExists(url), "Thumbnail should not be cached yet.");
-
- let capturePromise = new Promise(resolve => {
- bgAddPageThumbObserver(url).then(() => {
- ok(true, `page-thumbnail created for ${url}`);
- resolve();
- });
- });
- let capturedURL = yield bgCapture(url);
- is(capturedURL, url, "Captured URL should be URL passed to capture");
- yield capturePromise;
-
- ok(thumbnailExists(url), "Thumbnail should be cached after capture");
- removeThumbnail(url);
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_bg_captureIfMissing.js b/toolkit/components/thumbnails/test/browser_thumbnails_bg_captureIfMissing.js
deleted file mode 100644
index cd1f1c5c22..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_bg_captureIfMissing.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function* runTests() {
- let numNotifications = 0;
- function observe(subject, topic, data) {
- is(topic, "page-thumbnail:create", "got expected topic");
- numNotifications += 1;
- }
-
- Services.obs.addObserver(observe, "page-thumbnail:create", false);
-
- let url = "http://example.com/";
- let file = thumbnailFile(url);
- ok(!file.exists(), "Thumbnail file should not already exist.");
-
- let capturedURL = yield bgCaptureIfMissing(url);
- is(numNotifications, 1, "got notification of item being created.");
- is(capturedURL, url, "Captured URL should be URL passed to capture");
- ok(file.exists(url), "Thumbnail should be cached after capture");
-
- let past = Date.now() - 1000000000;
- let pastFudge = past + 30000;
- file.lastModifiedTime = past;
- ok(file.lastModifiedTime < pastFudge, "Last modified time should stick!");
- capturedURL = yield bgCaptureIfMissing(url);
- is(numNotifications, 1, "still only 1 notification of item being created.");
- is(capturedURL, url, "Captured URL should be URL passed to second capture");
- ok(file.exists(), "Thumbnail should remain cached after second capture");
- ok(file.lastModifiedTime < pastFudge,
- "File should not have been overwritten");
-
- file.remove(false);
- Services.obs.removeObserver(observe, "page-thumbnail:create");
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_bg_crash_during_capture.js b/toolkit/components/thumbnails/test/browser_thumbnails_bg_crash_during_capture.js
deleted file mode 100644
index db67a04a89..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_bg_crash_during_capture.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function* runTests() {
- let crashObserver = bgAddCrashObserver();
-
- // make a good capture first - this ensures we have the <browser>
- let goodUrl = bgTestPageURL();
- yield bgCapture(goodUrl);
- ok(thumbnailExists(goodUrl), "Thumbnail should be cached after capture");
- removeThumbnail(goodUrl);
-
- // inject our content script.
- let mm = bgInjectCrashContentScript();
-
- // queue up 2 captures - the first has a wait, so this is the one that
- // will die. The second one should immediately capture after the crash.
- let waitUrl = bgTestPageURL({ wait: 30000 });
- let sawWaitUrlCapture = false;
- bgCapture(waitUrl, { onDone: () => {
- sawWaitUrlCapture = true;
- ok(!thumbnailExists(waitUrl), "Thumbnail should not have been saved due to the crash");
- }});
- bgCapture(goodUrl, { onDone: () => {
- ok(sawWaitUrlCapture, "waitUrl capture should have finished first");
- ok(thumbnailExists(goodUrl), "We should have recovered and completed the 2nd capture after the crash");
- removeThumbnail(goodUrl);
- // Test done.
- ok(crashObserver.crashed, "Saw a crash from this test");
- next();
- }});
- let crashPromise = new Promise(resolve => {
- bgAddPageThumbObserver(waitUrl).catch(function(err) {
- ok(true, `page-thumbnail error thrown for ${waitUrl}`);
- resolve();
- });
- });
- let capturePromise = new Promise(resolve => {
- bgAddPageThumbObserver(goodUrl).then(() => {
- ok(true, `page-thumbnail created for ${goodUrl}`);
- resolve();
- });
- });
-
- info("Crashing the thumbnail content process.");
- mm.sendAsyncMessage("thumbnails-test:crash");
- yield crashPromise;
- yield capturePromise;
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_bg_crash_while_idle.js b/toolkit/components/thumbnails/test/browser_thumbnails_bg_crash_while_idle.js
deleted file mode 100644
index 8ff6a35093..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_bg_crash_while_idle.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function* runTests() {
- let crashObserver = bgAddCrashObserver();
-
- // make a good capture first - this ensures we have the <browser>
- let goodUrl = bgTestPageURL();
- yield bgCapture(goodUrl);
- ok(thumbnailExists(goodUrl), "Thumbnail should be cached after capture");
- removeThumbnail(goodUrl);
-
- // inject our content script.
- let mm = bgInjectCrashContentScript();
-
- // the observer for the crashing process is basically async, so it's hard
- // to know when the <browser> has actually seen it. Easist is to just add
- // our own observer.
- Services.obs.addObserver(function onCrash() {
- Services.obs.removeObserver(onCrash, "oop-frameloader-crashed");
- // spin the event loop to ensure the BPT observer was called.
- executeSoon(function() {
- // Now queue another capture and ensure it recovers.
- bgCapture(goodUrl, { onDone: () => {
- ok(thumbnailExists(goodUrl), "We should have recovered and handled new capture requests");
- removeThumbnail(goodUrl);
- // Test done.
- ok(crashObserver.crashed, "Saw a crash from this test");
- next();
- }});
- });
- }, "oop-frameloader-crashed", false);
-
- // Nothing is pending - crash the process.
- info("Crashing the thumbnail content process.");
- mm.sendAsyncMessage("thumbnails-test:crash");
- yield true;
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_bg_destroy_browser.js b/toolkit/components/thumbnails/test/browser_thumbnails_bg_destroy_browser.js
deleted file mode 100644
index b83fdf5839..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_bg_destroy_browser.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function* runTests() {
- yield SpecialPowers.pushPrefEnv({
- set: [["dom.ipc.processCount", 1]]
- });
-
- let url1 = "http://example.com/1";
- ok(!thumbnailExists(url1), "First file should not exist yet.");
-
- let url2 = "http://example.com/2";
- ok(!thumbnailExists(url2), "Second file should not exist yet.");
-
- let defaultTimeout = BackgroundPageThumbs._destroyBrowserTimeout;
- BackgroundPageThumbs._destroyBrowserTimeout = 1000;
-
- yield bgCapture(url1);
- ok(thumbnailExists(url1), "First file should exist after capture.");
- removeThumbnail(url1);
-
- yield wait(2000);
- is(BackgroundPageThumbs._thumbBrowser, undefined,
- "Thumb browser should be destroyed after timeout.");
- BackgroundPageThumbs._destroyBrowserTimeout = defaultTimeout;
-
- yield bgCapture(url2);
- ok(thumbnailExists(url2), "Second file should exist after capture.");
- removeThumbnail(url2);
-
- isnot(BackgroundPageThumbs._thumbBrowser, undefined,
- "Thumb browser should exist immediately after capture.");
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_bg_no_alert.js b/toolkit/components/thumbnails/test/browser_thumbnails_bg_no_alert.js
deleted file mode 100644
index 5d6bd81f86..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_bg_no_alert.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function* runTests() {
- let url = "data:text/html,<script>try { alert('yo!'); } catch (e) {}</script>";
- ok(!thumbnailExists(url), "Thumbnail file should not already exist.");
-
- let capturedURL = yield bgCapture(url);
- is(capturedURL, url, "Captured URL should be URL passed to capture.");
- ok(thumbnailExists(url),
- "Thumbnail file should exist even though it alerted.");
- removeThumbnail(url);
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_bg_no_auth_prompt.js b/toolkit/components/thumbnails/test/browser_thumbnails_bg_no_auth_prompt.js
deleted file mode 100644
index 0eb9df7a94..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_bg_no_auth_prompt.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// the following tests attempt to display modal dialogs. The test just
-// relies on the fact that if the dialog was displayed the test will hang
-// and timeout. IOW - the tests would pass if the dialogs appear and are
-// manually closed by the user - so don't do that :) (obviously there is
-// noone available to do that when run via tbpl etc, so this should be safe,
-// and it's tricky to use the window-watcher to check a window *does not*
-// appear - how long should the watcher be active before assuming it's not
-// going to appear?)
-function* runTests() {
- let url = "http://mochi.test:8888/browser/toolkit/components/thumbnails/test/authenticate.sjs?user=anyone";
- ok(!thumbnailExists(url), "Thumbnail file should not already exist.");
-
- let capturedURL = yield bgCapture(url);
- is(capturedURL, url, "Captured URL should be URL passed to capture.");
- ok(thumbnailExists(url),
- "Thumbnail file should exist even though it requires auth.");
- removeThumbnail(url);
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_bg_no_cookies_sent.js b/toolkit/components/thumbnails/test/browser_thumbnails_bg_no_cookies_sent.js
deleted file mode 100644
index afbedb3829..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_bg_no_cookies_sent.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function* runTests() {
- // Visit the test page in the browser and tell it to set a cookie.
- let url = bgTestPageURL({ setGreenCookie: true });
- let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, url);
- let browser = tab.linkedBrowser;
-
- // The root element of the page shouldn't be green yet.
- yield ContentTask.spawn(browser, null, function () {
- Assert.notEqual(content.document.documentElement.style.backgroundColor,
- "rgb(0, 255, 0)",
- "The page shouldn't be green yet.");
- });
-
- // Cookie should be set now. Reload the page to verify. Its root element
- // will be green if the cookie's set.
- browser.reload();
- yield BrowserTestUtils.browserLoaded(browser);
- yield ContentTask.spawn(browser, null, function () {
- Assert.equal(content.document.documentElement.style.backgroundColor,
- "rgb(0, 255, 0)",
- "The page should be green now.");
- });
-
- // Capture the page. Get the image data of the capture and verify it's not
- // green. (Checking only the first pixel suffices.)
- yield bgCapture(url);
- ok(thumbnailExists(url), "Thumbnail file should exist after capture.");
-
- retrieveImageDataForURL(url, function ([r, g, b]) {
- isnot([r, g, b].toString(), [0, 255, 0].toString(),
- "The captured page should not be green.");
- gBrowser.removeTab(tab);
- removeThumbnail(url);
- next();
- });
- yield true;
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_bg_no_cookies_stored.js b/toolkit/components/thumbnails/test/browser_thumbnails_bg_no_cookies_stored.js
deleted file mode 100644
index 90a1a890b0..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_bg_no_cookies_stored.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// check that if a page captured in the background attempts to set a cookie,
-// that cookie is not saved for subsequent requests.
-function* runTests() {
- yield SpecialPowers.pushPrefEnv({
- set: [["privacy.usercontext.about_newtab_segregation.enabled", true]]
- });
- let url = bgTestPageURL({
- setRedCookie: true,
- iframe: bgTestPageURL({ setRedCookie: true}),
- xhr: bgTestPageURL({ setRedCookie: true})
- });
- ok(!thumbnailExists(url), "Thumbnail file should not exist before capture.");
- yield bgCapture(url);
- ok(thumbnailExists(url), "Thumbnail file should exist after capture.");
- removeThumbnail(url);
- // now load it up in a browser - it should *not* be red, otherwise the
- // cookie above was saved.
- let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, url);
- let browser = tab.linkedBrowser;
-
- // The root element of the page shouldn't be red.
- yield ContentTask.spawn(browser, null, function() {
- Assert.notEqual(content.document.documentElement.style.backgroundColor,
- "rgb(255, 0, 0)",
- "The page shouldn't be red.");
- });
-
- gBrowser.removeTab(tab);
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_bg_no_duplicates.js b/toolkit/components/thumbnails/test/browser_thumbnails_bg_no_duplicates.js
deleted file mode 100644
index 31b5043356..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_bg_no_duplicates.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function* runTests() {
- let url = "http://example.com/1";
- ok(!thumbnailExists(url), "Thumbnail file should not already exist.");
- let numCallbacks = 0;
- let doneCallback = function(doneUrl) {
- is(doneUrl, url, "called back with correct url");
- numCallbacks += 1;
- // We will delete the file after the first callback, then check it
- // still doesn't exist on the second callback, which should give us
- // confidence that we didn't end up with 2 different captures happening
- // for the same url...
- if (numCallbacks == 1) {
- ok(thumbnailExists(url), "Thumbnail file should now exist.");
- removeThumbnail(url);
- return;
- }
- if (numCallbacks == 2) {
- ok(!thumbnailExists(url), "Thumbnail file should still be deleted.");
- // and that's all we expect, so we are done...
- next();
- return;
- }
- ok(false, "only expecting 2 callbacks");
- }
- BackgroundPageThumbs.capture(url, {onDone: doneCallback});
- BackgroundPageThumbs.capture(url, {onDone: doneCallback});
- yield true;
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_bg_queueing.js b/toolkit/components/thumbnails/test/browser_thumbnails_bg_queueing.js
deleted file mode 100644
index 1426f6f4e9..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_bg_queueing.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function* runTests() {
- let urls = [
- "http://www.example.com/0",
- "http://www.example.com/1",
- // an item that will timeout to ensure timeouts work and we resume.
- bgTestPageURL({ wait: 2002 }),
- "http://www.example.com/2",
- ];
- dontExpireThumbnailURLs(urls);
- urls.forEach(url => {
- ok(!thumbnailExists(url), "Thumbnail should not exist yet: " + url);
- let isTimeoutTest = url.indexOf("wait") >= 0;
- BackgroundPageThumbs.capture(url, {
- timeout: isTimeoutTest ? 100 : 30000,
- onDone: function onDone(capturedURL) {
- ok(urls.length > 0, "onDone called, so URLs should still remain");
- is(capturedURL, urls.shift(),
- "Captured URL should be currently expected URL (i.e., " +
- "capture() callbacks should be called in the correct order)");
- if (isTimeoutTest) {
- ok(!thumbnailExists(capturedURL),
- "Thumbnail shouldn't exist for timed out capture");
- } else {
- ok(thumbnailExists(capturedURL),
- "Thumbnail should be cached after capture");
- removeThumbnail(url);
- }
- if (!urls.length)
- // Test done.
- next();
- },
- });
- });
- yield true;
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_bg_redirect.js b/toolkit/components/thumbnails/test/browser_thumbnails_bg_redirect.js
deleted file mode 100644
index baa1b6d681..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_bg_redirect.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function* runTests() {
- let finalURL = "http://example.com/redirected";
- let originalURL = bgTestPageURL({ redirect: finalURL });
-
- ok(!thumbnailExists(originalURL),
- "Thumbnail file for original URL should not exist yet.");
- ok(!thumbnailExists(finalURL),
- "Thumbnail file for final URL should not exist yet.");
-
- let captureOriginalPromise = new Promise(resolve => {
- bgAddPageThumbObserver(originalURL).then(() => {
- ok(true, `page-thumbnail created for ${originalURL}`);
- resolve();
- });
- });
-
- let captureFinalPromise = new Promise(resolve => {
- bgAddPageThumbObserver(finalURL).then(() => {
- ok(true, `page-thumbnail created for ${finalURL}`);
- resolve();
- });
- });
-
- let capturedURL = yield bgCapture(originalURL);
- is(capturedURL, originalURL,
- "Captured URL should be URL passed to capture");
- yield captureOriginalPromise;
- yield captureFinalPromise;
- ok(thumbnailExists(originalURL),
- "Thumbnail for original URL should be cached");
- ok(thumbnailExists(finalURL),
- "Thumbnail for final URL should be cached");
-
- removeThumbnail(originalURL);
- removeThumbnail(finalURL);
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_bg_timeout.js b/toolkit/components/thumbnails/test/browser_thumbnails_bg_timeout.js
deleted file mode 100644
index da05b43553..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_bg_timeout.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function* runTests() {
- let url = bgTestPageURL({ wait: 30000 });
- ok(!thumbnailExists(url), "Thumbnail should not be cached already.");
- let numCalls = 0;
- BackgroundPageThumbs.capture(url, {
- timeout: 0,
- onDone: function onDone(capturedURL) {
- is(capturedURL, url, "Captured URL should be URL passed to capture");
- is(numCalls++, 0, "onDone should be called only once");
- ok(!thumbnailExists(url),
- "Capture timed out so thumbnail should not be cached");
- next();
- },
- });
- yield new Promise(resolve => {
- bgAddPageThumbObserver(url).catch(function(err) {
- ok(true, `page-thumbnail error thrown for ${url}`);
- resolve();
- });
- });
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_bug726727.js b/toolkit/components/thumbnails/test/browser_thumbnails_bug726727.js
deleted file mode 100644
index f7f1f3deb6..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_bug726727.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * These tests ensure that capturing a sites's thumbnail, saving it and
- * retrieving it from the cache works.
- */
-function* runTests() {
- // Create a tab that shows an error page.
- let tab = gBrowser.addTab("http://127.0.0.1:1/");
- let browser = tab.linkedBrowser;
- yield browser.addEventListener("DOMContentLoaded", function onLoad() {
- browser.removeEventListener("DOMContentLoaded", onLoad, false);
- PageThumbs.shouldStoreThumbnail(browser, (aResult) => {
- ok(!aResult, "we're not going to capture an error page");
- executeSoon(next);
- });
- }, false);
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_bug727765.js b/toolkit/components/thumbnails/test/browser_thumbnails_bug727765.js
deleted file mode 100644
index c4faac685e..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_bug727765.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-const URL = "http://mochi.test:8888/browser/toolkit/components/thumbnails/" +
- "test/background_red_scroll.html";
-
-function isRedThumbnailFuzz(r, g, b, expectedR, expectedB, expectedG, aFuzz)
-{
- return (Math.abs(r - expectedR) <= aFuzz) &&
- (Math.abs(g - expectedG) <= aFuzz) &&
- (Math.abs(b - expectedB) <= aFuzz);
-}
-
-// Test for black borders caused by scrollbars.
-function* runTests() {
- // Create a tab with a page with a red background and scrollbars.
- yield addTab(URL);
- yield captureAndCheckColor(255, 0, 0, "we have a red thumbnail");
-
- // Check the thumbnail color of the bottom right pixel.
- yield whenFileExists(URL);
- yield retrieveImageDataForURL(URL, function (aData) {
- let [r, g, b] = [].slice.call(aData, -4);
- let fuzz = 2; // Windows 8 x64 blends with the scrollbar a bit.
- var message = "Expected red thumbnail rgb(255, 0, 0), got " + r + "," + g + "," + b;
- ok(isRedThumbnailFuzz(r, g, b, 255, 0, 0, fuzz), message);
- next();
- });
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_bug818225.js b/toolkit/components/thumbnails/test/browser_thumbnails_bug818225.js
deleted file mode 100644
index a7e1caa04a..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_bug818225.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-const URL = "http://mochi.test:8888/browser/toolkit/components/thumbnails/" +
- "test/background_red.html?" + Date.now();
-
-// Test PageThumbs API function getThumbnailPath
-function* runTests() {
-
- let path = PageThumbs.getThumbnailPath(URL);
- yield testIfExists(path, false, "Thumbnail file does not exist");
-
- yield addVisitsAndRepopulateNewTabLinks(URL, next);
- yield createThumbnail(URL);
-
- path = PageThumbs.getThumbnailPath(URL);
- let expectedPath = PageThumbsStorage.getFilePathForURL(URL);
- is(path, expectedPath, "Thumbnail file has correct path");
-
- yield testIfExists(path, true, "Thumbnail file exists");
-
-}
-
-function createThumbnail(aURL) {
- addTab(aURL, function () {
- whenFileExists(aURL, function () {
- gBrowser.removeTab(gBrowser.selectedTab);
- next();
- });
- });
-}
-
-function testIfExists(aPath, aExpected, aMessage) {
- return OS.File.exists(aPath).then(
- function onSuccess(exists) {
- is(exists, aExpected, aMessage);
- },
- function onFailure(error) {
- ok(false, "OS.File.exists() failed " + error);
- }
- );
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_capture.js b/toolkit/components/thumbnails/test/browser_thumbnails_capture.js
deleted file mode 100644
index 47d94d31ba..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_capture.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * These tests ensure that capturing a sites's thumbnail, saving it and
- * retrieving it from the cache works.
- */
-function* runTests() {
- // Create a tab with a red background.
- yield addTab("data:text/html,<body bgcolor=ff0000></body>");
- yield captureAndCheckColor(255, 0, 0, "we have a red thumbnail");
-
- // Load a page with a green background.
- yield navigateTo("data:text/html,<body bgcolor=00ff00></body>");
- yield captureAndCheckColor(0, 255, 0, "we have a green thumbnail");
-
- // Load a page with a blue background.
- yield navigateTo("data:text/html,<body bgcolor=0000ff></body>");
- yield captureAndCheckColor(0, 0, 255, "we have a blue thumbnail");
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_expiration.js b/toolkit/components/thumbnails/test/browser_thumbnails_expiration.js
deleted file mode 100644
index 4c73e17bef..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_expiration.js
+++ /dev/null
@@ -1,97 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-const URL = "http://mochi.test:8888/?t=" + Date.now();
-const URL1 = URL + "#1";
-const URL2 = URL + "#2";
-const URL3 = URL + "#3";
-
-var tmp = {};
-Cc["@mozilla.org/moz/jssubscript-loader;1"]
- .getService(Ci.mozIJSSubScriptLoader)
- .loadSubScript("resource://gre/modules/PageThumbs.jsm", tmp);
-
-const EXPIRATION_MIN_CHUNK_SIZE = 50;
-const {PageThumbsExpiration} = tmp;
-
-function* runTests() {
- // Create dummy URLs.
- let dummyURLs = [];
- for (let i = 0; i < EXPIRATION_MIN_CHUNK_SIZE + 10; i++) {
- dummyURLs.push(URL + "#dummy" + i);
- }
-
- // Make sure our thumbnails aren't expired too early.
- dontExpireThumbnailURLs([URL1, URL2, URL3].concat(dummyURLs));
-
- // Create three thumbnails.
- yield createDummyThumbnail(URL1);
- ok(thumbnailExists(URL1), "first thumbnail created");
-
- yield createDummyThumbnail(URL2);
- ok(thumbnailExists(URL2), "second thumbnail created");
-
- yield createDummyThumbnail(URL3);
- ok(thumbnailExists(URL3), "third thumbnail created");
-
- // Remove the third thumbnail.
- yield expireThumbnails([URL1, URL2]);
- ok(thumbnailExists(URL1), "first thumbnail still exists");
- ok(thumbnailExists(URL2), "second thumbnail still exists");
- ok(!thumbnailExists(URL3), "third thumbnail has been removed");
-
- // Remove the second thumbnail.
- yield expireThumbnails([URL1]);
- ok(thumbnailExists(URL1), "first thumbnail still exists");
- ok(!thumbnailExists(URL2), "second thumbnail has been removed");
-
- // Remove all thumbnails.
- yield expireThumbnails([]);
- ok(!thumbnailExists(URL1), "all thumbnails have been removed");
-
- // Create some more files than the min chunk size.
- for (let url of dummyURLs) {
- yield createDummyThumbnail(url);
- }
-
- ok(dummyURLs.every(thumbnailExists), "all dummy thumbnails created");
-
- // Expire thumbnails and expect 10 remaining.
- yield expireThumbnails([]);
- let remainingURLs = dummyURLs.filter(thumbnailExists);
- is(remainingURLs.length, 10, "10 dummy thumbnails remaining");
-
- // Expire thumbnails again. All should be gone by now.
- yield expireThumbnails([]);
- remainingURLs = remainingURLs.filter(thumbnailExists);
- is(remainingURLs.length, 0, "no dummy thumbnails remaining");
-}
-
-function createDummyThumbnail(aURL) {
- info("Creating dummy thumbnail for " + aURL);
- let dummy = new Uint8Array(10);
- for (let i = 0; i < 10; ++i) {
- dummy[i] = i;
- }
- PageThumbsStorage.writeData(aURL, dummy).then(
- function onSuccess() {
- info("createDummyThumbnail succeeded");
- executeSoon(next);
- },
- function onFailure(error) {
- ok(false, "createDummyThumbnail failed " + error);
- }
- );
-}
-
-function expireThumbnails(aKeep) {
- PageThumbsExpiration.expireThumbnails(aKeep).then(
- function onSuccess() {
- info("expireThumbnails succeeded");
- executeSoon(next);
- },
- function onFailure(error) {
- ok(false, "expireThumbnails failed " + error);
- }
- );
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_privacy.js b/toolkit/components/thumbnails/test/browser_thumbnails_privacy.js
deleted file mode 100644
index e7dc7b4d55..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_privacy.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-const PREF_DISK_CACHE_SSL = "browser.cache.disk_cache_ssl";
-const URL = "://example.com/browser/toolkit/components/thumbnails/" +
- "test/privacy_cache_control.sjs";
-
-function* runTests() {
- registerCleanupFunction(function () {
- Services.prefs.clearUserPref(PREF_DISK_CACHE_SSL);
- });
-
- let positive = [
- // A normal HTTP page without any Cache-Control header.
- {scheme: "http", cacheControl: null, diskCacheSSL: false},
-
- // A normal HTTP page with 'Cache-Control: private'.
- {scheme: "http", cacheControl: "private", diskCacheSSL: false},
-
- // Capture HTTPS pages if browser.cache.disk_cache_ssl == true.
- {scheme: "https", cacheControl: null, diskCacheSSL: true},
- {scheme: "https", cacheControl: "public", diskCacheSSL: true},
- {scheme: "https", cacheControl: "private", diskCacheSSL: true}
- ];
-
- let negative = [
- // Never capture pages with 'Cache-Control: no-store'.
- {scheme: "http", cacheControl: "no-store", diskCacheSSL: false},
- {scheme: "http", cacheControl: "no-store", diskCacheSSL: true},
- {scheme: "https", cacheControl: "no-store", diskCacheSSL: false},
- {scheme: "https", cacheControl: "no-store", diskCacheSSL: true},
-
- // Don't capture HTTPS pages by default.
- {scheme: "https", cacheControl: null, diskCacheSSL: false},
- {scheme: "https", cacheControl: "public", diskCacheSSL: false},
- {scheme: "https", cacheControl: "private", diskCacheSSL: false}
- ];
-
- yield checkCombinations(positive, true);
- yield checkCombinations(negative, false);
-}
-
-function checkCombinations(aCombinations, aResult) {
- let combi = aCombinations.shift();
- if (!combi) {
- next();
- return;
- }
-
- let url = combi.scheme + URL;
- if (combi.cacheControl)
- url += "?" + combi.cacheControl;
- Services.prefs.setBoolPref(PREF_DISK_CACHE_SSL, combi.diskCacheSSL);
-
- // Add the test page as a top link so it has a chance to be thumbnailed
- addVisitsAndRepopulateNewTabLinks(url, _ => {
- testCombination(combi, url, aCombinations, aResult);
- });
-}
-
-function testCombination(combi, url, aCombinations, aResult) {
- let tab = gBrowser.selectedTab = gBrowser.addTab(url);
- let browser = gBrowser.selectedBrowser;
-
- whenLoaded(browser, () => {
- let msg = JSON.stringify(combi) + " == " + aResult;
- PageThumbs.shouldStoreThumbnail(browser, (aIsSafeSite) => {
- is(aIsSafeSite, aResult, msg);
- gBrowser.removeTab(tab);
- // Continue with the next combination.
- checkCombinations(aCombinations, aResult);
- });
- });
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_redirect.js b/toolkit/components/thumbnails/test/browser_thumbnails_redirect.js
deleted file mode 100644
index 482dbc8032..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_redirect.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-const URL = "http://mochi.test:8888/browser/toolkit/components/thumbnails/" +
- "test/background_red_redirect.sjs";
-// loading URL will redirect us to...
-const FINAL_URL = "http://mochi.test:8888/browser/toolkit/components/" +
- "thumbnails/test/background_red.html";
-
-/**
- * These tests ensure that we save and provide thumbnails for redirecting sites.
- */
-function* runTests() {
- dontExpireThumbnailURLs([URL, FINAL_URL]);
-
- // Kick off history by loading a tab first or the test fails in single mode.
- yield addTab(URL);
- gBrowser.removeTab(gBrowser.selectedTab);
-
- // Create a tab, redirecting to a page with a red background.
- yield addTab(URL);
- yield captureAndCheckColor(255, 0, 0, "we have a red thumbnail");
-
- // Wait until the referrer's thumbnail's file has been written.
- yield whenFileExists(URL);
- yield retrieveImageDataForURL(URL, function ([r, g, b]) {
- is("" + [r, g, b], "255,0,0", "referrer has a red thumbnail");
- next();
- });
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_storage.js b/toolkit/components/thumbnails/test/browser_thumbnails_storage.js
deleted file mode 100644
index 972f956e5e..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_storage.js
+++ /dev/null
@@ -1,112 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-const URL = "http://mochi.test:8888/";
-const URL_COPY = URL + "#copy";
-
-XPCOMUtils.defineLazyGetter(this, "Sanitizer", function () {
- let tmp = {};
- Cc["@mozilla.org/moz/jssubscript-loader;1"]
- .getService(Ci.mozIJSSubScriptLoader)
- .loadSubScript("chrome://browser/content/sanitize.js", tmp);
- return tmp.Sanitizer;
-});
-
-/**
- * These tests ensure that the thumbnail storage is working as intended.
- * Newly captured thumbnails should be saved as files and they should as well
- * be removed when the user sanitizes their history.
- */
-function* runTests() {
- yield Task.spawn(function*() {
- dontExpireThumbnailURLs([URL, URL_COPY]);
-
- yield promiseClearHistory();
- yield promiseAddVisitsAndRepopulateNewTabLinks(URL);
- yield promiseCreateThumbnail();
-
- // Make sure Storage.copy() updates an existing file.
- yield PageThumbsStorage.copy(URL, URL_COPY);
- let copy = new FileUtils.File(PageThumbsStorage.getFilePathForURL(URL_COPY));
- let mtime = copy.lastModifiedTime -= 60;
-
- yield PageThumbsStorage.copy(URL, URL_COPY);
- isnot(new FileUtils.File(PageThumbsStorage.getFilePathForURL(URL_COPY)).lastModifiedTime, mtime,
- "thumbnail file was updated");
-
- let file = new FileUtils.File(PageThumbsStorage.getFilePathForURL(URL));
- let fileCopy = new FileUtils.File(PageThumbsStorage.getFilePathForURL(URL_COPY));
-
- // Clear the browser history. Retry until the files are gone because Windows
- // locks them sometimes.
- info("Clearing history");
- while (file.exists() || fileCopy.exists()) {
- yield promiseClearHistory();
- }
- info("History is clear");
-
- info("Repopulating");
- yield promiseAddVisitsAndRepopulateNewTabLinks(URL);
- yield promiseCreateThumbnail();
-
- info("Clearing the last 10 minutes of browsing history");
- // Clear the last 10 minutes of browsing history.
- yield promiseClearHistory(true);
-
- info("Attempt to clear file");
- // Retry until the file is gone because Windows locks it sometimes.
- yield promiseClearFile(file, URL);
-
- info("Done");
- });
-}
-
-var promiseClearFile = Task.async(function*(aFile, aURL) {
- if (!aFile.exists()) {
- return undefined;
- }
- // Re-add our URL to the history so that history observer's onDeleteURI()
- // is called again.
- yield PlacesTestUtils.addVisits(makeURI(aURL));
- yield promiseClearHistory(true);
- // Then retry.
- return promiseClearFile(aFile, aURL);
-});
-
-function promiseClearHistory(aUseRange) {
- let s = new Sanitizer();
- s.prefDomain = "privacy.cpd.";
-
- let prefs = gPrefService.getBranch(s.prefDomain);
- prefs.setBoolPref("history", true);
- prefs.setBoolPref("downloads", false);
- prefs.setBoolPref("cache", false);
- prefs.setBoolPref("cookies", false);
- prefs.setBoolPref("formdata", false);
- prefs.setBoolPref("offlineApps", false);
- prefs.setBoolPref("passwords", false);
- prefs.setBoolPref("sessions", false);
- prefs.setBoolPref("siteSettings", false);
-
- if (aUseRange) {
- let usec = Date.now() * 1000;
- s.range = [usec - 10 * 60 * 1000 * 1000, usec];
- s.ignoreTimespan = false;
- }
-
- return s.sanitize().then(() => {
- s.range = null;
- s.ignoreTimespan = true;
- });
-}
-
-function promiseCreateThumbnail() {
- return new Promise(resolve => {
- addTab(URL, function () {
- whenFileExists(URL, function () {
- gBrowser.removeTab(gBrowser.selectedTab);
- resolve();
- });
- });
- });
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_storage_migrate3.js b/toolkit/components/thumbnails/test/browser_thumbnails_storage_migrate3.js
deleted file mode 100644
index e7f150f871..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_storage_migrate3.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-const URL = "http://mochi.test:8888/migration3";
-const URL2 = URL + "#2";
-const URL3 = URL + "#3";
-const THUMBNAIL_DIRECTORY = "thumbnails";
-const PREF_STORAGE_VERSION = "browser.pagethumbnails.storage_version";
-
-var tmp = {};
-Cc["@mozilla.org/moz/jssubscript-loader;1"]
- .getService(Ci.mozIJSSubScriptLoader)
- .loadSubScript("resource://gre/modules/PageThumbs.jsm", tmp);
-var {PageThumbsStorageMigrator} = tmp;
-
-XPCOMUtils.defineLazyServiceGetter(this, "gDirSvc",
- "@mozilla.org/file/directory_service;1", "nsIProperties");
-
-/**
- * This test makes sure we correctly migrate to thumbnail storage version 3.
- * This means copying existing thumbnails from the roaming to the local profile
- * directory and should just apply to Linux.
- */
-function* runTests() {
- // Prepare a local profile directory.
- let localProfile = FileUtils.getDir("ProfD", ["local-test"], true);
- changeLocation("ProfLD", localProfile);
-
- let roaming = FileUtils.getDir("ProfD", [THUMBNAIL_DIRECTORY], true);
-
- // Set up some data in the roaming profile.
- let name = PageThumbsStorage.getLeafNameForURL(URL);
- let file = FileUtils.getFile("ProfD", [THUMBNAIL_DIRECTORY, name]);
- writeDummyFile(file);
-
- name = PageThumbsStorage.getLeafNameForURL(URL2);
- file = FileUtils.getFile("ProfD", [THUMBNAIL_DIRECTORY, name]);
- writeDummyFile(file);
-
- name = PageThumbsStorage.getLeafNameForURL(URL3);
- file = FileUtils.getFile("ProfD", [THUMBNAIL_DIRECTORY, name]);
- writeDummyFile(file);
-
- // Pretend to have one of the thumbnails
- // already in place at the new storage site.
- name = PageThumbsStorage.getLeafNameForURL(URL3);
- file = FileUtils.getFile("ProfLD", [THUMBNAIL_DIRECTORY, name]);
- writeDummyFile(file, "no-overwrite-plz");
-
- // Kick off thumbnail storage migration.
- PageThumbsStorageMigrator.migrateToVersion3(localProfile.path);
- ok(true, "migration finished");
-
- // Wait until the first thumbnail was moved to its new location.
- yield whenFileExists(URL);
- ok(true, "first thumbnail moved");
-
- // Wait for the second thumbnail to be moved as well.
- yield whenFileExists(URL2);
- ok(true, "second thumbnail moved");
-
- yield whenFileRemoved(roaming);
- ok(true, "roaming thumbnail directory removed");
-
- // Check that our existing thumbnail wasn't overwritten.
- is(getFileContents(file), "no-overwrite-plz",
- "existing thumbnail was not overwritten");
-
- // Sanity check: ensure that, until it is removed, deprecated
- // function |getFileForURL| points to the same path as
- // |getFilePathForURL|.
- if ("getFileForURL" in PageThumbsStorage) {
- file = PageThumbsStorage.getFileForURL(URL);
- is(file.path, PageThumbsStorage.getFilePathForURL(URL),
- "Deprecated getFileForURL and getFilePathForURL return the same path");
- }
-}
-
-function changeLocation(aLocation, aNewDir) {
- let oldDir = gDirSvc.get(aLocation, Ci.nsILocalFile);
- gDirSvc.undefine(aLocation);
- gDirSvc.set(aLocation, aNewDir);
-
- registerCleanupFunction(function () {
- gDirSvc.undefine(aLocation);
- gDirSvc.set(aLocation, oldDir);
- });
-}
-
-function writeDummyFile(aFile, aContents) {
- let fos = FileUtils.openSafeFileOutputStream(aFile);
- let data = aContents || "dummy";
- fos.write(data, data.length);
- FileUtils.closeSafeFileOutputStream(fos);
-}
-
-function getFileContents(aFile) {
- let istream = Cc["@mozilla.org/network/file-input-stream;1"]
- .createInstance(Ci.nsIFileInputStream);
- istream.init(aFile, FileUtils.MODE_RDONLY, FileUtils.PERMS_FILE, 0);
- return NetUtil.readInputStreamToString(istream, istream.available());
-}
diff --git a/toolkit/components/thumbnails/test/browser_thumbnails_update.js b/toolkit/components/thumbnails/test/browser_thumbnails_update.js
deleted file mode 100644
index 971a2994e8..0000000000
--- a/toolkit/components/thumbnails/test/browser_thumbnails_update.js
+++ /dev/null
@@ -1,169 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * These tests check the auto-update facility of the thumbnail service.
- */
-
-function* runTests() {
- // A "trampoline" - a generator that iterates over sub-iterators
- let tests = [
- simpleCaptureTest,
- capIfStaleErrorResponseUpdateTest,
- capIfStaleGoodResponseUpdateTest,
- regularCapErrorResponseUpdateTest,
- regularCapGoodResponseUpdateTest
- ];
- for (let test of tests) {
- info("Running subtest " + test.name);
- for (let iterator of test())
- yield iterator;
- }
-}
-
-function ensureThumbnailStale(url) {
- // We go behind the back of the thumbnail service and change the
- // mtime of the file to be in the past.
- let fname = PageThumbsStorage.getFilePathForURL(url);
- let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
- file.initWithPath(fname);
- ok(file.exists(), fname + " should exist");
- // Set it as very stale...
- file.lastModifiedTime = Date.now() - 1000000000;
-}
-
-function getThumbnailModifiedTime(url) {
- let fname = PageThumbsStorage.getFilePathForURL(url);
- let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
- file.initWithPath(fname);
- return file.lastModifiedTime;
-}
-
-// The tests!
-/* Check functionality of a normal captureAndStoreIfStale request */
-function* simpleCaptureTest() {
- let numNotifications = 0;
- const URL = "http://mochi.test:8888/browser/toolkit/components/thumbnails/test/thumbnails_update.sjs?simple";
-
- function observe(subject, topic, data) {
- is(topic, "page-thumbnail:create", "got expected topic");
- is(data, URL, "data is our test URL");
- if (++numNotifications == 2) {
- // This is the final notification and signals test success...
- Services.obs.removeObserver(observe, "page-thumbnail:create");
- gBrowser.removeTab(gBrowser.selectedTab);
- next();
- }
- }
-
- Services.obs.addObserver(observe, "page-thumbnail:create", false);
- // Create a tab - we don't care what the content is.
- yield addTab(URL);
- let browser = gBrowser.selectedBrowser;
-
- // Capture the screenshot.
- PageThumbs.captureAndStore(browser, function () {
- // We've got a capture so should have seen the observer.
- is(numNotifications, 1, "got notification of item being created.");
- // The capture is now "fresh" - so requesting the URL should not cause
- // a new capture.
- PageThumbs.captureAndStoreIfStale(browser, function() {
- is(numNotifications, 1, "still only 1 notification of item being created.");
-
- ensureThumbnailStale(URL);
- // Ask for it to be updated.
- PageThumbs.captureAndStoreIfStale(browser);
- // But it's async, so wait - our observer above will call next() when
- // the notification comes.
- });
- });
- yield undefined // wait for callbacks to call 'next'...
-}
-
-/* Check functionality of captureAndStoreIfStale when there is an error response
- from the server.
- */
-function* capIfStaleErrorResponseUpdateTest() {
- const URL = "http://mochi.test:8888/browser/toolkit/components/thumbnails/test/thumbnails_update.sjs?fail";
- yield addTab(URL);
-
- yield captureAndCheckColor(0, 255, 0, "we have a green thumbnail");
- // update the thumbnail to be stale, then re-request it. The server will
- // return a 400 response and a red thumbnail.
- // The service should not save the thumbnail - so we (a) check the thumbnail
- // remains green and (b) check the mtime of the file is < now.
- ensureThumbnailStale(URL);
- yield navigateTo(URL);
- // now() returns a higher-precision value than the modified time of a file.
- // As we set the thumbnail very stale, allowing 1 second of "slop" here
- // works around this while still keeping the test valid.
- let now = Date.now() - 1000 ;
- PageThumbs.captureAndStoreIfStale(gBrowser.selectedBrowser, () => {
- ok(getThumbnailModifiedTime(URL) < now, "modified time should be < now");
- retrieveImageDataForURL(URL, function ([r, g, b]) {
- is("" + [r, g, b], "" + [0, 255, 0], "thumbnail is still green");
- gBrowser.removeTab(gBrowser.selectedTab);
- next();
- });
- });
- yield undefined; // wait for callback to call 'next'...
-}
-
-/* Check functionality of captureAndStoreIfStale when there is a non-error
- response from the server. This test is somewhat redundant - although it is
- using a http:// URL instead of a data: url like most others.
- */
-function* capIfStaleGoodResponseUpdateTest() {
- const URL = "http://mochi.test:8888/browser/toolkit/components/thumbnails/test/thumbnails_update.sjs?ok";
- yield addTab(URL);
- let browser = gBrowser.selectedBrowser;
-
- yield captureAndCheckColor(0, 255, 0, "we have a green thumbnail");
- // update the thumbnail to be stale, then re-request it. The server will
- // return a 200 response and a red thumbnail - so that new thumbnail should
- // end up captured.
- ensureThumbnailStale(URL);
- yield navigateTo(URL);
- // now() returns a higher-precision value than the modified time of a file.
- // As we set the thumbnail very stale, allowing 1 second of "slop" here
- // works around this while still keeping the test valid.
- let now = Date.now() - 1000 ;
- PageThumbs.captureAndStoreIfStale(browser, () => {
- ok(getThumbnailModifiedTime(URL) >= now, "modified time should be >= now");
- // the captureAndStoreIfStale request saw a 200 response with the red body,
- // so we expect to see the red version here.
- retrieveImageDataForURL(URL, function ([r, g, b]) {
- is("" + [r, g, b], "" + [255, 0, 0], "thumbnail is now red");
- next();
- });
- });
- yield undefined; // wait for callback to call 'next'...
-}
-
-/* Check functionality of captureAndStore when there is an error response
- from the server.
- */
-function* regularCapErrorResponseUpdateTest() {
- const URL = "http://mochi.test:8888/browser/toolkit/components/thumbnails/test/thumbnails_update.sjs?fail";
- yield addTab(URL);
- yield captureAndCheckColor(0, 255, 0, "we have a green thumbnail");
- gBrowser.removeTab(gBrowser.selectedTab);
- // do it again - the server will return a 400, so the foreground service
- // should not update it.
- yield addTab(URL);
- yield captureAndCheckColor(0, 255, 0, "we still have a green thumbnail");
-}
-
-/* Check functionality of captureAndStore when there is an OK response
- from the server.
- */
-function* regularCapGoodResponseUpdateTest() {
- const URL = "http://mochi.test:8888/browser/toolkit/components/thumbnails/test/thumbnails_update.sjs?ok";
- yield addTab(URL);
- yield captureAndCheckColor(0, 255, 0, "we have a green thumbnail");
- gBrowser.removeTab(gBrowser.selectedTab);
- // do it again - the server will return a 200, so the foreground service
- // should update it.
- yield addTab(URL);
- yield captureAndCheckColor(255, 0, 0, "we now have a red thumbnail");
-}
diff --git a/toolkit/components/thumbnails/test/head.js b/toolkit/components/thumbnails/test/head.js
deleted file mode 100644
index e8229508a6..0000000000
--- a/toolkit/components/thumbnails/test/head.js
+++ /dev/null
@@ -1,356 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-var tmp = {};
-Cu.import("resource://gre/modules/PageThumbs.jsm", tmp);
-Cu.import("resource://gre/modules/BackgroundPageThumbs.jsm", tmp);
-Cu.import("resource://gre/modules/NewTabUtils.jsm", tmp);
-Cu.import("resource:///modules/sessionstore/SessionStore.jsm", tmp);
-Cu.import("resource://gre/modules/FileUtils.jsm", tmp);
-Cu.import("resource://gre/modules/osfile.jsm", tmp);
-var {PageThumbs, BackgroundPageThumbs, NewTabUtils, PageThumbsStorage, SessionStore, FileUtils, OS} = tmp;
-
-XPCOMUtils.defineLazyModuleGetter(this, "PlacesTestUtils",
- "resource://testing-common/PlacesTestUtils.jsm");
-
-var oldEnabledPref = Services.prefs.getBoolPref("browser.pagethumbnails.capturing_disabled");
-Services.prefs.setBoolPref("browser.pagethumbnails.capturing_disabled", false);
-
-registerCleanupFunction(function () {
- while (gBrowser.tabs.length > 1)
- gBrowser.removeTab(gBrowser.tabs[1]);
- Services.prefs.setBoolPref("browser.pagethumbnails.capturing_disabled", oldEnabledPref)
-});
-
-/**
- * Provide the default test function to start our test runner.
- */
-function test() {
- TestRunner.run();
-}
-
-/**
- * The test runner that controls the execution flow of our tests.
- */
-var TestRunner = {
- /**
- * Starts the test runner.
- */
- run: function () {
- waitForExplicitFinish();
-
- SessionStore.promiseInitialized.then(function () {
- this._iter = runTests();
- if (this._iter) {
- this.next();
- } else {
- finish();
- }
- }.bind(this));
- },
-
- /**
- * Runs the next available test or finishes if there's no test left.
- * @param aValue This value will be passed to the yielder via the runner's
- * iterator.
- */
- next: function (aValue) {
- let obj = TestRunner._iter.next(aValue);
- if (obj.done) {
- finish();
- return;
- }
-
- let value = obj.value || obj;
- if (value && typeof value.then == "function") {
- value.then(result => {
- next(result);
- }, error => {
- ok(false, error + "\n" + error.stack);
- });
- }
- }
-};
-
-/**
- * Continues the current test execution.
- * @param aValue This value will be passed to the yielder via the runner's
- * iterator.
- */
-function next(aValue) {
- TestRunner.next(aValue);
-}
-
-/**
- * Creates a new tab with the given URI.
- * @param aURI The URI that's loaded in the tab.
- * @param aCallback The function to call when the tab has loaded.
- */
-function addTab(aURI, aCallback) {
- let tab = gBrowser.selectedTab = gBrowser.addTab(aURI);
- whenLoaded(tab.linkedBrowser, aCallback);
-}
-
-/**
- * Loads a new URI into the currently selected tab.
- * @param aURI The URI to load.
- */
-function navigateTo(aURI) {
- let browser = gBrowser.selectedBrowser;
- whenLoaded(browser);
- browser.loadURI(aURI);
-}
-
-/**
- * Continues the current test execution when a load event for the given element
- * has been received.
- * @param aElement The DOM element to listen on.
- * @param aCallback The function to call when the load event was dispatched.
- */
-function whenLoaded(aElement, aCallback = next) {
- aElement.addEventListener("load", function onLoad() {
- aElement.removeEventListener("load", onLoad, true);
- executeSoon(aCallback);
- }, true);
-}
-
-/**
- * Captures a screenshot for the currently selected tab, stores it in the cache,
- * retrieves it from the cache and compares pixel color values.
- * @param aRed The red component's intensity.
- * @param aGreen The green component's intensity.
- * @param aBlue The blue component's intensity.
- * @param aMessage The info message to print when comparing the pixel color.
- */
-function captureAndCheckColor(aRed, aGreen, aBlue, aMessage) {
- let browser = gBrowser.selectedBrowser;
- // We'll get oranges if the expiration filter removes the file during the
- // test.
- dontExpireThumbnailURLs([browser.currentURI.spec]);
-
- // Capture the screenshot.
- PageThumbs.captureAndStore(browser, function () {
- retrieveImageDataForURL(browser.currentURI.spec, function ([r, g, b]) {
- is("" + [r, g, b], "" + [aRed, aGreen, aBlue], aMessage);
- next();
- });
- });
-}
-
-/**
- * For a given URL, loads the corresponding thumbnail
- * to a canvas and passes its image data to the callback.
- * Note, not compat with e10s!
- * @param aURL The url associated with the thumbnail.
- * @param aCallback The function to pass the image data to.
- */
-function retrieveImageDataForURL(aURL, aCallback) {
- let width = 100, height = 100;
- let thumb = PageThumbs.getThumbnailURL(aURL, width, height);
-
- let htmlns = "http://www.w3.org/1999/xhtml";
- let img = document.createElementNS(htmlns, "img");
- img.setAttribute("src", thumb);
-
- whenLoaded(img, function () {
- let canvas = document.createElementNS(htmlns, "canvas");
- canvas.setAttribute("width", width);
- canvas.setAttribute("height", height);
-
- // Draw the image to a canvas and compare the pixel color values.
- let ctx = canvas.getContext("2d");
- ctx.drawImage(img, 0, 0, width, height);
- let result = ctx.getImageData(0, 0, 100, 100).data;
- aCallback(result);
- });
-}
-
-/**
- * Returns the file of the thumbnail with the given URL.
- * @param aURL The URL of the thumbnail.
- */
-function thumbnailFile(aURL) {
- return new FileUtils.File(PageThumbsStorage.getFilePathForURL(aURL));
-}
-
-/**
- * Checks if a thumbnail for the given URL exists.
- * @param aURL The url associated to the thumbnail.
- */
-function thumbnailExists(aURL) {
- let file = thumbnailFile(aURL);
- return file.exists() && file.fileSize;
-}
-
-/**
- * Removes the thumbnail for the given URL.
- * @param aURL The URL associated with the thumbnail.
- */
-function removeThumbnail(aURL) {
- let file = thumbnailFile(aURL);
- file.remove(false);
-}
-
-/**
- * Calls addVisits, and then forces the newtab module to repopulate its links.
- * See addVisits for parameter descriptions.
- */
-function addVisitsAndRepopulateNewTabLinks(aPlaceInfo, aCallback) {
- PlacesTestUtils.addVisits(makeURI(aPlaceInfo)).then(() => {
- NewTabUtils.links.populateCache(aCallback, true);
- });
-}
-function promiseAddVisitsAndRepopulateNewTabLinks(aPlaceInfo) {
- return new Promise(resolve => addVisitsAndRepopulateNewTabLinks(aPlaceInfo, resolve));
-}
-
-/**
- * Calls a given callback when the thumbnail for a given URL has been found
- * on disk. Keeps trying until the thumbnail has been created.
- *
- * @param aURL The URL of the thumbnail's page.
- * @param [optional] aCallback
- * Function to be invoked on completion.
- */
-function whenFileExists(aURL, aCallback = next) {
- let callback = aCallback;
- if (!thumbnailExists(aURL)) {
- callback = () => whenFileExists(aURL, aCallback);
- }
-
- executeSoon(callback);
-}
-
-/**
- * Calls a given callback when the given file has been removed.
- * Keeps trying until the file is removed.
- *
- * @param aFile The file that is being removed
- * @param [optional] aCallback
- * Function to be invoked on completion.
- */
-function whenFileRemoved(aFile, aCallback) {
- let callback = aCallback;
- if (aFile.exists()) {
- callback = () => whenFileRemoved(aFile, aCallback);
- }
-
- executeSoon(callback || next);
-}
-
-function wait(aMillis) {
- setTimeout(next, aMillis);
-}
-
-/**
- * Makes sure that a given list of URLs is not implicitly expired.
- *
- * @param aURLs The list of URLs that should not be expired.
- */
-function dontExpireThumbnailURLs(aURLs) {
- let dontExpireURLs = (cb) => cb(aURLs);
- PageThumbs.addExpirationFilter(dontExpireURLs);
-
- registerCleanupFunction(function () {
- PageThumbs.removeExpirationFilter(dontExpireURLs);
- });
-}
-
-function bgCapture(aURL, aOptions) {
- bgCaptureWithMethod("capture", aURL, aOptions);
-}
-
-function bgCaptureIfMissing(aURL, aOptions) {
- bgCaptureWithMethod("captureIfMissing", aURL, aOptions);
-}
-
-function bgCaptureWithMethod(aMethodName, aURL, aOptions = {}) {
- // We'll get oranges if the expiration filter removes the file during the
- // test.
- dontExpireThumbnailURLs([aURL]);
- if (!aOptions.onDone)
- aOptions.onDone = next;
- BackgroundPageThumbs[aMethodName](aURL, aOptions);
-}
-
-function bgTestPageURL(aOpts = {}) {
- let TEST_PAGE_URL = "http://mochi.test:8888/browser/toolkit/components/thumbnails/test/thumbnails_background.sjs";
- return TEST_PAGE_URL + "?" + encodeURIComponent(JSON.stringify(aOpts));
-}
-
-function bgAddPageThumbObserver(url) {
- return new Promise((resolve, reject) => {
- function observe(subject, topic, data) { // jshint ignore:line
- if (data === url) {
- switch (topic) {
- case "page-thumbnail:create":
- resolve();
- break;
- case "page-thumbnail:error":
- reject(new Error("page-thumbnail:error"));
- break;
- }
- Services.obs.removeObserver(observe, "page-thumbnail:create");
- Services.obs.removeObserver(observe, "page-thumbnail:error");
- }
- }
- Services.obs.addObserver(observe, "page-thumbnail:create", false);
- Services.obs.addObserver(observe, "page-thumbnail:error", false);
- });
-}
-
-function bgAddCrashObserver() {
- let crashed = false;
- Services.obs.addObserver(function crashObserver(subject, topic, data) {
- is(topic, 'ipc:content-shutdown', 'Received correct observer topic.');
- ok(subject instanceof Components.interfaces.nsIPropertyBag2,
- 'Subject implements nsIPropertyBag2.');
- // we might see this called as the process terminates due to previous tests.
- // We are only looking for "abnormal" exits...
- if (!subject.hasKey("abnormal")) {
- info("This is a normal termination and isn't the one we are looking for...");
- return;
- }
- Services.obs.removeObserver(crashObserver, 'ipc:content-shutdown');
- crashed = true;
-
- var dumpID;
- if ('nsICrashReporter' in Components.interfaces) {
- dumpID = subject.getPropertyAsAString('dumpID');
- ok(dumpID, "dumpID is present and not an empty string");
- }
-
- if (dumpID) {
- var minidumpDirectory = getMinidumpDirectory();
- removeFile(minidumpDirectory, dumpID + '.dmp');
- removeFile(minidumpDirectory, dumpID + '.extra');
- }
- }, 'ipc:content-shutdown', false);
- return {
- get crashed() {
- return crashed;
- }
- };
-}
-
-function bgInjectCrashContentScript() {
- const TEST_CONTENT_HELPER = "chrome://mochitests/content/browser/toolkit/components/thumbnails/test/thumbnails_crash_content_helper.js";
- let thumbnailBrowser = BackgroundPageThumbs._thumbBrowser;
- let mm = thumbnailBrowser.messageManager;
- mm.loadFrameScript(TEST_CONTENT_HELPER, false);
- return mm;
-}
-
-function getMinidumpDirectory() {
- var dir = Services.dirsvc.get('ProfD', Components.interfaces.nsIFile);
- dir.append("minidumps");
- return dir;
-}
-
-function removeFile(directory, filename) {
- var file = directory.clone();
- file.append(filename);
- if (file.exists()) {
- file.remove(false);
- }
-}
diff --git a/toolkit/components/thumbnails/test/privacy_cache_control.sjs b/toolkit/components/thumbnails/test/privacy_cache_control.sjs
deleted file mode 100644
index 6c7c16edb4..0000000000
--- a/toolkit/components/thumbnails/test/privacy_cache_control.sjs
+++ /dev/null
@@ -1,16 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-function handleRequest(aRequest, aResponse) {
- // Set HTTP Status
- aResponse.setStatusLine(aRequest.httpVersion, 200, "OK");
-
- // Set Cache-Control header.
- let value = aRequest.queryString;
- if (value)
- aResponse.setHeader("Cache-Control", value);
-
- // Set the response body.
- aResponse.write("<!DOCTYPE html><html><body></body></html>");
-}
diff --git a/toolkit/components/thumbnails/test/test_thumbnails_interfaces.js b/toolkit/components/thumbnails/test/test_thumbnails_interfaces.js
deleted file mode 100644
index a8fe514182..0000000000
--- a/toolkit/components/thumbnails/test/test_thumbnails_interfaces.js
+++ /dev/null
@@ -1,25 +0,0 @@
-// tests to check that moz-page-thumb URLs correctly resolve as file:// URLS
-"use strict";
-
-const Cu = Components.utils;
-const Cc = Components.classes;
-const Cr = Components.results;
-const Ci = Components.interfaces;
-
-Cu.import("resource://gre/modules/Services.jsm");
-
-// need profile so that PageThumbsStorage can resolve the path to the underlying file
-do_get_profile();
-
-function run_test() {
- // first check the protocol handler implements the correct interface
- let handler = Services.io.getProtocolHandler("moz-page-thumb");
- ok(handler instanceof Ci.nsISubstitutingProtocolHandler,
- "moz-page-thumb handler provides substituting interface");
-
- // then check that the file URL resolution works
- let uri = Services.io.newURI("moz-page-thumb://thumbnail/?url=http%3A%2F%2Fwww.mozilla.org%2F",
- null, null);
- ok(uri instanceof Ci.nsIFileURL, "moz-page-thumb:// is a FileURL");
- ok(uri.file, "This moz-page-thumb:// object is backed by a file");
-}
diff --git a/toolkit/components/thumbnails/test/thumbnails_background.sjs b/toolkit/components/thumbnails/test/thumbnails_background.sjs
deleted file mode 100644
index f1cce96a0e..0000000000
--- a/toolkit/components/thumbnails/test/thumbnails_background.sjs
+++ /dev/null
@@ -1,79 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// The timer never fires if it's not declared and set to this variable outside
-// handleRequest, as if it's getting GC'ed when handleRequest's scope goes away.
-// Shouldn't the timer thread hold a strong reference to it?
-var timer;
-
-function handleRequest(req, resp) {
- resp.processAsync();
- resp.setHeader("Cache-Control", "no-cache, no-store", false);
- resp.setHeader("Content-Type", "text/html;charset=utf-8", false);
-
- let opts = {};
- try {
- opts = JSON.parse(decodeURIComponent(req.queryString));
- }
- catch (err) {}
-
- let setCookieScript = "";
- if (opts.setRedCookie) {
- resp.setHeader("Set-Cookie", "red", false);
- setCookieScript = '<script>document.cookie="red";</script>';
- }
-
- if (opts.setGreenCookie) {
- resp.setHeader("Set-Cookie", "green", false);
- setCookieScript = '<script>document.cookie="green";</script>';
- }
-
- if (opts.iframe) {
- setCookieScript += '<iframe src="' + opts.iframe + '" />';
- }
-
- if (opts.xhr) {
- setCookieScript += `
- <script>
- var req = new XMLHttpRequest();
- req.open("GET", "${opts.xhr}", true);
- req.send();
- </script>
- `;
- }
-
- if (req.hasHeader("Cookie") &&
- req.getHeader("Cookie").split(";").indexOf("red") >= 0) {
- resp.write('<html style="background: #f00;">' + setCookieScript + '</html>');
- resp.finish();
- return;
- }
-
- if (req.hasHeader("Cookie") &&
- req.getHeader("Cookie").split(";").indexOf("green") >= 0) {
- resp.write('<html style="background: #0f0;">' + setCookieScript + '</html>');
- resp.finish();
- return;
- }
-
- if (opts.redirect) {
- resp.setHeader("Location", opts.redirect);
- resp.setStatusLine(null, 303, null);
- resp.finish();
- return;
- }
-
- if (opts.wait) {
- resp.write("Waiting " + opts.wait + " ms... ");
- timer = Components.classes["@mozilla.org/timer;1"].
- createInstance(Components.interfaces.nsITimer);
- timer.init(function ding() {
- resp.write("OK!");
- resp.finish();
- }, opts.wait, Components.interfaces.nsITimer.TYPE_ONE_SHOT);
- return;
- }
-
- resp.write("<pre>" + JSON.stringify(opts, undefined, 2) + "</pre>" + setCookieScript);
- resp.finish();
-}
diff --git a/toolkit/components/thumbnails/test/thumbnails_crash_content_helper.js b/toolkit/components/thumbnails/test/thumbnails_crash_content_helper.js
deleted file mode 100644
index 935175f864..0000000000
--- a/toolkit/components/thumbnails/test/thumbnails_crash_content_helper.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-* http://creativecommons.org/publicdomain/zero/1.0/ */
-
-var Cu = Components.utils;
-
-// Ideally we would use CrashTestUtils.jsm, but that's only available for
-// xpcshell tests - so we just copy a ctypes crasher from it.
-Cu.import("resource://gre/modules/ctypes.jsm");
-var crash = function() { // this will crash when called.
- let zero = new ctypes.intptr_t(8);
- let badptr = ctypes.cast(zero, ctypes.PointerType(ctypes.int32_t));
- badptr.contents
-};
-
-
-var TestHelper = {
- init: function() {
- addMessageListener("thumbnails-test:crash", this);
- },
-
- receiveMessage: function(msg) {
- switch (msg.name) {
- case "thumbnails-test:crash":
- privateNoteIntentionalCrash();
- crash();
- break;
- }
- },
-}
-
-TestHelper.init();
diff --git a/toolkit/components/thumbnails/test/thumbnails_update.sjs b/toolkit/components/thumbnails/test/thumbnails_update.sjs
deleted file mode 100644
index 4d8ab406a2..0000000000
--- a/toolkit/components/thumbnails/test/thumbnails_update.sjs
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// This server-side script is used for browser_thumbnails_update. One of the
-// main things it must do in all cases is ensure a Cache-Control: no-store
-// header, so the foreground capture doesn't interfere with the testing.
-
-// If the querystring is "simple", then all it does it return some content -
-// it doesn't really matter what that content is.
-
-// Otherwise, its main role is that it must return different *content* for the
-// second request than it did for the first.
-// Also, it should be able to return an error response when requested for the
-// second response.
-// So the basic tests will be to grab the thumbnail, then request it to be
-// grabbed again:
-// * If the second request succeeded, the new thumbnail should exist.
-// * If the second request is an error, the new thumbnail should be ignored.
-
-function handleRequest(aRequest, aResponse) {
- aResponse.setHeader("Content-Type", "text/html;charset=utf-8", false);
- // we want to disable gBrowserThumbnails on-load capture for these responses,
- // so set as a "no-store" response.
- aResponse.setHeader("Cache-Control", "no-store");
-
- // for the simple test - just return some content.
- if (aRequest.queryString == "simple") {
- aResponse.write("<html><body></body></html>");
- aResponse.setStatusLine(aRequest.httpVersion, 200, "Its simply OK");
- return;
- }
-
- // it's one of the more complex tests where the first request for the given
- // URL must return different content than the second, and possibly an error
- // response for the second
- let doneError = getState(aRequest.queryString);
- if (!doneError) {
- // first request - return a response with a green body and 200 response.
- aResponse.setStatusLine(aRequest.httpVersion, 200, "OK - It's green");
- aResponse.write("<html><body bgcolor=00ff00></body></html>");
- // set the state so the next request does the "second request" thing below.
- setState(aRequest.queryString, "yep");
- } else {
- // second request - this will be done by the b/g service.
- // We always return a red background, but depending on the query string we
- // return either a 200 or 401 response.
- if (aRequest.queryString == "fail")
- aResponse.setStatusLine(aRequest.httpVersion, 401, "Oh no you don't");
- else
- aResponse.setStatusLine(aRequest.httpVersion, 200, "OK - It's red");
- aResponse.write("<html><body bgcolor=ff0000></body></html>");
- // reset the error state incase this ends up being reused for the
- // same url and querystring.
- setState(aRequest.queryString, "");
- }
-}
diff --git a/toolkit/components/thumbnails/test/xpcshell.ini b/toolkit/components/thumbnails/test/xpcshell.ini
deleted file mode 100644
index 4dae8ccede..0000000000
--- a/toolkit/components/thumbnails/test/xpcshell.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[DEFAULT]
-head =
-tail =
-
-[test_thumbnails_interfaces.js]
-skip-if = os == 'android' # xpcom interface not packaged
diff --git a/toolkit/components/timermanager/moz.build b/toolkit/components/timermanager/moz.build
index 9977df6b5c..81ef3330b0 100644
--- a/toolkit/components/timermanager/moz.build
+++ b/toolkit/components/timermanager/moz.build
@@ -6,16 +6,9 @@
XPIDL_MODULE = 'update'
-XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
-
-XPIDL_SOURCES += [
- 'nsIUpdateTimerManager.idl',
-]
+XPIDL_SOURCES += ['nsIUpdateTimerManager.idl']
EXTRA_COMPONENTS += [
'nsUpdateTimerManager.js',
'nsUpdateTimerManager.manifest',
]
-
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'Application Update')
diff --git a/toolkit/components/timermanager/tests/unit/.eslintrc.js b/toolkit/components/timermanager/tests/unit/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/timermanager/tests/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/timermanager/tests/unit/consumerNotifications.js b/toolkit/components/timermanager/tests/unit/consumerNotifications.js
deleted file mode 100644
index b9926e11e9..0000000000
--- a/toolkit/components/timermanager/tests/unit/consumerNotifications.js
+++ /dev/null
@@ -1,519 +0,0 @@
-/* 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/.
- */
-
-/* General Update Timer Manager Tests */
-
-'use strict';
-
-const { classes: Cc, interfaces: Ci, manager: Cm, results: Cr,
- utils: Cu } = Components;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-const CATEGORY_UPDATE_TIMER = "update-timer";
-
-const PREF_APP_UPDATE_TIMERMINIMUMDELAY = "app.update.timerMinimumDelay";
-const PREF_APP_UPDATE_TIMERFIRSTINTERVAL = "app.update.timerFirstInterval";
-const PREF_APP_UPDATE_LOG_ALL = "app.update.log.all";
-const PREF_BRANCH_LAST_UPDATE_TIME = "app.update.lastUpdateTime.";
-
-const MAIN_TIMER_INTERVAL = 1000; // milliseconds
-const CONSUMER_TIMER_INTERVAL = 1; // seconds
-
-const TESTS = [ {
- desc: "Test Timer Callback 0",
- timerID: "test0-update-timer",
- defaultInterval: "bogus",
- prefInterval: "test0.timer.interval",
- contractID: "@mozilla.org/test0/timercallback;1",
- method: "createInstance",
- classID: Components.ID("9c7ce81f-98bb-4729-adb4-4d0deb0f59e5"),
- notified: false
-}, {
- desc: "Test Timer Callback 1",
- timerID: "test1-update-timer",
- defaultInterval: 86400,
- prefInterval: "test1.timer.interval",
- contractID: "@mozilla.org/test2/timercallback;1",
- method: "createInstance",
- classID: Components.ID("512834f3-05bb-46be-84e0-81d881a140b7"),
- notified: false
-}, {
- desc: "Test Timer Callback 2",
- timerID: "test2-update-timer",
- defaultInterval: CONSUMER_TIMER_INTERVAL,
- prefInterval: "test2.timer.interval",
- contractID: "@mozilla.org/test2/timercallback;1",
- method: "createInstance",
- classID: Components.ID("c8ac5027-8d11-4471-9d7c-fd692501b437"),
- notified: false
-}, {
- desc: "Test Timer Callback 3",
- timerID: "test3-update-timer",
- defaultInterval: CONSUMER_TIMER_INTERVAL,
- prefInterval: "test3.timer.interval",
- contractID: "@mozilla.org/test3/timercallback;1",
- method: "createInstance",
- classID: Components.ID("6b0e79f3-4ab8-414c-8f14-dde10e185727"),
- notified: false
-}, {
- desc: "Test Timer Callback 4",
- timerID: "test4-update-timer",
- defaultInterval: CONSUMER_TIMER_INTERVAL,
- prefInterval: "test4.timer.interval",
- contractID: "@mozilla.org/test4/timercallback;1",
- method: "createInstance",
- classID: Components.ID("2f6b7b92-e40f-4874-bfbb-eeb2412c959d"),
- notified: false
-}, {
- desc: "Test Timer Callback 5",
- timerID: "test5-update-timer",
- defaultInterval: 86400,
- prefInterval: "test5.timer.interval",
- contractID: "@mozilla.org/test5/timercallback;1",
- method: "createInstance",
- classID: Components.ID("8a95f611-b2ac-4c7e-8b73-9748c4839731"),
- notified: false
-}, {
- desc: "Test Timer Callback 6",
- timerID: "test6-update-timer",
- defaultInterval: CONSUMER_TIMER_INTERVAL,
- prefInterval: "test6.timer.interval",
- contractID: "@mozilla.org/test6/timercallback;1",
- method: "createInstance",
- classID: Components.ID("2d091020-e23c-11e2-a28f-0800200c9a66"),
- notified: false
-}, {
- desc: "Test Timer Callback 7",
- timerID: "test7-update-timer",
- defaultInterval: 86400,
- maxInterval: CONSUMER_TIMER_INTERVAL,
- prefInterval: "test7.timer.interval",
- contractID: "@mozilla.org/test7/timercallback;1",
- method: "createInstance",
- classID: Components.ID("8e8633ae-1d70-4a7a-8bea-6e1e6c5d7742"),
- notified: false
-}, {
- desc: "Test Timer Callback 8",
- timerID: "test8-update-timer",
- defaultInterval: CONSUMER_TIMER_INTERVAL,
- contractID: "@mozilla.org/test8/timercallback;1",
- classID: Components.ID("af878d4b-1d12-41f6-9a90-4e687367ecc1"),
- notified: false,
- lastUpdateTime: 0
-}, {
- desc: "Test Timer Callback 9",
- timerID: "test9-update-timer",
- defaultInterval: CONSUMER_TIMER_INTERVAL,
- contractID: "@mozilla.org/test9/timercallback;1",
- classID: Components.ID("5136b201-d64c-4328-8cf1-1a63491cc117"),
- notified: false,
- lastUpdateTime: 0
-} ];
-
-var gUTM;
-var gNextFunc;
-
-XPCOMUtils.defineLazyServiceGetter(this, "gPref",
- "@mozilla.org/preferences-service;1",
- "nsIPrefBranch");
-
-XPCOMUtils.defineLazyServiceGetter(this, "gCatMan",
- "@mozilla.org/categorymanager;1",
- "nsICategoryManager");
-
-XPCOMUtils.defineLazyGetter(this, "gCompReg", function () {
- return Cm.QueryInterface(Ci.nsIComponentRegistrar);
-});
-
-const gTest0TimerCallback = {
- notify: function T0CB_notify(aTimer) {
- // This can happen when another notification fails and this timer having
- // time to fire so check other timers are successful.
- do_throw("gTest0TimerCallback notify method should not have been called");
- },
- QueryInterface: XPCOMUtils.generateQI([Ci.nsITimerCallback])
-};
-
-const gTest0Factory = {
- createInstance: function T0F_createInstance(aOuter, aIID) {
- if (aOuter == null) {
- return gTest0TimerCallback.QueryInterface(aIID);
- }
- throw Cr.NS_ERROR_NO_AGGREGATION;
- }
-};
-
-const gTest1TimerCallback = {
- notify: function T1CB_notify(aTimer) {
- // This can happen when another notification fails and this timer having
- // time to fire so check other timers are successful.
- do_throw("gTest1TimerCallback notify method should not have been called");
- },
- QueryInterface: XPCOMUtils.generateQI([Ci.nsITimer])
-};
-
-const gTest1Factory = {
- createInstance: function T1F_createInstance(aOuter, aIID) {
- if (aOuter == null) {
- return gTest1TimerCallback.QueryInterface(aIID);
- }
- throw Cr.NS_ERROR_NO_AGGREGATION;
- }
-};
-
-const gTest2TimerCallback = {
- notify: function T2CB_notify(aTimer) {
- // This can happen when another notification fails and this timer having
- // time to fire so check other timers are successful.
- do_throw("gTest2TimerCallback notify method should not have been called");
- },
- QueryInterface: XPCOMUtils.generateQI([Ci.nsITimerCallback])
-};
-
-const gTest2Factory = {
- createInstance: function T2F_createInstance(aOuter, aIID) {
- if (aOuter == null) {
- return gTest2TimerCallback.QueryInterface(aIID);
- }
- throw Cr.NS_ERROR_NO_AGGREGATION;
- }
-};
-
-const gTest3TimerCallback = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsITimerCallback])
-};
-
-const gTest3Factory = {
- createInstance: function T3F_createInstance(aOuter, aIID) {
- if (aOuter == null) {
- return gTest3TimerCallback.QueryInterface(aIID);
- }
- throw Cr.NS_ERROR_NO_AGGREGATION;
- }
-};
-
-const gTest4TimerCallback = {
- notify: function T4CB_notify(aTimer) {
- gCatMan.deleteCategoryEntry(CATEGORY_UPDATE_TIMER, TESTS[4].desc, true);
- TESTS[4].notified = true;
- finished_test0thru7();
- },
- QueryInterface: XPCOMUtils.generateQI([Ci.nsITimerCallback])
-};
-
-const gTest4Factory = {
- createInstance: function T4F_createInstance(aOuter, aIID) {
- if (aOuter == null) {
- return gTest4TimerCallback.QueryInterface(aIID);
- }
- throw Cr.NS_ERROR_NO_AGGREGATION;
- }
-};
-
-const gTest5TimerCallback = {
- notify: function T5CB_notify(aTimer) {
- gCatMan.deleteCategoryEntry(CATEGORY_UPDATE_TIMER, TESTS[5].desc, true);
- TESTS[5].notified = true;
- finished_test0thru7();
- },
- QueryInterface: XPCOMUtils.generateQI([Ci.nsITimerCallback])
-};
-
-const gTest5Factory = {
- createInstance: function T5F_createInstance(aOuter, aIID) {
- if (aOuter == null) {
- return gTest5TimerCallback.QueryInterface(aIID);
- }
- throw Cr.NS_ERROR_NO_AGGREGATION;
- }
-};
-
-const gTest6TimerCallback = {
- notify: function T6CB_notify(aTimer) {
- gCatMan.deleteCategoryEntry(CATEGORY_UPDATE_TIMER, TESTS[6].desc, true);
- TESTS[6].notified = true;
- finished_test0thru7();
- },
- QueryInterface: XPCOMUtils.generateQI([Ci.nsITimerCallback])
-};
-
-const gTest6Factory = {
- createInstance: function T6F_createInstance(aOuter, aIID) {
- if (aOuter == null) {
- return gTest6TimerCallback.QueryInterface(aIID);
- }
- throw Cr.NS_ERROR_NO_AGGREGATION;
- }
-};
-
-const gTest7TimerCallback = {
- notify: function T7CB_notify(aTimer) {
- gCatMan.deleteCategoryEntry(CATEGORY_UPDATE_TIMER, TESTS[7].desc, true);
- TESTS[7].notified = true;
- finished_test0thru7();
- },
- QueryInterface: XPCOMUtils.generateQI([Ci.nsITimerCallback])
-};
-
-const gTest7Factory = {
- createInstance: function T7F_createInstance(aOuter, aIID) {
- if (aOuter == null) {
- return gTest7TimerCallback.QueryInterface(aIID);
- }
- throw Cr.NS_ERROR_NO_AGGREGATION;
- }
-};
-
-const gTest8TimerCallback = {
- notify: function T8CB_notify(aTimer) {
- TESTS[8].notified = true;
- TESTS[8].notifyTime = Date.now();
- do_execute_soon(function () {
- check_test8thru9(gTest8TimerCallback);
- });
- },
- QueryInterface: XPCOMUtils.generateQI([Ci.nsITimerCallback])
-};
-
-const gTest8Factory = {
- createInstance: function T8F_createInstance(aOuter, aIID) {
- if (aOuter == null) {
- return gTest8TimerCallback.QueryInterface(aIID);
- }
- throw Cr.NS_ERROR_NO_AGGREGATION;
- }
-};
-
-const gTest9TimerCallback = {
- notify: function T9CB_notify(aTimer) {
- TESTS[9].notified = true;
- TESTS[9].notifyTime = Date.now();
- do_execute_soon(function () {
- check_test8thru9(gTest9TimerCallback);
- });
- },
- QueryInterface: XPCOMUtils.generateQI([Ci.nsITimerCallback])
-};
-
-const gTest9Factory = {
- createInstance: function T9F_createInstance(aOuter, aIID) {
- if (aOuter == null) {
- return gTest9TimerCallback.QueryInterface(aIID);
- }
- throw Cr.NS_ERROR_NO_AGGREGATION;
- }
-};
-
-function run_test() {
- do_test_pending();
-
- // Set the timer to fire every second
- gPref.setIntPref(PREF_APP_UPDATE_TIMERMINIMUMDELAY, MAIN_TIMER_INTERVAL / 1000);
- gPref.setIntPref(PREF_APP_UPDATE_TIMERFIRSTINTERVAL, MAIN_TIMER_INTERVAL);
- gPref.setBoolPref(PREF_APP_UPDATE_LOG_ALL, true);
-
- // Remove existing update timers to prevent them from being notified
- let entries = gCatMan.enumerateCategory(CATEGORY_UPDATE_TIMER);
- while (entries.hasMoreElements()) {
- let entry = entries.getNext().QueryInterface(Ci.nsISupportsCString).data;
- gCatMan.deleteCategoryEntry(CATEGORY_UPDATE_TIMER, entry, false);
- }
-
- gUTM = Cc["@mozilla.org/updates/timer-manager;1"].
- getService(Ci.nsIUpdateTimerManager).
- QueryInterface(Ci.nsIObserver);
- gUTM.observe(null, "utm-test-init", "");
-
- do_execute_soon(run_test0thru7);
-}
-
-function end_test() {
- gUTM.observe(null, "xpcom-shutdown", "");
- do_test_finished();
-}
-
-function run_test0thru7() {
- gNextFunc = check_test0thru7;
- // bogus default interval
- gCompReg.registerFactory(TESTS[0].classID, TESTS[0].desc,
- TESTS[0].contractID, gTest0Factory);
- gCatMan.addCategoryEntry(CATEGORY_UPDATE_TIMER, TESTS[0].desc,
- [TESTS[0].contractID, TESTS[0].method,
- TESTS[0].timerID, TESTS[0].prefInterval,
- TESTS[0].defaultInterval].join(","), false, true);
-
- // doesn't implement nsITimerCallback
- gCompReg.registerFactory(TESTS[1].classID, TESTS[1].desc,
- TESTS[1].contractID, gTest1Factory);
- gCatMan.addCategoryEntry(CATEGORY_UPDATE_TIMER, TESTS[1].desc,
- [TESTS[1].contractID, TESTS[1].method,
- TESTS[1].timerID, TESTS[1].prefInterval,
- TESTS[1].defaultInterval].join(","), false, true);
-
- // has a last update time of now - 43200 which is half of its interval
- let lastUpdateTime = Math.round(Date.now() / 1000) - 43200;
- gPref.setIntPref(PREF_BRANCH_LAST_UPDATE_TIME + TESTS[2].timerID, lastUpdateTime);
- gCompReg.registerFactory(TESTS[2].classID, TESTS[2].desc,
- TESTS[2].contractID, gTest2Factory);
- gCatMan.addCategoryEntry(CATEGORY_UPDATE_TIMER, TESTS[2].desc,
- [TESTS[2].contractID, TESTS[2].method,
- TESTS[2].timerID, TESTS[2].prefInterval,
- TESTS[2].defaultInterval].join(","), false, true);
-
- // doesn't have a notify method
- gCompReg.registerFactory(TESTS[3].classID, TESTS[3].desc,
- TESTS[3].contractID, gTest3Factory);
- gCatMan.addCategoryEntry(CATEGORY_UPDATE_TIMER, TESTS[3].desc,
- [TESTS[3].contractID, TESTS[3].method,
- TESTS[3].timerID, TESTS[3].prefInterval,
- TESTS[3].defaultInterval].join(","), false, true);
-
- // already has a last update time
- gPref.setIntPref(PREF_BRANCH_LAST_UPDATE_TIME + TESTS[4].timerID, 1);
- gCompReg.registerFactory(TESTS[4].classID, TESTS[4].desc,
- TESTS[4].contractID, gTest4Factory);
- gCatMan.addCategoryEntry(CATEGORY_UPDATE_TIMER, TESTS[4].desc,
- [TESTS[4].contractID, TESTS[4].method,
- TESTS[4].timerID, TESTS[4].prefInterval,
- TESTS[4].defaultInterval].join(","), false, true);
-
- // has an interval preference that overrides the default
- gPref.setIntPref(TESTS[5].prefInterval, CONSUMER_TIMER_INTERVAL);
- gCompReg.registerFactory(TESTS[5].classID, TESTS[5].desc,
- TESTS[5].contractID, gTest5Factory);
- gCatMan.addCategoryEntry(CATEGORY_UPDATE_TIMER, TESTS[5].desc,
- [TESTS[5].contractID, TESTS[5].method,
- TESTS[5].timerID, TESTS[5].prefInterval,
- TESTS[5].defaultInterval].join(","), false, true);
-
- // has a next update time 24 hours from now
- let nextUpdateTime = Math.round(Date.now() / 1000) + 86400;
- gPref.setIntPref(PREF_BRANCH_LAST_UPDATE_TIME + TESTS[6].timerID, nextUpdateTime);
- gCompReg.registerFactory(TESTS[6].classID, TESTS[6].desc,
- TESTS[6].contractID, gTest6Factory);
- gCatMan.addCategoryEntry(CATEGORY_UPDATE_TIMER, TESTS[6].desc,
- [TESTS[6].contractID, TESTS[6].method,
- TESTS[6].timerID, TESTS[6].prefInterval,
- TESTS[6].defaultInterval].join(","), false, true);
-
- // has a maximum interval set by the value of MAIN_TIMER_INTERVAL
- gPref.setIntPref(TESTS[7].prefInterval, 86400);
- gCompReg.registerFactory(TESTS[7].classID, TESTS[7].desc,
- TESTS[7].contractID, gTest7Factory);
- gCatMan.addCategoryEntry(CATEGORY_UPDATE_TIMER, TESTS[7].desc,
- [TESTS[7].contractID, TESTS[7].method,
- TESTS[7].timerID, TESTS[7].prefInterval,
- TESTS[7].defaultInterval,
- TESTS[7].maxInterval].join(","), false, true);
-}
-
-function finished_test0thru7() {
- if (TESTS[4].notified && TESTS[5].notified && TESTS[6].notified && TESTS[7].notified) {
- do_execute_soon(gNextFunc);
- }
-}
-
-function check_test0thru7() {
- Assert.ok(!TESTS[0].notified,
- "a category registered timer didn't fire due to an invalid " +
- "default interval");
-
- Assert.ok(!TESTS[1].notified,
- "a category registered timer didn't fire due to not implementing " +
- "nsITimerCallback");
-
- Assert.ok(!TESTS[2].notified,
- "a category registered timer didn't fire due to the next update " +
- "time being in the future");
-
- Assert.ok(!TESTS[3].notified,
- "a category registered timer didn't fire due to not having a " +
- "notify method");
-
- Assert.ok(TESTS[4].notified,
- "a category registered timer has fired");
-
- Assert.ok(TESTS[5].notified,
- "a category registered timer fired that has an interval " +
- "preference that overrides a default that wouldn't have fired yet");
-
- Assert.ok(TESTS[6].notified,
- "a category registered timer has fired due to the next update " +
- "time being reset due to a future last update time");
-
- Assert.ok(gPref.prefHasUserValue(PREF_BRANCH_LAST_UPDATE_TIME +
- TESTS[4].timerID),
- "first of two category registered timers last update time has " +
- "a user value");
- Assert.ok(gPref.prefHasUserValue(PREF_BRANCH_LAST_UPDATE_TIME +
- TESTS[5].timerID),
- "second of two category registered timers last update time has " +
- "a user value");
-
- // Remove the category timers that should have failed
- gCatMan.deleteCategoryEntry(CATEGORY_UPDATE_TIMER, TESTS[0].desc, true);
- gCatMan.deleteCategoryEntry(CATEGORY_UPDATE_TIMER, TESTS[1].desc, true);
- gCatMan.deleteCategoryEntry(CATEGORY_UPDATE_TIMER, TESTS[2].desc, true);
- gCatMan.deleteCategoryEntry(CATEGORY_UPDATE_TIMER, TESTS[3].desc, true);
- let entries = gCatMan.enumerateCategory(CATEGORY_UPDATE_TIMER);
- while (entries.hasMoreElements()) {
- let entry = entries.getNext().QueryInterface(Ci.nsISupportsCString).data;
- gCatMan.deleteCategoryEntry(CATEGORY_UPDATE_TIMER, entry, false);
- }
-
- entries = gCatMan.enumerateCategory(CATEGORY_UPDATE_TIMER);
- Assert.ok(!entries.hasMoreElements(),
- "no " + CATEGORY_UPDATE_TIMER + " categories should still be " +
- "registered");
-
- do_execute_soon(run_test8thru9);
-}
-
-function run_test8thru9() {
- gPref.setIntPref(PREF_BRANCH_LAST_UPDATE_TIME + TESTS[8].timerID, 1);
- gCompReg.registerFactory(TESTS[8].classID, TESTS[8].desc,
- TESTS[8].contractID, gTest8Factory);
- gUTM.registerTimer(TESTS[8].timerID, gTest8TimerCallback,
- TESTS[8].defaultInterval);
- gPref.setIntPref(PREF_BRANCH_LAST_UPDATE_TIME + TESTS[9].timerID, 1);
- gCompReg.registerFactory(TESTS[9].classID, TESTS[9].desc,
- TESTS[9].contractID, gTest9Factory);
- gUTM.registerTimer(TESTS[9].timerID, gTest9TimerCallback,
- TESTS[9].defaultInterval);
-}
-
-function check_test8thru9(aTestTimerCallback) {
- aTestTimerCallback.timesCalled = (aTestTimerCallback.timesCalled || 0) + 1;
- if (aTestTimerCallback.timesCalled < 2) {
- return;
- }
-
- Assert.ok(TESTS[8].notified,
- "first registerTimer registered timer should have fired");
-
- Assert.ok(TESTS[9].notified,
- "second registerTimer registered timer should have fired");
-
- // Check that 'staggering' has happened: even though the two events wanted to fire at
- // the same time, we waited a full MAIN_TIMER_INTERVAL between them.
- // (to avoid sensitivity to random timing issues, we fudge by a factor of 0.5 here)
- Assert.ok(Math.abs(TESTS[8].notifyTime - TESTS[9].notifyTime) >=
- MAIN_TIMER_INTERVAL * 0.5,
- "staggering between two timers that want to fire at the same " +
- "time should have occured");
-
- let time = gPref.getIntPref(PREF_BRANCH_LAST_UPDATE_TIME + TESTS[8].timerID);
- Assert.notEqual(time, 1,
- "first registerTimer registered timer last update time " +
- "should have been updated");
-
- time = gPref.getIntPref(PREF_BRANCH_LAST_UPDATE_TIME + TESTS[9].timerID);
- Assert.notEqual(time, 1,
- "second registerTimer registered timer last update time " +
- "should have been updated");
-
- end_test();
-}
diff --git a/toolkit/components/timermanager/tests/unit/xpcshell.ini b/toolkit/components/timermanager/tests/unit/xpcshell.ini
deleted file mode 100644
index 89e192e941..0000000000
--- a/toolkit/components/timermanager/tests/unit/xpcshell.ini
+++ /dev/null
@@ -1,9 +0,0 @@
-; 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/.
-
-[DEFAULT]
-head =
-tail =
-
-[consumerNotifications.js]
diff --git a/toolkit/components/tooltiptext/moz.build b/toolkit/components/tooltiptext/moz.build
index c75e6b7a46..3c5702ca43 100644
--- a/toolkit/components/tooltiptext/moz.build
+++ b/toolkit/components/tooltiptext/moz.build
@@ -4,12 +4,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-BROWSER_CHROME_MANIFESTS += ['tests/browser.ini']
-
EXTRA_COMPONENTS += [
'TooltipTextProvider.js',
'TooltipTextProvider.manifest',
]
-
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'General')
diff --git a/toolkit/components/tooltiptext/tests/browser.ini b/toolkit/components/tooltiptext/tests/browser.ini
deleted file mode 100644
index 9896fcd2c2..0000000000
--- a/toolkit/components/tooltiptext/tests/browser.ini
+++ /dev/null
@@ -1,7 +0,0 @@
-[browser_bug329212.js]
-support-files = title_test.svg
-[browser_bug331772_xul_tooltiptext_in_html.js]
-support-files = xul_tooltiptext.xhtml
-[browser_bug561623.js]
-[browser_bug581947.js]
-[browser_input_file_tooltips.js]
diff --git a/toolkit/components/tooltiptext/tests/browser_bug329212.js b/toolkit/components/tooltiptext/tests/browser_bug329212.js
deleted file mode 100644
index b3434eff69..0000000000
--- a/toolkit/components/tooltiptext/tests/browser_bug329212.js
+++ /dev/null
@@ -1,35 +0,0 @@
-"use strict";
-
-add_task(function*() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "http://mochi.test:8888/browser/toolkit/components/tooltiptext/tests/title_test.svg",
- }, function*(browser) {
- yield ContentTask.spawn(browser, "", function() {
- let tttp = Cc["@mozilla.org/embedcomp/default-tooltiptextprovider;1"]
- .getService(Ci.nsITooltipTextProvider);
- function checkElement(id, expectedTooltipText) {
- let el = content.document.getElementById(id);
- let textObj = {};
- let shouldHaveTooltip = expectedTooltipText !== null;
- is(tttp.getNodeText(el, textObj, {}), shouldHaveTooltip,
- "element " + id + " should " + (shouldHaveTooltip ? "" : "not ") + "have a tooltip");
- if (shouldHaveTooltip) {
- is(textObj.value, expectedTooltipText,
- "element " + id + " should have the right tooltip text");
- }
- }
- checkElement("svg1", "This is a non-root SVG element title");
- checkElement("text1", "\n\n\n This is a title\n\n ");
- checkElement("text2", null);
- checkElement("text3", null);
- checkElement("link1", "\n This is a title\n ");
- checkElement("text4", "\n This is a title\n ");
- checkElement("link2", null);
- checkElement("link3", "This is an xlink:title attribute");
- checkElement("link4", "This is an xlink:title attribute");
- checkElement("text5", null);
- });
- });
-});
-
diff --git a/toolkit/components/tooltiptext/tests/browser_bug331772_xul_tooltiptext_in_html.js b/toolkit/components/tooltiptext/tests/browser_bug331772_xul_tooltiptext_in_html.js
deleted file mode 100644
index 23d8c4a6ef..0000000000
--- a/toolkit/components/tooltiptext/tests/browser_bug331772_xul_tooltiptext_in_html.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Tests that the tooltiptext attribute is used for XUL elements in an HTML doc.
- */
-add_task(function*() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "http://mochi.test:8888/browser/toolkit/components/tooltiptext/tests/xul_tooltiptext.xhtml",
- }, function*(browser) {
- yield ContentTask.spawn(browser, "", function() {
- let textObj = {};
- let tttp = Cc["@mozilla.org/embedcomp/default-tooltiptextprovider;1"]
- .getService(Ci.nsITooltipTextProvider);
- let xulToolbarButton = content.document.getElementById("xulToolbarButton");
- ok(tttp.getNodeText(xulToolbarButton, textObj, {}), "should get tooltiptext");
- is(textObj.value, "XUL tooltiptext");
- });
- });
-});
-
diff --git a/toolkit/components/tooltiptext/tests/browser_bug561623.js b/toolkit/components/tooltiptext/tests/browser_bug561623.js
deleted file mode 100644
index 49c51c4ba2..0000000000
--- a/toolkit/components/tooltiptext/tests/browser_bug561623.js
+++ /dev/null
@@ -1,24 +0,0 @@
-add_task(function*() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "data:text/html,<!DOCTYPE html><html><body><input id='i'></body></html>",
- }, function*(browser) {
- yield ContentTask.spawn(browser, "", function() {
- let tttp = Cc["@mozilla.org/embedcomp/default-tooltiptextprovider;1"]
- .getService(Ci.nsITooltipTextProvider);
- let i = content.document.getElementById("i");
-
- ok(!tttp.getNodeText(i, {}, {}),
- "No tooltip should be shown when @title is null");
-
- i.title = "foo";
- ok(tttp.getNodeText(i, {}, {}),
- "A tooltip should be shown when @title is not the empty string");
-
- i.pattern = "bar";
- ok(tttp.getNodeText(i, {}, {}),
- "A tooltip should be shown when @title is not the empty string");
- });
- });
-});
-
diff --git a/toolkit/components/tooltiptext/tests/browser_bug581947.js b/toolkit/components/tooltiptext/tests/browser_bug581947.js
deleted file mode 100644
index 034e0a4d13..0000000000
--- a/toolkit/components/tooltiptext/tests/browser_bug581947.js
+++ /dev/null
@@ -1,87 +0,0 @@
-function check(aBrowser, aElementName, aBarred, aType) {
- return ContentTask.spawn(aBrowser, [aElementName, aBarred, aType], function*([aElementName, aBarred, aType]) {
- let e = content.document.createElement(aElementName);
- let contentElement = content.document.getElementById('content');
- contentElement.appendChild(e);
-
- if (aType) {
- e.type = aType;
- }
-
- let tttp = Cc["@mozilla.org/embedcomp/default-tooltiptextprovider;1"]
- .getService(Ci.nsITooltipTextProvider);
- ok(!tttp.getNodeText(e, {}, {}),
- "No tooltip should be shown when the element is valid");
-
- e.setCustomValidity('foo');
- if (aBarred) {
- ok(!tttp.getNodeText(e, {}, {}),
- "No tooltip should be shown when the element is barred from constraint validation");
- } else {
- ok(tttp.getNodeText(e, {}, {}),
- e.tagName + " " +"A tooltip should be shown when the element isn't valid");
- }
-
- e.setAttribute('title', '');
- ok (!tttp.getNodeText(e, {}, {}),
- "No tooltip should be shown if the title attribute is set");
-
- e.removeAttribute('title');
- contentElement.setAttribute('novalidate', '');
- ok (!tttp.getNodeText(e, {}, {}),
- "No tooltip should be shown if the novalidate attribute is set on the form owner");
- contentElement.removeAttribute('novalidate');
-
- e.remove();
- });
-}
-
-function todo_check(aBrowser, aElementName, aBarred) {
- return ContentTask.spawn(aBrowser, [aElementName, aBarred], function*([aElementName, aBarred]) {
- let e = content.document.createElement(aElementName);
- let contentElement = content.document.getElementById('content');
- contentElement.appendChild(e);
-
- let caught = false;
- try {
- e.setCustomValidity('foo');
- } catch (e) {
- caught = true;
- }
-
- todo(!caught, "setCustomValidity should exist for " + aElementName);
-
- e.remove();
- });
-}
-
-add_task(function*() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "data:text/html,<!DOCTYPE html><html><body><form id='content'></form></body></html>",
- }, function*(browser) {
- let testData = [
- /* element name, barred */
- [ 'input', false, null],
- [ 'textarea', false, null],
- [ 'button', true, 'button'],
- [ 'button', false, 'submit'],
- [ 'select', false, null],
- [ 'output', true, null],
- [ 'fieldset', true, null],
- [ 'object', true, null],
- ];
-
- for (let data of testData) {
- yield check(browser, data[0], data[1], data[2]);
- }
-
- let todo_testData = [
- [ 'keygen', 'false' ],
- ];
-
- for (let data of todo_testData) {
- yield todo_check(browser, data[0], data[1]);
- }
- });
-});
diff --git a/toolkit/components/tooltiptext/tests/browser_input_file_tooltips.js b/toolkit/components/tooltiptext/tests/browser_input_file_tooltips.js
deleted file mode 100644
index a1323095d4..0000000000
--- a/toolkit/components/tooltiptext/tests/browser_input_file_tooltips.js
+++ /dev/null
@@ -1,122 +0,0 @@
-
-let tempFile;
-add_task(function* setup() {
- yield new Promise(resolve => {
- SpecialPowers.pushPrefEnv({"set": [["ui.tooltipDelay", 0]]}, resolve);
- });
- tempFile = createTempFile();
- registerCleanupFunction(function() {
- tempFile.remove(true);
- });
-});
-
-add_task(function* test_singlefile_selected() {
- yield do_test({value: true, result: "testfile_bug1251809"});
-});
-
-add_task(function* test_title_set() {
- yield do_test({title: "foo", result: "foo"});
-});
-
-add_task(function* test_nofile_selected() {
- yield do_test({result: "No file selected."});
-});
-
-add_task(function* test_multipleset_nofile_selected() {
- yield do_test({multiple: true, result: "No files selected."});
-});
-
-add_task(function* test_requiredset() {
- yield do_test({required: true, result: "Please select a file."});
-});
-
-function* do_test(test) {
- info(`starting test ${JSON.stringify(test)}`);
-
- let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser);
-
- info("Moving mouse out of the way.");
- yield new Promise(resolve => {
- EventUtils.synthesizeNativeMouseMove(tab.linkedBrowser, 300, 300, resolve);
- });
-
- info("creating input field");
- yield ContentTask.spawn(tab.linkedBrowser, test, function*(test) {
- let doc = content.document;
- let input = doc.createElement("input");
- doc.body.appendChild(input);
- input.id = "test_input";
- input.setAttribute("style", "position: absolute; top: 0; left: 0;");
- input.type = "file";
- if (test.title) {
- input.setAttribute("title", test.title);
- }
- if (test.multiple) {
- input.multiple = true;
- }
- if (test.required) {
- input.required = true;
- }
- });
-
- if (test.value) {
- info("Creating mock filepicker to select files");
- let MockFilePicker = SpecialPowers.MockFilePicker;
- MockFilePicker.init(window);
- MockFilePicker.returnValue = MockFilePicker.returnOK;
- MockFilePicker.displayDirectory = FileUtils.getDir("TmpD", [], false);
- MockFilePicker.returnFiles = [tempFile];
-
- try {
- // Open the File Picker dialog (MockFilePicker) to select
- // the files for the test.
- yield BrowserTestUtils.synthesizeMouseAtCenter("#test_input", {}, tab.linkedBrowser);
- info("Waiting for the input to have the requisite files");
- yield ContentTask.spawn(tab.linkedBrowser, {}, function*() {
- let input = content.document.querySelector("#test_input");
- yield ContentTaskUtils.waitForCondition(() => input.files.length,
- "The input should have at least one file selected");
- info(`The input has ${input.files.length} file(s) selected.`);
- });
- } finally {
- MockFilePicker.cleanup();
- }
- } else {
- info("No real file selection required.");
- }
-
- let awaitTooltipOpen = new Promise(resolve => {
- let tooltipId = Services.appinfo.browserTabsRemoteAutostart ?
- "remoteBrowserTooltip" :
- "aHTMLTooltip";
- let tooltip = document.getElementById(tooltipId);
- tooltip.addEventListener("popupshown", function onpopupshown(event) {
- tooltip.removeEventListener("popupshown", onpopupshown);
- resolve(event.target);
- });
- });
- info("Initial mouse move");
- yield new Promise(resolve => {
- EventUtils.synthesizeNativeMouseMove(tab.linkedBrowser, 50, 5, resolve);
- });
- info("Waiting");
- yield new Promise(resolve => setTimeout(resolve, 400));
- info("Second mouse move");
- yield new Promise(resolve => {
- EventUtils.synthesizeNativeMouseMove(tab.linkedBrowser, 70, 5, resolve);
- });
- info("Waiting for tooltip to open");
- let tooltip = yield awaitTooltipOpen;
-
- is(tooltip.getAttribute("label"), test.result, "tooltip label should match expectation");
-
- info("Closing tab");
- yield BrowserTestUtils.removeTab(tab);
-}
-
-function createTempFile() {
- let file = FileUtils.getDir("TmpD", [], false);
- file.append("testfile_bug1251809");
- file.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0o644);
- return file;
-}
diff --git a/toolkit/components/tooltiptext/tests/title_test.svg b/toolkit/components/tooltiptext/tests/title_test.svg
deleted file mode 100644
index 7638fd5ccb..0000000000
--- a/toolkit/components/tooltiptext/tests/title_test.svg
+++ /dev/null
@@ -1,59 +0,0 @@
-<svg width="640px" height="480px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
- <title>This is a root SVG element's title</title>
- <foreignObject>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <body>
- <svg xmlns="http://www.w3.org/2000/svg" id="svg1">
- <title>This is a non-root SVG element title</title>
- </svg>
- </body>
- </html>
- </foreignObject>
- <text id="text1" x="10px" y="32px" font-size="24px">
- This contains only &lt;title&gt;
- <title>
-
-
- This is a title
-
- </title>
- </text>
- <text id="text2" x="10px" y="96px" font-size="24px">
- This contains only &lt;desc&gt;
- <desc>This is a desc</desc>
- </text>
- <text id="text3" x="10px" y="128px" font-size="24px" title="ignored for SVG">
- This contains nothing.
- </text>
- <a id="link1" xlink:href="#">
- This link contains &lt;title&gt;
- <title>
- This is a title
- </title>
- <text id="text4" x="10px" y="192px" font-size="24px">
- </text>
- </a>
- <a id="link2" xlink:href="#">
- <text x="10px" y="192px" font-size="24px">
- This text contains &lt;title&gt;
- <title>
- This is a title
- </title>
- </text>
- </a>
- <a id="link3" xlink:href="#" xlink:title="This is an xlink:title attribute">
- <text x="10px" y="224px" font-size="24px">
- This link contains &lt;title&gt; &amp; xlink:title attr.
- <title>This is a title</title>
- </text>
- </a>
- <a id="link4" xlink:href="#" xlink:title="This is an xlink:title attribute">
- <text x="10px" y="256px" font-size="24px">
- This link contains xlink:title attr.
- </text>
- </a>
- <text id="text5" x="10px" y="160px" font-size="24px"
- xlink:title="This is an xlink:title attribute but it isn't on a link" >
- This contains nothing.
- </text>
-</svg>
diff --git a/toolkit/components/tooltiptext/tests/xul_tooltiptext.xhtml b/toolkit/components/tooltiptext/tests/xul_tooltiptext.xhtml
deleted file mode 100644
index 4a80864ddc..0000000000
--- a/toolkit/components/tooltiptext/tests/xul_tooltiptext.xhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0"?>
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <xul:toolbox xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <toolbar>
- <toolbarbutton id="xulToolbarButton"
- tooltiptext="XUL tooltiptext"
- title="XUL title"/>
- </toolbar>
- </xul:toolbox>
-</html>
-
-
diff --git a/toolkit/components/url-classifier/moz.build b/toolkit/components/url-classifier/moz.build
index d8856ee4a9..b6e630abda 100644
--- a/toolkit/components/url-classifier/moz.build
+++ b/toolkit/components/url-classifier/moz.build
@@ -4,8 +4,6 @@
# 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/.
-TEST_DIRS += ['tests']
-
XPIDL_SOURCES += [
'nsIUrlClassifierDBService.idl',
'nsIUrlClassifierHashCompleter.idl',
diff --git a/toolkit/components/url-classifier/nsUrlClassifierUtils.cpp b/toolkit/components/url-classifier/nsUrlClassifierUtils.cpp
index e4cf68c982..c4ee5f26d1 100644
--- a/toolkit/components/url-classifier/nsUrlClassifierUtils.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierUtils.cpp
@@ -83,9 +83,7 @@ namespace safebrowsing {
static PlatformType
GetPlatformType()
{
-#if defined(ANDROID)
- return ANDROID_PLATFORM;
-#elif defined(XP_MACOSX)
+#if defined(XP_MACOSX)
return OSX_PLATFORM;
#elif defined(XP_LINUX)
return LINUX_PLATFORM;
diff --git a/toolkit/components/url-classifier/tests/UrlClassifierTestUtils.jsm b/toolkit/components/url-classifier/tests/UrlClassifierTestUtils.jsm
deleted file mode 100644
index 615769473c..0000000000
--- a/toolkit/components/url-classifier/tests/UrlClassifierTestUtils.jsm
+++ /dev/null
@@ -1,98 +0,0 @@
-"use strict";
-
-this.EXPORTED_SYMBOLS = ["UrlClassifierTestUtils"];
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-const TRACKING_TABLE_NAME = "mochitest-track-simple";
-const TRACKING_TABLE_PREF = "urlclassifier.trackingTable";
-const WHITELIST_TABLE_NAME = "mochitest-trackwhite-simple";
-const WHITELIST_TABLE_PREF = "urlclassifier.trackingWhitelistTable";
-
-Cu.import("resource://gre/modules/Services.jsm");
-
-this.UrlClassifierTestUtils = {
-
- addTestTrackers() {
- // Add some URLs to the tracking databases
- let trackingURL1 = "tracking.example.com/";
- let trackingURL2 = "itisatracker.org/";
- let trackingURL3 = "trackertest.org/";
- let whitelistedURL = "itisatrap.org/?resource=itisatracker.org";
-
- let trackingUpdate =
- "n:1000\ni:" + TRACKING_TABLE_NAME + "\nad:3\n" +
- "a:1:32:" + trackingURL1.length + "\n" +
- trackingURL1 + "\n" +
- "a:2:32:" + trackingURL2.length + "\n" +
- trackingURL2 + "\n" +
- "a:3:32:" + trackingURL3.length + "\n" +
- trackingURL3 + "\n";
- let whitelistUpdate =
- "n:1000\ni:" + WHITELIST_TABLE_NAME + "\nad:1\n" +
- "a:1:32:" + whitelistedURL.length + "\n" +
- whitelistedURL + "\n";
-
- var tables = [
- {
- pref: TRACKING_TABLE_PREF,
- name: TRACKING_TABLE_NAME,
- update: trackingUpdate
- },
- {
- pref: WHITELIST_TABLE_PREF,
- name: WHITELIST_TABLE_NAME,
- update: whitelistUpdate
- }
- ];
-
- return this.useTestDatabase(tables);
- },
-
- cleanupTestTrackers() {
- Services.prefs.clearUserPref(TRACKING_TABLE_PREF);
- Services.prefs.clearUserPref(WHITELIST_TABLE_PREF);
- },
-
- /**
- * Add some entries to a test tracking protection database, and resets
- * back to the default database after the test ends.
- *
- * @return {Promise}
- */
- useTestDatabase(tables) {
- for (var table of tables) {
- Services.prefs.setCharPref(table.pref, table.name);
- }
-
- return new Promise((resolve, reject) => {
- let dbService = Cc["@mozilla.org/url-classifier/dbservice;1"].
- getService(Ci.nsIUrlClassifierDBService);
- let listener = {
- QueryInterface: iid => {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIUrlClassifierUpdateObserver))
- return listener;
-
- throw Cr.NS_ERROR_NO_INTERFACE;
- },
- updateUrlRequested: url => { },
- streamFinished: status => { },
- updateError: errorCode => {
- reject("Couldn't update classifier.");
- },
- updateSuccess: requestedTimeout => {
- resolve();
- }
- };
-
- for (var table of tables) {
- dbService.beginUpdate(listener, table.name, "");
- dbService.beginStream("", "");
- dbService.updateStream(table.update);
- dbService.finishStream();
- dbService.finishUpdate();
- }
- });
- },
-};
diff --git a/toolkit/components/url-classifier/tests/gtest/Common.cpp b/toolkit/components/url-classifier/tests/gtest/Common.cpp
deleted file mode 100644
index b5f024b38e..0000000000
--- a/toolkit/components/url-classifier/tests/gtest/Common.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-#include "Common.h"
-#include "HashStore.h"
-#include "Classifier.h"
-#include "nsAppDirectoryServiceDefs.h"
-#include "nsTArray.h"
-#include "nsIThread.h"
-#include "nsThreadUtils.h"
-#include "nsUrlClassifierUtils.h"
-
-using namespace mozilla;
-using namespace mozilla::safebrowsing;
-
-template<typename Function>
-void RunTestInNewThread(Function&& aFunction) {
- nsCOMPtr<nsIRunnable> r = NS_NewRunnableFunction(mozilla::Forward<Function>(aFunction));
- nsCOMPtr<nsIThread> testingThread;
- nsresult rv = NS_NewThread(getter_AddRefs(testingThread), r);
- ASSERT_EQ(rv, NS_OK);
- testingThread->Shutdown();
-}
-
-already_AddRefed<nsIFile>
-GetFile(const nsTArray<nsString>& path)
-{
- nsCOMPtr<nsIFile> file;
- nsresult rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(file));
- if (NS_WARN_IF(NS_FAILED(rv))) {
- return nullptr;
- }
-
- for (uint32_t i = 0; i < path.Length(); i++) {
- file->Append(path[i]);
- }
- return file.forget();
-}
-
-void ApplyUpdate(nsTArray<TableUpdate*>& updates)
-{
- nsCOMPtr<nsIFile> file;
- NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(file));
-
- UniquePtr<Classifier> classifier(new Classifier());
- classifier->Open(*file);
-
- {
- // Force nsIUrlClassifierUtils loading on main thread
- // because nsIUrlClassifierDBService will not run in advance
- // in gtest.
- nsresult rv;
- nsCOMPtr<nsIUrlClassifierUtils> dummy =
- do_GetService(NS_URLCLASSIFIERUTILS_CONTRACTID, &rv);
- ASSERT_TRUE(NS_SUCCEEDED(rv));
- }
-
- RunTestInNewThread([&] () -> void {
- classifier->ApplyUpdates(&updates);
- });
-}
-
-void ApplyUpdate(TableUpdate* update)
-{
- nsTArray<TableUpdate*> updates = { update };
- ApplyUpdate(updates);
-}
-
-void
-PrefixArrayToPrefixStringMap(const nsTArray<nsCString>& prefixArray,
- PrefixStringMap& out)
-{
- out.Clear();
-
- for (uint32_t i = 0; i < prefixArray.Length(); i++) {
- const nsCString& prefix = prefixArray[i];
- nsCString* prefixString = out.LookupOrAdd(prefix.Length());
- prefixString->Append(prefix.BeginReading(), prefix.Length());
- }
-}
-
diff --git a/toolkit/components/url-classifier/tests/gtest/Common.h b/toolkit/components/url-classifier/tests/gtest/Common.h
deleted file mode 100644
index c9a9cdf7ed..0000000000
--- a/toolkit/components/url-classifier/tests/gtest/Common.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#include "HashStore.h"
-#include "nsIFile.h"
-#include "nsTArray.h"
-#include "gtest/gtest.h"
-
-using namespace mozilla;
-using namespace mozilla::safebrowsing;
-
-template<typename Function>
-void RunTestInNewThread(Function&& aFunction);
-
-// Return nsIFile with root directory - NS_APP_USER_PROFILE_50_DIR
-// Sub-directories are passed in path argument.
-already_AddRefed<nsIFile>
-GetFile(const nsTArray<nsString>& path);
-
-// ApplyUpdate will call |ApplyUpdates| of Classifier within a new thread
-void ApplyUpdate(nsTArray<TableUpdate*>& updates);
-
-void ApplyUpdate(TableUpdate* update);
-
-// This function converts lexigraphic-sorted prefixes to a hashtable
-// which key is prefix size and value is concatenated prefix string.
-void PrefixArrayToPrefixStringMap(const nsTArray<nsCString>& prefixArray,
- PrefixStringMap& out);
-
diff --git a/toolkit/components/url-classifier/tests/gtest/TestChunkSet.cpp b/toolkit/components/url-classifier/tests/gtest/TestChunkSet.cpp
deleted file mode 100644
index dba2fc2c10..0000000000
--- a/toolkit/components/url-classifier/tests/gtest/TestChunkSet.cpp
+++ /dev/null
@@ -1,279 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <set>
-
-#include "gtest/gtest.h"
-#include "ChunkSet.h"
-#include "mozilla/ArrayUtils.h"
-
-TEST(UrlClassifierChunkSet, Empty)
-{
- mozilla::safebrowsing::ChunkSet chunkSet;
- mozilla::safebrowsing::ChunkSet removeSet;
-
- removeSet.Set(0);
-
- ASSERT_FALSE(chunkSet.Has(0));
- ASSERT_FALSE(chunkSet.Has(1));
- ASSERT_TRUE(chunkSet.Remove(removeSet) == NS_OK);
- ASSERT_TRUE(chunkSet.Length() == 0);
-
- chunkSet.Set(0);
-
- ASSERT_TRUE(chunkSet.Has(0));
- ASSERT_TRUE(chunkSet.Length() == 1);
- ASSERT_TRUE(chunkSet.Remove(removeSet) == NS_OK);
- ASSERT_FALSE(chunkSet.Has(0));
- ASSERT_TRUE(chunkSet.Length() == 0);
-}
-
-TEST(UrlClassifierChunkSet, Main)
-{
- static int testVals[] = {2, 1, 5, 6, 8, 7, 14, 10, 12, 13};
-
- mozilla::safebrowsing::ChunkSet chunkSet;
-
- for (size_t i = 0; i < MOZ_ARRAY_LENGTH(testVals); i++) {
- chunkSet.Set(testVals[i]);
- }
-
- for (size_t i = 0; i < MOZ_ARRAY_LENGTH(testVals); i++) {
- ASSERT_TRUE(chunkSet.Has(testVals[i]));
- }
-
- ASSERT_FALSE(chunkSet.Has(3));
- ASSERT_FALSE(chunkSet.Has(4));
- ASSERT_FALSE(chunkSet.Has(9));
- ASSERT_FALSE(chunkSet.Has(11));
-
- ASSERT_TRUE(chunkSet.Length() == MOZ_ARRAY_LENGTH(testVals));
-}
-
-TEST(UrlClassifierChunkSet, Merge)
-{
- static int testVals[] = {2, 1, 5, 6, 8, 7, 14, 10, 12, 13};
- static int mergeVals[] = {9, 3, 4, 20, 14, 16};
-
- mozilla::safebrowsing::ChunkSet chunkSet;
- mozilla::safebrowsing::ChunkSet mergeSet;
-
- for (size_t i = 0; i < MOZ_ARRAY_LENGTH(testVals); i++) {
- chunkSet.Set(testVals[i]);
- }
-
- for (size_t i = 0; i < MOZ_ARRAY_LENGTH(mergeVals); i++) {
- mergeSet.Set(mergeVals[i]);
- }
-
- chunkSet.Merge(mergeSet);
-
- for (size_t i = 0; i < MOZ_ARRAY_LENGTH(testVals); i++) {
- ASSERT_TRUE(chunkSet.Has(testVals[i]));
- }
- for (size_t i = 0; i < MOZ_ARRAY_LENGTH(mergeVals); i++) {
- ASSERT_TRUE(chunkSet.Has(mergeVals[i]));
- }
-
- // -1 because 14 is duplicated in both sets
- ASSERT_TRUE(chunkSet.Length() ==
- MOZ_ARRAY_LENGTH(testVals) + MOZ_ARRAY_LENGTH(mergeVals) - 1);
-
- ASSERT_FALSE(chunkSet.Has(11));
- ASSERT_FALSE(chunkSet.Has(15));
- ASSERT_FALSE(chunkSet.Has(17));
- ASSERT_FALSE(chunkSet.Has(18));
- ASSERT_FALSE(chunkSet.Has(19));
-}
-
-TEST(UrlClassifierChunkSet, Merge2)
-{
- static int testVals[] = {2, 1, 5, 6, 8, 7, 14, 10, 12, 13};
- static int mergeVals[] = {9, 3, 4, 20, 14, 16};
- static int mergeVals2[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
-
- mozilla::safebrowsing::ChunkSet chunkSet;
- mozilla::safebrowsing::ChunkSet mergeSet;
- mozilla::safebrowsing::ChunkSet mergeSet2;
-
- for (size_t i = 0; i < MOZ_ARRAY_LENGTH(testVals); i++) {
- chunkSet.Set(testVals[i]);
- }
-
- for (size_t i = 0; i < MOZ_ARRAY_LENGTH(mergeVals); i++) {
- mergeSet.Set(mergeVals[i]);
- }
- for (size_t i = 0; i < MOZ_ARRAY_LENGTH(mergeVals2); i++) {
- mergeSet2.Set(mergeVals2[i]);
- }
-
- chunkSet.Merge(mergeSet);
- chunkSet.Merge(mergeSet2);
-
- for (size_t i = 0; i < MOZ_ARRAY_LENGTH(testVals); i++) {
- ASSERT_TRUE(chunkSet.Has(testVals[i]));
- }
- for (size_t i = 0; i < MOZ_ARRAY_LENGTH(mergeVals); i++) {
- ASSERT_TRUE(chunkSet.Has(mergeVals[i]));
- }
- for (size_t i = 0; i < MOZ_ARRAY_LENGTH(mergeVals2); i++) {
- ASSERT_TRUE(chunkSet.Has(mergeVals2[i]));
- }
-
- ASSERT_FALSE(chunkSet.Has(15));
- ASSERT_FALSE(chunkSet.Has(17));
- ASSERT_FALSE(chunkSet.Has(18));
- ASSERT_FALSE(chunkSet.Has(19));
-}
-
-TEST(UrlClassifierChunkSet, Stress)
-{
- mozilla::safebrowsing::ChunkSet chunkSet;
- mozilla::safebrowsing::ChunkSet mergeSet;
- std::set<int> refSet;
- std::set<int> refMergeSet;
- static const int TEST_ITERS = 7000;
- static const int REMOVE_ITERS = 3000;
- static const int TEST_RANGE = 10000;
-
- // Construction by Set
- for (int i = 0; i < TEST_ITERS; i++) {
- int chunk = rand() % TEST_RANGE;
- chunkSet.Set(chunk);
- refSet.insert(chunk);
- }
-
- // Same elements as reference set
- for (auto it = refSet.begin(); it != refSet.end(); ++it) {
- ASSERT_TRUE(chunkSet.Has(*it));
- }
-
- // Hole punching via Remove
- for (int i = 0; i < REMOVE_ITERS; i++) {
- int chunk = rand() % TEST_RANGE;
- mozilla::safebrowsing::ChunkSet helpChunk;
- helpChunk.Set(chunk);
-
- chunkSet.Remove(helpChunk);
- refSet.erase(chunk);
-
- ASSERT_FALSE(chunkSet.Has(chunk));
- }
-
- // Should have chunks present in reference set
- // Should not have chunks absent in reference set
- for (int it = 0; it < TEST_RANGE; ++it) {
- auto found = refSet.find(it);
- if (chunkSet.Has(it)) {
- ASSERT_FALSE(found == refSet.end());
- } else {
- ASSERT_TRUE(found == refSet.end());
- }
- }
-
- // Construct set to merge with
- for (int i = 0; i < TEST_ITERS; i++) {
- int chunk = rand() % TEST_RANGE;
- mergeSet.Set(chunk);
- refMergeSet.insert(chunk);
- }
-
- // Merge set constructed correctly
- for (auto it = refMergeSet.begin(); it != refMergeSet.end(); ++it) {
- ASSERT_TRUE(mergeSet.Has(*it));
- }
-
- mozilla::safebrowsing::ChunkSet origSet;
- origSet = chunkSet;
-
- chunkSet.Merge(mergeSet);
- refSet.insert(refMergeSet.begin(), refMergeSet.end());
-
- // Check for presence of elements from both source
- // Should not have chunks absent in reference set
- for (int it = 0; it < TEST_RANGE; ++it) {
- auto found = refSet.find(it);
- if (chunkSet.Has(it)) {
- ASSERT_FALSE(found == refSet.end());
- } else {
- ASSERT_TRUE(found == refSet.end());
- }
- }
-
- // Unmerge
- chunkSet.Remove(origSet);
- for (int it = 0; it < TEST_RANGE; ++it) {
- if (origSet.Has(it)) {
- ASSERT_FALSE(chunkSet.Has(it));
- } else if (mergeSet.Has(it)) {
- ASSERT_TRUE(chunkSet.Has(it));
- }
- }
-}
-
-TEST(UrlClassifierChunkSet, RemoveClear)
-{
- static int testVals[] = {2, 1, 5, 6, 8, 7, 14, 10, 12, 13};
- static int mergeVals[] = {3, 4, 9, 16, 20};
-
- mozilla::safebrowsing::ChunkSet chunkSet;
- mozilla::safebrowsing::ChunkSet mergeSet;
- mozilla::safebrowsing::ChunkSet removeSet;
-
- for (size_t i = 0; i < MOZ_ARRAY_LENGTH(testVals); i++) {
- chunkSet.Set(testVals[i]);
- removeSet.Set(testVals[i]);
- }
-
- for (size_t i = 0; i < MOZ_ARRAY_LENGTH(mergeVals); i++) {
- mergeSet.Set(mergeVals[i]);
- }
-
- ASSERT_TRUE(chunkSet.Merge(mergeSet) == NS_OK);
- ASSERT_TRUE(chunkSet.Remove(removeSet) == NS_OK);
-
- for (size_t i = 0; i < MOZ_ARRAY_LENGTH(mergeVals); i++) {
- ASSERT_TRUE(chunkSet.Has(mergeVals[i]));
- }
- for (size_t i = 0; i < MOZ_ARRAY_LENGTH(testVals); i++) {
- ASSERT_FALSE(chunkSet.Has(testVals[i]));
- }
-
- chunkSet.Clear();
-
- for (size_t i = 0; i < MOZ_ARRAY_LENGTH(mergeVals); i++) {
- ASSERT_FALSE(chunkSet.Has(mergeVals[i]));
- }
-}
-
-TEST(UrlClassifierChunkSet, Serialize)
-{
- static int testVals[] = {2, 1, 5, 6, 8, 7, 14, 10, 12, 13};
- static int mergeVals[] = {3, 4, 9, 16, 20};
-
- mozilla::safebrowsing::ChunkSet chunkSet;
- mozilla::safebrowsing::ChunkSet mergeSet;
-
- for (size_t i = 0; i < MOZ_ARRAY_LENGTH(testVals); i++) {
- chunkSet.Set(testVals[i]);
- }
-
- for (size_t i = 0; i < MOZ_ARRAY_LENGTH(mergeVals); i++) {
- mergeSet.Set(mergeVals[i]);
- }
-
- chunkSet.Merge(mergeSet);
-
- nsAutoCString mergeResult;
- chunkSet.Serialize(mergeResult);
-
- printf("mergeResult: %s\n", mergeResult.get());
-
- nsAutoCString expected(NS_LITERAL_CSTRING("1-10,12-14,16,20"));
-
- ASSERT_TRUE(mergeResult.Equals(expected));
-}
diff --git a/toolkit/components/url-classifier/tests/gtest/TestFailUpdate.cpp b/toolkit/components/url-classifier/tests/gtest/TestFailUpdate.cpp
deleted file mode 100644
index bdb9eebb06..0000000000
--- a/toolkit/components/url-classifier/tests/gtest/TestFailUpdate.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-#include "HashStore.h"
-#include "nsPrintfCString.h"
-#include "string.h"
-#include "gtest/gtest.h"
-#include "mozilla/Unused.h"
-
-using namespace mozilla;
-using namespace mozilla::safebrowsing;
-
-static const char* kFilesInV2[] = {".pset", ".sbstore"};
-static const char* kFilesInV4[] = {".pset", ".metadata"};
-
-#define V2_TABLE "gtest-malware-simple"
-#define V4_TABLE1 "goog-malware-proto"
-#define V4_TABLE2 "goog-phish-proto"
-
-#define ROOT_DIR NS_LITERAL_STRING("safebrowsing")
-#define SB_FILE(x, y) NS_ConvertUTF8toUTF16(nsPrintfCString("%s%s",x, y))
-
-template<typename T, size_t N>
-void CheckFileExist(const char* table, const T (&files)[N], bool expectExists)
-{
- for (uint32_t i = 0; i < N; i++) {
- // This is just a quick way to know if this is v4 table
- NS_ConvertUTF8toUTF16 SUB_DIR(strstr(table, "-proto") ? "google4" : "");
- nsCOMPtr<nsIFile> file =
- GetFile(nsTArray<nsString> { ROOT_DIR, SUB_DIR, SB_FILE(table, files[i]) });
-
- bool exists;
- file->Exists(&exists);
-
- nsAutoCString path;
- file->GetNativePath(path);
- ASSERT_EQ(expectExists, exists) << path.get();
- }
-}
-
-TEST(FailUpdate, CheckTableReset)
-{
- const bool FULL_UPDATE = true;
- const bool PARTIAL_UPDATE = false;
-
- // Apply V2 update
- {
- auto update = new TableUpdateV2(NS_LITERAL_CSTRING(V2_TABLE));
- Unused << update->NewAddChunk(1);
-
- ApplyUpdate(update);
-
- // A successful V2 update should create .pset & .sbstore files
- CheckFileExist(V2_TABLE, kFilesInV2, true);
- }
-
- // Helper function to generate table update data
- auto func = [](TableUpdateV4* update, bool full, const char* str) {
- update->SetFullUpdate(full);
- std::string prefix(str);
- update->NewPrefixes(prefix.length(), prefix);
- };
-
- // Apply V4 update for table1
- {
- auto update = new TableUpdateV4(NS_LITERAL_CSTRING(V4_TABLE1));
- func(update, FULL_UPDATE, "test_prefix");
-
- ApplyUpdate(update);
-
- // A successful V4 update should create .pset & .metadata files
- CheckFileExist(V4_TABLE1, kFilesInV4, true);
- }
-
- // Apply V4 update for table2
- {
- auto update = new TableUpdateV4(NS_LITERAL_CSTRING(V4_TABLE2));
- func(update, FULL_UPDATE, "test_prefix");
-
- ApplyUpdate(update);
-
- CheckFileExist(V4_TABLE2, kFilesInV4, true);
- }
-
- // Apply V4 update with the same prefix in previous full udpate
- // This should cause an update error.
- {
- auto update = new TableUpdateV4(NS_LITERAL_CSTRING(V4_TABLE1));
- func(update, PARTIAL_UPDATE, "test_prefix");
-
- ApplyUpdate(update);
-
- // A fail update should remove files for that table
- CheckFileExist(V4_TABLE1, kFilesInV4, false);
-
- // A fail update should NOT remove files for the other tables
- CheckFileExist(V2_TABLE, kFilesInV2, true);
- CheckFileExist(V4_TABLE2, kFilesInV4, true);
- }
-}
diff --git a/toolkit/components/url-classifier/tests/gtest/TestLookupCacheV4.cpp b/toolkit/components/url-classifier/tests/gtest/TestLookupCacheV4.cpp
deleted file mode 100644
index 00525f7047..0000000000
--- a/toolkit/components/url-classifier/tests/gtest/TestLookupCacheV4.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "LookupCacheV4.h"
-#include "Common.h"
-
-#define GTEST_SAFEBROWSING_DIR NS_LITERAL_CSTRING("safebrowsing")
-#define GTEST_TABLE NS_LITERAL_CSTRING("gtest-malware-proto")
-
-typedef nsCString _Fragment;
-typedef nsTArray<nsCString> _PrefixArray;
-
-// Generate a hash prefix from string
-static const nsCString
-GeneratePrefix(const _Fragment& aFragment, uint8_t aLength)
-{
- Completion complete;
- nsCOMPtr<nsICryptoHash> cryptoHash = do_CreateInstance(NS_CRYPTO_HASH_CONTRACTID);
- complete.FromPlaintext(aFragment, cryptoHash);
-
- nsCString hash;
- hash.Assign((const char *)complete.buf, aLength);
- return hash;
-}
-
-static UniquePtr<LookupCacheV4>
-SetupLookupCacheV4(const _PrefixArray& prefixArray)
-{
- nsCOMPtr<nsIFile> file;
- NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(file));
-
- file->AppendNative(GTEST_SAFEBROWSING_DIR);
-
- UniquePtr<LookupCacheV4> cache = MakeUnique<LookupCacheV4>(GTEST_TABLE, EmptyCString(), file);
- nsresult rv = cache->Init();
- EXPECT_EQ(rv, NS_OK);
-
- PrefixStringMap map;
- PrefixArrayToPrefixStringMap(prefixArray, map);
- rv = cache->Build(map);
- EXPECT_EQ(rv, NS_OK);
-
- return Move(cache);
-}
-
-void
-TestHasPrefix(const _Fragment& aFragment, bool aExpectedHas, bool aExpectedComplete)
-{
- _PrefixArray array = { GeneratePrefix(_Fragment("bravo.com/"), 32),
- GeneratePrefix(_Fragment("browsing.com/"), 8),
- GeneratePrefix(_Fragment("gound.com/"), 5),
- GeneratePrefix(_Fragment("small.com/"), 4)
- };
-
- RunTestInNewThread([&] () -> void {
- UniquePtr<LookupCache> cache = SetupLookupCacheV4(array);
-
- Completion lookupHash;
- nsCOMPtr<nsICryptoHash> cryptoHash = do_CreateInstance(NS_CRYPTO_HASH_CONTRACTID);
- lookupHash.FromPlaintext(aFragment, cryptoHash);
-
- bool has, complete;
- nsresult rv = cache->Has(lookupHash, &has, &complete);
-
- EXPECT_EQ(rv, NS_OK);
- EXPECT_EQ(has, aExpectedHas);
- EXPECT_EQ(complete, aExpectedComplete);
-
- cache->ClearAll();
- });
-
-}
-
-TEST(LookupCacheV4, HasComplete)
-{
- TestHasPrefix(_Fragment("bravo.com/"), true, true);
-}
-
-TEST(LookupCacheV4, HasPrefix)
-{
- TestHasPrefix(_Fragment("browsing.com/"), true, false);
-}
-
-TEST(LookupCacheV4, Nomatch)
-{
- TestHasPrefix(_Fragment("nomatch.com/"), false, false);
-}
diff --git a/toolkit/components/url-classifier/tests/gtest/TestPerProviderDirectory.cpp b/toolkit/components/url-classifier/tests/gtest/TestPerProviderDirectory.cpp
deleted file mode 100644
index 72ff08a1e2..0000000000
--- a/toolkit/components/url-classifier/tests/gtest/TestPerProviderDirectory.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-#include "LookupCache.h"
-#include "LookupCacheV4.h"
-#include "HashStore.h"
-#include "gtest/gtest.h"
-#include "nsAppDirectoryServiceDefs.h"
-
-namespace mozilla {
-namespace safebrowsing {
-
-class PerProviderDirectoryTestUtils {
-public:
- template<typename T>
- static nsIFile* InspectStoreDirectory(const T& aT)
- {
- return aT.mStoreDirectory;
- }
-};
-
-} // end of namespace safebrowsing
-} // end of namespace mozilla
-
-using namespace mozilla;
-using namespace mozilla::safebrowsing;
-
-template<typename T>
-void VerifyPrivateStorePath(const char* aTableName,
- const char* aProvider,
- nsIFile* aRootDir,
- bool aUsePerProviderStore)
-{
- nsString rootStorePath;
- nsresult rv = aRootDir->GetPath(rootStorePath);
- EXPECT_EQ(rv, NS_OK);
-
- T target(nsCString(aTableName), nsCString(aProvider), aRootDir);
-
- nsIFile* privateStoreDirectory =
- PerProviderDirectoryTestUtils::InspectStoreDirectory(target);
-
- nsString privateStorePath;
- rv = privateStoreDirectory->GetPath(privateStorePath);
- ASSERT_EQ(rv, NS_OK);
-
- nsString expectedPrivateStorePath = rootStorePath;
-
- if (aUsePerProviderStore) {
- // Use API to append "provider" to the root directoy path
- nsCOMPtr<nsIFile> expectedPrivateStoreDir;
- rv = aRootDir->Clone(getter_AddRefs(expectedPrivateStoreDir));
- ASSERT_EQ(rv, NS_OK);
-
- expectedPrivateStoreDir->AppendNative(nsCString(aProvider));
- rv = expectedPrivateStoreDir->GetPath(expectedPrivateStorePath);
- ASSERT_EQ(rv, NS_OK);
- }
-
- printf("table: %s\nprovider: %s\nroot path: %s\nprivate path: %s\n\n",
- aTableName,
- aProvider,
- NS_ConvertUTF16toUTF8(rootStorePath).get(),
- NS_ConvertUTF16toUTF8(privateStorePath).get());
-
- ASSERT_TRUE(privateStorePath == expectedPrivateStorePath);
-}
-
-TEST(PerProviderDirectory, LookupCache)
-{
- RunTestInNewThread([] () -> void {
- nsCOMPtr<nsIFile> rootDir;
- NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(rootDir));
-
- // For V2 tables (NOT ending with '-proto'), root directory should be
- // used as the private store.
- VerifyPrivateStorePath<LookupCacheV2>("goog-phish-shavar", "google", rootDir, false);
-
- // For V4 tables, if provider is found, use per-provider subdirectory;
- // If not found, use root directory.
- VerifyPrivateStorePath<LookupCacheV4>("goog-noprovider-proto", "", rootDir, false);
- VerifyPrivateStorePath<LookupCacheV4>("goog-phish-proto", "google4", rootDir, true);
- });
-}
-
-TEST(PerProviderDirectory, HashStore)
-{
- RunTestInNewThread([] () -> void {
- nsCOMPtr<nsIFile> rootDir;
- NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(rootDir));
-
- // For V2 tables (NOT ending with '-proto'), root directory should be
- // used as the private store.
- VerifyPrivateStorePath<HashStore>("goog-phish-shavar", "google", rootDir, false);
-
- // For V4 tables, if provider is found, use per-provider subdirectory;
- // If not found, use root directory.
- VerifyPrivateStorePath<HashStore>("goog-noprovider-proto", "", rootDir, false);
- VerifyPrivateStorePath<HashStore>("goog-phish-proto", "google4", rootDir, true);
- });
-}
diff --git a/toolkit/components/url-classifier/tests/gtest/TestProtocolParser.cpp b/toolkit/components/url-classifier/tests/gtest/TestProtocolParser.cpp
deleted file mode 100644
index ea6ffb5e68..0000000000
--- a/toolkit/components/url-classifier/tests/gtest/TestProtocolParser.cpp
+++ /dev/null
@@ -1,159 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-#include "gtest/gtest.h"
-#include "ProtocolParser.h"
-#include "mozilla/EndianUtils.h"
-
-using namespace mozilla;
-using namespace mozilla::safebrowsing;
-
-typedef FetchThreatListUpdatesResponse_ListUpdateResponse ListUpdateResponse;
-
-static bool
-InitUpdateResponse(ListUpdateResponse* aUpdateResponse,
- ThreatType aThreatType,
- const nsACString& aState,
- const nsACString& aChecksum,
- bool isFullUpdate,
- const nsTArray<uint32_t>& aFixedLengthPrefixes,
- bool aDoPrefixEncoding);
-
-static void
-DumpBinary(const nsACString& aBinary);
-
-TEST(ProtocolParser, UpdateWait)
-{
- // Top level response which contains a list of update response
- // for different lists.
- FetchThreatListUpdatesResponse response;
-
- auto r = response.mutable_list_update_responses()->Add();
- InitUpdateResponse(r, SOCIAL_ENGINEERING_PUBLIC,
- nsCString("sta\x00te", 6),
- nsCString("check\x0sum", 9),
- true,
- {0, 1, 2, 3},
- false /* aDoPrefixEncoding */ );
-
- // Set min wait duration.
- auto minWaitDuration = response.mutable_minimum_wait_duration();
- minWaitDuration->set_seconds(8);
- minWaitDuration->set_nanos(1 * 1000000000);
-
- std::string s;
- response.SerializeToString(&s);
-
- DumpBinary(nsCString(s.c_str(), s.length()));
-
- ProtocolParser* p = new ProtocolParserProtobuf();
- p->AppendStream(nsCString(s.c_str(), s.length()));
- p->End();
- ASSERT_EQ(p->UpdateWaitSec(), 9u);
- delete p;
-}
-
-TEST(ProtocolParser, SingleValueEncoding)
-{
- // Top level response which contains a list of update response
- // for different lists.
- FetchThreatListUpdatesResponse response;
-
- auto r = response.mutable_list_update_responses()->Add();
-
- const char* expectedPrefix = "\x00\x01\x02\x00";
- if (!InitUpdateResponse(r, SOCIAL_ENGINEERING_PUBLIC,
- nsCString("sta\x00te", 6),
- nsCString("check\x0sum", 9),
- true,
- // As per spec, we should interpret the prefix as uint32
- // in little endian before encoding.
- {LittleEndian::readUint32(expectedPrefix)},
- true /* aDoPrefixEncoding */ )) {
- printf("Failed to initialize update response.");
- ASSERT_TRUE(false);
- return;
- }
-
- // Set min wait duration.
- auto minWaitDuration = response.mutable_minimum_wait_duration();
- minWaitDuration->set_seconds(8);
- minWaitDuration->set_nanos(1 * 1000000000);
-
- std::string s;
- response.SerializeToString(&s);
-
- // Feed data to the protocol parser.
- ProtocolParser* p = new ProtocolParserProtobuf();
- p->SetRequestedTables({ nsCString("googpub-phish-proto") });
- p->AppendStream(nsCString(s.c_str(), s.length()));
- p->End();
-
- auto& tus = p->GetTableUpdates();
- auto tuv4 = TableUpdate::Cast<TableUpdateV4>(tus[0]);
- auto& prefixMap = tuv4->Prefixes();
- for (auto iter = prefixMap.Iter(); !iter.Done(); iter.Next()) {
- // This prefix map should contain only a single 4-byte prefixe.
- ASSERT_EQ(iter.Key(), 4u);
-
- // The fixed-length prefix string from ProtcolParser should
- // exactly match the expected prefix string.
- auto& prefix = iter.Data()->GetPrefixString();
- ASSERT_TRUE(prefix.Equals(nsCString(expectedPrefix, 4)));
- }
-
- delete p;
-}
-
-static bool
-InitUpdateResponse(ListUpdateResponse* aUpdateResponse,
- ThreatType aThreatType,
- const nsACString& aState,
- const nsACString& aChecksum,
- bool isFullUpdate,
- const nsTArray<uint32_t>& aFixedLengthPrefixes,
- bool aDoPrefixEncoding)
-{
- aUpdateResponse->set_threat_type(aThreatType);
- aUpdateResponse->set_new_client_state(aState.BeginReading(), aState.Length());
- aUpdateResponse->mutable_checksum()->set_sha256(aChecksum.BeginReading(), aChecksum.Length());
- aUpdateResponse->set_response_type(isFullUpdate ? ListUpdateResponse::FULL_UPDATE
- : ListUpdateResponse::PARTIAL_UPDATE);
-
- auto additions = aUpdateResponse->mutable_additions()->Add();
-
- if (!aDoPrefixEncoding) {
- additions->set_compression_type(RAW);
- auto rawHashes = additions->mutable_raw_hashes();
- rawHashes->set_prefix_size(4);
- auto prefixes = rawHashes->mutable_raw_hashes();
- for (auto p : aFixedLengthPrefixes) {
- char buffer[4];
- NativeEndian::copyAndSwapToBigEndian(buffer, &p, 1);
- prefixes->append(buffer, 4);
- }
- return true;
- }
-
- if (1 != aFixedLengthPrefixes.Length()) {
- printf("This function only supports single value encoding.\n");
- return false;
- }
-
- uint32_t firstValue = aFixedLengthPrefixes[0];
- additions->set_compression_type(RICE);
- auto riceHashes = additions->mutable_rice_hashes();
- riceHashes->set_first_value(firstValue);
- riceHashes->set_num_entries(0);
-
- return true;
-}
-
-static void DumpBinary(const nsACString& aBinary)
-{
- nsCString s;
- for (size_t i = 0; i < aBinary.Length(); i++) {
- s.AppendPrintf("\\x%.2X", (uint8_t)aBinary[i]);
- }
- printf("%s\n", s.get());
-} \ No newline at end of file
diff --git a/toolkit/components/url-classifier/tests/gtest/TestRiceDeltaDecoder.cpp b/toolkit/components/url-classifier/tests/gtest/TestRiceDeltaDecoder.cpp
deleted file mode 100644
index f03d27358a..0000000000
--- a/toolkit/components/url-classifier/tests/gtest/TestRiceDeltaDecoder.cpp
+++ /dev/null
@@ -1,165 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-#include "gtest/gtest.h"
-#include "RiceDeltaDecoder.h"
-#include "mozilla/ArrayUtils.h"
-
-using namespace mozilla;
-using namespace mozilla::safebrowsing;
-
-struct TestingData {
- std::vector<uint32_t> mExpectedDecoded;
- std::vector<uint8_t> mEncoded;
- uint32_t mRiceParameter;
-};
-
-static bool runOneTest(TestingData& aData);
-
-TEST(RiceDeltaDecoder, SingleEncodedValue) {
- TestingData td = { { 99 }, { 99 }, 0 };
-
- ASSERT_TRUE(runOneTest(td));
-}
-
-// In this batch of tests, the encoded data would be like
-// what we originally receive from the network. See comment
-// in |runOneTest| for more detail.
-TEST(RiceDeltaDecoder, Empty) {
-
- // The following structure and testing data is copied from Chromium source code:
- //
- // https://chromium.googlesource.com/chromium/src.git/+/950f9975599768b6a08c7146cb4befa161be87aa/components/safe_browsing_db/v4_rice_unittest.cc#75
- //
- // and will be translated to our own testing format.
-
- struct RiceDecodingTestInfo {
- uint32_t mRiceParameter;
- std::vector<uint32_t> mDeltas;
- std::string mEncoded;
-
- RiceDecodingTestInfo(uint32_t aRiceParameter,
- const std::vector<uint32_t>& aDeltas,
- const std::string& aEncoded)
- : mRiceParameter(aRiceParameter)
- , mDeltas(aDeltas)
- , mEncoded(aEncoded)
- {
- }
- };
-
- // Copyright 2016 The Chromium Authors. All rights reserved.
- // Use of this source code is governed by a BSD-style license that can be
- // found in the media/webrtc/trunk/webrtc/LICENSE.
-
- // ----- Start of Chromium test code ----
- const std::vector<RiceDecodingTestInfo> TESTING_DATA_CHROMIUM = {
- RiceDecodingTestInfo(2, {15, 9}, "\xf7\x2"),
- RiceDecodingTestInfo(
- 28, {1777762129, 2093280223, 924369848},
- "\xbf\xa8\x3f\xfb\xfc\xfb\x5e\x27\xe6\xc3\x1d\xc6\x38"),
- RiceDecodingTestInfo(
- 28, {62763050, 1046523781, 192522171, 1800511020, 4442775, 582142548},
- "\x54\x60\x7b\xe7\x0a\x5f\xc1\xdc\xee\x69\xde"
- "\xfe\x58\x3c\xa3\xd6\xa5\xf2\x10\x8c\x4a\x59"
- "\x56\x00"),
- RiceDecodingTestInfo(
- 28, {26067715, 344823336, 8420095, 399843890, 95029378, 731622412,
- 35811335, 1047558127, 1117722715, 78698892},
- "\x06\x86\x1b\x23\x14\xcb\x46\xf2\xaf\x07\x08\xc9\x88\x54\x1f\x41\x04"
- "\xd5\x1a\x03\xeb\xe6\x3a\x80\x13\x91\x7b\xbf\x83\xf3\xb7\x85\xf1\x29"
- "\x18\xb3\x61\x09"),
- RiceDecodingTestInfo(
- 27, {225846818, 328287420, 166748623, 29117720, 552397365, 350353215,
- 558267528, 4738273, 567093445, 28563065, 55077698, 73091685,
- 339246010, 98242620, 38060941, 63917830, 206319759, 137700744},
- "\x89\x98\xd8\x75\xbc\x44\x91\xeb\x39\x0c\x3e\x30\x9a\x78\xf3\x6a\xd4"
- "\xd9\xb1\x9f\xfb\x70\x3e\x44\x3e\xa3\x08\x67\x42\xc2\x2b\x46\x69\x8e"
- "\x3c\xeb\xd9\x10\x5a\x43\x9a\x32\xa5\x2d\x4e\x77\x0f\x87\x78\x20\xb6"
- "\xab\x71\x98\x48\x0c\x9e\x9e\xd7\x23\x0c\x13\x43\x2c\xa9\x01"),
- RiceDecodingTestInfo(
- 28, {339784008, 263128563, 63871877, 69723256, 826001074, 797300228,
- 671166008, 207712688},
- std::string("\x21\xc5\x02\x91\xf9\x82\xd7\x57\xb8\xe9\x3c\xf0\xc8\x4f"
- "\xe8\x64\x8d\x77\x62\x04\xd6\x85\x3f\x1c\x97\x00\x04\x1b"
- "\x17\xc6",
- 30)),
- RiceDecodingTestInfo(
- 28, {471820069, 196333855, 855579133, 122737976, 203433838, 85354544,
- 1307949392, 165938578, 195134475, 553930435, 49231136},
- "\x95\x9c\x7d\xb0\x8f\xe8\xd9\xbd\xfe\x8c\x7f\x81\x53\x0d\x75\xdc\x4e"
- "\x40\x18\x0c\x9a\x45\x3d\xa8\xdc\xfa\x26\x59\x40\x9e\x16\x08\x43\x77"
- "\xc3\x4e\x04\x01\xa4\xe6\x5d\x00"),
- RiceDecodingTestInfo(
- 27, {87336845, 129291033, 30906211, 433549264, 30899891, 53207875,
- 11959529, 354827862, 82919275, 489637251, 53561020, 336722992,
- 408117728, 204506246, 188216092, 9047110, 479817359, 230317256},
- "\x1a\x4f\x69\x2a\x63\x9a\xf6\xc6\x2e\xaf\x73\xd0\x6f\xd7\x31\xeb\x77"
- "\x1d\x43\xe3\x2b\x93\xce\x67\x8b\x59\xf9\x98\xd4\xda\x4f\x3c\x6f\xb0"
- "\xe8\xa5\x78\x8d\x62\x36\x18\xfe\x08\x1e\x78\xd8\x14\x32\x24\x84\x61"
- "\x1c\xf3\x37\x63\xc4\xa0\x88\x7b\x74\xcb\x64\xc8\x5c\xba\x05"),
- RiceDecodingTestInfo(
- 28, {297968956, 19709657, 259702329, 76998112, 1023176123, 29296013,
- 1602741145, 393745181, 177326295, 55225536, 75194472},
- "\xf1\x94\x0a\x87\x6c\x5f\x96\x90\xe3\xab\xf7\xc0\xcb\x2d\xe9\x76\xdb"
- "\xf8\x59\x63\xc1\x6f\x7c\x99\xe3\x87\x5f\xc7\x04\xde\xb9\x46\x8e\x54"
- "\xc0\xac\x4a\x03\x0d\x6c\x8f\x00"),
- RiceDecodingTestInfo(
- 28, {532220688, 780594691, 436816483, 163436269, 573044456, 1069604,
- 39629436, 211410997, 227714491, 381562898, 75610008, 196754597,
- 40310339, 15204118, 99010842},
- "\x41\x2c\xe4\xfe\x06\xdc\x0d\xbd\x31\xa5\x04\xd5\x6e\xdd\x9b\x43\xb7"
- "\x3f\x11\x24\x52\x10\x80\x4f\x96\x4b\xd4\x80\x67\xb2\xdd\x52\xc9\x4e"
- "\x02\xc6\xd7\x60\xde\x06\x92\x52\x1e\xdd\x35\x64\x71\x26\x2c\xfe\xcf"
- "\x81\x46\xb2\x79\x01"),
- RiceDecodingTestInfo(
- 28, {219354713, 389598618, 750263679, 554684211, 87381124, 4523497,
- 287633354, 801308671, 424169435, 372520475, 277287849},
- "\xb2\x2c\x26\x3a\xcd\x66\x9c\xdb\x5f\x07\x2e\x6f\xe6\xf9\x21\x10\x52"
- "\xd5\x94\xf4\x82\x22\x48\xf9\x9d\x24\xf6\xff\x2f\xfc\x6d\x3f\x21\x65"
- "\x1b\x36\x34\x56\xea\xc4\x21\x00"),
- };
-
- // ----- End of Chromium test code ----
-
- for (auto tdc : TESTING_DATA_CHROMIUM) {
- // Populate chromium testing data to our native testing data struct.
- TestingData d;
-
- d.mRiceParameter = tdc.mRiceParameter; // Populate rice parameter.
-
- // Populate encoded data from std::string to vector<uint8>.
- d.mEncoded.resize(tdc.mEncoded.size());
- memcpy(&d.mEncoded[0], tdc.mEncoded.c_str(), tdc.mEncoded.size());
-
- // Populate deltas to expected decoded data. The first value would be just
- // set to an arbitrary value, say 7, to avoid any assumption to the
- // first value in the implementation.
- d.mExpectedDecoded.resize(tdc.mDeltas.size() + 1);
- for (size_t i = 0; i < d.mExpectedDecoded.size(); i++) {
- if (0 == i) {
- d.mExpectedDecoded[i] = 7; // "7" is an arbitrary starting value
- } else {
- d.mExpectedDecoded[i] = d.mExpectedDecoded[i - 1] + tdc.mDeltas[i - 1];
- }
- }
-
- ASSERT_TRUE(runOneTest(d));
- }
-}
-
-static bool
-runOneTest(TestingData& aData)
-{
- RiceDeltaDecoder decoder(&aData.mEncoded[0], aData.mEncoded.size());
-
- std::vector<uint32_t> decoded(aData.mExpectedDecoded.size());
-
- uint32_t firstValue = aData.mExpectedDecoded[0];
- bool rv = decoder.Decode(aData.mRiceParameter,
- firstValue,
- decoded.size() - 1, // # of entries (first value not included).
- &decoded[0]);
-
- return rv && decoded == aData.mExpectedDecoded;
-}
diff --git a/toolkit/components/url-classifier/tests/gtest/TestSafeBrowsingProtobuf.cpp b/toolkit/components/url-classifier/tests/gtest/TestSafeBrowsingProtobuf.cpp
deleted file mode 100644
index fe6f28960a..0000000000
--- a/toolkit/components/url-classifier/tests/gtest/TestSafeBrowsingProtobuf.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-#include "safebrowsing.pb.h"
-#include "gtest/gtest.h"
-
-TEST(SafeBrowsingProtobuf, Empty)
-{
- using namespace mozilla::safebrowsing;
-
- const std::string CLIENT_ID = "firefox";
-
- // Construct a simple update request.
- FetchThreatListUpdatesRequest r;
- r.set_allocated_client(new ClientInfo());
- r.mutable_client()->set_client_id(CLIENT_ID);
-
- // Then serialize.
- std::string s;
- r.SerializeToString(&s);
-
- // De-serialize.
- FetchThreatListUpdatesRequest r2;
- r2.ParseFromString(s);
-
- ASSERT_EQ(r2.client().client_id(), CLIENT_ID);
-}
diff --git a/toolkit/components/url-classifier/tests/gtest/TestSafebrowsingHash.cpp b/toolkit/components/url-classifier/tests/gtest/TestSafebrowsingHash.cpp
deleted file mode 100644
index 89ed74be6d..0000000000
--- a/toolkit/components/url-classifier/tests/gtest/TestSafebrowsingHash.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "Entries.h"
-#include "mozilla/EndianUtils.h"
-
-TEST(SafebrowsingHash, ToFromUint32)
-{
- using namespace mozilla::safebrowsing;
-
- // typedef SafebrowsingHash<PREFIX_SIZE, PrefixComparator> Prefix;
- // typedef nsTArray<Prefix> PrefixArray;
-
- const char PREFIX_RAW[4] = { 0x1, 0x2, 0x3, 0x4 };
- uint32_t PREFIX_UINT32;
- memcpy(&PREFIX_UINT32, PREFIX_RAW, 4);
-
- Prefix p;
- p.Assign(nsCString(PREFIX_RAW, 4));
- ASSERT_EQ(p.ToUint32(), PREFIX_UINT32);
-
- p.FromUint32(PREFIX_UINT32);
- ASSERT_EQ(memcmp(PREFIX_RAW, p.buf, 4), 0);
-}
-
-TEST(SafebrowsingHash, Compare)
-{
- using namespace mozilla;
- using namespace mozilla::safebrowsing;
-
- Prefix p1, p2, p3;
-
- // The order of p1,p2,p3 is "p1 == p3 < p2"
-#if MOZ_LITTLE_ENDIAN
- p1.Assign(nsCString("\x01\x00\x00\x00", 4));
- p2.Assign(nsCString("\x00\x00\x00\x01", 4));
- p3.Assign(nsCString("\x01\x00\x00\x00", 4));
-#else
- p1.Assign(nsCString("\x00\x00\x00\x01", 4));
- p2.Assign(nsCString("\x01\x00\x00\x00", 4));
- p3.Assign(nsCString("\x00\x00\x00\x01", 4));
-#endif
-
- // Make sure "p1 == p3 < p2" is true
- // on both little and big endian machine.
-
- ASSERT_EQ(p1.Compare(p2), -1);
- ASSERT_EQ(p1.Compare(p1), 0);
- ASSERT_EQ(p2.Compare(p1), 1);
- ASSERT_EQ(p1.Compare(p3), 0);
-
- ASSERT_TRUE(p1 < p2);
- ASSERT_TRUE(p1 == p1);
- ASSERT_TRUE(p1 == p3);
-} \ No newline at end of file
diff --git a/toolkit/components/url-classifier/tests/gtest/TestTable.cpp b/toolkit/components/url-classifier/tests/gtest/TestTable.cpp
deleted file mode 100644
index 307587459b..0000000000
--- a/toolkit/components/url-classifier/tests/gtest/TestTable.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-#include "gtest/gtest.h"
-#include "nsUrlClassifierDBService.h"
-
-using namespace mozilla::safebrowsing;
-
-void
-TestResponseCode(const char* table, nsresult result)
-{
- nsCString tableName(table);
- ASSERT_EQ(TablesToResponse(tableName), result);
-}
-
-TEST(UrlClassifierTable, ResponseCode)
-{
- // malware URIs.
- TestResponseCode("goog-malware-shavar", NS_ERROR_MALWARE_URI);
- TestResponseCode("test-malware-simple", NS_ERROR_MALWARE_URI);
- TestResponseCode("goog-phish-shavar,test-malware-simple", NS_ERROR_MALWARE_URI);
- TestResponseCode("test-malware-simple,mozstd-track-digest256,mozplugin-block-digest256", NS_ERROR_MALWARE_URI);
-
- // phish URIs.
- TestResponseCode("goog-phish-shavar", NS_ERROR_PHISHING_URI);
- TestResponseCode("test-phish-simple", NS_ERROR_PHISHING_URI);
- TestResponseCode("test-phish-simple,mozplugin-block-digest256", NS_ERROR_PHISHING_URI);
- TestResponseCode("mozstd-track-digest256,test-phish-simple,goog-unwanted-shavar", NS_ERROR_PHISHING_URI);
-
- // unwanted URIs.
- TestResponseCode("goog-unwanted-shavar", NS_ERROR_UNWANTED_URI);
- TestResponseCode("test-unwanted-simple", NS_ERROR_UNWANTED_URI);
- TestResponseCode("mozplugin-unwanted-digest256,mozfull-track-digest256", NS_ERROR_UNWANTED_URI);
- TestResponseCode("test-block-simple,mozfull-track-digest256,test-unwanted-simple", NS_ERROR_UNWANTED_URI);
-
- // track URIs.
- TestResponseCode("test-track-simple", NS_ERROR_TRACKING_URI);
- TestResponseCode("mozstd-track-digest256", NS_ERROR_TRACKING_URI);
- TestResponseCode("test-block-simple,mozstd-track-digest256", NS_ERROR_TRACKING_URI);
-
- // block URIs
- TestResponseCode("test-block-simple", NS_ERROR_BLOCKED_URI);
- TestResponseCode("mozplugin-block-digest256", NS_ERROR_BLOCKED_URI);
- TestResponseCode("mozplugin2-block-digest256", NS_ERROR_BLOCKED_URI);
-
- TestResponseCode("test-trackwhite-simple", NS_OK);
- TestResponseCode("mozstd-trackwhite-digest256", NS_OK);
- TestResponseCode("goog-badbinurl-shavar", NS_OK);
- TestResponseCode("goog-downloadwhite-digest256", NS_OK);
-}
diff --git a/toolkit/components/url-classifier/tests/gtest/TestUrlClassifierTableUpdateV4.cpp b/toolkit/components/url-classifier/tests/gtest/TestUrlClassifierTableUpdateV4.cpp
deleted file mode 100644
index 470a88ba25..0000000000
--- a/toolkit/components/url-classifier/tests/gtest/TestUrlClassifierTableUpdateV4.cpp
+++ /dev/null
@@ -1,755 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-#include "Common.h"
-#include "Classifier.h"
-#include "HashStore.h"
-#include "nsAppDirectoryServiceDefs.h"
-#include "nsIFile.h"
-#include "nsIThread.h"
-#include "string.h"
-#include "gtest/gtest.h"
-#include "nsThreadUtils.h"
-
-using namespace mozilla;
-using namespace mozilla::safebrowsing;
-
-typedef nsCString _Prefix;
-typedef nsTArray<_Prefix> _PrefixArray;
-
-#define GTEST_SAFEBROWSING_DIR NS_LITERAL_CSTRING("safebrowsing")
-#define GTEST_TABLE NS_LITERAL_CSTRING("gtest-malware-proto")
-#define GTEST_PREFIXFILE NS_LITERAL_CSTRING("gtest-malware-proto.pset")
-
-// This function removes common elements of inArray and outArray from
-// outArray. This is used by partial update testcase to ensure partial update
-// data won't contain prefixes we already have.
-static void
-RemoveIntersection(const _PrefixArray& inArray, _PrefixArray& outArray)
-{
- for (uint32_t i = 0; i < inArray.Length(); i++) {
- int32_t idx = outArray.BinaryIndexOf(inArray[i]);
- if (idx >= 0) {
- outArray.RemoveElementAt(idx);
- }
- }
-}
-
-// This fucntion removes elements from outArray by index specified in
-// removal array.
-static void
-RemoveElements(const nsTArray<uint32_t>& removal, _PrefixArray& outArray)
-{
- for (int32_t i = removal.Length() - 1; i >= 0; i--) {
- outArray.RemoveElementAt(removal[i]);
- }
-}
-
-static void
-MergeAndSortArray(const _PrefixArray& array1,
- const _PrefixArray& array2,
- _PrefixArray& output)
-{
- output.Clear();
- output.AppendElements(array1);
- output.AppendElements(array2);
- output.Sort();
-}
-
-static void
-CalculateCheckSum(_PrefixArray& prefixArray, nsCString& checksum)
-{
- prefixArray.Sort();
-
- nsresult rv;
- nsCOMPtr<nsICryptoHash> cryptoHash =
- do_CreateInstance(NS_CRYPTO_HASH_CONTRACTID, &rv);
-
- cryptoHash->Init(nsICryptoHash::SHA256);
- for (uint32_t i = 0; i < prefixArray.Length(); i++) {
- const _Prefix& prefix = prefixArray[i];
- cryptoHash->Update(reinterpret_cast<uint8_t*>(
- const_cast<char*>(prefix.get())), prefix.Length());
- }
- cryptoHash->Finish(false, checksum);
-}
-
-// N: Number of prefixes, MIN/MAX: minimum/maximum prefix size
-// This function will append generated prefixes to outArray.
-static void
-CreateRandomSortedPrefixArray(uint32_t N,
- uint32_t MIN,
- uint32_t MAX,
- _PrefixArray& outArray)
-{
- outArray.SetCapacity(outArray.Length() + N);
-
- const uint32_t range = (MAX - MIN + 1);
-
- for (uint32_t i = 0; i < N; i++) {
- uint32_t prefixSize = (rand() % range) + MIN;
- _Prefix prefix;
- prefix.SetLength(prefixSize);
-
- while (true) {
- char* dst = prefix.BeginWriting();
- for (uint32_t j = 0; j < prefixSize; j++) {
- dst[j] = rand() % 256;
- }
-
- if (!outArray.Contains(prefix)) {
- outArray.AppendElement(prefix);
- break;
- }
- }
- }
-
- outArray.Sort();
-}
-
-// N: Number of removal indices, MAX: maximum index
-static void
-CreateRandomRemovalIndices(uint32_t N,
- uint32_t MAX,
- nsTArray<uint32_t>& outArray)
-{
- for (uint32_t i = 0; i < N; i++) {
- uint32_t idx = rand() % MAX;
- if (!outArray.Contains(idx)) {
- outArray.InsertElementSorted(idx);
- }
- }
-}
-
-// Function to generate TableUpdateV4.
-static void
-GenerateUpdateData(bool fullUpdate,
- PrefixStringMap& add,
- nsTArray<uint32_t>* removal,
- nsCString* checksum,
- nsTArray<TableUpdate*>& tableUpdates)
-{
- TableUpdateV4* tableUpdate = new TableUpdateV4(GTEST_TABLE);
- tableUpdate->SetFullUpdate(fullUpdate);
-
- for (auto iter = add.ConstIter(); !iter.Done(); iter.Next()) {
- nsCString* pstring = iter.Data();
- std::string str(pstring->BeginReading(), pstring->Length());
-
- tableUpdate->NewPrefixes(iter.Key(), str);
- }
-
- if (removal) {
- tableUpdate->NewRemovalIndices(removal->Elements(), removal->Length());
- }
-
- if (checksum) {
- std::string stdChecksum;
- stdChecksum.assign(const_cast<char*>(checksum->BeginReading()), checksum->Length());
-
- tableUpdate->NewChecksum(stdChecksum);
- }
-
- tableUpdates.AppendElement(tableUpdate);
-}
-
-static void
-VerifyPrefixSet(PrefixStringMap& expected)
-{
- // Verify the prefix set is written to disk.
- nsCOMPtr<nsIFile> file;
- NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(file));
-
- file->AppendNative(GTEST_SAFEBROWSING_DIR);
- file->AppendNative(GTEST_PREFIXFILE);
-
- RefPtr<VariableLengthPrefixSet> load = new VariableLengthPrefixSet;
- load->Init(GTEST_TABLE);
-
- PrefixStringMap prefixesInFile;
- load->LoadFromFile(file);
- load->GetPrefixes(prefixesInFile);
-
- for (auto iter = expected.ConstIter(); !iter.Done(); iter.Next()) {
- nsCString* expectedPrefix = iter.Data();
- nsCString* resultPrefix = prefixesInFile.Get(iter.Key());
-
- ASSERT_TRUE(*resultPrefix == *expectedPrefix);
- }
-}
-
-static void
-Clear()
-{
- nsCOMPtr<nsIFile> file;
- NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(file));
-
- UniquePtr<Classifier> classifier(new Classifier());
- classifier->Open(*file);
- classifier->Reset();
-}
-
-static void
-testUpdateFail(nsTArray<TableUpdate*>& tableUpdates)
-{
- nsCOMPtr<nsIFile> file;
- NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(file));
-
- UniquePtr<Classifier> classifier(new Classifier());
- classifier->Open(*file);
-
- RunTestInNewThread([&] () -> void {
- nsresult rv = classifier->ApplyUpdates(&tableUpdates);
- ASSERT_TRUE(NS_FAILED(rv));
- });
-}
-
-static void
-testUpdate(nsTArray<TableUpdate*>& tableUpdates,
- PrefixStringMap& expected)
-{
- nsCOMPtr<nsIFile> file;
- NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(file));
-
- UniquePtr<Classifier> classifier(new Classifier());
- classifier->Open(*file);
-
- RunTestInNewThread([&] () -> void {
- nsresult rv = classifier->ApplyUpdates(&tableUpdates);
- ASSERT_TRUE(rv == NS_OK);
-
- VerifyPrefixSet(expected);
- });
-}
-
-static void
-testFullUpdate(PrefixStringMap& add, nsCString* checksum)
-{
- nsTArray<TableUpdate*> tableUpdates;
-
- GenerateUpdateData(true, add, nullptr, checksum, tableUpdates);
-
- testUpdate(tableUpdates, add);
-}
-
-static void
-testPartialUpdate(PrefixStringMap& add,
- nsTArray<uint32_t>* removal,
- nsCString* checksum,
- PrefixStringMap& expected)
-{
- nsTArray<TableUpdate*> tableUpdates;
- GenerateUpdateData(false, add, removal, checksum, tableUpdates);
-
- testUpdate(tableUpdates, expected);
-}
-
-static void
-testOpenLookupCache()
-{
- nsCOMPtr<nsIFile> file;
- NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(file));
- file->AppendNative(GTEST_SAFEBROWSING_DIR);
-
- RunTestInNewThread([&] () -> void {
- LookupCacheV4 cache(nsCString(GTEST_TABLE), EmptyCString(), file);
- nsresult rv = cache.Init();
- ASSERT_EQ(rv, NS_OK);
-
- rv = cache.Open();
- ASSERT_EQ(rv, NS_OK);
- });
-}
-
-// Tests start from here.
-TEST(UrlClassifierTableUpdateV4, FixLenghtPSetFullUpdate)
-{
- srand(time(NULL));
-
- _PrefixArray array;
- PrefixStringMap map;
- nsCString checksum;
-
- CreateRandomSortedPrefixArray(5000, 4, 4, array);
- PrefixArrayToPrefixStringMap(array, map);
- CalculateCheckSum(array, checksum);
-
- testFullUpdate(map, &checksum);
-
- Clear();
-}
-
-TEST(UrlClassifierTableUpdateV4, VariableLenghtPSetFullUpdate)
-{
- _PrefixArray array;
- PrefixStringMap map;
- nsCString checksum;
-
- CreateRandomSortedPrefixArray(5000, 5, 32, array);
- PrefixArrayToPrefixStringMap(array, map);
- CalculateCheckSum(array, checksum);
-
- testFullUpdate(map, &checksum);
-
- Clear();
-}
-
-// This test contain both variable length prefix set and fixed-length prefix set
-TEST(UrlClassifierTableUpdateV4, MixedPSetFullUpdate)
-{
- _PrefixArray array;
- PrefixStringMap map;
- nsCString checksum;
-
- CreateRandomSortedPrefixArray(5000, 4, 4, array);
- CreateRandomSortedPrefixArray(1000, 5, 32, array);
- PrefixArrayToPrefixStringMap(array, map);
- CalculateCheckSum(array, checksum);
-
- testFullUpdate(map, &checksum);
-
- Clear();
-}
-
-TEST(UrlClassifierTableUpdateV4, PartialUpdateWithRemoval)
-{
- _PrefixArray fArray;
-
- // Apply a full update first.
- {
- PrefixStringMap fMap;
- nsCString checksum;
-
- CreateRandomSortedPrefixArray(10000, 4, 4, fArray);
- CreateRandomSortedPrefixArray(2000, 5, 32, fArray);
- PrefixArrayToPrefixStringMap(fArray, fMap);
- CalculateCheckSum(fArray, checksum);
-
- testFullUpdate(fMap, &checksum);
- }
-
- // Apply a partial update with removal.
- {
- _PrefixArray pArray, mergedArray;
- PrefixStringMap pMap, mergedMap;
- nsCString checksum;
-
- CreateRandomSortedPrefixArray(5000, 4, 4, pArray);
- CreateRandomSortedPrefixArray(1000, 5, 32, pArray);
- RemoveIntersection(fArray, pArray);
- PrefixArrayToPrefixStringMap(pArray, pMap);
-
- // Remove 1/5 of elements of original prefix set.
- nsTArray<uint32_t> removal;
- CreateRandomRemovalIndices(fArray.Length() / 5, fArray.Length(), removal);
- RemoveElements(removal, fArray);
-
- // Calculate the expected prefix map.
- MergeAndSortArray(fArray, pArray, mergedArray);
- PrefixArrayToPrefixStringMap(mergedArray, mergedMap);
- CalculateCheckSum(mergedArray, checksum);
-
- testPartialUpdate(pMap, &removal, &checksum, mergedMap);
- }
-
- Clear();
-}
-
-TEST(UrlClassifierTableUpdateV4, PartialUpdateWithoutRemoval)
-{
- _PrefixArray fArray;
-
- // Apply a full update first.
- {
- PrefixStringMap fMap;
- nsCString checksum;
-
- CreateRandomSortedPrefixArray(10000, 4, 4, fArray);
- CreateRandomSortedPrefixArray(2000, 5, 32, fArray);
- PrefixArrayToPrefixStringMap(fArray, fMap);
- CalculateCheckSum(fArray, checksum);
-
- testFullUpdate(fMap, &checksum);
- }
-
- // Apply a partial update without removal
- {
- _PrefixArray pArray, mergedArray;
- PrefixStringMap pMap, mergedMap;
- nsCString checksum;
-
- CreateRandomSortedPrefixArray(5000, 4, 4, pArray);
- CreateRandomSortedPrefixArray(1000, 5, 32, pArray);
- RemoveIntersection(fArray, pArray);
- PrefixArrayToPrefixStringMap(pArray, pMap);
-
- // Calculate the expected prefix map.
- MergeAndSortArray(fArray, pArray, mergedArray);
- PrefixArrayToPrefixStringMap(mergedArray, mergedMap);
- CalculateCheckSum(mergedArray, checksum);
-
- testPartialUpdate(pMap, nullptr, &checksum, mergedMap);
- }
-
- Clear();
-}
-
-// Expect failure because partial update contains prefix already
-// in old prefix set.
-TEST(UrlClassifierTableUpdateV4, PartialUpdatePrefixAlreadyExist)
-{
- _PrefixArray fArray;
-
- // Apply a full update fist.
- {
- PrefixStringMap fMap;
- nsCString checksum;
-
- CreateRandomSortedPrefixArray(1000, 4, 32, fArray);
- PrefixArrayToPrefixStringMap(fArray, fMap);
- CalculateCheckSum(fArray, checksum);
-
- testFullUpdate(fMap, &checksum);
- }
-
- // Apply a partial update which contains a prefix in previous full update.
- // This should cause an update error.
- {
- _PrefixArray pArray;
- PrefixStringMap pMap;
- nsTArray<TableUpdate*> tableUpdates;
-
- // Pick one prefix from full update prefix and add it to partial update.
- // This should result a failure when call ApplyUpdates.
- pArray.AppendElement(fArray[rand() % fArray.Length()]);
- CreateRandomSortedPrefixArray(200, 4, 32, pArray);
- PrefixArrayToPrefixStringMap(pArray, pMap);
-
- GenerateUpdateData(false, pMap, nullptr, nullptr, tableUpdates);
- testUpdateFail(tableUpdates);
- }
-
- Clear();
-}
-
-// Test apply partial update directly without applying an full update first.
-TEST(UrlClassifierTableUpdateV4, OnlyPartialUpdate)
-{
- _PrefixArray pArray;
- PrefixStringMap pMap;
- nsCString checksum;
-
- CreateRandomSortedPrefixArray(5000, 4, 4, pArray);
- CreateRandomSortedPrefixArray(1000, 5, 32, pArray);
- PrefixArrayToPrefixStringMap(pArray, pMap);
- CalculateCheckSum(pArray, checksum);
-
- testPartialUpdate(pMap, nullptr, &checksum, pMap);
-
- Clear();
-}
-
-// Test partial update without any ADD prefixes, only removalIndices.
-TEST(UrlClassifierTableUpdateV4, PartialUpdateOnlyRemoval)
-{
- _PrefixArray fArray;
-
- // Apply a full update first.
- {
- PrefixStringMap fMap;
- nsCString checksum;
-
- CreateRandomSortedPrefixArray(5000, 4, 4, fArray);
- CreateRandomSortedPrefixArray(1000, 5, 32, fArray);
- PrefixArrayToPrefixStringMap(fArray, fMap);
- CalculateCheckSum(fArray, checksum);
-
- testFullUpdate(fMap, &checksum);
- }
-
- // Apply a partial update without add prefix, only contain removal indices.
- {
- _PrefixArray pArray;
- PrefixStringMap pMap, mergedMap;
- nsCString checksum;
-
- // Remove 1/5 of elements of original prefix set.
- nsTArray<uint32_t> removal;
- CreateRandomRemovalIndices(fArray.Length() / 5, fArray.Length(), removal);
- RemoveElements(removal, fArray);
-
- PrefixArrayToPrefixStringMap(fArray, mergedMap);
- CalculateCheckSum(fArray, checksum);
-
- testPartialUpdate(pMap, &removal, &checksum, mergedMap);
- }
-
- Clear();
-}
-
-// Test one tableupdate array contains full update and multiple partial updates.
-TEST(UrlClassifierTableUpdateV4, MultipleTableUpdates)
-{
- _PrefixArray fArray, pArray, mergedArray;
- PrefixStringMap fMap, pMap, mergedMap;
- nsCString checksum;
-
- nsTArray<TableUpdate*> tableUpdates;
-
- // Generate first full udpate
- CreateRandomSortedPrefixArray(10000, 4, 4, fArray);
- CreateRandomSortedPrefixArray(2000, 5, 32, fArray);
- PrefixArrayToPrefixStringMap(fArray, fMap);
- CalculateCheckSum(fArray, checksum);
-
- GenerateUpdateData(true, fMap, nullptr, &checksum, tableUpdates);
-
- // Generate second partial update
- CreateRandomSortedPrefixArray(3000, 4, 4, pArray);
- CreateRandomSortedPrefixArray(1000, 5, 32, pArray);
- RemoveIntersection(fArray, pArray);
- PrefixArrayToPrefixStringMap(pArray, pMap);
-
- MergeAndSortArray(fArray, pArray, mergedArray);
- CalculateCheckSum(mergedArray, checksum);
-
- GenerateUpdateData(false, pMap, nullptr, &checksum, tableUpdates);
-
- // Generate thrid partial update
- fArray.AppendElements(pArray);
- fArray.Sort();
- pArray.Clear();
- CreateRandomSortedPrefixArray(3000, 4, 4, pArray);
- CreateRandomSortedPrefixArray(1000, 5, 32, pArray);
- RemoveIntersection(fArray, pArray);
- PrefixArrayToPrefixStringMap(pArray, pMap);
-
- // Remove 1/5 of elements of original prefix set.
- nsTArray<uint32_t> removal;
- CreateRandomRemovalIndices(fArray.Length() / 5, fArray.Length(), removal);
- RemoveElements(removal, fArray);
-
- MergeAndSortArray(fArray, pArray, mergedArray);
- PrefixArrayToPrefixStringMap(mergedArray, mergedMap);
- CalculateCheckSum(mergedArray, checksum);
-
- GenerateUpdateData(false, pMap, &removal, &checksum, tableUpdates);
-
- testUpdate(tableUpdates, mergedMap);
-
- Clear();
-}
-
-// Test apply full update first, and then apply multiple partial updates
-// in one tableupdate array.
-TEST(UrlClassifierTableUpdateV4, MultiplePartialUpdateTableUpdates)
-{
- _PrefixArray fArray;
-
- // Apply a full update first
- {
- PrefixStringMap fMap;
- nsCString checksum;
-
- // Generate first full udpate
- CreateRandomSortedPrefixArray(10000, 4, 4, fArray);
- CreateRandomSortedPrefixArray(3000, 5, 32, fArray);
- PrefixArrayToPrefixStringMap(fArray, fMap);
- CalculateCheckSum(fArray, checksum);
-
- testFullUpdate(fMap, &checksum);
- }
-
- // Apply multiple partial updates in one table update
- {
- _PrefixArray pArray, mergedArray;
- PrefixStringMap pMap, mergedMap;
- nsCString checksum;
- nsTArray<uint32_t> removal;
- nsTArray<TableUpdate*> tableUpdates;
-
- // Generate first partial update
- CreateRandomSortedPrefixArray(3000, 4, 4, pArray);
- CreateRandomSortedPrefixArray(1000, 5, 32, pArray);
- RemoveIntersection(fArray, pArray);
- PrefixArrayToPrefixStringMap(pArray, pMap);
-
- // Remove 1/5 of elements of original prefix set.
- CreateRandomRemovalIndices(fArray.Length() / 5, fArray.Length(), removal);
- RemoveElements(removal, fArray);
-
- MergeAndSortArray(fArray, pArray, mergedArray);
- CalculateCheckSum(mergedArray, checksum);
-
- GenerateUpdateData(false, pMap, &removal, &checksum, tableUpdates);
-
- fArray.AppendElements(pArray);
- fArray.Sort();
- pArray.Clear();
- removal.Clear();
-
- // Generate second partial update.
- CreateRandomSortedPrefixArray(2000, 4, 4, pArray);
- CreateRandomSortedPrefixArray(1000, 5, 32, pArray);
- RemoveIntersection(fArray, pArray);
- PrefixArrayToPrefixStringMap(pArray, pMap);
-
- // Remove 1/5 of elements of original prefix set.
- CreateRandomRemovalIndices(fArray.Length() / 5, fArray.Length(), removal);
- RemoveElements(removal, fArray);
-
- MergeAndSortArray(fArray, pArray, mergedArray);
- PrefixArrayToPrefixStringMap(mergedArray, mergedMap);
- CalculateCheckSum(mergedArray, checksum);
-
- GenerateUpdateData(false, pMap, &removal, &checksum, tableUpdates);
-
- testUpdate(tableUpdates, mergedMap);
- }
-
- Clear();
-}
-
-// Test removal indices are larger than the original prefix set.
-TEST(UrlClassifierTableUpdateV4, RemovalIndexTooLarge)
-{
- _PrefixArray fArray;
-
- // Apply a full update first
- {
- PrefixStringMap fMap;
- nsCString checksum;
-
- CreateRandomSortedPrefixArray(1000, 4, 32, fArray);
- PrefixArrayToPrefixStringMap(fArray, fMap);
- CalculateCheckSum(fArray, checksum);
-
- testFullUpdate(fMap, &checksum);
- }
-
- // Apply a partial update with removal indice array larger than
- // old prefix set(fArray). This should cause an error.
- {
- _PrefixArray pArray;
- PrefixStringMap pMap;
- nsTArray<uint32_t> removal;
- nsTArray<TableUpdate*> tableUpdates;
-
- CreateRandomSortedPrefixArray(200, 4, 32, pArray);
- RemoveIntersection(fArray, pArray);
- PrefixArrayToPrefixStringMap(pArray, pMap);
-
- for (uint32_t i = 0; i < fArray.Length() + 1 ;i++) {
- removal.AppendElement(i);
- }
-
- GenerateUpdateData(false, pMap, &removal, nullptr, tableUpdates);
- testUpdateFail(tableUpdates);
- }
-
- Clear();
-}
-
-TEST(UrlClassifierTableUpdateV4, ChecksumMismatch)
-{
- // Apply a full update first
- {
- _PrefixArray fArray;
- PrefixStringMap fMap;
- nsCString checksum;
-
- CreateRandomSortedPrefixArray(1000, 4, 32, fArray);
- PrefixArrayToPrefixStringMap(fArray, fMap);
- CalculateCheckSum(fArray, checksum);
-
- testFullUpdate(fMap, &checksum);
- }
-
- // Apply a partial update with incorrect checksum
- {
- _PrefixArray pArray;
- PrefixStringMap pMap;
- nsCString checksum;
- nsTArray<TableUpdate*> tableUpdates;
-
- CreateRandomSortedPrefixArray(200, 4, 32, pArray);
- PrefixArrayToPrefixStringMap(pArray, pMap);
-
- // Checksum should be calculated with both old prefix set and add prefix set,
- // here we only calculate checksum with add prefix set to check if applyUpdate
- // will return failure.
- CalculateCheckSum(pArray, checksum);
-
- GenerateUpdateData(false, pMap, nullptr, &checksum, tableUpdates);
- testUpdateFail(tableUpdates);
- }
-
- Clear();
-}
-
-TEST(UrlClassifierTableUpdateV4, ApplyUpdateThenLoad)
-{
- // Apply update with checksum
- {
- _PrefixArray fArray;
- PrefixStringMap fMap;
- nsCString checksum;
-
- CreateRandomSortedPrefixArray(1000, 4, 32, fArray);
- PrefixArrayToPrefixStringMap(fArray, fMap);
- CalculateCheckSum(fArray, checksum);
-
- testFullUpdate(fMap, &checksum);
-
- // Open lookup cache will load prefix set and verify the checksum
- testOpenLookupCache();
- }
-
- Clear();
-
- // Apply update without checksum
- {
- _PrefixArray fArray;
- PrefixStringMap fMap;
-
- CreateRandomSortedPrefixArray(1000, 4, 32, fArray);
- PrefixArrayToPrefixStringMap(fArray, fMap);
-
- testFullUpdate(fMap, nullptr);
-
- testOpenLookupCache();
- }
-
- Clear();
-}
-
-// This test is used to avoid an eror from nsICryptoHash
-TEST(UrlClassifierTableUpdateV4, ApplyUpdateWithFixedChecksum)
-{
- _PrefixArray fArray = { _Prefix("enus"), _Prefix("apollo"), _Prefix("mars"),
- _Prefix("Hecatonchires cyclopes"),
- _Prefix("vesta"), _Prefix("neptunus"), _Prefix("jupiter"),
- _Prefix("diana"), _Prefix("minerva"), _Prefix("ceres"),
- _Prefix("Aidos,Adephagia,Adikia,Aletheia"),
- _Prefix("hecatonchires"), _Prefix("alcyoneus"), _Prefix("hades"),
- _Prefix("vulcanus"), _Prefix("juno"), _Prefix("mercury"),
- _Prefix("Stheno, Euryale and Medusa")
- };
- fArray.Sort();
-
- PrefixStringMap fMap;
- PrefixArrayToPrefixStringMap(fArray, fMap);
-
- nsCString checksum("\xae\x18\x94\xd7\xd0\x83\x5f\xc1"
- "\x58\x59\x5c\x2c\x72\xb9\x6e\x5e"
- "\xf4\xe8\x0a\x6b\xff\x5e\x6b\x81"
- "\x65\x34\x06\x16\x06\x59\xa0\x67");
-
- testFullUpdate(fMap, &checksum);
-
- // Open lookup cache will load prefix set and verify the checksum
- testOpenLookupCache();
-
- Clear();
-}
-
diff --git a/toolkit/components/url-classifier/tests/gtest/TestUrlClassifierUtils.cpp b/toolkit/components/url-classifier/tests/gtest/TestUrlClassifierUtils.cpp
deleted file mode 100644
index fa5ce4f56f..0000000000
--- a/toolkit/components/url-classifier/tests/gtest/TestUrlClassifierUtils.cpp
+++ /dev/null
@@ -1,276 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include <stdio.h>
-#include <ctype.h>
-
-#include <mozilla/RefPtr.h>
-#include "nsString.h"
-#include "nsEscape.h"
-#include "nsUrlClassifierUtils.h"
-#include "stdlib.h"
-#include "gtest/gtest.h"
-
-static char int_to_hex_digit(int32_t i) {
- NS_ASSERTION((i >= 0) && (i <= 15), "int too big in int_to_hex_digit");
- return static_cast<char>(((i < 10) ? (i + '0') : ((i - 10) + 'A')));
-}
-
-static void CheckEquals(nsCString& expected, nsCString& actual)
-{
- ASSERT_TRUE((expected).Equals((actual)));
-}
-
-void TestUnescapeHelper(const char* in, const char* expected)
-{
- nsCString out, strIn(in), strExp(expected);
-
- NS_UnescapeURL(strIn.get(), strIn.Length(), esc_AlwaysCopy, out);
- CheckEquals(strExp, out);
-}
-
-// Make sure Unescape from nsEncode.h's unescape does what the server does.
-TEST(UrlClassifierUtils, Unescape)
-{
- // test empty string
- TestUnescapeHelper("\0", "\0");
-
- // Test docoding of all characters.
- nsCString allCharsEncoded, allCharsEncodedLowercase, allCharsAsString;
- for (int32_t i = 1; i < 256; ++i) {
- allCharsEncoded.Append('%');
- allCharsEncoded.Append(int_to_hex_digit(i / 16));
- allCharsEncoded.Append((int_to_hex_digit(i % 16)));
-
- allCharsEncodedLowercase.Append('%');
- allCharsEncodedLowercase.Append(tolower(int_to_hex_digit(i / 16)));
- allCharsEncodedLowercase.Append(tolower(int_to_hex_digit(i % 16)));
-
- allCharsAsString.Append(static_cast<char>(i));
- }
-
- nsCString out;
- NS_UnescapeURL(allCharsEncoded.get(),
- allCharsEncoded.Length(),
- esc_AlwaysCopy,
- out);
-
- CheckEquals(allCharsAsString, out);
-
- out.Truncate();
- NS_UnescapeURL(allCharsEncodedLowercase.get(),
- allCharsEncodedLowercase.Length(),
- esc_AlwaysCopy,
- out);
- CheckEquals(allCharsAsString, out);
-
- // Test %-related edge cases
- TestUnescapeHelper("%", "%");
- TestUnescapeHelper("%xx", "%xx");
- TestUnescapeHelper("%%", "%%");
- TestUnescapeHelper("%%%", "%%%");
- TestUnescapeHelper("%%%%", "%%%%");
- TestUnescapeHelper("%1", "%1");
- TestUnescapeHelper("%1z", "%1z");
- TestUnescapeHelper("a%1z", "a%1z");
- TestUnescapeHelper("abc%d%e%fg%hij%klmno%", "abc%d%e%fg%hij%klmno%");
-
- // A few more tests
- TestUnescapeHelper("%25", "%");
- TestUnescapeHelper("%25%32%35", "%25");
-}
-
-void TestEncodeHelper(const char* in, const char* expected)
-{
- nsCString out, strIn(in), strExp(expected);
- RefPtr<nsUrlClassifierUtils> utils = new nsUrlClassifierUtils;
- utils->Init();
-
- utils->SpecialEncode(strIn, true, out);
- CheckEquals(strExp, out);
-}
-
-TEST(UrlClassifierUtils, Enc)
-{
- // Test empty string
- TestEncodeHelper("", "");
-
- // Test that all characters we shouldn't encode ([33-36],[38,126]) are not.
- nsCString noenc;
- for (int32_t i = 33; i < 127; i++) {
- if (i != 37) { // skip %
- noenc.Append(static_cast<char>(i));
- }
- }
- RefPtr<nsUrlClassifierUtils> utils = new nsUrlClassifierUtils;
- utils->Init();
- nsCString out;
- utils->SpecialEncode(noenc, false, out);
- CheckEquals(noenc, out);
-
- // Test that all the chars that we should encode [0,32],37,[127,255] are
- nsCString yesAsString, yesExpectedString;
- for (int32_t i = 1; i < 256; i++) {
- if (i < 33 || i == 37 || i > 126) {
- yesAsString.Append(static_cast<char>(i));
- yesExpectedString.Append('%');
- yesExpectedString.Append(int_to_hex_digit(i / 16));
- yesExpectedString.Append(int_to_hex_digit(i % 16));
- }
- }
-
- out.Truncate();
- utils->SpecialEncode(yesAsString, false, out);
- CheckEquals(yesExpectedString, out);
-
- TestEncodeHelper("blah//blah", "blah/blah");
-}
-
-void TestCanonicalizeHelper(const char* in, const char* expected)
-{
- nsCString out, strIn(in), strExp(expected);
- RefPtr<nsUrlClassifierUtils> utils = new nsUrlClassifierUtils;
- utils->Init();
-
- utils->CanonicalizePath(strIn, out);
- CheckEquals(strExp, out);
-}
-
-TEST(UrlClassifierUtils, Canonicalize)
-{
- // Test repeated %-decoding. Note: %25 --> %, %32 --> 2, %35 --> 5
- TestCanonicalizeHelper("%25", "%25");
- TestCanonicalizeHelper("%25%32%35", "%25");
- TestCanonicalizeHelper("asdf%25%32%35asd", "asdf%25asd");
- TestCanonicalizeHelper("%%%25%32%35asd%%", "%25%25%25asd%25%25");
- TestCanonicalizeHelper("%25%32%35%25%32%35%25%32%35", "%25%25%25");
- TestCanonicalizeHelper("%25", "%25");
- TestCanonicalizeHelper("%257Ea%2521b%2540c%2523d%2524e%25f%255E00%252611%252A22%252833%252944_55%252B",
- "~a!b@c#d$e%25f^00&11*22(33)44_55+");
-
- TestCanonicalizeHelper("", "");
- TestCanonicalizeHelper("%31%36%38%2e%31%38%38%2e%39%39%2e%32%36/%2E%73%65%63%75%72%65/%77%77%77%2E%65%62%61%79%2E%63%6F%6D/",
- "168.188.99.26/.secure/www.ebay.com/");
- TestCanonicalizeHelper("195.127.0.11/uploads/%20%20%20%20/.verify/.eBaysecure=updateuserdataxplimnbqmn-xplmvalidateinfoswqpcmlx=hgplmcx/",
- "195.127.0.11/uploads/%20%20%20%20/.verify/.eBaysecure=updateuserdataxplimnbqmn-xplmvalidateinfoswqpcmlx=hgplmcx/");
- // Added in bug 489455. %00 should no longer be changed to %01.
- TestCanonicalizeHelper("%00", "%00");
-}
-
-void TestParseIPAddressHelper(const char *in, const char *expected)
-{
- nsCString out, strIn(in), strExp(expected);
- RefPtr<nsUrlClassifierUtils> utils = new nsUrlClassifierUtils;
- utils->Init();
-
- utils->ParseIPAddress(strIn, out);
- CheckEquals(strExp, out);
-}
-
-TEST(UrlClassifierUtils, ParseIPAddress)
-{
- TestParseIPAddressHelper("123.123.0.0.1", "");
- TestParseIPAddressHelper("255.0.0.1", "255.0.0.1");
- TestParseIPAddressHelper("12.0x12.01234", "12.18.2.156");
- TestParseIPAddressHelper("276.2.3", "20.2.0.3");
- TestParseIPAddressHelper("012.034.01.055", "10.28.1.45");
- TestParseIPAddressHelper("0x12.0x43.0x44.0x01", "18.67.68.1");
- TestParseIPAddressHelper("167838211", "10.1.2.3");
- TestParseIPAddressHelper("3279880203", "195.127.0.11");
- TestParseIPAddressHelper("0x12434401", "18.67.68.1");
- TestParseIPAddressHelper("413960661", "24.172.137.213");
- TestParseIPAddressHelper("03053104725", "24.172.137.213");
- TestParseIPAddressHelper("030.0254.0x89d5", "24.172.137.213");
- TestParseIPAddressHelper("1.234.4.0377", "1.234.4.255");
- TestParseIPAddressHelper("1.2.3.00x0", "");
- TestParseIPAddressHelper("10.192.95.89 xy", "10.192.95.89");
- TestParseIPAddressHelper("10.192.95.89 xyz", "");
- TestParseIPAddressHelper("1.2.3.0x0", "1.2.3.0");
- TestParseIPAddressHelper("1.2.3.4", "1.2.3.4");
-}
-
-void TestCanonicalNumHelper(const char *in, uint32_t bytes,
- bool allowOctal, const char *expected)
-{
- nsCString out, strIn(in), strExp(expected);
- RefPtr<nsUrlClassifierUtils> utils = new nsUrlClassifierUtils;
- utils->Init();
-
- utils->CanonicalNum(strIn, bytes, allowOctal, out);
- CheckEquals(strExp, out);
-}
-
-TEST(UrlClassifierUtils, CanonicalNum)
-{
- TestCanonicalNumHelper("", 1, true, "");
- TestCanonicalNumHelper("10", 0, true, "");
- TestCanonicalNumHelper("45", 1, true, "45");
- TestCanonicalNumHelper("0x10", 1, true, "16");
- TestCanonicalNumHelper("367", 2, true, "1.111");
- TestCanonicalNumHelper("012345", 3, true, "0.20.229");
- TestCanonicalNumHelper("0173", 1, true, "123");
- TestCanonicalNumHelper("09", 1, false, "9");
- TestCanonicalNumHelper("0x120x34", 2, true, "");
- TestCanonicalNumHelper("0x12fc", 2, true, "18.252");
- TestCanonicalNumHelper("3279880203", 4, true, "195.127.0.11");
- TestCanonicalNumHelper("0x0000059", 1, true, "89");
- TestCanonicalNumHelper("0x00000059", 1, true, "89");
- TestCanonicalNumHelper("0x0000067", 1, true, "103");
-}
-
-void TestHostnameHelper(const char *in, const char *expected)
-{
- nsCString out, strIn(in), strExp(expected);
- RefPtr<nsUrlClassifierUtils> utils = new nsUrlClassifierUtils;
- utils->Init();
-
- utils->CanonicalizeHostname(strIn, out);
- CheckEquals(strExp, out);
-}
-
-TEST(UrlClassifierUtils, Hostname)
-{
- TestHostnameHelper("abcd123;[]", "abcd123;[]");
- TestHostnameHelper("abc.123", "abc.123");
- TestHostnameHelper("abc..123", "abc.123");
- TestHostnameHelper("trailing.", "trailing");
- TestHostnameHelper("i love trailing dots....", "i%20love%20trailing%20dots");
- TestHostnameHelper(".leading", "leading");
- TestHostnameHelper("..leading", "leading");
- TestHostnameHelper(".dots.", "dots");
- TestHostnameHelper(".both.", "both");
- TestHostnameHelper(".both..", "both");
- TestHostnameHelper("..both.", "both");
- TestHostnameHelper("..both..", "both");
- TestHostnameHelper("..a.b.c.d..", "a.b.c.d");
- TestHostnameHelper("..127.0.0.1..", "127.0.0.1");
- TestHostnameHelper("asdf!@#$a", "asdf!@#$a");
- TestHostnameHelper("AB CD 12354", "ab%20cd%2012354");
- TestHostnameHelper("\1\2\3\4\112\177", "%01%02%03%04j%7F");
- TestHostnameHelper("<>.AS/-+", "<>.as/-+");
- // Added in bug 489455. %00 should no longer be changed to %01.
- TestHostnameHelper("%00", "%00");
-}
-
-TEST(UrlClassifierUtils, LongHostname)
-{
- static const int kTestSize = 1024 * 150;
- char *str = static_cast<char*>(malloc(kTestSize + 1));
- memset(str, 'x', kTestSize);
- str[kTestSize] = '\0';
-
- RefPtr<nsUrlClassifierUtils> utils = new nsUrlClassifierUtils;
- utils->Init();
-
- nsAutoCString out;
- nsDependentCString in(str);
- PRIntervalTime clockStart = PR_IntervalNow();
- utils->CanonicalizeHostname(in, out);
- PRIntervalTime clockEnd = PR_IntervalNow();
-
- CheckEquals(in, out);
-
- printf("CanonicalizeHostname on long string (%dms)\n",
- PR_IntervalToMilliseconds(clockEnd - clockStart));
-}
diff --git a/toolkit/components/url-classifier/tests/gtest/TestVariableLengthPrefixSet.cpp b/toolkit/components/url-classifier/tests/gtest/TestVariableLengthPrefixSet.cpp
deleted file mode 100644
index 9e380a9d36..0000000000
--- a/toolkit/components/url-classifier/tests/gtest/TestVariableLengthPrefixSet.cpp
+++ /dev/null
@@ -1,559 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include <mozilla/RefPtr.h>
-#include "nsString.h"
-#include "nsTArray.h"
-#include "nsClassHashtable.h"
-#include "VariableLengthPrefixSet.h"
-#include "nsAppDirectoryServiceDefs.h"
-#include "nsIFile.h"
-#include "gtest/gtest.h"
-
-using namespace mozilla::safebrowsing;
-
-typedef nsCString _Prefix;
-typedef nsTArray<_Prefix> _PrefixArray;
-
-// Create fullhash by appending random characters.
-static nsCString* CreateFullHash(const nsACString& in)
-{
- nsCString* out = new nsCString(in);
- out->SetLength(32);
- for (size_t i = in.Length(); i < 32; i++) {
- out->SetCharAt(char(rand() % 256), i);
- }
-
- return out;
-}
-
-// This function generate N prefixes with size between MIN and MAX.
-// The output array will not be cleared, random result will append to it
-static void RandomPrefixes(uint32_t N, uint32_t MIN, uint32_t MAX, _PrefixArray& array)
-{
- array.SetCapacity(array.Length() + N);
-
- uint32_t range = (MAX - MIN + 1);
-
- for (uint32_t i = 0; i < N; i++) {
- uint32_t prefixSize = (rand() % range) + MIN;
- _Prefix prefix;
- prefix.SetLength(prefixSize);
-
- bool added = false;
- while(!added) {
- char* dst = prefix.BeginWriting();
- for (uint32_t j = 0; j < prefixSize; j++) {
- dst[j] = rand() % 256;
- }
-
- if (!array.Contains(prefix)) {
- array.AppendElement(prefix);
- added = true;
- }
- }
- }
-}
-
-static void CheckContent(VariableLengthPrefixSet* pset,
- PrefixStringMap& expected)
-{
- PrefixStringMap vlPSetMap;
- pset->GetPrefixes(vlPSetMap);
-
- for (auto iter = vlPSetMap.Iter(); !iter.Done(); iter.Next()) {
- nsCString* expectedPrefix = expected.Get(iter.Key());
- nsCString* resultPrefix = iter.Data();
-
- ASSERT_TRUE(resultPrefix->Equals(*expectedPrefix));
- }
-}
-
-// This test loops through all the prefixes and converts each prefix to
-// fullhash by appending random characters, each converted fullhash
-// should at least match its original length in the prefixSet.
-static void DoExpectedLookup(VariableLengthPrefixSet* pset,
- _PrefixArray& array)
-{
- uint32_t matchLength = 0;
- for (uint32_t i = 0; i < array.Length(); i++) {
- const nsCString& prefix = array[i];
- UniquePtr<nsCString> fullhash(CreateFullHash(prefix));
-
- // Find match for prefix-generated full hash
- pset->Matches(*fullhash, &matchLength);
- MOZ_ASSERT(matchLength != 0);
-
- if (matchLength != prefix.Length()) {
- // Return match size is not the same as prefix size.
- // In this case it could be because the generated fullhash match other
- // prefixes, check if this prefix exist.
- bool found = false;
-
- for (uint32_t j = 0; j < array.Length(); j++) {
- if (array[j].Length() != matchLength) {
- continue;
- }
-
- if (0 == memcmp(fullhash->BeginReading(),
- array[j].BeginReading(),
- matchLength)) {
- found = true;
- break;
- }
- }
- ASSERT_TRUE(found);
- }
- }
-}
-
-static void DoRandomLookup(VariableLengthPrefixSet* pset,
- uint32_t N,
- _PrefixArray& array)
-{
- for (uint32_t i = 0; i < N; i++) {
- // Random 32-bytes test fullhash
- char buf[32];
- for (uint32_t j = 0; j < 32; j++) {
- buf[j] = (char)(rand() % 256);
- }
-
- // Get the expected result.
- nsTArray<uint32_t> expected;
- for (uint32_t j = 0; j < array.Length(); j++) {
- const nsACString& str = array[j];
- if (0 == memcmp(buf, str.BeginReading(), str.Length())) {
- expected.AppendElement(str.Length());
- }
- }
-
- uint32_t matchLength = 0;
- pset->Matches(nsDependentCSubstring(buf, 32), &matchLength);
-
- ASSERT_TRUE(expected.IsEmpty() ? !matchLength : expected.Contains(matchLength));
- }
-}
-
-static void SetupPrefixMap(const _PrefixArray& array,
- PrefixStringMap& map)
-{
- map.Clear();
-
- // Buckets are keyed by prefix length and contain an array of
- // all prefixes of that length.
- nsClassHashtable<nsUint32HashKey, _PrefixArray> table;
-
- for (uint32_t i = 0; i < array.Length(); i++) {
- _PrefixArray* prefixes = table.Get(array[i].Length());
- if (!prefixes) {
- prefixes = new _PrefixArray();
- table.Put(array[i].Length(), prefixes);
- }
-
- prefixes->AppendElement(array[i]);
- }
-
- // The resulting map entries will be a concatenation of all
- // prefix data for the prefixes of a given size.
- for (auto iter = table.Iter(); !iter.Done(); iter.Next()) {
- uint32_t size = iter.Key();
- uint32_t count = iter.Data()->Length();
-
- _Prefix* str = new _Prefix();
- str->SetLength(size * count);
-
- char* dst = str->BeginWriting();
-
- iter.Data()->Sort();
- for (uint32_t i = 0; i < count; i++) {
- memcpy(dst, iter.Data()->ElementAt(i).get(), size);
- dst += size;
- }
-
- map.Put(size, str);
- }
-}
-
-
-// Test setting prefix set with only 4-bytes prefixes
-TEST(VariableLengthPrefixSet, FixedLengthSet)
-{
- srand(time(nullptr));
-
- RefPtr<VariableLengthPrefixSet> pset = new VariableLengthPrefixSet;
- pset->Init(NS_LITERAL_CSTRING("test"));
-
- PrefixStringMap map;
- _PrefixArray array = { _Prefix("alph"), _Prefix("brav"), _Prefix("char"),
- _Prefix("delt"), _Prefix("echo"), _Prefix("foxt"),
- };
-
- SetupPrefixMap(array, map);
- pset->SetPrefixes(map);
-
- DoExpectedLookup(pset, array);
-
- DoRandomLookup(pset, 1000, array);
-
- CheckContent(pset, map);
-
- // Run random test
- array.Clear();
- map.Clear();
-
- RandomPrefixes(1500, 4, 4, array);
-
- SetupPrefixMap(array, map);
- pset->SetPrefixes(map);
-
- DoExpectedLookup(pset, array);
-
- DoRandomLookup(pset, 1000, array);
-
- CheckContent(pset, map);
-}
-
-// Test setting prefix set with only 5~32 bytes prefixes
-TEST(VariableLengthPrefixSet, VariableLengthSet)
-{
- RefPtr<VariableLengthPrefixSet> pset = new VariableLengthPrefixSet;
- pset->Init(NS_LITERAL_CSTRING("test"));
-
- PrefixStringMap map;
- _PrefixArray array = { _Prefix("bravo"), _Prefix("charlie"), _Prefix("delta"),
- _Prefix("EchoEchoEchoEchoEcho"), _Prefix("foxtrot"),
- _Prefix("GolfGolfGolfGolfGolfGolfGolfGolf"),
- _Prefix("hotel"), _Prefix("november"),
- _Prefix("oscar"), _Prefix("quebec"), _Prefix("romeo"),
- _Prefix("sierrasierrasierrasierrasierra"),
- _Prefix("Tango"), _Prefix("whiskey"), _Prefix("yankee"),
- _Prefix("ZuluZuluZuluZulu")
- };
-
- SetupPrefixMap(array, map);
- pset->SetPrefixes(map);
-
- DoExpectedLookup(pset, array);
-
- DoRandomLookup(pset, 1000, array);
-
- CheckContent(pset, map);
-
- // Run random test
- array.Clear();
- map.Clear();
-
- RandomPrefixes(1500, 5, 32, array);
-
- SetupPrefixMap(array, map);
- pset->SetPrefixes(map);
-
- DoExpectedLookup(pset, array);
-
- DoRandomLookup(pset, 1000, array);
-
- CheckContent(pset, map);
-
-}
-
-// Test setting prefix set with both 4-bytes prefixes and 5~32 bytes prefixes
-TEST(VariableLengthPrefixSet, MixedPrefixSet)
-{
- RefPtr<VariableLengthPrefixSet> pset = new VariableLengthPrefixSet;
- pset->Init(NS_LITERAL_CSTRING("test"));
-
- PrefixStringMap map;
- _PrefixArray array = { _Prefix("enus"), _Prefix("apollo"), _Prefix("mars"),
- _Prefix("Hecatonchires cyclopes"),
- _Prefix("vesta"), _Prefix("neptunus"), _Prefix("jupiter"),
- _Prefix("diana"), _Prefix("minerva"), _Prefix("ceres"),
- _Prefix("Aidos,Adephagia,Adikia,Aletheia"),
- _Prefix("hecatonchires"), _Prefix("alcyoneus"), _Prefix("hades"),
- _Prefix("vulcanus"), _Prefix("juno"), _Prefix("mercury"),
- _Prefix("Stheno, Euryale and Medusa")
- };
-
- SetupPrefixMap(array, map);
- pset->SetPrefixes(map);
-
- DoExpectedLookup(pset, array);
-
- DoRandomLookup(pset, 1000, array);
-
- CheckContent(pset, map);
-
- // Run random test
- array.Clear();
- map.Clear();
-
- RandomPrefixes(1500, 4, 32, array);
-
- SetupPrefixMap(array, map);
- pset->SetPrefixes(map);
-
- DoExpectedLookup(pset, array);
-
- DoRandomLookup(pset, 1000, array);
-
- CheckContent(pset, map);
-}
-
-// Test resetting prefix set
-TEST(VariableLengthPrefixSet, ResetPrefix)
-{
- RefPtr<VariableLengthPrefixSet> pset = new VariableLengthPrefixSet;
- pset->Init(NS_LITERAL_CSTRING("test"));
-
- // First prefix set
- _PrefixArray array1 = { _Prefix("Iceland"), _Prefix("Peru"), _Prefix("Mexico"),
- _Prefix("Australia"), _Prefix("Japan"), _Prefix("Egypt"),
- _Prefix("America"), _Prefix("Finland"), _Prefix("Germany"),
- _Prefix("Italy"), _Prefix("France"), _Prefix("Taiwan"),
- };
- {
- PrefixStringMap map;
-
- SetupPrefixMap(array1, map);
- pset->SetPrefixes(map);
-
- DoExpectedLookup(pset, array1);
- }
-
- // Second
- _PrefixArray array2 = { _Prefix("Pikachu"), _Prefix("Bulbasaur"), _Prefix("Charmander"),
- _Prefix("Blastoise"), _Prefix("Pidgey"), _Prefix("Mewtwo"),
- _Prefix("Jigglypuff"), _Prefix("Persian"), _Prefix("Tentacool"),
- _Prefix("Onix"), _Prefix("Eevee"), _Prefix("Jynx"),
- };
- {
- PrefixStringMap map;
-
- SetupPrefixMap(array2, map);
- pset->SetPrefixes(map);
-
- DoExpectedLookup(pset, array2);
- }
-
- // Should not match any of the first prefix set
- uint32_t matchLength = 0;
- for (uint32_t i = 0; i < array1.Length(); i++) {
- UniquePtr<nsACString> fullhash(CreateFullHash(array1[i]));
-
- pset->Matches(*fullhash, &matchLength);
- ASSERT_TRUE(matchLength == 0);
- }
-}
-
-// Test only set one 4-bytes prefix and one full-length prefix
-TEST(VariableLengthPrefixSet, TinyPrefixSet)
-{
- RefPtr<VariableLengthPrefixSet> pset = new VariableLengthPrefixSet;
- pset->Init(NS_LITERAL_CSTRING("test"));
-
- PrefixStringMap map;
- _PrefixArray array = { _Prefix("AAAA"),
- _Prefix("11112222333344445555666677778888"),
- };
-
- SetupPrefixMap(array, map);
- pset->SetPrefixes(map);
-
- DoExpectedLookup(pset, array);
-
- DoRandomLookup(pset, 1000, array);
-
- CheckContent(pset, map);
-}
-
-// Test empty prefix set and IsEmpty function
-TEST(VariableLengthPrefixSet, EmptyPrefixSet)
-{
- RefPtr<VariableLengthPrefixSet> pset = new VariableLengthPrefixSet;
- pset->Init(NS_LITERAL_CSTRING("test"));
-
- bool empty;
- pset->IsEmpty(&empty);
- ASSERT_TRUE(empty);
-
- PrefixStringMap map;
- _PrefixArray array1;
-
- // Lookup an empty array should never match
- DoRandomLookup(pset, 100, array1);
-
- // Insert an 4-bytes prefix, then IsEmpty should return false
- _PrefixArray array2 = { _Prefix("test") };
- SetupPrefixMap(array2, map);
- pset->SetPrefixes(map);
-
- pset->IsEmpty(&empty);
- ASSERT_TRUE(!empty);
-
- _PrefixArray array3 = { _Prefix("test variable length") };
-
- // Insert an 5~32 bytes prefix, then IsEmpty should return false
- SetupPrefixMap(array3, map);
- pset->SetPrefixes(map);
-
- pset->IsEmpty(&empty);
- ASSERT_TRUE(!empty);
-}
-
-// Test prefix size should only between 4~32 bytes
-TEST(VariableLengthPrefixSet, MinMaxPrefixSet)
-{
- RefPtr<VariableLengthPrefixSet> pset = new VariableLengthPrefixSet;
- pset->Init(NS_LITERAL_CSTRING("test"));
-
- PrefixStringMap map;
- {
- _PrefixArray array = { _Prefix("1234"),
- _Prefix("ABCDEFGHIJKKMNOP"),
- _Prefix("1aaa2bbb3ccc4ddd5eee6fff7ggg8hhh") };
-
- SetupPrefixMap(array, map);
- nsresult rv = pset->SetPrefixes(map);
- ASSERT_TRUE(rv == NS_OK);
- }
-
- // Prefix size less than 4-bytes should fail
- {
- _PrefixArray array = { _Prefix("123") };
-
- SetupPrefixMap(array, map);
- nsresult rv = pset->SetPrefixes(map);
- ASSERT_TRUE(NS_FAILED(rv));
- }
-
- // Prefix size greater than 32-bytes should fail
- {
- _PrefixArray array = { _Prefix("1aaa2bbb3ccc4ddd5eee6fff7ggg8hhh9") };
-
- SetupPrefixMap(array, map);
- nsresult rv = pset->SetPrefixes(map);
- ASSERT_TRUE(NS_FAILED(rv));
- }
-}
-
-// Test save then load prefix set with only 4-bytes prefixes
-TEST(VariableLengthPrefixSet, LoadSaveFixedLengthPrefixSet)
-{
- RefPtr<VariableLengthPrefixSet> save = new VariableLengthPrefixSet;
- save->Init(NS_LITERAL_CSTRING("test-save"));
-
- _PrefixArray array;
- RandomPrefixes(10000, 4, 4, array);
-
- PrefixStringMap map;
- SetupPrefixMap(array, map);
- save->SetPrefixes(map);
-
- DoExpectedLookup(save, array);
-
- DoRandomLookup(save, 1000, array);
-
- CheckContent(save, map);
-
- nsCOMPtr<nsIFile> file;
- NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR,
- getter_AddRefs(file));
- file->Append(NS_LITERAL_STRING("test.vlpset"));
-
- save->StoreToFile(file);
-
- RefPtr<VariableLengthPrefixSet> load = new VariableLengthPrefixSet;
- load->Init(NS_LITERAL_CSTRING("test-load"));
-
- load->LoadFromFile(file);
-
- DoExpectedLookup(load, array);
-
- DoRandomLookup(load, 1000, array);
-
- CheckContent(load, map);
-
- file->Remove(false);
-}
-
-// Test save then load prefix set with only 5~32 bytes prefixes
-TEST(VariableLengthPrefixSet, LoadSaveVariableLengthPrefixSet)
-{
- RefPtr<VariableLengthPrefixSet> save = new VariableLengthPrefixSet;
- save->Init(NS_LITERAL_CSTRING("test-save"));
-
- _PrefixArray array;
- RandomPrefixes(10000, 5, 32, array);
-
- PrefixStringMap map;
- SetupPrefixMap(array, map);
- save->SetPrefixes(map);
-
- DoExpectedLookup(save, array);
-
- DoRandomLookup(save, 1000, array);
-
- CheckContent(save, map);
-
- nsCOMPtr<nsIFile> file;
- NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR,
- getter_AddRefs(file));
- file->Append(NS_LITERAL_STRING("test.vlpset"));
-
- save->StoreToFile(file);
-
- RefPtr<VariableLengthPrefixSet> load = new VariableLengthPrefixSet;
- load->Init(NS_LITERAL_CSTRING("test-load"));
-
- load->LoadFromFile(file);
-
- DoExpectedLookup(load, array);
-
- DoRandomLookup(load, 1000, array);
-
- CheckContent(load, map);
-
- file->Remove(false);
-}
-
-// Test save then load prefix with both 4 bytes prefixes and 5~32 bytes prefixes
-TEST(VariableLengthPrefixSet, LoadSavePrefixSet)
-{
- RefPtr<VariableLengthPrefixSet> save = new VariableLengthPrefixSet;
- save->Init(NS_LITERAL_CSTRING("test-save"));
-
- // Try to simulate the real case that most prefixes are 4bytes
- _PrefixArray array;
- RandomPrefixes(20000, 4, 4, array);
- RandomPrefixes(1000, 5, 32, array);
-
- PrefixStringMap map;
- SetupPrefixMap(array, map);
- save->SetPrefixes(map);
-
- DoExpectedLookup(save, array);
-
- DoRandomLookup(save, 1000, array);
-
- CheckContent(save, map);
-
- nsCOMPtr<nsIFile> file;
- NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR,
- getter_AddRefs(file));
- file->Append(NS_LITERAL_STRING("test.vlpset"));
-
- save->StoreToFile(file);
-
- RefPtr<VariableLengthPrefixSet> load = new VariableLengthPrefixSet;
- load->Init(NS_LITERAL_CSTRING("test-load"));
-
- load->LoadFromFile(file);
-
- DoExpectedLookup(load, array);
-
- DoRandomLookup(load, 1000, array);
-
- CheckContent(load, map);
-
- file->Remove(false);
-}
diff --git a/toolkit/components/url-classifier/tests/gtest/moz.build b/toolkit/components/url-classifier/tests/gtest/moz.build
deleted file mode 100644
index e66af90245..0000000000
--- a/toolkit/components/url-classifier/tests/gtest/moz.build
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-LOCAL_INCLUDES += [
- '../..',
-]
-
-UNIFIED_SOURCES += [
- 'Common.cpp',
- 'TestChunkSet.cpp',
- 'TestFailUpdate.cpp',
- 'TestLookupCacheV4.cpp',
- 'TestPerProviderDirectory.cpp',
- 'TestProtocolParser.cpp',
- 'TestRiceDeltaDecoder.cpp',
- 'TestSafebrowsingHash.cpp',
- 'TestSafeBrowsingProtobuf.cpp',
- 'TestTable.cpp',
- 'TestUrlClassifierTableUpdateV4.cpp',
- 'TestUrlClassifierUtils.cpp',
- 'TestVariableLengthPrefixSet.cpp',
-]
-
-FINAL_LIBRARY = 'xul-gtest'
diff --git a/toolkit/components/url-classifier/tests/jar.mn b/toolkit/components/url-classifier/tests/jar.mn
deleted file mode 100644
index 2264c28965..0000000000
--- a/toolkit/components/url-classifier/tests/jar.mn
+++ /dev/null
@@ -1,2 +0,0 @@
-toolkit.jar:
- content/global/url-classifier/unittests.xul (unittests.xul)
diff --git a/toolkit/components/url-classifier/tests/mochitest/.eslintrc.js b/toolkit/components/url-classifier/tests/mochitest/.eslintrc.js
deleted file mode 100644
index 58b3df4a74..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/.eslintrc.js
+++ /dev/null
@@ -1,8 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/mochitest/mochitest.eslintrc.js",
- "../../../../../testing/mochitest/chrome.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/url-classifier/tests/mochitest/allowlistAnnotatedFrame.html b/toolkit/components/url-classifier/tests/mochitest/allowlistAnnotatedFrame.html
deleted file mode 100644
index 9aae1b8415..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/allowlistAnnotatedFrame.html
+++ /dev/null
@@ -1,144 +0,0 @@
-<html>
-<head>
-<title></title>
-
-<script type="text/javascript">
-
-// Modified by evil.js
-var scriptItem;
-
-var scriptItem1 = "untouched";
-var imageItem1 = "untouched";
-var frameItem1 = "untouched";
-var scriptItem2 = "untouched";
-var imageItem2 = "untouched";
-var frameItem2 = "untouched";
-var xhrItem = "untouched";
-var fetchItem = "untouched";
-var mediaItem1 = "untouched";
-
-function checkLoads() {
- window.parent.is(scriptItem1, "spoiled", "Should not block tracking js 1");
- window.parent.is(scriptItem2, "spoiled", "Should not block tracking js 2");
- window.parent.is(imageItem1, "spoiled", "Should not block tracking img 1");
- window.parent.is(imageItem2, "spoiled", "Should not block tracking img 2");
- window.parent.is(frameItem1, "spoiled", "Should not block tracking iframe 1");
- window.parent.is(frameItem2, "spoiled", "Should not block tracking iframe 2");
- window.parent.is(mediaItem1, "loaded", "Should not block tracking video");
- window.parent.is(xhrItem, "loaded", "Should not block tracking XHR");
- window.parent.is(fetchItem, "loaded", "Should not block fetches from tracking domains");
- window.parent.is(window.document.blockedTrackingNodeCount, 0,
- "No elements should be blocked");
-
- // End (parent) test.
- window.parent.clearPermissions();
- window.parent.SimpleTest.finish();
-}
-
-var onloadCalled = false;
-var xhrFinished = false;
-var fetchFinished = false;
-var videoLoaded = false;
-function loaded(type) {
- if (type === "onload") {
- onloadCalled = true;
- } else if (type === "xhr") {
- xhrFinished = true;
- } else if (type === "fetch") {
- fetchFinished = true;
- } else if (type === "video") {
- videoLoaded = true;
- }
-
- if (onloadCalled && xhrFinished && fetchFinished && videoLoaded) {
- checkLoads();
- }
-}
-</script>
-
-</head>
-
-<body onload="loaded('onload')">
-
-<!-- Try loading from a tracking script URI (1) -->
-<script id="badscript1" src="http://tracking.example.com/tests/toolkit/components/url-classifier/tests/mochitest/evil.js" onload="scriptItem1 = 'spoiled';"></script>
-
-<!-- Try loading from a tracking image URI (1) -->
-<img id="badimage1" src="http://tracking.example.com/tests/toolkit/components/url-classifier/tests/mochitest/raptor.jpg" onload="imageItem1 = 'spoiled';"/>
-
-<!-- Try loading from a tracking frame URI (1) -->
-<iframe id="badframe1" src="http://tracking.example.com/tests/toolkit/components/url-classifier/tests/mochitest/track.html" onload="frameItem1 = 'spoiled';"></iframe>
-
-<!-- Try loading from a tracking video URI -->
-<video id="badmedia1" src="http://tracking.example.com/tests/toolkit/components/url-classifier/tests/mochitest/vp9.webm"></video>
-
-<script>
-var v = document.getElementById("badmedia1");
-v.addEventListener("loadedmetadata", function() {
- mediaItem1 = "loaded";
- loaded("video");
-}, true);
-v.addEventListener("error", function() {
- mediaItem1 = "error";
- loaded("video");
-}, true);
-
-// Try loading from a tracking script URI (2) - The loader may follow a
-// different path depending on whether the resource is loaded from JS or HTML.
-var newScript = document.createElement("script");
-newScript.id = "badscript2";
-newScript.src = "http://tracking.example.com/tests/toolkit/components/url-classifier/tests/mochitest/evil.js";
-newScript.addEventListener("load", function onload() {scriptItem2 = 'spoiled';});
-document.body.appendChild(newScript);
-
-/// Try loading from a tracking image URI (2)
-var newImage = document.createElement("img");
-newImage.id = "badimage2";
-newImage.src = "http://tracking.example.com/tests/toolkit/components/url-classifier/tests/mochitest/raptor.jpg";
-newImage.addEventListener("load", function onload() {imageItem2 = 'spoiled'});
-document.body.appendChild(newImage);
-
-// Try loading from a tracking iframe URI (2)
-var newFrame = document.createElement("iframe");
-newFrame.id = "badframe2";
-newFrame.src = "http://tracking.example.com/tests/toolkit/components/url-classifier/tests/mochitest/track.html"
-newFrame.addEventListener("load", function onload() {frameItem2 = 'spoiled'});
-document.body.appendChild(newFrame);
-
-// Try doing an XHR against a tracking domain (bug 1216793)
-function reqListener() {
- xhrItem = "loaded";
- loaded("xhr");
-}
-function transferFailed() {
- xhrItem = "failed";
- loaded("xhr");
-}
-function transferCanceled() {
- xhrItem = "canceled";
- loaded("xhr");
-}
-var oReq = new XMLHttpRequest();
-oReq.addEventListener("load", reqListener);
-oReq.addEventListener("error", transferFailed);
-oReq.addEventListener("abort", transferCanceled);
-oReq.open("GET", "http://tracking.example.com/tests/toolkit/components/url-classifier/tests/mochitest/evil.js");
-oReq.send();
-
-// Fetch from a tracking domain
-fetch("http://tracking.example.com/tests/toolkit/components/url-classifier/tests/mochitest/evil.js").then(function(response) {
- if(response.ok) {
- fetchItem = "loaded";
- loaded("fetch");
- } else {
- fetchItem = "badresponse";
- loaded("fetch");
- }
- }).catch(function(error) {
- fetchItem = "error";
- loaded("fetch");
-});
-</script>
-</body>
-</html>
-
diff --git a/toolkit/components/url-classifier/tests/mochitest/bad.css b/toolkit/components/url-classifier/tests/mochitest/bad.css
deleted file mode 100644
index f57b36a778..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/bad.css
+++ /dev/null
@@ -1 +0,0 @@
-#styleBad { visibility: hidden; }
diff --git a/toolkit/components/url-classifier/tests/mochitest/bad.css^headers^ b/toolkit/components/url-classifier/tests/mochitest/bad.css^headers^
deleted file mode 100644
index 4030ea1d3d..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/bad.css^headers^
+++ /dev/null
@@ -1 +0,0 @@
-Cache-Control: no-store
diff --git a/toolkit/components/url-classifier/tests/mochitest/basic.vtt b/toolkit/components/url-classifier/tests/mochitest/basic.vtt
deleted file mode 100644
index 7781790d04..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/basic.vtt
+++ /dev/null
@@ -1,27 +0,0 @@
-WEBVTT
-Region: id=testOne lines=2 width=30%
-Region: id=testTwo lines=4 width=20%
-
-1
-00:00.500 --> 00:00.700 region:testOne
-This
-
-2
-00:01.200 --> 00:02.400 region:testTwo
-Is
-
-2.5
-00:02.000 --> 00:03.500 region:testOne
-(Over here?!)
-
-3
-00:02.710 --> 00:02.910
-A
-
-4
-00:03.217 --> 00:03.989
-Test
-
-5
-00:03.217 --> 00:03.989
-And more!
diff --git a/toolkit/components/url-classifier/tests/mochitest/basic.vtt^headers^ b/toolkit/components/url-classifier/tests/mochitest/basic.vtt^headers^
deleted file mode 100644
index 23de552c1a..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/basic.vtt^headers^
+++ /dev/null
@@ -1 +0,0 @@
-Access-Control-Allow-Origin: * \ No newline at end of file
diff --git a/toolkit/components/url-classifier/tests/mochitest/bug_1281083.html b/toolkit/components/url-classifier/tests/mochitest/bug_1281083.html
deleted file mode 100644
index cd57701772..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/bug_1281083.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<html>
-<head>
-<title></title>
-
-<script type="text/javascript">
-
-var scriptItem = "untouched";
-
-function checkLoads() {
- // Make sure the javascript did not load.
- window.parent.is(scriptItem, "untouched", "Should not load bad javascript");
-
- // Call parent.loadTestFrame again to test classification metadata in HTTP
- // cache entries.
- if (window.parent.firstLoad) {
- window.parent.info("Reloading from cache...");
- window.parent.firstLoad = false;
- window.parent.loadTestFrame();
- return;
- }
-
- // End (parent) test.
- window.parent.SimpleTest.finish();
-}
-
-</script>
-
-<!-- Try loading from a malware javascript URI -->
-<script type="text/javascript" src="http://bug1281083.example.com/tests/toolkit/components/url-classifier/tests/mochitest/evil.js"></script>
-
-</head>
-
-<body onload="checkLoads()">
-</body>
-</html>
diff --git a/toolkit/components/url-classifier/tests/mochitest/chrome.ini b/toolkit/components/url-classifier/tests/mochitest/chrome.ini
deleted file mode 100644
index 1652e7421b..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/chrome.ini
+++ /dev/null
@@ -1,23 +0,0 @@
-[DEFAULT]
-skip-if = os == 'android'
-support-files =
- allowlistAnnotatedFrame.html
- classifiedAnnotatedFrame.html
- classifiedAnnotatedPBFrame.html
- bug_1281083.html
-
-[test_lookup_system_principal.html]
-[test_classified_annotations.html]
-tags = trackingprotection
-skip-if = os == 'linux' && asan # Bug 1202548
-[test_allowlisted_annotations.html]
-tags = trackingprotection
-[test_privatebrowsing_trackingprotection.html]
-tags = trackingprotection
-[test_trackingprotection_bug1157081.html]
-tags = trackingprotection
-[test_trackingprotection_whitelist.html]
-tags = trackingprotection
-[test_safebrowsing_bug1272239.html]
-[test_donottrack.html]
-[test_classifier_changetablepref.html]
diff --git a/toolkit/components/url-classifier/tests/mochitest/classifiedAnnotatedFrame.html b/toolkit/components/url-classifier/tests/mochitest/classifiedAnnotatedFrame.html
deleted file mode 100644
index 8aab13dd3b..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/classifiedAnnotatedFrame.html
+++ /dev/null
@@ -1,213 +0,0 @@
-<html>
-<head>
-<title></title>
-
-<script type="text/javascript">
-"use strict";
-
-var scriptItem = "untouched";
-var scriptItem1 = "untouched";
-var scriptItem2 = "untouched";
-var imageItem1 = "untouched";
-var imageItem2 = "untouched";
-var frameItem1 = "untouched";
-var frameItem2 = "untouched";
-var xhrItem = "untouched";
-var fetchItem = "untouched";
-var mediaItem1 = "untouched";
-
-var badids = [
- "badscript1",
- "badscript2",
- "badimage1",
- "badimage2",
- "badframe1",
- "badframe2",
- "badmedia1",
- "badcss"
-];
-
-function checkLoads() {
- window.parent.is(
- scriptItem1, "untouched", "Should not load tracking javascript");
- window.parent.is(
- scriptItem2, "untouched", "Should not load tracking javascript (2)");
-
- window.parent.is(
- imageItem1, "untouched", "Should not load tracking images");
- window.parent.is(
- imageItem2, "untouched", "Should not load tracking images (2)");
-
- window.parent.is(
- frameItem1, "untouched", "Should not load tracking iframes");
- window.parent.is(
- frameItem2, "untouched", "Should not load tracking iframes (2)");
- window.parent.is(
- mediaItem1, "error", "Should not load tracking videos");
- window.parent.is(
- xhrItem, "failed", "Should not load tracking XHRs");
- window.parent.is(
- fetchItem, "error", "Should not fetch from tracking URLs");
-
- var elt = document.getElementById("styleCheck");
- var style = document.defaultView.getComputedStyle(elt, "");
- window.parent.isnot(
- style.visibility, "hidden", "Should not load tracking css");
-
- window.parent.is(window.document.blockedTrackingNodeCount, badids.length,
- "Should identify all tracking elements");
-
- var blockedTrackingNodes = window.document.blockedTrackingNodes;
-
- // Make sure that every node in blockedTrackingNodes exists in the tree
- // (that may not always be the case but do not expect any nodes to disappear
- // from the tree here)
- var allNodeMatch = true;
- for (var i = 0; i < blockedTrackingNodes.length; i++) {
- var nodeMatch = false;
- for (var j = 0; j < badids.length && !nodeMatch; j++) {
- nodeMatch = nodeMatch ||
- (blockedTrackingNodes[i] == document.getElementById(badids[j]));
- }
-
- allNodeMatch = allNodeMatch && nodeMatch;
- }
- window.parent.ok(allNodeMatch,
- "All annotated nodes are expected in the tree");
-
- // Make sure that every node with a badid (see badids) is found in the
- // blockedTrackingNodes. This tells us if we are neglecting to annotate
- // some nodes
- allNodeMatch = true;
- for (var j = 0; j < badids.length; j++) {
- var nodeMatch = false;
- for (var i = 0; i < blockedTrackingNodes.length && !nodeMatch; i++) {
- nodeMatch = nodeMatch ||
- (blockedTrackingNodes[i] == document.getElementById(badids[j]));
- }
-
- if (!nodeMatch) {
- console.log(badids[j] + " was not found in blockedTrackingNodes");
- }
- allNodeMatch = allNodeMatch && nodeMatch;
- }
- window.parent.ok(allNodeMatch,
- "All tracking nodes are expected to be annotated as such");
-
- // Unset prefs, etc.
- window.parent.cleanup();
- // End (parent) test.
- window.parent.SimpleTest.finish();
-}
-
-var onloadCalled = false;
-var xhrFinished = false;
-var fetchFinished = false;
-var videoLoaded = false;
-function loaded(type) {
- if (type === "onload") {
- onloadCalled = true;
- } else if (type === "xhr") {
- xhrFinished = true;
- } else if (type === "fetch") {
- fetchFinished = true;
- } else if (type === "video") {
- videoLoaded = true;
- }
- if (onloadCalled && xhrFinished && fetchFinished && videoLoaded) {
- checkLoads();
- }
-}
-</script>
-
-<!-- Try loading from a tracking CSS URI -->
-<link id="badcss" rel="stylesheet" type="text/css" href="http://tracking.example.com/tests/toolkit/components/url-classifier/tests/mochitest/evil.css"></link>
-
-</head>
-
-<body onload="loaded('onload')">
-
-<!-- Try loading from a tracking script URI (1): evil.js onload will have updated the scriptItem variable -->
-<script id="badscript1" src="http://tracking.example.com/tests/toolkit/components/url-classifier/tests/mochitest/evil.js" onload="scriptItem1 = scriptItem;"></script>
-
-<!-- Try loading from a tracking image URI (1) -->
-<img id="badimage1" src="http://tracking.example.com/tests/toolkit/components/url-classifier/tests/mochitest/raptor.jpg?reload=true" onload="imageItem1 = 'spoiled';"/>
-
-<!-- Try loading from a tracking frame URI (1) -->
-<iframe id="badframe1" src="http://tracking.example.com/tests/toolkit/components/url-classifier/tests/mochitest/track.html" onload="frameItem1 = 'spoiled';"></iframe>
-
-<!-- Try loading from a tracking video URI -->
-<video id="badmedia1" src="http://tracking.example.com/tests/toolkit/components/url-classifier/tests/mochitest/vp9.webm?reload=true"></video>
-
-<script>
-var v = document.getElementById("badmedia1");
-v.addEventListener("loadedmetadata", function() {
- mediaItem1 = "loaded";
- loaded("video");
-}, true);
-v.addEventListener("error", function() {
- mediaItem1 = "error";
- loaded("video");
-}, true);
-
-// Try loading from a tracking script URI (2) - The loader may follow a different path depending on whether the resource is loaded from JS or HTML.
-var newScript = document.createElement("script");
-newScript.id = "badscript2";
-newScript.src = "http://tracking.example.com/tests/toolkit/components/url-classifier/tests/mochitest/evil.js";
-newScript.addEventListener("load", function() {scriptItem2 = scriptItem;});
-document.body.appendChild(newScript);
-
-/// Try loading from a tracking image URI (2)
-var newImage = document.createElement("img");
-newImage.id = "badimage2";
-newImage.src = "http://tracking.example.com/tests/toolkit/components/url-classifier/tests/mochitest/raptor.jpg?reload=true";
-newImage.addEventListener("load", function() {imageItem2 = 'spoiled'});
-document.body.appendChild(newImage);
-
-// Try loading from a tracking iframe URI (2)
-var newFrame = document.createElement("iframe");
-newFrame.id = "badframe2";
-newFrame.src = "http://tracking.example.com/tests/toolkit/components/url-classifier/tests/mochitest/track.html"
-newFrame.addEventListener("load", function() {frameItem2 = 'spoiled'});
-document.body.appendChild(newFrame);
-
-// Try doing an XHR against a tracking domain (bug 1216793)
-function reqListener() {
- xhrItem = "loaded";
- loaded("xhr");
-}
-function transferFailed() {
- xhrItem = "failed";
- loaded("xhr");
-}
-function transferCanceled() {
- xhrItem = "canceled";
- loaded("xhr");
-}
-var oReq = new XMLHttpRequest();
-oReq.addEventListener("load", reqListener);
-oReq.addEventListener("error", transferFailed);
-oReq.addEventListener("abort", transferCanceled);
-oReq.open("GET", "http://tracking.example.com/tests/toolkit/components/url-classifier/tests/mochitest/evil.js");
-oReq.send();
-
-// Fetch from a tracking domain
-fetch("http://tracking.example.com/tests/toolkit/components/url-classifier/tests/mochitest/evil.js").then(function(response) {
- if(response.ok) {
- fetchItem = "loaded";
- loaded("fetch");
- } else {
- fetchItem = "badresponse";
- loaded("fetch");
- }
- }).catch(function(error) {
- fetchItem = "error";
- loaded("fetch");
-});
-</script>
-
-The following should not be hidden:
-<div id="styleCheck">STYLE TEST</div>
-
-</body>
-</html>
diff --git a/toolkit/components/url-classifier/tests/mochitest/classifiedAnnotatedPBFrame.html b/toolkit/components/url-classifier/tests/mochitest/classifiedAnnotatedPBFrame.html
deleted file mode 100644
index f11ec1de3e..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/classifiedAnnotatedPBFrame.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE HTML>
-<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
-<html>
-<head>
-<title></title>
-
-<link id="badcss" rel="stylesheet" type="text/css" href="http://tracking.example.com/tests/toolkit/components/url-classifier/tests/mochitest/evil.css"></link>
-
-</head>
-<body>
-
-<script id="badscript" data-touched="not sure" src="http://tracking.example.com/tests/toolkit/components/url-classifier/tests/mochitest/evil.js" onload="this.dataset.touched = 'yes';" onerror="this.dataset.touched = 'no';"></script>
-
-<script id="goodscript" data-touched="not sure" src="http://itisatracker.org/tests/toolkit/components/url-classifier/tests/mochitest/good.js" onload="this.dataset.touched = 'yes';" onerror="this.dataset.touched = 'no';"></script>
-
-<!-- The image cache can cache JS handlers, so make sure we use a different URL for raptor.jpg each time -->
-<img id="badimage" data-touched="not sure" src="http://tracking.example.com/tests/toolkit/components/url-classifier/tests/mochitest/raptor.jpg?pbmode=test" onload="this.dataset.touched = 'yes';" onerror="this.dataset.touched = 'no';"/>
-
-The following should not be hidden:
-<div id="styleCheck">STYLE TEST</div>
-
-</body>
-</html>
diff --git a/toolkit/components/url-classifier/tests/mochitest/classifierCommon.js b/toolkit/components/url-classifier/tests/mochitest/classifierCommon.js
deleted file mode 100644
index 49bda38db1..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/classifierCommon.js
+++ /dev/null
@@ -1,112 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-const { classes: Cc, interfaces: Ci, results: Cr } = Components;
-
-var dbService = Cc["@mozilla.org/url-classifier/dbservice;1"]
- .getService(Ci.nsIUrlClassifierDBService);
-
-var timer;
-function setTimeout(callback, delay) {
- timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
- timer.initWithCallback({ notify: callback },
- delay,
- Ci.nsITimer.TYPE_ONE_SHOT);
-}
-
-function doUpdate(update) {
- let listener = {
- QueryInterface: function(iid)
- {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIUrlClassifierUpdateObserver))
- return this;
-
- throw Cr.NS_ERROR_NO_INTERFACE;
- },
- updateUrlRequested: function(url) { },
- streamFinished: function(status) { },
- updateError: function(errorCode) {
- sendAsyncMessage("updateError", errorCode);
- },
- updateSuccess: function(requestedTimeout) {
- sendAsyncMessage("updateSuccess");
- }
- };
-
- let dbService = Cc["@mozilla.org/url-classifier/dbservice;1"]
- .getService(Ci.nsIUrlClassifierDBService);
-
- try {
- dbService.beginUpdate(listener, "test-malware-simple,test-unwanted-simple", "");
- dbService.beginStream("", "");
- dbService.updateStream(update);
- dbService.finishStream();
- dbService.finishUpdate();
- } catch(e) {
- // beginUpdate may fail if there's an existing update in progress
- // retry until success or testcase timeout.
- setTimeout(() => { doUpdate(update); }, 1000);
- }
-}
-
-function doReload() {
- dbService.reloadDatabase();
-
- sendAsyncMessage("reloadSuccess");
-}
-
-// SafeBrowsing.jsm is initialized after mozEntries are added. Add observer
-// to receive "finished" event. For the case when this function is called
-// after the event had already been notified, we lookup entries to see if
-// they are already added to database.
-function waitForInit() {
- let observerService = Cc["@mozilla.org/observer-service;1"]
- .getService(Ci.nsIObserverService);
-
- observerService.addObserver(function() {
- sendAsyncMessage("safeBrowsingInited");
- }, "mozentries-update-finished", false);
-
- // This url must sync with the table, url in SafeBrowsing.jsm addMozEntries
- const table = "test-phish-simple";
- const url = "http://itisatrap.org/firefox/its-a-trap.html";
-
- let secMan = Cc["@mozilla.org/scriptsecuritymanager;1"]
- .getService(Ci.nsIScriptSecurityManager);
- let iosvc = Cc["@mozilla.org/network/io-service;1"]
- .getService(Ci.nsIIOService);
-
- let principal = secMan.createCodebasePrincipal(
- iosvc.newURI(url, null, null), {});
-
- let listener = {
- QueryInterface: function(iid)
- {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIUrlClassifierUpdateObserver))
- return this;
- throw Cr.NS_ERROR_NO_INTERFACE;
- },
-
- handleEvent: function(value)
- {
- if (value === table) {
- sendAsyncMessage("safeBrowsingInited");
- }
- },
- };
- dbService.lookup(principal, table, listener);
-}
-
-addMessageListener("doUpdate", ({ testUpdate }) => {
- doUpdate(testUpdate);
-});
-
-addMessageListener("doReload", () => {
- doReload();
-});
-
-addMessageListener("waitForInit", () => {
- waitForInit();
-});
diff --git a/toolkit/components/url-classifier/tests/mochitest/classifierFrame.html b/toolkit/components/url-classifier/tests/mochitest/classifierFrame.html
deleted file mode 100644
index c7923f4484..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/classifierFrame.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<html>
-<head>
-<title></title>
-
-<script type="text/javascript">
-
-var scriptItem = "untouched";
-
-function checkLoads() {
- // Make sure the javascript did not load.
- window.parent.is(scriptItem, "untouched", "Should not load bad javascript");
-
- // Make sure the css did not load.
- var elt = document.getElementById("styleCheck");
- var style = document.defaultView.getComputedStyle(elt, "");
- window.parent.isnot(style.visibility, "hidden", "Should not load bad css");
-
- elt = document.getElementById("styleBad");
- style = document.defaultView.getComputedStyle(elt, "");
- window.parent.isnot(style.visibility, "hidden", "Should not load bad css");
-
- elt = document.getElementById("styleImport");
- style = document.defaultView.getComputedStyle(elt, "");
- window.parent.isnot(style.visibility, "visible", "Should import clean css");
-
- // Call parent.loadTestFrame again to test classification metadata in HTTP
- // cache entries.
- if (window.parent.firstLoad) {
- window.parent.info("Reloading from cache...");
- window.parent.firstLoad = false;
- window.parent.loadTestFrame();
- return;
- }
-
- // End (parent) test.
- window.parent.SimpleTest.finish();
-}
-
-</script>
-
-<!-- Try loading from a malware javascript URI -->
-<script type="text/javascript" src="http://malware.example.com/tests/toolkit/components/url-classifier/tests/mochitest/evil.js"></script>
-
-<!-- Try loading from an uwanted software css URI -->
-<link rel="stylesheet" type="text/css" href="http://unwanted.example.com/tests/toolkit/components/url-classifier/tests/mochitest/evil.css"></link>
-
-<!-- Try loading a marked-as-malware css through an @import from a clean URI -->
-<link rel="stylesheet" type="text/css" href="import.css"></link>
-</head>
-
-<body onload="checkLoads()">
-The following should not be hidden:
-<div id="styleCheck">STYLE TEST</div>
-<div id="styleBad">STYLE BAD</div>
-<div id="styleImport">STYLE IMPORT</div>
-</body>
-</html>
diff --git a/toolkit/components/url-classifier/tests/mochitest/classifierHelper.js b/toolkit/components/url-classifier/tests/mochitest/classifierHelper.js
deleted file mode 100644
index 973f0c2c4d..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/classifierHelper.js
+++ /dev/null
@@ -1,201 +0,0 @@
-if (typeof(classifierHelper) == "undefined") {
- var classifierHelper = {};
-}
-
-const CLASSIFIER_COMMON_URL = SimpleTest.getTestFileURL("classifierCommon.js");
-var gScript = SpecialPowers.loadChromeScript(CLASSIFIER_COMMON_URL);
-
-const ADD_CHUNKNUM = 524;
-const SUB_CHUNKNUM = 523;
-const HASHLEN = 32;
-
-const PREFS = {
- PROVIDER_LISTS : "browser.safebrowsing.provider.mozilla.lists",
- DISALLOW_COMPLETIONS : "urlclassifier.disallow_completions",
- PROVIDER_GETHASHURL : "browser.safebrowsing.provider.mozilla.gethashURL"
-};
-
-// addUrlToDB & removeUrlFromDB are asynchronous, queue the task to ensure
-// the callback follow correct order.
-classifierHelper._updates = [];
-
-// Keep urls added to database, those urls should be automatically
-// removed after test complete.
-classifierHelper._updatesToCleanup = [];
-
-classifierHelper._initsCB = [];
-
-// This function return a Promise, promise is resolved when SafeBrowsing.jsm
-// is initialized.
-classifierHelper.waitForInit = function() {
- return new Promise(function(resolve, reject) {
- classifierHelper._initsCB.push(resolve);
- gScript.sendAsyncMessage("waitForInit");
- });
-}
-
-// This function is used to allow completion for specific "list",
-// some lists like "test-malware-simple" is default disabled to ask for complete.
-// "list" is the db we would like to allow it
-// "url" is the completion server
-classifierHelper.allowCompletion = function(lists, url) {
- for (var list of lists) {
- // Add test db to provider
- var pref = SpecialPowers.getCharPref(PREFS.PROVIDER_LISTS);
- pref += "," + list;
- SpecialPowers.setCharPref(PREFS.PROVIDER_LISTS, pref);
-
- // Rename test db so we will not disallow it from completions
- pref = SpecialPowers.getCharPref(PREFS.DISALLOW_COMPLETIONS);
- pref = pref.replace(list, list + "-backup");
- SpecialPowers.setCharPref(PREFS.DISALLOW_COMPLETIONS, pref);
- }
-
- // Set get hash url
- SpecialPowers.setCharPref(PREFS.PROVIDER_GETHASHURL, url);
-}
-
-// Pass { url: ..., db: ... } to add url to database,
-// onsuccess/onerror will be called when update complete.
-classifierHelper.addUrlToDB = function(updateData) {
- return new Promise(function(resolve, reject) {
- var testUpdate = "";
- for (var update of updateData) {
- var LISTNAME = update.db;
- var CHUNKDATA = update.url;
- var CHUNKLEN = CHUNKDATA.length;
- var HASHLEN = update.len ? update.len : 32;
-
- classifierHelper._updatesToCleanup.push(update);
- testUpdate +=
- "n:1000\n" +
- "i:" + LISTNAME + "\n" +
- "ad:1\n" +
- "a:" + ADD_CHUNKNUM + ":" + HASHLEN + ":" + CHUNKLEN + "\n" +
- CHUNKDATA;
- }
-
- classifierHelper._update(testUpdate, resolve, reject);
- });
-}
-
-// Pass { url: ..., db: ... } to remove url from database,
-// onsuccess/onerror will be called when update complete.
-classifierHelper.removeUrlFromDB = function(updateData) {
- return new Promise(function(resolve, reject) {
- var testUpdate = "";
- for (var update of updateData) {
- var LISTNAME = update.db;
- var CHUNKDATA = ADD_CHUNKNUM + ":" + update.url;
- var CHUNKLEN = CHUNKDATA.length;
- var HASHLEN = update.len ? update.len : 32;
-
- testUpdate +=
- "n:1000\n" +
- "i:" + LISTNAME + "\n" +
- "s:" + SUB_CHUNKNUM + ":" + HASHLEN + ":" + CHUNKLEN + "\n" +
- CHUNKDATA;
- }
-
- classifierHelper._updatesToCleanup =
- classifierHelper._updatesToCleanup.filter((v) => {
- return updateData.indexOf(v) == -1;
- });
-
- classifierHelper._update(testUpdate, resolve, reject);
- });
-};
-
-// This API is used to expire all add/sub chunks we have updated
-// by using addUrlToDB and removeUrlFromDB.
-classifierHelper.resetDB = function() {
- return new Promise(function(resolve, reject) {
- var testUpdate = "";
- for (var update of classifierHelper._updatesToCleanup) {
- if (testUpdate.includes(update.db))
- continue;
-
- testUpdate +=
- "n:1000\n" +
- "i:" + update.db + "\n" +
- "ad:" + ADD_CHUNKNUM + "\n" +
- "sd:" + SUB_CHUNKNUM + "\n"
- }
-
- classifierHelper._update(testUpdate, resolve, reject);
- });
-};
-
-classifierHelper.reloadDatabase = function() {
- return new Promise(function(resolve, reject) {
- gScript.addMessageListener("reloadSuccess", function handler() {
- gScript.removeMessageListener('reloadSuccess', handler);
- resolve();
- });
-
- gScript.sendAsyncMessage("doReload");
- });
-}
-
-classifierHelper._update = function(testUpdate, onsuccess, onerror) {
- // Queue the task if there is still an on-going update
- classifierHelper._updates.push({"data": testUpdate,
- "onsuccess": onsuccess,
- "onerror": onerror});
- if (classifierHelper._updates.length != 1) {
- return;
- }
-
- gScript.sendAsyncMessage("doUpdate", { testUpdate });
-};
-
-classifierHelper._updateSuccess = function() {
- var update = classifierHelper._updates.shift();
- update.onsuccess();
-
- if (classifierHelper._updates.length) {
- var testUpdate = classifierHelper._updates[0].data;
- gScript.sendAsyncMessage("doUpdate", { testUpdate });
- }
-};
-
-classifierHelper._updateError = function(errorCode) {
- var update = classifierHelper._updates.shift();
- update.onerror(errorCode);
-
- if (classifierHelper._updates.length) {
- var testUpdate = classifierHelper._updates[0].data;
- gScript.sendAsyncMessage("doUpdate", { testUpdate });
- }
-};
-
-classifierHelper._inited = function() {
- classifierHelper._initsCB.forEach(function (cb) {
- cb();
- });
- classifierHelper._initsCB = [];
-};
-
-classifierHelper._setup = function() {
- gScript.addMessageListener("updateSuccess", classifierHelper._updateSuccess);
- gScript.addMessageListener("updateError", classifierHelper._updateError);
- gScript.addMessageListener("safeBrowsingInited", classifierHelper._inited);
-
- // cleanup will be called at end of each testcase to remove all the urls added to database.
- SimpleTest.registerCleanupFunction(classifierHelper._cleanup);
-};
-
-classifierHelper._cleanup = function() {
- // clean all the preferences may touch by helper
- for (var pref in PREFS) {
- SpecialPowers.clearUserPref(pref);
- }
-
- if (!classifierHelper._updatesToCleanup) {
- return Promise.resolve();
- }
-
- return classifierHelper.resetDB();
-};
-
-classifierHelper._setup();
diff --git a/toolkit/components/url-classifier/tests/mochitest/cleanWorker.js b/toolkit/components/url-classifier/tests/mochitest/cleanWorker.js
deleted file mode 100644
index 6856483730..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/cleanWorker.js
+++ /dev/null
@@ -1,10 +0,0 @@
-onmessage = function() {
- try {
- importScripts("evilWorker.js");
- } catch(ex) {
- postMessage("success");
- return;
- }
-
- postMessage("failure");
-};
diff --git a/toolkit/components/url-classifier/tests/mochitest/dnt.html b/toolkit/components/url-classifier/tests/mochitest/dnt.html
deleted file mode 100644
index effc3a4f8c..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/dnt.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<html>
-<head>
-<title></title>
-
-<script type="text/javascript">
-
-function makeXHR(url, callback) {
- var xhr = new XMLHttpRequest();
- xhr.open('GET', url, true);
- xhr.onload = function() {
- callback(xhr.response);
- };
- xhr.send();
-}
-
-function loaded(type) {
- window.parent.postMessage("navigator.doNotTrack=" + navigator.doNotTrack, "*");
-
- makeXHR("dnt.sjs", (res) => {
- window.parent.postMessage("DNT=" + res, "*");
- window.parent.postMessage("finish", "*");
- });
-}
-
-</script>
-</head>
-
-<body onload="loaded('onload')">
-</body>
-
-</html>
diff --git a/toolkit/components/url-classifier/tests/mochitest/dnt.sjs b/toolkit/components/url-classifier/tests/mochitest/dnt.sjs
deleted file mode 100644
index bbb836482a..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/dnt.sjs
+++ /dev/null
@@ -1,9 +0,0 @@
-function handleRequest(request, response) {
- var dnt = "unspecified";
- if (request.hasHeader("DNT")) {
- dnt = "1";
- }
-
- response.setHeader("Content-Type", "text/plain", false);
- response.write(dnt);
-}
diff --git a/toolkit/components/url-classifier/tests/mochitest/evil.css b/toolkit/components/url-classifier/tests/mochitest/evil.css
deleted file mode 100644
index f6f08d7c5c..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/evil.css
+++ /dev/null
@@ -1 +0,0 @@
-#styleCheck { visibility: hidden; } \ No newline at end of file
diff --git a/toolkit/components/url-classifier/tests/mochitest/evil.css^headers^ b/toolkit/components/url-classifier/tests/mochitest/evil.css^headers^
deleted file mode 100644
index 4030ea1d3d..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/evil.css^headers^
+++ /dev/null
@@ -1 +0,0 @@
-Cache-Control: no-store
diff --git a/toolkit/components/url-classifier/tests/mochitest/evil.js b/toolkit/components/url-classifier/tests/mochitest/evil.js
deleted file mode 100644
index 27f2e8c43d..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/evil.js
+++ /dev/null
@@ -1 +0,0 @@
-scriptItem = "loaded malware javascript!";
diff --git a/toolkit/components/url-classifier/tests/mochitest/evil.js^headers^ b/toolkit/components/url-classifier/tests/mochitest/evil.js^headers^
deleted file mode 100644
index 3eced96143..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/evil.js^headers^
+++ /dev/null
@@ -1,2 +0,0 @@
-Access-Control-Allow-Origin: *
-Cache-Control: no-store
diff --git a/toolkit/components/url-classifier/tests/mochitest/evilWorker.js b/toolkit/components/url-classifier/tests/mochitest/evilWorker.js
deleted file mode 100644
index ac34977d71..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/evilWorker.js
+++ /dev/null
@@ -1,3 +0,0 @@
-onmessage = function() {
- postMessage("loaded bad file");
-}
diff --git a/toolkit/components/url-classifier/tests/mochitest/gethash.sjs b/toolkit/components/url-classifier/tests/mochitest/gethash.sjs
deleted file mode 100644
index 9dcc6e0d57..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/gethash.sjs
+++ /dev/null
@@ -1,130 +0,0 @@
-const CC = Components.Constructor;
-const BinaryInputStream = CC("@mozilla.org/binaryinputstream;1",
- "nsIBinaryInputStream",
- "setInputStream");
-
-function handleRequest(request, response)
-{
- var query = {};
- request.queryString.split('&').forEach(function (val) {
- var idx = val.indexOf('=');
- query[val.slice(0, idx)] = unescape(val.slice(idx + 1));
- });
-
- var responseBody;
-
- // Store fullhash in the server side.
- if ("list" in query && "fullhash" in query) {
- // In the server side we will store:
- // 1. All the full hashes for a given list
- // 2. All the lists we have right now
- // data is separate by '\n'
- let list = query["list"];
- let hashes = getState(list);
-
- let hash = base64ToString(query["fullhash"]);
- hashes += hash + "\n";
- setState(list, hashes);
-
- let lists = getState("lists");
- if (lists.indexOf(list) == -1) {
- lists += list + "\n";
- setState("lists", lists);
- }
-
- return;
- // gethash count return how many gethash request received.
- // This is used by client to know if a gethash request is triggered by gecko
- } else if ("gethashcount" == request.queryString) {
- var counter = getState("counter");
- responseBody = counter == "" ? "0" : counter;
- } else {
- var body = new BinaryInputStream(request.bodyInputStream);
- var avail;
- var bytes = [];
-
- while ((avail = body.available()) > 0) {
- Array.prototype.push.apply(bytes, body.readByteArray(avail));
- }
-
- var counter = getState("counter");
- counter = counter == "" ? "1" : (parseInt(counter) + 1).toString();
- setState("counter", counter);
-
- responseBody = parseV2Request(bytes);
- }
-
- response.setHeader("Content-Type", "text/plain", false);
- response.write(responseBody);
-
-}
-
-function parseV2Request(bytes) {
- var request = String.fromCharCode.apply(this, bytes);
- var [HEADER, PREFIXES] = request.split("\n");
- var [PREFIXSIZE, LENGTH] = HEADER.split(":").map(val => {
- return parseInt(val);
- });
-
- var ret = "";
- for(var start = 0; start < LENGTH; start += PREFIXSIZE) {
- getState("lists").split("\n").forEach(function(list) {
- var completions = getState(list).split("\n");
-
- for (var completion of completions) {
- if (completion.indexOf(PREFIXES.substr(start, PREFIXSIZE)) == 0) {
- ret += list + ":" + "1" + ":" + "32" + "\n";
- ret += completion;
- }
- }
- });
- }
-
- return ret;
-}
-
-/* Convert Base64 data to a string */
-const toBinaryTable = [
- -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
- -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
- -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, -1,-1,-1,63,
- 52,53,54,55, 56,57,58,59, 60,61,-1,-1, -1, 0,-1,-1,
- -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,
- 15,16,17,18, 19,20,21,22, 23,24,25,-1, -1,-1,-1,-1,
- -1,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
- 41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1
-];
-const base64Pad = '=';
-
-function base64ToString(data) {
- var result = '';
- var leftbits = 0; // number of bits decoded, but yet to be appended
- var leftdata = 0; // bits decoded, but yet to be appended
-
- // Convert one by one.
- for (var i = 0; i < data.length; i++) {
- var c = toBinaryTable[data.charCodeAt(i) & 0x7f];
- var padding = (data[i] == base64Pad);
- // Skip illegal characters and whitespace
- if (c == -1) continue;
-
- // Collect data into leftdata, update bitcount
- leftdata = (leftdata << 6) | c;
- leftbits += 6;
-
- // If we have 8 or more bits, append 8 bits to the result
- if (leftbits >= 8) {
- leftbits -= 8;
- // Append if not padding.
- if (!padding)
- result += String.fromCharCode((leftdata >> leftbits) & 0xff);
- leftdata &= (1 << leftbits) - 1;
- }
- }
-
- // If there are any bits left, the base64 string was corrupted
- if (leftbits)
- throw Components.Exception('Corrupted base64 string');
-
- return result;
-}
diff --git a/toolkit/components/url-classifier/tests/mochitest/gethashFrame.html b/toolkit/components/url-classifier/tests/mochitest/gethashFrame.html
deleted file mode 100644
index 560ddcde6e..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/gethashFrame.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<html>
-<head>
-<title></title>
-
-<script type="text/javascript">
-
-var scriptItem = "untouched";
-
-function checkLoads() {
-
- var title = document.getElementById("title");
- title.innerHTML = window.parent.shouldLoad ?
- "The following should be hidden:" :
- "The following should not be hidden:"
-
- if (window.parent.shouldLoad) {
- window.parent.is(scriptItem, "loaded malware javascript!", "Should load bad javascript");
- } else {
- window.parent.is(scriptItem, "untouched", "Should not load bad javascript");
- }
-
- var elt = document.getElementById("styleImport");
- var style = document.defaultView.getComputedStyle(elt, "");
- window.parent.isnot(style.visibility, "visible", "Should load clean css");
-
- // Make sure the css did not load.
- elt = document.getElementById("styleCheck");
- style = document.defaultView.getComputedStyle(elt, "");
- if (window.parent.shouldLoad) {
- window.parent.isnot(style.visibility, "visible", "Should load bad css");
- } else {
- window.parent.isnot(style.visibility, "hidden", "Should not load bad css");
- }
-
- elt = document.getElementById("styleBad");
- style = document.defaultView.getComputedStyle(elt, "");
- if (window.parent.shouldLoad) {
- window.parent.isnot(style.visibility, "visible", "Should import bad css");
- } else {
- window.parent.isnot(style.visibility, "hidden", "Should not import bad css");
- }
-}
-
-</script>
-
-<!-- Try loading from a malware javascript URI -->
-<script type="text/javascript" src="http://malware.example.com/tests/toolkit/components/url-classifier/tests/mochitest/evil.js"></script>
-
-<!-- Try loading from an uwanted software css URI -->
-<link rel="stylesheet" type="text/css" href="http://unwanted.example.com/tests/toolkit/components/url-classifier/tests/mochitest/evil.css"></link>
-
-<!-- Try loading a marked-as-malware css through an @import from a clean URI -->
-<link rel="stylesheet" type="text/css" href="import.css"></link>
-</head>
-
-<body onload="checkLoads()">
-<div id="title"></div>
-<div id="styleCheck">STYLE EVIL</div>
-<div id="styleBad">STYLE BAD</div>
-<div id="styleImport">STYLE IMPORT</div>
-</body>
-</html>
diff --git a/toolkit/components/url-classifier/tests/mochitest/good.js b/toolkit/components/url-classifier/tests/mochitest/good.js
deleted file mode 100644
index 015b9fe520..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/good.js
+++ /dev/null
@@ -1 +0,0 @@
-scriptItem = "loaded whitelisted javascript!";
diff --git a/toolkit/components/url-classifier/tests/mochitest/import.css b/toolkit/components/url-classifier/tests/mochitest/import.css
deleted file mode 100644
index 9b86c82169..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/import.css
+++ /dev/null
@@ -1,3 +0,0 @@
-/* malware.example.com is in the malware database. */
-@import url("http://malware.example.com/tests/toolkit/components/url-classifier/tests/mochitest/bad.css");
-#styleImport { visibility: hidden; }
diff --git a/toolkit/components/url-classifier/tests/mochitest/mochitest.ini b/toolkit/components/url-classifier/tests/mochitest/mochitest.ini
deleted file mode 100644
index c5679e86be..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/mochitest.ini
+++ /dev/null
@@ -1,39 +0,0 @@
-[DEFAULT]
-support-files =
- classifiedAnnotatedPBFrame.html
- classifierCommon.js
- classifierFrame.html
- classifierHelper.js
- cleanWorker.js
- good.js
- evil.css
- evil.css^headers^
- evil.js
- evil.js^headers^
- evilWorker.js
- import.css
- raptor.jpg
- track.html
- unwantedWorker.js
- vp9.webm
- whitelistFrame.html
- workerFrame.html
- ping.sjs
- basic.vtt
- basic.vtt^headers^
- dnt.html
- dnt.sjs
- update.sjs
- bad.css
- bad.css^headers^
- gethash.sjs
- gethashFrame.html
- seek.webm
-
-[test_classifier.html]
-skip-if = (os == 'linux' && debug) #Bug 1199778
-[test_classifier_worker.html]
-[test_classify_ping.html]
-[test_classify_track.html]
-[test_gethash.html]
-[test_bug1254766.html]
diff --git a/toolkit/components/url-classifier/tests/mochitest/ping.sjs b/toolkit/components/url-classifier/tests/mochitest/ping.sjs
deleted file mode 100644
index 37a78956e0..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/ping.sjs
+++ /dev/null
@@ -1,16 +0,0 @@
-function handleRequest(request, response)
-{
- var query = {};
- request.queryString.split('&').forEach(function (val) {
- var [name, value] = val.split('=');
- query[name] = unescape(value);
- });
-
- if (request.method == "POST") {
- setState(query["id"], "ping");
- } else {
- var value = getState(query["id"]);
- response.setHeader("Content-Type", "text/plain", false);
- response.write(value);
- }
-}
diff --git a/toolkit/components/url-classifier/tests/mochitest/raptor.jpg b/toolkit/components/url-classifier/tests/mochitest/raptor.jpg
deleted file mode 100644
index 243ba9e2d4..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/raptor.jpg
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/url-classifier/tests/mochitest/seek.webm b/toolkit/components/url-classifier/tests/mochitest/seek.webm
deleted file mode 100644
index 72b0297233..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/seek.webm
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/url-classifier/tests/mochitest/test_allowlisted_annotations.html b/toolkit/components/url-classifier/tests/mochitest/test_allowlisted_annotations.html
deleted file mode 100644
index ba9c86f95e..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/test_allowlisted_annotations.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test the URI Classifier</title>
- <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
-</head>
-
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-
-<script class="testbody" type="text/javascript">
-
-var Cc = SpecialPowers.Cc;
-var Ci = SpecialPowers.Ci;
-
-Components.utils.import("resource://testing-common/UrlClassifierTestUtils.jsm");
-
-// Add https://allowlisted.example.com to the permissions manager
-SpecialPowers.addPermission("trackingprotection",
- Ci.nsIPermissionManager.ALLOW_ACTION,
- { url: "https://allowlisted.example.com" });
-
-function clearPermissions() {
- SpecialPowers.removePermission("trackingprotection",
- { url: "https://allowlisted.example.com" });
- ok(!SpecialPowers.testPermission("trackingprotection",
- Ci.nsIPermissionManager.ALLOW_ACTION,
- { url: "https://allowlisted.example.com" }));
-}
-
-SpecialPowers.pushPrefEnv(
- {"set" : [["urlclassifier.trackingTable", "test-track-simple"],
- ["privacy.trackingprotection.enabled", true],
- ["channelclassifier.allowlist_example", true]]},
- test);
-
-function test() {
- SimpleTest.registerCleanupFunction(UrlClassifierTestUtils.cleanupTestTrackers);
- UrlClassifierTestUtils.addTestTrackers().then(() => {
- document.getElementById("testFrame").src = "allowlistAnnotatedFrame.html";
- });
-}
-
-// Expected finish() call is in "allowlistedAnnotatedFrame.html".
-SimpleTest.waitForExplicitFinish();
-
-</script>
-
-</pre>
-<iframe id="testFrame" width="100%" height="100%" onload=""></iframe>
-</body>
-</html>
diff --git a/toolkit/components/url-classifier/tests/mochitest/test_bug1254766.html b/toolkit/components/url-classifier/tests/mochitest/test_bug1254766.html
deleted file mode 100644
index 1c149406ac..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/test_bug1254766.html
+++ /dev/null
@@ -1,305 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Bug 1272239 - Test gethash.</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="classifierHelper.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-
-<script class="testbody" type="text/javascript">
-
-const MALWARE_LIST = "test-malware-simple";
-const MALWARE_HOST1 = "malware.example.com/";
-const MALWARE_HOST2 = "test1.example.com/";
-
-const UNWANTED_LIST = "test-unwanted-simple";
-const UNWANTED_HOST1 = "unwanted.example.com/";
-const UNWANTED_HOST2 = "test2.example.com/";
-
-
-const UNUSED_MALWARE_HOST = "unused.malware.com/";
-const UNUSED_UNWANTED_HOST = "unused.unwanted.com/";
-
-const GETHASH_URL =
- "http://mochi.test:8888/tests/toolkit/components/url-classifier/tests/mochitest/gethash.sjs";
-
-var gPreGethashCounter = 0;
-var gCurGethashCounter = 0;
-
-var expectLoad = false;
-
-function loadTestFrame() {
- return new Promise(function(resolve, reject) {
- var iframe = document.createElement("iframe");
- iframe.setAttribute("src", "gethashFrame.html");
- document.body.appendChild(iframe);
-
- iframe.onload = function() {
- document.body.removeChild(iframe);
- resolve();
- };
- }).then(getGethashCounter);
-}
-
-function getGethashCounter() {
- return new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest;
- xhr.open("PUT", GETHASH_URL + "?gethashcount");
- xhr.setRequestHeader("Content-Type", "text/plain");
- xhr.onreadystatechange = function() {
- if (this.readyState == this.DONE) {
- gPreGethashCounter = gCurGethashCounter;
- gCurGethashCounter = parseInt(xhr.response);
- resolve();
- }
- };
- xhr.send();
- });
-}
-
-// calculate the fullhash and send it to gethash server
-function addCompletionToServer(list, url) {
- return new Promise(function(resolve, reject) {
- var listParam = "list=" + list;
- var fullhashParam = "fullhash=" + hash(url);
-
- var xhr = new XMLHttpRequest;
- xhr.open("PUT", GETHASH_URL + "?" + listParam + "&" + fullhashParam, true);
- xhr.setRequestHeader("Content-Type", "text/plain");
- xhr.onreadystatechange = function() {
- if (this.readyState == this.DONE) {
- resolve();
- }
- };
- xhr.send();
- });
-}
-
-function hash(str) {
- function bytesFromString(str) {
- var converter =
- SpecialPowers.Cc["@mozilla.org/intl/scriptableunicodeconverter"]
- .createInstance(SpecialPowers.Ci.nsIScriptableUnicodeConverter);
- converter.charset = "UTF-8";
- return converter.convertToByteArray(str);
- }
-
- var hasher = SpecialPowers.Cc["@mozilla.org/security/hash;1"]
- .createInstance(SpecialPowers.Ci.nsICryptoHash);
-
- var data = bytesFromString(str);
- hasher.init(hasher.SHA256);
- hasher.update(data, data.length);
-
- return hasher.finish(true);
-}
-
-// setup function allows classifier send gethash request for test database
-// also it calculate to fullhash for url and store those hashes in gethash sjs.
-function setup() {
- classifierHelper.allowCompletion([MALWARE_LIST, UNWANTED_LIST], GETHASH_URL);
-
- return Promise.all([
- addCompletionToServer(MALWARE_LIST, MALWARE_HOST1),
- addCompletionToServer(MALWARE_LIST, MALWARE_HOST2),
- addCompletionToServer(UNWANTED_LIST, UNWANTED_HOST1),
- addCompletionToServer(UNWANTED_LIST, UNWANTED_HOST2),
- ]);
-}
-
-// Reset function in helper try to simulate the behavior we restart firefox
-function reset() {
- return classifierHelper.resetDB()
- .catch(err => {
- ok(false, "Couldn't update classifier. Error code: " + errorCode);
- // Abort test.
- SimpleTest.finish();
- });
-}
-
-function updateUnusedUrl() {
- var testData = [
- { url: UNUSED_MALWARE_HOST, db: MALWARE_LIST },
- { url: UNUSED_UNWANTED_HOST, db: UNWANTED_LIST }
- ];
-
- return classifierHelper.addUrlToDB(testData)
- .catch(err => {
- ok(false, "Couldn't update classifier. Error code: " + err);
- // Abort test.
- SimpleTest.finish();
- });
-}
-
-function addPrefixToDB() {
- return update(true);
-}
-
-function addCompletionToDB() {
- return update(false);
-}
-
-function update(prefix = false) {
- var length = prefix ? 4 : 32;
- var testData = [
- { url: MALWARE_HOST1, db: MALWARE_LIST, len: length },
- { url: MALWARE_HOST2, db: MALWARE_LIST, len: length },
- { url: UNWANTED_HOST1, db: UNWANTED_LIST, len: length },
- { url: UNWANTED_HOST2, db: UNWANTED_LIST, len: length }
- ];
-
- return classifierHelper.addUrlToDB(testData)
- .catch(err => {
- ok(false, "Couldn't update classifier. Error code: " + errorCode);
- // Abort test.
- SimpleTest.finish();
- });
-}
-
-// This testcase is to make sure gethash works:
-// 1. Add prefixes to DB.
-// 2. Load test frame contains malware & unwanted url, those urls should be blocked.
-// 3. The second step should also trigger a gethash request since completions is not in
-// either cache or DB.
-// 4. Load test frame again, since completions is stored in cache now, no gethash
-// request should be triggered.
-function testGethash() {
- return Promise.resolve()
- .then(addPrefixToDB)
- .then(loadTestFrame)
- .then(() => {
- ok(gCurGethashCounter > gPreGethashCounter, "Gethash request is triggered."); })
- .then(loadTestFrame)
- .then(() => {
- ok(gCurGethashCounter == gPreGethashCounter, "Gethash request is not triggered."); })
- .then(reset);
-}
-
-// This testcase is to make sure an update request will clear completion cache:
-// 1. Add prefixes to DB.
-// 2. Load test frame, this should trigger a gethash request
-// 3. Trigger an update, completion cache should be cleared now.
-// 4. Load test frame again, since cache is cleared now, gethash request should be triggered.
-function testUpdateClearCache() {
- return Promise.resolve()
- .then(addPrefixToDB)
- .then(loadTestFrame)
- .then(() => {
- ok(gCurGethashCounter > gPreGethashCounter, "Gethash request is triggered."); })
- .then(updateUnusedUrl)
- .then(loadTestFrame)
- .then(() => {
- ok(gCurGethashCounter > gPreGethashCounter, "Gethash request is triggered."); })
- .then(reset);
-}
-
-// This testcae is to make sure completions in update works:
-// 1. Add completions to DB.
-// 2. Load test frame, since completions is stored in DB, gethash request should
-// not be triggered.
-function testUpdate() {
- return Promise.resolve()
- .then(addCompletionToDB)
- .then(loadTestFrame)
- .then(() => {
- ok(gCurGethashCounter == gPreGethashCounter, "Gethash request is not triggered."); })
- .then(reset);
-}
-
-// This testcase is to make sure an update request will not clear completions in DB:
-// 1. Add completions to DB.
-// 2. Load test frame to make sure completions is stored in database, in this case, gethash
-// should not be triggered.
-// 3. Trigger an update, cache is cleared, but completions in DB should still remain.
-// 4. Load test frame again, since completions is in DB, gethash request should not be triggered.
-function testUpdateNotClearCompletions() {
- return Promise.resolve()
- .then(addCompletionToDB)
- .then(loadTestFrame)
- .then(() => {
- ok(gCurGethashCounter == gPreGethashCounter, "Gethash request is not triggered."); })
- .then(updateUnusedUrl)
- .then(loadTestFrame)
- .then(() => {
- ok(gCurGethashCounter == gPreGethashCounter, "Gethash request is not triggered."); })
- .then(reset);
-}
-
-// This testcase is to make sure completion store in DB will properly load after restarting.
-// 1. Add completions to DB.
-// 2. Simulate firefox restart by calling reloadDatabase.
-// 3. Load test frame, since completions should be loaded from DB, no gethash request should
-// be triggered.
-function testUpdateCompletionsAfterReload() {
- return Promise.resolve()
- .then(addCompletionToDB)
- .then(classifierHelper.reloadDatabase)
- .then(loadTestFrame)
- .then(() => {
- ok(gCurGethashCounter == gPreGethashCounter, "Gethash request is not triggered."); })
- .then(reset);
-}
-
-// This testcase is to make sure cache will be cleared after restarting
-// 1. Add prefixes to DB.
-// 2. Load test frame, this should trigger a gethash request and completions will be stored in
-// cache.
-// 3. Load test frame again, no gethash should be triggered because of cache.
-// 4. Simulate firefox restart by calling reloadDatabase.
-// 5. Load test frame again, since cache is cleared, gethash request should be triggered.
-function testGethashCompletionsAfterReload() {
- return Promise.resolve()
- .then(addPrefixToDB)
- .then(loadTestFrame)
- .then(() => {
- ok(gCurGethashCounter > gPreGethashCounter, "Gethash request is triggered."); })
- .then(loadTestFrame)
- .then(() => {
- ok(gCurGethashCounter == gPreGethashCounter, "Gethash request is not triggered."); })
- .then(classifierHelper.reloadDatabase)
- .then(loadTestFrame)
- .then(() => {
- ok(gCurGethashCounter > gPreGethashCounter, "Gethash request is triggered."); })
- .then(reset);
-}
-
-function runTest() {
- Promise.resolve()
- .then(classifierHelper.waitForInit)
- .then(setup)
- .then(testGethash)
- .then(testUpdateClearCache)
- .then(testUpdate)
- .then(testUpdateNotClearCompletions)
- .then(testUpdateCompletionsAfterReload)
- .then(testGethashCompletionsAfterReload)
- .then(function() {
- SimpleTest.finish();
- }).catch(function(e) {
- ok(false, "Some test failed with error " + e);
- SimpleTest.finish();
- });
-}
-
-SimpleTest.waitForExplicitFinish();
-
-// 'network.predictor.enabled' is disabled because if other testcase load
-// evil.js, evil.css ...etc resources, it may cause we load them from cache
-// directly and bypass classifier check
-SpecialPowers.pushPrefEnv({"set": [
- ["browser.safebrowsing.malware.enabled", true],
- ["network.predictor.enabled", false],
- ["urlclassifier.gethash.timeout_ms", 30000],
-]}, runTest);
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/url-classifier/tests/mochitest/test_classified_annotations.html b/toolkit/components/url-classifier/tests/mochitest/test_classified_annotations.html
deleted file mode 100644
index 5814fff000..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/test_classified_annotations.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test the URI Classifier</title>
- <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
-</head>
-
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-
-<script class="testbody" type="text/javascript">
-
-var Cc = SpecialPowers.Cc;
-var Ci = SpecialPowers.Ci;
-
-Components.utils.import("resource://testing-common/UrlClassifierTestUtils.jsm");
-
-function cleanup() {
- SpecialPowers.clearUserPref("privacy.trackingprotection.enabled");
- SpecialPowers.clearUserPref("channelclassifier.allowlist_example");
-}
-
-SpecialPowers.pushPrefEnv(
- {"set" : [["urlclassifier.trackingTable", "test-track-simple"]]},
- test);
-
-function test() {
- UrlClassifierTestUtils.addTestTrackers().then(() => {
- SpecialPowers.setBoolPref("privacy.trackingprotection.enabled", true);
- // Make sure chrome:// URIs are processed. This does not white-list
- // any URIs unless 'https://allowlisted.example.com' is added in the
- // permission manager (see test_allowlisted_annotations.html)
- SpecialPowers.setBoolPref("channelclassifier.allowlist_example", true);
- document.getElementById("testFrame").src = "classifiedAnnotatedFrame.html";
- });
-}
-
-// Expected finish() call is in "classifiedAnnotatedFrame.html".
-SimpleTest.waitForExplicitFinish();
-
-</script>
-
-</pre>
-<iframe id="testFrame" width="100%" height="100%" onload=""></iframe>
-</body>
-</html>
diff --git a/toolkit/components/url-classifier/tests/mochitest/test_classifier.html b/toolkit/components/url-classifier/tests/mochitest/test_classifier.html
deleted file mode 100644
index 9533db426e..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/test_classifier.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test the URI Classifier</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="classifierHelper.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-
-<script class="testbody" type="text/javascript">
-
-var firstLoad = true;
-
-// Add some URLs to the malware database.
-var testData = [
- { url: "malware.example.com/",
- db: "test-malware-simple"
- },
- { url: "unwanted.example.com/",
- db: "test-unwanted-simple"
- }
-];
-
-function loadTestFrame() {
- document.getElementById("testFrame").src = "classifierFrame.html";
-}
-
-// Expected finish() call is in "classifierFrame.html".
-SimpleTest.waitForExplicitFinish();
-
-function updateSuccess() {
- SpecialPowers.pushPrefEnv(
- {"set" : [["browser.safebrowsing.malware.enabled", true]]},
- loadTestFrame);
-}
-
-function updateError(errorCode) {
- ok(false, "Couldn't update classifier. Error code: " + errorCode);
- // Abort test.
- SimpleTest.finish();
-}
-
-SpecialPowers.pushPrefEnv(
- {"set" : [["urlclassifier.malwareTable", "test-malware-simple,test-unwanted-simple"],
- ["urlclassifier.phishTable", "test-phish-simple"]]},
- function() {
- classifierHelper.waitForInit()
- .then(() => classifierHelper.addUrlToDB(testData))
- .then(updateSuccess)
- .catch(err => {
- updateError(err);
- });
- });
-
-</script>
-
-</pre>
-<iframe id="testFrame" onload=""></iframe>
-</body>
-</html>
diff --git a/toolkit/components/url-classifier/tests/mochitest/test_classifier_changetablepref.html b/toolkit/components/url-classifier/tests/mochitest/test_classifier_changetablepref.html
deleted file mode 100644
index 7423d3e8ef..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/test_classifier_changetablepref.html
+++ /dev/null
@@ -1,149 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Bug 1281083 - Changing the urlclassifier.*Table prefs doesn't take effect before the next browser restart.</title>
- <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="classifierHelper.js"></script>
- <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
-</head>
-
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-
-<script class="testbody" type="text/javascript">
-
-const testTable = "moz-track-digest256";
-const UPDATE_URL = "http://mochi.test:8888/tests/toolkit/components/url-classifier/tests/mochitest/update.sjs";
-
-var Cc = SpecialPowers.Cc;
-var Ci = SpecialPowers.Ci;
-
-var prefService = Cc["@mozilla.org/preferences-service;1"]
- .getService(Ci.nsIPrefService);
-
-var timer = Cc["@mozilla.org/timer;1"]
- .createInstance(Ci.nsITimer);
-
-// If default preference contain the table we want to test,
-// We should change test table to a different one.
-var trackingTables = SpecialPowers.getCharPref("urlclassifier.trackingTable").split(",");
-ok(!trackingTables.includes(testTable), "test table should not be in the preference");
-
-var listmanager = Cc["@mozilla.org/url-classifier/listmanager;1"].
- getService(Ci.nsIUrlListManager);
-
-is(listmanager.getGethashUrl(testTable), "",
- "gethash url for test table should be empty before setting to preference");
-
-function loadTestFrame() {
- // gethash url of test table "moz-track-digest256" should be updated
- // after setting preference.
- var url = listmanager.getGethashUrl(testTable);
- var expected = SpecialPowers.getCharPref("browser.safebrowsing.provider.mozilla.gethashURL");
-
- is(url, expected, testTable + " matches its gethash url");
-
- // Trigger update
- listmanager.disableUpdate(testTable);
- listmanager.enableUpdate(testTable);
- listmanager.maybeToggleUpdateChecking();
-
- // We wait until "nextupdattime" was set as a signal that update is complete.
- waitForUpdateSuccess(function() {
- document.getElementById("testFrame").src = "bug_1281083.html";
- });
-}
-
-function waitForUpdateSuccess(callback) {
- let nextupdatetime =
- SpecialPowers.getCharPref("browser.safebrowsing.provider.mozilla.nextupdatetime");
-
- if (nextupdatetime !== "1") {
- callback();
- return;
- }
-
- timer.initWithCallback(function() {
- waitForUpdateSuccess(callback);
- }, 10, Components.interfaces.nsITimer.TYPE_ONE_SHOT);
-}
-
-function addCompletionToServer(list, url) {
- return new Promise(function(resolve, reject) {
- var listParam = "list=" + list;
- var fullhashParam = "fullhash=" + hash(url);
-
- var xhr = new XMLHttpRequest;
- xhr.open("PUT", UPDATE_URL + "?" +
- listParam + "&" +
- fullhashParam, true);
- xhr.setRequestHeader("Content-Type", "text/plain");
- xhr.onreadystatechange = function() {
- if (this.readyState == this.DONE) {
- resolve();
- }
- };
- xhr.send();
- });
-}
-
-function hash(str) {
- function bytesFromString(str) {
- var converter =
- SpecialPowers.Cc["@mozilla.org/intl/scriptableunicodeconverter"]
- .createInstance(SpecialPowers.Ci.nsIScriptableUnicodeConverter);
- converter.charset = "UTF-8";
- return converter.convertToByteArray(str);
- }
-
- var hasher = SpecialPowers.Cc["@mozilla.org/security/hash;1"]
- .createInstance(SpecialPowers.Ci.nsICryptoHash);
-
- var data = bytesFromString(str);
- hasher.init(hasher.SHA256);
- hasher.update(data, data.length);
-
- return hasher.finish(true);
-}
-
-function runTest() {
- /**
- * In this test we try to modify only urlclassifier.*Table preference to see if
- * url specified in the table will be blocked after update.
- */
- var pushPrefPromise = SpecialPowers.pushPrefEnv(
- {"set" : [["urlclassifier.trackingTable", testTable]]});
-
- // To make sure url is not blocked by an already blocked url.
- // Here we use non-tracking.example.com as a tracked url.
- // Since this table is only used in this bug, so it won't affect other testcases.
- var addCompletePromise =
- addCompletionToServer(testTable, "bug1281083.example.com/");
-
- Promise.all([pushPrefPromise, addCompletePromise])
- .then(() => {
- loadTestFrame();
- });
-}
-
-// Set nextupdatetime to 1 to trigger an update
-SpecialPowers.pushPrefEnv(
- {"set" : [["privacy.trackingprotection.enabled", true],
- ["channelclassifier.allowlist_example", true],
- ["browser.safebrowsing.provider.mozilla.nextupdatetime", "1"],
- ["browser.safebrowsing.provider.mozilla.lists", testTable],
- ["browser.safebrowsing.provider.mozilla.updateURL", UPDATE_URL]]},
- runTest);
-
-// Expected finish() call is in "bug_1281083.html".
-SimpleTest.waitForExplicitFinish();
-
-</script>
-</pre>
-<iframe id="testFrame" width="100%" height="100%" onload=""></iframe>
-</body>
-</html>
-
diff --git a/toolkit/components/url-classifier/tests/mochitest/test_classifier_worker.html b/toolkit/components/url-classifier/tests/mochitest/test_classifier_worker.html
deleted file mode 100644
index 1f54d45b05..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/test_classifier_worker.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test the URI Classifier</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="classifierHelper.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-
-<script class="testbody" type="text/javascript">
-
-// Add some URLs to the malware database.
-var testData = [
- { url: "example.com/tests/toolkit/components/url-classifier/tests/mochitest/evilWorker.js",
- db: "test-malware-simple"
- },
- { url: "example.com/tests/toolkit/components/url-classifier/tests/mochitest/unwantedWorker.js",
- db: "test-unwanted-simple"
- }
-];
-
-function loadTestFrame() {
- document.getElementById("testFrame").src =
- "http://example.com/tests/toolkit/components/url-classifier/tests/mochitest/workerFrame.html";
-}
-
-function onmessage(event)
-{
- var pieces = event.data.split(':');
- if (pieces[0] == "finish") {
- SimpleTest.finish();
- return;
- }
-
- is(pieces[0], "success", pieces[1]);
-}
-
-function updateSuccess() {
- SpecialPowers.pushPrefEnv(
- {"set" : [["browser.safebrowsing.malware.enabled", true]]},
- loadTestFrame);
-}
-
-function updateError(errorCode) {
- ok(false, "Couldn't update classifier. Error code: " + errorCode);
- // Abort test.
- SimpleTest.finish();
-};
-
-SpecialPowers.pushPrefEnv(
- {"set" : [["urlclassifier.malwareTable", "test-malware-simple,test-unwanted-simple"],
- ["urlclassifier.phishTable", "test-phish-simple"]]},
- function() {
- classifierHelper.waitForInit()
- .then(() => classifierHelper.addUrlToDB(testData))
- .then(updateSuccess)
- .catch(err => {
- updateError(err);
- });
- });
-
-window.addEventListener("message", onmessage, false);
-
-SimpleTest.waitForExplicitFinish();
-
-</script>
-
-</pre>
-<iframe id="testFrame" onload=""></iframe>
-</body>
-</html>
diff --git a/toolkit/components/url-classifier/tests/mochitest/test_classify_ping.html b/toolkit/components/url-classifier/tests/mochitest/test_classify_ping.html
deleted file mode 100644
index 96fa2891a7..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/test_classify_ping.html
+++ /dev/null
@@ -1,121 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Bug 1233914 - ping doesn't honor the TP list here.</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-
-<script class="testbody" type="text/javascript">
- SimpleTest.requestFlakyTimeout("Delay to make sure ping is made prior than XHR");
-
- const timeout = 200;
- const host_nottrack = "http://not-tracking.example.com/";
- const host_track = "http://trackertest.org/";
- const path_ping = "tests/toolkit/components/url-classifier/tests/mochitest/ping.sjs";
- const TP_ENABLE_PREF = "privacy.trackingprotection.enabled";
-
- function testPingNonBlacklist() {
- SpecialPowers.setBoolPref(TP_ENABLE_PREF, true);
-
- var msg = "ping should reach page not in blacklist";
- var expectPing = true;
- var id = "1111";
- ping(id, host_nottrack);
-
- return new Promise(function(resolve, reject) {
- setTimeout(function() {
- isPinged(id, expectPing, msg, resolve);
- }, timeout);
- });
- }
-
- function testPingBlacklistSafebrowsingOff() {
- SpecialPowers.setBoolPref(TP_ENABLE_PREF, false);
-
- var msg = "ping should reach page in blacklist when tracking protection is off";
- var expectPing = true;
- var id = "2222";
- ping(id, host_track);
-
- return new Promise(function(resolve, reject) {
- setTimeout(function() {
- isPinged(id, expectPing, msg, resolve);
- }, timeout);
- });
- }
-
- function testPingBlacklistSafebrowsingOn() {
- SpecialPowers.setBoolPref(TP_ENABLE_PREF, true);
-
- var msg = "ping should not reach page in blacklist when tracking protection is on";
- var expectPing = false;
- var id = "3333";
- ping(id, host_track);
-
- return new Promise(function(resolve, reject) {
- setTimeout(function() {
- isPinged(id, expectPing, msg, resolve);
- }, timeout);
- });
- }
-
- function ping(id, host) {
- var elm = document.createElement("a");
- elm.setAttribute('ping', host + path_ping + "?id=" + id);
- elm.setAttribute('href', "#");
- document.body.appendChild(elm);
-
- // Trigger ping.
- elm.click();
-
- document.body.removeChild(elm);
- }
-
- function isPinged(id, expected, msg, callback) {
- var url = "http://mochi.test:8888/" + path_ping;
- var xhr = new XMLHttpRequest();
- xhr.open('GET', url + "?id=" + id);
- xhr.onload = function() {
- var isPinged = xhr.response === "ping";
- is(expected, isPinged, msg);
-
- callback();
- };
- xhr.send();
- }
-
- function cleanup() {
- SpecialPowers.clearUserPref(TP_ENABLE_PREF);
- }
-
- function runTest() {
- Promise.resolve()
- .then(testPingNonBlacklist)
- .then(testPingBlacklistSafebrowsingOff)
- .then(testPingBlacklistSafebrowsingOn)
- .then(function() {
- SimpleTest.finish();
- }).catch(function(e) {
- ok(false, "Some test failed with error " + e);
- SimpleTest.finish();
- });
- }
-
- SimpleTest.waitForExplicitFinish();
- SimpleTest.registerCleanupFunction(cleanup);
- SpecialPowers.pushPrefEnv({"set": [
- ["browser.send_pings", true],
- ["urlclassifier.trackingTable", "test-track-simple"],
- ]}, runTest);
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/url-classifier/tests/mochitest/test_classify_track.html b/toolkit/components/url-classifier/tests/mochitest/test_classify_track.html
deleted file mode 100644
index a868d79602..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/test_classify_track.html
+++ /dev/null
@@ -1,162 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Bug 1262406 - Track element doesn't use the URL classifier.</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="classifierHelper.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-
-<script class="testbody" type="text/javascript">
- const PREF = "browser.safebrowsing.malware.enabled";
- const track_path = "tests/toolkit/components/url-classifier/tests/mochitest/basic.vtt";
- const malware_url = "http://malware.example.com/" + track_path;
- const validtrack_url = "http://mochi.test:8888/" + track_path;
-
- var video = document.createElement("video");
- video.src = "seek.webm";
- video.crossOrigin = "anonymous";
-
- document.body.appendChild(video);
-
- function testValidTrack() {
- SpecialPowers.setBoolPref(PREF, true);
-
- return new Promise(function(resolve, reject) {
- var track = document.createElement("track");
- track.src = validtrack_url;
- video.appendChild(track);
-
- function onload() {
- ok(true, "Track should be loaded when url is not in blacklist");
- finish();
- }
-
- function onerror() {
- ok(false, "Error while loading track");
- finish();
- }
-
- function finish() {
- track.removeEventListener("load", onload);
- track.removeEventListener("error", onerror)
- resolve();
- }
-
- track.addEventListener("load", onload);
- track.addEventListener("error", onerror)
- });
- }
-
- function testBlacklistTrackSafebrowsingOff() {
- SpecialPowers.setBoolPref(PREF, false);
-
- return new Promise(function(resolve, reject) {
- var track = document.createElement("track");
- track.src = malware_url;
- video.appendChild(track);
-
- function onload() {
- ok(true, "Track should be loaded when url is in blacklist and safebrowsing is off");
- finish();
- }
-
- function onerror() {
- ok(false, "Error while loading track");
- finish();
- }
-
- function finish() {
- track.removeEventListener("load", onload);
- track.removeEventListener("error", onerror)
- resolve();
- }
-
- track.addEventListener("load", onload);
- track.addEventListener("error", onerror)
- });
- }
-
- function testBlacklistTrackSafebrowsingOn() {
- SpecialPowers.setBoolPref(PREF, true);
-
- return new Promise(function(resolve, reject) {
- var track = document.createElement("track");
-
- // Add a query string parameter here to avoid url classifier bypass classify
- // because of cache.
- track.src = malware_url + "?testsbon";
- video.appendChild(track);
-
- function onload() {
- ok(false, "Unexpected result while loading track in blacklist");
- finish();
- }
-
- function onerror() {
- ok(true, "Track should not be loaded when url is in blacklist and safebrowsing is on");
- finish();
- }
-
- function finish() {
- track.removeEventListener("load", onload);
- track.removeEventListener("error", onerror)
- resolve();
- }
-
- track.addEventListener("load", onload);
- track.addEventListener("error", onerror)
- });
- }
-
- function cleanup() {
- SpecialPowers.clearUserPref(PREF);
- }
-
- function setup() {
- var testData = [
- { url: "malware.example.com/",
- db: "test-malware-simple"
- }
- ];
-
- return classifierHelper.addUrlToDB(testData)
- .catch(function(err) {
- ok(false, "Couldn't update classifier. Error code: " + err);
- // Abort test.
- SimpleTest.finish();
- });
- }
-
- function runTest() {
- Promise.resolve()
- .then(classifierHelper.waitForInit)
- .then(setup)
- .then(testValidTrack)
- .then(testBlacklistTrackSafebrowsingOff)
- .then(testBlacklistTrackSafebrowsingOn)
- .then(function() {
- SimpleTest.finish();
- }).catch(function(e) {
- ok(false, "Some test failed with error " + e);
- SimpleTest.finish();
- });
- }
-
- SimpleTest.waitForExplicitFinish();
- SimpleTest.registerCleanupFunction(cleanup);
- SpecialPowers.pushPrefEnv({"set": [
- ["media.webvtt.regions.enabled", true],
- ["urlclassifier.malwareTable", "test-malware-simple"],
- ]}, runTest);
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/url-classifier/tests/mochitest/test_donottrack.html b/toolkit/components/url-classifier/tests/mochitest/test_donottrack.html
deleted file mode 100644
index 56003e7eb6..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/test_donottrack.html
+++ /dev/null
@@ -1,150 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Bug 1258033 - Fix the DNT loophole for tracking protection</title>
- <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
-</head>
-
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-
-<script class="testbody" type="text/javascript">
-
-var Cc = SpecialPowers.Cc;
-var Ci = SpecialPowers.Ci;
-
-var mainWindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIDocShellTreeItem)
- .rootTreeItem
- .QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindow);
-
-const tests = [
- // DNT turned on and TP turned off, DNT signal sent in both private browsing
- // and normal mode.
- {
- setting: {dntPref:true, tpPref:false, tppbPref:false, pbMode:true},
- expected: {dnt: "1"},
- },
- {
- setting: {dntPref:true, tpPref:false, tppbPref:false, pbMode:false},
- expected: {dnt: "1"}
- },
- // DNT turned off and TP turned on globally, DNT signal sent in both private
- // browsing and normal mode.
- {
- setting: {dntPref:false, tpPref:true, tppbPref:false, pbMode:true},
- expected: {dnt: "1"}
- },
- {
- setting: {dntPref:false, tpPref:true, tppbPref:false, pbMode:false},
- expected: {dnt: "1"}
- },
- // DNT turned off and TP in Private Browsing only, DNT signal sent in private
- // browsing mode only.
- {
- setting: {dntPref:false, tpPref:false, tppbPref:true, pbMode:true},
- expected: {dnt: "1"}
- },
- {
- setting: {dntPref:false, tpPref:false, tppbPref:true, pbMode:false},
- expected: {dnt: "unspecified"}
- },
- // DNT turned off and TP turned off, DNT signal is never sent.
- {
- setting: {dntPref:false, tpPref:false, tppbPref:false, pbMode:true},
- expected: {dnt: "unspecified"}
- },
- {
- setting: {dntPref:false, tpPref:false, tppbPref:false, pbMode:false},
- expected: {dnt: "unspecified"}
- },
-]
-
-const DNT_PREF = 'privacy.donottrackheader.enabled';
-const TP_PREF = 'privacy.trackingprotection.enabled';
-const TP_PB_PREF = 'privacy.trackingprotection.pbmode.enabled';
-
-const contentPage =
- "http://mochi.test:8888/tests/toolkit/components/url-classifier/tests/mochitest/dnt.html";
-
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-function whenDelayedStartupFinished(aWindow, aCallback) {
- Services.obs.addObserver(function observer(aSubject, aTopic) {
- if (aWindow == aSubject) {
- Services.obs.removeObserver(observer, aTopic);
- setTimeout(aCallback, 0);
- }
- }, "browser-delayed-startup-finished", false);
-}
-
-function executeTest(test) {
- SpecialPowers.pushPrefEnv({"set" : [
- [DNT_PREF, test.setting.dntPref],
- [TP_PREF, test.setting.tpPref],
- [TP_PB_PREF, test.setting.tppbPref]
- ]});
-
- var win = mainWindow.OpenBrowserWindow({private: test.setting.pbMode});
-
- return new Promise(function(resolve, reject) {
- win.addEventListener("load", function onLoad() {
- win.removeEventListener("load", onLoad, false);
- whenDelayedStartupFinished(win, function() {
- win.addEventListener("DOMContentLoaded", function onInnerLoad() {
- if (win.content.location.href != contentPage) {
- win.gBrowser.loadURI(contentPage);
- return;
- }
-
- win.removeEventListener("DOMContentLoaded", onInnerLoad, true);
-
- win.content.addEventListener('message', function (event) {
- let [key, value] = event.data.split("=");
- if (key == "finish") {
- win.close();
- resolve();
- } else if (key == "navigator.doNotTrack") {
- is(value, test.expected.dnt, "navigator.doNotTrack should be " + test.expected.dnt);
- } else if (key == "DNT") {
- let msg = test.expected.dnt == "1" ? "" : "not ";
- is(value, test.expected.dnt, "DNT header should " + msg + "be sent");
- } else {
- ok(false, "unexpected message");
- }
- });
- }, true);
- SimpleTest.executeSoon(function() { win.gBrowser.loadURI(contentPage); });
- });
- }, true);
- });
-}
-
-let loop = function loop(index) {
- if (index >= tests.length) {
- SimpleTest.finish();
- return;
- }
-
- let test = tests[index];
- let next = function next() {
- loop(index + 1);
- };
- let result = executeTest(test);
- result.then(next, next);
-};
-
-SimpleTest.waitForExplicitFinish();
-loop(0);
-
-</script>
-
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/url-classifier/tests/mochitest/test_gethash.html b/toolkit/components/url-classifier/tests/mochitest/test_gethash.html
deleted file mode 100644
index af995e2a54..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/test_gethash.html
+++ /dev/null
@@ -1,157 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Bug 1272239 - Test gethash.</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="classifierHelper.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-<iframe id="testFrame1" onload=""></iframe>
-<iframe id="testFrame2" onload=""></iframe>
-
-<script class="testbody" type="text/javascript">
-
-const MALWARE_LIST = "test-malware-simple";
-const MALWARE_HOST = "malware.example.com/";
-
-const UNWANTED_LIST = "test-unwanted-simple";
-const UNWANTED_HOST = "unwanted.example.com/";
-
-const GETHASH_URL = "http://mochi.test:8888/tests/toolkit/components/url-classifier/tests/mochitest/gethash.sjs";
-const NOTEXIST_URL = "http://mochi.test:8888/tests/toolkit/components/url-classifier/tests/mochitest/nonexistserver.sjs";
-
-var shouldLoad = false;
-
-// In this testcase we store prefixes to localdb and send the fullhash to gethash server.
-// When access the test page gecko should trigger gethash request to server and
-// get the completion response.
-function loadTestFrame(id) {
- return new Promise(function(resolve, reject) {
-
- var iframe = document.getElementById(id);
- iframe.setAttribute("src", "gethashFrame.html");
-
- iframe.onload = function() {
- resolve();
- };
- });
-}
-
-// add 4-bytes prefixes to local database, so when we access the url,
-// it will trigger gethash request.
-function addPrefixToDB(list, url) {
- var testData = [{ db: list, url: url, len: 4 }];
-
- return classifierHelper.addUrlToDB(testData)
- .catch(function(err) {
- ok(false, "Couldn't update classifier. Error code: " + err);
- // Abort test.
- SimpleTest.finish();
- });
-}
-
-// calculate the fullhash and send it to gethash server
-function addCompletionToServer(list, url) {
- return new Promise(function(resolve, reject) {
- var listParam = "list=" + list;
- var fullhashParam = "fullhash=" + hash(url);
-
- var xhr = new XMLHttpRequest;
- xhr.open("PUT", GETHASH_URL + "?" +
- listParam + "&" +
- fullhashParam, true);
- xhr.setRequestHeader("Content-Type", "text/plain");
- xhr.onreadystatechange = function() {
- if (this.readyState == this.DONE) {
- resolve();
- }
- };
- xhr.send();
- });
-}
-
-function hash(str) {
- function bytesFromString(str) {
- var converter =
- SpecialPowers.Cc["@mozilla.org/intl/scriptableunicodeconverter"]
- .createInstance(SpecialPowers.Ci.nsIScriptableUnicodeConverter);
- converter.charset = "UTF-8";
- return converter.convertToByteArray(str);
- }
-
- var hasher = SpecialPowers.Cc["@mozilla.org/security/hash;1"]
- .createInstance(SpecialPowers.Ci.nsICryptoHash);
-
- var data = bytesFromString(str);
- hasher.init(hasher.SHA256);
- hasher.update(data, data.length);
-
- return hasher.finish(true);
-}
-
-function setup404() {
- shouldLoad = true;
-
- classifierHelper.allowCompletion([MALWARE_LIST, UNWANTED_LIST], NOTEXIST_URL);
-
- return Promise.all([
- addPrefixToDB(MALWARE_LIST, MALWARE_HOST),
- addPrefixToDB(UNWANTED_LIST, UNWANTED_HOST)
- ]);
-}
-
-function setup() {
- classifierHelper.allowCompletion([MALWARE_LIST, UNWANTED_LIST], GETHASH_URL);
-
- return Promise.all([
- addPrefixToDB(MALWARE_LIST, MALWARE_HOST),
- addPrefixToDB(UNWANTED_LIST, UNWANTED_HOST),
- addCompletionToServer(MALWARE_LIST, MALWARE_HOST),
- addCompletionToServer(UNWANTED_LIST, UNWANTED_HOST),
- ]);
-}
-
-// manually reset DB to make sure next test won't be affected by cache.
-function reset() {
- return classifierHelper.resetDB;
-}
-
-function runTest() {
- Promise.resolve()
- // This test resources get blocked when gethash returns successfully
- .then(classifierHelper.waitForInit)
- .then(setup)
- .then(() => loadTestFrame("testFrame1"))
- .then(reset)
- // This test resources are not blocked when gethash returns an error
- .then(setup404)
- .then(() => loadTestFrame("testFrame2"))
- .then(function() {
- SimpleTest.finish();
- }).catch(function(e) {
- ok(false, "Some test failed with error " + e);
- SimpleTest.finish();
- });
-}
-
-SimpleTest.waitForExplicitFinish();
-
-// 'network.predictor.enabled' is disabled because if other testcase load
-// evil.js, evil.css ...etc resources, it may cause we load them from cache
-// directly and bypass classifier check
-SpecialPowers.pushPrefEnv({"set": [
- ["browser.safebrowsing.malware.enabled", true],
- ["network.predictor.enabled", false],
- ["urlclassifier.gethash.timeout_ms", 30000],
-]}, runTest);
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/url-classifier/tests/mochitest/test_lookup_system_principal.html b/toolkit/components/url-classifier/tests/mochitest/test_lookup_system_principal.html
deleted file mode 100644
index fa61e6a00b..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/test_lookup_system_principal.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test that lookup() on a system principal doesn't crash</title>
- <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
-</head>
-
-<body>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-
-<script type="text/javascript">
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-
-var dbService = Cc["@mozilla.org/url-classifier/dbservice;1"]
- .getService(Ci.nsIUrlClassifierDBService);
-
-dbService.lookup(document.nodePrincipal, "", function(arg) {});
-
-ok(true, "lookup() didn't crash");
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/url-classifier/tests/mochitest/test_privatebrowsing_trackingprotection.html b/toolkit/components/url-classifier/tests/mochitest/test_privatebrowsing_trackingprotection.html
deleted file mode 100644
index 02ef57b467..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/test_privatebrowsing_trackingprotection.html
+++ /dev/null
@@ -1,154 +0,0 @@
-<!DOCTYPE HTML>
-<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
-<html>
-<head>
- <title>Test Tracking Protection in Private Browsing mode</title>
- <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
-</head>
-
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-
-<script class="testbody" type="text/javascript">
-
-var Cc = SpecialPowers.Cc;
-var Ci = SpecialPowers.Ci;
-
-var mainWindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIDocShellTreeItem)
- .rootTreeItem
- .QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindow);
-var contentPage = "http://www.itisatrap.org/tests/toolkit/components/url-classifier/tests/mochitest/classifiedAnnotatedPBFrame.html";
-
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://testing-common/UrlClassifierTestUtils.jsm");
-
-function whenDelayedStartupFinished(aWindow, aCallback) {
- Services.obs.addObserver(function observer(aSubject, aTopic) {
- if (aWindow == aSubject) {
- Services.obs.removeObserver(observer, aTopic);
- setTimeout(aCallback, 0);
- }
- }, "browser-delayed-startup-finished", false);
-}
-
-function testOnWindow(aPrivate, aCallback) {
- var win = mainWindow.OpenBrowserWindow({private: aPrivate});
- win.addEventListener("load", function onLoad() {
- win.removeEventListener("load", onLoad, false);
- whenDelayedStartupFinished(win, function() {
- win.addEventListener("DOMContentLoaded", function onInnerLoad() {
- if (win.content.location.href != contentPage) {
- win.gBrowser.loadURI(contentPage);
- return;
- }
- win.removeEventListener("DOMContentLoaded", onInnerLoad, true);
-
- win.content.addEventListener('load', function innerLoad2() {
- win.content.removeEventListener('load', innerLoad2, false);
- SimpleTest.executeSoon(function() { aCallback(win); });
- }, false, true);
- }, true);
- SimpleTest.executeSoon(function() { win.gBrowser.loadURI(contentPage); });
- });
- }, true);
-}
-
-var badids = [
- "badscript",
- "badimage",
- "badcss"
-];
-
-function checkLoads(aWindow, aBlocked) {
- var win = aWindow.content;
- is(win.document.getElementById("badscript").dataset.touched, aBlocked ? "no" : "yes", "Should not load tracking javascript");
- is(win.document.getElementById("badimage").dataset.touched, aBlocked ? "no" : "yes", "Should not load tracking images");
- is(win.document.getElementById("goodscript").dataset.touched, "yes", "Should load whitelisted tracking javascript");
-
- var elt = win.document.getElementById("styleCheck");
- var style = win.document.defaultView.getComputedStyle(elt, "");
- isnot(style.visibility, aBlocked ? "hidden" : "", "Should not load tracking css");
-
- is(win.document.blockedTrackingNodeCount, aBlocked ? badids.length : 0, "Should identify all tracking elements");
-
- var blockedTrackingNodes = win.document.blockedTrackingNodes;
-
- // Make sure that every node in blockedTrackingNodes exists in the tree
- // (that may not always be the case but do not expect any nodes to disappear
- // from the tree here)
- var allNodeMatch = true;
- for (var i = 0; i < blockedTrackingNodes.length; i++) {
- var nodeMatch = false;
- for (var j = 0; j < badids.length && !nodeMatch; j++) {
- nodeMatch = nodeMatch ||
- (blockedTrackingNodes[i] == win.document.getElementById(badids[j]));
- }
-
- allNodeMatch = allNodeMatch && nodeMatch;
- }
- is(allNodeMatch, true, "All annotated nodes are expected in the tree");
-
- // Make sure that every node with a badid (see badids) is found in the
- // blockedTrackingNodes. This tells us if we are neglecting to annotate
- // some nodes
- allNodeMatch = true;
- for (var j = 0; j < badids.length; j++) {
- var nodeMatch = false;
- for (var i = 0; i < blockedTrackingNodes.length && !nodeMatch; i++) {
- nodeMatch = nodeMatch ||
- (blockedTrackingNodes[i] == win.document.getElementById(badids[j]));
- }
-
- allNodeMatch = allNodeMatch && nodeMatch;
- }
- is(allNodeMatch, aBlocked, "All tracking nodes are expected to be annotated as such");
-}
-
-SpecialPowers.pushPrefEnv(
- {"set" : [["urlclassifier.trackingTable", "test-track-simple"],
- ["privacy.trackingprotection.enabled", false],
- ["privacy.trackingprotection.pbmode.enabled", true],
- ["channelclassifier.allowlist_example", true]]},
- test);
-
-function test() {
- SimpleTest.registerCleanupFunction(UrlClassifierTestUtils.cleanupTestTrackers);
- UrlClassifierTestUtils.addTestTrackers().then(() => {
- // Normal mode, with the pref (trackers should be loaded)
- testOnWindow(false, function(aWindow) {
- checkLoads(aWindow, false);
- aWindow.close();
-
- // Private Browsing, with the pref (trackers should be blocked)
- testOnWindow(true, function(aWindow) {
- checkLoads(aWindow, true);
- aWindow.close();
-
- // Private Browsing, without the pref (trackers should be loaded)
- SpecialPowers.setBoolPref("privacy.trackingprotection.pbmode.enabled", false);
- testOnWindow(true, function(aWindow) {
- checkLoads(aWindow, false);
- aWindow.close();
- SimpleTest.finish();
- });
- });
- });
- });
-}
-
-SimpleTest.waitForExplicitFinish();
-
-</script>
-
-</pre>
-<iframe id="testFrame" width="100%" height="100%" onload=""></iframe>
-</body>
-</html>
diff --git a/toolkit/components/url-classifier/tests/mochitest/test_safebrowsing_bug1272239.html b/toolkit/components/url-classifier/tests/mochitest/test_safebrowsing_bug1272239.html
deleted file mode 100644
index 8066c2a372..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/test_safebrowsing_bug1272239.html
+++ /dev/null
@@ -1,87 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Bug 1272239 - Only tables with provider could register gethash url in listmanager.</title>
- <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
-</head>
-
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-
-<script class="testbody" type="text/javascript">
-
-var Cc = SpecialPowers.Cc;
-var Ci = SpecialPowers.Ci;
-
-// List all the tables
-const prefs = [
- "urlclassifier.phishTable",
- "urlclassifier.malwareTable",
- "urlclassifier.downloadBlockTable",
- "urlclassifier.downloadAllowTable",
- "urlclassifier.trackingTable",
- "urlclassifier.trackingWhitelistTable",
- "urlclassifier.blockedTable"
-];
-
-var prefService = Cc["@mozilla.org/preferences-service;1"]
- .getService(Ci.nsIPrefService);
-
-// Get providers
-var providers = {};
-
-var branch = prefService.getBranch("browser.safebrowsing.provider.");
-var children = branch.getChildList("", {});
-
-for (var child of children) {
- var prefComponents = child.split(".");
- var providerName = prefComponents[0];
- providers[providerName] = {};
-}
-
-// Get lists from |browser.safebrowsing.provider.PROVIDER_NAME.lists| preference.
-var listsWithProvider = [];
-var listsToProvider = [];
-for (var provider in providers) {
- var pref = "browser.safebrowsing.provider." + provider + ".lists";
- var list = SpecialPowers.getCharPref(pref).split(",");
-
- listsToProvider = listsToProvider.concat(list.map( () => { return provider; }));
- listsWithProvider = listsWithProvider.concat(list);
-}
-
-// Get all the lists
-var lists = [];
-for (var pref of prefs) {
- lists = lists.concat(SpecialPowers.getCharPref(pref).split(","));
-}
-
-var listmanager = Cc["@mozilla.org/url-classifier/listmanager;1"].
- getService(Ci.nsIUrlListManager);
-
-for (var list of lists) {
- if (!list)
- continue;
-
- // For lists having a provider, it should have a correct gethash url
- // For lists without a provider, for example, test-malware-simple, it should not
- // have a gethash url.
- var url = listmanager.getGethashUrl(list);
- var index = listsWithProvider.indexOf(list);
- if (index >= 0) {
- var provider = listsToProvider[index];
- var pref = "browser.safebrowsing.provider." + provider + ".gethashURL";
- is(url, SpecialPowers.getCharPref(pref), list + " matches its gethash url");
- } else {
- is(url, "", list + " should not have a gethash url");
- }
-}
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/components/url-classifier/tests/mochitest/test_trackingprotection_bug1157081.html b/toolkit/components/url-classifier/tests/mochitest/test_trackingprotection_bug1157081.html
deleted file mode 100644
index 7611dd245b..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/test_trackingprotection_bug1157081.html
+++ /dev/null
@@ -1,107 +0,0 @@
-<!DOCTYPE HTML>
-<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
-<html>
-<head>
- <title>Test Tracking Protection with and without Safe Browsing (Bug #1157081)</title>
- <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
-</head>
-
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-
-<script class="testbody" type="text/javascript">
-
-var Cc = SpecialPowers.Cc;
-var Ci = SpecialPowers.Ci;
-
-var mainWindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIDocShellTreeItem)
- .rootTreeItem
- .QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindow);
-var contentPage = "chrome://mochitests/content/chrome/toolkit/components/url-classifier/tests/mochitest/classifiedAnnotatedPBFrame.html"
-
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://testing-common/UrlClassifierTestUtils.jsm");
-
-function whenDelayedStartupFinished(aWindow, aCallback) {
- Services.obs.addObserver(function observer(aSubject, aTopic) {
- if (aWindow == aSubject) {
- Services.obs.removeObserver(observer, aTopic);
- setTimeout(aCallback, 0);
- }
- }, "browser-delayed-startup-finished", false);
-}
-
-function testOnWindow(aCallback) {
- var win = mainWindow.OpenBrowserWindow();
- win.addEventListener("load", function onLoad() {
- win.removeEventListener("load", onLoad, false);
- whenDelayedStartupFinished(win, function() {
- win.addEventListener("DOMContentLoaded", function onInnerLoad() {
- if (win.content.location.href != contentPage) {
- win.gBrowser.loadURI(contentPage);
- return;
- }
- win.removeEventListener("DOMContentLoaded", onInnerLoad, true);
-
- win.content.addEventListener('load', function innerLoad2() {
- win.content.removeEventListener('load', innerLoad2, false);
- SimpleTest.executeSoon(function() { aCallback(win); });
- }, false, true);
- }, true);
- SimpleTest.executeSoon(function() { win.gBrowser.loadURI(contentPage); });
- });
- }, true);
-}
-
-var badids = [
- "badscript"
-];
-
-function checkLoads(aWindow, aBlocked) {
- var win = aWindow.content;
- is(win.document.getElementById("badscript").dataset.touched, aBlocked ? "no" : "yes", "Should not load tracking javascript");
-}
-
-SpecialPowers.pushPrefEnv(
- {"set" : [["urlclassifier.trackingTable", "test-track-simple"],
- ["privacy.trackingprotection.enabled", true],
- ["browser.safebrowsing.malware.enabled", false],
- ["browser.safebrowsing.phishing.enabled", false],
- ["channelclassifier.allowlist_example", true]]},
- test);
-
-function test() {
- SimpleTest.registerCleanupFunction(UrlClassifierTestUtils.cleanupTestTrackers);
- UrlClassifierTestUtils.addTestTrackers().then(() => {
- // Safe Browsing turned OFF, tracking protection should work nevertheless
- testOnWindow(function(aWindow) {
- checkLoads(aWindow, true);
- aWindow.close();
-
- // Safe Browsing turned ON, tracking protection should still work
- SpecialPowers.setBoolPref("browser.safebrowsing.phishing.enabled", true);
- testOnWindow(function(aWindow) {
- checkLoads(aWindow, true);
- aWindow.close();
- SimpleTest.finish();
- });
- });
- });
-}
-
-SimpleTest.waitForExplicitFinish();
-
-</script>
-
-</pre>
-<iframe id="testFrame" width="100%" height="100%" onload=""></iframe>
-</body>
-</html>
diff --git a/toolkit/components/url-classifier/tests/mochitest/test_trackingprotection_whitelist.html b/toolkit/components/url-classifier/tests/mochitest/test_trackingprotection_whitelist.html
deleted file mode 100644
index 29de0dfed8..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/test_trackingprotection_whitelist.html
+++ /dev/null
@@ -1,153 +0,0 @@
-<!DOCTYPE HTML>
-<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
-<html>
-<head>
- <title>Test Tracking Protection in Private Browsing mode</title>
- <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
-</head>
-
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-
-<script class="testbody" type="text/javascript">
-
-var Cc = SpecialPowers.Cc;
-var Ci = SpecialPowers.Ci;
-
-var mainWindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIDocShellTreeItem)
- .rootTreeItem
- .QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindow);
-var contentPage1 = "http://www.itisatrap.org/tests/toolkit/components/url-classifier/tests/mochitest/whitelistFrame.html";
-var contentPage2 = "http://example.com/tests/toolkit/components/url-classifier/tests/mochitest/whitelistFrame.html";
-
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://testing-common/UrlClassifierTestUtils.jsm");
-
-function whenDelayedStartupFinished(aWindow, aCallback) {
- Services.obs.addObserver(function observer(aSubject, aTopic) {
- if (aWindow == aSubject) {
- Services.obs.removeObserver(observer, aTopic);
- setTimeout(aCallback, 0);
- }
- }, "browser-delayed-startup-finished", false);
-}
-
-function testOnWindow(contentPage, aCallback) {
- var win = mainWindow.OpenBrowserWindow();
- win.addEventListener("load", function onLoad() {
- win.removeEventListener("load", onLoad, false);
- whenDelayedStartupFinished(win, function() {
- win.addEventListener("DOMContentLoaded", function onInnerLoad() {
- if (win.content.location.href != contentPage) {
- win.gBrowser.loadURI(contentPage);
- return;
- }
- win.removeEventListener("DOMContentLoaded", onInnerLoad, true);
-
- win.content.addEventListener('load', function innerLoad2() {
- win.content.removeEventListener('load', innerLoad2, false);
- SimpleTest.executeSoon(function() { aCallback(win); });
- }, false, true);
- }, true);
- SimpleTest.executeSoon(function() { win.gBrowser.loadURI(contentPage); });
- });
- }, true);
-}
-
-var alwaysbadids = [
- "badscript",
-];
-
-function checkLoads(aWindow, aWhitelisted) {
- var win = aWindow.content;
- is(win.document.getElementById("badscript").dataset.touched, "no", "Should not load tracking javascript");
- is(win.document.getElementById("goodscript").dataset.touched, aWhitelisted ? "yes" : "no", "Should load whitelisted tracking javascript");
-
- var badids = alwaysbadids.slice();
- if (!aWhitelisted) {
- badids.push("goodscript");
- }
- is(win.document.blockedTrackingNodeCount, badids.length, "Should identify all tracking elements");
-
- var blockedTrackingNodes = win.document.blockedTrackingNodes;
-
- // Make sure that every node in blockedTrackingNodes exists in the tree
- // (that may not always be the case but do not expect any nodes to disappear
- // from the tree here)
- var allNodeMatch = true;
- for (var i = 0; i < blockedTrackingNodes.length; i++) {
- var nodeMatch = false;
- for (var j = 0; j < badids.length && !nodeMatch; j++) {
- nodeMatch = nodeMatch ||
- (blockedTrackingNodes[i] == win.document.getElementById(badids[j]));
- }
-
- allNodeMatch = allNodeMatch && nodeMatch;
- }
- is(allNodeMatch, true, "All annotated nodes are expected in the tree");
-
- // Make sure that every node with a badid (see badids) is found in the
- // blockedTrackingNodes. This tells us if we are neglecting to annotate
- // some nodes
- allNodeMatch = true;
- for (var j = 0; j < badids.length; j++) {
- var nodeMatch = false;
- for (var i = 0; i < blockedTrackingNodes.length && !nodeMatch; i++) {
- nodeMatch = nodeMatch ||
- (blockedTrackingNodes[i] == win.document.getElementById(badids[j]));
- }
-
- allNodeMatch = allNodeMatch && nodeMatch;
- }
- is(allNodeMatch, true, "All tracking nodes are expected to be annotated as such");
-}
-
-SpecialPowers.pushPrefEnv(
- {"set" : [["privacy.trackingprotection.enabled", true],
- ["channelclassifier.allowlist_example", true]]},
- test);
-
-function test() {
- SimpleTest.registerCleanupFunction(UrlClassifierTestUtils.cleanupTestTrackers);
- UrlClassifierTestUtils.addTestTrackers().then(() => {
- // Load the test from a URL on the whitelist
- testOnWindow(contentPage1, function(aWindow) {
- checkLoads(aWindow, true);
- aWindow.close();
-
- // Load the test from a URL that's NOT on the whitelist
- testOnWindow(contentPage2, function(aWindow) {
- checkLoads(aWindow, false);
- aWindow.close();
-
- // Load the test from a URL on the whitelist but without the whitelist
- SpecialPowers.pushPrefEnv({"set" : [["urlclassifier.trackingWhitelistTable", ""]]},
- function() {
- testOnWindow(contentPage1, function(aWindow) {
- checkLoads(aWindow, false);
- aWindow.close();
- SimpleTest.finish();
- });
- });
-
- });
- });
- });
-}
-
-SimpleTest.waitForExplicitFinish();
-
-</script>
-
-</pre>
-<iframe id="testFrame" width="100%" height="100%" onload=""></iframe>
-</body>
-</html>
diff --git a/toolkit/components/url-classifier/tests/mochitest/track.html b/toolkit/components/url-classifier/tests/mochitest/track.html
deleted file mode 100644
index 8785e7c5b1..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/track.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<html>
- <head>
- </head>
- <body>
- <h1>Tracking Works!</h1>
- </body>
-</html>
diff --git a/toolkit/components/url-classifier/tests/mochitest/unwantedWorker.js b/toolkit/components/url-classifier/tests/mochitest/unwantedWorker.js
deleted file mode 100644
index ac34977d71..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/unwantedWorker.js
+++ /dev/null
@@ -1,3 +0,0 @@
-onmessage = function() {
- postMessage("loaded bad file");
-}
diff --git a/toolkit/components/url-classifier/tests/mochitest/update.sjs b/toolkit/components/url-classifier/tests/mochitest/update.sjs
deleted file mode 100644
index 53efaafdfc..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/update.sjs
+++ /dev/null
@@ -1,114 +0,0 @@
-const CC = Components.Constructor;
-const BinaryInputStream = CC("@mozilla.org/binaryinputstream;1",
- "nsIBinaryInputStream",
- "setInputStream");
-
-function handleRequest(request, response)
-{
- var query = {};
- request.queryString.split('&').forEach(function (val) {
- var idx = val.indexOf('=');
- query[val.slice(0, idx)] = unescape(val.slice(idx + 1));
- });
-
- // Store fullhash in the server side.
- if ("list" in query && "fullhash" in query) {
- // In the server side we will store:
- // 1. All the full hashes for a given list
- // 2. All the lists we have right now
- // data is separate by '\n'
- let list = query["list"];
- let hashes = getState(list);
-
- let hash = base64ToString(query["fullhash"]);
- hashes += hash + "\n";
- setState(list, hashes);
-
- let lists = getState("lists");
- if (lists.indexOf(list) == -1) {
- lists += list + "\n";
- setState("lists", lists);
- }
-
- return;
- }
-
- var body = new BinaryInputStream(request.bodyInputStream);
- var avail;
- var bytes = [];
-
- while ((avail = body.available()) > 0) {
- Array.prototype.push.apply(bytes, body.readByteArray(avail));
- }
-
- var responseBody = parseV2Request(bytes);
-
- response.setHeader("Content-Type", "text/plain", false);
- response.write(responseBody);
-}
-
-function parseV2Request(bytes) {
- var table = String.fromCharCode.apply(this, bytes).slice(0,-2);
-
- var ret = "";
- getState("lists").split("\n").forEach(function(list) {
- if (list == table) {
- var completions = getState(list).split("\n");
- ret += "n:1000\n"
- ret += "i:" + list + "\n";
- ret += "a:1:32:" + 32*(completions.length - 1) + "\n";
-
- for (var completion of completions) {
- ret += completion;
- }
- }
- });
-
- return ret;
-}
-
-/* Convert Base64 data to a string */
-const toBinaryTable = [
- -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
- -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
- -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, -1,-1,-1,63,
- 52,53,54,55, 56,57,58,59, 60,61,-1,-1, -1, 0,-1,-1,
- -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,
- 15,16,17,18, 19,20,21,22, 23,24,25,-1, -1,-1,-1,-1,
- -1,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
- 41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1
-];
-const base64Pad = '=';
-
-function base64ToString(data) {
- var result = '';
- var leftbits = 0; // number of bits decoded, but yet to be appended
- var leftdata = 0; // bits decoded, but yet to be appended
-
- // Convert one by one.
- for (var i = 0; i < data.length; i++) {
- var c = toBinaryTable[data.charCodeAt(i) & 0x7f];
- var padding = (data[i] == base64Pad);
- // Skip illegal characters and whitespace
- if (c == -1) continue;
-
- // Collect data into leftdata, update bitcount
- leftdata = (leftdata << 6) | c;
- leftbits += 6;
-
- // If we have 8 or more bits, append 8 bits to the result
- if (leftbits >= 8) {
- leftbits -= 8;
- // Append if not padding.
- if (!padding)
- result += String.fromCharCode((leftdata >> leftbits) & 0xff);
- leftdata &= (1 << leftbits) - 1;
- }
- }
-
- // If there are any bits left, the base64 string was corrupted
- if (leftbits)
- throw Components.Exception('Corrupted base64 string');
-
- return result;
-}
diff --git a/toolkit/components/url-classifier/tests/mochitest/vp9.webm b/toolkit/components/url-classifier/tests/mochitest/vp9.webm
deleted file mode 100644
index 221877e303..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/vp9.webm
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/url-classifier/tests/mochitest/whitelistFrame.html b/toolkit/components/url-classifier/tests/mochitest/whitelistFrame.html
deleted file mode 100644
index 620416fc74..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/whitelistFrame.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML>
-<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
-<html>
-<head>
-<title></title>
-</head>
-<body>
-
-<script id="badscript" data-touched="not sure" src="http://trackertest.org/tests/toolkit/components/url-classifier/tests/mochitest/evil.js" onload="this.dataset.touched = 'yes';" onerror="this.dataset.touched = 'no';"></script>
-
-<script id="goodscript" data-touched="not sure" src="http://itisatracker.org/tests/toolkit/components/url-classifier/tests/mochitest/good.js" onload="this.dataset.touched = 'yes';" onerror="this.dataset.touched = 'no';"></script>
-
-</body>
-</html>
diff --git a/toolkit/components/url-classifier/tests/mochitest/workerFrame.html b/toolkit/components/url-classifier/tests/mochitest/workerFrame.html
deleted file mode 100644
index 69e8dd0074..0000000000
--- a/toolkit/components/url-classifier/tests/mochitest/workerFrame.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<html>
-<head>
-<title></title>
-
-<script type="text/javascript">
-
-function startCleanWorker() {
- var worker = new Worker("cleanWorker.js");
-
- worker.onmessage = function(event) {
- if (event.data == "success") {
- window.parent.postMessage("success:blocked importScripts('evilWorker.js')", "*");
- } else {
- window.parent.postMessage("failure:failed to block importScripts('evilWorker.js')", "*");
- }
- window.parent.postMessage("finish", "*");
- };
-
- worker.onerror = function(event) {
- window.parent.postmessage("failure:failed to load cleanWorker.js", "*");
- window.parent.postMessage("finish", "*");
- };
-
- worker.postMessage("");
-}
-
-function startEvilWorker() {
- var worker = new Worker("evilWorker.js");
-
- worker.onmessage = function(event) {
- window.parent.postMessage("failure:failed to block evilWorker.js", "*");
- startUnwantedWorker();
- };
-
- worker.onerror = function(event) {
- window.parent.postMessage("success:blocked evilWorker.js", "*");
- startUnwantedWorker();
- };
-
- worker.postMessage("");
-}
-
-function startUnwantedWorker() {
- var worker = new Worker("unwantedWorker.js");
-
- worker.onmessage = function(event) {
- window.parent.postMessage("failure:failed to block unwantedWorker.js", "*");
- startCleanWorker();
- };
-
- worker.onerror = function(event) {
- window.parent.postMessage("success:blocked unwantedWorker.js", "*");
- startCleanWorker();
- };
-
- worker.postMessage("");
-}
-
-</script>
-
-</head>
-
-<body onload="startEvilWorker()">
-</body>
-</html>
diff --git a/toolkit/components/url-classifier/tests/moz.build b/toolkit/components/url-classifier/tests/moz.build
deleted file mode 100644
index 599727ab98..0000000000
--- a/toolkit/components/url-classifier/tests/moz.build
+++ /dev/null
@@ -1,18 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-MOCHITEST_MANIFESTS += ['mochitest/mochitest.ini']
-MOCHITEST_CHROME_MANIFESTS += ['mochitest/chrome.ini']
-XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
-
-JAR_MANIFESTS += ['jar.mn']
-
-TESTING_JS_MODULES += [
- 'UrlClassifierTestUtils.jsm',
-]
-
-if CONFIG['ENABLE_TESTS']:
- DIRS += ['gtest']
diff --git a/toolkit/components/url-classifier/tests/unit/.eslintrc.js b/toolkit/components/url-classifier/tests/unit/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/url-classifier/tests/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/url-classifier/tests/unit/data/digest1.chunk b/toolkit/components/url-classifier/tests/unit/data/digest1.chunk
deleted file mode 100644
index 3850373c19..0000000000
--- a/toolkit/components/url-classifier/tests/unit/data/digest1.chunk
+++ /dev/null
Binary files differ
diff --git a/toolkit/components/url-classifier/tests/unit/data/digest2.chunk b/toolkit/components/url-classifier/tests/unit/data/digest2.chunk
deleted file mode 100644
index 738c96f6ba..0000000000
--- a/toolkit/components/url-classifier/tests/unit/data/digest2.chunk
+++ /dev/null
@@ -1,2 +0,0 @@
-a:5:32:32
-_H^a7]=#nmnoQ \ No newline at end of file
diff --git a/toolkit/components/url-classifier/tests/unit/head_urlclassifier.js b/toolkit/components/url-classifier/tests/unit/head_urlclassifier.js
deleted file mode 100644
index 21849ced7c..0000000000
--- a/toolkit/components/url-classifier/tests/unit/head_urlclassifier.js
+++ /dev/null
@@ -1,429 +0,0 @@
-//* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- *
-function dumpn(s) {
- dump(s + "\n");
-}
-
-const NS_APP_USER_PROFILE_50_DIR = "ProfD";
-const NS_APP_USER_PROFILE_LOCAL_50_DIR = "ProfLD";
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-var Cr = Components.results;
-
-Cu.import("resource://testing-common/httpd.js");
-
-do_get_profile();
-
-var dirSvc = Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties);
-
-var iosvc = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
-
-var secMan = Cc["@mozilla.org/scriptsecuritymanager;1"]
- .getService(Ci.nsIScriptSecurityManager);
-
-// Disable hashcompleter noise for tests
-var prefBranch = Cc["@mozilla.org/preferences-service;1"].
- getService(Ci.nsIPrefBranch);
-prefBranch.setIntPref("urlclassifier.gethashnoise", 0);
-
-// Enable malware/phishing checking for tests
-prefBranch.setBoolPref("browser.safebrowsing.malware.enabled", true);
-prefBranch.setBoolPref("browser.safebrowsing.blockedURIs.enabled", true);
-prefBranch.setBoolPref("browser.safebrowsing.phishing.enabled", true);
-
-// Enable all completions for tests
-prefBranch.setCharPref("urlclassifier.disallow_completions", "");
-
-// Hash completion timeout
-prefBranch.setIntPref("urlclassifier.gethash.timeout_ms", 5000);
-
-function delFile(name) {
- try {
- // Delete a previously created sqlite file
- var file = dirSvc.get('ProfLD', Ci.nsIFile);
- file.append(name);
- if (file.exists())
- file.remove(false);
- } catch(e) {
- }
-}
-
-function cleanUp() {
- delFile("urlclassifier3.sqlite");
- delFile("safebrowsing/classifier.hashkey");
- delFile("safebrowsing/test-phish-simple.sbstore");
- delFile("safebrowsing/test-malware-simple.sbstore");
- delFile("safebrowsing/test-unwanted-simple.sbstore");
- delFile("safebrowsing/test-block-simple.sbstore");
- delFile("safebrowsing/test-track-simple.sbstore");
- delFile("safebrowsing/test-trackwhite-simple.sbstore");
- delFile("safebrowsing/test-phish-simple.pset");
- delFile("safebrowsing/test-malware-simple.pset");
- delFile("safebrowsing/test-unwanted-simple.pset");
- delFile("safebrowsing/test-block-simple.pset");
- delFile("safebrowsing/test-track-simple.pset");
- delFile("safebrowsing/test-trackwhite-simple.pset");
- delFile("safebrowsing/moz-phish-simple.sbstore");
- delFile("safebrowsing/moz-phish-simple.pset");
- delFile("testLarge.pset");
- delFile("testNoDelta.pset");
-}
-
-// Update uses allTables by default
-var allTables = "test-phish-simple,test-malware-simple,test-unwanted-simple,test-track-simple,test-trackwhite-simple,test-block-simple";
-var mozTables = "moz-phish-simple";
-
-var dbservice = Cc["@mozilla.org/url-classifier/dbservice;1"].getService(Ci.nsIUrlClassifierDBService);
-var streamUpdater = Cc["@mozilla.org/url-classifier/streamupdater;1"]
- .getService(Ci.nsIUrlClassifierStreamUpdater);
-
-
-/*
- * Builds an update from an object that looks like:
- *{ "test-phish-simple" : [{
- * "chunkType" : "a", // 'a' is assumed if not specified
- * "chunkNum" : 1, // numerically-increasing chunk numbers are assumed
- * // if not specified
- * "urls" : [ "foo.com/a", "foo.com/b", "bar.com/" ]
- * }
- */
-
-function buildUpdate(update, hashSize) {
- if (!hashSize) {
- hashSize = 32;
- }
- var updateStr = "n:1000\n";
-
- for (var tableName in update) {
- if (tableName != "")
- updateStr += "i:" + tableName + "\n";
- var chunks = update[tableName];
- for (var j = 0; j < chunks.length; j++) {
- var chunk = chunks[j];
- var chunkType = chunk.chunkType ? chunk.chunkType : 'a';
- var chunkNum = chunk.chunkNum ? chunk.chunkNum : j;
- updateStr += chunkType + ':' + chunkNum + ':' + hashSize;
-
- if (chunk.urls) {
- var chunkData = chunk.urls.join("\n");
- updateStr += ":" + chunkData.length + "\n" + chunkData;
- }
-
- updateStr += "\n";
- }
- }
-
- return updateStr;
-}
-
-function buildPhishingUpdate(chunks, hashSize) {
- return buildUpdate({"test-phish-simple" : chunks}, hashSize);
-}
-
-function buildMalwareUpdate(chunks, hashSize) {
- return buildUpdate({"test-malware-simple" : chunks}, hashSize);
-}
-
-function buildUnwantedUpdate(chunks, hashSize) {
- return buildUpdate({"test-unwanted-simple" : chunks}, hashSize);
-}
-
-function buildBlockedUpdate(chunks, hashSize) {
- return buildUpdate({"test-block-simple" : chunks}, hashSize);
-}
-
-function buildMozPhishingUpdate(chunks, hashSize) {
- return buildUpdate({"moz-phish-simple" : chunks}, hashSize);
-}
-
-function buildBareUpdate(chunks, hashSize) {
- return buildUpdate({"" : chunks}, hashSize);
-}
-
-/**
- * Performs an update of the dbservice manually, bypassing the stream updater
- */
-function doSimpleUpdate(updateText, success, failure) {
- var listener = {
- QueryInterface: function(iid)
- {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIUrlClassifierUpdateObserver))
- return this;
- throw Cr.NS_ERROR_NO_INTERFACE;
- },
-
- updateUrlRequested: function(url) { },
- streamFinished: function(status) { },
- updateError: function(errorCode) { failure(errorCode); },
- updateSuccess: function(requestedTimeout) { success(requestedTimeout); }
- };
-
- dbservice.beginUpdate(listener, allTables);
- dbservice.beginStream("", "");
- dbservice.updateStream(updateText);
- dbservice.finishStream();
- dbservice.finishUpdate();
-}
-
-/**
- * Simulates a failed database update.
- */
-function doErrorUpdate(tables, success, failure) {
- var listener = {
- QueryInterface: function(iid)
- {
- if (iid.equals(Ci.nsISupports) ||
- iid.equals(Ci.nsIUrlClassifierUpdateObserver))
- return this;
- throw Cr.NS_ERROR_NO_INTERFACE;
- },
-
- updateUrlRequested: function(url) { },
- streamFinished: function(status) { },
- updateError: function(errorCode) { success(errorCode); },
- updateSuccess: function(requestedTimeout) { failure(requestedTimeout); }
- };
-
- dbservice.beginUpdate(listener, tables, null);
- dbservice.beginStream("", "");
- dbservice.cancelUpdate();
-}
-
-/**
- * Performs an update of the dbservice using the stream updater and a
- * data: uri
- */
-function doStreamUpdate(updateText, success, failure, downloadFailure) {
- var dataUpdate = "data:," + encodeURIComponent(updateText);
-
- if (!downloadFailure) {
- downloadFailure = failure;
- }
-
- streamUpdater.downloadUpdates(allTables, "", true,
- dataUpdate, success, failure, downloadFailure);
-}
-
-var gAssertions = {
-
-tableData : function(expectedTables, cb)
-{
- dbservice.getTables(function(tables) {
- // rebuild the tables in a predictable order.
- var parts = tables.split("\n");
- while (parts[parts.length - 1] == '') {
- parts.pop();
- }
- parts.sort();
- tables = parts.join("\n");
-
- do_check_eq(tables, expectedTables);
- cb();
- });
-},
-
-checkUrls: function(urls, expected, cb, useMoz = false)
-{
- // work with a copy of the list.
- urls = urls.slice(0);
- var doLookup = function() {
- if (urls.length > 0) {
- var tables = useMoz ? mozTables : allTables;
- var fragment = urls.shift();
- var principal = secMan.createCodebasePrincipal(iosvc.newURI("http://" + fragment, null, null), {});
- dbservice.lookup(principal, tables,
- function(arg) {
- do_check_eq(expected, arg);
- doLookup();
- }, true);
- } else {
- cb();
- }
- };
- doLookup();
-},
-
-checkTables: function(url, expected, cb)
-{
- var principal = secMan.createCodebasePrincipal(iosvc.newURI("http://" + url, null, null), {});
- dbservice.lookup(principal, allTables, function(tables) {
- // Rebuild tables in a predictable order.
- var parts = tables.split(",");
- while (parts[parts.length - 1] == '') {
- parts.pop();
- }
- parts.sort();
- tables = parts.join(",");
- do_check_eq(tables, expected);
- cb();
- }, true);
-},
-
-urlsDontExist: function(urls, cb)
-{
- this.checkUrls(urls, '', cb);
-},
-
-urlsExist: function(urls, cb)
-{
- this.checkUrls(urls, 'test-phish-simple', cb);
-},
-
-malwareUrlsExist: function(urls, cb)
-{
- this.checkUrls(urls, 'test-malware-simple', cb);
-},
-
-unwantedUrlsExist: function(urls, cb)
-{
- this.checkUrls(urls, 'test-unwanted-simple', cb);
-},
-
-blockedUrlsExist: function(urls, cb)
-{
- this.checkUrls(urls, 'test-block-simple', cb);
-},
-
-mozPhishingUrlsExist: function(urls, cb)
-{
- this.checkUrls(urls, 'moz-phish-simple', cb, true);
-},
-
-subsDontExist: function(urls, cb)
-{
- // XXX: there's no interface for checking items in the subs table
- cb();
-},
-
-subsExist: function(urls, cb)
-{
- // XXX: there's no interface for checking items in the subs table
- cb();
-},
-
-urlExistInMultipleTables: function(data, cb)
-{
- this.checkTables(data["url"], data["tables"], cb);
-}
-
-};
-
-/**
- * Check a set of assertions against the gAssertions table.
- */
-function checkAssertions(assertions, doneCallback)
-{
- var checkAssertion = function() {
- for (var i in assertions) {
- var data = assertions[i];
- delete assertions[i];
- gAssertions[i](data, checkAssertion);
- return;
- }
-
- doneCallback();
- }
-
- checkAssertion();
-}
-
-function updateError(arg)
-{
- do_throw(arg);
-}
-
-// Runs a set of updates, and then checks a set of assertions.
-function doUpdateTest(updates, assertions, successCallback, errorCallback) {
- var errorUpdate = function() {
- checkAssertions(assertions, errorCallback);
- }
-
- var runUpdate = function() {
- if (updates.length > 0) {
- var update = updates.shift();
- doStreamUpdate(update, runUpdate, errorUpdate, null);
- } else {
- checkAssertions(assertions, successCallback);
- }
- }
-
- runUpdate();
-}
-
-var gTests;
-var gNextTest = 0;
-
-function runNextTest()
-{
- if (gNextTest >= gTests.length) {
- do_test_finished();
- return;
- }
-
- dbservice.resetDatabase();
- dbservice.setHashCompleter('test-phish-simple', null);
-
- let test = gTests[gNextTest++];
- dump("running " + test.name + "\n");
- test();
-}
-
-function runTests(tests)
-{
- gTests = tests;
- runNextTest();
-}
-
-var timerArray = [];
-
-function Timer(delay, cb) {
- this.cb = cb;
- var timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
- timer.initWithCallback(this, delay, timer.TYPE_ONE_SHOT);
- timerArray.push(timer);
-}
-
-Timer.prototype = {
-QueryInterface: function(iid) {
- if (!iid.equals(Ci.nsISupports) && !iid.equals(Ci.nsITimerCallback)) {
- throw Cr.NS_ERROR_NO_INTERFACE;
- }
- return this;
- },
-notify: function(timer) {
- this.cb();
- }
-}
-
-// LFSRgenerator is a 32-bit linear feedback shift register random number
-// generator. It is highly predictable and is not intended to be used for
-// cryptography but rather to allow easier debugging than a test that uses
-// Math.random().
-function LFSRgenerator(seed) {
- // Force |seed| to be a number.
- seed = +seed;
- // LFSR generators do not work with a value of 0.
- if (seed == 0)
- seed = 1;
-
- this._value = seed;
-}
-LFSRgenerator.prototype = {
- // nextNum returns a random unsigned integer of in the range [0,2^|bits|].
- nextNum: function(bits) {
- if (!bits)
- bits = 32;
-
- let val = this._value;
- // Taps are 32, 22, 2 and 1.
- let bit = ((val >>> 0) ^ (val >>> 10) ^ (val >>> 30) ^ (val >>> 31)) & 1;
- val = (val >>> 1) | (bit << 31);
- this._value = val;
-
- return (val >>> (32 - bits));
- },
-};
-
-cleanUp();
diff --git a/toolkit/components/url-classifier/tests/unit/tail_urlclassifier.js b/toolkit/components/url-classifier/tests/unit/tail_urlclassifier.js
deleted file mode 100644
index 37f39d1a8d..0000000000
--- a/toolkit/components/url-classifier/tests/unit/tail_urlclassifier.js
+++ /dev/null
@@ -1 +0,0 @@
-cleanUp();
diff --git a/toolkit/components/url-classifier/tests/unit/test_addsub.js b/toolkit/components/url-classifier/tests/unit/test_addsub.js
deleted file mode 100644
index 1ed65c7baa..0000000000
--- a/toolkit/components/url-classifier/tests/unit/test_addsub.js
+++ /dev/null
@@ -1,488 +0,0 @@
-
-function doTest(updates, assertions)
-{
- doUpdateTest(updates, assertions, runNextTest, updateError);
-}
-
-// Test an add of two urls to a fresh database
-function testSimpleAdds() {
- var addUrls = [ "foo.com/a", "foo.com/b", "bar.com/c" ];
- var update = buildPhishingUpdate(
- [
- { "chunkNum" : 1,
- "urls" : addUrls
- }]);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1",
- "urlsExist" : addUrls
- };
-
- doTest([update], assertions);
-}
-
-// Same as testSimpleAdds, but make the same-domain URLs come from different
-// chunks.
-function testMultipleAdds() {
- var add1Urls = [ "foo.com/a", "bar.com/c" ];
- var add2Urls = [ "foo.com/b" ];
-
- var update = buildPhishingUpdate(
- [{ "chunkNum" : 1,
- "urls" : add1Urls },
- { "chunkNum" : 2,
- "urls" : add2Urls }]);
- var assertions = {
- "tableData" : "test-phish-simple;a:1-2",
- "urlsExist" : add1Urls.concat(add2Urls)
- };
-
- doTest([update], assertions);
-}
-
-// Test that a sub will remove an existing add
-function testSimpleSub()
-{
- var addUrls = ["foo.com/a", "bar.com/b"];
- var subUrls = ["1:foo.com/a"];
-
- var addUpdate = buildPhishingUpdate(
- [{ "chunkNum" : 1, // adds and subtracts don't share a chunk numbering space
- "urls": addUrls }]);
-
- var subUpdate = buildPhishingUpdate(
- [{ "chunkNum" : 50,
- "chunkType" : "s",
- "urls": subUrls }]);
-
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1:s:50",
- "urlsExist" : [ "bar.com/b" ],
- "urlsDontExist": ["foo.com/a" ],
- "subsDontExist" : [ "foo.com/a" ]
- }
-
- doTest([addUpdate, subUpdate], assertions);
-
-}
-
-// Same as testSimpleSub(), but the sub comes in before the add.
-function testSubEmptiesAdd()
-{
- var subUrls = ["1:foo.com/a"];
- var addUrls = ["foo.com/a", "bar.com/b"];
-
- var subUpdate = buildPhishingUpdate(
- [{ "chunkNum" : 50,
- "chunkType" : "s",
- "urls": subUrls }]);
-
- var addUpdate = buildPhishingUpdate(
- [{ "chunkNum" : 1,
- "urls": addUrls }]);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1:s:50",
- "urlsExist" : [ "bar.com/b" ],
- "urlsDontExist": ["foo.com/a" ],
- "subsDontExist" : [ "foo.com/a" ] // this sub was found, it shouldn't exist anymore
- }
-
- doTest([subUpdate, addUpdate], assertions);
-}
-
-// Very similar to testSubEmptiesAdd, except that the domain entry will
-// still have an item left over that needs to be synced.
-function testSubPartiallyEmptiesAdd()
-{
- var subUrls = ["1:foo.com/a"];
- var addUrls = ["foo.com/a", "foo.com/b", "bar.com/b"];
-
- var subUpdate = buildPhishingUpdate(
- [{ "chunkNum" : 1,
- "chunkType" : "s",
- "urls": subUrls }]);
-
- var addUpdate = buildPhishingUpdate(
- [{ "chunkNum" : 1, // adds and subtracts don't share a chunk numbering space
- "urls": addUrls }]);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1:s:1",
- "urlsExist" : [ "foo.com/b", "bar.com/b" ],
- "urlsDontExist" : ["foo.com/a" ],
- "subsDontExist" : [ "foo.com/a" ] // this sub was found, it shouldn't exist anymore
- }
-
- doTest([subUpdate, addUpdate], assertions);
-}
-
-// We SHOULD be testing that pending subs are removed using
-// subsDontExist assertions. Since we don't have a good interface for getting
-// at sub entries, we'll verify it by side-effect. Subbing a url once
-// then adding it twice should leave the url intact.
-function testPendingSubRemoved()
-{
- var subUrls = ["1:foo.com/a", "2:foo.com/b"];
- var addUrls = ["foo.com/a", "foo.com/b"];
-
- var subUpdate = buildPhishingUpdate(
- [{ "chunkNum" : 1,
- "chunkType" : "s",
- "urls": subUrls }]);
-
- var addUpdate1 = buildPhishingUpdate(
- [{ "chunkNum" : 1, // adds and subtracts don't share a chunk numbering space
- "urls": addUrls }]);
-
- var addUpdate2 = buildPhishingUpdate(
- [{ "chunkNum" : 2,
- "urls": addUrls }]);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1-2:s:1",
- "urlsExist" : [ "foo.com/a", "foo.com/b" ],
- "subsDontExist" : [ "foo.com/a", "foo.com/b" ] // this sub was found, it shouldn't exist anymore
- }
-
- doTest([subUpdate, addUpdate1, addUpdate2], assertions);
-}
-
-// Make sure that a saved sub is removed when the sub chunk is expired.
-function testPendingSubExpire()
-{
- var subUrls = ["1:foo.com/a", "1:foo.com/b"];
- var addUrls = ["foo.com/a", "foo.com/b"];
-
- var subUpdate = buildPhishingUpdate(
- [{ "chunkNum" : 1,
- "chunkType" : "s",
- "urls": subUrls }]);
-
- var expireUpdate = buildPhishingUpdate(
- [{ "chunkNum" : 1,
- "chunkType" : "sd" }]);
-
- var addUpdate = buildPhishingUpdate(
- [{ "chunkNum" : 1, // adds and subtracts don't share a chunk numbering space
- "urls": addUrls }]);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1",
- "urlsExist" : [ "foo.com/a", "foo.com/b" ],
- "subsDontExist" : [ "foo.com/a", "foo.com/b" ] // this sub was expired
- }
-
- doTest([subUpdate, expireUpdate, addUpdate], assertions);
-}
-
-// Make sure that the sub url removes from only the chunk that it specifies
-function testDuplicateAdds()
-{
- var urls = ["foo.com/a"];
-
- var addUpdate1 = buildPhishingUpdate(
- [{ "chunkNum" : 1,
- "urls": urls }]);
- var addUpdate2 = buildPhishingUpdate(
- [{ "chunkNum" : 2,
- "urls": urls }]);
- var subUpdate = buildPhishingUpdate(
- [{ "chunkNum" : 3,
- "chunkType" : "s",
- "urls": ["2:foo.com/a"]}]);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1-2:s:3",
- "urlsExist" : [ "foo.com/a"],
- "subsDontExist" : [ "foo.com/a"]
- }
-
- doTest([addUpdate1, addUpdate2, subUpdate], assertions);
-}
-
-// Tests a sub which matches some existing adds but leaves others.
-function testSubPartiallyMatches()
-{
- var subUrls = ["foo.com/a"];
- var addUrls = ["1:foo.com/a", "2:foo.com/b"];
-
- var addUpdate = buildPhishingUpdate(
- [{ "chunkNum" : 1,
- "urls" : addUrls }]);
-
- var subUpdate = buildPhishingUpdate(
- [{ "chunkNum" : 1,
- "chunkType" : "s",
- "urls" : addUrls }]);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1:s:1",
- "urlsDontExist" : ["foo.com/a"],
- "subsDontExist" : ["foo.com/a"],
- "subsExist" : ["foo.com/b"]
- };
-
- doTest([addUpdate, subUpdate], assertions);
-}
-
-// XXX: because subsExist isn't actually implemented, this is the same
-// test as above but with a second add chunk that should fail to be added
-// because of a pending sub chunk.
-function testSubPartiallyMatches2()
-{
- var addUrls = ["foo.com/a"];
- var subUrls = ["1:foo.com/a", "2:foo.com/b"];
- var addUrls2 = ["foo.com/b"];
-
- var addUpdate = buildPhishingUpdate(
- [{ "chunkNum" : 1,
- "urls" : addUrls }]);
-
- var subUpdate = buildPhishingUpdate(
- [{ "chunkNum" : 1,
- "chunkType" : "s",
- "urls" : subUrls }]);
-
- var addUpdate2 = buildPhishingUpdate(
- [{ "chunkNum" : 2,
- "urls" : addUrls2 }]);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1-2:s:1",
- "urlsDontExist" : ["foo.com/a", "foo.com/b"],
- "subsDontExist" : ["foo.com/a", "foo.com/b"]
- };
-
- doTest([addUpdate, subUpdate, addUpdate2], assertions);
-}
-
-// Verify that two subs for the same domain but from different chunks
-// match (tests that existing sub entries are properly updated)
-function testSubsDifferentChunks() {
- var subUrls1 = [ "3:foo.com/a" ];
- var subUrls2 = [ "3:foo.com/b" ];
-
- var addUrls = [ "foo.com/a", "foo.com/b", "foo.com/c" ];
-
- var subUpdate1 = buildPhishingUpdate(
- [{ "chunkNum" : 1,
- "chunkType" : "s",
- "urls": subUrls1 }]);
- var subUpdate2 = buildPhishingUpdate(
- [{ "chunkNum" : 2,
- "chunkType" : "s",
- "urls" : subUrls2 }]);
- var addUpdate = buildPhishingUpdate(
- [{ "chunkNum" : 3,
- "urls" : addUrls }]);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:3:s:1-2",
- "urlsExist" : [ "foo.com/c" ],
- "urlsDontExist" : [ "foo.com/a", "foo.com/b" ],
- "subsDontExist" : [ "foo.com/a", "foo.com/b" ]
- };
-
- doTest([subUpdate1, subUpdate2, addUpdate], assertions);
-}
-
-// for bug 534079
-function testSubsDifferentChunksSameHostId() {
- var subUrls1 = [ "1:foo.com/a" ];
- var subUrls2 = [ "1:foo.com/b", "2:foo.com/c" ];
-
- var addUrls = [ "foo.com/a", "foo.com/b" ];
- var addUrls2 = [ "foo.com/c" ];
-
- var subUpdate1 = buildPhishingUpdate(
- [{ "chunkNum" : 1,
- "chunkType" : "s",
- "urls": subUrls1 }]);
- var subUpdate2 = buildPhishingUpdate(
- [{ "chunkNum" : 2,
- "chunkType" : "s",
- "urls" : subUrls2 }]);
-
- var addUpdate = buildPhishingUpdate(
- [{ "chunkNum" : 1,
- "urls" : addUrls }]);
- var addUpdate2 = buildPhishingUpdate(
- [{ "chunkNum" : 2,
- "urls" : addUrls2 }]);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1-2:s:1-2",
- "urlsDontExist" : [ "foo.com/c", "foo.com/b", "foo.com/a", ],
- };
-
- doTest([addUpdate, addUpdate2, subUpdate1, subUpdate2], assertions);
-}
-
-// Test lists of expired chunks
-function testExpireLists() {
- var addUpdate = buildPhishingUpdate(
- [
- { "chunkNum" : 1,
- "urls" : [ "foo.com/a" ]
- },
- { "chunkNum" : 3,
- "urls" : [ "bar.com/a" ]
- },
- { "chunkNum" : 4,
- "urls" : [ "baz.com/a" ]
- },
- { "chunkNum" : 5,
- "urls" : [ "blah.com/a" ]
- },
- ]);
- var subUpdate = buildPhishingUpdate(
- [
- { "chunkNum" : 1,
- "chunkType" : "s",
- "urls" : [ "50:foo.com/1" ]
- },
- { "chunkNum" : 2,
- "chunkType" : "s",
- "urls" : [ "50:bar.com/1" ]
- },
- { "chunkNum" : 3,
- "chunkType" : "s",
- "urls" : [ "50:baz.com/1" ]
- },
- { "chunkNum" : 5,
- "chunkType" : "s",
- "urls" : [ "50:blah.com/1" ]
- },
- ]);
-
- var expireUpdate = buildPhishingUpdate(
- [ { "chunkType" : "ad:1,3-5" },
- { "chunkType" : "sd:1-3,5" }]);
-
- var assertions = {
- // "tableData" : "test-phish-simple;"
- "tableData": ""
- };
-
- doTest([addUpdate, subUpdate, expireUpdate], assertions);
-}
-
-// Test a duplicate add chunk.
-function testDuplicateAddChunks() {
- var addUrls1 = [ "foo.com/a" ];
- var addUrls2 = [ "bar.com/b" ];
- var update = buildPhishingUpdate(
- [
- { "chunkNum" : 1,
- "urls" : addUrls1
- },
- { "chunkNum" : 1,
- "urls" : addUrls2
- }]);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1",
- "urlsExist" : addUrls1,
- "urlsDontExist" : addUrls2
- };
-
- doTest([update], assertions);
-}
-
-// This test is a bit tricky. We want to test that an add removes all
-// subs with the same add chunk id, even if there is no match. To do
-// that we need to add the same add chunk twice, with an expiration
-// in the middle. This would be easier if subsDontExist actually
-// worked...
-function testExpireWholeSub()
-{
- var subUrls = ["1:foo.com/a"];
-
- var update = buildPhishingUpdate(
- [{ "chunkNum" : 5,
- "chunkType" : "s",
- "urls" : subUrls
- },
- // empty add chunk should still cause foo.com/a to go away.
- { "chunkNum" : 1,
- "urls" : []
- },
- // and now adding chunk 1 again with foo.com/a should succeed,
- // because the sub should have been expired with the empty
- // add chunk.
-
- // we need to expire this chunk to let us add chunk 1 again.
- {
- "chunkType" : "ad:1"
- },
- { "chunkNum" : 1,
- "urls" : [ "foo.com/a" ]
- }]);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1:s:5",
- "urlsExist" : ["foo.com/a"]
- };
-
- doTest([update], assertions);
-}
-
-
-// This test is roughly the opposite of testExpireWholeSub(). We add
-// the empty add first, and make sure that it prevents a sub for that
-// add from being applied.
-function testPreventWholeSub()
-{
- var subUrls = ["1:foo.com/a"];
-
- var update = buildPhishingUpdate(
- [ // empty add chunk should cause foo.com/a to not be saved
- { "chunkNum" : 1,
- "urls" : []
- },
- { "chunkNum" : 5,
- "chunkType" : "s",
- "urls" : subUrls
- },
- // and now adding chunk 1 again with foo.com/a should succeed,
- // because the sub should have been expired with the empty
- // add chunk.
-
- // we need to expire this chunk to let us add chunk 1 again.
- {
- "chunkType" : "ad:1"
- },
- { "chunkNum" : 1,
- "urls" : [ "foo.com/a" ]
- }]);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1:s:5",
- "urlsExist" : ["foo.com/a"]
- };
-
- doTest([update], assertions);
-}
-
-function run_test()
-{
- runTests([
- testSimpleAdds,
- testMultipleAdds,
- testSimpleSub,
- testSubEmptiesAdd,
- testSubPartiallyEmptiesAdd,
- testPendingSubRemoved,
- testPendingSubExpire,
- testDuplicateAdds,
- testSubPartiallyMatches,
- testSubPartiallyMatches2,
- testSubsDifferentChunks,
- testSubsDifferentChunksSameHostId,
- testExpireLists
- ]);
-}
-
-do_test_pending();
diff --git a/toolkit/components/url-classifier/tests/unit/test_backoff.js b/toolkit/components/url-classifier/tests/unit/test_backoff.js
deleted file mode 100644
index 365568c479..0000000000
--- a/toolkit/components/url-classifier/tests/unit/test_backoff.js
+++ /dev/null
@@ -1,89 +0,0 @@
-// Some unittests (e.g., paste into JS shell)
-var jslib = Cc["@mozilla.org/url-classifier/jslib;1"].
- getService().wrappedJSObject;
-var _Datenow = jslib.Date.now;
-function setNow(time) {
- jslib.Date.now = function() {
- return time;
- }
-}
-
-function run_test() {
- // 3 errors, 1ms retry period, max 3 requests per ten milliseconds,
- // 5ms backoff interval, 19ms max delay
- var rb = new jslib.RequestBackoff(3, 1, 3, 10, 5, 19);
- setNow(1);
- rb.noteServerResponse(200);
- do_check_true(rb.canMakeRequest());
- setNow(2);
- do_check_true(rb.canMakeRequest());
-
- // First error should trigger a 1ms delay
- rb.noteServerResponse(500);
- do_check_false(rb.canMakeRequest());
- do_check_eq(rb.nextRequestTime_, 3);
- setNow(3);
- do_check_true(rb.canMakeRequest());
-
- // Second error should also trigger a 1ms delay
- rb.noteServerResponse(500);
- do_check_false(rb.canMakeRequest());
- do_check_eq(rb.nextRequestTime_, 4);
- setNow(4);
- do_check_true(rb.canMakeRequest());
-
- // Third error should trigger a 5ms backoff
- rb.noteServerResponse(500);
- do_check_false(rb.canMakeRequest());
- do_check_eq(rb.nextRequestTime_, 9);
- setNow(9);
- do_check_true(rb.canMakeRequest());
-
- // Trigger backoff again
- rb.noteServerResponse(503);
- do_check_false(rb.canMakeRequest());
- do_check_eq(rb.nextRequestTime_, 19);
- setNow(19);
- do_check_true(rb.canMakeRequest());
-
- // Trigger backoff a third time and hit max timeout
- rb.noteServerResponse(302);
- do_check_false(rb.canMakeRequest());
- do_check_eq(rb.nextRequestTime_, 38);
- setNow(38);
- do_check_true(rb.canMakeRequest());
-
- // One more backoff, should still be at the max timeout
- rb.noteServerResponse(400);
- do_check_false(rb.canMakeRequest());
- do_check_eq(rb.nextRequestTime_, 57);
- setNow(57);
- do_check_true(rb.canMakeRequest());
-
- // Request goes through
- rb.noteServerResponse(200);
- do_check_true(rb.canMakeRequest());
- do_check_eq(rb.nextRequestTime_, 0);
- setNow(58);
- rb.noteServerResponse(500);
-
- // Another error, should trigger a 1ms backoff
- do_check_false(rb.canMakeRequest());
- do_check_eq(rb.nextRequestTime_, 59);
-
- setNow(59);
- do_check_true(rb.canMakeRequest());
-
- setNow(200);
- rb.noteRequest();
- setNow(201);
- rb.noteRequest();
- setNow(202);
- do_check_true(rb.canMakeRequest());
- rb.noteRequest();
- do_check_false(rb.canMakeRequest());
- setNow(211);
- do_check_true(rb.canMakeRequest());
-
- jslib.Date.now = _Datenow;
-}
diff --git a/toolkit/components/url-classifier/tests/unit/test_bug1274685_unowned_list.js b/toolkit/components/url-classifier/tests/unit/test_bug1274685_unowned_list.js
deleted file mode 100644
index 037bc7b884..0000000000
--- a/toolkit/components/url-classifier/tests/unit/test_bug1274685_unowned_list.js
+++ /dev/null
@@ -1,32 +0,0 @@
-Cu.import("resource://gre/modules/SafeBrowsing.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://testing-common/AppInfo.jsm");
-
-// 'Cc["@mozilla.org/xre/app-info;1"]' for xpcshell has no nsIXULAppInfo
-// so that we have to update it to make nsURLFormatter.js happy.
-// (SafeBrowsing.init() will indirectly use nsURLFormatter.js)
-updateAppInfo();
-
-function run_test() {
- SafeBrowsing.init();
-
- let origList = Services.prefs.getCharPref("browser.safebrowsing.provider.google.lists");
-
- // Remove 'goog-malware-shavar' from the original.
- let trimmedList = origList.replace('goog-malware-shavar,', '');
- Services.prefs.setCharPref("browser.safebrowsing.provider.google.lists", trimmedList);
-
- try {
- // Bug 1274685 - Unowned Safe Browsing tables break list updates
- //
- // If SafeBrowsing.registerTableWithURLs() doesn't check if
- // a provider is found before registering table, an exception
- // will be thrown while accessing a null object.
- //
- SafeBrowsing.registerTables();
- } catch (e) {
- ok(false, 'Exception thrown due to ' + e.toString());
- }
-
- Services.prefs.setCharPref("browser.safebrowsing.provider.google.lists", origList);
-}
diff --git a/toolkit/components/url-classifier/tests/unit/test_dbservice.js b/toolkit/components/url-classifier/tests/unit/test_dbservice.js
deleted file mode 100644
index 4b01e7016c..0000000000
--- a/toolkit/components/url-classifier/tests/unit/test_dbservice.js
+++ /dev/null
@@ -1,314 +0,0 @@
-var checkUrls = [];
-var checkExpect;
-
-var chunk1Urls = [
- "test.com/aba",
- "test.com/foo/bar",
- "foo.bar.com/a/b/c"
-];
-var chunk1 = chunk1Urls.join("\n");
-
-var chunk2Urls = [
- "blah.com/a",
- "baz.com/",
- "255.255.0.1/",
- "www.foo.com/test2?param=1"
-];
-var chunk2 = chunk2Urls.join("\n");
-
-var chunk3Urls = [
- "test.com/a",
- "foo.bar.com/a",
- "blah.com/a",
- ];
-var chunk3 = chunk3Urls.join("\n");
-
-var chunk3SubUrls = [
- "1:test.com/a",
- "1:foo.bar.com/a",
- "2:blah.com/a" ];
-var chunk3Sub = chunk3SubUrls.join("\n");
-
-var chunk4Urls = [
- "a.com/b",
- "b.com/c",
- ];
-var chunk4 = chunk4Urls.join("\n");
-
-var chunk5Urls = [
- "d.com/e",
- "f.com/g",
- ];
-var chunk5 = chunk5Urls.join("\n");
-
-var chunk6Urls = [
- "h.com/i",
- "j.com/k",
- ];
-var chunk6 = chunk6Urls.join("\n");
-
-var chunk7Urls = [
- "l.com/m",
- "n.com/o",
- ];
-var chunk7 = chunk7Urls.join("\n");
-
-// we are going to add chunks 1, 2, 4, 5, and 6 to phish-simple,
-// chunk 2 to malware-simple, and chunk 3 to unwanted-simple,
-// and chunk 7 to block-simple.
-// Then we'll remove the urls in chunk3 from phish-simple, then
-// expire chunk 1 and chunks 4-7 from phish-simple.
-var phishExpected = {};
-var phishUnexpected = {};
-var malwareExpected = {};
-var unwantedExpected = {};
-var blockedExpected = {};
-for (var i = 0; i < chunk2Urls.length; i++) {
- phishExpected[chunk2Urls[i]] = true;
- malwareExpected[chunk2Urls[i]] = true;
-}
-for (var i = 0; i < chunk3Urls.length; i++) {
- unwantedExpected[chunk3Urls[i]] = true;
- delete phishExpected[chunk3Urls[i]];
- phishUnexpected[chunk3Urls[i]] = true;
-}
-for (var i = 0; i < chunk1Urls.length; i++) {
- // chunk1 urls are expired
- phishUnexpected[chunk1Urls[i]] = true;
-}
-for (var i = 0; i < chunk4Urls.length; i++) {
- // chunk4 urls are expired
- phishUnexpected[chunk4Urls[i]] = true;
-}
-for (var i = 0; i < chunk5Urls.length; i++) {
- // chunk5 urls are expired
- phishUnexpected[chunk5Urls[i]] = true;
-}
-for (var i = 0; i < chunk6Urls.length; i++) {
- // chunk6 urls are expired
- phishUnexpected[chunk6Urls[i]] = true;
-}
-for (var i = 0; i < chunk7Urls.length; i++) {
- blockedExpected[chunk7Urls[i]] = true;
- // chunk7 urls are expired
- phishUnexpected[chunk7Urls[i]] = true;
-}
-
-// Check that the entries hit based on sub-parts
-phishExpected["baz.com/foo/bar"] = true;
-phishExpected["foo.bar.baz.com/foo"] = true;
-phishExpected["bar.baz.com/"] = true;
-
-var numExpecting;
-
-function testFailure(arg) {
- do_throw(arg);
-}
-
-function checkNoHost()
-{
- // Looking up a no-host uri such as a data: uri should throw an exception.
- var exception;
- try {
- var principal = secMan.createCodebasePrincipal(iosvc.newURI("data:text/html,<b>test</b>", null, null), {});
- dbservice.lookup(principal, allTables);
-
- exception = false;
- } catch(e) {
- exception = true;
- }
- do_check_true(exception);
-
- do_test_finished();
-}
-
-function tablesCallbackWithoutSub(tables)
-{
- var parts = tables.split("\n");
- parts.sort();
-
- // there's a leading \n here because splitting left an empty string
- // after the trailing newline, which will sort first
- do_check_eq(parts.join("\n"),
- "\ntest-block-simple;a:1\ntest-malware-simple;a:1\ntest-phish-simple;a:2\ntest-unwanted-simple;a:1");
-
- checkNoHost();
-}
-
-
-function expireSubSuccess(result) {
- dbservice.getTables(tablesCallbackWithoutSub);
-}
-
-function tablesCallbackWithSub(tables)
-{
- var parts = tables.split("\n");
- parts.sort();
-
- // there's a leading \n here because splitting left an empty string
- // after the trailing newline, which will sort first
- do_check_eq(parts.join("\n"),
- "\ntest-block-simple;a:1\ntest-malware-simple;a:1\ntest-phish-simple;a:2:s:3\ntest-unwanted-simple;a:1");
-
- // verify that expiring a sub chunk removes its name from the list
- var data =
- "n:1000\n" +
- "i:test-phish-simple\n" +
- "sd:3\n";
-
- doSimpleUpdate(data, expireSubSuccess, testFailure);
-}
-
-function checkChunksWithSub()
-{
- dbservice.getTables(tablesCallbackWithSub);
-}
-
-function checkDone() {
- if (--numExpecting == 0)
- checkChunksWithSub();
-}
-
-function phishExists(result) {
- dumpn("phishExists: " + result);
- try {
- do_check_true(result.indexOf("test-phish-simple") != -1);
- } finally {
- checkDone();
- }
-}
-
-function phishDoesntExist(result) {
- dumpn("phishDoesntExist: " + result);
- try {
- do_check_true(result.indexOf("test-phish-simple") == -1);
- } finally {
- checkDone();
- }
-}
-
-function malwareExists(result) {
- dumpn("malwareExists: " + result);
-
- try {
- do_check_true(result.indexOf("test-malware-simple") != -1);
- } finally {
- checkDone();
- }
-}
-
-function unwantedExists(result) {
- dumpn("unwantedExists: " + result);
-
- try {
- do_check_true(result.indexOf("test-unwanted-simple") != -1);
- } finally {
- checkDone();
- }
-}
-
-function blockedExists(result) {
- dumpn("blockedExists: " + result);
-
- try {
- do_check_true(result.indexOf("test-block-simple") != -1);
- } finally {
- checkDone();
- }
-}
-
-function checkState()
-{
- numExpecting = 0;
-
-
- for (var key in phishExpected) {
- var principal = secMan.createCodebasePrincipal(iosvc.newURI("http://" + key, null, null), {});
- dbservice.lookup(principal, allTables, phishExists, true);
- numExpecting++;
- }
-
- for (var key in phishUnexpected) {
- var principal = secMan.createCodebasePrincipal(iosvc.newURI("http://" + key, null, null), {});
- dbservice.lookup(principal, allTables, phishDoesntExist, true);
- numExpecting++;
- }
-
- for (var key in malwareExpected) {
- var principal = secMan.createCodebasePrincipal(iosvc.newURI("http://" + key, null, null), {});
- dbservice.lookup(principal, allTables, malwareExists, true);
- numExpecting++;
- }
-
- for (var key in unwantedExpected) {
- var principal = secMan.createCodebasePrincipal(iosvc.newURI("http://" + key, null, null), {});
- dbservice.lookup(principal, allTables, unwantedExists, true);
- numExpecting++;
- }
-
- for (var key in blockedExpected) {
- var principal = secMan.createCodebasePrincipal(iosvc.newURI("http://" + key, null, null), {});
- dbservice.lookup(principal, allTables, blockedExists, true);
- numExpecting++;
- }
-}
-
-function testSubSuccess(result)
-{
- do_check_eq(result, "1000");
- checkState();
-}
-
-function do_subs() {
- var data =
- "n:1000\n" +
- "i:test-phish-simple\n" +
- "s:3:32:" + chunk3Sub.length + "\n" +
- chunk3Sub + "\n" +
- "ad:1\n" +
- "ad:4-6\n";
-
- doSimpleUpdate(data, testSubSuccess, testFailure);
-}
-
-function testAddSuccess(arg) {
- do_check_eq(arg, "1000");
-
- do_subs();
-}
-
-function do_adds() {
- // This test relies on the fact that only -regexp tables are ungzipped,
- // and only -hash tables are assumed to be pre-md5'd. So we use
- // a 'simple' table type to get simple hostname-per-line semantics.
-
- var data =
- "n:1000\n" +
- "i:test-phish-simple\n" +
- "a:1:32:" + chunk1.length + "\n" +
- chunk1 + "\n" +
- "a:2:32:" + chunk2.length + "\n" +
- chunk2 + "\n" +
- "a:4:32:" + chunk4.length + "\n" +
- chunk4 + "\n" +
- "a:5:32:" + chunk5.length + "\n" +
- chunk5 + "\n" +
- "a:6:32:" + chunk6.length + "\n" +
- chunk6 + "\n" +
- "i:test-malware-simple\n" +
- "a:1:32:" + chunk2.length + "\n" +
- chunk2 + "\n" +
- "i:test-unwanted-simple\n" +
- "a:1:32:" + chunk3.length + "\n" +
- chunk3 + "\n" +
- "i:test-block-simple\n" +
- "a:1:32:" + chunk7.length + "\n" +
- chunk7 + "\n";
-
- doSimpleUpdate(data, testAddSuccess, testFailure);
-}
-
-function run_test() {
- do_adds();
- do_test_pending();
-}
diff --git a/toolkit/components/url-classifier/tests/unit/test_digest256.js b/toolkit/components/url-classifier/tests/unit/test_digest256.js
deleted file mode 100644
index 6ae6529159..0000000000
--- a/toolkit/components/url-classifier/tests/unit/test_digest256.js
+++ /dev/null
@@ -1,147 +0,0 @@
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
- "resource://gre/modules/NetUtil.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Promise",
- "resource://gre/modules/Promise.jsm");
-// Global test server for serving safebrowsing updates.
-var gHttpServ = null;
-// Global nsIUrlClassifierDBService
-var gDbService = Cc["@mozilla.org/url-classifier/dbservice;1"]
- .getService(Ci.nsIUrlClassifierDBService);
-// Security manager for creating nsIPrincipals from URIs
-var gSecMan = Cc["@mozilla.org/scriptsecuritymanager;1"]
- .getService(Ci.nsIScriptSecurityManager);
-
-// A map of tables to arrays of update redirect urls.
-var gTables = {};
-
-// Construct an update from a file.
-function readFileToString(aFilename) {
- let f = do_get_file(aFilename);
- let stream = Cc["@mozilla.org/network/file-input-stream;1"]
- .createInstance(Ci.nsIFileInputStream);
- stream.init(f, -1, 0, 0);
- let buf = NetUtil.readInputStreamToString(stream, stream.available());
- return buf;
-}
-
-// Registers a table for which to serve update chunks. Returns a promise that
-// resolves when that chunk has been downloaded.
-function registerTableUpdate(aTable, aFilename) {
- let deferred = Promise.defer();
- // If we haven't been given an update for this table yet, add it to the map
- if (!(aTable in gTables)) {
- gTables[aTable] = [];
- }
-
- // The number of chunks associated with this table.
- let numChunks = gTables[aTable].length + 1;
- let redirectPath = "/" + aTable + "-" + numChunks;
- let redirectUrl = "localhost:4444" + redirectPath;
-
- // Store redirect url for that table so we can return it later when we
- // process an update request.
- gTables[aTable].push(redirectUrl);
-
- gHttpServ.registerPathHandler(redirectPath, function(request, response) {
- do_print("Mock safebrowsing server handling request for " + redirectPath);
- let contents = readFileToString(aFilename);
- response.setHeader("Content-Type",
- "application/vnd.google.safebrowsing-update", false);
- response.setStatusLine(request.httpVersion, 200, "OK");
- response.bodyOutputStream.write(contents, contents.length);
- deferred.resolve(contents);
- });
- return deferred.promise;
-}
-
-// Construct a response with redirect urls.
-function processUpdateRequest() {
- let response = "n:1000\n";
- for (let table in gTables) {
- response += "i:" + table + "\n";
- for (let i = 0; i < gTables[table].length; ++i) {
- response += "u:" + gTables[table][i] + "\n";
- }
- }
- do_print("Returning update response: " + response);
- return response;
-}
-
-// Set up our test server to handle update requests.
-function run_test() {
- gHttpServ = new HttpServer();
- gHttpServ.registerDirectory("/", do_get_cwd());
-
- gHttpServ.registerPathHandler("/downloads", function(request, response) {
- let buf = NetUtil.readInputStreamToString(request.bodyInputStream,
- request.bodyInputStream.available());
- let blob = processUpdateRequest();
- response.setHeader("Content-Type",
- "application/vnd.google.safebrowsing-update", false);
- response.setStatusLine(request.httpVersion, 200, "OK");
- response.bodyOutputStream.write(blob, blob.length);
- });
-
- gHttpServ.start(4444);
- run_next_test();
-}
-
-function createURI(s) {
- let service = Cc["@mozilla.org/network/io-service;1"]
- .getService(Ci.nsIIOService);
- return service.newURI(s, null, null);
-}
-
-// Just throw if we ever get an update or download error.
-function handleError(aEvent) {
- do_throw("We didn't download or update correctly: " + aEvent);
-}
-
-add_test(function test_update() {
- let streamUpdater = Cc["@mozilla.org/url-classifier/streamupdater;1"]
- .getService(Ci.nsIUrlClassifierStreamUpdater);
-
- // Load up some update chunks for the safebrowsing server to serve.
- registerTableUpdate("goog-downloadwhite-digest256", "data/digest1.chunk");
- registerTableUpdate("goog-downloadwhite-digest256", "data/digest2.chunk");
-
- // Download some updates, and don't continue until the downloads are done.
- function updateSuccess(aEvent) {
- // Timeout of n:1000 is constructed in processUpdateRequest above and
- // passed back in the callback in nsIUrlClassifierStreamUpdater on success.
- do_check_eq("1000", aEvent);
- do_print("All data processed");
- run_next_test();
- }
- streamUpdater.downloadUpdates(
- "goog-downloadwhite-digest256",
- "goog-downloadwhite-digest256;\n",
- true,
- "http://localhost:4444/downloads",
- updateSuccess, handleError, handleError);
-});
-
-add_test(function test_url_not_whitelisted() {
- let uri = createURI("http://example.com");
- let principal = gSecMan.createCodebasePrincipal(uri, {});
- gDbService.lookup(principal, "goog-downloadwhite-digest256",
- function handleEvent(aEvent) {
- // This URI is not on any lists.
- do_check_eq("", aEvent);
- run_next_test();
- });
-});
-
-add_test(function test_url_whitelisted() {
- // Hash of "whitelisted.com/" (canonicalized URL) is:
- // 93CA5F48E15E9861CD37C2D95DB43D23CC6E6DE5C3F8FA6E8BE66F97CC518907
- let uri = createURI("http://whitelisted.com");
- let principal = gSecMan.createCodebasePrincipal(uri, {});
- gDbService.lookup(principal, "goog-downloadwhite-digest256",
- function handleEvent(aEvent) {
- do_check_eq("goog-downloadwhite-digest256", aEvent);
- run_next_test();
- });
-});
diff --git a/toolkit/components/url-classifier/tests/unit/test_hashcompleter.js b/toolkit/components/url-classifier/tests/unit/test_hashcompleter.js
deleted file mode 100644
index 40fafd9230..0000000000
--- a/toolkit/components/url-classifier/tests/unit/test_hashcompleter.js
+++ /dev/null
@@ -1,403 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// This test ensures that the nsIUrlClassifierHashCompleter works as expected
-// and simulates an HTTP server to provide completions.
-//
-// In order to test completions, each group of completions sent as one request
-// to the HTTP server is called a completion set. There is currently not
-// support for multiple requests being sent to the server at once, in this test.
-// This tests makes a request for each element of |completionSets|, waits for
-// a response and then moves to the next element.
-// Each element of |completionSets| is an array of completions, and each
-// completion is an object with the properties:
-// hash: complete hash for the completion. Automatically right-padded
-// to be COMPLETE_LENGTH.
-// expectCompletion: boolean indicating whether the server should respond
-// with a full hash.
-// forceServerError: boolean indicating whether the server should respond
-// with a 503.
-// table: name of the table that the hash corresponds to. Only needs to be set
-// if a completion is expected.
-// chunkId: positive integer corresponding to the chunk that the hash belongs
-// to. Only needs to be set if a completion is expected.
-// multipleCompletions: boolean indicating whether the server should respond
-// with more than one full hash. If this is set to true
-// then |expectCompletion| must also be set to true and
-// |hash| must have the same prefix as all |completions|.
-// completions: an array of completions (objects with a hash, table and
-// chunkId property as described above). This property is only
-// used when |multipleCompletions| is set to true.
-
-// Basic prefixes with 2/3 completions.
-var basicCompletionSet = [
- {
- hash: "abcdefgh",
- expectCompletion: true,
- table: "test",
- chunkId: 1234,
- },
- {
- hash: "1234",
- expectCompletion: false,
- },
- {
- hash: "\u0000\u0000\u000012312",
- expectCompletion: true,
- table: "test",
- chunkId: 1234,
- }
-];
-
-// 3 prefixes with 0 completions to test HashCompleter handling a 204 status.
-var falseCompletionSet = [
- {
- hash: "1234",
- expectCompletion: false,
- },
- {
- hash: "",
- expectCompletion: false,
- },
- {
- hash: "abc",
- expectCompletion: false,
- }
-];
-
-// The current implementation (as of Mar 2011) sometimes sends duplicate
-// entries to HashCompleter and even expects responses for duplicated entries.
-var dupedCompletionSet = [
- {
- hash: "1234",
- expectCompletion: true,
- table: "test",
- chunkId: 1,
- },
- {
- hash: "5678",
- expectCompletion: false,
- table: "test2",
- chunkId: 2,
- },
- {
- hash: "1234",
- expectCompletion: true,
- table: "test",
- chunkId: 1,
- },
- {
- hash: "5678",
- expectCompletion: false,
- table: "test2",
- chunkId: 2
- }
-];
-
-// It is possible for a hash completion request to return with multiple
-// completions, the HashCompleter should return all of these.
-var multipleResponsesCompletionSet = [
- {
- hash: "1234",
- expectCompletion: true,
- multipleCompletions: true,
- completions: [
- {
- hash: "123456",
- table: "test1",
- chunkId: 3,
- },
- {
- hash: "123478",
- table: "test2",
- chunkId: 4,
- }
- ],
- }
-];
-
-function buildCompletionRequest(aCompletionSet) {
- let prefixes = [];
- let prefixSet = new Set();
- aCompletionSet.forEach(s => {
- let prefix = s.hash.substring(0, 4);
- if (prefixSet.has(prefix)) {
- return;
- }
- prefixSet.add(prefix);
- prefixes.push(prefix);
- });
- return 4 + ":" + (4 * prefixes.length) + "\n" + prefixes.join("");
-}
-
-function parseCompletionRequest(aRequest) {
- // Format: [partial_length]:[num_of_prefix * partial_length]\n[prefixes_data]
-
- let tokens = /(\d):(\d+)/.exec(aRequest);
- if (tokens.length < 3) {
- dump("Request format error.");
- return null;
- }
-
- let partialLength = parseInt(tokens[1]);
- let payloadLength = parseInt(tokens[2]);
-
- let payloadStart = tokens[1].length + // partial length
- 1 + // ':'
- tokens[2].length + // payload length
- 1; // '\n'
-
- let prefixSet = [];
- for (let i = payloadStart; i < aRequest.length; i += partialLength) {
- let prefix = aRequest.substr(i, partialLength);
- if (prefix.length !== partialLength) {
- dump("Header info not correct: " + aRequest.substr(0, payloadStart));
- return null;
- }
- prefixSet.push(prefix);
- }
- prefixSet.sort();
-
- return prefixSet;
-}
-
-// Compare the requests in string format.
-function compareCompletionRequest(aRequest1, aRequest2) {
- let prefixSet1 = parseCompletionRequest(aRequest1);
- let prefixSet2 = parseCompletionRequest(aRequest2);
-
- return equal(JSON.stringify(prefixSet1), JSON.stringify(prefixSet2));
-}
-
-// The fifth completion set is added at runtime by getRandomCompletionSet.
-// Each completion in the set only has one response and its purpose is to
-// provide an easy way to test the HashCompleter handling an arbitrarily large
-// completion set (determined by SIZE_OF_RANDOM_SET).
-const SIZE_OF_RANDOM_SET = 16;
-function getRandomCompletionSet(forceServerError) {
- let completionSet = [];
- let hashPrefixes = [];
-
- let seed = Math.floor(Math.random() * Math.pow(2, 32));
- dump("Using seed of " + seed + " for random completion set.\n");
- let rand = new LFSRgenerator(seed);
-
- for (let i = 0; i < SIZE_OF_RANDOM_SET; i++) {
- let completion = { expectCompletion: false, forceServerError: false, _finished: false };
-
- // Generate a random 256 bit hash. First we get a random number and then
- // convert it to a string.
- let hash;
- let prefix;
- do {
- hash = "";
- let length = 1 + rand.nextNum(5);
- for (let i = 0; i < length; i++)
- hash += String.fromCharCode(rand.nextNum(8));
- prefix = hash.substring(0,4);
- } while (hashPrefixes.indexOf(prefix) != -1);
-
- hashPrefixes.push(prefix);
- completion.hash = hash;
-
- if (!forceServerError) {
- completion.expectCompletion = rand.nextNum(1) == 1;
- } else {
- completion.forceServerError = true;
- }
- if (completion.expectCompletion) {
- // Generate a random alpha-numeric string of length at most 6 for the
- // table name.
- completion.table = (rand.nextNum(31)).toString(36);
-
- completion.chunkId = rand.nextNum(16);
- }
- completionSet.push(completion);
- }
-
- return completionSet;
-}
-
-var completionSets = [basicCompletionSet, falseCompletionSet,
- dupedCompletionSet, multipleResponsesCompletionSet];
-var currentCompletionSet = -1;
-var finishedCompletions = 0;
-
-const SERVER_PORT = 8080;
-const SERVER_PATH = "/hash-completer";
-var server;
-
-// Completion hashes are automatically right-padded with null chars to have a
-// length of COMPLETE_LENGTH.
-// Taken from nsUrlClassifierDBService.h
-const COMPLETE_LENGTH = 32;
-
-var completer = Cc["@mozilla.org/url-classifier/hashcompleter;1"].
- getService(Ci.nsIUrlClassifierHashCompleter);
-
-var gethashUrl;
-
-// Expected highest completion set for which the server sends a response.
-var expectedMaxServerCompletionSet = 0;
-var maxServerCompletionSet = 0;
-
-function run_test() {
- // Generate a random completion set that return successful responses.
- completionSets.push(getRandomCompletionSet(false));
- // We backoff after receiving an error, so requests shouldn't reach the
- // server after that.
- expectedMaxServerCompletionSet = completionSets.length;
- // Generate some completion sets that return 503s.
- for (let j = 0; j < 10; ++j) {
- completionSets.push(getRandomCompletionSet(true));
- }
-
- // Fix up the completions before running the test.
- for (let completionSet of completionSets) {
- for (let completion of completionSet) {
- // Pad the right of each |hash| so that the length is COMPLETE_LENGTH.
- if (completion.multipleCompletions) {
- for (let responseCompletion of completion.completions) {
- let numChars = COMPLETE_LENGTH - responseCompletion.hash.length;
- responseCompletion.hash += (new Array(numChars + 1)).join("\u0000");
- }
- }
- else {
- let numChars = COMPLETE_LENGTH - completion.hash.length;
- completion.hash += (new Array(numChars + 1)).join("\u0000");
- }
- }
- }
- do_test_pending();
-
- server = new HttpServer();
- server.registerPathHandler(SERVER_PATH, hashCompleterServer);
-
- server.start(-1);
- const SERVER_PORT = server.identity.primaryPort;
-
- gethashUrl = "http://localhost:" + SERVER_PORT + SERVER_PATH;
-
- runNextCompletion();
-}
-
-function runNextCompletion() {
- // The server relies on currentCompletionSet to send the correct response, so
- // don't increment it until we start the new set of callbacks.
- currentCompletionSet++;
- if (currentCompletionSet >= completionSets.length) {
- finish();
- return;
- }
-
- dump("Now on completion set index " + currentCompletionSet + ", length " +
- completionSets[currentCompletionSet].length + "\n");
- // Number of finished completions for this set.
- finishedCompletions = 0;
- for (let completion of completionSets[currentCompletionSet]) {
- completer.complete(completion.hash.substring(0,4), gethashUrl,
- (new callback(completion)));
- }
-}
-
-function hashCompleterServer(aRequest, aResponse) {
- let stream = aRequest.bodyInputStream;
- let wrapperStream = Cc["@mozilla.org/binaryinputstream;1"].
- createInstance(Ci.nsIBinaryInputStream);
- wrapperStream.setInputStream(stream);
-
- let len = stream.available();
- let data = wrapperStream.readBytes(len);
-
- // Check if we got the expected completion request.
- let expectedRequest = buildCompletionRequest(completionSets[currentCompletionSet]);
- compareCompletionRequest(data, expectedRequest);
-
- // To avoid a response with duplicate hash completions, we keep track of all
- // completed hash prefixes so far.
- let completedHashes = [];
- let responseText = "";
-
- function responseForCompletion(x) {
- return x.table + ":" + x.chunkId + ":" + x.hash.length + "\n" + x.hash;
- }
- // As per the spec, a server should response with a 204 if there are no
- // full-length hashes that match the prefixes.
- let httpStatus = 204;
- for (let completion of completionSets[currentCompletionSet]) {
- if (completion.expectCompletion &&
- (completedHashes.indexOf(completion.hash) == -1)) {
- completedHashes.push(completion.hash);
-
- if (completion.multipleCompletions)
- responseText += completion.completions.map(responseForCompletion).join("");
- else
- responseText += responseForCompletion(completion);
- }
- if (completion.forceServerError) {
- httpStatus = 503;
- }
- }
-
- dump("Server sending response for " + currentCompletionSet + "\n");
- maxServerCompletionSet = currentCompletionSet;
- if (responseText && httpStatus != 503) {
- aResponse.write(responseText);
- } else {
- aResponse.setStatusLine(null, httpStatus, null);
- }
-}
-
-
-function callback(completion) {
- this._completion = completion;
-}
-
-callback.prototype = {
- completion: function completion(hash, table, chunkId, trusted) {
- do_check_true(this._completion.expectCompletion);
- if (this._completion.multipleCompletions) {
- for (let completion of this._completion.completions) {
- if (completion.hash == hash) {
- do_check_eq(JSON.stringify(hash), JSON.stringify(completion.hash));
- do_check_eq(table, completion.table);
- do_check_eq(chunkId, completion.chunkId);
-
- completion._completed = true;
-
- if (this._completion.completions.every(x => x._completed))
- this._completed = true;
-
- break;
- }
- }
- }
- else {
- // Hashes are not actually strings and can contain arbitrary data.
- do_check_eq(JSON.stringify(hash), JSON.stringify(this._completion.hash));
- do_check_eq(table, this._completion.table);
- do_check_eq(chunkId, this._completion.chunkId);
-
- this._completed = true;
- }
- },
-
- completionFinished: function completionFinished(status) {
- finishedCompletions++;
- do_check_eq(!!this._completion.expectCompletion, !!this._completed);
- this._completion._finished = true;
-
- // currentCompletionSet can mutate before all of the callbacks are complete.
- if (currentCompletionSet < completionSets.length &&
- finishedCompletions == completionSets[currentCompletionSet].length) {
- runNextCompletion();
- }
- },
-};
-
-function finish() {
- do_check_eq(expectedMaxServerCompletionSet, maxServerCompletionSet);
- server.stop(function() {
- do_test_finished();
- });
-}
diff --git a/toolkit/components/url-classifier/tests/unit/test_listmanager.js b/toolkit/components/url-classifier/tests/unit/test_listmanager.js
deleted file mode 100644
index ba11d930ee..0000000000
--- a/toolkit/components/url-classifier/tests/unit/test_listmanager.js
+++ /dev/null
@@ -1,376 +0,0 @@
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
- "resource://gre/modules/NetUtil.jsm");
-
-// These tables share the same updateURL.
-const TEST_TABLE_DATA_LIST = [
- // 0:
- {
- tableName: "test-listmanager0-digest256",
- providerName: "google",
- updateUrl: "http://localhost:4444/safebrowsing/update",
- gethashUrl: "http://localhost:4444/safebrowsing/gethash0",
- },
-
- // 1:
- {
- tableName: "test-listmanager1-digest256",
- providerName: "google",
- updateUrl: "http://localhost:4444/safebrowsing/update",
- gethashUrl: "http://localhost:4444/safebrowsing/gethash1",
- },
-
- // 2.
- {
- tableName: "test-listmanager2-digest256",
- providerName: "google",
- updateUrl: "http://localhost:4444/safebrowsing/update",
- gethashUrl: "http://localhost:4444/safebrowsing/gethash2",
- }
-];
-
-// These tables have a different update URL (for v4).
-const TEST_TABLE_DATA_V4 = {
- tableName: "test-phish-proto",
- providerName: "google4",
- updateUrl: "http://localhost:5555/safebrowsing/update?",
- gethashUrl: "http://localhost:5555/safebrowsing/gethash-v4",
-};
-const TEST_TABLE_DATA_V4_DISABLED = {
- tableName: "test-unwanted-proto",
- providerName: "google4",
- updateUrl: "http://localhost:5555/safebrowsing/update?",
- gethashUrl: "http://localhost:5555/safebrowsing/gethash-v4",
-};
-
-const PREF_NEXTUPDATETIME = "browser.safebrowsing.provider.google.nextupdatetime";
-const PREF_NEXTUPDATETIME_V4 = "browser.safebrowsing.provider.google4.nextupdatetime";
-
-let gListManager = Cc["@mozilla.org/url-classifier/listmanager;1"]
- .getService(Ci.nsIUrlListManager);
-
-let gUrlUtils = Cc["@mozilla.org/url-classifier/utils;1"]
- .getService(Ci.nsIUrlClassifierUtils);
-
-// Global test server for serving safebrowsing updates.
-let gHttpServ = null;
-let gUpdateResponse = "";
-let gExpectedUpdateRequest = "";
-let gExpectedQueryV4 = "";
-
-// Handles request for TEST_TABLE_DATA_V4.
-let gHttpServV4 = null;
-
-// These two variables are used to synchronize the last two racing updates
-// (in terms of "update URL") in test_update_all_tables().
-let gUpdatedCntForTableData = 0; // For TEST_TABLE_DATA_LIST.
-let gIsV4Updated = false; // For TEST_TABLE_DATA_V4.
-
-const NEW_CLIENT_STATE = 'sta\0te';
-const CHECKSUM = '\x30\x67\xc7\x2c\x5e\x50\x1c\x31\xe3\xfe\xca\x73\xf0\x47\xdc\x34\x1a\x95\x63\x99\xec\x70\x5e\x0a\xee\x9e\xfb\x17\xa1\x55\x35\x78';
-
-prefBranch.setBoolPref("browser.safebrowsing.debug", true);
-
-// The "\xFF\xFF" is to generate a base64 string with "/".
-prefBranch.setCharPref("browser.safebrowsing.id", "Firefox\xFF\xFF");
-
-// Register tables.
-TEST_TABLE_DATA_LIST.forEach(function(t) {
- gListManager.registerTable(t.tableName,
- t.providerName,
- t.updateUrl,
- t.gethashUrl);
-});
-
-gListManager.registerTable(TEST_TABLE_DATA_V4.tableName,
- TEST_TABLE_DATA_V4.providerName,
- TEST_TABLE_DATA_V4.updateUrl,
- TEST_TABLE_DATA_V4.gethashUrl);
-
-// To test Bug 1302044.
-gListManager.registerTable(TEST_TABLE_DATA_V4_DISABLED.tableName,
- TEST_TABLE_DATA_V4_DISABLED.providerName,
- TEST_TABLE_DATA_V4_DISABLED.updateUrl,
- TEST_TABLE_DATA_V4_DISABLED.gethashUrl);
-
-const SERVER_INVOLVED_TEST_CASE_LIST = [
- // - Do table0 update.
- // - Server would respond "a:5:32:32\n[DATA]".
- function test_update_table0() {
- disableAllUpdates();
-
- gListManager.enableUpdate(TEST_TABLE_DATA_LIST[0].tableName);
- gExpectedUpdateRequest = TEST_TABLE_DATA_LIST[0].tableName + ";\n";
-
- gUpdateResponse = "n:1000\ni:" + TEST_TABLE_DATA_LIST[0].tableName + "\n";
- gUpdateResponse += readFileToString("data/digest2.chunk");
-
- forceTableUpdate();
- },
-
- // - Do table0 update again. Since chunk 5 was added to table0 in the last
- // update, the expected request contains "a:5".
- // - Server would respond "s;2-12\n[DATA]".
- function test_update_table0_with_existing_chunks() {
- disableAllUpdates();
-
- gListManager.enableUpdate(TEST_TABLE_DATA_LIST[0].tableName);
- gExpectedUpdateRequest = TEST_TABLE_DATA_LIST[0].tableName + ";a:5\n";
-
- gUpdateResponse = "n:1000\ni:" + TEST_TABLE_DATA_LIST[0].tableName + "\n";
- gUpdateResponse += readFileToString("data/digest1.chunk");
-
- forceTableUpdate();
- },
-
- // - Do all-table update.
- // - Server would respond no chunk control.
- //
- // Note that this test MUST be the last one in the array since we rely on
- // the number of sever-involved test case to synchronize the racing last
- // two udpates for different URL.
- function test_update_all_tables() {
- disableAllUpdates();
-
- // Enable all tables including TEST_TABLE_DATA_V4!
- TEST_TABLE_DATA_LIST.forEach(function(t) {
- gListManager.enableUpdate(t.tableName);
- });
-
- // We register two v4 tables but only enable one of them
- // to verify that the disabled tables are not updated.
- // See Bug 1302044.
- gListManager.enableUpdate(TEST_TABLE_DATA_V4.tableName);
- gListManager.disableUpdate(TEST_TABLE_DATA_V4_DISABLED.tableName);
-
- // Expected results for v2.
- gExpectedUpdateRequest = TEST_TABLE_DATA_LIST[0].tableName + ";a:5:s:2-12\n" +
- TEST_TABLE_DATA_LIST[1].tableName + ";\n" +
- TEST_TABLE_DATA_LIST[2].tableName + ";\n";
- gUpdateResponse = "n:1000\n";
-
- // We test the request against the query string since v4 request
- // would be appened to the query string. The request is generated
- // by protobuf API (binary) then encoded to base64 format.
- let requestV4 = gUrlUtils.makeUpdateRequestV4([TEST_TABLE_DATA_V4.tableName],
- [""],
- 1);
- gExpectedQueryV4 = "&$req=" + requestV4;
-
- forceTableUpdate();
- },
-
-];
-
-SERVER_INVOLVED_TEST_CASE_LIST.forEach(t => add_test(t));
-
-add_test(function test_partialUpdateV4() {
- disableAllUpdates();
-
- gListManager.enableUpdate(TEST_TABLE_DATA_V4.tableName);
-
- // Since the new client state has been responded and saved in
- // test_update_all_tables, this update request should send
- // a partial update to the server.
- let requestV4 = gUrlUtils.makeUpdateRequestV4([TEST_TABLE_DATA_V4.tableName],
- [btoa(NEW_CLIENT_STATE)],
- 1);
- gExpectedQueryV4 = "&$req=" + requestV4;
-
- forceTableUpdate();
-});
-
-// Tests nsIUrlListManager.getGethashUrl.
-add_test(function test_getGethashUrl() {
- TEST_TABLE_DATA_LIST.forEach(function (t) {
- equal(gListManager.getGethashUrl(t.tableName), t.gethashUrl);
- });
- equal(gListManager.getGethashUrl(TEST_TABLE_DATA_V4.tableName),
- TEST_TABLE_DATA_V4.gethashUrl);
- run_next_test();
-});
-
-function run_test() {
- // Setup primary testing server.
- gHttpServ = new HttpServer();
- gHttpServ.registerDirectory("/", do_get_cwd());
-
- gHttpServ.registerPathHandler("/safebrowsing/update", function(request, response) {
- let body = NetUtil.readInputStreamToString(request.bodyInputStream,
- request.bodyInputStream.available());
-
- // Verify if the request is as expected.
- equal(body, gExpectedUpdateRequest);
-
- // Respond the update which is controlled by the test case.
- response.setHeader("Content-Type",
- "application/vnd.google.safebrowsing-update", false);
- response.setStatusLine(request.httpVersion, 200, "OK");
- response.bodyOutputStream.write(gUpdateResponse, gUpdateResponse.length);
-
- gUpdatedCntForTableData++;
-
- if (gUpdatedCntForTableData !== SERVER_INVOLVED_TEST_CASE_LIST.length) {
- // This is not the last test case so run the next once upon the
- // the update success.
- waitForUpdateSuccess(run_next_test);
- return;
- }
-
- if (gIsV4Updated) {
- run_next_test(); // All tests are done. Just finish.
- return;
- }
-
- do_print("Waiting for TEST_TABLE_DATA_V4 to be tested ...");
- });
-
- gHttpServ.start(4444);
-
- // Setup v4 testing server for the different update URL.
- gHttpServV4 = new HttpServer();
- gHttpServV4.registerDirectory("/", do_get_cwd());
-
- gHttpServV4.registerPathHandler("/safebrowsing/update", function(request, response) {
- // V4 update request body should be empty.
- equal(request.bodyInputStream.available(), 0);
-
- // Not on the spec. Found in Chromium source code...
- equal(request.getHeader("X-HTTP-Method-Override"), "POST");
-
- // V4 update request uses GET.
- equal(request.method, "GET");
-
- // V4 append the base64 encoded request to the query string.
- equal(request.queryString, gExpectedQueryV4);
- equal(request.queryString.indexOf('+'), -1);
- equal(request.queryString.indexOf('/'), -1);
-
- // Respond a V2 compatible content for now. In the future we can
- // send a meaningful response to test Bug 1284178 to see if the
- // update is successfully stored to database.
- response.setHeader("Content-Type",
- "application/vnd.google.safebrowsing-update", false);
- response.setStatusLine(request.httpVersion, 200, "OK");
-
- // The protobuf binary represention of response:
- //
- // [
- // {
- // 'threat_type': 2, // SOCIAL_ENGINEERING_PUBLIC
- // 'response_type': 2, // FULL_UPDATE
- // 'new_client_state': 'sta\x00te', // NEW_CLIENT_STATE
- // 'checksum': { "sha256": CHECKSUM }, // CHECKSUM
- // 'additions': { 'compression_type': RAW,
- // 'prefix_size': 4,
- // 'raw_hashes': "00000001000000020000000300000004"}
- // }
- // ]
- //
- let content = "\x0A\x4A\x08\x02\x20\x02\x2A\x18\x08\x01\x12\x14\x08\x04\x12\x10\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x03\x3A\x06\x73\x74\x61\x00\x74\x65\x42\x22\x0A\x20\x30\x67\xC7\x2C\x5E\x50\x1C\x31\xE3\xFE\xCA\x73\xF0\x47\xDC\x34\x1A\x95\x63\x99\xEC\x70\x5E\x0A\xEE\x9E\xFB\x17\xA1\x55\x35\x78\x12\x08\x08\x08\x10\x80\x94\xEB\xDC\x03";
-
- response.bodyOutputStream.write(content, content.length);
-
- if (gIsV4Updated) {
- // This falls to the case where test_partialUpdateV4 is running.
- // We are supposed to have verified the update request contains
- // the state we set in the previous request.
- run_next_test();
- return;
- }
-
- waitUntilMetaDataSaved(NEW_CLIENT_STATE, CHECKSUM, () => {
- gIsV4Updated = true;
-
- if (gUpdatedCntForTableData === SERVER_INVOLVED_TEST_CASE_LIST.length) {
- // All tests are done!
- run_next_test();
- return;
- }
-
- do_print("Wait for all sever-involved tests to be done ...");
- });
-
- });
-
- gHttpServV4.start(5555);
-
- run_next_test();
-}
-
-// A trick to force updating tables. However, before calling this, we have to
-// call disableAllUpdates() first to clean up the updateCheckers in listmanager.
-function forceTableUpdate() {
- prefBranch.setCharPref(PREF_NEXTUPDATETIME, "1");
- prefBranch.setCharPref(PREF_NEXTUPDATETIME_V4, "1");
- gListManager.maybeToggleUpdateChecking();
-}
-
-function disableAllUpdates() {
- TEST_TABLE_DATA_LIST.forEach(t => gListManager.disableUpdate(t.tableName));
- gListManager.disableUpdate(TEST_TABLE_DATA_V4.tableName);
-}
-
-// Since there's no public interface on listmanager to know the update success,
-// we could only rely on the refresh of "nextupdatetime".
-function waitForUpdateSuccess(callback) {
- let nextupdatetime = parseInt(prefBranch.getCharPref(PREF_NEXTUPDATETIME));
- do_print("nextupdatetime: " + nextupdatetime);
- if (nextupdatetime !== 1) {
- callback();
- return;
- }
- do_timeout(1000, waitForUpdateSuccess.bind(null, callback));
-}
-
-// Construct an update from a file.
-function readFileToString(aFilename) {
- let f = do_get_file(aFilename);
- let stream = Cc["@mozilla.org/network/file-input-stream;1"]
- .createInstance(Ci.nsIFileInputStream);
- stream.init(f, -1, 0, 0);
- let buf = NetUtil.readInputStreamToString(stream, stream.available());
- return buf;
-}
-
-function waitUntilMetaDataSaved(expectedState, expectedChecksum, callback) {
- let dbService = Cc["@mozilla.org/url-classifier/dbservice;1"]
- .getService(Ci.nsIUrlClassifierDBService);
-
- dbService.getTables(metaData => {
- do_print("metadata: " + metaData);
- let didCallback = false;
- metaData.split("\n").some(line => {
- // Parse [tableName];[stateBase64]
- let p = line.indexOf(";");
- if (-1 === p) {
- return false; // continue.
- }
- let tableName = line.substring(0, p);
- let metadata = line.substring(p + 1).split(":");
- let stateBase64 = metadata[0];
- let checksumBase64 = metadata[1];
-
- if (tableName !== 'test-phish-proto') {
- return false; // continue.
- }
-
- if (stateBase64 === btoa(expectedState) &&
- checksumBase64 === btoa(expectedChecksum)) {
- do_print('State has been saved to disk!');
- callback();
- didCallback = true;
- }
-
- return true; // break no matter whether the state is matching.
- });
-
- if (!didCallback) {
- do_timeout(1000, waitUntilMetaDataSaved.bind(null, expectedState,
- expectedChecksum,
- callback));
- }
- });
-}
diff --git a/toolkit/components/url-classifier/tests/unit/test_partial.js b/toolkit/components/url-classifier/tests/unit/test_partial.js
deleted file mode 100644
index 83243fb4e7..0000000000
--- a/toolkit/components/url-classifier/tests/unit/test_partial.js
+++ /dev/null
@@ -1,825 +0,0 @@
-
-/**
- * DummyCompleter() lets tests easily specify the results of a partial
- * hash completion request.
- */
-function DummyCompleter() {
- this.fragments = {};
- this.queries = [];
- this.tableName = "test-phish-simple";
-}
-
-DummyCompleter.prototype =
-{
-QueryInterface: function(iid)
-{
- if (!iid.equals(Ci.nsISupports) &&
- !iid.equals(Ci.nsIUrlClassifierHashCompleter)) {
- throw Cr.NS_ERROR_NO_INTERFACE;
- }
- return this;
-},
-
-complete: function(partialHash, gethashUrl, cb)
-{
- this.queries.push(partialHash);
- var fragments = this.fragments;
- var self = this;
- var doCallback = function() {
- if (self.alwaysFail) {
- cb.completionFinished(1);
- return;
- }
- var results;
- if (fragments[partialHash]) {
- for (var i = 0; i < fragments[partialHash].length; i++) {
- var chunkId = fragments[partialHash][i][0];
- var hash = fragments[partialHash][i][1];
- cb.completion(hash, self.tableName, chunkId);
- }
- }
- cb.completionFinished(0);
- }
- var timer = new Timer(0, doCallback);
-},
-
-getHash: function(fragment)
-{
- var converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"].
- createInstance(Ci.nsIScriptableUnicodeConverter);
- converter.charset = "UTF-8";
- var data = converter.convertToByteArray(fragment);
- var ch = Cc["@mozilla.org/security/hash;1"].createInstance(Ci.nsICryptoHash);
- ch.init(ch.SHA256);
- ch.update(data, data.length);
- var hash = ch.finish(false);
- return hash.slice(0, 32);
-},
-
-addFragment: function(chunkId, fragment)
-{
- this.addHash(chunkId, this.getHash(fragment));
-},
-
-// This method allows the caller to generate complete hashes that match the
-// prefix of a real fragment, but have different complete hashes.
-addConflict: function(chunkId, fragment)
-{
- var realHash = this.getHash(fragment);
- var invalidHash = this.getHash("blah blah blah blah blah");
- this.addHash(chunkId, realHash.slice(0, 4) + invalidHash.slice(4, 32));
-},
-
-addHash: function(chunkId, hash)
-{
- var partial = hash.slice(0, 4);
- if (this.fragments[partial]) {
- this.fragments[partial].push([chunkId, hash]);
- } else {
- this.fragments[partial] = [[chunkId, hash]];
- }
-},
-
-compareQueries: function(fragments)
-{
- var expectedQueries = [];
- for (var i = 0; i < fragments.length; i++) {
- expectedQueries.push(this.getHash(fragments[i]).slice(0, 4));
- }
- do_check_eq(this.queries.length, expectedQueries.length);
- expectedQueries.sort();
- this.queries.sort();
- for (var i = 0; i < this.queries.length; i++) {
- do_check_eq(this.queries[i], expectedQueries[i]);
- }
-}
-};
-
-function setupCompleter(table, hits, conflicts)
-{
- var completer = new DummyCompleter();
- completer.tableName = table;
- for (var i = 0; i < hits.length; i++) {
- var chunkId = hits[i][0];
- var fragments = hits[i][1];
- for (var j = 0; j < fragments.length; j++) {
- completer.addFragment(chunkId, fragments[j]);
- }
- }
- for (var i = 0; i < conflicts.length; i++) {
- var chunkId = conflicts[i][0];
- var fragments = conflicts[i][1];
- for (var j = 0; j < fragments.length; j++) {
- completer.addConflict(chunkId, fragments[j]);
- }
- }
-
- dbservice.setHashCompleter(table, completer);
-
- return completer;
-}
-
-function installCompleter(table, fragments, conflictFragments)
-{
- return setupCompleter(table, fragments, conflictFragments);
-}
-
-function installFailingCompleter(table) {
- var completer = setupCompleter(table, [], []);
- completer.alwaysFail = true;
- return completer;
-}
-
-// Helper assertion for checking dummy completer queries
-gAssertions.completerQueried = function(data, cb)
-{
- var completer = data[0];
- completer.compareQueries(data[1]);
- cb();
-}
-
-function doTest(updates, assertions)
-{
- doUpdateTest(updates, assertions, runNextTest, updateError);
-}
-
-// Test an add of two partial urls to a fresh database
-function testPartialAdds() {
- var addUrls = [ "foo.com/a", "foo.com/b", "bar.com/c" ];
- var update = buildPhishingUpdate(
- [
- { "chunkNum" : 1,
- "urls" : addUrls
- }],
- 4);
-
-
- var completer = installCompleter('test-phish-simple', [[1, addUrls]], []);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1",
- "urlsExist" : addUrls,
- "completerQueried" : [completer, addUrls]
- };
-
-
- doTest([update], assertions);
-}
-
-function testPartialAddsWithConflicts() {
- var addUrls = [ "foo.com/a", "foo.com/b", "bar.com/c" ];
- var update = buildPhishingUpdate(
- [
- { "chunkNum" : 1,
- "urls" : addUrls
- }],
- 4);
-
- // Each result will have both a real match and a conflict
- var completer = installCompleter('test-phish-simple',
- [[1, addUrls]],
- [[1, addUrls]]);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1",
- "urlsExist" : addUrls,
- "completerQueried" : [completer, addUrls]
- };
-
- doTest([update], assertions);
-}
-
-// Test whether the fragmenting code does not cause duplicated completions
-function testFragments() {
- var addUrls = [ "foo.com/a/b/c", "foo.net/", "foo.com/c/" ];
- var update = buildPhishingUpdate(
- [
- { "chunkNum" : 1,
- "urls" : addUrls
- }],
- 4);
-
-
- var completer = installCompleter('test-phish-simple', [[1, addUrls]], []);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1",
- "urlsExist" : addUrls,
- "completerQueried" : [completer, addUrls]
- };
-
-
- doTest([update], assertions);
-}
-
-// Test http://code.google.com/p/google-safe-browsing/wiki/Protocolv2Spec
-// section 6.2 example 1
-function testSpecFragments() {
- var probeUrls = [ "a.b.c/1/2.html?param=1" ];
-
- var addUrls = [ "a.b.c/1/2.html",
- "a.b.c/",
- "a.b.c/1/",
- "b.c/1/2.html?param=1",
- "b.c/1/2.html",
- "b.c/",
- "b.c/1/",
- "a.b.c/1/2.html?param=1" ];
-
- var update = buildPhishingUpdate(
- [
- { "chunkNum" : 1,
- "urls" : addUrls
- }],
- 4);
-
-
- var completer = installCompleter('test-phish-simple', [[1, addUrls]], []);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1",
- "urlsExist" : probeUrls,
- "completerQueried" : [completer, addUrls]
- };
-
- doTest([update], assertions);
-
-}
-
-// Test http://code.google.com/p/google-safe-browsing/wiki/Protocolv2Spec
-// section 6.2 example 2
-function testMoreSpecFragments() {
- var probeUrls = [ "a.b.c.d.e.f.g/1.html" ];
-
- var addUrls = [ "a.b.c.d.e.f.g/1.html",
- "a.b.c.d.e.f.g/",
- "c.d.e.f.g/1.html",
- "c.d.e.f.g/",
- "d.e.f.g/1.html",
- "d.e.f.g/",
- "e.f.g/1.html",
- "e.f.g/",
- "f.g/1.html",
- "f.g/" ];
-
- var update = buildPhishingUpdate(
- [
- { "chunkNum" : 1,
- "urls" : addUrls
- }],
- 4);
-
- var completer = installCompleter('test-phish-simple', [[1, addUrls]], []);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1",
- "urlsExist" : probeUrls,
- "completerQueried" : [completer, addUrls]
- };
-
- doTest([update], assertions);
-
-}
-
-function testFalsePositives() {
- var addUrls = [ "foo.com/a", "foo.com/b", "bar.com/c" ];
- var update = buildPhishingUpdate(
- [
- { "chunkNum" : 1,
- "urls" : addUrls
- }],
- 4);
-
- // Each result will have no matching complete hashes and a non-matching
- // conflict
- var completer = installCompleter('test-phish-simple', [], [[1, addUrls]]);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1",
- "urlsDontExist" : addUrls,
- "completerQueried" : [completer, addUrls]
- };
-
- doTest([update], assertions);
-}
-
-function testEmptyCompleter() {
- var addUrls = [ "foo.com/a", "foo.com/b", "bar.com/c" ];
- var update = buildPhishingUpdate(
- [
- { "chunkNum" : 1,
- "urls" : addUrls
- }],
- 4);
-
- // Completer will never return full hashes
- var completer = installCompleter('test-phish-simple', [], []);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1",
- "urlsDontExist" : addUrls,
- "completerQueried" : [completer, addUrls]
- };
-
- doTest([update], assertions);
-}
-
-function testCompleterFailure() {
- var addUrls = [ "foo.com/a", "foo.com/b", "bar.com/c" ];
- var update = buildPhishingUpdate(
- [
- { "chunkNum" : 1,
- "urls" : addUrls
- }],
- 4);
-
- // Completer will never return full hashes
- var completer = installFailingCompleter('test-phish-simple');
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1",
- "urlsDontExist" : addUrls,
- "completerQueried" : [completer, addUrls]
- };
-
- doTest([update], assertions);
-}
-
-function testMixedSizesSameDomain() {
- var add1Urls = [ "foo.com/a" ];
- var add2Urls = [ "foo.com/b" ];
-
- var update1 = buildPhishingUpdate(
- [
- { "chunkNum" : 1,
- "urls" : add1Urls }],
- 4);
- var update2 = buildPhishingUpdate(
- [
- { "chunkNum" : 2,
- "urls" : add2Urls }],
- 32);
-
- // We should only need to complete the partial hashes
- var completer = installCompleter('test-phish-simple', [[1, add1Urls]], []);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1-2",
- // both urls should match...
- "urlsExist" : add1Urls.concat(add2Urls),
- // ... but the completer should only be queried for the partial entry
- "completerQueried" : [completer, add1Urls]
- };
-
- doTest([update1, update2], assertions);
-}
-
-function testMixedSizesDifferentDomains() {
- var add1Urls = [ "foo.com/a" ];
- var add2Urls = [ "bar.com/b" ];
-
- var update1 = buildPhishingUpdate(
- [
- { "chunkNum" : 1,
- "urls" : add1Urls }],
- 4);
- var update2 = buildPhishingUpdate(
- [
- { "chunkNum" : 2,
- "urls" : add2Urls }],
- 32);
-
- // We should only need to complete the partial hashes
- var completer = installCompleter('test-phish-simple', [[1, add1Urls]], []);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1-2",
- // both urls should match...
- "urlsExist" : add1Urls.concat(add2Urls),
- // ... but the completer should only be queried for the partial entry
- "completerQueried" : [completer, add1Urls]
- };
-
- doTest([update1, update2], assertions);
-}
-
-function testInvalidHashSize()
-{
- var addUrls = [ "foo.com/a", "foo.com/b", "bar.com/c" ];
- var update = buildPhishingUpdate(
- [
- { "chunkNum" : 1,
- "urls" : addUrls
- }],
- 12); // only 4 and 32 are legal hash sizes
-
- var addUrls2 = [ "zaz.com/a", "xyz.com/b" ];
- var update2 = buildPhishingUpdate(
- [
- { "chunkNum" : 2,
- "urls" : addUrls2
- }],
- 4);
-
- var completer = installCompleter('test-phish-simple', [[1, addUrls]], []);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:2",
- "urlsDontExist" : addUrls
- };
-
- // A successful update will trigger an error
- doUpdateTest([update2, update], assertions, updateError, runNextTest);
-}
-
-function testWrongTable()
-{
- var addUrls = [ "foo.com/a" ];
- var update = buildPhishingUpdate(
- [
- { "chunkNum" : 1,
- "urls" : addUrls
- }],
- 4);
- var completer = installCompleter('test-malware-simple', // wrong table
- [[1, addUrls]], []);
-
- // The above installCompleter installs the completer for test-malware-simple,
- // we want it to be used for test-phish-simple too.
- dbservice.setHashCompleter("test-phish-simple", completer);
-
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1",
- // The urls were added as phishing urls, but the completer is claiming
- // that they are malware urls, and we trust the completer in this case.
- // The result will be discarded, so we can only check for non-existence.
- "urlsDontExist" : addUrls,
- // Make sure the completer was actually queried.
- "completerQueried" : [completer, addUrls]
- };
-
- doUpdateTest([update], assertions,
- function() {
- // Give the dbservice a chance to (not) cache the result.
- var timer = new Timer(3000, function() {
- // The miss earlier will have caused a miss to be cached.
- // Resetting the completer does not count as an update,
- // so we will not be probed again.
- var newCompleter = installCompleter('test-malware-simple', [[1, addUrls]], []); dbservice.setHashCompleter("test-phish-simple",
- newCompleter);
-
- var assertions = {
- "urlsDontExist" : addUrls
- };
- checkAssertions(assertions, runNextTest);
- });
- }, updateError);
-}
-
-function setupCachedResults(addUrls, part2)
-{
- var update = buildPhishingUpdate(
- [
- { "chunkNum" : 1,
- "urls" : addUrls
- }],
- 4);
-
- var completer = installCompleter('test-phish-simple', [[1, addUrls]], []);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1",
- // Request the add url. This should cause the completion to be cached.
- "urlsExist" : addUrls,
- // Make sure the completer was actually queried.
- "completerQueried" : [completer, addUrls]
- };
-
- doUpdateTest([update], assertions,
- function() {
- // Give the dbservice a chance to cache the result.
- var timer = new Timer(3000, part2);
- }, updateError);
-}
-
-function testCachedResults()
-{
- setupCachedResults(["foo.com/a"], function(add) {
- // This is called after setupCachedResults(). Verify that
- // checking the url again does not cause a completer request.
-
- // install a new completer, this one should never be queried.
- var newCompleter = installCompleter('test-phish-simple', [[1, []]], []);
-
- var assertions = {
- "urlsExist" : ["foo.com/a"],
- "completerQueried" : [newCompleter, []]
- };
- checkAssertions(assertions, runNextTest);
- });
-}
-
-function testCachedResultsWithSub() {
- setupCachedResults(["foo.com/a"], function() {
- // install a new completer, this one should never be queried.
- var newCompleter = installCompleter('test-phish-simple', [[1, []]], []);
-
- var removeUpdate = buildPhishingUpdate(
- [ { "chunkNum" : 2,
- "chunkType" : "s",
- "urls": ["1:foo.com/a"] }],
- 4);
-
- var assertions = {
- "urlsDontExist" : ["foo.com/a"],
- "completerQueried" : [newCompleter, []]
- }
-
- doTest([removeUpdate], assertions);
- });
-}
-
-function testCachedResultsWithExpire() {
- setupCachedResults(["foo.com/a"], function() {
- // install a new completer, this one should never be queried.
- var newCompleter = installCompleter('test-phish-simple', [[1, []]], []);
-
- var expireUpdate =
- "n:1000\n" +
- "i:test-phish-simple\n" +
- "ad:1\n";
-
- var assertions = {
- "urlsDontExist" : ["foo.com/a"],
- "completerQueried" : [newCompleter, []]
- }
- doTest([expireUpdate], assertions);
- });
-}
-
-function testCachedResultsUpdate()
-{
- var existUrls = ["foo.com/a"];
- setupCachedResults(existUrls, function() {
- // This is called after setupCachedResults(). Verify that
- // checking the url again does not cause a completer request.
-
- // install a new completer, this one should never be queried.
- var newCompleter = installCompleter('test-phish-simple', [[1, []]], []);
-
- var assertions = {
- "urlsExist" : existUrls,
- "completerQueried" : [newCompleter, []]
- };
-
- var addUrls = ["foobar.org/a"];
-
- var update2 = buildPhishingUpdate(
- [
- { "chunkNum" : 2,
- "urls" : addUrls
- }],
- 4);
-
- checkAssertions(assertions, function () {
- // Apply the update. The cached completes should be gone.
- doStreamUpdate(update2, function() {
- // Now the completer gets queried again.
- var newCompleter2 = installCompleter('test-phish-simple', [[1, existUrls]], []);
- var assertions2 = {
- "tableData" : "test-phish-simple;a:1-2",
- "urlsExist" : existUrls,
- "completerQueried" : [newCompleter2, existUrls]
- };
- checkAssertions(assertions2, runNextTest);
- }, updateError);
- });
- });
-}
-
-function testCachedResultsFailure()
-{
- var existUrls = ["foo.com/a"];
- setupCachedResults(existUrls, function() {
- // This is called after setupCachedResults(). Verify that
- // checking the url again does not cause a completer request.
-
- // install a new completer, this one should never be queried.
- var newCompleter = installCompleter('test-phish-simple', [[1, []]], []);
-
- var assertions = {
- "urlsExist" : existUrls,
- "completerQueried" : [newCompleter, []]
- };
-
- var addUrls = ["foobar.org/a"];
-
- var update2 = buildPhishingUpdate(
- [
- { "chunkNum" : 2,
- "urls" : addUrls
- }],
- 4);
-
- checkAssertions(assertions, function() {
- // Apply the update. The cached completes should be gone.
- doErrorUpdate("test-phish-simple,test-malware-simple", function() {
- // Now the completer gets queried again.
- var newCompleter2 = installCompleter('test-phish-simple', [[1, existUrls]], []);
- var assertions2 = {
- "tableData" : "test-phish-simple;a:1",
- "urlsExist" : existUrls,
- "completerQueried" : [newCompleter2, existUrls]
- };
- checkAssertions(assertions2, runNextTest);
- }, updateError);
- });
- });
-}
-
-function testErrorList()
-{
- var addUrls = [ "foo.com/a", "foo.com/b", "bar.com/c" ];
- var update = buildPhishingUpdate(
- [
- { "chunkNum" : 1,
- "urls" : addUrls
- }],
- 4);
- // The update failure should will kill the completes, so the above
- // must be a prefix to get any hit at all past the update failure.
-
- var completer = installCompleter('test-phish-simple', [[1, addUrls]], []);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1",
- "urlsExist" : addUrls,
- // These are complete urls, and will only be completed if the
- // list is stale.
- "completerQueried" : [completer, addUrls]
- };
-
- // Apply the update.
- doStreamUpdate(update, function() {
- // Now the test-phish-simple and test-malware-simple tables are marked
- // as fresh. Fake an update failure to mark them stale.
- doErrorUpdate("test-phish-simple,test-malware-simple", function() {
- // Now the lists should be marked stale. Check assertions.
- checkAssertions(assertions, runNextTest);
- }, updateError);
- }, updateError);
-}
-
-
-function testStaleList()
-{
- var addUrls = [ "foo.com/a", "foo.com/b", "bar.com/c" ];
- var update = buildPhishingUpdate(
- [
- { "chunkNum" : 1,
- "urls" : addUrls
- }],
- 32);
-
- var completer = installCompleter('test-phish-simple', [[1, addUrls]], []);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1",
- "urlsExist" : addUrls,
- // These are complete urls, and will only be completed if the
- // list is stale.
- "completerQueried" : [completer, addUrls]
- };
-
- // Consider a match stale after one second.
- prefBranch.setIntPref("urlclassifier.max-complete-age", 1);
-
- // Apply the update.
- doStreamUpdate(update, function() {
- // Now the test-phish-simple and test-malware-simple tables are marked
- // as fresh. Wait three seconds to make sure the list is marked stale.
- new Timer(3000, function() {
- // Now the lists should be marked stale. Check assertions.
- checkAssertions(assertions, function() {
- prefBranch.setIntPref("urlclassifier.max-complete-age", 2700);
- runNextTest();
- });
- }, updateError);
- }, updateError);
-}
-
-// Same as testStaleList, but verifies that an empty response still
-// unconfirms the entry.
-function testStaleListEmpty()
-{
- var addUrls = [ "foo.com/a", "foo.com/b", "bar.com/c" ];
- var update = buildPhishingUpdate(
- [
- { "chunkNum" : 1,
- "urls" : addUrls
- }],
- 32);
-
- var completer = installCompleter('test-phish-simple', [], []);
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1",
- // None of these should match, because they won't be completed
- "urlsDontExist" : addUrls,
- // These are complete urls, and will only be completed if the
- // list is stale.
- "completerQueried" : [completer, addUrls]
- };
-
- // Consider a match stale after one second.
- prefBranch.setIntPref("urlclassifier.max-complete-age", 1);
-
- // Apply the update.
- doStreamUpdate(update, function() {
- // Now the test-phish-simple and test-malware-simple tables are marked
- // as fresh. Wait three seconds to make sure the list is marked stale.
- new Timer(3000, function() {
- // Now the lists should be marked stale. Check assertions.
- checkAssertions(assertions, function() {
- prefBranch.setIntPref("urlclassifier.max-complete-age", 2700);
- runNextTest();
- });
- }, updateError);
- }, updateError);
-}
-
-
-// Verify that different lists (test-phish-simple,
-// test-malware-simple) maintain their freshness separately.
-function testErrorListIndependent()
-{
- var phishUrls = [ "phish.com/a" ];
- var malwareUrls = [ "attack.com/a" ];
- var update = buildPhishingUpdate(
- [
- { "chunkNum" : 1,
- "urls" : phishUrls
- }],
- 4);
- // These have to persist past the update failure, so they must be prefixes,
- // not completes.
-
- update += buildMalwareUpdate(
- [
- { "chunkNum" : 2,
- "urls" : malwareUrls
- }],
- 32);
-
- var completer = installCompleter('test-phish-simple', [[1, phishUrls]], []);
-
- var assertions = {
- "tableData" : "test-malware-simple;a:2\ntest-phish-simple;a:1",
- "urlsExist" : phishUrls,
- "malwareUrlsExist" : malwareUrls,
- // Only this phishing urls should be completed, because only the phishing
- // urls will be stale.
- "completerQueried" : [completer, phishUrls]
- };
-
- // Apply the update.
- doStreamUpdate(update, function() {
- // Now the test-phish-simple and test-malware-simple tables are
- // marked as fresh. Fake an update failure to mark *just*
- // phishing data as stale.
- doErrorUpdate("test-phish-simple", function() {
- // Now the lists should be marked stale. Check assertions.
- checkAssertions(assertions, runNextTest);
- }, updateError);
- }, updateError);
-}
-
-function run_test()
-{
- runTests([
- testPartialAdds,
- testPartialAddsWithConflicts,
- testFragments,
- testSpecFragments,
- testMoreSpecFragments,
- testFalsePositives,
- testEmptyCompleter,
- testCompleterFailure,
- testMixedSizesSameDomain,
- testMixedSizesDifferentDomains,
- testInvalidHashSize,
- testWrongTable,
- testCachedResults,
- testCachedResultsWithSub,
- testCachedResultsWithExpire,
- testCachedResultsUpdate,
- testCachedResultsFailure,
- testStaleList,
- testStaleListEmpty,
- testErrorList,
- testErrorListIndependent
- ]);
-}
-
-do_test_pending();
diff --git a/toolkit/components/url-classifier/tests/unit/test_pref.js b/toolkit/components/url-classifier/tests/unit/test_pref.js
deleted file mode 100644
index 68030a2466..0000000000
--- a/toolkit/components/url-classifier/tests/unit/test_pref.js
+++ /dev/null
@@ -1,14 +0,0 @@
-function run_test() {
- let urlUtils = Cc["@mozilla.org/url-classifier/utils;1"]
- .getService(Ci.nsIUrlClassifierUtils);
-
- // The google protocol version should be "2.2" until we enable SB v4
- // by default.
- equal(urlUtils.getProtocolVersion("google"), "2.2");
-
- // Mozilla protocol version will stick to "2.2".
- equal(urlUtils.getProtocolVersion("mozilla"), "2.2");
-
- // Unknown provider version will be "2.2".
- equal(urlUtils.getProtocolVersion("unknown-provider"), "2.2");
-} \ No newline at end of file
diff --git a/toolkit/components/url-classifier/tests/unit/test_prefixset.js b/toolkit/components/url-classifier/tests/unit/test_prefixset.js
deleted file mode 100644
index f2ecc9c2b3..0000000000
--- a/toolkit/components/url-classifier/tests/unit/test_prefixset.js
+++ /dev/null
@@ -1,232 +0,0 @@
-// newPset: returns an empty nsIUrlClassifierPrefixSet.
-function newPset() {
- let pset = Cc["@mozilla.org/url-classifier/prefixset;1"]
- .createInstance(Ci.nsIUrlClassifierPrefixSet);
- pset.init("all");
- return pset;
-}
-
-// arrContains: returns true if |arr| contains the element |target|. Uses binary
-// search and requires |arr| to be sorted.
-function arrContains(arr, target) {
- let start = 0;
- let end = arr.length - 1;
- let i = 0;
-
- while (end > start) {
- i = start + (end - start >> 1);
- let value = arr[i];
-
- if (value < target)
- start = i+1;
- else if (value > target)
- end = i-1;
- else
- break;
- }
- if (start == end)
- i = start;
-
- return (!(i < 0 || i >= arr.length) && arr[i] == target);
-}
-
-// checkContents: Check whether the PrefixSet pset contains
-// the prefixes in the passed array.
-function checkContents(pset, prefixes) {
- var outcount = {}, outset = {};
- outset = pset.getPrefixes(outcount);
- let inset = prefixes;
- do_check_eq(inset.length, outset.length);
- inset.sort((x,y) => x - y);
- for (let i = 0; i < inset.length; i++) {
- do_check_eq(inset[i], outset[i]);
- }
-}
-
-function wrappedProbe(pset, prefix) {
- return pset.contains(prefix);
-};
-
-// doRandomLookups: we use this to test for false membership with random input
-// over the range of prefixes (unsigned 32-bits integers).
-// pset: a nsIUrlClassifierPrefixSet to test.
-// prefixes: an array of prefixes supposed to make up the prefix set.
-// N: number of random lookups to make.
-function doRandomLookups(pset, prefixes, N) {
- for (let i = 0; i < N; i++) {
- let randInt = prefixes[0];
- while (arrContains(prefixes, randInt))
- randInt = Math.floor(Math.random() * Math.pow(2, 32));
-
- do_check_false(wrappedProbe(pset, randInt));
- }
-}
-
-// doExpectedLookups: we use this to test expected membership.
-// pset: a nsIUrlClassifierPrefixSet to test.
-// prefixes:
-function doExpectedLookups(pset, prefixes, N) {
- for (let i = 0; i < N; i++) {
- prefixes.forEach(function (x) {
- dump("Checking " + x + "\n");
- do_check_true(wrappedProbe(pset, x));
- });
- }
-}
-
-// testBasicPset: A very basic test of the prefix set to make sure that it
-// exists and to give a basic example of its use.
-function testBasicPset() {
- let pset = Cc["@mozilla.org/url-classifier/prefixset;1"]
- .createInstance(Ci.nsIUrlClassifierPrefixSet);
- let prefixes = [2,50,100,2000,78000,1593203];
- pset.setPrefixes(prefixes, prefixes.length);
-
- do_check_true(wrappedProbe(pset, 100));
- do_check_false(wrappedProbe(pset, 100000));
- do_check_true(wrappedProbe(pset, 1593203));
- do_check_false(wrappedProbe(pset, 999));
- do_check_false(wrappedProbe(pset, 0));
-
-
- checkContents(pset, prefixes);
-}
-
-function testDuplicates() {
- let pset = Cc["@mozilla.org/url-classifier/prefixset;1"]
- .createInstance(Ci.nsIUrlClassifierPrefixSet);
- let prefixes = [1,1,2,2,2,3,3,3,3,3,3,5,6,6,7,7,9,9,9];
- pset.setPrefixes(prefixes, prefixes.length);
-
- do_check_true(wrappedProbe(pset, 1));
- do_check_true(wrappedProbe(pset, 2));
- do_check_true(wrappedProbe(pset, 5));
- do_check_true(wrappedProbe(pset, 9));
- do_check_false(wrappedProbe(pset, 4));
- do_check_false(wrappedProbe(pset, 8));
-
-
- checkContents(pset, prefixes);
-}
-
-function testSimplePset() {
- let pset = newPset();
- let prefixes = [1,2,100,400,123456789];
- pset.setPrefixes(prefixes, prefixes.length);
-
- doRandomLookups(pset, prefixes, 100);
- doExpectedLookups(pset, prefixes, 1);
-
-
- checkContents(pset, prefixes);
-}
-
-function testReSetPrefixes() {
- let pset = newPset();
- let prefixes = [1, 5, 100, 1000, 150000];
- pset.setPrefixes(prefixes, prefixes.length);
-
- doExpectedLookups(pset, prefixes, 1);
-
- let secondPrefixes = [12, 50, 300, 2000, 5000, 200000];
- pset.setPrefixes(secondPrefixes, secondPrefixes.length);
-
- doExpectedLookups(pset, secondPrefixes, 1);
- for (let i = 0; i < prefixes.length; i++) {
- do_check_false(wrappedProbe(pset, prefixes[i]));
- }
-
-
- checkContents(pset, secondPrefixes);
-}
-
-function testLoadSaveLargeSet() {
- let N = 1000;
- let arr = [];
-
- for (let i = 0; i < N; i++) {
- let randInt = Math.floor(Math.random() * Math.pow(2, 32));
- arr.push(randInt);
- }
-
- arr.sort((x,y) => x - y);
-
- let pset = newPset();
- pset.setPrefixes(arr, arr.length);
-
- doExpectedLookups(pset, arr, 1);
- doRandomLookups(pset, arr, 1000);
-
- checkContents(pset, arr);
-
- // Now try to save, restore, and redo the lookups
- var file = dirSvc.get('ProfLD', Ci.nsIFile);
- file.append("testLarge.pset");
-
- pset.storeToFile(file);
-
- let psetLoaded = newPset();
- psetLoaded.loadFromFile(file);
-
- doExpectedLookups(psetLoaded, arr, 1);
- doRandomLookups(psetLoaded, arr, 1000);
-
- checkContents(psetLoaded, arr);
-}
-
-function testTinySet() {
- let pset = Cc["@mozilla.org/url-classifier/prefixset;1"]
- .createInstance(Ci.nsIUrlClassifierPrefixSet);
- let prefixes = [1];
- pset.setPrefixes(prefixes, prefixes.length);
-
- do_check_true(wrappedProbe(pset, 1));
- do_check_false(wrappedProbe(pset, 100000));
- checkContents(pset, prefixes);
-
- prefixes = [];
- pset.setPrefixes(prefixes, prefixes.length);
- do_check_false(wrappedProbe(pset, 1));
- checkContents(pset, prefixes);
-}
-
-function testLoadSaveNoDelta() {
- let N = 100;
- let arr = [];
-
- for (let i = 0; i < N; i++) {
- // construct a tree without deltas by making the distance
- // between entries larger than 16 bits
- arr.push(((1 << 16) + 1) * i);
- }
-
- let pset = newPset();
- pset.setPrefixes(arr, arr.length);
-
- doExpectedLookups(pset, arr, 1);
-
- var file = dirSvc.get('ProfLD', Ci.nsIFile);
- file.append("testNoDelta.pset");
-
- pset.storeToFile(file);
- pset.loadFromFile(file);
-
- doExpectedLookups(pset, arr, 1);
-}
-
-var tests = [testBasicPset,
- testSimplePset,
- testReSetPrefixes,
- testLoadSaveLargeSet,
- testDuplicates,
- testTinySet,
- testLoadSaveNoDelta];
-
-function run_test() {
- // None of the tests use |executeSoon| or any sort of callbacks, so we can
- // just run them in succession.
- for (let i = 0; i < tests.length; i++) {
- dump("Running " + tests[i].name + "\n");
- tests[i]();
- }
-}
diff --git a/toolkit/components/url-classifier/tests/unit/test_provider_url.js b/toolkit/components/url-classifier/tests/unit/test_provider_url.js
deleted file mode 100644
index 9a946dc3fe..0000000000
--- a/toolkit/components/url-classifier/tests/unit/test_provider_url.js
+++ /dev/null
@@ -1,34 +0,0 @@
-Cu.import("resource://testing-common/AppInfo.jsm", this);
-Cu.import("resource://gre/modules/Services.jsm");
-
-function updateVersion(version) {
- updateAppInfo({ version });
-}
-
-add_test(function test_provider_url() {
- let urls = [
- "browser.safebrowsing.provider.google.updateURL",
- "browser.safebrowsing.provider.google.gethashURL",
- "browser.safebrowsing.provider.mozilla.updateURL",
- "browser.safebrowsing.provider.mozilla.gethashURL"
- ];
-
- let versions = [
- "49.0",
- "49.0.1",
- "49.0a1",
- "49.0b1",
- "49.0esr",
- "49.0.1esr"
- ];
-
- for (let version of versions) {
- for (let url of urls) {
- updateVersion(version);
- let value = Services.urlFormatter.formatURLPref(url);
- Assert.notEqual(value.indexOf("&appver=49.0&"), -1);
- }
- }
-
- run_next_test();
-});
diff --git a/toolkit/components/url-classifier/tests/unit/test_safebrowsing_protobuf.js b/toolkit/components/url-classifier/tests/unit/test_safebrowsing_protobuf.js
deleted file mode 100644
index 45309ba54e..0000000000
--- a/toolkit/components/url-classifier/tests/unit/test_safebrowsing_protobuf.js
+++ /dev/null
@@ -1,23 +0,0 @@
-function run_test() {
- let urlUtils = Cc["@mozilla.org/url-classifier/utils;1"]
- .getService(Ci.nsIUrlClassifierUtils);
-
- // No list at all.
- let requestNoList = urlUtils.makeUpdateRequestV4([], [], 0);
-
- // Only one valid list name.
- let requestOneValid =
- urlUtils.makeUpdateRequestV4(["goog-phish-proto"], ["AAAAAA"], 1);
-
- // Only one invalid list name.
- let requestOneInvalid =
- urlUtils.makeUpdateRequestV4(["bad-list-name"], ["AAAAAA"], 1);
-
- // One valid and one invalid list name.
- let requestOneInvalidOneValid =
- urlUtils.makeUpdateRequestV4(["goog-phish-proto", "bad-list-name"],
- ["AAAAAA", "AAAAAA"], 2);
-
- equal(requestNoList, requestOneInvalid);
- equal(requestOneValid, requestOneInvalidOneValid);
-} \ No newline at end of file
diff --git a/toolkit/components/url-classifier/tests/unit/test_streamupdater.js b/toolkit/components/url-classifier/tests/unit/test_streamupdater.js
deleted file mode 100644
index e5abc4e91a..0000000000
--- a/toolkit/components/url-classifier/tests/unit/test_streamupdater.js
+++ /dev/null
@@ -1,288 +0,0 @@
-function doTest(updates, assertions, expectError)
-{
- if (expectError) {
- doUpdateTest(updates, assertions, updateError, runNextTest);
- } else {
- doUpdateTest(updates, assertions, runNextTest, updateError);
- }
-}
-
-// Never use the same URLs for multiple tests, because we aren't guaranteed
-// to reset the database between tests.
-function testFillDb() {
- var add1Urls = [ "zaz.com/a", "yxz.com/c" ];
-
- var update = "n:1000\n";
- update += "i:test-phish-simple\n";
-
- var update1 = buildBareUpdate(
- [{ "chunkNum" : 1,
- "urls" : add1Urls }]);
- update += "u:data:," + encodeURIComponent(update1) + "\n";
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1",
- "urlsExist" : add1Urls
- };
-
- doTest([update], assertions, false);
-}
-
-function testSimpleForward() {
- var add1Urls = [ "foo-simple.com/a", "bar-simple.com/c" ];
- var add2Urls = [ "foo-simple.com/b" ];
- var add3Urls = [ "bar-simple.com/d" ];
-
- var update = "n:1000\n";
- update += "i:test-phish-simple\n";
-
- var update1 = buildBareUpdate(
- [{ "chunkNum" : 1,
- "urls" : add1Urls }]);
- update += "u:data:," + encodeURIComponent(update1) + "\n";
-
- var update2 = buildBareUpdate(
- [{ "chunkNum" : 2,
- "urls" : add2Urls }]);
- update += "u:data:," + encodeURIComponent(update2) + "\n";
-
- var update3 = buildBareUpdate(
- [{ "chunkNum" : 3,
- "urls" : add3Urls }]);
- update += "u:data:," + encodeURIComponent(update3) + "\n";
-
- var assertions = {
- "tableData" : "test-phish-simple;a:1-3",
- "urlsExist" : add1Urls.concat(add2Urls).concat(add3Urls)
- };
-
- doTest([update], assertions, false);
-}
-
-// Make sure that a nested forward (a forward within a forward) causes
-// the update to fail.
-function testNestedForward() {
- var add1Urls = [ "foo-nested.com/a", "bar-nested.com/c" ];
- var add2Urls = [ "foo-nested.com/b" ];
-
- var update = "n:1000\n";
- update += "i:test-phish-simple\n";
-
- var update1 = buildBareUpdate(
- [{ "chunkNum" : 1,
- "urls" : add1Urls }]);
- update += "u:data:," + encodeURIComponent(update1) + "\n";
-
- var update2 = buildBareUpdate(
- [{ "chunkNum" : 2 }]);
- var update3 = buildBareUpdate(
- [{ "chunkNum" : 3,
- "urls" : add1Urls }]);
-
- update2 += "u:data:," + encodeURIComponent(update3) + "\n";
-
- update += "u:data:," + encodeURIComponent(update2) + "\n";
-
- var assertions = {
- "tableData" : "",
- "urlsDontExist" : add1Urls.concat(add2Urls)
- };
-
- doTest([update], assertions, true);
-}
-
-// An invalid URL forward causes the update to fail.
-function testInvalidUrlForward() {
- var add1Urls = [ "foo-invalid.com/a", "bar-invalid.com/c" ];
-
- var update = buildPhishingUpdate(
- [{ "chunkNum" : 1,
- "urls" : add1Urls }]);
- update += "u:asdf://blah/blah\n"; // invalid URL scheme
-
- // add1Urls is present, but that is an artifact of the way we do the test.
- var assertions = {
- "tableData" : "",
- "urlsExist" : add1Urls
- };
-
- doTest([update], assertions, true);
-}
-
-// A failed network request causes the update to fail.
-function testErrorUrlForward() {
- var add1Urls = [ "foo-forward.com/a", "bar-forward.com/c" ];
-
- var update = buildPhishingUpdate(
- [{ "chunkNum" : 1,
- "urls" : add1Urls }]);
- update += "u:http://test.invalid/asdf/asdf\n"; // invalid URL scheme
-
- // add1Urls is present, but that is an artifact of the way we do the test.
- var assertions = {
- "tableData" : "",
- "urlsExist" : add1Urls
- };
-
- doTest([update], assertions, true);
-}
-
-function testMultipleTables() {
- var add1Urls = [ "foo-multiple.com/a", "bar-multiple.com/c" ];
- var add2Urls = [ "foo-multiple.com/b" ];
- var add3Urls = [ "bar-multiple.com/d" ];
- var add4Urls = [ "bar-multiple.com/e" ];
- var add6Urls = [ "bar-multiple.com/g" ];
-
- var update = "n:1000\n";
- update += "i:test-phish-simple\n";
-
- var update1 = buildBareUpdate(
- [{ "chunkNum" : 1,
- "urls" : add1Urls }]);
- update += "u:data:," + encodeURIComponent(update1) + "\n";
-
- var update2 = buildBareUpdate(
- [{ "chunkNum" : 2,
- "urls" : add2Urls }]);
- update += "u:data:," + encodeURIComponent(update2) + "\n";
-
- update += "i:test-malware-simple\n";
-
- var update3 = buildBareUpdate(
- [{ "chunkNum" : 3,
- "urls" : add3Urls }]);
- update += "u:data:," + encodeURIComponent(update3) + "\n";
-
- update += "i:test-unwanted-simple\n";
- var update4 = buildBareUpdate(
- [{ "chunkNum" : 4,
- "urls" : add4Urls }]);
- update += "u:data:," + encodeURIComponent(update4) + "\n";
-
- update += "i:test-block-simple\n";
- var update6 = buildBareUpdate(
- [{ "chunkNum" : 6,
- "urls" : add6Urls }]);
- update += "u:data:," + encodeURIComponent(update6) + "\n";
-
- var assertions = {
- "tableData" : "test-block-simple;a:6\ntest-malware-simple;a:3\ntest-phish-simple;a:1-2\ntest-unwanted-simple;a:4",
- "urlsExist" : add1Urls.concat(add2Urls),
- "malwareUrlsExist" : add3Urls,
- "unwantedUrlsExist" : add4Urls,
- "blockedUrlsExist" : add6Urls
- };
-
- doTest([update], assertions, false);
-}
-
-function testUrlInMultipleTables() {
- var add1Urls = [ "foo-forward.com/a" ];
-
- var update = "n:1000\n";
- update += "i:test-phish-simple\n";
-
- var update1 = buildBareUpdate(
- [{ "chunkNum" : 1,
- "urls" : add1Urls }]);
- update += "u:data:," + encodeURIComponent(update1) + "\n";
-
- update += "i:test-malware-simple\n";
- var update2 = buildBareUpdate(
- [{ "chunkNum" : 2,
- "urls" : add1Urls }]);
- update += "u:data:," + encodeURIComponent(update2) + "\n";
-
- update += "i:test-unwanted-simple\n";
- var update3 = buildBareUpdate(
- [{ "chunkNum" : 3,
- "urls" : add1Urls }]);
- update += "u:data:," + encodeURIComponent(update3) + "\n";
-
- var assertions = {
- "tableData" : "test-malware-simple;a:2\ntest-phish-simple;a:1\ntest-unwanted-simple;a:3",
- "urlExistInMultipleTables" : { url: add1Urls,
- tables: "test-malware-simple,test-phish-simple,test-unwanted-simple" }
- };
-
- doTest([update], assertions, false);
-}
-
-function Observer(callback) {
- this.observe = callback;
-}
-
-Observer.prototype =
-{
-QueryInterface: function(iid)
-{
- if (!iid.equals(Ci.nsISupports) &&
- !iid.equals(Ci.nsIObserver)) {
- throw Cr.NS_ERROR_NO_INTERFACE;
- }
- return this;
-}
-};
-
-// Tests a database reset request.
-function testReset() {
- // The moz-phish-simple table is populated separately from the other update in
- // a separate update request. Therefore it should not be reset when we run the
- // updates later in this function.
- var mozAddUrls = [ "moz-reset.com/a" ];
- var mozUpdate = buildMozPhishingUpdate(
- [
- { "chunkNum" : 1,
- "urls" : mozAddUrls
- }]);
-
- var dataUpdate = "data:," + encodeURIComponent(mozUpdate);
-
- streamUpdater.downloadUpdates(mozTables, "", true,
- dataUpdate, () => {}, updateError, updateError);
-
- var addUrls1 = [ "foo-reset.com/a", "foo-reset.com/b" ];
- var update1 = buildPhishingUpdate(
- [
- { "chunkNum" : 1,
- "urls" : addUrls1
- }]);
-
- var update2 = "n:1000\nr:pleasereset\n";
-
- var addUrls3 = [ "bar-reset.com/a", "bar-reset.com/b" ];
- var update3 = buildPhishingUpdate(
- [
- { "chunkNum" : 3,
- "urls" : addUrls3
- }]);
-
- var assertions = {
- "tableData" : "moz-phish-simple;a:1\ntest-phish-simple;a:3", // tables that should still be there.
- "mozPhishingUrlsExist" : mozAddUrls, // mozAddUrls added prior to the reset
- // but it should still exist after reset.
- "urlsExist" : addUrls3, // addUrls3 added after the reset.
- "urlsDontExist" : addUrls1 // addUrls1 added prior to the reset
- };
-
- // Use these update responses in order. The update request only
- // contains test-*-simple tables so the reset will only apply to these.
- doTest([update1, update2, update3], assertions, false);
-}
-
-
-function run_test()
-{
- runTests([
- testSimpleForward,
- testNestedForward,
- testInvalidUrlForward,
- testErrorUrlForward,
- testMultipleTables,
- testUrlInMultipleTables,
- testReset
- ]);
-}
-
-do_test_pending();
diff --git a/toolkit/components/url-classifier/tests/unit/test_threat_type_conversion.js b/toolkit/components/url-classifier/tests/unit/test_threat_type_conversion.js
deleted file mode 100644
index f7c51b9562..0000000000
--- a/toolkit/components/url-classifier/tests/unit/test_threat_type_conversion.js
+++ /dev/null
@@ -1,37 +0,0 @@
-function run_test() {
- let urlUtils = Cc["@mozilla.org/url-classifier/utils;1"]
- .getService(Ci.nsIUrlClassifierUtils);
-
- // Test list name to threat type conversion.
-
- equal(urlUtils.convertListNameToThreatType("goog-malware-proto"), 1);
- equal(urlUtils.convertListNameToThreatType("googpub-phish-proto"), 2);
- equal(urlUtils.convertListNameToThreatType("goog-unwanted-proto"), 3);
- equal(urlUtils.convertListNameToThreatType("goog-phish-proto"), 5);
-
- try {
- urlUtils.convertListNameToThreatType("bad-list-name");
- ok(false, "Bad list name should lead to exception.");
- } catch (e) {}
-
- try {
- urlUtils.convertListNameToThreatType("bad-list-name");
- ok(false, "Bad list name should lead to exception.");
- } catch (e) {}
-
- // Test threat type to list name conversion.
- equal(urlUtils.convertThreatTypeToListNames(1), "goog-malware-proto");
- equal(urlUtils.convertThreatTypeToListNames(2), "googpub-phish-proto,test-phish-proto");
- equal(urlUtils.convertThreatTypeToListNames(3), "goog-unwanted-proto,test-unwanted-proto");
- equal(urlUtils.convertThreatTypeToListNames(5), "goog-phish-proto");
-
- try {
- urlUtils.convertThreatTypeToListNames(0);
- ok(false, "Bad threat type should lead to exception.");
- } catch (e) {}
-
- try {
- urlUtils.convertThreatTypeToListNames(100);
- ok(false, "Bad threat type should lead to exception.");
- } catch (e) {}
-} \ No newline at end of file
diff --git a/toolkit/components/url-classifier/tests/unit/xpcshell.ini b/toolkit/components/url-classifier/tests/unit/xpcshell.ini
deleted file mode 100644
index c34d575c62..0000000000
--- a/toolkit/components/url-classifier/tests/unit/xpcshell.ini
+++ /dev/null
@@ -1,24 +0,0 @@
-[DEFAULT]
-head = head_urlclassifier.js
-tail = tail_urlclassifier.js
-skip-if = toolkit == 'android'
-support-files =
- data/digest1.chunk
- data/digest2.chunk
-
-[test_addsub.js]
-[test_bug1274685_unowned_list.js]
-[test_backoff.js]
-[test_dbservice.js]
-[test_hashcompleter.js]
-# Bug 752243: Profile cleanup frequently fails
-#skip-if = os == "mac" || os == "linux"
-[test_partial.js]
-[test_prefixset.js]
-[test_threat_type_conversion.js]
-[test_provider_url.js]
-[test_streamupdater.js]
-[test_digest256.js]
-[test_listmanager.js]
-[test_pref.js]
-[test_safebrowsing_protobuf.js]
diff --git a/toolkit/components/url-classifier/tests/unittests.xul b/toolkit/components/url-classifier/tests/unittests.xul
deleted file mode 100644
index 0c9ce898bc..0000000000
--- a/toolkit/components/url-classifier/tests/unittests.xul
+++ /dev/null
@@ -1,188 +0,0 @@
-<?xml version="1.0"?>
-<window id="PROT_unittest"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="onProtUnittestLoad();"
- title="prot unittests">
-
-<script><![CDATA[
- const Cc = Components.classes;
- const Ci = Components.interfaces;
-
- function G_Debug(zone, s) {
- var label = document.createElement('label');
- var txt = "[" + zone + "] " + s;
- label.appendChild(document.createTextNode(txt));
-
- document.documentElement.appendChild(label);
- }
-
- function G_Assert(zone, cond, msg) {
- if (!cond) {
- G_Debug(zone, msg);
- throw msg;
- }
- }
-
- function ProtectionTableTests() {
- var z = "trtable UNITTEST";
-
- G_Debug(z, "Starting");
-
- var url = "http://www.yahoo.com?foo=bar";
- var url2 = "http://168.188.99.26/.secure/www.ebay.com/";
- var urlTable = Cc['@mozilla.org/url-classifier/table;1?type=url']
- .createInstance(Ci.nsIUrlClassifierTable);
- urlTable.insert(url, "1");
- urlTable.insert(url2, "1");
- G_Assert(z, urlTable.exists(url), "URL lookups broken");
- G_Assert(z, !urlTable.exists("about:config"), "about:config breaks domlook");
- G_Assert(z, urlTable.exists(url2), "URL lookups broken");
- G_Assert(z, urlTable.exists("http://%31%36%38%2e%31%38%38%2e%39%39%2e%32%36/%2E%73%65%63%75%72%65/%77%77%77%2E%65%62%61%79%2E%63%6F%6D/") == true,
- "URL Canonicalization broken");
- G_Assert(z, urlTable.count == 2, 'urlTable: wrong size');
-
- var dom1 = "bar.com";
- var dom2 = "amazon.co.uk";
- var dom3 = "127.0.0.1";
- var domainTable = Cc['@mozilla.org/url-classifier/table;1?type=domain']
- .createInstance(Ci.nsIUrlClassifierTable);
- domainTable.insert(dom1, "1");
- domainTable.insert(dom2, "1");
- domainTable.insert(dom3, "1");
- G_Assert(z, domainTable.exists("http://www.bar.com/?zaz=asdf#url"),
- "Domain lookups broken (single dot)");
- G_Assert(z, domainTable.exists("http://www.amazon.co.uk/?z=af#url"),
- "Domain lookups broken (two dots)");
- G_Assert(z, domainTable.exists("http://127.0.0.1/?z=af#url"),
- "Domain lookups broken (IP)");
- G_Assert(z, domainTable.count == 3, 'domainTable: wrong size');
-
- var site1 = "google.com/safebrowsing/";
- var site2 = "www.foo.bar/";
- var site3 = "127.0.0.1/";
- var siteTable = Cc['@mozilla.org/url-classifier/table;1?type=site']
- .createInstance(Ci.nsIUrlClassifierTable);
- siteTable.insert(site1, "1");
- siteTable.insert(site2, "1");
- siteTable.insert(site3, "1");
- G_Assert(z, siteTable.exists("http://www.google.com/safebrowsing/1.php"),
- "Site lookups broken - reducing");
- G_Assert(z, siteTable.exists("http://www.foo.bar/some/random/path"),
- "Site lookups broken - fqdn");
- G_Assert(z, siteTable.exists("http://127.0.0.1/something?hello=1"),
- "Site lookups broken - IP");
- G_Assert(z, !siteTable.exists("http://www.google.com/search/"),
- "Site lookups broken - overreaching");
- G_Assert(z, siteTable.count == 3, 'siteTable: wrong size');
-
- var url1 = "http://poseidon.marinet.gr/~eleni/eBay/index.php";
- var domainHash = "01844755C8143C4579BB28DD59C23747";
- var enchashTable = Cc['@mozilla.org/url-classifier/table;1?type=enchash']
- .createInstance(Ci.nsIUrlClassifierTable);
- enchashTable.insert(domainHash, "bGtEQWJuMl9FA3Kl5RiXMpgFU8nDJl9J0hXjUck9+"
- + "mMUQwAN6llf0gJeY5DIPPc2f+a8MSBFJN17ANGJ"
- + "Zl5oZVsQfSW4i12rlScsx4tweZAE");
- G_Assert(z, enchashTable.exists(url1), 'enchash lookup failed');
- G_Assert(z, !enchashTable.exists(url1 + '/foo'),
- "enchash lookup broken - overreaching");
- G_Assert(z, enchashTable.count == 1, 'enchashTable: wrong size');
-
- // TODO: test replace
- G_Debug(z, "PASSED");
- }
-
- function ProtectionListManagerTests() {
- var z = "listmanager UNITTEST";
- G_Debug(z, "Starting");
-
- // test lookup and register
- var listManagerInst = Cc["@mozilla.org/url-classifier/listmanager;1"]
- .createInstance(Ci.nsIUrlListManager);
- var listName = 'foo-bar-url';
- listManagerInst.registerTable(listName, false);
- listManagerInst.safeInsert(listName, 'test', '1');
- G_Assert(z, listManagerInst.safeExists(listName, 'test'),
- 'insert/exist failed');
-
- // test serialization
- var baseName = (new Date().getTime()) + ".tmp";
- var tempDir = Cc["@mozilla.org/file/directory_service;1"]
- .getService(Ci.nsIProperties)
- .get("TmpD", Ci.nsILocalFile);
- tempDir.append(baseName);
- tempDir.createUnique(tempDir.DIRECTORY_TYPE, 0744);
-
- var listManager = Cc["@mozilla.org/url-classifier/listmanager;1"]
- .getService(Ci.nsIUrlListManager);
- listManager.setAppDir(tempDir);
-
- var data = "";
-
- var set1Name = "test1-foo-domain";
- data += "[" + set1Name + " 1.2]\n";
- var set1 = {};
- for (var i = 0; i < 10; i++) {
- set1["http://" + i + ".com"] = 1;
- data += "+" + i + ".com\t1\n";
- }
-
- data += "\n";
- var set2Name = "test2-foo-domain";
- // TODO must have blank line
- data += "\n[" + set2Name + " 1.7]\n";
- var set2 = {};
- for (var i = 0; i < 5; i++) {
- set2["http://" + i + ".com"] = 1;
- data += "+" + i + ".com\t1\n";
- }
-
- function deserialized(tablesKnown, tablesData) {
- listManager.wrappedJSObject.dataReady(tablesKnown, tablesData);
-
- var file = tempDir.clone();
- file.append(set1Name + ".sst");
- G_Assert(z, file.exists() && file.isFile() && file.isReadable(),
- "Failed to write out: " + file.path);
-
- file = tempDir.clone();
- file.append(set2Name + ".sst");
- G_Assert(z, file.exists() && file.isFile() && file.isReadable(),
- "Failed to write out: " + file.path);
-
- // now try to read them back from disk
- listManager = Cc["@mozilla.org/url-classifier/listmanager;1"]
- .createInstance(Ci.nsIUrlListManager);
- listManager.setAppDir(tempDir);
- var tables = [ set1Name, set2Name ];
- listManager.enableUpdate(set1Name);
- listManager.enableUpdate(set2Name);
- listManager.wrappedJSObject.readDataFiles();
-
- // assert that the values match
- for (var prop in set1) {
- G_Assert(z,
- listManager.wrappedJSObject.tablesData[set1Name].exists(prop),
- "Couldn't find member " + prop + "of set1 from disk.");
- }
-
- for (var prop in set2) {
- G_Assert(z,
- listManager.wrappedJSObject.tablesData[set2Name].exists(prop),
- "Couldn't find member " + prop + "of set2 from disk.");
- }
-
- tempDir.remove(true);
-
- G_Debug(z, "PASSED");
- };
-
- // Use the unwrapped object for the unittest
- listManager.wrappedJSObject.deserialize_(data, deserialized);
- }
-
- function onProtUnittestLoad() {
- ProtectionTableTests();
- ProtectionListManagerTests();
- }
-]]></script>
-</window>
diff --git a/toolkit/components/urlformatter/moz.build b/toolkit/components/urlformatter/moz.build
index 1543fddda8..c7a3ac76ed 100644
--- a/toolkit/components/urlformatter/moz.build
+++ b/toolkit/components/urlformatter/moz.build
@@ -4,24 +4,14 @@
# 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/.
-XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
-
-XPIDL_SOURCES += [
- 'nsIURLFormatter.idl',
-]
+XPIDL_SOURCES += ['nsIURLFormatter.idl']
XPIDL_MODULE = 'urlformatter'
-EXTRA_COMPONENTS += [
- 'nsURLFormatter.manifest',
-]
+EXTRA_COMPONENTS += ['nsURLFormatter.manifest']
-EXTRA_PP_COMPONENTS += [
- 'nsURLFormatter.js',
-]
+EXTRA_PP_COMPONENTS += ['nsURLFormatter.js']
-CONFIGURE_SUBST_FILES += [
- 'api_keys',
-]
+CONFIGURE_SUBST_FILES += ['api_keys']
DEFINES['OBJDIR'] = OBJDIR
diff --git a/toolkit/components/urlformatter/tests/unit/.eslintrc.js b/toolkit/components/urlformatter/tests/unit/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/urlformatter/tests/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/urlformatter/tests/unit/head_urlformatter.js b/toolkit/components/urlformatter/tests/unit/head_urlformatter.js
deleted file mode 100644
index 8af2aaac4a..0000000000
--- a/toolkit/components/urlformatter/tests/unit/head_urlformatter.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/* 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/. */
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-var Cu = Components.utils;
-
-Cu.import("resource://testing-common/AppInfo.jsm", this);
-updateAppInfo({
- name: "Url Formatter Test",
- ID: "urlformattertest@test.mozilla.org",
- version: "1",
- platformVersion: "2.0",
-});
-var gAppInfo = getAppInfo();
diff --git a/toolkit/components/urlformatter/tests/unit/test_urlformatter.js b/toolkit/components/urlformatter/tests/unit/test_urlformatter.js
deleted file mode 100644
index 6f218822ae..0000000000
--- a/toolkit/components/urlformatter/tests/unit/test_urlformatter.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-function run_test() {
- var formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"].
- getService(Ci.nsIURLFormatter);
- var locale = Cc["@mozilla.org/chrome/chrome-registry;1"].
- getService(Ci.nsIXULChromeRegistry).
- getSelectedLocale('global');
- var prefs = Cc['@mozilla.org/preferences-service;1'].
- getService(Ci.nsIPrefBranch);
- var sysInfo = Cc["@mozilla.org/system-info;1"].
- getService(Ci.nsIPropertyBag2);
- var OSVersion = sysInfo.getProperty("name") + " " +
- sysInfo.getProperty("version");
- try {
- OSVersion += " (" + sysInfo.getProperty("secondaryLibrary") + ")";
- } catch (e) {}
- OSVersion = encodeURIComponent(OSVersion);
- var macutils = null;
- try {
- macutils = Cc["@mozilla.org/xpcom/mac-utils;1"].
- getService(Ci.nsIMacUtils);
- } catch (e) {}
- var appInfo = Cc["@mozilla.org/xre/app-info;1"].
- getService(Ci.nsIXULAppInfo).
- QueryInterface(Ci.nsIXULRuntime);
- var abi = macutils && macutils.isUniversalBinary ? "Universal-gcc3" : appInfo.XPCOMABI;
-
- let defaults = prefs.QueryInterface(Ci.nsIPrefService).getDefaultBranch(null);
- let channel = defaults.getCharPref("app.update.channel", "default");
-
- // Set distribution values.
- defaults.setCharPref("distribution.id", "bacon");
- defaults.setCharPref("distribution.version", "1.0");
-
- var upperUrlRaw = "http://%LOCALE%.%VENDOR%.foo/?name=%NAME%&id=%ID%&version=%VERSION%&platversion=%PLATFORMVERSION%&abid=%APPBUILDID%&pbid=%PLATFORMBUILDID%&app=%APP%&os=%OS%&abi=%XPCOMABI%";
- var lowerUrlRaw = "http://%locale%.%vendor%.foo/?name=%name%&id=%id%&version=%version%&platversion=%platformversion%&abid=%appbuildid%&pbid=%platformbuildid%&app=%app%&os=%os%&abi=%xpcomabi%";
- // XXX %APP%'s RegExp is not global, so it only replaces the first space
- var ulUrlRef = "http://" + locale + ".Mozilla.foo/?name=Url Formatter Test&id=urlformattertest@test.mozilla.org&version=1&platversion=2.0&abid=" + gAppInfo.appBuildID + "&pbid=" + gAppInfo.platformBuildID + "&app=urlformatter test&os=XPCShell&abi=" + abi;
- var multiUrl = "http://%VENDOR%.%VENDOR%.%NAME%.%VENDOR%.%NAME%";
- var multiUrlRef = "http://Mozilla.Mozilla.Url Formatter Test.Mozilla.Url Formatter Test";
- var encodedUrl = "https://%LOCALE%.%VENDOR%.foo/?q=%E3%82%BF%E3%83%96&app=%NAME%&ver=%PLATFORMVERSION%";
- var encodedUrlRef = "https://" + locale + ".Mozilla.foo/?q=%E3%82%BF%E3%83%96&app=Url Formatter Test&ver=2.0";
- var advancedUrl = "http://test.mozilla.com/%NAME%/%VERSION%/%APPBUILDID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/";
- var advancedUrlRef = "http://test.mozilla.com/Url Formatter Test/1/" + gAppInfo.appBuildID + "/XPCShell_" + abi + "/" + locale + "/" + channel + "/" + OSVersion + "/bacon/1.0/";
-
- var pref = "xpcshell.urlformatter.test";
- var str = Cc["@mozilla.org/supports-string;1"].
- createInstance(Ci.nsISupportsString);
- str.data = upperUrlRaw;
- prefs.setComplexValue(pref, Ci.nsISupportsString, str);
-
- do_check_eq(formatter.formatURL(upperUrlRaw), ulUrlRef);
- do_check_eq(formatter.formatURLPref(pref), ulUrlRef);
- // Keys must be uppercase
- do_check_neq(formatter.formatURL(lowerUrlRaw), ulUrlRef);
- do_check_eq(formatter.formatURL(multiUrl), multiUrlRef);
- // Encoded strings must be kept as is (Bug 427304)
- do_check_eq(formatter.formatURL(encodedUrl), encodedUrlRef);
-
- do_check_eq(formatter.formatURL(advancedUrl), advancedUrlRef);
-}
diff --git a/toolkit/components/urlformatter/tests/unit/xpcshell.ini b/toolkit/components/urlformatter/tests/unit/xpcshell.ini
deleted file mode 100644
index 2f82beaa32..0000000000
--- a/toolkit/components/urlformatter/tests/unit/xpcshell.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[DEFAULT]
-head = head_urlformatter.js
-tail =
-skip-if = toolkit == 'android'
-
-[test_urlformatter.js]
diff --git a/toolkit/components/viewsource/moz.build b/toolkit/components/viewsource/moz.build
index aecd256829..965c0b66fa 100644
--- a/toolkit/components/viewsource/moz.build
+++ b/toolkit/components/viewsource/moz.build
@@ -4,14 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
-MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini']
+EXTRA_JS_MODULES += ['ViewSourceBrowser.jsm']
-JAR_MANIFESTS += ['jar.mn']
-
-EXTRA_JS_MODULES += [
- 'ViewSourceBrowser.jsm',
-]
-
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'View Source')
+JAR_MANIFESTS += ['jar.mn'] \ No newline at end of file
diff --git a/toolkit/components/viewsource/test/.eslintrc.js b/toolkit/components/viewsource/test/.eslintrc.js
deleted file mode 100644
index 2c669d844e..0000000000
--- a/toolkit/components/viewsource/test/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../testing/mochitest/chrome.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/viewsource/test/browser/.eslintrc.js b/toolkit/components/viewsource/test/browser/.eslintrc.js
deleted file mode 100644
index 7c80211924..0000000000
--- a/toolkit/components/viewsource/test/browser/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/mochitest/browser.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/viewsource/test/browser/browser.ini b/toolkit/components/viewsource/test/browser/browser.ini
deleted file mode 100644
index d9ebbd25f9..0000000000
--- a/toolkit/components/viewsource/test/browser/browser.ini
+++ /dev/null
@@ -1,12 +0,0 @@
-[DEFAULT]
-support-files = head.js
- file_bug464222.html
-
-[browser_bug464222.js]
-[browser_bug699356.js]
-[browser_bug713810.js]
-[browser_contextmenu.js]
-subsuite = clipboard
-[browser_gotoline.js]
-[browser_srcdoc.js]
-[browser_viewsourceprefs.js]
diff --git a/toolkit/components/viewsource/test/browser/browser_bug464222.js b/toolkit/components/viewsource/test/browser/browser_bug464222.js
deleted file mode 100644
index 30c4fb67a2..0000000000
--- a/toolkit/components/viewsource/test/browser/browser_bug464222.js
+++ /dev/null
@@ -1,12 +0,0 @@
-const source = "http://example.com/browser/toolkit/components/viewsource/test/browser/file_bug464222.html";
-
-add_task(function *() {
- let viewSourceTab = yield* openDocumentSelect(source, "a");
-
- let href = yield ContentTask.spawn(viewSourceTab.linkedBrowser, { }, function* () {
- return content.document.querySelectorAll("a[href]")[0].href;
- });
-
- is(href, "view-source:" + source, "Relative links broken?");
- gBrowser.removeTab(viewSourceTab);
-});
diff --git a/toolkit/components/viewsource/test/browser/browser_bug699356.js b/toolkit/components/viewsource/test/browser/browser_bug699356.js
deleted file mode 100644
index e55c4cf205..0000000000
--- a/toolkit/components/viewsource/test/browser/browser_bug699356.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-function test() {
- let source = "about:blank";
-
- waitForExplicitFinish();
- openViewSourceWindow(source, function(aWindow) {
- let gBrowser = aWindow.gBrowser;
- let docEl = aWindow.document.documentElement;
-
- is(gBrowser.contentDocument.title, source, "Correct document title");
- is(docEl.getAttribute("title"),
- "Source of: " + source + ("nsILocalFileMac" in Components.interfaces ? "" : " - " + docEl.getAttribute("titlemodifier")),
- "Correct window title");
- closeViewSourceWindow(aWindow, finish);
- });
-}
diff --git a/toolkit/components/viewsource/test/browser/browser_bug713810.js b/toolkit/components/viewsource/test/browser/browser_bug713810.js
deleted file mode 100644
index d5b2f3424f..0000000000
--- a/toolkit/components/viewsource/test/browser/browser_bug713810.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-const source = '<html xmlns="http://www.w3.org/1999/xhtml"><body><p>This is a paragraph.</p></body></html>';
-
-add_task(function *() {
- let viewSourceTab = yield* openDocumentSelect("data:text/html," + source, "p");
- yield ContentTask.spawn(viewSourceTab.linkedBrowser, null, function* () {
- Assert.equal(content.document.body.textContent, "<p>This is a paragraph.</p>",
- "Correct source for text/html");
- });
- gBrowser.removeTab(viewSourceTab);
-
- viewSourceTab = yield* openDocumentSelect("data:application/xhtml+xml," + source, "p");
- yield ContentTask.spawn(viewSourceTab.linkedBrowser, null, function* () {
- Assert.equal(content.document.body.textContent,
- '<p xmlns="http://www.w3.org/1999/xhtml">This is a paragraph.</p>',
- "Correct source for application/xhtml+xml");
- });
- gBrowser.removeTab(viewSourceTab);
-});
-
diff --git a/toolkit/components/viewsource/test/browser/browser_contextmenu.js b/toolkit/components/viewsource/test/browser/browser_contextmenu.js
deleted file mode 100644
index 72b8a40be0..0000000000
--- a/toolkit/components/viewsource/test/browser/browser_contextmenu.js
+++ /dev/null
@@ -1,107 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-var source = "data:text/html,text<link%20href='http://example.com/'%20/>more%20text<a%20href='mailto:abc@def.ghi'>email</a>";
-var gViewSourceWindow, gContextMenu, gCopyLinkMenuItem, gCopyEmailMenuItem;
-
-var expectedData = [];
-
-add_task(function *() {
- // Full source in view source window
- let newWindow = yield loadViewSourceWindow(source);
- yield SimpleTest.promiseFocus(newWindow);
-
- yield* onViewSourceWindowOpen(newWindow, false);
-
- let contextMenu = gViewSourceWindow.document.getElementById("viewSourceContextMenu");
-
- for (let test of expectedData) {
- yield* checkMenuItems(contextMenu, false, test[0], test[1], test[2], test[3]);
- }
-
- yield new Promise(resolve => {
- closeViewSourceWindow(newWindow, resolve);
- });
-
- // Selection source in view source tab
- expectedData = [];
- let newTab = yield openDocumentSelect(source, "body");
- yield* onViewSourceWindowOpen(window, true);
-
- contextMenu = document.getElementById("contentAreaContextMenu");
-
- for (let test of expectedData) {
- yield* checkMenuItems(contextMenu, true, test[0], test[1], test[2], test[3]);
- }
-
- gBrowser.removeTab(newTab);
-
- // Selection source in view source window
- yield pushPrefs(["view_source.tab", false]);
-
- expectedData = [];
- newWindow = yield openDocumentSelect(source, "body");
- yield SimpleTest.promiseFocus(newWindow);
-
- yield* onViewSourceWindowOpen(newWindow, false);
-
- contextMenu = newWindow.document.getElementById("viewSourceContextMenu");
-
- for (let test of expectedData) {
- yield* checkMenuItems(contextMenu, false, test[0], test[1], test[2], test[3]);
- }
-
- yield new Promise(resolve => {
- closeViewSourceWindow(newWindow, resolve);
- });
-});
-
-function* onViewSourceWindowOpen(aWindow, aIsTab) {
- gViewSourceWindow = aWindow;
-
- gCopyLinkMenuItem = aWindow.document.getElementById(aIsTab ? "context-copylink" : "context-copyLink");
- gCopyEmailMenuItem = aWindow.document.getElementById(aIsTab ? "context-copyemail" : "context-copyEmail");
-
- let browser = aIsTab ? gBrowser.selectedBrowser : gViewSourceWindow.gBrowser;
- yield ContentTask.spawn(browser, null, function* (arg) {
- let tags = content.document.querySelectorAll("a[href]");
- Assert.equal(tags[0].href, "view-source:http://example.com/", "Link has correct href");
- Assert.equal(tags[1].href, "mailto:abc@def.ghi", "Link has correct href");
- });
-
- expectedData.push(["a[href]", true, false, "http://example.com/"]);
- expectedData.push(["a[href^=mailto]", false, true, "abc@def.ghi"]);
- expectedData.push(["span", false, false, null]);
-}
-
-function* checkMenuItems(contextMenu, isTab, selector, copyLinkExpected, copyEmailExpected, expectedClipboardContent) {
-
- let browser = isTab ? gBrowser.selectedBrowser : gViewSourceWindow.gBrowser;
- yield ContentTask.spawn(browser, { selector: selector }, function* (arg) {
- content.document.querySelector(arg.selector).scrollIntoView();
- });
-
- let popupShownPromise = BrowserTestUtils.waitForEvent(contextMenu, "popupshown");
- yield BrowserTestUtils.synthesizeMouseAtCenter(selector,
- { type: "contextmenu", button: 2}, browser);
- yield popupShownPromise;
-
- is(gCopyLinkMenuItem.hidden, !copyLinkExpected, "Copy link menuitem is " + (copyLinkExpected ? "not hidden" : "hidden"));
- is(gCopyEmailMenuItem.hidden, !copyEmailExpected, "Copy email menuitem is " + (copyEmailExpected ? "not hidden" : "hidden"));
-
- if (copyLinkExpected || copyEmailExpected) {
- yield new Promise((resolve, reject) => {
- waitForClipboard(expectedClipboardContent, function() {
- if (copyLinkExpected)
- gCopyLinkMenuItem.click();
- else
- gCopyEmailMenuItem.click();
- }, resolve, reject);
- });
- }
-
- let popupHiddenPromise = BrowserTestUtils.waitForEvent(contextMenu, "popuphidden");
- contextMenu.hidePopup();
- yield popupHiddenPromise;
-}
diff --git a/toolkit/components/viewsource/test/browser/browser_gotoline.js b/toolkit/components/viewsource/test/browser/browser_gotoline.js
deleted file mode 100644
index 5bb45f9caf..0000000000
--- a/toolkit/components/viewsource/test/browser/browser_gotoline.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-Cu.import("resource://testing-common/ContentTaskUtils.jsm", this);
-
-var content = "line 1\nline 2\nline 3";
-
-add_task(function*() {
- // First test with text with the text/html mimetype.
- let win = yield loadViewSourceWindow("data:text/html," + encodeURIComponent(content));
- yield checkViewSource(win);
- yield BrowserTestUtils.closeWindow(win);
-
- win = yield loadViewSourceWindow("data:text/plain," + encodeURIComponent(content));
- yield checkViewSource(win);
- yield BrowserTestUtils.closeWindow(win);
-});
-
-var checkViewSource = Task.async(function* (aWindow) {
- is(aWindow.gBrowser.contentDocument.body.textContent, content, "Correct content loaded");
- let statusPanel = aWindow.document.getElementById("statusbar-line-col");
- is(statusPanel.getAttribute("label"), "", "Correct status bar text");
-
- for (let i = 1; i <= 3; i++) {
- aWindow.viewSourceChrome.goToLine(i);
- yield ContentTask.spawn(aWindow.gBrowser, i, function*(i) {
- let selection = content.getSelection();
- Assert.equal(selection.toString(), "line " + i, "Correct text selected");
- });
-
- yield ContentTaskUtils.waitForCondition(() => {
- return (statusPanel.getAttribute("label") == "Line " + i + ", Col 1");
- }, "Correct status bar text");
- }
-});
diff --git a/toolkit/components/viewsource/test/browser/browser_srcdoc.js b/toolkit/components/viewsource/test/browser/browser_srcdoc.js
deleted file mode 100644
index 542741ffc3..0000000000
--- a/toolkit/components/viewsource/test/browser/browser_srcdoc.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-const frameSource = `<a href="about:mozilla">good</a>`;
-const source = `<html><iframe srcdoc='${frameSource}' id="f"></iframe></html>`;
-
-add_task(function*() {
- let url = `data:text/html,${source}`;
- yield BrowserTestUtils.withNewTab({ gBrowser, url }, checkFrameSource);
-});
-
-function* checkFrameSource() {
- let sourceTab = yield openViewFrameSourceTab("#f");
- registerCleanupFunction(function() {
- gBrowser.removeTab(sourceTab);
- });
-
- yield waitForSourceLoaded(sourceTab);
-
- let browser = gBrowser.selectedBrowser;
- let textContent = yield ContentTask.spawn(browser, {}, function*() {
- return content.document.body.textContent;
- });
- is(textContent, frameSource, "Correct content loaded");
- let id = yield ContentTask.spawn(browser, {}, function*() {
- return content.document.body.id;
- });
- is(id, "viewsource", "View source mode enabled")
-}
diff --git a/toolkit/components/viewsource/test/browser/browser_viewsourceprefs.js b/toolkit/components/viewsource/test/browser/browser_viewsourceprefs.js
deleted file mode 100644
index 7361a70a5a..0000000000
--- a/toolkit/components/viewsource/test/browser/browser_viewsourceprefs.js
+++ /dev/null
@@ -1,136 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-var plaintextURL = "data:text/plain,hello+world";
-var htmlURL = "about:mozilla";
-
-add_task(function* setup() {
- registerCleanupFunction(function() {
- SpecialPowers.clearUserPref("view_source.tab_size");
- SpecialPowers.clearUserPref("view_source.wrap_long_lines");
- SpecialPowers.clearUserPref("view_source.syntax_highlight");
- });
-});
-
-add_task(function*() {
- yield exercisePrefs(plaintextURL, false);
- yield exercisePrefs(htmlURL, true);
-});
-
-var exercisePrefs = Task.async(function* (source, highlightable) {
- let win = yield loadViewSourceWindow(source);
- let wrapMenuItem = win.document.getElementById("menu_wrapLongLines");
- let syntaxMenuItem = win.document.getElementById("menu_highlightSyntax");
-
- // Strip checked="false" attributes, since we're not interested in them.
- if (wrapMenuItem.getAttribute("checked") == "false") {
- wrapMenuItem.removeAttribute("checked");
- }
- if (syntaxMenuItem.getAttribute("checked") == "false") {
- syntaxMenuItem.removeAttribute("checked");
- }
-
- // Test the default states of these menu items.
- is(wrapMenuItem.hasAttribute("checked"), false,
- "Wrap menu item not checked by default");
- is(syntaxMenuItem.hasAttribute("checked"), true,
- "Syntax menu item checked by default");
-
- yield checkStyle(win, "-moz-tab-size", 4);
- yield checkStyle(win, "white-space", "pre");
-
- // Next, test that the Wrap Long Lines menu item works.
- let prefReady = waitForPrefChange("view_source.wrap_long_lines");
- simulateClick(wrapMenuItem);
- is(wrapMenuItem.hasAttribute("checked"), true, "Wrap menu item checked");
- yield prefReady;
- is(SpecialPowers.getBoolPref("view_source.wrap_long_lines"), true, "Wrap pref set");
-
- yield checkStyle(win, "white-space", "pre-wrap");
-
- prefReady = waitForPrefChange("view_source.wrap_long_lines");
- simulateClick(wrapMenuItem);
- is(wrapMenuItem.hasAttribute("checked"), false, "Wrap menu item unchecked");
- yield prefReady;
- is(SpecialPowers.getBoolPref("view_source.wrap_long_lines"), false, "Wrap pref set");
- yield checkStyle(win, "white-space", "pre");
-
- // Check that the Syntax Highlighting menu item works.
- prefReady = waitForPrefChange("view_source.syntax_highlight");
- simulateClick(syntaxMenuItem);
- is(syntaxMenuItem.hasAttribute("checked"), false, "Syntax menu item unchecked");
- yield prefReady;
- is(SpecialPowers.getBoolPref("view_source.syntax_highlight"), false, "Syntax highlighting pref set");
- yield checkHighlight(win, false);
-
- prefReady = waitForPrefChange("view_source.syntax_highlight");
- simulateClick(syntaxMenuItem);
- is(syntaxMenuItem.hasAttribute("checked"), true, "Syntax menu item checked");
- yield prefReady;
- is(SpecialPowers.getBoolPref("view_source.syntax_highlight"), true, "Syntax highlighting pref set");
- yield checkHighlight(win, highlightable);
- yield BrowserTestUtils.closeWindow(win);
-
- // Open a new view-source window to check that the prefs are obeyed.
- SpecialPowers.setIntPref("view_source.tab_size", 2);
- SpecialPowers.setBoolPref("view_source.wrap_long_lines", true);
- SpecialPowers.setBoolPref("view_source.syntax_highlight", false);
-
- win = yield loadViewSourceWindow(source);
- wrapMenuItem = win.document.getElementById("menu_wrapLongLines");
- syntaxMenuItem = win.document.getElementById("menu_highlightSyntax");
-
- // Strip checked="false" attributes, since we're not interested in them.
- if (wrapMenuItem.getAttribute("checked") == "false") {
- wrapMenuItem.removeAttribute("checked");
- }
- if (syntaxMenuItem.getAttribute("checked") == "false") {
- syntaxMenuItem.removeAttribute("checked");
- }
-
- is(wrapMenuItem.hasAttribute("checked"), true, "Wrap menu item checked");
- is(syntaxMenuItem.hasAttribute("checked"), false, "Syntax menu item unchecked");
- yield checkStyle(win, "-moz-tab-size", 2);
- yield checkStyle(win, "white-space", "pre-wrap");
- yield checkHighlight(win, false);
-
- SpecialPowers.clearUserPref("view_source.tab_size");
- SpecialPowers.clearUserPref("view_source.wrap_long_lines");
- SpecialPowers.clearUserPref("view_source.syntax_highlight");
-
- yield BrowserTestUtils.closeWindow(win);
-});
-
-// Simulate a menu item click, including toggling the checked state.
-// This saves us from opening the menu and trying to click on the item,
-// which doesn't work on Mac OS X.
-function simulateClick(aMenuItem) {
- if (aMenuItem.hasAttribute("checked"))
- aMenuItem.removeAttribute("checked");
- else
- aMenuItem.setAttribute("checked", "true");
-
- aMenuItem.click();
-}
-
-var checkStyle = Task.async(function* (win, styleProperty, expected) {
- let browser = win.gBrowser;
- let value = yield ContentTask.spawn(browser, styleProperty, function* (styleProperty) {
- let style = content.getComputedStyle(content.document.body, null);
- return style.getPropertyValue(styleProperty);
- });
- is(value, expected, "Correct value of " + styleProperty);
-});
-
-var checkHighlight = Task.async(function* (win, expected) {
- let browser = win.gBrowser;
- let highlighted = yield ContentTask.spawn(browser, {}, function* () {
- let spans = content.document.getElementsByTagName("span");
- return Array.some(spans, (span) => {
- let style = content.getComputedStyle(span, null);
- return style.getPropertyValue("color") !== "rgb(0, 0, 0)";
- });
- });
- is(highlighted, expected, "Syntax highlighting " + (expected ? "on" : "off"));
-});
diff --git a/toolkit/components/viewsource/test/browser/file_bug464222.html b/toolkit/components/viewsource/test/browser/file_bug464222.html
deleted file mode 100644
index 4f2a43f0d4..0000000000
--- a/toolkit/components/viewsource/test/browser/file_bug464222.html
+++ /dev/null
@@ -1 +0,0 @@
-<a href="file_bug464222.html">I'm a link</a> \ No newline at end of file
diff --git a/toolkit/components/viewsource/test/browser/head.js b/toolkit/components/viewsource/test/browser/head.js
deleted file mode 100644
index bb46369b04..0000000000
--- a/toolkit/components/viewsource/test/browser/head.js
+++ /dev/null
@@ -1,200 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-Cu.import("resource://gre/modules/PromiseUtils.jsm");
-Cu.import("resource://gre/modules/Preferences.jsm");
-
-const WINDOW_TYPE = "navigator:view-source";
-
-function openViewSourceWindow(aURI, aCallback) {
- let viewSourceWindow = openDialog("chrome://global/content/viewSource.xul", null, null, aURI);
- viewSourceWindow.addEventListener("pageshow", function pageShowHandler(event) {
- // Wait for the inner window to load, not viewSourceWindow.
- if (event.target.location == "view-source:" + aURI) {
- info("View source window opened: " + event.target.location);
- viewSourceWindow.removeEventListener("pageshow", pageShowHandler, false);
- aCallback(viewSourceWindow);
- }
- }, false);
-}
-
-function loadViewSourceWindow(URL) {
- return new Promise((resolve) => {
- openViewSourceWindow(URL, resolve);
- })
-}
-
-function closeViewSourceWindow(aWindow, aCallback) {
- Services.wm.addListener({
- onCloseWindow: function() {
- Services.wm.removeListener(this);
- executeSoon(aCallback);
- }
- });
- aWindow.close();
-}
-
-function testViewSourceWindow(aURI, aTestCallback, aCloseCallback) {
- openViewSourceWindow(aURI, function(aWindow) {
- aTestCallback(aWindow);
- closeViewSourceWindow(aWindow, aCloseCallback);
- });
-}
-
-function waitForViewSourceWindow() {
- return new Promise(resolve => {
- let windowListener = {
- onOpenWindow(xulWindow) {
- let win = xulWindow.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindow);
- win.addEventListener("load", function listener() {
- win.removeEventListener("load", listener, false);
- if (win.document.documentElement.getAttribute("windowtype") !=
- WINDOW_TYPE) {
- return;
- }
- // Found the window
- resolve(win);
- Services.wm.removeListener(windowListener);
- }, false);
- },
- onCloseWindow() {},
- onWindowTitleChange() {}
- };
- Services.wm.addListener(windowListener);
- });
-}
-
-/**
- * Opens a view source tab / window for a selection (View Selection Source)
- * within the currently selected browser in gBrowser.
- *
- * @param aCSSSelector - used to specify a node within the selection to
- * view the source of. It is expected that this node is
- * within an existing selection.
- * @returns the new tab / window which shows the source.
- */
-function* openViewPartialSource(aCSSSelector) {
- let contentAreaContextMenuPopup =
- document.getElementById("contentAreaContextMenu");
- let popupShownPromise =
- BrowserTestUtils.waitForEvent(contentAreaContextMenuPopup, "popupshown");
- yield BrowserTestUtils.synthesizeMouseAtCenter(aCSSSelector,
- { type: "contextmenu", button: 2 }, gBrowser.selectedBrowser);
- yield popupShownPromise;
-
- let openPromise;
- if (Services.prefs.getBoolPref("view_source.tab")) {
- openPromise = BrowserTestUtils.waitForNewTab(gBrowser, null);
- } else {
- openPromise = waitForViewSourceWindow();
- }
-
- let popupHiddenPromise =
- BrowserTestUtils.waitForEvent(contentAreaContextMenuPopup, "popuphidden");
- let item = document.getElementById("context-viewpartialsource-selection");
- EventUtils.synthesizeMouseAtCenter(item, {});
- yield popupHiddenPromise;
-
- return (yield openPromise);
-}
-
-/**
- * Opens a view source tab for a frame (View Frame Source) within the
- * currently selected browser in gBrowser.
- *
- * @param aCSSSelector - used to specify the frame to view the source of.
- * @returns the new tab which shows the source.
- */
-function* openViewFrameSourceTab(aCSSSelector) {
- let contentAreaContextMenuPopup =
- document.getElementById("contentAreaContextMenu");
- let popupShownPromise =
- BrowserTestUtils.waitForEvent(contentAreaContextMenuPopup, "popupshown");
- yield BrowserTestUtils.synthesizeMouseAtCenter(aCSSSelector,
- { type: "contextmenu", button: 2 }, gBrowser.selectedBrowser);
- yield popupShownPromise;
-
- let frameContextMenu = document.getElementById("frame");
- popupShownPromise =
- BrowserTestUtils.waitForEvent(frameContextMenu, "popupshown");
- EventUtils.synthesizeMouseAtCenter(frameContextMenu, {});
- yield popupShownPromise;
-
- let newTabPromise = BrowserTestUtils.waitForNewTab(gBrowser, null);
-
- let popupHiddenPromise =
- BrowserTestUtils.waitForEvent(frameContextMenu, "popuphidden");
- let item = document.getElementById("context-viewframesource");
- EventUtils.synthesizeMouseAtCenter(item, {});
- yield popupHiddenPromise;
-
- return (yield newTabPromise);
-}
-
-registerCleanupFunction(function() {
- var windows = Services.wm.getEnumerator(WINDOW_TYPE);
- ok(!windows.hasMoreElements(), "No remaining view source windows still open");
- while (windows.hasMoreElements())
- windows.getNext().close();
-});
-
-/**
- * For a given view source tab / window, wait for the source loading step to
- * complete.
- */
-function waitForSourceLoaded(tabOrWindow) {
- return new Promise(resolve => {
- let mm = tabOrWindow.messageManager ||
- tabOrWindow.linkedBrowser.messageManager;
- mm.addMessageListener("ViewSource:SourceLoaded", function sourceLoaded() {
- mm.removeMessageListener("ViewSource:SourceLoaded", sourceLoaded);
- setTimeout(resolve, 0);
- });
- });
-}
-
-/**
- * Open a new document in a new tab, select part of it, and view the source of
- * that selection. The document is not closed afterwards.
- *
- * @param aURI - url to load
- * @param aCSSSelector - used to specify a node to select. All of this node's
- * children will be selected.
- * @returns the new tab / window which shows the source.
- */
-function* openDocumentSelect(aURI, aCSSSelector) {
- let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, aURI);
- registerCleanupFunction(function() {
- gBrowser.removeTab(tab);
- });
-
- yield ContentTask.spawn(gBrowser.selectedBrowser, { selector: aCSSSelector }, function* (arg) {
- let element = content.document.querySelector(arg.selector);
- content.getSelection().selectAllChildren(element);
- });
-
- let tabOrWindow = yield openViewPartialSource(aCSSSelector);
-
- // Wait until the source has been loaded.
- yield waitForSourceLoaded(tabOrWindow);
-
- return tabOrWindow;
-}
-
-function pushPrefs(...aPrefs) {
- return new Promise(resolve => {
- SpecialPowers.pushPrefEnv({"set": aPrefs}, resolve);
- });
-}
-
-function waitForPrefChange(pref) {
- let deferred = PromiseUtils.defer();
- let observer = () => {
- Preferences.ignore(pref, observer);
- deferred.resolve();
- };
- Preferences.observe(pref, observer);
- return deferred.promise;
-}
diff --git a/toolkit/components/viewsource/test/chrome.ini b/toolkit/components/viewsource/test/chrome.ini
deleted file mode 100644
index bd013ab6c9..0000000000
--- a/toolkit/components/viewsource/test/chrome.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[DEFAULT]
-
-[test_bug428653.html]
-support-files = file_empty.html
diff --git a/toolkit/components/viewsource/test/file_empty.html b/toolkit/components/viewsource/test/file_empty.html
deleted file mode 100644
index 495c23ec8a..0000000000
--- a/toolkit/components/viewsource/test/file_empty.html
+++ /dev/null
@@ -1 +0,0 @@
-<!DOCTYPE html><html><body></body></html>
diff --git a/toolkit/components/viewsource/test/test_bug428653.html b/toolkit/components/viewsource/test/test_bug428653.html
deleted file mode 100644
index b1d48bfb39..0000000000
--- a/toolkit/components/viewsource/test/test_bug428653.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=428653
--->
-<head>
- <title>View Source Test (bug 428653)</title>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
-</head>
-<body>
-
- <iframe id="content" src="http://example.org/tests/toolkit/components/viewsource/test/file_empty.html"></iframe>
-
- <script type="application/javascript">
- /*
- Test that we can't call the content browser's document.open() over Xrays.
- See the security checks in nsHTMLDocument::Open, which make sure that the
- entry global's principal matches that of the document.
- */
- SimpleTest.waitForExplicitFinish();
-
- addLoadEvent(function testDocumentOpen() {
- var browser = document.getElementById("content");
- ok(browser, "got browser");
- var doc = browser.contentDocument;
- ok(doc, "got content document");
-
- var opened = false;
- try {
- doc.open("text/html", "replace");
- opened = true;
- } catch (e) {
- is(e.name, "SecurityError", "Unexpected exception")
- }
- is(opened, false, "Shouldn't have opened document");
-
- doc.wrappedJSObject.open("text/html", "replace");
- ok(true, "Should be able to open document via Xray Waiver");
-
- SimpleTest.finish();
- });
- </script>
-</body>
-</html>
diff --git a/toolkit/components/workerloader/moz.build b/toolkit/components/workerloader/moz.build
index 145f7adc05..f81309dccf 100644
--- a/toolkit/components/workerloader/moz.build
+++ b/toolkit/components/workerloader/moz.build
@@ -4,11 +4,4 @@
# 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/.
-MOCHITEST_CHROME_MANIFESTS += ['tests/chrome.ini']
-
-EXTRA_JS_MODULES.workers += [
- 'require.js'
-]
-
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'Async Tooling')
+EXTRA_JS_MODULES.workers += ['require.js']
diff --git a/toolkit/components/workerloader/tests/.eslintrc.js b/toolkit/components/workerloader/tests/.eslintrc.js
deleted file mode 100644
index 2c669d844e..0000000000
--- a/toolkit/components/workerloader/tests/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../testing/mochitest/chrome.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/workerloader/tests/chrome.ini b/toolkit/components/workerloader/tests/chrome.ini
deleted file mode 100644
index c83a0b0813..0000000000
--- a/toolkit/components/workerloader/tests/chrome.ini
+++ /dev/null
@@ -1,15 +0,0 @@
-[DEFAULT]
-support-files =
- moduleA-depends.js
- moduleB-dependency.js
- moduleC-circular.js
- moduleD-circular.js
- moduleE-throws-during-require.js
- moduleF-syntax-error.js
- moduleG-throws-later.js
- moduleH-module-dot-exports.js
- utils_mainthread.js
- utils_worker.js
- worker_test_loading.js
-
-[test_loading.xul]
diff --git a/toolkit/components/workerloader/tests/moduleA-depends.js b/toolkit/components/workerloader/tests/moduleA-depends.js
deleted file mode 100644
index 0e1cc7c8b3..0000000000
--- a/toolkit/components/workerloader/tests/moduleA-depends.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// A trivial module that depends on an equally trivial module
-var B = require("chrome://mochitests/content/chrome/toolkit/components/workerloader/tests/moduleB-dependency.js");
-
-// Ensure that the initial set of exports is empty
-if (Object.keys(exports).length) {
- throw new Error("exports should be empty, initially");
-}
-
-// Export some values
-exports.A = true;
-exports.importedFoo = B.foo;
diff --git a/toolkit/components/workerloader/tests/moduleB-dependency.js b/toolkit/components/workerloader/tests/moduleB-dependency.js
deleted file mode 100644
index 5c9831fc3a..0000000000
--- a/toolkit/components/workerloader/tests/moduleB-dependency.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-exports.B = true;
-exports.foo = "foo";
-
-// Side-effect to detect if we attempt to re-execute this module.
-if ("loadedB" in self) {
- throw new Error("B has been evaluted twice");
-}
-self.loadedB = true;
diff --git a/toolkit/components/workerloader/tests/moduleC-circular.js b/toolkit/components/workerloader/tests/moduleC-circular.js
deleted file mode 100644
index 5dc14259a4..0000000000
--- a/toolkit/components/workerloader/tests/moduleC-circular.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Module C and module D have circular dependencies.
-// This should not prevent from loading them.
-
-// This value is set before any circular dependency, it should be visible
-// in D.
-exports.enteredC = true;
-
-var D = require("chrome://mochitests/content/chrome/toolkit/components/workerloader/tests/moduleD-circular.js");
-
-// The following values are set after importing D.
-// copiedFromD.copiedFromC should have only one field |enteredC|
-exports.copiedFromD = JSON.parse(JSON.stringify(D));
-// exportedFromD.copiedFromC should have all the fields defined in |exports|
-exports.exportedFromD = D;
-exports.finishedC = true;
diff --git a/toolkit/components/workerloader/tests/moduleD-circular.js b/toolkit/components/workerloader/tests/moduleD-circular.js
deleted file mode 100644
index d77bdc74db..0000000000
--- a/toolkit/components/workerloader/tests/moduleD-circular.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Module C and module D have circular dependencies.
-// This should not prevent from loading them.
-
-exports.enteredD = true;
-var C = require("chrome://mochitests/content/chrome/toolkit/components/workerloader/tests/moduleC-circular.js");
-exports.copiedFromC = JSON.parse(JSON.stringify(C));
-exports.exportedFromC = C;
-exports.finishedD = true;
diff --git a/toolkit/components/workerloader/tests/moduleE-throws-during-require.js b/toolkit/components/workerloader/tests/moduleE-throws-during-require.js
deleted file mode 100644
index b0be0449f9..0000000000
--- a/toolkit/components/workerloader/tests/moduleE-throws-during-require.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Skip a few lines
-// 5
-// 6
-// 7
-// 8
-// 9
-throw new Error("Let's see if this error is obtained with the right origin");
diff --git a/toolkit/components/workerloader/tests/moduleF-syntax-error.js b/toolkit/components/workerloader/tests/moduleF-syntax-error.js
deleted file mode 100644
index c03fa32f8a..0000000000
--- a/toolkit/components/workerloader/tests/moduleF-syntax-error.js
+++ /dev/null
@@ -1,6 +0,0 @@
-<!--
-Any copyright is dedicated to the Public Domain.
-http://creativecommons.org/publicdomain/zero/1.0/
--->
-<?xml version="1.0" encoding="UTF-8" ?>
-<foo>Anything that doesn't parse as JavaScript</foo>
diff --git a/toolkit/components/workerloader/tests/moduleG-throws-later.js b/toolkit/components/workerloader/tests/moduleG-throws-later.js
deleted file mode 100644
index 8a24bc7e46..0000000000
--- a/toolkit/components/workerloader/tests/moduleG-throws-later.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Skip a few lines
-// 5
-// 6
-// 7
-// 8
-// 9
-exports.doThrow = function doThrow() {
- Array.prototype.sort.apply("foo"); // This will raise a native TypeError
-};
diff --git a/toolkit/components/workerloader/tests/moduleH-module-dot-exports.js b/toolkit/components/workerloader/tests/moduleH-module-dot-exports.js
deleted file mode 100644
index a6b93bbccb..0000000000
--- a/toolkit/components/workerloader/tests/moduleH-module-dot-exports.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// This should be overwritten by module.exports
-exports.key = "wrong value";
-
-module.exports = {
- key: "value"
-};
-
-// This should also be overwritten by module.exports
-exports.key = "another wrong value";
diff --git a/toolkit/components/workerloader/tests/test_loading.xul b/toolkit/components/workerloader/tests/test_loading.xul
deleted file mode 100644
index 2744270e14..0000000000
--- a/toolkit/components/workerloader/tests/test_loading.xul
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
--->
-<window title="Testing the worker loader"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="test();">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
- <script type="application/javascript"
- src="utils_mainthread.js"/>
- <script type="application/javascript">
- <![CDATA[
-
-let worker;
-let main = this;
-
-function test() {
- info("Starting test " + document.uri);
-
- worker = new ChromeWorker("worker_test_loading.js");
- SimpleTest.waitForExplicitFinish();
- info("Chrome worker created");
- worker_handler(worker);
- worker.postMessage(document.uri);
- ok(true, "Test in progress");
-};
-]]>
- </script>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display:none;"></div>
- <pre id="test"></pre>
- </body>
- <label id="test-result"/>
-</window>
diff --git a/toolkit/components/workerloader/tests/utils_mainthread.js b/toolkit/components/workerloader/tests/utils_mainthread.js
deleted file mode 100644
index 148591c3df..0000000000
--- a/toolkit/components/workerloader/tests/utils_mainthread.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function worker_handler(worker) {
- worker.onerror = function(error) {
- error.preventDefault();
- ok(false, "error "+ error.message);
- };
- worker.onmessage = function(msg) {
-// ok(true, "MAIN: onmessage " + JSON.stringify(msg.data));
- switch (msg.data.kind) {
- case "is":
- SimpleTest.ok(msg.data.outcome, msg.data.description +
- "( "+ msg.data.a + " ==? " + msg.data.b + ")" );
- return;
- case "isnot":
- SimpleTest.ok(msg.data.outcome, msg.data.description +
- "( "+ msg.data.a + " !=? " + msg.data.b + ")" );
- return;
- case "ok":
- SimpleTest.ok(msg.data.condition, msg.data.description);
- return;
- case "info":
- SimpleTest.info(msg.data.description);
- return;
- case "finish":
- SimpleTest.finish();
- return;
- default:
- SimpleTest.ok(false, "test_osfile.xul: wrong message " + JSON.stringify(msg.data));
- return;
- }
- };
-}
diff --git a/toolkit/components/workerloader/tests/utils_worker.js b/toolkit/components/workerloader/tests/utils_worker.js
deleted file mode 100644
index da82d4b0ab..0000000000
--- a/toolkit/components/workerloader/tests/utils_worker.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function log(text) {
- dump("WORKER " + text + "\n");
-}
-
-function send(message) {
- self.postMessage(message);
-}
-
-function finish() {
- send({kind: "finish"});
-}
-
-function ok(condition, description) {
- send({kind: "ok", condition: !!condition, description: "" + description});
-}
-
-function is(a, b, description) {
- let outcome = a == b; // Need to decide outcome here, as not everything can be serialized
- send({kind: "is", outcome: outcome, description: "" + description, a: "" + a, b: "" + b});
-}
-
-function isnot(a, b, description) {
- let outcome = a != b; // Need to decide outcome here, as not everything can be serialized
- send({kind: "isnot", outcome: outcome, description: "" + description, a: "" + a, b: "" + b});
-}
-
-function info(description) {
- send({kind: "info", description: "" + description});
-}
diff --git a/toolkit/components/workerloader/tests/worker_handler.js b/toolkit/components/workerloader/tests/worker_handler.js
deleted file mode 100644
index b09b8c34ca..0000000000
--- a/toolkit/components/workerloader/tests/worker_handler.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-function worker_handler(worker) {
- worker.onerror = function(error) {
- error.preventDefault();
- ok(false, "error "+error);
- }
- worker.onmessage = function(msg) {
- ok(true, "MAIN: onmessage " + JSON.stringify(msg.data));
- switch (msg.data.kind) {
- case "is":
- SimpleTest.ok(msg.data.outcome, msg.data.description +
- "( "+ msg.data.a + " ==? " + msg.data.b + ")" );
- return;
- case "isnot":
- SimpleTest.ok(msg.data.outcome, msg.data.description +
- "( "+ msg.data.a + " !=? " + msg.data.b + ")" );
- return;
- case "ok":
- SimpleTest.ok(msg.data.condition, msg.data.description);
- return;
- case "info":
- SimpleTest.info(msg.data.description);
- return;
- case "finish":
- SimpleTest.finish();
- return;
- default:
- SimpleTest.ok(false, "test_osfile.xul: wrong message " + JSON.stringify(msg.data));
- return;
- }
- };
-}
diff --git a/toolkit/components/workerloader/tests/worker_test_loading.js b/toolkit/components/workerloader/tests/worker_test_loading.js
deleted file mode 100644
index 40702e4e1f..0000000000
--- a/toolkit/components/workerloader/tests/worker_test_loading.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-importScripts("utils_worker.js"); // Test suite code
-info("Test suite configured");
-
-importScripts("resource://gre/modules/workers/require.js");
-info("Loader imported");
-
-var PATH = "chrome://mochitests/content/chrome/toolkit/components/workerloader/tests/";
-var tests = [];
-var add_test = function(test) {
- tests.push(test);
-};
-
-add_test(function test_setup() {
- ok(typeof require != "undefined", "Function |require| is defined");
-});
-
-// Test simple loading (moduleA-depends.js requires moduleB-dependency.js)
-add_test(function test_load() {
- let A = require(PATH + "moduleA-depends.js");
- ok(true, "Opened module A");
-
- is(A.A, true, "Module A exported value A");
- ok(!("B" in A), "Module A did not export value B");
- is(A.importedFoo, "foo", "Module A re-exported B.foo");
-
- // re-evaluating moduleB-dependency.js would cause an error, but re-requiring it shouldn't
- let B = require(PATH + "moduleB-dependency.js");
- ok(true, "Managed to re-require module B");
- is(B.B, true, "Module B exported value B");
- is(B.foo, "foo", "Module B exported value foo");
-});
-
-// Test simple circular loading (moduleC-circular.js and moduleD-circular.js require each other)
-add_test(function test_circular() {
- let C = require(PATH + "moduleC-circular.js");
- ok(true, "Loaded circular modules C and D");
- is(C.copiedFromD.copiedFromC.enteredC, true, "Properties exported by C before requiring D can be seen by D immediately");
-
- let D = require(PATH + "moduleD-circular.js");
- is(D.exportedFromC.finishedC, true, "Properties exported by C after requiring D can be seen by D eventually");
-});
-
-// Testing error cases
-add_test(function test_exceptions() {
- let should_throw = function(f) {
- try {
- f();
- return null;
- } catch (ex) {
- return ex;
- }
- };
-
- let exn = should_throw(() => require(PATH + "this module doesn't exist"));
- ok(!!exn, "Attempting to load a module that doesn't exist raises an error");
-
- exn = should_throw(() => require(PATH + "moduleE-throws-during-require.js"));
- ok(!!exn, "Attempting to load a module that throws at toplevel raises an error");
- is(exn.moduleName, PATH + "moduleE-throws-during-require.js",
- "moduleName is correct");
- isnot(exn.moduleStack.indexOf("moduleE-throws-during-require.js"), -1,
- "moduleStack contains the name of the module");
- is(exn.lineNumber, 10, "The error comes with the right line number");
-
- exn = should_throw(() => require(PATH + "moduleF-syntaxerror.xml"));
- ok(!!exn, "Attempting to load a non-well formatted module raises an error");
-
- exn = should_throw(() => require(PATH + "moduleG-throws-later.js").doThrow());
- ok(!!exn, "G.doThrow() has raised an error");
- info(exn);
- ok(exn.toString().startsWith("TypeError"), "The exception is a TypeError.");
- is(exn.moduleName, PATH + "moduleG-throws-later.js", "The name of the module is correct");
- isnot(exn.moduleStack.indexOf("moduleG-throws-later.js"), -1,
- "The name of the right file appears somewhere in the stack");
- is(exn.lineNumber, 11, "The error comes with the right line number");
-});
-
-function get_exn(f) {
- try {
- f();
- return undefined;
- } catch (ex) {
- return ex;
- }
-}
-
-// Test module.exports
-add_test(function test_module_dot_exports() {
- let H = require(PATH + "moduleH-module-dot-exports.js");
- is(H.key, "value", "module.exports worked");
- let H2 = require(PATH + "moduleH-module-dot-exports.js");
- is(H2.key, "value", "module.exports returned the same key");
- ok(H2 === H, "module.exports returned the same module the second time");
- let exn = get_exn(() => H.key = "this should not be accepted");
- ok(exn instanceof TypeError, "Cannot alter value in module.exports after export");
- exn = get_exn(() => H.key2 = "this should not be accepted, either");
- ok(exn instanceof TypeError, "Cannot add value to module.exports after export");
-});
-
-self.onmessage = function(message) {
- for (let test of tests) {
- info("Entering " + test.name);
- try {
- test();
- } catch (ex) {
- ok(false, "Test " + test.name + " failed");
- info(ex);
- info(ex.stack);
- }
- info("Leaving " + test.name);
- }
- finish();
-};
-
-
-
diff --git a/toolkit/components/xulstore/moz.build b/toolkit/components/xulstore/moz.build
index 30559fccb6..4ee7a5d277 100644
--- a/toolkit/components/xulstore/moz.build
+++ b/toolkit/components/xulstore/moz.build
@@ -4,12 +4,7 @@
# 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/.
-MOCHITEST_CHROME_MANIFESTS += ['tests/chrome/chrome.ini']
-XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell/xpcshell.ini']
-
-XPIDL_SOURCES += [
- 'nsIXULStore.idl',
-]
+XPIDL_SOURCES += ['nsIXULStore.idl']
XPIDL_MODULE = 'toolkit_xulstore'
diff --git a/toolkit/components/xulstore/tests/chrome/.eslintrc.js b/toolkit/components/xulstore/tests/chrome/.eslintrc.js
deleted file mode 100644
index 8c0f4f574c..0000000000
--- a/toolkit/components/xulstore/tests/chrome/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/mochitest/chrome.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/xulstore/tests/chrome/animals.rdf b/toolkit/components/xulstore/tests/chrome/animals.rdf
deleted file mode 100644
index c7319e641c..0000000000
--- a/toolkit/components/xulstore/tests/chrome/animals.rdf
+++ /dev/null
@@ -1,142 +0,0 @@
-<?xml version="1.0"?>
-
-<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:NC="http://home.netscape.com/NC-rdf#"
- xmlns:ANIMALS="http://www.some-fictitious-zoo.com/rdf#">
-
- <ANIMALS:Class RDF:about="http://www.some-fictitious-zoo.com/arachnids">
- <ANIMALS:name>Arachnids</ANIMALS:name>
- </ANIMALS:Class>
-
- <RDF:Description RDF:about="http://www.some-fictitious-zoo.com/arachnids/tarantula">
- <ANIMALS:name>Tarantula</ANIMALS:name>
- </RDF:Description>
-
- <ANIMALS:Class RDF:about="http://www.some-fictitious-zoo.com/birds">
- <ANIMALS:name>Birds</ANIMALS:name>
- </ANIMALS:Class>
-
- <RDF:Description RDF:about="http://www.some-fictitious-zoo.com/birds/emu">
- <ANIMALS:name>Emu</ANIMALS:name>
- </RDF:Description>
-
- <RDF:Description RDF:about="http://www.some-fictitious-zoo.com/birds/barnowl">
- <ANIMALS:name>Barn Owl</ANIMALS:name>
- </RDF:Description>
-
- <RDF:Description RDF:about="http://www.some-fictitious-zoo.com/birds/raven">
- <ANIMALS:name>Raven</ANIMALS:name>
- </RDF:Description>
-
- <ANIMALS:Class RDF:about="http://www.some-fictitious-zoo.com/crustaceans">
- <ANIMALS:name>Crustaceans</ANIMALS:name>
- </ANIMALS:Class>
-
- <ANIMALS:Class RDF:about="http://www.some-fictitious-zoo.com/fish">
- <ANIMALS:name>Fish</ANIMALS:name>
- </ANIMALS:Class>
-
- <RDF:Description RDF:about="http://www.some-fictitious-zoo.com/fish/cod">
- <ANIMALS:name>Cod</ANIMALS:name>
- </RDF:Description>
-
- <RDF:Description RDF:about="http://www.some-fictitious-zoo.com/fish/swordfish">
- <ANIMALS:name>Swordfish</ANIMALS:name>
- </RDF:Description>
-
- <ANIMALS:Class RDF:about="http://www.some-fictitious-zoo.com/mammals">
- <ANIMALS:name>Mammals</ANIMALS:name>
- </ANIMALS:Class>
-
- <RDF:Description RDF:about="http://www.some-fictitious-zoo.com/mammals/lion">
- <ANIMALS:name>Lion</ANIMALS:name>
- </RDF:Description>
-
- <RDF:Description RDF:about="http://www.some-fictitious-zoo.com/mammals/hippopotamus">
- <ANIMALS:name>HIPPOPOTAMUS</ANIMALS:name>
- </RDF:Description>
-
- <RDF:Description RDF:about="http://www.some-fictitious-zoo.com/mammals/africanelephant">
- <ANIMALS:name>African Elephant</ANIMALS:name>
- </RDF:Description>
-
- <RDF:Description RDF:about="http://www.some-fictitious-zoo.com/mammals/llama">
- <ANIMALS:name>LLAMA</ANIMALS:name>
- </RDF:Description>
-
- <RDF:Description RDF:about="http://www.some-fictitious-zoo.com/mammals/polarbear">
- <ANIMALS:name>Polar Bear</ANIMALS:name>
- </RDF:Description>
-
- <RDF:Description RDF:about="http://www.some-fictitious-zoo.com/mammals/aardvark">
- <ANIMALS:name>aardvark</ANIMALS:name>
- </RDF:Description>
-
- <RDF:Description RDF:about="http://www.some-fictitious-zoo.com/mammals/ninebandedarmadillo">
- <ANIMALS:name>Nine-banded Armadillo</ANIMALS:name>
- </RDF:Description>
-
- <RDF:Description RDF:about="http://www.some-fictitious-zoo.com/mammals/gorilla">
- <ANIMALS:name>Gorilla</ANIMALS:name>
- </RDF:Description>
-
- <ANIMALS:Class RDF:about="http://www.some-fictitious-zoo.com/reptiles">
- <ANIMALS:name>Reptiles</ANIMALS:name>
- </ANIMALS:Class>
-
- <RDF:Description RDF:about="http://www.some-fictitious-zoo.com/reptiles/anaconda">
- <ANIMALS:name>Anaconda</ANIMALS:name>
- </RDF:Description>
-
- <RDF:Description RDF:about="http://www.some-fictitious-zoo.com/reptiles/chameleon">
- <ANIMALS:name>Chameleon</ANIMALS:name>
- </RDF:Description>
-
- <RDF:Seq RDF:about="http://www.some-fictitious-zoo.com/some-animals" ANIMALS:name="Zoo Animals">
- <RDF:li RDF:resource="http://www.some-fictitious-zoo.com/arachnids"/>
- <RDF:li RDF:resource="http://www.some-fictitious-zoo.com/birds"/>
- </RDF:Seq>
-
- <RDF:Seq RDF:about="http://www.some-fictitious-zoo.com/all-animals" ANIMALS:name="Zoo Animals">
- <RDF:li>
- <RDF:Seq RDF:about="http://www.some-fictitious-zoo.com/arachnids">
- <RDF:li RDF:resource="http://www.some-fictitious-zoo.com/arachnids/tarantula"/>
- </RDF:Seq>
- </RDF:li>
- <RDF:li>
- <RDF:Seq RDF:about="http://www.some-fictitious-zoo.com/birds">
- <RDF:li RDF:resource="http://www.some-fictitious-zoo.com/birds/emu"/>
- <RDF:li RDF:resource="http://www.some-fictitious-zoo.com/birds/barnowl"/>
- <RDF:li RDF:resource="http://www.some-fictitious-zoo.com/birds/raven"/>
- </RDF:Seq>
- </RDF:li>
- <RDF:li>
- <RDF:Seq RDF:about="http://www.some-fictitious-zoo.com/crustaceans"/>
- </RDF:li>
- <RDF:li>
- <RDF:Seq RDF:about="http://www.some-fictitious-zoo.com/fish">
- <RDF:li RDF:resource="http://www.some-fictitious-zoo.com/fish/cod"/>
- <RDF:li RDF:resource="http://www.some-fictitious-zoo.com/fish/swordfish"/>
- </RDF:Seq>
- </RDF:li>
- <RDF:li>
- <RDF:Seq RDF:about="http://www.some-fictitious-zoo.com/mammals">
- <RDF:li RDF:resource="http://www.some-fictitious-zoo.com/mammals/lion"/>
- <RDF:li RDF:resource="http://www.some-fictitious-zoo.com/mammals/hippopotamus"/>
- <RDF:li RDF:resource="http://www.some-fictitious-zoo.com/mammals/africanelephant"/>
- <RDF:li RDF:resource="http://www.some-fictitious-zoo.com/mammals/llama"/>
- <RDF:li RDF:resource="http://www.some-fictitious-zoo.com/mammals/polarbear"/>
- <RDF:li RDF:resource="http://www.some-fictitious-zoo.com/mammals/aardvark"/>
- <RDF:li RDF:resource="http://www.some-fictitious-zoo.com/mammals/ninebandedarmadillo"/>
- <RDF:li RDF:resource="http://www.some-fictitious-zoo.com/mammals/gorilla"/>
- </RDF:Seq>
- </RDF:li>
- <RDF:li>
- <RDF:Seq RDF:about="http://www.some-fictitious-zoo.com/reptiles">
- <RDF:li RDF:resource="http://www.some-fictitious-zoo.com/reptiles/anaconda"/>
- <RDF:li RDF:resource="http://www.some-fictitious-zoo.com/reptiles/chameleon"/>
- </RDF:Seq>
- </RDF:li>
- </RDF:Seq>
-
-</RDF:RDF>
diff --git a/toolkit/components/xulstore/tests/chrome/chrome.ini b/toolkit/components/xulstore/tests/chrome/chrome.ini
deleted file mode 100644
index 91efd5455a..0000000000
--- a/toolkit/components/xulstore/tests/chrome/chrome.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[DEFAULT]
-support-files =
- window_persistence.xul
- animals.rdf
-
-[test_persistence.xul]
diff --git a/toolkit/components/xulstore/tests/chrome/test_persistence.xul b/toolkit/components/xulstore/tests/chrome/test_persistence.xul
deleted file mode 100644
index 736a067edd..0000000000
--- a/toolkit/components/xulstore/tests/chrome/test_persistence.xul
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Persistence Tests"
- onload="runTest()"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
- <script>
- SimpleTest.waitForExplicitFinish();
- function runTest() {
- window.openDialog("window_persistence.xul", "_blank", "chrome", true);
- }
-
- function windowOpened() {
- window.openDialog("window_persistence.xul", "_blank", "chrome", false);
- }
-
- function testDone() {
- SimpleTest.finish();
- }
- </script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"/>
-</body>
-
-</window>
diff --git a/toolkit/components/xulstore/tests/chrome/window_persistence.xul b/toolkit/components/xulstore/tests/chrome/window_persistence.xul
deleted file mode 100644
index 4d76fe11d1..0000000000
--- a/toolkit/components/xulstore/tests/chrome/window_persistence.xul
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Persistence Tests"
- onload="opened()"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- persist="screenX screenY width height">
-
-<button id="button1" label="Button1" persist="value"/>
-<button id="button2" label="Button2" value="Normal" persist="value"/>
-
-<tree id="tree" datasources="animals.rdf" ref="http://www.some-fictitious-zoo.com/all-animals"
- flags="dont-build-content" width="200" height="200">
- <treecols orient="horizontal" id="treecols">
- <treecol id="treecol" primary="true" label="Name" flex="1"/>
- </treecols>
- <template id="template">
- <treechildren>
- <treeitem uri="rdf:*">
- <treerow>
- <treecell label="rdf:http://www.some-fictitious-zoo.com/rdf#name"/>
- <treecell/>
- </treerow>
- </treeitem>
- </treechildren>
- </template>
-</tree>
-
-<script>
-<![CDATA[
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-
-let XULStore = Cc["@mozilla.org/xul/xulstore;1"].getService(Ci.nsIXULStore);
-let URI = "chrome://mochitests/content/chrome/toolkit/components/xulstore/tests/chrome/window_persistence.xul";
-
-function opened()
-{
- // If the data in the tree has not been loaded yet, wait a bit and try again.
- var treeView = document.getElementById("tree").view;
- if (treeView.rowCount != 6 && treeView.rowCount != 17) {
- setTimeout(opened, 50);
- return;
- }
-
- runTest(treeView);
-}
-
-function runTest(treeView)
-{
- var firstRun = window.arguments[0];
- if (firstRun) {
- document.getElementById("button1").setAttribute("value", "Pressed");
- document.getElementById("button2").removeAttribute("value");
-
- document.getElementById("button2").setAttribute("foo", "bar");
- document.persist("button2", "foo");
- is(XULStore.getValue(URI, "button2", "foo"), "bar", "attribute persisted")
- document.getElementById("button2").removeAttribute("foo");
- document.persist("button2", "foo");
- is(XULStore.hasValue(URI, "button2", "foo"), false, "attribute removed")
-
- is(treeView.rowCount, 6, "tree rows are closed");
- treeView.toggleOpenState(1);
- treeView.toggleOpenState(7);
-
- window.close();
- window.opener.windowOpened();
- }
- else {
- is(document.getElementById("button1").getAttribute("value"), "Pressed",
- "Attribute set");
- is(document.getElementById("button2").hasAttribute("value"), true,
- "Attribute cleared");
- is(document.getElementById("button2").getAttribute("value"), "",
- "Attribute cleared");
- is(document.getElementById("button2").hasAttribute("foo"), false,
- "Attribute cleared");
- is(document.getElementById("button2").getAttribute("foo"), "",
- "Attribute cleared");
-
- is(treeView.rowCount, 17, "tree rows are open");
- is(treeView.isContainerOpen(0), false, "first closed row");
- is(treeView.isContainerOpen(1), true, "first open row");
- is(treeView.isContainerOpen(7), true, "second open row");
-
- window.close();
- window.opener.testDone();
- }
-}
-
-function is(l, r, n) { window.opener.wrappedJSObject.SimpleTest.is(l,r,n); }
-
-]]></script>
-
-</window>
diff --git a/toolkit/components/xulstore/tests/xpcshell/.eslintrc.js b/toolkit/components/xulstore/tests/xpcshell/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/components/xulstore/tests/xpcshell/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/components/xulstore/tests/xpcshell/localstore.rdf b/toolkit/components/xulstore/tests/xpcshell/localstore.rdf
deleted file mode 100644
index 458eb50eac..0000000000
--- a/toolkit/components/xulstore/tests/xpcshell/localstore.rdf
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-<RDF:RDF xmlns:NC="http://home.netscape.com/NC-rdf#"
- xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
- <RDF:Description RDF:about="chrome://browser/content/browser.xul#sidebar-title"
- value="" />
- <RDF:Description RDF:about="about:config#prefCol"
- ordinal="1"
- sortDirection="ascending" />
- <RDF:Description RDF:about="chrome://browser/content/browser.xul#addon-bar"
- collapsed="true" />
- <RDF:Description RDF:about="about:config">
- <NC:persist RDF:resource="about:config#prefCol"/>
- <NC:persist RDF:resource="about:config#lockCol"/>
- <NC:persist RDF:resource="about:config#typeCol"/>
- <NC:persist RDF:resource="about:config#valueCol"/>
- </RDF:Description>
- <RDF:Description RDF:about="about:config#lockCol"
- ordinal="3" />
- <RDF:Description RDF:about="chrome://browser/content/browser.xul">
- <NC:persist RDF:resource="chrome://browser/content/browser.xul#main-window"/>
- <NC:persist RDF:resource="chrome://browser/content/browser.xul#addon-bar"/>
- <NC:persist RDF:resource="chrome://browser/content/browser.xul#sidebar-box"/>
- <NC:persist RDF:resource="chrome://browser/content/browser.xul#sidebar-title"/>
- </RDF:Description>
- <RDF:Description RDF:about="chrome://browser/content/browser.xul#main-window"
- width="994"
- height="768"
- screenX="4"
- screenY="22"
- sizemode="normal" />
-</RDF:RDF>
diff --git a/toolkit/components/xulstore/tests/xpcshell/test_XULStore.js b/toolkit/components/xulstore/tests/xpcshell/test_XULStore.js
deleted file mode 100644
index c3c96654b0..0000000000
--- a/toolkit/components/xulstore/tests/xpcshell/test_XULStore.js
+++ /dev/null
@@ -1,199 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/◦
-*/
-
-"use strict"
-
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cu = Components.utils;
-const Cr = Components.results;
-
-Cu.import("resource://gre/modules/osfile.jsm")
-
-var XULStore = null;
-var browserURI = "chrome://browser/content/browser.xul";
-var aboutURI = "about:config";
-
-function run_test() {
- do_get_profile();
- run_next_test();
-}
-
-function checkValue(uri, id, attr, reference) {
- let value = XULStore.getValue(uri, id, attr);
- do_check_true(value === reference);
-}
-
-function checkValueExists(uri, id, attr, exists) {
- do_check_eq(XULStore.hasValue(uri, id, attr), exists);
-}
-
-function getIDs(uri) {
- let it = XULStore.getIDsEnumerator(uri);
- let result = [];
-
- while (it.hasMore()) {
- let value = it.getNext();
- result.push(value);
- }
-
- result.sort();
- return result;
-}
-
-function getAttributes(uri, id) {
- let it = XULStore.getAttributeEnumerator(uri, id);
-
- let result = [];
-
- while (it.hasMore()) {
- let value = it.getNext();
- result.push(value);
- }
-
- result.sort();
- return result;
-}
-
-function checkArrays(a, b) {
- a.sort();
- b.sort();
- do_check_true(a.toString() == b.toString());
-}
-
-function checkOldStore() {
- checkArrays(['addon-bar', 'main-window', 'sidebar-title'], getIDs(browserURI));
- checkArrays(['collapsed'], getAttributes(browserURI, 'addon-bar'));
- checkArrays(['height', 'screenX', 'screenY', 'sizemode', 'width'],
- getAttributes(browserURI, 'main-window'));
- checkArrays(['value'], getAttributes(browserURI, 'sidebar-title'));
-
- checkValue(browserURI, "addon-bar", "collapsed", "true");
- checkValue(browserURI, "main-window", "width", "994");
- checkValue(browserURI, "main-window", "height", "768");
- checkValue(browserURI, "main-window", "screenX", "4");
- checkValue(browserURI, "main-window", "screenY", "22");
- checkValue(browserURI, "main-window", "sizemode", "normal");
- checkValue(browserURI, "sidebar-title", "value", "");
-
- checkArrays(['lockCol', 'prefCol'], getIDs(aboutURI));
- checkArrays(['ordinal'], getAttributes(aboutURI, 'lockCol'));
- checkArrays(['ordinal', 'sortDirection'], getAttributes(aboutURI, 'prefCol'));
-
- checkValue(aboutURI, "prefCol", "ordinal", "1");
- checkValue(aboutURI, "prefCol", "sortDirection", "ascending");
- checkValue(aboutURI, "lockCol", "ordinal", "3");
-}
-
-add_task(function* testImport() {
- let src = "localstore.rdf";
- let dst = OS.Path.join(OS.Constants.Path.profileDir, src);
-
- yield OS.File.copy(src, dst);
-
- // Importing relies on XULStore not yet being loaded before this point.
- XULStore = Cc["@mozilla.org/xul/xulstore;1"].getService(Ci.nsIXULStore);
- checkOldStore();
-});
-
-add_task(function* testTruncation() {
- let dos = Array(8192).join("~");
- // Long id names should trigger an exception
- Assert.throws(() => XULStore.setValue(browserURI, dos, "foo", "foo"), /NS_ERROR_ILLEGAL_VALUE/);
-
- // Long attr names should trigger an exception
- Assert.throws(() => XULStore.setValue(browserURI, "foo", dos, "foo"), /NS_ERROR_ILLEGAL_VALUE/);
-
- // Long values should be truncated
- XULStore.setValue(browserURI, "dos", "dos", dos);
- dos =XULStore.getValue(browserURI, "dos", "dos");
- do_check_true(dos.length == 4096)
- XULStore.removeValue(browserURI, "dos", "dos")
-});
-
-add_task(function* testGetValue() {
- // Get non-existing property
- checkValue(browserURI, "side-window", "height", "");
-
- // Get existing property
- checkValue(browserURI, "main-window", "width", "994");
-});
-
-add_task(function* testHasValue() {
- // Check non-existing property
- checkValueExists(browserURI, "side-window", "height", false);
-
- // Check existing property
- checkValueExists(browserURI, "main-window", "width", true);
-});
-
-add_task(function* testSetValue() {
- // Set new attribute
- checkValue(browserURI, "side-bar", "width", "");
- XULStore.setValue(browserURI, "side-bar", "width", "1000");
- checkValue(browserURI, "side-bar", "width", "1000");
- checkArrays(["addon-bar", "main-window", "side-bar", "sidebar-title"], getIDs(browserURI));
- checkArrays(["width"], getAttributes(browserURI, 'side-bar'));
-
- // Modify existing property
- checkValue(browserURI, "side-bar", "width", "1000");
- XULStore.setValue(browserURI, "side-bar", "width", "1024");
- checkValue(browserURI, "side-bar", "width", "1024");
- checkArrays(["addon-bar", "main-window", "side-bar", "sidebar-title"], getIDs(browserURI));
- checkArrays(["width"], getAttributes(browserURI, 'side-bar'));
-
- // Add another attribute
- checkValue(browserURI, "side-bar", "height", "");
- XULStore.setValue(browserURI, "side-bar", "height", "1000");
- checkValue(browserURI, "side-bar", "height", "1000");
- checkArrays(["addon-bar", "main-window", "side-bar", "sidebar-title"], getIDs(browserURI));
- checkArrays(["width", "height"], getAttributes(browserURI, 'side-bar'));
-});
-
-add_task(function* testRemoveValue() {
- // Remove first attribute
- checkValue(browserURI, "side-bar", "width", "1024");
- XULStore.removeValue(browserURI, "side-bar", "width");
- checkValue(browserURI, "side-bar", "width", "");
- checkValueExists(browserURI, "side-bar", "width", false);
- checkArrays(["addon-bar", "main-window", "side-bar", "sidebar-title"], getIDs(browserURI));
- checkArrays(["height"], getAttributes(browserURI, 'side-bar'));
-
- // Remove second attribute
- checkValue(browserURI, "side-bar", "height", "1000");
- XULStore.removeValue(browserURI, "side-bar", "height");
- checkValue(browserURI, "side-bar", "height", "");
- checkArrays(["addon-bar", "main-window", "sidebar-title"], getIDs(browserURI));
-
- // Removing an attribute that doesn't exists shouldn't fail
- XULStore.removeValue(browserURI, "main-window", "bar");
-
- // Removing from an id that doesn't exists shouldn't fail
- XULStore.removeValue(browserURI, "foo", "bar");
-
- // Removing from a document that doesn't exists shouldn't fail
- let nonDocURI = "chrome://example/content/other.xul";
- XULStore.removeValue(nonDocURI, "foo", "bar");
-
- // Remove all attributes in browserURI
- XULStore.removeValue(browserURI, "addon-bar", "collapsed");
- checkArrays([], getAttributes(browserURI, "addon-bar"));
- XULStore.removeValue(browserURI, "main-window", "width");
- XULStore.removeValue(browserURI, "main-window", "height");
- XULStore.removeValue(browserURI, "main-window", "screenX");
- XULStore.removeValue(browserURI, "main-window", "screenY");
- XULStore.removeValue(browserURI, "main-window", "sizemode");
- checkArrays([], getAttributes(browserURI, "main-window"));
- XULStore.removeValue(browserURI, "sidebar-title", "value");
- checkArrays([], getAttributes(browserURI, "sidebar-title"));
- checkArrays([], getIDs(browserURI));
-
- // Remove all attributes in aboutURI
- XULStore.removeValue(aboutURI, "prefCol", "ordinal");
- XULStore.removeValue(aboutURI, "prefCol", "sortDirection");
- checkArrays([], getAttributes(aboutURI, "prefCol"));
- XULStore.removeValue(aboutURI, "lockCol", "ordinal");
- checkArrays([], getAttributes(aboutURI, "lockCol"));
- checkArrays([], getIDs(aboutURI));
-});
diff --git a/toolkit/components/xulstore/tests/xpcshell/xpcshell.ini b/toolkit/components/xulstore/tests/xpcshell/xpcshell.ini
deleted file mode 100644
index d483dae027..0000000000
--- a/toolkit/components/xulstore/tests/xpcshell/xpcshell.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[DEFAULT]
-skip-if = toolkit == 'android'
-support-files =
- localstore.rdf
-
-[test_XULStore.js]
diff --git a/toolkit/content/aboutSupport.js b/toolkit/content/aboutSupport.js
index f49172230e..f9a0abcb0e 100644
--- a/toolkit/content/aboutSupport.js
+++ b/toolkit/content/aboutSupport.js
@@ -599,16 +599,6 @@ function copyContentsToClipboard() {
let clipboard = Cc["@mozilla.org/widget/clipboard;1"]
.getService(Ci.nsIClipboard);
clipboard.setData(transferable, null, clipboard.kGlobalClipboard);
-
-#ifdef MOZ_WIDGET_ANDROID
- // Present a toast notification.
- let message = {
- type: "Toast:Show",
- message: stringBundle().GetStringFromName("textCopied"),
- duration: "short"
- };
- Services.androidBridge.handleGeckoMessage(message);
-#endif
}
// Return the plain text representation of an element. Do a little bit
diff --git a/toolkit/content/aboutSupport.xhtml b/toolkit/content/aboutSupport.xhtml
index 0b7b52164d..8afee18676 100644
--- a/toolkit/content/aboutSupport.xhtml
+++ b/toolkit/content/aboutSupport.xhtml
@@ -101,7 +101,6 @@
<td id="buildid-box"></td>
</tr>
-#ifndef ANDROID
#ifdef MOZ_UPDATER
<tr class="no-copy">
<th class="column">
@@ -115,7 +114,6 @@
</td>
</tr>
#endif
-#endif
#ifdef MOZ_UPDATER
<tr>
@@ -240,7 +238,6 @@
</td>
</tr>
-#ifndef ANDROID
<tr class="no-copy">
<th class="column">
&aboutSupport.appBasicsProfiles;
@@ -250,8 +247,6 @@
<a href="about:profiles">about:profiles</a>
</td>
</tr>
-#endif
-
</tbody>
</table>
diff --git a/toolkit/content/aboutTelemetry.js b/toolkit/content/aboutTelemetry.js
index 0829fe7e26..97dcba9e26 100644
--- a/toolkit/content/aboutTelemetry.js
+++ b/toolkit/content/aboutTelemetry.js
@@ -233,17 +233,9 @@ var Settings = {
let elements = document.getElementsByClassName("change-data-choices-link");
for (let el of elements) {
el.addEventListener("click", function() {
-#ifdef MOZ_WIDGET_ANDROID
- Cu.import("resource://gre/modules/Messaging.jsm");
- Messaging.sendRequest({
- type: "Settings:Show",
- resource: "preferences_privacy",
- });
-#else
// Show the data choices preferences on desktop.
let mainWindow = getMainWindowWithPreferencesPane();
mainWindow.openAdvancedPreferences("dataChoicesTab");
-#endif
}, false);
}
},
diff --git a/toolkit/content/buildconfig.html b/toolkit/content/buildconfig.html
index d3373f54c1..322208189a 100644
--- a/toolkit/content/buildconfig.html
+++ b/toolkit/content/buildconfig.html
@@ -58,9 +58,5 @@
</table>
<h2>Configure options</h2>
<p>@MOZ_CONFIGURE_OPTIONS@</p>
-#ifdef ANDROID
-<h2>Package name</h2>
-<p>@ANDROID_PACKAGE_NAME@</p>
-#endif
</body>
</html>
diff --git a/toolkit/content/contentAreaUtils.js b/toolkit/content/contentAreaUtils.js
index 2512804fab..17e463325e 100644
--- a/toolkit/content/contentAreaUtils.js
+++ b/toolkit/content/contentAreaUtils.js
@@ -1115,40 +1115,8 @@ function validateFileName(aFileName)
aFileName = aFileName.replace(/[\<]+/g, "(");
aFileName = aFileName.replace(/[\>]+/g, ")");
}
- else if (navigator.appVersion.indexOf("Macintosh") != -1)
+ else if (navigator.appVersion.indexOf("Macintosh") != -1) {
re = /[\:\/]+/g;
- else if (navigator.appVersion.indexOf("Android") != -1) {
- // On mobile devices, the filesystem may be very limited in what
- // it considers valid characters. To avoid errors, we sanitize
- // conservatively.
- const dangerousChars = "*?<>|\":/\\[];,+=";
- var processed = "";
- for (var i = 0; i < aFileName.length; i++)
- processed += aFileName.charCodeAt(i) >= 32 &&
- !(dangerousChars.indexOf(aFileName[i]) >= 0) ? aFileName[i]
- : "_";
-
- // Last character should not be a space
- processed = processed.trim();
-
- // If a large part of the filename has been sanitized, then we
- // will use a default filename instead
- if (processed.replace(/_/g, "").length <= processed.length/2) {
- // We purposefully do not use a localized default filename,
- // which we could have done using
- // ContentAreaUtils.stringBundle.GetStringFromName("DefaultSaveFileName")
- // since it may contain invalid characters.
- var original = processed;
- processed = "download";
-
- // Preserve a suffix, if there is one
- if (original.indexOf(".") >= 0) {
- var suffix = original.split(".").slice(-1)[0];
- if (suffix && suffix.indexOf("_") < 0)
- processed += "." + suffix;
- }
- }
- return processed;
}
return aFileName.replace(re, "_");
diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
index 96c559bb28..c73427a310 100644
--- a/toolkit/content/jar.mn
+++ b/toolkit/content/jar.mn
@@ -19,10 +19,8 @@ toolkit.jar:
#endif
content/global/aboutNetworking.js
content/global/aboutNetworking.xhtml
-#ifndef ANDROID
* content/global/aboutProfiles.js
content/global/aboutProfiles.xhtml
-#endif
content/global/aboutServiceWorkers.js
content/global/aboutServiceWorkers.xhtml
#ifdef MOZ_WEBRTC
diff --git a/toolkit/content/moz.build b/toolkit/content/moz.build
index de50a82f58..0a08483b45 100644
--- a/toolkit/content/moz.build
+++ b/toolkit/content/moz.build
@@ -4,28 +4,19 @@
# 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/.
-TEST_DIRS += ['tests']
-
-for var in ('target', 'MOZ_CONFIGURE_OPTIONS', 'CC', 'CC_VERSION', 'CXX'):
+for var in ('target',
+ 'MOZ_CONFIGURE_OPTIONS',
+ 'CC',
+ 'CC_VERSION',
+ 'CXX'):
DEFINES[var] = CONFIG[var]
DEFINES['CFLAGS'] = CONFIG['OS_CFLAGS']
-
-if CONFIG['OS_TARGET'] == 'Android':
- DEFINES['ANDROID_PACKAGE_NAME'] = CONFIG['ANDROID_PACKAGE_NAME']
+DEFINES['TOPOBJDIR'] = TOPOBJDIR
if CONFIG['MOZ_ANDROID_CXX_STL'] == 'libc++':
DEFINES['MOZ_USE_LIBCXX'] = True
JAR_MANIFESTS += ['jar.mn']
-with Files('aboutTelemetry.*'):
- BUG_COMPONENT = ('Toolkit', 'Telemetry')
-with Files('customizeToolbar.*'):
- BUG_COMPONENT = ('Toolkit', 'Toolbars and Toolbar Customization')
-
-with Files('widgets/*'):
- BUG_COMPONENT = ('Toolkit', 'XUL Widgets')
-
-DEFINES['TOPOBJDIR'] = TOPOBJDIR
diff --git a/toolkit/content/tests/browser/.eslintrc.js b/toolkit/content/tests/browser/.eslintrc.js
deleted file mode 100644
index c764b133dc..0000000000
--- a/toolkit/content/tests/browser/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../testing/mochitest/browser.eslintrc.js"
- ]
-};
diff --git a/toolkit/content/tests/browser/audio.ogg b/toolkit/content/tests/browser/audio.ogg
deleted file mode 100644
index 7f1833508a..0000000000
--- a/toolkit/content/tests/browser/audio.ogg
+++ /dev/null
Binary files differ
diff --git a/toolkit/content/tests/browser/browser.ini b/toolkit/content/tests/browser/browser.ini
deleted file mode 100644
index 67ba2f850c..0000000000
--- a/toolkit/content/tests/browser/browser.ini
+++ /dev/null
@@ -1,76 +0,0 @@
-[DEFAULT]
-support-files =
- head.js
- file_contentTitle.html
- audio.ogg
-
-[browser_audioCompeting.js]
-tags = audiochannel
-support-files =
- file_multipleAudio.html
-[browser_audioCompeting_onlyForActiveAgent.js]
-tags = audiochannel
-support-files =
- file_multiplePlayingAudio.html
-[browser_autoscroll_disabled.js]
-[browser_block_autoplay_media.js]
-tags = audiochannel
-support-files =
- file_multipleAudio.html
-[browser_bug295977_autoscroll_overflow.js]
-[browser_bug451286.js]
-skip-if = !e10s
-[browser_bug594509.js]
-[browser_bug982298.js]
-[browser_bug1198465.js]
-[browser_contentTitle.js]
-[browser_crash_previous_frameloader.js]
-run-if = e10s && crashreporter
-[browser_datetime_datepicker.js]
-[browser_default_image_filename.js]
-[browser_f7_caret_browsing.js]
-[browser_findbar.js]
-[browser_label_textlink.js]
-[browser_isSynthetic.js]
-support-files =
- empty.png
-[browser_keyevents_during_autoscrolling.js]
-[browser_save_resend_postdata.js]
-support-files =
- common/mockTransfer.js
- data/post_form_inner.sjs
- data/post_form_outer.sjs
-skip-if = e10s # Bug ?????? - test directly manipulates content (gBrowser.contentDocument.getElementById("postForm").submit();)
-[browser_content_url_annotation.js]
-skip-if = !e10s || !crashreporter
-support-files =
- file_redirect.html
- file_redirect_to.html
-[browser_bug1170531.js]
-[browser_mediaPlayback.js]
-tags = audiochannel
-support-files =
- file_mediaPlayback.html
- file_mediaPlaybackFrame.html
-[browser_mediaPlayback_mute.js]
-tags = audiochannel
-support-files =
- file_mediaPlayback2.html
- file_mediaPlaybackFrame2.html
-[browser_mediaPlayback_suspended.js]
-tags = audiochannel
-support-files =
- file_mediaPlayback2.html
-[browser_mediaPlayback_suspended_multipleAudio.js]
-tags = audiochannel
-support-files =
- file_multipleAudio.html
-[browser_mute.js]
-tags = audiochannel
-[browser_mute2.js]
-tags = audiochannel
-[browser_quickfind_editable.js]
-[browser_saveImageURL.js]
-support-files =
- image.jpg
- image_page.html
diff --git a/toolkit/content/tests/browser/browser_audioCompeting.js b/toolkit/content/tests/browser/browser_audioCompeting.js
deleted file mode 100644
index 7b6a76c1da..0000000000
--- a/toolkit/content/tests/browser/browser_audioCompeting.js
+++ /dev/null
@@ -1,115 +0,0 @@
-const PAGE = "https://example.com/browser/toolkit/content/tests/browser/file_multipleAudio.html";
-
-function* wait_for_tab_playing_event(tab, expectPlaying) {
- if (tab.soundPlaying == expectPlaying) {
- ok(true, "The tab should " + (expectPlaying ? "" : "not ") + "be playing");
- } else {
- yield BrowserTestUtils.waitForEvent(tab, "TabAttrModified", false, (event) => {
- if (event.detail.changed.indexOf("soundplaying") >= 0) {
- is(tab.soundPlaying, expectPlaying, "The tab should " + (expectPlaying ? "" : "not ") + "be playing");
- return true;
- }
- return false;
- });
- }
-}
-
-function play_audio_from_invisible_tab () {
- return new Promise(resolve => {
- var autoPlay = content.document.getElementById('autoplay');
- if (!autoPlay) {
- ok(false, "Can't get the audio element!");
- }
-
- is(autoPlay.paused, true, "Audio in tab 1 was paused by audio competing.");
- autoPlay.play();
- autoPlay.onpause = function() {
- autoPlay.onpause = null;
- ok(true, "Audio in tab 1 can't playback when other tab is playing in foreground.");
- resolve();
- };
- });
-}
-
-function audio_should_keep_playing_even_go_to_background () {
- var autoPlay = content.document.getElementById('autoplay');
- if (!autoPlay) {
- ok(false, "Can't get the audio element!");
- }
-
- is(autoPlay.paused, false, "Audio in tab 2 is still playing in the background.");
-}
-
-function play_non_autoplay_audio () {
- return new Promise(resolve => {
- var autoPlay = content.document.getElementById('autoplay');
- var nonAutoPlay = content.document.getElementById('nonautoplay');
- if (!autoPlay || !nonAutoPlay) {
- ok(false, "Can't get the audio element!");
- }
-
- is(nonAutoPlay.paused, true, "Non-autoplay audio isn't started playing yet.");
- nonAutoPlay.play();
-
- nonAutoPlay.onplay = function() {
- nonAutoPlay.onplay = null;
- is(nonAutoPlay.paused, false, "Start Non-autoplay audio.");
- is(autoPlay.paused, false, "Autoplay audio is still playing.");
- resolve();
- };
- });
-}
-
-add_task(function* setup_test_preference() {
- yield new Promise(resolve => {
- SpecialPowers.pushPrefEnv({"set": [
- ["dom.audiochannel.audioCompeting", true],
- ["dom.ipc.processCount", 1]
- ]}, resolve);
- });
-});
-
-add_task(function* cross_tabs_audio_competing () {
- info("- open tab 1 in foreground -");
- let tab1 = yield BrowserTestUtils.openNewForegroundTab(window.gBrowser,
- "about:blank");
- tab1.linkedBrowser.loadURI(PAGE);
- yield wait_for_tab_playing_event(tab1, true);
-
- info("- open tab 2 in foreground -");
- let tab2 = yield BrowserTestUtils.openNewForegroundTab(window.gBrowser,
- "about:blank");
- tab2.linkedBrowser.loadURI(PAGE);
- yield wait_for_tab_playing_event(tab1, false);
-
- info("- open tab 3 in foreground -");
- let tab3 = yield BrowserTestUtils.openNewForegroundTab(window.gBrowser,
- "about:blank");
- yield ContentTask.spawn(tab2.linkedBrowser, null,
- audio_should_keep_playing_even_go_to_background);
-
- info("- play audio from background tab 1 -");
- yield ContentTask.spawn(tab1.linkedBrowser, null,
- play_audio_from_invisible_tab);
-
- info("- remove tabs -");
- yield BrowserTestUtils.removeTab(tab1);
- yield BrowserTestUtils.removeTab(tab2);
- yield BrowserTestUtils.removeTab(tab3);
-});
-
-add_task(function* within_one_tab_audio_competing () {
- info("- open tab and play audio1 -");
- let tab = yield BrowserTestUtils.openNewForegroundTab(window.gBrowser,
- "about:blank");
- tab.linkedBrowser.loadURI(PAGE);
- yield wait_for_tab_playing_event(tab, true);
-
- info("- play audio2 in the same tab -");
- yield ContentTask.spawn(tab.linkedBrowser, null,
- play_non_autoplay_audio);
-
- info("- remove tab -");
- yield BrowserTestUtils.removeTab(tab);
-});
-
diff --git a/toolkit/content/tests/browser/browser_audioCompeting_onlyForActiveAgent.js b/toolkit/content/tests/browser/browser_audioCompeting_onlyForActiveAgent.js
deleted file mode 100644
index 31cd3f6244..0000000000
--- a/toolkit/content/tests/browser/browser_audioCompeting_onlyForActiveAgent.js
+++ /dev/null
@@ -1,176 +0,0 @@
-const PAGE = "https://example.com/browser/toolkit/content/tests/browser/file_multiplePlayingAudio.html";
-
-var SuspendedType = {
- NONE_SUSPENDED : 0,
- SUSPENDED_PAUSE : 1,
- SUSPENDED_BLOCK : 2,
- SUSPENDED_PAUSE_DISPOSABLE : 3
-};
-
-function wait_for_event(browser, event) {
- return BrowserTestUtils.waitForEvent(browser, event, false, (event) => {
- is(event.originalTarget, browser, "Event must be dispatched to correct browser.");
- return true;
- });
-}
-
-function check_all_audio_suspended(suspendedType) {
- var audio1 = content.document.getElementById("audio1");
- var audio2 = content.document.getElementById("audio2");
- if (!audio1 || !audio2) {
- ok(false, "Can't get the audio element!");
- }
-
- is(audio1.computedSuspended, suspendedType,
- "The suspeded state of audio1 is correct.");
- is(audio2.computedSuspended, suspendedType,
- "The suspeded state of audio2 is correct.");
-}
-
-function check_audio1_suspended(suspendedType) {
- var audio1 = content.document.getElementById("audio1");
- if (!audio1) {
- ok(false, "Can't get the audio element!");
- }
-
- is(audio1.computedSuspended, suspendedType,
- "The suspeded state of audio1 is correct.");
-}
-
-function check_audio2_suspended(suspendedType) {
- var audio2 = content.document.getElementById("audio2");
- if (!audio2) {
- ok(false, "Can't get the audio element!");
- }
-
- is(audio2.computedSuspended, suspendedType,
- "The suspeded state of audio2 is correct.");
-}
-
-function check_all_audio_pause_state(expectedPauseState) {
- var audio1 = content.document.getElementById("audio1");
- var audio2 = content.document.getElementById("audio2");
- if (!audio1 | !audio2) {
- ok(false, "Can't get the audio element!");
- }
-
- is(audio1.paused, expectedPauseState,
- "The pause state of audio1 is correct.");
- is(audio2.paused, expectedPauseState,
- "The pause state of audio2 is correct.");
-}
-
-function check_audio1_pause_state(expectedPauseState) {
- var audio1 = content.document.getElementById("audio1");
- if (!audio1) {
- ok(false, "Can't get the audio element!");
- }
-
- is(audio1.paused, expectedPauseState,
- "The pause state of audio1 is correct.");
-}
-
-function check_audio2_pause_state(expectedPauseState) {
- var audio2 = content.document.getElementById("audio2");
- if (!audio2) {
- ok(false, "Can't get the audio element!");
- }
-
- is(audio2.paused, expectedPauseState,
- "The pause state of audio2 is correct.");
-}
-
-function play_audio1_from_page() {
- var audio1 = content.document.getElementById("audio1");
- if (!audio1) {
- ok(false, "Can't get the audio element!");
- }
-
- is(audio1.paused, true, "Audio1 is paused.");
- audio1.play();
- return new Promise(resolve => {
- audio1.onplay = function() {
- audio1.onplay = null;
- ok(true, "Audio1 started playing.");
- resolve();
- }
- });
-}
-
-function stop_audio1_from_page() {
- var audio1 = content.document.getElementById("audio1");
- if (!audio1) {
- ok(false, "Can't get the audio element!");
- }
-
- is(audio1.paused, false, "Audio1 is playing.");
- audio1.pause();
- return new Promise(resolve => {
- audio1.onpause = function() {
- audio1.onpause = null;
- ok(true, "Audio1 stopped playing.");
- resolve();
- }
- });
-}
-
-function* audio_competing_for_active_agent(url, browser) {
- browser.loadURI(url);
-
- info("- page should have playing audio -");
- yield wait_for_event(browser, "DOMAudioPlaybackStarted");
-
- info("- the default suspended state of all audio should be non-suspened -");
- yield ContentTask.spawn(browser, SuspendedType.NONE_SUSPENDED,
- check_all_audio_suspended);
-
- info("- only pause playing audio in the page -");
- browser.pauseMedia(true /* disposable */);
-
- info("- page shouldn't have any playing audio -");
- yield wait_for_event(browser, "DOMAudioPlaybackStopped");
- yield ContentTask.spawn(browser, true /* expect for pause */,
- check_all_audio_pause_state);
- yield ContentTask.spawn(browser, SuspendedType.SUSPENDED_PAUSE_DISPOSABLE,
- check_all_audio_suspended);
-
- info("- resume audio1 from page -");
- yield ContentTask.spawn(browser, null,
- play_audio1_from_page);
- yield ContentTask.spawn(browser, SuspendedType.NONE_SUSPENDED,
- check_audio1_suspended);
-
- info("- audio2 should still be suspended -");
- yield ContentTask.spawn(browser, SuspendedType.SUSPENDED_PAUSE_DISPOSABLE,
- check_audio2_suspended);
- yield ContentTask.spawn(browser, true /* expect for pause */,
- check_audio2_pause_state);
-
- info("- stop audio1 from page -");
- yield ContentTask.spawn(browser, null,
- stop_audio1_from_page);
- yield ContentTask.spawn(browser, SuspendedType.NONE_SUSPENDED,
- check_audio1_suspended);
-
- info("- audio2 should still be suspended -");
- yield ContentTask.spawn(browser, SuspendedType.SUSPENDED_PAUSE_DISPOSABLE,
- check_audio2_suspended);
- yield ContentTask.spawn(browser, true /* expect for pause */,
- check_audio2_pause_state);
-
-}
-
-add_task(function* setup_test_preference() {
- yield SpecialPowers.pushPrefEnv({"set": [
- ["media.useAudioChannelService.testing", true],
- ["dom.audiochannel.audioCompeting", true],
- ["dom.audiochannel.audioCompeting.allAgents", true]
- ]});
-});
-
-add_task(function* test_suspended_pause_disposable() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "about:blank"
- }, audio_competing_for_active_agent.bind(this, PAGE));
-});
diff --git a/toolkit/content/tests/browser/browser_autoscroll_disabled.js b/toolkit/content/tests/browser/browser_autoscroll_disabled.js
deleted file mode 100644
index 07c6174abd..0000000000
--- a/toolkit/content/tests/browser/browser_autoscroll_disabled.js
+++ /dev/null
@@ -1,67 +0,0 @@
-add_task(function* ()
-{
- const kPrefName_AutoScroll = "general.autoScroll";
- Services.prefs.setBoolPref(kPrefName_AutoScroll, false);
-
- let dataUri = 'data:text/html,<html><body id="i" style="overflow-y: scroll"><div style="height: 2000px"></div>\
- <iframe id="iframe" style="display: none;"></iframe>\
-</body></html>';
-
- let loadedPromise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
- gBrowser.loadURI(dataUri);
- yield loadedPromise;
-
- yield BrowserTestUtils.synthesizeMouse("#i", 50, 50, { button: 1 },
- gBrowser.selectedBrowser);
-
- yield ContentTask.spawn(gBrowser.selectedBrowser, { }, function* () {
- var iframe = content.document.getElementById("iframe");
-
- if (iframe) {
- var e = new iframe.contentWindow.PageTransitionEvent("pagehide",
- { bubbles: true,
- cancelable: true,
- persisted: false });
- iframe.contentDocument.dispatchEvent(e);
- iframe.contentDocument.documentElement.dispatchEvent(e);
- }
- });
-
- yield BrowserTestUtils.synthesizeMouse("#i", 100, 100,
- { type: "mousemove", clickCount: "0" },
- gBrowser.selectedBrowser);
-
- // If scrolling didn't work, we wouldn't do any redraws and thus time out, so
- // request and force redraws to get the chance to check for scrolling at all.
- yield new Promise(resolve => window.requestAnimationFrame(resolve));
-
- let msg = yield ContentTask.spawn(gBrowser.selectedBrowser, { }, function* () {
- // Skip the first animation frame callback as it's the same callback that
- // the browser uses to kick off the scrolling.
- return new Promise(resolve => {
- function checkScroll() {
- let msg = "";
- let elem = content.document.getElementById('i');
- if (elem.scrollTop != 0) {
- msg += "element should not have scrolled vertically";
- }
- if (elem.scrollLeft != 0) {
- msg += "element should not have scrolled horizontally";
- }
-
- resolve(msg);
- }
-
- content.requestAnimationFrame(checkScroll);
- });
- });
-
- ok(!msg, "element scroll " + msg);
-
- // restore the changed prefs
- if (Services.prefs.prefHasUserValue(kPrefName_AutoScroll))
- Services.prefs.clearUserPref(kPrefName_AutoScroll);
-
- // wait for focus to fix a failure in the next test if the latter runs too soon.
- yield SimpleTest.promiseFocus();
-});
diff --git a/toolkit/content/tests/browser/browser_block_autoplay_media.js b/toolkit/content/tests/browser/browser_block_autoplay_media.js
deleted file mode 100644
index 3b2a309b9a..0000000000
--- a/toolkit/content/tests/browser/browser_block_autoplay_media.js
+++ /dev/null
@@ -1,87 +0,0 @@
-const PAGE = "https://example.com/browser/toolkit/content/tests/browser/file_multipleAudio.html";
-
-var SuspendedType = {
- NONE_SUSPENDED : 0,
- SUSPENDED_PAUSE : 1,
- SUSPENDED_BLOCK : 2,
- SUSPENDED_PAUSE_DISPOSABLE : 3
-};
-
-function* wait_for_tab_playing_event(tab, expectPlaying) {
- if (tab.soundPlaying == expectPlaying) {
- ok(true, "The tab should " + (expectPlaying ? "" : "not ") + "be playing");
- } else {
- yield BrowserTestUtils.waitForEvent(tab, "TabAttrModified", false, (event) => {
- if (event.detail.changed.indexOf("soundplaying") >= 0) {
- is(tab.soundPlaying, expectPlaying, "The tab should " + (expectPlaying ? "" : "not ") + "be playing");
- return true;
- }
- return false;
- });
- }
-}
-
-function check_audio_suspended(suspendedType) {
- var autoPlay = content.document.getElementById('autoplay');
- if (!autoPlay) {
- ok(false, "Can't get the audio element!");
- }
-
- is(autoPlay.computedSuspended, suspendedType,
- "The suspeded state of autoplay audio is correct.");
-}
-
-add_task(function* setup_test_preference() {
- yield new Promise(resolve => {
- SpecialPowers.pushPrefEnv({"set": [
- ["media.useAudioChannelService.testing", true],
- ["media.block-autoplay-until-in-foreground", true]
- ]}, resolve);
- });
-});
-
-add_task(function* block_autoplay_media() {
- info("- open new background tab1 -");
- let tab1 = window.gBrowser.addTab("about:blank");
- tab1.linkedBrowser.loadURI(PAGE);
- yield BrowserTestUtils.browserLoaded(tab1.linkedBrowser);
-
- info("- should block autoplay media for non-visited tab1 -");
- yield ContentTask.spawn(tab1.linkedBrowser, SuspendedType.SUSPENDED_BLOCK,
- check_audio_suspended);
-
- info("- open new background tab2 -");
- let tab2 = window.gBrowser.addTab("about:blank");
- tab2.linkedBrowser.loadURI(PAGE);
- yield BrowserTestUtils.browserLoaded(tab2.linkedBrowser);
-
- info("- should block autoplay for non-visited tab2 -");
- yield ContentTask.spawn(tab2.linkedBrowser, SuspendedType.SUSPENDED_BLOCK,
- check_audio_suspended);
-
- info("- select tab1 as foreground tab -");
- yield BrowserTestUtils.switchTab(window.gBrowser, tab1);
-
- info("- media should be unblocked because the tab was visited -");
- yield wait_for_tab_playing_event(tab1, true);
- yield ContentTask.spawn(tab1.linkedBrowser, SuspendedType.NONE_SUSPENDED,
- check_audio_suspended);
-
- info("- open another new foreground tab3 -");
- let tab3 = yield BrowserTestUtils.openNewForegroundTab(window.gBrowser,
- "about:blank");
- info("- should still play media from tab1 -");
- yield wait_for_tab_playing_event(tab1, true);
- yield ContentTask.spawn(tab1.linkedBrowser, SuspendedType.NONE_SUSPENDED,
- check_audio_suspended);
-
- info("- should still block media from tab2 -");
- yield wait_for_tab_playing_event(tab2, false);
- yield ContentTask.spawn(tab2.linkedBrowser, SuspendedType.SUSPENDED_BLOCK,
- check_audio_suspended);
-
- info("- remove tabs -");
- yield BrowserTestUtils.removeTab(tab1);
- yield BrowserTestUtils.removeTab(tab2);
- yield BrowserTestUtils.removeTab(tab3);
-});
diff --git a/toolkit/content/tests/browser/browser_bug1170531.js b/toolkit/content/tests/browser/browser_bug1170531.js
deleted file mode 100644
index 49df5661aa..0000000000
--- a/toolkit/content/tests/browser/browser_bug1170531.js
+++ /dev/null
@@ -1,92 +0,0 @@
-// Test for bug 1170531
-// https://bugzilla.mozilla.org/show_bug.cgi?id=1170531
-
-add_task(function* () {
- // Get a bunch of DOM nodes
- let winUtils = window.QueryInterface(Ci.nsIInterfaceRequestor).
- getInterface(Ci.nsIDOMWindowUtils);
-
- let editMenu = document.getElementById("edit-menu");
- let menubar = editMenu.parentNode;
- let menuPopup = editMenu.menupopup;
- let editMenuIndex = -1;
- for (let i = 0; i < menubar.children.length; i++) {
- if (menubar.children[i] === editMenu) {
- editMenuIndex = i;
- break;
- }
- }
-
- let closeMenu = function(aCallback) {
- if (OS.Constants.Sys.Name == "Darwin") {
- executeSoon(aCallback);
- return;
- }
-
- menuPopup.addEventListener("popuphidden", function onPopupHidden() {
- menuPopup.removeEventListener("popuphidden", onPopupHidden, false);
- executeSoon(aCallback);
- }, false);
-
- executeSoon(function() {
- editMenu.open = false;
- });
- };
-
- let openMenu = function(aCallback) {
- if (OS.Constants.Sys.Name == "Darwin") {
- goUpdateGlobalEditMenuItems();
- // On OSX, we have a native menu, so it has to be updated. In single process browsers,
- // this happens synchronously, but in e10s, we have to wait for the main thread
- // to deal with it for us. 1 second should be plenty of time.
- setTimeout(aCallback, 1000);
- return;
- }
-
- menuPopup.addEventListener("popupshown", function onPopupShown() {
- menuPopup.removeEventListener("popupshown", onPopupShown, false);
- executeSoon(aCallback);
- }, false);
-
- executeSoon(function() {
- editMenu.open = true;
- });
- };
-
- yield BrowserTestUtils.withNewTab({ gBrowser: gBrowser, url: "about:blank" }, function* (browser) {
- let menu_cut_disabled, menu_copy_disabled;
-
- yield BrowserTestUtils.loadURI(browser, "data:text/html,<div>hello!</div>");
- yield BrowserTestUtils.browserLoaded(browser);
- browser.focus();
- yield new Promise(resolve => waitForFocus(resolve, window));
- yield new Promise(openMenu);
- menu_cut_disabled = menuPopup.querySelector("#menu_cut").getAttribute('disabled') == "true";
- is(menu_cut_disabled, false, "menu_cut should be enabled");
- menu_copy_disabled = menuPopup.querySelector("#menu_copy").getAttribute('disabled') == "true";
- is(menu_copy_disabled, false, "menu_copy should be enabled");
- yield new Promise(closeMenu);
-
- yield BrowserTestUtils.loadURI(browser, "data:text/html,<div contentEditable='true'>hello!</div>");
- yield BrowserTestUtils.browserLoaded(browser);
- browser.focus();
- yield new Promise(resolve => waitForFocus(resolve, window));
- yield new Promise(openMenu);
- menu_cut_disabled = menuPopup.querySelector("#menu_cut").getAttribute('disabled') == "true";
- is(menu_cut_disabled, false, "menu_cut should be enabled");
- menu_copy_disabled = menuPopup.querySelector("#menu_copy").getAttribute('disabled') == "true";
- is(menu_copy_disabled, false, "menu_copy should be enabled");
- yield new Promise(closeMenu);
-
- yield BrowserTestUtils.loadURI(browser, "about:preferences");
- yield BrowserTestUtils.browserLoaded(browser);
- browser.focus();
- yield new Promise(resolve => waitForFocus(resolve, window));
- yield new Promise(openMenu);
- menu_cut_disabled = menuPopup.querySelector("#menu_cut").getAttribute('disabled') == "true";
- is(menu_cut_disabled, true, "menu_cut should be disabled");
- menu_copy_disabled = menuPopup.querySelector("#menu_copy").getAttribute('disabled') == "true";
- is(menu_copy_disabled, true, "menu_copy should be disabled");
- yield new Promise(closeMenu);
- });
-});
diff --git a/toolkit/content/tests/browser/browser_bug1198465.js b/toolkit/content/tests/browser/browser_bug1198465.js
deleted file mode 100644
index a9cc83e121..0000000000
--- a/toolkit/content/tests/browser/browser_bug1198465.js
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-var kPrefName = "accessibility.typeaheadfind.prefillwithselection";
-var kEmptyURI = "data:text/html,";
-
-// This pref is false by default in OSX; ensure the test still works there.
-Services.prefs.setBoolPref(kPrefName, true);
-
-registerCleanupFunction(function() {
- Services.prefs.clearUserPref(kPrefName);
-});
-
-add_task(function* () {
- let aTab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, kEmptyURI);
- ok(!gFindBarInitialized, "findbar isn't initialized yet");
-
- // Note: the use case here is when the user types directly in the findbar
- // _before_ it's prefilled with a text selection in the page.
-
- // So `yield BrowserTestUtils.sendChar()` can't be used here:
- // - synthesizing a key in the browser won't actually send it to the
- // findbar; the findbar isn't part of the browser content.
- // - we need to _not_ wait for _startFindDeferred to be resolved; yielding
- // a synthesized keypress on the browser implicitely happens after the
- // browser has dispatched its return message with the prefill value for
- // the findbar, which essentially nulls these tests.
-
- let findBar = gFindBar;
- is(findBar._findField.value, "", "findbar is empty");
-
- // Test 1
- // Any input in the findbar should erase a previous search.
-
- findBar._findField.value = "xy";
- findBar.startFind();
- is(findBar._findField.value, "xy", "findbar should have xy initial query");
- is(findBar._findField.mInputField,
- document.activeElement,
- "findbar is now focused");
-
- EventUtils.sendChar("z", window);
- is(findBar._findField.value, "z", "z erases xy");
-
- findBar._findField.value = "";
- ok(!findBar._findField.value, "erase findbar after first test");
-
- // Test 2
- // Prefilling the findbar should be ignored if a search has been run.
-
- findBar.startFind();
- ok(findBar._startFindDeferred, "prefilled value hasn't been fetched yet");
- is(findBar._findField.mInputField,
- document.activeElement,
- "findbar is still focused");
-
- EventUtils.sendChar("a", window);
- EventUtils.sendChar("b", window);
- is(findBar._findField.value, "ab", "initial ab typed in the findbar");
-
- // This resolves _startFindDeferred if it's still pending; let's just skip
- // over waiting for the browser's return message that should do this as it
- // doesn't really matter.
- findBar.onCurrentSelection("foo", true);
- ok(!findBar._startFindDeferred, "prefilled value fetched");
- is(findBar._findField.value, "ab", "ab kept instead of prefill value");
-
- EventUtils.sendChar("c", window);
- is(findBar._findField.value, "abc", "c is appended after ab");
-
- // Clear the findField value to make the test run successfully
- // for multiple runs in the same browser session.
- findBar._findField.value = "";
- yield BrowserTestUtils.removeTab(aTab);
-});
diff --git a/toolkit/content/tests/browser/browser_bug295977_autoscroll_overflow.js b/toolkit/content/tests/browser/browser_bug295977_autoscroll_overflow.js
deleted file mode 100644
index 958afc868e..0000000000
--- a/toolkit/content/tests/browser/browser_bug295977_autoscroll_overflow.js
+++ /dev/null
@@ -1,214 +0,0 @@
-requestLongerTimeout(2);
-add_task(function* ()
-{
- function pushPref(name, value) {
- return new Promise(resolve => SpecialPowers.pushPrefEnv({"set": [[name, value]]}, resolve));
- }
-
- yield pushPref("general.autoScroll", true);
-
- const expectScrollNone = 0;
- const expectScrollVert = 1;
- const expectScrollHori = 2;
- const expectScrollBoth = 3;
-
- var allTests = [
- {dataUri: 'data:text/html,<html><head><meta charset="utf-8"></head><body><style type="text/css">div { display: inline-block; }</style>\
- <div id="a" style="width: 100px; height: 100px; overflow: hidden;"><div style="width: 200px; height: 200px;"></div></div>\
- <div id="b" style="width: 100px; height: 100px; overflow: auto;"><div style="width: 200px; height: 200px;"></div></div>\
- <div id="c" style="width: 100px; height: 100px; overflow-x: auto; overflow-y: hidden;"><div style="width: 200px; height: 200px;"></div></div>\
- <div id="d" style="width: 100px; height: 100px; overflow-y: auto; overflow-x: hidden;"><div style="width: 200px; height: 200px;"></div></div>\
- <select id="e" style="width: 100px; height: 100px;" multiple="multiple"><option>aaaaaaaaaaaaaaaaaaaaaaaa</option><option>a</option><option>a</option>\
- <option>a</option><option>a</option><option>a</option><option>a</option><option>a</option><option>a</option><option>a</option>\
- <option>a</option><option>a</option><option>a</option><option>a</option><option>a</option><option>a</option><option>a</option></select>\
- <select id="f" style="width: 100px; height: 100px;"><option>a</option><option>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</option><option>a</option>\
- <option>a</option><option>a</option><option>a</option><option>a</option><option>a</option><option>a</option><option>a</option>\
- <option>a</option><option>a</option><option>a</option><option>a</option><option>a</option><option>a</option><option>a</option></select>\
- <div id="g" style="width: 99px; height: 99px; border: 10px solid black; margin: 10px; overflow: auto;"><div style="width: 100px; height: 100px;"></div></div>\
- <div id="h" style="width: 100px; height: 100px; overflow: -moz-hidden-unscrollable;"><div style="width: 200px; height: 200px;"></div></div>\
- <iframe id="iframe" style="display: none;"></iframe>\
- </body></html>'},
- {elem: 'a', expected: expectScrollNone},
- {elem: 'b', expected: expectScrollBoth},
- {elem: 'c', expected: expectScrollHori},
- {elem: 'd', expected: expectScrollVert},
- {elem: 'e', expected: expectScrollVert},
- {elem: 'f', expected: expectScrollNone},
- {elem: 'g', expected: expectScrollBoth},
- {elem: 'h', expected: expectScrollNone},
- {dataUri: 'data:text/html,<html><head><meta charset="utf-8"></head><body id="i" style="overflow-y: scroll"><div style="height: 2000px"></div>\
- <iframe id="iframe" style="display: none;"></iframe>\
- </body></html>'},
- {elem: 'i', expected: expectScrollVert}, // bug 695121
- {dataUri: 'data:text/html,<html><head><meta charset="utf-8"></head><style>html, body { width: 100%; height: 100%; overflow-x: hidden; overflow-y: scroll; }</style>\
- <body id="j"><div style="height: 2000px"></div>\
- <iframe id="iframe" style="display: none;"></iframe>\
- </body></html>'},
- {elem: 'j', expected: expectScrollVert}, // bug 914251
- {dataUri: 'data:text/html,<html><head><meta charset="utf-8">\
-<style>\
-body > div {scroll-behavior: smooth;width: 300px;height: 300px;overflow: scroll;}\
-body > div > div {width: 1000px;height: 1000px;}\
-</style>\
-</head><body><div id="t"><div></div></div></body></html>'},
- {elem: 't', expected: expectScrollBoth}, // bug 1308775
- {dataUri: 'data:text/html,<html><head><meta charset="utf-8"></head><body>\
-<div id="k" style="height: 150px; width: 200px; overflow: scroll; border: 1px solid black;">\
-<iframe style="height: 200px; width: 300px;"></iframe>\
-</div>\
-<div id="l" style="height: 150px; width: 300px; overflow: scroll; border: 1px dashed black;">\
-<iframe style="height: 200px; width: 200px;" src="data:text/html,<div style=\'border: 5px solid blue; height: 200%; width: 200%;\'></div>"></iframe>\
-</div>\
-<iframe id="m"></iframe>\
-<div style="height: 200%; border: 5px dashed black;">filler to make document overflow: scroll;</div>\
-</body></html>'},
- {elem: 'k', expected: expectScrollBoth},
- {elem: 'k', expected: expectScrollNone, testwindow: true},
- {elem: 'l', expected: expectScrollNone},
- {elem: 'm', expected: expectScrollVert, testwindow: true},
- {dataUri: 'data:text/html,<html><head><meta charset="utf-8"></head><body>\
-<img width="100" height="100" alt="image map" usemap="%23planetmap">\
-<map name="planetmap">\
- <area id="n" shape="rect" coords="0,0,100,100" href="javascript:void(null)">\
-</map>\
-<a href="javascript:void(null)" id="o" style="width: 100px; height: 100px; border: 1px solid black; display: inline-block; vertical-align: top;">link</a>\
-<input id="p" style="width: 100px; height: 100px; vertical-align: top;">\
-<textarea id="q" style="width: 100px; height: 100px; vertical-align: top;"></textarea>\
-<div style="height: 200%; border: 1px solid black;"></div>\
-</body></html>'},
- {elem: 'n', expected: expectScrollNone, testwindow: true},
- {elem: 'o', expected: expectScrollNone, testwindow: true},
- {elem: 'p', expected: expectScrollVert, testwindow: true, middlemousepastepref: false},
- {elem: 'q', expected: expectScrollVert, testwindow: true, middlemousepastepref: false},
- {dataUri: 'data:text/html,<html><head><meta charset="utf-8"></head><body>\
-<input id="r" style="width: 100px; height: 100px; vertical-align: top;">\
-<textarea id="s" style="width: 100px; height: 100px; vertical-align: top;"></textarea>\
-<div style="height: 200%; border: 1px solid black;"></div>\
-</body></html>'},
- {elem: 'r', expected: expectScrollNone, testwindow: true, middlemousepastepref: true},
- {elem: 's', expected: expectScrollNone, testwindow: true, middlemousepastepref: true}
- ];
-
- for (let test of allTests) {
- if (test.dataUri) {
- let loadedPromise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
- gBrowser.loadURI(test.dataUri);
- yield loadedPromise;
- continue;
- }
-
- let prefsChanged = (test.middlemousepastepref == false || test.middlemousepastepref == true);
- if (prefsChanged) {
- yield pushPref("middlemouse.paste", test.middlemousepastepref);
- }
-
- 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* () {
- var iframe = content.document.getElementById("iframe");
-
- if (iframe) {
- var e = new iframe.contentWindow.PageTransitionEvent("pagehide",
- { bubbles: true,
- cancelable: true,
- persisted: false });
- iframe.contentDocument.dispatchEvent(e);
- iframe.contentDocument.documentElement.dispatchEvent(e);
- }
- });
-
- is(document.activeElement, gBrowser.selectedBrowser, "Browser still focused after autoscroll started");
-
- yield BrowserTestUtils.synthesizeMouse("#" + test.elem, 100, 100,
- { type: "mousemove", clickCount: "0" },
- gBrowser.selectedBrowser);
-
- if (prefsChanged) {
- yield new Promise(resolve => SpecialPowers.popPrefEnv(resolve));
- }
-
- // Start checking for the scroll.
- let firstTimestamp = undefined;
- let timeCompensation;
- do {
- let timestamp = yield new Promise(resolve => window.requestAnimationFrame(resolve));
- if (firstTimestamp === undefined) {
- firstTimestamp = timestamp;
- }
-
- // This value is calculated similarly to the value of the same name in
- // ClickEventHandler.autoscrollLoop, except here it's cumulative across
- // all frames after the first one instead of being based only on the
- // current frame.
- timeCompensation = (timestamp - firstTimestamp) / 20;
- info("timestamp=" + timestamp + " firstTimestamp=" + firstTimestamp +
- " timeCompensation=" + timeCompensation);
-
- // Try to wait until enough time has passed to allow the scroll to happen.
- // autoscrollLoop incrementally scrolls during each animation frame, but
- // due to how its calculations work, when a frame is very close to the
- // previous frame, no scrolling may actually occur during that frame.
- // After 100ms's worth of frames, timeCompensation will be 1, making it
- // more likely that the accumulated scroll in autoscrollLoop will be >= 1,
- // although it also depends on acceleration, which here in this test
- // should be > 1 due to how it synthesizes mouse events below.
- } while (timeCompensation < 5);
-
- // Close the autoscroll popup by synthesizing Esc.
- EventUtils.synthesizeKey("VK_ESCAPE", {});
- let scrollVert = test.expected & expectScrollVert;
- let scrollHori = test.expected & expectScrollHori;
-
- yield ContentTask.spawn(gBrowser.selectedBrowser,
- { scrollVert : scrollVert,
- scrollHori: scrollHori,
- elemid : test.elem,
- checkWindow: test.testwindow },
- function* (args) {
- let msg = "";
- if (args.checkWindow) {
- if (!((args.scrollVert && content.scrollY > 0) ||
- (!args.scrollVert && content.scrollY == 0))) {
- 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: ";
- }
- msg += ' Window for ' + args.elemid + ' should' + (args.scrollHori ? '' : ' not') + ' have scrolled horizontally\n';
- } else {
- let elem = content.document.getElementById(args.elemid);
- if (!((args.scrollVert && elem.scrollTop > 0) ||
- (!args.scrollVert && elem.scrollTop == 0))) {
- msg += "Failed: ";
- }
- msg += ' ' + args.elemid + ' should' + (args.scrollVert ? '' : ' not') + ' have scrolled vertically\n';
- if (!((args.scrollHori && elem.scrollLeft > 0) ||
- (!args.scrollHori && elem.scrollLeft == 0))) {
- msg += "Failed: ";
- }
- msg += args.elemid + ' should' + (args.scrollHori ? '' : ' not') + ' have scrolled horizontally';
- }
-
- Assert.ok(msg.indexOf("Failed") == -1, msg);
- }
- );
-
- // Before continuing the test, we need to ensure that the IPC
- // message that stops autoscrolling has had time to arrive.
- yield new Promise(resolve => executeSoon(resolve));
- }
-
- // remove 2 tabs that were opened by middle-click on links
- while (gBrowser.visibleTabs.length > 1) {
- gBrowser.removeTab(gBrowser.visibleTabs[gBrowser.visibleTabs.length - 1]);
- }
-
- // wait for focus to fix a failure in the next test if the latter runs too soon.
- yield SimpleTest.promiseFocus();
-});
diff --git a/toolkit/content/tests/browser/browser_bug451286.js b/toolkit/content/tests/browser/browser_bug451286.js
deleted file mode 100644
index a5dadeb849..0000000000
--- a/toolkit/content/tests/browser/browser_bug451286.js
+++ /dev/null
@@ -1,152 +0,0 @@
-Services.scriptloader.loadSubScript("chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js", this);
-
-add_task(function*() {
- const SEARCH_TEXT = "text";
- const DATAURI = "data:text/html," + SEARCH_TEXT;
-
- // Bug 451286. An iframe that should be highlighted
- let visible = "<iframe id='visible' src='" + DATAURI + "'></iframe>";
-
- // Bug 493658. An invisible iframe that shouldn't interfere with
- // highlighting matches lying after it in the document
- let invisible = "<iframe id='invisible' style='display: none;' " +
- "src='" + DATAURI + "'></iframe>";
-
- let uri = DATAURI + invisible + SEARCH_TEXT + visible + SEARCH_TEXT;
- let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, uri);
- let contentRect = tab.linkedBrowser.getBoundingClientRect();
- let noHighlightSnapshot = snapshotRect(window, contentRect);
- ok(noHighlightSnapshot, "Got noHighlightSnapshot");
-
- yield openFindBarAndWait();
- gFindBar._findField.value = SEARCH_TEXT;
- yield findAgainAndWait();
- var matchCase = gFindBar.getElement("find-case-sensitive");
- if (matchCase.checked)
- matchCase.doCommand();
-
- // Turn on highlighting
- yield toggleHighlightAndWait(true);
- yield closeFindBarAndWait();
-
- // Take snapshot of highlighting
- let findSnapshot = snapshotRect(window, contentRect);
- ok(findSnapshot, "Got findSnapshot");
-
- // Now, remove the highlighting, and take a snapshot to compare
- // to our original state
- yield openFindBarAndWait();
- yield toggleHighlightAndWait(false);
- yield closeFindBarAndWait();
-
- let unhighlightSnapshot = snapshotRect(window, contentRect);
- ok(unhighlightSnapshot, "Got unhighlightSnapshot");
-
- // Select the matches that should have been highlighted manually
- yield ContentTask.spawn(tab.linkedBrowser, null, function*() {
- let doc = content.document;
- let win = doc.defaultView;
-
- // Create a manual highlight in the visible iframe to test bug 451286
- let iframe = doc.getElementById("visible");
- let ifBody = iframe.contentDocument.body;
- let range = iframe.contentDocument.createRange();
- range.selectNodeContents(ifBody.childNodes[0]);
- let ifWindow = iframe.contentWindow;
- let ifDocShell = ifWindow.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIDocShell);
-
- let ifController = ifDocShell.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsISelectionDisplay)
- .QueryInterface(Ci.nsISelectionController);
-
- let frameFindSelection =
- ifController.getSelection(ifController.SELECTION_FIND);
- frameFindSelection.addRange(range);
-
- // Create manual highlights in the main document (the matches that lie
- // before/after the iframes
- let docShell = win.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIDocShell);
-
- let controller = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsISelectionDisplay)
- .QueryInterface(Ci.nsISelectionController);
-
- let docFindSelection =
- controller.getSelection(ifController.SELECTION_FIND);
-
- range = doc.createRange();
- range.selectNodeContents(doc.body.childNodes[0]);
- docFindSelection.addRange(range);
- range = doc.createRange();
- range.selectNodeContents(doc.body.childNodes[2]);
- docFindSelection.addRange(range);
- range = doc.createRange();
- range.selectNodeContents(doc.body.childNodes[4]);
- docFindSelection.addRange(range);
- });
-
- // Take snapshot of manual highlighting
- let manualSnapshot = snapshotRect(window, contentRect);
- ok(manualSnapshot, "Got manualSnapshot");
-
- // Test 1: Were the matches in iframe correctly highlighted?
- let res = compareSnapshots(findSnapshot, manualSnapshot, true);
- ok(res[0], "Matches found in iframe correctly highlighted");
-
- // Test 2: Were the matches in iframe correctly unhighlighted?
- res = compareSnapshots(noHighlightSnapshot, unhighlightSnapshot, true);
- ok(res[0], "Highlighting in iframe correctly removed");
-
- yield BrowserTestUtils.removeTab(tab);
-});
-
-function toggleHighlightAndWait(shouldHighlight) {
- return new Promise((resolve) => {
- let listener = {
- onFindResult() {},
- onHighlightFinished() {
- gFindBar.browser.finder.removeResultListener(listener);
- resolve();
- },
- onMatchesCountResult() {}
- };
- gFindBar.browser.finder.addResultListener(listener);
- gFindBar.toggleHighlight(shouldHighlight);
- });
-}
-
-function findAgainAndWait() {
- return new Promise(resolve => {
- let listener = {
- onFindResult() {
- gFindBar.browser.finder.removeResultListener(listener);
- resolve();
- },
- onHighlightFinished() {},
- onMatchesCountResult() {}
- };
- gFindBar.browser.finder.addResultListener(listener);
- gFindBar.onFindAgainCommand();
- });
-}
-
-function* openFindBarAndWait() {
- let awaitTransitionEnd = BrowserTestUtils.waitForEvent(gFindBar, "transitionend");
- gFindBar.open();
- yield awaitTransitionEnd;
-}
-
-// This test is comparing snapshots. It is necessary to wait for the gFindBar
-// to close before taking the snapshot so the gFindBar does not take up space
-// on the new snapshot.
-function* closeFindBarAndWait() {
- let awaitTransitionEnd = BrowserTestUtils.waitForEvent(gFindBar, "transitionend", false, event => {
- return event.propertyName == "visibility";
- });
- gFindBar.close();
- yield awaitTransitionEnd;
-}
diff --git a/toolkit/content/tests/browser/browser_bug594509.js b/toolkit/content/tests/browser/browser_bug594509.js
deleted file mode 100644
index e67b05f852..0000000000
--- a/toolkit/content/tests/browser/browser_bug594509.js
+++ /dev/null
@@ -1,9 +0,0 @@
-add_task(function* () {
- let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, "about:rights");
-
- yield ContentTask.spawn(tab.linkedBrowser, null, function* () {
- Assert.ok(content.document.getElementById("your-rights"), "about:rights content loaded");
- });
-
- yield BrowserTestUtils.removeTab(tab);
-});
diff --git a/toolkit/content/tests/browser/browser_bug982298.js b/toolkit/content/tests/browser/browser_bug982298.js
deleted file mode 100644
index 047340c5ce..0000000000
--- a/toolkit/content/tests/browser/browser_bug982298.js
+++ /dev/null
@@ -1,70 +0,0 @@
-const scrollHtml =
- "<textarea id=\"textarea1\" row=2>Firefox\n\nFirefox\n\n\n\n\n\n\n\n\n\n" +
- "</textarea><a href=\"about:blank\">blank</a>";
-
-add_task(function*() {
- let url = "data:text/html;base64," + btoa(scrollHtml);
- yield BrowserTestUtils.withNewTab({gBrowser, url}, function*(browser) {
- let awaitFindResult = new Promise(resolve => {
- let listener = {
- onFindResult(aData) {
- info("got find result");
- browser.finder.removeResultListener(listener);
-
- ok(aData.result == Ci.nsITypeAheadFind.FIND_FOUND, "should find string");
- resolve();
- },
- onCurrentSelection() {},
- onMatchesCountResult() {}
- };
- info("about to add results listener, open find bar, and send 'F' string");
- browser.finder.addResultListener(listener);
- });
- gFindBar.onFindCommand();
- EventUtils.sendString("F");
- info("added result listener and sent string 'F'");
- yield awaitFindResult;
-
- let awaitScrollDone = BrowserTestUtils.waitForMessage(browser.messageManager, "ScrollDone");
- // scroll textarea to bottom
- const scrollTest =
- "var textarea = content.document.getElementById(\"textarea1\");" +
- "textarea.scrollTop = textarea.scrollHeight;" +
- "sendAsyncMessage(\"ScrollDone\", { });"
- browser.messageManager.loadFrameScript("data:text/javascript;base64," +
- btoa(scrollTest), false);
- yield awaitScrollDone;
- info("got ScrollDone event");
- yield BrowserTestUtils.loadURI(browser, "about:blank");
- yield BrowserTestUtils.browserLoaded(browser);
-
- ok(browser.currentURI.spec == "about:blank", "got load event for about:blank");
-
- let awaitFindResult2 = new Promise(resolve => {
- let listener = {
- onFindResult(aData) {
- info("got find result #2");
- browser.finder.removeResultListener(listener);
- resolve();
- },
- onCurrentSelection() {},
- onMatchesCountResult() {}
- };
-
- browser.finder.addResultListener(listener);
- info("added result listener");
- });
- // find again needs delay for crash test
- setTimeout(function() {
- // ignore exception if occured
- try {
- info("about to send find again command");
- gFindBar.onFindAgainCommand(false);
- info("sent find again command");
- } catch (e) {
- info("got exception from onFindAgainCommand: " + e);
- }
- }, 0);
- yield awaitFindResult2;
- });
-});
diff --git a/toolkit/content/tests/browser/browser_contentTitle.js b/toolkit/content/tests/browser/browser_contentTitle.js
deleted file mode 100644
index e7966e5655..0000000000
--- a/toolkit/content/tests/browser/browser_contentTitle.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var url = "https://example.com/browser/toolkit/content/tests/browser/file_contentTitle.html";
-
-add_task(function*() {
- let tab = gBrowser.selectedTab = gBrowser.addTab(url);
- let browser = tab.linkedBrowser;
- yield new Promise((resolve) => {
- addEventListener("TestLocationChange", function listener() {
- removeEventListener("TestLocationChange", listener);
- resolve();
- }, true, true);
- });
-
- is(gBrowser.contentTitle, "Test Page", "Should have the right title.");
-
- gBrowser.removeTab(tab);
-});
diff --git a/toolkit/content/tests/browser/browser_content_url_annotation.js b/toolkit/content/tests/browser/browser_content_url_annotation.js
deleted file mode 100644
index 1a4cee4c6c..0000000000
--- a/toolkit/content/tests/browser/browser_content_url_annotation.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-/* global Services, requestLongerTimeout, TestUtils, BrowserTestUtils,
- ok, info, dump, is, Ci, Cu, Components, ctypes, privateNoteIntentionalCrash,
- gBrowser, add_task, addEventListener, removeEventListener, ContentTask */
-
-"use strict";
-
-// Running this test in ASAN is slow.
-requestLongerTimeout(2);
-
-/**
- * Removes a file from a directory. This is a no-op if the file does not
- * exist.
- *
- * @param directory
- * The nsIFile representing the directory to remove from.
- * @param filename
- * A string for the file to remove from the directory.
- */
-function removeFile(directory, filename) {
- let file = directory.clone();
- file.append(filename);
- if (file.exists()) {
- file.remove(false);
- }
-}
-
-/**
- * Returns the directory where crash dumps are stored.
- *
- * @return nsIFile
- */
-function getMinidumpDirectory() {
- let dir = Services.dirsvc.get('ProfD', Ci.nsIFile);
- dir.append("minidumps");
- return dir;
-}
-
-/**
- * Checks that the URL is correctly annotated on a content process crash.
- */
-add_task(function* test_content_url_annotation() {
- let url = "https://example.com/browser/toolkit/content/tests/browser/file_redirect.html";
- let redirect_url = "https://example.com/browser/toolkit/content/tests/browser/file_redirect_to.html";
-
- yield BrowserTestUtils.withNewTab({
- gBrowser: gBrowser
- }, function* (browser) {
- ok(browser.isRemoteBrowser, "Should be a remote browser");
-
- // file_redirect.html should send us to file_redirect_to.html
- let promise = ContentTask.spawn(browser, {}, function* () {
- dump('ContentTask starting...\n');
- yield new Promise((resolve) => {
- addEventListener("RedirectDone", function listener() {
- dump('Got RedirectDone\n');
- removeEventListener("RedirectDone", listener);
- resolve();
- }, true, true);
- });
- });
- browser.loadURI(url);
- yield promise;
-
- // Crash the tab
- let annotations = yield BrowserTestUtils.crashBrowser(browser);
-
- ok("URL" in annotations, "annotated a URL");
- is(annotations.URL, redirect_url,
- "Should have annotated the URL after redirect");
- });
-});
diff --git a/toolkit/content/tests/browser/browser_crash_previous_frameloader.js b/toolkit/content/tests/browser/browser_crash_previous_frameloader.js
deleted file mode 100644
index bd50c6ffde..0000000000
--- a/toolkit/content/tests/browser/browser_crash_previous_frameloader.js
+++ /dev/null
@@ -1,108 +0,0 @@
-"use strict";
-
-/**
- * Cleans up the .dmp and .extra file from a crash.
- *
- * @param subject (nsISupports)
- * The subject passed through the ipc:content-shutdown
- * observer notification when a content process crash has
- * occurred.
- */
-function cleanUpMinidump(subject) {
- Assert.ok(subject instanceof Ci.nsIPropertyBag2,
- "Subject needs to be a nsIPropertyBag2 to clean up properly");
- let dumpID = subject.getPropertyAsAString("dumpID");
-
- Assert.ok(dumpID, "There should be a dumpID");
- if (dumpID) {
- let dir = Services.dirsvc.get("ProfD", Ci.nsIFile);
- dir.append("minidumps");
-
- let file = dir.clone();
- file.append(dumpID + ".dmp");
- file.remove(true);
-
- file = dir.clone();
- file.append(dumpID + ".extra");
- file.remove(true);
- }
-}
-
-/**
- * This test ensures that if a remote frameloader crashes after
- * the frameloader owner swaps it out for a new frameloader,
- * that a oop-browser-crashed event is not sent to the new
- * frameloader's browser element.
- */
-add_task(function* test_crash_in_previous_frameloader() {
- // On debug builds, crashing tabs results in much thinking, which
- // slows down the test and results in intermittent test timeouts,
- // so we'll pump up the expected timeout for this test.
- requestLongerTimeout(2);
-
- if (!gMultiProcessBrowser) {
- Assert.ok(false, "This test should only be run in multi-process mode.");
- return;
- }
-
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "http://example.com",
- }, function*(browser) {
- // First, sanity check...
- Assert.ok(browser.isRemoteBrowser,
- "This browser needs to be remote if this test is going to " +
- "work properly.");
-
- // We will wait for the oop-browser-crashed event to have
- // a chance to appear. That event is fired when TabParents
- // are destroyed, and that occurs _before_ ContentParents
- // are destroyed, so we'll wait on the ipc:content-shutdown
- // observer notification, which is fired when a ContentParent
- // goes away. After we see this notification, oop-browser-crashed
- // events should have fired.
- let contentProcessGone = TestUtils.topicObserved("ipc:content-shutdown");
- let sawTabCrashed = false;
- let onTabCrashed = () => {
- sawTabCrashed = true;
- };
-
- browser.addEventListener("oop-browser-crashed", onTabCrashed);
-
- // The name of the game is to cause a crash in a remote browser,
- // and then immediately swap out the browser for a non-remote one.
- yield ContentTask.spawn(browser, null, function() {
- const Cu = Components.utils;
- Cu.import("resource://gre/modules/ctypes.jsm");
- Cu.import("resource://gre/modules/Timer.jsm");
-
- let dies = function() {
- privateNoteIntentionalCrash();
- let zero = new ctypes.intptr_t(8);
- let badptr = ctypes.cast(zero, ctypes.PointerType(ctypes.int32_t));
- badptr.contents
- };
-
- // When the parent flips the remoteness of the browser, the
- // page should receive the pagehide event, which we'll then
- // use to crash the frameloader.
- addEventListener("pagehide", function() {
- dump("\nEt tu, Brute?\n");
- dies();
- });
- });
-
- gBrowser.updateBrowserRemoteness(browser, false);
- info("Waiting for content process to go away.");
- let [subject, data] = yield contentProcessGone;
-
- // If we don't clean up the minidump, the harness will
- // complain.
- cleanUpMinidump(subject);
-
- info("Content process is gone!");
- Assert.ok(!sawTabCrashed,
- "Should not have seen the oop-browser-crashed event.");
- browser.removeEventListener("oop-browser-crashed", onTabCrashed);
- });
-});
diff --git a/toolkit/content/tests/browser/browser_datetime_datepicker.js b/toolkit/content/tests/browser/browser_datetime_datepicker.js
deleted file mode 100644
index 966a74e7a7..0000000000
--- a/toolkit/content/tests/browser/browser_datetime_datepicker.js
+++ /dev/null
@@ -1,284 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-const MONTH_YEAR = ".month-year",
- DAYS_VIEW = ".days-view",
- BTN_PREV_MONTH = ".prev",
- BTN_NEXT_MONTH = ".next";
-const DATE_FORMAT = new Intl.DateTimeFormat("en-US", { year: "numeric", month: "long", timeZone: "UTC" }).format;
-
-// Create a list of abbreviations for calendar class names
-const W = "weekend",
- O = "outside",
- S = "selection",
- R = "out-of-range",
- T = "today",
- P = "off-step";
-
-// Calendar classlist for 2016-12. Used to verify the classNames are correct.
-const calendarClasslist_201612 = [
- [W, O], [O], [O], [O], [], [], [W],
- [W], [], [], [], [], [], [W],
- [W], [], [], [], [S], [], [W],
- [W], [], [], [], [], [], [W],
- [W], [], [], [], [], [], [W],
- [W, O], [O], [O], [O], [O], [O], [W, O],
-];
-
-function getCalendarText() {
- return helper.getChildren(DAYS_VIEW).map(child => child.textContent);
-}
-
-function getCalendarClassList() {
- return helper.getChildren(DAYS_VIEW).map(child => Array.from(child.classList));
-}
-
-function mergeArrays(a, b) {
- return a.map((classlist, index) => classlist.concat(b[index]));
-}
-
-let helper = new DateTimeTestHelper();
-
-registerCleanupFunction(() => {
- helper.cleanup();
-});
-
-/**
- * Test that date picker opens to today's date when input field is blank
- */
-add_task(async function test_datepicker_today() {
- const date = new Date();
-
- await helper.openPicker("data:text/html, <input type='date'>");
-
- Assert.equal(helper.getElement(MONTH_YEAR).textContent, DATE_FORMAT(date));
-
- await helper.tearDown();
-});
-
-/**
- * Test that date picker opens to the correct month, with calendar days
- * displayed correctly, given a date value is set.
- */
-add_task(async function test_datepicker_open() {
- const inputValue = "2016-12-15";
-
- await helper.openPicker(`data:text/html, <input type="date" value="${inputValue}">`);
-
- Assert.equal(helper.getElement(MONTH_YEAR).textContent, DATE_FORMAT(new Date(inputValue)));
- Assert.deepEqual(
- getCalendarText(),
- [
- "27", "28", "29", "30", "1", "2", "3",
- "4", "5", "6", "7", "8", "9", "10",
- "11", "12", "13", "14", "15", "16", "17",
- "18", "19", "20", "21", "22", "23", "24",
- "25", "26", "27", "28", "29", "30", "31",
- "1", "2", "3", "4", "5", "6", "7",
- ],
- "2016-12",
- );
- Assert.deepEqual(
- getCalendarClassList(),
- calendarClasslist_201612,
- "2016-12 classNames"
- );
-
- await helper.tearDown();
-});
-
-/**
- * When the prev month button is clicked, calendar should display the dates for
- * the previous month.
- */
-add_task(async function test_datepicker_prev_month_btn() {
- const inputValue = "2016-12-15";
- const prevMonth = "2016-11-01";
-
- await helper.openPicker(`data:text/html, <input type="date" value="${inputValue}">`);
- helper.click(helper.getElement(BTN_PREV_MONTH));
-
- Assert.equal(helper.getElement(MONTH_YEAR).textContent, DATE_FORMAT(new Date(prevMonth)));
- Assert.deepEqual(
- getCalendarText(),
- [
- "30", "31", "1", "2", "3", "4", "5",
- "6", "7", "8", "9", "10", "11", "12",
- "13", "14", "15", "16", "17", "18", "19",
- "20", "21", "22", "23", "24", "25", "26",
- "27", "28", "29", "30", "1", "2", "3",
- "4", "5", "6", "7", "8", "9", "10",
- ],
- "2016-11",
- );
-
- await helper.tearDown();
-});
-
-/**
- * When the next month button is clicked, calendar should display the dates for
- * the next month.
- */
-add_task(async function test_datepicker_next_month_btn() {
- const inputValue = "2016-12-15";
- const nextMonth = "2017-01-01";
-
- await helper.openPicker(`data:text/html, <input type="date" value="${inputValue}">`);
- helper.click(helper.getElement(BTN_NEXT_MONTH));
-
- Assert.equal(helper.getElement(MONTH_YEAR).textContent, DATE_FORMAT(new Date(nextMonth)));
- Assert.deepEqual(
- getCalendarText(),
- [
- "25", "26", "27", "28", "29", "30", "31",
- "1", "2", "3", "4", "5", "6", "7",
- "8", "9", "10", "11", "12", "13", "14",
- "15", "16", "17", "18", "19", "20", "21",
- "22", "23", "24", "25", "26", "27", "28",
- "29", "30", "31", "1", "2", "3", "4",
- ],
- "2017-01",
- );
-
- await helper.tearDown();
-});
-
-/**
- * When a date on the calendar is clicked, date picker should close and set
- * value to the input box.
- */
-add_task(async function test_datepicker_clicked() {
- const inputValue = "2016-12-15";
- const firstDayOnCalendar = "2016-11-27";
-
- await helper.openPicker(`data:text/html, <input type="date" value="${inputValue}">`);
- // Click the first item (top-left corner) of the calendar
- helper.click(helper.getElement(DAYS_VIEW).children[0]);
- await ContentTask.spawn(helper.tab.linkedBrowser, {}, async function() {
- let inputEl = content.document.querySelector("input");
- await ContentTaskUtils.waitForEvent(inputEl, "input");
- });
-
- Assert.equal(content.document.querySelector("input").value, firstDayOnCalendar);
-
- await helper.tearDown();
-});
-
-/**
- * Make sure picker is in correct state when it is reopened.
- */
-add_task(async function test_datepicker_reopen_state() {
- const inputValue = "2016-12-15";
- const nextMonth = "2017-01-01";
-
- await helper.openPicker(`data:text/html, <input type="date" value="${inputValue}">`);
- // Navigate to the next month but does not commit the change
- Assert.equal(helper.getElement(MONTH_YEAR).textContent, DATE_FORMAT(new Date(inputValue)));
- helper.click(helper.getElement(BTN_NEXT_MONTH));
- Assert.equal(helper.getElement(MONTH_YEAR).textContent, DATE_FORMAT(new Date(nextMonth)));
- EventUtils.synthesizeKey("VK_ESCAPE", {}, window);
-
- // Ensures the picker opens to the month of the input value
- await BrowserTestUtils.synthesizeMouseAtCenter("input", {}, gBrowser.selectedBrowser);
- await helper.waitForPickerReady();
- Assert.equal(helper.getElement(MONTH_YEAR).textContent, DATE_FORMAT(new Date(inputValue)));
-
- await helper.tearDown();
-});
-
-/**
- * When min and max attributes are set, calendar should show some dates as
- * out-of-range.
- */
-add_task(async function test_datepicker_min_max() {
- const inputValue = "2016-12-15";
- const inputMin = "2016-12-05";
- const inputMax = "2016-12-25";
-
- await helper.openPicker(`data:text/html, <input type="date" value="${inputValue}" min="${inputMin}" max="${inputMax}">`);
-
- Assert.deepEqual(
- getCalendarClassList(),
- mergeArrays(calendarClasslist_201612, [
- // R denotes out-of-range
- [R], [R], [R], [R], [R], [R], [R],
- [R], [], [], [], [], [], [],
- [], [], [], [], [], [], [],
- [], [], [], [], [], [], [],
- [], [R], [R], [R], [R], [R], [R],
- [R], [R], [R], [R], [R], [R], [R],
- ]),
- "2016-12 with min & max",
- );
-
- await helper.tearDown();
-});
-
-/**
- * When step attribute is set, calendar should show some dates as off-step.
- */
-add_task(async function test_datepicker_step() {
- const inputValue = "2016-12-15";
- const inputStep = "5";
-
- await helper.openPicker(`data:text/html, <input type="date" value="${inputValue}" step="${inputStep}">`);
-
- Assert.deepEqual(
- getCalendarClassList(),
- mergeArrays(calendarClasslist_201612, [
- // P denotes off-step
- [P], [P], [P], [], [P], [P], [P],
- [P], [], [P], [P], [P], [P], [],
- [P], [P], [P], [P], [], [P], [P],
- [P], [P], [], [P], [P], [P], [P],
- [], [P], [P], [P], [P], [], [P],
- [P], [P], [P], [], [P], [P], [P],
- ]),
- "2016-12 with step",
- );
-
- await helper.tearDown();
-});
-
-add_task(async function test_datepicker_abs_min() {
- const inputValue = "0001-01-01";
- await helper.openPicker(`data:text/html, <input type="date" value="${inputValue}">`);
-
- Assert.deepEqual(
- getCalendarText(),
- [
- "", "1", "2", "3", "4", "5", "6",
- "7", "8", "9", "10", "11", "12", "13",
- "14", "15", "16", "17", "18", "19", "20",
- "21", "22", "23", "24", "25", "26", "27",
- "28", "29", "30", "31", "1", "2", "3",
- "4", "5", "6", "7", "8", "9", "10",
- ],
- "0001-01",
- );
-
- await helper.tearDown();
-});
-
-add_task(async function test_datepicker_abs_max() {
- const inputValue = "275760-09-13";
- await helper.openPicker(`data:text/html, <input type="date" value="${inputValue}">`);
-
- Assert.deepEqual(
- getCalendarText(),
- [
- "31", "1", "2", "3", "4", "5", "6",
- "7", "8", "9", "10", "11", "12", "13",
- "", "", "", "", "", "", "",
- "", "", "", "", "", "", "",
- "", "", "", "", "", "", "",
- "", "", "", "", "", "", "",
- ],
- "275760-09",
- );
-
- await helper.tearDown();
-});
diff --git a/toolkit/content/tests/browser/browser_default_image_filename.js b/toolkit/content/tests/browser/browser_default_image_filename.js
deleted file mode 100644
index 2859d486fb..0000000000
--- a/toolkit/content/tests/browser/browser_default_image_filename.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-var MockFilePicker = SpecialPowers.MockFilePicker;
-MockFilePicker.init(window);
-
-/**
- * TestCase for bug 564387
- * <https://bugzilla.mozilla.org/show_bug.cgi?id=564387>
- */
-add_task(function* () {
- let loadPromise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
- gBrowser.loadURI("data:image/gif;base64,R0lGODlhEAAOALMAAOazToeHh0tLS/7LZv/0jvb29t/f3//Ub//ge8WSLf/rhf/3kdbW1mxsbP//mf///yH5BAAAAAAALAAAAAAQAA4AAARe8L1Ekyky67QZ1hLnjM5UUde0ECwLJoExKcppV0aCcGCmTIHEIUEqjgaORCMxIC6e0CcguWw6aFjsVMkkIr7g77ZKPJjPZqIyd7sJAgVGoEGv2xsBxqNgYPj/gAwXEQA7");
- yield loadPromise;
-
- let popupShownPromise = BrowserTestUtils.waitForEvent(document, "popupshown");
-
- yield BrowserTestUtils.synthesizeMouseAtCenter("img",
- { type: "contextmenu", button: 2 },
- gBrowser.selectedBrowser);
-
- yield popupShownPromise;
-
- let showFilePickerPromise = new Promise(resolve => {
- MockFilePicker.showCallback = function(fp) {
- is(fp.defaultString, "index.gif");
- resolve();
- }
- });
-
- registerCleanupFunction(function () {
- MockFilePicker.cleanup();
- });
-
- // Select "Save Image As" option from context menu
- var saveImageAsCommand = document.getElementById("context-saveimage");
- saveImageAsCommand.doCommand();
-
- yield showFilePickerPromise;
-
- let contextMenu = document.getElementById("contentAreaContextMenu");
- let popupHiddenPromise = BrowserTestUtils.waitForEvent(contextMenu, "popuphidden");
- contextMenu.hidePopup();
- yield popupHiddenPromise;
-});
diff --git a/toolkit/content/tests/browser/browser_f7_caret_browsing.js b/toolkit/content/tests/browser/browser_f7_caret_browsing.js
deleted file mode 100644
index c4b6823d41..0000000000
--- a/toolkit/content/tests/browser/browser_f7_caret_browsing.js
+++ /dev/null
@@ -1,227 +0,0 @@
-var gListener = null;
-const kURL = "data:text/html;charset=utf-8,Caret browsing is fun.<input id='in'>";
-
-const kPrefShortcutEnabled = "accessibility.browsewithcaret_shortcut.enabled";
-const kPrefWarnOnEnable = "accessibility.warn_on_browsewithcaret";
-const kPrefCaretBrowsingOn = "accessibility.browsewithcaret";
-
-var oldPrefs = {};
-for (let pref of [kPrefShortcutEnabled, kPrefWarnOnEnable, kPrefCaretBrowsingOn]) {
- oldPrefs[pref] = Services.prefs.getBoolPref(pref);
-}
-
-Services.prefs.setBoolPref(kPrefShortcutEnabled, true);
-Services.prefs.setBoolPref(kPrefWarnOnEnable, true);
-Services.prefs.setBoolPref(kPrefCaretBrowsingOn, false);
-
-registerCleanupFunction(function() {
- for (let pref of [kPrefShortcutEnabled, kPrefWarnOnEnable, kPrefCaretBrowsingOn]) {
- Services.prefs.setBoolPref(pref, oldPrefs[pref]);
- }
-});
-
-// NB: not using BrowserTestUtils.domWindowOpened here because there's no way to
-// undo waiting for a window open. If we don't want the window to be opened, and
-// wait for it to verify that it indeed does not open, we need to be able to
-// then "stop" waiting so that when we next *do* want it to open, our "old"
-// listener doesn't fire and do things we don't want (like close the window...).
-let gCaretPromptOpeningObserver;
-function promiseCaretPromptOpened() {
- return new Promise(resolve => {
- function observer(subject, topic, data) {
- if (topic == "domwindowopened") {
- Services.ww.unregisterNotification(observer);
- let win = subject.QueryInterface(Ci.nsIDOMWindow);
- BrowserTestUtils.waitForEvent(win, "load", false, e => e.target.location.href != "about:blank").then(() => resolve(win));
- gCaretPromptOpeningObserver = null;
- }
- }
- Services.ww.registerNotification(observer);
- gCaretPromptOpeningObserver = observer;
- });
-}
-
-function hitF7(async = true) {
- let f7 = () => EventUtils.sendKey("F7");
- // Need to not stop execution inside this task:
- if (async) {
- executeSoon(f7);
- } else {
- f7();
- }
-}
-
-function syncToggleCaretNoDialog(expected) {
- let openedDialog = false;
- promiseCaretPromptOpened().then(function(win) {
- openedDialog = true;
- win.close(); // This will eventually return focus here and allow the test to continue...
- });
- // Cause the dialog to appear sync, if it still does.
- hitF7(false);
-
- let expectedStr = expected ? "on." : "off.";
- ok(!openedDialog, "Shouldn't open a dialog to turn caret browsing " + expectedStr);
- // Need to clean up if the dialog wasn't opened, so the observer doesn't get
- // re-triggered later on causing "issues".
- if (!openedDialog) {
- Services.ww.unregisterNotification(gCaretPromptOpeningObserver);
- gCaretPromptOpeningObserver = null;
- }
- let prefVal = Services.prefs.getBoolPref(kPrefCaretBrowsingOn);
- is(prefVal, expected, "Caret browsing should now be " + expectedStr);
-}
-
-function waitForFocusOnInput(browser)
-{
- return ContentTask.spawn(browser, null, function* () {
- let textEl = content.document.getElementById("in");
- return ContentTaskUtils.waitForCondition(() => {
- return content.document.activeElement == textEl;
- }, "Input should get focused.");
- });
-}
-
-function focusInput(browser)
-{
- return ContentTask.spawn(browser, null, function* () {
- let textEl = content.document.getElementById("in");
- textEl.focus();
- });
-}
-
-add_task(function* checkTogglingCaretBrowsing() {
- let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, kURL);
- yield focusInput(tab.linkedBrowser);
-
- let promiseGotKey = promiseCaretPromptOpened();
- hitF7();
- let prompt = yield promiseGotKey;
- let doc = prompt.document;
- is(doc.documentElement.defaultButton, "cancel", "No button should be the default");
- ok(!doc.getElementById("checkbox").checked, "Checkbox shouldn't be checked by default.");
- let promiseDialogUnloaded = BrowserTestUtils.waitForEvent(prompt, "unload");
-
- doc.documentElement.cancelDialog();
- yield promiseDialogUnloaded;
- info("Dialog unloaded");
- yield waitForFocusOnInput(tab.linkedBrowser);
- ok(!Services.prefs.getBoolPref(kPrefCaretBrowsingOn), "Caret browsing should still be off after cancelling the dialog.");
-
- promiseGotKey = promiseCaretPromptOpened();
- hitF7();
- prompt = yield promiseGotKey;
-
- doc = prompt.document;
- is(doc.documentElement.defaultButton, "cancel", "No button should be the default");
- ok(!doc.getElementById("checkbox").checked, "Checkbox shouldn't be checked by default.");
- promiseDialogUnloaded = BrowserTestUtils.waitForEvent(prompt, "unload");
-
- doc.documentElement.acceptDialog();
- yield promiseDialogUnloaded;
- info("Dialog unloaded");
- yield waitForFocusOnInput(tab.linkedBrowser);
- ok(Services.prefs.getBoolPref(kPrefCaretBrowsingOn), "Caret browsing should be on after accepting the dialog.");
-
- syncToggleCaretNoDialog(false);
-
- promiseGotKey = promiseCaretPromptOpened();
- hitF7();
- prompt = yield promiseGotKey;
- doc = prompt.document;
-
- is(doc.documentElement.defaultButton, "cancel", "No button should be the default");
- ok(!doc.getElementById("checkbox").checked, "Checkbox shouldn't be checked by default.");
-
- promiseDialogUnloaded = BrowserTestUtils.waitForEvent(prompt, "unload");
- doc.documentElement.cancelDialog();
- yield promiseDialogUnloaded;
- info("Dialog unloaded");
- yield waitForFocusOnInput(tab.linkedBrowser);
-
- ok(!Services.prefs.getBoolPref(kPrefCaretBrowsingOn), "Caret browsing should still be off after cancelling the dialog.");
-
- Services.prefs.setBoolPref(kPrefShortcutEnabled, true);
- Services.prefs.setBoolPref(kPrefWarnOnEnable, true);
- Services.prefs.setBoolPref(kPrefCaretBrowsingOn, false);
-
- yield BrowserTestUtils.removeTab(tab);
-});
-
-add_task(function* toggleCheckboxNoCaretBrowsing() {
- let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, kURL);
- yield focusInput(tab.linkedBrowser);
-
- let promiseGotKey = promiseCaretPromptOpened();
- hitF7();
- let prompt = yield promiseGotKey;
- let doc = prompt.document;
- is(doc.documentElement.defaultButton, "cancel", "No button should be the default");
- let checkbox = doc.getElementById("checkbox");
- ok(!checkbox.checked, "Checkbox shouldn't be checked by default.");
-
- // Check the box:
- checkbox.click();
-
- let promiseDialogUnloaded = BrowserTestUtils.waitForEvent(prompt, "unload");
-
- // Say no:
- doc.documentElement.getButton("cancel").click();
-
- yield promiseDialogUnloaded;
- info("Dialog unloaded");
- yield waitForFocusOnInput(tab.linkedBrowser);
- ok(!Services.prefs.getBoolPref(kPrefCaretBrowsingOn), "Caret browsing should still be off.");
- ok(!Services.prefs.getBoolPref(kPrefShortcutEnabled), "Shortcut should now be disabled.");
-
- syncToggleCaretNoDialog(false);
- ok(!Services.prefs.getBoolPref(kPrefShortcutEnabled), "Shortcut should still be disabled.");
-
- Services.prefs.setBoolPref(kPrefShortcutEnabled, true);
- Services.prefs.setBoolPref(kPrefWarnOnEnable, true);
- Services.prefs.setBoolPref(kPrefCaretBrowsingOn, false);
-
- yield BrowserTestUtils.removeTab(tab);
-});
-
-
-add_task(function* toggleCheckboxWantCaretBrowsing() {
- let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, kURL);
- yield focusInput(tab.linkedBrowser);
-
- let promiseGotKey = promiseCaretPromptOpened();
- hitF7();
- let prompt = yield promiseGotKey;
- let doc = prompt.document;
- is(doc.documentElement.defaultButton, "cancel", "No button should be the default");
- let checkbox = doc.getElementById("checkbox");
- ok(!checkbox.checked, "Checkbox shouldn't be checked by default.");
-
- // Check the box:
- checkbox.click();
-
- let promiseDialogUnloaded = BrowserTestUtils.waitForEvent(prompt, "unload");
-
- // Say yes:
- doc.documentElement.acceptDialog();
- yield promiseDialogUnloaded;
- info("Dialog unloaded");
- yield waitForFocusOnInput(tab.linkedBrowser);
- ok(Services.prefs.getBoolPref(kPrefCaretBrowsingOn), "Caret browsing should now be on.");
- ok(Services.prefs.getBoolPref(kPrefShortcutEnabled), "Shortcut should still be enabled.");
- ok(!Services.prefs.getBoolPref(kPrefWarnOnEnable), "Should no longer warn when enabling.");
-
- syncToggleCaretNoDialog(false);
- syncToggleCaretNoDialog(true);
- syncToggleCaretNoDialog(false);
-
- Services.prefs.setBoolPref(kPrefShortcutEnabled, true);
- Services.prefs.setBoolPref(kPrefWarnOnEnable, true);
- Services.prefs.setBoolPref(kPrefCaretBrowsingOn, false);
-
- yield BrowserTestUtils.removeTab(tab);
-});
-
-
-
-
diff --git a/toolkit/content/tests/browser/browser_findbar.js b/toolkit/content/tests/browser/browser_findbar.js
deleted file mode 100644
index 1ab06f6327..0000000000
--- a/toolkit/content/tests/browser/browser_findbar.js
+++ /dev/null
@@ -1,249 +0,0 @@
-XPCOMUtils.defineLazyModuleGetter(this, "Promise",
- "resource://gre/modules/Promise.jsm");
-Components.utils.import("resource://gre/modules/Timer.jsm", this);
-
-const TEST_PAGE_URI = "data:text/html;charset=utf-8,The letter s.";
-// Using 'javascript' schema to bypass E10SUtils.canLoadURIInProcess, because
-// it does not allow 'data:' URI to be loaded in the parent process.
-const E10S_PARENT_TEST_PAGE_URI = "javascript:document.write('The letter s.');";
-
-/**
- * Makes sure that the findbar hotkeys (' and /) event listeners
- * are added to the system event group and do not get blocked
- * by calling stopPropagation on a keypress event on a page.
- */
-add_task(function* test_hotkey_event_propagation() {
- info("Ensure hotkeys are not affected by stopPropagation.");
-
- // Opening new tab
- let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_PAGE_URI);
- let browser = gBrowser.getBrowserForTab(tab);
- let findbar = gBrowser.getFindBar();
-
- // Pressing these keys open the findbar.
- const HOTKEYS = ["/", "'"];
-
- // Checking if findbar appears when any hotkey is pressed.
- for (let key of HOTKEYS) {
- is(findbar.hidden, true, "Findbar is hidden now.");
- gBrowser.selectedTab = tab;
- yield SimpleTest.promiseFocus(gBrowser.selectedBrowser);
- yield BrowserTestUtils.sendChar(key, browser);
- is(findbar.hidden, false, "Findbar should not be hidden.");
- yield closeFindbarAndWait(findbar);
- }
-
- // Stop propagation for all keyboard events.
- let frameScript = () => {
- const stopPropagation = e => e.stopImmediatePropagation();
- let window = content.document.defaultView;
- window.removeEventListener("keydown", stopPropagation);
- window.removeEventListener("keypress", stopPropagation);
- window.removeEventListener("keyup", stopPropagation);
- };
-
- let mm = browser.messageManager;
- mm.loadFrameScript("data:,(" + frameScript.toString() + ")();", false);
-
- // Checking if findbar still appears when any hotkey is pressed.
- for (let key of HOTKEYS) {
- is(findbar.hidden, true, "Findbar is hidden now.");
- gBrowser.selectedTab = tab;
- yield SimpleTest.promiseFocus(gBrowser.selectedBrowser);
- yield BrowserTestUtils.sendChar(key, browser);
- is(findbar.hidden, false, "Findbar should not be hidden.");
- yield closeFindbarAndWait(findbar);
- }
-
- gBrowser.removeTab(tab);
-});
-
-add_task(function* test_not_found() {
- info("Check correct 'Phrase not found' on new tab");
-
- let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_PAGE_URI);
-
- // Search for the first word.
- yield promiseFindFinished("--- THIS SHOULD NEVER MATCH ---", false);
- let findbar = gBrowser.getFindBar();
- is(findbar._findStatusDesc.textContent, findbar._notFoundStr,
- "Findbar status text should be 'Phrase not found'");
-
- gBrowser.removeTab(tab);
-});
-
-add_task(function* test_found() {
- let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_PAGE_URI);
-
- // Search for a string that WILL be found, with 'Highlight All' on
- yield promiseFindFinished("S", true);
- ok(!gBrowser.getFindBar()._findStatusDesc.textContent,
- "Findbar status should be empty");
-
- gBrowser.removeTab(tab);
-});
-
-// Setting first findbar to case-sensitive mode should not affect
-// new tab find bar.
-add_task(function* test_tabwise_case_sensitive() {
- let tab1 = yield BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_PAGE_URI);
- let findbar1 = gBrowser.getFindBar();
-
- let tab2 = yield BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_PAGE_URI);
- let findbar2 = gBrowser.getFindBar();
-
- // Toggle case sensitivity for first findbar
- findbar1.getElement("find-case-sensitive").click();
-
- gBrowser.selectedTab = tab1;
-
- // Not found for first tab.
- yield promiseFindFinished("S", true);
- is(findbar1._findStatusDesc.textContent, findbar1._notFoundStr,
- "Findbar status text should be 'Phrase not found'");
-
- gBrowser.selectedTab = tab2;
-
- // But it didn't affect the second findbar.
- yield promiseFindFinished("S", true);
- ok(!findbar2._findStatusDesc.textContent, "Findbar status should be empty");
-
- gBrowser.removeTab(tab1);
- gBrowser.removeTab(tab2);
-});
-
-/**
- * Navigating from a web page (for example mozilla.org) to an internal page
- * (like about:addons) might trigger a change of browser's remoteness.
- * 'Remoteness change' means that rendering page content moves from child
- * process into the parent process or the other way around.
- * This test ensures that findbar properly handles such a change.
- */
-add_task(function* test_reinitialization_at_remoteness_change() {
- // This test only makes sence in e10s evironment.
- if (!gMultiProcessBrowser) {
- info("Skipping this test because of non-e10s environment.");
- return;
- }
-
- info("Ensure findbar re-initialization at remoteness change.");
-
- // Load a remote page and trigger findbar construction.
- let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_PAGE_URI);
- let browser = gBrowser.getBrowserForTab(tab);
- let findbar = gBrowser.getFindBar();
-
- // Findbar should operate normally.
- yield promiseFindFinished("z", false);
- is(findbar._findStatusDesc.textContent, findbar._notFoundStr,
- "Findbar status text should be 'Phrase not found'");
-
- yield promiseFindFinished("s", false);
- ok(!findbar._findStatusDesc.textContent, "Findbar status should be empty");
-
- // Moving browser into the parent process and reloading sample data.
- ok(browser.isRemoteBrowser, "Browser should be remote now.");
- yield promiseRemotenessChange(tab, false);
- yield BrowserTestUtils.loadURI(browser, E10S_PARENT_TEST_PAGE_URI);
- ok(!browser.isRemoteBrowser, "Browser should not be remote any more.");
-
- // Findbar should keep operating normally after remoteness change.
- yield promiseFindFinished("z", false);
- is(findbar._findStatusDesc.textContent, findbar._notFoundStr,
- "Findbar status text should be 'Phrase not found'");
-
- yield promiseFindFinished("s", false);
- ok(!findbar._findStatusDesc.textContent, "Findbar status should be empty");
-
- yield BrowserTestUtils.removeTab(tab);
-});
-
-/**
- * Ensure that the initial typed characters aren't lost immediately after
- * opening the find bar.
- */
-add_task(function* () {
- // This test only makes sence in e10s evironment.
- if (!gMultiProcessBrowser) {
- info("Skipping this test because of non-e10s environment.");
- return;
- }
-
- let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_PAGE_URI);
- let browser = tab.linkedBrowser;
-
- ok(!gFindBarInitialized, "findbar isn't initialized yet");
-
- let findBar = gFindBar;
- let initialValue = findBar._findField.value;
-
- EventUtils.synthesizeKey("f", { accelKey: true }, window);
-
- let promises = [
- BrowserTestUtils.sendChar("a", browser),
- BrowserTestUtils.sendChar("b", browser),
- BrowserTestUtils.sendChar("c", browser)
- ];
-
- isnot(document.activeElement, findBar._findField.inputField,
- "findbar is not yet focused");
- is(findBar._findField.value, initialValue, "still has initial find query");
-
- yield Promise.all(promises);
- is(document.activeElement, findBar._findField.inputField,
- "findbar is now focused");
- is(findBar._findField.value, "abc", "abc fully entered as find query");
-
- yield BrowserTestUtils.removeTab(tab);
-});
-
-function promiseFindFinished(searchText, highlightOn) {
- let deferred = Promise.defer();
-
- let findbar = gBrowser.getFindBar();
- findbar.startFind(findbar.FIND_NORMAL);
- let highlightElement = findbar.getElement("highlight");
- if (highlightElement.checked != highlightOn)
- highlightElement.click();
- executeSoon(() => {
- findbar._findField.value = searchText;
-
- let resultListener;
- // When highlighting is on the finder sends a second "FOUND" message after
- // the search wraps. This causes timing problems with e10s. waitMore
- // forces foundOrTimeout wait for the second "FOUND" message before
- // resolving the promise.
- let waitMore = highlightOn;
- let findTimeout = setTimeout(() => foundOrTimedout(null), 2000);
- let foundOrTimedout = function(aData) {
- if (aData !== null && waitMore) {
- waitMore = false;
- return;
- }
- if (aData === null)
- info("Result listener not called, timeout reached.");
- clearTimeout(findTimeout);
- findbar.browser.finder.removeResultListener(resultListener);
- deferred.resolve();
- }
-
- resultListener = {
- onFindResult: foundOrTimedout
- };
- findbar.browser.finder.addResultListener(resultListener);
- findbar._find();
- });
-
- return deferred.promise;
-}
-
-function promiseRemotenessChange(tab, shouldBeRemote) {
- return new Promise((resolve) => {
- let browser = gBrowser.getBrowserForTab(tab);
- tab.addEventListener("TabRemotenessChange", function listener() {
- tab.removeEventListener("TabRemotenessChange", listener);
- resolve();
- });
- gBrowser.updateBrowserRemoteness(browser, shouldBeRemote);
- });
-}
diff --git a/toolkit/content/tests/browser/browser_isSynthetic.js b/toolkit/content/tests/browser/browser_isSynthetic.js
deleted file mode 100644
index 15a341461a..0000000000
--- a/toolkit/content/tests/browser/browser_isSynthetic.js
+++ /dev/null
@@ -1,72 +0,0 @@
-function LocationChangeListener(browser) {
- this.browser = browser;
- browser.addProgressListener(this);
-}
-
-LocationChangeListener.prototype = {
- wasSynthetic: false,
- browser: null,
-
- destroy: function() {
- this.browser.removeProgressListener(this);
- },
-
- onLocationChange: function(webProgress, request, location, flags) {
- this.wasSynthetic = this.browser.isSyntheticDocument;
- },
-
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
- Ci.nsISupportsWeakReference])
-}
-
-const FILES = gTestPath.replace("browser_isSynthetic.js", "")
- .replace("chrome://mochitests/content/", "http://example.com/");
-
-function waitForPageShow(browser) {
- return ContentTask.spawn(browser, null, function*() {
- Cu.import("resource://gre/modules/PromiseUtils.jsm");
- yield new Promise(resolve => {
- let listener = () => {
- removeEventListener("pageshow", listener, true);
- resolve();
- }
- addEventListener("pageshow", listener, true);
- });
- });
-}
-
-add_task(function*() {
- let tab = gBrowser.addTab("about:blank");
- let browser = tab.linkedBrowser;
- yield BrowserTestUtils.browserLoaded(browser);
- let listener = new LocationChangeListener(browser);
-
- is(browser.isSyntheticDocument, false, "Should not be synthetic");
-
- let loadPromise = waitForPageShow(browser);
- browser.loadURI("data:text/html;charset=utf-8,<html/>");
- yield loadPromise;
- is(listener.wasSynthetic, false, "Should not be synthetic");
- is(browser.isSyntheticDocument, false, "Should not be synthetic");
-
- loadPromise = waitForPageShow(browser);
- browser.loadURI(FILES + "empty.png");
- yield loadPromise;
- is(listener.wasSynthetic, true, "Should be synthetic");
- is(browser.isSyntheticDocument, true, "Should be synthetic");
-
- loadPromise = waitForPageShow(browser);
- browser.goBack();
- yield loadPromise;
- is(listener.wasSynthetic, false, "Should not be synthetic");
- is(browser.isSyntheticDocument, false, "Should not be synthetic");
-
- loadPromise = waitForPageShow(browser);
- browser.goForward();
- yield loadPromise;
- is(listener.wasSynthetic, true, "Should be synthetic");
- is(browser.isSyntheticDocument, true, "Should be synthetic");
-
- listener.destroy();
- gBrowser.removeTab(tab);
-});
diff --git a/toolkit/content/tests/browser/browser_keyevents_during_autoscrolling.js b/toolkit/content/tests/browser/browser_keyevents_during_autoscrolling.js
deleted file mode 100644
index 3fce471141..0000000000
--- a/toolkit/content/tests/browser/browser_keyevents_during_autoscrolling.js
+++ /dev/null
@@ -1,120 +0,0 @@
-add_task(function * ()
-{
- const kPrefName_AutoScroll = "general.autoScroll";
- Services.prefs.setBoolPref(kPrefName_AutoScroll, true);
-
- const kNoKeyEvents = 0;
- const kKeyDownEvent = 1;
- const kKeyPressEvent = 2;
- const kKeyUpEvent = 4;
- const kAllKeyEvents = 7;
-
- var expectedKeyEvents;
- var dispatchedKeyEvents;
- var key;
- var root;
-
- /**
- * Encapsulates EventUtils.sendChar().
- */
- function sendChar(aChar)
- {
- key = aChar;
- dispatchedKeyEvents = kNoKeyEvents;
- EventUtils.sendChar(key);
- is(dispatchedKeyEvents, expectedKeyEvents,
- "unexpected key events were dispatched or not dispatched: " + key);
- }
-
- /**
- * Encapsulates EventUtils.sendKey().
- */
- function sendKey(aKey)
- {
- key = aKey;
- dispatchedKeyEvents = kNoKeyEvents;
- EventUtils.sendKey(key);
- is(dispatchedKeyEvents, expectedKeyEvents,
- "unexpected key events were dispatched or not dispatched: " + key);
- }
-
- function onKey(aEvent)
- {
-// if (aEvent.target != root && aEvent.target != root.ownerDocument.body) {
-// ok(false, "unknown target: " + aEvent.target.tagName);
-// return;
-// }
-
- var keyFlag;
- switch (aEvent.type) {
- case "keydown":
- keyFlag = kKeyDownEvent;
- break;
- case "keypress":
- keyFlag = kKeyPressEvent;
- break;
- case "keyup":
- keyFlag = kKeyUpEvent;
- break;
- default:
- ok(false, "Unknown events: " + aEvent.type);
- return;
- }
- dispatchedKeyEvents |= keyFlag;
- is(keyFlag, expectedKeyEvents & keyFlag, aEvent.type + " fired: " + key);
- }
-
- var dataUri = 'data:text/html,<body style="height:10000px;"></body>';
-
- let loadedPromise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
- gBrowser.loadURI(dataUri);
- yield loadedPromise;
-
- yield SimpleTest.promiseFocus(gBrowser.selectedBrowser);
-
- window.addEventListener("keydown", onKey, false);
- window.addEventListener("keypress", onKey, false);
- window.addEventListener("keyup", onKey, false);
-
- // Test whether the key events are handled correctly under normal condition
- expectedKeyEvents = kAllKeyEvents;
- sendChar("A");
-
- // Start autoscrolling by middle button click on the page
- let shownPromise = BrowserTestUtils.waitForEvent(window, "popupshown", false,
- event => event.originalTarget.className == "autoscroller");
- yield BrowserTestUtils.synthesizeMouseAtPoint(10, 10, { button: 1 },
- gBrowser.selectedBrowser);
- yield shownPromise;
-
- // Most key events should be eaten by the browser.
- expectedKeyEvents = kNoKeyEvents;
- sendChar("A");
- sendKey("DOWN");
- sendKey("RETURN");
- sendKey("RETURN");
- sendKey("HOME");
- sendKey("END");
- sendKey("TAB");
- sendKey("RETURN");
-
- // Finish autoscrolling by ESC key. Note that only keydown and keypress
- // events are eaten because keyup event is fired *after* the autoscrolling
- // is finished.
- expectedKeyEvents = kKeyUpEvent;
- sendKey("ESCAPE");
-
- // Test whether the key events are handled correctly under normal condition
- expectedKeyEvents = kAllKeyEvents;
- sendChar("A");
-
- window.removeEventListener("keydown", onKey, false);
- window.removeEventListener("keypress", onKey, false);
- window.removeEventListener("keyup", onKey, false);
-
- // restore the changed prefs
- if (Services.prefs.prefHasUserValue(kPrefName_AutoScroll))
- Services.prefs.clearUserPref(kPrefName_AutoScroll);
-
- finish();
-});
diff --git a/toolkit/content/tests/browser/browser_label_textlink.js b/toolkit/content/tests/browser/browser_label_textlink.js
deleted file mode 100644
index 861086707e..0000000000
--- a/toolkit/content/tests/browser/browser_label_textlink.js
+++ /dev/null
@@ -1,38 +0,0 @@
-add_task(function* () {
- yield BrowserTestUtils.withNewTab({gBrowser, url: "about:config"}, function*(browser) {
- let newTabURL = "http://www.example.com/";
- yield ContentTask.spawn(browser, newTabURL, function*(newTabURL) {
- let doc = content.document;
- let label = doc.createElement("label");
- label.href = newTabURL;
- label.id = "textlink-test";
- label.className = "text-link";
- label.textContent = "click me";
- doc.documentElement.append(label);
- });
-
- // Test that click will open tab in foreground.
- let awaitNewTab = BrowserTestUtils.waitForNewTab(gBrowser, newTabURL);
- yield BrowserTestUtils.synthesizeMouseAtCenter("#textlink-test", {}, browser);
- let newTab = yield awaitNewTab;
- is(newTab.linkedBrowser, gBrowser.selectedBrowser, "selected tab should be example page");
- yield BrowserTestUtils.removeTab(gBrowser.selectedTab);
-
- // Test that ctrl+shift+click/meta+shift+click will open tab in background.
- awaitNewTab = BrowserTestUtils.waitForNewTab(gBrowser, newTabURL);
- yield BrowserTestUtils.synthesizeMouseAtCenter("#textlink-test",
- {ctrlKey: true, metaKey: true, shiftKey: true},
- browser);
- yield awaitNewTab;
- is(gBrowser.selectedBrowser, browser, "selected tab should be original tab");
- yield BrowserTestUtils.removeTab(gBrowser.tabs[gBrowser.tabs.length - 1]);
-
- // Middle-clicking should open tab in foreground.
- awaitNewTab = BrowserTestUtils.waitForNewTab(gBrowser, newTabURL);
- yield BrowserTestUtils.synthesizeMouseAtCenter("#textlink-test",
- {button: 1}, browser);
- newTab = yield awaitNewTab;
- is(newTab.linkedBrowser, gBrowser.selectedBrowser, "selected tab should be example page");
- yield BrowserTestUtils.removeTab(gBrowser.tabs[gBrowser.tabs.length - 1]);
- });
-});
diff --git a/toolkit/content/tests/browser/browser_mediaPlayback.js b/toolkit/content/tests/browser/browser_mediaPlayback.js
deleted file mode 100644
index 1a6ebfcb83..0000000000
--- a/toolkit/content/tests/browser/browser_mediaPlayback.js
+++ /dev/null
@@ -1,30 +0,0 @@
-const PAGE = "https://example.com/browser/toolkit/content/tests/browser/file_mediaPlayback.html";
-const FRAME = "https://example.com/browser/toolkit/content/tests/browser/file_mediaPlaybackFrame.html";
-
-function wait_for_event(browser, event) {
- return BrowserTestUtils.waitForEvent(browser, event, false, (event) => {
- is(event.originalTarget, browser, "Event must be dispatched to correct browser.");
- ok(!event.cancelable, "The event should not be cancelable");
- return true;
- });
-}
-
-function* test_on_browser(url, browser) {
- browser.loadURI(url);
- yield wait_for_event(browser, "DOMAudioPlaybackStarted");
- yield wait_for_event(browser, "DOMAudioPlaybackStopped");
-}
-
-add_task(function* test_page() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "about:blank",
- }, test_on_browser.bind(undefined, PAGE));
-});
-
-add_task(function* test_frame() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "about:blank",
- }, test_on_browser.bind(undefined, FRAME));
-});
diff --git a/toolkit/content/tests/browser/browser_mediaPlayback_mute.js b/toolkit/content/tests/browser/browser_mediaPlayback_mute.js
deleted file mode 100644
index 852fc56fb1..0000000000
--- a/toolkit/content/tests/browser/browser_mediaPlayback_mute.js
+++ /dev/null
@@ -1,104 +0,0 @@
-const PAGE = "https://example.com/browser/toolkit/content/tests/browser/file_mediaPlayback2.html";
-const FRAME = "https://example.com/browser/toolkit/content/tests/browser/file_mediaPlaybackFrame2.html";
-
-function wait_for_event(browser, event) {
- return BrowserTestUtils.waitForEvent(browser, event, false, (event) => {
- is(event.originalTarget, browser, "Event must be dispatched to correct browser.");
- return true;
- });
-}
-
-function* test_audio_in_browser() {
- function get_audio_element() {
- var doc = content.document;
- var list = doc.getElementsByTagName('audio');
- if (list.length == 1) {
- return list[0];
- }
-
- // iframe?
- list = doc.getElementsByTagName('iframe');
-
- var iframe = list[0];
- list = iframe.contentDocument.getElementsByTagName('audio');
- return list[0];
- }
-
- var audio = get_audio_element();
- return {
- computedVolume: audio.computedVolume,
- computedMuted: audio.computedMuted
- }
-}
-
-function* test_on_browser(url, browser) {
- browser.loadURI(url);
- yield wait_for_event(browser, "DOMAudioPlaybackStarted");
-
- var result = yield ContentTask.spawn(browser, null, test_audio_in_browser);
- is(result.computedVolume, 1, "Audio volume is 1");
- is(result.computedMuted, false, "Audio is not muted");
-
- ok(!browser.audioMuted, "Audio should not be muted by default");
- browser.mute();
- ok(browser.audioMuted, "Audio should be muted now");
-
- yield wait_for_event(browser, "DOMAudioPlaybackStopped");
-
- result = yield ContentTask.spawn(browser, null, test_audio_in_browser);
- is(result.computedVolume, 0, "Audio volume is 0 when muted");
- is(result.computedMuted, true, "Audio is muted");
-}
-
-function* test_visibility(url, browser) {
- browser.loadURI(url);
- yield wait_for_event(browser, "DOMAudioPlaybackStarted");
-
- var result = yield ContentTask.spawn(browser, null, test_audio_in_browser);
- is(result.computedVolume, 1, "Audio volume is 1");
- is(result.computedMuted, false, "Audio is not muted");
-
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "about:blank",
- }, function() {});
-
- ok(!browser.audioMuted, "Audio should not be muted by default");
- browser.mute();
- ok(browser.audioMuted, "Audio should be muted now");
-
- yield wait_for_event(browser, "DOMAudioPlaybackStopped");
-
- result = yield ContentTask.spawn(browser, null, test_audio_in_browser);
- is(result.computedVolume, 0, "Audio volume is 0 when muted");
- is(result.computedMuted, true, "Audio is muted");
-}
-
-add_task(function*() {
- yield new Promise((resolve) => {
- SpecialPowers.pushPrefEnv({"set": [
- ["media.useAudioChannelService.testing", true]
- ]}, resolve);
- });
-});
-
-add_task(function* test_page() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "about:blank",
- }, test_on_browser.bind(undefined, PAGE));
-});
-
-add_task(function* test_frame() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "about:blank",
- }, test_on_browser.bind(undefined, FRAME));
-});
-
-add_task(function* test_frame() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "about:blank",
- }, test_visibility.bind(undefined, PAGE));
-});
diff --git a/toolkit/content/tests/browser/browser_mediaPlayback_suspended.js b/toolkit/content/tests/browser/browser_mediaPlayback_suspended.js
deleted file mode 100644
index ef8bb9dc82..0000000000
--- a/toolkit/content/tests/browser/browser_mediaPlayback_suspended.js
+++ /dev/null
@@ -1,191 +0,0 @@
-const PAGE = "https://example.com/browser/toolkit/content/tests/browser/file_mediaPlayback2.html";
-
-var SuspendedType = {
- NONE_SUSPENDED : 0,
- SUSPENDED_PAUSE : 1,
- SUSPENDED_BLOCK : 2,
- SUSPENDED_PAUSE_DISPOSABLE : 3
-};
-
-function wait_for_event(browser, event) {
- return BrowserTestUtils.waitForEvent(browser, event, false, (event) => {
- is(event.originalTarget, browser, "Event must be dispatched to correct browser.");
- return true;
- });
-}
-
-function check_audio_onplay() {
- var list = content.document.getElementsByTagName('audio');
- if (list.length != 1) {
- ok(false, "There should be only one audio element in page!")
- }
-
- var audio = list[0];
- return new Promise((resolve, reject) => {
- audio.onplay = () => {
- ok(needToReceiveOnPlay, "Should not receive play event!");
- this.onplay = null;
- reject();
- };
-
- audio.pause();
- audio.play();
-
- setTimeout(() => {
- ok(true, "Doesn't receive play event when media was blocked.");
- audio.onplay = null;
- resolve();
- }, 1000)
- });
-}
-
-function check_audio_suspended(suspendedType) {
- var list = content.document.getElementsByTagName('audio');
- if (list.length != 1) {
- ok(false, "There should be only one audio element in page!")
- }
-
- var audio = list[0];
- is(audio.computedSuspended, suspendedType,
- "The suspended state of MediaElement is correct.");
-}
-
-function check_audio_pause_state(expectedPauseState) {
- var list = content.document.getElementsByTagName('audio');
- if (list.length != 1) {
- ok(false, "There should be only one audio element in page!")
- }
-
- var audio = list[0];
- if (expectedPauseState) {
- is(audio.paused, true, "Audio is paused correctly.");
- } else {
- is(audio.paused, false, "Audio is resumed correctly.");
- }
-}
-
-function* suspended_pause(url, browser) {
- info("### Start test for suspended-pause ###");
- browser.loadURI(url);
-
- info("- page should have playing audio -");
- yield wait_for_event(browser, "DOMAudioPlaybackStarted");
-
- info("- the suspended state of audio should be non-suspened -");
- yield ContentTask.spawn(browser, SuspendedType.NONE_SUSPENDED,
- check_audio_suspended);
-
- info("- pause playing audio -");
- browser.pauseMedia(false /* non-disposable */);
- yield ContentTask.spawn(browser, true /* expect for pause */,
- check_audio_pause_state);
- yield ContentTask.spawn(browser, SuspendedType.SUSPENDED_PAUSE,
- check_audio_suspended);
-
- info("- resume paused audio -");
- browser.resumeMedia();
- yield ContentTask.spawn(browser, false /* expect for playing */,
- check_audio_pause_state);
- yield ContentTask.spawn(browser, SuspendedType.NONE_SUSPENDED,
- check_audio_suspended);
-}
-
-function* suspended_pause_disposable(url, browser) {
- info("### Start test for suspended-pause-disposable ###");
- browser.loadURI(url);
-
- info("- page should have playing audio -");
- yield wait_for_event(browser, "DOMAudioPlaybackStarted");
-
- info("- the suspended state of audio should be non-suspened -");
- yield ContentTask.spawn(browser, SuspendedType.NONE_SUSPENDED,
- check_audio_suspended);
-
- info("- pause playing audio -");
- browser.pauseMedia(true /* disposable */);
- yield ContentTask.spawn(browser, true /* expect for pause */,
- check_audio_pause_state);
- yield ContentTask.spawn(browser, SuspendedType.SUSPENDED_PAUSE_DISPOSABLE,
- check_audio_suspended);
-
- info("- resume paused audio -");
- browser.resumeMedia();
- yield ContentTask.spawn(browser, false /* expect for playing */,
- check_audio_pause_state);
- yield ContentTask.spawn(browser, SuspendedType.NONE_SUSPENDED,
- check_audio_suspended);
-}
-
-function* suspended_stop_disposable(url, browser) {
- info("### Start test for suspended-stop-disposable ###");
- browser.loadURI(url);
-
- info("- page should have playing audio -");
- yield wait_for_event(browser, "DOMAudioPlaybackStarted");
-
- info("- the suspended state of audio should be non-suspened -");
- yield ContentTask.spawn(browser, SuspendedType.NONE_SUSPENDED,
- check_audio_suspended);
-
- info("- stop playing audio -");
- browser.stopMedia();
- yield wait_for_event(browser, "DOMAudioPlaybackStopped");
- yield ContentTask.spawn(browser, SuspendedType.NONE_SUSPENDED,
- check_audio_suspended);
-}
-
-function* suspended_block(url, browser) {
- info("### Start test for suspended-block ###");
- browser.loadURI(url);
-
- info("- page should have playing audio -");
- yield wait_for_event(browser, "DOMAudioPlaybackStarted");
-
- info("- block playing audio -");
- browser.blockMedia();
- yield ContentTask.spawn(browser, SuspendedType.SUSPENDED_BLOCK,
- check_audio_suspended);
- yield ContentTask.spawn(browser, null,
- check_audio_onplay);
-
- info("- resume blocked audio -");
- browser.resumeMedia();
- yield ContentTask.spawn(browser, SuspendedType.NONE_SUSPENDED,
- check_audio_suspended);
-}
-
-add_task(function* setup_test_preference() {
- yield new Promise(resolve => {
- SpecialPowers.pushPrefEnv({"set": [
- ["media.useAudioChannelService.testing", true]
- ]}, resolve);
- });
-});
-
-add_task(function* test_suspended_pause() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "about:blank"
- }, suspended_pause.bind(this, PAGE));
-});
-
-add_task(function* test_suspended_pause_disposable() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "about:blank"
- }, suspended_pause_disposable.bind(this, PAGE));
-});
-
-add_task(function* test_suspended_stop_disposable() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "about:blank"
- }, suspended_stop_disposable.bind(this, PAGE));
-});
-
-add_task(function* test_suspended_block() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "about:blank"
- }, suspended_block.bind(this, PAGE));
-});
diff --git a/toolkit/content/tests/browser/browser_mediaPlayback_suspended_multipleAudio.js b/toolkit/content/tests/browser/browser_mediaPlayback_suspended_multipleAudio.js
deleted file mode 100644
index 12e2ec0774..0000000000
--- a/toolkit/content/tests/browser/browser_mediaPlayback_suspended_multipleAudio.js
+++ /dev/null
@@ -1,311 +0,0 @@
-const PAGE = "https://example.com/browser/toolkit/content/tests/browser/file_multipleAudio.html";
-
-var SuspendedType = {
- NONE_SUSPENDED : 0,
- SUSPENDED_PAUSE : 1,
- SUSPENDED_BLOCK : 2,
- SUSPENDED_PAUSE_DISPOSABLE : 3
-};
-
-function wait_for_event(browser, event) {
- return BrowserTestUtils.waitForEvent(browser, event, false, (event) => {
- is(event.originalTarget, browser, "Event must be dispatched to correct browser.");
- return true;
- });
-}
-
-function check_all_audio_suspended(suspendedType) {
- var autoPlay = content.document.getElementById('autoplay');
- var nonAutoPlay = content.document.getElementById('nonautoplay');
- if (!autoPlay || !nonAutoPlay) {
- ok(false, "Can't get the audio element!");
- }
-
- is(autoPlay.computedSuspended, suspendedType,
- "The suspeded state of autoplay audio is correct.");
- is(nonAutoPlay.computedSuspended, suspendedType,
- "The suspeded state of non-autoplay audio is correct.");
-}
-
-function check_autoplay_audio_suspended(suspendedType) {
- var autoPlay = content.document.getElementById('autoplay');
- if (!autoPlay) {
- ok(false, "Can't get the audio element!");
- }
-
- is(autoPlay.computedSuspended, suspendedType,
- "The suspeded state of autoplay audio is correct.");
-}
-
-function check_nonautoplay_audio_suspended(suspendedType) {
- var nonAutoPlay = content.document.getElementById('nonautoplay');
- if (!nonAutoPlay) {
- ok(false, "Can't get the audio element!");
- }
-
- is(nonAutoPlay.computedSuspended, suspendedType,
- "The suspeded state of non-autoplay audio is correct.");
-}
-
-function check_autoplay_audio_pause_state(expectedPauseState) {
- var autoPlay = content.document.getElementById('autoplay');
- if (!autoPlay) {
- ok(false, "Can't get the audio element!");
- }
-
- if (autoPlay.paused == expectedPauseState) {
- if (expectedPauseState) {
- ok(true, "Audio is paused correctly.");
- } else {
- ok(true, "Audio is resumed correctly.");
- }
- } else if (expectedPauseState) {
- autoPlay.onpause = function () {
- autoPlay.onpause = null;
- ok(true, "Audio is paused correctly, checking from onpause.");
- }
- } else {
- autoPlay.onplay = function () {
- autoPlay.onplay = null;
- ok(true, "Audio is resumed correctly, checking from onplay.");
- }
- }
-}
-
-function play_nonautoplay_audio_should_be_paused() {
- var nonAutoPlay = content.document.getElementById('nonautoplay');
- if (!nonAutoPlay) {
- ok(false, "Can't get the audio element!");
- }
-
- nonAutoPlay.play();
- return new Promise(resolve => {
- nonAutoPlay.onpause = function () {
- nonAutoPlay.onpause = null;
- is(nonAutoPlay.ended, false, "Audio can't be playback.");
- resolve();
- }
- });
-}
-
-function all_audio_onresume() {
- var autoPlay = content.document.getElementById('autoplay');
- var nonAutoPlay = content.document.getElementById('nonautoplay');
- if (!autoPlay || !nonAutoPlay) {
- ok(false, "Can't get the audio element!");
- }
-
- is(autoPlay.paused, false, "Autoplay audio is resumed.");
- is(nonAutoPlay.paused, false, "Non-AutoPlay audio is resumed.");
-}
-
-function all_audio_onpause() {
- var autoPlay = content.document.getElementById('autoplay');
- var nonAutoPlay = content.document.getElementById('nonautoplay');
- if (!autoPlay || !nonAutoPlay) {
- ok(false, "Can't get the audio element!");
- }
-
- is(autoPlay.paused, true, "Autoplay audio is paused.");
- is(nonAutoPlay.paused, true, "Non-AutoPlay audio is paused.");
-}
-
-function play_nonautoplay_audio_should_play_until_ended() {
- var nonAutoPlay = content.document.getElementById('nonautoplay');
- if (!nonAutoPlay) {
- ok(false, "Can't get the audio element!");
- }
-
- nonAutoPlay.play();
- return new Promise(resolve => {
- nonAutoPlay.onended = function () {
- nonAutoPlay.onended = null;
- ok(true, "Audio can be playback until ended.");
- resolve();
- }
- });
-}
-
-function no_audio_resumed() {
- var autoPlay = content.document.getElementById('autoplay');
- var nonAutoPlay = content.document.getElementById('nonautoplay');
- if (!autoPlay || !nonAutoPlay) {
- ok(false, "Can't get the audio element!");
- }
-
- is(autoPlay.paused && nonAutoPlay.paused, true, "No audio was resumed.");
-}
-
-function play_nonautoplay_audio_should_be_blocked(suspendedType) {
- var nonAutoPlay = content.document.getElementById('nonautoplay');
- if (!nonAutoPlay) {
- ok(false, "Can't get the audio element!");
- }
-
- nonAutoPlay.play();
- ok(nonAutoPlay.paused, "The blocked audio can't be playback.");
-}
-
-function* suspended_pause(url, browser) {
- info("### Start test for suspended-pause ###");
- browser.loadURI(url);
-
- info("- page should have playing audio -");
- yield wait_for_event(browser, "DOMAudioPlaybackStarted");
-
- info("- the default suspended state of all audio should be non-suspened-");
- yield ContentTask.spawn(browser, SuspendedType.NONE_SUSPENDED,
- check_all_audio_suspended);
-
- info("- pause all audio in the page -");
- browser.pauseMedia(false /* non-disposable */);
- yield ContentTask.spawn(browser, true /* expect for pause */,
- check_autoplay_audio_pause_state);
- yield ContentTask.spawn(browser, SuspendedType.SUSPENDED_PAUSE,
- check_autoplay_audio_suspended);
- yield ContentTask.spawn(browser, SuspendedType.NONE_SUSPENDED,
- check_nonautoplay_audio_suspended);
-
- info("- no audio can be playback during suspended-paused -");
- yield ContentTask.spawn(browser, null,
- play_nonautoplay_audio_should_be_paused);
- yield ContentTask.spawn(browser, SuspendedType.SUSPENDED_PAUSE,
- check_nonautoplay_audio_suspended);
-
- info("- both audio should be resumed at the same time -");
- browser.resumeMedia();
- yield ContentTask.spawn(browser, null,
- all_audio_onresume);
- yield ContentTask.spawn(browser, SuspendedType.NONE_SUSPENDED,
- check_all_audio_suspended);
-
- info("- both audio should be paused at the same time -");
- browser.pauseMedia(false /* non-disposable */);
- yield ContentTask.spawn(browser, null, all_audio_onpause);
-}
-
-function* suspended_pause_disposable(url, browser) {
- info("### Start test for suspended-pause-disposable ###");
- browser.loadURI(url);
-
- info("- page should have playing audio -");
- yield wait_for_event(browser, "DOMAudioPlaybackStarted");
-
- info("- the default suspended state of all audio should be non-suspened -");
- yield ContentTask.spawn(browser, SuspendedType.NONE_SUSPENDED,
- check_all_audio_suspended);
-
- info("- only pause playing audio in the page -");
- browser.pauseMedia(true /* non-disposable */);
- yield ContentTask.spawn(browser, true /* expect for pause */,
- check_autoplay_audio_pause_state);
- yield ContentTask.spawn(browser, SuspendedType.SUSPENDED_PAUSE_DISPOSABLE,
- check_autoplay_audio_suspended);
- yield ContentTask.spawn(browser, SuspendedType.NONE_SUSPENDED,
- check_nonautoplay_audio_suspended);
-
- info("- new playing audio should be playback correctly -");
- yield ContentTask.spawn(browser, null,
- play_nonautoplay_audio_should_play_until_ended);
-
- info("- should only resume one audio -");
- browser.resumeMedia();
- yield ContentTask.spawn(browser, false /* expect for playing */,
- check_autoplay_audio_pause_state);
- yield ContentTask.spawn(browser, SuspendedType.NONE_SUSPENDED,
- check_all_audio_suspended);
-}
-
-function* suspended_stop_disposable(url, browser) {
- info("### Start test for suspended-stop-disposable ###");
- browser.loadURI(url);
-
- info("- page should have playing audio -");
- yield wait_for_event(browser, "DOMAudioPlaybackStarted");
-
- info("- the default suspended state of all audio should be non-suspened -");
- yield ContentTask.spawn(browser, SuspendedType.NONE_SUSPENDED,
- check_all_audio_suspended);
-
- info("- only stop playing audio in the page -");
- browser.stopMedia();
- yield wait_for_event(browser, "DOMAudioPlaybackStopped");
- yield ContentTask.spawn(browser, true /* expect for pause */,
- check_autoplay_audio_pause_state);
- yield ContentTask.spawn(browser, SuspendedType.NONE_SUSPENDED,
- check_all_audio_suspended);
-
- info("- new playing audio should be playback correctly -");
- yield ContentTask.spawn(browser, null,
- play_nonautoplay_audio_should_play_until_ended);
-
- info("- no any audio can be resumed by page -");
- browser.resumeMedia();
- yield ContentTask.spawn(browser, null, no_audio_resumed);
- yield ContentTask.spawn(browser, SuspendedType.NONE_SUSPENDED,
- check_all_audio_suspended);
-}
-
-function* suspended_block(url, browser) {
- info("### Start test for suspended-block ###");
- browser.loadURI(url);
-
- info("- page should have playing audio -");
- yield wait_for_event(browser, "DOMAudioPlaybackStarted");
-
- info("- the default suspended state of all audio should be non-suspened-");
- yield ContentTask.spawn(browser, SuspendedType.NONE_SUSPENDED,
- check_all_audio_suspended);
-
- info("- block autoplay audio -");
- browser.blockMedia();
- yield ContentTask.spawn(browser, SuspendedType.SUSPENDED_BLOCK,
- check_autoplay_audio_suspended);
- yield ContentTask.spawn(browser, SuspendedType.NONE_SUSPENDED,
- check_nonautoplay_audio_suspended);
-
- info("- no audio can be playback during suspended-block -");
- yield ContentTask.spawn(browser, SuspendedType.SUSPENDED_BLOCK,
- play_nonautoplay_audio_should_be_blocked);
-
- info("- both audio should be resumed at the same time -");
- browser.resumeMedia();
- yield ContentTask.spawn(browser, SuspendedType.NONE_SUSPENDED,
- check_all_audio_suspended);
-}
-
-add_task(function* setup_test_preference() {
- yield new Promise(resolve => {
- SpecialPowers.pushPrefEnv({"set": [
- ["media.useAudioChannelService.testing", true]
- ]}, resolve);
- });
-});
-
-add_task(function* test_suspended_pause() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "about:blank"
- }, suspended_pause.bind(this, PAGE));
-});
-
-add_task(function* test_suspended_pause_disposable() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "about:blank"
- }, suspended_pause_disposable.bind(this, PAGE));
-});
-
-add_task(function* test_suspended_stop_disposable() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "about:blank"
- }, suspended_stop_disposable.bind(this, PAGE));
-});
-
-add_task(function* test_suspended_block() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: "about:blank"
- }, suspended_block.bind(this, PAGE));
-});
diff --git a/toolkit/content/tests/browser/browser_mute.js b/toolkit/content/tests/browser/browser_mute.js
deleted file mode 100644
index f4829b8082..0000000000
--- a/toolkit/content/tests/browser/browser_mute.js
+++ /dev/null
@@ -1,16 +0,0 @@
-const PAGE = "data:text/html,page";
-
-function* test_on_browser(browser) {
- ok(!browser.audioMuted, "Audio should not be muted by default");
- browser.mute();
- ok(browser.audioMuted, "Audio should be muted now");
- browser.unmute();
- ok(!browser.audioMuted, "Audio should be unmuted now");
-}
-
-add_task(function*() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: PAGE,
- }, test_on_browser);
-});
diff --git a/toolkit/content/tests/browser/browser_mute2.js b/toolkit/content/tests/browser/browser_mute2.js
deleted file mode 100644
index 38f415b71b..0000000000
--- a/toolkit/content/tests/browser/browser_mute2.js
+++ /dev/null
@@ -1,26 +0,0 @@
-const PAGE = "data:text/html,page";
-
-function* test_on_browser(browser) {
- ok(!browser.audioMuted, "Audio should not be muted by default");
- browser.mute();
- ok(browser.audioMuted, "Audio should be muted now");
-
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: PAGE,
- }, test_on_browser2);
-
- browser.unmute();
- ok(!browser.audioMuted, "Audio should be unmuted now");
-}
-
-function* test_on_browser2(browser) {
- ok(!browser.audioMuted, "Audio should not be muted by default");
-}
-
-add_task(function*() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: PAGE,
- }, test_on_browser);
-});
diff --git a/toolkit/content/tests/browser/browser_quickfind_editable.js b/toolkit/content/tests/browser/browser_quickfind_editable.js
deleted file mode 100644
index d4ab597448..0000000000
--- a/toolkit/content/tests/browser/browser_quickfind_editable.js
+++ /dev/null
@@ -1,47 +0,0 @@
-const PAGE = "data:text/html,<div contenteditable>foo</div><input><textarea></textarea>";
-const DESIGNMODE_PAGE = "data:text/html,<body onload='document.designMode=\"on\";'>";
-const HOTKEYS = ["/", "'"];
-
-function* test_hotkeys(browser, expected) {
- let findbar = gBrowser.getFindBar();
- for (let key of HOTKEYS) {
- is(findbar.hidden, true, "findbar is hidden");
- yield BrowserTestUtils.sendChar(key, gBrowser.selectedBrowser);
- is(findbar.hidden, expected, "findbar should" + (expected ? "" : " not") + " be hidden");
- if (!expected) {
- yield closeFindbarAndWait(findbar);
- }
- }
-}
-
-function* focus_element(browser, query) {
- yield ContentTask.spawn(browser, query, function* focus(query) {
- let element = content.document.querySelector(query);
- element.focus();
- });
-}
-
-add_task(function* test_hotkey_on_editable_element() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: PAGE
- }, function* do_tests(browser) {
- yield test_hotkeys(browser, false);
- const ELEMENTS = ["div", "input", "textarea"];
- for (let elem of ELEMENTS) {
- yield focus_element(browser, elem);
- yield test_hotkeys(browser, true);
- yield focus_element(browser, ":root");
- yield test_hotkeys(browser, false);
- }
- });
-});
-
-add_task(function* test_hotkey_on_designMode_document() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: DESIGNMODE_PAGE
- }, function* do_tests(browser) {
- yield test_hotkeys(browser, true);
- });
-});
diff --git a/toolkit/content/tests/browser/browser_saveImageURL.js b/toolkit/content/tests/browser/browser_saveImageURL.js
deleted file mode 100644
index 75e1cfdcdb..0000000000
--- a/toolkit/content/tests/browser/browser_saveImageURL.js
+++ /dev/null
@@ -1,68 +0,0 @@
-"use strict";
-
-const IMAGE_PAGE = "https://example.com/browser/toolkit/content/tests/browser/image_page.html";
-const PREF_UNSAFE_FORBIDDEN = "dom.ipc.cpows.forbid-unsafe-from-browser";
-
-MockFilePicker.init(window);
-MockFilePicker.returnValue = MockFilePicker.returnCancel;
-
-registerCleanupFunction(function() {
- MockFilePicker.cleanup();
-});
-
-function waitForFilePicker() {
- return new Promise((resolve) => {
- MockFilePicker.showCallback = () => {
- MockFilePicker.showCallback = null;
- ok(true, "Saw the file picker");
- resolve();
- }
- })
-}
-
-/**
- * Test that saveImageURL works when we pass in the aIsContentWindowPrivate
- * argument instead of a document. This is the preferred API.
- */
-add_task(function* preferred_API() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: IMAGE_PAGE,
- }, function*(browser) {
- let url = yield ContentTask.spawn(browser, null, function*() {
- let image = content.document.getElementById("image");
- return image.href;
- });
-
- saveImageURL(url, "image.jpg", null, true, false, null, null, null, null, false);
- yield waitForFilePicker();
- });
-});
-
-/**
- * Test that saveImageURL will still work when passed a document instead
- * of the aIsContentWindowPrivate argument. This is the deprecated API, and
- * will not work in apps using remote browsers having PREF_UNSAFE_FORBIDDEN
- * set to true.
- */
-add_task(function* deprecated_API() {
- yield BrowserTestUtils.withNewTab({
- gBrowser,
- url: IMAGE_PAGE,
- }, function*(browser) {
- yield pushPrefs([PREF_UNSAFE_FORBIDDEN, false]);
-
- let url = yield ContentTask.spawn(browser, null, function*() {
- let image = content.document.getElementById("image");
- return image.href;
- });
-
- // Now get the document directly from content. If we run this test with
- // e10s-enabled, this will be a CPOW, which is forbidden. We'll just
- // pass the XUL document instead to test this interface.
- let doc = document;
-
- saveImageURL(url, "image.jpg", null, true, false, null, doc, null, null);
- yield waitForFilePicker();
- });
-});
diff --git a/toolkit/content/tests/browser/browser_save_resend_postdata.js b/toolkit/content/tests/browser/browser_save_resend_postdata.js
deleted file mode 100644
index 602a13d22b..0000000000
--- a/toolkit/content/tests/browser/browser_save_resend_postdata.js
+++ /dev/null
@@ -1,145 +0,0 @@
-/* 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/. */
-
-var MockFilePicker = SpecialPowers.MockFilePicker;
-MockFilePicker.init(window);
-
-/**
- * Test for bug 471962 <https://bugzilla.mozilla.org/show_bug.cgi?id=471962>:
- * When saving an inner frame as file only, the POST data of the outer page is
- * sent to the address of the inner page.
- *
- * Test for bug 485196 <https://bugzilla.mozilla.org/show_bug.cgi?id=485196>:
- * Web page generated by POST is retried as GET when Save Frame As used, and the
- * page is no longer in the cache.
- */
-function test() {
- waitForExplicitFinish();
-
- gBrowser.loadURI("http://mochi.test:8888/browser/toolkit/content/tests/browser/data/post_form_outer.sjs");
-
- gBrowser.addEventListener("pageshow", function pageShown(event) {
- if (event.target.location == "about:blank")
- return;
- gBrowser.removeEventListener("pageshow", pageShown);
-
- // Submit the form in the outer page, then wait for both the outer
- // document and the inner frame to be loaded again.
- gBrowser.addEventListener("DOMContentLoaded", handleOuterSubmit);
- gBrowser.contentDocument.getElementById("postForm").submit();
- });
-
- var framesLoaded = 0;
- var innerFrame;
-
- function handleOuterSubmit() {
- if (++framesLoaded < 2)
- return;
-
- gBrowser.removeEventListener("DOMContentLoaded", handleOuterSubmit);
-
- innerFrame = gBrowser.contentDocument.getElementById("innerFrame");
-
- // Submit the form in the inner page.
- gBrowser.addEventListener("DOMContentLoaded", handleInnerSubmit);
- innerFrame.contentDocument.getElementById("postForm").submit();
- }
-
- function handleInnerSubmit() {
- gBrowser.removeEventListener("DOMContentLoaded", handleInnerSubmit);
-
- // Create the folder the page will be saved into.
- var destDir = createTemporarySaveDirectory();
- var file = destDir.clone();
- file.append("no_default_file_name");
- MockFilePicker.returnFiles = [file];
- MockFilePicker.showCallback = function(fp) {
- MockFilePicker.filterIndex = 1; // kSaveAsType_URL
- };
-
- mockTransferCallback = onTransferComplete;
- mockTransferRegisterer.register();
-
- registerCleanupFunction(function () {
- mockTransferRegisterer.unregister();
- MockFilePicker.cleanup();
- destDir.remove(true);
- });
-
- var docToSave = innerFrame.contentDocument;
- // We call internalSave instead of saveDocument to bypass the history
- // cache.
- internalSave(docToSave.location.href, docToSave, null, null,
- docToSave.contentType, false, null, null,
- docToSave.referrer ? makeURI(docToSave.referrer) : null,
- docToSave, false, null);
- }
-
- function onTransferComplete(downloadSuccess) {
- ok(downloadSuccess, "The inner frame should have been downloaded successfully");
-
- // Read the entire saved file.
- var file = MockFilePicker.returnFiles[0];
- var fileContents = readShortFile(file);
-
- // Check if outer POST data is found (bug 471962).
- is(fileContents.indexOf("inputfield=outer"), -1,
- "The saved inner frame does not contain outer POST data");
-
- // Check if inner POST data is found (bug 485196).
- isnot(fileContents.indexOf("inputfield=inner"), -1,
- "The saved inner frame was generated using the correct POST data");
-
- finish();
- }
-}
-
-Cc["@mozilla.org/moz/jssubscript-loader;1"]
- .getService(Ci.mozIJSSubScriptLoader)
- .loadSubScript("chrome://mochitests/content/browser/toolkit/content/tests/browser/common/mockTransfer.js",
- this);
-
-function createTemporarySaveDirectory() {
- var saveDir = Cc["@mozilla.org/file/directory_service;1"]
- .getService(Ci.nsIProperties)
- .get("TmpD", Ci.nsIFile);
- saveDir.append("testsavedir");
- if (!saveDir.exists())
- saveDir.create(Ci.nsIFile.DIRECTORY_TYPE, 0o755);
- return saveDir;
-}
-
-/**
- * Reads the contents of the provided short file (up to 1 MiB).
- *
- * @param aFile
- * nsIFile object pointing to the file to be read.
- *
- * @return
- * String containing the raw octets read from the file.
- */
-function readShortFile(aFile) {
- var inputStream = Cc["@mozilla.org/network/file-input-stream;1"]
- .createInstance(Ci.nsIFileInputStream);
- inputStream.init(aFile, -1, 0, 0);
- try {
- var scrInputStream = Cc["@mozilla.org/scriptableinputstream;1"]
- .createInstance(Ci.nsIScriptableInputStream);
- scrInputStream.init(inputStream);
- try {
- // Assume that the file is much shorter than 1 MiB.
- return scrInputStream.read(1048576);
- }
- finally {
- // Close the scriptable stream after reading, even if the operation
- // failed.
- scrInputStream.close();
- }
- }
- finally {
- // Close the stream after reading, if it is still open, even if the read
- // operation failed.
- inputStream.close();
- }
-}
diff --git a/toolkit/content/tests/browser/common/mockTransfer.js b/toolkit/content/tests/browser/common/mockTransfer.js
deleted file mode 100644
index c8b8fc1616..0000000000
--- a/toolkit/content/tests/browser/common/mockTransfer.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/* 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/. */
-
-Cc["@mozilla.org/moz/jssubscript-loader;1"]
- .getService(Ci.mozIJSSubScriptLoader)
- .loadSubScript("chrome://mochikit/content/tests/SimpleTest/MockObjects.js", this);
-
-var mockTransferCallback;
-
-/**
- * This "transfer" object implementation continues the currently running test
- * when the download is completed, reporting true for success or false for
- * failure as the first argument of the testRunner.continueTest function.
- */
-function MockTransfer() {
- this._downloadIsSuccessful = true;
-}
-
-MockTransfer.prototype = {
- QueryInterface: XPCOMUtils.generateQI([
- Ci.nsIWebProgressListener,
- Ci.nsIWebProgressListener2,
- Ci.nsITransfer,
- ]),
-
- /* nsIWebProgressListener */
- onStateChange: function MTFC_onStateChange(aWebProgress, aRequest,
- aStateFlags, aStatus) {
- // If at least one notification reported an error, the download failed.
- if (!Components.isSuccessCode(aStatus))
- this._downloadIsSuccessful = false;
-
- // If the download is finished
- if ((aStateFlags & Ci.nsIWebProgressListener.STATE_STOP) &&
- (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK))
- // Continue the test, reporting the success or failure condition.
- mockTransferCallback(this._downloadIsSuccessful);
- },
- onProgressChange: function () {},
- onLocationChange: function () {},
- onStatusChange: function MTFC_onStatusChange(aWebProgress, aRequest, aStatus,
- aMessage) {
- // If at least one notification reported an error, the download failed.
- if (!Components.isSuccessCode(aStatus))
- this._downloadIsSuccessful = false;
- },
- onSecurityChange: function () {},
-
- /* nsIWebProgressListener2 */
- onProgressChange64: function () {},
- onRefreshAttempted: function () {},
-
- /* nsITransfer */
- init: function() {},
- setSha256Hash: function() {},
- setSignatureInfo: function() {}
-};
-
-// Create an instance of a MockObjectRegisterer whose methods can be used to
-// temporarily replace the default "@mozilla.org/transfer;1" object factory with
-// one that provides the mock implementation above. To activate the mock object
-// factory, call the "register" method. Starting from that moment, all the
-// transfer objects that are requested will be mock objects, until the
-// "unregister" method is called.
-var mockTransferRegisterer =
- new MockObjectRegisterer("@mozilla.org/transfer;1", MockTransfer);
diff --git a/toolkit/content/tests/browser/data/post_form_inner.sjs b/toolkit/content/tests/browser/data/post_form_inner.sjs
deleted file mode 100644
index ce72159d81..0000000000
--- a/toolkit/content/tests/browser/data/post_form_inner.sjs
+++ /dev/null
@@ -1,31 +0,0 @@
-/* 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/. */
-
-const CC = Components.Constructor;
-const BinaryInputStream = CC("@mozilla.org/binaryinputstream;1",
- "nsIBinaryInputStream",
- "setInputStream");
-
-function handleRequest(request, response)
-{
- var body =
- '<html>\
- <body>\
- Inner POST data: ';
-
- var bodyStream = new BinaryInputStream(request.bodyInputStream);
- var bytes = [], avail = 0;
- while ((avail = bodyStream.available()) > 0)
- body += String.fromCharCode.apply(String, bodyStream.readByteArray(avail));
-
- body +=
- '<form id="postForm" action="post_form_inner.sjs" method="post">\
- <input type="text" name="inputfield" value="inner">\
- <input type="submit">\
- </form>\
- </body>\
- </html>';
-
- response.bodyOutputStream.write(body, body.length);
-}
diff --git a/toolkit/content/tests/browser/data/post_form_outer.sjs b/toolkit/content/tests/browser/data/post_form_outer.sjs
deleted file mode 100644
index 89256fcfb2..0000000000
--- a/toolkit/content/tests/browser/data/post_form_outer.sjs
+++ /dev/null
@@ -1,34 +0,0 @@
-/* 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/. */
-
-const CC = Components.Constructor;
-const BinaryInputStream = CC("@mozilla.org/binaryinputstream;1",
- "nsIBinaryInputStream",
- "setInputStream");
-
-function handleRequest(request, response)
-{
- var body =
- '<html>\
- <body>\
- Outer POST data: ';
-
- var bodyStream = new BinaryInputStream(request.bodyInputStream);
- var bytes = [], avail = 0;
- while ((avail = bodyStream.available()) > 0)
- body += String.fromCharCode.apply(String, bodyStream.readByteArray(avail));
-
- body +=
- '<form id="postForm" action="post_form_outer.sjs" method="post">\
- <input type="text" name="inputfield" value="outer">\
- <input type="submit">\
- </form>\
- \
- <iframe id="innerFrame" src="post_form_inner.sjs" width="400" height="200">\
- \
- </body>\
- </html>';
-
- response.bodyOutputStream.write(body, body.length);
-}
diff --git a/toolkit/content/tests/browser/empty.png b/toolkit/content/tests/browser/empty.png
deleted file mode 100644
index 17ddf0c3ee..0000000000
--- a/toolkit/content/tests/browser/empty.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/content/tests/browser/file_contentTitle.html b/toolkit/content/tests/browser/file_contentTitle.html
deleted file mode 100644
index 8d330aa0f2..0000000000
--- a/toolkit/content/tests/browser/file_contentTitle.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<html>
-<head><title>Test Page</title></head>
-<body>
-<script type="text/javascript">
-dump("Script!\n");
-addEventListener("load", () => {
- // Trigger an onLocationChange event. We want to make sure the title is still correct afterwards.
- location.hash = "#x2";
- var event = new Event("TestLocationChange");
- document.dispatchEvent(event);
-}, false);
-</script>
-</body>
-</html>
diff --git a/toolkit/content/tests/browser/file_mediaPlayback.html b/toolkit/content/tests/browser/file_mediaPlayback.html
deleted file mode 100644
index 5df0bc1542..0000000000
--- a/toolkit/content/tests/browser/file_mediaPlayback.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<script type="text/javascript">
-var audio = new Audio();
-audio.oncanplay = function() {
- audio.oncanplay = null;
- audio.play();
-};
-audio.src = "audio.ogg";
-</script>
diff --git a/toolkit/content/tests/browser/file_mediaPlayback2.html b/toolkit/content/tests/browser/file_mediaPlayback2.html
deleted file mode 100644
index dffbd299b6..0000000000
--- a/toolkit/content/tests/browser/file_mediaPlayback2.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE html>
-<body>
-<script type="text/javascript">
-var audio = new Audio();
-audio.oncanplay = function() {
- audio.oncanplay = null;
- audio.play();
-};
-audio.src = "audio.ogg";
-document.body.appendChild(audio);
-</script>
-</body>
diff --git a/toolkit/content/tests/browser/file_mediaPlaybackFrame.html b/toolkit/content/tests/browser/file_mediaPlaybackFrame.html
deleted file mode 100644
index 119db62ecc..0000000000
--- a/toolkit/content/tests/browser/file_mediaPlaybackFrame.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<!DOCTYPE html>
-<iframe src="file_mediaPlayback.html"></iframe>
diff --git a/toolkit/content/tests/browser/file_mediaPlaybackFrame2.html b/toolkit/content/tests/browser/file_mediaPlaybackFrame2.html
deleted file mode 100644
index d96a4cd4e9..0000000000
--- a/toolkit/content/tests/browser/file_mediaPlaybackFrame2.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<!DOCTYPE html>
-<iframe src="file_mediaPlayback2.html"></iframe>
diff --git a/toolkit/content/tests/browser/file_multipleAudio.html b/toolkit/content/tests/browser/file_multipleAudio.html
deleted file mode 100644
index 5dc37febb4..0000000000
--- a/toolkit/content/tests/browser/file_multipleAudio.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<head>
- <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
- <meta content="utf-8" http-equiv="encoding">
-</head>
-<body>
-<audio id="autoplay" src="audio.ogg"></audio>
-<audio id="nonautoplay" src="audio.ogg"></audio>
-<script type="text/javascript">
-
-// In linux debug on try server, sometimes the download process would fail, so
-// we can't activate the "auto-play" or playing after receving "oncanplay".
-// Therefore, we just call play here.
-var audio = document.getElementById("autoplay");
-audio.loop = true;
-audio.play();
-
-</script>
-</body>
diff --git a/toolkit/content/tests/browser/file_multiplePlayingAudio.html b/toolkit/content/tests/browser/file_multiplePlayingAudio.html
deleted file mode 100644
index ae122506fb..0000000000
--- a/toolkit/content/tests/browser/file_multiplePlayingAudio.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE html>
-<head>
- <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
- <meta content="utf-8" http-equiv="encoding">
-</head>
-<body>
-<audio id="audio1" src="audio.ogg" controls></audio>
-<audio id="audio2" src="audio.ogg" controls></audio>
-<script type="text/javascript">
-
-// In linux debug on try server, sometimes the download process would fail, so
-// we can't activate the "auto-play" or playing after receving "oncanplay".
-// Therefore, we just call play here.
-var audio1 = document.getElementById("audio1");
-audio1.loop = true;
-audio1.play();
-
-var audio2 = document.getElementById("audio2");
-audio2.loop = true;
-audio2.play();
-
-</script>
-</body>
diff --git a/toolkit/content/tests/browser/file_redirect.html b/toolkit/content/tests/browser/file_redirect.html
deleted file mode 100644
index 4d5fa9dfd1..0000000000
--- a/toolkit/content/tests/browser/file_redirect.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<title>redirecting...</title>
-<script>
-window.addEventListener("load",
- () => window.location = "file_redirect_to.html");
-</script>
-<body>
-redirectin u bro
-</body>
-</html>
diff --git a/toolkit/content/tests/browser/file_redirect_to.html b/toolkit/content/tests/browser/file_redirect_to.html
deleted file mode 100644
index 28c0b53713..0000000000
--- a/toolkit/content/tests/browser/file_redirect_to.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<title>redirected!</title>
-<script>
-window.addEventListener("load", () => {
- var event = new Event("RedirectDone");
- document.dispatchEvent(event);
-});
-</script>
-<body>
-u got redirected, bro
-</body>
-</html>
diff --git a/toolkit/content/tests/browser/head.js b/toolkit/content/tests/browser/head.js
deleted file mode 100644
index d7ed7a9ff3..0000000000
--- a/toolkit/content/tests/browser/head.js
+++ /dev/null
@@ -1,123 +0,0 @@
-"use strict";
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "Promise",
- "resource://gre/modules/Promise.jsm");
-
-/**
- * A wrapper for the findbar's method "close", which is not synchronous
- * because of animation.
- */
-function closeFindbarAndWait(findbar) {
- return new Promise((resolve) => {
- if (findbar.hidden) {
- resolve();
- return;
- }
- findbar.addEventListener("transitionend", function cont(aEvent) {
- if (aEvent.propertyName != "visibility") {
- return;
- }
- findbar.removeEventListener("transitionend", cont);
- resolve();
- });
- findbar.close();
- });
-}
-
-function pushPrefs(...aPrefs) {
- let deferred = Promise.defer();
- SpecialPowers.pushPrefEnv({"set": aPrefs}, deferred.resolve);
- return deferred.promise;
-}
-
-/**
- * Helper class for testing datetime input picker widget
- */
-class DateTimeTestHelper {
- constructor() {
- this.panel = document.getElementById("DateTimePickerPanel");
- this.panel.setAttribute("animate", false);
- this.tab = null;
- this.frame = null;
- }
-
- /**
- * Opens a new tab with the URL of the test page, and make sure the picker is
- * ready for testing.
- *
- * @param {String} pageUrl
- */
- async openPicker(pageUrl) {
- this.tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, pageUrl);
- await BrowserTestUtils.synthesizeMouseAtCenter("input", {}, gBrowser.selectedBrowser);
- // If dateTimePopupFrame doesn't exist yet, wait for the binding to be attached
- if (!this.panel.dateTimePopupFrame) {
- await BrowserTestUtils.waitForEvent(this.panel, "DateTimePickerBindingReady")
- }
- this.frame = this.panel.dateTimePopupFrame;
- await this.waitForPickerReady();
- }
-
- async waitForPickerReady() {
- await BrowserTestUtils.waitForEvent(this.frame, "load", true);
- // Wait for picker elements to be ready
- await BrowserTestUtils.waitForEvent(this.frame.contentDocument, "PickerReady");
- }
-
- /**
- * Find an element on the picker.
- *
- * @param {String} selector
- * @return {DOMElement}
- */
- getElement(selector) {
- return this.frame.contentDocument.querySelector(selector);
- }
-
- /**
- * Find the children of an element on the picker.
- *
- * @param {String} selector
- * @return {Array<DOMElement>}
- */
- getChildren(selector) {
- return Array.from(this.getElement(selector).children);
- }
-
- /**
- * Click on an element
- *
- * @param {DOMElement} element
- */
- click(element) {
- EventUtils.synthesizeMouseAtCenter(element, {}, this.frame.contentWindow);
- }
-
- /**
- * Close the panel and the tab
- */
- async tearDown() {
- if (!this.panel.hidden) {
- let pickerClosePromise = new Promise(resolve => {
- this.panel.addEventListener("popuphidden", resolve, {once: true});
- });
- this.panel.hidePopup();
- this.panel.closePicker();
- await pickerClosePromise;
- }
- await BrowserTestUtils.removeTab(this.tab);
- this.tab = null;
- }
-
- /**
- * Clean up after tests. Remove the frame to prevent leak.
- */
- cleanup() {
- this.frame.remove();
- this.frame = null;
- this.panel.removeAttribute("animate");
- this.panel = null;
- }
-}
diff --git a/toolkit/content/tests/browser/image.jpg b/toolkit/content/tests/browser/image.jpg
deleted file mode 100644
index 5031808ad2..0000000000
--- a/toolkit/content/tests/browser/image.jpg
+++ /dev/null
Binary files differ
diff --git a/toolkit/content/tests/browser/image_page.html b/toolkit/content/tests/browser/image_page.html
deleted file mode 100644
index 522a1d8cf9..0000000000
--- a/toolkit/content/tests/browser/image_page.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<title>OHAI</title>
-<body>
-<img id="image" src="image.jpg" />
-</body>
-</html>
diff --git a/toolkit/content/tests/chrome/.eslintrc.js b/toolkit/content/tests/chrome/.eslintrc.js
deleted file mode 100644
index 2c669d844e..0000000000
--- a/toolkit/content/tests/chrome/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../testing/mochitest/chrome.eslintrc.js"
- ]
-};
diff --git a/toolkit/content/tests/chrome/RegisterUnregisterChrome.js b/toolkit/content/tests/chrome/RegisterUnregisterChrome.js
deleted file mode 100644
index 34f25d2f82..0000000000
--- a/toolkit/content/tests/chrome/RegisterUnregisterChrome.js
+++ /dev/null
@@ -1,161 +0,0 @@
-/* This code is mostly copied from chrome/test/unit/head_crtestutils.js */
-
-const NS_CHROME_MANIFESTS_FILE_LIST = "ChromeML";
-const XUL_CACHE_PREF = "nglayout.debug.disable_xul_cache";
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-
-var gDirSvc = Cc["@mozilla.org/file/directory_service;1"].
- getService(Ci.nsIDirectoryService).QueryInterface(Ci.nsIProperties);
-var gChromeReg = Cc["@mozilla.org/chrome/chrome-registry;1"].
- getService(Ci.nsIXULChromeRegistry);
-var gPrefs = Cc["@mozilla.org/preferences-service;1"].
- getService(Ci.nsIPrefBranch);
-
-// Create the temporary file in the profile, instead of in TmpD, because
-// we know the mochitest harness kills off the profile when it's done.
-function copyToTemporaryFile(f)
-{
- let tmpd = gDirSvc.get("ProfD", Ci.nsIFile);
- tmpf = tmpd.clone();
- tmpf.append("temp.manifest");
- tmpf.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0o600);
- tmpf.remove(false);
- f.copyTo(tmpd, tmpf.leafName);
- return tmpf;
-}
-
-function* dirIter(directory)
-{
- var ioSvc = Cc["@mozilla.org/network/io-service;1"].
- getService(Ci.nsIIOService);
- var testsDir = ioSvc.newURI(directory, null, null)
- .QueryInterface(Ci.nsIFileURL).file;
-
- let en = testsDir.directoryEntries;
- while (en.hasMoreElements()) {
- let file = en.getNext();
- yield file.QueryInterface(Ci.nsIFile);
- }
-}
-
-function getParent(path) {
- let lastSlash = path.lastIndexOf("/");
- if (lastSlash == -1) {
- lastSlash = path.lastIndexOf("\\");
- if (lastSlash == -1) {
- return "";
- }
- return '/' + path.substring(0, lastSlash).replace(/\\/g, '/');
- }
- return path.substring(0, lastSlash);
-}
-
-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, 0o777);
-
- let rootDir = getParent(path);
- if (rootDir == "") {
- return tmpdir;
- }
-
- // The SimpleTest directory is hidden
- var files = Array.from(dirIter('file://' + rootDir));
- for (f in files) {
- files[f].copyTo(tmpdir, "");
- }
- return tmpdir;
-
-}
-
-function convertChromeURI(chromeURI)
-{
- let uri = Cc["@mozilla.org/network/io-service;1"].
- getService(Ci.nsIIOService).newURI(chromeURI, null, null);
- return gChromeReg.convertChromeURL(uri);
-}
-
-function chromeURIToFile(chromeURI)
-{
- var jar = getJar(chromeURI);
- if (jar) {
- var tmpDir = extractJarToTmp(jar);
- let parts = chromeURI.split('/');
- if (parts[parts.length - 1] != '') {
- tmpDir.append(parts[parts.length - 1]);
- }
- return tmpDir;
- }
-
- 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.
-function createManifestTemporarily(tempDir, manifestText)
-{
- gPrefs.setBoolPref(XUL_CACHE_PREF, true);
-
- tempDir.append("temp.manifest");
-
- let foStream = Cc["@mozilla.org/network/file-output-stream;1"]
- .createInstance(Ci.nsIFileOutputStream);
- foStream.init(tempDir,
- 0x02 | 0x08 | 0x20, 0o664, 0); // write, create, truncate
- foStream.write(manifestText, manifestText.length);
- foStream.close();
- let tempfile = copyToTemporaryFile(tempDir);
-
- Components.manager.QueryInterface(Ci.nsIComponentRegistrar).
- autoRegister(tempfile);
-
- gChromeReg.refreshSkins();
-
- return function() {
- tempfile.fileSize = 0; // truncate the manifest
- gChromeReg.checkForNewChrome();
- gChromeReg.refreshSkins();
- gPrefs.clearUserPref(XUL_CACHE_PREF);
- }
-}
-
-// Register a chrome manifest temporarily and return a function which un-does
-// the registrarion when no longer needed.
-function registerManifestTemporarily(manifestURI)
-{
- gPrefs.setBoolPref(XUL_CACHE_PREF, true);
-
- let file = chromeURIToFile(manifestURI);
-
- let tempfile = copyToTemporaryFile(file);
- Components.manager.QueryInterface(Ci.nsIComponentRegistrar).
- autoRegister(tempfile);
-
- gChromeReg.refreshSkins();
-
- return function() {
- tempfile.fileSize = 0; // truncate the manifest
- gChromeReg.checkForNewChrome();
- gChromeReg.refreshSkins();
- gPrefs.clearUserPref(XUL_CACHE_PREF);
- }
-}
-
-function registerManifestPermanently(manifestURI)
-{
- var chromepath = chromeURIToFile(manifestURI);
-
- Components.manager.QueryInterface(Ci.nsIComponentRegistrar).
- autoRegister(chromepath);
- return chromepath;
-}
diff --git a/toolkit/content/tests/chrome/bug263683_window.xul b/toolkit/content/tests/chrome/bug263683_window.xul
deleted file mode 100644
index 46985a7adb..0000000000
--- a/toolkit/content/tests/chrome/bug263683_window.xul
+++ /dev/null
@@ -1,210 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- 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/. -->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-
-<window id="263683test"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- width="600"
- height="600"
- onload="SimpleTest.executeSoon(startTest);"
- title="263683 test">
-
- <script type="application/javascript"><![CDATA[
- const {interfaces: Ci, classes: Cc, results: Cr, utils: Cu} = Components;
- Cu.import("resource://gre/modules/AppConstants.jsm");
- Cu.import("resource://gre/modules/Task.jsm");
- Cu.import("resource://testing-common/BrowserTestUtils.jsm");
- Cu.import("resource://testing-common/ContentTask.jsm");
- ContentTask.setTestScope(window.opener.wrappedJSObject);
-
- var gPrefsvc = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
- var gFindBar = null;
- var gBrowser;
-
- var imports = ["SimpleTest", "ok", "info", "is"];
- for (var name of imports) {
- window[name] = window.opener.wrappedJSObject[name];
- }
-
- function startTest() {
- Task.spawn(function* () {
- gFindBar = document.getElementById("FindToolbar");
- for (let browserId of ["content", "content-remote"]) {
- yield startTestWithBrowser(browserId);
- }
- }).then(() => {
- window.close();
- SimpleTest.finish();
- });
- }
-
- function* startTestWithBrowser(browserId) {
- // We're bailing out when testing a remote browser on OSX 10.6, because it
- // fails permanently.
- if (browserId.endsWith("remote") && AppConstants.isPlatformAndVersionAtMost("macosx", 11)) {
- return;
- }
-
- info("Starting test with browser '" + browserId + "'");
- gBrowser = document.getElementById(browserId);
- gFindBar.browser = gBrowser;
- let promise = BrowserTestUtils.browserLoaded(gBrowser);
- gBrowser.loadURI('data:text/html,<h2>Text mozilla</h2><input id="inp" type="text" />');
- yield promise;
- yield onDocumentLoaded();
- }
-
- function toggleHighlightAndWait(highlight) {
- return new Promise(resolve => {
- let listener = {
- onHighlightFinished: function() {
- gFindBar.browser.finder.removeResultListener(listener);
- resolve();
- }
- };
- gFindBar.browser.finder.addResultListener(listener);
- gFindBar.toggleHighlight(highlight);
- });
- }
-
- function* onDocumentLoaded() {
- gFindBar.open();
- var search = "mozilla";
- gFindBar._findField.focus();
- gFindBar._findField.value = search;
- var matchCase = gFindBar.getElement("find-case-sensitive");
- if (matchCase.checked) {
- matchCase.doCommand();
- }
-
- yield toggleHighlightAndWait(true);
- gFindBar._find();
-
- yield ContentTask.spawn(gBrowser, { search }, function* (args) {
- let controller = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsISelectionDisplay)
- .QueryInterface(Ci.nsISelectionController);
- Assert.ok("SELECTION_FIND" in controller, "Correctly detects new selection type");
- let selection = controller.getSelection(controller.SELECTION_FIND);
-
- Assert.equal(selection.rangeCount, 1,
- "Correctly added a match to the selection type");
- Assert.equal(selection.getRangeAt(0).toString().toLowerCase(),
- args.search, "Added the correct match");
- });
-
- yield toggleHighlightAndWait(false);
-
- yield ContentTask.spawn(gBrowser, { search }, function* (args) {
- let controller = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsISelectionDisplay)
- .QueryInterface(Ci.nsISelectionController);
- let selection = controller.getSelection(controller.SELECTION_FIND);
- Assert.equal(selection.rangeCount, 0, "Correctly removed the range");
-
- let input = content.document.getElementById("inp");
- input.value = args.search;
- });
-
- yield toggleHighlightAndWait(true);
-
- yield ContentTask.spawn(gBrowser, { search }, function* (args) {
- let input = content.document.getElementById("inp");
- let inputController = input.editor.selectionController;
- let inputSelection = inputController.getSelection(inputController.SELECTION_FIND);
-
- Assert.equal(inputSelection.rangeCount, 1,
- "Correctly added a match from input to the selection type");
- Assert.equal(inputSelection.getRangeAt(0).toString().toLowerCase(),
- args.search, "Added the correct match");
- });
-
- yield toggleHighlightAndWait(false);
-
- yield ContentTask.spawn(gBrowser, null, function* () {
- let input = content.document.getElementById("inp");
- let inputController = input.editor.selectionController;
- let inputSelection = inputController.getSelection(inputController.SELECTION_FIND);
-
- Assert.equal(inputSelection.rangeCount, 0, "Correctly removed the range");
- });
-
- // For posterity, test iframes too.
-
- let promise = BrowserTestUtils.browserLoaded(gBrowser);
- gBrowser.loadURI('data:text/html,<h2>Text mozilla</h2><iframe id="leframe" ' +
- 'src="data:text/html,Text mozilla"></iframe>');
- yield promise;
-
- yield toggleHighlightAndWait(true);
-
- yield ContentTask.spawn(gBrowser, { search }, function* (args) {
- function getSelection(docShell) {
- let controller = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsISelectionDisplay)
- .QueryInterface(Ci.nsISelectionController);
- return controller.getSelection(controller.SELECTION_FIND);
- }
-
- let selection = getSelection(docShell);
- Assert.equal(selection.rangeCount, 1,
- "Correctly added a match to the selection type");
- Assert.equal(selection.getRangeAt(0).toString().toLowerCase(),
- args.search, "Added the correct match");
-
- // Check the iframe too:
- let frame = content.document.getElementById("leframe");
- // Hoops! Get the docShell first, then the selection.
- selection = getSelection(frame.contentWindow
- .QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIDocShell));
- Assert.equal(selection.rangeCount, 1,
- "Correctly added a match to the selection type");
- Assert.equal(selection.getRangeAt(0).toString().toLowerCase(),
- args.search, "Added the correct match");
- });
-
- yield toggleHighlightAndWait(false);
-
- let matches = gFindBar._foundMatches.value.match(/([\d]*)\sof\s([\d]*)/);
- is(matches[1], "2", "Found correct amount of matches")
-
- yield ContentTask.spawn(gBrowser, null, function* (args) {
- function getSelection(docShell) {
- let controller = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsISelectionDisplay)
- .QueryInterface(Ci.nsISelectionController);
- return controller.getSelection(controller.SELECTION_FIND);
- }
-
- let selection = getSelection(docShell);
- Assert.equal(selection.rangeCount, 0, "Correctly removed the range");
-
- // Check the iframe too:
- let frame = content.document.getElementById("leframe");
- // Hoops! Get the docShell first, then the selection.
- selection = getSelection(frame.contentWindow
- .QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIDocShell));
- Assert.equal(selection.rangeCount, 0, "Correctly removed the range");
-
- content.document.documentElement.focus();
- });
-
- gFindBar.close(true);
- }
- ]]></script>
-
- <browser type="content-primary" flex="1" id="content" src="about:blank"/>
- <browser type="content-primary" flex="1" id="content-remote" remote="true" src="about:blank"/>
- <findbar id="FindToolbar" browserid="content"/>
-</window>
diff --git a/toolkit/content/tests/chrome/bug304188_window.xul b/toolkit/content/tests/chrome/bug304188_window.xul
deleted file mode 100644
index 931fd5c735..0000000000
--- a/toolkit/content/tests/chrome/bug304188_window.xul
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- 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/. -->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- width="600"
- height="600"
- onload="onLoad();"
- title="FindbarTest for bug 304188 -
-find-menu appears in editor element which has had makeEditable() called but designMode not set">
-
- <script type="application/javascript"><![CDATA[
- const {interfaces: Ci, classes: Cc, results: Cr, utils: Cu} = Components;
- Cu.import("resource://gre/modules/Task.jsm");
- Cu.import("resource://testing-common/ContentTask.jsm");
- ContentTask.setTestScope(window.opener.wrappedJSObject);
-
- var gFindBar = null;
- var gBrowser;
-
- var imports = ["SimpleTest", "ok", "info"];
- for (var name of imports) {
- window[name] = window.opener.wrappedJSObject[name];
- }
-
- function onLoad() {
- Task.spawn(function* () {
- gFindBar = document.getElementById("FindToolbar");
- for (let browserId of ["content", "content-remote"]) {
- yield startTestWithBrowser(browserId);
- }
- }).then(() => {
- window.close();
- SimpleTest.finish();
- });
- }
-
- function* startTestWithBrowser(browserId) {
- info("Starting test with browser '" + browserId + "'");
- gBrowser = document.getElementById(browserId);
- gFindBar.browser = gBrowser;
- let promise = ContentTask.spawn(gBrowser, null, function* () {
- return new Promise(resolve => {
- addEventListener("DOMContentLoaded", function listener() {
- removeEventListener("DOMContentLoaded", listener);
- resolve();
- });
- });
- });
- gBrowser.loadURI("data:text/html;charset=utf-8,some%20random%20text");
- yield promise;
- yield onDocumentLoaded();
- }
-
- function* onDocumentLoaded() {
- yield ContentTask.spawn(gBrowser, null, function* () {
- var edsession = content.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIEditingSession);
- edsession.makeWindowEditable(content, "html", false, true, false);
- content.focus();
- });
-
- yield enterStringIntoEditor("'");
- yield enterStringIntoEditor("/");
-
- ok(gFindBar.hidden,
- "Findfield should have stayed hidden after entering editor test");
- }
-
- function* enterStringIntoEditor(aString) {
- for (let i = 0; i < aString.length; i++) {
- yield ContentTask.spawn(gBrowser, { charCode: aString.charCodeAt(i) }, function* (args) {
- let event = content.document.createEvent("KeyboardEvent");
- event.initKeyEvent("keypress", true, true, null, false, false,
- false, false, 0, args.charCode);
- content.document.body.dispatchEvent(event);
- });
- }
- }
- ]]></script>
-
- <browser id="content" flex="1" src="about:blank" type="content-primary"/>
- <browser id="content-remote" remote="true" flex="1" src="about:blank" type="content-primary"/>
- <findbar id="FindToolbar" browserid="content"/>
-</window>
diff --git a/toolkit/content/tests/chrome/bug331215_window.xul b/toolkit/content/tests/chrome/bug331215_window.xul
deleted file mode 100644
index 757ce61b8a..0000000000
--- a/toolkit/content/tests/chrome/bug331215_window.xul
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- 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/. -->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-
-<window id="331215test"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- width="600"
- height="600"
- onload="SimpleTest.executeSoon(startTest);"
- title="331215 test">
-
- <script type="application/javascript"><![CDATA[
- const {interfaces: Ci, classes: Cc, results: Cr, utils: Cu} = Components;
- Cu.import("resource://gre/modules/Task.jsm");
- Cu.import("resource://testing-common/BrowserTestUtils.jsm");
- Cu.import("resource://testing-common/ContentTask.jsm");
- ContentTask.setTestScope(window.opener.wrappedJSObject);
-
- var gFindBar = null;
- var gBrowser;
-
- var imports = ["SimpleTest", "ok", "info"];
- for (var name of imports) {
- window[name] = window.opener.wrappedJSObject[name];
- }
- SimpleTest.requestLongerTimeout(2);
-
- function startTest() {
- Task.spawn(function* () {
- gFindBar = document.getElementById("FindToolbar");
- for (let browserId of ["content", "content-remote"]) {
- yield startTestWithBrowser(browserId);
- }
- }).then(() => {
- window.close();
- SimpleTest.finish();
- });
- }
-
- function* startTestWithBrowser(browserId) {
- info("Starting test with browser '" + browserId + "'");
- gBrowser = document.getElementById(browserId);
- gFindBar.browser = gBrowser;
- let promise = BrowserTestUtils.browserLoaded(gBrowser);
- gBrowser.loadURI("data:text/plain,latest");
- yield promise;
- yield onDocumentLoaded();
- }
-
- function* onDocumentLoaded() {
- document.getElementById("cmd_find").doCommand();
- yield promiseEnterStringIntoFindField("test");
- document.commandDispatcher
- .getControllerForCommand("cmd_moveTop")
- .doCommand("cmd_moveTop");
- yield promiseEnterStringIntoFindField("l");
- ok(gFindBar._findField.getAttribute("status") == "notfound",
- "Findfield status attribute should have been 'notfound' after entering test");
- yield promiseEnterStringIntoFindField("a");
- ok(gFindBar._findField.getAttribute("status") != "notfound",
- "Findfield status attribute should not have been 'notfound' after entering latest");
- }
-
- function promiseEnterStringIntoFindField(aString) {
- return new Promise(resolve => {
- let listener = {
- onFindResult: function(result) {
- if (result.result == Ci.nsITypeAheadFind.FIND_FOUND && result.searchString != aString)
- return;
- gFindBar.browser.finder.removeResultListener(listener);
- resolve();
- }
- };
- gFindBar.browser.finder.addResultListener(listener);
-
- for (let c of aString) {
- let code = c.charCodeAt(0);
- let ev = new KeyboardEvent("keypress", {
- keyCode: code,
- charCode: code,
- bubbles: true
- });
- gFindBar._findField.inputField.dispatchEvent(ev);
- }
- });
- }
- ]]></script>
-
- <commandset>
- <command id="cmd_find" oncommand="document.getElementById('FindToolbar').onFindCommand();"/>
- </commandset>
- <browser type="content-primary" flex="1" id="content" src="about:blank"/>
- <browser type="content-primary" flex="1" id="content-remote" remote="true" src="about:blank"/>
- <findbar id="FindToolbar" browserid="content"/>
-</window>
diff --git a/toolkit/content/tests/chrome/bug360437_window.xul b/toolkit/content/tests/chrome/bug360437_window.xul
deleted file mode 100644
index 08498b58b2..0000000000
--- a/toolkit/content/tests/chrome/bug360437_window.xul
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- 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/. -->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-
-<window id="360437Test"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- width="600"
- height="600"
- onload="startTest();"
- title="360437 test">
-
- <script type="application/javascript"><![CDATA[
- const {interfaces: Ci, classes: Cc, results: Cr, utils: Cu} = Components;
- Cu.import("resource://gre/modules/Task.jsm");
- Cu.import("resource://testing-common/ContentTask.jsm");
- ContentTask.setTestScope(window.opener.wrappedJSObject);
-
- var gFindBar = null;
- var gBrowser;
-
- var imports = ["SimpleTest", "ok", "is", "info"];
- for (var name of imports) {
- window[name] = window.opener.wrappedJSObject[name];
- }
-
- function startTest() {
- Task.spawn(function* () {
- gFindBar = document.getElementById("FindToolbar");
- for (let browserId of ["content", "content-remote"]) {
- yield startTestWithBrowser(browserId);
- }
- }).then(() => {
- window.close();
- SimpleTest.finish();
- });
- }
-
- function* startTestWithBrowser(browserId) {
- info("Starting test with browser '" + browserId + "'");
- gBrowser = document.getElementById(browserId);
- gFindBar.browser = gBrowser;
- let promise = ContentTask.spawn(gBrowser, null, function* () {
- return new Promise(resolve => {
- addEventListener("DOMContentLoaded", function listener() {
- removeEventListener("DOMContentLoaded", listener);
- resolve();
- });
- });
- });
- gBrowser.loadURI("data:text/html,<form><input id='input' type='text' value='text inside an input element'></form>");
- yield promise;
- yield onDocumentLoaded();
- }
-
- function* onDocumentLoaded() {
- gFindBar.onFindCommand();
-
- // Make sure the findfield is correctly focused on open
- var searchStr = "text inside an input element";
- yield promiseEnterStringIntoFindField(searchStr);
- is(document.commandDispatcher.focusedElement,
- gFindBar._findField.inputField, "Find field isn't focused");
-
- // Make sure "find again" correctly transfers focus to the content element
- // when the find bar is closed.
- gFindBar.close();
- gFindBar.onFindAgainCommand(false);
- yield ContentTask.spawn(gBrowser, null, function* () {
- Assert.equal(content.document.activeElement,
- content.document.getElementById("input"), "Input Element isn't focused");
- });
-
- // Make sure "find again" doesn't focus the content element if focus
- // isn't in the content document.
- var textbox = document.getElementById("textbox");
- textbox.focus();
- gFindBar.close();
- gFindBar.onFindAgainCommand(false);
- ok(textbox.hasAttribute("focused"),
- "Focus was stolen from a chrome element");
- }
-
- function promiseFindResult(str = null) {
- return new Promise(resolve => {
- let listener = {
- onFindResult: function({ searchString }) {
- if (str !== null && str != searchString) {
- return;
- }
- gFindBar.browser.finder.removeResultListener(listener);
- resolve();
- }
- };
- gFindBar.browser.finder.addResultListener(listener);
- });
- }
-
- function promiseEnterStringIntoFindField(str) {
- let promise = promiseFindResult(str);
- for (let i = 0; i < str.length; i++) {
- let event = document.createEvent("KeyboardEvent");
- event.initKeyEvent("keypress", true, true, null, false, false,
- false, false, 0, str.charCodeAt(i));
- gFindBar._findField.inputField.dispatchEvent(event);
- }
- return promise;
- }
- ]]></script>
- <textbox id="textbox"/>
- <browser type="content-primary" flex="1" id="content" src="about:blank"/>
- <browser type="content-primary" flex="1" id="content-remote" remote="true" src="about:blank"/>
- <findbar id="FindToolbar" browserid="content"/>
-</window>
diff --git a/toolkit/content/tests/chrome/bug366992_window.xul b/toolkit/content/tests/chrome/bug366992_window.xul
deleted file mode 100644
index a1e2ae1af1..0000000000
--- a/toolkit/content/tests/chrome/bug366992_window.xul
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- 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/. -->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
-
-<window id="366992 test"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="onLoad();"
- width="600"
- height="600"
- title="366992 test">
-
- <commandset id="editMenuCommands"/>
-
- <script type="application/javascript"
- src="chrome://global/content/globalOverlay.js"/>
- <script type="application/javascript"><![CDATA[
- // Without the fix for bug 366992, the delete command would be enabled
- // for the textbox even though the textbox's controller for this command
- // disables it.
- var gShouldNotBeReachedController = {
- supportsCommand: function(aCommand) {
- return aCommand == "cmd_delete";
- },
- isCommandEnabled: function(aCommand) {
- return aCommand == "cmd_delete";
- },
- doCommand: function(aCommand) { }
- }
-
- function ok(condition, message) {
- window.opener.wrappedJSObject.SimpleTest.ok(condition, message);
- }
- function finish() {
- window.controllers.removeController(gShouldNotBeReachedController);
- window.close();
- window.opener.wrappedJSObject.SimpleTest.finish();
- }
-
- function onLoad() {
- document.getElementById("textbox").focus();
- var deleteDisabled = document.getElementById("cmd_delete")
- .getAttribute("disabled") == "true";
- ok(deleteDisabled,
- "cmd_delete should be disabled when the empty textbox is focused");
- finish();
- }
-
- window.controllers.appendController(gShouldNotBeReachedController);
- ]]></script>
-
- <textbox id="textbox"/>
-</window>
diff --git a/toolkit/content/tests/chrome/bug409624_window.xul b/toolkit/content/tests/chrome/bug409624_window.xul
deleted file mode 100644
index 002cbe0421..0000000000
--- a/toolkit/content/tests/chrome/bug409624_window.xul
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- 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/. -->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-
-<window id="409624test"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- width="600"
- height="600"
- title="409624 test">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
- <script type="application/javascript"><![CDATA[
- var gFindBar = null;
- var gBrowser;
-
- var imports = ["SimpleTest", "ok", "is"];
- for (var name of imports) {
- window[name] = window.opener.wrappedJSObject[name];
- }
-
- function finish() {
- window.close();
- SimpleTest.finish();
- }
-
- function startTest() {
- gFindBar = document.getElementById("FindToolbar");
- gBrowser = document.getElementById("content");
- gBrowser.addEventListener("pageshow", onPageShow, false);
- gBrowser.loadURI('data:text/html,<h2>Text mozilla</h2><input id="inp" type="text" />');
- }
-
- function onPageShow() {
- gBrowser.removeEventListener("pageshow", onPageShow, false);
- gFindBar.clear();
- let textbox = gFindBar.getElement("findbar-textbox");
-
- // Clear should work regardless of whether the editor has been lazily
- // initialised yet
- ok(!gFindBar.hasTransactions, "No transactions when findbar empty");
- textbox.value = "mozilla";
- ok(gFindBar.hasTransactions, "Has transactions when findbar value set without editor init");
- gFindBar.clear();
- is(textbox.value, '', "findbar input value cleared after clear() call without editor init");
- ok(!gFindBar.hasTransactions, "No transactions after clear() call");
-
- gFindBar.open();
- let matchCaseCheckbox = gFindBar.getElement("find-case-sensitive");
- if (!matchCaseCheckbox.hidden && matchCaseCheckbox.checked)
- matchCaseCheckbox.click();
- ok(!matchCaseCheckbox.checked, "case-insensitivity correctly set");
-
- // Simulate typical input
- textbox.focus();
- gFindBar.clear();
- sendChar("m");
- ok(gFindBar.hasTransactions, "Has transactions after input");
- let preSelection = gBrowser.contentWindow.getSelection();
- ok(!preSelection.isCollapsed, "Found item and selected range");
- gFindBar.clear();
- is(textbox.value, '', "findbar input value cleared after clear() call");
- let postSelection = gBrowser.contentWindow.getSelection();
- ok(postSelection.isCollapsed, "item found deselected after clear() call");
- let fp = gFindBar.getElement("find-previous");
- ok(fp.disabled, "find-previous button disabled after clear() call");
- let fn = gFindBar.getElement("find-next");
- ok(fn.disabled, "find-next button disabled after clear() call");
-
- // Test status updated after a search for text not in page
- textbox.focus();
- sendChar("x");
- gFindBar.clear();
- let ftext = gFindBar.getElement("find-status");
- is(ftext.textContent, "", "status text disabled after clear() call");
-
- // Test input empty with undo stack non-empty
- textbox.focus();
- sendChar("m");
- sendKey("BACK_SPACE");
- ok(gFindBar.hasTransactions, "Has transactions when undo available");
- gFindBar.clear();
- gFindBar.close();
-
- finish();
- }
-
- SimpleTest.waitForFocus(startTest, window);
- ]]></script>
-
- <browser type="content-primary" flex="1" id="content" src="about:blank"/>
- <findbar id="FindToolbar" browserid="content"/>
-</window>
diff --git a/toolkit/content/tests/chrome/bug429723_window.xul b/toolkit/content/tests/chrome/bug429723_window.xul
deleted file mode 100644
index 28439ae8e7..0000000000
--- a/toolkit/content/tests/chrome/bug429723_window.xul
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- 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/. -->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-
-<window id="429723Test"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- width="600"
- height="600"
- onload="onLoad();"
- title="429723 test">
-
- <script type="application/javascript"><![CDATA[
- var gFindBar = null;
- var gBrowser;
-
- function ok(condition, message) {
- window.opener.wrappedJSObject.SimpleTest.ok(condition, message);
- }
-
- function finish() {
- window.close();
- window.opener.wrappedJSObject.SimpleTest.finish();
- }
-
- function onLoad() {
- var _delayedOnLoad = function() {
- gFindBar = document.getElementById("FindToolbar");
- gBrowser = document.getElementById("content");
- gBrowser.addEventListener("pageshow", onPageShow, false);
- gBrowser.loadURI("data:text/html,<h2 id='h2'>mozilla</h2>");
- }
- setTimeout(_delayedOnLoad, 1000);
- }
-
- function enterStringIntoFindField(aString) {
- for (var i=0; i < aString.length; i++) {
- var event = document.createEvent("KeyboardEvent");
- event.initKeyEvent("keypress", true, true, null, false, false,
- false, false, 0, aString.charCodeAt(i));
- gFindBar._findField.inputField.dispatchEvent(event);
- }
- }
-
- function onPageShow() {
- gBrowser.removeEventListener("pageshow", onPageShow, false);
- var findField = gFindBar._findField;
- document.getElementById("cmd_find").doCommand();
-
- var matchCaseCheckbox = gFindBar.getElement("find-case-sensitive");
- if (!matchCaseCheckbox.hidden & matchCaseCheckbox.checked)
- matchCaseCheckbox.click();
-
- // Perform search
- var searchStr = "z";
- enterStringIntoFindField(searchStr);
-
- // Highlight search term
- var highlight = gFindBar.getElement("highlight");
- if (!highlight.checked)
- highlight.click();
-
- // Delete search term
- var event = document.createEvent("KeyboardEvent");
- event.initKeyEvent("keypress", true, true, null, false, false,
- false, false, KeyEvent.DOM_VK_BACK_SPACE, 0);
- gFindBar._findField.inputField.dispatchEvent(event);
-
- var notRed = !findField.hasAttribute("status") ||
- (findField.getAttribute("status") != "notfound");
- ok(notRed, "Find Bar textbox is correct colour");
- finish();
- }
- ]]></script>
-
- <commandset>
- <command id="cmd_find" oncommand="document.getElementById('FindToolbar').onFindCommand();"/>
- </commandset>
- <browser type="content-primary" flex="1" id="content" src="about:blank"/>
- <findbar id="FindToolbar" browserid="content"/>
-</window>
diff --git a/toolkit/content/tests/chrome/bug451540_window.xul b/toolkit/content/tests/chrome/bug451540_window.xul
deleted file mode 100644
index 3c08c95c9f..0000000000
--- a/toolkit/content/tests/chrome/bug451540_window.xul
+++ /dev/null
@@ -1,248 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- 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/. -->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
-
-<window id="451540test"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- width="600"
- height="600"
- title="451540 test">
-
- <script type="application/javascript"><![CDATA[
- const {interfaces: Ci, classes: Cc, results: Cr, utils: Cu} = Components;
- Cu.import("resource://gre/modules/Task.jsm");
- Cu.import("resource://testing-common/BrowserTestUtils.jsm");
- Cu.import("resource://testing-common/ContentTask.jsm");
- ContentTask.setTestScope(window.opener.wrappedJSObject);
- const SEARCH_TEXT = "minefield";
-
- let gFindBar = null;
- let gPrefsvc = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
- let gBrowser;
-
- let sendCtrl = true;
- let sendMeta = false;
- if (navigator.platform.indexOf("Mac") >= 0) {
- sendCtrl = false;
- sendMeta = true;
- }
-
- let imports = [ "SimpleTest", "ok", "is", "info"];
- for (let name of imports) {
- window[name] = window.opener.wrappedJSObject[name];
- }
-
- SimpleTest.requestLongerTimeout(2);
-
- function startTest() {
- gFindBar = document.getElementById("FindToolbar");
- gBrowser = document.getElementById("content");
- gBrowser.addEventListener("pageshow", onPageShow, false);
- let data = `data:text/html,<input id="inp" type="text" />
- <textarea id="tarea"/>`;
- gBrowser.loadURI(data);
- }
-
- function promiseHighlightFinished() {
- return new Promise(resolve => {
- let listener = {
- onHighlightFinished() {
- gFindBar.browser.finder.removeResultListener(listener);
- resolve();
- }
- };
- gFindBar.browser.finder.addResultListener(listener);
- });
- }
-
- function* resetForNextTest(elementId, aText) {
- if (!aText)
- aText = SEARCH_TEXT;
-
- // Turn off highlighting
- let highlightButton = gFindBar.getElement("highlight");
- if (highlightButton.checked) {
- highlightButton.click();
- }
-
- // Initialise input
- info(`setting element value to ${aText}`);
- yield ContentTask.spawn(gBrowser, {elementId, aText}, function*(args) {
- let {elementId, aText} = args;
- let doc = content.document;
- let element = doc.getElementById(elementId);
- element.value = aText;
- element.focus();
- });
- info(`just set element value to ${aText}`);
- gFindBar._findField.value = SEARCH_TEXT;
-
- // Perform search and turn on highlighting
- gFindBar._find();
- highlightButton.click();
- yield promiseHighlightFinished();
-
- // Move caret to start of element
- info(`focusing element`);
- yield ContentTask.spawn(gBrowser, elementId, function*(elementId) {
- let doc = content.document;
- let element = doc.getElementById(elementId);
- element.focus();
- });
- info(`focused element`);
- if (navigator.platform.indexOf("Mac") >= 0) {
- yield BrowserTestUtils.synthesizeKey("VK_LEFT", { metaKey: true }, gBrowser);
- } else {
- yield BrowserTestUtils.synthesizeKey("VK_HOME", {}, gBrowser);
- }
- }
-
- function* testSelection(elementId, expectedRangeCount, message) {
- yield ContentTask.spawn(gBrowser, {elementId, expectedRangeCount, message}, function*(args) {
- let {elementId, expectedRangeCount, message} = args;
- let doc = content.document;
- let element = doc.getElementById(elementId);
- let controller = element.editor.selectionController;
- let selection = controller.getSelection(controller.SELECTION_FIND);
- Assert.equal(selection.rangeCount, expectedRangeCount, message);
- });
- }
-
- function* testInput(elementId, testTypeText) {
- let isEditableElement = yield ContentTask.spawn(gBrowser, elementId, function*(elementId) {
- let doc = content.document;
- let element = doc.getElementById(elementId);
- return element instanceof Ci.nsIDOMNSEditableElement;
- });
- if (!isEditableElement) {
- return;
- }
-
- // Initialize the findbar
- let matchCase = gFindBar.getElement("find-case-sensitive");
- if (matchCase.checked) {
- matchCase.doCommand();
- }
-
- // First check match has been correctly highlighted
- yield resetForNextTest(elementId);
-
- yield testSelection(elementId, 1, testTypeText + " correctly highlighted match");
-
- // Test 2: check highlight removed when text added within the highlight
- yield BrowserTestUtils.synthesizeKey("VK_RIGHT", {}, gBrowser);
- yield BrowserTestUtils.synthesizeKey("a", {}, gBrowser);
-
- yield testSelection(elementId, 0, testTypeText + " correctly removed highlight on text insertion");
-
- // Test 3: check highlighting remains when text added before highlight
- yield resetForNextTest(elementId);
- yield BrowserTestUtils.synthesizeKey("a", {}, gBrowser);
- yield testSelection(elementId, 1, testTypeText + " highlight correctly remained on text insertion at start");
-
- // Test 4: check highlighting remains when text added after highlight
- yield resetForNextTest(elementId);
- for (let x = 0; x < SEARCH_TEXT.length; x++) {
- yield BrowserTestUtils.synthesizeKey("VK_RIGHT", {}, gBrowser);
- }
- yield BrowserTestUtils.synthesizeKey("a", {}, gBrowser);
- yield testSelection(elementId, 1, testTypeText + " highlight correctly remained on text insertion at end");
-
- // Test 5: deleting text within the highlight
- yield resetForNextTest(elementId);
- yield BrowserTestUtils.synthesizeKey("VK_RIGHT", {}, gBrowser);
- yield BrowserTestUtils.synthesizeKey("VK_BACK_SPACE", {}, gBrowser);
- yield testSelection(elementId, 0, testTypeText + " correctly removed highlight on text deletion");
-
- // Test 6: deleting text at end of highlight
- yield resetForNextTest(elementId, SEARCH_TEXT + "A");
- for (let x = 0; x < (SEARCH_TEXT + "A").length; x++) {
- yield BrowserTestUtils.synthesizeKey("VK_RIGHT", {}, gBrowser);
- }
- yield BrowserTestUtils.synthesizeKey("VK_BACK_SPACE", {}, gBrowser);
- yield testSelection(elementId, 1, testTypeText + " highlight correctly remained on text deletion at end");
-
- // Test 7: deleting text at start of highlight
- yield resetForNextTest(elementId, "A" + SEARCH_TEXT);
- yield BrowserTestUtils.synthesizeKey("VK_RIGHT", {}, gBrowser);
- yield BrowserTestUtils.synthesizeKey("VK_BACK_SPACE", {}, gBrowser);
- yield testSelection(elementId, 1, testTypeText + " highlight correctly remained on text deletion at start");
-
- // Test 8: deleting selection
- yield resetForNextTest(elementId);
- yield BrowserTestUtils.synthesizeKey("VK_RIGHT", { shiftKey: true }, gBrowser);
- yield BrowserTestUtils.synthesizeKey("VK_RIGHT", { shiftKey: true }, gBrowser);
- yield BrowserTestUtils.synthesizeKey("x", { ctrlKey: sendCtrl, metaKey: sendMeta }, gBrowser);
- yield testSelection(elementId, 0, testTypeText + " correctly removed highlight on selection deletion");
-
- // Test 9: Multiple matches within one editor (part 1)
- // Check second match remains highlighted after inserting text into
- // first match, and that its highlighting gets removed when the
- // second match is edited
- yield resetForNextTest(elementId, SEARCH_TEXT + " " + SEARCH_TEXT);
- yield testSelection(elementId, 2, testTypeText + " correctly highlighted both matches");
- yield BrowserTestUtils.synthesizeKey("VK_RIGHT", {}, gBrowser);
- yield BrowserTestUtils.synthesizeKey("a", {}, gBrowser);
- yield testSelection(elementId, 1, testTypeText + " correctly removed only the first highlight on text insertion");
- yield BrowserTestUtils.synthesizeKey("VK_RIGHT", { ctrlKey: sendCtrl, metaKey: sendMeta }, gBrowser);
- yield BrowserTestUtils.synthesizeKey("VK_RIGHT", { ctrlKey: sendCtrl, metaKey: sendMeta }, gBrowser);
- yield BrowserTestUtils.synthesizeKey("VK_LEFT", {}, gBrowser);
- yield BrowserTestUtils.synthesizeKey("a", {}, gBrowser);
- yield testSelection(elementId, 0, testTypeText + " correctly removed second highlight on text insertion");
-
- // Test 10: Multiple matches within one editor (part 2)
- // Check second match remains highlighted after deleting text in
- // first match, and that its highlighting gets removed when the
- // second match is edited
- yield resetForNextTest(elementId, SEARCH_TEXT + " " + SEARCH_TEXT);
- yield testSelection(elementId, 2, testTypeText + " correctly highlighted both matches");
- yield BrowserTestUtils.synthesizeKey("VK_RIGHT", {}, gBrowser);
- yield BrowserTestUtils.synthesizeKey("VK_BACK_SPACE", {}, gBrowser);
- yield testSelection(elementId, 1, testTypeText + " correctly removed only the first highlight on text deletion");
- yield BrowserTestUtils.synthesizeKey("VK_RIGHT", { ctrlKey: sendCtrl, metaKey: sendMeta }, gBrowser);
- yield BrowserTestUtils.synthesizeKey("VK_RIGHT", { ctrlKey: sendCtrl, metaKey: sendMeta }, gBrowser);
- yield BrowserTestUtils.synthesizeKey("VK_LEFT", {}, gBrowser);
- yield BrowserTestUtils.synthesizeKey("VK_BACK_SPACE", {}, gBrowser);
- yield testSelection(elementId, 0, testTypeText + " correctly removed second highlight on text deletion");
-
- // Test 11: Multiple matches within one editor (part 3)
- // Check second match remains highlighted after deleting selection
- // in first match, and that second match highlighting gets correctly
- // removed when it has a selection deleted from it
- yield resetForNextTest(elementId, SEARCH_TEXT + " " + SEARCH_TEXT);
- yield BrowserTestUtils.synthesizeKey("VK_RIGHT", { shiftKey: true }, gBrowser);
- yield BrowserTestUtils.synthesizeKey("VK_RIGHT", { shiftKey: true }, gBrowser);
- yield BrowserTestUtils.synthesizeKey("x", { ctrlKey: sendCtrl, metaKey: sendMeta }, gBrowser);
- yield testSelection(elementId, 1, testTypeText + " correctly removed only first highlight on selection deletion");
- yield BrowserTestUtils.synthesizeKey("VK_RIGHT", { ctrlKey: sendCtrl, metaKey: sendMeta }, gBrowser);
- yield BrowserTestUtils.synthesizeKey("VK_RIGHT", { ctrlKey: sendCtrl, metaKey: sendMeta }, gBrowser);
- yield BrowserTestUtils.synthesizeKey("VK_LEFT", { shiftKey: true }, gBrowser);
- yield BrowserTestUtils.synthesizeKey("VK_LEFT", { shiftKey: true }, gBrowser);
- yield BrowserTestUtils.synthesizeKey("x", { ctrlKey: sendCtrl, metaKey: sendMeta }, gBrowser);
- yield testSelection(elementId, 0, testTypeText + " correctly removed second highlight on selection deletion");
- }
-
- function onPageShow() {
- gBrowser.removeEventListener("load", onPageShow, true);
- Task.spawn(function*() {
- gFindBar.open();
- yield testInput("inp", "Input:");
- yield testInput("tarea", "Textarea:");
- }).then(() => {
- window.close();
- SimpleTest.finish();
- });
- }
-
- SimpleTest.waitForFocus(startTest, window);
- ]]></script>
-
- <browser type="content-primary" flex="1" id="content" src="about:blank"/>
- <browser type="content-primary" flex="1" id="content-remote" remote="true" src="about:blank"/>
- <findbar id="FindToolbar" browserid="content"/>
-</window>
diff --git a/toolkit/content/tests/chrome/bug624329_window.xul b/toolkit/content/tests/chrome/bug624329_window.xul
deleted file mode 100644
index efca39d3bf..0000000000
--- a/toolkit/content/tests/chrome/bug624329_window.xul
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-
-<window title="Test for bug 624329 context menu position"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- context="menu">
-
- <script>
- opener.SimpleTest.waitForFocus(opener.childFocused, window);
- </script>
-
- <menupopup id="menu">
- <!-- The bug demonstrated only when the accesskey was presented separately
- from the label.
- e.g. because the accesskey is not a letter in the label.
-
- The bug demonstrates only on the first show of the context menu
- unless menu items are removed/added each time the menu is
- constructed. -->
- <menuitem label="Long label to ensure the popup would hit the right of the screen" accesskey="1"/>
- </menupopup>
-</window>
diff --git a/toolkit/content/tests/chrome/chrome.ini b/toolkit/content/tests/chrome/chrome.ini
deleted file mode 100644
index 2b9be4c8ea..0000000000
--- a/toolkit/content/tests/chrome/chrome.ini
+++ /dev/null
@@ -1,199 +0,0 @@
-[DEFAULT]
-skip-if = os == 'android'
-support-files =
- ../widgets/popup_shared.js
- ../widgets/tree_shared.js
- RegisterUnregisterChrome.js
- bug263683_window.xul
- bug304188_window.xul
- bug331215_window.xul
- bug360437_window.xul
- bug366992_window.xul
- bug409624_window.xul
- bug429723_window.xul
- bug624329_window.xul
- dialog_dialogfocus.xul
- file_about_networking_wsh.py
- file_autocomplete_with_composition.js
- findbar_entireword_window.xul
- findbar_events_window.xul
- findbar_window.xul
- frame_popup_anchor.xul
- frame_popupremoving_frame.xul
- frame_subframe_origin_subframe1.xul
- frame_subframe_origin_subframe2.xul
- popup_childframe_node.xul
- popup_trigger.js
- sample_entireword_latin1.html
- window_browser_drop.xul
- window_keys.xul
- window_largemenu.xul
- window_panel.xul
- window_popup_anchor.xul
- window_popup_anchoratrect.xul
- window_popup_attribute.xul
- window_popup_button.xul
- window_popup_preventdefault_chrome.xul
- window_preferences.xul
- window_preferences2.xul
- window_preferences3.xul
- window_preferences_commandretarget.xul
- window_screenPosSize.xul
- window_showcaret.xul
- window_subframe_origin.xul
- window_titlebar.xul
- window_tooltip.xul
- xul_selectcontrol.js
- rtlchrome/rtl.css
- rtlchrome/rtl.dtd
- rtlchrome/rtl.manifest
- rtltest/righttoleft.manifest
- rtltest/content/dirtest.xul
-
-[test_about_networking.html]
-[test_arrowpanel.xul]
-[test_autocomplete2.xul]
-[test_autocomplete3.xul]
-[test_autocomplete4.xul]
-[test_autocomplete5.xul]
-[test_autocomplete_delayOnPaste.xul]
-subsuite = clipboard
-[test_autocomplete_emphasis.xul]
-[test_autocomplete_with_composition_on_input.html]
-[test_autocomplete_with_composition_on_textbox.xul]
-[test_autocomplete_placehold_last_complete.xul]
-[test_browser_drop.xul]
-[test_bug253481.xul]
-subsuite = clipboard
-[test_bug263683.xul]
-[test_bug304188.xul]
-[test_bug331215.xul]
-[test_bug360220.xul]
-[test_bug360437.xul]
-skip-if = os == 'linux' # Bug 1264604
-[test_bug365773.xul]
-[test_bug366992.xul]
-[test_bug382990.xul]
-[test_bug409624.xul]
-[test_bug418874.xul]
-[test_bug429723.xul]
-[test_bug437844.xul]
-[test_bug457632.xul]
-[test_bug460942.xul]
-[test_bug471776.xul]
-[test_bug509732.xul]
-[test_bug554279.xul]
-[test_bug557987.xul]
-[test_bug562554.xul]
-[test_bug570192.xul]
-[test_bug585946.xul]
-[test_bug624329.xul]
-skip-if = (os == 'mac' && os_version == '10.10') # Unexpectedly perma-passes on OSX 10.10
-[test_bug792324.xul]
-[test_bug1048178.xul]
-skip-if = toolkit == "cocoa"
-[test_button.xul]
-[test_closemenu_attribute.xul]
-[test_colorpicker_popup.xul]
-[test_contextmenu_list.xul]
-[test_datepicker.xul]
-[test_deck.xul]
-[test_dialogfocus.xul]
-[test_findbar.xul]
-subsuite = clipboard
-[test_findbar_entireword.xul]
-[test_findbar_events.xul]
-[test_focus_anons.xul]
-[test_hiddenitems.xul]
-[test_hiddenpaging.xul]
-[test_keys.xul]
-[test_labelcontrol.xul]
-[test_largemenu.xul]
-skip-if = os == 'linux' && !debug #Bug 1207174
-[test_menu.xul]
-[test_menu_anchored.xul]
-[test_menu_hide.xul]
-[test_menuchecks.xul]
-[test_menuitem_blink.xul]
-[test_menuitem_commands.xul]
-[test_menulist.xul]
-[test_menulist_keynav.xul]
-[test_menulist_null_value.xul]
-[test_menulist_paging.xul]
-[test_menulist_position.xul]
-[test_mousescroll.xul]
-[test_notificationbox.xul]
-[test_panel.xul]
-[test_panelfrommenu.xul]
-[test_popup_anchor.xul]
-[test_popup_anchoratrect.xul]
-skip-if = os == 'linux' # 1167694
-[test_popup_attribute.xul]
-skip-if = os == 'linux' && asan #Bug 1131634
-[test_popup_button.xul]
-skip-if = os == 'linux' && asan # Bug 1281360
-[test_popup_coords.xul]
-[test_popup_keys.xul]
-[test_popup_moveToAnchor.xul]
-[test_popup_preventdefault.xul]
-[test_popup_preventdefault_chrome.xul]
-[test_popup_recreate.xul]
-[test_popup_scaled.xul]
-[test_popup_tree.xul]
-[test_popuphidden.xul]
-[test_popupincontent.xul]
-[test_popupremoving.xul]
-[test_popupremoving_frame.xul]
-[test_position.xul]
-[test_preferences.xul]
-[test_preferences_beforeaccept.xul]
-support-files = window_preferences_beforeaccept.xul
-[test_preferences_onsyncfrompreference.xul]
-support-files = window_preferences_onsyncfrompreference.xul
-[test_progressmeter.xul]
-[test_props.xul]
-[test_radio.xul]
-[test_richlist_direction.xul]
-[test_righttoleft.xul]
-[test_scale.xul]
-[test_scaledrag.xul]
-[test_screenPersistence.xul]
-[test_scrollbar.xul]
-[test_showcaret.xul]
-[test_sorttemplate.xul]
-[test_statusbar.xul]
-[test_subframe_origin.xul]
-[test_tabbox.xul]
-[test_tabindex.xul]
-[test_textbox_dictionary.xul]
-[test_textbox_emptytext.xul]
-[test_textbox_number.xul]
-[test_textbox_search.xul]
-[test_timepicker.xul]
-[test_titlebar.xul]
-skip-if = os == "linux"
-[test_toolbar.xul]
-[test_tooltip.xul]
-skip-if = (os == 'mac' && os_version == '10.10') # Bug 1141245, frequent timeouts on OSX 10.10
-[test_tooltip_noautohide.xul]
-[test_tree.xul]
-[test_tree_hier.xul]
-[test_tree_hier_cell.xul]
-[test_tree_single.xul]
-[test_tree_view.xul]
-# test_panel_focus.xul won't work if the Full Keyboard Access preference is set to
-# textboxes and lists only, so skip this test on Mac
-[test_panel_focus.xul]
-support-files = window_panel_focus.xul
-skip-if = toolkit == "cocoa"
-[test_chromemargin.xul]
-support-files = window_chromemargin.xul
-skip-if = toolkit == "cocoa"
-[test_bug451540.xul]
-support-files = bug451540_window.xul
-[test_autocomplete_mac_caret.xul]
-skip-if = toolkit != "cocoa"
-[test_cursorsnap.xul]
-disabled =
-#skip-if = os != "win"
-support-files = window_cursorsnap_dialog.xul window_cursorsnap_wizard.xul
diff --git a/toolkit/content/tests/chrome/dialog_dialogfocus.xul b/toolkit/content/tests/chrome/dialog_dialogfocus.xul
deleted file mode 100644
index 770695ed3e..0000000000
--- a/toolkit/content/tests/chrome/dialog_dialogfocus.xul
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-
-<dialog buttons="extra2,accept,cancel" onload="loaded()"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<tabbox id="tabbox" hidden="true">
- <tabs>
- <tab id="tab" label="Tab"/>
- </tabs>
- <tabpanels>
- <tabpanel>
- <button id="tabbutton" label="Tab Button"/>
- <button id="tabbutton2" label="Tab Button 2"/>
- </tabpanel>
- </tabpanels>
-</tabbox>
-
-<textbox id="textbox-yes" value="textbox-yes" hidden="true"/>
-<textbox id="textbox-no" value="textbox-no" noinitialfocus="true" hidden="true"/>
-<button id="one" label="One"/>
-<button id="two" label="Two" hidden="true"/>
-
-<script>
-function loaded()
-{
- if (window.arguments) {
- var step = window.arguments[0];
- switch (step) {
- case 2:
- document.getElementById("one").setAttribute("noinitialfocus", "true");
- break;
- case 3:
- document.getElementById("one").hidden = true;
- case 4:
- document.getElementById("tabbutton2").setAttribute("noinitialfocus", "true");
- case 5:
- document.getElementById("tabbutton").setAttribute("noinitialfocus", "true");
- case 6:
- document.getElementById("tabbox").hidden = false;
- break;
- case 7:
- var two = document.getElementById("two");
- two.hidden = false;
- two.focus();
- break;
- case 8:
- document.getElementById("textbox-yes").hidden = false;
- break;
- case 9:
- document.getElementById("textbox-no").hidden = false;
- break;
- }
- }
-}
-</script>
-
-</dialog>
diff --git a/toolkit/content/tests/chrome/file_about_networking_wsh.py b/toolkit/content/tests/chrome/file_about_networking_wsh.py
deleted file mode 100644
index 17ad250e56..0000000000
--- a/toolkit/content/tests/chrome/file_about_networking_wsh.py
+++ /dev/null
@@ -1,9 +0,0 @@
-from mod_pywebsocket import msgutil
-
-def web_socket_do_extra_handshake(request):
- pass
-
-def web_socket_transfer_data(request):
- while not request.client_terminated:
- msgutil.receive_message(request)
-
diff --git a/toolkit/content/tests/chrome/file_autocomplete_with_composition.js b/toolkit/content/tests/chrome/file_autocomplete_with_composition.js
deleted file mode 100644
index 881e772ad3..0000000000
--- a/toolkit/content/tests/chrome/file_autocomplete_with_composition.js
+++ /dev/null
@@ -1,540 +0,0 @@
-// nsDoTestsForAutoCompleteWithComposition tests autocomplete with composition.
-// Users must include SimpleTest.js and EventUtils.js.
-
-function waitForCondition(condition, nextTest) {
- var tries = 0;
- var interval = setInterval(function() {
- if (condition() || tries >= 30) {
- moveOn();
- }
- tries++;
- }, 100);
- var moveOn = function() { clearInterval(interval); nextTest(); };
-}
-
-function nsDoTestsForAutoCompleteWithComposition(aDescription,
- aWindow,
- aTarget,
- aAutoCompleteController,
- aIsFunc,
- aGetTargetValueFunc,
- aOnFinishFunc)
-{
- this._description = aDescription;
- this._window = aWindow;
- this._target = aTarget;
- this._controller = aAutoCompleteController;
-
- this._is = aIsFunc;
- this._getTargetValue = aGetTargetValueFunc;
- this._onFinish = aOnFinishFunc;
-
- this._target.focus();
-
- this._DefaultCompleteDefaultIndex =
- this._controller.input.completeDefaultIndex;
-
- this._doTests();
-}
-
-nsDoTestsForAutoCompleteWithComposition.prototype = {
- _window: null,
- _target: null,
- _controller: null,
- _DefaultCompleteDefaultIndex: false,
- _description: "",
-
- _is: null,
- _getTargetValue: function () { return "not initialized"; },
- _onFinish: null,
-
- _doTests: function ()
- {
- if (++this._testingIndex == this._tests.length) {
- this._controller.input.completeDefaultIndex =
- this._DefaultCompleteDefaultIndex;
- this._onFinish();
- return;
- }
-
- var test = this._tests[this._testingIndex];
- if (this._controller.input.completeDefaultIndex != test.completeDefaultIndex) {
- this._controller.input.completeDefaultIndex = test.completeDefaultIndex;
- }
- test.execute(this._window);
-
- waitForCondition(() => {
- return this._controller.searchStatus >=
- Components.interfaces.nsIAutoCompleteController.STATUS_COMPLETE_NO_MATCH;
- },
- this._checkResult.bind(this));
- },
-
- _checkResult: function ()
- {
- var test = this._tests[this._testingIndex];
- this._is(this._getTargetValue(), test.value,
- this._description + ", " + test.description + ": value");
- this._is(this._controller.searchString, test.searchString,
- this._description + ", " + test.description +": searchString");
- this._is(this._controller.input.popupOpen, test.popup,
- this._description + ", " + test.description + ": popupOpen");
- this._doTests();
- },
-
- _testingIndex: -1,
- _tests: [
- // Simple composition when popup hasn't been shown.
- // The autocomplete popup should not be shown during composition, but
- // after compositionend, the popup should be shown.
- { description: "compositionstart shouldn't open the popup",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeCompositionChange(
- { "composition":
- { "string": "M",
- "clauses":
- [
- { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
- ]
- },
- "caret": { "start": 1, "length": 0 },
- "key": { key: "M", code: "KeyM", keyCode: KeyboardEvent.DOM_VK_M,
- shiftKey: true },
- }, aWindow);
- }, popup: false, value: "M", searchString: ""
- },
- { description: "modifying composition string shouldn't open the popup",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeCompositionChange(
- { "composition":
- { "string": "Mo",
- "clauses":
- [
- { "length": 2, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
- ]
- },
- "caret": { "start": 2, "length": 0 },
- "key": { key: "o", code: "KeyO", keyCode: KeyboardEvent.DOM_VK_O },
- }, aWindow);
- }, popup: false, value: "Mo", searchString: ""
- },
- { description: "compositionend should open the popup",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeComposition({ type: "compositioncommitasis",
- key: { key: "KEY_Enter", code: "Enter" } }, aWindow);
- }, popup: true, value: "Mo", searchString: "Mo"
- },
- // If composition starts when popup is shown, the compositionstart event
- // should cause closing the popup.
- { description: "compositionstart should close the popup",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeCompositionChange(
- { "composition":
- { "string": "z",
- "clauses":
- [
- { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
- ]
- },
- "caret": { "start": 1, "length": 0 },
- "key": { key: "z", code: "KeyZ", keyCode: KeyboardEvent.DOM_VK_Z },
- }, aWindow);
- }, popup: false, value: "Moz", searchString: "Mo"
- },
- { description: "modifying composition string shouldn't reopen the popup",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeCompositionChange(
- { "composition":
- { "string": "zi",
- "clauses":
- [
- { "length": 2, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
- ]
- },
- "caret": { "start": 2, "length": 0 },
- "key": { key: "i", code: "KeyI", keyCode: KeyboardEvent.DOM_VK_I },
- }, aWindow);
- }, popup: false, value: "Mozi", searchString: "Mo"
- },
- { description: "compositionend should research the result and open the popup",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeComposition({ type: "compositioncommitasis",
- key: { key: "KEY_Enter", code: "Enter" } }, aWindow);
- }, popup: true, value: "Mozi", searchString: "Mozi"
- },
- // If composition is cancelled, the value shouldn't be changed.
- { description: "compositionstart should reclose the popup",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeCompositionChange(
- { "composition":
- { "string": "l",
- "clauses":
- [
- { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
- ]
- },
- "caret": { "start": 1, "length": 0 },
- "key": { key: "l", code: "KeyL", keyCode: KeyboardEvent.DOM_VK_L },
- }, aWindow);
- }, popup: false, value: "Mozil", searchString: "Mozi"
- },
- { description: "modifying composition string shouldn't reopen the popup",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeCompositionChange(
- { "composition":
- { "string": "ll",
- "clauses":
- [
- { "length": 2, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
- ]
- },
- "caret": { "start": 2, "length": 0 },
- "key": { key: "l", code: "KeyL", keyCode: KeyboardEvent.DOM_VK_L },
- }, aWindow);
- }, popup: false, value: "Mozill", searchString: "Mozi"
- },
- { description: "modifying composition string to empty string shouldn't reopen the popup",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeCompositionChange(
- { "composition":
- { "string": "",
- "clauses":
- [
- { "length": 0, "attr": 0 }
- ]
- },
- "caret": { "start": 0, "length": 0 }
- }, aWindow);
- }, popup: false, value: "Mozi", searchString: "Mozi"
- },
- { description: "cancled compositionend should reopen the popup",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeComposition({ type: "compositioncommit", data: "",
- key: { key: "KEY_Escape", code: "Escape" } }, aWindow);
- }, popup: true, value: "Mozi", searchString: "Mozi"
- },
- // But if composition replaces some characters and canceled, the search
- // string should be the latest value.
- { description: "compositionstart with selected string should close the popup",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeKey("VK_LEFT", { shiftKey: true }, aWindow);
- synthesizeKey("VK_LEFT", { shiftKey: true }, aWindow);
- synthesizeCompositionChange(
- { "composition":
- { "string": "z",
- "clauses":
- [
- { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
- ]
- },
- "caret": { "start": 1, "length": 0 },
- "key": { key: "z", code: "KeyZ", keyCode: KeyboardEvent.DOM_VK_Z },
- }, aWindow);
- }, popup: false, value: "Moz", searchString: "Mozi"
- },
- { description: "modifying composition string shouldn't reopen the popup",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeCompositionChange(
- { "composition":
- { "string": "zi",
- "clauses":
- [
- { "length": 2, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
- ]
- },
- "caret": { "start": 2, "length": 0 },
- "key": { key: "i", code: "KeyI", keyCode: KeyboardEvent.DOM_VK_I },
- }, aWindow);
- }, popup: false, value: "Mozi", searchString: "Mozi"
- },
- { description: "modifying composition string to empty string shouldn't reopen the popup",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeCompositionChange(
- { "composition":
- { "string": "",
- "clauses":
- [
- { "length": 0, "attr": 0 }
- ]
- },
- "caret": { "start": 0, "length": 0 }
- }, aWindow);
- }, popup: false, value: "Mo", searchString: "Mozi"
- },
- { description: "canceled compositionend should search the result with the latest value",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeComposition({ type: "compositioncommitasis",
- key: { key: "KEY_Escape", code: "Escape" } }, aWindow);
- }, popup: true, value: "Mo", searchString: "Mo"
- },
- // If all characters are removed, the popup should be closed.
- { description: "the value becomes empty by backspace, the popup should be closed",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeKey("VK_BACK_SPACE", {}, aWindow);
- synthesizeKey("VK_BACK_SPACE", {}, aWindow);
- }, popup: false, value: "", searchString: ""
- },
- // composition which is canceled shouldn't cause opening the popup.
- { description: "compositionstart shouldn't open the popup",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeCompositionChange(
- { "composition":
- { "string": "M",
- "clauses":
- [
- { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
- ]
- },
- "caret": { "start": 1, "length": 0 },
- "key": { key: "m", code: "KeyM", keyCode: KeyboardEvent.DOM_VK_M,
- shiftKey: true },
- }, aWindow);
- }, popup: false, value: "M", searchString: ""
- },
- { description: "modifying composition string shouldn't open the popup",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeCompositionChange(
- { "composition":
- { "string": "Mo",
- "clauses":
- [
- { "length": 2, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
- ]
- },
- "caret": { "start": 2, "length": 0 },
- "key": { key: "o", code: "KeyO", keyCode: KeyboardEvent.DOM_VK_O },
- }, aWindow);
- }, popup: false, value: "Mo", searchString: ""
- },
- { description: "modifying composition string to empty string shouldn't open the popup",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeCompositionChange(
- { "composition":
- { "string": "",
- "clauses":
- [
- { "length": 0, "attr": 0 }
- ]
- },
- "caret": { "start": 0, "length": 0 }
- }, aWindow);
- }, popup: false, value: "", searchString: ""
- },
- { description: "canceled compositionend shouldn't open the popup if it was closed",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeComposition({ type: "compositioncommitasis",
- key: { key: "KEY_Escape", code: "Escape" } }, aWindow);
- }, popup: false, value: "", searchString: ""
- },
- // Down key should open the popup even if the editor is empty.
- { description: "DOWN key should open the popup even if the value is empty",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeKey("VK_DOWN", {}, aWindow);
- }, popup: true, value: "", searchString: ""
- },
- // If popup is open at starting composition, the popup should be reopened
- // after composition anyway.
- { description: "compositionstart shouldn't open the popup",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeCompositionChange(
- { "composition":
- { "string": "M",
- "clauses":
- [
- { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
- ]
- },
- "caret": { "start": 1, "length": 0 },
- "key": { key: "M", code: "KeyM", keyCode: KeyboardEvent.DOM_VK_M,
- shiftKey: true },
- }, aWindow);
- }, popup: false, value: "M", searchString: ""
- },
- { description: "modifying composition string shouldn't open the popup",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeCompositionChange(
- { "composition":
- { "string": "Mo",
- "clauses":
- [
- { "length": 2, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
- ]
- },
- "caret": { "start": 2, "length": 0 },
- "key": { key: "o", code: "KeyO", keyCode: KeyboardEvent.DOM_VK_O },
- }, aWindow);
- }, popup: false, value: "Mo", searchString: ""
- },
- { description: "modifying composition string to empty string shouldn't open the popup",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeCompositionChange(
- { "composition":
- { "string": "",
- "clauses":
- [
- { "length": 0, "attr": 0 }
- ]
- },
- "caret": { "start": 0, "length": 0 }
- }, aWindow);
- }, popup: false, value: "", searchString: ""
- },
- { description: "canceled compositionend should open the popup if it was opened",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeComposition({ type: "compositioncommitasis",
- key: { key: "KEY_Escape", code: "Escape" } }, aWindow);
- }, popup: true, value: "", searchString: ""
- },
- // Type normally, and hit escape, the popup should be closed.
- { description: "ESCAPE should close the popup after typing something",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeKey("M", { shiftKey: true }, aWindow);
- synthesizeKey("o", { shiftKey: true }, aWindow);
- synthesizeKey("VK_ESCAPE", {}, aWindow);
- }, popup: false, value: "Mo", searchString: "Mo"
- },
- // Even if the popup is closed, composition which is canceled should open
- // the popup if the value isn't empty.
- // XXX This might not be good behavior, but anyway, this is minor issue...
- { description: "compositionstart shouldn't open the popup",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeCompositionChange(
- { "composition":
- { "string": "z",
- "clauses":
- [
- { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
- ]
- },
- "caret": { "start": 1, "length": 0 },
- "key": { key: "z", code: "KeyZ", keyCode: KeyboardEvent.DOM_VK_Z },
- }, aWindow);
- }, popup: false, value: "Moz", searchString: "Mo"
- },
- { description: "modifying composition string shouldn't open the popup",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeCompositionChange(
- { "composition":
- { "string": "zi",
- "clauses":
- [
- { "length": 2, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
- ]
- },
- "caret": { "start": 2, "length": 0 },
- "key": { key: "i", code: "KeyI", keyCode: KeyboardEvent.DOM_VK_I },
- }, aWindow);
- }, popup: false, value: "Mozi", searchString: "Mo"
- },
- { description: "modifying composition string to empty string shouldn't open the popup",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeCompositionChange(
- { "composition":
- { "string": "",
- "clauses":
- [
- { "length": 0, "attr": 0 }
- ]
- },
- "caret": { "start": 0, "length": 0 }
- }, aWindow);
- }, popup: false, value: "Mo", searchString: "Mo"
- },
- { description: "canceled compositionend shouldn't open the popup if the popup was closed",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeComposition({ type: "compositioncommitasis",
- key: { key: "KEY_Escape", code: "Escape" } }, aWindow);
- }, popup: true, value: "Mo", searchString: "Mo"
- },
- // House keeping...
- { description: "house keeping for next tests",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeKey("VK_BACK_SPACE", {}, aWindow);
- synthesizeKey("VK_BACK_SPACE", {}, aWindow);
- }, popup: false, value: "", searchString: ""
- },
- // Testing for nsIAutoCompleteInput.completeDefaultIndex being true.
- { description: "compositionstart shouldn't open the popup (completeDefaultIndex is true)",
- completeDefaultIndex: true,
- execute: function (aWindow) {
- synthesizeCompositionChange(
- { "composition":
- { "string": "M",
- "clauses":
- [
- { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
- ]
- },
- "caret": { "start": 1, "length": 0 },
- "key": { key: "M", code: "KeyM", keyCode: KeyboardEvent.DOM_VK_M,
- shiftKey: true },
- }, aWindow);
- }, popup: false, value: "M", searchString: ""
- },
- { description: "modifying composition string shouldn't open the popup (completeDefaultIndex is true)",
- completeDefaultIndex: true,
- execute: function (aWindow) {
- synthesizeCompositionChange(
- { "composition":
- { "string": "Mo",
- "clauses":
- [
- { "length": 2, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
- ]
- },
- "caret": { "start": 2, "length": 0 },
- "key": { key: "o", code: "KeyO", keyCode: KeyboardEvent.DOM_VK_O },
- }, aWindow);
- }, popup: false, value: "Mo", searchString: ""
- },
- { description: "compositionend should open the popup (completeDefaultIndex is true)",
- completeDefaultIndex: true,
- execute: function (aWindow) {
- synthesizeComposition({ type: "compositioncommitasis",
- key: { key: "KEY_Enter", code: "Enter" } }, aWindow);
- }, popup: true, value: "Mozilla", searchString: "Mo"
- },
- // House keeping...
- { description: "house keeping for next tests",
- completeDefaultIndex: false,
- execute: function (aWindow) {
- synthesizeKey("VK_BACK_SPACE", {}, aWindow);
- synthesizeKey("VK_BACK_SPACE", {}, aWindow);
- synthesizeKey("VK_BACK_SPACE", {}, aWindow);
- synthesizeKey("VK_BACK_SPACE", {}, aWindow);
- synthesizeKey("VK_BACK_SPACE", {}, aWindow);
- synthesizeKey("VK_BACK_SPACE", {}, aWindow);
- }, popup: false, value: "", searchString: ""
- }
- ]
-};
diff --git a/toolkit/content/tests/chrome/findbar_entireword_window.xul b/toolkit/content/tests/chrome/findbar_entireword_window.xul
deleted file mode 100644
index f0da61081d..0000000000
--- a/toolkit/content/tests/chrome/findbar_entireword_window.xul
+++ /dev/null
@@ -1,275 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- 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/. -->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
-
-<window id="FindbarEntireWordTest"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- width="600"
- height="600"
- onload="onLoad();"
- title="findbar test - entire words only">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/ChromeUtils.js"/>
-
- <script type="application/javascript"><![CDATA[
- const {interfaces: Ci, classes: Cc, results: Cr, utils: Cu} = Components;
- Cu.import("resource://gre/modules/Task.jsm");
- Cu.import("resource://testing-common/ContentTask.jsm");
- ContentTask.setTestScope(window.opener.wrappedJSObject);
-
- var gFindBar = null;
- var gBrowser;
-
- var imports = ["SimpleTest", "SpecialPowers", "ok", "is", "isnot", "info"];
- for (var name of imports) {
- window[name] = window.opener.wrappedJSObject[name];
- }
- SimpleTest.requestLongerTimeout(2);
-
- const kBaseURL = "chrome://mochitests/content/chrome/toolkit/content/tests/chrome";
- const kTests = {
- latin1: {
- testSimpleEntireWord: {
- "and": results => {
- isnot(results.find.result, Ci.nsITypeAheadFind.FIND_NOTFOUND, "'and' should've been found");
- is(results.matches.total, 6, "should've found 6 matches");
- },
- "an": results => {
- is(results.find.result, Ci.nsITypeAheadFind.FIND_NOTFOUND, "'an' shouldn't have been found");
- is(results.matches.total, 0, "should've found 0 matches");
- },
- "darkness": results => {
- isnot(results.find.result, Ci.nsITypeAheadFind.FIND_NOTFOUND, "'darkness' should've been found");
- is(results.matches.total, 3, "should've found 3 matches");
- },
- "mammon": results => {
- isnot(results.find.result, Ci.nsITypeAheadFind.FIND_NOTFOUND, "'mammon' should've been found");
- is(results.matches.total, 1, "should've found 1 match");
- }
- },
- testCaseSensitive: {
- "And": results => {
- isnot(results.find.result, Ci.nsITypeAheadFind.FIND_NOTFOUND, "'And' should've been found");
- is(results.matches.total, 1, "should've found 1 match");
- },
- "and": results => {
- isnot(results.find.result, Ci.nsITypeAheadFind.FIND_NOTFOUND, "'and' should've been found");
- is(results.matches.total, 5, "should've found 5 matches");
- },
- "Mammon": results => {
- isnot(results.find.result, Ci.nsITypeAheadFind.FIND_NOTFOUND, "'mammon' should've been found");
- is(results.matches.total, 1, "should've found 1 match");
- }
- },
- testWordBreakChars: {
- "a": results => {
- // 'a' is a common charactar, but there should only be one occurrence
- // separated by word boundaries.
- isnot(results.find.result, Ci.nsITypeAheadFind.FIND_NOTFOUND, "'a' should've been found");
- is(results.matches.total, 1, "should've found 1 match");
- },
- "quarrelled": results => {
- // 'quarrelled' is denoted as a word by a period char.
- isnot(results.find.result, Ci.nsITypeAheadFind.FIND_NOTFOUND, "'quarrelled' should've been found");
- is(results.matches.total, 1, "should've found 1 match");
- }
- },
- testQuickfind: {
- "and": results => {
- isnot(results.find.result, Ci.nsITypeAheadFind.FIND_NOTFOUND, "'and' should've been found");
- is(results.matches.total, 6, "should've found 6 matches");
- },
- "an": results => {
- is(results.find.result, Ci.nsITypeAheadFind.FIND_NOTFOUND, "'an' shouldn't have been found");
- is(results.matches.total, 0, "should've found 0 matches");
- },
- "darkness": results => {
- isnot(results.find.result, Ci.nsITypeAheadFind.FIND_NOTFOUND, "'darkness' should've been found");
- is(results.matches.total, 3, "should've found 3 matches");
- },
- "mammon": results => {
- isnot(results.find.result, Ci.nsITypeAheadFind.FIND_NOTFOUND, "'mammon' should've been found");
- is(results.matches.total, 1, "should've found 1 match");
- }
- }
- }
- };
-
- function onLoad() {
- Task.spawn(function* () {
- yield new Promise(resolve => {
- SpecialPowers.pushPrefEnv(
- { set: [["findbar.entireword", true]] }, resolve);
- });
-
- gFindBar = document.getElementById("FindToolbar");
- for (let browserId of ["content", "content-remote"]) {
- // XXXmikedeboer: when multiple test samples are available, make this
- // a nested loop that iterates over them. For now, only
- // latin is available.
- yield startTestWithBrowser("latin1", browserId);
- }
- }).then(() => {
- window.close();
- SimpleTest.finish();
- });
- }
-
- function* startTestWithBrowser(testName, browserId) {
- info("Starting test with browser '" + browserId + "'");
- gBrowser = document.getElementById(browserId);
- gFindBar.browser = gBrowser;
-
- let promise = ContentTask.spawn(gBrowser, null, function* () {
- return new Promise(resolve => {
- addEventListener("DOMContentLoaded", function listener() {
- removeEventListener("DOMContentLoaded", listener);
- resolve();
- });
- });
- });
- gBrowser.loadURI(kBaseURL + "/sample_entireword_" + testName + ".html");
- yield promise;
- yield onDocumentLoaded(testName);
- }
-
- function* onDocumentLoaded(testName) {
- let suite = kTests[testName];
- yield testSimpleEntireWord(suite.testSimpleEntireWord);
- yield testCaseSensitive(suite.testCaseSensitive);
- yield testWordBreakChars(suite.testWordBreakChars);
- yield testQuickfind(suite.testQuickfind);
- }
-
- var enterStringIntoFindField = Task.async(function* (str, waitForResult = true) {
- for (let promise, i = 0; i < str.length; i++) {
- if (waitForResult) {
- promise = promiseFindResult();
- }
- let event = document.createEvent("KeyboardEvent");
- event.initKeyEvent("keypress", true, true, null, false, false,
- false, false, 0, str.charCodeAt(i));
- gFindBar._findField.inputField.dispatchEvent(event);
- if (waitForResult) {
- yield promise;
- }
- }
- });
-
- function openFindbar() {
- document.getElementById("cmd_find").doCommand();
- return gFindBar._startFindDeferred && gFindBar._startFindDeferred.promise;
- }
-
- function promiseFindResult(searchString) {
- return new Promise(resolve => {
- let data = {};
- let listener = {
- onFindResult: res => {
- if (searchString && res.searchString != searchString)
- return;
-
- gFindBar.browser.finder.removeResultListener(listener);
- data.find = res;
- if (res.result == Ci.nsITypeAheadFind.FIND_NOTFOUND) {
- data.matches = { total: 0, current: 0 };
- resolve(data);
- return;
- }
- listener = {
- onMatchesCountResult: res => {
- gFindBar.browser.finder.removeResultListener(listener);
- data.matches = res;
- resolve(data);
- }
- };
- gFindBar.browser.finder.addResultListener(listener);
- }
- };
-
- gFindBar.browser.finder.addResultListener(listener);
- });
- }
-
- function* testIterator(tests) {
- for (let searchString of Object.getOwnPropertyNames(tests)) {
- gFindBar.clear();
-
- let promise = promiseFindResult(searchString);
-
- yield enterStringIntoFindField(searchString, false);
-
- let result = yield promise;
- tests[searchString](result);
- }
- }
-
- function* testSimpleEntireWord(tests) {
- yield openFindbar();
- ok(!gFindBar.hidden, "testSimpleEntireWord: findbar should be open");
-
- yield* testIterator(tests);
-
- gFindBar.close();
- }
-
- function* testCaseSensitive(tests) {
- yield openFindbar();
- ok(!gFindBar.hidden, "testCaseSensitive: findbar should be open");
-
- let matchCaseCheckbox = gFindBar.getElement("find-case-sensitive");
- if (!matchCaseCheckbox.hidden && !matchCaseCheckbox.checked)
- matchCaseCheckbox.click();
-
- yield* testIterator(tests);
-
- if (!matchCaseCheckbox.hidden)
- matchCaseCheckbox.click();
- gFindBar.close();
- }
-
- function* testWordBreakChars(tests) {
- yield openFindbar();
- ok(!gFindBar.hidden, "testWordBreakChars: findbar should be open");
-
- yield* testIterator(tests);
-
- gFindBar.close();
- }
-
- function* testQuickfind(tests) {
- yield ContentTask.spawn(gBrowser, null, function* () {
- let document = content.document;
- let event = document.createEvent("KeyboardEvent");
- event.initKeyEvent("keypress", true, true, null, false, false,
- false, false, 0, "/".charCodeAt(0));
- document.documentElement.dispatchEvent(event);
- });
-
- ok(!gFindBar.hidden, "testQuickfind: failed to open findbar");
- ok(document.commandDispatcher.focusedElement == gFindBar._findField.inputField,
- "testQuickfind: find field is not focused");
- ok(!gFindBar.getElement("entire-word-status").hidden,
- "testQuickfind: entire word mode status text should be visible");
-
- yield* testIterator(tests);
-
- gFindBar.close();
- }
- ]]></script>
-
- <commandset>
- <command id="cmd_find" oncommand="document.getElementById('FindToolbar').onFindCommand();"/>
- </commandset>
- <browser type="content-primary" flex="1" id="content" src="about:blank"/>
- <browser type="content-primary" flex="1" id="content-remote" remote="true" src="about:blank"/>
- <findbar id="FindToolbar" browserid="content"/>
-</window>
diff --git a/toolkit/content/tests/chrome/findbar_events_window.xul b/toolkit/content/tests/chrome/findbar_events_window.xul
deleted file mode 100644
index 2bfc52c146..0000000000
--- a/toolkit/content/tests/chrome/findbar_events_window.xul
+++ /dev/null
@@ -1,173 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- 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/. -->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-
-<window id="FindbarTest"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- width="600"
- height="600"
- onload="SimpleTest.executeSoon(startTest);"
- title="findbar events test">
-
- <script type="application/javascript"><![CDATA[
- const {interfaces: Ci, classes: Cc, results: Cr, utils: Cu} = Components;
- Cu.import("resource://gre/modules/Task.jsm");
- Cu.import("resource://testing-common/BrowserTestUtils.jsm");
- Cu.import("resource://testing-common/ContentTask.jsm");
- ContentTask.setTestScope(window.opener.wrappedJSObject);
-
- var gFindBar = null;
- var gBrowser;
- const kTimeout = 5000; // 5 seconds.
-
- var imports = ["SimpleTest", "ok", "is", "info"];
- for (var name of imports) {
- window[name] = window.opener.wrappedJSObject[name];
- }
- SimpleTest.requestLongerTimeout(2);
-
- function startTest() {
- Task.spawn(function* () {
- gFindBar = document.getElementById("FindToolbar");
- for (let browserId of ["content", "content-remote"]) {
- yield startTestWithBrowser(browserId);
- }
- }).then(() => {
- window.close();
- SimpleTest.finish();
- });
- }
-
- function* startTestWithBrowser(browserId) {
- info("Starting test with browser '" + browserId + "'");
- gBrowser = document.getElementById(browserId);
- gFindBar.browser = gBrowser;
- let promise = BrowserTestUtils.browserLoaded(gBrowser);
- gBrowser.loadURI("data:text/html,hello there");
- yield promise;
- yield onDocumentLoaded();
- }
-
- function* onDocumentLoaded() {
- gFindBar.open();
- gFindBar.onFindCommand();
-
- yield testFind();
- yield testFindAgain();
- yield testCaseSensitivity();
- yield testHighlight();
- }
-
- function checkSelection() {
- return new Promise(resolve => {
- SimpleTest.executeSoon(() => {
- ContentTask.spawn(gBrowser, null, function* () {
- let selected = content.getSelection();
- Assert.equal(String(selected), "", "No text is selected");
-
- let controller = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsISelectionDisplay)
- .QueryInterface(Ci.nsISelectionController);
- let selection = controller.getSelection(controller.SELECTION_FIND);
- Assert.equal(selection.rangeCount, 0, "No text is highlighted");
- }).then(resolve);
- });
- });
- }
-
- function once(node, eventName, preventDefault = true) {
- return new Promise((resolve, reject) => {
- let timeout = window.setTimeout(() => {
- reject("Event wasn't fired within " + kTimeout + "ms for event '" +
- eventName + "'.");
- }, kTimeout);
-
- node.addEventListener(eventName, function clb(e) {
- window.clearTimeout(timeout);
- node.removeEventListener(eventName, clb);
- if (preventDefault)
- e.preventDefault();
- resolve(e);
- });
- });
- }
-
- function* testFind() {
- info("Testing normal find.");
- let query = "t";
- let promise = once(gFindBar, "find");
-
- // Put some text in the find box.
- let event = document.createEvent("KeyboardEvent");
- event.initKeyEvent("keypress", true, true, null, false, false,
- false, false, 0, query.charCodeAt(0));
- gFindBar._findField.inputField.dispatchEvent(event);
-
- let e = yield promise;
- ok(e.detail.query === query, "find event query should match '" + query + "'");
- // Since we're preventing the default make sure nothing was selected.
- yield checkSelection();
- }
-
- function testFindAgain() {
- info("Testing repeating normal find.");
- let promise = once(gFindBar, "findagain");
-
- gFindBar.onFindAgainCommand();
-
- yield promise;
- // Since we're preventing the default make sure nothing was selected.
- yield checkSelection();
- }
-
- function* testCaseSensitivity() {
- info("Testing normal case sensitivity.");
- let promise = once(gFindBar, "findcasesensitivitychange", false);
-
- let matchCaseCheckbox = gFindBar.getElement("find-case-sensitive");
- matchCaseCheckbox.click();
-
- let e = yield promise;
- ok(e.detail.caseSensitive, "find should be case sensitive");
-
- // Toggle it back to the original setting.
- matchCaseCheckbox.click();
-
- // Changing case sensitivity does the search so clear the selected text
- // before the next test.
- yield ContentTask.spawn(gBrowser, null, () => content.getSelection().removeAllRanges());
- }
-
- function* testHighlight() {
- info("Testing find with highlight all.");
- // Update the find state so the highlight button is clickable.
- gFindBar.updateControlState(Ci.nsITypeAheadFind.FIND_FOUND, false);
-
- let promise = once(gFindBar, "findhighlightallchange");
-
- let highlightButton = gFindBar.getElement("highlight");
- if (!highlightButton.checked)
- highlightButton.click();
-
- let e = yield promise;
- ok(e.detail.highlightAll, "find event should have highlight all set");
- // Since we're preventing the default make sure nothing was highlighted.
- yield checkSelection();
-
- // Toggle it back to the original setting.
- if (highlightButton.checked)
- highlightButton.click();
- }
- ]]></script>
-
- <browser type="content-primary" flex="1" id="content" src="about:blank"/>
- <browser type="content-primary" flex="1" id="content-remote" remote="true" src="about:blank"/>
- <findbar id="FindToolbar" browserid="content"/>
-</window>
diff --git a/toolkit/content/tests/chrome/findbar_window.xul b/toolkit/content/tests/chrome/findbar_window.xul
deleted file mode 100644
index f17f760fe0..0000000000
--- a/toolkit/content/tests/chrome/findbar_window.xul
+++ /dev/null
@@ -1,756 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- 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/. -->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-
-<window id="FindbarTest"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- width="600"
- height="600"
- onload="onLoad();"
- title="findbar test">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
- <script type="application/javascript"><![CDATA[
- const {interfaces: Ci, classes: Cc, results: Cr, utils: Cu} = Components;
- Cu.import("resource://gre/modules/AppConstants.jsm");
- Cu.import("resource://gre/modules/Task.jsm");
- Cu.import("resource://testing-common/BrowserTestUtils.jsm");
- Cu.import("resource://testing-common/ContentTask.jsm");
- ContentTask.setTestScope(window.opener.wrappedJSObject);
-
- var gPrefsvc = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
-
- const SAMPLE_URL = "http://www.mozilla.org/";
- const SAMPLE_TEXT = "Some text in a text field.";
- const SEARCH_TEXT = "Text Test";
- const NOT_FOUND_TEXT = "This text is not on the page."
- const ITERATOR_TIMEOUT = gPrefsvc.getIntPref("findbar.iteratorTimeout");
-
- var gFindBar = null;
- var gBrowser;
-
- var gClipboard = Cc["@mozilla.org/widget/clipboard;1"].getService(Ci.nsIClipboard);
- var gHasFindClipboard = gClipboard.supportsFindClipboard();
-
- var gStatusText;
- var gXULBrowserWindow = {
- QueryInterface: function(aIID) {
- if (aIID.Equals(Ci.nsIXULBrowserWindow) ||
- aIID.Equals(Ci.nsISupports))
- return this;
-
- throw Cr.NS_NOINTERFACE;
- },
-
- setJSStatus: function() { },
-
- setOverLink: function(aStatusText, aLink) {
- gStatusText = aStatusText;
- },
-
- onBeforeLinkTraversal: function() { }
- };
-
- var imports = ["SimpleTest", "ok", "is", "info"];
- for (var name of imports) {
- window[name] = window.opener.wrappedJSObject[name];
- }
- SimpleTest.requestLongerTimeout(2);
-
- function onLoad() {
- Task.spawn(function* () {
- window.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIDocShellTreeItem)
- .treeOwner
- .QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIXULWindow)
- .XULBrowserWindow = gXULBrowserWindow;
-
- gFindBar = document.getElementById("FindToolbar");
- for (let browserId of ["content", "content-remote"]) {
- yield startTestWithBrowser(browserId);
- }
- }).then(() => {
- window.close();
- SimpleTest.finish();
- });
- }
-
- function* startTestWithBrowser(browserId) {
- info("Starting test with browser '" + browserId + "'");
- gBrowser = document.getElementById(browserId);
- gFindBar.browser = gBrowser;
-
- // Tests delays the loading of a document for one second.
- yield new Promise(resolve => setTimeout(resolve, 1000));
-
- let promise = BrowserTestUtils.browserLoaded(gBrowser);
- gBrowser.loadURI("data:text/html,<h2 id='h2'>" + SEARCH_TEXT +
- "</h2><h2><a href='" + SAMPLE_URL + "'>Link Test</a></h2><input id='text' type='text' value='" +
- SAMPLE_TEXT + "'></input><input id='button' type='button'></input><img id='img' width='50' height='50'/>");
- yield promise;
- yield onDocumentLoaded();
- }
-
- function* onDocumentLoaded() {
- yield testNormalFind();
- gFindBar.close();
- ok(gFindBar.hidden, "Failed to close findbar after testNormalFind");
- yield openFindbar();
- yield testNormalFindWithComposition();
- gFindBar.close();
- ok(gFindBar.hidden, "findbar should be hidden after testNormalFindWithComposition");
- yield openFindbar();
- yield testAutoCaseSensitivityUI();
- yield testQuickFindText();
- gFindBar.close();
- ok(gFindBar.hidden, "Failed to close findbar after testQuickFindText");
- // TODO: `testFindWithHighlight` tests fastFind integrity, which can not
- // be accessed with RemoteFinder. We're skipping it for now.
- if (gFindBar._browser.finder._fastFind) {
- yield testFindWithHighlight();
- gFindBar.close();
- ok(gFindBar.hidden, "Failed to close findbar after testFindWithHighlight");
- }
- yield testFindbarSelection();
- ok(gFindBar.hidden, "Failed to close findbar after testFindbarSelection");
- // TODO: I don't know how to drop a content element on a chrome input.
- if (!gBrowser.hasAttribute("remote"))
- testDrop();
- yield testQuickFindLink();
- if (gHasFindClipboard) {
- yield testStatusText();
- }
-
- if (!AppConstants.DEBUG) {
- yield testFindCountUI();
- gFindBar.close();
- ok(gFindBar.hidden, "Failed to close findbar after testFindCountUI");
- yield testFindCountUI(true);
- gFindBar.close();
- ok(gFindBar.hidden, "Failed to close findbar after testFindCountUI - linksOnly");
- }
-
- yield openFindbar();
- yield testFindAfterCaseChanged();
- gFindBar.close();
- yield openFindbar();
- yield testFailedStringReset();
- gFindBar.close();
- yield testQuickFindClose();
- // TODO: This doesn't seem to work when the findbar is connected to a
- // remote browser element.
- if (!gBrowser.hasAttribute("remote"))
- yield testFindAgainNotFound();
- yield testToggleEntireWord();
- }
-
- function* testFindbarSelection() {
- function checkFindbarState(aTestName, aExpSelection) {
- ok(!gFindBar.hidden, "testFindbarSelection: failed to open findbar: " + aTestName);
- ok(document.commandDispatcher.focusedElement == gFindBar._findField.inputField,
- "testFindbarSelection: find field is not focused: " + aTestName);
- if (!gHasFindClipboard) {
- ok(gFindBar._findField.value == aExpSelection,
- "Incorrect selection in testFindbarSelection: " + aTestName +
- ". Selection: " + gFindBar._findField.value);
- }
-
- // Clear the value, close the findbar.
- gFindBar._findField.value = "";
- gFindBar.close();
- }
-
- // Test normal selected text.
- yield ContentTask.spawn(gBrowser, null, function* () {
- let document = content.document;
- let cH2 = document.getElementById("h2");
- let cSelection = content.getSelection();
- let cRange = document.createRange();
- cRange.setStart(cH2, 0);
- cRange.setEnd(cH2, 1);
- cSelection.removeAllRanges();
- cSelection.addRange(cRange);
- });
- yield openFindbar();
- checkFindbarState("plain text", SEARCH_TEXT);
-
- // Test nsIDOMNSEditableElement with selection.
- yield ContentTask.spawn(gBrowser, null, function* () {
- let textInput = content.document.getElementById("text");
- textInput.focus();
- textInput.select();
- });
- yield openFindbar();
- checkFindbarState("text input", SAMPLE_TEXT);
-
- // Test non-editable nsIDOMNSEditableElement (button).
- yield ContentTask.spawn(gBrowser, null, function* () {
- content.document.getElementById("button").focus();
- });
- yield openFindbar();
- checkFindbarState("button", "");
- }
-
- function testDrop() {
- gFindBar.open();
- // use an dummy image to start the drag so it doesn't get interrupted by a selection
- var img = gBrowser.contentDocument.getElementById("img");
- synthesizeDrop(img, gFindBar._findField, [[ {type: "text/plain", data: "Rabbits" } ]], "copy", window);
- is(gFindBar._findField.inputField.value, "Rabbits", "drop on findbar");
- gFindBar.close();
- }
-
- function testQuickFindClose() {
- return new Promise(resolve => {
- var _isClosedCallback = function() {
- ok(gFindBar.hidden,
- "_isClosedCallback: Failed to auto-close quick find bar after " +
- gFindBar._quickFindTimeoutLength + "ms");
- resolve();
- };
- setTimeout(_isClosedCallback, gFindBar._quickFindTimeoutLength + 100);
- });
- }
-
- function testStatusText() {
- return new Promise(resolve => {
- var _delayedCheckStatusText = function() {
- ok(gStatusText == SAMPLE_URL, "testStatusText: Failed to set status text of found link");
- resolve();
- };
- setTimeout(_delayedCheckStatusText, 100);
- });
- }
-
- function promiseFindResult() {
- return new Promise(resolve => {
- let listener = {
- onFindResult: function(result) {
- gFindBar.browser.finder.removeResultListener(listener);
- resolve(result);
- }
- };
- gFindBar.browser.finder.addResultListener(listener);
- });
- }
-
- function promiseMatchesCountResult() {
- return new Promise(resolve => {
- let listener = {
- onMatchesCountResult: function() {
- gFindBar.browser.finder.removeResultListener(listener);
- resolve();
- }
- };
- gFindBar.browser.finder.addResultListener(listener);
- // Make sure we resolve _at least_ after five times the find iterator timeout.
- setTimeout(resolve, (ITERATOR_TIMEOUT * 5) + 20);
- });
- }
-
- function promiseHighlightFinished() {
- return new Promise(resolve => {
- let listener = {
- onHighlightFinished() {
- gFindBar.browser.finder.removeResultListener(listener);
- resolve();
- }
- };
- gFindBar.browser.finder.addResultListener(listener);
- });
- }
-
- var enterStringIntoFindField = Task.async(function* (str, waitForResult = true) {
- for (let promise, i = 0; i < str.length; i++) {
- if (waitForResult) {
- promise = promiseFindResult();
- }
- let event = document.createEvent("KeyboardEvent");
- event.initKeyEvent("keypress", true, true, null, false, false,
- false, false, 0, str.charCodeAt(i));
- gFindBar._findField.inputField.dispatchEvent(event);
- if (waitForResult) {
- yield promise;
- }
- }
- });
-
- function promiseExpectRangeCount(rangeCount) {
- return ContentTask.spawn(gBrowser, { rangeCount }, function* (args) {
- let controller = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsISelectionDisplay)
- .QueryInterface(Ci.nsISelectionController);
- let sel = controller.getSelection(Ci.nsISelectionController.SELECTION_FIND);
- Assert.equal(sel.rangeCount, args.rangeCount,
- "Expected the correct amount of ranges inside the Find selection");
- });
- }
-
- // also test match-case
- function* testNormalFind() {
- document.getElementById("cmd_find").doCommand();
-
- ok(!gFindBar.hidden, "testNormalFind: failed to open findbar");
- ok(document.commandDispatcher.focusedElement == gFindBar._findField.inputField,
- "testNormalFind: find field is not focused");
-
- let promise;
- let matchCaseCheckbox = gFindBar.getElement("find-case-sensitive");
- if (!matchCaseCheckbox.hidden && matchCaseCheckbox.checked) {
- promise = promiseFindResult();
- matchCaseCheckbox.click();
- yield promise;
- }
-
- var searchStr = "text tes";
- yield enterStringIntoFindField(searchStr);
-
- let sel = yield ContentTask.spawn(gBrowser, { searchStr }, function* (args) {
- let sel = content.getSelection().toString();
- Assert.equal(sel.toLowerCase(), args.searchStr,
- "testNormalFind: failed to find '" + args.searchStr + "'");
- return sel;
- });
- testClipboardSearchString(sel);
-
- if (!matchCaseCheckbox.hidden) {
- promise = promiseFindResult();
- matchCaseCheckbox.click();
- yield promise;
- enterStringIntoFindField("t");
- yield ContentTask.spawn(gBrowser, { searchStr }, function* (args) {
- Assert.notEqual(content.getSelection().toString(), args.searchStr,
- "testNormalFind: Case-sensitivy is broken '" + args.searchStr + "'");
- });
- promise = promiseFindResult();
- matchCaseCheckbox.click();
- yield promise;
- }
- }
-
- function openFindbar() {
- document.getElementById("cmd_find").doCommand();
- return gFindBar._startFindDeferred && gFindBar._startFindDeferred.promise;
- }
-
- function* testNormalFindWithComposition() {
- ok(!gFindBar.hidden, "testNormalFindWithComposition: findbar should be open");
- ok(document.commandDispatcher.focusedElement == gFindBar._findField.inputField,
- "testNormalFindWithComposition: find field should be focused");
-
- var matchCaseCheckbox = gFindBar.getElement("find-case-sensitive");
- var clicked = false;
- if (!matchCaseCheckbox.hidden & matchCaseCheckbox.checked) {
- matchCaseCheckbox.click();
- clicked = true;
- }
-
- gFindBar._findField.inputField.focus();
-
- var searchStr = "text";
-
- synthesizeCompositionChange(
- { "composition":
- { "string": searchStr,
- "clauses":
- [
- { "length": searchStr.length, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
- ]
- },
- "caret": { "start": searchStr.length, "length": 0 }
- });
-
- yield ContentTask.spawn(gBrowser, { searchStr }, function* (args) {
- Assert.notEqual(content.getSelection().toString().toLowerCase(), args.searchStr,
- "testNormalFindWithComposition: text shouldn't be found during composition");
- });
-
- synthesizeComposition({ type: "compositioncommitasis" });
-
- let sel = yield ContentTask.spawn(gBrowser, { searchStr }, function* (args) {
- let sel = content.getSelection().toString();
- Assert.equal(sel.toLowerCase(), args.searchStr,
- "testNormalFindWithComposition: text should be found after committing composition");
- return sel;
- });
- testClipboardSearchString(sel);
-
- if (clicked) {
- matchCaseCheckbox.click();
- }
- }
-
- function* testAutoCaseSensitivityUI() {
- var matchCaseCheckbox = gFindBar.getElement("find-case-sensitive");
- var matchCaseLabel = gFindBar.getElement("match-case-status");
- ok(!matchCaseCheckbox.hidden, "match case box is hidden in manual mode");
- ok(matchCaseLabel.hidden, "match case label is visible in manual mode");
-
- gPrefsvc.setIntPref("accessibility.typeaheadfind.casesensitive", 2);
-
- ok(matchCaseCheckbox.hidden,
- "match case box is visible in automatic mode");
- ok(!matchCaseLabel.hidden,
- "match case label is hidden in automatic mode");
-
- yield enterStringIntoFindField("a");
- var insensitiveLabel = matchCaseLabel.value;
- yield enterStringIntoFindField("A");
- var sensitiveLabel = matchCaseLabel.value;
- ok(insensitiveLabel != sensitiveLabel,
- "Case Sensitive label was not correctly updated");
-
- // bug 365551
- gFindBar.onFindAgainCommand();
- ok(matchCaseCheckbox.hidden && !matchCaseLabel.hidden,
- "bug 365551: case sensitivity UI is broken after find-again");
- gPrefsvc.setIntPref("accessibility.typeaheadfind.casesensitive", 0);
- gFindBar.close();
- }
-
- function* clearFocus() {
- document.commandDispatcher.focusedElement = null;
- document.commandDispatcher.focusedWindow = null;
- yield ContentTask.spawn(gBrowser, null, function* () {
- content.focus();
- });
- }
-
- function* testQuickFindLink() {
- yield clearFocus();
-
- yield ContentTask.spawn(gBrowser, null, function* () {
- let document = content.document;
- let event = document.createEvent("KeyboardEvent");
- event.initKeyEvent("keypress", true, true, null, false, false,
- false, false, 0, "'".charCodeAt(0));
- document.documentElement.dispatchEvent(event);
- });
-
- ok(!gFindBar.hidden, "testQuickFindLink: failed to open findbar");
- ok(document.commandDispatcher.focusedElement == gFindBar._findField.inputField,
- "testQuickFindLink: find field is not focused");
-
- var searchStr = "Link Test";
- yield enterStringIntoFindField(searchStr);
- yield ContentTask.spawn(gBrowser, { searchStr }, function* (args) {
- Assert.equal(content.getSelection().toString(), args.searchStr,
- "testQuickFindLink: failed to find sample link");
- });
- testClipboardSearchString(searchStr);
- }
-
- // See bug 963925 for more details on this test.
- function* testFindWithHighlight() {
- gFindBar._findField.value = "";
-
- // For this test, we want to closely control the selection. The easiest
- // way to do so is to replace the implementation of
- // Finder.getInitialSelection with a no-op and call the findbar's callback
- // (onCurrentSelection(..., true)) ourselves with our hand-picked
- // selection.
- let oldGetInitialSelection = gFindBar.browser.finder.getInitialSelection;
- let searchStr;
- gFindBar.browser.finder.getInitialSelection = function(){};
-
- let findCommand = document.getElementById("cmd_find");
- findCommand.doCommand();
-
- gFindBar.onCurrentSelection("", true);
-
- searchStr = "e";
- yield enterStringIntoFindField(searchStr);
-
- let a = gFindBar._findField.value;
- let b = gFindBar._browser.finder._fastFind.searchString;
- let c = gFindBar._browser.finder.searchString;
- ok(a == b && b == c, "testFindWithHighlight 1: " + a + ", " + b + ", " + c + ".");
-
- searchStr = "t";
- findCommand.doCommand();
-
- gFindBar.onCurrentSelection(searchStr, true);
- gFindBar.browser.finder.getInitialSelection = oldGetInitialSelection;
-
- a = gFindBar._findField.value;
- b = gFindBar._browser.finder._fastFind.searchString;
- c = gFindBar._browser.finder.searchString;
- ok(a == searchStr && b == c, "testFindWithHighlight 2: " + searchStr +
- ", " + a + ", " + b + ", " + c + ".");
-
- let highlightButton = gFindBar.getElement("highlight");
- highlightButton.click();
- ok(highlightButton.checked, "testFindWithHighlight 3: Highlight All should be checked.");
-
- a = gFindBar._findField.value;
- b = gFindBar._browser.finder._fastFind.searchString;
- c = gFindBar._browser.finder.searchString;
- ok(a == searchStr && b == c, "testFindWithHighlight 4: " + a + ", " + b + ", " + c + ".");
-
- gFindBar.onFindAgainCommand();
- a = gFindBar._findField.value;
- b = gFindBar._browser.finder._fastFind.searchString;
- c = gFindBar._browser.finder.searchString;
- ok(a == b && b == c, "testFindWithHighlight 5: " + a + ", " + b + ", " + c + ".");
-
- highlightButton.click();
- ok(!highlightButton.checked, "testFindWithHighlight: Highlight All should be unchecked.");
-
- // Regression test for bug 1316515.
- searchStr = "e";
- gFindBar.clear();
- yield enterStringIntoFindField(searchStr);
- yield promiseExpectRangeCount(0);
-
- highlightButton.click();
- ok(highlightButton.checked, "testFindWithHighlight: Highlight All should be checked.");
- yield promiseHighlightFinished();
- yield promiseExpectRangeCount(3);
-
- synthesizeKey("VK_BACK_SPACE", {});
- yield promiseExpectRangeCount(0);
-
- // Regression test for bug 1316513.
- highlightButton.click();
- ok(!highlightButton.checked, "testFindWithHighlight - 1316513: Highlight All should be unchecked.");
- yield enterStringIntoFindField(searchStr);
-
- highlightButton.click();
- ok(highlightButton.checked, "testFindWithHighlight - 1316513: Highlight All should be checked.");
- yield promiseHighlightFinished();
- yield promiseExpectRangeCount(3);
-
- let promise = BrowserTestUtils.browserLoaded(gBrowser);
- gBrowser.reload();
- yield promise;
-
- ok(highlightButton.checked, "testFindWithHighlight - 1316513: Highlight All " +
- "should still be checked after a reload.");
- synthesizeKey("VK_RETURN", {});
- yield promiseHighlightFinished();
- yield promiseExpectRangeCount(3);
-
- // Uncheck at test end to not interfere with other test functions that are
- // run after this one.
- highlightButton.click();
- }
-
- function* testQuickFindText() {
- yield clearFocus();
-
- yield ContentTask.spawn(gBrowser, null, function* () {
- let document = content.document;
- let event = document.createEvent("KeyboardEvent");
- event.initKeyEvent("keypress", true, true, null, false, false,
- false, false, 0, "/".charCodeAt(0));
- document.documentElement.dispatchEvent(event);
- });
-
- ok(!gFindBar.hidden, "testQuickFindText: failed to open findbar");
- ok(document.commandDispatcher.focusedElement == gFindBar._findField.inputField,
- "testQuickFindText: find field is not focused");
-
- yield enterStringIntoFindField(SEARCH_TEXT);
- yield ContentTask.spawn(gBrowser, { SEARCH_TEXT }, function* (args) {
- Assert.equal(content.getSelection().toString(), args.SEARCH_TEXT,
- "testQuickFindText: failed to find '" + args.SEARCH_TEXT + "'");
- });
- testClipboardSearchString(SEARCH_TEXT);
- }
-
- function* testFindCountUI(linksOnly = false) {
- yield clearFocus();
-
- if (linksOnly) {
- yield ContentTask.spawn(gBrowser, null, function* () {
- let document = content.document;
- let event = document.createEvent("KeyboardEvent");
- event.initKeyEvent("keypress", true, true, null, false, false,
- false, false, 0, "'".charCodeAt(0));
- document.documentElement.dispatchEvent(event);
- });
- } else {
- document.getElementById("cmd_find").doCommand();
- }
-
- ok(!gFindBar.hidden, "testFindCountUI: failed to open findbar");
- ok(document.commandDispatcher.focusedElement == gFindBar._findField.inputField,
- "testFindCountUI: find field is not focused");
-
- let promise;
- let matchCase = gFindBar.getElement("find-case-sensitive");
- if (matchCase.checked) {
- promise = promiseFindResult();
- matchCase.click();
- yield new Promise(resolve => setTimeout(resolve, ITERATOR_TIMEOUT + 20));
- yield promise;
- }
-
- let foundMatches = gFindBar._foundMatches;
- let tests = [{
- text: "t",
- current: linksOnly ? 1 : 5,
- total: linksOnly ? 2 : 10,
- }, {
- text: "te",
- current: linksOnly ? 1 : 3,
- total: linksOnly ? 1 : 5,
- }, {
- text: "tes",
- current: 1,
- total: linksOnly ? 1 : 2,
- }, {
- text: "texxx",
- current: 0,
- total: 0
- }];
- let regex = /([\d]*)\sof\s([\d]*)/;
-
- function assertMatches(aTest, aMatches) {
- is(aMatches[1], String(aTest.current),
- `${linksOnly ? "[Links-only] " : ""}Currently highlighted match should be at ${aTest.current} for '${aTest.text}'`);
- is(aMatches[2], String(aTest.total),
- `${linksOnly ? "[Links-only] " : ""}Total amount of matches should be ${aTest.total} for '${aTest.text}'`);
- }
-
- for (let test of tests) {
- gFindBar._findField.select();
- gFindBar._findField.focus();
-
- let timeout = ITERATOR_TIMEOUT;
- if (test.text.length == 1)
- timeout *= 4;
- else if (test.text.length == 2)
- timeout *= 2;
- timeout += 20;
- yield new Promise(resolve => setTimeout(resolve, timeout));
- yield enterStringIntoFindField(test.text, false);
- yield promiseMatchesCountResult();
- let matches = foundMatches.value.match(regex);
- if (!test.total) {
- ok(!matches, "No message should be shown when 0 matches are expected");
- } else {
- assertMatches(test, matches);
- for (let i = 1; i < test.total; i++) {
- yield new Promise(resolve => setTimeout(resolve, timeout));
- gFindBar.onFindAgainCommand();
- yield promiseMatchesCountResult();
- // test.current + 1, test.current + 2, ..., test.total, 1, ..., test.current
- let current = (test.current + i - 1) % test.total + 1;
- assertMatches({
- text: test.text,
- current: current,
- total: test.total
- }, foundMatches.value.match(regex));
- }
- }
- }
- }
-
- // See bug 1051187.
- function* testFindAfterCaseChanged() {
- // Search to set focus on "Text Test" so that searching for "t" selects first
- // (upper case!) "T".
- yield enterStringIntoFindField(SEARCH_TEXT);
- gFindBar.clear();
-
- gPrefsvc.setIntPref("accessibility.typeaheadfind.casesensitive", 0);
-
- yield enterStringIntoFindField("t");
- yield ContentTask.spawn(gBrowser, null, function* () {
- Assert.equal(content.getSelection().toString(), "T", "First T should be selected.");
- });
-
- gPrefsvc.setIntPref("accessibility.typeaheadfind.casesensitive", 1);
- yield ContentTask.spawn(gBrowser, null, function* () {
- Assert.equal(content.getSelection().toString(), "t", "First t should be selected.");
- });
- }
-
- // Make sure that _findFailedString is cleared:
- // 1. Do a search that fails with case sensitivity but matches with no case sensitivity.
- // 2. Uncheck case sensitivity button to match the string.
- function* testFailedStringReset() {
- gPrefsvc.setIntPref("accessibility.typeaheadfind.casesensitive", 1);
-
- yield enterStringIntoFindField(SEARCH_TEXT.toUpperCase(), false);
- yield ContentTask.spawn(gBrowser, null, function* () {
- Assert.equal(content.getSelection().toString(), "", "Not found.");
- });
-
- gPrefsvc.setIntPref("accessibility.typeaheadfind.casesensitive", 0);
- yield ContentTask.spawn(gBrowser, { SEARCH_TEXT }, function* (args) {
- Assert.equal(content.getSelection().toString(), args.SEARCH_TEXT,
- "Search text should be selected.");
- });
- }
-
- function testClipboardSearchString(aExpected) {
- if (!gHasFindClipboard)
- return;
-
- if (!aExpected)
- aExpected = "";
- var searchStr = gFindBar.browser.finder.clipboardSearchString;
- ok(searchStr.toLowerCase() == aExpected.toLowerCase(),
- "testClipboardSearchString: search string not set to '" + aExpected +
- "', instead found '" + searchStr + "'");
- }
-
- // See bug 967982.
- function* testFindAgainNotFound() {
- yield openFindbar();
- yield enterStringIntoFindField(NOT_FOUND_TEXT, false);
- gFindBar.close();
- ok(gFindBar.hidden, "The findbar is closed.");
- let promise = promiseFindResult();
- gFindBar.onFindAgainCommand();
- yield promise;
- ok(!gFindBar.hidden, "Unsuccessful Find Again opens the find bar.");
-
- yield enterStringIntoFindField(SEARCH_TEXT);
- gFindBar.close();
- ok(gFindBar.hidden, "The findbar is closed.");
- promise = promiseFindResult();
- gFindBar.onFindAgainCommand();
- yield promise;
- ok(gFindBar.hidden, "Successful Find Again leaves the find bar closed.");
- }
-
- function* testToggleEntireWord() {
- yield openFindbar();
- let promise = promiseFindResult();
- yield enterStringIntoFindField("Tex", false);
- let result = yield promise;
- is(result.result, Ci.nsITypeAheadFind.FIND_FOUND, "Text should be found");
-
- yield new Promise(resolve => setTimeout(resolve, ITERATOR_TIMEOUT + 20));
- promise = promiseFindResult();
- let check = gFindBar.getElement("find-entire-word");
- check.click();
- result = yield promise;
- is(result.result, Ci.nsITypeAheadFind.FIND_NOTFOUND, "Text should NOT be found");
-
- check.click();
- gFindBar.close(true);
- }
- ]]></script>
-
- <commandset>
- <command id="cmd_find" oncommand="document.getElementById('FindToolbar').onFindCommand();"/>
- </commandset>
- <browser type="content-primary" flex="1" id="content" src="about:blank"/>
- <browser type="content-primary" flex="1" id="content-remote" remote="true" src="about:blank"/>
- <findbar id="FindToolbar" browserid="content"/>
-</window>
diff --git a/toolkit/content/tests/chrome/frame_popup_anchor.xul b/toolkit/content/tests/chrome/frame_popup_anchor.xul
deleted file mode 100644
index be6254ce01..0000000000
--- a/toolkit/content/tests/chrome/frame_popup_anchor.xul
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-
-<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
-<menupopup id="popup" onpopupshowing="if (isSecondTest) popupShowing(event)" onpopupshown="popupShown()"
- onpopuphidden="nextTest()">
- <menuitem label="One"/>
- <menuitem label="Two"/>
-</menupopup>
-
-<button id="button" label="OK" popup="popup"/>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-var isSecondTest = false;
-
-function openPopup()
-{
- document.getElementById("popup").openPopup(parent.document.getElementById("outerbutton"), "after_start", 3, 1);
-}
-
-function popupShowing(event)
-{
- var buttonrect = document.getElementById("button").getBoundingClientRect();
- parent.opener.wrappedJSObject.SimpleTest.is(event.clientX, buttonrect.left + 6, "popup clientX with mouse");
- parent.opener.wrappedJSObject.SimpleTest.is(event.clientY, buttonrect.top + 6, "popup clientY with mouse");
-}
-
-function popupShown()
-{
- var left, top;
- var popuprect = document.getElementById("popup").getBoundingClientRect();
- if (isSecondTest) {
- var buttonrect = document.getElementById("button").getBoundingClientRect();
- left = buttonrect.left + 6;
- top = buttonrect.top + 6;
- }
- else {
- var iframerect = parent.document.getElementById("frame").getBoundingClientRect();
- var buttonrect = parent.document.getElementById("outerbutton").getBoundingClientRect();
-
- // The popup should appear anchored on the bottom left edge of the button, however
- // the client rectangle is relative to the iframe's document. Thus the coordinates
- // are:
- // left = iframe's left - anchor button's left - 3 pixel offset passed to openPopup +
- // iframe border (17px) + iframe padding (0)
- // top = iframe's top - anchor button's bottom - 1 pixel offset passed to openPopup +
- // iframe border (0) + iframe padding (3px);
- left = -(Math.round(iframerect.left) - Math.round(buttonrect.left) + 14);
- top = -(Math.round(iframerect.top) - Math.round(buttonrect.bottom) + 2);
- }
-
- var testid = isSecondTest ? "with mouse" : "anchored to parent frame";
- parent.opener.wrappedJSObject.SimpleTest.is(Math.round(popuprect.left), left, "popup left " + testid);
- parent.opener.wrappedJSObject.SimpleTest.is(Math.round(popuprect.top), top, "popup top " + testid);
-
- document.getElementById("popup").hidePopup();
-}
-
-function nextTest()
-{
- if (isSecondTest) {
- parent.opener.wrappedJSObject.SimpleTest.finish();
- parent.close();
- }
- else {
- // this second test ensures that the popupshowing coordinates when a popup in
- // a frame is opened are correct
- isSecondTest = true;
- synthesizeMouse(document.getElementById("button"), 6, 6, { });
- }
-}
-
-]]>
-</script>
-
-</page>
diff --git a/toolkit/content/tests/chrome/frame_popupremoving_frame.xul b/toolkit/content/tests/chrome/frame_popupremoving_frame.xul
deleted file mode 100644
index e8f00ce7a9..0000000000
--- a/toolkit/content/tests/chrome/frame_popupremoving_frame.xul
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-
-<window title="Popup Removing Frame Tests"
- onload="setTimeout(init, 0)"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<hbox>
-
-<menu id="separatemenu1" label="Menu">
- <menupopup id="separatepopup1" onpopupshown="document.getElementById('separatemenu2').open = true">
- <menuitem label="L1 One"/>
- <menuitem label="L1 Two"/>
- <menuitem label="L1 Three"/>
- </menupopup>
-</menu>
-
-<menu id="separatemenu2" label="Menu">
- <menupopup id="separatepopup2" onpopupshown="document.getElementById('separatemenu3').open = true">
- <menuitem label="L2 One"/>
- <menuitem label="L2 Two"/>
- <menuitem label="L2 Three"/>
- </menupopup>
-</menu>
-
-<menu id="separatemenu3" label="Menu" onpopupshown="document.getElementById('separatemenu4').open = true">
- <menupopup id="separatepopup3">
- <menuitem label="L3 One"/>
- <menuitem label="L3 Two"/>
- <menuitem label="L3 Three"/>
- </menupopup>
-</menu>
-
-<menu id="separatemenu4" label="Menu" onpopupshown="document.getElementById('nestedmenu1').open = true">
- <menupopup id="separatepopup3">
- <menuitem label="L4 One"/>
- <menuitem label="L4 Two"/>
- <menuitem label="L4 Three"/>
- </menupopup>
-</menu>
-
-</hbox>
-
-<menu id="nestedmenu1" label="Menu">
- <menupopup id="nestedpopup1" onpopupshown="if (event.target == this) this.firstChild.open = true">
- <menu id="nestedmenu2" label="Menu">
- <menupopup id="nestedpopup2" onpopupshown="if (event.target == this) this.firstChild.open = true">
- <menu id="nestedmenu3" label="Menu">
- <menupopup id="nestedpopup3" onpopupshown="if (event.target == this) this.firstChild.open = true">
- <menu id="nestedmenu4" label="Menu" onpopupshown="parent.popupsOpened()">
- <menupopup id="nestedpopup4">
- <menuitem label="Nested One"/>
- <menuitem label="Nested Two"/>
- <menuitem label="Nested Three"/>
- </menupopup>
- </menu>
- </menupopup>
- </menu>
- </menupopup>
- </menu>
- </menupopup>
-</menu>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-function init()
-{
- document.getElementById("separatemenu1").open = true;
-}
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/frame_subframe_origin_subframe1.xul b/toolkit/content/tests/chrome/frame_subframe_origin_subframe1.xul
deleted file mode 100644
index c85083cb79..0000000000
--- a/toolkit/content/tests/chrome/frame_subframe_origin_subframe1.xul
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0"?>
-<!-- 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/. -->
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-
-<page id="frame1"
- style="background-color:green;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
-<spacer height="10px"/>
-<iframe
- style="margin:10px; min-height:170px; max-width:200px; max-height:200px; border:solid 1px white;"
- src="frame_subframe_origin_subframe2.xul"></iframe>
-<spacer height="3px"/>
-<caption id="cap1" style="min-width:200px; max-width:200px; background-color:white;" label=""/>
-<script class="testbody" type="application/javascript">
-
-// Fire a mouse move event aimed at this window, and check to be
-// sure the client coords translate from widget to the dom correctly.
-
-function runTests()
-{
- synthesizeMouse(document.getElementById("frame1"), 3, 4, { type: "mousemove" });
-}
-
-function mouseMove(e) {
- e.stopPropagation();
- var element = e.target;
- var el = document.getElementById("cap1");
- el.label = "client: (" + e.clientX + "," + e.clientY + ")";
- parent.opener.wrappedJSObject.SimpleTest.is(e.clientX, 3, "mouse event clientX on sub frame 1");
- parent.opener.wrappedJSObject.SimpleTest.is(e.clientY, 4, "mouse event clientY on sub frame 1");
- // fire the next test on the sub frame
- frames[0].runTests();
-}
-
-window.addEventListener("mousemove", mouseMove, false);
-
-</script>
-</page>
diff --git a/toolkit/content/tests/chrome/frame_subframe_origin_subframe2.xul b/toolkit/content/tests/chrome/frame_subframe_origin_subframe2.xul
deleted file mode 100644
index 92ef64b898..0000000000
--- a/toolkit/content/tests/chrome/frame_subframe_origin_subframe2.xul
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0"?>
-<!-- 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/. -->
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-
-<page id="frame2"
- style="background-color:red;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
-<spacer height="10px"/>
-<caption id="cap2" style="background-color:white;" label=""/>
-<script class="testbody" type="application/javascript">
-
-// Fire a mouse move event aimed at this window, and check to be
-// sure the client coords translate from widget to the dom correctly.
-
-function runTests()
-{
- synthesizeMouse(document.getElementById("frame2"), 6, 5, { type: "mousemove" });
-}
-
-function mouseMove(e) {
- e.stopPropagation();
- var element = e.target;
- var el = document.getElementById("cap2");
- el.label = "client: (" + e.clientX + "," + e.clientY + ")";
- parent.parent.opener.wrappedJSObject.SimpleTest.is(e.clientX, 6, "mouse event clientX on sub frame 2");
- parent.parent.opener.wrappedJSObject.SimpleTest.is(e.clientY, 5, "mouse event clientY on sub frame 2");
- parent.parent.opener.wrappedJSObject.SimpleTest.finish();
- parent.parent.close();
-}
-
-window.addEventListener("mousemove",mouseMove, false);
-
-</script>
-</page>
diff --git a/toolkit/content/tests/chrome/popup_childframe_node.xul b/toolkit/content/tests/chrome/popup_childframe_node.xul
deleted file mode 100644
index 512f5f8c26..0000000000
--- a/toolkit/content/tests/chrome/popup_childframe_node.xul
+++ /dev/null
@@ -1,2 +0,0 @@
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" width="80" height="80"
- onclick="document.documentElement.setAttribute('data', 'x' + document.popupNode)"/>
diff --git a/toolkit/content/tests/chrome/popup_trigger.js b/toolkit/content/tests/chrome/popup_trigger.js
deleted file mode 100644
index 920d4d0702..0000000000
--- a/toolkit/content/tests/chrome/popup_trigger.js
+++ /dev/null
@@ -1,859 +0,0 @@
-var gMenuPopup = null;
-var gTrigger = null;
-var gIsMenu = false;
-var gScreenX = -1, gScreenY = -1;
-var gCachedEvent = null;
-var gCachedEvent2 = null;
-
-function cacheEvent(modifiers)
-{
- var cachedEvent = null;
-
- var mouseFn = function(event) {
- cachedEvent = event;
- }
-
- window.addEventListener("mousedown", mouseFn, false);
- synthesizeMouse(document.documentElement, 0, 0, modifiers);
- window.removeEventListener("mousedown", mouseFn, false);
-
- return cachedEvent;
-}
-
-function runTests()
-{
- if (screen.height < 768) {
- ok(false, "popup tests are likely to fail for screen heights less than 768 pixels");
- }
-
- gMenuPopup = document.getElementById("thepopup");
- gTrigger = document.getElementById("trigger");
-
- gIsMenu = gTrigger.boxObject instanceof MenuBoxObject;
-
- // a hacky way to get the screen position of the document. Cache the event
- // so that we can use it in calls to openPopup.
- gCachedEvent = cacheEvent({ shiftKey: true });
- gScreenX = gCachedEvent.screenX;
- gScreenY = gCachedEvent.screenY;
- gCachedEvent2 = cacheEvent({ altKey: true, ctrlKey: true, shiftKey: true, metaKey: true });
-
- startPopupTests(popupTests);
-}
-
-var popupTests = [
-{
- testname: "mouse click on trigger",
- events: [ "popupshowing thepopup", "popupshown thepopup" ],
- test: function() {
- // for menus, no trigger will be set. For non-menus using the popup
- // attribute, the trigger will be set to the node with the popup attribute
- gExpectedTriggerNode = gIsMenu ? "notset" : gTrigger;
- synthesizeMouse(gTrigger, 4, 4, { });
- },
- result: function (testname) {
- gExpectedTriggerNode = null;
- // menus are the anchor but non-menus are opened at screen coordinates
- is(gMenuPopup.anchorNode, gIsMenu ? gTrigger : null, testname + " anchorNode");
- // menus are opened internally, but non-menus have a mouse event which
- // triggered them
- is(gMenuPopup.triggerNode, gIsMenu ? null : gTrigger, testname + " triggerNode");
- is(document.popupNode, gIsMenu ? null : gTrigger, testname + " document.popupNode");
- is(document.tooltipNode, null, testname + " document.tooltipNode");
- // check to ensure the popup node for a different document isn't used
- if (window.opener)
- is(window.opener.document.popupNode, null, testname + " opener.document.popupNode");
-
- // this will be used in some tests to ensure the size doesn't change
- var popuprect = gMenuPopup.getBoundingClientRect();
- gPopupWidth = Math.round(popuprect.width);
- gPopupHeight = Math.round(popuprect.height);
-
- checkActive(gMenuPopup, "", testname);
- checkOpen("trigger", testname);
- // if a menu, the popup should be opened underneath the menu in the
- // 'after_start' position, otherwise it is opened at the mouse position
- if (gIsMenu)
- compareEdge(gTrigger, gMenuPopup, "after_start", 0, 0, testname);
- }
-},
-{
- // check that pressing cursor down while there is no selection
- // highlights the first item
- testname: "cursor down no selection",
- events: [ "DOMMenuItemActive item1" ],
- test: function() { synthesizeKey("VK_DOWN", { }); },
- result: function(testname) { checkActive(gMenuPopup, "item1", testname); }
-},
-{
- // check that pressing cursor up wraps and highlights the last item
- testname: "cursor up wrap",
- events: [ "DOMMenuItemInactive item1", "DOMMenuItemActive last" ],
- test: function() { synthesizeKey("VK_UP", { }); },
- result: function(testname) {
- checkActive(gMenuPopup, "last", testname);
- }
-},
-{
- // check that pressing cursor down wraps and highlights the first item
- testname: "cursor down wrap",
- events: [ "DOMMenuItemInactive last", "DOMMenuItemActive item1" ],
- test: function() { synthesizeKey("VK_DOWN", { }); },
- result: function(testname) { checkActive(gMenuPopup, "item1", testname); }
-},
-{
- // check that pressing cursor down highlights the second item
- testname: "cursor down",
- events: [ "DOMMenuItemInactive item1", "DOMMenuItemActive item2" ],
- test: function() { synthesizeKey("VK_DOWN", { }); },
- result: function(testname) { checkActive(gMenuPopup, "item2", testname); }
-},
-{
- // check that pressing cursor up highlights the second item
- testname: "cursor up",
- events: [ "DOMMenuItemInactive item2", "DOMMenuItemActive item1" ],
- test: function() { synthesizeKey("VK_UP", { }); },
- result: function(testname) { checkActive(gMenuPopup, "item1", testname); }
-},
-{
- // cursor left should not do anything
- testname: "cursor left",
- test: function() { synthesizeKey("VK_LEFT", { }); },
- result: function(testname) { checkActive(gMenuPopup, "item1", testname); }
-},
-{
- // cursor right should not do anything
- testname: "cursor right",
- test: function() { synthesizeKey("VK_RIGHT", { }); },
- result: function(testname) { checkActive(gMenuPopup, "item1", testname); }
-},
-{
- // check cursor down when a disabled item exists in the menu
- testname: "cursor down disabled",
- events: function() {
- // On Windows, disabled items are included when navigating, but on
- // other platforms, disabled items are skipped over
- if (navigator.platform.indexOf("Win") == 0) {
- return [ "DOMMenuItemInactive item1", "DOMMenuItemActive item2" ];
- }
- return [ "DOMMenuItemInactive item1", "DOMMenuItemActive amenu" ];
- },
- test: function() {
- document.getElementById("item2").disabled = true;
- synthesizeKey("VK_DOWN", { });
- }
-},
-{
- // check cursor up when a disabled item exists in the menu
- testname: "cursor up disabled",
- events: function() {
- if (navigator.platform.indexOf("Win") == 0) {
- return [ "DOMMenuItemInactive item2", "DOMMenuItemActive amenu",
- "DOMMenuItemInactive amenu", "DOMMenuItemActive item2",
- "DOMMenuItemInactive item2", "DOMMenuItemActive item1" ];
- }
- return [ "DOMMenuItemInactive amenu", "DOMMenuItemActive item1" ];
- },
- test: function() {
- if (navigator.platform.indexOf("Win") == 0)
- synthesizeKey("VK_DOWN", { });
- synthesizeKey("VK_UP", { });
- if (navigator.platform.indexOf("Win") == 0)
- synthesizeKey("VK_UP", { });
- }
-},
-{
- testname: "mouse click outside",
- events: [ "popuphiding thepopup", "popuphidden thepopup",
- "DOMMenuItemInactive item1", "DOMMenuInactive thepopup" ],
- test: function() {
- gMenuPopup.hidePopup();
- // XXXndeakin event simulation fires events outside of the platform specific
- // widget code so the popup capturing isn't handled. Thus, the menu won't
- // rollup this way.
- // synthesizeMouse(gTrigger, 0, -12, { });
- },
- result: function(testname, step) {
- is(gMenuPopup.anchorNode, null, testname + " anchorNode");
- is(gMenuPopup.triggerNode, null, testname + " triggerNode");
- is(document.popupNode, null, testname + " document.popupNode");
- checkClosed("trigger", testname);
- }
-},
-{
- // these tests check to ensure that passing an anchor and position
- // puts the popup in the right place
- testname: "open popup anchored",
- events: [ "popupshowing thepopup", "popupshown thepopup" ],
- autohide: "thepopup",
- steps: ["before_start", "before_end", "after_start", "after_end",
- "start_before", "start_after", "end_before", "end_after", "after_pointer", "overlap",
- "topleft topleft", "topcenter topleft", "topright topleft",
- "leftcenter topright", "rightcenter topright",
- "bottomleft bottomleft", "bottomcenter bottomleft", "bottomright bottomleft",
- "topleft bottomright", "bottomcenter bottomright", "rightcenter topright"],
- test: function(testname, step) {
- gExpectedTriggerNode = "notset";
- gMenuPopup.openPopup(gTrigger, step, 0, 0, false, false);
- },
- result: function(testname, step) {
- // no triggerNode because it was opened without passing an event
- gExpectedTriggerNode = null;
- is(gMenuPopup.anchorNode, gTrigger, testname + " anchorNode");
- is(gMenuPopup.triggerNode, null, testname + " triggerNode");
- is(document.popupNode, null, testname + " document.popupNode");
- compareEdge(gTrigger, gMenuPopup, step, 0, 0, testname);
- }
-},
-{
- // these tests check the same but with a 10 pixel margin on the popup
- testname: "open popup anchored with margin",
- events: [ "popupshowing thepopup", "popupshown thepopup" ],
- autohide: "thepopup",
- steps: ["before_start", "before_end", "after_start", "after_end",
- "start_before", "start_after", "end_before", "end_after", "after_pointer", "overlap",
- "topleft topleft", "topcenter topleft", "topright topleft",
- "leftcenter topright", "rightcenter topright",
- "bottomleft bottomleft", "bottomcenter bottomleft", "bottomright bottomleft",
- "topleft bottomright", "bottomcenter bottomright", "rightcenter topright"],
- test: function(testname, step) {
- gMenuPopup.setAttribute("style", "margin: 10px;");
- gMenuPopup.openPopup(gTrigger, step, 0, 0, false, false);
- },
- result: function(testname, step) {
- var rightmod = step == "before_end" || step == "after_end" ||
- step == "start_before" || step == "start_after" ||
- step.match(/topright$/) || step.match(/bottomright$/);
- var bottommod = step == "before_start" || step == "before_end" ||
- step == "start_after" || step == "end_after" ||
- step.match(/bottomleft$/) || step.match(/bottomright$/);
- compareEdge(gTrigger, gMenuPopup, step, rightmod ? -10 : 10, bottommod ? -10 : 10, testname);
- gMenuPopup.removeAttribute("style");
- }
-},
-{
- // these tests check the same but with a -8 pixel margin on the popup
- testname: "open popup anchored with negative margin",
- events: [ "popupshowing thepopup", "popupshown thepopup" ],
- autohide: "thepopup",
- steps: ["before_start", "before_end", "after_start", "after_end",
- "start_before", "start_after", "end_before", "end_after", "after_pointer", "overlap"],
- test: function(testname, step) {
- gMenuPopup.setAttribute("style", "margin: -8px;");
- gMenuPopup.openPopup(gTrigger, step, 0, 0, false, false);
- },
- result: function(testname, step) {
- var rightmod = step == "before_end" || step == "after_end" ||
- step == "start_before" || step == "start_after";
- var bottommod = step == "before_start" || step == "before_end" ||
- step == "start_after" || step == "end_after";
- compareEdge(gTrigger, gMenuPopup, step, rightmod ? 8 : -8, bottommod ? 8 : -8, testname);
- gMenuPopup.removeAttribute("style");
- }
-},
- {
- testname: "open popup with large positive margin",
- events: [ "popupshowing thepopup", "popupshown thepopup" ],
- autohide: "thepopup",
- steps: ["before_start", "before_end", "after_start", "after_end",
- "start_before", "start_after", "end_before", "end_after", "after_pointer", "overlap"],
- test: function(testname, step) {
- gMenuPopup.setAttribute("style", "margin: 1000px;");
- gMenuPopup.openPopup(gTrigger, step, 0, 0, false, false);
- },
- result: function(testname, step) {
- var popuprect = gMenuPopup.getBoundingClientRect();
- // as there is more room on the 'end' or 'after' side, popups will always
- // appear on the right or bottom corners, depending on which side they are
- // allowed to be flipped by.
- var expectedleft = step == "before_end" || step == "after_end" ?
- 0 : Math.round(window.innerWidth - gPopupWidth);
- var expectedtop = step == "start_after" || step == "end_after" ?
- 0 : Math.round(window.innerHeight - gPopupHeight);
- is(Math.round(popuprect.left), expectedleft, testname + " x position " + step);
- is(Math.round(popuprect.top), expectedtop, testname + " y position " + step);
- gMenuPopup.removeAttribute("style");
- }
-},
-{
- testname: "open popup with large negative margin",
- events: [ "popupshowing thepopup", "popupshown thepopup" ],
- autohide: "thepopup",
- steps: ["before_start", "before_end", "after_start", "after_end",
- "start_before", "start_after", "end_before", "end_after", "after_pointer", "overlap"],
- test: function(testname, step) {
- gMenuPopup.setAttribute("style", "margin: -1000px;");
- gMenuPopup.openPopup(gTrigger, step, 0, 0, false, false);
- },
- result: function(testname, step) {
- var popuprect = gMenuPopup.getBoundingClientRect();
- // using negative margins causes the reverse of positive margins, and
- // popups will appear on the left or top corners.
- var expectedleft = step == "before_end" || step == "after_end" ?
- Math.round(window.innerWidth - gPopupWidth) : 0;
- var expectedtop = step == "start_after" || step == "end_after" ?
- Math.round(window.innerHeight - gPopupHeight) : 0;
- is(Math.round(popuprect.left), expectedleft, testname + " x position " + step);
- is(Math.round(popuprect.top), expectedtop, testname + " y position " + step);
- gMenuPopup.removeAttribute("style");
- }
-},
-{
- testname: "popup with unknown step",
- events: [ "popupshowing thepopup", "popupshown thepopup" ],
- autohide: "thepopup",
- test: function() {
- gMenuPopup.openPopup(gTrigger, "other", 0, 0, false, false);
- },
- result: function (testname) {
- var triggerrect = gMenuPopup.getBoundingClientRect();
- var popuprect = gMenuPopup.getBoundingClientRect();
- is(Math.round(popuprect.left), triggerrect.left, testname + " x position ");
- is(Math.round(popuprect.top), triggerrect.top, testname + " y position ");
- }
-},
-{
- // these tests check to ensure that the position attribute can be used
- // to set the position of a popup instead of passing it as an argument
- testname: "open popup anchored with attribute",
- events: [ "popupshowing thepopup", "popupshown thepopup" ],
- autohide: "thepopup",
- steps: ["before_start", "before_end", "after_start", "after_end",
- "start_before", "start_after", "end_before", "end_after", "after_pointer", "overlap",
- "topcenter topleft", "topright bottomright", "leftcenter topright"],
- test: function(testname, step) {
- gMenuPopup.setAttribute("position", step);
- gMenuPopup.openPopup(gTrigger, "", 0, 0, false, false);
- },
- result: function(testname, step) { compareEdge(gTrigger, gMenuPopup, step, 0, 0, testname); }
-},
-{
- // this test checks to ensure that the attributes override flag to openPopup
- // can be used to override the popup's position. This test also passes an
- // event to openPopup to check the trigger node.
- testname: "open popup anchored with override",
- events: [ "popupshowing thepopup 0010", "popupshown thepopup" ],
- test: function(testname, step) {
- // attribute overrides the position passed in
- gMenuPopup.setAttribute("position", "end_after");
- gExpectedTriggerNode = gCachedEvent.target;
- gMenuPopup.openPopup(gTrigger, "before_start", 0, 0, false, true, gCachedEvent);
- },
- result: function(testname, step) {
- gExpectedTriggerNode = null;
- is(gMenuPopup.anchorNode, gTrigger, testname + " anchorNode");
- is(gMenuPopup.triggerNode, gCachedEvent.target, testname + " triggerNode");
- is(document.popupNode, gCachedEvent.target, testname + " document.popupNode");
- compareEdge(gTrigger, gMenuPopup, "end_after", 0, 0, testname);
- }
-},
-{
- testname: "close popup with escape",
- events: [ "popuphiding thepopup", "popuphidden thepopup",
- "DOMMenuInactive thepopup", ],
- test: function(testname, step) {
- synthesizeKey("VK_ESCAPE", { });
- checkClosed("trigger", testname);
- }
-},
-{
- // check that offsets may be supplied to the openPopup method
- testname: "open popup anchored with offsets",
- events: [ "popupshowing thepopup", "popupshown thepopup" ],
- autohide: "thepopup",
- test: function(testname, step) {
- // attribute is empty so does not override
- gMenuPopup.setAttribute("position", "");
- gMenuPopup.openPopup(gTrigger, "before_start", 5, 10, true, true);
- },
- result: function(testname, step) { compareEdge(gTrigger, gMenuPopup, "before_start", 5, 10, testname); }
-},
-{
- // these tests check to ensure that passing an anchor and position
- // puts the popup in the right place
- testname: "show popup anchored",
- condition: function() {
- // only perform this test for popups not in a menu, such as those using
- // the popup attribute, as the showPopup implementation in popup.xml
- // calls openMenu if the popup is inside a menu
- return !gIsMenu;
- },
- events: [ "popupshowing thepopup", "popupshown thepopup" ],
- autohide: "thepopup",
- steps: [["topleft", "topleft"],
- ["topleft", "topright"], ["topleft", "bottomleft"],
- ["topright", "topleft"], ["topright", "bottomright"],
- ["bottomleft", "bottomright"], ["bottomleft", "topleft"],
- ["bottomright", "bottomleft"], ["bottomright", "topright"]],
- test: function(testname, step) {
- // the attributes should be ignored
- gMenuPopup.setAttribute("popupanchor", "topright");
- gMenuPopup.setAttribute("popupalign", "bottomright");
- gMenuPopup.setAttribute("position", "end_after");
- gMenuPopup.showPopup(gTrigger, -1, -1, "popup", step[0], step[1]);
- },
- result: function(testname, step) {
- var pos = convertPosition(step[0], step[1]);
- compareEdge(gTrigger, gMenuPopup, pos, 0, 0, testname);
- gMenuPopup.removeAttribute("popupanchor");
- gMenuPopup.removeAttribute("popupalign");
- gMenuPopup.removeAttribute("position");
- }
-},
-{
- testname: "show popup with position",
- condition: function() { return !gIsMenu; },
- events: [ "popupshowing thepopup", "popupshown thepopup" ],
- autohide: "thepopup",
- test: function(testname, step) {
- gMenuPopup.showPopup(gTrigger, gScreenX + 60, gScreenY + 15,
- "context", "topleft", "bottomright");
- },
- result: function(testname, step) {
- var rect = gMenuPopup.getBoundingClientRect();
- ok(true, gScreenX + "," + gScreenY);
- is(rect.left, 60, testname + " left");
- is(rect.top, 15, testname + " top");
- ok(rect.right, testname + " right is " + rect.right);
- ok(rect.bottom, testname + " bottom is " + rect.bottom);
- }
-},
-{
- // if no anchor is supplied to openPopup, it should be opened relative
- // to the viewport.
- testname: "open popup unanchored",
- events: [ "popupshowing thepopup", "popupshown thepopup" ],
- test: function(testname, step) { gMenuPopup.openPopup(null, "after_start", 6, 8, false); },
- result: function(testname, step) {
- var rect = gMenuPopup.getBoundingClientRect();
- ok(rect.left == 6 && rect.top == 8 && rect.right && rect.bottom, testname);
- }
-},
-{
- testname: "activate menuitem with mouse",
- events: [ "DOMMenuInactive thepopup", "command item3",
- "popuphiding thepopup", "popuphidden thepopup",
- "DOMMenuItemInactive item3" ],
- test: function(testname, step) {
- var item3 = document.getElementById("item3");
- synthesizeMouse(item3, 4, 4, { });
- },
- result: function(testname, step) { checkClosed("trigger", testname); }
-},
-{
- testname: "close popup",
- condition: function() { return false; },
- events: [ "popuphiding thepopup", "popuphidden thepopup",
- "DOMMenuInactive thepopup" ],
- test: function(testname, step) { gMenuPopup.hidePopup(); }
-},
-{
- testname: "open popup at screen",
- events: [ "popupshowing thepopup", "popupshown thepopup" ],
- test: function(testname, step) {
- gExpectedTriggerNode = "notset";
- gMenuPopup.openPopupAtScreen(gScreenX + 24, gScreenY + 20, false);
- },
- result: function(testname, step) {
- gExpectedTriggerNode = null;
- is(gMenuPopup.anchorNode, null, testname + " anchorNode");
- is(gMenuPopup.triggerNode, null, testname + " triggerNode");
- is(document.popupNode, null, testname + " document.popupNode");
- var rect = gMenuPopup.getBoundingClientRect();
- is(rect.left, 24, testname + " left");
- is(rect.top, 20, testname + " top");
- ok(rect.right, testname + " right is " + rect.right);
- ok(rect.bottom, testname + " bottom is " + rect.bottom);
- }
-},
-{
- // check that pressing a menuitem's accelerator selects it. Note that
- // the menuitem with the M accesskey overrides the earlier menuitem that
- // begins with M.
- testname: "menuitem accelerator",
- events: [ "DOMMenuItemActive amenu", "DOMMenuItemInactive amenu",
- "DOMMenuInactive thepopup",
- "command amenu", "popuphiding thepopup", "popuphidden thepopup",
- "DOMMenuItemInactive amenu"
- ],
- test: function() { synthesizeKey("M", { }); },
- result: function(testname) { checkClosed("trigger", testname); }
-},
-{
- testname: "open context popup at screen",
- events: [ "popupshowing thepopup 0010", "popupshown thepopup" ],
- test: function(testname, step) {
- gExpectedTriggerNode = gCachedEvent.target;
- gMenuPopup.openPopupAtScreen(gScreenX + 8, gScreenY + 16, true, gCachedEvent);
- },
- result: function(testname, step) {
- gExpectedTriggerNode = null;
- is(gMenuPopup.anchorNode, null, testname + " anchorNode");
- is(gMenuPopup.triggerNode, gCachedEvent.target, testname + " triggerNode");
- is(document.popupNode, gCachedEvent.target, testname + " document.popupNode");
-
- var childframe = document.getElementById("childframe");
- if (childframe) {
- for (var t = 0; t < 2; t++) {
- var child = childframe.contentDocument;
- var evt = child.createEvent("Event");
- evt.initEvent("click", true, true);
- child.documentElement.dispatchEvent(evt);
- is(child.documentElement.getAttribute("data"), "xnull",
- "cannot get popupNode from other document");
- child.documentElement.setAttribute("data", "none");
- // now try again with document.popupNode set explicitly
- document.popupNode = gCachedEvent.target;
- }
- }
-
- var openX = 8;
- var openY = 16;
- var rect = gMenuPopup.getBoundingClientRect();
- is(rect.left, openX + (platformIsMac() ? 1 : 2), testname + " left");
- is(rect.top, openY + (platformIsMac() ? -6 : 2), testname + " top");
- ok(rect.right, testname + " right is " + rect.right);
- ok(rect.bottom, testname + " bottom is " + rect.bottom);
- }
-},
-{
- // pressing a letter that doesn't correspond to an accelerator, but does
- // correspond to the first letter in a menu's label. The menu should not
- // close because there is more than one item corresponding to that letter
- testname: "menuitem with non accelerator",
- events: [ "DOMMenuItemActive one" ],
- test: function() { synthesizeKey("O", { }); },
- result: function(testname) {
- checkOpen("trigger", testname);
- checkActive(gMenuPopup, "one", testname);
- }
-},
-{
- // pressing the letter again should select the next one that starts with
- // that letter
- testname: "menuitem with non accelerator again",
- events: [ "DOMMenuItemInactive one", "DOMMenuItemActive submenu" ],
- test: function() { synthesizeKey("O", { }); },
- result: function(testname) {
- // 'submenu' is a menu but it should not be open
- checkOpen("trigger", testname);
- checkClosed("submenu", testname);
- checkActive(gMenuPopup, "submenu", testname);
- }
-},
-{
- // open the submenu with the cursor right key
- testname: "open submenu with cursor right",
- events: [ "popupshowing submenupopup", "DOMMenuItemActive submenuitem",
- "popupshown submenupopup" ],
- test: function() { synthesizeKey("VK_RIGHT", { }); },
- result: function(testname) {
- checkOpen("trigger", testname);
- checkOpen("submenu", testname);
- checkActive(gMenuPopup, "submenu", testname);
- checkActive(document.getElementById("submenupopup"), "submenuitem", testname);
- }
-},
-{
- // close the submenu with the cursor left key
- testname: "close submenu with cursor left",
- events: [ "popuphiding submenupopup", "popuphidden submenupopup",
- "DOMMenuItemInactive submenuitem", "DOMMenuInactive submenupopup",
- "DOMMenuItemActive submenu" ],
- test: function() { synthesizeKey("VK_LEFT", { }); },
- result: function(testname) {
- checkOpen("trigger", testname);
- checkClosed("submenu", testname);
- checkActive(gMenuPopup, "submenu", testname);
- checkActive(document.getElementById("submenupopup"), "", testname);
- }
-},
-{
- // open the submenu with the enter key
- testname: "open submenu with enter",
- events: [ "popupshowing submenupopup", "DOMMenuItemActive submenuitem",
- "popupshown submenupopup" ],
- test: function() { synthesizeKey("VK_RETURN", { }); },
- result: function(testname) {
- checkOpen("trigger", testname);
- checkOpen("submenu", testname);
- checkActive(gMenuPopup, "submenu", testname);
- checkActive(document.getElementById("submenupopup"), "submenuitem", testname);
- }
-},
-{
- // close the submenu with the escape key
- testname: "close submenu with escape",
- events: [ "popuphiding submenupopup", "popuphidden submenupopup",
- "DOMMenuItemInactive submenuitem", "DOMMenuInactive submenupopup",
- "DOMMenuItemActive submenu" ],
- test: function() { synthesizeKey("VK_ESCAPE", { }); },
- result: function(testname) {
- checkOpen("trigger", testname);
- checkClosed("submenu", testname);
- checkActive(gMenuPopup, "submenu", testname);
- checkActive(document.getElementById("submenupopup"), "", testname);
- }
-},
-{
- // pressing the letter again when the next item is disabled should still
- // select the disabled item on Windows, but select the next item on other
- // platforms
- testname: "menuitem with non accelerator disabled",
- events: function() {
- if (navigator.platform.indexOf("Win") == 0) {
- return [ "DOMMenuItemInactive submenu", "DOMMenuItemActive other",
- "DOMMenuItemInactive other", "DOMMenuItemActive item1" ];
- }
- return [ "DOMMenuItemInactive submenu", "DOMMenuItemActive last",
- "DOMMenuItemInactive last", "DOMMenuItemActive item1" ];
- },
- test: function() { synthesizeKey("O", { }); synthesizeKey("F", { }); },
- result: function(testname) {
- checkActive(gMenuPopup, "item1", testname);
- }
-},
-{
- // pressing a letter that doesn't correspond to an accelerator nor the
- // first letter of a menu. This should have no effect.
- testname: "menuitem with keypress no accelerator found",
- test: function() { synthesizeKey("G", { }); },
- result: function(testname) {
- checkOpen("trigger", testname);
- checkActive(gMenuPopup, "item1", testname);
- }
-},
-{
- // when only one menuitem starting with that letter exists, it should be
- // selected and the menu closed
- testname: "menuitem with non accelerator single",
- events: [ "DOMMenuItemInactive item1", "DOMMenuItemActive amenu",
- "DOMMenuItemInactive amenu", "DOMMenuInactive thepopup",
- "command amenu", "popuphiding thepopup", "popuphidden thepopup",
- "DOMMenuItemInactive amenu",
- ],
- test: function() { synthesizeKey("M", { }); },
- result: function(testname) {
- checkClosed("trigger", testname);
- checkActive(gMenuPopup, "", testname);
- }
-},
-{
- testname: "open context popup at screen with all modifiers set",
- events: [ "popupshowing thepopup 1111", "popupshown thepopup" ],
- autohide: "thepopup",
- test: function(testname, step) {
- gMenuPopup.openPopupAtScreen(gScreenX + 8, gScreenY + 16, true, gCachedEvent2);
- }
-},
-{
- testname: "open popup with open property",
- events: [ "popupshowing thepopup", "popupshown thepopup" ],
- test: function(testname, step) { openMenu(gTrigger); },
- result: function(testname, step) {
- checkOpen("trigger", testname);
- if (gIsMenu)
- compareEdge(gTrigger, gMenuPopup, "after_start", 0, 0, testname);
- }
-},
-{
- testname: "open submenu with open property",
- events: [ "popupshowing submenupopup", "DOMMenuItemActive submenu",
- "popupshown submenupopup" ],
- test: function(testname, step) { openMenu(document.getElementById("submenu")); },
- result: function(testname, step) {
- checkOpen("trigger", testname);
- checkOpen("submenu", testname);
- // XXXndeakin
- // getBoundingClientRect doesn't seem to working right for submenus
- // so disable this test for now
- // compareEdge(document.getElementById("submenu"),
- // document.getElementById("submenupopup"), "end_before", 0, 0, testname);
- }
-},
-{
- testname: "hidePopup hides entire chain",
- events: [ "popuphiding submenupopup", "popuphidden submenupopup",
- "popuphiding thepopup", "popuphidden thepopup",
- "DOMMenuInactive submenupopup",
- "DOMMenuItemInactive submenu", "DOMMenuItemInactive submenu",
- "DOMMenuInactive thepopup", ],
- test: function() { gMenuPopup.hidePopup(); },
- result: function(testname, step) {
- checkClosed("trigger", testname);
- checkClosed("submenu", testname);
- }
-},
-{
- testname: "open submenu with open property without parent open",
- test: function(testname, step) { openMenu(document.getElementById("submenu")); },
- result: function(testname, step) {
- checkClosed("trigger", testname);
- checkClosed("submenu", testname);
- }
-},
-{
- testname: "open popup with open property and position",
- condition: function() { return gIsMenu; },
- events: [ "popupshowing thepopup", "popupshown thepopup" ],
- test: function(testname, step) {
- gMenuPopup.setAttribute("position", "before_start");
- openMenu(gTrigger);
- },
- result: function(testname, step) {
- compareEdge(gTrigger, gMenuPopup, "before_start", 0, 0, testname);
- }
-},
-{
- testname: "close popup with open property",
- condition: function() { return gIsMenu; },
- events: [ "popuphiding thepopup", "popuphidden thepopup",
- "DOMMenuInactive thepopup" ],
- test: function(testname, step) { closeMenu(gTrigger, gMenuPopup); },
- result: function(testname, step) { checkClosed("trigger", testname); }
-},
-{
- testname: "open popup with open property, position, anchor and alignment",
- condition: function() { return gIsMenu; },
- events: [ "popupshowing thepopup", "popupshown thepopup" ],
- autohide: "thepopup",
- test: function(testname, step) {
- gMenuPopup.setAttribute("position", "start_after");
- gMenuPopup.setAttribute("popupanchor", "topright");
- gMenuPopup.setAttribute("popupalign", "bottomright");
- openMenu(gTrigger);
- },
- result: function(testname, step) {
- compareEdge(gTrigger, gMenuPopup, "start_after", 0, 0, testname);
- }
-},
-{
- testname: "open popup with open property, anchor and alignment",
- condition: function() { return gIsMenu; },
- events: [ "popupshowing thepopup", "popupshown thepopup" ],
- autohide: "thepopup",
- test: function(testname, step) {
- gMenuPopup.removeAttribute("position");
- gMenuPopup.setAttribute("popupanchor", "bottomright");
- gMenuPopup.setAttribute("popupalign", "topright");
- openMenu(gTrigger);
- },
- result: function(testname, step) {
- compareEdge(gTrigger, gMenuPopup, "after_end", 0, 0, testname);
- gMenuPopup.removeAttribute("popupanchor");
- gMenuPopup.removeAttribute("popupalign");
- }
-},
-{
- testname: "focus and cursor down on trigger",
- condition: function() { return gIsMenu; },
- events: [ "popupshowing thepopup", "popupshown thepopup" ],
- autohide: "thepopup",
- test: function(testname, step) {
- gTrigger.focus();
- synthesizeKey("VK_DOWN", { altKey: !platformIsMac() });
- },
- result: function(testname, step) {
- checkOpen("trigger", testname);
- checkActive(gMenuPopup, "", testname);
- }
-},
-{
- testname: "focus and cursor up on trigger",
- condition: function() { return gIsMenu; },
- events: [ "popupshowing thepopup", "popupshown thepopup" ],
- test: function(testname, step) {
- gTrigger.focus();
- synthesizeKey("VK_UP", { altKey: !platformIsMac() });
- },
- result: function(testname, step) {
- checkOpen("trigger", testname);
- checkActive(gMenuPopup, "", testname);
- }
-},
-{
- testname: "select and enter on menuitem",
- condition: function() { return gIsMenu; },
- events: [ "DOMMenuItemActive item1", "DOMMenuItemInactive item1",
- "DOMMenuInactive thepopup", "command item1",
- "popuphiding thepopup", "popuphidden thepopup",
- "DOMMenuItemInactive item1" ],
- test: function(testname, step) {
- synthesizeKey("VK_DOWN", { });
- synthesizeKey("VK_RETURN", { });
- },
- result: function(testname, step) { checkClosed("trigger", testname); }
-},
-{
- testname: "focus trigger and key to open",
- condition: function() { return gIsMenu; },
- events: [ "popupshowing thepopup", "popupshown thepopup" ],
- autohide: "thepopup",
- test: function(testname, step) {
- gTrigger.focus();
- synthesizeKey(platformIsMac() ? " " : "VK_F4", { });
- },
- result: function(testname, step) {
- checkOpen("trigger", testname);
- checkActive(gMenuPopup, "", testname);
- }
-},
-{
- // the menu should only open when the meta or alt key is not pressed
- testname: "focus trigger and key wrong modifier",
- condition: function() { return gIsMenu; },
- test: function(testname, step) {
- gTrigger.focus();
- if (platformIsMac())
- synthesizeKey("VK_F4", { altKey: true });
- else
- synthesizeKey("", { metaKey: true });
- },
- result: function(testname, step) {
- checkClosed("trigger", testname);
- }
-},
-{
- testname: "mouse click on disabled menu",
- condition: function() { return gIsMenu; },
- test: function(testname, step) {
- gTrigger.setAttribute("disabled", "true");
- synthesizeMouse(gTrigger, 4, 4, { });
- },
- result: function(testname, step) {
- checkClosed("trigger", testname);
- gTrigger.removeAttribute("disabled");
- }
-},
-{
- // openPopup should open the menu synchronously, however popupshown
- // is fired asynchronously
- testname: "openPopup synchronous",
- events: [ "popupshowing thepopup", "popupshowing submenupopup",
- "popupshown thepopup", "DOMMenuItemActive submenu",
- "popupshown submenupopup" ],
- test: function(testname, step) {
- gMenuPopup.openPopup(gTrigger, "after_start", 0, 0, false, true);
- document.getElementById("submenupopup").
- openPopup(gTrigger, "end_before", 0, 0, false, true);
- checkOpen("trigger", testname);
- checkOpen("submenu", testname);
- }
-},
-{
- // remove the content nodes for the popup
- testname: "remove content",
- test: function(testname, step) {
- var submenupopup = document.getElementById("submenupopup");
- submenupopup.parentNode.removeChild(submenupopup);
- var popup = document.getElementById("thepopup");
- popup.parentNode.removeChild(popup);
- }
-}
-
-];
-
-function platformIsMac()
-{
- return navigator.platform.indexOf("Mac") > -1;
-}
diff --git a/toolkit/content/tests/chrome/rtlchrome/rtl.css b/toolkit/content/tests/chrome/rtlchrome/rtl.css
deleted file mode 100644
index 0fea010019..0000000000
--- a/toolkit/content/tests/chrome/rtlchrome/rtl.css
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Imitate RTL UI */
-window { direction: rtl; }
diff --git a/toolkit/content/tests/chrome/rtlchrome/rtl.dtd b/toolkit/content/tests/chrome/rtlchrome/rtl.dtd
deleted file mode 100644
index 8b32de6746..0000000000
--- a/toolkit/content/tests/chrome/rtlchrome/rtl.dtd
+++ /dev/null
@@ -1 +0,0 @@
-<!ENTITY locale.dir "rtl">
diff --git a/toolkit/content/tests/chrome/rtlchrome/rtl.manifest b/toolkit/content/tests/chrome/rtlchrome/rtl.manifest
deleted file mode 100644
index a4cc6929be..0000000000
--- a/toolkit/content/tests/chrome/rtlchrome/rtl.manifest
+++ /dev/null
@@ -1,5 +0,0 @@
-content rtlchrome /
-
-# Override intl.css with our own CSS file
-override chrome://global/locale/intl.css chrome://rtlchrome/rtl.css
-override chrome://global/locale/global.dtd chrome://rtlchrome/rtl.dtd
diff --git a/toolkit/content/tests/chrome/rtltest/content/dirtest.xul b/toolkit/content/tests/chrome/rtltest/content/dirtest.xul
deleted file mode 100644
index b75d41eaa3..0000000000
--- a/toolkit/content/tests/chrome/rtltest/content/dirtest.xul
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-
-<window xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<html:style>
-hbox, vbox { background-color: white; }
-hbox:-moz-locale-dir(ltr) { background-color: yellow; }
-vbox:-moz-locale-dir(rtl) { background-color: green; }
-</html:style>
-
-<hbox id="hbox">
- <button label="One"/>
- <button label="Two"/>
- <button label="Three"/>
-</hbox>
-<vbox id="vbox">
- <button label="One"/>
- <button label="Two"/>
- <button label="Three"/>
-</vbox>
-
-</window>
diff --git a/toolkit/content/tests/chrome/rtltest/righttoleft.manifest b/toolkit/content/tests/chrome/rtltest/righttoleft.manifest
deleted file mode 100644
index db98656bce..0000000000
--- a/toolkit/content/tests/chrome/rtltest/righttoleft.manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-content ltrtest content/
-content rtltest content/
-locale rtltest ar-QA content/
diff --git a/toolkit/content/tests/chrome/sample_entireword_latin1.html b/toolkit/content/tests/chrome/sample_entireword_latin1.html
deleted file mode 100644
index b2d66fa3c4..0000000000
--- a/toolkit/content/tests/chrome/sample_entireword_latin1.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head><title>Latin entire-word find test page</title></head>
- <body>
- <!-- Feel free to extend the contents of this page with more comprehensive
- - Latin punctuation and/ or word markers.
- -->
- <p>The twins of Mammon quarrelled. Their warring plunged the world into a new darkness, and the beast abhorred the darkness. So it began to move swiftly, and grew more powerful, and went forth and multiplied. And the beasts brought fire and light to the darkness.</p>
- <p>from The Book of Mozilla, 15:1</p>
- </body>
-</html>
diff --git a/toolkit/content/tests/chrome/test_about_networking.html b/toolkit/content/tests/chrome/test_about_networking.html
deleted file mode 100644
index 6ffaf2ba79..0000000000
--- a/toolkit/content/tests/chrome/test_about_networking.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=912103
--->
-<head>
- <meta charset="utf-8">
- <title>Test for Bug </title>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
- <script type="application/javascript">
-
- SimpleTest.waitForExplicitFinish();
-
- function runTest() {
- const Cc = Components.classes;
- const Ci = Components.interfaces;
-
- var dashboard = Cc['@mozilla.org/network/dashboard;1']
- .getService(Ci.nsIDashboard);
- dashboard.enableLogging = true;
-
- var wsURI = "ws://mochi.test:8888/chrome/toolkit/content/tests/chrome/file_about_networking";
- var websocket = new WebSocket(wsURI);
-
- websocket.addEventListener("open", function() {
- dashboard.requestWebsocketConnections(function(data) {
- var found = false;
- for (var i = 0; i < data.websockets.length; i++) {
- if (data.websockets[i].hostport == "mochi.test:8888") {
- found = true;
- break;
- }
- }
- isnot(found, false, "tested websocket entry not found");
- websocket.close();
- SimpleTest.finish();
- });
- });
- }
-
- window.addEventListener("DOMContentLoaded", function run() {
- window.removeEventListener("DOMContentLoaded", run);
- runTest();
- });
-
- </script>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=912103">Mozilla Bug </a>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-</pre>
-</body>
-</html>
diff --git a/toolkit/content/tests/chrome/test_arrowpanel.xul b/toolkit/content/tests/chrome/test_arrowpanel.xul
deleted file mode 100644
index 671c33a15c..0000000000
--- a/toolkit/content/tests/chrome/test_arrowpanel.xul
+++ /dev/null
@@ -1,327 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Arrow Panels"
- style="padding: 10px;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
-<stack flex="1">
- <label id="topleft" value="Top Left Corner" left="15" top="15"/>
- <label id="topright" value="Top Right" right="15" top="15"/>
- <label id="bottomleft" value="Bottom Left Corner" left="15" bottom="15"/>
- <label id="bottomright" value="Bottom Right" right="15" bottom="15"/>
- <!-- Our SimpleTest/TestRunner.js runs tests inside an iframe which sizes are W=500 H=300.
- 'left' and 'top' values need to be set so that the panel (popup) has enough room to display on its 4 sides. -->
- <label id="middle" value="+/- Centered" left="225" top="135"/>
- <iframe id="frame" type="content"
- src="data:text/html,&lt;input id='input'&gt;" width="100" height="100" left="225" top="120"/>
-</stack>
-
-<panel id="panel" type="arrow" animate="false"
- onpopupshown="checkPanelPosition(this)" onpopuphidden="runNextTest.next()">
- <box width="115" height="65"/>
-</panel>
-
-<panel id="bigpanel" type="arrow" animate="false"
- onpopupshown="checkBigPanel(this)" onpopuphidden="runNextTest.next()">
- <box width="125" height="3000"/>
-</panel>
-
-<panel id="animatepanel" type="arrow"
- onpopupshown="animatedPopupShown = true;"
- onpopuphidden="animatedPopupHidden = true; runNextTest.next();">
- <label value="Animate Closed" height="40"/>
-</panel>
-
-<script type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-const isOSXYosemite = navigator.userAgent.indexOf("Mac OS X 10.10") != -1;
-
-var expectedAnchor = null;
-var expectedSide = "", expectedAnchorEdge = "", expectedPack = "", expectedAlignment = "";
-var zoomFactor = 1;
-var animatedPopupShown = false;
-var animatedPopupHidden = false;
-var runNextTest;
-
-function startTest()
-{
- runNextTest = nextTest();
- runNextTest.next();
-}
-
-function nextTest()
-{
- var panel = $("panel");
-
- function openPopup(position, anchor, expected, anchorEdge, pack, alignment)
- {
- expectedAnchor = anchor instanceof Node ? anchor : $(anchor);
- expectedSide = expected;
- expectedAnchorEdge = anchorEdge;
- expectedPack = pack;
- expectedAlignment = alignment == undefined ? position : alignment;
-
- panel.removeAttribute("side");
- panel.openPopup(expectedAnchor, position, 0, 0, false, false, null);
- }
-
- for (var iter = 0; iter < 2; iter++) {
- openPopup("after_start", "topleft", "top", "left", "start");
- yield;
- openPopup("after_start", "bottomleft", "bottom", "left", "start", "before_start");
- yield;
- openPopup("before_start", "topleft", "top", "left", "start", "after_start");
- yield;
- openPopup("before_start", "bottomleft", "bottom", "left", "start");
- yield;
- openPopup("after_start", "middle", "top", "left", "start");
- yield;
- openPopup("before_start", "middle", "bottom", "left", "start");
- yield;
-
- openPopup("after_start", "topright", "top", "right", "end", "after_end");
- yield;
- openPopup("after_start", "bottomright", "bottom", "right", "end", "before_end");
- yield;
- openPopup("before_start", "topright", "top", "right", "end", "after_end");
- yield;
- openPopup("before_start", "bottomright", "bottom", "right", "end", "before_end");
- yield;
-
- openPopup("after_end", "middle", "top", "right", "end");
- yield;
- openPopup("before_end", "middle", "bottom", "right", "end");
- yield;
-
- openPopup("start_before", "topleft", "left", "top", "start", "end_before");
- yield;
- openPopup("start_before", "topright", "right", "top", "start");
- yield;
- openPopup("end_before", "topleft", "left", "top", "start");
- yield;
- openPopup("end_before", "topright", "right", "top", "start", "start_before");
- yield;
- openPopup("start_before", "middle", "right", "top", "start");
- yield;
- openPopup("end_before", "middle", "left", "top", "start");
- yield;
-
- openPopup("start_before", "bottomleft", "left", "bottom", "end", "end_after");
- yield;
- openPopup("start_before", "bottomright", "right", "bottom", "end", "start_after");
- yield;
- openPopup("end_before", "bottomleft", "left", "bottom", "end", "end_after");
- yield;
- openPopup("end_before", "bottomright", "right", "bottom", "end", "start_after");
- yield;
-
- openPopup("start_after", "middle", "right", "bottom", "end");
- yield;
- openPopup("end_after", "middle", "left", "bottom", "end");
- yield;
-
- openPopup("topcenter bottomleft", "bottomleft", "bottom", "center left", "start", "before_start");
- yield;
- openPopup("bottomcenter topleft", "topleft", "top", "center left", "start", "after_start");
- yield;
- openPopup("topcenter bottomright", "bottomright", "bottom", "center right", "end", "before_end");
- yield;
- openPopup("bottomcenter topright", "topright", "top", "center right", "end", "after_end");
- yield;
- openPopup("topcenter bottomleft", "middle", "bottom", "center left", "start", "before_start");
- yield;
- openPopup("bottomcenter topleft", "middle", "top", "center left", "start", "after_start");
- yield;
-
- openPopup("leftcenter topright", "middle", "right", "center top", "start", "start_before");
- yield;
- openPopup("rightcenter bottomleft", "middle", "left", "center bottom", "end", "end_after");
- yield;
-
-/*
- XXXndeakin disable these parts of the test which often cause problems, see bug 626563
-
- openPopup("after_start", frames[0].document.getElementById("input"), "top", "left", "start");
- yield;
-
- setScale(frames[0], 1.5);
- openPopup("after_start", frames[0].document.getElementById("input"), "top", "left", "start");
- yield;
-
- setScale(frames[0], 2.5);
- openPopup("before_start", frames[0].document.getElementById("input"), "bottom", "left", "start");
- yield;
-
- setScale(frames[0], 1);
-*/
-
- $("bigpanel").openPopup($("topleft"), "after_start", 0, 0, false, false, null, "start");
- yield;
-
- // switch to rtl mode
- document.documentElement.style.direction = "rtl";
- $("topleft").setAttribute("right", "15");
- $("topright").setAttribute("left", "15");
- $("bottomleft").setAttribute("right", "15");
- $("bottomright").setAttribute("left", "15");
- $("topleft").removeAttribute("left");
- $("topright").removeAttribute("right");
- $("bottomleft").removeAttribute("left");
- $("bottomright").removeAttribute("right");
- }
-
- // Test that a transition occurs when opening or closing the popup. The transition is
- // disabled on Linux.
- if (navigator.platform.indexOf("Linux") == -1) {
- function transitionEnded(event) {
- if ($("animatepanel").state != "open") {
- is($("animatepanel").state, "showing", "state is showing during transitionend");
- ok(!animatedPopupShown, "popupshown not fired yet")
- } else {
- is($("animatepanel").state, "open", "state is open after transitionend");
- ok(animatedPopupShown, "popupshown now fired")
- SimpleTest.executeSoon(() => runNextTest.next());
- }
- }
-
- // Check that the transition occurs for an arrow panel with animate="true"
- window.addEventListener("transitionend", transitionEnded, false);
- $("animatepanel").openPopup($("topleft"), "after_start", 0, 0, false, false, null, "start");
- is($("animatepanel").state, "showing", "state is showing");
- yield;
- window.removeEventListener("transitionend", transitionEnded, false);
-
- synthesizeKey("VK_ESCAPE", { });
- ok(!animatedPopupHidden, "animated popup not hidden yet");
- yield;
- }
-
- SimpleTest.finish()
- yield;
-}
-
-function setScale(win, scale)
-{
- var wn = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
- .getInterface(Components.interfaces.nsIWebNavigation);
- var shell = wn.QueryInterface(Components.interfaces.nsIDocShell);
- var docViewer = shell.contentViewer;
- docViewer.fullZoom = scale;
- zoomFactor = scale;
-}
-
-function checkPanelPosition(panel)
-{
- let anchor = panel.anchorNode;
- let adj = 0, hwinpos = 0, vwinpos = 0;
- if (anchor.ownerDocument != document) {
- var framerect = anchor.ownerDocument.defaultView.frameElement.getBoundingClientRect();
- hwinpos = framerect.left;
- vwinpos = framerect.top;
- }
-
- // Positions are reversed in rtl yet the coordinates used in the computations
- // are not, so flip the expected label side and anchor edge.
- var isRTL = (window.getComputedStyle(panel).direction == "rtl");
- if (isRTL) {
- var flipLeftRight = val => val == "left" ? "right" : "left";
- expectedAnchorEdge = expectedAnchorEdge.replace(/(left|right)/, flipLeftRight);
- expectedSide = expectedSide.replace(/(left|right)/, flipLeftRight);
- }
-
- var panelRect = panel.getBoundingClientRect();
- var anchorRect = anchor.getBoundingClientRect();
- var contentBO = panel.firstChild.boxObject;
- var contentRect = { top: contentBO.y,
- left: contentBO.x,
- bottom: contentBO.y + contentBO.height,
- right: contentBO.x + contentBO.width };
- switch (expectedSide) {
- case "top":
- ok(contentRect.top > vwinpos + anchorRect.bottom * zoomFactor + 5, "panel content is below");
- break;
- case "bottom":
- ok(contentRect.bottom < vwinpos + anchorRect.top * zoomFactor - 5, "panel content is above");
- break;
- case "left":
- ok(contentRect.left > hwinpos + anchorRect.right * zoomFactor + 5, "panel content is right");
- break;
- case "right":
- ok(contentRect.right < hwinpos + anchorRect.left * zoomFactor - 5, "panel content is left");
- break;
- }
-
- let iscentered = false;
- if (expectedAnchorEdge.indexOf("center ") == 0) {
- expectedAnchorEdge = expectedAnchorEdge.substring(7);
- iscentered = true;
- }
-
- switch (expectedAnchorEdge) {
- case "top":
- adj = vwinpos + parseInt(getComputedStyle(panel, "").marginTop);
- if (iscentered)
- adj += Math.round(anchorRect.height) / 2;
- isWithinHalfPixel(panelRect.top, anchorRect.top * zoomFactor + adj, "anchored on top");
- break;
- case "bottom":
- adj = vwinpos + parseInt(getComputedStyle(panel, "").marginBottom);
- if (iscentered)
- adj += Math.round(anchorRect.height) / 2;
- isWithinHalfPixel(panelRect.bottom, anchorRect.bottom * zoomFactor - adj, "anchored on bottom");
- break;
- case "left":
- adj = hwinpos + parseInt(getComputedStyle(panel, "").marginLeft);
- if (iscentered)
- adj += Math.round(anchorRect.width) / 2;
- isWithinHalfPixel(panelRect.left, anchorRect.left * zoomFactor + adj, "anchored on left ");
- break;
- case "right":
- adj = hwinpos + parseInt(getComputedStyle(panel, "").marginRight);
- if (iscentered)
- adj += Math.round(anchorRect.width) / 2;
- if (!isOSXYosemite)
- isWithinHalfPixel(panelRect.right, anchorRect.right * zoomFactor - adj, "anchored on right");
- break;
- }
-
- is(anchor, expectedAnchor, "anchor");
-
- var arrow = document.getAnonymousElementByAttribute(panel, "anonid", "arrow");
- is(arrow.getAttribute("side"), expectedSide, "panel arrow side");
- is(arrow.hidden, false, "panel hidden");
- is(arrow.parentNode.pack, expectedPack, "panel arrow pack");
- is(panel.alignmentPosition, expectedAlignment, "panel alignmentPosition");
-
- panel.hidePopup();
-}
-
-function isWithinHalfPixel(a, b, desc)
-{
- ok(Math.abs(a - b) <= 0.5, desc);
-}
-
-function checkBigPanel(panel)
-{
- ok(panel.firstChild.getBoundingClientRect().height < 2800, "big panel height");
- panel.hidePopup();
-}
-
-SimpleTest.waitForFocus(startTest);
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml"/>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_autocomplete2.xul b/toolkit/content/tests/chrome/test_autocomplete2.xul
deleted file mode 100644
index 875cddd07a..0000000000
--- a/toolkit/content/tests/chrome/test_autocomplete2.xul
+++ /dev/null
@@ -1,197 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Autocomplete Widget Test 2"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
-<textbox id="autocomplete" type="autocomplete"
- autocompletesearch="simple"
- onsearchcomplete="checkResult();"/>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-// Set to indicate whether or not we want autoCompleteSimple to return a result
-var returnResult = false;
-
-const ACR = Components.interfaces.nsIAutoCompleteResult;
-
-// This result can't be constructed in-line, because otherwise we leak memory.
-function nsAutoCompleteSimpleResult(aString)
-{
- this.searchString = aString;
- if (returnResult) {
- this.searchResult = ACR.RESULT_SUCCESS;
- this.matchCount = 1;
- this._param = "SUCCESS";
- }
-}
-
-nsAutoCompleteSimpleResult.prototype = {
- _param: "",
- searchString: null,
- searchResult: ACR.RESULT_FAILURE,
- defaultIndex: -1,
- errorDescription: null,
- matchCount: 0,
- getValueAt: function() { return this._param; },
- getCommentAt: function() { return null; },
- getStyleAt: function() { return null; },
- getImageAt: function() { return null; },
- getFinalCompleteValueAt: function() { return this.getValueAt(); },
- getLabelAt: function() { return null; },
- removeValueAt: function() {}
-};
-
-// A basic autocomplete implementation that either returns one result or none
-var autoCompleteSimpleID = Components.ID("0a2afbdb-f30e-47d1-9cb1-0cd160240aca");
-var autoCompleteSimpleName = "@mozilla.org/autocomplete/search;1?name=simple"
-var autoCompleteSimple = {
- QueryInterface: function(iid) {
- if (iid.equals(Components.interfaces.nsISupports) ||
- iid.equals(Components.interfaces.nsIFactory) ||
- iid.equals(Components.interfaces.nsIAutoCompleteSearch))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- },
-
- createInstance: function(outer, iid) {
- return this.QueryInterface(iid);
- },
-
- startSearch: function(aString, aParam, aResult, aListener) {
- var result = new nsAutoCompleteSimpleResult(aString);
- aListener.onSearchResult(this, result);
- },
-
- stopSearch: function() {}
-};
-
-var componentManager = Components.manager
- .QueryInterface(Components.interfaces.nsIComponentRegistrar);
-componentManager.registerFactory(autoCompleteSimpleID, "Test Simple Autocomplete",
- autoCompleteSimpleName, autoCompleteSimple);
-
-
-// Test Bug 441530 - correctly setting "nomatch"
-// Test Bug 441526 - correctly setting style with "highlightnonmatches"
-
-SimpleTest.waitForExplicitFinish();
-setTimeout(startTest, 0);
-
-function startTest() {
- var autocomplete = $("autocomplete");
-
- // Ensure highlightNonMatches can be set correctly.
-
- // This should not be set by default.
- is(autocomplete.hasAttribute("highlightnonmatches"), false,
- "highlight nonmatches not set by default");
-
- autocomplete.highlightNonMatches = "true";
-
- is(autocomplete.getAttribute("highlightnonmatches"), "true",
- "highlight non matches attribute set correctly");
- is(autocomplete.highlightNonMatches, true,
- "highlight non matches getter returned correctly");
-
- autocomplete.highlightNonMatches = "false";
-
- is(autocomplete.getAttribute("highlightnonmatches"), "false",
- "highlight non matches attribute set to false correctly");
- is(autocomplete.highlightNonMatches, false,
- "highlight non matches getter returned false correctly");
-
- ok(!autocomplete.popup.hasAttribute("autocompleteinput"),
- "autocompleteinput on popup not set by default");
-
- check();
-}
-
-function check() {
- var autocomplete = $("autocomplete");
-
- // Toggle this value, so we can re-use the one function.
- returnResult = !returnResult;
-
- // blur the field to ensure that the popup is closed and that the previous
- // search has stopped, then start a new search.
- autocomplete.blur();
- autocomplete.focus();
- synthesizeKey("r", {});
-}
-
-function checkResult() {
- var autocomplete = $("autocomplete");
- var style = window.getComputedStyle(autocomplete, "");
-
- if (returnResult) {
- // Result was returned, so there should not be a nomatch attribute
- is(autocomplete.hasAttribute("nomatch"), false,
- "nomatch attribute shouldn't be present here");
-
- // Ensure that the style is set correctly whichever way highlightNonMatches
- // is set.
- autocomplete.highlightNonMatches = "true";
-
- isnot(style.getPropertyCSSValue("color").cssText, "rgb(255, 0, 0)",
- "not nomatch and highlightNonMatches - should not be red");
-
- autocomplete.highlightNonMatches = "false";
-
- isnot(style.getPropertyCSSValue("color").cssText, "rgb(255, 0, 0)",
- "not nomatch and not highlightNonMatches - should not be red");
-
- is (autocomplete.popup.getAttribute("autocompleteinput"), "autocomplete",
- "The popup's autocompleteinput attribute is set to the ID of the textbox");
-
- setTimeout(check, 0);
- }
- else {
- // No result was returned, so there should be nomatch attribute
- is(autocomplete.getAttribute("nomatch"), "true",
- "nomatch attribute not correctly set when expected");
-
- // Ensure that the style is set correctly whichever way highlightNonMatches
- // is set.
- autocomplete.highlightNonMatches = "true";
-
- is(style.getPropertyCSSValue("color").cssText, "rgb(255, 0, 0)",
- "nomatch and highlightNonMatches - should be red");
-
- autocomplete.highlightNonMatches = "false";
-
- isnot(style.getPropertyCSSValue("color").cssText, "rgb(255, 0, 0)",
- "nomatch and not highlightNonMatches - should not be red");
-
- ok(!autocomplete.popup.hasAttribute("autocompleteinput"),
- "autocompleteinput on popup not set when closed");
-
- setTimeout(function() {
- // Unregister the factory so that we don't get in the way of other tests
- componentManager.unregisterFactory(autoCompleteSimpleID, autoCompleteSimple);
- SimpleTest.finish();
- }, 0);
- }
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_autocomplete3.xul b/toolkit/content/tests/chrome/test_autocomplete3.xul
deleted file mode 100644
index 953fd15c86..0000000000
--- a/toolkit/content/tests/chrome/test_autocomplete3.xul
+++ /dev/null
@@ -1,188 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Autocomplete Widget Test 3"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
-<textbox id="autocomplete" type="autocomplete"
- autocompletesearch="simple"
- onsearchcomplete="checkResult();"/>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-// Set to indicate whether or not we want autoCompleteSimple to return a result
-var returnResult = true;
-
-const ACR = Components.interfaces.nsIAutoCompleteResult;
-
-// This result can't be constructed in-line, because otherwise we leak memory.
-function nsAutoCompleteSimpleResult(aString)
-{
- this.searchString = aString;
- if (returnResult) {
- this.searchResult = ACR.RESULT_SUCCESS;
- this.matchCount = 1;
- this._param = "Result";
- }
-}
-
-nsAutoCompleteSimpleResult.prototype = {
- _param: "",
- searchString: null,
- searchResult: ACR.RESULT_FAILURE,
- defaultIndex: 0,
- errorDescription: null,
- matchCount: 0,
- getValueAt: function() { return this._param; },
- getCommentAt: function() { return null; },
- getStyleAt: function() { return null; },
- getImageAt: function() { return null; },
- getFinalCompleteValueAt: function() { return this.getValueAt(); },
- getLabelAt: function() { return null; },
- removeValueAt: function() {}
-};
-
-// A basic autocomplete implementation that either returns one result or none
-var autoCompleteSimpleID = Components.ID("0a2afbdb-f30e-47d1-9cb1-0cd160240aca");
-var autoCompleteSimpleName = "@mozilla.org/autocomplete/search;1?name=simple"
-var autoCompleteSimple = {
- QueryInterface: function(iid) {
- if (iid.equals(Components.interfaces.nsISupports) ||
- iid.equals(Components.interfaces.nsIFactory) ||
- iid.equals(Components.interfaces.nsIAutoCompleteSearch))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- },
-
- createInstance: function(outer, iid) {
- return this.QueryInterface(iid);
- },
-
- startSearch: function(aString, aParam, aResult, aListener) {
- var result = new nsAutoCompleteSimpleResult(aString);
- aListener.onSearchResult(this, result);
- },
-
- stopSearch: function() {}
-};
-
-var componentManager = Components.manager
- .QueryInterface(Components.interfaces.nsIComponentRegistrar);
-componentManager.registerFactory(autoCompleteSimpleID, "Test Simple Autocomplete",
- autoCompleteSimpleName, autoCompleteSimple);
-
-
-// Test Bug 325842 - completeDefaultIndex
-
-SimpleTest.waitForExplicitFinish();
-setTimeout(startTest, 0);
-
-var currentTest = 0;
-
-// Note the entries for these tests (key) are incremental.
-const tests = [
- { completeDefaultIndex: "false", key: "r", result: "r",
- start: 1, end: 1 },
- { completeDefaultIndex: "true", key: "e", result: "result",
- start: 2, end: 6 },
- { completeDefaultIndex: "true", key: "t", result: "ret >> Result",
- start: 3, end: 13 }
-];
-
-function startTest() {
- var autocomplete = $("autocomplete");
-
- // These should not be set by default.
- is(autocomplete.hasAttribute("completedefaultindex"), false,
- "completedefaultindex not set by default");
-
- autocomplete.completeDefaultIndex = "true";
-
- is(autocomplete.getAttribute("completedefaultindex"), "true",
- "completedefaultindex attribute set correctly");
- is(autocomplete.completeDefaultIndex, true,
- "autoFill getter returned correctly");
-
- autocomplete.completeDefaultIndex = "false";
-
- is(autocomplete.getAttribute("completedefaultindex"), "false",
- "completedefaultindex attribute set to false correctly");
- is(autocomplete.completeDefaultIndex, false,
- "completeDefaultIndex getter returned false correctly");
-
- checkNext();
-}
-
-function checkNext() {
- var autocomplete = $("autocomplete");
-
- autocomplete.completeDefaultIndex = tests[currentTest].completeDefaultIndex;
- autocomplete.focus();
-
- synthesizeKey(tests[currentTest].key, {});
-}
-
-function checkResult() {
- var autocomplete = $("autocomplete");
- var style = window.getComputedStyle(autocomplete, "");
-
- is(autocomplete.value, tests[currentTest].result,
- "Test " + currentTest + ": autocomplete.value should equal '" +
- tests[currentTest].result + "'");
-
- is(autocomplete.selectionStart, tests[currentTest].start,
- "Test " + currentTest + ": autocomplete selection should start at " +
- tests[currentTest].start);
-
- is(autocomplete.selectionEnd, tests[currentTest].end,
- "Test " + currentTest + ": autocomplete selection should end at " +
- tests[currentTest].end);
-
- ++currentTest;
-
- if (currentTest < tests.length)
- setTimeout(checkNext, 0);
- else {
- // TODO (bug 494809): Autocomplete-in-the-middle should take in count RTL
- // and complete on VK_RIGHT or VK_LEFT based on that. It should also revert
- // what user has typed to far if he moves in the opposite direction.
- if (autocomplete.value.indexOf(">>") == -1) {
- // Test result if user accepts autocomplete suggestion.
- synthesizeKey("VK_RIGHT", {});
- is(autocomplete.value, "Result",
- "Test complete: autocomplete.value should equal 'Result'");
- is(autocomplete.selectionStart, 6,
- "Test complete: autocomplete selection should start at 6");
- is(autocomplete.selectionEnd, 6,
- "Test complete: autocomplete selection should end at 6");
- }
-
- setTimeout(function() {
- // Unregister the factory so that we don't get in the way of other tests
- componentManager.unregisterFactory(autoCompleteSimpleID, autoCompleteSimple);
- SimpleTest.finish();
- }, 0);
- }
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_autocomplete4.xul b/toolkit/content/tests/chrome/test_autocomplete4.xul
deleted file mode 100644
index 007e956612..0000000000
--- a/toolkit/content/tests/chrome/test_autocomplete4.xul
+++ /dev/null
@@ -1,280 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Autocomplete Widget Test 4"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
-<textbox id="autocomplete"
- type="autocomplete"
- completedefaultindex="true"
-
- onsearchcomplete="searchComplete();"
- autocompletesearch="simple"/>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-// Set to indicate whether or not we want autoCompleteSimple to return a result
-var returnResult = true;
-
-const ACR = Components.interfaces.nsIAutoCompleteResult;
-
-// This result can't be constructed in-line, because otherwise we leak memory.
-function nsAutoCompleteSimpleResult(aString)
-{
- this.searchString = aString;
- if (returnResult) {
- this.searchResult = ACR.RESULT_SUCCESS;
- this.matchCount = 1;
- this._param = "Result";
- }
-}
-
-nsAutoCompleteSimpleResult.prototype = {
- _param: "",
- searchString: null,
- searchResult: ACR.RESULT_FAILURE,
- defaultIndex: 0,
- errorDescription: null,
- matchCount: 0,
- getValueAt: function() { return this._param; },
- getCommentAt: function() { return null; },
- getStyleAt: function() { return null; },
- getImageAt: function() { return null; },
- getFinalCompleteValueAt: function() { return this.getValueAt(); },
- getLabelAt: function() { return null; },
- removeValueAt: function() {}
-};
-
-// A basic autocomplete implementation that either returns one result or none
-var autoCompleteSimpleID = Components.ID("0a2afbdb-f30e-47d1-9cb1-0cd160240aca");
-var autoCompleteSimpleName = "@mozilla.org/autocomplete/search;1?name=simple"
-var autoCompleteSimple = {
- QueryInterface: function(iid) {
- if (iid.equals(Components.interfaces.nsISupports) ||
- iid.equals(Components.interfaces.nsIFactory) ||
- iid.equals(Components.interfaces.nsIAutoCompleteSearch))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- },
-
- createInstance: function(outer, iid) {
- return this.QueryInterface(iid);
- },
-
- startSearch: function(aString, aParam, aResult, aListener) {
- var result = new nsAutoCompleteSimpleResult(aString);
- aListener.onSearchResult(this, result);
- },
-
- stopSearch: function() {}
-};
-
-var componentManager = Components.manager
- .QueryInterface(Components.interfaces.nsIComponentRegistrar);
-componentManager.registerFactory(autoCompleteSimpleID, "Test Simple Autocomplete",
- autoCompleteSimpleName, autoCompleteSimple);
-
-
-// Test Bug 325842 - completeDefaultIndex
-
-SimpleTest.waitForExplicitFinish();
-setTimeout(nextTest, 0);
-
-var currentTest = null;
-
-// Note the entries for these tests (key) are incremental.
-const tests = [
- {
- desc: "HOME key remove selection",
- key: "VK_HOME",
- removeSelection: true,
- result: "re",
- start: 0, end: 0
- },
- {
- desc: "LEFT key remove selection",
- key: "VK_LEFT",
- removeSelection: true,
- result: "re",
- start: 1, end: 1
- },
- { desc: "RIGHT key remove selection",
- key: "VK_RIGHT",
- removeSelection: true,
- result: "re",
- start: 2, end: 2
- },
- { desc: "ENTER key remove selection",
- key: "VK_RETURN",
- removeSelection: true,
- result: "re",
- start: 2, end: 2
- },
- {
- desc: "HOME key",
- key: "VK_HOME",
- removeSelection: false,
- result: "Result",
- start: 0, end: 0
- },
- {
- desc: "LEFT key",
- key: "VK_LEFT",
- removeSelection: false,
- result: "Result",
- start: 5, end: 5
- },
- { desc: "RIGHT key",
- key: "VK_RIGHT",
- removeSelection: false,
- result: "Result",
- start: 6, end: 6
- },
- { desc: "RETURN key",
- key: "VK_RETURN",
- removeSelection: false,
- result: "Result",
- start: 6, end: 6
- },
- { desc: "TAB key should confirm suggestion when forcecomplete is set",
- key: "VK_TAB",
- removeSelection: false,
- forceComplete: true,
- result: "Result",
- start: 6, end: 6
- },
-
- { desc: "RIGHT key complete from middle",
- key: "VK_RIGHT",
- forceComplete: true,
- completeFromMiddle: true,
- result: "Result",
- start: 6, end: 6
- },
- {
- desc: "RIGHT key w/ minResultsForPopup=2",
- key: "VK_RIGHT",
- removeSelection: false,
- minResultsForPopup: 2,
- result: "Result",
- start: 6, end: 6
- },
-];
-
-function nextTest() {
- if (!tests.length) {
- // No more tests to run, finish.
- setTimeout(function() {
- // Unregister the factory so that we don't get in the way of other tests
- componentManager.unregisterFactory(autoCompleteSimpleID, autoCompleteSimple);
- SimpleTest.finish();
- }, 0);
- return;
- }
-
- var autocomplete = $("autocomplete");
- autocomplete.value = "";
- currentTest = tests.shift();
-
- // HOME key works differently on Mac, so we skip tests using it.
- if (currentTest.key == "VK_HOME" && navigator.platform.indexOf("Mac") != -1)
- nextTest();
- else
- setTimeout(runCurrentTest, 0);
-}
-
-function runCurrentTest() {
- var autocomplete = $("autocomplete");
- if ("minResultsForPopup" in currentTest)
- autocomplete.setAttribute("minresultsforpopup", currentTest.minResultsForPopup)
- else
- autocomplete.removeAttribute("minresultsforpopup");
-
- autocomplete.focus();
-
- if (!currentTest.completeFromMiddle) {
- synthesizeKey("r", {});
- synthesizeKey("e", {});
- }
- else {
- synthesizeKey("l", {});
- synthesizeKey("t", {});
- }
-}
-
-function searchComplete() {
- var autocomplete = $("autocomplete");
- autocomplete.setAttribute("forcecomplete", currentTest.forceComplete ? true : false);
-
- if (currentTest.completeFromMiddle) {
- if (!currentTest.forceComplete) {
- synthesizeKey(currentTest.key, {});
- }
- else if (!/ >> /.test(autocomplete.value)) {
- // At this point we should have a value like "lt >> Result" showing.
- throw new Error("Expected an middle-completed value, got " + autocomplete.value);
- }
-
- // For forceComplete a blur should cause a value from the results to get
- // completed to. E.g. "lt >> Result" will turn into "Result".
- if (currentTest.forceComplete)
- autocomplete.blur();
-
- checkResult();
- return;
- }
-
- is(autocomplete.value, "result",
- "Test '" + currentTest.desc + "': autocomplete.value should equal 'result'");
-
- if (autocomplete.selectionStart == 2) { // Finished inserting "re" string.
- if (currentTest.removeSelection) {
- // remove current selection
- synthesizeKey("VK_DELETE", {});
- }
-
- synthesizeKey(currentTest.key, {});
-
- checkResult();
- }
-}
-
-function checkResult() {
- var autocomplete = $("autocomplete");
-
- is(autocomplete.value, currentTest.result,
- "Test '" + currentTest.desc + "': autocomplete.value should equal '" +
- currentTest.result + "'");
-
- is(autocomplete.selectionStart, currentTest.start,
- "Test '" + currentTest.desc + "': autocomplete selection should start at " +
- currentTest.start);
-
- is(autocomplete.selectionEnd, currentTest.end,
- "Test '" + currentTest.desc + "': autocomplete selection should end at " +
- currentTest.end);
-
- setTimeout(nextTest, 0);
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_autocomplete5.xul b/toolkit/content/tests/chrome/test_autocomplete5.xul
deleted file mode 100644
index 2f6dc5a307..0000000000
--- a/toolkit/content/tests/chrome/test_autocomplete5.xul
+++ /dev/null
@@ -1,152 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Autocomplete Widget Test 5"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
-<textbox id="autocomplete" type="autocomplete"
- autocompletesearch="simple"
- ontextentered="checkTextEntered();"
- ontextreverted="checkTextReverted();"
- onsearchbegin="checkSearchBegin();"
- onsearchcomplete="checkSearchCompleted();"/>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-const ACR = Components.interfaces.nsIAutoCompleteResult;
-
-// This result can't be constructed in-line, because otherwise we leak memory.
-function nsAutoCompleteSimpleResult(aString)
-{
- this.searchString = aString;
- this.searchResult = ACR.RESULT_SUCCESS;
- this.matchCount = 1;
- this._param = "SUCCESS";
-}
-
-nsAutoCompleteSimpleResult.prototype = {
- _param: "",
- searchString: null,
- searchResult: ACR.RESULT_FAILURE,
- defaultIndex: -1,
- errorDescription: null,
- matchCount: 0,
- getValueAt: function() { return this._param; },
- getCommentAt: function() { return null; },
- getStyleAt: function() { return null; },
- getImageAt: function() { return null; },
- getFinalCompleteValueAt: function() { return this.getValueAt(); },
- getLabelAt: function() { return null; },
- removeValueAt: function() {}
-};
-
-// A basic autocomplete implementation that either returns one result or none
-var autoCompleteSimpleID = Components.ID("0a2afbdb-f30e-47d1-9cb1-0cd160240aca");
-var autoCompleteSimpleName = "@mozilla.org/autocomplete/search;1?name=simple"
-var autoCompleteSimple = {
- QueryInterface: function(iid) {
- if (iid.equals(Components.interfaces.nsISupports) ||
- iid.equals(Components.interfaces.nsIFactory) ||
- iid.equals(Components.interfaces.nsIAutoCompleteSearch))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- },
-
- createInstance: function(outer, iid) {
- return this.QueryInterface(iid);
- },
-
- startSearch: function(aString, aParam, aResult, aListener) {
- var result = new nsAutoCompleteSimpleResult(aString);
- aListener.onSearchResult(this, result);
- },
-
- stopSearch: function() {}
-};
-
-var componentManager = Components.manager
- .QueryInterface(Components.interfaces.nsIComponentRegistrar);
-componentManager.registerFactory(autoCompleteSimpleID, "Test Simple Autocomplete",
- autoCompleteSimpleName, autoCompleteSimple);
-
-SimpleTest.waitForExplicitFinish();
-setTimeout(startTest, 0);
-
-function startTest() {
- let autocomplete = $("autocomplete");
-
- // blur the field to ensure that the popup is closed and that the previous
- // search has stopped, then start a new search.
- autocomplete.blur();
- autocomplete.focus();
- synthesizeKey("r", {});
-}
-
-let hasTextEntered = false;
-let hasSearchBegun = false;
-
-function checkSearchBegin() {
- hasSearchBegun = true;
-}
-
-let test = 0;
-function checkSearchCompleted() {
- is(hasSearchBegun, true, "onsearchbegin handler has been correctly called.");
-
- if (test == 0) {
- hasSearchBegun = false;
- synthesizeKey("VK_RETURN", { });
- } else if (test == 1) {
- hasSearchBegun = false;
- synthesizeKey("VK_ESCAPE", { });
- } else {
- throw "checkSearchCompleted should only be called twice.";
- }
-}
-
-function checkTextEntered() {
- is(test, 0, "checkTextEntered should be reached from first test.");
- is(hasSearchBegun, false, "onsearchbegin handler should not be called on text revert.");
-
- // fire second test
- test++;
-
- let autocomplete = $("autocomplete");
- autocomplete.textValue = "";
- autocomplete.blur();
- autocomplete.focus();
- synthesizeKey("r", {});
-}
-
-function checkTextReverted() {
- is(test, 1, "checkTextReverted should be the second test reached.");
- is(hasSearchBegun, false, "onsearchbegin handler should not be called on text revert.");
-
- setTimeout(function() {
- // Unregister the factory so that we don't get in the way of other tests
- componentManager.unregisterFactory(autoCompleteSimpleID, autoCompleteSimple);
- SimpleTest.finish();
- }, 0);
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_autocomplete_delayOnPaste.xul b/toolkit/content/tests/chrome/test_autocomplete_delayOnPaste.xul
deleted file mode 100644
index 19f54ac217..0000000000
--- a/toolkit/content/tests/chrome/test_autocomplete_delayOnPaste.xul
+++ /dev/null
@@ -1,128 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Autocomplete Widget Test 4"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTest();">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
- <script type="application/javascript"
- src="chrome://global/content/globalOverlay.js"/>
-
-<textbox id="autocomplete"
- type="autocomplete"
- completedefaultindex="true"
- onsearchcomplete="searchComplete();"
- timeout="0"
- autocompletesearch="simple"/>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-function autoCompleteSimpleResult(aString) {
- this.searchString = aString;
- this.searchResult = Components.interfaces.nsIAutoCompleteResult.RESULT_SUCCESS;
- this.matchCount = 1;
- this._param = "Result";
-}
-autoCompleteSimpleResult.prototype = {
- _param: "",
- searchString: null,
- searchResult: Components.interfaces.nsIAutoCompleteResult.RESULT_FAILURE,
- defaultIndex: 0,
- errorDescription: null,
- matchCount: 0,
- getValueAt: function() { return this._param; },
- getCommentAt: function() { return null; },
- getStyleAt: function() { return null; },
- getImageAt: function() { return null; },
- getFinalCompleteValueAt: function() { return this.getValueAt(); },
- getLabelAt: function() { return null; },
- removeValueAt: function() {}
-};
-
-// A basic autocomplete implementation that returns one result.
-let autoCompleteSimple = {
- classID: Components.ID("0a2afbdb-f30e-47d1-9cb1-0cd160240aca"),
- contractID: "@mozilla.org/autocomplete/search;1?name=simple",
- QueryInterface: XPCOMUtils.generateQI([
- Components.interfaces.nsIFactory,
- Components.interfaces.nsIAutoCompleteSearch
- ]),
- createInstance: function (outer, iid) {
- return this.QueryInterface(iid);
- },
-
- registerFactory: function () {
- let registrar =
- Components.manager.QueryInterface(Components.interfaces.nsIComponentRegistrar);
- registrar.registerFactory(this.classID, "Test Simple Autocomplete",
- this.contractID, this);
- },
- unregisterFactory: function () {
- let registrar =
- Components.manager.QueryInterface(Components.interfaces.nsIComponentRegistrar);
- registrar.unregisterFactory(this.classID, this);
- },
-
- startSearch: function (aString, aParam, aResult, aListener) {
- let result = new autoCompleteSimpleResult(aString);
- aListener.onSearchResult(this, result);
- },
- stopSearch: function () {}
-};
-
-SimpleTest.waitForExplicitFinish();
-
-// XPFE AutoComplete needs to register early.
-autoCompleteSimple.registerFactory();
-
-let gACTimer;
-let gAutoComplete;
-
-function searchComplete() {
- is(gAutoComplete.value, "result", "Value should be autocompleted now");
- ok(Date.now() - gACTimer > 500, "There should be a delay before autocomplete");
-
- // Unregister the factory so that we don't get in the way of other tests
- autoCompleteSimple.unregisterFactory();
- SimpleTest.finish();
-}
-
-function runTest() {
- gAutoComplete = $("autocomplete");
-
- const SEARCH_STRING = "res";
-
- function cbCallback() {
- gAutoComplete.focus();
- synthesizeKey("v", { accelKey: true });
- is(gAutoComplete.value, SEARCH_STRING, "Value should not be autocompleted immediately");
- }
-
- SimpleTest.waitForClipboard(SEARCH_STRING, function () {
- gACTimer = Date.now();
- Components.classes["@mozilla.org/widget/clipboardhelper;1"]
- .getService(Components.interfaces.nsIClipboardHelper)
- .copyStringToClipboard(SEARCH_STRING, Components.interfaces.nsIClipboard.kGlobalClipboard);
- }, cbCallback, cbCallback);
-}
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_autocomplete_emphasis.xul b/toolkit/content/tests/chrome/test_autocomplete_emphasis.xul
deleted file mode 100644
index b162742f12..0000000000
--- a/toolkit/content/tests/chrome/test_autocomplete_emphasis.xul
+++ /dev/null
@@ -1,175 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Autocomplete emphasis test"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
-<textbox id="richautocomplete" type="autocomplete"
- autocompletesearch="simple"
- onsearchcomplete="checkSearchCompleted();"
- autocompletepopup="richpopup"/>
-<panel id="richpopup" type="autocomplete-richlistbox" noautofocus="true"/>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-const ACR = Components.interfaces.nsIAutoCompleteResult;
-
-// A global variable to hold the search result for the current search.
-var resultText = "";
-
-// This result can't be constructed in-line, because otherwise we leak memory.
-function nsAutoCompleteSimpleResult(aString)
-{
- this.searchString = aString;
- this.searchResult = ACR.RESULT_SUCCESS;
- this.matchCount = 1;
-}
-
-nsAutoCompleteSimpleResult.prototype = {
- searchString: null,
- searchResult: ACR.RESULT_FAILURE,
- defaultIndex: -1,
- errorDescription: null,
- matchCount: 0,
- getValueAt: function() { return resultText; },
- getCommentAt: function() { return this.getValueAt(); },
- getStyleAt: function() { return null; },
- getImageAt: function() { return null; },
- getFinalCompleteValueAt: function() { return this.getValueAt(); },
- getLabelAt: function() { return this.getValueAt(); },
- removeValueAt: function() {}
-};
-
-// A basic autocomplete implementation that returns the string contained in 'resultText'.
-var autoCompleteSimpleID = Components.ID("0a2afbdb-f30e-47d1-9cb1-0cd160240aca");
-var autoCompleteSimpleName = "@mozilla.org/autocomplete/search;1?name=simple"
-var autoCompleteSimple = {
- QueryInterface: function(iid) {
- if (iid.equals(Components.interfaces.nsISupports) ||
- iid.equals(Components.interfaces.nsIFactory) ||
- iid.equals(Components.interfaces.nsIAutoCompleteSearch))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- },
-
- createInstance: function(outer, iid) {
- return this.QueryInterface(iid);
- },
-
- startSearch: function(aString, aParam, aResult, aListener) {
- var result = new nsAutoCompleteSimpleResult(aString);
- aListener.onSearchResult(this, result);
- },
-
- stopSearch: function() {}
-};
-
-var componentManager = Components.manager
- .QueryInterface(Components.interfaces.nsIComponentRegistrar);
-componentManager.registerFactory(autoCompleteSimpleID, "Test Simple Autocomplete",
- autoCompleteSimpleName, autoCompleteSimple);
-
-SimpleTest.waitForExplicitFinish();
-setTimeout(nextTest, 0);
-
-/* Test cases have the following attributes:
- * - search: A search string, to be emphasized in the result.
- * - result: A fixed result string, so we can hardcode the expected emphasis.
- * - emphasis: A list of chunks that should be emphasized or not, in strict alternation.
- * - emphasizeFirst: Whether the first element of 'emphasis' should be emphasized;
- * The emphasis of the other elements is defined by the strict alternation rule.
- */
-let testcases = [
- { search: "test",
- result: "A test string",
- emphasis: ["A ", "test", " string"],
- emphasizeFirst: false
- },
- { search: "tea two",
- result: "Tea for two, and two for tea...",
- emphasis: ["Tea", " for ", "two", ", and ", "two", " for ", "tea", "..."],
- emphasizeFirst: true
- },
- { search: "tat",
- result: "tatatat",
- emphasis: ["tatatat"],
- emphasizeFirst: true
- },
- { search: "cheval valise",
- result: "chevalise",
- emphasis: ["chevalise"],
- emphasizeFirst: true
- }
-];
-let test = -1;
-let currentTest = null;
-
-function nextTest() {
- test++;
-
- if (test >= testcases.length) {
- // Unregister the factory so that we don't get in the way of other tests
- componentManager.unregisterFactory(autoCompleteSimpleID, autoCompleteSimple);
- SimpleTest.finish();
- return;
- }
-
- // blur the field to ensure that the popup is closed and that the previous
- // search has stopped, then start a new search.
- let autocomplete = $("richautocomplete");
- autocomplete.blur();
- autocomplete.focus();
-
- currentTest = testcases[test];
- resultText = currentTest.result;
- autocomplete.value = currentTest.search;
- synthesizeKey("VK_DOWN", {});
-}
-
-function checkSearchCompleted() {
- let autocomplete = $("richautocomplete");
- let result = autocomplete.popup.richlistbox.firstChild;
-
- for (let attribute of [result._titleText, result._urlText]) {
- is(attribute.childNodes.length, currentTest.emphasis.length,
- "The element should have the expected number of children.");
- for (let i = 0; i < currentTest.emphasis.length; i++) {
- let node = attribute.childNodes[i];
- // Emphasized parts strictly alternate.
- if ((i % 2 == 0) == currentTest.emphasizeFirst) {
- // Check that this part is correctly emphasized.
- is(node.nodeName, "span", ". That child should be a span node");
- ok(node.classList.contains("ac-emphasize-text"), ". That child should be emphasized");
- is(node.textContent, currentTest.emphasis[i], ". That emphasis should be as expected.");
- } else {
- // Check that this part is _not_ emphasized.
- is(node.nodeName, "#text", ". That child should be a text node");
- is(node.textContent, currentTest.emphasis[i], ". That text should be as expected.");
- }
- }
- }
-
- setTimeout(nextTest, 0);
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_autocomplete_mac_caret.xul b/toolkit/content/tests/chrome/test_autocomplete_mac_caret.xul
deleted file mode 100644
index 21670215d4..0000000000
--- a/toolkit/content/tests/chrome/test_autocomplete_mac_caret.xul
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Autocomplete Widget Test"
- onload="setTimeout(keyCaretTest, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
-<textbox id="autocomplete" type="autocomplete"/>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-function keyCaretTest()
-{
- var autocomplete = $("autocomplete");
-
- autocomplete.focus();
- checkKeyCaretTest("VK_UP", 0, 0, false, "no value up");
- checkKeyCaretTest("VK_DOWN", 0, 0, false, "no value down");
-
- autocomplete.value = "Sample";
-
- autocomplete.selectionStart = 3;
- autocomplete.selectionEnd = 3;
- checkKeyCaretTest("VK_UP", 0, 0, true, "value up with caret in middle");
- checkKeyCaretTest("VK_UP", 0, 0, false, "value up with caret in middle again");
-
- autocomplete.selectionStart = 2;
- autocomplete.selectionEnd = 2;
- checkKeyCaretTest("VK_DOWN", 6, 6, true, "value down with caret in middle");
- checkKeyCaretTest("VK_DOWN", 6, 6, false, "value down with caret in middle again");
-
- autocomplete.selectionStart = 1;
- autocomplete.selectionEnd = 4;
- checkKeyCaretTest("VK_UP", 0, 0, true, "value up with selection");
-
- autocomplete.selectionStart = 1;
- autocomplete.selectionEnd = 4;
- checkKeyCaretTest("VK_DOWN", 6, 6, true, "value down with selection");
-
- SimpleTest.finish();
-}
-
-function checkKeyCaretTest(key, expectedStart, expectedEnd, result, testid)
-{
- var autocomplete = $("autocomplete");
-
- var event = result ? "keypress" : "!keypress";
- synthesizeKeyExpectEvent(key, { }, autocomplete.inputField, event, testid);
- is(autocomplete.selectionStart, expectedStart, testid + " selectionStart");
- is(autocomplete.selectionEnd, expectedEnd, testid + " selectionEnd");
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_autocomplete_placehold_last_complete.xul b/toolkit/content/tests/chrome/test_autocomplete_placehold_last_complete.xul
deleted file mode 100644
index 01004327de..0000000000
--- a/toolkit/content/tests/chrome/test_autocomplete_placehold_last_complete.xul
+++ /dev/null
@@ -1,309 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Autocomplete Widget Test"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTest();">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
- <script type="application/javascript"
- src="chrome://global/content/globalOverlay.js"/>
-
-<textbox id="autocomplete"
- type="autocomplete"
- completedefaultindex="true"
- timeout="0"
- autocompletesearch="simple"/>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-function autoCompleteSimpleResult(aString, searchId) {
- this.searchString = aString;
- this.searchResult = Components.interfaces.nsIAutoCompleteResult.RESULT_SUCCESS;
- this.matchCount = 1;
- if (aString.startsWith('ret')) {
- this._param = autoCompleteSimpleResult.retireCompletion;
- } else {
- this._param = "Result";
- }
- this._searchId = searchId;
-}
-autoCompleteSimpleResult.retireCompletion = "Retire";
-autoCompleteSimpleResult.prototype = {
- _param: "",
- searchString: null,
- searchResult: Components.interfaces.nsIAutoCompleteResult.RESULT_FAILURE,
- defaultIndex: 0,
- errorDescription: null,
- matchCount: 0,
- getValueAt: function() { return this._param; },
- getCommentAt: function() { return null; },
- getStyleAt: function() { return null; },
- getImageAt: function() { return null; },
- getLabelAt: function() { return null; },
- removeValueAt: function() {}
-};
-
-var searchCounter = 0;
-
-// A basic autocomplete implementation that returns one result.
-let autoCompleteSimple = {
- classID: Components.ID("0a2afbdb-f30e-47d1-9cb1-0cd160240aca"),
- contractID: "@mozilla.org/autocomplete/search;1?name=simple",
- searchAsync: false,
- pendingSearch: null,
-
- QueryInterface: XPCOMUtils.generateQI([
- Components.interfaces.nsIFactory,
- Components.interfaces.nsIAutoCompleteSearch
- ]),
- createInstance: function (outer, iid) {
- return this.QueryInterface(iid);
- },
-
- registerFactory: function () {
- let registrar =
- Components.manager.QueryInterface(Components.interfaces.nsIComponentRegistrar);
- registrar.registerFactory(this.classID, "Test Simple Autocomplete",
- this.contractID, this);
- },
- unregisterFactory: function () {
- let registrar =
- Components.manager.QueryInterface(Components.interfaces.nsIComponentRegistrar);
- registrar.unregisterFactory(this.classID, this);
- },
-
- startSearch: function (aString, aParam, aResult, aListener) {
- let result = new autoCompleteSimpleResult(aString);
-
- if (this.searchAsync) {
- // Simulate an async search by using a timeout before invoking the
- // |onSearchResult| callback.
- // Store the searchTimeout such that it can be canceled if stopSearch is called.
- this.pendingSearch = setTimeout(() => {
- this.pendingSearch = null;
-
- aListener.onSearchResult(this, result);
-
- // Move to the next step in the async test.
- asyncTest.next();
- }, 0);
- } else {
- aListener.onSearchResult(this, result);
- }
- },
- stopSearch: function () {
- clearTimeout(this.pendingSearch);
- }
-};
-
-SimpleTest.waitForExplicitFinish();
-
-// XPFE AutoComplete needs to register early.
-autoCompleteSimple.registerFactory();
-
-let gACTimer;
-let gAutoComplete;
-let asyncTest;
-
-let searchCompleteTimeoutId = null;
-
-function finishTest() {
- // Unregister the factory so that we don't get in the way of other tests
- autoCompleteSimple.unregisterFactory();
- SimpleTest.finish();
-}
-
-function runTest() {
- gAutoComplete = $("autocomplete");
- gAutoComplete.focus();
-
- // Return the search results synchronous, which also makes the completion
- // happen synchronous.
- autoCompleteSimple.searchAsync = false;
-
- synthesizeKey("r", {});
- is(gAutoComplete.value, "result", "Value should be autocompleted immediately");
-
- synthesizeKey("e", {});
- is(gAutoComplete.value, "result", "Value should be autocompleted immediately");
-
- synthesizeKey("VK_DELETE", {});
- is(gAutoComplete.value, "re", "Deletion should not complete value");
-
- synthesizeKey("VK_BACK_SPACE", {});
- is(gAutoComplete.value, "r", "Backspace should not complete value");
-
- synthesizeKey("VK_LEFT", {});
- is(gAutoComplete.value, "r", "Value should stay same when navigating with cursor");
-
- runAsyncTest();
-}
-
-function* asyncTestGenerator() {
- synthesizeKey("r", {});
- synthesizeKey("e", {});
- is(gAutoComplete.value, "re", "Value should not be autocompleted immediately");
-
- // Calling |yield undefined| makes this generator function wait until
- // |asyncTest.next();| is called. This happens from within the
- // |autoCompleteSimple.startSearch()| function once the simulated async
- // search has finished.
- // Therefore, the effect of the |yield undefined;| here (and the ones) below
- // is to wait until the async search result comes back.
- yield undefined;
-
- is(gAutoComplete.value, "result", "Value should be autocompleted");
-
- // Test if typing the `s` character completes directly based on the last
- // completion
- synthesizeKey("s", {});
- is(gAutoComplete.value, "result", "Value should be completed immediately");
-
- yield undefined;
-
- is(gAutoComplete.value, "result", "Value should be autocompleted to same value");
- synthesizeKey("VK_DELETE", {});
- is(gAutoComplete.value, "res", "Deletion should not complete value");
-
- // No |yield undefined| needed here as no completion is triggered by the deletion.
-
- is(gAutoComplete.value, "res", "Still no complete value after deletion");
-
- synthesizeKey("VK_BACK_SPACE", {});
- is(gAutoComplete.value, "re", "Backspace should not complete value");
-
- yield undefined;
-
- is(gAutoComplete.value, "re", "Value after search due to backspace should stay the same"); (3)
-
- // Typing a character that is not like the previous match. In this case, the
- // completion cannot happen directly and therefore the value will be completed
- // only after the search has finished.
- synthesizeKey("t", {});
- is(gAutoComplete.value, "ret", "Value should not be autocompleted immediately");
-
- yield undefined;
-
- is(gAutoComplete.value, "retire", "Value should be autocompleted");
-
- synthesizeKey("i", {});
- is(gAutoComplete.value, "retire", "Value should be autocompleted immediately");
-
- yield undefined;
-
- is(gAutoComplete.value, "retire", "Value should be autocompleted to the same value");
-
- // Setup the scene to test how the completion behaves once the placeholder
- // completion and the result from the search do not agree with each other.
- gAutoComplete.value = 'r';
- // Need to type two characters as the input was reset and the autocomplete
- // controller things, ther user hit the backspace button, in which case
- // no completion is performed. But as a completion is desired, another
- // character `t` is typed afterwards.
- synthesizeKey("e", {});
- yield undefined;
- synthesizeKey("t", {});
- is(gAutoComplete.value, "ret", "Value should not be autocompleted");
-
- yield undefined;
-
- is(gAutoComplete.value, "retire", "Value should be autocompleted");
-
- // The placeholder string is now set to "retire". Changing the completion
- // string to "retirement" and see what the completion will turn out like.
- autoCompleteSimpleResult.retireCompletion = "Retirement";
- synthesizeKey("i", {});
- is(gAutoComplete.value, "retire", "Value should be autocompleted based on placeholder");
-
- yield undefined;
-
- is(gAutoComplete.value, "retirement", "Value should be autocompleted based on search result");
-
- // Change the search result to `Retire` again and see if the new result is
- // complited.
- autoCompleteSimpleResult.retireCompletion = "Retire";
- synthesizeKey("r", {});
- is(gAutoComplete.value, "retirement", "Value should be autocompleted based on placeholder");
-
- yield undefined;
-
- is(gAutoComplete.value, "retire", "Value should be autocompleted based on search result");
-
- // Complete the value
- gAutoComplete.value = 're';
- synthesizeKey("t", {});
- yield undefined;
- synthesizeKey("i", {});
- is(gAutoComplete.value, "reti", "Value should not be autocompleted");
-
- yield undefined;
-
- is(gAutoComplete.value, "retire", "Value should be autocompleted");
-
- // Remove the selected text "re" (1) and the "et" (2). Afterwards, add it again (3).
- // This should not cause the completion to kick in.
- synthesizeKey("VK_DELETE", {}); // (1)
-
- is(gAutoComplete.value, "reti", "Value should not complete after deletion");
-
- gAutoComplete.selectionStart = 1;
- gAutoComplete.selectionEnd = 3;
- synthesizeKey("VK_DELETE", {}); // (2)
-
- is(gAutoComplete.value, "ri", "Value should stay unchanged after removing character in the middle");
-
- yield undefined;
-
- synthesizeKey("e", {}); // (3.1)
- is(gAutoComplete.value, "rei", "Inserting a character in the middle should not complete the value");
-
- yield undefined;
-
- synthesizeKey("t", {}); // (3.2)
- is(gAutoComplete.value, "reti", "Inserting a character in the middle should not complete the value");
-
- yield undefined;
-
- // Adding a new character at the end should not cause the completion to happen again
- // as the completion failed before.
- gAutoComplete.selectionStart = 4;
- gAutoComplete.selectionEnd = 4;
- synthesizeKey("r", {});
- is(gAutoComplete.value, "retir", "Value should not be autocompleted immediately");
-
- yield undefined;
-
- is(gAutoComplete.value, "retire", "Value should be autocompleted");
-
- finishTest();
- yield undefined;
-}
-
-function runAsyncTest() {
- gAutoComplete.value = '';
- autoCompleteSimple.searchAsync = true;
-
- asyncTest = asyncTestGenerator();
- asyncTest.next();
-}
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_autocomplete_with_composition_on_input.html b/toolkit/content/tests/chrome/test_autocomplete_with_composition_on_input.html
deleted file mode 100644
index 3f57a0d6e4..0000000000
--- a/toolkit/content/tests/chrome/test_autocomplete_with_composition_on_input.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>autocomplete with composition tests on HTML input element</title>
- <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="file_autocomplete_with_composition.js"></script>
- <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-
-<div id="content">
- <iframe id="formTarget" name="formTarget"></iframe>
- <form action="data:text/html," target="formTarget">
- <input name="test" id="input"><input type="submit">
- </form>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-SimpleTest.waitForExplicitFinish();
-
-function runTests()
-{
- var formFillController =
- SpecialPowers.getFormFillController()
- .QueryInterface(Components.interfaces.nsIAutoCompleteInput);
- var originalFormFillTimeout = formFillController.timeout;
-
- SpecialPowers.attachFormFillControllerTo(window);
- var target = document.getElementById("input");
-
- // Register a word to the form history.
- target.focus();
- target.value = "Mozilla";
- synthesizeKey("VK_RETURN", {});
- target.value = "";
-
- var test1 = new nsDoTestsForAutoCompleteWithComposition(
- "Testing on HTML input (asynchronously search)",
- window, target, formFillController.controller, is,
- function () { return target.value; },
- function () {
- target.setAttribute("timeout", 0);
- var test2 = new nsDoTestsForAutoCompleteWithComposition(
- "Testing on HTML input (synchronously search)",
- window, target, formFillController.controller, is,
- function () { return target.value; },
- function () {
- formFillController.timeout = originalFormFillTimeout;
- SpecialPowers.detachFormFillControllerFrom(window);
- SimpleTest.finish();
- });
- });
-}
-
-SimpleTest.waitForFocus(runTests);
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/content/tests/chrome/test_autocomplete_with_composition_on_textbox.xul b/toolkit/content/tests/chrome/test_autocomplete_with_composition_on_textbox.xul
deleted file mode 100644
index 90972b8dab..0000000000
--- a/toolkit/content/tests/chrome/test_autocomplete_with_composition_on_textbox.xul
+++ /dev/null
@@ -1,124 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-<window title="Testing autocomplete with composition"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js" />
- <script type="text/javascript"
- src="file_autocomplete_with_composition.js" />
-
- <textbox id="textbox" type="autocomplete"
- autocompletesearch="simpleForComposition"/>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-const nsIAutoCompleteResult = Components.interfaces.nsIAutoCompleteResult;
-
-// This result can't be constructed in-line, because otherwise we leak memory.
-function nsAutoCompleteSimpleResult(aString)
-{
- this.searchString = aString;
- if (aString == "" || aString == "Mozilla".substr(0, aString.length)) {
- this.searchResult = nsIAutoCompleteResult.RESULT_SUCCESS;
- this.matchCount = 1;
- this._value = "Mozilla";
- } else {
- this.searchResult = nsIAutoCompleteResult.RESULT_NOMATCH;
- this.matchCount = 0;
- this._value = "";
- }
-}
-
-nsAutoCompleteSimpleResult.prototype = {
- _value: "",
- searchString: null,
- searchResult: nsIAutoCompleteResult.RESULT_FAILURE,
- defaultIndex: 0,
- errorDescription: null,
- matchCount: 0,
- getValueAt: function(aIndex) { return aIndex == 0 ? this._value : null; },
- getCommentAt: function() { return null; },
- getStyleAt: function() { return null; },
- getImageAt: function() { return null; },
- getFinalCompleteValueAt: function(aIndex) { return this.getValueAt(aIndex); },
- getLabelAt: function() { return null; },
- removeValueAt: function() {}
-};
-
-// A basic autocomplete implementation that either returns one result or none
-var autoCompleteSimpleID =
- Components.ID("0a2afbdb-f30e-47d1-9cb1-0cd160240aca");
-var autoCompleteSimpleName =
- "@mozilla.org/autocomplete/search;1?name=simpleForComposition"
-var autoCompleteSimple = {
- QueryInterface: function(iid) {
- if (iid.equals(Components.interfaces.nsISupports) ||
- iid.equals(Components.interfaces.nsIFactory) ||
- iid.equals(Components.interfaces.nsIAutoCompleteSearch))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- },
-
- createInstance: function(outer, iid) {
- return this.QueryInterface(iid);
- },
-
- startSearch: function(aString, aParam, aResult, aListener) {
- var result = new nsAutoCompleteSimpleResult(aString);
- aListener.onSearchResult(this, result);
- },
-
- stopSearch: function() {}
-};
-
-var componentManager =
- Components.manager
- .QueryInterface(Components.interfaces.nsIComponentRegistrar);
-componentManager.registerFactory(autoCompleteSimpleID,
- "Test Simple Autocomplete for composition",
- autoCompleteSimpleName, autoCompleteSimple);
-
-function runTests()
-{
- var target = document.getElementById("textbox");
- target.setAttribute("timeout", 1);
- var test1 = new nsDoTestsForAutoCompleteWithComposition(
- "Testing on XUL textbox (asynchronously search)",
- window, target, target.controller, is,
- function () { return target.value; },
- function () {
- target.setAttribute("timeout", 0);
- var test2 = new nsDoTestsForAutoCompleteWithComposition(
- "Testing on XUL textbox (synchronously search)",
- window, target, target.controller, is,
- function () { return target.value; },
- function () {
- // Unregister the factory so that we don't get in the way of other
- // tests
- componentManager.unregisterFactory(autoCompleteSimpleID,
- autoCompleteSimple);
- SimpleTest.finish();
- });
- });
-}
-
-SimpleTest.waitForFocus(runTests);
-]]>
-</script>
-</window>
diff --git a/toolkit/content/tests/chrome/test_browser_drop.xul b/toolkit/content/tests/chrome/test_browser_drop.xul
deleted file mode 100644
index 4ba21c514c..0000000000
--- a/toolkit/content/tests/chrome/test_browser_drop.xul
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Browser Drop Test"
- onload="setTimeout(runTest, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SpawnTask.js"/>
-
- <script><![CDATA[
-SimpleTest.waitForExplicitFinish();
-function runTest() {
- add_task(function*() {
- let win = window.open("window_browser_drop.xul", "_blank", "chrome,width=200,height=200");
- yield SimpleTest.promiseFocus(win);
- for (let browserType of ["content", "remote-content"]) {
- yield win.dropLinksOnBrowser(win.document.getElementById(browserType + "child"), browserType);
- }
- yield win.dropLinksOnBrowser(win.document.getElementById("chromechild"), "chrome");
- });
-}
-//]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug1048178.xul b/toolkit/content/tests/chrome/test_bug1048178.xul
deleted file mode 100644
index 79f3acad5d..0000000000
--- a/toolkit/content/tests/chrome/test_bug1048178.xul
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=1048178
--->
-<window title="Mozilla Bug 1048178"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml"/>
- <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1048178"
- target="_blank">Mozilla Bug 1048178</a>
-
- <hbox>
- <scrollbar id="scroller"
- orient="horizontal"
- curpos="0"
- maxpos="500"
- pageincrement="500"
- width="500"
- style="margin:0"/>
- </hbox>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
-/** Test for Bug 1048178 **/
-var scrollbarTester = {
- scrollbar: null,
- startTest: function() {
- this.scrollbar = $("scroller");
- this.setScrollToClick(false);
- this.testThumbDragging();
- SimpleTest.finish();
- },
- testThumbDragging: function() {
- var x = 400; // on the right half of the scroolbar
- var y = 5;
-
- this.mousedown(x, y, 0);
- this.mousedown(x, y, 2);
- this.mouseup(x, y, 2);
- this.mouseup(x, y, 0);
-
- var newPos = this.getPos(); // sould be '500'
-
- this.mousedown(x, y, 0);
- this.mousemove(x-1, y, 0);
- this.mouseup(x-1, y, 0);
-
- var newPos2 = this.getPos();
- ok(newPos2 < newPos,
- "Scrollbar thumb should follow the mouse when dragged.");
- },
- setScrollToClick: function(value) {
- var prefService = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefService);
- var uiBranch = prefService.getBranch("ui.");
- uiBranch.setIntPref("scrollToClick", value ? 1 : 0);
- },
- getPos: function() {
- return this.scrollbar.getAttribute("curpos");
- },
- mousedown: function(x, y, button) {
- synthesizeMouse(this.scrollbar, x, y, { type: "mousedown", 'button': button });
- },
- mousemove: function(x, y, button) {
- synthesizeMouse(this.scrollbar, x, y, { type: "mousemove", 'button': button });
- },
- mouseup: function(x, y, button) {
- synthesizeMouse(this.scrollbar, x, y, { type: "mouseup", 'button': button });
- }
-}
-
-function doTest() {
- setTimeout(function() { scrollbarTester.startTest(); }, 0);
-}
-
-SimpleTest.waitForExplicitFinish();
-addLoadEvent(doTest);
-
-]]></script>
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug253481.xul b/toolkit/content/tests/chrome/test_bug253481.xul
deleted file mode 100644
index aa5c017c68..0000000000
--- a/toolkit/content/tests/chrome/test_bug253481.xul
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=253481
--->
-<window title="Mozilla Bug 253481"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=253481">Mozilla Bug 253481</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-</body>
-
-<description>
- Tests pasting of multi-line content into a single-line xul:textbox.
-</description>
-
-<vbox>
-<textbox id="pasteintact" newlines="pasteintact"/>
-<textbox id="pastetofirst" newlines="pastetofirst"/>
-<textbox id="replacewithspaces" newlines="replacewithspaces"/>
-<textbox id="strip" newlines="strip"/>
-<textbox id="replacewithcommas" newlines="replacewithcommas"/>
-<textbox id="stripsurroundingwhitespace" newlines="stripsurroundingwhitespace"/>
-</vbox>
-<script class="testbody" type="application/javascript;version=1.7">
-<![CDATA[
-/** Test for Bug 253481 **/
-function testPaste(name, element, expected) {
- element.value = "";
- element.focus();
- synthesizeKey("v", { accelKey: true });
- is(element.value, expected, name);
-}
-
-SimpleTest.waitForExplicitFinish();
-
-SimpleTest.waitForFocus(function() {
-setTimeout(function() {
-var testString = "\n hello hello \n world\nworld \n";
-var expectedResults = {
-// even "pasteintact" strips leading/trailing newlines
-"pasteintact": testString.replace(/^\n/, '').replace(/\n$/, ''),
-// "pastetofirst" strips leading newlines
-"pastetofirst": testString.replace(/^\n/, '').split(/\n/)[0],
-// "replacewithspaces" strips trailing newlines first - bug 432415
-"replacewithspaces": testString.replace(/\n$/, '').replace(/\n/g,' '),
-// "strip" is pretty straightforward
-"strip": testString.replace(/\n/g,''),
-// "replacewithcommas" strips leading and trailing newlines first
-"replacewithcommas": testString.replace(/^\n/, '').replace(/\n$/, '').replace(/\n/g,','),
-// "stripsurroundingwhitespace" strips all newlines and whitespace around them
-"stripsurroundingwhitespace": testString.replace(/\s*\n\s*/g,'')
-};
-
-// Put a multi-line string in the clipboard
-SimpleTest.waitForClipboard(testString, function() {
- var clip = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
- .getService(Components.interfaces.nsIClipboardHelper);
- clip.copyString(testString);
-}, function() {
- for (let [item, expected] of Object.entries(expectedResults)) {
- testPaste(item, $(item), expected);
- }
-
- SimpleTest.finish();
-}, function() {
- ok(false, "Could not copy the string to clipboard, giving up");
-
- SimpleTest.finish();
-});
-}, 0);
-});
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug263683.xul b/toolkit/content/tests/chrome/test_bug263683.xul
deleted file mode 100644
index c5755c9f17..0000000000
--- a/toolkit/content/tests/chrome/test_bug263683.xul
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=263683
--->
-<window title="Mozilla Bug 263683"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <a target="_blank"
- href="https://bugzilla.mozilla.org/show_bug.cgi?id=263683">
- Mozilla Bug 263683
- </a>
-
- <p id="display"></p>
- <div id="content" style="display: none">
- </div>
- <pre id="test">
- </pre>
- </body>
-
- <script class="testbody" type="application/javascript">
- <![CDATA[
-
- /** Test for Bug 263683 **/
- SimpleTest.waitForExplicitFinish();
- window.open("bug263683_window.xul", "263683test",
- "chrome,width=600,height=600");
-
- ]]>
- </script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug304188.xul b/toolkit/content/tests/chrome/test_bug304188.xul
deleted file mode 100644
index f41d24f9bb..0000000000
--- a/toolkit/content/tests/chrome/test_bug304188.xul
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=304188
--->
-<window title="Mozilla Bug 304188"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<a target="_blank"
- href="https://bugzilla.mozilla.org/show_bug.cgi?id=304188">Mozilla Bug 304188</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-</pre>
-</body>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-/** Test for Bug 304188 **/
-SimpleTest.waitForExplicitFinish();
-window.open("bug304188_window.xul", "findbartest",
- "chrome,width=600,height=600");
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug331215.xul b/toolkit/content/tests/chrome/test_bug331215.xul
deleted file mode 100644
index e0d0d1e0a9..0000000000
--- a/toolkit/content/tests/chrome/test_bug331215.xul
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=331215
--->
-<window title="Mozilla Bug 331215"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<a target="_blank"
- href="https://bugzilla.mozilla.org/show_bug.cgi?id=331215">Mozilla Bug 331215</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-</pre>
-</body>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-/** Test for Bug 331215 **/
-
-SimpleTest.waitForExplicitFinish();
-window.open("bug331215_window.xul", "331215test",
- "chrome,width=600,height=600");
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug360220.xul b/toolkit/content/tests/chrome/test_bug360220.xul
deleted file mode 100644
index 3fcb2bf139..0000000000
--- a/toolkit/content/tests/chrome/test_bug360220.xul
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=360220
--->
-<window title="Mozilla Bug 360220"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=360220">Mozilla Bug 360220</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-</pre>
-</body>
-
-<menulist id="menulist">
- <menupopup>
- <menuitem id="firstItem" label="foo" selected="true"/>
- <menuitem id="secondItem" label="bar"/>
- </menupopup>
-</menulist>
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-/** Test for Bug 360220 **/
-
-var menulist = document.getElementById("menulist");
-var secondItem = document.getElementById("secondItem");
-menulist.selectedItem = secondItem;
-
-is(menulist.label, "bar", "second item was not selected");
-
-let mutObserver = new MutationObserver(() => {
- is(menulist.label, "new label", "menulist label was not updated to the label of its selected item");
- done();
-});
-mutObserver.observe(menulist, { attributeFilter: ['label'] });
-secondItem.label = "new label";
-
-let failureTimeout = setTimeout(function() {
- ok(false, "menulist label should have updated");
- done();
-}, 2000);
-
-function done() {
- mutObserver.disconnect();
- clearTimeout(failureTimeout);
- SimpleTest.finish();
-}
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug360437.xul b/toolkit/content/tests/chrome/test_bug360437.xul
deleted file mode 100644
index eb17adcf5d..0000000000
--- a/toolkit/content/tests/chrome/test_bug360437.xul
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=360437
--->
-<window title="Mozilla Bug 360437"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<a target="_blank"
- href="https://bugzilla.mozilla.org/show_bug.cgi?id=360437">Mozilla Bug 360437</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-</pre>
-</body>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-/** Test for Bug 360437 **/
-SimpleTest.waitForExplicitFinish();
-window.open("bug360437_window.xul", "360437test",
- "chrome,width=600,height=600");
-
-
-
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug365773.xul b/toolkit/content/tests/chrome/test_bug365773.xul
deleted file mode 100644
index 17385365ad..0000000000
--- a/toolkit/content/tests/chrome/test_bug365773.xul
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=365773
--->
-<window title="Mozilla Bug 365773"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=365773">Mozilla Bug 365773</a>
-<p id="display">
- <radiogroup id="group" collapsed="true" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <radio id="item" label="Item"/>
- </radiogroup>
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-/** Test for Bug 365773 **/
-
-function selectItem(item, isIndex, testName) {
- var exception = null;
- try {
- if (isIndex)
- document.getElementById("group").selectedIndex = item;
- else
- document.getElementById("group").selectedItem = item;
- }
- catch(e) {
- exception = e;
- }
-
- ok(exception == null, testName);
-}
-
-SimpleTest.waitForExplicitFinish();
-
-window.onload = function runTests() {
- var item = document.getElementById("item");
-
- selectItem(item, false, "Radio button selected with selectedItem (not focused)");
- selectItem(null, false, "Radio button deselected with selectedItem (not focused)");
- selectItem(0, true, "Radio button selected with selectedIndex (not focused)");
- selectItem(-1, true, "Radio button deselected with selectedIndex (not focused)");
-
- document.getElementById("group").focus();
-
- selectItem(item, false, "Radio button selected with selectedItem (focused)");
- selectItem(null, false, "Radio button deselected with selectedItem (focused)");
- selectItem(0, true, "Radio button selected with selectedIndex (focused)");
- selectItem(-1, true, "Radio button deselected with selectedIndex (focused)");
-
- SimpleTest.finish();
-};
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug366992.xul b/toolkit/content/tests/chrome/test_bug366992.xul
deleted file mode 100644
index 2c92defc54..0000000000
--- a/toolkit/content/tests/chrome/test_bug366992.xul
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=366992
--->
-<window title="Mozilla Bug 366992"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<a target="_blank"
- href="https://bugzilla.mozilla.org/show_bug.cgi?id=366992">Mozilla Bug 366992</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-</pre>
-</body>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-/** Test for Bug 366992 **/
-SimpleTest.waitForExplicitFinish();
-window.open("bug366992_window.xul", "findbartest",
- "chrome,width=600,height=600");
-
-
-
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug382990.xul b/toolkit/content/tests/chrome/test_bug382990.xul
deleted file mode 100644
index aa3b00431d..0000000000
--- a/toolkit/content/tests/chrome/test_bug382990.xul
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=382990
--->
-<window title="Mozilla Bug 382990"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="startThisTest()">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml">
- <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=382990"
- target="_blank">Mozilla Bug 382990</a>
- </body>
-
- <tree id="testTree" height="200px">
- <treecols>
- <treecol flex="1" label="Name" id="name"/>
- </treecols>
- <treechildren>
- <treeitem><treerow><treecell label="a"/></treerow></treeitem>
- <treeitem><treerow><treecell label="z"/></treerow></treeitem>
- </treechildren>
- </tree>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
- /** Test for Bug 382990 **/
-
- SimpleTest.waitForExplicitFinish();
- function startThisTest()
- {
- var treeElem = document.getElementById("testTree");
- treeElem.view.selection.select(0);
- treeElem.focus();
- synthesizeKey("z", {ctrlKey: true});
- ok(!treeElem.view.selection.isSelected(1), "Tree selection should not change for key events with ctrl pressed.");
- SimpleTest.finish();
- }
- ]]></script>
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug409624.xul b/toolkit/content/tests/chrome/test_bug409624.xul
deleted file mode 100644
index 59a862cad7..0000000000
--- a/toolkit/content/tests/chrome/test_bug409624.xul
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=409624
--->
-<window title="Mozilla Bug 409624"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <a target="_blank"
- href="https://bugzilla.mozilla.org/show_bug.cgi?id=409624">
- Mozilla Bug 409624
- </a>
-
- <p id="display"></p>
- <div id="content" style="display: none">
- </div>
- <pre id="test">
- </pre>
- </body>
-
- <script class="testbody" type="application/javascript">
- <![CDATA[
-
- /** Test for Bug 409624 **/
- SimpleTest.waitForExplicitFinish();
- window.open("bug409624_window.xul", "409624test",
- "chrome,width=600,height=600");
-
- ]]>
- </script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug418874.xul b/toolkit/content/tests/chrome/test_bug418874.xul
deleted file mode 100644
index 13f0a14530..0000000000
--- a/toolkit/content/tests/chrome/test_bug418874.xul
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- 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/. -->
-
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Textbox with placeholder test" width="500" height="600"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
- <hbox>
- <textbox id="t1" placeholder="empty"/>
- </hbox>
-
- <hbox>
- <textbox id="t2" placeholder="empty"/>
- </hbox>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;">
- <p id="display">
- </p>
- <div id="content" style="display: none">
- </div>
- <pre id="test">
- </pre>
- </body>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
- SimpleTest.waitForExplicitFinish();
-
- function doTest() {
- var t1 = $("t1");
- var t2 = $("t2");
- setTextboxValue(t1, "1");
- var t1Enabled = {};
- var t1CanUndo = {};
- t1.editor.canUndo(t1Enabled, t1CanUndo);
- is(t1CanUndo.value, true,
- "undo correctly enabled when placeholder was not changed through property");
-
- t2.placeholder = "reallyempty";
- setTextboxValue(t2, "2");
- var t2Enabled = {};
- var t2CanUndo = {};
- t2.editor.canUndo(t2Enabled, t2CanUndo);
- is(t2CanUndo.value, true,
- "undo correctly enabled when placeholder explicitly changed through property");
-
- SimpleTest.finish();
- }
-
- function setTextboxValue(textbox, value) {
- textbox.focus();
- for (var i = 0; i < value.length; ++i) {
- synthesizeKey(value.charAt(i), {});
- }
- textbox.blur();
- }
-
- SimpleTest.waitForFocus(doTest);
-
- ]]></script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug429723.xul b/toolkit/content/tests/chrome/test_bug429723.xul
deleted file mode 100644
index 99ee8acd97..0000000000
--- a/toolkit/content/tests/chrome/test_bug429723.xul
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=429723
--->
-<window title="Mozilla Bug 429723"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<a target="_blank"
- href="https://bugzilla.mozilla.org/show_bug.cgi?id=429723">Mozilla Bug 429723</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-</pre>
-</body>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-/** Test for Bug 429723 **/
-SimpleTest.waitForExplicitFinish();
-window.open("bug429723_window.xul", "429723test",
- "chrome,width=600,height=600");
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug437844.xul b/toolkit/content/tests/chrome/test_bug437844.xul
deleted file mode 100644
index b194b30419..0000000000
--- a/toolkit/content/tests/chrome/test_bug437844.xul
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=437844
-https://bugzilla.mozilla.org/show_bug.cgi?id=348233
--->
-<window title="Mozilla Bug 437844 and Bug 348233"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript"
- src="chrome://mochikit/content/chrome-harness.js"></script>
- <script type="application/javascript"
- src="RegisterUnregisterChrome.js"></script>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <a target="_blank"
- href="https://bugzilla.mozilla.org/show_bug.cgi?id=437844">
- Mozilla Bug 437844
- </a>
- <a target="_blank"
- href="https://bugzilla.mozilla.org/show_bug.cgi?id=348233">
- Mozilla Bug 348233
- </a>
-
- <p id="display"></p>
- <div id="content" style="display: none">
- </div>
- <pre id="test">
- </pre>
- </body>
-
- <script class="testbody" type="application/javascript">
- <![CDATA[
-
- SimpleTest.expectAssertions(18, 22);
-
- /** Test for Bug 437844 and Bug 348233 **/
- SimpleTest.waitForExplicitFinish();
-
- let prefs = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefBranch);
- prefs.setCharPref("intl.uidirection.en-US", "rtl");
-
- let rootDir = getRootDirectory(window.location.href);
- let manifest = rootDir + "rtlchrome/rtl.manifest";
-
- //copy rtlchrome to profile/rtlchrome and generate .manifest
- let filePath = chromeURIToFile(manifest);
- let tempProfileDir = copyDirToTempProfile(filePath.path, 'rtlchrome');
- if (tempProfileDir.path.lastIndexOf('\\') >= 0) {
- manifest = "content rtlchrome /" + tempProfileDir.path.replace(/\\/g, '/') + "\n";
- } else {
- manifest = "content rtlchrome " + tempProfileDir.path + "\n";
- }
- manifest += "override chrome://global/locale/intl.css chrome://rtlchrome/content/rtlchrome/rtl.css\n";
- manifest += "override chrome://global/locale/global.dtd chrome://rtlchrome/content/rtlchrome/rtl.dtd\n";
-
- let cleanupFunc = createManifestTemporarily(tempProfileDir, manifest);
-
- // Load about:plugins in an iframe
- let frame = document.createElement("iframe");
- frame.setAttribute("src", "about:plugins");
- frame.addEventListener("load", function () {
- frame.removeEventListener("load", arguments.callee, false);
- is(frame.contentDocument.dir, "rtl", "about:plugins should be RTL in RTL locales");
-
- let gDirSvc = Components.classes["@mozilla.org/file/directory_service;1"].
- getService(Components.interfaces.nsIDirectoryService).
- QueryInterface(Components.interfaces.nsIProperties);
- let tmpd = gDirSvc.get("ProfD", Components.interfaces.nsIFile);
-
- frame = document.createElement("iframe");
- frame.setAttribute("src", "file://" + tmpd.path); // a file:// URI, bug 348233
- frame.addEventListener("load", function () {
- frame.removeEventListener("load", arguments.callee, false);
-
- is(frame.contentDocument.body.dir, "rtl", "file:// listings should be RTL in RTL locales");
-
- cleanupFunc();
- prefs.clearUserPref("intl.uidirection.en-US");
- SimpleTest.finish();
- }, false);
- document.documentElement.appendChild(frame);
- }, false);
- document.documentElement.appendChild(frame);
-
- ]]>
- </script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug451540.xul b/toolkit/content/tests/chrome/test_bug451540.xul
deleted file mode 100644
index 64ae43c3c8..0000000000
--- a/toolkit/content/tests/chrome/test_bug451540.xul
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=451540
--->
-<window title="Mozilla Bug 451540"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <a target="_blank"
- href="https://bugzilla.mozilla.org/show_bug.cgi?id=451540">
- Mozilla Bug 451540
- </a>
-
- <p id="display"></p>
- <div id="content" style="display: none">
- </div>
- <pre id="test">
- </pre>
- </body>
-
- <script class="testbody" type="application/javascript">
- <![CDATA[
-
- /** Test for Bug 451540 **/
- SimpleTest.waitForExplicitFinish();
- window.open("bug451540_window.xul", "451540test",
- "chrome,width=600,height=600");
-
- ]]>
- </script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug457632.xul b/toolkit/content/tests/chrome/test_bug457632.xul
deleted file mode 100644
index 7bc70f2cc3..0000000000
--- a/toolkit/content/tests/chrome/test_bug457632.xul
+++ /dev/null
@@ -1,178 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for bug 457632
- -->
-<window title="Bug 457632" width="500" height="600"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <notificationbox id="nb"/>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"
- onload="test()"/>
-
- <!-- test code goes here -->
-<script type="application/javascript">
-<![CDATA[
-var gNotificationBox;
-
-function completeAnimation(nextTest) {
- if (!gNotificationBox._animating) {
- nextTest();
- return;
- }
-
- setTimeout(completeAnimation, 50, nextTest);
-}
-
-function test() {
- SimpleTest.waitForExplicitFinish();
- gNotificationBox = document.getElementById("nb");
-
- is(gNotificationBox.allNotifications.length, 0, "There should be no initial notifications");
- gNotificationBox.appendNotification("Test notification",
- "notification1", null,
- gNotificationBox.PRIORITY_INFO_LOW,
- null);
- is(gNotificationBox.allNotifications.length, 1, "Notification exists while animating in");
- let notification = gNotificationBox.getNotificationWithValue("notification1");
- ok(notification, "Notification should exist while animating in");
-
- // Wait for the notificaton to finish displaying
- completeAnimation(test1);
-}
-
-// Tests that a notification that is fully animated in gets removed immediately
-function test1() {
- let notification = gNotificationBox.getNotificationWithValue("notification1");
- gNotificationBox.removeNotification(notification);
- notification = gNotificationBox.getNotificationWithValue("notification1");
- ok(!notification, "Test 1 showed notification was still present");
- ok(!gNotificationBox.currentNotification, "Test 1 said there was still a current notification");
- is(gNotificationBox.allNotifications.length, 0, "Test 1 should show no notifications present");
-
- // Wait for the notificaton to finish hiding
- completeAnimation(test2);
-}
-
-// Tests that a notification that is animating in gets removed immediately
-function test2() {
- let notification = gNotificationBox.appendNotification("Test notification",
- "notification2", null,
- gNotificationBox.PRIORITY_INFO_LOW,
- null);
- gNotificationBox.removeNotification(notification);
- notification = gNotificationBox.getNotificationWithValue("notification2");
- ok(!notification, "Test 2 showed notification was still present");
- ok(!gNotificationBox.currentNotification, "Test 2 said there was still a current notification");
- is(gNotificationBox.allNotifications.length, 0, "Test 2 should show no notifications present");
-
- // Get rid of the hiding notifications
- gNotificationBox.removeAllNotifications(true);
- test3();
-}
-
-// Tests that a background notification goes away immediately
-function test3() {
- let notification = gNotificationBox.appendNotification("Test notification",
- "notification3", null,
- gNotificationBox.PRIORITY_INFO_LOW,
- null);
- let notification2 = gNotificationBox.appendNotification("Test notification",
- "notification4", null,
- gNotificationBox.PRIORITY_INFO_LOW,
- null);
- is(gNotificationBox.allNotifications.length, 2, "Test 3 should show 2 notifications present");
- gNotificationBox.removeNotification(notification);
- is(gNotificationBox.allNotifications.length, 1, "Test 3 should show 1 notifications present");
- notification = gNotificationBox.getNotificationWithValue("notification3");
- ok(!notification, "Test 3 showed notification was still present");
- gNotificationBox.removeNotification(notification2);
- is(gNotificationBox.allNotifications.length, 0, "Test 3 should show 0 notifications present");
- notification2 = gNotificationBox.getNotificationWithValue("notification4");
- ok(!notification2, "Test 3 showed notification2 was still present");
- ok(!gNotificationBox.currentNotification, "Test 3 said there was still a current notification");
-
- // Get rid of the hiding notifications
- gNotificationBox.removeAllNotifications(true);
- test4();
-}
-
-// Tests that a foreground notification hiding a background one goes away
-function test4() {
- let notification = gNotificationBox.appendNotification("Test notification",
- "notification5", null,
- gNotificationBox.PRIORITY_INFO_LOW,
- null);
- let notification2 = gNotificationBox.appendNotification("Test notification",
- "notification6", null,
- gNotificationBox.PRIORITY_INFO_LOW,
- null);
- gNotificationBox.removeNotification(notification2);
- notification2 = gNotificationBox.getNotificationWithValue("notification6");
- ok(!notification2, "Test 4 showed notification2 was still present");
- is(gNotificationBox.currentNotification, notification, "Test 4 said the current notification was wrong");
- is(gNotificationBox.allNotifications.length, 1, "Test 4 should show 1 notifications present");
- gNotificationBox.removeNotification(notification);
- notification = gNotificationBox.getNotificationWithValue("notification5");
- ok(!notification, "Test 4 showed notification was still present");
- ok(!gNotificationBox.currentNotification, "Test 4 said there was still a current notification");
- is(gNotificationBox.allNotifications.length, 0, "Test 4 should show 0 notifications present");
-
- // Get rid of the hiding notifications
- gNotificationBox.removeAllNotifications(true);
- test5();
-}
-
-// Tests that removeAllNotifications gets rid of everything
-function test5() {
- let notification = gNotificationBox.appendNotification("Test notification",
- "notification7", null,
- gNotificationBox.PRIORITY_INFO_LOW,
- null);
- let notification2 = gNotificationBox.appendNotification("Test notification",
- "notification8", null,
- gNotificationBox.PRIORITY_INFO_LOW,
- null);
- gNotificationBox.removeAllNotifications();
- notification = gNotificationBox.getNotificationWithValue("notification7");
- notification2 = gNotificationBox.getNotificationWithValue("notification8");
- ok(!notification, "Test 5 showed notification was still present");
- ok(!notification2, "Test 5 showed notification2 was still present");
- ok(!gNotificationBox.currentNotification, "Test 5 said there was still a current notification");
- is(gNotificationBox.allNotifications.length, 0, "Test 5 should show 0 notifications present");
-
- gNotificationBox.appendNotification("Test notification",
- "notification9", null,
- gNotificationBox.PRIORITY_INFO_LOW,
- null);
-
- // Wait for the notificaton to finish displaying
- completeAnimation(test6);
-}
-
-// Tests whether removing an already removed notification doesn't break things
-function test6() {
- let notification = gNotificationBox.getNotificationWithValue("notification9");
- ok(notification, "Test 6 should have an initial notification");
- gNotificationBox.removeNotification(notification);
- gNotificationBox.removeNotification(notification);
-
- ok(!gNotificationBox.currentNotification, "Test 6 shouldn't be any current notification");
- is(gNotificationBox.allNotifications.length, 0, "Test 6 allNotifications.length should be 0");
- notification = gNotificationBox.appendNotification("Test notification",
- "notification10", null,
- gNotificationBox.PRIORITY_INFO_LOW,
- null);
- is(notification, gNotificationBox.currentNotification, "Test 6 should have made the current notification");
- gNotificationBox.removeNotification(notification);
-
- SimpleTest.finish();
-}
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug460942.xul b/toolkit/content/tests/chrome/test_bug460942.xul
deleted file mode 100644
index dae10da57a..0000000000
--- a/toolkit/content/tests/chrome/test_bug460942.xul
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
-<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=460942
--->
-<window title="Mozilla Bug 460942"
- onload="runTests()"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml">
- <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=460942"
- target="_blank">Mozilla Bug 460942</a>
- </body>
-
- <!-- test code goes here -->
-
- <richlistbox>
- <richlistitem id="item1">
- <label value="one"/>
- <box>
- <label value="two"/>
- </box>
- </richlistitem>
- <richlistitem id="item2"><description>one</description><description>two</description></richlistitem>
- </richlistbox>
-
- <script type="application/javascript">
- <![CDATA[
- /** Test for Bug 460942 **/
- function runTests() {
- is ($("item1").label, "one two");
- is ($("item2").label, "");
- SimpleTest.finish();
- }
- SimpleTest.waitForExplicitFinish();
- ]]>
- </script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug471776.xul b/toolkit/content/tests/chrome/test_bug471776.xul
deleted file mode 100644
index 6002c691ac..0000000000
--- a/toolkit/content/tests/chrome/test_bug471776.xul
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- 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/. -->
-
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Textbox with placeholder undo test" width="500" height="600"
- onload="doTest();"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
- <hbox>
- <textbox id="t1" placeholder="empty"/>
- </hbox>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;">
- <p id="display">
- </p>
- <div id="content" style="display: none">
- </div>
- <pre id="test">
- </pre>
- </body>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
- SimpleTest.waitForExplicitFinish();
-
- function doTest() {
- var t1 = $("t1");
- t1.focus();
- var t1Enabled = {};
- var t1CanUndo = {};
- t1.editor.canUndo(t1Enabled, t1CanUndo);
- ok(!t1CanUndo.value, "undo correctly disabled when no user edits");
- SimpleTest.finish();
- }
-
- ]]></script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug509732.xul b/toolkit/content/tests/chrome/test_bug509732.xul
deleted file mode 100644
index cc7ce6807f..0000000000
--- a/toolkit/content/tests/chrome/test_bug509732.xul
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for bug 509732
- -->
-<window title="Bug 509732" width="500" height="600"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <notificationbox id="nb" hidden="true"/>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"
- onload="test()"/>
-
- <!-- test code goes here -->
-<script type="application/javascript">
-<![CDATA[
-var gNotificationBox;
-
-// Tests that a notification that is added in an hidden box didn't throw the animation
-function test() {
- SimpleTest.waitForExplicitFinish();
- gNotificationBox = document.getElementById("nb");
-
- is(gNotificationBox.allNotifications.length, 0, "There should be no initial notifications");
-
- gNotificationBox.appendNotification("Test notification",
- "notification1", null,
- gNotificationBox.PRIORITY_INFO_LOW,
- null);
-
- is(gNotificationBox.allNotifications.length, 1, "Notification exists");
- is(gNotificationBox._animating, false, "Notification shouldn't be animating");
-
- test1();
-}
-
-// Tests that a notification that is removed from an hidden box didn't throw the animation
-function test1() {
- let notification = gNotificationBox.getNotificationWithValue("notification1");
- gNotificationBox.removeNotification(notification);
- ok(!gNotificationBox.currentNotification, "Test 1 should show no current animation");
- is(gNotificationBox._animating, false, "Notification shouldn't be animating");
- is(gNotificationBox.allNotifications.length, 0, "Test 1 should show no notifications present");
-
- SimpleTest.finish();
-}
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug554279.xul b/toolkit/content/tests/chrome/test_bug554279.xul
deleted file mode 100644
index d4057b8907..0000000000
--- a/toolkit/content/tests/chrome/test_bug554279.xul
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Toolbar" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="startTest();">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <toolbox>
- <toolbarpalette id="palette"/>
-
- <toolbar id="tb1" currentset="p1"/>
- </toolbox>
-
- <!-- test resuls are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml"
- style="height: 300px; overflow: auto;"/>
-
- <!-- test code goes here -->
- <script type="text/javascript"><![CDATA[
- var toolbar = $("tb1");
-
- ok(toolbar, "got the toolbar, triggering the xbl constructor");
-
- var palette = $("palette");
- ok(palette, "palette is still in the document");
-
- var button = document.createElement("p1");
- button.id = button.label = "p1";
- palette.appendChild(button);
-
- SimpleTest.waitForExplicitFinish();
- function startTest() {
- is(button.parentNode, toolbar, "button has been added to the toolbar");
- SimpleTest.finish();
- }
- ]]></script>
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug557987.xul b/toolkit/content/tests/chrome/test_bug557987.xul
deleted file mode 100644
index ba680568ff..0000000000
--- a/toolkit/content/tests/chrome/test_bug557987.xul
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for bug 557987
- -->
-<window title="Bug 557987" width="400" height="400"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
- <toolbarbutton id="button" type="menu-button" label="Test bug 557987"
- onclick="eventReceived('click');"
- oncommand="eventReceived('command');">
- <menupopup onpopupshowing="eventReceived('popupshowing'); return false;" />
- </toolbarbutton>
- <menulist id="menulist" editable="true" value="Test bug 557987"
- onfocus="eventReceived('focus')" />
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-SimpleTest.waitForFocus(test);
-
-// Tests that mouse events are correctly dispatched to <toolbarbutton type="menu-button"/>
-function test() {
-
- disableNonTestMouseEvents(true);
-
- let button = $("button");
- let rightEdge = button.getBoundingClientRect().width - 2;
- let centerX = button.getBoundingClientRect().width / 2;
- let centerY = button.getBoundingClientRect().height / 2;
-
- synthesizeMouse(button, rightEdge, centerY, {}, window);
- synthesizeMouse(button, centerX, centerY, {}, window);
-
- let menulist = $("menulist");
- centerX = menulist.getBoundingClientRect().width / 2;
- centerY = menulist.getBoundingClientRect().height / 2;
- synthesizeMouse(menulist, centerX, centerY, {}, window);
-
- synthesizeMouse(document.getElementsByTagName("body")[0], 0, 0, {}, window);
-
- disableNonTestMouseEvents(false);
- SimpleTest.executeSoon(finishTest);
-
-}
-
-function finishTest() {
- is(eventCount.command, 1, "Correct number of command events received");
- is(eventCount.popupshowing, 1, "Correct number of popupshowing events received");
- is(eventCount.click, 2, "Correct number of click events received");
- is(eventCount.focus, 1, "Correct number of focus events received");
-
- SimpleTest.finish();
-}
-
-let eventCount = {
- command: 0,
- popupshowing: 0,
- click: 0,
- focus: 0
-};
-
-function eventReceived(eventName) {
- eventCount[eventName]++;
-}
-
-]]>
-</script>
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug562554.xul b/toolkit/content/tests/chrome/test_bug562554.xul
deleted file mode 100644
index 7ee9ef03d6..0000000000
--- a/toolkit/content/tests/chrome/test_bug562554.xul
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for bug 562554
- -->
-<window title="Bug 562554" width="400" height="400"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<xbl:bindings xmlns:xbl="http://www.mozilla.org/xbl">
- <xbl:binding id="menu" display="xul:menu"
- extends="chrome://global/content/bindings/button.xml#button-base">
- <xbl:content>
- <xbl:children includes="menupopup"/>
- <xul:stack>
- <xul:button width="100" left="0" top="0" height="30" allowevents="true"
- onclick="eventReceived('clickbutton1'); return false;"/>
- <xul:button width="100" left="70" top="0" height="30"
- onclick="eventReceived('clickbutton2'); return false;"/>
- </xul:stack>
- </xbl:content>
- </xbl:binding>
-</xbl:bindings>
-
- <toolbarbutton type="menu" id="toolbarmenu" height="200" style="-moz-binding: url(#menu);">
- <menupopup id="menupopup" onpopupshowing="eventReceived('popupshowing'); return false;"/>
- </toolbarbutton>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-SimpleTest.waitForFocus(test);
-
-// Tests that mouse events are correctly dispatched to <toolbarbutton type="menu"/>
-function test() {
- disableNonTestMouseEvents(true);
- nextTest();
-}
-
-let tests = [
- // Click on the toolbarbutton itself - should call popupshowing
- () => synthesizeMouse($("toolbarmenu"), 10, 50, {}, window),
-
- // Click on button1 which has allowevents="true" - should call clickbutton1
- () => synthesizeMouse($("toolbarmenu"), 10, 15, {}, window),
-
- // Click on button2 where it intersects with button1 - should call popupshowing
- () => synthesizeMouse($("toolbarmenu"), 85, 15, {}, window),
-
- // Click on button2 outside of intersection - should call popupshowing
- () => synthesizeMouse($("toolbarmenu"), 150, 15, {}, window)
-];
-
-function nextTest() {
- if (tests.length) {
- let func = tests.shift();
- func();
- SimpleTest.executeSoon(nextTest);
- } else {
- disableNonTestMouseEvents(false);
- SimpleTest.executeSoon(finishTest);
- }
-}
-
-function finishTest() {
- is(eventCount.clickbutton1, 1, "Correct number of clicks on button 1");
- is(eventCount.clickbutton2, 0, "Correct number of clicks on button 2");
- is(eventCount.popupshowing, 3, "Correct number of popupshowing events received");
-
- SimpleTest.finish();
-}
-
-let eventCount = {
- popupshowing: 0,
- clickbutton1: 0,
- clickbutton2: 0
-};
-
-function eventReceived(eventName) {
- eventCount[eventName]++;
-}
-
-]]>
-</script>
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug570192.xul b/toolkit/content/tests/chrome/test_bug570192.xul
deleted file mode 100644
index 09f73e932b..0000000000
--- a/toolkit/content/tests/chrome/test_bug570192.xul
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=570192
--->
-<window title="Mozilla Bug 558406"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script>
- <script type="application/javascript"
- src="RegisterUnregisterChrome.js"></script>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <a target="_blank"
- href="https://bugzilla.mozilla.org/show_bug.cgi?id=570192">
- Mozilla Bug 570192
- </a>
-
- <p id="display">
- </p>
- <div id="content" style="display: none">
- </div>
- <pre id="test">
- </pre>
- </body>
-
- <script type="application/javascript">
- <![CDATA[
-
- addLoadEvent(function() {
- try {
- var content = document.getElementById("content");
- content.innerHTML = '<textbox newlines="pasteintact" ' +
- 'xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"/>';
- var textbox = content.firstChild;
- ok(textbox, "created the textbox");
- ok(!textbox.editor, "do we have an editor?");
- } catch (e) {
- ok(false, "Got an exception: " + e);
- }
- SimpleTest.finish();
- });
- SimpleTest.waitForExplicitFinish();
-
- ]]>
- </script>
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug585946.xul b/toolkit/content/tests/chrome/test_bug585946.xul
deleted file mode 100644
index 738e46b1b1..0000000000
--- a/toolkit/content/tests/chrome/test_bug585946.xul
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Toolbar" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="startTest();">
-
- <script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <toolbox>
- <toolbarpalette/>
- <toolbar id="toolbar" defaultset="node1,node2">
- <toolbarbutton id="node1" label="node1" removable="true"/>
- <toolbarbutton id="node2" label="node2" removable="true"/>
- </toolbar>
- </toolbox>
-
- <!-- test resuls are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml"
- style="height: 300px; overflow: auto;"/>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-function startTest() {
- var toolbar = $("toolbar");
-
- var splitter = document.createElement("splitter");
- splitter.setAttribute("id", "dynsplitter");
- splitter.setAttribute("skipintoolbarset", "true");
-
- toolbar.insertBefore(splitter, $("node2"));
-
- function checkPos() {
- is($("dynsplitter").previousSibling, $("node1"));
- is($("dynsplitter").nextSibling, $("node2"));
- }
-
- checkPos();
- toolbar.style.MozBinding = "url(chrome://global/content/bindings/toolbar.xml#toolbar-drag)";
- toolbar.clientTop; // style flush
- checkPos();
-
- SimpleTest.finish();
-}
-
- ]]></script>
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug624329.xul b/toolkit/content/tests/chrome/test_bug624329.xul
deleted file mode 100644
index 893b386870..0000000000
--- a/toolkit/content/tests/chrome/test_bug624329.xul
+++ /dev/null
@@ -1,160 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
-<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=624329
--->
-<window title="Mozilla Bug 624329 context menu position"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml"
- onload="openTestWindow()">
- <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=624329"
- target="_blank">Mozilla Bug 624329</a>
- </body>
-
- <!-- test code goes here -->
- <script type="application/javascript">
- <![CDATA[
- /** Test for Bug 624329 **/
-
-SimpleTest.waitForExplicitFinish();
-
-var win;
-var timeoutID;
-var menu;
-
-function openTestWindow() {
- win = open("bug624329_window.xul", "_blank", "width=300,resizable=yes,chrome");
- // Close our window if the test times out so that it doesn't interfere
- // with later tests.
- timeoutID = setTimeout(function () {
- ok(false, "Test timed out.");
- // Provide some time for a screenshot
- setTimeout(finish, 1000);
- }, 20000);
-}
-
-function listenOnce(event, callback) {
- win.addEventListener(event, function listener() {
- win.removeEventListener(event, listener, false);
- callback();
- }, false);
-}
-
-function childFocused() {
- // maximizing the window is a simple way to ensure that the menu is near
- // the right edge of the screen.
-
- listenOnce("resize", childResized);
- win.maximize();
-}
-
-function childResized() {
- const isOSXLion = navigator.userAgent.indexOf("Mac OS X 10.7") != -1;
- const isOSXMtnLion = navigator.userAgent.indexOf("Mac OS X 10.8") != -1;
- const isOSXMavericks = navigator.userAgent.indexOf("Mac OS X 10.9") != -1;
- const isOSXYosemite = navigator.userAgent.indexOf("Mac OS X 10.10") != -1;
- if (isOSXLion || isOSXMtnLion || isOSXMavericks || isOSXYosemite) {
- todo_is(win.windowState, win.STATE_MAXIMIZED,
- "A resize before being maximized breaks this test on 10.7 and 10.8 and 10.9 and 10.10");
- finish();
- return;
- }
-
- is(win.windowState, win.STATE_MAXIMIZED,
- "window should be maximized");
-
- isnot(win.innerWidth, 300,
- "window inner width should have changed");
-
- openContextMenu();
-}
-
-function openContextMenu() {
- var mouseX = win.innerWidth - 10;
- var mouseY = 10;
-
- menu = win.document.getElementById("menu");
- var screenX = menu.boxObject.screenX;
- var screenY = menu.boxObject.screenY;
- var utils =
- win.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
- getInterface(Components.interfaces.nsIDOMWindowUtils);
-
- utils.sendMouseEvent("contextmenu", mouseX, mouseY, 2, 0, 0);
-
- var interval = setInterval(checkMoved, 200);
- function checkMoved() {
- if (menu.boxObject.screenX != screenX ||
- menu.boxObject.screenY != screenY) {
- clearInterval(interval);
- // Wait further to check that the window does not move again.
- setTimeout(checkPosition, 1000);
- }
- }
-
- function checkPosition() {
- var menubox = menu.boxObject;
- var winbox = win.document.documentElement.boxObject;
- var platformIsMac = navigator.userAgent.indexOf("Mac") > -1;
-
- var x = menubox.screenX - winbox.screenX;
- var y = menubox.screenY - winbox.screenY;
-
- if (platformIsMac)
- {
- // This check is alterered slightly for OSX which adds padding to the top
- // and bottom of its context menus. The menu position calculation must
- // be changed to allow for the pointer to be outside this padding
- // when the menu opens.
- // (Bug 1075089)
- ok(y + 6 >= mouseY,
- "menu top " + (y + 6) + " should be below click point " + mouseY);
- }
- else
- {
- ok(y >= mouseY,
- "menu top " + y + " should be below click point " + mouseY);
- }
-
- ok(y <= mouseY + 20,
- "menu top " + y + " should not be too far below click point " + mouseY);
-
- ok(x < mouseX,
- "menu left " + x + " should be left of click point " + mouseX);
- var right = x + menubox.width;
-
- if (platformIsMac) {
- // Rather than be constrained by the right hand screen edge, OSX menus flip
- // horizontally and appear to the left of the mouse pointer
- ok(right < mouseX,
- "menu right " + right + " should be left of click point " + mouseX);
- }
- else {
- ok(right > mouseX,
- "menu right " + right + " should be right of click point " + mouseX);
- }
-
- clearTimeout(timeoutID);
- finish();
- }
-
-}
-
-function finish() {
- if (menu && navigator.platform.indexOf("Win") >= 0) {
- todo(false, "Should not have to hide popup before closing its window");
- // This avoids mochitest "Unable to restore focus" errors (bug 670053).
- menu.hidePopup();
- }
- win.close();
- SimpleTest.finish();
-}
-
- ]]>
- </script>
-</window>
diff --git a/toolkit/content/tests/chrome/test_bug792324.xul b/toolkit/content/tests/chrome/test_bug792324.xul
deleted file mode 100644
index a6fa425056..0000000000
--- a/toolkit/content/tests/chrome/test_bug792324.xul
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=792324
--->
-<window title="Mozilla Bug 792324"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-<body xmlns="http://www.w3.org/1999/xhtml">
- <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=792324">Mozilla Bug 792324</a>
-
- <p id="display"></p>
-<div id="content" style="display: none">
-</div>
-</body>
-
-<panel id="panel-1">
- <button label="just a normal button"/>
- <button id="button-1"
- accesskey="X"
- oncommand="clicked(event)"
- label="Button in panel 1"
- />
-</panel>
-
-<panel id="panel-2">
- <button label="just a normal button"/>
- <button id="button-2"
- accesskey="X"
- oncommand="clicked(event)"
- label="Button in panel 2"
- />
-</panel>
-
-<script class="testbody" type="application/javascript;version=1.7"><![CDATA[
-
-/** Test for Bug 792324 **/
-let after_click;
-
-function clicked(event) {
- after_click(event);
-}
-
-function checkAccessKeyOnPanel(panelid, buttonid, cb) {
- let panel = document.getElementById(panelid);
- panel.addEventListener("popupshown", function onpopupshown() {
- panel.removeEventListener("popupshown", onpopupshown);
- panel.firstChild.focus();
- after_click = function(event) {
- is(event.target.id, buttonid, "Accesskey was directed to the button '" + buttonid + "'");
- panel.hidePopup();
- cb();
- }
- synthesizeKey("X", {});
- });
- panel.openPopup(null, "", 100, 100, false, false);
-}
-
-function test() {
- checkAccessKeyOnPanel("panel-1", "button-1", function() {
- checkAccessKeyOnPanel("panel-2", "button-2", function() {
- SimpleTest.finish();
- });
- });
-}
-
-SimpleTest.waitForExplicitFinish();
-SimpleTest.waitForFocus(test, window);
-
-]]></script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_button.xul b/toolkit/content/tests/chrome/test_button.xul
deleted file mode 100644
index fa4e7b0035..0000000000
--- a/toolkit/content/tests/chrome/test_button.xul
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for button
- -->
-<window title="Button Test"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<button id="one" label="One" />
-<button id="two" label="Two"/>
-<hbox>
- <button id="three" label="Three" open="true"/>
-</hbox>
-<hbox>
- <button id="four" type="menu" label="Four"/>
- <button id="five" type="panel" label="Five"/>
- <button id="six" label="Six"/>
-</hbox>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-function test_button()
-{
- synthesizeMouseExpectEvent($("one"), 2, 2, {}, $("one"), "command", "button press");
- $("one").focus();
- synthesizeKeyExpectEvent("VK_SPACE", { }, $("one"), "command", "key press");
- $("two").disabled = true;
- synthesizeMouseExpectEvent($("two"), 2, 2, {}, $("two"), "!command", "button press command when disabled");
- synthesizeMouseExpectEvent($("two"), 2, 2, {}, $("two"), "click", "button press click when disabled");
-
- if (navigator.platform.indexOf("Mac") == -1) {
- $("one").focus();
- synthesizeKey("VK_DOWN", { });
- is(document.activeElement, $("three"), "key cursor down on button");
-
- synthesizeKey("VK_RIGHT", { });
- is(document.activeElement, $("four"), "key cursor right on button");
- synthesizeKey("VK_DOWN", { });
- is(document.activeElement, $("four"), "key cursor down on menu button");
- $("five").focus();
- synthesizeKey("VK_DOWN", { });
- is(document.activeElement, $("five"), "key cursor down on panel button");
-
- $("three").focus();
- synthesizeKey("VK_UP", { });
- is(document.activeElement, $("one"), "key cursor up on button");
- }
-
- $("two").focus();
- ok(document.activeElement != $("two"), "focus disabled button");
-
- SimpleTest.finish();
-}
-
-SimpleTest.waitForFocus(test_button);
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_chromemargin.xul b/toolkit/content/tests/chrome/test_chromemargin.xul
deleted file mode 100644
index 79c4f7525e..0000000000
--- a/toolkit/content/tests/chrome/test_chromemargin.xul
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0"?>
-<!-- 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/. -->
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Custom chrome margin tests"
- onload="setTimeout(runTest, 0);"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
-<script>
-
-// Tests parsing of the chrome margin attrib on a window.
-
-SimpleTest.waitForExplicitFinish();
-function runTest()
-{
- window.open("window_chromemargin.xul", "_blank", "chrome,width=600,height=600");
-}
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_closemenu_attribute.xul b/toolkit/content/tests/chrome/test_closemenu_attribute.xul
deleted file mode 100644
index c1e93734fc..0000000000
--- a/toolkit/content/tests/chrome/test_closemenu_attribute.xul
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Menu closemenu Attribute Tests"
- onload="setTimeout(nextTest, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<button id="menu" type="menu" label="Menu" onpopuphidden="popupHidden(event)">
- <menupopup id="p1" onpopupshown="if (event.target == this) this.firstChild.open = true">
- <menu id="l1" label="One">
- <menupopup id="p2" onpopupshown="if (event.target == this) this.firstChild.open = true">
- <menu id="l2" label="Two">
- <menupopup id="p3" onpopupshown="executeMenuItem()">
- <menuitem id="l3" label="Three"/>
- </menupopup>
- </menu>
- </menupopup>
- </menu>
- </menupopup>
-</button>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-var gExpectedId = "p3";
-var gMode = -1;
-var gModes = ["", "auto", "single", "none"];
-
-function nextTest()
-{
- gMode++;
- if (gModes[gMode] != "none")
- gExpectedId = "p3";
-
- if (gMode != 0)
- $("l3").setAttribute("closemenu", gModes[gMode]);
- if (gModes[gMode] == "none")
- $("l2").open = true;
- else
- $("menu").open = true;
-}
-
-function executeMenuItem()
-{
- synthesizeKey("VK_DOWN", { });
- synthesizeKey("VK_RETURN", { });
- // after a couple of seconds, end the test, as the 'none' closemenu value
- // should not hide any popups
- if (gModes[gMode] == "none")
- setTimeout(function() { $("menu").open = false; }, 2000);
-}
-
-function popupHidden(event)
-{
- if (gModes[gMode] == "none") {
- if (event.target.id == "p1")
- SimpleTest.finish()
- return;
- }
-
- is(event.target.id, gExpectedId,
- "Expected event " + gModes[gMode] + " " + gExpectedId);
-
- gExpectedId = "";
- if (event.target.id == "p3") {
- if (gModes[gMode] == "" || gModes[gMode] == "auto")
- gExpectedId = "p2";
- }
- else if (event.target.id == "p2") {
- if (gModes[gMode] == "" || gModes[gMode] == "auto")
- gExpectedId = "p1";
- }
-
- if (!gExpectedId)
- nextTest();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_colorpicker_popup.xul b/toolkit/content/tests/chrome/test_colorpicker_popup.xul
deleted file mode 100644
index 3ac84260b2..0000000000
--- a/toolkit/content/tests/chrome/test_colorpicker_popup.xul
+++ /dev/null
@@ -1,148 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Colorpicker Tests"
- onload="setTimeout(runTests, 0);"
- onpopupshown="popupShown();"
- onpopuphidden="popupHiding();"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<colorpicker id="colorpicker-popup" type="button" color="#FF0000" tabindex="1"/>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-var gTestPhase = -1;
-var gCp = null;
-
-SimpleTest.waitForExplicitFinish();
-
-function preventDefault(event) {
- event.preventDefault();
-}
-
-function runTests()
-{
- gCp = document.getElementById("colorpicker-popup");
- is(gCp.color, "#FF0000", "popup color is initialized");
- is(gCp.tabIndex, 1, "button tabindex is initialized");
- is(gCp.disabled, false, "button is not disabled");
-
- document.addEventListener("keypress", preventDefault, false);
-
- goNext();
-}
-
-var phases = [ "mouse click", "showPopup",
- "key left", "key right", "key up", "key down", "key space" ];
-
-function popupShown()
-{
- if (gTestPhase >= phases.length)
- return;
-
- var phase = phases[gTestPhase];
-
- is(gCp.open, true, phase + " popup shown, open property is true");
-
- switch (phase) {
- case "mouse click":
- synthesizeMouse(gCp, 2, 2, { });
- break;
- case "showPopup":
- gCp.hidePopup();
- break;
- case "key left":
- synthesizeKey("VK_LEFT", { });
- synthesizeKeyExpectEvent("VK_RETURN", { });
- is(gCp.color, "#C0C0C0", "key left while open");
- break;
- case "key right":
- synthesizeKey("VK_RIGHT", { });
- synthesizeKeyExpectEvent("VK_SPACE", { });
- is(gCp.color, "#FF0000", "key right while open");
- break;
- case "key up":
- synthesizeKey("VK_UP", { });
- synthesizeKeyExpectEvent("VK_RETURN", { });
- is(gCp.color, "#FF6666", "key up while open");
- break;
- case "key down":
- synthesizeKey("VK_DOWN", { });
- synthesizeKeyExpectEvent("VK_SPACE", { });
- is(gCp.color, "#FF0000", "key down while open");
- break;
- default:
- synthesizeMouse(gCp, 2, 2, { });
-// this breaks on the Mac, so disable for now
-// synthesizeKey("VK_ESCAPE", { });
- break;
- }
-}
-
-function popupHiding()
-{
- var phase = phases[gTestPhase];
- if (phase == "showPopup")
- phase = "hidePopup";
- if (phase == "key left")
- phase = "escape";
- is(gCp.open, false, phase + " popup hidden, open property is false");
-
- goNext();
-}
-
-function goNext()
-{
- gTestPhase++;
- if (gTestPhase >= phases.length) {
- document.removeEventListener("keypress", preventDefault, false);
- SimpleTest.finish();
- return;
- }
-
- gCp.focus();
-
- var phase = phases[gTestPhase];
- switch (phase) {
- case "mouse click":
- synthesizeMouse(gCp, 2, 2, { });
- break;
- case "showPopup":
- gCp.showPopup();
- break;
- case "key left":
- synthesizeKey("VK_LEFT", { });
- break;
- case "key right":
- synthesizeKey("VK_RIGHT", { });
- break;
- case "key down":
- synthesizeKey("VK_UP", { });
- break;
- case "key up":
- synthesizeKey("VK_DOWN", { });
- break;
- case "key space":
- synthesizeKey("VK_SPACE", { });
- break;
- }
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_contextmenu_list.xul b/toolkit/content/tests/chrome/test_contextmenu_list.xul
deleted file mode 100644
index 157831a581..0000000000
--- a/toolkit/content/tests/chrome/test_contextmenu_list.xul
+++ /dev/null
@@ -1,288 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Context Menu on List Tests"
- onload="setTimeout(startTest, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<spacer height="5"/>
-
-<hbox style="padding-left: 10px;">
- <spacer width="5"/>
- <richlistbox id="list" context="themenu" style="padding: 0;" oncontextmenu="checkContextMenu(event)">
- <richlistitem id="item1" style="padding-top: 3px; margin: 0;"><button label="One"/></richlistitem>
- <richlistitem id="item2" height="22"><checkbox label="Checkbox"/></richlistitem>
- <richlistitem id="item3"><button label="Three"/></richlistitem>
- <richlistitem id="item4"><checkbox label="Four"/></richlistitem>
- </richlistbox>
-
- <tree id="tree" rows="5" flex="1" context="themenu" style="-moz-appearance: none; border: 0">
- <treecols>
- <treecol label="Name" flex="1"/>
- <splitter class="tree-splitter"/>
- <treecol label="Moons"/>
- </treecols>
- <treechildren id="treechildren">
- <treeitem>
- <treerow>
- <treecell label="Mercury"/>
- <treecell label="0"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Venus"/>
- <treecell label="0"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Earth"/>
- <treecell label="1"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Mars"/>
- <treecell label="2"/>
- </treerow>
- </treeitem>
- </treechildren>
- </tree>
-
- <menu id="menu" label="Menu">
- <menupopup id="menupopup" onpopupshown="menuTests()" onpopuphidden="nextTest()"
- oncontextmenu="checkContextMenuForMenu(event)">
- <menuitem id="menu1" label="Menu 1"/>
- <menuitem id="menu2" label="Menu 2"/>
- <menuitem id="menu3" label="Menu 3"/>
- </menupopup>
- </menu>
-
-</hbox>
-
-<menupopup id="themenu" onpopupshowing="if (gTestId == -1) event.preventDefault()"
- onpopupshown="checkPopup()" onpopuphidden="setTimeout(nextTest, 0);">
- <menuitem label="Item"/>
-</menupopup>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-var gTestId = -1;
-var gTestElement = "list";
-var gSelectionStep = 0;
-var gContextMenuFired = false;
-
-function startTest()
-{
- // first, check if the richlistbox selection changes on a contextmenu mouse event
- var element = $("list");
- synthesizeMouse(element.getItemAtIndex(3), 7, 1, { type : "mousedown", button: 2, ctrlKey: true });
- synthesizeMouse(element, 7, 4, { type : "contextmenu", button: 2 });
-
- gSelectionStep++;
- synthesizeMouse(element.getItemAtIndex(1), 7, 1, { type : "mousedown", button: 2, ctrlKey: true, shiftKey: true });
- synthesizeMouse(element, 7, 4, { type : "contextmenu", button: 2 });
-
- gSelectionStep++;
- synthesizeMouse(element.getItemAtIndex(1), 7, 1, { type : "mousedown", button: 2 });
- synthesizeMouse(element, 7, 4, { type : "contextmenu", button: 2 });
-
- $("menu").open = true;
-}
-
-function menuTests()
-{
- gSelectionStep = 0;
- var element = $("menu");
- synthesizeMouse(element, 0, 0, { type : "contextmenu", button: 0 });
- is(gContextMenuFired, true, "context menu fired when menu open");
-
- gSelectionStep = 1;
- $("menu").boxObject.activeChild = $("menu2");
- synthesizeMouse(element, 0, 0, { type : "contextmenu", button: 0 });
-
- $("menu").open = false;
-}
-
-function nextTest()
-{
- gTestId++;
- if (gTestId > 2) {
- if (gTestElement == "list") {
- gTestElement = "tree";
- gTestId = 0;
- }
- else {
- SimpleTest.finish();
- return;
- }
- }
- var element = $(gTestElement);
- element.focus();
- if (gTestId == 0) {
- if (gTestElement == "list")
- element.selectedIndex = 2;
- element.currentIndex = 2;
- synthesizeMouse(element, 0, 0, { type : "contextmenu", button: 0 });
- }
- else if (gTestId == 1) {
- synthesizeMouse(element, 7, 4, { type : "contextmenu", button: 2 });
- }
- else {
- element.currentIndex = -1;
- element.selectedIndex = -1;
- synthesizeMouse(element, 0, 0, { type : "contextmenu", button: 0 });
- }
-}
-
-// This is nasty so I'd better explain what's going on.
-// The basic problem is that the synthetic mouse coordinate generated
-// by DOMWindowUtils.sendMouseEvent and also the synthetic mouse coordinate
-// generated internally when contextmenu events are redirected to the focused
-// element are rounded to the nearest device pixel. But this rounding is done
-// while the coordinates are relative to the nearest widget. When this test
-// is run in the mochitest harness, the nearest widget is the main mochitest
-// window, and our document can have a fractional position within that
-// mochitest window. So when we round coordinates for comparison in this
-// test, we need to do so very carefully, especially if the target element
-// also has a fractional position within our document.
-//
-// For example, if the y-offset of our containing IFRAME is 100.4px,
-// and the offset of our expected point is 10.3px in our document, the actual
-// mouse event is dispatched to round(110.7) == 111px. This comes back
-// with a clientY of round(111 - 100.4) == round(10.6) == 11. This is not
-// equal to round(10.3) as you might expect.
-
-function isRoundedX(a, b, msg)
-{
- is(Math.round(a + mozInnerScreenX), Math.round(b + mozInnerScreenX), msg);
-}
-
-function isRoundedY(a, b, msg)
-{
- is(Math.round(a + mozInnerScreenY), Math.round(b + mozInnerScreenY), msg);
-}
-
-function checkContextMenu(event)
-{
- var rect = $(gTestElement).getBoundingClientRect();
-
- var frombase = (gTestId == -1 || gTestId == 1);
- if (!frombase)
- rect = event.originalTarget.getBoundingClientRect();
- var left = frombase ? rect.left + 7 : rect.left;
- var top = frombase ? rect.top + 4 : rect.bottom;
-
- isRoundedX(event.clientX, left, gTestElement + " clientX " + gSelectionStep + " " + gTestId + "," + frombase);
- isRoundedY(event.clientY, top, gTestElement + " clientY " + gSelectionStep + " " + gTestId);
- ok(event.screenX > left, gTestElement + " screenX " + gSelectionStep + " " + gTestId);
- ok(event.screenY > top, gTestElement + " screenY " + gSelectionStep + " " + gTestId);
-
- // context menu from mouse click
- switch (gTestId) {
- case -1:
- var expected = gSelectionStep == 2 ? 1 : (platformIsMac() ? 3 : 0);
- is($(gTestElement).selectedIndex, expected, "index after click " + gSelectionStep);
- break;
- case 0:
- if (gTestElement == "list")
- is(event.originalTarget, $("item3"), "list selection target");
- else
- is(event.originalTarget, $("treechildren"), "tree selection target");
- break;
- case 1:
- is(event.originalTarget.id, $("item1").id, "list mouse selection target");
- break;
- case 2:
- is(event.originalTarget, $("list"), "list no selection target");
- break;
- }
-}
-
-function checkContextMenuForMenu(event)
-{
- gContextMenuFired = true;
-
- var popuprect = (gSelectionStep ? $("menu2") : $("menupopup")).getBoundingClientRect();
- is(event.clientX, Math.round(popuprect.left), "menu left " + gSelectionStep);
- // the clientY is off by one sometimes on Windows (when loaded in the testing iframe
- // but not when loaded separately) so just check for both cases for now
- ok(event.clientY == Math.round(popuprect.bottom) ||
- event.clientY - 1 == Math.round(popuprect.bottom), "menu top " + gSelectionStep);
-}
-
-function checkPopup()
-{
- var menurect = $("themenu").getBoundingClientRect();
-
- // Context menus are offset by a number of pixels from the mouse click
- // which activates them. This is so that they don't appear exactly
- // under the mouse which can cause them to be mistakenly dismissed.
- // The number of pixels depends on the platform and is defined in
- // each platform's nsLookAndFeel
- var contextMenuOffsetX = platformIsMac() ? 1 : 2;
- var contextMenuOffsetY = platformIsMac() ? -6 : 2;
-
- if (gTestId == 0) {
- if (gTestElement == "list") {
- var itemrect = $("item3").getBoundingClientRect();
- isRoundedX(menurect.left, itemrect.left + contextMenuOffsetX,
- "list selection keyboard left");
- isRoundedY(menurect.top, itemrect.bottom + contextMenuOffsetY,
- "list selection keyboard top");
- }
- else {
- var tree = $("tree");
- var bodyrect = $("treechildren").getBoundingClientRect();
- isRoundedX(menurect.left, bodyrect.left + contextMenuOffsetX,
- "tree selection keyboard left");
- isRoundedY(menurect.top, bodyrect.top +
- tree.treeBoxObject.rowHeight * 3 + contextMenuOffsetY,
- "tree selection keyboard top");
- }
- }
- else if (gTestId == 1) {
- // activating a context menu with the mouse from position (7, 4).
- var elementrect = $(gTestElement).getBoundingClientRect();
- isRoundedX(menurect.left, elementrect.left + 7 + contextMenuOffsetX,
- gTestElement + " mouse left");
- isRoundedY(menurect.top, elementrect.top + 4 + contextMenuOffsetY,
- gTestElement + " mouse top");
- }
- else {
- var elementrect = $(gTestElement).getBoundingClientRect();
- isRoundedX(menurect.left, elementrect.left + contextMenuOffsetX,
- gTestElement + " no selection keyboard left");
- isRoundedY(menurect.top, elementrect.bottom + contextMenuOffsetY,
- gTestElement + " no selection keyboard top");
- }
-
- $("themenu").hidePopup();
-}
-
-function platformIsMac()
-{
- return navigator.platform.indexOf("Mac") > -1;
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_cursorsnap.xul b/toolkit/content/tests/chrome/test_cursorsnap.xul
deleted file mode 100644
index de153e7040..0000000000
--- a/toolkit/content/tests/chrome/test_cursorsnap.xul
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-<window title="Cursor snapping test"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js" />
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-</pre>
-</body>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-const kMaxRetryCount = 4;
-const kTimeoutTime = [
- 100, 100, 1000, 1000, 5000
-];
-
-var gRetryCount;
-
-var gTestingCount = 0;
-var gTestingIndex = -1;
-var gDisable = false;
-var gHidden = false;
-
-function canRetryTest()
-{
- return gRetryCount <= kMaxRetryCount;
-}
-
-function getTimeoutTime()
-{
- return kTimeoutTime[gRetryCount];
-}
-
-function runNextTest()
-{
- gRetryCount = 0;
- gTestingIndex++;
- runCurrentTest();
-}
-
-function retryCurrentTest()
-{
- ok(canRetryTest(), "retry the current test...");
- gRetryCount++;
- runCurrentTest();
-}
-
-function runCurrentTest()
-{
- var position = "top=" + gTestingCount + ",left=" + gTestingCount + ",";
- gTestingCount++;
- switch (gTestingIndex) {
- case 0:
- gDisable = false;
- gHidden = false;
- window.open("window_cursorsnap_dialog.xul", "_blank",
- position + "chrome,width=100,height=100");
- break;
- case 1:
- gDisable = true;
- gHidden = false;
- window.open("window_cursorsnap_dialog.xul", "_blank",
- position + "chrome,width=100,height=100");
- break;
- case 2:
- gDisable = false;
- gHidden = true;
- window.open("window_cursorsnap_dialog.xul", "_blank",
- position + "chrome,width=100,height=100");
- break;
- case 3:
- gDisable = false;
- gHidden = false;
- window.open("window_cursorsnap_wizard.xul", "_blank",
- position + "chrome,width=100,height=100");
- break;
- case 4:
- gDisable = true;
- gHidden = false;
- window.open("window_cursorsnap_wizard.xul", "_blank",
- position + "chrome,width=100,height=100");
- break;
- case 5:
- gDisable = false;
- gHidden = true;
- window.open("window_cursorsnap_wizard.xul", "_blank",
- position + "chrome,width=100,height=100");
- break;
- default:
- SetPrefs(false);
- SimpleTest.finish();
- return;
- }
-}
-
-function SetPrefs(aSet)
-{
- var prefSvc = Components.classes["@mozilla.org/preferences-service;1"].
- getService(Components.interfaces.nsIPrefBranch);
- const kPrefName = "ui.cursor_snapping.always_enabled";
- if (aSet) {
- prefSvc.setBoolPref(kPrefName, true);
- } else if (prefSvc.prefHasUserValue(kPrefName)) {
- prefSvc.clearUserPref(kPrefName);
- }
-}
-
-SetPrefs(true);
-runNextTest();
-
-]]>
-</script>
-</window>
diff --git a/toolkit/content/tests/chrome/test_datepicker.xul b/toolkit/content/tests/chrome/test_datepicker.xul
deleted file mode 100644
index e7a61f43bc..0000000000
--- a/toolkit/content/tests/chrome/test_datepicker.xul
+++ /dev/null
@@ -1,415 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for datepicker
- -->
-<window title="datepicker" width="500" height="600"
- onload="setTimeout(testtag_datepickers, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<hbox onpopupshown="testtag_datepicker_UI_popup()"
- onpopuphidden="testtag_finish()">
-<datepicker id="datepicker"/>
-<datepicker id="datepicker-popup" type="popup"/>
-<hbox onDOMMouseScroll="mouseScrolled = event.defaultPrevented;">
- <datepicker id="datepicker-grid" type="grid" value="2007-04-21"/>
-</hbox>
-</hbox>
-
-<!-- Test-only key bindings, but must not conflict with the application. -->
-<keyset id="mainKeyset">
- <key id="key_alt_z" key="Z" oncommand="return" modifiers="alt"/>
- <key id="key_ctrl_q" key="Q" oncommand="return" modifiers="control"/>
- <key id="key_meta_e" key="E" oncommand="return" modifiers="meta"/>
-</keyset>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-<script>
-<![CDATA[
-
-var mouseScrolled = false;
-
-SimpleTest.waitForExplicitFinish();
-
-function testtag_datepickers()
-{
- var dppopup = document.getElementById("datepicker-popup");
- testtag_datepicker(document.getElementById("datepicker"), "", "datepicker");
- testtag_datepicker(dppopup, "popup", "datepicker popup");
-
- var gridpicker = document.getElementById("datepicker-grid");
- is(gridpicker.monthField.selectedIndex, "3", "datepicker grid correct month is initially selected");
- testtag_datepicker(gridpicker, "grid", "datepicker grid");
- dppopup.open = true;
-}
-
-function testtag_finish()
-{
- ok(!document.getElementById("datepicker-popup").open, "datepicker popup open false again");
-
- var dpgrid = document.getElementById("datepicker-grid");
- synthesizeWheel(dpgrid, 5, 5, { deltaY: 10.0,
- deltaMode: WheelEvent.DOM_DELTA_LINE });
- is(mouseScrolled, true, "mouse scrolled");
- is(dpgrid.displayedMonth, 2, "mouse scroll changed month");
-
- SimpleTest.finish();
-}
-
-function testtag_datepicker(dp, type, testid)
-{
- testid += " ";
-
- var today = new Date();
- var tyear = today.getFullYear();
- var tmonth = today.getMonth();
- var tdate = today.getDate();
-
- // testtag_comparedate(dp, testid + "initial", tyear, tmonth, tdate);
-
- // check that setting the value property works
- dp.value = testtag_getdatestring(tyear, tmonth, tdate);
- testtag_comparedate(dp, testid + "set value", tyear, tmonth, tdate);
-
- // check that setting the dateValue property works
- dp.dateValue = today;
- testtag_comparedate(dp, testid + "set dateValue", tyear, tmonth, tdate);
- ok(dp.value !== today, testid + " set dateValue different date");
-
- ok(!dp.readOnly, testid + "readOnly");
- dp.readOnly = true;
- ok(dp.readOnly, testid + "set readOnly");
- dp.readOnly = false;
- ok(!dp.readOnly, testid + "clear readOnly");
-
- var setDateField = function(field, value, expectException,
- expectedYear, expectedMonth, expectedDate)
- {
- var exh = false;
- try {
- dp[field] = value;
- } catch (ex) { exh = true; }
- is(exh, expectException, testid + "set " + field + " " + value);
- testtag_comparedate(dp, testid + "set " + field + " " + value,
- expectedYear, expectedMonth, expectedDate);
- }
-
- // check the value property
- setDateField("value", "2003-1-27", false, 2003, 0, 27);
- setDateField("value", "2002-11-8", false, 2002, 10, 8);
- setDateField("value", "2001-07-02", false, 2001, 6, 2);
- setDateField("value", "2002-10-25", false, 2002, 9, 25);
-
- // check that the year, month and date fields can be set properly
- setDateField("year", 2002, false, 2002, 9, 25);
- setDateField("year", 0, true, 2002, 9, 25);
-
- setDateField("month", 6, false, 2002, 6, 25);
- setDateField("month", 9, false, 2002, 9, 25);
- setDateField("month", 10, false, 2002, 10, 25);
- setDateField("month", -1, true, 2002, 10, 25);
- setDateField("month", 12, true, 2002, 10, 25);
-
- setDateField("date", 9, false, 2002, 10, 9);
- setDateField("date", 10, false, 2002, 10, 10);
- setDateField("date", 15, false, 2002, 10, 15);
- setDateField("date", 0, true, 2002, 10, 15);
- setDateField("date", 32, true, 2002, 10, 15);
-
- // check leap year handling
- setDateField("value", "1600-2-29", false, 1600, 1, 29);
- setDateField("value", "2000-2-29", false, 2000, 1, 29);
- setDateField("value", "2003-2-29", false, 2003, 2, 1);
- setDateField("value", "2004-2-29", false, 2004, 1, 29);
- setDateField("value", "2100-2-29", false, 2100, 2, 1);
-
- // check invalid values for the value and dateValue properties
- dp.value = "2002-07-15";
- setDateField("value", "", true, 2002, 6, 15);
- setDateField("value", "2-2", true, 2002, 6, 15);
- setDateField("value", "2000-5-6-6", true, 2002, 6, 15);
- setDateField("value", "2000-a-19", true, 2002, 6, 15);
- setDateField("dateValue", "none", true, 2002, 6, 15);
-
- // grid and popup types can display a different month than the current one
- var isGridOrPopup = (type == "grid" || type == "popup");
- dp.displayedMonth = 3;
- testtag_comparedate(dp, testid + "set displayedMonth",
- 2002, isGridOrPopup ? 6 : 3, 15, 3);
-
- dp.displayedYear = 2009;
- testtag_comparedate(dp, testid + "set displayedYear",
- isGridOrPopup ? 2002 : 2009, isGridOrPopup ? 6 : 3, 15, 3, 2009);
-
- if (isGridOrPopup) {
- dp.value = "2008-02-29";
- dp.displayedYear = 2009;
- is(dp.displayedMonth, 1, "set displayedYear during leap year");
- }
-
- is(dp.open, false, testid + "open false");
- if (type != "popup") {
- dp.open = true;
- ok(!dp.open, testid + "open still false");
- }
-
- // check the fields
- if (type != "grid") {
- ok(dp.yearField instanceof HTMLInputElement, testid + "yearField");
- ok(dp.monthField instanceof HTMLInputElement, testid + "monthField");
- ok(dp.dateField instanceof HTMLInputElement, testid + "dateField");
-
- testtag_datepicker_UI_fields(dp, testid);
-
- dp.readOnly = true;
-
- // check that keyboard usage doesn't change the value when the datepicker
- // is read only
- testtag_datepicker_UI_key(dp, testid + "readonly ", "2003-01-29",
- dp.yearField, 2003, 0, 29, 2003, 0, 29);
- testtag_datepicker_UI_key(dp, testid + "readonly ", "2003-04-29",
- dp.monthField, 2003, 3, 29, 2003, 3, 29);
- testtag_datepicker_UI_key(dp, testid + "readonly ", "2003-06-15",
- dp.dateField, 2003, 5, 15, 2003, 5, 15);
-
- dp.readOnly = false;
- }
- else {
- testtag_datepicker_UI_grid(dp, "grid", testid);
- }
-}
-
-function testtag_datepicker_UI_fields(dp, testid)
-{
- testid += "UI";
- dp.focus();
-
- // test adjusting the date with the up and down keys
- testtag_datepicker_UI_key(dp, testid, "2003-01-29", dp.yearField, 2004, 0, 29, 2003, 0, 29);
- testtag_datepicker_UI_key(dp, testid, "1600-02-29", dp.yearField, 1601, 1, 28, 1600, 1, 28);
- testtag_datepicker_UI_key(dp, testid, "2000-02-29", dp.yearField, 2001, 1, 28, 2000, 1, 28);
- testtag_datepicker_UI_key(dp, testid, "2004-02-29", dp.yearField, 2005, 1, 28, 2004, 1, 28);
-
- testtag_datepicker_UI_key(dp, testid, "2003-04-29", dp.monthField, 2003, 4, 29, 2003, 3, 29);
- testtag_datepicker_UI_key(dp, testid, "2003-01-15", dp.monthField, 2003, 1, 15, 2003, 0, 15);
- testtag_datepicker_UI_key(dp, testid, "2003-12-29", dp.monthField, 2003, 0, 29, 2003, 11, 29);
- testtag_datepicker_UI_key(dp, testid, "2003-03-31", dp.monthField, 2003, 3, 30, 2003, 2, 30);
-
- testtag_datepicker_UI_key(dp, testid, "2003-06-15", dp.dateField, 2003, 5, 16, 2003, 5, 15);
- testtag_datepicker_UI_key(dp, testid, "2003-06-01", dp.dateField, 2003, 5, 2, 2003, 5, 1);
- testtag_datepicker_UI_key(dp, testid, "2003-06-30", dp.dateField, 2003, 5, 1, 2003, 5, 30);
- testtag_datepicker_UI_key(dp, testid, "1600-02-28", dp.dateField, 1600, 1, 29, 1600, 1, 28);
- testtag_datepicker_UI_key(dp, testid, "2000-02-28", dp.dateField, 2000, 1, 29, 2000, 1, 28);
- testtag_datepicker_UI_key(dp, testid, "2003-02-28", dp.dateField, 2003, 1, 1, 2003, 1, 28);
- testtag_datepicker_UI_key(dp, testid, "2004-02-28", dp.dateField, 2004, 1, 29, 2004, 1, 28);
- testtag_datepicker_UI_key(dp, testid, "2100-02-28", dp.dateField, 2100, 1, 1, 2100, 1, 28);
-
- synthesizeKeyExpectEvent('Z', { altKey: true }, $("key_alt_z"), "command", testid + " alt shortcut");
- synthesizeKeyExpectEvent('Q', { ctrlKey: true }, $("key_ctrl_q"), "command", testid + " ctrl shortcut");
- synthesizeKeyExpectEvent('E', { metaKey: true }, $("key_meta_e"), "command", testid + " meta shortcut");
-}
-
-function testtag_datepicker_UI_grid(dp, type, testid)
-{
- testid += "UI ";
-
- // check that pressing the cursor keys moves the date properly. For grid
- // types, focus the grid first. For popup types, the grid should be focused
- // automatically when opening the popup.
- var ktarget = dp;
- if (type == "grid")
- dp.focus();
- else
- ktarget = dp.attachedControl;
-
- dp.value = "2003-02-22";
-
- synthesizeKeyExpectEvent("VK_LEFT", { }, ktarget, "change", testid + "key left");
- is(dp.value, "2003-02-21", testid + "key left");
-
- synthesizeKeyExpectEvent("VK_RIGHT", { }, ktarget, "change", testid + "key right");
- is(dp.value, "2003-02-22", testid + "key right");
- synthesizeKeyExpectEvent("VK_RIGHT", { }, ktarget, "change", testid + "key right next week");
- is(dp.value, "2003-02-23", testid + "key right next week");
- synthesizeKeyExpectEvent("VK_LEFT", { }, ktarget, "change", testid + "key left previous week");
- is(dp.value, "2003-02-22", testid + "key left previous week");
-
- synthesizeKeyExpectEvent("VK_UP", { }, ktarget, "change", testid + "key up");
- is(dp.value, "2003-02-15", testid + "key up");
- synthesizeKeyExpectEvent("VK_DOWN", { }, ktarget, "change", testid + "key down");
- is(dp.value, "2003-02-22", testid + "key down");
- synthesizeKeyExpectEvent("VK_DOWN", { }, ktarget, "change");
- is(dp.value, "2003-03-01", testid + "key down next month", testid + "key down next month");
- synthesizeKeyExpectEvent("VK_UP", { }, ktarget, "change");
- is(dp.value, "2003-02-22", testid + "key up previous month", testid + "key up previous month");
-
- // the displayed month may be changed with the page up and page down keys,
- // however this only changes the displayed month, not the current value.
- synthesizeKeyExpectEvent("VK_PAGE_DOWN", { }, ktarget, "monthchange", testid + "key page down");
- is(dp.value, "2003-02-22", testid + "key page down");
-
- // the monthchange event is fired when the displayed month is changed
- synthesizeKeyExpectEvent("VK_UP", { }, ktarget, "monthchange", testid + "key up after month change");
- is(dp.value, "2003-02-15", testid + "key up after month change");
-
- synthesizeKeyExpectEvent("VK_PAGE_UP", { }, ktarget, "monthchange", testid + "key page up");
- is(dp.value, "2003-02-15", testid + "key page up");
-
- // check handling at the start and end of the month
- dp.value = "2010-10-01";
- synthesizeKeyExpectEvent("VK_PAGE_UP", { }, ktarget, "monthchange", testid + "key page up 2010-10-01");
- is(dp.displayedMonth, 8, testid + "key page up 2010-10-01 displayedMonth");
- is(dp.displayedYear, 2010, testid + "key page up 2010-10-01 displayedYear");
-
- dp.value = "2010-10-01";
- synthesizeKeyExpectEvent("VK_PAGE_DOWN", { }, ktarget, "monthchange", testid + "key page down 2010-10-01");
- is(dp.displayedMonth, 10, testid + "key page down 2010-10-01 displayedMonth");
- is(dp.displayedYear, 2010, testid + "key page down 2010-10-01 displayedYear");
-
- dp.value = "2010-10-31";
- synthesizeKeyExpectEvent("VK_PAGE_UP", { }, ktarget, "monthchange", testid + "key page up 2010-10-31");
- is(dp.displayedMonth, 8, testid + "key page up 2010-10-31 displayedMonth");
- is(dp.displayedYear, 2010, testid + "key page up 2010-10-01 displayedYear");
- dp.value = "2010-10-31";
- synthesizeKeyExpectEvent("VK_PAGE_DOWN", { }, ktarget, "monthchange", testid + "key page down 2010-10-31");
- is(dp.displayedMonth, 10, testid + "key page down 2010-10-31 displayedMonth");
- is(dp.displayedYear, 2010, testid + "key page up 2010-10-31 displayedYear");
-
- // check handling at the end of february
- dp.value = "2010-03-31";
- synthesizeKeyExpectEvent("VK_PAGE_UP", { }, ktarget, "monthchange", testid + "key page up 2010-03-31");
- is(dp.displayedMonth, 1, testid + "key page up 2010-03-31 displayedMonth");
- is(dp.displayedYear, 2010, testid + "key page up 2010-03-31 displayedYear");
- synthesizeKeyExpectEvent("VK_PAGE_UP", { }, ktarget, "monthchange", testid + "key page up 2010-02-28");
- is(dp.displayedMonth, 0, testid + "key page up 2010-02-28 displayedMonth");
- is(dp.displayedYear, 2010, testid + "key page up 2010-02-28 displayedYear");
-
- dp.value = "2010-01-31";
- synthesizeKeyExpectEvent("VK_PAGE_DOWN", { }, ktarget, "monthchange", testid + "key page down 2010-01-31");
- is(dp.displayedMonth, 1, testid + "key page down 2010-01-31 displayedMonth");
- is(dp.displayedYear, 2010, testid + "key page up 2010-01-31 displayedYear");
- synthesizeKeyExpectEvent("VK_PAGE_DOWN", { }, ktarget, "monthchange", testid + "key page down 2010-02-28");
- is(dp.displayedMonth, 2, testid + "key page down 2010-02-28 displayedMonth");
- is(dp.displayedYear, 2010, testid + "key page up 2010-02-28 displayedYear");
-
- // check handling at the end of february during a leap year
- dp.value = "2008-01-31";
- synthesizeKeyExpectEvent("VK_PAGE_DOWN", { }, ktarget, "monthchange", testid + "key page down 2008-01-31");
- is(dp.displayedMonth, 1, testid + "key page down 2008-01-31 displayedMonth");
- is(dp.displayedYear, 2008, testid + "key page up 2008-01-31 displayedYear");
- dp.value = "2008-03-31";
- synthesizeKeyExpectEvent("VK_PAGE_UP", { }, ktarget, "monthchange", testid + "key page up 2008-03-31");
- is(dp.displayedMonth, 1, testid + "key page up 2008-03-31 displayedMonth");
- is(dp.displayedYear, 2008, testid + "key page up 2008-03-31 displayedYear");
-
- // the value of a read only datepicker cannot be changed
- dp.value = "2003-02-15";
-
- dp.readOnly = true;
- synthesizeKeyExpectEvent("VK_LEFT", { }, ktarget, "!change", testid + "key left read only");
- is(dp.value, "2003-02-15", testid + "key left read only");
- synthesizeKeyExpectEvent("VK_RIGHT", { }, ktarget, "!change", testid + "key right read only");
- is(dp.value, "2003-02-15", testid + "key right read only");
- synthesizeKeyExpectEvent("VK_DOWN", { }, ktarget, "!change", testid + "key down read only");
- is(dp.value, "2003-02-15", testid + "key down read only");
- synthesizeKeyExpectEvent("VK_UP", { }, ktarget, "!change", testid + "key up read only");
- is(dp.value, "2003-02-15", testid + "key up read only");
-
- // month can still be changed even when readonly
- synthesizeKeyExpectEvent("VK_PAGE_DOWN", { }, ktarget, "monthchange",
- testid + "key page up read only");
- synthesizeKeyExpectEvent("VK_PAGE_UP", { }, ktarget, "monthchange",
- testid + "key page down read only");
-
- dp.readOnly = false;
- synthesizeKeyExpectEvent("VK_LEFT", { }, ktarget, "change", testid + "key left changeable again");
- is(dp.value, "2003-02-14", testid + "key left changeable again");
-
- // the value of a disabled datepicker cannot be changed
- dp.disabled = true;
- synthesizeKeyExpectEvent("VK_LEFT", { }, ktarget, "!change", testid + "key left disabled");
- is(dp.value, "2003-02-14", testid + "key left disabled");
- synthesizeKeyExpectEvent("VK_RIGHT", { }, ktarget, "!change", testid + "key right disabled");
- is(dp.value, "2003-02-14", testid + "key right disabled");
- synthesizeKeyExpectEvent("VK_DOWN", { }, ktarget, "!change", testid + "key down disabled");
- is(dp.value, "2003-02-14", testid + "key down disabled");
- synthesizeKeyExpectEvent("VK_UP", { }, ktarget, "!change", testid + "key up disabled");
- is(dp.value, "2003-02-14", testid + "key up disabled");
-
- // month cannot be changed even when disabled
- synthesizeKeyExpectEvent("VK_PAGE_DOWN", { }, ktarget, "!monthchange",
- testid + "key page down disabled");
- synthesizeKeyExpectEvent("VK_PAGE_UP", { }, ktarget, "!monthchange",
- testid + "key page up disabled");
-
- dp.disabled = false;
- synthesizeKeyExpectEvent("VK_RIGHT", { }, ktarget, "change", testid + "key right enabled again");
- is(dp.value, "2003-02-15", testid + "key right enabled again");
-}
-
-function testtag_datepicker_UI_popup()
-{
- var dppopup = document.getElementById("datepicker-popup");
- is(dppopup.open, true, "datepicker popup after open");
- testtag_datepicker_UI_grid(dppopup, "popup", "datepicker popup ");
- dppopup.open = false;
-}
-
-function testtag_datepicker_UI_key(dp, testid, value, field,
- uyear, umonth, udate,
- dyear, dmonth, ddate)
-{
- dp.value = value;
- field.focus();
-
- synthesizeKey("VK_UP", { });
- testtag_comparedate(dp, testid + " " + value + " key up", uyear, umonth, udate);
-
- synthesizeKey("VK_DOWN", { });
- testtag_comparedate(dp, testid + " " + value + " key down", dyear, dmonth, ddate);
-}
-
-function testtag_getdatestring(year, month, date)
-{
- month = (month < 9) ? ("0" + ++month) : month + 1;
- if (date < 10)
- date = "0" + date;
- return year + "-" + month + "-" + date;
-}
-
-function testtag_comparedate(dp, testid, year, month, date, displayedMonth, displayedYear)
-{
- is(dp.value, testtag_getdatestring(year, month, date), testid + " value");
- if (testid.indexOf("initial") == -1)
- is(dp.getAttribute("value"),
- testtag_getdatestring(year, month, date),
- testid + " value attribute");
-
- var dateValue = dp.dateValue;
- ok(dateValue.getFullYear() == year &&
- dateValue.getMonth() == month &&
- dateValue.getDate() == date,
- testid + " dateValue");
-
- is(dp.year, year, testid + " year");
- is(dp.month, month, testid + " month");
- is(dp.displayedMonth, displayedMonth ? displayedMonth : month, testid + " displayedMonth");
- is(dp.displayedYear, displayedYear ? displayedYear : year, testid + " displayedYear");
- is(dp.date, date, testid + " date");
-}
-
-]]>
-
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_deck.xul b/toolkit/content/tests/chrome/test_deck.xul
deleted file mode 100644
index 25c59c38a9..0000000000
--- a/toolkit/content/tests/chrome/test_deck.xul
+++ /dev/null
@@ -1,133 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for deck
- -->
-<window title="Deck Test"
- onload="setTimeout(run_tests, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<deck id="deck1" style="padding-top: 5px; padding-bottom: 12px;">
- <button id="d1b1" label="Button One"/>
- <button id="d1b2" label="Button Two is larger" height="80" style="margin: 1px;"/>
-</deck>
-<deck id="deck2" selectedIndex="1">
- <button id="d2b1" label="Button One"/>
- <button id="d2b2" label="Button Two"/>
-</deck>
-<deck id="deck3" selectedIndex="1">
- <button id="d3b1" label="Remove me"/>
- <button id="d3b2" label="Keep me selected"/>
-</deck>
-<deck id="deck4" selectedIndex="5">
- <button id="d4b1" label="Remove me"/>
- <button id="d4b2" label="Remove me"/>
- <button id="d4b3" label="Remove me"/>
- <button id="d4b4" label="Button 4"/>
- <button id="d4b5" label="Button 5"/>
- <button id="d4b6" label="Keep me selected"/>
- <button id="d4b7" label="Button 7"/>
-</deck>
-<deck id="deck5" selectedIndex="2">
- <button id="d5b1" label="Button 1"/>
- <button id="d5b2" label="Button 2"/>
- <button id="d5b3" label="Keep me selected"/>
- <button id="d5b4" label="Remove me"/>
- <button id="d5b5" label="Remove me"/>
- <button id="d5b6" label="Remove me"/>
-</deck>
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-function run_tests() {
- test_deck();
- test_deck_child_removal();
- SimpleTest.finish();
-}
-
-function test_deck()
-{
- var deck = $("deck1");
- ok(deck.selectedIndex === '0', "deck one selectedIndex");
- // this size is the button height, 80, plus the button padding of 1px on each side,
- // plus the deck's 5px top padding and the 12px bottom padding.
- var rect = deck.getBoundingClientRect();
- is(Math.round(rect.bottom) - Math.round(rect.top), 99, "deck size of largest child");
- synthesizeMouseExpectEvent(deck, 12, 12, { }, $("d1b1"), "click", "mouse on deck one");
-
- // change the selected page of the deck and ensure that the mouse click goes
- // to the button on that page
- deck.selectedIndex = 1;
- ok(deck.selectedIndex === '1', "deck one selectedIndex after change");
- synthesizeMouseExpectEvent(deck, 9, 9, { }, $("d1b2"), "click", "mouse on deck one after change");
-
- deck = $("deck2");
- ok(deck.selectedIndex === '1', "deck two selectedIndex");
- synthesizeMouseExpectEvent(deck, 9, 9, { }, $("d2b2"), "click", "mouse on deck two");
-}
-
-function test_deck_child_removal()
-{
- // Start with a simple case where we have two child nodes in a deck, with
- // the second child (index 1) selected. Removing the first node should
- // automatically set the selectedIndex at 0.
- let deck = $("deck3");
- let child = $("d3b1");
- is(deck.selectedIndex, "1", "Should have the deck element at index 1 selected");
-
- // Remove the child at the 0th index. The deck should automatically
- // set the selectedIndex to "0".
- child.remove();
- is(deck.selectedIndex, "0", "Should have the deck element at index 0 selected");
-
- // Now scale it up by using a deck with 7 child nodes, and remove the
- // first three, making sure that the selectedIndex is decremented
- // each time.
- deck = $("deck4");
- let expectedIndex = 5;
- is(deck.selectedIndex, String(expectedIndex),
- "Should have the deck element at index " + expectedIndex + " selected");
-
- for (let i = 0; i < 3; ++i) {
- deck.firstChild.remove();
- expectedIndex--;
- is(deck.selectedIndex, String(expectedIndex),
- "Should have the deck element at index " + expectedIndex + " selected");
- }
-
- // Check that removing the currently selected node doesn't change
- // behaviour.
- deck.childNodes[expectedIndex].remove();
- is(deck.selectedIndex, String(expectedIndex),
- "The selectedIndex should not change when removing the node " +
- "at the selected index.");
-
- // Finally, make sure we haven't changed the behaviour when removing
- // nodes at indexes greater than the selected node.
- deck = $("deck5");
- expectedIndex = 2;
- is(deck.selectedIndex, String(expectedIndex),
- "Should have the deck element at index " + expectedIndex + " selected");
-
- // And then remove all of the nodes, starting from last to first, making
- // sure that the selectedIndex does not change.
- while (deck.lastChild) {
- deck.lastChild.remove();
- is(deck.selectedIndex, String(expectedIndex),
- "Should have the deck element at index " + expectedIndex + " selected");
- }
-}
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_dialogfocus.xul b/toolkit/content/tests/chrome/test_dialogfocus.xul
deleted file mode 100644
index 80474e2b91..0000000000
--- a/toolkit/content/tests/chrome/test_dialogfocus.xul
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window width="500" height="600"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
-<button id="test" label="Test"/>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-<script>
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-SimpleTest.requestCompleteLog();
-
-var expected = [ "one", "_extra2", "tab", "one", "tabbutton2", "tabbutton", "two", "textbox-yes", "one" ];
-// non-Mac will always focus the default button if any of the dialog buttons
-// would be focused
-if (navigator.platform.indexOf("Mac") == -1)
- expected[1] = "_accept";
-
-var step = 0;
-var fullKeyboardAccess = false;
-
-function startTest()
-{
- var testButton = document.getElementById("test");
- synthesizeKey("VK_TAB", { });
- fullKeyboardAccess = (document.activeElement == testButton);
- info("We " + (fullKeyboardAccess ? "have" : "don't have") + " full keyboard access");
- runTest();
-}
-
-function runTest()
-{
- step++;
- info("runTest(), step = " + step + ", expected = " + expected[step - 1]);
- if (step > expected.length || (!fullKeyboardAccess && step == 2)) {
- info("finishing");
- SimpleTest.finish();
- return;
- }
-
- var expectedFocus = expected[step - 1];
- var win = window.openDialog("dialog_dialogfocus.xul", "_new", "chrome,dialog", step);
-
- function checkDialogFocus(event)
- {
- info("checkDialogFocus()");
- // if full keyboard access is not on, just skip the tests
- var match = false;
- if (fullKeyboardAccess) {
- if (!(event.target instanceof Element)) {
- info("target not an Element");
- return;
- }
-
- if (expectedFocus == "textbox-yes")
- match = (win.document.activeElement == win.document.getElementById(expectedFocus).inputField);
- else if (expectedFocus[0] == "_")
- match = (win.document.activeElement.dlgType == expectedFocus.substring(1));
- else
- match = (win.document.activeElement.id == expectedFocus);
- info("match = " + match);
- if (!match)
- return;
- }
- else {
- match = (win.document.activeElement == win.document.documentElement);
- info("match = " + match);
- }
-
- win.removeEventListener("focus", checkDialogFocus, true);
- ok(match, "focus step " + step);
-
- win.close();
- SimpleTest.waitForFocus(runTest, window);
- }
-
- win.addEventListener("focus", checkDialogFocus, true);
-}
-
-SimpleTest.waitForFocus(startTest, window);
-
-]]>
-
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_findbar.xul b/toolkit/content/tests/chrome/test_findbar.xul
deleted file mode 100644
index 9cbe73c475..0000000000
--- a/toolkit/content/tests/chrome/test_findbar.xul
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=257061
-https://bugzilla.mozilla.org/show_bug.cgi?id=288254
--->
-<window title="Mozilla Bug 257061 and Bug 288254"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<a target="_blank"
- href="https://bugzilla.mozilla.org/show_bug.cgi?id=257061">Mozilla Bug 257061</a>
-<a target="_blank"
- href="https://bugzilla.mozilla.org/show_bug.cgi?id=288254">Mozilla Bug 288254</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-</pre>
-</body>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-/** Test for Bug 257061 and Bug 288254 **/
-SimpleTest.waitForExplicitFinish();
-
-// Since bug 978861, this pref is set to `false` on OSX. For this test, we'll
-// set it `true` to disable the find clipboard on OSX, which interferes with
-// our tests.
-SpecialPowers.pushPrefEnv({
- set: [["accessibility.typeaheadfind.prefillwithselection", true]]
-}, () => {
- window.open("findbar_window.xul", "findbartest", "chrome,width=600,height=600");
-});
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_findbar_entireword.xul b/toolkit/content/tests/chrome/test_findbar_entireword.xul
deleted file mode 100644
index dc39fe09dd..0000000000
--- a/toolkit/content/tests/chrome/test_findbar_entireword.xul
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=269442
--->
-<window title="Mozilla Bug 269442"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/MochiKit/packed.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <a target="_blank"
- href="https://bugzilla.mozilla.org/show_bug.cgi?id=269442">
- Mozilla Bug 269442
- </a>
-
- <p id="display"></p>
- <div id="content" style="display: none">
- </div>
- <pre id="test">
- </pre>
- </body>
-
- <script class="testbody" type="application/javascript">
- <![CDATA[
-
- /** Test for Bug 269442 **/
- SimpleTest.waitForExplicitFinish();
- window.open("findbar_entireword_window.xul", "269442test",
- "chrome,width=600,height=600");
-
- ]]>
- </script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_findbar_events.xul b/toolkit/content/tests/chrome/test_findbar_events.xul
deleted file mode 100644
index d75e5ccb57..0000000000
--- a/toolkit/content/tests/chrome/test_findbar_events.xul
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=793275
--->
-<window title="Mozilla Bug 793275"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <a target="_blank"
- href="https://bugzilla.mozilla.org/show_bug.cgi?id=793275">
- Mozilla Bug 793275
- </a>
-
- <p id="display"></p>
- <div id="content" style="display: none">
- </div>
- <pre id="test">
- </pre>
- </body>
-
- <script class="testbody" type="application/javascript">
- <![CDATA[
-
- /** Test for Bug 793275 **/
- SimpleTest.waitForExplicitFinish();
- window.open("findbar_events_window.xul", "793275test",
- "chrome,width=600,height=600");
-
- ]]>
- </script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_focus_anons.xul b/toolkit/content/tests/chrome/test_focus_anons.xul
deleted file mode 100644
index 848590887b..0000000000
--- a/toolkit/content/tests/chrome/test_focus_anons.xul
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Tests for focus on elements with anonymous focusable children"
- onload="SimpleTest.waitForFocus(runTests);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<label accesskey="a" control="menulist"/>
-<label accesskey="b" control="textbox"/>
-<label accesskey="c" control="scale"/>
-
-<menulist id="menulist" editable="true">
- <menupopup>
- <menuitem label="One"/>
- </menupopup>
-</menulist>
-<textbox id="textbox"/>
-<scale id="scale"/>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-var gBlurs = 0, gFocuses = 0;
-var gExpectedBlur = "";
-var gExpectedFocus = "";
-
-function blurOccurred(event) {
- gBlurs++;
- is(event.originalTarget, gExpectedBlur, "blur " + gBlurs + "," + event.originalTarget.localName);
-}
-
-function focusOccurred(event) {
- gFocuses++;
- is(event.originalTarget, gExpectedFocus, "focus " + gFocuses + "," + event.originalTarget.localName);
-}
-
-function runTests()
-{
- addEventListener("focus", focusOccurred, true);
- addEventListener("blur", blurOccurred, true);
-
- gExpectedBlur = null;
- gExpectedFocus = $("menulist").inputField;
- $("menulist").focus();
-
- gExpectedBlur = gExpectedFocus;
- gExpectedFocus = $("textbox").inputField;
- $("textbox").focus();
-
- gExpectedBlur = gExpectedFocus;
- gExpectedFocus = document.getAnonymousNodes($("scale"))[0];
- $("scale").focus();
-
- var accessKeyDetails = (navigator.platform.indexOf("Mac") >= 0) ?
- { altKey: true, ctrlKey : true } :
- { altKey : true, shiftKey: true };
-
- gExpectedBlur = document.getAnonymousNodes($("scale"))[0];
- gExpectedFocus = $("menulist").inputField;
- synthesizeKey("a", accessKeyDetails);
-
- gExpectedBlur = gExpectedFocus;
- gExpectedFocus = $("textbox").inputField;
- synthesizeKey("b", accessKeyDetails);
-
- gExpectedBlur = gExpectedFocus;
- gExpectedFocus = document.getAnonymousNodes($("scale"))[0];
- synthesizeKey("c", accessKeyDetails);
-
- if (navigator.platform.indexOf("Mac") == -1) {
- gExpectedBlur = gExpectedFocus;
- gExpectedFocus = $("textbox").inputField;
- synthesizeKey("VK_TAB", { shiftKey: true });
-
- gExpectedBlur = gExpectedFocus;
- gExpectedFocus = $("menulist").inputField;
- synthesizeKey("VK_TAB", { shiftKey: true });
-
- gExpectedBlur = gExpectedFocus;
- gExpectedFocus = $("textbox").inputField;
- synthesizeKey("VK_TAB", { });
-
- gExpectedBlur = gExpectedFocus;
- gExpectedFocus = document.getAnonymousNodes($("scale"))[0];
- synthesizeKey("VK_TAB", { });
-
- is(gBlurs, 9, "correct number of blurs");
- is(gFocuses, 10, "correct number of focuses");
- }
- else {
- is(gBlurs, 5, "correct number of blurs");
- is(gFocuses, 6, "correct number of focuses");
- }
-
- removeEventListener("focus", focusOccurred, true);
- removeEventListener("blur", blurOccurred, true);
-
- SimpleTest.finish();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_hiddenitems.xul b/toolkit/content/tests/chrome/test_hiddenitems.xul
deleted file mode 100644
index 7e44852df9..0000000000
--- a/toolkit/content/tests/chrome/test_hiddenitems.xul
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=317422
--->
-<window title="Mozilla Bug 317422"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml">
- <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=317422"
- target="_blank">Mozilla Bug 317422</a>
- </body>
-
- <richlistbox id="richlistbox" seltype="multiple">
- <richlistitem id="richlistbox_item1"><label value="Item 1"/></richlistitem>
- <richlistitem id="richlistbox_item2"><label value="Item 2"/></richlistitem>
- <richlistitem id="richlistbox_item3" hidden="true"><label value="Item 3"/></richlistitem>
- <richlistitem id="richlistbox_item4"><label value="Item 4"/></richlistitem>
- <richlistitem id="richlistbox_item5" collapsed="true"><label value="Item 5"/></richlistitem>
- <richlistitem id="richlistbox_item6"><label value="Item 6"/></richlistitem>
- <richlistitem id="richlistbox_item7" hidden="true"><label value="Item 7"/></richlistitem>
- </richlistbox>
-
- <listbox id="listbox" seltype="multiple">
- <listitem id="listbox_item1" label="Item 1"/>
- <listitem id="listbox_item2" label="Item 2"/>
- <listitem id="listbox_item3" label="Item 3" hidden="true"/>
- <listitem id="listbox_item4" label="Item 4"/>
- <listitem id="listbox_item5" label="Item 5" collapsed="true"/>
- <listitem id="listbox_item6" label="Item 6"/>
- <listitem id="listbox_item7" label="Item 7" hidden="true"/>
- </listbox>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
-/** Test for Bug 317422 **/
-SimpleTest.waitForExplicitFinish();
-
-function testListbox(id)
-{
- var listbox = document.getElementById(id);
- listbox.focus();
- is(listbox.getRowCount(), 7, id + ": Returned the wrong number of rows");
- is(listbox.getItemAtIndex(2).id, id + "_item3", id + ": Should still return hidden items");
- listbox.selectedIndex = 0;
- is(listbox.selectedItem.id, id + "_item1", id + ": First item was not selected");
- sendKey("DOWN");
- is(listbox.selectedItem.id, id + "_item2", id + ": Down didn't move to second item");
- sendKey("DOWN");
- is(listbox.selectedItem.id, id + "_item4", id + ": Down didn't skip hidden item");
- sendKey("DOWN");
- is(listbox.selectedItem.id, id + "_item6", id + ": Down didn't skip collapsed item");
- sendKey("UP");
- is(listbox.selectedItem.id, id + "_item4", id + ": Up didn't skip collapsed item");
- sendKey("UP");
- is(listbox.selectedItem.id, id + "_item2", id + ": Up didn't skip hidden item");
- listbox.selectAll();
- is(listbox.selectedItems.length, 7, id + ": Should have still selected all items");
- listbox.invertSelection();
- is(listbox.selectedItems.length, 0, id + ": Should have unselected all items");
- listbox.selectedIndex = 2;
- ok(listbox.selectedItem == listbox.getItemAtIndex(2), id + ": Should have selected the hidden item");
- listbox.selectedIndex = 0;
- sendKey("END");
- is(listbox.selectedItem.id, id + "_item6", id + ": Should have moved to the last unhidden item");
- sendMouseEvent({type: 'click'}, id + "_item1");
- ok(listbox.selectedItem == listbox.getItemAtIndex(0), id + ": Should have selected the first item");
- is(listbox.selectedItems.length, 1, id + ": Should only be one selected item");
- sendMouseEvent({type: 'click', shiftKey: true}, id + "_item6");
- is(listbox.selectedItems.length, 4, id + ": Should have selected all visible items");
- listbox.selectedIndex = 0;
- sendKey("PAGE_DOWN");
- is(listbox.selectedItem.id, id + "_item6", id + ": Page down should go to the last visible item");
- sendKey("PAGE_UP");
- is(listbox.selectedItem.id, id + "_item1", id + ": Page up should go to the first visible item");
-}
-
-window.onload = function runTests() {
- testListbox("richlistbox");
- testListbox("listbox");
- SimpleTest.finish();
-};
- ]]></script>
-</window>
diff --git a/toolkit/content/tests/chrome/test_hiddenpaging.xul b/toolkit/content/tests/chrome/test_hiddenpaging.xul
deleted file mode 100644
index 37b1097183..0000000000
--- a/toolkit/content/tests/chrome/test_hiddenpaging.xul
+++ /dev/null
@@ -1,161 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=317422
--->
-<window title="Mozilla Bug 317422"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
- <style xmlns="http://www.w3.org/1999/xhtml">
- /* This makes the richlistbox about 4.5 rows high */
- richlistitem {
- height: 30px;
- }
- richlistbox {
- height: 135px;
- }
- </style>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml">
- <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=317422"
- target="_blank">Mozilla Bug 317422</a>
- </body>
-
- <richlistbox id="richlistbox" seltype="multiple">
- <richlistitem id="richlistbox_item1"><label value="Item 1"/></richlistitem>
- <richlistitem id="richlistbox_item2"><label value="Item 2"/></richlistitem>
- <richlistitem id="richlistbox_item3" hidden="true"><label value="Item 3"/></richlistitem>
- <richlistitem id="richlistbox_item4"><label value="Item 4"/></richlistitem>
- <richlistitem id="richlistbox_item5" collapsed="true"><label value="Item 5"/></richlistitem>
- <richlistitem id="richlistbox_item6"><label value="Item 6"/></richlistitem>
- <richlistitem id="richlistbox_item7"><label value="Item 7"/></richlistitem>
- <richlistitem id="richlistbox_item8"><label value="Item 8"/></richlistitem>
- <richlistitem id="richlistbox_item9"><label value="Item 9"/></richlistitem>
- <richlistitem id="richlistbox_item10"><label value="Item 10"/></richlistitem>
- <richlistitem id="richlistbox_item11"><label value="Item 11"/></richlistitem>
- <richlistitem id="richlistbox_item12"><label value="Item 12"/></richlistitem>
- <richlistitem id="richlistbox_item13"><label value="Item 13"/></richlistitem>
- <richlistitem id="richlistbox_item14"><label value="Item 14"/></richlistitem>
- <richlistitem id="richlistbox_item15" hidden="true"><label value="Item 15"/></richlistitem>
- </richlistbox>
-
- <listbox id="listbox" seltype="multiple" rows="5">
- <listitem id="listbox_item1" label="Item 1"/>
- <listitem id="listbox_item2" label="Item 2"/>
- <listitem id="listbox_item3" label="Item 3" hidden="true"/>
- <listitem id="listbox_item4" label="Item 4"/>
- <listitem id="listbox_item5" label="Item 5" hidden="true"/>
- <listitem id="listbox_item6" label="Item 6"/>
- <listitem id="listbox_item7" label="Item 7"/>
- <listitem id="listbox_item8" label="Item 8"/>
- <listitem id="listbox_item9" label="Item 9"/>
- <listitem id="listbox_item10" label="Item 10"/>
- <listitem id="listbox_item11" label="Item 11"/>
- <listitem id="listbox_item12" label="Item 12"/>
- <listitem id="listbox_item13" label="Item 13"/>
- <listitem id="listbox_item14" label="Item 14"/>
- <listitem id="listbox_item15" label="Item 15" hidden="true"/>
- </listbox>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
-/** Test for Bug 317422 **/
-SimpleTest.waitForExplicitFinish();
-
-function testRichlistbox()
-{
- var id = "richlistbox";
- var listbox = document.getElementById(id);
- listbox.focus();
- listbox.selectedIndex = 0;
- sendKey("PAGE_DOWN");
- is(listbox.selectedItem.id, id + "_item7", id + ": Page down should go to the item one visible page away");
- is(listbox.getIndexOfFirstVisibleRow(), 6, id + ": Page down should have scrolled down a visible page");
- sendKey("PAGE_DOWN");
- is(listbox.selectedItem.id, id + "_item11", id + ": Second page down should go to the item two visible pages away");
- is(listbox.getIndexOfFirstVisibleRow(), 9, id + ": Second page down should not scroll beyond the end");
- sendKey("PAGE_DOWN");
- is(listbox.selectedItem.id, id + "_item14", id + ": Third page down should go to the last visible item");
- is(listbox.getIndexOfFirstVisibleRow(), 9, id + ": Third page down should not have scrolled at all");
- sendKey("PAGE_UP");
- is(listbox.selectedItem.id, id + "_item10", id + ": Page up should go to the item one visible page away");
- is(listbox.getIndexOfFirstVisibleRow(), 5, id + ": Page up should scroll up a visible page");
- sendKey("PAGE_UP");
- is(listbox.selectedItem.id, id + "_item6", id + ": Second page up should go to the item two visible pages away");
- is(listbox.getIndexOfFirstVisibleRow(), 0, id + ": Second page up should not scroll beyond the start");
- sendKey("PAGE_UP");
- is(listbox.selectedItem.id, id + "_item1", id + ": Third page up should return to the first visible item");
- is(listbox.getIndexOfFirstVisibleRow(), 0, id + ": Third page up should not have scrolled at all");
-}
-
-function testListbox()
-{
- var id = "listbox";
- var listbox = document.getElementById(id);
-
- if (!window.matchMedia("(-moz-overlay-scrollbars)").matches) {
- // Check that a scrollbar is visible by comparing the width of the listitem
- // with the width of the listbox. This is a simple way to do this without
- // checking the anonymous content.
- ok(listbox.firstChild.getBoundingClientRect().width < listbox.getBoundingClientRect().width - 10,
- id + ": Scrollbar visible");
- }
-
- var rowHeight = listbox.firstChild.getBoundingClientRect().height;
-
- listbox.focus();
- listbox.selectedIndex = 0;
- sendKey("PAGE_DOWN");
- is(listbox.selectedItem.id, id + "_item8", id + ": Page down should go to the item one visible page away");
- is(listbox.getIndexOfFirstVisibleRow(), 7, id + ": Page down should have scrolled down a visible page");
- sendKey("PAGE_DOWN");
- is(listbox.selectedItem.id, id + "_item13", id + ": Second page down should go to the item two visible pages away");
- is(listbox.getIndexOfFirstVisibleRow(), 9, id + ": Second page down should not scroll beyond the end");
- sendKey("PAGE_DOWN");
- is(listbox.selectedItem.id, id + "_item14", id + ": Third page down should go to the last visible item");
- is(listbox.getIndexOfFirstVisibleRow(), 9, id + ": Third page down should not have scrolled at all");
- sendKey("PAGE_UP");
- is(listbox.selectedItem.id, id + "_item9", id + ": Page up should go to the item one visible page away");
- // the listScrollbox seems to go haywire when scrolling up with hidden listitems
- todo_is(listbox.getIndexOfFirstVisibleRow(), 3, id + ": Page up should scroll up a visible page");
- sendKey("PAGE_UP");
- is(listbox.selectedItem.id, id + "_item2", id + ": Second page up should go to the item two visible pages away");
- is(listbox.getIndexOfFirstVisibleRow(), 0, id + ": Second page up should not scroll beyond the start");
- sendKey("PAGE_UP");
- is(listbox.selectedItem.id, id + "_item1", id + ": Third page up should return to the first visible item");
- is(listbox.getIndexOfFirstVisibleRow(), 0, id + ": Third page up should not have scrolled at all");
-
- var scrollHeight = document.getAnonymousNodes(listbox)[1].lastChild.scrollHeight;
- is(scrollHeight, rowHeight * 15, id + ": scrollHeight when rows set");
-
- listbox.minHeight = 50;
- scrollHeight = document.getAnonymousNodes(listbox)[1].lastChild.scrollHeight;
- is(scrollHeight, rowHeight * 15, id + ": scrollHeight when rows and minimium height set");
-
- listbox.removeAttribute("rows");
-
- var availHeight = document.getAnonymousNodes(listbox)[1].lastChild.getBoundingClientRect().height;
- // The listbox layout adds this extra height in GetPrefSize. Not sure what it's for though.
- var e = (rowHeight * 15 - availHeight) % rowHeight;
- var extraHeight = (e == 0) ? 0 : rowHeight - e;
-
- scrollHeight = document.getAnonymousNodes(listbox)[1].lastChild.scrollHeight;
- is(scrollHeight, rowHeight * 15 + extraHeight, id + ": scrollHeight when minimium height set");
-
- listbox.removeAttribute("minheight");
- scrollHeight = document.getAnonymousNodes(listbox)[1].lastChild.scrollHeight;
- is(scrollHeight, rowHeight * 15 + extraHeight, id + ": scrollHeight");
-}
-
-window.onload = function runTests() {
- testRichlistbox();
- testListbox();
- SimpleTest.finish();
-};
- ]]></script>
-</window>
diff --git a/toolkit/content/tests/chrome/test_keys.xul b/toolkit/content/tests/chrome/test_keys.xul
deleted file mode 100644
index 97cc8a2413..0000000000
--- a/toolkit/content/tests/chrome/test_keys.xul
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Keys Test"
- onload="setTimeout(runTest, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
-<script>
-SimpleTest.waitForExplicitFinish();
-function runTest()
-{
- window.open("window_keys.xul", "_blank", "chrome,width=200,height=200");
-}
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_labelcontrol.xul b/toolkit/content/tests/chrome/test_labelcontrol.xul
deleted file mode 100644
index b33667be05..0000000000
--- a/toolkit/content/tests/chrome/test_labelcontrol.xul
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for label control="value"
- -->
-<window title="tabindex" width="500" height="600"
- onload="runTests()"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<label id="lab" control="ctl"/>
-<textbox id="ctl" value="Test"/>
-<checkbox id="chk" value="Checkbox"/>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-<script>
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-function runTests()
-{
- is($("lab").control, "ctl", "control");
- is($("lab").labeledControlElement, $("ctl"), "labeledControlElement");
- is($("ctl").labelElement, $("lab"), "labelElement");
- is($("chk").labelElement.className, "checkbox-label", "labelElement");
-
- SimpleTest.finish();
-}
-
-]]>
-
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_largemenu.xul b/toolkit/content/tests/chrome/test_largemenu.xul
deleted file mode 100644
index 8841e2b16a..0000000000
--- a/toolkit/content/tests/chrome/test_largemenu.xul
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Large Menu Tests"
- onload="setTimeout(runTest, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
-<script>
-SimpleTest.waitForExplicitFinish();
-function runTest()
-{
- window.open("window_largemenu.xul", "_blank", "chrome,width=200,height=200");
-}
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_menu.xul b/toolkit/content/tests/chrome/test_menu.xul
deleted file mode 100644
index 877efadb1a..0000000000
--- a/toolkit/content/tests/chrome/test_menu.xul
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Menu Destruction Test"
- onload="runTests();"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
- <menubar>
- <menu label="top" id="top">
- <menupopup>
- <menuitem label="top item"/>
-
- <menu label="hello" id="nested">
- <menupopup>
- <menuitem label="item1"/>
- <menuitem label="item2" id="item2"/>
- </menupopup>
- </menu>
- </menupopup>
- </menu>
- </menubar>
-
- <script class="testbody" type="application/javascript">
- <![CDATA[
-
- SimpleTest.waitForExplicitFinish();
-
- function runTests()
- {
- var menu = document.getElementById("nested");
-
- // nsIDOMXULContainerElement::getIndexOfItem();
- var item = document.getElementById("item2");
- is(menu.getIndexOfItem(item), 1,
- "nsIDOMXULContainerElement::getIndexOfItem() failed.");
-
- // nsIDOMXULContainerElement::getItemAtIndex();
- var itemAtIdx = menu.getItemAtIndex(1);
- is(itemAtIdx, item,
- "nsIDOMXULContainerElement::getItemAtIndex() failed.");
-
- // nsIDOMXULContainerElement::itemCount
- is(menu.itemCount, 2, "nsIDOMXULContainerElement::itemCount failed.");
-
- // nsIDOMXULContainerElement::parentContainer
- var topmenu = document.getElementById("top");
- is(menu.parentContainer, topmenu,
- "nsIDOMXULContainerElement::parentContainer failed.");
-
- // nsIDOMXULContainerElement::appendItem();
- var item = menu.appendItem("item3");
- is(menu.getIndexOfItem(item), 2,
- "nsIDOMXULContainerElement::appendItem() failed.");
-
- // nsIDOMXULContainerElement::insertItemAt();
- var item = menu.insertItemAt(0, "itemZero");
- is(item, menu.getItemAtIndex(0),
- "nsIDOMXULContainerElement::insertItemAt() failed.");
-
- // nsIDOMXULContainerElement::removeItemAt();
- var item = menu.removeItemAt(0);
- is(3, menu.itemCount,
- "nsIDOMXULContainerElement::removeItemAt() failed.");
-
- SimpleTest.finish();
- }
-
- ]]>
- </script>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display">
- </p>
- <div id="content" style="display: none">
- </div>
- <pre id="test">
- </pre>
- </body>
-
-</window>
-
diff --git a/toolkit/content/tests/chrome/test_menu_anchored.xul b/toolkit/content/tests/chrome/test_menu_anchored.xul
deleted file mode 100644
index 8fdda3f25f..0000000000
--- a/toolkit/content/tests/chrome/test_menu_anchored.xul
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- Test for menus with the anchor attribute set
- -->
-<window title="Anchored Menus Test"
- align="start"
- onload="setTimeout(runTest, 0,'tb1');"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
- <script type="application/javascript" src="xul_selectcontrol.js"/>
-
-<hbox>
-
-<toolbarbutton id="tb1" type="menu-button" label="Open" anchor="dropmarker">
- <menupopup id="popup1"
- onpopupshown="checkPopup(this, document.getAnonymousElementByAttribute(this.parentNode, 'anonid', 'dropmarker'))"
- onpopuphidden="runTest('tb2')">
- <menuitem label="Item"/>
- </menupopup>
-</toolbarbutton>
-
-<toolbarbutton id="tb2" type="menu-button" label="Open" anchor="someanchor">
- <menupopup id="popup2" onpopupshown="checkPopup(this, $('someanchor'))" onpopuphidden="runTest('tb3')">
- <menuitem label="Item"/>
- </menupopup>
-</toolbarbutton>
-
-<toolbarbutton id="tb3" type="menu-button" label="Open" anchor="noexist">
- <menupopup id="popup3" onpopupshown="checkPopup(this, this.parentNode)" onpopuphidden="SimpleTest.finish()">
- <menuitem label="Item"/>
- </menupopup>
-</toolbarbutton>
-
-</hbox>
-
-<hbox pack="end" width="180">
- <button id="someanchor" label="Anchor"/>
-</hbox>
-
-<!-- test results are displayed in the html:body -->
-<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
-<script type="application/javascript"><![CDATA[
-
-function runTest(menuid)
-{
- let menu = $(menuid);
- let dropmarker = document.getAnonymousElementByAttribute(menu, "anonid", "dropmarker");
-
- synthesizeMouseAtCenter(dropmarker, { });
-}
-
-function isWithinHalfPixel(a, b)
-{
- return Math.abs(a - b) <= 0.5;
-}
-
-function checkPopup(popup, anchor)
-{
- let popupRect = popup.getBoundingClientRect();
- let anchorRect = anchor.getBoundingClientRect();
-
- ok(isWithinHalfPixel(popupRect.left, anchorRect.left), popup.id + " left");
- ok(isWithinHalfPixel(popupRect.top, anchorRect.bottom), popup.id + " top");
-
- popup.hidePopup();
-}
-
-SimpleTest.waitForExplicitFinish();
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_menu_hide.xul b/toolkit/content/tests/chrome/test_menu_hide.xul
deleted file mode 100644
index b5ce934db0..0000000000
--- a/toolkit/content/tests/chrome/test_menu_hide.xul
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Menu Destruction Test"
- onload="setTimeout(runTests, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<menu id="menu">
- <menupopup onpopupshown="this.firstChild.open = true" onpopuphidden="if (event.target == this) done()">
- <menu id="submenu" label="One">
- <menupopup onpopupshown="submenuOpened();">
- <menuitem label="Two"/>
- </menupopup>
- </menu>
- </menupopup>
-</menu>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-function runTests()
-{
- $("menu").open = true;
-}
-
-function submenuOpened()
-{
- var submenu = $("submenu")
- is(submenu.getAttribute('_moz-menuactive'), "true", "menu highlighted");
- submenu.hidden = true;
- $("menu").open = false;
-}
-
-function done()
-{
- ok(!$("submenu").hasAttribute('_moz-menuactive'), "menu unhighlighted");
- SimpleTest.finish();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_menuchecks.xul b/toolkit/content/tests/chrome/test_menuchecks.xul
deleted file mode 100644
index 8128b738ca..0000000000
--- a/toolkit/content/tests/chrome/test_menuchecks.xul
+++ /dev/null
@@ -1,147 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Menu Checkbox and Radio Tests"
- onload="runTest()"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
- <hbox>
- <button id="menu" type="menu" label="View">
- <menupopup id="popup" onpopupshown="popupShown()" onpopuphidden="popupHidden()">
- <menuitem id="toolbar" label="Show Toolbar" type="checkbox"/>
- <menuitem id="statusbar" label="Show Status Bar" type="checkbox" checked="true"/>
- <menuitem id="bookmarks" label="Show Bookmarks" type="checkbox" autocheck="false"/>
- <menuitem id="history" label="Show History" type="checkbox" autocheck="false" checked="true"/>
- <menuseparator/>
- <menuitem id="byname" label="By Name" type="radio" name="sort"/>
- <menuitem id="bydate" label="By Date" type="radio" name="sort" checked="true"/>
- <menuseparator/>
- <menuitem id="ascending" label="Ascending" type="radio" name="order" checked="true"/>
- <menuitem id="descending" label="Descending" type="radio" name="order" autocheck="false"/>
- <menuitem id="bysubject" label="By Subject" type="radio" name="sort"/>
- </menupopup>
- </button>
-
- </hbox>
-
- <!--
- This test checks that checkbox and radio menu items work properly
- -->
- <script class="testbody" type="application/javascript">
- <![CDATA[
-
- SimpleTest.waitForExplicitFinish();
- var gTestIndex = 0;
-
- // tests to perform
- var tests = [
- {
- testname: "select unchecked checkbox",
- item: "toolbar",
- checked: ["toolbar", "statusbar", "history", "bydate", "ascending"]
- },
- {
- testname: "select checked checkbox",
- item: "statusbar",
- checked: ["toolbar", "history", "bydate", "ascending"]
- },
- {
- testname: "select unchecked autocheck checkbox",
- item: "bookmarks",
- checked: ["toolbar", "history", "bydate", "ascending"]
- },
- {
- testname: "select checked autocheck checkbox",
- item: "history",
- checked: ["toolbar", "history", "bydate", "ascending"]
- },
- {
- testname: "select unchecked radio",
- item: "byname",
- checked: ["toolbar", "history", "byname", "ascending"]
- },
- {
- testname: "select checked radio",
- item: "byname",
- checked: ["toolbar", "history", "byname", "ascending"]
- },
- {
- testname: "select out of order checked radio",
- item: "bysubject",
- checked: ["toolbar", "history", "bysubject", "ascending"]
- },
- {
- testname: "select first radio again",
- item: "byname",
- checked: ["toolbar", "history", "byname", "ascending"]
- },
- {
- testname: "select autocheck radio",
- item: "descending",
- checked: ["toolbar", "history", "byname", "ascending"]
- }
- ];
-
- function runTest()
- {
- checkMenus(["statusbar", "history", "bydate", "ascending"], "initial");
- document.getElementById("menu").open = true;
- }
-
- function checkMenus(checkedItems, testname)
- {
- var isok = true;
- var children = document.getElementById("popup").childNodes;
- for (var c = 0; c < children.length; c++) {
- var child = children[c];
- if ((checkedItems.indexOf(child.id) != -1 && child.getAttribute("checked") != "true") ||
- (checkedItems.indexOf(child.id) == -1 && child.hasAttribute("checked"))) {
- isok = false;
- break;
- }
- }
-
- ok(isok, testname);
- }
-
- function popupShown()
- {
- var test = tests[gTestIndex];
- synthesizeMouse(document.getElementById(test.item), 4, 4, { });
- }
-
- function popupHidden()
- {
- if (gTestIndex < tests.length) {
- var test = tests[gTestIndex];
- checkMenus(test.checked, test.testname);
- gTestIndex++;
- if (gTestIndex < tests.length) {
- document.getElementById("menu").open = true;
- }
- else {
- // manually setting the checkbox should also update the radio state
- document.getElementById("bydate").setAttribute("checked", "true");
- checkMenus(["toolbar", "history", "bydate", "ascending"], "set checked attribute on radio");
- SimpleTest.finish();
- }
- }
- }
-
- ]]>
- </script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_menuitem_blink.xul b/toolkit/content/tests/chrome/test_menuitem_blink.xul
deleted file mode 100644
index 319c284fd7..0000000000
--- a/toolkit/content/tests/chrome/test_menuitem_blink.xul
+++ /dev/null
@@ -1,106 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Blinking Context Menu Item Tests"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
- <menulist id="menulist">
- <menupopup id="menupopup">
- <menuitem label="Menu Item" id="menuitem"/>
- </menupopup>
- </menulist>
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-SimpleTest.waitForFocus(startTest);
-
-function startTest() {
- if (!/Mac/.test(navigator.platform)) {
- ok(true, "Nothing to test on non-Mac.");
- SimpleTest.finish();
- return;
- }
- // Destroy frame while removing the _moz-menuactive attribute.
- test_crash("REMOVAL", test2);
-}
-
-function test2() {
- // Destroy frame while adding the _moz-menuactive attribute.
- test_crash("ADDITION", test3);
-}
-
-function test3() {
- // Don't mess with the frame, just test whether we've blinked.
- test_crash("", SimpleTest.finish);
-}
-
-function test_crash(when, andThen) {
- var menupopup = document.getElementById("menupopup");
- var menuitem = document.getElementById("menuitem");
- var attrChanges = { "REMOVAL": 0, "ADDITION": 0 };
- var storedEvent = null;
- menupopup.addEventListener("popupshown", function () {
- menupopup.removeEventListener("popupshown", arguments.callee, false);
- menuitem.addEventListener("mouseup", function (e) {
- menuitem.removeEventListener("mouseup", arguments.callee, true);
- menuitem.addEventListener("DOMAttrModified", function (e) {
- if (e.attrName == "_moz-menuactive") {
- if (!attrChanges[e.attrChange])
- attrChanges[e.attrChange] = 1;
- else
- attrChanges[e.attrChange]++;
- storedEvent = e;
- if (e.attrChange == e[when]) {
- menuitem.hidden = true;
- menuitem.getBoundingClientRect();
- ok(true, "Didn't crash on _moz-menuactive " + when.toLowerCase() + " during blinking")
- menuitem.hidden = false;
- menuitem.removeEventListener("DOMAttrModified", arguments.callee, false);
- SimpleTest.executeSoon(function () {
- menupopup.hidePopup();
- });
- }
- }
- }, false);
- }, true);
- menupopup.addEventListener("popuphidden", function() {
- menupopup.removeEventListener("popuphidden", arguments.callee, false);
- if (!when) {
- // Test whether we've blinked at all.
- var shouldBlink = navigator.platform.match(/Mac/);
- var expectedNumRemoval = shouldBlink ? 2 : 1;
- var expectedNumAddition = shouldBlink ? 1 : 0;
- ok(storedEvent, "got DOMAttrModified events after clicking menuitem")
- is(attrChanges[storedEvent.REMOVAL], expectedNumRemoval, "blinking unset attributes correctly");
- is(attrChanges[storedEvent.ADDITION], expectedNumAddition, "blinking set attributes correctly");
- }
- SimpleTest.executeSoon(andThen);
- }, false);
- synthesizeMouse(menuitem, 10, 5, { type : "mousemove" });
- synthesizeMouse(menuitem, 10, 5, { type : "mousemove" });
- synthesizeMouse(menuitem, 10, 5, { type : "mousedown" });
- SimpleTest.executeSoon(function () {
- synthesizeMouse(menuitem, 10, 5, { type : "mouseup" });
- });
- }, false);
- document.getElementById("menulist").open = true;
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_menuitem_commands.xul b/toolkit/content/tests/chrome/test_menuitem_commands.xul
deleted file mode 100644
index e31774ccc3..0000000000
--- a/toolkit/content/tests/chrome/test_menuitem_commands.xul
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Menuitem Commands Test"
- onload="runOrOpen()"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
-<script>
-<![CDATA[
-SimpleTest.waitForExplicitFinish();
-
-function checkAttributes(elem, label, accesskey, disabled, hidden, isAfter)
-{
- var is = window.opener.wrappedJSObject.SimpleTest.is;
-
- is(elem.getAttribute("label"), label, elem.id + " label " + (isAfter ? "after" : "before") + " open");
- is(elem.getAttribute("accesskey"), accesskey, elem.id + " accesskey " + (isAfter ? "after" : "before") + " open");
- is(elem.getAttribute("disabled"), disabled, elem.id + " disabled " + (isAfter ? "after" : "before") + " open");
- is(elem.getAttribute("hidden"), hidden, elem.id + " hidden " + (isAfter ? "after" : "before") + " open");
-}
-
-function runOrOpen()
-{
- if (window.opener) {
- SimpleTest.waitForFocus(runTest);
- }
- else {
- window.open("test_menuitem_commands.xul", "", "chrome");
- }
-}
-
-function runTest()
-{
- runTestSet("");
- runTestSet("bar");
- window.close();
- window.opener.wrappedJSObject.SimpleTest.finish();
-}
-
-function runTestSet(suffix)
-{
- var isMac = (navigator.platform.indexOf("Mac") >= 0);
-
- var one = $("one" + suffix);
- var two = $("two" + suffix);
- var three = $("three" + suffix);
- var four = $("four" + suffix);
-
- checkAttributes(one, "One", "", "", "true", false);
- checkAttributes(two, "", "", "false", "", false);
- checkAttributes(three, "Three", "T", "true", "", false);
- checkAttributes(four, "Four", "F", "", "", false);
-
- if (isMac && suffix) {
- var utils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
- getInterface(Components.interfaces.nsIDOMWindowUtils);
- utils.forceUpdateNativeMenuAt("0");
- }
- else {
- $("menu" + suffix).open = true;
- }
-
- checkAttributes(one, "One", "", "", "false", true);
- checkAttributes(two, "Cat", "C", "", "", true);
- checkAttributes(three, "Dog", "D", "false", "true", true);
- checkAttributes(four, "Four", "F", "true", "", true);
-
- $("menu" + suffix).open = false;
-}
-]]>
-</script>
-
-<command id="cmd_one" hidden="false"/>
-<command id="cmd_two" label="Cat" accesskey="C"/>
-<command id="cmd_three" label="Dog" accesskey="D" disabled="false" hidden="true"/>
-<command id="cmd_four" disabled="true"/>
-
-<button id="menu" type="menu">
- <menupopup>
- <menuitem id="one" label="One" hidden="true" command="cmd_one"/>
- <menuitem id="two" disabled="false" command="cmd_two"/>
- <menuitem id="three" label="Three" accesskey="T" disabled="true" command="cmd_three"/>
- <menuitem id="four" label="Four" accesskey="F" command="cmd_four"/>
- </menupopup>
-</button>
-
-<menubar>
- <menu id="menubar" label="Sample">
- <menupopup>
- <menuitem id="onebar" label="One" hidden="true" command="cmd_one"/>
- <menuitem id="twobar" disabled="false" command="cmd_two"/>
- <menuitem id="threebar" label="Three" accesskey="T" disabled="true" command="cmd_three"/>
- <menuitem id="fourbar" label="Four" accesskey="F" command="cmd_four"/>
- </menupopup>
- </menu>
-</menubar>
-
-<body xmlns="http://www.w3.org/1999/xhtml"><p id="display"/></body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_menulist.xul b/toolkit/content/tests/chrome/test_menulist.xul
deleted file mode 100644
index 4e3817d89c..0000000000
--- a/toolkit/content/tests/chrome/test_menulist.xul
+++ /dev/null
@@ -1,314 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Menulist Tests"
- onload="setTimeout(testtag_menulists, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
- <script type="application/javascript" src="xul_selectcontrol.js"></script>
-
-<vbox id="scroller" style="overflow: auto" height="60">
- <menulist id="menulist" onpopupshown="test_menulist_open(this, this.parentNode)"
- onpopuphidden="$('menulist-in-listbox').open = true;">
- <menupopup id="menulist-popup"/>
- </menulist>
- <button label="Two"/>
- <button label="Three"/>
-</vbox>
-<listbox id="scroller-in-listbox" style="overflow: auto" height="60">
- <listitem allowevents="true">
- <menulist id="menulist-in-listbox" onpopupshown="test_menulist_open(this, this.parentNode.parentNode)"
- onpopuphidden="SimpleTest.executeSoon(checkScrollAndFinish)">
- <menupopup id="menulist-in-listbox-popup">
- <menuitem label="One" value="one"/>
- <menuitem label="Two" value="two"/>
- </menupopup>
- </menulist>
- </listitem>
- <listitem label="Two"/>
- <listitem label="Three"/>
- <listitem label="Four"/>
- <listitem label="Five"/>
- <listitem label="Six"/>
-</listbox>
-
-<hbox>
- <menulist id="menulist-size">
- <menupopup>
- <menuitem label="Menuitem Label" width="200"/>
- </menupopup>
- </menulist>
-</hbox>
-
-<menulist id="menulist-editable" editable="true">
- <menupopup id="menulist-popup-editable"/>
-</menulist>
-
-<menulist id="menulist-initwithvalue" value="two">
- <menupopup>
- <menuitem label="One" value="one"/>
- <menuitem label="Two" value="two"/>
- <menuitem label="Three" value="three"/>
- </menupopup>
-</menulist>
-<menulist id="menulist-initwithselected" value="two">
- <menupopup>
- <menuitem label="One" value="one"/>
- <menuitem label="Two" value="two"/>
- <menuitem label="Three" value="three" selected="true"/>
- </menupopup>
-</menulist>
-<menulist id="menulist-editable-initwithvalue" editable="true" value="Two">
- <menupopup>
- <menuitem label="One" value="one"/>
- <menuitem label="Two" value="two"/>
- <menuitem label="Three" value="three"/>
- </menupopup>
-</menulist>
-<menulist id="menulist-editable-initwithselected" editable="true" value="two">
- <menupopup>
- <menuitem label="One" value="one"/>
- <menuitem label="Two" value="two"/>
- <menuitem label="Three" value="three" selected="true"/>
- </menupopup>
-</menulist>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-function testtag_menulists()
-{
- testtag_menulist_UI_start($("menulist"), false);
-}
-
-function testtag_menulist_UI_start(element, editable)
-{
- var testprefix = editable ? "editable" : "";
-
- // check the menupopup property
- var popup = element.menupopup;
- ok(popup && popup.localName == "menupopup" &&
- popup.parentNode == element, testprefix + " menupopup");
-
- // test the interfaces that menulist implements
- test_nsIDOMXULMenuListElement(element, testprefix, editable);
-}
-
-function testtag_menulist_UI_finish(element, editable)
-{
- element.value = "";
-
- test_nsIDOMXULSelectControlElement(element, "menuitem",
- editable ? "editable" : null);
-
- if (!editable) {
- testtag_menulist_UI_start($("menulist-editable"), true);
- }
- else {
- // bug 566154, the menulist width should account for vertical scrollbar
- ok(document.getElementById("menulist-size").getBoundingClientRect().width >= 210,
- "menulist popup width includes scrollbar width");
-
- $("menulist").open = true;
- }
-}
-
-function test_nsIDOMXULMenuListElement(element, testprefix, editable)
-{
- is(element.open, false, testprefix + " open");
- is(element.editable, editable, testprefix + " editable");
-
- if (editable) {
- var inputField = element.inputField;
- is(inputField &&
- inputField instanceof Components.interfaces.nsIDOMHTMLInputElement,
- true, testprefix + " inputField");
-
- // check if the select method works
- inputField.select();
- is(inputField.selectionStart, 0, testprefix + " empty select selectionStart");
- is(inputField.selectionEnd, 0, testprefix + " empty select selectionEnd");
-
- element.value = "Some Text";
- inputField.select();
- is(inputField.selectionStart, 0, testprefix + " empty select selectionStart");
- is(inputField.selectionEnd, 9, testprefix + " empty select selectionEnd");
- }
- else {
- is(element.inputField, null , testprefix + " inputField");
- }
-
- element.appendItem("Item One", "one");
- var seconditem = element.appendItem("Item Two", "two");
- var thirditem = element.appendItem("Item Three", "three");
- element.appendItem("Item Four", "four");
-
- seconditem.image = "happy.png";
- seconditem.setAttribute("description", "This is the second description");
- thirditem.image = "happy.png";
- thirditem.setAttribute("description", "This is the third description");
-
- // check the image and description properties
- // editable menulists don't use the image or description properties currently
- if (editable) {
- element.selectedIndex = 1;
- is(element.image, "", testprefix + " image set to selected");
- is(element.description, "", testprefix + " description set to selected");
- test_nsIDOMXULMenuListElement_finish(element, testprefix, editable);
- }
- else {
- element.selectedIndex = 1;
- is(element.image, "happy.png", testprefix + " image set to selected");
- is(element.description, "This is the second description", testprefix + " description set to selected");
- element.selectedIndex = -1;
- is(element.image, "", testprefix + " image set when none selected");
- is(element.description, "", testprefix + " description set when none selected");
- element.selectedIndex = 2;
- is(element.image, "happy.png", testprefix + " image set to selected again");
- is(element.description, "This is the third description", testprefix + " description set to selected again");
-
- // check that changing the properties of the selected item changes the menulist's properties
- let properties = [{attr: "label", value: "Item Number Three"},
- {attr: "value", value: "item-three"},
- {attr: "image", value: "smile.png"},
- {attr: "description", value: "Changed description"}];
- test_nsIDOMXULMenuListElement_properties(element, testprefix, editable, thirditem, properties);
- }
-}
-
-function test_nsIDOMXULMenuListElement_properties(element, testprefix, editable, thirditem, properties)
-{
- let {attr, value} = properties.shift();
- let last = (properties.length == 0);
-
- let mutObserver = new MutationObserver(() => {
- is(element.getAttribute(attr), value, `${testprefix} ${attr} modified`);
- done();
- });
- mutObserver.observe(element, { attributeFilter: [attr] });
-
- let failureTimeout = setTimeout(() => {
- ok(false, `${testprefix} ${attr} should have updated`);
- done();
- }, 2000);
-
- function done()
- {
- clearTimeout(failureTimeout);
- mutObserver.disconnect();
- if (!last) {
- test_nsIDOMXULMenuListElement_properties(element, testprefix, editable, thirditem, properties);
- }
- else {
- test_nsIDOMXULMenuListElement_unselected(element, testprefix, editable, thirditem);
- }
- }
-
- thirditem.setAttribute(attr, value)
-}
-
-function test_nsIDOMXULMenuListElement_unselected(element, testprefix, editable, thirditem)
-{
- let seconditem = thirditem.previousElementSibling;
- seconditem.label = "Changed Label 2";
- is(element.label, "Item Number Three", testprefix + " label of another item modified");
-
- element.selectedIndex = 0;
- is(element.image, "", testprefix + " image set to selected with no image");
- is(element.description, "", testprefix + " description set to selected with no description");
- test_nsIDOMXULMenuListElement_finish(element, testprefix, editable);
-}
-
-function test_nsIDOMXULMenuListElement_finish(element, testprefix, editable)
-{
- // check the removeAllItems method
- element.appendItem("An Item", "anitem");
- element.appendItem("Another Item", "anotheritem");
- element.removeAllItems();
- is(element.itemCount, 0, testprefix + " removeAllItems");
-
- testtag_menulist_UI_finish(element, editable);
-}
-
-function test_menulist_open(element, scroller)
-{
- element.appendItem("Scroll Item 1", "scrollitem1");
- element.appendItem("Scroll Item 2", "scrollitem2");
- element.focus();
- element.selectedIndex = 0;
-
-/*
- // bug 530504, mousewheel while menulist is open should not scroll menulist
- // items or parent
- var scrolled = false;
- var mouseScrolled = function (event) { scrolled = true; }
- window.addEventListener("DOMMouseScroll", mouseScrolled, false);
- synthesizeWheel(element, 2, 2, { deltaY: 10,
- deltaMode: WheelEvent.DOM_DELTA_LINE });
- is(scrolled, true, "mousescroll " + element.id);
- is(scroller.scrollTop, 0, "scroll position on mousescroll " + element.id);
- window.removeEventListener("DOMMouseScroll", mouseScrolled, false);
-*/
-
- // bug 543065, hovering the mouse over an item should highlight it, not
- // scroll the parent, and not change the selected index.
- var item = element.menupopup.childNodes[1];
-
- synthesizeMouse(element.menupopup.childNodes[1], 2, 2, { type: "mousemove" });
- synthesizeMouse(element.menupopup.childNodes[1], 6, 6, { type: "mousemove" });
- is(element.menuBoxObject.activeChild, item, "activeChild after menu highlight " + element.id);
- is(element.selectedIndex, 0, "selectedIndex after menu highlight " + element.id);
- is(scroller.scrollTop, 0, "scroll position after menu highlight " + element.id);
-
- element.open = false;
-}
-
-function checkScrollAndFinish()
-{
- is($("scroller").scrollTop, 0, "mousewheel on menulist does not scroll vbox parent");
- is($("scroller-in-listbox").scrollTop, 0, "mousewheel on menulist does not scroll listbox parent");
-
- // bug 561243, outline causes the mouse click to be targeted incorrectly
- var editableMenulist = $("menulist-editable");
- editableMenulist.className = "outlined";
-
- synthesizeMouse(editableMenulist.inputField, 25, 8, { type: "mousedown" });
- synthesizeMouse(editableMenulist.inputField, 25, 8, { type: "mouseup" });
- isnot(editableMenulist.inputField.selectionStart, editableMenulist.inputField.textLength,
- "mouse event on editable menulist with outline caret position");
-
- let menulist = $("menulist-size");
- menulist.addEventListener("popupshown", function testAltClose() {
- menulist.removeEventListener("popupshown", testAltClose);
-
- sendKey("ALT");
- is(menulist.menupopup.state, "open", "alt doesn't close menulist");
- menulist.open = false;
-
- SimpleTest.finish();
- });
-
- menulist.open = true;
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<style>
-.outlined > .menulist-editable-box { outline: 1px solid black; }
-</style>
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_menulist_keynav.xul b/toolkit/content/tests/chrome/test_menulist_keynav.xul
deleted file mode 100644
index c2e404c09a..0000000000
--- a/toolkit/content/tests/chrome/test_menulist_keynav.xul
+++ /dev/null
@@ -1,272 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Menulist Key Navigation Tests"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<button id="button1" label="One"/>
-<menulist id="list">
- <menupopup id="popup" onpopupshowing="return gShowPopup;">
- <menuitem id="i1" label="One"/>
- <menuitem id="i2" label="Two"/>
- <menuitem id="i2b" disabled="true" label="Two and a Half"/>
- <menuitem id="i3" label="Three"/>
- <menuitem id="i4" label="Four"/>
- </menupopup>
-</menulist>
-<button id="button2" label="Two"/>
-<menulist id="list2">
- <menupopup id="popup" onpopupshown="checkCursorNavigation();">
- <menuitem id="b1" label="One"/>
- <menuitem id="b2" label="Two" selected="true"/>
- <menuitem id="b3" label="Three"/>
- <menuitem id="b4" label="Four"/>
- </menupopup>
-</menulist>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-var gShowPopup = false;
-var gModifiers = 0;
-var gOpenPhase = false;
-
-var list = $("list");
-let expectCommandEvent;
-
-var iswin = (navigator.platform.indexOf("Win") == 0);
-var ismac = (navigator.platform.indexOf("Mac") == 0);
-
-function runTests()
-{
- list.focus();
-
- // on Mac, up and cursor keys open the menu, but on other platforms, the
- // cursor keys navigate between items without opening the menu
- if (navigator.platform.indexOf("Mac") == -1) {
- expectCommandEvent = true;
- keyCheck(list, "VK_DOWN", 2, "cursor down");
- keyCheck(list, "VK_DOWN", 3, "cursor down skip disabled");
- keyCheck(list, "VK_UP", 2, "cursor up skip disabled");
- keyCheck(list, "VK_UP", 1, "cursor up");
- keyCheck(list, "VK_UP", 4, "cursor up wrap");
- keyCheck(list, "VK_DOWN", 1, "cursor down wrap");
- }
-
- // check that attempting to open the menulist does not change the selection
- synthesizeKey("VK_DOWN", { altKey: navigator.platform.indexOf("Mac") == -1 });
- is(list.selectedItem, $("i1"), "open menulist down selectedItem");
- synthesizeKey("VK_UP", { altKey: navigator.platform.indexOf("Mac") == -1 });
- is(list.selectedItem, $("i1"), "open menulist up selectedItem");
-
- list.selectedItem = $("i1");
-
- pressLetter();
-}
-
-function pressLetter()
-{
- // A command event should be fired only if the menulist is closed, or on Windows,
- // where items are selected immediately.
- expectCommandEvent = !gOpenPhase || iswin;
-
- synthesizeKey("G", { });
- is(list.selectedItem, $("i1"), "letter pressed not found selectedItem");
-
- keyCheck(list, "T", 2, "letter pressed");
-
- if (!gOpenPhase) {
- SpecialPowers.setIntPref("ui.menu.incremental_search.timeout", 0); // prevent to timeout
- keyCheck(list, "T", 2, "same letter pressed");
- SpecialPowers.clearUserPref("ui.menu.incremental_search.timeout");
- }
-
- setTimeout(pressedAgain, 1200);
-}
-
-function pressedAgain()
-{
- keyCheck(list, "T", 3, "letter pressed again");
- SpecialPowers.setIntPref("ui.menu.incremental_search.timeout", 0); // prevent to timeout
- keyCheck(list, "W", 2, "second letter pressed");
- SpecialPowers.clearUserPref("ui.menu.incremental_search.timeout");
- setTimeout(differentPressed, 1200);
-}
-
-function differentPressed()
-{
- keyCheck(list, "O", 1, "different letter pressed");
-
- if (gOpenPhase) {
- list.open = false;
- tabAndScroll();
- }
- else {
- // Run the letter tests again with the popup open
- info("list open phase");
-
- list.selectedItem = $("i1");
-
- // Hide and show the list to avoid using any existing incremental key state.
- list.hidden = true;
- list.clientWidth;
- list.hidden = false;
-
- gShowPopup = true;
- gOpenPhase = true;
-
- list.addEventListener("popupshown", function popupShownListener() {
- list.removeEventListener("popupshown", popupShownListener, false);
- pressLetter();
- }, false);
-
- list.open = true;
- }
-}
-
-function tabAndScroll()
-{
- list = $("list");
-
- if (navigator.platform.indexOf("Mac") == -1) {
- $("button1").focus();
- synthesizeKeyExpectEvent("VK_TAB", { }, list, "focus", "focus to menulist");
- synthesizeKeyExpectEvent("VK_TAB", { }, $("button2"), "focus", "focus to button");
- is(document.activeElement, $("button2"), "tab from menulist focused button");
- }
-
- // now make sure that using a key scrolls the menu correctly
-
- for (let i = 0; i < 65; i++) {
- list.appendItem("Item" + i, "item" + i);
- }
- list.open = true;
- is(list.getBoundingClientRect().width, list.firstChild.getBoundingClientRect().width,
- "menu and popup width match");
- var minScrollbarWidth = window.matchMedia("(-moz-overlay-scrollbars)").matches ? 0 : 3;
- ok(list.getBoundingClientRect().width >= list.getItemAtIndex(0).getBoundingClientRect().width + minScrollbarWidth,
- "menuitem width accounts for scrollbar");
- list.open = false;
-
- list.menupopup.maxHeight = 100;
- list.open = true;
-
- var rowdiff = list.getItemAtIndex(1).getBoundingClientRect().top -
- list.getItemAtIndex(0).getBoundingClientRect().top;
-
- var item = list.getItemAtIndex(10);
- var originalPosition = item.getBoundingClientRect().top;
-
- list.menuBoxObject.activeChild = item;
- ok(item.getBoundingClientRect().top < originalPosition,
- "position of item 1: " + item.getBoundingClientRect().top + " -> " + originalPosition);
-
- originalPosition = item.getBoundingClientRect().top;
-
- synthesizeKey("VK_DOWN", { });
- is(item.getBoundingClientRect().top, originalPosition - rowdiff, "position of item 10");
-
- list.open = false;
-
- checkEnter();
-}
-
-function keyCheck(list, key, index, testname)
-{
- var item = $("i" + index);
- synthesizeKeyExpectEvent(key, { }, item, expectCommandEvent ? "command" : "!command", testname);
- is(list.selectedItem, expectCommandEvent ? item : $("i1"), testname + " selectedItem");
-}
-
-function checkModifiers(event)
-{
- var expectedModifiers = (gModifiers == 1);
- is(event.shiftKey, expectedModifiers, "shift key pressed");
- is(event.ctrlKey, expectedModifiers, "ctrl key pressed");
- is(event.altKey, expectedModifiers, "alt key pressed");
- is(event.metaKey, expectedModifiers, "meta key pressed");
- gModifiers++;
-}
-
-function checkEnter()
-{
- list.addEventListener("popuphidden", checkEnterWithModifiers, false);
- list.addEventListener("command", checkModifiers, false);
- list.open = true;
- synthesizeKey("VK_RETURN", { });
-}
-
-function checkEnterWithModifiers()
-{
- is(gModifiers, 1, "modifiers checked when not set");
-
- ok(!list.open, "list closed on enter press");
- list.removeEventListener("popuphidden", checkEnterWithModifiers, false);
-
- list.addEventListener("popuphidden", verifyPopupOnClose, false);
- list.open = true;
-
- synthesizeKey("VK_RETURN", { shiftKey: true, ctrlKey: true, altKey: true, metaKey: true });
-}
-
-function verifyPopupOnClose()
-{
- is(gModifiers, 2, "modifiers checked when set");
-
- ok(!list.open, "list closed on enter press with modifiers");
- list.removeEventListener("popuphidden", verifyPopupOnClose, false);
-
- list = $("list2");
- list.focus();
- list.open = true;
-}
-
-function checkCursorNavigation()
-{
- var commandEventsCount = 0;
- list.addEventListener("command", event => {
- is(event.target, list.selectedItem, "command event fired on selected item");
- commandEventsCount++;
- }, false);
-
- is(list.selectedIndex, 1, "selectedIndex before cursor down");
- synthesizeKey("VK_DOWN", { });
- is(list.selectedIndex, iswin ? 2 : 1, "selectedIndex after cursor down");
- is(commandEventsCount, iswin ? 1 : 0, "selectedIndex after cursor down command event");
- is(list.menupopup.state, "open", "cursor down popup state");
- synthesizeKey("VK_PAGE_DOWN", { });
- is(list.selectedIndex, iswin ? 3 : 1, "selectedIndex after page down");
- is(commandEventsCount, iswin ? 2 : 0, "selectedIndex after page down command event");
- is(list.menupopup.state, "open", "page down popup state");
-
- synthesizeKey("VK_UP", { altKey: true });
- is(list.open, ismac, "alt+up closes popup");
-
- if (ismac) {
- list.open = false;
- }
-
- SimpleTest.finish();
-}
-
-SimpleTest.waitForFocus(runTests);
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_menulist_null_value.xul b/toolkit/content/tests/chrome/test_menulist_null_value.xul
deleted file mode 100644
index 2545b6cdec..0000000000
--- a/toolkit/content/tests/chrome/test_menulist_null_value.xul
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Menulist value property"
- onload="setTimeout(runTests, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<menulist id="list">
- <menupopup>
- <menuitem id="i0" label="Zero" value="0"/>
- <menuitem id="i1" label="One" value="item1"/>
- <menuitem id="i2" label="Two" value="item2"/>
- <menuitem id="ifalse" label="False" value="false"/>
- <menuitem id="iempty" label="Empty" value=""/>
- </menupopup>
-</menulist>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-function runTests()
-{
- var list = document.getElementById("list");
-
- list.value = "item2";
- is(list.value, "item2", "Check list value after setting value");
- is(list.getAttribute("label"), "Two", "Check list label after setting value");
-
- list.selectedItem = null;
- is(list.value, "", "Check list value after setting selectedItem to null");
- is(list.getAttribute("label"), "", "Check list label after setting selectedItem to null");
-
- // select something again to make sure the label is not already empty
- list.selectedIndex = 1;
- is(list.value, "item1", "Check list value after setting selectedIndex");
- is(list.getAttribute("label"), "One", "Check list label after setting selectedIndex");
-
- // check that an item can have the "false" value
- list.value = false;
- is(list.value, "false", "Check list value after setting it to false");
- is(list.getAttribute("label"), "False", "Check list labem after setting value to false");
-
- // check that an item can have the "0" value
- list.value = 0;
- is(list.value, "0", "Check list value after setting it to 0");
- is(list.getAttribute("label"), "Zero", "Check list label after setting value to 0");
-
- // check that an item can have the empty string value.
- list.value = "";
- is(list.value, "", "Check list value after setting it to an empty string");
- is(list.getAttribute("label"), "Empty", "Check list label after setting value to an empty string");
-
- // select something again to make sure the label is not already empty
- list.selectedIndex = 1;
- // set the value to null and test it (bug 408940)
- list.value = null;
- is(list.value, "", "Check list value after setting value to null");
- is(list.getAttribute("label"), "", "Check list label after setting value to null");
-
- // select something again to make sure the label is not already empty
- list.selectedIndex = 1;
- // set the value to undefined and test it (bug 408940)
- list.value = undefined;
- is(list.value, "", "Check list value after setting value to undefined");
- is(list.getAttribute("label"), "", "Check list label after setting value to undefined");
-
- // select something again to make sure the label is not already empty
- list.selectedIndex = 1;
- // set the value to something that does not exist in any menuitem of the list
- // and make sure the previous label is removed
- list.value = "this does not exist";
- is(list.value, "this does not exist", "Check the list value after setting it to something not associated witn an existing menuitem");
- is(list.getAttribute("label"), "", "Check that the list label is empty after selecting a nonexistent item");
-
- SimpleTest.finish();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_menulist_paging.xul b/toolkit/content/tests/chrome/test_menulist_paging.xul
deleted file mode 100644
index c58e0328f1..0000000000
--- a/toolkit/content/tests/chrome/test_menulist_paging.xul
+++ /dev/null
@@ -1,163 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Menulist Tests"
- onload="setTimeout(startTest, 0);"
- onpopupshown="menulistShown()" onpopuphidden="runTest()"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<menulist id="menulist1">
- <menupopup id="menulist-popup1">
- <menuitem label="One"/>
- <menuitem label="Two"/>
- <menuitem label="Three"/>
- <menuitem label="Four"/>
- <menuitem label="Five"/>
- <menuitem label="Six"/>
- <menuitem label="Seven"/>
- <menuitem label="Eight"/>
- <menuitem label="Nine"/>
- <menuitem label="Ten"/>
- </menupopup>
-</menulist>
-
-<menulist id="menulist2">
- <menupopup id="menulist-popup2">
- <menuitem label="One" disabled="true"/>
- <menuitem label="Two" selected="true"/>
- <menuitem label="Three"/>
- <menuitem label="Four"/>
- <menuitem label="Five"/>
- <menuitem label="Six"/>
- <menuitem label="Seven"/>
- <menuitem label="Eight"/>
- <menuitem label="Nine"/>
- <menuitem label="Ten" disabled="true"/>
- </menupopup>
-</menulist>
-
-<menulist id="menulist3">
- <menupopup id="menulist-popup3">
- <label value="One"/>
- <menuitem label="Two" selected="true"/>
- <menuitem label="Three"/>
- <menuitem label="Four"/>
- <menuitem label="Five" disabled="true"/>
- <menuitem label="Six" disabled="true"/>
- <menuitem label="Seven"/>
- <menuitem label="Eight"/>
- <menuitem label="Nine"/>
- <label value="Ten"/>
- </menupopup>
-</menulist>
-
-<menulist id="menulist4">
- <menupopup id="menulist-popup4">
- <label value="One"/>
- <menuitem label="Two"/>
- <menuitem label="Three"/>
- <menuitem label="Four"/>
- <menuitem label="Five"/>
- <menuitem label="Six" selected="true"/>
- <menuitem label="Seven"/>
- <menuitem label="Eight"/>
- <menuitem label="Nine"/>
- <label value="Ten"/>
- </menupopup>
-</menulist>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-let test;
-
-// Fields:
-// list - menulist id
-// initial - initial selected index
-// scroll - index of item at top of the visible scrolled area, -1 to skip this test
-// downs - array of indicies that will be selected when pressing down in sequence
-// ups - array of indicies that will be selected when pressing up in sequence
-let tests = [
- { list: "menulist1", initial: 0, scroll: 0, downs: [3, 6, 9, 9],
- ups: [6, 3, 0, 0] },
- { list: "menulist2", initial: 1, scroll: 0, downs: [4, 7, 8, 8],
- ups: [5, 2, 1] },
- { list: "menulist3", initial: 1, scroll: -1, downs: [6, 8, 8],
- ups: [3, 1, 1] },
- { list: "menulist4", initial: 5, scroll: 2, downs: [], ups: [] }
-];
-
-function startTest()
-{
- let popup = document.getElementById("menulist-popup1");
- let menupopupHeight = popup.getBoundingClientRect().height;
- let menuitemHeight = popup.firstChild.getBoundingClientRect().height;
-
- // First, set the height of each popup to the height of four menuitems plus
- // any padding and border on the menupopup.
- let height = menuitemHeight * 4 + (menupopupHeight - menuitemHeight * 10);
- popup.height = height;
- document.getElementById("menulist-popup2").height = height;
- document.getElementById("menulist-popup3").height = height;
- document.getElementById("menulist-popup4").height = height;
-
- runTest();
-}
-
-function runTest()
-{
- if (!tests.length) {
- SimpleTest.finish();
- return;
- }
-
- test = tests.shift();
- document.getElementById(test.list).open = true;
-}
-
-function menulistShown()
-{
- let menulist = document.getElementById(test.list);
- is(menulist.menuBoxObject.activeChild.label, menulist.getItemAtIndex(test.initial).label, test.list + " initial selection");
-
- let cs = window.getComputedStyle(menulist.menupopup);
- let bpTop = parseFloat(cs.paddingTop) + parseFloat(cs.borderTopWidth);
-
- // Skip menulist3 as it has a label that scrolling doesn't need normally deal with.
- if (test.scroll >= 0) {
- is(menulist.menupopup.childNodes[test.scroll].getBoundingClientRect().top,
- menulist.menupopup.getBoundingClientRect().top + bpTop,
- "Popup scroll at correct position");
- }
-
- for (let i = 0; i < test.downs.length; i++) {
- sendKey("PAGE_DOWN");
- is(menulist.menuBoxObject.activeChild.label, menulist.getItemAtIndex(test.downs[i]).label, test.list + " page down " + i);
- }
-
- for (let i = 0; i < test.ups.length; i++) {
- sendKey("PAGE_UP");
- is(menulist.menuBoxObject.activeChild.label, menulist.getItemAtIndex(test.ups[i]).label, test.list + " page up " + i);
- }
-
- menulist.open = false;
-}
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_menulist_position.xul b/toolkit/content/tests/chrome/test_menulist_position.xul
deleted file mode 100644
index a146cb85ef..0000000000
--- a/toolkit/content/tests/chrome/test_menulist_position.xul
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Menulist position Test"
- onload="setTimeout(init, 0)"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<!--
- This test checks the position of a menulist's popup.
- -->
-
-<script>
-<![CDATA[
-SimpleTest.waitForExplicitFinish();
-
-var menulist;
-
-function init()
-{
- menulist = document.getElementById("menulist");
- menulist.open = true;
-}
-
-function isWithinHalfPixel(a, b)
-{
- return Math.abs(a - b) <= 0.5;
-}
-
-function popupShown()
-{
- var menurect = menulist.getBoundingClientRect();
- var popuprect = menulist.menupopup.getBoundingClientRect();
-
- let marginLeft = parseFloat(getComputedStyle(menulist.menupopup).marginLeft);
- ok(isWithinHalfPixel(menurect.left + marginLeft, popuprect.left), "left position");
- ok(isWithinHalfPixel(menurect.right + marginLeft, popuprect.right), "right position");
-
- let index = menulist.selectedIndex;
- if (menulist.selectedItem && navigator.platform.indexOf("Mac") >= 0) {
- let menulistlabel = document.getAnonymousElementByAttribute(menulist, "class", "menulist-label");
- let mitemlabel = document.getAnonymousElementByAttribute(menulist.selectedItem, "class", "menu-iconic-text");
-
- ok(isWithinHalfPixel(menulistlabel.getBoundingClientRect().left,
- mitemlabel.getBoundingClientRect().left),
- "Labels horizontally aligned for index " + index);
- ok(isWithinHalfPixel(menulistlabel.getBoundingClientRect().top,
- mitemlabel.getBoundingClientRect().top),
- "Labels vertically aligned for index " + index);
- }
- else {
- let marginTop = parseFloat(getComputedStyle(menulist.menupopup).marginTop);
- ok(isWithinHalfPixel(menurect.bottom + marginTop, popuprect.top),
- "Vertical alignment with no selection for index " + index);
- }
-
- menulist.open = false;
-}
-
-function popupHidden()
-{
- if (!menulist.selectedItem) {
- SimpleTest.finish();
- }
- else {
- menulist.selectedItem = menulist.selectedItem.nextSibling;
- menulist.open = true;
- }
-}
-]]>
-</script>
-
-<hbox align="center" pack="center" style="margin-top: 100px;">
- <menulist id="menulist" onpopupshown="popupShown();" onpopuphidden="popupHidden();">
- <menupopup>
- <menuitem label="One"/>
- <menuitem label="Two"/>
- <menuitem label="Three"/>
- <menuitem label="Four"/>
- <menuitem label="Five"/>
- </menupopup>
- </menulist>
-</hbox>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_mousescroll.xul b/toolkit/content/tests/chrome/test_mousescroll.xul
deleted file mode 100644
index 91ccf56831..0000000000
--- a/toolkit/content/tests/chrome/test_mousescroll.xul
+++ /dev/null
@@ -1,274 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=378028
--->
-<window title="Mozilla Bug 378028"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/paint_listener.js"/>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml">
- <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=378028"
- target="_blank">Mozilla Bug 378028</a>
- </body>
-
- <!-- richlistbox currently has no way of giving us a defined number of
- rows, so we just choose an arbitrary height limit that should give
- us plenty of vertical scrollability -->
- <richlistbox id="richlistbox" style="height:50px;">
- <richlistitem id="richlistbox_item0" hidden="true"><label value="Item 0"/></richlistitem>
- <richlistitem id="richlistbox_item1"><label value="Item 1"/></richlistitem>
- <richlistitem id="richlistbox_item2"><label value="Item 2"/></richlistitem>
- <richlistitem id="richlistbox_item3"><label value="Item 3"/></richlistitem>
- <richlistitem id="richlistbox_item4"><label value="Item 4"/></richlistitem>
- <richlistitem id="richlistbox_item5"><label value="Item 5"/></richlistitem>
- <richlistitem id="richlistbox_item6"><label value="Item 6"/></richlistitem>
- <richlistitem id="richlistbox_item7"><label value="Item 7"/></richlistitem>
- <richlistitem id="richlistbox_item8"><label value="Item 8"/></richlistitem>
- </richlistbox>
-
- <listbox id="listbox" rows="2">
- <listitem id="listbox_item0" label="Item 0" hidden="true"/>
- <listitem id="listbox_item1" label="Item 1"/>
- <listitem id="listbox_item2" label="Item 2"/>
- <listitem id="listbox_item3" label="Item 3"/>
- <listitem id="listbox_item4" label="Item 4"/>
- <listitem id="listbox_item5" label="Item 5"/>
- <listitem id="listbox_item6" label="Item 6"/>
- <listitem id="listbox_item7" label="Item 7"/>
- <listitem id="listbox_item8" label="Item 8"/>
- </listbox>
-
- <box orient="horizontal">
- <arrowscrollbox id="hscrollbox" clicktoscroll="true" orient="horizontal"
- smoothscroll="false" style="max-width:80px;" flex="1">
- <hbox style="width:40px; height:20px; background:black;" hidden="true"/>
- <hbox style="width:40px; height:20px; background:white;"/>
- <hbox style="width:40px; height:20px; background:black;"/>
- <hbox style="width:40px; height:20px; background:white;"/>
- <hbox style="width:40px; height:20px; background:black;"/>
- <hbox style="width:40px; height:20px; background:white;"/>
- <hbox style="width:40px; height:20px; background:black;"/>
- <hbox style="width:40px; height:20px; background:white;"/>
- <hbox style="width:40px; height:20px; background:black;"/>
- </arrowscrollbox>
- </box>
-
- <arrowscrollbox id="vscrollbox" clicktoscroll="true" orient="vertical"
- smoothscroll="false" style="max-height:80px;" flex="1">
- <vbox style="width:100px; height:40px; background:black;" hidden="true"/>
- <vbox style="width:100px; height:40px; background:white;"/>
- <vbox style="width:100px; height:40px; background:black;"/>
- <vbox style="width:100px; height:40px; background:white;"/>
- <vbox style="width:100px; height:40px; background:black;"/>
- <vbox style="width:100px; height:40px; background:white;"/>
- <vbox style="width:100px; height:40px; background:black;"/>
- <vbox style="width:100px; height:40px; background:white;"/>
- <vbox style="width:100px; height:40px; background:black;"/>
- <vbox style="width:100px; height:40px; background:white;"/>
- <vbox style="width:100px; height:40px; background:black;"/>
- </arrowscrollbox>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
-/** Test for Bug 378028 **/
-/* and for Bug 350471 **/
-var smoothScrollPref = "general.smoothScroll";
-SpecialPowers.setBoolPref(smoothScrollPref, false);
-SimpleTest.waitForExplicitFinish();
-
-const deltaModes = [
- WheelEvent.DOM_DELTA_PIXEL, // 0
- WheelEvent.DOM_DELTA_LINE, // 1
- WheelEvent.DOM_DELTA_PAGE // 2
-];
-
-function testListbox(id)
-{
- var listbox = document.getElementById(id);
-
- function helper(aStart, aDelta, aIntDelta, aDeltaMode)
- {
- listbox.scrollToIndex(aStart);
- synthesizeWheel(listbox, 10, 10,
- { deltaMode: aDeltaMode, deltaY: aDelta,
- lineOrPageDeltaY: aIntDelta });
- var expectedPos = aStart;
- if (aIntDelta) {
- if (aDeltaMode == WheelEvent.DOM_DELTA_PAGE) {
- expectedPos += aIntDelta > 0 ? listbox.getNumberOfVisibleRows() :
- -listbox.getNumberOfVisibleRows();
- } else {
- expectedPos += aIntDelta;
- }
- }
- is(listbox.getIndexOfFirstVisibleRow(), expectedPos,
- "testListbox(" + id + "): vertical, starting " + aStart +
- " delta " + aDelta + " lineOrPageDelta " + aIntDelta +
- " aDeltaMode " + aDeltaMode);
-
- // Check that horizontal scrolling has no effect
- listbox.scrollToIndex(aStart);
- synthesizeWheel(listbox, 10, 10,
- { deltaMode: aDeltaMode, deltaX: aDelta,
- lineOrPageDeltaX: aIntDelta });
- is(listbox.getIndexOfFirstVisibleRow(), aStart,
- "testListbox(" + id + "): horizontal, starting " + aStart +
- " delta " + aDelta + " lineOrPageDelta " + aIntDelta +
- " aDeltaMode " + aDeltaMode);
- }
- deltaModes.forEach(function(aDeltaMode) {
- let delta = (aDeltaMode == WheelEvent.DOM_DELTA_PIXEL) ? 5.0 : 0.3;
- helper(5, -delta, 0, aDeltaMode);
- helper(5, -delta, -1, aDeltaMode);
- helper(5, delta, 1, aDeltaMode);
- helper(5, delta, 0, aDeltaMode);
- });
-}
-
-function testRichListbox(id, andThen)
-{
- var listbox = document.getElementById(id);
- var tests = [];
-
- var winUtils = SpecialPowers.getDOMWindowUtils(window);
- winUtils.advanceTimeAndRefresh(100);
-
- function nextTest() {
- var [aStart, aDelta, aIntDelta, aDeltaMode] = tests.shift();
- listbox.scrollToIndex(aStart);
-
- let event = {
- deltaMode: aDeltaMode,
- deltaY: aDelta,
- lineOrPageDeltaY: aIntDelta
- };
- sendWheelAndPaint(listbox, 10, 10, event, function() {
- var change = listbox.getIndexOfFirstVisibleRow() - aStart;
- var direction = (change > 0) - (change < 0);
- var expected = (aDelta > 0) - (aDelta < 0);
- is(direction, expected,
- "testRichListbox(" + id + "): vertical, starting " + aStart +
- " delta " + aDelta + " lineOrPageDeltaY " + aIntDelta +
- " aDeltaMode " + aDeltaMode);
-
- // Check that horizontal scrolling has no effect
- let event = {
- deltaMode: aDeltaMode,
- deltaX: aDelta,
- lineOrPageDeltaX: aIntDelta
- };
-
- listbox.scrollToIndex(aStart);
- sendWheelAndPaint(listbox, 10, 10, event, function() {
- is(listbox.getIndexOfFirstVisibleRow(), aStart,
- "testRichListbox(" + id + "): horizontal, starting " + aStart +
- " delta " + aDelta + " lineOrPageDeltaX " + aIntDelta +
- " aDeltaMode " + aDeltaMode);
-
- if (!tests.length) {
- winUtils.restoreNormalRefresh();
- andThen();
- return;
- }
-
- nextTest();
- });
- });
- }
-
- // richlistbox currently uses native XUL scrolling, so the "line"
- // amounts don't necessarily correspond 1-to-1 with listbox items. So
- // we just check that scrolling up/down scrolls in the right direction.
- deltaModes.forEach(function(aDeltaMode) {
- let delta = (aDeltaMode == WheelEvent.DOM_DELTA_PIXEL) ? 32.0 : 2.0;
- tests.push([5, -delta, -1, aDeltaMode]);
- tests.push([5, -delta, 0, aDeltaMode]);
- tests.push([5, delta, 1, aDeltaMode]);
- tests.push([5, delta, 0, aDeltaMode]);
- });
-
- nextTest();
-}
-
-function testArrowScrollbox(id)
-{
- var scrollbox = document.getElementById(id);
- var scrollBoxObject = scrollbox.scrollBoxObject;
- var orient = scrollbox.getAttribute("orient");
-
- function helper(aStart, aDelta, aDeltaMode, aExpected)
- {
- var lineOrPageDelta = (aDeltaMode == WheelEvent.DOM_DELTA_PIXEL) ? aDelta / 10 : aDelta;
- var orientIsHorizontal = (orient == "horizontal");
-
- scrollBoxObject.scrollTo(aStart, aStart);
-
- for (var i = orientIsHorizontal ? 2 : 0; i >= 0; i--) {
- synthesizeWheel(scrollbox, 5, 5,
- { deltaMode: aDeltaMode, deltaY: aDelta,
- lineOrPageDeltaY: lineOrPageDelta });
-
- var pos = orientIsHorizontal ? scrollBoxObject.positionX :
- scrollBoxObject.positionY;
-
- // Note, vertical mouse scrolling is allowed to scroll horizontal
- // arrowscrollboxes, because many users have no horizontal mouse scroll
- // capability
- let expected = !i ? aExpected : aStart;
- is(pos, expected,
- "testArrowScrollbox(" + id + "): vertical, starting " + aStart +
- " delta " + aDelta + " lineOrPageDelta " + lineOrPageDelta +
- " aDeltaMode " + aDeltaMode);
- }
-
- scrollBoxObject.scrollTo(aStart, aStart);
- for (var i = orientIsHorizontal ? 2 : 0; i >= 0; i--) {
- synthesizeWheel(scrollbox, 5, 5,
- { deltaMode: aDeltaMode, deltaX: aDelta,
- lineOrPageDeltaX: lineOrPageDelta });
- // horizontal mouse scrolling is never allowed to scroll vertical
- // arrowscrollboxes
- var pos = orientIsHorizontal ? scrollBoxObject.positionX :
- scrollBoxObject.positionY;
- let expected = (!i && orientIsHorizontal) ? aExpected : aStart;
- is(pos, expected,
- "testArrowScrollbox(" + id + "): horizontal, starting " + aStart +
- " delta " + aDelta + " lineOrPageDelta " + lineOrPageDelta +
- " aDeltaMode " + aDeltaMode);
- }
- }
-
- var scrolledWidth = scrollBoxObject.scrolledWidth;
- var scrolledHeight = scrollBoxObject.scrolledHeight;
- var scrollMaxX = scrolledWidth - scrollBoxObject.width;
- var scrollMaxY = scrolledHeight - scrollBoxObject.height;
- var scrollMax = orient == "horizontal" ? scrollMaxX : scrollMaxY;
-
- deltaModes.forEach(function(aDeltaMode) {
- helper(50, -1000, aDeltaMode, 0);
- helper(50, 1000, aDeltaMode, scrollMax);
- helper(50, 0, aDeltaMode, 50);
- helper(50, 0, aDeltaMode, 50);
- });
-}
-
-function runTests()
-{
- testRichListbox("richlistbox", function() {
- testListbox("listbox");
- testArrowScrollbox("hscrollbox");
- testArrowScrollbox("vscrollbox");
- SpecialPowers.clearUserPref(smoothScrollPref);
- SimpleTest.finish();
- });
-}
-
-window.onload = function() { setTimeout(runTests, 0); };
- ]]></script>
-</window>
diff --git a/toolkit/content/tests/chrome/test_notificationbox.xul b/toolkit/content/tests/chrome/test_notificationbox.xul
deleted file mode 100644
index a99d0824e8..0000000000
--- a/toolkit/content/tests/chrome/test_notificationbox.xul
+++ /dev/null
@@ -1,522 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for notificationbox
- -->
-<window title="Notification Box" width="500" height="600"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <notificationbox id="nb"/>
- <menupopup id="menupopup" onpopupshown="this.hidePopup()" onpopuphidden="checkPopupClosed()">
- <menuitem label="One"/>
- </menupopup>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-SimpleTest.waitForExplicitFinish();
-
-var testtag_notificationbox_buttons = [
- {
- label: "Button 1",
- accesskey: "u",
- callback: testtag_notificationbox_buttonpressed,
- popup: "menupopup"
- }
-];
-
-var NSXUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
-
-function testtag_notificationbox_buttonpressed(event)
-{
-}
-
-function testtag_notificationbox(nb)
-{
- testtag_notificationbox_State(nb, "initial", null, 0);
-
- SimpleTest.is(nb.notificationsHidden, false, "initial notificationsHidden");
- SimpleTest.is(nb.removeAllNotifications(false), undefined, "initial removeAllNotifications");
- testtag_notificationbox_State(nb, "initial removeAllNotifications", null, 0);
- SimpleTest.is(nb.removeAllNotifications(true), undefined, "initial removeAllNotifications immediate");
- testtag_notificationbox_State(nb, "initial removeAllNotifications immediate", null, 0);
-
- runTimedTests(tests, -1, nb, null);
-}
-
-var notification_last_events = [];
-function notification_eventCallback(event)
-{
- notification_last_events.push({ actualEvent: event , item: this });
-}
-
-/**
- * For any notifications that have the notification_eventCallback on
- * them, we will have recorded instances of those callbacks firing
- * and stored them. This checks to see that the expected event types
- * are being fired in order, and targeting the right item.
- *
- * @param {Array<string>} expectedEvents
- * The list of event types, in order, that we expect to have been
- * fired on the item.
- * @param {<xul:notification>} ntf
- * The notification we expect the callback to have been fired from.
- * @param {string} testName
- * The name of the current test, for logging.
- */
-function testtag_notification_eventCallback(expectedEvents, ntf, testName)
-{
- for (let i = 0; i < expectedEvents; ++i) {
- let expected = expectedEvents[i];
- let { actualEvent, item } = notification_last_events[i];
- SimpleTest.is(actualEvent, expected, testName + ": event name");
- SimpleTest.is(item, ntf, testName + ": event item");
- }
- notification_last_events = [];
-}
-
-var tests =
-[
- {
- test: function(nb, ntf) {
- // append a new notification
- var ntf = nb.appendNotification("Notification", "note", "happy.png",
- nb.PRIORITY_INFO_LOW, testtag_notificationbox_buttons);
- SimpleTest.is(ntf && ntf.localName == "notification", true, "append notification");
- return ntf;
- },
- result: function(nb, ntf) {
- testtag_notificationbox_State(nb, "append", ntf, 1);
- testtag_notification_State(nb, ntf, "append", "Notification", "note",
- "happy.png", nb.PRIORITY_INFO_LOW);
-
- // check the getNotificationWithValue method
- var ntf_found = nb.getNotificationWithValue("note");
- SimpleTest.is(ntf, ntf_found, "getNotificationWithValue note");
-
- var none_found = nb.getNotificationWithValue("notenone");
- SimpleTest.is(none_found, null, "getNotificationWithValue null");
- return ntf;
- }
- },
- {
- test: function(nb, ntf) {
- // check that notifications can be removed properly
- nb.removeNotification(ntf);
- return ntf;
- },
- result: function(nb, ntf) {
- testtag_notificationbox_State(nb, "removeNotification", null, 0);
-
- // try removing the notification again to make sure an exception occurs
- var exh = false;
- try {
- nb.removeNotification(ntf);
- } catch (ex) { exh = true; }
- SimpleTest.is(exh, true, "removeNotification again");
- testtag_notificationbox_State(nb, "removeNotification again", null, 0);
-
- }
- },
- {
- test: function(nb, ntf) {
- // append a new notification, but now with an event callback
- var ntf = nb.appendNotification("Notification", "note", "happy.png",
- nb.PRIORITY_INFO_LOW,
- testtag_notificationbox_buttons,
- notification_eventCallback);
- SimpleTest.is(ntf && ntf.localName == "notification", true, "append notification with callback");
- return ntf;
- },
- result: function(nb, ntf) {
- testtag_notificationbox_State(nb, "append with callback", ntf, 1);
- return ntf;
- }
- },
- {
- test: function(nb, ntf) {
- nb.removeNotification(ntf);
- return ntf;
- },
- result: function(nb, ntf) {
- testtag_notificationbox_State(nb, "removeNotification with callback",
- null, 0);
-
- testtag_notification_eventCallback(["removed"], ntf, "removeNotification()");
- return ntf;
- }
- },
- {
- test: function(nb, ntf) {
- var ntf = nb.appendNotification("Notification", "note", "happy.png",
- nb.PRIORITY_INFO_LOW,
- testtag_notificationbox_buttons,
- notification_eventCallback);
- SimpleTest.is(ntf && ntf.localName == "notification", true, "append notification with callback");
- return ntf;
- },
- result: function(nb, ntf) {
- testtag_notificationbox_State(nb, "append with callback", ntf, 1);
- return ntf;
- }
- },
- {
- test: function(rb, ntf) {
- // Dismissing the notification instead of removing it should
- // fire a dismissed "event" on the callback, followed by
- // a removed "event".
- ntf.dismiss();
- return ntf;
- },
- result: function(nb, ntf) {
- testtag_notificationbox_State(nb, "called dismiss()", null, 0);
- testtag_notification_eventCallback(["dismissed", "removed"], ntf,
- "dismiss()");
- return ntf;
- }
- },
- {
- test: function(nb, ntf) {
- // Create a popup to be used by a menu-button.
- var doc = nb.ownerDocument;
- var menuPopup = doc.createElementNS(NSXUL, "menupopup");
- var menuItem = menuPopup.appendChild(doc.createElementNS(NSXUL, "menuitem"));
- menuItem.setAttribute("label", "Menu Item");
- // Append a notification with a button of type 'menu-button'.
- ntf = nb.appendNotification(
- "Notification", "note", "happy.png",
- nb.PRIORITY_WARNING_LOW,
- [{
- label: "Button",
- type: "menu-button",
- popup: menuPopup
- }]
- );
-
- return ntf;
- },
- result: function(nb, ntf) {
- testtag_notificationbox_State(nb, "append", ntf, 1);
- testtag_notification_State(nb, ntf, "append", "Notification", "note",
- "happy.png", nb.PRIORITY_WARNING_LOW);
- var button = ntf.querySelector(".notification-button");
- SimpleTest.is(button.type, "menu-button", "Button type should be set");
- var menuPopup = button.getElementsByTagNameNS(NSXUL, "menupopup");
- SimpleTest.is(menuPopup.length, 1, "There should be a menu attached");
- var menuItem = menuPopup[0].firstChild;
- SimpleTest.is(menuItem.localName, "menuitem", "There should be a menu item");
- SimpleTest.is(menuItem.getAttribute("label"), "Menu Item", "Label should match");
- // Clean up.
- nb.removeNotification(ntf);
-
- return [1, null];
- }
- },
- {
- repeat: true,
- test: function(nb, arr) {
- var idx = arr[0];
- var ntf = arr[1];
- switch (idx) {
- case 1:
- // append a new notification
- ntf = nb.appendNotification("Notification", "note", "happy.png",
- nb.PRIORITY_INFO_LOW, testtag_notificationbox_buttons);
- SimpleTest.is(ntf && ntf.localName == "notification", true, "append notification");
-
- // Test persistence
- ntf.persistence++;
-
- return [idx, ntf];
- case 2:
- case 3:
- nb.removeTransientNotifications();
-
- return [idx, ntf];
- }
- },
- result: function(nb, arr) {
- var idx = arr[0];
- var ntf = arr[1];
- switch (idx) {
- case 1:
- testtag_notificationbox_State(nb, "notification added", ntf, 1);
- testtag_notification_State(nb, ntf, "append", "Notification", "note",
- "happy.png", nb.PRIORITY_INFO_LOW);
- SimpleTest.is(ntf.persistence, 1, "persistence is 1");
-
- return [++idx, ntf];
- case 2:
- testtag_notificationbox_State(nb, "first removeTransientNotifications", ntf, 1);
- testtag_notification_State(nb, ntf, "append", "Notification", "note",
- "happy.png", nb.PRIORITY_INFO_LOW);
- SimpleTest.is(ntf.persistence, 0, "persistence is now 0");
-
- return [++idx, ntf];
- case 3:
- testtag_notificationbox_State(nb, "second removeTransientNotifications", null, 0);
-
- this.repeat = false;
- }
- }
- },
- {
- test: function(nb, ntf) {
- // append another notification
- var ntf = nb.appendNotification("Notification", "note", "happy.png",
- nb.PRIORITY_INFO_MEDIUM, testtag_notificationbox_buttons);
- SimpleTest.is(ntf && ntf.localName == "notification", true, "append notification again");
- return ntf;
- },
- result: function(nb, ntf) {
- // check that appending a second notification after removing the first one works
- testtag_notificationbox_State(nb, "append again", ntf, 1);
- testtag_notification_State(nb, ntf, "append again", "Notification", "note",
- "happy.png", nb.PRIORITY_INFO_MEDIUM);
- return ntf;
- }
- },
- {
- test: function(nb, ntf) {
- // check the removeCurrentNotification method
- nb.removeCurrentNotification();
- return ntf;
- },
- result: function(nb, ntf) {
- testtag_notificationbox_State(nb, "removeCurrentNotification", null, 0);
- }
- },
- {
- test: function(nb, ntf) {
- var ntf = nb.appendNotification("Notification", "note", "happy.png",
- nb.PRIORITY_INFO_HIGH, testtag_notificationbox_buttons);
- return ntf;
- },
- result: function(nb, ntf) {
- // test the removeAllNotifications method
- testtag_notificationbox_State(nb, "append info_high", ntf, 1);
- SimpleTest.is(ntf.priority, nb.PRIORITY_INFO_HIGH,
- "notification.priority " + nb.PRIORITY_INFO_HIGH);
- SimpleTest.is(nb.removeAllNotifications(false), undefined, "removeAllNotifications");
- }
- },
- {
- test: function(nb, unused) {
- // add a number of notifications and check that they are added in order
- nb.appendNotification("Four", "4", null, nb.PRIORITY_INFO_HIGH, testtag_notificationbox_buttons);
- nb.appendNotification("Seven", "7", null, nb.PRIORITY_WARNING_HIGH, testtag_notificationbox_buttons);
- nb.appendNotification("Two", "2", null, nb.PRIORITY_INFO_LOW, null);
- nb.appendNotification("Eight", "8", null, nb.PRIORITY_CRITICAL_LOW, null);
- nb.appendNotification("Five", "5", null, nb.PRIORITY_WARNING_LOW, null);
- nb.appendNotification("Six", "6", null, nb.PRIORITY_WARNING_HIGH, null);
- nb.appendNotification("One", "1", null, nb.PRIORITY_INFO_LOW, null);
- nb.appendNotification("Nine", "9", null, nb.PRIORITY_CRITICAL_MEDIUM, null);
- var ntf = nb.appendNotification("Ten", "10", null, nb.PRIORITY_CRITICAL_HIGH, null);
- nb.appendNotification("Three", "3", null, nb.PRIORITY_INFO_MEDIUM, null);
- return ntf;
- },
- result: function(nb, ntf) {
- SimpleTest.is(nb.currentNotification == ntf ?
- nb.currentNotification.value : null, "10", "appendNotification order");
- return 1;
- }
- },
- {
- // test closing notifications to make sure that the current notification is still set properly
- repeat: true,
- test: function(nb, testidx) {
- switch (testidx) {
- case 1:
- nb.getNotificationWithValue("10").close();
- return [1, 9];
- case 2:
- nb.removeNotification(nb.getNotificationWithValue("9"));
- return [2, 8];
- case 3:
- nb.removeCurrentNotification();
- return [3, 7];
- case 4:
- nb.getNotificationWithValue("6").close();
- return [4, 7];
- case 5:
- nb.removeNotification(nb.getNotificationWithValue("5"));
- return [5, 7];
- case 6:
- nb.removeCurrentNotification();
- return [6, 4];
- }
- },
- result: function(nb, arr) {
- // arr is [testindex, expectedvalue]
- SimpleTest.is(nb.currentNotification.value, "" + arr[1], "close order " + arr[0]);
- SimpleTest.is(nb.allNotifications.length, 10 - arr[0], "close order " + arr[0] + " count");
- if (arr[0] == 6)
- this.repeat = false;
- return ++arr[0];
- }
- },
- {
- test: function(nb, ntf) {
- var exh = false;
- try {
- nb.appendNotification("no", "no", "no", 0, null);
- } catch (ex) { exh = true; }
- SimpleTest.is(exh, true, "appendNotification priority too low");
-
- exh = false;
- try {
- nb.appendNotification("no", "no", "no", 11, null);
- } catch (ex) { exh = true; }
- SimpleTest.is(exh, true, "appendNotification priority too high");
-
- // check that the other priority types work properly
- runTimedTests(appendPriorityTests, -1, nb, nb.PRIORITY_WARNING_LOW);
- }
- }
-];
-
-var appendPriorityTests = [
- {
- test: function(nb, priority) {
- var ntf = nb.appendNotification("Notification", "note", "happy.png",
- priority, testtag_notificationbox_buttons);
- SimpleTest.is(ntf && ntf.localName == "notification", true, "append notification " + priority);
- return [ntf, priority];
- },
- result: function(nb, obj) {
- SimpleTest.is(obj[0].priority, obj[1], "notification.priority " + obj[1]);
- return obj[1];
- }
- },
- {
- test: function(nb, priority) {
- nb.removeCurrentNotification();
- return priority;
- },
- result: function(nb, priority) {
- if (priority == nb.PRIORITY_CRITICAL_BLOCK) {
- let ntf = nb.appendNotification("Notification", "note", "happy.png",
- nb.PRIORITY_INFO_LOW, testtag_notificationbox_buttons);
- setTimeout(checkPopupTest, 50, nb, ntf);
- }
- else {
- runTimedTests(appendPriorityTests, -1, nb, ++priority);
- }
- }
- }
-];
-
-function testtag_notificationbox_State(nb, testid, expecteditem, expectedcount)
-{
- SimpleTest.is(nb.currentNotification, expecteditem, testid + " currentNotification");
- SimpleTest.is(nb.allNotifications ? nb.allNotifications.length : "no value",
- expectedcount, testid + " allNotifications");
-}
-
-function testtag_notification_State(nb, ntf, testid, label, value, image, priority)
-{
- SimpleTest.is(ntf.control, nb, testid + " notification.control");
- SimpleTest.is(ntf.label, label, testid + " notification.label");
- SimpleTest.is(ntf.value, value, testid + " notification.value");
- SimpleTest.is(ntf.image, image, testid + " notification.image");
- SimpleTest.is(ntf.priority, priority, testid + " notification.priority");
-
- var type;
- switch (priority) {
- case nb.PRIORITY_INFO_LOW:
- case nb.PRIORITY_INFO_MEDIUM:
- case nb.PRIORITY_INFO_HIGH:
- type = "info";
- break;
- case nb.PRIORITY_WARNING_LOW:
- case nb.PRIORITY_WARNING_MEDIUM:
- case nb.PRIORITY_WARNING_HIGH:
- type = "warning";
- break;
- case nb.PRIORITY_CRITICAL_LOW:
- case nb.PRIORITY_CRITICAL_MEDIUM:
- case nb.PRIORITY_CRITICAL_HIGH:
- case nb.PRIORITY_CRITICAL_BLOCK:
- type = "critical";
- break;
- }
-
- SimpleTest.is(ntf.type, type, testid + " notification.type");
-}
-
-function checkPopupTest(nb, ntf)
-{
- if (nb._animating)
- setTimeout(checkPopupTest, ntf);
- else {
- var evt = new Event("");
- ntf.dispatchEvent(evt);
- evt.target.buttonInfo = testtag_notificationbox_buttons[0];
- ntf._doButtonCommand(evt);
- }
-}
-
-function checkPopupClosed()
-{
- is(document.popupNode, null, "popupNode null after popup is closed");
- SimpleTest.finish();
-}
-
-/**
- * run one or more tests which perform a test operation, wait for a delay,
- * then perform a result operation.
- *
- * tests - array of objects where each object is :
- * {
- * test: test function,
- * result: result function
- * repeat: true to repeat the test
- * }
- * idx - starting index in tests
- * element - element to run tests on
- * arg - argument to pass between test functions
- *
- * If, after executing the result part, the repeat property of the test is
- * true, then the test is repeated. If the repeat property is not true,
- * continue on to the next test.
- *
- * The test and result functions take two arguments, the element and the arg.
- * The test function may return a value which will passed to the result
- * function as its arg. The result function may also return a value which
- * will be passed to the next repetition or the next test in the array.
- */
-function runTimedTests(tests, idx, element, arg)
-{
- if (idx >= 0 && "result" in tests[idx])
- arg = tests[idx].result(element, arg);
-
- // if not repeating, move on to the next test
- if (idx == -1 || !tests[idx].repeat)
- idx++;
-
- if (idx < tests.length) {
- var result = tests[idx].test(element, arg);
- setTimeout(runTimedTestsWait, 50, tests, idx, element, result);
- }
-}
-
-function runTimedTestsWait(tests, idx, element, arg)
-{
- // use this secret property to check if the animation is still running. If it
- // is, then the notification hasn't fully opened or closed yet
- if (element._animating)
- setTimeout(runTimedTestsWait, 50, tests, idx, element, arg);
- else
- runTimedTests(tests, idx, element, arg);
-}
-
-setTimeout(testtag_notificationbox, 0, document.getElementById('nb'));
-]]>
-</script>
-
-</window>
-
diff --git a/toolkit/content/tests/chrome/test_panel.xul b/toolkit/content/tests/chrome/test_panel.xul
deleted file mode 100644
index 3b2188d9e7..0000000000
--- a/toolkit/content/tests/chrome/test_panel.xul
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Panel Tests"
- onload="runTest()"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
-<script>
-SimpleTest.waitForExplicitFinish();
-function runTest()
-{
- window.open("window_panel.xul", "_blank", "chrome,left=200,top=200,width=200,height=200");
-}
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_panel_focus.xul b/toolkit/content/tests/chrome/test_panel_focus.xul
deleted file mode 100644
index e18f28ca8f..0000000000
--- a/toolkit/content/tests/chrome/test_panel_focus.xul
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Panel Focus Tests"
- onload="setTimeout(runTest, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
-<script>
-// use a chrome window for this test as the focus in content windows can be
-// adjusted by the current selection position
-
-SimpleTest.waitForExplicitFinish();
-function runTest()
-{
- // move the mouse so any tooltips that might be open go away, otherwise this
- // test can fail on Mac
- synthesizeMouse(document.documentElement, 1, 1, { type: "mousemove" });
-
- window.open("window_panel_focus.xul", "_blank", "chrome,width=600,height=600");
-}
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_panelfrommenu.xul b/toolkit/content/tests/chrome/test_panelfrommenu.xul
deleted file mode 100644
index 72e3965163..0000000000
--- a/toolkit/content/tests/chrome/test_panelfrommenu.xul
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Open panel from menuitem"
- onload="setTimeout(runTests, 0);"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<!--
- This test does the following:
- 1. Opens the menu, causing the popupshown event to fire, which will call menuOpened.
- 2. Keyboard events are fired to cause the first item on the menu to be executed.
- 3. The command event handler for the first menuitem opens the panel.
- 4. As a menuitem was executed, the menu will roll up, hiding it.
- 5. The popuphidden event for the menu calls menuClosed which tests the popup states.
- 6. The panelOpened function tests the popup states again and hides the popup.
- 7. Once the panel's popuphidden event fires, tests are performed to see if
- panels inside buttons and toolbarbuttons work. Each is opened and the closed.
- -->
-
-<menu id="menu" onpopupshown="menuOpened()" onpopuphidden="menuClosed();">
- <menupopup>
- <menuitem id="i1" label="One" oncommand="$('panel').openPopup($('menu'), 'after_start');"/>
- <menuitem id="i2" label="Two"/>
- </menupopup>
-</menu>
-
-<panel id="hiddenpanel" hidden="true"/>
-
-<panel id="panel" onpopupshown="panelOpened()"
- onpopuphidden="$('button').focus(); $('button').open = true">
- <textbox/>
-</panel>
-
-<button id="button" type="panel" label="Button">
- <panel onpopupshown="panelOnButtonOpened(this)"
- onpopuphidden="$('tbutton').open = true;">
- <button label="OK" oncommand="this.parentNode.parentNode.open = false"/>
- </panel>
-</button>
-
-<toolbarbutton id="tbutton" type="panel" label="Toolbarbutton">
- <panel onpopupshown="panelOnToolbarbuttonOpened(this)"
- onpopuphidden="SimpleTest.finish()">
- <textbox/>
- </panel>
-</toolbarbutton>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-function runTests()
-{
- is($("hiddenpanel").state, "closed", "hidden popup is closed");
-
- var menu = $("menu");
- menu.open = true;
-}
-
-function menuOpened()
-{
- synthesizeKey("VK_DOWN", { });
- synthesizeKey("VK_RETURN", { });
-}
-
-function menuClosed()
-{
- // the panel will be open at this point, but the popupshown event
- // still needs to fire
- is($("panel").state, "showing", "panel is open after menu hide");
- is($("menu").firstChild.state, "closed", "menu is closed after menu hide");
-}
-
-function panelOpened()
-{
- is($("panel").state, "open", "panel is open");
- is($("menu").firstChild.state, "closed", "menu is closed");
- $("panel").hidePopup();
-}
-
-function panelOnButtonOpened(panel)
-{
- is(panel.state, 'open', 'button panel is open');
- is(document.activeElement, document.documentElement, "focus blurred on panel from button open");
- synthesizeKey("VK_DOWN", { });
- is(document.activeElement, document.documentElement, "focus not modified on cursor down from button");
- panel.firstChild.doCommand()
-}
-
-function panelOnToolbarbuttonOpened(panel)
-{
- is(panel.state, 'open', 'toolbarbutton panel is open');
- is(document.activeElement, document.documentElement, "focus blurred on panel from toolbarbutton open");
- panel.firstChild.focus();
- synthesizeKey("VK_DOWN", { });
- is(document.activeElement, panel.firstChild.inputField, "focus not modified on cursor down from toolbarbutton");
- panel.parentNode.open = false;
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_popup_anchor.xul b/toolkit/content/tests/chrome/test_popup_anchor.xul
deleted file mode 100644
index 5839c52a37..0000000000
--- a/toolkit/content/tests/chrome/test_popup_anchor.xul
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Popup Anchor Tests"
- onload="setTimeout(runTest, 0);"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
-<script>
-SimpleTest.waitForExplicitFinish();
-function runTest()
-{
- window.open("window_popup_anchor.xul", "_blank", "chrome,width=600,height=600");
-}
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_popup_anchoratrect.xul b/toolkit/content/tests/chrome/test_popup_anchoratrect.xul
deleted file mode 100644
index c12e225026..0000000000
--- a/toolkit/content/tests/chrome/test_popup_anchoratrect.xul
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Menu Button Popup Tests"
- onload="setTimeout(runTest, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
-<script>
-SimpleTest.waitForExplicitFinish();
-function runTest()
-{
- window.open("window_popup_anchoratrect.xul", "_blank", "chrome,width=200,height=200");
-}
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_popup_attribute.xul b/toolkit/content/tests/chrome/test_popup_attribute.xul
deleted file mode 100644
index 2a256078d5..0000000000
--- a/toolkit/content/tests/chrome/test_popup_attribute.xul
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Popup Attribute Tests"
- onload="setTimeout(runTest, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
-<script>
-SimpleTest.waitForExplicitFinish();
-function runTest()
-{
- window.open("window_popup_attribute.xul", "_blank", "width=600,height=700");
-}
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_popup_button.xul b/toolkit/content/tests/chrome/test_popup_button.xul
deleted file mode 100644
index 3803e465f5..0000000000
--- a/toolkit/content/tests/chrome/test_popup_button.xul
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Menu Button Popup Tests"
- onload="setTimeout(runTest, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
-<script>
-SimpleTest.waitForExplicitFinish();
-function runTest()
-{
- window.open("window_popup_button.xul", "_blank", "width=700,height=700");
-}
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_popup_coords.xul b/toolkit/content/tests/chrome/test_popup_coords.xul
deleted file mode 100644
index 4597b5cc03..0000000000
--- a/toolkit/content/tests/chrome/test_popup_coords.xul
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Popup Coordinate Tests"
- onload="setTimeout(openThePopup, 0, 'outer');"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<deck style="margin-top: 5px; padding-top: 5px;">
- <label id="outer" popup="outerpopup" value="Popup"/>
-</deck>
-
-<panel id="outerpopup"
- onpopupshowing="popupShowingEventOccurred(event);"
- onpopupshown="eventOccurred(event); openThePopup('inner')"
- onpopuphiding="eventOccurred(event);"
- onpopuphidden="eventOccurred(event); SimpleTest.finish();">
- <button id="item1" label="First"/>
- <label id="inner" value="Second" popup="innerpopup"/>
- <button id="item2" label="Third"/>
-</panel>
-
-<menupopup id="innerpopup"
- onpopupshowing="popupShowingEventOccurred(event);"
- onpopupshown="eventOccurred(event); event.target.hidePopup();"
- onpopuphiding="eventOccurred(event);"
- onpopuphidden="eventOccurred(event); document.getElementById('outerpopup').hidePopup();">
- <menuitem id="inner1" label="Inner First"/>
- <menuitem id="inner2" label="Inner Second"/>
-</menupopup>
-
-<script>
-SimpleTest.waitForExplicitFinish();
-
-function openThePopup(id)
-{
- if (id == "inner")
- document.getElementById("item1").focus();
-
- var trigger = document.getElementById(id);
- synthesizeMouse(trigger, 4, 5, { });
-}
-
-function eventOccurred(event)
-{
- var testname = event.type + " on " + event.target.id + " ";
- ok(event instanceof MouseEvent, testname + "is a mouse event");
- is(event.clientX, 0, testname + "clientX");
- is(event.clientY, 0, testname + "clientY");
- is(event.rangeParent, null, testname + "rangeParent");
- is(event.rangeOffset, 0, testname + "rangeOffset");
-}
-
-function popupShowingEventOccurred(event)
-{
- // the popupshowing event should have the event coordinates and
- // range position filled in.
- var testname = "popupshowing on " + event.target.id + " ";
- ok(event instanceof MouseEvent, testname + "is a mouse event");
-
- var trigger = document.getElementById(event.target.id == "outerpopup" ? "outer" : "inner");
- var rect = trigger.getBoundingClientRect();
- is(event.clientX, Math.round(rect.left + 4), testname + "clientX");
- is(event.clientY, Math.round(rect.top + 5), testname + "clientY");
- // rangeOffset should be just after the trigger element. As rangeOffset
- // considers the zeroth position to be before the first element, the value
- // should be one higher than its index within its parent.
- is(event.rangeParent, trigger.parentNode, testname + "rangeParent");
- is(event.rangeOffset, Array.indexOf(trigger.parentNode.childNodes, trigger) + 1, testname + "rangeOffset");
-
- var popuprect = event.target.getBoundingClientRect();
- is(Math.round(popuprect.left), Math.round(rect.left + 4), "popup left");
- is(Math.round(popuprect.top), Math.round(rect.top + 5), "popup top");
- ok(popuprect.width > 0, "popup width");
- ok(popuprect.height > 0, "popup height");
-}
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_popup_keys.xul b/toolkit/content/tests/chrome/test_popup_keys.xul
deleted file mode 100644
index 37135af57e..0000000000
--- a/toolkit/content/tests/chrome/test_popup_keys.xul
+++ /dev/null
@@ -1,148 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Menu ignorekeys Test"
- onkeydown="keyDown()" onkeypress="gKeyPressCount++; event.stopPropagation(); event.preventDefault();"
- onload="runTests();"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<!--
- This test checks that the ignorekeys attribute can be used on a menu to
- disable key navigation. The test is performed twice by opening the menu,
- simulating a cursor down key, and closing the popup. When keys are enabled,
- the first item on the menu should be highlighted, otherwise the first item
- should not be highlighted.
- -->
-
-<menupopup id="popup">
- <menuitem id="i1" label="One" onDOMAttrModified="attrModified(event)"/>
- <menuitem id="i2" label="Two"/>
- <menuitem id="i3" label="Three"/>
- <menuitem id="i4" label="Four"/>
-</menupopup>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-var gIgnoreKeys = false;
-var gIgnoreAttrChange = false;
-var gKeyPressCount = 0;
-
-let {Task} = Components.utils.import("resource://gre/modules/Task.jsm", {});
-
-function waitForEvent(target, eventName) {
- return new Promise(resolve => {
- target.addEventListener(eventName, function eventOccurred(event) {
- target.removeEventListener(eventName, eventOccurred, false);
- resolve();
- }, false);
- });
-}
-
-function runTests()
-{
- Task.async(function* () {
- var popup = $("popup");
- popup.enableKeyboardNavigator(false);
- is(popup.getAttribute("ignorekeys"), "true", "keys disabled");
- popup.enableKeyboardNavigator(true);
- is(popup.hasAttribute("ignorekeys"), false, "keys enabled");
-
- let popupShownPromise = waitForEvent(popup, "popupshown");
- popup.openPopup(null, "after_start");
- yield popupShownPromise;
-
- let popupHiddenPromise = waitForEvent(popup, "popuphidden");
- synthesizeKey("VK_DOWN", { });
- yield popupHiddenPromise;
-
- is(gKeyPressCount, 0, "keypresses with ignorekeys='false'");
-
- gIgnoreKeys = true;
- popup.setAttribute("ignorekeys", "true");
- // clear this first to avoid confusion
- gIgnoreAttrChange = true;
- $("i1").removeAttribute("_moz-menuactive")
- gIgnoreAttrChange = false;
-
- popupShownPromise = waitForEvent(popup, "popupshown");
- popup.openPopup(null, "after_start");
- yield popupShownPromise;
-
- synthesizeKey("VK_DOWN", { });
-
- yield new Promise(resolve => setTimeout(() => resolve(), 1000));
- popupHiddenPromise = waitForEvent(popup, "popuphidden");
- popup.hidePopup();
- yield popupHiddenPromise;
-
- is(gKeyPressCount, 1, "keypresses with ignorekeys='true'");
-
- popup.setAttribute("ignorekeys", "shortcuts");
- // clear this first to avoid confusion
- gIgnoreAttrChange = true;
- $("i1").removeAttribute("_moz-menuactive")
- gIgnoreAttrChange = false;
-
- popupShownPromise = waitForEvent(popup, "popupshown");
- popup.openPopup(null, "after_start");
- yield popupShownPromise;
-
- // When ignorekeys="shortcuts", T should be handled but accel+T should propagate.
- synthesizeKey("t", { });
- is(gKeyPressCount, 1, "keypresses after t pressed with ignorekeys='shortcuts'");
-
- synthesizeKey("t", { accelKey: true });
- is(gKeyPressCount, 2, "keypresses after accel+t pressed with ignorekeys='shortcuts'");
-
- popupHiddenPromise = waitForEvent(popup, "popuphidden");
- popup.hidePopup();
- yield popupHiddenPromise;
-
- SimpleTest.finish();
- })();
-}
-
-function attrModified(event)
-{
- if (gIgnoreAttrChange || event.attrName != "_moz-menuactive")
- return;
-
- // the attribute should not be changed when ignorekeys is enabled
- if (gIgnoreKeys) {
- ok(false, "move key with keys disabled");
- }
- else {
- is($("i1").getAttribute("_moz-menuactive"), "true", "move key with keys enabled");
- $("popup").hidePopup();
- }
-}
-
-function keyDown()
-{
- // when keys are enabled, the menu should have stopped propagation of the
- // event, so a bubbling listener for a keydown event should only occur
- // when keys are disabled.
- ok(gIgnoreKeys, "key listener fired with keys " +
- (gIgnoreKeys ? "disabled" : "enabled"));
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_popup_moveToAnchor.xul b/toolkit/content/tests/chrome/test_popup_moveToAnchor.xul
deleted file mode 100644
index 344002fdf6..0000000000
--- a/toolkit/content/tests/chrome/test_popup_moveToAnchor.xul
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<vbox align="start">
- <button id="button1" label="Button 1" style="margin-top: 50px;"/>
- <button id="button2" label="Button 2" style="margin-top: 60px;"/>
-</vbox>
-
-<menupopup id="popup" onpopupshown="popupshown()" onpopuphidden="SimpleTest.finish()">
- <menuitem label="One"/>
- <menuitem label="Two"/>
-</menupopup>
-
-<script>
-SimpleTest.waitForExplicitFinish();
-
-function runTest(id)
-{
- $("popup").openPopup($("button1"), "after_start");
-}
-
-function popupshown()
-{
- var popup = $("popup");
- var popupheight = popup.getBoundingClientRect().height;
- var button1rect = $("button1").getBoundingClientRect();
- var button2rect = $("button2").getBoundingClientRect();
-
- checkCoords(popup, button1rect.left, button1rect.bottom, "initial");
-
- popup.moveToAnchor($("button1"), "after_start", 0, 8);
- checkCoords(popup, button1rect.left, button1rect.bottom + 8, "move anchor top + 8");
-
- popup.moveToAnchor($("button1"), "after_start", 6, -10);
- checkCoords(popup, button1rect.left + 6, button1rect.bottom - 10, "move anchor left + 6, top - 10");
-
- popup.moveToAnchor($("button1"), "before_start", -2, 0);
- checkCoords(popup, button1rect.left - 2, button1rect.top - popupheight, "move anchor before_start");
-
- popup.moveToAnchor($("button2"), "before_start");
- checkCoords(popup, button2rect.left, button2rect.top - popupheight, "move button2");
-
- popup.moveToAnchor($("button1"), "end_before");
- checkCoords(popup, button1rect.right, button1rect.top, "move anchor end_before");
-
- popup.moveToAnchor($("button2"), "after_start", 5, 4);
- checkCoords(popup, button2rect.left + 5, button2rect.bottom + 4, "move button2 left + 5, top + 4");
-
- popup.moveTo($("button1").boxObject.screenX + 10, $("button1").boxObject.screenY + 12);
- checkCoords(popup, button1rect.left + 10, button1rect.top + 12, "move to button1 screen with offset");
-
- popup.moveToAnchor($("button1"), "after_start", 1, 2);
- checkCoords(popup, button1rect.left + 1, button1rect.bottom + 2, "move button2 after screen");
-
- popup.hidePopup();
-}
-
-function checkCoords(popup, expectedx, expectedy, testid)
-{
- var rect = popup.getBoundingClientRect();
- is(Math.round(rect.left), Math.round(expectedx), testid + " left");
- is(Math.round(rect.top), Math.round(expectedy), testid + " top");
-}
-
-SimpleTest.waitForFocus(runTest);
-
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_popup_preventdefault.xul b/toolkit/content/tests/chrome/test_popup_preventdefault.xul
deleted file mode 100644
index 7de5dc3be1..0000000000
--- a/toolkit/content/tests/chrome/test_popup_preventdefault.xul
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Popup Prevent Default Tests"
- onload="setTimeout(runTest, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
-<!--
- This tests checks that preventDefault can be called on a popupshowing
- event and that preventDefault has no effect for the popuphiding event.
- -->
-
-<script>
-SimpleTest.waitForExplicitFinish();
-
-var gBlockShowing = true;
-var gShownNotAllowed = true;
-
-function runTest()
-{
- document.getElementById("menu").open = true;
-}
-
-function popupShowing(event)
-{
- if (gBlockShowing) {
- event.preventDefault();
- gBlockShowing = false;
- setTimeout(function() {
- gShownNotAllowed = false;
- document.getElementById("menu").open = true;
- }, 3000, true);
- }
-}
-
-function popupShown()
-{
- ok(!gShownNotAllowed, "popupshowing preventDefault");
- document.getElementById("menu").open = false;
-}
-
-function popupHiding(event)
-{
- // since this is a content test, preventDefault should have no effect
- event.preventDefault();
-}
-
-function popupHidden()
-{
- ok(true, "popuphiding preventDefault not allowed");
- SimpleTest.finish();
-}
-</script>
-
-<button id="menu" type="menu" label="Menu">
- <menupopup onpopupshowing="popupShowing(event);"
- onpopupshown="popupShown();"
- onpopuphiding="popupHiding(event);"
- onpopuphidden="popupHidden();">
- <menuitem label="Item"/>
- </menupopup>
-</button>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_popup_preventdefault_chrome.xul b/toolkit/content/tests/chrome/test_popup_preventdefault_chrome.xul
deleted file mode 100644
index 46f14cd6a5..0000000000
--- a/toolkit/content/tests/chrome/test_popup_preventdefault_chrome.xul
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Popup Attribute Tests"
- onload="setTimeout(runTest, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
-<script>
-SimpleTest.waitForExplicitFinish();
-function runTest()
-{
- window.open("window_popup_preventdefault_chrome.xul", "_blank", "chrome,width=600,height=600");
-}
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_popup_recreate.xul b/toolkit/content/tests/chrome/test_popup_recreate.xul
deleted file mode 100644
index 14822acbd0..0000000000
--- a/toolkit/content/tests/chrome/test_popup_recreate.xul
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Popup Recreate Test"
- onload="setTimeout(init, 0)"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<!--
- This is a test for bug 388361.
-
- This test checks that a menulist's popup is properly created and sized when
- the popup node is removed and another added in its place.
-
- -->
-
-<script>
-<![CDATA[
-SimpleTest.waitForExplicitFinish();
-
-var gState = "before";
-
-function init()
-{
- document.getElementById("menulist").open = true;
-}
-
-function isWithinHalfPixel(a, b)
-{
- return Math.abs(a - b) <= 0.5;
-}
-
-function recreate()
-{
- if (gState == "before") {
- var element = document.getElementById("menulist");
- while (element.hasChildNodes())
- element.removeChild(element.firstChild);
- element.appendItem("Cat");
- gState = "after";
- document.getElementById("menulist").open = true;
- }
- else {
- SimpleTest.finish();
- }
-}
-
-function checkSize()
-{
- var menulist = document.getElementById("menulist");
- var menurect = menulist.getBoundingClientRect();
- var popuprect = menulist.menupopup.getBoundingClientRect();
-
- let marginLeft = parseFloat(getComputedStyle(menulist.menupopup).marginLeft);
- ok(isWithinHalfPixel(menurect.left + marginLeft, popuprect.left), "left position " + gState);
- ok(isWithinHalfPixel(menurect.right + marginLeft, popuprect.right), "right position " + gState);
- ok(Math.round(popuprect.right) - Math.round(popuprect.left) > 0, "height " + gState)
- document.getElementById("menulist").open = false;
-}
-]]>
-</script>
-
-<hbox align="center" pack="center">
- <menulist id="menulist" onpopupshown="checkSize();" onpopuphidden="recreate();">
- <menupopup position="after_start">
- <menuitem label="Cat"/>
- </menupopup>
- </menulist>
-</hbox>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_popup_scaled.xul b/toolkit/content/tests/chrome/test_popup_scaled.xul
deleted file mode 100644
index 6bbf6c6533..0000000000
--- a/toolkit/content/tests/chrome/test_popup_scaled.xul
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Popups in Scaled Content"
- onload="setTimeout(runTests, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<!-- This test checks that the position is correct in two cases:
- - a popup anchored at an element in a scaled document
- - a popup opened at a screen coordinate in a scaled window
- -->
-
-<iframe id="frame" width="60" height="140"
- src="data:text/html,&lt;html&gt;&lt;body&gt;&lt;input size='4' id='one'&gt;&lt;input size='4' id='two'&gt;&lt;/body&gt;&lt;/html&gt;"/>
-
-<menupopup id="popup" onpopupshown="shown()" onpopuphidden="nextTest()">
- <menuitem label="One"/>
-</menupopup>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-var screenTest = false;
-var screenx = -1, screeny = -1;
-
-SimpleTest.waitForExplicitFinish();
-
-function runTests()
-{
- setScale($("frame").contentWindow, 2);
-
- var anchor = $("frame").contentDocument.getElementById("two");
- anchor.getBoundingClientRect(); // flush to update display after scale change
- $("popup").openPopup(anchor, "after_start");
-}
-
-function setScale(win, scale)
-{
- var wn = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
- .getInterface(Components.interfaces.nsIWebNavigation);
- var shell = wn.QueryInterface(Components.interfaces.nsIDocShell);
- var docViewer = shell.contentViewer;
- docViewer.fullZoom = scale;
-}
-
-function shown()
-{
- if (screenTest) {
- var box = $("popup").boxObject;
- is(box.screenX, screenx, "screen left position");
- is(box.screenY, screeny, "screen top position");
- }
- else {
- var anchor = $("frame").contentDocument.getElementById("two");
-
- is(Math.round(anchor.getBoundingClientRect().left * 2),
- Math.round($("popup").getBoundingClientRect().left), "anchored left position");
- is(Math.round(anchor.getBoundingClientRect().bottom * 2),
- Math.round($("popup").getBoundingClientRect().top), "anchored top position");
- }
-
- $("popup").hidePopup();
-}
-
-function nextTest()
-{
- if (screenTest) {
- setScale(window, 1);
- SimpleTest.finish();
- }
- else {
- screenTest = true;
- var box = document.documentElement.boxObject;
-
- // - the iframe is at 4×, but out here css pixels are only 2× device pixels
- // - the popup manager rounds off (or truncates) the coordinates to
- // integers, so ensure we pass in even numbers to openPopupAtScreen
- screenx = (x = even(box.screenX + 120))/2;
- screeny = (y = even(box.screenY + 120))/2;
- setScale(window, 2);
- $("popup").openPopupAtScreen(x, y);
- }
-}
-
-function even(n)
-{
- return (n % 2) ? n+1 : n;
-}
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_popup_tree.xul b/toolkit/content/tests/chrome/test_popup_tree.xul
deleted file mode 100644
index 779f13e684..0000000000
--- a/toolkit/content/tests/chrome/test_popup_tree.xul
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Tree in Popup Test"
- onload="setTimeout(runTests, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<panel id="panel" onpopupshown="treeClick()" onpopuphidden="SimpleTest.finish()">
- <tree id="tree" width="350" rows="5">
- <treecols>
- <treecol id="name" label="Name" flex="1"/>
- <treecol id="address" label="Street" flex="1"/>
- </treecols>
- <treechildren id="treechildren">
- <treeitem>
- <treerow>
- <treecell label="Justin Thyme"/>
- <treecell label="800 Bay Street"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Mary Goround"/>
- <treecell label="47 University Avenue"/>
- </treerow>
- </treeitem>
- </treechildren>
- </tree>
-</panel>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-function runTests()
-{
- $("panel").openPopup(null, "overlap", 2, 2);
-}
-
-function treeClick()
-{
- var tree = $("tree");
- is(tree.currentIndex, -1, "selectedIndex before click");
- synthesizeMouseExpectEvent($("treechildren"), 2, 2, { }, $("treechildren"), "click", "");
- is(tree.currentIndex, 0, "selectedIndex after click");
-
- var rect = tree.treeBoxObject.getCoordsForCellItem(1, tree.columns.address, "");
- synthesizeMouseExpectEvent($("treechildren"), rect.x, rect.y + 2,
- { }, $("treechildren"), "click", "");
- is(tree.currentIndex, 1, "selectedIndex after second click " + rect.x + "," + rect.y);
-
- $("panel").hidePopup();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_popuphidden.xul b/toolkit/content/tests/chrome/test_popuphidden.xul
deleted file mode 100644
index 4c344b3d22..0000000000
--- a/toolkit/content/tests/chrome/test_popuphidden.xul
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Hidden Popup Test"
- onload="setTimeout(runTests, 0, $('popup'));"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
-<menupopup id="popup" hidden="true" onpopupshown="ok(true, 'popupshown'); this.hidePopup()"
- onpopuphidden="$('popup-hideonshow').openPopup(null, 'after_start')">
- <menuitem id="i1" label="One"/>
- <menuitem id="i2" label="Two"/>
-</menupopup>
-
-<menupopup id="popup-hideonshow" onpopupshowing="hidePopupWhileShowing(this)"
- onpopupshown="ok(false, 'popupshown when hidden')">
- <menuitem id="i1" label="One"/>
- <menuitem id="i2" label="Two"/>
-</menupopup>
-
-<button id="button" type="menu" label="Menu" onDOMAttrModified="checkEndTest(event)">
- <menupopup id="popupinbutton" hidden="true"
- onpopupshown="ok(true, 'popupshown'); ok($('button').open, 'open'); this.hidden = true;">
- <menuitem id="i1" label="One"/>
- <menuitem id="i2" label="Two"/>
- </menupopup>
-</button>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-function runTests(popup)
-{
- popup.hidden = false;
- popup.openPopup(null, "after_start");
-}
-
-function hidePopupWhileShowing(popup)
-{
- popup.hidden = true;
- popup.clientWidth; // flush layout
- is(popup.state, 'closed', 'popupshowing hidden');
- SimpleTest.executeSoon(() => runTests($('popupinbutton')));
-}
-
-function checkEndTest(event)
-{
- var button = $("button");
- if (event.originalTarget != button || event.attrName != 'open' || event.attrChange != event.REMOVAL)
- return;
-
- ok($("popupinbutton").hidden, "popup hidden");
- is($("popupinbutton").state, "closed", "popup state");
- ok(!button.open, "not open after hidden");
- SimpleTest.finish();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_popupincontent.xul b/toolkit/content/tests/chrome/test_popupincontent.xul
deleted file mode 100644
index dafcd09e5a..0000000000
--- a/toolkit/content/tests/chrome/test_popupincontent.xul
+++ /dev/null
@@ -1,131 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Popup in Content Positioning Tests"
- onload="setTimeout(nextTest, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<!--
- This test checks that popups in content areas don't extend past the content area.
- -->
-
-<hbox>
- <spacer width="100"/>
- <menu id="menu" label="Menu">
- <menupopup style="margin:10px;" id="popup" onpopupshown="popupShown()" onpopuphidden="nextTest()">
- <menuitem label="One"/>
- <menuitem label="Two"/>
- <menuitem label="Three"/>
- <menuitem label="A final longer label that is actually quite long. Very long indeed."/>
- </menupopup>
- </menu>
-</hbox>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-var step = "";
-var originalHeight = -1;
-
-function nextTest()
-{
- // there are five tests here:
- // openPopupAtScreen - checks that opening a popup using openPopupAtScreen
- // constrains the popup to the content area
- // left and top - check with the left and top attributes set
- // open near bottom - open the menu near the bottom of the window
- // large menu - try with a menu that is very large and should be scaled
- // shorter menu again - try with a menu that is shorter again. It should have
- // the same height as the 'left and top' test
- var popup = $("popup");
- var menu = $("menu");
- switch (step) {
- case "":
- step = "openPopupAtScreen";
- popup.openPopupAtScreen(1000, 1200);
- break;
- case "openPopupAtScreen":
- step = "left and top";
- popup.setAttribute("left", "800");
- popup.setAttribute("top", "2900");
- synthesizeMouse(menu, 2, 2, { });
- break;
- case "left and top":
- step = "open near bottom";
- // request that the menu be opened with a target point near the bottom of the window,
- // so that the menu's top margin will push it completely outside the window.
- var bo = document.documentElement.boxObject;
- popup.setAttribute("top", bo.screenY + window.innerHeight - 5);
- synthesizeMouse(menu, 2, 2, { });
- break;
- case "open near bottom":
- step = "large menu";
- popup.removeAttribute("left");
- popup.removeAttribute("top");
- for (var i = 0; i < 80; i++)
- menu.appendItem("Test", "");
- synthesizeMouse(menu, 2, 2, { });
- break;
- case "large menu":
- step = "shorter menu again";
- for (var i = 0; i < 80; i++)
- menu.removeItemAt(menu.itemCount - 1);
- synthesizeMouse(menu, 2, 2, { });
- break;
- case "shorter menu again":
- SimpleTest.finish();
- break;
- }
-}
-
-function popupShown()
-{
- var windowrect = document.documentElement.getBoundingClientRect();
- var popuprect = $("popup").getBoundingClientRect();
-
- // subtract one off the edge due to a rounding issue
- ok(popuprect.left >= windowrect.left, step + " left");
- ok(popuprect.right - 1 <= windowrect.right, step + " right");
-
- if (step == "left and top") {
- originalHeight = popuprect.bottom - popuprect.top;
- }
- else if (step == "open near bottom") {
- // check that the menu flipped up so it's above our requested point
- ok(popuprect.bottom - 1 <= windowrect.bottom - 5, step + " bottom");
- }
- else if (step == "large menu") {
- // add 10 to account for the margin
- is(popuprect.top, $("menu").getBoundingClientRect().bottom + 10, step + " top");
- ok(popuprect.bottom == windowrect.bottom ||
- popuprect.bottom - 1 == windowrect.bottom, step + " bottom");
- }
- else {
- ok(popuprect.top >= windowrect.top, step + " top");
- ok(popuprect.bottom - 1 <= windowrect.bottom, step + " bottom");
- if (step == "shorter menu again")
- is(popuprect.bottom - popuprect.top, originalHeight, step + " height shortened");
- }
-
- $("menu").open = false;
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_popupremoving.xul b/toolkit/content/tests/chrome/test_popupremoving.xul
deleted file mode 100644
index f795590f52..0000000000
--- a/toolkit/content/tests/chrome/test_popupremoving.xul
+++ /dev/null
@@ -1,165 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Popup Removing Tests"
- onload="setTimeout(nextTest, 0)"
- onDOMAttrModified="modified(event)"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<!--
- This test checks that popup elements can be removed in various ways without
- crashing. It tests two situations, one with menus that are 'separate', and
- one with menus that are 'nested'. In each case, there are four levels of menu.
-
- The nextTest function starts the process by opening the first menu. A set of
- popupshown event listeners are used to open the next menu until all four are
- showing. This last one calls removePopup to remove the menu node from the
- tree. This should hide the popups as they are no longer in a document.
-
- A mutation listener is triggered when the fourth menu closes by having its
- open attribute cleared. This listener hides the third popup which causes
- its frame to be removed. Naturally, we want to ensure that this doesn't
- crash when the third menu is removed.
- -->
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<hbox>
-
-<menu id="nestedmenu1" label="1">
- <menupopup id="nestedpopup1" onpopupshown="if (event.target == this) this.firstChild.open = true">
- <menu id="nestedmenu2" label="2">
- <menupopup id="nestedpopup2" onpopupshown="if (event.target == this) this.firstChild.open = true">
- <menu id="nestedmenu3" label="3">
- <menupopup id="nestedpopup3" onpopupshown="if (event.target == this) this.firstChild.open = true">
- <menu id="nestedmenu4" label="4" onpopupshown="removePopups()">
- <menupopup id="nestedpopup4">
- <menuitem label="Nested 1"/>
- <menuitem label="Nested 2"/>
- <menuitem label="Nested 3"/>
- </menupopup>
- </menu>
- </menupopup>
- </menu>
- </menupopup>
- </menu>
- </menupopup>
-</menu>
-
-<menu id="separatemenu1" label="1">
- <menupopup id="separatepopup1" onpopupshown="$('separatemenu2').open = true">
- <menuitem label="L1 One"/>
- <menuitem label="L1 Two"/>
- <menuitem label="L1 Three"/>
- </menupopup>
-</menu>
-
-<menu id="separatemenu2" label="2">
- <menupopup id="separatepopup2" onpopupshown="$('separatemenu3').open = true"
- onpopuphidden="popup2Hidden()">
- <menuitem label="L2 One"/>
- <menuitem label="L2 Two"/>
- <menuitem label="L2 Three"/>
- </menupopup>
-</menu>
-
-<menu id="separatemenu3" label="3" onpopupshown="$('separatemenu4').open = true">
- <menupopup id="separatepopup3">
- <menuitem label="L3 One"/>
- <menuitem label="L3 Two"/>
- <menuitem label="L3 Three"/>
- </menupopup>
-</menu>
-
-<menu id="separatemenu4" label="4" onpopupshown="removePopups()"
- onpopuphidden="$('separatemenu2').open = false">
- <menupopup id="separatepopup3">
- <menuitem label="L4 One"/>
- <menuitem label="L4 Two"/>
- <menuitem label="L4 Three"/>
- </menupopup>
-</menu>
-
-</hbox>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-var gKey = "";
-gTriggerMutation = null;
-gChangeMutation = null;
-
-function nextTest()
-{
- if (gKey == "") {
- gKey = "separate";
- }
- else if (gKey == "separate") {
- gKey = "nested";
- }
- else {
- SimpleTest.finish();
- return;
- }
-
- $(gKey + "menu1").open = true;
-}
-
-function modified(event)
-{
- // use this mutation listener to hide the third popup, destroying its frame.
- // It gets triggered when the open attribute is cleared on the fourth menu.
-
- if (event.target == gTriggerMutation &&
- event.attrName == "open") {
- gChangeMutation.hidden = true;
- // force a layout flush
- document.documentElement.boxObject.width;
- gTriggerMutation = null;
- gChangeMutation = null;
- }
-}
-
-function removePopups()
-{
- var menu2 = $(gKey + "menu2");
- var menu3 = $(gKey + "menu3");
- is(menu2.getAttribute("open"), "true", gKey + " menu 2 open before");
- is(menu3.getAttribute("open"), "true", gKey + " menu 3 open before");
-
- gTriggerMutation = menu3;
- gChangeMutation = $(gKey + "menu4");
- var menu = $(gKey + "menu1");
- menu.parentNode.removeChild(menu);
-
- if (gKey == "nested") {
- // the 'separate' test checks this during the popup2 hidden event handler
- is(menu2.hasAttribute("open"), false, gKey + " menu 2 open after");
- is(menu3.hasAttribute("open"), false, gKey + " menu 3 open after");
- nextTest();
- }
-}
-
-function popup2Hidden()
-{
- is($(gKey + "menu2").hasAttribute("open"), false, gKey + " menu 2 open after");
- nextTest();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_popupremoving_frame.xul b/toolkit/content/tests/chrome/test_popupremoving_frame.xul
deleted file mode 100644
index dec73c7f70..0000000000
--- a/toolkit/content/tests/chrome/test_popupremoving_frame.xul
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Popup Unload Test"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<!--
- This test checks that popup elements are removed when the document is changed.
- -->
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<iframe id="frame" width="300" height="150" src="frame_popupremoving_frame.xul"/>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-var gMenus = [];
-
-function popupsOpened()
-{
- var framedoc = $("frame").contentDocument;
- framedoc.addEventListener("DOMAttrModified", modified, false);
-
- // this is the order in which the menus should be hidden (reverse of the
- // order they were opened in). The second menu is removed during the
- // mutation listener, so gets the event afterwards.
- gMenus.push(framedoc.getElementById("nestedmenu4"));
- gMenus.push(framedoc.getElementById("nestedmenu2"));
- gMenus.push(framedoc.getElementById("nestedmenu3"));
- gMenus.push(framedoc.getElementById("nestedmenu1"));
- gMenus.push(framedoc.getElementById("separatemenu4"));
- gMenus.push(framedoc.getElementById("separatemenu2"));
- gMenus.push(framedoc.getElementById("separatemenu3"));
- gMenus.push(framedoc.getElementById("separatemenu1"));
-
- framedoc.location = "about:blank";
-}
-
-function modified(event)
-{
- if (event.attrName != "open")
- return;
-
- var framedoc = $("frame").contentDocument;
-
- var tohide = null;
- if (event.target.id == "separatemenu3")
- tohide = framedoc.getElementById("separatemenu2");
- else if (event.target.id == "nestedmenu3")
- tohide = framedoc.getElementById("nestedmenu2");
-
- if (tohide) {
- tohide.hidden = true;
- // force a layout flush
- $("frame").contentDocument.documentElement.boxObject.width;
- }
-
- is(event.target, gMenus.shift(), event.target.id + " hidden");
- if (gMenus.length == 0)
- SimpleTest.finish();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_position.xul b/toolkit/content/tests/chrome/test_position.xul
deleted file mode 100644
index 695c1bf22c..0000000000
--- a/toolkit/content/tests/chrome/test_position.xul
+++ /dev/null
@@ -1,136 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for positioning
- -->
-<window title="position" width="500" height="600"
- onload="setTimeout(runTest, 0);"
- style="margin: 0; border: 0; padding; 0;"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-
-<hbox id="box1">
- <button label="0" width="100" height="40" style="margin: 3px;"/>
-</hbox>
-<scrollbox id="box2" orient="vertical" align="start" width="200" height="50"
- style="overflow: hidden; margin-left: 2px; padding: 1px;">
- <deck>
- <scrollbox id="box3" orient="vertical" align="start" height="100"
- style="overflow: scroll; margin: 1px; padding: 0;">
- <vbox id="innerscroll" width="200" align="start">
- <button id="button1" label="1" width="90" maxwidth="100"
- minheight="25" height="35" maxheight="50"
- style="min-width: 80px; margin: 5px; border: 4px; padding: 7px;
- -moz-appearance: none;"/>
- <menu id="menu">
- <menupopup id="popup" style="-moz-appearance: none; margin:0; border: 0; padding: 0;"
- onpopupshown="menuOpened()"
- onpopuphidden="if (event.target == this) SimpleTest.finish()">
- <menuitem label="One"/>
- <menu id="submenu" label="Three">
- <menupopup id="subpopup" style="-moz-appearance: none; margin:0; border: 0; padding: 0;"
- onpopupshown="submenuOpened()">
- <menuitem label="Four"/>
- </menupopup>
- </menu>
- </menupopup>
- </menu>
- <button label="2" maxwidth="100" maxheight="20" style="margin: 5px;"/>
- <button label="3" maxwidth="100" maxheight="20" style="margin: 5px;"/>
- <button label="4" maxwidth="100" maxheight="20" style="margin: 5px;"/>
- </vbox>
- <box height="200"/>
- </scrollbox>
- </deck>
-</scrollbox>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-<script>
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-function runTest()
-{
- var winwidth = document.documentElement.boxObject.width;
- var innerscroll = $("innerscroll").boxObject.width;
-
- var box1 = $("box1");
- checkPosition("box1", box1, 0, 0, winwidth, 46);
-
- var box2 = $("box2");
- checkPosition("box2", box2, 2, 46, winwidth, 96);
-
- // height is height(box1) = 46 + margin-top(box3) = 1 + margin-top(button1) = 5
- var button1 = $("button1");
- checkPosition("button1", button1, 9, 53, 99, 88);
-
- var sbo = box2.boxObject;
- sbo.scrollTo(7, 16);
-
- // clientRect height is offset from root so is 16 pixels vertically less
- checkPosition("button1 scrolled", button1, 9, 37, 99, 72);
-
- var box3 = $("box3");
- sbo = box3.boxObject;
- sbo.scrollTo(1, 2);
-
- checkPosition("button1 scrolled", button1, 9, 35, 99, 70);
-
- $("menu").open = true;
-}
-
-function menuOpened()
-{
- $("submenu").open = true;
-}
-
-function submenuOpened()
-{
- var menu = $("menu");
- var menuleft = Math.round(menu.getBoundingClientRect().left);
- var menubottom = Math.round(menu.getBoundingClientRect().bottom);
-
- var submenu = $("submenu");
- var submenutop = Math.round(submenu.getBoundingClientRect().top);
- var submenuright = Math.round(submenu.getBoundingClientRect().right);
-
- checkPosition("popup", $("popup"), menuleft, menubottom, -1, -1);
- checkPosition("subpopup", $("subpopup"), submenuright, submenutop, -1, -1);
-
- menu.open = false;
-}
-
-function checkPosition(testid, elem, cleft, ctop, cright, cbottom)
-{
- // -1 for right or bottom means that the exact size should not be
- // checked, just ensure it is larger then the left or top position
- var rect = elem.getBoundingClientRect();
- is(Math.round(rect.left), cleft, testid + " client rect left");
- if (testid != "popup")
- is(Math.round(rect.top), ctop, testid + " client rect top");
- if (cright >= 0)
- is(Math.round(rect.right), cright, testid + " client rect right");
- else
- ok(rect.right - rect.left > 20, testid + " client rect right");
- if (cbottom >= 0)
- is(Math.round(rect.bottom), cbottom, testid + " client rect bottom");
- else
- ok(rect.bottom - rect.top > 15, testid + " client rect bottom");
-}
-
-]]>
-
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_preferences.xul b/toolkit/content/tests/chrome/test_preferences.xul
deleted file mode 100644
index 22e7e2fe96..0000000000
--- a/toolkit/content/tests/chrome/test_preferences.xul
+++ /dev/null
@@ -1,533 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Preferences Window Tests"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="RunTest();">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
- <script type="application/javascript">
- <![CDATA[
- SimpleTest.waitForExplicitFinish();
-
- const kPref = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefBranch);
-
- // preference values, set 1
- const kPrefValueSet1 =
- {
- int: 23,
- bool: true,
- string: "rheeet!",
- wstring_data: "日本語",
- unichar_data: "äöüßÄÖÜ",
- file_data: "/",
-
- wstring: Components.classes["@mozilla.org/pref-localizedstring;1"]
- .createInstance(Components.interfaces.nsIPrefLocalizedString),
- unichar: Components.classes["@mozilla.org/supports-string;1"]
- .createInstance(Components.interfaces.nsISupportsString),
- file: Components.classes["@mozilla.org/file/local;1"]
- .createInstance(Components.interfaces.nsILocalFile)
- };
- kPrefValueSet1.wstring.data = kPrefValueSet1.wstring_data;
- kPrefValueSet1.unichar.data = kPrefValueSet1.unichar_data;
- SafeFileInit(kPrefValueSet1.file, kPrefValueSet1.file_data);
-
- // preference values, set 2
- const kPrefValueSet2 =
- {
- int: 42,
- bool: false,
- string: "Mozilla",
- wstring_data: "헤드라인A",
- unichar_data: "áôùšŽ",
- file_data: "/home",
-
- wstring: Components.classes["@mozilla.org/pref-localizedstring;1"]
- .createInstance(Components.interfaces.nsIPrefLocalizedString),
- unichar: Components.classes["@mozilla.org/supports-string;1"]
- .createInstance(Components.interfaces.nsISupportsString),
- file: Components.classes["@mozilla.org/file/local;1"]
- .createInstance(Components.interfaces.nsILocalFile)
- };
- kPrefValueSet2.wstring.data = kPrefValueSet2.wstring_data;
- kPrefValueSet2.unichar.data = kPrefValueSet2.unichar_data;
- SafeFileInit(kPrefValueSet2.file, kPrefValueSet2.file_data);
-
-
- function SafeFileInit(aFile, aPath)
- {
- // set file path without dying for exceptions
- try
- {
- aFile.initWithPath(aPath);
- }
- catch (ignored) {}
- }
-
- function CreateEmptyPrefValueSet()
- {
- var result =
- {
- int: undefined,
- bool: undefined,
- string: undefined,
- wstring_data: undefined,
- unichar_data: undefined,
- file_data: undefined,
- wstring: undefined,
- unichar: undefined,
- file: undefined
- };
- return result;
- }
-
- function WritePrefsToSystem(aPrefValueSet)
- {
- // write preference data via XPCOM
- kPref.setIntPref ("tests.static_preference_int", aPrefValueSet.int);
- kPref.setBoolPref("tests.static_preference_bool", aPrefValueSet.bool);
- kPref.setCharPref("tests.static_preference_string", aPrefValueSet.string);
- kPref.setComplexValue("tests.static_preference_wstring",
- Components.interfaces.nsIPrefLocalizedString,
- aPrefValueSet.wstring);
- kPref.setComplexValue("tests.static_preference_unichar",
- Components.interfaces.nsISupportsString,
- aPrefValueSet.unichar);
- kPref.setComplexValue("tests.static_preference_file",
- Components.interfaces.nsILocalFile,
- aPrefValueSet.file);
- }
-
- function ReadPrefsFromSystem()
- {
- // read preference data via XPCOM
- var result = CreateEmptyPrefValueSet();
- try {result.int = kPref.getIntPref ("tests.static_preference_int") } catch (ignored) {};
- try {result.bool = kPref.getBoolPref("tests.static_preference_bool") } catch (ignored) {};
- try {result.string = kPref.getCharPref("tests.static_preference_string")} catch (ignored) {};
- try
- {
- result.wstring = kPref.getComplexValue("tests.static_preference_wstring",
- Components.interfaces.nsIPrefLocalizedString);
- result.wstring_data = result.wstring.data;
- }
- catch (ignored) {};
- try
- {
- result.unichar = kPref.getComplexValue("tests.static_preference_unichar",
- Components.interfaces.nsISupportsString);
- result.unichar_data = result.unichar.data;
- }
- catch (ignored) {};
- try
- {
- result.file = kPref.getComplexValue("tests.static_preference_file",
- Components.interfaces.nsILocalFile);
- result.file_data = result.file.data;
- }
- catch (ignored) {};
- return result;
- }
-
- function GetXULElement(aPrefWindow, aID)
- {
- return aPrefWindow.document.getElementById(aID);
- }
-
- function WritePrefsToPreferences(aPrefWindow, aPrefValueSet)
- {
- // write preference data into <preference>s
- GetXULElement(aPrefWindow, "tests.static_preference_int" ).value = aPrefValueSet.int;
- GetXULElement(aPrefWindow, "tests.static_preference_bool" ).value = aPrefValueSet.bool;
- GetXULElement(aPrefWindow, "tests.static_preference_string" ).value = aPrefValueSet.string;
- GetXULElement(aPrefWindow, "tests.static_preference_wstring").value = aPrefValueSet.wstring_data;
- GetXULElement(aPrefWindow, "tests.static_preference_unichar").value = aPrefValueSet.unichar_data;
- GetXULElement(aPrefWindow, "tests.static_preference_file" ).value = aPrefValueSet.file_data;
- }
-
- function ReadPrefsFromPreferences(aPrefWindow)
- {
- // read preference data from <preference>s
- var result =
- {
- int: GetXULElement(aPrefWindow, "tests.static_preference_int" ).value,
- bool: GetXULElement(aPrefWindow, "tests.static_preference_bool" ).value,
- string: GetXULElement(aPrefWindow, "tests.static_preference_string" ).value,
- wstring_data: GetXULElement(aPrefWindow, "tests.static_preference_wstring").value,
- unichar_data: GetXULElement(aPrefWindow, "tests.static_preference_unichar").value,
- file_data: GetXULElement(aPrefWindow, "tests.static_preference_file" ).value,
- wstring: Components.classes["@mozilla.org/pref-localizedstring;1"]
- .createInstance(Components.interfaces.nsIPrefLocalizedString),
- unichar: Components.classes["@mozilla.org/supports-string;1"]
- .createInstance(Components.interfaces.nsISupportsString),
- file: Components.classes["@mozilla.org/file/local;1"]
- .createInstance(Components.interfaces.nsILocalFile)
- }
- result.wstring.data = result.wstring_data;
- result.unichar.data = result.unichar_data;
- SafeFileInit(result.file, result.file_data);
- return result;
- }
-
- function WritePrefsToUI(aPrefWindow, aPrefValueSet)
- {
- // write preference data into UI elements
- GetXULElement(aPrefWindow, "static_element_int" ).value = aPrefValueSet.int;
- GetXULElement(aPrefWindow, "static_element_bool" ).checked = aPrefValueSet.bool;
- GetXULElement(aPrefWindow, "static_element_string" ).value = aPrefValueSet.string;
- GetXULElement(aPrefWindow, "static_element_wstring").value = aPrefValueSet.wstring_data;
- GetXULElement(aPrefWindow, "static_element_unichar").value = aPrefValueSet.unichar_data;
- GetXULElement(aPrefWindow, "static_element_file" ).value = aPrefValueSet.file_data;
- }
-
- function ReadPrefsFromUI(aPrefWindow)
- {
- // read preference data from <preference>s
- var result =
- {
- int: GetXULElement(aPrefWindow, "static_element_int" ).value,
- bool: GetXULElement(aPrefWindow, "static_element_bool" ).checked,
- string: GetXULElement(aPrefWindow, "static_element_string" ).value,
- wstring_data: GetXULElement(aPrefWindow, "static_element_wstring").value,
- unichar_data: GetXULElement(aPrefWindow, "static_element_unichar").value,
- file_data: GetXULElement(aPrefWindow, "static_element_file" ).value,
- wstring: Components.classes["@mozilla.org/pref-localizedstring;1"]
- .createInstance(Components.interfaces.nsIPrefLocalizedString),
- unichar: Components.classes["@mozilla.org/supports-string;1"]
- .createInstance(Components.interfaces.nsISupportsString),
- file: Components.classes["@mozilla.org/file/local;1"]
- .createInstance(Components.interfaces.nsILocalFile)
- }
- result.wstring.data = result.wstring_data;
- result.unichar.data = result.unichar_data;
- SafeFileInit(result.file, result.file_data);
- return result;
- }
-
-
- function RunInstantPrefTest(aPrefWindow)
- {
- // remark: there's currently no UI element binding for files
-
- // were all <preferences> correctly initialized?
- var expected = kPrefValueSet1;
- var found = ReadPrefsFromPreferences(aPrefWindow);
- ok(found.int === expected.int, "instant pref init int" );
- ok(found.bool === expected.bool, "instant pref init bool" );
- ok(found.string === expected.string, "instant pref init string" );
- ok(found.wstring_data === expected.wstring_data, "instant pref init wstring");
- ok(found.unichar_data === expected.unichar_data, "instant pref init unichar");
- todo(found.file_data === expected.file_data, "instant pref init file" );
-
- // were all elements correctly initialized? (loose check)
- found = ReadPrefsFromUI(aPrefWindow);
- ok(found.int == expected.int, "instant element init int" );
- ok(found.bool == expected.bool, "instant element init bool" );
- ok(found.string == expected.string, "instant element init string" );
- ok(found.wstring_data == expected.wstring_data, "instant element init wstring");
- ok(found.unichar_data == expected.unichar_data, "instant element init unichar");
- todo(found.file_data == expected.file_data, "instant element init file" );
-
- // do some changes in the UI
- expected = kPrefValueSet2;
- WritePrefsToUI(aPrefWindow, expected);
-
- // UI changes should get passed to the <preference>s,
- // but currently they aren't if the changes are made programmatically
- // (the handlers preference.change/prefpane.input and prefpane.change
- // are called for manual changes, though).
- found = ReadPrefsFromPreferences(aPrefWindow);
- todo(found.int === expected.int, "instant change pref int" );
- todo(found.bool === expected.bool, "instant change pref bool" );
- todo(found.string === expected.string, "instant change pref string" );
- todo(found.wstring_data === expected.wstring_data, "instant change pref wstring");
- todo(found.unichar_data === expected.unichar_data, "instant change pref unichar");
- todo(found.file_data === expected.file_data, "instant change pref file" );
-
- // and these changes should get passed to the system instantly
- // (which obviously can't pass with the above failing)
- found = ReadPrefsFromSystem();
- todo(found.int === expected.int, "instant change element int" );
- todo(found.bool === expected.bool, "instant change element bool" );
- todo(found.string === expected.string, "instant change element string" );
- todo(found.wstring_data === expected.wstring_data, "instant change element wstring");
- todo(found.unichar_data === expected.unichar_data, "instant change element unichar");
- todo(found.file_data === expected.file_data, "instant change element file" );
-
- // try resetting the prefs to default values (which should be empty here)
- GetXULElement(aPrefWindow, "tests.static_preference_int" ).reset();
- GetXULElement(aPrefWindow, "tests.static_preference_bool" ).reset();
- GetXULElement(aPrefWindow, "tests.static_preference_string" ).reset();
- GetXULElement(aPrefWindow, "tests.static_preference_wstring").reset();
- GetXULElement(aPrefWindow, "tests.static_preference_unichar").reset();
- GetXULElement(aPrefWindow, "tests.static_preference_file" ).reset();
-
- // check system
- expected = CreateEmptyPrefValueSet();
- found = ReadPrefsFromSystem();
- ok(found.int === expected.int, "instant reset system int" );
- ok(found.bool === expected.bool, "instant reset system bool" );
- ok(found.string === expected.string, "instant reset system string" );
- ok(found.wstring_data === expected.wstring_data, "instant reset system wstring");
- ok(found.unichar_data === expected.unichar_data, "instant reset system unichar");
- ok(found.file_data === expected.file_data, "instant reset system file" );
-
- // check UI
- expected =
- {
- // alas, we don't have XUL elements with typeof(value) == int :(
- // int: 0,
- int: "",
- bool: false,
- string: "",
- wstring_data: "",
- unichar_data: "",
- file_data: "",
- wstring: {},
- unichar: {},
- file: {}
- };
- found = ReadPrefsFromUI(aPrefWindow);
- ok(found.int === expected.int, "instant reset element int" );
- ok(found.bool === expected.bool, "instant reset element bool" );
- ok(found.string === expected.string, "instant reset element string" );
- ok(found.wstring_data === expected.wstring_data, "instant reset element wstring");
- ok(found.unichar_data === expected.unichar_data, "instant reset element unichar");
-// ok(found.file_data === expected.file_data, "instant reset element file" );
-
- // check hasUserValue
- ok(GetXULElement(aPrefWindow, "tests.static_preference_int" ).hasUserValue === false, "instant reset hasUserValue int" );
- ok(GetXULElement(aPrefWindow, "tests.static_preference_bool" ).hasUserValue === false, "instant reset hasUserValue bool" );
- ok(GetXULElement(aPrefWindow, "tests.static_preference_string" ).hasUserValue === false, "instant reset hasUserValue string" );
- ok(GetXULElement(aPrefWindow, "tests.static_preference_wstring").hasUserValue === false, "instant reset hasUserValue wstring");
- ok(GetXULElement(aPrefWindow, "tests.static_preference_unichar").hasUserValue === false, "instant reset hasUserValue unichar");
- ok(GetXULElement(aPrefWindow, "tests.static_preference_file" ).hasUserValue === false, "instant reset hasUserValue file" );
-
- // done with instant apply checks
- }
-
- function RunNonInstantPrefTestGeneral(aPrefWindow)
- {
- // Non-instant apply tests are harder: not only do we need to check that
- // fiddling with the values does *not* change the system settings, but
- // also that they *are* (not) set after closing (cancelling) the dialog...
-
- // remark: there's currently no UI element binding for files
-
- // were all <preferences> correctly initialized?
- var expected = kPrefValueSet1;
- var found = ReadPrefsFromPreferences(aPrefWindow);
- ok(found.int === expected.int, "non-instant pref init int" );
- ok(found.bool === expected.bool, "non-instant pref init bool" );
- ok(found.string === expected.string, "non-instant pref init string" );
- ok(found.wstring_data === expected.wstring_data, "non-instant pref init wstring");
- ok(found.unichar_data === expected.unichar_data, "non-instant pref init unichar");
- todo(found.file_data === expected.file_data, "non-instant pref init file" );
-
- // were all elements correctly initialized? (loose check)
- found = ReadPrefsFromUI(aPrefWindow);
- ok(found.int == expected.int, "non-instant element init int" );
- ok(found.bool == expected.bool, "non-instant element init bool" );
- ok(found.string == expected.string, "non-instant element init string" );
- ok(found.wstring_data == expected.wstring_data, "non-instant element init wstring");
- ok(found.unichar_data == expected.unichar_data, "non-instant element init unichar");
- todo(found.file_data == expected.file_data, "non-instant element init file" );
-
- // do some changes in the UI
- expected = kPrefValueSet2;
- WritePrefsToUI(aPrefWindow, expected);
-
- // UI changes should get passed to the <preference>s,
- // but currently they aren't if the changes are made programmatically
- // (the handlers preference.change/prefpane.input and prefpane.change
- // are called for manual changes, though).
- found = ReadPrefsFromPreferences(aPrefWindow);
- todo(found.int === expected.int, "non-instant change pref int" );
- todo(found.bool === expected.bool, "non-instant change pref bool" );
- todo(found.string === expected.string, "non-instant change pref string" );
- todo(found.wstring_data === expected.wstring_data, "non-instant change pref wstring");
- todo(found.unichar_data === expected.unichar_data, "non-instant change pref unichar");
- todo(found.file_data === expected.file_data, "non-instant change pref file" );
-
- // and these changes should *NOT* get passed to the system
- // (which obviously always passes with the above failing)
- expected = kPrefValueSet1;
- found = ReadPrefsFromSystem();
- ok(found.int === expected.int, "non-instant change element int" );
- ok(found.bool === expected.bool, "non-instant change element bool" );
- ok(found.string === expected.string, "non-instant change element string" );
- ok(found.wstring_data === expected.wstring_data, "non-instant change element wstring");
- ok(found.unichar_data === expected.unichar_data, "non-instant change element unichar");
- todo(found.file_data === expected.file_data, "non-instant change element file" );
-
- // try resetting the prefs to default values (which should be empty here)
- GetXULElement(aPrefWindow, "tests.static_preference_int" ).reset();
- GetXULElement(aPrefWindow, "tests.static_preference_bool" ).reset();
- GetXULElement(aPrefWindow, "tests.static_preference_string" ).reset();
- GetXULElement(aPrefWindow, "tests.static_preference_wstring").reset();
- GetXULElement(aPrefWindow, "tests.static_preference_unichar").reset();
- GetXULElement(aPrefWindow, "tests.static_preference_file" ).reset();
-
- // check system: the current values *MUST NOT* change
- expected = kPrefValueSet1;
- found = ReadPrefsFromSystem();
- ok(found.int === expected.int, "non-instant reset system int" );
- ok(found.bool === expected.bool, "non-instant reset system bool" );
- ok(found.string === expected.string, "non-instant reset system string" );
- ok(found.wstring_data === expected.wstring_data, "non-instant reset system wstring");
- ok(found.unichar_data === expected.unichar_data, "non-instant reset system unichar");
- todo(found.file_data === expected.file_data, "non-instant reset system file" );
-
- // check UI: these values should be reset
- expected =
- {
- // alas, we don't have XUL elements with typeof(value) == int :(
- // int: 0,
- int: "",
- bool: false,
- string: "",
- wstring_data: "",
- unichar_data: "",
- file_data: "",
- wstring: {},
- unichar: {},
- file: {}
- };
- found = ReadPrefsFromUI(aPrefWindow);
- ok(found.int === expected.int, "non-instant reset element int" );
- ok(found.bool === expected.bool, "non-instant reset element bool" );
- ok(found.string === expected.string, "non-instant reset element string" );
- ok(found.wstring_data === expected.wstring_data, "non-instant reset element wstring");
- ok(found.unichar_data === expected.unichar_data, "non-instant reset element unichar");
-// ok(found.file_data === expected.file_data, "non-instant reset element file" );
-
- // check hasUserValue
- ok(GetXULElement(aPrefWindow, "tests.static_preference_int" ).hasUserValue === false, "non-instant reset hasUserValue int" );
- ok(GetXULElement(aPrefWindow, "tests.static_preference_bool" ).hasUserValue === false, "non-instant reset hasUserValue bool" );
- ok(GetXULElement(aPrefWindow, "tests.static_preference_string" ).hasUserValue === false, "non-instant reset hasUserValue string" );
- ok(GetXULElement(aPrefWindow, "tests.static_preference_wstring").hasUserValue === false, "non-instant reset hasUserValue wstring");
- ok(GetXULElement(aPrefWindow, "tests.static_preference_unichar").hasUserValue === false, "non-instant reset hasUserValue unichar");
- ok(GetXULElement(aPrefWindow, "tests.static_preference_file" ).hasUserValue === false, "non-instant reset hasUserValue file" );
- }
-
- function RunNonInstantPrefTestClose(aPrefWindow)
- {
- WritePrefsToPreferences(aPrefWindow, kPrefValueSet2);
- }
-
- function RunCheckCommandRedirect(aPrefWindow)
- {
- GetXULElement(aPrefWindow, "checkbox").click();
- ok(GetXULElement(aPrefWindow, "tests.static_preference_bool").value, "redirected command bool");
- GetXULElement(aPrefWindow, "checkbox").click();
- ok(!GetXULElement(aPrefWindow, "tests.static_preference_bool").value, "redirected command bool");
- }
-
- function RunResetPrefTest(aPrefWindow)
- {
- // try resetting the prefs to default values
- GetXULElement(aPrefWindow, "tests.static_preference_int" ).reset();
- GetXULElement(aPrefWindow, "tests.static_preference_bool" ).reset();
- GetXULElement(aPrefWindow, "tests.static_preference_string" ).reset();
- GetXULElement(aPrefWindow, "tests.static_preference_wstring").reset();
- GetXULElement(aPrefWindow, "tests.static_preference_unichar").reset();
- GetXULElement(aPrefWindow, "tests.static_preference_file" ).reset();
- }
-
- function InitTestPrefs(aInstantApply)
- {
- // set instant apply mode and init prefs to set 1
- kPref.setBoolPref("browser.preferences.instantApply", aInstantApply);
- WritePrefsToSystem(kPrefValueSet1);
- }
-
- function RunTestInstant()
- {
- // test with instantApply
- InitTestPrefs(true);
- openDialog("window_preferences.xul", "", "modal", RunInstantPrefTest, false);
-
- // - test deferred reset in child window
- InitTestPrefs(true);
- openDialog("window_preferences2.xul", "", "modal", RunResetPrefTest, false);
- expected = kPrefValueSet1;
- found = ReadPrefsFromSystem();
- ok(found.int === expected.int, "instant reset deferred int" );
- ok(found.bool === expected.bool, "instant reset deferred bool" );
- ok(found.string === expected.string, "instant reset deferred string" );
- ok(found.wstring_data === expected.wstring_data, "instant reset deferred wstring");
- ok(found.unichar_data === expected.unichar_data, "instant reset deferred unichar");
- todo(found.file_data === expected.file_data, "instant reset deferred file" );
- }
-
- function RunTestNonInstant()
- {
- // test without instantApply
- // - general tests, similar to instant apply
- InitTestPrefs(false);
- openDialog("window_preferences.xul", "", "modal", RunNonInstantPrefTestGeneral, false);
-
- // - test Cancel
- InitTestPrefs(false);
- openDialog("window_preferences.xul", "", "modal", RunNonInstantPrefTestClose, false);
- var expected = kPrefValueSet1;
- var found = ReadPrefsFromSystem();
- ok(found.int === expected.int, "non-instant cancel system int" );
- ok(found.bool === expected.bool, "non-instant cancel system bool" );
- ok(found.string === expected.string, "non-instant cancel system string" );
- ok(found.wstring_data === expected.wstring_data, "non-instant cancel system wstring");
- ok(found.unichar_data === expected.unichar_data, "non-instant cancel system unichar");
- todo(found.file_data === expected.file_data, "non-instant cancel system file" );
-
- // - test Accept
- InitTestPrefs(false);
- openDialog("window_preferences.xul", "", "modal", RunNonInstantPrefTestClose, true);
- expected = kPrefValueSet2;
- found = ReadPrefsFromSystem();
- ok(found.int === expected.int, "non-instant accept system int" );
- ok(found.bool === expected.bool, "non-instant accept system bool" );
- ok(found.string === expected.string, "non-instant accept system string" );
- ok(found.wstring_data === expected.wstring_data, "non-instant accept system wstring");
- ok(found.unichar_data === expected.unichar_data, "non-instant accept system unichar");
- todo(found.file_data === expected.file_data, "non-instant accept system file" );
-
- // - test deferred reset in child window
- InitTestPrefs(false);
- openDialog("window_preferences2.xul", "", "modal", RunResetPrefTest, true);
- expected = CreateEmptyPrefValueSet();
- found = ReadPrefsFromSystem();
- ok(found.int === expected.int, "non-instant reset deferred int" );
- ok(found.bool === expected.bool, "non-instant reset deferred bool" );
- ok(found.string === expected.string, "non-instant reset deferred string" );
- ok(found.wstring_data === expected.wstring_data, "non-instant reset deferred wstring");
- ok(found.unichar_data === expected.unichar_data, "non-instant reset deferred unichar");
- ok(found.file_data === expected.file_data, "non-instant reset deferred file" );
- }
-
- function RunTestCommandRedirect()
- {
- openDialog("window_preferences_commandretarget.xul", "", "modal", RunCheckCommandRedirect, true);
- }
-
- function RunTest()
- {
- RunTestInstant();
- RunTestNonInstant();
- RunTestCommandRedirect();
- SimpleTest.finish();
- }
- ]]>
- </script>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
- </body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_preferences_beforeaccept.xul b/toolkit/content/tests/chrome/test_preferences_beforeaccept.xul
deleted file mode 100644
index a1abad3cc9..0000000000
--- a/toolkit/content/tests/chrome/test_preferences_beforeaccept.xul
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Preferences Window beforeaccept Tests"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/MochiKit/packed.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
- <script type="application/javascript">
- <![CDATA[
- SimpleTest.waitForExplicitFinish();
- SpecialPowers.pushPrefEnv({"set":[["browser.preferences.instantApply", false]]}, function() {
-
- // No instant-apply for this test
- var prefWindow = openDialog("window_preferences_beforeaccept.xul", "", "", windowOnload);
-
- function windowOnload() {
- var dialogShown = prefWindow.document.getElementById("tests.beforeaccept.dialogShown");
- var called = prefWindow.document.getElementById("tests.beforeaccept.called");
- is(dialogShown.value, true, "dialog opened, shown pref set");
- is(dialogShown.valueFromPreferences, null, "shown pref not committed");
- is(called.value, null, "beforeaccept not yet called");
- is(called.valueFromPreferences, null, "beforeaccept not yet called, pref not committed");
-
- // try to accept the dialog, should fail the first time
- prefWindow.document.documentElement.acceptDialog();
- is(prefWindow.closed, false, "window not closed");
- is(dialogShown.value, true, "shown pref still set");
- is(dialogShown.valueFromPreferences, null, "shown pref still not committed");
- is(called.value, true, "beforeaccept called");
- is(called.valueFromPreferences, null, "called pref not committed");
-
- // try again, this one should succeed
- prefWindow.document.documentElement.acceptDialog();
- is(prefWindow.closed, true, "window now closed");
- is(dialogShown.valueFromPreferences, true, "shown pref committed");
- is(called.valueFromPreferences, true, "called pref committed");
-
- SimpleTest.finish();
- }
-});
- ]]>
- </script>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
- </body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_preferences_onsyncfrompreference.xul b/toolkit/content/tests/chrome/test_preferences_onsyncfrompreference.xul
deleted file mode 100644
index 8a191d97a1..0000000000
--- a/toolkit/content/tests/chrome/test_preferences_onsyncfrompreference.xul
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!-- 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/. -->
-<window title="Preferences Window beforeaccept Tests"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/MochiKit/packed.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
- <script type="application/javascript">
- <![CDATA[
- const PREFS = ['tests.onsyncfrompreference.pref1',
- 'tests.onsyncfrompreference.pref2',
- 'tests.onsyncfrompreference.pref3'];
-
- SimpleTest.waitForExplicitFinish();
-
- for (let pref of PREFS) {
- SpecialPowers.setIntPref(pref, 1);
- }
-
- let counter = 0;
- let prefWindow = openDialog("window_preferences_onsyncfrompreference.xul", "", "", onSync);
-
- SimpleTest.registerCleanupFunction(() => {
- for (let pref of PREFS) {
- SpecialPowers.clearUserPref(pref);
- }
- prefWindow.close();
- });
-
- // Onsyncfrompreference handler for the prefs
- function onSync() {
- for (let pref of PREFS) {
- // The `value` field of each <preference> element should be initialized by now.
-
- is(SpecialPowers.getIntPref(pref), prefWindow.document.getElementById(pref).value,
- "Pref constructor was called correctly")
- }
-
- counter++;
-
- if (counter == PREFS.length) {
- SimpleTest.finish();
- }
- return true;
- }
- ]]>
- </script>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
- </body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_progressmeter.xul b/toolkit/content/tests/chrome/test_progressmeter.xul
deleted file mode 100644
index 7810f69915..0000000000
--- a/toolkit/content/tests/chrome/test_progressmeter.xul
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for progressmeter
- -->
-<window title="Progressmeter" width="500" height="600"
- onload="doTests()"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <progressmeter id="n1"/>
- <progressmeter id="n2" mode="undetermined"/>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-SimpleTest.waitForExplicitFinish();
-
-function doTests() {
- var n1 = document.getElementById("n1");
- var n2 = document.getElementById("n2");
-
- SimpleTest.is(n1.mode, "", "mode determined");
- SimpleTest.is(n2.mode, "undetermined", "mode undetermined");
-
- SimpleTest.is(n1.value, "0", "determined value");
- SimpleTest.is(n2.value, "0", "undetermined value");
-
- // values can only be incremented in multiples of 4
- n1.value = 2;
- SimpleTest.is(n1.value, "0", "determined value set 2");
- n1.value = -1;
- SimpleTest.is(n1.value, "0", "determined value set -1");
- n1.value = 125;
- SimpleTest.is(n1.value, "100", "determined value set 125");
- n1.value = 7;
- SimpleTest.is(n1.value, "7", "determined value set 7");
- n1.value = "17";
- SimpleTest.is(n1.value, "17", "determined value set 17 string");
- n1.value = 18;
- SimpleTest.is(n1.value, "17", "determined value set 18");
- n1.value = "Cat";
- SimpleTest.is(n1.value, "17", "determined value set invalid");
-
- n1.max = 200;
- is(n1.max, "200", "max changed");
- n1.value = 150;
- n1.max = 120;
- is(n1.value, "120", "max lowered below value");
-
- n2.value = 2;
- SimpleTest.is(n2.value, "0", "undetermined value set 2");
- n2.value = -1;
- SimpleTest.is(n2.value, "0", "undetermined value set -1");
- n2.value = 125;
- SimpleTest.is(n2.value, "100", "undetermined value set 125");
- n2.value = 7;
- SimpleTest.is(n2.value, "7", "undetermined value set 7");
- n2.value = "17";
- SimpleTest.is(n2.value, "17", "undetermined value set 17 string");
- n2.value = 18;
- SimpleTest.is(n2.value, "17", "undetermined value set 18");
- n2.value = "Cat";
- SimpleTest.is(n2.value, "17", "determined value set invalid");
-
- SimpleTest.finish();
-}
-
-]]></script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_props.xul b/toolkit/content/tests/chrome/test_props.xul
deleted file mode 100644
index 17513df5c7..0000000000
--- a/toolkit/content/tests/chrome/test_props.xul
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for basic properties - this test checks that the basic
- properties defined in general.xml and inherited by a number of elements
- work properly.
- -->
-<window title="Basic Properties Test"
- onload="setTimeout(test_props, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<command id="cmd_nothing"/>
-<command id="cmd_action"/>
-
-<button id="button" label="Button" accesskey="B"
- crop="end" image="happy.png" command="cmd_nothing"/>
-<checkbox id="checkbox" label="Checkbox" accesskey="B"
- crop="end" image="happy.png" command="cmd_nothing"/>
-<radiogroup>
- <radio id="radio" label="Radio Button" value="rb1" accesskey="B"
- crop="end" image="happy.png" command="cmd_nothing"/>
-</radiogroup>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-function test_props()
-{
- test_props_forelement($("button"), "Button", null);
- test_props_forelement($("checkbox"), "Checkbox", null);
- test_props_forelement($("radio"), "Radio Button", "rb1");
-
- SimpleTest.finish();
-}
-
-function test_props_forelement(element, label, value)
-{
- // check the initial values
- is(element.label, label, "element label");
- if (value)
- is(element.value, value, "element value");
- is(element.accessKey, "B", "element accessKey");
- is(element.crop, "end", "element crop");
- is(element.image, "happy.png", "element image");
- is(element.command, "cmd_nothing", "element command");
- ok(element.tabIndex === 0, "element tabIndex");
-
- synthesizeMouseExpectEvent(element, 4, 4, { }, $("cmd_nothing"), "command", "element");
-
- // make sure that setters return the value
- is(element.label = "Label", "Label", "element label setter return");
- if (value)
- is(element.value = "lb", "lb", "element value setter return");
- is(element.accessKey = "L", "L", "element accessKey setter return");
- is(element.crop = "start", "start", "element crop setter return");
- is(element.image = "sad.png", "sad.png", "element image setter return");
- is(element.command = "cmd_action", "cmd_action", "element command setter return");
-
- // check the value after it was changed
- is(element.label, "Label", "element label after set");
- if (value)
- is(element.value, "lb", "element value after set");
- is(element.accessKey, "L", "element accessKey after set");
- is(element.crop, "start", "element crop after set");
- is(element.image, "sad.png", "element image after set");
- is(element.command, "cmd_action", "element command after set");
-
- synthesizeMouseExpectEvent(element, 4, 4, { }, $("cmd_action"), "command", "element");
-
- // check that clicks on disabled items don't fire a command event
- ok((element.disabled = true) === true, "element disabled setter return");
- ok(element.disabled === true, "element disabled after set");
- synthesizeMouseExpectEvent(element, 4, 4, { }, $("cmd_action"), "!command", "element");
-
- element.disabled = false;
-}
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_radio.xul b/toolkit/content/tests/chrome/test_radio.xul
deleted file mode 100644
index 74ab66a34e..0000000000
--- a/toolkit/content/tests/chrome/test_radio.xul
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for radio buttons
- -->
-<window title="Radio Buttons" width="500" height="600"
- onload="setTimeout(test_radio, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
- <script type="application/javascript" src="xul_selectcontrol.js"/>
-
-<radiogroup id="radiogroup"/>
-
-<radiogroup id="radiogroup-initwithvalue" value="two">
- <radio label="One" value="one"/>
- <radio label="Two" value="two"/>
- <radio label="Three" value="three"/>
-</radiogroup>
-<radiogroup id="radiogroup-initwithselected" value="two">
- <radio id="one" label="One" value="one" accesskey="o"/>
- <radio id="two" label="Two" value="two" accesskey="t"/>
- <radio label="Three" value="three" selected="true"/>
-</radiogroup>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-function test_radio()
-{
- var element = document.getElementById("radiogroup");
- test_nsIDOMXULSelectControlElement(element, "radio", null);
- test_nsIDOMXULSelectControlElement_UI(element, null);
-
- window.blur();
-
- var accessKeyDetails = (navigator.platform.indexOf("Mac") >= 0) ?
- { altKey : true, ctrlKey : true } :
- { altKey : true, shiftKey: true };
- synthesizeKey("t", accessKeyDetails);
-
- var radiogroup = $("radiogroup-initwithselected");
- is(document.activeElement, radiogroup, "accesskey focuses radiogroup");
- is(radiogroup.selectedItem, $("two"), "accesskey selects radio");
-
- $("radiogroup-initwithvalue").focus();
-
- $("one").disabled = true;
- synthesizeKey("o", accessKeyDetails);
-
- is(document.activeElement, $("radiogroup-initwithvalue"), "accesskey on disabled radio doesn't focus");
- is(radiogroup.selectedItem, $("two"), "accesskey on disabled radio doesn't change selection");
-
- SimpleTest.finish();
-}
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_richlist_direction.xul b/toolkit/content/tests/chrome/test_richlist_direction.xul
deleted file mode 100644
index f94f1b3ba6..0000000000
--- a/toolkit/content/tests/chrome/test_richlist_direction.xul
+++ /dev/null
@@ -1,138 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for listbox direction
- -->
-<window title="Listbox direction test"
- onload="test_richlistbox()"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
- <richlistbox seltype="multiple" id="richlistbox" flex="1" minheight="80" maxheight="80" height="80" />
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-var richListBox = document.getElementById("richlistbox");
-
-function getScrollIndexAmount(aDirection) {
- return (4 * aDirection + richListBox.currentIndex);
-}
-
-function test_richlistbox()
-{
- richListBox.minHeight = richListBox.maxHeight = richListBox.height =
- 80 + (80 - richListBox.scrollBoxObject.height);
- var height = richListBox.scrollBoxObject.height;
- var item;
- do {
- item = richListBox.appendItem("Test", "");
- item.height = item.minHeight = item.maxHeight = Math.floor(height / 4);
- } while (item.getBoundingClientRect().bottom < (height * 2))
- richListBox.appendItem("Test", "");
- richListBox.firstChild.nextSibling.id = "list-box-first";
- richListBox.lastChild.previousSibling.id = "list-box-last";
-
- // direction = "reverse", the values here are backwards due to the fact that
- // richlistboxes respond differently when a user initiates a selection
- richListBox.dir = "reverse";
- var count = richListBox.itemCount;
- richListBox.focus();
- richListBox.selectedIndex = count - 1;
- sendKey("DOWN");
- is(richListBox.currentIndex, count - 2, "Selection should move to the next item");
- sendKey("UP");
- is(richListBox.currentIndex, count - 1, "Selection should move to the previous item");
- sendKey("END");
- is(richListBox.currentIndex, 0, "Selection should move to the last item");
- sendKey("HOME");
- is(richListBox.currentIndex, count - 1, "Selection should move to the first item");
- var currentIndex = richListBox.currentIndex;
- var index = getScrollIndexAmount(-1);
- sendKey("PAGE_DOWN");
- is(richListBox.currentIndex, index, "Selection should move to one page down");
- ok(richListBox.currentIndex < currentIndex, "Selection should move downwards");
- sendKey("END");
- currentIndex = richListBox.currentIndex;
- index = getScrollIndexAmount(1);
- sendKey("PAGE_UP");
- is(richListBox.currentIndex, index, "Selection should move to one page up");
- ok(richListBox.currentIndex > currentIndex, "Selection should move upwards");
- richListBox.selectedItem = richListBox.lastChild;
- richListBox.focus();
- synthesizeKey("KEY_ArrowDown", { shiftKey: true, code: "ArrowDown" }, window);
- let items = [richListBox.selectedItems[0],
- richListBox.selectedItems[1]];
- is(items[0], richListBox.lastChild, "The last element should still be selected");
- is(items[1], richListBox.lastChild.previousSibling, "Both elements should now be selected");
- richListBox.clearSelection();
- richListBox.selectedItem = richListBox.lastChild;
- sendMouseEvent({type: "click", shiftKey: true, clickCount: 1},
- "list-box-last",
- window);
- items = [richListBox.selectedItems[0],
- richListBox.selectedItems[1]];
- is(items[0], richListBox.lastChild, "The last element should still be selected");
- is(items[1], richListBox.lastChild.previousSibling, "Both elements should now be selected");
- richListBox.addEventListener("keypress", function(aEvent) {
- richListBox.removeEventListener("keypress", arguments.callee, true);
- aEvent.preventDefault();
- }, true);
- richListBox.selectedIndex = 1;
- sendKey("HOME");
- is(richListBox.selectedIndex, 1, "A stopped event should return indexing to normal");
-
- // direction = "normal"
- richListBox.dir = "normal";
- richListBox.selectedIndex = 0;
- sendKey("DOWN");
- is(richListBox.currentIndex, 1, "Selection should move to the next item");
- sendKey("UP");
- is(richListBox.currentIndex, 0, "Selection should move to the previous item");
- sendKey("END");
- is(richListBox.currentIndex, count - 1, "Selection should move to the last item");
- sendKey("HOME");
- is(richListBox.currentIndex, 0, "Selection should move to the first item");
- var currentIndex = richListBox.currentIndex;
- var index = richListBox.scrollOnePage(1);
- sendKey("PAGE_DOWN");
- is(richListBox.currentIndex, index, "Selection should move to one page down");
- ok(richListBox.currentIndex > currentIndex, "Selection should move downwards");
- sendKey("END");
- currentIndex = richListBox.currentIndex;
- index = richListBox.scrollOnePage(-1) + richListBox.currentIndex;
- sendKey("PAGE_UP");
- is(richListBox.currentIndex, index, "Selection should move to one page up");
- ok(richListBox.currentIndex < currentIndex, "Selection should move upwards");
- richListBox.selectedItem = richListBox.firstChild;
- richListBox.focus();
- synthesizeKey("KEY_ArrowDown", { shiftKey: true, code: "ArrowDown" }, window);
- items = [richListBox.selectedItems[0],
- richListBox.selectedItems[1]];
- is(items[0], richListBox.firstChild, "The last element should still be selected");
- is(items[1], richListBox.firstChild.nextSibling, "Both elements should now be selected");
- richListBox.clearSelection();
- richListBox.selectedItem = richListBox.firstChild;
- sendMouseEvent({type: "click", shiftKey: true, clickCount: 1},
- "list-box-first",
- window);
- items = [richListBox.selectedItems[0],
- richListBox.selectedItems[1]];
- is(items[0], richListBox.firstChild, "The last element should still be selected");
- is(items[1], richListBox.firstChild.nextSibling, "Both elements should now be selected");
- SimpleTest.finish();
-}
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_righttoleft.xul b/toolkit/content/tests/chrome/test_righttoleft.xul
deleted file mode 100644
index 64b1419daa..0000000000
--- a/toolkit/content/tests/chrome/test_righttoleft.xul
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet
- href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-
-<window title="Right to Left UI Test"
- onload="runTest()"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript"
- src="chrome://mochikit/content/chrome-harness.js"></script>
- <script type="application/javascript"
- src="RegisterUnregisterChrome.js"></script>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none">
- </div>
- <pre id="test">
- </pre>
- </body>
-
- <iframe id="subframe" width="100" height="100" onload="frameLoaded();"/>
-
- <script type="application/javascript">
- <![CDATA[
-
- SimpleTest.waitForExplicitFinish();
-
- let prefs = Cc["@mozilla.org/preferences-service;1"].
- getService(Ci.nsIPrefBranch);
- const UI_DIRECTION_PREF = "intl.uidirection.ar";
- prefs.setCharPref(UI_DIRECTION_PREF, "rtl");
-
- let rootDir = getRootDirectory(window.location.href);
- registerManifestPermanently(rootDir + "rtltest/righttoleft.manifest");
-
- function runTest()
- {
- var subframe = document.getElementById("subframe");
- subframe.setAttribute("src", "chrome://ltrtest/content/dirtest.xul");
- }
-
- function frameLoaded()
- {
- var subframe = document.getElementById("subframe");
- var subwin = subframe.contentWindow;
- var subdoc = subframe.contentDocument;
- var url = String(subwin.location);
- if (url.indexOf("chrome://ltrtest") == 0) {
- is(subwin.getComputedStyle(subdoc.getElementById("hbox"), "").backgroundColor,
- "rgb(255, 255, 0)", "left to right with :-moz-locale-dir(ltr)");
- is(subwin.getComputedStyle(subdoc.getElementById("vbox"), "").backgroundColor,
- "rgb(255, 255, 255)", "left to right with :-moz-locale-dir(rtl)");
-
- is(subwin.getComputedStyle(subdoc.documentElement, "").direction, "ltr",
- "left to right direction");
-
- subdoc.documentElement.setAttribute("localedir", "rtl");
-
- is(subwin.getComputedStyle(subdoc.getElementById("hbox"), "").backgroundColor,
- "rgb(255, 255, 255)", "left to right with :-moz-locale-dir(ltr) and localedir='rtl'");
- is(subwin.getComputedStyle(subdoc.getElementById("vbox"), "").backgroundColor,
- "rgb(0, 128, 0)", "left to right with :-moz-locale-dir(rtl) and localedir='rtl'");
- is(subwin.getComputedStyle(subdoc.documentElement, "").direction, "rtl",
- "left to right direction with localedir='rtl'");
-
- subdoc.documentElement.removeAttribute("localedir");
-
- is(subwin.getComputedStyle(subdoc.getElementById("hbox"), "").backgroundColor,
- "rgb(255, 255, 0)", "left to right with :-moz-locale-dir(ltr) and localedir removed");
- is(subwin.getComputedStyle(subdoc.getElementById("vbox"), "").backgroundColor,
- "rgb(255, 255, 255)", "left to right with :-moz-locale-dir(rtl) and localedir removed");
- is(subwin.getComputedStyle(subdoc.documentElement, "").direction, "ltr",
- "left to right direction with localedir removed");
-
- subframe.setAttribute("src", "chrome://rtltest/content/dirtest.xul");
- }
- else if (url.indexOf("chrome://rtltest") == 0) {
- is(subwin.getComputedStyle(subdoc.getElementById("hbox"), "").backgroundColor,
- "rgb(255, 255, 255)", "right to left with :-moz-locale-dir(ltr)");
- is(subwin.getComputedStyle(subdoc.getElementById("vbox"), "").backgroundColor,
- "rgb(0, 128, 0)", "right to left with :-moz-locale-dir(rtl)");
- is(subwin.getComputedStyle(subdoc.documentElement, "").direction, "rtl",
- "right to left direction");
-
- subdoc.documentElement.setAttribute("localedir", "ltr");
-
- is(subwin.getComputedStyle(subdoc.getElementById("hbox"), "").backgroundColor,
- "rgb(255, 255, 0)", "right to left with :-moz-locale-dir(ltr) and localedir='ltr'");
- is(subwin.getComputedStyle(subdoc.getElementById("vbox"), "").backgroundColor,
- "rgb(255, 255, 255)", "right to left with :-moz-locale-dir(rtl) and localedir='ltr'");
- is(subwin.getComputedStyle(subdoc.documentElement, "").direction, "ltr",
- "right to left direction with localedir='ltr'");
-
- subdoc.documentElement.removeAttribute("localedir");
-
- prefs.setCharPref(UI_DIRECTION_PREF, "");
- is(subwin.getComputedStyle(subdoc.documentElement, "").direction, "ltr",
- "left to right direction with no preference set");
- prefs.setCharPref(UI_DIRECTION_PREF + "-QA", "rtl");
- is(subwin.getComputedStyle(subdoc.documentElement, "").direction, "rtl",
- "right to left direction with more specific preference set");
- prefs.setCharPref(UI_DIRECTION_PREF, "ltr");
- is(subwin.getComputedStyle(subdoc.documentElement, "").direction, "rtl",
- "right to left direction with less specific and more specific preference set");
- prefs.setCharPref(UI_DIRECTION_PREF, "rtl");
- prefs.setCharPref(UI_DIRECTION_PREF + "-QA", "ltr");
- is(subwin.getComputedStyle(subdoc.documentElement, "").direction, "ltr",
- "left to right direction specific preference overrides");
- if (prefs.prefHasUserValue(UI_DIRECTION_PREF + "-QA"))
- prefs.clearUserPref(UI_DIRECTION_PREF + "-QA");
-
- if (prefs.prefHasUserValue(UI_DIRECTION_PREF))
- prefs.clearUserPref(UI_DIRECTION_PREF);
-
- SimpleTest.finish();
- }
- }
- ]]>
- </script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_scale.xul b/toolkit/content/tests/chrome/test_scale.xul
deleted file mode 100644
index c1adea7ffc..0000000000
--- a/toolkit/content/tests/chrome/test_scale.xul
+++ /dev/null
@@ -1,277 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for scale
- -->
-<window title="scale" width="500" height="600"
- onload="setTimeout(testtag_scale, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<hbox>
- <vbox>
- <scale id="scale-horizontal-normal"/>
- <scale id="scale-horizontal-reverse" dir="reverse"/>
- </vbox>
- <scale id="scale-vertical-normal" orient="vertical"/>
- <scale id="scale-vertical-reverse" orient="vertical" dir="reverse"/>
-</hbox>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-<script>
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-function testtag_scale()
-{
- testtag_scale_inner("scale-horizontal-normal", true, false);
- testtag_scale_inner("scale-horizontal-reverse", true, true);
- testtag_scale_inner("scale-vertical-normal", false, false);
- testtag_scale_inner("scale-vertical-reverse", false, true);
-
- SimpleTest.finish();
-}
-
-function testtag_scale_inner(elementid, horiz, reverse)
-{
- var testid = (horiz ? "horizontal " : "vertical ") +
- (reverse ? "reverse " : "normal ");
-
- var element = document.getElementById(elementid);
-
- testtag_scale_States(element, 0, "", 0, 100, testid + "initial");
-
- element.min = 0;
- element.max = 10;
- testtag_scale_States(element, 0, "", 0, 10, testid + "first set");
-
- element.decrease();
- is(element.value, 0, testid + "decrease");
- element.increase();
- is(element.value, 1, testid + "increase");
- element.value = 0;
- is(element.value, 0, testid + "set value");
-
- testtag_scale_Increments(element, 0, 10, 6, 7, testid + "increase decrease");
-
- // check if changing the min and max adjusts the value to fit in range
- element.min = 5;
- testtag_scale_States(element, 5, "5", 5, 10, testid + "change min");
- element.value = 15;
- is(element.value, 10, testid + "change minmax value set too high");
- element.max = 8;
- is(element.value, 8, testid + "change max");
- element.value = 2;
- is(element.value, 5, testid + "change minmax set too low");
-
- // check negative values
- element.min = -15;
- element.max = -5;
- testtag_scale_States(element, -5, "-5", -15, -5, testid + "minmax negative");
- element.value = -15;
- is(element.value, -15, testid + "change max negative");
- testtag_scale_Increments(element, -15, -5, 7, 8, testid + "increase decrease negative");
-
- // check case when min is negative and max is positive
- element.min = -10;
- element.max = 35;
- testtag_scale_States(element, -10, "-10", -10, 35, testid + "minmax mixed sign");
- testtag_scale_Increments(element, -10, 35, 25, 30, testid + "increase decrease mixed sign");
-
- testtag_scale_UI(element, testid, horiz, reverse);
-}
-
-function testtag_scale_UI(element, testid, horiz, reverse)
-{
- element.min = 0;
- element.max = 20;
- element.value = 7;
- element.increment = 2;
- element.pageIncrement = 4;
-
- element.focus();
-
- var leftIncrements = horiz && reverse;
- var upDecrements = !horiz && !reverse;
- synthesizeKeyExpectEvent("VK_LEFT", { }, element, "change", testid + "key left");
- is(element.value, leftIncrements ? 9 : 5, testid + " key left");
- synthesizeKeyExpectEvent("VK_RIGHT", { }, element, "change", testid + "key right");
- is(element.value, 7, testid + " key right");
- synthesizeKeyExpectEvent("VK_UP", { }, element, "change", testid + "key up");
- is(element.value, upDecrements ? 5 : 9, testid + " key up");
- synthesizeKeyExpectEvent("VK_DOWN", { }, element, "change", testid + "key down");
- is(element.value, 7, testid + " key down");
-
- synthesizeKeyExpectEvent("VK_PAGE_UP", { }, element, "change", testid + "key page up");
- is(element.value, upDecrements ? 3 : 11, testid + " key page up");
- synthesizeKeyExpectEvent("VK_PAGE_DOWN", { }, element, "change", testid + "key page down");
- is(element.value, 7, testid + " key page down");
-
- synthesizeKeyExpectEvent("VK_HOME", { }, element, "change", testid + "key home");
- is(element.value, reverse ? 20 : 0, testid + " key home");
- synthesizeKeyExpectEvent("VK_END", { }, element, "change", testid + "key end");
- is(element.value, reverse ? 0 : 20, testid + " key end");
-
- testtag_scale_UI_Mouse(element, testid, horiz, reverse, 4);
-
- element.min = 4;
- element.pageIncrement = 3;
- testtag_scale_UI_Mouse(element, testid + " with min", horiz, reverse, 3);
-
- element.pageIncrement = 30;
- testtag_scale_UI_Mouse(element, testid + " with min past", horiz, reverse, 30);
-}
-
-function testtag_scale_UI_Mouse(element, testid, horiz, reverse, pinc)
-{
- var initial = reverse ? 8 : 12;
- var newval = initial + (reverse ? pinc : -pinc);
- var endval = initial;
- // in the pinc == 30 case, the page increment is large enough that it would
- // just cause the thumb to reach the end of the scale. Make sure that the
- // mouse click does not go past the end.
- if (pinc == 30) {
- newval = reverse ? 20 : 4;
- endval = reverse ? 4 : 20;
- }
- element.value = initial;
-
- var hmove = horiz ? 25 : 10;
- var vmove = horiz ? 10 : 25;
-
- var leftFn = function () { return reverse ? element.value < newval + 3 : element.value > newval - 3; }
- var rightFn = function () { return reverse ? element.value < endval - 3 : element.value < endval + 3; }
-
- // check that clicking the mouse on the trough moves the thumb properly
- synthesizeMouseExpectEvent(element, hmove, vmove, { }, element, "change", testid + "mouse on left movetoclick=default");
-
- if (navigator.platform.indexOf("Mac") >= 0) {
- if (pinc == 30)
- ok(element.value > 4, testid + " mouse on left movetoclick=default");
- else
- ok(leftFn, testid + " mouse on left movetoclick=default");
- }
- else {
- is(element.value, newval, testid + " mouse on left movetoclick=default");
- }
-
- var rect = element.getBoundingClientRect();
- synthesizeMouseExpectEvent(element, rect.right - rect.left - hmove,
- rect.bottom - rect.top - vmove, { },
- element, "change", testid + " mouse on right movetoclick=default");
-
- if (navigator.platform.indexOf("Mac") >= 0) {
- if (pinc == 30)
- ok(element.value < 20, testid + " mouse on right movetoclick=default");
- else
- ok(rightFn, testid + " mouse on right movetoclick=default");
- }
- else {
- is(element.value, endval, testid + " mouse on right movetoclick=default");
- }
-
- element.setAttribute("movetoclick", "true");
- element.value = initial;
-
- synthesizeMouseExpectEvent(element, hmove, vmove, { }, element, "change", testid + "mouse on left movetoclick=true");
- if (pinc == 30)
- ok(element.value > 4, testid + " mouse on left movetoclick=true");
- else
- ok(leftFn, testid + " mouse on left movetoclick=true");
-
- var rect = element.getBoundingClientRect();
- synthesizeMouseExpectEvent(element, rect.right - rect.left - hmove,
- rect.bottom - rect.top - vmove, { },
- element, "change", testid + " mouse on right movetoclick=true");
- if (pinc == 30)
- ok(element.value < 20, testid + " mouse on right movetoclick=true");
- else
- ok(rightFn, testid + " mouse on right movetoclick=true");
-
- element.setAttribute("movetoclick", "false");
- element.value = initial;
-
- synthesizeMouseExpectEvent(element, hmove, vmove, { }, element, "change", testid + "mouse on left movetoclick=false");
- is(element.value, newval, testid + " mouse on left movetoclick=false");
-
- var rect = element.getBoundingClientRect();
- synthesizeMouseExpectEvent(element, rect.right - rect.left - hmove,
- rect.bottom - rect.top - vmove, { },
- element, "change", testid + " mouse on right movetoclick=false");
- is(element.value, endval, testid + " mouse on right movetoclick=false");
-
- element.removeAttribute("movetoclick");
-
- element.value = reverse ? element.max : element.min;
-
- synthesizeMouse(element, 8, 8, { type: "mousedown" });
- synthesizeMouse(element, horiz ? 2000 : 8, horiz ? 8 : 2000, { type: "mousemove" });
- is(element.value, reverse ? element.min : element.max, testid + " move mouse too far after end");
- synthesizeMouse(element, 2, 2, { type: "mouseup" });
-
- synthesizeMouse(element, rect.width - 8, rect.height - 8, { type: "mousedown" });
- synthesizeMouse(element, horiz ? -2000 : rect.width - 8, horiz ? rect.height - 8 : -2000, { type: "mousemove" });
- is(element.value, reverse ? element.max : element.min, testid + " move mouse too far before start");
-
- synthesizeMouse(element, 2, 2, { type: "mouseup" });
-
- // now check if moving outside in both directions works. On Windows,
- // it should snap back to the original location.
- element.value = reverse ? element.max : element.min;
-
- var expected = (navigator.platform.indexOf("Win") >= 0) ? element.value :
- (reverse ? element.min : element.max);
- synthesizeMouse(element, 7, 7, { type: "mousedown" });
- synthesizeMouse(element, 2000, 2000, { type: "mousemove" });
- is(element.value, expected, testid + " move mouse ouside in both directions");
- synthesizeMouse(element, 2, 2, { type: "mouseup" });
-}
-
-function testtag_scale_States(element, evalue, evalueattr, emin, emax, testid)
-{
- is(element.getAttribute("value"), evalueattr, testid + " value attribute");
- is(element.value, evalue, testid + " value");
- is(element.min, emin, testid + " min");
- is(element.max, emax, testid + " max");
-}
-
-function testtag_scale_Increments(element, min, max, increment, pageIncrement, testid)
-{
- // check the increase and decrease methods
- element.increment = increment;
- element.increase();
- is(element.value, min + increment, testid + " increase 1");
- element.increase();
- is(element.value, max, testid + " increase 2");
- element.decrease();
- is(element.value, max - increment, testid + " decrease 1");
- element.decrease();
- is(element.value, min, testid + " decrease 2");
-
- // check the increasePage and decreasePage methods
- element.pageIncrement = pageIncrement;
- element.increasePage();
- is(element.value, min + pageIncrement, testid + " increasePage 1");
- element.increasePage();
- is(element.value, max, testid + " increasePage 2");
- element.decreasePage();
- is(element.value, max - pageIncrement, testid + " decreasePage 1");
- element.decreasePage();
- is(element.value, min, testid + " decreasePage 2");
-}
-
-]]>
-
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_scaledrag.xul b/toolkit/content/tests/chrome/test_scaledrag.xul
deleted file mode 100644
index 82356ca1ec..0000000000
--- a/toolkit/content/tests/chrome/test_scaledrag.xul
+++ /dev/null
@@ -1,197 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
-XUL <scale> dragging tests
--->
-<window title="Dragging XUL scale tests" width="500" height="600"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
- <hbox flex="1">
- <scale id="scale1" orient="horizontal" flex="1" min="0" max="4" value="2"/>
- <scale id="scale2" orient="vertical" flex="1" min="0" max="4" value="2"/>
- <scale id="scale3" orient="horizontal" flex="1" movetoclick="true" min="0" max="4" value="2"/>
- </hbox>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-<script>
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-function getThumb(aScale) {
- return document.getAnonymousElementByAttribute(aScale, "class", "scale-thumb");
-}
-
-function sendTouch(aType, aRect, aDX, aDY, aMods) {
- var cwu = SpecialPowers.getDOMWindowUtils(window);
- var x = aRect.left + aRect.width/2 + aDX;
- var y = aRect.top + aRect.height/2 + aDY;
- if (/mouse/.test(aType))
- cwu.sendMouseEvent(aType, x, y, 0, 1, aMods || 0, false);
- else
- cwu.sendTouchEvent(aType, [0], [x], [y], [1], [1], [0], [1], 1, aMods || 0, true);
-}
-
-function getOffset(aScale, aDir) {
- var rect = aScale.getBoundingClientRect();
- var d = aScale.orient == "horizontal" ? rect.width/4 : rect.height/4;
- switch (aDir) {
- case "right": return [ d, 0];
- case "left": return [-1*d, 0];
- case "up": return [ 0,-1*d];
- case "down": return [ 0, d];
- case "downleft": return [ -1*d, d];
- case "upleft": return [ -1*d,-1*d];
- case "downright": return [d, d];
- case "upright": return [d,-1*d];
- }
- return [0,0];
-}
-
-function testTouchDragThumb(aDesc, aId, aDir, aVal1, aVal2, aMods) {
- info(aDesc);
- var scale = document.getElementById(aId);
- var [x,y] = getOffset(scale, aDir);
-
- sendTouch("touchstart", getThumb(scale).getBoundingClientRect(), 0, 0, aMods);
- is(scale.value, aVal1, "Touchstart on thumb has correct value");
- sendTouch("touchmove", getThumb(scale).getBoundingClientRect(), x, y, aMods);
- sendTouch("touchend", getThumb(scale).getBoundingClientRect(), 0, 0, aMods);
- is(scale.value, aVal2, "After touch " + (aDir ? ("and drag " + aDir + " ") : "") + "on thumb, scale has correct value");
-
- scale.value = 2;
-}
-
-function testMouseDragThumb(aDesc, aId, aDir, aVal1, aVal2, aMods) {
- info(aDesc);
- var scale = document.getElementById(aId);
- var [x,y] = getOffset(scale, aDir);
-
- sendTouch("mousedown", getThumb(scale).getBoundingClientRect(), 0, 0, aMods);
- is(scale.value, aVal1, "Mousedown on thumb has correct value");
- sendTouch("mousemove", getThumb(scale).getBoundingClientRect(), x, y, aMods);
- sendTouch("mouseup", getThumb(scale).getBoundingClientRect(), 0, 0, aMods);
- is(scale.value, aVal2, "After mouseup " + (aDir ? ("and drag " + aDir + " ") : "") + "on thumb, scale has correct value");
-
- scale.value = 2;
-}
-
-function testTouchDragSlider(aDesc, aId, aDir, aVal1, aVal2, aMods) {
- info(aDesc);
- var scale = document.getElementById(aId);
- var [x,y] = getOffset(scale, aDir);
-
- sendTouch("touchstart", getThumb(scale).getBoundingClientRect(), x, y, aMods);
- is(scale.value, aVal1, "Touchstart on slider has correct value");
- sendTouch("touchmove", getThumb(scale).getBoundingClientRect(), -x, -y, aMods);
- sendTouch("touchend", getThumb(scale).getBoundingClientRect(), 0, 0, aMods);
- is(scale.value, aVal2, "After touch " + (aDir ? ("and drag " + aDir + " ") : "") + "on slider, scale has correct value");
-
- scale.value = 2;
-}
-
-function testMouseDragSlider(aDesc, aId, aDir, aVal1, aVal2, aMods) {
- info(aDesc);
- var scale = document.getElementById(aId);
- var [x,y] = getOffset(scale, aDir);
-
- sendTouch("mousedown", getThumb(scale).getBoundingClientRect(), x, y, aMods);
- is(scale.value, aVal1, "Mousedown on slider has correct value");
- sendTouch("mousemove", getThumb(scale).getBoundingClientRect(), -x, -y, aMods);
- sendTouch("mouseup", getThumb(scale).getBoundingClientRect(), 0, 0, aMods);
- is(scale.value, aVal2, "After mouseup " + (aDir ? ("and drag " + aDir + " ") : "") + "on slider, scale has correct value");
-
- scale.value = 2;
-}
-
-function runTests() {
- // test dragging a horizontal slider with touch events by tapping on the thumb
- testTouchDragThumb("Touch Horizontal Thumb", "scale1", "", 2, 2);
- testTouchDragThumb("TouchDrag Horizontal Thumb Left", "scale1", "left", 2, 1);
- testTouchDragThumb("TouchDrag Horizontal Thumb Right", "scale1", "right", 2, 3);
- testTouchDragThumb("TouchDrag Horizontal Thumb Up", "scale1", "up", 2, 2);
- testTouchDragThumb("TouchDrag Horizontal Thumb Down", "scale1", "down", 2, 2);
- testTouchDragThumb("TouchDrag Horizontal Thumb Downleft", "scale1", "downleft", 2, 1);
- testTouchDragThumb("TouchDrag Horizontal Thumb Upleft", "scale1", "upleft", 2, 1);
- testTouchDragThumb("TouchDrag Horizontal Thumb Upright", "scale1", "upright", 2, 3);
- testTouchDragThumb("TouchDrag Horizontal Thumb Downright", "scale1", "downright", 2, 3);
-
- // test dragging a horizontal slider with mouse events by clicking on the thumb
- testMouseDragThumb("Click Horizontal Thumb", "scale1", "", 2, 2);
- testMouseDragThumb("MouseDrag Horizontal Thumb Left", "scale1", "left", 2, 1);
- testMouseDragThumb("MouseDrag Horizontal Thumb Right", "scale1", "right", 2, 3);
- testMouseDragThumb("MouseDrag Horizontal Thumb Up", "scale1", "up", 2, 2);
- testMouseDragThumb("MouseDrag Horizontal Thumb Down", "scale1", "down", 2, 2);
- testMouseDragThumb("MouseDrag Horizontal Thumb Downleft", "scale1", "downleft", 2, 1);
- testMouseDragThumb("MouseDrag Horizontal Thumb Upleft", "scale1", "upleft", 2, 1);
- testMouseDragThumb("MouseDrag Horizontal Thumb Upright", "scale1", "upright", 2, 3);
- testMouseDragThumb("MouseDrag Horizontal Thumb Downright", "scale1", "downright", 2, 3);
-
- // test dragging a vertical slider with touch events by tapping on the thumb
- testTouchDragThumb("Touch Vertical Thumb", "scale2", "", 2, 2);
- testTouchDragThumb("TouchDrag Vertical Thumb Left", "scale2", "left", 2, 2);
- testTouchDragThumb("TouchDrag Vertical Thumb Right", "scale2", "right", 2, 2);
- testTouchDragThumb("TouchDrag Vertical Thumb Up", "scale2", "up", 2, 1);
- testTouchDragThumb("TouchDrag Vertical Thumb Down", "scale2", "down", 2, 3);
- testTouchDragThumb("TouchDrag Vertical Thumb Downleft", "scale2", "downleft", 2, 3);
- testTouchDragThumb("TouchDrag Vertical Thumb Upleft", "scale2", "upleft", 2, 1);
- testTouchDragThumb("TouchDrag Vertical Thumb Upright", "scale2", "upright", 2, 1);
- testTouchDragThumb("TouchDrag Vertical Thumb Downright", "scale2", "downright", 2, 3);
-
- // test dragging a vertical slider with mouse events by clicking on the thumb
- testMouseDragThumb("Click Vertical Thumb", "scale2", "", 2, 2);
- testMouseDragThumb("MouseDrag Vertical Thumb Left", "scale2", "left", 2, 2);
- testMouseDragThumb("MouseDrag Vertical Thumb Right", "scale2", "right", 2, 2);
- testMouseDragThumb("MouseDrag Vertical Thumb Up", "scale2", "up", 2, 1);
- testMouseDragThumb("MouseDrag Vertical Thumb Down", "scale2", "down", 2, 3);
- testMouseDragThumb("MouseDrag Vertical Thumb Downleft", "scale2", "downleft", 2, 3);
- testMouseDragThumb("MouseDrag Vertical Thumb Upleft", "scale2", "upleft", 2, 1);
- testMouseDragThumb("MouseDrag Vertical Thumb Upright", "scale2", "upright", 2, 1);
- testMouseDragThumb("MouseDrag Vertical Thumb Downright", "scale2", "downright", 2, 3);
-
- var isMac = /Mac/.test(navigator.platform);
-
- // test dragging a slider by tapping off the thumb
- testTouchDragSlider("TouchDrag Slider Left", "scale1", "left", isMac ? 1 : 0, isMac ? 2 : 0);
- testTouchDragSlider("TouchDrag Slider Right", "scale1", "right", isMac ? 3 : 4, isMac ? 2 : 4);
- testMouseDragSlider("MouseDrag Slider Left", "scale1", "left", isMac ? 1 : 0, isMac ? 2 : 0);
- testMouseDragSlider("MouseDrag Slider Right", "scale1", "right", isMac ? 3 : 4, isMac ? 2 : 4);
-
- // test dragging a slider by tapping off the thumb and holding shift
- // modifiers don't affect touch events
- var mods = /Mac/.test(navigator.platform) ? Components.interfaces.nsIDOMNSEvent.ALT_MASK :
- Components.interfaces.nsIDOMNSEvent.SHIFT_MASK;
- testTouchDragSlider("TouchDrag Slider Left+Shift", "scale1", "left", isMac ? 1 : 0, isMac ? 2 : 0, mods);
- testTouchDragSlider("TouchDrag Slider Right+Shift", "scale1", "right", isMac ? 3 : 4, isMac ? 2 : 4, mods);
- testMouseDragSlider("MouseDrag Slider Left+Shift", "scale1", "left", isMac ? 0 : 1, isMac ? 0 : 2, mods);
- testMouseDragSlider("MouseDrag Slider Right+Shift", "scale1", "right", isMac ? 4 : 3, isMac ? 4 : 2, mods);
-
- // test dragging a slider with movetoclick="true" by tapping off the thumb
- testTouchDragSlider("TouchDrag Slider Left+MoveToClick", "scale3", "left", 1, 2);
- testTouchDragSlider("TouchDrag Slider Right+MoveToClick", "scale3", "right", 3, 2);
- testMouseDragSlider("MouseDrag Slider Left+MoveToClick", "scale3", "left", 1, 2);
- testMouseDragSlider("MouseDrag Slider Right+MoveToClick", "scale3", "right", 3, 2);
-
- // test dragging a slider by tapping off the thumb and holding shift
- // modifiers don't affect touch events
- testTouchDragSlider("MouseDrag Slider Left+MoveToClick+Shift", "scale3", "left", 1, 2, mods);
- testTouchDragSlider("MouseDrag Slider Right+MoveToClick+Shift", "scale3", "right", 3, 2, mods);
- testMouseDragSlider("MouseDrag Slider Left+MoveToClick+Shift", "scale3", "left", 0, 0, mods);
- testMouseDragSlider("MouseDrag Slider Right+MoveToClick+Shift", "scale3", "right", 4, 4, mods);
-
- SimpleTest.finish();
-}
-
-addLoadEvent(function() { SimpleTest.executeSoon(runTests); });
-]]></script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_screenPersistence.xul b/toolkit/content/tests/chrome/test_screenPersistence.xul
deleted file mode 100644
index 7d63252939..0000000000
--- a/toolkit/content/tests/chrome/test_screenPersistence.xul
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Window Open Test"
- onload="runTest()"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
-<script class="testbody" type="application/javascript"><![CDATA[
- SimpleTest.waitForExplicitFinish();
- let win;
- var left = 60 + screen.availLeft;
- var upper = 60 + screen.availTop;
-
- function runTest() {
- win = window.openDialog("window_screenPosSize.xul",
- null,
- "chrome,dialog=no,all,screenX=" + left + ",screenY=" + upper + ",outerHeight=200,outerWidth=200");
- SimpleTest.waitForFocus(checkTest, win);
- }
- function checkTest() {
- is(win.screenX, left, "The window should be placed now at x=" + left + "px");
- is(win.screenY, upper, "The window should be placed now at y=" + upper + "px");
- is(win.outerHeight, 200, "The window size should be height=200px");
- is(win.outerWidth, 200, "The window size should be width=200px");
- runTest2();
- }
- function runTest2() {
- win.close();
- win = window.openDialog("window_screenPosSize.xul",
- null,
- "chrome,dialog=no,all");
- SimpleTest.waitForFocus(checkTest2, win);
- }
- function checkTest2() {
- let runTime = Components.classes["@mozilla.org/xre/app-info;1"]
- .getService(Components.interfaces.nsIXULRuntime);
- if (runTime.OS != "Linux") {
- is(win.screenX, 80, "The window should be placed now at x=80px");
- is(win.screenY, 80, "The window should be placed now at y=80px");
- }
- is(win.outerHeight, 300, "The window size should be height=300px");
- is(win.outerWidth, 300, "The window size should be width=300px");
- win.close();
- SimpleTest.finish();
- }
-]]></script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_scrollbar.xul b/toolkit/content/tests/chrome/test_scrollbar.xul
deleted file mode 100644
index 11dccbee94..0000000000
--- a/toolkit/content/tests/chrome/test_scrollbar.xul
+++ /dev/null
@@ -1,137 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for scrollbars
- -->
-<window title="Scrollbar"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml"/>
-
- <hbox>
- <scrollbar orient="horizontal"
- id="scroller"
- curpos="0"
- maxpos="600"
- pageincrement="400"
- width="500"
- style="margin:0"/>
- </hbox>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
-/** Test for Scrollbar **/
-var scrollbarTester = {
- scrollbar: null,
- middlePref: false,
- startTest: function() {
- this.scrollbar = $("scroller");
- this.middlePref = this.getMiddlePref();
- var self = this;
- [0, 1, 2].map(function(button) {
- [false, true].map(function(alt) {
- [false, true].map(function(shift) {
- self.testThumbDragging(button, alt, shift);
- })
- })
- });
- SimpleTest.finish();
- },
- testThumbDragging: function(button, withAlt, withShift) {
- this.reset();
- var x = 160; // on the right half of the thumb
- var y = 5;
-
- var isMac = navigator.platform.indexOf("Mac") != -1;
- var runtime = Components.classes["@mozilla.org/xre/app-info;1"]
- .getService(Components.interfaces.nsIXULRuntime);
- var isGtk = runtime.widgetToolkit.indexOf("gtk") != -1;
-
- // Start the drag.
- this.mousedown(x, y, button, withAlt, withShift);
- var newPos = this.getPos();
- var scrollToClick = (newPos != 0);
- if (isMac || isGtk) {
- ok(!scrollToClick, "On Linux and Mac OS X, clicking the scrollbar thumb "+
- "should never move it.");
- } else if (button == 0 && withShift) {
- ok(scrollToClick, "On platforms other than Linux and Mac OS X, holding "+
- "shift should enable scroll-to-click on the scrollbar thumb.");
- } else if (button == 1 && this.middlePref) {
- ok(scrollToClick, "When middlemouse.scrollbarPosition is on, clicking the "+
- "thumb with the middle mouse button should center it "+
- "around the cursor.")
- }
-
- // Move one pixel to the right.
- this.mousemove(x+1, y, button, withAlt, withShift);
- var newPos2 = this.getPos();
- if (newPos2 != newPos) {
- ok(newPos2 > newPos, "Scrollbar thumb should follow the mouse when dragged.");
- ok(newPos2 - newPos < 3, "Scrollbar shouldn't move further than the mouse when dragged.");
- ok(button == 0 || (button == 1 && this.middlePref) || (button == 2 && isGtk),
- "Dragging the scrollbar should only be possible with the left mouse button.");
- } else {
- // Dragging had no effect.
- if (button == 0) {
- ok(false, "Dragging the scrollbar thumb should work.");
- } else if (button == 1 && this.middlePref && (!isGtk && !isMac)) {
- ok(false, "When middlemouse.scrollbarPosition is on, dragging the "+
- "scrollbar thumb should be possible using the middle mouse button.");
- } else {
- ok(true, "Dragging works correctly.");
- }
- }
-
- // Release the mouse button.
- this.mouseup(x+1, y, button, withAlt, withShift);
- var newPos3 = this.getPos();
- ok(newPos3 == newPos2,
- "Releasing the mouse button after dragging the thumb shouldn't move it.");
- },
- getMiddlePref: function() {
- // It would be better to test with different middlePref settings,
- // but the setting is only queried once, at browser startup, so
- // changing it here wouldn't have any effect
- var prefService = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefService);
- var mouseBranch = prefService.getBranch("middlemouse.");
- return mouseBranch.getBoolPref("scrollbarPosition");
- },
- setPos: function(pos) {
- this.scrollbar.setAttribute("curpos", pos);
- },
- getPos: function() {
- return this.scrollbar.getAttribute("curpos");
- },
- reset: function() {
- this.setPos(0);
- },
- mousedown: function(x, y, button, alt, shift) {
- synthesizeMouse(this.scrollbar, x, y, { type: "mousedown", 'button': button,
- altKey: alt, shiftKey: shift });
- },
- mousemove: function(x, y, button, alt, shift) {
- synthesizeMouse(this.scrollbar, x, y, { type: "mousemove", 'button': button,
- altKey: alt, shiftKey: shift });
- },
- mouseup: function(x, y, button, alt, shift) {
- synthesizeMouse(this.scrollbar, x, y, { type: "mouseup", 'button': button,
- altKey: alt, shiftKey: shift });
- }
-}
-
-function doTest() {
- setTimeout(function() { scrollbarTester.startTest(); }, 0);
-}
-
-SimpleTest.waitForExplicitFinish();
-addLoadEvent(doTest);
-
-]]></script>
-</window>
diff --git a/toolkit/content/tests/chrome/test_showcaret.xul b/toolkit/content/tests/chrome/test_showcaret.xul
deleted file mode 100644
index 75a8cf6a2b..0000000000
--- a/toolkit/content/tests/chrome/test_showcaret.xul
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Show Caret Test"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
-<iframe id="f1" width="100" height="100" onload="frameLoaded()"
- src="data:text/html,%3Cbody%20style='height:%208000px'%3E%3Cp%3EHello%3C/p%3EGoodbye%3C/body%3E"/>
-<!-- <body style='height: 8000px'><p>Hello</p><span id='s'>Goodbye<span></body> -->
-<iframe id="f2" type="content" showcaret="true" width="100" height="100" onload="frameLoaded()"
- src="data:text/html,%3Cbody%20style%3D%27height%3A%208000px%27%3E%3Cp%3EHello%3C%2Fp%3E%3Cspan%20id%3D%27s%27%3EGoodbye%3Cspan%3E%3C%2Fbody%3E"/>
-
-<script>
-<![CDATA[
-
-var framesLoaded = 0;
-var otherWindow = null;
-
-function frameLoaded() { if (++framesLoaded == 2) SimpleTest.waitForFocus(runTest); }
-
-SimpleTest.waitForExplicitFinish();
-function runTest()
-{
- var sel1 = frames[0].getSelection();
- sel1.collapse(frames[0].document.body, 0);
-
- var sel2 = frames[1].getSelection();
- sel2.collapse(frames[1].document.body, 0);
- window.frames[0].focus();
- document.commandDispatcher.getControllerForCommand("cmd_moveBottom").doCommand("cmd_moveBottom");
-
- var listener = function() {
- if (!(frames[0].scrollY > 0)) {
- window.content.removeEventListener("scroll", listener, false);
- }
- }
- window.frames[0].addEventListener("scroll", listener, false);
-
- var sel1 = frames[0].getSelection();
- sel1.collapse(frames[0].document.body, 0);
-
- var sel2 = frames[1].getSelection();
- sel2.collapse(frames[1].document.body, 0);
-
- window.frames[0].focus();
- document.commandDispatcher.getControllerForCommand("cmd_moveBottom").doCommand("cmd_moveBottom");
- is(sel1.focusNode, frames[0].document.body, "focusNode for non-showcaret");
- is(sel1.focusOffset, 0, "focusOffset for non-showcaret");
-
- window.frames[1].focus();
- document.commandDispatcher.getControllerForCommand("cmd_moveBottom").doCommand("cmd_moveBottom");
-
- ok(frames[1].scrollY <
- frames[1].document.getElementById('s').getBoundingClientRect().top,
- "scrollY for showcaret");
- isnot(sel2.focusNode, frames[1].document.body, "focusNode for showcaret");
- ok(sel2.anchorOffset > 0, "focusOffset for showcaret");
-
- otherWindow = window.open("window_showcaret.xul", "_blank", "chrome,width=400,height=200");
- otherWindow.addEventListener("focus", otherWindowFocused, false);
-}
-
-function otherWindowFocused()
-{
- otherWindow.removeEventListener("focus", otherWindowFocused, false);
-
- // enable caret browsing temporarily to test caret movement
- var prefs = Components.classes["@mozilla.org/preferences-service;1"].
- getService(Components.interfaces.nsIPrefBranch);
- prefs.setBoolPref("accessibility.browsewithcaret", true);
-
- var hbox = otherWindow.document.documentElement.firstChild;
- hbox.focus();
- is(otherWindow.document.activeElement, hbox, "hbox in other window is focused");
-
- document.commandDispatcher.getControllerForCommand("cmd_lineNext").doCommand("cmd_lineNext");
- is(otherWindow.document.activeElement, hbox, "hbox still focused in other window after down movement");
-
- prefs.setBoolPref("accessibility.browsewithcaret", false);
-
- otherWindow.close();
- SimpleTest.finish();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_sorttemplate.xul b/toolkit/content/tests/chrome/test_sorttemplate.xul
deleted file mode 100644
index a08e3b6a8a..0000000000
--- a/toolkit/content/tests/chrome/test_sorttemplate.xul
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<?xml-stylesheet href="data:text/css,window > |people { display: none }" type="text/css"?>
-<!--
- XUL Widget Test for tabindex
- -->
-<window title="tabindex" width="500" height="600"
- onfocus="runTest()"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<people id="famouspeople" xmlns="">
- <person name="Napoleon Bonaparte" gender="male"/>
- <person name="Cleopatra" gender="female"/>
- <person name="Julius Caesar" gender="male"/>
- <person name="Ferdinand Magellan" gender="male"/>
- <person name="Laura Secord" gender="female"/>
-</people>
-
-<tree id="tree" datasources="#famouspeople" ref="*" querytype="xml" flex="1">
- <treecols>
- <treecol label="Name" flex="1" sort="?name"/>
- <treecol label="Gender" flex="1" sort="?gender"/>
- </treecols>
- <template>
- <query/>
- <rule>
- <action>
- <treechildren id="treechildren-strings">
- <treeitem uri="?">
- <treerow>
- <treecell label="?name"/>
- <treecell label="?gender"/>
- </treerow>
- </treeitem>
- </treechildren>
- </action>
- </rule>
- </template>
-</tree>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-<script>
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-function runTest()
-{
- var tree = $("tree");
- var col = tree.columns[0].element;
- synthesizeMouse(col, 12, 2, { });
- checkRowOrder(tree, ["Cleopatra", "Ferdinand Magellan", "Julius Caesar", "Laura Secord", "Napoleon Bonaparte"], "acsending");
-
- synthesizeMouse(col, 12, 2, { });
- checkRowOrder(tree, ["Napoleon Bonaparte", "Laura Secord", "Julius Caesar", "Ferdinand Magellan", "Cleopatra"], "descending");
-
- synthesizeMouse(col, 12, 2, { });
- checkRowOrder(tree, ["Napoleon Bonaparte", "Laura Secord", "Julius Caesar", "Ferdinand Magellan", "Cleopatra"], "natural");
-
- SimpleTest.finish();
-}
-
-function checkRowOrder(tree, expected, testid)
-{
- var index = 0;
- var item = tree.firstChild.nextSibling.nextSibling.firstChild;
- while (item && index < expected.length) {
- if (item.firstChild.firstChild.getAttribute("label") != expected[index++])
- break;
- item = item.nextSibling;
- }
- ok(index == expected.length && !item, testid + " row order");
-}
-
-]]>
-
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_statusbar.xul b/toolkit/content/tests/chrome/test_statusbar.xul
deleted file mode 100644
index 160cc25d04..0000000000
--- a/toolkit/content/tests/chrome/test_statusbar.xul
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for statusbar
- -->
-<window title="Statusbar Test"
- onload="setTimeout(test_statusbar, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<statusbar>
- <statusbarpanel id="panel" label="OK" image="happy.png"/>
-</statusbar>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-function test_statusbar()
-{
- var panel = $("panel");
- ok(panel.label, "OK", "statusbarpanel label");
- ok(panel.image, "happy.png", "statusbarpanel image");
- panel.src = "sad.png";
- ok(panel.src, "sad.png", "statusbarpanel set src");
- ok(panel.getAttribute("src"), "sad.png", "statusbarpanel set src attribute");
-
- SimpleTest.finish();
-}
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_subframe_origin.xul b/toolkit/content/tests/chrome/test_subframe_origin.xul
deleted file mode 100644
index bde1e49459..0000000000
--- a/toolkit/content/tests/chrome/test_subframe_origin.xul
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-<!-- 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/. -->
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Subframe Event Tests"
- onload="setTimeout(runTest, 0);"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
-<script>
-
-// Added after content child widgets were removed from ui windows. Tests sub frame
-// event client coordinate offsets.
-
-SimpleTest.waitForExplicitFinish();
-function runTest()
-{
- window.open("window_subframe_origin.xul", "_blank", "chrome,width=600,height=600");
-}
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_tabbox.xul b/toolkit/content/tests/chrome/test_tabbox.xul
deleted file mode 100644
index 3cbacb15ad..0000000000
--- a/toolkit/content/tests/chrome/test_tabbox.xul
+++ /dev/null
@@ -1,224 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for tabboxes
- -->
-<window title="Tabbox Test" width="500" height="600"
- onload="setTimeout(test_tabbox, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
- <script type="application/javascript" src="xul_selectcontrol.js"/>
-
-<vbox id="tabboxes">
-
-<tabbox id="tabbox">
- <tabs id="tabs">
- <tab id="tab1" label="Tab 1"/>
- <tab id="tab2" label="Tab 2"/>
- </tabs>
- <tabpanels id="tabpanels">
- <button id="panel1" label="Panel 1"/>
- <button id="panel2" label="Panel 2"/>
- </tabpanels>
-</tabbox>
-
-<tabbox id="tabbox-initwithvalue">
- <tabs id="tabs-initwithvalue" value="two">
- <tab label="Tab 1" value="one"/>
- <tab label="Tab 2" value="two"/>
- <tab label="Tab 3" value="three"/>
- </tabs>
- <tabpanels id="tabpanels-initwithvalue">
- <button label="Panel 1"/>
- <button label="Panel 2"/>
- <button label="Panel 3"/>
- </tabpanels>
-</tabbox>
-
-<tabbox id="tabbox-initwithselected">
- <tabs id="tabs-initwithselected" value="two">
- <tab label="Tab 1" value="one"/>
- <tab label="Tab 2" value="two"/>
- <tab label="Tab 3" value="three" selected="true"/>
- </tabs>
- <tabpanels id="tabpanels-initwithselected">
- <button label="Panel 1"/>
- <button label="Panel 2"/>
- <button label="Panel 3"/>
- </tabpanels>
-</tabbox>
-
-</vbox>
-
-<tabbox id="tabbox-nofocus">
- <textbox id="textbox-extra" hidden="true"/>
- <tabs>
- <tab label="Tab 1" value="one"/>
- <tab id="tab-nofocus" label="Tab 2" value="two"/>
- </tabs>
- <tabpanels>
- <tabpanel>
- <button id="tab-nofocus-button" label="Label"/>
- </tabpanel>
- <tabpanel id="tabpanel-nofocusinpaneltab">
- <label id="tablabel" value="Label"/>
- </tabpanel>
- </tabpanels>
-</tabbox>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-function test_tabbox()
-{
- var tabbox = document.getElementById("tabbox");
- var tabs = document.getElementById("tabs");
- var tabpanels = document.getElementById("tabpanels");
-
- test_tabbox_State(tabbox, "tabbox initial", 0, tabs.firstChild, tabpanels.firstChild);
-
- // check the selectedIndex property
- tabbox.selectedIndex = 1;
- test_tabbox_State(tabbox, "tabbox selectedIndex 1", 1, tabs.lastChild, tabpanels.lastChild);
-
- tabbox.selectedIndex = 2;
- test_tabbox_State(tabbox, "tabbox selectedIndex 2", 1, tabs.lastChild, tabpanels.lastChild);
-
- // tabbox must have a selection, so setting to -1 should do nothing
- tabbox.selectedIndex = -1;
- test_tabbox_State(tabbox, "tabbox selectedIndex -1", 1, tabs.lastChild, tabpanels.lastChild);
-
- // check the selectedTab property
- tabbox.selectedTab = tabs.firstChild;
- test_tabbox_State(tabbox, "tabbox selected", 0, tabs.firstChild, tabpanels.firstChild);
-
- // setting selectedTab to null should not do anything
- tabbox.selectedTab = null;
- test_tabbox_State(tabbox, "tabbox selectedTab null", 0, tabs.firstChild, tabpanels.firstChild);
-
- // check the selectedPanel property
- tabbox.selectedPanel = tabpanels.lastChild;
- test_tabbox_State(tabbox, "tabbox selectedPanel", 0, tabs.firstChild, tabpanels.lastChild);
-
- // setting selectedPanel to null should not do anything
- tabbox.selectedPanel = null;
- test_tabbox_State(tabbox, "tabbox selectedPanel null", 0, tabs.firstChild, tabpanels.lastChild);
-
- tabbox.selectedIndex = 0;
- test_tabpanels(tabpanels, tabbox);
-
- tabs.removeChild(tabs.firstChild);
- tabs.removeChild(tabs.firstChild);
-
- test_tabs(tabs);
-
- test_tabbox_focus();
-}
-
-function test_tabpanels(tabpanels, tabbox)
-{
- var tab = tabbox.selectedTab;
-
- // changing the selection on the tabpanels should not affect the tabbox
- // or tabs within
- // check the selectedIndex property
- tabpanels.selectedIndex = 1;
- test_tabbox_State(tabbox, "tabpanels tabbox selectedIndex 1", 0, tab, tabpanels.lastChild);
- test_tabpanels_State(tabpanels, "tabpanels selectedIndex 1", 1, tabpanels.lastChild);
-
- tabpanels.selectedIndex = 0;
- test_tabbox_State(tabbox, "tabpanels tabbox selectedIndex 2", 0, tab, tabpanels.firstChild);
- test_tabpanels_State(tabpanels, "tabpanels selectedIndex 2", 0, tabpanels.firstChild);
-
- // setting selectedIndex to -1 should do nothing
- tabpanels.selectedIndex = 1;
- tabpanels.selectedIndex = -1;
- test_tabbox_State(tabbox, "tabpanels tabbox selectedIndex -1", 0, tab, tabpanels.lastChild);
- test_tabpanels_State(tabpanels, "tabpanels selectedIndex -1", 1, tabpanels.lastChild);
-
- // check the tabpanels.selectedPanel property
- tabpanels.selectedPanel = tabpanels.lastChild;
- test_tabbox_State(tabbox, "tabpanels tabbox selectedPanel", 0, tab, tabpanels.lastChild);
- test_tabpanels_State(tabpanels, "tabpanels selectedPanel", 1, tabpanels.lastChild);
-
- // check setting the tabpanels.selectedPanel property to null
- tabpanels.selectedPanel = null;
- test_tabbox_State(tabbox, "tabpanels selectedPanel null", 0, tab, tabpanels.lastChild);
-}
-
-function test_tabs(tabs)
-{
- test_nsIDOMXULSelectControlElement(tabs, "tab", "tabs");
- // XXXndeakin would test the UI aspect of tabs, but the mouse
- // events on tabs are fired in a timeout causing the generic
- // test_nsIDOMXULSelectControlElement_UI method not to work
- // test_nsIDOMXULSelectControlElement_UI(tabs, null);
-}
-
-function test_tabbox_State(tabbox, testid, index, tab, panel)
-{
- is(tabbox.selectedIndex, index, testid + " selectedIndex");
- is(tabbox.selectedTab, tab, testid + " selectedTab");
- is(tabbox.selectedPanel, panel, testid + " selectedPanel");
-}
-
-function test_tabpanels_State(tabpanels, testid, index, panel)
-{
- is(tabpanels.selectedIndex, index, testid + " selectedIndex");
- is(tabpanels.selectedPanel, panel, testid + " selectedPanel");
-}
-
-function test_tabbox_focus()
-{
- $("tabboxes").hidden = true;
- $(document.activeElement).blur();
-
- var tabbox = $("tabbox-nofocus");
- var tab = $("tab-nofocus");
-
- when_tab_focused(tab, function () {
- ok(document.activeElement, tab, "focus in tab with no focusable elements");
-
- tabbox.selectedIndex = 0;
- $("tab-nofocus-button").focus();
-
- when_tab_focused(tab, function () {
- ok(document.activeElement, tab, "focus in tab with no focusable elements, but with something in another tab focused");
-
- var textboxExtra = $("textbox-extra");
- textboxExtra.addEventListener("focus", function () {
- textboxExtra.removeEventListener("focus", arguments.callee, true);
- ok(document.activeElement, textboxExtra, "focus in tab with focus currently in textbox that is sibling of tabs");
-
- SimpleTest.finish();
- }, true);
-
- tabbox.selectedIndex = 0;
- textboxExtra.hidden = false;
- synthesizeMouseAtCenter(tab, { });
- });
-
- synthesizeMouseAtCenter(tab, { });
- });
-
- synthesizeMouseAtCenter(tab, { });
-}
-
-function when_tab_focused(tab, callback) {
- tab.addEventListener("focus", function onFocused() {
- tab.removeEventListener("focus", onFocused, true);
- SimpleTest.executeSoon(callback);
- }, true);
-}
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_tabindex.xul b/toolkit/content/tests/chrome/test_tabindex.xul
deleted file mode 100644
index 425cb7b9ed..0000000000
--- a/toolkit/content/tests/chrome/test_tabindex.xul
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for tabindex
- -->
-<window title="tabindex" width="500" height="600"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<!--
- Elements are navigated in the following order:
- 1. tabindex > 0 in tree order
- 2. tabindex = 0 in tree order
- Elements with tabindex = -1 are not in the tab order
- -->
-<hbox>
- <button id="t5" label="One"/>
- <checkbox id="no1" label="Two" tabindex="-1"/>
- <button id="t6" label="Three" tabindex="0"/>
- <checkbox id="t1" label="Four" tabindex="1"/>
-</hbox>
-<hbox>
- <textbox id="t7" idmod="t3" size="3"/>
- <textbox id="no2" size="3" tabindex="-1"/>
- <textbox id="t8" idmod="t4" size="3" tabindex="0"/>
- <textbox id="t2" idmod="t1" size="3" tabindex="1"/>
-</hbox>
-<hbox>
- <button id="no3" style="-moz-user-focus: ignore;" label="One"/>
- <checkbox id="no4" style="-moz-user-focus: ignore;" label="Two" tabindex="-1"/>
- <button id="t9" style="-moz-user-focus: ignore;" label="Three" tabindex="0"/>
- <checkbox id="t3" style="-moz-user-focus: ignore;" label="Four" tabindex="1"/>
-</hbox>
-<hbox>
- <textbox id="t10" idmod="t5" style="-moz-user-focus: ignore;" size="3"/>
- <textbox id="no5" style="-moz-user-focus: ignore;" size="3" tabindex="-1"/>
- <textbox id="t11" idmod="t6" style="-moz-user-focus: ignore;" size="3" tabindex="0"/>
- <textbox id="t4" idmod="t2" style="-moz-user-focus: ignore;" size="3" tabindex="1"/>
-</hbox>
-<listbox id="t12" idmod="t7">
- <listitem label="Item One"/>
-</listbox>
-
-<hbox>
- <!-- the tabindex attribute does not apply to non-controls, so it
- should be treated as -1 for non-focusable dropmarkers, and 0
- for focusable dropmarkers. Thus, the first four dropmarkers
- are not in the tab order, and the last four dropmarkers should
- be in the tab order just after the listbox above.
- -->
- <dropmarker id="no6"/>
- <dropmarker id="no7" tabindex="-1"/>
- <dropmarker id="no8" tabindex="0"/>
- <dropmarker id="no9" tabindex="1"/>
- <dropmarker id="t13" style="-moz-user-focus: normal;"/>
- <dropmarker id="t14" style="-moz-user-focus: normal;" tabindex="-1"/>
- <dropmarker id="t15" style="-moz-user-focus: normal;" tabindex="0"/>
- <dropmarker id="t16" style="-moz-user-focus: normal;" tabindex="1"/>
-</hbox>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-<script>
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-var gAdjustedTabFocusModel = false;
-var gTestCount = 16;
-var gTestsOccurred = 0;
-
-function runTests()
-{
- var t;
- window.addEventListener("focus", function (event) {
- if (t == 1 && event.target.id == "t2") {
- // looks to be using the MacOSX Full Keyboard Access set to Textboxes
- // and lists only so use the idmod attribute instead
- gAdjustedTabFocusModel = true;
- gTestCount = 7;
- }
-
- var attrcompare = gAdjustedTabFocusModel ? "idmod" : "id";
-
- // check for the last test which should wrap aorund to the first item
- // consider the focus event on the inner input of textboxes instead
- if (event.originalTarget.localName == "input") {
- is(document.getBindingParent(event.originalTarget).getAttribute(attrcompare),
- "t" + t, "tab " + t + " to inner input");
- gTestsOccurred++;
- }
- else {
- is(event.target.getAttribute(attrcompare), "t" + t, "tab " + t + " to " + event.target.localName)
- if (event.target.localName != "textbox")
- gTestsOccurred++;
- }
- }, true);
-
- for (t = 1; t <= gTestCount; t++)
- synthesizeKey("VK_TAB", { });
-
- is(gTestsOccurred, gTestCount, "test count");
- SimpleTest.finish();
-}
-
-SimpleTest.waitForFocus(runTests);
-
-]]>
-
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_textbox_dictionary.xul b/toolkit/content/tests/chrome/test_textbox_dictionary.xul
deleted file mode 100644
index 8e69dd15e3..0000000000
--- a/toolkit/content/tests/chrome/test_textbox_dictionary.xul
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for textbox with Add and Undo Add to Dictionary
- -->
-<window title="Textbox Add and Undo Add to Dictionary Test" width="500" height="600"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
- <hbox>
- <textbox id="t1" value="Hellop" oncontextmenu="runContextMenuTest()" spellcheck="true"/>
- </hbox>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-var textbox;
-var testNum;
-
-function bringUpContextMenu(element)
-{
- synthesizeMouseAtCenter(element, { type: "contextmenu", button: 2});
-}
-
-function leftClickElement(element)
-{
- synthesizeMouseAtCenter(element, { button: 0 });
-}
-
-function startTests()
-{
- textbox = document.getElementById("t1");
- textbox.focus();
- testNum = 0;
-
- Components.utils.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm");
- onSpellCheck(textbox, function () {
- bringUpContextMenu(textbox);
- });
-}
-
-function runContextMenuTest()
-{
- SimpleTest.executeSoon( function() {
- // The textbox has its children in an hbox XUL element, so get that first
- var hbox = document.getAnonymousNodes(textbox).item(0);
-
- var contextMenu = document.getAnonymousElementByAttribute(hbox, "anonid", "input-box-contextmenu");
-
- switch(testNum)
- {
- case 0: // "Add to Dictionary" button
- var addToDict = contextMenu.querySelector("[anonid=spell-add-to-dictionary]");
- ok(!addToDict.hidden, "Is Add to Dictionary visible?");
-
- var separator = contextMenu.querySelector("[anonid=spell-suggestions-separator]");
- ok(!separator.hidden, "Is separator visible?");
-
- addToDict.doCommand();
-
- contextMenu.hidePopup();
- testNum++;
-
- onSpellCheck(textbox, function () {
- bringUpContextMenu(textbox);
- });
- break;
-
- case 1: // "Undo Add to Dictionary" button
- var undoAddDict = contextMenu.querySelector("[anonid=spell-undo-add-to-dictionary]");
- ok(!undoAddDict.hidden, "Is Undo Add to Dictioanry visible?");
-
- var separator = contextMenu.querySelector("[anonid=spell-suggestions-separator]");
- ok(!separator.hidden, "Is separator hidden?");
-
- undoAddDict.doCommand();
-
- contextMenu.hidePopup();
- onSpellCheck(textbox, function () {
- SimpleTest.finish();
- });
- break;
- }
- });
-}
-
-SimpleTest.waitForFocus(startTests);
-
- ]]></script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_textbox_emptytext.xul b/toolkit/content/tests/chrome/test_textbox_emptytext.xul
deleted file mode 100644
index 41c702a90e..0000000000
--- a/toolkit/content/tests/chrome/test_textbox_emptytext.xul
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for textbox with placeholder
- -->
-<window title="Textbox with placeholder test" width="500" height="600"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <hbox>
- <textbox id="t1"/>
- </hbox>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-function doTests() {
- var t1 = $("t1");
-
- t1.placeholder = 1;
- ok("1" === t1.label, "placeholder exposed as label");
- ok("" === t1.value, "placeholder not exposed as value");
-
- t1.label = 2;
- ok("2" === t1.label, "label can be set explicitly");
- ok("1" === t1.placeholder, "placeholder persists after setting label");
-
- t1.value = 3;
- ok("3" === t1.value, "value setter/getter works while placeholder is present");
- ok("1" === t1.placeholder, "placeholder persists after setting value");
-
- t1.value = "";
- is(t1.textLength, 0, "textLength while placeholder is displayed");
-
- SimpleTest.finish();
-}
-
-SimpleTest.waitForFocus(doTests);
-
- ]]></script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_textbox_number.xul b/toolkit/content/tests/chrome/test_textbox_number.xul
deleted file mode 100644
index 369e927851..0000000000
--- a/toolkit/content/tests/chrome/test_textbox_number.xul
+++ /dev/null
@@ -1,353 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for textbox type="number"
- -->
-<window title="Textbox type='number' test" width="500" height="600"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<hbox>
- <textbox id="n1" type="number" size="4"/>
- <textbox id="n2" type="number" value="10" min="5" max="15" wraparound="true"/>
-</hbox>
-<hbox>
- <textbox id="n3" type="number" size="4" value="25" min="1" max="12" increment="3"/>
-</hbox>
-<hbox>
- <textbox id="n4" type="number" size="4" value="-2" min="-8" max="18"/>
- <textbox id="n5" type="number" value="-17" min="-10" max="-3"/>
-</hbox>
-<hbox>
- <textbox id="n6" type="number" size="4" value="9" min="12" max="8"/>
-</hbox>
-<hbox>
- <textbox id="n7" type="number" size="4" value="4.678" min="2" max="10.5" decimalplaces="2"/>
- <textbox id="n8" type="number" hidespinbuttons="true"/>
-</hbox>
-<hbox>
- <textbox id="n9" type="number" size="4" oninput="updateInputEventCount();"/>
-</hbox>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-SimpleTest.waitForExplicitFinish();
-
-// ---- NOTE: the numbers used in these tests are carefully chosen to avoid
-// ---- floating point rounding issues
-
-function doTests() {
- var n1 = $("n1");
- var n2 = $("n2");
- var n3 = $("n3");
- var n4 = $("n4");
- var n5 = $("n5");
- var n6 = $("n6");
- var n7 = $("n7");
-
- testValsMinMax(n1, "initial n1", 0, 0, Infinity);
- testValsMinMax(n2, "initial n2", 10, 5, 15);
- testValsMinMax(n3, "initial n3", 12, 1, 12);
- testValsMinMax(n4, "initial n4", -2, -8, 18);
- testValsMinMax(n5, "initial n5", -10, -10, -3);
- testValsMinMax(n6, "initial n6", 12, 12, 12);
- testValsMinMax(n7, "initial n7", 4.68, 2, 10.5); // value should be rounded
-
- ok(n1.spinButtons != null && n1.spinButtons.localName == "spinbuttons", "spinButtons set");
- isnot(n1.decimalSymbol, "", "n1.decimalSymbol is set to something");
- n1.decimalSymbol = ".";
- SimpleTest.is(n1.decimalSymbol, ".", "n1.decimalSymbol set to '.'");
- SimpleTest.is(n1.wrapAround, false, "wrapAround defaults to false");
- SimpleTest.is(n1.increment, 1, "increment defaults to 1");
- SimpleTest.is(n1.decimalPlaces, 0, "decimalPlaces defaults to 0");
-
- SimpleTest.is(n2.wrapAround, true, "wrapAround when set to true");
- SimpleTest.is(n3.increment, 3, "increment when set to 1");
- SimpleTest.is(n7.decimalPlaces, 2, "decimalPlaces when set to 2");
-
- // test changing the value
- n1.value = "1700";
- testVals(n1, "set value,", 1700);
- n1.value = 1600;
- testVals(n1, "set value int,", 1600);
- n2.value = "2";
- testVals(n2, "set value below min,", 5);
- n2.value = 2;
- testVals(n2, "set value below min int,", 5);
- n2.value = 18;
- testVals(n2, "set value above max,", 15);
- n2.value = -6;
- testVals(n2, "set value below min negative,", 5);
- n5.value = -2;
- testVals(n5, "set value above max positive,", -3);
- n7.value = 5.999;
- testVals(n7, "set value to decimal,", 6, "6.00");
- n7.value = "1.42";
- testVals(n7, "set value to decimal below min,", 2.00, "2.00");
- n7.value = 24.1;
- testVals(n7, "set value to decimal above max,", 10.5, "10.50");
- n1.value = 4.75;
- testVals(n1, "set value to decimal round,", 5);
-
- // test changing the valueNumber
- n1.valueNumber = 27;
- testVals(n1, "set valueNumber,", 27);
- n2.valueNumber = 1;
- testVals(n2, "set valueNumber below min,", 5);
- n2.valueNumber = 77;
- testVals(n2, "set valueNumber above max,", 15);
- n2.valueNumber = -5;
- testVals(n2, "set valueNumber below min negative,", 5);
- n5.valueNumber = -8;
- n5.valueNumber = -1;
- testVals(n5, "set valueNumber above max positive,", -3);
- n7.valueNumber = 8.23;
- testVals(n7, "set valueNumber to decimal,", 8.23);
- n7.valueNumber = 0.77;
- testVals(n7, "set valueNumber to decimal below min,", 2.00, "2.00");
- n7.valueNumber = 29.157;
- testVals(n7, "set valueNumber to decimal above max,", 10.5, "10.50");
- n1.value = 8.9;
- testVals(n1, "set valueNumber to decimal round,", 9);
-
- // test changing the min
- n1.value = 6;
- n1.min = 8;
- testValsMinMax(n1, "set integer min,", 8, 8, Infinity);
- n7.value = 5.5;
- n7.min = 6.7;
- testValsMinMax(n7, "set decimal min,", 6.7, 6.7, 10.5, "6.70");
-
- // test changing the max
- n1.value = 25;
- n1.max = 22;
- testValsMinMax(n1, "set integer max,", 22, 8, 22);
- n7.value = 10.2;
- n7.max = 10.1;
- testValsMinMax(n7, "set decimal max,", 10.1, 6.7, 10.1, "10.10");
-
- // test decrease() and increase() methods
- testIncreaseDecrease(n1, "integer", 1, 0, 8, 22);
- testIncreaseDecrease(n7, "decimal", 1, 2, 6.7, 10.1);
- testIncreaseDecrease(n3, "integer with increment", 3, 0, 1, 12);
-
- n7.min = 2.7;
- n7.value = 10.1;
- n7.increment = 4.3;
- SimpleTest.is(n7.increment, 4.3, "increment changed");
- testIncreaseDecrease(n7, "integer with increment", 4.3, 2, 2.7, 10.1);
-
- n2.value = n2.min;
- n2.decrease();
- testVals(n2, "integer wraparound decrease method", n2.max);
- n2.increase();
- testVals(n2, "integer wraparound decrease method", n2.min);
-
- n7.wrapAround = true;
- SimpleTest.is(n7.wrapAround, true, "change wrapAround");
- n7.value = n7.min + 0.01;
- n7.decrease();
- testVals(n7, "decimal wraparound decrease method", n7.max, n7.max.toFixed(2));
- n7.increase();
- testVals(n7, "decimal wraparound decrease method", n7.min, n7.min.toFixed(2));
-
- n1.value = 22;
- n1.decimalPlaces = 3;
- testVals(n1, "set decimalPlaces 3", 22, "22.000");
- n1.value = 10.624;
- testVals(n1, "set decimalPlaces 3 set value,", 10.624);
- n1.decimalPlaces = 0;
- testVals(n1, "set decimalPlaces 0 set value,", 11);
- n1.decimalPlaces = Infinity;
- n1.value = 10.678123;
- testVals(n1, "set decimalPlaces Infinity set value,", 10.678123);
-
- n1.decimalSymbol = ",";
- SimpleTest.is(n1.decimalSymbol, ",", "n1.decimalSymbol set to ','");
- n1.value = "9.67";
- testVals(n1, "set decimalPlaces set value,", 9.67);
-
- n1.decimalSymbol = ".";
- SimpleTest.is(n1.decimalSymbol, ".", "n1.decimalSymbol set back to '.'");
- n1.decimalPlaces = 0;
-
- // UI tests
- n1.min = 5;
- n1.max = 15;
- n1.value = 5;
- n1.focus();
-
- var sb = n1.spinButtons;
- var sbbottom = sb.getBoundingClientRect().bottom - sb.getBoundingClientRect().top - 2;
-
- synthesizeKey("VK_UP", {});
- testVals(n1, "key up", 6);
-
- synthesizeKey("VK_DOWN", {});
- testVals(n1, "key down", 5);
-
- synthesizeMouse(sb, 2, 2, {});
- testVals(n1, "spinbuttons up", 6);
- synthesizeMouse(sb, 2, sbbottom, {});
- testVals(n1, "spinbuttons down", 5);
-
- n1.value = 15;
- synthesizeKey("VK_UP", {});
- testVals(n1, "key up at max", 15);
- synthesizeMouse(sb, 2, 2, {});
- testVals(n1, "spinbuttons up at max", 15);
-
- n1.value = 5;
- synthesizeKey("VK_DOWN", {});
- testVals(n1, "key down at min", 5);
- synthesizeMouse(sb, 2, sbbottom, {});
- testVals(n1, "spinbuttons down at min", 5);
-
- n1.wrapAround = true;
- n1.value = 15;
- synthesizeKey("VK_UP", {});
- testVals(n1, "key up wraparound at max", 5);
- n1.value = 5;
- synthesizeKey("VK_DOWN", {});
- testVals(n1, "key down wraparound at min", 15);
-
- n1.value = 15;
- synthesizeMouse(sb, 2, 2, {});
- testVals(n1, "spinbuttons up wraparound at max", 5);
- n1.value = 5;
- synthesizeMouse(sb, 2, sbbottom, {});
- testVals(n1, "spinbuttons down wraparound at min", 15);
-
- // check read only state
- n1.readOnly = true;
- n1.min = -10;
- n1.max = 15;
- n1.value = 12;
- // no events should fire and no changes should occur when the field is read only
- synthesizeKeyExpectEvent("VK_UP", { }, n1, "!change", "key up read only");
- is(n1.value, "12", "key up read only value");
- synthesizeKeyExpectEvent("VK_DOWN", { }, n1, "!change", "key down read only");
- is(n1.value, "12", "key down read only value");
-
- synthesizeMouseExpectEvent(sb, 2, 2, { }, n1, "!change", "mouse up read only");
- is(n1.value, "12", "mouse up read only value");
- synthesizeMouseExpectEvent(sb, 2, sbbottom, { }, n1, "!change", "mouse down read only");
- is(n1.value, "12", "mouse down read only value");
-
- n1.readOnly = false;
- n1.disabled = true;
- synthesizeMouseExpectEvent(sb, 2, 2, { }, n1, "!change", "mouse up disabled");
- is(n1.value, "12", "mouse up disabled value");
- synthesizeMouseExpectEvent(sb, 2, sbbottom, { }, n1, "!change", "mouse down disabled");
- is(n1.value, "12", "mouse down disabled value");
-
- var nsbrect = $("n8").spinButtons.getBoundingClientRect();
- ok(nsbrect.left == 0 && nsbrect.top == 0 && nsbrect.right == 0, nsbrect.bottom == 0,
- "hidespinbuttons");
-
- var n9 = $("n9");
- is(n9.value, "0", "initial value");
- n9.select();
- synthesizeKey("4", {});
- is(inputEventCount, 1, "input event count");
- is(inputEventValue, "4", "input value");
- is(n9.value, "4", "updated value");
- synthesizeKey("2", {});
- is(inputEventCount, 2, "input event count");
- is(inputEventValue, "42", "input value");
- is(n9.value, "42", "updated value");
- synthesizeKey("VK_BACK_SPACE", {});
- is(inputEventCount, 3, "input event count");
- is(inputEventValue, "4", "input value");
- is(n9.value, "4", "updated value");
- synthesizeKey("A", {accelKey: true});
- synthesizeKey("VK_DELETE", {});
- is(inputEventCount, 4, "input event count");
- is(inputEventValue, "0", "input value");
- is(n9.value, "0", "updated value");
-
- SimpleTest.finish();
-}
-
-var inputEventCount = 0;
-var inputEventValue = null;
-function updateInputEventCount() {
- inputEventValue = $("n9").value;
- inputEventCount++;
-};
-
-function testVals(nb, name, valueNumber, valueFieldNumber) {
- if (valueFieldNumber === undefined)
- valueFieldNumber = "" + valueNumber;
-
- SimpleTest.is(nb.value, "" + valueNumber, name + " value is '" + valueNumber + "'");
- SimpleTest.is(nb.valueNumber, valueNumber, name + " valueNumber is " + valueNumber);
-
- // This value format depends on the localized decimal symbol.
- var localizedValue = valueFieldNumber.replace(/\./, nb.decimalSymbol);
- SimpleTest.is(nb.inputField.value, localizedValue,
- name + " inputField value is '" + localizedValue + "'");
-}
-
-function testValsMinMax(nb, name, valueNumber, min, max, valueFieldNumber) {
- testVals(nb, name, valueNumber, valueFieldNumber);
- SimpleTest.is(nb.min, min, name + " min is " + min);
- SimpleTest.is(nb.max, max, name + " max is " + max);
-}
-
-function testIncreaseDecrease(nb, testid, increment, fixedCount, min, max)
-{
- testid += " ";
-
- nb.value = max;
- nb.decrease();
- testVals(nb, testid + "decrease method", max - increment,
- (max - increment).toFixed(fixedCount));
- nb.increase();
- testVals(nb, testid + "increase method", max, max.toFixed(fixedCount));
- nb.value = min;
- nb.decrease();
- testVals(nb, testid + "decrease method at min", min, min.toFixed(fixedCount));
- nb.value = max;
- nb.increase();
- testVals(nb, testid + "increase method at max", max, max.toFixed(fixedCount));
-
- nb.focus();
- nb.value = min;
-
- // pressing the cursor up and down keys should adjust the value
- synthesizeKeyExpectEvent("VK_UP", { }, nb, "change", testid + "key up");
- is(nb.value, String(min + increment), testid + "key up");
- nb.value = max;
- synthesizeKeyExpectEvent("VK_UP", { }, nb, "!change", testid + "key up at max");
- is(nb.value, String(max), testid + "key up at max");
- synthesizeKeyExpectEvent("VK_DOWN", { }, nb, "change", testid + "key down");
- is(nb.value, String(max - increment), testid + "key down");
- nb.value = min;
- synthesizeKeyExpectEvent("VK_DOWN", { }, nb, "!change", testid + "key down at min");
- is(nb.value, String(min), testid + "key down at min");
-
- // check pressing the spinbutton arrows
- var sb = nb.spinButtons;
- var sbbottom = sb.getBoundingClientRect().bottom - sb.getBoundingClientRect().top - 2;
- nb.value = min;
- synthesizeMouseExpectEvent(sb, 2, 2, { }, nb, "change", testid + "mouse up");
- is(nb.value, String(min + increment), testid + "mouse up");
- nb.value = max;
- synthesizeMouseExpectEvent(sb, 2, 2, { }, nb, "!change", testid + "mouse up at max");
- synthesizeMouseExpectEvent(sb, 2, sbbottom, { }, nb, "change", testid + "mouse down");
- is(nb.value, String(max - increment), testid + "mouse down");
- nb.value = min;
- synthesizeMouseExpectEvent(sb, 2, sbbottom, { }, nb, "!change", testid + "mouse down at min");
-}
-
-SimpleTest.waitForFocus(doTests);
-
- ]]></script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_textbox_search.xul b/toolkit/content/tests/chrome/test_textbox_search.xul
deleted file mode 100644
index ae61533619..0000000000
--- a/toolkit/content/tests/chrome/test_textbox_search.xul
+++ /dev/null
@@ -1,170 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for search textbox
- -->
-<window title="Search textbox test" width="500" height="600"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
- <hbox>
- <textbox id="searchbox"
- type="search"
- oncommand="doSearch(this.value);"
- placeholder="random placeholder"
- timeout="1"/>
- </hbox>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-var gExpectedValue;
-var gLastTest;
-
-function doTests() {
- var textbox = $("searchbox");
- var icons = document.getAnonymousElementByAttribute(textbox, "anonid", "search-icons");
- var searchIcon = document.getAnonymousElementByAttribute(textbox, "class", "textbox-search-icon");
- var clearIcon = document.getAnonymousElementByAttribute(textbox, "class", "textbox-search-clear");
-
- ok(icons, "icon deck found");
- ok(searchIcon, "search icon found");
- ok(clearIcon, "clear icon found");
- is(icons.selectedPanel, searchIcon, "search icon is displayed");
-
- is(textbox.placeholder, "random placeholder", "search textbox supports placeholder");
- is(textbox.value, "", "placeholder doesn't interfere with the real value");
-
- function iconClick(aIcon) {
- is(icons.selectedPanel, aIcon, aIcon.className + " icon must be displayed in order to be clickable");
-
- //XXX synthesizeMouse worked on Linux but failed on Windows an Mac
- // for unknown reasons. Manually dispatch the event for now.
- //synthesizeMouse(aIcon, 0, 0, {});
-
- var event = document.createEvent("MouseEvent");
- event.initMouseEvent("click", true, true, window, 1,
- 0, 0, 0, 0,
- false, false, false, false,
- 0, null);
- aIcon.dispatchEvent(event);
- }
-
- iconClick(searchIcon);
- is(textbox.getAttribute("focused"), "true", "clicking the search icon focuses the textbox");
-
- textbox.value = "foo";
- is(icons.selectedPanel, clearIcon, "clear icon is displayed when setting a value");
-
- textbox.reset();
- is(textbox.defaultValue, "", "defaultValue is empty");
- is(textbox.value, "", "reset method clears the textbox");
- is(icons.selectedPanel, searchIcon, "search icon is displayed after textbox.reset()");
-
- textbox.value = "foo";
- gExpectedValue = "";
- iconClick(clearIcon);
- is(textbox.value, "", "clicking the clear icon clears the textbox");
- ok(gExpectedValue == null, "search triggered when clearing the textbox with the clear icon");
-
- textbox.value = "foo";
- gExpectedValue = "";
- synthesizeKey("VK_ESCAPE", {});
- is(textbox.value, "", "escape key clears the textbox");
- ok(gExpectedValue == null, "search triggered when clearing the textbox with the escape key");
-
- textbox.value = "bar";
- gExpectedValue = "bar";
- textbox.doCommand();
- ok(gExpectedValue == null, "search triggered with doCommand");
-
- gExpectedValue = "bar";
- synthesizeKey("VK_RETURN", {});
- ok(gExpectedValue == null, "search triggered with enter key");
-
- textbox.value = "";
- textbox.searchButton = true;
- is(textbox.getAttribute("searchbutton"), "true", "searchbutton attribute set on the textbox");
- is(searchIcon.getAttribute("searchbutton"), "true", "searchbutton attribute inherited to the search icon");
-
- textbox.value = "foo";
- is(icons.selectedPanel, searchIcon, "search icon displayed in search button mode if there's a value");
-
- gExpectedValue = "foo";
- iconClick(searchIcon);
- ok(gExpectedValue == null, "search triggered when clicking the search icon in search button mode");
- is(icons.selectedPanel, clearIcon, "clear icon displayed in search button mode after submitting");
-
- synthesizeKey("o", {});
- is(icons.selectedPanel, searchIcon, "search icon displayed in search button mode when typing a key");
-
- gExpectedValue = "fooo";
- iconClick(searchIcon); // display the clear icon (tested above)
-
- textbox.value = "foo";
- is(icons.selectedPanel, searchIcon, "search icon displayed in search button mode when the value is changed");
-
- gExpectedValue = "foo";
- synthesizeKey("VK_RETURN", {});
- ok(gExpectedValue == null, "search triggered with enter key in search button mode");
- is(icons.selectedPanel, clearIcon, "clear icon displayed in search button mode after submitting with enter key");
-
- textbox.value = "x";
- synthesizeKey("VK_BACK_SPACE", {});
- is(icons.selectedPanel, searchIcon, "search icon displayed in search button mode when deleting the value with the backspace key");
-
- gExpectedValue = "";
- synthesizeKey("VK_RETURN", {});
- ok(gExpectedValue == null, "search triggered with enter key in search button mode");
- is(icons.selectedPanel, searchIcon, "search icon displayed in search button mode after submitting an empty string");
-
- textbox.readOnly = true;
- gExpectedValue = "foo";
- textbox.value = "foo";
- iconClick(searchIcon);
- ok(gExpectedValue == null, "search triggered when clicking the search icon in search button mode while the textbox is read-only");
- is(icons.selectedPanel, searchIcon, "search icon persists in search button mode after submitting while the textbox is read-only");
- textbox.readOnly = false;
-
- textbox.disabled = true;
- is(searchIcon.getAttribute("disabled"), "true", "disabled attribute inherited to the search icon");
- is(clearIcon.getAttribute("disabled"), "true", "disabled attribute inherited to the clear icon");
- gExpectedValue = false;
- textbox.value = "foo";
- iconClick(searchIcon);
- ok(gExpectedValue == false, "search *not* triggered when clicking the search icon in search button mode while the textbox is disabled");
- is(icons.selectedPanel, searchIcon, "search icon persists in search button mode when trying to submit while the textbox is disabled");
- textbox.disabled = false;
- ok(!searchIcon.hasAttribute("disabled"), "disabled attribute removed from the search icon");
- ok(!clearIcon.hasAttribute("disabled"), "disabled attribute removed from the clear icon");
-
- textbox.searchButton = false;
- ok(!textbox.hasAttribute("searchbutton"), "searchbutton attribute removed from the textbox");
- ok(!searchIcon.hasAttribute("searchbutton"), "searchbutton attribute removed from the search icon");
-
- gLastTest = true;
- gExpectedValue = "123";
- textbox.value = "1";
- synthesizeKey("2", {});
- synthesizeKey("3", {});
-}
-
-function doSearch(aValue) {
- is(aValue, gExpectedValue, "search triggered with expected value");
- gExpectedValue = null;
- if (gLastTest)
- SimpleTest.finish();
-}
-
-SimpleTest.waitForFocus(doTests);
-
- ]]></script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_timepicker.xul b/toolkit/content/tests/chrome/test_timepicker.xul
deleted file mode 100644
index 98e370137f..0000000000
--- a/toolkit/content/tests/chrome/test_timepicker.xul
+++ /dev/null
@@ -1,207 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for timepicker
- -->
-<window title="timepicker" width="500" height="600"
- onload="setTimeout(testtag_timepicker, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<timepicker id="timepicker"/>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display"></p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-<script>
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-function testtag_timepicker()
-{
- var tp = document.getElementById("timepicker");
-
- var testid = "timepicker ";
-
- var today = new Date();
- var thour = today.getHours();
- var tminute = today.getMinutes();
- var tsecond = today.getSeconds();
-
- // testtag_comparetime(tp, testid + "initial", thour, tminute, tsecond);
-
- // check that setting the value property works
- tp.value = testtag_gettimestring(thour, tminute, tsecond);
- testtag_comparetime(tp, testid + "set value", thour, tminute, tsecond);
-
- var numberOrder = /^(\D*)\s*(\d+)(\D*)(\d+)(\D*)(\d+)\s*(\D*)$/;
- var locale = Intl.DateTimeFormat().resolvedOptions().locale + "-u-ca-gregory-nu-latn";
- var fdt = new Date(2000,0,1,16,7,9).toLocaleTimeString(locale);
- is(tp.is24HourClock, Number(fdt.match(numberOrder)[2]) > 12, "is24HourClock");
-
- // check that setting the dateValue property works
- tp.dateValue = today;
- testtag_comparetime(tp, testid + "set dateValue", thour, tminute, tsecond);
- ok(tp.value !== today, testid + " set dateValue different time");
-
- ok(!tp.readOnly, testid + "readOnly");
- tp.readOnly = true;
- ok(tp.readOnly, testid + "set readOnly");
- tp.readOnly = false;
- ok(!tp.readOnly, testid + "clear readOnly");
-
- function setTimeField(field, value, expectException,
- expectedHour, expectedMinute, expectedSecond)
- {
- var exh = false;
- try {
- tp[field] = value;
- } catch (ex) { exh = true; }
- is(exh, expectException, testid + "set " + field + " " + value);
- testtag_comparetime(tp, testid + "set " + field + " " + value,
- expectedHour, expectedMinute, expectedSecond);
- }
-
- // check the value property
- setTimeField("value", "0:0:0", false, 0, 0, 0);
- setTimeField("value", "21:1:40", false, 21, 1, 40);
- setTimeField("value", "7:11:8", false, 7, 11, 8);
- setTimeField("value", "04:07:02", false, 4, 7, 2);
- setTimeField("value", "10:42:20", false, 10, 42, 20);
-
- // check that the hour, minute and second fields can be set properly
- setTimeField("hour", 7, false, 7, 42, 20);
- setTimeField("hour", 0, false, 0, 42, 20);
- setTimeField("hour", 21, false, 21, 42, 20);
- setTimeField("hour", -1, true, 21, 42, 20);
- setTimeField("hour", 24, true, 21, 42, 20);
-
- setTimeField("minute", 0, false, 21, 0, 20);
- setTimeField("minute", 9, false, 21, 9, 20);
- setTimeField("minute", 10, false, 21, 10, 20);
- setTimeField("minute", 35, false, 21, 35, 20);
- setTimeField("minute", -1, true, 21, 35, 20);
- setTimeField("minute", 60, true, 21, 35, 20);
-
- setTimeField("second", 0, false, 21, 35, 0);
- setTimeField("second", 9, false, 21, 35, 9);
- setTimeField("second", 10, false, 21, 35, 10);
- setTimeField("second", 51, false, 21, 35, 51);
- setTimeField("second", -1, true, 21, 35, 51);
- setTimeField("second", 60, true, 21, 35, 51);
-
- // check when seconds is not specified
- setTimeField("value", "06:05", false, 6, 5, 0);
- setTimeField("value", "06:15", false, 6, 15, 0);
- setTimeField("value", "16:15", false, 16, 15, 0);
-
- // check that times overflow properly
- setTimeField("value", "5:65:21", false, 6, 5, 21);
- setTimeField("value", "5:25:72", false, 5, 26, 12);
-
- // check invalid values for the value and dateValue properties
- tp.value = "14:25:48";
- setTimeField("value", "", true, 14, 25, 48);
- setTimeField("value", "1:5:6:6", true, 14, 25, 48);
- setTimeField("value", "2:a:19", true, 14, 25, 48);
- setTimeField("dateValue", "none", true, 14, 25, 48);
-
- // check the fields
- ok(tp.hourField instanceof HTMLInputElement, testid + "hourField");
- ok(tp.minuteField instanceof HTMLInputElement, testid + "minuteField");
- ok(tp.secondField instanceof HTMLInputElement, testid + "secondField");
-
- testtag_timepicker_UI(tp, testid);
-
- tp.readOnly = true;
-
- // check that keyboard usage doesn't change the value when the timepicker
- // is read only
- testtag_timepicker_UI_key(tp, testid + "readonly ", "14:25:48",
- tp.hourField, 14, 25, 48, 14, 25, 48);
- testtag_timepicker_UI_key(tp, testid + "readonly ", "14:25:48",
- tp.minuteField, 14, 25, 48, 14, 25, 48);
- testtag_timepicker_UI_key(tp, testid + "readonly ", "14:25:48",
- tp.secondField, 14, 25, 48, 14, 25, 48);
-
- SimpleTest.finish();
-}
-
-function testtag_timepicker_UI(tp, testid)
-{
- testid += "UI";
-
- // test adjusting the time with the up and down keys
- testtag_timepicker_UI_key(tp, testid, "0:12:25", tp.hourField, 1, 12, 25, 0, 12, 25);
- testtag_timepicker_UI_key(tp, testid, "11:12:25", tp.hourField, 12, 12, 25, 11, 12, 25);
- testtag_timepicker_UI_key(tp, testid, "7:12:25", tp.hourField, 8, 12, 25, 7, 12, 25);
- testtag_timepicker_UI_key(tp, testid, "16:12:25", tp.hourField, 17, 12, 25, 16, 12, 25);
- testtag_timepicker_UI_key(tp, testid, "23:12:25", tp.hourField, 0, 12, 25, 23, 12, 25);
-
- testtag_timepicker_UI_key(tp, testid, "15:23:46", tp.minuteField, 15, 24, 46, 15, 23, 46);
- testtag_timepicker_UI_key(tp, testid, "15:0:46", tp.minuteField, 15, 1, 46, 15, 0, 46);
- testtag_timepicker_UI_key(tp, testid, "15:59:46", tp.minuteField, 15, 0, 46, 15, 59, 46);
-
- testtag_timepicker_UI_key(tp, testid, "11:50:46", tp.secondField, 11, 50, 47, 11, 50, 46);
- testtag_timepicker_UI_key(tp, testid, "11:50:0", tp.secondField, 11, 50, 1, 11, 50, 0);
- testtag_timepicker_UI_key(tp, testid, "11:50:59", tp.secondField, 11, 50, 0, 11, 50, 59);
-}
-
-function testtag_timepicker_UI_key(tp, testid, value, field,
- uhour, uminute, usecond,
- dhour, dminute, dsecond)
-{
- tp.value = value;
- field.focus();
-
- var eventTarget = tp.readOnly ? null : tp;
-
- var testname = testid + " " + value + " key up";
- synthesizeKeyExpectEvent("VK_UP", { }, eventTarget, "change", testname);
- testtag_comparetime(tp, testname, uhour, uminute, usecond);
-
- testname = testid + " " + value + " key down";
- synthesizeKeyExpectEvent("VK_DOWN", { }, eventTarget, "change", testname);
- testtag_comparetime(tp, testname, dhour, dminute, dsecond);
-}
-
-function testtag_gettimestring(hour, minute, second)
-{
- if (minute < 10)
- minute = "0" + minute;
- if (second < 10)
- second = "0" + second;
- return hour + ":" + minute + ":" + second;
-}
-
-function testtag_comparetime(tp, testid, hour, minute, second)
-{
- is(tp.value, testtag_gettimestring(hour, minute, second), testid + " value");
- is(tp.getAttribute("value"),
- testtag_gettimestring(hour, minute, second),
- testid + " value attribute");
-
- var dateValue = tp.dateValue;
- ok(dateValue.getHours() == hour &&
- dateValue.getMinutes() == minute &&
- dateValue.getSeconds() == second,
- testid + " dateValue");
-
- is(tp.hour, hour, testid + " hour");
- is(tp.minute, minute, testid + " minute");
- is(tp.second, second, testid + " second");
-}
-
-]]>
-
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_titlebar.xul b/toolkit/content/tests/chrome/test_titlebar.xul
deleted file mode 100644
index d48e04a129..0000000000
--- a/toolkit/content/tests/chrome/test_titlebar.xul
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for the titlebar element and window dragging
- -->
-<window title="Titlebar" width="200" height="200"
- onload="setTimeout(test_titlebar, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-function test_titlebar()
-{
- window.open("window_titlebar.xul", "_blank", "chrome,left=200,top=200");
-}
-
-function done(testWindow)
-{
- testWindow.close();
- SimpleTest.finish();
-}
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_toolbar.xul b/toolkit/content/tests/chrome/test_toolbar.xul
deleted file mode 100644
index 7adaa6aa33..0000000000
--- a/toolkit/content/tests/chrome/test_toolbar.xul
+++ /dev/null
@@ -1,227 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Toolbar" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="startTest();">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <toolbox id="toolbox">
- <toolbarpalette>
- <toolbarbutton id="p1" label="p1"/>
- <toolbarbutton id="p2" label="p2"/>
- <toolbarbutton id="p3" label="p3"/>
- <toolbarbutton id="p4" label="p4"/>
- <toolbarbutton id="p5" label="p5"/>
- <toolbarbutton id="p6" label="p6"/>
- <toolbarbutton id="p7" label="p7"/>
- <toolbarbutton id="p8" label="p8"/>
- <toolbarbutton id="p9" label="p9"/>
- <toolbarbutton id="p10" label="p10"/>
- <toolbarbutton id="p11" label="p11"/>
- <toolbarbutton id="p12" label="p12"/>
- </toolbarpalette>
-
- <toolbar id="tb1" defaultset="p1,p2"/>
- <toolbar id="tb2" defaultset="p4,p3"/>
- <toolbar id="tb3" defaultset="p5,p6,t31">
- <toolbarbutton id="t31" label="t31" removable="true"/>
- </toolbar>
- <toolbar id="tb4" defaultset="t41,p7,p8">
- <toolbarbutton id="t41" label="t41" removable="true"/>
- </toolbar>
- <toolbar id="tb5" defaultset="p9,t51,p10">
- <toolbarbutton id="t51" label="t51" removable="true"/>
- </toolbar>
-
- <toolbar id="tb-test" defaultset="p11,p12"/>
- <toolbar id="tb-test2" defaultset=""/>
- <!-- fixed toolbarbuttons always have 'fixed' in their id -->
- <toolbar id="tb-test3" defaultset="">
- <toolbarbutton id="tb-fixed-1" label="tb-test3-1"/>
- <toolbarbutton id="tb-fixed-2" label="tb-test3-2" removable="false"/>
- <toolbarbutton id="tb-fixed-3" label="tb-test3-3"/>
- </toolbar>
- </toolbox>
-
- <toolbar id="notoolbox"/>
-
- <!-- test resuls are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml"
- style="height: 300px; overflow: auto;"/>
-
- <!-- test code goes here -->
- <script type="text/javascript"><![CDATA[
- const SPACER = /^spacer\d+/;
- const SEPARATOR = /^separator\d+/;
- const SPRING = /^spring\d+/;
-
- function testSet(aTb, aIDs, aResultIDs, aUseFixed) {
- // build a list of the fixed items in the order they appear on the toolbar
- var fixedSet = [];
- if (aUseFixed) {
- for (let i = 0; i < aTb.childNodes.length; i++) {
- var id = aTb.childNodes[i].id;
- if (id.indexOf("fixed") >= 0)
- fixedSet.push(id);
- }
- }
-
- var currentSet = aIDs.join(",");
- ok(currentSet, "setting currentSet: " + currentSet);
- aTb.currentSet = currentSet;
- var resultIDs = aResultIDs || aIDs;
- checkSet(aTb, resultIDs, fixedSet);
- }
-
- var checkSetCount = 0;
- function checkSet(aTb, aResultIDs, aFixedSet) {
- checkSetCount++;
- var testID = "checkSet(" + checkSetCount + ") ";
-
- for (let i = 0; i < aTb.childNodes.length; i++) {
- let id = aTb.childNodes[i].id;
- if (aResultIDs[i] instanceof RegExp) {
- ok(aResultIDs[i].test(id),
- testID + "correct ID " + aResultIDs[i] + " for toolbar " + aTb.id + "; got: " + id);
- }
- else if (aResultIDs[i] == "*") {
- is(id, aFixedSet.shift(), testID + "is fixed with ID " + id + " for toolbar " + aTb.id);
- }
- else {
- is(id, aResultIDs[i],
- testID + "correct ID " + aResultIDs[i] + " for toolbar " + aTb.id +
- "****" + aResultIDs + "," + i + ",");
- // remove the item from the fixed set once found
- if (aFixedSet && id.indexOf("fixed") >= 0)
- aFixedSet.splice(aFixedSet.indexOf(id), 1);
- }
- }
-
- if (aFixedSet)
- is(aFixedSet.length, 0, testID + "extra fixed items for " + aTb.id);
- is(aTb.childNodes.length, aResultIDs.length,
- testID + "correct number of children for " + aTb.id);
- }
-
- function test_defaultSet() {
- checkSet($("tb1"), ["p1", "p2"]);
- checkSet($("tb2"), ["p4", "p3"]);
- checkSet($("tb3"), ["p5", "p6", "t31"]);
- checkSet($("tb4"), ["t41", "p7", "p8"]);
- checkSet($("tb5"), ["p9", "t51", "p10"]);
- }
-
- function test_currentSet(aTb) {
- ok(aTb, "have toolbar");
- var defaultSet = aTb.getAttribute("defaultset");
- var setLength = (defaultSet && defaultSet.split(",").length) || 0;
- is(setLength, aTb.childNodes.length, "correct # of children initially");
-
- var emptySet = [["__empty"], []];
- var testSets = [
- emptySet,
- [["p11"]],
- [["p11","p12"]],
- [["p11","p12","bogus"], ["p11","p12"]],
- [["p11"]],
- emptySet,
- [["spacer"], [SPACER]],
- [["spring"], [SPRING]],
- [["separator"], [SEPARATOR]],
- [["p11", "p11", "p12", "spacer", "p11"], ["p11", "p12", SPACER]],
- [["separator", "separator", "p11", "spring", "spacer"],
- [SEPARATOR, SEPARATOR, "p11", SPRING, SPACER]],
- [["separator", "spacer", "separator", "p11", "spring", "spacer", "p12", "spring"],
- [SEPARATOR, SPACER, SEPARATOR, "p11", SPRING, SPACER, "p12", SPRING]],
- emptySet
- ];
-
- cycleSets(aTb, testSets, emptySet, false);
- }
-
- function test_currentSet_nonremovable() {
- var tb = $("tb-test3");
- ok(tb, "have tb-test-3");
-
- // the * used in the tests below means that any fixed item can appear in that position
- var emptySet = [["__empty"], ["*", "*", "*"]];
- var testSets = [
- [["p1", "tb-fixed-1", "p2"],
- ["p1", "tb-fixed-1", "p2", "*", "*"]],
- [["p1", "tb-fixed-2", "p2"],
- ["p1", "tb-fixed-2", "p2", "*", "*"]],
- [["p1", "tb-fixed-3", "p2"],
- ["p1", "tb-fixed-3", "p2", "*", "*"]],
- emptySet,
-
- [["tb-fixed-1", "tb-fixed-2", "tb-fixed-3"],
- ["tb-fixed-1", "tb-fixed-2", "tb-fixed-3"]],
- [["tb-fixed-3", "tb-fixed-2", "tb-fixed-1"],
- ["tb-fixed-3", "tb-fixed-2", "tb-fixed-1"]],
-
- [["tb-fixed-1", "tb-fixed-2", "tb-fixed-3", "p1", "p2"],
- ["tb-fixed-1", "tb-fixed-2", "tb-fixed-3", "p1", "p2"]],
-
- [["tb-fixed-1", "p2", "p1"],
- ["tb-fixed-1", "p2", "p1", "*", "*"]],
-
- [["tb-fixed-1", "p2"],
- ["tb-fixed-1", "p2", "*", "*"]],
-
- [["p1", "p2"], ["p1", "p2", "*", "*", "*"]],
- [["p2", "p1"], ["p2", "p1", "*", "*", "*"]],
-
- [["tb-fixed-3", "spacer", "p1"],
- ["tb-fixed-3", SPACER, "p1", "*", "*"]]
- ];
-
- cycleSets(tb, testSets, emptySet, true);
- }
-
- function cycleSets(aTb, aSets, aEmptySet, aUseFixed) {
- // Since a lot of the tricky cases handled in the currentSet setter
- // depend on going from one state to another, run through the test set
- // multiple times in different orders.
- var length = aSets.length;
-
- for (var i = 0; i < length; i++) {
- testSet(aTb, aSets[i][0], aSets[i][1], aUseFixed);
- }
- for (var i = length - 1; i >= 0; i--) {
- testSet(aTb, aSets[i][0], aSets[i][1], aUseFixed);
- }
- for (var i = 0; i < length; i++) {
- testSet(aTb, aSets[i][0], aSets[i][1], aUseFixed);
- testSet(aTb, aSets[length - i - 1][0], aSets[length - i - 1][1], aUseFixed);
- testSet(aTb, aSets[i][0], aSets[i][1], aUseFixed);
- testSet(aTb, aSets[i][0], aSets[i][1], aUseFixed);
- }
- for (var i = 0; i < length; i++) {
- testSet(aTb, aEmptySet[0], aEmptySet[1], aUseFixed);
- testSet(aTb, aSets[i][0], aSets[i][1], aUseFixed);
- }
- }
-
- SimpleTest.waitForExplicitFinish();
- function startTest() {
- test_defaultSet();
- test_currentSet($("tb-test"));
- test_currentSet($("tb-test2"));
- test_currentSet_nonremovable();
-
- var toolbox = $("toolbox");
- var toolbars = document.getElementsByTagName("toolbar");
- for (var t = 0; t < toolbars.length; t++) {
- var toolbar = toolbars[t];
- is(toolbar.toolbox, toolbar.id == "notoolbox" ? null : toolbox,
- "toolbar " + toolbar.id + " has correct toolbox");
- }
-
- $("tb1").toolbox = document.documentElement;
- is($("tb1").toolbox, toolbox, "toolbox still correct after set");
- SimpleTest.finish();
- }
- ]]></script>
-</window>
diff --git a/toolkit/content/tests/chrome/test_tooltip.xul b/toolkit/content/tests/chrome/test_tooltip.xul
deleted file mode 100644
index b5650352da..0000000000
--- a/toolkit/content/tests/chrome/test_tooltip.xul
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Tooltip Tests"
- onload="setTimeout(runTest, 0)"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
-<script>
-SimpleTest.waitForExplicitFinish();
-function runTest()
-{
- window.open("window_tooltip.xul", "_blank", "chrome,width=700,height=700");
-}
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_tooltip_noautohide.xul b/toolkit/content/tests/chrome/test_tooltip_noautohide.xul
deleted file mode 100644
index 979e424774..0000000000
--- a/toolkit/content/tests/chrome/test_tooltip_noautohide.xul
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Tooltip Noautohide Tests"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<tooltip id="thetooltip" noautohide="true"
- onpopupshown="setTimeout(tooltipStillShown, 6000)"
- onpopuphidden="ok(gChecked, 'tooltip did not hide'); SimpleTest.finish()">
- <label id="label" value="This is a tooltip"/>
-</tooltip>
-
-<button id="button" label="Tooltip Text" tooltip="thetooltip"/>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-var gChecked = false;
-
-function runTests()
-{
- var button = document.getElementById("button");
- var windowUtils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
- .getInterface(Components.interfaces.nsIDOMWindowUtils);
- windowUtils.disableNonTestMouseEvents(true);
- synthesizeMouse(button, 2, 2, { type: "mouseover" });
- synthesizeMouse(button, 4, 4, { type: "mousemove" });
- synthesizeMouse(button, 6, 6, { type: "mousemove" });
- windowUtils.disableNonTestMouseEvents(false);
-}
-
-function tooltipStillShown()
-{
- gChecked = true;
- document.getElementById("thetooltip").hidePopup();
-}
-
-SimpleTest.waitForExplicitFinish();
-SimpleTest.waitForFocus(runTests);
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_tree.xul b/toolkit/content/tests/chrome/test_tree.xul
deleted file mode 100644
index 52de74e462..0000000000
--- a/toolkit/content/tests/chrome/test_tree.xul
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for tree using multiple row selection
- -->
-<window title="Tree" width="500" height="600"
- onload="setTimeout(testtag_tree, 0, 'tree-simple', 'treechildren-simple', 'multiple', 'simple', 'tree');"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<script src="tree_shared.js"/>
-
-<tree id="tree-simple" rows="4">
- <treecols>
- <treecol id="name" label="Name" sort="label" properties="one two" flex="1"/>
- <treecol id="address" label="Address" flex="1"/>
- </treecols>
- <treechildren id="treechildren-simple">
- <treeitem>
- <treerow>
- <treecell label="Mary"/>
- <treecell label="206 Garden Avenue"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Chris"/>
- <treecell label="19 Marion Street"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Sarah"/>
- <treecell label="702 Fern Avenue" editable="false"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="John"/>
- <treecell label="99 Westminster Avenue"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Mary"/>
- <treecell label="206 Garden Avenue"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Chris"/>
- <treecell label="19 Marion Street"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Sarah"/>
- <treecell label="702 Fern Avenue"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="John"/>
- <treecell label="99 Westminster Avenue"/>
- </treerow>
- </treeitem>
- </treechildren>
-</tree>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-]]>
-</script>
-
-</window>
-
diff --git a/toolkit/content/tests/chrome/test_tree_hier.xul b/toolkit/content/tests/chrome/test_tree_hier.xul
deleted file mode 100644
index d1a599eaa1..0000000000
--- a/toolkit/content/tests/chrome/test_tree_hier.xul
+++ /dev/null
@@ -1,136 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for hierarchical tree
- -->
-<window title="Hierarchical Tree" width="500" height="600"
- onload="setTimeout(testtag_tree, 0, 'tree-hier', 'treechildren-hier', 'multiple', '', 'hierarchical tree');"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<script src="tree_shared.js"/>
-
-<tree id="tree-hier" rows="4">
- <treecols>
- <treecol id="name" label="Name" primary="true"
- sort="label" properties="one two" flex="1"/>
- <treecol id="address" label="Address" flex="2"/>
- <treecol id="planet" label="Planet" flex="1"/>
- <treecol id="gender" label="Gender" flex="1" cycler="true"/>
- </treecols>
- <treechildren id="treechildren-hier">
- <treeitem>
- <treerow properties="firstrow">
- <treecell label="Mary" value="mary" properties="firstname"/>
- <treecell label="206 Garden Avenue" value="206ga"/>
- <treecell label="Earth"/>
- <treecell label="Female" value="f"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell/>
- <treecell value="19ms"/>
- <treecell label="Earth"/>
- <treecell label="Male" value="m"/>
- </treerow>
- </treeitem>
- <treeitem container="true">
- <treerow>
- <treecell label="Sarah"/>
- <treecell label="702 Fern Avenue" editable="false"/>
- <treecell label="Saturn"/>
- <treecell label="Female" value="f"/>
- </treerow>
- <treechildren>
- <treeitem>
- <treerow>
- <treecell label="Mary"/>
- <treecell label="206 Garden Avenue"/>
- <treecell label="Female" value="f"/>
- <treecell label="Neptune"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Chris"/>
- <treecell label="19 Marion Street"/>
- <treecell label="Omicron Persei 8"/>
- <treecell label="Male" value="m"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Sarah"/>
- <treecell label="702 Fern Avenue" editable="false"/>
- <treecell label="Earth"/>
- <treecell label="Female" value="f"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="John"/>
- <treecell label="99 Westminster Avenue"/>
- <treecell label="Neptune"/>
- <treecell label="Male" value="m"/>
- </treerow>
- </treeitem>
- </treechildren>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="John"/>
- <treecell label="99 Westminster Avenue"/>
- <treecell/>
- <treecell label="Male" value="m"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Mary"/>
- <treecell label="206 Garden Avenue" selectable="false"/>
- <treecell label=""/>
- <treecell label="Female" value="f"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Chris"/>
- <treecell label="19 Marion Street"/>
- <treecell label="Neptune"/>
- <treecell label="Male" value="m"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Sarah"/>
- <treecell label="702 Fern Avenue"/>
- <treecell label="Earth"/>
- <treecell label="Female" value="f"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="John"/>
- <treecell label="99 Westminster Avenue"/>
- <treecell label="Mars"/>
- <treecell label="Male" value="m"/>
- </treerow>
- </treeitem>
- </treechildren>
-</tree>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_tree_hier_cell.xul b/toolkit/content/tests/chrome/test_tree_hier_cell.xul
deleted file mode 100644
index 29e92ba3b6..0000000000
--- a/toolkit/content/tests/chrome/test_tree_hier_cell.xul
+++ /dev/null
@@ -1,136 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for cell selection tree
- -->
-<window title="Cell Selection Tree" width="500" height="600"
- onload="setTimeout(testtag_tree, 0, 'tree-cell', 'treechildren-cell', 'cell', '', 'cell selection tree');"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<script src="tree_shared.js"/>
-
-<tree id="tree-cell" rows="4" seltype="cell">
- <treecols>
- <treecol id="name" label="Name" primary="true"
- sort="label" properties="one two" flex="1"/>
- <treecol id="address" label="Address" flex="2"/>
- <treecol id="planet" label="Planet" flex="1"/>
- <treecol id="gender" label="Gender" flex="1" cycler="true"/>
- </treecols>
- <treechildren id="treechildren-cell">
- <treeitem>
- <treerow properties="firstrow">
- <treecell label="Mary" value="mary" properties="firstname"/>
- <treecell label="206 Garden Avenue" value="206ga"/>
- <treecell label="Earth"/>
- <treecell label="Female" value="f"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell/>
- <treecell value="19ms"/>
- <treecell label="Earth"/>
- <treecell label="Male" value="m"/>
- </treerow>
- </treeitem>
- <treeitem container="true">
- <treerow>
- <treecell label="Sarah"/>
- <treecell label="702 Fern Avenue" editable="false"/>
- <treecell label="Saturn"/>
- <treecell label="Female" value="f"/>
- </treerow>
- <treechildren>
- <treeitem>
- <treerow>
- <treecell label="Mary"/>
- <treecell label="206 Garden Avenue"/>
- <treecell label="Female" value="f"/>
- <treecell label="Neptune"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Chris"/>
- <treecell label="19 Marion Street"/>
- <treecell label="Omicron Persei 8"/>
- <treecell label="Male" value="m"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Sarah"/>
- <treecell label="702 Fern Avenue" editable="false"/>
- <treecell label="Earth"/>
- <treecell label="Female" value="f"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="John"/>
- <treecell label="99 Westminster Avenue"/>
- <treecell label="Neptune"/>
- <treecell label="Male" value="m"/>
- </treerow>
- </treeitem>
- </treechildren>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="John"/>
- <treecell label="99 Westminster Avenue"/>
- <treecell/>
- <treecell label="Male" value="m"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Mary"/>
- <treecell label="206 Garden Avenue" selectable="false"/>
- <treecell label=""/>
- <treecell label="Female" value="f"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Chris"/>
- <treecell label="19 Marion Street"/>
- <treecell label="Neptune"/>
- <treecell label="Male" value="m"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Sarah"/>
- <treecell label="702 Fern Avenue"/>
- <treecell label="Earth"/>
- <treecell label="Female" value="f"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="John"/>
- <treecell label="99 Westminster Avenue"/>
- <treecell label="Mars"/>
- <treecell label="Male" value="m"/>
- </treerow>
- </treeitem>
- </treechildren>
-</tree>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_tree_single.xul b/toolkit/content/tests/chrome/test_tree_single.xul
deleted file mode 100644
index 9b64cb488a..0000000000
--- a/toolkit/content/tests/chrome/test_tree_single.xul
+++ /dev/null
@@ -1,110 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for single selection tree
- -->
-<window title="Single Selection Tree" width="500" height="600"
- onload="setTimeout(testtag_tree, 0, 'tree-single', 'treechildren-single',
- 'single', 'simple', 'single selection tree');"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<script src="tree_shared.js"/>
-
-<tree id="tree-single" rows="4" seltype="single">
- <treecols>
- <treecol id="name" label="Name" sort="label" properties="one two" flex="1"/>
- <treecol id="address" label="Address" flex="1"/>
- </treecols>
- <treechildren id="treechildren-single">
- <treeitem>
- <treerow properties="firstrow">
- <treecell label="Mary" value="mary" properties="firstname"/>
- <treecell label="206 Garden Avenue" value="206ga"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell/>
- <treecell value="19ms"/>
- </treerow>
- </treeitem>
- <treeitem container="true">
- <treerow>
- <treecell label="Sarah"/>
- <treecell label="702 Fern Avenue" editable="false"/>
- </treerow>
- <treechildren>
- <treeitem>
- <treerow>
- <treecell label="Mary"/>
- <treecell label="206 Garden Avenue"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Chris"/>
- <treecell label="19 Marion Street"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Sarah"/>
- <treecell label="702 Fern Avenue" editable="false"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="John"/>
- <treecell label="99 Westminster Avenue"/>
- </treerow>
- </treeitem>
- </treechildren>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="John"/>
- <treecell label="99 Westminster Avenue"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Mary"/>
- <treecell label="206 Garden Avenue" selectable="false"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Chris"/>
- <treecell label="19 Marion Street"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="Sarah"/>
- <treecell label="702 Fern Avenue"/>
- </treerow>
- </treeitem>
- <treeitem>
- <treerow>
- <treecell label="John"/>
- <treecell label="99 Westminster Avenue"/>
- </treerow>
- </treeitem>
- </treechildren>
-</tree>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/test_tree_view.xul b/toolkit/content/tests/chrome/test_tree_view.xul
deleted file mode 100644
index 235e3a5948..0000000000
--- a/toolkit/content/tests/chrome/test_tree_view.xul
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for tree using a custom nsITreeView
- -->
-<window title="Tree" onload="init()"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<script src="tree_shared.js"/>
-
-<script>
-<![CDATA[
-
-// This is our custom view, based on the treeview interface
-var view =
-{
- treeData: [["Mary", "206 Garden Avenue"],
- ["Chris", "19 Marion Street"],
- ["Sarah", "702 Fern Avenue"],
- ["John", "99 Westminster Avenue"]],
- value: "",
- rowCount: 8,
- getCellText: function(row, column) { return this.treeData[row % 4][column.index]; },
- getCellValue: function(row, column) { return this.value; },
- setCellText: function(row, column, val) { this.treeData[row % 4][column.index] = val; },
- setCellValue: function(row, column, val) { this.value = val; },
- setTree: function(tree) { this.tree = tree; },
- isContainer: function(row) { return false; },
- isContainerOpen: function(row) { return false; },
- isContainerEmpty: function(row) { return false; },
- isSeparator: function(row) { return false; },
- isSorted: function(row) { return false; },
- isSelectable: function(row, column) { return true; },
- isEditable: function(row, column) { return row != 2 || column.index != 1; },
- getProgressMode: function(row, column) { return Components.interfaces.nsITreeView.PROGRESS_NORMAL; },
- getParentIndex: function(row, column) { return -1; },
- getLevel: function(row) { return 0; },
- hasNextSibling: function(row, column) { return row != this.rowCount - 1; },
- getImageSrc: function(row, column) { return ""; },
- cycleHeader: function(column) { },
- getRowProperties: function(row) { return ""; },
- getCellProperties: function(row, column) { return ""; },
- getColumnProperties: function(column)
- {
- if (!column.index) {
- return "one two";
- }
-
- return "";
- }
-}
-
-function getCustomTreeViewCellInfo()
-{
- var obj = { rows: [] };
-
- for (var row = 0; row < view.rowCount; row++) {
- var cellInfo = [ ];
- for (var column = 0; column < 1; column++) {
- cellInfo.push({ label: "" + view.treeData[row % 4][column],
- value: "",
- properties: "",
- editable: row != 2 || column.index != 1,
- selectable: true,
- image: "",
- mode: Components.interfaces.nsITreeView.PROGRESS_NORMAL });
- }
-
- obj.rows.push({ cells: cellInfo,
- properties: "",
- container: false,
- separator: false,
- children: null,
- level: 0,
- parent: -1 });
- }
-
- return obj;
-}
-
-function init()
-{
- var tree = document.getElementById("tree-view");
- tree.view = view;
- tree.treeBoxObject.ensureRowIsVisible(0);
- is(tree.treeBoxObject.getFirstVisibleRow(), 0, "first visible after ensureRowIsVisible on load");
- tree.setAttribute("rows", "4");
-
- setTimeout(testtag_tree, 0, "tree-view", "treechildren-view", "multiple", "simple", "tree view");
-}
-
-]]>
-</script>
-
-<tree id="tree-view">
- <treecols>
- <treecol id="name" label="Name" sort="label" flex="1"/>
- <treecol id="address" label="Address" flex="1"/>
- </treecols>
- <treechildren id="treechildren-view"/>
-</tree>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-]]>
-</script>
-
-</window>
-
diff --git a/toolkit/content/tests/chrome/window_browser_drop.xul b/toolkit/content/tests/chrome/window_browser_drop.xul
deleted file mode 100644
index 2d9bcd2a1a..0000000000
--- a/toolkit/content/tests/chrome/window_browser_drop.xul
+++ /dev/null
@@ -1,242 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-
-<window title="Browser Drop Tests"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
-<script>
-<![CDATA[
-
-Components.utils.import("resource://testing-common/ContentTask.jsm");
-
-function dropOnRemoteBrowserAsync(browser, data, shouldExpectStateChange) {
- ContentTask.setTestScope(window); // Need this so is/isnot/ok are available inside the contenttask
- return ContentTask.spawn(browser, {data, shouldExpectStateChange}, function*({data, shouldExpectStateChange}) {
- let { interfaces: Ci, utils: Cu } = Components;
- Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
- if (!content.document.documentElement) {
- // Wait until the testing document gets loaded.
- yield new Promise(resolve => {
- let onload = function() {
- content.window.removeEventListener("load", onload);
- resolve();
- };
- content.window.addEventListener("load", onload);
- });
- }
-
- let dataTransfer = new content.DataTransfer();
- for (let i = 0; i < data.length; i++) {
- let types = data[i];
- for (let j = 0; j < types.length; j++) {
- dataTransfer.mozSetDataAt(types[j].type, types[j].data, i);
- }
- }
- let event = content.document.createEvent("DragEvent");
- event.initDragEvent("drop", true, true, content, 0, 0, 0, 0, 0,
- false, false, false, false, 0, null, dataTransfer);
- content.document.body.dispatchEvent(event);
-
- let links = [];
- try {
- links = Services.droppedLinkHandler.dropLinks(event, true);
- } catch (ex) {
- if (shouldExpectStateChange) {
- ok(false, "Should not have gotten an exception from the dropped link handler, but got: " + ex);
- Cu.reportError(ex);
- }
- }
-
- return links;
- });
-}
-
-function* expectLink(browser, expectedLinks, data, testid, onbody=false) {
- let lastLinks = [];
- let lastLinksPromise = new Promise(resolve => {
- browser.droppedLinkHandler = function(event, links) {
- info(`droppedLinkHandler called, received links ${JSON.stringify(links)}`);
- if (expectedLinks.length == 0) {
- ok(false, `droppedLinkHandler called for ${JSON.stringify(links)} which we didn't expect.`);
- }
- lastLinks = links;
- resolve(links);
- };
- });
-
- function dropOnBrowserSync() {
- let dropEl = onbody ? browser.contentDocument.body : browser;
- synthesizeDrop(dropEl, dropEl, data, "", dropEl.ownerDocument.defaultView);
- }
- let links;
- if (browser.isRemoteBrowser) {
- let remoteLinks = yield dropOnRemoteBrowserAsync(browser, data, expectedLinks.length != 0);
- is(remoteLinks.length, expectedLinks.length, testid + " remote links length");
- for (let i = 0, length = remoteLinks.length; i < length; i++) {
- is(remoteLinks[i].url, expectedLinks[i].url, testid + "[" + i + "] remote link");
- is(remoteLinks[i].name, expectedLinks[i].name, testid + "[" + i + "] remote name");
- }
-
- if (expectedLinks.length == 0) {
- // There is no way to check if nothing happens asynchronously.
- return;
- }
-
- links = yield lastLinksPromise;
- } else {
- dropOnBrowserSync();
- links = lastLinks;
- }
-
- is(links.length, expectedLinks.length, testid + " links length");
- for (let i = 0, length = links.length; i < length; i++) {
- is(links[i].url, expectedLinks[i].url, testid + "[" + i + "] link");
- is(links[i].name, expectedLinks[i].name, testid + "[" + i + "] name");
- }
-};
-
-function* dropLinksOnBrowser(browser, type) {
- // Dropping single text/plain item with single link should open single
- // page.
- yield* expectLink(browser,
- [ { url: "http://www.mozilla.org/",
- name: "http://www.mozilla.org/" } ],
- [ [ { type: "text/plain",
- data: "http://www.mozilla.org/" } ] ],
- "text/plain drop on browser " + type);
-
- // Dropping single text/plain item with multiple links should open
- // multiple pages.
- yield* expectLink(browser,
- [ { url: "http://www.mozilla.org/",
- name: "http://www.mozilla.org/" },
- { url: "http://www.example.com/",
- name: "http://www.example.com/" } ],
- [ [ { type: "text/plain",
- data: "http://www.mozilla.org/\nhttp://www.example.com/" } ] ],
- "text/plain with 2 URLs drop on browser " + type);
-
- // Dropping sinlge unsupported type item should not open anything.
- yield* expectLink(browser,
- [],
- [ [ { type: "text/link",
- data: "http://www.mozilla.org/" } ] ],
- "text/link drop on browser " + type);
-
- // Dropping single text/uri-list item with single link should open single
- // page.
- yield* expectLink(browser,
- [ { url: "http://www.example.com/",
- name: "http://www.example.com/" } ],
- [ [ { type: "text/uri-list",
- data: "http://www.example.com/" } ] ],
- "text/uri-list drop on browser " + type);
-
- // Dropping single text/uri-list item with multiple links should open
- // multiple pages.
- yield* expectLink(browser,
- [ { url: "http://www.example.com/",
- name: "http://www.example.com/" },
- { url: "http://www.mozilla.org/",
- name: "http://www.mozilla.org/" }],
- [ [ { type: "text/uri-list",
- data: "http://www.example.com/\nhttp://www.mozilla.org/" } ] ],
- "text/uri-list with 2 URLs drop on browser " + type);
-
- // Name in text/x-moz-url should be handled.
- yield* expectLink(browser,
- [ { url: "http://www.example.com/",
- name: "Example.com" } ],
- [ [ { type: "text/x-moz-url",
- data: "http://www.example.com/\nExample.com" } ] ],
- "text/x-moz-url drop on browser " + type);
-
- yield* expectLink(browser,
- [ { url: "http://www.mozilla.org/",
- name: "Mozilla.org" },
- { url: "http://www.example.com/",
- name: "Example.com" } ],
- [ [ { type: "text/x-moz-url",
- data: "http://www.mozilla.org/\nMozilla.org\nhttp://www.example.com/\nExample.com" } ] ],
- "text/x-moz-url with 2 URLs drop on browser " + type);
-
- // Dropping single item with multiple types should open single page.
- yield* expectLink(browser,
- [ { url: "http://www.example.org/",
- name: "Example.com" } ],
- [ [ { type: "text/plain",
- data: "http://www.mozilla.org/" },
- { type: "text/x-moz-url",
- data: "http://www.example.org/\nExample.com" } ] ],
- "text/plain and text/x-moz-url drop on browser " + type);
-
- // Dropping javascript or data: URLs should fail:
- yield* expectLink(browser,
- [],
- [ [ { type: "text/plain",
- data: "javascript:'bad'" } ] ],
- "text/plain javascript url drop on browser " + type);
- yield* expectLink(browser,
- [],
- [ [ { type: "text/plain",
- data: "jAvascript:'also bad'" } ] ],
- "text/plain mixed-case javascript url drop on browser " + type);
- yield* expectLink(browser,
- [],
- [ [ { type: "text/plain",
- data: "data:text/html,bad" } ] ],
- "text/plain data url drop on browser " + type);
-
- // Dropping a chrome url should fail as we don't have a source node set,
- // defaulting to a source of file:///
- yield* expectLink(browser,
- [],
- [ [ { type: "text/x-moz-url",
- data: "chrome://browser/content/browser.xul" } ] ],
- "text/x-moz-url chrome url drop on browser " + type);
-
- if (browser.type == "content") {
- yield ContentTask.spawn(browser, null, function() {
- content.window.stopMode = true;
- });
-
- // stopPropagation should not prevent the browser link handling from occuring
- yield* expectLink(browser,
- [ { url: "http://www.mozilla.org/",
- name: "http://www.mozilla.org/" } ],
- [ [ { type: "text/uri-list",
- data: "http://www.mozilla.org/" } ] ],
- "text/x-moz-url drop on browser with stopPropagation drop event", true);
-
- yield ContentTask.spawn(browser, null, function() {
- content.window.cancelMode = true;
- });
-
- // Canceling the event, however, should prevent the link from being handled.
- yield* expectLink(browser,
- [],
- [ [ { type: "text/uri-list", data: "http://www.mozilla.org/" } ] ],
- "text/x-moz-url drop on browser with cancelled drop event", true);
- }
-}
-
-function info(msg) { window.opener.wrappedJSObject.SimpleTest.info(msg); }
-function is(l, r, n) { window.opener.wrappedJSObject.SimpleTest.is(l,r,n); }
-function ok(v, n) { window.opener.wrappedJSObject.SimpleTest.ok(v,n); }
-
-]]>
-</script>
-
-<browser id="chromechild" src="about:blank"/>
-<browser id="contentchild" type="content" width="100" height="100"
- src="data:text/html,&lt;html draggable='true'&gt;&lt;body draggable='true' style='width: 100px; height: 100px;' ondragover='event.preventDefault()' ondrop='if (window.stopMode) event.stopPropagation(); if (window.cancelMode) event.preventDefault();'&gt;&lt;/body&gt;&lt;/html&gt;"/>
-
-<browser id="remote-contentchild" type="content" width="100" height="100" remote="true"
- src="data:text/html,&lt;html draggable='true'&gt;&lt;body draggable='true' style='width: 100px; height: 100px;' ondragover='event.preventDefault()' ondrop='if (window.stopMode) event.stopPropagation(); if (window.cancelMode) event.preventDefault();'&gt;&lt;/body&gt;&lt;/html&gt;"/>
-</window>
diff --git a/toolkit/content/tests/chrome/window_chromemargin.xul b/toolkit/content/tests/chrome/window_chromemargin.xul
deleted file mode 100644
index 3dec6d1379..0000000000
--- a/toolkit/content/tests/chrome/window_chromemargin.xul
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0"?>
-<!-- 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/. -->
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-
-<window id="window" title="Subframe Origin Tests"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-chrome margins rock!
-<script>
-
-// Tests parsing of the chrome margin attrib on a window.
-
-function ok(condition, message) {
- window.opener.wrappedJSObject.SimpleTest.ok(condition, message);
-}
-
-function doSingleTest(param, shouldSucceed)
-{
- var exception = null;
- try {
- document.documentElement.removeAttribute("chromemargin");
- document.documentElement.setAttribute("chromemargin", param);
- ok(document.
- documentElement.
- getAttribute("chromemargin") == param, "couldn't set/get chromemargin?");
- } catch (ex) {
- exception = ex;
- }
- if (shouldSucceed)
- ok(!exception, "failed for param:'" + param + "'");
- else
- ok(exception, "did not fail for invalid param:'" + param + "'");
- return true;
-}
-
-function runTests()
-{
- var doc = document.documentElement;
-
- // make sure we can set and get
- doc.setAttribute("chromemargin", "0,0,0,0");
- ok(doc.getAttribute("chromemargin") == "0,0,0,0", "couldn't set/get chromemargin?");
- doc.setAttribute("chromemargin", "-1,-1,-1,-1");
- ok(doc.getAttribute("chromemargin") == "-1,-1,-1,-1", "couldn't set/get chromemargin?");
-
- // test remove
- doc.removeAttribute("chromemargin");
- ok(doc.getAttribute("chromemargin") == "", "couldn't remove chromemargin?");
-
- // we already test these really well in a c++ test in widget
- doSingleTest("1,2,3,4", true);
- doSingleTest("-2,-2,-2,-2", true);
- doSingleTest("1,1,1,1", true);
- doSingleTest("", false);
- doSingleTest("12123123", false);
- doSingleTest("0,-1,-1,-1", true);
- doSingleTest("-1,0,-1,-1", true);
- doSingleTest("-1,-1,0,-1", true);
- doSingleTest("-1,-1,-1,0", true);
- doSingleTest("1234567890,1234567890,1234567890,1234567890", true);
- doSingleTest("-1,-1,-1,-1", true);
-
- window.opener.wrappedJSObject.SimpleTest.finish();
- window.close();
-}
-
-window.opener.wrappedJSObject.SimpleTest.waitForFocus(runTests, window);
-
-</script>
-</window>
diff --git a/toolkit/content/tests/chrome/window_cursorsnap_dialog.xul b/toolkit/content/tests/chrome/window_cursorsnap_dialog.xul
deleted file mode 100644
index df6f0bf026..0000000000
--- a/toolkit/content/tests/chrome/window_cursorsnap_dialog.xul
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<dialog title="Cursor snapping test" id="dialog"
- width="600" height="600"
- onload="onload();"
- onunload="onunload();"
- buttons="accept,cancel"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-function ok(aCondition, aMessage)
-{
- window.opener.wrappedJSObject.SimpleTest.ok(aCondition, aMessage);
-}
-
-function is(aLeft, aRight, aMessage)
-{
- window.opener.wrappedJSObject.SimpleTest.is(aLeft, aRight, aMessage);
-}
-
-function isnot(aLeft, aRight, aMessage)
-{
- window.opener.wrappedJSObject.SimpleTest.isnot(aLeft, aRight, aMessage);
-}
-
-function canRetryTest()
-{
- return window.opener.wrappedJSObject.canRetryTest();
-}
-
-function getTimeoutTime()
-{
- return window.opener.wrappedJSObject.getTimeoutTime();
-}
-
-var gTimer;
-var gRetry;
-
-function finishByTimeout()
-{
- var button = document.getElementById("dialog").getButton("accept");
- if (button.disabled)
- ok(true, "cursor is NOT snapped to the disabled button (dialog)");
- else if (button.hidden)
- ok(true, "cursor is NOT snapped to the hidden button (dialog)");
- else {
- if (!canRetryTest()) {
- ok(false, "cursor is NOT snapped to the default button (dialog)");
- } else {
- // otherwise, this may be unexpected timeout, we should retry the test.
- gRetry = true;
- }
- }
- finish();
-}
-
-function finish()
-{
- window.close();
-}
-
-function onMouseMove(aEvent)
-{
- var button = document.getElementById("dialog").getButton("accept");
- if (button.disabled)
- ok(false, "cursor IS snapped to the disabled button (dialog)");
- else if (button.hidden)
- ok(false, "cursor IS snapped to the hidden button (dialog)");
- else
- ok(true, "cursor IS snapped to the default button (dialog)");
- clearTimeout(gTimer);
- finish();
-}
-
-function onload()
-{
- var button = document.getElementById("dialog").getButton("accept");
- button.addEventListener("mousemove", onMouseMove, false);
-
- if (window.opener.wrappedJSObject.gDisable) {
- button.disabled = true;
- }
- if (window.opener.wrappedJSObject.gHidden) {
- button.hidden = true;
- }
- gRetry = false;
- gTimer = setTimeout(finishByTimeout, getTimeoutTime());
-}
-
-function onunload()
-{
- if (gRetry) {
- window.opener.wrappedJSObject.retryCurrentTest();
- } else {
- window.opener.wrappedJSObject.runNextTest();
- }
-}
-
-]]>
-</script>
-
-</dialog>
diff --git a/toolkit/content/tests/chrome/window_cursorsnap_wizard.xul b/toolkit/content/tests/chrome/window_cursorsnap_wizard.xul
deleted file mode 100644
index a226d02b74..0000000000
--- a/toolkit/content/tests/chrome/window_cursorsnap_wizard.xul
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<wizard title="Cursor snapping test" id="wizard"
- width="600" height="600"
- onload="onload();"
- onunload="onunload();"
- buttons="accept,cancel"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <wizardpage>
- <label value="first page"/>
- </wizardpage>
-
- <wizardpage>
- <label value="second page"/>
- </wizardpage>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-function ok(aCondition, aMessage)
-{
- window.opener.wrappedJSObject.SimpleTest.ok(aCondition, aMessage);
-}
-
-function is(aLeft, aRight, aMessage)
-{
- window.opener.wrappedJSObject.SimpleTest.is(aLeft, aRight, aMessage);
-}
-
-function isnot(aLeft, aRight, aMessage)
-{
- window.opener.wrappedJSObject.SimpleTest.isnot(aLeft, aRight, aMessage);
-}
-
-function canRetryTest()
-{
- return window.opener.wrappedJSObject.canRetryTest();
-}
-
-function getTimeoutTime()
-{
- return window.opener.wrappedJSObject.getTimeoutTime();
-}
-
-var gTimer;
-var gRetry = false;
-
-function finishByTimeout()
-{
- var button = document.getElementById("wizard").getButton("next");
- if (button.disabled)
- ok(true, "cursor is NOT snapped to the disabled button (wizard)");
- else if (button.hidden)
- ok(true, "cursor is NOT snapped to the hidden button (wizard)");
- else {
- if (!canRetryTest()) {
- ok(false, "cursor is NOT snapped to the default button (wizard)");
- } else {
- // otherwise, this may be unexpected timeout, we should retry the test.
- gRetry = true;
- }
- }
- finish();
-}
-
-function finish()
-{
- window.close();
-}
-
-function onMouseMove()
-{
- var button = document.getElementById("wizard").getButton("next");
- if (button.disabled)
- ok(false, "cursor IS snapped to the disabled button (wizard)");
- else if (button.hidden)
- ok(false, "cursor IS snapped to the hidden button (wizard)");
- else
- ok(true, "cursor IS snapped to the default button (wizard)");
- clearTimeout(gTimer);
- finish();
-}
-
-function onload()
-{
- var button = document.getElementById("wizard").getButton("next");
- button.addEventListener("mousemove", onMouseMove, false);
-
- if (window.opener.wrappedJSObject.gDisable) {
- button.disabled = true;
- }
- if (window.opener.wrappedJSObject.gHidden) {
- button.hidden = true;
- }
- gTimer = setTimeout(finishByTimeout, getTimeoutTime());
-}
-
-function onunload()
-{
- if (gRetry) {
- window.opener.wrappedJSObject.retryCurrentTest();
- } else {
- window.opener.wrappedJSObject.runNextTest();
- }
-}
-
-]]>
-</script>
-
-</wizard>
diff --git a/toolkit/content/tests/chrome/window_keys.xul b/toolkit/content/tests/chrome/window_keys.xul
deleted file mode 100644
index 79de9ac45e..0000000000
--- a/toolkit/content/tests/chrome/window_keys.xul
+++ /dev/null
@@ -1,202 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Key Tests"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
-<script>
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-var gExpected = null;
-
-const kIsWin = navigator.platform.indexOf("Win") >= 0;
-
-// Only on Windows, osKey state is ignored when there is no shortcut key handler
-// which exactly matches with osKey state.
-var keysToTest = [
- ["k-v", "V", { } ],
- ["", "V", { shiftKey: true } ],
- ["k-v-scy", "V", { ctrlKey: true } ],
- ["", "V", { altKey: true } ],
- ["", "V", { metaKey: true } ],
- [kIsWin ? "k-v" : "", "V", { osKey: true } ],
- ["k-v-scy", "V", { shiftKey: true, ctrlKey: true } ],
- ["", "V", { shiftKey: true, ctrlKey: true, altKey: true } ],
- ["k-e-y", "E", { } ],
- ["", "E", { shiftKey: true } ],
- ["", "E", { ctrlKey: true } ],
- ["", "E", { altKey: true } ],
- ["", "E", { metaKey: true } ],
- [kIsWin ? "k-e-y" : "", "E", { osKey: true } ],
- ["k-d-a", "D", { altKey: true } ],
- ["k-8-m", "8", { metaKey: true } ],
- [kIsWin ? "k-8-m" : "", "8", { metaKey: true, osKey: true } ],
- ["k-a-o", "A", { osKey: true } ],
- ["", "A", { osKey: true, metaKey: true } ],
- ["", "B", {} ],
- ["k-b-myo", "B", { osKey: true } ],
- ["k-b-myo", "B", { osKey: true, metaKey: true } ],
- ["k-f-oym", "F", { metaKey: true } ],
- ["k-f-oym", "F", { metaKey: true, osKey: true } ],
- ["k-c-scaym", "C", { metaKey: true } ],
- ["k-c-scaym", "C", { shiftKey: true, ctrlKey: true, altKey: true, metaKey: true } ],
- [kIsWin ? "k-c-scaym" : "", "C", { shiftKey: true, ctrlKey: true, altKey: true, metaKey: true, osKey: true } ],
- ["", "V", { shiftKey: true, ctrlKey: true, altKey: true } ],
- ["k-h-l", "H", { accelKey: true } ],
-// ["k-j-s", "J", { accessKey: true } ],
- ["", "T", { } ],
- ["k-g-c", "G", { ctrlKey: true } ],
- ["k-g-co", "G", { ctrlKey: true, osKey: true } ],
- ["scommand", "Y", { } ],
- ["", "U", { } ],
-];
-
-function runTest()
-{
- iterateKeys(true, "normal");
-
- var keyset = document.getElementById("keyset");
- keyset.setAttribute("disabled", "true");
- iterateKeys(false, "disabled");
-
- var keyset = document.getElementById("keyset");
- keyset.removeAttribute("disabled");
- iterateKeys(true, "reenabled");
-
- keyset.parentNode.removeChild(keyset);
- iterateKeys(false, "removed");
-
- document.documentElement.appendChild(keyset);
- iterateKeys(true, "appended");
-
- var accelText = menuitem => menuitem.getAttribute("acceltext").toLowerCase();
-
- $("menubutton").open = true;
-
- // now check if a menu updates its accelerator text when a key attribute is changed
- var menuitem1 = $("menuitem1");
- ok(accelText(menuitem1).indexOf("d") >= 0, "menuitem1 accelText before");
- if (kIsWin) {
- ok(accelText(menuitem1).indexOf("alt") >= 0, "menuitem1 accelText modifier before");
- }
-
- menuitem1.setAttribute("key", "k-s-c");
- ok(accelText(menuitem1).indexOf("s") >= 0, "menuitem1 accelText after");
- if (kIsWin) {
- ok(accelText(menuitem1).indexOf("ctrl") >= 0, "menuitem1 accelText modifier after");
- }
-
- menuitem1.setAttribute("acceltext", "custom");
- is(accelText(menuitem1), "custom", "menuitem1 accelText set custom");
- menuitem1.removeAttribute("acceltext");
- ok(accelText(menuitem1).indexOf("s") >= 0, "menuitem1 accelText remove");
- if (kIsWin) {
- ok(accelText(menuitem1).indexOf("ctrl") >= 0, "menuitem1 accelText modifier remove");
- }
-
- var menuitem2 = $("menuitem2");
- is(accelText(menuitem2), "", "menuitem2 accelText before");
- menuitem2.setAttribute("key", "k-s-c");
- ok(accelText(menuitem2).indexOf("s") >= 0, "menuitem2 accelText before");
- if (kIsWin) {
- ok(accelText(menuitem2).indexOf("ctrl") >= 0, "menuitem2 accelText modifier before");
- }
-
- menuitem2.setAttribute("key", "k-h-l");
- ok(accelText(menuitem2).indexOf("h") >= 0, "menuitem2 accelText after");
- if (kIsWin) {
- ok(accelText(menuitem2).indexOf("ctrl") >= 0, "menuitem2 accelText modifier after");
- }
-
- menuitem2.removeAttribute("key");
- is(accelText(menuitem2), "", "menuitem2 accelText after remove");
-
- $("menubutton").open = false;
-
- window.close();
- window.opener.wrappedJSObject.SimpleTest.finish();
-}
-
-function iterateKeys(enabled, testid)
-{
- for (var k = 0; k < keysToTest.length; k++) {
- gExpected = keysToTest[k];
- var expectedKey = gExpected[0];
- if (!gExpected[2].accessKey || navigator.platform.indexOf("Mac") == -1) {
- synthesizeKey(gExpected[1], gExpected[2]);
- ok((enabled && expectedKey) || expectedKey == "k-d-a" ?
- !gExpected : gExpected, testid + " key step " + (k + 1));
- }
- }
-}
-
-function checkKey(event)
-{
- // the first element of the gExpected array holds the id of the <key> element
- // that was expected. If this is empty, a handler wasn't expected to be called
- if (gExpected[0])
- is(event.originalTarget.id, gExpected[0], "key " + gExpected[1]);
- else
- is("key " + event.originalTarget.id + " was activated", "", "key " + gExpected[1]);
- gExpected = null;
-}
-
-function is(l, r, n) { window.opener.wrappedJSObject.SimpleTest.is(l,r,n); }
-function ok(v, n) { window.opener.wrappedJSObject.SimpleTest.ok(v,n); }
-
-SimpleTest.waitForFocus(runTest);
-
-]]>
-</script>
-
-<command id="scommand" oncommand="checkKey(event)"/>
-<command id="scommand-disabled" disabled="true"/>
-
-<keyset id="keyset">
- <key id="k-v" key="v" oncommand="checkKey(event)"/>
- <key id="k-v-scy" key="v" modifiers="shift any control" oncommand="checkKey(event)"/>
- <key id="k-e-y" key="e" modifiers="any" oncommand="checkKey(event)"/>
- <key id="k-8-m" key="8" modifiers="meta" oncommand="checkKey(event)"/>
- <key id="k-a-o" key="a" modifiers="os" oncommand="checkKey(event)"/>
- <key id="k-b-myo" key="b" modifiers="meta any os" oncommand="checkKey(event)"/>
- <key id="k-f-oym" key="f" modifiers="os any meta" oncommand="checkKey(event)"/>
- <key id="k-c-scaym" key="c" modifiers="shift control alt any meta" oncommand="checkKey(event)"/>
- <key id="k-h-l" key="h" modifiers="accel" oncommand="checkKey(event)"/>
- <key id="k-j-s" key="j" modifiers="access" oncommand="checkKey(event)"/>
- <key id="k-t-y" disabled="true" key="t" oncommand="checkKey(event)"/>
- <key id="k-g-c" key="g" modifiers="control" oncommand="checkKey(event)"/>
- <key id="k-g-co" key="g" modifiers="control os" oncommand="checkKey(event)"/>
- <key id="k-y" key="y" command="scommand"/>
- <key id="k-u" key="u" command="scommand-disabled"/>
-</keyset>
-
-<keyset id="keyset2">
- <key id="k-d-a" key="d" modifiers="alt" oncommand="checkKey(event)"/>
- <key id="k-s-c" key="s" modifiers="control" oncommand="checkKey(event)"/>
-</keyset>
-
-<button id="menubutton" label="Menu" type="menu">
- <menupopup>
- <menuitem id="menuitem1" label="Item 1" key="k-d-a"/>
- <menuitem id="menuitem2" label="Item 2"/>
- </menupopup>
-</button>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/window_largemenu.xul b/toolkit/content/tests/chrome/window_largemenu.xul
deleted file mode 100644
index 72e1c077d8..0000000000
--- a/toolkit/content/tests/chrome/window_largemenu.xul
+++ /dev/null
@@ -1,425 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-
-<window title="Large Menu Tests"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
-<!--
- This test checks that a large menu is displayed with arrow buttons
- and is on the screen.
- -->
-
-<script>
-<![CDATA[
-
-var gOverflowed = false, gUnderflowed = false;
-var gContextMenuTests = false;
-var gScreenY = -1;
-var gTestIndex = 0;
-var gTests = ["open normal", "open when bottom would overlap", "open with scrolling",
- "open after scrolling", "open small again",
- "menu movement", "panel movement",
- "context menu enough space below",
- "context menu more space above",
- "context menu too big either side",
- "context menu larger than screen",
- "context menu flips horizontally on osx"];
-function getScreenXY(element)
-{
- var screenX, screenY;
- var mouseFn = function(event) {
- screenX = event.screenX - 1;
- screenY = event.screenY - 1;
- }
-
- // a hacky way to get the screen position of an element without using the box object
- window.addEventListener("mousedown", mouseFn, false);
- synthesizeMouse(element, 1, 1, { });
- window.removeEventListener("mousedown", mouseFn, false);
-
- return [screenX, screenY];
-}
-
-function hidePopup() {
- window.requestAnimationFrame(
- function() {
- setTimeout(
- function() {
- document.getElementById("popup").hidePopup();
- }, 0);
- });
-}
-
-function runTests()
-{
- [, gScreenY] = getScreenXY(document.documentElement);
- nextTest();
-}
-
-function nextTest()
-{
- gOverflowed = false, gUnderflowed = false;
-
- var y = screen.height;
- if (gTestIndex == 1) // open with bottom overlap test:
- y -= 100;
- else
- y /= 2;
-
- var popup = document.getElementById("popup");
- if (gTestIndex == 2) {
- // add some more menuitems so that scrolling will be necessary
- var moreItemCount = Math.round(screen.height / popup.firstChild.getBoundingClientRect().height);
- for (var t = 1; t <= moreItemCount; t++) {
- var menu = document.createElement("menuitem");
- menu.setAttribute("label", "More" + t);
- popup.appendChild(menu);
- }
- }
- else if (gTestIndex == 4) {
- // remove the items added in test 2 above
- while (popup.childNodes.length > 15)
- popup.removeChild(popup.lastChild);
- }
-
- window.requestAnimationFrame(function() {
- setTimeout(
- function() {
- popup.openPopupAtScreen(100, y, false);
- }, 0);
- });
-}
-
-function popupShown()
-{
- if (gTests[gTestIndex] == "menu movement")
- return testPopupMovement();
-
- if (gContextMenuTests)
- return contextMenuPopupShown();
-
- var popup = document.getElementById("popup");
- var rect = popup.getBoundingClientRect();
- var sbo = document.getAnonymousNodes(popup)[0].scrollBoxObject;
- var expectedScrollPos = 0;
-
- if (gTestIndex == 0) {
- // the popup should be in the center of the screen
- // note that if the height is odd, the y-offset will have been rounded
- // down when we pass the fractional value to openPopupAtScreen above.
- is(Math.round(rect.top) + gScreenY, Math.floor(screen.height / 2),
- gTests[gTestIndex] + " top");
- ok(Math.round(rect.bottom) + gScreenY < screen.height,
- gTests[gTestIndex] + " bottom");
- ok(!gOverflowed && !gUnderflowed, gTests[gTestIndex] + " overflow")
- }
- else if (gTestIndex == 1) {
- // the popup was supposed to open 100 pixels from the bottom, but that
- // would put it off screen so ...
- if (platformIsMac()) {
- // On OSX the popup is constrained so it remains within the
- // bounds of the screen
- ok(Math.round(rect.top) + gScreenY >= screen.top, gTests[gTestIndex] + " top");
- is(Math.round(rect.bottom) + gScreenY, screen.availTop + screen.availHeight, gTests[gTestIndex] + " bottom");
- ok(!gOverflowed && !gUnderflowed, gTests[gTestIndex] + " overflow");
- }
- else {
- // On other platforms the menu should be flipped to have its bottom
- // edge 100 pixels from the bottom
- ok(Math.round(rect.top) + gScreenY >= screen.top, gTests[gTestIndex] + " top");
- is(Math.round(rect.bottom) + gScreenY, screen.height - 100,
- gTests[gTestIndex] + " bottom");
- ok(!gOverflowed && !gUnderflowed, gTests[gTestIndex] + " overflow");
- }
- }
- else if (gTestIndex == 2) {
- // the popup is too large so ensure that it is on screen
- ok(Math.round(rect.top) + gScreenY >= screen.top, gTests[gTestIndex] + " top");
- ok(Math.round(rect.bottom) + gScreenY <= screen.height, gTests[gTestIndex] + " bottom");
- ok(gOverflowed && !gUnderflowed, gTests[gTestIndex] + " overflow")
-
- sbo.scrollTo(0, 40);
- expectedScrollPos = 40;
- }
- else if (gTestIndex == 3) {
- expectedScrollPos = 40;
- }
- else if (gTestIndex == 4) {
- // note that if the height is odd, the y-offset will have been rounded
- // down when we pass the fractional value to openPopupAtScreen above.
- is(Math.round(rect.top) + gScreenY, Math.floor(screen.height / 2),
- gTests[gTestIndex] + " top");
- ok(Math.round(rect.bottom) + gScreenY < screen.height,
- gTests[gTestIndex] + " bottom");
- ok(!gOverflowed && gUnderflowed, gTests[gTestIndex] + " overflow");
- }
-
- is(sbo.positionY, expectedScrollPos, "menu scroll position");
-
- hidePopup();
-}
-
-function is(l, r, n) { window.opener.wrappedJSObject.SimpleTest.is(l,r,n); }
-function ok(v, n) { window.opener.wrappedJSObject.SimpleTest.ok(v,n); }
-
-var oldx, oldy, waitSteps = 0;
-function moveWindowTo(x, y, callback, arg)
-{
- if (!waitSteps) {
- oldx = window.screenX;
- oldy = window.screenY;
- window.moveTo(x, y);
-
- waitSteps++;
- setTimeout(moveWindowTo, 100, x, y, callback, arg);
- return;
- }
-
- if (window.screenX == oldx && window.screenY == oldy) {
- if (waitSteps++ > 10) {
- ok(false, "Window never moved properly to " + x + "," + y);
- window.opener.wrappedJSObject.SimpleTest.finish();
- window.close();
- }
-
- setTimeout(moveWindowTo, 100, x, y, callback, arg);
- }
- else {
- waitSteps = 0;
- callback(arg);
- }
-}
-
-function popupHidden()
-{
- gTestIndex++;
- if (gTestIndex == gTests.length) {
- window.opener.wrappedJSObject.SimpleTest.finish();
- window.close();
- }
- else if (gTests[gTestIndex] == "context menu enough space below") {
- gContextMenuTests = true;
- moveWindowTo(window.screenX, screen.availTop + 10,
- () => synthesizeMouse(document.getElementById("label"), 4, 4, { type: "contextmenu", button: 2 }));
- }
- else if (gTests[gTestIndex] == "menu movement") {
- document.getElementById("popup").openPopup(
- document.getElementById("label"), "after_start", 0, 0, false, false);
- }
- else if (gTests[gTestIndex] == "panel movement") {
- document.getElementById("panel").openPopup(
- document.getElementById("label"), "after_start", 0, 0, false, false);
- }
- else if (gContextMenuTests) {
- contextMenuPopupHidden();
- }
- else {
- nextTest();
- }
-}
-
-function contextMenuPopupShown()
-{
- var popup = document.getElementById("popup");
- var rect = popup.getBoundingClientRect();
- var labelrect = document.getElementById("label").getBoundingClientRect();
-
- // Click to open popup in popupHidden() occurs at (4,4) in label's coordinate space
- var clickX = clickY = 4;
-
- var testPopupAppearedRightOfCursor = true;
- switch (gTests[gTestIndex]) {
- case "context menu enough space below":
- is(rect.top, labelrect.top + clickY + (platformIsMac() ? -6 : 2), gTests[gTestIndex] + " top");
- break;
- case "context menu more space above":
- if (platformIsMac()) {
- let screenY;
- [, screenY] = getScreenXY(popup);
- // Macs constrain their popup menus vertically rather than flip them.
- is(screenY, screen.availTop + screen.availHeight - rect.height, gTests[gTestIndex] + " top");
- } else {
- is(rect.top, labelrect.top + clickY - rect.height - 2, gTests[gTestIndex] + " top");
- }
-
- break;
- case "context menu too big either side":
- [, gScreenY] = getScreenXY(document.documentElement);
- // compare against the available size as well as the total size, as some
- // platforms allow the menu to overlap os chrome and others do not
- var pos = (screen.availTop + screen.availHeight - rect.height) - gScreenY;
- var availPos = (screen.top + screen.height - rect.height) - gScreenY;
- ok(rect.top == pos || rect.top == availPos,
- gTests[gTestIndex] + " top");
- break;
- case "context menu larger than screen":
- ok(rect.top == -(gScreenY - screen.availTop) || rect.top == -(gScreenY - screen.top), gTests[gTestIndex] + " top");
- break;
- case "context menu flips horizontally on osx":
- testPopupAppearedRightOfCursor = false;
- if (platformIsMac()) {
- is(Math.round(rect.right), labelrect.left + clickX - 1, gTests[gTestIndex] + " right");
- }
- break;
- }
-
- if (testPopupAppearedRightOfCursor) {
- is(rect.left, labelrect.left + clickX + (platformIsMac() ? 1 : 2), gTests[gTestIndex] + " left");
- }
-
- hidePopup();
-}
-
-function contextMenuPopupHidden()
-{
- var screenAvailBottom = screen.availTop + screen.availHeight;
-
- if (gTests[gTestIndex] == "context menu more space above") {
- moveWindowTo(window.screenX, screenAvailBottom - 80, nextContextMenuTest, -1);
- }
- else if (gTests[gTestIndex] == "context menu too big either side") {
- moveWindowTo(window.screenX, screenAvailBottom / 2 - 80, nextContextMenuTest, screenAvailBottom / 2 + 120);
- }
- else if (gTests[gTestIndex] == "context menu larger than screen") {
- nextContextMenuTest(screen.availHeight + 80);
- }
- else if (gTests[gTestIndex] == "context menu flips horizontally on osx") {
- var popup = document.getElementById("popup");
- var popupWidth = popup.getBoundingClientRect().width;
- moveWindowTo(screen.availLeft + screen.availWidth - popupWidth, 100, nextContextMenuTest, -1);
- }
-}
-
-function nextContextMenuTest(desiredHeight)
-{
- if (desiredHeight >= 0) {
- var popup = document.getElementById("popup");
- var height = popup.getBoundingClientRect().height;
- var itemheight = document.getElementById("firstitem").getBoundingClientRect().height;
- while (height < desiredHeight) {
- var menu = document.createElement("menuitem");
- menu.setAttribute("label", "Item");
- popup.appendChild(menu);
- height += itemheight;
- }
- }
-
- synthesizeMouse(document.getElementById("label"), 4, 4, { type: "contextmenu", button: 2 });
-}
-
-function testPopupMovement()
-{
- var button = document.getElementById("label");
- var isPanelTest = (gTests[gTestIndex] == "panel movement");
- var popup = document.getElementById(isPanelTest ? "panel" : "popup");
-
- var screenX, screenY, buttonScreenX, buttonScreenY;
- var rect = popup.getBoundingClientRect();
-
- var overlapOSChrome = !platformIsMac();
- popup.moveTo(1, 1);
- [screenX, screenY] = getScreenXY(popup);
-
- var expectedx = 1, expectedy = 1;
- if (!isPanelTest && !overlapOSChrome) {
- if (screen.availLeft >= 1) expectedx = screen.availLeft;
- if (screen.availTop >= 1) expectedy = screen.availTop;
- }
- is(screenX, expectedx, gTests[gTestIndex] + " (1, 1) x");
- is(screenY, expectedy, gTests[gTestIndex] + " (1, 1) y");
-
- popup.moveTo(100, 8000);
- if (isPanelTest) {
- expectedy = 8000;
- }
- else {
- expectedy = (overlapOSChrome ? screen.height + screen.top : screen.availHeight + screen.availTop) -
- Math.round(rect.height);
- }
-
- [screenX, screenY] = getScreenXY(popup);
- is(screenX, 100, gTests[gTestIndex] + " (100, 8000) x");
- is(screenY, expectedy, gTests[gTestIndex] + " (100, 8000) y");
-
- popup.moveTo(6000, 100);
-
- if (isPanelTest) {
- expectedx = 6000;
- }
- else {
- expectedx = (overlapOSChrome ? screen.width + screen.left : screen.availWidth + screen.availLeft) -
- Math.round(rect.width);
- }
-
- [screenX, screenY] = getScreenXY(popup);
- is(screenX, expectedx, gTests[gTestIndex] + " (6000, 100) x");
- is(screenY, 100, gTests[gTestIndex] + " (6000, 100) y");
-
- is(popup.left, "", gTests[gTestIndex] + " left is empty after moving");
- is(popup.top, "", gTests[gTestIndex] + " top is empty after moving");
- popup.setAttribute("left", "80");
- popup.setAttribute("top", "82");
- [screenX, screenY] = getScreenXY(popup);
- is(screenX, 80, gTests[gTestIndex] + " set left and top x");
- is(screenY, 82, gTests[gTestIndex] + " set left and top y");
- popup.moveTo(95, 98);
- [screenX, screenY] = getScreenXY(popup);
- is(screenX, 95, gTests[gTestIndex] + " move after set left and top x");
- is(screenY, 98, gTests[gTestIndex] + " move after set left and top y");
- is(popup.left, "95", gTests[gTestIndex] + " left is set after moving");
- is(popup.top, "98", gTests[gTestIndex] + " top is set after moving");
- popup.removeAttribute("left");
- popup.removeAttribute("top");
-
- popup.moveTo(-1, -1);
- [screenX, screenY] = getScreenXY(popup);
-
- expectedx = (overlapOSChrome ? screen.left : screen.availLeft);
- expectedy = (overlapOSChrome ? screen.top : screen.availTop);
-
- is(screenX, expectedx, gTests[gTestIndex] + " move after set left and top x to -1");
- is(screenY, expectedy, gTests[gTestIndex] + " move after set left and top y to -1");
- is(popup.left, "", gTests[gTestIndex] + " left is not set after moving to -1");
- is(popup.top, "", gTests[gTestIndex] + " top is not set after moving to -1");
-
- popup.hidePopup();
-}
-
-function platformIsMac()
-{
- return navigator.platform.indexOf("Mac") > -1;
-}
-
-window.opener.wrappedJSObject.SimpleTest.waitForFocus(runTests, window);
-
-]]>
-</script>
-
-<button id="label" label="OK" context="popup"/>
-<menupopup id="popup" onpopupshown="popupShown();" onpopuphidden="popupHidden();"
- onoverflow="gOverflowed = true" onunderflow="gUnderflowed = true;">
- <menuitem id="firstitem" label="1"/>
- <menuitem label="2"/>
- <menuitem label="3"/>
- <menuitem label="4"/>
- <menuitem label="5"/>
- <menuitem label="6"/>
- <menuitem label="7"/>
- <menuitem label="8"/>
- <menuitem label="9"/>
- <menuitem label="10"/>
- <menuitem label="11"/>
- <menuitem label="12"/>
- <menuitem label="13"/>
- <menuitem label="14"/>
- <menuitem label="15"/>
-</menupopup>
-
-<panel id="panel" onpopupshown="testPopupMovement();" onpopuphidden="popupHidden();" style="margin: 0">
- <button label="OK"/>
-</panel>
-
-</window>
diff --git a/toolkit/content/tests/chrome/window_panel.xul b/toolkit/content/tests/chrome/window_panel.xul
deleted file mode 100644
index b99b52dfaf..0000000000
--- a/toolkit/content/tests/chrome/window_panel.xul
+++ /dev/null
@@ -1,312 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<!--
- XUL Widget Test for panels
- -->
-<window title="Titlebar" width="200" height="200"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
-<tree id="tree" seltype="single" width="100" height="100">
- <treecols>
- <treecol flex="1"/>
- <treecol flex="1"/>
- </treecols>
- <treechildren id="treechildren">
- <treeitem><treerow><treecell label="One"/><treecell label="Two"/></treerow></treeitem>
- <treeitem><treerow><treecell label="One"/><treecell label="Two"/></treerow></treeitem>
- <treeitem><treerow><treecell label="One"/><treecell label="Two"/></treerow></treeitem>
- <treeitem><treerow><treecell label="One"/><treecell label="Two"/></treerow></treeitem>
- <treeitem><treerow><treecell label="One"/><treecell label="Two"/></treerow></treeitem>
- <treeitem><treerow><treecell label="One"/><treecell label="Two"/></treerow></treeitem>
- </treechildren>
-</tree>
-
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-var currentTest = null;
-
-function ok(condition, message) {
- window.opener.wrappedJSObject.SimpleTest.ok(condition, message);
-}
-
-function is(left, right, message) {
- window.opener.wrappedJSObject.SimpleTest.is(left, right, message);
-}
-
-function test_panels()
-{
- checkTreeCoords();
-
- addEventListener("popupshowing", popupShowing, false);
- addEventListener("popupshown", popupShown, false);
- addEventListener("popuphidden", nextTest, false);
- nextTest();
-}
-
-function nextTest()
-{
- if (!tests.length) {
- window.close();
- window.opener.wrappedJSObject.SimpleTest.finish();
- return;
- }
-
- currentTest = tests.shift();
- var panel = createPanel(currentTest.attrs);
- currentTest.test(panel);
-}
-
-function popupShowing(event)
-{
- var rect = event.target.getOuterScreenRect();
- ok(!rect.left && !rect.top && !rect.width && !rect.height,
- currentTest.testname + " empty rectangle during popupshowing");
-}
-
-var waitSteps = 0;
-function popupShown(event)
-{
- var panel = event.target;
-
- if (waitSteps > 0 && navigator.platform.indexOf("Linux") >= 0 &&
- panel.boxObject.screenY == 210) {
- waitSteps--;
- setTimeout(popupShown, 10, event);
- return;
- }
-
- currentTest.result(currentTest.testname + " ", panel);
- panel.hidePopup();
-}
-
-function createPanel(attrs)
-{
- var panel = document.createElement("panel");
- for (var a in attrs) {
- panel.setAttribute(a, attrs[a]);
- }
-
- var button = document.createElement("button");
- panel.appendChild(button);
- button.label = "OK";
- button.width = 120;
- button.height = 40;
- button.setAttribute("style", "-moz-appearance: none; border: 0; margin: 0;");
- panel.setAttribute("style", "-moz-appearance: none; border: 0; margin: 0;");
- return document.documentElement.appendChild(panel);
-}
-
-function checkTreeCoords()
-{
- var tree = $("tree");
- var treechildren = $("treechildren");
- tree.currentIndex = 0;
- tree.treeBoxObject.scrollToRow(0);
- synthesizeMouse(treechildren, 10, tree.treeBoxObject.rowHeight + 2, { });
- is(tree.currentIndex, 1, "tree selection");
-
- tree.treeBoxObject.scrollToRow(2);
- synthesizeMouse(treechildren, 10, tree.treeBoxObject.rowHeight + 2, { });
- is(tree.currentIndex, 3, "tree selection after scroll");
-}
-
-var tests = [
- {
- testname: "normal panel",
- attrs: { },
- test: function(panel) {
- var screenRect = panel.getOuterScreenRect();
- is(screenRect.left, 0, this.testname + " screen left before open");
- is(screenRect.top, 0, this.testname + " screen top before open");
- is(screenRect.width, 0, this.testname + " screen width before open");
- is(screenRect.height, 0, this.testname + " screen height before open");
-
- panel.openPopupAtScreen(200, 210);
- },
- result: function(testname, panel) {
- var panelrect = panel.getBoundingClientRect();
- is(panelrect.left, 200 - mozInnerScreenX, testname + "left");
- is(panelrect.top, 210 - mozInnerScreenY, testname + "top");
- is(panelrect.width, 120, testname + "width");
- is(panelrect.height, 40, testname + "height");
-
- var screenRect = panel.getOuterScreenRect();
- is(screenRect.left, 200, testname + " screen left");
- is(screenRect.top, 210, testname + " screen top");
- is(screenRect.width, 120, testname + " screen width");
- is(screenRect.height, 40, testname + " screen height");
- }
- },
- {
- // only noautohide panels support titlebars, so one shouldn't be shown here
- testname: "autohide panel with titlebar",
- attrs: { titlebar: "normal" },
- test: function(panel) {
- var screenRect = panel.getOuterScreenRect();
- is(screenRect.left, 0, this.testname + " screen left before open");
- is(screenRect.top, 0, this.testname + " screen top before open");
- is(screenRect.width, 0, this.testname + " screen width before open");
- is(screenRect.height, 0, this.testname + " screen height before open");
-
- panel.openPopupAtScreen(200, 210);
- },
- result: function(testname, panel) {
- var panelrect = panel.getBoundingClientRect();
- is(panelrect.left, 200 - mozInnerScreenX, testname + "left");
- is(panelrect.top, 210 - mozInnerScreenY, testname + "top");
- is(panelrect.width, 120, testname + "width");
- is(panelrect.height, 40, testname + "height");
-
- var screenRect = panel.getOuterScreenRect();
- is(screenRect.left, 200, testname + " screen left");
- is(screenRect.top, 210, testname + " screen top");
- is(screenRect.width, 120, testname + " screen width");
- is(screenRect.height, 40, testname + " screen height");
- }
- },
- {
- testname: "noautohide panel with titlebar",
- attrs: { noautohide: true, titlebar: "normal" },
- test: function(panel) {
- waitSteps = 25;
-
- var screenRect = panel.getOuterScreenRect();
- is(screenRect.left, 0, this.testname + " screen left before open");
- is(screenRect.top, 0, this.testname + " screen top before open");
- is(screenRect.width, 0, this.testname + " screen width before open");
- is(screenRect.height, 0, this.testname + " screen height before open");
-
- panel.openPopupAtScreen(200, 210);
- },
- result: function(testname, panel) {
- var panelrect = panel.getBoundingClientRect();
- ok(panelrect.left >= 200 - mozInnerScreenX, testname + "left");
- if (navigator.platform.indexOf("Linux") < 0) {
- ok(panelrect.top >= 210 - mozInnerScreenY + 10, testname + "top greater");
- }
- ok(panelrect.top <= 210 - mozInnerScreenY + 32, testname + "top less");
- is(panelrect.width, 120, testname + "width");
- is(panelrect.height, 40, testname + "height");
-
- var screenRect = panel.getOuterScreenRect();
- if (navigator.platform.indexOf("Linux") < 0) {
- is(screenRect.left, 200, testname + " screen left");
- is(screenRect.top, 210, testname + " screen top");
- }
- ok(screenRect.width >= 120 && screenRect.width <= 140, testname + " screen width");
- ok(screenRect.height >= 40 && screenRect.height <= 80, testname + " screen height");
-
- var gotMouseEvent = false;
- function mouseMoved(event)
- {
- is(event.clientY, panelrect.top + 10,
- "popup clientY");
- is(event.screenY, panel.boxObject.screenY + 10,
- "popup screenY");
- is(event.originalTarget, panel.firstChild, "popup target");
- gotMouseEvent = true;
- }
-
- panel.addEventListener("mousemove", mouseMoved, true);
- synthesizeMouse(panel, 10, 10, { type: "mousemove" });
- ok(gotMouseEvent, "mouse event on panel");
- panel.removeEventListener("mousemove", mouseMoved, true);
-
- var tree = $("tree");
- tree.currentIndex = 0;
- panel.appendChild(tree);
- checkTreeCoords();
- }
- },
- {
- testname: "noautohide panel with backdrag",
- attrs: { noautohide: true, backdrag: "true" },
- test: function(panel) {
- var label = document.createElement("label");
- label.id = "backdragspot";
- label.setAttribute("value", "Hello There");
- panel.appendChild(label);
- panel.openPopupAtScreen(200, 230);
- },
- result: function(testname, panel) {
- var oldrect = panel.getOuterScreenRect();
-
- // Linux uses native window moving
- if (navigator.platform.indexOf("Linux") == -1) {
- var backdragspot = document.getElementById("backdragspot");
- synthesizeMouse(backdragspot, 5, 5, { type: "mousedown" });
- synthesizeMouse(backdragspot, 15, 20, { type: "mousemove" });
- synthesizeMouse(backdragspot, 15, 20, { type: "mouseup" });
-
- is(panel.getOuterScreenRect().left, 210, testname + "left");
- is(panel.getOuterScreenRect().top, 245, testname + "top");
- }
- }
- },
- {
- // The panel should be allowed to appear and remain offscreen
- testname: "normal panel with flip='none' off-screen",
- attrs: { "flip": "none" },
- test: function(panel) {
- panel.openPopup(document.documentElement, "", -100 - mozInnerScreenX, -100 - mozInnerScreenY, false, false, null);
- },
- result: function(testname, panel) {
- var panelrect = panel.getBoundingClientRect();
- is(panelrect.left, -100 - mozInnerScreenX, testname + "left");
- is(panelrect.top, -100 - mozInnerScreenY, testname + "top");
- is(panelrect.width, 120, testname + "width");
- is(panelrect.height, 40, testname + "height");
-
- var screenRect = panel.getOuterScreenRect();
- is(screenRect.left, -100, testname + " screen left");
- is(screenRect.top, -100, testname + " screen top");
- is(screenRect.width, 120, testname + " screen width");
- is(screenRect.height, 40, testname + " screen height");
- }
- },
- {
- // The panel should be allowed to remain offscreen after moving and it should follow the anchor
- testname: "normal panel with flip='none' moved off-screen",
- attrs: { "flip": "none" },
- test: function(panel) {
- panel.openPopup(document.documentElement, "", -100 - mozInnerScreenX, -100 - mozInnerScreenY, false, false, null);
- window.moveBy(-50, -50);
- },
- result: function(testname, panel) {
- if (navigator.platform.indexOf("Linux") >= 0) {
- // The window position doesn't get updated immediately on Linux.
- return;
- }
- var panelrect = panel.getBoundingClientRect();
- is(panelrect.left, -150 - mozInnerScreenX, testname + "left");
- is(panelrect.top, -150 - mozInnerScreenY, testname + "top");
- is(panelrect.width, 120, testname + "width");
- is(panelrect.height, 40, testname + "height");
-
- var screenRect = panel.getOuterScreenRect();
- is(screenRect.left, -150, testname + " screen left");
- is(screenRect.top, -150, testname + " screen top");
- is(screenRect.width, 120, testname + " screen width");
- is(screenRect.height, 40, testname + " screen height");
- }
- },
-];
-
-window.opener.wrappedJSObject.SimpleTest.waitForFocus(test_panels, window);
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/window_panel_focus.xul b/toolkit/content/tests/chrome/window_panel_focus.xul
deleted file mode 100644
index 6ac1abdc0b..0000000000
--- a/toolkit/content/tests/chrome/window_panel_focus.xul
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Panel Focus Tests"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
-<checkbox id="b1" label="Item 1"/>
-
-<!-- Focus should be in this order: 2 6 3 8 1 4 5 7 9 -->
-<panel id="panel" norestorefocus="true" onpopupshown="panelShown()" onpopuphidden="panelHidden()">
- <button id="t1" label="Button One"/>
- <button id="t2" tabindex="1" label="Button Two" onblur="gButtonBlur++;"/>
- <button id="t3" tabindex="2" label="Button Three"/>
- <button id="t4" tabindex="0" label="Button Four"/>
- <button id="t5" label="Button Five"/>
- <button id="t6" tabindex="1" label="Button Six"/>
- <button id="t7" label="Button Seven"/>
- <button id="t8" tabindex="4" label="Button Eight"/>
- <button id="t9" label="Button Nine"/>
-</panel>
-
-<panel id="noautofocusPanel" noautofocus="true"
- onpopupshown="noautofocusPanelShown()" onpopuphidden="noautofocusPanelHidden()">
- <textbox id="tb3"/>
-</panel>
-
-<checkbox id="b2" label="Item 2" popup="panel" onblur="gButtonBlur++;"/>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-var gButtonBlur = 0;
-
-function showPanel()
-{
- // click on the document so that the window has focus
- synthesizeMouse(document.documentElement, 1, 1, { });
-
- // focus the button
- synthesizeKeyExpectEvent("VK_TAB", { }, $("b1"), "focus", "button focus");
- // tabbing again should skip the popup
- synthesizeKeyExpectEvent("VK_TAB", { }, $("b2"), "focus", "popup skipped in focus navigation");
-
- $("panel").openPopup(null, "", 10, 10, false, false);
-}
-
-function panelShown()
-{
- // the focus on the button should have been removed when the popup was opened
- is(gButtonBlur, 1, "focus removed when popup opened");
-
- // press tab numerous times to cycle through the buttons. The t2 button will
- // be blurred twice, so gButtonBlur will be 3 afterwards.
- synthesizeKeyExpectEvent("VK_TAB", { }, $("t2"), "focus", "tabindex 1");
- synthesizeKeyExpectEvent("VK_TAB", { }, $("t6"), "focus", "tabindex 2");
- synthesizeKeyExpectEvent("VK_TAB", { }, $("t3"), "focus", "tabindex 3");
- synthesizeKeyExpectEvent("VK_TAB", { }, $("t8"), "focus", "tabindex 4");
- synthesizeKeyExpectEvent("VK_TAB", { }, $("t1"), "focus", "tabindex 5");
- synthesizeKeyExpectEvent("VK_TAB", { }, $("t4"), "focus", "tabindex 6");
- synthesizeKeyExpectEvent("VK_TAB", { }, $("t5"), "focus", "tabindex 7");
- synthesizeKeyExpectEvent("VK_TAB", { }, $("t7"), "focus", "tabindex 8");
- synthesizeKeyExpectEvent("VK_TAB", { }, $("t9"), "focus", "tabindex 9");
- synthesizeKeyExpectEvent("VK_TAB", { }, $("t2"), "focus", "tabindex 10");
-
- synthesizeKeyExpectEvent("VK_TAB", { shiftKey: true }, $("t9"), "focus", "back tabindex 1");
- synthesizeKeyExpectEvent("VK_TAB", { shiftKey: true }, $("t7"), "focus", "back tabindex 2");
- synthesizeKeyExpectEvent("VK_TAB", { shiftKey: true }, $("t5"), "focus", "back tabindex 3");
- synthesizeKeyExpectEvent("VK_TAB", { shiftKey: true }, $("t4"), "focus", "back tabindex 4");
- synthesizeKeyExpectEvent("VK_TAB", { shiftKey: true }, $("t1"), "focus", "back tabindex 5");
- synthesizeKeyExpectEvent("VK_TAB", { shiftKey: true }, $("t8"), "focus", "back tabindex 6");
- synthesizeKeyExpectEvent("VK_TAB", { shiftKey: true }, $("t3"), "focus", "back tabindex 7");
- synthesizeKeyExpectEvent("VK_TAB", { shiftKey: true }, $("t6"), "focus", "back tabindex 8");
- synthesizeKeyExpectEvent("VK_TAB", { shiftKey: true }, $("t2"), "focus", "back tabindex 9");
-
- is(gButtonBlur, 3, "blur events fired within popup");
-
- synthesizeKey("VK_ESCAPE", { });
-}
-
-function ok(condition, message) {
- window.opener.wrappedJSObject.SimpleTest.ok(condition, message);
-}
-
-function is(left, right, message) {
- window.opener.wrappedJSObject.SimpleTest.is(left, right, message);
-}
-
-function panelHidden()
-{
- // closing the popup should have blurred the focused element
- is(gButtonBlur, 4, "focus removed when popup closed");
-
- // now that the panel is hidden, pressing tab should focus the elements in
- // the main window again
- synthesizeKeyExpectEvent("VK_TAB", { }, $("b1"), "focus", "focus after popup closed");
-
- $("noautofocusPanel").openPopup(null, "", 10, 10, false, false);
-}
-
-function noautofocusPanelShown()
-{
- // with noautofocus="true", the focus should not be removed when the panel is
- // opened, so key events should still be fired at the checkbox.
- synthesizeKeyExpectEvent("VK_SPACE", { }, $("b1"), "command", "noautofocus");
- $("noautofocusPanel").hidePopup();
-}
-
-function noautofocusPanelHidden()
-{
- window.close();
- window.opener.wrappedJSObject.SimpleTest.finish();
-}
-
-window.opener.wrappedJSObject.SimpleTest.waitForFocus(showPanel, window);
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/window_popup_anchor.xul b/toolkit/content/tests/chrome/window_popup_anchor.xul
deleted file mode 100644
index 45f5fe365a..0000000000
--- a/toolkit/content/tests/chrome/window_popup_anchor.xul
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-
-<window title="Popup Anchor Tests"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<script>
-function runTests()
-{
- frames[0].openPopup();
-}
-
-window.opener.wrappedJSObject.SimpleTest.waitForFocus(runTests, window);
-</script>
-
-<spacer height="13"/>
-<button id="outerbutton" label="Button One" style="margin-left: 6px; -moz-appearance: none;"/>
-<hbox>
- <spacer width="20"/>
- <deck>
- <vbox>
- <iframe id="frame" style="margin-left: 60px; margin-top: 10px; border-left: 17px solid red; padding-left: 0 !important; padding-top: 3px;"
- width="250" height="80" src="frame_popup_anchor.xul"/>
- </vbox>
- </deck>
-</hbox>
-
-</window>
diff --git a/toolkit/content/tests/chrome/window_popup_anchoratrect.xul b/toolkit/content/tests/chrome/window_popup_anchoratrect.xul
deleted file mode 100644
index ff37afee75..0000000000
--- a/toolkit/content/tests/chrome/window_popup_anchoratrect.xul
+++ /dev/null
@@ -1,117 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onpopupshown="popupshown(event.target)" onpopuphidden="nextTest()">
-
-<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
-<label value="Popup Test"/>
-
-<menupopup id="popup">
- <menuitem label="One"/>
- <menuitem label="Two"/>
-</menupopup>
-
-<panel id="panel" noautohide="true" height="20">
- <label value="OK"/>
-</panel>
-
-<script>
-<![CDATA[
-
-let menupopup;
-
-let tests = [
- {
- test: () => menupopup.openPopupAtScreenRect("after_start", 150, 250, 30, 40),
- verify: popup => {
- let rect = popup.getOuterScreenRect();
- is(rect.left, 150, "popup at screen position x");
- is(rect.top, 290, "popup at screen position y");
- }
- },
- {
- test: () => menupopup.openPopupAtScreenRect("after_start", 150, 350, 30, 9000),
- verify: popup => {
- let rect = popup.getOuterScreenRect();
- is(rect.left, 150, "flipped popup at screen position x");
- is(rect.bottom, 350, "flipped popup at screen position y");
- }
- },
- {
- test: () => menupopup.openPopupAtScreenRect("end_before", 150, 250, 30, 40),
- verify: popup => {
- let rect = popup.getOuterScreenRect();
- is(rect.left, 180, "popup at end_before screen position x");
- is(rect.top, 250, "popup at end_before screen position y");
- }
- },
- {
- test: () => $("panel").openPopupAtScreenRect("after_start", 150, 250, 30, 40),
- verify: popup => {
- let rect = popup.getOuterScreenRect();
- is(rect.left, 150, "panel at screen position x");
- is(rect.top, 290, "panel at screen position y");
- }
- },
- {
- test: () => $("panel").openPopupAtScreenRect("before_start", 150, 250, 30, 40),
- verify: popup => {
- let rect = popup.getOuterScreenRect();
- is(rect.left, 150, "panel at before_start screen position x");
- is(rect.bottom, 250, "panel at before_start screen position y");
- }
- },
-];
-
-function runTest(id)
-{
- menupopup = $("popup");
- nextTest();
-}
-
-function nextTest()
-{
- if (!tests.length) {
- window.close();
- window.opener.SimpleTest.finish();
- return;
- }
-
- tests[0].test();
-}
-
-function popupshown(popup)
-{
- tests[0].verify(popup);
- tests.shift();
- popup.hidePopup();
-}
-
-function is(left, right, message)
-{
- window.opener.SimpleTest.is(left, right, message);
-}
-
-function ok(value, message)
-{
- window.opener.SimpleTest.ok(value, message);
-}
-
-window.opener.wrappedJSObject.SimpleTest.waitForFocus(runTest, window);
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/window_popup_attribute.xul b/toolkit/content/tests/chrome/window_popup_attribute.xul
deleted file mode 100644
index 9316d31c4a..0000000000
--- a/toolkit/content/tests/chrome/window_popup_attribute.xul
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-
-<window title="Popup Attribute Tests"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
- <script type="application/javascript" src="popup_shared.js"></script>
- <script type="application/javascript" src="popup_trigger.js"></script>
-
-<script>
-window.opener.SimpleTest.waitForFocus(runTests, window);
-</script>
-
-<hbox style="margin-left: 200px; margin-top: 270px;">
- <label id="trigger" popup="thepopup" value="Popup" height="60"/>
-</hbox>
-<!-- this frame is used to check that document.popupNode
- is inaccessible from different sources -->
-<iframe id="childframe" type="content" width="10" height="10"
- src="http://sectest2.example.org:80/chrome/toolkit/content/tests/chrome/popup_childframe_node.xul"/>
-
-<menupopup id="thepopup">
- <menuitem id="item1" label="First"/>
- <menuitem id="item2" label="Main Item"/>
- <menuitem id="amenu" label="A Menu" accesskey="M"/>
- <menuitem id="item3" label="Third"/>
- <menuitem id="one" label="One"/>
- <menuitem id="fancier" label="Fancier Menu"/>
- <menu id="submenu" label="Only Menu">
- <menupopup id="submenupopup">
- <menuitem id="submenuitem" label="Test Submenu"/>
- </menupopup>
- </menu>
- <menuitem id="other" disabled="true" label="Other Menu"/>
- <menuitem id="secondlast" label="Second Last Menu" accesskey="T"/>
- <menuitem id="last" label="One Other Menu"/>
-</menupopup>
-
-</window>
diff --git a/toolkit/content/tests/chrome/window_popup_button.xul b/toolkit/content/tests/chrome/window_popup_button.xul
deleted file mode 100644
index 125e6886cb..0000000000
--- a/toolkit/content/tests/chrome/window_popup_button.xul
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-
-<window title="Popup Tests"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
- <script type="application/javascript" src="popup_shared.js"></script>
- <script type="application/javascript" src="popup_trigger.js"></script>
-
-<script>
-window.opener.SimpleTest.waitForFocus(runTests, window);
-</script>
-
-<hbox style="margin-left: 200px; margin-top: 270px;">
- <button id="trigger" type="menu" label="Popup" width="100" height="50">
- <menupopup id="thepopup">
- <menuitem id="item1" label="First"/>
- <menuitem id="item2" label="Main Item"/>
- <menuitem id="amenu" label="A Menu" accesskey="M"/>
- <menuitem id="item3" label="Third"/>
- <menuitem id="one" label="One"/>
- <menuitem id="fancier" label="Fancier Menu"/>
- <menu id="submenu" label="Only Menu">
- <menupopup id="submenupopup">
- <menuitem id="submenuitem" label="Test Submenu"/>
- </menupopup>
- </menu>
- <menuitem id="other" disabled="true" label="Other Menu"/>
- <menuitem id="secondlast" label="Second Last Menu" accesskey="T"/>
- <menuitem id="last" label="One Other Menu"/>
- </menupopup>
- </button>
-</hbox>
-
-<!-- this frame is used to check that document.popupNode
- is inaccessible from different sources -->
-<iframe id="childframe" type="content" width="10" height="10"
- src="http://sectest2.example.org:80/chrome/toolkit/content/tests/chrome/popup_childframe_node.xul"/>
-
-</window>
diff --git a/toolkit/content/tests/chrome/window_popup_preventdefault_chrome.xul b/toolkit/content/tests/chrome/window_popup_preventdefault_chrome.xul
deleted file mode 100644
index 4d10d7fc75..0000000000
--- a/toolkit/content/tests/chrome/window_popup_preventdefault_chrome.xul
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-
-<window title="Popup Prevent Default Tests"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<!--
- This tests checks that preventDefault can be called on a popupshowing
- event or popuphiding event to prevent the default behaviour.
- -->
-
-<script>
-
-var gBlockShowing = true;
-var gBlockHiding = true;
-var gShownNotAllowed = true;
-var gHiddenNotAllowed = true;
-
-var fm = Components.classes["@mozilla.org/focus-manager;1"].
- getService(Components.interfaces.nsIFocusManager);
-
-var is = function(l, r, v) { window.opener.wrappedJSObject.SimpleTest.is(l, r, v); }
-var isnot = function(l, r, v) { window.opener.wrappedJSObject.SimpleTest.isnot(l, r, v); }
-
-function runTest()
-{
- var menu = document.getElementById("menu");
-
- is(fm.activeWindow, window, "active window at start");
- is(fm.focusedWindow, window, "focused window at start");
-
- is(window.windowState, window.STATE_NORMAL, "window is normal");
- // the minimizing test sometimes fails on Linux so don't test it there
- if (navigator.platform.indexOf("Lin") == 0) {
- menu.open = true;
- return;
- }
- window.minimize();
- is(window.windowState, window.STATE_MINIMIZED, "window is minimized");
-
- isnot(fm.activeWindow, window, "active window after minimize");
- isnot(fm.focusedWindow, window, "focused window after minimize");
-
- menu.open = true;
-
- setTimeout(runTestAfterMinimize, 0);
-}
-
-function runTestAfterMinimize()
-{
- var menu = document.getElementById("menu");
- is(menu.firstChild.state, "closed", "popup not opened when window minimized");
-
- window.restore();
- is(window.windowState, window.STATE_NORMAL, "window is restored");
-
- is(fm.activeWindow, window, "active window after restore");
- is(fm.focusedWindow, window, "focused window after restore");
-
- menu.open = true;
-}
-
-function popupShowing(event)
-{
- if (gBlockShowing) {
- event.preventDefault();
- gBlockShowing = false;
- setTimeout(function() {
- gShownNotAllowed = false;
- document.getElementById("menu").open = true;
- }, 3000, true);
- }
-}
-
-function popupShown()
-{
- window.opener.wrappedJSObject.SimpleTest.ok(!gShownNotAllowed, "popupshowing preventDefault");
- document.getElementById("menu").open = false;
-}
-
-function popupHiding(event)
-{
- if (gBlockHiding) {
- event.preventDefault();
- gBlockHiding = false;
- setTimeout(function() {
- gHiddenNotAllowed = false;
- document.getElementById("menu").open = false;
- }, 3000, true);
- }
-}
-
-function popupHidden()
-{
- window.opener.wrappedJSObject.SimpleTest.ok(!gHiddenNotAllowed, "popuphiding preventDefault");
- window.opener.wrappedJSObject.SimpleTest.finish();
- window.close();
-}
-
-window.opener.wrappedJSObject.SimpleTest.waitForFocus(runTest, window);
-</script>
-
-<button id="menu" type="menu" label="Menu">
- <menupopup onpopupshowing="popupShowing(event);"
- onpopupshown="popupShown();"
- onpopuphiding="popupHiding(event);"
- onpopuphidden="popupHidden();">
- <menuitem label="Item"/>
- </menupopup>
-</button>
-
-
-</window>
diff --git a/toolkit/content/tests/chrome/window_preferences.xul b/toolkit/content/tests/chrome/window_preferences.xul
deleted file mode 100644
index 25ee4b5b29..0000000000
--- a/toolkit/content/tests/chrome/window_preferences.xul
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<!--
- XUL Widget Test for preferences window
--->
-<prefwindow xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- title="preferences window"
- windowtype="test:preferences"
- buttons="accept,cancel"
- onload="RunTest(window.arguments)"
->
- <script type="application/javascript">
- <![CDATA[
- function RunTest(aArgs)
- {
- // run test
- aArgs[0](this);
- // close dialog
- document.documentElement[aArgs[1] ? "acceptDialog" : "cancelDialog"]();
- }
- ]]>
- </script>
-
- <prefpane id="sample_pane" label="Sample Prefpane">
- <preferences id="sample_preferences">
- <!-- one of each type known to <preferences>.valueFromPreferences -->
- <preference id ="tests.static_preference_int"
- name="tests.static_preference_int"
- type="int"/>
- <preference id ="tests.static_preference_bool"
- name="tests.static_preference_bool"
- type="bool"/>
- <preference id ="tests.static_preference_string"
- name="tests.static_preference_string"
- type="string"/>
- <preference id ="tests.static_preference_wstring"
- name="tests.static_preference_wstring"
- type="wstring"/>
- <preference id ="tests.static_preference_unichar"
- name="tests.static_preference_unichar"
- type="unichar"/>
- <preference id ="tests.static_preference_file"
- name="tests.static_preference_file"
- type="file"/>
- </preferences>
-
- <!-- one element for each preference type above -->
- <hbox>
- <label flex="1" value="int"/>
- <textbox id="static_element_int" preference="tests.static_preference_int"/>
- </hbox>
- <hbox>
- <label flex="1" value="bool"/>
- <checkbox id="static_element_bool" preference="tests.static_preference_bool"/>
- </hbox>
- <hbox>
- <label flex="1" value="string"/>
- <textbox id="static_element_string" preference="tests.static_preference_string"/>
- </hbox>
- <hbox>
- <label flex="1" value="wstring"/>
- <textbox id="static_element_wstring" preference="tests.static_preference_wstring"/>
- </hbox>
- <hbox>
- <label flex="1" value="unichar"/>
- <textbox id="static_element_unichar" preference="tests.static_preference_unichar"/>
- </hbox>
- <hbox>
- <label flex="1" value="file"/>
- <textbox id="static_element_file" preference="tests.static_preference_file"/>
- </hbox>
- </prefpane>
-</prefwindow>
diff --git a/toolkit/content/tests/chrome/window_preferences2.xul b/toolkit/content/tests/chrome/window_preferences2.xul
deleted file mode 100644
index 87158c9c7c..0000000000
--- a/toolkit/content/tests/chrome/window_preferences2.xul
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<!--
- XUL Widget Test for preferences window
--->
-<prefwindow xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- title="preferences window"
- windowtype="test:preferences2"
- buttons="accept,cancel"
- onload="RunTest(window.arguments)"
->
- <script type="application/javascript">
- <![CDATA[
- function RunTest(aArgs)
- {
- // open child
- document.documentElement.openSubDialog("window_preferences3.xul", "", {test: aArgs[0], accept: aArgs[1]});
- // close dialog
- document.documentElement[aArgs[1] ? "acceptDialog" : "cancelDialog"]();
- }
- ]]>
- </script>
-
- <prefpane id="sample_pane" label="Sample Prefpane"/>
-</prefwindow>
diff --git a/toolkit/content/tests/chrome/window_preferences3.xul b/toolkit/content/tests/chrome/window_preferences3.xul
deleted file mode 100644
index c37893a678..0000000000
--- a/toolkit/content/tests/chrome/window_preferences3.xul
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<!--
- XUL Widget Test for preferences window
--->
-<prefwindow xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- title="preferences window"
- windowtype="test:preferences3"
- buttons="accept,cancel"
- onload="RunTest(window.arguments)"
- type="child"
->
- <script type="application/javascript">
- <![CDATA[
- function RunTest(aArgs)
- {
- // run test
- aArgs[0].test(this);
- // close dialog
- document.documentElement[aArgs[0].accept ? "acceptDialog" : "cancelDialog"]();
- }
- ]]>
- </script>
-
- <prefpane id="sample_pane" label="Sample Prefpane">
- <preferences id="sample_preferences">
- <!-- one of each type known to <preferences>.valueFromPreferences -->
- <preference id ="tests.static_preference_int"
- name="tests.static_preference_int"
- type="int"/>
- <preference id ="tests.static_preference_bool"
- name="tests.static_preference_bool"
- type="bool"/>
- <preference id ="tests.static_preference_string"
- name="tests.static_preference_string"
- type="string"/>
- <preference id ="tests.static_preference_wstring"
- name="tests.static_preference_wstring"
- type="wstring"/>
- <preference id ="tests.static_preference_unichar"
- name="tests.static_preference_unichar"
- type="unichar"/>
- <preference id ="tests.static_preference_file"
- name="tests.static_preference_file"
- type="file"/>
- </preferences>
-
- <!-- one element for each preference type above -->
- <hbox>
- <label flex="1" value="int"/>
- <textbox id="static_element_int" preference="tests.static_preference_int"/>
- </hbox>
- <hbox>
- <label flex="1" value="bool"/>
- <checkbox id="static_element_bool" preference="tests.static_preference_bool"/>
- </hbox>
- <hbox>
- <label flex="1" value="string"/>
- <textbox id="static_element_string" preference="tests.static_preference_string"/>
- </hbox>
- <hbox>
- <label flex="1" value="wstring"/>
- <textbox id="static_element_wstring" preference="tests.static_preference_wstring"/>
- </hbox>
- <hbox>
- <label flex="1" value="unichar"/>
- <textbox id="static_element_unichar" preference="tests.static_preference_unichar"/>
- </hbox>
- <hbox>
- <label flex="1" value="file"/>
- <textbox id="static_element_file" preference="tests.static_preference_file"/>
- </hbox>
- </prefpane>
-</prefwindow>
diff --git a/toolkit/content/tests/chrome/window_preferences_beforeaccept.xul b/toolkit/content/tests/chrome/window_preferences_beforeaccept.xul
deleted file mode 100644
index ba200b6149..0000000000
--- a/toolkit/content/tests/chrome/window_preferences_beforeaccept.xul
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<!--
- XUL Widget Test for preferences window with beforeaccept
--->
-<prefwindow xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- title="preferences window"
- width="300" height="300"
- windowtype="test:preferences"
- buttons="accept,cancel"
- onbeforeaccept="return beforeAccept();"
- onload="onDialogLoad();"
->
- <script type="application/javascript">
- <![CDATA[
- function onDialogLoad() {
- var pref = document.getElementById("tests.beforeaccept.dialogShown");
- pref.value = true;
-
- // call the onload handler we were passed
- window.arguments[0]();
- }
-
- function beforeAccept() {
- var beforeAcceptPref = document.getElementById("tests.beforeaccept.called");
- var oldValue = beforeAcceptPref.value;
- beforeAcceptPref.value = true;
-
- return !!oldValue;
- }
- ]]>
- </script>
-
- <prefpane id="sample_pane" label="Sample Prefpane">
- <preferences id="sample_preferences">
- <preference id="tests.beforeaccept.called"
- name="tests.beforeaccept.called"
- type="bool"/>
- <preference id="tests.beforeaccept.dialogShown"
- name="tests.beforeaccept.dialogShown"
- type="bool"/>
- </preferences>
- </prefpane>
- <label>Test Prefpane</label>
-</prefwindow>
diff --git a/toolkit/content/tests/chrome/window_preferences_commandretarget.xul b/toolkit/content/tests/chrome/window_preferences_commandretarget.xul
deleted file mode 100644
index 77c6fd18ce..0000000000
--- a/toolkit/content/tests/chrome/window_preferences_commandretarget.xul
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<!--
- XUL Widget Test for preferences window. This particular test ensures that
- a checkbox with a command attribute properly updates even though the command
- event gets retargeted.
--->
-<prefwindow xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- title="preferences window"
- windowtype="test:preferences"
- buttons="accept,cancel"
- onload="RunTest(window.arguments)">
- <script type="application/javascript">
- <![CDATA[
- function RunTest(aArgs)
- {
- aArgs[0](this);
- document.documentElement.cancelDialog();
- }
- ]]>
- </script>
-
- <prefpane id="sample_pane" label="Sample Prefpane">
- <preferences id="sample_preferences">
- <preference id="tests.static_preference_bool"
- name="tests.static_preference_bool"
- type="bool"/>
- </preferences>
-
- <commandset>
- <command id="cmd_test" preference="tests.static_preference_bool"/>
- </commandset>
-
- <checkbox id="checkbox" label="Enable Option" preference="tests.static_preference_bool" command="cmd_test"/>
- </prefpane>
-</prefwindow>
diff --git a/toolkit/content/tests/chrome/window_preferences_onsyncfrompreference.xul b/toolkit/content/tests/chrome/window_preferences_onsyncfrompreference.xul
deleted file mode 100644
index e0366f9895..0000000000
--- a/toolkit/content/tests/chrome/window_preferences_onsyncfrompreference.xul
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<!-- 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/. -->
-<!--
- XUL Widget Test for preferences window with onsyncfrompreference
- This test ensures that onsyncfrompreference handlers are called after all the
- values of the corresponding preference element have been set correctly
--->
-<prefwindow xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- title="preferences window"
- width="300" height="300"
- windowtype="test:preferences">
-
- <prefpane id="sample_pane" label="Sample Prefpane">
- <preferences id="sample_preferences">
- <preference id="tests.onsyncfrompreference.pref1"
- name="tests.onsyncfrompreference.pref1"
- type="int"/>
- <preference id="tests.onsyncfrompreference.pref2"
- name="tests.onsyncfrompreference.pref2"
- type="int"/>
- <preference id="tests.onsyncfrompreference.pref3"
- name="tests.onsyncfrompreference.pref3"
- type="int"/>
- </preferences>
- </prefpane>
- <label>Test Prefpane</label>
- <checkbox id="check1" label="Label1"
- preference="tests.onsyncfrompreference.pref1"
- onsyncfrompreference="return window.arguments[0]();"
- onsynctopreference="return 1;"/>
- <checkbox id="check2" label="Label2"
- preference="tests.onsyncfrompreference.pref2"
- onsyncfrompreference="return window.arguments[0]();"
- onsynctopreference="return 1;"/>
- <checkbox id="check3" label="Label3"
- preference="tests.onsyncfrompreference.pref3"
- onsyncfrompreference="return window.arguments[0]();"
- onsynctopreference="return 1;"/>
-</prefwindow>
diff --git a/toolkit/content/tests/chrome/window_screenPosSize.xul b/toolkit/content/tests/chrome/window_screenPosSize.xul
deleted file mode 100644
index accc10d8f1..0000000000
--- a/toolkit/content/tests/chrome/window_screenPosSize.xul
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Window Open Test"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- screenX="80"
- screenY="80"
- height="300"
- width="300"
- persist="screenX screenY height width">
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/window_showcaret.xul b/toolkit/content/tests/chrome/window_showcaret.xul
deleted file mode 100644
index cb26658a11..0000000000
--- a/toolkit/content/tests/chrome/window_showcaret.xul
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version='1.0'?>
-
-<?xml-stylesheet href='chrome://global/skin' type='text/css'?>
-
-<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul'>
-
-<hbox style='-moz-user-focus: normal;' width='20' height='20'/>
-<textbox/>
-
-</window>
diff --git a/toolkit/content/tests/chrome/window_subframe_origin.xul b/toolkit/content/tests/chrome/window_subframe_origin.xul
deleted file mode 100644
index a060929a64..0000000000
--- a/toolkit/content/tests/chrome/window_subframe_origin.xul
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0"?>
-<!-- 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/. -->
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-
-<window id="window" title="Subframe Origin Tests"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
-<iframe
- style="margin-left:20px; margin-top:20px; min-height:300px; max-width:300px; max-height:300px; border:solid 1px black;"
- src="frame_subframe_origin_subframe1.xul"></iframe>
-<caption id="parentcap" label=""/>
-
-<script>
-
-// Fire a mouse move event aimed at this window, and check to be
-// sure the client coords translate from widget to the dom correctly.
-
-function runTests()
-{
- synthesizeMouse(document.getElementById("window"), 1, 2, { type: "mousemove" });
-}
-
-window.opener.wrappedJSObject.SimpleTest.waitForFocus(runTests, window);
-
-function mouseMove(e) {
- var element = e.target;
- var el = document.getElementById("parentcap");
- el.label = "client: (" + e.clientX + "," + e.clientY + ")";
- window.opener.wrappedJSObject.SimpleTest.is(e.clientX, 1, "mouse event clientX");
- window.opener.wrappedJSObject.SimpleTest.is(e.clientY, 2, "mouse event clientY");
- // fire the next test on the sub frame
- frames[0].runTests();
-}
-
-window.addEventListener("mousemove",mouseMove, false);
-
-</script>
-</window>
diff --git a/toolkit/content/tests/chrome/window_titlebar.xul b/toolkit/content/tests/chrome/window_titlebar.xul
deleted file mode 100644
index e27782153b..0000000000
--- a/toolkit/content/tests/chrome/window_titlebar.xul
+++ /dev/null
@@ -1,223 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<!--
- XUL Widget Test for the titlebar element and window dragging
- -->
-<window title="Titlebar" width="200" height="200"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
- <titlebar id="titlebar">
- <label id="label" value="Titlebar"/>
- </titlebar>
-
- <!-- a non-noautohide panel is treated as anchored -->
- <panel id="panel" onpopupshown="popupshown(this, false)" onpopuphidden="popuphidden('panelnoautohide')">
- <titlebar>
- <label id="panellabel" value="Titlebar"/>
- </titlebar>
- </panel>
-
- <panel id="panelnoautohide" noautohide="true"
- onpopupshown="popupshown(this, false)" onpopuphidden="popuphidden('panelanchored')">
- <titlebar>
- <label id="panellabelnoautohide" value="Titlebar"/>
- </titlebar>
- </panel>
-
- <panel id="panelanchored" noautohide="true"
- onpopupshown="popupshown(this, true)" onpopuphidden="popuphidden('paneltop')">
- <titlebar>
- <label id="panellabelanchored" value="Titlebar"/>
- </titlebar>
- </panel>
-
- <panel id="paneltop" noautohide="true" level="top"
- onpopupshown="popupshown(this, false)" onpopuphidden="popuphidden('panelfloating')">
- <titlebar>
- <label id="panellabeltop" value="Titlebar"/>
- </titlebar>
- </panel>
-
- <panel id="panelfloating" noautohide="true" level="floating"
- onpopupshown="popupshown(this, false)" onpopuphidden="popuphidden('')">
- <titlebar>
- <label id="panellabelfloating" value="Titlebar"/>
- </titlebar>
- </panel>
-
- <button id="button" label="OK"/>
-
-<script>
-<![CDATA[
-
-var SimpleTest = window.opener.wrappedJSObject.SimpleTest;
-
-SimpleTest.waitForFocus(test_titlebar, window);
-
-var mouseDownTarget;
-var origoldx, origoldy, oldx, oldy, waitSteps = 0;
-function waitForWindowMove(element, x, y, callback, arg, panel, anchored)
-{
- var isPanelMove = (element.id != "label");
-
- if (!waitSteps) {
- oldx = isPanelMove ? panel.getBoundingClientRect().left : window.screenX;
- oldy = isPanelMove ? panel.getBoundingClientRect().top : window.screenY;
- synthesizeMouse(element, x, y, { type: "mousemove" });
- }
-
- var newx = isPanelMove ? panel.getBoundingClientRect().left : window.screenX;
- var newy = isPanelMove ? panel.getBoundingClientRect().top : window.screenY;
- if (newx == oldx && newy == oldy) {
- if (waitSteps++ > 10) {
- SimpleTest.is(window.screenX + "," + window.screenY, oldx + "," + oldy + " ",
- "Window never moved properly to " + x + "," + y + (panel ? " " + panel.id : ""));
- window.opener.wrappedJSObject.SimpleTest.finish();
- window.close();
- return;
- }
-
- setTimeout(waitForWindowMove, 100, element, x, y, callback, arg, panel, anchored);
- }
- else {
- waitSteps = 0;
-
- // on Linux, we need to wait a bit for the popup to be moved as well
- if (navigator.platform.indexOf("Linux") >= 0) {
- setTimeout(callback, 0, arg, panel, anchored);
- }
- else {
- callback(arg, panel, anchored);
- }
- }
-}
-
-function test_titlebar()
-{
- var titlebar = document.getElementById("titlebar");
- var label = document.getElementById("label");
-
- origoldx = window.screenX;
- origoldy = window.screenY;
-
- var mousedownListener = event => mouseDownTarget = event.originalTarget;
- window.addEventListener("mousedown", mousedownListener, false);
- synthesizeMouse(label, 2, 2, { type: "mousedown" });
- SimpleTest.is(mouseDownTarget, titlebar, "movedown on titlebar");
- waitForWindowMove(label, 22, 22, test_titlebar_step2, mousedownListener);
-}
-
-function test_titlebar_step2(mousedownListener)
-{
- var titlebar = document.getElementById("titlebar");
- var label = document.getElementById("label");
-
- SimpleTest.is(window.screenX, origoldx + 20, "move window horizontal");
- SimpleTest.is(window.screenY, origoldy + 20, "move window vertical");
- synthesizeMouse(label, 22, 22, { type: "mouseup" });
-
- // with allowEvents set to true, the mouse should target the label instead
- // and not move the window
- titlebar.allowEvents = true;
-
- synthesizeMouse(label, 2, 2, { type: "mousedown" });
- SimpleTest.is(mouseDownTarget, label, "movedown on titlebar with allowevents");
- synthesizeMouse(label, 22, 22, { type: "mousemove" });
- SimpleTest.is(window.screenX, origoldx + 20, "mouse on label move window horizontal");
- SimpleTest.is(window.screenY, origoldy + 20, "mouse on label move window vertical");
- synthesizeMouse(label, 22, 22, { type: "mouseup" });
-
- window.removeEventListener("mousedown", mousedownListener, false);
-
- document.getElementById("panel").openPopupAtScreen(window.screenX + 50, window.screenY + 60, false);
-}
-
-function popupshown(panel, anchored)
-{
- var rect = panel.getBoundingClientRect();
-
- // skip this check for non-noautohide panels
- if (panel.id == "panel") {
- var panellabel = panel.firstChild.firstChild;
- synthesizeMouse(panellabel, 2, 2, { type: "mousedown" });
- waitForWindowMove(panellabel, 22, 22, popupshown_step3, rect, panel, anchored);
- return;
- }
-
- // now, try moving the window. If anchored, the popup should move with the
- // window. If not anchored, the popup should remain at its current screen location.
- window.moveBy(10, 10);
- waitSteps = 1;
- waitForWindowMove(document.getElementById("label"), 1, 1, popupshown_step2, rect, panel, anchored);
-}
-
-function popupshown_step2(oldrect, panel, anchored)
-{
- var newrect = panel.getBoundingClientRect();
-
- // The window movement that occured long ago at the beginning of the test
- // on Linux is delayed and there isn't any way to tell when the move
- // actually happened. This causes the checks here to fail. Instead, just
- // wait a bit for the test to be ready.
- if (navigator.platform.indexOf("Linux") >= 0 &&
- newrect.left != oldrect.left - (anchored ? 0 : 10)) {
- setTimeout(popupshown_step2, 10, oldrect, panel, anchored);
- return;
- }
-
- // anchored popups should still be at the same offset. Non-anchored popups will
- // now be offset by 10 pixels less.
- SimpleTest.is(newrect.left, oldrect.left - (anchored ? 0 : 10),
- panel.id + " horizontal after window move");
- SimpleTest.is(newrect.top, oldrect.top - (anchored ? 0 : 10),
- panel.id + " vertical after window move");
-
- var panellabel = panel.firstChild.firstChild;
- synthesizeMouse(panellabel, 2, 2, { type: "mousedown" });
- waitForWindowMove(panellabel, 22, 22, popupshown_step3, newrect, panel, anchored);
-}
-
-function popupshown_step3(oldrect, panel, anchored)
-{
- // skip this check on Linux for the same window positioning reasons as above
- if (navigator.platform.indexOf("Linux") == -1 || (panel.id != "panelanchored" && panel.id != "paneltop")) {
- // next, drag the titlebar in the panel
- var newrect = panel.getBoundingClientRect();
- SimpleTest.is(newrect.left, oldrect.left + 20, panel.id + " move popup horizontal");
- SimpleTest.is(newrect.top, oldrect.top + 20, panel.id + " move popup vertical");
- synthesizeMouse(document.getElementById("panellabel"), 22, 22, { type: "mouseup" });
-
- synthesizeMouse(document.getElementById("button"), 5, 5, { type: "mousemove" });
- newrect = panel.getBoundingClientRect();
- SimpleTest.is(newrect.left, oldrect.left + 20, panel.id + " horizontal after mouse on button");
- SimpleTest.is(newrect.top, oldrect.top + 20, panel.id + " vertical after mouse on button");
- }
- else {
- synthesizeMouse(document.getElementById("panellabel"), 22, 22, { type: "mouseup" });
- }
-
- panel.hidePopup();
-}
-
-function popuphidden(nextPopup)
-{
- if (nextPopup) {
- var panel = document.getElementById(nextPopup);
- if (panel.id == "panelnoautohide") {
- panel.openPopupAtScreen(window.screenX + 50, window.screenY + 60, false);
- }
- else {
- panel.openPopup(document.getElementById("button"), "after_start");
- }
- }
- else
- window.opener.wrappedJSObject.done(window);
-}
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/content/tests/chrome/window_tooltip.xul b/toolkit/content/tests/chrome/window_tooltip.xul
deleted file mode 100644
index 087c91c3e7..0000000000
--- a/toolkit/content/tests/chrome/window_tooltip.xul
+++ /dev/null
@@ -1,311 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Tooltip Tests"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
- <script type="application/javascript" src="popup_shared.js"></script>
-
-<tooltip id="thetooltip">
- <label id="label" value="This is a tooltip"/>
-</tooltip>
-
-<box id="parent" tooltiptext="Box Tooltip" style="margin: 10px">
- <button id="withtext" label="Tooltip Text" tooltiptext="Button Tooltip"
- style="-moz-appearance: none; padding: 0;"/>
- <button id="without" label="No Tooltip" style="-moz-appearance: none; padding: 0;"/>
- <!-- remove the native theme and borders to avoid some platform
- specific sizing differences -->
- <button id="withtooltip" label="Tooltip Element" tooltip="thetooltip"
- class="plain" style="-moz-appearance: none; padding: 0;"/>
- <iframe id="childframe" type="content" width="10" height="10"
- src="http://sectest2.example.org:80/chrome/toolkit/content/tests/chrome/popup_childframe_node.xul"/>
-</box>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-var gOriginalWidth = -1;
-var gOriginalHeight = -1;
-var gButton = null;
-
-function runTest()
-{
- startPopupTests(popupTests);
-}
-
-function checkCoords(event)
-{
- // all but one test open the tooltip at the button location offset by 6
- // in each direction. Test 5 opens it at 4 in each direction.
- var mod = (gTestIndex == 5) ? 4 : 6;
-
- var rect = gButton.getBoundingClientRect();
- var popupstyle = window.getComputedStyle(gButton, "");
- is(event.clientX, Math.round(rect.left + mod),
- "step " + (gTestIndex + 1) + " clientX");
- is(event.clientY, Math.round(rect.top + mod),
- "step " + (gTestIndex + 1) + " clientY");
- ok(event.screenX > 0, "step " + (gTestIndex + 1) + " screenX");
- ok(event.screenY > 0, "step " + (gTestIndex + 1) + " screenY");
-}
-
-var popupTests = [
-{
- testname: "hover tooltiptext attribute",
- events: [ "popupshowing #tooltip", "popupshown #tooltip" ],
- test: function() {
- gButton = document.getElementById("withtext");
- disableNonTestMouse(true);
- synthesizeMouse(gButton, 2, 2, { type: "mouseover" });
- synthesizeMouse(gButton, 4, 4, { type: "mousemove" });
- synthesizeMouse(gButton, 6, 6, { type: "mousemove" });
- disableNonTestMouse(false);
- }
-},
-{
- testname: "close tooltip",
- events: [ "popuphiding #tooltip", "popuphidden #tooltip",
- "DOMMenuInactive #tooltip" ],
- test: function() {
- disableNonTestMouse(true);
- synthesizeMouse(document.documentElement, 2, 2, { type: "mousemove" });
- disableNonTestMouse(false);
- }
-},
-{
- testname: "hover inherited tooltip",
- events: [ "popupshowing #tooltip", "popupshown #tooltip" ],
- test: function() {
- gButton = document.getElementById("without");
- disableNonTestMouse(true);
- synthesizeMouse(gButton, 2, 2, { type: "mouseover" });
- synthesizeMouse(gButton, 4, 4, { type: "mousemove" });
- synthesizeMouse(gButton, 6, 6, { type: "mousemove" });
- disableNonTestMouse(false);
- }
-},
-{
- testname: "hover tooltip attribute",
- events: [ "popuphiding #tooltip", "popuphidden #tooltip",
- "DOMMenuInactive #tooltip",
- "popupshowing thetooltip", "popupshown thetooltip" ],
- test: function() {
- gButton = document.getElementById("withtooltip");
- gExpectedTriggerNode = gButton;
- disableNonTestMouse(true);
- synthesizeMouse(gButton, 2, 2, { type: "mouseover" });
- synthesizeMouse(gButton, 4, 4, { type: "mousemove" });
- synthesizeMouse(gButton, 6, 6, { type: "mousemove" });
- disableNonTestMouse(false);
- },
- result: function(testname) {
- var tooltip = document.getElementById("thetooltip");
- gExpectedTriggerNode = null;
- is(tooltip.triggerNode, gButton, testname + " triggerNode");
- is(document.popupNode, null, testname + " document.popupNode");
- is(document.tooltipNode, gButton, testname + " document.tooltipNode");
-
- var child = $("childframe").contentDocument;
- var evt = child.createEvent("Event");
- evt.initEvent("click", true, true);
- child.documentElement.dispatchEvent(evt);
- is(child.documentElement.getAttribute("data"), "xnull",
- "cannot get tooltipNode from other document");
-
- var buttonrect = document.getElementById("withtooltip").getBoundingClientRect();
- var rect = tooltip.getBoundingClientRect();
- var popupstyle = window.getComputedStyle(document.getElementById("thetooltip"), "");
-
- is(Math.round(rect.left),
- Math.round(buttonrect.left + parseFloat(popupstyle.marginLeft) + 6),
- testname + " left position of tooltip");
- is(Math.round(rect.top),
- Math.round(buttonrect.top + parseFloat(popupstyle.marginTop) + 6),
- testname + " top position of tooltip");
-
- var labelrect = document.getElementById("label").getBoundingClientRect();
- ok(labelrect.right < rect.right, testname + " tooltip width");
- ok(labelrect.bottom < rect.bottom, testname + " tooltip height");
-
- gOriginalWidth = rect.right - rect.left;
- gOriginalHeight = rect.bottom - rect.top;
- }
-},
-{
- testname: "click to close tooltip",
- events: [ "popuphiding thetooltip", "popuphidden thetooltip",
- "command withtooltip", "DOMMenuInactive thetooltip" ],
- test: function() {
- gButton = document.getElementById("withtooltip");
- synthesizeMouse(gButton, 2, 2, { });
- },
- result: function(testname) {
- var tooltip = document.getElementById("thetooltip");
- is(tooltip.triggerNode, null, testname + " triggerNode");
- is(document.popupNode, null, testname + " document.popupNode");
- is(document.tooltipNode, null, testname + " document.tooltipNode");
- }
-},
-{
- testname: "hover tooltip after size increased",
- events: [ "popupshowing thetooltip", "popupshown thetooltip" ],
- test: function() {
- var label = document.getElementById("label");
- label.removeAttribute("value");
- label.textContent = "This is a longer tooltip than before\nIt has multiple lines\nIt is testing tooltip sizing\n";
- gButton = document.getElementById("withtooltip");
- disableNonTestMouse(true);
- synthesizeMouse(gButton, 2, 2, { type: "mouseover" });
- synthesizeMouse(gButton, 6, 6, { type: "mousemove" });
- synthesizeMouse(gButton, 4, 4, { type: "mousemove" });
- disableNonTestMouse(false);
- },
- result: function(testname) {
- var buttonrect = document.getElementById("withtooltip").getBoundingClientRect();
- var rect = document.getElementById("thetooltip").getBoundingClientRect();
- var popupstyle = window.getComputedStyle(document.getElementById("thetooltip"), "");
- var buttonstyle = window.getComputedStyle(document.getElementById("withtooltip"), "");
-
- is(Math.round(rect.left),
- Math.round(buttonrect.left + parseFloat(popupstyle.marginLeft) + 4),
- testname + " left position of tooltip");
- is(Math.round(rect.top),
- Math.round(buttonrect.top + parseFloat(popupstyle.marginTop) + 4),
- testname + " top position of tooltip");
-
- var labelrect = document.getElementById("label").getBoundingClientRect();
- ok(labelrect.right < rect.right, testname + " tooltip width");
- ok(labelrect.bottom < rect.bottom, testname + " tooltip height");
-
- // make sure that the tooltip is larger than it was before by just
- // checking against the original height plus an arbitrary 15 pixels
- ok(gOriginalWidth + 15 < rect.right - rect.left, testname + " tooltip is wider");
- ok(gOriginalHeight + 15 < rect.bottom - rect.top, testname + " tooltip is taller");
- }
-},
-{
- testname: "close tooltip with hidePopup",
- events: [ "popuphiding thetooltip", "popuphidden thetooltip",
- "DOMMenuInactive thetooltip" ],
- test: function() {
- document.getElementById("thetooltip").hidePopup();
- },
-},
-{
- testname: "hover tooltip after size decreased",
- events: [ "popupshowing thetooltip", "popupshown thetooltip" ],
- autohide: "thetooltip",
- test: function() {
- var label = document.getElementById("label");
- label.value = "This is a tooltip";
- gButton = document.getElementById("withtooltip");
- disableNonTestMouse(true);
- synthesizeMouse(gButton, 2, 2, { type: "mouseover" });
- synthesizeMouse(gButton, 4, 4, { type: "mousemove" });
- synthesizeMouse(gButton, 6, 6, { type: "mousemove" });
- disableNonTestMouse(false);
- },
- result: function(testname) {
- var buttonrect = document.getElementById("withtooltip").getBoundingClientRect();
- var rect = document.getElementById("thetooltip").getBoundingClientRect();
- var popupstyle = window.getComputedStyle(document.getElementById("thetooltip"), "");
- var buttonstyle = window.getComputedStyle(document.getElementById("withtooltip"), "");
-
- is(Math.round(rect.left),
- Math.round(buttonrect.left + parseFloat(popupstyle.marginLeft) + 6),
- testname + " left position of tooltip");
- is(Math.round(rect.top),
- Math.round(buttonrect.top + parseFloat(popupstyle.marginTop) + 6),
- testname + " top position of tooltip");
-
- var labelrect = document.getElementById("label").getBoundingClientRect();
- ok(labelrect.right < rect.right, testname + " tooltip width");
- ok(labelrect.bottom < rect.bottom, testname + " tooltip height");
-
- is(gOriginalWidth, rect.right - rect.left, testname + " tooltip is original width");
- is(gOriginalHeight, rect.bottom - rect.top, testname + " tooltip is original height");
- }
-},
-{
- testname: "hover tooltip at bottom edge of screen",
- events: [ "popupshowing thetooltip", "popupshown thetooltip" ],
- autohide: "thetooltip",
- condition: function() {
- // Only checking OSX here because on other platforms popups and tooltips behave the same way
- // when there's not enough space to show them below (by flipping vertically)
- // However, on OSX most popups are not flipped but tooltips are.
- return navigator.platform.indexOf("Mac") > -1;
- },
- test: function() {
- var buttonRect = document.getElementById("withtext").getBoundingClientRect();
- var windowY = screen.height -
- (window.mozInnerScreenY - window.screenY ) - buttonRect.bottom;
-
- moveWindowTo(window.screenX, windowY, function() {
- gButton = document.getElementById("withtooltip");
- disableNonTestMouse(true);
- synthesizeMouse(gButton, 2, 2, { type: "mouseover" });
- synthesizeMouse(gButton, 6, 6, { type: "mousemove" });
- synthesizeMouse(gButton, 4, 4, { type: "mousemove" });
- disableNonTestMouse(false);
- });
- },
- result: function(testname) {
- var buttonrect = document.getElementById("withtooltip").getBoundingClientRect();
- var rect = document.getElementById("thetooltip").getBoundingClientRect();
- var popupstyle = window.getComputedStyle(document.getElementById("thetooltip"), "");
-
- is(Math.round(rect.y + rect.height),
- Math.round(buttonrect.top + 4 - parseFloat(popupstyle.marginTop)),
- testname + " position of tooltip above button");
- }
-}
-
-];
-
-var waitSteps = 0;
-function moveWindowTo(x, y, callback, arg)
-{
- if (!waitSteps) {
- oldx = window.screenX;
- oldy = window.screenY;
- window.moveTo(x, y);
-
- waitSteps++;
- setTimeout(moveWindowTo, 100, x, y, callback, arg);
- return;
- }
-
- if (window.screenX == oldx && window.screenY == oldy) {
- if (waitSteps++ > 10) {
- ok(false, "Window never moved properly to " + x + "," + y);
- window.opener.wrappedJSObject.SimpleTest.finish();
- window.close();
- }
-
- setTimeout(moveWindowTo, 100, x, y, callback, arg);
- }
- else {
- waitSteps = 0;
- callback(arg);
- }
-}
-
-window.opener.wrappedJSObject.SimpleTest.waitForFocus(runTest, window);
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/chrome/xul_selectcontrol.js b/toolkit/content/tests/chrome/xul_selectcontrol.js
deleted file mode 100644
index d6518c1503..0000000000
--- a/toolkit/content/tests/chrome/xul_selectcontrol.js
+++ /dev/null
@@ -1,390 +0,0 @@
-// This script is used to test elements that implement
-// nsIDOMXULSelectControlElement. This currently is the following elements:
-// listbox, menulist, radiogroup, richlistbox, tabs
-//
-// flag behaviours that differ for certain elements
-// allow-other-value - alternate values for the value property may be used
-// besides those in the list
-// other-value-clears-selection - alternative values for the value property
-// clears the selected item
-// selection-required - an item must be selected in the list, unless there
-// aren't any to select
-// activate-disabled-menuitem - disabled menuitems can be highlighted
-// select-keynav-wraps - key navigation over a selectable list wraps
-// select-extended-keynav - home, end, page up and page down keys work to
-// navigate over a selectable list
-// keynav-leftright - key navigation is left/right rather than up/down
-// The win:, mac: and gtk: or other prefixes may be used for platform specific behaviour
-var behaviours = {
- menu: "win:activate-disabled-menuitem activate-disabled-menuitem-mousemove select-keynav-wraps select-extended-keynav",
- menulist: "allow-other-value other-value-clears-selection",
- listbox: "select-extended-keynav",
- richlistbox: "select-extended-keynav",
- radiogroup: "select-keynav-wraps dont-select-disabled allow-other-value",
- tabs: "select-extended-keynav mac:select-keynav-wraps allow-other-value selection-required keynav-leftright"
-};
-
-function behaviourContains(tag, behaviour)
-{
- var platform = "none:";
- if (navigator.platform.indexOf("Mac") >= 0)
- platform = "mac:";
- else if (navigator.platform.indexOf("Win") >= 0)
- platform = "win:";
- else if (navigator.platform.indexOf("X") >= 0)
- platform = "gtk:";
-
- var re = new RegExp("\\s" + platform + behaviour + "\\s|\\s" + behaviour + "\\s");
- return re.test(" " + behaviours[tag] + " ");
-}
-
-function test_nsIDOMXULSelectControlElement(element, childtag, testprefix)
-{
- var testid = (testprefix) ? testprefix + " " : "";
- testid += element.localName + " nsIDOMXULSelectControlElement ";
-
- // editable menulists use the label as the value instead
- var firstvalue = "first", secondvalue = "second", fourthvalue = "fourth";
- if (element.localName == "menulist" && element.editable) {
- firstvalue = "First Item";
- secondvalue = "Second Item"
- fourthvalue = "Fourth Item";
- }
-
- // 'initial' - check if the initial state of the element is correct
- test_nsIDOMXULSelectControlElement_States(element, testid + "initial", 0, null, -1, "");
-
- test_nsIDOMXULSelectControlElement_init(element, testid);
-
- // 'appendItem' - check if appendItem works to add a new item
- var firstitem = element.appendItem("First Item", "first");
- is(firstitem.localName, childtag,
- testid + "appendItem - first item is " + childtag);
- test_nsIDOMXULSelectControlElement_States(element, testid + "appendItem", 1, null, -1, "");
-
- is(firstitem.control, element, testid + "control");
-
- // 'selectedIndex' - check if an item may be selected
- element.selectedIndex = 0;
- test_nsIDOMXULSelectControlElement_States(element, testid + "selectedIndex", 1, firstitem, 0, firstvalue);
-
- // 'appendItem 2' - check if a second item may be added
- var seconditem = element.appendItem("Second Item", "second");
- test_nsIDOMXULSelectControlElement_States(element, testid + "appendItem 2", 2, firstitem, 0, firstvalue);
-
- // 'selectedItem' - check if the second item may be selected
- element.selectedItem = seconditem;
- test_nsIDOMXULSelectControlElement_States(element, testid + "selectedItem", 2, seconditem, 1, secondvalue);
-
- // 'selectedIndex 2' - check if selectedIndex may be set to -1 to deselect items
- var selectionRequired = behaviourContains(element.localName, "selection-required");
- element.selectedIndex = -1;
- test_nsIDOMXULSelectControlElement_States(element, testid + "selectedIndex 2", 2,
- selectionRequired ? seconditem : null, selectionRequired ? 1 : -1,
- selectionRequired ? secondvalue : "");
-
- // 'selectedItem 2' - check if the selectedItem property may be set to null
- element.selectedIndex = 1;
- element.selectedItem = null;
- test_nsIDOMXULSelectControlElement_States(element, testid + "selectedItem 2", 2,
- selectionRequired ? seconditem : null, selectionRequired ? 1 : -1,
- selectionRequired ? secondvalue : "");
-
- // 'getIndexOfItem' - check if getIndexOfItem returns the right index
- is(element.getIndexOfItem(firstitem), 0, testid + "getIndexOfItem - first item at index 0");
- is(element.getIndexOfItem(seconditem), 1, testid + "getIndexOfItem - second item at index 1");
-
- var otheritem = element.ownerDocument.createElement(childtag);
- is(element.getIndexOfItem(otheritem), -1, testid + "getIndexOfItem - other item not found");
-
- // 'getItemAtIndex' - check if getItemAtIndex returns the right item
- is(element.getItemAtIndex(0), firstitem, testid + "getItemAtIndex - index 0 is first item");
- is(element.getItemAtIndex(1), seconditem, testid + "getItemAtIndex - index 0 is second item");
- is(element.getItemAtIndex(-1), null, testid + "getItemAtIndex - index -1 is null");
- is(element.getItemAtIndex(2), null, testid + "getItemAtIndex - index 2 is null");
-
- // check if setting the value changes the selection
- element.value = firstvalue;
- test_nsIDOMXULSelectControlElement_States(element, testid + "set value 1", 2, firstitem, 0, firstvalue);
- element.value = secondvalue;
- test_nsIDOMXULSelectControlElement_States(element, testid + "set value 2", 2, seconditem, 1, secondvalue);
- // setting the value attribute to one not in the list doesn't change the selection.
- // The value is only changed for elements which support having a value other than the
- // selection.
- element.value = "other";
- var allowOtherValue = behaviourContains(element.localName, "allow-other-value");
- var otherValueClearsSelection = behaviourContains(element.localName, "other-value-clears-selection");
- test_nsIDOMXULSelectControlElement_States(element, testid + "set value other", 2,
- otherValueClearsSelection ? null : seconditem,
- otherValueClearsSelection ? -1 : 1,
- allowOtherValue ? "other" : secondvalue);
- if (allowOtherValue)
- element.value = "";
-
- // 'removeItemAt' - check if removeItemAt removes the right item
- if (selectionRequired)
- element.value = secondvalue;
- else
- element.selectedIndex = -1;
-
- var removeditem = element.removeItemAt(0);
- is(removeditem, firstitem, testid + "removeItemAt return value");
- test_nsIDOMXULSelectControlElement_States(element, testid + "removeItemAt", 1,
- selectionRequired ? seconditem : null, selectionRequired ? 0 : -1,
- selectionRequired ? secondvalue : "");
-
- is(removeditem.control, undefined, testid + "control not set");
-
- var thirditem = element.appendItem("Third Item", "third");
- var fourthitem = element.appendItem("Fourth Item", fourthvalue);
- var fifthitem = element.appendItem("Fifth Item", "fifth");
-
- // 'removeItemAt 2' - check if removeItemAt removes the selected item and
- // adjusts the selection to the next item
- element.selectedItem = thirditem;
- is(element.removeItemAt(1), thirditem, testid + "removeItemAt 2 return value");
-
- // radio buttons don't handle removing quite right due to XBL issues,
- // so disable testing some of these remove tests for now - bug 367400
- var isnotradio = (element.localName != "radiogroup");
- // XXXndeakin disable these tests for all widgets for now. They require bug 331513.
- isnotradio = false;
- if (isnotradio)
- test_nsIDOMXULSelectControlElement_States(element, testid + "removeItemAt 2", 3, fourthitem, 1, fourthvalue);
-
- // 'removeItemAt 3' - check if removeItemAt adjusts the selection
- // if an earlier item is removed
- element.selectedItem = fourthitem;
- element.removeItemAt(0);
- test_nsIDOMXULSelectControlElement_States(element, testid + "removeItemAt 3", 2, fourthitem, 0, fourthvalue);
-
- // 'removeItemAt 4' - check if removeItemAt adjusts the selection if the
- // last item is selected and removed
- element.selectedItem = fifthitem;
- element.removeItemAt(1);
- if (isnotradio)
- test_nsIDOMXULSelectControlElement_States(element, testid + "removeItemAt 4", 1, fourthitem, 0, fourthvalue);
-
- // 'removeItemAt 5' - check that removeItemAt doesn't fail when removing invalid items
- is(element.removeItemAt(-1), null, testid + "removeItemAt 5 return value");
- if (isnotradio)
- test_nsIDOMXULSelectControlElement_States(element, testid + "removeItemAt 5", 1, fourthitem, 0, fourthvalue);
-
- // 'removeItemAt 6' - check that removeItemAt doesn't fail when removing invalid items
- is(element.removeItemAt(1), null, testid + "removeItemAt 6 return value");
- is("item removed", "item removed", testid + "removeItemAt 6");
- if (isnotradio)
- test_nsIDOMXULSelectControlElement_States(element, testid + "removeItemAt 6", 1, fourthitem, 0, fourthvalue);
-
- // 'insertItemAt' - check if insertItemAt inserts items at the right locations
- element.selectedIndex = 0;
- test_nsIDOMXULSelectControlElement_insertItemAt(element, 0, 0, testid, 5);
- test_nsIDOMXULSelectControlElement_insertItemAt(element, 2, 2, testid, 6);
- test_nsIDOMXULSelectControlElement_insertItemAt(element, -1, 3, testid, 7);
- test_nsIDOMXULSelectControlElement_insertItemAt(element, 6, 4, testid, 8);
-
- element.selectedIndex = 0;
- fourthitem.disabled = true;
- element.selectedIndex = 1;
- test_nsIDOMXULSelectControlElement_States(element, testid + "selectedIndex disabled", 5, fourthitem, 1, fourthvalue);
-
- element.selectedIndex = 0;
- element.selectedItem = fourthitem;
- test_nsIDOMXULSelectControlElement_States(element, testid + "selectedIndex disabled", 5, fourthitem, 1, fourthvalue);
-
- // 'removeall' - check if all items are removed
- while (element.itemCount)
- element.removeItemAt(0);
- if (isnotradio)
- test_nsIDOMXULSelectControlElement_States(element, testid + "remove all", 0, null, -1,
- allowOtherValue ? "number8" : "");
-}
-
-function test_nsIDOMXULSelectControlElement_init(element, testprefix)
-{
- // editable menulists use the label as the value
- var isEditable = (element.localName == "menulist" && element.editable);
-
- var id = element.id;
- element = document.getElementById(id + "-initwithvalue");
- if (element) {
- var seconditem = element.getItemAtIndex(1);
- test_nsIDOMXULSelectControlElement_States(element, testprefix + " value initialization",
- 3, seconditem, 1,
- isEditable ? seconditem.label : seconditem.value);
- }
-
- element = document.getElementById(id + "-initwithselected");
- if (element) {
- var thirditem = element.getItemAtIndex(2);
- test_nsIDOMXULSelectControlElement_States(element, testprefix + " selected initialization",
- 3, thirditem, 2,
- isEditable ? thirditem.label : thirditem.value);
- }
-}
-
-function test_nsIDOMXULSelectControlElement_States(element, testid,
- expectedcount, expecteditem,
- expectedindex, expectedvalue)
-{
- // need an itemCount property here
- var count = element.itemCount;
- is(count, expectedcount, testid + " item count");
- is(element.selectedItem, expecteditem, testid + " selectedItem");
- is(element.selectedIndex, expectedindex, testid + " selectedIndex");
- is(element.value, expectedvalue, testid + " value");
- if (element.selectedItem) {
- is(element.selectedItem.selected, true,
- testid + " selectedItem marked as selected");
- }
-}
-
-function test_nsIDOMXULSelectControlElement_insertItemAt(element, index, expectedindex, testid, number)
-{
- var expectedCount = element.itemCount;
- var expectedSelItem = element.selectedItem;
- var expectedSelIndex = element.selectedIndex;
- var expectedSelValue = element.value;
-
- var newitem = element.insertItemAt(index, "Item " + number, "number" + number);
- is(element.getIndexOfItem(newitem), expectedindex,
- testid + "insertItemAt " + expectedindex + " - get inserted item");
- expectedCount++;
- if (expectedSelIndex >= expectedindex)
- expectedSelIndex++;
-
- test_nsIDOMXULSelectControlElement_States(element, testid + "insertItemAt " + index,
- expectedCount, expectedSelItem,
- expectedSelIndex, expectedSelValue);
- return newitem;
-}
-
-/** test_nsIDOMXULSelectControlElement_UI
- *
- * Test the UI aspects of an element which implements nsIDOMXULSelectControlElement
- *
- * Parameters:
- * element - element to test
- */
-function test_nsIDOMXULSelectControlElement_UI(element, testprefix)
-{
- var testid = (testprefix) ? testprefix + " " : "";
- testid += element.localName + " nsIDOMXULSelectControlElement UI ";
-
- while (element.itemCount)
- element.removeItemAt(0);
-
- var firstitem = element.appendItem("First Item", "first");
- var seconditem = element.appendItem("Second Item", "second");
-
- // 'mouse select' - check if clicking an item selects it
- synthesizeMouseExpectEvent(firstitem, 2, 2, {}, element, "select", testid + "mouse select");
- test_nsIDOMXULSelectControlElement_States(element, testid + "mouse select", 2, firstitem, 0, "first");
-
- 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();
-
- var navLeftRight = behaviourContains(element.localName, "keynav-leftright");
- var backKey = navLeftRight ? "VK_LEFT" : "VK_UP";
- var forwardKey = navLeftRight ? "VK_RIGHT" : "VK_DOWN";
-
- // 'key select' - check if keypresses move between items
- synthesizeKeyExpectEvent(backKey, {}, element, "select", testid + "key up");
- test_nsIDOMXULSelectControlElement_States(element, testid + "key up", 2, firstitem, 0, "first");
-
- var keyWrap = behaviourContains(element.localName, "select-keynav-wraps");
-
- var expectedItem = keyWrap ? seconditem : firstitem;
- var expectedIndex = keyWrap ? 1 : 0;
- var expectedValue = keyWrap ? "second" : "first";
- synthesizeKeyExpectEvent(backKey, {}, keyWrap ? element : null, "select", testid + "key up 2");
- test_nsIDOMXULSelectControlElement_States(element, testid + "key up 2", 2,
- expectedItem, expectedIndex, expectedValue);
-
- element.selectedIndex = 0;
- synthesizeKeyExpectEvent(forwardKey, {}, element, "select", testid + "key down");
- test_nsIDOMXULSelectControlElement_States(element, testid + "key down", 2, seconditem, 1, "second");
-
- expectedItem = keyWrap ? firstitem : seconditem;
- expectedIndex = keyWrap ? 0 : 1;
- expectedValue = keyWrap ? "first" : "second";
- synthesizeKeyExpectEvent(forwardKey, {}, keyWrap ? element : null, "select", testid + "key down 2");
- test_nsIDOMXULSelectControlElement_States(element, testid + "key down 2", 2,
- expectedItem, expectedIndex, expectedValue);
-
- var thirditem = element.appendItem("Third Item", "third");
- var fourthitem = element.appendItem("Fourth Item", "fourth");
- if (behaviourContains(element.localName, "select-extended-keynav")) {
- var fifthitem = element.appendItem("Fifth Item", "fifth");
- var sixthitem = element.appendItem("Sixth Item", "sixth");
-
- synthesizeKeyExpectEvent("VK_END", {}, element, "select", testid + "key end");
- test_nsIDOMXULSelectControlElement_States(element, testid + "key end", 6, sixthitem, 5, "sixth");
-
- synthesizeKeyExpectEvent("VK_HOME", {}, element, "select", testid + "key home");
- test_nsIDOMXULSelectControlElement_States(element, testid + "key home", 6, firstitem, 0, "first");
-
- synthesizeKeyExpectEvent("VK_PAGE_DOWN", {}, element, "select", testid + "key page down");
- test_nsIDOMXULSelectControlElement_States(element, testid + "key page down", 6, fourthitem, 3, "fourth");
- synthesizeKeyExpectEvent("VK_PAGE_DOWN", {}, element, "select", testid + "key page down to end");
- test_nsIDOMXULSelectControlElement_States(element, testid + "key page down to end", 6, sixthitem, 5, "sixth");
-
- synthesizeKeyExpectEvent("VK_PAGE_UP", {}, element, "select", testid + "key page up");
- test_nsIDOMXULSelectControlElement_States(element, testid + "key page up", 6, thirditem, 2, "third");
- synthesizeKeyExpectEvent("VK_PAGE_UP", {}, element, "select", testid + "key page up to start");
- test_nsIDOMXULSelectControlElement_States(element, testid + "key page up to start", 6, firstitem, 0, "first");
-
- element.removeItemAt(5);
- element.removeItemAt(4);
- }
-
- // 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
- synthesizeMouseExpectEvent(seconditem, 2, 2, {}, element,
- dontSelectDisabled ? "!select" : "select",
- testid + "mouse select disabled");
- test_nsIDOMXULSelectControlElement_States(element, testid + "mouse select disabled", 4,
- dontSelectDisabled ? firstitem: seconditem, dontSelectDisabled ? 0 : 1,
- dontSelectDisabled ? "first" : "second");
-
- if (dontSelectDisabled) {
- // test whether disabling an item won't allow it to be selected
- synthesizeKeyExpectEvent(forwardKey, {}, element, "select", testid + "key down disabled");
- test_nsIDOMXULSelectControlElement_States(element, testid + "key down disabled", 4, thirditem, 2, "third");
-
- synthesizeKeyExpectEvent(backKey, {}, element, "select", testid + "key up disabled");
- test_nsIDOMXULSelectControlElement_States(element, testid + "key up disabled", 4, firstitem, 0, "first");
-
- element.selectedIndex = 2;
- firstitem.disabled = true;
-
- synthesizeKeyExpectEvent(backKey, {}, keyWrap ? element : null, "select", testid + "key up disabled 2");
- expectedItem = keyWrap ? fourthitem : thirditem;
- expectedIndex = keyWrap ? 3 : 2;
- expectedValue = keyWrap ? "fourth" : "third";
- test_nsIDOMXULSelectControlElement_States(element, testid + "key up disabled 2", 4,
- expectedItem, expectedIndex, expectedValue);
- }
- else {
- // in this case, disabled items should behave the same as non-disabled items.
- element.selectedIndex = 0;
- synthesizeKeyExpectEvent(forwardKey, {}, element, "select", testid + "key down disabled");
- test_nsIDOMXULSelectControlElement_States(element, testid + "key down disabled", 4, seconditem, 1, "second");
- synthesizeKeyExpectEvent(forwardKey, {}, element, "select", testid + "key down disabled again");
- test_nsIDOMXULSelectControlElement_States(element, testid + "key down disabled again", 4, thirditem, 2, "third");
-
- synthesizeKeyExpectEvent(backKey, {}, element, "select", testid + "key up disabled");
- test_nsIDOMXULSelectControlElement_States(element, testid + "key up disabled", 4, seconditem, 1, "second");
- synthesizeKeyExpectEvent(backKey, {}, element, "select", testid + "key up disabled again");
- test_nsIDOMXULSelectControlElement_States(element, testid + "key up disabled again", 4, firstitem, 0, "first");
- }
-}
diff --git a/toolkit/content/tests/fennec-tile-testapp/application.ini b/toolkit/content/tests/fennec-tile-testapp/application.ini
deleted file mode 100644
index 510d481809..0000000000
--- a/toolkit/content/tests/fennec-tile-testapp/application.ini
+++ /dev/null
@@ -1,11 +0,0 @@
-[App]
-Vendor=venderr
-Name=tile
-Version=1.0
-BuildID=20060101
-Copyright=Copyright (c) 2006 Mark Finkle
-ID=xulapp@starkravingfinkle.org
-
-[Gecko]
-MinVersion=1.8
-MaxVersion=2.0
diff --git a/toolkit/content/tests/fennec-tile-testapp/chrome/chrome.manifest b/toolkit/content/tests/fennec-tile-testapp/chrome/chrome.manifest
deleted file mode 100644
index 118354c81a..0000000000
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/chrome.manifest
+++ /dev/null
@@ -1 +0,0 @@
-content tile file:content/
diff --git a/toolkit/content/tests/fennec-tile-testapp/chrome/content/BrowserView.js b/toolkit/content/tests/fennec-tile-testapp/chrome/content/BrowserView.js
deleted file mode 100644
index c498810df3..0000000000
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/content/BrowserView.js
+++ /dev/null
@@ -1,694 +0,0 @@
-// -*- tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2 -*-
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var Ci = Components.interfaces;
-
-// --- REMOVE ---
-var noop = function() {};
-var endl = '\n';
-// --------------
-
-function BrowserView(container, visibleRect) {
- bindAll(this);
- this.init(container, visibleRect);
-}
-
-/**
- * A BrowserView maintains state of the viewport (browser, zoom level,
- * dimensions) and the visible rectangle into the viewport, for every
- * browser it is given (cf setBrowser()). In updates to the viewport state,
- * a BrowserView (using its TileManager) renders parts of the page quasi-
- * intelligently, with guarantees of having rendered and appended all of the
- * visible browser content (aka the "critical rectangle").
- *
- * State is characterized in large part by two rectangles (and an implicit third):
- * - Viewport: Always rooted at the origin, ie with (left, top) at (0, 0). The
- * width and height (right and bottom) of this rectangle are that of the
- * current viewport, which corresponds more or less to the transformed
- * browser content (scaled by zoom level).
- * - Visible: Corresponds to the client's viewing rectangle in viewport
- * coordinates. Has (top, left) corresponding to position, and width & height
- * corresponding to the clients viewing dimensions. Take note that the top
- * and left of the visible rect are per-browser state, but that the width
- * and height persist across setBrowser() calls. This is best explained by
- * a simple example: user views browser A, pans to position (x0, y0), switches
- * to browser B, where she finds herself at position (x1, y1), tilts her
- * device so that visible rectangle's width and height change, and switches
- * back to browser A. She expects to come back to position (x0, y0), but her
- * device remains tilted.
- * - Critical (the implicit one): The critical rectangle is the (possibly null)
- * intersection of the visible and viewport rectangles. That is, it is that
- * region of the viewport which is visible to the user. We care about this
- * because it tells us which region must be rendered as soon as it is dirtied.
- * The critical rectangle is mostly state that we do not keep in BrowserView
- * but that our TileManager maintains.
- *
- * Example rectangle state configurations:
- *
- *
- * +-------------------------------+
- * |A |
- * | |
- * | |
- * | |
- * | +----------------+ |
- * | |B,C | |
- * | | | |
- * | | | |
- * | | | |
- * | +----------------+ |
- * | |
- * | |
- * | |
- * | |
- * | |
- * +-------------------------------+
- *
- *
- * A = viewport ; at (0, 0)
- * B = visible ; at (x, y) where x > 0, y > 0
- * C = critical ; at (x, y)
- *
- *
- *
- * +-------------------------------+
- * |A |
- * | |
- * | |
- * | |
- * +----+-----------+ |
- * |B .C | |
- * | . | |
- * | . | |
- * | . | |
- * +----+-----------+ |
- * | |
- * | |
- * | |
- * | |
- * | |
- * +-------------------------------+
- *
- *
- * A = viewport ; at (0, 0)
- * B = visible ; at (x, y) where x < 0, y > 0
- * C = critical ; at (0, y)
- *
- *
- * Maintaining per-browser state is a little bit of a hack involving attaching
- * an object as the obfuscated dynamic JS property of the browser object, that
- * hopefully no one but us will touch. See getViewportStateFromBrowser() for
- * the property name.
- */
-BrowserView.prototype = (
-function() {
-
- // -----------------------------------------------------------
- // Privates
- //
-
- const kZoomLevelMin = 0.2;
- const kZoomLevelMax = 4.0;
- const kZoomLevelPrecision = 10000;
-
- function visibleRectToCriticalRect(visibleRect, browserViewportState) {
- return visibleRect.intersect(browserViewportState.viewportRect);
- }
-
- function clampZoomLevel(zl) {
- let bounded = Math.min(Math.max(kZoomLevelMin, zl), kZoomLevelMax);
- return Math.round(bounded * kZoomLevelPrecision) / kZoomLevelPrecision;
- }
-
- function pageZoomLevel(visibleRect, browserW, browserH) {
- return clampZoomLevel(visibleRect.width / browserW);
- }
-
- function seenBrowser(browser) {
- return !!(browser.__BrowserView__vps);
- }
-
- function initBrowserState(browser, visibleRect) {
- let [browserW, browserH] = getBrowserDimensions(browser);
-
- let zoomLevel = pageZoomLevel(visibleRect, browserW, browserH);
- let viewportRect = (new wsRect(0, 0, browserW, browserH)).scale(zoomLevel, zoomLevel);
-
- dump('--- initing browser to ---' + endl);
- browser.__BrowserView__vps = new BrowserView.BrowserViewportState(viewportRect,
- visibleRect.x,
- visibleRect.y,
- zoomLevel);
- dump(browser.__BrowserView__vps.toString() + endl);
- dump('--------------------------' + endl);
- }
-
- function getViewportStateFromBrowser(browser) {
- return browser.__BrowserView__vps;
- }
-
- function getBrowserDimensions(browser) {
- return [browser.scrollWidth, browser.scrollHeight];
- }
-
- function getContentScrollValues(browser) {
- let cwu = getBrowserDOMWindowUtils(browser);
- let scrollX = {};
- let scrollY = {};
- cwu.getScrollXY(false, scrollX, scrollY);
-
- return [scrollX.value, scrollY.value];
- }
-
- function getBrowserDOMWindowUtils(browser) {
- return browser.contentWindow
- .QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindowUtils);
- }
-
- function getNewBatchOperationState() {
- return {
- viewportSizeChanged: false,
- dirtyAll: false
- };
- }
-
- function clampViewportWH(width, height, visibleRect) {
- let minW = visibleRect.width;
- let minH = visibleRect.height;
- return [Math.max(width, minW), Math.max(height, minH)];
- }
-
- function initContainer(container, visibleRect) {
- container.style.width = visibleRect.width + 'px';
- container.style.height = visibleRect.height + 'px';
- container.style.overflow = '-moz-hidden-unscrollable';
- }
-
- function resizeContainerToViewport(container, viewportRect) {
- container.style.width = viewportRect.width + 'px';
- container.style.height = viewportRect.height + 'px';
- }
-
- // !!! --- RESIZE HACK BEGIN -----
- function simulateMozAfterSizeChange(browser, width, height) {
- let ev = document.createElement("MouseEvents");
- ev.initEvent("FakeMozAfterSizeChange", false, false, window, 0, width, height);
- browser.dispatchEvent(ev);
- }
- // !!! --- RESIZE HACK END -------
-
- // --- Change of coordinates functions --- //
-
-
- // The following returned object becomes BrowserView.prototype
- return {
-
- // -----------------------------------------------------------
- // Public instance methods
- //
-
- init: function init(container, visibleRect) {
- this._batchOps = [];
- this._container = container;
- this._browserViewportState = null;
- this._renderMode = 0;
- this._tileManager = new TileManager(this._appendTile, this._removeTile, this);
- this.setVisibleRect(visibleRect);
-
- // !!! --- RESIZE HACK BEGIN -----
- // remove this eventually
- this._resizeHack = {
- maxSeenW: 0,
- maxSeenH: 0
- };
- // !!! --- RESIZE HACK END -------
- },
-
- setVisibleRect: function setVisibleRect(r) {
- let bvs = this._browserViewportState;
- let vr = this._visibleRect;
-
- if (!vr)
- this._visibleRect = vr = r.clone();
- else
- vr.copyFrom(r);
-
- if (bvs) {
- bvs.visibleX = vr.left;
- bvs.visibleY = vr.top;
-
- // reclamp minimally to the new visible rect
- // this.setViewportDimensions(bvs.viewportRect.right, bvs.viewportRect.bottom);
- } else
- this._viewportChanged(false, false);
- },
-
- getVisibleRect: function getVisibleRect() {
- return this._visibleRect.clone();
- },
-
- getVisibleRectX: function getVisibleRectX() { return this._visibleRect.x; },
- getVisibleRectY: function getVisibleRectY() { return this._visibleRect.y; },
- getVisibleRectWidth: function getVisibleRectWidth() { return this._visibleRect.width; },
- getVisibleRectHeight: function getVisibleRectHeight() { return this._visibleRect.height; },
-
- setViewportDimensions: function setViewportDimensions(width, height, causedByZoom) {
- let bvs = this._browserViewportState;
- let vis = this._visibleRect;
-
- if (!bvs)
- return;
-
- // [width, height] = clampViewportWH(width, height, vis);
- bvs.viewportRect.right = width;
- bvs.viewportRect.bottom = height;
-
- // XXX we might not want the user's page to disappear from under them
- // at this point, which could happen if the container gets resized such
- // that visible rect becomes entirely outside of viewport rect. might
- // be wise to define what UX should be in this case, like a move occurs.
- // then again, we could also argue this is the responsibility of the
- // caller who would do such a thing...
-
- this._viewportChanged(true, !!causedByZoom);
- },
-
- setZoomLevel: function setZoomLevel(zl) {
- let bvs = this._browserViewportState;
-
- if (!bvs)
- return;
-
- let newZL = clampZoomLevel(zl);
-
- if (newZL != bvs.zoomLevel) {
- let browserW = this.viewportToBrowser(bvs.viewportRect.right);
- let browserH = this.viewportToBrowser(bvs.viewportRect.bottom);
- bvs.zoomLevel = newZL; // side-effect: now scale factor in transformations is newZL
- this.setViewportDimensions(this.browserToViewport(browserW),
- this.browserToViewport(browserH));
- }
- },
-
- getZoomLevel: function getZoomLevel() {
- let bvs = this._browserViewportState;
- if (!bvs)
- return undefined;
-
- return bvs.zoomLevel;
- },
-
- beginBatchOperation: function beginBatchOperation() {
- this._batchOps.push(getNewBatchOperationState());
- this.pauseRendering();
- },
-
- commitBatchOperation: function commitBatchOperation() {
- let bops = this._batchOps;
-
- if (bops.length == 0)
- return;
-
- let opState = bops.pop();
- this._viewportChanged(opState.viewportSizeChanged, opState.dirtyAll);
- this.resumeRendering();
- },
-
- discardBatchOperation: function discardBatchOperation() {
- let bops = this._batchOps;
- bops.pop();
- this.resumeRendering();
- },
-
- discardAllBatchOperations: function discardAllBatchOperations() {
- let bops = this._batchOps;
- while (bops.length > 0)
- this.discardBatchOperation();
- },
-
- moveVisibleBy: function moveVisibleBy(dx, dy) {
- let vr = this._visibleRect;
- let vs = this._browserViewportState;
-
- this.onBeforeVisibleMove(dx, dy);
- this.onAfterVisibleMove(dx, dy);
- },
-
- moveVisibleTo: function moveVisibleTo(x, y) {
- let visibleRect = this._visibleRect;
- let dx = x - visibleRect.x;
- let dy = y - visibleRect.y;
- this.moveBy(dx, dy);
- },
-
- /**
- * Calls to this function need to be one-to-one with calls to
- * resumeRendering()
- */
- pauseRendering: function pauseRendering() {
- this._renderMode++;
- },
-
- /**
- * Calls to this function need to be one-to-one with calls to
- * pauseRendering()
- */
- resumeRendering: function resumeRendering(renderNow) {
- if (this._renderMode > 0)
- this._renderMode--;
-
- if (renderNow || this._renderMode == 0)
- this._tileManager.criticalRectPaint();
- },
-
- isRendering: function isRendering() {
- return (this._renderMode == 0);
- },
-
- /**
- * @param dx Guess delta to destination x coordinate
- * @param dy Guess delta to destination y coordinate
- */
- onBeforeVisibleMove: function onBeforeVisibleMove(dx, dy) {
- let vs = this._browserViewportState;
- let vr = this._visibleRect;
-
- let destCR = visibleRectToCriticalRect(vr.clone().translate(dx, dy), vs);
-
- this._tileManager.beginCriticalMove(destCR);
- },
-
- /**
- * @param dx Actual delta to destination x coordinate
- * @param dy Actual delta to destination y coordinate
- */
- onAfterVisibleMove: function onAfterVisibleMove(dx, dy) {
- let vs = this._browserViewportState;
- let vr = this._visibleRect;
-
- vr.translate(dx, dy);
- vs.visibleX = vr.left;
- vs.visibleY = vr.top;
-
- let cr = visibleRectToCriticalRect(vr, vs);
-
- this._tileManager.endCriticalMove(cr, this.isRendering());
- },
-
- setBrowser: function setBrowser(browser, skipZoom) {
- let currentBrowser = this._browser;
-
- let browserChanged = (currentBrowser !== browser);
-
- if (currentBrowser) {
- currentBrowser.removeEventListener("MozAfterPaint", this.handleMozAfterPaint, false);
-
- // !!! --- RESIZE HACK BEGIN -----
- // change to the real event type and perhaps refactor the handler function name
- currentBrowser.removeEventListener("FakeMozAfterSizeChange", this.handleMozAfterSizeChange, false);
- // !!! --- RESIZE HACK END -------
-
- this.discardAllBatchOperations();
-
- currentBrowser.setAttribute("type", "content");
- currentBrowser.docShell.isOffScreenBrowser = false;
- }
-
- this._restoreBrowser(browser);
-
- browser.setAttribute("type", "content-primary");
-
- this.beginBatchOperation();
-
- browser.addEventListener("MozAfterPaint", this.handleMozAfterPaint, false);
-
- // !!! --- RESIZE HACK BEGIN -----
- // change to the real event type and perhaps refactor the handler function name
- browser.addEventListener("FakeMozAfterSizeChange", this.handleMozAfterSizeChange, false);
- // !!! --- RESIZE HACK END -------
-
- if (!skipZoom) {
- browser.docShell.isOffScreenBrowser = true;
- this.zoomToPage();
- }
-
- this._viewportChanged(browserChanged, browserChanged);
-
- this.commitBatchOperation();
- },
-
- handleMozAfterPaint: function handleMozAfterPaint(ev) {
- let browser = this._browser;
- let tm = this._tileManager;
- let vs = this._browserViewportState;
-
- let [scrollX, scrollY] = getContentScrollValues(browser);
- let clientRects = ev.clientRects;
-
- // !!! --- RESIZE HACK BEGIN -----
- // remove this, cf explanation in loop below
- let hack = this._resizeHack;
- let hackSizeChanged = false;
- // !!! --- RESIZE HACK END -------
-
- let rects = [];
- // loop backwards to avoid xpconnect penalty for .length
- for (let i = clientRects.length - 1; i >= 0; --i) {
- let e = clientRects.item(i);
- let r = new wsRect(e.left + scrollX,
- e.top + scrollY,
- e.width, e.height);
-
- this.browserToViewportRect(r);
- r.round();
-
- if (r.right < 0 || r.bottom < 0)
- continue;
-
- // !!! --- RESIZE HACK BEGIN -----
- // remove this. this is where we make 'lazy' calculations
- // that hint at a browser size change and fake the size change
- // event dispach
- if (r.right > hack.maxW) {
- hack.maxW = rect.right;
- hackSizeChanged = true;
- }
- if (r.bottom > hack.maxH) {
- hack.maxH = rect.bottom;
- hackSizeChanged = true;
- }
- // !!! --- RESIZE HACK END -------
-
- r.restrictTo(vs.viewportRect);
- rects.push(r);
- }
-
- // !!! --- RESIZE HACK BEGIN -----
- // remove this, cf explanation in loop above
- if (hackSizeChanged)
- simulateMozAfterSizeChange(browser, hack.maxW, hack.maxH);
- // !!! --- RESIZE HACK END -------
-
- tm.dirtyRects(rects, this.isRendering());
- },
-
- handleMozAfterSizeChange: function handleMozAfterPaint(ev) {
- // !!! --- RESIZE HACK BEGIN -----
- // get the correct properties off of the event, these are wrong because
- // we're using a MouseEvent since it has an X and Y prop of some sort and
- // we piggyback on that.
- let w = ev.screenX;
- let h = ev.screenY;
- // !!! --- RESIZE HACK END -------
-
- this.setViewportDimensions(w, h);
- },
-
- zoomToPage: function zoomToPage() {
- let browser = this._browser;
-
- if (!browser)
- return;
-
- let [w, h] = getBrowserDimensions(browser);
- this.setZoomLevel(pageZoomLevel(this._visibleRect, w, h));
- },
-
- zoom: function zoom(aDirection) {
- if (aDirection == 0)
- return;
-
- var zoomDelta = 0.05; // 1/20
- if (aDirection >= 0)
- zoomDelta *= -1;
-
- this.zoomLevel = this._zoomLevel + zoomDelta;
- },
-
- viewportToBrowser: function viewportToBrowser(x) {
- let bvs = this._browserViewportState;
-
- if (!bvs)
- throw "No browser is set";
-
- return x / bvs.zoomLevel;
- },
-
- browserToViewport: function browserToViewport(x) {
- let bvs = this._browserViewportState;
-
- if (!bvs)
- throw "No browser is set";
-
- return x * bvs.zoomLevel;
- },
-
- viewportToBrowserRect: function viewportToBrowserRect(rect) {
- let f = this.viewportToBrowser(1.0);
- return rect.scale(f, f);
- },
-
- browserToViewportRect: function browserToViewportRect(rect) {
- let f = this.browserToViewport(1.0);
- return rect.scale(f, f);
- },
-
- browserToViewportCanvasContext: function browserToViewportCanvasContext(ctx) {
- let f = this.browserToViewport(1.0);
- ctx.scale(f, f);
- },
-
-
- // -----------------------------------------------------------
- // Private instance methods
- //
-
- _restoreBrowser: function _restoreBrowser(browser) {
- let vr = this._visibleRect;
-
- if (!seenBrowser(browser))
- initBrowserState(browser, vr);
-
- let bvs = getViewportStateFromBrowser(browser);
-
- this._contentWindow = browser.contentWindow;
- this._browser = browser;
- this._browserViewportState = bvs;
- vr.left = bvs.visibleX;
- vr.top = bvs.visibleY;
- this._tileManager.setBrowser(browser);
- },
-
- _viewportChanged: function _viewportChanged(viewportSizeChanged, dirtyAll) {
- let bops = this._batchOps;
-
- if (bops.length > 0) {
- let opState = bops[bops.length - 1];
-
- if (viewportSizeChanged)
- opState.viewportSizeChanged = viewportSizeChanged;
-
- if (dirtyAll)
- opState.dirtyAll = dirtyAll;
-
- return;
- }
-
- let bvs = this._browserViewportState;
- let vis = this._visibleRect;
-
- // !!! --- RESIZE HACK BEGIN -----
- // We want to uncomment this for perf, but we can't with the hack in place
- // because the mozAfterPaint gives us rects that we use to create the
- // fake mozAfterResize event, so we can't just clear things.
- /*
- if (dirtyAll) {
- // We're about to mark the entire viewport dirty, so we can clear any
- // queued afterPaint events that will cause redundant draws
- getBrowserDOMWindowUtils(this._browser).clearMozAfterPaintEvents();
- }
- */
- // !!! --- RESIZE HACK END -------
-
- if (bvs) {
- resizeContainerToViewport(this._container, bvs.viewportRect);
-
- this._tileManager.viewportChangeHandler(bvs.viewportRect,
- visibleRectToCriticalRect(vis, bvs),
- viewportSizeChanged,
- dirtyAll);
- }
- },
-
- _appendTile: function _appendTile(tile) {
- let canvas = tile.getContentImage();
-
- /*
- canvas.style.position = "absolute";
- canvas.style.left = tile.x + "px";
- canvas.style.top = tile.y + "px";
- */
-
- canvas.setAttribute("style", "position: absolute; left: " + tile.boundRect.left + "px; " + "top: " + tile.boundRect.top + "px;");
-
- this._container.appendChild(canvas);
-
- // dump('++ ' + tile.toString(true) + endl);
- },
-
- _removeTile: function _removeTile(tile) {
- let canvas = tile.getContentImage();
-
- this._container.removeChild(canvas);
-
- // dump('-- ' + tile.toString(true) + endl);
- }
-
- };
-
-}
-)();
-
-
-// -----------------------------------------------------------
-// Helper structures
-//
-
-BrowserView.BrowserViewportState = function(viewportRect,
- visibleX,
- visibleY,
- zoomLevel) {
-
- this.init(viewportRect, visibleX, visibleY, zoomLevel);
-};
-
-BrowserView.BrowserViewportState.prototype = {
-
- init: function init(viewportRect, visibleX, visibleY, zoomLevel) {
- this.viewportRect = viewportRect;
- this.visibleX = visibleX;
- this.visibleY = visibleY;
- this.zoomLevel = zoomLevel;
- },
-
- clone: function clone() {
- return new BrowserView.BrowserViewportState(this.viewportRect,
- this.visibleX,
- this.visibleY,
- this.zoomLevel);
- },
-
- toString: function toString() {
- let props = ['\tviewportRect=' + this.viewportRect.toString(),
- '\tvisibleX=' + this.visibleX,
- '\tvisibleY=' + this.visibleY,
- '\tzoomLevel=' + this.zoomLevel];
-
- return '[BrowserViewportState] {\n' + props.join(',\n') + '\n}';
- }
-
-};
-
diff --git a/toolkit/content/tests/fennec-tile-testapp/chrome/content/FooScript.js b/toolkit/content/tests/fennec-tile-testapp/chrome/content/FooScript.js
deleted file mode 100644
index 49cbbed664..0000000000
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/content/FooScript.js
+++ /dev/null
@@ -1,352 +0,0 @@
-var noop = function() {};
-Browser = {
- updateViewportSize: noop
- /** ***********************************************************
- function
- let browser = document.getElementById("googlenews");
- let cdoc = browser.contentDocument;
-
- // These might not exist yet depending on page load state
- var body = cdoc.body || {};
- var html = cdoc.documentElement || {};
-
- var w = Math.max(body.scrollWidth || 0, html.scrollWidth);
- var h = Math.max(body.scrollHeight || 0, html.scrollHeight);
-
- window.tileManager.viewportHandler(new wsRect(0, 0, w, h),
- window.innerWidth,
- new wsRect(0, 0, window.innerWidth, window.innerHeight),
- false);
- *************************************************************/
-};
-var ws = {
- beginUpdateBatch: noop,
- panTo: noop,
- endUpdateBatch: noop
-};
-var Ci = Components.interfaces;
-var bv = null;
-var endl = "\n";
-
-
-function BrowserView() {
- this.init();
- bindAll(this);
-}
-
-BrowserView.prototype = {
-
- // --- PROPERTIES ---
- // public:
- // init()
- // getViewportInnerBoundsRect(dx, dy)
- // tileManager
- // scrollbox
- //
- // private:
- // _scrollbox
- // _leftbar
- // _rightbar
- // _topbar
- // _browser
- // _tileManager
- // _viewportRect
- // _viewportInnerBoundsRect
- //
-
- get tileManager() { return this._tileManager; },
- get scrollbox() { return this._scrollbox; },
-
- init: function init() {
- let scrollbox = document.getElementById("scrollbox").boxObject;
- this._scrollbox = scrollbox;
-
- let leftbar = document.getElementById("left_sidebar");
- let rightbar = document.getElementById("right_sidebar");
- let topbar = document.getElementById("top_urlbar");
- this._leftbar = leftbar;
- this._rightbar = rightbar;
- this._topbar = topbar;
-
- scrollbox.scrollTo(Math.round(leftbar.getBoundingClientRect().right), 0);
-
- let tileContainer = document.getElementById("tile_container");
- tileContainer.addEventListener("mousedown", onMouseDown, true);
- tileContainer.addEventListener("mouseup", onMouseUp, true);
- tileContainer.addEventListener("mousemove", onMouseMove, true);
- this._tileContainer = tileContainer;
-
- let tileManager = new TileManager(this.appendTile, this.removeTile, window.innerWidth);
- this._tileManager = tileManager;
-
- let browser = document.getElementById("googlenews");
- this.setCurrentBrowser(browser, false); // sets this._browser
-
- let cdoc = browser.contentDocument;
-
- // These might not exist yet depending on page load state
- let body = cdoc.body || {};
- let html = cdoc.documentElement || {};
-
- let w = Math.max(body.scrollWidth || 0, html.scrollWidth);
- let h = Math.max(body.scrollHeight || 0, html.scrollHeight);
-
- let viewportRect = new wsRect(0, 0, w, h);
- this._viewportRect = viewportRect;
-
- let viewportInnerBoundsRect = this.getViewportInnerBoundsRect();
- this._viewportInnerBoundsRect = viewportInnerBoundsRect;
-
- tileManager.viewportHandler(viewportRect,
- window.innerWidth,
- viewportInnerBoundsRect,
- true);
- },
-
- resizeTileContainer: function resizeTileContainer() {
-
- },
-
- scrollboxToViewportRect: function scrollboxToViewportRect(rect, clip) {
- let leftbar = this._leftbar.getBoundingClientRect();
- let rightbar = this._rightbar.getBoundingClientRect();
- let topbar = this._topbar.getBoundingClientRect();
-
- let xtrans = -leftbar.width;
- let ytrans = -topbar.height;
- let x = rect.x + xtrans;
- let y = rect.y + ytrans;
-
- // XXX we're cheating --- this is not really a clip, but its the only
- // way this function is used
- rect.x = (clip) ? Math.max(x, 0) : x;
- rect.y = (clip) ? Math.max(y, 0) : y;
-
- return rect;
- },
-
- getScrollboxPosition: function getScrollboxPosition() {
- return [this._scrollbox.positionX, this._scrollbox.positionY];
- },
-
- getViewportInnerBoundsRect: function getViewportInnerBoundsRect(dx, dy) {
- if (!dx) dx = 0;
- if (!dy) dy = 0;
-
- let w = window.innerWidth;
- let h = window.innerHeight;
-
- let leftbar = this._leftbar.getBoundingClientRect();
- let rightbar = this._rightbar.getBoundingClientRect();
- let topbar = this._topbar.getBoundingClientRect();
-
- let leftinner = Math.max(leftbar.right - dx, 0);
- let rightinner = Math.min(rightbar.left - dx, w);
- let topinner = Math.max(topbar.bottom - dy, 0);
-
- let [x, y] = this.getScrollboxPosition();
-
- return this.scrollboxToViewportRect(new wsRect(x + dx, y + dy, rightinner - leftinner, h - topinner),
- true);
- },
-
- appendTile: function appendTile(tile) {
- let canvas = tile.contentImage;
-
- canvas.style.position = "absolute";
- canvas.style.left = tile.x + "px";
- canvas.style.top = tile.y + "px";
-
- let tileContainer = document.getElementById("tile_container");
- tileContainer.appendChild(canvas);
-
- dump('++ ' + tile.toString() + endl);
- },
-
- removeTile: function removeTile(tile) {
- let canvas = tile.contentImage;
-
- let tileContainer = document.getElementById("tile_container");
- tileContainer.removeChild(canvas);
-
- dump('-- ' + tile.toString() + endl);
- },
-
- scrollBy: function scrollBy(dx, dy) {
- // TODO
- this.onBeforeScroll();
- this.onAfterScroll();
- },
-
- // x: current x
- // y: current y
- // dx: delta to get to x from current x
- // dy: delta to get to y from current y
- onBeforeScroll: function onBeforeScroll(x, y, dx, dy) {
- this.tileManager.onBeforeScroll(this.getViewportInnerBoundsRect(dx, dy));
-
- // shouldn't update margin if it doesn't need to be changed
- let sidebars = document.getElementsByClassName("sidebar");
- for (let i = 0; i < sidebars.length; i++) {
- let sidebar = sidebars[i];
- sidebar.style.margin = (y + dy) + "px 0px 0px 0px";
- }
-
- let urlbar = document.getElementById("top_urlbar");
- urlbar.style.margin = "0px 0px 0px " + (x + dx) + "px";
- },
-
- onAfterScroll: function onAfterScroll(x, y, dx, dy) {
- this.tileManager.onAfterScroll(this.getViewportInnerBoundsRect());
- },
-
- setCurrentBrowser: function setCurrentBrowser(browser, skipZoom) {
- let currentBrowser = this._browser;
- if (currentBrowser) {
- // backup state
- currentBrowser.mZoomLevel = this.zoomLevel;
- currentBrowser.mPanX = ws._viewingRect.x;
- currentBrowser.mPanY = ws._viewingRect.y;
-
- // stop monitor paint events for this browser
- currentBrowser.removeEventListener("MozAfterPaint", this.handleMozAfterPaint, false);
- currentBrowser.setAttribute("type", "content");
- currentBrowser.docShell.isOffScreenBrowser = false;
- }
-
- browser.setAttribute("type", "content-primary");
- if (!skipZoom)
- browser.docShell.isOffScreenBrowser = true;
-
- // start monitoring paint events for this browser
- browser.addEventListener("MozAfterPaint", this.handleMozAfterPaint, false);
-
- this._browser = browser;
-
- // endLoading(and startLoading in most cases) calls zoom anyway
- if (!skipZoom) {
- this.zoomToPage();
- }
-
- if ("mZoomLevel" in browser) {
- // restore last state
- ws.beginUpdateBatch();
- ws.panTo(browser.mPanX, browser.mPanY);
- this.zoomLevel = browser.mZoomLevel;
- ws.endUpdateBatch(true);
-
- // drop the cache
- delete browser.mZoomLevel;
- delete browser.mPanX;
- delete browser.mPanY;
- }
-
- this.tileManager.browser = browser;
- },
-
- handleMozAfterPaint: function handleMozAfterPaint(ev) {
- this.tileManager.handleMozAfterPaint(ev);
- },
-
- zoomToPage: function zoomToPage() {
- /** ******************************************************
- let needToPanToTop = this._needToPanToTop;
- // Ensure pages are panned at the top before zooming/painting
- // combine the initial pan + zoom into a transaction
- if (needToPanToTop) {
- ws.beginUpdateBatch();
- this._needToPanToTop = false;
- ws.panTo(0, -BrowserUI.toolbarH);
- }
- // Adjust the zoomLevel to fit the page contents in our window width
- let [contentW, ] = this._contentAreaDimensions;
- let fakeW = this._fakeWidth;
-
- if (contentW > fakeW)
- this.zoomLevel = fakeW / contentW;
-
- if (needToPanToTop)
- ws.endUpdateBatch();
- ********************************************************/
- }
-
-};
-
-
-function onResize(e) {
- let browser = document.getElementById("googlenews");
- let cdoc = browser.contentDocument;
-
- // These might not exist yet depending on page load state
- var body = cdoc.body || {};
- var html = cdoc.documentElement || {};
-
- var w = Math.max(body.scrollWidth || 0, html.scrollWidth);
- var h = Math.max(body.scrollHeight || 0, html.scrollHeight);
-
- if (bv)
- bv.tileManager.viewportHandler(new wsRect(0, 0, w, h),
- window.innerWidth,
- bv.getViewportInnerBoundsRect(),
- true);
-}
-
-function onMouseDown(e) {
- window._isDragging = true;
- window._dragStart = {x: e.clientX, y: e.clientY};
-
- bv.tileManager.startPanning();
-}
-
-function onMouseUp() {
- window._isDragging = false;
-
- bv.tileManager.endPanning();
-}
-
-function onMouseMove(e) {
- if (window._isDragging) {
- let scrollbox = bv.scrollbox;
-
- let x = scrollbox.positionX;
- let y = scrollbox.positionY;
- let w = scrollbox.scrolledWidth;
- let h = scrollbox.scrolledHeight;
-
- let dx = window._dragStart.x - e.clientX;
- let dy = window._dragStart.y - e.clientY;
-
- // XXX if max(x, 0) > scrollwidth we shouldn't do anything (same for y/height)
- let newX = Math.max(x + dx, 0);
- let newY = Math.max(y + dy, 0);
-
- if (newX < w || newY < h) {
- // clip dx and dy to prevent us from going below 0
- dx = Math.max(dx, -x);
- dy = Math.max(dy, -y);
-
- bv.onBeforeScroll(x, y, dx, dy);
-
- /* dump("==========scroll==========" + endl);
- dump("delta: " + dx + "," + dy + endl);
- let xx = {};
- let yy = {};
- scrollbox.getPosition(xx, yy);
- dump(xx.value + "," + yy.value + endl);*/
-
- scrollbox.scrollBy(dx, dy);
-
- /* scrollbox.getPosition(xx, yy);
- dump(xx.value + "," + yy.value + endl);
- dump("==========================" + endl);*/
-
- bv.onAfterScroll();
- }
- }
-
- window._dragStart = {x: e.clientX, y: e.clientY};
-}
-
-function onLoad() {
- bv = new BrowserView();
-}
diff --git a/toolkit/content/tests/fennec-tile-testapp/chrome/content/TileManager.js b/toolkit/content/tests/fennec-tile-testapp/chrome/content/TileManager.js
deleted file mode 100644
index 52beb6e364..0000000000
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/content/TileManager.js
+++ /dev/null
@@ -1,1018 +0,0 @@
-// -*- tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2 -*-
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-const kXHTMLNamespaceURI = "http://www.w3.org/1999/xhtml";
-
-// base-2 exponent for width, height of a single tile.
-const kTileExponentWidth = 7;
-const kTileExponentHeight = 7;
-const kTileWidth = Math.pow(2, kTileExponentWidth); // 2^7 = 128
-const kTileHeight = Math.pow(2, kTileExponentHeight); // 2^7 = 128
-const kLazyRoundTimeCap = 500; // millis
-
-
-function bind(f, thisObj) {
- return function() {
- return f.apply(thisObj, arguments);
- };
-}
-
-function bindSome(instance, methodNames) {
- for (let methodName of methodNames)
- if (methodName in instance)
- instance[methodName] = bind(instance[methodName], instance);
-}
-
-function bindAll(instance) {
- for (let key in instance)
- if (instance[key] instanceof Function)
- instance[key] = bind(instance[key], instance);
-}
-
-
-/**
- * The Tile Manager!
- *
- * @param appendTile The function the tile manager should call in order to
- * "display" a tile (e.g. append it to the DOM). The argument to this
- * function is a TileManager.Tile object.
- * @param removeTile The function the tile manager should call in order to
- * "undisplay" a tile (e.g. remove it from the DOM). The argument to this
- * function is a TileManager.Tile object.
- * @param fakeWidth The width of the widest possible visible rectangle, e.g.
- * the width of the screen. This is used in setting the zoomLevel.
- */
-function TileManager(appendTile, removeTile, browserView) {
- // backref to the BrowserView object that owns us
- this._browserView = browserView;
-
- // callbacks to append / remove a tile to / from the parent
- this._appendTile = appendTile;
- this._removeTile = removeTile;
-
- // tile cache holds tile objects and pools them under a given capacity
- let self = this;
- this._tileCache = new TileManager.TileCache(function(tile) { self._removeTileSafe(tile); },
- -1, -1, 110);
-
- // Rectangle within the viewport that is visible to the user. It is "critical"
- // in the sense that it must be rendered as soon as it becomes dirty
- this._criticalRect = null;
-
- // Current <browser> DOM element, holding the content we wish to render.
- // This is null when no browser is attached
- this._browser = null;
-
- // if we have an outstanding paint timeout, its value is stored here
- // for cancelling when we end page loads
- // this._drawTimeout = 0;
- this._pageLoadResizerTimeout = 0;
-
- // timeout of the non-visible-tiles-crawler to cache renders from the browser
- this._idleTileCrawlerTimeout = 0;
-
- // object that keeps state on our current lazyload crawl
- this._crawler = null;
-
- // the max right coordinate we've seen from paint events
- // while we were loading a page. If we see something that's bigger than
- // our width, we'll trigger a page zoom.
- this._pageLoadMaxRight = 0;
- this._pageLoadMaxBottom = 0;
-
- // Tells us to pan to top before first draw
- this._needToPanToTop = false;
-}
-
-TileManager.prototype = {
-
- setBrowser: function setBrowser(b) { this._browser = b; },
-
- // This is the callback fired by our client whenever the viewport
- // changed somehow (or didn't change but someone asked it to update).
- viewportChangeHandler: function viewportChangeHandler(viewportRect,
- criticalRect,
- boundsSizeChanged,
- dirtyAll) {
- // !!! --- DEBUG BEGIN -----
- dump("***vphandler***\n");
- dump(viewportRect.toString() + "\n");
- dump(criticalRect.toString() + "\n");
- dump(boundsSizeChanged + "\n");
- dump(dirtyAll + "\n***************\n");
- // !!! --- DEBUG END -------
-
- let tc = this._tileCache;
-
- tc.iBound = Math.ceil(viewportRect.right / kTileWidth);
- tc.jBound = Math.ceil(viewportRect.bottom / kTileHeight);
-
- if (!criticalRect || !criticalRect.equals(this._criticalRect)) {
- this.beginCriticalMove(criticalRect);
- this.endCriticalMove(criticalRect, !boundsSizeChanged);
- }
-
- if (boundsSizeChanged) {
- // TODO fastpath if !dirtyAll
- this.dirtyRects([viewportRect.clone()], true);
- }
- },
-
- dirtyRects: function dirtyRects(rects, doCriticalRender) {
- let criticalIsDirty = false;
- let criticalRect = this._criticalRect;
-
- for (let rect of rects) {
- this._tileCache.forEachIntersectingRect(rect, false, this._dirtyTile, this);
-
- if (criticalRect && rect.intersects(criticalRect))
- criticalIsDirty = true;
- }
-
- if (criticalIsDirty && doCriticalRender)
- this.criticalRectPaint();
- },
-
- criticalRectPaint: function criticalRectPaint() {
- let cr = this._criticalRect;
-
- if (cr) {
- let [ctrx, ctry] = cr.centerRounded();
- this.recenterEvictionQueue(ctrx, ctry);
- this._renderAppendHoldRect(cr);
- }
- },
-
- beginCriticalMove2: function beginCriticalMove(destCriticalRect) {
- let start = Date.now();
- function appendNonDirtyTile(tile) {
- if (!tile.isDirty())
- this._appendTileSafe(tile);
- }
-
- if (destCriticalRect)
- this._tileCache.forEachIntersectingRect(destCriticalRect, false, appendNonDirtyTile, this);
- let end = Date.now();
- dump("start: " + (end-start) + "\n")
- },
-
- beginCriticalMove: function beginCriticalMove(destCriticalRect) {
- /*
- function appendNonDirtyTile(tile) {
- if (!tile.isDirty())
- this._appendTileSafe(tile);
- }
- */
-
- let start = Date.now();
-
- if (destCriticalRect) {
-
- let rect = destCriticalRect;
-
- let create = false;
-
- // this._tileCache.forEachIntersectingRect(destCriticalRect, false, appendNonDirtyTile, this);
- let visited = {};
- let evictGuard = null;
- if (create) {
- evictGuard = function evictGuard(tile) {
- return !visited[tile.toString()];
- };
- }
-
- let starti = rect.left >> kTileExponentWidth;
- let endi = rect.right >> kTileExponentWidth;
-
- let startj = rect.top >> kTileExponentHeight;
- let endj = rect.bottom >> kTileExponentHeight;
-
- let tile = null;
- let tc = this._tileCache;
-
- for (var j = startj; j <= endj; ++j) {
- for (var i = starti; i <= endi; ++i) {
-
- // 'this' for getTile needs to be tc
-
- // tile = this.getTile(i, j, create, evictGuard);
- // if (!tc.inBounds(i, j)) {
- if (0 <= i && 0 <= j && i <= tc.iBound && j <= tc.jBound) {
- // return null;
- break;
- }
-
- tile = null;
-
- // if (tc._isOccupied(i, j)) {
- if (tc._tiles[i] && tc._tiles[i][j]) {
- tile = tc._tiles[i][j];
- } else if (create) {
- // NOTE: create is false here
- tile = tc._createTile(i, j, evictionGuard);
- if (tile) tile.markDirty();
- }
-
- if (tile) {
- visited[tile.toString()] = true;
- // fn.call(thisObj, tile);
- // function appendNonDirtyTile(tile) {
- // if (!tile.isDirty())
- if (!tile._dirtyTileCanvas) {
- // this._appendTileSafe(tile);
- if (!tile._appended) {
- let astart = Date.now();
- this._appendTile(tile);
- tile._appended = true;
- let aend = Date.now();
- dump("append: " + (aend - astart) + "\n");
- }
- }
- // }
- }
- }
- }
- }
-
- let end = Date.now();
- dump("start: " + (end-start) + "\n")
- },
-
- endCriticalMove: function endCriticalMove(destCriticalRect, doCriticalPaint) {
- let start = Date.now();
-
- let tc = this._tileCache;
- let cr = this._criticalRect;
-
- let dcr = destCriticalRect.clone();
-
- let f = function releaseOldTile(tile) {
- // release old tile
- if (!tile.boundRect.intersects(dcr))
- tc.releaseTile(tile);
- }
-
- if (cr)
- tc.forEachIntersectingRect(cr, false, f, this);
-
- this._holdRect(destCriticalRect);
-
- if (cr)
- cr.copyFrom(destCriticalRect);
- else
- this._criticalRect = cr = destCriticalRect;
-
- let crpstart = Date.now();
- if (doCriticalPaint)
- this.criticalRectPaint();
- dump(" crp: " + (Date.now() - crpstart) + "\n");
-
- let end = Date.now();
- dump("end: " + (end - start) + "\n");
- },
-
- restartLazyCrawl: function restartLazyCrawl(startRectOrQueue) {
- if (!startRectOrQueue || startRectOrQueue instanceof Array) {
- this._crawler = new TileManager.CrawlIterator(this._tileCache);
-
- if (startRectOrQueue) {
- let len = startRectOrQueue.length;
- for (let k = 0; k < len; ++k)
- this._crawler.enqueue(startRectOrQueue[k].i, startRectOrQueue[k].j);
- }
- } else {
- this._crawler = new TileManager.CrawlIterator(this._tileCache, startRectOrQueue);
- }
-
- if (!this._idleTileCrawlerTimeout)
- this._idleTileCrawlerTimeout = setTimeout(this._idleTileCrawler, 2000, this);
- },
-
- stopLazyCrawl: function stopLazyCrawl() {
- this._idleTileCrawlerTimeout = 0;
- this._crawler = null;
-
- let cr = this._criticalRect;
- if (cr) {
- let [ctrx, ctry] = cr.centerRounded();
- this.recenterEvictionQueue(ctrx, ctry);
- }
- },
-
- recenterEvictionQueue: function recenterEvictionQueue(ctrx, ctry) {
- let ctri = ctrx >> kTileExponentWidth;
- let ctrj = ctry >> kTileExponentHeight;
-
- function evictFarTiles(a, b) {
- let dista = Math.max(Math.abs(a.i - ctri), Math.abs(a.j - ctrj));
- let distb = Math.max(Math.abs(b.i - ctri), Math.abs(b.j - ctrj));
- return dista - distb;
- }
-
- this._tileCache.sortEvictionQueue(evictFarTiles);
- },
-
- _renderTile: function _renderTile(tile) {
- if (tile.isDirty())
- tile.render(this._browser, this._browserView);
- },
-
- _appendTileSafe: function _appendTileSafe(tile) {
- if (!tile._appended) {
- this._appendTile(tile);
- tile._appended = true;
- }
- },
-
- _removeTileSafe: function _removeTileSafe(tile) {
- if (tile._appended) {
- this._removeTile(tile);
- tile._appended = false;
- }
- },
-
- _dirtyTile: function _dirtyTile(tile) {
- if (!this._criticalRect || !tile.boundRect.intersects(this._criticalRect))
- this._removeTileSafe(tile);
-
- tile.markDirty();
-
- if (this._crawler)
- this._crawler.enqueue(tile.i, tile.j);
- },
-
- _holdRect: function _holdRect(rect) {
- this._tileCache.holdTilesIntersectingRect(rect);
- },
-
- _releaseRect: function _releaseRect(rect) {
- this._tileCache.releaseTilesIntersectingRect(rect);
- },
-
- _renderAppendHoldRect: function _renderAppendHoldRect(rect) {
- function renderAppendHoldTile(tile) {
- if (tile.isDirty())
- this._renderTile(tile);
-
- this._appendTileSafe(tile);
- this._tileCache.holdTile(tile);
- }
-
- this._tileCache.forEachIntersectingRect(rect, true, renderAppendHoldTile, this);
- },
-
- _idleTileCrawler: function _idleTileCrawler(self) {
- if (!self) self = this;
- dump('crawl pass.\n');
- let itered = 0, rendered = 0;
-
- let start = Date.now();
- let comeAgain = true;
-
- while ((Date.now() - start) <= kLazyRoundTimeCap) {
- let tile = self._crawler.next();
-
- if (!tile) {
- comeAgain = false;
- break;
- }
-
- if (tile.isDirty()) {
- self._renderTile(tile);
- ++rendered;
- }
- ++itered;
- }
-
- dump('crawl itered:' + itered + ' rendered:' + rendered + '\n');
-
- if (comeAgain) {
- self._idleTileCrawlerTimeout = setTimeout(self._idleTileCrawler, 2000, self);
- } else {
- self.stopLazyCrawl();
- dump('crawl end\n');
- }
- }
-
-};
-
-
-/**
- * The tile cache used by the tile manager to hold and index all
- * tiles. Also responsible for pooling tiles and maintaining the
- * number of tiles under given capacity.
- *
- * @param onBeforeTileDetach callback set by the TileManager to call before
- * we must "detach" a tile from a tileholder due to needing it elsewhere or
- * having to discard it on capacity decrease
- * @param capacity the initial capacity of the tile cache, i.e. the max number
- * of tiles the cache can have allocated
- */
-TileManager.TileCache = function TileCache(onBeforeTileDetach, iBound, jBound, capacity) {
- if (arguments.length <= 3 || capacity < 0)
- capacity = Infinity;
-
- // We track all pooled tiles in a 2D array (row, column) ordered as
- // they "appear on screen". The array is a grid that functions for
- // storage of the tiles and as a lookup map. Each array entry is
- // a reference to the tile occupying that space ("tileholder"). Entries
- // are not unique, so a tile could be referenced by multiple array entries,
- // i.e. a tile could "span" many tile placeholders (e.g. if we merge
- // neighbouring tiles).
- this._tiles = [];
-
- // holds the same tiles that _tiles holds, but as contiguous array
- // elements, for pooling tiles for reuse under finite capacity
- this._tilePool = (capacity == Infinity) ? new Array() : new Array(capacity);
-
- this._capacity = capacity;
- this._nTiles = 0;
- this._numFree = 0;
-
- this._onBeforeTileDetach = onBeforeTileDetach;
-
- this.iBound = iBound;
- this.jBound = jBound;
-};
-
-TileManager.TileCache.prototype = {
-
- get size() { return this._nTiles; },
- get numFree() { return this._numFree; },
-
- // A comparison function that will compare all free tiles as greater
- // than all non-free tiles. Useful because, for instance, to shrink
- // the tile pool when capacity is lowered, we want to remove all tiles
- // at the new cap and beyond, favoring removal of free tiles first.
- evictionCmp: function freeTilesLast(a, b) {
- if (a.free == b.free) return (a.j == b.j) ? b.i - a.i : b.j - a.j;
- return (a.free) ? 1 : -1;
- },
-
- getCapacity: function getCapacity() { return this._capacity; },
-
- setCapacity: function setCapacity(newCap, skipEvictionQueueSort) {
- if (newCap < 0)
- throw "Cannot set a negative tile cache capacity";
-
- if (newCap == Infinity) {
- this._capacity = Infinity;
- return;
- } else if (this._capacity == Infinity) {
- // pretend we had a finite capacity all along and proceed normally
- this._capacity = this._tilePool.length;
- }
-
- let rem = null;
-
- if (newCap < this._capacity) {
- // This case is obnoxious. We're decreasing our capacity which means
- // we may have to get rid of tiles. Depending on our eviction comparator,
- // we probably try to get rid free tiles first, but we might have to throw
- // out some nonfree ones too. Note that "throwing out" means the cache
- // won't keep them, and they'll get GC'ed as soon as all other refholders
- // let go of their refs to the tile.
- if (!skipEvictionQueueSort)
- this.sortEvictionQueue();
-
- rem = this._tilePool.splice(newCap, this._tilePool.length);
-
- } else {
- // This case is win. Extend our tile pool array with new empty space.
- this._tilePool.push.apply(this._tilePool, new Array(newCap - this._capacity));
- }
-
- // update state in the case that we threw things out.
- let nTilesDeleted = this._nTiles - newCap;
- if (nTilesDeleted > 0) {
- let nFreeDeleted = 0;
- for (let k = 0; k < nTilesDeleted; ++k) {
- if (rem[k].free)
- nFreeDeleted++;
-
- this._detachTile(rem[k].i, rem[k].j);
- }
-
- this._nTiles -= nTilesDeleted;
- this._numFree -= nFreeDeleted;
- }
-
- this._capacity = newCap;
- },
-
- _isOccupied: function _isOccupied(i, j) {
- return !!(this._tiles[i] && this._tiles[i][j]);
- },
-
- _detachTile: function _detachTile(i, j) {
- let tile = null;
- if (this._isOccupied(i, j)) {
- tile = this._tiles[i][j];
-
- if (this._onBeforeTileDetach)
- this._onBeforeTileDetach(tile);
-
- this.releaseTile(tile);
- delete this._tiles[i][j];
- }
- return tile;
- },
-
- _reassignTile: function _reassignTile(tile, i, j) {
- this._detachTile(tile.i, tile.j); // detach
- tile.init(i, j); // re-init
- this._tiles[i][j] = tile; // attach
- return tile;
- },
-
- _evictTile: function _evictTile(evictionGuard) {
- let k = this._nTiles - 1;
- let pool = this._tilePool;
- let victim = null;
-
- for (; k >= 0; --k) {
- if (pool[k].free &&
- (!evictionGuard || evictionGuard(pool[k])))
- {
- victim = pool[k];
- break;
- }
- }
-
- return victim;
- },
-
- _createTile: function _createTile(i, j, evictionGuard) {
- if (!this._tiles[i])
- this._tiles[i] = [];
-
- let tile = null;
-
- if (this._nTiles < this._capacity) {
- // either capacity is infinite, or we still have room to allocate more
- tile = new TileManager.Tile(i, j);
- this._tiles[i][j] = tile;
- this._tilePool[this._nTiles++] = tile;
- this._numFree++;
-
- } else {
- // assert: nTiles == capacity
- dump("\nevicting\n");
- tile = this._evictTile(evictionGuard);
- if (tile)
- this._reassignTile(tile, i, j);
- }
-
- return tile;
- },
-
- inBounds: function inBounds(i, j) {
- return 0 <= i && 0 <= j && i <= this.iBound && j <= this.jBound;
- },
-
- sortEvictionQueue: function sortEvictionQueue(cmp) {
- if (!cmp) cmp = this.evictionCmp;
- this._tilePool.sort(cmp);
- },
-
- /**
- * Get a tile by its indices
- *
- * @param i Column
- * @param j Row
- * @param create Flag true if the tile should be created in case there is no
- * tile at (i, j)
- * @param reuseCondition Boolean-valued function to restrict conditions under
- * which an old tile may be reused for creating this one. This can happen if
- * the cache has reached its capacity and must reuse existing tiles in order to
- * create this one. The function is given a Tile object as its argument and
- * returns true if the tile is OK for reuse. This argument has no effect if the
- * create argument is false.
- */
- getTile: function getTile(i, j, create, evictionGuard) {
- if (!this.inBounds(i, j))
- return null;
-
- let tile = null;
-
- if (this._isOccupied(i, j)) {
- tile = this._tiles[i][j];
- } else if (create) {
- tile = this._createTile(i, j, evictionGuard);
- if (tile) tile.markDirty();
- }
-
- return tile;
- },
-
- /**
- * Look up (possibly creating) a tile from its viewport coordinates.
- *
- * @param x
- * @param y
- * @param create Flag true if the tile should be created in case it doesn't
- * already exist at the tileholder corresponding to (x, y)
- */
- tileFromPoint: function tileFromPoint(x, y, create) {
- let i = x >> kTileExponentWidth;
- let j = y >> kTileExponentHeight;
-
- return this.getTile(i, j, create);
- },
-
- /**
- * Hold a tile (i.e. mark it non-free). Returns true if the operation
- * actually did something, false elsewise.
- */
- holdTile: function holdTile(tile) {
- if (tile && tile.free) {
- tile._hold();
- this._numFree--;
- return true;
- }
- return false;
- },
-
- /**
- * Release a tile (i.e. mark it free). Returns true if the operation
- * actually did something, false elsewise.
- */
- releaseTile: function releaseTile(tile) {
- if (tile && !tile.free) {
- tile._release();
- this._numFree++;
- return true;
- }
- return false;
- },
-
- // XXX the following two functions will iterate through duplicate tiles
- // once we begin to merge tiles.
- /**
- * Fetch all tiles that share at least one point with this rect. If `create'
- * is true then any tileless tileholders will have tiles created for them.
- */
- tilesIntersectingRect: function tilesIntersectingRect(rect, create) {
- let dx = (rect.right % kTileWidth) - (rect.left % kTileWidth);
- let dy = (rect.bottom % kTileHeight) - (rect.top % kTileHeight);
- let tiles = [];
-
- for (let y = rect.top; y <= rect.bottom - dy; y += kTileHeight) {
- for (let x = rect.left; x <= rect.right - dx; x += kTileWidth) {
- let tile = this.tileFromPoint(x, y, create);
- if (tile)
- tiles.push(tile);
- }
- }
-
- return tiles;
- },
-
- forEachIntersectingRect: function forEachIntersectingRect(rect, create, fn, thisObj) {
- let visited = {};
- let evictGuard = null;
- if (create) {
- evictGuard = function evictGuard(tile) {
- return !visited[tile.toString()];
- };
- }
-
- let starti = rect.left >> kTileExponentWidth;
- let endi = rect.right >> kTileExponentWidth;
-
- let startj = rect.top >> kTileExponentHeight;
- let endj = rect.bottom >> kTileExponentHeight;
-
- let tile = null;
- for (var j = startj; j <= endj; ++j) {
- for (var i = starti; i <= endi; ++i) {
- tile = this.getTile(i, j, create, evictGuard);
- if (tile) {
- visited[tile.toString()] = true;
- fn.call(thisObj, tile);
- }
- }
- }
- },
-
- holdTilesIntersectingRect: function holdTilesIntersectingRect(rect) {
- this.forEachIntersectingRect(rect, false, this.holdTile, this);
- },
-
- releaseTilesIntersectingRect: function releaseTilesIntersectingRect(rect) {
- this.forEachIntersectingRect(rect, false, this.releaseTile, this);
- }
-
-};
-
-
-
-TileManager.Tile = function Tile(i, j) {
- // canvas element is where we keep paint data from browser for this tile
- this._canvas = document.createElementNS(kXHTMLNamespaceURI, "canvas");
- this._canvas.setAttribute("width", String(kTileWidth));
- this._canvas.setAttribute("height", String(kTileHeight));
- this._canvas.setAttribute("moz-opaque", "true");
- // this._canvas.style.border = "1px solid red";
-
- this.init(i, j); // defines more properties, cf below
-};
-
-TileManager.Tile.prototype = {
-
- // essentially, this is part of constructor code, but since we reuse tiles
- // in the tile cache, this is here so that we can reinitialize tiles when we
- // reuse them
- init: function init(i, j) {
- if (!this.boundRect)
- this.boundRect = new wsRect(i * kTileWidth, j * kTileHeight, kTileWidth, kTileHeight);
- else
- this.boundRect.setRect(i * kTileWidth, j * kTileHeight, kTileWidth, kTileHeight);
-
- // indices!
- this.i = i;
- this.j = j;
-
- // flags true if we need to repaint our own local canvas
- this._dirtyTileCanvas = false;
-
- // keep a dirty rectangle (i.e. only part of the tile is dirty)
- this._dirtyTileCanvasRect = null;
-
- // flag used by TileManager to avoid re-appending tiles that have already
- // been appended
- this._appended = false;
-
- // We keep tile objects around after their use for later reuse, so this
- // flags true for an unused pooled tile. We don't actually care about
- // this from within the Tile prototype, it is here for the cache to use.
- this.free = true;
- },
-
- // viewport coordinates
- get x() { return this.boundRect.left; },
- get y() { return this.boundRect.top; },
-
- // the actual canvas that holds the most recently rendered image of this
- // canvas
- getContentImage: function getContentImage() { return this._canvas; },
-
- isDirty: function isDirty() { return this._dirtyTileCanvas; },
-
- /**
- * Mark this entire tile as dirty (i.e. the whole tile needs to be rendered
- * on next render).
- */
- markDirty: function markDirty() { this.updateDirtyRegion(); },
-
- unmarkDirty: function unmarkDirty() {
- this._dirtyTileCanvasRect = null;
- this._dirtyTileCanvas = false;
- },
-
- /**
- * This will mark dirty at least everything in dirtyRect (which must be
- * specified in canvas coordinates). If dirtyRect is not given then
- * the entire tile is marked dirty.
- */
- updateDirtyRegion: function updateDirtyRegion(dirtyRect) {
- if (!dirtyRect) {
-
- if (!this._dirtyTileCanvasRect)
- this._dirtyTileCanvasRect = this.boundRect.clone();
- else
- this._dirtyTileCanvasRect.copyFrom(this.boundRect);
-
- } else if (!this._dirtyTileCanvasRect) {
- this._dirtyTileCanvasRect = dirtyRect.intersect(this.boundRect);
- } else if (dirtyRect.intersects(this.boundRect)) {
- this._dirtyTileCanvasRect.expandToContain(dirtyRect.intersect(this.boundRect));
- }
-
- // TODO if after the above, the dirty rectangle is large enough,
- // mark the whole tile dirty.
-
- if (this._dirtyTileCanvasRect)
- this._dirtyTileCanvas = true;
- },
-
- /**
- * Actually draw the browser content into the dirty region of this
- * tile. This requires us to actually draw with the
- * nsIDOMCanvasRenderingContext2D object's drawWindow method, which
- * we expect to be a relatively heavy operation.
- *
- * You likely want to check if the tile isDirty() before asking it
- * to render, as this will cause the entire tile to re-render in the
- * case that it is not dirty.
- */
- render: function render(browser, browserView) {
- if (!this.isDirty())
- this.markDirty();
-
- let rect = this._dirtyTileCanvasRect;
-
- let x = rect.left - this.boundRect.left;
- let y = rect.top - this.boundRect.top;
-
- // content process is not being scaled, so don't scale our rect either
- // browserView.viewportToBrowserRect(rect);
- // rect.round(); // snap outward to get whole "pixel" (in browser coords)
-
- let ctx = this._canvas.getContext("2d");
- ctx.save();
-
- browserView.browserToViewportCanvasContext(ctx);
-
- ctx.translate(x, y);
-
- let cw = browserView._contentWindow;
- // let cw = browser.contentWindow;
- ctx.asyncDrawXULElement(browserView._browser,
- rect.left, rect.top,
- rect.right - rect.left, rect.bottom - rect.top,
- "grey",
- (ctx.DRAWWINDOW_DO_NOT_FLUSH | ctx.DRAWWINDOW_DRAW_CARET));
-
- ctx.restore();
-
- this.unmarkDirty();
- },
-
- toString: function toString(more) {
- if (more) {
- return 'Tile(' + [this.i,
- this.j,
- "dirty=" + this.isDirty(),
- "boundRect=" + this.boundRect].join(', ')
- + ')';
- }
-
- return 'Tile(' + this.i + ', ' + this.j + ')';
- },
-
- _hold: function hold() { this.free = false; },
- _release: function release() { this.free = true; }
-
-};
-
-
-/**
- * A CrawlIterator is in charge of creating and returning subsequent tiles "crawled"
- * over as we render tiles lazily. It supports iterator semantics so you can use
- * CrawlIterator objects in for..in loops.
- *
- * Currently the CrawlIterator is built to expand a rectangle iteratively and return
- * subsequent tiles that intersect the boundary of the rectangle. Each expansion of
- * the rectangle is one unit of tile dimensions in each direction. This is repeated
- * until all tiles from elsewhere have been reused (assuming the cache has finite
- * capacity) in this crawl, so that we don't start reusing tiles from the beginning
- * of our crawl. Afterward, the CrawlIterator enters a state where it operates as a
- * FIFO queue, and calls to next() simply dequeue elements, which must be added with
- * enqueue().
- *
- * @param tileCache The TileCache over whose tiles this CrawlIterator will crawl
- * @param startRect [optional] The rectangle that we grow in the first (rectangle
- * expansion) iteration state.
- */
-TileManager.CrawlIterator = function CrawlIterator(tileCache, startRect) {
- this._tileCache = tileCache;
- this._stepRect = startRect;
-
- // used to remember tiles that we've reused during this crawl
- this._visited = {};
-
- // filters the tiles we've already reused once from being considered victims
- // for reuse when we ask the tile cache to create a new tile
- let visited = this._visited;
- this._notVisited = function(tile) { return !visited[tile]; };
-
- // a generator that generates tile indices corresponding to tiles intersecting
- // the boundary of an expanding rectangle
- this._crawlIndices = !startRect ? null : (function indicesGenerator(rect, tc) {
- let outOfBounds = false;
- while (!outOfBounds) {
- // expand rect
- rect.left -= kTileWidth;
- rect.right += kTileWidth;
- rect.top -= kTileHeight;
- rect.bottom += kTileHeight;
-
- let dx = (rect.right % kTileWidth) - (rect.left % kTileWidth);
- let dy = (rect.bottom % kTileHeight) - (rect.top % kTileHeight);
-
- outOfBounds = true;
-
- // top, bottom borders
- for (let y of [rect.top, rect.bottom]) {
- for (let x = rect.left; x <= rect.right - dx; x += kTileWidth) {
- let i = x >> kTileExponentWidth;
- let j = y >> kTileExponentHeight;
- if (tc.inBounds(i, j)) {
- outOfBounds = false;
- yield [i, j];
- }
- }
- }
-
- // left, right borders
- for (let x of [rect.left, rect.right]) {
- for (let y = rect.top; y <= rect.bottom - dy; y += kTileHeight) {
- let i = x >> kTileExponentWidth;
- let j = y >> kTileExponentHeight;
- if (tc.inBounds(i, j)) {
- outOfBounds = false;
- yield [i, j];
- }
- }
- }
- }
- })(this._stepRect, this._tileCache), // instantiate the generator
-
- // after we finish the rectangle iteration state, we enter the FIFO queue state
- this._queueState = !startRect;
- this._queue = [];
-
- // used to prevent tiles from being enqueued twice --- "patience, we'll get to
- // it in a moment"
- this._enqueued = {};
-};
-
-TileManager.CrawlIterator.prototype = {
- __iterator__: function*() {
- while (true) {
- let tile = this.next();
- if (!tile) break;
- yield tile;
- }
- },
-
- becomeQueue: function becomeQueue() {
- this._queueState = true;
- },
-
- unbecomeQueue: function unbecomeQueue() {
- this._queueState = false;
- },
-
- next: function next() {
- if (this._queueState)
- return this.dequeue();
-
- let tile = null;
-
- if (this._crawlIndices) {
- try {
- let [i, j] = this._crawlIndices.next();
- tile = this._tileCache.getTile(i, j, true, this._notVisited);
- } catch (e) {
- if (!(e instanceof StopIteration))
- throw e;
- }
- }
-
- if (tile) {
- this._visited[tile] = true;
- } else {
- this.becomeQueue();
- return this.next();
- }
-
- return tile;
- },
-
- dequeue: function dequeue() {
- let tile = null;
- do {
- let idx = this._queue.shift();
- if (!idx)
- return null;
-
- delete this._enqueued[idx];
- let [i, j] = this._unstrIndices(idx);
- tile = this._tileCache.getTile(i, j, false);
-
- } while (!tile);
-
- return tile;
- },
-
- enqueue: function enqueue(i, j) {
- let idx = this._strIndices(i, j);
- if (!this._enqueued[idx]) {
- this._queue.push(idx);
- this._enqueued[idx] = true;
- }
- },
-
- _strIndices: function _strIndices(i, j) {
- return i + "," + j;
- },
-
- _unstrIndices: function _unstrIndices(str) {
- return str.split(',');
- }
-
-};
diff --git a/toolkit/content/tests/fennec-tile-testapp/chrome/content/WidgetStack.js b/toolkit/content/tests/fennec-tile-testapp/chrome/content/WidgetStack.js
deleted file mode 100644
index 69288e725f..0000000000
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/content/WidgetStack.js
+++ /dev/null
@@ -1,1438 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var gWsDoLog = false;
-var gWsLogDiv = null;
-
-function logbase() {
- if (!gWsDoLog)
- return;
-
- if (gWsLogDiv == null && "console" in window) {
- console.log.apply(console, arguments);
- } else {
- var s = "";
- for (var i = 0; i < arguments.length; i++) {
- s += arguments[i] + " ";
- }
- s += "\n";
- if (gWsLogDiv) {
- gWsLogDiv.appendChild(document.createElementNS("http://www.w3.org/1999/xhtml", "br"));
- gWsLogDiv.appendChild(document.createTextNode(s));
- }
-
- dump(s);
- }
-}
-
-function dumpJSStack(stopAtNamedFunction) {
- let caller = Components.stack.caller;
- dump("\tStack: " + caller.name);
- while ((caller = caller.caller)) {
- dump(" <- " + caller.name);
- if (stopAtNamedFunction && caller.name != "anonymous")
- break;
- }
- dump("\n");
-}
-
-function log() {
- // logbase.apply(window, arguments);
-}
-
-function log2() {
- // logbase.apply(window, arguments);
-}
-
-var reportError = log;
-
-/*
- * wsBorder class
- *
- * Simple container for top,left,bottom,right "border" values
- */
-function wsBorder(t, l, b, r) {
- this.setBorder(t, l, b, r);
-}
-
-wsBorder.prototype = {
-
- setBorder: function (t, l, b, r) {
- this.top = t;
- this.left = l;
- this.bottom = b;
- this.right = r;
- },
-
- toString: function () {
- return "[l:" + this.left + ",t:" + this.top + ",r:" + this.right + ",b:" + this.bottom + "]";
- }
-};
-
-/*
- * wsRect class
- *
- * Rectangle class, with both x/y/w/h and t/l/b/r accessors.
- */
-function wsRect(x, y, w, h) {
- this.left = x;
- this.top = y;
- this.right = x+w;
- this.bottom = y+h;
-}
-
-wsRect.prototype = {
-
- get x() { return this.left; },
- get y() { return this.top; },
- get width() { return this.right - this.left; },
- get height() { return this.bottom - this.top; },
- set x(v) {
- let diff = this.left - v;
- this.left = v;
- this.right -= diff;
- },
- set y(v) {
- let diff = this.top - v;
- this.top = v;
- this.bottom -= diff;
- },
- set width(v) { this.right = this.left + v; },
- set height(v) { this.bottom = this.top + v; },
-
- setRect: function(x, y, w, h) {
- this.left = x;
- this.top = y;
- this.right = x+w;
- this.bottom = y+h;
-
- return this;
- },
-
- setBounds: function(t, l, b, r) {
- this.top = t;
- this.left = l;
- this.bottom = b;
- this.right = r;
-
- return this;
- },
-
- equals: function equals(r) {
- return (r != null &&
- this.top == r.top &&
- this.left == r.left &&
- this.bottom == r.bottom &&
- this.right == r.right);
- },
-
- clone: function clone() {
- return new wsRect(this.left, this.top, this.right - this.left, this.bottom - this.top);
- },
-
- center: function center() {
- return [this.left + (this.right - this.left) / 2,
- this.top + (this.bottom - this.top) / 2];
- },
-
- centerRounded: function centerRounded() {
- return this.center().map(Math.round);
- },
-
- copyFrom: function(r) {
- this.top = r.top;
- this.left = r.left;
- this.bottom = r.bottom;
- this.right = r.right;
-
- return this;
- },
-
- copyFromTLBR: function(r) {
- this.left = r.left;
- this.top = r.top;
- this.right = r.right;
- this.bottom = r.bottom;
-
- return this;
- },
-
- translate: function(x, y) {
- this.left += x;
- this.right += x;
- this.top += y;
- this.bottom += y;
-
- return this;
- },
-
- // return a new wsRect that is the union of that one and this one
- union: function(rect) {
- let l = Math.min(this.left, rect.left);
- let r = Math.max(this.right, rect.right);
- let t = Math.min(this.top, rect.top);
- let b = Math.max(this.bottom, rect.bottom);
-
- return new wsRect(l, t, r-l, b-t);
- },
-
- toString: function() {
- return "[" + this.x + "," + this.y + "," + this.width + "," + this.height + "]";
- },
-
- expandBy: function(b) {
- this.left += b.left;
- this.right += b.right;
- this.top += b.top;
- this.bottom += b.bottom;
- return this;
- },
-
- contains: function(other) {
- return !!(other.left >= this.left &&
- other.right <= this.right &&
- other.top >= this.top &&
- other.bottom <= this.bottom);
- },
-
- intersect: function(r2) {
- let xmost1 = this.right;
- let xmost2 = r2.right;
-
- let x = Math.max(this.left, r2.left);
-
- let temp = Math.min(xmost1, xmost2);
- if (temp <= x)
- return null;
-
- let width = temp - x;
-
- let ymost1 = this.bottom;
- let ymost2 = r2.bottom;
- let y = Math.max(this.top, r2.top);
-
- temp = Math.min(ymost1, ymost2);
- if (temp <= y)
- return null;
-
- let height = temp - y;
-
- return new wsRect(x, y, width, height);
- },
-
- intersects: function(other) {
- let xok = (other.left > this.left && other.left < this.right) ||
- (other.right > this.left && other.right < this.right) ||
- (other.left <= this.left && other.right >= this.right);
- let yok = (other.top > this.top && other.top < this.bottom) ||
- (other.bottom > this.top && other.bottom < this.bottom) ||
- (other.top <= this.top && other.bottom >= this.bottom);
- return xok && yok;
- },
-
- /**
- * Similar to (and most code stolen from) intersect(). A restriction
- * is an intersection, but this modifies the receiving object instead
- * of returning a new rect.
- */
- restrictTo: function restrictTo(r2) {
- let xmost1 = this.right;
- let xmost2 = r2.right;
-
- let x = Math.max(this.left, r2.left);
-
- let temp = Math.min(xmost1, xmost2);
- if (temp <= x)
- throw "Intersection is empty but rects cannot be empty";
-
- let width = temp - x;
-
- let ymost1 = this.bottom;
- let ymost2 = r2.bottom;
- let y = Math.max(this.top, r2.top);
-
- temp = Math.min(ymost1, ymost2);
- if (temp <= y)
- throw "Intersection is empty but rects cannot be empty";
-
- let height = temp - y;
-
- return this.setRect(x, y, width, height);
- },
-
- /**
- * Similar to (and most code stolen from) union(). An extension is a
- * union (in our sense of the term, not the common set-theoretic sense),
- * but this modifies the receiving object instead of returning a new rect.
- * Effectively, this rectangle is expanded minimally to contain all of the
- * other rect. "Expanded minimally" means that the rect may shrink if
- * given a strict subset rect as the argument.
- */
- expandToContain: function extendTo(rect) {
- let l = Math.min(this.left, rect.left);
- let r = Math.max(this.right, rect.right);
- let t = Math.min(this.top, rect.top);
- let b = Math.max(this.bottom, rect.bottom);
-
- return this.setRect(l, t, r-l, b-t);
- },
-
- round: function round(scale) {
- if (!scale) scale = 1;
-
- this.left = Math.floor(this.left * scale) / scale;
- this.top = Math.floor(this.top * scale) / scale;
- this.right = Math.ceil(this.right * scale) / scale;
- this.bottom = Math.ceil(this.bottom * scale) / scale;
-
- return this;
- },
-
- scale: function scale(xscl, yscl) {
- this.left *= xscl;
- this.right *= xscl;
- this.top *= yscl;
- this.bottom *= yscl;
-
- return this;
- }
-};
-
-/*
- * The "Widget Stack"
- *
- * Manages a <xul:stack>'s children, allowing them to be dragged around
- * the stack, subject to specified constraints. Optionally supports
- * one widget designated as the viewport, which can be panned over a virtual
- * area without needing to draw that area entirely. The viewport widget
- * is designated by a 'viewport' attribute on the child element.
- *
- * Widgets are subject to various constraints, specified in xul via the
- * 'constraint' attribute. Current constraints are:
- * ignore-x: When panning, ignore any changes to the widget's x position
- * ignore-y: When panning, ignore any changes to the widget's y position
- * vp-relative: This widget's position should be claculated relative to
- * the viewport widget. It will always keep the same offset from that
- * widget as initially laid out, regardless of changes to the viewport
- * bounds.
- * frozen: This widget is in a fixed position and should never pan.
- */
-function WidgetStack(el, ew, eh) {
- this.init(el, ew, eh);
-}
-
-WidgetStack.prototype = {
- // the <stack> element
- _el: null,
-
- // object indexed by widget id, with state struct for each object (see _addNewWidget)
- _widgetState: null,
-
- // any barriers
- _barriers: null,
-
- // If a viewport widget is present, this will point to its state object;
- // otherwise null.
- _viewport: null,
-
- // a wsRect; the inner bounds of the viewport content
- _viewportBounds: null,
- // a wsBorder; the overflow area to the side of the bounds where our
- // viewport-relative widgets go
- _viewportOverflow: null,
-
- // a wsRect; the viewportBounds expanded by the viewportOverflow
- _pannableBounds: null,
- get pannableBounds() {
- if (!this._pannableBounds) {
- this._pannableBounds = this._viewportBounds.clone()
- .expandBy(this._viewportOverflow);
- }
- return this._pannableBounds.clone();
- },
-
- // a wsRect; the currently visible part of pannableBounds.
- _viewingRect: null,
-
- // the amount of current global offset applied to all widgets (whether
- // static or not). Set via offsetAll(). Can be used to push things
- // out of the way for overlaying some other UI.
- globalOffsetX: 0,
- globalOffsetY: 0,
-
- // if true (default), panning is constrained to the pannable bounds.
- _constrainToViewport: true,
-
- _viewportUpdateInterval: -1,
- _viewportUpdateTimeout: -1,
-
- _viewportUpdateHandler: null,
- _panHandler: null,
-
- _dragState: null,
-
- _skipViewportUpdates: 0,
- _forceViewportUpdate: false,
-
- //
- // init:
- // el: the <stack> element whose children are to be managed
- //
- init: function (el, ew, eh) {
- this._el = el;
- this._widgetState = {};
- this._barriers = [];
-
- let rect = this._el.getBoundingClientRect();
- let width = rect.width;
- let height = rect.height;
-
- if (ew != undefined && eh != undefined) {
- width = ew;
- height = eh;
- }
-
- this._viewportOverflow = new wsBorder(0, 0, 0, 0);
-
- this._viewingRect = new wsRect(0, 0, width, height);
-
- // listen for DOMNodeInserted/DOMNodeRemoved/DOMAttrModified
- let children = this._el.childNodes;
- for (let i = 0; i < children.length; i++) {
- let c = this._el.childNodes[i];
- if (c.tagName == "spacer")
- this._addNewBarrierFromSpacer(c);
- else
- this._addNewWidget(c);
- }
-
- // this also updates the viewportOverflow and pannableBounds
- this._updateWidgets();
-
- if (this._viewport) {
- this._viewportBounds = new wsRect(0, 0, this._viewport.rect.width, this._viewport.rect.height);
- } else {
- this._viewportBounds = new wsRect(0, 0, 0, 0);
- }
- },
-
- // moveWidgetBy: move the widget with the given id by x,y. Should
- // not be used on vp-relative or otherwise frozen widgets (using it
- // on the x coordinate for x-ignore widgets and similarily for y is
- // ok, as long as the other coordinate remains 0.)
- moveWidgetBy: function (wid, x, y) {
- let state = this._getState(wid);
-
- state.rect.x += x;
- state.rect.y += y;
-
- this._commitState(state);
- },
-
- // panBy: pan the entire set of widgets by the given x and y amounts.
- // This does the same thing as if the user dragged by the given amount.
- // If this is called with an outstanding drag, weirdness might happen,
- // but it also might work, so not disabling that.
- //
- // if ignoreBarriers is true, then barriers are ignored for the pan.
- panBy: function panBy(dx, dy, ignoreBarriers) {
- dx = Math.round(dx);
- dy = Math.round(dy);
-
- if (dx == 0 && dy == 0)
- return false;
-
- let needsDragWrap = !this._dragging;
-
- if (needsDragWrap)
- this.dragStart(0, 0);
-
- let panned = this._panBy(dx, dy, ignoreBarriers);
-
- if (needsDragWrap)
- this.dragStop();
-
- return panned;
- },
-
- // panTo: pan the entire set of widgets so that the given x,y
- // coordinates are in the upper left of the stack. If either is
- // null or undefined, only move the other axis
- panTo: function panTo(x, y) {
- if (x == undefined || x == null)
- x = this._viewingRect.x;
- if (y == undefined || y == null)
- y = this._viewingRect.y;
- this.panBy(x - this._viewingRect.x, y - this._viewingRect.y, true);
- },
-
- // freeze: set a widget as frozen. A frozen widget won't be moved
- // in the stack -- its x,y position will still be tracked in the
- // state, but the left/top attributes won't be overwritten. Call unfreeze
- // to move the widget back to where the ws thinks it should be.
- freeze: function (wid) {
- let state = this._getState(wid);
-
- state.frozen = true;
- },
-
- unfreeze: function (wid) {
- let state = this._getState(wid);
- if (!state.frozen)
- return;
-
- state.frozen = false;
- this._commitState(state);
- },
-
- // moveFrozenTo: move a frozen widget with id wid to x, y in the stack.
- // can only be used on frozen widgets
- moveFrozenTo: function (wid, x, y) {
- let state = this._getState(wid);
- if (!state.frozen)
- throw "moveFrozenTo on non-frozen widget " + wid;
-
- state.widget.setAttribute("left", x);
- state.widget.setAttribute("top", y);
- },
-
- // moveUnfrozenTo: move an unfrozen, pannable widget with id wid to x, y in
- // the stack. should only be used on unfrozen widgets when a dynamic change
- // in position needs to be made. we basically remove, adjust and re-add
- // the widget
- moveUnfrozenTo: function (wid, x, y) {
- delete this._widgetState[wid];
- let widget = document.getElementById(wid);
- if (x) widget.setAttribute("left", x);
- if (y) widget.setAttribute("top", y);
- this._addNewWidget(widget);
- this._updateWidgets();
- },
-
- // we're relying on viewportBounds and viewingRect having the same origin
- get viewportVisibleRect () {
- let rect = this._viewportBounds.intersect(this._viewingRect);
- if (!rect)
- rect = new wsRect(0, 0, 0, 0);
- return rect;
- },
-
- isWidgetFrozen: function isWidgetFrozen(wid) {
- return this._getState(wid).frozen;
- },
-
- // isWidgetVisible: return true if any portion of widget with id wid is
- // visible; otherwise return false.
- isWidgetVisible: function (wid) {
- let state = this._getState(wid);
- let visibleStackRect = new wsRect(0, 0, this._viewingRect.width, this._viewingRect.height);
-
- return visibleStackRect.intersects(state.rect);
- },
-
- // getWidgetVisibility: returns the percentage that the widget is visible
- getWidgetVisibility: function (wid) {
- let state = this._getState(wid);
- let visibleStackRect = new wsRect(0, 0, this._viewingRect.width, this._viewingRect.height);
-
- let visibleRect = visibleStackRect.intersect(state.rect);
- if (visibleRect)
- return [visibleRect.width / state.rect.width, visibleRect.height / state.rect.height]
-
- return [0, 0];
- },
-
- // offsetAll: add an offset to all widgets
- offsetAll: function (x, y) {
- this.globalOffsetX += x;
- this.globalOffsetY += y;
-
- for (let wid in this._widgetState) {
- let state = this._widgetState[wid];
- state.rect.x += x;
- state.rect.y += y;
-
- this._commitState(state);
- }
- },
-
- // setViewportBounds
- // nb: an object containing top, left, bottom, right properties
- // OR
- // width, height: integer values; origin assumed to be 0,0
- // OR
- // top, left, bottom, right: integer values
- //
- // Set the bounds of the viewport area; that is, set the size of the
- // actual content that the viewport widget will be providing a view
- // over. For example, in the case of a 100x100 viewport showing a
- // view into a 100x500 webpage, the viewport bounds would be
- // { top: 0, left: 0, bottom: 500, right: 100 }.
- //
- // setViewportBounds will move all the viewport-relative widgets into
- // place based on the new viewport bounds.
- setViewportBounds: function setViewportBounds() {
- let oldBounds = this._viewportBounds.clone();
-
- if (arguments.length == 1) {
- this._viewportBounds.copyFromTLBR(arguments[0]);
- } else if (arguments.length == 2) {
- this._viewportBounds.setRect(0, 0, arguments[0], arguments[1]);
- } else if (arguments.length == 4) {
- this._viewportBounds.setBounds(arguments[0],
- arguments[1],
- arguments[2],
- arguments[3]);
- } else {
- throw "Invalid number of arguments to setViewportBounds";
- }
-
- let vp = this._viewport;
-
- let dleft = this._viewportBounds.left - oldBounds.left;
- let dright = this._viewportBounds.right - oldBounds.right;
- let dtop = this._viewportBounds.top - oldBounds.top;
- let dbottom = this._viewportBounds.bottom - oldBounds.bottom;
-
- // log2("setViewportBounds dltrb", dleft, dtop, dright, dbottom);
-
- // move all vp-relative widgets to be the right offset from the bounds again
- for (let wid in this._widgetState) {
- let state = this._widgetState[wid];
- if (state.vpRelative) {
- // log2("vpRelative widget", state.id, state.rect.x, dleft, dright);
- if (state.vpOffsetXBefore) {
- state.rect.x += dleft;
- } else {
- state.rect.x += dright;
- }
-
- if (state.vpOffsetYBefore) {
- state.rect.y += dtop;
- } else {
- state.rect.y += dbottom;
- }
-
- // log2("vpRelative widget", state.id, state.rect.x, dleft, dright);
- this._commitState(state);
- }
- }
-
- for (let bid in this._barriers) {
- let barrier = this._barriers[bid];
-
- // log2("setViewportBounds: looking at barrier", bid, barrier.vpRelative, barrier.type);
-
- if (barrier.vpRelative) {
- if (barrier.type == "vertical") {
- let q = "v barrier moving from " + barrier.x + " to ";
- if (barrier.vpOffsetXBefore) {
- barrier.x += dleft;
- } else {
- barrier.x += dright;
- }
- // log2(q += barrier.x);
- } else if (barrier.type == "horizontal") {
- let q = "h barrier moving from " + barrier.y + " to ";
- if (barrier.vpOffsetYBefore) {
- barrier.y += dtop;
- } else {
- barrier.y += dbottom;
- }
- // log2(q += barrier.y);
- }
- }
- }
-
- // clear the pannable bounds cache to make sure it gets rebuilt
- this._pannableBounds = null;
-
- // now let's make sure that the viewing rect and inner bounds are still valid
- this._adjustViewingRect();
-
- this._viewportUpdate(0, 0, true);
- },
-
- // setViewportHandler
- // uh: A function object
- //
- // The given function object is called at the end of every drag and viewport
- // bounds change, passing in the new rect that's to be displayed in the
- // viewport.
- //
- setViewportHandler: function (uh) {
- this._viewportUpdateHandler = uh;
- },
-
- // setPanHandler
- // uh: A function object
- //
- // The given functin object is called whenever elements pan; it provides
- // the new area of the pannable bounds that's visible in the stack.
- setPanHandler: function (uh) {
- this._panHandler = uh;
- },
-
- // dragStart: start a drag, with the current coordinates being clientX,clientY
- dragStart: function dragStart(clientX, clientY) {
- log("(dragStart)", clientX, clientY);
-
- if (this._dragState) {
- reportError("dragStart with drag already in progress? what?");
- this._dragState = null;
- }
-
- this._dragState = { };
-
- let t = Date.now();
-
- this._dragState.barrierState = [];
-
- this._dragState.startTime = t;
- // outer x, that is outer from the viewport coordinates. In stack-relative coords.
- this._dragState.outerStartX = clientX;
- this._dragState.outerStartY = clientY;
-
- this._dragCoordsFromClient(clientX, clientY, t);
-
- this._dragState.outerLastUpdateDX = 0;
- this._dragState.outerLastUpdateDY = 0;
-
- if (this._viewport) {
- // create a copy of these so that we can compute
- // deltas correctly to update the viewport
- this._viewport.dragStartRect = this._viewport.rect.clone();
- }
-
- this._dragState.dragging = true;
- },
-
- _viewportDragUpdate: function viewportDragUpdate() {
- let vws = this._viewport;
- this._viewportUpdate((vws.dragStartRect.x - vws.rect.x),
- (vws.dragStartRect.y - vws.rect.y));
- },
-
- // dragStop: stop any drag in progress
- dragStop: function dragStop() {
- log("(dragStop)");
-
- if (!this._dragging)
- return;
-
- if (this._viewportUpdateTimeout != -1)
- clearTimeout(this._viewportUpdateTimeout);
-
- this._viewportDragUpdate();
-
- this._dragState = null;
- },
-
- // dragMove: process a mouse move to clientX,clientY for an ongoing drag
- dragMove: function dragMove(clientX, clientY) {
- if (!this._dragging)
- return false;
-
- this._dragCoordsFromClient(clientX, clientY);
-
- let panned = this._dragUpdate();
-
- if (this._viewportUpdateInterval != -1) {
- if (this._viewportUpdateTimeout != -1)
- clearTimeout(this._viewportUpdateTimeout);
- let self = this;
- this._viewportUpdateTimeout = setTimeout(function () { self._viewportDragUpdate(); }, this._viewportUpdateInterval);
- }
-
- return panned;
- },
-
- // dragBy: process a mouse move by dx,dy for an ongoing drag
- dragBy: function dragBy(dx, dy) {
- return this.dragMove(this._dragState.outerCurX + dx, this._dragState.outerCurY + dy);
- },
-
- // updateSize: tell the WidgetStack to update its size, because it
- // was either resized or some other event took place.
- updateSize: function updateSize(width, height) {
- if (width == undefined || height == undefined) {
- let rect = this._el.getBoundingClientRect();
- width = rect.width;
- height = rect.height;
- }
-
- // update widget rects and viewportOverflow, since the resize might have
- // caused them to change (widgets first, since the viewportOverflow depends
- // on them).
-
- // XXX these methods aren't working correctly yet, but they aren't strictly
- // necessary in Fennec's default config
- // for (let wid in this._widgetState) {
- // let s = this._widgetState[wid];
- // this._updateWidgetRect(s);
- // }
- // this._updateViewportOverflow();
-
- this._viewingRect.width = width;
- this._viewingRect.height = height;
-
- // Wrap this call in a batch to ensure that we always call the
- // viewportUpdateHandler, even if _adjustViewingRect doesn't trigger a pan.
- // If it does, the batch also ensures that we don't call the handler twice.
- this.beginUpdateBatch();
- this._adjustViewingRect();
- this.endUpdateBatch();
- },
-
- beginUpdateBatch: function startUpdate() {
- if (!this._skipViewportUpdates) {
- this._startViewportBoundsString = this._viewportBounds.toString();
- this._forceViewportUpdate = false;
- }
- this._skipViewportUpdates++;
- },
-
- endUpdateBatch: function endUpdate(aForceRedraw) {
- if (!this._skipViewportUpdates)
- throw new Error("Unbalanced call to endUpdateBatch");
-
- this._forceViewportUpdate = this._forceViewportUpdate || aForceRedraw;
-
- this._skipViewportUpdates--;
- if (this._skipViewportUpdates)
- return;
-
- let boundsSizeChanged =
- this._startViewportBoundsString != this._viewportBounds.toString();
- this._callViewportUpdateHandler(boundsSizeChanged || this._forceViewportUpdate);
- },
-
- //
- // Internal code
- //
-
- _updateWidgetRect: function(state) {
- // don't need to support updating the viewport rect at the moment
- // (we'd need to duplicate the vptarget* code from _addNewWidget if we did)
- if (state == this._viewport)
- return;
-
- let w = state.widget;
- let x = w.getAttribute("left") || 0;
- let y = w.getAttribute("top") || 0;
- let rect = w.getBoundingClientRect();
- state.rect = new wsRect(parseInt(x), parseInt(y),
- rect.right - rect.left,
- rect.bottom - rect.top);
- if (w.hasAttribute("widgetwidth") && w.hasAttribute("widgetheight")) {
- state.rect.width = parseInt(w.getAttribute("widgetwidth"));
- state.rect.height = parseInt(w.getAttribute("widgetheight"));
- }
- },
-
- _dumpRects: function () {
- dump("WidgetStack:\n");
- dump("\tthis._viewportBounds: " + this._viewportBounds + "\n");
- dump("\tthis._viewingRect: " + this._viewingRect + "\n");
- dump("\tthis._viewport.viewportInnerBounds: " + this._viewport.viewportInnerBounds + "\n");
- dump("\tthis._viewport.rect: " + this._viewport.rect + "\n");
- dump("\tthis._viewportOverflow: " + this._viewportOverflow + "\n");
- dump("\tthis.pannableBounds: " + this.pannableBounds + "\n");
- },
-
- // Ensures that _viewingRect is within _pannableBounds (call this when either
- // one is resized)
- _adjustViewingRect: function _adjustViewingRect() {
- let vr = this._viewingRect;
- let pb = this.pannableBounds;
-
- if (pb.contains(vr))
- return; // nothing to do here
-
- // don't bother adjusting _viewingRect if it can't fit into
- // _pannableBounds
- if (vr.height > pb.height || vr.width > pb.width)
- return;
-
- let panX = 0, panY = 0;
- if (vr.right > pb.right)
- panX = pb.right - vr.right;
- else if (vr.left < pb.left)
- panX = pb.left - vr.left;
-
- if (vr.bottom > pb.bottom)
- panY = pb.bottom - vr.bottom;
- else if (vr.top < pb.top)
- panY = pb.top - vr.top;
-
- this.panBy(panX, panY, true);
- },
-
- _getState: function (wid) {
- let w = this._widgetState[wid];
- if (!w)
- throw "Unknown widget id '" + wid + "'; widget not in stack";
- return w;
- },
-
- get _dragging() {
- return this._dragState && this._dragState.dragging;
- },
-
- _viewportUpdate: function _viewportUpdate(dX, dY, boundsChanged) {
- if (!this._viewport)
- return;
-
- this._viewportUpdateTimeout = -1;
-
- let vws = this._viewport;
- let vwib = vws.viewportInnerBounds;
- let vpb = this._viewportBounds;
-
- // recover the amount the inner bounds moved by the amount the viewport
- // widget moved, but don't include offsets that we're making up from previous
- // drags that didn't affect viewportInnerBounds
- let [ignoreX, ignoreY] = this._offsets || [0, 0];
- let rx = dX - ignoreX;
- let ry = dY - ignoreY;
-
- [dX, dY] = this._rectTranslateConstrain(rx, ry, vwib, vpb);
-
- // record the offsets that correspond to the amount of the drag we're ignoring
- // to ensure the viewportInnerBounds remains within the viewportBounds
- this._offsets = [dX - rx, dY - ry];
-
- // adjust the viewportInnerBounds, and snap the viewport back
- vwib.translate(dX, dY);
- vws.rect.translate(dX, dY);
- this._commitState(vws);
-
- // update this so that we can call this function again during the same drag
- // and get the right values.
- vws.dragStartRect = vws.rect.clone();
-
- this._callViewportUpdateHandler(boundsChanged);
- },
-
- _callViewportUpdateHandler: function _callViewportUpdateHandler(boundsChanged) {
- if (!this._viewport || !this._viewportUpdateHandler || this._skipViewportUpdates)
- return;
-
- let vwb = this._viewportBounds.clone();
-
- let vwib = this._viewport.viewportInnerBounds.clone();
-
- let vis = this.viewportVisibleRect;
-
- vwib.left += this._viewport.offsetLeft;
- vwib.top += this._viewport.offsetTop;
- vwib.right += this._viewport.offsetRight;
- vwib.bottom += this._viewport.offsetBottom;
-
- this._viewportUpdateHandler.apply(window, [vwb, vwib, vis, boundsChanged]);
- },
-
- _dragCoordsFromClient: function (cx, cy, t) {
- this._dragState.curTime = t ? t : Date.now();
- this._dragState.outerCurX = cx;
- this._dragState.outerCurY = cy;
-
- let dx = this._dragState.outerCurX - this._dragState.outerStartX;
- let dy = this._dragState.outerCurY - this._dragState.outerStartY;
- this._dragState.outerDX = dx;
- this._dragState.outerDY = dy;
- },
-
- _panHandleBarriers: function (dx, dy) {
- // XXX unless the barriers are sorted by position, this will break
- // with multiple barriers that are near enough to eachother that a
- // drag could cross more than one.
-
- let vr = this._viewingRect;
-
- // XXX this just stops at the first horizontal and vertical barrier it finds
-
- // barrier_[xy] is the barrier that was used to get to the final
- // barrier_d[xy] value. if null, no barrier, and dx/dy shouldn't
- // be replaced with barrier_d[xy].
- let barrier_y = null, barrier_x = null;
- let barrier_dy = 0, barrier_dx = 0;
-
- for (let i = 0; i < this._barriers.length; i++) {
- let b = this._barriers[i];
-
- // log2("barrier", i, b.type, b.x, b.y);
-
- if (dx != 0 && b.type == "vertical") {
- if (barrier_x != null) {
- delete this._dragState.barrierState[i];
- continue;
- }
-
- let alreadyKnownDistance = this._dragState.barrierState[i] || 0;
-
- // log2("alreadyKnownDistance", alreadyKnownDistance);
-
- let dbx = 0;
-
- // 100 <= 100 && 100-(-5) > 100
-
- if ((vr.left <= b.x && vr.left+dx > b.x) ||
- (vr.left >= b.x && vr.left+dx < b.x))
- {
- dbx = b.x - vr.left;
- } else if ((vr.right <= b.x && vr.right+dx > b.x) ||
- (vr.right >= b.x && vr.right+dx < b.x))
- {
- dbx = b.x - vr.right;
- } else {
- delete this._dragState.barrierState[i];
- continue;
- }
-
- let leftoverDistance = dbx - dx;
-
- // log2("initial dbx", dbx, leftoverDistance);
-
- let dist = Math.abs(leftoverDistance + alreadyKnownDistance) - b.size;
-
- if (dist >= 0) {
- if (dx < 0)
- dbx -= dist;
- else
- dbx += dist;
- delete this._dragState.barrierState[i];
- } else {
- dbx = 0;
- this._dragState.barrierState[i] = leftoverDistance + alreadyKnownDistance;
- }
-
- // log2("final dbx", dbx, "state", this._dragState.barrierState[i]);
-
- if (Math.abs(barrier_dx) <= Math.abs(dbx)) {
- barrier_x = b;
- barrier_dx = dbx;
-
- // log2("new barrier_dx", barrier_dx);
- }
- }
-
- if (dy != 0 && b.type == "horizontal") {
- if (barrier_y != null) {
- delete this._dragState.barrierState[i];
- continue;
- }
-
- let alreadyKnownDistance = this._dragState.barrierState[i] || 0;
-
- // log2("alreadyKnownDistance", alreadyKnownDistance);
-
- let dby = 0;
-
- // 100 <= 100 && 100-(-5) > 100
-
- if ((vr.top <= b.y && vr.top+dy > b.y) ||
- (vr.top >= b.y && vr.top+dy < b.y))
- {
- dby = b.y - vr.top;
- } else if ((vr.bottom <= b.y && vr.bottom+dy > b.y) ||
- (vr.bottom >= b.y && vr.bottom+dy < b.y))
- {
- dby = b.y - vr.bottom;
- } else {
- delete this._dragState.barrierState[i];
- continue;
- }
-
- let leftoverDistance = dby - dy;
-
- // log2("initial dby", dby, leftoverDistance);
-
- let dist = Math.abs(leftoverDistance + alreadyKnownDistance) - b.size;
-
- if (dist >= 0) {
- if (dy < 0)
- dby -= dist;
- else
- dby += dist;
- delete this._dragState.barrierState[i];
- } else {
- dby = 0;
- this._dragState.barrierState[i] = leftoverDistance + alreadyKnownDistance;
- }
-
- // log2("final dby", dby, "state", this._dragState.barrierState[i]);
-
- if (Math.abs(barrier_dy) <= Math.abs(dby)) {
- barrier_y = b;
- barrier_dy = dby;
-
- // log2("new barrier_dy", barrier_dy);
- }
- }
- }
-
- if (barrier_x) {
- // log2("did barrier_x", barrier_x, "barrier_dx", barrier_dx);
- dx = barrier_dx;
- }
-
- if (barrier_y) {
- dy = barrier_dy;
- }
-
- return [dx, dy];
- },
-
- _panBy: function _panBy(dx, dy, ignoreBarriers) {
- let vr = this._viewingRect;
-
- // check if any barriers would be crossed by this pan, and take them
- // into account. do this first.
- if (!ignoreBarriers)
- [dx, dy] = this._panHandleBarriers(dx, dy);
-
- // constrain the full drag of the viewingRect to the pannableBounds.
- // note that the viewingRect needs to move in the opposite
- // direction of the pan, so we fiddle with the signs here (as you
- // pan to the upper left, more of the bottom right becomes visible,
- // so the viewing rect moves to the bottom right of the virtual surface).
- [dx, dy] = this._rectTranslateConstrain(dx, dy, vr, this.pannableBounds);
-
- // If the net result is that we don't have any room to move, then
- // just return.
- if (dx == 0 && dy == 0)
- return false;
-
- // the viewingRect moves opposite of the actual pan direction, see above
- vr.x += dx;
- vr.y += dy;
-
- // Go through each widget and move it by dx,dy. Frozen widgets
- // will be ignored in commitState.
- // The widget rects are in real stack space though, so we need to subtract
- // our (now negated) dx, dy from their coordinates.
- for (let wid in this._widgetState) {
- let state = this._widgetState[wid];
- if (!state.ignoreX)
- state.rect.x -= dx;
- if (!state.ignoreY)
- state.rect.y -= dy;
-
- this._commitState(state);
- }
-
- /* Do not call panhandler during pans within a transaction.
- * Those pans always end-up covering up the checkerboard and
- * do not require sliding out the location bar
- */
- if (!this._skipViewportUpdates && this._panHandler)
- this._panHandler.apply(window, [vr.clone(), dx, dy]);
-
- return true;
- },
-
- _dragUpdate: function _dragUpdate() {
- let dx = this._dragState.outerLastUpdateDX - this._dragState.outerDX;
- let dy = this._dragState.outerLastUpdateDY - this._dragState.outerDY;
-
- this._dragState.outerLastUpdateDX = this._dragState.outerDX;
- this._dragState.outerLastUpdateDY = this._dragState.outerDY;
-
- return this.panBy(dx, dy);
- },
-
- //
- // widget addition/removal
- //
- _addNewWidget: function (w) {
- let wid = w.getAttribute("id");
- if (!wid) {
- reportError("WidgetStack: child widget without id!");
- return;
- }
-
- if (w.getAttribute("hidden") == "true")
- return;
-
- let state = {
- widget: w,
- id: wid,
-
- viewport: false,
- ignoreX: false,
- ignoreY: false,
- sticky: false,
- frozen: false,
- vpRelative: false,
-
- offsetLeft: 0,
- offsetTop: 0,
- offsetRight: 0,
- offsetBottom: 0
- };
-
- this._updateWidgetRect(state);
-
- if (w.hasAttribute("constraint")) {
- let cs = w.getAttribute("constraint").split(",");
- for (let s of cs) {
- if (s == "ignore-x")
- state.ignoreX = true;
- else if (s == "ignore-y")
- state.ignoreY = true;
- else if (s == "sticky")
- state.sticky = true;
- else if (s == "frozen") {
- state.frozen = true;
- } else if (s == "vp-relative")
- state.vpRelative = true;
- }
- }
-
- if (w.hasAttribute("viewport")) {
- if (this._viewport)
- reportError("WidgetStack: more than one viewport canvas in stack!");
-
- this._viewport = state;
- state.viewport = true;
-
- if (w.hasAttribute("vptargetx") && w.hasAttribute("vptargety") &&
- w.hasAttribute("vptargetw") && w.hasAttribute("vptargeth"))
- {
- let wx = parseInt(w.getAttribute("vptargetx"));
- let wy = parseInt(w.getAttribute("vptargety"));
- let ww = parseInt(w.getAttribute("vptargetw"));
- let wh = parseInt(w.getAttribute("vptargeth"));
-
- state.offsetLeft = state.rect.left - wx;
- state.offsetTop = state.rect.top - wy;
- state.offsetRight = state.rect.right - (wx + ww);
- state.offsetBottom = state.rect.bottom - (wy + wh);
-
- state.rect = new wsRect(wx, wy, ww, wh);
- }
-
- // initialize inner bounds to top-left
- state.viewportInnerBounds = new wsRect(0, 0, state.rect.width, state.rect.height);
- }
-
- this._widgetState[wid] = state;
-
- log ("(New widget: " + wid + (state.viewport ? " [viewport]" : "") + " at: " + state.rect + ")");
- },
-
- _removeWidget: function (w) {
- let wid = w.getAttribute("id");
- delete this._widgetState[wid];
- this._updateWidgets();
- },
-
- // updateWidgets:
- // Go through all the widgets and figure out their viewport-relative offsets.
- // If the widget goes to the left or above the viewport widget, then
- // vpOffsetXBefore or vpOffsetYBefore is set.
- // See setViewportBounds for use of vpOffset* state variables, and for how
- // the actual x and y coords of each widget are calculated based on their offsets
- // and the viewport bounds.
- _updateWidgets: function () {
- let vp = this._viewport;
-
- let ofRect = this._viewingRect.clone();
-
- for (let wid in this._widgetState) {
- let state = this._widgetState[wid];
- if (vp && state.vpRelative) {
- // compute the vpOffset from 0,0 assuming that the viewport rect is 0,0
- if (state.rect.left >= vp.rect.right) {
- state.vpOffsetXBefore = false;
- state.vpOffsetX = state.rect.left - vp.rect.width;
- } else {
- state.vpOffsetXBefore = true;
- state.vpOffsetX = state.rect.left - vp.rect.left;
- }
-
- if (state.rect.top >= vp.rect.bottom) {
- state.vpOffsetYBefore = false;
- state.vpOffsetY = state.rect.top - vp.rect.height;
- } else {
- state.vpOffsetYBefore = true;
- state.vpOffsetY = state.rect.top - vp.rect.top;
- }
-
- log("widget", state.id, "offset", state.vpOffsetX, state.vpOffsetXBefore ? "b" : "a", state.vpOffsetY, state.vpOffsetYBefore ? "b" : "a", "rect", state.rect);
- }
- }
-
- this._updateViewportOverflow();
- },
-
- // updates the viewportOverflow/pannableBounds
- _updateViewportOverflow: function() {
- let vp = this._viewport;
- if (!vp)
- return;
-
- let ofRect = new wsRect(0, 0, this._viewingRect.width, this._viewingRect.height);
-
- for (let wid in this._widgetState) {
- let state = this._widgetState[wid];
- if (vp && state.vpRelative) {
- ofRect.left = Math.min(ofRect.left, state.rect.left);
- ofRect.top = Math.min(ofRect.top, state.rect.top);
- ofRect.right = Math.max(ofRect.right, state.rect.right);
- ofRect.bottom = Math.max(ofRect.bottom, state.rect.bottom);
- }
- }
-
- // prevent the viewportOverflow from having positive top/left or negative
- // bottom/right values, which would otherwise happen if there aren't widgets
- // beyond each of those edges
- this._viewportOverflow = new wsBorder(
- /* top*/ Math.round(Math.min(ofRect.top, 0)),
- /* left*/ Math.round(Math.min(ofRect.left, 0)),
- /* bottom*/ Math.round(Math.max(ofRect.bottom - vp.rect.height, 0)),
- /* right*/ Math.round(Math.max(ofRect.right - vp.rect.width, 0))
- );
-
- // clear the _pannableBounds cache, since it depends on the
- // viewportOverflow
- this._pannableBounds = null;
- },
-
- _widgetBounds: function () {
- let r = new wsRect(0, 0, 0, 0);
-
- for (let wid in this._widgetState) {
- let state = this._widgetState[wid];
- r = r.union(state.rect);
- }
-
- return r;
- },
-
- _commitState: function (state) {
- // if the widget is frozen, don't actually update its left/top;
- // presumably the caller is managing those directly for now.
- if (state.frozen)
- return;
- let w = state.widget;
- let l = state.rect.x + state.offsetLeft;
- let t = state.rect.y + state.offsetTop;
-
- // cache left/top to avoid calling setAttribute unnessesarily
- if (state._left != l) {
- state._left = l;
- w.setAttribute("left", l);
- }
-
- if (state._top != t) {
- state._top = t;
- w.setAttribute("top", t);
- }
- },
-
- // constrain translate of rect by dx dy to bounds; return dx dy that can
- // be used to bring rect up to the edge of bounds if we'd go over.
- _rectTranslateConstrain: function (dx, dy, rect, bounds) {
- let newX, newY;
-
- // If the rect is larger than the bounds, allow it to increase its overlap
- let woverflow = rect.width > bounds.width;
- let hoverflow = rect.height > bounds.height;
- if (woverflow || hoverflow) {
- let intersection = rect.intersect(bounds);
- let newIntersection = rect.clone().translate(dx, dy).intersect(bounds);
- if (woverflow)
- newX = (newIntersection.width > intersection.width) ? rect.x + dx : rect.x;
- if (hoverflow)
- newY = (newIntersection.height > intersection.height) ? rect.y + dy : rect.y;
- }
-
- // Common case, rect fits within the bounds
- // clamp new X to within [bounds.left, bounds.right - rect.width],
- // new Y to within [bounds.top, bounds.bottom - rect.height]
- if (isNaN(newX))
- newX = Math.min(Math.max(bounds.left, rect.x + dx), bounds.right - rect.width);
- if (isNaN(newY))
- newY = Math.min(Math.max(bounds.top, rect.y + dy), bounds.bottom - rect.height);
-
- return [newX - rect.x, newY - rect.y];
- },
-
- // add a new barrier from a <spacer>
- _addNewBarrierFromSpacer: function (el) {
- let t = el.getAttribute("barriertype");
-
- // XXX implement these at some point
- // t != "lr" && t != "rl" &&
- // t != "tb" && t != "bt" &&
-
- if (t != "horizontal" &&
- t != "vertical")
- {
- throw "Invalid barrier type: " + t;
- }
-
- let x, y;
-
- let barrier = {};
- let vp = this._viewport;
-
- barrier.type = t;
-
- if (el.getAttribute("left"))
- barrier.x = parseInt(el.getAttribute("left"));
- else if (el.getAttribute("top"))
- barrier.y = parseInt(el.getAttribute("top"));
- else
- throw "Barrier without top or left attribute";
-
- if (el.getAttribute("size"))
- barrier.size = parseInt(el.getAttribute("size"));
- else
- barrier.size = 10;
-
- if (el.hasAttribute("constraint")) {
- let cs = el.getAttribute("constraint").split(",");
- for (let s of cs) {
- if (s == "ignore-x")
- barrier.ignoreX = true;
- else if (s == "ignore-y")
- barrier.ignoreY = true;
- else if (s == "sticky")
- barrier.sticky = true;
- else if (s == "frozen") {
- barrier.frozen = true;
- } else if (s == "vp-relative")
- barrier.vpRelative = true;
- }
- }
-
- if (barrier.vpRelative) {
- if (barrier.type == "vertical") {
- if (barrier.x >= vp.rect.right) {
- barrier.vpOffsetXBefore = false;
- barrier.vpOffsetX = barrier.x - vp.rect.right;
- } else {
- barrier.vpOffsetXBefore = true;
- barrier.vpOffsetX = barrier.x - vp.rect.left;
- }
- } else if (barrier.type == "horizontal") {
- if (barrier.y >= vp.rect.bottom) {
- barrier.vpOffsetYBefore = false;
- barrier.vpOffsetY = barrier.y - vp.rect.bottom;
- } else {
- barrier.vpOffsetYBefore = true;
- barrier.vpOffsetY = barrier.y - vp.rect.top;
- }
-
- // log2("h barrier relative", barrier.vpOffsetYBefore, barrier.vpOffsetY);
- }
- }
-
- this._barriers.push(barrier);
- }
-};
diff --git a/toolkit/content/tests/fennec-tile-testapp/chrome/content/firefoxOverlay.xul b/toolkit/content/tests/fennec-tile-testapp/chrome/content/firefoxOverlay.xul
deleted file mode 100644
index 612f8bb9ff..0000000000
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/content/firefoxOverlay.xul
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet href="chrome://tile/skin/overlay.css" type="text/css"?>
-<!DOCTYPE overlay SYSTEM "chrome://tile/locale/tile.dtd">
-<overlay id="tile-overlay"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script src="overlay.js"/>
- <stringbundleset id="stringbundleset">
- <stringbundle id="tile-strings" src="chrome://tile/locale/tile.properties"/>
- </stringbundleset>
-
- <menupopup id="menu_ToolsPopup">
- <menuitem id="tile-hello" label="&tile.label;"
- oncommand="tile.onMenuItemCommand(event);"/>
- </menupopup>
-</overlay>
diff --git a/toolkit/content/tests/fennec-tile-testapp/chrome/content/foo.xul b/toolkit/content/tests/fennec-tile-testapp/chrome/content/foo.xul
deleted file mode 100644
index cdc01658a0..0000000000
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/content/foo.xul
+++ /dev/null
@@ -1,460 +0,0 @@
-<window
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns:html="http://www.w3.org/1999/xhtml"
- onload="onAlmostLoad();"
- style="background-color:white;"
- width="800"
- height="480"
- onresize="onResize();"
- onkeypress="onKeyPress(event);">
-
-<script type="application/javascript" src="WidgetStack.js"/>
-<script type="application/javascript" src="TileManager.js"/>
-<script type="application/javascript" src="BrowserView.js"/>
-<script type="application/javascript">
-<![CDATA[
-
-// We do not endorse the use of globals, but this is just a closed lab
-// environment. What could possibly go wrong? ...
-let bv = null;
-let scrollbox = null;
-let leftbar = null;
-let rightbar = null;
-let topbar = null;
-
-function debug() {
- let w = scrollbox.scrolledWidth;
- let h = scrollbox.scrolledHeight;
- let container = document.getElementById("tile_container");
- let [x, y] = getScrollboxPosition();
- if (bv) {
- dump('----------------------DEBUG!-------------------------\n');
- dump(bv._browserViewportState.toString() + endl);
-
- dump(endl);
-
- let cr = bv._tileManager._criticalRect;
- dump('criticalRect from BV: ' + (cr ? cr.toString() : null) + endl);
- dump('visibleRect from BV : ' + bv._visibleRect.toString() + endl);
- dump('visibleRect from foo: ' + scrollboxToViewportRect(getVisibleRect()) + endl);
-
- dump(endl);
-
- dump('container width,height from BV: ' + bv._container.style.width + ', '
- + bv._container.style.height + endl);
- dump('container width,height via DOM: ' + container.style.width + ', '
- + container.style.height + endl);
-
- dump(endl);
-
- dump('scrollbox position : ' + x + ', ' + y + endl);
- dump('scrollbox scrolledsize: ' + w + ', ' + h + endl);
-
- dump(endl);
-
- dump('tilecache capacity: ' + bv._tileManager._tileCache.getCapacity() + endl);
- dump('tilecache size : ' + bv._tileManager._tileCache.size + endl);
- dump('tilecache numFree : ' + bv._tileManager._tileCache.numFree + endl);
- dump('tilecache iBound : ' + bv._tileManager._tileCache.iBound + endl);
- dump('tilecache jBound : ' + bv._tileManager._tileCache.jBound + endl);
- dump('tilecache _lru : ' + bv._tileManager._tileCache._lru + endl);
-
- dump('-----------------------------------------------------\n');
- }
-}
-
-function debugTile(i, j) {
- let tc = bv._tileManager._tileCache;
- let t = tc.getTile(i, j);
-
- dump('------ DEBUGGING TILE (' + i + ',' + j + ') --------\n');
-
- dump('in bounds: ' + tc.inBounds(i, j) + endl);
- dump('occupied : ' + tc._isOccupied(i, j) + endl);
- if (t)
- {
- dump('toString : ' + t.toString(true) + endl);
- dump('free : ' + t.free + endl);
- dump('dirtyRect: ' + t._dirtyTileCanvasRect + endl);
-
- let len = tc._tilePool.length;
- for (let k = 0; k < len; ++k)
- if (tc._tilePool[k] === t)
- dump('found in tilePool at index ' + k + endl);
- }
-
- dump('------------------------------------\n');
-}
-
-function onKeyPress(e) {
- const a = 97; // debug all critical tiles
- const c = 99; // set tilecache capacity
- const d = 100; // debug dump
- const f = 102; // run noop() through forEachIntersectingRect (for timing)
- const i = 105; // toggle info click mode
- const l = 108; // restart lazy crawl
- const m = 109; // fix mouseout
- const t = 116; // debug given list of tiles separated by space
-
- switch (e.charCode) {
- case d:
- debug();
-
- break;
- case l:
- bv._tileManager.restartLazyCrawl(bv._tileManager._criticalRect);
-
- break;
- case c:
- let cap = parseInt(window.prompt('new capacity'));
- bv._tileManager._tileCache.setCapacity(cap);
-
- break;
- case f:
- let noop = function noop() { for (let i = 0; i < 10; ++i); };
- bv._tileManager._tileCache.forEachIntersectingRect(bv._tileManager._criticalRect,
- false, noop, window);
-
- break;
- case t:
- let ijstrs = window.prompt('row,col plz').split(' ');
- for (let ijstr of ijstrs) {
- let [i, j] = ijstr.split(',').map(x => parseInt(x));
- debugTile(i, j);
- }
-
- break;
- case a:
- let cr = bv._tileManager._criticalRect;
- dump('>>>>>> critical rect is ' + (cr ? cr.toString() : cr) + endl);
- if (cr) {
- let starti = cr.left >> kTileExponentWidth;
- let endi = cr.right >> kTileExponentWidth;
-
- let startj = cr.top >> kTileExponentHeight;
- let endj = cr.bottom >> kTileExponentHeight;
-
- for (var jj = startj; jj <= endj; ++jj)
- for (var ii = starti; ii <= endi; ++ii)
- debugTile(ii, jj);
- }
-
- break;
- case i:
- window.infoMode = !window.infoMode;
- break;
- case m:
- onMouseUp();
- break;
- default:
- break;
- }
-}
-
-function onResize(e) {
- if (bv) {
- bv.beginBatchOperation();
- bv.setVisibleRect(scrollboxToViewportRect(getVisibleRect()));
- bv.zoomToPage();
- bv.commitBatchOperation();
- }
-}
-
-function onMouseDown(e) {
- if (window.infoMode) {
- let [basex, basey] = getScrollboxPosition();
- let [x, y] = scrollboxToViewportXY(basex + e.clientX, basey + e.clientY);
- let i = x >> kTileExponentWidth;
- let j = y >> kTileExponentHeight;
-
- debugTile(i, j);
- }
-
- window._isDragging = true;
- window._dragStart = {x: e.clientX, y: e.clientY};
-
- bv.pauseRendering();
-}
-
-function onMouseUp() {
- window._isDragging = false;
- bv.resumeRendering();
-}
-
-function onMouseMove(e) {
- if (window._isDragging) {
- let x = scrollbox.positionX;
- let y = scrollbox.positionY;
- let w = scrollbox.scrolledWidth;
- let h = scrollbox.scrolledHeight;
-
- let dx = window._dragStart.x - e.clientX;
- let dy = window._dragStart.y - e.clientY;
-
- // XXX if max(x, 0) > scrollwidth we shouldn't do anything (same for y/height)
- let newX = Math.max(x + dx, 0);
- let newY = Math.max(y + dy, 0);
-
- if (newX < w || newY < h) {
- // clip dx and dy to prevent us from going below 0
- dx = Math.max(dx, -x);
- dy = Math.max(dy, -y);
-
- let oldx = x;
- let oldy = y;
-
- bv.onBeforeVisibleMove(dx, dy);
-
- updateBars(oldx, oldy, dx, dy);
- scrollbox.scrollBy(dx, dy);
-
- let [newx, newy] = getScrollboxPosition();
- let realdx = newx - oldx;
- let realdy = newy - oldy;
-
- updateBars(oldx, oldy, realdx, realdy);
- bv.onAfterVisibleMove(realdx, realdy);
- }
- window._dragStart = {x: e.clientX, y: e.clientY};
- }
-}
-
-function onAlmostLoad() {
- window._isDragging = false;
- window.infoMode = false;
- window.setTimeout(onLoad, 1500);
-}
-
-function onLoad() {
- // ----------------------------------------------------
- scrollbox = document.getElementById("scrollbox").boxObject;
- leftbar = document.getElementById("left_sidebar");
- rightbar = document.getElementById("right_sidebar");
- topbar = document.getElementById("top_urlbar");
- // ----------------------------------------------------
-
- let initX = Math.round(leftbar.getBoundingClientRect().right);
- dump('scrolling to ' + initX + endl);
- scrollbox.scrollTo(initX, 0);
- let [x, y] = getScrollboxPosition();
- dump(' scrolled to ' + x + ',' + y + endl);
-
- let container = document.getElementById("tile_container");
- container.addEventListener("mousedown", onMouseDown, true);
- container.addEventListener("mouseup", onMouseUp, true);
- container.addEventListener("mousemove", onMouseMove, true);
-
- bv = new BrowserView(container, scrollboxToViewportRect(getVisibleRect()));
-
- let browser = document.getElementById("googlenews");
- bv.setBrowser(browser, false);
-}
-
-function updateBars(x, y, dx, dy) {
-return;
- // shouldn't update margin if it doesn't need to be changed
- let sidebars = document.getElementsByClassName("sidebar");
- for (let i = 0; i < sidebars.length; i++) {
- let sidebar = sidebars[i];
- sidebar.style.margin = (y + dy) + "px 0px 0px 0px";
- }
-
- let urlbar = document.getElementById("top_urlbar");
- urlbar.style.margin = "0px 0px 0px " + (x + dx) + "px";
-}
-
-function viewportToScrollboxXY(x, y) {
- return scrollboxToViewportXY(x, y, -1);
-}
-
-function scrollboxToViewportXY(x, y) {
- if (!x) x = 0;
- if (!y) y = 0;
-
- // shield your eyes!
- let direction = (arguments.length >= 3) ? arguments[2] : 1;
-
- let leftbarcr = leftbar.getBoundingClientRect();
- let rightbarcr = rightbar.getBoundingClientRect();
- let topbarcr = topbar.getBoundingClientRect();
-
- let xtrans = direction * (-leftbarcr.width);
- let ytrans = direction * (-topbarcr.height);
- x += xtrans;
- y += ytrans;
-
- return [x, y];
-}
-
-function scrollboxToBrowserXY(browserView, x, y) {
- [x, y] = scrollboxToViewportXY(x, y);
- return [browserView.viewportToBrowser(x),
- browserView.viewportToBrowser(y)];
-}
-
-function scrollboxToViewportRect(rect) {
- let leftbarcr = leftbar.getBoundingClientRect();
- let topbarcr = topbar.getBoundingClientRect();
-
- let xtrans = -leftbarcr.width;
- let ytrans = -topbarcr.height;
-
- rect.translate(xtrans, ytrans);
-
- return rect;
-}
-
-function getScrollboxPosition() {
- return [scrollbox.positionX, scrollbox.positionY];
-}
-
-function getContentScrollValues(browser) {
- let cwu = getBrowserDOMWindowUtils(browser);
- let scrollX = {};
- let scrollY = {};
- cwu.getScrollXY(false, scrollX, scrollY);
-
- return [scrollX.value, scrollY.value];
-}
-
-function getBrowserDOMWindowUtils(browser) {
- return browser.contentWindow
- .QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindowUtils);
-}
-
-function getBrowserClientRect(browser, el) {
- let [scrollX, scrollY] = getContentScrollValues(browser);
- let r = el.getBoundingClientRect();
-
- return new wsRect(r.left + scrollX,
- r.top + scrollY,
- r.width, r.height);
-}
-
-function scrollToElement(browser, el) {
- var elRect = getPagePosition(browser, el);
- bv.browserToViewportRect(elRect);
- elRect.round();
- this.scrollTo(elRect.x, elRect.y);
-}
-
-function zoomToElement(aElement) {
- const margin = 15;
-
- let elRect = getBrowserClientRect(browser, aElement);
- let elWidth = elRect.width;
- let vrWidth = bv.visibleRect.width;
- /* Try to set zoom-level such that once zoomed element is as wide
- * as the visible rect */
- let zoomLevel = vrtWidth / (elWidth + (2 * margin));
-
- bv.beginBatchOperation();
-
- bv.setZoomLevel(zoomLevel);
-
- /* If zoomLevel ends up clamped to less than asked for, calculate
- * how many more screen pixels will fit horizontally in addition to
- * element's width. This ensures that more of the webpage is
- * showing instead of the navbar. Bug 480595. */
- let xpadding = Math.max(margin, vrWidth - bv.browserToViewport(elWidth));
-
- // XXX TODO these arguments are wrong, we still have to transform the coordinates
- // from viewport to scrollbox before sending them to scrollTo
- this.scrollTo(Math.floor(Math.max(bv.browserToViewport(elRect.x) - xpadding, 0)),
- Math.floor(Math.max(bv.browserToViewport(elRect.y) - margin, 0)));
-
- bv.commitBatchOperation();
-}
-
-function zoomFromElement(browser, aElement) {
- let elRect = getBrowserClientRect(browser, aElement);
-
- bv.beginBatchOperation();
-
- // pan to the element
- // don't bother with x since we're zooming all the way out
- bv.zoomToPage();
-
- // XXX have this center the element on the page
- // XXX TODO these arguments are wrong, we still have to transform the coordinates
- // from viewport to scrollbox before sending them to scrollTo
- this.scrollTo(0, Math.floor(Math.max(0, bv.browserToViewport(elRect.y))));
-
- bv.commitBatchOperation();
-}
-
-/**
- * Retrieve the content element for a given point in client coordinates
- * (relative to the top left corner of the chrome window).
- */
-function elementFromPoint(browser, browserView, x, y) {
- [x, y] = scrollboxToBrowserXY(browserView, x, y);
- let cwu = getBrowserDOMWindowUtils(browser);
- return cwu.elementFromPoint(x, y,
- true, /* ignore root scroll frame*/
- false); /* don't flush layout */
-}
-
-/* ensures that a given content element is visible */
-function ensureElementIsVisible(browser, aElement) {
- let elRect = getBrowserClientRect(browser, aElement);
-
- bv.browserToViewportRect(elRect);
-
- let curRect = bv.visibleRect;
- let newx = curRect.x;
- let newy = curRect.y;
-
- if (elRect.x < curRect.x || elRect.width > curRect.width) {
- newx = elRect.x;
- } else if (elRect.x + elRect.width > curRect.x + curRect.width) {
- newx = elRect.x - curRect.width + elRect.width;
- }
-
- if (elRect.y < curRect.y || elRect.height > curRect.height) {
- newy = elRect.y;
- } else if (elRect.y + elRect.height > curRect.y + curRect.height) {
- newy = elRect.y - curRect.height + elRect.height;
- }
-
- // XXX TODO these arguments are wrong, we still have to transform the coordinates
- // from viewport to scrollbox before sending them to scrollTo
- this.scrollTo(newx, newy);
-}
-
-// this is a mehful way of getting the visible rect in scrollbox coordinates
-// that we use in this here lab environment and hopefully nowhere in real fennec
-function getVisibleRect() {
- let w = window.innerWidth;
- let h = window.innerHeight;
-
- let [x, y] = getScrollboxPosition();
-
- return new wsRect(x, y, w, h);
-}
-
-]]>
-</script>
-
-<scrollbox id="scrollbox" style="-moz-box-orient: vertical; overflow: scroll;" flex="1">
- <hbox id="top_urlbar" style="background-color: pink"><textbox flex="1"/></hbox>
- <hbox style="position: relative">
- <vbox id="left_sidebar" class="sidebar" style="background-color: red"><button label="left sidebar"/></vbox>
- <box>
- <html:div id="tile_container" style="position: relative; width: 800px; height: 480px; overflow: -moz-hidden-unscrollable;"/>
- </box>
- <vbox id="right_sidebar" class="sidebar" style="background-color: blue"><button label="right sidebar"/></vbox>
- </hbox>
-</scrollbox>
-
- <box>
- <html:div style="position: relative; overflow: hidden; max-width: 0px; max-height: 0px; visibility: hidden;">
- <html:div id="browsers" style="position: absolute;">
- <!-- <browser id="googlenews" src="http://www.webhamster.com/" type="content" remote="true" style="width: 1024px; height: 614px"/> -->
- <iframe id="googlenews" src="http://news.google.com/" type="content" remote="true" style="width: 1024px; height: 614px"/>
- </html:div>
- </html:div>
- </box>
-
-</window>
diff --git a/toolkit/content/tests/fennec-tile-testapp/chrome/content/main.xul b/toolkit/content/tests/fennec-tile-testapp/chrome/content/main.xul
deleted file mode 100644
index f829b3f4a1..0000000000
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/content/main.xul
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-
-<window id="main" title="My App" width="300" height="300"
-xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <caption label="Hello World"/>
-</window>
diff --git a/toolkit/content/tests/fennec-tile-testapp/chrome/content/overlay.js b/toolkit/content/tests/fennec-tile-testapp/chrome/content/overlay.js
deleted file mode 100644
index 8dd09af00d..0000000000
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/content/overlay.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var tile = {
- onLoad: function() {
- // initialization code
- this.initialized = true;
- this.strings = document.getElementById("tile-strings");
- },
- onMenuItemCommand: function(e) {
- var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
- .getService(Components.interfaces.nsIPromptService);
- promptService.alert(window, this.strings.getString("helloMessageTitle"),
- this.strings.getString("helloMessage"));
- },
-
-};
-window.addEventListener("load", function(e) { tile.onLoad(e); }, false);
diff --git a/toolkit/content/tests/fennec-tile-testapp/chrome/locale/en-US/tile.dtd b/toolkit/content/tests/fennec-tile-testapp/chrome/locale/en-US/tile.dtd
deleted file mode 100644
index 8cffbce359..0000000000
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/locale/en-US/tile.dtd
+++ /dev/null
@@ -1 +0,0 @@
-<!ENTITY tile.label "Your localized menuitem">
diff --git a/toolkit/content/tests/fennec-tile-testapp/chrome/locale/en-US/tile.properties b/toolkit/content/tests/fennec-tile-testapp/chrome/locale/en-US/tile.properties
deleted file mode 100644
index 72062a4f0b..0000000000
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/locale/en-US/tile.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-helloMessage=Hello World!
-helloMessageTitle=Hello
-prefMessage=Int Pref Value: %d
diff --git a/toolkit/content/tests/fennec-tile-testapp/chrome/skin/overlay.css b/toolkit/content/tests/fennec-tile-testapp/chrome/skin/overlay.css
deleted file mode 100644
index 98718057f4..0000000000
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/skin/overlay.css
+++ /dev/null
@@ -1,5 +0,0 @@
-/* This is just an example. You shouldn't do this. */
-#tile-hello
-{
- color: red ! important;
-}
diff --git a/toolkit/content/tests/fennec-tile-testapp/defaults/preferences/prefs.js b/toolkit/content/tests/fennec-tile-testapp/defaults/preferences/prefs.js
deleted file mode 100644
index 823196f8bf..0000000000
--- a/toolkit/content/tests/fennec-tile-testapp/defaults/preferences/prefs.js
+++ /dev/null
@@ -1,2 +0,0 @@
-pref("toolkit.defaultChromeURI", "chrome://tile/content/foo.xul");
-pref("browser.dom.window.dump.enabled", true);
diff --git a/toolkit/content/tests/fennec-tile-testapp/install.rdf b/toolkit/content/tests/fennec-tile-testapp/install.rdf
deleted file mode 100644
index e80fb845cc..0000000000
--- a/toolkit/content/tests/fennec-tile-testapp/install.rdf
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:em="http://www.mozilla.org/2004/em-rdf#">
- <Description about="urn:mozilla:install-manifest">
- <em:id>tile@roy</em:id>
- <em:name>tile</em:name>
- <em:version>1.0</em:version>
- <em:creator>Roy</em:creator>
- <em:targetApplication>
- <Description>
- <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <!-- firefox -->
- <em:minVersion>1.5</em:minVersion>
- <em:maxVersion>3.5.*</em:maxVersion>
- </Description>
- </em:targetApplication>
- </Description>
-</RDF>
diff --git a/toolkit/content/tests/fennec-tile-testapp/logread.py b/toolkit/content/tests/fennec-tile-testapp/logread.py
deleted file mode 100644
index afa1fa524b..0000000000
--- a/toolkit/content/tests/fennec-tile-testapp/logread.py
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/usr/bin/python
-import re, sys
-
-interesting_re = re.compile("(js_Execute|CallHook) ([^ ]+) ([^ ]+ )?([^ ]+ms)")
-class Entry:
- def __init__(self, kind, depth, file, linenum, func, timetaken):
- self.kind = kind
- self.depth = depth
- self.file = file
- self.linenum = linenum
- self.func = func
- self.timetaken = timetaken
- self.calls = 0
- self.duration = 0
-
- def __str__(self):
- return " ".join(map(str,[self.kind, self.depth, self.file, self.linenum, self.func, self.timetaken]))
-
- def id(self):
- if self.kind == "js_Execute":
- return self.file
- else:
- if self.file and self.linenum:
- strout = "%s:%d" % (self.file, self.linenum)
- if self.func:
- strout = "%s %s" % (self.func, strout)
- return strout
- elif self.func:
- return self.func
- else:
- print("No clue what my id is:"+self)
-
- def call(self, timetaken):
- self.calls += 1
- self.duration += timetaken
-
-def parse_line(line):
- m = interesting_re.search(line)
- if not m:
- return None
-
- ms_index = line.find("ms")
- depth = m.start() - ms_index - 3
- kind = m.group(1)
- func = None
- file = None
- linenum = None
- if kind == "CallHook":
- func = m.group(2)
- file = m.group(3)
- colpos = file.rfind(":")
- (file,linenum) = file[:colpos], file[colpos+1:-1]
- if linenum == "0":
- linenum = None
- else:
- linenum = int(linenum)
- offset = 1
- else:
- file = m.group(3)
-
- timetaken = None
- try:
- timetaken = float(m.group(4)[:-2])
- except:
- return None
- return Entry(kind, depth, file, linenum, func, timetaken)
-
-def compare(x,y):
- diff = x[1].calls - y[1].calls
- if diff == 0:
- return int(x[1].duration - y[1].duration)
- elif diff > 0:
- return 1
- elif diff < 0:
- return -1
-
-def frequency(ls):
- dict = {}
- for item in ls:
- id = item.id()
- stat = None
- if not id in dict:
- stat = dict[id] = item
- else:
- stat = dict[id]
- stat.call(item.timetaken)
-
- ls = dict.items()
- ls.sort(compare)
- ls = filter(lambda (_,item): item.duration > 20, ls)
-# ls = filter(lambda (_,item): item.file and item.file.find("browser.js") != -1 and item.linenum <= 1223 and item.linenum >1067, ls)
- for key, item in ls:
- print(item.calls,key, str(item.duration)+"ms")
-
-def go():
- file = sys.argv[1]
-
- ls = filter(lambda x: x != None, map(parse_line, open(file).readlines()))
-
- frequency(ls)
- print ls[0]
-
-go()
-
diff --git a/toolkit/content/tests/mochitest/mochitest.ini b/toolkit/content/tests/mochitest/mochitest.ini
deleted file mode 100644
index 1ef68c022d..0000000000
--- a/toolkit/content/tests/mochitest/mochitest.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[test_autocomplete_change_after_focus.html]
-skip-if = toolkit == "android"
-[test_mousecapture.xhtml]
-skip-if = toolkit == "android"
-
diff --git a/toolkit/content/tests/mochitest/test_autocomplete_change_after_focus.html b/toolkit/content/tests/mochitest/test_autocomplete_change_after_focus.html
deleted file mode 100644
index 540eeacf4b..0000000000
--- a/toolkit/content/tests/mochitest/test_autocomplete_change_after_focus.html
+++ /dev/null
@@ -1,105 +0,0 @@
-<!DOCTYPE html>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=998893
--->
-<head>
- <meta charset="utf-8">
- <title>Test for Bug 998893 - Ensure that input.value changes affect autocomplete</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
- <script type="text/javascript">
- /** Test for Bug 998893 **/
- add_task(function* waitForFocus() {
- yield new Promise(resolve => SimpleTest.waitForFocus(resolve));
- });
-
- add_task(function* setup() {
- yield new Promise(resolve => {
- let chromeScript = SpecialPowers.loadChromeScript(function() {
- const {FormHistory} = Components.utils.import("resource://gre/modules/FormHistory.jsm", null);
- FormHistory.update([
- { op : "bump", fieldname: "field1", value: "Default text option" },
- { op : "bump", fieldname: "field1", value: "New value option" },
- ], {
- handleCompletion: function() {
- sendAsyncMessage("Test:Resume");
- },
- });
- });
-
- chromeScript.addMessageListener("Test:Resume", function resumeListener() {
- chromeScript.removeMessageListener("Test:Resume", resumeListener);
- chromeScript.destroy();
- resolve();
- });
- });
- });
-
- add_task(function* runTest() {
- let promisePopupShown = new Promise(resolve => {
- let chromeScript = SpecialPowers.loadChromeScript(function() {
- Components.utils.import("resource://gre/modules/Services.jsm");
- let window = Services.wm.getMostRecentWindow("navigator:browser");
- let popup = window.document.getElementById("PopupAutoComplete");
- popup.addEventListener("popupshown", function popupShown() {
- popup.removeEventListener("popupshown", popupShown);
- sendAsyncMessage("Test:Resume");
- });
- });
-
- chromeScript.addMessageListener("Test:Resume", function resumeListener() {
- chromeScript.removeMessageListener("Test:Resume", resumeListener);
- chromeScript.destroy();
- resolve();
- });
- });
-
- let field = document.getElementById("field1");
-
- let promiseFieldFocus = new Promise(resolve => {
- field.addEventListener("focus", function onFocus() {
- info("field focused");
- field.value = "New value";
- sendKey("DOWN");
- resolve();
- });
- });
-
- let handleEnterPromise = new Promise(resolve => {
- function handleEnter(evt) {
- if (evt.keyCode != KeyEvent.DOM_VK_RETURN) {
- return;
- }
- info("RETURN received for phase: " + evt.eventPhase);
- is(evt.target.value, "New value option", "Check that the correct autocomplete entry was used");
- resolve();
- }
-
- field.addEventListener("keypress", handleEnter, true);
- });
-
- field.focus();
-
- yield promiseFieldFocus;
-
- yield promisePopupShown;
-
- sendKey("DOWN");
- sendKey("RETURN");
- sendKey("RETURN");
-
- yield handleEnterPromise;
- });
- </script>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=998893">Mozilla Bug 998893</a>
-<p id="display"><input id="field1" value="Default text"></p>
-<div id="content" style="display: none"></div>
-<pre id="test">
-</pre>
-</body>
-</html>
diff --git a/toolkit/content/tests/mochitest/test_mousecapture.xhtml b/toolkit/content/tests/mochitest/test_mousecapture.xhtml
deleted file mode 100644
index d4ae945bb3..0000000000
--- a/toolkit/content/tests/mochitest/test_mousecapture.xhtml
+++ /dev/null
@@ -1,340 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE HTML>
-<html xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>Mouse Capture Tests</title>
- <link rel="stylesheet" href="chrome://global/skin/" type="text/css"/>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
-</head>
-<body id="body" xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"/><div id="content" style="display: none"/><pre id="test"/>
-
-<script><![CDATA[
-
-SimpleTest.expectAssertions(6, 12);
-
-SimpleTest.waitForExplicitFinish();
-
-var captureRetargetMode = false;
-var cachedMouseDown = null;
-var previousWidth = 0, originalWidth = 0;
-var loadInWindow = false;
-
-function splitterCallback(adjustment)
-{
- var newWidth = Number($("leftbox").width); // getBoundingClientRect().width;
- var expectedWidth = previousWidth + adjustment;
- if (expectedWidth > $("splitterbox").getBoundingClientRect().width)
- expectedWidth = $("splitterbox").getBoundingClientRect().width - $("splitter").getBoundingClientRect().width;
- is(newWidth, expectedWidth, "splitter left box size (" + adjustment + ")");
- previousWidth = newWidth;
-}
-
-function selectionCallback(adjustment)
-{
- if (adjustment == 4000) {
- is(frames[0].getSelection().toString(), "This is some text", "selection after drag (" + adjustment + ")");
- ok(frames[0].scrollY > 40, "selection caused scroll down (" + adjustment + ")");
- }
- else {
- if (adjustment == 0) {
- is(frames[0].getSelection().toString(), ".", "selection after drag (" + adjustment + ")");
- }
- is(frames[0].scrollY, 0, "selection scrollY (" + adjustment + ")");
- }
-}
-
-function framesetCallback(adjustment)
-{
- var newWidth = frames[1].frames[0].document.documentElement.clientWidth;
- var expectedWidth = originalWidth + adjustment;
- if (adjustment == 0)
- expectedWidth = originalWidth - 12;
- else if (expectedWidth >= 4000)
- expectedWidth = originalWidth * 2 - 2;
-
- ok(Math.abs(newWidth - expectedWidth) <= 1, "frameset after drag (" + adjustment + "), new width " + newWidth + ", expected " + expectedWidth);
-}
-
-var otherWindow = null;
-
-function selectionScrollCheck()
-{
- var element = otherWindow.document.documentElement;
-
- var count = 0;
- function selectionScrollDone() {
- // wait for 6 scroll events to occur
- if (count++ < 6)
- return;
-
- otherWindow.removeEventListener("scroll", selectionScrollDone, false);
-
- var selectedText = otherWindow.getSelection().toString().replace(/\r/g, "");
- is(selectedText, "One\n\nTwo", "text is selected");
-
- // should have scrolled 20 pixels from the mousemove above and at least 6
- // extra 20-pixel increments from the selection scroll timer. "At least 6"
- // because we waited for 6 scroll events but multiple scrolls could get
- // coalesced into a single scroll event, and paints could be delayed when
- // the window loads when the compositor is busy. As a result, we have no
- // real guarantees about the upper bound here, and as the upper bound is
- // not important for what we're testing here, we don't check it.
- var scrollY = otherWindow.scrollY;
- info(`Scrolled ${scrollY} pixels`);
- ok(scrollY >= 140, "selection scroll position after timer is at least 140");
- ok((scrollY % 20) == 0, "selection scroll position after timer is multiple of 20");
-
- synthesizeMouse(element, 4, otherWindow.innerHeight + 25, { type: "mouseup" }, otherWindow);
- disableNonTestMouseEvents(false);
- otherWindow.close();
-
- if (loadInWindow) {
- SimpleTest.finish();
- }
- else {
- // now try again, but open the page in a new window
- loadInWindow = true;
- synthesizeMouse(document.getElementById("custom"), 2, 2, { type: "mousedown" });
-
- // check to ensure that selection dragging scrolls the right scrollable area
- otherWindow = window.open("data:text/html,<html><p>One</p><p style='margin-top: 200px;'>Two</p><p style='margin-top: 4000px'>This is some text</p></html>", "_blank", "width=200,height=200,scrollbars=yes");
- SimpleTest.waitForFocus(selectionScrollCheck, otherWindow);
- }
- }
-
- SimpleTest.executeSoon(function () {
- disableNonTestMouseEvents(true);
- synthesizeMouse(element, 2, 2, { type: "mousedown" }, otherWindow);
- synthesizeMouse(element, 100, otherWindow.innerHeight + 20, { type: "mousemove" }, otherWindow);
- otherWindow.addEventListener("scroll", selectionScrollDone, false);
- });
-}
-
-function runTests()
-{
- previousWidth = $("leftbox").getBoundingClientRect().width;
- runCaptureTest($("splitter"), splitterCallback);
-
- var custom = document.getElementById("custom");
- runCaptureTest(custom);
-
- synthesizeMouseExpectEvent($("rightbox"), 2, 2, { type: "mousemove" },
- $("rightbox"), "mousemove", "setCapture and releaseCapture");
-
- custom.setCapture();
- synthesizeMouseExpectEvent($("leftbox"), 2, 2, { type: "mousemove" },
- $("leftbox"), "mousemove", "setCapture fails on non mousedown");
-
- var custom2 = document.getElementById("custom2");
- synthesizeMouse(custom2, 2, 2, { type: "mousedown" });
- synthesizeMouseExpectEvent($("leftbox"), 2, 2, { type: "mousemove" },
- $("leftbox"), "mousemove", "document.releaseCapture releases capture");
-
- var custom3 = document.getElementById("custom3");
- synthesizeMouse(custom3, 2, 2, { type: "mousedown" });
- synthesizeMouseExpectEvent($("leftbox"), 2, 2, { type: "mousemove" },
- $("leftbox"), "mousemove", "element.releaseCapture releases capture");
-
- var custom4 = document.getElementById("custom4");
- synthesizeMouse(custom4, 2, 2, { type: "mousedown" });
- synthesizeMouseExpectEvent($("leftbox"), 2, 2, { type: "mousemove" },
- custom4, "mousemove", "element.releaseCapture during mousemove before releaseCapture");
- synthesizeMouseExpectEvent($("leftbox"), 2, 2, { type: "mousemove" },
- $("leftbox"), "mousemove", "element.releaseCapture during mousemove after releaseCapture");
-
- var custom5 = document.getElementById("custom5");
- runCaptureTest(custom5);
- captureRetargetMode = true;
- runCaptureTest(custom5);
- captureRetargetMode = false;
-
- var custom6 = document.getElementById("custom6");
- synthesizeMouse(custom6, 2, 2, { type: "mousedown" });
- synthesizeMouseExpectEvent($("leftbox"), 2, 2, { type: "mousemove" },
- $("leftbox"), "mousemove", "setCapture only works on elements in documents");
- synthesizeMouse(custom6, 2, 2, { type: "mouseup" });
-
- // test that mousedown on an image with setCapture followed by a big enough
- // mouse move does not start a drag (bug 517737)
- var image = document.getElementById("image");
- image.scrollIntoView();
- synthesizeMouse(image, 2, 2, { type: "mousedown" });
- synthesizeMouseExpectEvent($("leftbox"), 2, 2, { type: "mousemove" },
- image, "mousemove", "setCapture works on images");
- synthesizeMouse(image, 2, 2, { type: "mouseup" });
-
- window.scroll(0, 0);
-
- // save scroll
- var scrollX = parent ? parent.scrollX : 0;
- var scrollY = parent ? parent.scrollY : 0;
-
- var b = frames[0].document.getElementById("b");
-// runCaptureTest(b, selectionCallback);
-
- // restore scroll
- if (parent) parent.scroll(scrollX, scrollY);
-
-// frames[0].getSelection().collapseToStart();
-
- var body = frames[0].document.body;
- var fixed = frames[0].document.getElementById("fixed");
- function captureOnBody() { body.setCapture() }
- body.addEventListener("mousedown", captureOnBody, true);
- synthesizeMouse(body, 8, 8, { type: "mousedown" }, frames[0]);
- body.removeEventListener("mousedown", captureOnBody, true);
- synthesizeMouseExpectEvent(fixed, 2, 2, { type: "mousemove" },
- fixed, "mousemove", "setCapture on body retargets to root node", frames[0]);
- synthesizeMouse(body, 8, 8, { type: "mouseup" }, frames[0]);
-
- previousWidth = frames[1].frames[0].document.documentElement.clientWidth;
- originalWidth = previousWidth;
- runCaptureTest(frames[1].document.documentElement.lastChild, framesetCallback);
-
- // ensure that clicking on an element where the frame disappears doesn't crash
- synthesizeMouse(frames[2].document.getElementById("input"), 8, 8, { type: "mousedown" }, frames[2]);
- synthesizeMouse(frames[2].document.getElementById("input"), 8, 8, { type: "mouseup" }, frames[2]);
-
- var select = document.getElementById("select");
- select.scrollIntoView();
-
- synthesizeMouse(document.getElementById("option3"), 2, 2, { type: "mousedown" });
- synthesizeMouse(document.getElementById("option3"), 2, 1000, { type: "mousemove" });
- is(select.selectedIndex, 2, "scroll select");
- synthesizeMouse(document.getElementById("select"), 2, 2, { type: "mouseup" });
- window.scroll(0, 0);
-
- synthesizeMouse(custom, 2, 2, { type: "mousedown" });
-
- // check to ensure that selection dragging scrolls the right scrollable area.
- // This should open the page in a new tab.
-
- var topPos = window.innerHeight;
- otherWindow = window.open("data:text/html,<html><p>One</p><p style='margin-top: " + topPos + "'>Two</p><p style='margin-top: 4000px'>This is some text</p></html>", "_blank");
- SimpleTest.waitForFocus(selectionScrollCheck, otherWindow);
-}
-
-function runCaptureTest(element, callback)
-{
- var expectedTarget = null;
-
- var win = element.ownerDocument.defaultView;
-
- function mouseMoved(event) {
- is(event.originalTarget, expectedTarget,
- expectedTarget.id + " target for point " + event.clientX + "," + event.clientY);
- }
- win.addEventListener("mousemove", mouseMoved, false);
-
- expectedTarget = element;
-
- var basepoint = element.localName == "frameset" ? 50 : 2;
- synthesizeMouse(element, basepoint, basepoint, { type: "mousedown" }, win);
-
- // in setCapture(true) mode, all events should fire on custom5. In
- // setCapture(false) mode, events can fire at a descendant
- if (expectedTarget == $("custom5") && !captureRetargetMode)
- expectedTarget = $("custom5spacer");
-
- // releaseCapture should do nothing for an element which isn't capturing
- $("splitterbox").releaseCapture();
-
- synthesizeMouse(element, basepoint + 2, basepoint + 2, { type: "mousemove" }, win);
- if (callback)
- callback(2);
-
- if (expectedTarget == $("custom5spacer") && !captureRetargetMode)
- expectedTarget = $("custom5inner");
-
- if (element.id == "b") {
- var tooltip = document.getElementById("tooltip");
- tooltip.openPopup();
- tooltip.hidePopup();
- }
-
- synthesizeMouse(element, basepoint + 25, basepoint + 25, { type: "mousemove" }, win);
- if (callback)
- callback(25);
-
- expectedTarget = element.localName == "b" ? win.document.documentElement : element;
- synthesizeMouse(element, basepoint + 4000, basepoint + 4000, { type: "mousemove" }, win);
- if (callback)
- callback(4000);
- synthesizeMouse(element, basepoint - 12, basepoint - 12, { type: "mousemove" }, win);
- if (callback)
- callback(-12);
-
- expectedTarget = element.localName == "frameset" ? element : win.document.documentElement;
- synthesizeMouse(element, basepoint + 30, basepoint + 30, { type: "mouseup" }, win);
- synthesizeMouse(win.document.documentElement, 2, 2, { type: "mousemove" }, win);
- if (callback)
- callback(0);
-
- win.removeEventListener("mousemove", mouseMoved, false);
-}
-
-SimpleTest.waitForFocus(runTests);
-
-]]>
-</script>
-
-<xul:vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" align="start">
- <tooltip id="tooltip">
- <label value="Test"/>
- </tooltip>
-
- <hbox id="splitterbox" style="margin-top: 5px;" onmousedown="this.setCapture()">
- <hbox id="leftbox" width="100" flex="1"/>
- <splitter id="splitter" height="5"/>
- <hbox id="rightbox" width="100" flex="1"/>
- </hbox>
-
- <vbox id="custom" width="10" height="10" onmousedown="this.setCapture(); cachedMouseDown = event;"/>
- <vbox id="custom2" width="10" height="10" onmousedown="this.setCapture(); document.releaseCapture();"/>
- <vbox id="custom3" width="10" height="10" onmousedown="this.setCapture(); this.releaseCapture();"/>
- <vbox id="custom4" width="10" height="10" onmousedown="this.setCapture();"
- onmousemove="this.releaseCapture();"/>
- <hbox id="custom5" width="40" height="40"
- onmousedown="this.setCapture(captureRetargetMode);">
- <spacer id="custom5spacer" width="5"/>
- <hbox id="custom5inner" width="35" height="35"/>
- </hbox>
- <vbox id="custom6" width="10" height="10"
- onmousedown="document.createElement('hbox').setCapture();"/>
-</xul:vbox>
-
- <iframe width="100" height="100"
- src="data:text/html,%3Cbody style%3D'font-size%3A 40pt%3B'%3E.%3Cb id%3D'b'%3EThis%3C/b%3E is some text%3Cdiv id='fixed' style='position: fixed; left: 55px; top: 5px; width: 10px; height: 10px'%3E.%3C/div%3E%3C/body%3E"/>
-
- <iframe width="100" height="100"
- src="data:text/html,%3Cframeset cols='50%, 50%'%3E%3Cframe src='about:blank'%3E%3Cframe src='about:blank'%3E%3C/frameset%3E"/>
-
- <iframe width="100" height="100"
- src="data:text/html,%3Cinput id='input' onfocus='this.style.display = &quot;none&quot;' style='float: left;'>"/>
-
- <select id="select" xmlns="http://www.w3.org/1999/xhtml" size="4">
- <option id="option1">One</option>
- <option id="option2">Two</option>
- <option id="option3">Three</option>
- <option id="option4">Four</option>
- <option id="option5">Five</option>
- <option id="option6">Six</option>
- <option id="option7">Seven</option>
- <option id="option8">Eight</option>
- <option id="option9">Nine</option>
- <option id="option10">Ten</option>
- </select>
-
- <img id="image" xmlns="http://www.w3.org/1999/xhtml"
- onmousedown="this.setCapture();" onmouseup="this.releaseCapture();"
- ondragstart="ok(false, 'should not get a drag when a setCapture is active');"
- src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAG0lEQVR42mP8z0A%2BYKJA76jmUc2jmkc1U0EzACKcASfOgGoMAAAAAElFTkSuQmCC"/>
-
-</body>
-
-</html>
-
diff --git a/toolkit/content/tests/moz.build b/toolkit/content/tests/moz.build
deleted file mode 100644
index e540fa11f7..0000000000
--- a/toolkit/content/tests/moz.build
+++ /dev/null
@@ -1,19 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
-
-BROWSER_CHROME_MANIFESTS += ['browser/browser.ini']
-
-MOCHITEST_CHROME_MANIFESTS += [
- 'chrome/chrome.ini',
- 'widgets/chrome.ini',
-]
-
-MOCHITEST_MANIFESTS += [
- 'mochitest/mochitest.ini',
- 'widgets/mochitest.ini',
-]
diff --git a/toolkit/content/tests/reftests/bug-442419-progressmeter-max-ref.xul b/toolkit/content/tests/reftests/bug-442419-progressmeter-max-ref.xul
deleted file mode 100644
index a034b6e671..0000000000
--- a/toolkit/content/tests/reftests/bug-442419-progressmeter-max-ref.xul
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
-
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <progressmeter value="50"/> <!-- default is max = 100 -->
-</window>
-
diff --git a/toolkit/content/tests/reftests/bug-442419-progressmeter-max.xul b/toolkit/content/tests/reftests/bug-442419-progressmeter-max.xul
deleted file mode 100644
index 6225964064..0000000000
--- a/toolkit/content/tests/reftests/bug-442419-progressmeter-max.xul
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
-
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <progressmeter max="198" value="99"/> <!-- 50% -->
-</window>
-
diff --git a/toolkit/content/tests/reftests/textbox-multiline-default-value.xul b/toolkit/content/tests/reftests/textbox-multiline-default-value.xul
deleted file mode 100644
index 31a5bc556f..0000000000
--- a/toolkit/content/tests/reftests/textbox-multiline-default-value.xul
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version='1.0'?>
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- title="test textbox multiline">
- <textbox multiline='true' value='foobar'></textbox>
-</window>
diff --git a/toolkit/content/tests/reftests/textbox-multiline-empty.xul b/toolkit/content/tests/reftests/textbox-multiline-empty.xul
deleted file mode 100644
index c48f2c988f..0000000000
--- a/toolkit/content/tests/reftests/textbox-multiline-empty.xul
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version='1.0'?>
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- title="test textbox multiline">
- <textbox multiline='true'></textbox>
-</window>
diff --git a/toolkit/content/tests/unit/.eslintrc.js b/toolkit/content/tests/unit/.eslintrc.js
deleted file mode 100644
index fee088c179..0000000000
--- a/toolkit/content/tests/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/content/tests/unit/test_contentAreaUtils.js b/toolkit/content/tests/unit/test_contentAreaUtils.js
deleted file mode 100644
index 970e779ce8..0000000000
--- a/toolkit/content/tests/unit/test_contentAreaUtils.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var Ci = Components.interfaces;
-var Cc = Components.classes;
-var Cr = Components.results;
-
-function loadUtilsScript() {
- var loader = Cc["@mozilla.org/moz/jssubscript-loader;1"].
- getService(Ci.mozIJSSubScriptLoader);
- loader.loadSubScript("chrome://global/content/contentAreaUtils.js");
-}
-
-function test_urlSecurityCheck() {
- var nullPrincipal = Cc["@mozilla.org/nullprincipal;1"].
- createInstance(Ci.nsIPrincipal);
-
- const HTTP_URI = "http://www.mozilla.org/";
- const CHROME_URI = "chrome://browser/content/browser.xul";
- const DISALLOW_INHERIT_PRINCIPAL =
- Ci.nsIScriptSecurityManager.DISALLOW_INHERIT_PRINCIPAL;
-
- try {
- urlSecurityCheck(makeURI(HTTP_URI), nullPrincipal,
- DISALLOW_INHERIT_PRINCIPAL);
- }
- catch (ex) {
- do_throw("urlSecurityCheck should not throw when linking to a http uri with a null principal");
- }
-
- // urlSecurityCheck also supports passing the url as a string
- try {
- urlSecurityCheck(HTTP_URI, nullPrincipal,
- DISALLOW_INHERIT_PRINCIPAL);
- }
- catch (ex) {
- do_throw("urlSecurityCheck failed to handle the http URI as a string (uri spec)");
- }
-
- let shouldThrow = true;
- try {
- urlSecurityCheck(CHROME_URI, nullPrincipal,
- DISALLOW_INHERIT_PRINCIPAL);
- }
- catch (ex) {
- shouldThrow = false;
- }
- if (shouldThrow)
- do_throw("urlSecurityCheck should throw when linking to a chrome uri with a null principal");
-}
-
-function test_stringBundle() {
- // This test verifies that the elements that can be used as file picker title
- // keys in the save* functions are actually present in the string bundle.
- // These keys are part of the contentAreaUtils.js public API.
- var validFilePickerTitleKeys = [
- "SaveImageTitle",
- "SaveVideoTitle",
- "SaveAudioTitle",
- "SaveLinkTitle",
- ];
-
- for (let filePickerTitleKey of validFilePickerTitleKeys) {
- // Just check that the string exists
- try {
- ContentAreaUtils.stringBundle.GetStringFromName(filePickerTitleKey);
- } catch (e) {
- do_throw("Error accessing file picker title key: " + filePickerTitleKey);
- }
- }
-}
-
-function run_test()
-{
- loadUtilsScript();
- test_urlSecurityCheck();
- test_stringBundle();
-}
diff --git a/toolkit/content/tests/unit/xpcshell.ini b/toolkit/content/tests/unit/xpcshell.ini
deleted file mode 100644
index 33a0383bd4..0000000000
--- a/toolkit/content/tests/unit/xpcshell.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[DEFAULT]
-head =
-tail =
-
-[test_contentAreaUtils.js]
diff --git a/toolkit/content/tests/widgets/.eslintrc.js b/toolkit/content/tests/widgets/.eslintrc.js
deleted file mode 100644
index e149193751..0000000000
--- a/toolkit/content/tests/widgets/.eslintrc.js
+++ /dev/null
@@ -1,8 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../testing/mochitest/mochitest.eslintrc.js",
- "../../../../testing/mochitest/chrome.eslintrc.js"
- ]
-};
diff --git a/toolkit/content/tests/widgets/audio.ogg b/toolkit/content/tests/widgets/audio.ogg
deleted file mode 100644
index a553c23e73..0000000000
--- a/toolkit/content/tests/widgets/audio.ogg
+++ /dev/null
Binary files differ
diff --git a/toolkit/content/tests/widgets/audio.wav b/toolkit/content/tests/widgets/audio.wav
deleted file mode 100644
index c6fd5cb869..0000000000
--- a/toolkit/content/tests/widgets/audio.wav
+++ /dev/null
Binary files differ
diff --git a/toolkit/content/tests/widgets/chrome.ini b/toolkit/content/tests/widgets/chrome.ini
deleted file mode 100644
index 841b86c0fc..0000000000
--- a/toolkit/content/tests/widgets/chrome.ini
+++ /dev/null
@@ -1,20 +0,0 @@
-[DEFAULT]
-skip-if = os == 'android'
-support-files =
- tree_shared.js
- popup_shared.js
- window_menubar.xul
- seek_with_sound.ogg
-
-[test_contextmenu_nested.xul]
-skip-if = os == 'linux' # Bug 1116215
-[test_contextmenu_menugroup.xul]
-skip-if = os == 'linux' # Bug 1115088
-[test_editor_currentURI.xul]
-[test_menubar.xul]
-skip-if = os == 'mac'
-[test_popupanchor.xul]
-skip-if = os == 'android'
-[test_popupreflows.xul]
-[test_tree_column_reorder.xul]
-[test_videocontrols_onclickplay.html]
diff --git a/toolkit/content/tests/widgets/head.js b/toolkit/content/tests/widgets/head.js
deleted file mode 100644
index c2ae0c7ae1..0000000000
--- a/toolkit/content/tests/widgets/head.js
+++ /dev/null
@@ -1,23 +0,0 @@
-"use strict";
-
-function waitForCondition(condition, nextTest, errorMsg) {
- var tries = 0;
- var interval = setInterval(function() {
- if (tries >= 30) {
- ok(false, errorMsg);
- moveOn();
- }
- var conditionPassed;
- try {
- conditionPassed = condition();
- } catch (e) {
- ok(false, e + "\n" + e.stack);
- conditionPassed = false;
- }
- if (conditionPassed) {
- moveOn();
- }
- tries++;
- }, 100);
- var moveOn = function() { clearInterval(interval); nextTest(); };
-}
diff --git a/toolkit/content/tests/widgets/mochitest.ini b/toolkit/content/tests/widgets/mochitest.ini
deleted file mode 100644
index abc77c80ba..0000000000
--- a/toolkit/content/tests/widgets/mochitest.ini
+++ /dev/null
@@ -1,40 +0,0 @@
-[DEFAULT]
-support-files =
- audio.wav
- audio.ogg
- seek_with_sound.ogg
- head.js
- tree_shared.js
- videocontrols_direction-1-ref.html
- videocontrols_direction-1a.html
- videocontrols_direction-1b.html
- videocontrols_direction-1c.html
- videocontrols_direction-1d.html
- videocontrols_direction-1e.html
- videocontrols_direction-2-ref.html
- videocontrols_direction-2a.html
- videocontrols_direction-2b.html
- videocontrols_direction-2c.html
- videocontrols_direction-2d.html
- videocontrols_direction-2e.html
- videocontrols_direction_test.js
- videomask.css
-
-[test_audiocontrols_dimensions.html]
-skip-if = toolkit == 'android'
-[test_mousecapture_area.html]
-[test_videocontrols.html]
-tags = fullscreen
-skip-if = toolkit == 'android' #TIMED_OUT
-[test_videocontrols_vtt.html]
-skip-if = toolkit == 'android'
-[test_videocontrols_iframe_fullscreen.html]
-[test_videocontrols_audio.html]
-[test_videocontrols_audio_direction.html]
-[test_videocontrols_jsdisabled.html]
-skip-if = toolkit == 'android' # bug 1272646
-[test_videocontrols_standalone.html]
-skip-if = true # bug 1075573, bug 1262130
-[test_videocontrols_video_direction.html]
-skip-if = os == 'win'
-[test_bug898940.html]
diff --git a/toolkit/content/tests/widgets/popup_shared.js b/toolkit/content/tests/widgets/popup_shared.js
deleted file mode 100644
index 49735c5ad8..0000000000
--- a/toolkit/content/tests/widgets/popup_shared.js
+++ /dev/null
@@ -1,424 +0,0 @@
-/*
- * This script is used for menu and popup tests. Call startPopupTests to start
- * the tests, passing an array of tests as an argument. Each test is an object
- * with the following properties:
- * testname - name of the test
- * test - function to call to perform the test
- * events - a list of events that are expected to be fired in sequence
- * as a result of calling the 'test' function. This list should be
- * an array of strings of the form "eventtype targetid" where
- * 'eventtype' is the event type and 'targetid' is the id of
- * target of the event. This function will be passed two
- * arguments, the testname and the step argument.
- * Alternatively, events may be a function which returns the array
- * of events. This can be used when the events vary per platform.
- * result - function to call after all the events have fired to check
- * for additional results. May be null. This function will be
- * passed two arguments, the testname and the step argument.
- * steps - optional array of values. The test will be repeated for
- * each step, passing each successive value within the array to
- * the test and result functions
- * autohide - if set, should be set to the id of a popup to hide after
- * the test is complete. This is a convenience for some tests.
- * condition - an optional function which, if it returns false, causes the
- * test to be skipped.
- * end - used for debugging. Set to true to stop the tests after running
- * this one.
- */
-
-const menuactiveAttribute = "_moz-menuactive";
-
-var gPopupTests = null;
-var gTestIndex = -1;
-var gTestStepIndex = 0;
-var gTestEventIndex = 0;
-var gAutoHide = false;
-var gExpectedEventDetails = null;
-var gExpectedTriggerNode = null;
-var gWindowUtils;
-var gPopupWidth = -1, gPopupHeight = -1;
-
-function startPopupTests(tests)
-{
- document.addEventListener("popupshowing", eventOccurred, false);
- document.addEventListener("popupshown", eventOccurred, false);
- document.addEventListener("popuphiding", eventOccurred, false);
- document.addEventListener("popuphidden", eventOccurred, false);
- document.addEventListener("command", eventOccurred, false);
- document.addEventListener("DOMMenuItemActive", eventOccurred, false);
- document.addEventListener("DOMMenuItemInactive", eventOccurred, false);
- document.addEventListener("DOMMenuInactive", eventOccurred, false);
- document.addEventListener("DOMMenuBarActive", eventOccurred, false);
- document.addEventListener("DOMMenuBarInactive", eventOccurred, false);
-
- gPopupTests = tests;
- gWindowUtils = SpecialPowers.getDOMWindowUtils(window);
-
- goNext();
-}
-
-function finish()
-{
- if (window.opener) {
- window.close();
- window.opener.SimpleTest.finish();
- return;
- }
- SimpleTest.finish();
- return;
-}
-
-function ok(condition, message) {
- if (window.opener)
- window.opener.SimpleTest.ok(condition, message);
- else
- SimpleTest.ok(condition, message);
-}
-
-function is(left, right, message) {
- if (window.opener)
- window.opener.SimpleTest.is(left, right, message);
- else
- SimpleTest.is(left, right, message);
-}
-
-function disableNonTestMouse(aDisable) {
- gWindowUtils.disableNonTestMouseEvents(aDisable);
-}
-
-function eventOccurred(event)
-{
- if (gPopupTests.length <= gTestIndex) {
- ok(false, "Extra " + event.type + " event fired");
- return;
- }
-
- var test = gPopupTests[gTestIndex];
- if ("autohide" in test && gAutoHide) {
- if (event.type == "DOMMenuInactive") {
- gAutoHide = false;
- setTimeout(goNextStep, 0);
- }
- return;
- }
-
- var events = test.events;
- if (typeof events == "function")
- events = events();
- if (events) {
- if (events.length <= gTestEventIndex) {
- ok(false, "Extra " + event.type + " event fired for " + event.target.id +
- " " +gPopupTests[gTestIndex].testname);
- return;
- }
-
- var eventitem = events[gTestEventIndex].split(" ");
- var matches;
- if (eventitem[1] == "#tooltip") {
- is(event.originalTarget.localName, "tooltip",
- test.testname + " event.originalTarget.localName is 'tooltip'");
- is(event.originalTarget.getAttribute("default"), "true",
- test.testname + " event.originalTarget default attribute is 'true'");
- matches = event.originalTarget.localName == "tooltip" &&
- event.originalTarget.getAttribute("default") == "true";
- } else {
- is(event.type, eventitem[0],
- test.testname + " event type " + event.type + " fired");
- is(event.target.id, eventitem[1],
- test.testname + " event target ID " + event.target.id);
- matches = eventitem[0] == event.type && eventitem[1] == event.target.id;
- }
-
- var modifiersMask = eventitem[2];
- if (modifiersMask) {
- var m = "";
- m += event.altKey ? '1' : '0';
- m += event.ctrlKey ? '1' : '0';
- m += event.shiftKey ? '1' : '0';
- m += event.metaKey ? '1' : '0';
- is(m, modifiersMask, test.testname + " modifiers mask matches");
- }
-
- var expectedState;
- switch (event.type) {
- case "popupshowing": expectedState = "showing"; break;
- case "popupshown": expectedState = "open"; break;
- case "popuphiding": expectedState = "hiding"; break;
- case "popuphidden": expectedState = "closed"; break;
- }
-
- if (gExpectedTriggerNode && event.type == "popupshowing") {
- if (gExpectedTriggerNode == "notset") // check against null instead
- gExpectedTriggerNode = null;
-
- is(event.originalTarget.triggerNode, gExpectedTriggerNode, test.testname + " popupshowing triggerNode");
- var isTooltip = (event.target.localName == "tooltip");
- is(document.popupNode, isTooltip ? null : gExpectedTriggerNode,
- test.testname + " popupshowing document.popupNode");
- is(document.tooltipNode, isTooltip ? gExpectedTriggerNode : null,
- test.testname + " popupshowing document.tooltipNode");
- }
-
- if (expectedState)
- is(event.originalTarget.state, expectedState,
- test.testname + " " + event.type + " state");
-
- if (matches) {
- gTestEventIndex++
- if (events.length <= gTestEventIndex)
- setTimeout(checkResult, 0);
- }
- }
-}
-
-function checkResult()
-{
- var step = null;
- var test = gPopupTests[gTestIndex];
- if ("steps" in test)
- step = test.steps[gTestStepIndex];
-
- if ("result" in test)
- test.result(test.testname, step);
-
- if ("autohide" in test) {
- gAutoHide = true;
- document.getElementById(test.autohide).hidePopup();
- return;
- }
-
- goNextStep();
-}
-
-function goNextStep()
-{
- gTestEventIndex = 0;
-
- var step = null;
- var test = gPopupTests[gTestIndex];
- if ("steps" in test) {
- gTestStepIndex++;
- step = test.steps[gTestStepIndex];
- if (gTestStepIndex < test.steps.length) {
- test.test(test.testname, step);
- return;
- }
- }
-
- goNext();
-}
-
-function goNext()
-{
- // We want to continue after the next animation frame so that
- // we're in a stable state and don't get spurious mouse events at unexpected targets.
- window.requestAnimationFrame(
- function() {
- setTimeout(goNextStepSync, 0);
- }
- );
-}
-
-function goNextStepSync()
-{
- if (gTestIndex >= 0 && "end" in gPopupTests[gTestIndex] && gPopupTests[gTestIndex].end) {
- finish();
- return;
- }
-
- gTestIndex++;
- gTestStepIndex = 0;
- if (gTestIndex < gPopupTests.length) {
- var test = gPopupTests[gTestIndex];
- // Set the location hash so it's easy to see which test is running
- document.location.hash = test.testname;
-
- // skip the test if the condition returns false
- if ("condition" in test && !test.condition()) {
- goNext();
- return;
- }
-
- // start with the first step if there are any
- var step = null;
- if ("steps" in test)
- step = test.steps[gTestStepIndex];
-
- test.test(test.testname, step);
-
- // no events to check for so just check the result
- if (!("events" in test))
- checkResult();
- }
- else {
- finish();
- }
-}
-
-function openMenu(menu)
-{
- if ("open" in menu) {
- menu.open = true;
- }
- else {
- var bo = menu.boxObject;
- if (bo instanceof MenuBoxObject)
- bo.openMenu(true);
- else
- synthesizeMouse(menu, 4, 4, { });
- }
-}
-
-function closeMenu(menu, popup)
-{
- if ("open" in menu) {
- menu.open = false;
- }
- else {
- var bo = menu.boxObject;
- if (bo instanceof MenuBoxObject)
- bo.openMenu(false);
- else
- popup.hidePopup();
- }
-}
-
-function checkActive(popup, id, testname)
-{
- var activeok = true;
- var children = popup.childNodes;
- for (var c = 0; c < children.length; c++) {
- var child = children[c];
- if ((id == child.id && child.getAttribute(menuactiveAttribute) != "true") ||
- (id != child.id && child.hasAttribute(menuactiveAttribute) != "")) {
- activeok = false;
- break;
- }
- }
- ok(activeok, testname + " item " + (id ? id : "none") + " active");
-}
-
-function checkOpen(menuid, testname)
-{
- var menu = document.getElementById(menuid);
- if ("open" in menu)
- ok(menu.open, testname + " " + menuid + " menu is open");
- else if (menu.boxObject instanceof MenuBoxObject)
- ok(menu.getAttribute("open") == "true", testname + " " + menuid + " menu is open");
-}
-
-function checkClosed(menuid, testname)
-{
- var menu = document.getElementById(menuid);
- if ("open" in menu)
- ok(!menu.open, testname + " " + menuid + " menu is open");
- else if (menu.boxObject instanceof MenuBoxObject)
- ok(!menu.hasAttribute("open"), testname + " " + menuid + " menu is closed");
-}
-
-function convertPosition(anchor, align)
-{
- if (anchor == "topleft" && align == "topleft") return "overlap";
- if (anchor == "topleft" && align == "topright") return "start_before";
- if (anchor == "topleft" && align == "bottomleft") return "before_start";
- if (anchor == "topright" && align == "topleft") return "end_before";
- if (anchor == "topright" && align == "bottomright") return "before_end";
- if (anchor == "bottomleft" && align == "bottomright") return "start_after";
- if (anchor == "bottomleft" && align == "topleft") return "after_start";
- if (anchor == "bottomright" && align == "bottomleft") return "end_after";
- if (anchor == "bottomright" && align == "topright") return "after_end";
- return "";
-}
-
-/*
- * When checking position of the bottom or right edge of the popup's rect,
- * use this instead of strict equality check of rounded values,
- * because we snap the top/left edges to pixel boundaries,
- * which can shift the bottom/right up to 0.5px from its "ideal" location,
- * and could cause it to round differently. (See bug 622507.)
- */
-function isWithinHalfPixel(a, b)
-{
- return Math.abs(a - b) <= 0.5;
-}
-
-function compareEdge(anchor, popup, edge, offsetX, offsetY, testname)
-{
- testname += " " + edge;
-
- checkOpen(anchor.id, testname);
-
- var anchorrect = anchor.getBoundingClientRect();
- var popuprect = popup.getBoundingClientRect();
- var check1 = false, check2 = false;
-
- if (gPopupWidth == -1) {
- ok((Math.round(popuprect.right) - Math.round(popuprect.left)) &&
- (Math.round(popuprect.bottom) - Math.round(popuprect.top)),
- testname + " size");
- }
- else {
- is(Math.round(popuprect.width), gPopupWidth, testname + " width");
- is(Math.round(popuprect.height), gPopupHeight, testname + " height");
- }
-
- var spaceIdx = edge.indexOf(" ");
- if (spaceIdx > 0) {
- let cornerX, cornerY;
- let [position, align] = edge.split(" ");
- switch (position) {
- case "topleft": cornerX = anchorrect.left; cornerY = anchorrect.top; break;
- case "topcenter": cornerX = anchorrect.left + anchorrect.width / 2; cornerY = anchorrect.top; break;
- case "topright": cornerX = anchorrect.right; cornerY = anchorrect.top; break;
- case "leftcenter": cornerX = anchorrect.left; cornerY = anchorrect.top + anchorrect.height / 2; break;
- case "rightcenter": cornerX = anchorrect.right; cornerY = anchorrect.top + anchorrect.height / 2; break;
- case "bottomleft": cornerX = anchorrect.left; cornerY = anchorrect.bottom; break;
- case "bottomcenter": cornerX = anchorrect.left + anchorrect.width / 2; cornerY = anchorrect.bottom; break;
- case "bottomright": cornerX = anchorrect.right; cornerY = anchorrect.bottom; break;
- }
-
- switch (align) {
- case "topleft": cornerX += offsetX; cornerY += offsetY; break;
- case "topright": cornerX += -popuprect.width + offsetX; cornerY += offsetY; break;
- case "bottomleft": cornerX += offsetX; cornerY += -popuprect.height + offsetY; break;
- case "bottomright": cornerX += -popuprect.width + offsetX; cornerY += -popuprect.height + offsetY; break;
- }
-
- is(Math.round(popuprect.left), Math.round(cornerX), testname + " x position");
- is(Math.round(popuprect.top), Math.round(cornerY), testname + " y position");
- return;
- }
-
- if (edge == "after_pointer") {
- is(Math.round(popuprect.left), Math.round(anchorrect.left) + offsetX, testname + " x position");
- is(Math.round(popuprect.top), Math.round(anchorrect.top) + offsetY + 21, testname + " y position");
- return;
- }
-
- if (edge == "overlap") {
- ok(Math.round(anchorrect.left) + offsetY == Math.round(popuprect.left) &&
- Math.round(anchorrect.top) + offsetY == Math.round(popuprect.top),
- testname + " position");
- return;
- }
-
- if (edge.indexOf("before") == 0)
- check1 = isWithinHalfPixel(anchorrect.top + offsetY, popuprect.bottom);
- else if (edge.indexOf("after") == 0)
- check1 = (Math.round(anchorrect.bottom) + offsetY == Math.round(popuprect.top));
- else if (edge.indexOf("start") == 0)
- check1 = isWithinHalfPixel(anchorrect.left + offsetX, popuprect.right);
- else if (edge.indexOf("end") == 0)
- check1 = (Math.round(anchorrect.right) + offsetX == Math.round(popuprect.left));
-
- if (0 < edge.indexOf("before"))
- check2 = (Math.round(anchorrect.top) + offsetY == Math.round(popuprect.top));
- else if (0 < edge.indexOf("after"))
- check2 = isWithinHalfPixel(anchorrect.bottom + offsetY, popuprect.bottom);
- else if (0 < edge.indexOf("start"))
- check2 = (Math.round(anchorrect.left) + offsetX == Math.round(popuprect.left));
- else if (0 < edge.indexOf("end"))
- check2 = isWithinHalfPixel(anchorrect.right + offsetX, popuprect.right);
-
- ok(check1 && check2, testname + " position");
-}
diff --git a/toolkit/content/tests/widgets/seek_with_sound.ogg b/toolkit/content/tests/widgets/seek_with_sound.ogg
deleted file mode 100644
index c86d9946bd..0000000000
--- a/toolkit/content/tests/widgets/seek_with_sound.ogg
+++ /dev/null
Binary files differ
diff --git a/toolkit/content/tests/widgets/test_audiocontrols_dimensions.html b/toolkit/content/tests/widgets/test_audiocontrols_dimensions.html
deleted file mode 100644
index 0f295cce9b..0000000000
--- a/toolkit/content/tests/widgets/test_audiocontrols_dimensions.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Audio controls test</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-
-<div id="content">
- <audio id="audio" controls preload="auto"></audio>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
- function loadedmetadata(event) {
- is(event.type, "loadedmetadata", "checking event type");
- is(audio.clientHeight, 28, "checking height of audio element");
-
- SimpleTest.finish();
- }
-
- var audio = document.getElementById("audio");
-
- SpecialPowers.pushPrefEnv({"set": [["media.cache_size", 40000]]}, startTest);
- function startTest() {
- // Kick off test once audio has loaded.
- audio.addEventListener("loadedmetadata", loadedmetadata, false);
- audio.src = "audio.wav";
- }
-
- SimpleTest.waitForExplicitFinish();
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/test_bug898940.html b/toolkit/content/tests/widgets/test_bug898940.html
deleted file mode 100644
index 10a6a80d93..0000000000
--- a/toolkit/content/tests/widgets/test_bug898940.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Test that an audio element that's already playing when controls are attached displays the controls</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-
-<div id="content">
- <audio id="audio" controls src="audio.ogg"></audio>
-</div>
-
-<pre id="test">
-<script class="testbody">
- var audio = document.getElementById("audio");
- audio.play();
- audio.ontimeupdate = function doTest() {
- ok(audio.getBoundingClientRect().height > 0,
- "checking audio element height is greater than zero");
- audio.ontimeupdate = null;
- SimpleTest.finish();
- }
-
- SimpleTest.waitForExplicitFinish();
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/test_contextmenu_menugroup.xul b/toolkit/content/tests/widgets/test_contextmenu_menugroup.xul
deleted file mode 100644
index 594c0264d6..0000000000
--- a/toolkit/content/tests/widgets/test_contextmenu_menugroup.xul
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Context menugroup Tests"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
- <script type="application/javascript" src="popup_shared.js"></script>
-
-<menupopup id="context">
- <menugroup>
- <menuitem id="a"/>
- <menuitem id="b"/>
- </menugroup>
- <menuitem id="c" label="c"/>
- <menugroup/>
-</menupopup>
-
-<button label="Check"/>
-
-<vbox id="popuparea" popup="context" width="20" height="20"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-var gMenuPopup = $("context");
-ok(gMenuPopup, "Got the reference to the context menu");
-
-var popupTests = [
-{
- testname: "one-down-key",
- condition: function() { return (navigator.platform.indexOf("Mac") == -1); },
- events: [ "popupshowing context", "popupshown context", "DOMMenuItemActive a" ],
- test: function () {
- synthesizeMouse($("popuparea"), 4, 4, {});
- synthesizeKey("VK_DOWN", {});
- },
- result: function (testname) {
- checkActive(gMenuPopup, "a", testname);
- }
-},
-{
- testname: "two-down-keys",
- condition: function() { return (navigator.platform.indexOf("Mac") == -1); },
- events: [ "DOMMenuItemInactive a", "DOMMenuItemActive b" ],
- test: () => synthesizeKey("VK_DOWN", {}),
- result: function (testname) {
- checkActive(gMenuPopup, "b", testname);
- }
-},
-{
- testname: "three-down-keys",
- condition: function() { return (navigator.platform.indexOf("Mac") == -1); },
- events: [ "DOMMenuItemInactive b", "DOMMenuItemActive c" ],
- test: () => synthesizeKey("VK_DOWN", {}),
- result: function (testname) {
- checkActive(gMenuPopup, "c", testname);
- }
-},
-{
- testname: "three-down-keys-one-up-key",
- condition: function() { return (navigator.platform.indexOf("Mac") == -1); },
- events: [ "DOMMenuItemInactive c", "DOMMenuItemActive b" ],
- test: () => synthesizeKey("VK_UP", {}),
- result: function (testname) {
- checkActive(gMenuPopup, "b", testname);
- }
-},
-{
- testname: "three-down-keys-two-up-keys",
- condition: function() { return (navigator.platform.indexOf("Mac") == -1); },
- events: [ "DOMMenuItemInactive b", "DOMMenuItemActive a" ],
- test: () => synthesizeKey("VK_UP", {}),
- result: function (testname) {
- checkActive(gMenuPopup, "a", testname);
- }
-},
-{
- testname: "three-down-keys-three-up-key",
- condition: function() { return (navigator.platform.indexOf("Mac") == -1); },
- events: [ "DOMMenuItemInactive a", "DOMMenuItemActive c" ],
- test: () => synthesizeKey("VK_UP", {}),
- result: function (testname) {
- checkActive(gMenuPopup, "c", testname);
- }
-},
-];
-
-SimpleTest.waitForFocus(function runTest() {
- startPopupTests(popupTests);
-});
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml"><p id="display"/></body>
-
-</window>
diff --git a/toolkit/content/tests/widgets/test_contextmenu_nested.xul b/toolkit/content/tests/widgets/test_contextmenu_nested.xul
deleted file mode 100644
index 9eb42a1eda..0000000000
--- a/toolkit/content/tests/widgets/test_contextmenu_nested.xul
+++ /dev/null
@@ -1,138 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Nested Context Menu Tests"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
- <script type="application/javascript" src="popup_shared.js"></script>
-
-<menupopup id="outercontext">
- <menuitem label="Context One"/>
- <menu id="outercontextmenu" label="Sub">
- <menupopup id="innercontext">
- <menuitem id="innercontextmenu" label="Sub Context One"/>
- </menupopup>
- </menu>
-</menupopup>
-
-<menupopup id="outermain">
- <menuitem label="One"/>
- <menu id="outermenu" label="Sub">
- <menupopup id="innermain">
- <menuitem id="innermenu" label="Sub One" context="outercontext"/>
- </menupopup>
- </menu>
-</menupopup>
-
-<button label="Check"/>
-
-<vbox id="popuparea" popup="outermain" width="20" height="20"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-var popupTests = [
-{
- testname: "open outer popup",
- events: [ "popupshowing outermain", "popupshown outermain" ],
- test: () => synthesizeMouse($("popuparea"), 4, 4, {}),
- result: function (testname) {
- is($("outermain").triggerNode, $("popuparea"), testname);
- is(document.popupNode, $("popuparea"), testname + " document.popupNode");
- }
-},
-{
- testname: "open inner popup",
- events: [ "DOMMenuItemActive outermenu", "popupshowing innermain", "popupshown innermain" ],
- test: function () {
- synthesizeMouse($("outermenu"), 4, 4, { type: "mousemove" });
- synthesizeMouse($("outermenu"), 2, 2, { type: "mousemove" });
- },
- result: function (testname) {
- is($("outermain").triggerNode, $("popuparea"), testname + " outer");
- is($("innermain").triggerNode, $("popuparea"), testname + " inner");
- is($("outercontext").triggerNode, null, testname + " outer context");
- is(document.popupNode, $("popuparea"), testname + " document.popupNode");
- }
-},
-{
- testname: "open outer context",
- condition: function() { return (navigator.platform.indexOf("Mac") == -1); },
- events: [ "popupshowing outercontext", "popupshown outercontext" ],
- test: () => synthesizeMouse($("innermenu"), 4, 4, { type: "contextmenu", button: 2 }),
- result: function (testname) {
- is($("outermain").triggerNode, $("popuparea"), testname + " outer");
- is($("innermain").triggerNode, $("popuparea"), testname + " inner");
- is($("outercontext").triggerNode, $("innermenu"), testname + " outer context");
- is(document.popupNode, $("innermenu"), testname + " document.popupNode");
- }
-},
-{
- testname: "open inner context",
- condition: function() { return (navigator.platform.indexOf("Mac") == -1); },
- events: [ "DOMMenuItemActive outercontextmenu", "popupshowing innercontext", "popupshown innercontext" ],
- test: function () {
- synthesizeMouse($("outercontextmenu"), 4, 4, { type: "mousemove" });
- setTimeout(function() {
- synthesizeMouse($("outercontextmenu"), 2, 2, { type: "mousemove" });
- }, 1000);
- },
- result: function (testname) {
- is($("outermain").triggerNode, $("popuparea"), testname + " outer");
- is($("innermain").triggerNode, $("popuparea"), testname + " inner");
- is($("outercontext").triggerNode, $("innermenu"), testname + " outer context");
- is($("innercontext").triggerNode, $("innermenu"), testname + " inner context");
- is(document.popupNode, $("innermenu"), testname + " document.popupNode");
- }
-},
-{
- testname: "close context",
- condition: function() { return (navigator.platform.indexOf("Mac") == -1); },
- events: [ "popuphiding innercontext", "popuphidden innercontext",
- "popuphiding outercontext", "popuphidden outercontext",
- "DOMMenuInactive innercontext",
- "DOMMenuItemInactive outercontextmenu", "DOMMenuItemInactive outercontextmenu",
- "DOMMenuInactive outercontext" ],
- test: () => $("outercontext").hidePopup(),
- result: function (testname) {
- is($("outermain").triggerNode, $("popuparea"), testname + " outer");
- is($("innermain").triggerNode, $("popuparea"), testname + " inner");
- is($("outercontext").triggerNode, null, testname + " outer context");
- is($("innercontext").triggerNode, null, testname + " inner context");
- is(document.popupNode, $("popuparea"), testname + " document.popupNode");
- }
-},
-{
- testname: "hide menus",
- events: [ "popuphiding innermain", "popuphidden innermain",
- "popuphiding outermain", "popuphidden outermain",
- "DOMMenuInactive innermain",
- "DOMMenuItemInactive outermenu", "DOMMenuItemInactive outermenu",
- "DOMMenuInactive outermain" ],
-
- test: () => $("outermain").hidePopup(),
- result: function (testname) {
- is($("outermain").triggerNode, null, testname + " outer");
- is($("innermain").triggerNode, null, testname + " inner");
- is($("outercontext").triggerNode, null, testname + " outer context");
- is($("innercontext").triggerNode, null, testname + " inner context");
- is(document.popupNode, null, testname + " document.popupNode");
- }
-}
-];
-
-SimpleTest.waitForFocus(function runTest() {
- return startPopupTests(popupTests);
-});
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml"><p id="display"/></body>
-
-</window>
diff --git a/toolkit/content/tests/widgets/test_editor_currentURI.xul b/toolkit/content/tests/widgets/test_editor_currentURI.xul
deleted file mode 100644
index 20ab3af7cf..0000000000
--- a/toolkit/content/tests/widgets/test_editor_currentURI.xul
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin"
- type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
- type="text/css"?>
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- title="Editor currentURI Tests" onload="runTest();">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p/>
- <editor xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- id="editor"
- type="content"
- editortype="html"
- style="width: 400px; height: 100px;"/>
- <p/>
- <pre id="test">
- </pre>
- </body>
- <script class="testbody" type="application/javascript">
- <![CDATA[
-
- SimpleTest.waitForExplicitFinish();
-
- function runTest() {
- var editor = document.getElementById("editor");
- // Check that currentURI is a property of editor.
- var result = "currentURI" in editor;
- is(result, true, "currentURI is a property of editor");
- is(editor.currentURI.spec, "about:blank", "currentURI.spec is about:blank");
- SimpleTest.finish();
- }
-]]>
-</script>
-</window>
diff --git a/toolkit/content/tests/widgets/test_menubar.xul b/toolkit/content/tests/widgets/test_menubar.xul
deleted file mode 100644
index 7aa15fb2ac..0000000000
--- a/toolkit/content/tests/widgets/test_menubar.xul
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Menubar Popup Tests"
- onload="setTimeout(runTest, 0);"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <title>Menubar Popup Tests</title>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
-<script>
-SimpleTest.waitForExplicitFinish();
-function runTest()
-{
- window.open("window_menubar.xul", "_blank", "width=600,height=600");
-}
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/widgets/test_mousecapture_area.html b/toolkit/content/tests/widgets/test_mousecapture_area.html
deleted file mode 100644
index 532f41a5ac..0000000000
--- a/toolkit/content/tests/widgets/test_mousecapture_area.html
+++ /dev/null
@@ -1,109 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Mouse capture on area elements tests</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-
-<div id="content">
- <!-- The border="0" on the images is needed so that when we use
- synthesizeMouse we don't accidentally target the border of the image and
- miss the area because synthesizeMouse gets the rect of the primary frame
- of the target (the area), which is the image due to bug 135040, which
- includes the border, but the events targetted at the border aren't
- targeted at the area. -->
-
- <!-- 20x20 of red -->
- <img id="image" border="0"
- src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAG0lEQVR42mP8z0A%2BYKJA76jmUc2jmkc1U0EzACKcASfOgGoMAAAAAElFTkSuQmCC"
- usemap="#Map"/>
-
- <map name="Map">
- <!-- area over the whole image -->
- <area id="area" onmousedown="this.setCapture();" onmouseup="this.releaseCapture();"
- shape="poly" coords="0,0, 0,20, 20,20, 20,0" href="javascript:void(0);"/>
- </map>
-
-
- <!-- 20x20 of red -->
- <img id="img1" border="0"
- src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAG0lEQVR42mP8z0A%2BYKJA76jmUc2jmkc1U0EzACKcASfOgGoMAAAAAElFTkSuQmCC"
- usemap="#sharedMap"/>
-
- <!-- 20x20 of red -->
- <img id="img2" border="0"
- src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAG0lEQVR42mP8z0A%2BYKJA76jmUc2jmkc1U0EzACKcASfOgGoMAAAAAElFTkSuQmCC"
- usemap="#sharedMap"/>
-
- <map name="sharedMap">
- <!-- area over the whole image -->
- <area id="sharedarea" onmousedown="this.setCapture();" onmouseup="this.releaseCapture();"
- shape="poly" coords="0,0, 0,20, 20,20, 20,0" href="javascript:void(0);"/>
- </map>
-
-
- <div id="otherelement" style="width: 100px; height: 100px;"></div>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-SimpleTest.expectAssertions(3);
-
-SimpleTest.waitForExplicitFinish();
-
-function runTests()
-{
- // XXX We send a useless click to each image to force it to setup its image
- // map, because flushing layout won't do it. Hopefully bug 135040 will make
- // this not suck.
- synthesizeMouse($("image"), 5, 5, { type: "mousedown" });
- synthesizeMouse($("image"), 5, 5, { type: "mouseup" });
- synthesizeMouse($("img1"), 5, 5, { type: "mousedown" });
- synthesizeMouse($("img1"), 5, 5, { type: "mouseup" });
- synthesizeMouse($("img2"), 5, 5, { type: "mousedown" });
- synthesizeMouse($("img2"), 5, 5, { type: "mouseup" });
-
-
- // test that setCapture works on an area element (bug 517737)
- var area = document.getElementById("area");
- synthesizeMouse(area, 5, 5, { type: "mousedown" });
- synthesizeMouseExpectEvent($("otherelement"), 5, 5, { type: "mousemove" },
- area, "mousemove", "setCapture works on areas");
- synthesizeMouse(area, 5, 5, { type: "mouseup" });
-
- // test that setCapture works on an area element when it is part of an image
- // map that is used by two images
-
- var img1 = document.getElementById("img1");
- var sharedarea = document.getElementById("sharedarea");
- // synthesizeMouse just sends the event by coordinates, so this is really a click on the area
- synthesizeMouse(img1, 5, 5, { type: "mousedown" });
- synthesizeMouseExpectEvent($("otherelement"), 5, 5, { type: "mousemove" },
- sharedarea, "mousemove", "setCapture works on areas with multiple images");
- synthesizeMouse(img1, 5, 5, { type: "mouseup" });
-
- var img2 = document.getElementById("img2");
- // synthesizeMouse just sends the event by coordinates, so this is really a click on the area
- synthesizeMouse(img2, 5, 5, { type: "mousedown" });
- synthesizeMouseExpectEvent($("otherelement"), 5, 5, { type: "mousemove" },
- sharedarea, "mousemove", "setCapture works on areas with multiple images");
- synthesizeMouse(img2, 5, 5, { type: "mouseup" });
-
- // Bug 862673 - nuke all content so assertions in this test are attributed to
- // this test rather than the one which happens to follow.
- var content = document.getElementById("content");
- content.parentNode.removeChild(content);
- SimpleTest.finish();
-}
-
-SimpleTest.waitForFocus(runTests);
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/test_popupanchor.xul b/toolkit/content/tests/widgets/test_popupanchor.xul
deleted file mode 100644
index 814d9272f3..0000000000
--- a/toolkit/content/tests/widgets/test_popupanchor.xul
+++ /dev/null
@@ -1,430 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Popup Anchor Tests"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <panel id="testPanel"
- type="arrow"
- animate="false"
- noautohide="true">
- </panel>
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
-<script>
-<![CDATA[
-var anchor, panel, arrow;
-
-function is_close(got, exp, msg) {
- // on some platforms we see differences of a fraction of a pixel - so
- // allow any difference of < 1 pixels as being OK.
- ok(Math.abs(got - exp) < 1, msg + ": " + got + " should be equal(-ish) to " + exp);
-}
-
-function isArrowPositionedOn(side, offset) {
- var arrowRect = arrow.getBoundingClientRect();
- var arrowMidX = (arrowRect.left + arrowRect.right) / 2;
- var arrowMidY = (arrowRect.top + arrowRect.bottom) / 2;
- var panelRect = panel.getBoundingClientRect();
- var panelMidX = (panelRect.left + panelRect.right) / 2;
- var panelMidY = (panelRect.top + panelRect.bottom) / 2;
- // First check the "flip" of the panel is correct. If we are expecting the
- // arrow to be pointing to the left side of the anchor, the arrow must
- // also be on the left side of the panel (and vice-versa)
- // XXX - on OSX, the arrow seems to always be exactly in the center, hence
- // the 'equals' sign in the "<=" and ">=" comparisons. NFI why though...
- switch (side) {
- case "left":
- ok(arrowMidX <= panelMidX, "arrow should be on the left of the panel");
- break;
- case "right":
- ok(arrowMidX >= panelMidX, "arrow should be on the right of the panel");
- break;
- case "top":
- ok(arrowMidY <= panelMidY, "arrow should be on the top of the panel");
- break;
- case "bottom":
- ok(arrowMidY >= panelMidY, "arrow should be on the bottom of the panel");
- break;
- default:
- ok(false, "invalid position " + where);
- break;
- }
- // Now check the arrow really is pointing where we expect. The middle of
- // the arrow should be pointing exactly to the left (or right) side of the
- // anchor rect, +- any offsets.
- if (offset === null) // special case - explicit 'null' means 'don't check offset'
- return;
- offset = offset || 0; // no param means no offset expected.
- var anchorRect = anchor.getBoundingClientRect();
- var anchorPos = anchorRect[side];
- switch (side) {
- case "left":
- case "right":
- is_close(arrowMidX - anchorPos, offset, "arrow should be " + offset + "px from " + side + " side of anchor");
- is_close(panelRect.top, anchorRect.bottom, "top of panel should be at bottom of anchor");
- break;
- case "top":
- case "bottom":
- is_close(arrowMidY - anchorPos, offset, "arrow should be " + offset + "px from " + side + " side of anchor");
- is_close(panelRect.right, anchorRect.left, "right of panel should be left of anchor");
- break;
- default:
- ok(false, "unknown side " + side);
- break;
- }
-}
-
-function openSlidingPopup(position, callback) {
- panel.setAttribute("flip", "slide");
- _openPopup(position, callback);
-}
-
-function openPopup(position, callback) {
- panel.setAttribute("flip", "both");
- _openPopup(position, callback);
-}
-
-function waitForPopupPositioned(actionFn, callback)
-{
- panel.addEventListener("popuppositioned", function listener() {
- panel.removeEventListener("popuppositioned", listener, false);
- callback();
- }, false);
- actionFn();
-}
-
-function _openPopup(position, callback) {
- // this is very ugly: the panel CSS sets the arrow's list-style-image based
- // on the 'side' attribute. If the setting of the 'side' attribute causes
- // the image to change, we may get the popupshown event before the new
- // image has loaded - which causes the size of the arrow to be incorrect
- // for a brief moment - right when we are measuring it!
- // So we work around this in 2 steps:
- // * Force the 'side' attribute to a value which causes the CSS to not
- // specify an image - then when the popup gets shown, the correct image
- // is set, causing a load() event on the image element.
- // * Listen to *both* popupshown and the image load event. When both have
- // fired (the order is indeterminate) we start the test.
- panel.setAttribute("side", "noside");
- var numEvents = 0;
- function onEvent() {
- if (++numEvents == 2) // after both panel 'popupshown' and image 'load'
- callback();
- };
- panel.addEventListener("popupshown", function popupshown() {
- panel.removeEventListener("popupshown", popupshown);
- onEvent();
- });
- arrow.addEventListener("load", function imageload() {
- arrow.removeEventListener("load", imageload);
- onEvent();
- });
- panel.openPopup(anchor, position);
-}
-
-var tests = [
- // A panel with the anchor after_end - the anchor should not move on resize
- ['simpleResizeHorizontal', 'middle', function(next) {
- openPopup("after_end", function() {
- isArrowPositionedOn("right");
- var origPanelRect = panel.getBoundingClientRect();
- panel.sizeTo(100, 100);
- isArrowPositionedOn("right"); // should not have flipped, so still "right"
- panel.sizeTo(origPanelRect.width, origPanelRect.height);
- isArrowPositionedOn("right"); // should not have flipped, so still "right"
- next();
- });
- }],
-
- ['simpleResizeVertical', 'middle', function(next) {
- openPopup("start_after", function() {
- isArrowPositionedOn("bottom");
- var origPanelRect = panel.getBoundingClientRect();
- panel.sizeTo(100, 100);
- isArrowPositionedOn("bottom"); // should not have flipped
- panel.sizeTo(origPanelRect.width, origPanelRect.height);
- isArrowPositionedOn("bottom"); // should not have flipped
- next();
- });
- }],
-
- ['flippingResizeHorizontal', 'middle', function(next) {
- openPopup("after_end", function() {
- isArrowPositionedOn("right");
- panel.sizeTo(anchor.getBoundingClientRect().left + 50, 50);
- isArrowPositionedOn("left"); // check it flipped and has zero offset.
- next();
- });
- }],
-
- ['flippingResizeVertical', 'middle', function(next) {
- openPopup("start_after", function() {
- isArrowPositionedOn("bottom");
- panel.sizeTo(50, anchor.getBoundingClientRect().top + 50);
- isArrowPositionedOn("top"); // check it flipped and has zero offset.
- next();
- });
- }],
-
- ['simpleMoveToAnchorHorizontal', 'middle', function(next) {
- openPopup("after_end", function() {
- isArrowPositionedOn("right");
- panel.moveToAnchor(anchor, "after_end", 20, 0);
- // the anchor and the panel should have moved 20px right without flipping.
- isArrowPositionedOn("right", 20);
- panel.moveToAnchor(anchor, "after_end", -20, 0);
- // the anchor and the panel should have moved 20px left without flipping.
- isArrowPositionedOn("right", -20);
- next();
- });
- }],
-
- ['simpleMoveToAnchorVertical', 'middle', function(next) {
- openPopup("start_after", function() {
- isArrowPositionedOn("bottom");
- panel.moveToAnchor(anchor, "start_after", 0, 20);
- // the anchor and the panel should have moved 20px down without flipping.
- isArrowPositionedOn("bottom", 20);
- panel.moveToAnchor(anchor, "start_after", 0, -20);
- // the anchor and the panel should have moved 20px up without flipping.
- isArrowPositionedOn("bottom", -20);
- next();
- });
- }],
-
- // Do a moveToAnchor that causes the panel to flip horizontally
- ['flippingMoveToAnchorHorizontal', 'middle', function(next) {
- var anchorRight = anchor.getBoundingClientRect().right;
- // Size the panel such that it only just fits from the left-hand side of
- // the window to the right of the anchor - thus, it will fit when
- // anchored to the right-hand side of the anchor.
- panel.sizeTo(anchorRight - 10, 100);
- openPopup("after_end", function() {
- isArrowPositionedOn("right");
- // Ask for it to be anchored 1/2 way between the left edge of the window
- // and the anchor right - it can't fit with the panel on the left/arrow
- // on the right, so it must flip (arrow on the left, panel on the right)
- var offset = Math.floor(-anchorRight / 2);
-
- waitForPopupPositioned(
- () => panel.moveToAnchor(anchor, "after_end", offset, 0),
- () => {
- isArrowPositionedOn("left", offset); // should have flipped and have the offset.
- // resize back to original and move to a zero offset - it should flip back.
-
- panel.sizeTo(anchorRight - 10, 100);
- waitForPopupPositioned(
- () => panel.moveToAnchor(anchor, "after_end", 0, 0),
- () => {
- isArrowPositionedOn("right"); // should have flipped back and no offset
- next();
- });
- });
- });
- }],
-
- // Do a moveToAnchor that causes the panel to flip vertically
- ['flippingMoveToAnchorVertical', 'middle', function(next) {
- var anchorBottom = anchor.getBoundingClientRect().bottom;
- // See comments above in flippingMoveToAnchorHorizontal, but read
- // "top/bottom" instead of "left/right"
- panel.sizeTo(100, anchorBottom - 10);
- openPopup("start_after", function() {
- isArrowPositionedOn("bottom");
- var offset = Math.floor(-anchorBottom / 2);
-
- waitForPopupPositioned(
- () => panel.moveToAnchor(anchor, "start_after", 0, offset),
- () => {
- isArrowPositionedOn("top", offset);
- panel.sizeTo(100, anchorBottom - 10);
-
- waitForPopupPositioned(
- () => panel.moveToAnchor(anchor, "start_after", 0, 0),
- () => {
- isArrowPositionedOn("bottom");
- next();
- });
- });
- });
- }],
-
- ['veryWidePanel-after_end', 'middle', function(next) {
- openSlidingPopup("after_end", function() {
- var origArrowRect = arrow.getBoundingClientRect();
- // Now move it such that the arrow can't be at either end of the panel but
- // instead somewhere in the middle as that is the only way things fit,
- // meaning the arrow should "slide" down the panel.
- panel.sizeTo(window.innerWidth - 10, 60);
- is(panel.getBoundingClientRect().width, window.innerWidth - 10, "width is what we requested.")
- // the arrow should not have moved.
- var curArrowRect = arrow.getBoundingClientRect();
- is_close(curArrowRect.left, origArrowRect.left, "arrow should not have moved");
- is_close(curArrowRect.top, origArrowRect.top, "arrow should not have moved up or down");
- next();
- });
- }],
-
- ['veryWidePanel-before_start', 'middle', function(next) {
- openSlidingPopup("before_start", function() {
- var origArrowRect = arrow.getBoundingClientRect();
- // Now size it such that the arrow can't be at either end of the panel but
- // instead somewhere in the middle as that is the only way things fit.
- panel.sizeTo(window.innerWidth - 10, 60);
- is(panel.getBoundingClientRect().width, window.innerWidth - 10, "width is what we requested")
- // the arrow should not have moved.
- var curArrowRect = arrow.getBoundingClientRect();
- is_close(curArrowRect.left, origArrowRect.left, "arrow should not have moved");
- is_close(curArrowRect.top, origArrowRect.top, "arrow should not have moved up or down");
- next();
- });
- }],
-
- ['veryTallPanel-start_after', 'middle', function(next) {
- openSlidingPopup("start_after", function() {
- var origArrowRect = arrow.getBoundingClientRect();
- // Now move it such that the arrow can't be at either end of the panel but
- // instead somewhere in the middle as that is the only way things fit,
- // meaning the arrow should "slide" down the panel.
- panel.sizeTo(100, window.innerHeight - 10);
- is(panel.getBoundingClientRect().height, window.innerHeight - 10, "height is what we requested.")
- // the arrow should not have moved.
- var curArrowRect = arrow.getBoundingClientRect();
- is_close(curArrowRect.left, origArrowRect.left, "arrow should not have moved");
- is_close(curArrowRect.top, origArrowRect.top, "arrow should not have moved up or down");
- next();
- });
- }],
-
- ['veryTallPanel-start_before', 'middle', function(next) {
- openSlidingPopup("start_before", function() {
- var origArrowRect = arrow.getBoundingClientRect();
- // Now size it such that the arrow can't be at either end of the panel but
- // instead somewhere in the middle as that is the only way things fit.
- panel.sizeTo(100, window.innerHeight - 10);
- is(panel.getBoundingClientRect().height, window.innerHeight - 10, "height is what we requested")
- // the arrow should not have moved.
- var curArrowRect = arrow.getBoundingClientRect();
- is_close(curArrowRect.left, origArrowRect.left, "arrow should not have moved");
- is_close(curArrowRect.top, origArrowRect.top, "arrow should not have moved up or down");
- next();
- });
- }],
-
- // Tests against the anchor at the right-hand side of the window
- ['afterend', 'right', function(next) {
- openPopup("after_end", function() {
- // when we request too far to the right/bottom, the panel gets shrunk
- // and moved. The amount it is shrunk by is how far it is moved.
- var panelRect = panel.getBoundingClientRect();
- // panel was requested 100px wide - calc offset based on actual width.
- var offset = panelRect.width - 100;
- isArrowPositionedOn("right", offset);
- next();
- });
- }],
-
- ['after_start', 'right', function(next) {
- openPopup("after_start", function() {
- // See above - we are still too far to the right, but the anchor is
- // on the other side.
- var panelRect = panel.getBoundingClientRect();
- var offset = panelRect.width - 100;
- isArrowPositionedOn("right", offset);
- next();
- });
- }],
-
- // Tests against the anchor at the left-hand side of the window
- ['after_start', 'left', function(next) {
- openPopup("after_start", function() {
- var panelRect = panel.getBoundingClientRect();
- is(panelRect.left, 0, "panel remains within the screen");
- // not sure how to determine the offset here, so given we have checked
- // the panel is as left as possible while still being inside the window,
- // we just don't check the offset.
- isArrowPositionedOn("left", null);
- next();
- });
- }],
-]
-
-function runTests() {
- function runNextTest() {
- let result = tests.shift();
- if (!result) {
- // out of tests
- panel.hidePopup();
- SimpleTest.finish();
- return;
- }
- let [name, anchorPos, test] = result;
- SimpleTest.info("sub-test " + anchorPos + "." + name + " starting");
- // first arrange for the anchor to be where the test requires it.
- panel.hidePopup();
- panel.sizeTo(100, 50);
- // hide all the anchors here, then later we make one of them visible.
- document.getElementById("anchor-left-wrapper").style.display = "none";
- document.getElementById("anchor-middle-wrapper").style.display = "none";
- document.getElementById("anchor-right-wrapper").style.display = "none";
- switch(anchorPos) {
- case 'middle':
- anchor = document.getElementById("anchor-middle");
- document.getElementById("anchor-middle-wrapper").style.display = "block";
- break;
- case 'left':
- anchor = document.getElementById("anchor-left");
- document.getElementById("anchor-left-wrapper").style.display = "block";
- break;
- case 'right':
- anchor = document.getElementById("anchor-right");
- document.getElementById("anchor-right-wrapper").style.display = "block";
- break;
- default:
- SimpleTest.ok(false, "Bad anchorPos: " + anchorPos);
- runNextTest();
- return;
- }
- try {
- test(runNextTest);
- } catch (ex) {
- SimpleTest.ok(false, "sub-test " + anchorPos + "." + name + " failed: " + ex.toString() + "\n" + ex.stack);
- runNextTest();
- }
- }
- runNextTest();
-}
-
-SimpleTest.waitForExplicitFinish();
-
-addEventListener("load", function() {
- // anchor is set by the test runner above
- panel = document.getElementById("testPanel");
-
- arrow = SpecialPowers.wrap(document).getAnonymousElementByAttribute(panel, "anonid", "arrow");
- runTests();
-});
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<!-- Our tests assume at least 100px around the anchor on all sides, else the
- panel may flip when we don't expect it to
--->
-<div id="anchor-middle-wrapper" style="margin: 100px 100px 100px 100px;">
- <p>The anchor --&gt; <span id="anchor-middle">v</span> &lt;--</p>
-</div>
-<div id="anchor-left-wrapper" style="text-align: left; display: none;">
- <p><span id="anchor-left">v</span> &lt;-- The anchor;</p>
-</div>
-<div id="anchor-right-wrapper" style="text-align: right; display: none;">
- <p>The anchor --&gt; <span id="anchor-right">v</span></p>
-</div>
-</body>
-
-</window>
diff --git a/toolkit/content/tests/widgets/test_popupreflows.xul b/toolkit/content/tests/widgets/test_popupreflows.xul
deleted file mode 100644
index 6969f77672..0000000000
--- a/toolkit/content/tests/widgets/test_popupreflows.xul
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Popup Reflow Tests"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <panel id="testPanel"
- type="arrow"
- noautohide="true">
- </panel>
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
-<script>
-<![CDATA[
-var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Promise.jsm");
-
-let panel, anchor, arrow;
-
-// A reflow observer - it just remembers the stack trace of all sync reflows
-// done by the panel.
-let observer = {
- reflows: [],
- reflow: function (start, end) {
- // Ignore reflows triggered by native code
- // (Reflows from native code only have an empty stack after the first frame)
- var path = (new Error().stack).split("\n").slice(1).join("");
- if (path === "") {
- return;
- }
-
- this.reflows.push(new Error().stack);
- },
-
- reflowInterruptible: function (start, end) {
- // We're not interested in interruptible reflows. Why, you ask? Because
- // we've simply cargo-culted this test from browser_tabopen_reflows.js!
- },
-
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIReflowObserver,
- Ci.nsISupportsWeakReference])
-};
-
-// A test utility that counts the reflows caused by a test function. If the
-// count of reflows isn't what is expected, it causes a test failure and logs
-// the stack trace of all seen reflows.
-function countReflows(testfn, expected) {
- let deferred = Promise.defer();
- observer.reflows = [];
- let docShell = panel.ownerDocument.defaultView
- .QueryInterface(Components.interfaces.nsIInterfaceRequestor)
- .getInterface(Components.interfaces.nsIWebNavigation)
- .QueryInterface(Components.interfaces.nsIDocShell);
- docShell.addWeakReflowObserver(observer);
- testfn().then(() => {
- docShell.removeWeakReflowObserver(observer);
- SimpleTest.is(observer.reflows.length, expected, "correct number of reflows");
- if (observer.reflows.length != expected) {
- SimpleTest.info("stack traces of reflows:\n" + observer.reflows.join("\n") + "\n");
- }
- deferred.resolve();
- });
- return deferred.promise
-}
-
-function openPopup() {
- let deferred = Promise.defer();
- panel.addEventListener("popupshown", function popupshown() {
- panel.removeEventListener("popupshown", popupshown);
- deferred.resolve();
- });
- panel.openPopup(anchor, "before_start");
- return deferred.promise
-}
-
-// ********************
-// The actual tests...
-// We only have one atm - simply open a popup.
-//
-function testSimplePanel() {
- return openPopup();
-}
-
-// ********************
-// The test harness...
-//
-SimpleTest.waitForExplicitFinish();
-
-addEventListener("load", function() {
- anchor = document.getElementById("anchor");
- panel = document.getElementById("testPanel");
- arrow = document.getAnonymousElementByAttribute(panel, "anonid", "arrow");
-
- // Cancel the arrow panel slide-in transition (bug 767133) - we are only
- // testing reflows in the core panel implementation and not reflows that may
- // or may not be caused by transitioning....
- arrow.style.transition = "none";
-
- // and off we go...
- countReflows(testSimplePanel, 1).then(SimpleTest.finish);
-});
-]]>
-</script>
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p>The anchor --&gt; <span id="anchor">v</span> &lt;--</p>
-</body>
-</window>
diff --git a/toolkit/content/tests/widgets/test_tree_column_reorder.xul b/toolkit/content/tests/widgets/test_tree_column_reorder.xul
deleted file mode 100644
index 5315fee439..0000000000
--- a/toolkit/content/tests/widgets/test_tree_column_reorder.xul
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
-<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
-<!--
- XUL Widget Test for reordering tree columns
- -->
-<window title="Tree" width="500" height="600"
- onload="setTimeout(testtag_tree_column_reorder, 0);"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
-
-<script src="tree_shared.js"/>
-
-<tree id="tree-column-reorder" rows="1" enableColumnDrag="true">
- <treecols>
- <treecol id="col_0" label="col_0" flex="1"/>
- <splitter class="tree-splitter"/>
- <treecol id="col_1" label="col_1" flex="1"/>
- <splitter class="tree-splitter"/>
- <treecol id="col_2" label="col_2" flex="1"/>
- <splitter class="tree-splitter"/>
- <treecol id="col_3" label="col_3" flex="1"/>
- <splitter class="tree-splitter"/>
- <treecol id="col_4" label="col_4" flex="1"/>
- <splitter class="tree-splitter"/>
- <treecol id="col_5" label="col_5" flex="1"/>
- <splitter class="tree-splitter"/>
- <treecol id="col_6" label="col_6" flex="1"/>
- <splitter class="tree-splitter"/>
- <treecol id="col_7" label="col_7" flex="1"/>
- <splitter class="tree-splitter"/>
- <treecol id="col_8" label="col_8" flex="1"/>
- <splitter class="tree-splitter"/>
- <treecol id="col_9" label="col_9" flex="1"/>
- <splitter class="tree-splitter"/>
- <treecol id="col_10" label="col_10" flex="1"/>
- <splitter class="tree-splitter"/>
- <treecol id="col_11" label="col_11" flex="1"/>
- <splitter class="tree-splitter"/>
- <treecol id="col_12" label="col_12" flex="1"/>
- </treecols>
- <treechildren id="treechildren-column-reorder">
- <treeitem>
- <treerow>
- <treecell label="col_0"/>
- <treecell label="col_1"/>
- <treecell label="col_2"/>
- <treecell label="col_3"/>
- <treecell label="col_4"/>
- <treecell label="col_5"/>
- <treecell label="col_6"/>
- <treecell label="col_7"/>
- <treecell label="col_8"/>
- <treecell label="col_9"/>
- <treecell label="col_10"/>
- <treecell label="col_11"/>
- <treecell label="col_12"/>
- </treerow>
- </treeitem>
- </treechildren>
-</tree>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
- <!-- test code goes here -->
- <script type="application/javascript"><![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-]]>
-</script>
-
-</window>
-
diff --git a/toolkit/content/tests/widgets/test_videocontrols.html b/toolkit/content/tests/widgets/test_videocontrols.html
deleted file mode 100644
index 146c63a72b..0000000000
--- a/toolkit/content/tests/widgets/test_videocontrols.html
+++ /dev/null
@@ -1,411 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Video controls test</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-
-<div id="content">
- <video width="320" height="240" id="video" controls mozNoDynamicControls preload="auto"></video>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-/*
- * Positions of the UI elements, relative to the upper-left corner of the
- * <video> box.
- */
-const videoWidth = 320;
-const videoHeight = 240;
-const videoDuration = 3.8329999446868896;
-
-const playButtonWidth = 28;
-const playButtonHeight = 28;
-const muteButtonWidth = 33;
-const muteButtonHeight = 28;
-const durationWidth = 34;
-const fullscreenButtonWidth = 28;
-const fullscreenButtonHeight = 28;
-const volumeSliderWidth = 32;
-const scrubberWidth = videoWidth - playButtonWidth - durationWidth - muteButtonWidth - volumeSliderWidth - fullscreenButtonWidth;
-const scrubberHeight = 28;
-
-// Play button is on the bottom-left
-const playButtonCenterX = 0 + Math.round(playButtonWidth / 2);
-const playButtonCenterY = videoHeight - Math.round(playButtonHeight / 2);
-// Mute button is on the bottom-right before the full screen button and volume slider
-const muteButtonCenterX = videoWidth - Math.round(muteButtonWidth / 2) - volumeSliderWidth - fullscreenButtonWidth;
-const muteButtonCenterY = videoHeight - Math.round(muteButtonHeight / 2);
-// Fullscreen button is on the bottom-right at the far end
-const fullscreenButtonCenterX = videoWidth - Math.round(fullscreenButtonWidth / 2);
-const fullscreenButtonCenterY = videoHeight - Math.round(fullscreenButtonHeight / 2);
-// Scrubber bar is between the play and mute buttons. We don't need it's
-// X center, just the offset of its box.
-const scrubberOffsetX = 0 + playButtonWidth;
-const scrubberCenterY = videoHeight - Math.round(scrubberHeight / 2);
-
-var testnum = 1;
-var video = document.getElementById("video");
-
-const domUtil = SpecialPowers.Cc["@mozilla.org/inspector/dom-utils;1"]
- .getService(SpecialPowers.Ci.inIDOMUtils);
-
-function getButtonByAttribute(aName, aValue) {
- var kids = domUtil.getChildrenForNode(video, true);
- var videocontrols = kids[1];
- return SpecialPowers.wrap(document)
- .getAnonymousElementByAttribute(videocontrols, aName, aValue);
-}
-
-function isMuteButtonMuted() {
- var muteButton = getButtonByAttribute('class', 'muteButton');
- return muteButton.getAttribute('muted') === 'true';
-}
-
-function isVolumeSliderShowingCorrectVolume(expectedVolume) {
- var volumeButton = getButtonByAttribute('anonid', 'volumeForeground');
- let expectedPaddingRight = (1 - expectedVolume) * volumeSliderWidth + "px";
- is(volumeButton.style.paddingRight, expectedPaddingRight,
- "volume slider should match expected volume");
-}
-
-function forceReframe() {
- // Setting display then getting the bounding rect to force a frame
- // reconstruction on the video element.
- video.style.display = "block";
- video.getBoundingClientRect();
- video.style.display = "";
- video.getBoundingClientRect();
-}
-
-function runTest(event) {
- ok(true, "----- test #" + testnum + " -----");
-
- switch (testnum) {
- /*
- * Check operation of play/pause/mute/unmute buttons.
- */
- case 1:
- // Check initial state upon load
- is(event.type, "canplaythrough", "checking event type");
- is(video.paused, true, "checking video play state");
- is(video.muted, false, "checking video mute state");
-
- // Click the play button
- SimpleTest.executeSoon(() => {
- synthesizeMouse(video, playButtonCenterX, playButtonCenterY, { });
- });
- break;
-
- case 2:
- is(event.type, "play", "checking event type");
- is(video.paused, false, "checking video play state");
- is(video.muted, false, "checking video mute state");
-
- // Click the pause button
- SimpleTest.executeSoon(() => {
- synthesizeMouse(video, playButtonCenterX, playButtonCenterY, { });
- });
- break;
-
- case 3:
- is(event.type, "pause", "checking event type");
- is(video.paused, true, "checking video play state");
- is(video.muted, false, "checking video mute state");
-
- SimpleTest.executeSoon(() => {
- synthesizeMouse(video, muteButtonCenterX, muteButtonCenterY, { }); // Mute.
- });
- break;
-
- case 4:
- is(event.type, "volumechange", "checking event type");
- is(video.paused, true, "checking video play state");
- is(video.muted, true, "checking video mute state");
-
- SimpleTest.executeSoon(() => {
- synthesizeMouse(video, muteButtonCenterX, muteButtonCenterY, { }); // Unmute.
- });
- break;
-
- /*
- * Bug 470596: Make sure that having CSS border or padding doesn't
- * break the controls (though it should move them)
- */
- case 5:
- is(event.type, "volumechange", "checking event type");
- is(video.paused, true, "checking video play state");
- is(video.muted, false, "checking video mute state");
-
- video.style.border = "medium solid purple";
- video.style.borderWidth = "30px 40px 50px 60px";
- video.style.padding = "10px 20px 30px 40px";
- // totals: top: 40px, right: 60px, bottom: 80px, left: 100px
-
- // Click the play button
- SimpleTest.executeSoon(() => {
- synthesizeMouse(video, 100 + playButtonCenterX, 40 + playButtonCenterY, { });
- });
- break;
-
- case 6:
- is(event.type, "play", "checking event type");
- is(video.paused, false, "checking video play state");
- is(video.muted, false, "checking video mute state");
- video.pause();
- break;
-
- case 7:
- is(event.type, "pause", "checking event type");
- is(video.paused, true, "checking video play state");
- is(video.muted, false, "checking video mute state");
-
- // Click the mute button
- SimpleTest.executeSoon(() => {
- synthesizeMouse(video, 100 + muteButtonCenterX, 40 + muteButtonCenterY, { });
- });
- break;
-
- case 8:
- is(event.type, "volumechange", "checking event type");
- is(video.paused, true, "checking video play state");
- is(video.muted, true, "checking video mute state");
- // Clear the style set in test 5.
- video.style.border = "";
- video.style.borderWidth = "";
- video.style.padding = "";
-
- video.muted = false;
- break;
-
- /*
- * Previous tests have moved playback postion, reset it to 0.
- */
- case 9:
- is(event.type, "volumechange", "checking event type");
- is(video.paused, true, "checking video play state");
- is(video.muted, false, "checking video mute state");
- ok(true, "video position is at " + video.currentTime);
- video.currentTime = 0.0;
- break;
-
- case 10:
- is(event.type, "seeking", "checking event type");
- ok(true, "video position is at " + video.currentTime);
- break;
-
- /*
- * Drag the slider's thumb to the halfway point with the mouse.
- */
- case 11:
- is(event.type, "seeked", "checking event type");
- ok(true, "video position is at " + video.currentTime);
- // Bug 477434 -- sometimes we get 0.098999 here instead of 0!
- // is(video.currentTime, 0.0, "checking playback position");
-
- SimpleTest.executeSoon(() => {
- var beginDragX = scrubberOffsetX;
- var endDragX = scrubberOffsetX + (scrubberWidth / 2);
- synthesizeMouse(video, beginDragX, scrubberCenterY, { type: "mousedown", button: 0 });
- synthesizeMouse(video, endDragX, scrubberCenterY, { type: "mousemove", button: 0 });
- synthesizeMouse(video, endDragX, scrubberCenterY, { type: "mouseup", button: 0 });
- });
- break;
-
- case 12:
- is(event.type, "seeking", "checking event type");
- ok(true, "video position is at " + video.currentTime);
- break;
-
- /*
- * Click the slider at the 1/4 point with the mouse (jump backwards)
- */
- case 13:
- is(event.type, "seeked", "checking event type");
- ok(true, "video position is at " + video.currentTime);
- var expectedTime = videoDuration / 2;
- ok(Math.abs(video.currentTime - expectedTime) < 0.1, "checking expected playback position Math.abs(" + video.currentTime + " - " + expectedTime + ") < .1");
-
- SimpleTest.executeSoon(() => {
- synthesizeMouse(video, scrubberOffsetX + (scrubberWidth / 4), scrubberCenterY, { });
- });
- break;
-
- case 14:
- is(event.type, "seeking", "checking event type");
- ok(true, "video position is at " + video.currentTime);
- break;
-
- case 15:
- is(event.type, "seeked", "checking event type");
- ok(true, "video position is at " + video.currentTime);
- // The scrubber currently just jumps towards the nearest pageIncrement point, not
- // precisely to the point clicked. So, expectedTime isn't (videoDuration / 4).
- // We should end up at 1.733, but sometimes we end up at 1.498. I guess
- // it's timing depending if the <scale> things it's click-and-hold, or a
- // single click. So, just make sure we end up less that the previous
- // position.
- lastPosition = (videoDuration / 2) - 0.1;
- ok(video.currentTime < lastPosition, "checking expected playback position");
-
- // Set volume to 0.1 so one down arrow hit will decrease it to 0.
- video.volume = 0.1;
- break;
-
- // See bug 694696.
- case 16:
- is(event.type, "volumechange", "checking event type");
- is(video.volume, 0.1, "Volume should be set.");
- ok(!video.muted, "Video is not muted.");
-
- video.focus();
- SimpleTest.executeSoon(() => synthesizeKey("VK_DOWN", {}));
- break;
-
- case 17:
- is(event.type, "volumechange", "checking event type");
- is(video.volume, 0, "Volume should be 0.");
- ok(!video.muted, "Video is not muted.");
-
- SimpleTest.executeSoon(() => {
- ok(isMuteButtonMuted(), "Mute button says it's muted");
- synthesizeKey("VK_UP", {});
- });
- break;
-
- case 18:
- is(event.type, "volumechange", "checking event type");
- is(video.volume, 0.1, "Volume is increased.");
- ok(!video.muted, "Video is not muted.");
-
- SimpleTest.executeSoon(() => {
- ok(!isMuteButtonMuted(), "Mute button says it's not muted");
- synthesizeKey("VK_DOWN", {});
- });
- break;
-
- case 19:
- is(event.type, "volumechange", "checking event type");
- is(video.volume, 0, "Volume should be 0.");
- ok(!video.muted, "Video is not muted.");
-
- SimpleTest.executeSoon(() => {
- ok(isMuteButtonMuted(), "Mute button says it's muted");
- synthesizeMouse(video, muteButtonCenterX, muteButtonCenterY, { });
- });
- break;
-
- case 20:
- is(event.type, "volumechange", "checking event type");
- is(video.volume, 0.5, "Volume should be 0.5.");
- ok(!video.muted, "Video is not muted.");
-
- SimpleTest.executeSoon(() => synthesizeKey("VK_UP", {}));
- break;
-
- case 21:
- is(event.type, "volumechange", "checking event type");
- is(video.volume, 0.6, "Volume should be 0.6.");
- ok(!video.muted, "Video is not muted.");
-
- SimpleTest.executeSoon(() => {
- synthesizeMouse(video, muteButtonCenterX, muteButtonCenterY, { });
- });
- break;
-
- case 22:
- is(event.type, "volumechange", "checking event type");
- is(video.volume, 0.6, "Volume should be 0.6.");
- ok(video.muted, "Video is muted.");
-
- SimpleTest.executeSoon(() => {
- ok(isMuteButtonMuted(), "Mute button says it's muted");
- synthesizeMouse(video, muteButtonCenterX, muteButtonCenterY, { });
- });
- break;
-
- case 23:
- is(event.type, "volumechange", "checking event type");
- is(video.volume, 0.6, "Volume should be 0.6.");
- ok(!video.muted, "Video is not muted.");
-
- SimpleTest.executeSoon(() => {
- ok(!isMuteButtonMuted(), "Mute button says it's not muted");
- synthesizeMouse(video, fullscreenButtonCenterX, fullscreenButtonCenterY, { });
- });
- break;
-
- case 24:
- is(event.type, "mozfullscreenchange", "checking event type");
- is(video.volume, 0.6, "Volume should still be 0.6");
- SimpleTest.executeSoon(function() {
- isVolumeSliderShowingCorrectVolume(video.volume);
- synthesizeKey("VK_ESCAPE", {});
- });
- break;
-
- case 25:
- is(event.type, "mozfullscreenchange", "checking event type");
- is(video.volume, 0.6, "Volume should still be 0.6");
- SimpleTest.executeSoon(function() {
- isVolumeSliderShowingCorrectVolume(video.volume);
- forceReframe();
- video.focus();
- synthesizeKey("VK_DOWN", {});
- });
- break;
-
- case 26:
- is(event.type, "volumechange", "checking event type");
- is(video.volume, 0.5, "Volume should be decreased by 0.1");
- SimpleTest.executeSoon(function() {
- isVolumeSliderShowingCorrectVolume(video.volume);
- SimpleTest.finish();
- });
- break;
-
- default:
- throw "unexpected test #" + testnum + " w/ event " + event.type;
- }
-
- testnum++;
-}
-
-
-
-function canplaythroughevent(event) {
- video.removeEventListener("canplaythrough", canplaythroughevent, false);
- // Other events expected by the test.
- video.addEventListener("play", runTest, false);
- video.addEventListener("pause", runTest, false);
- video.addEventListener("volumechange", runTest, false);
- video.addEventListener("seeking", runTest, false);
- video.addEventListener("seeked", runTest, false);
- document.addEventListener("mozfullscreenchange", runTest, false);
- // Begin the test.
- runTest(event);
-}
-
-function startMediaLoad() {
- // Kick off test once video has loaded, in its canplaythrough event handler.
- video.src = "seek_with_sound.ogg";
- video.addEventListener("canplaythrough", canplaythroughevent, false);
-}
-
-function loadevent(event) {
- SpecialPowers.pushPrefEnv({"set": [["media.cache_size", 40000]]}, startMediaLoad);
-}
-
-window.addEventListener("load", loadevent, false);
-
-SimpleTest.waitForExplicitFinish();
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/test_videocontrols_audio.html b/toolkit/content/tests/widgets/test_videocontrols_audio.html
deleted file mode 100644
index 7d1dc32e39..0000000000
--- a/toolkit/content/tests/widgets/test_videocontrols_audio.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Video controls with Audio file test</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-
-<div id="content">
- <video id="video" controls preload="metadata"></video>
-</div>
-
-<pre id="test">
-<script class="testbody" type="application/javascript;version=1.7">
-
- var domUtils = SpecialPowers.Cc["@mozilla.org/inspector/dom-utils;1"].
- getService(SpecialPowers.Ci.inIDOMUtils);
-
- function findElementByAttribute(element, aName, aValue) {
- if (!('getAttribute' in element)) {
- return false;
- }
- if (element.getAttribute(aName) === aValue) {
- return element;
- }
- let children = domUtils.getChildrenForNode(element, true);
- for (let child of children) {
- var result = findElementByAttribute(child, aName, aValue);
- if (result) {
- return result;
- }
- }
- return false;
- }
-
- function loadedmetadata(event) {
- SimpleTest.executeSoon(function() {
- var controlBar = findElementByAttribute(video, "class", "controlBar");
- is(controlBar.getAttribute("fullscreen-unavailable"), "true", "Fullscreen button is hidden");
- SimpleTest.finish();
- });
- }
-
- var video = document.getElementById("video");
-
- SpecialPowers.pushPrefEnv({"set": [["media.cache_size", 40000]]}, startTest);
- function startTest() {
- // Kick off test once audio has loaded.
- video.addEventListener("loadedmetadata", loadedmetadata, false);
- video.src = "audio.ogg";
- }
-
- SimpleTest.waitForExplicitFinish();
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/test_videocontrols_audio_direction.html b/toolkit/content/tests/widgets/test_videocontrols_audio_direction.html
deleted file mode 100644
index 2512b997a0..0000000000
--- a/toolkit/content/tests/widgets/test_videocontrols_audio_direction.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Video controls directionality test</title>
- <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-
-<div id="content">
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-var tests = [
- {op: "==", test: "videocontrols_direction-2a.html", ref: "videocontrols_direction-2-ref.html"},
- {op: "==", test: "videocontrols_direction-2b.html", ref: "videocontrols_direction-2-ref.html"},
- {op: "==", test: "videocontrols_direction-2c.html", ref: "videocontrols_direction-2-ref.html"},
- {op: "==", test: "videocontrols_direction-2d.html", ref: "videocontrols_direction-2-ref.html"},
- {op: "==", test: "videocontrols_direction-2e.html", ref: "videocontrols_direction-2-ref.html"}
-];
-
-</script>
-<script type="text/javascript" src="videocontrols_direction_test.js"></script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/test_videocontrols_iframe_fullscreen.html b/toolkit/content/tests/widgets/test_videocontrols_iframe_fullscreen.html
deleted file mode 100644
index 6391dcc1b7..0000000000
--- a/toolkit/content/tests/widgets/test_videocontrols_iframe_fullscreen.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Video controls test - iframe</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-
-<div id="content">
-<iframe id="ifr1"></iframe>
-<iframe id="ifr2" allowfullscreen></iframe>
-</div>
-
-<pre id="test">
-<script clas="testbody" type="application/javascript">
- SimpleTest.waitForExplicitFinish();
-
- const domUtils = SpecialPowers.Cc["@mozilla.org/inspector/dom-utils;1"].
- getService(SpecialPowers.Ci.inIDOMUtils);
- const iframe1 = SpecialPowers.wrap(document.getElementById("ifr1"));
- const iframe2 = SpecialPowers.wrap(document.getElementById("ifr2"));
- const testCases = [];
-
- function checkIframeFullscreenAvailable(ifr) {
- const available = ifr.hasAttribute("allowfullscreen");
- let video;
-
- return () => new Promise(resolve => {
- ifr.srcdoc = `<video id="video" controls preload="auto"></video>`;
- ifr.addEventListener("load", resolve, false);
- }).then(() => new Promise(resolve => {
- video = ifr.contentDocument.getElementById("video");
- video.src = "seek_with_sound.ogg";
- video.addEventListener("loadedmetadata", resolve, false);
- })).then(() => new Promise(resolve => {
- const videoControl = domUtils.getChildrenForNode(video, true)[1];
- const controlBar = video.ownerDocument.getAnonymousElementByAttribute(
- videoControl, "class", "controlBar");
-
- is(controlBar.getAttribute("fullscreen-unavailable") == "true", !available, "The controlbar should have an attribute marking whether fullscreen is available that corresponds to if the iframe has the allowfullscreen attribute.");
- resolve();
- }));
- }
-
- function start() {
- testCases.reduce((promise, task) => promise.then(task), Promise.resolve());
- }
-
- function load() {
- SpecialPowers.pushPrefEnv({"set": [["media.cache_size", 40000]]}, start);
- }
-
- testCases.push(checkIframeFullscreenAvailable(iframe1));
- testCases.push(checkIframeFullscreenAvailable(iframe2));
- testCases.push(SimpleTest.finish);
-
- window.addEventListener("load", load, false);
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/test_videocontrols_jsdisabled.html b/toolkit/content/tests/widgets/test_videocontrols_jsdisabled.html
deleted file mode 100644
index f57cda0636..0000000000
--- a/toolkit/content/tests/widgets/test_videocontrols_jsdisabled.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Video controls test</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-function runTest(event) {
- info(true, "----- test #" + testnum + " -----");
-
- switch (testnum) {
- case 1:
- is(event.type, "timeupdate", "checking event type");
- is(video.paused, false, "checking video play state");
- video.removeEventListener("timeupdate", runTest);
-
- // Click to toggle play/pause (now pausing)
- synthesizeMouseAtCenter(video, {}, win);
- break;
-
- case 2:
- is(event.type, "pause", "checking event type");
- is(video.paused, true, "checking video play state");
- win.close();
-
- SimpleTest.finish();
- break;
-
- default:
- ok(false, "unexpected test #" + testnum + " w/ event " + event.type);
- throw "unexpected test #" + testnum + " w/ event " + event.type;
- }
-
- testnum++;
-}
-
-SpecialPowers.pushPrefEnv({"set": [["javascript.enabled", false]]}, startTest);
-
-var testnum = 1;
-
-var video;
-function loadevent(event) {
- is(win["testExpando"], undefined, "expando shouldn't exist because js is disabled");
- video = win.document.querySelector("video");
- // Other events expected by the test.
- video.addEventListener("timeupdate", runTest, false);
- video.addEventListener("pause", runTest, false);
-}
-
-var win;
-function startTest() {
- var videoURL = new URL("seek_with_sound.ogg", document.documentURI).href;
- var url = "data:text/html,<video src=" + videoURL + " controls autoplay=true></video><script>window.testExpando = true;</scr" + "ipt>";
-
- win = window.open(url);
- win.addEventListener("load", loadevent, false);
-}
-
-SimpleTest.waitForExplicitFinish();
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/test_videocontrols_onclickplay.html b/toolkit/content/tests/widgets/test_videocontrols_onclickplay.html
deleted file mode 100644
index d681b31587..0000000000
--- a/toolkit/content/tests/widgets/test_videocontrols_onclickplay.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Video controls test</title>
- <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="head.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-
-<div id="content">
- <video id="video" controls mozNoDynamicControls preload="auto"></video>
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-SimpleTest.waitForExplicitFinish();
-var video = document.getElementById("video");
-
-function startMediaLoad() {
- // Kick off test once video has loaded, in its canplaythrough event handler.
- video.src = "seek_with_sound.ogg";
- video.addEventListener("canplaythrough", runTest, false);
-}
-
-function loadevent(event) {
- SpecialPowers.pushPrefEnv({"set": [["media.cache_size", 40000]]}, startMediaLoad);
-}
-
-window.addEventListener("load", loadevent, false);
-
-function runTest() {
- video.addEventListener("click", function() {
- this.play();
- });
- ok(video.paused, "video should be paused initially");
-
- new Promise(resolve => {
- let timeupdates = 0;
- video.addEventListener("timeupdate", function timeupdate() {
- ok(!video.paused, "video should not get paused after clicking in middle");
-
- if (++timeupdates == 3) {
- video.removeEventListener("timeupdate", timeupdate);
- resolve();
- }
- });
-
- synthesizeMouseAtCenter(video, {}, window);
- }).then(function() {
- new Promise(resolve => {
- video.addEventListener("pause", function onpause() {
- setTimeout(() => {
- ok(video.paused, "video should still be paused 200ms after pause request");
- // When the video reaches the end of playback it is automatically paused.
- // Check during the pause event that the video has not reachd the end
- // of playback.
- ok(!video.ended, "video should not have paused due to playback ending");
- resolve();
- }, 200);
- });
-
- synthesizeMouse(video, 10, video.clientHeight - 10, {}, window);
- }).then(SimpleTest.finish);
- });
-}
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/test_videocontrols_standalone.html b/toolkit/content/tests/widgets/test_videocontrols_standalone.html
deleted file mode 100644
index 8d1ce89844..0000000000
--- a/toolkit/content/tests/widgets/test_videocontrols_standalone.html
+++ /dev/null
@@ -1,90 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Video controls test</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="head.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-const videoWidth = 320;
-const videoHeight = 240;
-
-function getMediaElement(aWindow) {
- return aWindow.document.getElementsByTagName("video")[0];
-}
-
-var popup = window.open("seek_with_sound.ogg");
-popup.addEventListener("load", function onLoad() {
- popup.removeEventListener("load", onLoad);
- var video = getMediaElement(popup);
- if (!video.paused)
- runTestVideo(video);
- else {
- video.addEventListener("play", function onPlay() {
- video.removeEventListener("play", onPlay);
- runTestVideo(video);
- });
- }
-});
-
-function runTestVideo(aVideo) {
- var condition = function() {
- var boundingRect = aVideo.getBoundingClientRect();
- return boundingRect.width == videoWidth &&
- boundingRect.height == videoHeight;
- };
- waitForCondition(condition, function() {
- var boundingRect = aVideo.getBoundingClientRect();
- is(boundingRect.width, videoWidth, "Width of the video should match expectation");
- is(boundingRect.height, videoHeight, "Height of video should match expectation");
- popup.close();
- runTestAudioPre();
- }, "The media element should eventually be resized to match the intrinsic size of the video.");
-}
-
-function runTestAudioPre() {
- popup = window.open("audio.ogg");
- popup.addEventListener("load", function onLoad() {
- popup.removeEventListener("load", onLoad);
- var audio = getMediaElement(popup);
- if (!audio.paused)
- runTestAudio(audio);
- else {
- audio.addEventListener("play", function onPlay() {
- audio.removeEventListener("play", onPlay);
- runTestAudio(audio);
- })
- }
- })
-}
-
-function runTestAudio(aAudio) {
- info("User agent (help diagnose bug #943556): " + navigator.userAgent);
- var isAndroid = navigator.userAgent.includes("Android");
- var expectedHeight = isAndroid ? 103 : 28;
- var condition = function () {
- var boundingRect = aAudio.getBoundingClientRect();
- return boundingRect.height == expectedHeight;
- };
- waitForCondition(condition, function () {
- var boundingRect = aAudio.getBoundingClientRect();
- is(boundingRect.height, expectedHeight,
- "Height of audio element should be " + expectedHeight + ", which is equal to the controls bar.");
- popup.close();
- SimpleTest.finish();
- }, "The media element should eventually be resized to match the height of the audio controls.");
-}
-
-SimpleTest.waitForExplicitFinish();
-
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/test_videocontrols_video_direction.html b/toolkit/content/tests/widgets/test_videocontrols_video_direction.html
deleted file mode 100644
index 54e0d5e722..0000000000
--- a/toolkit/content/tests/widgets/test_videocontrols_video_direction.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Video controls directionality test</title>
- <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-
-<div id="content">
-</div>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-var tests = [
- {op: "==", test: "videocontrols_direction-1a.html", ref: "videocontrols_direction-1-ref.html"},
- {op: "==", test: "videocontrols_direction-1b.html", ref: "videocontrols_direction-1-ref.html"},
- {op: "==", test: "videocontrols_direction-1c.html", ref: "videocontrols_direction-1-ref.html"},
- {op: "==", test: "videocontrols_direction-1d.html", ref: "videocontrols_direction-1-ref.html"},
- {op: "==", test: "videocontrols_direction-1e.html", ref: "videocontrols_direction-1-ref.html"},
-];
-
-</script>
-<script type="text/javascript" src="videocontrols_direction_test.js"></script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/test_videocontrols_vtt.html b/toolkit/content/tests/widgets/test_videocontrols_vtt.html
deleted file mode 100644
index 27052b770e..0000000000
--- a/toolkit/content/tests/widgets/test_videocontrols_vtt.html
+++ /dev/null
@@ -1,133 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <title>Video controls test - VTT</title>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-
-<div id="content">
- <video id="video" controls preload="auto"></video>
-</div>
-
-<pre id="test">
-<script clas="testbody" type="application/javascript">
- SimpleTest.waitForExplicitFinish();
-
- const domUtils = SpecialPowers.Cc["@mozilla.org/inspector/dom-utils;1"].
- getService(SpecialPowers.Ci.inIDOMUtils);
- const video = document.getElementById("video");
- const ccBtn = getElementByAttribute("class", "closedCaptionButton");
- const ttList = getElementByAttribute("class", "textTrackList");
- const testCases = [];
-
- testCases.push(() => new Promise(resolve => {
- is(ccBtn.getAttribute("hidden"), "true", "CC button should hide");
-
- resolve();
- }));
-
- testCases.push(() => new Promise(resolve => {
- video.addTextTrack("descriptions", "English", "en");
- video.addTextTrack("chapters", "English", "en");
- video.addTextTrack("metadata", "English", "en");
-
- SimpleTest.executeSoon(() => {
- is(ccBtn.getAttribute("hidden"), "true", "CC button should hide if no supported tracks provided");
-
- resolve();
- });
- }));
-
- testCases.push(() => new Promise(resolve => {
- const sub = video.addTextTrack("subtitles", "English", "en");
- sub.mode = "disabled";
-
- SimpleTest.executeSoon(() => {
- is(ccBtn.getAttribute("hidden"), "", "CC button should show");
- is(ccBtn.getAttribute("enabled"), "", "CC button should be disabled");
-
- resolve();
- });
- }));
-
- testCases.push(() => new Promise(resolve => {
- const subtitle = video.addTextTrack("subtitles", "English", "en");
- subtitle.mode = "showing";
-
- SimpleTest.executeSoon(() => {
- is(ccBtn.getAttribute("enabled"), "true", "CC button should be enabled");
- subtitle.mode = "disabled";
-
- resolve();
- });
- }));
-
- testCases.push(() => new Promise(resolve => {
- const caption = video.addTextTrack("captions", "English", "en");
- caption.mode = "showing";
-
- SimpleTest.executeSoon(() => {
- is(ccBtn.getAttribute("enabled"), "true", "CC button should be enabled");
-
- resolve();
- });
- }));
-
- testCases.push(() => new Promise(resolve => {
- synthesizeMouseAtCenter(ccBtn, {});
-
- SimpleTest.executeSoon(() => {
- is(ttList.hasAttribute("hidden"), false, "Texttrack menu should show up");
- is(ttList.lastChild.getAttribute("on"), "true", "The last added item should be highlighted");
-
- resolve();
- });
- }));
-
- testCases.push(() => new Promise(resolve => {
- const tt = ttList.children[1];
-
- isnot(tt.getAttribute("on"), "true", "Item should be off before click");
- synthesizeMouseAtCenter(tt, {});
-
- SimpleTest.executeSoon(() => {
- is(tt.getAttribute("on"), "true", "Selected item should be enabled");
- is(ttList.getAttribute("hidden"), "true", "Should hide texttrack menu once clicked on an item");
-
- resolve();
- });
- }));
-
- function executeTestCases(tasks) {
- return tasks.reduce((promise, task) => promise.then(task), Promise.resolve());
- }
-
- function getElementByAttribute(aName, aValue) {
- const videoControl = domUtils.getChildrenForNode(video, true)[1];
-
- return SpecialPowers.wrap(document)
- .getAnonymousElementByAttribute(videoControl, aName, aValue);
- }
-
- function loadedmetadata() {
- executeTestCases(testCases).then(SimpleTest.finish);
- }
-
- function startMediaLoad() {
- video.src = "seek_with_sound.ogg";
- video.addEventListener("loadedmetadata", loadedmetadata, false);
- }
-
- function loadevent() {
- SpecialPowers.pushPrefEnv({"set": [["media.cache_size", 40000]]}, startMediaLoad);
- }
-
- window.addEventListener("load", loadevent, false);
-</script>
-</pre>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/tree_shared.js b/toolkit/content/tests/widgets/tree_shared.js
deleted file mode 100644
index b157bdf564..0000000000
--- a/toolkit/content/tests/widgets/tree_shared.js
+++ /dev/null
@@ -1,1405 +0,0 @@
-var columns_simpletree =
-[
- { name: "name", label: "Name", key: true, properties: "one two" },
- { name: "address", label: "Address" }
-];
-
-var columns_hiertree =
-[
- { name: "name", label: "Name", primary: true, key: true, properties: "one two" },
- { name: "address", label: "Address" },
- { name: "planet", label: "Planet" },
- { name: "gender", label: "Gender", cycler: true }
-];
-
-// XXXndeakin still to add some tests for:
-// cycler columns, checkbox cells, progressmeter cells
-
-// this test function expects a tree to have 8 rows in it when it isn't
-// expanded. The tree should only display four rows at a time. If editable,
-// the cell at row 1 and column 0 must be editable, and the cell at row 2 and
-// column 1 must not be editable.
-function testtag_tree(treeid, treerowinfoid, seltype, columnstype, testid)
-{
- // Stop keystrokes that aren't handled by the tree from leaking out and
- // scrolling the main Mochitests window!
- function preventDefault(event) {
- event.preventDefault();
- }
- document.addEventListener("keypress", preventDefault, false);
-
- var multiple = (seltype == "multiple");
-
- var tree = document.getElementById(treeid);
- var treerowinfo = document.getElementById(treerowinfoid);
- var rowInfo;
- if (testid =="tree view")
- rowInfo = getCustomTreeViewCellInfo();
- else
- rowInfo = convertDOMtoTreeRowInfo(treerowinfo, 0, { value: -1 });
- var columnInfo = (columnstype == "simple") ? columns_simpletree : columns_hiertree;
-
- is(tree.view.selection.currentColumn, null, testid + " initial currentColumn");
- 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")
- tree.view.selection.currentColumn = tree.columns[0];
-
- testtag_tree_columns(tree, columnInfo, testid);
- testtag_tree_TreeSelection(tree, testid, multiple);
- testtag_tree_TreeSelection_UI(tree, testid, multiple);
- if (seltype == "cell")
- testtag_tree_TreeSelection_UI_cell(tree, testid, rowInfo);
-
- testtag_tree_TreeView(tree, testid, rowInfo);
-
- is(tree.editable, false, "tree should not be editable");
- // currently, the editable flag means that tree editing cannot be invoked
- // by the user. However, editing can still be started with a script.
- is(tree.editingRow, -1, testid + " initial editingRow");
- is(tree.editingColumn, null, testid + " initial editingColumn");
-
- testtag_tree_UI_editing(tree, testid, rowInfo);
-
- is(tree.editable, false, "tree should not be editable after testtag_tree_UI_editing");
- // currently, the editable flag means that tree editing cannot be invoked
- // by the user. However, editing can still be started with a script.
- is(tree.editingRow, -1, testid + " initial editingRow (continued)");
- is(tree.editingColumn, null, testid + " initial editingColumn (continued)");
-
- 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");
-
- tree.editable = true;
-
- ok(tree.startEditing(1, ecolumn), "startEditing should have returned true");
- is(tree.editingRow, 1, testid + " startEditing editingRow");
- is(tree.editingColumn, ecolumn, testid + " startEditing editingColumn");
- is(tree.getAttribute("editing"), "true", testid + " startEditing editing attribute");
-
- tree.stopEditing(true);
- is(tree.editingRow, -1, testid + " stopEditing editingRow");
- is(tree.editingColumn, null, testid + " stopEditing editingColumn");
- is(tree.hasAttribute("editing"), false, testid + " stopEditing editing attribute");
-
- tree.startEditing(-1, ecolumn);
- is(tree.editingRow == -1 && tree.editingColumn == null, true, testid + " startEditing -1 editingRow");
- tree.startEditing(15, ecolumn);
- is(tree.editingRow == -1 && tree.editingColumn == null, true, testid + " startEditing 15 editingRow");
- tree.startEditing(1, null);
- is(tree.editingRow == -1 && tree.editingColumn == null, true, testid + " startEditing null column editingRow");
- tree.startEditing(2, tree.columns[1]);
- is(tree.editingRow == -1 && tree.editingColumn == null, true, testid + " startEditing non editable cell editingRow");
-
- tree.startEditing(1, ecolumn);
- var inputField = tree.inputField;
- is(inputField instanceof Components.interfaces.nsIDOMXULTextBoxElement, true, testid + "inputField");
- inputField.value = "Changed Value";
- tree.stopEditing(true);
- is(tree.view.getCellText(1, ecolumn), "Changed Value", testid + "edit cell accept");
-
- // this cell can be edited, but stopEditing(false) means don't accept the change.
- tree.startEditing(1, ecolumn);
- inputField.value = "Second Value";
- tree.stopEditing(false);
- is(tree.view.getCellText(1, ecolumn), "Changed Value", testid + "edit cell no accept");
-
- tree.editable = false;
-
- // do the sorting tests last as it will cause the rows to rearrange
- // skip them for the custom tree view
- if (testid !="tree view")
- testtag_tree_TreeView_rows_sort(tree, testid, rowInfo);
-
- testtag_tree_wheel(tree);
-
- document.removeEventListener("keypress", preventDefault, false);
-
- SimpleTest.finish();
-}
-
-function testtag_tree_columns(tree, expectedColumns, testid)
-{
- testid += " ";
-
- var columns = tree.columns;
-
- is(columns instanceof TreeColumns, true, testid + "columns is a TreeColumns");
- is(columns.count, expectedColumns.length, testid + "TreeColumns count");
- is(columns.length, expectedColumns.length, testid + "TreeColumns length");
-
- var treecols = tree.getElementsByTagName("treecols")[0];
- var treecol = treecols.getElementsByTagName("treecol");
-
- var x = 0;
- var primary = null, sorted = null, key = null;
- for (var c = 0; c < expectedColumns.length; c++) {
- var adjtestid = testid + " column " + c + " ";
- var column = columns[c];
- var expectedColumn = expectedColumns[c];
- is(columns.getColumnAt(c), column, adjtestid + "getColumnAt");
- is(columns.getNamedColumn(expectedColumn.name), column, adjtestid + "getNamedColumn");
- is(columns.getColumnFor(treecol[c]), column, adjtestid + "getColumnFor");
- if (expectedColumn.primary)
- primary = column;
- if (expectedColumn.sorted)
- sorted = column;
- if (expectedColumn.key)
- key = column;
-
- // XXXndeakin on Windows and Linux, some columns are one pixel to the
- // left of where they should be. Could just be a rounding issue.
- var adj = 1;
- is(column.x + adj >= x, true, adjtestid + "position is after last column " +
- column.x + "," + column.width + "," + x);
- is(column.width > 0, true, adjtestid + "width is greater than 0");
- x = column.x + column.width;
-
- // now check the TreeColumn properties
- is(column instanceof TreeColumn, true, adjtestid + "is a TreeColumn");
- is(column.element, treecol[c], adjtestid + "element is treecol");
- is(column.columns, columns, adjtestid + "columns is TreeColumns");
- is(column.id, expectedColumn.name, adjtestid + "name");
- is(column.index, c, adjtestid + "index");
- is(column.primary, primary == column, adjtestid + "column is primary");
-
- is(column.cycler, "cycler" in expectedColumn && expectedColumn.cycler,
- adjtestid + "column is cycler");
- is(column.selectable, true, adjtestid + "column is selectable");
- is(column.editable, "editable" in expectedColumn && expectedColumn.editable,
- adjtestid + "column is editable");
-
- is(column.type, "type" in expectedColumn ? expectedColumn.type : 1, adjtestid + "type");
-
- is(column.getPrevious(), c > 0 ? columns[c - 1] : null, adjtestid + "getPrevious");
- is(column.getNext(), c < columns.length - 1 ? columns[c + 1] : null, adjtestid + "getNext");
-
- // check the view's getColumnProperties method
- var properties = tree.view.getColumnProperties(column);
- var expectedProperties = expectedColumn.properties;
- is(properties, expectedProperties ? expectedProperties : "", adjtestid + "getColumnProperties");
- }
-
- is(columns.getFirstColumn(), columns[0], testid + "getFirstColumn");
- is(columns.getLastColumn(), columns[columns.length - 1], testid + "getLastColumn");
- is(columns.getPrimaryColumn(), primary, testid + "getPrimaryColumn");
- is(columns.getSortedColumn(), sorted, testid + "getSortedColumn");
- is(columns.getKeyColumn(), key, testid + "getKeyColumn");
-
- is(columns.getColumnAt(-1), null, testid + "getColumnAt under");
- is(columns.getColumnAt(columns.length), null, testid + "getColumnAt over");
- is(columns.getNamedColumn(""), null, testid + "getNamedColumn null");
- is(columns.getNamedColumn("unknown"), null, testid + "getNamedColumn unknown");
- is(columns.getColumnFor(null), null, testid + "getColumnFor null");
- is(columns.getColumnFor(tree), null, testid + "getColumnFor other");
-}
-
-function testtag_tree_TreeSelection(tree, testid, multiple)
-{
- testid += " selection ";
-
- var selection = tree.view.selection;
- is(selection instanceof Components.interfaces.nsITreeSelection, true,
- testid + "selection is a TreeSelection");
- is(selection.single, !multiple, testid + "single");
-
- testtag_tree_TreeSelection_State(tree, testid + "initial", -1, []);
- is(selection.shiftSelectPivot, -1, testid + "initial shiftSelectPivot");
-
- selection.currentIndex = 2;
- testtag_tree_TreeSelection_State(tree, testid + "set currentIndex", 2, []);
- tree.currentIndex = 3;
- testtag_tree_TreeSelection_State(tree, testid + "set tree.currentIndex", 3, []);
-
- // test the select() method, which should deselect all rows and select
- // a single row
- selection.select(1);
- testtag_tree_TreeSelection_State(tree, testid + "select 1", 1, [1]);
- selection.select(3);
- testtag_tree_TreeSelection_State(tree, testid + "select 2", 3, [3]);
- selection.select(3);
- testtag_tree_TreeSelection_State(tree, testid + "select same", 3, [3]);
-
- selection.currentIndex = 1;
- testtag_tree_TreeSelection_State(tree, testid + "set currentIndex with single selection", 1, [3]);
-
- tree.currentIndex = 2;
- testtag_tree_TreeSelection_State(tree, testid + "set tree.currentIndex with single selection", 2, [3]);
-
- // check the toggleSelect method. In single selection mode, it only toggles on when
- // there isn't currently a selection.
- selection.toggleSelect(2);
- testtag_tree_TreeSelection_State(tree, testid + "toggleSelect 1", 2, multiple ? [2, 3] : [3]);
- selection.toggleSelect(2);
- selection.toggleSelect(3);
- testtag_tree_TreeSelection_State(tree, testid + "toggleSelect 2", 3, []);
-
- // the current index doesn't change after a selectAll, so it should still be set to 1
- // selectAll has no effect on single selection trees
- selection.currentIndex = 1;
- selection.selectAll();
- testtag_tree_TreeSelection_State(tree, testid + "selectAll 1", 1, multiple ? [0, 1, 2, 3, 4, 5, 6, 7] : []);
- selection.toggleSelect(2);
- testtag_tree_TreeSelection_State(tree, testid + "toggleSelect after selectAll", 2,
- multiple ? [0, 1, 3, 4, 5, 6, 7] : [2]);
- selection.clearSelection();
- testtag_tree_TreeSelection_State(tree, testid + "clearSelection", 2, []);
- selection.toggleSelect(3);
- selection.toggleSelect(1);
- if (multiple) {
- selection.selectAll();
- testtag_tree_TreeSelection_State(tree, testid + "selectAll 2", 1, [0, 1, 2, 3, 4, 5, 6, 7]);
- }
- selection.currentIndex = 2;
- selection.clearSelection();
- testtag_tree_TreeSelection_State(tree, testid + "clearSelection after selectAll", 2, []);
-
- // XXXndeakin invertSelection isn't implemented
- // selection.invertSelection();
-
- is(selection.shiftSelectPivot, -1, testid + "shiftSelectPivot set to -1");
-
- // rangedSelect and clearRange set the currentIndex to the endIndex. The
- // shiftSelectPivot property will be set to startIndex.
- selection.rangedSelect(1, 3, false);
- testtag_tree_TreeSelection_State(tree, testid + "rangedSelect no augment",
- multiple ? 3 : 2, multiple ? [1, 2, 3] : []);
- is(selection.shiftSelectPivot, multiple ? 1 : -1,
- testid + "shiftSelectPivot after rangedSelect no augment");
- if (multiple) {
- selection.select(1);
- selection.rangedSelect(0, 2, true);
- testtag_tree_TreeSelection_State(tree, testid + "rangedSelect augment", 2, [0, 1, 2]);
- is(selection.shiftSelectPivot, 0, testid + "shiftSelectPivot after rangedSelect augment");
-
- selection.clearRange(1, 3);
- testtag_tree_TreeSelection_State(tree, testid + "rangedSelect augment", 3, [0]);
-
- // check that rangedSelect can take a start value higher than end
- selection.rangedSelect(3, 1, false);
- testtag_tree_TreeSelection_State(tree, testid + "rangedSelect reverse", 1, [1, 2, 3]);
- is(selection.shiftSelectPivot, 3, testid + "shiftSelectPivot after rangedSelect reverse");
-
- // check that setting the current index doesn't change the selection
- selection.currentIndex = 0;
- testtag_tree_TreeSelection_State(tree, testid + "currentIndex with range selection", 0, [1, 2, 3]);
- }
-
- // both values of rangedSelect may be the same
- selection.rangedSelect(2, 2, false);
- testtag_tree_TreeSelection_State(tree, testid + "rangedSelect one row", 2, [2]);
- is(selection.shiftSelectPivot, 2, testid + "shiftSelectPivot after selecting one row");
-
- if (multiple) {
- selection.rangedSelect(2, 3, true);
-
- // a start index of -1 means from the last point
- selection.rangedSelect(-1, 0, true);
- testtag_tree_TreeSelection_State(tree, testid + "rangedSelect -1 existing selection", 0, [0, 1, 2, 3]);
- is(selection.shiftSelectPivot, 2, testid + "shiftSelectPivot after -1 existing selection");
-
- selection.currentIndex = 2;
- selection.rangedSelect(-1, 0, false);
- testtag_tree_TreeSelection_State(tree, testid + "rangedSelect -1 from currentIndex", 0, [0, 1, 2]);
- is(selection.shiftSelectPivot, 2, testid + "shiftSelectPivot -1 from currentIndex");
- }
-
- // XXXndeakin need to test out of range values but these don't work properly
-/*
- selection.select(-1);
- testtag_tree_TreeSelection_State(tree, testid + "rangedSelect augment -1", -1, []);
-
- selection.select(8);
- testtag_tree_TreeSelection_State(tree, testid + "rangedSelect augment 8", 3, [0]);
-*/
-}
-
-function testtag_tree_TreeSelection_UI(tree, testid, multiple)
-{
- testid += " selection UI ";
-
- var selection = tree.view.selection;
- selection.clearSelection();
- selection.currentIndex = 0;
- tree.focus();
-
- var keydownFired = 0;
- var keypressFired = 0;
- function keydownListener(event)
- {
- keydownFired++;
- }
- function keypressListener(event) {
- keypressFired++;
- }
-
- // check that cursor up and down keys navigate up and down
- // select event fires after a delay so don't expect it. The reason it fires after a delay
- // is so that cursor navigation allows quicking skimming over a set of items without
- // actually firing events in-between, improving performance. The select event will only
- // be fired on the row where the cursor stops.
- window.addEventListener("keydown", keydownListener, false);
- window.addEventListener("keypress", keypressListener, false);
-
- synthesizeKeyExpectEvent("VK_DOWN", {}, tree, "!select", "key down");
- testtag_tree_TreeSelection_State(tree, testid + "key down", 1, [1], 0);
-
- synthesizeKeyExpectEvent("VK_UP", {}, tree, "!select", "key up");
- testtag_tree_TreeSelection_State(tree, testid + "key up", 0, [0], 0);
-
- synthesizeKeyExpectEvent("VK_UP", {}, tree, "!select", "key up at start");
- testtag_tree_TreeSelection_State(tree, testid + "key up at start", 0, [0], 0);
-
- // pressing down while the last row is selected should not fire a select event,
- // as the selection won't have changed. Also the view is not scrolled in this case.
- selection.select(7);
- synthesizeKeyExpectEvent("VK_DOWN", {}, tree, "!select", "key down at end");
- testtag_tree_TreeSelection_State(tree, testid + "key down at end", 7, [7], 0);
-
- // pressing keys while at the edge of the visible rows should scroll the list
- tree.treeBoxObject.scrollToRow(4);
- selection.select(4);
- synthesizeKeyExpectEvent("VK_UP", {}, tree, "!select", "key up with scroll");
- is(tree.treeBoxObject.getFirstVisibleRow(), 3, testid + "key up with scroll");
-
- tree.treeBoxObject.scrollToRow(0);
- 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
- tree.treeBoxObject.scrollToRow(0);
- selection.select(1);
- synthesizeKeyExpectEvent("VK_DOWN", { accelKey: true }, tree, "!select", "key down with accel");
- testtag_tree_TreeSelection_State(tree, testid + "key down with accel", multiple ? 2 : 1, [1]);
- if (!multiple)
- is(tree.treeBoxObject.getFirstVisibleRow(), 1, testid + "key down with accel and scroll");
-
- tree.treeBoxObject.scrollToRow(4);
- selection.select(4);
- synthesizeKeyExpectEvent("VK_UP", { accelKey: true }, tree, "!select", "key up with accel");
- testtag_tree_TreeSelection_State(tree, testid + "key up with accel", multiple ? 3 : 4, [4]);
- if (!multiple)
- is(tree.treeBoxObject.getFirstVisibleRow(), 3, testid + "key up with accel and scroll");
-
- // do this three times, one for each state of pageUpOrDownMovesSelection,
- // and then once with the accel key pressed
- for (let t = 0; t < 3; t++) {
- let testidmod = "";
- if (t == 2)
- testidmod = " with accel"
- else if (t == 1)
- testidmod = " rev";
- var keymod = (t == 2) ? { accelKey: true } : { };
-
- var moveselection = tree.pageUpOrDownMovesSelection;
- if (t == 2)
- moveselection = !moveselection;
-
- tree.treeBoxObject.scrollToRow(4);
- selection.currentIndex = 6;
- selection.select(6);
- var expected = moveselection ? 4 : 6;
- synthesizeKeyExpectEvent("VK_PAGE_UP", keymod, tree, "!select", "key page up");
- testtag_tree_TreeSelection_State(tree, testid + "key page up" + testidmod,
- expected, [expected], moveselection ? 4 : 0);
-
- expected = moveselection ? 0 : 6;
- synthesizeKeyExpectEvent("VK_PAGE_UP", keymod, tree, "!select", "key page up again");
- testtag_tree_TreeSelection_State(tree, testid + "key page up again" + testidmod,
- expected, [expected], 0);
-
- expected = moveselection ? 0 : 6;
- synthesizeKeyExpectEvent("VK_PAGE_UP", keymod, tree, "!select", "key page up at start");
- testtag_tree_TreeSelection_State(tree, testid + "key page up at start" + testidmod,
- expected, [expected], 0);
-
- tree.treeBoxObject.scrollToRow(0);
- selection.currentIndex = 1;
- selection.select(1);
- expected = moveselection ? 3 : 1;
- synthesizeKeyExpectEvent("VK_PAGE_DOWN", keymod, tree, "!select", "key page down");
- testtag_tree_TreeSelection_State(tree, testid + "key page down" + testidmod,
- expected, [expected], moveselection ? 0 : 4);
-
- expected = moveselection ? 7 : 1;
- synthesizeKeyExpectEvent("VK_PAGE_DOWN", keymod, tree, "!select", "key page down again");
- testtag_tree_TreeSelection_State(tree, testid + "key page down again" + testidmod,
- expected, [expected], 4);
-
- expected = moveselection ? 7 : 1;
- synthesizeKeyExpectEvent("VK_PAGE_DOWN", keymod, tree, "!select", "key page down at start");
- testtag_tree_TreeSelection_State(tree, testid + "key page down at start" + testidmod,
- expected, [expected], 4);
-
- if (t < 2)
- tree.pageUpOrDownMovesSelection = !tree.pageUpOrDownMovesSelection;
- }
-
- tree.treeBoxObject.scrollToRow(4);
- selection.select(6);
- synthesizeKeyExpectEvent("VK_HOME", {}, tree, "!select", "key home");
- testtag_tree_TreeSelection_State(tree, testid + "key home", 0, [0], 0);
-
- tree.treeBoxObject.scrollToRow(0);
- selection.select(1);
- synthesizeKeyExpectEvent("VK_END", {}, tree, "!select", "key end");
- testtag_tree_TreeSelection_State(tree, testid + "key end", 7, [7], 4);
-
- // in single selection mode, the selection doesn't change in this case
- tree.treeBoxObject.scrollToRow(4);
- selection.select(6);
- synthesizeKeyExpectEvent("VK_HOME", { accelKey: true }, tree, "!select", "key home with accel");
- testtag_tree_TreeSelection_State(tree, testid + "key home with accel", multiple ? 0 : 6, [6], 0);
-
- tree.treeBoxObject.scrollToRow(0);
- selection.select(1);
- synthesizeKeyExpectEvent("VK_END", { accelKey: true }, tree, "!select", "key end with accel");
- testtag_tree_TreeSelection_State(tree, testid + "key end with accel", multiple ? 7 : 1, [1], 4);
-
- // next, test cursor navigation with selection. Here the select event will be fired
- selection.select(1);
- var eventExpected = multiple ? "select" : "!select";
- synthesizeKeyExpectEvent("VK_DOWN", { shiftKey: true }, tree, eventExpected, "key shift down to select");
- testtag_tree_TreeSelection_State(tree, testid + "key shift down to select",
- multiple ? 2 : 1, multiple ? [1, 2] : [1]);
- is(selection.shiftSelectPivot, multiple ? 1 : -1,
- testid + "key shift down to select shiftSelectPivot");
- synthesizeKeyExpectEvent("VK_UP", { shiftKey: true }, tree, eventExpected, "key shift up to unselect");
- testtag_tree_TreeSelection_State(tree, testid + "key shift up to unselect", 1, [1]);
- is(selection.shiftSelectPivot, multiple ? 1 : -1,
- testid + "key shift up to unselect shiftSelectPivot");
- if (multiple) {
- synthesizeKeyExpectEvent("VK_UP", { shiftKey: true }, tree, "select", "key shift up to select");
- testtag_tree_TreeSelection_State(tree, testid + "key shift up to select", 0, [0, 1]);
- is(selection.shiftSelectPivot, 1, testid + "key shift up to select shiftSelectPivot");
- synthesizeKeyExpectEvent("VK_DOWN", { shiftKey: true }, tree, "select", "key shift down to unselect");
- testtag_tree_TreeSelection_State(tree, testid + "key shift down to unselect", 1, [1]);
- is(selection.shiftSelectPivot, 1, testid + "key shift down to unselect shiftSelectPivot");
- }
-
- // do this twice, one for each state of pageUpOrDownMovesSelection, however
- // when selecting with the shift key, pageUpOrDownMovesSelection is ignored
- // and the selection always changes
- var lastidx = tree.view.rowCount - 1;
- for (let t = 0; t < 2; t++) {
- let testidmod = (t == 0) ? "" : " rev";
-
- // If the top or bottom visible row is the current row, pressing shift and
- // page down / page up selects one page up or one page down. Otherwise, the
- // selection is made to the top or bottom of the visible area.
- tree.treeBoxObject.scrollToRow(lastidx - 3);
- selection.currentIndex = 6;
- selection.select(6);
- synthesizeKeyExpectEvent("VK_PAGE_UP", { shiftKey: true }, tree, eventExpected, "key shift page up");
- testtag_tree_TreeSelection_State(tree, testid + "key shift page up" + testidmod,
- multiple ? 4 : 6, multiple ? [4, 5, 6] : [6]);
- if (multiple) {
- synthesizeKeyExpectEvent("VK_PAGE_UP", { shiftKey: true }, tree, "select", "key shift page up again");
- testtag_tree_TreeSelection_State(tree, testid + "key shift page up again" + testidmod,
- 0, [0, 1, 2, 3, 4, 5, 6]);
- // no change in the selection, so no select event should be fired
- synthesizeKeyExpectEvent("VK_PAGE_UP", { shiftKey: true }, tree, "!select", "key shift page up at start");
- testtag_tree_TreeSelection_State(tree, testid + "key shift page up at start" + testidmod,
- 0, [0, 1, 2, 3, 4, 5, 6]);
- // deselect by paging down again
- synthesizeKeyExpectEvent("VK_PAGE_DOWN", { shiftKey: true }, tree, "select", "key shift page down deselect");
- testtag_tree_TreeSelection_State(tree, testid + "key shift page down deselect" + testidmod,
- 3, [3, 4, 5, 6]);
- }
-
- tree.treeBoxObject.scrollToRow(1);
- selection.currentIndex = 2;
- selection.select(2);
- synthesizeKeyExpectEvent("VK_PAGE_DOWN", { shiftKey: true }, tree, eventExpected, "key shift page down");
- testtag_tree_TreeSelection_State(tree, testid + "key shift page down" + testidmod,
- multiple ? 4 : 2, multiple ? [2, 3, 4] : [2]);
- if (multiple) {
- synthesizeKeyExpectEvent("VK_PAGE_DOWN", { shiftKey: true }, tree, "select", "key shift page down again");
- testtag_tree_TreeSelection_State(tree, testid + "key shift page down again" + testidmod,
- 7, [2, 3, 4, 5, 6, 7]);
- synthesizeKeyExpectEvent("VK_PAGE_DOWN", { shiftKey: true }, tree, "!select", "key shift page down at start");
- testtag_tree_TreeSelection_State(tree, testid + "key shift page down at start" + testidmod,
- 7, [2, 3, 4, 5, 6, 7]);
- synthesizeKeyExpectEvent("VK_PAGE_UP", { shiftKey: true }, tree, "select", "key shift page up deselect");
- testtag_tree_TreeSelection_State(tree, testid + "key shift page up deselect" + testidmod,
- 4, [2, 3, 4]);
- }
-
- // test when page down / page up is pressed when the view is scrolled such
- // that the selection is not visible
- if (multiple) {
- tree.treeBoxObject.scrollToRow(3);
- selection.currentIndex = 1;
- selection.select(1);
- synthesizeKeyExpectEvent("VK_PAGE_DOWN", { shiftKey: true }, tree, eventExpected,
- "key shift page down with view scrolled down");
- testtag_tree_TreeSelection_State(tree, testid + "key shift page down with view scrolled down" + testidmod,
- 6, [1, 2, 3, 4, 5, 6], 3);
-
- tree.treeBoxObject.scrollToRow(2);
- selection.currentIndex = 6;
- selection.select(6);
- synthesizeKeyExpectEvent("VK_PAGE_UP", { shiftKey: true }, tree, eventExpected,
- "key shift page up with view scrolled up");
- testtag_tree_TreeSelection_State(tree, testid + "key shift page up with view scrolled up" + testidmod,
- 2, [2, 3, 4, 5, 6], 2);
-
- tree.treeBoxObject.scrollToRow(2);
- selection.currentIndex = 0;
- selection.select(0);
- // don't expect the select event, as the selection won't have changed
- synthesizeKeyExpectEvent("VK_PAGE_UP", { shiftKey: true }, tree, "!select",
- "key shift page up at start with view scrolled down");
- testtag_tree_TreeSelection_State(tree, testid + "key shift page up at start with view scrolled down" + testidmod,
- 0, [0], 0);
-
- tree.treeBoxObject.scrollToRow(0);
- selection.currentIndex = 7;
- selection.select(7);
- // don't expect the select event, as the selection won't have changed
- synthesizeKeyExpectEvent("VK_PAGE_DOWN", { shiftKey: true }, tree, "!select",
- "key shift page down at end with view scrolled up");
- testtag_tree_TreeSelection_State(tree, testid + "key shift page down at end with view scrolled up" + testidmod,
- 7, [7], 4);
- }
-
- tree.pageUpOrDownMovesSelection = !tree.pageUpOrDownMovesSelection;
- }
-
- tree.treeBoxObject.scrollToRow(4);
- selection.select(5);
- synthesizeKeyExpectEvent("VK_HOME", { shiftKey: true }, tree, eventExpected, "key shift home");
- testtag_tree_TreeSelection_State(tree, testid + "key shift home",
- multiple ? 0 : 5, multiple ? [0, 1, 2, 3, 4, 5] : [5], multiple ? 0 : 4);
-
- tree.treeBoxObject.scrollToRow(0);
- selection.select(3);
- synthesizeKeyExpectEvent("VK_END", { shiftKey: true }, tree, eventExpected, "key shift end");
- testtag_tree_TreeSelection_State(tree, testid + "key shift end",
- multiple ? 7 : 3, multiple ? [3, 4, 5, 6, 7] : [3], multiple ? 4 : 0);
-
- // pressing space selects a row, pressing accel + space unselects a row
- selection.select(2);
- selection.currentIndex = 4;
- synthesizeKeyExpectEvent(" ", {}, tree, "select", "key space on");
- // in single selection mode, space shouldn't do anything
- testtag_tree_TreeSelection_State(tree, testid + "key space on", 4, multiple ? [2, 4] : [2]);
-
- if (multiple) {
- synthesizeKeyExpectEvent(" ", { accelKey: true }, tree, "select", "key space off");
- testtag_tree_TreeSelection_State(tree, testid + "key space off", 4, [2]);
- }
-
- // check that clicking on a row selects it
- tree.treeBoxObject.scrollToRow(0);
- selection.select(2);
- selection.currentIndex = 2;
- if (0) { // XXXndeakin disable these tests for now
- mouseOnCell(tree, 1, tree.columns[1], "mouse on row");
- testtag_tree_TreeSelection_State(tree, testid + "mouse on row", 1, [1], 0,
- tree.selType == "cell" ? tree.columns[1] : null);
- }
-
- // restore the scroll position to the start of the page
- sendKey("HOME");
-
- window.removeEventListener("keydown", keydownListener, false);
- window.removeEventListener("keypress", keypressListener, false);
- is(keydownFired, multiple ? 63 : 40, "keydown event wasn't fired properly");
- is(keypressFired, multiple ? 2 : 1, "keypress event wasn't fired properly");
-}
-
-function testtag_tree_UI_editing(tree, testid, rowInfo)
-{
- testid += " editing UI ";
-
- // check editing UI
- var ecolumn = tree.columns[0];
- var rowIndex = 2;
- var inputField = tree.inputField;
-
- // temporary make the tree editable to test mouse double click
- var wasEditable = tree.editable;
- if (!wasEditable)
- tree.editable = true;
-
- // if this is a container save its current open status
- var row = rowInfo.rows[rowIndex];
- var wasOpen = null;
- if (tree.view.isContainer(row))
- wasOpen = tree.view.isContainerOpen(row);
-
- // Test whether a keystroke can enter text entry, and another can exit.
- if (tree.selType == "cell")
- {
- tree.stopEditing(false);
- ok(!tree.editingColumn, "Should not be editing tree cell now");
- tree.view.selection.currentColumn = ecolumn;
- tree.currentIndex = rowIndex;
-
- const isMac = (navigator.platform.indexOf("Mac") >= 0);
- const StartEditingKey = isMac ? "RETURN" : "F2";
- sendKey(StartEditingKey);
- is(tree.editingColumn, ecolumn, "Should be editing tree cell now");
- sendKey("ESCAPE");
- ok(!tree.editingColumn, "Should not be editing tree cell now");
- is(tree.currentIndex, rowIndex, "Current index should not have changed");
- is(tree.view.selection.currentColumn, ecolumn, "Current column should not have changed");
- }
-
- mouseDblClickOnCell(tree, rowIndex, ecolumn, testid + "edit on double click");
- is(tree.editingColumn, ecolumn, testid + "editing column");
- is(tree.editingRow, rowIndex, testid + "editing row");
-
- // ensure that we don't expand an expandable container on edit
- if (wasOpen != null)
- is(tree.view.isContainerOpen(row), wasOpen, testid + "opened container node on edit");
-
- // ensure to restore editable attribute
- if (!wasEditable)
- tree.editable = false;
-
- var ci = tree.currentIndex;
-
- // cursor navigation should not change the selection while editing
- var testKey = function(key) {
- synthesizeKeyExpectEvent(key, {}, tree, "!select", "key " + key + " with editing");
- is(tree.editingRow == rowIndex && tree.editingColumn == ecolumn && tree.currentIndex == ci,
- true, testid + "key " + key + " while editing");
- }
-
- testKey("VK_DOWN");
- testKey("VK_UP");
- testKey("VK_PAGE_DOWN");
- testKey("VK_PAGE_UP");
- testKey("VK_HOME");
- testKey("VK_END");
-
- // XXXndeakin figure out how to send characters to the textbox
- // inputField.inputField.focus()
- // synthesizeKeyExpectEvent(inputField.inputField, "b", null, "");
- // tree.stopEditing(true);
- // is(tree.view.getCellText(0, ecolumn), "b", testid + "edit cell");
-
- // Restore initial state.
- tree.stopEditing(false);
-}
-
-function testtag_tree_TreeSelection_UI_cell(tree, testid, rowInfo)
-{
- testid += " selection UI cell ";
-
- var columns = tree.columns;
- var firstcolumn = columns[0];
- var secondcolumn = columns[1];
- var lastcolumn = columns[columns.length - 1];
- var secondlastcolumn = columns[columns.length - 2];
- var selection = tree.view.selection;
-
- selection.clearSelection();
- selection.currentIndex = -1;
- selection.currentColumn = firstcolumn;
- is(selection.currentColumn, firstcolumn, testid + " first currentColumn");
-
- // no selection yet so nothing should happen when the left and right cursor keys are pressed
- synthesizeKeyExpectEvent("VK_RIGHT", {}, tree, "!select", "key right no selection");
- testtag_tree_TreeSelection_State(tree, testid + "key right no selection", -1, [], null, firstcolumn);
-
- selection.currentColumn = secondcolumn;
- synthesizeKeyExpectEvent("VK_LEFT", {}, tree, "!select", "key left no selection");
- testtag_tree_TreeSelection_State(tree, testid + "key left no selection", -1, [], null, secondcolumn);
-
- selection.select(2);
- selection.currentIndex = 2;
- if (0) { // XXXndeakin disable these tests for now
- mouseOnCell(tree, 1, secondlastcolumn, "mouse on cell");
- testtag_tree_TreeSelection_State(tree, testid + "mouse on cell", 1, [1], null, secondlastcolumn);
- }
-
- 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);
- selection.currentIndex = 1;
- selection.currentColumn = secondcolumn;
- synthesizeKeyExpectEvent("VK_LEFT", {}, tree, "!select", "key left in second column");
- testtag_tree_TreeSelection_State(tree, testid + "key left in second column", 1, [1], 0, firstcolumn);
-
- synthesizeKeyExpectEvent("VK_LEFT", {}, tree, "!select", "key left in first column");
- testtag_tree_TreeSelection_State(tree, testid + "key left in first column", 1, [1], 0, firstcolumn);
-
- selection.currentColumn = secondlastcolumn;
- synthesizeKeyExpectEvent("VK_RIGHT", {}, tree, "!select", "key right in second last column");
- testtag_tree_TreeSelection_State(tree, testid + "key right in second last column", 1, [1], 0, lastcolumn);
-
- synthesizeKeyExpectEvent("VK_RIGHT", {}, tree, "!select", "key right in last column");
- testtag_tree_TreeSelection_State(tree, testid + "key right in last column", 1, [1], 0, lastcolumn);
-
- synthesizeKeyExpectEvent("VK_UP", {}, tree, "!select", "key up in second row");
- testtag_tree_TreeSelection_State(tree, testid + "key up in second row", 0, [0], 0, lastcolumn);
-
- synthesizeKeyExpectEvent("VK_UP", {}, tree, "!select", "key up in first row");
- testtag_tree_TreeSelection_State(tree, testid + "key up in first row", 0, [0], 0, lastcolumn);
-
- synthesizeKeyExpectEvent("VK_DOWN", {}, tree, "!select", "key down in first row");
- testtag_tree_TreeSelection_State(tree, testid + "key down in first row", 1, [1], 0, lastcolumn);
-
- var lastidx = tree.view.rowCount - 1;
- tree.treeBoxObject.scrollToRow(lastidx - 3);
- selection.select(lastidx);
- selection.currentIndex = lastidx;
- synthesizeKeyExpectEvent("VK_DOWN", {}, tree, "!select", "key down in last row");
- testtag_tree_TreeSelection_State(tree, testid + "key down in last row", lastidx, [lastidx], lastidx - 3, lastcolumn);
-
- synthesizeKeyExpectEvent("VK_HOME", {}, tree, "!select", "key home");
- testtag_tree_TreeSelection_State(tree, testid + "key home", 0, [0], 0, lastcolumn);
-
- synthesizeKeyExpectEvent("VK_END", {}, tree, "!select", "key end");
- testtag_tree_TreeSelection_State(tree, testid + "key end", lastidx, [lastidx], lastidx - 3, lastcolumn);
-
- for (var t = 0; t < 2; t++) {
- var testidmod = (t == 0) ? "" : " rev";
-
- // scroll to the end, subtract 3 because we want lastidx to appear
- // at the end of view
- tree.treeBoxObject.scrollToRow(lastidx - 3);
- selection.select(lastidx);
- selection.currentIndex = lastidx;
- var expectedrow = tree.pageUpOrDownMovesSelection ? lastidx - 3 : lastidx;
- synthesizeKeyExpectEvent("VK_PAGE_UP", {}, tree, "!select", "key page up");
- testtag_tree_TreeSelection_State(tree, testid + "key page up" + testidmod,
- expectedrow, [expectedrow],
- tree.pageUpOrDownMovesSelection ? lastidx - 3 : 0, lastcolumn);
-
- tree.treeBoxObject.scrollToRow(1);
- selection.select(1);
- selection.currentIndex = 1;
- expectedrow = tree.pageUpOrDownMovesSelection ? 4 : 1;
- synthesizeKeyExpectEvent("VK_PAGE_DOWN", {}, tree, "!select", "key page down");
- testtag_tree_TreeSelection_State(tree, testid + "key page down" + testidmod,
- expectedrow, [expectedrow],
- tree.pageUpOrDownMovesSelection ? 1 : lastidx - 3, lastcolumn);
-
- tree.pageUpOrDownMovesSelection = !tree.pageUpOrDownMovesSelection;
- }
-
- // now check navigation when there is unselctable column
- secondcolumn.element.setAttribute("selectable", "false");
- secondcolumn.invalidate();
- is(secondcolumn.selectable, false, testid + "set selectable attribute");
-
- if (columns.length >= 3) {
- selection.select(3);
- selection.currentIndex = 3;
- // check whether unselectable columns are skipped over
- selection.currentColumn = firstcolumn;
- synthesizeKeyExpectEvent("VK_RIGHT", {}, tree, "!select", "key right unselectable column");
- testtag_tree_TreeSelection_State(tree, testid + "key right unselectable column",
- 3, [3], null, secondcolumn.getNext());
-
- synthesizeKeyExpectEvent("VK_LEFT", {}, tree, "!select", "key left unselectable column");
- testtag_tree_TreeSelection_State(tree, testid + "key left unselectable column",
- 3, [3], null, firstcolumn);
- }
-
- secondcolumn.element.removeAttribute("selectable");
- secondcolumn.invalidate();
- is(secondcolumn.selectable, true, testid + "clear selectable attribute");
-
- // check to ensure that navigation isn't allowed if the first column is not selectable
- selection.currentColumn = secondcolumn;
- firstcolumn.element.setAttribute("selectable", "false");
- firstcolumn.invalidate();
- synthesizeKeyExpectEvent("VK_LEFT", {}, tree, "!select", "key left unselectable first column");
- testtag_tree_TreeSelection_State(tree, testid + "key left unselectable first column",
- 3, [3], null, secondcolumn);
- firstcolumn.element.removeAttribute("selectable");
- firstcolumn.invalidate();
-
- // check to ensure that navigation isn't allowed if the last column is not selectable
- selection.currentColumn = secondlastcolumn;
- lastcolumn.element.setAttribute("selectable", "false");
- lastcolumn.invalidate();
- synthesizeKeyExpectEvent("VK_RIGHT", {}, tree, "!select", "key right unselectable last column");
- testtag_tree_TreeSelection_State(tree, testid + "key right unselectable last column",
- 3, [3], null, secondlastcolumn);
- lastcolumn.element.removeAttribute("selectable");
- lastcolumn.invalidate();
-
- // now check for cells with selectable false
- if (!rowInfo.rows[4].cells[1].selectable && columns.length >= 3) {
- // check whether unselectable cells are skipped over
- selection.select(4);
- selection.currentIndex = 4;
-
- selection.currentColumn = firstcolumn;
- synthesizeKeyExpectEvent("VK_RIGHT", {}, tree, "!select", "key right unselectable cell");
- testtag_tree_TreeSelection_State(tree, testid + "key right unselectable cell",
- 4, [4], null, secondcolumn.getNext());
-
- synthesizeKeyExpectEvent("VK_LEFT", {}, tree, "!select", "key left unselectable cell");
- testtag_tree_TreeSelection_State(tree, testid + "key left unselectable cell",
- 4, [4], null, firstcolumn);
-
- tree.treeBoxObject.scrollToRow(1);
- selection.select(3);
- selection.currentIndex = 3;
- selection.currentColumn = secondcolumn;
-
- synthesizeKeyExpectEvent("VK_DOWN", {}, tree, "!select", "key down unselectable cell");
- testtag_tree_TreeSelection_State(tree, testid + "key down unselectable cell",
- 5, [5], 2, secondcolumn);
-
- tree.treeBoxObject.scrollToRow(4);
- synthesizeKeyExpectEvent("VK_UP", {}, tree, "!select", "key up unselectable cell");
- testtag_tree_TreeSelection_State(tree, testid + "key up unselectable cell",
- 3, [3], 3, secondcolumn);
- }
-
- // restore the scroll position to the start of the page
- sendKey("HOME");
-}
-
-function testtag_tree_TreeView(tree, testid, rowInfo)
-{
- testid += " view ";
-
- var columns = tree.columns;
- var view = tree.view;
-
- is(view instanceof Components.interfaces.nsITreeView, true, testid + "view is a TreeView");
- is(view.rowCount, rowInfo.rows.length, testid + "rowCount");
-
- testtag_tree_TreeView_rows(tree, testid, rowInfo, 0);
-
- // note that this will only work for content trees currently
- view.setCellText(0, columns[1], "Changed Value");
- is(view.getCellText(0, columns[1]), "Changed Value", "setCellText");
-
- view.setCellValue(1, columns[0], "Another Changed Value");
- is(view.getCellValue(1, columns[0]), "Another Changed Value", "setCellText");
-}
-
-function testtag_tree_TreeView_rows(tree, testid, rowInfo, startRow)
-{
- var r;
- var columns = tree.columns;
- var view = tree.view;
- var length = rowInfo.rows.length;
-
- // methods to test along with the functions which determine the expected value
- var checkRowMethods =
- {
- isContainer: function(row) { return row.container },
- isContainerOpen: function(row) { return false },
- isContainerEmpty: function(row) { return (row.children != null && row.children.rows.length == 0) },
- isSeparator: function(row) { return row.separator },
- getRowProperties: function(row) { return row.properties },
- getLevel: function(row) { return row.level },
- getParentIndex: function(row) { return row.parent },
- hasNextSibling: function(row) { return r < startRow + length - 1; }
- };
-
- var checkCellMethods =
- {
- getCellText: function(row, cell) { return cell.label },
- getCellValue: function(row, cell) { return cell.value },
- getCellProperties: function(row, cell) { return cell.properties },
- isEditable: function(row, cell) { return cell.editable },
- isSelectable: function(row, cell) { return cell.selectable },
- getImageSrc: function(row, cell) { return cell.image },
- getProgressMode: function(row, cell) { return cell.mode }
- };
-
- var failedMethods = { };
- var checkMethod, actual, expected;
- var containerInfo = null;
- var toggleOpenStateOK = true;
-
- for (r = startRow; r < length; r++) {
- var row = rowInfo.rows[r];
- for (var c = 0; c < row.cells.length; c++) {
- var cell = row.cells[c];
-
- for (checkMethod in checkCellMethods) {
- expected = checkCellMethods[checkMethod](row, cell);
- actual = view[checkMethod](r, columns[c]);
- if (actual !== expected) {
- failedMethods[checkMethod] = true;
- is(actual, expected, testid + "row " + r + " column " + c + " " + checkMethod + " is incorrect");
- }
- }
- }
-
- // compare row properties
- for (checkMethod in checkRowMethods) {
- expected = checkRowMethods[checkMethod](row, r);
- if (checkMethod == "hasNextSibling") {
- actual = view[checkMethod](r, r);
- }
- else {
- actual = view[checkMethod](r);
- }
- if (actual !== expected) {
- failedMethods[checkMethod] = true;
- is(actual, expected, testid + "row " + r + " " + checkMethod + " is incorrect");
- }
- }
-/*
- // open and recurse into containers
- if (row.container) {
- view.toggleOpenState(r);
- if (!view.isContainerOpen(r)) {
- toggleOpenStateOK = false;
- is(view.isContainerOpen(r), true, testid + "row " + r + " toggleOpenState open");
- }
- testtag_tree_TreeView_rows(tree, testid + "container " + r + " ", row.children, r + 1);
- view.toggleOpenState(r);
- if (view.isContainerOpen(r)) {
- toggleOpenStateOK = false;
- is(view.isContainerOpen(r), false, testid + "row " + r + " toggleOpenState close");
- }
- }
-*/
- }
-
- for (var failedMethod in failedMethods) {
- if (failedMethod in checkRowMethods)
- delete checkRowMethods[failedMethod];
- if (failedMethod in checkCellMethods)
- delete checkCellMethods[failedMethod];
- }
-
- for (checkMethod in checkRowMethods)
- is(checkMethod + " ok", checkMethod + " ok", testid + checkMethod);
- for (checkMethod in checkCellMethods)
- is(checkMethod + " ok", checkMethod + " ok", testid + checkMethod);
- if (toggleOpenStateOK)
- is("toggleOpenState ok", "toggleOpenState ok", testid + "toggleOpenState");
-}
-
-function testtag_tree_TreeView_rows_sort(tree, testid, rowInfo)
-{
- // check if cycleHeader sorts the columns
- var columnIndex = 0;
- var view = tree.view;
- var column = tree.columns[columnIndex];
- var columnElement = column.element;
- var sortkey = columnElement.getAttribute("sort");
- if (sortkey) {
- view.cycleHeader(column);
- is(tree.getAttribute("sort"), sortkey, "cycleHeader sort");
- is(tree.getAttribute("sortDirection"), "ascending", "cycleHeader sortDirection ascending");
- is(columnElement.getAttribute("sortDirection"), "ascending", "cycleHeader column sortDirection");
- is(columnElement.getAttribute("sortActive"), "true", "cycleHeader column sortActive");
- view.cycleHeader(column);
- is(tree.getAttribute("sortDirection"), "descending", "cycleHeader sortDirection descending");
- is(columnElement.getAttribute("sortDirection"), "descending", "cycleHeader column sortDirection descending");
- view.cycleHeader(column);
- is(tree.getAttribute("sortDirection"), "", "cycleHeader sortDirection natural");
- is(columnElement.getAttribute("sortDirection"), "", "cycleHeader column sortDirection natural");
- // XXXndeakin content view isSorted needs to be tested
- }
-
- // Check that clicking on column header sorts the column.
- var columns = getSortedColumnArray(tree);
- is(columnElement.getAttribute("sortDirection"), "",
- "cycleHeader column sortDirection");
-
- // Click once on column header and check sorting has cycled once.
- mouseClickOnColumnHeader(columns, columnIndex, 0, 1);
- is(columnElement.getAttribute("sortDirection"), "ascending",
- "single click cycleHeader column sortDirection ascending");
-
- // Now simulate a double click.
- mouseClickOnColumnHeader(columns, columnIndex, 0, 2);
- if (navigator.platform.indexOf("Win") == 0) {
- // Windows cycles only once on double click.
- is(columnElement.getAttribute("sortDirection"), "descending",
- "double click cycleHeader column sortDirection descending");
- // 1 single clicks should restore natural sorting.
- mouseClickOnColumnHeader(columns, columnIndex, 0, 1);
- }
-
- // Check we have gone back to natural sorting.
- is(columnElement.getAttribute("sortDirection"), "",
- "cycleHeader column sortDirection");
-
- columnElement.setAttribute("sorthints", "twostate");
- view.cycleHeader(column);
- is(tree.getAttribute("sortDirection"), "ascending", "cycleHeader sortDirection ascending twostate");
- view.cycleHeader(column);
- is(tree.getAttribute("sortDirection"), "descending", "cycleHeader sortDirection ascending twostate");
- view.cycleHeader(column);
- is(tree.getAttribute("sortDirection"), "ascending", "cycleHeader sortDirection ascending twostate again");
- columnElement.removeAttribute("sorthints");
- view.cycleHeader(column);
- view.cycleHeader(column);
-
- is(columnElement.getAttribute("sortDirection"), "",
- "cycleHeader column sortDirection reset");
-}
-
-// checks if the current and selected rows are correct
-// current is the index of the current row
-// selected is an array of the indicies of the selected rows
-// column is the selected column
-// viewidx is the row that should be visible at the top of the tree
-function testtag_tree_TreeSelection_State(tree, testid, current, selected, viewidx, column)
-{
- var selection = tree.view.selection;
-
- if (!column)
- column = (tree.selType == "cell") ? tree.columns[0] : null;
-
- is(selection.count, selected.length, testid + " count");
- is(tree.currentIndex, current, testid + " currentIndex");
- is(selection.currentIndex, current, testid + " TreeSelection currentIndex");
- is(selection.currentColumn, column, testid + " currentColumn");
- if (viewidx !== null && viewidx !== undefined)
- is(tree.treeBoxObject.getFirstVisibleRow(), viewidx, testid + " first visible row");
-
- var actualSelected = [];
- var count = tree.view.rowCount;
- for (var s = 0; s < count; s++) {
- if (selection.isSelected(s))
- actualSelected.push(s);
- }
-
- is(compareArrays(selected, actualSelected), true, testid + " selection [" + selected + "]");
-
- actualSelected = [];
- var rangecount = selection.getRangeCount();
- for (var r = 0; r < rangecount; r++) {
- var start = {}, end = {};
- selection.getRangeAt(r, start, end);
- for (var rs = start.value; rs <= end.value; rs++)
- actualSelected.push(rs);
- }
-
- is(compareArrays(selected, actualSelected), true, testid + " range selection [" + selected + "]");
-}
-
-function testtag_tree_column_reorder()
-{
- // Make sure the tree is scrolled into the view, otherwise the test will
- // fail
- var testframe = window.parent.document.getElementById("testframe");
- if (testframe) {
- testframe.scrollIntoView();
- }
-
- var tree = document.getElementById("tree-column-reorder");
- var numColumns = tree.columns.count;
-
- var reference = [];
- for (let i = 0; i < numColumns; i++) {
- reference.push("col_" + i);
- }
-
- // Drag the first column to each position
- for (let i = 0; i < numColumns - 1; i++) {
- synthesizeColumnDrag(tree, i, i + 1, true);
- arrayMove(reference, i, i + 1, true);
- checkColumns(tree, reference, "drag first column right");
- }
-
- // And back
- for (let i = numColumns - 1; i >= 1; i--) {
- synthesizeColumnDrag(tree, i, i - 1, false);
- arrayMove(reference, i, i - 1, false);
- checkColumns(tree, reference, "drag last column left");
- }
-
- // Drag each column one column left
- for (let i = 1; i < numColumns; i++) {
- synthesizeColumnDrag(tree, i, i - 1, false);
- arrayMove(reference, i, i - 1, false);
- checkColumns(tree, reference, "drag each column left");
- }
-
- // And back
- for (let i = numColumns - 2; i >= 0; i--) {
- synthesizeColumnDrag(tree, i, i + 1, true);
- arrayMove(reference, i, i + 1, true);
- checkColumns(tree, reference, "drag each column right");
- }
-
- // Drag each column 5 to the right
- for (let i = 0; i < numColumns - 5; i++) {
- synthesizeColumnDrag(tree, i, i + 5, true);
- arrayMove(reference, i, i + 5, true);
- checkColumns(tree, reference, "drag each column 5 to the right");
- }
-
- // And to the left
- for (let i = numColumns - 6; i >= 5; i--) {
- synthesizeColumnDrag(tree, i, i - 5, false);
- arrayMove(reference, i, i - 5, false);
- checkColumns(tree, reference, "drag each column 5 to the left");
- }
-
- // Test that moving a column after itself does not move anything
- synthesizeColumnDrag(tree, 0, 0, true);
- checkColumns(tree, reference, "drag to itself");
- is(document.treecolDragging, null, "drag to itself completed");
-
- // XXX roc should this be here???
- SimpleTest.finish();
-}
-
-function testtag_tree_wheel(aTree)
-{
- const deltaModes = [
- WheelEvent.DOM_DELTA_PIXEL, // 0
- WheelEvent.DOM_DELTA_LINE, // 1
- WheelEvent.DOM_DELTA_PAGE // 2
- ];
- function helper(aStart, aDelta, aIntDelta, aDeltaMode)
- {
- aTree.treeBoxObject.scrollToRow(aStart);
- var expected;
- if (!aIntDelta) {
- expected = aStart;
- }
- else if (aDeltaMode != WheelEvent.DOM_DELTA_PAGE) {
- expected = aStart + aIntDelta;
- }
- else if (aIntDelta > 0) {
- expected = aStart + aTree.treeBoxObject.getPageLength();
- }
- else {
- expected = aStart - aTree.treeBoxObject.getPageLength();
- }
-
- if (expected < 0) {
- expected = 0;
- }
- if (expected > aTree.view.rowCount - aTree.treeBoxObject.getPageLength()) {
- expected = aTree.view.rowCount - aTree.treeBoxObject.getPageLength();
- }
- synthesizeWheel(aTree.body, 1, 1,
- { deltaMode: aDeltaMode, deltaY: aDelta,
- lineOrPageDeltaY: aIntDelta });
- is(aTree.treeBoxObject.getFirstVisibleRow(), expected,
- "testtag_tree_wheel: vertical, starting " + aStart +
- " delta " + aDelta + " lineOrPageDelta " + aIntDelta +
- " aDeltaMode " + aDeltaMode);
-
- aTree.treeBoxObject.scrollToRow(aStart);
- // Check that horizontal scrolling has no effect
- synthesizeWheel(aTree.body, 1, 1,
- { deltaMode: aDeltaMode, deltaX: aDelta,
- lineOrPageDeltaX: aIntDelta });
- is(aTree.treeBoxObject.getFirstVisibleRow(), aStart,
- "testtag_tree_wheel: horizontal, starting " + aStart +
- " delta " + aDelta + " lineOrPageDelta " + aIntDelta +
- " aDeltaMode " + aDeltaMode);
- }
-
- var defaultPrevented = 0;
-
- function wheelListener(event) {
- defaultPrevented++;
- }
- window.addEventListener("wheel", wheelListener, false);
-
- deltaModes.forEach(function(aDeltaMode) {
- var delta = (aDeltaMode == WheelEvent.DOM_DELTA_PIXEL) ? 5.0 : 0.3;
- helper(2, -delta, 0, aDeltaMode);
- helper(2, -delta, -1, aDeltaMode);
- helper(2, delta, 0, aDeltaMode);
- helper(2, delta, 1, aDeltaMode);
- helper(2, -2 * delta, 0, aDeltaMode);
- helper(2, -2 * delta, -1, aDeltaMode);
- helper(2, 2 * delta, 0, aDeltaMode);
- helper(2, 2 * delta, 1, aDeltaMode);
- });
-
- window.removeEventListener("wheel", wheelListener, false);
- is(defaultPrevented, 48, "wheel event default prevented");
-}
-
-function synthesizeColumnDrag(aTree, aMouseDownColumnNumber, aMouseUpColumnNumber, aAfter)
-{
- var columns = getSortedColumnArray(aTree);
-
- var down = columns[aMouseDownColumnNumber].element;
- var up = columns[aMouseUpColumnNumber].element;
-
- // Target the initial mousedown in the middle of the column header so we
- // avoid the extra hit test space given to the splitter
- var columnWidth = down.boxObject.width;
- var splitterHitWidth = columnWidth / 2;
- synthesizeMouse(down, splitterHitWidth, 3, { type: "mousedown"});
-
- var offsetX = 0;
- if (aAfter) {
- offsetX = columnWidth;
- }
-
- if (aMouseUpColumnNumber > aMouseDownColumnNumber) {
- for (let i = aMouseDownColumnNumber; i <= aMouseUpColumnNumber; i++) {
- let move = columns[i].element;
- synthesizeMouse(move, offsetX, 3, { type: "mousemove"});
- }
- }
- else {
- for (let i = aMouseDownColumnNumber; i >= aMouseUpColumnNumber; i--) {
- let move = columns[i].element;
- synthesizeMouse(move, offsetX, 3, { type: "mousemove"});
- }
- }
-
- synthesizeMouse(up, offsetX, 3, { type: "mouseup"});
-}
-
-function arrayMove(aArray, aFrom, aTo, aAfter)
-{
- var o = aArray.splice(aFrom, 1)[0];
- if (aTo > aFrom) {
- aTo--;
- }
-
- if (aAfter) {
- aTo++;
- }
-
- aArray.splice(aTo, 0, o);
-}
-
-function getSortedColumnArray(aTree)
-{
- var columns = aTree.columns;
- var array = [];
- for (let i = 0; i < columns.length; i++) {
- array.push(columns.getColumnAt(i));
- }
-
- array.sort(function(a, b) {
- var o1 = parseInt(a.element.getAttribute("ordinal"));
- var o2 = parseInt(b.element.getAttribute("ordinal"));
- return o1 - o2;
- });
- return array;
-}
-
-function checkColumns(aTree, aReference, aMessage)
-{
- var columns = getSortedColumnArray(aTree);
- var ids = [];
- columns.forEach(function(e) {
- ids.push(e.element.id);
- });
- is(compareArrays(ids, aReference), true, aMessage);
-}
-
-function mouseOnCell(tree, row, column, testname)
-{
- var rect = tree.boxObject.getCoordsForCellItem(row, column, "text");
-
- synthesizeMouseExpectEvent(tree.body, rect.x, rect.y, {}, tree, "select", testname);
-}
-
-function mouseClickOnColumnHeader(aColumns, aColumnIndex, aButton, aClickCount)
-{
- var columnHeader = aColumns[aColumnIndex].element;
- var columnHeaderRect = columnHeader.getBoundingClientRect();
- var columnWidth = columnHeaderRect.right - columnHeaderRect.left;
- // For multiple click we send separate click events, with increasing
- // clickCount. This simulates the common behavior of multiple clicks.
- for (let i = 1; i <= aClickCount; i++) {
- // Target the middle of the column header.
- synthesizeMouse(columnHeader, columnWidth / 2, 3,
- { button: aButton,
- clickCount: i }, null);
- }
-}
-
-function mouseDblClickOnCell(tree, row, column, testname)
-{
- // select the row we will edit
- var selection = tree.view.selection;
- selection.select(row);
- tree.treeBoxObject.ensureRowIsVisible(row);
-
- // get cell coordinates
- var rect = tree.treeBoxObject.getCoordsForCellItem(row, column, "text");
-
- synthesizeMouse(tree.body, rect.x, rect.y, { clickCount: 2 }, null);
-}
-
-function compareArrays(arr1, arr2)
-{
- if (arr1.length != arr2.length)
- return false;
-
- for (let i = 0; i < arr1.length; i++) {
- if (arr1[i] != arr2[i])
- return false;
- }
-
- return true;
-}
-
-function convertProperties(arr)
-{
- var results = [];
- var count = arr.Count();
- for (let i = 0; i < count; i++)
- results.push(arr.GetElementAt(i).QueryInterface(Components.interfaces.nsIAtom).toString());
-
- results.sort();
- return results.join(" ");
-}
-
-function convertDOMtoTreeRowInfo(treechildren, level, rowidx)
-{
- var obj = { rows: [] };
-
- var parentidx = rowidx.value;
-
- treechildren = treechildren.childNodes;
- for (var r = 0; r < treechildren.length; r++) {
- rowidx.value++;
-
- var treeitem = treechildren[r];
- if (treeitem.hasChildNodes()) {
- var treerow = treeitem.firstChild;
- var cellInfo = [];
- for (var c = 0; c < treerow.childNodes.length; c++) {
- var cell = treerow.childNodes[c];
- cellInfo.push({ label: "" + cell.getAttribute("label"),
- value: cell.getAttribute("value"),
- properties: cell.getAttribute("properties"),
- editable: cell.getAttribute("editable") != "false",
- selectable: cell.getAttribute("selectable") != "false",
- image: cell.getAttribute("src"),
- mode: cell.hasAttribute("mode") ? parseInt(cell.getAttribute("mode")) : 3 });
- }
-
- var descendants = treeitem.lastChild;
- var children = (treerow == descendants) ? null :
- convertDOMtoTreeRowInfo(descendants, level + 1, rowidx);
- obj.rows.push({ cells: cellInfo,
- properties: treerow.getAttribute("properties"),
- container: treeitem.getAttribute("container") == "true",
- separator: treeitem.localName == "treeseparator",
- children: children,
- level: level,
- parent: parentidx });
- }
- }
-
- return obj;
-}
diff --git a/toolkit/content/tests/widgets/video.ogg b/toolkit/content/tests/widgets/video.ogg
deleted file mode 100644
index ac7ece3519..0000000000
--- a/toolkit/content/tests/widgets/video.ogg
+++ /dev/null
Binary files differ
diff --git a/toolkit/content/tests/widgets/videocontrols_direction-1-ref.html b/toolkit/content/tests/widgets/videocontrols_direction-1-ref.html
deleted file mode 100644
index 1f7e76a7d0..0000000000
--- a/toolkit/content/tests/widgets/videocontrols_direction-1-ref.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<link rel="stylesheet" type="text/css" href="videomask.css">
-</head>
-<body style="text-align: right;">
-<video controls preload="none" id="av" source="audio.wav"></video>
-<div id="mask"></div>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/videocontrols_direction-1a.html b/toolkit/content/tests/widgets/videocontrols_direction-1a.html
deleted file mode 100644
index a4d3546294..0000000000
--- a/toolkit/content/tests/widgets/videocontrols_direction-1a.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE HTML>
-<html dir="rtl">
-<head>
-<link rel="stylesheet" type="text/css" href="videomask.css">
-</head>
-<body>
-<video controls preload="none" id="av" source="audio.wav"></video>
-<div id="mask"></div>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/videocontrols_direction-1b.html b/toolkit/content/tests/widgets/videocontrols_direction-1b.html
deleted file mode 100644
index a14b11d5ff..0000000000
--- a/toolkit/content/tests/widgets/videocontrols_direction-1b.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE HTML>
-<html style="direction: rtl">
-<head>
-<link rel="stylesheet" type="text/css" href="videomask.css">
-</head>
-<body>
-<video controls preload="none" id="av" source="audio.wav"></video>
-<div id="mask"></div>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/videocontrols_direction-1c.html b/toolkit/content/tests/widgets/videocontrols_direction-1c.html
deleted file mode 100644
index 0885ebd893..0000000000
--- a/toolkit/content/tests/widgets/videocontrols_direction-1c.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<link rel="stylesheet" type="text/css" href="videomask.css">
-</head>
-<body style="direction: rtl">
-<video controls preload="none" id="av" source="audio.wav"></video>
-<div id="mask"></div>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/videocontrols_direction-1d.html b/toolkit/content/tests/widgets/videocontrols_direction-1d.html
deleted file mode 100644
index a39accec72..0000000000
--- a/toolkit/content/tests/widgets/videocontrols_direction-1d.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<link rel="stylesheet" type="text/css" href="videomask.css">
-</head>
-<body style="text-align: right;">
-<video controls preload="none" id="av" source="audio.wav" dir="rtl"></video>
-<div id="mask"></div>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/videocontrols_direction-1e.html b/toolkit/content/tests/widgets/videocontrols_direction-1e.html
deleted file mode 100644
index 25e7c2c1f9..0000000000
--- a/toolkit/content/tests/widgets/videocontrols_direction-1e.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<link rel="stylesheet" type="text/css" href="videomask.css">
-</head>
-<body style="text-align: right;">
-<video controls preload="none" id="av" source="audio.wav" style="direction: rtl;"></video>
-<div id="mask"></div>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/videocontrols_direction-2-ref.html b/toolkit/content/tests/widgets/videocontrols_direction-2-ref.html
deleted file mode 100644
index 630177883c..0000000000
--- a/toolkit/content/tests/widgets/videocontrols_direction-2-ref.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<link rel="stylesheet" type="text/css" href="videomask.css">
-</head>
-<body style="text-align: right;">
-<audio controls preload="none" id="av" source="audio.wav"></audio>
-<div id="mask"></div>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/videocontrols_direction-2a.html b/toolkit/content/tests/widgets/videocontrols_direction-2a.html
deleted file mode 100644
index 2e40cdc1a7..0000000000
--- a/toolkit/content/tests/widgets/videocontrols_direction-2a.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE HTML>
-<html dir="rtl">
-<head>
-<link rel="stylesheet" type="text/css" href="videomask.css">
-</head>
-<body>
-<audio controls preload="none" id="av" source="audio.wav"></audio>
-<div id="mask"></div>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/videocontrols_direction-2b.html b/toolkit/content/tests/widgets/videocontrols_direction-2b.html
deleted file mode 100644
index 2e4dadb6ff..0000000000
--- a/toolkit/content/tests/widgets/videocontrols_direction-2b.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE HTML>
-<html style="direction: rtl">
-<head>
-<link rel="stylesheet" type="text/css" href="videomask.css">
-</head>
-<body>
-<audio controls preload="none" id="av" source="audio.wav"></audio>
-<div id="mask"></div>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/videocontrols_direction-2c.html b/toolkit/content/tests/widgets/videocontrols_direction-2c.html
deleted file mode 100644
index a43b03e8f9..0000000000
--- a/toolkit/content/tests/widgets/videocontrols_direction-2c.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<link rel="stylesheet" type="text/css" href="videomask.css">
-</head>
-<body style="direction: rtl">
-<audio controls preload="none" id="av" source="audio.wav"></audio>
-<div id="mask"></div>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/videocontrols_direction-2d.html b/toolkit/content/tests/widgets/videocontrols_direction-2d.html
deleted file mode 100644
index 52d56f1ccd..0000000000
--- a/toolkit/content/tests/widgets/videocontrols_direction-2d.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<link rel="stylesheet" type="text/css" href="videomask.css">
-</head>
-<body style="text-align: right;">
-<audio controls preload="none" id="av" source="audio.wav" dir="rtl"></audio>
-<div id="mask"></div>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/videocontrols_direction-2e.html b/toolkit/content/tests/widgets/videocontrols_direction-2e.html
deleted file mode 100644
index 58bc30e2b3..0000000000
--- a/toolkit/content/tests/widgets/videocontrols_direction-2e.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<link rel="stylesheet" type="text/css" href="videomask.css">
-</head>
-<body style="text-align: right;">
-<audio controls preload="none" id="av" source="audio.wav" style="direction: rtl;"></audio>
-<div id="mask"></div>
-</body>
-</html>
diff --git a/toolkit/content/tests/widgets/videocontrols_direction_test.js b/toolkit/content/tests/widgets/videocontrols_direction_test.js
deleted file mode 100644
index 8ad76c0644..0000000000
--- a/toolkit/content/tests/widgets/videocontrols_direction_test.js
+++ /dev/null
@@ -1,90 +0,0 @@
-var RemoteCanvas = function(url, id) {
- this.url = url;
- this.id = id;
- this.snapshot = null;
-};
-
-RemoteCanvas.CANVAS_WIDTH = 200;
-RemoteCanvas.CANVAS_HEIGHT = 200;
-
-RemoteCanvas.prototype.compare = function(otherCanvas, expected) {
- return compareSnapshots(this.snapshot, otherCanvas.snapshot, expected)[0];
-}
-
-RemoteCanvas.prototype.load = function(callback) {
- var iframe = document.createElement("iframe");
- iframe.id = this.id + "-iframe";
- iframe.width = RemoteCanvas.CANVAS_WIDTH + "px";
- iframe.height = RemoteCanvas.CANVAS_HEIGHT + "px";
- iframe.src = this.url;
- var me = this;
- iframe.addEventListener("load", function() {
- info("iframe loaded");
- var m = iframe.contentDocument.getElementById("av");
- m.addEventListener("suspend", function(aEvent) {
- m.removeEventListener("suspend", arguments.callee, false);
- setTimeout(function() {
- me.remotePageLoaded(callback);
- }, 0);
- }, false);
- m.src = m.getAttribute("source");
- }, false);
- window.document.body.appendChild(iframe);
-};
-
-RemoteCanvas.prototype.remotePageLoaded = function(callback) {
- var ldrFrame = document.getElementById(this.id + "-iframe");
- this.snapshot = snapshotWindow(ldrFrame.contentWindow);
- this.snapshot.id = this.id + "-canvas";
- window.document.body.appendChild(this.snapshot);
- callback(this);
-};
-
-RemoteCanvas.prototype.cleanup = function() {
- var iframe = document.getElementById(this.id + "-iframe");
- iframe.parentNode.removeChild(iframe);
- var canvas = document.getElementById(this.id + "-canvas");
- canvas.parentNode.removeChild(canvas);
-};
-
-function runTest(index) {
- var canvases = [];
- function testCallback(canvas) {
- canvases.push(canvas);
-
- if (canvases.length == 2) { // when both canvases are loaded
- var expectedEqual = currentTest.op == "==";
- var result = canvases[0].compare(canvases[1], expectedEqual);
- ok(result, "Rendering of reftest " + currentTest.test + " should " +
- (expectedEqual ? "not " : "") + "be different to the reference");
-
- if (result) {
- canvases[0].cleanup();
- canvases[1].cleanup();
- }
- else {
- info("Snapshot of canvas 1: " + canvases[0].snapshot.toDataURL());
- info("Snapshot of canvas 2: " + canvases[1].snapshot.toDataURL());
- }
-
- if (index < tests.length - 1)
- runTest(index + 1);
- else
- SimpleTest.finish();
- }
- }
-
- var currentTest = tests[index];
- var testCanvas = new RemoteCanvas(currentTest.test, "test-" + index);
- testCanvas.load(testCallback);
-
- var refCanvas = new RemoteCanvas(currentTest.ref, "ref-" + index);
- refCanvas.load(testCallback);
-}
-
-SimpleTest.waitForExplicitFinish();
-SimpleTest.requestCompleteLog();
-
-window.addEventListener("load", function() {
- SpecialPowers.pushPrefEnv({"set": [["media.cache_size", 40000]]}, function() { runTest(0); });
-}, true);
diff --git a/toolkit/content/tests/widgets/videomask.css b/toolkit/content/tests/widgets/videomask.css
deleted file mode 100644
index 066d441388..0000000000
--- a/toolkit/content/tests/widgets/videomask.css
+++ /dev/null
@@ -1,23 +0,0 @@
-html, body {
- margin: 0;
- padding: 0;
-}
-
-audio, video {
- width: 140px;
- height: 100px;
- background-color: black;
-}
-
-/**
- * Create a mask for the video direction tests which covers up the throbber.
- */
-#mask {
- position: absolute;
- z-index: 3;
- width: 140px;
- height: 72px;
- background-color: green;
- top: 0;
- right: 0;
-}
diff --git a/toolkit/content/tests/widgets/window_menubar.xul b/toolkit/content/tests/widgets/window_menubar.xul
deleted file mode 100644
index b7669e0b37..0000000000
--- a/toolkit/content/tests/widgets/window_menubar.xul
+++ /dev/null
@@ -1,820 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-
-<!-- the condition in the focus event handler is because pressing Tab
- unfocuses and refocuses the window on Windows -->
-
-<window title="Popup Tests"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
- <script type="application/javascript" src="popup_shared.js"></script>
-
-<!--
- Need to investigate these tests a bit more. Some of the accessibility events
- are firing multiple times or in different orders in different circumstances.
- Note that this was also the case before bug 279703.
- -->
-
-<hbox style="margin-left: 275px; margin-top: 275px;">
-<menubar id="menubar">
- <menu id="filemenu" label="File" accesskey="F">
- <menupopup id="filepopup">
- <menuitem id="item1" label="Open" accesskey="O"/>
- <menuitem id="item2" label="Save" accesskey="S"/>
- <menuitem id="item3" label="Close" accesskey="C"/>
- </menupopup>
- </menu>
- <menu id="secretmenu" label="Secret Menu" accesskey="S" disabled="true">
- <menupopup>
- <menuitem label="Secret Command" accesskey="S"/>
- </menupopup>
- </menu>
- <menu id="editmenu" label="Edit" accesskey="E">
- <menupopup id="editpopup">
- <menuitem id="cut" label="Cut" accesskey="t" disabled="true"/>
- <menuitem id="copy" label="Copy" accesskey="C"/>
- <menuitem id="paste" label="Paste" accesskey="P"/>
- </menupopup>
- </menu>
- <menu id="viewmenu" label="View" accesskey="V">
- <menupopup id="viewpopup">
- <menu id="toolbar" label="Toolbar" accesskey="T">
- <menupopup id="toolbarpopup">
- <menuitem id="navigation" label="Navigation" accesskey="N" disabled="true"/>
- <menuitem label="Bookmarks" accesskey="B" disabled="true"/>
- </menupopup>
- </menu>
- <menuitem label="Status Bar" accesskey="S"/>
- <menu label="Sidebar" accesskey="d">
- <menupopup>
- <menuitem label="Bookmarks" accesskey="B"/>
- <menuitem label="History" accesskey="H"/>
- </menupopup>
- </menu>
- </menupopup>
- </menu>
- <menu id="helpmenu" label="Help" accesskey="H">
- <menupopup id="helppopup" >
- <label value="Unselectable"/>
- <menuitem id="contents" label="Contents" accesskey="C"/>
- <menuitem label="More Info" accesskey="I"/>
- <menuitem id="amenu" label="A Menu" accesskey="M"/>
- <menuitem label="Another Menu"/>
- <menuitem id="one" label="One"/>
- <menu id="only" label="Only Menu">
- <menupopup>
- <menuitem label="Test Submenu"/>
- </menupopup>
- </menu>
- <menuitem label="Second Menu"/>
- <menuitem id="other" disabled="true" label="Other Menu"/>
- <menuitem id="third" label="Third Menu"/>
- <menuitem label="One Other Menu"/>
- <label value="Unselectable"/>
- <menuitem id="about" label="About" accesskey="A"/>
- </menupopup>
- </menu>
-</menubar>
-</hbox>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-window.opener.SimpleTest.waitForFocus(function () {
- gFilePopup = document.getElementById("filepopup");
- var filemenu = document.getElementById("filemenu");
- filemenu.focus();
- is(filemenu.openedWithKey, false, "initial openedWithKey");
- startPopupTests(popupTests);
-}, window);
-
-// On Linux, the first menu opens when F10 is pressed, but on other platforms
-// the menubar is focused but no menu is opened. This means that different events
-// fire.
-function pressF10Events()
-{
- return navigator.platform.indexOf("Linux") >= 0 ?
- [ "DOMMenuBarActive menubar", "DOMMenuItemActive filemenu", "popupshowing filepopup", "DOMMenuItemActive item1", "popupshown filepopup"] :
- [ "DOMMenuBarActive menubar", "DOMMenuItemActive filemenu" ];
-}
-
-function closeAfterF10Events(extraInactive)
-{
- if (navigator.platform.indexOf("Linux") >= 0) {
- var events = [ "popuphiding filepopup", "popuphidden filepopup", "DOMMenuItemInactive item1",
- "DOMMenuInactive filepopup", "DOMMenuBarInactive menubar",
- "DOMMenuItemInactive filemenu" ];
- if (extraInactive)
- events.push("DOMMenuItemInactive filemenu");
- return events;
- }
-
- return [ "DOMMenuBarInactive menubar", "DOMMenuItemInactive filemenu" ];
-}
-
-var popupTests = [
-{
- testname: "press on menu",
- events: [ "popupshowing filepopup", "DOMMenuBarActive menubar",
- "DOMMenuItemActive filemenu", "popupshown filepopup" ],
- test: function() { synthesizeMouse(document.getElementById("filemenu"), 8, 8, { }); },
- result: function (testname) {
- checkActive(gFilePopup, "", testname);
- checkOpen("filemenu", testname);
- is(document.getElementById("filemenu").openedWithKey, false, testname + " openedWithKey");
- }
-},
-{
- // check that pressing cursor down while there is no selection
- // highlights the first item
- testname: "cursor down no selection",
- events: [ "DOMMenuItemActive item1" ],
- test: function() { sendKey("DOWN"); },
- result: function(testname) { checkActive(gFilePopup, "item1", testname); }
-},
-{
- // check that pressing cursor up wraps and highlights the last item
- testname: "cursor up wrap",
- events: [ "DOMMenuItemInactive item1", "DOMMenuItemActive item3" ],
- test: function() { sendKey("UP"); },
- result: function(testname) { checkActive(gFilePopup, "item3", testname); }
-},
-{
- // check that pressing cursor down wraps and highlights the first item
- testname: "cursor down wrap",
- events: [ "DOMMenuItemInactive item3", "DOMMenuItemActive item1" ],
- test: function() { sendKey("DOWN"); },
- result: function(testname) { checkActive(gFilePopup, "item1", testname); }
-},
-{
- // check that pressing cursor down highlights the second item
- testname: "cursor down",
- events: [ "DOMMenuItemInactive item1", "DOMMenuItemActive item2" ],
- test: function() { sendKey("DOWN"); },
- result: function(testname) { checkActive(gFilePopup, "item2", testname); }
-},
-{
- // check that pressing cursor up highlights the second item
- testname: "cursor up",
- events: [ "DOMMenuItemInactive item2", "DOMMenuItemActive item1" ],
- test: function() { sendKey("UP"); },
- result: function(testname) { checkActive(gFilePopup, "item1", testname); }
-},
-
-{
- // cursor right should skip the disabled menu and move to the edit menu
- testname: "cursor right skip disabled",
- events: function() {
- var elist = [
- // the file menu gets deactivated, the file menu gets hidden, then
- // the edit menu is activated
- "DOMMenuItemInactive filemenu", "DOMMenuItemActive editmenu",
- "popuphiding filepopup", "popuphidden filepopup",
- // the popupshowing event gets fired when showing the edit menu.
- // The item from the file menu doesn't get deactivated until the
- // next item needs to be selected
- "popupshowing editpopup", "DOMMenuItemInactive item1",
- // not sure why the menu inactivated event is firing so late
- "DOMMenuInactive filepopup"
- ];
- // finally, the first item is activated and popupshown is fired.
- // On Windows, don't skip disabled items.
- if (navigator.platform.indexOf("Win") == 0)
- elist.push("DOMMenuItemActive cut");
- else
- elist.push("DOMMenuItemActive copy");
- elist.push("popupshown editpopup");
- return elist;
- },
- test: function() { sendKey("RIGHT"); },
- result: function(testname) {
- var expected = (navigator.platform.indexOf("Win") == 0) ? "cut" : "copy";
- checkActive(document.getElementById("editpopup"), expected, testname);
- checkClosed("filemenu", testname);
- checkOpen("editmenu", testname);
- is(document.getElementById("editmenu").openedWithKey, false, testname + " openedWithKey");
- }
-},
-{
- // on Windows, a disabled item is selected, so pressing RETURN should close
- // the menu but not fire a command event
- testname: "enter on disabled",
- events: function() {
- if (navigator.platform.indexOf("Win") == 0)
- return [ "popuphiding editpopup", "popuphidden editpopup",
- "DOMMenuItemInactive cut", "DOMMenuInactive editpopup",
- "DOMMenuBarInactive menubar",
- "DOMMenuItemInactive editmenu", "DOMMenuItemInactive editmenu" ];
- else
- return [ "DOMMenuItemInactive copy", "DOMMenuInactive editpopup",
- "DOMMenuBarInactive menubar",
- "DOMMenuItemInactive editmenu", "DOMMenuItemInactive editmenu",
- "command copy", "popuphiding editpopup", "popuphidden editpopup",
- "DOMMenuItemInactive copy" ];
- },
- test: function() { sendKey("RETURN"); },
- result: function(testname) {
- checkClosed("editmenu", testname);
- is(document.getElementById("editmenu").openedWithKey, false, testname + " openedWithKey");
- }
-},
-{
- // pressing Alt + a key should open the corresponding menu
- testname: "open with accelerator",
- events: function() {
- return [ "DOMMenuBarActive menubar",
- "popupshowing viewpopup", "DOMMenuItemActive viewmenu",
- "DOMMenuItemActive toolbar", "popupshown viewpopup" ];
- },
- test: function() { synthesizeKey("V", { altKey: true }); },
- result: function(testname) {
- checkOpen("viewmenu", testname);
- is(document.getElementById("viewmenu").openedWithKey, true, testname + " openedWithKey");
- }
-},
-{
- // open the submenu with the cursor right key
- testname: "open submenu with cursor right",
- events: function() {
- // on Windows, the disabled 'navigation' item can stll be highlihted
- if (navigator.platform.indexOf("Win") == 0)
- return [ "popupshowing toolbarpopup", "DOMMenuItemActive navigation",
- "popupshown toolbarpopup" ];
- else
- return [ "popupshowing toolbarpopup", "popupshown toolbarpopup" ];
- },
- test: function() { sendKey("RIGHT"); },
- result: function(testname) {
- checkOpen("viewmenu", testname);
- checkOpen("toolbar", testname);
- }
-},
-{
- // close the submenu with the cursor left key
- testname: "close submenu with cursor left",
- events: function() {
- if (navigator.platform.indexOf("Win") == 0)
- return [ "popuphiding toolbarpopup", "popuphidden toolbarpopup",
- "DOMMenuItemInactive navigation", "DOMMenuInactive toolbarpopup",
- "DOMMenuItemActive toolbar" ];
- else
- return [ "popuphiding toolbarpopup", "popuphidden toolbarpopup",
- "DOMMenuInactive toolbarpopup",
- "DOMMenuItemActive toolbar" ];
- },
- test: function() { sendKey("LEFT"); },
- result: function(testname) {
- checkOpen("viewmenu", testname);
- checkClosed("toolbar", testname);
- }
-},
-{
- // open the submenu with the enter key
- testname: "open submenu with enter",
- events: function() {
- // on Windows, the disabled 'navigation' item can stll be highlighted
- if (navigator.platform.indexOf("Win") == 0)
- return [ "popupshowing toolbarpopup", "DOMMenuItemActive navigation",
- "popupshown toolbarpopup" ];
- else
- return [ "popupshowing toolbarpopup", "popupshown toolbarpopup" ];
- },
- test: function() { sendKey("RETURN"); },
- result: function(testname) {
- checkOpen("viewmenu", testname);
- checkOpen("toolbar", testname);
- },
-},
-{
- // close the submenu with the escape key
- testname: "close submenu with escape",
- events: function() {
- if (navigator.platform.indexOf("Win") == 0)
- return [ "popuphiding toolbarpopup", "popuphidden toolbarpopup",
- "DOMMenuItemInactive navigation", "DOMMenuInactive toolbarpopup",
- "DOMMenuItemActive toolbar" ];
- else
- return [ "popuphiding toolbarpopup", "popuphidden toolbarpopup",
- "DOMMenuInactive toolbarpopup",
- "DOMMenuItemActive toolbar" ];
- },
- test: function() { sendKey("ESCAPE"); },
- result: function(testname) {
- checkOpen("viewmenu", testname);
- checkClosed("toolbar", testname);
- },
-},
-{
- // open the submenu with the enter key again
- testname: "open submenu with enter again",
- condition: function() { return (navigator.platform.indexOf("Win") == 0) },
- events: function() {
- // on Windows, the disabled 'navigation' item can stll be highlighted
- if (navigator.platform.indexOf("Win") == 0)
- return [ "popupshowing toolbarpopup", "DOMMenuItemActive navigation",
- "popupshown toolbarpopup" ];
- else
- return [ "popupshowing toolbarpopup", "popupshown toolbarpopup" ];
- },
- test: function() { sendKey("RETURN"); },
- result: function(testname) {
- checkOpen("viewmenu", testname);
- checkOpen("toolbar", testname);
- },
-},
-{
- // while a submenu is open, switch to the next toplevel menu with the cursor right key
- testname: "while a submenu is open, switch to the next menu with the cursor right",
- condition: function() { return (navigator.platform.indexOf("Win") == 0) },
- events: [ "DOMMenuItemInactive viewmenu", "DOMMenuItemActive helpmenu",
- "popuphiding toolbarpopup", "popuphidden toolbarpopup",
- "popuphiding viewpopup", "popuphidden viewpopup",
- "popupshowing helppopup", "DOMMenuItemInactive navigation",
- "DOMMenuInactive toolbarpopup", "DOMMenuItemInactive toolbar",
- "DOMMenuInactive viewpopup", "DOMMenuItemActive contents",
- "popupshown helppopup" ],
- test: function() { sendKey("RIGHT"); },
- result: function(testname) {
- checkOpen("helpmenu", testname);
- checkClosed("toolbar", testname);
- checkClosed("viewmenu", testname);
- }
-},
-{
- // close the main menu with the escape key
- testname: "close menubar menu with escape",
- condition: function() { return (navigator.platform.indexOf("Win") == 0) },
- events: [ "popuphiding helppopup", "popuphidden helppopup",
- "DOMMenuItemInactive contents", "DOMMenuInactive helppopup",
- "DOMMenuBarInactive menubar", "DOMMenuItemInactive helpmenu" ],
- test: function() { sendKey("ESCAPE"); },
- result: function(testname) { checkClosed("viewmenu", testname); },
-},
-{
- // close the main menu with the escape key
- testname: "close menubar menu with escape",
- condition: function() { return (navigator.platform.indexOf("Win") != 0) },
- events: [ "popuphiding viewpopup", "popuphidden viewpopup",
- "DOMMenuItemInactive toolbar", "DOMMenuInactive viewpopup",
- "DOMMenuBarInactive menubar",
- "DOMMenuItemInactive viewmenu" ],
- test: function() { sendKey("ESCAPE"); },
- result: function(testname) { checkClosed("viewmenu", testname); },
-},
-{
- // Pressing Alt should highlight the first menu but not open it,
- // but it should be ignored if the alt keydown event is consumed.
- testname: "alt shouldn't activate menubar if keydown event is consumed",
- test: function() {
- document.addEventListener("keydown", function (aEvent) {
- document.removeEventListener("keydown", arguments.callee, true);
- aEvent.preventDefault();
- }, true);
- sendKey("ALT");
- },
- result: function(testname) {
- ok(!document.getElementById("filemenu").openedWithKey, testname);
- checkClosed("filemenu", testname);
- },
-},
-{
- // Pressing Alt should highlight the first menu but not open it,
- // but it should be ignored if the alt keyup event is consumed.
- testname: "alt shouldn't activate menubar if keyup event is consumed",
- test: function() {
- document.addEventListener("keyup", function (aEvent) {
- document.removeEventListener("keyup", arguments.callee, true);
- aEvent.preventDefault();
- }, true);
- sendKey("ALT");
- },
- result: function(testname) {
- ok(!document.getElementById("filemenu").openedWithKey, testname);
- checkClosed("filemenu", testname);
- },
-},
-{
- // Pressing Alt should highlight the first menu but not open it.
- testname: "alt to activate menubar",
- events: [ "DOMMenuBarActive menubar", "DOMMenuItemActive filemenu" ],
- test: function() { sendKey("ALT"); },
- result: function(testname) {
- is(document.getElementById("filemenu").openedWithKey, true, testname + " openedWithKey");
- checkClosed("filemenu", testname);
- },
-},
-{
- // pressing cursor left should select the previous menu but not open it
- testname: "cursor left on active menubar",
- events: [ "DOMMenuItemInactive filemenu", "DOMMenuItemActive helpmenu" ],
- test: function() { sendKey("LEFT"); },
- result: function(testname) { checkClosed("helpmenu", testname); },
-},
-{
- // pressing cursor right should select the previous menu but not open it
- testname: "cursor right on active menubar",
- events: [ "DOMMenuItemInactive helpmenu", "DOMMenuItemActive filemenu" ],
- test: function() { sendKey("RIGHT"); },
- result: function(testname) { checkClosed("filemenu", testname); },
-},
-{
- // pressing a character should act as an accelerator and open the menu
- testname: "accelerator on active menubar",
- events: [ "popupshowing helppopup",
- "DOMMenuItemInactive filemenu", "DOMMenuItemActive helpmenu",
- "DOMMenuItemActive contents", "popupshown helppopup" ],
- test: function() { sendChar("h"); },
- result: function(testname) {
- checkOpen("helpmenu", testname);
- is(document.getElementById("helpmenu").openedWithKey, true, testname + " openedWithKey");
- },
-},
-{
- // check that pressing cursor up skips non menuitems
- testname: "cursor up wrap",
- events: [ "DOMMenuItemInactive contents", "DOMMenuItemActive about" ],
- test: function() { sendKey("UP"); },
- result: function(testname) { }
-},
-{
- // check that pressing cursor down skips non menuitems
- testname: "cursor down wrap",
- events: [ "DOMMenuItemInactive about", "DOMMenuItemActive contents" ],
- test: function() { sendKey("DOWN"); },
- result: function(testname) { }
-},
-{
- // check that pressing a menuitem's accelerator selects it
- testname: "menuitem accelerator",
- events: [ "DOMMenuItemInactive contents", "DOMMenuItemActive amenu",
- "DOMMenuItemInactive amenu", "DOMMenuInactive helppopup",
- "DOMMenuBarInactive menubar", "DOMMenuItemInactive helpmenu",
- "DOMMenuItemInactive helpmenu",
- "command amenu", "popuphiding helppopup", "popuphidden helppopup",
- "DOMMenuItemInactive amenu",
- ],
- test: function() { sendChar("m"); },
- result: function(testname) { checkClosed("helpmenu", testname); }
-},
-{
- // pressing F10 should highlight the first menu. On Linux, the menu is opened.
- testname: "F10 to activate menubar",
- events: pressF10Events(),
- test: function() { sendKey("F10"); },
- result: function(testname) {
- is(document.getElementById("filemenu").openedWithKey, true, testname + " openedWithKey");
- if (navigator.platform.indexOf("Linux") >= 0)
- checkOpen("filemenu", testname);
- else
- checkClosed("filemenu", testname);
- },
-},
-{
- // pressing cursor left then down should open a menu
- testname: "cursor down on menu",
- events: (navigator.platform.indexOf("Linux") >= 0) ?
- [ "DOMMenuItemInactive filemenu", "DOMMenuItemActive helpmenu",
- // This is in a different order than the
- // "accelerator on active menubar" because menus opened from a
- // shortcut key are fired asynchronously
- "popuphiding filepopup", "popuphidden filepopup",
- "popupshowing helppopup", "DOMMenuItemInactive item1",
- "DOMMenuItemActive item2", "DOMMenuItemInactive item2",
- "DOMMenuInactive filepopup", "DOMMenuItemActive contents",
- "popupshown helppopup" ] :
- [ "popupshowing helppopup", "DOMMenuItemInactive filemenu",
- "DOMMenuItemActive helpmenu",
- // This is in a different order than the
- // "accelerator on active menubar" because menus opened from a
- // shortcut key are fired asynchronously
- "DOMMenuItemActive contents", "popupshown helppopup" ],
- test: function() { sendKey("LEFT"); sendKey("DOWN"); },
- result: function(testname) {
- is(document.getElementById("helpmenu").openedWithKey, true, testname + " openedWithKey");
- }
-},
-{
- // pressing a letter that doesn't correspond to an accelerator. The menu
- // should not close because there is more than one item corresponding to
- // that letter
- testname: "menuitem with no accelerator",
- events: [ "DOMMenuItemInactive contents", "DOMMenuItemActive one" ],
- test: function() { sendChar("o"); },
- result: function(testname) { checkOpen("helpmenu", testname); }
-},
-{
- // pressing the letter again should select the next one that starts with
- // that letter
- testname: "menuitem with no accelerator again",
- events: [ "DOMMenuItemInactive one", "DOMMenuItemActive only" ],
- test: function() { sendChar("o"); },
- result: function(testname) {
- // 'only' is a menu but it should not be open
- checkOpen("helpmenu", testname);
- checkClosed("only", testname);
- }
-},
-{
- // pressing the letter again when the next item is disabled should still
- // select the disabled item
- testname: "menuitem with no accelerator disabled",
- condition: function() { return (navigator.platform.indexOf("Win") == 0) },
- events: [ "DOMMenuItemInactive only", "DOMMenuItemActive other" ],
- test: function() { sendChar("o"); },
- result: function(testname) { }
-},
-{
- // when only one menuitem starting with that letter exists, it should be
- // selected and the menu closed
- testname: "menuitem with no accelerator single",
- events: function() {
- var elist = [ "DOMMenuItemInactive other", "DOMMenuItemActive third",
- "DOMMenuItemInactive third", "DOMMenuInactive helppopup",
- "DOMMenuBarInactive menubar",
- "DOMMenuItemInactive helpmenu",
- "DOMMenuItemInactive helpmenu",
- "command third", "popuphiding helppopup",
- "popuphidden helppopup", "DOMMenuItemInactive third",
- ];
- if (navigator.platform.indexOf("Win") == -1)
- elist[0] = "DOMMenuItemInactive only";
- return elist;
- },
- test: function() { sendChar("t"); },
- result: function(testname) { checkClosed("helpmenu", testname); }
-},
-{
- // pressing F10 should highlight the first menu but not open it
- testname: "F10 to activate menubar again",
- condition: function() { return (navigator.platform.indexOf("Win") == 0) },
- events: [ "DOMMenuBarActive menubar", "DOMMenuItemActive filemenu" ],
- test: function() { sendKey("F10"); },
- result: function(testname) { checkClosed("filemenu", testname); },
-},
-{
- // pressing an accelerator for a disabled item should deactivate the menubar
- testname: "accelerator for disabled menu",
- condition: function() { return (navigator.platform.indexOf("Win") == 0) },
- events: [ "DOMMenuItemInactive filemenu", "DOMMenuBarInactive menubar" ],
- test: function() { sendChar("s"); },
- result: function(testname) {
- checkClosed("secretmenu", testname);
- is(document.getElementById("filemenu").openedWithKey, false, testname + " openedWithKey");
- },
-},
-{
- testname: "press on disabled menu",
- test: function() {
- synthesizeMouse(document.getElementById("secretmenu"), 8, 8, { });
- },
- result: function (testname) {
- checkClosed("secretmenu", testname);
- }
-},
-{
- testname: "press on second menu with shift",
- events: [ "popupshowing editpopup", "DOMMenuBarActive menubar",
- "DOMMenuItemActive editmenu", "popupshown editpopup" ],
- test: function() {
- synthesizeMouse(document.getElementById("editmenu"), 8, 8, { shiftKey : true });
- },
- result: function (testname) {
- checkOpen("editmenu", testname);
- checkActive(document.getElementById("menubar"), "editmenu", testname);
- }
-},
-{
- testname: "press on disabled menuitem",
- test: function() {
- synthesizeMouse(document.getElementById("cut"), 8, 8, { });
- },
- result: function (testname) {
- checkOpen("editmenu", testname);
- }
-},
-{
- testname: "press on menuitem",
- events: [ "DOMMenuInactive editpopup",
- "DOMMenuBarInactive menubar",
- "DOMMenuItemInactive editmenu",
- "DOMMenuItemInactive editmenu",
- "command copy", "popuphiding editpopup", "popuphidden editpopup",
- "DOMMenuItemInactive copy",
- ],
- test: function() {
- synthesizeMouse(document.getElementById("copy"), 8, 8, { });
- },
- result: function (testname) {
- checkClosed("editmenu", testname);
- }
-},
-{
- // this test ensures that the menu can still be opened by clicking after selecting
- // a menuitem from the menu. See bug 399350.
- testname: "press on menu after menuitem selected",
- events: [ "popupshowing editpopup", "DOMMenuBarActive menubar",
- "DOMMenuItemActive editmenu", "popupshown editpopup" ],
- test: function() { synthesizeMouse(document.getElementById("editmenu"), 8, 8, { }); },
- result: function (testname) {
- checkActive(document.getElementById("editpopup"), "", testname);
- checkOpen("editmenu", testname);
- }
-},
-{ // try selecting a different command
- testname: "press on menuitem again",
- events: [ "DOMMenuInactive editpopup",
- "DOMMenuBarInactive menubar",
- "DOMMenuItemInactive editmenu",
- "DOMMenuItemInactive editmenu",
- "command paste", "popuphiding editpopup", "popuphidden editpopup",
- "DOMMenuItemInactive paste",
- ],
- test: function() {
- synthesizeMouse(document.getElementById("paste"), 8, 8, { });
- },
- result: function (testname) {
- checkClosed("editmenu", testname);
- }
-},
-{
- testname: "F10 to activate menubar for tab deactivation",
- events: pressF10Events(),
- test: function() { sendKey("F10"); },
-},
-{
- testname: "Deactivate menubar with tab key",
- events: closeAfterF10Events(true),
- test: function() { sendKey("TAB"); },
- result: function(testname) {
- is(document.getElementById("filemenu").openedWithKey, false, testname + " openedWithKey");
- }
-},
-{
- testname: "F10 to activate menubar for escape deactivation",
- events: pressF10Events(),
- test: function() { sendKey("F10"); },
-},
-{
- testname: "Deactivate menubar with escape key",
- events: closeAfterF10Events(false),
- test: function() { sendKey("ESCAPE"); },
- result: function(testname) {
- is(document.getElementById("filemenu").openedWithKey, false, testname + " openedWithKey");
- }
-},
-{
- testname: "F10 to activate menubar for f10 deactivation",
- events: pressF10Events(),
- test: function() { sendKey("F10"); },
-},
-{
- testname: "Deactivate menubar with f10 key",
- events: closeAfterF10Events(true),
- test: function() { sendKey("F10"); },
- result: function(testname) {
- is(document.getElementById("filemenu").openedWithKey, false, testname + " openedWithKey");
- }
-},
-{
- testname: "F10 to activate menubar for alt deactivation",
- condition: function() { return (navigator.platform.indexOf("Win") == 0) },
- events: [ "DOMMenuBarActive menubar", "DOMMenuItemActive filemenu" ],
- test: function() { sendKey("F10"); },
-},
-{
- testname: "Deactivate menubar with alt key",
- condition: function() { return (navigator.platform.indexOf("Win") == 0) },
- events: [ "DOMMenuBarInactive menubar", "DOMMenuItemInactive filemenu" ],
- test: function() { sendKey("ALT"); },
- result: function(testname) {
- is(document.getElementById("filemenu").openedWithKey, false, testname + " openedWithKey");
- }
-},
-{
- testname: "Don't activate menubar with mousedown during alt key auto-repeat",
- test: function() {
- synthesizeKey("VK_ALT", { type: "keydown" });
- synthesizeMouse(document.getElementById("menubar"), 8, -30, { type: "mousedown", altKey: true });
- synthesizeKey("VK_ALT", { type: "keydown" });
- synthesizeMouse(document.getElementById("menubar"), 8, -30, { type: "mouseup", altKey: true });
- synthesizeKey("VK_ALT", { type: "keydown" });
- synthesizeKey("VK_ALT", { type: "keyup" });
- },
- result: function (testname) {
- checkActive(document.getElementById("menubar"), "", testname);
- }
-},
-
-{
- testname: "Open menu and press alt key by itself - open menu",
- events: [ "DOMMenuBarActive menubar",
- "popupshowing filepopup", "DOMMenuItemActive filemenu",
- "DOMMenuItemActive item1", "popupshown filepopup" ],
- test: function() { synthesizeKey("F", { altKey: true }); },
- result: function (testname) {
- checkOpen("filemenu", testname);
- }
-},
-{
- testname: "Open menu and press alt key by itself - close menu",
- events: [ "popuphiding filepopup", "popuphidden filepopup",
- "DOMMenuItemInactive item1", "DOMMenuInactive filepopup",
- "DOMMenuBarInactive menubar", "DOMMenuItemInactive filemenu",
- "DOMMenuItemInactive filemenu" ],
- test: function() {
- synthesizeKey("VK_ALT", { });
- },
- result: function (testname) {
- checkClosed("filemenu", testname);
- }
-},
-
-// Fllowing 4 tests are a test of bug 616797, don't insert any new tests
-// between them.
-{
- testname: "Open file menu by accelerator",
- condition: function() { return (navigator.platform.indexOf("Win") == 0) },
- events: function() {
- return [ "DOMMenuBarActive menubar", "popupshowing filepopup",
- "DOMMenuItemActive filemenu", "DOMMenuItemActive item1",
- "popupshown filepopup" ];
- },
- test: function() {
- synthesizeKey("VK_ALT", { type: "keydown" });
- synthesizeKey("F", { altKey: true });
- synthesizeKey("VK_ALT", { type: "keyup" });
- }
-},
-{
- testname: "Close file menu by click at outside of popup menu",
- condition: function() { return (navigator.platform.indexOf("Win") == 0) },
- events: function() {
- return [ "popuphiding filepopup", "popuphidden filepopup",
- "DOMMenuItemInactive item1", "DOMMenuInactive filepopup",
- "DOMMenuBarInactive menubar", "DOMMenuItemInactive filemenu",
- "DOMMenuItemInactive filemenu" ];
- },
- test: function() {
- // XXX hidePopup() causes DOMMenuItemInactive event to be fired twice.
- document.getElementById("filepopup").hidePopup();
- }
-},
-{
- testname: "Alt keydown set focus the menubar",
- condition: function() { return (navigator.platform.indexOf("Win") == 0) },
- events: function() {
- return [ "DOMMenuBarActive menubar", "DOMMenuItemActive filemenu" ];
- },
- test: function() {
- sendKey("ALT");
- },
- result: function (testname) {
- checkClosed("filemenu", testname);
- }
-},
-{
- testname: "unset focus the menubar",
- condition: function() { return (navigator.platform.indexOf("Win") == 0) },
- events: function() {
- return [ "DOMMenuBarInactive menubar", "DOMMenuItemInactive filemenu" ];
- },
- test: function() {
- sendKey("ALT");
- }
-},
-
-// bug 625151
-{
- testname: "Alt key state before deactivating the window shouldn't prevent " +
- "next Alt key handling",
- condition: function() { return (navigator.platform.indexOf("Win") == 0) },
- events: function() {
- return [ "DOMMenuBarActive menubar", "DOMMenuItemActive filemenu" ];
- },
- test: function() {
- synthesizeKey("VK_ALT", { type: "keydown" });
- synthesizeKey("VK_TAB", { type: "keydown" }); // cancels the Alt key
- var thisWindow = window;
- var newWindow =
- window.open("data:text/html,", "_blank", "width=100,height=100");
- newWindow.addEventListener("focus", function () {
- newWindow.removeEventListener("focus", arguments.callee, false);
- thisWindow.addEventListener("focus", function () {
- thisWindow.removeEventListener("focus", arguments.callee, false);
- setTimeout(function () {
- sendKey("ALT", thisWindow);
- }, 0);
- }, false);
- newWindow.close();
- thisWindow.focus();
- }, false);
- }
-}
-
-];
-
-]]>
-</script>
-
-</window>
diff --git a/toolkit/forgetaboutsite/ForgetAboutSite.jsm b/toolkit/forgetaboutsite/ForgetAboutSite.jsm
index 8c78253922..9d7e512a8f 100644
--- a/toolkit/forgetaboutsite/ForgetAboutSite.jsm
+++ b/toolkit/forgetaboutsite/ForgetAboutSite.jsm
@@ -216,8 +216,8 @@ this.ForgetAboutSite = {
});
}));
- // HSTS and HPKP
- // TODO (bug 1290529): also remove HSTS/HPKP information for subdomains.
+ // HSTS
+ // TODO (bug 1290529): also remove HSTS information for subdomains.
// Since we can't enumerate the information in the site security service
// (bug 1115712), we can't implement this right now.
promises.push(Task.spawn(function*() {
@@ -225,9 +225,8 @@ this.ForgetAboutSite = {
getService(Ci.nsISiteSecurityService);
let httpsURI = NetUtil.newURI("https://" + aDomain);
sss.removeState(Ci.nsISiteSecurityService.HEADER_HSTS, httpsURI, 0);
- sss.removeState(Ci.nsISiteSecurityService.HEADER_HPKP, httpsURI, 0);
}).catch(ex => {
- throw new Error("Exception thrown while clearing HSTS/HPKP: " + ex);
+ throw new Error("Exception thrown while clearing HSTS: " + ex);
}));
let ErrorCount = 0;
diff --git a/toolkit/forgetaboutsite/moz.build b/toolkit/forgetaboutsite/moz.build
index 73bb42b0b5..9f77df7517 100644
--- a/toolkit/forgetaboutsite/moz.build
+++ b/toolkit/forgetaboutsite/moz.build
@@ -4,12 +4,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
-XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
-
-EXTRA_JS_MODULES += [
- 'ForgetAboutSite.jsm',
-]
-
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'Forget About Site')
+EXTRA_JS_MODULES += ['ForgetAboutSite.jsm']
diff --git a/toolkit/forgetaboutsite/test/browser/.eslintrc.js b/toolkit/forgetaboutsite/test/browser/.eslintrc.js
deleted file mode 100644
index c764b133dc..0000000000
--- a/toolkit/forgetaboutsite/test/browser/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../testing/mochitest/browser.eslintrc.js"
- ]
-};
diff --git a/toolkit/forgetaboutsite/test/browser/browser.ini b/toolkit/forgetaboutsite/test/browser/browser.ini
deleted file mode 100644
index 517d89d78a..0000000000
--- a/toolkit/forgetaboutsite/test/browser/browser.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[DEFAULT]
-support-files = browser_clearplugindata.html
-
-[browser_clearplugindata.js]
diff --git a/toolkit/forgetaboutsite/test/browser/browser_clearplugindata.html b/toolkit/forgetaboutsite/test/browser/browser_clearplugindata.html
deleted file mode 100644
index b2bba12ce8..0000000000
--- a/toolkit/forgetaboutsite/test/browser/browser_clearplugindata.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html>
- <head>
- <title>Plugin Clear Site Data clear by domain test</title>
-
- <embed id="plugin1" type="application/x-test" width="200" height="200"></embed>
-
- <script type="application/javascript">
- function testSteps()
- {
- var p = document.getElementById("plugin1");
-
- p.setSitesWithData(
- "foo.com:0:0," +
- "bar.foo.com:0:0," +
- "baz.foo.com:0:0," +
- "bar.com:1:0," +
- "[192.168.1.1]:0:0," +
- "localhost:0:0"
- );
- }
- </script>
- </head>
-
- <body></body>
-
-</html>
diff --git a/toolkit/forgetaboutsite/test/browser/browser_clearplugindata.js b/toolkit/forgetaboutsite/test/browser/browser_clearplugindata.js
deleted file mode 100644
index ca0d394c3f..0000000000
--- a/toolkit/forgetaboutsite/test/browser/browser_clearplugindata.js
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-Components.utils.import("resource://gre/modules/ForgetAboutSite.jsm");
-
-// Test clearing plugin data by domain using ForgetAboutSite.
-const testURL = "http://mochi.test:8888/browser/toolkit/forgetaboutsite/test/browser/browser_clearplugindata.html";
-
-const pluginHostIface = Ci.nsIPluginHost;
-var pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
-pluginHost.QueryInterface(pluginHostIface);
-
-var pluginTag;
-
-function stored(needles) {
- var something = pluginHost.siteHasData(this.pluginTag, null);
- if (!needles)
- return something;
-
- if (!something)
- return false;
-
- for (var i = 0; i < needles.length; ++i) {
- if (!pluginHost.siteHasData(this.pluginTag, needles[i]))
- return false;
- }
- return true;
-}
-
-function setTestPluginEnabledState(newEnabledState, plugin) {
- var oldEnabledState = plugin.enabledState;
- plugin.enabledState = newEnabledState;
- SimpleTest.registerCleanupFunction(function() {
- plugin.enabledState = oldEnabledState;
- });
-}
-
-add_task(function* () {
- var tags = pluginHost.getPluginTags();
-
- // Find the test plugin
- for (var i = 0; i < tags.length; i++)
- {
- if (tags[i].name == "Test Plug-in")
- {
- pluginTag = tags[i];
- }
- }
- if (!pluginTag) {
- ok(false, "Test Plug-in not available, can't run test");
- return;
- }
- setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, pluginTag);
- yield BrowserTestUtils.openNewForegroundTab(gBrowser, testURL);
-
- // Set data for the plugin after the page load.
- yield ContentTask.spawn(gBrowser.selectedBrowser, null, function*() {
- content.wrappedJSObject.testSteps();
- });
-
- ok(stored(["192.168.1.1", "foo.com", "nonexistent.foo.com", "bar.com", "localhost"]),
- "Data stored for sites");
-
- // Clear data for "foo.com" and its subdomains.
- yield ForgetAboutSite.removeDataFromDomain("foo.com");
-
- ok(stored(["bar.com", "192.168.1.1", "localhost"]), "Data stored for sites");
- ok(!stored(["foo.com"]), "Data cleared for foo.com");
- ok(!stored(["bar.foo.com"]), "Data cleared for subdomains of foo.com");
-
- // Clear data for "bar.com" using a subdomain.
- yield ForgetAboutSite.removeDataFromDomain("foo.bar.com");
- ok(!stored(["bar.com"]), "Data cleared for bar.com");
-
- // Clear data for "192.168.1.1".
- yield ForgetAboutSite.removeDataFromDomain("192.168.1.1");
- ok(!stored(["192.168.1.1"]), "Data cleared for 192.168.1.1");
-
- // Clear data for "localhost".
- yield ForgetAboutSite.removeDataFromDomain("localhost");
- ok(!stored(null), "All data cleared");
-
- gBrowser.removeCurrentTab();
-});
diff --git a/toolkit/forgetaboutsite/test/unit/.eslintrc.js b/toolkit/forgetaboutsite/test/unit/.eslintrc.js
deleted file mode 100644
index fee088c179..0000000000
--- a/toolkit/forgetaboutsite/test/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/forgetaboutsite/test/unit/head_forgetaboutsite.js b/toolkit/forgetaboutsite/test/unit/head_forgetaboutsite.js
deleted file mode 100644
index d3828d5d8f..0000000000
--- a/toolkit/forgetaboutsite/test/unit/head_forgetaboutsite.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/* 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/. */
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-
-var dirSvc = Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties);
-var profileDir = do_get_profile();
-
-/**
- * Removes any files that could make our tests fail.
- */
-function cleanUp()
-{
- let files = [
- "places.sqlite",
- "cookies.sqlite",
- "signons.sqlite",
- "permissions.sqlite"
- ];
-
- for (let i = 0; i < files.length; i++) {
- let file = dirSvc.get("ProfD", Ci.nsIFile);
- file.append(files[i]);
- if (file.exists())
- file.remove(false);
- }
-}
-cleanUp();
diff --git a/toolkit/forgetaboutsite/test/unit/test_removeDataFromDomain.js b/toolkit/forgetaboutsite/test/unit/test_removeDataFromDomain.js
deleted file mode 100644
index d2db95e6a3..0000000000
--- a/toolkit/forgetaboutsite/test/unit/test_removeDataFromDomain.js
+++ /dev/null
@@ -1,647 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
- * vim: sw=2 ts=2 sts=2
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/**
- * Test added with bug 460086 to test the behavior of the new API that was added
- * to remove all traces of visiting a site.
- */
-
-// Globals
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/PlacesUtils.jsm");
-Cu.import("resource://gre/modules/ForgetAboutSite.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "Promise",
- "resource://gre/modules/Promise.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "PlacesTestUtils",
- "resource://testing-common/PlacesTestUtils.jsm");
-
-const COOKIE_EXPIRY = Math.round(Date.now() / 1000) + 60;
-const COOKIE_NAME = "testcookie";
-const COOKIE_PATH = "/";
-
-const LOGIN_USERNAME = "username";
-const LOGIN_PASSWORD = "password";
-const LOGIN_USERNAME_FIELD = "username_field";
-const LOGIN_PASSWORD_FIELD = "password_field";
-
-const PERMISSION_TYPE = "test-perm";
-const PERMISSION_VALUE = Ci.nsIPermissionManager.ALLOW_ACTION;
-
-const PREFERENCE_NAME = "test-pref";
-
-// Utility Functions
-
-/**
- * Creates an nsIURI object for the given string representation of a URI.
- *
- * @param aURIString
- * The spec of the URI to create.
- * @returns an nsIURI representing aURIString.
- */
-function uri(aURIString)
-{
- return Cc["@mozilla.org/network/io-service;1"].
- getService(Ci.nsIIOService).
- newURI(aURIString, null, null);
-}
-
-/**
- * Asynchronously check a url is visited.
- *
- * @param aURI
- * The URI.
- *
- * @return {Promise}
- * @resolves When the check has been added successfully.
- * @rejects JavaScript exception.
- */
-function promiseIsURIVisited(aURI)
-{
- let deferred = Promise.defer();
- PlacesUtils.asyncHistory.isURIVisited(aURI, function(unused, aIsVisited) {
- deferred.resolve(aIsVisited);
- });
-
- return deferred.promise;
-}
-
-/**
- * Add a cookie to the cookie service.
- *
- * @param aDomain
- */
-function add_cookie(aDomain)
-{
- check_cookie_exists(aDomain, false);
- let cm = Cc["@mozilla.org/cookiemanager;1"].getService(Ci.nsICookieManager2);
- cm.add(aDomain, COOKIE_PATH, COOKIE_NAME, "", false, false, false,
- COOKIE_EXPIRY, {});
- check_cookie_exists(aDomain, true);
-}
-
-/**
- * Checks to ensure that a cookie exists or not for a domain.
- *
- * @param aDomain
- * The domain to check for the cookie.
- * @param aExists
- * True if the cookie should exist, false otherwise.
- */
-function check_cookie_exists(aDomain, aExists)
-{
- let cm = Cc["@mozilla.org/cookiemanager;1"].getService(Ci.nsICookieManager2);
- let cookie = {
- host: aDomain,
- name: COOKIE_NAME,
- path: COOKIE_PATH
- }
- let checker = aExists ? do_check_true : do_check_false;
- checker(cm.cookieExists(cookie));
-}
-
-/**
- * Adds a disabled host to the login manager.
- *
- * @param aHost
- * The host to add to the list of disabled hosts.
- */
-function add_disabled_host(aHost)
-{
- check_disabled_host(aHost, false);
- let lm = Cc["@mozilla.org/login-manager;1"].
- getService(Ci.nsILoginManager);
- lm.setLoginSavingEnabled(aHost, false);
- check_disabled_host(aHost, true);
-}
-
-/**
- * Checks to see if a host is disabled for storing logins or not.
- *
- * @param aHost
- * The host to check if it is disabled.
- * @param aIsDisabled
- * True if the host should be disabled, false otherwise.
- */
-function check_disabled_host(aHost, aIsDisabled)
-{
- let lm = Cc["@mozilla.org/login-manager;1"].
- getService(Ci.nsILoginManager);
- let checker = aIsDisabled ? do_check_false : do_check_true;
- checker(lm.getLoginSavingEnabled(aHost));
-}
-
-/**
- * Adds a login for the specified host to the login manager.
- *
- * @param aHost
- * The host to add the login for.
- */
-function add_login(aHost)
-{
- check_login_exists(aHost, false);
- let login = Cc["@mozilla.org/login-manager/loginInfo;1"].
- createInstance(Ci.nsILoginInfo);
- login.init(aHost, "", null, LOGIN_USERNAME, LOGIN_PASSWORD,
- LOGIN_USERNAME_FIELD, LOGIN_PASSWORD_FIELD);
- let lm = Cc["@mozilla.org/login-manager;1"].
- getService(Ci.nsILoginManager);
- lm.addLogin(login);
- check_login_exists(aHost, true);
-}
-
-/**
- * Checks to see if a login exists for a host.
- *
- * @param aHost
- * The host to check for the test login.
- * @param aExists
- * True if the login should exist, false otherwise.
- */
-function check_login_exists(aHost, aExists)
-{
- let lm = Cc["@mozilla.org/login-manager;1"].
- getService(Ci.nsILoginManager);
- let count = { value: 0 };
- lm.findLogins(count, aHost, "", null);
- do_check_eq(count.value, aExists ? 1 : 0);
-}
-
-/**
- * Adds a permission for the specified URI to the permission manager.
- *
- * @param aURI
- * The URI to add the test permission for.
- */
-function add_permission(aURI)
-{
- check_permission_exists(aURI, false);
- let pm = Cc["@mozilla.org/permissionmanager;1"].
- getService(Ci.nsIPermissionManager);
- let ssm = Cc["@mozilla.org/scriptsecuritymanager;1"]
- .getService(Ci.nsIScriptSecurityManager);
- let principal = ssm.createCodebasePrincipal(aURI, {});
-
- pm.addFromPrincipal(principal, PERMISSION_TYPE, PERMISSION_VALUE);
- check_permission_exists(aURI, true);
-}
-
-/**
- * Checks to see if a permission exists for the given URI.
- *
- * @param aURI
- * The URI to check if a permission exists.
- * @param aExists
- * True if the permission should exist, false otherwise.
- */
-function check_permission_exists(aURI, aExists)
-{
- let pm = Cc["@mozilla.org/permissionmanager;1"].
- getService(Ci.nsIPermissionManager);
- let ssm = Cc["@mozilla.org/scriptsecuritymanager;1"]
- .getService(Ci.nsIScriptSecurityManager);
- let principal = ssm.createCodebasePrincipal(aURI, {});
-
- let perm = pm.testExactPermissionFromPrincipal(principal, PERMISSION_TYPE);
- let checker = aExists ? do_check_eq : do_check_neq;
- checker(perm, PERMISSION_VALUE);
-}
-
-/**
- * Adds a content preference for the specified URI.
- *
- * @param aURI
- * The URI to add a preference for.
- */
-function add_preference(aURI)
-{
- let deferred = Promise.defer();
- let cp = Cc["@mozilla.org/content-pref/service;1"].
- getService(Ci.nsIContentPrefService2);
- cp.set(aURI.spec, PREFERENCE_NAME, "foo", null, {
- handleCompletion: () => deferred.resolve()
- });
- return deferred.promise;
-}
-
-/**
- * Checks to see if a content preference exists for the given URI.
- *
- * @param aURI
- * The URI to check if a preference exists.
- */
-function preference_exists(aURI)
-{
- let deferred = Promise.defer();
- let cp = Cc["@mozilla.org/content-pref/service;1"].
- getService(Ci.nsIContentPrefService2);
- let exists = false;
- cp.getByDomainAndName(aURI.spec, PREFERENCE_NAME, null, {
- handleResult: () => exists = true,
- handleCompletion: () => deferred.resolve(exists)
- });
- return deferred.promise;
-}
-
-// Test Functions
-
-// History
-function* test_history_cleared_with_direct_match()
-{
- const TEST_URI = uri("http://mozilla.org/foo");
- do_check_false(yield promiseIsURIVisited(TEST_URI));
- yield PlacesTestUtils.addVisits(TEST_URI);
- do_check_true(yield promiseIsURIVisited(TEST_URI));
- yield ForgetAboutSite.removeDataFromDomain("mozilla.org");
- do_check_false(yield promiseIsURIVisited(TEST_URI));
-}
-
-function* test_history_cleared_with_subdomain()
-{
- const TEST_URI = uri("http://www.mozilla.org/foo");
- do_check_false(yield promiseIsURIVisited(TEST_URI));
- yield PlacesTestUtils.addVisits(TEST_URI);
- do_check_true(yield promiseIsURIVisited(TEST_URI));
- yield ForgetAboutSite.removeDataFromDomain("mozilla.org");
- do_check_false(yield promiseIsURIVisited(TEST_URI));
-}
-
-function* test_history_not_cleared_with_uri_contains_domain()
-{
- const TEST_URI = uri("http://ilovemozilla.org/foo");
- do_check_false(yield promiseIsURIVisited(TEST_URI));
- yield PlacesTestUtils.addVisits(TEST_URI);
- do_check_true(yield promiseIsURIVisited(TEST_URI));
- yield ForgetAboutSite.removeDataFromDomain("mozilla.org");
- do_check_true(yield promiseIsURIVisited(TEST_URI));
-
- // Clear history since we left something there from this test.
- yield PlacesTestUtils.clearHistory();
-}
-
-// Cookie Service
-function* test_cookie_cleared_with_direct_match()
-{
- const TEST_DOMAIN = "mozilla.org";
- add_cookie(TEST_DOMAIN);
- yield ForgetAboutSite.removeDataFromDomain("mozilla.org");
- check_cookie_exists(TEST_DOMAIN, false);
-}
-
-function* test_cookie_cleared_with_subdomain()
-{
- const TEST_DOMAIN = "www.mozilla.org";
- add_cookie(TEST_DOMAIN);
- yield ForgetAboutSite.removeDataFromDomain("mozilla.org");
- check_cookie_exists(TEST_DOMAIN, false);
-}
-
-function* test_cookie_not_cleared_with_uri_contains_domain()
-{
- const TEST_DOMAIN = "ilovemozilla.org";
- add_cookie(TEST_DOMAIN);
- yield ForgetAboutSite.removeDataFromDomain("mozilla.org");
- check_cookie_exists(TEST_DOMAIN, true);
-}
-
-// Login Manager
-function* test_login_manager_disabled_hosts_cleared_with_direct_match()
-{
- const TEST_HOST = "http://mozilla.org";
- add_disabled_host(TEST_HOST);
- yield ForgetAboutSite.removeDataFromDomain("mozilla.org");
- check_disabled_host(TEST_HOST, false);
-}
-
-function* test_login_manager_disabled_hosts_cleared_with_subdomain()
-{
- const TEST_HOST = "http://www.mozilla.org";
- add_disabled_host(TEST_HOST);
- yield ForgetAboutSite.removeDataFromDomain("mozilla.org");
- check_disabled_host(TEST_HOST, false);
-}
-
-function* test_login_manager_disabled_hosts_not_cleared_with_uri_contains_domain()
-{
- const TEST_HOST = "http://ilovemozilla.org";
- add_disabled_host(TEST_HOST);
- yield ForgetAboutSite.removeDataFromDomain("mozilla.org");
- check_disabled_host(TEST_HOST, true);
-
- // Reset state
- let lm = Cc["@mozilla.org/login-manager;1"].
- getService(Ci.nsILoginManager);
- lm.setLoginSavingEnabled(TEST_HOST, true);
- check_disabled_host(TEST_HOST, false);
-}
-
-function* test_login_manager_logins_cleared_with_direct_match()
-{
- const TEST_HOST = "http://mozilla.org";
- add_login(TEST_HOST);
- yield ForgetAboutSite.removeDataFromDomain("mozilla.org");
- check_login_exists(TEST_HOST, false);
-}
-
-function* test_login_manager_logins_cleared_with_subdomain()
-{
- const TEST_HOST = "http://www.mozilla.org";
- add_login(TEST_HOST);
- yield ForgetAboutSite.removeDataFromDomain("mozilla.org");
- check_login_exists(TEST_HOST, false);
-}
-
-function* test_login_manager_logins_not_cleared_with_uri_contains_domain()
-{
- const TEST_HOST = "http://ilovemozilla.org";
- add_login(TEST_HOST);
- yield ForgetAboutSite.removeDataFromDomain("mozilla.org");
- check_login_exists(TEST_HOST, true);
-
- let lm = Cc["@mozilla.org/login-manager;1"].
- getService(Ci.nsILoginManager);
- lm.removeAllLogins();
- check_login_exists(TEST_HOST, false);
-}
-
-// Permission Manager
-function* test_permission_manager_cleared_with_direct_match()
-{
- const TEST_URI = uri("http://mozilla.org");
- add_permission(TEST_URI);
- yield ForgetAboutSite.removeDataFromDomain("mozilla.org");
- check_permission_exists(TEST_URI, false);
-}
-
-function* test_permission_manager_cleared_with_subdomain()
-{
- const TEST_URI = uri("http://www.mozilla.org");
- add_permission(TEST_URI);
- yield ForgetAboutSite.removeDataFromDomain("mozilla.org");
- check_permission_exists(TEST_URI, false);
-}
-
-function* test_permission_manager_not_cleared_with_uri_contains_domain()
-{
- const TEST_URI = uri("http://ilovemozilla.org");
- add_permission(TEST_URI);
- yield ForgetAboutSite.removeDataFromDomain("mozilla.org");
- check_permission_exists(TEST_URI, true);
-
- // Reset state
- let pm = Cc["@mozilla.org/permissionmanager;1"].
- getService(Ci.nsIPermissionManager);
- pm.removeAll();
- check_permission_exists(TEST_URI, false);
-}
-
-function waitForPurgeNotification() {
- let deferred = Promise.defer();
-
- let observer = {
- observe: function(aSubject, aTopic, aData)
- {
- Services.obs.removeObserver(observer, "browser:purge-domain-data");
- // test_storage_cleared needs this extra executeSoon because
- // the DOMStorage clean-up is also listening to this same observer
- // which is run synchronously.
- Services.tm.mainThread.dispatch(function() {
- deferred.resolve();
- }, Components.interfaces.nsIThread.DISPATCH_NORMAL);
- }
- };
- Services.obs.addObserver(observer, "browser:purge-domain-data", false);
-
- return deferred.promise;
-}
-
-// Content Preferences
-function* test_content_preferences_cleared_with_direct_match()
-{
- const TEST_URI = uri("http://mozilla.org");
- do_check_false(yield preference_exists(TEST_URI));
- yield add_preference(TEST_URI);
- do_check_true(yield preference_exists(TEST_URI));
- yield ForgetAboutSite.removeDataFromDomain("mozilla.org");
- yield waitForPurgeNotification();
- do_check_false(yield preference_exists(TEST_URI));
-}
-
-function* test_content_preferences_cleared_with_subdomain()
-{
- const TEST_URI = uri("http://www.mozilla.org");
- do_check_false(yield preference_exists(TEST_URI));
- yield add_preference(TEST_URI);
- do_check_true(yield preference_exists(TEST_URI));
- yield ForgetAboutSite.removeDataFromDomain("mozilla.org");
- yield waitForPurgeNotification();
- do_check_false(yield preference_exists(TEST_URI));
-}
-
-function* test_content_preferences_not_cleared_with_uri_contains_domain()
-{
- const TEST_URI = uri("http://ilovemozilla.org");
- do_check_false(yield preference_exists(TEST_URI));
- yield add_preference(TEST_URI);
- do_check_true(yield preference_exists(TEST_URI));
- yield ForgetAboutSite.removeDataFromDomain("mozilla.org");
- yield waitForPurgeNotification();
- do_check_true(yield preference_exists(TEST_URI));
-
- // Reset state
- yield ForgetAboutSite.removeDataFromDomain("ilovemozilla.org");
- yield waitForPurgeNotification();
- do_check_false(yield preference_exists(TEST_URI));
-}
-
-function push_registration_exists(aURL, ps)
-{
- return new Promise(resolve => {
- let ssm = Cc["@mozilla.org/scriptsecuritymanager;1"]
- .getService(Ci.nsIScriptSecurityManager);
- let principal = ssm.createCodebasePrincipalFromOrigin(aURL);
- return ps.getSubscription(aURL, principal, (status, record) => {
- if (!Components.isSuccessCode(status)) {
- resolve(false);
- } else {
- resolve(!!record);
- }
- });
- });
-}
-
-// Push
-function* test_push_cleared()
-{
- let ps;
- try {
- ps = Cc["@mozilla.org/push/Service;1"].
- getService(Ci.nsIPushService);
- } catch (e) {
- // No push service, skip test.
- return;
- }
-
- do_get_profile();
- setPrefs();
- const {PushDB, PushService, PushServiceWebSocket} = serviceExports;
- const userAgentID = 'bd744428-f125-436a-b6d0-dd0c9845837f';
- const channelID = '0ef2ad4a-6c49-41ad-af6e-95d2425276bf';
-
- let db = PushServiceWebSocket.newPushDB();
-
- try {
- PushService.init({
- serverURI: "wss://push.example.org/",
- db,
- makeWebSocket(uriObj) {
- return new MockWebSocket(uriObj, {
- onHello(request) {
- this.serverSendMsg(JSON.stringify({
- messageType: 'hello',
- status: 200,
- uaid: userAgentID,
- }));
- },
- });
- }
- });
-
- const TEST_URL = "https://www.mozilla.org/scope/";
- do_check_false(yield push_registration_exists(TEST_URL, ps));
- yield db.put({
- channelID,
- pushEndpoint: 'https://example.org/update/clear-success',
- scope: TEST_URL,
- version: 1,
- originAttributes: '',
- quota: Infinity,
- });
- do_check_true(yield push_registration_exists(TEST_URL, ps));
-
- let promisePurgeNotification = waitForPurgeNotification();
- yield ForgetAboutSite.removeDataFromDomain("mozilla.org");
- yield promisePurgeNotification;
-
- do_check_false(yield push_registration_exists(TEST_URL, ps));
- } finally {
- yield PushService._shutdownService();
- }
-}
-
-// Cache
-function* test_cache_cleared()
-{
- // Because this test is asynchronous, it should be the last test
- do_check_true(tests[tests.length - 1] == arguments.callee);
-
- // NOTE: We could be more extensive with this test and actually add an entry
- // to the cache, and then make sure it is gone. However, we trust that
- // the API is well tested, and that when we get the observer
- // notification, we have actually cleared the cache.
- // This seems to happen asynchronously...
- let os = Cc["@mozilla.org/observer-service;1"].
- getService(Ci.nsIObserverService);
- let observer = {
- observe: function(aSubject, aTopic, aData)
- {
- os.removeObserver(observer, "cacheservice:empty-cache");
- // Shutdown the download manager.
- Services.obs.notifyObservers(null, "quit-application", null);
- do_test_finished();
- }
- };
- os.addObserver(observer, "cacheservice:empty-cache", false);
- yield ForgetAboutSite.removeDataFromDomain("mozilla.org");
- do_test_pending();
-}
-
-function* test_storage_cleared()
-{
- function getStorageForURI(aURI)
- {
- let ssm = Cc["@mozilla.org/scriptsecuritymanager;1"]
- .getService(Ci.nsIScriptSecurityManager);
- let principal = ssm.createCodebasePrincipal(aURI, {});
-
- let dsm = Cc["@mozilla.org/dom/localStorage-manager;1"].
- getService(Ci.nsIDOMStorageManager);
- return dsm.createStorage(null, principal, "");
- }
-
- let s = [
- getStorageForURI(uri("http://mozilla.org")),
- getStorageForURI(uri("http://my.mozilla.org")),
- getStorageForURI(uri("http://ilovemozilla.org")),
- ];
-
- for (let i = 0; i < s.length; ++i) {
- let storage = s[i];
- storage.setItem("test", "value" + i);
- do_check_eq(storage.length, 1);
- do_check_eq(storage.key(0), "test");
- do_check_eq(storage.getItem("test"), "value" + i);
- }
-
- yield ForgetAboutSite.removeDataFromDomain("mozilla.org");
- yield waitForPurgeNotification();
-
- do_check_eq(s[0].getItem("test"), null);
- do_check_eq(s[0].length, 0);
- do_check_eq(s[1].getItem("test"), null);
- do_check_eq(s[1].length, 0);
- do_check_eq(s[2].getItem("test"), "value2");
- do_check_eq(s[2].length, 1);
-}
-
-var tests = [
- // History
- test_history_cleared_with_direct_match,
- test_history_cleared_with_subdomain,
- test_history_not_cleared_with_uri_contains_domain,
-
- // Cookie Service
- test_cookie_cleared_with_direct_match,
- test_cookie_cleared_with_subdomain,
- test_cookie_not_cleared_with_uri_contains_domain,
-
- // Login Manager
- test_login_manager_disabled_hosts_cleared_with_direct_match,
- test_login_manager_disabled_hosts_cleared_with_subdomain,
- test_login_manager_disabled_hosts_not_cleared_with_uri_contains_domain,
- test_login_manager_logins_cleared_with_direct_match,
- test_login_manager_logins_cleared_with_subdomain,
- test_login_manager_logins_not_cleared_with_uri_contains_domain,
-
- // Permission Manager
- test_permission_manager_cleared_with_direct_match,
- test_permission_manager_cleared_with_subdomain,
- test_permission_manager_not_cleared_with_uri_contains_domain,
-
- // Content Preferences
- test_content_preferences_cleared_with_direct_match,
- test_content_preferences_cleared_with_subdomain,
- test_content_preferences_not_cleared_with_uri_contains_domain,
-
- // Push
- test_push_cleared,
-
- // Storage
- test_storage_cleared,
-
- // Cache
- test_cache_cleared,
-];
-
-function run_test()
-{
- for (let i = 0; i < tests.length; i++)
- add_task(tests[i]);
-
- run_next_test();
-}
diff --git a/toolkit/forgetaboutsite/test/unit/xpcshell.ini b/toolkit/forgetaboutsite/test/unit/xpcshell.ini
deleted file mode 100644
index a18fa718a3..0000000000
--- a/toolkit/forgetaboutsite/test/unit/xpcshell.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[DEFAULT]
-head = head_forgetaboutsite.js ../../../../dom/push/test/xpcshell/head.js
-tail =
-skip-if = toolkit == 'android'
-support-files =
- !/dom/push/test/xpcshell/head.js
-
-[test_removeDataFromDomain.js]
diff --git a/toolkit/identity/moz.build b/toolkit/identity/moz.build
index ba9697bd64..fd2ba9c8c6 100644
--- a/toolkit/identity/moz.build
+++ b/toolkit/identity/moz.build
@@ -4,18 +4,11 @@
# 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/.
-MOCHITEST_CHROME_MANIFESTS += ['tests/chrome/chrome.ini']
-XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
-
-XPIDL_SOURCES += [
- 'nsIIdentityCryptoService.idl',
-]
+XPIDL_SOURCES += ['nsIIdentityCryptoService.idl']
XPIDL_MODULE = 'identity'
-SOURCES += [
- 'IdentityCryptoService.cpp',
-]
+SOURCES += ['IdentityCryptoService.cpp']
EXTRA_JS_MODULES.identity += [
'Identity.jsm',
diff --git a/toolkit/identity/tests/chrome/.eslintrc.js b/toolkit/identity/tests/chrome/.eslintrc.js
deleted file mode 100644
index 2c669d844e..0000000000
--- a/toolkit/identity/tests/chrome/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../testing/mochitest/chrome.eslintrc.js"
- ]
-};
diff --git a/toolkit/identity/tests/chrome/chrome.ini b/toolkit/identity/tests/chrome/chrome.ini
deleted file mode 100644
index ffaff0fb18..0000000000
--- a/toolkit/identity/tests/chrome/chrome.ini
+++ /dev/null
@@ -1,13 +0,0 @@
-[DEFAULT]
-skip-if = buildapp == 'b2g' || os == 'android'
-support-files =
- sandbox_content.html
- sandbox_content.sjs
- sandbox_content_alert.html
- sandbox_content_framed.html
- sandbox_content_perms.html
- sandbox_content_popup.html
- sandbox_content_redirect.html
- sandbox_content_redirect.html^headers^
-
-[test_sandbox.xul]
diff --git a/toolkit/identity/tests/chrome/sandbox_content.html b/toolkit/identity/tests/chrome/sandbox_content.html
deleted file mode 100644
index 9a9b63ac24..0000000000
--- a/toolkit/identity/tests/chrome/sandbox_content.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE html>
-<html>
-<!-- Any copyright is dedicated to the Public Domain.
- - http://creativecommons.org/publicdomain/zero/1.0/ -->
-<head>
-<meta charset="utf-8">
-<title>Page testing blocked content in the Sandbox</title>
-
-<link rel="stylesheet" src="sandbox_content.sjs?text/css"/>
-
-<script src="sandbox_content.sjs?application/javascript"></script>
-
-</head>
-
-<body>
-
-<img src="sandbox_content.sjs?image/jpeg"/>
-
-<!-- media -->
-<video src="sandbox_content.sjs?video/webm" autoplay="true"></video>
-<audio src="sandbox_content.sjs?audio/ogg" autoplay="true"></audio>
-
-<!-- plugins -->
-<embed src="sandbox_content.sjs?application/x-test"/>
-<object data="sandbox_content.sjs?application/x-test"></object>
-<applet code="sandbox_content.sjs?application/x-java-applet"></applet>
-
-<iframe src="sandbox_content.sjs?text/html"></iframe>
-
-</body>
-
-</html>
diff --git a/toolkit/identity/tests/chrome/sandbox_content.sjs b/toolkit/identity/tests/chrome/sandbox_content.sjs
deleted file mode 100644
index 2f562f2140..0000000000
--- a/toolkit/identity/tests/chrome/sandbox_content.sjs
+++ /dev/null
@@ -1,36 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * * License, v. 2.0. If a copy of the MPL was not distributed with this
- * * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-function handleRequest(request, response) {
- response.setHeader("Cache-Control", "no-cache", false);
-
- let loadedStateKey = "sandbox_content_loaded";
- switch(request.queryString) {
- case "reset": {
- setState(loadedStateKey, "");
- response.write("reset");
- break;
- }
- case "get_loaded": {
- response.setHeader("Content-Type", "text/plain", false);
- let loaded = getState(loadedStateKey);
- if (loaded)
- response.write(loaded);
- else
- response.write("NOTHING");
- break;
- }
- default: {
- let contentType = decodeURIComponent(request.queryString);
- // set the Content-Type equal to the query string
- response.setHeader("Content-Type", contentType, false);
- // If any content is loaded, append it's content type in state
- let loaded = getState(loadedStateKey);
- if (loaded)
- loaded += ",";
- setState(loadedStateKey, loaded + contentType);
- break;
- }
- }
-}
diff --git a/toolkit/identity/tests/chrome/sandbox_content_alert.html b/toolkit/identity/tests/chrome/sandbox_content_alert.html
deleted file mode 100644
index f07308e848..0000000000
--- a/toolkit/identity/tests/chrome/sandbox_content_alert.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<html>
-<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
-<head>
-<meta charset="utf-8">
-<title>Page creating an alert inside the Sandbox</title>
-
-<script>
-
-alert("The user shouldn't see this");
-
-</script>
-
-</head>
-
-<body>
-
-</body>
-</html>
diff --git a/toolkit/identity/tests/chrome/sandbox_content_framed.html b/toolkit/identity/tests/chrome/sandbox_content_framed.html
deleted file mode 100644
index 72b0c49d0e..0000000000
--- a/toolkit/identity/tests/chrome/sandbox_content_framed.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<html>
-<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
-<head>
-<meta charset="utf-8">
-<title>Page testing blocked content in an iframe inside the Sandbox</title>
-
-</head>
-
-<body>
-
-<iframe src="sandbox_content.html"></iframe>
-
-</body>
-
-</html>
diff --git a/toolkit/identity/tests/chrome/sandbox_content_perms.html b/toolkit/identity/tests/chrome/sandbox_content_perms.html
deleted file mode 100644
index d24c683f8f..0000000000
--- a/toolkit/identity/tests/chrome/sandbox_content_perms.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!DOCTYPE html>
-<html>
- <!-- Any copyright is dedicated to the Public Domain.
- - http://creativecommons.org/publicdomain/zero/1.0/ -->
- <head>
- <meta charset="utf-8">
- <title>Page testing content in the Sandbox can't escape</title>
- <script type="application/javascript;version=1.8">
- const TEST_BASE = "http://mochi.test:8888/chrome/toolkit/identity/tests/chrome/"
- const Ci = SpecialPowers.Ci;
-
- function expectException(aFunc) {
- try {
- aFunc();
- } catch (ex) {
- return true;
- }
- return false;
- }
-
- function CcNotPresent() {
- if (typeof Components === 'undefined')
- return true;
- // Components shim doesn't define Components.classes.
- try {
- return typeof Components.classes === 'undefined';
- } catch (e) {
- return false;
- }
- }
-
- // Build an object with test results (true = pass)
- let results = {
- windowTop: window.top == window,
-
- qiWindow: expectException(function() {
- let isForced = window.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindowUtils)
- .docCharsetIsForced;
- }),
-
- ccAccess: !!CcNotPresent(),
- };
-
- let resultsJSON = JSON.stringify(results);
-
- // Send the results to the mochitest server so the test file can retrieve them.
- let stateURL = TEST_BASE + "sandbox_content.sjs"
- let xhr = new XMLHttpRequest();
- xhr.open("GET", stateURL + "?" + encodeURIComponent(resultsJSON), true);
- xhr.onload = function() {
- if (xhr.status != 200) {
- dump("Failed sending results\n");
- }
- };
- xhr.send();
-
- </script>
- </head>
-
- <body>
-
- </body>
-</html>
diff --git a/toolkit/identity/tests/chrome/sandbox_content_popup.html b/toolkit/identity/tests/chrome/sandbox_content_popup.html
deleted file mode 100644
index cb21f706fd..0000000000
--- a/toolkit/identity/tests/chrome/sandbox_content_popup.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<!-- Any copyright is dedicated to the Public Domain.
- - http://creativecommons.org/publicdomain/zero/1.0/ -->
-<head>
-<meta charset="utf-8">
-<title>Page creating an popup inside the Sandbox</title>
-
-<script>
-
-var strWindowFeatures = "menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes";
-
-var uri = "data:text/html,";
-uri += encodeURI("<body onload='setTimeout(window.close, 1000)'>");
-
-var win = window.open(uri, "sandbox_popup", strWindowFeatures);
-
-</script>
-
-</head>
-
-<body>
-
-</body>
-</html>
diff --git a/toolkit/identity/tests/chrome/sandbox_content_redirect.html b/toolkit/identity/tests/chrome/sandbox_content_redirect.html
deleted file mode 100644
index 7570ffad82..0000000000
--- a/toolkit/identity/tests/chrome/sandbox_content_redirect.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
diff --git a/toolkit/identity/tests/chrome/sandbox_content_redirect.html^headers^ b/toolkit/identity/tests/chrome/sandbox_content_redirect.html^headers^
deleted file mode 100644
index 7c06340b99..0000000000
--- a/toolkit/identity/tests/chrome/sandbox_content_redirect.html^headers^
+++ /dev/null
@@ -1,2 +0,0 @@
-HTTP 302 Found
-Location: http://mochi.test:8888/chrome/toolkit/identity/tests/chrome/sandbox_content.html
diff --git a/toolkit/identity/tests/chrome/test_sandbox.xul b/toolkit/identity/tests/chrome/test_sandbox.xul
deleted file mode 100644
index 2b353c53ba..0000000000
--- a/toolkit/identity/tests/chrome/test_sandbox.xul
+++ /dev/null
@@ -1,324 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
-<?xml-stylesheet type="text/css" href="/tests/SimpleTest/test.css"?>
-<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=762993
--->
-<window title="Mozilla Bug 762993"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="run_next_test();">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml">
- <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=762993"
- target="_blank">Mozilla Bug 762993</a>
- </body>
-
- <!-- test code goes here -->
- <script type="application/javascript;version=1.8">
- <![CDATA[
-
- /** Test for Bug 762993 **/
-
-"use strict";
-
-SimpleTest.expectAssertions(1);
-
-SimpleTest.waitForExplicitFinish();
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-
-const secMan = Cc["@mozilla.org/scriptsecuritymanager;1"].getService(Ci.nsIScriptSecurityManager);
-
-const TEST_URL_1 = "https://example.com/";
-// No trailing slash plus port to test normalization
-const TEST_URL_2 = "https://example.com:443";
-
-const TEST_BASE = "http://mochi.test:8888/chrome/toolkit/identity/tests/chrome/"
-const STATE_URL = TEST_BASE + "sandbox_content.sjs"
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-
-Services.prefs.setBoolPref("toolkit.identity.debug", true);
-
-XPCOMUtils.defineLazyModuleGetter(this, "Sandbox",
- "resource://gre/modules/identity/Sandbox.jsm");
-
-function check_sandbox(aSandbox, aURL) {
- ok(aSandbox.id > 0, "valid ID");
- is(aSandbox._url, aURL, "matching URL (with normalization)");
- isnot(aSandbox._frame, null, "frame");
- isnot(aSandbox._container, null, "container");
- let docPrincipal = aSandbox._frame.contentDocument.nodePrincipal;
- is(secMan.isSystemPrincipal(docPrincipal), false,
- "principal must not be system");
-}
-
-/**
- * Free the sandbox and make sure all properties that are not booleans,
- * functions or numbers were freed.
- */
-function free_and_check_sandbox(aSandbox) {
- SimpleTest.executeSoon(function() {
- aSandbox.free();
-
- for(let prop in aSandbox) {
- // Don't trigger the "id" getter when the frame is supposed to be freed already
- if (prop == "id")
- continue;
- let propType = typeof(aSandbox[prop]);
- if (propType == "boolean" || propType == "function" || propType == "number")
- continue;
- is(aSandbox[prop], null, "freed " + prop);
- }
- run_next_test();
- });
-}
-
-function reset_server_state() {
- // Now reset the server state
- let resetReq = new XMLHttpRequest();
- resetReq.open("GET", STATE_URL + "?reset", false);
- resetReq.send();
-}
-
-function test_creation() {
- new Sandbox(TEST_URL_1, function sandboxCB(aSandbox) {
- check_sandbox(aSandbox, TEST_URL_1);
- free_and_check_sandbox(aSandbox);
- });
-}
-
-function test_reload() {
- new Sandbox(TEST_URL_1, function sandboxCB(aSandbox) {
- check_sandbox(aSandbox, TEST_URL_1);
- let originalId = aSandbox.id;
-
- aSandbox.reload(function sandboxReloadCB(aSandbox) {
- check_sandbox(aSandbox, TEST_URL_1);
- is(aSandbox.id, originalId, "Sandbox ID should be the same after reload");
- free_and_check_sandbox(aSandbox);
- });
- });
-}
-
-function test_url_normalization() {
- new Sandbox(TEST_URL_2, function sandboxCB(aSandbox) {
- // TEST_URL_2 should be normalized into the form of TEST_URL_1
- check_sandbox(aSandbox, TEST_URL_1);
- free_and_check_sandbox(aSandbox);
- });
-}
-
-/**
- * Check with the server's state to see what content was loaded then reset it.
- */
-function check_loaded_content(aSandbox, aNothingShouldLoad, aCallback) {
-
- let xhr = new XMLHttpRequest();
- xhr.open("GET", STATE_URL + "?get_loaded", true);
- xhr.onload = function() {
- let res = xhr.responseText;
- is(xhr.status, 200, "Check successful response");
-
- if (aNothingShouldLoad) {
- is(res, "NOTHING", "Check that nothing was loaded on the server");
- } else {
- let allowedTypes = [ "application/javascript", "text/html", "application/x-test" ];
- let loadedTypes = res == "NOTHING" ? [] : res.split(",");
-
- for (let loadedType of loadedTypes) {
- isnot(allowedTypes.indexOf(loadedType), -1, "Check that " + loadedType + " was expected to load"); // TODO
- }
-
- isnot(loadedTypes.indexOf("application/javascript"), -1, "Check JS was loaded");
- isnot(loadedTypes.indexOf("text/html"), -1, "Check iframe was loaded");
- is(loadedTypes.indexOf("video/webm"), -1, "Check webm was not loaded");
- is(loadedTypes.indexOf("audio/ogg"), -1, "Check ogg was not loaded");
-
- // Check that no plugin tags have a type other than TYPE_NULL (failed load)
- // --
- // Checking if a channel was opened is not sufficient for plugin tags --
- // An object tag may still be allowed to load a sub-document, but not a
- // plugin, so it will open a channel but then abort when it gets a
- // plugin-type.
- let doc = aSandbox._frame.contentDocument;
- let nullType = Components.interfaces.nsIObjectLoadingContent.TYPE_NULL;
- for (let tag of doc.querySelectorAll("embed, object, applet")) {
- tag instanceof Components.interfaces.nsIObjectLoadingContent;
- is(tag.displayedType, nullType, "Check that plugin did not load content");
- }
- }
-
- reset_server_state();
-
- aCallback();
- };
- xhr.send();
-}
-
-/**
- * Helper to check that only certain content is loaded on creation and during reload.
- */
-function check_disabled_content(aSandboxURL, aNothingShouldLoad = false) {
- new Sandbox(aSandboxURL, function sandboxCB(aSandbox) {
- check_sandbox(aSandbox, aSandboxURL);
- let originalId = aSandbox.id;
-
- setTimeout(function() {
- check_loaded_content(aSandbox, aNothingShouldLoad, function checkFinished() {
-
- info("reload the sandbox content");
- aSandbox.reload(function sandboxReloadCB(aSandbox) {
- check_sandbox(aSandbox, aSandboxURL);
- is(aSandbox.id, originalId, "Sandbox ID should be the same after reload");
-
- setTimeout(function() {
- check_loaded_content(aSandbox, aNothingShouldLoad, function reloadCheckFinished() {
- free_and_check_sandbox(aSandbox);
- });
- }, 5000);
- });
- });
- }, 5000);
- });
-}
-
-function test_disabled_content() {
- let url = TEST_BASE + "sandbox_content.html";
- check_disabled_content(url);
-}
-
-// Same as test above but with content in an iframe.
-function test_disabled_content_framed() {
- let url = TEST_BASE + "sandbox_content_framed.html";
- check_disabled_content(url);
-}
-
-function test_redirect() {
- let url = TEST_BASE + "sandbox_content_redirect.html";
- check_disabled_content(url);
-}
-
-function WindowObserver(aCallback) {
- this.observe = function(aSubject, aTopic, aData) {
- if (aTopic != "domwindowopened") {
- return;
- }
- Services.ww.unregisterNotification(this);
-
- let domWin = aSubject.QueryInterface(Ci.nsIDOMWindow);
- ok(!domWin, "No window should be opened");
- SimpleTest.executeSoon(function() {
- info("Closing opened window");
- domWin.close();
- aCallback();
- });
- }
-}
-
-// Can the sandbox call window.alert() or popup other UI?
-function test_alert() {
- let alertURL = TEST_BASE + "sandbox_content_alert.html";
-
- new Sandbox(alertURL, function sandboxCB(aSandbox) {
- check_sandbox(aSandbox, alertURL);
- setTimeout(function() {
-
- let win = Services.wm.getMostRecentWindow(null);
- isnot(win.document.documentElement.getAttribute("id"), "commonDialog",
- "Make sure most recent window is not a dialog");
- if (win.document.documentElement.getAttribute("id") == "commonDialog") {
- // If a dialog did open, close it so we don't interfere with future tests
- win.close()
- }
-
- free_and_check_sandbox(aSandbox);
- }, 1000);
- });
-}
-
-// Can the sandboxed page open a popup with window.open?
-function test_popup() {
- let alertURL = TEST_BASE + "sandbox_content_popup.html";
- let theSandbox;
- function continueTest() {
- // avoid double-free
- if (!theSandbox)
- return;
- free_and_check_sandbox(theSandbox);
- theSandbox = null;
- }
- let winObs = new WindowObserver(continueTest);
- Services.ww.registerNotification(winObs);
- new Sandbox(alertURL, function sandboxCB(aSandbox) {
- theSandbox = aSandbox;
- check_sandbox(aSandbox, alertURL);
- // Wait 5 seconds to see if the window is going to open.
- setTimeout(function() {
- Services.ww.unregisterNotification(winObs);
- continueTest();
- }, 5000);
- });
-}
-
-// Loading a page with a bad cert
-function test_bad_cert() {
- let url = TEST_BASE + "sandbox_content.sjs?text/html";
- url = url.replace("http://mochi.test:8888", "https://untrusted.example.com");
- check_disabled_content(url, /*nothingShouldLoad=*/true);
-}
-
-// Loading a page to check window.top and other permissions.
-function test_frame_perms() {
- let url = TEST_BASE + "sandbox_content_perms.html";
- new Sandbox(url, function sandboxCB(aSandbox) {
- check_sandbox(aSandbox, url);
-
- // Give the content time to load
- setTimeout(function() {
- let xhr = new XMLHttpRequest();
- xhr.open("GET", STATE_URL + "?get_loaded", true);
- xhr.responseType = "json";
- xhr.onload = function() {
- is(xhr.status, 200, "Check successful response");
- is(typeof(xhr.response), "object", "Check response is object");
- is(Object.keys(xhr.response).length, 3, "Check the number of perm. tests");
- for (let test in xhr.response) {
- ok(xhr.response[test], "Check result of " + test);
- }
-
- reset_server_state();
- free_and_check_sandbox(aSandbox);
- };
- xhr.send();
- }, 3000);
- });
-}
-
-let TESTS = [test_creation, test_reload, test_url_normalization];
-TESTS.push(test_disabled_content, test_disabled_content_framed);
-TESTS.push(test_alert, test_popup, test_bad_cert);
-TESTS.push(test_redirect, test_frame_perms);
-
-function run_next_test() {
- if (TESTS.length) {
- let test = TESTS.shift();
- info(test.name);
- test();
- } else {
- Services.prefs.clearUserPref("toolkit.identity.debug");
- SimpleTest.finish();
- }
-}
-
- ]]>
- </script>
-</window>
diff --git a/toolkit/identity/tests/unit/.eslintrc.js b/toolkit/identity/tests/unit/.eslintrc.js
deleted file mode 100644
index fee088c179..0000000000
--- a/toolkit/identity/tests/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/identity/tests/unit/data/idp_1/.well-known/browserid b/toolkit/identity/tests/unit/data/idp_1/.well-known/browserid
deleted file mode 100644
index c7390457d2..0000000000
--- a/toolkit/identity/tests/unit/data/idp_1/.well-known/browserid
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "public-key": {"algorithm":"RS","n":"65718905405105134410187227495885391609221288015566078542117409373192106382993306537273677557482085204736975067567111831005921322991127165013340443563713385983456311886801211241492470711576322130577278575529202840052753612576061450560588102139907846854501252327551303482213505265853706269864950437458242988327","e":"65537"},
- "authentication": "/browserid/sign_in.html",
- "provisioning": "/browserid/provision.html"
-}
diff --git a/toolkit/identity/tests/unit/data/idp_invalid_1/.well-known/browserid b/toolkit/identity/tests/unit/data/idp_invalid_1/.well-known/browserid
deleted file mode 100644
index 6bcd9de914..0000000000
--- a/toolkit/identity/tests/unit/data/idp_invalid_1/.well-known/browserid
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "public-key": {"algorithm":"RS","n":"65718905405105134410187227495885391609221288015566078542117409373192106382993306537273677557482085204736975067567111831005921322991127165013340443563713385983456311886801211241492470711576322130577278575529202840052753612576061450560588102139907846854501252327551303482213505265853706269864950437458242988327","e":"65537"},
- "authentication": "/browserid/sign_in.html",
- // missing "provisioning"
-}
diff --git a/toolkit/identity/tests/unit/head_identity.js b/toolkit/identity/tests/unit/head_identity.js
deleted file mode 100644
index c63261b950..0000000000
--- a/toolkit/identity/tests/unit/head_identity.js
+++ /dev/null
@@ -1,248 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-var Cr = Components.results;
-
-Cu.import("resource://testing-common/httpd.js");
-
-// XXX until bug 937114 is fixed
-Cu.importGlobalProperties(["atob"]);
-
-// The following boilerplate makes sure that XPCOM calls
-// that use the profile directory work.
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "jwcrypto",
- "resource://gre/modules/identity/jwcrypto.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "IDService",
- "resource://gre/modules/identity/Identity.jsm",
- "IdentityService");
-
-XPCOMUtils.defineLazyModuleGetter(this,
- "IdentityStore",
- "resource://gre/modules/identity/IdentityStore.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this,
- "Logger",
- "resource://gre/modules/identity/LogUtils.jsm");
-
-XPCOMUtils.defineLazyServiceGetter(this,
- "uuidGenerator",
- "@mozilla.org/uuid-generator;1",
- "nsIUUIDGenerator");
-
-const TEST_MESSAGE_MANAGER = "Mr McFeeley";
-const TEST_URL = "https://myfavoritebacon.com";
-const TEST_URL2 = "https://myfavoritebaconinacan.com";
-const TEST_USER = "user@mozilla.com";
-const TEST_PRIVKEY = "fake-privkey";
-const TEST_CERT = "fake-cert";
-const TEST_ASSERTION = "fake-assertion";
-const TEST_IDPPARAMS = {
- domain: "myfavoriteflan.com",
- authentication: "/foo/authenticate.html",
- provisioning: "/foo/provision.html"
-};
-
-// The following are utility functions for Identity testing
-
-function log(...aMessageArgs) {
- Logger.log.apply(Logger, ["test"].concat(aMessageArgs));
-}
-
-function get_idstore() {
- return IdentityStore;
-}
-
-function partial(fn) {
- let args = Array.prototype.slice.call(arguments, 1);
- return function() {
- return fn.apply(this, args.concat(Array.prototype.slice.call(arguments)));
- };
-}
-
-function uuid() {
- return uuidGenerator.generateUUID().toString();
-}
-
-function base64UrlDecode(s) {
- s = s.replace(/-/g, "+");
- s = s.replace(/_/g, "/");
-
- // Replace padding if it was stripped by the sender.
- // See http://tools.ietf.org/html/rfc4648#section-4
- switch (s.length % 4) {
- case 0:
- break; // No pad chars in this case
- case 2:
- s += "==";
- break; // Two pad chars
- case 3:
- s += "=";
- break; // One pad char
- default:
- throw new InputException("Illegal base64url string!");
- }
-
- // With correct padding restored, apply the standard base64 decoder
- return atob(s);
-}
-
-// create a mock "doc" object, which the Identity Service
-// uses as a pointer back into the doc object
-function mock_doc(aIdentity, aOrigin, aDoFunc) {
- let mockedDoc = {};
- mockedDoc.id = uuid();
- mockedDoc.loggedInUser = aIdentity;
- mockedDoc.origin = aOrigin;
- mockedDoc["do"] = aDoFunc;
- mockedDoc._mm = TEST_MESSAGE_MANAGER;
- mockedDoc.doReady = partial(aDoFunc, "ready");
- mockedDoc.doLogin = partial(aDoFunc, "login");
- mockedDoc.doLogout = partial(aDoFunc, "logout");
- mockedDoc.doError = partial(aDoFunc, "error");
- mockedDoc.doCancel = partial(aDoFunc, "cancel");
- mockedDoc.doCoffee = partial(aDoFunc, "coffee");
- mockedDoc.childProcessShutdown = partial(aDoFunc, "child-process-shutdown");
-
- mockedDoc.RP = mockedDoc;
-
- return mockedDoc;
-}
-
-function mock_fxa_rp(aIdentity, aOrigin, aDoFunc) {
- let mockedDoc = {};
- mockedDoc.id = uuid();
- mockedDoc.emailHint = aIdentity;
- mockedDoc.origin = aOrigin;
- mockedDoc.wantIssuer = "firefox-accounts";
- mockedDoc._mm = TEST_MESSAGE_MANAGER;
-
- mockedDoc.doReady = partial(aDoFunc, "ready");
- mockedDoc.doLogin = partial(aDoFunc, "login");
- mockedDoc.doLogout = partial(aDoFunc, "logout");
- mockedDoc.doError = partial(aDoFunc, "error");
- mockedDoc.doCancel = partial(aDoFunc, "cancel");
- mockedDoc.childProcessShutdown = partial(aDoFunc, "child-process-shutdown");
-
- mockedDoc.RP = mockedDoc;
-
- return mockedDoc;
-}
-
-// mimicking callback funtionality for ease of testing
-// this observer auto-removes itself after the observe function
-// is called, so this is meant to observe only ONE event.
-function makeObserver(aObserveTopic, aObserveFunc) {
- let observer = {
- // nsISupports provides type management in C++
- // nsIObserver is to be an observer
- QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports, Ci.nsIObserver]),
-
- observe: function (aSubject, aTopic, aData) {
- if (aTopic == aObserveTopic) {
- aObserveFunc(aSubject, aTopic, aData);
- Services.obs.removeObserver(observer, aObserveTopic);
- }
- }
- };
-
- Services.obs.addObserver(observer, aObserveTopic, false);
-}
-
-// set up the ID service with an identity with keypair and all
-// when ready, invoke callback with the identity
-function setup_test_identity(identity, cert, cb) {
- // set up the store so that we're supposed to be logged in
- let store = get_idstore();
-
- function keyGenerated(err, kpo) {
- store.addIdentity(identity, kpo, cert);
- cb();
- }
-
- jwcrypto.generateKeyPair("DS160", keyGenerated);
-}
-
-// takes a list of functions and returns a function that
-// when called the first time, calls the first func,
-// then the next time the second, etc.
-function call_sequentially() {
- let numCalls = 0;
- let funcs = arguments;
-
- return function() {
- if (!funcs[numCalls]) {
- let argString = Array.prototype.slice.call(arguments).join(",");
- do_throw("Too many calls: " + argString);
- return;
- }
- funcs[numCalls].apply(funcs[numCalls], arguments);
- numCalls += 1;
- };
-}
-
-/*
- * Setup a provisioning workflow with appropriate callbacks
- *
- * identity is the email we're provisioning.
- *
- * afterSetupCallback is required.
- *
- * doneProvisioningCallback is optional, if the caller
- * wants to be notified when the whole provisioning workflow is done
- *
- * frameCallbacks is optional, contains the callbacks that the sandbox
- * frame would provide in response to DOM calls.
- */
-function setup_provisioning(identity, afterSetupCallback, doneProvisioningCallback, callerCallbacks) {
- IDService.reset();
-
- let provId = uuid();
- IDService.IDP._provisionFlows[provId] = {
- identity : identity,
- idpParams: TEST_IDPPARAMS,
- callback: function(err) {
- if (doneProvisioningCallback)
- doneProvisioningCallback(err);
- },
- sandbox: {
- // Emulate the free() method on the iframe sandbox
- free: function() {}
- }
- };
-
- let caller = {};
- caller.id = provId;
- caller.doBeginProvisioningCallback = function(id, duration_s) {
- if (callerCallbacks && callerCallbacks.beginProvisioningCallback)
- callerCallbacks.beginProvisioningCallback(id, duration_s);
- };
- caller.doGenKeyPairCallback = function(pk) {
- if (callerCallbacks && callerCallbacks.genKeyPairCallback)
- callerCallbacks.genKeyPairCallback(pk);
- };
-
- afterSetupCallback(caller);
-}
-
-// Switch debug messages on by default
-var initialPrefDebugValue = false;
-try {
- initialPrefDebugValue = Services.prefs.getBoolPref("toolkit.identity.debug");
-} catch (noPref) {}
-Services.prefs.setBoolPref("toolkit.identity.debug", true);
-
-// after execution, restore prefs
-do_register_cleanup(function() {
- log("restoring prefs to their initial values");
- Services.prefs.setBoolPref("toolkit.identity.debug", initialPrefDebugValue);
-});
-
-
diff --git a/toolkit/identity/tests/unit/tail_identity.js b/toolkit/identity/tests/unit/tail_identity.js
deleted file mode 100644
index c263f8369d..0000000000
--- a/toolkit/identity/tests/unit/tail_identity.js
+++ /dev/null
@@ -1,8 +0,0 @@
-
-// pre-emptively shut down to clear resources
-if (typeof IdentityService !== "undefined") {
- IdentityService.shutdown();
-} else if (typeof IDService !== "undefined") {
- IDService.shutdown();
-}
-
diff --git a/toolkit/identity/tests/unit/test_authentication.js b/toolkit/identity/tests/unit/test_authentication.js
deleted file mode 100644
index 3f24e2e37d..0000000000
--- a/toolkit/identity/tests/unit/test_authentication.js
+++ /dev/null
@@ -1,159 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-XPCOMUtils.defineLazyModuleGetter(this, "IDService",
- "resource://gre/modules/identity/Identity.jsm",
- "IdentityService");
-
-XPCOMUtils.defineLazyModuleGetter(this, "jwcrypto",
- "resource://gre/modules/identity/jwcrypto.jsm");
-
-function test_begin_authentication_flow() {
- do_test_pending();
- let _provId = null;
-
- // set up a watch, to be consistent
- let mockedDoc = mock_doc(null, TEST_URL, function(action, params) {});
- IDService.RP.watch(mockedDoc);
-
- // The identity-auth notification is sent up to the UX from the
- // _doAuthentication function. Be ready to receive it and call
- // beginAuthentication
- makeObserver("identity-auth", function (aSubject, aTopic, aData) {
- do_check_neq(aSubject, null);
-
- do_check_eq(aSubject.wrappedJSObject.provId, _provId);
-
- do_test_finished();
- run_next_test();
- });
-
- setup_provisioning(
- TEST_USER,
- function(caller) {
- _provId = caller.id;
- IDService.IDP.beginProvisioning(caller);
- }, function() {},
- {
- beginProvisioningCallback: function(email, duration_s) {
-
- // let's say this user needs to authenticate
- IDService.IDP._doAuthentication(_provId, {idpParams:TEST_IDPPARAMS});
- }
- }
- );
-}
-
-function test_complete_authentication_flow() {
- do_test_pending();
- let _provId = null;
- let _authId = null;
- let id = TEST_USER;
-
- let callbacksFired = false;
- let loginStateChanged = false;
- let identityAuthComplete = false;
-
- // The result of authentication should be a successful login
- IDService.reset();
-
- setup_test_identity(id, TEST_CERT, function() {
- // set it up so we're supposed to be logged in to TEST_URL
-
- get_idstore().setLoginState(TEST_URL, true, id);
-
- // When we authenticate, our ready callback will be fired.
- // At the same time, a separate topic will be sent up to the
- // the observer in the UI. The test is complete when both
- // events have occurred.
- let mockedDoc = mock_doc(id, TEST_URL, call_sequentially(
- function(action, params) {
- do_check_eq(action, 'ready');
- do_check_eq(params, undefined);
-
- // if notification already received by observer, test is done
- callbacksFired = true;
- if (loginStateChanged && identityAuthComplete) {
- do_test_finished();
- run_next_test();
- }
- }
- ));
-
- makeObserver("identity-auth-complete", function(aSubject, aTopic, aData) {
- identityAuthComplete = true;
- do_test_finished();
- run_next_test();
- });
-
- makeObserver("identity-login-state-changed", function (aSubject, aTopic, aData) {
- do_check_neq(aSubject, null);
-
- do_check_eq(aSubject.wrappedJSObject.rpId, mockedDoc.id);
- do_check_eq(aData, id);
-
- // if callbacks in caller doc already fired, test is done.
- loginStateChanged = true;
- if (callbacksFired && identityAuthComplete) {
- do_test_finished();
- run_next_test();
- }
- });
-
- IDService.RP.watch(mockedDoc);
-
- // Create a provisioning flow for our auth flow to attach to
- setup_provisioning(
- TEST_USER,
- function(provFlow) {
- _provId = provFlow.id;
-
- IDService.IDP.beginProvisioning(provFlow);
- }, function() {},
- {
- beginProvisioningCallback: function(email, duration_s) {
- // let's say this user needs to authenticate
- IDService.IDP._doAuthentication(_provId, {idpParams:TEST_IDPPARAMS});
-
- // test_begin_authentication_flow verifies that the right
- // message is sent to the UI. So that works. Moving on,
- // the UI calls setAuthenticationFlow ...
- _authId = uuid();
- IDService.IDP.setAuthenticationFlow(_authId, _provId);
-
- // ... then the UI calls beginAuthentication ...
- authCaller.id = _authId;
- IDService.IDP._provisionFlows[_provId].caller = authCaller;
- IDService.IDP.beginAuthentication(authCaller);
- }
- }
- );
- });
-
- // A mock calling context
- let authCaller = {
- doBeginAuthenticationCallback: function doBeginAuthenticationCallback(identity) {
- do_check_eq(identity, TEST_USER);
- // completeAuthentication will emit "identity-auth-complete"
- IDService.IDP.completeAuthentication(_authId);
- },
-
- doError: function(err) {
- log("OW! My doError callback hurts!", err);
- },
- };
-
-}
-
-var TESTS = [];
-
-TESTS.push(test_begin_authentication_flow);
-TESTS.push(test_complete_authentication_flow);
-
-TESTS.forEach(add_test);
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/identity/tests/unit/test_crypto_service.js b/toolkit/identity/tests/unit/test_crypto_service.js
deleted file mode 100644
index 561c3804a7..0000000000
--- a/toolkit/identity/tests/unit/test_crypto_service.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import('resource://gre/modules/identity/LogUtils.jsm');
-
-const idService = Cc["@mozilla.org/identity/crypto-service;1"]
- .getService(Ci.nsIIdentityCryptoService);
-
-const ALG_DSA = "DS160";
-const ALG_RSA = "RS256";
-
-const BASE64_URL_ENCODINGS = [
- // The vectors from RFC 4648 are very silly, but we may as well include them.
- ["", ""],
- ["f", "Zg=="],
- ["fo", "Zm8="],
- ["foo", "Zm9v"],
- ["foob", "Zm9vYg=="],
- ["fooba", "Zm9vYmE="],
- ["foobar", "Zm9vYmFy"],
-
- // It's quite likely you could get a string like this in an assertion audience
- ["i-like-pie.com", "aS1saWtlLXBpZS5jb20="],
-
- // A few extra to be really sure
- ["andré@example.com", "YW5kcsOpQGV4YW1wbGUuY29t"],
- ["πόλλ' οἶδ' ἀλώπηξ, ἀλλ' ἐχῖνος ἓν μέγα",
- "z4DPjM67zrsnIM6_4by2zrQnIOG8gM67z47PgM63zr4sIOG8gM67zrsnIOG8kM-H4b-Wzr3Ov8-CIOG8k869IM68zq3Os86x"],
-];
-
-// When the output of an operation is a
-function do_check_eq_or_slightly_less(x, y) {
- do_check_true(x >= y - (3 * 8));
-}
-
-function test_base64_roundtrip() {
- let message = "Attack at dawn!";
- let encoded = idService.base64UrlEncode(message);
- let decoded = base64UrlDecode(encoded);
- do_check_neq(message, encoded);
- do_check_eq(decoded, message);
- run_next_test();
-}
-
-function test_dsa() {
- idService.generateKeyPair(ALG_DSA, function (rv, keyPair) {
- log("DSA generateKeyPair finished ", rv);
- do_check_true(Components.isSuccessCode(rv));
- do_check_eq(typeof keyPair.sign, "function");
- do_check_eq(keyPair.keyType, ALG_DSA);
- do_check_eq_or_slightly_less(keyPair.hexDSAGenerator.length, 1024 / 8 * 2);
- do_check_eq_or_slightly_less(keyPair.hexDSAPrime.length, 1024 / 8 * 2);
- do_check_eq_or_slightly_less(keyPair.hexDSASubPrime.length, 160 / 8 * 2);
- do_check_eq_or_slightly_less(keyPair.hexDSAPublicValue.length, 1024 / 8 * 2);
- // XXX: test that RSA parameters throw the correct error
-
- log("about to sign with DSA key");
- keyPair.sign("foo", function (rv2, signature) {
- log("DSA sign finished ", rv2, signature);
- do_check_true(Components.isSuccessCode(rv2));
- do_check_true(signature.length > 1);
- // TODO: verify the signature with the public key
- run_next_test();
- });
- });
-}
-
-function test_rsa() {
- idService.generateKeyPair(ALG_RSA, function (rv, keyPair) {
- log("RSA generateKeyPair finished ", rv);
- do_check_true(Components.isSuccessCode(rv));
- do_check_eq(typeof keyPair.sign, "function");
- do_check_eq(keyPair.keyType, ALG_RSA);
- do_check_eq_or_slightly_less(keyPair.hexRSAPublicKeyModulus.length,
- 2048 / 8);
- do_check_true(keyPair.hexRSAPublicKeyExponent.length > 1);
-
- log("about to sign with RSA key");
- keyPair.sign("foo", function (rv2, signature) {
- log("RSA sign finished ", rv2, signature);
- do_check_true(Components.isSuccessCode(rv2));
- do_check_true(signature.length > 1);
- run_next_test();
- });
- });
-}
-
-function test_base64UrlEncode() {
- for (let [source, target] of BASE64_URL_ENCODINGS) {
- do_check_eq(target, idService.base64UrlEncode(source));
- }
- run_next_test();
-}
-
-function test_base64UrlDecode() {
- let utf8Converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"]
- .createInstance(Ci.nsIScriptableUnicodeConverter);
- utf8Converter.charset = "UTF-8";
-
- // We know the encoding of our inputs - on conversion back out again, make
- // sure they're the same.
- for (let [source, target] of BASE64_URL_ENCODINGS) {
- let result = utf8Converter.ConvertToUnicode(base64UrlDecode(target));
- result += utf8Converter.Finish();
- do_check_eq(source, result);
- }
- run_next_test();
-}
-
-add_test(test_base64_roundtrip);
-add_test(test_dsa);
-add_test(test_rsa);
-add_test(test_base64UrlEncode);
-add_test(test_base64UrlDecode);
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/identity/tests/unit/test_identity.js b/toolkit/identity/tests/unit/test_identity.js
deleted file mode 100644
index 5e2206c2a2..0000000000
--- a/toolkit/identity/tests/unit/test_identity.js
+++ /dev/null
@@ -1,114 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-XPCOMUtils.defineLazyModuleGetter(this, "IDService",
- "resource://gre/modules/identity/Identity.jsm",
- "IdentityService");
-
-function test_overall() {
- do_check_neq(IDService, null);
- run_next_test();
-}
-
-function test_mock_doc() {
- do_test_pending();
- let mockedDoc = mock_doc(null, TEST_URL, function(action, params) {
- do_check_eq(action, 'coffee');
- do_test_finished();
- run_next_test();
- });
-
- mockedDoc.doCoffee();
-}
-
-function test_add_identity() {
- IDService.reset();
-
- IDService.addIdentity(TEST_USER);
-
- let identities = IDService.RP.getIdentitiesForSite(TEST_URL);
- do_check_eq(identities.result.length, 1);
- do_check_eq(identities.result[0], TEST_USER);
-
- run_next_test();
-}
-
-function test_select_identity() {
- do_test_pending();
-
- IDService.reset();
-
- let id = "ishtar@mockmyid.com";
- setup_test_identity(id, TEST_CERT, function() {
- let gotAssertion = false;
- let mockedDoc = mock_doc(null, TEST_URL, call_sequentially(
- function(action, params) {
- // ready emitted from first watch() call
- do_check_eq(action, 'ready');
- do_check_null(params);
- },
- // first the login call
- function(action, params) {
- do_check_eq(action, 'login');
- do_check_neq(params, null);
-
- // XXX - check that the assertion is for the right email
-
- gotAssertion = true;
- },
- // then the ready call
- function(action, params) {
- do_check_eq(action, 'ready');
- do_check_null(params);
-
- // we should have gotten the assertion already
- do_check_true(gotAssertion);
-
- do_test_finished();
- run_next_test();
- }));
-
- // register the callbacks
- IDService.RP.watch(mockedDoc);
-
- // register the request UX observer
- makeObserver("identity-request", function (aSubject, aTopic, aData) {
- // do the select identity
- // we expect this to succeed right away because of test_identity
- // so we don't mock network requests or otherwise
- IDService.selectIdentity(aSubject.wrappedJSObject.rpId, id);
- });
-
- // do the request
- IDService.RP.request(mockedDoc.id, {});
- });
-}
-
-function test_parse_good_email() {
- var parsed = IDService.parseEmail('prime-minister@jed.gov');
- do_check_eq(parsed.username, 'prime-minister');
- do_check_eq(parsed.domain, 'jed.gov');
- run_next_test();
-}
-
-function test_parse_bogus_emails() {
- do_check_eq(null, IDService.parseEmail('@evil.org'));
- do_check_eq(null, IDService.parseEmail('foo@bar@baz.com'));
- do_check_eq(null, IDService.parseEmail('you@wellsfargo.com/accounts/transfer?to=dolske&amt=all'));
- run_next_test();
-}
-
-var TESTS = [test_overall, test_mock_doc];
-
-TESTS.push(test_add_identity);
-TESTS.push(test_select_identity);
-TESTS.push(test_parse_good_email);
-TESTS.push(test_parse_bogus_emails);
-
-TESTS.forEach(add_test);
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/identity/tests/unit/test_identity_utils.js b/toolkit/identity/tests/unit/test_identity_utils.js
deleted file mode 100644
index 6ccc4e311b..0000000000
--- a/toolkit/identity/tests/unit/test_identity_utils.js
+++ /dev/null
@@ -1,46 +0,0 @@
-
-"use strict";
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import('resource://gre/modules/Services.jsm');
-Cu.import('resource://gre/modules/identity/IdentityUtils.jsm');
-
-function test_check_deprecated() {
- let options = {
- id: 123,
- loggedInEmail: "jed@foo.com",
- pies: 42
- };
-
- do_check_true(checkDeprecated(options, "loggedInEmail"));
- do_check_false(checkDeprecated(options, "flans"));
-
- run_next_test();
-}
-
-function test_check_renamed() {
- let options = {
- id: 123,
- loggedInEmail: "jed@foo.com",
- pies: 42
- };
-
- checkRenamed(options, "loggedInEmail", "loggedInUser");
-
- // It moves loggedInEmail to loggedInUser
- do_check_false(!!options.loggedInEmail);
- do_check_eq(options.loggedInUser, "jed@foo.com");
-
- run_next_test();
-}
-
-var TESTS = [
- test_check_deprecated,
- test_check_renamed
-];
-
-TESTS.forEach(add_test);
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/identity/tests/unit/test_jwcrypto.js b/toolkit/identity/tests/unit/test_jwcrypto.js
deleted file mode 100644
index f8fe82453c..0000000000
--- a/toolkit/identity/tests/unit/test_jwcrypto.js
+++ /dev/null
@@ -1,281 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict"
-
-Cu.import('resource://gre/modules/identity/LogUtils.jsm');
-
-XPCOMUtils.defineLazyModuleGetter(this, "IDService",
- "resource://gre/modules/identity/Identity.jsm",
- "IdentityService");
-
-XPCOMUtils.defineLazyModuleGetter(this, "jwcrypto",
- "resource://gre/modules/identity/jwcrypto.jsm");
-
-XPCOMUtils.defineLazyServiceGetter(this,
- "CryptoService",
- "@mozilla.org/identity/crypto-service;1",
- "nsIIdentityCryptoService");
-
-const RP_ORIGIN = "http://123done.org";
-const INTERNAL_ORIGIN = "browserid://";
-
-const SECOND_MS = 1000;
-const MINUTE_MS = SECOND_MS * 60;
-const HOUR_MS = MINUTE_MS * 60;
-
-function test_sanity() {
- do_test_pending();
-
- jwcrypto.generateKeyPair("DS160", function(err, kp) {
- do_check_null(err);
-
- do_test_finished();
- run_next_test();
- });
-}
-
-function test_generate() {
- do_test_pending();
- jwcrypto.generateKeyPair("DS160", function(err, kp) {
- do_check_null(err);
- do_check_neq(kp, null);
-
- do_test_finished();
- run_next_test();
- });
-}
-
-function test_get_assertion() {
- do_test_pending();
-
- jwcrypto.generateKeyPair(
- "DS160",
- function(err, kp) {
- jwcrypto.generateAssertion("fake-cert", kp, RP_ORIGIN, (err2, backedAssertion) => {
- do_check_null(err2);
-
- do_check_eq(backedAssertion.split("~").length, 2);
- do_check_eq(backedAssertion.split(".").length, 3);
-
- do_test_finished();
- run_next_test();
- });
- });
-}
-
-function test_rsa() {
- do_test_pending();
- function checkRSA(err, kpo) {
- do_check_neq(kpo, undefined);
- log(kpo.serializedPublicKey);
- let pk = JSON.parse(kpo.serializedPublicKey);
- do_check_eq(pk.algorithm, "RS");
-/* TODO
- do_check_neq(kpo.sign, null);
- do_check_eq(typeof kpo.sign, "function");
- do_check_neq(kpo.userID, null);
- do_check_neq(kpo.url, null);
- do_check_eq(kpo.url, INTERNAL_ORIGIN);
- do_check_neq(kpo.exponent, null);
- do_check_neq(kpo.modulus, null);
-
- // TODO: should sign be async?
- let sig = kpo.sign("This is a message to sign");
-
- do_check_neq(sig, null);
- do_check_eq(typeof sig, "string");
- do_check_true(sig.length > 1);
-*/
- do_test_finished();
- run_next_test();
- }
-
- jwcrypto.generateKeyPair("RS256", checkRSA);
-}
-
-function test_dsa() {
- do_test_pending();
- function checkDSA(err, kpo) {
- do_check_neq(kpo, undefined);
- log(kpo.serializedPublicKey);
- let pk = JSON.parse(kpo.serializedPublicKey);
- do_check_eq(pk.algorithm, "DS");
-/* TODO
- do_check_neq(kpo.sign, null);
- do_check_eq(typeof kpo.sign, "function");
- do_check_neq(kpo.userID, null);
- do_check_neq(kpo.url, null);
- do_check_eq(kpo.url, INTERNAL_ORIGIN);
- do_check_neq(kpo.generator, null);
- do_check_neq(kpo.prime, null);
- do_check_neq(kpo.subPrime, null);
- do_check_neq(kpo.publicValue, null);
-
- let sig = kpo.sign("This is a message to sign");
-
- do_check_neq(sig, null);
- do_check_eq(typeof sig, "string");
- do_check_true(sig.length > 1);
-*/
- do_test_finished();
- run_next_test();
- }
-
- jwcrypto.generateKeyPair("DS160", checkDSA);
-}
-
-function test_get_assertion_with_offset() {
- do_test_pending();
-
-
- // Use an arbitrary date in the past to ensure we don't accidentally pass
- // this test with current dates, missing offsets, etc.
- let serverMsec = Date.parse("Tue Oct 31 2000 00:00:00 GMT-0800");
-
- // local clock skew
- // clock is 12 hours fast; -12 hours offset must be applied
- let localtimeOffsetMsec = -1 * 12 * HOUR_MS;
- let localMsec = serverMsec - localtimeOffsetMsec;
-
- jwcrypto.generateKeyPair(
- "DS160",
- function(err, kp) {
- jwcrypto.generateAssertion("fake-cert", kp, RP_ORIGIN,
- { duration: MINUTE_MS,
- localtimeOffsetMsec: localtimeOffsetMsec,
- now: localMsec},
- function(err2, backedAssertion) {
- do_check_null(err2);
-
- // properly formed
- let cert;
- let assertion;
- [cert, assertion] = backedAssertion.split("~");
-
- do_check_eq(cert, "fake-cert");
- do_check_eq(assertion.split(".").length, 3);
-
- let components = extractComponents(assertion);
-
- // Expiry is within two minutes, corrected for skew
- let exp = parseInt(components.payload.exp, 10);
- do_check_true(exp - serverMsec === MINUTE_MS);
-
- do_test_finished();
- run_next_test();
- }
- );
- }
- );
-}
-
-function test_assertion_lifetime() {
- do_test_pending();
-
- jwcrypto.generateKeyPair(
- "DS160",
- function(err, kp) {
- jwcrypto.generateAssertion("fake-cert", kp, RP_ORIGIN,
- {duration: MINUTE_MS},
- function(err2, backedAssertion) {
- do_check_null(err2);
-
- // properly formed
- let cert;
- let assertion;
- [cert, assertion] = backedAssertion.split("~");
-
- do_check_eq(cert, "fake-cert");
- do_check_eq(assertion.split(".").length, 3);
-
- let components = extractComponents(assertion);
-
- // Expiry is within one minute, as we specified above
- let exp = parseInt(components.payload.exp, 10);
- do_check_true(Math.abs(Date.now() - exp) > 50 * SECOND_MS);
- do_check_true(Math.abs(Date.now() - exp) <= MINUTE_MS);
-
- do_test_finished();
- run_next_test();
- }
- );
- }
- );
-}
-
-function test_audience_encoding_bug972582() {
- let audience = "i-like-pie.com";
-
- jwcrypto.generateKeyPair(
- "DS160",
- function(err, kp) {
- do_check_null(err);
- jwcrypto.generateAssertion("fake-cert", kp, audience,
- function(err2, backedAssertion) {
- do_check_null(err2);
-
- let [cert, assertion] = backedAssertion.split("~");
- let components = extractComponents(assertion);
- do_check_eq(components.payload.aud, audience);
-
- do_test_finished();
- run_next_test();
- }
- );
- }
- );
-}
-
-// End of tests
-// Helper function follow
-
-function extractComponents(signedObject) {
- if (typeof(signedObject) != 'string') {
- throw new Error("malformed signature " + typeof(signedObject));
- }
-
- let parts = signedObject.split(".");
- if (parts.length != 3) {
- throw new Error("signed object must have three parts, this one has " + parts.length);
- }
-
- let headerSegment = parts[0];
- let payloadSegment = parts[1];
- let cryptoSegment = parts[2];
-
- let header = JSON.parse(base64UrlDecode(headerSegment));
- let payload = JSON.parse(base64UrlDecode(payloadSegment));
-
- // Ensure well-formed header
- do_check_eq(Object.keys(header).length, 1);
- do_check_true(!!header.alg);
-
- // Ensure well-formed payload
- for (let field of ["exp", "aud"]) {
- do_check_true(!!payload[field]);
- }
-
- return {header: header,
- payload: payload,
- headerSegment: headerSegment,
- payloadSegment: payloadSegment,
- cryptoSegment: cryptoSegment};
-}
-
-var TESTS = [
- test_sanity,
- test_generate,
- test_get_assertion,
- test_get_assertion_with_offset,
- test_assertion_lifetime,
- test_audience_encoding_bug972582,
-];
-
-TESTS = TESTS.concat([test_rsa, test_dsa]);
-
-TESTS.forEach(add_test);
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/identity/tests/unit/test_load_modules.js b/toolkit/identity/tests/unit/test_load_modules.js
deleted file mode 100644
index 4c531312cb..0000000000
--- a/toolkit/identity/tests/unit/test_load_modules.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/* 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/. */
-
-const modules = [
- "Identity.jsm",
- "IdentityProvider.jsm",
- "IdentityStore.jsm",
- "jwcrypto.jsm",
- "RelyingParty.jsm",
- "Sandbox.jsm",
-];
-
-function run_test() {
- for (let m of modules) {
- let resource = "resource://gre/modules/identity/" + m;
- Components.utils.import(resource, {});
- do_print("loaded " + resource);
- }
-}
diff --git a/toolkit/identity/tests/unit/test_log_utils.js b/toolkit/identity/tests/unit/test_log_utils.js
deleted file mode 100644
index ac43c297d1..0000000000
--- a/toolkit/identity/tests/unit/test_log_utils.js
+++ /dev/null
@@ -1,74 +0,0 @@
-
-"use strict";
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import('resource://gre/modules/Services.jsm');
-Cu.import('resource://gre/modules/identity/LogUtils.jsm');
-
-function toggle_debug() {
- do_test_pending();
-
- function Wrapper() {
- this.init();
- }
- Wrapper.prototype = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports, Ci.nsIObserver]),
-
- observe: function observe(aSubject, aTopic, aData) {
- if (aTopic === "nsPref:changed") {
- // race condition?
- do_check_eq(Logger._debug, true);
- do_test_finished();
- run_next_test();
- }
- },
-
- init: function() {
- Services.prefs.addObserver('toolkit.identity.debug', this, false);
- }
- };
-
- var wrapper = new Wrapper();
- Services.prefs.setBoolPref('toolkit.identity.debug', true);
-}
-
-// test that things don't break
-
-function logAlias(...args) {
- Logger.log.apply(Logger, ["log alias"].concat(args));
-}
-function reportErrorAlias(...args) {
- Logger.reportError.apply(Logger, ["report error alias"].concat(args));
-}
-
-function test_log() {
- Logger.log("log test", "I like pie");
- do_test_finished();
- run_next_test();
-}
-
-function test_reportError() {
- Logger.reportError("log test", "We are out of pies!!!");
- do_test_finished();
- run_next_test();
-}
-
-function test_wrappers() {
- logAlias("I like potatoes");
- do_test_finished();
- reportErrorAlias("Too much red bull");
-}
-
-var TESTS = [
-// XXX fix me
-// toggle_debug,
- test_log,
- test_reportError,
- test_wrappers,
-];
-
-TESTS.forEach(add_test);
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/identity/tests/unit/test_minimalidentity.js b/toolkit/identity/tests/unit/test_minimalidentity.js
deleted file mode 100644
index 77c30c84f4..0000000000
--- a/toolkit/identity/tests/unit/test_minimalidentity.js
+++ /dev/null
@@ -1,223 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-XPCOMUtils.defineLazyModuleGetter(this, "MinimalIDService",
- "resource://gre/modules/identity/MinimalIdentity.jsm",
- "IdentityService");
-
-Cu.import("resource://gre/modules/identity/LogUtils.jsm");
-Cu.import("resource://gre/modules/DOMIdentity.jsm");
-
-function log(...aMessageArgs) {
- Logger.log.apply(Logger, ["test_minimalidentity"].concat(aMessageArgs));
-}
-
-function test_overall() {
- do_check_neq(MinimalIDService, null);
- run_next_test();
-}
-
-function test_mock_doc() {
- do_test_pending();
- let mockedDoc = mock_doc(null, TEST_URL, function(action, params) {
- do_check_eq(action, 'coffee');
- do_test_finished();
- run_next_test();
- });
-
- mockedDoc.doCoffee();
-}
-
-/*
- * Test that the "identity-controller-watch" signal is emitted correctly
- */
-function test_watch() {
- do_test_pending();
-
- let mockedDoc = mock_doc(null, TEST_URL);
- makeObserver("identity-controller-watch", function (aSubject, aTopic, aData) {
- do_check_eq(aSubject.wrappedJSObject.id, mockedDoc.id);
- do_check_eq(aSubject.wrappedJSObject.origin, TEST_URL);
- do_test_finished();
- run_next_test();
- });
-
- MinimalIDService.RP.watch(mockedDoc);
-}
-
-/*
- * Test that the "identity-controller-request" signal is emitted correctly
- */
-function test_request() {
- do_test_pending();
-
- let mockedDoc = mock_doc(null, TEST_URL);
- makeObserver("identity-controller-request", function (aSubject, aTopic, aData) {
- do_check_eq(aSubject.wrappedJSObject.id, mockedDoc.id);
- do_check_eq(aSubject.wrappedJSObject.origin, TEST_URL);
- do_test_finished();
- run_next_test();
- });
-
- MinimalIDService.RP.watch(mockedDoc);
- MinimalIDService.RP.request(mockedDoc.id, {});
-}
-
-/*
- * Test that the forceAuthentication flag can be sent
- */
-function test_request_forceAuthentication() {
- do_test_pending();
-
- let mockedDoc = mock_doc(null, TEST_URL);
- makeObserver("identity-controller-request", function (aSubject, aTopic, aData) {
- do_check_eq(aSubject.wrappedJSObject.id, mockedDoc.id);
- do_check_eq(aSubject.wrappedJSObject.origin, TEST_URL);
- do_check_eq(aSubject.wrappedJSObject.forceAuthentication, true);
- do_test_finished();
- run_next_test();
- });
-
- MinimalIDService.RP.watch(mockedDoc);
- MinimalIDService.RP.request(mockedDoc.id, {forceAuthentication: true});
-}
-
-/*
- * Test that the issuer can be forced
- */
-function test_request_forceIssuer() {
- do_test_pending();
-
- let mockedDoc = mock_doc(null, TEST_URL);
- makeObserver("identity-controller-request", function (aSubject, aTopic, aData) {
- do_check_eq(aSubject.wrappedJSObject.id, mockedDoc.id);
- do_check_eq(aSubject.wrappedJSObject.origin, TEST_URL);
- do_check_eq(aSubject.wrappedJSObject.issuer, "https://jed.gov");
- do_test_finished();
- run_next_test();
- });
-
- MinimalIDService.RP.watch(mockedDoc);
- MinimalIDService.RP.request(mockedDoc.id, {issuer: "https://jed.gov"});
-}
-
-/*
- * Test that the "identity-controller-logout" signal is emitted correctly
- */
-function test_logout() {
- do_test_pending();
-
- let mockedDoc = mock_doc(null, TEST_URL);
- makeObserver("identity-controller-logout", function (aSubject, aTopic, aData) {
- do_check_eq(aSubject.wrappedJSObject.id, mockedDoc.id);
- do_test_finished();
- run_next_test();
- });
-
- MinimalIDService.RP.watch(mockedDoc);
- MinimalIDService.RP.logout(mockedDoc.id, {});
-}
-
-/*
- * Test that logout() before watch() fails gently
- */
-
-function test_logoutBeforeWatch() {
- do_test_pending();
-
- let mockedDoc = mock_doc(null, TEST_URL);
- makeObserver("identity-controller-logout", function() {
- do_throw("How can we logout when watch was not called?");
- });
-
- MinimalIDService.RP.logout(mockedDoc.id, {});
- do_test_finished();
- run_next_test();
-}
-
-/*
- * Test that request() before watch() fails gently
- */
-
-function test_requestBeforeWatch() {
- do_test_pending();
-
- let mockedDoc = mock_doc(null, TEST_URL);
- makeObserver("identity-controller-request", function() {
- do_throw("How can we request when watch was not called?");
- });
-
- MinimalIDService.RP.request(mockedDoc.id, {});
- do_test_finished();
- run_next_test();
-}
-
-/*
- * Test that internal unwatch() before watch() fails gently
- */
-
-function test_unwatchBeforeWatch() {
- do_test_pending();
-
- let mockedDoc = mock_doc(null, TEST_URL);
-
- MinimalIDService.RP.unwatch(mockedDoc.id, {});
- do_test_finished();
- run_next_test();
-}
-
-/*
- * Test that the RP flow is cleaned up on child process shutdown
- */
-
-function test_childProcessShutdown() {
- do_test_pending();
- let UNIQUE_MESSAGE_MANAGER = "i am a beautiful snowflake";
- let initialRPCount = Object.keys(MinimalIDService.RP._rpFlows).length;
-
- let mockedDoc = mock_doc(null, TEST_URL, (action, params) => {
- if (action == "child-process-shutdown") {
- // since there's no actual dom window connection, we have to
- // do this bit manually here.
- MinimalIDService.RP.childProcessShutdown(UNIQUE_MESSAGE_MANAGER);
- }
- });
- mockedDoc._mm = UNIQUE_MESSAGE_MANAGER;
-
- makeObserver("identity-controller-watch", function (aSubject, aTopic, aData) {
- DOMIdentity._childProcessShutdown(UNIQUE_MESSAGE_MANAGER);
- });
-
- makeObserver("identity-child-process-shutdown", (aTopic, aSubject, aData) => {
- do_check_eq(Object.keys(MinimalIDService.RP._rpFlows).length, initialRPCount);
- do_test_finished();
- run_next_test();
- });
-
- // fake a dom window context
- DOMIdentity.newContext(mockedDoc, UNIQUE_MESSAGE_MANAGER);
-
- MinimalIDService.RP.watch(mockedDoc);
-}
-
-var TESTS = [
- test_overall,
- test_mock_doc,
- test_watch,
- test_request,
- test_request_forceAuthentication,
- test_request_forceIssuer,
- test_logout,
- test_logoutBeforeWatch,
- test_requestBeforeWatch,
- test_unwatchBeforeWatch,
- test_childProcessShutdown,
-];
-
-TESTS.forEach(add_test);
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/identity/tests/unit/test_observer_topics.js b/toolkit/identity/tests/unit/test_observer_topics.js
deleted file mode 100644
index 8e5a89c91a..0000000000
--- a/toolkit/identity/tests/unit/test_observer_topics.js
+++ /dev/null
@@ -1,114 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * By their nature, these tests duplicate some of the functionality of
- * other tests for Identity, RelyingParty, and IdentityProvider.
- *
- * In particular, "identity-auth-complete" and
- * "identity-login-state-changed" are tested in test_authentication.js
- */
-
-"use strict";
-
-XPCOMUtils.defineLazyModuleGetter(this, "IDService",
- "resource://gre/modules/identity/Identity.jsm",
- "IdentityService");
-
-function test_smoke() {
- do_check_neq(IDService, null);
- run_next_test();
-}
-
-function test_identity_request() {
- // In response to navigator.id.request(), initiate a login with user
- // interaction by notifying observers of 'identity-request'
-
- do_test_pending();
-
- IDService.reset();
-
- let id = "landru@mockmyid.com";
- setup_test_identity(id, TEST_CERT, function() {
- // deliberately adding a trailing final slash on the domain
- // to test path composition
- let mockedDoc = mock_doc(null, "http://jed.gov/", function() {});
-
- // by calling watch() we create an rp flow.
- IDService.RP.watch(mockedDoc);
-
- // register the request UX observer
- makeObserver("identity-request", function (aSubject, aTopic, aData) {
- do_check_eq(aTopic, "identity-request");
- do_check_eq(aData, null);
-
- // check that all the URLs are properly resolved
- let subj = aSubject.wrappedJSObject;
- do_check_eq(subj.privacyPolicy, "http://jed.gov/pp.html");
- do_check_eq(subj.termsOfService, "http://jed.gov/tos.html");
-
- do_test_finished();
- run_next_test();
- });
-
- let requestOptions = {
- privacyPolicy: "/pp.html",
- termsOfService: "/tos.html"
- };
- IDService.RP.request(mockedDoc.id, requestOptions);
- });
-
-}
-
-function test_identity_auth() {
- // see test_authentication.js for "identity-auth-complete"
- // and "identity-login-state-changed"
-
- do_test_pending();
- let _provId = "bogus";
-
- // Simulate what would be returned by IDService._fetchWellKnownFile
- // for a given domain.
- let idpParams = {
- domain: "myfavoriteflan.com",
- idpParams: {
- authentication: "/foo/authenticate.html",
- provisioning: "/foo/provision.html"
- }
- };
-
- // Create an RP flow
- let mockedDoc = mock_doc(null, TEST_URL, function(action, params) {});
- IDService.RP.watch(mockedDoc);
-
- // The identity-auth notification is sent up to the UX from the
- // _doAuthentication function. Be ready to receive it and call
- // beginAuthentication
- makeObserver("identity-auth", function (aSubject, aTopic, aData) {
- do_check_neq(aSubject, null);
- do_check_eq(aTopic, "identity-auth");
- do_check_eq(aData, "https://myfavoriteflan.com/foo/authenticate.html");
-
- do_check_eq(aSubject.wrappedJSObject.provId, _provId);
- do_test_finished();
- run_next_test();
- });
-
- // Even though our provisioning flow id is bogus, IdentityProvider
- // won't look at it until farther along in the authentication
- // process. So this test can pass with a fake provId.
- IDService.IDP._doAuthentication(_provId, idpParams);
-}
-
-var TESTS = [
- test_smoke,
- test_identity_request,
- test_identity_auth,
- ];
-
-
-TESTS.forEach(add_test);
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/identity/tests/unit/test_provisioning.js b/toolkit/identity/tests/unit/test_provisioning.js
deleted file mode 100644
index c05805befd..0000000000
--- a/toolkit/identity/tests/unit/test_provisioning.js
+++ /dev/null
@@ -1,242 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-Cu.import("resource://gre/modules/identity/IdentityProvider.jsm");
-
-function check_provision_flow_done(provId) {
- do_check_null(IdentityProvider._provisionFlows[provId]);
-}
-
-function test_begin_provisioning() {
- do_test_pending();
-
- setup_provisioning(
- TEST_USER,
- function(caller) {
- // call .beginProvisioning()
- IdentityProvider.beginProvisioning(caller);
- }, function() {},
- {
- beginProvisioningCallback: function(email, duration_s) {
- do_check_eq(email, TEST_USER);
- do_check_true(duration_s > 0);
- do_check_true(duration_s <= (24 * 3600));
-
- do_test_finished();
- run_next_test();
- }
- });
-}
-
-function test_raise_provisioning_failure() {
- do_test_pending();
- let _callerId = null;
-
- setup_provisioning(
- TEST_USER,
- function(caller) {
- // call .beginProvisioning()
- _callerId = caller.id;
- IdentityProvider.beginProvisioning(caller);
- }, function(err) {
- // this should be invoked with a populated error
- do_check_neq(err, null);
- do_check_true(err.indexOf("can't authenticate this email") > -1);
-
- do_test_finished();
- run_next_test();
- },
- {
- beginProvisioningCallback: function(email, duration_s) {
- // raise the failure as if we can't provision this email
- IdentityProvider.raiseProvisioningFailure(_callerId, "can't authenticate this email");
- }
- });
-}
-
-function test_genkeypair_before_begin_provisioning() {
- do_test_pending();
-
- setup_provisioning(
- TEST_USER,
- function(caller) {
- // call genKeyPair without beginProvisioning
- IdentityProvider.genKeyPair(caller.id);
- },
- // expect this to be called with an error
- function(err) {
- do_check_neq(err, null);
-
- do_test_finished();
- run_next_test();
- },
- {
- // this should not be called at all!
- genKeyPairCallback: function(pk) {
- // a test that will surely fail because we shouldn't be here.
- do_check_true(false);
-
- do_test_finished();
- run_next_test();
- }
- }
- );
-}
-
-function test_genkeypair() {
- do_test_pending();
- let _callerId = null;
-
- setup_provisioning(
- TEST_USER,
- function(caller) {
- _callerId = caller.id;
- IdentityProvider.beginProvisioning(caller);
- },
- function(err) {
- // should not be called!
- do_check_true(false);
-
- do_test_finished();
- run_next_test();
- },
- {
- beginProvisioningCallback: function(email, time_s) {
- IdentityProvider.genKeyPair(_callerId);
- },
- genKeyPairCallback: function(kp) {
- do_check_neq(kp, null);
-
- // yay!
- do_test_finished();
- run_next_test();
- }
- }
- );
-}
-
-// we've already ensured that genkeypair can't be called
-// before beginProvisioning, so this test should be enough
-// to ensure full sequential call of the 3 APIs.
-function test_register_certificate_before_genkeypair() {
- do_test_pending();
- let _callerID = null;
-
- setup_provisioning(
- TEST_USER,
- function(caller) {
- // do the right thing for beginProvisioning
- _callerID = caller.id;
- IdentityProvider.beginProvisioning(caller);
- },
- // expect this to be called with an error
- function(err) {
- do_check_neq(err, null);
-
- do_test_finished();
- run_next_test();
- },
- {
- beginProvisioningCallback: function(email, duration_s) {
- // now we try to register cert but no keygen has been done
- IdentityProvider.registerCertificate(_callerID, "fake-cert");
- }
- }
- );
-}
-
-function test_register_certificate() {
- do_test_pending();
- let _callerId = null;
-
- setup_provisioning(
- TEST_USER,
- function(caller) {
- _callerId = caller.id;
- IdentityProvider.beginProvisioning(caller);
- },
- function(err) {
- // we should be cool!
- do_check_null(err);
-
- // check that the cert is there
- let identity = get_idstore().fetchIdentity(TEST_USER);
- do_check_neq(identity, null);
- do_check_eq(identity.cert, "fake-cert-42");
-
- do_execute_soon(function check_done() {
- // cleanup will happen after the callback is called
- check_provision_flow_done(_callerId);
-
- do_test_finished();
- run_next_test();
- });
- },
- {
- beginProvisioningCallback: function(email, duration_s) {
- IdentityProvider.genKeyPair(_callerId);
- },
- genKeyPairCallback: function(pk) {
- IdentityProvider.registerCertificate(_callerId, "fake-cert-42");
- }
- }
- );
-}
-
-
-function test_get_assertion_after_provision() {
- do_test_pending();
- let _callerId = null;
-
- setup_provisioning(
- TEST_USER,
- function(caller) {
- _callerId = caller.id;
- IdentityProvider.beginProvisioning(caller);
- },
- function(err) {
- // we should be cool!
- do_check_null(err);
-
- // check that the cert is there
- let identity = get_idstore().fetchIdentity(TEST_USER);
- do_check_neq(identity, null);
- do_check_eq(identity.cert, "fake-cert-42");
-
- do_execute_soon(function check_done() {
- // cleanup will happen after the callback is called
- check_provision_flow_done(_callerId);
-
- do_test_finished();
- run_next_test();
- });
- },
- {
- beginProvisioningCallback: function(email, duration_s) {
- IdentityProvider.genKeyPair(_callerId);
- },
- genKeyPairCallback: function(pk) {
- IdentityProvider.registerCertificate(_callerId, "fake-cert-42");
- }
- }
- );
-
-}
-
-var TESTS = [];
-
-TESTS.push(test_begin_provisioning);
-TESTS.push(test_raise_provisioning_failure);
-TESTS.push(test_genkeypair_before_begin_provisioning);
-TESTS.push(test_genkeypair);
-TESTS.push(test_register_certificate_before_genkeypair);
-TESTS.push(test_register_certificate);
-TESTS.push(test_get_assertion_after_provision);
-
-TESTS.forEach(add_test);
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/identity/tests/unit/test_relying_party.js b/toolkit/identity/tests/unit/test_relying_party.js
deleted file mode 100644
index e78d227792..0000000000
--- a/toolkit/identity/tests/unit/test_relying_party.js
+++ /dev/null
@@ -1,255 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-XPCOMUtils.defineLazyModuleGetter(this, "RelyingParty",
- "resource://gre/modules/identity/RelyingParty.jsm");
-
-function resetState() {
- get_idstore().reset();
- RelyingParty.reset();
-}
-
-function test_watch_loggedin_ready() {
- do_test_pending();
-
- resetState();
-
- let id = TEST_USER;
- setup_test_identity(id, TEST_CERT, function() {
- let store = get_idstore();
-
- // set it up so we're supposed to be logged in to TEST_URL
- store.setLoginState(TEST_URL, true, id);
- RelyingParty.watch(mock_doc(id, TEST_URL, function(action, params) {
- do_check_eq(action, 'ready');
- do_check_eq(params, undefined);
-
- do_test_finished();
- run_next_test();
- }));
- });
-}
-
-function test_watch_loggedin_login() {
- do_test_pending();
-
- resetState();
-
- let id = TEST_USER;
- setup_test_identity(id, TEST_CERT, function() {
- let store = get_idstore();
-
- // set it up so we're supposed to be logged in to TEST_URL
- store.setLoginState(TEST_URL, true, id);
-
- // check for first a login() call, then a ready() call
- RelyingParty.watch(mock_doc(null, TEST_URL, call_sequentially(
- function(action, params) {
- do_check_eq(action, 'login');
- do_check_neq(params, null);
- },
- function(action, params) {
- do_check_eq(action, 'ready');
- do_check_null(params);
-
- do_test_finished();
- run_next_test();
- }
- )));
- });
-}
-
-function test_watch_loggedin_logout() {
- do_test_pending();
-
- resetState();
-
- let id = TEST_USER;
- let other_id = "otherid@foo.com";
- setup_test_identity(other_id, TEST_CERT, function() {
- setup_test_identity(id, TEST_CERT, function() {
- let store = get_idstore();
-
- // set it up so we're supposed to be logged in to TEST_URL
- // with id, not other_id
- store.setLoginState(TEST_URL, true, id);
-
- // this should cause a login with an assertion for id,
- // not for other_id
- RelyingParty.watch(mock_doc(other_id, TEST_URL, call_sequentially(
- function(action, params) {
- do_check_eq(action, 'login');
- do_check_neq(params, null);
- },
- function(action, params) {
- do_check_eq(action, 'ready');
- do_check_null(params);
-
- do_test_finished();
- run_next_test();
- }
- )));
- });
- });
-}
-
-function test_watch_notloggedin_ready() {
- do_test_pending();
-
- resetState();
-
- RelyingParty.watch(mock_doc(null, TEST_URL, function(action, params) {
- do_check_eq(action, 'ready');
- do_check_eq(params, undefined);
-
- do_test_finished();
- run_next_test();
- }));
-}
-
-function test_watch_notloggedin_logout() {
- do_test_pending();
-
- resetState();
-
- RelyingParty.watch(mock_doc(TEST_USER, TEST_URL, call_sequentially(
- function(action, params) {
- do_check_eq(action, 'logout');
- do_check_eq(params, undefined);
-
- let store = get_idstore();
- do_check_null(store.getLoginState(TEST_URL));
- },
- function(action, params) {
- do_check_eq(action, 'ready');
- do_check_eq(params, undefined);
- do_test_finished();
- run_next_test();
- }
- )));
-}
-
-function test_request() {
- do_test_pending();
-
- // set up a watch, to be consistent
- let mockedDoc = mock_doc(null, TEST_URL, function(action, params) {
- // this isn't going to be called for now
- // XXX but it is called - is that bad?
- });
-
- RelyingParty.watch(mockedDoc);
-
- // be ready for the UX identity-request notification
- makeObserver("identity-request", function (aSubject, aTopic, aData) {
- do_check_neq(aSubject, null);
-
- do_check_eq(aSubject.wrappedJSObject.rpId, mockedDoc.id);
-
- do_test_finished();
- run_next_test();
- });
-
- RelyingParty.request(mockedDoc.id, {});
-}
-
-/*
- * ensure the forceAuthentication param can be passed through
- */
-function test_request_forceAuthentication() {
- do_test_pending();
-
- let mockedDoc = mock_doc(null, TEST_URL, function(action, params) {});
-
- RelyingParty.watch(mockedDoc);
-
- makeObserver("identity-request", function(aSubject, aTopic, aData) {
- do_check_eq(aSubject.wrappedJSObject.rpId, mockedDoc.id);
- do_check_eq(aSubject.wrappedJSObject.forceAuthentication, true);
- do_test_finished();
- run_next_test();
- });
-
- RelyingParty.request(mockedDoc.id, {forceAuthentication: true});
-}
-
-/*
- * ensure the issuer can be forced
- */
-function test_request_forceIssuer() {
- do_test_pending();
-
- let mockedDoc = mock_doc(null, TEST_URL, function(action, params) {});
-
- RelyingParty.watch(mockedDoc);
-
- makeObserver("identity-request", function(aSubject, aTopic, aData) {
- do_check_eq(aSubject.wrappedJSObject.rpId, mockedDoc.id);
- do_check_eq(aSubject.wrappedJSObject.issuer, "https://ozten.co.uk");
- do_test_finished();
- run_next_test();
- });
-
- RelyingParty.request(mockedDoc.id, {issuer: "https://ozten.co.uk"});
-}
-function test_logout() {
- do_test_pending();
-
- resetState();
-
- let id = TEST_USER;
- setup_test_identity(id, TEST_CERT, function() {
- let store = get_idstore();
-
- // set it up so we're supposed to be logged in to TEST_URL
- store.setLoginState(TEST_URL, true, id);
-
- let doLogout;
- let mockedDoc = mock_doc(id, TEST_URL, call_sequentially(
- function(action, params) {
- do_check_eq(action, 'ready');
- do_check_eq(params, undefined);
-
- do_timeout(100, doLogout);
- },
- function(action, params) {
- do_check_eq(action, 'logout');
- do_check_eq(params, undefined);
- },
- function(action, params) {
- do_check_eq(action, 'ready');
- do_check_eq(params, undefined);
-
- do_test_finished();
- run_next_test();
- }));
-
- doLogout = function() {
- RelyingParty.logout(mockedDoc.id);
- do_check_false(store.getLoginState(TEST_URL).isLoggedIn);
- do_check_eq(store.getLoginState(TEST_URL).email, TEST_USER);
- };
-
- RelyingParty.watch(mockedDoc);
- });
-}
-
-var TESTS = [
- test_watch_loggedin_ready,
- test_watch_loggedin_login,
- test_watch_loggedin_logout,
- test_watch_notloggedin_ready,
- test_watch_notloggedin_logout,
- test_request,
- test_request_forceAuthentication,
- test_request_forceIssuer,
- test_logout,
-];
-
-TESTS.forEach(add_test);
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/identity/tests/unit/test_store.js b/toolkit/identity/tests/unit/test_store.js
deleted file mode 100644
index 1cd9cc4dd8..0000000000
--- a/toolkit/identity/tests/unit/test_store.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-XPCOMUtils.defineLazyModuleGetter(this, "IDService",
- "resource://gre/modules/identity/Identity.jsm",
- "IdentityService");
-
-function test_id_store() {
- // XXX - this is ugly, peaking in like this into IDService
- // probably should instantiate our own.
- var store = get_idstore();
-
- // try adding an identity
- store.addIdentity(TEST_USER, TEST_PRIVKEY, TEST_CERT);
- do_check_neq(store.getIdentities()[TEST_USER], null);
- do_check_eq(store.getIdentities()[TEST_USER].cert, TEST_CERT);
-
- // does fetch identity work?
- do_check_neq(store.fetchIdentity(TEST_USER), null);
- do_check_eq(store.fetchIdentity(TEST_USER).cert, TEST_CERT);
-
- // clear the cert should keep the identity but not the cert
- store.clearCert(TEST_USER);
- do_check_neq(store.getIdentities()[TEST_USER], null);
- do_check_null(store.getIdentities()[TEST_USER].cert);
-
- // remove it should remove everything
- store.removeIdentity(TEST_USER);
- do_check_eq(store.getIdentities()[TEST_USER], undefined);
-
- // act like we're logged in to TEST_URL
- store.setLoginState(TEST_URL, true, TEST_USER);
- do_check_neq(store.getLoginState(TEST_URL), null);
- do_check_true(store.getLoginState(TEST_URL).isLoggedIn);
- do_check_eq(store.getLoginState(TEST_URL).email, TEST_USER);
-
- // log out
- store.setLoginState(TEST_URL, false, TEST_USER);
- do_check_neq(store.getLoginState(TEST_URL), null);
- do_check_false(store.getLoginState(TEST_URL).isLoggedIn);
-
- // email is still set
- do_check_eq(store.getLoginState(TEST_URL).email, TEST_USER);
-
- // not logged into other site
- do_check_null(store.getLoginState(TEST_URL2));
-
- // clear login state
- store.clearLoginState(TEST_URL);
- do_check_null(store.getLoginState(TEST_URL));
- do_check_null(store.getLoginState(TEST_URL2));
-
- run_next_test();
-}
-
-var TESTS = [test_id_store, ];
-
-TESTS.forEach(add_test);
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/identity/tests/unit/test_well-known.js b/toolkit/identity/tests/unit/test_well-known.js
deleted file mode 100644
index 5e86f5ae48..0000000000
--- a/toolkit/identity/tests/unit/test_well-known.js
+++ /dev/null
@@ -1,90 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "IDService",
- "resource://gre/modules/identity/Identity.jsm",
- "IdentityService");
-
-const WELL_KNOWN_PATH = "/.well-known/browserid";
-
-var SERVER_PORT = 8080;
-
-// valid IDP
-function test_well_known_1() {
- do_test_pending();
-
- let server = new HttpServer();
- server.registerFile(WELL_KNOWN_PATH, do_get_file("data/idp_1" + WELL_KNOWN_PATH));
- server.start(SERVER_PORT);
- let hostPort = "localhost:" + SERVER_PORT;
-
- function check_well_known(aErr, aCallbackObj) {
- do_check_null(aErr);
- do_check_eq(aCallbackObj.domain, hostPort);
- let idpParams = aCallbackObj.idpParams;
- do_check_eq(idpParams['public-key'].algorithm, "RS");
- do_check_eq(idpParams.authentication, "/browserid/sign_in.html");
- do_check_eq(idpParams.provisioning, "/browserid/provision.html");
-
- do_test_finished();
- server.stop(run_next_test);
- }
-
- IDService._fetchWellKnownFile(hostPort, check_well_known, "http");
-}
-
-// valid domain, non-exixtent browserid file
-function test_well_known_404() {
- do_test_pending();
-
- let server = new HttpServer();
- // Don't register the well-known file
- // Change ports to avoid HTTP caching
- SERVER_PORT++;
- server.start(SERVER_PORT);
-
- let hostPort = "localhost:" + SERVER_PORT;
-
- function check_well_known_404(aErr, aCallbackObj) {
- do_check_eq("Error", aErr);
- do_check_eq(undefined, aCallbackObj);
- do_test_finished();
- server.stop(run_next_test);
- }
-
- IDService._fetchWellKnownFile(hostPort, check_well_known_404, "http");
-}
-
-// valid domain, invalid browserid file (no "provisioning" member)
-function test_well_known_invalid_1() {
- do_test_pending();
-
- let server = new HttpServer();
- server.registerFile(WELL_KNOWN_PATH, do_get_file("data/idp_invalid_1" + WELL_KNOWN_PATH));
- // Change ports to avoid HTTP caching
- SERVER_PORT++;
- server.start(SERVER_PORT);
-
- let hostPort = "localhost:" + SERVER_PORT;
-
- function check_well_known_invalid_1(aErr, aCallbackObj) {
- // check for an error message
- do_check_true(aErr && aErr.length > 0);
- do_check_eq(undefined, aCallbackObj);
- do_test_finished();
- server.stop(run_next_test);
- }
-
- IDService._fetchWellKnownFile(hostPort, check_well_known_invalid_1, "http");
-}
-
-var TESTS = [test_well_known_1, test_well_known_404, test_well_known_invalid_1];
-
-TESTS.forEach(add_test);
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/identity/tests/unit/xpcshell.ini b/toolkit/identity/tests/unit/xpcshell.ini
deleted file mode 100644
index 309e4791c9..0000000000
--- a/toolkit/identity/tests/unit/xpcshell.ini
+++ /dev/null
@@ -1,23 +0,0 @@
-[DEFAULT]
-head = head_identity.js
-tail = tail_identity.js
-skip-if = true
-support-files =
- data/idp_1/.well-known/browserid
- data/idp_invalid_1/.well-known/browserid
-
-# Test load modules first so syntax failures are caught early.
-[test_load_modules.js]
-[test_minimalidentity.js]
-
-[test_identity_utils.js]
-[test_log_utils.js]
-[test_authentication.js]
-[test_crypto_service.js]
-[test_identity.js]
-[test_jwcrypto.js]
-[test_observer_topics.js]
-[test_provisioning.js]
-[test_relying_party.js]
-[test_store.js]
-[test_well-known.js]
diff --git a/toolkit/library/libxul.mk b/toolkit/library/libxul.mk
index 80f934e60e..d09a3962fd 100644
--- a/toolkit/library/libxul.mk
+++ b/toolkit/library/libxul.mk
@@ -5,7 +5,6 @@
EXTRA_DEPS += $(topsrcdir)/toolkit/library/libxul.mk
ifeq (Linux,$(OS_ARCH))
-ifneq (Android,$(OS_TARGET))
OS_LDFLAGS += -Wl,-version-script,symverscript
symverscript: $(topsrcdir)/toolkit/library/symverscript.in
@@ -14,7 +13,6 @@ symverscript: $(topsrcdir)/toolkit/library/symverscript.in
EXTRA_DEPS += symverscript
endif
-endif
# Generate GDB pretty printer-autoload files on Linux and Solaris. OSX's GDB is
# too old to support Python pretty-printers; if this changes, we could make
diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build
index 3056799f0e..d9b1675475 100644
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
@@ -178,7 +178,7 @@ if CONFIG['OS_ARCH'] == 'WINNT':
'winspool',
]
-if CONFIG['OS_ARCH'] == 'Linux' and CONFIG['OS_TARGET'] != 'Android':
+if CONFIG['OS_ARCH'] == 'Linux':
OS_LIBS += [
'rt',
]
diff --git a/toolkit/locales/Makefile.in b/toolkit/locales/Makefile.in
index 198d9aaa87..585c70986a 100644
--- a/toolkit/locales/Makefile.in
+++ b/toolkit/locales/Makefile.in
@@ -29,6 +29,3 @@ chrome-%:
@$(MAKE) -C $(DEPTH)/security/manager/locales/ chrome AB_CD=$*
@$(MAKE) chrome AB_CD=$*
-libs:: update.locale
- sed -e 's/%AB_CD%/$(AB_CD)/' $< > $(FINAL_TARGET)/update.locale
-
diff --git a/toolkit/locales/jar.mn b/toolkit/locales/jar.mn
index ad93985f1e..5d9da52240 100644
--- a/toolkit/locales/jar.mn
+++ b/toolkit/locales/jar.mn
@@ -11,10 +11,8 @@
locale/@AB_CD@/global/aboutReader.properties (%chrome/global/aboutReader.properties)
locale/@AB_CD@/global/aboutRights.dtd (%chrome/global/aboutRights.dtd)
locale/@AB_CD@/global/aboutNetworking.dtd (%chrome/global/aboutNetworking.dtd)
-#ifndef ANDROID
locale/@AB_CD@/global/aboutProfiles.dtd (%chrome/global/aboutProfiles.dtd)
locale/@AB_CD@/global/aboutProfiles.properties (%chrome/global/aboutProfiles.properties)
-#endif
locale/@AB_CD@/global/aboutServiceWorkers.dtd (%chrome/global/aboutServiceWorkers.dtd)
locale/@AB_CD@/global/aboutServiceWorkers.properties (%chrome/global/aboutServiceWorkers.properties)
locale/@AB_CD@/global/aboutSupport.dtd (%chrome/global/aboutSupport.dtd)
diff --git a/toolkit/locales/update.locale b/toolkit/locales/update.locale
deleted file mode 100644
index 7c1f386ee0..0000000000
--- a/toolkit/locales/update.locale
+++ /dev/null
@@ -1 +0,0 @@
-%AB_CD%
diff --git a/toolkit/modules/ExtensionStorage.jsm b/toolkit/modules/ExtensionStorage.jsm
new file mode 100644
index 0000000000..0b0ffb0003
--- /dev/null
+++ b/toolkit/modules/ExtensionStorage.jsm
@@ -0,0 +1,241 @@
+/* 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/. */
+
+"use strict";
+
+this.EXPORTED_SYMBOLS = ["ExtensionStorage"];
+
+const Ci = Components.interfaces;
+const Cc = Components.classes;
+const Cu = Components.utils;
+const Cr = Components.results;
+
+Cu.import("resource://gre/modules/XPCOMUtils.jsm");
+Cu.import("resource://gre/modules/Services.jsm");
+XPCOMUtils.defineLazyModuleGetter(this, "OS",
+ "resource://gre/modules/osfile.jsm");
+XPCOMUtils.defineLazyModuleGetter(this, "AsyncShutdown",
+ "resource://gre/modules/AsyncShutdown.jsm");
+
+function jsonReplacer(key, value) {
+ switch (typeof(value)) {
+ // Serialize primitive types as-is.
+ case "string":
+ case "number":
+ case "boolean":
+ return value;
+
+ case "object":
+ if (value === null) {
+ return value;
+ }
+
+ switch (Cu.getClassName(value, true)) {
+ // Serialize arrays and ordinary objects as-is.
+ case "Array":
+ case "Object":
+ return value;
+
+ // Serialize Date objects and regular expressions as their
+ // string representations.
+ case "Date":
+ case "RegExp":
+ return String(value);
+ }
+ break;
+ }
+
+ if (!key) {
+ // If this is the root object, and we can't serialize it, serialize
+ // the value to an empty object.
+ return {};
+ }
+
+ // Everything else, omit entirely.
+ return undefined;
+}
+
+this.ExtensionStorage = {
+ cache: new Map(),
+ listeners: new Map(),
+
+ /**
+ * Sanitizes the given value, and returns a JSON-compatible
+ * representation of it, based on the privileges of the given global.
+ *
+ * @param {value} value
+ * The value to sanitize.
+ * @param {Context} context
+ * The extension context in which to sanitize the value
+ * @returns {value}
+ * The sanitized value.
+ */
+ sanitize(value, context) {
+ let json = context.jsonStringify(value, jsonReplacer);
+ return JSON.parse(json);
+ },
+
+ getExtensionDir(extensionId) {
+ return OS.Path.join(this.extensionDir, extensionId);
+ },
+
+ getStorageFile(extensionId) {
+ return OS.Path.join(this.extensionDir, extensionId, "storage.js");
+ },
+
+ read(extensionId) {
+ if (this.cache.has(extensionId)) {
+ return this.cache.get(extensionId);
+ }
+
+ let path = this.getStorageFile(extensionId);
+ let decoder = new TextDecoder();
+ let promise = OS.File.read(path);
+ promise = promise.then(array => {
+ return JSON.parse(decoder.decode(array));
+ }).catch((error) => {
+ if (!error.becauseNoSuchFile) {
+ Cu.reportError("Unable to parse JSON data for extension storage.");
+ }
+ return {};
+ });
+ this.cache.set(extensionId, promise);
+ return promise;
+ },
+
+ write(extensionId) {
+ let promise = this.read(extensionId).then(extData => {
+ let encoder = new TextEncoder();
+ let array = encoder.encode(JSON.stringify(extData));
+ let path = this.getStorageFile(extensionId);
+ OS.File.makeDir(this.getExtensionDir(extensionId), {
+ ignoreExisting: true,
+ from: OS.Constants.Path.profileDir,
+ });
+ let promise = OS.File.writeAtomic(path, array);
+ return promise;
+ }).catch(() => {
+ // Make sure this promise is never rejected.
+ Cu.reportError("Unable to write JSON data for extension storage.");
+ });
+
+ AsyncShutdown.profileBeforeChange.addBlocker(
+ "ExtensionStorage: Finish writing extension data",
+ promise);
+
+ return promise.then(() => {
+ AsyncShutdown.profileBeforeChange.removeBlocker(promise);
+ });
+ },
+
+ set(extensionId, items, context) {
+ return this.read(extensionId).then(extData => {
+ let changes = {};
+ for (let prop in items) {
+ let item = this.sanitize(items[prop], context);
+ changes[prop] = {oldValue: extData[prop], newValue: item};
+ extData[prop] = item;
+ }
+
+ this.notifyListeners(extensionId, changes);
+
+ return this.write(extensionId);
+ });
+ },
+
+ remove(extensionId, items) {
+ return this.read(extensionId).then(extData => {
+ let changes = {};
+ for (let prop of [].concat(items)) {
+ changes[prop] = {oldValue: extData[prop]};
+ delete extData[prop];
+ }
+
+ this.notifyListeners(extensionId, changes);
+
+ return this.write(extensionId);
+ });
+ },
+
+ clear(extensionId) {
+ return this.read(extensionId).then(extData => {
+ let changes = {};
+ for (let prop of Object.keys(extData)) {
+ changes[prop] = {oldValue: extData[prop]};
+ delete extData[prop];
+ }
+
+ this.notifyListeners(extensionId, changes);
+
+ return this.write(extensionId);
+ });
+ },
+
+ get(extensionId, keys) {
+ return this.read(extensionId).then(extData => {
+ let result = {};
+ if (keys === null) {
+ Object.assign(result, extData);
+ } else if (typeof(keys) == "object" && !Array.isArray(keys)) {
+ for (let prop in keys) {
+ if (prop in extData) {
+ result[prop] = extData[prop];
+ } else {
+ result[prop] = keys[prop];
+ }
+ }
+ } else {
+ for (let prop of [].concat(keys)) {
+ if (prop in extData) {
+ result[prop] = extData[prop];
+ }
+ }
+ }
+
+ return result;
+ });
+ },
+
+ addOnChangedListener(extensionId, listener) {
+ let listeners = this.listeners.get(extensionId) || new Set();
+ listeners.add(listener);
+ this.listeners.set(extensionId, listeners);
+ },
+
+ removeOnChangedListener(extensionId, listener) {
+ let listeners = this.listeners.get(extensionId);
+ listeners.delete(listener);
+ },
+
+ notifyListeners(extensionId, changes) {
+ let listeners = this.listeners.get(extensionId);
+ if (listeners) {
+ for (let listener of listeners) {
+ listener(changes);
+ }
+ }
+ },
+
+ init() {
+ if (Services.appinfo.processType != Services.appinfo.PROCESS_TYPE_DEFAULT) {
+ return;
+ }
+ Services.obs.addObserver(this, "extension-invalidate-storage-cache", false);
+ Services.obs.addObserver(this, "xpcom-shutdown", false);
+ },
+
+ observe(subject, topic, data) {
+ if (topic == "xpcom-shutdown") {
+ Services.obs.removeObserver(this, "extension-invalidate-storage-cache");
+ Services.obs.removeObserver(this, "xpcom-shutdown");
+ } else if (topic == "extension-invalidate-storage-cache") {
+ this.cache.clear();
+ }
+ },
+};
+
+XPCOMUtils.defineLazyGetter(ExtensionStorage, "extensionDir",
+ () => OS.Path.join(OS.Constants.Path.profileDir, "browser-extension-data"));
+
+ExtensionStorage.init();
diff --git a/toolkit/modules/Services.jsm b/toolkit/modules/Services.jsm
index 9b5082efd4..09e5df077c 100644
--- a/toolkit/modules/Services.jsm
+++ b/toolkit/modules/Services.jsm
@@ -51,9 +51,6 @@ XPCOMUtils.defineLazyGetter(Services, "ppmm", () => {
});
var initTable = [
-#ifdef MOZ_WIDGET_ANDROID
- ["androidBridge", "@mozilla.org/android/bridge;1", "nsIAndroidBridge"],
-#endif
["appShell", "@mozilla.org/appshell/appShellService;1", "nsIAppShellService"],
["cache", "@mozilla.org/network/cache-service;1", "nsICacheService"],
["cache2", "@mozilla.org/netwerk/cache-storage-service;1", "nsICacheStorageService"],
diff --git a/toolkit/modules/UpdateUtils.jsm b/toolkit/modules/UpdateUtils.jsm
index a84125be5d..5acf395d3d 100644
--- a/toolkit/modules/UpdateUtils.jsm
+++ b/toolkit/modules/UpdateUtils.jsm
@@ -13,168 +13,86 @@ const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/NetUtil.jsm");
-Cu.import("resource://gre/modules/Preferences.jsm");
+#ifdef XP_WIN
Cu.import("resource://gre/modules/ctypes.jsm");
+Cu.import("resource://gre/modules/WindowsRegistry.jsm");
-const FILE_UPDATE_LOCALE = "update.locale";
+const WINREG_HKLM = Ci.nsIWindowsRegKey.ROOT_KEY_LOCAL_MACHINE;
+const WINREG_WINNT = "Software\\Microsoft\\Windows NT\\CurrentVersion";
+#endif
const PREF_APP_DISTRIBUTION = "distribution.id";
const PREF_APP_DISTRIBUTION_VERSION = "distribution.version";
-const PREF_APP_B2G_VERSION = "b2g.version";
+const PREF_APP_UPDATE_CHANNEL = "app.update.channel";
const PREF_APP_UPDATE_CUSTOM = "app.update.custom";
const PREF_APP_UPDATE_IMEI_HASH = "app.update.imei_hash";
-
+const PREF_LOCALE = "general.useragent.locale";
this.UpdateUtils = {
- /**
- * Read the update channel from defaults only. We do this to ensure that
- * the channel is tightly coupled with the application and does not apply
- * to other instances of the application that may use the same profile.
- *
- * @param [optional] aIncludePartners
- * Whether or not to include the partner bits. Default: true.
- */
- getUpdateChannel(aIncludePartners = true) {
- let defaults = Services.prefs.getDefaultBranch(null);
-#expand let channel = defaults.getCharPref("app.update.channel", "__MOZ_UPDATE_CHANNEL__");
-
- if (aIncludePartners) {
- try {
- let partners = Services.prefs.getChildList("app.partner.").sort();
- if (partners.length) {
- channel += "-cck";
- partners.forEach(function (prefName) {
- channel += "-" + Services.prefs.getCharPref(prefName);
- });
- }
- } catch (e) {
- Cu.reportError(e);
- }
- }
-
- return channel;
+ get UpdateChannel() {
+ return Services.prefs.getDefaultBranch(null)
+ .getCharPref(PREF_APP_UPDATE_CHANNEL, "@MOZ_UPDATE_CHANNEL@");
},
- get UpdateChannel() {
- return this.getUpdateChannel();
+ get Locale() {
+ return Services.prefs.getDefaultBranch(null)
+ .getCharPref(PREF_LOCALE, "en-US");
},
/**
* Formats a URL by replacing %...% values with OS, build and locale specific
* values.
*
- * @param url
+ * @param aUpdateURL
* The URL to format.
+ * @param aAdditionalSubsts
* @return The formatted URL.
*/
- formatUpdateURL(url) {
- url = url.replace(/%ID%/g, Services.appinfo.ID);
- url = url.replace(/%PRODUCT%/g, Services.appinfo.name);
- url = url.replace(/%VERSION%/g, Services.appinfo.version);
- url = url.replace(/%BUILD_ID%/g, Services.appinfo.appBuildID);
- url = url.replace(/%BUILD_TARGET%/g, Services.appinfo.OS + "_" + this.ABI);
- url = url.replace(/%BUILD_SPECIAL%/g, "@MOZ_PKG_SPECIAL@");
- url = url.replace(/%OS_VERSION%/g, this.OSVersion);
- url = url.replace(/%WIDGET_TOOLKIT%/g, "@MOZ_WIDGET_TOOLKIT@");
- url = url.replace(/%CHANNEL%/g, this.UpdateChannel);
-
- if (/%LOCALE%/.test(url)) {
- url = url.replace(/%LOCALE%/g, this.Locale);
+ formatUpdateURL: function(aUpdateURL, aAdditionalSubsts = null) {
+ // We want to be able to accept additional substs but also to have them be able to
+ // override the default ones below
+ if (aAdditionalSubsts) {
+ try {
+ aAdditionalSubsts.forEach(([_subst, _value]) => aUpdateURL = aUpdateURL.replace(_subst, _value));
+ } catch(ex) {
+ Cu.reportError(ex);
+ }
}
- url = url.replace(/%CUSTOM%/g, Preferences.get(PREF_APP_UPDATE_CUSTOM, ""));
- url = url.replace(/\+/g, "%2B");
-
- url = url.replace(/%SYSTEM_CAPABILITIES%/g, gSystemCapabilities);
- url = url.replace(/%PLATFORM_VERSION%/g, Services.appinfo.platformVersion);
- url = url.replace(/%DISTRIBUTION%/g,
- getDistributionPrefValue(PREF_APP_DISTRIBUTION));
- url = url.replace(/%DISTRIBUTION_VERSION%/g,
- getDistributionPrefValue(PREF_APP_DISTRIBUTION_VERSION));
-
- return url;
+ // appName SHOULD be lower case and not contain spaces even if it has in the past
+ let appName = Services.appinfo.name.replace(/\s+/g, '').toLowerCase()
+
+ // We want default pref values if they exist
+ let prefBranch = Services.prefs.getDefaultBranch(null)
+ let custom = prefBranch.getCharPref(PREF_APP_UPDATE_CUSTOM, "");
+ let distribution = prefBranch.getCharPref(PREF_APP_DISTRIBUTION, "default");
+ let distributionVersion = prefBranch.getCharPref(PREF_APP_DISTRIBUTION_VERSION, "default");
+
+ let substs = [
+ [/%ID%/g, Services.appinfo.ID],
+ [/%PRODUCT%/g, appName],
+ [/%VERSION%/g, Services.appinfo.version],
+ [/%BUILD_ID%/g, Services.appinfo.appBuildID],
+ [/%BUILD_TARGET%/g, Services.appinfo.OS + "_" + this.ABI],
+ [/%BUILD_SPECIAL%/g, "@MOZ_PKG_SPECIAL@"],
+ [/%OS_VERSION%/g, this.OSVersion],
+ [/%WIDGET_TOOLKIT%/g, "@MOZ_WIDGET_TOOLKIT@"],
+ [/%CHANNEL%/g, this.UpdateChannel],
+ [/%CUSTOM%/g, custom],
+ [/%PLATFORM_VERSION%/g, Services.appinfo.platformVersion],
+ [/%DISTRIBUTION%/g, distribution],
+ [/%DISTRIBUTION_VERSION%/g, distributionVersion],
+ [/%LOCALE%/g, this.Locale]
+ ];
+
+ substs.forEach(([_subst, _value]) => aUpdateURL = aUpdateURL.replace(_subst, _value));
+
+ // We do this last to make sure all pluses are converted
+ aUpdateURL = aUpdateURL.replace(/\+/g, "%2B");
+
+ return aUpdateURL;
}
};
-/* Get the distribution pref values, from defaults only */
-function getDistributionPrefValue(aPrefName) {
- return prefValue = Services.prefs.getDefaultBranch(null).getCharPref(aPrefName, "default");
-}
-
-/**
- * Gets the locale from the update.locale file for replacing %LOCALE% in the
- * update url. The update.locale file can be located in the application
- * directory or the GRE directory with preference given to it being located in
- * the application directory.
- */
-XPCOMUtils.defineLazyGetter(UpdateUtils, "Locale", function() {
- let channel;
- let locale;
- for (let res of ['app', 'gre']) {
- channel = NetUtil.newChannel({
- uri: "resource://" + res + "/" + FILE_UPDATE_LOCALE,
- contentPolicyType: Ci.nsIContentPolicy.TYPE_INTERNAL_XMLHTTPREQUEST,
- loadUsingSystemPrincipal: true
- });
- try {
- let inputStream = channel.open2();
- locale = NetUtil.readInputStreamToString(inputStream, inputStream.available());
- } catch (e) {}
- if (locale)
- return locale.trim();
- }
-
- Cu.reportError(FILE_UPDATE_LOCALE + " file doesn't exist in either the " +
- "application or GRE directories");
-
- return null;
-});
-
-/**
- * Provides adhoc system capability information for application update.
- */
-XPCOMUtils.defineLazyGetter(this, "gSystemCapabilities", function aus_gSC() {
-#ifdef XP_WIN
- const PF_MMX_INSTRUCTIONS_AVAILABLE = 3; // MMX
- const PF_XMMI_INSTRUCTIONS_AVAILABLE = 6; // SSE
- const PF_XMMI64_INSTRUCTIONS_AVAILABLE = 10; // SSE2
- const PF_SSE3_INSTRUCTIONS_AVAILABLE = 13; // SSE3
-
- let lib = ctypes.open("kernel32.dll");
- let IsProcessorFeaturePresent = lib.declare("IsProcessorFeaturePresent",
- ctypes.winapi_abi,
- ctypes.int32_t, /* success */
- ctypes.uint32_t); /* DWORD */
- let instructionSet = "unknown";
- try {
- if (IsProcessorFeaturePresent(PF_SSE3_INSTRUCTIONS_AVAILABLE)) {
- instructionSet = "SSE3";
- } else if (IsProcessorFeaturePresent(PF_XMMI64_INSTRUCTIONS_AVAILABLE)) {
- instructionSet = "SSE2";
- } else if (IsProcessorFeaturePresent(PF_XMMI_INSTRUCTIONS_AVAILABLE)) {
- instructionSet = "SSE";
- } else if (IsProcessorFeaturePresent(PF_MMX_INSTRUCTIONS_AVAILABLE)) {
- instructionSet = "MMX";
- }
- } catch (e) {
- instructionSet = "error";
- Cu.reportError("Error getting processor instruction set. " +
- "Exception: " + e);
- }
-
- lib.close();
- return instructionSet;
-#elifdef XP_LINUX
- let instructionSet = "unknown";
- if (navigator.cpuHasSSE2) {
- instructionSet = "SSE2";
- }
- return instructionSet;
-#else
- return "NA"
-#endif
-});
-
#ifdef XP_WIN
/* Windows only getter that returns the processor architecture. */
XPCOMUtils.defineLazyGetter(this, "gWinCPUArch", function aus_gWinCPUArch() {
@@ -188,24 +106,24 @@ XPCOMUtils.defineLazyGetter(this, "gWinCPUArch", function aus_gWinCPUArch() {
// http://msdn.microsoft.com/en-us/library/ms724958%28v=vs.85%29.aspx
const SYSTEM_INFO = new ctypes.StructType('SYSTEM_INFO',
[
- {wProcessorArchitecture: WORD},
- {wReserved: WORD},
- {dwPageSize: DWORD},
- {lpMinimumApplicationAddress: ctypes.voidptr_t},
- {lpMaximumApplicationAddress: ctypes.voidptr_t},
- {dwActiveProcessorMask: DWORD.ptr},
- {dwNumberOfProcessors: DWORD},
- {dwProcessorType: DWORD},
- {dwAllocationGranularity: DWORD},
- {wProcessorLevel: WORD},
- {wProcessorRevision: WORD}
+ {wProcessorArchitecture: WORD},
+ {wReserved: WORD},
+ {dwPageSize: DWORD},
+ {lpMinimumApplicationAddress: ctypes.voidptr_t},
+ {lpMaximumApplicationAddress: ctypes.voidptr_t},
+ {dwActiveProcessorMask: DWORD.ptr},
+ {dwNumberOfProcessors: DWORD},
+ {dwProcessorType: DWORD},
+ {dwAllocationGranularity: DWORD},
+ {wProcessorLevel: WORD},
+ {wProcessorRevision: WORD}
]);
let kernel32 = false;
try {
kernel32 = ctypes.open("Kernel32");
- } catch (e) {
- Cu.reportError("Unable to open kernel32! Exception: " + e);
+ } catch (ex) {
+ Cu.reportError("Unable to open kernel32! Exception: " + ex);
}
if (kernel32) {
@@ -230,9 +148,9 @@ XPCOMUtils.defineLazyGetter(this, "gWinCPUArch", function aus_gWinCPUArch() {
arch = "x86";
break;
}
- } catch (e) {
+ } catch (ex) {
Cu.reportError("Error getting processor architecture. " +
- "Exception: " + e);
+ "Exception: " + ex);
} finally {
kernel32.close();
}
@@ -246,8 +164,7 @@ XPCOMUtils.defineLazyGetter(UpdateUtils, "ABI", function() {
let abi = null;
try {
abi = Services.appinfo.XPCOMABI;
- }
- catch (e) {
+ } catch (ex) {
Cu.reportError("XPCOM ABI unknown");
}
@@ -270,101 +187,34 @@ XPCOMUtils.defineLazyGetter(UpdateUtils, "OSVersion", function() {
try {
osVersion = Services.sysinfo.getProperty("name") + " " +
Services.sysinfo.getProperty("version");
- }
- catch (e) {
+ } catch(ex) {
Cu.reportError("OS Version unknown.");
}
#ifdef XP_WIN
if (osVersion) {
- const BYTE = ctypes.uint8_t;
- const WORD = ctypes.uint16_t;
- const DWORD = ctypes.uint32_t;
- const WCHAR = ctypes.char16_t;
- const BOOL = ctypes.int;
-
- // This structure is described at:
- // http://msdn.microsoft.com/en-us/library/ms724833%28v=vs.85%29.aspx
- const SZCSDVERSIONLENGTH = 128;
- const OSVERSIONINFOEXW = new ctypes.StructType('OSVERSIONINFOEXW',
- [
- {dwOSVersionInfoSize: DWORD},
- {dwMajorVersion: DWORD},
- {dwMinorVersion: DWORD},
- {dwBuildNumber: DWORD},
- {dwPlatformId: DWORD},
- {szCSDVersion: ctypes.ArrayType(WCHAR, SZCSDVERSIONLENGTH)},
- {wServicePackMajor: WORD},
- {wServicePackMinor: WORD},
- {wSuiteMask: WORD},
- {wProductType: BYTE},
- {wReserved: BYTE}
- ]);
-
- // This structure is described at:
- // http://msdn.microsoft.com/en-us/library/ms724958%28v=vs.85%29.aspx
- const SYSTEM_INFO = new ctypes.StructType('SYSTEM_INFO',
- [
- {wProcessorArchitecture: WORD},
- {wReserved: WORD},
- {dwPageSize: DWORD},
- {lpMinimumApplicationAddress: ctypes.voidptr_t},
- {lpMaximumApplicationAddress: ctypes.voidptr_t},
- {dwActiveProcessorMask: DWORD.ptr},
- {dwNumberOfProcessors: DWORD},
- {dwProcessorType: DWORD},
- {dwAllocationGranularity: DWORD},
- {wProcessorLevel: WORD},
- {wProcessorRevision: WORD}
- ]);
-
- let kernel32 = false;
- try {
- kernel32 = ctypes.open("Kernel32");
- } catch (e) {
- Cu.reportError("Unable to open kernel32! " + e);
- osVersion += ".unknown (unknown)";
+ let currentBuild = WindowsRegistry.readRegKey(WINREG_HKLM, WINREG_WINNT, "CurrentBuild");
+ let CSDBuildNumber = WindowsRegistry.readRegKey(WINREG_HKLM, WINREG_WINNT, "CSDBuildNumber");
+
+ if (!CSDBuildNumber) {
+ CSDBuildNumber = "0";
}
- if (kernel32) {
- try {
- // Get Service pack info
- try {
- let GetVersionEx = kernel32.declare("GetVersionExW",
- ctypes.default_abi,
- BOOL,
- OSVERSIONINFOEXW.ptr);
- let winVer = OSVERSIONINFOEXW();
- winVer.dwOSVersionInfoSize = OSVERSIONINFOEXW.size;
-
- if (0 !== GetVersionEx(winVer.address())) {
- osVersion += "." + winVer.wServicePackMajor +
- "." + winVer.wServicePackMinor;
- } else {
- Cu.reportError("Unknown failure in GetVersionEX (returned 0)");
- osVersion += ".unknown";
- }
- } catch (e) {
- Cu.reportError("Error getting service pack information. Exception: " + e);
- osVersion += ".unknown";
- }
- } finally {
- kernel32.close();
- }
+ osVersion = osVersion.replace(/Windows_NT/g, "WINNT");
+ osVersion += "." + currentBuild + "." + CSDBuildNumber
- // Add processor architecture
- osVersion += " (" + gWinCPUArch + ")";
- }
+ // Add processor architecture
+ osVersion += " (" + gWinCPUArch + ")";
}
+#endif
try {
osVersion += " (" + Services.sysinfo.getProperty("secondaryLibrary") + ")";
- }
- catch (e) {
+ } catch(ex) {
// Not all platforms have a secondary widget library, so an error is nothing to worry about.
}
+
osVersion = encodeURIComponent(osVersion);
-#endif
return osVersion;
});
diff --git a/toolkit/modules/moz.build b/toolkit/modules/moz.build
index c9d3fc7a01..edcaea9c0b 100644
--- a/toolkit/modules/moz.build
+++ b/toolkit/modules/moz.build
@@ -4,17 +4,6 @@
# 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/.
-XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell/xpcshell.ini']
-BROWSER_CHROME_MANIFESTS += ['tests/browser/browser.ini']
-MOCHITEST_MANIFESTS += ['tests/mochitest/mochitest.ini']
-MOCHITEST_CHROME_MANIFESTS += ['tests/chrome/chrome.ini']
-
-TESTING_JS_MODULES += [
- 'tests/MockDocument.jsm',
- 'tests/PromiseTestUtils.jsm',
- 'tests/xpcshell/TestIntegration.jsm',
-]
-
SPHINX_TREES['toolkit_modules'] = 'docs'
EXTRA_JS_MODULES += [
@@ -22,7 +11,6 @@ EXTRA_JS_MODULES += [
'addons/WebNavigation.jsm',
'addons/WebNavigationContent.js',
'addons/WebNavigationFrames.jsm',
- 'addons/WebRequest.jsm',
'addons/WebRequestCommon.jsm',
'addons/WebRequestContent.js',
'addons/WebRequestUpload.jsm',
@@ -40,6 +28,7 @@ EXTRA_JS_MODULES += [
'debug.js',
'DeferredTask.jsm',
'Deprecated.jsm',
+ 'ExtensionStorage.jsm',
'FileUtils.jsm',
'Finder.jsm',
'FinderHighlighter.jsm',
@@ -95,6 +84,7 @@ EXTRA_JS_MODULES.third_party.jsesc += ['third_party/jsesc/jsesc.js']
EXTRA_JS_MODULES.sessionstore += ['sessionstore/Utils.jsm']
EXTRA_PP_JS_MODULES += [
+ 'addons/WebRequest.jsm',
'NewTabUtils.jsm',
'ResetProfile.jsm',
'Troubleshoot.jsm',
@@ -116,16 +106,14 @@ EXTRA_PP_JS_MODULES += [
'Services.jsm',
]
-if 'Android' != CONFIG['OS_TARGET']:
- EXTRA_PP_JS_MODULES += [
- 'LightweightThemeConsumer.jsm',
- ]
- DIRS += [
- 'subprocess',
- ]
-else:
- DEFINES['ANDROID'] = True
+EXTRA_PP_JS_MODULES += [
+ 'LightweightThemeConsumer.jsm',
+]
+
+DIRS += [
+ 'subprocess',
+]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
diff --git a/toolkit/modules/subprocess/moz.build b/toolkit/modules/subprocess/moz.build
index c4548c8f6c..e9c6e11981 100644
--- a/toolkit/modules/subprocess/moz.build
+++ b/toolkit/modules/subprocess/moz.build
@@ -4,9 +4,7 @@
# 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/.
-EXTRA_PP_JS_MODULES += [
- 'Subprocess.jsm',
-]
+EXTRA_PP_JS_MODULES += ['Subprocess.jsm']
EXTRA_JS_MODULES.subprocess += [
'subprocess_common.jsm',
@@ -27,6 +25,4 @@ else:
'subprocess_worker_unix.js',
]
-XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell/xpcshell.ini']
-
SPHINX_TREES['toolkit_modules/subprocess'] = ['docs']
diff --git a/toolkit/modules/subprocess/test/xpcshell/.eslintrc.js b/toolkit/modules/subprocess/test/xpcshell/.eslintrc.js
deleted file mode 100644
index fc63a79b75..0000000000
--- a/toolkit/modules/subprocess/test/xpcshell/.eslintrc.js
+++ /dev/null
@@ -1,5 +0,0 @@
-"use strict";
-
-module.exports = { // eslint-disable-line no-undef
- "extends": "../../../../../testing/xpcshell/xpcshell.eslintrc.js",
-};
diff --git a/toolkit/modules/subprocess/test/xpcshell/data_test_script.py b/toolkit/modules/subprocess/test/xpcshell/data_test_script.py
deleted file mode 100644
index 035d8ac569..0000000000
--- a/toolkit/modules/subprocess/test/xpcshell/data_test_script.py
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/env python2
-from __future__ import print_function
-
-import os
-import signal
-import struct
-import sys
-
-
-def output(line):
- sys.stdout.write(struct.pack('@I', len(line)))
- sys.stdout.write(line)
- sys.stdout.flush()
-
-
-def echo_loop():
- while True:
- line = sys.stdin.readline()
- if not line:
- break
-
- output(line)
-
-
-if sys.platform == "win32":
- import msvcrt
- msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)
-
-
-cmd = sys.argv[1]
-if cmd == 'echo':
- echo_loop()
-elif cmd == 'exit':
- sys.exit(int(sys.argv[2]))
-elif cmd == 'env':
- for var in sys.argv[2:]:
- output(os.environ.get(var, ''))
-elif cmd == 'pwd':
- output(os.path.abspath(os.curdir))
-elif cmd == 'print_args':
- for arg in sys.argv[2:]:
- output(arg)
-elif cmd == 'ignore_sigterm':
- signal.signal(signal.SIGTERM, signal.SIG_IGN)
-
- output('Ready')
- while True:
- try:
- signal.pause()
- except AttributeError:
- import time
- time.sleep(3600)
-elif cmd == 'print':
- sys.stdout.write(sys.argv[2])
- sys.stderr.write(sys.argv[3])
diff --git a/toolkit/modules/subprocess/test/xpcshell/data_text_file.txt b/toolkit/modules/subprocess/test/xpcshell/data_text_file.txt
deleted file mode 100644
index e69de29bb2..0000000000
--- a/toolkit/modules/subprocess/test/xpcshell/data_text_file.txt
+++ /dev/null
diff --git a/toolkit/modules/subprocess/test/xpcshell/head.js b/toolkit/modules/subprocess/test/xpcshell/head.js
deleted file mode 100644
index b3175d08a0..0000000000
--- a/toolkit/modules/subprocess/test/xpcshell/head.js
+++ /dev/null
@@ -1,14 +0,0 @@
-"use strict";
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
- "resource://gre/modules/AppConstants.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "OS",
- "resource://gre/modules/osfile.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Services",
- "resource://gre/modules/Services.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Subprocess",
- "resource://gre/modules/Subprocess.jsm");
diff --git a/toolkit/modules/subprocess/test/xpcshell/test_subprocess.js b/toolkit/modules/subprocess/test/xpcshell/test_subprocess.js
deleted file mode 100644
index 1b8e02820b..0000000000
--- a/toolkit/modules/subprocess/test/xpcshell/test_subprocess.js
+++ /dev/null
@@ -1,769 +0,0 @@
-"use strict";
-
-Cu.import("resource://gre/modules/AppConstants.jsm");
-Cu.import("resource://gre/modules/Task.jsm");
-Cu.import("resource://gre/modules/Timer.jsm");
-
-
-const env = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment);
-
-const MAX_ROUND_TRIP_TIME_MS = AppConstants.DEBUG || AppConstants.ASAN ? 18 : 9;
-const MAX_RETRIES = 5;
-
-let PYTHON;
-let PYTHON_BIN;
-let PYTHON_DIR;
-
-const TEST_SCRIPT = do_get_file("data_test_script.py").path;
-
-let read = pipe => {
- return pipe.readUint32().then(count => {
- return pipe.readString(count);
- });
-};
-
-
-let readAll = Task.async(function* (pipe) {
- let result = [];
- let string;
- while ((string = yield pipe.readString())) {
- result.push(string);
- }
-
- return result.join("");
-});
-
-
-add_task(function* setup() {
- PYTHON = yield Subprocess.pathSearch(env.get("PYTHON"));
-
- PYTHON_BIN = OS.Path.basename(PYTHON);
- PYTHON_DIR = OS.Path.dirname(PYTHON);
-});
-
-
-add_task(function* test_subprocess_io() {
- let proc = yield Subprocess.call({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "echo"],
- });
-
- Assert.throws(() => { proc.stdout.read(-1); },
- /non-negative integer/);
- Assert.throws(() => { proc.stdout.read(1.1); },
- /non-negative integer/);
-
- Assert.throws(() => { proc.stdout.read(Infinity); },
- /non-negative integer/);
- Assert.throws(() => { proc.stdout.read(NaN); },
- /non-negative integer/);
-
- Assert.throws(() => { proc.stdout.readString(-1); },
- /non-negative integer/);
- Assert.throws(() => { proc.stdout.readString(1.1); },
- /non-negative integer/);
-
- Assert.throws(() => { proc.stdout.readJSON(-1); },
- /positive integer/);
- Assert.throws(() => { proc.stdout.readJSON(0); },
- /positive integer/);
- Assert.throws(() => { proc.stdout.readJSON(1.1); },
- /positive integer/);
-
-
- const LINE1 = "I'm a leaf on the wind.\n";
- const LINE2 = "Watch how I soar.\n";
-
-
- let outputPromise = read(proc.stdout);
-
- yield new Promise(resolve => setTimeout(resolve, 100));
-
- let [output] = yield Promise.all([
- outputPromise,
- proc.stdin.write(LINE1),
- ]);
-
- equal(output, LINE1, "Got expected output");
-
-
- // Make sure it succeeds whether the write comes before or after the
- // read.
- let inputPromise = proc.stdin.write(LINE2);
-
- yield new Promise(resolve => setTimeout(resolve, 100));
-
- [output] = yield Promise.all([
- read(proc.stdout),
- inputPromise,
- ]);
-
- equal(output, LINE2, "Got expected output");
-
-
- let JSON_BLOB = {foo: {bar: "baz"}};
-
- inputPromise = proc.stdin.write(JSON.stringify(JSON_BLOB) + "\n");
-
- output = yield proc.stdout.readUint32().then(count => {
- return proc.stdout.readJSON(count);
- });
-
- Assert.deepEqual(output, JSON_BLOB, "Got expected JSON output");
-
-
- yield proc.stdin.close();
-
- let {exitCode} = yield proc.wait();
-
- equal(exitCode, 0, "Got expected exit code");
-});
-
-
-add_task(function* test_subprocess_large_io() {
- let proc = yield Subprocess.call({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "echo"],
- });
-
- const LINE = "I'm a leaf on the wind.\n";
- const BUFFER_SIZE = 4096;
-
- // Create a message that's ~3/4 the input buffer size.
- let msg = Array(BUFFER_SIZE * .75 / 16 | 0).fill("0123456789abcdef").join("") + "\n";
-
- // This sequence of writes and reads crosses several buffer size
- // boundaries, and causes some branches of the read buffer code to be
- // exercised which are not exercised by other tests.
- proc.stdin.write(msg);
- proc.stdin.write(msg);
- proc.stdin.write(LINE);
-
- let output = yield read(proc.stdout);
- equal(output, msg, "Got the expected output");
-
- output = yield read(proc.stdout);
- equal(output, msg, "Got the expected output");
-
- output = yield read(proc.stdout);
- equal(output, LINE, "Got the expected output");
-
- proc.stdin.close();
-
-
- let {exitCode} = yield proc.wait();
-
- equal(exitCode, 0, "Got expected exit code");
-});
-
-
-add_task(function* test_subprocess_huge() {
- let proc = yield Subprocess.call({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "echo"],
- });
-
- // This should be large enough to fill most pipe input/output buffers.
- const MESSAGE_SIZE = 1024 * 16;
-
- let msg = Array(MESSAGE_SIZE).fill("0123456789abcdef").join("") + "\n";
-
- proc.stdin.write(msg);
-
- let output = yield read(proc.stdout);
- equal(output, msg, "Got the expected output");
-
- proc.stdin.close();
-
-
- let {exitCode} = yield proc.wait();
-
- equal(exitCode, 0, "Got expected exit code");
-});
-
-
-add_task(function* test_subprocess_round_trip_perf() {
- let roundTripTime = Infinity;
- for (let i = 0; i < MAX_RETRIES && roundTripTime > MAX_ROUND_TRIP_TIME_MS; i++) {
- let proc = yield Subprocess.call({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "echo"],
- });
-
-
- const LINE = "I'm a leaf on the wind.\n";
-
- let now = Date.now();
- const COUNT = 1000;
- for (let j = 0; j < COUNT; j++) {
- let [output] = yield Promise.all([
- read(proc.stdout),
- proc.stdin.write(LINE),
- ]);
-
- // We don't want to log this for every iteration, but we still need
- // to fail if it goes wrong.
- if (output !== LINE) {
- equal(output, LINE, "Got expected output");
- }
- }
-
- roundTripTime = (Date.now() - now) / COUNT;
-
- yield proc.stdin.close();
-
- let {exitCode} = yield proc.wait();
-
- equal(exitCode, 0, "Got expected exit code");
- }
-
- ok(roundTripTime <= MAX_ROUND_TRIP_TIME_MS,
- `Expected round trip time (${roundTripTime}ms) to be less than ${MAX_ROUND_TRIP_TIME_MS}ms`);
-});
-
-
-add_task(function* test_subprocess_stderr_default() {
- const LINE1 = "I'm a leaf on the wind.\n";
- const LINE2 = "Watch how I soar.\n";
-
- let proc = yield Subprocess.call({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "print", LINE1, LINE2],
- });
-
- equal(proc.stderr, undefined, "There should be no stderr pipe by default");
-
- let stdout = yield readAll(proc.stdout);
-
- equal(stdout, LINE1, "Got the expected stdout output");
-
-
- let {exitCode} = yield proc.wait();
-
- equal(exitCode, 0, "Got expected exit code");
-});
-
-
-add_task(function* test_subprocess_stderr_pipe() {
- const LINE1 = "I'm a leaf on the wind.\n";
- const LINE2 = "Watch how I soar.\n";
-
- let proc = yield Subprocess.call({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "print", LINE1, LINE2],
- stderr: "pipe",
- });
-
- let [stdout, stderr] = yield Promise.all([
- readAll(proc.stdout),
- readAll(proc.stderr),
- ]);
-
- equal(stdout, LINE1, "Got the expected stdout output");
- equal(stderr, LINE2, "Got the expected stderr output");
-
-
- let {exitCode} = yield proc.wait();
-
- equal(exitCode, 0, "Got expected exit code");
-});
-
-
-add_task(function* test_subprocess_stderr_merged() {
- const LINE1 = "I'm a leaf on the wind.\n";
- const LINE2 = "Watch how I soar.\n";
-
- let proc = yield Subprocess.call({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "print", LINE1, LINE2],
- stderr: "stdout",
- });
-
- equal(proc.stderr, undefined, "There should be no stderr pipe by default");
-
- let stdout = yield readAll(proc.stdout);
-
- equal(stdout, LINE1 + LINE2, "Got the expected merged stdout output");
-
-
- let {exitCode} = yield proc.wait();
-
- equal(exitCode, 0, "Got expected exit code");
-});
-
-
-add_task(function* test_subprocess_read_after_exit() {
- const LINE1 = "I'm a leaf on the wind.\n";
- const LINE2 = "Watch how I soar.\n";
-
- let proc = yield Subprocess.call({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "print", LINE1, LINE2],
- stderr: "pipe",
- });
-
-
- let {exitCode} = yield proc.wait();
- equal(exitCode, 0, "Process exited with expected code");
-
-
- let [stdout, stderr] = yield Promise.all([
- readAll(proc.stdout),
- readAll(proc.stderr),
- ]);
-
- equal(stdout, LINE1, "Got the expected stdout output");
- equal(stderr, LINE2, "Got the expected stderr output");
-});
-
-
-add_task(function* test_subprocess_lazy_close_output() {
- let proc = yield Subprocess.call({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "echo"],
- });
-
- const LINE1 = "I'm a leaf on the wind.\n";
- const LINE2 = "Watch how I soar.\n";
-
- let writePromises = [
- proc.stdin.write(LINE1),
- proc.stdin.write(LINE2),
- ];
- let closedPromise = proc.stdin.close();
-
-
- let output1 = yield read(proc.stdout);
- let output2 = yield read(proc.stdout);
-
- yield Promise.all([...writePromises, closedPromise]);
-
- equal(output1, LINE1, "Got expected output");
- equal(output2, LINE2, "Got expected output");
-
-
- let {exitCode} = yield proc.wait();
-
- equal(exitCode, 0, "Got expected exit code");
-});
-
-
-add_task(function* test_subprocess_lazy_close_input() {
- let proc = yield Subprocess.call({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "echo"],
- });
-
- let readPromise = proc.stdout.readUint32();
- let closedPromise = proc.stdout.close();
-
-
- const LINE = "I'm a leaf on the wind.\n";
-
- proc.stdin.write(LINE);
- proc.stdin.close();
-
- let len = yield readPromise;
- equal(len, LINE.length);
-
- yield closedPromise;
-
-
- // Don't test for a successful exit here. The process may exit with a
- // write error if we close the pipe after it's written the message
- // size but before it's written the message.
- yield proc.wait();
-});
-
-
-add_task(function* test_subprocess_force_close() {
- let proc = yield Subprocess.call({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "echo"],
- });
-
- let readPromise = proc.stdout.readUint32();
- let closedPromise = proc.stdout.close(true);
-
- yield Assert.rejects(
- readPromise,
- function(e) {
- equal(e.errorCode, Subprocess.ERROR_END_OF_FILE,
- "Got the expected error code");
- return /File closed/.test(e.message);
- },
- "Promise should be rejected when file is closed");
-
- yield closedPromise;
- yield proc.stdin.close();
-
-
- let {exitCode} = yield proc.wait();
-
- equal(exitCode, 0, "Got expected exit code");
-});
-
-
-add_task(function* test_subprocess_eof() {
- let proc = yield Subprocess.call({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "echo"],
- });
-
- let readPromise = proc.stdout.readUint32();
-
- yield proc.stdin.close();
-
- yield Assert.rejects(
- readPromise,
- function(e) {
- equal(e.errorCode, Subprocess.ERROR_END_OF_FILE,
- "Got the expected error code");
- return /File closed/.test(e.message);
- },
- "Promise should be rejected on EOF");
-
- let {exitCode} = yield proc.wait();
-
- equal(exitCode, 0, "Got expected exit code");
-});
-
-
-add_task(function* test_subprocess_invalid_json() {
- let proc = yield Subprocess.call({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "echo"],
- });
-
- const LINE = "I'm a leaf on the wind.\n";
-
- proc.stdin.write(LINE);
- proc.stdin.close();
-
- let count = yield proc.stdout.readUint32();
- let readPromise = proc.stdout.readJSON(count);
-
- yield Assert.rejects(
- readPromise,
- function(e) {
- equal(e.errorCode, Subprocess.ERROR_INVALID_JSON,
- "Got the expected error code");
- return /SyntaxError/.test(e);
- },
- "Promise should be rejected on EOF");
-
- let {exitCode} = yield proc.wait();
-
- equal(exitCode, 0, "Got expected exit code");
-});
-
-
-if (AppConstants.isPlatformAndVersionAtLeast("win", "6")) {
- add_task(function* test_subprocess_inherited_descriptors() {
- let {ctypes, libc, win32} = Cu.import("resource://gre/modules/subprocess/subprocess_win.jsm");
-
- let secAttr = new win32.SECURITY_ATTRIBUTES();
- secAttr.nLength = win32.SECURITY_ATTRIBUTES.size;
- secAttr.bInheritHandle = true;
-
- let handles = win32.createPipe(secAttr, 0);
-
-
- let proc = yield Subprocess.call({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "echo"],
- });
-
-
- // Close the output end of the pipe.
- // Ours should be the only copy, so reads should fail after this.
- handles[1].dispose();
-
- let buffer = new ArrayBuffer(1);
- let succeeded = libc.ReadFile(handles[0], buffer, buffer.byteLength,
- null, null);
-
- ok(!succeeded, "ReadFile should fail on broken pipe");
- equal(ctypes.winLastError, win32.ERROR_BROKEN_PIPE, "Read should fail with ERROR_BROKEN_PIPE");
-
-
- proc.stdin.close();
-
- let {exitCode} = yield proc.wait();
-
- equal(exitCode, 0, "Got expected exit code");
- });
-}
-
-
-add_task(function* test_subprocess_wait() {
- let proc = yield Subprocess.call({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "exit", "42"],
- });
-
- let {exitCode} = yield proc.wait();
-
- equal(exitCode, 42, "Got expected exit code");
-});
-
-
-add_task(function* test_subprocess_pathSearch() {
- let promise = Subprocess.call({
- command: PYTHON_BIN,
- arguments: ["-u", TEST_SCRIPT, "exit", "13"],
- environment: {
- PATH: PYTHON_DIR,
- },
- });
-
- yield Assert.rejects(
- promise,
- function(error) {
- return error.errorCode == Subprocess.ERROR_BAD_EXECUTABLE;
- },
- "Subprocess.call should fail for a bad executable");
-});
-
-
-add_task(function* test_subprocess_workdir() {
- let procDir = yield OS.File.getCurrentDirectory();
- let tmpDirFile = Components.classes["@mozilla.org/file/local;1"]
- .createInstance(Components.interfaces.nsILocalFile);
- tmpDirFile.initWithPath(OS.Constants.Path.tmpDir);
- tmpDirFile.normalize();
- let tmpDir = tmpDirFile.path;
-
- notEqual(procDir, tmpDir,
- "Current process directory must not be the current temp directory");
-
- function* pwd(options) {
- let proc = yield Subprocess.call(Object.assign({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "pwd"],
- }, options));
-
- let pwdOutput = read(proc.stdout);
-
- let {exitCode} = yield proc.wait();
- equal(exitCode, 0, "Got expected exit code");
-
- return pwdOutput;
- }
-
- let dir = yield pwd({});
- equal(dir, procDir, "Process should normally launch in current process directory");
-
- dir = yield pwd({workdir: tmpDir});
- equal(dir, tmpDir, "Process should launch in the directory specified in `workdir`");
-
- dir = yield OS.File.getCurrentDirectory();
- equal(dir, procDir, "`workdir` should not change the working directory of the current process");
-});
-
-
-add_task(function* test_subprocess_term() {
- let proc = yield Subprocess.call({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "echo"],
- });
-
- // Windows does not support killing processes gracefully, so they will
- // always exit with -9 there.
- let retVal = AppConstants.platform == "win" ? -9 : -15;
-
- // Kill gracefully with the default timeout of 300ms.
- let {exitCode} = yield proc.kill();
-
- equal(exitCode, retVal, "Got expected exit code");
-
- ({exitCode} = yield proc.wait());
-
- equal(exitCode, retVal, "Got expected exit code");
-});
-
-
-add_task(function* test_subprocess_kill() {
- let proc = yield Subprocess.call({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "echo"],
- });
-
- // Force kill with no gracefull termination timeout.
- let {exitCode} = yield proc.kill(0);
-
- equal(exitCode, -9, "Got expected exit code");
-
- ({exitCode} = yield proc.wait());
-
- equal(exitCode, -9, "Got expected exit code");
-});
-
-
-add_task(function* test_subprocess_kill_timeout() {
- let proc = yield Subprocess.call({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "ignore_sigterm"],
- });
-
- // Wait for the process to set up its signal handler and tell us it's
- // ready.
- let msg = yield read(proc.stdout);
- equal(msg, "Ready", "Process is ready");
-
- // Kill gracefully with the default timeout of 300ms.
- // Expect a force kill after 300ms, since the process traps SIGTERM.
- const TIMEOUT = 300;
- let startTime = Date.now();
-
- let {exitCode} = yield proc.kill(TIMEOUT);
-
- // Graceful termination is not supported on Windows, so don't bother
- // testing the timeout there.
- if (AppConstants.platform != "win") {
- let diff = Date.now() - startTime;
- ok(diff >= TIMEOUT, `Process was killed after ${diff}ms (expected ~${TIMEOUT}ms)`);
- }
-
- equal(exitCode, -9, "Got expected exit code");
-
- ({exitCode} = yield proc.wait());
-
- equal(exitCode, -9, "Got expected exit code");
-});
-
-
-add_task(function* test_subprocess_arguments() {
- let args = [
- String.raw`C:\Program Files\Company\Program.exe`,
- String.raw`\\NETWORK SHARE\Foo Directory${"\\"}`,
- String.raw`foo bar baz`,
- String.raw`"foo bar baz"`,
- String.raw`foo " bar`,
- String.raw`Thing \" with "" "\" \\\" \\\\" quotes\\" \\`,
- ];
-
- let proc = yield Subprocess.call({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "print_args", ...args],
- });
-
- for (let [i, arg] of args.entries()) {
- let val = yield read(proc.stdout);
- equal(val, arg, `Got correct value for args[${i}]`);
- }
-
- let {exitCode} = yield proc.wait();
-
- equal(exitCode, 0, "Got expected exit code");
-});
-
-
-// Windows XP can't handle launching Python with a partial environment.
-if (!AppConstants.isPlatformAndVersionAtMost("win", "5.2")) {
- add_task(function* test_subprocess_environment() {
- let proc = yield Subprocess.call({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "env", "PATH", "FOO"],
- environment: {
- FOO: "BAR",
- },
- });
-
- let path = yield read(proc.stdout);
- let foo = yield read(proc.stdout);
-
- equal(path, "", "Got expected $PATH value");
- equal(foo, "BAR", "Got expected $FOO value");
-
- let {exitCode} = yield proc.wait();
-
- equal(exitCode, 0, "Got expected exit code");
- });
-}
-
-
-add_task(function* test_subprocess_environmentAppend() {
- let proc = yield Subprocess.call({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "env", "PATH", "FOO"],
- environmentAppend: true,
- environment: {
- FOO: "BAR",
- },
- });
-
- let path = yield read(proc.stdout);
- let foo = yield read(proc.stdout);
-
- equal(path, env.get("PATH"), "Got expected $PATH value");
- equal(foo, "BAR", "Got expected $FOO value");
-
- let {exitCode} = yield proc.wait();
-
- equal(exitCode, 0, "Got expected exit code");
-
- proc = yield Subprocess.call({
- command: PYTHON,
- arguments: ["-u", TEST_SCRIPT, "env", "PATH", "FOO"],
- environmentAppend: true,
- });
-
- path = yield read(proc.stdout);
- foo = yield read(proc.stdout);
-
- equal(path, env.get("PATH"), "Got expected $PATH value");
- equal(foo, "", "Got expected $FOO value");
-
- ({exitCode} = yield proc.wait());
-
- equal(exitCode, 0, "Got expected exit code");
-});
-
-
-add_task(function* test_bad_executable() {
- // Test with a non-executable file.
-
- let textFile = do_get_file("data_text_file.txt").path;
-
- let promise = Subprocess.call({
- command: textFile,
- arguments: [],
- });
-
- yield Assert.rejects(
- promise,
- function(error) {
- if (AppConstants.platform == "win") {
- return /Failed to create process/.test(error.message);
- }
- return error.errorCode == Subprocess.ERROR_BAD_EXECUTABLE;
- },
- "Subprocess.call should fail for a bad executable");
-
- // Test with a nonexistent file.
- promise = Subprocess.call({
- command: textFile + ".doesNotExist",
- arguments: [],
- });
-
- yield Assert.rejects(
- promise,
- function(error) {
- return error.errorCode == Subprocess.ERROR_BAD_EXECUTABLE;
- },
- "Subprocess.call should fail for a bad executable");
-});
-
-
-add_task(function* test_cleanup() {
- let {SubprocessImpl} = Cu.import("resource://gre/modules/Subprocess.jsm");
-
- let worker = SubprocessImpl.Process.getWorker();
-
- let openFiles = yield worker.call("getOpenFiles", []);
- let processes = yield worker.call("getProcesses", []);
-
- equal(openFiles.size, 0, "No remaining open files");
- equal(processes.size, 0, "No remaining processes");
-});
diff --git a/toolkit/modules/subprocess/test/xpcshell/test_subprocess_getEnvironment.js b/toolkit/modules/subprocess/test/xpcshell/test_subprocess_getEnvironment.js
deleted file mode 100644
index 4606aec04e..0000000000
--- a/toolkit/modules/subprocess/test/xpcshell/test_subprocess_getEnvironment.js
+++ /dev/null
@@ -1,17 +0,0 @@
-"use strict";
-
-let env = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment);
-
-add_task(function* test_getEnvironment() {
- env.set("FOO", "BAR");
-
- let environment = Subprocess.getEnvironment();
-
- equal(environment.FOO, "BAR");
- equal(environment.PATH, env.get("PATH"));
-
- env.set("FOO", null);
-
- environment = Subprocess.getEnvironment();
- equal(environment.FOO || "", "");
-});
diff --git a/toolkit/modules/subprocess/test/xpcshell/test_subprocess_pathSearch.js b/toolkit/modules/subprocess/test/xpcshell/test_subprocess_pathSearch.js
deleted file mode 100644
index 5eb4cd412d..0000000000
--- a/toolkit/modules/subprocess/test/xpcshell/test_subprocess_pathSearch.js
+++ /dev/null
@@ -1,73 +0,0 @@
-"use strict";
-
-let envService = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment);
-
-const PYTHON = envService.get("PYTHON");
-
-const PYTHON_BIN = OS.Path.basename(PYTHON);
-const PYTHON_DIR = OS.Path.dirname(PYTHON);
-
-const DOES_NOT_EXIST = OS.Path.join(OS.Constants.Path.tmpDir,
- "ThisPathDoesNotExist");
-
-const PATH_SEP = AppConstants.platform == "win" ? ";" : ":";
-
-
-add_task(function* test_pathSearchAbsolute() {
- let env = {};
-
- let path = yield Subprocess.pathSearch(PYTHON, env);
- equal(path, PYTHON, "Full path resolves even with no PATH.");
-
- env.PATH = "";
- path = yield Subprocess.pathSearch(PYTHON, env);
- equal(path, PYTHON, "Full path resolves even with empty PATH.");
-
- yield Assert.rejects(
- Subprocess.pathSearch(DOES_NOT_EXIST, env),
- function(e) {
- equal(e.errorCode, Subprocess.ERROR_BAD_EXECUTABLE,
- "Got the expected error code");
- return /File at path .* does not exist, or is not (executable|a normal file)/.test(e.message);
- },
- "Absolute path should throw for a nonexistent execuable");
-});
-
-
-add_task(function* test_pathSearchRelative() {
- let env = {};
-
- yield Assert.rejects(
- Subprocess.pathSearch(PYTHON_BIN, env),
- function(e) {
- equal(e.errorCode, Subprocess.ERROR_BAD_EXECUTABLE,
- "Got the expected error code");
- return /Executable not found:/.test(e.message);
- },
- "Relative path should not be found when PATH is missing");
-
- env.PATH = [DOES_NOT_EXIST, PYTHON_DIR].join(PATH_SEP);
-
- let path = yield Subprocess.pathSearch(PYTHON_BIN, env);
- equal(path, PYTHON, "Correct executable should be found in the path");
-});
-
-
-add_task({
- skip_if: () => AppConstants.platform != "win",
-}, function* test_pathSearch_PATHEXT() {
- ok(PYTHON_BIN.endsWith(".exe"), "Python executable must end with .exe");
-
- const python_bin = PYTHON_BIN.slice(0, -4);
-
- let env = {
- PATH: PYTHON_DIR,
- PATHEXT: [".com", ".exe", ".foobar"].join(";"),
- };
-
- let path = yield Subprocess.pathSearch(python_bin, env);
- equal(path, PYTHON, "Correct executable should be found in the path, with guessed extension");
-});
-// IMPORTANT: Do not add any tests beyond this point without removing
-// the `skip_if` condition from the previous task, or it will prevent
-// all succeeding tasks from running when it does not match.
diff --git a/toolkit/modules/subprocess/test/xpcshell/xpcshell.ini b/toolkit/modules/subprocess/test/xpcshell/xpcshell.ini
deleted file mode 100644
index 7b7d49a73c..0000000000
--- a/toolkit/modules/subprocess/test/xpcshell/xpcshell.ini
+++ /dev/null
@@ -1,14 +0,0 @@
-[DEFAULT]
-head = head.js
-tail =
-firefox-appdir = browser
-skip-if = os == 'android'
-subprocess = true
-support-files =
- data_text_file.txt
- data_test_script.py
-
-[test_subprocess.js]
-skip-if = os == 'win' # Path issues due to venv changes on the test machines
-[test_subprocess_getEnvironment.js]
-[test_subprocess_pathSearch.js]
diff --git a/toolkit/modules/tests/MockDocument.jsm b/toolkit/modules/tests/MockDocument.jsm
deleted file mode 100644
index 3cae9bb910..0000000000
--- a/toolkit/modules/tests/MockDocument.jsm
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Provides infrastructure for tests that would require mock document.
- */
-
-"use strict";
-
-this.EXPORTED_SYMBOLS = ["MockDocument"]
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-Cu.importGlobalProperties(["URL"]);
-
-const MockDocument = {
- /**
- * Create a document for the given URL containing the given HTML with the ownerDocument of all <form>s having a mocked location.
- */
- createTestDocument(aDocumentURL, aContent = "<form>", aType = "text/html") {
- let parser = Cc["@mozilla.org/xmlextras/domparser;1"].
- createInstance(Ci.nsIDOMParser);
- parser.init();
- let parsedDoc = parser.parseFromString(aContent, aType);
-
- for (let element of parsedDoc.forms) {
- this.mockOwnerDocumentProperty(element, parsedDoc, aDocumentURL);
- }
- return parsedDoc;
- },
-
- mockOwnerDocumentProperty(aElement, aDoc, aURL) {
- // Mock the document.location object so we can unit test without a frame. We use a proxy
- // instead of just assigning to the property since it's not configurable or writable.
- let document = new Proxy(aDoc, {
- get(target, property, receiver) {
- // document.location is normally null when a document is outside of a "browsing context".
- // See https://html.spec.whatwg.org/#the-location-interface
- if (property == "location") {
- return new URL(aURL);
- }
- return target[property];
- },
- });
-
- // Assign element.ownerDocument to the proxy so document.location works.
- Object.defineProperty(aElement, "ownerDocument", {
- value: document,
- });
- },
-
-};
-
diff --git a/toolkit/modules/tests/PromiseTestUtils.jsm b/toolkit/modules/tests/PromiseTestUtils.jsm
deleted file mode 100644
index d60b785a58..0000000000
--- a/toolkit/modules/tests/PromiseTestUtils.jsm
+++ /dev/null
@@ -1,241 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Detects and reports unhandled rejections during test runs. Test harnesses
- * will fail tests in this case, unless the test whitelists itself.
- */
-
-"use strict";
-
-this.EXPORTED_SYMBOLS = [
- "PromiseTestUtils",
-];
-
-const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
-
-Cu.import("resource://gre/modules/Services.jsm", this);
-
-// Keep "JSMPromise" separate so "Promise" still refers to DOM Promises.
-let JSMPromise = Cu.import("resource://gre/modules/Promise.jsm", {}).Promise;
-
-// For now, we need test harnesses to provide a reference to Assert.jsm.
-let Assert = null;
-
-this.PromiseTestUtils = {
- /**
- * Array of objects containing the details of the Promise rejections that are
- * currently left uncaught. This includes DOM Promise and Promise.jsm. When
- * rejections in DOM Promises are consumed, they are removed from this list.
- *
- * The objects contain at least the following properties:
- * {
- * message: The error message associated with the rejection, if any.
- * date: Date object indicating when the rejection was observed.
- * id: For DOM Promise only, the Promise ID from PromiseDebugging. This is
- * only used for tracking and should not be checked by the callers.
- * stack: nsIStackFrame, SavedFrame, or string indicating the stack at the
- * time the rejection was triggered. May also be null if the
- * rejection was triggered while a script was on the stack.
- * }
- */
- _rejections: [],
-
- /**
- * When an uncaught rejection is detected, it is ignored if one of the
- * functions in this array returns true when called with the rejection details
- * as its only argument. When a function matches an expected rejection, it is
- * then removed from the array.
- */
- _rejectionIgnoreFns: [],
-
- /**
- * Called only by the test infrastructure, registers the rejection observers.
- *
- * This should be called only once, and a matching "uninit" call must be made
- * or the tests will crash on shutdown.
- */
- init() {
- if (this._initialized) {
- Cu.reportError("This object was already initialized.");
- return;
- }
-
- PromiseDebugging.addUncaughtRejectionObserver(this);
-
- // Promise.jsm rejections are only reported to this observer when requested,
- // so we don't have to store a key to remove them when consumed.
- JSMPromise.Debugging.addUncaughtErrorObserver(
- rejection => this._rejections.push(rejection));
-
- this._initialized = true;
- },
- _initialized: false,
-
- /**
- * Called only by the test infrastructure, unregisters the observers.
- */
- uninit() {
- if (!this._initialized) {
- return;
- }
-
- PromiseDebugging.removeUncaughtRejectionObserver(this);
- JSMPromise.Debugging.clearUncaughtErrorObservers();
-
- this._initialized = false;
- },
-
- /**
- * Called only by the test infrastructure, spins the event loop until the
- * messages for pending DOM Promise rejections have been processed.
- */
- ensureDOMPromiseRejectionsProcessed() {
- let observed = false;
- let observer = {
- onLeftUncaught: promise => {
- if (PromiseDebugging.getState(promise).reason ===
- this._ensureDOMPromiseRejectionsProcessedReason) {
- observed = true;
- }
- },
- onConsumed() {},
- };
-
- PromiseDebugging.addUncaughtRejectionObserver(observer);
- Promise.reject(this._ensureDOMPromiseRejectionsProcessedReason);
- while (!observed) {
- Services.tm.mainThread.processNextEvent(true);
- }
- PromiseDebugging.removeUncaughtRejectionObserver(observer);
- },
- _ensureDOMPromiseRejectionsProcessedReason: {},
-
- /**
- * Called only by the tests for PromiseDebugging.addUncaughtRejectionObserver
- * and for JSMPromise.Debugging, disables the observers in this module.
- */
- disableUncaughtRejectionObserverForSelfTest() {
- this.uninit();
- },
-
- /**
- * Called by tests that have been whitelisted, disables the observers in this
- * module. For new tests where uncaught rejections are expected, you should
- * use the more granular expectUncaughtRejection function instead.
- */
- thisTestLeaksUncaughtRejectionsAndShouldBeFixed() {
- this.uninit();
- },
-
- /**
- * Sets or updates the Assert object instance to be used for error reporting.
- */
- set Assert(assert) {
- Assert = assert;
- },
-
- // UncaughtRejectionObserver
- onLeftUncaught(promise) {
- let message = "(Unable to convert rejection reason to string.)";
- try {
- let reason = PromiseDebugging.getState(promise).reason;
- if (reason === this._ensureDOMPromiseRejectionsProcessedReason) {
- // Ignore the special promise for ensureDOMPromiseRejectionsProcessed.
- return;
- }
- message = reason.message || ("" + reason);
- } catch (ex) {}
-
- // It's important that we don't store any reference to the provided Promise
- // object or its value after this function returns in order to avoid leaks.
- this._rejections.push({
- id: PromiseDebugging.getPromiseID(promise),
- message,
- date: new Date(),
- stack: PromiseDebugging.getRejectionStack(promise),
- });
- },
-
- // UncaughtRejectionObserver
- onConsumed(promise) {
- // We don't expect that many unhandled rejections will appear at the same
- // time, so the algorithm doesn't need to be optimized for that case.
- let id = PromiseDebugging.getPromiseID(promise);
- let index = this._rejections.findIndex(rejection => rejection.id == id);
- // If we get a consumption notification for a rejection that was left
- // uncaught before this module was initialized, we can safely ignore it.
- if (index != -1) {
- this._rejections.splice(index, 1);
- }
- },
-
- /**
- * Informs the test suite that the test code will generate a Promise rejection
- * that will still be unhandled when the test file terminates.
- *
- * This method must be called once for each instance of Promise that is
- * expected to be uncaught, even if the rejection reason is the same for each
- * instance.
- *
- * If the expected rejection does not occur, the test will fail.
- *
- * @param regExpOrCheckFn
- * This can either be a regular expression that should match the error
- * message of the rejection, or a check function that is invoked with
- * the rejection details object as its first argument.
- */
- expectUncaughtRejection(regExpOrCheckFn) {
- let checkFn = !("test" in regExpOrCheckFn) ? regExpOrCheckFn :
- rejection => regExpOrCheckFn.test(rejection.message);
- this._rejectionIgnoreFns.push(checkFn);
- },
-
- /**
- * Fails the test if there are any uncaught rejections at this time that have
- * not been whitelisted using expectUncaughtRejection.
- *
- * Depending on the configuration of the test suite, this function might only
- * report the details of the first uncaught rejection that was generated.
- *
- * This is called by the test suite at the end of each test function.
- */
- assertNoUncaughtRejections() {
- // Ask Promise.jsm to report all uncaught rejections to the observer now.
- JSMPromise.Debugging.flushUncaughtErrors();
-
- // If there is any uncaught rejection left at this point, the test fails.
- while (this._rejections.length > 0) {
- let rejection = this._rejections.shift();
-
- // If one of the ignore functions matches, ignore the rejection, then
- // remove the function so that each function only matches one rejection.
- let index = this._rejectionIgnoreFns.findIndex(f => f(rejection));
- if (index != -1) {
- this._rejectionIgnoreFns.splice(index, 1);
- continue;
- }
-
- // Report the error. This operation can throw an exception, depending on
- // the configuration of the test suite that handles the assertion.
- Assert.ok(false,
- `A promise chain failed to handle a rejection:` +
- ` ${rejection.message} - rejection date: ${rejection.date}`+
- ` - stack: ${rejection.stack}`);
- }
- },
-
- /**
- * Fails the test if any rejection indicated by expectUncaughtRejection has
- * not yet been reported at this time.
- *
- * This is called by the test suite at the end of each test file.
- */
- assertNoMoreExpectedRejections() {
- // Only log this condition is there is a failure.
- if (this._rejectionIgnoreFns.length > 0) {
- Assert.equal(this._rejectionIgnoreFns.length, 0,
- "Unable to find a rejection expected by expectUncaughtRejection.");
- }
- },
-};
diff --git a/toolkit/modules/tests/browser/.eslintrc.js b/toolkit/modules/tests/browser/.eslintrc.js
deleted file mode 100644
index c764b133dc..0000000000
--- a/toolkit/modules/tests/browser/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../testing/mochitest/browser.eslintrc.js"
- ]
-};
diff --git a/toolkit/modules/tests/browser/WebRequest_dynamic.sjs b/toolkit/modules/tests/browser/WebRequest_dynamic.sjs
deleted file mode 100644
index 7b34a377d3..0000000000
--- a/toolkit/modules/tests/browser/WebRequest_dynamic.sjs
+++ /dev/null
@@ -1,13 +0,0 @@
-function handleRequest(aRequest, aResponse) {
- aResponse.setStatusLine(aRequest.httpVersion, 200);
- if (aRequest.hasHeader('Cookie')) {
- let value = aRequest.getHeader("Cookie");
- if (value == "blinky=1") {
- aResponse.setHeader("Set-Cookie", "dinky=1");
- }
- aResponse.write("cookie-present");
- } else {
- aResponse.setHeader("Set-Cookie", "foopy=1");
- aResponse.write("cookie-not-present");
- }
-}
diff --git a/toolkit/modules/tests/browser/WebRequest_redirection.sjs b/toolkit/modules/tests/browser/WebRequest_redirection.sjs
deleted file mode 100644
index 370ecd213f..0000000000
--- a/toolkit/modules/tests/browser/WebRequest_redirection.sjs
+++ /dev/null
@@ -1,4 +0,0 @@
-function handleRequest(aRequest, aResponse) {
- aResponse.setStatusLine(aRequest.httpVersion, 302);
- aResponse.setHeader("Location", "./dummy_page.html");
-}
diff --git a/toolkit/modules/tests/browser/browser.ini b/toolkit/modules/tests/browser/browser.ini
deleted file mode 100644
index e82feaa427..0000000000
--- a/toolkit/modules/tests/browser/browser.ini
+++ /dev/null
@@ -1,41 +0,0 @@
-[DEFAULT]
-support-files =
- dummy_page.html
- metadata_*.html
- testremotepagemanager.html
- file_WebNavigation_page1.html
- file_WebNavigation_page2.html
- file_WebNavigation_page3.html
- file_WebRequest_page1.html
- file_WebRequest_page2.html
- file_image_good.png
- file_image_bad.png
- file_image_redirect.png
- file_style_good.css
- file_style_bad.css
- file_style_redirect.css
- file_script_good.js
- file_script_bad.js
- file_script_redirect.js
- file_script_xhr.js
- WebRequest_dynamic.sjs
- WebRequest_redirection.sjs
-
-[browser_AsyncPrefs.js]
-[browser_Battery.js]
-[browser_Deprecated.js]
-[browser_Finder.js]
-[browser_Finder_hidden_textarea.js]
-[browser_FinderHighlighter.js]
-skip-if = debug || os = "linux"
-support-files = file_FinderSample.html
-[browser_Geometry.js]
-[browser_InlineSpellChecker.js]
-[browser_WebNavigation.js]
-[browser_WebRequest.js]
-[browser_WebRequest_cookies.js]
-[browser_WebRequest_filtering.js]
-[browser_PageMetadata.js]
-[browser_PromiseMessage.js]
-[browser_RemotePageManager.js]
-[browser_Troubleshoot.js]
diff --git a/toolkit/modules/tests/browser/browser_AsyncPrefs.js b/toolkit/modules/tests/browser/browser_AsyncPrefs.js
deleted file mode 100644
index 1d20a37898..0000000000
--- a/toolkit/modules/tests/browser/browser_AsyncPrefs.js
+++ /dev/null
@@ -1,97 +0,0 @@
-"use strict";
-
-const kWhiteListedBool = "testing.allowed-prefs.some-bool-pref";
-const kWhiteListedChar = "testing.allowed-prefs.some-char-pref";
-const kWhiteListedInt = "testing.allowed-prefs.some-int-pref";
-
-function resetPrefs() {
- for (let pref of [kWhiteListedBool, kWhiteListedChar, kWhiteListedBool]) {
- Services.prefs.clearUserPref(pref);
- }
-}
-
-registerCleanupFunction(resetPrefs);
-
-Services.prefs.getDefaultBranch("testing.allowed-prefs.").setBoolPref("some-bool-pref", false);
-Services.prefs.getDefaultBranch("testing.allowed-prefs.").setCharPref("some-char-pref", "");
-Services.prefs.getDefaultBranch("testing.allowed-prefs.").setIntPref("some-int-pref", 0);
-
-function* runTest() {
- let {AsyncPrefs} = Cu.import("resource://gre/modules/AsyncPrefs.jsm", {});
- const kInChildProcess = Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT;
-
- // Need to define these again because when run in a content task we have no scope access.
- const kNotWhiteListed = "some.pref.thats.not.whitelisted";
- const kWhiteListedBool = "testing.allowed-prefs.some-bool-pref";
- const kWhiteListedChar = "testing.allowed-prefs.some-char-pref";
- const kWhiteListedInt = "testing.allowed-prefs.some-int-pref";
-
- const procDesc = kInChildProcess ? "child process" : "parent process";
-
- const valueResultMap = [
- [true, "Bool"],
- [false, "Bool"],
- [10, "Int"],
- [-1, "Int"],
- ["", "Char"],
- ["stuff", "Char"],
- [[], false],
- [{}, false],
- [BrowserUtils.makeURI("http://mozilla.org/"), false],
- ];
-
- const prefMap = [
- ["Bool", kWhiteListedBool],
- ["Char", kWhiteListedChar],
- ["Int", kWhiteListedInt],
- ];
-
- function doesFail(pref, value) {
- let msg = `Should not succeed setting ${pref} to ${value} in ${procDesc}`;
- return AsyncPrefs.set(pref, value).then(() => ok(false, msg), error => ok(true, msg + "; " + error));
- }
-
- function doesWork(pref, value) {
- let msg = `Should be able to set ${pref} to ${value} in ${procDesc}`;
- return AsyncPrefs.set(pref, value).then(() => ok(true, msg), error => ok(false, msg + "; " + error));
- }
-
- function doReset(pref) {
- let msg = `Should be able to reset ${pref} in ${procDesc}`;
- return AsyncPrefs.reset(pref).then(() => ok(true, msg), () => ok(false, msg));
- }
-
- for (let [val, ] of valueResultMap) {
- yield doesFail(kNotWhiteListed, val);
- is(Services.prefs.prefHasUserValue(kNotWhiteListed), false, "Pref shouldn't get changed");
- }
-
- let resetMsg = `Should not succeed resetting ${kNotWhiteListed} in ${procDesc}`;
- AsyncPrefs.reset(kNotWhiteListed).then(() => ok(false, resetMsg), error => ok(true, resetMsg + "; " + error));
-
- for (let [type, pref] of prefMap) {
- for (let [val, result] of valueResultMap) {
- if (result == type) {
- yield doesWork(pref, val);
- is(Services.prefs["get" + type + "Pref"](pref), val, "Pref should have been updated");
- yield doReset(pref);
- } else {
- yield doesFail(pref, val);
- is(Services.prefs.prefHasUserValue(pref), false, `Pref ${pref} shouldn't get changed`);
- }
- }
- }
-}
-
-add_task(function* runInParent() {
- yield runTest();
- resetPrefs();
-});
-
-if (gMultiProcessBrowser) {
- add_task(function* runInChild() {
- ok(gBrowser.selectedBrowser.isRemoteBrowser, "Should actually run this in child process");
- yield ContentTask.spawn(gBrowser.selectedBrowser, null, runTest);
- resetPrefs();
- });
-}
diff --git a/toolkit/modules/tests/browser/browser_Battery.js b/toolkit/modules/tests/browser/browser_Battery.js
deleted file mode 100644
index 2d3ba5da19..0000000000
--- a/toolkit/modules/tests/browser/browser_Battery.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/* 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/. */
-"use strict";
-var imported = Components.utils.import("resource://gre/modules/Battery.jsm", this);
-Cu.import("resource://gre/modules/Services.jsm", this);
-
-function test() {
- waitForExplicitFinish();
-
- is(imported.Debugging.fake, false, "Battery spoofing is initially false")
-
- GetBattery().then(function (battery) {
- for (let k of ["charging", "chargingTime", "dischargingTime", "level"]) {
- let backup = battery[k];
- try {
- battery[k] = "__magic__";
- } catch (e) {
- // We are testing that we cannot set battery to new values
- // when "use strict" is enabled, this throws a TypeError
- if (e.name != "TypeError")
- throw e;
- }
- is(battery[k], backup, "Setting battery " + k + " preference without spoofing enabled should fail");
- }
-
- imported.Debugging.fake = true;
-
- // reload again to get the fake one
- GetBattery().then(function (battery) {
- battery.charging = true;
- battery.chargingTime = 100;
- battery.level = 0.5;
- ok(battery.charging, "Test for charging setter");
- is(battery.chargingTime, 100, "Test for chargingTime setter");
- is(battery.level, 0.5, "Test for level setter");
-
- battery.charging = false;
- battery.dischargingTime = 50;
- battery.level = 0.7;
- ok(!battery.charging, "Test for charging setter");
- is(battery.dischargingTime, 50, "Test for dischargingTime setter");
- is(battery.level, 0.7, "Test for level setter");
-
- // Resetting the value to make the test run successful
- // for multiple runs in same browser session.
- imported.Debugging.fake = false;
- finish();
- });
- });
-}
diff --git a/toolkit/modules/tests/browser/browser_Deprecated.js b/toolkit/modules/tests/browser/browser_Deprecated.js
deleted file mode 100644
index 3217bdd229..0000000000
--- a/toolkit/modules/tests/browser/browser_Deprecated.js
+++ /dev/null
@@ -1,157 +0,0 @@
-/* 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/. */
-
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-const PREF_DEPRECATION_WARNINGS = "devtools.errorconsole.deprecation_warnings";
-
-Cu.import("resource://gre/modules/Services.jsm", this);
-Cu.import("resource://gre/modules/Deprecated.jsm", this);
-
-// Using this named functions to test deprecation and the properly logged
-// callstacks.
-function basicDeprecatedFunction () {
- Deprecated.warning("this method is deprecated.", "http://example.com");
- return true;
-}
-
-function deprecationFunctionBogusCallstack () {
- Deprecated.warning("this method is deprecated.", "http://example.com", {
- caller: {}
- });
- return true;
-}
-
-function deprecationFunctionCustomCallstack () {
- // Get the nsIStackFrame that will contain the name of this function.
- function getStack () {
- return Components.stack;
- }
- Deprecated.warning("this method is deprecated.", "http://example.com",
- getStack());
- return true;
-}
-
-var tests = [
-// Test deprecation warning without passing the callstack.
-{
- deprecatedFunction: basicDeprecatedFunction,
- expectedObservation: function (aMessage) {
- testAMessage(aMessage);
- ok(aMessage.errorMessage.indexOf("basicDeprecatedFunction") > 0,
- "Callstack is correctly logged.");
- }
-},
-// Test a reported error when URL to documentation is not passed.
-{
- deprecatedFunction: function () {
- Deprecated.warning("this method is deprecated.");
- return true;
- },
- expectedObservation: function (aMessage) {
- ok(aMessage.errorMessage.indexOf("must provide a URL") > 0,
- "Deprecation warning logged an empty URL argument.");
- }
-},
-// Test deprecation with a bogus callstack passed as an argument (it will be
-// replaced with the current call stack).
-{
- deprecatedFunction: deprecationFunctionBogusCallstack,
- expectedObservation: function (aMessage) {
- testAMessage(aMessage);
- ok(aMessage.errorMessage.indexOf("deprecationFunctionBogusCallstack") > 0,
- "Callstack is correctly logged.");
- }
-},
-// When pref is unset Deprecated.warning should not log anything.
-{
- deprecatedFunction: basicDeprecatedFunction,
- expectedObservation: null,
- // Set pref to false.
- logWarnings: false
-},
-// Test deprecation with a valid custom callstack passed as an argument.
-{
- deprecatedFunction: deprecationFunctionCustomCallstack,
- expectedObservation: function (aMessage) {
- testAMessage(aMessage);
- ok(aMessage.errorMessage.indexOf("deprecationFunctionCustomCallstack") > 0,
- "Callstack is correctly logged.");
- },
- // Set pref to true.
- logWarnings: true
-}];
-
-// Which test are we running now?
-var idx = -1;
-
-function test() {
- waitForExplicitFinish();
-
- // Check if Deprecated is loaded.
- ok(Deprecated, "Deprecated object exists");
-
- nextTest();
-}
-
-// Test Consle Message attributes.
-function testAMessage (aMessage) {
- ok(aMessage.errorMessage.indexOf("DEPRECATION WARNING: " +
- "this method is deprecated.") === 0,
- "Deprecation is correctly logged.");
- ok(aMessage.errorMessage.indexOf("http://example.com") > 0,
- "URL is correctly logged.");
-}
-
-function nextTest() {
- idx++;
-
- if (idx == tests.length) {
- finish();
- return;
- }
-
- info("Running test #" + idx);
- let test = tests[idx];
-
- // Deprecation warnings will be logged only when the preference is set.
- if (typeof test.logWarnings !== "undefined") {
- Services.prefs.setBoolPref(PREF_DEPRECATION_WARNINGS, test.logWarnings);
- }
-
- // Create a console listener.
- let consoleListener = {
- observe: function (aMessage) {
- // Ignore unexpected messages.
- if (!(aMessage instanceof Ci.nsIScriptError)) {
- return;
- }
- if (aMessage.errorMessage.indexOf("DEPRECATION WARNING: ") < 0 &&
- aMessage.errorMessage.indexOf("must provide a URL") < 0) {
- return;
- }
- ok(aMessage instanceof Ci.nsIScriptError,
- "Deprecation log message is an instance of type nsIScriptError.");
-
-
- if (test.expectedObservation === null) {
- ok(false, "Deprecated warning not expected");
- }
- else {
- test.expectedObservation(aMessage);
- }
-
- Services.console.unregisterListener(consoleListener);
- executeSoon(nextTest);
- }
- };
- Services.console.registerListener(consoleListener);
- test.deprecatedFunction();
- if (test.expectedObservation === null) {
- executeSoon(function() {
- Services.console.unregisterListener(consoleListener);
- executeSoon(nextTest);
- });
- }
-}
diff --git a/toolkit/modules/tests/browser/browser_Finder.js b/toolkit/modules/tests/browser/browser_Finder.js
deleted file mode 100644
index 4dfd921d0e..0000000000
--- a/toolkit/modules/tests/browser/browser_Finder.js
+++ /dev/null
@@ -1,62 +0,0 @@
-/* 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/. */
-
-var Ci = Components.interfaces;
-
-add_task(function* () {
- const url = "data:text/html;base64," +
- btoa("<body><iframe srcdoc=\"content\"/></iframe>" +
- "<a href=\"http://test.com\">test link</a>");
- let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, url);
-
- let finder = tab.linkedBrowser.finder;
- let listener = {
- onFindResult: function () {
- ok(false, "onFindResult callback wasn't replaced");
- },
- onHighlightFinished: function () {
- ok(false, "onHighlightFinished callback wasn't replaced");
- }
- };
- finder.addResultListener(listener);
-
- function waitForFind(which = "onFindResult") {
- return new Promise(resolve => {
- listener[which] = resolve;
- })
- }
-
- let promiseFind = waitForFind("onHighlightFinished");
- finder.highlight(true, "content");
- let findResult = yield promiseFind;
- Assert.ok(findResult.found, "should find string");
-
- promiseFind = waitForFind("onHighlightFinished");
- finder.highlight(true, "Bla");
- findResult = yield promiseFind;
- Assert.ok(!findResult.found, "should not find string");
-
- // Search only for links and draw outlines.
- promiseFind = waitForFind();
- finder.fastFind("test link", true, true);
- findResult = yield promiseFind;
- is(findResult.result, Ci.nsITypeAheadFind.FIND_FOUND, "should find link");
-
- yield ContentTask.spawn(tab.linkedBrowser, {}, function* (arg) {
- Assert.ok(!!content.document.getElementsByTagName("a")[0].style.outline, "outline set");
- });
-
- // Just a simple search for "test link".
- promiseFind = waitForFind();
- finder.fastFind("test link", false, false);
- findResult = yield promiseFind;
- is(findResult.result, Ci.nsITypeAheadFind.FIND_FOUND, "should find link again");
-
- yield ContentTask.spawn(tab.linkedBrowser, {}, function* (arg) {
- Assert.ok(!content.document.getElementsByTagName("a")[0].style.outline, "outline not set");
- });
-
- finder.removeResultListener(listener);
- gBrowser.removeTab(tab);
-});
diff --git a/toolkit/modules/tests/browser/browser_FinderHighlighter.js b/toolkit/modules/tests/browser/browser_FinderHighlighter.js
deleted file mode 100644
index cd7eefa115..0000000000
--- a/toolkit/modules/tests/browser/browser_FinderHighlighter.js
+++ /dev/null
@@ -1,460 +0,0 @@
-"use strict";
-
-Cu.import("resource://testing-common/BrowserTestUtils.jsm", this);
-Cu.import("resource://testing-common/ContentTask.jsm", this);
-Cu.import("resource://gre/modules/Promise.jsm", this);
-Cu.import("resource://gre/modules/Services.jsm", this);
-Cu.import("resource://gre/modules/Task.jsm", this);
-Cu.import("resource://gre/modules/Timer.jsm", this);
-Cu.import("resource://gre/modules/AppConstants.jsm");
-
-const kHighlightAllPref = "findbar.highlightAll";
-const kPrefModalHighlight = "findbar.modalHighlight";
-const kFixtureBaseURL = "https://example.com/browser/toolkit/modules/tests/browser/";
-const kIteratorTimeout = Services.prefs.getIntPref("findbar.iteratorTimeout");
-
-function promiseOpenFindbar(findbar) {
- findbar.onFindCommand()
- return gFindBar._startFindDeferred && gFindBar._startFindDeferred.promise;
-}
-
-function promiseFindResult(findbar, str = null) {
- let highlightFinished = false;
- let findFinished = false;
- return new Promise(resolve => {
- let listener = {
- onFindResult({ searchString }) {
- if (str !== null && str != searchString) {
- return;
- }
- findFinished = true;
- if (highlightFinished) {
- findbar.browser.finder.removeResultListener(listener);
- resolve();
- }
- },
- onHighlightFinished() {
- highlightFinished = true;
- if (findFinished) {
- findbar.browser.finder.removeResultListener(listener);
- resolve();
- }
- },
- onMatchesCountResult: () => {}
- };
- findbar.browser.finder.addResultListener(listener);
- });
-}
-
-function promiseEnterStringIntoFindField(findbar, str) {
- let promise = promiseFindResult(findbar, str);
- for (let i = 0; i < str.length; i++) {
- let event = document.createEvent("KeyboardEvent");
- event.initKeyEvent("keypress", true, true, null, false, false,
- false, false, 0, str.charCodeAt(i));
- findbar._findField.inputField.dispatchEvent(event);
- }
- return promise;
-}
-
-function promiseTestHighlighterOutput(browser, word, expectedResult, extraTest = () => {}) {
- return ContentTask.spawn(browser, { word, expectedResult, extraTest: extraTest.toSource() },
- function* ({ word, expectedResult, extraTest }) {
- Cu.import("resource://gre/modules/Timer.jsm", this);
-
- return new Promise((resolve, reject) => {
- let stubbed = {};
- let callCounts = {
- insertCalls: [],
- removeCalls: []
- };
- let lastMaskNode, lastOutlineNode;
- let rects = [];
-
- // Amount of milliseconds to wait after the last time one of our stubs
- // was called.
- const kTimeoutMs = 1000;
- // The initial timeout may wait for a while for results to come in.
- let timeout = setTimeout(() => finish(false, "Timeout"), kTimeoutMs * 5);
-
- function finish(ok = true, message = "finished with error") {
- // Restore the functions we stubbed out.
- try {
- content.document.insertAnonymousContent = stubbed.insert;
- content.document.removeAnonymousContent = stubbed.remove;
- } catch (ex) {}
- stubbed = {};
- clearTimeout(timeout);
-
- if (expectedResult.rectCount !== 0)
- Assert.ok(ok, message);
-
- Assert.greaterOrEqual(callCounts.insertCalls.length, expectedResult.insertCalls[0],
- `Min. insert calls should match for '${word}'.`);
- Assert.lessOrEqual(callCounts.insertCalls.length, expectedResult.insertCalls[1],
- `Max. insert calls should match for '${word}'.`);
- Assert.greaterOrEqual(callCounts.removeCalls.length, expectedResult.removeCalls[0],
- `Min. remove calls should match for '${word}'.`);
- Assert.lessOrEqual(callCounts.removeCalls.length, expectedResult.removeCalls[1],
- `Max. remove calls should match for '${word}'.`);
-
- // We reached the amount of calls we expected, so now we can check
- // the amount of rects.
- if (!lastMaskNode && expectedResult.rectCount !== 0) {
- Assert.ok(false, `No mask node found, but expected ${expectedResult.rectCount} rects.`);
- }
-
- Assert.equal(rects.length, expectedResult.rectCount,
- `Amount of inserted rects should match for '${word}'.`);
-
- // Allow more specific assertions to be tested in `extraTest`.
- extraTest = eval(extraTest);
- extraTest(lastMaskNode, lastOutlineNode, rects);
-
- resolve();
- }
-
- function stubAnonymousContentNode(domNode, anonNode) {
- let originals = [anonNode.setTextContentForElement,
- anonNode.setAttributeForElement, anonNode.removeAttributeForElement,
- anonNode.setCutoutRectsForElement];
- anonNode.setTextContentForElement = (id, text) => {
- try {
- (domNode.querySelector("#" + id) || domNode).textContent = text;
- } catch (ex) {}
- return originals[0].call(anonNode, id, text);
- };
- anonNode.setAttributeForElement = (id, attrName, attrValue) => {
- try {
- (domNode.querySelector("#" + id) || domNode).setAttribute(attrName, attrValue);
- } catch (ex) {}
- return originals[1].call(anonNode, id, attrName, attrValue);
- };
- anonNode.removeAttributeForElement = (id, attrName) => {
- try {
- let node = domNode.querySelector("#" + id) || domNode;
- if (node.hasAttribute(attrName))
- node.removeAttribute(attrName);
- } catch (ex) {}
- return originals[2].call(anonNode, id, attrName);
- };
- anonNode.setCutoutRectsForElement = (id, cutoutRects) => {
- rects = cutoutRects;
- return originals[3].call(anonNode, id, cutoutRects);
- };
- }
-
- // Create a function that will stub the original version and collects
- // the arguments so we can check the results later.
- function stub(which) {
- stubbed[which] = content.document[which + "AnonymousContent"];
- let prop = which + "Calls";
- return function(node) {
- callCounts[prop].push(node);
- if (which == "insert") {
- if (node.outerHTML.indexOf("outlineMask") > -1)
- lastMaskNode = node;
- else
- lastOutlineNode = node;
- }
- clearTimeout(timeout);
- timeout = setTimeout(() => {
- finish();
- }, kTimeoutMs);
- let res = stubbed[which].call(content.document, node);
- if (which == "insert")
- stubAnonymousContentNode(node, res);
- return res;
- };
- }
- content.document.insertAnonymousContent = stub("insert");
- content.document.removeAnonymousContent = stub("remove");
- });
- });
-}
-
-add_task(function* setup() {
- yield SpecialPowers.pushPrefEnv({ set: [
- [kHighlightAllPref, true],
- [kPrefModalHighlight, true]
- ]});
-});
-
-// Test the results of modal highlighting, which is on by default.
-add_task(function* testModalResults() {
- let tests = new Map([
- ["Roland", {
- rectCount: 2,
- insertCalls: [2, 4],
- removeCalls: [0, 1]
- }],
- ["their law might propagate their kind", {
- rectCount: 2,
- insertCalls: [5, 6],
- removeCalls: [4, 5],
- extraTest: function(maskNode, outlineNode, rects) {
- Assert.equal(outlineNode.getElementsByTagName("div").length, 2,
- "There should be multiple rects drawn");
- }
- }],
- ["ro", {
- rectCount: 41,
- insertCalls: [1, 4],
- removeCalls: [1, 3]
- }],
- ["new", {
- rectCount: 2,
- insertCalls: [1, 4],
- removeCalls: [0, 2]
- }],
- ["o", {
- rectCount: 492,
- insertCalls: [1, 4],
- removeCalls: [0, 2]
- }]
- ]);
- let url = kFixtureBaseURL + "file_FinderSample.html";
- yield BrowserTestUtils.withNewTab(url, function* (browser) {
- let findbar = gBrowser.getFindBar();
-
- for (let [word, expectedResult] of tests) {
- yield promiseOpenFindbar(findbar);
- Assert.ok(!findbar.hidden, "Findbar should be open now.");
-
- let timeout = kIteratorTimeout;
- if (word.length == 1)
- timeout *= 4;
- else if (word.length == 2)
- timeout *= 2;
- yield new Promise(resolve => setTimeout(resolve, timeout));
- let promise = promiseTestHighlighterOutput(browser, word, expectedResult,
- expectedResult.extraTest);
- yield promiseEnterStringIntoFindField(findbar, word);
- yield promise;
-
- findbar.close(true);
- }
- });
-});
-
-// Test if runtime switching of highlight modes between modal and non-modal works
-// as expected.
-add_task(function* testModalSwitching() {
- let url = kFixtureBaseURL + "file_FinderSample.html";
- yield BrowserTestUtils.withNewTab(url, function* (browser) {
- let findbar = gBrowser.getFindBar();
-
- yield promiseOpenFindbar(findbar);
- Assert.ok(!findbar.hidden, "Findbar should be open now.");
-
- let word = "Roland";
- let expectedResult = {
- rectCount: 2,
- insertCalls: [2, 4],
- removeCalls: [0, 1]
- };
- let promise = promiseTestHighlighterOutput(browser, word, expectedResult);
- yield promiseEnterStringIntoFindField(findbar, word);
- yield promise;
-
- yield SpecialPowers.pushPrefEnv({ "set": [[ kPrefModalHighlight, false ]] });
-
- expectedResult = {
- rectCount: 0,
- insertCalls: [0, 0],
- removeCalls: [0, 0]
- };
- promise = promiseTestHighlighterOutput(browser, word, expectedResult);
- findbar.clear();
- yield promiseEnterStringIntoFindField(findbar, word);
- yield promise;
-
- findbar.close(true);
- });
-
- yield SpecialPowers.pushPrefEnv({ "set": [[ kPrefModalHighlight, true ]] });
-});
-
-// Test if highlighting a dark page is detected properly.
-add_task(function* testDarkPageDetection() {
- let url = kFixtureBaseURL + "file_FinderSample.html";
- yield BrowserTestUtils.withNewTab(url, function* (browser) {
- let findbar = gBrowser.getFindBar();
-
- yield promiseOpenFindbar(findbar);
-
- let word = "Roland";
- let expectedResult = {
- rectCount: 2,
- insertCalls: [1, 3],
- removeCalls: [0, 1]
- };
- let promise = promiseTestHighlighterOutput(browser, word, expectedResult, function(node) {
- Assert.ok(node.style.background.startsWith("rgba(0, 0, 0"),
- "White HTML page should have a black background color set for the mask");
- });
- yield promiseEnterStringIntoFindField(findbar, word);
- yield promise;
-
- findbar.close(true);
- });
-
- yield BrowserTestUtils.withNewTab(url, function* (browser) {
- let findbar = gBrowser.getFindBar();
-
- yield promiseOpenFindbar(findbar);
-
- let word = "Roland";
- let expectedResult = {
- rectCount: 2,
- insertCalls: [2, 4],
- removeCalls: [0, 1]
- };
-
- yield ContentTask.spawn(browser, null, function* () {
- let dwu = content.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindowUtils);
- let uri = "data:text/css;charset=utf-8," + encodeURIComponent(`
- body {
- background: maroon radial-gradient(circle, #a01010 0%, #800000 80%) center center / cover no-repeat;
- color: white;
- }`);
- try {
- dwu.loadSheetUsingURIString(uri, dwu.USER_SHEET);
- } catch (e) {}
- });
-
- let promise = promiseTestHighlighterOutput(browser, word, expectedResult, node => {
- Assert.ok(node.style.background.startsWith("rgba(255, 255, 255"),
- "Dark HTML page should have a white background color set for the mask");
- });
- yield promiseEnterStringIntoFindField(findbar, word);
- yield promise;
-
- findbar.close(true);
- });
-});
-
-add_task(function* testHighlightAllToggle() {
- let url = kFixtureBaseURL + "file_FinderSample.html";
- yield BrowserTestUtils.withNewTab(url, function* (browser) {
- let findbar = gBrowser.getFindBar();
-
- yield promiseOpenFindbar(findbar);
-
- let word = "Roland";
- let expectedResult = {
- rectCount: 2,
- insertCalls: [2, 4],
- removeCalls: [0, 1]
- };
- let promise = promiseTestHighlighterOutput(browser, word, expectedResult);
- yield promiseEnterStringIntoFindField(findbar, word);
- yield promise;
-
- // We now know we have multiple rectangles highlighted, so it's a good time
- // to flip the pref.
- expectedResult = {
- rectCount: 0,
- insertCalls: [0, 1],
- removeCalls: [0, 1]
- };
- promise = promiseTestHighlighterOutput(browser, word, expectedResult);
- yield SpecialPowers.pushPrefEnv({ "set": [[ kHighlightAllPref, false ]] });
- yield promise;
-
- // For posterity, let's switch back.
- expectedResult = {
- rectCount: 2,
- insertCalls: [1, 3],
- removeCalls: [0, 1]
- };
- promise = promiseTestHighlighterOutput(browser, word, expectedResult);
- yield SpecialPowers.pushPrefEnv({ "set": [[ kHighlightAllPref, true ]] });
- yield promise;
- });
-});
-
-add_task(function* testXMLDocument() {
- let url = "data:text/xml;charset=utf-8," + encodeURIComponent(`<?xml version="1.0"?>
-<result>
- <Title>Example</Title>
- <Error>Error</Error>
-</result>`);
- yield BrowserTestUtils.withNewTab(url, function* (browser) {
- let findbar = gBrowser.getFindBar();
-
- yield promiseOpenFindbar(findbar);
-
- let word = "Example";
- let expectedResult = {
- rectCount: 0,
- insertCalls: [1, 4],
- removeCalls: [0, 1]
- };
- let promise = promiseTestHighlighterOutput(browser, word, expectedResult);
- yield promiseEnterStringIntoFindField(findbar, word);
- yield promise;
-
- findbar.close(true);
- });
-});
-
-add_task(function* testHideOnLocationChange() {
- let url = kFixtureBaseURL + "file_FinderSample.html";
- let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, url);
- let browser = tab.linkedBrowser;
- let findbar = gBrowser.getFindBar();
-
- yield promiseOpenFindbar(findbar);
-
- let word = "Roland";
- let expectedResult = {
- rectCount: 2,
- insertCalls: [2, 4],
- removeCalls: [0, 1]
- };
- let promise = promiseTestHighlighterOutput(browser, word, expectedResult);
- yield promiseEnterStringIntoFindField(findbar, word);
- yield promise;
-
- // Now we try to navigate away! (Using the same page)
- promise = promiseTestHighlighterOutput(browser, word, {
- rectCount: 0,
- insertCalls: [0, 0],
- removeCalls: [1, 2]
- });
- yield BrowserTestUtils.loadURI(browser, url);
- yield promise;
-
- yield BrowserTestUtils.removeTab(tab);
-});
-
-add_task(function* testHideOnClear() {
- let url = kFixtureBaseURL + "file_FinderSample.html";
- yield BrowserTestUtils.withNewTab(url, function* (browser) {
- let findbar = gBrowser.getFindBar();
- yield promiseOpenFindbar(findbar);
-
- let word = "Roland";
- let expectedResult = {
- rectCount: 2,
- insertCalls: [2, 4],
- removeCalls: [0, 2]
- };
- let promise = promiseTestHighlighterOutput(browser, word, expectedResult);
- yield promiseEnterStringIntoFindField(findbar, word);
- yield promise;
-
- yield new Promise(resolve => setTimeout(resolve, kIteratorTimeout));
- promise = promiseTestHighlighterOutput(browser, "", {
- rectCount: 0,
- insertCalls: [0, 0],
- removeCalls: [1, 2]
- });
- findbar.clear();
- yield promise;
-
- findbar.close(true);
- });
-});
diff --git a/toolkit/modules/tests/browser/browser_Finder_hidden_textarea.js b/toolkit/modules/tests/browser/browser_Finder_hidden_textarea.js
deleted file mode 100644
index 99d838adaf..0000000000
--- a/toolkit/modules/tests/browser/browser_Finder_hidden_textarea.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/* 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/. */
-add_task(function* test_bug1174036() {
- const URI =
- "<body><textarea>e1</textarea><textarea>e2</textarea><textarea>e3</textarea></body>";
- yield BrowserTestUtils.withNewTab({ gBrowser, url: "data:text/html;charset=utf-8," + encodeURIComponent(URI) },
- function* (browser) {
- // Hide the first textarea.
- yield ContentTask.spawn(browser, null, function() {
- content.document.getElementsByTagName("textarea")[0].style.display = "none";
- });
-
- let finder = browser.finder;
- let listener = {
- onFindResult: function () {
- ok(false, "callback wasn't replaced");
- }
- };
- finder.addResultListener(listener);
-
- function waitForFind() {
- return new Promise(resolve => {
- listener.onFindResult = resolve;
- })
- }
-
- // Find the first 'e' (which should be in the second textarea).
- let promiseFind = waitForFind();
- finder.fastFind("e", false, false);
- let findResult = yield promiseFind;
- is(findResult.result, Ci.nsITypeAheadFind.FIND_FOUND, "find first string");
-
- let firstRect = findResult.rect;
-
- // Find the second 'e' (in the third textarea).
- promiseFind = waitForFind();
- finder.findAgain(false, false, false);
- findResult = yield promiseFind;
- is(findResult.result, Ci.nsITypeAheadFind.FIND_FOUND, "find second string");
- ok(!findResult.rect.equals(firstRect), "found new string");
-
- // Ensure that we properly wrap to the second textarea.
- promiseFind = waitForFind();
- finder.findAgain(false, false, false);
- findResult = yield promiseFind;
- is(findResult.result, Ci.nsITypeAheadFind.FIND_WRAPPED, "wrapped to first string");
- ok(findResult.rect.equals(firstRect), "wrapped to original string");
-
- finder.removeResultListener(listener);
- });
-});
diff --git a/toolkit/modules/tests/browser/browser_Geometry.js b/toolkit/modules/tests/browser/browser_Geometry.js
deleted file mode 100644
index aaca79a06b..0000000000
--- a/toolkit/modules/tests/browser/browser_Geometry.js
+++ /dev/null
@@ -1,111 +0,0 @@
-/* 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/. */
-
-var tempScope = {};
-Components.utils.import("resource://gre/modules/Geometry.jsm", tempScope);
-var Point = tempScope.Point;
-var Rect = tempScope.Rect;
-
-function test() {
- ok(Rect, "Rect class exists");
- for (var fname in tests) {
- tests[fname]();
- }
-}
-
-var tests = {
- testGetDimensions: function() {
- let r = new Rect(5, 10, 100, 50);
- ok(r.left == 5, "rect has correct left value");
- ok(r.top == 10, "rect has correct top value");
- ok(r.right == 105, "rect has correct right value");
- ok(r.bottom == 60, "rect has correct bottom value");
- ok(r.width == 100, "rect has correct width value");
- ok(r.height == 50, "rect has correct height value");
- ok(r.x == 5, "rect has correct x value");
- ok(r.y == 10, "rect has correct y value");
- },
-
- testIsEmpty: function() {
- let r = new Rect(0, 0, 0, 10);
- ok(r.isEmpty(), "rect with nonpositive width is empty");
- r = new Rect(0, 0, 10, 0);
- ok(r.isEmpty(), "rect with nonpositive height is empty");
- r = new Rect(0, 0, 10, 10);
- ok(!r.isEmpty(), "rect with positive dimensions is not empty");
- },
-
- testRestrictTo: function() {
- let r1 = new Rect(10, 10, 100, 100);
- let r2 = new Rect(50, 50, 100, 100);
- r1.restrictTo(r2);
- ok(r1.equals(new Rect(50, 50, 60, 60)), "intersection is non-empty");
-
- r1 = new Rect(10, 10, 100, 100);
- r2 = new Rect(120, 120, 100, 100);
- r1.restrictTo(r2);
- ok(r1.isEmpty(), "intersection is empty");
-
- r1 = new Rect(10, 10, 100, 100);
- r2 = new Rect(0, 0, 0, 0);
- r1.restrictTo(r2);
- ok(r1.isEmpty(), "intersection of rect and empty is empty");
-
- r1 = new Rect(0, 0, 0, 0);
- r2 = new Rect(0, 0, 0, 0);
- r1.restrictTo(r2);
- ok(r1.isEmpty(), "intersection of empty and empty is empty");
- },
-
- testExpandToContain: function() {
- let r1 = new Rect(10, 10, 100, 100);
- let r2 = new Rect(50, 50, 100, 100);
- r1.expandToContain(r2);
- ok(r1.equals(new Rect(10, 10, 140, 140)), "correct expandToContain on intersecting rectangles");
-
- r1 = new Rect(10, 10, 100, 100);
- r2 = new Rect(120, 120, 100, 100);
- r1.expandToContain(r2);
- ok(r1.equals(new Rect(10, 10, 210, 210)), "correct expandToContain on non-intersecting rectangles");
-
- r1 = new Rect(10, 10, 100, 100);
- r2 = new Rect(0, 0, 0, 0);
- r1.expandToContain(r2);
- ok(r1.equals(new Rect(10, 10, 100, 100)), "expandToContain of rect and empty is rect");
-
- r1 = new Rect(10, 10, 0, 0);
- r2 = new Rect(0, 0, 0, 0);
- r1.expandToContain(r2);
- ok(r1.isEmpty(), "expandToContain of empty and empty is empty");
- },
-
- testSubtract: function testSubtract() {
- function equals(rects1, rects2) {
- return rects1.length == rects2.length && rects1.every(function(r, i) {
- return r.equals(rects2[i]);
- });
- }
-
- let r1 = new Rect(0, 0, 100, 100);
- let r2 = new Rect(500, 500, 100, 100);
- ok(equals(r1.subtract(r2), [r1]), "subtract area outside of region yields same region");
-
- r1 = new Rect(0, 0, 100, 100);
- r2 = new Rect(-10, -10, 50, 120);
- ok(equals(r1.subtract(r2), [new Rect(40, 0, 60, 100)]), "subtracting vertical bar from edge leaves one rect");
-
- r1 = new Rect(0, 0, 100, 100);
- r2 = new Rect(-10, -10, 120, 50);
- ok(equals(r1.subtract(r2), [new Rect(0, 40, 100, 60)]), "subtracting horizontal bar from edge leaves one rect");
-
- r1 = new Rect(0, 0, 100, 100);
- r2 = new Rect(40, 40, 20, 20);
- ok(equals(r1.subtract(r2), [
- new Rect(0, 0, 40, 100),
- new Rect(40, 0, 20, 40),
- new Rect(40, 60, 20, 40),
- new Rect(60, 0, 40, 100)]),
- "subtracting rect in middle leaves union of rects");
- },
-};
diff --git a/toolkit/modules/tests/browser/browser_InlineSpellChecker.js b/toolkit/modules/tests/browser/browser_InlineSpellChecker.js
deleted file mode 100644
index 2bffc97222..0000000000
--- a/toolkit/modules/tests/browser/browser_InlineSpellChecker.js
+++ /dev/null
@@ -1,121 +0,0 @@
-function test() {
- let tempScope = {};
- Components.utils.import("resource://gre/modules/InlineSpellChecker.jsm", tempScope);
- let InlineSpellChecker = tempScope.InlineSpellChecker;
-
- ok(InlineSpellChecker, "InlineSpellChecker class exists");
- for (var fname in tests) {
- tests[fname]();
- }
-}
-
-var tests = {
- // Test various possible dictionary name to ensure they display as expected.
- // XXX: This only works for the 'en-US' locale, as the testing involves localized output.
- testDictionaryDisplayNames: function() {
- let isc = new InlineSpellChecker();
-
- // Check non-well-formed language tag.
- is(isc.getDictionaryDisplayName("-invalid-"), "-invalid-", "'-invalid-' should display as '-invalid-'");
-
- // XXX: It isn't clear how we'd ideally want to display variant subtags.
-
- // Check valid language subtag.
- is(isc.getDictionaryDisplayName("en"), "English", "'en' should display as 'English'");
- is(isc.getDictionaryDisplayName("en-fonipa"), "English (fonipa)", "'en-fonipa' should display as 'English (fonipa)'");
- is(isc.getDictionaryDisplayName("en-qxqaaaaz"), "English (qxqaaaaz)", "'en-qxqaaaaz' should display as 'English (qxqaaaaz)'");
-
- // Check valid language subtag and valid region subtag.
- is(isc.getDictionaryDisplayName("en-US"), "English (United States)", "'en-US' should display as 'English (United States)'");
- is(isc.getDictionaryDisplayName("en-US-fonipa"), "English (United States) (fonipa)", "'en-US-fonipa' should display as 'English (United States) (fonipa)'");
- is(isc.getDictionaryDisplayName("en-US-qxqaaaaz"), "English (United States) (qxqaaaaz)", "'en-US-qxqaaaaz' should display as 'English (United States) (qxqaaaaz)'");
-
- // Check valid language subtag and invalid but well-formed region subtag.
- is(isc.getDictionaryDisplayName("en-WO"), "English (WO)", "'en-WO' should display as 'English (WO)'");
- is(isc.getDictionaryDisplayName("en-WO-fonipa"), "English (WO) (fonipa)", "'en-WO-fonipa' should display as 'English (WO) (fonipa)'");
- is(isc.getDictionaryDisplayName("en-WO-qxqaaaaz"), "English (WO) (qxqaaaaz)", "'en-WO-qxqaaaaz' should display as 'English (WO) (qxqaaaaz)'");
-
- // Check valid language subtag and valid script subtag.
- todo_is(isc.getDictionaryDisplayName("en-Cyrl"), "English / Cyrillic", "'en-Cyrl' should display as 'English / Cyrillic'");
- todo_is(isc.getDictionaryDisplayName("en-Cyrl-fonipa"), "English / Cyrillic (fonipa)", "'en-Cyrl-fonipa' should display as 'English / Cyrillic (fonipa)'");
- todo_is(isc.getDictionaryDisplayName("en-Cyrl-qxqaaaaz"), "English / Cyrillic (qxqaaaaz)", "'en-Cyrl-qxqaaaaz' should display as 'English / Cyrillic (qxqaaaaz)'");
- todo_is(isc.getDictionaryDisplayName("en-Cyrl-US"), "English (United States) / Cyrillic", "'en-Cyrl-US' should display as 'English (United States) / Cyrillic'");
- todo_is(isc.getDictionaryDisplayName("en-Cyrl-US-fonipa"), "English (United States) / Cyrillic (fonipa)", "'en-Cyrl-US-fonipa' should display as 'English (United States) / Cyrillic (fonipa)'");
- todo_is(isc.getDictionaryDisplayName("en-Cyrl-US-qxqaaaaz"), "English (United States) / Cyrillic (qxqaaaaz)", "'en-Cyrl-US-qxqaaaaz' should display as 'English (United States) / Cyrillic (qxqaaaaz)'");
- todo_is(isc.getDictionaryDisplayName("en-Cyrl-WO"), "English (WO) / Cyrillic", "'en-Cyrl-WO' should display as 'English (WO) / Cyrillic'");
- todo_is(isc.getDictionaryDisplayName("en-Cyrl-WO-fonipa"), "English (WO) / Cyrillic (fonipa)", "'en-Cyrl-WO-fonipa' should display as 'English (WO) / Cyrillic (fonipa)'");
- todo_is(isc.getDictionaryDisplayName("en-Cyrl-WO-qxqaaaaz"), "English (WO) / Cyrillic (qxqaaaaz)", "'en-Cyrl-WO-qxqaaaaz' should display as 'English (WO) / Cyrillic (qxqaaaaz)'");
-
- // Check valid language subtag and invalid but well-formed script subtag.
- is(isc.getDictionaryDisplayName("en-Qaaz"), "English / Qaaz", "'en-Qaaz' should display as 'English / Qaaz'");
- is(isc.getDictionaryDisplayName("en-Qaaz-fonipa"), "English / Qaaz (fonipa)", "'en-Qaaz-fonipa' should display as 'English / Qaaz (fonipa)'");
- is(isc.getDictionaryDisplayName("en-Qaaz-qxqaaaaz"), "English / Qaaz (qxqaaaaz)", "'en-Qaaz-qxqaaaaz' should display as 'English / Qaaz (qxqaaaaz)'");
- is(isc.getDictionaryDisplayName("en-Qaaz-US"), "English (United States) / Qaaz", "'en-Qaaz-US' should display as 'English (United States) / Qaaz'");
- is(isc.getDictionaryDisplayName("en-Qaaz-US-fonipa"), "English (United States) / Qaaz (fonipa)", "'en-Qaaz-US-fonipa' should display as 'English (United States) / Qaaz (fonipa)'");
- is(isc.getDictionaryDisplayName("en-Qaaz-US-qxqaaaaz"), "English (United States) / Qaaz (qxqaaaaz)", "'en-Qaaz-US-qxqaaaaz' should display as 'English (United States) / Qaaz (qxqaaaaz)'");
- is(isc.getDictionaryDisplayName("en-Qaaz-WO"), "English (WO) / Qaaz", "'en-Qaaz-WO' should display as 'English (WO) / Qaaz'");
- is(isc.getDictionaryDisplayName("en-Qaaz-WO-fonipa"), "English (WO) / Qaaz (fonipa)", "'en-Qaaz-WO-fonipa' should display as 'English (WO) / Qaaz (fonipa)'");
- is(isc.getDictionaryDisplayName("en-Qaaz-WO-qxqaaaaz"), "English (WO) / Qaaz (qxqaaaaz)", "'en-Qaaz-WO-qxqaaaaz' should display as 'English (WO) / Qaaz (qxqaaaaz)'");
-
- // Check invalid but well-formed language subtag.
- is(isc.getDictionaryDisplayName("qaz"), "qaz", "'qaz' should display as 'qaz'");
- is(isc.getDictionaryDisplayName("qaz-fonipa"), "qaz (fonipa)", "'qaz-fonipa' should display as 'qaz (fonipa)'");
- is(isc.getDictionaryDisplayName("qaz-qxqaaaaz"), "qaz (qxqaaaaz)", "'qaz-qxqaaaaz' should display as 'qaz (qxqaaaaz)'");
-
- // Check invalid but well-formed language subtag and valid region subtag.
- is(isc.getDictionaryDisplayName("qaz-US"), "qaz (United States)", "'qaz-US' should display as 'qaz (United States)'");
- is(isc.getDictionaryDisplayName("qaz-US-fonipa"), "qaz (United States) (fonipa)", "'qaz-US-fonipa' should display as 'qaz (United States) (fonipa)'");
- is(isc.getDictionaryDisplayName("qaz-US-qxqaaaaz"), "qaz (United States) (qxqaaaaz)", "'qaz-US-qxqaaaaz' should display as 'qaz (United States) (qxqaaaaz)'");
-
- // Check invalid but well-formed language subtag and invalid but well-formed region subtag.
- is(isc.getDictionaryDisplayName("qaz-WO"), "qaz (WO)", "'qaz-WO' should display as 'qaz (WO)'");
- is(isc.getDictionaryDisplayName("qaz-WO-fonipa"), "qaz (WO) (fonipa)", "'qaz-WO-fonipa' should display as 'qaz (WO) (fonipa)'");
- is(isc.getDictionaryDisplayName("qaz-WO-qxqaaaaz"), "qaz (WO) (qxqaaaaz)", "'qaz-WO-qxqaaaaz' should display as 'qaz (WO) (qxqaaaaz)'");
-
- // Check invalid but well-formed language subtag and valid script subtag.
- todo_is(isc.getDictionaryDisplayName("qaz-Cyrl"), "qaz / Cyrillic", "'qaz-Cyrl' should display as 'qaz / Cyrillic'");
- todo_is(isc.getDictionaryDisplayName("qaz-Cyrl-fonipa"), "qaz / Cyrillic (fonipa)", "'qaz-Cyrl-fonipa' should display as 'qaz / Cyrillic (fonipa)'");
- todo_is(isc.getDictionaryDisplayName("qaz-Cyrl-qxqaaaaz"), "qaz / Cyrillic (qxqaaaaz)", "'qaz-Cyrl-qxqaaaaz' should display as 'qaz / Cyrillic (qxqaaaaz)'");
- todo_is(isc.getDictionaryDisplayName("qaz-Cyrl-US"), "qaz (United States) / Cyrillic", "'qaz-Cyrl-US' should display as 'qaz (United States) / Cyrillic'");
- todo_is(isc.getDictionaryDisplayName("qaz-Cyrl-US-fonipa"), "qaz (United States) / Cyrillic (fonipa)", "'qaz-Cyrl-US-fonipa' should display as 'qaz (United States) / Cyrillic (fonipa)'");
- todo_is(isc.getDictionaryDisplayName("qaz-Cyrl-US-qxqaaaaz"), "qaz (United States) / Cyrillic (qxqaaaaz)", "'qaz-Cyrl-US-qxqaaaaz' should display as 'qaz (United States) / Cyrillic (qxqaaaaz)'");
- todo_is(isc.getDictionaryDisplayName("qaz-Cyrl-WO"), "qaz (WO) / Cyrillic", "'qaz-Cyrl-WO' should display as 'qaz (WO) / Cyrillic'");
- todo_is(isc.getDictionaryDisplayName("qaz-Cyrl-WO-fonipa"), "qaz (WO) / Cyrillic (fonipa)", "'qaz-Cyrl-WO-fonipa' should display as 'qaz (WO) / Cyrillic (fonipa)'");
- todo_is(isc.getDictionaryDisplayName("qaz-Cyrl-WO-qxqaaaaz"), "qaz (WO) / Cyrillic (qxqaaaaz)", "'qaz-Cyrl-WO-qxqaaaaz' should display as 'qaz (WO) / Cyrillic (qxqaaaaz)'");
-
- // Check invalid but well-formed language subtag and invalid but well-formed script subtag.
- is(isc.getDictionaryDisplayName("qaz-Qaaz"), "qaz / Qaaz", "'qaz-Qaaz' should display as 'qaz / Qaaz'");
- is(isc.getDictionaryDisplayName("qaz-Qaaz-fonipa"), "qaz / Qaaz (fonipa)", "'qaz-Qaaz-fonipa' should display as 'qaz / Qaaz (fonipa)'");
- is(isc.getDictionaryDisplayName("qaz-Qaaz-qxqaaaaz"), "qaz / Qaaz (qxqaaaaz)", "'qaz-Qaaz-qxqaaaaz' should display as 'qaz / Qaaz (qxqaaaaz)'");
- is(isc.getDictionaryDisplayName("qaz-Qaaz-US"), "qaz (United States) / Qaaz", "'qaz-Qaaz-US' should display as 'qaz (United States) / Qaaz'");
- is(isc.getDictionaryDisplayName("qaz-Qaaz-US-fonipa"), "qaz (United States) / Qaaz (fonipa)", "'qaz-Qaaz-US-fonipa' should display as 'qaz (United States) / Qaaz (fonipa)'");
- is(isc.getDictionaryDisplayName("qaz-Qaaz-US-qxqaaaaz"), "qaz (United States) / Qaaz (qxqaaaaz)", "'qaz-Qaaz-US-qxqaaaaz' should display as 'qaz (United States) / Qaaz (qxqaaaaz)'");
- is(isc.getDictionaryDisplayName("qaz-Qaaz-WO"), "qaz (WO) / Qaaz", "'qaz-Qaaz-WO' should display as 'qaz (WO) / Qaaz'");
- is(isc.getDictionaryDisplayName("qaz-Qaaz-WO-fonipa"), "qaz (WO) / Qaaz (fonipa)", "'qaz-Qaaz-WO-fonipa' should display as 'qaz (WO) / Qaaz (fonipa)'");
- is(isc.getDictionaryDisplayName("qaz-Qaaz-WO-qxqaaaaz"), "qaz (WO) / Qaaz (qxqaaaaz)", "'qaz-Qaaz-WO-qxqaaaaz' should display as 'qaz (WO) / Qaaz (qxqaaaaz)'");
-
- // Check multiple variant subtags.
- todo_is(isc.getDictionaryDisplayName("en-Cyrl-US-fonipa-fonxsamp"), "English (United States) / Cyrillic (fonipa / fonxsamp)", "'en-Cyrl-US-fonipa-fonxsamp' should display as 'English (United States) / Cyrillic (fonipa / fonxsamp)'");
- todo_is(isc.getDictionaryDisplayName("en-Cyrl-US-fonipa-qxqaaaaz"), "English (United States) / Cyrillic (fonipa / qxqaaaaz)", "'en-Cyrl-US-fonipa-qxqaaaaz' should display as 'English (United States) / Cyrillic (fonipa / qxqaaaaz)'");
- todo_is(isc.getDictionaryDisplayName("en-Cyrl-US-fonipa-fonxsamp-qxqaaaaz"), "English (United States) / Cyrillic (fonipa / fonxsamp / qxqaaaaz)", "'en-Cyrl-US-fonipa-fonxsamp-qxqaaaaz' should display as 'English (United States) / Cyrillic (fonipa / fonxsamp / qxqaaaaz)'");
- is(isc.getDictionaryDisplayName("qaz-Qaaz-WO-fonipa-fonxsamp"), "qaz (WO) / Qaaz (fonipa / fonxsamp)", "'qaz-Qaaz-WO-fonipa-fonxsamp' should display as 'qaz (WO) / Qaaz (fonipa / fonxsamp)'");
- is(isc.getDictionaryDisplayName("qaz-Qaaz-WO-fonipa-qxqaaaaz"), "qaz (WO) / Qaaz (fonipa / qxqaaaaz)", "'qaz-Qaaz-WO-fonipa-qxqaaaaz' should display as 'qaz (WO) / Qaaz (fonipa / qxqaaaaz)'");
- is(isc.getDictionaryDisplayName("qaz-Qaaz-WO-fonipa-fonxsamp-qxqaaaaz"), "qaz (WO) / Qaaz (fonipa / fonxsamp / qxqaaaaz)", "'qaz-Qaaz-WO-fonipa-fonxsamp-qxqaaaaz' should display as 'qaz (WO) / Qaaz (fonipa / fonxsamp / qxqaaaaz)'");
-
- // Check numeric region subtag.
- todo_is(isc.getDictionaryDisplayName("es-419"), "Spanish (Latin America and the Caribbean)", "'es-419' should display as 'Spanish (Latin America and the Caribbean)'");
-
- // Check that extension subtags are ignored.
- todo_is(isc.getDictionaryDisplayName("en-Cyrl-t-en-latn-m0-ungegn-2007"), "English / Cyrillic", "'en-Cyrl-t-en-latn-m0-ungegn-2007' should display as 'English / Cyrillic'");
-
- // Check that privateuse subtags are ignored.
- is(isc.getDictionaryDisplayName("en-x-ignore"), "English", "'en-x-ignore' should display as 'English'");
- is(isc.getDictionaryDisplayName("en-x-ignore-this"), "English", "'en-x-ignore-this' should display as 'English'");
- is(isc.getDictionaryDisplayName("en-x-ignore-this-subtag"), "English", "'en-x-ignore-this-subtag' should display as 'English'");
-
- // Check that both extension and privateuse subtags are ignored.
- todo_is(isc.getDictionaryDisplayName("en-Cyrl-t-en-latn-m0-ungegn-2007-x-ignore-this-subtag"), "English / Cyrillic", "'en-Cyrl-t-en-latn-m0-ungegn-2007-x-ignore-this-subtag' should display as 'English / Cyrillic'");
-
- // XXX: Check grandfathered tags.
- },
-};
diff --git a/toolkit/modules/tests/browser/browser_PageMetadata.js b/toolkit/modules/tests/browser/browser_PageMetadata.js
deleted file mode 100644
index ca6e183687..0000000000
--- a/toolkit/modules/tests/browser/browser_PageMetadata.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Tests PageMetadata.jsm, which extracts metadata and microdata from a
- * document.
- */
-
-var {PageMetadata} = Cu.import("resource://gre/modules/PageMetadata.jsm", {});
-
-var rootURL = "http://example.com/browser/toolkit/modules/tests/browser/";
-
-function promiseDocument(fileName) {
- let url = rootURL + fileName;
-
- return new Promise((resolve, reject) => {
- let xhr = new XMLHttpRequest();
- xhr.onload = () => resolve(xhr.responseXML);
- xhr.onerror = () => reject(new Error("Error loading document"));
- xhr.open("GET", url);
- xhr.responseType = "document";
- xhr.send();
- });
-}
-
-/**
- * Load a simple document.
- */
-add_task(function* simpleDoc() {
- let fileName = "metadata_simple.html";
- info(`Loading a simple page, ${fileName}`);
-
- let doc = yield promiseDocument(fileName);
- Assert.notEqual(doc, null,
- "Should have a document to analyse");
-
- let data = PageMetadata.getData(doc);
- Assert.notEqual(data, null,
- "Should have non-null result");
- Assert.equal(data.url, rootURL + fileName,
- "Should have expected url property");
- Assert.equal(data.title, "Test Title",
- "Should have expected title property");
- Assert.equal(data.description, "A very simple test page",
- "Should have expected title property");
-});
-
-add_task(function* titlesDoc() {
- let fileName = "metadata_titles.html";
- info(`Loading titles page, ${fileName}`);
-
- let doc = yield promiseDocument(fileName);
- Assert.notEqual(doc, null,
- "Should have a document to analyse");
-
- let data = PageMetadata.getData(doc);
- Assert.notEqual(data, null,
- "Should have non-null result");
- Assert.equal(data.title, "Test Titles",
- "Should use the page title, not the open graph title");
-});
-
-add_task(function* titlesFallbackDoc() {
- let fileName = "metadata_titles_fallback.html";
- info(`Loading titles page, ${fileName}`);
-
- let doc = yield promiseDocument(fileName);
- Assert.notEqual(doc, null,
- "Should have a document to analyse");
-
- let data = PageMetadata.getData(doc);
- Assert.notEqual(data, null,
- "Should have non-null result");
- Assert.equal(data.title, "Title",
- "Should use the open graph title");
-});
diff --git a/toolkit/modules/tests/browser/browser_PromiseMessage.js b/toolkit/modules/tests/browser/browser_PromiseMessage.js
deleted file mode 100644
index e967ac4c97..0000000000
--- a/toolkit/modules/tests/browser/browser_PromiseMessage.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/* 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/. */
-/* global Cu, BrowserTestUtils, is, ok, add_task, gBrowser */
-"use strict";
-Cu.import("resource://gre/modules/PromiseMessage.jsm", this);
-
-
-const url = "http://example.org/tests/dom/manifest/test/resource.sjs";
-
-/**
- * Test basic API error conditions
- */
-add_task(function* () {
- yield BrowserTestUtils.withNewTab({gBrowser, url}, testPromiseMessageAPI)
-});
-
-function* testPromiseMessageAPI(aBrowser) {
- // Reusing an existing message.
- const msgKey = "DOM:WebManifest:hasManifestLink";
- const mm = aBrowser.messageManager;
- const id = "this should not change";
- const foo = "neitherShouldThis";
- const data = {id, foo};
-
- // This just returns false, and it doesn't matter for this test.
- yield PromiseMessage.send(mm, msgKey, data);
-
- // Check that no new props were added
- const props = Object.getOwnPropertyNames(data);
- ok(props.length === 2, "There should only be 2 props");
- ok(props.includes("id"), "Has the id property");
- ok(props.includes("foo"), "Has the foo property");
-
- // Check that the props didn't change.
- is(data.id, id, "The id prop must not change.");
- is(data.foo, foo, "The foo prop must not change.");
-}
diff --git a/toolkit/modules/tests/browser/browser_RemotePageManager.js b/toolkit/modules/tests/browser/browser_RemotePageManager.js
deleted file mode 100644
index 774d330348..0000000000
--- a/toolkit/modules/tests/browser/browser_RemotePageManager.js
+++ /dev/null
@@ -1,400 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-const TEST_URL = "http://www.example.com/browser/toolkit/modules/tests/browser/testremotepagemanager.html";
-
-var { RemotePages, RemotePageManager } = Cu.import("resource://gre/modules/RemotePageManager.jsm", {});
-
-function failOnMessage(message) {
- ok(false, "Should not have seen message " + message.name);
-}
-
-function waitForMessage(port, message, expectedPort = port) {
- return new Promise((resolve) => {
- function listener(message) {
- is(message.target, expectedPort, "Message should be from the right port.");
-
- port.removeMessageListener(listener);
- resolve(message);
- }
-
- port.addMessageListener(message, listener);
- });
-}
-
-function waitForPort(url, createTab = true) {
- return new Promise((resolve) => {
- RemotePageManager.addRemotePageListener(url, (port) => {
- RemotePageManager.removeRemotePageListener(url);
-
- waitForMessage(port, "RemotePage:Load").then(() => resolve(port));
- });
-
- if (createTab)
- gBrowser.selectedTab = gBrowser.addTab(url);
- });
-}
-
-function waitForPage(pages) {
- return new Promise((resolve) => {
- function listener({ target }) {
- pages.removeMessageListener("RemotePage:Init", listener);
-
- waitForMessage(target, "RemotePage:Load").then(() => resolve(target));
- }
-
- pages.addMessageListener("RemotePage:Init", listener);
- gBrowser.selectedTab = gBrowser.addTab(TEST_URL);
- });
-}
-
-function swapDocShells(browser1, browser2) {
- // Swap frameLoaders.
- browser1.swapDocShells(browser2);
-
- // Swap permanentKeys.
- let tmp = browser1.permanentKey;
- browser1.permanentKey = browser2.permanentKey;
- browser2.permanentKey = tmp;
-}
-
-// Test that opening a page creates a port, sends the load event and then
-// navigating to a new page sends the unload event. Going back should create a
-// new port
-add_task(function* init_navigate() {
- let port = yield waitForPort(TEST_URL);
- is(port.browser, gBrowser.selectedBrowser, "Port is for the correct browser");
-
- let loaded = new Promise(resolve => {
- function listener() {
- gBrowser.selectedBrowser.removeEventListener("load", listener, true);
- resolve();
- }
- gBrowser.selectedBrowser.addEventListener("load", listener, true);
- gBrowser.loadURI("about:blank");
- });
-
- yield waitForMessage(port, "RemotePage:Unload");
-
- // Port should be destroyed now
- try {
- port.addMessageListener("Foo", failOnMessage);
- ok(false, "Should have seen exception");
- }
- catch (e) {
- ok(true, "Should have seen exception");
- }
-
- try {
- port.sendAsyncMessage("Foo");
- ok(false, "Should have seen exception");
- }
- catch (e) {
- ok(true, "Should have seen exception");
- }
-
- yield loaded;
-
- gBrowser.goBack();
- port = yield waitForPort(TEST_URL, false);
-
- port.sendAsyncMessage("Ping2");
- let message = yield waitForMessage(port, "Pong2");
- port.destroy();
-
- gBrowser.removeCurrentTab();
-});
-
-// Test that opening a page creates a port, sends the load event and then
-// closing the tab sends the unload event
-add_task(function* init_close() {
- let port = yield waitForPort(TEST_URL);
- is(port.browser, gBrowser.selectedBrowser, "Port is for the correct browser");
-
- let unloadPromise = waitForMessage(port, "RemotePage:Unload");
- gBrowser.removeCurrentTab();
- yield unloadPromise;
-
- // Port should be destroyed now
- try {
- port.addMessageListener("Foo", failOnMessage);
- ok(false, "Should have seen exception");
- }
- catch (e) {
- ok(true, "Should have seen exception");
- }
-
- try {
- port.sendAsyncMessage("Foo");
- ok(false, "Should have seen exception");
- }
- catch (e) {
- ok(true, "Should have seen exception");
- }
-});
-
-// Tests that we can send messages to individual pages even when more than one
-// is open
-add_task(function* multiple_ports() {
- let port1 = yield waitForPort(TEST_URL);
- is(port1.browser, gBrowser.selectedBrowser, "Port is for the correct browser");
-
- let port2 = yield waitForPort(TEST_URL);
- is(port2.browser, gBrowser.selectedBrowser, "Port is for the correct browser");
-
- port2.addMessageListener("Pong", failOnMessage);
- port1.sendAsyncMessage("Ping", { str: "foobar", counter: 0 });
- let message = yield waitForMessage(port1, "Pong");
- port2.removeMessageListener("Pong", failOnMessage);
- is(message.data.str, "foobar", "String should pass through");
- is(message.data.counter, 1, "Counter should be incremented");
-
- port1.addMessageListener("Pong", failOnMessage);
- port2.sendAsyncMessage("Ping", { str: "foobaz", counter: 5 });
- message = yield waitForMessage(port2, "Pong");
- port1.removeMessageListener("Pong", failOnMessage);
- is(message.data.str, "foobaz", "String should pass through");
- is(message.data.counter, 6, "Counter should be incremented");
-
- let unloadPromise = waitForMessage(port2, "RemotePage:Unload");
- gBrowser.removeTab(gBrowser.getTabForBrowser(port2.browser));
- yield unloadPromise;
-
- try {
- port2.addMessageListener("Pong", failOnMessage);
- ok(false, "Should not have been able to add a new message listener to a destroyed port.");
- }
- catch (e) {
- ok(true, "Should not have been able to add a new message listener to a destroyed port.");
- }
-
- port1.sendAsyncMessage("Ping", { str: "foobar", counter: 0 });
- message = yield waitForMessage(port1, "Pong");
- is(message.data.str, "foobar", "String should pass through");
- is(message.data.counter, 1, "Counter should be incremented");
-
- unloadPromise = waitForMessage(port1, "RemotePage:Unload");
- gBrowser.removeTab(gBrowser.getTabForBrowser(port1.browser));
- yield unloadPromise;
-});
-
-// Tests that swapping browser docshells doesn't break the ports
-add_task(function* browser_switch() {
- let port1 = yield waitForPort(TEST_URL);
- is(port1.browser, gBrowser.selectedBrowser, "Port is for the correct browser");
- let browser1 = gBrowser.selectedBrowser;
- port1.sendAsyncMessage("SetCookie", { value: "om nom" });
-
- let port2 = yield waitForPort(TEST_URL);
- is(port2.browser, gBrowser.selectedBrowser, "Port is for the correct browser");
- let browser2 = gBrowser.selectedBrowser;
- port2.sendAsyncMessage("SetCookie", { value: "om nom nom" });
-
- port2.addMessageListener("Cookie", failOnMessage);
- port1.sendAsyncMessage("GetCookie");
- let message = yield waitForMessage(port1, "Cookie");
- port2.removeMessageListener("Cookie", failOnMessage);
- is(message.data.value, "om nom", "Should have the right cookie");
-
- port1.addMessageListener("Cookie", failOnMessage);
- port2.sendAsyncMessage("GetCookie", { str: "foobaz", counter: 5 });
- message = yield waitForMessage(port2, "Cookie");
- port1.removeMessageListener("Cookie", failOnMessage);
- is(message.data.value, "om nom nom", "Should have the right cookie");
-
- swapDocShells(browser1, browser2);
- is(port1.browser, browser2, "Should have noticed the swap");
- is(port2.browser, browser1, "Should have noticed the swap");
-
- // Cookies should have stayed the same
- port2.addMessageListener("Cookie", failOnMessage);
- port1.sendAsyncMessage("GetCookie");
- message = yield waitForMessage(port1, "Cookie");
- port2.removeMessageListener("Cookie", failOnMessage);
- is(message.data.value, "om nom", "Should have the right cookie");
-
- port1.addMessageListener("Cookie", failOnMessage);
- port2.sendAsyncMessage("GetCookie", { str: "foobaz", counter: 5 });
- message = yield waitForMessage(port2, "Cookie");
- port1.removeMessageListener("Cookie", failOnMessage);
- is(message.data.value, "om nom nom", "Should have the right cookie");
-
- swapDocShells(browser1, browser2);
- is(port1.browser, browser1, "Should have noticed the swap");
- is(port2.browser, browser2, "Should have noticed the swap");
-
- // Cookies should have stayed the same
- port2.addMessageListener("Cookie", failOnMessage);
- port1.sendAsyncMessage("GetCookie");
- message = yield waitForMessage(port1, "Cookie");
- port2.removeMessageListener("Cookie", failOnMessage);
- is(message.data.value, "om nom", "Should have the right cookie");
-
- port1.addMessageListener("Cookie", failOnMessage);
- port2.sendAsyncMessage("GetCookie", { str: "foobaz", counter: 5 });
- message = yield waitForMessage(port2, "Cookie");
- port1.removeMessageListener("Cookie", failOnMessage);
- is(message.data.value, "om nom nom", "Should have the right cookie");
-
- let unloadPromise = waitForMessage(port2, "RemotePage:Unload");
- gBrowser.removeTab(gBrowser.getTabForBrowser(browser2));
- yield unloadPromise;
-
- unloadPromise = waitForMessage(port1, "RemotePage:Unload");
- gBrowser.removeTab(gBrowser.getTabForBrowser(browser1));
- yield unloadPromise;
-});
-
-// Tests that removeMessageListener in chrome works
-add_task(function* remove_chrome_listener() {
- let port = yield waitForPort(TEST_URL);
- is(port.browser, gBrowser.selectedBrowser, "Port is for the correct browser");
-
- // This relies on messages sent arriving in the same order. Pong will be
- // sent back before Pong2 so if removeMessageListener fails the test will fail
- port.addMessageListener("Pong", failOnMessage);
- port.removeMessageListener("Pong", failOnMessage);
- port.sendAsyncMessage("Ping", { str: "remove_listener", counter: 27 });
- port.sendAsyncMessage("Ping2");
- yield waitForMessage(port, "Pong2");
-
- let unloadPromise = waitForMessage(port, "RemotePage:Unload");
- gBrowser.removeCurrentTab();
- yield unloadPromise;
-});
-
-// Tests that removeMessageListener in content works
-add_task(function* remove_content_listener() {
- let port = yield waitForPort(TEST_URL);
- is(port.browser, gBrowser.selectedBrowser, "Port is for the correct browser");
-
- // This relies on messages sent arriving in the same order. Pong3 would be
- // sent back before Pong2 so if removeMessageListener fails the test will fail
- port.addMessageListener("Pong3", failOnMessage);
- port.sendAsyncMessage("Ping3");
- port.sendAsyncMessage("Ping2");
- yield waitForMessage(port, "Pong2");
-
- let unloadPromise = waitForMessage(port, "RemotePage:Unload");
- gBrowser.removeCurrentTab();
- yield unloadPromise;
-});
-
-// Test RemotePages works
-add_task(function* remote_pages_basic() {
- let pages = new RemotePages(TEST_URL);
- let port = yield waitForPage(pages);
- is(port.browser, gBrowser.selectedBrowser, "Port is for the correct browser");
-
- // Listening to global messages should work
- let unloadPromise = waitForMessage(pages, "RemotePage:Unload", port);
- gBrowser.removeCurrentTab();
- yield unloadPromise;
-
- pages.destroy();
-
- // RemotePages should be destroyed now
- try {
- pages.addMessageListener("Foo", failOnMessage);
- ok(false, "Should have seen exception");
- }
- catch (e) {
- ok(true, "Should have seen exception");
- }
-
- try {
- pages.sendAsyncMessage("Foo");
- ok(false, "Should have seen exception");
- }
- catch (e) {
- ok(true, "Should have seen exception");
- }
-});
-
-// Test sending messages to all remote pages works
-add_task(function* remote_pages_multiple() {
- let pages = new RemotePages(TEST_URL);
- let port1 = yield waitForPage(pages);
- let port2 = yield waitForPage(pages);
-
- let pongPorts = [];
- yield new Promise((resolve) => {
- function listener({ name, target, data }) {
- is(name, "Pong", "Should have seen the right response.");
- is(data.str, "remote_pages", "String should pass through");
- is(data.counter, 43, "Counter should be incremented");
- pongPorts.push(target);
- if (pongPorts.length == 2)
- resolve();
- }
-
- pages.addMessageListener("Pong", listener);
- pages.sendAsyncMessage("Ping", { str: "remote_pages", counter: 42 });
- });
-
- // We don't make any guarantees about which order messages are sent to known
- // pages so the pongs could have come back in any order.
- isnot(pongPorts[0], pongPorts[1], "Should have received pongs from different ports");
- ok(pongPorts.indexOf(port1) >= 0, "Should have seen a pong from port1");
- ok(pongPorts.indexOf(port2) >= 0, "Should have seen a pong from port2");
-
- // After destroy we should see no messages
- pages.addMessageListener("RemotePage:Unload", failOnMessage);
- pages.destroy();
-
- gBrowser.removeTab(gBrowser.getTabForBrowser(port1.browser));
- gBrowser.removeTab(gBrowser.getTabForBrowser(port2.browser));
-});
-
-// Test sending various types of data across the boundary
-add_task(function* send_data() {
- let port = yield waitForPort(TEST_URL);
- is(port.browser, gBrowser.selectedBrowser, "Port is for the correct browser");
-
- let data = {
- integer: 45,
- real: 45.78,
- str: "foobar",
- array: [1, 2, 3, 5, 27]
- };
-
- port.sendAsyncMessage("SendData", data);
- let message = yield waitForMessage(port, "ReceivedData");
-
- ok(message.data.result, message.data.status);
-
- gBrowser.removeCurrentTab();
-});
-
-// Test sending an object of data across the boundary
-add_task(function* send_data2() {
- let port = yield waitForPort(TEST_URL);
- is(port.browser, gBrowser.selectedBrowser, "Port is for the correct browser");
-
- let data = {
- integer: 45,
- real: 45.78,
- str: "foobar",
- array: [1, 2, 3, 5, 27]
- };
-
- port.sendAsyncMessage("SendData2", {data});
- let message = yield waitForMessage(port, "ReceivedData2");
-
- ok(message.data.result, message.data.status);
-
- gBrowser.removeCurrentTab();
-});
-
-add_task(function* get_ports_for_browser() {
- let pages = new RemotePages(TEST_URL);
- let port = yield waitForPage(pages);
- // waitForPage creates a new tab and selects it by default, so
- // the selected tab should be the one hosting this port.
- let browser = gBrowser.selectedBrowser;
- let foundPorts = pages.portsForBrowser(browser);
- is(foundPorts.length, 1, "There should only be one port for this simple page");
- is(foundPorts[0], port, "Should find the port");
- gBrowser.removeCurrentTab();
-});
diff --git a/toolkit/modules/tests/browser/browser_Troubleshoot.js b/toolkit/modules/tests/browser/browser_Troubleshoot.js
deleted file mode 100644
index ebc4de1f92..0000000000
--- a/toolkit/modules/tests/browser/browser_Troubleshoot.js
+++ /dev/null
@@ -1,559 +0,0 @@
-/* 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/. */
-
-// Ideally this would be an xpcshell test, but Troubleshoot relies on things
-// that aren't initialized outside of a XUL app environment like AddonManager
-// and the "@mozilla.org/xre/app-info;1" component.
-
-Components.utils.import("resource://gre/modules/AppConstants.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/Troubleshoot.jsm");
-
-function test() {
- waitForExplicitFinish();
- function doNextTest() {
- if (!tests.length) {
- finish();
- return;
- }
- tests.shift()(doNextTest);
- }
- doNextTest();
-}
-
-registerCleanupFunction(function () {
- // Troubleshoot.jsm is imported into the global scope -- the window -- above.
- // If it's not deleted, it outlives the test and is reported as a leak.
- delete window.Troubleshoot;
-});
-
-var tests = [
-
- function snapshotSchema(done) {
- Troubleshoot.snapshot(function (snapshot) {
- try {
- validateObject(snapshot, SNAPSHOT_SCHEMA);
- ok(true, "The snapshot should conform to the schema.");
- }
- catch (err) {
- ok(false, "Schema mismatch, " + err);
- }
- done();
- });
- },
-
- function modifiedPreferences(done) {
- let prefs = [
- "javascript.troubleshoot",
- "troubleshoot.foo",
- "javascript.print_to_filename",
- "network.proxy.troubleshoot",
- ];
- prefs.forEach(function (p) {
- Services.prefs.setBoolPref(p, true);
- is(Services.prefs.getBoolPref(p), true, "The pref should be set: " + p);
- });
- Troubleshoot.snapshot(function (snapshot) {
- let p = snapshot.modifiedPreferences;
- is(p["javascript.troubleshoot"], true,
- "The pref should be present because it's whitelisted " +
- "but not blacklisted.");
- ok(!("troubleshoot.foo" in p),
- "The pref should be absent because it's not in the whitelist.");
- ok(!("javascript.print_to_filename" in p),
- "The pref should be absent because it's blacklisted.");
- ok(!("network.proxy.troubleshoot" in p),
- "The pref should be absent because it's blacklisted.");
- prefs.forEach(p => Services.prefs.deleteBranch(p));
- done();
- });
- },
-
- function unicodePreferences(done) {
- let name = "font.name.sans-serif.x-western";
- let utf8Value = "\xc4\x8capk\xc5\xafv Krasopis"
- let unicodeValue = "\u010Capk\u016Fv Krasopis";
-
- // set/getCharPref work with 8bit strings (utf8)
- Services.prefs.setCharPref(name, utf8Value);
-
- Troubleshoot.snapshot(function (snapshot) {
- let p = snapshot.modifiedPreferences;
- is(p[name], unicodeValue, "The pref should have correct Unicode value.");
- Services.prefs.deleteBranch(name);
- done();
- });
- }
-];
-
-// This is inspired by JSON Schema, or by the example on its Wikipedia page
-// anyway.
-const SNAPSHOT_SCHEMA = {
- type: "object",
- required: true,
- properties: {
- application: {
- required: true,
- type: "object",
- properties: {
- name: {
- required: true,
- type: "string",
- },
- version: {
- required: true,
- type: "string",
- },
- buildID: {
- required: true,
- type: "string",
- },
- userAgent: {
- required: true,
- type: "string",
- },
- osVersion: {
- required: true,
- type: "string",
- },
- vendor: {
- type: "string",
- },
- updateChannel: {
- type: "string",
- },
- supportURL: {
- type: "string",
- },
- numTotalWindows: {
- type: "number",
- },
- numRemoteWindows: {
- type: "number",
- },
- safeMode: {
- type: "boolean",
- },
- },
- },
- crashes: {
- required: false,
- type: "object",
- properties: {
- pending: {
- required: true,
- type: "number",
- },
- submitted: {
- required: true,
- type: "array",
- items: {
- type: "object",
- properties: {
- id: {
- required: true,
- type: "string",
- },
- date: {
- required: true,
- type: "number",
- },
- pending: {
- required: true,
- type: "boolean",
- },
- },
- },
- },
- },
- },
- extensions: {
- required: true,
- type: "array",
- items: {
- type: "object",
- properties: {
- name: {
- required: true,
- type: "string",
- },
- version: {
- required: true,
- type: "string",
- },
- id: {
- required: true,
- type: "string",
- },
- isActive: {
- required: true,
- type: "boolean",
- },
- },
- },
- },
- modifiedPreferences: {
- required: true,
- type: "object",
- },
- lockedPreferences: {
- required: true,
- type: "object",
- },
- graphics: {
- required: true,
- type: "object",
- properties: {
- numTotalWindows: {
- required: true,
- type: "number",
- },
- numAcceleratedWindows: {
- required: true,
- type: "number",
- },
- windowLayerManagerType: {
- type: "string",
- },
- windowLayerManagerRemote: {
- type: "boolean",
- },
- supportsHardwareH264: {
- type: "string",
- },
- currentAudioBackend: {
- type: "string",
- },
- numAcceleratedWindowsMessage: {
- type: "array",
- },
- adapterDescription: {
- type: "string",
- },
- adapterVendorID: {
- type: "string",
- },
- adapterDeviceID: {
- type: "string",
- },
- adapterSubsysID: {
- type: "string",
- },
- adapterRAM: {
- type: "string",
- },
- adapterDrivers: {
- type: "string",
- },
- driverVersion: {
- type: "string",
- },
- driverDate: {
- type: "string",
- },
- adapterDescription2: {
- type: "string",
- },
- adapterVendorID2: {
- type: "string",
- },
- adapterDeviceID2: {
- type: "string",
- },
- adapterSubsysID2: {
- type: "string",
- },
- adapterRAM2: {
- type: "string",
- },
- adapterDrivers2: {
- type: "string",
- },
- driverVersion2: {
- type: "string",
- },
- driverDate2: {
- type: "string",
- },
- isGPU2Active: {
- type: "boolean",
- },
- direct2DEnabled: {
- type: "boolean",
- },
- directWriteEnabled: {
- type: "boolean",
- },
- directWriteVersion: {
- type: "string",
- },
- clearTypeParameters: {
- type: "string",
- },
- webgl1Renderer: {
- type: "string",
- },
- webgl1Version: {
- type: "string",
- },
- webgl1DriverExtensions: {
- type: "string",
- },
- webgl1Extensions: {
- type: "string",
- },
- webgl1WSIInfo: {
- type: "string",
- },
- webgl2Renderer: {
- type: "string",
- },
- webgl2Version: {
- type: "string",
- },
- webgl2DriverExtensions: {
- type: "string",
- },
- webgl2Extensions: {
- type: "string",
- },
- webgl2WSIInfo: {
- type: "string",
- },
- info: {
- type: "object",
- },
- failures: {
- type: "array",
- items: {
- type: "string",
- },
- },
- indices: {
- type: "array",
- items: {
- type: "number",
- },
- },
- featureLog: {
- type: "object",
- },
- crashGuards: {
- type: "array",
- },
- direct2DEnabledMessage: {
- type: "array",
- },
- },
- },
- javaScript: {
- required: true,
- type: "object",
- properties: {
- incrementalGCEnabled: {
- type: "boolean",
- },
- },
- },
- accessibility: {
- required: true,
- type: "object",
- properties: {
- isActive: {
- required: true,
- type: "boolean",
- },
- forceDisabled: {
- type: "number",
- },
- },
- },
- libraryVersions: {
- required: true,
- type: "object",
- properties: {
- NSPR: {
- required: true,
- type: "object",
- properties: {
- minVersion: {
- required: true,
- type: "string",
- },
- version: {
- required: true,
- type: "string",
- },
- },
- },
- NSS: {
- required: true,
- type: "object",
- properties: {
- minVersion: {
- required: true,
- type: "string",
- },
- version: {
- required: true,
- type: "string",
- },
- },
- },
- NSSUTIL: {
- required: true,
- type: "object",
- properties: {
- minVersion: {
- required: true,
- type: "string",
- },
- version: {
- required: true,
- type: "string",
- },
- },
- },
- NSSSSL: {
- required: true,
- type: "object",
- properties: {
- minVersion: {
- required: true,
- type: "string",
- },
- version: {
- required: true,
- type: "string",
- },
- },
- },
- NSSSMIME: {
- required: true,
- type: "object",
- properties: {
- minVersion: {
- required: true,
- type: "string",
- },
- version: {
- required: true,
- type: "string",
- },
- },
- },
- },
- },
- userJS: {
- required: true,
- type: "object",
- properties: {
- exists: {
- required: true,
- type: "boolean",
- },
- },
- },
- experiments: {
- type: "array",
- },
- sandbox: {
- required: false,
- type: "object",
- properties: {
- hasSeccompBPF: {
- required: AppConstants.platform == "linux",
- type: "boolean"
- },
- hasSeccompTSync: {
- required: AppConstants.platform == "linux",
- type: "boolean"
- },
- hasUserNamespaces: {
- required: AppConstants.platform == "linux",
- type: "boolean"
- },
- hasPrivilegedUserNamespaces: {
- required: AppConstants.platform == "linux",
- type: "boolean"
- },
- canSandboxContent: {
- required: false,
- type: "boolean"
- },
- canSandboxMedia: {
- required: false,
- type: "boolean"
- },
- },
- },
- },
-};
-
-/**
- * Throws an Error if obj doesn't conform to schema. That way you get a nice
- * error message and a stack to help you figure out what went wrong, which you
- * wouldn't get if this just returned true or false instead. There's still
- * room for improvement in communicating validation failures, however.
- *
- * @param obj The object to validate.
- * @param schema The schema that obj should conform to.
- */
-function validateObject(obj, schema) {
- if (obj === undefined && !schema.required)
- return;
- if (typeof(schema.type) != "string")
- throw schemaErr("'type' must be a string", schema);
- if (objType(obj) != schema.type)
- throw validationErr("Object is not of the expected type", obj, schema);
- let validatorFnName = "validateObject_" + schema.type;
- if (!(validatorFnName in this))
- throw schemaErr("Validator function not defined for type", schema);
- this[validatorFnName](obj, schema);
-}
-
-function validateObject_object(obj, schema) {
- if (typeof(schema.properties) != "object")
- // Don't care what obj's properties are.
- return;
- // First check that all the schema's properties match the object.
- for (let prop in schema.properties)
- validateObject(obj[prop], schema.properties[prop]);
- // Now check that the object doesn't have any properties not in the schema.
- for (let prop in obj)
- if (!(prop in schema.properties))
- throw validationErr("Object has property "+prop+" not in schema", obj, schema);
-}
-
-function validateObject_array(array, schema) {
- if (typeof(schema.items) != "object")
- // Don't care what the array's elements are.
- return;
- array.forEach(elt => validateObject(elt, schema.items));
-}
-
-function validateObject_string(str, schema) {}
-function validateObject_boolean(bool, schema) {}
-function validateObject_number(num, schema) {}
-
-function validationErr(msg, obj, schema) {
- return new Error("Validation error: " + msg +
- ": object=" + JSON.stringify(obj) +
- ", schema=" + JSON.stringify(schema));
-}
-
-function schemaErr(msg, schema) {
- return new Error("Schema error: " + msg + ": " + JSON.stringify(schema));
-}
-
-function objType(obj) {
- let type = typeof(obj);
- if (type != "object")
- return type;
- if (Array.isArray(obj))
- return "array";
- if (obj === null)
- return "null";
- return type;
-}
diff --git a/toolkit/modules/tests/browser/browser_WebNavigation.js b/toolkit/modules/tests/browser/browser_WebNavigation.js
deleted file mode 100644
index e09cb19948..0000000000
--- a/toolkit/modules/tests/browser/browser_WebNavigation.js
+++ /dev/null
@@ -1,140 +0,0 @@
-"use strict";
-
-var { interfaces: Ci, classes: Cc, utils: Cu, results: Cr } = Components;
-
-var {WebNavigation} = Cu.import("resource://gre/modules/WebNavigation.jsm", {});
-
-const BASE = "http://example.com/browser/toolkit/modules/tests/browser";
-const URL = BASE + "/file_WebNavigation_page1.html";
-const FRAME = BASE + "/file_WebNavigation_page2.html";
-const FRAME2 = BASE + "/file_WebNavigation_page3.html";
-
-const EVENTS = [
- "onBeforeNavigate",
- "onCommitted",
- "onDOMContentLoaded",
- "onCompleted",
- "onErrorOccurred",
- "onReferenceFragmentUpdated",
-];
-
-const REQUIRED = [
- "onBeforeNavigate",
- "onCommitted",
- "onDOMContentLoaded",
- "onCompleted",
-];
-
-var expectedBrowser;
-var received = [];
-var completedResolve;
-var waitingURL, waitingEvent;
-var rootWindowID;
-
-function gotEvent(event, details)
-{
- if (!details.url.startsWith(BASE)) {
- return;
- }
- info(`Got ${event} ${details.url} ${details.windowId} ${details.parentWindowId}`);
-
- is(details.browser, expectedBrowser, "correct <browser> element");
-
- received.push({url: details.url, event});
-
- if (typeof(rootWindowID) == "undefined") {
- rootWindowID = details.windowId;
- }
-
- if (details.url == URL) {
- is(details.windowId, rootWindowID, "root window ID correct");
- } else {
- is(details.parentWindowId, rootWindowID, "parent window ID correct");
- isnot(details.windowId, rootWindowID, "window ID probably okay");
- }
-
- isnot(details.windowId, undefined);
- isnot(details.parentWindowId, undefined);
-
- if (details.url == waitingURL && event == waitingEvent) {
- completedResolve();
- }
-}
-
-function loadViaFrameScript(url, event, script)
-{
- // Loading via a frame script ensures that the chrome process never
- // "gets ahead" of frame scripts in non-e10s mode.
- received = [];
- waitingURL = url;
- waitingEvent = event;
- expectedBrowser.messageManager.loadFrameScript("data:," + script, false);
- return new Promise(resolve => { completedResolve = resolve; });
-}
-
-add_task(function* webnav_ordering() {
- let listeners = {};
- for (let event of EVENTS) {
- listeners[event] = gotEvent.bind(null, event);
- WebNavigation[event].addListener(listeners[event]);
- }
-
- gBrowser.selectedTab = gBrowser.addTab();
- let browser = gBrowser.selectedBrowser;
- expectedBrowser = browser;
-
- yield BrowserTestUtils.browserLoaded(browser);
-
- yield loadViaFrameScript(URL, "onCompleted", `content.location = "${URL}";`);
-
- function checkRequired(url) {
- for (let event of REQUIRED) {
- let found = false;
- for (let r of received) {
- if (r.url == url && r.event == event) {
- found = true;
- }
- }
- ok(found, `Received event ${event} from ${url}`);
- }
- }
-
- checkRequired(URL);
- checkRequired(FRAME);
-
- function checkBefore(action1, action2) {
- function find(action) {
- for (let i = 0; i < received.length; i++) {
- if (received[i].url == action.url && received[i].event == action.event) {
- return i;
- }
- }
- return -1;
- }
-
- let index1 = find(action1);
- let index2 = find(action2);
- ok(index1 != -1, `Action ${JSON.stringify(action1)} happened`);
- ok(index2 != -1, `Action ${JSON.stringify(action2)} happened`);
- ok(index1 < index2, `Action ${JSON.stringify(action1)} happened before ${JSON.stringify(action2)}`);
- }
-
- checkBefore({url: URL, event: "onCommitted"}, {url: FRAME, event: "onBeforeNavigate"});
- checkBefore({url: FRAME, event: "onCompleted"}, {url: URL, event: "onCompleted"});
-
- yield loadViaFrameScript(FRAME2, "onCompleted", `content.frames[0].location = "${FRAME2}";`);
-
- checkRequired(FRAME2);
-
- yield loadViaFrameScript(FRAME2 + "#ref", "onReferenceFragmentUpdated",
- "content.frames[0].document.getElementById('elt').click();");
-
- info("Received onReferenceFragmentUpdated from FRAME2");
-
- gBrowser.removeCurrentTab();
-
- for (let event of EVENTS) {
- WebNavigation[event].removeListener(listeners[event]);
- }
-});
-
diff --git a/toolkit/modules/tests/browser/browser_WebRequest.js b/toolkit/modules/tests/browser/browser_WebRequest.js
deleted file mode 100644
index cdb28b16cd..0000000000
--- a/toolkit/modules/tests/browser/browser_WebRequest.js
+++ /dev/null
@@ -1,214 +0,0 @@
-"use strict";
-
-var { interfaces: Ci, classes: Cc, utils: Cu, results: Cr } = Components;
-
-var {WebRequest} = Cu.import("resource://gre/modules/WebRequest.jsm", {});
-
-const BASE = "http://example.com/browser/toolkit/modules/tests/browser";
-const URL = BASE + "/file_WebRequest_page1.html";
-
-var expected_browser;
-
-function checkType(details)
-{
- let expected_type = "???";
- if (details.url.indexOf("style") != -1) {
- expected_type = "stylesheet";
- } else if (details.url.indexOf("image") != -1) {
- expected_type = "image";
- } else if (details.url.indexOf("script") != -1) {
- expected_type = "script";
- } else if (details.url.indexOf("page1") != -1) {
- expected_type = "main_frame";
- } else if (/page2|_redirection\.|dummy_page/.test(details.url)) {
- expected_type = "sub_frame";
- } else if (details.url.indexOf("xhr") != -1) {
- expected_type = "xmlhttprequest";
- }
- is(details.type, expected_type, "resource type is correct");
-}
-
-var windowIDs = new Map();
-
-var requested = [];
-
-function onBeforeRequest(details)
-{
- info(`onBeforeRequest ${details.url}`);
- if (details.url.startsWith(BASE)) {
- requested.push(details.url);
-
- is(details.browser, expected_browser, "correct <browser> element");
- checkType(details);
-
- windowIDs.set(details.url, details.windowId);
- if (details.url.indexOf("page2") != -1) {
- let page1id = windowIDs.get(URL);
- ok(details.windowId != page1id, "sub-frame gets its own window ID");
- is(details.parentWindowId, page1id, "parent window id is correct");
- }
- }
- if (details.url.indexOf("_bad.") != -1) {
- return {cancel: true};
- }
- return undefined;
-}
-
-var sendHeaders = [];
-
-function onBeforeSendHeaders(details)
-{
- info(`onBeforeSendHeaders ${details.url}`);
- if (details.url.startsWith(BASE)) {
- sendHeaders.push(details.url);
-
- is(details.browser, expected_browser, "correct <browser> element");
- checkType(details);
-
- let id = windowIDs.get(details.url);
- is(id, details.windowId, "window ID same in onBeforeSendHeaders as onBeforeRequest");
- }
- if (details.url.indexOf("_redirect.") != -1) {
- return {redirectUrl: details.url.replace("_redirect.", "_good.")};
- }
- return undefined;
-}
-
-var beforeRedirect = [];
-
-function onBeforeRedirect(details)
-{
- info(`onBeforeRedirect ${details.url} -> ${details.redirectUrl}`);
- checkType(details);
- if (details.url.startsWith(BASE)) {
- beforeRedirect.push(details.url);
-
- is(details.browser, expected_browser, "correct <browser> element");
- checkType(details);
-
- let expectedUrl = details.url.replace("_redirect.", "_good.").replace(/\w+_redirection\..*/, "dummy_page.html")
- is(details.redirectUrl, expectedUrl, "Correct redirectUrl value");
- }
- let id = windowIDs.get(details.url);
- is(id, details.windowId, "window ID same in onBeforeRedirect as onBeforeRequest");
- // associate stored windowId with final url
- windowIDs.set(details.redirectUrl, details.windowId);
- return {};
-}
-
-var headersReceived = [];
-
-function onResponseStarted(details)
-{
- if (details.url.startsWith(BASE)) {
- headersReceived.push(details.url);
- }
-}
-
-const expected_requested = [BASE + "/file_WebRequest_page1.html",
- BASE + "/file_style_good.css",
- BASE + "/file_style_bad.css",
- BASE + "/file_style_redirect.css",
- BASE + "/file_image_good.png",
- BASE + "/file_image_bad.png",
- BASE + "/file_image_redirect.png",
- BASE + "/file_script_good.js",
- BASE + "/file_script_bad.js",
- BASE + "/file_script_redirect.js",
- BASE + "/file_script_xhr.js",
- BASE + "/file_WebRequest_page2.html",
- BASE + "/nonexistent_script_url.js",
- BASE + "/WebRequest_redirection.sjs",
- BASE + "/dummy_page.html",
- BASE + "/xhr_resource"];
-
-const expected_sendHeaders = [BASE + "/file_WebRequest_page1.html",
- BASE + "/file_style_good.css",
- BASE + "/file_style_redirect.css",
- BASE + "/file_image_good.png",
- BASE + "/file_image_redirect.png",
- BASE + "/file_script_good.js",
- BASE + "/file_script_redirect.js",
- BASE + "/file_script_xhr.js",
- BASE + "/file_WebRequest_page2.html",
- BASE + "/nonexistent_script_url.js",
- BASE + "/WebRequest_redirection.sjs",
- BASE + "/dummy_page.html",
- BASE + "/xhr_resource"];
-
-const expected_beforeRedirect = expected_sendHeaders.filter(u => /_redirect\./.test(u))
- .concat(BASE + "/WebRequest_redirection.sjs");
-
-const expected_headersReceived = [BASE + "/file_WebRequest_page1.html",
- BASE + "/file_style_good.css",
- BASE + "/file_image_good.png",
- BASE + "/file_script_good.js",
- BASE + "/file_script_xhr.js",
- BASE + "/file_WebRequest_page2.html",
- BASE + "/nonexistent_script_url.js",
- BASE + "/dummy_page.html",
- BASE + "/xhr_resource"];
-
-function removeDupes(list)
-{
- let j = 0;
- for (let i = 1; i < list.length; i++) {
- if (list[i] != list[j]) {
- j++;
- if (i != j) {
- list[j] = list[i];
- }
- }
- }
- list.length = j + 1;
-}
-
-function compareLists(list1, list2, kind)
-{
- list1.sort();
- removeDupes(list1);
- list2.sort();
- removeDupes(list2);
- is(String(list1), String(list2), `${kind} URLs correct`);
-}
-
-function* test_once()
-{
- WebRequest.onBeforeRequest.addListener(onBeforeRequest, null, ["blocking"]);
- WebRequest.onBeforeSendHeaders.addListener(onBeforeSendHeaders, null, ["blocking"]);
- WebRequest.onBeforeRedirect.addListener(onBeforeRedirect);
- WebRequest.onResponseStarted.addListener(onResponseStarted);
-
- yield BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank" },
- function* (browser) {
- expected_browser = browser;
- BrowserTestUtils.loadURI(browser, URL);
- yield BrowserTestUtils.browserLoaded(expected_browser);
-
- expected_browser = null;
-
- yield ContentTask.spawn(browser, null, function() {
- let win = content.wrappedJSObject;
- is(win.success, 2, "Good script ran");
- is(win.failure, undefined, "Failure script didn't run");
-
- let style =
- content.getComputedStyle(content.document.getElementById("test"), null);
- is(style.getPropertyValue("color"), "rgb(255, 0, 0)", "Good CSS loaded");
- });
- });
-
- compareLists(requested, expected_requested, "requested");
- compareLists(sendHeaders, expected_sendHeaders, "sendHeaders");
- compareLists(beforeRedirect, expected_beforeRedirect, "beforeRedirect");
- compareLists(headersReceived, expected_headersReceived, "headersReceived");
-
- WebRequest.onBeforeRequest.removeListener(onBeforeRequest);
- WebRequest.onBeforeSendHeaders.removeListener(onBeforeSendHeaders);
- WebRequest.onBeforeRedirect.removeListener(onBeforeRedirect);
- WebRequest.onResponseStarted.removeListener(onResponseStarted);
-}
-
-// Run the test twice to make sure it works with caching.
-add_task(test_once);
-add_task(test_once);
diff --git a/toolkit/modules/tests/browser/browser_WebRequest_cookies.js b/toolkit/modules/tests/browser/browser_WebRequest_cookies.js
deleted file mode 100644
index b8c4f24cb4..0000000000
--- a/toolkit/modules/tests/browser/browser_WebRequest_cookies.js
+++ /dev/null
@@ -1,89 +0,0 @@
-"use strict";
-
-var { interfaces: Ci, classes: Cc, utils: Cu, results: Cr } = Components;
-
-var {WebRequest} = Cu.import("resource://gre/modules/WebRequest.jsm", {});
-
-const BASE = "http://example.com/browser/toolkit/modules/tests/browser";
-const URL = BASE + "/WebRequest_dynamic.sjs";
-
-var countBefore = 0;
-var countAfter = 0;
-
-function onBeforeSendHeaders(details)
-{
- if (details.url != URL) {
- return undefined;
- }
-
- countBefore++;
-
- info(`onBeforeSendHeaders ${details.url}`);
- let found = false;
- let headers = [];
- for (let {name, value} of details.requestHeaders) {
- info(`Saw header ${name} '${value}'`);
- if (name == "Cookie") {
- is(value, "foopy=1", "Cookie is correct");
- headers.push({name, value: "blinky=1"});
- found = true;
- } else {
- headers.push({name, value});
- }
- }
- ok(found, "Saw cookie header");
-
- return {requestHeaders: headers};
-}
-
-function onResponseStarted(details)
-{
- if (details.url != URL) {
- return;
- }
-
- countAfter++;
-
- info(`onResponseStarted ${details.url}`);
- let found = false;
- for (let {name, value} of details.responseHeaders) {
- info(`Saw header ${name} '${value}'`);
- if (name == "Set-Cookie") {
- is(value, "dinky=1", "Cookie is correct");
- found = true;
- }
- }
- ok(found, "Saw cookie header");
-}
-
-add_task(function* filter_urls() {
- // First load the URL so that we set cookie foopy=1.
- gBrowser.selectedTab = gBrowser.addTab(URL);
- yield waitForLoad();
- gBrowser.removeCurrentTab();
-
- // Now load with WebRequest set up.
- WebRequest.onBeforeSendHeaders.addListener(onBeforeSendHeaders, null, ["blocking"]);
- WebRequest.onResponseStarted.addListener(onResponseStarted, null);
-
- gBrowser.selectedTab = gBrowser.addTab(URL);
-
- yield waitForLoad();
-
- gBrowser.removeCurrentTab();
-
- WebRequest.onBeforeSendHeaders.removeListener(onBeforeSendHeaders);
- WebRequest.onResponseStarted.removeListener(onResponseStarted);
-
- is(countBefore, 1, "onBeforeSendHeaders hit once");
- is(countAfter, 1, "onResponseStarted hit once");
-});
-
-function waitForLoad(browser = gBrowser.selectedBrowser) {
- return new Promise(resolve => {
- browser.addEventListener("load", function listener() {
- browser.removeEventListener("load", listener, true);
- resolve();
- }, true);
- });
-}
diff --git a/toolkit/modules/tests/browser/browser_WebRequest_filtering.js b/toolkit/modules/tests/browser/browser_WebRequest_filtering.js
deleted file mode 100644
index a456678c16..0000000000
--- a/toolkit/modules/tests/browser/browser_WebRequest_filtering.js
+++ /dev/null
@@ -1,118 +0,0 @@
-"use strict";
-
-var { interfaces: Ci, classes: Cc, utils: Cu, results: Cr } = Components;
-
-var {WebRequest} = Cu.import("resource://gre/modules/WebRequest.jsm", {});
-var {MatchPattern} = Cu.import("resource://gre/modules/MatchPattern.jsm", {});
-
-const BASE = "http://example.com/browser/toolkit/modules/tests/browser";
-const URL = BASE + "/file_WebRequest_page2.html";
-
-var requested = [];
-
-function onBeforeRequest(details)
-{
- info(`onBeforeRequest ${details.url}`);
- if (details.url.startsWith(BASE)) {
- requested.push(details.url);
- }
-}
-
-var sendHeaders = [];
-
-function onBeforeSendHeaders(details)
-{
- info(`onBeforeSendHeaders ${details.url}`);
- if (details.url.startsWith(BASE)) {
- sendHeaders.push(details.url);
- }
-}
-
-var completed = [];
-
-function onResponseStarted(details)
-{
- if (details.url.startsWith(BASE)) {
- completed.push(details.url);
- }
-}
-
-const expected_urls = [BASE + "/file_style_good.css",
- BASE + "/file_style_bad.css",
- BASE + "/file_style_redirect.css"];
-
-function removeDupes(list)
-{
- let j = 0;
- for (let i = 1; i < list.length; i++) {
- if (list[i] != list[j]) {
- j++;
- if (i != j) {
- list[j] = list[i];
- }
- }
- }
- list.length = j + 1;
-}
-
-function compareLists(list1, list2, kind)
-{
- list1.sort();
- removeDupes(list1);
- list2.sort();
- removeDupes(list2);
- is(String(list1), String(list2), `${kind} URLs correct`);
-}
-
-add_task(function* filter_urls() {
- let filter = {urls: new MatchPattern("*://*/*_style_*")};
-
- WebRequest.onBeforeRequest.addListener(onBeforeRequest, filter, ["blocking"]);
- WebRequest.onBeforeSendHeaders.addListener(onBeforeSendHeaders, filter, ["blocking"]);
- WebRequest.onResponseStarted.addListener(onResponseStarted, filter);
-
- gBrowser.selectedTab = gBrowser.addTab(URL);
-
- yield waitForLoad();
-
- gBrowser.removeCurrentTab();
-
- compareLists(requested, expected_urls, "requested");
- compareLists(sendHeaders, expected_urls, "sendHeaders");
- compareLists(completed, expected_urls, "completed");
-
- WebRequest.onBeforeRequest.removeListener(onBeforeRequest);
- WebRequest.onBeforeSendHeaders.removeListener(onBeforeSendHeaders);
- WebRequest.onResponseStarted.removeListener(onResponseStarted);
-});
-
-add_task(function* filter_types() {
- let filter = {types: ["stylesheet"]};
-
- WebRequest.onBeforeRequest.addListener(onBeforeRequest, filter, ["blocking"]);
- WebRequest.onBeforeSendHeaders.addListener(onBeforeSendHeaders, filter, ["blocking"]);
- WebRequest.onResponseStarted.addListener(onResponseStarted, filter);
-
- gBrowser.selectedTab = gBrowser.addTab(URL);
-
- yield waitForLoad();
-
- gBrowser.removeCurrentTab();
-
- compareLists(requested, expected_urls, "requested");
- compareLists(sendHeaders, expected_urls, "sendHeaders");
- compareLists(completed, expected_urls, "completed");
-
- WebRequest.onBeforeRequest.removeListener(onBeforeRequest);
- WebRequest.onBeforeSendHeaders.removeListener(onBeforeSendHeaders);
- WebRequest.onResponseStarted.removeListener(onResponseStarted);
-});
-
-function waitForLoad(browser = gBrowser.selectedBrowser) {
- return new Promise(resolve => {
- browser.addEventListener("load", function listener() {
- browser.removeEventListener("load", listener, true);
- resolve();
- }, true);
- });
-}
diff --git a/toolkit/modules/tests/browser/dummy_page.html b/toolkit/modules/tests/browser/dummy_page.html
deleted file mode 100644
index c1c9a4e043..0000000000
--- a/toolkit/modules/tests/browser/dummy_page.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-<body>
-<p>Page</p>
-</body>
-</html>
diff --git a/toolkit/modules/tests/browser/file_FinderSample.html b/toolkit/modules/tests/browser/file_FinderSample.html
deleted file mode 100644
index e952d1fe97..0000000000
--- a/toolkit/modules/tests/browser/file_FinderSample.html
+++ /dev/null
@@ -1,824 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>Childe Roland</title>
-</head>
-<body>
-<h1>"Childe Roland to the Dark Tower Came"</h1><h5>Robert Browning</h5>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>I.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>My first thought was, he lied in every word,
-<dl>
-<dd>That hoary cripple, with malicious eye</dd>
-<dd>Askance to watch the working of his lie</dd>
-</dl>
-</dd>
-<dd>On mine, and mouth scarce able to afford</dd>
-<dd>Suppression of the glee that pursed and scored
-<dl>
-<dd>Its edge, at one more victim gained thereby.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>II.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>What else should he be set for, with his staff?
-<dl>
-<dd>What, save to waylay with his lies, ensnare</dd>
-<dd>All travellers who might find him posted there,</dd>
-</dl>
-</dd>
-<dd>And ask the road? I guessed what skull-like laugh</dd>
-<dd>Would break, what crutch 'gin write my epitaph
-<dl>
-<dd>For pastime in the dusty thoroughfare,</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>III.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>If at his counsel I should turn aside
-<dl>
-<dd>Into that ominous tract which, all agree,</dd>
-<dd>Hides the Dark Tower. Yet acquiescingly</dd>
-</dl>
-</dd>
-<dd>I did turn as he pointed: neither pride</dd>
-<dd>Nor hope rekindling at the end descried,
-<dl>
-<dd>So much as gladness that some end might be.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>IV.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>For, what with my whole world-wide wandering,
-<dl>
-<dd>What with my search drawn out thro' years, my hope</dd>
-<dd>Dwindled into a ghost not fit to cope</dd>
-</dl>
-</dd>
-<dd>With that obstreperous joy success would bring,</dd>
-<dd>I hardly tried now to rebuke the spring
-<dl>
-<dd>My heart made, finding failure in its scope.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>V.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>As when a sick man very near to death
-<dl>
-<dd>Seems dead indeed, and feels begin and end</dd>
-<dd>The tears and takes the farewell of each friend,</dd>
-</dl>
-</dd>
-<dd>And hears one bid the other go, draw breath</dd>
-<dd>Freelier outside ("since all is o'er," he saith,
-<dl>
-<dd>"And the blow fallen no grieving can amend;")</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>VI.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>While some discuss if near the other graves
-<dl>
-<dd>Be room enough for this, and when a day</dd>
-<dd>Suits best for carrying the corpse away,</dd>
-</dl>
-</dd>
-<dd>With care about the banners, scarves and staves:</dd>
-<dd>And still the man hears all, and only craves
-<dl>
-<dd>He may not shame such tender love and stay.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>VII.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>Thus, I had so long suffered in this quest,
-<dl>
-<dd>Heard failure prophesied so oft, been writ</dd>
-<dd>So many times among "The Band" - to wit,</dd>
-</dl>
-</dd>
-<dd>The knights who to the Dark Tower's search addressed</dd>
-<dd>Their steps - that just to fail as they, seemed best,
-<dl>
-<dd>And all the doubt was now—should I be fit?</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>VIII.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>So, quiet as despair, I turned from him,
-<dl>
-<dd>That hateful cripple, out of his highway</dd>
-<dd>Into the path he pointed. All the day</dd>
-</dl>
-</dd>
-<dd>Had been a dreary one at best, and dim</dd>
-<dd>Was settling to its close, yet shot one grim
-<dl>
-<dd>Red leer to see the plain catch its estray.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>IX.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>For mark! no sooner was I fairly found
-<dl>
-<dd>Pledged to the plain, after a pace or two,</dd>
-<dd>Than, pausing to throw backward a last view</dd>
-</dl>
-</dd>
-<dd>O'er the safe road, 'twas gone; grey plain all round:</dd>
-<dd>Nothing but plain to the horizon's bound.
-<dl>
-<dd>I might go on; nought else remained to do.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>X.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>So, on I went. I think I never saw
-<dl>
-<dd>Such starved ignoble nature; nothing throve:</dd>
-<dd>For flowers - as well expect a cedar grove!</dd>
-</dl>
-</dd>
-<dd>But cockle, spurge, according to their law</dd>
-<dd>Might propagate their kind, with none to awe,
-<dl>
-<dd>You'd think; a burr had been a treasure trove.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XI.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>No! penury, inertness and grimace,
-<dl>
-<dd>In some strange sort, were the land's portion. "See</dd>
-<dd>Or shut your eyes," said Nature peevishly,</dd>
-</dl>
-</dd>
-<dd>"It nothing skills: I cannot help my case:</dd>
-<dd>'Tis the Last Judgment's fire must cure this place,
-<dl>
-<dd>Calcine its clods and set my prisoners free."</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XII.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>If there pushed any ragged thistle-stalk
-<dl>
-<dd>Above its mates, the head was chopped; the bents</dd>
-<dd>Were jealous else. What made those holes and rents</dd>
-</dl>
-</dd>
-<dd>In the dock's harsh swarth leaves, bruised as to baulk</dd>
-<dd>All hope of greenness? 'tis a brute must walk
-<dl>
-<dd>Pashing their life out, with a brute's intents.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XIII.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>As for the grass, it grew as scant as hair
-<dl>
-<dd>In leprosy; thin dry blades pricked the mud</dd>
-<dd>Which underneath looked kneaded up with blood.</dd>
-</dl>
-</dd>
-<dd>One stiff blind horse, his every bone a-stare,</dd>
-<dd>Stood stupefied, however he came there:
-<dl>
-<dd>Thrust out past service from the devil's stud!</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XIV.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>Alive? he might be dead for aught I know,
-<dl>
-<dd>With that red gaunt and colloped neck a-strain,</dd>
-<dd>And shut eyes underneath the rusty mane;</dd>
-</dl>
-</dd>
-<dd>Seldom went such grotesqueness with such woe;</dd>
-<dd>I never saw a brute I hated so;
-<dl>
-<dd>He must be wicked to deserve such pain.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XV.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>I shut my eyes and turned them on my heart.
-<dl>
-<dd>As a man calls for wine before he fights,</dd>
-<dd>I asked one draught of earlier, happier sights,</dd>
-</dl>
-</dd>
-<dd>Ere fitly I could hope to play my part.</dd>
-<dd>Think first, fight afterwards - the soldier's art:
-<dl>
-<dd>One taste of the old time sets all to rights.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XVI.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>Not it! I fancied Cuthbert's reddening face
-<dl>
-<dd>Beneath its garniture of curly gold,</dd>
-<dd>Dear fellow, till I almost felt him fold</dd>
-</dl>
-</dd>
-<dd>An arm in mine to fix me to the place</dd>
-<dd>That way he used. Alas, one night's disgrace!
-<dl>
-<dd>Out went my heart's new fire and left it cold.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XVII.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>Giles then, the soul of honour - there he stands
-<dl>
-<dd>Frank as ten years ago when knighted first.</dd>
-<dd>What honest men should dare (he said) he durst.</dd>
-</dl>
-</dd>
-<dd>Good - but the scene shifts - faugh! what hangman hands</dd>
-<dd>Pin to his breast a parchment? His own bands
-<dl>
-<dd>Read it. Poor traitor, spit upon and curst!</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XVIII.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>Better this present than a past like that;
-<dl>
-<dd>Back therefore to my darkening path again!</dd>
-<dd>No sound, no sight as far as eye could strain.</dd>
-</dl>
-</dd>
-<dd>Will the night send a howlet or a bat?</dd>
-<dd>I asked: when something on the dismal flat
-<dl>
-<dd>Came to arrest my thoughts and change their train.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XIX.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>A sudden little river crossed my path
-<dl>
-<dd>As unexpected as a serpent comes.</dd>
-<dd>No sluggish tide congenial to the glooms;</dd>
-</dl>
-</dd>
-<dd>This, as it frothed by, might have been a bath</dd>
-<dd>For the fiend's glowing hoof - to see the wrath
-<dl>
-<dd>Of its black eddy bespate with flakes and spumes.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XX.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>So petty yet so spiteful! All along
-<dl>
-<dd>Low scrubby alders kneeled down over it;</dd>
-<dd>Drenched willows flung them headlong in a fit</dd>
-</dl>
-</dd>
-<dd>Of mute despair, a suicidal throng:</dd>
-<dd>The river which had done them all the wrong,
-<dl>
-<dd>Whate'er that was, rolled by, deterred no whit.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XXI.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>Which, while I forded, - good saints, how I feared
-<dl>
-<dd>To set my foot upon a dead man's cheek,</dd>
-<dd>Each step, or feel the spear I thrust to seek</dd>
-</dl>
-</dd>
-<dd>For hollows, tangled in his hair or beard!</dd>
-<dd>—It may have been a water-rat I speared,
-<dl>
-<dd>But, ugh! it sounded like a baby's shriek.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XXII.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>Glad was I when I reached the other bank.
-<dl>
-<dd>Now for a better country. Vain presage!</dd>
-<dd>Who were the strugglers, what war did they wage,</dd>
-</dl>
-</dd>
-<dd>Whose savage trample thus could pad the dank</dd>
-<dd>Soil to a plash? Toads in a poisoned tank,
-<dl>
-<dd>Or wild cats in a red-hot iron cage—</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XXIII.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>The fight must so have seemed in that fell cirque.
-<dl>
-<dd>What penned them there, with all the plain to choose?</dd>
-<dd>No foot-print leading to that horrid mews,</dd>
-</dl>
-</dd>
-<dd>None out of it. Mad brewage set to work</dd>
-<dd>Their brains, no doubt, like galley-slaves the Turk
-<dl>
-<dd>Pits for his pastime, Christians against Jews.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XXIV.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>And more than that - a furlong on - why, there!
-<dl>
-<dd>What bad use was that engine for, that wheel,</dd>
-<dd>Or brake, not wheel - that harrow fit to reel</dd>
-</dl>
-</dd>
-<dd>Men's bodies out like silk? with all the air</dd>
-<dd>Of Tophet's tool, on earth left unaware,
-<dl>
-<dd>Or brought to sharpen its rusty teeth of steel.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XXV.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>Then came a bit of stubbed ground, once a wood,
-<dl>
-<dd>Next a marsh, it would seem, and now mere earth</dd>
-<dd>Desperate and done with; (so a fool finds mirth,</dd>
-</dl>
-</dd>
-<dd>Makes a thing and then mars it, till his mood</dd>
-<dd>Changes and off he goes!) within a rood—
-<dl>
-<dd>Bog, clay and rubble, sand and stark black dearth.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XXVI.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>Now blotches rankling, coloured gay and grim,
-<dl>
-<dd>Now patches where some leanness of the soil's</dd>
-<dd>Broke into moss or substances like boils;</dd>
-</dl>
-</dd>
-<dd>Then came some palsied oak, a cleft in him</dd>
-<dd>Like a distorted mouth that splits its rim
-<dl>
-<dd>Gaping at death, and dies while it recoils.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XXVII.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>And just as far as ever from the end!
-<dl>
-<dd>Nought in the distance but the evening, nought</dd>
-<dd>To point my footstep further! At the thought,</dd>
-</dl>
-</dd>
-<dd>A great black bird, Apollyon's bosom-friend,</dd>
-<dd>Sailed past, nor beat his wide wing dragon-penned
-<dl>
-<dd>That brushed my cap—perchance the guide I sought.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XXVIII.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>For, looking up, aware I somehow grew,
-<dl>
-<dd>'Spite of the dusk, the plain had given place</dd>
-<dd>All round to mountains - with such name to grace</dd>
-</dl>
-</dd>
-<dd>Mere ugly heights and heaps now stolen in view.</dd>
-<dd>How thus they had surprised me, - solve it, you!
-<dl>
-<dd>How to get from them was no clearer case.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XXIX.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>Yet half I seemed to recognise some trick
-<dl>
-<dd>Of mischief happened to me, God knows when—</dd>
-<dd>In a bad dream perhaps. Here ended, then,</dd>
-</dl>
-</dd>
-<dd>Progress this way. When, in the very nick</dd>
-<dd>Of giving up, one time more, came a click
-<dl>
-<dd>As when a trap shuts - you're inside the den!</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XXX.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>Burningly it came on me all at once,
-<dl>
-<dd>This was the place! those two hills on the right,</dd>
-<dd>Crouched like two bulls locked horn in horn in fight;</dd>
-</dl>
-</dd>
-<dd>While to the left, a tall scalped mountain... Dunce,</dd>
-<dd>Dotard, a-dozing at the very nonce,
-<dl>
-<dd>After a life spent training for the sight!</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XXXI.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>What in the midst lay but the Tower itself?
-<dl>
-<dd>The round squat turret, blind as the fool's heart</dd>
-<dd>Built of brown stone, without a counterpart</dd>
-</dl>
-</dd>
-<dd>In the whole world. The tempest's mocking elf</dd>
-<dd>Points to the shipman thus the unseen shelf
-<dl>
-<dd>He strikes on, only when the timbers start.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XXXII.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>Not see? because of night perhaps? - why, day
-<dl>
-<dd>Came back again for that! before it left,</dd>
-<dd>The dying sunset kindled through a cleft:</dd>
-</dl>
-</dd>
-<dd>The hills, like giants at a hunting, lay</dd>
-<dd>Chin upon hand, to see the game at bay,—
-<dl>
-<dd>"Now stab and end the creature - to the heft!"</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XXXIII.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>Not hear? when noise was everywhere! it tolled
-<dl>
-<dd>Increasing like a bell. Names in my ears</dd>
-<dd>Of all the lost adventurers my peers,—</dd>
-</dl>
-</dd>
-<dd>How such a one was strong, and such was bold,</dd>
-<dd>And such was fortunate, yet each of old
-<dl>
-<dd>Lost, lost! one moment knelled the woe of years.</dd>
-</dl>
-</dd>
-</dl>
-<p><br /></p>
-<dl>
-<dd>
-<dl>
-<dd>
-<dl>
-<dd>XXXIV.</dd>
-</dl>
-</dd>
-</dl>
-</dd>
-<dd>There they stood, ranged along the hillsides, met
-<dl>
-<dd>To view the last of me, a living frame</dd>
-<dd>For one more picture! in a sheet of flame</dd>
-</dl>
-</dd>
-<dd>I saw them and I knew them all. And yet</dd>
-<dd>Dauntless the slug-horn to my lips I set,
-<dl>
-<dd>And blew "<i>Childe Roland to the Dark Tower came.</i>"</dd>
-</dl>
-</dd>
-</dl>
-</body>
-</html>
diff --git a/toolkit/modules/tests/browser/file_WebNavigation_page1.html b/toolkit/modules/tests/browser/file_WebNavigation_page1.html
deleted file mode 100644
index 1b68697562..0000000000
--- a/toolkit/modules/tests/browser/file_WebNavigation_page1.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE HTML>
-
-<html>
-<body>
-
-<iframe src="file_WebNavigation_page2.html" width="200" height="200"></iframe>
-
-</body>
-</html>
diff --git a/toolkit/modules/tests/browser/file_WebNavigation_page2.html b/toolkit/modules/tests/browser/file_WebNavigation_page2.html
deleted file mode 100644
index cc1acc83d6..0000000000
--- a/toolkit/modules/tests/browser/file_WebNavigation_page2.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<!DOCTYPE HTML>
-
-<html>
-<body>
-
-</body>
-</html>
diff --git a/toolkit/modules/tests/browser/file_WebNavigation_page3.html b/toolkit/modules/tests/browser/file_WebNavigation_page3.html
deleted file mode 100644
index a0a26a2e9d..0000000000
--- a/toolkit/modules/tests/browser/file_WebNavigation_page3.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE HTML>
-
-<html>
-<body>
-
-<a id="elt" href="file_WebNavigation_page3.html#ref">click me</a>
-
-</body>
-</html>
diff --git a/toolkit/modules/tests/browser/file_WebRequest_page1.html b/toolkit/modules/tests/browser/file_WebRequest_page1.html
deleted file mode 100644
index 00a0b9b4b6..0000000000
--- a/toolkit/modules/tests/browser/file_WebRequest_page1.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE HTML>
-
-<html>
-<head>
-<meta charset="utf-8">
-<link rel="stylesheet" href="file_style_good.css">
-<link rel="stylesheet" href="file_style_bad.css">
-<link rel="stylesheet" href="file_style_redirect.css">
-</head>
-<body>
-
-<div id="test">Sample text</div>
-
-<img id="img_good" src="file_image_good.png">
-<img id="img_bad" src="file_image_bad.png">
-<img id="img_redirect" src="file_image_redirect.png">
-
-<script src="file_script_good.js"></script>
-<script src="file_script_bad.js"></script>
-<script src="file_script_redirect.js"></script>
-
-<script src="file_script_xhr.js"></script>
-
-<script src="nonexistent_script_url.js"></script>
-
-<iframe src="file_WebRequest_page2.html" width="200" height="200"></iframe>
-<iframe src="WebRequest_redirection.sjs" width="200" height="50"></iframe>
-</body>
-</html>
diff --git a/toolkit/modules/tests/browser/file_WebRequest_page2.html b/toolkit/modules/tests/browser/file_WebRequest_page2.html
deleted file mode 100644
index b2cf48f9e1..0000000000
--- a/toolkit/modules/tests/browser/file_WebRequest_page2.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE HTML>
-
-<html>
-<head>
-<meta charset="utf-8">
-<link rel="stylesheet" href="file_style_good.css">
-<link rel="stylesheet" href="file_style_bad.css">
-<link rel="stylesheet" href="file_style_redirect.css">
-</head>
-<body>
-
-<div class="test">Sample text</div>
-
-<img id="img_good" src="file_image_good.png">
-<img id="img_bad" src="file_image_bad.png">
-<img id="img_redirect" src="file_image_redirect.png">
-
-<script src="file_script_good.js"></script>
-<script src="file_script_bad.js"></script>
-<script src="file_script_redirect.js"></script>
-
-<script src="nonexistent_script_url.js"></script>
-
-</body>
-</html>
diff --git a/toolkit/modules/tests/browser/file_image_bad.png b/toolkit/modules/tests/browser/file_image_bad.png
deleted file mode 100644
index 4c3be50847..0000000000
--- a/toolkit/modules/tests/browser/file_image_bad.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/modules/tests/browser/file_image_good.png b/toolkit/modules/tests/browser/file_image_good.png
deleted file mode 100644
index 769c636340..0000000000
--- a/toolkit/modules/tests/browser/file_image_good.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/modules/tests/browser/file_image_redirect.png b/toolkit/modules/tests/browser/file_image_redirect.png
deleted file mode 100644
index 4c3be50847..0000000000
--- a/toolkit/modules/tests/browser/file_image_redirect.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/modules/tests/browser/file_script_bad.js b/toolkit/modules/tests/browser/file_script_bad.js
deleted file mode 100644
index 90655f136f..0000000000
--- a/toolkit/modules/tests/browser/file_script_bad.js
+++ /dev/null
@@ -1 +0,0 @@
-window.failure = true;
diff --git a/toolkit/modules/tests/browser/file_script_good.js b/toolkit/modules/tests/browser/file_script_good.js
deleted file mode 100644
index b128e54a16..0000000000
--- a/toolkit/modules/tests/browser/file_script_good.js
+++ /dev/null
@@ -1 +0,0 @@
-window.success = window.success ? window.success + 1 : 1;
diff --git a/toolkit/modules/tests/browser/file_script_redirect.js b/toolkit/modules/tests/browser/file_script_redirect.js
deleted file mode 100644
index 917b5d6202..0000000000
--- a/toolkit/modules/tests/browser/file_script_redirect.js
+++ /dev/null
@@ -1,2 +0,0 @@
-window.failure = true;
-
diff --git a/toolkit/modules/tests/browser/file_script_xhr.js b/toolkit/modules/tests/browser/file_script_xhr.js
deleted file mode 100644
index bc1f65eae1..0000000000
--- a/toolkit/modules/tests/browser/file_script_xhr.js
+++ /dev/null
@@ -1,3 +0,0 @@
-var request = new XMLHttpRequest();
-request.open("get", "http://example.com/browser/toolkit/modules/tests/browser/xhr_resource", false);
-request.send();
diff --git a/toolkit/modules/tests/browser/file_style_bad.css b/toolkit/modules/tests/browser/file_style_bad.css
deleted file mode 100644
index 8dbc8dc7a4..0000000000
--- a/toolkit/modules/tests/browser/file_style_bad.css
+++ /dev/null
@@ -1,3 +0,0 @@
-#test {
- color: green !important;
-}
diff --git a/toolkit/modules/tests/browser/file_style_good.css b/toolkit/modules/tests/browser/file_style_good.css
deleted file mode 100644
index 46f9774b5f..0000000000
--- a/toolkit/modules/tests/browser/file_style_good.css
+++ /dev/null
@@ -1,3 +0,0 @@
-#test {
- color: red;
-}
diff --git a/toolkit/modules/tests/browser/file_style_redirect.css b/toolkit/modules/tests/browser/file_style_redirect.css
deleted file mode 100644
index 8dbc8dc7a4..0000000000
--- a/toolkit/modules/tests/browser/file_style_redirect.css
+++ /dev/null
@@ -1,3 +0,0 @@
-#test {
- color: green !important;
-}
diff --git a/toolkit/modules/tests/browser/head.js b/toolkit/modules/tests/browser/head.js
deleted file mode 100644
index 777e087e11..0000000000
--- a/toolkit/modules/tests/browser/head.js
+++ /dev/null
@@ -1,23 +0,0 @@
-function removeDupes(list)
-{
- let j = 0;
- for (let i = 1; i < list.length; i++) {
- if (list[i] != list[j]) {
- j++;
- if (i != j) {
- list[j] = list[i];
- }
- }
- }
- list.length = j + 1;
-}
-
-function compareLists(list1, list2, kind)
-{
- list1.sort();
- removeDupes(list1);
- list2.sort();
- removeDupes(list2);
- is(String(list1), String(list2), `${kind} URLs correct`);
-}
-
diff --git a/toolkit/modules/tests/browser/metadata_simple.html b/toolkit/modules/tests/browser/metadata_simple.html
deleted file mode 100644
index 18089e3992..0000000000
--- a/toolkit/modules/tests/browser/metadata_simple.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>Test Title</title>
- <meta property="description" content="A very simple test page">
- </head>
- <body>
- Llama.
- </body>
-</html>
diff --git a/toolkit/modules/tests/browser/metadata_titles.html b/toolkit/modules/tests/browser/metadata_titles.html
deleted file mode 100644
index bd42013044..0000000000
--- a/toolkit/modules/tests/browser/metadata_titles.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>Test Titles</title>
- <meta property="description" content="A very simple test page" />
- <meta property="og:title" content="Title" />
- </head>
- <body>
- Llama.
- </body>
-</html>
diff --git a/toolkit/modules/tests/browser/metadata_titles_fallback.html b/toolkit/modules/tests/browser/metadata_titles_fallback.html
deleted file mode 100644
index 5b71879b22..0000000000
--- a/toolkit/modules/tests/browser/metadata_titles_fallback.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta property="description" content="A very simple test page" />
- <meta property="og:title" content="Title" />
- </head>
- <body>
- Llama.
- </body>
-</html>
diff --git a/toolkit/modules/tests/browser/testremotepagemanager.html b/toolkit/modules/tests/browser/testremotepagemanager.html
deleted file mode 100644
index 4303a38f54..0000000000
--- a/toolkit/modules/tests/browser/testremotepagemanager.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<!DOCTYPE HTML>
-
-<html>
-<head>
-<script type="text/javascript">
-addMessageListener("Ping", function(message) {
- sendAsyncMessage("Pong", {
- str: message.data.str,
- counter: message.data.counter + 1
- });
-});
-
-addMessageListener("Ping2", function(message) {
- sendAsyncMessage("Pong2", message.data);
-});
-
-function neverCalled() {
- sendAsyncMessage("Pong3");
-}
-addMessageListener("Pong3", neverCalled);
-removeMessageListener("Pong3", neverCalled);
-
-function testData(data) {
- var response = {
- result: true,
- status: "All data correctly received"
- }
-
- function compare(prop, expected) {
- if (uneval(data[prop]) == uneval(expected))
- return;
- if (response.result)
- response.status = "";
- response.result = false;
- response.status += "Property " + prop + " should have been " + expected + " but was " + data[prop] + "\n";
- }
-
- compare("integer", 45);
- compare("real", 45.78);
- compare("str", "foobar");
- compare("array", [1, 2, 3, 5, 27]);
-
- return response;
-}
-
-addMessageListener("SendData", function(message) {
- sendAsyncMessage("ReceivedData", testData(message.data));
-});
-
-addMessageListener("SendData2", function(message) {
- sendAsyncMessage("ReceivedData2", testData(message.data.data));
-});
-
-var cookie = "nom";
-addMessageListener("SetCookie", function(message) {
- cookie = message.data.value;
-});
-
-addMessageListener("GetCookie", function(message) {
- sendAsyncMessage("Cookie", { value: cookie });
-});
-</script>
-</head>
-<body>
-</body>
-</html>
diff --git a/toolkit/modules/tests/chrome/.eslintrc.js b/toolkit/modules/tests/chrome/.eslintrc.js
deleted file mode 100644
index 2c669d844e..0000000000
--- a/toolkit/modules/tests/chrome/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../testing/mochitest/chrome.eslintrc.js"
- ]
-};
diff --git a/toolkit/modules/tests/chrome/chrome.ini b/toolkit/modules/tests/chrome/chrome.ini
deleted file mode 100644
index a272309190..0000000000
--- a/toolkit/modules/tests/chrome/chrome.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[DEFAULT]
-
-[test_bug544442_checkCert.xul]
diff --git a/toolkit/modules/tests/chrome/test_bug544442_checkCert.xul b/toolkit/modules/tests/chrome/test_bug544442_checkCert.xul
deleted file mode 100644
index dd0ce8fbd0..0000000000
--- a/toolkit/modules/tests/chrome/test_bug544442_checkCert.xul
+++ /dev/null
@@ -1,155 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Test CertUtils.jsm checkCert - bug 340198 and bug 544442"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="testStart();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-
-SimpleTest.waitForExplicitFinish();
-
-Components.utils.import("resource://gre/modules/CertUtils.jsm");
-
-function testStart() {
- ok(true, "Entering testStart");
-
- var request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].
- createInstance(Ci.nsIXMLHttpRequest);
- request.open("GET", "https://example.com/", true);
- request.channel.notificationCallbacks = new BadCertHandler(true);
- request.onerror = function(event) { testXHRError(event); };
- request.onload = function(event) { testXHRLoad(event); };
- request.send(null);
-}
-
-function testXHRError(aEvent) {
- ok(true, "Entering testXHRError - something went wrong");
-
- var request = aEvent.target;
- var status = 0;
- try {
- status = request.status;
- }
- catch (e) {
- }
-
- if (status == 0)
- status = request.channel.QueryInterface(Ci.nsIRequest).status;
-
- ok(false, "XHR onerror called: " + status);
-
- SimpleTest.finish();
-}
-
-function getCheckCertResult(aChannel, aAllowNonBuiltIn, aCerts) {
- try {
- checkCert(aChannel, aAllowNonBuiltIn, aCerts);
- }
- catch (e) {
- return e.result;
- }
- return Cr.NS_OK;
-}
-
-function testXHRLoad(aEvent) {
- ok(true, "Entering testXHRLoad");
-
- var channel = aEvent.target.channel;
-
- var certs = null;
- is(getCheckCertResult(channel, false, certs), Cr.NS_ERROR_ABORT,
- "checkCert should throw NS_ERROR_ABORT when the certificate attributes " +
- "array passed to checkCert is null and the certificate is not builtin");
-
- is(getCheckCertResult(channel, true, certs), Cr.NS_OK,
- "checkCert should not throw when the certificate attributes array " +
- "passed to checkCert is null and builtin certificates aren't enforced");
-
- certs = [ { invalidAttribute: "Invalid attribute" } ];
- is(getCheckCertResult(channel, false, certs), Cr.NS_ERROR_ILLEGAL_VALUE,
- "checkCert should throw NS_ERROR_ILLEGAL_VALUE when the certificate " +
- "attributes array passed to checkCert has an element that has an " +
- "attribute that does not exist on the certificate");
-
- certs = [ { issuerName: "Incorrect issuerName" } ];
- is(getCheckCertResult(channel, false, certs), Cr.NS_ERROR_ILLEGAL_VALUE,
- "checkCert should throw NS_ERROR_ILLEGAL_VALUE when the certificate " +
- "attributes array passed to checkCert has an element that has an " +
- "issuerName that is not the same as the certificate's");
-
- var cert = channel.securityInfo.QueryInterface(Ci.nsISSLStatusProvider).
- SSLStatus.QueryInterface(Ci.nsISSLStatus).serverCert;
-
- certs = [ { issuerName: cert.issuerName,
- commonName: cert.commonName } ];
- is(getCheckCertResult(channel, false, certs), Cr.NS_ERROR_ABORT,
- "checkCert should throw NS_ERROR_ABORT when the certificate attributes " +
- "array passed to checkCert has a single element that has the same " +
- "issuerName and commonName as the certificate's and the certificate is " +
- "not builtin");
-
- is(getCheckCertResult(channel, true, certs), Cr.NS_OK,
- "checkCert should not throw when the certificate attributes array " +
- "passed to checkCert has a single element that has the same issuerName " +
- "and commonName as the certificate's and and builtin certificates " +
- "aren't enforced");
-
- certs = [ { issuerName: "Incorrect issuerName",
- invalidAttribute: "Invalid attribute" },
- { issuerName: cert.issuerName,
- commonName: "Invalid Common Name" },
- { issuerName: cert.issuerName,
- commonName: cert.commonName } ];
- is(getCheckCertResult(channel, false, certs), Cr.NS_ERROR_ABORT,
- "checkCert should throw NS_ERROR_ABORT when the certificate attributes " +
- "array passed to checkCert has an element that has the same issuerName " +
- "and commonName as the certificate's and the certificate is not builtin");
-
- is(getCheckCertResult(channel, true, certs), Cr.NS_OK,
- "checkCert should not throw when the certificate attributes array " +
- "passed to checkCert has an element that has the same issuerName and " +
- "commonName as the certificate's and builtin certificates aren't enforced");
-
- var mockChannel = { originalURI: Cc["@mozilla.org/network/io-service;1"].
- getService(Ci.nsIIOService).
- newURI("http://example.com/", null, null) };
-
- certs = [ ];
- is(getCheckCertResult(mockChannel, false, certs), Cr.NS_ERROR_UNEXPECTED,
- "checkCert should throw NS_ERROR_UNEXPECTED when the certificate " +
- "attributes array passed to checkCert is not null and the channel's " +
- "originalURI is not https");
-
- certs = null;
- is(getCheckCertResult(mockChannel, false, certs), Cr.NS_OK,
- "checkCert should not throw when the certificate attributes object " +
- "passed to checkCert is null and the the channel's originalURI is not " +
- "https");
-
- SimpleTest.finish();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/modules/tests/mochitest/.eslintrc.js b/toolkit/modules/tests/mochitest/.eslintrc.js
deleted file mode 100644
index 3c788d6d68..0000000000
--- a/toolkit/modules/tests/mochitest/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../testing/mochitest/mochitest.eslintrc.js"
- ]
-};
diff --git a/toolkit/modules/tests/mochitest/mochitest.ini b/toolkit/modules/tests/mochitest/mochitest.ini
deleted file mode 100644
index 852d95539f..0000000000
--- a/toolkit/modules/tests/mochitest/mochitest.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[DEFAULT]
-
-[test_spatial_navigation.html]
diff --git a/toolkit/modules/tests/mochitest/test_spatial_navigation.html b/toolkit/modules/tests/mochitest/test_spatial_navigation.html
deleted file mode 100644
index c1fbb0eec8..0000000000
--- a/toolkit/modules/tests/mochitest/test_spatial_navigation.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=698437
--->
-<head>
- <meta charset="utf-8">
- <title>Test for Bug 698437</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
- <script type="application/javascript">
-
- /** Test for Bug 698437 **/
-
- SimpleTest.waitForExplicitFinish();
-
- function Test() {
- if (!SpecialPowers.getBoolPref("snav.enabled")) {
- todo(false, "Enable spatial navigiation on this platform.");
- SimpleTest.finish();
- return;
- }
-
- var center = document.getElementById("center");
- var right = document.getElementById("right");
- var left = document.getElementById("left");
- var top = document.getElementById("top");
- var bottom = document.getElementById("bottom");
-
- console.log(top);
- console.log(bottom);
- console.log(center);
- console.log(left);
- console.log(right);
-
- center.focus();
- is(center.id, document.activeElement.id, "How did we call focus on center and it did" +
- " not become the active element?");
-
- synthesizeKey("VK_UP", { });
- is(document.activeElement.id, top.id,
- "Spatial navigation up key is not handled correctly.");
-
- center.focus();
- synthesizeKey("VK_DOWN", { });
- is(document.activeElement.id, bottom.id,
- "Spatial navigation down key is not handled correctly.");
-
- center.focus();
- synthesizeKey("VK_RIGHT", { });
- is(document.activeElement.id, right.id,
- "Spatial navigation right key is not handled correctly.");
-
- center.focus();
- synthesizeKey("VK_LEFT", { });
- is(document.activeElement.id, left.id,
- "Spatial navigation left key is not handled correctly.");
-
- SimpleTest.finish();
- }
-
- </script>
-</head>
-<body onload="Test();">
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=698437">Mozilla Bug 698437</a>
-<p id="display"></p>
-<div id="content">
- <button id="lefttop">1</button><button id="top">2</button><button id="righttop">3</button><br>
- <button id="left">4</button><button id="center">5</button><button id="right">6</button><br>
- <button id="leftbottom">7</button><button id="bottom">8</button><button id="rightbottom">9</button><br>
-</div>
-<pre id="test">
-</pre>
-</body>
-</html>
diff --git a/toolkit/modules/tests/xpcshell/.eslintrc.js b/toolkit/modules/tests/xpcshell/.eslintrc.js
deleted file mode 100644
index fee088c179..0000000000
--- a/toolkit/modules/tests/xpcshell/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/modules/tests/xpcshell/TestIntegration.jsm b/toolkit/modules/tests/xpcshell/TestIntegration.jsm
deleted file mode 100644
index 78a0b72671..0000000000
--- a/toolkit/modules/tests/xpcshell/TestIntegration.jsm
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Internal module used to test the generation of Integration.jsm getters.
- */
-
-"use strict";
-
-this.EXPORTED_SYMBOLS = [
- "TestIntegration",
-];
-
-const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
-
-Cu.import("resource://gre/modules/Task.jsm");
-
-this.TestIntegration = {
- value: "value",
-
- get valueFromThis() {
- return this.value;
- },
-
- get property() {
- return this._property;
- },
-
- set property(value) {
- this._property = value;
- },
-
- method(argument) {
- this.methodArgument = argument;
- return "method" + argument;
- },
-
- asyncMethod: Task.async(function* (argument) {
- this.asyncMethodArgument = argument;
- return "asyncMethod" + argument;
- }),
-};
diff --git a/toolkit/modules/tests/xpcshell/chromeappsstore.sqlite b/toolkit/modules/tests/xpcshell/chromeappsstore.sqlite
deleted file mode 100644
index 15d309df50..0000000000
--- a/toolkit/modules/tests/xpcshell/chromeappsstore.sqlite
+++ /dev/null
Binary files differ
diff --git a/toolkit/modules/tests/xpcshell/propertyLists/bug710259_propertyListBinary.plist b/toolkit/modules/tests/xpcshell/propertyLists/bug710259_propertyListBinary.plist
deleted file mode 100644
index 5888c9c9c5..0000000000
--- a/toolkit/modules/tests/xpcshell/propertyLists/bug710259_propertyListBinary.plist
+++ /dev/null
Binary files differ
diff --git a/toolkit/modules/tests/xpcshell/propertyLists/bug710259_propertyListXML.plist b/toolkit/modules/tests/xpcshell/propertyLists/bug710259_propertyListXML.plist
deleted file mode 100644
index 9b6decc1e6..0000000000
--- a/toolkit/modules/tests/xpcshell/propertyLists/bug710259_propertyListXML.plist
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>Boolean</key>
- <false/>
- <key>Array</key>
- <array>
- <string>abc</string>
- <string>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</string>
- <string>אאא</string>
- <string>אאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאאא</string>
- <string>𐀀𐀀𐀀</string>
- <date>2011-12-31T11:15:23Z</date>
- <data>MjAxMS0xMi0zMVQxMToxNTozM1o=</data>
- <dict>
- <key>Negative Number</key>
- <integer>-400</integer>
- <key>Real Number</key>
- <real>2.71828183</real>
- <key>Big Int</key>
- <integer>9007199254740993</integer>
- <key>Negative Big Int</key>
- <integer>-9007199254740993</integer>
- </dict>
- </array>
-</dict>
-</plist>
diff --git a/toolkit/modules/tests/xpcshell/test_BinarySearch.js b/toolkit/modules/tests/xpcshell/test_BinarySearch.js
deleted file mode 100644
index f48b0bccff..0000000000
--- a/toolkit/modules/tests/xpcshell/test_BinarySearch.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-Components.utils.import("resource://gre/modules/BinarySearch.jsm");
-
-function run_test() {
- // empty array
- ok([], 1, false, 0);
-
- // one-element array
- ok([2], 2, true, 0);
- ok([2], 1, false, 0);
- ok([2], 3, false, 1);
-
- // two-element array
- ok([2, 4], 2, true, 0);
- ok([2, 4], 4, true, 1);
- ok([2, 4], 1, false, 0);
- ok([2, 4], 3, false, 1);
- ok([2, 4], 5, false, 2);
-
- // three-element array
- ok([2, 4, 6], 2, true, 0);
- ok([2, 4, 6], 4, true, 1);
- ok([2, 4, 6], 6, true, 2);
- ok([2, 4, 6], 1, false, 0);
- ok([2, 4, 6], 3, false, 1);
- ok([2, 4, 6], 5, false, 2);
- ok([2, 4, 6], 7, false, 3);
-
- // duplicates
- ok([2, 2], 2, true, 0);
- ok([2, 2], 1, false, 0);
- ok([2, 2], 3, false, 2);
-
- // duplicates on the left
- ok([2, 2, 4], 2, true, 1);
- ok([2, 2, 4], 4, true, 2);
- ok([2, 2, 4], 1, false, 0);
- ok([2, 2, 4], 3, false, 2);
- ok([2, 2, 4], 5, false, 3);
-
- // duplicates on the right
- ok([2, 4, 4], 2, true, 0);
- ok([2, 4, 4], 4, true, 1);
- ok([2, 4, 4], 1, false, 0);
- ok([2, 4, 4], 3, false, 1);
- ok([2, 4, 4], 5, false, 3);
-
- // duplicates in the middle
- ok([2, 4, 4, 6], 2, true, 0);
- ok([2, 4, 4, 6], 4, true, 1);
- ok([2, 4, 4, 6], 6, true, 3);
- ok([2, 4, 4, 6], 1, false, 0);
- ok([2, 4, 4, 6], 3, false, 1);
- ok([2, 4, 4, 6], 5, false, 3);
- ok([2, 4, 4, 6], 7, false, 4);
-
- // duplicates all around
- ok([2, 2, 4, 4, 6, 6], 2, true, 0);
- ok([2, 2, 4, 4, 6, 6], 4, true, 2);
- ok([2, 2, 4, 4, 6, 6], 6, true, 4);
- ok([2, 2, 4, 4, 6, 6], 1, false, 0);
- ok([2, 2, 4, 4, 6, 6], 3, false, 2);
- ok([2, 2, 4, 4, 6, 6], 5, false, 4);
- ok([2, 2, 4, 4, 6, 6], 7, false, 6);
-}
-
-function ok(array, target, expectedFound, expectedIdx) {
- let [found, idx] = BinarySearch.search(cmp, array, target);
- do_check_eq(found, expectedFound);
- do_check_eq(idx, expectedIdx);
-
- idx = expectedFound ? expectedIdx : -1;
- do_check_eq(BinarySearch.indexOf(cmp, array, target), idx);
- do_check_eq(BinarySearch.insertionIndexOf(cmp, array, target), expectedIdx);
-}
-
-function cmp(num1, num2) {
- return num1 - num2;
-}
diff --git a/toolkit/modules/tests/xpcshell/test_CanonicalJSON.js b/toolkit/modules/tests/xpcshell/test_CanonicalJSON.js
deleted file mode 100644
index fa61f5a010..0000000000
--- a/toolkit/modules/tests/xpcshell/test_CanonicalJSON.js
+++ /dev/null
@@ -1,146 +0,0 @@
-const { CanonicalJSON } = Components.utils.import("resource://gre/modules/CanonicalJSON.jsm");
-
-function stringRepresentation(obj) {
- const clone = JSON.parse(JSON.stringify(obj));
- return JSON.stringify(clone);
-}
-
-add_task(function* test_canonicalJSON_should_preserve_array_order() {
- const input = ['one', 'two', 'three'];
- // No sorting should be done on arrays.
- do_check_eq(CanonicalJSON.stringify(input), '["one","two","three"]');
-});
-
-add_task(function* test_canonicalJSON_orders_object_keys() {
- const input = [{
- b: ['two', 'three'],
- a: ['zero', 'one']
- }];
- do_check_eq(
- CanonicalJSON.stringify(input),
- '[{"a":["zero","one"],"b":["two","three"]}]'
- );
-});
-
-add_task(function* test_canonicalJSON_orders_nested_object_keys() {
- const input = [{
- b: {d: 'd', c: 'c'},
- a: {b: 'b', a: 'a'}
- }];
- do_check_eq(
- CanonicalJSON.stringify(input),
- '[{"a":{"a":"a","b":"b"},"b":{"c":"c","d":"d"}}]'
- );
-});
-
-add_task(function* test_canonicalJSON_escapes_unicode_values() {
- do_check_eq(
- CanonicalJSON.stringify([{key: '✓'}]),
- '[{"key":"\\u2713"}]'
- );
- // Unicode codepoints should be output in lowercase.
- do_check_eq(
- CanonicalJSON.stringify([{key: 'é'}]),
- '[{"key":"\\u00e9"}]'
- );
-});
-
-add_task(function* test_canonicalJSON_escapes_unicode_object_keys() {
- do_check_eq(
- CanonicalJSON.stringify([{'é': 'check'}]),
- '[{"\\u00e9":"check"}]'
- );
-});
-
-
-add_task(function* test_canonicalJSON_does_not_alter_input() {
- const records = [
- {'foo': 'bar', 'last_modified': '12345', 'id': '1'},
- {'bar': 'baz', 'last_modified': '45678', 'id': '2'}
- ];
- const serializedJSON = JSON.stringify(records);
- CanonicalJSON.stringify(records);
- do_check_eq(JSON.stringify(records), serializedJSON);
-});
-
-
-add_task(function* test_canonicalJSON_preserves_data() {
- const records = [
- {'foo': 'bar', 'last_modified': '12345', 'id': '1'},
- {'bar': 'baz', 'last_modified': '45678', 'id': '2'},
- ]
- const serialized = CanonicalJSON.stringify(records);
- const expected = '[{"foo":"bar","id":"1","last_modified":"12345"},' +
- '{"bar":"baz","id":"2","last_modified":"45678"}]';
- do_check_eq(CanonicalJSON.stringify(records), expected);
-});
-
-add_task(function* test_canonicalJSON_does_not_add_space_separators() {
- const records = [
- {'foo': 'bar', 'last_modified': '12345', 'id': '1'},
- {'bar': 'baz', 'last_modified': '45678', 'id': '2'},
- ]
- const serialized = CanonicalJSON.stringify(records);
- do_check_false(serialized.includes(" "));
-});
-
-add_task(function* test_canonicalJSON_serializes_empty_object() {
- do_check_eq(CanonicalJSON.stringify({}), "{}");
-});
-
-add_task(function* test_canonicalJSON_serializes_empty_array() {
- do_check_eq(CanonicalJSON.stringify([]), "[]");
-});
-
-add_task(function* test_canonicalJSON_serializes_NaN() {
- do_check_eq(CanonicalJSON.stringify(NaN), "null");
-});
-
-add_task(function* test_canonicalJSON_serializes_inf() {
- // This isn't part of the JSON standard.
- do_check_eq(CanonicalJSON.stringify(Infinity), "null");
-});
-
-
-add_task(function* test_canonicalJSON_serializes_empty_string() {
- do_check_eq(CanonicalJSON.stringify(""), '""');
-});
-
-add_task(function* test_canonicalJSON_escapes_backslashes() {
- do_check_eq(CanonicalJSON.stringify("This\\and this"), '"This\\\\and this"');
-});
-
-add_task(function* test_canonicalJSON_handles_signed_zeros() {
- // do_check_eq doesn't support comparison of -0 and 0 properly.
- do_check_true(CanonicalJSON.stringify(-0) === '-0');
- do_check_true(CanonicalJSON.stringify(0) === '0');
-});
-
-
-add_task(function* test_canonicalJSON_with_deeply_nested_dicts() {
- const records = [{
- 'a': {
- 'b': 'b',
- 'a': 'a',
- 'c': {
- 'b': 'b',
- 'a': 'a',
- 'c': ['b', 'a', 'c'],
- 'd': {'b': 'b', 'a': 'a'},
- 'id': '1',
- 'e': 1,
- 'f': [2, 3, 1],
- 'g': {2: 2, 3: 3, 1: {
- 'b': 'b', 'a': 'a', 'c': 'c'}}}},
- 'id': '1'}]
- const expected =
- '[{"a":{"a":"a","b":"b","c":{"a":"a","b":"b","c":["b","a","c"],' +
- '"d":{"a":"a","b":"b"},"e":1,"f":[2,3,1],"g":{' +
- '"1":{"a":"a","b":"b","c":"c"},"2":2,"3":3},"id":"1"}},"id":"1"}]';
-
- do_check_eq(CanonicalJSON.stringify(records), expected);
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/modules/tests/xpcshell/test_Color.js b/toolkit/modules/tests/xpcshell/test_Color.js
deleted file mode 100644
index 9bf9bf861c..0000000000
--- a/toolkit/modules/tests/xpcshell/test_Color.js
+++ /dev/null
@@ -1,53 +0,0 @@
-"use strict";
-
-Components.utils.import("resource://gre/modules/Color.jsm");
-
-function run_test() {
- testRelativeLuminance();
- testIsBright();
- testContrastRatio();
- testIsContrastRatioAcceptable();
-}
-
-function testRelativeLuminance() {
- let c = new Color(0, 0, 0);
- Assert.equal(c.relativeLuminance, 0, "Black is not illuminating");
-
- c = new Color(255, 255, 255);
- Assert.equal(c.relativeLuminance, 1, "White is quite the luminant one");
-
- c = new Color(142, 42, 142);
- Assert.equal(c.relativeLuminance, 0.25263952353998204,
- "This purple is not that luminant");
-}
-
-function testIsBright() {
- let c = new Color(0, 0, 0);
- Assert.equal(c.isBright, 0, "Black is bright");
-
- c = new Color(255, 255, 255);
- Assert.equal(c.isBright, 1, "White is bright");
-}
-
-function testContrastRatio() {
- let c = new Color(0, 0, 0);
- let c2 = new Color(255, 255, 255);
- Assert.equal(c.contrastRatio(c2), 21, "Contrast between black and white is max");
- Assert.equal(c.contrastRatio(c), 1, "Contrast between equals is min");
-
- let c3 = new Color(142, 42, 142);
- Assert.equal(c.contrastRatio(c3), 6.05279047079964, "Contrast between black and purple");
- Assert.equal(c2.contrastRatio(c3), 3.469474137806338, "Contrast between white and purple");
-}
-
-function testIsContrastRatioAcceptable() {
- // Let's assert what browser.js is doing for window frames.
- let c = new Color(...[55, 156, 152]);
- let c2 = new Color(0, 0, 0);
- Assert.equal(c.r, 55, "Reds should match");
- Assert.equal(c.g, 156, "Greens should match");
- Assert.equal(c.b, 152, "Blues should match");
- Assert.ok(c.isContrastRatioAcceptable(c2), "The blue is high contrast enough");
- c = new Color(...[35, 65, 100]);
- Assert.ok(!c.isContrastRatioAcceptable(c2), "The blue is not high contrast enough");
-}
diff --git a/toolkit/modules/tests/xpcshell/test_DeferredTask.js b/toolkit/modules/tests/xpcshell/test_DeferredTask.js
deleted file mode 100644
index 441f9054c2..0000000000
--- a/toolkit/modules/tests/xpcshell/test_DeferredTask.js
+++ /dev/null
@@ -1,390 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * This file tests the DeferredTask.jsm module.
- */
-
-// Globals
-
-var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "DeferredTask",
- "resource://gre/modules/DeferredTask.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Promise",
- "resource://gre/modules/Promise.jsm");
-
-/**
- * Due to the nature of this module, most of the tests are time-dependent. All
- * the timeouts are designed to occur at multiples of this granularity value,
- * in milliseconds, that should be high enough to prevent intermittent failures,
- * but low enough to prevent an excessive overall test execution time.
- */
-const T = 100;
-
-/**
- * Waits for the specified timeout before resolving the returned promise.
- */
-function promiseTimeout(aTimeoutMs)
-{
- let deferred = Promise.defer();
- do_timeout(aTimeoutMs, deferred.resolve);
- return deferred.promise;
-}
-
-function run_test()
-{
- run_next_test();
-}
-
-// Tests
-
-/**
- * Creates a simple DeferredTask and executes it once.
- */
-add_test(function test_arm_simple()
-{
- new DeferredTask(run_next_test, 10).arm();
-});
-
-/**
- * Checks that the delay set for the task is respected.
- */
-add_test(function test_arm_delay_respected()
-{
- let executed1 = false;
- let executed2 = false;
-
- new DeferredTask(function () {
- executed1 = true;
- do_check_false(executed2);
- }, 1*T).arm();
-
- new DeferredTask(function () {
- executed2 = true;
- do_check_true(executed1);
- run_next_test();
- }, 2*T).arm();
-});
-
-/**
- * Checks that calling "arm" again does not introduce further delay.
- */
-add_test(function test_arm_delay_notrestarted()
-{
- let executed = false;
-
- // Create a task that will run later.
- let deferredTask = new DeferredTask(() => { executed = true; }, 4*T);
- deferredTask.arm();
-
- // Before the task starts, call "arm" again.
- do_timeout(2*T, () => deferredTask.arm());
-
- // The "arm" call should not have introduced further delays.
- do_timeout(5*T, function () {
- do_check_true(executed);
- run_next_test();
- });
-});
-
-/**
- * Checks that a task runs only once when armed multiple times synchronously.
- */
-add_test(function test_arm_coalesced()
-{
- let executed = false;
-
- let deferredTask = new DeferredTask(function () {
- do_check_false(executed);
- executed = true;
- run_next_test();
- }, 50);
-
- deferredTask.arm();
- deferredTask.arm();
-});
-
-/**
- * Checks that a task runs only once when armed multiple times synchronously,
- * even when it has been created with a delay of zero milliseconds.
- */
-add_test(function test_arm_coalesced_nodelay()
-{
- let executed = false;
-
- let deferredTask = new DeferredTask(function () {
- do_check_false(executed);
- executed = true;
- run_next_test();
- }, 0);
-
- deferredTask.arm();
- deferredTask.arm();
-});
-
-/**
- * Checks that a task can be armed again while running.
- */
-add_test(function test_arm_recursive()
-{
- let executed = false;
-
- let deferredTask = new DeferredTask(function () {
- if (!executed) {
- executed = true;
- deferredTask.arm();
- } else {
- run_next_test();
- }
- }, 50);
-
- deferredTask.arm();
-});
-
-/**
- * Checks that calling "arm" while an asynchronous task is running waits until
- * the task is finished before restarting the delay.
- */
-add_test(function test_arm_async()
-{
- let finishedExecution = false;
- let finishedExecutionAgain = false;
-
- // Create a task that will run later.
- let deferredTask = new DeferredTask(function* () {
- yield promiseTimeout(4*T);
- if (!finishedExecution) {
- finishedExecution = true;
- } else if (!finishedExecutionAgain) {
- finishedExecutionAgain = true;
- }
- }, 2*T);
- deferredTask.arm();
-
- // While the task is running, call "arm" again. This will result in a wait
- // of 2*T until the task finishes, then another 2*T for the normal task delay
- // specified on construction.
- do_timeout(4*T, function () {
- do_check_true(deferredTask.isRunning);
- do_check_false(finishedExecution);
- deferredTask.arm();
- });
-
- // This will fail in case the task was started without waiting 2*T after it
- // has finished.
- do_timeout(7*T, function () {
- do_check_false(deferredTask.isRunning);
- do_check_true(finishedExecution);
- });
-
- // This is in the middle of the second execution.
- do_timeout(10*T, function () {
- do_check_true(deferredTask.isRunning);
- do_check_false(finishedExecutionAgain);
- });
-
- // Wait enough time to verify that the task was executed as expected.
- do_timeout(13*T, function () {
- do_check_false(deferredTask.isRunning);
- do_check_true(finishedExecutionAgain);
- run_next_test();
- });
-});
-
-/**
- * Checks that an armed task can be disarmed.
- */
-add_test(function test_disarm()
-{
- // Create a task that will run later.
- let deferredTask = new DeferredTask(function () {
- do_throw("This task should not run.");
- }, 2*T);
- deferredTask.arm();
-
- // Disable execution later, but before the task starts.
- do_timeout(1*T, () => deferredTask.disarm());
-
- // Wait enough time to verify that the task did not run.
- do_timeout(3*T, run_next_test);
-});
-
-/**
- * Checks that calling "disarm" allows the delay to be restarted.
- */
-add_test(function test_disarm_delay_restarted()
-{
- let executed = false;
-
- let deferredTask = new DeferredTask(() => { executed = true; }, 4*T);
- deferredTask.arm();
-
- do_timeout(2*T, function () {
- deferredTask.disarm();
- deferredTask.arm();
- });
-
- do_timeout(5*T, function () {
- do_check_false(executed);
- });
-
- do_timeout(7*T, function () {
- do_check_true(executed);
- run_next_test();
- });
-});
-
-/**
- * Checks that calling "disarm" while an asynchronous task is running does not
- * prevent the task to finish.
- */
-add_test(function test_disarm_async()
-{
- let finishedExecution = false;
-
- let deferredTask = new DeferredTask(function* () {
- deferredTask.arm();
- yield promiseTimeout(2*T);
- finishedExecution = true;
- }, 1*T);
- deferredTask.arm();
-
- do_timeout(2*T, function () {
- do_check_true(deferredTask.isRunning);
- do_check_true(deferredTask.isArmed);
- do_check_false(finishedExecution);
- deferredTask.disarm();
- });
-
- do_timeout(4*T, function () {
- do_check_false(deferredTask.isRunning);
- do_check_false(deferredTask.isArmed);
- do_check_true(finishedExecution);
- run_next_test();
- });
-});
-
-/**
- * Checks that calling "arm" immediately followed by "disarm" while an
- * asynchronous task is running does not cause it to run again.
- */
-add_test(function test_disarm_immediate_async()
-{
- let executed = false;
-
- let deferredTask = new DeferredTask(function* () {
- do_check_false(executed);
- executed = true;
- yield promiseTimeout(2*T);
- }, 1*T);
- deferredTask.arm();
-
- do_timeout(2*T, function () {
- do_check_true(deferredTask.isRunning);
- do_check_false(deferredTask.isArmed);
- deferredTask.arm();
- deferredTask.disarm();
- });
-
- do_timeout(4*T, function () {
- do_check_true(executed);
- do_check_false(deferredTask.isRunning);
- do_check_false(deferredTask.isArmed);
- run_next_test();
- });
-});
-
-/**
- * Checks the isArmed and isRunning properties with a synchronous task.
- */
-add_test(function test_isArmed_isRunning()
-{
- let deferredTask = new DeferredTask(function () {
- do_check_true(deferredTask.isRunning);
- do_check_false(deferredTask.isArmed);
- deferredTask.arm();
- do_check_true(deferredTask.isArmed);
- deferredTask.disarm();
- do_check_false(deferredTask.isArmed);
- run_next_test();
- }, 50);
-
- do_check_false(deferredTask.isArmed);
- deferredTask.arm();
- do_check_true(deferredTask.isArmed);
- do_check_false(deferredTask.isRunning);
-});
-
-/**
- * Checks that the "finalize" method executes a synchronous task.
- */
-add_test(function test_finalize()
-{
- let executed = false;
- let timePassed = false;
-
- let deferredTask = new DeferredTask(function () {
- do_check_false(timePassed);
- executed = true;
- }, 2*T);
- deferredTask.arm();
-
- do_timeout(1*T, () => { timePassed = true; });
-
- // This should trigger the immediate execution of the task.
- deferredTask.finalize().then(function () {
- do_check_true(executed);
- run_next_test();
- });
-});
-
-/**
- * Checks that the "finalize" method executes the task again from start to
- * finish in case it is already running.
- */
-add_test(function test_finalize_executes_entirely()
-{
- let executed = false;
- let executedAgain = false;
- let timePassed = false;
-
- let deferredTask = new DeferredTask(function* () {
- // The first time, we arm the timer again and set up the finalization.
- if (!executed) {
- deferredTask.arm();
- do_check_true(deferredTask.isArmed);
- do_check_true(deferredTask.isRunning);
-
- deferredTask.finalize().then(function () {
- // When we reach this point, the task must be finished.
- do_check_true(executedAgain);
- do_check_false(timePassed);
- do_check_false(deferredTask.isArmed);
- do_check_false(deferredTask.isRunning);
- run_next_test();
- });
-
- // The second execution triggered by the finalization waits 1*T for the
- // current task to finish (see the timeout below), but then it must not
- // wait for the 2*T specified on construction as normal task delay. The
- // second execution will finish after the timeout below has passed again,
- // for a total of 2*T of wait time.
- do_timeout(3*T, () => { timePassed = true; });
- }
-
- yield promiseTimeout(1*T);
-
- // Just before finishing, indicate if we completed the second execution.
- if (executed) {
- do_check_true(deferredTask.isRunning);
- executedAgain = true;
- } else {
- executed = true;
- }
- }, 2*T);
-
- deferredTask.arm();
-});
diff --git a/toolkit/modules/tests/xpcshell/test_FileUtils.js b/toolkit/modules/tests/xpcshell/test_FileUtils.js
deleted file mode 100644
index 86ac743890..0000000000
--- a/toolkit/modules/tests/xpcshell/test_FileUtils.js
+++ /dev/null
@@ -1,226 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-Components.utils.import("resource://gre/modules/FileUtils.jsm");
-
-function do_check_throws(f, result, stack) {
- if (!stack)
- stack = Components.stack.caller;
-
- try {
- f();
- } catch (exc) {
- if (exc.result == result)
- return;
- do_throw("expected result " + result + ", caught " + exc, stack);
- }
- do_throw("expected result " + result + ", none thrown", stack);
-}
-
-const gProfD = do_get_profile();
-
-add_test(function test_getFile() {
- let file = FileUtils.getFile("ProfD", ["foobar"]);
- do_check_true(file instanceof Components.interfaces.nsIFile);
- do_check_false(file.exists());
-
- let other = gProfD.clone();
- other.append("foobar");
- do_check_true(file.equals(other));
-
- run_next_test();
-});
-
-add_test(function test_getFile_nonexistentDir() {
- do_check_throws(function () {
- let file = FileUtils.getFile("NonexistentD", ["foobar"]);
- }, Components.results.NS_ERROR_FAILURE);
-
- run_next_test();
-});
-
-add_test(function test_getFile_createDirs() {
- let file = FileUtils.getFile("ProfD", ["a", "b", "foobar"]);
- do_check_true(file instanceof Components.interfaces.nsIFile);
- do_check_false(file.exists());
-
- let other = gProfD.clone();
- other.append("a");
- do_check_true(other.isDirectory());
- other.append("b");
- do_check_true(other.isDirectory());
- other.append("foobar");
- do_check_true(file.equals(other));
-
- run_next_test();
-});
-
-add_test(function test_getDir() {
- let dir = FileUtils.getDir("ProfD", ["foodir"]);
- do_check_true(dir instanceof Components.interfaces.nsIFile);
- do_check_false(dir.exists());
-
- let other = gProfD.clone();
- other.append("foodir");
- do_check_true(dir.equals(other));
-
- run_next_test();
-});
-
-add_test(function test_getDir_nonexistentDir() {
- do_check_throws(function () {
- let file = FileUtils.getDir("NonexistentD", ["foodir"]);
- }, Components.results.NS_ERROR_FAILURE);
-
- run_next_test();
-});
-
-add_test(function test_getDir_shouldCreate() {
- let dir = FileUtils.getDir("ProfD", ["c", "d", "foodir"], true);
- do_check_true(dir instanceof Components.interfaces.nsIFile);
- do_check_true(dir.exists());
-
- let other = gProfD.clone();
- other.append("c");
- do_check_true(other.isDirectory());
- other.append("d");
- do_check_true(other.isDirectory());
- other.append("foodir");
- do_check_true(dir.equals(other));
-
- run_next_test();
-});
-
-var openFileOutputStream_defaultFlags = function (aKind, aFileName) {
- let file = FileUtils.getFile("ProfD", [aFileName]);
- let fos;
- do_check_true(aKind == "atomic" || aKind == "safe" || aKind == "");
- if (aKind == "atomic") {
- fos = FileUtils.openAtomicFileOutputStream(file);
- } else if (aKind == "safe") {
- fos = FileUtils.openSafeFileOutputStream(file);
- } else {
- fos = FileUtils.openFileOutputStream(file);
- }
- do_check_true(fos instanceof Components.interfaces.nsIFileOutputStream);
- if (aKind == "atomic" || aKind == "safe") {
- do_check_true(fos instanceof Components.interfaces.nsISafeOutputStream);
- }
-
- // FileUtils.openFileOutputStream or FileUtils.openAtomicFileOutputStream()
- // or FileUtils.openSafeFileOutputStream() opens the stream with DEFER_OPEN
- // which means the file will not be open until we write to it.
- do_check_false(file.exists());
-
- let data = "test_default_flags";
- fos.write(data, data.length);
- do_check_true(file.exists());
-
- // No nsIXULRuntime in xpcshell, so use this trick to determine whether we're
- // on Windows.
- if ("@mozilla.org/windows-registry-key;1" in Components.classes) {
- do_check_eq(file.permissions, 0o666);
- } else {
- do_check_eq(file.permissions, FileUtils.PERMS_FILE);
- }
-
- run_next_test();
-};
-
-var openFileOutputStream_modeFlags = function(aKind, aFileName) {
- let file = FileUtils.getFile("ProfD", [aFileName]);
- let fos;
- do_check_true(aKind == "atomic" || aKind == "safe" || aKind == "");
- if (aKind == "atomic") {
- fos = FileUtils.openAtomicFileOutputStream(file, FileUtils.MODE_WRONLY);
- } else if (aKind == "safe") {
- fos = FileUtils.openSafeFileOutputStream(file, FileUtils.MODE_WRONLY);
- } else {
- fos = FileUtils.openFileOutputStream(file, FileUtils.MODE_WRONLY);
- }
- let data = "test_modeFlags";
- do_check_throws(function () {
- fos.write(data, data.length);
- }, Components.results.NS_ERROR_FILE_NOT_FOUND);
- do_check_false(file.exists());
-
- run_next_test();
-};
-
-var closeFileOutputStream = function(aKind, aFileName) {
- let file = FileUtils.getFile("ProfD", [aFileName]);
- let fos;
- do_check_true(aKind == "atomic" || aKind == "safe");
- if (aKind == "atomic") {
- fos = FileUtils.openAtomicFileOutputStream(file);
- } else if (aKind == "safe") {
- fos = FileUtils.openSafeFileOutputStream(file);
- }
-
- // We can write data to the stream just fine while it's open.
- let data = "testClose";
- fos.write(data, data.length);
-
- // But once we close it, we can't anymore.
- if (aKind == "atomic") {
- FileUtils.closeAtomicFileOutputStream(fos);
- } else if (aKind == "safe") {
- FileUtils.closeSafeFileOutputStream(fos);
- }
- do_check_throws(function () {
- fos.write(data, data.length);
- }, Components.results.NS_BASE_STREAM_CLOSED);
- run_next_test();
-};
-
-add_test(function test_openFileOutputStream_defaultFlags() {
- openFileOutputStream_defaultFlags("", "george");
-});
-
-// openFileOutputStream will uses MODE_WRONLY | MODE_CREATE | MODE_TRUNCATE
-// as the default mode flags, but we can pass in our own if we want to.
-add_test(function test_openFileOutputStream_modeFlags() {
- openFileOutputStream_modeFlags("", "ringo");
-});
-
-add_test(function test_openAtomicFileOutputStream_defaultFlags() {
- openFileOutputStream_defaultFlags("atomic", "peiyong");
-});
-
-// openAtomicFileOutputStream will uses MODE_WRONLY | MODE_CREATE | MODE_TRUNCATE
-// as the default mode flags, but we can pass in our own if we want to.
-add_test(function test_openAtomicFileOutputStream_modeFlags() {
- openFileOutputStream_modeFlags("atomic", "lin");
-});
-
-add_test(function test_closeAtomicFileOutputStream() {
- closeFileOutputStream("atomic", "peiyonglin");
-});
-
-add_test(function test_openSafeFileOutputStream_defaultFlags() {
- openFileOutputStream_defaultFlags("safe", "john");
-});
-
-// openSafeFileOutputStream will uses MODE_WRONLY | MODE_CREATE | MODE_TRUNCATE
-// as the default mode flags, but we can pass in our own if we want to.
-add_test(function test_openSafeFileOutputStream_modeFlags() {
- openFileOutputStream_modeFlags("safe", "paul");
-});
-
-add_test(function test_closeSafeFileOutputStream() {
- closeFileOutputStream("safe", "georgee");
-});
-
-add_test(function test_newFile() {
- let testfile = FileUtils.getFile("ProfD", ["test"]);
- let testpath = testfile.path;
- let file = new FileUtils.File(testpath);
- do_check_true(file instanceof Components.interfaces.nsILocalFile);
- do_check_true(file.equals(testfile));
- do_check_eq(file.path, testpath);
- run_next_test();
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/modules/tests/xpcshell/test_FinderIterator.js b/toolkit/modules/tests/xpcshell/test_FinderIterator.js
deleted file mode 100644
index 02c923a007..0000000000
--- a/toolkit/modules/tests/xpcshell/test_FinderIterator.js
+++ /dev/null
@@ -1,265 +0,0 @@
-const { interfaces: Ci, classes: Cc, utils: Cu } = Components;
-const { FinderIterator } = Cu.import("resource://gre/modules/FinderIterator.jsm", {});
-Cu.import("resource://gre/modules/Promise.jsm");
-
-var gFindResults = [];
-// Stub the method that instantiates nsIFind and does all the interaction with
-// the docShell to be searched through.
-FinderIterator._iterateDocument = function* (word, window, finder) {
- for (let range of gFindResults)
- yield range;
-};
-
-FinderIterator._rangeStartsInLink = fakeRange => fakeRange.startsInLink;
-
-function FakeRange(textContent, startsInLink = false) {
- this.startContainer = {};
- this.startsInLink = startsInLink;
- this.toString = () => textContent;
-}
-
-var gMockWindow = {
- setTimeout(cb, delay) {
- Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer)
- .initWithCallback(cb, delay, Ci.nsITimer.TYPE_ONE_SHOT);
- }
-};
-
-var gMockFinder = {
- _getWindow() { return gMockWindow; }
-};
-
-function prepareIterator(findText, rangeCount) {
- gFindResults = [];
- for (let i = rangeCount; --i >= 0;)
- gFindResults.push(new FakeRange(findText));
-}
-
-add_task(function* test_start() {
- let findText = "test";
- let rangeCount = 300;
- prepareIterator(findText, rangeCount);
-
- let count = 0;
- yield FinderIterator.start({
- caseSensitive: false,
- entireWord: false,
- finder: gMockFinder,
- listener: {
- onIteratorRangeFound(range) {
- ++count;
- Assert.equal(range.toString(), findText, "Text content should match");
- }
- },
- word: findText
- });
-
- Assert.equal(rangeCount, count, "Amount of ranges yielded should match!");
- Assert.ok(!FinderIterator.running, "Running state should match");
- Assert.equal(FinderIterator._previousRanges.length, rangeCount, "Ranges cache should match");
-
- FinderIterator.reset();
-});
-
-add_task(function* test_valid_arguments() {
- let findText = "foo";
- let rangeCount = 20;
- prepareIterator(findText, rangeCount);
-
- let count = 0;
-
- yield FinderIterator.start({
- caseSensitive: false,
- entireWord: false,
- finder: gMockFinder,
- listener: { onIteratorRangeFound(range) { ++count; } },
- word: findText
- });
-
- let params = FinderIterator._previousParams;
- Assert.ok(!params.linksOnly, "Default for linksOnly is false");
- Assert.ok(!params.useCache, "Default for useCache is false");
- Assert.equal(params.word, findText, "Words should match");
-
- count = 0;
- Assert.throws(() => FinderIterator.start({
- entireWord: false,
- listener: { onIteratorRangeFound(range) { ++count; } },
- word: findText
- }), /Missing required option 'caseSensitive'/, "Should throw when missing an argument");
- FinderIterator.reset();
-
- Assert.throws(() => FinderIterator.start({
- caseSensitive: false,
- listener: { onIteratorRangeFound(range) { ++count; } },
- word: findText
- }), /Missing required option 'entireWord'/, "Should throw when missing an argument");
- FinderIterator.reset();
-
- Assert.throws(() => FinderIterator.start({
- caseSensitive: false,
- entireWord: false,
- listener: { onIteratorRangeFound(range) { ++count; } },
- word: findText
- }), /Missing required option 'finder'/, "Should throw when missing an argument");
- FinderIterator.reset();
-
- Assert.throws(() => FinderIterator.start({
- caseSensitive: true,
- entireWord: false,
- finder: gMockFinder,
- word: findText
- }), /Missing valid, required option 'listener'/, "Should throw when missing an argument");
- FinderIterator.reset();
-
- Assert.throws(() => FinderIterator.start({
- caseSensitive: false,
- entireWord: true,
- finder: gMockFinder,
- listener: { onIteratorRangeFound(range) { ++count; } },
- }), /Missing required option 'word'/, "Should throw when missing an argument");
- FinderIterator.reset();
-
- Assert.equal(count, 0, "No ranges should've been counted");
-});
-
-add_task(function* test_stop() {
- let findText = "bar";
- let rangeCount = 120;
- prepareIterator(findText, rangeCount);
-
- let count = 0;
- let whenDone = FinderIterator.start({
- caseSensitive: false,
- entireWord: false,
- finder: gMockFinder,
- listener: { onIteratorRangeFound(range) { ++count; } },
- word: findText
- });
-
- FinderIterator.stop();
-
- yield whenDone;
-
- Assert.equal(count, 0, "Number of ranges should be 0");
-
- FinderIterator.reset();
-});
-
-add_task(function* test_reset() {
- let findText = "tik";
- let rangeCount = 142;
- prepareIterator(findText, rangeCount);
-
- let count = 0;
- let whenDone = FinderIterator.start({
- caseSensitive: false,
- entireWord: false,
- finder: gMockFinder,
- listener: { onIteratorRangeFound(range) { ++count; } },
- word: findText
- });
-
- Assert.ok(FinderIterator.running, "Yup, running we are");
- Assert.equal(count, 0, "Number of ranges should match 0");
- Assert.equal(FinderIterator.ranges.length, 0, "Number of ranges should match 0");
-
- FinderIterator.reset();
-
- Assert.ok(!FinderIterator.running, "Nope, running we are not");
- Assert.equal(FinderIterator.ranges.length, 0, "No ranges after reset");
- Assert.equal(FinderIterator._previousRanges.length, 0, "No ranges after reset");
-
- yield whenDone;
-
- Assert.equal(count, 0, "Number of ranges should match 0");
-});
-
-add_task(function* test_parallel_starts() {
- let findText = "tak";
- let rangeCount = 2143;
- prepareIterator(findText, rangeCount);
-
- // Start off the iterator.
- let count = 0;
- let whenDone = FinderIterator.start({
- caseSensitive: false,
- entireWord: false,
- finder: gMockFinder,
- listener: { onIteratorRangeFound(range) { ++count; } },
- word: findText
- });
-
- yield new Promise(resolve => gMockWindow.setTimeout(resolve, 120));
- Assert.ok(FinderIterator.running, "We ought to be running here");
-
- let count2 = 0;
- let whenDone2 = FinderIterator.start({
- caseSensitive: false,
- entireWord: false,
- finder: gMockFinder,
- listener: { onIteratorRangeFound(range) { ++count2; } },
- word: findText
- });
-
- // Let the iterator run for a little while longer before we assert the world.
- yield new Promise(resolve => gMockWindow.setTimeout(resolve, 10));
- FinderIterator.stop();
-
- Assert.ok(!FinderIterator.running, "Stop means stop");
-
- yield whenDone;
- yield whenDone2;
-
- Assert.greater(count, FinderIterator.kIterationSizeMax, "At least one range should've been found");
- Assert.less(count, rangeCount, "Not all ranges should've been found");
- Assert.greater(count2, FinderIterator.kIterationSizeMax, "At least one range should've been found");
- Assert.less(count2, rangeCount, "Not all ranges should've been found");
-
- Assert.equal(count2, count, "The second start was later, but should have caught up");
-
- FinderIterator.reset();
-});
-
-add_task(function* test_allowDistance() {
- let findText = "gup";
- let rangeCount = 20;
- prepareIterator(findText, rangeCount);
-
- // Start off the iterator.
- let count = 0;
- let whenDone = FinderIterator.start({
- caseSensitive: false,
- entireWord: false,
- finder: gMockFinder,
- listener: { onIteratorRangeFound(range) { ++count; } },
- word: findText
- });
-
- let count2 = 0;
- let whenDone2 = FinderIterator.start({
- caseSensitive: false,
- entireWord: false,
- finder: gMockFinder,
- listener: { onIteratorRangeFound(range) { ++count2; } },
- word: "gu"
- });
-
- let count3 = 0;
- let whenDone3 = FinderIterator.start({
- allowDistance: 1,
- caseSensitive: false,
- entireWord: false,
- finder: gMockFinder,
- listener: { onIteratorRangeFound(range) { ++count3; } },
- word: "gu"
- });
-
- yield Promise.all([whenDone, whenDone2, whenDone3]);
-
- Assert.equal(count, rangeCount, "The first iterator invocation should yield all results");
- Assert.equal(count2, 0, "The second iterator invocation should yield _no_ results");
- Assert.equal(count3, rangeCount, "The first iterator invocation should yield all results");
-
- FinderIterator.reset();
-});
diff --git a/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js b/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
deleted file mode 100644
index 74d5ad43d0..0000000000
--- a/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
+++ /dev/null
@@ -1,794 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-var {classes: Cc, interfaces: Ci, results: Cr, utils: Cu, manager: Cm} = Components;
-const URL_HOST = "http://localhost";
-
-var GMPScope = Cu.import("resource://gre/modules/GMPInstallManager.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/FileUtils.jsm");
-Cu.import("resource://testing-common/httpd.js");
-Cu.import("resource://gre/modules/Promise.jsm");
-Cu.import("resource://gre/modules/Preferences.jsm")
-Cu.import("resource://gre/modules/UpdateUtils.jsm");
-
-var { computeHash } = Cu.import("resource://gre/modules/addons/ProductAddonChecker.jsm");
-var ProductAddonCheckerScope = Cu.import("resource://gre/modules/addons/ProductAddonChecker.jsm");
-
-do_get_profile();
-
-function run_test() { Cu.import("resource://gre/modules/Preferences.jsm")
- Preferences.set("media.gmp.log.dump", true);
- Preferences.set("media.gmp.log.level", 0);
- run_next_test();
-}
-
-/**
- * Tests that the helper used for preferences works correctly
- */
-add_task(function* test_prefs() {
- let addon1 = "addon1", addon2 = "addon2";
-
- GMPScope.GMPPrefs.set(GMPScope.GMPPrefs.KEY_URL, "http://not-really-used");
- GMPScope.GMPPrefs.set(GMPScope.GMPPrefs.KEY_URL_OVERRIDE, "http://not-really-used-2");
- GMPScope.GMPPrefs.set(GMPScope.GMPPrefs.KEY_PLUGIN_LAST_UPDATE, "1", addon1);
- GMPScope.GMPPrefs.set(GMPScope.GMPPrefs.KEY_PLUGIN_VERSION, "2", addon1);
- GMPScope.GMPPrefs.set(GMPScope.GMPPrefs.KEY_PLUGIN_LAST_UPDATE, "3", addon2);
- GMPScope.GMPPrefs.set(GMPScope.GMPPrefs.KEY_PLUGIN_VERSION, "4", addon2);
- GMPScope.GMPPrefs.set(GMPScope.GMPPrefs.KEY_PLUGIN_AUTOUPDATE, false, addon2);
- GMPScope.GMPPrefs.set(GMPScope.GMPPrefs.KEY_CERT_CHECKATTRS, true);
-
- do_check_eq(GMPScope.GMPPrefs.get(GMPScope.GMPPrefs.KEY_URL), "http://not-really-used");
- do_check_eq(GMPScope.GMPPrefs.get(GMPScope.GMPPrefs.KEY_URL_OVERRIDE),
- "http://not-really-used-2");
- do_check_eq(GMPScope.GMPPrefs.get(GMPScope.GMPPrefs.KEY_PLUGIN_LAST_UPDATE, "", addon1), "1");
- do_check_eq(GMPScope.GMPPrefs.get(GMPScope.GMPPrefs.KEY_PLUGIN_VERSION, "", addon1), "2");
- do_check_eq(GMPScope.GMPPrefs.get(GMPScope.GMPPrefs.KEY_PLUGIN_LAST_UPDATE, "", addon2), "3");
- do_check_eq(GMPScope.GMPPrefs.get(GMPScope.GMPPrefs.KEY_PLUGIN_VERSION, "", addon2), "4");
- do_check_eq(GMPScope.GMPPrefs.get(GMPScope.GMPPrefs.KEY_PLUGIN_AUTOUPDATE, undefined, addon2),
- false);
- do_check_true(GMPScope.GMPPrefs.get(GMPScope.GMPPrefs.KEY_CERT_CHECKATTRS));
- GMPScope.GMPPrefs.set(GMPScope.GMPPrefs.KEY_PLUGIN_AUTOUPDATE, true, addon2);
-});
-
-/**
- * Tests that an uninit without a check works fine
- */
-add_task(function* test_checkForAddons_uninitWithoutCheck() {
- let installManager = new GMPInstallManager();
- installManager.uninit();
-});
-
-/**
- * Tests that an uninit without an install works fine
- */
-add_test(function test_checkForAddons_uninitWithoutInstall() {
- overrideXHR(200, "");
- let installManager = new GMPInstallManager();
- let promise = installManager.checkForAddons();
- promise.then(res => {
- do_check_true(res.usedFallback);
- installManager.uninit();
- run_next_test();
- });
-});
-
-/**
- * Tests that no response returned rejects
- */
-add_test(function test_checkForAddons_noResponse() {
- overrideXHR(200, "");
- let installManager = new GMPInstallManager();
- let promise = installManager.checkForAddons();
- promise.then(res => {
- do_check_true(res.usedFallback);
- installManager.uninit();
- run_next_test();
- });
-});
-
-/**
- * Tests that no addons element returned resolves with no addons
- */
-add_task(function* test_checkForAddons_noAddonsElement() {
- overrideXHR(200, "<updates></updates>");
- let installManager = new GMPInstallManager();
- let res = yield installManager.checkForAddons();
- do_check_eq(res.gmpAddons.length, 0);
- installManager.uninit();
-});
-
-/**
- * Tests that empty addons element returned resolves with no addons
- */
-add_task(function* test_checkForAddons_emptyAddonsElement() {
- overrideXHR(200, "<updates><addons/></updates>");
- let installManager = new GMPInstallManager();
- let res = yield installManager.checkForAddons();
- do_check_eq(res.gmpAddons.length, 0);
- installManager.uninit();
-});
-
-/**
- * Tests that a response with the wrong root element rejects
- */
-add_test(function test_checkForAddons_wrongResponseXML() {
- overrideXHR(200, "<digits_of_pi>3.141592653589793....</digits_of_pi>");
- let installManager = new GMPInstallManager();
- let promise = installManager.checkForAddons();
- promise.then(res => {
- do_check_true(res.usedFallback);
- installManager.uninit();
- run_next_test();
- });
-});
-
-/**
- * Tests that a 404 error works as expected
- */
-add_test(function test_checkForAddons_404Error() {
- overrideXHR(404, "");
- let installManager = new GMPInstallManager();
- let promise = installManager.checkForAddons();
- promise.then(res => {
- do_check_true(res.usedFallback);
- installManager.uninit();
- run_next_test();
- });
-});
-
-/**
- * Tests that a xhr abort() works as expected
- */
-add_test(function test_checkForAddons_abort() {
- let overriddenXhr = overrideXHR(200, "", { dropRequest: true} );
- let installManager = new GMPInstallManager();
- let promise = installManager.checkForAddons();
- overriddenXhr.abort();
- promise.then(res => {
- do_check_true(res.usedFallback);
- installManager.uninit();
- run_next_test();
- });
-});
-
-/**
- * Tests that a defensive timeout works as expected
- */
-add_test(function test_checkForAddons_timeout() {
- overrideXHR(200, "", { dropRequest: true, timeout: true });
- let installManager = new GMPInstallManager();
- let promise = installManager.checkForAddons();
- promise.then(res => {
- do_check_true(res.usedFallback);
- installManager.uninit();
- run_next_test();
- });
-});
-
-/**
- * Tests that we throw correctly in case of ssl certification error.
- */
-add_test(function test_checkForAddons_bad_ssl() {
- //
- // Add random stuff that cause CertUtil to require https.
- //
- let PREF_KEY_URL_OVERRIDE_BACKUP =
- Preferences.get(GMPScope.GMPPrefs.KEY_URL_OVERRIDE, undefined);
- Preferences.reset(GMPScope.GMPPrefs.KEY_URL_OVERRIDE);
-
- let CERTS_BRANCH_DOT_ONE = GMPScope.GMPPrefs.KEY_CERTS_BRANCH + ".1";
- let PREF_CERTS_BRANCH_DOT_ONE_BACKUP =
- Preferences.get(CERTS_BRANCH_DOT_ONE, undefined);
- Services.prefs.setCharPref(CERTS_BRANCH_DOT_ONE, "funky value");
-
-
- overrideXHR(200, "");
- let installManager = new GMPInstallManager();
- let promise = installManager.checkForAddons();
- promise.then(res => {
- do_check_true(res.usedFallback);
- installManager.uninit();
- if (PREF_KEY_URL_OVERRIDE_BACKUP) {
- Preferences.set(GMPScope.GMPPrefs.KEY_URL_OVERRIDE,
- PREF_KEY_URL_OVERRIDE_BACKUP);
- }
- if (PREF_CERTS_BRANCH_DOT_ONE_BACKUP) {
- Preferences.set(CERTS_BRANCH_DOT_ONE,
- PREF_CERTS_BRANCH_DOT_ONE_BACKUP);
- }
- run_next_test();
- });
-});
-
-/**
- * Tests that gettinga a funky non XML response works as expected
- */
-add_test(function test_checkForAddons_notXML() {
- overrideXHR(200, "3.141592653589793....");
- let installManager = new GMPInstallManager();
- let promise = installManager.checkForAddons();
-
- promise.then(res => {
- do_check_true(res.usedFallback);
- installManager.uninit();
- run_next_test();
- });
-});
-
-/**
- * Tests that getting a response with a single addon works as expected
- */
-add_task(function* test_checkForAddons_singleAddon() {
- let responseXML =
- "<?xml version=\"1.0\"?>" +
- "<updates>" +
- " <addons>" +
- " <addon id=\"gmp-gmpopenh264\"" +
- " URL=\"http://127.0.0.1:8011/gmp-gmpopenh264-1.1.zip\"" +
- " hashFunction=\"sha256\"" +
- " hashValue=\"1118b90d6f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee\"" +
- " version=\"1.1\"/>" +
- " </addons>" +
- "</updates>"
- overrideXHR(200, responseXML);
- let installManager = new GMPInstallManager();
- let res = yield installManager.checkForAddons();
- do_check_eq(res.gmpAddons.length, 1);
- let gmpAddon = res.gmpAddons[0];
- do_check_eq(gmpAddon.id, "gmp-gmpopenh264");
- do_check_eq(gmpAddon.URL, "http://127.0.0.1:8011/gmp-gmpopenh264-1.1.zip");
- do_check_eq(gmpAddon.hashFunction, "sha256");
- do_check_eq(gmpAddon.hashValue, "1118b90d6f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee");
- do_check_eq(gmpAddon.version, "1.1");
- do_check_eq(gmpAddon.size, undefined);
- do_check_true(gmpAddon.isValid);
- do_check_false(gmpAddon.isInstalled);
- installManager.uninit();
-});
-
-/**
- * Tests that getting a response with a single addon with the optional size
- * attribute parses as expected.
- */
-add_task(function* test_checkForAddons_singleAddonWithSize() {
- let responseXML =
- "<?xml version=\"1.0\"?>" +
- "<updates>" +
- " <addons>" +
- " <addon id=\"openh264-plugin-no-at-symbol\"" +
- " URL=\"http://127.0.0.1:8011/gmp-gmpopenh264-1.1.zip\"" +
- " hashFunction=\"sha256\"" +
- " size=\"42\"" +
- " hashValue=\"1118b90d6f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee\"" +
- " version=\"1.1\"/>" +
- " </addons>" +
- "</updates>"
- overrideXHR(200, responseXML);
- let installManager = new GMPInstallManager();
- let res = yield installManager.checkForAddons();
- do_check_eq(res.gmpAddons.length, 1);
- let gmpAddon = res.gmpAddons[0];
- do_check_eq(gmpAddon.id, "openh264-plugin-no-at-symbol");
- do_check_eq(gmpAddon.URL, "http://127.0.0.1:8011/gmp-gmpopenh264-1.1.zip");
- do_check_eq(gmpAddon.hashFunction, "sha256");
- do_check_eq(gmpAddon.hashValue, "1118b90d6f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee");
- do_check_eq(gmpAddon.size, 42);
- do_check_eq(gmpAddon.version, "1.1");
- do_check_true(gmpAddon.isValid);
- do_check_false(gmpAddon.isInstalled);
- installManager.uninit();
-});
-
-/**
- * Tests that checking for multiple addons work correctly.
- * Also tests that invalid addons work correctly.
- */
-add_task(function* test_checkForAddons_multipleAddonNoUpdatesSomeInvalid() {
- let responseXML =
- "<?xml version=\"1.0\"?>" +
- "<updates>" +
- " <addons>" +
- // valid openh264
- " <addon id=\"gmp-gmpopenh264\"" +
- " URL=\"http://127.0.0.1:8011/gmp-gmpopenh264-1.1.zip\"" +
- " hashFunction=\"sha256\"" +
- " hashValue=\"1118b90d6f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee\"" +
- " version=\"1.1\"/>" +
- // valid not openh264
- " <addon id=\"NOT-gmp-gmpopenh264\"" +
- " URL=\"http://127.0.0.1:8011/NOT-gmp-gmpopenh264-1.1.zip\"" +
- " hashFunction=\"sha512\"" +
- " hashValue=\"141592656f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee\"" +
- " version=\"9.1\"/>" +
- // noid
- " <addon notid=\"NOT-gmp-gmpopenh264\"" +
- " URL=\"http://127.0.0.1:8011/NOT-gmp-gmpopenh264-1.1.zip\"" +
- " hashFunction=\"sha512\"" +
- " hashValue=\"141592656f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee\"" +
- " version=\"9.1\"/>" +
- // no URL
- " <addon id=\"NOT-gmp-gmpopenh264\"" +
- " notURL=\"http://127.0.0.1:8011/NOT-gmp-gmpopenh264-1.1.zip\"" +
- " hashFunction=\"sha512\"" +
- " hashValue=\"141592656f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee\"" +
- " version=\"9.1\"/>" +
- // no hash function
- " <addon id=\"NOT-gmp-gmpopenh264\"" +
- " URL=\"http://127.0.0.1:8011/NOT-gmp-gmpopenh264-1.1.zip\"" +
- " nothashFunction=\"sha512\"" +
- " hashValue=\"141592656f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee\"" +
- " version=\"9.1\"/>" +
- // no hash function
- " <addon id=\"NOT-gmp-gmpopenh264\"" +
- " URL=\"http://127.0.0.1:8011/NOT-gmp-gmpopenh264-1.1.zip\"" +
- " hashFunction=\"sha512\"" +
- " nothashValue=\"141592656f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee\"" +
- " version=\"9.1\"/>" +
- // not version
- " <addon id=\"NOT-gmp-gmpopenh264\"" +
- " URL=\"http://127.0.0.1:8011/NOT-gmp-gmpopenh264-1.1.zip\"" +
- " hashFunction=\"sha512\"" +
- " hashValue=\"141592656f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee\"" +
- " notversion=\"9.1\"/>" +
- " </addons>" +
- "</updates>"
- overrideXHR(200, responseXML);
- let installManager = new GMPInstallManager();
- let res = yield installManager.checkForAddons();
- do_check_eq(res.gmpAddons.length, 7);
- let gmpAddon = res.gmpAddons[0];
- do_check_eq(gmpAddon.id, "gmp-gmpopenh264");
- do_check_eq(gmpAddon.URL, "http://127.0.0.1:8011/gmp-gmpopenh264-1.1.zip");
- do_check_eq(gmpAddon.hashFunction, "sha256");
- do_check_eq(gmpAddon.hashValue, "1118b90d6f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee");
- do_check_eq(gmpAddon.version, "1.1");
- do_check_true(gmpAddon.isValid);
- do_check_false(gmpAddon.isInstalled);
-
- gmpAddon = res.gmpAddons[1];
- do_check_eq(gmpAddon.id, "NOT-gmp-gmpopenh264");
- do_check_eq(gmpAddon.URL, "http://127.0.0.1:8011/NOT-gmp-gmpopenh264-1.1.zip");
- do_check_eq(gmpAddon.hashFunction, "sha512");
- do_check_eq(gmpAddon.hashValue, "141592656f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee");
- do_check_eq(gmpAddon.version, "9.1");
- do_check_true(gmpAddon.isValid);
- do_check_false(gmpAddon.isInstalled);
-
- for (let i = 2; i < res.gmpAddons.length; i++) {
- do_check_false(res.gmpAddons[i].isValid);
- do_check_false(res.gmpAddons[i].isInstalled);
- }
- installManager.uninit();
-});
-
-/**
- * Tests that checking for addons when there are also updates available
- * works as expected.
- */
-add_task(function* test_checkForAddons_updatesWithAddons() {
- let responseXML =
- "<?xml version=\"1.0\"?>" +
- " <updates>" +
- " <update type=\"minor\" displayVersion=\"33.0a1\" appVersion=\"33.0a1\" platformVersion=\"33.0a1\" buildID=\"20140628030201\">" +
- " <patch type=\"complete\" URL=\"http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/06/2014-06-28-03-02-01-mozilla-central/firefox-33.0a1.en-US.mac.complete.mar\" hashFunction=\"sha512\" hashValue=\"f3f90d71dff03ae81def80e64bba3e4569da99c9e15269f731c2b167c4fc30b3aed9f5fee81c19614120230ca333e73a5e7def1b8e45d03135b2069c26736219\" size=\"85249896\"/>" +
- " </update>" +
- " <addons>" +
- " <addon id=\"gmp-gmpopenh264\"" +
- " URL=\"http://127.0.0.1:8011/gmp-gmpopenh264-1.1.zip\"" +
- " hashFunction=\"sha256\"" +
- " hashValue=\"1118b90d6f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee\"" +
- " version=\"1.1\"/>" +
- " </addons>" +
- "</updates>"
- overrideXHR(200, responseXML);
- let installManager = new GMPInstallManager();
- let res = yield installManager.checkForAddons();
- do_check_eq(res.gmpAddons.length, 1);
- let gmpAddon = res.gmpAddons[0];
- do_check_eq(gmpAddon.id, "gmp-gmpopenh264");
- do_check_eq(gmpAddon.URL, "http://127.0.0.1:8011/gmp-gmpopenh264-1.1.zip");
- do_check_eq(gmpAddon.hashFunction, "sha256");
- do_check_eq(gmpAddon.hashValue, "1118b90d6f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee");
- do_check_eq(gmpAddon.version, "1.1");
- do_check_true(gmpAddon.isValid);
- do_check_false(gmpAddon.isInstalled);
- installManager.uninit();
-});
-
-/**
- * Tests that installing found addons works as expected
- */
-function* test_checkForAddons_installAddon(id, includeSize, wantInstallReject) {
- do_print("Running installAddon for id: " + id +
- ", includeSize: " + includeSize +
- " and wantInstallReject: " + wantInstallReject);
- let httpServer = new HttpServer();
- let dir = FileUtils.getDir("TmpD", [], true);
- httpServer.registerDirectory("/", dir);
- httpServer.start(-1);
- let testserverPort = httpServer.identity.primaryPort;
- let zipFileName = "test_" + id + "_GMP.zip";
-
- let zipURL = URL_HOST + ":" + testserverPort + "/" + zipFileName;
- do_print("zipURL: " + zipURL);
-
- let data = "e~=0.5772156649";
- let zipFile = createNewZipFile(zipFileName, data);
- let hashFunc = "sha256";
- let expectedDigest = yield computeHash(hashFunc, zipFile.path);
- let fileSize = zipFile.fileSize;
- if (wantInstallReject) {
- fileSize = 1;
- }
-
- let responseXML =
- "<?xml version=\"1.0\"?>" +
- "<updates>" +
- " <addons>" +
- " <addon id=\"" + id + "-gmp-gmpopenh264\"" +
- " URL=\"" + zipURL + "\"" +
- " hashFunction=\"" + hashFunc + "\"" +
- " hashValue=\"" + expectedDigest + "\"" +
- (includeSize ? " size=\"" + fileSize + "\"" : "") +
- " version=\"1.1\"/>" +
- " </addons>" +
- "</updates>"
-
- overrideXHR(200, responseXML);
- let installManager = new GMPInstallManager();
- let res = yield installManager.checkForAddons();
- do_check_eq(res.gmpAddons.length, 1);
- let gmpAddon = res.gmpAddons[0];
- do_check_false(gmpAddon.isInstalled);
-
- try {
- let extractedPaths = yield installManager.installAddon(gmpAddon);
- if (wantInstallReject) {
- do_check_true(false); // installAddon() should have thrown.
- }
- do_check_eq(extractedPaths.length, 1);
- let extractedPath = extractedPaths[0];
-
- do_print("Extracted path: " + extractedPath);
-
- let extractedFile = Cc["@mozilla.org/file/local;1"].
- createInstance(Ci.nsIFile);
- extractedFile.initWithPath(extractedPath);
- do_check_true(extractedFile.exists());
- let readData = readStringFromFile(extractedFile);
- do_check_eq(readData, data);
-
- // Make sure the prefs are set correctly
- do_check_true(!!GMPScope.GMPPrefs.get(
- GMPScope.GMPPrefs.KEY_PLUGIN_LAST_UPDATE, "", gmpAddon.id));
- do_check_eq(GMPScope.GMPPrefs.get(GMPScope.GMPPrefs.KEY_PLUGIN_VERSION, "",
- gmpAddon.id),
- "1.1");
- do_check_eq(GMPScope.GMPPrefs.get(GMPScope.GMPPrefs.KEY_PLUGIN_ABI, "",
- gmpAddon.id),
- UpdateUtils.ABI);
- // Make sure it reports as being installed
- do_check_true(gmpAddon.isInstalled);
-
- // Cleanup
- extractedFile.parent.remove(true);
- zipFile.remove(false);
- httpServer.stop(function() {});
- installManager.uninit();
- } catch (ex) {
- zipFile.remove(false);
- if (!wantInstallReject) {
- do_throw("install update should not reject " + ex.message);
- }
- }
-}
-
-add_task(test_checkForAddons_installAddon.bind(null, "1", true, false));
-add_task(test_checkForAddons_installAddon.bind(null, "2", false, false));
-add_task(test_checkForAddons_installAddon.bind(null, "3", true, true));
-
-/**
- * Tests simpleCheckAndInstall when autoupdate is disabled for a GMP
- */
-add_task(function* test_simpleCheckAndInstall_autoUpdateDisabled() {
- GMPScope.GMPPrefs.set(GMPScope.GMPPrefs.KEY_PLUGIN_AUTOUPDATE, false, GMPScope.OPEN_H264_ID);
- let responseXML =
- "<?xml version=\"1.0\"?>" +
- "<updates>" +
- " <addons>" +
- // valid openh264
- " <addon id=\"gmp-gmpopenh264\"" +
- " URL=\"http://127.0.0.1:8011/gmp-gmpopenh264-1.1.zip\"" +
- " hashFunction=\"sha256\"" +
- " hashValue=\"1118b90d6f645eefc2b99af17bae396636ace1e33d079c88de715177584e2aee\"" +
- " version=\"1.1\"/>" +
- " </addons>" +
- "</updates>"
-
- overrideXHR(200, responseXML);
- let installManager = new GMPInstallManager();
- let result = yield installManager.simpleCheckAndInstall();
- do_check_eq(result.status, "nothing-new-to-install");
- Preferences.reset(GMPScope.GMPPrefs.KEY_UPDATE_LAST_CHECK);
- GMPScope.GMPPrefs.set(GMPScope.GMPPrefs.KEY_PLUGIN_AUTOUPDATE, true, GMPScope.OPEN_H264_ID);
-});
-
-/**
- * Tests simpleCheckAndInstall nothing to install
- */
-add_task(function* test_simpleCheckAndInstall_nothingToInstall() {
- let responseXML =
- "<?xml version=\"1.0\"?>" +
- "<updates>" +
- "</updates>"
-
- overrideXHR(200, responseXML);
- let installManager = new GMPInstallManager();
- let result = yield installManager.simpleCheckAndInstall();
- do_check_eq(result.status, "nothing-new-to-install");
-});
-
-/**
- * Tests simpleCheckAndInstall too frequent
- */
-add_task(function* test_simpleCheckAndInstall_tooFrequent() {
- let responseXML =
- "<?xml version=\"1.0\"?>" +
- "<updates>" +
- "</updates>"
-
- overrideXHR(200, responseXML);
- let installManager = new GMPInstallManager();
- let result = yield installManager.simpleCheckAndInstall();
- do_check_eq(result.status, "too-frequent-no-check");
-});
-
-/**
- * Tests that installing addons when there is no server works as expected
- */
-add_test(function test_installAddon_noServer() {
- let dir = FileUtils.getDir("TmpD", [], true);
- let zipFileName = "test_GMP.zip";
- let zipURL = URL_HOST + ":0/" + zipFileName;
-
- let data = "e~=0.5772156649";
- let zipFile = createNewZipFile(zipFileName, data);
-
- let responseXML =
- "<?xml version=\"1.0\"?>" +
- "<updates>" +
- " <addons>" +
- " <addon id=\"gmp-gmpopenh264\"" +
- " URL=\"" + zipURL + "\"" +
- " hashFunction=\"sha256\"" +
- " hashValue=\"11221cbda000347b054028b527a60e578f919cb10f322ef8077d3491c6fcb474\"" +
- " version=\"1.1\"/>" +
- " </addons>" +
- "</updates>"
-
- overrideXHR(200, responseXML);
- let installManager = new GMPInstallManager();
- let checkPromise = installManager.checkForAddons();
- checkPromise.then(res => {
- do_check_eq(res.gmpAddons.length, 1);
- let gmpAddon = res.gmpAddons[0];
-
- GMPInstallManager.overrideLeaveDownloadedZip = true;
- let installPromise = installManager.installAddon(gmpAddon);
- installPromise.then(extractedPaths => {
- do_throw("No server for install should reject");
- }, err => {
- do_check_true(!!err);
- installManager.uninit();
- run_next_test();
- });
- }, () => {
- do_throw("check should not reject for install no server");
- });
-});
-
-/**
- * Returns the read stream into a string
- */
-function readStringFromInputStream(inputStream) {
- let sis = Cc["@mozilla.org/scriptableinputstream;1"].
- createInstance(Ci.nsIScriptableInputStream);
- sis.init(inputStream);
- let text = sis.read(sis.available());
- sis.close();
- return text;
-}
-
-/**
- * Reads a string of text from a file.
- * This function only works with ASCII text.
- */
-function readStringFromFile(file) {
- if (!file.exists()) {
- do_print("readStringFromFile - file doesn't exist: " + file.path);
- return null;
- }
- let fis = Cc["@mozilla.org/network/file-input-stream;1"].
- createInstance(Ci.nsIFileInputStream);
- fis.init(file, FileUtils.MODE_RDONLY, FileUtils.PERMS_FILE, 0);
- return readStringFromInputStream(fis);
-}
-
-/**
- * Bare bones XMLHttpRequest implementation for testing onprogress, onerror,
- * and onload nsIDomEventListener handleEvent.
- */
-function makeHandler(aVal) {
- if (typeof aVal == "function")
- return { handleEvent: aVal };
- return aVal;
-}
-/**
- * Constructs a mock xhr which is used for testing different aspects
- * of responses.
- */
-function xhr(inputStatus, inputResponse, options) {
- this.inputStatus = inputStatus;
- this.inputResponse = inputResponse;
- this.status = 0;
- this.responseXML = null;
- this._aborted = false;
- this._onabort = null;
- this._onprogress = null;
- this._onerror = null;
- this._onload = null;
- this._onloadend = null;
- this._ontimeout = null;
- this._url = null;
- this._method = null;
- this._timeout = 0;
- this._notified = false;
- this._options = options || {};
-}
-xhr.prototype = {
- overrideMimeType: function(aMimetype) { },
- setRequestHeader: function(aHeader, aValue) { },
- status: null,
- channel: { set notificationCallbacks(aVal) { } },
- open: function(aMethod, aUrl) {
- this.channel.originalURI = Services.io.newURI(aUrl, null, null);
- this._method = aMethod; this._url = aUrl;
- },
- abort: function() {
- this._dropRequest = true;
- this._notify(["abort", "loadend"]);
- },
- responseXML: null,
- responseText: null,
- send: function(aBody) {
- do_execute_soon(function() {
- try {
- if (this._options.dropRequest) {
- if (this._timeout > 0 && this._options.timeout) {
- this._notify(["timeout", "loadend"]);
- }
- return;
- }
- this.status = this.inputStatus;
- this.responseText = this.inputResponse;
- try {
- let parser = Cc["@mozilla.org/xmlextras/domparser;1"].
- createInstance(Ci.nsIDOMParser);
- this.responseXML = parser.parseFromString(this.inputResponse,
- "application/xml");
- } catch (e) {
- this.responseXML = null;
- }
- if (this.inputStatus === 200) {
- this._notify(["load", "loadend"]);
- } else {
- this._notify(["error", "loadend"]);
- }
- } catch (ex) {
- do_throw(ex);
- }
- }.bind(this));
- },
- set onabort(aValue) { this._onabort = makeHandler(aValue); },
- get onabort() { return this._onabort; },
- set onprogress(aValue) { this._onprogress = makeHandler(aValue); },
- get onprogress() { return this._onprogress; },
- set onerror(aValue) { this._onerror = makeHandler(aValue); },
- get onerror() { return this._onerror; },
- set onload(aValue) { this._onload = makeHandler(aValue); },
- get onload() { return this._onload; },
- set onloadend(aValue) { this._onloadend = makeHandler(aValue); },
- get onloadend() { return this._onloadend; },
- set ontimeout(aValue) { this._ontimeout = makeHandler(aValue); },
- get ontimeout() { return this._ontimeout; },
- set timeout(aValue) { this._timeout = aValue; },
- _notify: function(events) {
- if (this._notified) {
- return;
- }
- this._notified = true;
- for (let item of events) {
- let k = "on" + item;
- if (this[k]) {
- do_print("Notifying " + item);
- let e = {
- target: this,
- type: item,
- };
- this[k](e);
- } else {
- do_print("Notifying " + item + ", but there are no listeners");
- }
- }
- },
- addEventListener: function(aEvent, aValue, aCapturing) {
- eval("this._on" + aEvent + " = aValue");
- },
- flags: Ci.nsIClassInfo.SINGLETON,
- getScriptableHelper: () => null,
- getInterfaces: function(aCount) {
- let interfaces = [Ci.nsISupports];
- aCount.value = interfaces.length;
- return interfaces;
- },
- classDescription: "XMLHttpRequest",
- contractID: "@mozilla.org/xmlextras/xmlhttprequest;1",
- classID: Components.ID("{c9b37f43-4278-4304-a5e0-600991ab08cb}"),
- createInstance: function(aOuter, aIID) {
- if (aOuter == null)
- return this.QueryInterface(aIID);
- throw Cr.NS_ERROR_NO_AGGREGATION;
- },
- QueryInterface: function(aIID) {
- if (aIID.equals(Ci.nsIClassInfo) ||
- aIID.equals(Ci.nsISupports))
- return this;
- throw Cr.NS_ERROR_NO_INTERFACE;
- },
- get wrappedJSObject() { return this; }
-};
-
-/**
- * Helper used to overrideXHR requests (no matter to what URL) with the
- * specified status and response.
- * @param status The status you want to get back when an XHR request is made
- * @param response The response you want to get back when an XHR request is made
- */
-function overrideXHR(status, response, options) {
- overrideXHR.myxhr = new xhr(status, response, options);
- ProductAddonCheckerScope.CreateXHR = function() {
- return overrideXHR.myxhr;
- };
- return overrideXHR.myxhr;
-}
-
-/**
- * Creates a new zip file containing a file with the specified data
- * @param zipName The name of the zip file
- * @param data The data to go inside the zip for the filename entry1.info
- */
-function createNewZipFile(zipName, data) {
- // Create a zip file which will be used for extracting
- let stream = Cc["@mozilla.org/io/string-input-stream;1"].
- createInstance(Ci.nsIStringInputStream);
- stream.setData(data, data.length);
- let zipWriter = Cc["@mozilla.org/zipwriter;1"].
- createInstance(Components.interfaces.nsIZipWriter);
- let zipFile = FileUtils.getFile("TmpD", [zipName]);
- if (zipFile.exists()) {
- zipFile.remove(false);
- }
- // From prio.h
- const PR_RDWR = 0x04;
- const PR_CREATE_FILE = 0x08;
- const PR_TRUNCATE = 0x20;
- zipWriter.open(zipFile, PR_RDWR | PR_CREATE_FILE | PR_TRUNCATE);
- zipWriter.addEntryStream("entry1.info", Date.now(),
- Ci.nsIZipWriter.COMPRESSION_BEST, stream, false);
- zipWriter.close();
- stream.close();
- do_print("zip file created on disk at: " + zipFile.path);
- return zipFile;
-}
diff --git a/toolkit/modules/tests/xpcshell/test_Http.js b/toolkit/modules/tests/xpcshell/test_Http.js
deleted file mode 100644
index 3dfd769b71..0000000000
--- a/toolkit/modules/tests/xpcshell/test_Http.js
+++ /dev/null
@@ -1,257 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-Components.utils.import("resource://gre/modules/Http.jsm");
-Components.utils.import("resource://testing-common/httpd.js");
-
-const BinaryInputStream = Components.Constructor("@mozilla.org/binaryinputstream;1",
- "nsIBinaryInputStream", "setInputStream");
-
-var server;
-
-const kDefaultServerPort = 9000;
-const kSuccessPath = "/success";
-const kBaseUrl = "http://localhost:" + kDefaultServerPort;
-const kSuccessUrl = kBaseUrl + kSuccessPath;
-
-const kPostPath = "/post";
-const kPostUrl = kBaseUrl + kPostPath;
-const kPostDataSent = [["foo", "bar"], ["complex", "!*()@"]];
-const kPostDataReceived = "foo=bar&complex=%21%2A%28%29%40";
-const kPostMimeTypeReceived = "application/x-www-form-urlencoded; charset=utf-8";
-
-const kJsonPostPath = "/json_post";
-const kJsonPostUrl = kBaseUrl + kJsonPostPath;
-const kJsonPostData = JSON.stringify(kPostDataSent);
-const kJsonPostMimeType = "application/json";
-
-const kPutPath = "/put";
-const kPutUrl = kBaseUrl + kPutPath;
-const kPutDataSent = [["P", "NP"]];
-const kPutDataReceived = "P=NP";
-
-const kGetPath = "/get";
-const kGetUrl = kBaseUrl + kGetPath;
-
-function successResult(aRequest, aResponse) {
- aResponse.setStatusLine(null, 200, "OK");
- aResponse.setHeader("Content-Type", "application/json");
- aResponse.write("Success!");
-}
-
-function getDataChecker(aExpectedMethod, aExpectedData, aExpectedMimeType = null) {
- return function(aRequest, aResponse) {
- let body = new BinaryInputStream(aRequest.bodyInputStream);
- let bytes = [];
- let avail;
- while ((avail = body.available()) > 0)
- Array.prototype.push.apply(bytes, body.readByteArray(avail));
-
- do_check_eq(aRequest.method, aExpectedMethod);
-
- // Checking if the Content-Type is as expected.
- if (aExpectedMimeType) {
- let contentType = aRequest.getHeader("Content-Type");
- do_check_eq(contentType, aExpectedMimeType);
- }
-
- var data = String.fromCharCode.apply(null, bytes);
-
- do_check_eq(data, aExpectedData);
-
- aResponse.setStatusLine(null, 200, "OK");
- aResponse.setHeader("Content-Type", "application/json");
- aResponse.write("Success!");
- }
-}
-
-add_test(function test_successCallback() {
- do_test_pending();
- let options = {
- onLoad: function(aResponse) {
- do_check_eq(aResponse, "Success!");
- do_test_finished();
- run_next_test();
- },
- onError: function(e) {
- do_check_true(false);
- do_test_finished();
- run_next_test();
- }
- }
- httpRequest(kSuccessUrl, options);
-});
-
-add_test(function test_errorCallback() {
- do_test_pending();
- let options = {
- onSuccess: function(aResponse) {
- do_check_true(false);
- do_test_finished();
- run_next_test();
- },
- onError: function(e, aResponse) {
- do_check_eq(e, "404 - Not Found");
- do_test_finished();
- run_next_test();
- }
- }
- httpRequest(kBaseUrl + "/failure", options);
-});
-
-add_test(function test_PostData() {
- do_test_pending();
- let options = {
- onLoad: function(aResponse) {
- do_check_eq(aResponse, "Success!");
- do_test_finished();
- run_next_test();
- },
- onError: function(e) {
- do_check_true(false);
- do_test_finished();
- run_next_test();
- },
- postData: kPostDataSent
- }
- httpRequest(kPostUrl, options);
-});
-
-add_test(function test_PutData() {
- do_test_pending();
- let options = {
- method: "PUT",
- onLoad: function(aResponse) {
- do_check_eq(aResponse, "Success!");
- do_test_finished();
- run_next_test();
- },
- onError: function(e) {
- do_check_true(false);
- do_test_finished();
- run_next_test();
- },
- postData: kPutDataSent
- }
- httpRequest(kPutUrl, options);
-});
-
-add_test(function test_GetData() {
- do_test_pending();
- let options = {
- onLoad: function(aResponse) {
- do_check_eq(aResponse, "Success!");
- do_test_finished();
- run_next_test();
- },
- onError: function(e) {
- do_check_true(false);
- do_test_finished();
- run_next_test();
- },
- postData: null
- }
- httpRequest(kGetUrl, options);
-});
-
-add_test(function test_OptionalParameters() {
- let options = {
- onLoad: null,
- onError: null,
- logger: null
- };
- // Just make sure that nothing throws when doing this (i.e. httpRequest
- // doesn't try to access null options).
- httpRequest(kGetUrl, options);
- run_next_test();
-});
-
-/**
- * Makes sure that httpRequest API allows setting a custom Content-Type header
- * for POST requests when data is a string.
- */
-add_test(function test_CustomContentTypeOnPost() {
- do_test_pending();
-
- // Preparing the request parameters.
- let options = {
- onLoad: function(aResponse) {
- do_check_eq(aResponse, "Success!");
- do_test_finished();
- run_next_test();
- },
- onError: function(e) {
- do_check_true(false);
- do_test_finished();
- run_next_test();
- },
- postData: kJsonPostData,
- // Setting a custom Content-Type header.
- headers: [['Content-Type', "application/json"]]
- }
-
- // Firing the request.
- httpRequest(kJsonPostUrl, options);
-});
-
-/**
- * Ensures that the httpRequest API provides a way to override the response
- * MIME type.
- */
-add_test(function test_OverrideMimeType() {
- do_test_pending();
-
- // Preparing the request parameters.
- const kMimeType = 'text/xml; charset=UTF-8';
- let options = {
- onLoad: function(aResponse, xhr) {
- do_check_eq(aResponse, "Success!");
-
- // Set the expected MIME-type.
- let reportedMimeType = xhr.getResponseHeader("Content-Type");
- do_check_neq(reportedMimeType, kMimeType);
-
- // responseXML should not be not null if overriding mime type succeeded.
- do_check_true(xhr.responseXML != null);
-
- do_test_finished();
- run_next_test();
- },
- onError: function(e) {
- do_check_true(false);
- do_test_finished();
- run_next_test();
- }
- };
-
- // Firing the request.
- let xhr = httpRequest(kGetUrl, options);
-
- // Override the response MIME type.
- xhr.overrideMimeType(kMimeType);
-});
-
-function run_test() {
- // Set up a mock HTTP server to serve a success page.
- server = new HttpServer();
- server.registerPathHandler(kSuccessPath, successResult);
- server.registerPathHandler(kPostPath,
- getDataChecker("POST", kPostDataReceived,
- kPostMimeTypeReceived));
- server.registerPathHandler(kPutPath,
- getDataChecker("PUT", kPutDataReceived));
- server.registerPathHandler(kGetPath, getDataChecker("GET", ""));
- server.registerPathHandler(kJsonPostPath,
- getDataChecker("POST", kJsonPostData,
- kJsonPostMimeType));
-
- server.start(kDefaultServerPort);
-
- run_next_test();
-
- // Teardown.
- do_register_cleanup(function() {
- server.stop(function() { });
- });
-}
-
diff --git a/toolkit/modules/tests/xpcshell/test_Integration.js b/toolkit/modules/tests/xpcshell/test_Integration.js
deleted file mode 100644
index 808e2d34fb..0000000000
--- a/toolkit/modules/tests/xpcshell/test_Integration.js
+++ /dev/null
@@ -1,238 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/*
- * Tests the Integration.jsm module.
- */
-
-"use strict";
-
-const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
-
-Cu.import("resource://gre/modules/Integration.jsm", this);
-Cu.import("resource://gre/modules/Services.jsm", this);
-Cu.import("resource://gre/modules/Task.jsm", this);
-
-const TestIntegration = {
- value: "value",
-
- get valueFromThis() {
- return this.value;
- },
-
- get property() {
- return this._property;
- },
-
- set property(value) {
- this._property = value;
- },
-
- method(argument) {
- this.methodArgument = argument;
- return "method" + argument;
- },
-
- asyncMethod: Task.async(function* (argument) {
- this.asyncMethodArgument = argument;
- return "asyncMethod" + argument;
- }),
-};
-
-let overrideFn = base => ({
- value: "overridden-value",
-
- get property() {
- return "overridden-" + base.__lookupGetter__("property").call(this);
- },
-
- set property(value) {
- base.__lookupSetter__("property").call(this, "overridden-" + value);
- },
-
- method() {
- return "overridden-" + base.method.apply(this, arguments);
- },
-
- asyncMethod: Task.async(function* () {
- return "overridden-" + (yield base.asyncMethod.apply(this, arguments));
- }),
-});
-
-let superOverrideFn = base => ({
- __proto__: base,
-
- value: "overridden-value",
-
- get property() {
- return "overridden-" + super.property;
- },
-
- set property(value) {
- super.property = "overridden-" + value;
- },
-
- method() {
- return "overridden-" + super.method(...arguments);
- },
-
- asyncMethod: Task.async(function* () {
- // We cannot use the "super" keyword in methods defined using "Task.async".
- return "overridden-" + (yield base.asyncMethod.apply(this, arguments));
- }),
-});
-
-/**
- * Fails the test if the results of method invocations on the combined object
- * don't match the expected results based on how many overrides are registered.
- *
- * @param combined
- * The combined object based on the TestIntegration root.
- * @param overridesCount
- * Zero if the root object is not overridden, or a higher value to test
- * the presence of one or more integration overrides.
- */
-function* assertCombinedResults(combined, overridesCount) {
- let expectedValue = overridesCount > 0 ? "overridden-value" : "value";
- let prefix = "overridden-".repeat(overridesCount);
-
- Assert.equal(combined.value, expectedValue);
- Assert.equal(combined.valueFromThis, expectedValue);
-
- combined.property = "property";
- Assert.equal(combined.property, prefix.repeat(2) + "property");
-
- combined.methodArgument = "";
- Assert.equal(combined.method("-argument"), prefix + "method-argument");
- Assert.equal(combined.methodArgument, "-argument");
-
- combined.asyncMethodArgument = "";
- Assert.equal(yield combined.asyncMethod("-argument"),
- prefix + "asyncMethod-argument");
- Assert.equal(combined.asyncMethodArgument, "-argument");
-}
-
-/**
- * Fails the test if the results of method invocations on the combined object
- * for the "testModule" integration point don't match the expected results based
- * on how many overrides are registered.
- *
- * @param overridesCount
- * Zero if the root object is not overridden, or a higher value to test
- * the presence of one or more integration overrides.
- */
-function* assertCurrentCombinedResults(overridesCount) {
- let combined = Integration.testModule.getCombined(TestIntegration);
- yield assertCombinedResults(combined, overridesCount);
-}
-
-/**
- * Checks the initial state with no integration override functions registered.
- */
-add_task(function* test_base() {
- yield assertCurrentCombinedResults(0);
-});
-
-/**
- * Registers and unregisters an integration override function.
- */
-add_task(function* test_override() {
- Integration.testModule.register(overrideFn);
- yield assertCurrentCombinedResults(1);
-
- // Registering the same function more than once has no effect.
- Integration.testModule.register(overrideFn);
- yield assertCurrentCombinedResults(1);
-
- Integration.testModule.unregister(overrideFn);
- yield assertCurrentCombinedResults(0);
-});
-
-/**
- * Registers and unregisters more than one integration override function, of
- * which one uses the prototype and the "super" keyword to access the base.
- */
-add_task(function* test_override_super_multiple() {
- Integration.testModule.register(overrideFn);
- Integration.testModule.register(superOverrideFn);
- yield assertCurrentCombinedResults(2);
-
- Integration.testModule.unregister(overrideFn);
- yield assertCurrentCombinedResults(1);
-
- Integration.testModule.unregister(superOverrideFn);
- yield assertCurrentCombinedResults(0);
-});
-
-/**
- * Registers an integration override function that throws an exception, and
- * ensures that this does not block other functions from being registered.
- */
-add_task(function* test_override_error() {
- let errorOverrideFn = base => { throw "Expected error." };
-
- Integration.testModule.register(errorOverrideFn);
- Integration.testModule.register(overrideFn);
- yield assertCurrentCombinedResults(1);
-
- Integration.testModule.unregister(errorOverrideFn);
- Integration.testModule.unregister(overrideFn);
- yield assertCurrentCombinedResults(0);
-});
-
-/**
- * Checks that state saved using the "this" reference is preserved as a shallow
- * copy when registering new integration override functions.
- */
-add_task(function* test_state_preserved() {
- let valueObject = { toString: () => "toString" };
-
- let combined = Integration.testModule.getCombined(TestIntegration);
- combined.property = valueObject;
- Assert.ok(combined.property === valueObject);
-
- Integration.testModule.register(overrideFn);
- combined = Integration.testModule.getCombined(TestIntegration);
- Assert.equal(combined.property, "overridden-toString");
-
- Integration.testModule.unregister(overrideFn);
- combined = Integration.testModule.getCombined(TestIntegration);
- Assert.ok(combined.property === valueObject);
-});
-
-/**
- * Checks that the combined integration objects cannot be used with XPCOM.
- *
- * This is limited by the fact that interfaces with the "[function]" annotation,
- * for example nsIObserver, do not call the QueryInterface implementation.
- */
-add_task(function* test_xpcom_throws() {
- let combined = Integration.testModule.getCombined(TestIntegration);
-
- // This calls QueryInterface because it looks for nsISupportsWeakReference.
- Assert.throws(() => Services.obs.addObserver(combined, "test-topic", true),
- "NS_NOINTERFACE");
-});
-
-/**
- * Checks that getters defined by defineModuleGetter are able to retrieve the
- * latest version of the combined integration object.
- */
-add_task(function* test_defineModuleGetter() {
- let objectForGetters = {};
-
- // Test with and without the optional "symbol" parameter.
- Integration.testModule.defineModuleGetter(objectForGetters,
- "TestIntegration", "resource://testing-common/TestIntegration.jsm");
- Integration.testModule.defineModuleGetter(objectForGetters,
- "integration", "resource://testing-common/TestIntegration.jsm",
- "TestIntegration");
-
- Integration.testModule.register(overrideFn);
- yield assertCombinedResults(objectForGetters.integration, 1);
- yield assertCombinedResults(objectForGetters.TestIntegration, 1);
-
- Integration.testModule.unregister(overrideFn);
- yield assertCombinedResults(objectForGetters.integration, 0);
- yield assertCombinedResults(objectForGetters.TestIntegration, 0);
-});
diff --git a/toolkit/modules/tests/xpcshell/test_JSONFile.js b/toolkit/modules/tests/xpcshell/test_JSONFile.js
deleted file mode 100644
index 77e8c55b92..0000000000
--- a/toolkit/modules/tests/xpcshell/test_JSONFile.js
+++ /dev/null
@@ -1,242 +0,0 @@
-/**
- * Tests the JSONFile object.
- */
-
-"use strict";
-
-// Globals
-
-const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "DownloadPaths",
- "resource://gre/modules/DownloadPaths.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
- "resource://gre/modules/FileUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "OS",
- "resource://gre/modules/osfile.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "JSONFile",
- "resource://gre/modules/JSONFile.jsm");
-
-let gFileCounter = Math.floor(Math.random() * 1000000);
-
-/**
- * Returns a reference to a temporary file, that is guaranteed not to exist, and
- * to have never been created before.
- *
- * @param aLeafName
- * Suggested leaf name for the file to be created.
- *
- * @return nsIFile pointing to a non-existent file in a temporary directory.
- *
- * @note It is not enough to delete the file if it exists, or to delete the file
- * after calling nsIFile.createUnique, because on Windows the delete
- * operation in the file system may still be pending, preventing a new
- * file with the same name to be created.
- */
-function getTempFile(aLeafName)
-{
- // Prepend a serial number to the extension in the suggested leaf name.
- let [base, ext] = DownloadPaths.splitBaseNameAndExtension(aLeafName);
- let leafName = base + "-" + gFileCounter + ext;
- gFileCounter++;
-
- // Get a file reference under the temporary directory for this test file.
- let file = FileUtils.getFile("TmpD", [leafName]);
- do_check_false(file.exists());
-
- do_register_cleanup(function () {
- if (file.exists()) {
- file.remove(false);
- }
- });
-
- return file;
-}
-
-const TEST_STORE_FILE_NAME = "test-store.json";
-
-const TEST_DATA = {
- number: 123,
- string: "test",
- object: {
- prop1: 1,
- prop2: 2,
- },
-};
-
-// Tests
-
-add_task(function* test_save_reload()
-{
- let storeForSave = new JSONFile({
- path: getTempFile(TEST_STORE_FILE_NAME).path,
- });
-
- yield storeForSave.load();
-
- do_check_true(storeForSave.dataReady);
- do_check_matches(storeForSave.data, {});
-
- Object.assign(storeForSave.data, TEST_DATA);
-
- yield new Promise((resolve) => {
- let save = storeForSave._save.bind(storeForSave);
- storeForSave._save = () => {
- save();
- resolve();
- };
- storeForSave.saveSoon();
- });
-
- let storeForLoad = new JSONFile({
- path: storeForSave.path,
- });
-
- yield storeForLoad.load();
-
- Assert.deepEqual(storeForLoad.data, TEST_DATA);
-});
-
-add_task(function* test_load_sync()
-{
- let storeForSave = new JSONFile({
- path: getTempFile(TEST_STORE_FILE_NAME).path
- });
- yield storeForSave.load();
- Object.assign(storeForSave.data, TEST_DATA);
- yield storeForSave._save();
-
- let storeForLoad = new JSONFile({
- path: storeForSave.path,
- });
- storeForLoad.ensureDataReady();
-
- Assert.deepEqual(storeForLoad.data, TEST_DATA);
-});
-
-add_task(function* test_load_with_dataPostProcessor()
-{
- let storeForSave = new JSONFile({
- path: getTempFile(TEST_STORE_FILE_NAME).path
- });
- yield storeForSave.load();
- Object.assign(storeForSave.data, TEST_DATA);
- yield storeForSave._save();
-
- let random = Math.random();
- let storeForLoad = new JSONFile({
- path: storeForSave.path,
- dataPostProcessor: (data) => {
- Assert.deepEqual(data, TEST_DATA);
-
- data.test = random;
- return data;
- },
- });
-
- yield storeForLoad.load();
-
- do_check_eq(storeForLoad.data.test, random);
-});
-
-add_task(function* test_load_with_dataPostProcessor_fails()
-{
- let store = new JSONFile({
- path: getTempFile(TEST_STORE_FILE_NAME).path,
- dataPostProcessor: () => {
- throw new Error("dataPostProcessor fails.");
- },
- });
-
- yield Assert.rejects(store.load(), /dataPostProcessor fails\./);
-
- do_check_false(store.dataReady);
-});
-
-add_task(function* test_load_sync_with_dataPostProcessor_fails()
-{
- let store = new JSONFile({
- path: getTempFile(TEST_STORE_FILE_NAME).path,
- dataPostProcessor: () => {
- throw new Error("dataPostProcessor fails.");
- },
- });
-
- Assert.throws(() => store.ensureDataReady(), /dataPostProcessor fails\./);
-
- do_check_false(store.dataReady);
-});
-
-/**
- * Loads data from a string in a predefined format. The purpose of this test is
- * to verify that the JSON format used in previous versions can be loaded.
- */
-add_task(function* test_load_string_predefined()
-{
- let store = new JSONFile({
- path: getTempFile(TEST_STORE_FILE_NAME).path,
- });
-
- let string =
- "{\"number\":123,\"string\":\"test\",\"object\":{\"prop1\":1,\"prop2\":2}}";
-
- yield OS.File.writeAtomic(store.path, new TextEncoder().encode(string),
- { tmpPath: store.path + ".tmp" });
-
- yield store.load();
-
- Assert.deepEqual(store.data, TEST_DATA);
-});
-
-/**
- * Loads data from a malformed JSON string.
- */
-add_task(function* test_load_string_malformed()
-{
- let store = new JSONFile({
- path: getTempFile(TEST_STORE_FILE_NAME).path,
- });
-
- let string = "{\"number\":123,\"string\":\"test\",\"object\":{\"prop1\":1,";
-
- yield OS.File.writeAtomic(store.path, new TextEncoder().encode(string),
- { tmpPath: store.path + ".tmp" });
-
- yield store.load();
-
- // A backup file should have been created.
- do_check_true(yield OS.File.exists(store.path + ".corrupt"));
- yield OS.File.remove(store.path + ".corrupt");
-
- // The store should be ready to accept new data.
- do_check_true(store.dataReady);
- do_check_matches(store.data, {});
-});
-
-/**
- * Loads data from a malformed JSON string, using the synchronous initialization
- * path.
- */
-add_task(function* test_load_string_malformed_sync()
-{
- let store = new JSONFile({
- path: getTempFile(TEST_STORE_FILE_NAME).path,
- });
-
- let string = "{\"number\":123,\"string\":\"test\",\"object\":{\"prop1\":1,";
-
- yield OS.File.writeAtomic(store.path, new TextEncoder().encode(string),
- { tmpPath: store.path + ".tmp" });
-
- store.ensureDataReady();
-
- // A backup file should have been created.
- do_check_true(yield OS.File.exists(store.path + ".corrupt"));
- yield OS.File.remove(store.path + ".corrupt");
-
- // The store should be ready to accept new data.
- do_check_true(store.dataReady);
- do_check_matches(store.data, {});
-});
diff --git a/toolkit/modules/tests/xpcshell/test_Log.js b/toolkit/modules/tests/xpcshell/test_Log.js
deleted file mode 100644
index 6aee99c936..0000000000
--- a/toolkit/modules/tests/xpcshell/test_Log.js
+++ /dev/null
@@ -1,592 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/* eslint-disable block-spacing */
-
-var {utils: Cu} = Components;
-
-Cu.import("resource://gre/modules/NetUtil.jsm");
-Cu.import("resource://gre/modules/osfile.jsm");
-
-Cu.import("resource://gre/modules/Promise.jsm")
-Cu.import("resource://gre/modules/Log.jsm");
-
-var testFormatter = {
- format: function format(message) {
- return message.loggerName + "\t" +
- message.levelDesc + "\t" +
- message.message;
- }
-};
-
-function MockAppender(formatter) {
- Log.Appender.call(this, formatter);
- this.messages = [];
-}
-MockAppender.prototype = {
- __proto__: Log.Appender.prototype,
-
- doAppend: function DApp_doAppend(message) {
- this.messages.push(message);
- }
-};
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function test_Logger() {
- let log = Log.repository.getLogger("test.logger");
- let appender = new MockAppender(new Log.BasicFormatter());
-
- log.level = Log.Level.Debug;
- appender.level = Log.Level.Info;
- log.addAppender(appender);
- log.info("info test");
- log.debug("this should be logged but not appended.");
-
- do_check_eq(appender.messages.length, 1);
-
- let msgRe = /\d+\ttest.logger\t\INFO\tinfo test/;
- do_check_true(msgRe.test(appender.messages[0]));
-});
-
-add_task(function test_Logger_parent() {
- // Check whether parenting is correct
- let grandparentLog = Log.repository.getLogger("grandparent");
- let childLog = Log.repository.getLogger("grandparent.parent.child");
- do_check_eq(childLog.parent.name, "grandparent");
-
- let parentLog = Log.repository.getLogger("grandparent.parent");
- do_check_eq(childLog.parent.name, "grandparent.parent");
-
- // Check that appends are exactly in scope
- let gpAppender = new MockAppender(new Log.BasicFormatter());
- gpAppender.level = Log.Level.Info;
- grandparentLog.addAppender(gpAppender);
- childLog.info("child info test");
- Log.repository.rootLogger.info("this shouldn't show up in gpAppender");
-
- do_check_eq(gpAppender.messages.length, 1);
- do_check_true(gpAppender.messages[0].indexOf("child info test") > 0);
-});
-
-add_test(function test_LoggerWithMessagePrefix() {
- let log = Log.repository.getLogger("test.logger.prefix");
- let appender = new MockAppender(new Log.MessageOnlyFormatter());
- log.addAppender(appender);
-
- let prefixed = Log.repository.getLoggerWithMessagePrefix(
- "test.logger.prefix", "prefix: ");
-
- log.warn("no prefix");
- prefixed.warn("with prefix");
-
- Assert.equal(appender.messages.length, 2, "2 messages were logged.");
- Assert.deepEqual(appender.messages, [
- "no prefix",
- "prefix: with prefix",
- ], "Prefix logger works.");
-
- run_next_test();
-});
-
-/*
- * A utility method for checking object equivalence.
- * Fields with a reqular expression value in expected will be tested
- * against the corresponding value in actual. Otherwise objects
- * are expected to have the same keys and equal values.
- */
-function checkObjects(expected, actual) {
- do_check_true(expected instanceof Object);
- do_check_true(actual instanceof Object);
- for (let key in expected) {
- do_check_neq(actual[key], undefined);
- if (expected[key] instanceof RegExp) {
- do_check_true(expected[key].test(actual[key].toString()));
- } else if (expected[key] instanceof Object) {
- checkObjects(expected[key], actual[key]);
- } else {
- do_check_eq(expected[key], actual[key]);
- }
- }
-
- for (let key in actual) {
- do_check_neq(expected[key], undefined);
- }
-}
-
-add_task(function test_StructuredLogCommands() {
- let appender = new MockAppender(new Log.StructuredFormatter());
- let logger = Log.repository.getLogger("test.StructuredOutput");
- logger.addAppender(appender);
- logger.level = Log.Level.Info;
-
- logger.logStructured("test_message", {_message: "message string one"});
- logger.logStructured("test_message", {_message: "message string two",
- _level: "ERROR",
- source_file: "test_Log.js"});
- logger.logStructured("test_message");
- logger.logStructured("test_message", {source_file: "test_Log.js",
- message_position: 4});
-
- let messageOne = {"_time": /\d+/,
- "_namespace": "test.StructuredOutput",
- "_level": "INFO",
- "_message": "message string one",
- "action": "test_message"};
-
- let messageTwo = {"_time": /\d+/,
- "_namespace": "test.StructuredOutput",
- "_level": "ERROR",
- "_message": "message string two",
- "action": "test_message",
- "source_file": "test_Log.js"};
-
- let messageThree = {"_time": /\d+/,
- "_namespace": "test.StructuredOutput",
- "_level": "INFO",
- "action": "test_message"};
-
- let messageFour = {"_time": /\d+/,
- "_namespace": "test.StructuredOutput",
- "_level": "INFO",
- "action": "test_message",
- "source_file": "test_Log.js",
- "message_position": 4};
-
- checkObjects(messageOne, JSON.parse(appender.messages[0]));
- checkObjects(messageTwo, JSON.parse(appender.messages[1]));
- checkObjects(messageThree, JSON.parse(appender.messages[2]));
- checkObjects(messageFour, JSON.parse(appender.messages[3]));
-
- let errored = false;
- try {
- logger.logStructured("", {_message: "invalid message"});
- } catch (e) {
- errored = true;
- do_check_eq(e, "An action is required when logging a structured message.");
- } finally {
- do_check_true(errored);
- }
-
- errored = false;
- try {
- logger.logStructured("message_action", "invalid params");
- } catch (e) {
- errored = true;
- do_check_eq(e, "The params argument is required to be an object.");
- } finally {
- do_check_true(errored);
- }
-
- // Logging with unstructured interface should produce the same messages
- // as the structured interface for these cases.
- appender = new MockAppender(new Log.StructuredFormatter());
- logger = Log.repository.getLogger("test.StructuredOutput1");
- messageOne._namespace = "test.StructuredOutput1";
- messageTwo._namespace = "test.StructuredOutput1";
- logger.addAppender(appender);
- logger.level = Log.Level.All;
- logger.info("message string one", {action: "test_message"});
- logger.error("message string two", {action: "test_message",
- source_file: "test_Log.js"});
-
- checkObjects(messageOne, JSON.parse(appender.messages[0]));
- checkObjects(messageTwo, JSON.parse(appender.messages[1]));
-});
-
-add_task(function test_StorageStreamAppender() {
- let appender = new Log.StorageStreamAppender(testFormatter);
- do_check_eq(appender.getInputStream(), null);
-
- // Log to the storage stream and verify the log was written and can be
- // read back.
- let logger = Log.repository.getLogger("test.StorageStreamAppender");
- logger.addAppender(appender);
- logger.info("OHAI");
- let inputStream = appender.getInputStream();
- let data = NetUtil.readInputStreamToString(inputStream,
- inputStream.available());
- do_check_eq(data, "test.StorageStreamAppender\tINFO\tOHAI\n");
-
- // We can read it again even.
- let sndInputStream = appender.getInputStream();
- let sameData = NetUtil.readInputStreamToString(sndInputStream,
- sndInputStream.available());
- do_check_eq(data, sameData);
-
- // Reset the appender and log some more.
- appender.reset();
- do_check_eq(appender.getInputStream(), null);
- logger.debug("wut?!?");
- inputStream = appender.getInputStream();
- data = NetUtil.readInputStreamToString(inputStream,
- inputStream.available());
- do_check_eq(data, "test.StorageStreamAppender\tDEBUG\twut?!?\n");
-});
-
-function fileContents(path) {
- let decoder = new TextDecoder();
- return OS.File.read(path).then(array => {
- return decoder.decode(array);
- });
-}
-
-add_task(function* test_FileAppender() {
- // This directory does not exist yet
- let dir = OS.Path.join(do_get_profile().path, "test_Log");
- do_check_false(yield OS.File.exists(dir));
- let path = OS.Path.join(dir, "test_FileAppender");
- let appender = new Log.FileAppender(path, testFormatter);
- let logger = Log.repository.getLogger("test.FileAppender");
- logger.addAppender(appender);
-
- // Logging to a file that can't be created won't do harm.
- do_check_false(yield OS.File.exists(path));
- logger.info("OHAI!");
-
- yield OS.File.makeDir(dir);
- logger.info("OHAI");
- yield appender._lastWritePromise;
-
- do_check_eq((yield fileContents(path)),
- "test.FileAppender\tINFO\tOHAI\n");
-
- logger.info("OHAI");
- yield appender._lastWritePromise;
-
- do_check_eq((yield fileContents(path)),
- "test.FileAppender\tINFO\tOHAI\n" +
- "test.FileAppender\tINFO\tOHAI\n");
-
- // Reset the appender and log some more.
- yield appender.reset();
- do_check_false(yield OS.File.exists(path));
-
- logger.debug("O RLY?!?");
- yield appender._lastWritePromise;
- do_check_eq((yield fileContents(path)),
- "test.FileAppender\tDEBUG\tO RLY?!?\n");
-
- yield appender.reset();
- logger.debug("1");
- logger.info("2");
- logger.info("3");
- logger.info("4");
- logger.info("5");
- // Waiting on only the last promise should account for all of these.
- yield appender._lastWritePromise;
-
- // Messages ought to be logged in order.
- do_check_eq((yield fileContents(path)),
- "test.FileAppender\tDEBUG\t1\n" +
- "test.FileAppender\tINFO\t2\n" +
- "test.FileAppender\tINFO\t3\n" +
- "test.FileAppender\tINFO\t4\n" +
- "test.FileAppender\tINFO\t5\n");
-});
-
-add_task(function* test_BoundedFileAppender() {
- let dir = OS.Path.join(do_get_profile().path, "test_Log");
-
- if (!(yield OS.File.exists(dir))) {
- yield OS.File.makeDir(dir);
- }
-
- let path = OS.Path.join(dir, "test_BoundedFileAppender");
- // This appender will hold about two lines at a time.
- let appender = new Log.BoundedFileAppender(path, testFormatter, 40);
- let logger = Log.repository.getLogger("test.BoundedFileAppender");
- logger.addAppender(appender);
-
- logger.info("ONE");
- logger.info("TWO");
- yield appender._lastWritePromise;
-
- do_check_eq((yield fileContents(path)),
- "test.BoundedFileAppender\tINFO\tONE\n" +
- "test.BoundedFileAppender\tINFO\tTWO\n");
-
- logger.info("THREE");
- logger.info("FOUR");
-
- do_check_neq(appender._removeFilePromise, undefined);
- yield appender._removeFilePromise;
- yield appender._lastWritePromise;
-
- do_check_eq((yield fileContents(path)),
- "test.BoundedFileAppender\tINFO\tTHREE\n" +
- "test.BoundedFileAppender\tINFO\tFOUR\n");
-
- yield appender.reset();
- logger.info("ONE");
- logger.info("TWO");
- logger.info("THREE");
- logger.info("FOUR");
-
- do_check_neq(appender._removeFilePromise, undefined);
- yield appender._removeFilePromise;
- yield appender._lastWritePromise;
-
- do_check_eq((yield fileContents(path)),
- "test.BoundedFileAppender\tINFO\tTHREE\n" +
- "test.BoundedFileAppender\tINFO\tFOUR\n");
-
-});
-
-/*
- * Test parameter formatting.
- */
-add_task(function* log_message_with_params() {
- let formatter = new Log.BasicFormatter();
-
- function formatMessage(text, params) {
- let full = formatter.format(new Log.LogMessage("test.logger", Log.Level.Warn, text, params));
- return full.split("\t")[3];
- }
-
- // Strings are substituted directly.
- do_check_eq(formatMessage("String is ${foo}", {foo: "bar"}),
- "String is bar");
-
- // Numbers are substituted.
- do_check_eq(formatMessage("Number is ${number}", {number: 47}),
- "Number is 47")
-
- // The entire params object is JSON-formatted and substituted.
- do_check_eq(formatMessage("Object is ${}", {foo: "bar"}),
- 'Object is {"foo":"bar"}');
-
- // An object nested inside params is JSON-formatted and substituted.
- do_check_eq(formatMessage("Sub object is ${sub}", {sub: {foo: "bar"}}),
- 'Sub object is {"foo":"bar"}');
-
- // The substitution field is missing from params. Leave the placeholder behind
- // to make the mistake obvious.
- do_check_eq(formatMessage("Missing object is ${missing}", {}),
- 'Missing object is ${missing}');
-
- // Make sure we don't treat the parameter name 'false' as a falsey value.
- do_check_eq(formatMessage("False is ${false}", {false: true}),
- 'False is true');
-
- // If an object has a .toJSON method, the formatter uses it.
- let ob = function() {};
- ob.toJSON = function() {return {sneaky: "value"}};
- do_check_eq(formatMessage("JSON is ${sub}", {sub: ob}),
- 'JSON is {"sneaky":"value"}');
-
- // Fall back to .toSource() if JSON.stringify() fails on an object.
- ob = function() {};
- ob.toJSON = function() {throw "oh noes JSON"};
- do_check_eq(formatMessage("Fail is ${sub}", {sub: ob}),
- 'Fail is (function() {})');
-
- // Fall back to .toString if both .toJSON and .toSource fail.
- ob.toSource = function() {throw "oh noes SOURCE"};
- do_check_eq(formatMessage("Fail is ${sub}", {sub: ob}),
- 'Fail is function() {}');
-
- // Fall back to '[object]' if .toJSON, .toSource and .toString fail.
- ob.toString = function() {throw "oh noes STRING"};
- do_check_eq(formatMessage("Fail is ${sub}", {sub: ob}),
- 'Fail is [object]');
-
- // If params are passed but there are no substitution in the text
- // we JSON format and append the entire parameters object.
- do_check_eq(formatMessage("Text with no subs", {a: "b", c: "d"}),
- 'Text with no subs: {"a":"b","c":"d"}');
-
- // If we substitute one parameter but not the other,
- // we ignore any params that aren't substituted.
- do_check_eq(formatMessage("Text with partial sub ${a}", {a: "b", c: "d"}),
- 'Text with partial sub b');
-
- // We don't format internal fields stored in params.
- do_check_eq(formatMessage("Params with _ ${}", {a: "b", _c: "d", _level:20, _message:"froo",
- _time:123456, _namespace:"here.there"}),
- 'Params with _ {"a":"b","_c":"d"}');
-
- // Don't print an empty params holder if all params are internal.
- do_check_eq(formatMessage("All params internal", {_level:20, _message:"froo",
- _time:123456, _namespace:"here.there"}),
- 'All params internal');
-
- // Format params with null and undefined values.
- do_check_eq(formatMessage("Null ${n} undefined ${u}", {n: null, u: undefined}),
- 'Null null undefined undefined');
-
- // Format params with number, bool, and Object/String type.
- do_check_eq(formatMessage("number ${n} boolean ${b} boxed Boolean ${bx} String ${s}",
- {n: 45, b: false, bx: new Boolean(true), s: new String("whatevs")}),
- 'number 45 boolean false boxed Boolean true String whatevs');
-
- /*
- * Check that errors get special formatting if they're formatted directly as
- * a named param or they're the only param, but not if they're a field in a
- * larger structure.
- */
- let err = Components.Exception("test exception", Components.results.NS_ERROR_FAILURE);
- let str = formatMessage("Exception is ${}", err);
- do_check_true(str.includes('Exception is [Exception... "test exception"'));
- do_check_true(str.includes("(NS_ERROR_FAILURE)"));
- str = formatMessage("Exception is", err);
- do_check_true(str.includes('Exception is: [Exception... "test exception"'));
- str = formatMessage("Exception is ${error}", {error: err});
- do_check_true(str.includes('Exception is [Exception... "test exception"'));
- str = formatMessage("Exception is", {_error: err});
- do_print(str);
- // Exceptions buried inside objects are formatted badly.
- do_check_true(str.includes('Exception is: {"_error":{}'));
- // If the message text is null, the message contains only the formatted params object.
- str = formatMessage(null, err);
- do_check_true(str.startsWith('[Exception... "test exception"'));
- // If the text is null and 'params' is a String object, the message is exactly that string.
- str = formatMessage(null, new String("String in place of params"));
- do_check_eq(str, "String in place of params");
-
- // We use object.valueOf() internally; make sure a broken valueOf() method
- // doesn't cause the logger to fail.
- let vOf = {a: 1, valueOf: function() {throw "oh noes valueOf"}};
- do_check_eq(formatMessage("Broken valueOf ${}", vOf),
- 'Broken valueOf ({a:1, valueOf:(function() {throw "oh noes valueOf"})})');
-
- // Test edge cases of bad data to formatter:
- // If 'params' is not an object, format it as a basic type.
- do_check_eq(formatMessage("non-object no subst", 1),
- 'non-object no subst: 1');
- do_check_eq(formatMessage("non-object all subst ${}", 2),
- 'non-object all subst 2');
- do_check_eq(formatMessage("false no subst", false),
- 'false no subst: false');
- do_check_eq(formatMessage("null no subst", null),
- 'null no subst: null');
- // If 'params' is undefined and there are no substitutions expected,
- // the message should still be output.
- do_check_eq(formatMessage("undefined no subst", undefined),
- 'undefined no subst');
- // If 'params' is not an object, no named substitutions can succeed;
- // therefore we leave the placeholder and append the formatted params.
- do_check_eq(formatMessage("non-object named subst ${junk} space", 3),
- 'non-object named subst ${junk} space: 3');
- // If there are no params, we leave behind the placeholders in the text.
- do_check_eq(formatMessage("no params ${missing}", undefined),
- 'no params ${missing}');
- // If params doesn't contain any of the tags requested in the text,
- // we leave them all behind and append the formatted params.
- do_check_eq(formatMessage("object missing tag ${missing} space", {mising: "not here"}),
- 'object missing tag ${missing} space: {"mising":"not here"}');
- // If we are given null text and no params, the resulting formatted message is empty.
- do_check_eq(formatMessage(null), '');
-});
-
-/*
- * If we call a log function with a non-string object in place of the text
- * argument, and no parameters, treat that the same as logging empty text
- * with the object argument as parameters. This makes the log useful when the
- * caller does "catch(err) {logger.error(err)}"
- */
-add_task(function* test_log_err_only() {
- let log = Log.repository.getLogger("error.only");
- let mockFormatter = { format: msg => msg };
- let appender = new MockAppender(mockFormatter);
- log.addAppender(appender);
-
- /*
- * Check that log.error(err) is treated the same as
- * log.error(null, err) by the logMessage constructor; the formatMessage()
- * tests above ensure that the combination of null text and an error object
- * is formatted correctly.
- */
- try {
- eval("javascript syntax error");
- }
- catch (e) {
- log.error(e);
- msg = appender.messages.pop();
- do_check_eq(msg.message, null);
- do_check_eq(msg.params, e);
- }
-});
-
-/*
- * Test logStructured() messages through basic formatter.
- */
-add_task(function* test_structured_basic() {
- let log = Log.repository.getLogger("test.logger");
- let appender = new MockAppender(new Log.BasicFormatter());
-
- log.level = Log.Level.Info;
- appender.level = Log.Level.Info;
- log.addAppender(appender);
-
- // A structured entry with no _message is treated the same as log./level/(null, params)
- // except the 'action' field is added to the object.
- log.logStructured("action", {data: "structure"});
- do_check_eq(appender.messages.length, 1);
- do_check_true(appender.messages[0].includes('{"data":"structure","action":"action"}'));
-
- // A structured entry with _message and substitution is treated the same as
- // log./level/(null, params).
- log.logStructured("action", {_message: "Structured sub ${data}", data: "structure"});
- do_check_eq(appender.messages.length, 2);
- do_print(appender.messages[1]);
- do_check_true(appender.messages[1].includes('Structured sub structure'));
-});
-
-/*
- * Test that all the basic logger methods pass the message and params through to the appender.
- */
-add_task(function* log_message_with_params() {
- let log = Log.repository.getLogger("error.logger");
- let mockFormatter = { format: msg => msg };
- let appender = new MockAppender(mockFormatter);
- log.addAppender(appender);
-
- let testParams = {a:1, b:2};
- log.fatal("Test fatal", testParams);
- log.error("Test error", testParams);
- log.warn("Test warn", testParams);
- log.info("Test info", testParams);
- log.config("Test config", testParams);
- log.debug("Test debug", testParams);
- log.trace("Test trace", testParams);
- do_check_eq(appender.messages.length, 7);
- for (let msg of appender.messages) {
- do_check_true(msg.params === testParams);
- do_check_true(msg.message.startsWith("Test "));
- }
-});
-
-/*
- * Check that we format JS Errors reasonably.
- */
-add_task(function* format_errors() {
- let pFormat = new Log.ParameterFormatter();
-
- // Test that subclasses of Error are recognized as errors.
- err = new ReferenceError("Ref Error", "ERROR_FILE", 28);
- str = pFormat.format(err);
- do_check_true(str.includes("ReferenceError"));
- do_check_true(str.includes("ERROR_FILE:28"));
- do_check_true(str.includes("Ref Error"));
-
- // Test that JS-generated Errors are recognized and formatted.
- try {
- yield Promise.resolve(); // Scrambles the stack
- eval("javascript syntax error");
- }
- catch (e) {
- str = pFormat.format(e);
- do_check_true(str.includes("SyntaxError: missing ;"));
- // Make sure we identified it as an Error and formatted the error location as
- // lineNumber:columnNumber.
- do_check_true(str.includes(":1:11)"));
- // Make sure that we use human-readable stack traces
- // Check that the error doesn't contain any reference to "Promise.jsm" or "Task.jsm"
- do_check_false(str.includes("Promise.jsm"));
- do_check_false(str.includes("Task.jsm"));
- do_check_true(str.includes("format_errors"));
- }
-});
diff --git a/toolkit/modules/tests/xpcshell/test_Log_stackTrace.js b/toolkit/modules/tests/xpcshell/test_Log_stackTrace.js
deleted file mode 100644
index 6e53db058c..0000000000
--- a/toolkit/modules/tests/xpcshell/test_Log_stackTrace.js
+++ /dev/null
@@ -1,30 +0,0 @@
-print("Define some functions in well defined line positions for the test");
-function foo(v) { return bar(v + 1); } // line 2
-function bar(v) { return baz(v + 1); } // line 3
-function baz(v) { throw new Error(v + 1); } // line 4
-
-print("Make sure lazy constructor calling/assignment works");
-Components.utils.import("resource://gre/modules/Log.jsm");
-
-function run_test() {
- print("Make sure functions, arguments, files are pretty printed in the trace");
- let trace = "";
- try {
- foo(0);
- }
- catch (ex) {
- trace = Log.stackTrace(ex);
- }
- print(`Got trace: ${trace}`);
- do_check_neq(trace, "");
-
- let bazPos = trace.indexOf("baz@test_Log_stackTrace.js:4");
- let barPos = trace.indexOf("bar@test_Log_stackTrace.js:3");
- let fooPos = trace.indexOf("foo@test_Log_stackTrace.js:2");
- print(`String positions: ${bazPos} ${barPos} ${fooPos}`);
-
- print("Make sure the desired messages show up");
- do_check_true(bazPos >= 0);
- do_check_true(barPos > bazPos);
- do_check_true(fooPos > barPos);
-}
diff --git a/toolkit/modules/tests/xpcshell/test_MatchGlobs.js b/toolkit/modules/tests/xpcshell/test_MatchGlobs.js
deleted file mode 100644
index 5dcfd19cba..0000000000
--- a/toolkit/modules/tests/xpcshell/test_MatchGlobs.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-Components.utils.import("resource://gre/modules/MatchPattern.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-function test(url, pattern) {
- let uri = Services.io.newURI(url, null, null);
- let m = new MatchGlobs(pattern);
- return m.matches(uri.spec);
-}
-
-function pass({url, pattern}) {
- ok(test(url, pattern), `Expected match: ${JSON.stringify(pattern)}, ${url}`);
-}
-
-function fail({url, pattern}) {
- ok(!test(url, pattern), `Expected no match: ${JSON.stringify(pattern)}, ${url}`);
-}
-
-function run_test() {
- let moz = "http://mozilla.org";
-
- pass({url: moz, pattern: ["*"]});
- pass({url: moz, pattern: ["http://*"]}),
- pass({url: moz, pattern: ["*mozilla*"]});
- pass({url: moz, pattern: ["*example*", "*mozilla*"]});
-
- pass({url: moz, pattern: ["*://*"]});
- pass({url: "https://mozilla.org", pattern: ["*://*"]});
-
- // Documentation example
- pass({url: "http://www.example.com/foo/bar", pattern: ["http://???.example.com/foo/*"]});
- pass({url: "http://the.example.com/foo/", pattern: ["http://???.example.com/foo/*"]});
- fail({url: "http://my.example.com/foo/bar", pattern: ["http://???.example.com/foo/*"]});
- fail({url: "http://example.com/foo/", pattern: ["http://???.example.com/foo/*"]});
- fail({url: "http://www.example.com/foo", pattern: ["http://???.example.com/foo/*"]});
-
- // Matches path
- let path = moz + "/abc/def";
- pass({url: path, pattern: ["*def"]});
- pass({url: path, pattern: ["*c/d*"]});
- pass({url: path, pattern: ["*org/abc*"]});
- fail({url: path + "/", pattern: ["*def"]});
-
- // Trailing slash
- pass({url: moz, pattern: ["*.org/"]});
- fail({url: moz, pattern: ["*.org"]});
-
- // Wrong TLD
- fail({url: moz, pattern: ["www*.m*.com/"]});
- // Case sensitive
- fail({url: moz, pattern: ["*.ORG/"]});
-
- fail({url: moz, pattern: []});
-}
diff --git a/toolkit/modules/tests/xpcshell/test_MatchPattern.js b/toolkit/modules/tests/xpcshell/test_MatchPattern.js
deleted file mode 100644
index 5830383610..0000000000
--- a/toolkit/modules/tests/xpcshell/test_MatchPattern.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-Components.utils.import("resource://gre/modules/MatchPattern.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-function test(url, pattern)
-{
- let uri = Services.io.newURI(url, null, null);
- let m = new MatchPattern(pattern);
- return m.matches(uri);
-}
-
-function pass({url, pattern})
-{
- do_check_true(test(url, pattern), `Expected match: ${JSON.stringify(pattern)}, ${url}`);
-}
-
-function fail({url, pattern})
-{
- do_check_false(test(url, pattern), `Expected no match: ${JSON.stringify(pattern)}, ${url}`);
-}
-
-function run_test()
-{
- // Invalid pattern.
- fail({url: "http://mozilla.org", pattern: ""});
-
- // Pattern must include trailing slash.
- fail({url: "http://mozilla.org", pattern: "http://mozilla.org"});
-
- // Protocol not allowed.
- fail({url: "http://mozilla.org", pattern: "gopher://wuarchive.wustl.edu/"});
-
- pass({url: "http://mozilla.org", pattern: "http://mozilla.org/"});
- pass({url: "http://mozilla.org/", pattern: "http://mozilla.org/"});
-
- pass({url: "http://mozilla.org/", pattern: "*://mozilla.org/"});
- pass({url: "https://mozilla.org/", pattern: "*://mozilla.org/"});
- fail({url: "file://mozilla.org/", pattern: "*://mozilla.org/"});
- fail({url: "ftp://mozilla.org/", pattern: "*://mozilla.org/"});
-
- fail({url: "http://mozilla.com", pattern: "http://*mozilla.com*/"});
- fail({url: "http://mozilla.com", pattern: "http://mozilla.*/"});
- fail({url: "http://mozilla.com", pattern: "http:/mozilla.com/"});
-
- pass({url: "http://google.com", pattern: "http://*.google.com/"});
- pass({url: "http://docs.google.com", pattern: "http://*.google.com/"});
-
- pass({url: "http://mozilla.org:8080", pattern: "http://mozilla.org/"});
- pass({url: "http://mozilla.org:8080", pattern: "*://mozilla.org/"});
- fail({url: "http://mozilla.org:8080", pattern: "http://mozilla.org:8080/"});
-
- // Now try with * in the path.
- pass({url: "http://mozilla.org", pattern: "http://mozilla.org/*"});
- pass({url: "http://mozilla.org/", pattern: "http://mozilla.org/*"});
-
- pass({url: "http://mozilla.org/", pattern: "*://mozilla.org/*"});
- pass({url: "https://mozilla.org/", pattern: "*://mozilla.org/*"});
- fail({url: "file://mozilla.org/", pattern: "*://mozilla.org/*"});
- fail({url: "http://mozilla.com", pattern: "http://mozilla.*/*"});
-
- pass({url: "http://google.com", pattern: "http://*.google.com/*"});
- pass({url: "http://docs.google.com", pattern: "http://*.google.com/*"});
-
- // Check path stuff.
- fail({url: "http://mozilla.com/abc/def", pattern: "http://mozilla.com/"});
- pass({url: "http://mozilla.com/abc/def", pattern: "http://mozilla.com/*"});
- pass({url: "http://mozilla.com/abc/def", pattern: "http://mozilla.com/a*f"});
- pass({url: "http://mozilla.com/abc/def", pattern: "http://mozilla.com/a*"});
- pass({url: "http://mozilla.com/abc/def", pattern: "http://mozilla.com/*f"});
- fail({url: "http://mozilla.com/abc/def", pattern: "http://mozilla.com/*e"});
- fail({url: "http://mozilla.com/abc/def", pattern: "http://mozilla.com/*c"});
-
- fail({url: "http:///a.html", pattern: "http:///a.html"});
- pass({url: "file:///foo", pattern: "file:///foo*"});
- pass({url: "file:///foo/bar.html", pattern: "file:///foo*"});
-
- pass({url: "http://mozilla.org/a", pattern: "<all_urls>"});
- pass({url: "https://mozilla.org/a", pattern: "<all_urls>"});
- pass({url: "ftp://mozilla.org/a", pattern: "<all_urls>"});
- pass({url: "file:///a", pattern: "<all_urls>"});
- fail({url: "gopher://wuarchive.wustl.edu/a", pattern: "<all_urls>"});
-
- // Multiple patterns.
- pass({url: "http://mozilla.org", pattern: ["http://mozilla.org/"]});
- pass({url: "http://mozilla.org", pattern: ["http://mozilla.org/", "http://mozilla.com/"]});
- pass({url: "http://mozilla.com", pattern: ["http://mozilla.org/", "http://mozilla.com/"]});
- fail({url: "http://mozilla.biz", pattern: ["http://mozilla.org/", "http://mozilla.com/"]});
-
- // Match url with fragments.
- pass({url: "http://mozilla.org/base#some-fragment", pattern: "http://mozilla.org/base"});
-}
diff --git a/toolkit/modules/tests/xpcshell/test_MatchURLFilters.js b/toolkit/modules/tests/xpcshell/test_MatchURLFilters.js
deleted file mode 100644
index 52e03a6cc1..0000000000
--- a/toolkit/modules/tests/xpcshell/test_MatchURLFilters.js
+++ /dev/null
@@ -1,396 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-Components.utils.import("resource://gre/modules/MatchPattern.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-function createTestFilter({url, filters}) {
- let m = new MatchURLFilters(filters);
- return m.matches(url);
-}
-
-function expectPass({url, filters}) {
- ok(createTestFilter({url, filters}),
- `Expected match: ${JSON.stringify(filters)}, ${url}`);
-}
-
-function expectFail({url, filters}) {
- ok(!createTestFilter({url, filters}),
- `Expected no match: ${JSON.stringify(filters)}, ${url}`);
-}
-
-function expectThrow({url, filters, exceptionMessageContains}) {
- let logData = {filters, url};
-
- Assert.throws(
- () => {
- createTestFilter({url, filters});
- },
- exceptionMessageContains,
- `Check received exception for expected message: ${JSON.stringify(logData)}`
- );
-}
-
-add_task(function* test_match_url_filters() {
- const shouldPass = true;
- const shouldFail = true;
- const shouldThrow = true;
-
- var testCases = [
- // Empty, undefined and null filters.
- {shouldThrow, exceptionMessageContains: "filters array should not be empty",
- filters: [], url: "http://mozilla.org", },
- {shouldThrow, exceptionMessageContains: "filters should be an array",
- filters: undefined, url: "http://mozilla.org"},
- {shouldThrow, exceptionMessageContains: "filters should be an array",
- filters: null, url: "http://mozilla.org"},
-
- // Wrong formats (in a real webextension this will be blocked by the schema validation).
- {shouldThrow, exceptionMessageContains: "filters should be an array", filters: {},
- url: "http://mozilla.org"},
- {shouldThrow, exceptionMessageContains: "filters should be an array",
- filters: {nonExistentCriteria: true}, url: "http://mozilla.org", },
- {shouldPass, filters: [{nonExistentCriteria: true}], url: "http://mozilla.org"},
-
- // Schemes filter over various url schemes.
- {shouldPass, filters: [{schemes: ["http"]}], url: "http://mozilla.org"},
- {shouldPass, filters: [{schemes: ["https"]}], url: "https://mozilla.org"},
- {shouldPass, filters: [{schemes: ["ftp"]}], url: "ftp://fake/ftp/url"},
- {shouldPass, filters: [{schemes: ["about"]}], url: "about:blank"},
- {shouldPass, filters: [{schemes: ["data"]}], url: "data:,testDataURL"},
- {shouldFail, filters: [{schemes: ["http"]}], url: "ftp://fake/ftp/url"},
-
- // Multiple schemes: pass when at least one scheme matches.
- {shouldPass, filters: [{schemes: ["https", "about"]}], url: "https://mozilla.org"},
- {shouldPass, filters: [{schemes: ["about", "https"]}], url: "https://mozilla.org"},
- {shouldFail, filters: [{schemes: ["about", "http"]}], url: "https://mozilla.org"},
-
- // Port filter: standard (implicit) ports.
- {shouldPass, filters: [{ports: [443]}], url: "https://mozilla.org"},
- {shouldPass, filters: [{ports: [80]}], url: "http://mozilla.org"},
- {shouldPass, filters: [{ports: [21]}], url: "ftp://ftp.mozilla.org"},
-
- // Port filter: schemes without a default port.
- {shouldFail, filters: [{ports: [-1]}], url: "about:blank"},
- {shouldFail, filters: [{ports: [-1]}], url: "data:,testDataURL"},
-
- {shouldFail, filters: [{ports: [[1, 65535]]}], url: "about:blank"},
- {shouldFail, filters: [{ports: [[1, 65535]]}], url: "data:,testDataURL"},
-
- // Host filters (hostEquals, hostContains, hostPrefix, hostSuffix): schemes with an host.
- {shouldFail, filters: [{hostEquals: ""}], url: "https://mozilla.org"},
- {shouldPass, filters: [{hostEquals: null}], url: "https://mozilla.org"},
- {shouldPass, filters: [{hostEquals: "mozilla.org"}], url: "https://mozilla.org"},
- {shouldFail, filters: [{hostEquals: "mozilla.com"}], url: "https://mozilla.org"},
- // NOTE: trying at least once another valid protocol.
- {shouldPass, filters: [{hostEquals: "mozilla.org"}], url: "ftp://mozilla.org"},
- {shouldFail, filters: [{hostEquals: "mozilla.com"}], url: "ftp://mozilla.org"},
- {shouldPass, filters: [{hostEquals: "mozilla.org"}], url: "https://mozilla.org:8888"},
-
- {shouldPass, filters: [{hostContains: "moz"}], url: "https://mozilla.org"},
- // NOTE: an implicit '.' char is inserted into the host.
- {shouldPass, filters: [{hostContains: ".moz"}], url: "https://mozilla.org"},
- {shouldFail, filters: [{hostContains: "com"}], url: "https://mozilla.org"},
- {shouldPass, filters: [{hostContains: ""}], url: "https://mozilla.org"},
- {shouldPass, filters: [{hostContains: null}], url: "https://mozilla.org"},
-
- {shouldPass, filters: [{hostPrefix: "moz"}], url: "https://mozilla.org"},
- {shouldFail, filters: [{hostPrefix: "org"}], url: "https://mozilla.org"},
- {shouldPass, filters: [{hostPrefix: ""}], url: "https://mozilla.org"},
- {shouldPass, filters: [{hostPrefix: null}], url: "https://mozilla.org"},
-
- {shouldPass, filters: [{hostSuffix: ".org"}], url: "https://mozilla.org"},
- {shouldFail, filters: [{hostSuffix: "moz"}], url: "https://mozilla.org"},
- {shouldPass, filters: [{hostSuffix: ""}], url: "https://mozilla.org"},
- {shouldPass, filters: [{hostSuffix: null}], url: "https://mozilla.org"},
- {shouldPass, filters: [{hostSuffix: "lla.org"}], url: "https://mozilla.org:8888"},
-
- // hostEquals: urls without an host.
- // TODO: should we explicitly cover hostContains, hostPrefix, hostSuffix for
- // these sub-cases?
- {shouldFail, filters: [{hostEquals: "blank"}], url: "about:blank"},
- {shouldFail, filters: [{hostEquals: "blank"}], url: "about://blank"},
- {shouldFail, filters: [{hostEquals: "testDataURL"}], url: "data:,testDataURL"},
- {shouldPass, filters: [{hostEquals: ""}], url: "about:blank"},
- {shouldPass, filters: [{hostEquals: ""}], url: "about://blank"},
- {shouldPass, filters: [{hostEquals: ""}], url: "data:,testDataURL"},
-
- // Path filters (pathEquals, pathContains, pathPrefix, pathSuffix).
- {shouldFail, filters: [{pathEquals: ""}], url: "https://mozilla.org/test/path"},
- {shouldPass, filters: [{pathEquals: null}], url: "https://mozilla.org/test/path"},
- {shouldPass, filters: [{pathEquals: "/test/path"}], url: "https://mozilla.org/test/path"},
- {shouldFail, filters: [{pathEquals: "/wrong/path"}], url: "https://mozilla.org/test/path"},
- {shouldPass, filters: [{pathEquals: "/test/path"}], url: "https://mozilla.org:8888/test/path"},
- // NOTE: trying at least once another valid protocol
- {shouldPass, filters: [{pathEquals: "/test/path"}], url: "ftp://mozilla.org/test/path"},
- {shouldFail, filters: [{pathEquals: "/wrong/path"}], url: "ftp://mozilla.org/test/path"},
-
- {shouldPass, filters: [{pathContains: "st/"}], url: "https://mozilla.org/test/path"},
- {shouldPass, filters: [{pathContains: "/test"}], url: "https://mozilla.org/test/path"},
- {shouldFail, filters: [{pathContains: "org"}], url: "https://mozilla.org/test/path"},
- {shouldPass, filters: [{pathContains: ""}], url: "https://mozilla.org/test/path"},
- {shouldPass, filters: [{pathContains: null}], url: "https://mozilla.org/test/path"},
- {shouldFail, filters: [{pathContains: "param"}], url: "https://mozilla.org:8888/test/path?param=1"},
- {shouldFail, filters: [{pathContains: "ref"}], url: "https://mozilla.org:8888/test/path#ref"},
- {shouldPass, filters: [{pathContains: "st/pa"}], url: "https://mozilla.org:8888/test/path"},
-
- {shouldPass, filters: [{pathPrefix: "/te"}], url: "https://mozilla.org/test/path"},
- {shouldFail, filters: [{pathPrefix: "org/"}], url: "https://mozilla.org/test/path"},
- {shouldPass, filters: [{pathPrefix: ""}], url: "https://mozilla.org/test/path"},
- {shouldPass, filters: [{pathPrefix: null}], url: "https://mozilla.org/test/path"},
-
- {shouldPass, filters: [{pathSuffix: "/path"}], url: "https://mozilla.org/test/path"},
- {shouldFail, filters: [{pathSuffix: "th/"}], url: "https://mozilla.org/test/path"},
- {shouldPass, filters: [{pathSuffix: ""}], url: "https://mozilla.org/test/path"},
- {shouldPass, filters: [{pathSuffix: null}], url: "https://mozilla.org/test/path"},
- {shouldFail, filters: [{pathSuffix: "p=1"}], url: "https://mozilla.org:8888/test/path?p=1"},
- {shouldFail, filters: [{pathSuffix: "ref"}], url: "https://mozilla.org:8888/test/path#ref"},
-
- // Query filters (queryEquals, queryContains, queryPrefix, querySuffix).
- {shouldFail, filters: [{queryEquals: ""}], url: "https://mozilla.org/?param=val"},
- {shouldPass, filters: [{queryEquals: null}], url: "https://mozilla.org/?param=val"},
- {shouldPass, filters: [{queryEquals: "param=val"}], url: "https://mozilla.org/?param=val"},
- {shouldFail, filters: [{queryEquals: "?param=val"}], url: "https://mozilla.org/?param=val"},
- {shouldFail, filters: [{queryEquals: "/path?param=val"}], url: "https://mozilla.org/path?param=val"},
-
- // NOTE: about scheme urls cannot be matched by query.
- {shouldFail, filters: [{queryEquals: "param=val"}], url: "about:blank?param=val"},
- {shouldFail, filters: [{queryEquals: "param"}], url: "ftp://mozilla.org?param=val"},
-
- {shouldPass, filters: [{queryContains: "ram"}], url: "https://mozilla.org/?param=val"},
- {shouldPass, filters: [{queryContains: "=val"}], url: "https://mozilla.org/?param=val"},
- {shouldFail, filters: [{queryContains: "?param"}], url: "https://mozilla.org/?param=val"},
- {shouldFail, filters: [{queryContains: "path"}], url: "https://mozilla.org/path/?p=v#ref"},
- {shouldPass, filters: [{queryContains: ""}], url: "https://mozilla.org/?param=val"},
- {shouldPass, filters: [{queryContains: null}], url: "https://mozilla.org/?param=val"},
-
- {shouldPass, filters: [{queryPrefix: "param"}], url: "https://mozilla.org/?param=val"},
- {shouldFail, filters: [{queryPrefix: "p="}], url: "https://mozilla.org/?param=val"},
- {shouldFail, filters: [{queryPrefix: "path"}], url: "https://mozilla.org/path?param=val"},
- {shouldPass, filters: [{queryPrefix: ""}], url: "https://mozilla.org/?param=val"},
- {shouldPass, filters: [{queryPrefix: null}], url: "https://mozilla.org/?param=val"},
-
- {shouldPass, filters: [{querySuffix: "=val"}], url: "https://mozilla.org/?param=val"},
- {shouldFail, filters: [{querySuffix: "=wrong"}], url: "https://mozilla.org/?param=val"},
- {shouldPass, filters: [{querySuffix: ""}], url: "https://mozilla.org/?param=val"},
- {shouldPass, filters: [{querySuffix: null}], url: "https://mozilla.org/?param=val"},
-
- // URL filters (urlEquals, urlContains, urlPrefix, urlSuffix).
- {shouldFail, filters: [{urlEquals: ""}], url: "https://mozilla.org/?p=v#ref"},
- {shouldPass, filters: [{urlEquals: null}], url: "https://mozilla.org/?p=v#ref"},
- {shouldPass, filters: [{urlEquals: "https://mozilla.org/?p=v#ref"}],
- url: "https://mozilla.org/?p=v#ref"},
- {shouldFail, filters: [{urlEquals: "https://mozilla.org/?p=v#ref2"}],
- url: "https://mozilla.org/?p=v#ref"},
- {shouldPass, filters: [{urlEquals: "about:blank?p=v#ref"}], url: "about:blank?p=v#ref"},
- {shouldPass, filters: [{urlEquals: "ftp://mozilla.org?p=v#ref"}],
- url: "ftp://mozilla.org?p=v#ref"},
-
- {shouldPass, filters: [{urlContains: "org/?p"}], url: "https://mozilla.org/?p=v#ref"},
- {shouldPass, filters: [{urlContains: "=v#ref"}], url: "https://mozilla.org/?p=v#ref"},
- {shouldFail, filters: [{urlContains: "ftp"}], url: "https://mozilla.org/?p=v#ref"},
- {shouldPass, filters: [{urlContains: ""}], url: "https://mozilla.org/?p=v#ref"},
- {shouldPass, filters: [{urlContains: null}], url: "https://mozilla.org/?p=v#ref"},
-
- {shouldPass, filters: [{urlPrefix: "http"}], url: "https://mozilla.org/?p=v#ref"},
- {shouldFail, filters: [{urlPrefix: "moz"}], url: "https://mozilla.org/?p=v#ref"},
- {shouldPass, filters: [{urlPrefix: ""}], url: "https://mozilla.org/?p=v#ref"},
- {shouldPass, filters: [{urlPrefix: null}], url: "https://mozilla.org/?p=v#ref"},
-
- {shouldPass, filters: [{urlSuffix: "#ref"}], url: "https://mozilla.org/?p=v#ref"},
- {shouldFail, filters: [{urlSuffix: "=wrong"}], url: "https://mozilla.org/?p=v#ref"},
- {shouldPass, filters: [{urlSuffix: ""}], url: "https://mozilla.org/?p=v#ref"},
- {shouldPass, filters: [{urlSuffix: null}], url: "https://mozilla.org/?p=v#ref"},
-
- // More url filters: urlMatches.
- {shouldPass, filters: [{urlMatches: ".*://mozilla"}], url: "https://mozilla.org/?p=v#ref"},
- {shouldPass, filters: [{urlMatches: ".*://mozilla"}], url: "ftp://mozilla.org/?p=v#ref"},
- {shouldPass, filters: [{urlMatches: ".*://.*/\?p"}], url: "ftp://mozilla.org/?p=v#ref"},
- // NOTE: urlMatches should not match the url without the ref.
- {shouldFail, filters: [{urlMatches: "v#ref$"}], url: "https://mozilla.org/?p=v#ref"},
- {shouldPass, filters: [{urlMatches: "^ftp"}], url: "ftp://mozilla.org/?p=v#ref"},
-
- // More url filters: originAndPathMatches.
- {shouldPass, filters: [{originAndPathMatches: ".*://mozilla"}],
- url: "https://mozilla.org/?p=v#ref"},
- {shouldPass, filters: [{originAndPathMatches: ".*://mozilla"}],
- url: "ftp://mozilla.org/?p=v#ref"},
- // NOTE: urlMatches should not match the url without the query and the ref.
- {shouldFail, filters: [{originAndPathMatches: ".*://.*/\?p"}],
- url: "ftp://mozilla.org/?p=v#ref"},
- {shouldFail, filters: [{originAndPathMatches: "v#ref$"}],
- url: "https://mozilla.org/?p=v#ref"},
- {shouldPass, filters: [{originAndPathMatches: "^ftp"}],
- url: "ftp://mozilla.org/?p=v#ref"},
-
- // Filter with all criteria: all matches, none matches, some matches.
-
- // All matches.
- {shouldPass, filters: [
- {
- schemes: ["https", "http"],
- ports: [443, 80],
- hostEquals: "www.mozilla.org",
- hostContains: ".moz",
- hostPrefix: "www",
- hostSuffix: "org",
- pathEquals: "/sub/path",
- pathContains: "b/p",
- pathPrefix: "/sub",
- pathSuffix: "/path",
- queryEquals: "p=v",
- queryContains: "1=",
- queryPrefix: "p1",
- querySuffix: "=v",
- urlEquals: "https://www.mozilla.org/sub/path?p1=v#ref",
- urlContains: "org/sub",
- urlPrefix: "https://moz",
- urlSuffix: "#ref",
- urlMatches: "v#ref$",
- originAndPathMatches: ".*://moz.*/"
- },
- ], url: "https://www.mozilla.org/sub/path?p1=v#ref"},
- // None matches.
- {shouldFail, filters: [
- {
- schemes: ["http"],
- ports: [80],
- hostEquals: "mozilla.com",
- hostContains: "www.moz",
- hostPrefix: "www",
- hostSuffix: "com",
- pathEquals: "/wrong/path",
- pathContains: "g/p",
- pathPrefix: "/wrong",
- pathSuffix: "/wrong",
- queryEquals: "p2=v",
- queryContains: "2=",
- queryPrefix: "p2",
- querySuffix: "=value",
- urlEquals: "http://mozilla.com/sub/path?p1=v#ref",
- urlContains: "com/sub",
- urlPrefix: "http://moz",
- urlSuffix: "#ref2",
- urlMatches: "value#ref2$",
- originAndPathMatches: ".*://moz.*com/"
- },
- ], url: "https://mozilla.org/sub/path?p1=v#ref"},
- // Some matches
- {shouldFail, filters: [
- {
- schemes: ["https"],
- ports: [80],
- hostEquals: "mozilla.com",
- hostContains: "www.moz",
- hostPrefix: "www",
- hostSuffix: "com",
- pathEquals: "/wrong/path",
- pathContains: "g/p",
- pathPrefix: "/wrong",
- pathSuffix: "/wrong",
- queryEquals: "p2=v",
- queryContains: "2=",
- queryPrefix: "p2",
- querySuffix: "=value",
- urlEquals: "http://mozilla.com/sub/path?p1=v#ref",
- urlContains: "com/sub",
- urlPrefix: "http://moz",
- urlSuffix: "#ref2",
- urlMatches: "value#ref2$",
- originAndPathMatches: ".*://moz.*com/"
- },
- ], url: "https://mozilla.org/sub/path?p1=v#ref"},
-
- // Filter with multiple filters: all matches, some matches, none matches.
-
- // All matches.
- {shouldPass, filters: [
- {schemes: ["https", "http"]},
- {ports: [443, 80]},
- {hostEquals: "www.mozilla.org"},
- {hostContains: ".moz"},
- {hostPrefix: "www"},
- {hostSuffix: "org"},
- {pathEquals: "/sub/path"},
- {pathContains: "b/p"},
- {pathPrefix: "/sub"},
- {pathSuffix: "/path"},
- {queryEquals: "p=v"},
- {queryContains: "1="},
- {queryPrefix: "p1"},
- {querySuffix: "=v"},
- {urlEquals: "https://www.mozilla.org/sub/path?p1=v#ref"},
- {urlContains: "org/sub"},
- {urlPrefix: "https://moz"},
- {urlSuffix: "#ref"},
- {urlMatches: "v#ref$"},
- {originAndPathMatches: ".*://moz.*/"},
- ], url: "https://www.mozilla.org/sub/path?p1=v#ref"},
-
- // None matches.
- {shouldFail, filters: [
- {schemes: ["http"]},
- {ports: [80]},
- {hostEquals: "mozilla.com"},
- {hostContains: "www.moz"},
- {hostPrefix: "www"},
- {hostSuffix: "com"},
- {pathEquals: "/wrong/path"},
- {pathContains: "g/p"},
- {pathPrefix: "/wrong"},
- {pathSuffix: "/wrong"},
- {queryEquals: "p2=v"},
- {queryContains: "2="},
- {queryPrefix: "p2"},
- {querySuffix: "=value"},
- {urlEquals: "http://mozilla.com/sub/path?p1=v#ref"},
- {urlContains: "com/sub"},
- {urlPrefix: "http://moz"},
- {urlSuffix: "#ref2"},
- {urlMatches: "value#ref2$"},
- {originAndPathMatches: ".*://moz.*com/"},
- ], url: "https://mozilla.org/sub/path?p1=v#ref"},
-
- // Some matches.
- {shouldPass, filters: [
- {schemes: ["https"]},
- {ports: [80]},
- {hostEquals: "mozilla.com"},
- {hostContains: "www.moz"},
- {hostPrefix: "www"},
- {hostSuffix: "com"},
- {pathEquals: "/wrong/path"},
- {pathContains: "g/p"},
- {pathPrefix: "/wrong"},
- {pathSuffix: "/wrong"},
- {queryEquals: "p2=v"},
- {queryContains: "2="},
- {queryPrefix: "p2"},
- {querySuffix: "=value"},
- {urlEquals: "http://mozilla.com/sub/path?p1=v#ref"},
- {urlContains: "com/sub"},
- {urlPrefix: "http://moz"},
- {urlSuffix: "#ref2"},
- {urlMatches: "value#ref2$"},
- {originAndPathMatches: ".*://moz.*com/"},
- ], url: "https://mozilla.org/sub/path?p1=v#ref"},
- ];
-
- // Run all the the testCases defined above.
- for (let currentTest of testCases) {
- let {
- exceptionMessageContains,
- url, filters,
- } = currentTest;
-
- if (currentTest.shouldThrow) {
- expectThrow({url, filters, exceptionMessageContains})
- } else if (currentTest.shouldFail) {
- expectFail({url, filters});
- } else {
- expectPass({url, filters});
- }
- }
-});
diff --git a/toolkit/modules/tests/xpcshell/test_NewTabUtils.js b/toolkit/modules/tests/xpcshell/test_NewTabUtils.js
deleted file mode 100644
index 8cdb635501..0000000000
--- a/toolkit/modules/tests/xpcshell/test_NewTabUtils.js
+++ /dev/null
@@ -1,378 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// See also browser/base/content/test/newtab/.
-
-var { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
-Cu.import("resource://gre/modules/NewTabUtils.jsm");
-Cu.import("resource://gre/modules/Promise.jsm");
-Cu.import("resource://gre/modules/Task.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-
-const PREF_NEWTAB_ENHANCED = "browser.newtabpage.enhanced";
-
-function run_test() {
- Services.prefs.setBoolPref(PREF_NEWTAB_ENHANCED, true);
- run_next_test();
-}
-
-add_task(function* validCacheMidPopulation() {
- let expectedLinks = makeLinks(0, 3, 1);
-
- let provider = new TestProvider(done => done(expectedLinks));
- provider.maxNumLinks = expectedLinks.length;
-
- NewTabUtils.initWithoutProviders();
- NewTabUtils.links.addProvider(provider);
- let promise = new Promise(resolve => NewTabUtils.links.populateCache(resolve));
-
- // isTopSiteGivenProvider() and getProviderLinks() should still return results
- // even when cache is empty or being populated.
- do_check_false(NewTabUtils.isTopSiteGivenProvider("example1.com", provider));
- do_check_links(NewTabUtils.getProviderLinks(provider), []);
-
- yield promise;
-
- // Once the cache is populated, we get the expected results
- do_check_true(NewTabUtils.isTopSiteGivenProvider("example1.com", provider));
- do_check_links(NewTabUtils.getProviderLinks(provider), expectedLinks);
- NewTabUtils.links.removeProvider(provider);
-});
-
-add_task(function* notifyLinkDelete() {
- let expectedLinks = makeLinks(0, 3, 1);
-
- let provider = new TestProvider(done => done(expectedLinks));
- provider.maxNumLinks = expectedLinks.length;
-
- NewTabUtils.initWithoutProviders();
- NewTabUtils.links.addProvider(provider);
- yield new Promise(resolve => NewTabUtils.links.populateCache(resolve));
-
- do_check_links(NewTabUtils.links.getLinks(), expectedLinks);
-
- // Remove a link.
- let removedLink = expectedLinks[2];
- provider.notifyLinkChanged(removedLink, 2, true);
- let links = NewTabUtils.links._providers.get(provider);
-
- // Check that sortedLinks is correctly updated.
- do_check_links(NewTabUtils.links.getLinks(), expectedLinks.slice(0, 2));
-
- // Check that linkMap is accurately updated.
- do_check_eq(links.linkMap.size, 2);
- do_check_true(links.linkMap.get(expectedLinks[0].url));
- do_check_true(links.linkMap.get(expectedLinks[1].url));
- do_check_false(links.linkMap.get(removedLink.url));
-
- // Check that siteMap is correctly updated.
- do_check_eq(links.siteMap.size, 2);
- do_check_true(links.siteMap.has(NewTabUtils.extractSite(expectedLinks[0].url)));
- do_check_true(links.siteMap.has(NewTabUtils.extractSite(expectedLinks[1].url)));
- do_check_false(links.siteMap.has(NewTabUtils.extractSite(removedLink.url)));
-
- NewTabUtils.links.removeProvider(provider);
-});
-
-add_task(function* populatePromise() {
- let count = 0;
- let expectedLinks = makeLinks(0, 10, 2);
-
- let getLinksFcn = Task.async(function* (callback) {
- // Should not be calling getLinksFcn twice
- count++;
- do_check_eq(count, 1);
- yield Promise.resolve();
- callback(expectedLinks);
- });
-
- let provider = new TestProvider(getLinksFcn);
-
- NewTabUtils.initWithoutProviders();
- NewTabUtils.links.addProvider(provider);
-
- NewTabUtils.links.populateProviderCache(provider, () => {});
- NewTabUtils.links.populateProviderCache(provider, () => {
- do_check_links(NewTabUtils.links.getLinks(), expectedLinks);
- NewTabUtils.links.removeProvider(provider);
- });
-});
-
-add_task(function* isTopSiteGivenProvider() {
- let expectedLinks = makeLinks(0, 10, 2);
-
- // The lowest 2 frecencies have the same base domain.
- expectedLinks[expectedLinks.length - 2].url = expectedLinks[expectedLinks.length - 1].url + "Test";
-
- let provider = new TestProvider(done => done(expectedLinks));
- provider.maxNumLinks = expectedLinks.length;
-
- NewTabUtils.initWithoutProviders();
- NewTabUtils.links.addProvider(provider);
- yield new Promise(resolve => NewTabUtils.links.populateCache(resolve));
-
- do_check_eq(NewTabUtils.isTopSiteGivenProvider("example2.com", provider), true);
- do_check_eq(NewTabUtils.isTopSiteGivenProvider("example1.com", provider), false);
-
- // Push out frecency 2 because the maxNumLinks is reached when adding frecency 3
- let newLink = makeLink(3);
- provider.notifyLinkChanged(newLink);
-
- // There is still a frecent url with example2 domain, so it's still frecent.
- do_check_eq(NewTabUtils.isTopSiteGivenProvider("example3.com", provider), true);
- do_check_eq(NewTabUtils.isTopSiteGivenProvider("example2.com", provider), true);
-
- // Push out frecency 3
- newLink = makeLink(5);
- provider.notifyLinkChanged(newLink);
-
- // Push out frecency 4
- newLink = makeLink(9);
- provider.notifyLinkChanged(newLink);
-
- // Our count reached 0 for the example2.com domain so it's no longer a frecent site.
- do_check_eq(NewTabUtils.isTopSiteGivenProvider("example5.com", provider), true);
- do_check_eq(NewTabUtils.isTopSiteGivenProvider("example2.com", provider), false);
-
- NewTabUtils.links.removeProvider(provider);
-});
-
-add_task(function* multipleProviders() {
- // Make each provider generate NewTabUtils.links.maxNumLinks links to check
- // that no more than maxNumLinks are actually returned in the merged list.
- let evenLinks = makeLinks(0, 2 * NewTabUtils.links.maxNumLinks, 2);
- let evenProvider = new TestProvider(done => done(evenLinks));
- let oddLinks = makeLinks(0, 2 * NewTabUtils.links.maxNumLinks - 1, 2);
- let oddProvider = new TestProvider(done => done(oddLinks));
-
- NewTabUtils.initWithoutProviders();
- NewTabUtils.links.addProvider(evenProvider);
- NewTabUtils.links.addProvider(oddProvider);
-
- yield new Promise(resolve => NewTabUtils.links.populateCache(resolve));
-
- let links = NewTabUtils.links.getLinks();
- let expectedLinks = makeLinks(NewTabUtils.links.maxNumLinks,
- 2 * NewTabUtils.links.maxNumLinks,
- 1);
- do_check_eq(links.length, NewTabUtils.links.maxNumLinks);
- do_check_links(links, expectedLinks);
-
- NewTabUtils.links.removeProvider(evenProvider);
- NewTabUtils.links.removeProvider(oddProvider);
-});
-
-add_task(function* changeLinks() {
- let expectedLinks = makeLinks(0, 20, 2);
- let provider = new TestProvider(done => done(expectedLinks));
-
- NewTabUtils.initWithoutProviders();
- NewTabUtils.links.addProvider(provider);
-
- yield new Promise(resolve => NewTabUtils.links.populateCache(resolve));
-
- do_check_links(NewTabUtils.links.getLinks(), expectedLinks);
-
- // Notify of a new link.
- let newLink = makeLink(19);
- expectedLinks.splice(1, 0, newLink);
- provider.notifyLinkChanged(newLink);
- do_check_links(NewTabUtils.links.getLinks(), expectedLinks);
-
- // Notify of a link that's changed sort criteria.
- newLink.frecency = 17;
- expectedLinks.splice(1, 1);
- expectedLinks.splice(2, 0, newLink);
- provider.notifyLinkChanged({
- url: newLink.url,
- frecency: 17,
- });
- do_check_links(NewTabUtils.links.getLinks(), expectedLinks);
-
- // Notify of a link that's changed title.
- newLink.title = "My frecency is now 17";
- provider.notifyLinkChanged({
- url: newLink.url,
- title: newLink.title,
- });
- do_check_links(NewTabUtils.links.getLinks(), expectedLinks);
-
- // Notify of a new link again, but this time make it overflow maxNumLinks.
- provider.maxNumLinks = expectedLinks.length;
- newLink = makeLink(21);
- expectedLinks.unshift(newLink);
- expectedLinks.pop();
- do_check_eq(expectedLinks.length, provider.maxNumLinks); // Sanity check.
- provider.notifyLinkChanged(newLink);
- do_check_links(NewTabUtils.links.getLinks(), expectedLinks);
-
- // Notify of many links changed.
- expectedLinks = makeLinks(0, 3, 1);
- provider.notifyManyLinksChanged();
-
- // Since _populateProviderCache() is async, we must wait until the provider's
- // populate promise has been resolved.
- yield NewTabUtils.links._providers.get(provider).populatePromise;
-
- // NewTabUtils.links will now repopulate its cache
- do_check_links(NewTabUtils.links.getLinks(), expectedLinks);
-
- NewTabUtils.links.removeProvider(provider);
-});
-
-add_task(function* oneProviderAlreadyCached() {
- let links1 = makeLinks(0, 10, 1);
- let provider1 = new TestProvider(done => done(links1));
-
- NewTabUtils.initWithoutProviders();
- NewTabUtils.links.addProvider(provider1);
-
- yield new Promise(resolve => NewTabUtils.links.populateCache(resolve));
- do_check_links(NewTabUtils.links.getLinks(), links1);
-
- let links2 = makeLinks(10, 20, 1);
- let provider2 = new TestProvider(done => done(links2));
- NewTabUtils.links.addProvider(provider2);
-
- yield new Promise(resolve => NewTabUtils.links.populateCache(resolve));
- do_check_links(NewTabUtils.links.getLinks(), links2.concat(links1));
-
- NewTabUtils.links.removeProvider(provider1);
- NewTabUtils.links.removeProvider(provider2);
-});
-
-add_task(function* newLowRankedLink() {
- // Init a provider with 10 links and make its maximum number also 10.
- let links = makeLinks(0, 10, 1);
- let provider = new TestProvider(done => done(links));
- provider.maxNumLinks = links.length;
-
- NewTabUtils.initWithoutProviders();
- NewTabUtils.links.addProvider(provider);
-
- yield new Promise(resolve => NewTabUtils.links.populateCache(resolve));
- do_check_links(NewTabUtils.links.getLinks(), links);
-
- // Notify of a new link that's low-ranked enough not to make the list.
- let newLink = makeLink(0);
- provider.notifyLinkChanged(newLink);
- do_check_links(NewTabUtils.links.getLinks(), links);
-
- // Notify about the new link's title change.
- provider.notifyLinkChanged({
- url: newLink.url,
- title: "a new title",
- });
- do_check_links(NewTabUtils.links.getLinks(), links);
-
- NewTabUtils.links.removeProvider(provider);
-});
-
-add_task(function* extractSite() {
- // All these should extract to the same site
- [ "mozilla.org",
- "m.mozilla.org",
- "mobile.mozilla.org",
- "www.mozilla.org",
- "www3.mozilla.org",
- ].forEach(host => {
- let url = "http://" + host;
- do_check_eq(NewTabUtils.extractSite(url), "mozilla.org", "extracted same " + host);
- });
-
- // All these should extract to the same subdomain
- [ "bugzilla.mozilla.org",
- "www.bugzilla.mozilla.org",
- ].forEach(host => {
- let url = "http://" + host;
- do_check_eq(NewTabUtils.extractSite(url), "bugzilla.mozilla.org", "extracted eTLD+2 " + host);
- });
-
- // All these should not extract to the same site
- [ "bugzilla.mozilla.org",
- "bug123.bugzilla.mozilla.org",
- "too.many.levels.bugzilla.mozilla.org",
- "m2.mozilla.org",
- "mobile30.mozilla.org",
- "ww.mozilla.org",
- "ww2.mozilla.org",
- "wwwww.mozilla.org",
- "wwwww50.mozilla.org",
- "wwws.mozilla.org",
- "secure.mozilla.org",
- "secure10.mozilla.org",
- "many.levels.deep.mozilla.org",
- "just.check.in",
- "192.168.0.1",
- "localhost",
- ].forEach(host => {
- let url = "http://" + host;
- do_check_neq(NewTabUtils.extractSite(url), "mozilla.org", "extracted diff " + host);
- });
-
- // All these should not extract to the same site
- [ "about:blank",
- "file:///Users/user/file",
- "chrome://browser/something",
- "ftp://ftp.mozilla.org/",
- ].forEach(url => {
- do_check_neq(NewTabUtils.extractSite(url), "mozilla.org", "extracted diff url " + url);
- });
-});
-
-function TestProvider(getLinksFn) {
- this.getLinks = getLinksFn;
- this._observers = new Set();
-}
-
-TestProvider.prototype = {
- addObserver: function (observer) {
- this._observers.add(observer);
- },
- notifyLinkChanged: function (link, index=-1, deleted=false) {
- this._notifyObservers("onLinkChanged", link, index, deleted);
- },
- notifyManyLinksChanged: function () {
- this._notifyObservers("onManyLinksChanged");
- },
- _notifyObservers: function () {
- let observerMethodName = arguments[0];
- let args = Array.prototype.slice.call(arguments, 1);
- args.unshift(this);
- for (let obs of this._observers) {
- if (obs[observerMethodName])
- obs[observerMethodName].apply(NewTabUtils.links, args);
- }
- },
-};
-
-function do_check_links(actualLinks, expectedLinks) {
- do_check_true(Array.isArray(actualLinks));
- do_check_eq(actualLinks.length, expectedLinks.length);
- for (let i = 0; i < expectedLinks.length; i++) {
- let expected = expectedLinks[i];
- let actual = actualLinks[i];
- do_check_eq(actual.url, expected.url);
- do_check_eq(actual.title, expected.title);
- do_check_eq(actual.frecency, expected.frecency);
- do_check_eq(actual.lastVisitDate, expected.lastVisitDate);
- }
-}
-
-function makeLinks(frecRangeStart, frecRangeEnd, step) {
- let links = [];
- // Remember, links are ordered by frecency descending.
- for (let i = frecRangeEnd; i > frecRangeStart; i -= step) {
- links.push(makeLink(i));
- }
- return links;
-}
-
-function makeLink(frecency) {
- return {
- url: "http://example" + frecency + ".com/",
- title: "My frecency is " + frecency,
- frecency: frecency,
- lastVisitDate: 0,
- };
-}
diff --git a/toolkit/modules/tests/xpcshell/test_ObjectUtils.js b/toolkit/modules/tests/xpcshell/test_ObjectUtils.js
deleted file mode 100644
index 9aef3e9079..0000000000
--- a/toolkit/modules/tests/xpcshell/test_ObjectUtils.js
+++ /dev/null
@@ -1,96 +0,0 @@
-Components.utils.import("resource://gre/modules/ObjectUtils.jsm");
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* test_deepEqual() {
- let deepEqual = ObjectUtils.deepEqual.bind(ObjectUtils);
- // CommonJS 7.2
- Assert.ok(deepEqual(new Date(2000, 3, 14), new Date(2000, 3, 14)), "deepEqual date");
- Assert.ok(deepEqual(new Date(NaN), new Date(NaN)), "deepEqual invalid dates");
-
- Assert.ok(!deepEqual(new Date(), new Date(2000, 3, 14)), "deepEqual date");
-
- // 7.3
- Assert.ok(deepEqual(/a/, /a/));
- Assert.ok(deepEqual(/a/g, /a/g));
- Assert.ok(deepEqual(/a/i, /a/i));
- Assert.ok(deepEqual(/a/m, /a/m));
- Assert.ok(deepEqual(/a/igm, /a/igm));
- Assert.ok(!deepEqual(/ab/, /a/));
- Assert.ok(!deepEqual(/a/g, /a/));
- Assert.ok(!deepEqual(/a/i, /a/));
- Assert.ok(!deepEqual(/a/m, /a/));
- Assert.ok(!deepEqual(/a/igm, /a/im));
-
- let re1 = /a/;
- re1.lastIndex = 3;
- Assert.ok(!deepEqual(re1, /a/));
-
- // 7.4
- Assert.ok(deepEqual(4, "4"), "deepEqual == check");
- Assert.ok(deepEqual(true, 1), "deepEqual == check");
- Assert.ok(!deepEqual(4, "5"), "deepEqual == check");
-
- // 7.5
- // having the same number of owned properties && the same set of keys
- Assert.ok(deepEqual({a: 4}, {a: 4}));
- Assert.ok(deepEqual({a: 4, b: "2"}, {a: 4, b: "2"}));
- Assert.ok(deepEqual([4], ["4"]));
- Assert.ok(!deepEqual({a: 4}, {a: 4, b: true}));
- Assert.ok(deepEqual(["a"], {0: "a"}));
-
- let a1 = [1, 2, 3];
- let a2 = [1, 2, 3];
- a1.a = "test";
- a1.b = true;
- a2.b = true;
- a2.a = "test";
- Assert.ok(!deepEqual(Object.keys(a1), Object.keys(a2)));
- Assert.ok(deepEqual(a1, a2));
-
- let nbRoot = {
- toString: function() { return this.first + " " + this.last; }
- };
-
- function nameBuilder(first, last) {
- this.first = first;
- this.last = last;
- return this;
- }
- nameBuilder.prototype = nbRoot;
-
- function nameBuilder2(first, last) {
- this.first = first;
- this.last = last;
- return this;
- }
- nameBuilder2.prototype = nbRoot;
-
- let nb1 = new nameBuilder("Ryan", "Dahl");
- let nb2 = new nameBuilder2("Ryan", "Dahl");
-
- Assert.ok(deepEqual(nb1, nb2));
-
- nameBuilder2.prototype = Object;
- nb2 = new nameBuilder2("Ryan", "Dahl");
- Assert.ok(!deepEqual(nb1, nb2));
-
- // String literal + object
- Assert.ok(!deepEqual("a", {}));
-
- // Make sure deepEqual doesn't loop forever on circular refs
-
- let b = {};
- b.b = b;
-
- let c = {};
- c.b = c;
-
- try {
- Assert.ok(!deepEqual(b, c));
- } catch (e) {
- Assert.ok(true, "Didn't recurse infinitely.");
- }
-});
diff --git a/toolkit/modules/tests/xpcshell/test_ObjectUtils_strict.js b/toolkit/modules/tests/xpcshell/test_ObjectUtils_strict.js
deleted file mode 100644
index 44572e6001..0000000000
--- a/toolkit/modules/tests/xpcshell/test_ObjectUtils_strict.js
+++ /dev/null
@@ -1,29 +0,0 @@
-"use strict";
-
-var {ObjectUtils} = Components.utils.import("resource://gre/modules/ObjectUtils.jsm", {});
-var {PromiseTestUtils} = Components.utils.import("resource://testing-common/PromiseTestUtils.jsm", {});
-
-add_task(function* test_strict() {
- let loose = { a: 1 };
- let strict = ObjectUtils.strict(loose);
-
- loose.a; // Should not throw.
- loose.b || undefined; // Should not throw.
-
- strict.a; // Should not throw.
- PromiseTestUtils.expectUncaughtRejection(/No such property: "b"/);
- Assert.throws(() => strict.b, /No such property: "b"/);
- "b" in strict; // Should not throw.
- strict.b = 2;
- strict.b; // Should not throw.
-
- PromiseTestUtils.expectUncaughtRejection(/No such property: "c"/);
- Assert.throws(() => strict.c, /No such property: "c"/);
- "c" in strict; // Should not throw.
- loose.c = 3;
- strict.c; // Should not throw.
-});
-
-function run_test() {
- run_next_test();
-}
diff --git a/toolkit/modules/tests/xpcshell/test_PermissionsUtils.js b/toolkit/modules/tests/xpcshell/test_PermissionsUtils.js
deleted file mode 100644
index 3982ce0151..0000000000
--- a/toolkit/modules/tests/xpcshell/test_PermissionsUtils.js
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-// Tests that PerrmissionsUtils.jsm works as expected, including:
-// * PermissionsUtils.importfromPrefs()
-// <ROOT>.[whitelist|blacklist].add preferences are emptied when
-// converted into permissions on startup.
-
-
-const PREF_ROOT = "testpermissions.";
-const TEST_PERM = "test-permission";
-
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/PermissionsUtils.jsm");
-
-function run_test() {
- test_importfromPrefs();
-}
-
-
-function test_importfromPrefs() {
- // Create own preferences to test
- Services.prefs.setCharPref(PREF_ROOT + "whitelist.add.EMPTY", "");
- Services.prefs.setCharPref(PREF_ROOT + "whitelist.add.EMPTY2", ",");
- Services.prefs.setCharPref(PREF_ROOT + "whitelist.add.TEST", "http://whitelist.example.com");
- Services.prefs.setCharPref(PREF_ROOT + "whitelist.add.TEST2", "https://whitelist2-1.example.com,http://whitelist2-2.example.com:8080,about:home");
- Services.prefs.setCharPref(PREF_ROOT + "whitelist.add.TEST3", "whitelist3-1.example.com,about:config"); // legacy style - host only
- Services.prefs.setCharPref(PREF_ROOT + "blacklist.add.EMPTY", "");
- Services.prefs.setCharPref(PREF_ROOT + "blacklist.add.TEST", "http://blacklist.example.com,");
- Services.prefs.setCharPref(PREF_ROOT + "blacklist.add.TEST2", ",https://blacklist2-1.example.com,http://blacklist2-2.example.com:8080,about:mozilla");
- Services.prefs.setCharPref(PREF_ROOT + "blacklist.add.TEST3", "blacklist3-1.example.com,about:preferences"); // legacy style - host only
-
- // Check they are unknown in the permission manager prior to importing.
- let whitelisted = ["http://whitelist.example.com",
- "https://whitelist2-1.example.com",
- "http://whitelist2-2.example.com:8080",
- "http://whitelist3-1.example.com",
- "https://whitelist3-1.example.com",
- "about:config",
- "about:home"];
- let blacklisted = ["http://blacklist.example.com",
- "https://blacklist2-1.example.com",
- "http://blacklist2-2.example.com:8080",
- "http://blacklist3-1.example.com",
- "https://blacklist3-1.example.com",
- "about:preferences",
- "about:mozilla"];
- let untouched = ["https://whitelist.example.com",
- "https://blacklist.example.com",
- "http://whitelist2-1.example.com",
- "http://blacklist2-1.example.com",
- "https://whitelist2-2.example.com:8080",
- "https://blacklist2-2.example.com:8080"];
- let unknown = whitelisted.concat(blacklisted).concat(untouched);
- for (let url of unknown) {
- let uri = Services.io.newURI(url, null, null);
- do_check_eq(Services.perms.testPermission(uri, TEST_PERM), Services.perms.UNKNOWN_ACTION);
- }
-
- // Import them
- PermissionsUtils.importFromPrefs(PREF_ROOT, TEST_PERM);
-
- // Get list of preferences to check
- let preferences = Services.prefs.getChildList(PREF_ROOT, {});
-
- // Check preferences were emptied
- for (let pref of preferences) {
- do_check_eq(Services.prefs.getCharPref(pref), "");
- }
-
- // Check they were imported into the permissions manager
- for (let url of whitelisted) {
- let uri = Services.io.newURI(url, null, null);
- do_check_eq(Services.perms.testPermission(uri, TEST_PERM), Services.perms.ALLOW_ACTION);
- }
- for (let url of blacklisted) {
- let uri = Services.io.newURI(url, null, null);
- do_check_eq(Services.perms.testPermission(uri, TEST_PERM), Services.perms.DENY_ACTION);
- }
- for (let url of untouched) {
- let uri = Services.io.newURI(url, null, null);
- do_check_eq(Services.perms.testPermission(uri, TEST_PERM), Services.perms.UNKNOWN_ACTION);
- }
-}
diff --git a/toolkit/modules/tests/xpcshell/test_Preferences.js b/toolkit/modules/tests/xpcshell/test_Preferences.js
deleted file mode 100644
index ef430909fd..0000000000
--- a/toolkit/modules/tests/xpcshell/test_Preferences.js
+++ /dev/null
@@ -1,378 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-var {classes: Cc, interfaces: Ci, results: Cr, utils: Cu, manager: Cm} = Components;
-
-Cu.import("resource://gre/modules/Preferences.jsm");
-
-function run_test() {
- run_next_test();
-}
-
-add_test(function test_set_get_pref() {
- Preferences.set("test_set_get_pref.integer", 1);
- do_check_eq(Preferences.get("test_set_get_pref.integer"), 1);
-
- Preferences.set("test_set_get_pref.string", "foo");
- do_check_eq(Preferences.get("test_set_get_pref.string"), "foo");
-
- Preferences.set("test_set_get_pref.boolean", true);
- do_check_eq(Preferences.get("test_set_get_pref.boolean"), true);
-
- // Clean up.
- Preferences.resetBranch("test_set_get_pref.");
-
- run_next_test();
-});
-
-add_test(function test_set_get_branch_pref() {
- let prefs = new Preferences("test_set_get_branch_pref.");
-
- prefs.set("something", 1);
- do_check_eq(prefs.get("something"), 1);
- do_check_false(Preferences.has("something"));
-
- // Clean up.
- prefs.reset("something");
-
- run_next_test();
-});
-
-add_test(function test_set_get_multiple_prefs() {
- Preferences.set({ "test_set_get_multiple_prefs.integer": 1,
- "test_set_get_multiple_prefs.string": "foo",
- "test_set_get_multiple_prefs.boolean": true });
-
- let [i, s, b] = Preferences.get(["test_set_get_multiple_prefs.integer",
- "test_set_get_multiple_prefs.string",
- "test_set_get_multiple_prefs.boolean"]);
-
- do_check_eq(i, 1);
- do_check_eq(s, "foo");
- do_check_eq(b, true);
-
- // Clean up.
- Preferences.resetBranch("test_set_get_multiple_prefs.");
-
- run_next_test();
-});
-
-add_test(function test_get_multiple_prefs_with_default_value() {
- Preferences.set({ "test_get_multiple_prefs_with_default_value.a": 1,
- "test_get_multiple_prefs_with_default_value.b": 2 });
-
- let [a, b, c] = Preferences.get(["test_get_multiple_prefs_with_default_value.a",
- "test_get_multiple_prefs_with_default_value.b",
- "test_get_multiple_prefs_with_default_value.c"],
- 0);
-
- do_check_eq(a, 1);
- do_check_eq(b, 2);
- do_check_eq(c, 0);
-
- // Clean up.
- Preferences.resetBranch("test_get_multiple_prefs_with_default_value.");
-
- run_next_test();
-});
-
-add_test(function test_set_get_unicode_pref() {
- Preferences.set("test_set_get_unicode_pref", String.fromCharCode(960));
- do_check_eq(Preferences.get("test_set_get_unicode_pref"), String.fromCharCode(960));
-
- // Clean up.
- Preferences.reset("test_set_get_unicode_pref");
-
- run_next_test();
-});
-
-add_test(function test_set_null_pref() {
- try {
- Preferences.set("test_set_null_pref", null);
- // We expect this to throw, so the test is designed to fail if it doesn't.
- do_check_true(false);
- }
- catch (ex) {}
-
- run_next_test();
-});
-
-add_test(function test_set_undefined_pref() {
- try {
- Preferences.set("test_set_undefined_pref");
- // We expect this to throw, so the test is designed to fail if it doesn't.
- do_check_true(false);
- }
- catch (ex) {}
-
- run_next_test();
-});
-
-add_test(function test_set_unsupported_pref() {
- try {
- Preferences.set("test_set_unsupported_pref", new Array());
- // We expect this to throw, so the test is designed to fail if it doesn't.
- do_check_true(false);
- }
- catch (ex) {}
-
- run_next_test();
-});
-
-// Make sure that we can get a string pref that we didn't set ourselves
-// (i.e. that the way we get a string pref using getComplexValue doesn't
-// hork us getting a string pref that wasn't set using setComplexValue).
-add_test(function test_get_string_pref() {
- let svc = Cc["@mozilla.org/preferences-service;1"].
- getService(Ci.nsIPrefService).
- getBranch("");
- svc.setCharPref("test_get_string_pref", "a normal string");
- do_check_eq(Preferences.get("test_get_string_pref"), "a normal string");
-
- // Clean up.
- Preferences.reset("test_get_string_pref");
-
- run_next_test();
-});
-
-add_test(function test_get_localized_string_pref() {
- let svc = Cc["@mozilla.org/preferences-service;1"].
- getService(Ci.nsIPrefService).
- getBranch("");
- let prefName = "test_get_localized_string_pref";
- let localizedString = Cc["@mozilla.org/pref-localizedstring;1"]
- .createInstance(Ci.nsIPrefLocalizedString);
- localizedString.data = "a localized string";
- svc.setComplexValue(prefName, Ci.nsIPrefLocalizedString, localizedString);
- do_check_eq(Preferences.get(prefName, null, Ci.nsIPrefLocalizedString),
- "a localized string");
-
- // Clean up.
- Preferences.reset(prefName);
-
- run_next_test();
-});
-
-add_test(function test_set_get_number_pref() {
- Preferences.set("test_set_get_number_pref", 5);
- do_check_eq(Preferences.get("test_set_get_number_pref"), 5);
-
- // Non-integer values get converted to integers.
- Preferences.set("test_set_get_number_pref", 3.14159);
- do_check_eq(Preferences.get("test_set_get_number_pref"), 3);
-
- // Values outside the range -(2^31-1) to 2^31-1 overflow.
- try {
- Preferences.set("test_set_get_number_pref", Math.pow(2, 31));
- // We expect this to throw, so the test is designed to fail if it doesn't.
- do_check_true(false);
- }
- catch (ex) {}
-
- // Clean up.
- Preferences.reset("test_set_get_number_pref");
-
- run_next_test();
-});
-
-add_test(function test_reset_pref() {
- Preferences.set("test_reset_pref", 1);
- Preferences.reset("test_reset_pref");
- do_check_eq(Preferences.get("test_reset_pref"), undefined);
-
- run_next_test();
-});
-
-add_test(function test_reset_pref_branch() {
- Preferences.set("test_reset_pref_branch.foo", 1);
- Preferences.set("test_reset_pref_branch.bar", 2);
- Preferences.resetBranch("test_reset_pref_branch.");
- do_check_eq(Preferences.get("test_reset_pref_branch.foo"), undefined);
- do_check_eq(Preferences.get("test_reset_pref_branch.bar"), undefined);
-
- run_next_test();
-});
-
-// Make sure the module doesn't throw an exception when asked to reset
-// a nonexistent pref.
-add_test(function test_reset_nonexistent_pref() {
- Preferences.reset("test_reset_nonexistent_pref");
-
- run_next_test();
-});
-
-// Make sure the module doesn't throw an exception when asked to reset
-// a nonexistent pref branch.
-add_test(function test_reset_nonexistent_pref_branch() {
- Preferences.resetBranch("test_reset_nonexistent_pref_branch.");
-
- run_next_test();
-});
-
-add_test(function test_observe_prefs_function() {
- let observed = false;
- let observer = function() { observed = !observed };
-
- Preferences.observe("test_observe_prefs_function", observer);
- Preferences.set("test_observe_prefs_function", "something");
- do_check_true(observed);
-
- Preferences.ignore("test_observe_prefs_function", observer);
- Preferences.set("test_observe_prefs_function", "something else");
- do_check_true(observed);
-
- // Clean up.
- Preferences.reset("test_observe_prefs_function");
-
- run_next_test();
-});
-
-add_test(function test_observe_prefs_object() {
- let observer = {
- observed: false,
- observe: function() {
- this.observed = !this.observed;
- }
- };
-
- Preferences.observe("test_observe_prefs_object", observer.observe, observer);
- Preferences.set("test_observe_prefs_object", "something");
- do_check_true(observer.observed);
-
- Preferences.ignore("test_observe_prefs_object", observer.observe, observer);
- Preferences.set("test_observe_prefs_object", "something else");
- do_check_true(observer.observed);
-
- // Clean up.
- Preferences.reset("test_observe_prefs_object");
-
- run_next_test();
-});
-
-add_test(function test_observe_prefs_nsIObserver() {
- let observer = {
- observed: false,
- observe: function(subject, topic, data) {
- this.observed = !this.observed;
- do_check_true(subject instanceof Ci.nsIPrefBranch);
- do_check_eq(topic, "nsPref:changed");
- do_check_eq(data, "test_observe_prefs_nsIObserver");
- }
- };
-
- Preferences.observe("test_observe_prefs_nsIObserver", observer);
- Preferences.set("test_observe_prefs_nsIObserver", "something");
- do_check_true(observer.observed);
-
- Preferences.ignore("test_observe_prefs_nsIObserver", observer);
- Preferences.set("test_observe_prefs_nsIObserver", "something else");
- do_check_true(observer.observed);
-
- // Clean up.
- Preferences.reset("test_observe_prefs_nsIObserver");
-
- run_next_test();
-});
-
-/*
-add_test(function test_observe_exact_pref() {
- let observed = false;
- let observer = function() { observed = !observed };
-
- Preferences.observe("test_observe_exact_pref", observer);
- Preferences.set("test_observe_exact_pref.sub-pref", "something");
- do_check_false(observed);
-
- // Clean up.
- Preferences.ignore("test_observe_exact_pref", observer);
- Preferences.reset("test_observe_exact_pref.sub-pref");
-
- run_next_test();
-});
-*/
-
-add_test(function test_observe_value_of_set_pref() {
- let observer = function(newVal) { do_check_eq(newVal, "something") };
-
- Preferences.observe("test_observe_value_of_set_pref", observer);
- Preferences.set("test_observe_value_of_set_pref", "something");
-
- // Clean up.
- Preferences.ignore("test_observe_value_of_set_pref", observer);
- Preferences.reset("test_observe_value_of_set_pref");
-
- run_next_test();
-});
-
-add_test(function test_observe_value_of_reset_pref() {
- let observer = function(newVal) { do_check_true(typeof newVal == "undefined") };
-
- Preferences.set("test_observe_value_of_reset_pref", "something");
- Preferences.observe("test_observe_value_of_reset_pref", observer);
- Preferences.reset("test_observe_value_of_reset_pref");
-
- // Clean up.
- Preferences.ignore("test_observe_value_of_reset_pref", observer);
-
- run_next_test();
-});
-
-add_test(function test_has_pref() {
- do_check_false(Preferences.has("test_has_pref"));
- Preferences.set("test_has_pref", "foo");
- do_check_true(Preferences.has("test_has_pref"));
-
- Preferences.set("test_has_pref.foo", "foo");
- Preferences.set("test_has_pref.bar", "bar");
- let [hasFoo, hasBar, hasBaz] = Preferences.has(["test_has_pref.foo",
- "test_has_pref.bar",
- "test_has_pref.baz"]);
- do_check_true(hasFoo);
- do_check_true(hasBar);
- do_check_false(hasBaz);
-
- // Clean up.
- Preferences.resetBranch("test_has_pref");
-
- run_next_test();
-});
-
-add_test(function test_isSet_pref() {
- // Use a pref that we know has a default value but no user-set value.
- // This feels dangerous; perhaps we should create some other default prefs
- // that we can use for testing.
- do_check_false(Preferences.isSet("toolkit.defaultChromeURI"));
- Preferences.set("toolkit.defaultChromeURI", "foo");
- do_check_true(Preferences.isSet("toolkit.defaultChromeURI"));
-
- // Clean up.
- Preferences.reset("toolkit.defaultChromeURI");
-
- run_next_test();
-});
-
-/*
-add_test(function test_lock_prefs() {
- // Use a pref that we know has a default value.
- // This feels dangerous; perhaps we should create some other default prefs
- // that we can use for testing.
- do_check_false(Preferences.locked("toolkit.defaultChromeURI"));
- Preferences.lock("toolkit.defaultChromeURI");
- do_check_true(Preferences.locked("toolkit.defaultChromeURI"));
- Preferences.unlock("toolkit.defaultChromeURI");
- do_check_false(Preferences.locked("toolkit.defaultChromeURI"));
-
- let val = Preferences.get("toolkit.defaultChromeURI");
- Preferences.set("toolkit.defaultChromeURI", "test_lock_prefs");
- do_check_eq(Preferences.get("toolkit.defaultChromeURI"), "test_lock_prefs");
- Preferences.lock("toolkit.defaultChromeURI");
- do_check_eq(Preferences.get("toolkit.defaultChromeURI"), val);
- Preferences.unlock("toolkit.defaultChromeURI");
- do_check_eq(Preferences.get("toolkit.defaultChromeURI"), "test_lock_prefs");
-
- // Clean up.
- Preferences.reset("toolkit.defaultChromeURI");
-
- run_next_test();
-});
-*/
diff --git a/toolkit/modules/tests/xpcshell/test_Promise.js b/toolkit/modules/tests/xpcshell/test_Promise.js
deleted file mode 100644
index 6c72206922..0000000000
--- a/toolkit/modules/tests/xpcshell/test_Promise.js
+++ /dev/null
@@ -1,1105 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-"use strict";
-
-Components.utils.import("resource://gre/modules/Promise.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/Task.jsm");
-Components.utils.import("resource://testing-common/PromiseTestUtils.jsm");
-
-// Prevent test failures due to the unhandled rejections in this test file.
-PromiseTestUtils.disableUncaughtRejectionObserverForSelfTest();
-
-// Test runner
-
-var run_promise_tests = function run_promise_tests(tests, cb) {
- let loop = function loop(index) {
- if (index >= tests.length) {
- if (cb) {
- cb.call();
- }
- return;
- }
- do_print("Launching test " + (index + 1) + "/" + tests.length);
- let test = tests[index];
- // Execute from an empty stack
- let next = function next() {
- do_print("Test " + (index + 1) + "/" + tests.length + " complete");
- do_execute_soon(function() {
- loop(index + 1);
- });
- };
- let result = test();
- result.then(next, next);
- };
- return loop(0);
-};
-
-var make_promise_test = function(test) {
- return function runtest() {
- do_print("Test starting: " + test.name);
- try {
- let result = test();
- if (result && "promise" in result) {
- result = result.promise;
- }
- if (!result || !("then" in result)) {
- let exn;
- try {
- do_throw("Test " + test.name + " did not return a promise: " + result);
- } catch (x) {
- exn = x;
- }
- return Promise.reject(exn);
- }
- // The test returns a promise
- result = result.then(
- // Test complete
- function onResolve() {
- do_print("Test complete: " + test.name);
- },
- // The test failed with an unexpected error
- function onReject(err) {
- let detail;
- if (err && typeof err == "object" && "stack" in err) {
- detail = err.stack;
- } else {
- detail = "(no stack)";
- }
- do_throw("Test " + test.name + " rejected with the following reason: "
- + err + detail);
- });
- return result;
- } catch (x) {
- // The test failed because of an error outside of a promise
- do_throw("Error in body of test " + test.name + ": " + x + " at " + x.stack);
- return Promise.reject();
- }
- };
-};
-
-// Tests
-
-var tests = [];
-
-// Utility function to observe an failures in a promise
-// This function is useful if the promise itself is
-// not returned.
-var observe_failures = function observe_failures(promise) {
- promise.catch(function onReject(reason) {
- test.do_throw("Observed failure in test " + test + ": " + reason);
- });
-};
-
-// Test that all observers are notified
-tests.push(make_promise_test(
- function notification(test) {
- // The size of the test
- const SIZE = 10;
- const RESULT = "this is an arbitrary value";
-
- // Number of observers that yet need to be notified
- let expected = SIZE;
-
- // |true| once an observer has been notified
- let notified = [];
-
- // The promise observed
- let source = Promise.defer();
- let result = Promise.defer();
-
- let install_observer = function install_observer(i) {
- observe_failures(source.promise.then(
- function onSuccess(value) {
- do_check_true(!notified[i], "Ensuring that observer is notified at most once");
- notified[i] = true;
-
- do_check_eq(value, RESULT, "Ensuring that the observed value is correct");
- if (--expected == 0) {
- result.resolve();
- }
- }));
- };
-
- // Install a number of observers before resolving
- let i;
- for (i = 0; i < SIZE/2; ++i) {
- install_observer(i);
- }
-
- source.resolve(RESULT);
-
- // Install remaining observers
- for (;i < SIZE; ++i) {
- install_observer(i);
- }
-
- return result;
- }));
-
-// Test that observers get the correct "this" value in strict mode.
-tests.push(
- make_promise_test(function handlers_this_value(test) {
- return Promise.resolve().then(
- function onResolve() {
- // Since this file is in strict mode, the correct value is "undefined".
- do_check_eq(this, undefined);
- throw "reject";
- }
- ).then(
- null,
- function onReject() {
- // Since this file is in strict mode, the correct value is "undefined".
- do_check_eq(this, undefined);
- }
- );
- }));
-
-// Test that observers registered on a pending promise are notified in order.
-tests.push(
- make_promise_test(function then_returns_before_callbacks(test) {
- let deferred = Promise.defer();
- let promise = deferred.promise;
-
- let order = 0;
-
- promise.then(
- function onResolve() {
- do_check_eq(order, 0);
- order++;
- }
- );
-
- promise.then(
- function onResolve() {
- do_check_eq(order, 1);
- order++;
- }
- );
-
- let newPromise = promise.then(
- function onResolve() {
- do_check_eq(order, 2);
- }
- );
-
- deferred.resolve();
-
- // This test finishes after the last handler succeeds.
- return newPromise;
- }));
-
-// Test that observers registered on a resolved promise are notified in order.
-tests.push(
- make_promise_test(function then_returns_before_callbacks(test) {
- let promise = Promise.resolve();
-
- let order = 0;
-
- promise.then(
- function onResolve() {
- do_check_eq(order, 0);
- order++;
- }
- );
-
- promise.then(
- function onResolve() {
- do_check_eq(order, 1);
- order++;
- }
- );
-
- // This test finishes after the last handler succeeds.
- return promise.then(
- function onResolve() {
- do_check_eq(order, 2);
- }
- );
- }));
-
-// Test that all observers are notified at most once, even if source
-// is resolved/rejected several times
-tests.push(make_promise_test(
- function notification_once(test) {
- // The size of the test
- const SIZE = 10;
- const RESULT = "this is an arbitrary value";
-
- // Number of observers that yet need to be notified
- let expected = SIZE;
-
- // |true| once an observer has been notified
- let notified = [];
-
- // The promise observed
- let observed = Promise.defer();
- let result = Promise.defer();
-
- let install_observer = function install_observer(i) {
- observe_failures(observed.promise.then(
- function onSuccess(value) {
- do_check_true(!notified[i], "Ensuring that observer is notified at most once");
- notified[i] = true;
-
- do_check_eq(value, RESULT, "Ensuring that the observed value is correct");
- if (--expected == 0) {
- result.resolve();
- }
- }));
- };
-
- // Install a number of observers before resolving
- let i;
- for (i = 0; i < SIZE/2; ++i) {
- install_observer(i);
- }
-
- observed.resolve(RESULT);
-
- // Install remaining observers
- for (;i < SIZE; ++i) {
- install_observer(i);
- }
-
- // Resolve some more
- for (i = 0; i < 10; ++i) {
- observed.resolve(RESULT);
- observed.reject();
- }
-
- return result;
- }));
-
-// Test that throwing an exception from a onResolve listener
-// does not prevent other observers from receiving the notification
-// of success.
-tests.push(
- make_promise_test(function exceptions_do_not_stop_notifications(test) {
- let source = Promise.defer();
-
- let exception_thrown = false;
- let exception_content = new Error("Boom!");
-
- let observer_1 = source.promise.then(
- function onResolve() {
- exception_thrown = true;
- throw exception_content;
- });
-
- let observer_2 = source.promise.then(
- function onResolve() {
- do_check_true(exception_thrown, "Second observer called after first observer has thrown");
- }
- );
-
- let result = observer_1.then(
- function onResolve() {
- do_throw("observer_1 should not have resolved");
- },
- function onReject(reason) {
- do_check_true(reason == exception_content, "Obtained correct rejection");
- }
- );
-
- source.resolve();
- return result;
- }
-));
-
-// Test that, once a promise is resolved, further resolve/reject
-// are ignored.
-tests.push(
- make_promise_test(function subsequent_resolves_are_ignored(test) {
- let deferred = Promise.defer();
- deferred.resolve(1);
- deferred.resolve(2);
- deferred.reject(3);
-
- let result = deferred.promise.then(
- function onResolve(value) {
- do_check_eq(value, 1, "Resolution chose the first value");
- },
- function onReject(reason) {
- do_throw("Obtained a rejection while the promise was already resolved");
- }
- );
-
- return result;
- }));
-
-// Test that, once a promise is rejected, further resolve/reject
-// are ignored.
-tests.push(
- make_promise_test(function subsequent_rejects_are_ignored(test) {
- let deferred = Promise.defer();
- deferred.reject(1);
- deferred.reject(2);
- deferred.resolve(3);
-
- let result = deferred.promise.then(
- function onResolve() {
- do_throw("Obtained a resolution while the promise was already rejected");
- },
- function onReject(reason) {
- do_check_eq(reason, 1, "Rejection chose the first value");
- }
- );
-
- return result;
- }));
-
-// Test that returning normally from a rejection recovers from the error
-// and that listeners are informed of a success.
-tests.push(
- make_promise_test(function recovery(test) {
- let boom = new Error("Boom!");
- let deferred = Promise.defer();
- const RESULT = "An arbitrary value";
-
- let promise = deferred.promise.then(
- function onResolve() {
- do_throw("A rejected promise should not resolve");
- },
- function onReject(reason) {
- do_check_true(reason == boom, "Promise was rejected with the correct error");
- return RESULT;
- }
- );
-
- promise = promise.then(
- function onResolve(value) {
- do_check_eq(value, RESULT, "Promise was recovered with the correct value");
- }
- );
-
- deferred.reject(boom);
- return promise;
- }));
-
-// Test that returning a resolved promise from a onReject causes a resolution
-// (recovering from the error) and that returning a rejected promise
-// from a onResolve listener causes a rejection (raising an error).
-tests.push(
- make_promise_test(function recovery_with_promise(test) {
- let boom = new Error("Arbitrary error");
- let deferred = Promise.defer();
- const RESULT = "An arbitrary value";
- const boom2 = new Error("Another arbitrary error");
-
- // return a resolved promise from a onReject listener
- let promise = deferred.promise.then(
- function onResolve() {
- do_throw("A rejected promise should not resolve");
- },
- function onReject(reason) {
- do_check_true(reason == boom, "Promise was rejected with the correct error");
- return Promise.resolve(RESULT);
- }
- );
-
- // return a rejected promise from a onResolve listener
- promise = promise.then(
- function onResolve(value) {
- do_check_eq(value, RESULT, "Promise was recovered with the correct value");
- return Promise.reject(boom2);
- }
- );
-
- promise = promise.catch(
- function onReject(reason) {
- do_check_eq(reason, boom2, "Rejection was propagated with the correct " +
- "reason, through a promise");
- }
- );
-
- deferred.reject(boom);
- return promise;
- }));
-
-// Test that we can resolve with promises of promises
-tests.push(
- make_promise_test(function test_propagation(test) {
- const RESULT = "Yet another arbitrary value";
- let d1 = Promise.defer();
- let d2 = Promise.defer();
- let d3 = Promise.defer();
-
- d3.resolve(d2.promise);
- d2.resolve(d1.promise);
- d1.resolve(RESULT);
-
- return d3.promise.then(
- function onSuccess(value) {
- do_check_eq(value, RESULT, "Resolution with a promise eventually yielded "
- + " the correct result");
- }
- );
- }));
-
-// Test sequences of |then| and |catch|
-tests.push(
- make_promise_test(function test_chaining(test) {
- let error_1 = new Error("Error 1");
- let error_2 = new Error("Error 2");
- let result_1 = "First result";
- let result_2 = "Second result";
- let result_3 = "Third result";
-
- let source = Promise.defer();
-
- let promise = source.promise.then().then();
-
- source.resolve(result_1);
-
- // Check that result_1 is correctly propagated
- promise = promise.then(
- function onSuccess(result) {
- do_check_eq(result, result_1, "Result was propagated correctly through " +
- " several applications of |then|");
- return result_2;
- }
- );
-
- // Check that returning from the promise produces a resolution
- promise = promise.catch(
- function onReject() {
- do_throw("Incorrect rejection");
- }
- );
-
- // ... and that the check did not alter the value
- promise = promise.then(
- function onResolve(value) {
- do_check_eq(value, result_2, "Result was propagated correctly once again");
- }
- );
-
- // Now the same kind of tests for rejections
- promise = promise.then(
- function onResolve() {
- throw error_1;
- }
- );
-
- promise = promise.then(
- function onResolve() {
- do_throw("Incorrect resolution: the exception should have caused a rejection");
- }
- );
-
- promise = promise.catch(
- function onReject(reason) {
- do_check_true(reason == error_1, "Reason was propagated correctly");
- throw error_2;
- }
- );
-
- promise = promise.catch(
- function onReject(reason) {
- do_check_true(reason == error_2, "Throwing an error altered the reason " +
- "as expected");
- return result_3;
- }
- );
-
- promise = promise.then(
- function onResolve(result) {
- do_check_eq(result, result_3, "Error was correctly recovered");
- }
- );
-
- return promise;
- }));
-
-// Test that resolving with a rejected promise actually rejects
-tests.push(
- make_promise_test(function resolve_to_rejected(test) {
- let source = Promise.defer();
- let error = new Error("Boom");
-
- let promise = source.promise.then(
- function onResolve() {
- do_throw("Incorrect call to onResolve listener");
- },
- function onReject(reason) {
- do_check_eq(reason, error, "Rejection lead to the expected reason");
- }
- );
-
- source.resolve(Promise.reject(error));
-
- return promise;
- }));
-
-// Test that Promise.resolve resolves as expected
-tests.push(
- make_promise_test(function test_resolve(test) {
- const RESULT = "arbitrary value";
- let p1 = Promise.resolve(RESULT);
- let p2 = Promise.resolve(p1);
- do_check_eq(p1, p2, "Promise.resolve used on a promise just returns the promise");
-
- return p1.then(
- function onResolve(result) {
- do_check_eq(result, RESULT, "Promise.resolve propagated the correct result");
- }
- );
- }));
-
-// Test that Promise.resolve throws when its argument is an async function.
-tests.push(
- make_promise_test(function test_promise_resolve_throws_with_async_function(test) {
- Assert.throws(() => Promise.resolve(Task.async(function* () {})),
- /Cannot resolve a promise with an async function/);
- return Promise.resolve();
- }));
-
-// Test that the code after "then" is always executed before the callbacks
-tests.push(
- make_promise_test(function then_returns_before_callbacks(test) {
- let promise = Promise.resolve();
-
- let thenExecuted = false;
-
- promise = promise.then(
- function onResolve() {
- thenExecuted = true;
- }
- );
-
- do_check_false(thenExecuted);
-
- return promise;
- }));
-
-// Test that chaining promises does not generate long stack traces
-tests.push(
- make_promise_test(function chaining_short_stack(test) {
- let source = Promise.defer();
- let promise = source.promise;
-
- const NUM_ITERATIONS = 100;
-
- for (let i = 0; i < NUM_ITERATIONS; i++) {
- promise = promise.then(
- function onResolve(result) {
- return result + ".";
- }
- );
- }
-
- promise = promise.then(
- function onResolve(result) {
- // Check that the execution went as expected.
- let expectedString = new Array(1 + NUM_ITERATIONS).join(".");
- do_check_true(result == expectedString);
-
- // Check that we didn't generate one or more stack frames per iteration.
- let stackFrameCount = 0;
- let stackFrame = Components.stack;
- while (stackFrame) {
- stackFrameCount++;
- stackFrame = stackFrame.caller;
- }
-
- do_check_true(stackFrameCount < NUM_ITERATIONS);
- }
- );
-
- source.resolve("");
-
- return promise;
- }));
-
-// Test that the values of the promise return by Promise.all() are kept in the
-// given order even if the given promises are resolved in arbitrary order
-tests.push(
- make_promise_test(function all_resolve(test) {
- let d1 = Promise.defer();
- let d2 = Promise.defer();
- let d3 = Promise.defer();
-
- d3.resolve(4);
- d2.resolve(2);
- do_execute_soon(() => d1.resolve(1));
-
- let promises = [d1.promise, d2.promise, 3, d3.promise];
-
- return Promise.all(promises).then(
- function onResolve([val1, val2, val3, val4]) {
- do_check_eq(val1, 1);
- do_check_eq(val2, 2);
- do_check_eq(val3, 3);
- do_check_eq(val4, 4);
- }
- );
- }));
-
-// Test that rejecting one of the promises passed to Promise.all()
-// rejects the promise return by Promise.all()
-tests.push(
- make_promise_test(function all_reject(test) {
- let error = new Error("Boom");
-
- let d1 = Promise.defer();
- let d2 = Promise.defer();
- let d3 = Promise.defer();
-
- d3.resolve(3);
- d2.resolve(2);
- do_execute_soon(() => d1.reject(error));
-
- let promises = [d1.promise, d2.promise, d3.promise];
-
- return Promise.all(promises).then(
- function onResolve() {
- do_throw("Incorrect call to onResolve listener");
- },
- function onReject(reason) {
- do_check_eq(reason, error, "Rejection lead to the expected reason");
- }
- );
- }));
-
-// Test that passing only values (not promises) to Promise.all()
-// forwards them all as resolution values.
-tests.push(
- make_promise_test(function all_resolve_no_promises(test) {
- try {
- Promise.all(null);
- do_check_true(false, "all() should only accept iterables");
- } catch (e) {
- do_check_true(true, "all() fails when first the arg is not an iterable");
- }
-
- let p1 = Promise.all([]).then(
- function onResolve(val) {
- do_check_true(Array.isArray(val) && val.length == 0);
- }
- );
-
- let p2 = Promise.all([1, 2, 3]).then(
- function onResolve([val1, val2, val3]) {
- do_check_eq(val1, 1);
- do_check_eq(val2, 2);
- do_check_eq(val3, 3);
- }
- );
-
- return Promise.all([p1, p2]);
- }));
-
-// Test that Promise.all() handles non-array iterables
-tests.push(
- make_promise_test(function all_iterable(test) {
- function* iterable() {
- yield 1;
- yield 2;
- yield 3;
- }
-
- return Promise.all(iterable()).then(
- function onResolve([val1, val2, val3]) {
- do_check_eq(val1, 1);
- do_check_eq(val2, 2);
- do_check_eq(val3, 3);
- },
- function onReject() {
- do_throw("all() unexpectedly rejected");
- }
- );
- }));
-
-// Test that throwing from the iterable passed to Promise.all() rejects the
-// promise returned by Promise.all()
-tests.push(
- make_promise_test(function all_iterable_throws(test) {
- function* iterable() {
- throw 1;
- }
-
- return Promise.all(iterable()).then(
- function onResolve() {
- do_throw("all() unexpectedly resolved");
- },
- function onReject(reason) {
- do_check_eq(reason, 1, "all() rejects when the iterator throws");
- }
- );
- }));
-
-// Test that Promise.race() resolves with the first available resolution value
-tests.push(
- make_promise_test(function race_resolve(test) {
- let p1 = Promise.resolve(1);
- let p2 = Promise.resolve().then(() => 2);
-
- return Promise.race([p1, p2]).then(
- function onResolve(value) {
- do_check_eq(value, 1);
- }
- );
- }));
-
-// Test that passing only values (not promises) to Promise.race() works
-tests.push(
- make_promise_test(function race_resolve_no_promises(test) {
- try {
- Promise.race(null);
- do_check_true(false, "race() should only accept iterables");
- } catch (e) {
- do_check_true(true, "race() fails when first the arg is not an iterable");
- }
-
- return Promise.race([1, 2, 3]).then(
- function onResolve(value) {
- do_check_eq(value, 1);
- }
- );
- }));
-
-// Test that Promise.race() never resolves when passed an empty iterable
-tests.push(
- make_promise_test(function race_resolve_never(test) {
- return new Promise(resolve => {
- Promise.race([]).then(
- function onResolve() {
- do_throw("race() unexpectedly resolved");
- },
- function onReject() {
- do_throw("race() unexpectedly rejected");
- }
- );
-
- // Approximate "never" so we don't have to solve the halting problem.
- do_timeout(200, resolve);
- });
- }));
-
-// Test that Promise.race() handles non-array iterables.
-tests.push(
- make_promise_test(function race_iterable(test) {
- function* iterable() {
- yield 1;
- yield 2;
- yield 3;
- }
-
- return Promise.race(iterable()).then(
- function onResolve(value) {
- do_check_eq(value, 1);
- },
- function onReject() {
- do_throw("race() unexpectedly rejected");
- }
- );
- }));
-
-// Test that throwing from the iterable passed to Promise.race() rejects the
-// promise returned by Promise.race()
-tests.push(
- make_promise_test(function race_iterable_throws(test) {
- function* iterable() {
- throw 1;
- }
-
- return Promise.race(iterable()).then(
- function onResolve() {
- do_throw("race() unexpectedly resolved");
- },
- function onReject(reason) {
- do_check_eq(reason, 1, "race() rejects when the iterator throws");
- }
- );
- }));
-
-// Test that rejecting one of the promises passed to Promise.race() rejects the
-// promise returned by Promise.race()
-tests.push(
- make_promise_test(function race_reject(test) {
- let p1 = Promise.reject(1);
- let p2 = Promise.resolve(2);
- let p3 = Promise.resolve(3);
-
- return Promise.race([p1, p2, p3]).then(
- function onResolve() {
- do_throw("race() unexpectedly resolved");
- },
- function onReject(reason) {
- do_check_eq(reason, 1, "race() rejects when given a rejected promise");
- }
- );
- }));
-
-// Test behavior of the Promise constructor.
-tests.push(
- make_promise_test(function test_constructor(test) {
- try {
- new Promise(null);
- do_check_true(false, "Constructor should fail when not passed a function");
- } catch (e) {
- do_check_true(true, "Constructor fails when not passed a function");
- }
-
- let executorRan = false;
- let promise = new Promise(
- function executor(resolve, reject) {
- executorRan = true;
- do_check_eq(this, undefined);
- do_check_eq(typeof resolve, "function",
- "resolve function should be passed to the executor");
- do_check_eq(typeof reject, "function",
- "reject function should be passed to the executor");
- }
- );
- do_check_instanceof(promise, Promise);
- do_check_true(executorRan, "Executor should execute synchronously");
-
- // resolve a promise from the executor
- let resolvePromise = new Promise(
- function executor(resolve) {
- resolve(1);
- }
- ).then(
- function onResolve(value) {
- do_check_eq(value, 1, "Executor resolved with correct value");
- },
- function onReject() {
- do_throw("Executor unexpectedly rejected");
- }
- );
-
- // reject a promise from the executor
- let rejectPromise = new Promise(
- function executor(_, reject) {
- reject(1);
- }
- ).then(
- function onResolve() {
- do_throw("Executor unexpectedly resolved");
- },
- function onReject(reason) {
- do_check_eq(reason, 1, "Executor rejected with correct value");
- }
- );
-
- // throw from the executor, causing a rejection
- let throwPromise = new Promise(
- function executor() {
- throw 1;
- }
- ).then(
- function onResolve() {
- do_throw("Throwing inside an executor should not resolve the promise");
- },
- function onReject(reason) {
- do_check_eq(reason, 1, "Executor rejected with correct value");
- }
- );
-
- return Promise.all([resolvePromise, rejectPromise, throwPromise]);
- }));
-
-// Test deadlock in Promise.jsm with nested event loops
-// The scenario being tested is:
-// promise_1.then({
-// do some work that will asynchronously signal done
-// start an event loop waiting for the done signal
-// }
-// where the async work uses resolution of a second promise to
-// trigger the "done" signal. While this would likely work in a
-// naive implementation, our constant-stack implementation needs
-// a special case to avoid deadlock. Note that this test is
-// sensitive to the implementation-dependent order in which then()
-// clauses for two different promises are executed, so it is
-// possible for other implementations to pass this test and still
-// have similar deadlocks.
-tests.push(
- make_promise_test(function promise_nested_eventloop_deadlock(test) {
- // Set up a (long enough to be noticeable) timeout to
- // exit the nested event loop and throw if the test run is hung
- let shouldExitNestedEventLoop = false;
-
- function event_loop() {
- let thr = Services.tm.mainThread;
- while (!shouldExitNestedEventLoop) {
- thr.processNextEvent(true);
- }
- }
-
- // I wish there was a way to cancel xpcshell do_timeout()s
- do_timeout(2000, () => {
- if (!shouldExitNestedEventLoop) {
- shouldExitNestedEventLoop = true;
- do_throw("Test timed out");
- }
- });
-
- let promise1 = Promise.resolve(1);
- let promise2 = Promise.resolve(2);
-
- do_print("Setting wait for first promise");
- promise1.then(value => {
- do_print("Starting event loop");
- event_loop();
- }, null);
-
- do_print("Setting wait for second promise");
- return promise2.catch(error => { return 3; })
- .then(
- count => {
- shouldExitNestedEventLoop = true;
- });
- }));
-
-function wait_for_uncaught(aMustAppear, aTimeout = undefined) {
- let remaining = new Set();
- for (let k of aMustAppear) {
- remaining.add(k);
- }
- let deferred = Promise.defer();
- let print = do_print;
- let execute_soon = do_execute_soon;
- let observer = function({message, stack}) {
- let data = message + stack;
- print("Observing " + message + ", looking for " + aMustAppear.join(", "));
- for (let expected of remaining) {
- if (data.indexOf(expected) != -1) {
- print("I found " + expected);
- remaining.delete(expected);
- }
- if (remaining.size == 0 && observer) {
- Promise.Debugging.removeUncaughtErrorObserver(observer);
- observer = null;
- deferred.resolve();
- }
- }
- };
- Promise.Debugging.addUncaughtErrorObserver(observer);
- if (aTimeout) {
- do_timeout(aTimeout, function timeout() {
- if (observer) {
- Promise.Debugging.removeUncaughtErrorObserver(observer);
- observer = null;
- }
- deferred.reject(new Error("Timeout"));
- });
- }
- return deferred.promise;
-}
-
-// Test that uncaught errors are reported as uncaught
-(function() {
- let make_string_rejection = function make_string_rejection() {
- let salt = (Math.random() * ( Math.pow(2, 24) - 1 ));
- let string = "This is an uncaught rejection " + salt;
- // Our error is not Error-like nor an nsIException, so the stack will
- // include the closure doing the actual rejection.
- return {mustFind: ["test_rejection_closure", string], error: string};
- };
- let make_num_rejection = function make_num_rejection() {
- let salt = (Math.random() * ( Math.pow(2, 24) - 1 ));
- // Our error is not Error-like nor an nsIException, so the stack will
- // include the closure doing the actual rejection.
- return {mustFind: ["test_rejection_closure", salt], error: salt};
- };
- let make_undefined_rejection = function make_undefined_rejection() {
- // Our error is not Error-like nor an nsIException, so the stack will
- // include the closure doing the actual rejection.
- return {mustFind: ["test_rejection_closure"], error: undefined};
- };
- let make_error_rejection = function make_error_rejection() {
- let salt = (Math.random() * ( Math.pow(2, 24) - 1 ));
- let error = new Error("This is an uncaught error " + salt);
- return {
- mustFind: [error.message, error.fileName, error.lineNumber, error.stack],
- error: error
- };
- };
- let make_exception_rejection = function make_exception_rejection() {
- let salt = (Math.random() * ( Math.pow(2, 24) - 1 ));
- let exn = new Components.Exception("This is an uncaught exception " + salt,
- Components.results.NS_ERROR_NOT_AVAILABLE);
- return {
- mustFind: [exn.message, exn.filename, exn.lineNumber, exn.location.toString()],
- error: exn
- };
- };
- for (let make_rejection of [make_string_rejection,
- make_num_rejection,
- make_undefined_rejection,
- make_error_rejection,
- make_exception_rejection]) {
- let {mustFind, error} = make_rejection();
- let name = make_rejection.name;
- tests.push(make_promise_test(function test_uncaught_is_reported() {
- do_print("Testing with rejection " + name);
- let promise = wait_for_uncaught(mustFind);
- (function test_rejection_closure() {
- // For the moment, we cannot be absolutely certain that a value is
- // garbage-collected, even if it is not referenced anymore, due to
- // the conservative stack-scanning algorithm.
- //
- // To be _almost_ certain that a value will be garbage-collected, we
- // 1. isolate that value in an anonymous closure;
- // 2. allocate 100 values instead of 1 (gc-ing a single value from
- // these is sufficient for the test);
- // 3. place everything in a loop, as the JIT typically reuses memory;
- // 4. call all the GC methods we can.
- //
- // Unfortunately, we might still have intermittent failures,
- // materialized as timeouts.
- //
- for (let i = 0; i < 100; ++i) {
- Promise.reject(error);
- }
- })();
- do_print("Posted all rejections");
- Components.utils.forceGC();
- Components.utils.forceCC();
- Components.utils.forceShrinkingGC();
- return promise;
- }));
- }
-})();
-
-
-// Test that caught errors are not reported as uncaught
-tests.push(
-make_promise_test(function test_caught_is_not_reported() {
- let salt = (Math.random() * ( Math.pow(2, 24) - 1 ));
- let promise = wait_for_uncaught([salt], 500);
- (function() {
- let uncaught = Promise.reject("This error, on the other hand, is caught " + salt);
- uncaught.catch(function() { /* ignore rejection */ });
- uncaught = null;
- })();
- // Isolate this in a function to increase likelihood that the gc will
- // realise that |uncaught| has remained uncaught.
- Components.utils.forceGC();
-
- return promise.then(function onSuccess() {
- throw new Error("This error was caught and should not have been reported");
- }, function onError() {
- do_print("The caught error was not reported, all is fine");
- }
- );
-}));
-
-// Bug 1033406 - Make sure Promise works even after freezing.
-tests.push(
- make_promise_test(function test_freezing_promise(test) {
- var p = new Promise(function executor(resolve) {
- do_execute_soon(resolve);
- });
- Object.freeze(p);
- return p;
- })
-);
-
-function run_test()
-{
- do_test_pending();
- run_promise_tests(tests, do_test_finished);
-}
diff --git a/toolkit/modules/tests/xpcshell/test_PromiseUtils.js b/toolkit/modules/tests/xpcshell/test_PromiseUtils.js
deleted file mode 100644
index c3ab839e4b..0000000000
--- a/toolkit/modules/tests/xpcshell/test_PromiseUtils.js
+++ /dev/null
@@ -1,105 +0,0 @@
- /* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-Components.utils.import("resource://gre/modules/PromiseUtils.jsm");
-Components.utils.import("resource://gre/modules/Timer.jsm");
-Components.utils.import("resource://testing-common/PromiseTestUtils.jsm");
-
-// Tests for PromiseUtils.jsm
-function run_test() {
- run_next_test();
-}
-
-// Tests for PromiseUtils.defer()
-
-/* Tests for checking the resolve method of the Deferred object
- * returned by PromiseUtils.defer() */
-add_task(function* test_resolve_string() {
- let def = PromiseUtils.defer();
- let expected = "The promise is resolved " + Math.random();
- def.resolve(expected);
- let result = yield def.promise;
- Assert.equal(result, expected, "def.resolve() resolves the promise");
-});
-
-/* Test for the case when undefined is passed to the resolve method
- * of the Deferred object */
-add_task(function* test_resolve_undefined() {
- let def = PromiseUtils.defer();
- def.resolve();
- let result = yield def.promise;
- Assert.equal(result, undefined, "resolve works with undefined as well");
-});
-
-/* Test when a pending promise is passed to the resolve method
- * of the Deferred object */
-add_task(function* test_resolve_pending_promise() {
- let def = PromiseUtils.defer();
- let expected = 100 + Math.random();
- let p = new Promise((resolve, reject) => {
- setTimeout(() => resolve(expected), 100);
- });
- def.resolve(p);
- let result = yield def.promise;
- Assert.equal(result, expected, "def.promise assumed the state of the passed promise");
-});
-
-/* Test when a resovled promise is passed
- * to the resolve method of the Deferred object */
-add_task(function* test_resolve_resolved_promise() {
- let def = PromiseUtils.defer();
- let expected = "Yeah resolved" + Math.random();
- let p = new Promise((resolve, reject) => resolve(expected));
- def.resolve(p);
- let result = yield def.promise;
- Assert.equal(result, expected, "Resolved promise is passed to the resolve method");
-});
-
-/* Test for the case when a rejected promise is
- * passed to the resolve method */
-add_task(function* test_resolve_rejected_promise() {
- let def = PromiseUtils.defer();
- let p = new Promise((resolve, reject) => reject(new Error("There its an rejection")));
- def.resolve(p);
- yield Assert.rejects(def.promise, /There its an rejection/, "Settled rejection promise passed to the resolve method");
-});
-
-/* Test for the checking the reject method of
- * the Deferred object returned by PromiseUtils.defer() */
-add_task(function* test_reject_Error() {
- let def = PromiseUtils.defer();
- def.reject(new Error("This one rejects"));
- yield Assert.rejects(def.promise, /This one rejects/, "reject method with Error for rejection");
-});
-
-/* Test for the case when a pending Promise is passed to
- * the reject method of Deferred object */
-add_task(function* test_reject_pending_promise() {
- let def = PromiseUtils.defer();
- let p = new Promise((resolve, reject) => {
- setTimeout(() => resolve(100), 100);
- });
- def.reject(p);
- yield Assert.rejects(def.promise, Promise, "Rejection with a pending promise uses the passed promise itself as the reason of rejection");
-});
-
-/* Test for the case when a resolved Promise
- * is passed to the reject method */
-add_task(function* test_reject_resolved_promise() {
- let def = PromiseUtils.defer();
- let p = new Promise((resolve, reject) => resolve("This resolved"));
- def.reject(p);
- yield Assert.rejects(def.promise, Promise, "Rejection with a resolved promise uses the passed promise itself as the reason of rejection");
-});
-
-/* Test for the case when a rejected Promise is
- * passed to the reject method */
-add_task(function* test_reject_resolved_promise() {
- PromiseTestUtils.expectUncaughtRejection(/This one rejects/);
- let def = PromiseUtils.defer();
- let p = new Promise((resolve, reject) => reject(new Error("This one rejects")));
- def.reject(p);
- yield Assert.rejects(def.promise, Promise, "Rejection with a rejected promise uses the passed promise itself as the reason of rejection");
-});
diff --git a/toolkit/modules/tests/xpcshell/test_Services.js b/toolkit/modules/tests/xpcshell/test_Services.js
deleted file mode 100644
index a50ecca3da..0000000000
--- a/toolkit/modules/tests/xpcshell/test_Services.js
+++ /dev/null
@@ -1,90 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * This file tests the Services.jsm module.
- */
-
-// Globals
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-var Cr = Components.results;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-
-function checkService(service, interface) {
- do_print("Checking that Services." + service + " is an " + interface);
- do_check_true(service in Services);
- do_check_true(Services[service] instanceof interface);
-}
-
-// Tests
-
-function run_test()
-{
- do_get_profile();
-
- checkService("appShell", Ci.nsIAppShellService);
- checkService("appinfo", Ci.nsIXULRuntime);
- checkService("blocklist", Ci.nsIBlocklistService);
- checkService("cache", Ci.nsICacheService);
- checkService("cache2", Ci.nsICacheStorageService);
- checkService("clipboard", Ci.nsIClipboard);
- checkService("console", Ci.nsIConsoleService);
- checkService("contentPrefs", Ci.nsIContentPrefService);
- checkService("cookies", Ci.nsICookieManager2);
- checkService("dirsvc", Ci.nsIDirectoryService);
- checkService("dirsvc", Ci.nsIProperties);
- checkService("DOMRequest", Ci.nsIDOMRequestService);
- checkService("domStorageManager", Ci.nsIDOMStorageManager);
- checkService("downloads", Ci.nsIDownloadManager);
- checkService("droppedLinkHandler", Ci.nsIDroppedLinkHandler);
- checkService("eTLD", Ci.nsIEffectiveTLDService);
- checkService("focus", Ci.nsIFocusManager);
- checkService("io", Ci.nsIIOService);
- checkService("io", Ci.nsIIOService2);
- checkService("locale", Ci.nsILocaleService);
- checkService("logins", Ci.nsILoginManager);
- checkService("obs", Ci.nsIObserverService);
- checkService("perms", Ci.nsIPermissionManager);
- checkService("prefs", Ci.nsIPrefBranch);
- checkService("prefs", Ci.nsIPrefService);
- checkService("prompt", Ci.nsIPromptService);
- checkService("scriptSecurityManager", Ci.nsIScriptSecurityManager);
- checkService("scriptloader", Ci.mozIJSSubScriptLoader);
- checkService("startup", Ci.nsIAppStartup);
- checkService("storage", Ci.mozIStorageService);
- checkService("strings", Ci.nsIStringBundleService);
- checkService("sysinfo", Ci.nsIPropertyBag2);
- checkService("telemetry", Ci.nsITelemetry);
- checkService("tm", Ci.nsIThreadManager);
- checkService("uriFixup", Ci.nsIURIFixup);
- checkService("urlFormatter", Ci.nsIURLFormatter);
- checkService("vc", Ci.nsIVersionComparator);
- checkService("wm", Ci.nsIWindowMediator);
- checkService("ww", Ci.nsIWindowWatcher);
- if ("nsIBrowserSearchService" in Ci) {
- checkService("search", Ci.nsIBrowserSearchService);
- }
- if ("nsIAndroidBridge" in Ci) {
- checkService("androidBridge", Ci.nsIAndroidBridge);
- }
-
- // In xpcshell tests, the "@mozilla.org/xre/app-info;1" component implements
- // only the nsIXULRuntime interface, but not nsIXULAppInfo. To test the
- // service getter for the latter interface, load mock app-info.
- let tmp = {};
- Cu.import("resource://testing-common/AppInfo.jsm", tmp);
- tmp.updateAppInfo();
-
- // We need to reload the module to update the lazy getter.
- Cu.unload("resource://gre/modules/Services.jsm");
- Cu.import("resource://gre/modules/Services.jsm");
-
- checkService("appinfo", Ci.nsIXULAppInfo);
-
- Cu.unload("resource://gre/modules/Services.jsm");
-}
diff --git a/toolkit/modules/tests/xpcshell/test_UpdateUtils_updatechannel.js b/toolkit/modules/tests/xpcshell/test_UpdateUtils_updatechannel.js
deleted file mode 100644
index 75d7a19928..0000000000
--- a/toolkit/modules/tests/xpcshell/test_UpdateUtils_updatechannel.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var { utils: Cu } = Components;
-
-Cu.import("resource://gre/modules/Preferences.jsm");
-Cu.import("resource://gre/modules/UpdateUtils.jsm");
-
-const PREF_APP_UPDATE_CHANNEL = "app.update.channel";
-const TEST_CHANNEL = "TestChannel";
-const PREF_PARTNER_A = "app.partner.test_partner_a";
-const TEST_PARTNER_A = "TestPartnerA";
-const PREF_PARTNER_B = "app.partner.test_partner_b";
-const TEST_PARTNER_B = "TestPartnerB";
-
-add_task(function* test_updatechannel() {
- let defaultPrefs = new Preferences({ defaultBranch: true });
- let currentChannel = defaultPrefs.get(PREF_APP_UPDATE_CHANNEL);
-
- do_check_eq(UpdateUtils.UpdateChannel, currentChannel);
- do_check_eq(UpdateUtils.getUpdateChannel(true), currentChannel);
- do_check_eq(UpdateUtils.getUpdateChannel(false), currentChannel);
-
- defaultPrefs.set(PREF_APP_UPDATE_CHANNEL, TEST_CHANNEL);
- do_check_eq(UpdateUtils.UpdateChannel, TEST_CHANNEL);
- do_check_eq(UpdateUtils.getUpdateChannel(true), TEST_CHANNEL);
- do_check_eq(UpdateUtils.getUpdateChannel(false), TEST_CHANNEL);
-
- defaultPrefs.set(PREF_PARTNER_A, TEST_PARTNER_A);
- defaultPrefs.set(PREF_PARTNER_B, TEST_PARTNER_B);
- do_check_eq(UpdateUtils.UpdateChannel,
- TEST_CHANNEL + "-cck-" + TEST_PARTNER_A + "-" + TEST_PARTNER_B);
- do_check_eq(UpdateUtils.getUpdateChannel(true),
- TEST_CHANNEL + "-cck-" + TEST_PARTNER_A + "-" + TEST_PARTNER_B);
- do_check_eq(UpdateUtils.getUpdateChannel(false), TEST_CHANNEL);
-});
diff --git a/toolkit/modules/tests/xpcshell/test_UpdateUtils_url.js b/toolkit/modules/tests/xpcshell/test_UpdateUtils_url.js
deleted file mode 100644
index da5d868e37..0000000000
--- a/toolkit/modules/tests/xpcshell/test_UpdateUtils_url.js
+++ /dev/null
@@ -1,292 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
-
-Cu.import("resource://gre/modules/UpdateUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/AppConstants.jsm");
-Cu.import("resource://testing-common/AppInfo.jsm");
-Cu.import("resource://gre/modules/ctypes.jsm");
-
-const PREF_APP_UPDATE_CHANNEL = "app.update.channel";
-const PREF_APP_PARTNER_BRANCH = "app.partner.";
-const PREF_DISTRIBUTION_ID = "distribution.id";
-const PREF_DISTRIBUTION_VERSION = "distribution.version";
-
-const URL_PREFIX = "http://localhost/";
-
-const MSG_SHOULD_EQUAL = " should equal the expected value";
-
-updateAppInfo();
-const gAppInfo = getAppInfo();
-const gDefaultPrefBranch = Services.prefs.getDefaultBranch(null);
-
-function setUpdateChannel(aChannel) {
- gDefaultPrefBranch.setCharPref(PREF_APP_UPDATE_CHANNEL, aChannel);
-}
-
-function getServicePack() {
- // NOTE: This function is a helper function and not a test. Thus,
- // it uses throw() instead of do_throw(). Any tests that use this function
- // should catch exceptions thrown in this function and deal with them
- // appropriately (usually by calling do_throw).
- const BYTE = ctypes.uint8_t;
- const WORD = ctypes.uint16_t;
- const DWORD = ctypes.uint32_t;
- const WCHAR = ctypes.char16_t;
- const BOOL = ctypes.int;
-
- // This structure is described at:
- // http://msdn.microsoft.com/en-us/library/ms724833%28v=vs.85%29.aspx
- const SZCSDVERSIONLENGTH = 128;
- const OSVERSIONINFOEXW = new ctypes.StructType('OSVERSIONINFOEXW',
- [
- {dwOSVersionInfoSize: DWORD},
- {dwMajorVersion: DWORD},
- {dwMinorVersion: DWORD},
- {dwBuildNumber: DWORD},
- {dwPlatformId: DWORD},
- {szCSDVersion: ctypes.ArrayType(WCHAR, SZCSDVERSIONLENGTH)},
- {wServicePackMajor: WORD},
- {wServicePackMinor: WORD},
- {wSuiteMask: WORD},
- {wProductType: BYTE},
- {wReserved: BYTE}
- ]);
-
- let kernel32 = ctypes.open("kernel32");
- try {
- let GetVersionEx = kernel32.declare("GetVersionExW",
- ctypes.default_abi,
- BOOL,
- OSVERSIONINFOEXW.ptr);
- let winVer = OSVERSIONINFOEXW();
- winVer.dwOSVersionInfoSize = OSVERSIONINFOEXW.size;
-
- if (0 === GetVersionEx(winVer.address())) {
- // Using "throw" instead of "do_throw" (see NOTE above)
- throw ("Failure in GetVersionEx (returned 0)");
- }
-
- return winVer.wServicePackMajor + "." + winVer.wServicePackMinor;
- } finally {
- kernel32.close();
- }
-}
-
-function getProcArchitecture() {
- // NOTE: This function is a helper function and not a test. Thus,
- // it uses throw() instead of do_throw(). Any tests that use this function
- // should catch exceptions thrown in this function and deal with them
- // appropriately (usually by calling do_throw).
- const WORD = ctypes.uint16_t;
- const DWORD = ctypes.uint32_t;
-
- // This structure is described at:
- // http://msdn.microsoft.com/en-us/library/ms724958%28v=vs.85%29.aspx
- const SYSTEM_INFO = new ctypes.StructType('SYSTEM_INFO',
- [
- {wProcessorArchitecture: WORD},
- {wReserved: WORD},
- {dwPageSize: DWORD},
- {lpMinimumApplicationAddress: ctypes.voidptr_t},
- {lpMaximumApplicationAddress: ctypes.voidptr_t},
- {dwActiveProcessorMask: DWORD.ptr},
- {dwNumberOfProcessors: DWORD},
- {dwProcessorType: DWORD},
- {dwAllocationGranularity: DWORD},
- {wProcessorLevel: WORD},
- {wProcessorRevision: WORD}
- ]);
-
- let kernel32 = ctypes.open("kernel32");
- try {
- let GetNativeSystemInfo = kernel32.declare("GetNativeSystemInfo",
- ctypes.default_abi,
- ctypes.void_t,
- SYSTEM_INFO.ptr);
- let sysInfo = SYSTEM_INFO();
- // Default to unknown
- sysInfo.wProcessorArchitecture = 0xffff;
-
- GetNativeSystemInfo(sysInfo.address());
- switch (sysInfo.wProcessorArchitecture) {
- case 9:
- return "x64";
- case 6:
- return "IA64";
- case 0:
- return "x86";
- default:
- // Using "throw" instead of "do_throw" (see NOTE above)
- throw ("Unknown architecture returned from GetNativeSystemInfo: " + sysInfo.wProcessorArchitecture);
- }
- } finally {
- kernel32.close();
- }
-}
-
-// Helper function for formatting a url and getting the result we're
-// interested in
-function getResult(url) {
- url = UpdateUtils.formatUpdateURL(url);
- return url.substr(URL_PREFIX.length).split("/")[0];
-}
-
-// url constructed with %PRODUCT%
-add_task(function* test_product() {
- let url = URL_PREFIX + "%PRODUCT%/";
- Assert.equal(getResult(url), gAppInfo.name,
- "the url param for %PRODUCT%" + MSG_SHOULD_EQUAL);
-});
-
-// url constructed with %VERSION%
-add_task(function* test_version() {
- let url = URL_PREFIX + "%VERSION%/";
- Assert.equal(getResult(url), gAppInfo.version,
- "the url param for %VERSION%" + MSG_SHOULD_EQUAL);
-});
-
-// url constructed with %BUILD_ID%
-add_task(function* test_build_id() {
- let url = URL_PREFIX + "%BUILD_ID%/";
- Assert.equal(getResult(url), gAppInfo.appBuildID,
- "the url param for %BUILD_ID%" + MSG_SHOULD_EQUAL);
-});
-
-// url constructed with %BUILD_TARGET%
-// XXX TODO - it might be nice if we tested the actual ABI
-add_task(function* test_build_target() {
- let url = URL_PREFIX + "%BUILD_TARGET%/";
-
- let abi;
- try {
- abi = gAppInfo.XPCOMABI;
- } catch (e) {
- do_throw("nsIXULAppInfo:XPCOMABI not defined\n");
- }
-
- if (AppConstants.platform == "macosx") {
- // Mac universal build should report a different ABI than either macppc
- // or mactel. This is necessary since nsUpdateService.js will set the ABI to
- // Universal-gcc3 for Mac universal builds.
- let macutils = Cc["@mozilla.org/xpcom/mac-utils;1"].
- getService(Ci.nsIMacUtils);
-
- if (macutils.isUniversalBinary) {
- abi += "-u-" + macutils.architecturesInBinary;
- }
- } else if (AppConstants.platform == "win") {
- // Windows build should report the CPU architecture that it's running on.
- abi += "-" + getProcArchitecture();
- }
-
- Assert.equal(getResult(url), gAppInfo.OS + "_" + abi,
- "the url param for %BUILD_TARGET%" + MSG_SHOULD_EQUAL);
-});
-
-// url constructed with %LOCALE%
-// Bug 488936 added the update.locale file that stores the update locale
-add_task(function* test_locale() {
- // The code that gets the locale accesses the profile which is only available
- // after calling do_get_profile in xpcshell tests. This prevents an error from
- // being logged.
- do_get_profile();
-
- let url = URL_PREFIX + "%LOCALE%/";
- Assert.equal(getResult(url), AppConstants.INSTALL_LOCALE,
- "the url param for %LOCALE%" + MSG_SHOULD_EQUAL);
-});
-
-// url constructed with %CHANNEL%
-add_task(function* test_channel() {
- let url = URL_PREFIX + "%CHANNEL%/";
- setUpdateChannel("test_channel");
- Assert.equal(getResult(url), "test_channel",
- "the url param for %CHANNEL%" + MSG_SHOULD_EQUAL);
-});
-
-// url constructed with %CHANNEL% with distribution partners
-add_task(function* test_channel_distribution() {
- let url = URL_PREFIX + "%CHANNEL%/";
- gDefaultPrefBranch.setCharPref(PREF_APP_PARTNER_BRANCH + "test_partner1",
- "test_partner1");
- gDefaultPrefBranch.setCharPref(PREF_APP_PARTNER_BRANCH + "test_partner2",
- "test_partner2");
- Assert.equal(getResult(url),
- "test_channel-cck-test_partner1-test_partner2",
- "the url param for %CHANNEL%" + MSG_SHOULD_EQUAL);
-});
-
-// url constructed with %PLATFORM_VERSION%
-add_task(function* test_platform_version() {
- let url = URL_PREFIX + "%PLATFORM_VERSION%/";
- Assert.equal(getResult(url), gAppInfo.platformVersion,
- "the url param for %PLATFORM_VERSION%" + MSG_SHOULD_EQUAL);
-});
-
-// url constructed with %OS_VERSION%
-add_task(function* test_os_version() {
- let url = URL_PREFIX + "%OS_VERSION%/";
- let osVersion;
- let sysInfo = Cc["@mozilla.org/system-info;1"].getService(Ci.nsIPropertyBag2);
- osVersion = sysInfo.getProperty("name") + " " + sysInfo.getProperty("version");
-
- if (AppConstants.platform == "win") {
- try {
- let servicePack = getServicePack();
- osVersion += "." + servicePack;
- } catch (e) {
- do_throw("Failure obtaining service pack: " + e);
- }
-
- if ("5.0" === sysInfo.getProperty("version")) { // Win2K
- osVersion += " (unknown)";
- } else {
- try {
- osVersion += " (" + getProcArchitecture() + ")";
- } catch (e) {
- do_throw("Failed to obtain processor architecture: " + e);
- }
- }
- }
-
- if (osVersion) {
- try {
- osVersion += " (" + sysInfo.getProperty("secondaryLibrary") + ")";
- } catch (e) {
- // Not all platforms have a secondary widget library, so an error is
- // nothing to worry about.
- }
- osVersion = encodeURIComponent(osVersion);
- }
-
- Assert.equal(getResult(url), osVersion,
- "the url param for %OS_VERSION%" + MSG_SHOULD_EQUAL);
-});
-
-// url constructed with %DISTRIBUTION%
-add_task(function* test_distribution() {
- let url = URL_PREFIX + "%DISTRIBUTION%/";
- gDefaultPrefBranch.setCharPref(PREF_DISTRIBUTION_ID, "test_distro");
- Assert.equal(getResult(url), "test_distro",
- "the url param for %DISTRIBUTION%" + MSG_SHOULD_EQUAL);
-});
-
-// url constructed with %DISTRIBUTION_VERSION%
-add_task(function* test_distribution_version() {
- let url = URL_PREFIX + "%DISTRIBUTION_VERSION%/";
- gDefaultPrefBranch.setCharPref(PREF_DISTRIBUTION_VERSION, "test_distro_version");
- Assert.equal(getResult(url), "test_distro_version",
- "the url param for %DISTRIBUTION_VERSION%" + MSG_SHOULD_EQUAL);
-});
-
-add_task(function* test_custom() {
- Services.prefs.setCharPref("app.update.custom", "custom");
- let url = URL_PREFIX + "%CUSTOM%/";
- Assert.equal(getResult(url), "custom",
- "the url query string for %CUSTOM%" + MSG_SHOULD_EQUAL);
-});
diff --git a/toolkit/modules/tests/xpcshell/test_ZipUtils.js b/toolkit/modules/tests/xpcshell/test_ZipUtils.js
deleted file mode 100644
index 71c6884d46..0000000000
--- a/toolkit/modules/tests/xpcshell/test_ZipUtils.js
+++ /dev/null
@@ -1,79 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-const ARCHIVE = "zips/zen.zip";
-const SUBDIR = "zen";
-const SYMLINK = "beyond_link";
-const ENTRIES = ["beyond.txt", SYMLINK, "waterwood.txt"];
-
-Components.utils.import("resource://gre/modules/ZipUtils.jsm");
-Components.utils.import("resource://gre/modules/FileUtils.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-const archive = do_get_file(ARCHIVE, false);
-const dir = do_get_profile().clone();
-dir.append("test_ZipUtils");
-
-function run_test() {
- run_next_test();
-}
-
-function ensureExtracted(target) {
- target.append(SUBDIR);
- do_check_true(target.exists());
-
- for (let i = 0; i < ENTRIES.length; i++) {
- let entry = target.clone();
- entry.append(ENTRIES[i]);
- do_print("ENTRY " + entry.path);
- do_check_true(entry.exists());
- }
-}
-
-function ensureHasSymlink(target) {
- // Just bail out if running on Windows, since symlinks do not exists there.
- if (Services.appinfo.OS === "WINNT") {
- return;
- }
-
- let entry = target.clone();
- entry.append(SYMLINK);
-
- do_print("ENTRY " + entry.path);
- do_check_true(entry.exists());
- do_check_true(entry.isSymlink());
-}
-
-add_task(function test_extractFiles() {
- let target = dir.clone();
- target.append("test_extractFiles");
-
- try {
- ZipUtils.extractFiles(archive, target);
- } catch (e) {
- do_throw("Failed to extract synchronously!");
- }
-
- ensureExtracted(target);
- ensureHasSymlink(target);
-});
-
-add_task(function* test_extractFilesAsync() {
- let target = dir.clone();
- target.append("test_extractFilesAsync");
- target.create(Components.interfaces.nsIFile.DIRECTORY_TYPE,
- FileUtils.PERMS_DIRECTORY);
-
- yield ZipUtils.extractFilesAsync(archive, target).then(
- function success() {
- do_print("SUCCESS");
- ensureExtracted(target);
- },
- function failure() {
- do_print("FAILURE");
- do_throw("Failed to extract asynchronously!");
- }
- );
-});
diff --git a/toolkit/modules/tests/xpcshell/test_client_id.js b/toolkit/modules/tests/xpcshell/test_client_id.js
deleted file mode 100644
index 10ef2a3eaf..0000000000
--- a/toolkit/modules/tests/xpcshell/test_client_id.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
-
-Cu.import("resource://gre/modules/ClientID.jsm");
-Cu.import("resource://gre/modules/Task.jsm");
-Cu.import("resource://services-common/utils.js");
-Cu.import("resource://gre/modules/osfile.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Preferences.jsm");
-
-function run_test() {
- do_get_profile();
- run_next_test();
-}
-
-add_task(function* () {
- const drsPath = OS.Path.join(OS.Constants.Path.profileDir, "datareporting", "state.json");
- const fhrDir = OS.Path.join(OS.Constants.Path.profileDir, "healthreport");
- const fhrPath = OS.Path.join(fhrDir, "state.json");
- const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
- const invalidIDs = [-1, 0.5, "INVALID-UUID", true, "", "3d1e1560-682a-4043-8cf2-aaaaaaaaaaaZ"];
- const PREF_CACHED_CLIENTID = "toolkit.telemetry.cachedClientID";
-
- yield OS.File.makeDir(fhrDir);
-
- // Check that we are importing the FHR client ID.
- let clientID = CommonUtils.generateUUID();
- yield CommonUtils.writeJSON({clientID: clientID}, fhrPath);
- Assert.equal(clientID, yield ClientID.getClientID());
-
- // We should persist the ID in DRS now and not pick up a differing ID from FHR.
- yield ClientID._reset();
- yield CommonUtils.writeJSON({clientID: CommonUtils.generateUUID()}, fhrPath);
- Assert.equal(clientID, yield ClientID.getClientID());
-
- // We should be guarded against broken FHR data.
- for (let invalidID of invalidIDs) {
- yield ClientID._reset();
- yield OS.File.remove(drsPath);
- yield CommonUtils.writeJSON({clientID: invalidID}, fhrPath);
- clientID = yield ClientID.getClientID();
- Assert.equal(typeof(clientID), 'string');
- Assert.ok(uuidRegex.test(clientID));
- }
-
- // We should be guarded against invalid FHR json.
- yield ClientID._reset();
- yield OS.File.remove(drsPath);
- yield OS.File.writeAtomic(fhrPath, "abcd", {encoding: "utf-8", tmpPath: fhrPath + ".tmp"});
- clientID = yield ClientID.getClientID();
- Assert.equal(typeof(clientID), 'string');
- Assert.ok(uuidRegex.test(clientID));
-
- // We should be guarded against broken DRS data too and fall back to loading
- // the FHR ID.
- for (let invalidID of invalidIDs) {
- yield ClientID._reset();
- clientID = CommonUtils.generateUUID();
- yield CommonUtils.writeJSON({clientID: clientID}, fhrPath);
- yield CommonUtils.writeJSON({clientID: invalidID}, drsPath);
- Assert.equal(clientID, yield ClientID.getClientID());
- }
-
- // We should be guarded against invalid DRS json too.
- yield ClientID._reset();
- yield OS.File.remove(fhrPath);
- yield OS.File.writeAtomic(drsPath, "abcd", {encoding: "utf-8", tmpPath: drsPath + ".tmp"});
- clientID = yield ClientID.getClientID();
- Assert.equal(typeof(clientID), 'string');
- Assert.ok(uuidRegex.test(clientID));
-
- // If both the FHR and DSR data are broken, we should end up with a new client ID.
- for (let invalidID of invalidIDs) {
- yield ClientID._reset();
- yield CommonUtils.writeJSON({clientID: invalidID}, fhrPath);
- yield CommonUtils.writeJSON({clientID: invalidID}, drsPath);
- clientID = yield ClientID.getClientID();
- Assert.equal(typeof(clientID), 'string');
- Assert.ok(uuidRegex.test(clientID));
- }
-
- // Assure that cached IDs are being checked for validity.
- for (let invalidID of invalidIDs) {
- yield ClientID._reset();
- Preferences.set(PREF_CACHED_CLIENTID, invalidID);
- let cachedID = ClientID.getCachedClientID();
- Assert.strictEqual(cachedID, null, "ClientID should ignore invalid cached IDs");
- let prefID = Preferences.get(PREF_CACHED_CLIENTID, null);
- Assert.strictEqual(prefID, null, "ClientID should reset invalid cached IDs");
- }
-});
diff --git a/toolkit/modules/tests/xpcshell/test_jsesc.js b/toolkit/modules/tests/xpcshell/test_jsesc.js
deleted file mode 100644
index 0c6cbba690..0000000000
--- a/toolkit/modules/tests/xpcshell/test_jsesc.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-Components.utils.import("resource://gre/modules/third_party/jsesc/jsesc.js");
-
-function run_test() {
- do_check_eq(jsesc("teééést", {lowercaseHex: true}), "te\\xe9\\xe9\\xe9st");
- do_check_eq(jsesc("teééést", {lowercaseHex: false}), "te\\xE9\\xE9\\xE9st");
-}
diff --git a/toolkit/modules/tests/xpcshell/test_propertyListsUtils.js b/toolkit/modules/tests/xpcshell/test_propertyListsUtils.js
deleted file mode 100644
index 9ccf50b739..0000000000
--- a/toolkit/modules/tests/xpcshell/test_propertyListsUtils.js
+++ /dev/null
@@ -1,106 +0,0 @@
-/* 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/. */
-"use strict";
-
-Components.utils.import("resource://gre/modules/PropertyListUtils.jsm");
-
-function checkValue(aPropertyListObject, aType, aValue) {
- do_check_eq(PropertyListUtils.getObjectType(aPropertyListObject), aType);
- if (aValue !== undefined) {
- // Perform strict equality checks until Bug 714467 is fixed.
- let strictEqualityCheck = function(a, b) {
- do_check_eq(typeof(a), typeof(b));
- do_check_eq(a, b);
- };
-
- if (typeof(aPropertyListObject) == "object")
- strictEqualityCheck(aPropertyListObject.valueOf(), aValue.valueOf());
- else
- strictEqualityCheck(aPropertyListObject, aValue);
- }
-}
-
-function checkLazyGetterValue(aObject, aPropertyName, aType, aValue) {
- let descriptor = Object.getOwnPropertyDescriptor(aObject, aPropertyName);
- do_check_eq(typeof(descriptor.get), "function");
- do_check_eq(typeof(descriptor.value), "undefined");
- checkValue(aObject[aPropertyName], aType, aValue);
- descriptor = Object.getOwnPropertyDescriptor(aObject, aPropertyName);
- do_check_eq(typeof(descriptor.get), "undefined");
- do_check_neq(typeof(descriptor.value), "undefined");
-}
-
-function checkMainPropertyList(aPropertyListRoot) {
- const PRIMITIVE = PropertyListUtils.TYPE_PRIMITIVE;
-
- checkValue(aPropertyListRoot, PropertyListUtils.TYPE_DICTIONARY);
-
- // Check .has()
- Assert.ok(aPropertyListRoot.has("Boolean"));
- Assert.ok(!aPropertyListRoot.has("Nonexistent"));
-
- checkValue(aPropertyListRoot.get("Boolean"), PRIMITIVE, false);
-
- let array = aPropertyListRoot.get("Array");
- checkValue(array, PropertyListUtils.TYPE_ARRAY);
- do_check_eq(array.length, 8);
-
- // Test both long and short values, since binary property lists store
- // long values a little bit differently (see readDataLengthAndOffset).
-
- // Short ASCII string
- checkLazyGetterValue(array, 0, PRIMITIVE, "abc");
- // Long ASCII string
- checkLazyGetterValue(array, 1, PRIMITIVE, new Array(1001).join("a"));
- // Short unicode string
- checkLazyGetterValue(array, 2, PRIMITIVE, "\u05D0\u05D0\u05D0");
- // Long unicode string
- checkLazyGetterValue(array, 3, PRIMITIVE, new Array(1001).join("\u05D0"));
- // Unicode surrogate pair
- checkLazyGetterValue(array, 4, PRIMITIVE,
- "\uD800\uDC00\uD800\uDC00\uD800\uDC00");
-
- // Date
- checkLazyGetterValue(array, 5, PropertyListUtils.TYPE_DATE,
- new Date("2011-12-31T11:15:23Z"));
-
- // Data
- checkLazyGetterValue(array, 6, PropertyListUtils.TYPE_UINT8_ARRAY);
- let dataAsString = Array.from(array[6]).map(b => String.fromCharCode(b)).join("");
- do_check_eq(dataAsString, "2011-12-31T11:15:33Z");
-
- // Dict
- let dict = array[7];
- checkValue(dict, PropertyListUtils.TYPE_DICTIONARY);
- checkValue(dict.get("Negative Number"), PRIMITIVE, -400);
- checkValue(dict.get("Real Number"), PRIMITIVE, 2.71828183);
- checkValue(dict.get("Big Int"),
- PropertyListUtils.TYPE_INT64,
- "9007199254740993");
- checkValue(dict.get("Negative Big Int"),
- PropertyListUtils.TYPE_INT64,
- "-9007199254740993");
-}
-
-function readPropertyList(aFile, aCallback) {
- PropertyListUtils.read(aFile, function(aPropertyListRoot) {
- // Null root indicates failure to read property list.
- // Note: It is important not to run do_check_n/eq directly on Dict and array
- // objects, because it cases their toString to get invoked, doing away with
- // all the lazy getter we'd like to test later.
- do_check_true(aPropertyListRoot !== null);
- aCallback(aPropertyListRoot);
- run_next_test();
- });
-}
-
-function run_test() {
- add_test(readPropertyList.bind(this,
- do_get_file("propertyLists/bug710259_propertyListBinary.plist", false),
- checkMainPropertyList));
- add_test(readPropertyList.bind(this,
- do_get_file("propertyLists/bug710259_propertyListXML.plist", false),
- checkMainPropertyList));
- run_next_test();
-}
diff --git a/toolkit/modules/tests/xpcshell/test_readCertPrefs.js b/toolkit/modules/tests/xpcshell/test_readCertPrefs.js
deleted file mode 100644
index 837a9912a0..0000000000
--- a/toolkit/modules/tests/xpcshell/test_readCertPrefs.js
+++ /dev/null
@@ -1,97 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/CertUtils.jsm");
-
-const PREF_PREFIX = "certutils.certs.";
-
-function run_test() {
- run_next_test();
-}
-
-function resetPrefs() {
- var prefs = Services.prefs.getChildList(PREF_PREFIX);
- prefs.forEach(Services.prefs.clearUserPref);
-}
-
-function attributes_match(aCert, aExpected) {
- if (Object.keys(aCert).length != Object.keys(aExpected).length)
- return false;
-
- for (var attribute in aCert) {
- if (!(attribute in aExpected))
- return false;
- if (aCert[attribute] != aExpected[attribute])
- return false;
- }
-
- return true;
-}
-
-function test_results(aCerts, aExpected) {
- do_check_eq(aCerts.length, aExpected.length);
-
- for (var i = 0; i < aCerts.length; i++) {
- if (!attributes_match(aCerts[i], aExpected[i])) {
- dump("Attributes for certificate " + (i + 1) + " did not match expected attributes\n");
- dump("Saw: " + aCerts[i].toSource() + "\n");
- dump("Expected: " + aExpected[i].toSource() + "\n");
- do_check_true(false);
- }
- }
-}
-
-add_test(function test_singleCert() {
- Services.prefs.setCharPref(PREF_PREFIX + "1.attribute1", "foo");
- Services.prefs.setCharPref(PREF_PREFIX + "1.attribute2", "bar");
-
- var certs = readCertPrefs(PREF_PREFIX);
- test_results(certs, [{
- attribute1: "foo",
- attribute2: "bar"
- }]);
-
- resetPrefs();
- run_next_test();
-});
-
-add_test(function test_multipleCert() {
- Services.prefs.setCharPref(PREF_PREFIX + "1.md5Fingerprint", "cf84a9a2a804e021f27cb5128fe151f4");
- Services.prefs.setCharPref(PREF_PREFIX + "1.nickname", "1st cert");
- Services.prefs.setCharPref(PREF_PREFIX + "2.md5Fingerprint", "9441051b7eb50e5ca2226095af710c1a");
- Services.prefs.setCharPref(PREF_PREFIX + "2.nickname", "2nd cert");
-
- var certs = readCertPrefs(PREF_PREFIX);
- test_results(certs, [{
- md5Fingerprint: "cf84a9a2a804e021f27cb5128fe151f4",
- nickname: "1st cert"
- }, {
- md5Fingerprint: "9441051b7eb50e5ca2226095af710c1a",
- nickname: "2nd cert"
- }]);
-
- resetPrefs();
- run_next_test();
-});
-
-add_test(function test_skippedCert() {
- Services.prefs.setCharPref(PREF_PREFIX + "1.issuerName", "Mozilla");
- Services.prefs.setCharPref(PREF_PREFIX + "1.nickname", "1st cert");
- Services.prefs.setCharPref(PREF_PREFIX + "2.issuerName", "Top CA");
- Services.prefs.setCharPref(PREF_PREFIX + "2.nickname", "2nd cert");
- Services.prefs.setCharPref(PREF_PREFIX + "4.issuerName", "Unknown CA");
- Services.prefs.setCharPref(PREF_PREFIX + "4.nickname", "Ignored cert");
-
- var certs = readCertPrefs(PREF_PREFIX);
- test_results(certs, [{
- issuerName: "Mozilla",
- nickname: "1st cert"
- }, {
- issuerName: "Top CA",
- nickname: "2nd cert"
- }]);
-
- resetPrefs();
- run_next_test();
-});
diff --git a/toolkit/modules/tests/xpcshell/test_servicerequest_xhr.js b/toolkit/modules/tests/xpcshell/test_servicerequest_xhr.js
deleted file mode 100644
index b3c8a443ed..0000000000
--- a/toolkit/modules/tests/xpcshell/test_servicerequest_xhr.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
-
-Cu.import("resource://gre/modules/ServiceRequest.jsm");
-
-add_task(function* test_tls_conservative() {
- const request = new ServiceRequest();
- request.open("GET", "http://example.com", false);
-
- const sr_channel = request.channel.QueryInterface(Ci.nsIHttpChannelInternal);
- ok(("beConservative" in sr_channel), "TLS setting is present in SR channel");
- ok(sr_channel.beConservative, "TLS setting in request channel is set to conservative for SR");
-
- const xhr = new XMLHttpRequest();
- xhr.open("GET", "http://example.com", false);
-
- const xhr_channel = xhr.channel.QueryInterface(Ci.nsIHttpChannelInternal);
- ok(("beConservative" in xhr_channel), "TLS setting is present in XHR channel");
- ok(!xhr_channel.beConservative, "TLS setting in request channel is not set to conservative for XHR");
-
-});
diff --git a/toolkit/modules/tests/xpcshell/test_session_recorder.js b/toolkit/modules/tests/xpcshell/test_session_recorder.js
deleted file mode 100644
index dd9159c6e8..0000000000
--- a/toolkit/modules/tests/xpcshell/test_session_recorder.js
+++ /dev/null
@@ -1,306 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-var {utils: Cu} = Components;
-
-Cu.import("resource://gre/modules/Promise.jsm");
-Cu.import("resource://gre/modules/SessionRecorder.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://services-common/utils.js");
-
-
-function run_test() {
- run_next_test();
-}
-
-function monkeypatchStartupInfo(recorder, start=new Date(), offset=500) {
- Object.defineProperty(recorder, "_getStartupInfo", {
- value: function _getStartupInfo() {
- return {
- process: start,
- main: new Date(start.getTime() + offset),
- firstPaint: new Date(start.getTime() + 2 * offset),
- sessionRestored: new Date(start.getTime() + 3 * offset),
- };
- }
- });
-}
-
-function sleep(wait) {
- let deferred = Promise.defer();
-
- let timer = CommonUtils.namedTimer(function onTimer() {
- deferred.resolve();
- }, wait, deferred.promise, "_sleepTimer");
-
- return deferred.promise;
-}
-
-function getRecorder(name, start, offset) {
- let recorder = new SessionRecorder("testing." + name + ".");
- monkeypatchStartupInfo(recorder, start, offset);
-
- return recorder;
-}
-
-add_test(function test_basic() {
- let recorder = getRecorder("basic");
- recorder.onStartup();
- recorder.onShutdown();
-
- run_next_test();
-});
-
-add_task(function* test_current_properties() {
- let now = new Date();
- let recorder = getRecorder("current_properties", now);
- yield sleep(25);
- recorder.onStartup();
-
- do_check_eq(recorder.startDate.getTime(), now.getTime());
- do_check_eq(recorder.activeTicks, 0);
- do_check_true(recorder.fineTotalTime > 0);
- do_check_eq(recorder.main, 500);
- do_check_eq(recorder.firstPaint, 1000);
- do_check_eq(recorder.sessionRestored, 1500);
-
- recorder.incrementActiveTicks();
- do_check_eq(recorder.activeTicks, 1);
-
- recorder._startDate = new Date(Date.now() - 1000);
- recorder.updateTotalTime();
- do_check_eq(recorder.totalTime, 1);
-
- recorder.onShutdown();
-});
-
-// If startup info isn't present yet, we should install a timer and get
-// it eventually.
-add_task(function* test_current_availability() {
- let recorder = new SessionRecorder("testing.current_availability.");
- let now = new Date();
-
- Object.defineProperty(recorder, "_getStartupInfo", {
- value: function _getStartupInfo() {
- return {
- process: now,
- main: new Date(now.getTime() + 500),
- firstPaint: new Date(now.getTime() + 1000),
- };
- },
- writable: true,
- });
-
- Object.defineProperty(recorder, "STARTUP_RETRY_INTERVAL_MS", {
- value: 100,
- });
-
- let oldRecord = recorder.recordStartupFields;
- let recordCount = 0;
-
- Object.defineProperty(recorder, "recordStartupFields", {
- value: function () {
- recordCount++;
- return oldRecord.call(recorder);
- }
- });
-
- do_check_null(recorder._timer);
- recorder.onStartup();
- do_check_eq(recordCount, 1);
- do_check_eq(recorder.sessionRestored, -1);
- do_check_neq(recorder._timer, null);
-
- yield sleep(125);
- do_check_eq(recordCount, 2);
- yield sleep(100);
- do_check_eq(recordCount, 3);
- do_check_eq(recorder.sessionRestored, -1);
-
- monkeypatchStartupInfo(recorder, now);
- yield sleep(100);
- do_check_eq(recordCount, 4);
- do_check_eq(recorder.sessionRestored, 1500);
-
- // The timer should be removed and we should not fire again.
- do_check_null(recorder._timer);
- yield sleep(100);
- do_check_eq(recordCount, 4);
-
- recorder.onShutdown();
-});
-
-add_test(function test_timer_clear_on_shutdown() {
- let recorder = new SessionRecorder("testing.timer_clear_on_shutdown.");
- let now = new Date();
-
- Object.defineProperty(recorder, "_getStartupInfo", {
- value: function _getStartupInfo() {
- return {
- process: now,
- main: new Date(now.getTime() + 500),
- firstPaint: new Date(now.getTime() + 1000),
- };
- },
- });
-
- do_check_null(recorder._timer);
- recorder.onStartup();
- do_check_neq(recorder._timer, null);
-
- recorder.onShutdown();
- do_check_null(recorder._timer);
-
- run_next_test();
-});
-
-add_task(function* test_previous_clean() {
- let now = new Date();
- let recorder = getRecorder("previous_clean", now);
- yield sleep(25);
- recorder.onStartup();
-
- recorder.incrementActiveTicks();
- recorder.incrementActiveTicks();
-
- yield sleep(25);
- recorder.onShutdown();
-
- let total = recorder.totalTime;
-
- yield sleep(25);
- let now2 = new Date();
- let recorder2 = getRecorder("previous_clean", now2, 100);
- yield sleep(25);
- recorder2.onStartup();
-
- do_check_eq(recorder2.startDate.getTime(), now2.getTime());
- do_check_eq(recorder2.main, 100);
- do_check_eq(recorder2.firstPaint, 200);
- do_check_eq(recorder2.sessionRestored, 300);
-
- let sessions = recorder2.getPreviousSessions();
- do_check_eq(Object.keys(sessions).length, 1);
- do_check_true(0 in sessions);
- let session = sessions[0];
- do_check_true(session.clean);
- do_check_eq(session.startDate.getTime(), now.getTime());
- do_check_eq(session.main, 500);
- do_check_eq(session.firstPaint, 1000);
- do_check_eq(session.sessionRestored, 1500);
- do_check_eq(session.totalTime, total);
- do_check_eq(session.activeTicks, 2);
-
- recorder2.onShutdown();
-});
-
-add_task(function* test_previous_abort() {
- let now = new Date();
- let recorder = getRecorder("previous_abort", now);
- yield sleep(25);
- recorder.onStartup();
- recorder.incrementActiveTicks();
- yield sleep(25);
- let total = recorder.totalTime;
- yield sleep(25);
-
- let now2 = new Date();
- let recorder2 = getRecorder("previous_abort", now2);
- yield sleep(25);
- recorder2.onStartup();
-
- let sessions = recorder2.getPreviousSessions();
- do_check_eq(Object.keys(sessions).length, 1);
- do_check_true(0 in sessions);
- let session = sessions[0];
- do_check_false(session.clean);
- do_check_eq(session.totalTime, total);
-
- recorder.onShutdown();
- recorder2.onShutdown();
-});
-
-add_task(function* test_multiple_sessions() {
- for (let i = 0; i < 10; i++) {
- let recorder = getRecorder("multiple_sessions");
- yield sleep(25);
- recorder.onStartup();
- for (let j = 0; j < i; j++) {
- recorder.incrementActiveTicks();
- }
- yield sleep(25);
- recorder.onShutdown();
- yield sleep(25);
- }
-
- let recorder = getRecorder("multiple_sessions");
- recorder.onStartup();
-
- let sessions = recorder.getPreviousSessions();
- do_check_eq(Object.keys(sessions).length, 10);
-
- for (let [i, session] of Object.entries(sessions)) {
- do_check_eq(session.activeTicks, i);
-
- if (i > 0) {
- do_check_true(session.startDate.getTime() > sessions[i-1].startDate.getTime());
- }
- }
-
- // #6 is preserved since >=.
- let threshold = sessions[6].startDate;
- recorder.pruneOldSessions(threshold);
-
- sessions = recorder.getPreviousSessions();
- do_check_eq(Object.keys(sessions).length, 4);
-
- recorder.pruneOldSessions(threshold);
- sessions = recorder.getPreviousSessions();
- do_check_eq(Object.keys(sessions).length, 4);
- do_check_eq(recorder._prunedIndex, 5);
-
- recorder.onShutdown();
-});
-
-add_task(function* test_record_activity() {
- let recorder = getRecorder("record_activity");
- yield sleep(25);
- recorder.onStartup();
- let total = recorder.totalTime;
- yield sleep(25);
-
- for (let i = 0; i < 3; i++) {
- Services.obs.notifyObservers(null, "user-interaction-active", null);
- yield sleep(25);
- do_check_true(recorder.fineTotalTime > total);
- total = recorder.fineTotalTime;
- }
-
- do_check_eq(recorder.activeTicks, 3);
-
- // Now send inactive. We should increment total time but not active.
- Services.obs.notifyObservers(null, "user-interaction-inactive", null);
- do_check_eq(recorder.activeTicks, 3);
- do_check_true(recorder.fineTotalTime > total);
- total = recorder.fineTotalTime;
- yield sleep(25);
-
- // If we send active again, this should be counted as inactive.
- Services.obs.notifyObservers(null, "user-interaction-active", null);
- do_check_eq(recorder.activeTicks, 3);
- do_check_true(recorder.fineTotalTime > total);
- total = recorder.fineTotalTime;
- yield sleep(25);
-
- // If we send active again, this should be counted as active.
- Services.obs.notifyObservers(null, "user-interaction-active", null);
- do_check_eq(recorder.activeTicks, 4);
-
- Services.obs.notifyObservers(null, "user-interaction-active", null);
- do_check_eq(recorder.activeTicks, 5);
-
- recorder.onShutdown();
-});
-
diff --git a/toolkit/modules/tests/xpcshell/test_sqlite.js b/toolkit/modules/tests/xpcshell/test_sqlite.js
deleted file mode 100644
index edd39d9770..0000000000
--- a/toolkit/modules/tests/xpcshell/test_sqlite.js
+++ /dev/null
@@ -1,1094 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
-
-do_get_profile();
-
-Cu.import("resource://gre/modules/Promise.jsm");
-Cu.import("resource://gre/modules/PromiseUtils.jsm");
-Cu.import("resource://gre/modules/osfile.jsm");
-Cu.import("resource://gre/modules/FileUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/Sqlite.jsm");
-Cu.import("resource://gre/modules/Task.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-// To spin the event loop in test.
-Cu.import("resource://services-common/async.js");
-
-function sleep(ms) {
- let deferred = Promise.defer();
-
- let timer = Cc["@mozilla.org/timer;1"]
- .createInstance(Ci.nsITimer);
-
- timer.initWithCallback({
- notify: function () {
- deferred.resolve();
- },
- }, ms, timer.TYPE_ONE_SHOT);
-
- return deferred.promise;
-}
-
-// When testing finalization, use this to tell Sqlite.jsm to not throw
-// an uncatchable `Promise.reject`
-function failTestsOnAutoClose(enabled) {
- Cu.getGlobalForObject(Sqlite).Debugging.failTestsOnAutoClose = enabled;
-}
-
-function getConnection(dbName, extraOptions={}) {
- let path = dbName + ".sqlite";
- let options = {path: path};
- for (let [k, v] of Object.entries(extraOptions)) {
- options[k] = v;
- }
-
- return Sqlite.openConnection(options);
-}
-
-function* getDummyDatabase(name, extraOptions={}) {
- const TABLES = {
- dirs: "id INTEGER PRIMARY KEY AUTOINCREMENT, path TEXT",
- files: "id INTEGER PRIMARY KEY AUTOINCREMENT, dir_id INTEGER, path TEXT",
- };
-
- let c = yield getConnection(name, extraOptions);
- c._initialStatementCount = 0;
-
- for (let [k, v] of Object.entries(TABLES)) {
- yield c.execute("CREATE TABLE " + k + "(" + v + ")");
- c._initialStatementCount++;
- }
-
- return c;
-}
-
-function* getDummyTempDatabase(name, extraOptions={}) {
- const TABLES = {
- dirs: "id INTEGER PRIMARY KEY AUTOINCREMENT, path TEXT",
- files: "id INTEGER PRIMARY KEY AUTOINCREMENT, dir_id INTEGER, path TEXT",
- };
-
- let c = yield getConnection(name, extraOptions);
- c._initialStatementCount = 0;
-
- for (let [k, v] of Object.entries(TABLES)) {
- yield c.execute("CREATE TEMP TABLE " + k + "(" + v + ")");
- c._initialStatementCount++;
- }
-
- return c;
-}
-
-function run_test() {
- Cu.import("resource://testing-common/services/common/logging.js");
- initTestLogging("Trace");
-
- run_next_test();
-}
-
-add_task(function* test_open_normal() {
- let c = yield Sqlite.openConnection({path: "test_open_normal.sqlite"});
- yield c.close();
-});
-
-add_task(function* test_open_unshared() {
- let path = OS.Path.join(OS.Constants.Path.profileDir, "test_open_unshared.sqlite");
-
- let c = yield Sqlite.openConnection({path: path, sharedMemoryCache: false});
- yield c.close();
-});
-
-add_task(function* test_get_dummy_database() {
- let db = yield getDummyDatabase("get_dummy_database");
-
- do_check_eq(typeof(db), "object");
- yield db.close();
-});
-
-add_task(function* test_schema_version() {
- let db = yield getDummyDatabase("schema_version");
-
- let version = yield db.getSchemaVersion();
- do_check_eq(version, 0);
-
- db.setSchemaVersion(14);
- version = yield db.getSchemaVersion();
- do_check_eq(version, 14);
-
- for (let v of [0.5, "foobar", NaN]) {
- let success;
- try {
- yield db.setSchemaVersion(v);
- do_print("Schema version " + v + " should have been rejected");
- success = false;
- } catch (ex) {
- if (!ex.message.startsWith("Schema version must be an integer."))
- throw ex;
- success = true;
- }
- do_check_true(success);
-
- version = yield db.getSchemaVersion();
- do_check_eq(version, 14);
- }
-
- yield db.close();
-});
-
-add_task(function* test_simple_insert() {
- let c = yield getDummyDatabase("simple_insert");
-
- let result = yield c.execute("INSERT INTO dirs VALUES (NULL, 'foo')");
- do_check_true(Array.isArray(result));
- do_check_eq(result.length, 0);
- yield c.close();
-});
-
-add_task(function* test_simple_bound_array() {
- let c = yield getDummyDatabase("simple_bound_array");
-
- let result = yield c.execute("INSERT INTO dirs VALUES (?, ?)", [1, "foo"]);
- do_check_eq(result.length, 0);
- yield c.close();
-});
-
-add_task(function* test_simple_bound_object() {
- let c = yield getDummyDatabase("simple_bound_object");
- let result = yield c.execute("INSERT INTO dirs VALUES (:id, :path)",
- {id: 1, path: "foo"});
- do_check_eq(result.length, 0);
- result = yield c.execute("SELECT id, path FROM dirs");
- do_check_eq(result.length, 1);
- do_check_eq(result[0].getResultByName("id"), 1);
- do_check_eq(result[0].getResultByName("path"), "foo");
- yield c.close();
-});
-
-// This is mostly a sanity test to ensure simple executions work.
-add_task(function* test_simple_insert_then_select() {
- let c = yield getDummyDatabase("simple_insert_then_select");
-
- yield c.execute("INSERT INTO dirs VALUES (NULL, 'foo')");
- yield c.execute("INSERT INTO dirs (path) VALUES (?)", ["bar"]);
-
- let result = yield c.execute("SELECT * FROM dirs");
- do_check_eq(result.length, 2);
-
- let i = 0;
- for (let row of result) {
- i++;
-
- do_check_eq(row.numEntries, 2);
- do_check_eq(row.getResultByIndex(0), i);
-
- let expected = {1: "foo", 2: "bar"}[i];
- do_check_eq(row.getResultByName("path"), expected);
- }
-
- yield c.close();
-});
-
-add_task(function* test_repeat_execution() {
- let c = yield getDummyDatabase("repeat_execution");
-
- let sql = "INSERT INTO dirs (path) VALUES (:path)";
- yield c.executeCached(sql, {path: "foo"});
- yield c.executeCached(sql);
-
- let result = yield c.execute("SELECT * FROM dirs");
-
- do_check_eq(result.length, 2);
-
- yield c.close();
-});
-
-add_task(function* test_table_exists() {
- let c = yield getDummyDatabase("table_exists");
-
- do_check_false(yield c.tableExists("does_not_exist"));
- do_check_true(yield c.tableExists("dirs"));
- do_check_true(yield c.tableExists("files"));
-
- yield c.close();
-});
-
-add_task(function* test_index_exists() {
- let c = yield getDummyDatabase("index_exists");
-
- do_check_false(yield c.indexExists("does_not_exist"));
-
- yield c.execute("CREATE INDEX my_index ON dirs (path)");
- do_check_true(yield c.indexExists("my_index"));
-
- yield c.close();
-});
-
-add_task(function* test_temp_table_exists() {
- let c = yield getDummyTempDatabase("temp_table_exists");
-
- do_check_false(yield c.tableExists("temp_does_not_exist"));
- do_check_true(yield c.tableExists("dirs"));
- do_check_true(yield c.tableExists("files"));
-
- yield c.close();
-});
-
-add_task(function* test_temp_index_exists() {
- let c = yield getDummyTempDatabase("temp_index_exists");
-
- do_check_false(yield c.indexExists("temp_does_not_exist"));
-
- yield c.execute("CREATE INDEX my_index ON dirs (path)");
- do_check_true(yield c.indexExists("my_index"));
-
- yield c.close();
-});
-
-add_task(function* test_close_cached() {
- let c = yield getDummyDatabase("close_cached");
-
- yield c.executeCached("SELECT * FROM dirs");
- yield c.executeCached("SELECT * FROM files");
-
- yield c.close();
-});
-
-add_task(function* test_execute_invalid_statement() {
- let c = yield getDummyDatabase("invalid_statement");
-
- let deferred = Promise.defer();
-
- do_check_eq(c._connectionData._anonymousStatements.size, 0);
-
- c.execute("SELECT invalid FROM unknown").then(do_throw, function onError(error) {
- deferred.resolve();
- });
-
- yield deferred.promise;
-
- // Ensure we don't leak the statement instance.
- do_check_eq(c._connectionData._anonymousStatements.size, 0);
-
- yield c.close();
-});
-
-add_task(function* test_incorrect_like_bindings() {
- let c = yield getDummyDatabase("incorrect_like_bindings");
-
- let sql = "select * from dirs where path LIKE 'non%'";
- Assert.throws(() => c.execute(sql), /Please enter a LIKE clause/);
- Assert.throws(() => c.executeCached(sql), /Please enter a LIKE clause/);
-
- yield c.close();
-});
-add_task(function* test_on_row_exception_ignored() {
- let c = yield getDummyDatabase("on_row_exception_ignored");
-
- let sql = "INSERT INTO dirs (path) VALUES (?)";
- for (let i = 0; i < 10; i++) {
- yield c.executeCached(sql, ["dir" + i]);
- }
-
- let i = 0;
- let hasResult = yield c.execute("SELECT * FROM DIRS", null, function onRow(row) {
- i++;
-
- throw new Error("Some silly error.");
- });
-
- do_check_eq(hasResult, true);
- do_check_eq(i, 10);
-
- yield c.close();
-});
-
-// Ensure StopIteration during onRow causes processing to stop.
-add_task(function* test_on_row_stop_iteration() {
- let c = yield getDummyDatabase("on_row_stop_iteration");
-
- let sql = "INSERT INTO dirs (path) VALUES (?)";
- for (let i = 0; i < 10; i++) {
- yield c.executeCached(sql, ["dir" + i]);
- }
-
- let i = 0;
- let hasResult = yield c.execute("SELECT * FROM dirs", null, function onRow(row) {
- i++;
-
- if (i == 5) {
- throw StopIteration;
- }
- });
-
- do_check_eq(hasResult, true);
- do_check_eq(i, 5);
-
- yield c.close();
-});
-
-// Ensure execute resolves to false when no rows are selected.
-add_task(function* test_on_row_stop_iteration() {
- let c = yield getDummyDatabase("no_on_row");
-
- let i = 0;
- let hasResult = yield c.execute(`SELECT * FROM dirs WHERE path="nonexistent"`, null, function onRow(row) {
- i++;
- });
-
- do_check_eq(hasResult, false);
- do_check_eq(i, 0);
-
- yield c.close();
-});
-
-add_task(function* test_invalid_transaction_type() {
- let c = yield getDummyDatabase("invalid_transaction_type");
-
- Assert.throws(() => c.executeTransaction(function* () {}, "foobar"),
- /Unknown transaction type/,
- "Unknown transaction type should throw");
-
- yield c.close();
-});
-
-add_task(function* test_execute_transaction_success() {
- let c = yield getDummyDatabase("execute_transaction_success");
-
- do_check_false(c.transactionInProgress);
-
- yield c.executeTransaction(function* transaction(conn) {
- do_check_eq(c, conn);
- do_check_true(conn.transactionInProgress);
-
- yield conn.execute("INSERT INTO dirs (path) VALUES ('foo')");
- });
-
- do_check_false(c.transactionInProgress);
- let rows = yield c.execute("SELECT * FROM dirs");
- do_check_true(Array.isArray(rows));
- do_check_eq(rows.length, 1);
-
- yield c.close();
-});
-
-add_task(function* test_execute_transaction_rollback() {
- let c = yield getDummyDatabase("execute_transaction_rollback");
-
- let deferred = Promise.defer();
-
- c.executeTransaction(function* transaction(conn) {
- yield conn.execute("INSERT INTO dirs (path) VALUES ('foo')");
- print("Expecting error with next statement.");
- yield conn.execute("INSERT INTO invalid VALUES ('foo')");
-
- // We should never get here.
- do_throw();
- }).then(do_throw, function onError(error) {
- deferred.resolve();
- });
-
- yield deferred.promise;
-
- let rows = yield c.execute("SELECT * FROM dirs");
- do_check_eq(rows.length, 0);
-
- yield c.close();
-});
-
-add_task(function* test_close_during_transaction() {
- let c = yield getDummyDatabase("close_during_transaction");
-
- yield c.execute("INSERT INTO dirs (path) VALUES ('foo')");
-
- let promise = c.executeTransaction(function* transaction(conn) {
- yield c.execute("INSERT INTO dirs (path) VALUES ('bar')");
- });
- yield c.close();
-
- yield Assert.rejects(promise,
- /Transaction canceled due to a closed connection/,
- "closing a connection in the middle of a transaction should reject it");
-
- let c2 = yield getConnection("close_during_transaction");
- let rows = yield c2.execute("SELECT * FROM dirs");
- do_check_eq(rows.length, 1);
-
- yield c2.close();
-});
-
-// Verify that we support concurrent transactions.
-add_task(function* test_multiple_transactions() {
- let c = yield getDummyDatabase("detect_multiple_transactions");
-
- for (let i = 0; i < 10; ++i) {
- // We don't wait for these transactions.
- c.executeTransaction(function* () {
- yield c.execute("INSERT INTO dirs (path) VALUES (:path)",
- { path: `foo${i}` });
- yield c.execute("SELECT * FROM dirs");
- });
- }
- for (let i = 0; i < 10; ++i) {
- yield c.executeTransaction(function* () {
- yield c.execute("INSERT INTO dirs (path) VALUES (:path)",
- { path: `bar${i}` });
- yield c.execute("SELECT * FROM dirs");
- });
- }
-
- let rows = yield c.execute("SELECT * FROM dirs");
- do_check_eq(rows.length, 20);
-
- yield c.close();
-});
-
-// Verify that wrapped transactions ignore a BEGIN TRANSACTION failure, when
-// an externally opened transaction exists.
-add_task(function* test_wrapped_connection_transaction() {
- let file = new FileUtils.File(OS.Path.join(OS.Constants.Path.profileDir,
- "test_wrapStorageConnection.sqlite"));
- let c = yield new Promise((resolve, reject) => {
- Services.storage.openAsyncDatabase(file, null, (status, db) => {
- if (Components.isSuccessCode(status)) {
- resolve(db.QueryInterface(Ci.mozIStorageAsyncConnection));
- } else {
- reject(new Error(status));
- }
- });
- });
-
- let wrapper = yield Sqlite.wrapStorageConnection({ connection: c });
- // Start a transaction on the raw connection.
- yield c.executeSimpleSQLAsync("BEGIN");
- // Now use executeTransaction, it will be executed, but not in a transaction.
- yield wrapper.executeTransaction(function* () {
- yield wrapper.execute("CREATE TABLE test (id INTEGER PRIMARY KEY AUTOINCREMENT)");
- });
- // This should not fail cause the internal transaction has not been created.
- yield c.executeSimpleSQLAsync("COMMIT");
-
- yield wrapper.execute("SELECT * FROM test");
-
- // Closing the wrapper should just finalize statements but not close the
- // database.
- yield wrapper.close();
- yield c.asyncClose();
-});
-
-add_task(function* test_shrink_memory() {
- let c = yield getDummyDatabase("shrink_memory");
-
- // It's just a simple sanity test. We have no way of measuring whether this
- // actually does anything.
-
- yield c.shrinkMemory();
- yield c.close();
-});
-
-add_task(function* test_no_shrink_on_init() {
- let c = yield getConnection("no_shrink_on_init",
- {shrinkMemoryOnConnectionIdleMS: 200});
-
- let oldShrink = c._connectionData.shrinkMemory;
- let count = 0;
- Object.defineProperty(c._connectionData, "shrinkMemory", {
- value: function () {
- count++;
- },
- });
-
- // We should not shrink until a statement has been executed.
- yield sleep(220);
- do_check_eq(count, 0);
-
- yield c.execute("SELECT 1");
- yield sleep(220);
- do_check_eq(count, 1);
-
- yield c.close();
-});
-
-add_task(function* test_idle_shrink_fires() {
- let c = yield getDummyDatabase("idle_shrink_fires",
- {shrinkMemoryOnConnectionIdleMS: 200});
- c._connectionData._clearIdleShrinkTimer();
-
- let oldShrink = c._connectionData.shrinkMemory;
- let shrinkPromises = [];
-
- let count = 0;
- Object.defineProperty(c._connectionData, "shrinkMemory", {
- value: function () {
- count++;
- let promise = oldShrink.call(c._connectionData);
- shrinkPromises.push(promise);
- return promise;
- },
- });
-
- // We reset the idle shrink timer after monkeypatching because otherwise the
- // installed timer callback will reference the non-monkeypatched function.
- c._connectionData._startIdleShrinkTimer();
-
- yield sleep(220);
- do_check_eq(count, 1);
- do_check_eq(shrinkPromises.length, 1);
- yield shrinkPromises[0];
- shrinkPromises.shift();
-
- // We shouldn't shrink again unless a statement was executed.
- yield sleep(300);
- do_check_eq(count, 1);
-
- yield c.execute("SELECT 1");
- yield sleep(300);
-
- do_check_eq(count, 2);
- do_check_eq(shrinkPromises.length, 1);
- yield shrinkPromises[0];
-
- yield c.close();
-});
-
-add_task(function* test_idle_shrink_reset_on_operation() {
- const INTERVAL = 500;
- let c = yield getDummyDatabase("idle_shrink_reset_on_operation",
- {shrinkMemoryOnConnectionIdleMS: INTERVAL});
-
- c._connectionData._clearIdleShrinkTimer();
-
- let oldShrink = c._connectionData.shrinkMemory;
- let shrinkPromises = [];
- let count = 0;
-
- Object.defineProperty(c._connectionData, "shrinkMemory", {
- value: function () {
- count++;
- let promise = oldShrink.call(c._connectionData);
- shrinkPromises.push(promise);
- return promise;
- },
- });
-
- let now = new Date();
- c._connectionData._startIdleShrinkTimer();
-
- let initialIdle = new Date(now.getTime() + INTERVAL);
-
- // Perform database operations until initial scheduled time has been passed.
- let i = 0;
- while (new Date() < initialIdle) {
- yield c.execute("INSERT INTO dirs (path) VALUES (?)", ["" + i]);
- i++;
- }
-
- do_check_true(i > 0);
-
- // We should not have performed an idle while doing operations.
- do_check_eq(count, 0);
-
- // Wait for idle timer.
- yield sleep(INTERVAL);
-
- // Ensure we fired.
- do_check_eq(count, 1);
- do_check_eq(shrinkPromises.length, 1);
- yield shrinkPromises[0];
-
- yield c.close();
-});
-
-add_task(function* test_in_progress_counts() {
- let c = yield getDummyDatabase("in_progress_counts");
- do_check_eq(c._connectionData._statementCounter, c._initialStatementCount);
- do_check_eq(c._connectionData._pendingStatements.size, 0);
- yield c.executeCached("INSERT INTO dirs (path) VALUES ('foo')");
- do_check_eq(c._connectionData._statementCounter, c._initialStatementCount + 1);
- do_check_eq(c._connectionData._pendingStatements.size, 0);
-
- let expectOne;
- let expectTwo;
-
- // Please forgive me.
- let inner = Async.makeSpinningCallback();
- let outer = Async.makeSpinningCallback();
-
- // We want to make sure that two queries executing simultaneously
- // result in `_pendingStatements.size` reaching 2, then dropping back to 0.
- //
- // To do so, we kick off a second statement within the row handler
- // of the first, then wait for both to finish.
-
- yield c.executeCached("SELECT * from dirs", null, function onRow() {
- // In the onRow handler, we're still an outstanding query.
- // Expect a single in-progress entry.
- expectOne = c._connectionData._pendingStatements.size;
-
- // Start another query, checking that after its statement has been created
- // there are two statements in progress.
- let p = c.executeCached("SELECT 10, path from dirs");
- expectTwo = c._connectionData._pendingStatements.size;
-
- // Now wait for it to be done before we return from the row handler …
- p.then(function onInner() {
- inner();
- });
- }).then(function onOuter() {
- // … and wait for the inner to be done before we finish …
- inner.wait();
- outer();
- });
-
- // … and wait for both queries to have finished before we go on and
- // test postconditions.
- outer.wait();
-
- do_check_eq(expectOne, 1);
- do_check_eq(expectTwo, 2);
- do_check_eq(c._connectionData._statementCounter, c._initialStatementCount + 3);
- do_check_eq(c._connectionData._pendingStatements.size, 0);
-
- yield c.close();
-});
-
-add_task(function* test_discard_while_active() {
- let c = yield getDummyDatabase("discard_while_active");
-
- yield c.executeCached("INSERT INTO dirs (path) VALUES ('foo')");
- yield c.executeCached("INSERT INTO dirs (path) VALUES ('bar')");
-
- let discarded = -1;
- let first = true;
- let sql = "SELECT * FROM dirs";
- yield c.executeCached(sql, null, function onRow(row) {
- if (!first) {
- return;
- }
- first = false;
- discarded = c.discardCachedStatements();
- });
-
- // We discarded everything, because the SELECT had already started to run.
- do_check_eq(3, discarded);
-
- // And again is safe.
- do_check_eq(0, c.discardCachedStatements());
-
- yield c.close();
-});
-
-add_task(function* test_discard_cached() {
- let c = yield getDummyDatabase("discard_cached");
-
- yield c.executeCached("SELECT * from dirs");
- do_check_eq(1, c._connectionData._cachedStatements.size);
-
- yield c.executeCached("SELECT * from files");
- do_check_eq(2, c._connectionData._cachedStatements.size);
-
- yield c.executeCached("SELECT * from dirs");
- do_check_eq(2, c._connectionData._cachedStatements.size);
-
- c.discardCachedStatements();
- do_check_eq(0, c._connectionData._cachedStatements.size);
-
- yield c.close();
-});
-
-add_task(function* test_programmatic_binding() {
- let c = yield getDummyDatabase("programmatic_binding");
-
- let bindings = [
- {id: 1, path: "foobar"},
- {id: null, path: "baznoo"},
- {id: 5, path: "toofoo"},
- ];
-
- let sql = "INSERT INTO dirs VALUES (:id, :path)";
- let result = yield c.execute(sql, bindings);
- do_check_eq(result.length, 0);
-
- let rows = yield c.executeCached("SELECT * from dirs");
- do_check_eq(rows.length, 3);
- yield c.close();
-});
-
-add_task(function* test_programmatic_binding_transaction() {
- let c = yield getDummyDatabase("programmatic_binding_transaction");
-
- let bindings = [
- {id: 1, path: "foobar"},
- {id: null, path: "baznoo"},
- {id: 5, path: "toofoo"},
- ];
-
- let sql = "INSERT INTO dirs VALUES (:id, :path)";
- yield c.executeTransaction(function* transaction() {
- let result = yield c.execute(sql, bindings);
- do_check_eq(result.length, 0);
-
- let rows = yield c.executeCached("SELECT * from dirs");
- do_check_eq(rows.length, 3);
- });
-
- // Transaction committed.
- let rows = yield c.executeCached("SELECT * from dirs");
- do_check_eq(rows.length, 3);
- yield c.close();
-});
-
-add_task(function* test_programmatic_binding_transaction_partial_rollback() {
- let c = yield getDummyDatabase("programmatic_binding_transaction_partial_rollback");
-
- let bindings = [
- {id: 2, path: "foobar"},
- {id: 3, path: "toofoo"},
- ];
-
- let sql = "INSERT INTO dirs VALUES (:id, :path)";
-
- // Add some data in an implicit transaction before beginning the batch insert.
- yield c.execute(sql, {id: 1, path: "works"});
-
- let secondSucceeded = false;
- try {
- yield c.executeTransaction(function* transaction() {
- // Insert one row. This won't implicitly start a transaction.
- let result = yield c.execute(sql, bindings[0]);
-
- // Insert multiple rows. mozStorage will want to start a transaction.
- // One of the inserts will fail, so the transaction should be rolled back.
- result = yield c.execute(sql, bindings);
- secondSucceeded = true;
- });
- } catch (ex) {
- print("Caught expected exception: " + ex);
- }
-
- // We did not get to the end of our in-transaction block.
- do_check_false(secondSucceeded);
-
- // Everything that happened in *our* transaction, not mozStorage's, got
- // rolled back, but the first row still exists.
- let rows = yield c.executeCached("SELECT * from dirs");
- do_check_eq(rows.length, 1);
- do_check_eq(rows[0].getResultByName("path"), "works");
- yield c.close();
-});
-
-// Just like the previous test, but relying on the implicit
-// transaction established by mozStorage.
-add_task(function* test_programmatic_binding_implicit_transaction() {
- let c = yield getDummyDatabase("programmatic_binding_implicit_transaction");
-
- let bindings = [
- {id: 2, path: "foobar"},
- {id: 1, path: "toofoo"},
- ];
-
- let sql = "INSERT INTO dirs VALUES (:id, :path)";
- let secondSucceeded = false;
- yield c.execute(sql, {id: 1, path: "works"});
- try {
- let result = yield c.execute(sql, bindings);
- secondSucceeded = true;
- } catch (ex) {
- print("Caught expected exception: " + ex);
- }
-
- do_check_false(secondSucceeded);
-
- // The entire batch failed.
- let rows = yield c.executeCached("SELECT * from dirs");
- do_check_eq(rows.length, 1);
- do_check_eq(rows[0].getResultByName("path"), "works");
- yield c.close();
-});
-
-// Test that direct binding of params and execution through mozStorage doesn't
-// error when we manually create a transaction. See Bug 856925.
-add_task(function* test_direct() {
- let file = FileUtils.getFile("TmpD", ["test_direct.sqlite"]);
- file.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, FileUtils.PERMS_FILE);
- print("Opening " + file.path);
-
- let db = Services.storage.openDatabase(file);
- print("Opened " + db);
-
- db.executeSimpleSQL("CREATE TABLE types (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, UNIQUE (name))");
- print("Executed setup.");
-
- let statement = db.createAsyncStatement("INSERT INTO types (name) VALUES (:name)");
- let params = statement.newBindingParamsArray();
- let one = params.newBindingParams();
- one.bindByName("name", null);
- params.addParams(one);
- let two = params.newBindingParams();
- two.bindByName("name", "bar");
- params.addParams(two);
-
- print("Beginning transaction.");
- let begin = db.createAsyncStatement("BEGIN DEFERRED TRANSACTION");
- let end = db.createAsyncStatement("COMMIT TRANSACTION");
-
- let deferred = Promise.defer();
- begin.executeAsync({
- handleCompletion: function (reason) {
- deferred.resolve();
- }
- });
- yield deferred.promise;
-
- statement.bindParameters(params);
-
- deferred = Promise.defer();
- print("Executing async.");
- statement.executeAsync({
- handleResult: function (resultSet) {
- },
-
- handleError: function (error) {
- print("Error when executing SQL (" + error.result + "): " +
- error.message);
- print("Original error: " + error.error);
- errors.push(error);
- deferred.reject();
- },
-
- handleCompletion: function (reason) {
- print("Completed.");
- deferred.resolve();
- }
- });
-
- yield deferred.promise;
-
- deferred = Promise.defer();
- end.executeAsync({
- handleCompletion: function (reason) {
- deferred.resolve();
- }
- });
- yield deferred.promise;
-
- statement.finalize();
- begin.finalize();
- end.finalize();
-
- deferred = Promise.defer();
- db.asyncClose(function () {
- deferred.resolve()
- });
- yield deferred.promise;
-});
-
-// Test Sqlite.cloneStorageConnection.
-add_task(function* test_cloneStorageConnection() {
- let file = new FileUtils.File(OS.Path.join(OS.Constants.Path.profileDir,
- "test_cloneStorageConnection.sqlite"));
- let c = yield new Promise((resolve, reject) => {
- Services.storage.openAsyncDatabase(file, null, (status, db) => {
- if (Components.isSuccessCode(status)) {
- resolve(db.QueryInterface(Ci.mozIStorageAsyncConnection));
- } else {
- reject(new Error(status));
- }
- });
- });
-
- let clone = yield Sqlite.cloneStorageConnection({ connection: c, readOnly: true });
- // Just check that it works.
- yield clone.execute("SELECT 1");
-
- let clone2 = yield Sqlite.cloneStorageConnection({ connection: c, readOnly: false });
- // Just check that it works.
- yield clone2.execute("CREATE TABLE test (id INTEGER PRIMARY KEY)");
-
- // Closing order should not matter.
- yield c.asyncClose();
- yield clone2.close();
- yield clone.close();
-});
-
-// Test Sqlite.cloneStorageConnection invalid argument.
-add_task(function* test_cloneStorageConnection() {
- try {
- let clone = yield Sqlite.cloneStorageConnection({ connection: null });
- do_throw(new Error("Should throw on invalid connection"));
- } catch (ex) {
- if (ex.name != "TypeError") {
- throw ex;
- }
- }
-});
-
-// Test clone() method.
-add_task(function* test_clone() {
- let c = yield getDummyDatabase("clone");
-
- let clone = yield c.clone();
- // Just check that it works.
- yield clone.execute("SELECT 1");
- // Closing order should not matter.
- yield c.close();
- yield clone.close();
-});
-
-// Test clone(readOnly) method.
-add_task(function* test_readOnly_clone() {
- let path = OS.Path.join(OS.Constants.Path.profileDir, "test_readOnly_clone.sqlite");
- let c = yield Sqlite.openConnection({path: path, sharedMemoryCache: false});
-
- let clone = yield c.clone(true);
- // Just check that it works.
- yield clone.execute("SELECT 1");
- // But should not be able to write.
-
- yield Assert.rejects(clone.execute("CREATE TABLE test (id INTEGER PRIMARY KEY)"),
- /readonly/);
- // Closing order should not matter.
- yield c.close();
- yield clone.close();
-});
-
-// Test Sqlite.wrapStorageConnection.
-add_task(function* test_wrapStorageConnection() {
- let file = new FileUtils.File(OS.Path.join(OS.Constants.Path.profileDir,
- "test_wrapStorageConnection.sqlite"));
- let c = yield new Promise((resolve, reject) => {
- Services.storage.openAsyncDatabase(file, null, (status, db) => {
- if (Components.isSuccessCode(status)) {
- resolve(db.QueryInterface(Ci.mozIStorageAsyncConnection));
- } else {
- reject(new Error(status));
- }
- });
- });
-
- let wrapper = yield Sqlite.wrapStorageConnection({ connection: c });
- // Just check that it works.
- yield wrapper.execute("SELECT 1");
- yield wrapper.executeCached("SELECT 1");
-
- // Closing the wrapper should just finalize statements but not close the
- // database.
- yield wrapper.close();
- yield c.asyncClose();
-});
-
-// Test finalization
-add_task(function* test_closed_by_witness() {
- failTestsOnAutoClose(false);
- let c = yield getDummyDatabase("closed_by_witness");
-
- Services.obs.notifyObservers(null, "sqlite-finalization-witness",
- c._connectionData._identifier);
- // Since we triggered finalization ourselves, tell the witness to
- // forget the connection so it does not trigger a finalization again
- c._witness.forget();
- yield c._connectionData._deferredClose.promise;
- do_check_false(c._connectionData._open);
- failTestsOnAutoClose(true);
-});
-
-add_task(function* test_warning_message_on_finalization() {
- failTestsOnAutoClose(false);
- let c = yield getDummyDatabase("warning_message_on_finalization");
- let identifier = c._connectionData._identifier;
- let deferred = Promise.defer();
-
- let listener = {
- observe: function(msg) {
- let messageText = msg.message;
- // Make sure the message starts with a warning containing the
- // connection identifier
- if (messageText.indexOf("Warning: Sqlite connection '" + identifier + "'") !== -1) {
- deferred.resolve();
- }
- }
- };
- Services.console.registerListener(listener);
-
- Services.obs.notifyObservers(null, "sqlite-finalization-witness", identifier);
- // Since we triggered finalization ourselves, tell the witness to
- // forget the connection so it does not trigger a finalization again
- c._witness.forget();
-
- yield deferred.promise;
- Services.console.unregisterListener(listener);
- failTestsOnAutoClose(true);
-});
-
-add_task(function* test_error_message_on_unknown_finalization() {
- failTestsOnAutoClose(false);
- let deferred = Promise.defer();
-
- let listener = {
- observe: function(msg) {
- let messageText = msg.message;
- if (messageText.indexOf("Error: Attempt to finalize unknown " +
- "Sqlite connection: foo") !== -1) {
- deferred.resolve();
- }
- }
- };
- Services.console.registerListener(listener);
- Services.obs.notifyObservers(null, "sqlite-finalization-witness", "foo");
-
- yield deferred.promise;
- Services.console.unregisterListener(listener);
- failTestsOnAutoClose(true);
-});
-
-add_task(function* test_forget_witness_on_close() {
- let c = yield getDummyDatabase("forget_witness_on_close");
-
- let forgetCalled = false;
- let oldWitness = c._witness;
- c._witness = {
- forget: function () {
- forgetCalled = true;
- oldWitness.forget();
- },
- };
-
- yield c.close();
- // After close, witness should have forgotten the connection
- do_check_true(forgetCalled);
-});
-
-add_task(function* test_close_database_on_gc() {
- failTestsOnAutoClose(false);
- let finalPromise;
-
- {
- let collectedPromises = [];
- for (let i = 0; i < 100; ++i) {
- let deferred = PromiseUtils.defer();
- let c = yield getDummyDatabase("gc_" + i);
- c._connectionData._deferredClose.promise.then(deferred.resolve);
- collectedPromises.push(deferred.promise);
- }
- finalPromise = Promise.all(collectedPromises);
- }
-
- // Call getDummyDatabase once more to clear any remaining
- // references. This is needed at the moment, otherwise
- // garbage-collection takes place after the shutdown barrier and the
- // test will timeout. Once that is fixed, we can remove this line
- // and be fine as long as the connections are garbage-collected.
- let last = yield getDummyDatabase("gc_last");
- yield last.close();
-
- Components.utils.forceGC();
- Components.utils.forceCC();
- Components.utils.forceShrinkingGC();
-
- yield finalPromise;
- failTestsOnAutoClose(true);
-});
diff --git a/toolkit/modules/tests/xpcshell/test_sqlite_shutdown.js b/toolkit/modules/tests/xpcshell/test_sqlite_shutdown.js
deleted file mode 100644
index b97fd85582..0000000000
--- a/toolkit/modules/tests/xpcshell/test_sqlite_shutdown.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
-
-do_get_profile();
-
-Cu.import("resource://gre/modules/osfile.jsm");
- // OS.File doesn't like to be first imported during shutdown
-Cu.import("resource://gre/modules/Sqlite.jsm");
-Cu.import("resource://gre/modules/Task.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/AsyncShutdown.jsm");
-Cu.import("resource://gre/modules/Promise.jsm");
-
-function getConnection(dbName, extraOptions={}) {
- let path = dbName + ".sqlite";
- let options = {path: path};
- for (let [k, v] of Object.entries(extraOptions)) {
- options[k] = v;
- }
-
- return Sqlite.openConnection(options);
-}
-
-function* getDummyDatabase(name, extraOptions={}) {
- const TABLES = {
- dirs: "id INTEGER PRIMARY KEY AUTOINCREMENT, path TEXT",
- files: "id INTEGER PRIMARY KEY AUTOINCREMENT, dir_id INTEGER, path TEXT",
- };
-
- let c = yield getConnection(name, extraOptions);
- c._initialStatementCount = 0;
-
- for (let [k, v] of Object.entries(TABLES)) {
- yield c.execute("CREATE TABLE " + k + "(" + v + ")");
- c._initialStatementCount++;
- }
-
- return c;
-}
-
-function sleep(ms) {
- let deferred = Promise.defer();
-
- let timer = Cc["@mozilla.org/timer;1"]
- .createInstance(Ci.nsITimer);
-
- timer.initWithCallback({
- notify: function () {
- deferred.resolve();
- },
- }, ms, timer.TYPE_ONE_SHOT);
-
- return deferred.promise;
-}
-
-function run_test() {
- run_next_test();
-}
-
-
-//
-// ----------- Don't add a test after this one, as it shuts down Sqlite.jsm
-//
-add_task(function* test_shutdown_clients() {
- do_print("Ensuring that Sqlite.jsm doesn't shutdown before its clients");
-
- let assertions = [];
-
- let sleepStarted = false;
- let sleepComplete = false;
- Sqlite.shutdown.addBlocker("test_sqlite.js shutdown blocker (sleep)",
- Task.async(function*() {
- sleepStarted = true;
- yield sleep(100);
- sleepComplete = true;
- }));
- assertions.push({name: "sleepStarted", value: () => sleepStarted});
- assertions.push({name: "sleepComplete", value: () => sleepComplete});
-
- Sqlite.shutdown.addBlocker("test_sqlite.js shutdown blocker (immediate)",
- true);
-
- let dbOpened = false;
- let dbClosed = false;
-
- Sqlite.shutdown.addBlocker("test_sqlite.js shutdown blocker (open a connection during shutdown)",
- Task.async(function*() {
- let db = yield getDummyDatabase("opened during shutdown");
- dbOpened = true;
- db.close().then(
- () => dbClosed = true
- ); // Don't wait for this task to complete, Sqlite.jsm must wait automatically
- }));
-
- assertions.push({name: "dbOpened", value: () => dbOpened});
- assertions.push({name: "dbClosed", value: () => dbClosed});
-
- do_print("Now shutdown Sqlite.jsm synchronously");
- Services.prefs.setBoolPref("toolkit.asyncshutdown.testing", true);
- AsyncShutdown.profileBeforeChange._trigger();
- Services.prefs.clearUserPref("toolkit.asyncshutdown.testing");
-
-
- for (let {name, value} of assertions) {
- do_print("Checking: " + name);
- do_check_true(value());
- }
-
- do_print("Ensure that we cannot open databases anymore");
- let exn;
- try {
- yield getDummyDatabase("opened after shutdown");
- } catch (ex) {
- exn = ex;
- }
- do_check_true(!!exn);
- do_check_true(exn.message.indexOf("Sqlite.jsm has been shutdown") != -1);
-});
diff --git a/toolkit/modules/tests/xpcshell/test_task.js b/toolkit/modules/tests/xpcshell/test_task.js
deleted file mode 100644
index fdcd565149..0000000000
--- a/toolkit/modules/tests/xpcshell/test_task.js
+++ /dev/null
@@ -1,642 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * This file tests the Task.jsm module.
- */
-
-////////////////////////////////////////////////////////////////////////////////
-/// Globals
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-var Cr = Components.results;
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "Promise",
- "resource://gre/modules/Promise.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Services",
- "resource://gre/modules/Services.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Task",
- "resource://gre/modules/Task.jsm");
-
-/**
- * Returns a promise that will be resolved with the given value, when an event
- * posted on the event loop of the main thread is processed.
- */
-function promiseResolvedLater(aValue) {
- let deferred = Promise.defer();
- Services.tm.mainThread.dispatch(() => deferred.resolve(aValue),
- Ci.nsIThread.DISPATCH_NORMAL);
- return deferred.promise;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-/// Tests
-
-function run_test()
-{
- run_next_test();
-}
-
-add_test(function test_normal()
-{
- Task.spawn(function () {
- let result = yield Promise.resolve("Value");
- for (let i = 0; i < 3; i++) {
- result += yield promiseResolvedLater("!");
- }
- throw new Task.Result("Task result: " + result);
- }).then(function (result) {
- do_check_eq("Task result: Value!!!", result);
- run_next_test();
- }, function (ex) {
- do_throw("Unexpected error: " + ex);
- });
-});
-
-add_test(function test_exceptions()
-{
- Task.spawn(function () {
- try {
- yield Promise.reject("Rejection result by promise.");
- do_throw("Exception expected because the promise was rejected.");
- } catch (ex) {
- // We catch this exception now, we will throw a different one later.
- do_check_eq("Rejection result by promise.", ex);
- }
- throw new Error("Exception uncaught by task.");
- }).then(function (result) {
- do_throw("Unexpected success!");
- }, function (ex) {
- do_check_eq("Exception uncaught by task.", ex.message);
- run_next_test();
- });
-});
-
-add_test(function test_recursion()
-{
- function task_fibonacci(n) {
- throw new Task.Result(n < 2 ? n : (yield task_fibonacci(n - 1)) +
- (yield task_fibonacci(n - 2)));
- };
-
- Task.spawn(task_fibonacci(6)).then(function (result) {
- do_check_eq(8, result);
- run_next_test();
- }, function (ex) {
- do_throw("Unexpected error: " + ex);
- });
-});
-
-add_test(function test_spawn_primitive()
-{
- function fibonacci(n) {
- return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2);
- };
-
- // Polymorphism between task and non-task functions (see "test_recursion").
- Task.spawn(fibonacci(6)).then(function (result) {
- do_check_eq(8, result);
- run_next_test();
- }, function (ex) {
- do_throw("Unexpected error: " + ex);
- });
-});
-
-add_test(function test_spawn_function()
-{
- Task.spawn(function () {
- return "This is not a generator.";
- }).then(function (result) {
- do_check_eq("This is not a generator.", result);
- run_next_test();
- }, function (ex) {
- do_throw("Unexpected error: " + ex);
- });
-});
-
-add_test(function test_spawn_function_this()
-{
- Task.spawn(function () {
- return this;
- }).then(function (result) {
- // Since the task function wasn't defined in strict mode, its "this" object
- // should be the same as the "this" object in this function, i.e. the global
- // object.
- do_check_eq(result, this);
- run_next_test();
- }, function (ex) {
- do_throw("Unexpected error: " + ex);
- });
-});
-
-add_test(function test_spawn_function_this_strict()
-{
- "use strict";
- Task.spawn(function () {
- return this;
- }).then(function (result) {
- // Since the task function was defined in strict mode, its "this" object
- // should be undefined.
- do_check_eq(typeof(result), "undefined");
- run_next_test();
- }, function (ex) {
- do_throw("Unexpected error: " + ex);
- });
-});
-
-add_test(function test_spawn_function_returning_promise()
-{
- Task.spawn(function () {
- return promiseResolvedLater("Resolution value.");
- }).then(function (result) {
- do_check_eq("Resolution value.", result);
- run_next_test();
- }, function (ex) {
- do_throw("Unexpected error: " + ex);
- });
-});
-
-add_test(function test_spawn_function_exceptions()
-{
- Task.spawn(function () {
- throw new Error("Exception uncaught by task.");
- }).then(function (result) {
- do_throw("Unexpected success!");
- }, function (ex) {
- do_check_eq("Exception uncaught by task.", ex.message);
- run_next_test();
- });
-});
-
-add_test(function test_spawn_function_taskresult()
-{
- Task.spawn(function () {
- throw new Task.Result("Task result");
- }).then(function (result) {
- do_check_eq("Task result", result);
- run_next_test();
- }, function (ex) {
- do_throw("Unexpected error: " + ex);
- });
-});
-
-add_test(function test_yielded_undefined()
-{
- Task.spawn(function () {
- yield;
- throw new Task.Result("We continued correctly.");
- }).then(function (result) {
- do_check_eq("We continued correctly.", result);
- run_next_test();
- }, function (ex) {
- do_throw("Unexpected error: " + ex);
- });
-});
-
-add_test(function test_yielded_primitive()
-{
- Task.spawn(function () {
- throw new Task.Result("Primitive " + (yield "value."));
- }).then(function (result) {
- do_check_eq("Primitive value.", result);
- run_next_test();
- }, function (ex) {
- do_throw("Unexpected error: " + ex);
- });
-});
-
-add_test(function test_star_normal()
-{
- Task.spawn(function* () {
- let result = yield Promise.resolve("Value");
- for (let i = 0; i < 3; i++) {
- result += yield promiseResolvedLater("!");
- }
- return "Task result: " + result;
- }).then(function (result) {
- do_check_eq("Task result: Value!!!", result);
- run_next_test();
- }, function (ex) {
- do_throw("Unexpected error: " + ex);
- });
-});
-
-add_test(function test_star_exceptions()
-{
- Task.spawn(function* () {
- try {
- yield Promise.reject("Rejection result by promise.");
- do_throw("Exception expected because the promise was rejected.");
- } catch (ex) {
- // We catch this exception now, we will throw a different one later.
- do_check_eq("Rejection result by promise.", ex);
- }
- throw new Error("Exception uncaught by task.");
- }).then(function (result) {
- do_throw("Unexpected success!");
- }, function (ex) {
- do_check_eq("Exception uncaught by task.", ex.message);
- run_next_test();
- });
-});
-
-add_test(function test_star_recursion()
-{
- function* task_fibonacci(n) {
- return n < 2 ? n : (yield task_fibonacci(n - 1)) +
- (yield task_fibonacci(n - 2));
- };
-
- Task.spawn(task_fibonacci(6)).then(function (result) {
- do_check_eq(8, result);
- run_next_test();
- }, function (ex) {
- do_throw("Unexpected error: " + ex);
- });
-});
-
-add_test(function test_mixed_legacy_and_star()
-{
- Task.spawn(function* () {
- return yield (function() {
- throw new Task.Result(yield 5);
- })();
- }).then(function (result) {
- do_check_eq(5, result);
- run_next_test();
- }, function (ex) {
- do_throw("Unexpected error: " + ex);
- });
-});
-
-add_test(function test_async_function_from_generator()
-{
- Task.spawn(function* () {
- let object = {
- asyncFunction: Task.async(function* (param) {
- do_check_eq(this, object);
- return param;
- })
- };
-
- // Ensure the async function returns a promise that resolves as expected.
- do_check_eq((yield object.asyncFunction(1)), 1);
-
- // Ensure a second call to the async function also returns such a promise.
- do_check_eq((yield object.asyncFunction(3)), 3);
- }).then(function () {
- run_next_test();
- }, function (ex) {
- do_throw("Unexpected error: " + ex);
- });
-});
-
-add_test(function test_async_function_from_function()
-{
- Task.spawn(function* () {
- return Task.spawn(function* () {
- let object = {
- asyncFunction: Task.async(function (param) {
- do_check_eq(this, object);
- return param;
- })
- };
-
- // Ensure the async function returns a promise that resolves as expected.
- do_check_eq((yield object.asyncFunction(5)), 5);
-
- // Ensure a second call to the async function also returns such a promise.
- do_check_eq((yield object.asyncFunction(7)), 7);
- });
- }).then(function () {
- run_next_test();
- }, function (ex) {
- do_throw("Unexpected error: " + ex);
- });
-});
-
-add_test(function test_async_function_that_throws_rejects_promise()
-{
- Task.spawn(function* () {
- let object = {
- asyncFunction: Task.async(function* () {
- throw "Rejected!";
- })
- };
-
- yield object.asyncFunction();
- }).then(function () {
- do_throw("unexpected success calling async function that throws error");
- }, function (ex) {
- do_check_eq(ex, "Rejected!");
- run_next_test();
- });
-});
-
-add_test(function test_async_return_function()
-{
- Task.spawn(function* () {
- // Ensure an async function that returns a function resolves to the function
- // itself instead of calling the function and resolving to its return value.
- return Task.spawn(function* () {
- let returnValue = function () {
- return "These aren't the droids you're looking for.";
- };
-
- let asyncFunction = Task.async(function () {
- return returnValue;
- });
-
- do_check_eq((yield asyncFunction()), returnValue);
- });
- }).then(function () {
- run_next_test();
- }, function (ex) {
- do_throw("Unexpected error: " + ex);
- });
-});
-
-add_test(function test_async_throw_argument_not_function()
-{
- Task.spawn(function* () {
- // Ensure Task.async throws if its aTask argument is not a function.
- Assert.throws(() => Task.async("not a function"),
- /aTask argument must be a function/);
- }).then(function () {
- run_next_test();
- }, function (ex) {
- do_throw("Unexpected error: " + ex);
- });
-});
-
-add_test(function test_async_throw_on_function_in_place_of_promise()
-{
- Task.spawn(function* () {
- // Ensure Task.spawn throws if passed an async function.
- Assert.throws(() => Task.spawn(Task.async(function* () {})),
- /Cannot use an async function in place of a promise/);
- }).then(function () {
- run_next_test();
- }, function (ex) {
- do_throw("Unexpected error: " + ex);
- });
-});
-
-
-////////////////// Test rewriting of stack traces
-
-// Backup Task.Debuggin.maintainStack.
-// Will be restored by `exit_stack_tests`.
-var maintainStack;
-add_test(function enter_stack_tests() {
- maintainStack = Task.Debugging.maintainStack;
- Task.Debugging.maintainStack = true;
- run_next_test();
-});
-
-
-/**
- * Ensure that a list of frames appear in a stack, in the right order
- */
-function do_check_rewritten_stack(frames, ex) {
- do_print("Checking that the expected frames appear in the right order");
- do_print(frames.join(", "));
- let stack = ex.stack;
- do_print(stack);
-
- let framesFound = 0;
- let lineNumber = 0;
- let reLine = /([^\r\n])+/g;
- let match;
- while (framesFound < frames.length && (match = reLine.exec(stack))) {
- let line = match[0];
- let frame = frames[framesFound];
- do_print("Searching for " + frame + " in line " + line);
- if (line.indexOf(frame) != -1) {
- do_print("Found " + frame);
- ++framesFound;
- } else {
- do_print("Didn't find " + frame);
- }
- }
-
- if (framesFound >= frames.length) {
- return;
- }
- do_throw("Did not find: " + frames.slice(framesFound).join(", ") +
- " in " + stack.substr(reLine.lastIndex));
-
- do_print("Ensuring that we have removed Task.jsm, Promise.jsm");
- do_check_true(stack.indexOf("Task.jsm") == -1);
- do_check_true(stack.indexOf("Promise.jsm") == -1);
- do_check_true(stack.indexOf("Promise-backend.js") == -1);
-}
-
-
-// Test that we get an acceptable rewritten stack when we launch
-// an error in a Task.spawn.
-add_test(function test_spawn_throw_stack() {
- Task.spawn(function* task_spawn_throw_stack() {
- for (let i = 0; i < 5; ++i) {
- yield Promise.resolve(); // Without stack rewrite, this would lose valuable information
- }
- throw new Error("BOOM");
- }).then(do_throw, function(ex) {
- do_check_rewritten_stack(["task_spawn_throw_stack",
- "test_spawn_throw_stack"],
- ex);
- run_next_test();
- });
-});
-
-// Test that we get an acceptable rewritten stack when we yield
-// a rejection in a Task.spawn.
-add_test(function test_spawn_yield_reject_stack() {
- Task.spawn(function* task_spawn_yield_reject_stack() {
- for (let i = 0; i < 5; ++i) {
- yield Promise.resolve(); // Without stack rewrite, this would lose valuable information
- }
- yield Promise.reject(new Error("BOOM"));
- }).then(do_throw, function(ex) {
- do_check_rewritten_stack(["task_spawn_yield_reject_stack",
- "test_spawn_yield_reject_stack"],
- ex);
- run_next_test();
- });
-});
-
-// Test that we get an acceptable rewritten stack when we launch
-// an error in a Task.async function.
-add_test(function test_async_function_throw_stack() {
- let task_async_function_throw_stack = Task.async(function*() {
- for (let i = 0; i < 5; ++i) {
- yield Promise.resolve(); // Without stack rewrite, this would lose valuable information
- }
- throw new Error("BOOM");
- })().then(do_throw, function(ex) {
- do_check_rewritten_stack(["task_async_function_throw_stack",
- "test_async_function_throw_stack"],
- ex);
- run_next_test();
- });
-});
-
-// Test that we get an acceptable rewritten stack when we launch
-// an error in a Task.async function.
-add_test(function test_async_function_yield_reject_stack() {
- let task_async_function_yield_reject_stack = Task.async(function*() {
- for (let i = 0; i < 5; ++i) {
- yield Promise.resolve(); // Without stack rewrite, this would lose valuable information
- }
- yield Promise.reject(new Error("BOOM"));
- })().then(do_throw, function(ex) {
- do_check_rewritten_stack(["task_async_function_yield_reject_stack",
- "test_async_function_yield_reject_stack"],
- ex);
- run_next_test();
- });
-});
-
-// Test that we get an acceptable rewritten stack when we launch
-// an error in a Task.async function.
-add_test(function test_async_method_throw_stack() {
- let object = {
- task_async_method_throw_stack: Task.async(function*() {
- for (let i = 0; i < 5; ++i) {
- yield Promise.resolve(); // Without stack rewrite, this would lose valuable information
- }
- throw new Error("BOOM");
- })
- };
- object.task_async_method_throw_stack().then(do_throw, function(ex) {
- do_check_rewritten_stack(["task_async_method_throw_stack",
- "test_async_method_throw_stack"],
- ex);
- run_next_test();
- });
-});
-
-// Test that we get an acceptable rewritten stack when we launch
-// an error in a Task.async function.
-add_test(function test_async_method_yield_reject_stack() {
- let object = {
- task_async_method_yield_reject_stack: Task.async(function*() {
- for (let i = 0; i < 5; ++i) {
- yield Promise.resolve(); // Without stack rewrite, this would lose valuable information
- }
- yield Promise.reject(new Error("BOOM"));
- })
- };
- object.task_async_method_yield_reject_stack().then(do_throw, function(ex) {
- do_check_rewritten_stack(["task_async_method_yield_reject_stack",
- "test_async_method_yield_reject_stack"],
- ex);
- run_next_test();
- });
-});
-
-// Test that two tasks whose execution takes place interleaved do not capture each other's stack.
-add_test(function test_throw_stack_do_not_capture_the_wrong_task() {
- for (let iter_a of [3, 4, 5]) { // Vary the interleaving
- for (let iter_b of [3, 4, 5]) {
- Task.spawn(function* task_a() {
- for (let i = 0; i < iter_a; ++i) {
- yield Promise.resolve();
- }
- throw new Error("BOOM");
- }).then(do_throw, function(ex) {
- do_check_rewritten_stack(["task_a",
- "test_throw_stack_do_not_capture_the_wrong_task"],
- ex);
- do_check_true(!ex.stack.includes("task_b"));
- run_next_test();
- });
- Task.spawn(function* task_b() {
- for (let i = 0; i < iter_b; ++i) {
- yield Promise.resolve();
- }
- });
- }
- }
-});
-
-// Put things together
-add_test(function test_throw_complex_stack()
-{
- // Setup the following stack:
- // inner_method()
- // task_3()
- // task_2()
- // task_1()
- // function_3()
- // function_2()
- // function_1()
- // test_throw_complex_stack()
- (function function_1() {
- return (function function_2() {
- return (function function_3() {
- return Task.spawn(function* task_1() {
- yield Promise.resolve();
- try {
- yield Task.spawn(function* task_2() {
- yield Promise.resolve();
- yield Task.spawn(function* task_3() {
- yield Promise.resolve();
- let inner_object = {
- inner_method: Task.async(function*() {
- throw new Error("BOOM");
- })
- };
- yield Promise.resolve();
- yield inner_object.inner_method();
- });
- });
- } catch (ex) {
- yield Promise.resolve();
- throw ex;
- }
- });
- })();
- })();
- })().then(
- () => do_throw("Shouldn't have succeeded"),
- (ex) => {
- let expect = ["inner_method",
- "task_3",
- "task_2",
- "task_1",
- "function_3",
- "function_2",
- "function_1",
- "test_throw_complex_stack"];
- do_check_rewritten_stack(expect, ex);
-
- run_next_test();
- });
-});
-
-add_test(function test_without_maintainStack() {
- do_print("Calling generateReadableStack without a Task");
- Task.Debugging.generateReadableStack(new Error("Not a real error"));
-
- Task.Debugging.maintainStack = false;
-
- do_print("Calling generateReadableStack with neither a Task nor maintainStack");
- Task.Debugging.generateReadableStack(new Error("Not a real error"));
-
- do_print("Calling generateReadableStack without maintainStack");
- Task.spawn(function*() {
- Task.Debugging.generateReadableStack(new Error("Not a real error"));
- run_next_test();
- });
-});
-
-add_test(function exit_stack_tests() {
- Task.Debugging.maintainStack = maintainStack;
- run_next_test();
-});
-
diff --git a/toolkit/modules/tests/xpcshell/test_timer.js b/toolkit/modules/tests/xpcshell/test_timer.js
deleted file mode 100644
index 57e3006637..0000000000
--- a/toolkit/modules/tests/xpcshell/test_timer.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-// Tests exports from Timer.jsm
-
-var imported = {};
-Components.utils.import("resource://gre/modules/Timer.jsm", imported);
-
-function run_test() {
- run_next_test();
-}
-
-add_task(function* test_setTimeout() {
- let timeout1 = imported.setTimeout(() => do_throw("Should not be called"), 100);
- do_check_eq(typeof timeout1, "number", "setTimeout returns a number");
- do_check_true(timeout1 > 0, "setTimeout returns a positive number");
-
- imported.clearTimeout(timeout1);
-
- yield new Promise((resolve) => {
- let timeout2 = imported.setTimeout((param1, param2) => {
- do_check_true(true, "Should be called");
- do_check_eq(param1, 5, "first parameter is correct");
- do_check_eq(param2, "test", "second parameter is correct");
- resolve();
- }, 100, 5, "test");
-
- do_check_eq(typeof timeout2, "number", "setTimeout returns a number");
- do_check_true(timeout2 > 0, "setTimeout returns a positive number");
- do_check_neq(timeout1, timeout2, "Calling setTimeout again returns a different value");
- });
-});
-
-add_task(function* test_setInterval() {
- let interval1 = imported.setInterval(() => do_throw("Should not be called!"), 100);
- do_check_eq(typeof interval1, "number", "setInterval returns a number");
- do_check_true(interval1 > 0, "setTimeout returns a positive number");
-
- imported.clearInterval(interval1);
-
- const EXPECTED_CALLS = 5;
- let calls = 0;
-
- yield new Promise((resolve) => {
- let interval2 = imported.setInterval((param1, param2) => {
- do_check_true(true, "Should be called");
- do_check_eq(param1, 15, "first parameter is correct");
- do_check_eq(param2, "hola", "second parameter is correct");
- if (calls >= EXPECTED_CALLS) {
- resolve();
- }
- calls++;
- }, 100, 15, "hola");
- });
-});
diff --git a/toolkit/modules/tests/xpcshell/test_web_channel.js b/toolkit/modules/tests/xpcshell/test_web_channel.js
deleted file mode 100644
index 05f1bc03df..0000000000
--- a/toolkit/modules/tests/xpcshell/test_web_channel.js
+++ /dev/null
@@ -1,149 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-var Cu = Components.utils;
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/WebChannel.jsm");
-
-const ERROR_ID_ORIGIN_REQUIRED = "WebChannel id and originOrPermission are required.";
-const VALID_WEB_CHANNEL_ID = "id";
-const URL_STRING = "http://example.com";
-const VALID_WEB_CHANNEL_ORIGIN = Services.io.newURI(URL_STRING, null, null);
-const TEST_PERMISSION_NAME = "test-webchannel-permissions";
-
-var MockWebChannelBroker = {
- _channelMap: new Map(),
- registerChannel: function(channel) {
- if (!this._channelMap.has(channel)) {
- this._channelMap.set(channel);
- }
- },
- unregisterChannel: function (channelToRemove) {
- this._channelMap.delete(channelToRemove)
- }
-};
-
-function run_test() {
- run_next_test();
-}
-
-/**
- * Web channel tests
- */
-
-/**
- * Test channel listening with originOrPermission being an nsIURI.
- */
-add_task(function test_web_channel_listen() {
- return new Promise((resolve, reject) => {
- let channel = new WebChannel(VALID_WEB_CHANNEL_ID, VALID_WEB_CHANNEL_ORIGIN, {
- broker: MockWebChannelBroker
- });
- let delivered = 0;
- do_check_eq(channel.id, VALID_WEB_CHANNEL_ID);
- do_check_eq(channel._originOrPermission.spec, VALID_WEB_CHANNEL_ORIGIN.spec);
- do_check_eq(channel._deliverCallback, null);
-
- channel.listen(function(id, message, target) {
- do_check_eq(id, VALID_WEB_CHANNEL_ID);
- do_check_true(message);
- do_check_true(message.command);
- do_check_true(target.sender);
- delivered++;
- // 2 messages should be delivered
- if (delivered === 2) {
- channel.stopListening();
- do_check_eq(channel._deliverCallback, null);
- resolve();
- }
- });
-
- // send two messages
- channel.deliver({
- id: VALID_WEB_CHANNEL_ID,
- message: {
- command: "one"
- }
- }, { sender: true });
-
- channel.deliver({
- id: VALID_WEB_CHANNEL_ID,
- message: {
- command: "two"
- }
- }, { sender: true });
- });
-});
-
-/**
- * Test channel listening with originOrPermission being a permission string.
- */
-add_task(function test_web_channel_listen_permission() {
- return new Promise((resolve, reject) => {
- // add a new permission
- Services.perms.add(VALID_WEB_CHANNEL_ORIGIN, TEST_PERMISSION_NAME, Services.perms.ALLOW_ACTION);
- do_register_cleanup(() => Services.perms.remove(VALID_WEB_CHANNEL_ORIGIN, TEST_PERMISSION_NAME));
- let channel = new WebChannel(VALID_WEB_CHANNEL_ID, TEST_PERMISSION_NAME, {
- broker: MockWebChannelBroker
- });
- let delivered = 0;
- do_check_eq(channel.id, VALID_WEB_CHANNEL_ID);
- do_check_eq(channel._originOrPermission, TEST_PERMISSION_NAME);
- do_check_eq(channel._deliverCallback, null);
-
- channel.listen(function(id, message, target) {
- do_check_eq(id, VALID_WEB_CHANNEL_ID);
- do_check_true(message);
- do_check_true(message.command);
- do_check_true(target.sender);
- delivered++;
- // 2 messages should be delivered
- if (delivered === 2) {
- channel.stopListening();
- do_check_eq(channel._deliverCallback, null);
- resolve();
- }
- });
-
- // send two messages
- channel.deliver({
- id: VALID_WEB_CHANNEL_ID,
- message: {
- command: "one"
- }
- }, { sender: true });
-
- channel.deliver({
- id: VALID_WEB_CHANNEL_ID,
- message: {
- command: "two"
- }
- }, { sender: true });
- });
-});
-
-
-/**
- * Test constructor
- */
-add_test(function test_web_channel_constructor() {
- do_check_eq(constructorTester(), ERROR_ID_ORIGIN_REQUIRED);
- do_check_eq(constructorTester(undefined), ERROR_ID_ORIGIN_REQUIRED);
- do_check_eq(constructorTester(undefined, VALID_WEB_CHANNEL_ORIGIN), ERROR_ID_ORIGIN_REQUIRED);
- do_check_eq(constructorTester(VALID_WEB_CHANNEL_ID, undefined), ERROR_ID_ORIGIN_REQUIRED);
- do_check_false(constructorTester(VALID_WEB_CHANNEL_ID, VALID_WEB_CHANNEL_ORIGIN));
-
- run_next_test();
-});
-
-function constructorTester(id, origin) {
- try {
- new WebChannel(id, origin);
- } catch (e) {
- return e.message;
- }
- return false;
-}
diff --git a/toolkit/modules/tests/xpcshell/test_web_channel_broker.js b/toolkit/modules/tests/xpcshell/test_web_channel_broker.js
deleted file mode 100644
index 132597c207..0000000000
--- a/toolkit/modules/tests/xpcshell/test_web_channel_broker.js
+++ /dev/null
@@ -1,88 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-var Cu = Components.utils;
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/WebChannel.jsm");
-
-const VALID_WEB_CHANNEL_ID = "id";
-const URL_STRING = "http://example.com";
-const VALID_WEB_CHANNEL_ORIGIN = Services.io.newURI(URL_STRING, null, null);
-
-function run_test() {
- run_next_test();
-}
-
-/**
- * Test WebChannelBroker channel map
- */
-add_test(function test_web_channel_broker_channel_map() {
- let channel = {};
- let channel2 = {};
-
- do_check_eq(WebChannelBroker._channelMap.size, 0);
- do_check_false(WebChannelBroker._messageListenerAttached);
-
- // make sure _channelMap works correctly
- WebChannelBroker.registerChannel(channel);
- do_check_eq(WebChannelBroker._channelMap.size, 1);
- do_check_true(WebChannelBroker._messageListenerAttached);
-
- WebChannelBroker.registerChannel(channel2);
- do_check_eq(WebChannelBroker._channelMap.size, 2);
-
- WebChannelBroker.unregisterChannel(channel);
- do_check_eq(WebChannelBroker._channelMap.size, 1);
-
- // make sure the correct channel is unregistered
- do_check_false(WebChannelBroker._channelMap.has(channel));
- do_check_true(WebChannelBroker._channelMap.has(channel2));
-
- WebChannelBroker.unregisterChannel(channel2);
- do_check_eq(WebChannelBroker._channelMap.size, 0);
-
- run_next_test();
-});
-
-
-/**
- * Test WebChannelBroker _listener test
- */
-add_task(function test_web_channel_broker_listener() {
- return new Promise((resolve, reject) => {
- var channel = {
- id: VALID_WEB_CHANNEL_ID,
- _originCheckCallback: requestPrincipal => {
- return VALID_WEB_CHANNEL_ORIGIN.prePath === requestPrincipal.origin;
- },
- deliver: function(data, sender) {
- do_check_eq(data.id, VALID_WEB_CHANNEL_ID);
- do_check_eq(data.message.command, "hello");
- do_check_neq(sender, undefined);
- WebChannelBroker.unregisterChannel(channel);
- resolve();
- }
- };
-
- WebChannelBroker.registerChannel(channel);
-
- var mockEvent = {
- data: {
- id: VALID_WEB_CHANNEL_ID,
- message: {
- command: "hello"
- }
- },
- principal: {
- origin: URL_STRING
- },
- objects: {
- },
- };
-
- WebChannelBroker._listener(mockEvent);
- });
-});
diff --git a/toolkit/modules/tests/xpcshell/xpcshell.ini b/toolkit/modules/tests/xpcshell/xpcshell.ini
deleted file mode 100644
index 65d7c45e98..0000000000
--- a/toolkit/modules/tests/xpcshell/xpcshell.ini
+++ /dev/null
@@ -1,75 +0,0 @@
-[DEFAULT]
-head =
-tail =
-support-files =
- propertyLists/bug710259_propertyListBinary.plist
- propertyLists/bug710259_propertyListXML.plist
- chromeappsstore.sqlite
- zips/zen.zip
-
-[test_BinarySearch.js]
-skip-if = toolkit == 'android'
-[test_CanonicalJSON.js]
-[test_client_id.js]
-skip-if = toolkit == 'android'
-[test_Color.js]
-[test_DeferredTask.js]
-skip-if = toolkit == 'android'
-[test_FileUtils.js]
-skip-if = toolkit == 'android'
-[test_FinderIterator.js]
-[test_GMPInstallManager.js]
-skip-if = toolkit == 'android'
-[test_Http.js]
-skip-if = toolkit == 'android'
-[test_Integration.js]
-[test_jsesc.js]
-skip-if = toolkit == 'android'
-[test_JSONFile.js]
-skip-if = toolkit == 'android'
-[test_Log.js]
-skip-if = toolkit == 'android'
-[test_MatchPattern.js]
-skip-if = toolkit == 'android'
-[test_MatchGlobs.js]
-skip-if = toolkit == 'android'
-[test_MatchURLFilters.js]
-skip-if = toolkit == 'android'
-[test_NewTabUtils.js]
-skip-if = toolkit == 'android'
-[test_ObjectUtils.js]
-skip-if = toolkit == 'android'
-[test_ObjectUtils_strict.js]
-skip-if = toolkit == 'android'
-[test_PermissionsUtils.js]
-skip-if = toolkit == 'android'
-[test_Preferences.js]
-skip-if = toolkit == 'android'
-[test_Promise.js]
-skip-if = toolkit == 'android'
-[test_PromiseUtils.js]
-skip-if = toolkit == 'android'
-[test_propertyListsUtils.js]
-skip-if = toolkit == 'android'
-[test_readCertPrefs.js]
-skip-if = toolkit == 'android'
-[test_Services.js]
-skip-if = toolkit == 'android'
-[test_session_recorder.js]
-skip-if = toolkit == 'android'
-[test_sqlite.js]
-skip-if = toolkit == 'android'
-[test_sqlite_shutdown.js]
-skip-if = toolkit == 'android'
-[test_task.js]
-skip-if = toolkit == 'android'
-[test_timer.js]
-skip-if = toolkit == 'android'
-[test_UpdateUtils_url.js]
-[test_UpdateUtils_updatechannel.js]
-[test_web_channel.js]
-[test_web_channel_broker.js]
-[test_ZipUtils.js]
-skip-if = toolkit == 'android'
-[test_Log_stackTrace.js]
-[test_servicerequest_xhr.js]
diff --git a/toolkit/modules/tests/xpcshell/zips/zen.zip b/toolkit/modules/tests/xpcshell/zips/zen.zip
deleted file mode 100644
index 4756247936..0000000000
--- a/toolkit/modules/tests/xpcshell/zips/zen.zip
+++ /dev/null
Binary files differ
diff --git a/toolkit/moz.build b/toolkit/moz.build
index b02d122cd7..9c5102a013 100644
--- a/toolkit/moz.build
+++ b/toolkit/moz.build
@@ -27,16 +27,15 @@ if CONFIG['MOZ_JETPACK']:
DIRS += ['mozapps/extensions']
-if CONFIG['MOZ_UPDATER'] and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
+if CONFIG['MOZ_UPDATER']:
DIRS += ['mozapps/update']
-
-if CONFIG['MOZ_UPDATER'] and CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
-# Including mozapps/update/common-standalone allows the maintenance service
-# to be built so the maintenance service can be used for things other than
-# updating applications.
- DIRS += [
- 'mozapps/update/common-standalone',
- ]
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
+ # Including mozapps/update/common-standalone allows the maintenance service
+ # to be built so the maintenance service can be used for things other than
+ # updating applications.
+ DIRS += [
+ 'mozapps/update/common-standalone',
+ ]
DIRS += ['xre']
@@ -46,14 +45,3 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
DIRS += ['system/osxproxy']
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
DIRS += ['system/windowsproxy']
-elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
- DIRS += ['system/androidproxy']
-
-with Files('mozapps/installer/windows/*'):
- BUG_COMPONENT = ('Toolkit', 'NSIS Installer')
-
-with Files('pluginproblem/*'):
- BUG_COMPONENT = ('Core', 'Plug-ins')
-
-with Files('mozapps/preferences/*'):
- BUG_COMPONENT = ('Toolkit', 'Preferences')
diff --git a/toolkit/moz.configure b/toolkit/moz.configure
index 792fb113d0..128402257f 100644
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -14,9 +14,6 @@ option('--enable-systrace', env='MOZ_USE_SYSTRACE',
@depends('--enable-systrace', target)
def systrace(value, target):
- if value and target.os != 'Android':
- die('--enable-systrace cannot be used when targeting %s',
- target.os)
if value:
return True
@@ -66,7 +63,7 @@ set_config('L10NBASEDIR', l10n_base)
# reason.
option('--enable-default-toolkit', nargs=1,
choices=('cairo-windows', 'cairo-gtk2', 'cairo-gtk2-x11', 'cairo-gtk3',
- 'cairo-cocoa', 'cairo-uikit', 'cairo-android'),
+ 'cairo-cocoa', 'cairo-uikit'),
help='Select default toolkit')
@depends('--enable-default-toolkit', target)
@@ -80,13 +77,6 @@ def toolkit(value, target):
platform_choices = ('cairo-cocoa',)
elif target.os == 'iOS':
platform_choices = ('cairo-uikit',)
- elif target.os == 'Android':
- if value.origin == 'implied':
- # Trust values coming from imply_option() (used in
- # b2g/moz.configure).
- platform_choices = tuple(value)
- else:
- platform_choices = ('cairo-android',)
else:
platform_choices = ('cairo-gtk3', 'cairo-gtk2', 'cairo-gtk2-x11')
@@ -185,7 +175,7 @@ set_define(gl_provider_define, True)
# ==============================================================
@depends(toolkit)
def pdf_printing(toolkit):
- if toolkit in ('windows', 'gtk2', 'gtk3', 'android'):
+ if toolkit in ('windows', 'gtk2', 'gtk3'):
return True
@depends(pdf_printing)
@@ -207,8 +197,7 @@ option(env='MOZ_INSTRUMENT_EVENT_LOOP',
@depends('MOZ_INSTRUMENT_EVENT_LOOP', toolkit)
def instrument_event_loop(value, toolkit):
- if value or (toolkit in ('windows', 'gtk2', 'gtk3', 'cocoa',
- 'android') and value.origin == 'default'):
+ if value or (toolkit in ('windows', 'gtk2', 'gtk3', 'cocoa') and value.origin == 'default'):
return True
set_config('MOZ_INSTRUMENT_EVENT_LOOP', instrument_event_loop)
@@ -266,8 +255,7 @@ add_old_configure_assignment('_HAVE_FREETYPE2',
# ==============================================================
@depends(target)
def tree_freetype(target):
- if target.os == 'Android':
- return True
+ return None
set_define('MOZ_TREE_FREETYPE', tree_freetype)
set_config('MOZ_TREE_FREETYPE', tree_freetype)
@@ -332,7 +320,7 @@ option('--disable-ffmpeg',
def ffmpeg(value, target):
enabled = bool(value)
if value.origin == 'default':
- enabled = target.os not in ('Android', 'WINNT')
+ enabled = target.os not in ('WINNT')
if enabled:
return True
@@ -349,8 +337,7 @@ option('--disable-fmp4', env='MOZ_FMP4',
def fmp4(value, target, wmf, applemedia):
enabled = bool(value)
if value.origin == 'default':
- # target.os == 'Android' includes all B2G versions
- enabled = wmf or applemedia or target.os == 'Android'
+ enabled = wmf or applemedia
if enabled:
return True
@@ -390,7 +377,7 @@ set_config('MOZ_PACKAGER_FORMAT', packager_format)
def jar_maker_format(host, build_project):
# Multilocales for mobile/android use the same mergedirs for all locales,
# so we can't use symlinks for those builds.
- if host.os == 'WINNT' or build_project == 'mobile/android':
+ if host.os == 'WINNT':
return 'flat'
return 'symlink'
@@ -398,23 +385,10 @@ set_config('MOZ_JAR_MAKER_FILE_FORMAT', jar_maker_format)
@depends(toolkit)
def omnijar_name(toolkit):
- # Fennec's static resources live in the assets/ folder of the
- # APK. Adding a path to the name here works because we only
- # have one omnijar file in the final package (which is not the
- # case on desktop), and necessitates some contortions during
- # packaging so that the resources in the omnijar are considered
- # as rooted at / and not as rooted at assets/ (which again is
- # not the case on desktop: there are omnijars rooted at webrtc/,
- # etc). packager.mk handles changing the rooting of the single
- # omnijar.
- return 'assets/omni.ja' if toolkit == 'android' else 'omni.ja'
+ return 'omni.ja'
set_config('OMNIJAR_NAME', omnijar_name)
-project_flag('MOZ_ANDROID_HISTORY',
- help='Enable Android History instead of Places',
- set_as_define=True)
-
# Permissions system
# ==============================================================
option(name='--disable-permissions',
@@ -585,8 +559,6 @@ option('--enable-ipdl-tests', help='Enable expensive IPDL tests')
set_config('MOZ_IPDL_TESTS',
depends_if('--enable-ipdl-tests')(lambda _: True))
-include('nss.configure')
-
# Network protocol support
# ==============================================================
@depends(check_build_environment, '--help')
@@ -667,13 +639,6 @@ set_config('MOZ_ENABLE_SKIA', skia)
set_define('MOZ_ENABLE_SKIA', skia)
set_define('USE_SKIA', skia)
-@depends(skia, target)
-def skia_android(skia, target):
- if skia and target.os == 'Android':
- return True
-
-set_define('SK_BUILD_FOR_ANDROID_NDK', skia_android)
-
option('--disable-skia-gpu', help='Disable use of Skia-GPU')
@depends('--disable-skia-gpu', skia, target)
diff --git a/toolkit/mozapps/downloads/moz.build b/toolkit/mozapps/downloads/moz.build
index 9ad0814750..48741710ac 100644
--- a/toolkit/mozapps/downloads/moz.build
+++ b/toolkit/mozapps/downloads/moz.build
@@ -4,15 +4,9 @@
# 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/.
-TEST_DIRS += ['tests']
+EXTRA_COMPONENTS += ['nsHelperAppDlg.manifest']
-EXTRA_COMPONENTS += [
- 'nsHelperAppDlg.manifest',
-]
-
-EXTRA_PP_COMPONENTS += [
- 'nsHelperAppDlg.js',
-]
+EXTRA_PP_COMPONENTS += ['nsHelperAppDlg.js']
EXTRA_JS_MODULES += [
'DownloadLastDir.jsm',
diff --git a/toolkit/mozapps/downloads/tests/chrome/.eslintrc.js b/toolkit/mozapps/downloads/tests/chrome/.eslintrc.js
deleted file mode 100644
index 8c0f4f574c..0000000000
--- a/toolkit/mozapps/downloads/tests/chrome/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/mochitest/chrome.eslintrc.js"
- ]
-};
diff --git a/toolkit/mozapps/downloads/tests/chrome/chrome.ini b/toolkit/mozapps/downloads/tests/chrome/chrome.ini
deleted file mode 100644
index b5a29cb450..0000000000
--- a/toolkit/mozapps/downloads/tests/chrome/chrome.ini
+++ /dev/null
@@ -1,10 +0,0 @@
-[DEFAULT]
-skip-if = os == 'android'
-support-files =
- unknownContentType_dialog_layout_data.pif
- unknownContentType_dialog_layout_data.pif^headers^
- unknownContentType_dialog_layout_data.txt
- unknownContentType_dialog_layout_data.txt^headers^
-
-[test_unknownContentType_delayedbutton.xul]
-[test_unknownContentType_dialog_layout.xul]
diff --git a/toolkit/mozapps/downloads/tests/chrome/test_unknownContentType_delayedbutton.xul b/toolkit/mozapps/downloads/tests/chrome/test_unknownContentType_delayedbutton.xul
deleted file mode 100644
index 9bbec0f92f..0000000000
--- a/toolkit/mozapps/downloads/tests/chrome/test_unknownContentType_delayedbutton.xul
+++ /dev/null
@@ -1,117 +0,0 @@
-<?xml version="1.0"?>
-<!-- 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/. -->
-<!--
- * The unknownContentType popup can have two different layouts depending on
- * whether a helper application can be selected or not.
- * This tests that both layouts have correct collapsed elements.
--->
-
-<window title="Unknown Content Type Dialog Test"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="doTest()">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
- <script type="application/javascript"><![CDATA[
- const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
-
- Cu.import("resource://gre/modules/Services.jsm");
- Cu.import("resource://gre/modules/Task.jsm");
- Cu.import("resource://gre/modules/Promise.jsm");
-
- const UCT_URI = "chrome://mozapps/content/downloads/unknownContentType.xul";
- const LOAD_URI = "http://mochi.test:8888/chrome/toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.txt";
-
- const DIALOG_DELAY = Services.prefs.getIntPref("security.dialog_enable_delay") + 200;
-
- let UCTObserver = {
- opened: Promise.defer(),
- closed: Promise.defer(),
-
- observe: function(aSubject, aTopic, aData) {
- let win = aSubject.QueryInterface(Ci.nsIDOMEventTarget);
-
- switch (aTopic) {
- case "domwindowopened":
- win.addEventListener("load", function onLoad(event) {
- win.removeEventListener("load", onLoad, false);
-
- // Let the dialog initialize
- SimpleTest.executeSoon(function() {
- UCTObserver.opened.resolve(win);
- });
- }, false);
- break;
-
- case "domwindowclosed":
- if (win.location == UCT_URI) {
- this.closed.resolve();
- }
- break;
- }
- }
- };
-
- Services.ww.registerNotification(UCTObserver);
- SimpleTest.waitForExplicitFinish();
- SimpleTest.requestFlakyTimeout("This test is testing a timing-based feature, so it really needs to wait a certain amount of time to verify that the feature worked.");
-
- function waitDelay(delay) {
- return new Promise((resolve, reject) => {
- window.setTimeout(resolve, delay);
- });
- }
-
- function doTest() {
- Task.spawn(function test_aboutCrashed() {
- let frame = document.getElementById("testframe");
- frame.setAttribute("src", LOAD_URI);
-
- let uctWindow = yield UCTObserver.opened.promise;
- let ok = uctWindow.document.documentElement.getButton("accept");
-
- SimpleTest.is(ok.disabled, true, "button started disabled");
-
- yield waitDelay(DIALOG_DELAY);
-
- SimpleTest.is(ok.disabled, false, "button was enabled");
-
- focusOutOfDialog = SimpleTest.promiseFocus(window);
- window.focus();
- yield focusOutOfDialog;
-
- SimpleTest.is(ok.disabled, true, "button was disabled");
-
- focusOnDialog = SimpleTest.promiseFocus(uctWindow);
- uctWindow.focus();
- yield focusOnDialog;
-
- SimpleTest.is(ok.disabled, true, "button remained disabled");
-
- yield waitDelay(DIALOG_DELAY);
- SimpleTest.is(ok.disabled, false, "button re-enabled after delay");
-
- uctWindow.document.documentElement.cancelDialog();
- yield UCTObserver.closed.promise;
-
- Services.ww.unregisterNotification(UCTObserver);
- uctWindow = null;
- UCTObserver = null;
- SimpleTest.finish();
- });
- }
- ]]></script>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display:none;"></div>
- <pre id="test"></pre>
- </body>
-
- <iframe xmlns="http://www.w3.org/1999/xhtml"
- id="testframe">
- </iframe>
-</window>
diff --git a/toolkit/mozapps/downloads/tests/chrome/test_unknownContentType_dialog_layout.xul b/toolkit/mozapps/downloads/tests/chrome/test_unknownContentType_dialog_layout.xul
deleted file mode 100644
index 1210b908dd..0000000000
--- a/toolkit/mozapps/downloads/tests/chrome/test_unknownContentType_dialog_layout.xul
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0"?>
-<!-- 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/. -->
-<!--
- * The unknownContentType popup can have two different layouts depending on
- * whether a helper application can be selected or not.
- * This tests that both layouts have correct collapsed elements.
--->
-
-<window title="Unknown Content Type Dialog Test"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="init()">
-
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
- <script type="application/javascript">
- <![CDATA[
-const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
-
-const UCT_URI = "chrome://mozapps/content/downloads/unknownContentType.xul";
-
-let testIndex = -1;
-let tests = [
- { // This URL will trigger the simple UI, where only the Save an Cancel buttons are available
- url: "http://mochi.test:8888/chrome/toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.pif",
- elements: {
- basicBox: { collapsed: false },
- normalBox: { collapsed: true }
- }
- },
- { // This URL will trigger the full UI
- url: "http://mochi.test:8888/chrome/toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.txt",
- elements: {
- basicBox: { collapsed: true },
- normalBox: { collapsed: false }
- }
- }
-];
-
-let ww = Cc["@mozilla.org/embedcomp/window-watcher;1"].
- getService(Ci.nsIWindowWatcher);
-
-SimpleTest.waitForExplicitFinish();
-
-let windowObserver = {
- observe: function(aSubject, aTopic, aData) {
- let win = aSubject.QueryInterface(Ci.nsIDOMEventTarget);
-
- if (aTopic == "domwindowclosed") {
- if (win.location == UCT_URI)
- loadNextTest();
- return;
- }
-
- // domwindowopened
- win.addEventListener("load", function onLoad(event) {
- win.removeEventListener("load", onLoad, false);
-
- // Let the dialog initialize
- SimpleTest.executeSoon(function() {
- checkWindow(win);
- });
- }, false);
- }
-};
-
-function init() {
- ww.registerNotification(windowObserver);
- loadNextTest();
-}
-
-function loadNextTest() {
- if (!tests[++testIndex]) {
- ww.unregisterNotification(windowObserver);
- SimpleTest.finish();
- return;
- }
- let frame = document.getElementById("testframe");
- frame.setAttribute("src", tests[testIndex].url);
-}
-
-function checkWindow(win) {
- for (let [id, props] of Object.entries(tests[testIndex].elements)) {
- let elem = win.dialog.dialogElement(id);
- for (let [prop, value] of Object.entries(props)) {
- is(elem[prop], value,
- "Element with id " + id + " has property " +
- prop + " set to " + value);
- }
- }
- win.document.documentElement.cancelDialog();
-}
-
- ]]>
- </script>
-
- <body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display:none;"></div>
- <pre id="test"></pre>
- </body>
-
- <iframe xmlns="http://www.w3.org/1999/xhtml"
- id="testframe">
- </iframe>
-</window>
diff --git a/toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.pif b/toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.pif
deleted file mode 100644
index 9353d13126..0000000000
--- a/toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.pif
+++ /dev/null
@@ -1 +0,0 @@
-Dummy content for unknownContentType_dialog_layout_data.pif
diff --git a/toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.pif^headers^ b/toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.pif^headers^
deleted file mode 100644
index 09b22facc0..0000000000
--- a/toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.pif^headers^
+++ /dev/null
@@ -1 +0,0 @@
-Content-Type: application/octet-stream
diff --git a/toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.txt b/toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.txt
deleted file mode 100644
index 77e7195596..0000000000
--- a/toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.txt
+++ /dev/null
@@ -1 +0,0 @@
-Dummy content for unknownContentType_dialog_layout_data.txt
diff --git a/toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.txt^headers^ b/toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.txt^headers^
deleted file mode 100644
index 2a3c472e26..0000000000
--- a/toolkit/mozapps/downloads/tests/chrome/unknownContentType_dialog_layout_data.txt^headers^
+++ /dev/null
@@ -1,2 +0,0 @@
-Content-Type: text/plain
-Content-Disposition: attachment
diff --git a/toolkit/mozapps/downloads/tests/moz.build b/toolkit/mozapps/downloads/tests/moz.build
deleted file mode 100644
index a4b1efb9aa..0000000000
--- a/toolkit/mozapps/downloads/tests/moz.build
+++ /dev/null
@@ -1,8 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
-MOCHITEST_CHROME_MANIFESTS += ['chrome/chrome.ini']
diff --git a/toolkit/mozapps/downloads/tests/unit/.eslintrc.js b/toolkit/mozapps/downloads/tests/unit/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/mozapps/downloads/tests/unit/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/mozapps/downloads/tests/unit/head_downloads.js b/toolkit/mozapps/downloads/tests/unit/head_downloads.js
deleted file mode 100644
index 4f199e5cf3..0000000000
--- a/toolkit/mozapps/downloads/tests/unit/head_downloads.js
+++ /dev/null
@@ -1,5 +0,0 @@
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-do_register_cleanup(function() {
- Services.obs.notifyObservers(null, "quit-application", null);
-});
diff --git a/toolkit/mozapps/downloads/tests/unit/test_DownloadPaths.js b/toolkit/mozapps/downloads/tests/unit/test_DownloadPaths.js
deleted file mode 100644
index 77249169d7..0000000000
--- a/toolkit/mozapps/downloads/tests/unit/test_DownloadPaths.js
+++ /dev/null
@@ -1,131 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80 filetype=javascript: */
-/* ***** BEGIN LICENSE BLOCK *****
- *
- * Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- *
- * ***** END LICENSE BLOCK ***** */
-
-/**
- * Tests for the "DownloadPaths.jsm" JavaScript module.
- */
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cu = Components.utils;
-var Cr = Components.results;
-
-Cu.import("resource://gre/modules/DownloadPaths.jsm");
-
-/**
- * Provides a temporary save directory.
- *
- * @returns nsIFile pointing to the new or existing directory.
- */
-function createTemporarySaveDirectory()
-{
- var saveDir = Cc["@mozilla.org/file/directory_service;1"].
- getService(Ci.nsIProperties).get("TmpD", Ci.nsIFile);
- saveDir.append("testsavedir");
- if (!saveDir.exists()) {
- saveDir.create(Ci.nsIFile.DIRECTORY_TYPE, 0o755);
- }
- return saveDir;
-}
-
-function testSplitBaseNameAndExtension(aLeafName, [aBase, aExt])
-{
- var [base, ext] = DownloadPaths.splitBaseNameAndExtension(aLeafName);
- do_check_eq(base, aBase);
- do_check_eq(ext, aExt);
-
- // If we modify the base name and concatenate it with the extension again,
- // another roundtrip through the function should give a consistent result.
- // The only exception is when we introduce an extension in a file name that
- // didn't have one or that ended with one of the special cases like ".gz". If
- // we avoid using a dot and we introduce at least another special character,
- // the results are always consistent.
- [base, ext] = DownloadPaths.splitBaseNameAndExtension("(" + base + ")" + ext);
- do_check_eq(base, "(" + aBase + ")");
- do_check_eq(ext, aExt);
-}
-
-function testCreateNiceUniqueFile(aTempFile, aExpectedLeafName)
-{
- var createdFile = DownloadPaths.createNiceUniqueFile(aTempFile);
- do_check_eq(createdFile.leafName, aExpectedLeafName);
-}
-
-function run_test()
-{
- // Usual file names.
- testSplitBaseNameAndExtension("base", ["base", ""]);
- testSplitBaseNameAndExtension("base.ext", ["base", ".ext"]);
- testSplitBaseNameAndExtension("base.application", ["base", ".application"]);
- testSplitBaseNameAndExtension("base.x.Z", ["base", ".x.Z"]);
- testSplitBaseNameAndExtension("base.ext.Z", ["base", ".ext.Z"]);
- testSplitBaseNameAndExtension("base.ext.gz", ["base", ".ext.gz"]);
- testSplitBaseNameAndExtension("base.ext.Bz2", ["base", ".ext.Bz2"]);
- testSplitBaseNameAndExtension("base..ext", ["base.", ".ext"]);
- testSplitBaseNameAndExtension("base..Z", ["base.", ".Z"]);
- testSplitBaseNameAndExtension("base. .Z", ["base. ", ".Z"]);
- testSplitBaseNameAndExtension("base.base.Bz2", ["base.base", ".Bz2"]);
- testSplitBaseNameAndExtension("base .ext", ["base ", ".ext"]);
-
- // Corner cases. A name ending with a dot technically has no extension, but
- // we consider the ending dot separately from the base name so that modifying
- // the latter never results in an extension being introduced accidentally.
- // Names beginning with a dot are hidden files on Unix-like platforms and if
- // their name doesn't contain another dot they should have no extension, but
- // on Windows the whole name is considered as an extension.
- testSplitBaseNameAndExtension("base.", ["base", "."]);
- testSplitBaseNameAndExtension(".ext", ["", ".ext"]);
-
- // Unusual file names (not recommended as input to the function).
- testSplitBaseNameAndExtension("base. ", ["base", ". "]);
- testSplitBaseNameAndExtension("base ", ["base ", ""]);
- testSplitBaseNameAndExtension("", ["", ""]);
- testSplitBaseNameAndExtension(" ", [" ", ""]);
- testSplitBaseNameAndExtension(" . ", [" ", ". "]);
- testSplitBaseNameAndExtension(" .. ", [" .", ". "]);
- testSplitBaseNameAndExtension(" .ext", [" ", ".ext"]);
- testSplitBaseNameAndExtension(" .ext. ", [" .ext", ". "]);
- testSplitBaseNameAndExtension(" .ext.gz ", [" .ext", ".gz "]);
-
- var destDir = createTemporarySaveDirectory();
- try {
- // Single extension.
- var tempFile = destDir.clone();
- tempFile.append("test.txt");
- testCreateNiceUniqueFile(tempFile, "test.txt");
- testCreateNiceUniqueFile(tempFile, "test(1).txt");
- testCreateNiceUniqueFile(tempFile, "test(2).txt");
-
- // Double extension.
- tempFile.leafName = "test.tar.gz";
- testCreateNiceUniqueFile(tempFile, "test.tar.gz");
- testCreateNiceUniqueFile(tempFile, "test(1).tar.gz");
- testCreateNiceUniqueFile(tempFile, "test(2).tar.gz");
-
- // Test automatic shortening of long file names. We don't know exactly how
- // many characters are removed, because it depends on the name of the folder
- // where the file is located.
- tempFile.leafName = new Array(256).join("T") + ".txt";
- var newFile = DownloadPaths.createNiceUniqueFile(tempFile);
- do_check_true(newFile.leafName.length < tempFile.leafName.length);
- do_check_eq(newFile.leafName.slice(-4), ".txt");
-
- // Creating a valid file name from an invalid one is not always possible.
- tempFile.append("file-under-long-directory.txt");
- try {
- DownloadPaths.createNiceUniqueFile(tempFile);
- do_throw("Exception expected with a long parent directory name.")
- } catch (e) {
- // An exception is expected, but we don't know which one exactly.
- }
- } finally {
- // Clean up the temporary directory.
- destDir.remove(true);
- }
-}
diff --git a/toolkit/mozapps/downloads/tests/unit/test_DownloadUtils.js b/toolkit/mozapps/downloads/tests/unit/test_DownloadUtils.js
deleted file mode 100644
index 11e7776a74..0000000000
--- a/toolkit/mozapps/downloads/tests/unit/test_DownloadUtils.js
+++ /dev/null
@@ -1,237 +0,0 @@
-/* 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/. */
-
-var Cu = Components.utils;
-Cu.import("resource://gre/modules/DownloadUtils.jsm");
-
-const gDecimalSymbol = Number(5.4).toLocaleString().match(/\D/);
-function _(str) {
- return str.replace(/\./g, gDecimalSymbol);
-}
-
-function testConvertByteUnits(aBytes, aValue, aUnit)
-{
- let [value, unit] = DownloadUtils.convertByteUnits(aBytes);
- do_check_eq(value, aValue);
- do_check_eq(unit, aUnit);
-}
-
-function testTransferTotal(aCurrBytes, aMaxBytes, aTransfer)
-{
- let transfer = DownloadUtils.getTransferTotal(aCurrBytes, aMaxBytes);
- do_check_eq(transfer, aTransfer);
-}
-
-// Get the em-dash character because typing it directly here doesn't work :(
-var gDash = DownloadUtils.getDownloadStatus(0)[0].match(/remaining (.) 0 bytes/)[1];
-
-var gVals = [0, 100, 2345, 55555, 982341, 23194134, 1482, 58, 9921949201, 13498132, Infinity];
-
-function testStatus(aFunc, aCurr, aMore, aRate, aTest)
-{
- dump("Status Test: " + [aCurr, aMore, aRate, aTest] + "\n");
- let curr = gVals[aCurr];
- let max = curr + gVals[aMore];
- let speed = gVals[aRate];
-
- let [status, last] = aFunc(curr, max, speed);
-
- if (0) {
- dump("testStatus(" + aCurr + ", " + aMore + ", " + aRate + ", [\"" +
- status.replace(gDash, "--") + "\", " + last.toFixed(3) + "]);\n");
- }
-
- // Make sure the status text matches
- do_check_eq(status, _(aTest[0].replace(/--/, gDash)));
-
- // Make sure the lastSeconds matches
- if (last == Infinity)
- do_check_eq(last, aTest[1]);
- else
- do_check_true(Math.abs(last - aTest[1]) < .1);
-}
-
-function testURI(aURI, aDisp, aHost)
-{
- dump("URI Test: " + [aURI, aDisp, aHost] + "\n");
-
- let [disp, host] = DownloadUtils.getURIHost(aURI);
-
- // Make sure we have the right display host and full host
- do_check_eq(disp, aDisp);
- do_check_eq(host, aHost);
-}
-
-
-function testGetReadableDates(aDate, aCompactValue)
-{
- const now = new Date(2000, 11, 31, 11, 59, 59);
-
- let [dateCompact] = DownloadUtils.getReadableDates(aDate, now);
- do_check_eq(dateCompact, aCompactValue);
-}
-
-function testAllGetReadableDates()
-{
- // This test cannot depend on the current date and time, or the date format.
- // It depends on being run with the English localization, however.
- const today_11_30 = new Date(2000, 11, 31, 11, 30, 15);
- const today_12_30 = new Date(2000, 11, 31, 12, 30, 15);
- const yesterday_11_30 = new Date(2000, 11, 30, 11, 30, 15);
- const yesterday_12_30 = new Date(2000, 11, 30, 12, 30, 15);
- const twodaysago = new Date(2000, 11, 29, 11, 30, 15);
- const sixdaysago = new Date(2000, 11, 25, 11, 30, 15);
- const sevendaysago = new Date(2000, 11, 24, 11, 30, 15);
-
- // TODO: Remove Intl fallback when bug 1215247 is fixed.
- const locale = typeof Intl === "undefined"
- ? undefined
- : Components.classes["@mozilla.org/chrome/chrome-registry;1"]
- .getService(Components.interfaces.nsIXULChromeRegistry)
- .getSelectedLocale("global", true);
-
- let dts = Components.classes["@mozilla.org/intl/scriptabledateformat;1"].
- getService(Components.interfaces.nsIScriptableDateFormat);
-
- testGetReadableDates(today_11_30, dts.FormatTime("", dts.timeFormatNoSeconds,
- 11, 30, 0));
- testGetReadableDates(today_12_30, dts.FormatTime("", dts.timeFormatNoSeconds,
- 12, 30, 0));
- testGetReadableDates(yesterday_11_30, "Yesterday");
- testGetReadableDates(yesterday_12_30, "Yesterday");
- testGetReadableDates(twodaysago,
- typeof Intl === "undefined"
- ? twodaysago.toLocaleFormat("%A")
- : twodaysago.toLocaleDateString(locale, { weekday: "long" }));
- testGetReadableDates(sixdaysago,
- typeof Intl === "undefined"
- ? sixdaysago.toLocaleFormat("%A")
- : sixdaysago.toLocaleDateString(locale, { weekday: "long" }));
- testGetReadableDates(sevendaysago,
- (typeof Intl === "undefined"
- ? sevendaysago.toLocaleFormat("%B")
- : sevendaysago.toLocaleDateString(locale, { month: "long" })) + " " +
- sevendaysago.getDate().toString().padStart(2, "0"));
-
- let [, dateTimeFull] = DownloadUtils.getReadableDates(today_11_30);
- do_check_eq(dateTimeFull, dts.FormatDateTime("", dts.dateFormatLong,
- dts.timeFormatNoSeconds,
- 2000, 12, 31, 11, 30, 0));
-}
-
-function run_test()
-{
- testConvertByteUnits(-1, "-1", "bytes");
- testConvertByteUnits(1, _("1"), "bytes");
- testConvertByteUnits(42, _("42"), "bytes");
- testConvertByteUnits(123, _("123"), "bytes");
- testConvertByteUnits(1024, _("1.0"), "KB");
- testConvertByteUnits(8888, _("8.7"), "KB");
- testConvertByteUnits(59283, _("57.9"), "KB");
- testConvertByteUnits(640000, _("625"), "KB");
- testConvertByteUnits(1048576, _("1.0"), "MB");
- testConvertByteUnits(307232768, _("293"), "MB");
- testConvertByteUnits(1073741824, _("1.0"), "GB");
-
- testTransferTotal(1, 1, _("1 of 1 bytes"));
- testTransferTotal(234, 4924, _("234 bytes of 4.8 KB"));
- testTransferTotal(94923, 233923, _("92.7 of 228 KB"));
- testTransferTotal(4924, 94923, _("4.8 of 92.7 KB"));
- testTransferTotal(2342, 294960345, _("2.3 KB of 281 MB"));
- testTransferTotal(234, undefined, _("234 bytes"));
- testTransferTotal(4889023, undefined, _("4.7 MB"));
-
- if (0) {
- // Help find some interesting test cases
- let r = () => Math.floor(Math.random() * 10);
- for (let i = 0; i < 100; i++) {
- testStatus(r(), r(), r());
- }
- }
-
- // First, test with rates, via getDownloadStatus...
- let statusFunc = DownloadUtils.getDownloadStatus.bind(DownloadUtils);
-
- testStatus(statusFunc, 2, 1, 7, ["A few seconds remaining -- 2.3 of 2.4 KB (58 bytes/sec)", 1.724]);
- testStatus(statusFunc, 1, 2, 6, ["A few seconds remaining -- 100 bytes of 2.4 KB (1.4 KB/sec)", 1.582]);
- testStatus(statusFunc, 4, 3, 9, ["A few seconds remaining -- 959 KB of 1.0 MB (12.9 MB/sec)", 0.004]);
- testStatus(statusFunc, 2, 3, 8, ["A few seconds remaining -- 2.3 of 56.5 KB (9.2 GB/sec)", 0.000]);
-
- testStatus(statusFunc, 8, 4, 3, ["17 seconds remaining -- 9.2 of 9.2 GB (54.3 KB/sec)", 17.682]);
- testStatus(statusFunc, 1, 3, 2, ["23 seconds remaining -- 100 bytes of 54.4 KB (2.3 KB/sec)", 23.691]);
- testStatus(statusFunc, 9, 3, 2, ["23 seconds remaining -- 12.9 of 12.9 MB (2.3 KB/sec)", 23.691]);
- testStatus(statusFunc, 5, 6, 7, ["25 seconds remaining -- 22.1 of 22.1 MB (58 bytes/sec)", 25.552]);
-
- testStatus(statusFunc, 3, 9, 3, ["4 minutes remaining -- 54.3 KB of 12.9 MB (54.3 KB/sec)", 242.969]);
- testStatus(statusFunc, 2, 3, 1, ["9 minutes remaining -- 2.3 of 56.5 KB (100 bytes/sec)", 555.550]);
- testStatus(statusFunc, 4, 3, 7, ["15 minutes remaining -- 959 KB of 1.0 MB (58 bytes/sec)", 957.845]);
- testStatus(statusFunc, 5, 3, 7, ["15 minutes remaining -- 22.1 of 22.2 MB (58 bytes/sec)", 957.845]);
-
- testStatus(statusFunc, 1, 9, 2, ["1 hour, 35 minutes remaining -- 100 bytes of 12.9 MB (2.3 KB/sec)", 5756.133]);
- testStatus(statusFunc, 2, 9, 6, ["2 hours, 31 minutes remaining -- 2.3 KB of 12.9 MB (1.4 KB/sec)", 9108.051]);
- testStatus(statusFunc, 2, 4, 1, ["2 hours, 43 minutes remaining -- 2.3 of 962 KB (100 bytes/sec)", 9823.410]);
- testStatus(statusFunc, 6, 4, 7, ["4 hours, 42 minutes remaining -- 1.4 of 961 KB (58 bytes/sec)", 16936.914]);
-
- testStatus(statusFunc, 6, 9, 1, ["1 day, 13 hours remaining -- 1.4 KB of 12.9 MB (100 bytes/sec)", 134981.320]);
- testStatus(statusFunc, 3, 8, 3, ["2 days, 1 hour remaining -- 54.3 KB of 9.2 GB (54.3 KB/sec)", 178596.872]);
- testStatus(statusFunc, 1, 8, 6, ["77 days, 11 hours remaining -- 100 bytes of 9.2 GB (1.4 KB/sec)", 6694972.470]);
- testStatus(statusFunc, 6, 8, 7, ["1979 days, 22 hours remaining -- 1.4 KB of 9.2 GB (58 bytes/sec)", 171068089.672]);
-
- testStatus(statusFunc, 0, 0, 5, ["Unknown time remaining -- 0 of 0 bytes (22.1 MB/sec)", Infinity]);
- testStatus(statusFunc, 0, 6, 0, ["Unknown time remaining -- 0 bytes of 1.4 KB (0 bytes/sec)", Infinity]);
- testStatus(statusFunc, 6, 6, 0, ["Unknown time remaining -- 1.4 of 2.9 KB (0 bytes/sec)", Infinity]);
- testStatus(statusFunc, 8, 5, 0, ["Unknown time remaining -- 9.2 of 9.3 GB (0 bytes/sec)", Infinity]);
-
- // With rate equal to Infinity
- testStatus(statusFunc, 0, 0, 10, ["Unknown time remaining -- 0 of 0 bytes (Really fast)", Infinity]);
- testStatus(statusFunc, 1, 2, 10, ["A few seconds remaining -- 100 bytes of 2.4 KB (Really fast)", 0]);
-
- // Now test without rates, via getDownloadStatusNoRate.
- statusFunc = DownloadUtils.getDownloadStatusNoRate.bind(DownloadUtils);
-
- testStatus(statusFunc, 2, 1, 7, ["A few seconds remaining -- 2.3 of 2.4 KB", 1.724]);
- testStatus(statusFunc, 1, 2, 6, ["A few seconds remaining -- 100 bytes of 2.4 KB", 1.582]);
- testStatus(statusFunc, 4, 3, 9, ["A few seconds remaining -- 959 KB of 1.0 MB", 0.004]);
- testStatus(statusFunc, 2, 3, 8, ["A few seconds remaining -- 2.3 of 56.5 KB", 0.000]);
-
- testStatus(statusFunc, 8, 4, 3, ["17 seconds remaining -- 9.2 of 9.2 GB", 17.682]);
- testStatus(statusFunc, 1, 3, 2, ["23 seconds remaining -- 100 bytes of 54.4 KB", 23.691]);
- testStatus(statusFunc, 9, 3, 2, ["23 seconds remaining -- 12.9 of 12.9 MB", 23.691]);
- testStatus(statusFunc, 5, 6, 7, ["25 seconds remaining -- 22.1 of 22.1 MB", 25.552]);
-
- testStatus(statusFunc, 3, 9, 3, ["4 minutes remaining -- 54.3 KB of 12.9 MB", 242.969]);
- testStatus(statusFunc, 2, 3, 1, ["9 minutes remaining -- 2.3 of 56.5 KB", 555.550]);
- testStatus(statusFunc, 4, 3, 7, ["15 minutes remaining -- 959 KB of 1.0 MB", 957.845]);
- testStatus(statusFunc, 5, 3, 7, ["15 minutes remaining -- 22.1 of 22.2 MB", 957.845]);
-
- testStatus(statusFunc, 1, 9, 2, ["1 hour, 35 minutes remaining -- 100 bytes of 12.9 MB", 5756.133]);
- testStatus(statusFunc, 2, 9, 6, ["2 hours, 31 minutes remaining -- 2.3 KB of 12.9 MB", 9108.051]);
- testStatus(statusFunc, 2, 4, 1, ["2 hours, 43 minutes remaining -- 2.3 of 962 KB", 9823.410]);
- testStatus(statusFunc, 6, 4, 7, ["4 hours, 42 minutes remaining -- 1.4 of 961 KB", 16936.914]);
-
- testStatus(statusFunc, 6, 9, 1, ["1 day, 13 hours remaining -- 1.4 KB of 12.9 MB", 134981.320]);
- testStatus(statusFunc, 3, 8, 3, ["2 days, 1 hour remaining -- 54.3 KB of 9.2 GB", 178596.872]);
- testStatus(statusFunc, 1, 8, 6, ["77 days, 11 hours remaining -- 100 bytes of 9.2 GB", 6694972.470]);
- testStatus(statusFunc, 6, 8, 7, ["1979 days, 22 hours remaining -- 1.4 KB of 9.2 GB", 171068089.672]);
-
- testStatus(statusFunc, 0, 0, 5, ["Unknown time remaining -- 0 of 0 bytes", Infinity]);
- testStatus(statusFunc, 0, 6, 0, ["Unknown time remaining -- 0 bytes of 1.4 KB", Infinity]);
- testStatus(statusFunc, 6, 6, 0, ["Unknown time remaining -- 1.4 of 2.9 KB", Infinity]);
- testStatus(statusFunc, 8, 5, 0, ["Unknown time remaining -- 9.2 of 9.3 GB", Infinity]);
-
- testURI("http://www.mozilla.org/", "mozilla.org", "www.mozilla.org");
- testURI("http://www.city.mikasa.hokkaido.jp/", "city.mikasa.hokkaido.jp", "www.city.mikasa.hokkaido.jp");
- testURI("data:text/html,Hello World", "data resource", "data resource");
- testURI("jar:http://www.mozilla.com/file!/magic", "mozilla.com", "www.mozilla.com");
- testURI("file:///C:/Cool/Stuff/", "local file", "local file");
- // Don't test for moz-icon if we don't have a protocol handler for it (e.g. b2g):
- if ("@mozilla.org/network/protocol;1?name=moz-icon" in Components.classes) {
- testURI("moz-icon:file:///test.extension", "local file", "local file");
- testURI("moz-icon://.extension", "moz-icon resource", "moz-icon resource");
- }
- testURI("about:config", "about resource", "about resource");
- testURI("invalid.uri", "", "");
-
- testAllGetReadableDates();
-}
diff --git a/toolkit/mozapps/downloads/tests/unit/test_lowMinutes.js b/toolkit/mozapps/downloads/tests/unit/test_lowMinutes.js
deleted file mode 100644
index 75eff33706..0000000000
--- a/toolkit/mozapps/downloads/tests/unit/test_lowMinutes.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/* 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/. */
-
-/**
- * Test bug 448344 to make sure when we're in low minutes, we show both minutes
- * and seconds; but continue to show only minutes when we have plenty.
- */
-
-Components.utils.import("resource://gre/modules/DownloadUtils.jsm");
-
-/**
- * Print some debug message to the console. All arguments will be printed,
- * separated by spaces.
- *
- * @param [arg0, arg1, arg2, ...]
- * Any number of arguments to print out
- * @usage _("Hello World") -> prints "Hello World"
- * @usage _(1, 2, 3) -> prints "1 2 3"
- */
-var _ = function(some, debug, text, to) {
- print(Array.slice(arguments).join(" "));
-};
-
-_("Make an array of time lefts and expected string to be shown for that time");
-var expectedTimes = [
- [1.1, "A few seconds remaining", "under 4sec -> few"],
- [2.5, "A few seconds remaining", "under 4sec -> few"],
- [3.9, "A few seconds remaining", "under 4sec -> few"],
- [5.3, "5 seconds remaining", "truncate seconds"],
- [1.1 * 60, "1 minute, 6 seconds remaining", "under 4min -> show sec"],
- [2.5 * 60, "2 minutes, 30 seconds remaining", "under 4min -> show sec"],
- [3.9 * 60, "3 minutes, 54 seconds remaining", "under 4min -> show sec"],
- [5.3 * 60, "5 minutes remaining", "over 4min -> only show min"],
- [1.1 * 3600, "1 hour, 6 minutes remaining", "over 1hr -> show min/sec"],
- [2.5 * 3600, "2 hours, 30 minutes remaining", "over 1hr -> show min/sec"],
- [3.9 * 3600, "3 hours, 54 minutes remaining", "over 1hr -> show min/sec"],
- [5.3 * 3600, "5 hours, 18 minutes remaining", "over 1hr -> show min/sec"],
-];
-_(expectedTimes.join("\n"));
-
-function run_test()
-{
- expectedTimes.forEach(function([time, expectStatus, comment]) {
- _("Running test with time", time);
- _("Test comment:", comment);
- let [status, last] = DownloadUtils.getTimeLeft(time);
-
- _("Got status:", status, "last:", last);
- _("Expecting..", expectStatus);
- do_check_eq(status, expectStatus);
-
- _();
- });
-}
diff --git a/toolkit/mozapps/downloads/tests/unit/test_syncedDownloadUtils.js b/toolkit/mozapps/downloads/tests/unit/test_syncedDownloadUtils.js
deleted file mode 100644
index 86d810a9bb..0000000000
--- a/toolkit/mozapps/downloads/tests/unit/test_syncedDownloadUtils.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/* 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/. */
-
-/**
- * Test bug 420482 by making sure multiple consumers of DownloadUtils gets the
- * same time remaining time if they provide the same time left but a different
- * "last time".
- */
-
-var Cu = Components.utils;
-Cu.import("resource://gre/modules/DownloadUtils.jsm");
-
-function run_test()
-{
- // Simulate having multiple downloads requesting time left
- let downloadTimes = {};
- for (let time of [1, 30, 60, 3456, 9999])
- downloadTimes[time] = DownloadUtils.getTimeLeft(time)[0];
-
- // Pretend we're a download status bar also asking for a time left, but we're
- // using a different "last sec". We need to make sure we get the same time.
- let lastSec = 314;
- for (let [time, text] of Object.entries(downloadTimes))
- do_check_eq(DownloadUtils.getTimeLeft(time, lastSec)[0], text);
-}
diff --git a/toolkit/mozapps/downloads/tests/unit/test_unspecified_arguments.js b/toolkit/mozapps/downloads/tests/unit/test_unspecified_arguments.js
deleted file mode 100644
index 02e27c92c4..0000000000
--- a/toolkit/mozapps/downloads/tests/unit/test_unspecified_arguments.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/* 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/. */
-
-/**
- * Make sure passing null and nothing to various variable-arg DownloadUtils
- * methods provide the same result.
- */
-
-var Cu = Components.utils;
-Cu.import("resource://gre/modules/DownloadUtils.jsm");
-
-function run_test()
-{
- do_check_eq(DownloadUtils.getDownloadStatus(1000, null, null, null) + "",
- DownloadUtils.getDownloadStatus(1000) + "");
- do_check_eq(DownloadUtils.getDownloadStatus(1000, null, null) + "",
- DownloadUtils.getDownloadStatus(1000, null) + "");
-
- do_check_eq(DownloadUtils.getTransferTotal(1000, null) + "",
- DownloadUtils.getTransferTotal(1000) + "");
-
- do_check_eq(DownloadUtils.getTimeLeft(1000, null) + "",
- DownloadUtils.getTimeLeft(1000) + "");
-}
diff --git a/toolkit/mozapps/downloads/tests/unit/xpcshell.ini b/toolkit/mozapps/downloads/tests/unit/xpcshell.ini
deleted file mode 100644
index 877816ef63..0000000000
--- a/toolkit/mozapps/downloads/tests/unit/xpcshell.ini
+++ /dev/null
@@ -1,10 +0,0 @@
-[DEFAULT]
-head = head_downloads.js
-tail =
-skip-if = toolkit == 'android'
-
-[test_DownloadPaths.js]
-[test_DownloadUtils.js]
-[test_lowMinutes.js]
-[test_syncedDownloadUtils.js]
-[test_unspecified_arguments.js]
diff --git a/toolkit/mozapps/extensions/extensions.manifest b/toolkit/mozapps/extensions/extensions.manifest
index 7efb74a9d0..b56152e100 100644
--- a/toolkit/mozapps/extensions/extensions.manifest
+++ b/toolkit/mozapps/extensions/extensions.manifest
@@ -1,14 +1,16 @@
component {4399533d-08d1-458c-a87a-235f74451cfa} addonManager.js
contract @mozilla.org/addons/integration;1 {4399533d-08d1-458c-a87a-235f74451cfa}
category update-timer addonManager @mozilla.org/addons/integration;1,getService,addon-background-update-timer,extensions.update.interval,86400
+
component {7beb3ba8-6ec3-41b4-b67c-da89b8518922} amContentHandler.js
contract @mozilla.org/uriloader/content-handler;1?type=application/x-xpinstall {7beb3ba8-6ec3-41b4-b67c-da89b8518922}
+
component {0f38e086-89a3-40a5-8ffc-9b694de1d04a} amWebInstallListener.js
contract @mozilla.org/addons/web-install-listener;1 {0f38e086-89a3-40a5-8ffc-9b694de1d04a}
+
component {9df8ef2b-94da-45c9-ab9f-132eb55fddf1} amInstallTrigger.js
contract @mozilla.org/addons/installtrigger;1 {9df8ef2b-94da-45c9-ab9f-132eb55fddf1}
category JavaScript-global-property InstallTrigger @mozilla.org/addons/installtrigger;1
-#ifndef MOZ_WIDGET_ANDROID
+
category addon-provider-module PluginProvider resource://gre/modules/addons/PluginProvider.jsm
-#endif
category addon-provider-module GMPProvider resource://gre/modules/addons/GMPProvider.jsm
diff --git a/toolkit/mozapps/extensions/internal/moz.build b/toolkit/mozapps/extensions/internal/moz.build
index 337df3104e..12e95fb5a0 100644
--- a/toolkit/mozapps/extensions/internal/moz.build
+++ b/toolkit/mozapps/extensions/internal/moz.build
@@ -10,16 +10,11 @@ EXTRA_JS_MODULES.addons += [
'Content.js',
'GMPProvider.jsm',
'LightweightThemeImageOptimizer.jsm',
+ 'PluginProvider.jsm',
'ProductAddonChecker.jsm',
'SpellCheckDictionaryBootstrap.js',
]
-# Don't ship unused providers on Android
-if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
- EXTRA_JS_MODULES.addons += [
- 'PluginProvider.jsm',
- ]
-
EXTRA_PP_JS_MODULES.addons += [
'AddonRepository.jsm',
'AddonUpdateChecker.jsm',
diff --git a/toolkit/mozapps/installer/l10n-repack.py b/toolkit/mozapps/installer/l10n-repack.py
index 783c00b71c..fcf3e773cd 100644
--- a/toolkit/mozapps/installer/l10n-repack.py
+++ b/toolkit/mozapps/installer/l10n-repack.py
@@ -20,7 +20,6 @@ NON_CHROME = set([
'hyphenation',
'defaults/profile',
'defaults/pref*/*-l10n.js',
- 'update.locale',
'updater.ini',
'extensions/langpack-*@*',
'distribution/extensions/langpack-*@*',
diff --git a/toolkit/mozapps/update/moz.build b/toolkit/mozapps/update/moz.build
index f80e5bf5c5..c40f2fdd58 100644
--- a/toolkit/mozapps/update/moz.build
+++ b/toolkit/mozapps/update/moz.build
@@ -11,11 +11,7 @@ DIRS += [
'updater',
]
-XPIDL_SOURCES += [
- 'nsIUpdateService.idl',
-]
-
-TEST_DIRS += ['tests']
+XPIDL_SOURCES += ['nsIUpdateService.idl']
EXTRA_COMPONENTS += [
'nsUpdateService.manifest',
@@ -25,6 +21,3 @@ EXTRA_COMPONENTS += [
EXTRA_PP_COMPONENTS += ['nsUpdateService.js']
JAR_MANIFESTS += ['jar.mn']
-
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'Application Update')
diff --git a/toolkit/mozapps/update/tests/Makefile.in b/toolkit/mozapps/update/tests/Makefile.in
deleted file mode 100644
index 0b8d19aa2f..0000000000
--- a/toolkit/mozapps/update/tests/Makefile.in
+++ /dev/null
@@ -1,39 +0,0 @@
-# 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/.
-
-XPCSHELLTESTROOT = $(topobjdir)/_tests/xpcshell/$(relativesrcdir)
-
-pp_const_file = $(srcdir)/data/xpcshellConstantsPP.js
-
-PP_TARGETS += aus-test-const
-aus-test-const := $(pp_const_file)
-aus-test-const_PATH := $(XPCSHELLTESTROOT)/data
-aus-test-const_FLAGS := -Fsubstitution $(DEFINES) $(ACDEFINES)
-aus-test-const_TARGET := misc
-
-INI_TEST_FILES = \
- TestAUSReadStrings1.ini \
- TestAUSReadStrings2.ini \
- TestAUSReadStrings3.ini \
- $(NULL)
-
-MOZ_WINCONSOLE = 1
-
-include $(topsrcdir)/config/rules.mk
-
-# TestAUSReadStrings runs during check in the following directory with a Unicode
-# char in order to test bug 473417 on Windows.
-ifeq ($(OS_ARCH),WINNT)
-bug473417dir = test_bug473417-
-else
-bug473417dir = test_bug473417
-endif
-
-check::
- $(RM) -rf $(DEPTH)/_tests/updater/ && $(NSINSTALL) -D $(DEPTH)/_tests/updater/$(bug473417dir)/
- for i in $(INI_TEST_FILES); do \
- $(INSTALL) $(srcdir)/$$i $(DEPTH)/_tests/updater/$(bug473417dir)/; \
- done
- $(INSTALL) $(FINAL_TARGET)/TestAUSReadStrings$(BIN_SUFFIX) $(DEPTH)/_tests/updater/$(bug473417dir)/
- @$(RUN_TEST_PROGRAM) $(DEPTH)/_tests/updater/$(bug473417dir)/TestAUSReadStrings$(BIN_SUFFIX)
diff --git a/toolkit/mozapps/update/tests/TestAUSHelper.cpp b/toolkit/mozapps/update/tests/TestAUSHelper.cpp
deleted file mode 100644
index a20c4a79a2..0000000000
--- a/toolkit/mozapps/update/tests/TestAUSHelper.cpp
+++ /dev/null
@@ -1,415 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-#ifdef XP_WIN
-# include <windows.h>
-# include <wintrust.h>
-# include <tlhelp32.h>
-# include <softpub.h>
-# include <direct.h>
-# include <io.h>
- typedef WCHAR NS_tchar;
-# define NS_main wmain
-# ifndef F_OK
-# define F_OK 00
-# endif
-# ifndef W_OK
-# define W_OK 02
-# endif
-# ifndef R_OK
-# define R_OK 04
-# endif
-# if defined(_MSC_VER) && _MSC_VER < 1900
-# define stat _stat
-# endif
-# define NS_T(str) L ## str
-# define NS_tsnprintf(dest, count, fmt, ...) \
- { \
- int _count = count - 1; \
- _snwprintf(dest, _count, fmt, ##__VA_ARGS__); \
- dest[_count] = L'\0'; \
- }
-# define NS_taccess _waccess
-# define NS_tchdir _wchdir
-# define NS_tfopen _wfopen
-# define NS_tstrcmp wcscmp
-# define NS_ttoi _wtoi
-# define NS_tstat _wstat
-# define NS_tgetcwd _wgetcwd
-# define LOG_S "%S"
-
-#include "../common/updatehelper.h"
-#include "../common/certificatecheck.h"
-
-#else
-# include <unistd.h>
-# define NS_main main
- typedef char NS_tchar;
-# define NS_T(str) str
-# define NS_tsnprintf snprintf
-# define NS_taccess access
-# define NS_tchdir chdir
-# define NS_tfopen fopen
-# define NS_tstrcmp strcmp
-# define NS_ttoi atoi
-# define NS_tstat stat
-# define NS_tgetcwd getcwd
-# define NS_tfputs fputs
-# define LOG_S "%s"
-#endif
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#ifndef MAXPATHLEN
-# ifdef PATH_MAX
-# define MAXPATHLEN PATH_MAX
-# elif defined(MAX_PATH)
-# define MAXPATHLEN MAX_PATH
-# elif defined(_MAX_PATH)
-# define MAXPATHLEN _MAX_PATH
-# elif defined(CCHMAXPATH)
-# define MAXPATHLEN CCHMAXPATH
-# else
-# define MAXPATHLEN 1024
-# endif
-#endif
-
-static void
-WriteMsg(const NS_tchar *path, const char *status)
-{
- FILE* outFP = NS_tfopen(path, NS_T("wb"));
- if (!outFP) {
- return;
- }
-
- fprintf(outFP, "%s\n", status);
- fclose(outFP);
- outFP = nullptr;
-}
-
-static bool
-CheckMsg(const NS_tchar *path, const char *expected)
-{
- if (NS_taccess(path, F_OK)) {
- return false;
- }
-
- FILE *inFP = NS_tfopen(path, NS_T("rb"));
- if (!inFP) {
- return false;
- }
-
- struct stat ms;
- if (fstat(fileno(inFP), &ms)) {
- fclose(inFP);
- inFP = nullptr;
- return false;
- }
-
- char *mbuf = (char *) malloc(ms.st_size + 1);
- if (!mbuf) {
- fclose(inFP);
- inFP = nullptr;
- return false;
- }
-
- size_t r = ms.st_size;
- char *rb = mbuf;
- size_t c = fread(rb, sizeof(char), 50, inFP);
- r -= c;
- rb += c;
- if (c == 0 && r) {
- free(mbuf);
- fclose(inFP);
- inFP = nullptr;
- return false;
- }
- mbuf[ms.st_size] = '\0';
- rb = mbuf;
-
- bool isMatch = strcmp(rb, expected) == 0;
- free(mbuf);
- fclose(inFP);
- inFP = nullptr;
- return isMatch;
-}
-
-int NS_main(int argc, NS_tchar **argv)
-{
- if (argc == 2) {
- if (!NS_tstrcmp(argv[1], NS_T("post-update-async")) ||
- !NS_tstrcmp(argv[1], NS_T("post-update-sync"))) {
- NS_tchar exePath[MAXPATHLEN];
-#ifdef XP_WIN
- if (!::GetModuleFileNameW(0, exePath, MAXPATHLEN)) {
- return 1;
- }
-#else
- strcpy(exePath, argv[0]);
-#endif
- NS_tchar runFilePath[MAXPATHLEN];
- NS_tsnprintf(runFilePath, sizeof(runFilePath)/sizeof(runFilePath[0]),
- NS_T("%s.running"), exePath);
-#ifdef XP_WIN
- if (!NS_taccess(runFilePath, F_OK)) {
- // This makes it possible to check if the post update process was
- // launched twice which happens when the service performs an update.
- NS_tchar runFilePathBak[MAXPATHLEN];
- NS_tsnprintf(runFilePathBak, sizeof(runFilePathBak)/sizeof(runFilePathBak[0]),
- NS_T("%s.bak"), runFilePath);
- MoveFileExW(runFilePath, runFilePathBak, MOVEFILE_REPLACE_EXISTING);
- }
-#endif
- WriteMsg(runFilePath, "running");
-
- if (!NS_tstrcmp(argv[1], NS_T("post-update-sync"))) {
-#ifdef XP_WIN
- Sleep(2000);
-#else
- sleep(2);
-#endif
- }
-
- NS_tchar logFilePath[MAXPATHLEN];
- NS_tsnprintf(logFilePath, sizeof(logFilePath)/sizeof(logFilePath[0]),
- NS_T("%s.log"), exePath);
- WriteMsg(logFilePath, "post-update");
- return 0;
- }
- }
-
- if (argc < 3) {
- fprintf(stderr, \
- "\n" \
- "Application Update Service Test Helper\n" \
- "\n" \
- "Usage: WORKINGDIR INFILE OUTFILE -s SECONDS [FILETOLOCK]\n" \
- " or: WORKINGDIR LOGFILE [ARG2 ARG3...]\n" \
- " or: signature-check filepath\n" \
- " or: setup-symlink dir1 dir2 file symlink\n" \
- " or: remove-symlink dir1 dir2 file symlink\n" \
- " or: check-symlink symlink\n" \
- " or: post-update\n" \
- "\n" \
- " WORKINGDIR \tThe relative path to the working directory to use.\n" \
- " INFILE \tThe relative path from the working directory for the file to\n" \
- " \tread actions to perform such as finish.\n" \
- " OUTFILE \tThe relative path from the working directory for the file to\n" \
- " \twrite status information.\n" \
- " SECONDS \tThe number of seconds to sleep.\n" \
- " FILETOLOCK \tThe relative path from the working directory to an existing\n" \
- " \tfile to open exlusively.\n" \
- " \tOnly available on Windows platforms and silently ignored on\n" \
- " \tother platforms.\n" \
- " LOGFILE \tThe relative path from the working directory to log the\n" \
- " \tcommand line arguments.\n" \
- " ARG2 ARG3...\tArguments to write to the LOGFILE after the preceding command\n" \
- " \tline arguments.\n" \
- "\n" \
- "Note: All paths must be relative.\n" \
- "\n");
- return 1;
- }
-
- if (!NS_tstrcmp(argv[1], NS_T("check-signature"))) {
- // Not implemented
- return 1;
- }
-
- if (!NS_tstrcmp(argv[1], NS_T("setup-symlink"))) {
-#ifdef XP_UNIX
- NS_tchar path[MAXPATHLEN];
- NS_tsnprintf(path, sizeof(path)/sizeof(path[0]),
- NS_T("%s/%s"), NS_T("/tmp"), argv[2]);
- mkdir(path, 0755);
- NS_tsnprintf(path, sizeof(path)/sizeof(path[0]),
- NS_T("%s/%s/%s"), NS_T("/tmp"), argv[2], argv[3]);
- mkdir(path, 0755);
- NS_tsnprintf(path, sizeof(path)/sizeof(path[0]),
- NS_T("%s/%s/%s/%s"), NS_T("/tmp"), argv[2], argv[3], argv[4]);
- FILE * file = NS_tfopen(path, NS_T("w"));
- if (file) {
- NS_tfputs(NS_T("test"), file);
- fclose(file);
- }
- if (symlink(path, argv[5]) != 0) {
- return 1;
- }
- NS_tsnprintf(path, sizeof(path)/sizeof(path[0]),
- NS_T("%s/%s"), NS_T("/tmp"), argv[2]);
- if (argc > 6 && !NS_tstrcmp(argv[6], NS_T("change-perm"))) {
- chmod(path, 0644);
- }
- return 0;
-#else
- // Not implemented on non-Unix platforms
- return 1;
-#endif
- }
-
- if (!NS_tstrcmp(argv[1], NS_T("remove-symlink"))) {
-#ifdef XP_UNIX
- NS_tchar path[MAXPATHLEN];
- NS_tsnprintf(path, sizeof(path)/sizeof(path[0]),
- NS_T("%s/%s"), NS_T("/tmp"), argv[2]);
- chmod(path, 0755);
- NS_tsnprintf(path, sizeof(path)/sizeof(path[0]),
- NS_T("%s/%s/%s/%s"), NS_T("/tmp"), argv[2], argv[3], argv[4]);
- unlink(path);
- NS_tsnprintf(path, sizeof(path)/sizeof(path[0]),
- NS_T("%s/%s/%s"), NS_T("/tmp"), argv[2], argv[3]);
- rmdir(path);
- NS_tsnprintf(path, sizeof(path)/sizeof(path[0]),
- NS_T("%s/%s"), NS_T("/tmp"), argv[2]);
- rmdir(path);
- return 0;
-#else
- // Not implemented on non-Unix platforms
- return 1;
-#endif
- }
-
- if (!NS_tstrcmp(argv[1], NS_T("check-symlink"))) {
-#ifdef XP_UNIX
- struct stat ss;
- lstat(argv[2], &ss);
- return S_ISLNK(ss.st_mode) ? 0 : 1;
-#else
- // Not implemented on non-Unix platforms
- return 1;
-#endif
- }
-
- if (!NS_tstrcmp(argv[1], NS_T("wait-for-service-stop"))) {
-#ifdef XP_WIN
- const int maxWaitSeconds = NS_ttoi(argv[3]);
- LPCWSTR serviceName = argv[2];
- DWORD serviceState = WaitForServiceStop(serviceName, maxWaitSeconds);
- if (SERVICE_STOPPED == serviceState) {
- return 0;
- } else {
- return serviceState;
- }
-#else
- // Not implemented on non-Windows platforms
- return 1;
-#endif
- }
-
- if (!NS_tstrcmp(argv[1], NS_T("wait-for-application-exit"))) {
-#ifdef XP_WIN
- const int maxWaitSeconds = NS_ttoi(argv[3]);
- LPCWSTR application = argv[2];
- DWORD ret = WaitForProcessExit(application, maxWaitSeconds);
- if (ERROR_SUCCESS == ret) {
- return 0;
- } else if (WAIT_TIMEOUT == ret) {
- return 1;
- } else {
- return 2;
- }
-#else
- // Not implemented on non-Windows platforms
- return 1;
-#endif
- }
-
- if (!NS_tstrcmp(argv[1], NS_T("is-process-running"))) {
-#ifdef XP_WIN
- LPCWSTR application = argv[2];
- return (ERROR_NOT_FOUND == IsProcessRunning(application)) ? 0 : 1;
-#else
- // Not implemented on non-Windows platforms
- return 1;
-#endif
- }
-
- if (!NS_tstrcmp(argv[1], NS_T("launch-service"))) {
-#ifdef XP_WIN
- DWORD ret = LaunchServiceSoftwareUpdateCommand(argc - 2, (LPCWSTR *)argv + 2);
- if (ret != ERROR_SUCCESS) {
- // 192 is used to avoid reusing a possible return value from the call to
- // WaitForServiceStop
- return 0x000000C0;
- }
- // Wait a maximum of 120 seconds.
- DWORD lastState = WaitForServiceStop(SVC_NAME, 120);
- if (SERVICE_STOPPED == lastState) {
- return 0;
- }
- return lastState;
-#else
- // Not implemented on non-Windows platforms
- return 1;
-#endif
- }
-
- if (NS_tchdir(argv[1]) != 0) {
- return 1;
- }
-
- // File in use test helper section
- if (!NS_tstrcmp(argv[4], NS_T("-s"))) {
- NS_tchar *cwd = NS_tgetcwd(nullptr, 0);
- NS_tchar inFilePath[MAXPATHLEN];
- NS_tsnprintf(inFilePath, sizeof(inFilePath)/sizeof(inFilePath[0]),
- NS_T("%s/%s"), cwd, argv[2]);
- NS_tchar outFilePath[MAXPATHLEN];
- NS_tsnprintf(outFilePath, sizeof(outFilePath)/sizeof(outFilePath[0]),
- NS_T("%s/%s"), cwd, argv[3]);
-
- int seconds = NS_ttoi(argv[5]);
-#ifdef XP_WIN
- HANDLE hFile = INVALID_HANDLE_VALUE;
- if (argc == 7) {
- hFile = CreateFileW(argv[6],
- DELETE | GENERIC_WRITE, 0,
- nullptr, OPEN_EXISTING, 0, nullptr);
- if (hFile == INVALID_HANDLE_VALUE) {
- WriteMsg(outFilePath, "error_locking");
- return 1;
- }
- }
-
- WriteMsg(outFilePath, "sleeping");
- int i = 0;
- while (!CheckMsg(inFilePath, "finish\n") && i++ <= seconds) {
- Sleep(1000);
- }
-
- if (argc == 7) {
- CloseHandle(hFile);
- }
-#else
- WriteMsg(outFilePath, "sleeping");
- int i = 0;
- while (!CheckMsg(inFilePath, "finish\n") && i++ <= seconds) {
- sleep(1);
- }
-#endif
- WriteMsg(outFilePath, "finished");
- return 0;
- }
-
- {
- // Command line argument test helper section
- NS_tchar logFilePath[MAXPATHLEN];
- NS_tsnprintf(logFilePath, sizeof(logFilePath)/sizeof(logFilePath[0]),
- NS_T("%s"), argv[2]);
-
- FILE* logFP = NS_tfopen(logFilePath, NS_T("wb"));
- for (int i = 1; i < argc; ++i) {
- fprintf(logFP, LOG_S "\n", argv[i]);
- }
-
- fclose(logFP);
- logFP = nullptr;
- }
-
- return 0;
-}
diff --git a/toolkit/mozapps/update/tests/TestAUSReadStrings.cpp b/toolkit/mozapps/update/tests/TestAUSReadStrings.cpp
deleted file mode 100644
index c1de44f8ef..0000000000
--- a/toolkit/mozapps/update/tests/TestAUSReadStrings.cpp
+++ /dev/null
@@ -1,172 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/**
- * This binary tests the updater's ReadStrings ini parser and should run in a
- * directory with a Unicode character to test bug 473417.
- */
-#ifdef XP_WIN
- #include <windows.h>
- #define NS_main wmain
- #define NS_tstrrchr wcsrchr
- #define NS_T(str) L ## str
- #define PATH_SEPARATOR_CHAR L'\\'
- // On Windows, argv[0] can also have forward slashes instead
- #define ALT_PATH_SEPARATOR_CHAR L'/'
-#else
- #include <unistd.h>
- #define NS_main main
- #define NS_tstrrchr strrchr
- #define NS_T(str) str
- #define PATH_SEPARATOR_CHAR '/'
-#endif
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <string.h>
-
-#include "updater/resource.h"
-#include "updater/progressui.h"
-#include "common/readstrings.h"
-#include "common/errors.h"
-#include "mozilla/ArrayUtils.h"
-
-#ifndef MAXPATHLEN
-# ifdef PATH_MAX
-# define MAXPATHLEN PATH_MAX
-# elif defined(MAX_PATH)
-# define MAXPATHLEN MAX_PATH
-# elif defined(_MAX_PATH)
-# define MAXPATHLEN _MAX_PATH
-# elif defined(CCHMAXPATH)
-# define MAXPATHLEN CCHMAXPATH
-# else
-# define MAXPATHLEN 1024
-# endif
-#endif
-
-#define TEST_NAME "Updater ReadStrings"
-
-using namespace mozilla;
-
-static int gFailCount = 0;
-
-/**
- * Prints the given failure message and arguments using printf, prepending
- * "TEST-UNEXPECTED-FAIL " for the benefit of the test harness and
- * appending "\n" to eliminate having to type it at each call site.
- */
-void fail(const char* msg, ...)
-{
- va_list ap;
-
- printf("TEST-UNEXPECTED-FAIL | ");
-
- va_start(ap, msg);
- vprintf(msg, ap);
- va_end(ap);
-
- putchar('\n');
- ++gFailCount;
-}
-
-int NS_main(int argc, NS_tchar **argv)
-{
- printf("Running TestAUSReadStrings tests\n");
-
- int rv = 0;
- int retval;
- NS_tchar inifile[MAXPATHLEN];
- StringTable testStrings;
-
- NS_tchar *slash = NS_tstrrchr(argv[0], PATH_SEPARATOR_CHAR);
-#ifdef ALT_PATH_SEPARATOR_CHAR
- NS_tchar *altslash = NS_tstrrchr(argv[0], ALT_PATH_SEPARATOR_CHAR);
- slash = (slash > altslash) ? slash : altslash;
-#endif // ALT_PATH_SEPARATOR_CHAR
-
- if (!slash) {
- fail("%s | unable to find platform specific path separator (check 1)", TEST_NAME);
- return 20;
- }
-
- *(++slash) = '\0';
- // Test success when the ini file exists with both Title and Info in the
- // Strings section and the values for Title and Info.
- NS_tsnprintf(inifile, ArrayLength(inifile), NS_T("%sTestAUSReadStrings1.ini"), argv[0]);
- retval = ReadStrings(inifile, &testStrings);
- if (retval == OK) {
- if (strcmp(testStrings.title, "Title Test - \xD0\x98\xD1\x81\xD0\xBF\xD1\x8B" \
- "\xD1\x82\xD0\xB0\xD0\xBD\xD0\xB8\xD0\xB5 " \
- "\xCE\x94\xCE\xBF\xCE\xBA\xCE\xB9\xCE\xBC\xCE\xAE " \
- "\xE3\x83\x86\xE3\x82\xB9\xE3\x83\x88 " \
- "\xE6\xB8\xAC\xE8\xA9\xA6 " \
- "\xE6\xB5\x8B\xE8\xAF\x95") != 0) {
- rv = 21;
- fail("%s | Title ini value incorrect (check 3)", TEST_NAME);
- }
-
- if (strcmp(testStrings.info, "Info Test - \xD0\x98\xD1\x81\xD0\xBF\xD1\x8B" \
- "\xD1\x82\xD0\xB0\xD0\xBD\xD0\xB8\xD0\xB5 " \
- "\xCE\x94\xCE\xBF\xCE\xBA\xCE\xB9\xCE\xBC\xCE\xAE " \
- "\xE3\x83\x86\xE3\x82\xB9\xE3\x83\x88 " \
- "\xE6\xB8\xAC\xE8\xA9\xA6 " \
- "\xE6\xB5\x8B\xE8\xAF\x95\xE2\x80\xA6") != 0) {
- rv = 22;
- fail("%s | Info ini value incorrect (check 4)", TEST_NAME);
- }
- } else {
- fail("%s | ReadStrings returned %i (check 2)", TEST_NAME, retval);
- rv = 23;
- }
-
- // Test failure when the ini file exists without Title and with Info in the
- // Strings section.
- NS_tsnprintf(inifile, ArrayLength(inifile), NS_T("%sTestAUSReadStrings2.ini"), argv[0]);
- retval = ReadStrings(inifile, &testStrings);
- if (retval != PARSE_ERROR) {
- rv = 24;
- fail("%s | ReadStrings returned %i (check 5)", TEST_NAME, retval);
- }
-
- // Test failure when the ini file exists with Title and without Info in the
- // Strings section.
- NS_tsnprintf(inifile, ArrayLength(inifile), NS_T("%sTestAUSReadStrings3.ini"), argv[0]);
- retval = ReadStrings(inifile, &testStrings);
- if (retval != PARSE_ERROR) {
- rv = 25;
- fail("%s | ReadStrings returned %i (check 6)", TEST_NAME, retval);
- }
-
- // Test failure when the ini file doesn't exist
- NS_tsnprintf(inifile, ArrayLength(inifile), NS_T("%sTestAUSReadStringsBogus.ini"), argv[0]);
- retval = ReadStrings(inifile, &testStrings);
- if (retval != READ_ERROR) {
- rv = 26;
- fail("%s | ini file doesn't exist (check 7)", TEST_NAME);
- }
-
- // Test reading a non-default section name
- NS_tsnprintf(inifile, ArrayLength(inifile), NS_T("%sTestAUSReadStrings3.ini"), argv[0]);
- retval = ReadStrings(inifile, "Title\0", 1, &testStrings.title, "BogusSection2");
- if (retval == OK) {
- if (strcmp(testStrings.title, "Bogus Title") != 0) {
- rv = 27;
- fail("%s | Title ini value incorrect (check 9)", TEST_NAME);
- }
- } else {
- fail("%s | ReadStrings returned %i (check 8)", TEST_NAME, retval);
- rv = 28;
- }
-
-
- if (rv == 0) {
- printf("TEST-PASS | %s | all checks passed\n", TEST_NAME);
- } else {
- fail("%s | %i out of 9 checks failed", TEST_NAME, gFailCount);
- }
-
- return rv;
-}
diff --git a/toolkit/mozapps/update/tests/TestAUSReadStrings1.ini b/toolkit/mozapps/update/tests/TestAUSReadStrings1.ini
deleted file mode 100644
index 5ab13c185d..0000000000
--- a/toolkit/mozapps/update/tests/TestAUSReadStrings1.ini
+++ /dev/null
@@ -1,47 +0,0 @@
-; This file is in the UTF-8 encoding
-
-[BogusSection1]
-
-; Comment
-
-Title=Bogus Title
-
-; Comment
-
-Info=Bogus Info
-
-; Comment
-
-[Strings]
-
-Bogus1=Bogus1
-
-; Comment
-
-Title=Title Test - Испытание Δοκιμή テスト 測試 测试
-
-; Comment
-
-Bogus2=Bogus2
-
-; Comment
-
-Info=Info Test - Испытание Δοκιμή テスト 測試 测试…
-
-; Comment
-
-Bogus3=Bogus3
-
-; Comment
-
-[BogusSection2]
-
-; Comment
-
-Title=Bogus Title
-
-; Comment
-
-Info=Bogus Info
-
-; Comment
diff --git a/toolkit/mozapps/update/tests/TestAUSReadStrings2.ini b/toolkit/mozapps/update/tests/TestAUSReadStrings2.ini
deleted file mode 100644
index 8291a7c94c..0000000000
--- a/toolkit/mozapps/update/tests/TestAUSReadStrings2.ini
+++ /dev/null
@@ -1,39 +0,0 @@
-; This file is in the UTF-8 encoding
-
-[BogusSection1]
-
-; Comment
-
-Title=Bogus Title
-
-; Comment
-
-Info=Bogus Info
-
-; Comment
-
-[Strings]
-
-Bogus1=Bogus1
-
-; Comment
-
-Info=Info
-
-; Comment
-
-Bogus2=Bogus2
-
-; Comment
-
-[BogusSection2]
-
-; Comment
-
-Title=Bogus Title
-
-; Comment
-
-Info=Bogus Info
-
-; Comment
diff --git a/toolkit/mozapps/update/tests/TestAUSReadStrings3.ini b/toolkit/mozapps/update/tests/TestAUSReadStrings3.ini
deleted file mode 100644
index a64d1232e2..0000000000
--- a/toolkit/mozapps/update/tests/TestAUSReadStrings3.ini
+++ /dev/null
@@ -1,39 +0,0 @@
-; This file is in the UTF-8 encoding
-
-[BogusSection1]
-
-; Comment
-
-Title=Bogus Title
-
-; Comment
-
-Info=Bogus Info
-
-; Comment
-
-[Strings]
-
-Bogus1=Bogus1
-
-; Comment
-
-Title=Title
-
-; Comment
-
-Bogus2=Bogus2
-
-; Comment
-
-[BogusSection2]
-
-; Comment
-
-Title=Bogus Title
-
-; Comment
-
-Info=Bogus Info
-
-; Comment
diff --git a/toolkit/mozapps/update/tests/chrome/.eslintrc.js b/toolkit/mozapps/update/tests/chrome/.eslintrc.js
deleted file mode 100644
index 8c0f4f574c..0000000000
--- a/toolkit/mozapps/update/tests/chrome/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/mochitest/chrome.eslintrc.js"
- ]
-};
diff --git a/toolkit/mozapps/update/tests/chrome/chrome.ini b/toolkit/mozapps/update/tests/chrome/chrome.ini
deleted file mode 100644
index 88e3dd4e83..0000000000
--- a/toolkit/mozapps/update/tests/chrome/chrome.ini
+++ /dev/null
@@ -1,64 +0,0 @@
-; 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/.
-
-[DEFAULT]
-tags = appupdate
-support-files =
- utils.js
- update.sjs
-
-; mochitest-chrome tests must start with "test_" and are executed in sorted
-; order and not in the order specified in the manifest.
-[test_0010_background_basic.xul]
-[test_0011_check_basic.xul]
-[test_0012_check_basic_staging.xul]
-skip-if = asan
-reason = Bug 1168003
-[test_0013_check_no_updates.xul]
-[test_0014_check_error_xml_malformed.xul]
-[test_0061_check_verifyFailPartial_noComplete.xul]
-[test_0062_check_verifyFailComplete_noPartial.xul]
-[test_0063_check_verifyFailPartialComplete.xul]
-[test_0064_check_verifyFailPartial_successComplete.xul]
-[test_0071_notify_verifyFailPartial_noComplete.xul]
-[test_0072_notify_verifyFailComplete_noPartial.xul]
-[test_0073_notify_verifyFailPartialComplete.xul]
-[test_0074_notify_verifyFailPartial_successComplete.xul]
-[test_0081_error_patchApplyFailure_partial_only.xul]
-[test_0082_error_patchApplyFailure_complete_only.xul]
-[test_0083_error_patchApplyFailure_partial_complete.xul]
-[test_0084_error_patchApplyFailure_verify_failed.xul]
-[test_0085_error_patchApplyFailure_partial_complete_staging.xul]
-skip-if = asan
-reason = Bug 1168003
-[test_0092_finishedBackground.xul]
-[test_0093_restartNotification.xul]
-[test_0094_restartNotification_remote.xul]
-[test_0095_restartNotification_remoteInvalidNumber.xul]
-[test_0096_restartNotification_stagedBackground.xul]
-skip-if = asan
-reason = Bug 1168003
-[test_0097_restartNotification_stagedServiceBackground.xul]
-skip-if = os != 'win'
-reason = only Windows has the maintenance service.
-[test_0101_background_restartNotification.xul]
-[test_0102_background_restartNotification_staging.xul]
-skip-if = asan
-reason = Bug 1168003
-[test_0103_background_restartNotification_stagingService.xul]
-skip-if = os != 'win'
-reason = only Windows has the maintenance service.
-[test_0111_neverButton_basic.xul]
-[test_0113_showNeverForVersionRemovedWithPref.xul]
-[test_0151_notify_backgroundCheckError.xul]
-[test_0152_notify_backgroundCheckOfflineRetry.xul]
-[test_0161_check_unsupported.xul]
-[test_0162_notify_unsupported.xul]
-[test_0171_check_noPerms_manual.xul]
-skip-if = os != 'win'
-reason = test must be able to prevent file deletion.
-[test_0172_notify_noPerms_manual.xul]
-skip-if = os != 'win'
-reason = test must be able to prevent file deletion.
-[test_9999_cleanup.xul]
diff --git a/toolkit/mozapps/update/tests/chrome/test_0010_background_basic.xul b/toolkit/mozapps/update/tests/chrome/test_0010_background_basic.xul
deleted file mode 100644
index 8d088cc8ab..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0010_background_basic.xul
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: basic, download, and finished"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_FOUND_BASIC,
- buttonClick: "next"
-}, {
- pageid: PAGEID_DOWNLOADING
-}, {
- pageid: PAGEID_FINISHED,
- buttonClick: "extra1"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let url = URL_HTTP_UPDATE_XML + "?showDetails=1&showPrompt=1" +
- getVersionParams();
- setUpdateURL(url);
-
- gAUS.checkForBackgroundUpdates();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0011_check_basic.xul b/toolkit/mozapps/update/tests/chrome/test_0011_check_basic.xul
deleted file mode 100644
index 12b5302a40..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0011_check_basic.xul
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: update check, basic, download, and finished"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_CHECKING
-}, {
- pageid: PAGEID_FOUND_BASIC,
- buttonClick: "next"
-}, {
- pageid: PAGEID_DOWNLOADING
-}, {
- pageid: PAGEID_FINISHED,
- buttonClick: "extra1"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let url = URL_HTTP_UPDATE_XML + "?showDetails=1" + getVersionParams();
- setUpdateURL(url);
-
- gUP.checkForUpdates();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0012_check_basic_staging.xul b/toolkit/mozapps/update/tests/chrome/test_0012_check_basic_staging.xul
deleted file mode 100644
index d910adc087..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0012_check_basic_staging.xul
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: update check, basic, download with staging, and finished"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_CHECKING
-}, {
- pageid: PAGEID_FOUND_BASIC,
- buttonClick: "next"
-}, {
- pageid: PAGEID_DOWNLOADING
-}, {
- pageid: PAGEID_FINISHED,
- buttonClick: "extra1"
-} ];
-
-gUseTestUpdater = true;
-
-function runTest() {
- debugDump("entering");
-
- Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, true);
-
- let url = URL_HTTP_UPDATE_XML + "?showDetails=1" + getVersionParams();
- setUpdateURL(url);
-
- gUP.checkForUpdates();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0013_check_no_updates.xul b/toolkit/mozapps/update/tests/chrome/test_0013_check_no_updates.xul
deleted file mode 100644
index c3f024c73f..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0013_check_no_updates.xul
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: update check and no updates found"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_CHECKING
-}, {
- pageid: PAGEID_NO_UPDATES_FOUND,
- buttonClick: "finish"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let url = URL_HTTP_UPDATE_XML + "?noUpdates=1";
- setUpdateURL(url);
-
- gUP.checkForUpdates();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0014_check_error_xml_malformed.xul b/toolkit/mozapps/update/tests/chrome/test_0014_check_error_xml_malformed.xul
deleted file mode 100644
index f399a0096b..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0014_check_error_xml_malformed.xul
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: update check and error (xml malformed)"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_CHECKING
-}, {
- pageid: PAGEID_ERRORS,
- buttonClick: "finish"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let url = URL_HTTP_UPDATE_XML + "?xmlMalformed=1";
- setUpdateURL(url);
-
- gUP.checkForUpdates();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0061_check_verifyFailPartial_noComplete.xul b/toolkit/mozapps/update/tests/chrome/test_0061_check_verifyFailPartial_noComplete.xul
deleted file mode 100644
index 1040c19e3a..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0061_check_verifyFailPartial_noComplete.xul
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: update check, basic, download, and errors (partial patch with an invalid size)"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_CHECKING
-}, {
- pageid: PAGEID_FOUND_BASIC,
- buttonClick: "next"
-}, {
- pageid: PAGEID_DOWNLOADING
-}, {
- pageid: PAGEID_ERRORS,
- buttonClick: "finish"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let url = URL_HTTP_UPDATE_XML + "?showDetails=1&partialPatchOnly=1" +
- "&invalidPartialSize=1" + getVersionParams();
- setUpdateURL(url);
-
- gUP.checkForUpdates();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0062_check_verifyFailComplete_noPartial.xul b/toolkit/mozapps/update/tests/chrome/test_0062_check_verifyFailComplete_noPartial.xul
deleted file mode 100644
index 9221a4b986..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0062_check_verifyFailComplete_noPartial.xul
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: update check, basic, download, and errors (complete patch with an invalid size)"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_CHECKING
-}, {
- pageid: PAGEID_FOUND_BASIC,
- buttonClick: "next"
-}, {
- pageid: PAGEID_DOWNLOADING
-}, {
- pageid: PAGEID_ERRORS,
- buttonClick: "finish"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let url = URL_HTTP_UPDATE_XML + "?showDetails=1&completePatchOnly=1" +
- "&invalidCompleteSize=1" + getVersionParams();
- setUpdateURL(url);
-
- gUP.checkForUpdates();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0063_check_verifyFailPartialComplete.xul b/toolkit/mozapps/update/tests/chrome/test_0063_check_verifyFailPartialComplete.xul
deleted file mode 100644
index 8da5c7e971..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0063_check_verifyFailPartialComplete.xul
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: update check, basic, download, and errors (partial and complete patches with invalid sizes)"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_CHECKING
-}, {
- pageid: PAGEID_FOUND_BASIC,
- buttonClick: "next"
-}, {
- pageid: PAGEID_DOWNLOADING
-}, {
- pageid: PAGEID_ERRORS,
- buttonClick: "finish"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let url = URL_HTTP_UPDATE_XML + "?showDetails=1&invalidPartialSize=1" +
- "&invalidCompleteSize=1" + getVersionParams();
- setUpdateURL(url);
-
- gUP.checkForUpdates();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0064_check_verifyFailPartial_successComplete.xul b/toolkit/mozapps/update/tests/chrome/test_0064_check_verifyFailPartial_successComplete.xul
deleted file mode 100644
index db0f33d2fb..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0064_check_verifyFailPartial_successComplete.xul
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: update check, basic, download, and finished (partial patch with an invalid size and successful complete patch)"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_CHECKING
-}, {
- pageid: PAGEID_FOUND_BASIC,
- buttonClick: "next"
-}, {
- pageid: PAGEID_DOWNLOADING
-}, {
- pageid: PAGEID_FINISHED,
- buttonClick: "extra1"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let url = URL_HTTP_UPDATE_XML + "?showDetails=1&invalidPartialSize=1" +
- getVersionParams();
- setUpdateURL(url);
-
- gUP.checkForUpdates();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0071_notify_verifyFailPartial_noComplete.xul b/toolkit/mozapps/update/tests/chrome/test_0071_notify_verifyFailPartial_noComplete.xul
deleted file mode 100644
index 736df13a3b..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0071_notify_verifyFailPartial_noComplete.xul
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: errors (partial patch with an invalid size)"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_ERRORS,
- buttonClick: "finish"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let patches = getLocalPatchString("partial", null, null, null, "1234", null,
- STATE_DOWNLOADING);
- let updates = getLocalUpdateString(patches, null, null, null,
- Services.appinfo.version,
- Services.appinfo.platformVersion);
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- writeStatusFile(STATE_DOWNLOADING);
- reloadUpdateManagerData();
-
- testPostUpdateProcessing();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0072_notify_verifyFailComplete_noPartial.xul b/toolkit/mozapps/update/tests/chrome/test_0072_notify_verifyFailComplete_noPartial.xul
deleted file mode 100644
index cafab4d27c..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0072_notify_verifyFailComplete_noPartial.xul
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: errors (complete patch with an invalid size)"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_ERRORS,
- buttonClick: "finish"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let patches = getLocalPatchString("complete", null, null, null, "1234", null,
- STATE_DOWNLOADING);
- let updates = getLocalUpdateString(patches, null, null, null,
- Services.appinfo.version);
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- writeStatusFile(STATE_DOWNLOADING);
- reloadUpdateManagerData();
-
- testPostUpdateProcessing();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0073_notify_verifyFailPartialComplete.xul b/toolkit/mozapps/update/tests/chrome/test_0073_notify_verifyFailPartialComplete.xul
deleted file mode 100644
index c1db983a35..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0073_notify_verifyFailPartialComplete.xul
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: errors (partial and complete patches with invalid sizes)"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_ERRORS,
- buttonClick: "finish"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let patches = getLocalPatchString("partial", null, null, null, "1234", null,
- STATE_DOWNLOADING) +
- getLocalPatchString("complete", null, null, null, "1234",
- "false");
- let updates = getLocalUpdateString(patches, null, null, null,
- Services.appinfo.version, null,
- null, null, null, null, "false");
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- writeStatusFile(STATE_DOWNLOADING);
- reloadUpdateManagerData();
-
- testPostUpdateProcessing();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0074_notify_verifyFailPartial_successComplete.xul b/toolkit/mozapps/update/tests/chrome/test_0074_notify_verifyFailPartial_successComplete.xul
deleted file mode 100644
index 2c28da7682..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0074_notify_verifyFailPartial_successComplete.xul
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: finishedBackground (partial patch with an invalid size and successful complete patch)"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_FINISHED_BKGRD,
- buttonClick: "extra1"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let patches = getLocalPatchString("partial", null, null, null, "1234", null,
- STATE_DOWNLOADING) +
- getLocalPatchString("complete", null, null, null, null,
- "false");
- let updates = getLocalUpdateString(patches, null, null, null,
- Services.appinfo.version, null,
- null, null, null, null, "false");
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- writeStatusFile(STATE_DOWNLOADING);
- reloadUpdateManagerData();
-
- testPostUpdateProcessing();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0081_error_patchApplyFailure_partial_only.xul b/toolkit/mozapps/update/tests/chrome/test_0081_error_patchApplyFailure_partial_only.xul
deleted file mode 100644
index 10c34f63b0..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0081_error_patchApplyFailure_partial_only.xul
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: errors (partial only patch apply failure)"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_ERRORS,
- buttonClick: "finish"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let patches = getLocalPatchString("partial", null, null, null, null, null,
- STATE_PENDING);
- let updates = getLocalUpdateString(patches, null, null, null,
- Services.appinfo.version, null,
- null, null, null, null, "false");
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- writeStatusFile(STATE_FAILED_CRC_ERROR);
- reloadUpdateManagerData();
-
- testPostUpdateProcessing();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0082_error_patchApplyFailure_complete_only.xul b/toolkit/mozapps/update/tests/chrome/test_0082_error_patchApplyFailure_complete_only.xul
deleted file mode 100644
index 2c4b389f4b..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0082_error_patchApplyFailure_complete_only.xul
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: errors (complete only patch apply failure)"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_ERRORS,
- buttonClick: "finish"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let patches = getLocalPatchString("complete", null, null, null, null, null,
- STATE_PENDING);
- let updates = getLocalUpdateString(patches, null, null, null,
- Services.appinfo.version);
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- writeStatusFile(STATE_FAILED_CRC_ERROR);
- reloadUpdateManagerData();
-
- testPostUpdateProcessing();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0083_error_patchApplyFailure_partial_complete.xul b/toolkit/mozapps/update/tests/chrome/test_0083_error_patchApplyFailure_partial_complete.xul
deleted file mode 100644
index 01adb1c3d0..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0083_error_patchApplyFailure_partial_complete.xul
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: error patching, download, and finished (partial failed and download complete)"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_ERROR_PATCHING,
- buttonClick: "next"
-}, {
- pageid: PAGEID_DOWNLOADING,
- extraStartFunction: createContinueFile
-}, {
- pageid: PAGEID_FINISHED,
- buttonClick: "extra1",
- extraStartFunction: removeContinueFile
-} ];
-
-function runTest() {
- debugDump("entering");
-
- removeContinueFile();
-
- // Specify the url to update.sjs with a slowDownloadMar param so the ui can
- // load before the download completes.
- let slowDownloadURL = URL_HTTP_UPDATE_XML + "?slowDownloadMar=1";
- let patches = getLocalPatchString("partial", null, null, null, null, null,
- STATE_PENDING) +
- getLocalPatchString("complete", slowDownloadURL, null, null,
- null, "false");
- let updates = getLocalUpdateString(patches, null, null, null,
- Services.appinfo.version, null,
- null, null, null, null, "false");
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- writeStatusFile(STATE_FAILED_CRC_ERROR);
- reloadUpdateManagerData();
-
- testPostUpdateProcessing();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0084_error_patchApplyFailure_verify_failed.xul b/toolkit/mozapps/update/tests/chrome/test_0084_error_patchApplyFailure_verify_failed.xul
deleted file mode 100644
index 2e0c2b41e1..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0084_error_patchApplyFailure_verify_failed.xul
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: error patching, download, and errors (partial failed and download complete verification failure)"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_ERROR_PATCHING,
- buttonClick: "next"
-}, {
- pageid: PAGEID_DOWNLOADING,
- extraStartFunction: createContinueFile
-}, {
- pageid: PAGEID_ERRORS,
- buttonClick: "finish",
- extraStartFunction: removeContinueFile
-} ];
-
-function runTest() {
- debugDump("entering");
-
- removeContinueFile();
-
- // Specify the url to update.sjs with a slowDownloadMar param so the ui can
- // load before the download completes.
- let slowDownloadURL = URL_HTTP_UPDATE_XML + "?slowDownloadMar=1";
- let patches = getLocalPatchString("partial", null, null, null, null, null,
- STATE_PENDING) +
- getLocalPatchString("complete", slowDownloadURL, "MD5",
- null, "1234",
- "false");
- let updates = getLocalUpdateString(patches, null, null, null,
- Services.appinfo.version, null,
- null, null, null, null, "false");
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- writeStatusFile(STATE_FAILED_CRC_ERROR);
- reloadUpdateManagerData();
-
- testPostUpdateProcessing();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0085_error_patchApplyFailure_partial_complete_staging.xul b/toolkit/mozapps/update/tests/chrome/test_0085_error_patchApplyFailure_partial_complete_staging.xul
deleted file mode 100644
index fc83505f91..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0085_error_patchApplyFailure_partial_complete_staging.xul
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: error patching, download with staging, and finished (partial failed and download complete), with fast MAR download"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-// This test forces the download to complete before the "next" button on the
-// errorpatching wizard page is clicked. This is done by creating the continue
-// file when the wizard loads to start the download, then clicking the "next"
-// button in the download's onStopRequest event listener.
-
-const testDownloadListener = {
- onStartRequest(aRequest, aContext) { },
-
- onProgress(aRequest, aContext, aProgress, aMaxProgress) { },
-
- onStatus(aRequest, aContext, aStatus, aStatusText) { },
-
- onStopRequest(aRequest, aContext, aStatus) {
- debugDump("clicking errorpatching page next button");
- gDocElem.getButton("next").click();
- gAUS.removeDownloadListener(this);
- },
-
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIRequestObserver,
- Ci.nsIProgressEventSink])
-};
-
-let TESTS = [ {
- pageid: PAGEID_ERROR_PATCHING,
- extraCheckFunction: createContinueFile
-}, {
- pageid: PAGEID_DOWNLOADING
-}, {
- pageid: PAGEID_FINISHED,
- buttonClick: "extra1",
- extraStartFunction: removeContinueFile
-} ];
-
-gUseTestUpdater = true;
-
-function runTest() {
- debugDump("entering");
-
- removeContinueFile();
-
- // Specify the url to update.sjs with a slowDownloadMar param so the ui can
- // load before the download completes.
- let slowDownloadURL = URL_HTTP_UPDATE_XML + "?slowDownloadMar=1";
- let patches = getLocalPatchString("partial", null, null, null, null, null,
- STATE_PENDING) +
- getLocalPatchString("complete", slowDownloadURL, null, null,
- null, "false");
- let updates = getLocalUpdateString(patches, null, null, null,
- Services.appinfo.version, null,
- null, null, null, null, "false");
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- writeStatusFile(STATE_FAILED_READ_ERROR);
-
- Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, true);
-
- reloadUpdateManagerData();
-
- testPostUpdateProcessing();
-
- gAUS.addDownloadListener(testDownloadListener);
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0092_finishedBackground.xul b/toolkit/mozapps/update/tests/chrome/test_0092_finishedBackground.xul
deleted file mode 100644
index a0b29ddeab..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0092_finishedBackground.xul
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: finished background"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_FINISHED_BKGRD,
- buttonClick: "extra1"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let patches = getLocalPatchString("complete", null, null, null, null, null,
- STATE_PENDING);
- let updates = getLocalUpdateString(patches, null, null, null,
- Services.appinfo.version,
- Services.appinfo.platformVersion);
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- writeStatusFile(STATE_SUCCEEDED);
-
- reloadUpdateManagerData();
-
- is(gUpdateManager.activeUpdate.state, "pending",
- "The active update should have a state of pending");
-
- gUP.showUpdateDownloaded(gUpdateManager.activeUpdate);
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0093_restartNotification.xul b/toolkit/mozapps/update/tests/chrome/test_0093_restartNotification.xul
deleted file mode 100644
index 6db5b98973..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0093_restartNotification.xul
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: restart notification pref promptWaitTime"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_FINISHED_BKGRD,
- buttonClick: "extra1"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let patches = getLocalPatchString("complete", null, null, null, null, null,
- STATE_PENDING);
- let updates = getLocalUpdateString(patches, null, null, null,
- Services.appinfo.version);
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- writeStatusFile(STATE_SUCCEEDED);
-
- Services.prefs.setIntPref(PREF_APP_UPDATE_PROMPTWAITTIME, 1);
-
- reloadUpdateManagerData();
-
- is(gUpdateManager.activeUpdate.state, STATE_PENDING,
- "The active update should have a state of " + STATE_PENDING);
-
- ok(gUpdateManager.activeUpdate.promptWaitTime == 1, "Checking that the " +
- "update's promptWaitTime attribute value was set from the " +
- PREF_APP_UPDATE_PROMPTWAITTIME + " preference");
-
- gUP.showUpdateDownloaded(gUpdateManager.activeUpdate, true);
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0094_restartNotification_remote.xul b/toolkit/mozapps/update/tests/chrome/test_0094_restartNotification_remote.xul
deleted file mode 100644
index 6e72a42c1d..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0094_restartNotification_remote.xul
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: restart notification xml promptWaitTime"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_FINISHED_BKGRD,
- buttonClick: "extra1"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let patches = getLocalPatchString("complete", null, null, null, null, null,
- STATE_PENDING);
- let updates = getLocalUpdateString(patches, null, null, null,
- Services.appinfo.version, null,
- null, null, null, null, false,
- null, false, false, false, 1);
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- writeStatusFile(STATE_SUCCEEDED);
-
- reloadUpdateManagerData();
-
- is(gUpdateManager.activeUpdate.state, STATE_PENDING,
- "The active update should have a state of " + STATE_PENDING);
-
- ok(gUpdateManager.activeUpdate.promptWaitTime == 1, "Checking that the " +
- "update's promptWaitTime attribute value was set by the XML");
-
- gUP.showUpdateDownloaded(gUpdateManager.activeUpdate, true);
-
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0095_restartNotification_remoteInvalidNumber.xul b/toolkit/mozapps/update/tests/chrome/test_0095_restartNotification_remoteInvalidNumber.xul
deleted file mode 100644
index 5b1b826a5c..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0095_restartNotification_remoteInvalidNumber.xul
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: restart notification xml promptWaitTime with invalid number"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_FINISHED_BKGRD,
- buttonClick: "extra1"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let patches = getLocalPatchString("complete", null, null, null, null, null,
- STATE_PENDING);
- let updates = getLocalUpdateString(patches, null, null, null,
- Services.appinfo.version,
- null, null,
- null, null, null,
- null, false, null,
- false, false,
- false, "invalidNumber");
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- writeStatusFile(STATE_SUCCEEDED);
-
- Services.prefs.setIntPref(PREF_APP_UPDATE_PROMPTWAITTIME, 1);
-
- reloadUpdateManagerData();
-
- is(gUpdateManager.activeUpdate.state, STATE_PENDING,
- "The active update should have a state of " + STATE_PENDING);
-
- ok(gUpdateManager.activeUpdate.promptWaitTime == 1, "Checking that the " +
- "update's promptWaitTime attribute value was set from the " +
- PREF_APP_UPDATE_PROMPTWAITTIME + " preference");
-
- gUP.showUpdateDownloaded(gUpdateManager.activeUpdate, true);
-
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0096_restartNotification_stagedBackground.xul b/toolkit/mozapps/update/tests/chrome/test_0096_restartNotification_stagedBackground.xul
deleted file mode 100644
index b86861012c..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0096_restartNotification_stagedBackground.xul
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: restart notification staged w/o service"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_FINISHED_BKGRD,
- buttonClick: "extra1"
-} ];
-
-gUseTestUpdater = true;
-
-function runTest() {
- debugDump("entering");
-
- let patches = getLocalPatchString("complete", null, null, null, null, null,
- STATE_APPLIED);
- let updates = getLocalUpdateString(patches, null, null, null,
- Services.appinfo.version,
- Services.appinfo.platformVersion);
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- writeStatusFile(STATE_APPLIED);
-
- Services.prefs.setIntPref(PREF_APP_UPDATE_PROMPTWAITTIME, 1);
- Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, true);
- Services.prefs.setBoolPref(PREF_APP_UPDATE_SERVICE_ENABLED, false);
-
- reloadUpdateManagerData();
-
- is(gUpdateManager.activeUpdate.state, STATE_APPLIED,
- "The active update should have a state of " + STATE_APPLIED);
-
- ok(gUpdateManager.activeUpdate.promptWaitTime == 1, "Checking that the " +
- "update's promptWaitTime attribute value was set from the " +
- PREF_APP_UPDATE_PROMPTWAITTIME + " preference");
-
- gUpdateManager.refreshUpdateStatus();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0097_restartNotification_stagedServiceBackground.xul b/toolkit/mozapps/update/tests/chrome/test_0097_restartNotification_stagedServiceBackground.xul
deleted file mode 100644
index 9f7a602c4f..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0097_restartNotification_stagedServiceBackground.xul
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: restart notification staged with service"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_FINISHED_BKGRD,
- buttonClick: "extra1"
-} ];
-
-gUseTestUpdater = true;
-
-function runTest() {
- debugDump("entering");
-
- let patches = getLocalPatchString("complete", null, null, null, null, null,
- STATE_APPLIED_SVC);
- let updates = getLocalUpdateString(patches, null, null, null,
- Services.appinfo.version,
- Services.appinfo.platformVersion);
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- writeStatusFile(STATE_APPLIED_SVC);
-
- Services.prefs.setIntPref(PREF_APP_UPDATE_PROMPTWAITTIME, 1);
- Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, true);
- Services.prefs.setBoolPref(PREF_APP_UPDATE_SERVICE_ENABLED, true);
-
- reloadUpdateManagerData();
-
- is(gUpdateManager.activeUpdate.state, STATE_APPLIED_SVC,
- "The active update should have a state of " + STATE_APPLIED_SVC);
-
- ok(gUpdateManager.activeUpdate.promptWaitTime == 1, "Checking that the " +
- "update's promptWaitTime attribute value was set from the " +
- PREF_APP_UPDATE_PROMPTWAITTIME + " preference");
-
- gUpdateManager.refreshUpdateStatus();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0101_background_restartNotification.xul b/toolkit/mozapps/update/tests/chrome/test_0101_background_restartNotification.xul
deleted file mode 100644
index faa60c08b4..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0101_background_restartNotification.xul
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: background finish with a background download"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_FINISHED_BKGRD,
- buttonClick: "extra1"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- Services.prefs.setIntPref(PREF_APP_UPDATE_PROMPTWAITTIME, 1);
-
- let url = URL_HTTP_UPDATE_XML + "?showDetails=1" + getVersionParams();
- setUpdateURL(url);
-
- gAUS.notify(null);
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0102_background_restartNotification_staging.xul b/toolkit/mozapps/update/tests/chrome/test_0102_background_restartNotification_staging.xul
deleted file mode 100644
index 3e6f0fec84..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0102_background_restartNotification_staging.xul
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: background finish with a background download and update staging"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_FINISHED_BKGRD,
- buttonClick: "extra1"
-} ];
-
-gUseTestUpdater = true;
-
-function runTest() {
- debugDump("entering");
-
- Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, true);
- Services.prefs.setIntPref(PREF_APP_UPDATE_PROMPTWAITTIME, 1);
-
- let url = URL_HTTP_UPDATE_XML + "?showDetails=1" + getVersionParams();
- setUpdateURL(url);
-
- gAUS.notify(null);
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0103_background_restartNotification_stagingService.xul b/toolkit/mozapps/update/tests/chrome/test_0103_background_restartNotification_stagingService.xul
deleted file mode 100644
index c60a9fe49b..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0103_background_restartNotification_stagingService.xul
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: background finish with a background download and update staging and servicefs"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_FINISHED_BKGRD,
- buttonClick: "extra1"
-} ];
-
-gUseTestUpdater = true;
-
-function runTest() {
- debugDump("entering");
-
- Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, true);
- Services.prefs.setBoolPref(PREF_APP_UPDATE_SERVICE_ENABLED, true);
- Services.prefs.setIntPref(PREF_APP_UPDATE_PROMPTWAITTIME, 1);
-
- let url = URL_HTTP_UPDATE_XML + "?showDetails=1" + getVersionParams();
- setUpdateURL(url);
-
- gAUS.notify(null);
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0111_neverButton_basic.xul b/toolkit/mozapps/update/tests/chrome/test_0111_neverButton_basic.xul
deleted file mode 100644
index adca621d96..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0111_neverButton_basic.xul
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: update check and basic (never button test)"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-gPrefToCheck = PREFBRANCH_APP_UPDATE_NEVER + Services.appinfo.version;
-
-const TESTS = [ {
- pageid: PAGEID_CHECKING
-}, {
- pageid: PAGEID_FOUND_BASIC,
- extraDelayedCheckFunction: checkPrefHasUserValue,
- prefHasUserValue: false,
- neverButton: true,
- buttonClick: "extra2"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let url = URL_HTTP_UPDATE_XML + "?showNever=1&showDetails=1" +
- getVersionParams();
- setUpdateURL(url);
-
- // add the never preference for this version to verify that checking for
- // updates clears the preference.
- Services.prefs.setBoolPref(gPrefToCheck, true)
-
- gUP.checkForUpdates();
-}
-
-function finishTest() {
- checkPrefHasUserValue(true);
- finishTestDefault();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0113_showNeverForVersionRemovedWithPref.xul b/toolkit/mozapps/update/tests/chrome/test_0113_showNeverForVersionRemovedWithPref.xul
deleted file mode 100644
index 89dd55ea1f..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0113_showNeverForVersionRemovedWithPref.xul
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: update available with never pref and without showNeverForVersion"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-gPrefToCheck = PREFBRANCH_APP_UPDATE_NEVER + Services.appinfo.version;
-
-const TESTS = [ {
- pageid: PAGEID_FOUND_BASIC,
- extraDelayedCheckFunction: checkPrefHasUserValue,
- prefHasUserValue: true,
- buttonClick: "extra1"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let url = URL_HTTP_UPDATE_XML + "?showDetails=1&showPrompt=1" +
- getVersionParams();
- setUpdateURL(url);
-
- // add the never preference for this version to verify that checking for
- // updates clears the preference.
- Services.prefs.setBoolPref(gPrefToCheck, true)
-
- gAUS.notify(null);
-}
-
-function finishTest() {
- Services.prefs.clearUserPref(gPrefToCheck)
- finishTestDefault();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0151_notify_backgroundCheckError.xul b/toolkit/mozapps/update/tests/chrome/test_0151_notify_backgroundCheckError.xul
deleted file mode 100644
index 13798e5c90..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0151_notify_backgroundCheckError.xul
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Test notification when multiple background check errors occur (bug 595455)"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_ERROR_EXTRA,
- extraDelayedCheckFunction: checkErrorExtraPage,
- shouldBeHidden: false,
- displayedTextElem: "bgErrorLabel",
- buttonClick: "finish"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let url = URL_HTTP_UPDATE_XML + "?xmlMalformed=1";
- setUpdateURL(url);
-
- errorsPrefObserver.init(PREF_APP_UPDATE_BACKGROUNDERRORS,
- PREF_APP_UPDATE_BACKGROUNDMAXERRORS);
-
- gAUS.notify(null);
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0152_notify_backgroundCheckOfflineRetry.xul b/toolkit/mozapps/update/tests/chrome/test_0152_notify_backgroundCheckOfflineRetry.xul
deleted file mode 100644
index 04e613418c..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0152_notify_backgroundCheckOfflineRetry.xul
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Test that an update check that fails due to being offline is performed after going online"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_FOUND_BASIC,
- buttonClick: "extra1"
-} ];
-
-const NETWORK_ERROR_OFFLINE = 111;
-var gProxyPrefValue;
-
-function runTest() {
- debugDump("entering");
-
- let url = URL_HTTP_UPDATE_XML + "?showDetails=1" + getVersionParams();
- setUpdateURL(url);
-
- Services.prefs.setBoolPref(PREF_APP_UPDATE_ENABLED, true);
- Services.prefs.setBoolPref(PREF_APP_UPDATE_AUTO, false);
-
- Services.io.offline = true;
- gProxyPrefValue = Services.prefs.getIntPref("network.proxy.type");
- Services.prefs.setIntPref("network.proxy.type", 0);
-
- gUpdateChecker.checkForUpdates(updateCheckListener, true);
-}
-
-function resetOffline() {
- Services.prefs.setIntPref("network.proxy.type", gProxyPrefValue);
- Services.io.offline = false;
-}
-
-/* Update check listener */
-const updateCheckListener = {
- onProgress: function UCL_onProgress(aRequest, aPosition, aTotalSize) {
- },
-
- onCheckComplete: function UCL_onCheckComplete(aRequest, aUpdates, aUpdateCount) {
- let status = aRequest.status;
- if (status == 0) {
- status = aRequest.channel.QueryInterface(Ci.nsIRequest).status;
- }
- debugDump("url = " + aRequest.channel.originalURI.spec + ", " +
- "request.status = " + status + ", " +
- "updateCount = " + aUpdateCount);
- ok(false, "Unexpected updateCheckListener::onCheckComplete called");
- },
-
- onError: function UCL_onError(aRequest, aUpdate) {
- let status = aRequest.status;
- if (status == 0) {
- status = aRequest.channel.QueryInterface(Ci.nsIRequest).status;
- }
- is(status, Cr.NS_ERROR_OFFLINE,
- "checking the request status value");
- is(aUpdate.errorCode, NETWORK_ERROR_OFFLINE,
- "checking the update error code");
- debugDump("url = " + aRequest.channel.originalURI.spec + ", " +
- "request.status = " + status + ", " +
- "update.statusText = " +
- (aUpdate.statusText ? aUpdate.statusText : "null"));
- gAUS.onError(aRequest, aUpdate);
- // Use a timeout to allow the XHR to complete
- SimpleTest.executeSoon(resetOffline);
- },
-
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIUpdateCheckListener])
-};
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0161_check_unsupported.xul b/toolkit/mozapps/update/tests/chrome/test_0161_check_unsupported.xul
deleted file mode 100644
index c8e8d837b8..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0161_check_unsupported.xul
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Test checking for updates when system is no longer supported (bug 843497)"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_CHECKING
-}, {
- pageid: PAGEID_UNSUPPORTED,
- buttonClick: "finish"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- // When checking manually the unsupported page should still be shown even if
- // it was shown previously.
- Services.prefs.setBoolPref(PREF_APP_UPDATE_NOTIFIEDUNSUPPORTED, true);
-
- let url = URL_HTTP_UPDATE_XML + "?unsupported=1";
- setUpdateURL(url);
-
- gUP.checkForUpdates();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0162_notify_unsupported.xul b/toolkit/mozapps/update/tests/chrome/test_0162_notify_unsupported.xul
deleted file mode 100644
index d88d2092db..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0162_notify_unsupported.xul
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Test notification of updates when system is no longer supported (bug 843497)"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_UNSUPPORTED,
- buttonClick: "finish"
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let url = URL_HTTP_UPDATE_XML + "?unsupported=1";
- setUpdateURL(url);
-
- gAUS.notify(null);
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0171_check_noPerms_manual.xul b/toolkit/mozapps/update/tests/chrome/test_0171_check_noPerms_manual.xul
deleted file mode 100644
index 142c02baac..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0171_check_noPerms_manual.xul
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: manual"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_CHECKING
-}, {
- pageid: PAGEID_MANUAL_UPDATE,
- buttonClick: "finish",
- extraCheckFunction: getWriteTestFile
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let file = getWriteTestFile();
- file.create(file.NORMAL_FILE_TYPE, 0o444);
- file.fileAttributesWin |= file.WFA_READONLY;
- file.fileAttributesWin &= ~file.WFA_READWRITE;
-
- let url = URL_HTTP_UPDATE_XML + "?showDetails=1" + getVersionParams();
- setUpdateURL(url);
-
- gUP.checkForUpdates();
-}
-
-function getWriteTestFile() {
- let file = getAppBaseDir();
- file.append(FILE_UPDATE_TEST);
- file.QueryInterface(Ci.nsILocalFileWin);
- if (file.exists()) {
- file.fileAttributesWin |= file.WFA_READWRITE;
- file.fileAttributesWin &= ~file.WFA_READONLY;
- file.remove(true);
- }
- return file;
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_0172_notify_noPerms_manual.xul b/toolkit/mozapps/update/tests/chrome/test_0172_notify_noPerms_manual.xul
deleted file mode 100644
index 6784b9c908..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_0172_notify_noPerms_manual.xul
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Update Wizard pages: manual"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTestDefault();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-const TESTS = [ {
- pageid: PAGEID_MANUAL_UPDATE,
- buttonClick: "finish",
- extraCheckFunction: getWriteTestFile
-} ];
-
-function runTest() {
- debugDump("entering");
-
- let file = getWriteTestFile();
- file.create(file.NORMAL_FILE_TYPE, 0o444);
- file.fileAttributesWin |= file.WFA_READONLY;
- file.fileAttributesWin &= ~file.WFA_READWRITE;
-
- let url = URL_HTTP_UPDATE_XML + "?showDetails=1&showPrompt=1" +
- getVersionParams();
- setUpdateURL(url);
-
- gAUS.checkForBackgroundUpdates();
-}
-
-function getWriteTestFile() {
- let file = getAppBaseDir();
- file.append(FILE_UPDATE_TEST);
- file.QueryInterface(Ci.nsILocalFileWin);
- if (file.exists()) {
- file.fileAttributesWin |= file.WFA_READWRITE;
- file.fileAttributesWin &= ~file.WFA_READONLY;
- file.remove(true);
- }
- return file;
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/test_9999_cleanup.xul b/toolkit/mozapps/update/tests/chrome/test_9999_cleanup.xul
deleted file mode 100644
index a55263eb2d..0000000000
--- a/toolkit/mozapps/update/tests/chrome/test_9999_cleanup.xul
+++ /dev/null
@@ -1,112 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/**
- * Removes files and preferences for previous application update tests in case
- * any of them had a fatal error. The test name ensures that it will run after
- * all other tests as long as the test naming uses the same format as the
- * existing tests.
- */
--->
-
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Application Update test cleanup"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- onload="runTest();">
-<script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-<script type="application/javascript"
- src="utils.js"/>
-
-<script type="application/javascript">
-<![CDATA[
-
-/**
- * If the application update tests left behind any of the files it uses it could
- * be a very bad thing. The purpose of this test is to prevent that from
- * happening.
- */
-function runTest() {
- debugDump("entering");
-
- SimpleTest.waitForExplicitFinish();
-
- if (DEBUG_AUS_TEST) {
- Services.prefs.setBoolPref(PREF_APP_UPDATE_LOG, true);
- }
-
- closeUpdateWindow();
-
- // Always leave the app.update.enabled and app.update.staging.enabled
- // preferences set to false when cleaning up.
- Services.prefs.setBoolPref(PREF_APP_UPDATE_ENABLED, false);
- Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, false);
-
- resetFiles();
- removeUpdateDirsAndFiles();
- reloadUpdateManagerData();
-
- let file = getUpdatesXMLFile(true);
- ok(!file.exists(), file.path + " should not exist");
-
- file = getUpdatesXMLFile(false);
- ok(!file.exists(), file.path + " should not exist");
-
- let dir = getUpdatesDir();
-
- file = dir.clone();
- file.append(FILE_UPDATE_STATUS);
- ok(!file.exists(), file.path + " should not exist");
-
- file = dir.clone();
- file.append(FILE_UPDATE_MAR);
- ok(!file.exists(), file.path + " should not exist");
-
- cleanupRestoreUpdaterBackup();
-}
-
-/**
- * After all tests finish this will repeatedly attempt to restore the real
- * updater if it exists and then call finishTest after the restore is
- * successful.
- */
-function cleanupRestoreUpdaterBackup() {
- debugDump("entering");
-
- try {
- // Windows debug builds keep the updater file in use for a short period of
- // time after the updater process exits.
- restoreUpdaterBackup();
- } catch (e) {
- logTestInfo("Attempt to restore the backed up updater failed... " +
- "will try again, Exception: " + e);
- SimpleTest.executeSoon(cleanupRestoreUpdaterBackup);
- return;
- }
-
- SimpleTest.executeSoon(finishTest);
-}
-
-function finishTest() {
- debugDump("entering");
-
- if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_LOG)) {
- Services.prefs.clearUserPref(PREF_APP_UPDATE_LOG);
- }
- SimpleTest.finish();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
- <p id="display"></p>
- <div id="content" style="display: none"></div>
- <pre id="test"></pre>
-</body>
-</window>
diff --git a/toolkit/mozapps/update/tests/chrome/update.sjs b/toolkit/mozapps/update/tests/chrome/update.sjs
deleted file mode 100644
index 78bb1b93f8..0000000000
--- a/toolkit/mozapps/update/tests/chrome/update.sjs
+++ /dev/null
@@ -1,194 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/**
- * Server side http server script for application update tests.
- */
-
-const { classes: Cc, interfaces: Ci } = Components;
-
-const REL_PATH_DATA = "chrome/toolkit/mozapps/update/tests/data/";
-
-function getTestDataFile(aFilename) {
- let file = Cc["@mozilla.org/file/directory_service;1"].
- getService(Ci.nsIProperties).get("CurWorkD", Ci.nsILocalFile);
- let pathParts = REL_PATH_DATA.split("/");
- for (let i = 0; i < pathParts.length; ++i) {
- file.append(pathParts[i]);
- }
- if (aFilename) {
- file.append(aFilename);
- }
- return file;
-}
-
-function loadHelperScript() {
- let scriptFile = getTestDataFile("sharedUpdateXML.js");
- let io = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService2);
- let scriptSpec = io.newFileURI(scriptFile).spec;
- let scriptloader = Cc["@mozilla.org/moz/jssubscript-loader;1"].
- getService(Ci.mozIJSSubScriptLoader);
- scriptloader.loadSubScript(scriptSpec, this);
-}
-loadHelperScript();
-
-const URL_HOST = "http://example.com";
-const URL_PATH_UPDATE_XML = "/chrome/toolkit/mozapps/update/tests/chrome/update.sjs";
-const URL_HTTP_UPDATE_SJS = URL_HOST + URL_PATH_UPDATE_XML;
-const SERVICE_URL = URL_HOST + "/" + REL_PATH_DATA + FILE_SIMPLE_MAR;
-
-const SLOW_MAR_DOWNLOAD_INTERVAL = 100;
-var gTimer;
-
-function handleRequest(aRequest, aResponse) {
- let params = { };
- if (aRequest.queryString) {
- params = parseQueryString(aRequest.queryString);
- }
-
- let statusCode = params.statusCode ? parseInt(params.statusCode) : 200;
- let statusReason = params.statusReason ? params.statusReason : "OK";
- aResponse.setStatusLine(aRequest.httpVersion, statusCode, statusReason);
- aResponse.setHeader("Cache-Control", "no-cache", false);
-
- // When a mar download is started by the update service it can finish
- // downloading before the ui has loaded. By specifying a serviceURL for the
- // update patch that points to this file and has a slowDownloadMar param the
- // mar will be downloaded asynchronously which will allow the ui to load
- // before the download completes.
- if (params.slowDownloadMar) {
- aResponse.processAsync();
- aResponse.setHeader("Content-Type", "binary/octet-stream");
- aResponse.setHeader("Content-Length", SIZE_SIMPLE_MAR);
- var continueFile = getTestDataFile("continue");
- var contents = readFileBytes(getTestDataFile(FILE_SIMPLE_MAR));
- gTimer = Cc["@mozilla.org/timer;1"].
- createInstance(Ci.nsITimer);
- gTimer.initWithCallback(function(aTimer) {
- if (continueFile.exists()) {
- gTimer.cancel();
- aResponse.write(contents);
- aResponse.finish();
- }
- }, SLOW_MAR_DOWNLOAD_INTERVAL, Ci.nsITimer.TYPE_REPEATING_SLACK);
- return;
- }
-
- if (params.uiURL) {
- let remoteType = "";
- if (!params.remoteNoTypeAttr && params.uiURL == "BILLBOARD") {
- remoteType = " " + params.uiURL.toLowerCase() + "=\"1\"";
- }
- aResponse.write("<html><head><meta http-equiv=\"content-type\" content=" +
- "\"text/html; charset=utf-8\"></head><body" +
- remoteType + ">" + params.uiURL +
- "<br><br>this is a test mar that will not affect your " +
- "build.</body></html>");
- return;
- }
-
- if (params.xmlMalformed) {
- aResponse.write("xml error");
- return;
- }
-
- if (params.noUpdates) {
- aResponse.write(getRemoteUpdatesXMLString(""));
- return;
- }
-
- if (params.unsupported) {
- aResponse.write(getRemoteUpdatesXMLString(" <update type=\"major\" " +
- "unsupported=\"true\" " +
- "detailsURL=\"" + URL_HOST +
- "\"></update>\n"));
- return;
- }
-
- let size;
- let patches = "";
- if (!params.partialPatchOnly) {
- size = SIZE_SIMPLE_MAR + (params.invalidCompleteSize ? "1" : "");
- patches += getRemotePatchString("complete", SERVICE_URL, "SHA512",
- SHA512_HASH_SIMPLE_MAR, size);
- }
-
- if (!params.completePatchOnly) {
- size = SIZE_SIMPLE_MAR + (params.invalidPartialSize ? "1" : "");
- patches += getRemotePatchString("partial", SERVICE_URL, "SHA512",
- SHA512_HASH_SIMPLE_MAR, size);
- }
-
- let type = params.type ? params.type : "major";
- let name = params.name ? params.name : "App Update Test";
- let appVersion = params.appVersion ? params.appVersion : "999999.9";
- let displayVersion = params.displayVersion ? params.displayVersion
- : "version " + appVersion;
- let buildID = params.buildID ? params.buildID : "01234567890123";
- // XXXrstrong - not specifying a detailsURL will cause a leak due to bug 470244
-// let detailsURL = params.showDetails ? URL_HTTP_UPDATE_SJS + "?uiURL=DETAILS" : null;
- let detailsURL = URL_HTTP_UPDATE_SJS + "?uiURL=DETAILS";
- let showPrompt = params.showPrompt ? "true" : null;
- let showNever = params.showNever ? "true" : null;
- let promptWaitTime = params.promptWaitTime ? params.promptWaitTime : null;
-
- let updates = getRemoteUpdateString(patches, type, "App Update Test",
- displayVersion, appVersion, buildID,
- detailsURL, showPrompt, showNever,
- promptWaitTime);
- aResponse.write(getRemoteUpdatesXMLString(updates));
-}
-
-/**
- * Helper function to create a JS object representing the url parameters from
- * the request's queryString.
- *
- * @param aQueryString
- * The request's query string.
- * @return A JS object representing the url parameters from the request's
- * queryString.
- */
-function parseQueryString(aQueryString) {
- let paramArray = aQueryString.split("&");
- let regex = /^([^=]+)=(.*)$/;
- let params = {};
- for (let i = 0, sz = paramArray.length; i < sz; i++) {
- let match = regex.exec(paramArray[i]);
- if (!match) {
- throw "Bad parameter in queryString! '" + paramArray[i] + "'";
- }
- params[decodeURIComponent(match[1])] = decodeURIComponent(match[2]);
- }
-
- return params;
-}
-
-/**
- * Reads the binary contents of a file and returns it as a string.
- *
- * @param aFile
- * The file to read from.
- * @return The contents of the file as a string.
- */
-function readFileBytes(aFile) {
- let fis = Cc["@mozilla.org/network/file-input-stream;1"].
- createInstance(Ci.nsIFileInputStream);
- fis.init(aFile, -1, -1, false);
- let bis = Cc["@mozilla.org/binaryinputstream;1"].
- createInstance(Ci.nsIBinaryInputStream);
- bis.setInputStream(fis);
- let data = [];
- let count = fis.available();
- while (count > 0) {
- let bytes = bis.readByteArray(Math.min(65535, count));
- data.push(String.fromCharCode.apply(null, bytes));
- count -= bytes.length;
- if (bytes.length == 0) {
- throw "Nothing read from input stream!";
- }
- }
- data.join('');
- fis.close();
- return data.toString();
-}
diff --git a/toolkit/mozapps/update/tests/chrome/utils.js b/toolkit/mozapps/update/tests/chrome/utils.js
deleted file mode 100644
index 31d0d2e5a7..0000000000
--- a/toolkit/mozapps/update/tests/chrome/utils.js
+++ /dev/null
@@ -1,1011 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/**
- * Test Definition
- *
- * Most tests can use an array named TESTS that will perform most if not all of
- * the necessary checks. Each element in the array must be an object with the
- * following possible properties. Additional properties besides the ones listed
- * below can be added as needed.
- *
- * overrideCallback (optional)
- * The function to call for the next test. This is typically called when the
- * wizard page changes but can also be called for other events by the previous
- * test. If this property isn't defined then the defaultCallback function will
- * be called. If this property is defined then all other properties are
- * optional.
- *
- * pageid (required unless overrideCallback is specified)
- * The expected pageid for the wizard. This property is required unless the
- * overrideCallback property is defined.
- *
- * extraStartFunction (optional)
- * The function to call at the beginning of the defaultCallback function. If
- * the function returns true the defaultCallback function will return early
- * which allows waiting for a specific condition to be evaluated in the
- * function specified in the extraStartFunction property before continuing
- * with the test.
- *
- * extraCheckFunction (optional)
- * The function to call to perform extra checks in the defaultCallback
- * function.
- *
- * extraDelayedCheckFunction (optional)
- * The function to call to perform extra checks in the delayedDefaultCallback
- * function.
- *
- * buttonStates (optional)
- * A javascript object representing the expected hidden and disabled attribute
- * values for the buttons of the current wizard page. The values are checked
- * in the delayedDefaultCallback function. For information about the structure
- * of this object refer to the getExpectedButtonStates and checkButtonStates
- * functions.
- *
- * buttonClick (optional)
- * The current wizard page button to click at the end of the
- * delayedDefaultCallback function. If the buttonClick property is defined
- * then the extraDelayedFinishFunction property can't be specified due to race
- * conditions in some of the tests and if both of them are specified the test
- * will intentionally throw.
- *
- * extraDelayedFinishFunction (optional)
- * The function to call at the end of the delayedDefaultCallback function.
- * If the extraDelayedFinishFunction property is defined then the buttonClick
- * property can't be specified due to race conditions in some of the tests and
- * if both of them are specified the test will intentionally throw.
- *
- * ranTest (should not be specified)
- * When delayedDefaultCallback is called a property named ranTest is added to
- * the current test so it is possible to verify that each test in the TESTS
- * array has ran.
- *
- * prefHasUserValue (optional)
- * For comparing the expected value defined by this property with the return
- * value of prefHasUserValue using gPrefToCheck for the preference name in the
- * checkPrefHasUserValue function.
- */
-
-'use strict';
-
-/* globals TESTS, runTest, finishTest */
-
-const { classes: Cc, interfaces: Ci, manager: Cm, results: Cr,
- utils: Cu } = Components;
-
-Cu.import("resource://gre/modules/Services.jsm", this);
-
-const IS_MACOSX = ("nsILocalFileMac" in Ci);
-const IS_WIN = ("@mozilla.org/windows-registry-key;1" in Cc);
-
-// The tests have to use the pageid instead of the pageIndex due to the
-// app update wizard's access method being random.
-const PAGEID_DUMMY = "dummy"; // Done
-const PAGEID_CHECKING = "checking"; // Done
-const PAGEID_NO_UPDATES_FOUND = "noupdatesfound"; // Done
-const PAGEID_MANUAL_UPDATE = "manualUpdate"; // Done
-const PAGEID_UNSUPPORTED = "unsupported"; // Done
-const PAGEID_FOUND_BASIC = "updatesfoundbasic"; // Done
-const PAGEID_DOWNLOADING = "downloading"; // Done
-const PAGEID_ERRORS = "errors"; // Done
-const PAGEID_ERROR_EXTRA = "errorextra"; // Done
-const PAGEID_ERROR_PATCHING = "errorpatching"; // Done
-const PAGEID_FINISHED = "finished"; // Done
-const PAGEID_FINISHED_BKGRD = "finishedBackground"; // Done
-
-const UPDATE_WINDOW_NAME = "Update:Wizard";
-
-const URL_HOST = "http://example.com";
-const URL_PATH_UPDATE_XML = "/chrome/toolkit/mozapps/update/tests/chrome/update.sjs";
-const REL_PATH_DATA = "chrome/toolkit/mozapps/update/tests/data";
-
-// These two URLs must not contain parameters since tests add their own
-// test specific parameters.
-const URL_HTTP_UPDATE_XML = URL_HOST + URL_PATH_UPDATE_XML;
-const URL_HTTPS_UPDATE_XML = "https://example.com" + URL_PATH_UPDATE_XML;
-
-const URI_UPDATE_PROMPT_DIALOG = "chrome://mozapps/content/update/updates.xul";
-
-const PREF_APP_UPDATE_INTERVAL = "app.update.interval";
-const PREF_APP_UPDATE_LASTUPDATETIME = "app.update.lastUpdateTime.background-update-timer";
-
-const LOG_FUNCTION = info;
-
-const BIN_SUFFIX = (IS_WIN ? ".exe" : "");
-const FILE_UPDATER_BIN = "updater" + (IS_MACOSX ? ".app" : BIN_SUFFIX);
-const FILE_UPDATER_BIN_BAK = FILE_UPDATER_BIN + ".bak";
-
-var gURLData = URL_HOST + "/" + REL_PATH_DATA + "/";
-
-var gTestTimeout = 240000; // 4 minutes
-var gTimeoutTimer;
-
-// The number of SimpleTest.executeSoon calls to perform when waiting on an
-// update window to close before giving up.
-const CLOSE_WINDOW_TIMEOUT_MAXCOUNT = 10;
-// Counter for the SimpleTest.executeSoon when waiting on an update window to
-// close before giving up.
-var gCloseWindowTimeoutCounter = 0;
-
-// The following vars are for restoring previous preference values (if present)
-// when the test finishes.
-var gAppUpdateEnabled; // app.update.enabled
-var gAppUpdateServiceEnabled; // app.update.service.enabled
-var gAppUpdateStagingEnabled; // app.update.staging.enabled
-var gAppUpdateURLDefault; // app.update.url (default prefbranch)
-
-var gTestCounter = -1;
-var gWin;
-var gDocElem;
-var gPrefToCheck;
-var gUseTestUpdater = false;
-
-// Set to true to log additional information for debugging. To log additional
-// information for an individual test set DEBUG_AUS_TEST to true in the test's
-// onload function.
-var DEBUG_AUS_TEST = true;
-
-const DATA_URI_SPEC = "chrome://mochitests/content/chrome/toolkit/mozapps/update/tests/data/";
-/* import-globals-from ../data/shared.js */
-Services.scriptloader.loadSubScript(DATA_URI_SPEC + "shared.js", this);
-
-/**
- * The current test in TESTS array.
- */
-this.__defineGetter__("gTest", function() {
- return TESTS[gTestCounter];
-});
-
-/**
- * The current test's callback. This will either return the callback defined in
- * the test's overrideCallback property or defaultCallback if the
- * overrideCallback property is undefined.
- */
-this.__defineGetter__("gCallback", function() {
- return gTest.overrideCallback ? gTest.overrideCallback
- : defaultCallback;
-});
-
-/**
- * nsIObserver for receiving window open and close notifications.
- */
-const gWindowObserver = {
- observe: function WO_observe(aSubject, aTopic, aData) {
- let win = aSubject.QueryInterface(Ci.nsIDOMEventTarget);
-
- if (aTopic == "domwindowclosed") {
- if (win.location != URI_UPDATE_PROMPT_DIALOG) {
- debugDump("domwindowclosed event for window not being tested - " +
- "location: " + win.location + "... returning early");
- return;
- }
- // Allow tests the ability to provide their own function (it must be
- // named finishTest) for finishing the test.
- try {
- finishTest();
- }
- catch (e) {
- finishTestDefault();
- }
- return;
- }
-
- win.addEventListener("load", function WO_observe_onLoad() {
- win.removeEventListener("load", WO_observe_onLoad, false);
- // Ignore windows other than the update UI window.
- if (win.location != URI_UPDATE_PROMPT_DIALOG) {
- debugDump("load event for window not being tested - location: " +
- win.location + "... returning early");
- return;
- }
-
- // The first wizard page should always be the dummy page.
- let pageid = win.document.documentElement.currentPage.pageid;
- if (pageid != PAGEID_DUMMY) {
- // This should never happen but if it does this will provide a clue
- // for diagnosing the cause.
- ok(false, "Unexpected load event - pageid got: " + pageid +
- ", expected: " + PAGEID_DUMMY + "... returning early");
- return;
- }
-
- gWin = win;
- gDocElem = gWin.document.documentElement;
- gDocElem.addEventListener("pageshow", onPageShowDefault, false);
- }, false);
- }
-};
-
-/**
- * Default test run function that can be used by most tests. This function uses
- * protective measures to prevent the test from failing provided by
- * |runTestDefaultWaitForWindowClosed| helper functions to prevent failure due
- * to a previous test failure.
- */
-function runTestDefault() {
- debugDump("entering");
-
- if (!("@mozilla.org/zipwriter;1" in Cc)) {
- ok(false, "nsIZipWriter is required to run these tests");
- return;
- }
-
- SimpleTest.waitForExplicitFinish();
-
- runTestDefaultWaitForWindowClosed();
-}
-
-/**
- * If an update window is found SimpleTest.executeSoon can callback before the
- * update window is fully closed especially with debug builds. If an update
- * window is found this function will call itself using SimpleTest.executeSoon
- * up to the amount declared in CLOSE_WINDOW_TIMEOUT_MAXCOUNT until the update
- * window has closed before continuing the test.
- */
-function runTestDefaultWaitForWindowClosed() {
- gCloseWindowTimeoutCounter++;
- if (gCloseWindowTimeoutCounter > CLOSE_WINDOW_TIMEOUT_MAXCOUNT) {
- try {
- finishTest();
- }
- catch (e) {
- finishTestDefault();
- }
- return;
- }
-
- // The update window should not be open at this time. If it is the call to
- // |closeUpdateWindow| will close it and cause the test to fail.
- if (closeUpdateWindow()) {
- SimpleTest.executeSoon(runTestDefaultWaitForWindowClosed);
- } else {
- Services.ww.registerNotification(gWindowObserver);
-
- gCloseWindowTimeoutCounter = 0;
-
- setupFiles();
- setupPrefs();
- gEnv.set("MOZ_TEST_SKIP_UPDATE_STAGE", "1");
- removeUpdateDirsAndFiles();
- reloadUpdateManagerData();
- setupTimer(gTestTimeout);
- SimpleTest.executeSoon(setupTestUpdater);
- }
-}
-
-/**
- * Default test finish function that can be used by most tests. This function
- * uses protective measures to prevent the next test from failing provided by
- * |finishTestDefaultWaitForWindowClosed| helper functions to prevent failure
- * due to an update window being left open.
- */
-function finishTestDefault() {
- debugDump("entering");
- if (gTimeoutTimer) {
- gTimeoutTimer.cancel();
- gTimeoutTimer = null;
- }
-
- if (gChannel) {
- debugDump("channel = " + gChannel);
- gChannel = null;
- gPrefRoot.removeObserver(PREF_APP_UPDATE_CHANNEL, observer);
- }
-
- verifyTestsRan();
-
- resetPrefs();
- gEnv.set("MOZ_TEST_SKIP_UPDATE_STAGE", "");
- resetFiles();
- removeUpdateDirsAndFiles();
- reloadUpdateManagerData();
-
- Services.ww.unregisterNotification(gWindowObserver);
- if (gDocElem) {
- gDocElem.removeEventListener("pageshow", onPageShowDefault, false);
- }
-
- finishTestRestoreUpdaterBackup();
-}
-
-/**
- * nsITimerCallback for the timeout timer to cleanly finish a test if the Update
- * Window doesn't close for a test. This allows the next test to run properly if
- * a previous test fails.
- *
- * @param aTimer
- * The nsITimer that fired.
- */
-function finishTestTimeout(aTimer) {
- ok(false, "Test timed out. Maximum time allowed is " + (gTestTimeout / 1000) +
- " seconds");
-
- try {
- finishTest();
- }
- catch (e) {
- finishTestDefault();
- }
-}
-
-/**
- * When a test finishes this will repeatedly attempt to restore the real updater
- * for tests that use the test updater and then call
- * finishTestDefaultWaitForWindowClosed after the restore is successful.
- */
-function finishTestRestoreUpdaterBackup() {
- if (gUseTestUpdater) {
- try {
- // Windows debug builds keep the updater file in use for a short period of
- // time after the updater process exits.
- restoreUpdaterBackup();
- } catch (e) {
- logTestInfo("Attempt to restore the backed up updater failed... " +
- "will try again, Exception: " + e);
- SimpleTest.executeSoon(finishTestRestoreUpdaterBackup);
- return;
- }
- }
-
- finishTestDefaultWaitForWindowClosed();
-}
-
-/**
- * If an update window is found SimpleTest.executeSoon can callback before the
- * update window is fully closed especially with debug builds. If an update
- * window is found this function will call itself using SimpleTest.executeSoon
- * up to the amount declared in CLOSE_WINDOW_TIMEOUT_MAXCOUNT until the update
- * window has closed before finishing the test.
- */
-function finishTestDefaultWaitForWindowClosed() {
- gCloseWindowTimeoutCounter++;
- if (gCloseWindowTimeoutCounter > CLOSE_WINDOW_TIMEOUT_MAXCOUNT) {
- SimpleTest.requestCompleteLog();
- SimpleTest.finish();
- return;
- }
-
- // The update window should not be open at this time. If it is the call to
- // |closeUpdateWindow| will close it and cause the test to fail.
- if (closeUpdateWindow()) {
- SimpleTest.executeSoon(finishTestDefaultWaitForWindowClosed);
- } else {
- SimpleTest.finish();
- }
-}
-
-/**
- * Default callback for the wizard's documentElement pageshow listener. This
- * will return early for event's where the originalTarget's nodeName is not
- * wizardpage.
- */
-function onPageShowDefault(aEvent) {
- if (!gTimeoutTimer) {
- debugDump("gTimeoutTimer is null... returning early");
- return;
- }
-
- // Return early if the event's original target isn't for a wizardpage element.
- // This check is necessary due to the remotecontent element firing pageshow.
- if (aEvent.originalTarget.nodeName != "wizardpage") {
- debugDump("only handles events with an originalTarget nodeName of " +
- "|wizardpage|. aEvent.originalTarget.nodeName = " +
- aEvent.originalTarget.nodeName + "... returning early");
- return;
- }
-
- gTestCounter++;
- gCallback(aEvent);
-}
-
-/**
- * Default callback that can be used by most tests.
- */
-function defaultCallback(aEvent) {
- if (!gTimeoutTimer) {
- debugDump("gTimeoutTimer is null... returning early");
- return;
- }
-
- debugDump("entering - TESTS[" + gTestCounter + "], pageid: " + gTest.pageid +
- ", aEvent.originalTarget.nodeName: " +
- aEvent.originalTarget.nodeName);
-
- if (gTest && gTest.extraStartFunction) {
- debugDump("calling extraStartFunction " + gTest.extraStartFunction.name);
- if (gTest.extraStartFunction(aEvent)) {
- debugDump("extraStartFunction early return");
- return;
- }
- }
-
- is(gDocElem.currentPage.pageid, gTest.pageid,
- "Checking currentPage.pageid equals " + gTest.pageid + " in pageshow");
-
- // Perform extra checks if specified by the test
- if (gTest.extraCheckFunction) {
- debugDump("calling extraCheckFunction " + gTest.extraCheckFunction.name);
- gTest.extraCheckFunction();
- }
-
- // The wizard page buttons' disabled and hidden attributes are set after the
- // pageshow event so use executeSoon to allow them to be set so their disabled
- // and hidden attribute values can be checked.
- SimpleTest.executeSoon(delayedDefaultCallback);
-}
-
-/**
- * Delayed default callback called using executeSoon in defaultCallback which
- * allows the wizard page buttons' disabled and hidden attributes to be set
- * before checking their values.
- */
-function delayedDefaultCallback() {
- if (!gTimeoutTimer) {
- debugDump("gTimeoutTimer is null... returning early");
- return;
- }
-
- if (!gTest) {
- debugDump("gTest is null... returning early");
- return;
- }
-
- debugDump("entering - TESTS[" + gTestCounter + "], pageid: " + gTest.pageid);
-
- // Verify the pageid hasn't changed after executeSoon was called.
- is(gDocElem.currentPage.pageid, gTest.pageid,
- "Checking currentPage.pageid equals " + gTest.pageid + " after " +
- "executeSoon");
-
- checkButtonStates();
-
- // Perform delayed extra checks if specified by the test
- if (gTest.extraDelayedCheckFunction) {
- debugDump("calling extraDelayedCheckFunction " +
- gTest.extraDelayedCheckFunction.name);
- gTest.extraDelayedCheckFunction();
- }
-
- // Used to verify that this test has been performed
- gTest.ranTest = true;
-
- if (gTest.buttonClick) {
- debugDump("clicking " + gTest.buttonClick + " button");
- if (gTest.extraDelayedFinishFunction) {
- throw ("Tests cannot have a buttonClick and an extraDelayedFinishFunction property");
- }
- gDocElem.getButton(gTest.buttonClick).click();
- } else if (gTest.extraDelayedFinishFunction) {
- debugDump("calling extraDelayedFinishFunction " +
- gTest.extraDelayedFinishFunction.name);
- gTest.extraDelayedFinishFunction();
- }
-}
-
-/**
- * Gets the continue file used to signal the mock http server to continue
- * downloading for slow download mar file tests without creating it.
- *
- * @return nsILocalFile for the continue file.
- */
-function getContinueFile() {
- let continueFile = Cc["@mozilla.org/file/directory_service;1"].
- getService(Ci.nsIProperties).
- get("CurWorkD", Ci.nsILocalFile);
- let continuePath = REL_PATH_DATA + "/continue";
- let continuePathParts = continuePath.split("/");
- for (let i = 0; i < continuePathParts.length; ++i) {
- continueFile.append(continuePathParts[i]);
- }
- return continueFile;
-}
-
-/**
- * Creates the continue file used to signal the mock http server to continue
- * downloading for slow download mar file tests.
- */
-function createContinueFile() {
- debugDump("creating 'continue' file for slow mar downloads");
- writeFile(getContinueFile(), "");
-}
-
-/**
- * Removes the continue file used to signal the mock http server to continue
- * downloading for slow download mar file tests.
- */
-function removeContinueFile() {
- let continueFile = getContinueFile();
- if (continueFile.exists()) {
- debugDump("removing 'continue' file for slow mar downloads");
- continueFile.remove(false);
- }
-}
-
-/**
- * Checks the wizard page buttons' disabled and hidden attributes values are
- * correct. If an expected button id is not specified then the expected disabled
- * and hidden attribute value is true.
- */
-function checkButtonStates() {
- debugDump("entering - TESTS[" + gTestCounter + "], pageid: " + gTest.pageid);
-
- const buttonNames = ["extra1", "extra2", "back", "next", "finish", "cancel"];
- let buttonStates = getExpectedButtonStates();
- buttonNames.forEach(function(aButtonName) {
- let button = gDocElem.getButton(aButtonName);
- let hasHidden = aButtonName in buttonStates &&
- "hidden" in buttonStates[aButtonName];
- let hidden = hasHidden ? buttonStates[aButtonName].hidden : true;
- let hasDisabled = aButtonName in buttonStates &&
- "disabled" in buttonStates[aButtonName];
- let disabled = hasDisabled ? buttonStates[aButtonName].disabled : true;
- is(button.hidden, hidden, "Checking " + aButtonName + " button " +
- "hidden attribute value equals " + (hidden ? "true" : "false"));
- is(button.disabled, disabled, "Checking " + aButtonName + " button " +
- "disabled attribute value equals " + (disabled ? "true" : "false"));
- });
-}
-
-/**
- * Returns the expected disabled and hidden attribute values for the buttons of
- * the current wizard page.
- */
-function getExpectedButtonStates() {
- // Allow individual tests to override the expected button states.
- if (gTest.buttonStates) {
- return gTest.buttonStates;
- }
-
- switch (gTest.pageid) {
- case PAGEID_CHECKING:
- return {cancel: {disabled: false, hidden: false}};
- case PAGEID_FOUND_BASIC:
- if (gTest.neverButton) {
- return {extra1: {disabled: false, hidden: false},
- extra2: {disabled: false, hidden: false},
- next: {disabled: false, hidden: false}};
- }
- return {extra1: {disabled: false, hidden: false},
- next: {disabled: false, hidden: false}};
- case PAGEID_DOWNLOADING:
- return {extra1: {disabled: false, hidden: false}};
- case PAGEID_NO_UPDATES_FOUND:
- case PAGEID_MANUAL_UPDATE:
- case PAGEID_UNSUPPORTED:
- case PAGEID_ERRORS:
- case PAGEID_ERROR_EXTRA:
- return {finish: {disabled: false, hidden: false}};
- case PAGEID_ERROR_PATCHING:
- return {next: { disabled: false, hidden: false}};
- case PAGEID_FINISHED:
- case PAGEID_FINISHED_BKGRD:
- return {extra1: { disabled: false, hidden: false},
- finish: { disabled: false, hidden: false}};
- }
- return null;
-}
-
-/**
- * Compares the return value of prefHasUserValue for the preference specified in
- * gPrefToCheck with the value passed in the aPrefHasValue parameter or the
- * value specified in the current test's prefHasUserValue property if
- * aPrefHasValue is undefined.
- *
- * @param aPrefHasValue (optional)
- * The expected value returned from prefHasUserValue for the preference
- * specified in gPrefToCheck. If aPrefHasValue is undefined the value
- * of the current test's prefHasUserValue property will be used.
- */
-function checkPrefHasUserValue(aPrefHasValue) {
- let prefHasUserValue = aPrefHasValue === undefined ? gTest.prefHasUserValue
- : aPrefHasValue;
- is(Services.prefs.prefHasUserValue(gPrefToCheck), prefHasUserValue,
- "Checking prefHasUserValue for preference " + gPrefToCheck + " equals " +
- (prefHasUserValue ? "true" : "false"));
-}
-
-/**
- * Checks whether the link is hidden for a general background update check error
- * or not on the errorextra page and that the app.update.backgroundErrors
- * preference does not have a user value.
- *
- * @param aShouldBeHidden (optional)
- * The expected value for the label's hidden attribute for the link. If
- * aShouldBeHidden is undefined the value of the current test's
- * shouldBeHidden property will be used.
- */
-function checkErrorExtraPage(aShouldBeHidden) {
- let shouldBeHidden = aShouldBeHidden === undefined ? gTest.shouldBeHidden
- : aShouldBeHidden;
- is(gWin.document.getElementById("errorExtraLinkLabel").hidden, shouldBeHidden,
- "Checking errorExtraLinkLabel hidden attribute equals " +
- (shouldBeHidden ? "true" : "false"));
-
- is(gWin.document.getElementById(gTest.displayedTextElem).hidden, false,
- "Checking " + gTest.displayedTextElem + " should not be hidden");
-
- ok(!Services.prefs.prefHasUserValue(PREF_APP_UPDATE_BACKGROUNDERRORS),
- "Preference " + PREF_APP_UPDATE_BACKGROUNDERRORS + " should not have a " +
- "user value");
-}
-
-/**
- * Gets the update version info for the update url parameters to send to
- * update.sjs.
- *
- * @param aAppVersion (optional)
- * The application version for the update snippet. If not specified the
- * current application version will be used.
- * @return The url parameters for the application and platform version to send
- * to update.sjs.
- */
-function getVersionParams(aAppVersion) {
- let appInfo = Services.appinfo;
- return "&appVersion=" + (aAppVersion ? aAppVersion : appInfo.version);
-}
-
-/**
- * Verifies that all tests ran.
- */
-function verifyTestsRan() {
- debugDump("entering");
-
- // Return early if there are no tests defined.
- if (!TESTS) {
- return;
- }
-
- gTestCounter = -1;
- for (let i = 0; i < TESTS.length; ++i) {
- gTestCounter++;
- let test = TESTS[i];
- let msg = "Checking if TESTS[" + i + "] test was performed... " +
- "callback function name = " + gCallback.name + ", " +
- "pageid = " + test.pageid;
- ok(test.ranTest, msg);
- }
-}
-
-/**
- * Creates a backup of files the tests need to modify so they can be restored to
- * the original file when the test has finished and then modifies the files.
- */
-function setupFiles() {
- // Backup the updater-settings.ini file if it exists by moving it.
- let baseAppDir = getGREDir();
- let updateSettingsIni = baseAppDir.clone();
- updateSettingsIni.append(FILE_UPDATE_SETTINGS_INI);
- if (updateSettingsIni.exists()) {
- updateSettingsIni.moveTo(baseAppDir, FILE_UPDATE_SETTINGS_INI_BAK);
- }
- updateSettingsIni = baseAppDir.clone();
- updateSettingsIni.append(FILE_UPDATE_SETTINGS_INI);
- writeFile(updateSettingsIni, UPDATE_SETTINGS_CONTENTS);
-}
-
-/**
- * For tests that use the test updater restores the backed up real updater if
- * it exists and tries again on failure since Windows debug builds at times
- * leave the file in use. After success moveRealUpdater is called to continue
- * the setup of the test updater. For tests that don't use the test updater
- * runTest will be called.
- */
-function setupTestUpdater() {
- if (!gUseTestUpdater) {
- runTest();
- return;
- }
-
- try {
- restoreUpdaterBackup();
- } catch (e) {
- logTestInfo("Attempt to restore the backed up updater failed... " +
- "will try again, Exception: " + e);
- SimpleTest.executeSoon(setupTestUpdater);
- return;
- }
- moveRealUpdater();
-}
-
-/**
- * Backs up the real updater and tries again on failure since Windows debug
- * builds at times leave the file in use. After success it will call
- * copyTestUpdater to continue the setup of the test updater.
- */
-function moveRealUpdater() {
- try {
- // Move away the real updater
- let baseAppDir = getAppBaseDir();
- let updater = baseAppDir.clone();
- updater.append(FILE_UPDATER_BIN);
- updater.moveTo(baseAppDir, FILE_UPDATER_BIN_BAK);
- } catch (e) {
- logTestInfo("Attempt to move the real updater out of the way failed... " +
- "will try again, Exception: " + e);
- SimpleTest.executeSoon(moveRealUpdater);
- return;
- }
-
- copyTestUpdater();
-}
-
-/**
- * Copies the test updater so it can be used by tests and tries again on failure
- * since Windows debug builds at times leave the file in use. After success it
- * will call runTest to continue the test.
- */
-function copyTestUpdater() {
- try {
- // Copy the test updater
- let baseAppDir = getAppBaseDir();
- let testUpdaterDir = Services.dirsvc.get("CurWorkD", Ci.nsILocalFile);
- let relPath = REL_PATH_DATA;
- let pathParts = relPath.split("/");
- for (let i = 0; i < pathParts.length; ++i) {
- testUpdaterDir.append(pathParts[i]);
- }
-
- let testUpdater = testUpdaterDir.clone();
- testUpdater.append(FILE_UPDATER_BIN);
- testUpdater.copyToFollowingLinks(baseAppDir, FILE_UPDATER_BIN);
- } catch (e) {
- logTestInfo("Attempt to copy the test updater failed... " +
- "will try again, Exception: " + e);
- SimpleTest.executeSoon(copyTestUpdater);
- return;
- }
-
- runTest();
-}
-
-/**
- * Restores the updater that was backed up. This is called in setupTestUpdater
- * before the backup of the real updater is done in case the previous test
- * failed to restore the updater, in finishTestDefaultWaitForWindowClosed when
- * the test has finished, and in test_9999_cleanup.xul after all tests have
- * finished.
- */
-function restoreUpdaterBackup() {
- let baseAppDir = getAppBaseDir();
- let updater = baseAppDir.clone();
- let updaterBackup = baseAppDir.clone();
- updater.append(FILE_UPDATER_BIN);
- updaterBackup.append(FILE_UPDATER_BIN_BAK);
- if (updaterBackup.exists()) {
- if (updater.exists()) {
- updater.remove(true);
- }
- updaterBackup.moveTo(baseAppDir, FILE_UPDATER_BIN);
- }
-}
-
-/**
- * Sets the most common preferences used by tests to values used by the majority
- * of the tests and when necessary saves the preference's original values if
- * present so they can be set back to the original values when the test has
- * finished.
- */
-function setupPrefs() {
- if (DEBUG_AUS_TEST) {
- Services.prefs.setBoolPref(PREF_APP_UPDATE_LOG, true);
- }
-
- // Prevent nsIUpdateTimerManager from notifying nsIApplicationUpdateService
- // to check for updates by setting the app update last update time to the
- // current time minus one minute in seconds and the interval time to 12 hours
- // in seconds.
- let now = Math.round(Date.now() / 1000) - 60;
- Services.prefs.setIntPref(PREF_APP_UPDATE_LASTUPDATETIME, now);
- Services.prefs.setIntPref(PREF_APP_UPDATE_INTERVAL, 43200);
-
- if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_ENABLED)) {
- gAppUpdateEnabled = Services.prefs.getBoolPref(PREF_APP_UPDATE_ENABLED);
- }
- Services.prefs.setBoolPref(PREF_APP_UPDATE_ENABLED, true);
-
- if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_SERVICE_ENABLED)) {
- gAppUpdateServiceEnabled = Services.prefs.getBoolPref(PREF_APP_UPDATE_SERVICE_ENABLED);
- }
- Services.prefs.setBoolPref(PREF_APP_UPDATE_SERVICE_ENABLED, false);
-
- if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_STAGING_ENABLED)) {
- gAppUpdateStagingEnabled = Services.prefs.getBoolPref(PREF_APP_UPDATE_STAGING_ENABLED);
- }
- Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, false);
-
- Services.prefs.setIntPref(PREF_APP_UPDATE_IDLETIME, 0);
- Services.prefs.setIntPref(PREF_APP_UPDATE_PROMPTWAITTIME, 0);
- Services.prefs.setBoolPref(PREF_APP_UPDATE_SILENT, false);
- Services.prefs.setIntPref(PREF_APP_UPDATE_DOWNLOADBACKGROUNDINTERVAL, 0);
-}
-
-/**
- * Restores files that were backed up for the tests and general file cleanup.
- */
-function resetFiles() {
- // Restore the backed up updater-settings.ini if it exists.
- let baseAppDir = getGREDir();
- let updateSettingsIni = baseAppDir.clone();
- updateSettingsIni.append(FILE_UPDATE_SETTINGS_INI_BAK);
- if (updateSettingsIni.exists()) {
- updateSettingsIni.moveTo(baseAppDir, FILE_UPDATE_SETTINGS_INI);
- }
-
- // Not being able to remove the "updated" directory will not adversely affect
- // subsequent tests so wrap it in a try block and don't test whether its
- // removal was successful.
- let updatedDir;
- if (IS_MACOSX) {
- updatedDir = getUpdatesDir();
- updatedDir.append(DIR_PATCH);
- } else {
- updatedDir = getAppBaseDir();
- }
- updatedDir.append(DIR_UPDATED);
- if (updatedDir.exists()) {
- try {
- removeDirRecursive(updatedDir);
- }
- catch (e) {
- logTestInfo("Unable to remove directory. Path: " + updatedDir.path +
- ", Exception: " + e);
- }
- }
-}
-
-/**
- * Resets the most common preferences used by tests to their original values.
- */
-function resetPrefs() {
- if (gAppUpdateURLDefault) {
- gDefaultPrefBranch.setCharPref(PREF_APP_UPDATE_URL, gAppUpdateURLDefault);
- }
-
- if (gAppUpdateEnabled !== undefined) {
- Services.prefs.setBoolPref(PREF_APP_UPDATE_ENABLED, gAppUpdateEnabled);
- } else if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_ENABLED)) {
- Services.prefs.clearUserPref(PREF_APP_UPDATE_ENABLED);
- }
-
- if (gAppUpdateServiceEnabled !== undefined) {
- Services.prefs.setBoolPref(PREF_APP_UPDATE_SERVICE_ENABLED, gAppUpdateServiceEnabled);
- } else if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_SERVICE_ENABLED)) {
- Services.prefs.clearUserPref(PREF_APP_UPDATE_SERVICE_ENABLED);
- }
-
- if (gAppUpdateStagingEnabled !== undefined) {
- Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, gAppUpdateStagingEnabled);
- } else if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_STAGING_ENABLED)) {
- Services.prefs.clearUserPref(PREF_APP_UPDATE_STAGING_ENABLED);
- }
-
- if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_IDLETIME)) {
- Services.prefs.clearUserPref(PREF_APP_UPDATE_IDLETIME);
- }
-
- if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_PROMPTWAITTIME)) {
- Services.prefs.clearUserPref(PREF_APP_UPDATE_PROMPTWAITTIME);
- }
-
- if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_URL_DETAILS)) {
- Services.prefs.clearUserPref(PREF_APP_UPDATE_URL_DETAILS);
- }
-
- if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_NOTIFIEDUNSUPPORTED)) {
- Services.prefs.clearUserPref(PREF_APP_UPDATE_NOTIFIEDUNSUPPORTED);
- }
-
- if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_LOG)) {
- Services.prefs.clearUserPref(PREF_APP_UPDATE_LOG);
- }
-
- if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_SILENT)) {
- Services.prefs.clearUserPref(PREF_APP_UPDATE_SILENT);
- }
-
- if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_BACKGROUNDERRORS)) {
- Services.prefs.clearUserPref(PREF_APP_UPDATE_BACKGROUNDERRORS);
- }
-
- if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_BACKGROUNDMAXERRORS)) {
- Services.prefs.clearUserPref(PREF_APP_UPDATE_BACKGROUNDMAXERRORS);
- }
-
- if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_DOWNLOADBACKGROUNDINTERVAL)) {
- Services.prefs.clearUserPref(PREF_APP_UPDATE_DOWNLOADBACKGROUNDINTERVAL);
- }
-
- try {
- Services.prefs.deleteBranch(PREFBRANCH_APP_UPDATE_NEVER);
- }
- catch (e) {
- }
-}
-
-function setupTimer(aTestTimeout) {
- gTestTimeout = aTestTimeout;
- if (gTimeoutTimer) {
- gTimeoutTimer.cancel();
- gTimeoutTimer = null;
- }
- gTimeoutTimer = Cc["@mozilla.org/timer;1"].
- createInstance(Ci.nsITimer);
- gTimeoutTimer.initWithCallback(finishTestTimeout, gTestTimeout,
- Ci.nsITimer.TYPE_ONE_SHOT);
-}
-
-/**
- * Closes the update window if it is open and causes the test to fail if an
- * update window is found.
- *
- * @return true if an update window was found, otherwise false.
- */
-function closeUpdateWindow() {
- let updateWindow = getUpdateWindow();
- if (!updateWindow) {
- return false;
- }
-
- ok(false, "Found an existing Update Window from the current or a previous " +
- "test... attempting to close it.");
- updateWindow.close();
- return true;
-}
-
-/**
- * Gets the update window.
- *
- * @return The nsIDOMWindow for the Update Window if it is open and null
- * if it isn't.
- */
-function getUpdateWindow() {
- return Services.wm.getMostRecentWindow(UPDATE_WINDOW_NAME);
-}
-
-/**
- * Helper for background check errors.
- */
-const errorsPrefObserver = {
- observedPref: null,
- maxErrorPref: null,
-
- /**
- * Sets up a preference observer and sets the associated maximum errors
- * preference used for background notification.
- *
- * @param aObservePref
- * The preference to observe.
- * @param aMaxErrorPref
- * The maximum errors preference.
- * @param aMaxErrorCount
- * The value to set the maximum errors preference to.
- */
- init: function(aObservePref, aMaxErrorPref, aMaxErrorCount) {
- this.observedPref = aObservePref;
- this.maxErrorPref = aMaxErrorPref;
-
- let maxErrors = aMaxErrorCount ? aMaxErrorCount : 2;
- Services.prefs.setIntPref(aMaxErrorPref, maxErrors);
- Services.prefs.addObserver(aObservePref, this, false);
- },
-
- /**
- * Preference observer for the preference specified in |this.observedPref|.
- */
- observe: function XPI_observe(aSubject, aTopic, aData) {
- if (aData == this.observedPref) {
- let errCount = Services.prefs.getIntPref(this.observedPref);
- let errMax = Services.prefs.getIntPref(this.maxErrorPref);
- if (errCount >= errMax) {
- debugDump("removing pref observer");
- Services.prefs.removeObserver(this.observedPref, this);
- } else {
- debugDump("notifying AUS");
- SimpleTest.executeSoon(function() {
- gAUS.notify(null);
- });
- }
- }
- }
-};
diff --git a/toolkit/mozapps/update/tests/data/complete.exe b/toolkit/mozapps/update/tests/data/complete.exe
deleted file mode 100644
index da9cdf0cc0..0000000000
--- a/toolkit/mozapps/update/tests/data/complete.exe
+++ /dev/null
Binary files differ
diff --git a/toolkit/mozapps/update/tests/data/complete.mar b/toolkit/mozapps/update/tests/data/complete.mar
deleted file mode 100644
index 52306e0a24..0000000000
--- a/toolkit/mozapps/update/tests/data/complete.mar
+++ /dev/null
Binary files differ
diff --git a/toolkit/mozapps/update/tests/data/complete.png b/toolkit/mozapps/update/tests/data/complete.png
deleted file mode 100644
index 2990a539ff..0000000000
--- a/toolkit/mozapps/update/tests/data/complete.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/mozapps/update/tests/data/complete_log_success_mac b/toolkit/mozapps/update/tests/data/complete_log_success_mac
deleted file mode 100644
index 4f992a1374..0000000000
--- a/toolkit/mozapps/update/tests/data/complete_log_success_mac
+++ /dev/null
@@ -1,332 +0,0 @@
-UPDATE TYPE complete
-PREPARE REMOVEFILE Contents/Resources/searchplugins/searchpluginstext0
-PREPARE REMOVEFILE Contents/Resources/searchplugins/searchpluginspng0.png
-PREPARE REMOVEFILE Contents/Resources/removed-files
-PREPARE REMOVEFILE Contents/Resources/precomplete
-PREPARE REMOVEFILE Contents/Resources/2/20/20text0
-PREPARE REMOVEFILE Contents/Resources/2/20/20png0.png
-PREPARE REMOVEFILE Contents/Resources/0/0exe0.exe
-PREPARE REMOVEFILE Contents/Resources/0/00/00text0
-PREPARE REMOVEFILE Contents/MacOS/exe0.exe
-PREPARE REMOVEDIR Contents/Resources/searchplugins/
-PREPARE REMOVEDIR Contents/Resources/defaults/pref/
-PREPARE REMOVEDIR Contents/Resources/defaults/
-PREPARE REMOVEDIR Contents/Resources/2/20/
-PREPARE REMOVEDIR Contents/Resources/2/
-PREPARE REMOVEDIR Contents/Resources/0/00/
-PREPARE REMOVEDIR Contents/Resources/0/
-PREPARE REMOVEDIR Contents/Resources/
-PREPARE REMOVEDIR Contents/MacOS/
-PREPARE REMOVEDIR Contents/
-PREPARE ADD Contents/Resources/searchplugins/searchpluginstext0
-PREPARE ADD Contents/Resources/searchplugins/searchpluginspng1.png
-PREPARE ADD Contents/Resources/searchplugins/searchpluginspng0.png
-PREPARE ADD Contents/Resources/removed-files
-PREPARE ADD Contents/Resources/precomplete
-PREPARE ADD Contents/Resources/distribution/extensions/extensions1/extensions1text0
-PREPARE ADD Contents/Resources/distribution/extensions/extensions1/extensions1png1.png
-PREPARE ADD Contents/Resources/distribution/extensions/extensions1/extensions1png0.png
-PREPARE ADD Contents/Resources/distribution/extensions/extensions0/extensions0text0
-PREPARE ADD Contents/Resources/distribution/extensions/extensions0/extensions0png1.png
-PREPARE ADD Contents/Resources/distribution/extensions/extensions0/extensions0png0.png
-PREPARE ADD Contents/Resources/1/10/10text0
-PREPARE ADD Contents/Resources/0/0exe0.exe
-PREPARE ADD Contents/Resources/0/00/00text1
-PREPARE ADD Contents/Resources/0/00/00text0
-PREPARE ADD Contents/Resources/0/00/00png0.png
-PREPARE ADD Contents/MacOS/exe0.exe
-PREPARE REMOVEDIR Contents/Resources/9/99/
-PREPARE REMOVEDIR Contents/Resources/9/99/
-PREPARE REMOVEDIR Contents/Resources/9/98/
-PREPARE REMOVEFILE Contents/Resources/9/97/970/97xtext0
-PREPARE REMOVEFILE Contents/Resources/9/97/970/97xtext1
-PREPARE REMOVEDIR Contents/Resources/9/97/970/
-PREPARE REMOVEFILE Contents/Resources/9/97/971/97xtext0
-PREPARE REMOVEFILE Contents/Resources/9/97/971/97xtext1
-PREPARE REMOVEDIR Contents/Resources/9/97/971/
-PREPARE REMOVEDIR Contents/Resources/9/97/
-PREPARE REMOVEFILE Contents/Resources/9/96/96text0
-PREPARE REMOVEFILE Contents/Resources/9/96/96text1
-PREPARE REMOVEDIR Contents/Resources/9/96/
-PREPARE REMOVEDIR Contents/Resources/9/95/
-PREPARE REMOVEDIR Contents/Resources/9/95/
-PREPARE REMOVEDIR Contents/Resources/9/94/
-PREPARE REMOVEDIR Contents/Resources/9/94/
-PREPARE REMOVEDIR Contents/Resources/9/93/
-PREPARE REMOVEDIR Contents/Resources/9/92/
-PREPARE REMOVEDIR Contents/Resources/9/91/
-PREPARE REMOVEDIR Contents/Resources/9/90/
-PREPARE REMOVEDIR Contents/Resources/9/90/
-PREPARE REMOVEDIR Contents/Resources/8/89/
-PREPARE REMOVEDIR Contents/Resources/8/89/
-PREPARE REMOVEDIR Contents/Resources/8/88/
-PREPARE REMOVEFILE Contents/Resources/8/87/870/87xtext0
-PREPARE REMOVEFILE Contents/Resources/8/87/870/87xtext1
-PREPARE REMOVEDIR Contents/Resources/8/87/870/
-PREPARE REMOVEFILE Contents/Resources/8/87/871/87xtext0
-PREPARE REMOVEFILE Contents/Resources/8/87/871/87xtext1
-PREPARE REMOVEDIR Contents/Resources/8/87/871/
-PREPARE REMOVEDIR Contents/Resources/8/87/
-PREPARE REMOVEFILE Contents/Resources/8/86/86text0
-PREPARE REMOVEFILE Contents/Resources/8/86/86text1
-PREPARE REMOVEDIR Contents/Resources/8/86/
-PREPARE REMOVEDIR Contents/Resources/8/85/
-PREPARE REMOVEDIR Contents/Resources/8/85/
-PREPARE REMOVEDIR Contents/Resources/8/84/
-PREPARE REMOVEDIR Contents/Resources/8/84/
-PREPARE REMOVEDIR Contents/Resources/8/83/
-PREPARE REMOVEDIR Contents/Resources/8/82/
-PREPARE REMOVEDIR Contents/Resources/8/81/
-PREPARE REMOVEDIR Contents/Resources/8/80/
-PREPARE REMOVEDIR Contents/Resources/8/80/
-PREPARE REMOVEFILE Contents/Resources/7/70/7xtest.exe
-PREPARE REMOVEFILE Contents/Resources/7/70/7xtext0
-PREPARE REMOVEFILE Contents/Resources/7/70/7xtext1
-PREPARE REMOVEDIR Contents/Resources/7/70/
-PREPARE REMOVEFILE Contents/Resources/7/71/7xtest.exe
-PREPARE REMOVEFILE Contents/Resources/7/71/7xtext0
-PREPARE REMOVEFILE Contents/Resources/7/71/7xtext1
-PREPARE REMOVEDIR Contents/Resources/7/71/
-PREPARE REMOVEFILE Contents/Resources/7/7text0
-PREPARE REMOVEFILE Contents/Resources/7/7text1
-PREPARE REMOVEDIR Contents/Resources/7/
-PREPARE REMOVEDIR Contents/Resources/6/
-PREPARE REMOVEFILE Contents/Resources/5/5text1
-PREPARE REMOVEFILE Contents/Resources/5/5text0
-PREPARE REMOVEFILE Contents/Resources/5/5test.exe
-PREPARE REMOVEFILE Contents/Resources/5/5text0
-PREPARE REMOVEFILE Contents/Resources/5/5text1
-PREPARE REMOVEDIR Contents/Resources/5/
-PREPARE REMOVEFILE Contents/Resources/4/4text1
-PREPARE REMOVEFILE Contents/Resources/4/4text0
-PREPARE REMOVEDIR Contents/Resources/4/
-PREPARE REMOVEFILE Contents/Resources/3/3text1
-PREPARE REMOVEFILE Contents/Resources/3/3text0
-EXECUTE REMOVEFILE Contents/Resources/searchplugins/searchpluginstext0
-EXECUTE REMOVEFILE Contents/Resources/searchplugins/searchpluginspng0.png
-EXECUTE REMOVEFILE Contents/Resources/removed-files
-EXECUTE REMOVEFILE Contents/Resources/precomplete
-EXECUTE REMOVEFILE Contents/Resources/2/20/20text0
-EXECUTE REMOVEFILE Contents/Resources/2/20/20png0.png
-EXECUTE REMOVEFILE Contents/Resources/0/0exe0.exe
-EXECUTE REMOVEFILE Contents/Resources/0/00/00text0
-EXECUTE REMOVEFILE Contents/MacOS/exe0.exe
-EXECUTE REMOVEDIR Contents/Resources/searchplugins/
-EXECUTE REMOVEDIR Contents/Resources/defaults/pref/
-EXECUTE REMOVEDIR Contents/Resources/defaults/
-EXECUTE REMOVEDIR Contents/Resources/2/20/
-EXECUTE REMOVEDIR Contents/Resources/2/
-EXECUTE REMOVEDIR Contents/Resources/0/00/
-EXECUTE REMOVEDIR Contents/Resources/0/
-EXECUTE REMOVEDIR Contents/Resources/
-EXECUTE REMOVEDIR Contents/MacOS/
-EXECUTE REMOVEDIR Contents/
-EXECUTE ADD Contents/Resources/searchplugins/searchpluginstext0
-EXECUTE ADD Contents/Resources/searchplugins/searchpluginspng1.png
-EXECUTE ADD Contents/Resources/searchplugins/searchpluginspng0.png
-EXECUTE ADD Contents/Resources/removed-files
-EXECUTE ADD Contents/Resources/precomplete
-EXECUTE ADD Contents/Resources/distribution/extensions/extensions1/extensions1text0
-EXECUTE ADD Contents/Resources/distribution/extensions/extensions1/extensions1png1.png
-EXECUTE ADD Contents/Resources/distribution/extensions/extensions1/extensions1png0.png
-EXECUTE ADD Contents/Resources/distribution/extensions/extensions0/extensions0text0
-EXECUTE ADD Contents/Resources/distribution/extensions/extensions0/extensions0png1.png
-EXECUTE ADD Contents/Resources/distribution/extensions/extensions0/extensions0png0.png
-EXECUTE ADD Contents/Resources/1/10/10text0
-EXECUTE ADD Contents/Resources/0/0exe0.exe
-EXECUTE ADD Contents/Resources/0/00/00text1
-EXECUTE ADD Contents/Resources/0/00/00text0
-EXECUTE ADD Contents/Resources/0/00/00png0.png
-EXECUTE ADD Contents/MacOS/exe0.exe
-EXECUTE REMOVEDIR Contents/Resources/9/99/
-EXECUTE REMOVEDIR Contents/Resources/9/99/
-EXECUTE REMOVEDIR Contents/Resources/9/98/
-EXECUTE REMOVEFILE Contents/Resources/9/97/970/97xtext0
-EXECUTE REMOVEFILE Contents/Resources/9/97/970/97xtext1
-EXECUTE REMOVEDIR Contents/Resources/9/97/970/
-EXECUTE REMOVEFILE Contents/Resources/9/97/971/97xtext0
-EXECUTE REMOVEFILE Contents/Resources/9/97/971/97xtext1
-EXECUTE REMOVEDIR Contents/Resources/9/97/971/
-EXECUTE REMOVEDIR Contents/Resources/9/97/
-EXECUTE REMOVEFILE Contents/Resources/9/96/96text0
-EXECUTE REMOVEFILE Contents/Resources/9/96/96text1
-EXECUTE REMOVEDIR Contents/Resources/9/96/
-EXECUTE REMOVEDIR Contents/Resources/9/95/
-EXECUTE REMOVEDIR Contents/Resources/9/95/
-EXECUTE REMOVEDIR Contents/Resources/9/94/
-EXECUTE REMOVEDIR Contents/Resources/9/94/
-EXECUTE REMOVEDIR Contents/Resources/9/93/
-EXECUTE REMOVEDIR Contents/Resources/9/92/
-EXECUTE REMOVEDIR Contents/Resources/9/91/
-EXECUTE REMOVEDIR Contents/Resources/9/90/
-EXECUTE REMOVEDIR Contents/Resources/9/90/
-EXECUTE REMOVEDIR Contents/Resources/8/89/
-EXECUTE REMOVEDIR Contents/Resources/8/89/
-EXECUTE REMOVEDIR Contents/Resources/8/88/
-EXECUTE REMOVEFILE Contents/Resources/8/87/870/87xtext0
-EXECUTE REMOVEFILE Contents/Resources/8/87/870/87xtext1
-EXECUTE REMOVEDIR Contents/Resources/8/87/870/
-EXECUTE REMOVEFILE Contents/Resources/8/87/871/87xtext0
-EXECUTE REMOVEFILE Contents/Resources/8/87/871/87xtext1
-EXECUTE REMOVEDIR Contents/Resources/8/87/871/
-EXECUTE REMOVEDIR Contents/Resources/8/87/
-EXECUTE REMOVEFILE Contents/Resources/8/86/86text0
-EXECUTE REMOVEFILE Contents/Resources/8/86/86text1
-EXECUTE REMOVEDIR Contents/Resources/8/86/
-EXECUTE REMOVEDIR Contents/Resources/8/85/
-EXECUTE REMOVEDIR Contents/Resources/8/85/
-EXECUTE REMOVEDIR Contents/Resources/8/84/
-EXECUTE REMOVEDIR Contents/Resources/8/84/
-EXECUTE REMOVEDIR Contents/Resources/8/83/
-EXECUTE REMOVEDIR Contents/Resources/8/82/
-EXECUTE REMOVEDIR Contents/Resources/8/81/
-EXECUTE REMOVEDIR Contents/Resources/8/80/
-EXECUTE REMOVEDIR Contents/Resources/8/80/
-EXECUTE REMOVEFILE Contents/Resources/7/70/7xtest.exe
-EXECUTE REMOVEFILE Contents/Resources/7/70/7xtext0
-EXECUTE REMOVEFILE Contents/Resources/7/70/7xtext1
-EXECUTE REMOVEDIR Contents/Resources/7/70/
-EXECUTE REMOVEFILE Contents/Resources/7/71/7xtest.exe
-EXECUTE REMOVEFILE Contents/Resources/7/71/7xtext0
-EXECUTE REMOVEFILE Contents/Resources/7/71/7xtext1
-EXECUTE REMOVEDIR Contents/Resources/7/71/
-EXECUTE REMOVEFILE Contents/Resources/7/7text0
-EXECUTE REMOVEFILE Contents/Resources/7/7text1
-EXECUTE REMOVEDIR Contents/Resources/7/
-EXECUTE REMOVEDIR Contents/Resources/6/
-EXECUTE REMOVEFILE Contents/Resources/5/5text1
-EXECUTE REMOVEFILE Contents/Resources/5/5text0
-EXECUTE REMOVEFILE Contents/Resources/5/5test.exe
-EXECUTE REMOVEFILE Contents/Resources/5/5text0
-file cannot be removed because it does not exist; skipping
-EXECUTE REMOVEFILE Contents/Resources/5/5text1
-file cannot be removed because it does not exist; skipping
-EXECUTE REMOVEDIR Contents/Resources/5/
-EXECUTE REMOVEFILE Contents/Resources/4/4text1
-EXECUTE REMOVEFILE Contents/Resources/4/4text0
-EXECUTE REMOVEDIR Contents/Resources/4/
-EXECUTE REMOVEFILE Contents/Resources/3/3text1
-EXECUTE REMOVEFILE Contents/Resources/3/3text0
-FINISH REMOVEFILE Contents/Resources/searchplugins/searchpluginstext0
-FINISH REMOVEFILE Contents/Resources/searchplugins/searchpluginspng0.png
-FINISH REMOVEFILE Contents/Resources/removed-files
-FINISH REMOVEFILE Contents/Resources/precomplete
-FINISH REMOVEFILE Contents/Resources/2/20/20text0
-FINISH REMOVEFILE Contents/Resources/2/20/20png0.png
-FINISH REMOVEFILE Contents/Resources/0/0exe0.exe
-FINISH REMOVEFILE Contents/Resources/0/00/00text0
-FINISH REMOVEFILE Contents/MacOS/exe0.exe
-FINISH REMOVEDIR Contents/Resources/searchplugins/
-removing directory: Contents/Resources/searchplugins/, rv: 0
-FINISH REMOVEDIR Contents/Resources/defaults/pref/
-removing directory: Contents/Resources/defaults/pref/, rv: 0
-FINISH REMOVEDIR Contents/Resources/defaults/
-removing directory: Contents/Resources/defaults/, rv: 0
-FINISH REMOVEDIR Contents/Resources/2/20/
-FINISH REMOVEDIR Contents/Resources/2/
-FINISH REMOVEDIR Contents/Resources/0/00/
-removing directory: Contents/Resources/0/00/, rv: 0
-FINISH REMOVEDIR Contents/Resources/0/
-removing directory: Contents/Resources/0/, rv: 0
-FINISH REMOVEDIR Contents/Resources/
-removing directory: Contents/Resources/, rv: 0
-FINISH REMOVEDIR Contents/MacOS/
-removing directory: Contents/MacOS/, rv: 0
-FINISH REMOVEDIR Contents/
-removing directory: Contents/, rv: 0
-FINISH ADD Contents/Resources/searchplugins/searchpluginstext0
-FINISH ADD Contents/Resources/searchplugins/searchpluginspng1.png
-FINISH ADD Contents/Resources/searchplugins/searchpluginspng0.png
-FINISH ADD Contents/Resources/removed-files
-FINISH ADD Contents/Resources/precomplete
-FINISH ADD Contents/Resources/distribution/extensions/extensions1/extensions1text0
-FINISH ADD Contents/Resources/distribution/extensions/extensions1/extensions1png1.png
-FINISH ADD Contents/Resources/distribution/extensions/extensions1/extensions1png0.png
-FINISH ADD Contents/Resources/distribution/extensions/extensions0/extensions0text0
-FINISH ADD Contents/Resources/distribution/extensions/extensions0/extensions0png1.png
-FINISH ADD Contents/Resources/distribution/extensions/extensions0/extensions0png0.png
-FINISH ADD Contents/Resources/1/10/10text0
-FINISH ADD Contents/Resources/0/0exe0.exe
-FINISH ADD Contents/Resources/0/00/00text1
-FINISH ADD Contents/Resources/0/00/00text0
-FINISH ADD Contents/Resources/0/00/00png0.png
-FINISH ADD Contents/MacOS/exe0.exe
-FINISH REMOVEDIR Contents/Resources/9/99/
-FINISH REMOVEDIR Contents/Resources/9/99/
-directory no longer exists; skipping
-FINISH REMOVEDIR Contents/Resources/9/98/
-FINISH REMOVEFILE Contents/Resources/9/97/970/97xtext0
-FINISH REMOVEFILE Contents/Resources/9/97/970/97xtext1
-FINISH REMOVEDIR Contents/Resources/9/97/970/
-FINISH REMOVEFILE Contents/Resources/9/97/971/97xtext0
-FINISH REMOVEFILE Contents/Resources/9/97/971/97xtext1
-FINISH REMOVEDIR Contents/Resources/9/97/971/
-FINISH REMOVEDIR Contents/Resources/9/97/
-FINISH REMOVEFILE Contents/Resources/9/96/96text0
-FINISH REMOVEFILE Contents/Resources/9/96/96text1
-FINISH REMOVEDIR Contents/Resources/9/96/
-FINISH REMOVEDIR Contents/Resources/9/95/
-FINISH REMOVEDIR Contents/Resources/9/95/
-directory no longer exists; skipping
-FINISH REMOVEDIR Contents/Resources/9/94/
-FINISH REMOVEDIR Contents/Resources/9/94/
-directory no longer exists; skipping
-FINISH REMOVEDIR Contents/Resources/9/93/
-FINISH REMOVEDIR Contents/Resources/9/92/
-removing directory: Contents/Resources/9/92/, rv: 0
-FINISH REMOVEDIR Contents/Resources/9/91/
-removing directory: Contents/Resources/9/91/, rv: 0
-FINISH REMOVEDIR Contents/Resources/9/90/
-FINISH REMOVEDIR Contents/Resources/9/90/
-directory no longer exists; skipping
-FINISH REMOVEDIR Contents/Resources/8/89/
-FINISH REMOVEDIR Contents/Resources/8/89/
-directory no longer exists; skipping
-FINISH REMOVEDIR Contents/Resources/8/88/
-FINISH REMOVEFILE Contents/Resources/8/87/870/87xtext0
-FINISH REMOVEFILE Contents/Resources/8/87/870/87xtext1
-FINISH REMOVEDIR Contents/Resources/8/87/870/
-FINISH REMOVEFILE Contents/Resources/8/87/871/87xtext0
-FINISH REMOVEFILE Contents/Resources/8/87/871/87xtext1
-FINISH REMOVEDIR Contents/Resources/8/87/871/
-FINISH REMOVEDIR Contents/Resources/8/87/
-FINISH REMOVEFILE Contents/Resources/8/86/86text0
-FINISH REMOVEFILE Contents/Resources/8/86/86text1
-FINISH REMOVEDIR Contents/Resources/8/86/
-FINISH REMOVEDIR Contents/Resources/8/85/
-FINISH REMOVEDIR Contents/Resources/8/85/
-directory no longer exists; skipping
-FINISH REMOVEDIR Contents/Resources/8/84/
-FINISH REMOVEDIR Contents/Resources/8/84/
-directory no longer exists; skipping
-FINISH REMOVEDIR Contents/Resources/8/83/
-FINISH REMOVEDIR Contents/Resources/8/82/
-removing directory: Contents/Resources/8/82/, rv: 0
-FINISH REMOVEDIR Contents/Resources/8/81/
-removing directory: Contents/Resources/8/81/, rv: 0
-FINISH REMOVEDIR Contents/Resources/8/80/
-FINISH REMOVEDIR Contents/Resources/8/80/
-directory no longer exists; skipping
-FINISH REMOVEFILE Contents/Resources/7/70/7xtest.exe
-FINISH REMOVEFILE Contents/Resources/7/70/7xtext0
-FINISH REMOVEFILE Contents/Resources/7/70/7xtext1
-FINISH REMOVEDIR Contents/Resources/7/70/
-FINISH REMOVEFILE Contents/Resources/7/71/7xtest.exe
-FINISH REMOVEFILE Contents/Resources/7/71/7xtext0
-FINISH REMOVEFILE Contents/Resources/7/71/7xtext1
-FINISH REMOVEDIR Contents/Resources/7/71/
-FINISH REMOVEFILE Contents/Resources/7/7text0
-FINISH REMOVEFILE Contents/Resources/7/7text1
-FINISH REMOVEDIR Contents/Resources/7/
-FINISH REMOVEDIR Contents/Resources/6/
-FINISH REMOVEFILE Contents/Resources/5/5text1
-FINISH REMOVEFILE Contents/Resources/5/5text0
-FINISH REMOVEFILE Contents/Resources/5/5test.exe
-FINISH REMOVEDIR Contents/Resources/5/
-FINISH REMOVEFILE Contents/Resources/4/4text1
-FINISH REMOVEFILE Contents/Resources/4/4text0
-FINISH REMOVEDIR Contents/Resources/4/
-FINISH REMOVEFILE Contents/Resources/3/3text1
-FINISH REMOVEFILE Contents/Resources/3/3text0
-succeeded
-calling QuitProgressUI
diff --git a/toolkit/mozapps/update/tests/data/complete_log_success_win b/toolkit/mozapps/update/tests/data/complete_log_success_win
deleted file mode 100644
index c5a03dc9d6..0000000000
--- a/toolkit/mozapps/update/tests/data/complete_log_success_win
+++ /dev/null
@@ -1,320 +0,0 @@
-UPDATE TYPE complete
-PREPARE REMOVEFILE searchplugins/searchpluginstext0
-PREPARE REMOVEFILE searchplugins/searchpluginspng0.png
-PREPARE REMOVEFILE removed-files
-PREPARE REMOVEFILE precomplete
-PREPARE REMOVEFILE exe0.exe
-PREPARE REMOVEFILE 2/20/20text0
-PREPARE REMOVEFILE 2/20/20png0.png
-PREPARE REMOVEFILE 0/0exe0.exe
-PREPARE REMOVEFILE 0/00/00text0
-PREPARE REMOVEDIR searchplugins/
-PREPARE REMOVEDIR defaults/pref/
-PREPARE REMOVEDIR defaults/
-PREPARE REMOVEDIR 2/20/
-PREPARE REMOVEDIR 2/
-PREPARE REMOVEDIR 0/00/
-PREPARE REMOVEDIR 0/
-PREPARE ADD searchplugins/searchpluginstext0
-PREPARE ADD searchplugins/searchpluginspng1.png
-PREPARE ADD searchplugins/searchpluginspng0.png
-PREPARE ADD removed-files
-PREPARE ADD precomplete
-PREPARE ADD exe0.exe
-PREPARE ADD distribution/extensions/extensions1/extensions1text0
-PREPARE ADD distribution/extensions/extensions1/extensions1png1.png
-PREPARE ADD distribution/extensions/extensions1/extensions1png0.png
-PREPARE ADD distribution/extensions/extensions0/extensions0text0
-PREPARE ADD distribution/extensions/extensions0/extensions0png1.png
-PREPARE ADD distribution/extensions/extensions0/extensions0png0.png
-PREPARE ADD 1/10/10text0
-PREPARE ADD 0/0exe0.exe
-PREPARE ADD 0/00/00text1
-PREPARE ADD 0/00/00text0
-PREPARE ADD 0/00/00png0.png
-PREPARE REMOVEDIR 9/99/
-PREPARE REMOVEDIR 9/99/
-PREPARE REMOVEDIR 9/98/
-PREPARE REMOVEFILE 9/97/970/97xtext0
-PREPARE REMOVEFILE 9/97/970/97xtext1
-PREPARE REMOVEDIR 9/97/970/
-PREPARE REMOVEFILE 9/97/971/97xtext0
-PREPARE REMOVEFILE 9/97/971/97xtext1
-PREPARE REMOVEDIR 9/97/971/
-PREPARE REMOVEDIR 9/97/
-PREPARE REMOVEFILE 9/96/96text0
-PREPARE REMOVEFILE 9/96/96text1
-PREPARE REMOVEDIR 9/96/
-PREPARE REMOVEDIR 9/95/
-PREPARE REMOVEDIR 9/95/
-PREPARE REMOVEDIR 9/94/
-PREPARE REMOVEDIR 9/94/
-PREPARE REMOVEDIR 9/93/
-PREPARE REMOVEDIR 9/92/
-PREPARE REMOVEDIR 9/91/
-PREPARE REMOVEDIR 9/90/
-PREPARE REMOVEDIR 9/90/
-PREPARE REMOVEDIR 8/89/
-PREPARE REMOVEDIR 8/89/
-PREPARE REMOVEDIR 8/88/
-PREPARE REMOVEFILE 8/87/870/87xtext0
-PREPARE REMOVEFILE 8/87/870/87xtext1
-PREPARE REMOVEDIR 8/87/870/
-PREPARE REMOVEFILE 8/87/871/87xtext0
-PREPARE REMOVEFILE 8/87/871/87xtext1
-PREPARE REMOVEDIR 8/87/871/
-PREPARE REMOVEDIR 8/87/
-PREPARE REMOVEFILE 8/86/86text0
-PREPARE REMOVEFILE 8/86/86text1
-PREPARE REMOVEDIR 8/86/
-PREPARE REMOVEDIR 8/85/
-PREPARE REMOVEDIR 8/85/
-PREPARE REMOVEDIR 8/84/
-PREPARE REMOVEDIR 8/84/
-PREPARE REMOVEDIR 8/83/
-PREPARE REMOVEDIR 8/82/
-PREPARE REMOVEDIR 8/81/
-PREPARE REMOVEDIR 8/80/
-PREPARE REMOVEDIR 8/80/
-PREPARE REMOVEFILE 7/70/7xtest.exe
-PREPARE REMOVEFILE 7/70/7xtext0
-PREPARE REMOVEFILE 7/70/7xtext1
-PREPARE REMOVEDIR 7/70/
-PREPARE REMOVEFILE 7/71/7xtest.exe
-PREPARE REMOVEFILE 7/71/7xtext0
-PREPARE REMOVEFILE 7/71/7xtext1
-PREPARE REMOVEDIR 7/71/
-PREPARE REMOVEFILE 7/7text0
-PREPARE REMOVEFILE 7/7text1
-PREPARE REMOVEDIR 7/
-PREPARE REMOVEDIR 6/
-PREPARE REMOVEFILE 5/5text1
-PREPARE REMOVEFILE 5/5text0
-PREPARE REMOVEFILE 5/5test.exe
-PREPARE REMOVEFILE 5/5text0
-PREPARE REMOVEFILE 5/5text1
-PREPARE REMOVEDIR 5/
-PREPARE REMOVEFILE 4/4text1
-PREPARE REMOVEFILE 4/4text0
-PREPARE REMOVEDIR 4/
-PREPARE REMOVEFILE 3/3text1
-PREPARE REMOVEFILE 3/3text0
-EXECUTE REMOVEFILE searchplugins/searchpluginstext0
-EXECUTE REMOVEFILE searchplugins/searchpluginspng0.png
-EXECUTE REMOVEFILE removed-files
-EXECUTE REMOVEFILE precomplete
-EXECUTE REMOVEFILE exe0.exe
-EXECUTE REMOVEFILE 2/20/20text0
-EXECUTE REMOVEFILE 2/20/20png0.png
-EXECUTE REMOVEFILE 0/0exe0.exe
-EXECUTE REMOVEFILE 0/00/00text0
-EXECUTE REMOVEDIR searchplugins/
-EXECUTE REMOVEDIR defaults/pref/
-EXECUTE REMOVEDIR defaults/
-EXECUTE REMOVEDIR 2/20/
-EXECUTE REMOVEDIR 2/
-EXECUTE REMOVEDIR 0/00/
-EXECUTE REMOVEDIR 0/
-EXECUTE ADD searchplugins/searchpluginstext0
-EXECUTE ADD searchplugins/searchpluginspng1.png
-EXECUTE ADD searchplugins/searchpluginspng0.png
-EXECUTE ADD removed-files
-EXECUTE ADD precomplete
-EXECUTE ADD exe0.exe
-EXECUTE ADD distribution/extensions/extensions1/extensions1text0
-EXECUTE ADD distribution/extensions/extensions1/extensions1png1.png
-EXECUTE ADD distribution/extensions/extensions1/extensions1png0.png
-EXECUTE ADD distribution/extensions/extensions0/extensions0text0
-EXECUTE ADD distribution/extensions/extensions0/extensions0png1.png
-EXECUTE ADD distribution/extensions/extensions0/extensions0png0.png
-EXECUTE ADD 1/10/10text0
-EXECUTE ADD 0/0exe0.exe
-EXECUTE ADD 0/00/00text1
-EXECUTE ADD 0/00/00text0
-EXECUTE ADD 0/00/00png0.png
-EXECUTE REMOVEDIR 9/99/
-EXECUTE REMOVEDIR 9/99/
-EXECUTE REMOVEDIR 9/98/
-EXECUTE REMOVEFILE 9/97/970/97xtext0
-EXECUTE REMOVEFILE 9/97/970/97xtext1
-EXECUTE REMOVEDIR 9/97/970/
-EXECUTE REMOVEFILE 9/97/971/97xtext0
-EXECUTE REMOVEFILE 9/97/971/97xtext1
-EXECUTE REMOVEDIR 9/97/971/
-EXECUTE REMOVEDIR 9/97/
-EXECUTE REMOVEFILE 9/96/96text0
-EXECUTE REMOVEFILE 9/96/96text1
-EXECUTE REMOVEDIR 9/96/
-EXECUTE REMOVEDIR 9/95/
-EXECUTE REMOVEDIR 9/95/
-EXECUTE REMOVEDIR 9/94/
-EXECUTE REMOVEDIR 9/94/
-EXECUTE REMOVEDIR 9/93/
-EXECUTE REMOVEDIR 9/92/
-EXECUTE REMOVEDIR 9/91/
-EXECUTE REMOVEDIR 9/90/
-EXECUTE REMOVEDIR 9/90/
-EXECUTE REMOVEDIR 8/89/
-EXECUTE REMOVEDIR 8/89/
-EXECUTE REMOVEDIR 8/88/
-EXECUTE REMOVEFILE 8/87/870/87xtext0
-EXECUTE REMOVEFILE 8/87/870/87xtext1
-EXECUTE REMOVEDIR 8/87/870/
-EXECUTE REMOVEFILE 8/87/871/87xtext0
-EXECUTE REMOVEFILE 8/87/871/87xtext1
-EXECUTE REMOVEDIR 8/87/871/
-EXECUTE REMOVEDIR 8/87/
-EXECUTE REMOVEFILE 8/86/86text0
-EXECUTE REMOVEFILE 8/86/86text1
-EXECUTE REMOVEDIR 8/86/
-EXECUTE REMOVEDIR 8/85/
-EXECUTE REMOVEDIR 8/85/
-EXECUTE REMOVEDIR 8/84/
-EXECUTE REMOVEDIR 8/84/
-EXECUTE REMOVEDIR 8/83/
-EXECUTE REMOVEDIR 8/82/
-EXECUTE REMOVEDIR 8/81/
-EXECUTE REMOVEDIR 8/80/
-EXECUTE REMOVEDIR 8/80/
-EXECUTE REMOVEFILE 7/70/7xtest.exe
-EXECUTE REMOVEFILE 7/70/7xtext0
-EXECUTE REMOVEFILE 7/70/7xtext1
-EXECUTE REMOVEDIR 7/70/
-EXECUTE REMOVEFILE 7/71/7xtest.exe
-EXECUTE REMOVEFILE 7/71/7xtext0
-EXECUTE REMOVEFILE 7/71/7xtext1
-EXECUTE REMOVEDIR 7/71/
-EXECUTE REMOVEFILE 7/7text0
-EXECUTE REMOVEFILE 7/7text1
-EXECUTE REMOVEDIR 7/
-EXECUTE REMOVEDIR 6/
-EXECUTE REMOVEFILE 5/5text1
-EXECUTE REMOVEFILE 5/5text0
-EXECUTE REMOVEFILE 5/5test.exe
-EXECUTE REMOVEFILE 5/5text0
-file cannot be removed because it does not exist; skipping
-EXECUTE REMOVEFILE 5/5text1
-file cannot be removed because it does not exist; skipping
-EXECUTE REMOVEDIR 5/
-EXECUTE REMOVEFILE 4/4text1
-EXECUTE REMOVEFILE 4/4text0
-EXECUTE REMOVEDIR 4/
-EXECUTE REMOVEFILE 3/3text1
-EXECUTE REMOVEFILE 3/3text0
-FINISH REMOVEFILE searchplugins/searchpluginstext0
-FINISH REMOVEFILE searchplugins/searchpluginspng0.png
-FINISH REMOVEFILE removed-files
-FINISH REMOVEFILE precomplete
-FINISH REMOVEFILE exe0.exe
-FINISH REMOVEFILE 2/20/20text0
-FINISH REMOVEFILE 2/20/20png0.png
-FINISH REMOVEFILE 0/0exe0.exe
-FINISH REMOVEFILE 0/00/00text0
-FINISH REMOVEDIR searchplugins/
-removing directory: searchplugins/, rv: 0
-FINISH REMOVEDIR defaults/pref/
-removing directory: defaults/pref/, rv: 0
-FINISH REMOVEDIR defaults/
-removing directory: defaults/, rv: 0
-FINISH REMOVEDIR 2/20/
-FINISH REMOVEDIR 2/
-FINISH REMOVEDIR 0/00/
-removing directory: 0/00/, rv: 0
-FINISH REMOVEDIR 0/
-removing directory: 0/, rv: 0
-FINISH ADD searchplugins/searchpluginstext0
-FINISH ADD searchplugins/searchpluginspng1.png
-FINISH ADD searchplugins/searchpluginspng0.png
-FINISH ADD removed-files
-FINISH ADD precomplete
-FINISH ADD exe0.exe
-FINISH ADD distribution/extensions/extensions1/extensions1text0
-FINISH ADD distribution/extensions/extensions1/extensions1png1.png
-FINISH ADD distribution/extensions/extensions1/extensions1png0.png
-FINISH ADD distribution/extensions/extensions0/extensions0text0
-FINISH ADD distribution/extensions/extensions0/extensions0png1.png
-FINISH ADD distribution/extensions/extensions0/extensions0png0.png
-FINISH ADD 1/10/10text0
-FINISH ADD 0/0exe0.exe
-FINISH ADD 0/00/00text1
-FINISH ADD 0/00/00text0
-FINISH ADD 0/00/00png0.png
-FINISH REMOVEDIR 9/99/
-FINISH REMOVEDIR 9/99/
-directory no longer exists; skipping
-FINISH REMOVEDIR 9/98/
-FINISH REMOVEFILE 9/97/970/97xtext0
-FINISH REMOVEFILE 9/97/970/97xtext1
-FINISH REMOVEDIR 9/97/970/
-FINISH REMOVEFILE 9/97/971/97xtext0
-FINISH REMOVEFILE 9/97/971/97xtext1
-FINISH REMOVEDIR 9/97/971/
-FINISH REMOVEDIR 9/97/
-FINISH REMOVEFILE 9/96/96text0
-FINISH REMOVEFILE 9/96/96text1
-FINISH REMOVEDIR 9/96/
-FINISH REMOVEDIR 9/95/
-FINISH REMOVEDIR 9/95/
-directory no longer exists; skipping
-FINISH REMOVEDIR 9/94/
-FINISH REMOVEDIR 9/94/
-directory no longer exists; skipping
-FINISH REMOVEDIR 9/93/
-FINISH REMOVEDIR 9/92/
-removing directory: 9/92/, rv: 0
-FINISH REMOVEDIR 9/91/
-removing directory: 9/91/, rv: 0
-FINISH REMOVEDIR 9/90/
-FINISH REMOVEDIR 9/90/
-directory no longer exists; skipping
-FINISH REMOVEDIR 8/89/
-FINISH REMOVEDIR 8/89/
-directory no longer exists; skipping
-FINISH REMOVEDIR 8/88/
-FINISH REMOVEFILE 8/87/870/87xtext0
-FINISH REMOVEFILE 8/87/870/87xtext1
-FINISH REMOVEDIR 8/87/870/
-FINISH REMOVEFILE 8/87/871/87xtext0
-FINISH REMOVEFILE 8/87/871/87xtext1
-FINISH REMOVEDIR 8/87/871/
-FINISH REMOVEDIR 8/87/
-FINISH REMOVEFILE 8/86/86text0
-FINISH REMOVEFILE 8/86/86text1
-FINISH REMOVEDIR 8/86/
-FINISH REMOVEDIR 8/85/
-FINISH REMOVEDIR 8/85/
-directory no longer exists; skipping
-FINISH REMOVEDIR 8/84/
-FINISH REMOVEDIR 8/84/
-directory no longer exists; skipping
-FINISH REMOVEDIR 8/83/
-FINISH REMOVEDIR 8/82/
-removing directory: 8/82/, rv: 0
-FINISH REMOVEDIR 8/81/
-removing directory: 8/81/, rv: 0
-FINISH REMOVEDIR 8/80/
-FINISH REMOVEDIR 8/80/
-directory no longer exists; skipping
-FINISH REMOVEFILE 7/70/7xtest.exe
-FINISH REMOVEFILE 7/70/7xtext0
-FINISH REMOVEFILE 7/70/7xtext1
-FINISH REMOVEDIR 7/70/
-FINISH REMOVEFILE 7/71/7xtest.exe
-FINISH REMOVEFILE 7/71/7xtext0
-FINISH REMOVEFILE 7/71/7xtext1
-FINISH REMOVEDIR 7/71/
-FINISH REMOVEFILE 7/7text0
-FINISH REMOVEFILE 7/7text1
-FINISH REMOVEDIR 7/
-FINISH REMOVEDIR 6/
-FINISH REMOVEFILE 5/5text1
-FINISH REMOVEFILE 5/5text0
-FINISH REMOVEFILE 5/5test.exe
-FINISH REMOVEDIR 5/
-FINISH REMOVEFILE 4/4text1
-FINISH REMOVEFILE 4/4text0
-FINISH REMOVEDIR 4/
-FINISH REMOVEFILE 3/3text1
-FINISH REMOVEFILE 3/3text0
-succeeded
-calling QuitProgressUI
diff --git a/toolkit/mozapps/update/tests/data/complete_mac.mar b/toolkit/mozapps/update/tests/data/complete_mac.mar
deleted file mode 100644
index ca1497f4f2..0000000000
--- a/toolkit/mozapps/update/tests/data/complete_mac.mar
+++ /dev/null
Binary files differ
diff --git a/toolkit/mozapps/update/tests/data/complete_precomplete b/toolkit/mozapps/update/tests/data/complete_precomplete
deleted file mode 100644
index ae7a0013ff..0000000000
--- a/toolkit/mozapps/update/tests/data/complete_precomplete
+++ /dev/null
@@ -1,18 +0,0 @@
-remove "searchplugins/searchpluginstext0"
-remove "searchplugins/searchpluginspng1.png"
-remove "searchplugins/searchpluginspng0.png"
-remove "removed-files"
-remove "precomplete"
-remove "exe0.exe"
-remove "1/10/10text0"
-remove "0/0exe0.exe"
-remove "0/00/00text1"
-remove "0/00/00text0"
-remove "0/00/00png0.png"
-rmdir "searchplugins/"
-rmdir "defaults/pref/"
-rmdir "defaults/"
-rmdir "1/10/"
-rmdir "1/"
-rmdir "0/00/"
-rmdir "0/"
diff --git a/toolkit/mozapps/update/tests/data/complete_precomplete_mac b/toolkit/mozapps/update/tests/data/complete_precomplete_mac
deleted file mode 100644
index 8d81a36d66..0000000000
--- a/toolkit/mozapps/update/tests/data/complete_precomplete_mac
+++ /dev/null
@@ -1,21 +0,0 @@
-remove "Contents/Resources/searchplugins/searchpluginstext0"
-remove "Contents/Resources/searchplugins/searchpluginspng1.png"
-remove "Contents/Resources/searchplugins/searchpluginspng0.png"
-remove "Contents/Resources/removed-files"
-remove "Contents/Resources/precomplete"
-remove "Contents/Resources/1/10/10text0"
-remove "Contents/Resources/0/0exe0.exe"
-remove "Contents/Resources/0/00/00text1"
-remove "Contents/Resources/0/00/00text0"
-remove "Contents/Resources/0/00/00png0.png"
-remove "Contents/MacOS/exe0.exe"
-rmdir "Contents/Resources/searchplugins/"
-rmdir "Contents/Resources/defaults/pref/"
-rmdir "Contents/Resources/defaults/"
-rmdir "Contents/Resources/1/10/"
-rmdir "Contents/Resources/1/"
-rmdir "Contents/Resources/0/00/"
-rmdir "Contents/Resources/0/"
-rmdir "Contents/Resources/"
-rmdir "Contents/MacOS/"
-rmdir "Contents/"
diff --git a/toolkit/mozapps/update/tests/data/complete_removed-files b/toolkit/mozapps/update/tests/data/complete_removed-files
deleted file mode 100644
index e45c43c1f8..0000000000
--- a/toolkit/mozapps/update/tests/data/complete_removed-files
+++ /dev/null
@@ -1,41 +0,0 @@
-text0
-text1
-3/3text0
-3/3text1
-4/exe0.exe
-4/4text0
-4/4text1
-4/
-5/5text0
-5/5text1
-5/*
-6/
-7/*
-8/80/
-8/81/
-8/82/
-8/83/
-8/84/
-8/85/*
-8/86/*
-8/87/*
-8/88/*
-8/89/*
-8/80/
-8/84/*
-8/85/*
-8/89/
-9/90/
-9/91/
-9/92/
-9/93/
-9/94/
-9/95/*
-9/96/*
-9/97/*
-9/98/*
-9/99/*
-9/90/
-9/94/*
-9/95/*
-9/99/
diff --git a/toolkit/mozapps/update/tests/data/complete_removed-files_mac b/toolkit/mozapps/update/tests/data/complete_removed-files_mac
deleted file mode 100644
index 955dc5b340..0000000000
--- a/toolkit/mozapps/update/tests/data/complete_removed-files_mac
+++ /dev/null
@@ -1,41 +0,0 @@
-Contents/Resources/text0
-Contents/Resources/text1
-Contents/Resources/3/3text0
-Contents/Resources/3/3text1
-Contents/Resources/4/exe0.exe
-Contents/Resources/4/4text0
-Contents/Resources/4/4text1
-Contents/Resources/4/
-Contents/Resources/5/5text0
-Contents/Resources/5/5text1
-Contents/Resources/5/*
-Contents/Resources/6/
-Contents/Resources/7/*
-Contents/Resources/8/80/
-Contents/Resources/8/81/
-Contents/Resources/8/82/
-Contents/Resources/8/83/
-Contents/Resources/8/84/
-Contents/Resources/8/85/*
-Contents/Resources/8/86/*
-Contents/Resources/8/87/*
-Contents/Resources/8/88/*
-Contents/Resources/8/89/*
-Contents/Resources/8/80/
-Contents/Resources/8/84/*
-Contents/Resources/8/85/*
-Contents/Resources/8/89/
-Contents/Resources/9/90/
-Contents/Resources/9/91/
-Contents/Resources/9/92/
-Contents/Resources/9/93/
-Contents/Resources/9/94/
-Contents/Resources/9/95/*
-Contents/Resources/9/96/*
-Contents/Resources/9/97/*
-Contents/Resources/9/98/*
-Contents/Resources/9/99/*
-Contents/Resources/9/90/
-Contents/Resources/9/94/*
-Contents/Resources/9/95/*
-Contents/Resources/9/99/
diff --git a/toolkit/mozapps/update/tests/data/complete_update_manifest b/toolkit/mozapps/update/tests/data/complete_update_manifest
deleted file mode 100644
index 383a324f63..0000000000
--- a/toolkit/mozapps/update/tests/data/complete_update_manifest
+++ /dev/null
@@ -1,59 +0,0 @@
-type "complete"
-add "precomplete"
-add "searchplugins/searchpluginstext0"
-add "searchplugins/searchpluginspng1.png"
-add "searchplugins/searchpluginspng0.png"
-add "removed-files"
-add-if "extensions/extensions1" "extensions/extensions1/extensions1text0"
-add-if "extensions/extensions1" "extensions/extensions1/extensions1png1.png"
-add-if "extensions/extensions1" "extensions/extensions1/extensions1png0.png"
-add-if "extensions/extensions0" "extensions/extensions0/extensions0text0"
-add-if "extensions/extensions0" "extensions/extensions0/extensions0png1.png"
-add-if "extensions/extensions0" "extensions/extensions0/extensions0png0.png"
-add "exe0.exe"
-add "1/10/10text0"
-add "0/0exe0.exe"
-add "0/00/00text1"
-add "0/00/00text0"
-add "0/00/00png0.png"
-remove "text1"
-remove "text0"
-rmrfdir "9/99/"
-rmdir "9/99/"
-rmrfdir "9/98/"
-rmrfdir "9/97/"
-rmrfdir "9/96/"
-rmrfdir "9/95/"
-rmrfdir "9/95/"
-rmrfdir "9/94/"
-rmdir "9/94/"
-rmdir "9/93/"
-rmdir "9/92/"
-rmdir "9/91/"
-rmdir "9/90/"
-rmdir "9/90/"
-rmrfdir "8/89/"
-rmdir "8/89/"
-rmrfdir "8/88/"
-rmrfdir "8/87/"
-rmrfdir "8/86/"
-rmrfdir "8/85/"
-rmrfdir "8/85/"
-rmrfdir "8/84/"
-rmdir "8/84/"
-rmdir "8/83/"
-rmdir "8/82/"
-rmdir "8/81/"
-rmdir "8/80/"
-rmdir "8/80/"
-rmrfdir "7/"
-rmdir "6/"
-remove "5/5text1"
-remove "5/5text0"
-rmrfdir "5/"
-remove "4/exe0.exe"
-remove "4/4text1"
-remove "4/4text0"
-rmdir "4/"
-remove "3/3text1"
-remove "3/3text0"
diff --git a/toolkit/mozapps/update/tests/data/old_version.mar b/toolkit/mozapps/update/tests/data/old_version.mar
deleted file mode 100644
index 31550698a0..0000000000
--- a/toolkit/mozapps/update/tests/data/old_version.mar
+++ /dev/null
Binary files differ
diff --git a/toolkit/mozapps/update/tests/data/partial.exe b/toolkit/mozapps/update/tests/data/partial.exe
deleted file mode 100644
index 3949fd2a0e..0000000000
--- a/toolkit/mozapps/update/tests/data/partial.exe
+++ /dev/null
Binary files differ
diff --git a/toolkit/mozapps/update/tests/data/partial.mar b/toolkit/mozapps/update/tests/data/partial.mar
deleted file mode 100644
index 789d3d98d6..0000000000
--- a/toolkit/mozapps/update/tests/data/partial.mar
+++ /dev/null
Binary files differ
diff --git a/toolkit/mozapps/update/tests/data/partial.png b/toolkit/mozapps/update/tests/data/partial.png
deleted file mode 100644
index 9246f586c7..0000000000
--- a/toolkit/mozapps/update/tests/data/partial.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/mozapps/update/tests/data/partial_log_failure_mac b/toolkit/mozapps/update/tests/data/partial_log_failure_mac
deleted file mode 100644
index 3b2933ebd2..0000000000
--- a/toolkit/mozapps/update/tests/data/partial_log_failure_mac
+++ /dev/null
@@ -1,192 +0,0 @@
-UPDATE TYPE partial
-PREPARE ADD Contents/Resources/searchplugins/searchpluginstext0
-PREPARE PATCH Contents/Resources/searchplugins/searchpluginspng1.png
-PREPARE PATCH Contents/Resources/searchplugins/searchpluginspng0.png
-PREPARE ADD Contents/Resources/precomplete
-PREPARE ADD Contents/Resources/distribution/extensions/extensions1/extensions1text0
-PREPARE PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png1.png
-PREPARE PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png0.png
-PREPARE ADD Contents/Resources/distribution/extensions/extensions0/extensions0text0
-PREPARE PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png1.png
-PREPARE PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png0.png
-PREPARE PATCH Contents/Resources/0/0exe0.exe
-PREPARE ADD Contents/Resources/0/00/00text0
-PREPARE PATCH Contents/Resources/0/00/00png0.png
-PREPARE PATCH Contents/MacOS/exe0.exe
-PREPARE ADD Contents/Resources/2/20/20text0
-PREPARE ADD Contents/Resources/2/20/20png0.png
-PREPARE ADD Contents/Resources/0/00/00text2
-PREPARE REMOVEFILE Contents/Resources/1/10/10text0
-PREPARE REMOVEFILE Contents/Resources/0/00/00text1
-PREPARE REMOVEDIR Contents/Resources/9/99/
-PREPARE REMOVEDIR Contents/Resources/9/99/
-PREPARE REMOVEDIR Contents/Resources/9/98/
-PREPARE REMOVEFILE Contents/Resources/9/97/970/97xtext0
-PREPARE REMOVEFILE Contents/Resources/9/97/970/97xtext1
-PREPARE REMOVEDIR Contents/Resources/9/97/970/
-PREPARE REMOVEFILE Contents/Resources/9/97/971/97xtext0
-PREPARE REMOVEFILE Contents/Resources/9/97/971/97xtext1
-PREPARE REMOVEDIR Contents/Resources/9/97/971/
-PREPARE REMOVEDIR Contents/Resources/9/97/
-PREPARE REMOVEFILE Contents/Resources/9/96/96text0
-PREPARE REMOVEFILE Contents/Resources/9/96/96text1
-PREPARE REMOVEDIR Contents/Resources/9/96/
-PREPARE REMOVEDIR Contents/Resources/9/95/
-PREPARE REMOVEDIR Contents/Resources/9/95/
-PREPARE REMOVEDIR Contents/Resources/9/94/
-PREPARE REMOVEDIR Contents/Resources/9/94/
-PREPARE REMOVEDIR Contents/Resources/9/93/
-PREPARE REMOVEDIR Contents/Resources/9/92/
-PREPARE REMOVEDIR Contents/Resources/9/91/
-PREPARE REMOVEDIR Contents/Resources/9/90/
-PREPARE REMOVEDIR Contents/Resources/9/90/
-PREPARE REMOVEDIR Contents/Resources/8/89/
-PREPARE REMOVEDIR Contents/Resources/8/89/
-PREPARE REMOVEDIR Contents/Resources/8/88/
-PREPARE REMOVEFILE Contents/Resources/8/87/870/87xtext0
-PREPARE REMOVEFILE Contents/Resources/8/87/870/87xtext1
-PREPARE REMOVEDIR Contents/Resources/8/87/870/
-PREPARE REMOVEFILE Contents/Resources/8/87/871/87xtext0
-PREPARE REMOVEFILE Contents/Resources/8/87/871/87xtext1
-PREPARE REMOVEDIR Contents/Resources/8/87/871/
-PREPARE REMOVEDIR Contents/Resources/8/87/
-PREPARE REMOVEFILE Contents/Resources/8/86/86text0
-PREPARE REMOVEFILE Contents/Resources/8/86/86text1
-PREPARE REMOVEDIR Contents/Resources/8/86/
-PREPARE REMOVEDIR Contents/Resources/8/85/
-PREPARE REMOVEDIR Contents/Resources/8/85/
-PREPARE REMOVEDIR Contents/Resources/8/84/
-PREPARE REMOVEDIR Contents/Resources/8/84/
-PREPARE REMOVEDIR Contents/Resources/8/83/
-PREPARE REMOVEDIR Contents/Resources/8/82/
-PREPARE REMOVEDIR Contents/Resources/8/81/
-PREPARE REMOVEDIR Contents/Resources/8/80/
-PREPARE REMOVEDIR Contents/Resources/8/80/
-PREPARE REMOVEFILE Contents/Resources/7/70/7xtest.exe
-PREPARE REMOVEFILE Contents/Resources/7/70/7xtext0
-PREPARE REMOVEFILE Contents/Resources/7/70/7xtext1
-PREPARE REMOVEDIR Contents/Resources/7/70/
-PREPARE REMOVEFILE Contents/Resources/7/71/7xtest.exe
-PREPARE REMOVEFILE Contents/Resources/7/71/7xtext0
-PREPARE REMOVEFILE Contents/Resources/7/71/7xtext1
-PREPARE REMOVEDIR Contents/Resources/7/71/
-PREPARE REMOVEFILE Contents/Resources/7/7text0
-PREPARE REMOVEFILE Contents/Resources/7/7text1
-PREPARE REMOVEDIR Contents/Resources/7/
-PREPARE REMOVEDIR Contents/Resources/6/
-PREPARE REMOVEFILE Contents/Resources/5/5text1
-PREPARE REMOVEFILE Contents/Resources/5/5text0
-PREPARE REMOVEFILE Contents/Resources/5/5test.exe
-PREPARE REMOVEFILE Contents/Resources/5/5text0
-PREPARE REMOVEFILE Contents/Resources/5/5text1
-PREPARE REMOVEDIR Contents/Resources/5/
-PREPARE REMOVEFILE Contents/Resources/4/4text1
-PREPARE REMOVEFILE Contents/Resources/4/4text0
-PREPARE REMOVEDIR Contents/Resources/4/
-PREPARE REMOVEFILE Contents/Resources/3/3text1
-PREPARE REMOVEFILE Contents/Resources/3/3text0
-PREPARE REMOVEDIR Contents/Resources/1/10/
-PREPARE REMOVEDIR Contents/Resources/1/
-EXECUTE ADD Contents/Resources/searchplugins/searchpluginstext0
-EXECUTE PATCH Contents/Resources/searchplugins/searchpluginspng1.png
-EXECUTE PATCH Contents/Resources/searchplugins/searchpluginspng0.png
-EXECUTE ADD Contents/Resources/precomplete
-EXECUTE ADD Contents/Resources/distribution/extensions/extensions1/extensions1text0
-EXECUTE PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png1.png
-EXECUTE PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png0.png
-EXECUTE ADD Contents/Resources/distribution/extensions/extensions0/extensions0text0
-EXECUTE PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png1.png
-EXECUTE PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png0.png
-EXECUTE PATCH Contents/Resources/0/0exe0.exe
-LoadSourceFile: destination file size 776 does not match expected size 79872
-LoadSourceFile failed
-### execution failed
-FINISH ADD Contents/Resources/searchplugins/searchpluginstext0
-FINISH PATCH Contents/Resources/searchplugins/searchpluginspng1.png
-FINISH PATCH Contents/Resources/searchplugins/searchpluginspng0.png
-FINISH ADD Contents/Resources/precomplete
-FINISH ADD Contents/Resources/distribution/extensions/extensions1/extensions1text0
-backup_restore: backup file doesn't exist: Contents/Resources/distribution/extensions/extensions1/extensions1text0.moz-backup
-FINISH PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png1.png
-FINISH PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png0.png
-FINISH ADD Contents/Resources/distribution/extensions/extensions0/extensions0text0
-FINISH PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png1.png
-FINISH PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png0.png
-FINISH PATCH Contents/Resources/0/0exe0.exe
-backup_restore: backup file doesn't exist: Contents/Resources/0/0exe0.exe.moz-backup
-FINISH ADD Contents/Resources/0/00/00text0
-backup_restore: backup file doesn't exist: Contents/Resources/0/00/00text0.moz-backup
-FINISH PATCH Contents/Resources/0/00/00png0.png
-backup_restore: backup file doesn't exist: Contents/Resources/0/00/00png0.png.moz-backup
-FINISH PATCH Contents/MacOS/exe0.exe
-backup_restore: backup file doesn't exist: Contents/MacOS/exe0.exe.moz-backup
-FINISH ADD Contents/Resources/2/20/20text0
-backup_restore: backup file doesn't exist: Contents/Resources/2/20/20text0.moz-backup
-FINISH ADD Contents/Resources/2/20/20png0.png
-backup_restore: backup file doesn't exist: Contents/Resources/2/20/20png0.png.moz-backup
-FINISH ADD Contents/Resources/0/00/00text2
-backup_restore: backup file doesn't exist: Contents/Resources/0/00/00text2.moz-backup
-FINISH REMOVEFILE Contents/Resources/1/10/10text0
-backup_restore: backup file doesn't exist: Contents/Resources/1/10/10text0.moz-backup
-FINISH REMOVEFILE Contents/Resources/0/00/00text1
-backup_restore: backup file doesn't exist: Contents/Resources/0/00/00text1.moz-backup
-FINISH REMOVEFILE Contents/Resources/9/97/970/97xtext0
-backup_restore: backup file doesn't exist: Contents/Resources/9/97/970/97xtext0.moz-backup
-FINISH REMOVEFILE Contents/Resources/9/97/970/97xtext1
-backup_restore: backup file doesn't exist: Contents/Resources/9/97/970/97xtext1.moz-backup
-FINISH REMOVEFILE Contents/Resources/9/97/971/97xtext0
-backup_restore: backup file doesn't exist: Contents/Resources/9/97/971/97xtext0.moz-backup
-FINISH REMOVEFILE Contents/Resources/9/97/971/97xtext1
-backup_restore: backup file doesn't exist: Contents/Resources/9/97/971/97xtext1.moz-backup
-FINISH REMOVEFILE Contents/Resources/9/96/96text0
-backup_restore: backup file doesn't exist: Contents/Resources/9/96/96text0.moz-backup
-FINISH REMOVEFILE Contents/Resources/9/96/96text1
-backup_restore: backup file doesn't exist: Contents/Resources/9/96/96text1.moz-backup
-FINISH REMOVEFILE Contents/Resources/8/87/870/87xtext0
-backup_restore: backup file doesn't exist: Contents/Resources/8/87/870/87xtext0.moz-backup
-FINISH REMOVEFILE Contents/Resources/8/87/870/87xtext1
-backup_restore: backup file doesn't exist: Contents/Resources/8/87/870/87xtext1.moz-backup
-FINISH REMOVEFILE Contents/Resources/8/87/871/87xtext0
-backup_restore: backup file doesn't exist: Contents/Resources/8/87/871/87xtext0.moz-backup
-FINISH REMOVEFILE Contents/Resources/8/87/871/87xtext1
-backup_restore: backup file doesn't exist: Contents/Resources/8/87/871/87xtext1.moz-backup
-FINISH REMOVEFILE Contents/Resources/8/86/86text0
-backup_restore: backup file doesn't exist: Contents/Resources/8/86/86text0.moz-backup
-FINISH REMOVEFILE Contents/Resources/8/86/86text1
-backup_restore: backup file doesn't exist: Contents/Resources/8/86/86text1.moz-backup
-FINISH REMOVEFILE Contents/Resources/7/70/7xtest.exe
-backup_restore: backup file doesn't exist: Contents/Resources/7/70/7xtest.exe.moz-backup
-FINISH REMOVEFILE Contents/Resources/7/70/7xtext0
-backup_restore: backup file doesn't exist: Contents/Resources/7/70/7xtext0.moz-backup
-FINISH REMOVEFILE Contents/Resources/7/70/7xtext1
-backup_restore: backup file doesn't exist: Contents/Resources/7/70/7xtext1.moz-backup
-FINISH REMOVEFILE Contents/Resources/7/71/7xtest.exe
-backup_restore: backup file doesn't exist: Contents/Resources/7/71/7xtest.exe.moz-backup
-FINISH REMOVEFILE Contents/Resources/7/71/7xtext0
-backup_restore: backup file doesn't exist: Contents/Resources/7/71/7xtext0.moz-backup
-FINISH REMOVEFILE Contents/Resources/7/71/7xtext1
-backup_restore: backup file doesn't exist: Contents/Resources/7/71/7xtext1.moz-backup
-FINISH REMOVEFILE Contents/Resources/7/7text0
-backup_restore: backup file doesn't exist: Contents/Resources/7/7text0.moz-backup
-FINISH REMOVEFILE Contents/Resources/7/7text1
-backup_restore: backup file doesn't exist: Contents/Resources/7/7text1.moz-backup
-FINISH REMOVEFILE Contents/Resources/5/5text1
-backup_restore: backup file doesn't exist: Contents/Resources/5/5text1.moz-backup
-FINISH REMOVEFILE Contents/Resources/5/5text0
-backup_restore: backup file doesn't exist: Contents/Resources/5/5text0.moz-backup
-FINISH REMOVEFILE Contents/Resources/5/5test.exe
-backup_restore: backup file doesn't exist: Contents/Resources/5/5test.exe.moz-backup
-FINISH REMOVEFILE Contents/Resources/5/5text0
-backup_restore: backup file doesn't exist: Contents/Resources/5/5text0.moz-backup
-FINISH REMOVEFILE Contents/Resources/5/5text1
-backup_restore: backup file doesn't exist: Contents/Resources/5/5text1.moz-backup
-FINISH REMOVEFILE Contents/Resources/4/4text1
-backup_restore: backup file doesn't exist: Contents/Resources/4/4text1.moz-backup
-FINISH REMOVEFILE Contents/Resources/4/4text0
-backup_restore: backup file doesn't exist: Contents/Resources/4/4text0.moz-backup
-FINISH REMOVEFILE Contents/Resources/3/3text1
-backup_restore: backup file doesn't exist: Contents/Resources/3/3text1.moz-backup
-FINISH REMOVEFILE Contents/Resources/3/3text0
-backup_restore: backup file doesn't exist: Contents/Resources/3/3text0.moz-backup
-failed: 2
-calling QuitProgressUI
diff --git a/toolkit/mozapps/update/tests/data/partial_log_failure_win b/toolkit/mozapps/update/tests/data/partial_log_failure_win
deleted file mode 100644
index e3d683dc19..0000000000
--- a/toolkit/mozapps/update/tests/data/partial_log_failure_win
+++ /dev/null
@@ -1,192 +0,0 @@
-UPDATE TYPE partial
-PREPARE ADD searchplugins/searchpluginstext0
-PREPARE PATCH searchplugins/searchpluginspng1.png
-PREPARE PATCH searchplugins/searchpluginspng0.png
-PREPARE ADD precomplete
-PREPARE PATCH exe0.exe
-PREPARE ADD distribution/extensions/extensions1/extensions1text0
-PREPARE PATCH distribution/extensions/extensions1/extensions1png1.png
-PREPARE PATCH distribution/extensions/extensions1/extensions1png0.png
-PREPARE ADD distribution/extensions/extensions0/extensions0text0
-PREPARE PATCH distribution/extensions/extensions0/extensions0png1.png
-PREPARE PATCH distribution/extensions/extensions0/extensions0png0.png
-PREPARE PATCH 0/0exe0.exe
-PREPARE ADD 0/00/00text0
-PREPARE PATCH 0/00/00png0.png
-PREPARE ADD 2/20/20text0
-PREPARE ADD 2/20/20png0.png
-PREPARE ADD 0/00/00text2
-PREPARE REMOVEFILE 1/10/10text0
-PREPARE REMOVEFILE 0/00/00text1
-PREPARE REMOVEDIR 9/99/
-PREPARE REMOVEDIR 9/99/
-PREPARE REMOVEDIR 9/98/
-PREPARE REMOVEFILE 9/97/970/97xtext0
-PREPARE REMOVEFILE 9/97/970/97xtext1
-PREPARE REMOVEDIR 9/97/970/
-PREPARE REMOVEFILE 9/97/971/97xtext0
-PREPARE REMOVEFILE 9/97/971/97xtext1
-PREPARE REMOVEDIR 9/97/971/
-PREPARE REMOVEDIR 9/97/
-PREPARE REMOVEFILE 9/96/96text0
-PREPARE REMOVEFILE 9/96/96text1
-PREPARE REMOVEDIR 9/96/
-PREPARE REMOVEDIR 9/95/
-PREPARE REMOVEDIR 9/95/
-PREPARE REMOVEDIR 9/94/
-PREPARE REMOVEDIR 9/94/
-PREPARE REMOVEDIR 9/93/
-PREPARE REMOVEDIR 9/92/
-PREPARE REMOVEDIR 9/91/
-PREPARE REMOVEDIR 9/90/
-PREPARE REMOVEDIR 9/90/
-PREPARE REMOVEDIR 8/89/
-PREPARE REMOVEDIR 8/89/
-PREPARE REMOVEDIR 8/88/
-PREPARE REMOVEFILE 8/87/870/87xtext0
-PREPARE REMOVEFILE 8/87/870/87xtext1
-PREPARE REMOVEDIR 8/87/870/
-PREPARE REMOVEFILE 8/87/871/87xtext0
-PREPARE REMOVEFILE 8/87/871/87xtext1
-PREPARE REMOVEDIR 8/87/871/
-PREPARE REMOVEDIR 8/87/
-PREPARE REMOVEFILE 8/86/86text0
-PREPARE REMOVEFILE 8/86/86text1
-PREPARE REMOVEDIR 8/86/
-PREPARE REMOVEDIR 8/85/
-PREPARE REMOVEDIR 8/85/
-PREPARE REMOVEDIR 8/84/
-PREPARE REMOVEDIR 8/84/
-PREPARE REMOVEDIR 8/83/
-PREPARE REMOVEDIR 8/82/
-PREPARE REMOVEDIR 8/81/
-PREPARE REMOVEDIR 8/80/
-PREPARE REMOVEDIR 8/80/
-PREPARE REMOVEFILE 7/70/7xtest.exe
-PREPARE REMOVEFILE 7/70/7xtext0
-PREPARE REMOVEFILE 7/70/7xtext1
-PREPARE REMOVEDIR 7/70/
-PREPARE REMOVEFILE 7/71/7xtest.exe
-PREPARE REMOVEFILE 7/71/7xtext0
-PREPARE REMOVEFILE 7/71/7xtext1
-PREPARE REMOVEDIR 7/71/
-PREPARE REMOVEFILE 7/7text0
-PREPARE REMOVEFILE 7/7text1
-PREPARE REMOVEDIR 7/
-PREPARE REMOVEDIR 6/
-PREPARE REMOVEFILE 5/5text1
-PREPARE REMOVEFILE 5/5text0
-PREPARE REMOVEFILE 5/5test.exe
-PREPARE REMOVEFILE 5/5text0
-PREPARE REMOVEFILE 5/5text1
-PREPARE REMOVEDIR 5/
-PREPARE REMOVEFILE 4/4text1
-PREPARE REMOVEFILE 4/4text0
-PREPARE REMOVEDIR 4/
-PREPARE REMOVEFILE 3/3text1
-PREPARE REMOVEFILE 3/3text0
-PREPARE REMOVEDIR 1/10/
-PREPARE REMOVEDIR 1/
-EXECUTE ADD searchplugins/searchpluginstext0
-EXECUTE PATCH searchplugins/searchpluginspng1.png
-EXECUTE PATCH searchplugins/searchpluginspng0.png
-EXECUTE ADD precomplete
-EXECUTE PATCH exe0.exe
-EXECUTE ADD distribution/extensions/extensions1/extensions1text0
-EXECUTE PATCH distribution/extensions/extensions1/extensions1png1.png
-EXECUTE PATCH distribution/extensions/extensions1/extensions1png0.png
-EXECUTE ADD distribution/extensions/extensions0/extensions0text0
-EXECUTE PATCH distribution/extensions/extensions0/extensions0png1.png
-EXECUTE PATCH distribution/extensions/extensions0/extensions0png0.png
-EXECUTE PATCH 0/0exe0.exe
-LoadSourceFile: destination file size 776 does not match expected size 79872
-LoadSourceFile failed
-### execution failed
-FINISH ADD searchplugins/searchpluginstext0
-FINISH PATCH searchplugins/searchpluginspng1.png
-FINISH PATCH searchplugins/searchpluginspng0.png
-FINISH ADD precomplete
-FINISH PATCH exe0.exe
-FINISH ADD distribution/extensions/extensions1/extensions1text0
-backup_restore: backup file doesn't exist: distribution/extensions/extensions1/extensions1text0.moz-backup
-FINISH PATCH distribution/extensions/extensions1/extensions1png1.png
-FINISH PATCH distribution/extensions/extensions1/extensions1png0.png
-FINISH ADD distribution/extensions/extensions0/extensions0text0
-FINISH PATCH distribution/extensions/extensions0/extensions0png1.png
-FINISH PATCH distribution/extensions/extensions0/extensions0png0.png
-FINISH PATCH 0/0exe0.exe
-backup_restore: backup file doesn't exist: 0/0exe0.exe.moz-backup
-FINISH ADD 0/00/00text0
-backup_restore: backup file doesn't exist: 0/00/00text0.moz-backup
-FINISH PATCH 0/00/00png0.png
-backup_restore: backup file doesn't exist: 0/00/00png0.png.moz-backup
-FINISH ADD 2/20/20text0
-backup_restore: backup file doesn't exist: 2/20/20text0.moz-backup
-FINISH ADD 2/20/20png0.png
-backup_restore: backup file doesn't exist: 2/20/20png0.png.moz-backup
-FINISH ADD 0/00/00text2
-backup_restore: backup file doesn't exist: 0/00/00text2.moz-backup
-FINISH REMOVEFILE 1/10/10text0
-backup_restore: backup file doesn't exist: 1/10/10text0.moz-backup
-FINISH REMOVEFILE 0/00/00text1
-backup_restore: backup file doesn't exist: 0/00/00text1.moz-backup
-FINISH REMOVEFILE 9/97/970/97xtext0
-backup_restore: backup file doesn't exist: 9/97/970/97xtext0.moz-backup
-FINISH REMOVEFILE 9/97/970/97xtext1
-backup_restore: backup file doesn't exist: 9/97/970/97xtext1.moz-backup
-FINISH REMOVEFILE 9/97/971/97xtext0
-backup_restore: backup file doesn't exist: 9/97/971/97xtext0.moz-backup
-FINISH REMOVEFILE 9/97/971/97xtext1
-backup_restore: backup file doesn't exist: 9/97/971/97xtext1.moz-backup
-FINISH REMOVEFILE 9/96/96text0
-backup_restore: backup file doesn't exist: 9/96/96text0.moz-backup
-FINISH REMOVEFILE 9/96/96text1
-backup_restore: backup file doesn't exist: 9/96/96text1.moz-backup
-FINISH REMOVEFILE 8/87/870/87xtext0
-backup_restore: backup file doesn't exist: 8/87/870/87xtext0.moz-backup
-FINISH REMOVEFILE 8/87/870/87xtext1
-backup_restore: backup file doesn't exist: 8/87/870/87xtext1.moz-backup
-FINISH REMOVEFILE 8/87/871/87xtext0
-backup_restore: backup file doesn't exist: 8/87/871/87xtext0.moz-backup
-FINISH REMOVEFILE 8/87/871/87xtext1
-backup_restore: backup file doesn't exist: 8/87/871/87xtext1.moz-backup
-FINISH REMOVEFILE 8/86/86text0
-backup_restore: backup file doesn't exist: 8/86/86text0.moz-backup
-FINISH REMOVEFILE 8/86/86text1
-backup_restore: backup file doesn't exist: 8/86/86text1.moz-backup
-FINISH REMOVEFILE 7/70/7xtest.exe
-backup_restore: backup file doesn't exist: 7/70/7xtest.exe.moz-backup
-FINISH REMOVEFILE 7/70/7xtext0
-backup_restore: backup file doesn't exist: 7/70/7xtext0.moz-backup
-FINISH REMOVEFILE 7/70/7xtext1
-backup_restore: backup file doesn't exist: 7/70/7xtext1.moz-backup
-FINISH REMOVEFILE 7/71/7xtest.exe
-backup_restore: backup file doesn't exist: 7/71/7xtest.exe.moz-backup
-FINISH REMOVEFILE 7/71/7xtext0
-backup_restore: backup file doesn't exist: 7/71/7xtext0.moz-backup
-FINISH REMOVEFILE 7/71/7xtext1
-backup_restore: backup file doesn't exist: 7/71/7xtext1.moz-backup
-FINISH REMOVEFILE 7/7text0
-backup_restore: backup file doesn't exist: 7/7text0.moz-backup
-FINISH REMOVEFILE 7/7text1
-backup_restore: backup file doesn't exist: 7/7text1.moz-backup
-FINISH REMOVEFILE 5/5text1
-backup_restore: backup file doesn't exist: 5/5text1.moz-backup
-FINISH REMOVEFILE 5/5text0
-backup_restore: backup file doesn't exist: 5/5text0.moz-backup
-FINISH REMOVEFILE 5/5test.exe
-backup_restore: backup file doesn't exist: 5/5test.exe.moz-backup
-FINISH REMOVEFILE 5/5text0
-backup_restore: backup file doesn't exist: 5/5text0.moz-backup
-FINISH REMOVEFILE 5/5text1
-backup_restore: backup file doesn't exist: 5/5text1.moz-backup
-FINISH REMOVEFILE 4/4text1
-backup_restore: backup file doesn't exist: 4/4text1.moz-backup
-FINISH REMOVEFILE 4/4text0
-backup_restore: backup file doesn't exist: 4/4text0.moz-backup
-FINISH REMOVEFILE 3/3text1
-backup_restore: backup file doesn't exist: 3/3text1.moz-backup
-FINISH REMOVEFILE 3/3text0
-backup_restore: backup file doesn't exist: 3/3text0.moz-backup
-failed: 2
-calling QuitProgressUI
diff --git a/toolkit/mozapps/update/tests/data/partial_log_success_mac b/toolkit/mozapps/update/tests/data/partial_log_success_mac
deleted file mode 100644
index fb5272ad2c..0000000000
--- a/toolkit/mozapps/update/tests/data/partial_log_success_mac
+++ /dev/null
@@ -1,279 +0,0 @@
-UPDATE TYPE partial
-PREPARE ADD Contents/Resources/searchplugins/searchpluginstext0
-PREPARE PATCH Contents/Resources/searchplugins/searchpluginspng1.png
-PREPARE PATCH Contents/Resources/searchplugins/searchpluginspng0.png
-PREPARE ADD Contents/Resources/precomplete
-PREPARE ADD Contents/Resources/distribution/extensions/extensions1/extensions1text0
-PREPARE PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png1.png
-PREPARE PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png0.png
-PREPARE ADD Contents/Resources/distribution/extensions/extensions0/extensions0text0
-PREPARE PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png1.png
-PREPARE PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png0.png
-PREPARE PATCH Contents/Resources/0/0exe0.exe
-PREPARE ADD Contents/Resources/0/00/00text0
-PREPARE PATCH Contents/Resources/0/00/00png0.png
-PREPARE PATCH Contents/MacOS/exe0.exe
-PREPARE ADD Contents/Resources/2/20/20text0
-PREPARE ADD Contents/Resources/2/20/20png0.png
-PREPARE ADD Contents/Resources/0/00/00text2
-PREPARE REMOVEFILE Contents/Resources/1/10/10text0
-PREPARE REMOVEFILE Contents/Resources/0/00/00text1
-PREPARE REMOVEDIR Contents/Resources/9/99/
-PREPARE REMOVEDIR Contents/Resources/9/99/
-PREPARE REMOVEDIR Contents/Resources/9/98/
-PREPARE REMOVEFILE Contents/Resources/9/97/970/97xtext0
-PREPARE REMOVEFILE Contents/Resources/9/97/970/97xtext1
-PREPARE REMOVEDIR Contents/Resources/9/97/970/
-PREPARE REMOVEFILE Contents/Resources/9/97/971/97xtext0
-PREPARE REMOVEFILE Contents/Resources/9/97/971/97xtext1
-PREPARE REMOVEDIR Contents/Resources/9/97/971/
-PREPARE REMOVEDIR Contents/Resources/9/97/
-PREPARE REMOVEFILE Contents/Resources/9/96/96text0
-PREPARE REMOVEFILE Contents/Resources/9/96/96text1
-PREPARE REMOVEDIR Contents/Resources/9/96/
-PREPARE REMOVEDIR Contents/Resources/9/95/
-PREPARE REMOVEDIR Contents/Resources/9/95/
-PREPARE REMOVEDIR Contents/Resources/9/94/
-PREPARE REMOVEDIR Contents/Resources/9/94/
-PREPARE REMOVEDIR Contents/Resources/9/93/
-PREPARE REMOVEDIR Contents/Resources/9/92/
-PREPARE REMOVEDIR Contents/Resources/9/91/
-PREPARE REMOVEDIR Contents/Resources/9/90/
-PREPARE REMOVEDIR Contents/Resources/9/90/
-PREPARE REMOVEDIR Contents/Resources/8/89/
-PREPARE REMOVEDIR Contents/Resources/8/89/
-PREPARE REMOVEDIR Contents/Resources/8/88/
-PREPARE REMOVEFILE Contents/Resources/8/87/870/87xtext0
-PREPARE REMOVEFILE Contents/Resources/8/87/870/87xtext1
-PREPARE REMOVEDIR Contents/Resources/8/87/870/
-PREPARE REMOVEFILE Contents/Resources/8/87/871/87xtext0
-PREPARE REMOVEFILE Contents/Resources/8/87/871/87xtext1
-PREPARE REMOVEDIR Contents/Resources/8/87/871/
-PREPARE REMOVEDIR Contents/Resources/8/87/
-PREPARE REMOVEFILE Contents/Resources/8/86/86text0
-PREPARE REMOVEFILE Contents/Resources/8/86/86text1
-PREPARE REMOVEDIR Contents/Resources/8/86/
-PREPARE REMOVEDIR Contents/Resources/8/85/
-PREPARE REMOVEDIR Contents/Resources/8/85/
-PREPARE REMOVEDIR Contents/Resources/8/84/
-PREPARE REMOVEDIR Contents/Resources/8/84/
-PREPARE REMOVEDIR Contents/Resources/8/83/
-PREPARE REMOVEDIR Contents/Resources/8/82/
-PREPARE REMOVEDIR Contents/Resources/8/81/
-PREPARE REMOVEDIR Contents/Resources/8/80/
-PREPARE REMOVEDIR Contents/Resources/8/80/
-PREPARE REMOVEFILE Contents/Resources/7/70/7xtest.exe
-PREPARE REMOVEFILE Contents/Resources/7/70/7xtext0
-PREPARE REMOVEFILE Contents/Resources/7/70/7xtext1
-PREPARE REMOVEDIR Contents/Resources/7/70/
-PREPARE REMOVEFILE Contents/Resources/7/71/7xtest.exe
-PREPARE REMOVEFILE Contents/Resources/7/71/7xtext0
-PREPARE REMOVEFILE Contents/Resources/7/71/7xtext1
-PREPARE REMOVEDIR Contents/Resources/7/71/
-PREPARE REMOVEFILE Contents/Resources/7/7text0
-PREPARE REMOVEFILE Contents/Resources/7/7text1
-PREPARE REMOVEDIR Contents/Resources/7/
-PREPARE REMOVEDIR Contents/Resources/6/
-PREPARE REMOVEFILE Contents/Resources/5/5text1
-PREPARE REMOVEFILE Contents/Resources/5/5text0
-PREPARE REMOVEFILE Contents/Resources/5/5test.exe
-PREPARE REMOVEFILE Contents/Resources/5/5text0
-PREPARE REMOVEFILE Contents/Resources/5/5text1
-PREPARE REMOVEDIR Contents/Resources/5/
-PREPARE REMOVEFILE Contents/Resources/4/4text1
-PREPARE REMOVEFILE Contents/Resources/4/4text0
-PREPARE REMOVEDIR Contents/Resources/4/
-PREPARE REMOVEFILE Contents/Resources/3/3text1
-PREPARE REMOVEFILE Contents/Resources/3/3text0
-PREPARE REMOVEDIR Contents/Resources/1/10/
-PREPARE REMOVEDIR Contents/Resources/1/
-EXECUTE ADD Contents/Resources/searchplugins/searchpluginstext0
-EXECUTE PATCH Contents/Resources/searchplugins/searchpluginspng1.png
-EXECUTE PATCH Contents/Resources/searchplugins/searchpluginspng0.png
-EXECUTE ADD Contents/Resources/precomplete
-EXECUTE ADD Contents/Resources/distribution/extensions/extensions1/extensions1text0
-EXECUTE PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png1.png
-EXECUTE PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png0.png
-EXECUTE ADD Contents/Resources/distribution/extensions/extensions0/extensions0text0
-EXECUTE PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png1.png
-EXECUTE PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png0.png
-EXECUTE PATCH Contents/Resources/0/0exe0.exe
-EXECUTE ADD Contents/Resources/0/00/00text0
-EXECUTE PATCH Contents/Resources/0/00/00png0.png
-EXECUTE PATCH Contents/MacOS/exe0.exe
-EXECUTE ADD Contents/Resources/2/20/20text0
-EXECUTE ADD Contents/Resources/2/20/20png0.png
-EXECUTE ADD Contents/Resources/0/00/00text2
-EXECUTE REMOVEFILE Contents/Resources/1/10/10text0
-EXECUTE REMOVEFILE Contents/Resources/0/00/00text1
-EXECUTE REMOVEDIR Contents/Resources/9/99/
-EXECUTE REMOVEDIR Contents/Resources/9/99/
-EXECUTE REMOVEDIR Contents/Resources/9/98/
-EXECUTE REMOVEFILE Contents/Resources/9/97/970/97xtext0
-EXECUTE REMOVEFILE Contents/Resources/9/97/970/97xtext1
-EXECUTE REMOVEDIR Contents/Resources/9/97/970/
-EXECUTE REMOVEFILE Contents/Resources/9/97/971/97xtext0
-EXECUTE REMOVEFILE Contents/Resources/9/97/971/97xtext1
-EXECUTE REMOVEDIR Contents/Resources/9/97/971/
-EXECUTE REMOVEDIR Contents/Resources/9/97/
-EXECUTE REMOVEFILE Contents/Resources/9/96/96text0
-EXECUTE REMOVEFILE Contents/Resources/9/96/96text1
-EXECUTE REMOVEDIR Contents/Resources/9/96/
-EXECUTE REMOVEDIR Contents/Resources/9/95/
-EXECUTE REMOVEDIR Contents/Resources/9/95/
-EXECUTE REMOVEDIR Contents/Resources/9/94/
-EXECUTE REMOVEDIR Contents/Resources/9/94/
-EXECUTE REMOVEDIR Contents/Resources/9/93/
-EXECUTE REMOVEDIR Contents/Resources/9/92/
-EXECUTE REMOVEDIR Contents/Resources/9/91/
-EXECUTE REMOVEDIR Contents/Resources/9/90/
-EXECUTE REMOVEDIR Contents/Resources/9/90/
-EXECUTE REMOVEDIR Contents/Resources/8/89/
-EXECUTE REMOVEDIR Contents/Resources/8/89/
-EXECUTE REMOVEDIR Contents/Resources/8/88/
-EXECUTE REMOVEFILE Contents/Resources/8/87/870/87xtext0
-EXECUTE REMOVEFILE Contents/Resources/8/87/870/87xtext1
-EXECUTE REMOVEDIR Contents/Resources/8/87/870/
-EXECUTE REMOVEFILE Contents/Resources/8/87/871/87xtext0
-EXECUTE REMOVEFILE Contents/Resources/8/87/871/87xtext1
-EXECUTE REMOVEDIR Contents/Resources/8/87/871/
-EXECUTE REMOVEDIR Contents/Resources/8/87/
-EXECUTE REMOVEFILE Contents/Resources/8/86/86text0
-EXECUTE REMOVEFILE Contents/Resources/8/86/86text1
-EXECUTE REMOVEDIR Contents/Resources/8/86/
-EXECUTE REMOVEDIR Contents/Resources/8/85/
-EXECUTE REMOVEDIR Contents/Resources/8/85/
-EXECUTE REMOVEDIR Contents/Resources/8/84/
-EXECUTE REMOVEDIR Contents/Resources/8/84/
-EXECUTE REMOVEDIR Contents/Resources/8/83/
-EXECUTE REMOVEDIR Contents/Resources/8/82/
-EXECUTE REMOVEDIR Contents/Resources/8/81/
-EXECUTE REMOVEDIR Contents/Resources/8/80/
-EXECUTE REMOVEDIR Contents/Resources/8/80/
-EXECUTE REMOVEFILE Contents/Resources/7/70/7xtest.exe
-EXECUTE REMOVEFILE Contents/Resources/7/70/7xtext0
-EXECUTE REMOVEFILE Contents/Resources/7/70/7xtext1
-EXECUTE REMOVEDIR Contents/Resources/7/70/
-EXECUTE REMOVEFILE Contents/Resources/7/71/7xtest.exe
-EXECUTE REMOVEFILE Contents/Resources/7/71/7xtext0
-EXECUTE REMOVEFILE Contents/Resources/7/71/7xtext1
-EXECUTE REMOVEDIR Contents/Resources/7/71/
-EXECUTE REMOVEFILE Contents/Resources/7/7text0
-EXECUTE REMOVEFILE Contents/Resources/7/7text1
-EXECUTE REMOVEDIR Contents/Resources/7/
-EXECUTE REMOVEDIR Contents/Resources/6/
-EXECUTE REMOVEFILE Contents/Resources/5/5text1
-EXECUTE REMOVEFILE Contents/Resources/5/5text0
-EXECUTE REMOVEFILE Contents/Resources/5/5test.exe
-EXECUTE REMOVEFILE Contents/Resources/5/5text0
-file cannot be removed because it does not exist; skipping
-EXECUTE REMOVEFILE Contents/Resources/5/5text1
-file cannot be removed because it does not exist; skipping
-EXECUTE REMOVEDIR Contents/Resources/5/
-EXECUTE REMOVEFILE Contents/Resources/4/4text1
-EXECUTE REMOVEFILE Contents/Resources/4/4text0
-EXECUTE REMOVEDIR Contents/Resources/4/
-EXECUTE REMOVEFILE Contents/Resources/3/3text1
-EXECUTE REMOVEFILE Contents/Resources/3/3text0
-EXECUTE REMOVEDIR Contents/Resources/1/10/
-EXECUTE REMOVEDIR Contents/Resources/1/
-FINISH ADD Contents/Resources/searchplugins/searchpluginstext0
-FINISH PATCH Contents/Resources/searchplugins/searchpluginspng1.png
-FINISH PATCH Contents/Resources/searchplugins/searchpluginspng0.png
-FINISH ADD Contents/Resources/precomplete
-FINISH ADD Contents/Resources/distribution/extensions/extensions1/extensions1text0
-FINISH PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png1.png
-FINISH PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png0.png
-FINISH ADD Contents/Resources/distribution/extensions/extensions0/extensions0text0
-FINISH PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png1.png
-FINISH PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png0.png
-FINISH PATCH Contents/Resources/0/0exe0.exe
-FINISH ADD Contents/Resources/0/00/00text0
-FINISH PATCH Contents/Resources/0/00/00png0.png
-FINISH PATCH Contents/MacOS/exe0.exe
-FINISH ADD Contents/Resources/2/20/20text0
-FINISH ADD Contents/Resources/2/20/20png0.png
-FINISH ADD Contents/Resources/0/00/00text2
-FINISH REMOVEFILE Contents/Resources/1/10/10text0
-FINISH REMOVEFILE Contents/Resources/0/00/00text1
-FINISH REMOVEDIR Contents/Resources/9/99/
-FINISH REMOVEDIR Contents/Resources/9/99/
-directory no longer exists; skipping
-FINISH REMOVEDIR Contents/Resources/9/98/
-FINISH REMOVEFILE Contents/Resources/9/97/970/97xtext0
-FINISH REMOVEFILE Contents/Resources/9/97/970/97xtext1
-FINISH REMOVEDIR Contents/Resources/9/97/970/
-FINISH REMOVEFILE Contents/Resources/9/97/971/97xtext0
-FINISH REMOVEFILE Contents/Resources/9/97/971/97xtext1
-FINISH REMOVEDIR Contents/Resources/9/97/971/
-FINISH REMOVEDIR Contents/Resources/9/97/
-FINISH REMOVEFILE Contents/Resources/9/96/96text0
-FINISH REMOVEFILE Contents/Resources/9/96/96text1
-FINISH REMOVEDIR Contents/Resources/9/96/
-FINISH REMOVEDIR Contents/Resources/9/95/
-FINISH REMOVEDIR Contents/Resources/9/95/
-directory no longer exists; skipping
-FINISH REMOVEDIR Contents/Resources/9/94/
-FINISH REMOVEDIR Contents/Resources/9/94/
-directory no longer exists; skipping
-FINISH REMOVEDIR Contents/Resources/9/93/
-FINISH REMOVEDIR Contents/Resources/9/92/
-removing directory: Contents/Resources/9/92/, rv: 0
-FINISH REMOVEDIR Contents/Resources/9/91/
-removing directory: Contents/Resources/9/91/, rv: 0
-FINISH REMOVEDIR Contents/Resources/9/90/
-FINISH REMOVEDIR Contents/Resources/9/90/
-directory no longer exists; skipping
-FINISH REMOVEDIR Contents/Resources/8/89/
-FINISH REMOVEDIR Contents/Resources/8/89/
-directory no longer exists; skipping
-FINISH REMOVEDIR Contents/Resources/8/88/
-FINISH REMOVEFILE Contents/Resources/8/87/870/87xtext0
-FINISH REMOVEFILE Contents/Resources/8/87/870/87xtext1
-FINISH REMOVEDIR Contents/Resources/8/87/870/
-FINISH REMOVEFILE Contents/Resources/8/87/871/87xtext0
-FINISH REMOVEFILE Contents/Resources/8/87/871/87xtext1
-FINISH REMOVEDIR Contents/Resources/8/87/871/
-FINISH REMOVEDIR Contents/Resources/8/87/
-FINISH REMOVEFILE Contents/Resources/8/86/86text0
-FINISH REMOVEFILE Contents/Resources/8/86/86text1
-FINISH REMOVEDIR Contents/Resources/8/86/
-FINISH REMOVEDIR Contents/Resources/8/85/
-FINISH REMOVEDIR Contents/Resources/8/85/
-directory no longer exists; skipping
-FINISH REMOVEDIR Contents/Resources/8/84/
-FINISH REMOVEDIR Contents/Resources/8/84/
-directory no longer exists; skipping
-FINISH REMOVEDIR Contents/Resources/8/83/
-FINISH REMOVEDIR Contents/Resources/8/82/
-removing directory: Contents/Resources/8/82/, rv: 0
-FINISH REMOVEDIR Contents/Resources/8/81/
-removing directory: Contents/Resources/8/81/, rv: 0
-FINISH REMOVEDIR Contents/Resources/8/80/
-FINISH REMOVEDIR Contents/Resources/8/80/
-directory no longer exists; skipping
-FINISH REMOVEFILE Contents/Resources/7/70/7xtest.exe
-FINISH REMOVEFILE Contents/Resources/7/70/7xtext0
-FINISH REMOVEFILE Contents/Resources/7/70/7xtext1
-FINISH REMOVEDIR Contents/Resources/7/70/
-FINISH REMOVEFILE Contents/Resources/7/71/7xtest.exe
-FINISH REMOVEFILE Contents/Resources/7/71/7xtext0
-FINISH REMOVEFILE Contents/Resources/7/71/7xtext1
-FINISH REMOVEDIR Contents/Resources/7/71/
-FINISH REMOVEFILE Contents/Resources/7/7text0
-FINISH REMOVEFILE Contents/Resources/7/7text1
-FINISH REMOVEDIR Contents/Resources/7/
-FINISH REMOVEDIR Contents/Resources/6/
-FINISH REMOVEFILE Contents/Resources/5/5text1
-FINISH REMOVEFILE Contents/Resources/5/5text0
-FINISH REMOVEFILE Contents/Resources/5/5test.exe
-FINISH REMOVEDIR Contents/Resources/5/
-FINISH REMOVEFILE Contents/Resources/4/4text1
-FINISH REMOVEFILE Contents/Resources/4/4text0
-FINISH REMOVEDIR Contents/Resources/4/
-FINISH REMOVEFILE Contents/Resources/3/3text1
-FINISH REMOVEFILE Contents/Resources/3/3text0
-FINISH REMOVEDIR Contents/Resources/1/10/
-FINISH REMOVEDIR Contents/Resources/1/
-succeeded
-calling QuitProgressUI
diff --git a/toolkit/mozapps/update/tests/data/partial_log_success_win b/toolkit/mozapps/update/tests/data/partial_log_success_win
deleted file mode 100644
index 1f5c4b3b49..0000000000
--- a/toolkit/mozapps/update/tests/data/partial_log_success_win
+++ /dev/null
@@ -1,279 +0,0 @@
-UPDATE TYPE partial
-PREPARE ADD searchplugins/searchpluginstext0
-PREPARE PATCH searchplugins/searchpluginspng1.png
-PREPARE PATCH searchplugins/searchpluginspng0.png
-PREPARE ADD precomplete
-PREPARE PATCH exe0.exe
-PREPARE ADD distribution/extensions/extensions1/extensions1text0
-PREPARE PATCH distribution/extensions/extensions1/extensions1png1.png
-PREPARE PATCH distribution/extensions/extensions1/extensions1png0.png
-PREPARE ADD distribution/extensions/extensions0/extensions0text0
-PREPARE PATCH distribution/extensions/extensions0/extensions0png1.png
-PREPARE PATCH distribution/extensions/extensions0/extensions0png0.png
-PREPARE PATCH 0/0exe0.exe
-PREPARE ADD 0/00/00text0
-PREPARE PATCH 0/00/00png0.png
-PREPARE ADD 2/20/20text0
-PREPARE ADD 2/20/20png0.png
-PREPARE ADD 0/00/00text2
-PREPARE REMOVEFILE 1/10/10text0
-PREPARE REMOVEFILE 0/00/00text1
-PREPARE REMOVEDIR 9/99/
-PREPARE REMOVEDIR 9/99/
-PREPARE REMOVEDIR 9/98/
-PREPARE REMOVEFILE 9/97/970/97xtext0
-PREPARE REMOVEFILE 9/97/970/97xtext1
-PREPARE REMOVEDIR 9/97/970/
-PREPARE REMOVEFILE 9/97/971/97xtext0
-PREPARE REMOVEFILE 9/97/971/97xtext1
-PREPARE REMOVEDIR 9/97/971/
-PREPARE REMOVEDIR 9/97/
-PREPARE REMOVEFILE 9/96/96text0
-PREPARE REMOVEFILE 9/96/96text1
-PREPARE REMOVEDIR 9/96/
-PREPARE REMOVEDIR 9/95/
-PREPARE REMOVEDIR 9/95/
-PREPARE REMOVEDIR 9/94/
-PREPARE REMOVEDIR 9/94/
-PREPARE REMOVEDIR 9/93/
-PREPARE REMOVEDIR 9/92/
-PREPARE REMOVEDIR 9/91/
-PREPARE REMOVEDIR 9/90/
-PREPARE REMOVEDIR 9/90/
-PREPARE REMOVEDIR 8/89/
-PREPARE REMOVEDIR 8/89/
-PREPARE REMOVEDIR 8/88/
-PREPARE REMOVEFILE 8/87/870/87xtext0
-PREPARE REMOVEFILE 8/87/870/87xtext1
-PREPARE REMOVEDIR 8/87/870/
-PREPARE REMOVEFILE 8/87/871/87xtext0
-PREPARE REMOVEFILE 8/87/871/87xtext1
-PREPARE REMOVEDIR 8/87/871/
-PREPARE REMOVEDIR 8/87/
-PREPARE REMOVEFILE 8/86/86text0
-PREPARE REMOVEFILE 8/86/86text1
-PREPARE REMOVEDIR 8/86/
-PREPARE REMOVEDIR 8/85/
-PREPARE REMOVEDIR 8/85/
-PREPARE REMOVEDIR 8/84/
-PREPARE REMOVEDIR 8/84/
-PREPARE REMOVEDIR 8/83/
-PREPARE REMOVEDIR 8/82/
-PREPARE REMOVEDIR 8/81/
-PREPARE REMOVEDIR 8/80/
-PREPARE REMOVEDIR 8/80/
-PREPARE REMOVEFILE 7/70/7xtest.exe
-PREPARE REMOVEFILE 7/70/7xtext0
-PREPARE REMOVEFILE 7/70/7xtext1
-PREPARE REMOVEDIR 7/70/
-PREPARE REMOVEFILE 7/71/7xtest.exe
-PREPARE REMOVEFILE 7/71/7xtext0
-PREPARE REMOVEFILE 7/71/7xtext1
-PREPARE REMOVEDIR 7/71/
-PREPARE REMOVEFILE 7/7text0
-PREPARE REMOVEFILE 7/7text1
-PREPARE REMOVEDIR 7/
-PREPARE REMOVEDIR 6/
-PREPARE REMOVEFILE 5/5text1
-PREPARE REMOVEFILE 5/5text0
-PREPARE REMOVEFILE 5/5test.exe
-PREPARE REMOVEFILE 5/5text0
-PREPARE REMOVEFILE 5/5text1
-PREPARE REMOVEDIR 5/
-PREPARE REMOVEFILE 4/4text1
-PREPARE REMOVEFILE 4/4text0
-PREPARE REMOVEDIR 4/
-PREPARE REMOVEFILE 3/3text1
-PREPARE REMOVEFILE 3/3text0
-PREPARE REMOVEDIR 1/10/
-PREPARE REMOVEDIR 1/
-EXECUTE ADD searchplugins/searchpluginstext0
-EXECUTE PATCH searchplugins/searchpluginspng1.png
-EXECUTE PATCH searchplugins/searchpluginspng0.png
-EXECUTE ADD precomplete
-EXECUTE PATCH exe0.exe
-EXECUTE ADD distribution/extensions/extensions1/extensions1text0
-EXECUTE PATCH distribution/extensions/extensions1/extensions1png1.png
-EXECUTE PATCH distribution/extensions/extensions1/extensions1png0.png
-EXECUTE ADD distribution/extensions/extensions0/extensions0text0
-EXECUTE PATCH distribution/extensions/extensions0/extensions0png1.png
-EXECUTE PATCH distribution/extensions/extensions0/extensions0png0.png
-EXECUTE PATCH 0/0exe0.exe
-EXECUTE ADD 0/00/00text0
-EXECUTE PATCH 0/00/00png0.png
-EXECUTE ADD 2/20/20text0
-EXECUTE ADD 2/20/20png0.png
-EXECUTE ADD 0/00/00text2
-EXECUTE REMOVEFILE 1/10/10text0
-EXECUTE REMOVEFILE 0/00/00text1
-EXECUTE REMOVEDIR 9/99/
-EXECUTE REMOVEDIR 9/99/
-EXECUTE REMOVEDIR 9/98/
-EXECUTE REMOVEFILE 9/97/970/97xtext0
-EXECUTE REMOVEFILE 9/97/970/97xtext1
-EXECUTE REMOVEDIR 9/97/970/
-EXECUTE REMOVEFILE 9/97/971/97xtext0
-EXECUTE REMOVEFILE 9/97/971/97xtext1
-EXECUTE REMOVEDIR 9/97/971/
-EXECUTE REMOVEDIR 9/97/
-EXECUTE REMOVEFILE 9/96/96text0
-EXECUTE REMOVEFILE 9/96/96text1
-EXECUTE REMOVEDIR 9/96/
-EXECUTE REMOVEDIR 9/95/
-EXECUTE REMOVEDIR 9/95/
-EXECUTE REMOVEDIR 9/94/
-EXECUTE REMOVEDIR 9/94/
-EXECUTE REMOVEDIR 9/93/
-EXECUTE REMOVEDIR 9/92/
-EXECUTE REMOVEDIR 9/91/
-EXECUTE REMOVEDIR 9/90/
-EXECUTE REMOVEDIR 9/90/
-EXECUTE REMOVEDIR 8/89/
-EXECUTE REMOVEDIR 8/89/
-EXECUTE REMOVEDIR 8/88/
-EXECUTE REMOVEFILE 8/87/870/87xtext0
-EXECUTE REMOVEFILE 8/87/870/87xtext1
-EXECUTE REMOVEDIR 8/87/870/
-EXECUTE REMOVEFILE 8/87/871/87xtext0
-EXECUTE REMOVEFILE 8/87/871/87xtext1
-EXECUTE REMOVEDIR 8/87/871/
-EXECUTE REMOVEDIR 8/87/
-EXECUTE REMOVEFILE 8/86/86text0
-EXECUTE REMOVEFILE 8/86/86text1
-EXECUTE REMOVEDIR 8/86/
-EXECUTE REMOVEDIR 8/85/
-EXECUTE REMOVEDIR 8/85/
-EXECUTE REMOVEDIR 8/84/
-EXECUTE REMOVEDIR 8/84/
-EXECUTE REMOVEDIR 8/83/
-EXECUTE REMOVEDIR 8/82/
-EXECUTE REMOVEDIR 8/81/
-EXECUTE REMOVEDIR 8/80/
-EXECUTE REMOVEDIR 8/80/
-EXECUTE REMOVEFILE 7/70/7xtest.exe
-EXECUTE REMOVEFILE 7/70/7xtext0
-EXECUTE REMOVEFILE 7/70/7xtext1
-EXECUTE REMOVEDIR 7/70/
-EXECUTE REMOVEFILE 7/71/7xtest.exe
-EXECUTE REMOVEFILE 7/71/7xtext0
-EXECUTE REMOVEFILE 7/71/7xtext1
-EXECUTE REMOVEDIR 7/71/
-EXECUTE REMOVEFILE 7/7text0
-EXECUTE REMOVEFILE 7/7text1
-EXECUTE REMOVEDIR 7/
-EXECUTE REMOVEDIR 6/
-EXECUTE REMOVEFILE 5/5text1
-EXECUTE REMOVEFILE 5/5text0
-EXECUTE REMOVEFILE 5/5test.exe
-EXECUTE REMOVEFILE 5/5text0
-file cannot be removed because it does not exist; skipping
-EXECUTE REMOVEFILE 5/5text1
-file cannot be removed because it does not exist; skipping
-EXECUTE REMOVEDIR 5/
-EXECUTE REMOVEFILE 4/4text1
-EXECUTE REMOVEFILE 4/4text0
-EXECUTE REMOVEDIR 4/
-EXECUTE REMOVEFILE 3/3text1
-EXECUTE REMOVEFILE 3/3text0
-EXECUTE REMOVEDIR 1/10/
-EXECUTE REMOVEDIR 1/
-FINISH ADD searchplugins/searchpluginstext0
-FINISH PATCH searchplugins/searchpluginspng1.png
-FINISH PATCH searchplugins/searchpluginspng0.png
-FINISH ADD precomplete
-FINISH PATCH exe0.exe
-FINISH ADD distribution/extensions/extensions1/extensions1text0
-FINISH PATCH distribution/extensions/extensions1/extensions1png1.png
-FINISH PATCH distribution/extensions/extensions1/extensions1png0.png
-FINISH ADD distribution/extensions/extensions0/extensions0text0
-FINISH PATCH distribution/extensions/extensions0/extensions0png1.png
-FINISH PATCH distribution/extensions/extensions0/extensions0png0.png
-FINISH PATCH 0/0exe0.exe
-FINISH ADD 0/00/00text0
-FINISH PATCH 0/00/00png0.png
-FINISH ADD 2/20/20text0
-FINISH ADD 2/20/20png0.png
-FINISH ADD 0/00/00text2
-FINISH REMOVEFILE 1/10/10text0
-FINISH REMOVEFILE 0/00/00text1
-FINISH REMOVEDIR 9/99/
-FINISH REMOVEDIR 9/99/
-directory no longer exists; skipping
-FINISH REMOVEDIR 9/98/
-FINISH REMOVEFILE 9/97/970/97xtext0
-FINISH REMOVEFILE 9/97/970/97xtext1
-FINISH REMOVEDIR 9/97/970/
-FINISH REMOVEFILE 9/97/971/97xtext0
-FINISH REMOVEFILE 9/97/971/97xtext1
-FINISH REMOVEDIR 9/97/971/
-FINISH REMOVEDIR 9/97/
-FINISH REMOVEFILE 9/96/96text0
-FINISH REMOVEFILE 9/96/96text1
-FINISH REMOVEDIR 9/96/
-FINISH REMOVEDIR 9/95/
-FINISH REMOVEDIR 9/95/
-directory no longer exists; skipping
-FINISH REMOVEDIR 9/94/
-FINISH REMOVEDIR 9/94/
-directory no longer exists; skipping
-FINISH REMOVEDIR 9/93/
-FINISH REMOVEDIR 9/92/
-removing directory: 9/92/, rv: 0
-FINISH REMOVEDIR 9/91/
-removing directory: 9/91/, rv: 0
-FINISH REMOVEDIR 9/90/
-FINISH REMOVEDIR 9/90/
-directory no longer exists; skipping
-FINISH REMOVEDIR 8/89/
-FINISH REMOVEDIR 8/89/
-directory no longer exists; skipping
-FINISH REMOVEDIR 8/88/
-FINISH REMOVEFILE 8/87/870/87xtext0
-FINISH REMOVEFILE 8/87/870/87xtext1
-FINISH REMOVEDIR 8/87/870/
-FINISH REMOVEFILE 8/87/871/87xtext0
-FINISH REMOVEFILE 8/87/871/87xtext1
-FINISH REMOVEDIR 8/87/871/
-FINISH REMOVEDIR 8/87/
-FINISH REMOVEFILE 8/86/86text0
-FINISH REMOVEFILE 8/86/86text1
-FINISH REMOVEDIR 8/86/
-FINISH REMOVEDIR 8/85/
-FINISH REMOVEDIR 8/85/
-directory no longer exists; skipping
-FINISH REMOVEDIR 8/84/
-FINISH REMOVEDIR 8/84/
-directory no longer exists; skipping
-FINISH REMOVEDIR 8/83/
-FINISH REMOVEDIR 8/82/
-removing directory: 8/82/, rv: 0
-FINISH REMOVEDIR 8/81/
-removing directory: 8/81/, rv: 0
-FINISH REMOVEDIR 8/80/
-FINISH REMOVEDIR 8/80/
-directory no longer exists; skipping
-FINISH REMOVEFILE 7/70/7xtest.exe
-FINISH REMOVEFILE 7/70/7xtext0
-FINISH REMOVEFILE 7/70/7xtext1
-FINISH REMOVEDIR 7/70/
-FINISH REMOVEFILE 7/71/7xtest.exe
-FINISH REMOVEFILE 7/71/7xtext0
-FINISH REMOVEFILE 7/71/7xtext1
-FINISH REMOVEDIR 7/71/
-FINISH REMOVEFILE 7/7text0
-FINISH REMOVEFILE 7/7text1
-FINISH REMOVEDIR 7/
-FINISH REMOVEDIR 6/
-FINISH REMOVEFILE 5/5text1
-FINISH REMOVEFILE 5/5text0
-FINISH REMOVEFILE 5/5test.exe
-FINISH REMOVEDIR 5/
-FINISH REMOVEFILE 4/4text1
-FINISH REMOVEFILE 4/4text0
-FINISH REMOVEDIR 4/
-FINISH REMOVEFILE 3/3text1
-FINISH REMOVEFILE 3/3text0
-FINISH REMOVEDIR 1/10/
-FINISH REMOVEDIR 1/
-succeeded
-calling QuitProgressUI
diff --git a/toolkit/mozapps/update/tests/data/partial_mac.mar b/toolkit/mozapps/update/tests/data/partial_mac.mar
deleted file mode 100644
index 5a702ed4af..0000000000
--- a/toolkit/mozapps/update/tests/data/partial_mac.mar
+++ /dev/null
Binary files differ
diff --git a/toolkit/mozapps/update/tests/data/partial_precomplete b/toolkit/mozapps/update/tests/data/partial_precomplete
deleted file mode 100644
index 3ec201463a..0000000000
--- a/toolkit/mozapps/update/tests/data/partial_precomplete
+++ /dev/null
@@ -1,19 +0,0 @@
-remove "searchplugins/searchpluginstext0"
-remove "searchplugins/searchpluginspng1.png"
-remove "searchplugins/searchpluginspng0.png"
-remove "removed-files"
-remove "precomplete"
-remove "exe0.exe"
-remove "2/20/20text0"
-remove "2/20/20png0.png"
-remove "0/0exe0.exe"
-remove "0/00/00text2"
-remove "0/00/00text0"
-remove "0/00/00png0.png"
-rmdir "searchplugins/"
-rmdir "defaults/pref/"
-rmdir "defaults/"
-rmdir "2/20/"
-rmdir "2/"
-rmdir "0/00/"
-rmdir "0/"
diff --git a/toolkit/mozapps/update/tests/data/partial_precomplete_mac b/toolkit/mozapps/update/tests/data/partial_precomplete_mac
deleted file mode 100644
index c65b6e4e38..0000000000
--- a/toolkit/mozapps/update/tests/data/partial_precomplete_mac
+++ /dev/null
@@ -1,22 +0,0 @@
-remove "Contents/Resources/searchplugins/searchpluginstext0"
-remove "Contents/Resources/searchplugins/searchpluginspng1.png"
-remove "Contents/Resources/searchplugins/searchpluginspng0.png"
-remove "Contents/Resources/removed-files"
-remove "Contents/Resources/precomplete"
-remove "Contents/Resources/2/20/20text0"
-remove "Contents/Resources/2/20/20png0.png"
-remove "Contents/Resources/0/0exe0.exe"
-remove "Contents/Resources/0/00/00text2"
-remove "Contents/Resources/0/00/00text0"
-remove "Contents/Resources/0/00/00png0.png"
-remove "Contents/MacOS/exe0.exe"
-rmdir "Contents/Resources/searchplugins/"
-rmdir "Contents/Resources/defaults/pref/"
-rmdir "Contents/Resources/defaults/"
-rmdir "Contents/Resources/2/20/"
-rmdir "Contents/Resources/2/"
-rmdir "Contents/Resources/0/00/"
-rmdir "Contents/Resources/0/"
-rmdir "Contents/Resources/"
-rmdir "Contents/MacOS/"
-rmdir "Contents/"
diff --git a/toolkit/mozapps/update/tests/data/partial_removed-files b/toolkit/mozapps/update/tests/data/partial_removed-files
deleted file mode 100644
index 881311b82c..0000000000
--- a/toolkit/mozapps/update/tests/data/partial_removed-files
+++ /dev/null
@@ -1,41 +0,0 @@
-a/b/text0
-a/b/text1
-a/b/3/3text0
-a/b/3/3text1
-a/b/4/4exe0.exe
-a/b/4/4text0
-a/b/4/4text1
-a/b/4/
-a/b/5/5text0
-a/b/5/5text1
-a/b/5/*
-a/b/6/
-a/b/7/*
-a/b/8/80/
-a/b/8/81/
-a/b/8/82/
-a/b/8/83/
-a/b/8/84/
-a/b/8/85/*
-a/b/8/86/*
-a/b/8/87/*
-a/b/8/88/*
-a/b/8/89/*
-a/b/8/80/
-a/b/8/84/*
-a/b/8/85/*
-a/b/8/89/
-a/b/9/90/
-a/b/9/91/
-a/b/9/92/
-a/b/9/93/
-a/b/9/94/
-a/b/9/95/*
-a/b/9/96/*
-a/b/9/97/*
-a/b/9/98/*
-a/b/9/99/*
-a/b/9/90/
-a/b/9/94/*
-a/b/9/95/*
-a/b/9/99/
diff --git a/toolkit/mozapps/update/tests/data/partial_removed-files_mac b/toolkit/mozapps/update/tests/data/partial_removed-files_mac
deleted file mode 100644
index 955dc5b340..0000000000
--- a/toolkit/mozapps/update/tests/data/partial_removed-files_mac
+++ /dev/null
@@ -1,41 +0,0 @@
-Contents/Resources/text0
-Contents/Resources/text1
-Contents/Resources/3/3text0
-Contents/Resources/3/3text1
-Contents/Resources/4/exe0.exe
-Contents/Resources/4/4text0
-Contents/Resources/4/4text1
-Contents/Resources/4/
-Contents/Resources/5/5text0
-Contents/Resources/5/5text1
-Contents/Resources/5/*
-Contents/Resources/6/
-Contents/Resources/7/*
-Contents/Resources/8/80/
-Contents/Resources/8/81/
-Contents/Resources/8/82/
-Contents/Resources/8/83/
-Contents/Resources/8/84/
-Contents/Resources/8/85/*
-Contents/Resources/8/86/*
-Contents/Resources/8/87/*
-Contents/Resources/8/88/*
-Contents/Resources/8/89/*
-Contents/Resources/8/80/
-Contents/Resources/8/84/*
-Contents/Resources/8/85/*
-Contents/Resources/8/89/
-Contents/Resources/9/90/
-Contents/Resources/9/91/
-Contents/Resources/9/92/
-Contents/Resources/9/93/
-Contents/Resources/9/94/
-Contents/Resources/9/95/*
-Contents/Resources/9/96/*
-Contents/Resources/9/97/*
-Contents/Resources/9/98/*
-Contents/Resources/9/99/*
-Contents/Resources/9/90/
-Contents/Resources/9/94/*
-Contents/Resources/9/95/*
-Contents/Resources/9/99/
diff --git a/toolkit/mozapps/update/tests/data/partial_update_manifest b/toolkit/mozapps/update/tests/data/partial_update_manifest
deleted file mode 100644
index 8d4e60ed25..0000000000
--- a/toolkit/mozapps/update/tests/data/partial_update_manifest
+++ /dev/null
@@ -1,63 +0,0 @@
-type "partial"
-add "precomplete"
-add "a/b/searchplugins/searchpluginstext0"
-patch-if "a/b/searchplugins/searchpluginspng1.png" "a/b/searchplugins/searchpluginspng1.png.patch" "a/b/searchplugins/searchpluginspng1.png"
-patch-if "a/b/searchplugins/searchpluginspng0.png" "a/b/searchplugins/searchpluginspng0.png.patch" "a/b/searchplugins/searchpluginspng0.png"
-add-if "a/b/extensions/extensions1" "a/b/extensions/extensions1/extensions1text0"
-patch-if "a/b/extensions/extensions1" "a/b/extensions/extensions1/extensions1png1.png.patch" "a/b/extensions/extensions1/extensions1png1.png"
-patch-if "a/b/extensions/extensions1" "a/b/extensions/extensions1/extensions1png0.png.patch" "a/b/extensions/extensions1/extensions1png0.png"
-add-if "a/b/extensions/extensions0" "a/b/extensions/extensions0/extensions0text0"
-patch-if "a/b/extensions/extensions0" "a/b/extensions/extensions0/extensions0png1.png.patch" "a/b/extensions/extensions0/extensions0png1.png"
-patch-if "a/b/extensions/extensions0" "a/b/extensions/extensions0/extensions0png0.png.patch" "a/b/extensions/extensions0/extensions0png0.png"
-patch "a/b/exe0.exe.patch" "a/b/exe0.exe"
-patch "a/b/0/0exe0.exe.patch" "a/b/0/0exe0.exe"
-add "a/b/0/00/00text0"
-patch "a/b/0/00/00png0.png.patch" "a/b/0/00/00png0.png"
-add "a/b/2/20/20text0"
-add "a/b/2/20/20png0.png"
-add "a/b/0/00/00text2"
-remove "a/b/1/10/10text0"
-remove "a/b/0/00/00text1"
-remove "a/b/text1"
-remove "a/b/text0"
-rmrfdir "a/b/9/99/"
-rmdir "a/b/9/99/"
-rmrfdir "a/b/9/98/"
-rmrfdir "a/b/9/97/"
-rmrfdir "a/b/9/96/"
-rmrfdir "a/b/9/95/"
-rmrfdir "a/b/9/95/"
-rmrfdir "a/b/9/94/"
-rmdir "a/b/9/94/"
-rmdir "a/b/9/93/"
-rmdir "a/b/9/92/"
-rmdir "a/b/9/91/"
-rmdir "a/b/9/90/"
-rmdir "a/b/9/90/"
-rmrfdir "a/b/8/89/"
-rmdir "a/b/8/89/"
-rmrfdir "a/b/8/88/"
-rmrfdir "a/b/8/87/"
-rmrfdir "a/b/8/86/"
-rmrfdir "a/b/8/85/"
-rmrfdir "a/b/8/85/"
-rmrfdir "a/b/8/84/"
-rmdir "a/b/8/84/"
-rmdir "a/b/8/83/"
-rmdir "a/b/8/82/"
-rmdir "a/b/8/81/"
-rmdir "a/b/8/80/"
-rmdir "a/b/8/80/"
-rmrfdir "a/b/7/"
-rmdir "a/b/6/"
-remove "a/b/5/5text1"
-remove "a/b/5/5text0"
-rmrfdir "a/b/5/"
-remove "a/b/4/4text1"
-remove "a/b/4/4text0"
-remove "a/b/4/4exe0.exe"
-rmdir "a/b/4/"
-remove "a/b/3/3text1"
-remove "a/b/3/3text0"
-rmdir "a/b/1/10/"
-rmdir "a/b/1/"
diff --git a/toolkit/mozapps/update/tests/data/replace_log_success b/toolkit/mozapps/update/tests/data/replace_log_success
deleted file mode 100644
index 323f1db41e..0000000000
--- a/toolkit/mozapps/update/tests/data/replace_log_success
+++ /dev/null
@@ -1,6 +0,0 @@
-Performing a replace request
-rename_file: proceeding to rename the directory
-rename_file: proceeding to rename the directory
-Now, remove the tmpDir
-succeeded
-calling QuitProgressUI
diff --git a/toolkit/mozapps/update/tests/data/shared.js b/toolkit/mozapps/update/tests/data/shared.js
deleted file mode 100644
index e9a10da068..0000000000
--- a/toolkit/mozapps/update/tests/data/shared.js
+++ /dev/null
@@ -1,632 +0,0 @@
-/* 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/. */
-
-/* Shared code for xpcshell and mochitests-chrome */
-/* eslint-disable no-undef */
-
-Cu.import("resource://gre/modules/FileUtils.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-const PREF_APP_UPDATE_AUTO = "app.update.auto";
-const PREF_APP_UPDATE_BACKGROUNDERRORS = "app.update.backgroundErrors";
-const PREF_APP_UPDATE_BACKGROUNDMAXERRORS = "app.update.backgroundMaxErrors";
-const PREF_APP_UPDATE_CHANNEL = "app.update.channel";
-const PREF_APP_UPDATE_DOWNLOADBACKGROUNDINTERVAL = "app.update.download.backgroundInterval";
-const PREF_APP_UPDATE_ENABLED = "app.update.enabled";
-const PREF_APP_UPDATE_IDLETIME = "app.update.idletime";
-const PREF_APP_UPDATE_LOG = "app.update.log";
-const PREF_APP_UPDATE_NOTIFIEDUNSUPPORTED = "app.update.notifiedUnsupported";
-const PREF_APP_UPDATE_PROMPTWAITTIME = "app.update.promptWaitTime";
-const PREF_APP_UPDATE_RETRYTIMEOUT = "app.update.socket.retryTimeout";
-const PREF_APP_UPDATE_SERVICE_ENABLED = "app.update.service.enabled";
-const PREF_APP_UPDATE_SILENT = "app.update.silent";
-const PREF_APP_UPDATE_SOCKET_MAXERRORS = "app.update.socket.maxErrors";
-const PREF_APP_UPDATE_STAGING_ENABLED = "app.update.staging.enabled";
-const PREF_APP_UPDATE_URL = "app.update.url";
-const PREF_APP_UPDATE_URL_DETAILS = "app.update.url.details";
-
-const PREFBRANCH_APP_UPDATE_NEVER = "app.update.never.";
-
-const PREFBRANCH_APP_PARTNER = "app.partner.";
-const PREF_DISTRIBUTION_ID = "distribution.id";
-const PREF_DISTRIBUTION_VERSION = "distribution.version";
-const PREF_TOOLKIT_TELEMETRY_ENABLED = "toolkit.telemetry.enabled";
-
-const NS_APP_PROFILE_DIR_STARTUP = "ProfDS";
-const NS_APP_USER_PROFILE_50_DIR = "ProfD";
-const NS_GRE_DIR = "GreD";
-const NS_GRE_BIN_DIR = "GreBinD";
-const NS_XPCOM_CURRENT_PROCESS_DIR = "XCurProcD";
-const XRE_EXECUTABLE_FILE = "XREExeF";
-const XRE_UPDATE_ROOT_DIR = "UpdRootD";
-
-const DIR_PATCH = "0";
-const DIR_TOBEDELETED = "tobedeleted";
-const DIR_UPDATES = "updates";
-const DIR_UPDATED = IS_MACOSX ? "Updated.app" : "updated";
-
-const FILE_ACTIVE_UPDATE_XML = "active-update.xml";
-const FILE_APPLICATION_INI = "application.ini";
-const FILE_BACKUP_UPDATE_LOG = "backup-update.log";
-const FILE_LAST_UPDATE_LOG = "last-update.log";
-const FILE_UPDATE_SETTINGS_INI = "update-settings.ini";
-const FILE_UPDATE_SETTINGS_INI_BAK = "update-settings.ini.bak";
-const FILE_UPDATER_INI = "updater.ini";
-const FILE_UPDATES_XML = "updates.xml";
-const FILE_UPDATE_LOG = "update.log";
-const FILE_UPDATE_MAR = "update.mar";
-const FILE_UPDATE_STATUS = "update.status";
-const FILE_UPDATE_TEST = "update.test";
-const FILE_UPDATE_VERSION = "update.version";
-
-const UPDATE_SETTINGS_CONTENTS = "[Settings]\n" +
- "ACCEPTED_MAR_CHANNEL_IDS=xpcshell-test\n";
-
-const PR_RDWR = 0x04;
-const PR_CREATE_FILE = 0x08;
-const PR_TRUNCATE = 0x20;
-
-const DEFAULT_UPDATE_VERSION = "999999.0";
-
-var gChannel;
-
-/* import-globals-from ../data/sharedUpdateXML.js */
-Services.scriptloader.loadSubScript(DATA_URI_SPEC + "sharedUpdateXML.js", this);
-
-const PERMS_FILE = FileUtils.PERMS_FILE;
-const PERMS_DIRECTORY = FileUtils.PERMS_DIRECTORY;
-
-const MODE_WRONLY = FileUtils.MODE_WRONLY;
-const MODE_CREATE = FileUtils.MODE_CREATE;
-const MODE_APPEND = FileUtils.MODE_APPEND;
-const MODE_TRUNCATE = FileUtils.MODE_TRUNCATE;
-
-const URI_UPDATES_PROPERTIES = "chrome://mozapps/locale/update/updates.properties";
-const gUpdateBundle = Services.strings.createBundle(URI_UPDATES_PROPERTIES);
-
-XPCOMUtils.defineLazyGetter(this, "gAUS", function test_gAUS() {
- return Cc["@mozilla.org/updates/update-service;1"].
- getService(Ci.nsIApplicationUpdateService).
- QueryInterface(Ci.nsITimerCallback).
- QueryInterface(Ci.nsIObserver).
- QueryInterface(Ci.nsIUpdateCheckListener);
-});
-
-XPCOMUtils.defineLazyServiceGetter(this, "gUpdateManager",
- "@mozilla.org/updates/update-manager;1",
- "nsIUpdateManager");
-
-XPCOMUtils.defineLazyGetter(this, "gUpdateChecker", function test_gUC() {
- return Cc["@mozilla.org/updates/update-checker;1"].
- createInstance(Ci.nsIUpdateChecker);
-});
-
-XPCOMUtils.defineLazyGetter(this, "gUP", function test_gUP() {
- return Cc["@mozilla.org/updates/update-prompt;1"].
- createInstance(Ci.nsIUpdatePrompt);
-});
-
-XPCOMUtils.defineLazyGetter(this, "gDefaultPrefBranch", function test_gDPB() {
- return Services.prefs.getDefaultBranch(null);
-});
-
-XPCOMUtils.defineLazyGetter(this, "gPrefRoot", function test_gPR() {
- return Services.prefs.getBranch(null);
-});
-
-XPCOMUtils.defineLazyServiceGetter(this, "gEnv",
- "@mozilla.org/process/environment;1",
- "nsIEnvironment");
-
-XPCOMUtils.defineLazyGetter(this, "gZipW", function test_gZipW() {
- return Cc["@mozilla.org/zipwriter;1"].
- createInstance(Ci.nsIZipWriter);
-});
-
-/* Triggers post-update processing */
-function testPostUpdateProcessing() {
- gAUS.observe(null, "test-post-update-processing", "");
-}
-
-/* Initializes the update service stub */
-function initUpdateServiceStub() {
- Cc["@mozilla.org/updates/update-service-stub;1"].
- createInstance(Ci.nsISupports);
-}
-
-/* Reloads the update metadata from disk */
-function reloadUpdateManagerData() {
- gUpdateManager.QueryInterface(Ci.nsIObserver).
- observe(null, "um-reload-update-data", "");
-}
-
-const observer = {
- observe: function(aSubject, aTopic, aData) {
- if (aTopic == "nsPref:changed" && aData == PREF_APP_UPDATE_CHANNEL) {
- let channel = gDefaultPrefBranch.getCharPref(PREF_APP_UPDATE_CHANNEL);
- if (channel != gChannel) {
- debugDump("Changing channel from " + channel + " to " + gChannel);
- gDefaultPrefBranch.setCharPref(PREF_APP_UPDATE_CHANNEL, gChannel);
- }
- }
- },
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver])
-};
-
-/**
- * Sets the app.update.channel preference.
- *
- * @param aChannel
- * The update channel.
- */
-function setUpdateChannel(aChannel) {
- gChannel = aChannel;
- debugDump("setting default pref " + PREF_APP_UPDATE_CHANNEL + " to " + gChannel);
- gDefaultPrefBranch.setCharPref(PREF_APP_UPDATE_CHANNEL, gChannel);
- gPrefRoot.addObserver(PREF_APP_UPDATE_CHANNEL, observer, false);
-}
-
-/**
- * Sets the app.update.url default preference.
- *
- * @param aURL
- * The update url. If not specified 'URL_HOST + "/update.xml"' will be
- * used.
- */
-function setUpdateURL(aURL) {
- let url = aURL ? aURL : URL_HOST + "/update.xml";
- debugDump("setting " + PREF_APP_UPDATE_URL + " to " + url);
- gDefaultPrefBranch.setCharPref(PREF_APP_UPDATE_URL, url);
-}
-
-/**
- * Returns either the active or regular update database XML file.
- *
- * @param isActiveUpdate
- * If true this will return the active-update.xml otherwise it will
- * return the updates.xml file.
- */
-function getUpdatesXMLFile(aIsActiveUpdate) {
- let file = getUpdatesRootDir();
- file.append(aIsActiveUpdate ? FILE_ACTIVE_UPDATE_XML : FILE_UPDATES_XML);
- return file;
-}
-
-/**
- * Writes the updates specified to either the active-update.xml or the
- * updates.xml.
- *
- * @param aContent
- * The updates represented as a string to write to the XML file.
- * @param isActiveUpdate
- * If true this will write to the active-update.xml otherwise it will
- * write to the updates.xml file.
- */
-function writeUpdatesToXMLFile(aContent, aIsActiveUpdate) {
- writeFile(getUpdatesXMLFile(aIsActiveUpdate), aContent);
-}
-
-/**
- * Writes the current update operation/state to a file in the patch
- * directory, indicating to the patching system that operations need
- * to be performed.
- *
- * @param aStatus
- * The status value to write.
- */
-function writeStatusFile(aStatus) {
- let file = getUpdatesPatchDir();
- file.append(FILE_UPDATE_STATUS);
- writeFile(file, aStatus + "\n");
-}
-
-/**
- * Writes the current update version to a file in the patch directory,
- * indicating to the patching system the version of the update.
- *
- * @param aVersion
- * The version value to write.
- */
-function writeVersionFile(aVersion) {
- let file = getUpdatesPatchDir();
- file.append(FILE_UPDATE_VERSION);
- writeFile(file, aVersion + "\n");
-}
-
-/**
- * Gets the root directory for the updates directory.
- *
- * @return nsIFile for the updates root directory.
- */
-function getUpdatesRootDir() {
- return Services.dirsvc.get(XRE_UPDATE_ROOT_DIR, Ci.nsIFile);
-}
-
-/**
- * Gets the updates directory.
- *
- * @return nsIFile for the updates directory.
- */
-function getUpdatesDir() {
- let dir = getUpdatesRootDir();
- dir.append(DIR_UPDATES);
- return dir;
-}
-
-/**
- * Gets the directory for update patches.
- *
- * @return nsIFile for the updates directory.
- */
-function getUpdatesPatchDir() {
- let dir = getUpdatesDir();
- dir.append(DIR_PATCH);
- return dir;
-}
-
-/**
- * Writes text to a file. This will replace existing text if the file exists
- * and create the file if it doesn't exist.
- *
- * @param aFile
- * The file to write to. Will be created if it doesn't exist.
- * @param aText
- * The text to write to the file. If there is existing text it will be
- * replaced.
- */
-function writeFile(aFile, aText) {
- let fos = Cc["@mozilla.org/network/file-output-stream;1"].
- createInstance(Ci.nsIFileOutputStream);
- if (!aFile.exists()) {
- aFile.create(Ci.nsILocalFile.NORMAL_FILE_TYPE, PERMS_FILE);
- }
- fos.init(aFile, MODE_WRONLY | MODE_CREATE | MODE_TRUNCATE, PERMS_FILE, 0);
- fos.write(aText, aText.length);
- fos.close();
-}
-
-/**
- * Reads the current update operation/state in the status file in the patch
- * directory including the error code if it is present.
- *
- * @return The status value.
- */
-function readStatusFile() {
- let file = getUpdatesPatchDir();
- file.append(FILE_UPDATE_STATUS);
-
- if (!file.exists()) {
- debugDump("update status file does not exists! Path: " + file.path);
- return STATE_NONE;
- }
-
- return readFile(file).split("\n")[0];
-}
-
-/**
- * Reads the current update operation/state in the status file in the patch
- * directory without the error code if it is present.
- *
- * @return The state value.
- */
-function readStatusState() {
- return readStatusFile().split(": ")[0];
-}
-
-/**
- * Reads the current update operation/state in the status file in the patch
- * directory with the error code.
- *
- * @return The state value.
- */
-function readStatusFailedCode() {
- return readStatusFile().split(": ")[1];
-}
-
-/**
- * Reads text from a file and returns the string.
- *
- * @param aFile
- * The file to read from.
- * @return The string of text read from the file.
- */
-function readFile(aFile) {
- let fis = Cc["@mozilla.org/network/file-input-stream;1"].
- createInstance(Ci.nsIFileInputStream);
- if (!aFile.exists()) {
- return null;
- }
- // Specifying -1 for ioFlags will open the file with the default of PR_RDONLY.
- // Specifying -1 for perm will open the file with the default of 0.
- fis.init(aFile, -1, -1, Ci.nsIFileInputStream.CLOSE_ON_EOF);
- let sis = Cc["@mozilla.org/scriptableinputstream;1"].
- createInstance(Ci.nsIScriptableInputStream);
- sis.init(fis);
- let text = sis.read(sis.available());
- sis.close();
- return text;
-}
-
-/**
- * Reads the binary contents of a file and returns it as a string.
- *
- * @param aFile
- * The file to read from.
- * @return The contents of the file as a string.
- */
-function readFileBytes(aFile) {
- debugDump("attempting to read file, path: " + aFile.path);
- let fis = Cc["@mozilla.org/network/file-input-stream;1"].
- createInstance(Ci.nsIFileInputStream);
- // Specifying -1 for ioFlags will open the file with the default of PR_RDONLY.
- // Specifying -1 for perm will open the file with the default of 0.
- fis.init(aFile, -1, -1, Ci.nsIFileInputStream.CLOSE_ON_EOF);
- let bis = Cc["@mozilla.org/binaryinputstream;1"].
- createInstance(Ci.nsIBinaryInputStream);
- bis.setInputStream(fis);
- let data = [];
- let count = fis.available();
- while (count > 0) {
- let bytes = bis.readByteArray(Math.min(65535, count));
- data.push(String.fromCharCode.apply(null, bytes));
- count -= bytes.length;
- if (bytes.length == 0) {
- throw "Nothing read from input stream!";
- }
- }
- data.join('');
- fis.close();
- return data.toString();
-}
-
-/* Returns human readable status text from the updates.properties bundle */
-function getStatusText(aErrCode) {
- return getString("check_error-" + aErrCode);
-}
-
-/* Returns a string from the updates.properties bundle */
-function getString(aName) {
- try {
- return gUpdateBundle.GetStringFromName(aName);
- } catch (e) {
- }
- return null;
-}
-
-/**
- * Gets the file extension for an nsIFile.
- *
- * @param aFile
- * The file to get the file extension for.
- * @return The file extension.
- */
-function getFileExtension(aFile) {
- return Services.io.newFileURI(aFile).QueryInterface(Ci.nsIURL).
- fileExtension;
-}
-
-/**
- * Removes the updates.xml file, active-update.xml file, and all files and
- * sub-directories in the updates directory except for the "0" sub-directory.
- * This prevents some tests from failing due to files being left behind when the
- * tests are interrupted.
- */
-function removeUpdateDirsAndFiles() {
- let file = getUpdatesXMLFile(true);
- try {
- if (file.exists()) {
- file.remove(false);
- }
- } catch (e) {
- logTestInfo("Unable to remove file. Path: " + file.path +
- ", Exception: " + e);
- }
-
- file = getUpdatesXMLFile(false);
- try {
- if (file.exists()) {
- file.remove(false);
- }
- } catch (e) {
- logTestInfo("Unable to remove file. Path: " + file.path +
- ", Exception: " + e);
- }
-
- // This fails sporadically on Mac OS X so wrap it in a try catch
- let updatesDir = getUpdatesDir();
- try {
- cleanUpdatesDir(updatesDir);
- } catch (e) {
- logTestInfo("Unable to remove files / directories from directory. Path: " +
- updatesDir.path + ", Exception: " + e);
- }
-}
-
-/**
- * Removes all files and sub-directories in the updates directory except for
- * the "0" sub-directory.
- *
- * @param aDir
- * nsIFile for the directory to be deleted.
- */
-function cleanUpdatesDir(aDir) {
- if (!aDir.exists()) {
- return;
- }
-
- let dirEntries = aDir.directoryEntries;
- while (dirEntries.hasMoreElements()) {
- let entry = dirEntries.getNext().QueryInterface(Ci.nsIFile);
-
- if (entry.isDirectory()) {
- if (entry.leafName == DIR_PATCH && entry.parent.leafName == DIR_UPDATES) {
- cleanUpdatesDir(entry);
- entry.permissions = PERMS_DIRECTORY;
- } else {
- try {
- entry.remove(true);
- return;
- } catch (e) {
- }
- cleanUpdatesDir(entry);
- entry.permissions = PERMS_DIRECTORY;
- try {
- entry.remove(true);
- } catch (e) {
- logTestInfo("cleanUpdatesDir: unable to remove directory. Path: " +
- entry.path + ", Exception: " + e);
- throw (e);
- }
- }
- } else {
- entry.permissions = PERMS_FILE;
- try {
- entry.remove(false);
- } catch (e) {
- logTestInfo("cleanUpdatesDir: unable to remove file. Path: " +
- entry.path + ", Exception: " + e);
- throw (e);
- }
- }
- }
-}
-
-/**
- * Deletes a directory and its children. First it tries nsIFile::Remove(true).
- * If that fails it will fall back to recursing, setting the appropriate
- * permissions, and deleting the current entry.
- *
- * @param aDir
- * nsIFile for the directory to be deleted.
- */
-function removeDirRecursive(aDir) {
- if (!aDir.exists()) {
- return;
- }
-
- try {
- debugDump("attempting to remove directory. Path: " + aDir.path);
- aDir.remove(true);
- return;
- } catch (e) {
- logTestInfo("non-fatal error removing directory. Exception: " + e);
- }
-
- let dirEntries = aDir.directoryEntries;
- while (dirEntries.hasMoreElements()) {
- let entry = dirEntries.getNext().QueryInterface(Ci.nsIFile);
-
- if (entry.isDirectory()) {
- removeDirRecursive(entry);
- } else {
- entry.permissions = PERMS_FILE;
- try {
- debugDump("attempting to remove file. Path: " + entry.path);
- entry.remove(false);
- } catch (e) {
- logTestInfo("error removing file. Exception: " + e);
- throw (e);
- }
- }
- }
-
- aDir.permissions = PERMS_DIRECTORY;
- try {
- debugDump("attempting to remove directory. Path: " + aDir.path);
- aDir.remove(true);
- } catch (e) {
- logTestInfo("error removing directory. Exception: " + e);
- throw (e);
- }
-}
-
-/**
- * Returns the directory for the currently running process. This is used to
- * clean up after the tests and to locate the active-update.xml and updates.xml
- * files.
- *
- * @return nsIFile for the current process directory.
- */
-function getCurrentProcessDir() {
- return Services.dirsvc.get(NS_XPCOM_CURRENT_PROCESS_DIR, Ci.nsIFile);
-}
-
-/**
- * Gets the application base directory.
- *
- * @return nsIFile object for the application base directory.
- */
-function getAppBaseDir() {
- return Services.dirsvc.get(XRE_EXECUTABLE_FILE, Ci.nsIFile).parent;
-}
-
-/**
- * Returns the Gecko Runtime Engine directory where files other than executable
- * binaries are located. On Mac OS X this will be <bundle>/Contents/Resources/
- * and the installation directory on all other platforms.
- *
- * @return nsIFile for the Gecko Runtime Engine directory.
- */
-function getGREDir() {
- return Services.dirsvc.get(NS_GRE_DIR, Ci.nsIFile);
-}
-
-/**
- * Returns the Gecko Runtime Engine Binary directory where the executable
- * binaries are located such as the updater binary (Windows and Linux) or
- * updater package (Mac OS X). On Mac OS X this will be
- * <bundle>/Contents/MacOS/ and the installation directory on all other
- * platforms.
- *
- * @return nsIFile for the Gecko Runtime Engine Binary directory.
- */
-function getGREBinDir() {
- return Services.dirsvc.get(NS_GRE_BIN_DIR, Ci.nsIFile);
-}
-
-/**
- * Logs TEST-INFO messages.
- *
- * @param aText
- * The text to log.
- * @param aCaller (optional)
- * An optional Components.stack.caller. If not specified
- * Components.stack.caller will be used.
- */
-function logTestInfo(aText, aCaller) {
- let caller = aCaller ? aCaller : Components.stack.caller;
- let now = new Date();
- let hh = now.getHours();
- let mm = now.getMinutes();
- let ss = now.getSeconds();
- let ms = now.getMilliseconds();
- let time = (hh < 10 ? "0" + hh : hh) + ":" +
- (mm < 10 ? "0" + mm : mm) + ":" +
- (ss < 10 ? "0" + ss : ss) + ":";
- if (ms < 10) {
- time += "00";
- } else if (ms < 100) {
- time += "0";
- }
- time += ms;
- let msg = time + " | TEST-INFO | " + caller.filename + " | [" + caller.name +
- " : " + caller.lineNumber + "] " + aText;
- LOG_FUNCTION(msg);
-}
-
-/**
- * Logs TEST-INFO messages when DEBUG_AUS_TEST evaluates to true.
- *
- * @param aText
- * The text to log.
- * @param aCaller (optional)
- * An optional Components.stack.caller. If not specified
- * Components.stack.caller will be used.
- */
-function debugDump(aText, aCaller) {
- if (DEBUG_AUS_TEST) {
- let caller = aCaller ? aCaller : Components.stack.caller;
- logTestInfo(aText, caller);
- }
-}
diff --git a/toolkit/mozapps/update/tests/data/sharedUpdateXML.js b/toolkit/mozapps/update/tests/data/sharedUpdateXML.js
deleted file mode 100644
index 3aa01eff47..0000000000
--- a/toolkit/mozapps/update/tests/data/sharedUpdateXML.js
+++ /dev/null
@@ -1,364 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/**
- * Helper functions for creating xml strings used by application update tests.
- *
- * !IMPORTANT - This file contains everything needed (along with dependencies)
- * by the updates.sjs file used by the mochitest-chrome tests. Since xpcshell
- * used by the http server is launched with -v 170 this file must not use
- * features greater than JavaScript 1.7.
- */
-
-/* eslint-disable no-undef */
-
-const FILE_SIMPLE_MAR = "simple.mar";
-const SIZE_SIMPLE_MAR = "1031";
-const MD5_HASH_SIMPLE_MAR = "1f8c038577bb6845d94ccec4999113ee";
-const SHA1_HASH_SIMPLE_MAR = "5d49a672c87f10f31d7e326349564a11272a028b";
-const SHA256_HASH_SIMPLE_MAR = "1aabbed5b1dd6e16e139afc5b43d479e254e0c26" +
- "3c8fb9249c0a1bb93071c5fb";
-const SHA384_HASH_SIMPLE_MAR = "26615014ea034af32ef5651492d5f493f5a7a1a48522e" +
- "d24c366442a5ec21d5ef02e23fb58d79729b8ca2f9541" +
- "99dd53";
-const SHA512_HASH_SIMPLE_MAR = "922e5ae22081795f6e8d65a3c508715c9a314054179a8" +
- "bbfe5f50dc23919ad89888291bc0a07586ab17dd0304a" +
- "b5347473601127571c66f61f5080348e05c36b";
-
-const STATE_NONE = "null";
-const STATE_DOWNLOADING = "downloading";
-const STATE_PENDING = "pending";
-const STATE_PENDING_SVC = "pending-service";
-const STATE_APPLYING = "applying";
-const STATE_APPLIED = "applied";
-const STATE_APPLIED_SVC = "applied-service";
-const STATE_SUCCEEDED = "succeeded";
-const STATE_DOWNLOAD_FAILED = "download-failed";
-const STATE_FAILED = "failed";
-
-const LOADSOURCE_ERROR_WRONG_SIZE = 2;
-const CRC_ERROR = 4;
-const READ_ERROR = 6;
-const WRITE_ERROR = 7;
-const MAR_CHANNEL_MISMATCH_ERROR = 22;
-const VERSION_DOWNGRADE_ERROR = 23;
-const SERVICE_COULD_NOT_COPY_UPDATER = 49;
-const SERVICE_INVALID_APPLYTO_DIR_STAGED_ERROR = 52;
-const SERVICE_INVALID_APPLYTO_DIR_ERROR = 54;
-const SERVICE_INVALID_INSTALL_DIR_PATH_ERROR = 55;
-const SERVICE_INVALID_WORKING_DIR_PATH_ERROR = 56;
-const INVALID_APPLYTO_DIR_STAGED_ERROR = 72;
-const INVALID_APPLYTO_DIR_ERROR = 74;
-const INVALID_INSTALL_DIR_PATH_ERROR = 75;
-const INVALID_WORKING_DIR_PATH_ERROR = 76;
-const INVALID_CALLBACK_PATH_ERROR = 77;
-const INVALID_CALLBACK_DIR_ERROR = 78;
-
-const STATE_FAILED_DELIMETER = ": ";
-
-const STATE_FAILED_LOADSOURCE_ERROR_WRONG_SIZE =
- STATE_FAILED + STATE_FAILED_DELIMETER + LOADSOURCE_ERROR_WRONG_SIZE;
-const STATE_FAILED_CRC_ERROR =
- STATE_FAILED + STATE_FAILED_DELIMETER + CRC_ERROR;
-const STATE_FAILED_READ_ERROR =
- STATE_FAILED + STATE_FAILED_DELIMETER + READ_ERROR;
-const STATE_FAILED_WRITE_ERROR =
- STATE_FAILED + STATE_FAILED_DELIMETER + WRITE_ERROR;
-const STATE_FAILED_MAR_CHANNEL_MISMATCH_ERROR =
- STATE_FAILED + STATE_FAILED_DELIMETER + MAR_CHANNEL_MISMATCH_ERROR;
-const STATE_FAILED_VERSION_DOWNGRADE_ERROR =
- STATE_FAILED + STATE_FAILED_DELIMETER + VERSION_DOWNGRADE_ERROR;
-const STATE_FAILED_SERVICE_COULD_NOT_COPY_UPDATER =
- STATE_FAILED + STATE_FAILED_DELIMETER + SERVICE_COULD_NOT_COPY_UPDATER
-const STATE_FAILED_SERVICE_INVALID_APPLYTO_DIR_STAGED_ERROR =
- STATE_FAILED + STATE_FAILED_DELIMETER + SERVICE_INVALID_APPLYTO_DIR_STAGED_ERROR;
-const STATE_FAILED_SERVICE_INVALID_APPLYTO_DIR_ERROR =
- STATE_FAILED + STATE_FAILED_DELIMETER + SERVICE_INVALID_APPLYTO_DIR_ERROR;
-const STATE_FAILED_SERVICE_INVALID_INSTALL_DIR_PATH_ERROR =
- STATE_FAILED + STATE_FAILED_DELIMETER + SERVICE_INVALID_INSTALL_DIR_PATH_ERROR;
-const STATE_FAILED_SERVICE_INVALID_WORKING_DIR_PATH_ERROR =
- STATE_FAILED + STATE_FAILED_DELIMETER + SERVICE_INVALID_WORKING_DIR_PATH_ERROR;
-const STATE_FAILED_INVALID_APPLYTO_DIR_STAGED_ERROR =
- STATE_FAILED + STATE_FAILED_DELIMETER + INVALID_APPLYTO_DIR_STAGED_ERROR;
-const STATE_FAILED_INVALID_APPLYTO_DIR_ERROR =
- STATE_FAILED + STATE_FAILED_DELIMETER + INVALID_APPLYTO_DIR_ERROR;
-const STATE_FAILED_INVALID_INSTALL_DIR_PATH_ERROR =
- STATE_FAILED + STATE_FAILED_DELIMETER + INVALID_INSTALL_DIR_PATH_ERROR;
-const STATE_FAILED_INVALID_WORKING_DIR_PATH_ERROR =
- STATE_FAILED + STATE_FAILED_DELIMETER + INVALID_WORKING_DIR_PATH_ERROR;
-const STATE_FAILED_INVALID_CALLBACK_PATH_ERROR =
- STATE_FAILED + STATE_FAILED_DELIMETER + INVALID_CALLBACK_PATH_ERROR;
-const STATE_FAILED_INVALID_CALLBACK_DIR_ERROR =
- STATE_FAILED + STATE_FAILED_DELIMETER + INVALID_CALLBACK_DIR_ERROR;
-
-/**
- * Constructs a string representing a remote update xml file.
- *
- * @param aUpdates
- * The string representing the update elements.
- * @return The string representing a remote update xml file.
- */
-function getRemoteUpdatesXMLString(aUpdates) {
- return "<?xml version=\"1.0\"?>\n" +
- "<updates>\n" +
- aUpdates +
- "</updates>\n";
-}
-
-/**
- * Constructs a string representing an update element for a remote update xml
- * file. See getUpdateString for parameter information not provided below.
- *
- * @param aPatches
- * String representing the application update patches.
- * @return The string representing an update element for an update xml file.
- */
-function getRemoteUpdateString(aPatches, aType, aName, aDisplayVersion,
- aAppVersion, aBuildID, aDetailsURL, aShowPrompt,
- aShowNeverForVersion, aPromptWaitTime,
- aBackgroundInterval, aCustom1, aCustom2) {
- return getUpdateString(aType, aName, aDisplayVersion, aAppVersion,
- aBuildID, aDetailsURL, aShowPrompt,
- aShowNeverForVersion, aPromptWaitTime,
- aBackgroundInterval, aCustom1, aCustom2) + ">\n" +
- aPatches +
- " </update>\n";
-}
-
-/**
- * Constructs a string representing a patch element for a remote update xml
- * file. See getPatchString for parameter information not provided below.
- *
- * @return The string representing a patch element for a remote update xml file.
- */
-function getRemotePatchString(aType, aURL, aHashFunction, aHashValue, aSize) {
- return getPatchString(aType, aURL, aHashFunction, aHashValue, aSize) +
- "/>\n";
-}
-
-/**
- * Constructs a string representing a local update xml file.
- *
- * @param aUpdates
- * The string representing the update elements.
- * @return The string representing a local update xml file.
- */
-function getLocalUpdatesXMLString(aUpdates) {
- if (!aUpdates || aUpdates == "") {
- return "<updates xmlns=\"http://www.mozilla.org/2005/app-update\"/>";
- }
- return ("<updates xmlns=\"http://www.mozilla.org/2005/app-update\">" +
- aUpdates +
- "</updates>").replace(/>\s+\n*</g, '><');
-}
-
-/**
- * Constructs a string representing an update element for a local update xml
- * file. See getUpdateString for parameter information not provided below.
- *
- * @param aPatches
- * String representing the application update patches.
- * @param aServiceURL (optional)
- * The update's xml url.
- * If not specified it will default to 'http://test_service/'.
- * @param aIsCompleteUpdate (optional)
- * The string 'true' if this update was a complete update or the string
- * 'false' if this update was a partial update.
- * If not specified it will default to 'true'.
- * @param aChannel (optional)
- * The update channel name.
- * If not specified it will default to the default preference value of
- * app.update.channel.
- * @param aForegroundDownload (optional)
- * The string 'true' if this update was manually downloaded or the
- * string 'false' if this update was automatically downloaded.
- * If not specified it will default to 'true'.
- * @param aPreviousAppVersion (optional)
- * The application version prior to applying the update.
- * If not specified it will not be present.
- * @return The string representing an update element for an update xml file.
- */
-function getLocalUpdateString(aPatches, aType, aName, aDisplayVersion,
- aAppVersion, aBuildID, aDetailsURL, aServiceURL,
- aInstallDate, aStatusText, aIsCompleteUpdate,
- aChannel, aForegroundDownload, aShowPrompt,
- aShowNeverForVersion, aPromptWaitTime,
- aBackgroundInterval, aPreviousAppVersion,
- aCustom1, aCustom2) {
- let serviceURL = aServiceURL ? aServiceURL : "http://test_service/";
- let installDate = aInstallDate ? aInstallDate : "1238441400314";
- let statusText = aStatusText ? aStatusText : "Install Pending";
- let isCompleteUpdate =
- typeof aIsCompleteUpdate == "string" ? aIsCompleteUpdate : "true";
- let channel = aChannel ? aChannel
- : gDefaultPrefBranch.getCharPref(PREF_APP_UPDATE_CHANNEL);
- let foregroundDownload =
- typeof aForegroundDownload == "string" ? aForegroundDownload : "true";
- let previousAppVersion = aPreviousAppVersion ? "previousAppVersion=\"" +
- aPreviousAppVersion + "\" "
- : "";
- return getUpdateString(aType, aName, aDisplayVersion, aAppVersion, aBuildID,
- aDetailsURL, aShowPrompt, aShowNeverForVersion,
- aPromptWaitTime, aBackgroundInterval, aCustom1, aCustom2) +
- " " +
- previousAppVersion +
- "serviceURL=\"" + serviceURL + "\" " +
- "installDate=\"" + installDate + "\" " +
- "statusText=\"" + statusText + "\" " +
- "isCompleteUpdate=\"" + isCompleteUpdate + "\" " +
- "channel=\"" + channel + "\" " +
- "foregroundDownload=\"" + foregroundDownload + "\">" +
- aPatches +
- " </update>";
-}
-
-/**
- * Constructs a string representing a patch element for a local update xml file.
- * See getPatchString for parameter information not provided below.
- *
- * @param aSelected (optional)
- * Whether this patch is selected represented or not. The string 'true'
- * denotes selected and the string 'false' denotes not selected.
- * If not specified it will default to the string 'true'.
- * @param aState (optional)
- * The patch's state.
- * If not specified it will default to STATE_SUCCEEDED.
- * @return The string representing a patch element for a local update xml file.
- */
-function getLocalPatchString(aType, aURL, aHashFunction, aHashValue, aSize,
- aSelected, aState) {
- let selected = typeof aSelected == "string" ? aSelected : "true";
- let state = aState ? aState : STATE_SUCCEEDED;
- return getPatchString(aType, aURL, aHashFunction, aHashValue, aSize) + " " +
- "selected=\"" + selected + "\" " +
- "state=\"" + state + "\"/>\n";
-}
-
-/**
- * Constructs a string representing an update element for a remote update xml
- * file.
- *
- * @param aType (optional)
- * The update's type which should be major or minor. If not specified it
- * will default to 'major'.
- * @param aName (optional)
- * The update's name.
- * If not specified it will default to 'App Update Test'.
- * @param aDisplayVersion (optional)
- * The update's display version.
- * If not specified it will default to 'version #' where # is the value
- * of DEFAULT_UPDATE_VERSION.
- * @param aAppVersion (optional)
- * The update's application version.
- * If not specified it will default to the value of
- * DEFAULT_UPDATE_VERSION.
- * @param aBuildID (optional)
- * The update's build id.
- * If not specified it will default to '20080811053724'.
- * @param aDetailsURL (optional)
- * The update's details url.
- * If not specified it will default to 'http://test_details/' due to due
- * to bug 470244.
- * @param aShowPrompt (optional)
- * Whether to show the prompt for the update when auto update is
- * enabled.
- * If not specified it will not be present and the update service will
- * default to false.
- * @param aShowNeverForVersion (optional)
- * Whether to show the 'No Thanks' button in the update prompt.
- * If not specified it will not be present and the update service will
- * default to false.
- * @param aPromptWaitTime (optional)
- * Override for the app.update.promptWaitTime preference.
- * @param aBackgroundInterval (optional)
- * Override for the app.update.download.backgroundInterval preference.
- * @param aCustom1 (optional)
- * A custom attribute name and attribute value to add to the xml.
- * Example: custom1_attribute="custom1 value"
- * If not specified it will not be present.
- * @param aCustom2 (optional)
- * A custom attribute name and attribute value to add to the xml.
- * Example: custom2_attribute="custom2 value"
- * If not specified it will not be present.
- * @return The string representing an update element for an update xml file.
- */
-function getUpdateString(aType, aName, aDisplayVersion, aAppVersion, aBuildID,
- aDetailsURL, aShowPrompt, aShowNeverForVersion,
- aPromptWaitTime, aBackgroundInterval, aCustom1,
- aCustom2) {
- let type = aType ? aType : "major";
- let name = aName ? aName : "App Update Test";
- let displayVersion = aDisplayVersion ? "displayVersion=\"" +
- aDisplayVersion + "\" "
- : "";
- let appVersion = "appVersion=\"" +
- (aAppVersion ? aAppVersion : DEFAULT_UPDATE_VERSION) +
- "\" ";
- let buildID = aBuildID ? aBuildID : "20080811053724";
- // XXXrstrong - not specifying a detailsURL will cause a leak due to bug 470244
-// let detailsURL = aDetailsURL ? "detailsURL=\"" + aDetailsURL + "\" " : "";
- let detailsURL = "detailsURL=\"" +
- (aDetailsURL ? aDetailsURL
- : "http://test_details/") + "\" ";
- let showPrompt = aShowPrompt ? "showPrompt=\"" + aShowPrompt + "\" " : "";
- let showNeverForVersion = aShowNeverForVersion ? "showNeverForVersion=\"" +
- aShowNeverForVersion + "\" "
- : "";
- let promptWaitTime = aPromptWaitTime ? "promptWaitTime=\"" + aPromptWaitTime +
- "\" "
- : "";
- let backgroundInterval = aBackgroundInterval ? "backgroundInterval=\"" +
- aBackgroundInterval + "\" "
- : "";
- let custom1 = aCustom1 ? aCustom1 + " " : "";
- let custom2 = aCustom2 ? aCustom2 + " " : "";
- return " <update type=\"" + type + "\" " +
- "name=\"" + name + "\" " +
- displayVersion +
- appVersion +
- detailsURL +
- showPrompt +
- showNeverForVersion +
- promptWaitTime +
- backgroundInterval +
- custom1 +
- custom2 +
- "buildID=\"" + buildID + "\"";
-}
-
-/**
- * Constructs a string representing a patch element for an update xml file.
- *
- * @param aType (optional)
- * The patch's type which should be complete or partial.
- * If not specified it will default to 'complete'.
- * @param aURL (optional)
- * The patch's url to the mar file.
- * If not specified it will default to the value of:
- * gURLData + FILE_SIMPLE_MAR
- * @param aHashFunction (optional)
- * The patch's hash function used to verify the mar file.
- * If not specified it will default to 'MD5'.
- * @param aHashValue (optional)
- * The patch's hash value used to verify the mar file.
- * If not specified it will default to the value of MD5_HASH_SIMPLE_MAR
- * which is the MD5 hash value for the file specified by FILE_SIMPLE_MAR.
- * @param aSize (optional)
- * The patch's file size for the mar file.
- * If not specified it will default to the file size for FILE_SIMPLE_MAR
- * specified by SIZE_SIMPLE_MAR.
- * @return The string representing a patch element for an update xml file.
- */
-function getPatchString(aType, aURL, aHashFunction, aHashValue, aSize) {
- let type = aType ? aType : "complete";
- let url = aURL ? aURL : gURLData + FILE_SIMPLE_MAR;
- let hashFunction = aHashFunction ? aHashFunction : "MD5";
- let hashValue = aHashValue ? aHashValue : MD5_HASH_SIMPLE_MAR;
- let size = aSize ? aSize : SIZE_SIMPLE_MAR;
- return " <patch type=\"" + type + "\" " +
- "URL=\"" + url + "\" " +
- "hashFunction=\"" + hashFunction + "\" " +
- "hashValue=\"" + hashValue + "\" " +
- "size=\"" + size + "\"";
-}
diff --git a/toolkit/mozapps/update/tests/data/simple.mar b/toolkit/mozapps/update/tests/data/simple.mar
deleted file mode 100644
index b2ccbd8d25..0000000000
--- a/toolkit/mozapps/update/tests/data/simple.mar
+++ /dev/null
Binary files differ
diff --git a/toolkit/mozapps/update/tests/data/wrong_product_channel.mar b/toolkit/mozapps/update/tests/data/wrong_product_channel.mar
deleted file mode 100644
index 1e39cc214f..0000000000
--- a/toolkit/mozapps/update/tests/data/wrong_product_channel.mar
+++ /dev/null
Binary files differ
diff --git a/toolkit/mozapps/update/tests/data/xpcshellConstantsPP.js b/toolkit/mozapps/update/tests/data/xpcshellConstantsPP.js
deleted file mode 100644
index e5f0fce580..0000000000
--- a/toolkit/mozapps/update/tests/data/xpcshellConstantsPP.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/* 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/. */
-
-/* Preprocessed constants used by xpcshell tests */
-
-const INSTALL_LOCALE = "@AB_CD@";
-const MOZ_APP_NAME = "@MOZ_APP_NAME@";
-const BIN_SUFFIX = "@BIN_SUFFIX@";
-
-// MOZ_APP_VENDOR is optional.
-#ifdef MOZ_APP_VENDOR
-const MOZ_APP_VENDOR = "@MOZ_APP_VENDOR@";
-#else
-const MOZ_APP_VENDOR = "";
-#endif
-
-// MOZ_APP_BASENAME is not optional for tests.
-const MOZ_APP_BASENAME = "@MOZ_APP_BASENAME@";
-const APP_BIN_SUFFIX = "@BIN_SUFFIX@";
-
-const APP_INFO_NAME = "XPCShell";
-const APP_INFO_VENDOR = "Mozilla";
-
-#ifdef XP_WIN
-const IS_WIN = true;
-#else
-const IS_WIN = false;
-#endif
-
-#ifdef XP_MACOSX
-const IS_MACOSX = true;
-#else
-const IS_MACOSX = false;
-#endif
-
-#ifdef XP_UNIX
-const IS_UNIX = true;
-#else
-const IS_UNIX = false;
-#endif
-
-#ifdef MOZ_VERIFY_MAR_SIGNATURE
-const MOZ_VERIFY_MAR_SIGNATURE = true;
-#else
-const MOZ_VERIFY_MAR_SIGNATURE = false;
-#endif
-
-#ifdef DISABLE_UPDATER_AUTHENTICODE_CHECK
- const IS_AUTHENTICODE_CHECK_ENABLED = false;
-#else
- const IS_AUTHENTICODE_CHECK_ENABLED = true;
-#endif
diff --git a/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js b/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
deleted file mode 100644
index 9a9610ddac..0000000000
--- a/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
+++ /dev/null
@@ -1,4047 +0,0 @@
-/* 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/. */
-
-/**
- * Test log warnings that happen before the test has started
- * "Couldn't get the user appdata directory. Crash events may not be produced."
- * in nsExceptionHandler.cpp (possibly bug 619104)
- *
- * Test log warnings that happen after the test has finished
- * "OOPDeinit() without successful OOPInit()" in nsExceptionHandler.cpp
- * (bug 619104)
- * "XPCOM objects created/destroyed from static ctor/dtor" in nsTraceRefcnt.cpp
- * (possibly bug 457479)
- *
- * Other warnings printed to the test logs
- * "site security information will not be persisted" in
- * nsSiteSecurityService.cpp and the error in nsSystemInfo.cpp preceding this
- * error are due to not having a profile when running some of the xpcshell
- * tests. Since most xpcshell tests also log these errors these tests don't
- * call do_get_profile unless necessary for the test.
- * The "This method is lossy. Use GetCanonicalPath !" warning on Windows in
- * nsLocalFileWin.cpp is from the call to GetNSSProfilePath in
- * nsNSSComponent.cpp due to it using GetNativeCanonicalPath.
- * "!mMainThread" in nsThreadManager.cpp are due to using timers and it might be
- * possible to fix some or all of these in the test itself.
- * "NS_FAILED(rv)" in nsThreadUtils.cpp are due to using timers and it might be
- * possible to fix some or all of these in the test itself.
- */
-
-'use strict';
-/* eslint-disable no-undef */
-
-const { classes: Cc, interfaces: Ci, manager: Cm, results: Cr,
- utils: Cu } = Components;
-
-/* global INSTALL_LOCALE, MOZ_APP_NAME, BIN_SUFFIX, MOZ_APP_VENDOR */
-/* global MOZ_APP_BASENAME, APP_BIN_SUFFIX, APP_INFO_NAME, APP_INFO_VENDOR */
-/* global IS_WIN, IS_MACOSX, IS_UNIX, MOZ_VERIFY_MAR_SIGNATURE */
-/* global IS_AUTHENTICODE_CHECK_ENABLED */
-load("../data/xpcshellConstantsPP.js");
-
-function getLogSuffix() {
- if (IS_WIN) {
- return "_win";
- }
- if (IS_MACOSX) {
- return "_mac";
- }
- return "_linux";
-}
-
-Cu.import("resource://gre/modules/Services.jsm", this);
-Cu.import("resource://gre/modules/ctypes.jsm", this);
-
-const DIR_MACOS = IS_MACOSX ? "Contents/MacOS/" : "";
-const DIR_RESOURCES = IS_MACOSX ? "Contents/Resources/" : "";
-const TEST_FILE_SUFFIX = IS_MACOSX ? "_mac" : "";
-const FILE_COMPLETE_MAR = "complete" + TEST_FILE_SUFFIX + ".mar";
-const FILE_PARTIAL_MAR = "partial" + TEST_FILE_SUFFIX + ".mar";
-const FILE_COMPLETE_PRECOMPLETE = "complete_precomplete" + TEST_FILE_SUFFIX;
-const FILE_PARTIAL_PRECOMPLETE = "partial_precomplete" + TEST_FILE_SUFFIX;
-const FILE_COMPLETE_REMOVEDFILES = "complete_removed-files" + TEST_FILE_SUFFIX;
-const FILE_PARTIAL_REMOVEDFILES = "partial_removed-files" + TEST_FILE_SUFFIX;
-const FILE_UPDATE_IN_PROGRESS_LOCK = "updated.update_in_progress.lock";
-const COMPARE_LOG_SUFFIX = getLogSuffix();
-const LOG_COMPLETE_SUCCESS = "complete_log_success" + COMPARE_LOG_SUFFIX;
-const LOG_PARTIAL_SUCCESS = "partial_log_success" + COMPARE_LOG_SUFFIX;
-const LOG_PARTIAL_FAILURE = "partial_log_failure" + COMPARE_LOG_SUFFIX;
-const LOG_REPLACE_SUCCESS = "replace_log_success";
-
-const USE_EXECV = IS_UNIX && !IS_MACOSX;
-
-const URL_HOST = "http://localhost";
-
-const FILE_APP_BIN = MOZ_APP_NAME + APP_BIN_SUFFIX;
-const FILE_COMPLETE_EXE = "complete.exe";
-const FILE_HELPER_BIN = "TestAUSHelper" + BIN_SUFFIX;
-const FILE_MAINTENANCE_SERVICE_BIN = "maintenanceservice.exe";
-const FILE_MAINTENANCE_SERVICE_INSTALLER_BIN = "maintenanceservice_installer.exe";
-const FILE_OLD_VERSION_MAR = "old_version.mar";
-const FILE_PARTIAL_EXE = "partial.exe";
-const FILE_UPDATER_BIN = "updater" + BIN_SUFFIX;
-const FILE_WRONG_CHANNEL_MAR = "wrong_product_channel.mar";
-
-const PERFORMING_STAGED_UPDATE = "Performing a staged update";
-const CALL_QUIT = "calling QuitProgressUI";
-const REMOVE_OLD_DIST_DIR = "removing old distribution directory";
-const MOVE_OLD_DIST_DIR = "Moving old distribution directory to new location";
-const ERR_UPDATE_IN_PROGRESS = "Update already in progress! Exiting";
-const ERR_RENAME_FILE = "rename_file: failed to rename file";
-const ERR_ENSURE_COPY = "ensure_copy: failed to copy the file";
-const ERR_UNABLE_OPEN_DEST = "unable to open destination file";
-const ERR_BACKUP_DISCARD = "backup_discard: unable to remove";
-const ERR_MOVE_DESTDIR_7 = "Moving destDir to tmpDir failed, err: 7";
-const ERR_BACKUP_CREATE_7 = "backup_create failed: 7";
-const ERR_LOADSOURCEFILE_FAILED = "LoadSourceFile failed";
-
-const LOG_SVC_SUCCESSFUL_LAUNCH = "Process was started... waiting on result.";
-
-// Typical end of a message when calling assert
-const MSG_SHOULD_EQUAL = " should equal the expected value";
-const MSG_SHOULD_EXIST = "the file or directory should exist";
-const MSG_SHOULD_NOT_EXIST = "the file or directory should not exist";
-
-// All we care about is that the last modified time has changed so that Mac OS
-// X Launch Services invalidates its cache so the test allows up to one minute
-// difference in the last modified time.
-const MAC_MAX_TIME_DIFFERENCE = 60000;
-
-// How many of do_execute_soon calls to wait before the test is aborted.
-const MAX_TIMEOUT_RUNS = 20000;
-
-// Time in seconds the helper application should sleep before exiting. The
-// helper can also be made to exit by writing |finish| to its input file.
-const HELPER_SLEEP_TIMEOUT = 180;
-
-// Maximum number of milliseconds the process that is launched can run before
-// the test will try to kill it.
-const APP_TIMER_TIMEOUT = 120000;
-
-// How many of do_timeout calls using FILE_IN_USE_TIMEOUT_MS to wait before the
-// test is aborted.
-const FILE_IN_USE_MAX_TIMEOUT_RUNS = 60;
-const FILE_IN_USE_TIMEOUT_MS = 1000;
-
-const PIPE_TO_NULL = IS_WIN ? ">nul" : "> /dev/null 2>&1";
-
-const LOG_FUNCTION = do_print;
-
-const gHTTPHandlerPath = "updates.xml";
-
-// This default value will be overridden when using the http server.
-var gURLData = URL_HOST + "/";
-
-var gTestID;
-
-var gTestserver;
-
-var gRegisteredServiceCleanup;
-
-var gCheckFunc;
-var gResponseBody;
-var gResponseStatusCode = 200;
-var gRequestURL;
-var gUpdateCount;
-var gUpdates;
-var gStatusCode;
-var gStatusText;
-var gStatusResult;
-
-var gProcess;
-var gAppTimer;
-var gHandle;
-
-var gGREDirOrig;
-var gGREBinDirOrig;
-var gAppDirOrig;
-
-// Variables are used instead of contants so tests can override these values if
-// necessary.
-var gCallbackBinFile = "callback_app" + BIN_SUFFIX;
-var gCallbackArgs = ["./", "callback.log", "Test Arg 2", "Test Arg 3"];
-var gPostUpdateBinFile = "postup_app" + BIN_SUFFIX;
-var gSvcOriginalLogContents;
-var gUseTestAppDir = true;
-// Some update staging failures can remove the update. This allows tests to
-// specify that the status file and the active update should not be checked
-// after an update is staged.
-var gStagingRemovedUpdate = false;
-
-var gTimeoutRuns = 0;
-var gFileInUseTimeoutRuns = 0;
-
-// Environment related globals
-var gShouldResetEnv = undefined;
-var gAddedEnvXRENoWindowsCrashDialog = false;
-var gEnvXPCOMDebugBreak;
-var gEnvXPCOMMemLeakLog;
-var gEnvDyldLibraryPath;
-var gEnvLdLibraryPath;
-var gASanOptions;
-
-// Set to true to log additional information for debugging. To log additional
-// information for an individual test set DEBUG_AUS_TEST to true in the test's
-// run_test function.
-var DEBUG_AUS_TEST = true;
-
-const DATA_URI_SPEC = Services.io.newFileURI(do_get_file("../data", false)).spec;
-/* import-globals-from ../data/shared.js */
-Services.scriptloader.loadSubScript(DATA_URI_SPEC + "shared.js", this);
-
-var gTestFiles = [];
-var gTestDirs = [];
-
-// Common files for both successful and failed updates.
-var gTestFilesCommon = [
- {
- description: "Should never change",
- fileName: FILE_UPDATE_SETTINGS_INI,
- relPathDir: DIR_RESOURCES,
- originalContents: UPDATE_SETTINGS_CONTENTS,
- compareContents: UPDATE_SETTINGS_CONTENTS,
- originalFile: null,
- compareFile: null,
- originalPerms: 0o767,
- comparePerms: 0o767
- }, {
- description: "Should never change",
- fileName: "channel-prefs.js",
- relPathDir: DIR_RESOURCES + "defaults/pref/",
- originalContents: "ShouldNotBeReplaced\n",
- compareContents: "ShouldNotBeReplaced\n",
- originalFile: null,
- compareFile: null,
- originalPerms: 0o767,
- comparePerms: 0o767
- }];
-
- // Files for a complete successful update. This can be used for a complete
- // failed update by calling setTestFilesAndDirsForFailure.
-var gTestFilesCompleteSuccess = [
- {
- description: "Added by update.manifest (add)",
- fileName: "precomplete",
- relPathDir: DIR_RESOURCES,
- originalContents: null,
- compareContents: null,
- originalFile: FILE_PARTIAL_PRECOMPLETE,
- compareFile: FILE_COMPLETE_PRECOMPLETE,
- originalPerms: 0o666,
- comparePerms: 0o644
- }, {
- description: "Added by update.manifest (add)",
- fileName: "searchpluginstext0",
- relPathDir: DIR_RESOURCES + "searchplugins/",
- originalContents: "ToBeReplacedWithFromComplete\n",
- compareContents: "FromComplete\n",
- originalFile: null,
- compareFile: null,
- originalPerms: 0o775,
- comparePerms: 0o644
- }, {
- description: "Added by update.manifest (add)",
- fileName: "searchpluginspng1.png",
- relPathDir: DIR_RESOURCES + "searchplugins/",
- originalContents: null,
- compareContents: null,
- originalFile: null,
- compareFile: "complete.png",
- originalPerms: null,
- comparePerms: 0o644
- }, {
- description: "Added by update.manifest (add)",
- fileName: "searchpluginspng0.png",
- relPathDir: DIR_RESOURCES + "searchplugins/",
- originalContents: null,
- compareContents: null,
- originalFile: "partial.png",
- compareFile: "complete.png",
- originalPerms: 0o666,
- comparePerms: 0o644
- }, {
- description: "Added by update.manifest (add)",
- fileName: "removed-files",
- relPathDir: DIR_RESOURCES,
- originalContents: null,
- compareContents: null,
- originalFile: FILE_PARTIAL_REMOVEDFILES,
- compareFile: FILE_COMPLETE_REMOVEDFILES,
- originalPerms: 0o666,
- comparePerms: 0o644
- }, {
- description: "Added by update.manifest if the parent directory exists (add-if)",
- fileName: "extensions1text0",
- relPathDir: DIR_RESOURCES + "distribution/extensions/extensions1/",
- originalContents: null,
- compareContents: "FromComplete\n",
- originalFile: null,
- compareFile: null,
- originalPerms: null,
- comparePerms: 0o644
- }, {
- description: "Added by update.manifest if the parent directory exists (add-if)",
- fileName: "extensions1png1.png",
- relPathDir: DIR_RESOURCES + "distribution/extensions/extensions1/",
- originalContents: null,
- compareContents: null,
- originalFile: "partial.png",
- compareFile: "complete.png",
- originalPerms: 0o666,
- comparePerms: 0o644
- }, {
- description: "Added by update.manifest if the parent directory exists (add-if)",
- fileName: "extensions1png0.png",
- relPathDir: DIR_RESOURCES + "distribution/extensions/extensions1/",
- originalContents: null,
- compareContents: null,
- originalFile: null,
- compareFile: "complete.png",
- originalPerms: null,
- comparePerms: 0o644
- }, {
- description: "Added by update.manifest if the parent directory exists (add-if)",
- fileName: "extensions0text0",
- relPathDir: DIR_RESOURCES + "distribution/extensions/extensions0/",
- originalContents: "ToBeReplacedWithFromComplete\n",
- compareContents: "FromComplete\n",
- originalFile: null,
- compareFile: null,
- originalPerms: null,
- comparePerms: 0o644
- }, {
- description: "Added by update.manifest if the parent directory exists (add-if)",
- fileName: "extensions0png1.png",
- relPathDir: DIR_RESOURCES + "distribution/extensions/extensions0/",
- originalContents: null,
- compareContents: null,
- originalFile: null,
- compareFile: "complete.png",
- originalPerms: null,
- comparePerms: 0o644
- }, {
- description: "Added by update.manifest if the parent directory exists (add-if)",
- fileName: "extensions0png0.png",
- relPathDir: DIR_RESOURCES + "distribution/extensions/extensions0/",
- originalContents: null,
- compareContents: null,
- originalFile: null,
- compareFile: "complete.png",
- originalPerms: null,
- comparePerms: 0o644
- }, {
- description: "Added by update.manifest (add)",
- fileName: "exe0.exe",
- relPathDir: DIR_MACOS,
- originalContents: null,
- compareContents: null,
- originalFile: FILE_HELPER_BIN,
- compareFile: FILE_COMPLETE_EXE,
- originalPerms: 0o777,
- comparePerms: 0o755
- }, {
- description: "Added by update.manifest (add)",
- fileName: "10text0",
- relPathDir: DIR_RESOURCES + "1/10/",
- originalContents: "ToBeReplacedWithFromComplete\n",
- compareContents: "FromComplete\n",
- originalFile: null,
- compareFile: null,
- originalPerms: 0o767,
- comparePerms: 0o644
- }, {
- description: "Added by update.manifest (add)",
- fileName: "0exe0.exe",
- relPathDir: DIR_RESOURCES + "0/",
- originalContents: null,
- compareContents: null,
- originalFile: FILE_HELPER_BIN,
- compareFile: FILE_COMPLETE_EXE,
- originalPerms: 0o777,
- comparePerms: 0o755
- }, {
- description: "Added by update.manifest (add)",
- fileName: "00text1",
- relPathDir: DIR_RESOURCES + "0/00/",
- originalContents: "ToBeReplacedWithFromComplete\n",
- compareContents: "FromComplete\n",
- originalFile: null,
- compareFile: null,
- originalPerms: 0o677,
- comparePerms: 0o644
- }, {
- description: "Added by update.manifest (add)",
- fileName: "00text0",
- relPathDir: DIR_RESOURCES + "0/00/",
- originalContents: "ToBeReplacedWithFromComplete\n",
- compareContents: "FromComplete\n",
- originalFile: null,
- compareFile: null,
- originalPerms: 0o775,
- comparePerms: 0o644
- }, {
- description: "Added by update.manifest (add)",
- fileName: "00png0.png",
- relPathDir: DIR_RESOURCES + "0/00/",
- originalContents: null,
- compareContents: null,
- originalFile: null,
- compareFile: "complete.png",
- originalPerms: 0o776,
- comparePerms: 0o644
- }, {
- description: "Removed by precomplete (remove)",
- fileName: "20text0",
- relPathDir: DIR_RESOURCES + "2/20/",
- originalContents: "ToBeDeleted\n",
- compareContents: null,
- originalFile: null,
- compareFile: null,
- originalPerms: null,
- comparePerms: null
- }, {
- description: "Removed by precomplete (remove)",
- fileName: "20png0.png",
- relPathDir: DIR_RESOURCES + "2/20/",
- originalContents: "ToBeDeleted\n",
- compareContents: null,
- originalFile: null,
- compareFile: null,
- originalPerms: null,
- comparePerms: null
- }];
-
-// Concatenate the common files to the end of the array.
-gTestFilesCompleteSuccess = gTestFilesCompleteSuccess.concat(gTestFilesCommon);
-
-// Files for a partial successful update. This can be used for a partial failed
-// update by calling setTestFilesAndDirsForFailure.
-var gTestFilesPartialSuccess = [
- {
- description: "Added by update.manifest (add)",
- fileName: "precomplete",
- relPathDir: DIR_RESOURCES,
- originalContents: null,
- compareContents: null,
- originalFile: FILE_COMPLETE_PRECOMPLETE,
- compareFile: FILE_PARTIAL_PRECOMPLETE,
- originalPerms: 0o666,
- comparePerms: 0o644
- }, {
- description: "Added by update.manifest (add)",
- fileName: "searchpluginstext0",
- relPathDir: DIR_RESOURCES + "searchplugins/",
- originalContents: "ToBeReplacedWithFromPartial\n",
- compareContents: "FromPartial\n",
- originalFile: null,
- compareFile: null,
- originalPerms: 0o775,
- comparePerms: 0o644
- }, {
- description: "Patched by update.manifest if the file exists (patch-if)",
- fileName: "searchpluginspng1.png",
- relPathDir: DIR_RESOURCES + "searchplugins/",
- originalContents: null,
- compareContents: null,
- originalFile: "complete.png",
- compareFile: "partial.png",
- originalPerms: 0o666,
- comparePerms: 0o666
- }, {
- description: "Patched by update.manifest if the file exists (patch-if)",
- fileName: "searchpluginspng0.png",
- relPathDir: DIR_RESOURCES + "searchplugins/",
- originalContents: null,
- compareContents: null,
- originalFile: "complete.png",
- compareFile: "partial.png",
- originalPerms: 0o666,
- comparePerms: 0o666
- }, {
- description: "Added by update.manifest if the parent directory exists (add-if)",
- fileName: "extensions1text0",
- relPathDir: DIR_RESOURCES + "distribution/extensions/extensions1/",
- originalContents: null,
- compareContents: "FromPartial\n",
- originalFile: null,
- compareFile: null,
- originalPerms: null,
- comparePerms: 0o644
- }, {
- description: "Patched by update.manifest if the parent directory exists (patch-if)",
- fileName: "extensions1png1.png",
- relPathDir: DIR_RESOURCES + "distribution/extensions/extensions1/",
- originalContents: null,
- compareContents: null,
- originalFile: "complete.png",
- compareFile: "partial.png",
- originalPerms: 0o666,
- comparePerms: 0o666
- }, {
- description: "Patched by update.manifest if the parent directory exists (patch-if)",
- fileName: "extensions1png0.png",
- relPathDir: DIR_RESOURCES + "distribution/extensions/extensions1/",
- originalContents: null,
- compareContents: null,
- originalFile: "complete.png",
- compareFile: "partial.png",
- originalPerms: 0o666,
- comparePerms: 0o666
- }, {
- description: "Added by update.manifest if the parent directory exists (add-if)",
- fileName: "extensions0text0",
- relPathDir: DIR_RESOURCES + "distribution/extensions/extensions0/",
- originalContents: "ToBeReplacedWithFromPartial\n",
- compareContents: "FromPartial\n",
- originalFile: null,
- compareFile: null,
- originalPerms: 0o644,
- comparePerms: 0o644
- }, {
- description: "Patched by update.manifest if the parent directory exists (patch-if)",
- fileName: "extensions0png1.png",
- relPathDir: DIR_RESOURCES + "distribution/extensions/extensions0/",
- originalContents: null,
- compareContents: null,
- originalFile: "complete.png",
- compareFile: "partial.png",
- originalPerms: 0o644,
- comparePerms: 0o644
- }, {
- description: "Patched by update.manifest if the parent directory exists (patch-if)",
- fileName: "extensions0png0.png",
- relPathDir: DIR_RESOURCES + "distribution/extensions/extensions0/",
- originalContents: null,
- compareContents: null,
- originalFile: "complete.png",
- compareFile: "partial.png",
- originalPerms: 0o644,
- comparePerms: 0o644
- }, {
- description: "Patched by update.manifest (patch)",
- fileName: "exe0.exe",
- relPathDir: DIR_MACOS,
- originalContents: null,
- compareContents: null,
- originalFile: FILE_COMPLETE_EXE,
- compareFile: FILE_PARTIAL_EXE,
- originalPerms: 0o755,
- comparePerms: 0o755
- }, {
- description: "Patched by update.manifest (patch)",
- fileName: "0exe0.exe",
- relPathDir: DIR_RESOURCES + "0/",
- originalContents: null,
- compareContents: null,
- originalFile: FILE_COMPLETE_EXE,
- compareFile: FILE_PARTIAL_EXE,
- originalPerms: 0o755,
- comparePerms: 0o755
- }, {
- description: "Added by update.manifest (add)",
- fileName: "00text0",
- relPathDir: DIR_RESOURCES + "0/00/",
- originalContents: "ToBeReplacedWithFromPartial\n",
- compareContents: "FromPartial\n",
- originalFile: null,
- compareFile: null,
- originalPerms: 0o644,
- comparePerms: 0o644
- }, {
- description: "Patched by update.manifest (patch)",
- fileName: "00png0.png",
- relPathDir: DIR_RESOURCES + "0/00/",
- originalContents: null,
- compareContents: null,
- originalFile: "complete.png",
- compareFile: "partial.png",
- originalPerms: 0o666,
- comparePerms: 0o666
- }, {
- description: "Added by update.manifest (add)",
- fileName: "20text0",
- relPathDir: DIR_RESOURCES + "2/20/",
- originalContents: null,
- compareContents: "FromPartial\n",
- originalFile: null,
- compareFile: null,
- originalPerms: null,
- comparePerms: 0o644
- }, {
- description: "Added by update.manifest (add)",
- fileName: "20png0.png",
- relPathDir: DIR_RESOURCES + "2/20/",
- originalContents: null,
- compareContents: null,
- originalFile: null,
- compareFile: "partial.png",
- originalPerms: null,
- comparePerms: 0o644
- }, {
- description: "Added by update.manifest (add)",
- fileName: "00text2",
- relPathDir: DIR_RESOURCES + "0/00/",
- originalContents: null,
- compareContents: "FromPartial\n",
- originalFile: null,
- compareFile: null,
- originalPerms: null,
- comparePerms: 0o644
- }, {
- description: "Removed by update.manifest (remove)",
- fileName: "10text0",
- relPathDir: DIR_RESOURCES + "1/10/",
- originalContents: "ToBeDeleted\n",
- compareContents: null,
- originalFile: null,
- compareFile: null,
- originalPerms: null,
- comparePerms: null
- }, {
- description: "Removed by update.manifest (remove)",
- fileName: "00text1",
- relPathDir: DIR_RESOURCES + "0/00/",
- originalContents: "ToBeDeleted\n",
- compareContents: null,
- originalFile: null,
- compareFile: null,
- originalPerms: null,
- comparePerms: null
- }];
-
-// Concatenate the common files to the end of the array.
-gTestFilesPartialSuccess = gTestFilesPartialSuccess.concat(gTestFilesCommon);
-
-var gTestDirsCommon = [
- {
- relPathDir: DIR_RESOURCES + "3/",
- dirRemoved: false,
- files: ["3text0", "3text1"],
- filesRemoved: true
- }, {
- relPathDir: DIR_RESOURCES + "4/",
- dirRemoved: true,
- files: ["4text0", "4text1"],
- filesRemoved: true
- }, {
- relPathDir: DIR_RESOURCES + "5/",
- dirRemoved: true,
- files: ["5test.exe", "5text0", "5text1"],
- filesRemoved: true
- }, {
- relPathDir: DIR_RESOURCES + "6/",
- dirRemoved: true
- }, {
- relPathDir: DIR_RESOURCES + "7/",
- dirRemoved: true,
- files: ["7text0", "7text1"],
- subDirs: ["70/", "71/"],
- subDirFiles: ["7xtest.exe", "7xtext0", "7xtext1"]
- }, {
- relPathDir: DIR_RESOURCES + "8/",
- dirRemoved: false
- }, {
- relPathDir: DIR_RESOURCES + "8/80/",
- dirRemoved: true
- }, {
- relPathDir: DIR_RESOURCES + "8/81/",
- dirRemoved: false,
- files: ["81text0", "81text1"]
- }, {
- relPathDir: DIR_RESOURCES + "8/82/",
- dirRemoved: false,
- subDirs: ["820/", "821/"]
- }, {
- relPathDir: DIR_RESOURCES + "8/83/",
- dirRemoved: true
- }, {
- relPathDir: DIR_RESOURCES + "8/84/",
- dirRemoved: true
- }, {
- relPathDir: DIR_RESOURCES + "8/85/",
- dirRemoved: true
- }, {
- relPathDir: DIR_RESOURCES + "8/86/",
- dirRemoved: true,
- files: ["86text0", "86text1"]
- }, {
- relPathDir: DIR_RESOURCES + "8/87/",
- dirRemoved: true,
- subDirs: ["870/", "871/"],
- subDirFiles: ["87xtext0", "87xtext1"]
- }, {
- relPathDir: DIR_RESOURCES + "8/88/",
- dirRemoved: true
- }, {
- relPathDir: DIR_RESOURCES + "8/89/",
- dirRemoved: true
- }, {
- relPathDir: DIR_RESOURCES + "9/90/",
- dirRemoved: true
- }, {
- relPathDir: DIR_RESOURCES + "9/91/",
- dirRemoved: false,
- files: ["91text0", "91text1"]
- }, {
- relPathDir: DIR_RESOURCES + "9/92/",
- dirRemoved: false,
- subDirs: ["920/", "921/"]
- }, {
- relPathDir: DIR_RESOURCES + "9/93/",
- dirRemoved: true
- }, {
- relPathDir: DIR_RESOURCES + "9/94/",
- dirRemoved: true
- }, {
- relPathDir: DIR_RESOURCES + "9/95/",
- dirRemoved: true
- }, {
- relPathDir: DIR_RESOURCES + "9/96/",
- dirRemoved: true,
- files: ["96text0", "96text1"]
- }, {
- relPathDir: DIR_RESOURCES + "9/97/",
- dirRemoved: true,
- subDirs: ["970/", "971/"],
- subDirFiles: ["97xtext0", "97xtext1"]
- }, {
- relPathDir: DIR_RESOURCES + "9/98/",
- dirRemoved: true
- }, {
- relPathDir: DIR_RESOURCES + "9/99/",
- dirRemoved: true
- }];
-
-// Directories for a complete successful update. This array can be used for a
-// complete failed update by calling setTestFilesAndDirsForFailure.
-var gTestDirsCompleteSuccess = [
- {
- description: "Removed by precomplete (rmdir)",
- relPathDir: DIR_RESOURCES + "2/20/",
- dirRemoved: true
- }, {
- description: "Removed by precomplete (rmdir)",
- relPathDir: DIR_RESOURCES + "2/",
- dirRemoved: true
- }];
-
-// Concatenate the common files to the beginning of the array.
-gTestDirsCompleteSuccess = gTestDirsCommon.concat(gTestDirsCompleteSuccess);
-
-// Directories for a partial successful update. This array can be used for a
-// partial failed update by calling setTestFilesAndDirsForFailure.
-var gTestDirsPartialSuccess = [
- {
- description: "Removed by update.manifest (rmdir)",
- relPathDir: DIR_RESOURCES + "1/10/",
- dirRemoved: true
- }, {
- description: "Removed by update.manifest (rmdir)",
- relPathDir: DIR_RESOURCES + "1/",
- dirRemoved: true
- }];
-
-// Concatenate the common files to the beginning of the array.
-gTestDirsPartialSuccess = gTestDirsCommon.concat(gTestDirsPartialSuccess);
-
-// This makes it possible to run most tests on xulrunner where the update
-// channel default preference is not set.
-if (MOZ_APP_NAME == "xulrunner") {
- try {
- gDefaultPrefBranch.getCharPref(PREF_APP_UPDATE_CHANNEL);
- } catch (e) {
- setUpdateChannel("test_channel");
- }
-}
-
-/**
- * Helper function for setting up the test environment.
- */
-function setupTestCommon() {
- debugDump("start - general test setup");
-
- Assert.strictEqual(gTestID, undefined,
- "gTestID should be 'undefined' (setupTestCommon should " +
- "only be called once)");
-
- let caller = Components.stack.caller;
- gTestID = caller.filename.toString().split("/").pop().split(".")[0];
-
- // Tests that don't work with XULRunner.
- const XUL_RUNNER_INCOMPATIBLE = ["marAppApplyUpdateAppBinInUseStageSuccess_win",
- "marAppApplyUpdateStageSuccess",
- "marAppApplyUpdateSuccess",
- "marAppApplyUpdateAppBinInUseStageSuccessSvc_win",
- "marAppApplyUpdateStageSuccessSvc",
- "marAppApplyUpdateSuccessSvc"];
- // Replace with Array.prototype.includes when it has stabilized.
- if (MOZ_APP_NAME == "xulrunner" &&
- XUL_RUNNER_INCOMPATIBLE.indexOf(gTestID) != -1) {
- logTestInfo("Unable to run this test on xulrunner");
- return false;
- }
-
- if (IS_SERVICE_TEST && !shouldRunServiceTest()) {
- return false;
- }
-
- do_test_pending();
-
- setDefaultPrefs();
-
- // Don't attempt to show a prompt when an update finishes.
- Services.prefs.setBoolPref(PREF_APP_UPDATE_SILENT, true);
-
- gGREDirOrig = getGREDir();
- gGREBinDirOrig = getGREBinDir();
- gAppDirOrig = getAppBaseDir();
-
- let applyDir = getApplyDirFile(null, true).parent;
-
- // Try to remove the directory used to apply updates and the updates directory
- // on platforms other than Windows. Since the test hasn't ran yet and the
- // directory shouldn't exist finished this is non-fatal for the test.
- if (applyDir.exists()) {
- debugDump("attempting to remove directory. Path: " + applyDir.path);
- try {
- removeDirRecursive(applyDir);
- } catch (e) {
- logTestInfo("non-fatal error removing directory. Path: " +
- applyDir.path + ", Exception: " + e);
- // When the application doesn't exit properly it can cause the test to
- // fail again on the second run with an NS_ERROR_FILE_ACCESS_DENIED error
- // along with no useful information in the test log. To prevent this use
- // a different directory for the test when it isn't possible to remove the
- // existing test directory (bug 1294196).
- gTestID += "_new";
- logTestInfo("using a new directory for the test by changing gTestID " +
- "since there is an existing test directory that can't be " +
- "removed, gTestID: " + gTestID);
- }
- }
-
- if (IS_WIN) {
- Services.prefs.setBoolPref(PREF_APP_UPDATE_SERVICE_ENABLED,
- IS_SERVICE_TEST ? true : false);
- }
-
- // adjustGeneralPaths registers a cleanup function that calls end_test when
- // it is defined as a function.
- adjustGeneralPaths();
- // Logged once here instead of in the mock directory provider to lessen test
- // log spam.
- debugDump("Updates Directory (UpdRootD) Path: " + getMockUpdRootD().path);
-
- // This prevents a warning about not being able to find the greprefs.js file
- // from being logged.
- let grePrefsFile = getGREDir();
- if (!grePrefsFile.exists()) {
- grePrefsFile.create(Ci.nsIFile.DIRECTORY_TYPE, PERMS_DIRECTORY);
- }
- grePrefsFile.append("goanna.js");
- if (!grePrefsFile.exists()) {
- grePrefsFile.create(Ci.nsILocalFile.NORMAL_FILE_TYPE, PERMS_FILE);
- }
-
- // Remove the updates directory on Windows and Mac OS X which is located
- // outside of the application directory after the call to adjustGeneralPaths
- // has set it up. Since the test hasn't ran yet and the directory shouldn't
- // exist this is non-fatal for the test.
- if (IS_WIN || IS_MACOSX) {
- let updatesDir = getMockUpdRootD();
- if (updatesDir.exists()) {
- debugDump("attempting to remove directory. Path: " + updatesDir.path);
- try {
- removeDirRecursive(updatesDir);
- } catch (e) {
- logTestInfo("non-fatal error removing directory. Path: " +
- updatesDir.path + ", Exception: " + e);
- }
- }
- }
-
- debugDump("finish - general test setup");
- return true;
-}
-
-/**
- * Nulls out the most commonly used global vars used by tests to prevent leaks
- * as needed and attempts to restore the system to its original state.
- */
-function cleanupTestCommon() {
- debugDump("start - general test cleanup");
-
- // Force the update manager to reload the update data to prevent it from
- // writing the old data to the files that have just been removed.
- reloadUpdateManagerData();
-
- if (gChannel) {
- gPrefRoot.removeObserver(PREF_APP_UPDATE_CHANNEL, observer);
- }
-
- // Call app update's observe method passing xpcom-shutdown to test that the
- // shutdown of app update runs without throwing or leaking. The observer
- // method is used directly instead of calling notifyObservers so components
- // outside of the scope of this test don't assert and thereby cause app update
- // tests to fail.
- gAUS.observe(null, "xpcom-shutdown", "");
-
- gTestserver = null;
-
- if (IS_UNIX) {
- // This will delete the launch script if it exists.
- getLaunchScript();
- }
-
- if (IS_WIN && MOZ_APP_BASENAME) {
- let appDir = getApplyDirFile(null, true);
- let vendor = MOZ_APP_VENDOR ? MOZ_APP_VENDOR : "Mozilla";
- const REG_PATH = "SOFTWARE\\" + vendor + "\\" + MOZ_APP_BASENAME +
- "\\TaskBarIDs";
- let key = Cc["@mozilla.org/windows-registry-key;1"].
- createInstance(Ci.nsIWindowsRegKey);
- try {
- key.open(Ci.nsIWindowsRegKey.ROOT_KEY_LOCAL_MACHINE, REG_PATH,
- Ci.nsIWindowsRegKey.ACCESS_ALL);
- if (key.hasValue(appDir.path)) {
- key.removeValue(appDir.path);
- }
- } catch (e) {
- }
- try {
- key.open(Ci.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER, REG_PATH,
- Ci.nsIWindowsRegKey.ACCESS_ALL);
- if (key.hasValue(appDir.path)) {
- key.removeValue(appDir.path);
- }
- } catch (e) {
- }
- }
-
- // The updates directory is located outside of the application directory and
- // needs to be removed on Windows and Mac OS X.
- if (IS_WIN || IS_MACOSX) {
- let updatesDir = getMockUpdRootD();
- // Try to remove the directory used to apply updates. Since the test has
- // already finished this is non-fatal for the test.
- if (updatesDir.exists()) {
- debugDump("attempting to remove directory. Path: " + updatesDir.path);
- try {
- removeDirRecursive(updatesDir);
- } catch (e) {
- logTestInfo("non-fatal error removing directory. Path: " +
- updatesDir.path + ", Exception: " + e);
- }
- if (IS_MACOSX) {
- let updatesRootDir = gUpdatesRootDir.clone();
- while (updatesRootDir.path != updatesDir.path) {
- if (updatesDir.exists()) {
- debugDump("attempting to remove directory. Path: " +
- updatesDir.path);
- try {
- // Try to remove the directory without the recursive flag set
- // since the top level directory has already had its contents
- // removed and the parent directory might still be used by a
- // different test.
- updatesDir.remove(false);
- } catch (e) {
- logTestInfo("non-fatal error removing directory. Path: " +
- updatesDir.path + ", Exception: " + e);
- if (e == Cr.NS_ERROR_FILE_DIR_NOT_EMPTY) {
- break;
- }
- }
- }
- updatesDir = updatesDir.parent;
- }
- }
- }
- }
-
- let applyDir = getApplyDirFile(null, true).parent;
-
- // Try to remove the directory used to apply updates. Since the test has
- // already finished this is non-fatal for the test.
- if (applyDir.exists()) {
- debugDump("attempting to remove directory. Path: " + applyDir.path);
- try {
- removeDirRecursive(applyDir);
- } catch (e) {
- logTestInfo("non-fatal error removing directory. Path: " +
- applyDir.path + ", Exception: " + e);
- }
- }
-
- resetEnvironment();
-
- debugDump("finish - general test cleanup");
-}
-
-/**
- * Helper function that calls do_test_finished that tracks whether a parallel
- * run of a test passed when it runs synchronously so the log output can be
- * inspected.
- */
-function doTestFinish() {
- if (DEBUG_AUS_TEST) {
- // This prevents do_print errors from being printed by the xpcshell test
- // harness due to nsUpdateService.js logging to the console when the
- // app.update.log preference is true.
- Services.prefs.setBoolPref(PREF_APP_UPDATE_LOG, false);
- gAUS.observe(null, "nsPref:changed", PREF_APP_UPDATE_LOG);
- }
- do_execute_soon(do_test_finished);
-}
-
-/**
- * Sets the most commonly used preferences used by tests
- */
-function setDefaultPrefs() {
- Services.prefs.setBoolPref(PREF_APP_UPDATE_ENABLED, true);
- if (DEBUG_AUS_TEST) {
- // Enable Update logging
- Services.prefs.setBoolPref(PREF_APP_UPDATE_LOG, true);
- } else {
- // Some apps set this preference to true by default
- Services.prefs.setBoolPref(PREF_APP_UPDATE_LOG, false);
- }
- // In case telemetry is enabled for xpcshell tests.
- Services.prefs.setBoolPref(PREF_TOOLKIT_TELEMETRY_ENABLED, false);
-}
-
-/**
- * Helper function for updater binary tests that sets the appropriate values
- * to check for update failures.
- */
-function setTestFilesAndDirsForFailure() {
- gTestFiles.forEach(function STFADFF_Files(aTestFile) {
- aTestFile.compareContents = aTestFile.originalContents;
- aTestFile.compareFile = aTestFile.originalFile;
- aTestFile.comparePerms = aTestFile.originalPerms;
- });
-
- gTestDirs.forEach(function STFADFF_Dirs(aTestDir) {
- aTestDir.dirRemoved = false;
- if (aTestDir.filesRemoved) {
- aTestDir.filesRemoved = false;
- }
- });
-}
-
-/**
- * Helper function for updater binary tests that prevents the distribution
- * directory files from being created.
- */
-function preventDistributionFiles() {
- gTestFiles = gTestFiles.filter(function(aTestFile) {
- return aTestFile.relPathDir.indexOf("distribution/") == -1;
- });
-
- gTestDirs = gTestDirs.filter(function(aTestDir) {
- return aTestDir.relPathDir.indexOf("distribution/") == -1;
- });
-}
-
-/**
- * On Mac OS X this sets the last modified time for the app bundle directory to
- * a date in the past to test that the last modified time is updated when an
- * update has been successfully applied (bug 600098).
- */
-function setAppBundleModTime() {
- if (!IS_MACOSX) {
- return;
- }
- let now = Date.now();
- let yesterday = now - (1000 * 60 * 60 * 24);
- let applyToDir = getApplyDirFile();
- applyToDir.lastModifiedTime = yesterday;
-}
-
-/**
- * On Mac OS X this checks that the last modified time for the app bundle
- * directory has been updated when an update has been successfully applied
- * (bug 600098).
- */
-function checkAppBundleModTime() {
- if (!IS_MACOSX) {
- return;
- }
- let now = Date.now();
- let applyToDir = getApplyDirFile();
- let timeDiff = Math.abs(applyToDir.lastModifiedTime - now);
- Assert.ok(timeDiff < MAC_MAX_TIME_DIFFERENCE,
- "the last modified time on the apply to directory should " +
- "change after a successful update");
-}
-
-/**
- * On Mac OS X and Windows this checks if the post update '.running' file exists
- * to determine if the post update binary was launched.
- *
- * @param aShouldExist
- * Whether the post update '.running' file should exist.
- */
-function checkPostUpdateRunningFile(aShouldExist) {
- if (!IS_WIN && !IS_MACOSX) {
- return;
- }
- let postUpdateRunningFile = getPostUpdateFile(".running");
- if (aShouldExist) {
- Assert.ok(postUpdateRunningFile.exists(),
- MSG_SHOULD_EXIST + getMsgPath(postUpdateRunningFile.path));
- } else {
- Assert.ok(!postUpdateRunningFile.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(postUpdateRunningFile.path));
- }
-}
-
-/**
- * Initializes the most commonly used settings and creates an instance of the
- * update service stub.
- */
-function standardInit() {
- createAppInfo("xpcshell@tests.mozilla.org", APP_INFO_NAME, "1.0", "2.0");
- // Initialize the update service stub component
- initUpdateServiceStub();
-}
-
-/**
- * Helper function for getting the application version from the application.ini
- * file. This will look in both the GRE and the application directories for the
- * application.ini file.
- *
- * @return The version string from the application.ini file.
- */
-function getAppVersion() {
- // Read the application.ini and use its application version.
- let iniFile = gGREDirOrig.clone();
- iniFile.append(FILE_APPLICATION_INI);
- if (!iniFile.exists()) {
- iniFile = gGREBinDirOrig.clone();
- iniFile.append(FILE_APPLICATION_INI);
- }
- Assert.ok(iniFile.exists(),
- MSG_SHOULD_EXIST + getMsgPath(iniFile.path));
- let iniParser = Cc["@mozilla.org/xpcom/ini-parser-factory;1"].
- getService(Ci.nsIINIParserFactory).
- createINIParser(iniFile);
- return iniParser.getString("App", "Version");
-}
-
-/**
- * Helper function for getting the relative path to the directory where the
- * application binary is located (e.g. <test_file_leafname>/dir.app/).
- *
- * Note: The dir.app subdirectory under <test_file_leafname> is needed for
- * platforms other than Mac OS X so the tests can run in parallel due to
- * update staging creating a lock file named moz_update_in_progress.lock in
- * the parent directory of the installation directory.
- *
- * @return The relative path to the directory where application binary is
- * located.
- */
-function getApplyDirPath() {
- return gTestID + "/dir.app/";
-}
-
-/**
- * Helper function for getting the nsIFile for a file in the directory where the
- * update will be applied.
- *
- * The files for the update are located two directories below the apply to
- * directory since Mac OS X sets the last modified time for the root directory
- * to the current time and if the update changes any files in the root directory
- * then it wouldn't be possible to test (bug 600098).
- *
- * @param aRelPath (optional)
- * The relative path to the file or directory to get from the root of
- * the test's directory. If not specified the test's directory will be
- * returned.
- * @param aAllowNonexistent (optional)
- * Whether the file must exist. If false or not specified the file must
- * exist or the function will throw.
- * @return The nsIFile for the file in the directory where the update will be
- * applied.
- * @throws If aAllowNonexistent is not specified or is false and the file or
- * directory does not exist.
- */
-function getApplyDirFile(aRelPath, aAllowNonexistent) {
- let relpath = getApplyDirPath() + (aRelPath ? aRelPath : "");
- return do_get_file(relpath, aAllowNonexistent);
-}
-
-/**
- * Helper function for getting the nsIFile for a file in the directory where the
- * update will be staged.
- *
- * The files for the update are located two directories below the stage
- * directory since Mac OS X sets the last modified time for the root directory
- * to the current time and if the update changes any files in the root directory
- * then it wouldn't be possible to test (bug 600098).
- *
- * @param aRelPath (optional)
- * The relative path to the file or directory to get from the root of
- * the stage directory. If not specified the stage directory will be
- * returned.
- * @param aAllowNonexistent (optional)
- * Whether the file must exist. If false or not specified the file must
- * exist or the function will throw.
- * @return The nsIFile for the file in the directory where the update will be
- * staged.
- * @throws If aAllowNonexistent is not specified or is false and the file or
- * directory does not exist.
- */
-function getStageDirFile(aRelPath, aAllowNonexistent) {
- if (IS_MACOSX) {
- let file = getMockUpdRootD();
- file.append(DIR_UPDATES);
- file.append(DIR_PATCH);
- file.append(DIR_UPDATED);
- if (aRelPath) {
- let pathParts = aRelPath.split("/");
- for (let i = 0; i < pathParts.length; i++) {
- if (pathParts[i]) {
- file.append(pathParts[i]);
- }
- }
- }
- if (!aAllowNonexistent) {
- Assert.ok(file.exists(),
- MSG_SHOULD_EXIST + getMsgPath(file.path));
- }
- return file;
- }
-
- let relpath = getApplyDirPath() + DIR_UPDATED + "/" + (aRelPath ? aRelPath : "");
- return do_get_file(relpath, aAllowNonexistent);
-}
-
-/**
- * Helper function for getting the relative path to the directory where the
- * test data files are located.
- *
- * @return The relative path to the directory where the test data files are
- * located.
- */
-function getTestDirPath() {
- return "../data/";
-}
-
-/**
- * Helper function for getting the nsIFile for a file in the test data
- * directory.
- *
- * @param aRelPath (optional)
- * The relative path to the file or directory to get from the root of
- * the test's data directory. If not specified the test's data
- * directory will be returned.
- * @param aAllowNonExists (optional)
- * Whether or not to throw an error if the path exists.
- * If not specified, then false is used.
- * @return The nsIFile for the file in the test data directory.
- * @throws If the file or directory does not exist.
- */
-function getTestDirFile(aRelPath, aAllowNonExists) {
- let relpath = getTestDirPath() + (aRelPath ? aRelPath : "");
- return do_get_file(relpath, !!aAllowNonExists);
-}
-
-/**
- * Helper function for getting the nsIFile for the maintenance service
- * directory on Windows.
- *
- * @return The nsIFile for the maintenance service directory.
- */
-function getMaintSvcDir() {
- if (!IS_WIN) {
- do_throw("Windows only function called by a different platform!");
- }
-
- const CSIDL_PROGRAM_FILES = 0x26;
- const CSIDL_PROGRAM_FILESX86 = 0x2A;
- // This will return an empty string on our Win XP build systems.
- let maintSvcDir = getSpecialFolderDir(CSIDL_PROGRAM_FILESX86);
- if (maintSvcDir) {
- maintSvcDir.append("Mozilla Maintenance Service");
- debugDump("using CSIDL_PROGRAM_FILESX86 - maintenance service install " +
- "directory path: " + maintSvcDir.path);
- }
- if (!maintSvcDir || !maintSvcDir.exists()) {
- maintSvcDir = getSpecialFolderDir(CSIDL_PROGRAM_FILES);
- if (maintSvcDir) {
- maintSvcDir.append("Mozilla Maintenance Service");
- debugDump("using CSIDL_PROGRAM_FILES - maintenance service install " +
- "directory path: " + maintSvcDir.path);
- }
- }
- if (!maintSvcDir) {
- do_throw("Unable to find the maintenance service install directory");
- }
-
- return maintSvcDir;
-}
-
-/**
- * Get the nsILocalFile for a Windows special folder determined by the CSIDL
- * passed.
- *
- * @param aCSIDL
- * The CSIDL for the Windows special folder.
- * @return The nsILocalFile for the Windows special folder.
- * @throws If called from a platform other than Windows.
- */
-function getSpecialFolderDir(aCSIDL) {
- if (!IS_WIN) {
- do_throw("Windows only function called by a different platform!");
- }
-
- let lib = ctypes.open("shell32");
- let SHGetSpecialFolderPath = lib.declare("SHGetSpecialFolderPathW",
- ctypes.winapi_abi,
- ctypes.bool, /* bool(return) */
- ctypes.int32_t, /* HWND hwndOwner */
- ctypes.char16_t.ptr, /* LPTSTR lpszPath */
- ctypes.int32_t, /* int csidl */
- ctypes.bool /* BOOL fCreate */);
-
- let aryPath = ctypes.char16_t.array()(260);
- let rv = SHGetSpecialFolderPath(0, aryPath, aCSIDL, false);
- lib.close();
-
- let path = aryPath.readString(); // Convert the c-string to js-string
- if (!path) {
- return null;
- }
- debugDump("SHGetSpecialFolderPath returned path: " + path);
- let dir = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
- dir.initWithPath(path);
- return dir;
-}
-
-XPCOMUtils.defineLazyGetter(this, "gInstallDirPathHash", function test_gIDPH() {
- if (!IS_WIN) {
- do_throw("Windows only function called by a different platform!");
- }
-
- // Figure out where we should check for a cached hash value
- if (!MOZ_APP_BASENAME) {
- return null;
- }
-
- let vendor = MOZ_APP_VENDOR ? MOZ_APP_VENDOR : "Mozilla";
- let appDir = getApplyDirFile(null, true);
-
- const REG_PATH = "SOFTWARE\\" + vendor + "\\" + MOZ_APP_BASENAME +
- "\\TaskBarIDs";
- let regKey = Cc["@mozilla.org/windows-registry-key;1"].
- createInstance(Ci.nsIWindowsRegKey);
- try {
- regKey.open(Ci.nsIWindowsRegKey.ROOT_KEY_LOCAL_MACHINE, REG_PATH,
- Ci.nsIWindowsRegKey.ACCESS_ALL);
- regKey.writeStringValue(appDir.path, gTestID);
- return gTestID;
- } catch (e) {
- }
-
- try {
- regKey.create(Ci.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER, REG_PATH,
- Ci.nsIWindowsRegKey.ACCESS_ALL);
- regKey.writeStringValue(appDir.path, gTestID);
- return gTestID;
- } catch (e) {
- logTestInfo("failed to create registry key. Registry Path: " + REG_PATH +
- ", Key Name: " + appDir.path + ", Key Value: " + gTestID +
- ", Exception " + e);
- }
- return null;
-});
-
-XPCOMUtils.defineLazyGetter(this, "gLocalAppDataDir", function test_gLADD() {
- if (!IS_WIN) {
- do_throw("Windows only function called by a different platform!");
- }
-
- const CSIDL_LOCAL_APPDATA = 0x1c;
- return getSpecialFolderDir(CSIDL_LOCAL_APPDATA);
-});
-
-XPCOMUtils.defineLazyGetter(this, "gProgFilesDir", function test_gPFD() {
- if (!IS_WIN) {
- do_throw("Windows only function called by a different platform!");
- }
-
- const CSIDL_PROGRAM_FILES = 0x26;
- return getSpecialFolderDir(CSIDL_PROGRAM_FILES);
-});
-
-/**
- * Helper function for getting the update root directory used by the tests. This
- * returns the same directory as returned by nsXREDirProvider::GetUpdateRootDir
- * in nsXREDirProvider.cpp so an application will be able to find the update
- * when running a test that launches the application.
- */
-function getMockUpdRootD() {
- if (IS_WIN) {
- return getMockUpdRootDWin();
- }
-
- if (IS_MACOSX) {
- return getMockUpdRootDMac();
- }
-
- return getApplyDirFile(DIR_MACOS, true);
-}
-
-/**
- * Helper function for getting the update root directory used by the tests. This
- * returns the same directory as returned by nsXREDirProvider::GetUpdateRootDir
- * in nsXREDirProvider.cpp so an application will be able to find the update
- * when running a test that launches the application.
- */
-function getMockUpdRootDWin() {
- if (!IS_WIN) {
- do_throw("Windows only function called by a different platform!");
- }
-
- let localAppDataDir = gLocalAppDataDir.clone();
- let progFilesDir = gProgFilesDir.clone();
- let appDir = Services.dirsvc.get(XRE_EXECUTABLE_FILE, Ci.nsIFile).parent;
-
- let appDirPath = appDir.path;
- let relPathUpdates = "";
- if (gInstallDirPathHash && (MOZ_APP_VENDOR || MOZ_APP_BASENAME)) {
- relPathUpdates += (MOZ_APP_VENDOR ? MOZ_APP_VENDOR : MOZ_APP_BASENAME) +
- "\\" + DIR_UPDATES + "\\" + gInstallDirPathHash;
- }
-
- if (!relPathUpdates && progFilesDir) {
- if (appDirPath.length > progFilesDir.path.length) {
- if (appDirPath.substr(0, progFilesDir.path.length) == progFilesDir.path) {
- if (MOZ_APP_VENDOR && MOZ_APP_BASENAME) {
- relPathUpdates += MOZ_APP_VENDOR + "\\" + MOZ_APP_BASENAME;
- } else {
- relPathUpdates += MOZ_APP_BASENAME;
- }
- relPathUpdates += appDirPath.substr(progFilesDir.path.length);
- }
- }
- }
-
- if (!relPathUpdates) {
- if (MOZ_APP_VENDOR && MOZ_APP_BASENAME) {
- relPathUpdates += MOZ_APP_VENDOR + "\\" + MOZ_APP_BASENAME;
- } else {
- relPathUpdates += MOZ_APP_BASENAME;
- }
- relPathUpdates += "\\" + MOZ_APP_NAME;
- }
-
- let updatesDir = Cc["@mozilla.org/file/local;1"].
- createInstance(Ci.nsILocalFile);
- updatesDir.initWithPath(localAppDataDir.path + "\\" + relPathUpdates);
- return updatesDir;
-}
-
-XPCOMUtils.defineLazyGetter(this, "gUpdatesRootDir", function test_gURD() {
- if (!IS_MACOSX) {
- do_throw("Mac OS X only function called by a different platform!");
- }
-
- let dir = Services.dirsvc.get("ULibDir", Ci.nsILocalFile);
- dir.append("Caches");
- if (MOZ_APP_VENDOR || MOZ_APP_BASENAME) {
- dir.append(MOZ_APP_VENDOR ? MOZ_APP_VENDOR : MOZ_APP_BASENAME);
- } else {
- dir.append("Mozilla");
- }
- dir.append(DIR_UPDATES);
- return dir;
-});
-
-/**
- * Helper function for getting the update root directory used by the tests. This
- * returns the same directory as returned by nsXREDirProvider::GetUpdateRootDir
- * in nsXREDirProvider.cpp so an application will be able to find the update
- * when running a test that launches the application.
- */
-function getMockUpdRootDMac() {
- if (!IS_MACOSX) {
- do_throw("Mac OS X only function called by a different platform!");
- }
-
- let appDir = Services.dirsvc.get(XRE_EXECUTABLE_FILE, Ci.nsIFile).
- parent.parent.parent;
- let appDirPath = appDir.path;
- appDirPath = appDirPath.substr(0, appDirPath.length - 4);
-
- let pathUpdates = gUpdatesRootDir.path + appDirPath;
- let updatesDir = Cc["@mozilla.org/file/local;1"].
- createInstance(Ci.nsILocalFile);
- updatesDir.initWithPath(pathUpdates);
- return updatesDir;
-}
-
-/**
- * Creates an update in progress lock file in the specified directory on
- * Windows.
- *
- * @param aDir
- * The nsIFile for the directory where the lock file should be created.
- */
-function createUpdateInProgressLockFile(aDir) {
- if (!IS_WIN) {
- do_throw("Windows only function called by a different platform!");
- }
-
- let file = aDir.clone();
- file.append(FILE_UPDATE_IN_PROGRESS_LOCK);
- file.create(file.NORMAL_FILE_TYPE, 0o444);
- file.QueryInterface(Ci.nsILocalFileWin);
- file.fileAttributesWin |= file.WFA_READONLY;
- file.fileAttributesWin &= ~file.WFA_READWRITE;
- Assert.ok(file.exists(),
- MSG_SHOULD_EXIST + getMsgPath(file.path));
- Assert.ok(!file.isWritable(),
- "the lock file should not be writeable");
-}
-
-/**
- * Removes an update in progress lock file in the specified directory on
- * Windows.
- *
- * @param aDir
- * The nsIFile for the directory where the lock file is located.
- */
-function removeUpdateInProgressLockFile(aDir) {
- if (!IS_WIN) {
- do_throw("Windows only function called by a different platform!");
- }
-
- let file = aDir.clone();
- file.append(FILE_UPDATE_IN_PROGRESS_LOCK);
- file.QueryInterface(Ci.nsILocalFileWin);
- file.fileAttributesWin |= file.WFA_READWRITE;
- file.fileAttributesWin &= ~file.WFA_READONLY;
- file.remove(false);
- Assert.ok(!file.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(file.path));
-}
-
-/**
- * Gets the test updater from the test data direcory.
- *
- * @return nsIFIle for the test updater.
- */
-function getTestUpdater() {
- let updater = getTestDirFile("updater.app", true);
- if (!updater.exists()) {
- updater = getTestDirFile(FILE_UPDATER_BIN);
- if (!updater.exists()) {
- do_throw("Unable to find the updater binary!");
- }
- }
- Assert.ok(updater.exists(),
- MSG_SHOULD_EXIST + getMsgPath(updater.path));
- return updater;
-}
-
-/**
- * Copies the test updater to the GRE binary directory and returns the nsIFile
- * for the copied test updater.
- *
- * @return nsIFIle for the copied test updater.
- */
-function copyTestUpdaterToBinDir() {
- let testUpdater = getTestUpdater();
- let updater = getGREBinDir();
- updater.append(testUpdater.leafName);
- if (!updater.exists()) {
- testUpdater.copyToFollowingLinks(updater.parent, updater.leafName);
- }
- return updater;
-}
-
-/**
- * Copies the test updater to the location where it will be launched to apply an
- * update and returns the nsIFile for the copied test updater.
- *
- * @return nsIFIle for the copied test updater.
- */
-function copyTestUpdaterForRunUsingUpdater() {
- if (IS_WIN) {
- return copyTestUpdaterToBinDir();
- }
-
- let testUpdater = getTestUpdater();
- let updater = getUpdatesPatchDir();
- updater.append(testUpdater.leafName);
- if (!updater.exists()) {
- testUpdater.copyToFollowingLinks(updater.parent, updater.leafName);
- }
-
- if (IS_MACOSX) {
- updater.append("Contents");
- updater.append("MacOS");
- updater.append("org.mozilla.updater");
- }
- return updater;
-}
-
-/**
- * Logs the contents of an update log and for maintenance service tests this
- * will log the contents of the latest maintenanceservice.log.
- *
- * @param aLogLeafName
- * The leaf name of the update log.
- */
-function logUpdateLog(aLogLeafName) {
- let updateLog = getUpdateLog(aLogLeafName);
- if (updateLog.exists()) {
- // xpcshell tests won't display the entire contents so log each line.
- let updateLogContents = readFileBytes(updateLog).replace(/\r\n/g, "\n");
- updateLogContents = replaceLogPaths(updateLogContents);
- let aryLogContents = updateLogContents.split("\n");
- logTestInfo("contents of " + updateLog.path + ":");
- aryLogContents.forEach(function RU_LC_FE(aLine) {
- logTestInfo(aLine);
- });
- } else {
- logTestInfo("update log doesn't exist, path: " + updateLog.path);
- }
-
- if (IS_SERVICE_TEST) {
- let serviceLog = getMaintSvcDir();
- serviceLog.append("logs");
- serviceLog.append("maintenanceservice.log");
- if (serviceLog.exists()) {
- // xpcshell tests won't display the entire contents so log each line.
- let serviceLogContents = readFileBytes(serviceLog).replace(/\r\n/g, "\n");
- serviceLogContents = replaceLogPaths(serviceLogContents);
- let aryLogContents = serviceLogContents.split("\n");
- logTestInfo("contents of " + serviceLog.path + ":");
- aryLogContents.forEach(function RU_LC_FE(aLine) {
- logTestInfo(aLine);
- });
- } else {
- logTestInfo("maintenance service log doesn't exist, path: " +
- serviceLog.path);
- }
- }
-}
-
-/**
- * Gets the maintenance service log contents.
- */
-function readServiceLogFile() {
- let file = getMaintSvcDir();
- file.append("logs");
- file.append("maintenanceservice.log");
- return readFile(file);
-}
-
-/**
- * Launches the updater binary to apply an update for updater tests.
- *
- * @param aExpectedStatus
- * The expected value of update.status when the test finishes. For
- * service tests passing STATE_PENDING or STATE_APPLIED will change the
- * value to STATE_PENDING_SVC and STATE_APPLIED_SVC respectively.
- * @param aSwitchApp
- * If true the update should switch the application with an updated
- * staged application and if false the update should be applied to the
- * installed application.
- * @param aExpectedExitValue
- * The expected exit value from the updater binary for non-service
- * tests.
- * @param aCheckSvcLog
- * Whether the service log should be checked for service tests.
- * @param aPatchDirPath (optional)
- * When specified the patch directory path to use for invalid argument
- * tests otherwise the normal path will be used.
- * @param aInstallDirPath (optional)
- * When specified the install directory path to use for invalid
- * argument tests otherwise the normal path will be used.
- * @param aApplyToDirPath (optional)
- * When specified the apply to / working directory path to use for
- * invalid argument tests otherwise the normal path will be used.
- * @param aCallbackPath (optional)
- * When specified the callback path to use for invalid argument tests
- * otherwise the normal path will be used.
- */
-function runUpdate(aExpectedStatus, aSwitchApp, aExpectedExitValue, aCheckSvcLog,
- aPatchDirPath, aInstallDirPath, aApplyToDirPath,
- aCallbackPath) {
- let isInvalidArgTest = !!aPatchDirPath || !!aInstallDirPath ||
- !!aApplyToDirPath || aCallbackPath;
-
- let svcOriginalLog;
- if (IS_SERVICE_TEST) {
- copyFileToTestAppDir(FILE_MAINTENANCE_SERVICE_BIN, false);
- copyFileToTestAppDir(FILE_MAINTENANCE_SERVICE_INSTALLER_BIN, false);
- if (aCheckSvcLog) {
- svcOriginalLog = readServiceLogFile();
- }
- }
-
- // Copy the updater binary to the directory where it will apply updates.
- let updateBin = copyTestUpdaterForRunUsingUpdater();
- Assert.ok(updateBin.exists(),
- MSG_SHOULD_EXIST + getMsgPath(updateBin.path));
-
- let updatesDirPath = aPatchDirPath || getUpdatesPatchDir().path;
- let installDirPath = aInstallDirPath || getApplyDirFile(null, true).path;
- let applyToDirPath = aApplyToDirPath || getApplyDirFile(null, true).path;
- let stageDirPath = aApplyToDirPath || getStageDirFile(null, true).path;
-
- let callbackApp = getApplyDirFile(DIR_RESOURCES + gCallbackBinFile);
- callbackApp.permissions = PERMS_DIRECTORY;
-
- setAppBundleModTime();
-
- let args = [updatesDirPath, installDirPath];
- if (aSwitchApp) {
- args[2] = stageDirPath;
- args[3] = "0/replace";
- } else {
- args[2] = applyToDirPath;
- args[3] = "0";
- }
-
- let launchBin = IS_SERVICE_TEST && isInvalidArgTest ? callbackApp : updateBin;
-
- if (!isInvalidArgTest) {
- args = args.concat([callbackApp.parent.path, callbackApp.path]);
- args = args.concat(gCallbackArgs);
- } else if (IS_SERVICE_TEST) {
- args = ["launch-service", updateBin.path].concat(args);
- } else if (aCallbackPath) {
- args = args.concat([callbackApp.parent.path, aCallbackPath]);
- }
-
- debugDump("launching the program: " + launchBin.path + " " + args.join(" "));
-
- if (aSwitchApp && !isInvalidArgTest) {
- // We want to set the env vars again
- gShouldResetEnv = undefined;
- }
-
- setEnvironment();
-
- let process = Cc["@mozilla.org/process/util;1"].
- createInstance(Ci.nsIProcess);
- process.init(launchBin);
- process.run(true, args, args.length);
-
- resetEnvironment();
-
- let status = readStatusFile();
- if ((!IS_SERVICE_TEST && process.exitValue != aExpectedExitValue) ||
- status != aExpectedStatus) {
- if (process.exitValue != aExpectedExitValue) {
- logTestInfo("updater exited with unexpected value! Got: " +
- process.exitValue + ", Expected: " + aExpectedExitValue);
- }
- if (status != aExpectedStatus) {
- logTestInfo("update status is not the expected status! Got: " + status +
- ", Expected: " + aExpectedStatus);
- }
- logUpdateLog(FILE_LAST_UPDATE_LOG);
- }
-
- if (!IS_SERVICE_TEST) {
- Assert.equal(process.exitValue, aExpectedExitValue,
- "the process exit value" + MSG_SHOULD_EQUAL);
- }
- Assert.equal(status, aExpectedStatus,
- "the update status" + MSG_SHOULD_EQUAL);
-
- if (IS_SERVICE_TEST && aCheckSvcLog) {
- let contents = readServiceLogFile();
- Assert.notEqual(contents, svcOriginalLog,
- "the contents of the maintenanceservice.log should not " +
- "be the same as the original contents");
- if (!isInvalidArgTest) {
- Assert.notEqual(contents.indexOf(LOG_SVC_SUCCESSFUL_LAUNCH), -1,
- "the contents of the maintenanceservice.log should " +
- "contain the successful launch string");
- }
- }
-
- do_execute_soon(runUpdateFinished);
-}
-
-/**
- * Launches the helper binary synchronously with the specified arguments for
- * updater tests.
- *
- * @param aArgs
- * The arguments to pass to the helper binary.
- * @return the process exit value returned by the helper binary.
- */
-function runTestHelperSync(aArgs) {
- let helperBin = getTestDirFile(FILE_HELPER_BIN);
- let process = Cc["@mozilla.org/process/util;1"].
- createInstance(Ci.nsIProcess);
- process.init(helperBin);
- debugDump("Running " + helperBin.path + " " + aArgs.join(" "));
- process.run(true, aArgs, aArgs.length);
- return process.exitValue;
-}
-
-/**
- * Creates a symlink for updater tests.
- */
-function createSymlink() {
- let args = ["setup-symlink", "moz-foo", "moz-bar", "target",
- getApplyDirFile().path + "/" + DIR_RESOURCES + "link"];
- let exitValue = runTestHelperSync(args);
- Assert.equal(exitValue, 0,
- "the helper process exit value should be 0");
- getApplyDirFile(DIR_RESOURCES + "link", false).permissions = 0o666;
- args = ["setup-symlink", "moz-foo2", "moz-bar2", "target2",
- getApplyDirFile().path + "/" + DIR_RESOURCES + "link2", "change-perm"];
- exitValue = runTestHelperSync(args);
- Assert.equal(exitValue, 0,
- "the helper process exit value should be 0");
-}
-
-/**
- * Removes a symlink for updater tests.
- */
-function removeSymlink() {
- let args = ["remove-symlink", "moz-foo", "moz-bar", "target",
- getApplyDirFile().path + "/" + DIR_RESOURCES + "link"];
- let exitValue = runTestHelperSync(args);
- Assert.equal(exitValue, 0,
- "the helper process exit value should be 0");
- args = ["remove-symlink", "moz-foo2", "moz-bar2", "target2",
- getApplyDirFile().path + "/" + DIR_RESOURCES + "link2"];
- exitValue = runTestHelperSync(args);
- Assert.equal(exitValue, 0,
- "the helper process exit value should be 0");
-}
-
-/**
- * Checks a symlink for updater tests.
- */
-function checkSymlink() {
- let args = ["check-symlink",
- getApplyDirFile().path + "/" + DIR_RESOURCES + "link"];
- let exitValue = runTestHelperSync(args);
- Assert.equal(exitValue, 0,
- "the helper process exit value should be 0");
-}
-
-/**
- * Sets the active update and related information for updater tests.
- */
-function setupActiveUpdate() {
- let state = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
- let channel = gDefaultPrefBranch.getCharPref(PREF_APP_UPDATE_CHANNEL);
- let patches = getLocalPatchString(null, null, null, null, null, "true",
- state);
- let updates = getLocalUpdateString(patches, null, null, null, null, null,
- null, null, null, null, "true", channel);
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
- writeVersionFile(DEFAULT_UPDATE_VERSION);
- writeStatusFile(state);
- reloadUpdateManagerData();
- Assert.ok(!!gUpdateManager.activeUpdate,
- "the active update should be defined");
-}
-
-/**
- * Gets the specified update log.
- *
- * @param aLogLeafName
- * The leaf name of the log to get.
- * @return nsIFile for the update log.
- */
-function getUpdateLog(aLogLeafName) {
- let updateLog = getUpdatesDir();
- if (aLogLeafName == FILE_UPDATE_LOG) {
- updateLog.append(DIR_PATCH);
- }
- updateLog.append(aLogLeafName);
- return updateLog;
-}
-
-/**
- * The update-staged observer for the call to nsIUpdateProcessor:processUpdate.
- */
-const gUpdateStagedObserver = {
- observe: function(aSubject, aTopic, aData) {
- debugDump("observe called with topic: " + aTopic + ", data: " + aData);
- if (aTopic == "update-staged") {
- Services.obs.removeObserver(gUpdateStagedObserver, "update-staged");
- // The environment is reset after the update-staged observer topic because
- // processUpdate in nsIUpdateProcessor uses a new thread and clearing the
- // environment immediately after calling processUpdate can clear the
- // environment before the updater is launched.
- resetEnvironment();
- // Use do_execute_soon to prevent any failures from propagating to the
- // update service.
- do_execute_soon(checkUpdateStagedState.bind(null, aData));
- }
- },
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver])
-};
-
-/**
- * Stages an update using nsIUpdateProcessor:processUpdate for updater tests.
- *
- * @param aCheckSvcLog
- * Whether the service log should be checked for service tests.
- */
-function stageUpdate(aCheckSvcLog) {
- debugDump("start - attempting to stage update");
-
- if (IS_SERVICE_TEST && aCheckSvcLog) {
- gSvcOriginalLogContents = readServiceLogFile();
- }
-
- Services.obs.addObserver(gUpdateStagedObserver, "update-staged", false);
-
- setAppBundleModTime();
- setEnvironment();
- // Stage the update.
- Cc["@mozilla.org/updates/update-processor;1"].
- createInstance(Ci.nsIUpdateProcessor).
- processUpdate(gUpdateManager.activeUpdate);
-
- // The environment is not reset here because processUpdate in
- // nsIUpdateProcessor uses a new thread and clearing the environment
- // immediately after calling processUpdate can clear the environment before
- // the updater is launched. Instead it is reset after the update-staged
- // observer topic.
-
- debugDump("finish - attempting to stage update");
-}
-
-/**
- * Checks that the update state is correct as well as the expected files are
- * present after staging and update for updater tests and then calls
- * stageUpdateFinished.
- *
- * @param aUpdateState
- * The update state received by the observer notification.
- */
-function checkUpdateStagedState(aUpdateState) {
- if (IS_WIN) {
- if (IS_SERVICE_TEST) {
- waitForServiceStop(false);
- } else {
- let updater = getApplyDirFile(FILE_UPDATER_BIN, true);
- if (isFileInUse(updater)) {
- do_timeout(FILE_IN_USE_TIMEOUT_MS,
- checkUpdateStagedState.bind(null, aUpdateState));
- return;
- }
- }
- }
-
- Assert.equal(aUpdateState, STATE_AFTER_STAGE,
- "the notified state" + MSG_SHOULD_EQUAL);
-
- if (!gStagingRemovedUpdate) {
- Assert.equal(readStatusState(), STATE_AFTER_STAGE,
- "the status file state" + MSG_SHOULD_EQUAL);
-
- Assert.equal(gUpdateManager.activeUpdate.state, STATE_AFTER_STAGE,
- "the update state" + MSG_SHOULD_EQUAL);
- }
-
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_AFTER_STAGE,
- "the update state" + MSG_SHOULD_EQUAL);
-
- let log = getUpdateLog(FILE_LAST_UPDATE_LOG);
- Assert.ok(log.exists(),
- MSG_SHOULD_EXIST + getMsgPath(log.path));
-
- log = getUpdateLog(FILE_UPDATE_LOG);
- Assert.ok(!log.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(log.path));
-
- log = getUpdateLog(FILE_BACKUP_UPDATE_LOG);
- Assert.ok(!log.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(log.path));
-
- let stageDir = getStageDirFile(null, true);
- if (STATE_AFTER_STAGE == STATE_APPLIED ||
- STATE_AFTER_STAGE == STATE_APPLIED_SVC) {
- Assert.ok(stageDir.exists(),
- MSG_SHOULD_EXIST + getMsgPath(stageDir.path));
- } else {
- Assert.ok(!stageDir.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(stageDir.path));
- }
-
- if (IS_SERVICE_TEST && gSvcOriginalLogContents !== undefined) {
- let contents = readServiceLogFile();
- Assert.notEqual(contents, gSvcOriginalLogContents,
- "the contents of the maintenanceservice.log should not " +
- "be the same as the original contents");
- Assert.notEqual(contents.indexOf(LOG_SVC_SUCCESSFUL_LAUNCH), -1,
- "the contents of the maintenanceservice.log should " +
- "contain the successful launch string");
- }
-
- do_execute_soon(stageUpdateFinished);
-}
-
-/**
- * Helper function to check whether the maintenance service updater tests should
- * run. See bug 711660 for more details.
- *
- * @return true if the test should run and false if it shouldn't.
- */
-function shouldRunServiceTest() {
- if (!IS_WIN) {
- do_throw("Windows only function called by a different platform!");
- }
-
- let binDir = getGREBinDir();
- let updaterBin = binDir.clone();
- updaterBin.append(FILE_UPDATER_BIN);
- Assert.ok(updaterBin.exists(),
- MSG_SHOULD_EXIST + ", leafName: " + updaterBin.leafName);
-
- let updaterBinPath = updaterBin.path;
- if (/ /.test(updaterBinPath)) {
- updaterBinPath = '"' + updaterBinPath + '"';
- }
-
- let isBinSigned = isBinarySigned(updaterBinPath);
-
- const REG_PATH = "SOFTWARE\\Mozilla\\MaintenanceService\\" +
- "3932ecacee736d366d6436db0f55bce4";
- let key = Cc["@mozilla.org/windows-registry-key;1"].
- createInstance(Ci.nsIWindowsRegKey);
- try {
- key.open(Ci.nsIWindowsRegKey.ROOT_KEY_LOCAL_MACHINE, REG_PATH,
- Ci.nsIWindowsRegKey.ACCESS_READ | key.WOW64_64);
- } catch (e) {
- // The build system could sign the files and not have the test registry key
- // in which case we should fail the test if the updater binary is signed so
- // the build system can be fixed by adding the registry key.
- if (IS_AUTHENTICODE_CHECK_ENABLED) {
- Assert.ok(!isBinSigned,
- "the updater.exe binary should not be signed when the test " +
- "registry key doesn't exist (if it is, build system " +
- "configuration bug?)");
- }
-
- logTestInfo("this test can only run on the buildbot build system at this " +
- "time");
- return false;
- }
-
- // Check to make sure the service is installed
- let args = ["wait-for-service-stop", "MozillaMaintenance", "10"];
- let exitValue = runTestHelperSync(args);
- Assert.notEqual(exitValue, 0xEE, "the maintenance service should be " +
- "installed (if not, build system configuration bug?)");
-
- if (IS_AUTHENTICODE_CHECK_ENABLED) {
- // The test registry key exists and IS_AUTHENTICODE_CHECK_ENABLED is true
- // so the binaries should be signed. To run the test locally
- // DISABLE_UPDATER_AUTHENTICODE_CHECK can be defined.
- Assert.ok(isBinSigned,
- "the updater.exe binary should be signed (if not, build system " +
- "configuration bug?)");
- }
-
- // In case the machine is running an old maintenance service or if it
- // is not installed, and permissions exist to install it. Then install
- // the newer bin that we have since all of the other checks passed.
- return attemptServiceInstall();
-}
-
-/**
- * Helper function to check whether the a binary is signed.
- *
- * @param aBinPath
- * The path to the file to check if it is signed.
- * @return true if the file is signed and false if it isn't.
- */
-function isBinarySigned(aBinPath) {
- let args = ["check-signature", aBinPath];
- let exitValue = runTestHelperSync(args);
- if (exitValue != 0) {
- logTestInfo("binary is not signed. " + FILE_HELPER_BIN + " returned " +
- exitValue + " for file " + aBinPath);
- return false;
- }
- return true;
-}
-
-/**
- * Helper function for asynchronously setting up the application files required
- * to launch the application for the updater tests by either copying or creating
- * symlinks for the files. This is needed for Windows debug builds which can
- * lock a file that is being copied so that the tests can run in parallel. After
- * the files have been copied the setupUpdaterTestFinished function will be
- * called.
- */
-function setupAppFilesAsync() {
- gTimeoutRuns++;
- try {
- setupAppFiles();
- } catch (e) {
- if (gTimeoutRuns > MAX_TIMEOUT_RUNS) {
- do_throw("Exceeded MAX_TIMEOUT_RUNS while trying to setup application " +
- "files! Exception: " + e);
- }
- do_execute_soon(setupAppFilesAsync);
- return;
- }
-
- do_execute_soon(setupUpdaterTestFinished);
-}
-
-/**
- * Helper function for setting up the application files required to launch the
- * application for the updater tests by either copying or creating symlinks to
- * the files.
- */
-function setupAppFiles() {
- debugDump("start - copying or creating symlinks to application files " +
- "for the test");
-
- let destDir = getApplyDirFile(null, true);
- if (!destDir.exists()) {
- try {
- destDir.create(Ci.nsIFile.DIRECTORY_TYPE, PERMS_DIRECTORY);
- } catch (e) {
- logTestInfo("unable to create directory! Path: " + destDir.path +
- ", Exception: " + e);
- do_throw(e);
- }
- }
-
- // Required files for the application or the test that aren't listed in the
- // dependentlibs.list file.
- let appFiles = [{relPath: FILE_APP_BIN,
- inGreDir: false},
- {relPath: FILE_APPLICATION_INI,
- inGreDir: true},
- {relPath: "dependentlibs.list",
- inGreDir: true}];
-
- // On Linux the updater.png must also be copied
- if (IS_UNIX && !IS_MACOSX) {
- appFiles.push({relPath: "icons/updater.png",
- inGreDir: true});
- }
-
- // Read the dependent libs file leafnames from the dependentlibs.list file
- // into the array.
- let deplibsFile = gGREDirOrig.clone();
- deplibsFile.append("dependentlibs.list");
- let fis = Cc["@mozilla.org/network/file-input-stream;1"].
- createInstance(Ci.nsIFileInputStream);
- fis.init(deplibsFile, 0x01, 0o444, Ci.nsIFileInputStream.CLOSE_ON_EOF);
- fis.QueryInterface(Ci.nsILineInputStream);
-
- let hasMore;
- let line = {};
- do {
- hasMore = fis.readLine(line);
- appFiles.push({relPath: line.value,
- inGreDir: false});
- } while (hasMore);
-
- fis.close();
-
- appFiles.forEach(function CMAF_FLN_FE(aAppFile) {
- copyFileToTestAppDir(aAppFile.relPath, aAppFile.inGreDir);
- });
-
- copyTestUpdaterToBinDir();
-
- debugDump("finish - copying or creating symlinks to application files " +
- "for the test");
-}
-
-/**
- * Copies the specified files from the dist/bin directory into the test's
- * application directory.
- *
- * @param aFileRelPath
- * The relative path to the source and the destination of the file to
- * copy.
- * @param aInGreDir
- * Whether the file is located in the GRE directory which is
- * <bundle>/Contents/Resources on Mac OS X and is the installation
- * directory on all other platforms. If false the file must be in the
- * GRE Binary directory which is <bundle>/Contents/MacOS on Mac OS X
- * and is the installation directory on on all other platforms.
- */
-function copyFileToTestAppDir(aFileRelPath, aInGreDir) {
- // gGREDirOrig and gGREBinDirOrig must always be cloned when changing its
- // properties
- let srcFile = aInGreDir ? gGREDirOrig.clone() : gGREBinDirOrig.clone();
- let destFile = aInGreDir ? getGREDir() : getGREBinDir();
- let fileRelPath = aFileRelPath;
- let pathParts = fileRelPath.split("/");
- for (let i = 0; i < pathParts.length; i++) {
- if (pathParts[i]) {
- srcFile.append(pathParts[i]);
- destFile.append(pathParts[i]);
- }
- }
-
- if (IS_MACOSX && !srcFile.exists()) {
- debugDump("unable to copy file since it doesn't exist! Checking if " +
- fileRelPath + ".app exists. Path: " + srcFile.path);
- // gGREDirOrig and gGREBinDirOrig must always be cloned when changing its
- // properties
- srcFile = aInGreDir ? gGREDirOrig.clone() : gGREBinDirOrig.clone();
- destFile = aInGreDir ? getGREDir() : getGREBinDir();
- for (let i = 0; i < pathParts.length; i++) {
- if (pathParts[i]) {
- srcFile.append(pathParts[i] + (pathParts.length - 1 == i ? ".app" : ""));
- destFile.append(pathParts[i] + (pathParts.length - 1 == i ? ".app" : ""));
- }
- }
- fileRelPath = fileRelPath + ".app";
- }
- Assert.ok(srcFile.exists(),
- MSG_SHOULD_EXIST + ", leafName: " + srcFile.leafName);
-
- // Symlink libraries. Note that the XUL library on Mac OS X doesn't have a
- // file extension and shouldSymlink will always be false on Windows.
- let shouldSymlink = (pathParts[pathParts.length - 1] == "XUL" ||
- fileRelPath.substr(fileRelPath.length - 3) == ".so" ||
- fileRelPath.substr(fileRelPath.length - 6) == ".dylib");
- if (!shouldSymlink) {
- if (!destFile.exists()) {
- try {
- srcFile.copyToFollowingLinks(destFile.parent, destFile.leafName);
- } catch (e) {
- // Just in case it is partially copied
- if (destFile.exists()) {
- try {
- destFile.remove(true);
- } catch (ex) {
- logTestInfo("unable to remove file that failed to copy! Path: " +
- destFile.path);
- }
- }
- do_throw("Unable to copy file! Path: " + srcFile.path +
- ", Exception: " + ex);
- }
- }
- } else {
- try {
- if (destFile.exists()) {
- destFile.remove(false);
- }
- let ln = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
- ln.initWithPath("/bin/ln");
- let process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
- process.init(ln);
- let args = ["-s", srcFile.path, destFile.path];
- process.run(true, args, args.length);
- Assert.ok(destFile.isSymlink(),
- destFile.leafName + " should be a symlink");
- } catch (e) {
- do_throw("Unable to create symlink for file! Path: " + srcFile.path +
- ", Exception: " + e);
- }
- }
-}
-
-/**
- * Attempts to upgrade the maintenance service if permissions are allowed.
- * This is useful for XP where we have permission to upgrade in case an
- * older service installer exists. Also if the user manually installed into
- * a unprivileged location.
- *
- * @return true if the installed service is from this build. If the installed
- * service is not from this build the test will fail instead of
- * returning false.
- */
-function attemptServiceInstall() {
- if (!IS_WIN) {
- do_throw("Windows only function called by a different platform!");
- }
-
- let maintSvcDir = getMaintSvcDir();
- Assert.ok(maintSvcDir.exists(),
- MSG_SHOULD_EXIST + ", leafName: " + maintSvcDir.leafName);
- let oldMaintSvcBin = maintSvcDir.clone();
- oldMaintSvcBin.append(FILE_MAINTENANCE_SERVICE_BIN);
- Assert.ok(oldMaintSvcBin.exists(),
- MSG_SHOULD_EXIST + ", leafName: " + oldMaintSvcBin.leafName);
- let buildMaintSvcBin = getGREBinDir();
- buildMaintSvcBin.append(FILE_MAINTENANCE_SERVICE_BIN);
- if (readFileBytes(oldMaintSvcBin) == readFileBytes(buildMaintSvcBin)) {
- debugDump("installed maintenance service binary is the same as the " +
- "build's maintenance service binary");
- return true;
- }
- let backupMaintSvcBin = maintSvcDir.clone();
- backupMaintSvcBin.append(FILE_MAINTENANCE_SERVICE_BIN + ".backup");
- try {
- if (backupMaintSvcBin.exists()) {
- backupMaintSvcBin.remove(false);
- }
- oldMaintSvcBin.moveTo(maintSvcDir, FILE_MAINTENANCE_SERVICE_BIN + ".backup");
- buildMaintSvcBin.copyTo(maintSvcDir, FILE_MAINTENANCE_SERVICE_BIN);
- backupMaintSvcBin.remove(false);
- } catch (e) {
- // Restore the original file in case the moveTo was successful.
- if (backupMaintSvcBin.exists()) {
- oldMaintSvcBin = maintSvcDir.clone();
- oldMaintSvcBin.append(FILE_MAINTENANCE_SERVICE_BIN);
- if (!oldMaintSvcBin.exists()) {
- backupMaintSvcBin.moveTo(maintSvcDir, FILE_MAINTENANCE_SERVICE_BIN);
- }
- }
- Assert.ok(false, "should be able copy the test maintenance service to " +
- "the maintenance service directory (if not, build system " +
- "configuration bug?), path: " + maintSvcDir.path);
- }
-
- return true;
-}
-
-/**
- * Waits for the applications that are launched by the maintenance service to
- * stop.
- */
-function waitServiceApps() {
- if (!IS_WIN) {
- do_throw("Windows only function called by a different platform!");
- }
-
- // maintenanceservice_installer.exe is started async during updates.
- waitForApplicationStop("maintenanceservice_installer.exe");
- // maintenanceservice_tmp.exe is started async from the service installer.
- waitForApplicationStop("maintenanceservice_tmp.exe");
- // In case the SCM thinks the service is stopped, but process still exists.
- waitForApplicationStop("maintenanceservice.exe");
-}
-
-/**
- * Waits for the maintenance service to stop.
- */
-function waitForServiceStop(aFailTest) {
- if (!IS_WIN) {
- do_throw("Windows only function called by a different platform!");
- }
-
- waitServiceApps();
- debugDump("waiting for the maintenance service to stop if necessary");
- // Use the helper bin to ensure the service is stopped. If not stopped, then
- // wait for the service to stop (at most 120 seconds).
- let args = ["wait-for-service-stop", "MozillaMaintenance", "120"];
- let exitValue = runTestHelperSync(args);
- Assert.notEqual(exitValue, 0xEE,
- "the maintenance service should exist");
- if (exitValue != 0) {
- if (aFailTest) {
- Assert.ok(false, "the maintenance service should stop, process exit " +
- "value: " + exitValue);
- }
- logTestInfo("maintenance service did not stop which may cause test " +
- "failures later, process exit value: " + exitValue);
- } else {
- debugDump("service stopped");
- }
- waitServiceApps();
-}
-
-/**
- * Waits for the specified application to stop.
- *
- * @param aApplication
- * The application binary name to wait until it has stopped.
- */
-function waitForApplicationStop(aApplication) {
- if (!IS_WIN) {
- do_throw("Windows only function called by a different platform!");
- }
-
- debugDump("waiting for " + aApplication + " to stop if necessary");
- // Use the helper bin to ensure the application is stopped. If not stopped,
- // then wait for it to stop (at most 120 seconds).
- let args = ["wait-for-application-exit", aApplication, "120"];
- let exitValue = runTestHelperSync(args);
- Assert.equal(exitValue, 0,
- "the process should have stopped, process name: " +
- aApplication);
-}
-
-
-/**
- * Gets the platform specific shell binary that is launched using nsIProcess and
- * in turn launches a binary used for the test (e.g. application, updater,
- * etc.). A shell is used so debug console output can be redirected to a file so
- * it doesn't end up in the test log.
- *
- * @return nsIFile for the shell binary to launch using nsIProcess.
- */
-function getLaunchBin() {
- let launchBin;
- if (IS_WIN) {
- launchBin = Services.dirsvc.get("WinD", Ci.nsIFile);
- launchBin.append("System32");
- launchBin.append("cmd.exe");
- } else {
- launchBin = Cc["@mozilla.org/file/local;1"].
- createInstance(Ci.nsILocalFile);
- launchBin.initWithPath("/bin/sh");
- }
- Assert.ok(launchBin.exists(),
- MSG_SHOULD_EXIST + getMsgPath(launchBin.path));
-
- return launchBin;
-}
-
-
-/**
- * Locks a Windows directory.
- *
- * @param aDirPath
- * The test file object that describes the file to make in use.
- */
-function lockDirectory(aDirPath) {
- if (!IS_WIN) {
- do_throw("Windows only function called by a different platform!");
- }
-
- debugDump("start - locking installation directory");
- const LPCWSTR = ctypes.char16_t.ptr;
- const DWORD = ctypes.uint32_t;
- const LPVOID = ctypes.voidptr_t;
- const GENERIC_READ = 0x80000000;
- const FILE_SHARE_READ = 1;
- const FILE_SHARE_WRITE = 2;
- const OPEN_EXISTING = 3;
- const FILE_FLAG_BACKUP_SEMANTICS = 0x02000000;
- const INVALID_HANDLE_VALUE = LPVOID(0xffffffff);
- let kernel32 = ctypes.open("kernel32");
- let CreateFile = kernel32.declare("CreateFileW", ctypes.default_abi,
- LPVOID, LPCWSTR, DWORD, DWORD,
- LPVOID, DWORD, DWORD, LPVOID);
- gHandle = CreateFile(aDirPath, GENERIC_READ,
- FILE_SHARE_READ | FILE_SHARE_WRITE, LPVOID(0),
- OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, LPVOID(0));
- Assert.notEqual(gHandle.toString(), INVALID_HANDLE_VALUE.toString(),
- "the handle should not equal INVALID_HANDLE_VALUE");
- kernel32.close();
- debugDump("finish - locking installation directory");
-}
-
-/**
- * Launches the test helper binary to make it in use for updater tests and then
- * calls waitForHelperSleep.
- *
- * @param aTestFile
- * The test file object that describes the file to make in use.
- */
-function runHelperFileInUse(aRelPath, aCopyTestHelper) {
- logTestInfo("aRelPath: " + aRelPath);
- // Launch an existing file so it is in use during the update.
- let helperBin = getTestDirFile(FILE_HELPER_BIN);
- let fileInUseBin = getApplyDirFile(aRelPath);
- if (aCopyTestHelper) {
- fileInUseBin.remove(false);
- helperBin.copyTo(fileInUseBin.parent, fileInUseBin.leafName);
- }
- fileInUseBin.permissions = PERMS_DIRECTORY;
- let args = [getApplyDirPath() + DIR_RESOURCES, "input", "output", "-s",
- HELPER_SLEEP_TIMEOUT];
- let fileInUseProcess = Cc["@mozilla.org/process/util;1"].
- createInstance(Ci.nsIProcess);
- fileInUseProcess.init(fileInUseBin);
- fileInUseProcess.run(false, args, args.length);
-
- do_execute_soon(waitForHelperSleep);
-}
-
-/**
- * Launches the test helper binary and locks a file specified on the command
- * line for updater tests and then calls waitForHelperSleep.
- *
- * @param aTestFile
- * The test file object that describes the file to lock.
- */
-function runHelperLockFile(aTestFile) {
- // Exclusively lock an existing file so it is in use during the update.
- let helperBin = getTestDirFile(FILE_HELPER_BIN);
- let helperDestDir = getApplyDirFile(DIR_RESOURCES);
- helperBin.copyTo(helperDestDir, FILE_HELPER_BIN);
- helperBin = getApplyDirFile(DIR_RESOURCES + FILE_HELPER_BIN);
- // Strip off the first two directories so the path has to be from the helper's
- // working directory.
- let lockFileRelPath = aTestFile.relPathDir.split("/");
- if (IS_MACOSX) {
- lockFileRelPath = lockFileRelPath.slice(2);
- }
- lockFileRelPath = lockFileRelPath.join("/") + "/" + aTestFile.fileName;
- let args = [getApplyDirPath() + DIR_RESOURCES, "input", "output", "-s",
- HELPER_SLEEP_TIMEOUT, lockFileRelPath];
- let helperProcess = Cc["@mozilla.org/process/util;1"].
- createInstance(Ci.nsIProcess);
- helperProcess.init(helperBin);
- helperProcess.run(false, args, args.length);
-
- do_execute_soon(waitForHelperSleep);
-}
-
-/**
- * Helper function that waits until the helper has completed its operations and
- * calls waitForHelperSleepFinished when it is finished.
- */
-function waitForHelperSleep() {
- gTimeoutRuns++;
- // Give the lock file process time to lock the file before updating otherwise
- // this test can fail intermittently on Windows debug builds.
- let output = getApplyDirFile(DIR_RESOURCES + "output", true);
- if (readFile(output) != "sleeping\n") {
- if (gTimeoutRuns > MAX_TIMEOUT_RUNS) {
- do_throw("Exceeded MAX_TIMEOUT_RUNS while waiting for the helper to " +
- "finish its operation. Path: " + output.path);
- }
- // Uses do_timeout instead of do_execute_soon to lessen log spew.
- do_timeout(FILE_IN_USE_TIMEOUT_MS, waitForHelperSleep);
- return;
- }
- try {
- output.remove(false);
- } catch (e) {
- if (gTimeoutRuns > MAX_TIMEOUT_RUNS) {
- do_throw("Exceeded MAX_TIMEOUT_RUNS while waiting for the helper " +
- "message file to no longer be in use. Path: " + output.path);
- }
- debugDump("failed to remove file. Path: " + output.path);
- // Uses do_timeout instead of do_execute_soon to lessen log spew.
- do_timeout(FILE_IN_USE_TIMEOUT_MS, waitForHelperSleep);
- return;
- }
- waitForHelperSleepFinished();
-}
-
-/**
- * Helper function that waits until the helper has finished its operations
- * before calling waitForHelperFinishFileUnlock to verify that the helper's
- * input and output directories are no longer in use.
- */
-function waitForHelperFinished() {
- // Give the lock file process time to lock the file before updating otherwise
- // this test can fail intermittently on Windows debug builds.
- let output = getApplyDirFile(DIR_RESOURCES + "output", true);
- if (readFile(output) != "finished\n") {
- // Uses do_timeout instead of do_execute_soon to lessen log spew.
- do_timeout(FILE_IN_USE_TIMEOUT_MS, waitForHelperFinished);
- return;
- }
- // Give the lock file process time to unlock the file before deleting the
- // input and output files.
- waitForHelperFinishFileUnlock();
-}
-
-/**
- * Helper function that waits until the helper's input and output files are no
- * longer in use before calling waitForHelperExitFinished.
- */
-function waitForHelperFinishFileUnlock() {
- try {
- let output = getApplyDirFile(DIR_RESOURCES + "output", true);
- if (output.exists()) {
- output.remove(false);
- }
- let input = getApplyDirFile(DIR_RESOURCES + "input", true);
- if (input.exists()) {
- input.remove(false);
- }
- } catch (e) {
- // Give the lock file process time to unlock the file before deleting the
- // input and output files.
- do_execute_soon(waitForHelperFinishFileUnlock);
- return;
- }
- do_execute_soon(waitForHelperExitFinished);
-}
-
-/**
- * Helper function to tell the helper to finish and exit its sleep state.
- */
-function waitForHelperExit() {
- let input = getApplyDirFile(DIR_RESOURCES + "input", true);
- writeFile(input, "finish\n");
- waitForHelperFinished();
-}
-
-/**
- * Helper function for updater binary tests that creates the files and
- * directories used by the test.
- *
- * @param aMarFile
- * The mar file for the update test.
- * @param aPostUpdateAsync
- * When null the updater.ini is not created otherwise this parameter
- * is passed to createUpdaterINI.
- * @param aPostUpdateExeRelPathPrefix
- * When aPostUpdateAsync null this value is ignored otherwise it is
- * passed to createUpdaterINI.
- */
-function setupUpdaterTest(aMarFile, aPostUpdateAsync,
- aPostUpdateExeRelPathPrefix = "") {
- let updatesPatchDir = getUpdatesPatchDir();
- if (!updatesPatchDir.exists()) {
- updatesPatchDir.create(Ci.nsIFile.DIRECTORY_TYPE, PERMS_DIRECTORY);
- }
- // Copy the mar that will be applied
- let mar = getTestDirFile(aMarFile);
- mar.copyToFollowingLinks(updatesPatchDir, FILE_UPDATE_MAR);
-
- let helperBin = getTestDirFile(FILE_HELPER_BIN);
- helperBin.permissions = PERMS_DIRECTORY;
- let afterApplyBinDir = getApplyDirFile(DIR_RESOURCES, true);
- helperBin.copyToFollowingLinks(afterApplyBinDir, gCallbackBinFile);
- helperBin.copyToFollowingLinks(afterApplyBinDir, gPostUpdateBinFile);
-
- gTestFiles.forEach(function SUT_TF_FE(aTestFile) {
- if (aTestFile.originalFile || aTestFile.originalContents) {
- let testDir = getApplyDirFile(aTestFile.relPathDir, true);
- if (!testDir.exists()) {
- testDir.create(Ci.nsIFile.DIRECTORY_TYPE, PERMS_DIRECTORY);
- }
-
- let testFile;
- if (aTestFile.originalFile) {
- testFile = getTestDirFile(aTestFile.originalFile);
- testFile.copyToFollowingLinks(testDir, aTestFile.fileName);
- testFile = getApplyDirFile(aTestFile.relPathDir + aTestFile.fileName);
- } else {
- testFile = getApplyDirFile(aTestFile.relPathDir + aTestFile.fileName,
- true);
- writeFile(testFile, aTestFile.originalContents);
- }
-
- // Skip these tests on Windows since chmod doesn't really set permissions
- // on Windows.
- if (!IS_WIN && aTestFile.originalPerms) {
- testFile.permissions = aTestFile.originalPerms;
- // Store the actual permissions on the file for reference later after
- // setting the permissions.
- if (!aTestFile.comparePerms) {
- aTestFile.comparePerms = testFile.permissions;
- }
- }
- }
- });
-
- // Add the test directory that will be updated for a successful update or left
- // in the initial state for a failed update.
- gTestDirs.forEach(function SUT_TD_FE(aTestDir) {
- let testDir = getApplyDirFile(aTestDir.relPathDir, true);
- if (!testDir.exists()) {
- testDir.create(Ci.nsIFile.DIRECTORY_TYPE, PERMS_DIRECTORY);
- }
-
- if (aTestDir.files) {
- aTestDir.files.forEach(function SUT_TD_F_FE(aTestFile) {
- let testFile = getApplyDirFile(aTestDir.relPathDir + aTestFile, true);
- if (!testFile.exists()) {
- testFile.create(Ci.nsIFile.NORMAL_FILE_TYPE, PERMS_FILE);
- }
- });
- }
-
- if (aTestDir.subDirs) {
- aTestDir.subDirs.forEach(function SUT_TD_SD_FE(aSubDir) {
- let testSubDir = getApplyDirFile(aTestDir.relPathDir + aSubDir, true);
- if (!testSubDir.exists()) {
- testSubDir.create(Ci.nsIFile.DIRECTORY_TYPE, PERMS_DIRECTORY);
- }
-
- if (aTestDir.subDirFiles) {
- aTestDir.subDirFiles.forEach(function SUT_TD_SDF_FE(aTestFile) {
- let testFile = getApplyDirFile(aTestDir.relPathDir + aSubDir + aTestFile, true);
- if (!testFile.exists()) {
- testFile.create(Ci.nsIFile.NORMAL_FILE_TYPE, PERMS_FILE);
- }
- });
- }
- });
- }
- });
-
- setupActiveUpdate();
-
- if (aPostUpdateAsync !== null) {
- createUpdaterINI(aPostUpdateAsync, aPostUpdateExeRelPathPrefix);
- }
-
- setupAppFilesAsync();
-}
-
-/**
- * Helper function for updater binary tests that creates the update-settings.ini
- * file.
- */
-function createUpdateSettingsINI() {
- let ini = getApplyDirFile(DIR_RESOURCES + FILE_UPDATE_SETTINGS_INI, true);
- writeFile(ini, UPDATE_SETTINGS_CONTENTS);
-}
-
-/**
- * Helper function for updater binary tests that creates the updater.ini
- * file.
- *
- * @param aIsExeAsync
- * True or undefined if the post update process should be async. If
- * undefined ExeAsync will not be added to the updater.ini file in
- * order to test the default launch behavior which is async.
- * @param aExeRelPathPrefix
- * A string to prefix the ExeRelPath values in the updater.ini.
- */
-function createUpdaterINI(aIsExeAsync, aExeRelPathPrefix) {
- let exeArg = "ExeArg=post-update-async\n";
- let exeAsync = "";
- if (aIsExeAsync !== undefined) {
- if (aIsExeAsync) {
- exeAsync = "ExeAsync=true\n";
- } else {
- exeArg = "ExeArg=post-update-sync\n";
- exeAsync = "ExeAsync=false\n";
- }
- }
-
- if (aExeRelPathPrefix && IS_WIN) {
- aExeRelPathPrefix = aExeRelPathPrefix.replace("/", "\\");
- }
-
- let exeRelPathMac = "ExeRelPath=" + aExeRelPathPrefix + DIR_RESOURCES +
- gPostUpdateBinFile + "\n";
- let exeRelPathWin = "ExeRelPath=" + aExeRelPathPrefix + gPostUpdateBinFile + "\n";
- let updaterIniContents = "[Strings]\n" +
- "Title=Update Test\n" +
- "Info=Running update test " + gTestID + "\n\n" +
- "[PostUpdateMac]\n" +
- exeRelPathMac +
- exeArg +
- exeAsync +
- "\n" +
- "[PostUpdateWin]\n" +
- exeRelPathWin +
- exeArg +
- exeAsync;
- let updaterIni = getApplyDirFile(DIR_RESOURCES + FILE_UPDATER_INI, true);
- writeFile(updaterIni, updaterIniContents);
-}
-
-/**
- * Gets the message log path used for assert checks to lessen the length printed
- * to the log file.
- *
- * @param aPath
- * The path to shorten for the log file.
- * @return the message including the shortened path for the log file.
- */
-function getMsgPath(aPath) {
- return ", path: " + replaceLogPaths(aPath);
-}
-
-/**
- * Helper function that replaces the common part of paths in the update log's
- * contents with <test_dir_path> for paths to the the test directory and
- * <update_dir_path> for paths to the update directory. This is needed since
- * Assert.equal will truncate what it prints to the xpcshell log file.
- *
- * @param aLogContents
- * The update log file's contents.
- * @return the log contents with the paths replaced.
- */
-function replaceLogPaths(aLogContents) {
- let logContents = aLogContents;
- // Remove the majority of the path up to the test directory. This is needed
- // since Assert.equal won't print long strings to the test logs.
- let testDirPath = do_get_file(gTestID, false).path;
- if (IS_WIN) {
- // Replace \\ with \\\\ so the regexp works.
- testDirPath = testDirPath.replace(/\\/g, "\\\\");
- }
- logContents = logContents.replace(new RegExp(testDirPath, "g"),
- "<test_dir_path>/" + gTestID);
- let updatesDirPath = getMockUpdRootD().path;
- if (IS_WIN) {
- // Replace \\ with \\\\ so the regexp works.
- updatesDirPath = updatesDirPath.replace(/\\/g, "\\\\");
- }
- logContents = logContents.replace(new RegExp(updatesDirPath, "g"),
- "<update_dir_path>/" + gTestID);
- if (IS_WIN) {
- // Replace \ with /
- logContents = logContents.replace(/\\/g, "/");
- }
- return logContents;
-}
-
-/**
- * Helper function for updater binary tests for verifying the contents of the
- * update log after a successful update.
- *
- * @param aCompareLogFile
- * The log file to compare the update log with.
- * @param aStaged
- * If the update log file is for a staged update.
- * @param aReplace
- * If the update log file is for a replace update.
- * @param aExcludeDistDir
- * Removes lines containing the distribution directory from the log
- * file to compare the update log with.
- */
-function checkUpdateLogContents(aCompareLogFile, aStaged = false,
- aReplace = false, aExcludeDistDir = false) {
- if (IS_UNIX && !IS_MACOSX) {
- // The order that files are returned when enumerating the file system on
- // Linux is not deterministic so skip checking the logs.
- return;
- }
-
- let updateLog = getUpdateLog(FILE_LAST_UPDATE_LOG);
- let updateLogContents = readFileBytes(updateLog);
-
- // The channel-prefs.js is defined in gTestFilesCommon which will always be
- // located to the end of gTestFiles when it is present.
- if (gTestFiles.length > 1 &&
- gTestFiles[gTestFiles.length - 1].fileName == "channel-prefs.js" &&
- !gTestFiles[gTestFiles.length - 1].originalContents) {
- updateLogContents = updateLogContents.replace(/.*defaults\/.*/g, "");
- }
-
- if (gTestFiles.length > 2 &&
- gTestFiles[gTestFiles.length - 2].fileName == FILE_UPDATE_SETTINGS_INI &&
- !gTestFiles[gTestFiles.length - 2].originalContents) {
- updateLogContents = updateLogContents.replace(/.*update-settings.ini.*/g, "");
- }
-
- // Skip the source/destination lines since they contain absolute paths.
- // These could be changed to relative paths using <test_dir_path> and
- // <update_dir_path>
- updateLogContents = updateLogContents.replace(/PATCH DIRECTORY.*/g, "");
- updateLogContents = updateLogContents.replace(/INSTALLATION DIRECTORY.*/g, "");
- updateLogContents = updateLogContents.replace(/WORKING DIRECTORY.*/g, "");
- // Skip lines that log failed attempts to open the callback executable.
- updateLogContents = updateLogContents.replace(/NS_main: callback app file .*/g, "");
-
- if (IS_MACOSX) {
- // Skip lines that log moving the distribution directory for Mac v2 signing.
- updateLogContents = updateLogContents.replace(/Moving old [^\n]*\nrename_file: .*/g, "");
- updateLogContents = updateLogContents.replace(/New distribution directory .*/g, "");
- }
-
- if (IS_WIN) {
- // The FindFile results when enumerating the filesystem on Windows is not
- // determistic so the results matching the following need to be fixed.
- let re = new RegExp("([^\n]* 7\/7text1[^\n]*)\n" +
- "([^\n]* 7\/7text0[^\n]*)\n", "g");
- updateLogContents = updateLogContents.replace(re, "$2\n$1\n");
- }
-
- if (aReplace) {
- // Remove the lines which contain absolute paths
- updateLogContents = updateLogContents.replace(/^Begin moving.*$/mg, "");
- updateLogContents = updateLogContents.replace(/^ensure_remove: failed to remove file: .*$/mg, "");
- updateLogContents = updateLogContents.replace(/^ensure_remove_recursive: unable to remove directory: .*$/mg, "");
- updateLogContents = updateLogContents.replace(/^Removing tmpDir failed, err: -1$/mg, "");
- updateLogContents = updateLogContents.replace(/^remove_recursive_on_reboot: .*$/mg, "");
- }
-
- // Remove carriage returns.
- updateLogContents = updateLogContents.replace(/\r/g, "");
- // Replace error codes since they are different on each platform.
- updateLogContents = updateLogContents.replace(/, err:.*\n/g, "\n");
- // Replace to make the log parsing happy.
- updateLogContents = updateLogContents.replace(/non-fatal error /g, "");
- // Remove consecutive newlines
- updateLogContents = updateLogContents.replace(/\n+/g, "\n");
- // Remove leading and trailing newlines
- updateLogContents = updateLogContents.replace(/^\n|\n$/g, "");
- // Replace the log paths with <test_dir_path> and <update_dir_path>
- updateLogContents = replaceLogPaths(updateLogContents);
-
- let compareLogContents = "";
- if (aCompareLogFile) {
- compareLogContents = readFileBytes(getTestDirFile(aCompareLogFile));
- }
-
- if (aStaged) {
- compareLogContents = PERFORMING_STAGED_UPDATE + "\n" + compareLogContents;
- }
-
- // The channel-prefs.js is defined in gTestFilesCommon which will always be
- // located to the end of gTestFiles.
- if (gTestFiles.length > 1 &&
- gTestFiles[gTestFiles.length - 1].fileName == "channel-prefs.js" &&
- !gTestFiles[gTestFiles.length - 1].originalContents) {
- compareLogContents = compareLogContents.replace(/.*defaults\/.*/g, "");
- }
-
- if (gTestFiles.length > 2 &&
- gTestFiles[gTestFiles.length - 2].fileName == FILE_UPDATE_SETTINGS_INI &&
- !gTestFiles[gTestFiles.length - 2].originalContents) {
- compareLogContents = compareLogContents.replace(/.*update-settings.ini.*/g, "");
- }
-
- if (aExcludeDistDir) {
- compareLogContents = compareLogContents.replace(/.*distribution\/.*/g, "");
- }
-
- // Remove leading and trailing newlines
- compareLogContents = compareLogContents.replace(/\n+/g, "\n");
- // Remove leading and trailing newlines
- compareLogContents = compareLogContents.replace(/^\n|\n$/g, "");
-
- // Don't write the contents of the file to the log to reduce log spam
- // unless there is a failure.
- if (compareLogContents == updateLogContents) {
- Assert.ok(true, "the update log contents" + MSG_SHOULD_EQUAL);
- } else {
- logTestInfo("the update log contents are not correct");
- logUpdateLog(FILE_LAST_UPDATE_LOG);
- let aryLog = updateLogContents.split("\n");
- let aryCompare = compareLogContents.split("\n");
- // Pushing an empty string to both arrays makes it so either array's length
- // can be used in the for loop below without going out of bounds.
- aryLog.push("");
- aryCompare.push("");
- // xpcshell tests won't display the entire contents so log the first
- // incorrect line.
- for (let i = 0; i < aryLog.length; ++i) {
- if (aryLog[i] != aryCompare[i]) {
- logTestInfo("the first incorrect line in the update log is: " +
- aryLog[i]);
- Assert.equal(aryLog[i], aryCompare[i],
- "the update log contents" + MSG_SHOULD_EQUAL);
- }
- }
- // This should never happen!
- do_throw("Unable to find incorrect update log contents!");
- }
-}
-
-/**
- * Helper function to check if the update log contains a string.
- *
- * @param aCheckString
- * The string to check if the update log contains.
- */
-function checkUpdateLogContains(aCheckString) {
- let updateLog = getUpdateLog(FILE_LAST_UPDATE_LOG);
- let updateLogContents = readFileBytes(updateLog).replace(/\r\n/g, "\n");
- updateLogContents = replaceLogPaths(updateLogContents);
- Assert.notEqual(updateLogContents.indexOf(aCheckString), -1,
- "the update log contents should contain value: " +
- aCheckString);
-}
-
-/**
- * Helper function for updater binary tests for verifying the state of files and
- * directories after a successful update.
- *
- * @param aGetFileFunc
- * The function used to get the files in the directory to be checked.
- * @param aStageDirExists
- * If true the staging directory will be tested for existence and if
- * false the staging directory will be tested for non-existence.
- * @param aToBeDeletedDirExists
- * On Windows, if true the tobedeleted directory will be tested for
- * existence and if false the tobedeleted directory will be tested for
- * non-existence. On all othere platforms it will be tested for
- * non-existence.
- */
-function checkFilesAfterUpdateSuccess(aGetFileFunc, aStageDirExists = false,
- aToBeDeletedDirExists = false) {
- debugDump("testing contents of files after a successful update");
- gTestFiles.forEach(function CFAUS_TF_FE(aTestFile) {
- let testFile = aGetFileFunc(aTestFile.relPathDir + aTestFile.fileName, true);
- debugDump("testing file: " + testFile.path);
- if (aTestFile.compareFile || aTestFile.compareContents) {
- Assert.ok(testFile.exists(),
- MSG_SHOULD_EXIST + getMsgPath(testFile.path));
-
- // Skip these tests on Windows since chmod doesn't really set permissions
- // on Windows.
- if (!IS_WIN && aTestFile.comparePerms) {
- // Check if the permssions as set in the complete mar file are correct.
- Assert.equal(testFile.permissions & 0xfff,
- aTestFile.comparePerms & 0xfff,
- "the file permissions" + MSG_SHOULD_EQUAL);
- }
-
- let fileContents1 = readFileBytes(testFile);
- let fileContents2 = aTestFile.compareFile ?
- readFileBytes(getTestDirFile(aTestFile.compareFile)) :
- aTestFile.compareContents;
- // Don't write the contents of the file to the log to reduce log spam
- // unless there is a failure.
- if (fileContents1 == fileContents2) {
- Assert.ok(true, "the file contents" + MSG_SHOULD_EQUAL);
- } else {
- Assert.equal(fileContents1, fileContents2,
- "the file contents" + MSG_SHOULD_EQUAL);
- }
- } else {
- Assert.ok(!testFile.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(testFile.path));
- }
- });
-
- debugDump("testing operations specified in removed-files were performed " +
- "after a successful update");
- gTestDirs.forEach(function CFAUS_TD_FE(aTestDir) {
- let testDir = aGetFileFunc(aTestDir.relPathDir, true);
- debugDump("testing directory: " + testDir.path);
- if (aTestDir.dirRemoved) {
- Assert.ok(!testDir.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(testDir.path));
- } else {
- Assert.ok(testDir.exists(),
- MSG_SHOULD_EXIST + getMsgPath(testDir.path));
-
- if (aTestDir.files) {
- aTestDir.files.forEach(function CFAUS_TD_F_FE(aTestFile) {
- let testFile = aGetFileFunc(aTestDir.relPathDir + aTestFile, true);
- if (aTestDir.filesRemoved) {
- Assert.ok(!testFile.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(testFile.path));
- } else {
- Assert.ok(testFile.exists(),
- MSG_SHOULD_EXIST + getMsgPath(testFile.path));
- }
- });
- }
-
- if (aTestDir.subDirs) {
- aTestDir.subDirs.forEach(function CFAUS_TD_SD_FE(aSubDir) {
- let testSubDir = aGetFileFunc(aTestDir.relPathDir + aSubDir, true);
- Assert.ok(testSubDir.exists(),
- MSG_SHOULD_EXIST + getMsgPath(testSubDir.path));
- if (aTestDir.subDirFiles) {
- aTestDir.subDirFiles.forEach(function CFAUS_TD_SDF_FE(aTestFile) {
- let testFile = aGetFileFunc(aTestDir.relPathDir +
- aSubDir + aTestFile, true);
- Assert.ok(testFile.exists(),
- MSG_SHOULD_EXIST + getMsgPath(testFile.path));
- });
- }
- });
- }
- }
- });
-
- checkFilesAfterUpdateCommon(aGetFileFunc, aStageDirExists,
- aToBeDeletedDirExists);
-}
-
-/**
- * Helper function for updater binary tests for verifying the state of files and
- * directories after a failed update.
- *
- * @param aGetFileFunc
- * The function used to get the files in the directory to be checked.
- * @param aStageDirExists
- * If true the staging directory will be tested for existence and if
- * false the staging directory will be tested for non-existence.
- * @param aToBeDeletedDirExists
- * On Windows, if true the tobedeleted directory will be tested for
- * existence and if false the tobedeleted directory will be tested for
- * non-existence. On all othere platforms it will be tested for
- * non-existence.
- */
-function checkFilesAfterUpdateFailure(aGetFileFunc, aStageDirExists = false,
- aToBeDeletedDirExists = false) {
- debugDump("testing contents of files after a failed update");
- gTestFiles.forEach(function CFAUF_TF_FE(aTestFile) {
- let testFile = aGetFileFunc(aTestFile.relPathDir + aTestFile.fileName, true);
- debugDump("testing file: " + testFile.path);
- if (aTestFile.compareFile || aTestFile.compareContents) {
- Assert.ok(testFile.exists(),
- MSG_SHOULD_EXIST + getMsgPath(testFile.path));
-
- // Skip these tests on Windows since chmod doesn't really set permissions
- // on Windows.
- if (!IS_WIN && aTestFile.comparePerms) {
- // Check the original permssions are retained on the file.
- Assert.equal(testFile.permissions & 0xfff,
- aTestFile.comparePerms & 0xfff,
- "the file permissions" + MSG_SHOULD_EQUAL);
- }
-
- let fileContents1 = readFileBytes(testFile);
- let fileContents2 = aTestFile.compareFile ?
- readFileBytes(getTestDirFile(aTestFile.compareFile)) :
- aTestFile.compareContents;
- // Don't write the contents of the file to the log to reduce log spam
- // unless there is a failure.
- if (fileContents1 == fileContents2) {
- Assert.ok(true, "the file contents" + MSG_SHOULD_EQUAL);
- } else {
- Assert.equal(fileContents1, fileContents2,
- "the file contents" + MSG_SHOULD_EQUAL);
- }
- } else {
- Assert.ok(!testFile.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(testFile.path));
- }
- });
-
- debugDump("testing operations specified in removed-files were not " +
- "performed after a failed update");
- gTestDirs.forEach(function CFAUF_TD_FE(aTestDir) {
- let testDir = aGetFileFunc(aTestDir.relPathDir, true);
- Assert.ok(testDir.exists(),
- MSG_SHOULD_EXIST + getMsgPath(testDir.path));
-
- if (aTestDir.files) {
- aTestDir.files.forEach(function CFAUS_TD_F_FE(aTestFile) {
- let testFile = aGetFileFunc(aTestDir.relPathDir + aTestFile, true);
- Assert.ok(testFile.exists(),
- MSG_SHOULD_EXIST + getMsgPath(testFile.path));
- });
- }
-
- if (aTestDir.subDirs) {
- aTestDir.subDirs.forEach(function CFAUS_TD_SD_FE(aSubDir) {
- let testSubDir = aGetFileFunc(aTestDir.relPathDir + aSubDir, true);
- Assert.ok(testSubDir.exists(),
- MSG_SHOULD_EXIST + getMsgPath(testSubDir.path));
- if (aTestDir.subDirFiles) {
- aTestDir.subDirFiles.forEach(function CFAUS_TD_SDF_FE(aTestFile) {
- let testFile = aGetFileFunc(aTestDir.relPathDir +
- aSubDir + aTestFile, true);
- Assert.ok(testFile.exists(),
- MSG_SHOULD_EXIST + getMsgPath(testFile.path));
- });
- }
- });
- }
- });
-
- checkFilesAfterUpdateCommon(aGetFileFunc, aStageDirExists,
- aToBeDeletedDirExists);
-}
-
-/**
- * Helper function for updater binary tests for verifying the state of common
- * files and directories after a successful or failed update.
- *
- * @param aGetFileFunc
- * the function used to get the files in the directory to be checked.
- * @param aStageDirExists
- * If true the staging directory will be tested for existence and if
- * false the staging directory will be tested for non-existence.
- * @param aToBeDeletedDirExists
- * On Windows, if true the tobedeleted directory will be tested for
- * existence and if false the tobedeleted directory will be tested for
- * non-existence. On all othere platforms it will be tested for
- * non-existence.
- */
-function checkFilesAfterUpdateCommon(aGetFileFunc, aStageDirExists,
- aToBeDeletedDirExists) {
- debugDump("testing extra directories");
- let stageDir = getStageDirFile(null, true);
- if (aStageDirExists) {
- Assert.ok(stageDir.exists(),
- MSG_SHOULD_EXIST + getMsgPath(stageDir.path));
- } else {
- Assert.ok(!stageDir.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(stageDir.path));
- }
-
- let toBeDeletedDirExists = IS_WIN ? aToBeDeletedDirExists : false;
- let toBeDeletedDir = getApplyDirFile(DIR_TOBEDELETED, true);
- if (toBeDeletedDirExists) {
- Assert.ok(toBeDeletedDir.exists(),
- MSG_SHOULD_EXIST + getMsgPath(toBeDeletedDir.path));
- } else {
- Assert.ok(!toBeDeletedDir.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(toBeDeletedDir.path));
- }
-
- let updatingDir = getApplyDirFile("updating", true);
- Assert.ok(!updatingDir.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(updatingDir.path));
-
- if (stageDir.exists()) {
- updatingDir = stageDir.clone();
- updatingDir.append("updating");
- Assert.ok(!updatingDir.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(updatingDir.path));
- }
-
- debugDump("testing backup files should not be left behind in the " +
- "application directory");
- let applyToDir = getApplyDirFile(null, true);
- checkFilesInDirRecursive(applyToDir, checkForBackupFiles);
-
- if (stageDir.exists()) {
- debugDump("testing backup files should not be left behind in the " +
- "staging directory");
- applyToDir = getApplyDirFile(null, true);
- checkFilesInDirRecursive(stageDir, checkForBackupFiles);
- }
-}
-
-/**
- * Helper function for updater binary tests for verifying the contents of the
- * updater callback application log which should contain the arguments passed to
- * the callback application.
- */
-function checkCallbackLog() {
- let appLaunchLog = getApplyDirFile(DIR_RESOURCES + gCallbackArgs[1], true);
- if (!appLaunchLog.exists()) {
- // Uses do_timeout instead of do_execute_soon to lessen log spew.
- do_timeout(FILE_IN_USE_TIMEOUT_MS, checkCallbackLog);
- return;
- }
-
- let expectedLogContents = gCallbackArgs.join("\n") + "\n";
- let logContents = readFile(appLaunchLog);
- // It is possible for the log file contents check to occur before the log file
- // contents are completely written so wait until the contents are the expected
- // value. If the contents are never the expected value then the test will
- // fail by timing out after gTimeoutRuns is greater than MAX_TIMEOUT_RUNS or
- // the test harness times out the test.
- if (logContents != expectedLogContents) {
- gTimeoutRuns++;
- if (gTimeoutRuns > MAX_TIMEOUT_RUNS) {
- logTestInfo("callback log contents are not correct");
- // This file doesn't contain full paths so there is no need to call
- // replaceLogPaths.
- let aryLog = logContents.split("\n");
- let aryCompare = expectedLogContents.split("\n");
- // Pushing an empty string to both arrays makes it so either array's length
- // can be used in the for loop below without going out of bounds.
- aryLog.push("");
- aryCompare.push("");
- // xpcshell tests won't display the entire contents so log the incorrect
- // line.
- for (let i = 0; i < aryLog.length; ++i) {
- if (aryLog[i] != aryCompare[i]) {
- logTestInfo("the first incorrect line in the callback log is: " +
- aryLog[i]);
- Assert.equal(aryLog[i], aryCompare[i],
- "the callback log contents" + MSG_SHOULD_EQUAL);
- }
- }
- // This should never happen!
- do_throw("Unable to find incorrect callback log contents!");
- }
- // Uses do_timeout instead of do_execute_soon to lessen log spew.
- do_timeout(FILE_IN_USE_TIMEOUT_MS, checkCallbackLog);
- return;
- }
- Assert.ok(true, "the callback log contents" + MSG_SHOULD_EQUAL);
-
- waitForFilesInUse();
-}
-
-/**
- * Helper function for updater binary tests for getting the log and running
- * files created by the test helper binary file when called with the post-update
- * command line argument.
- *
- * @param aSuffix
- * The string to append to the post update test helper binary path.
- */
-function getPostUpdateFile(aSuffix) {
- return getApplyDirFile(DIR_RESOURCES + gPostUpdateBinFile + aSuffix, true);
-}
-
-/**
- * Checks the contents of the updater post update binary log. When completed
- * checkPostUpdateAppLogFinished will be called.
- */
-function checkPostUpdateAppLog() {
- // Only Mac OS X and Windows support post update.
- if (IS_MACOSX || IS_WIN) {
- gTimeoutRuns++;
- let postUpdateLog = getPostUpdateFile(".log");
- if (!postUpdateLog.exists()) {
- debugDump("postUpdateLog does not exist. Path: " + postUpdateLog.path);
- if (gTimeoutRuns > MAX_TIMEOUT_RUNS) {
- do_throw("Exceeded MAX_TIMEOUT_RUNS while waiting for the post update " +
- "process to create the post update log. Path: " +
- postUpdateLog.path);
- }
- do_execute_soon(checkPostUpdateAppLog);
- return;
- }
-
- let logContents = readFile(postUpdateLog);
- // It is possible for the log file contents check to occur before the log file
- // contents are completely written so wait until the contents are the expected
- // value. If the contents are never the expected value then the test will
- // fail by timing out after gTimeoutRuns is greater than MAX_TIMEOUT_RUNS or
- // the test harness times out the test.
- if (logContents != "post-update\n") {
- if (gTimeoutRuns > MAX_TIMEOUT_RUNS) {
- do_throw("Exceeded MAX_TIMEOUT_RUNS while waiting for the post update " +
- "process to create the expected contents in the post update log. Path: " +
- postUpdateLog.path);
- }
- do_execute_soon(checkPostUpdateAppLog);
- return;
- }
- Assert.ok(true, "the post update log contents" + MSG_SHOULD_EQUAL);
- }
-
- do_execute_soon(checkPostUpdateAppLogFinished);
-}
-
-/**
- * Helper function to check if a file is in use on Windows by making a copy of
- * a file and attempting to delete the original file. If the deletion is
- * successful the copy of the original file is renamed to the original file's
- * name and if the deletion is not successful the copy of the original file is
- * deleted.
- *
- * @param aFile
- * An nsIFile for the file to be checked if it is in use.
- * @return true if the file can't be deleted and false otherwise.
- */
-function isFileInUse(aFile) {
- if (!IS_WIN) {
- do_throw("Windows only function called by a different platform!");
- }
-
- if (!aFile.exists()) {
- debugDump("file does not exist, path: " + aFile.path);
- return false;
- }
-
- let fileBak = aFile.parent;
- fileBak.append(aFile.leafName + ".bak");
- try {
- if (fileBak.exists()) {
- fileBak.remove(false);
- }
- aFile.copyTo(aFile.parent, fileBak.leafName);
- aFile.remove(false);
- fileBak.moveTo(aFile.parent, aFile.leafName);
- debugDump("file is not in use, path: " + aFile.path);
- return false;
- } catch (e) {
- debugDump("file in use, path: " + aFile.path + ", exception: " + e);
- try {
- if (fileBak.exists()) {
- fileBak.remove(false);
- }
- } catch (ex) {
- logTestInfo("unable to remove backup file, path: " +
- fileBak.path + ", exception: " + ex);
- }
- }
- return true;
-}
-
-/**
- * Waits until files that are in use that break tests are no longer in use and
- * then calls doTestFinish to end the test.
- */
-function waitForFilesInUse() {
- if (IS_WIN) {
- let fileNames = [FILE_APP_BIN, FILE_UPDATER_BIN,
- FILE_MAINTENANCE_SERVICE_INSTALLER_BIN];
- for (let i = 0; i < fileNames.length; ++i) {
- let file = getApplyDirFile(fileNames[i], true);
- if (isFileInUse(file)) {
- do_timeout(FILE_IN_USE_TIMEOUT_MS, waitForFilesInUse);
- return;
- }
- }
- }
-
- debugDump("calling doTestFinish");
- doTestFinish();
-}
-
-/**
- * Helper function for updater binary tests for verifying there are no update
- * backup files left behind after an update.
- *
- * @param aFile
- * An nsIFile to check if it has moz-backup for its extension.
- */
-function checkForBackupFiles(aFile) {
- Assert.notEqual(getFileExtension(aFile), "moz-backup",
- "the file's extension should not equal moz-backup" +
- getMsgPath(aFile.path));
-}
-
-/**
- * Helper function for updater binary tests for recursively enumerating a
- * directory and calling a callback function with the file as a parameter for
- * each file found.
- *
- * @param aDir
- * A nsIFile for the directory to be deleted
- * @param aCallback
- * A callback function that will be called with the file as a
- * parameter for each file found.
- */
-function checkFilesInDirRecursive(aDir, aCallback) {
- if (!aDir.exists()) {
- do_throw("Directory must exist!");
- }
-
- let dirEntries = aDir.directoryEntries;
- while (dirEntries.hasMoreElements()) {
- let entry = dirEntries.getNext().QueryInterface(Ci.nsIFile);
-
- if (entry.exists()) {
- if (entry.isDirectory()) {
- checkFilesInDirRecursive(entry, aCallback);
- } else {
- aCallback(entry);
- }
- }
- }
-}
-
-
-/**
- * Helper function to override the update prompt component to verify whether it
- * is called or not.
- *
- * @param aCallback
- * The callback to call if the update prompt component is called.
- */
-function overrideUpdatePrompt(aCallback) {
- Cu.import("resource://testing-common/MockRegistrar.jsm");
- MockRegistrar.register("@mozilla.org/updates/update-prompt;1", UpdatePrompt, [aCallback]);
-}
-
-function UpdatePrompt(aCallback) {
- this._callback = aCallback;
-
- let fns = ["checkForUpdates", "showUpdateAvailable", "showUpdateDownloaded",
- "showUpdateError", "showUpdateHistory", "showUpdateInstalled"];
-
- fns.forEach(function UP_fns(aPromptFn) {
- UpdatePrompt.prototype[aPromptFn] = function() {
- if (!this._callback) {
- return;
- }
-
- let callback = this._callback[aPromptFn];
- if (!callback) {
- return;
- }
-
- callback.apply(this._callback,
- Array.prototype.slice.call(arguments));
- };
- });
-}
-
-UpdatePrompt.prototype = {
- flags: Ci.nsIClassInfo.SINGLETON,
- getScriptableHelper: () => null,
- getInterfaces: function(aCount) {
- let interfaces = [Ci.nsISupports, Ci.nsIUpdatePrompt];
- aCount.value = interfaces.length;
- return interfaces;
- },
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIClassInfo, Ci.nsIUpdatePrompt])
-};
-
-/* Update check listener */
-const updateCheckListener = {
- onProgress: function UCL_onProgress(aRequest, aPosition, aTotalSize) {
- },
-
- onCheckComplete: function UCL_onCheckComplete(aRequest, aUpdates, aUpdateCount) {
- gRequestURL = aRequest.channel.originalURI.spec;
- gUpdateCount = aUpdateCount;
- gUpdates = aUpdates;
- debugDump("url = " + gRequestURL + ", " +
- "request.status = " + aRequest.status + ", " +
- "updateCount = " + aUpdateCount);
- // Use a timeout to allow the XHR to complete
- do_execute_soon(gCheckFunc);
- },
-
- onError: function UCL_onError(aRequest, aUpdate) {
- gRequestURL = aRequest.channel.originalURI.spec;
- gStatusCode = aRequest.status;
- if (gStatusCode == 0) {
- gStatusCode = aRequest.channel.QueryInterface(Ci.nsIRequest).status;
- }
- gStatusText = aUpdate.statusText ? aUpdate.statusText : null;
- debugDump("url = " + gRequestURL + ", " +
- "request.status = " + gStatusCode + ", " +
- "update.statusText = " + gStatusText);
- // Use a timeout to allow the XHR to complete
- do_execute_soon(gCheckFunc.bind(null, aRequest, aUpdate));
- },
-
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIUpdateCheckListener])
-};
-
-/* Update download listener - nsIRequestObserver */
-const downloadListener = {
- onStartRequest: function DL_onStartRequest(aRequest, aContext) {
- },
-
- onProgress: function DL_onProgress(aRequest, aContext, aProgress, aMaxProgress) {
- },
-
- onStatus: function DL_onStatus(aRequest, aContext, aStatus, aStatusText) {
- },
-
- onStopRequest: function DL_onStopRequest(aRequest, aContext, aStatus) {
- gStatusResult = aStatus;
- // Use a timeout to allow the request to complete
- do_execute_soon(gCheckFunc);
- },
-
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIRequestObserver,
- Ci.nsIProgressEventSink])
-};
-
-/**
- * Helper for starting the http server used by the tests
- */
-function start_httpserver() {
- let dir = getTestDirFile();
- debugDump("http server directory path: " + dir.path);
-
- if (!dir.isDirectory()) {
- do_throw("A file instead of a directory was specified for HttpServer " +
- "registerDirectory! Path: " + dir.path);
- }
-
- let { HttpServer } = Cu.import("resource://testing-common/httpd.js", {});
- gTestserver = new HttpServer();
- gTestserver.registerDirectory("/", dir);
- gTestserver.registerPathHandler("/" + gHTTPHandlerPath, pathHandler);
- gTestserver.start(-1);
- let testserverPort = gTestserver.identity.primaryPort;
- gURLData = URL_HOST + ":" + testserverPort + "/";
- debugDump("http server port = " + testserverPort);
-}
-
-/**
- * Custom path handler for the http server
- *
- * @param aMetadata
- * The http metadata for the request.
- * @param aResponse
- * The http response for the request.
- */
-function pathHandler(aMetadata, aResponse) {
- aResponse.setHeader("Content-Type", "text/xml", false);
- aResponse.setStatusLine(aMetadata.httpVersion, gResponseStatusCode, "OK");
- aResponse.bodyOutputStream.write(gResponseBody, gResponseBody.length);
-}
-
-/**
- * Helper for stopping the http server used by the tests
- *
- * @param aCallback
- * The callback to call after stopping the http server.
- */
-function stop_httpserver(aCallback) {
- Assert.ok(!!aCallback, "the aCallback parameter should be defined");
- gTestserver.stop(aCallback);
-}
-
-/**
- * Creates an nsIXULAppInfo
- *
- * @param aID
- * The ID of the test application
- * @param aName
- * A name for the test application
- * @param aVersion
- * The version of the application
- * @param aPlatformVersion
- * The gecko version of the application
- */
-function createAppInfo(aID, aName, aVersion, aPlatformVersion) {
- const XULAPPINFO_CONTRACTID = "@mozilla.org/xre/app-info;1";
- const XULAPPINFO_CID = Components.ID("{c763b610-9d49-455a-bbd2-ede71682a1ac}");
- let ifaces = [Ci.nsIXULAppInfo, Ci.nsIXULRuntime];
- if (IS_WIN) {
- ifaces.push(Ci.nsIWinAppHelper);
- }
- const XULAppInfo = {
- vendor: APP_INFO_VENDOR,
- name: aName,
- ID: aID,
- version: aVersion,
- appBuildID: "2007010101",
- platformVersion: aPlatformVersion,
- platformBuildID: "2007010101",
- inSafeMode: false,
- logConsoleErrors: true,
- OS: "XPCShell",
- XPCOMABI: "noarch-spidermonkey",
-
- QueryInterface: XPCOMUtils.generateQI(ifaces)
- };
-
- const XULAppInfoFactory = {
- createInstance: function(aOuter, aIID) {
- if (aOuter == null) {
- return XULAppInfo.QueryInterface(aIID);
- }
- throw Cr.NS_ERROR_NO_AGGREGATION;
- }
- };
-
- let registrar = Cm.QueryInterface(Ci.nsIComponentRegistrar);
- registrar.registerFactory(XULAPPINFO_CID, "XULAppInfo",
- XULAPPINFO_CONTRACTID, XULAppInfoFactory);
-}
-
-/**
- * Returns the platform specific arguments used by nsIProcess when launching
- * the application.
- *
- * @param aExtraArgs (optional)
- * An array of extra arguments to append to the default arguments.
- * @return an array of arguments to be passed to nsIProcess.
- *
- * Note: a shell is necessary to pipe the application's console output which
- * would otherwise pollute the xpcshell log.
- *
- * Command line arguments used when launching the application:
- * -no-remote prevents shell integration from being affected by an existing
- * application process.
- * -test-process-updates makes the application exit after being relaunched by
- * the updater.
- * the platform specific string defined by PIPE_TO_NULL to output both stdout
- * and stderr to null. This is needed to prevent output from the application
- * from ending up in the xpchsell log.
- */
-function getProcessArgs(aExtraArgs) {
- if (!aExtraArgs) {
- aExtraArgs = [];
- }
-
- let appBinPath = getApplyDirFile(DIR_MACOS + FILE_APP_BIN, false).path;
- if (/ /.test(appBinPath)) {
- appBinPath = '"' + appBinPath + '"';
- }
-
- let args;
- if (IS_UNIX) {
- let launchScript = getLaunchScript();
- // Precreate the script with executable permissions
- launchScript.create(Ci.nsILocalFile.NORMAL_FILE_TYPE, PERMS_DIRECTORY);
-
- let scriptContents = "#! /bin/sh\n";
- scriptContents += appBinPath + " -no-remote -test-process-updates " +
- aExtraArgs.join(" ") + " " + PIPE_TO_NULL;
- writeFile(launchScript, scriptContents);
- debugDump("created " + launchScript.path + " containing:\n" +
- scriptContents);
- args = [launchScript.path];
- } else {
- args = ["/D", "/Q", "/C", appBinPath, "-no-remote", "-test-process-updates"].
- concat(aExtraArgs).concat([PIPE_TO_NULL]);
- }
- return args;
-}
-
-/**
- * Gets a file path for the application to dump its arguments into. This is used
- * to verify that a callback application is launched.
- *
- * @return the file for the application to dump its arguments into.
- */
-function getAppArgsLogPath() {
- let appArgsLog = do_get_file("/" + gTestID + "_app_args_log", true);
- if (appArgsLog.exists()) {
- appArgsLog.remove(false);
- }
- let appArgsLogPath = appArgsLog.path;
- if (/ /.test(appArgsLogPath)) {
- appArgsLogPath = '"' + appArgsLogPath + '"';
- }
- return appArgsLogPath;
-}
-
-/**
- * Gets the nsIFile reference for the shell script to launch the application. If
- * the file exists it will be removed by this function.
- *
- * @return the nsIFile for the shell script to launch the application.
- */
-function getLaunchScript() {
- let launchScript = do_get_file("/" + gTestID + "_launch.sh", true);
- if (launchScript.exists()) {
- launchScript.remove(false);
- }
- return launchScript;
-}
-
-/**
- * Makes GreD, XREExeF, and UpdRootD point to unique file system locations so
- * xpcshell tests can run in parallel and to keep the environment clean.
- */
-function adjustGeneralPaths() {
- let dirProvider = {
- getFile: function AGP_DP_getFile(aProp, aPersistent) {
- aPersistent.value = true;
- switch (aProp) {
- case NS_GRE_DIR:
- if (gUseTestAppDir) {
- return getApplyDirFile(DIR_RESOURCES, true);
- }
- break;
- case NS_GRE_BIN_DIR:
- if (gUseTestAppDir) {
- return getApplyDirFile(DIR_MACOS, true);
- }
- break;
- case XRE_EXECUTABLE_FILE:
- if (gUseTestAppDir) {
- return getApplyDirFile(DIR_MACOS + FILE_APP_BIN, true);
- }
- break;
- case XRE_UPDATE_ROOT_DIR:
- return getMockUpdRootD();
- }
- return null;
- },
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIDirectoryServiceProvider])
- };
- let ds = Services.dirsvc.QueryInterface(Ci.nsIDirectoryService);
- ds.QueryInterface(Ci.nsIProperties).undefine(NS_GRE_DIR);
- ds.QueryInterface(Ci.nsIProperties).undefine(NS_GRE_BIN_DIR);
- ds.QueryInterface(Ci.nsIProperties).undefine(XRE_EXECUTABLE_FILE);
- ds.registerProvider(dirProvider);
- do_register_cleanup(function AGP_cleanup() {
- debugDump("start - unregistering directory provider");
-
- if (gAppTimer) {
- debugDump("start - cancel app timer");
- gAppTimer.cancel();
- gAppTimer = null;
- debugDump("finish - cancel app timer");
- }
-
- if (gProcess && gProcess.isRunning) {
- debugDump("start - kill process");
- try {
- gProcess.kill();
- } catch (e) {
- debugDump("kill process failed. Exception: " + e);
- }
- gProcess = null;
- debugDump("finish - kill process");
- }
-
- if (gHandle) {
- try {
- debugDump("start - closing handle");
- let kernel32 = ctypes.open("kernel32");
- let CloseHandle = kernel32.declare("CloseHandle", ctypes.default_abi,
- ctypes.bool, /* return*/
- ctypes.voidptr_t /* handle*/);
- if (!CloseHandle(gHandle)) {
- debugDump("call to CloseHandle failed");
- }
- kernel32.close();
- gHandle = null;
- debugDump("finish - closing handle");
- } catch (e) {
- debugDump("call to CloseHandle failed. Exception: " + e);
- }
- }
-
- // Call end_test first before the directory provider is unregistered
- if (typeof end_test == typeof Function) {
- debugDump("calling end_test");
- end_test();
- }
-
- ds.unregisterProvider(dirProvider);
- cleanupTestCommon();
-
- debugDump("finish - unregistering directory provider");
- });
-}
-
-/**
- * The timer callback to kill the process if it takes too long.
- */
-const gAppTimerCallback = {
- notify: function TC_notify(aTimer) {
- gAppTimer = null;
- if (gProcess.isRunning) {
- logTestInfo("attempting to kill process");
- gProcess.kill();
- }
- Assert.ok(false, "launch application timer expired");
- },
- QueryInterface: XPCOMUtils.generateQI([Ci.nsITimerCallback])
-};
-
-/**
- * Launches an application to apply an update.
- */
-function runUpdateUsingApp(aExpectedStatus) {
- /**
- * The observer for the call to nsIProcess:runAsync. When completed
- * runUpdateFinished will be called.
- */
- const processObserver = {
- observe: function PO_observe(aSubject, aTopic, aData) {
- debugDump("topic: " + aTopic + ", process exitValue: " +
- gProcess.exitValue);
- resetEnvironment();
- if (gAppTimer) {
- gAppTimer.cancel();
- gAppTimer = null;
- }
- Assert.equal(gProcess.exitValue, 0,
- "the application process exit value should be 0");
- Assert.equal(aTopic, "process-finished",
- "the application process observer topic should be " +
- "process-finished");
-
- if (IS_SERVICE_TEST) {
- waitForServiceStop(false);
- }
-
- do_execute_soon(afterAppExits);
- },
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver])
- };
-
- function afterAppExits() {
- gTimeoutRuns++;
-
- if (IS_WIN) {
- waitForApplicationStop(FILE_UPDATER_BIN);
- }
-
- let status;
- try {
- status = readStatusFile();
- } catch (e) {
- logTestInfo("error reading status file, exception: " + e);
- }
- // Don't proceed until the update's status is the expected value.
- if (status != aExpectedStatus) {
- if (gTimeoutRuns > MAX_TIMEOUT_RUNS) {
- logUpdateLog(FILE_UPDATE_LOG);
- do_throw("Exceeded MAX_TIMEOUT_RUNS while waiting for the update " +
- "status to equal: " +
- aExpectedStatus +
- ", current status: " + status);
- } else {
- do_timeout(FILE_IN_USE_TIMEOUT_MS, afterAppExits);
- }
- return;
- }
-
- // Don't check for an update log when the code in nsUpdateDriver.cpp skips
- // updating.
- if (aExpectedStatus != STATE_PENDING &&
- aExpectedStatus != STATE_PENDING_SVC &&
- aExpectedStatus != STATE_APPLIED &&
- aExpectedStatus != STATE_APPLIED_SVC) {
- // Don't proceed until the update log has been created.
- let log = getUpdateLog(FILE_UPDATE_LOG);
- if (!log.exists()) {
- if (gTimeoutRuns > MAX_TIMEOUT_RUNS) {
- do_throw("Exceeded MAX_TIMEOUT_RUNS while waiting for the update " +
- "log to be created. Path: " + log.path);
- }
- do_timeout(FILE_IN_USE_TIMEOUT_MS, afterAppExits);
- return;
- }
- }
-
- do_execute_soon(runUpdateFinished);
- }
-
- debugDump("start - launching application to apply update");
-
- let appBin = getApplyDirFile(DIR_MACOS + FILE_APP_BIN, false);
-
- let launchBin = getLaunchBin();
- let args = getProcessArgs();
- debugDump("launching " + launchBin.path + " " + args.join(" "));
-
- gProcess = Cc["@mozilla.org/process/util;1"].
- createInstance(Ci.nsIProcess);
- gProcess.init(launchBin);
-
- gAppTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
- gAppTimer.initWithCallback(gAppTimerCallback, APP_TIMER_TIMEOUT,
- Ci.nsITimer.TYPE_ONE_SHOT);
-
- setEnvironment();
- debugDump("launching application");
- gProcess.runAsync(args, args.length, processObserver);
-
- debugDump("finish - launching application to apply update");
-}
-
-/**
- * Sets the environment that will be used by the application process when it is
- * launched.
- */
-function setEnvironment() {
- // Prevent setting the environment more than once.
- if (gShouldResetEnv !== undefined) {
- return;
- }
-
- gShouldResetEnv = true;
-
- // See bug 1279108.
- if (gEnv.exists("ASAN_OPTIONS")) {
- gASanOptions = gEnv.get("ASAN_OPTIONS");
- gEnv.set("ASAN_OPTIONS", gASanOptions + ":detect_leaks=0");
- } else {
- gEnv.set("ASAN_OPTIONS", "detect_leaks=0");
- }
-
- if (IS_WIN && !gEnv.exists("XRE_NO_WINDOWS_CRASH_DIALOG")) {
- gAddedEnvXRENoWindowsCrashDialog = true;
- debugDump("setting the XRE_NO_WINDOWS_CRASH_DIALOG environment " +
- "variable to 1... previously it didn't exist");
- gEnv.set("XRE_NO_WINDOWS_CRASH_DIALOG", "1");
- }
-
- if (IS_UNIX) {
- let appGreBinDir = gGREBinDirOrig.clone();
- let envGreBinDir = Cc["@mozilla.org/file/local;1"].
- createInstance(Ci.nsILocalFile);
- let shouldSetEnv = true;
- if (IS_MACOSX) {
- if (gEnv.exists("DYLD_LIBRARY_PATH")) {
- gEnvDyldLibraryPath = gEnv.get("DYLD_LIBRARY_PATH");
- envGreBinDir.initWithPath(gEnvDyldLibraryPath);
- if (envGreBinDir.path == appGreBinDir.path) {
- gEnvDyldLibraryPath = null;
- shouldSetEnv = false;
- }
- }
-
- if (shouldSetEnv) {
- debugDump("setting DYLD_LIBRARY_PATH environment variable value to " +
- appGreBinDir.path);
- gEnv.set("DYLD_LIBRARY_PATH", appGreBinDir.path);
- }
- } else {
- if (gEnv.exists("LD_LIBRARY_PATH")) {
- gEnvLdLibraryPath = gEnv.get("LD_LIBRARY_PATH");
- envGreBinDir.initWithPath(gEnvLdLibraryPath);
- if (envGreBinDir.path == appGreBinDir.path) {
- gEnvLdLibraryPath = null;
- shouldSetEnv = false;
- }
- }
-
- if (shouldSetEnv) {
- debugDump("setting LD_LIBRARY_PATH environment variable value to " +
- appGreBinDir.path);
- gEnv.set("LD_LIBRARY_PATH", appGreBinDir.path);
- }
- }
- }
-
- if (gEnv.exists("XPCOM_MEM_LEAK_LOG")) {
- gEnvXPCOMMemLeakLog = gEnv.get("XPCOM_MEM_LEAK_LOG");
- debugDump("removing the XPCOM_MEM_LEAK_LOG environment variable... " +
- "previous value " + gEnvXPCOMMemLeakLog);
- gEnv.set("XPCOM_MEM_LEAK_LOG", "");
- }
-
- if (gEnv.exists("XPCOM_DEBUG_BREAK")) {
- gEnvXPCOMDebugBreak = gEnv.get("XPCOM_DEBUG_BREAK");
- debugDump("setting the XPCOM_DEBUG_BREAK environment variable to " +
- "warn... previous value " + gEnvXPCOMDebugBreak);
- } else {
- debugDump("setting the XPCOM_DEBUG_BREAK environment variable to " +
- "warn... previously it didn't exist");
- }
-
- gEnv.set("XPCOM_DEBUG_BREAK", "warn");
-
- if (IS_SERVICE_TEST) {
- debugDump("setting MOZ_NO_SERVICE_FALLBACK environment variable to 1");
- gEnv.set("MOZ_NO_SERVICE_FALLBACK", "1");
- }
-}
-
-/**
- * Sets the environment back to the original values after launching the
- * application.
- */
-function resetEnvironment() {
- // Prevent resetting the environment more than once.
- if (gShouldResetEnv !== true) {
- return;
- }
-
- gShouldResetEnv = false;
-
- // Restore previous ASAN_OPTIONS if there were any.
- gEnv.set("ASAN_OPTIONS", gASanOptions ? gASanOptions : "");
-
- if (gEnvXPCOMMemLeakLog) {
- debugDump("setting the XPCOM_MEM_LEAK_LOG environment variable back to " +
- gEnvXPCOMMemLeakLog);
- gEnv.set("XPCOM_MEM_LEAK_LOG", gEnvXPCOMMemLeakLog);
- }
-
- if (gEnvXPCOMDebugBreak) {
- debugDump("setting the XPCOM_DEBUG_BREAK environment variable back to " +
- gEnvXPCOMDebugBreak);
- gEnv.set("XPCOM_DEBUG_BREAK", gEnvXPCOMDebugBreak);
- } else if (gEnv.exists("XPCOM_DEBUG_BREAK")) {
- debugDump("clearing the XPCOM_DEBUG_BREAK environment variable");
- gEnv.set("XPCOM_DEBUG_BREAK", "");
- }
-
- if (IS_UNIX) {
- if (IS_MACOSX) {
- if (gEnvDyldLibraryPath) {
- debugDump("setting DYLD_LIBRARY_PATH environment variable value " +
- "back to " + gEnvDyldLibraryPath);
- gEnv.set("DYLD_LIBRARY_PATH", gEnvDyldLibraryPath);
- } else if (gEnvDyldLibraryPath !== null) {
- debugDump("removing DYLD_LIBRARY_PATH environment variable");
- gEnv.set("DYLD_LIBRARY_PATH", "");
- }
- } else if (gEnvLdLibraryPath) {
- debugDump("setting LD_LIBRARY_PATH environment variable value back " +
- "to " + gEnvLdLibraryPath);
- gEnv.set("LD_LIBRARY_PATH", gEnvLdLibraryPath);
- } else if (gEnvLdLibraryPath !== null) {
- debugDump("removing LD_LIBRARY_PATH environment variable");
- gEnv.set("LD_LIBRARY_PATH", "");
- }
- }
-
- if (IS_WIN && gAddedEnvXRENoWindowsCrashDialog) {
- debugDump("removing the XRE_NO_WINDOWS_CRASH_DIALOG environment " +
- "variable");
- gEnv.set("XRE_NO_WINDOWS_CRASH_DIALOG", "");
- }
-
- if (IS_SERVICE_TEST) {
- debugDump("removing MOZ_NO_SERVICE_FALLBACK environment variable");
- gEnv.set("MOZ_NO_SERVICE_FALLBACK", "");
- }
-}
diff --git a/toolkit/mozapps/update/tests/moz.build b/toolkit/mozapps/update/tests/moz.build
deleted file mode 100644
index 94949b17f6..0000000000
--- a/toolkit/mozapps/update/tests/moz.build
+++ /dev/null
@@ -1,95 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-HAS_MISC_RULE = True
-
-FINAL_TARGET = '_tests/xpcshell/toolkit/mozapps/update/tests/data'
-
-MOCHITEST_CHROME_MANIFESTS += ['chrome/chrome.ini']
-
-XPCSHELL_TESTS_MANIFESTS += [
- 'unit_aus_update/xpcshell.ini',
- 'unit_base_updater/xpcshell.ini'
-]
-
-SimplePrograms([
- 'TestAUSHelper',
- 'TestAUSReadStrings',
-])
-
-LOCAL_INCLUDES += [
- '/toolkit/mozapps/update',
- '/toolkit/mozapps/update/common',
-]
-
-if CONFIG['OS_ARCH'] == 'WINNT':
- USE_LIBS += [
- 'updatecommon-standalone',
- ]
-
- OS_LIBS += [
- 'shlwapi',
- ]
-else:
- USE_LIBS += [
- 'updatecommon',
- ]
-
-for var in ('MOZ_APP_NAME', 'MOZ_APP_BASENAME', 'MOZ_APP_DISPLAYNAME',
- 'MOZ_APP_VENDOR', 'BIN_SUFFIX', 'MOZ_DEBUG'):
- DEFINES[var] = CONFIG[var]
-
-DEFINES['NS_NO_XPCOM'] = True
-
-# For debugging purposes only
-#DEFINES['DISABLE_UPDATER_AUTHENTICODE_CHECK'] = True
-
-if CONFIG['OS_ARCH'] == 'WINNT':
- DEFINES['UNICODE'] = True
- DEFINES['_UNICODE'] = True
- USE_STATIC_LIBS = True
- if CONFIG['GNU_CC']:
- WIN32_EXE_LDFLAGS += ['-municode']
-
-TEST_HARNESS_FILES.testing.mochitest.chrome.toolkit.mozapps.update.tests.data += [
- 'data/shared.js',
- 'data/sharedUpdateXML.js',
- 'data/simple.mar',
-]
-
-FINAL_TARGET_FILES += [
- 'data/complete.exe',
- 'data/complete.mar',
- 'data/complete.png',
- 'data/complete_log_success_mac',
- 'data/complete_log_success_win',
- 'data/complete_mac.mar',
- 'data/complete_precomplete',
- 'data/complete_precomplete_mac',
- 'data/complete_removed-files',
- 'data/complete_removed-files_mac',
- 'data/complete_update_manifest',
- 'data/old_version.mar',
- 'data/partial.exe',
- 'data/partial.mar',
- 'data/partial.png',
- 'data/partial_log_failure_mac',
- 'data/partial_log_failure_win',
- 'data/partial_log_success_mac',
- 'data/partial_log_success_win',
- 'data/partial_mac.mar',
- 'data/partial_precomplete',
- 'data/partial_precomplete_mac',
- 'data/partial_removed-files',
- 'data/partial_removed-files_mac',
- 'data/partial_update_manifest',
- 'data/replace_log_success',
- 'data/shared.js',
- 'data/sharedUpdateXML.js',
- 'data/simple.mar',
- 'data/wrong_product_channel.mar',
- 'data/xpcshellUtilsAUS.js',
-]
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/.eslintrc.js b/toolkit/mozapps/update/tests/unit_aus_update/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/mozapps/update/tests/unit_aus_update/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/canCheckForAndCanApplyUpdates.js b/toolkit/mozapps/update/tests/unit_aus_update/canCheckForAndCanApplyUpdates.js
deleted file mode 100644
index 1985df9595..0000000000
--- a/toolkit/mozapps/update/tests/unit_aus_update/canCheckForAndCanApplyUpdates.js
+++ /dev/null
@@ -1,138 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-function run_test() {
- setupTestCommon();
-
- // Verify write access to the custom app dir
- debugDump("testing write access to the application directory");
- let testFile = getCurrentProcessDir();
- testFile.append("update_write_access_test");
- testFile.create(Ci.nsIFile.NORMAL_FILE_TYPE, PERMS_FILE);
- Assert.ok(testFile.exists(), MSG_SHOULD_EXIST);
- testFile.remove(false);
- Assert.ok(!testFile.exists(), MSG_SHOULD_NOT_EXIST);
-
- standardInit();
-
- if (IS_WIN) {
- // Create a mutex to prevent being able to check for or apply updates.
- debugDump("attempting to create mutex");
- let handle = createMutex(getPerInstallationMutexName());
- Assert.ok(!!handle, "the update mutex should have been created");
-
- // Check if available updates cannot be checked for when there is a mutex
- // for this installation.
- Assert.ok(!gAUS.canCheckForUpdates, "should not be able to check for " +
- "updates when there is an update mutex");
-
- // Check if updates cannot be applied when there is a mutex for this
- // installation.
- Assert.ok(!gAUS.canApplyUpdates, "should not be able to apply updates " +
- "when there is an update mutex");
-
- debugDump("destroying mutex");
- closeHandle(handle);
- }
-
- // Check if available updates can be checked for
- Assert.ok(gAUS.canCheckForUpdates, "should be able to check for updates");
- // Check if updates can be applied
- Assert.ok(gAUS.canApplyUpdates, "should be able to apply updates");
-
- if (IS_WIN) {
- // Attempt to create a mutex when application update has already created one
- // with the same name.
- debugDump("attempting to create mutex");
- let handle = createMutex(getPerInstallationMutexName());
-
- Assert.ok(!handle, "should not be able to create the update mutex when " +
- "the application has created the update mutex");
- }
-
- doTestFinish();
-}
-
-/**
- * Determines a unique mutex name for the installation.
- *
- * @return Global mutex path.
- */
-function getPerInstallationMutexName() {
- if (!IS_WIN) {
- do_throw("Windows only function called by a different platform!");
- }
-
- let hasher = Cc["@mozilla.org/security/hash;1"].
- createInstance(Ci.nsICryptoHash);
- hasher.init(hasher.SHA1);
-
- let exeFile = Services.dirsvc.get(XRE_EXECUTABLE_FILE, Ci.nsILocalFile);
-
- let converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"].
- createInstance(Ci.nsIScriptableUnicodeConverter);
- converter.charset = "UTF-8";
- let data = converter.convertToByteArray(exeFile.path.toLowerCase());
-
- hasher.update(data, data.length);
- return "Global\\MozillaUpdateMutex-" + hasher.finish(true);
-}
-
-/**
- * Closes a Win32 handle.
- *
- * @param aHandle
- * The handle to close.
- */
-function closeHandle(aHandle) {
- if (!IS_WIN) {
- do_throw("Windows only function called by a different platform!");
- }
-
- let lib = ctypes.open("kernel32.dll");
- let CloseHandle = lib.declare("CloseHandle",
- ctypes.winapi_abi,
- ctypes.int32_t, /* success */
- ctypes.void_t.ptr); /* handle */
- CloseHandle(aHandle);
- lib.close();
-}
-
-/**
- * Creates a mutex.
- *
- * @param aName
- * The name for the mutex.
- * @return The Win32 handle to the mutex.
- */
-function createMutex(aName) {
- if (!IS_WIN) {
- do_throw("Windows only function called by a different platform!");
- }
-
- const INITIAL_OWN = 1;
- const ERROR_ALREADY_EXISTS = 0xB7;
- let lib = ctypes.open("kernel32.dll");
- let CreateMutexW = lib.declare("CreateMutexW",
- ctypes.winapi_abi,
- ctypes.void_t.ptr, /* return handle */
- ctypes.void_t.ptr, /* security attributes */
- ctypes.int32_t, /* initial owner */
- ctypes.char16_t.ptr); /* name */
-
- let handle = CreateMutexW(null, INITIAL_OWN, aName);
- lib.close();
- let alreadyExists = ctypes.winLastError == ERROR_ALREADY_EXISTS;
- if (handle && !handle.isNull() && alreadyExists) {
- closeHandle(handle);
- handle = null;
- }
-
- if (handle && handle.isNull()) {
- handle = null;
- }
-
- return handle;
-}
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/cleanupDownloadingForDifferentChannel.js b/toolkit/mozapps/update/tests/unit_aus_update/cleanupDownloadingForDifferentChannel.js
deleted file mode 100644
index a0a95af1bf..0000000000
--- a/toolkit/mozapps/update/tests/unit_aus_update/cleanupDownloadingForDifferentChannel.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/* 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/.
- */
-
-/* General Update Manager Tests */
-
-function run_test() {
- setupTestCommon();
-
- debugDump("testing removal of an active update for a channel that is not" +
- "valid due to switching channels (Bug 486275).");
-
- let patches = getLocalPatchString(null, null, null, null, null, null,
- STATE_DOWNLOADING);
- let updates = getLocalUpdateString(patches, null, null, "version 1.0", "1.0");
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
- writeStatusFile(STATE_DOWNLOADING);
-
- patches = getLocalPatchString(null, null, null, null, null, null,
- STATE_FAILED);
- updates = getLocalUpdateString(patches, null, "Existing", "version 3.0",
- "3.0", "3.0", null, null, null, null,
- getString("patchApplyFailure"));
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), false);
-
- setUpdateChannel("original_channel");
-
- standardInit();
-
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager update count" + MSG_SHOULD_EQUAL);
- let update = gUpdateManager.getUpdateAt(0);
- Assert.equal(update.name, "Existing",
- "the update's name" + MSG_SHOULD_EQUAL);
-
- Assert.ok(!gUpdateManager.activeUpdate,
- "there should not be an active update");
- // Verify that the active-update.xml file has had the update from the old
- // channel removed.
- let file = getUpdatesXMLFile(true);
- Assert.equal(readFile(file), getLocalUpdatesXMLString(""),
- "the contents of active-update.xml" + MSG_SHOULD_EQUAL);
-
- doTestFinish();
-}
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/cleanupDownloadingForOlderAppVersion.js b/toolkit/mozapps/update/tests/unit_aus_update/cleanupDownloadingForOlderAppVersion.js
deleted file mode 100644
index fc4f097870..0000000000
--- a/toolkit/mozapps/update/tests/unit_aus_update/cleanupDownloadingForOlderAppVersion.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-
-function run_test() {
- setupTestCommon();
-
- debugDump("testing cleanup of an update download in progress for an " +
- "older version of the application on startup (Bug 485624)");
-
- let patches = getLocalPatchString(null, null, null, null, null, null,
- STATE_DOWNLOADING);
- let updates = getLocalUpdateString(patches, null, null, "version 0.9", "0.9");
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
- writeStatusFile(STATE_DOWNLOADING);
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
-
- standardInit();
-
- Assert.ok(!gUpdateManager.activeUpdate,
- "there should not be an active update");
- Assert.equal(gUpdateManager.updateCount, 0,
- "the update manager update count" + MSG_SHOULD_EQUAL);
-
- doTestFinish();
-}
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/cleanupDownloadingForSameVersionAndBuildID.js b/toolkit/mozapps/update/tests/unit_aus_update/cleanupDownloadingForSameVersionAndBuildID.js
deleted file mode 100644
index b2d8ecbc64..0000000000
--- a/toolkit/mozapps/update/tests/unit_aus_update/cleanupDownloadingForSameVersionAndBuildID.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-function run_test() {
- setupTestCommon();
-
- debugDump("testing removal of an update download in progress for the " +
- "same version of the application with the same application " +
- "build id on startup (Bug 536547)");
-
- let patches = getLocalPatchString(null, null, null, null, null, null,
- STATE_DOWNLOADING);
- let updates = getLocalUpdateString(patches, null, null, "version 1.0", "1.0",
- "2007010101");
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
- writeStatusFile(STATE_DOWNLOADING);
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
-
- standardInit();
-
- Assert.ok(!gUpdateManager.activeUpdate,
- "there should not be an active update");
- Assert.equal(gUpdateManager.updateCount, 0,
- "the update manager update count" + MSG_SHOULD_EQUAL);
-
- doTestFinish();
-}
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/cleanupDownloadingIncorrectStatus.js b/toolkit/mozapps/update/tests/unit_aus_update/cleanupDownloadingIncorrectStatus.js
deleted file mode 100644
index 13e4aeaf60..0000000000
--- a/toolkit/mozapps/update/tests/unit_aus_update/cleanupDownloadingIncorrectStatus.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-function run_test() {
- setupTestCommon();
-
- debugDump("testing update cleanup when reading the status file returns " +
- "STATUS_NONE and the update xml has an update with " +
- "STATE_DOWNLOADING (Bug 539717).");
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- let patches = getLocalPatchString(null, null, null, null, null, null,
- STATE_DOWNLOADING);
- let updates = getLocalUpdateString(patches);
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
- writeStatusFile(STATE_NONE);
-
- standardInit();
-
- let dir = getUpdatesDir();
- dir.append(DIR_PATCH);
- Assert.ok(dir.exists(), MSG_SHOULD_EXIST);
-
- let statusFile = dir.clone();
- statusFile.append(FILE_UPDATE_STATUS);
- Assert.ok(!statusFile.exists(), MSG_SHOULD_NOT_EXIST);
-
- Assert.ok(!gUpdateManager.activeUpdate,
- "there should not be an active update");
- Assert.equal(gUpdateManager.updateCount, 0,
- "the update manager update count" + MSG_SHOULD_EQUAL);
-
- doTestFinish();
-}
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/cleanupPendingVersionFileIncorrectStatus.js b/toolkit/mozapps/update/tests/unit_aus_update/cleanupPendingVersionFileIncorrectStatus.js
deleted file mode 100644
index 7661da82da..0000000000
--- a/toolkit/mozapps/update/tests/unit_aus_update/cleanupPendingVersionFileIncorrectStatus.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-function run_test() {
- setupTestCommon();
-
- debugDump("testing update cleanup when reading the status file returns " +
- "STATUS_NONE, the version file is for a newer version, and the " +
- "update xml has an update with STATE_PENDING (Bug 601701).");
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- let patches = getLocalPatchString(null, null, null, null, null, null,
- STATE_PENDING);
- let updates = getLocalUpdateString(patches);
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
- writeVersionFile("99.9");
-
- standardInit();
-
- // Check that there is no activeUpdate first so the updates directory is
- // cleaned up by the UpdateManager before the remaining tests.
- Assert.ok(!gUpdateManager.activeUpdate,
- "there should not be an active update");
- Assert.equal(gUpdateManager.updateCount, 0,
- "the update manager update count" + MSG_SHOULD_EQUAL);
-
- let dir = getUpdatesDir();
- dir.append(DIR_PATCH);
- Assert.ok(dir.exists(), MSG_SHOULD_EXIST);
-
- let versionFile = dir.clone();
- versionFile.append(FILE_UPDATE_VERSION);
- Assert.ok(!versionFile.exists(), MSG_SHOULD_NOT_EXIST);
-
- doTestFinish();
-}
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/cleanupSuccessLogMove.js b/toolkit/mozapps/update/tests/unit_aus_update/cleanupSuccessLogMove.js
deleted file mode 100644
index d683b9931c..0000000000
--- a/toolkit/mozapps/update/tests/unit_aus_update/cleanupSuccessLogMove.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-function run_test() {
- setupTestCommon();
-
- debugDump("testing that the update.log is moved after a successful update");
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- let patches = getLocalPatchString(null, null, null, null, null, null,
- STATE_PENDING);
- let updates = getLocalUpdateString(patches);
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
- writeStatusFile(STATE_SUCCEEDED);
-
- let log = getUpdateLog(FILE_UPDATE_LOG);
- writeFile(log, "Last Update Log");
-
- standardInit();
-
- Assert.ok(!log.exists(), MSG_SHOULD_NOT_EXIST);
-
- log = getUpdateLog(FILE_LAST_UPDATE_LOG);
- Assert.ok(log.exists(), MSG_SHOULD_EXIST);
- Assert.equal(readFile(log), "Last Update Log",
- "the last update log contents" + MSG_SHOULD_EQUAL);
-
- log = getUpdateLog(FILE_BACKUP_UPDATE_LOG);
- Assert.ok(!log.exists(), MSG_SHOULD_NOT_EXIST);
-
- let dir = getUpdatesPatchDir();
- Assert.ok(dir.exists(), MSG_SHOULD_EXIST);
-
- doTestFinish();
-}
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/cleanupSuccessLogsFIFO.js b/toolkit/mozapps/update/tests/unit_aus_update/cleanupSuccessLogsFIFO.js
deleted file mode 100644
index 8be93d0ff5..0000000000
--- a/toolkit/mozapps/update/tests/unit_aus_update/cleanupSuccessLogsFIFO.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-function run_test() {
- setupTestCommon();
-
- debugDump("testing update logs are first in first out deleted");
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- let patches = getLocalPatchString(null, null, null, null, null, null,
- STATE_PENDING);
- let updates = getLocalUpdateString(patches);
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
- writeStatusFile(STATE_SUCCEEDED);
-
- let log = getUpdateLog(FILE_LAST_UPDATE_LOG);
- writeFile(log, "Backup Update Log");
-
- log = getUpdateLog(FILE_BACKUP_UPDATE_LOG);
- writeFile(log, "To Be Deleted Backup Update Log");
-
- log = getUpdateLog(FILE_UPDATE_LOG);
- writeFile(log, "Last Update Log");
-
- standardInit();
-
- Assert.ok(!log.exists(), MSG_SHOULD_NOT_EXIST);
-
- log = getUpdateLog(FILE_LAST_UPDATE_LOG);
- Assert.ok(log.exists(), MSG_SHOULD_EXIST);
- Assert.equal(readFile(log), "Last Update Log",
- "the last update log contents" + MSG_SHOULD_EQUAL);
-
- log = getUpdateLog(FILE_BACKUP_UPDATE_LOG);
- Assert.ok(log.exists(), MSG_SHOULD_EXIST);
- Assert.equal(readFile(log), "Backup Update Log",
- "the backup update log contents" + MSG_SHOULD_EQUAL);
-
- let dir = getUpdatesPatchDir();
- Assert.ok(dir.exists(), MSG_SHOULD_EXIST);
-
- doTestFinish();
-}
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/downloadAndHashCheckMar.js b/toolkit/mozapps/update/tests/unit_aus_update/downloadAndHashCheckMar.js
deleted file mode 100644
index b715fb56e1..0000000000
--- a/toolkit/mozapps/update/tests/unit_aus_update/downloadAndHashCheckMar.js
+++ /dev/null
@@ -1,161 +0,0 @@
-/* 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/.
- */
-
-var gNextRunFunc;
-var gExpectedStatusResult;
-
-function run_test() {
- // The network code that downloads the mar file accesses the profile to cache
- // the download, but the profile is only available after calling
- // do_get_profile in xpcshell tests. This prevents an error from being logged.
- do_get_profile();
-
- setupTestCommon();
-
- debugDump("testing mar download and mar hash verification");
-
- Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, false);
- start_httpserver();
- setUpdateURL(gURLData + gHTTPHandlerPath);
- standardInit();
- // Only perform the non hash check tests when mar signing is enabled since the
- // update service doesn't perform hash checks when mar signing is enabled.
- if (MOZ_VERIFY_MAR_SIGNATURE) {
- do_execute_soon(run_test_pt11);
- } else {
- do_execute_soon(run_test_pt1);
- }
-}
-
-// The HttpServer must be stopped before calling do_test_finished
-function finish_test() {
- stop_httpserver(doTestFinish);
-}
-
-// Helper function for testing mar downloads that have the correct size
-// specified in the update xml.
-function run_test_helper_pt1(aMsg, aExpectedStatusResult, aNextRunFunc) {
- gUpdates = null;
- gUpdateCount = null;
- gStatusResult = null;
- gCheckFunc = check_test_helper_pt1_1;
- gNextRunFunc = aNextRunFunc;
- gExpectedStatusResult = aExpectedStatusResult;
- debugDump(aMsg, Components.stack.caller);
- gUpdateChecker.checkForUpdates(updateCheckListener, true);
-}
-
-function check_test_helper_pt1_1() {
- Assert.equal(gUpdateCount, 1,
- "the update count" + MSG_SHOULD_EQUAL);
- gCheckFunc = check_test_helper_pt1_2;
- let bestUpdate = gAUS.selectUpdate(gUpdates, gUpdateCount);
- let state = gAUS.downloadUpdate(bestUpdate, false);
- if (state == STATE_NONE || state == STATE_FAILED) {
- do_throw("nsIApplicationUpdateService:downloadUpdate returned " + state);
- }
- gAUS.addDownloadListener(downloadListener);
-}
-
-function check_test_helper_pt1_2() {
- Assert.equal(gStatusResult, gExpectedStatusResult,
- "the download status result" + MSG_SHOULD_EQUAL);
- gAUS.removeDownloadListener(downloadListener);
- gNextRunFunc();
-}
-
-function setResponseBody(aHashFunction, aHashValue, aSize) {
- let patches = getRemotePatchString(null, null,
- aHashFunction, aHashValue, aSize);
- let updates = getRemoteUpdateString(patches);
- gResponseBody = getRemoteUpdatesXMLString(updates);
-}
-
-// mar download with a valid MD5 hash
-function run_test_pt1() {
- setResponseBody("MD5", MD5_HASH_SIMPLE_MAR);
- run_test_helper_pt1("mar download with a valid MD5 hash",
- Cr.NS_OK, run_test_pt2);
-}
-
-// mar download with an invalid MD5 hash
-function run_test_pt2() {
- setResponseBody("MD5", MD5_HASH_SIMPLE_MAR + "0");
- run_test_helper_pt1("mar download with an invalid MD5 hash",
- Cr.NS_ERROR_CORRUPTED_CONTENT, run_test_pt3);
-}
-
-// mar download with a valid SHA1 hash
-function run_test_pt3() {
- setResponseBody("SHA1", SHA1_HASH_SIMPLE_MAR);
- run_test_helper_pt1("mar download with a valid SHA1 hash",
- Cr.NS_OK, run_test_pt4);
-}
-
-// mar download with an invalid SHA1 hash
-function run_test_pt4() {
- setResponseBody("SHA1", SHA1_HASH_SIMPLE_MAR + "0");
- run_test_helper_pt1("mar download with an invalid SHA1 hash",
- Cr.NS_ERROR_CORRUPTED_CONTENT, run_test_pt5);
-}
-
-// mar download with a valid SHA256 hash
-function run_test_pt5() {
- setResponseBody("SHA256", SHA256_HASH_SIMPLE_MAR);
- run_test_helper_pt1("mar download with a valid SHA256 hash",
- Cr.NS_OK, run_test_pt6);
-}
-
-// mar download with an invalid SHA256 hash
-function run_test_pt6() {
- setResponseBody("SHA256", SHA256_HASH_SIMPLE_MAR + "0");
- run_test_helper_pt1("mar download with an invalid SHA256 hash",
- Cr.NS_ERROR_CORRUPTED_CONTENT, run_test_pt7);
-}
-
-// mar download with a valid SHA384 hash
-function run_test_pt7() {
- setResponseBody("SHA384", SHA384_HASH_SIMPLE_MAR);
- run_test_helper_pt1("mar download with a valid SHA384 hash",
- Cr.NS_OK, run_test_pt8);
-}
-
-// mar download with an invalid SHA384 hash
-function run_test_pt8() {
- setResponseBody("SHA384", SHA384_HASH_SIMPLE_MAR + "0");
- run_test_helper_pt1("mar download with an invalid SHA384 hash",
- Cr.NS_ERROR_CORRUPTED_CONTENT, run_test_pt9);
-}
-
-// mar download with a valid SHA512 hash
-function run_test_pt9() {
- setResponseBody("SHA512", SHA512_HASH_SIMPLE_MAR);
- run_test_helper_pt1("mar download with a valid SHA512 hash",
- Cr.NS_OK, run_test_pt10);
-}
-
-// mar download with an invalid SHA512 hash
-function run_test_pt10() {
- setResponseBody("SHA512", SHA512_HASH_SIMPLE_MAR + "0");
- run_test_helper_pt1("mar download with an invalid SHA512 hash",
- Cr.NS_ERROR_CORRUPTED_CONTENT, run_test_pt11);
-}
-
-// mar download with the mar not found
-function run_test_pt11() {
- let patches = getRemotePatchString(null, gURLData + "missing.mar");
- let updates = getRemoteUpdateString(patches);
- gResponseBody = getRemoteUpdatesXMLString(updates);
- run_test_helper_pt1("mar download with the mar not found",
- Cr.NS_ERROR_UNEXPECTED, run_test_pt12);
-}
-
-// mar download with a valid MD5 hash but invalid file size
-function run_test_pt12() {
- const arbitraryFileSize = 1024000;
- setResponseBody("MD5", MD5_HASH_SIMPLE_MAR, arbitraryFileSize);
- run_test_helper_pt1("mar download with a valid MD5 hash but invalid file size",
- Cr.NS_ERROR_UNEXPECTED, finish_test);
-}
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/downloadCompleteAfterPartialFailure.js b/toolkit/mozapps/update/tests/unit_aus_update/downloadCompleteAfterPartialFailure.js
deleted file mode 100644
index 1590337923..0000000000
--- a/toolkit/mozapps/update/tests/unit_aus_update/downloadCompleteAfterPartialFailure.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-Components.utils.import("resource://testing-common/MockRegistrar.jsm");
-
-const WindowWatcher = {
- getNewPrompter: function WW_getNewPrompter(aParent) {
- Assert.ok(!aParent,
- "the aParent parameter should not be defined");
- return {
- alert: function WW_GNP_alert(aTitle, aText) {
- let title = getString("updaterIOErrorTitle");
- Assert.equal(aTitle, title,
- "the ui string for title" + MSG_SHOULD_EQUAL);
- let text = gUpdateBundle.formatStringFromName("updaterIOErrorMsg",
- [Services.appinfo.name,
- Services.appinfo.name], 2);
- Assert.equal(aText, text,
- "the ui string for message" + MSG_SHOULD_EQUAL);
-
- doTestFinish();
- }
- };
- },
-
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowWatcher])
-};
-
-function run_test() {
- setupTestCommon();
-
- debugDump("testing download a complete on partial failure. Calling " +
- "nsIUpdatePrompt::showUpdateError should call getNewPrompter " +
- "and alert on the object returned by getNewPrompter when the " +
- "update.state == " + STATE_FAILED + " and the update.errorCode " +
- "== " + WRITE_ERROR + " (Bug 595059).");
-
- Services.prefs.setBoolPref(PREF_APP_UPDATE_SILENT, false);
-
- let windowWatcherCID =
- MockRegistrar.register("@mozilla.org/embedcomp/window-watcher;1",
- WindowWatcher);
- do_register_cleanup(() => {
- MockRegistrar.unregister(windowWatcherCID);
- });
-
- standardInit();
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- let url = URL_HOST + "/" + FILE_COMPLETE_MAR;
- let patches = getLocalPatchString("complete", url, null, null, null, null,
- STATE_FAILED);
- let updates = getLocalUpdateString(patches, null, null, "version 1.0", "1.0",
- null, null, null, null, url);
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
- writeStatusFile(STATE_FAILED);
-
- reloadUpdateManagerData();
-
- let update = gUpdateManager.activeUpdate;
- update.errorCode = WRITE_ERROR;
- let prompter = Cc["@mozilla.org/updates/update-prompt;1"].
- createInstance(Ci.nsIUpdatePrompt);
- prompter.showUpdateError(update);
-}
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/downloadInterruptedRecovery.js b/toolkit/mozapps/update/tests/unit_aus_update/downloadInterruptedRecovery.js
deleted file mode 100644
index ef2da26af8..0000000000
--- a/toolkit/mozapps/update/tests/unit_aus_update/downloadInterruptedRecovery.js
+++ /dev/null
@@ -1,225 +0,0 @@
-/* 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/.
- */
-
-/* General MAR File Download Tests */
-
-Components.utils.import("resource://testing-common/MockRegistrar.jsm");
-const INC_CONTRACT_ID = "@mozilla.org/network/incremental-download;1";
-
-// gIncrementalDownloadErrorType is used to loop through each of the connection
-// error types in the Mock incremental downloader.
-var gIncrementalDownloadErrorType = 0;
-
-var gNextRunFunc;
-var gExpectedStatusResult;
-
-function run_test() {
- setupTestCommon();
-
- debugDump("testing mar downloads, mar hash verification, and " +
- "mar download interrupted recovery");
-
- Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, false);
- start_httpserver();
- setUpdateURL(gURLData + gHTTPHandlerPath);
- standardInit();
- do_execute_soon(run_test_pt1);
-}
-
-// The HttpServer must be stopped before calling do_test_finished
-function finish_test() {
- stop_httpserver(doTestFinish);
-}
-
-// Helper function for testing mar downloads that have the correct size
-// specified in the update xml.
-function run_test_helper_pt1(aMsg, aExpectedStatusResult, aNextRunFunc) {
- gUpdates = null;
- gUpdateCount = null;
- gStatusResult = null;
- gCheckFunc = check_test_helper_pt1_1;
- gNextRunFunc = aNextRunFunc;
- gExpectedStatusResult = aExpectedStatusResult;
- debugDump(aMsg, Components.stack.caller);
- gUpdateChecker.checkForUpdates(updateCheckListener, true);
-}
-
-function check_test_helper_pt1_1() {
- Assert.equal(gUpdateCount, 1,
- "the update count" + MSG_SHOULD_EQUAL);
- gCheckFunc = check_test_helper_pt1_2;
- let bestUpdate = gAUS.selectUpdate(gUpdates, gUpdateCount);
- let state = gAUS.downloadUpdate(bestUpdate, false);
- if (state == STATE_NONE || state == STATE_FAILED) {
- do_throw("nsIApplicationUpdateService:downloadUpdate returned " + state);
- }
- gAUS.addDownloadListener(downloadListener);
-}
-
-function check_test_helper_pt1_2() {
- Assert.equal(gStatusResult, gExpectedStatusResult,
- "the download status result" + MSG_SHOULD_EQUAL);
- gAUS.removeDownloadListener(downloadListener);
- gNextRunFunc();
-}
-
-function setResponseBody(aHashFunction, aHashValue, aSize) {
- let patches = getRemotePatchString(null, null,
- aHashFunction, aHashValue, aSize);
- let updates = getRemoteUpdateString(patches);
- gResponseBody = getRemoteUpdatesXMLString(updates);
-}
-
-function initMockIncrementalDownload() {
- let incrementalDownloadCID =
- MockRegistrar.register(INC_CONTRACT_ID, IncrementalDownload);
- do_register_cleanup(() => {
- MockRegistrar.unregister(incrementalDownloadCID);
- });
-}
-
-/* This Mock incremental downloader is used to verify that connection
- * interrupts work correctly in updater code. The implementation of
- * the mock incremental downloader is very simple, it simply copies
- * the file to the destination location.
- */
-
-function IncrementalDownload() {
- this.wrappedJSObject = this;
-}
-
-IncrementalDownload.prototype = {
- /* nsIIncrementalDownload */
- init: function(uri, file, chunkSize, intervalInSeconds) {
- this._destination = file;
- this._URI = uri;
- this._finalURI = uri;
- },
-
- start: function(observer, ctxt) {
- let tm = Cc["@mozilla.org/thread-manager;1"].
- getService(Ci.nsIThreadManager);
- // Do the actual operation async to give a chance for observers
- // to add themselves.
- tm.mainThread.dispatch(function() {
- this._observer = observer.QueryInterface(Ci.nsIRequestObserver);
- this._ctxt = ctxt;
- this._observer.onStartRequest(this, this._ctxt);
- let mar = getTestDirFile(FILE_SIMPLE_MAR);
- mar.copyTo(this._destination.parent, this._destination.leafName);
- let status = Cr.NS_OK;
- switch (gIncrementalDownloadErrorType++) {
- case 0:
- status = Cr.NS_ERROR_NET_RESET;
- break;
- case 1:
- status = Cr.NS_ERROR_CONNECTION_REFUSED;
- break;
- case 2:
- status = Cr.NS_ERROR_NET_RESET;
- break;
- case 3:
- status = Cr.NS_OK;
- break;
- case 4:
- status = Cr.NS_ERROR_OFFLINE;
- // After we report offline, we want to eventually show offline
- // status being changed to online.
- let tm2 = Cc["@mozilla.org/thread-manager;1"].
- getService(Ci.nsIThreadManager);
- tm2.mainThread.dispatch(function() {
- Services.obs.notifyObservers(gAUS,
- "network:offline-status-changed",
- "online");
- }, Ci.nsIThread.DISPATCH_NORMAL);
- break;
- }
- this._observer.onStopRequest(this, this._ctxt, status);
- }.bind(this), Ci.nsIThread.DISPATCH_NORMAL);
- },
-
- get URI() {
- return this._URI;
- },
-
- get currentSize() {
- throw Cr.NS_ERROR_NOT_IMPLEMENTED;
- },
-
- get destination() {
- return this._destination;
- },
-
- get finalURI() {
- return this._finalURI;
- },
-
- get totalSize() {
- throw Cr.NS_ERROR_NOT_IMPLEMENTED;
- },
-
- /* nsIRequest */
- cancel: function(aStatus) {
- throw Cr.NS_ERROR_NOT_IMPLEMENTED;
- },
- suspend: function() {
- throw Cr.NS_ERROR_NOT_IMPLEMENTED;
- },
- isPending: function() {
- throw Cr.NS_ERROR_NOT_IMPLEMENTED;
- },
- _loadFlags: 0,
- get loadFlags() {
- return this._loadFlags;
- },
- set loadFlags(val) {
- this._loadFlags = val;
- },
-
- _loadGroup: null,
- get loadGroup() {
- return this._loadGroup;
- },
- set loadGroup(val) {
- this._loadGroup = val;
- },
-
- _name: "",
- get name() {
- return this._name;
- },
-
- _status: 0,
- get status() {
- return this._status;
- },
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIIncrementalDownload])
-};
-
-// Test disconnecting during an update
-function run_test_pt1() {
- initMockIncrementalDownload();
- setResponseBody("MD5", MD5_HASH_SIMPLE_MAR);
- run_test_helper_pt1("mar download with connection interruption",
- Cr.NS_OK, run_test_pt2);
-}
-
-// Test disconnecting during an update
-function run_test_pt2() {
- gIncrementalDownloadErrorType = 0;
- Services.prefs.setIntPref(PREF_APP_UPDATE_SOCKET_MAXERRORS, 2);
- Services.prefs.setIntPref(PREF_APP_UPDATE_RETRYTIMEOUT, 0);
- setResponseBody("MD5", MD5_HASH_SIMPLE_MAR);
- run_test_helper_pt1("mar download with connection interruption without recovery",
- Cr.NS_ERROR_NET_RESET, run_test_pt3);
-}
-
-// Test entering offline mode while downloading
-function run_test_pt3() {
- gIncrementalDownloadErrorType = 4;
- setResponseBody("MD5", MD5_HASH_SIMPLE_MAR);
- run_test_helper_pt1("mar download with offline mode",
- Cr.NS_OK, finish_test);
-}
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/downloadResumeForSameAppVersion.js b/toolkit/mozapps/update/tests/unit_aus_update/downloadResumeForSameAppVersion.js
deleted file mode 100644
index ca065f573d..0000000000
--- a/toolkit/mozapps/update/tests/unit_aus_update/downloadResumeForSameAppVersion.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-function run_test() {
- setupTestCommon();
-
- debugDump("testing resuming an update download in progress for the same " +
- "version of the application on startup (Bug 485624)");
-
- let patches = getLocalPatchString(null, null, null, null, null, null,
- STATE_DOWNLOADING);
- let updates = getLocalUpdateString(patches, null, null, "1.0", "1.0");
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
- writeStatusFile(STATE_DOWNLOADING);
-
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
-
- standardInit();
-
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.activeUpdate.state, STATE_DOWNLOADING,
- "the update manager activeUpdate state attribute" +
- MSG_SHOULD_EQUAL);
-
- // Pause the download and reload the Update Manager with an empty update so
- // the Application Update Service doesn't write the update xml files during
- // xpcom-shutdown which will leave behind the test directory.
- gAUS.pauseDownload();
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), true);
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- reloadUpdateManagerData();
-
- do_execute_soon(doTestFinish);
-}
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/head_update.js b/toolkit/mozapps/update/tests/unit_aus_update/head_update.js
deleted file mode 100644
index 9715c5828f..0000000000
--- a/toolkit/mozapps/update/tests/unit_aus_update/head_update.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-const IS_SERVICE_TEST = false;
-
-/* import-globals-from ../data/xpcshellUtilsAUS.js */
-load("../data/xpcshellUtilsAUS.js");
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/remoteUpdateXML.js b/toolkit/mozapps/update/tests/unit_aus_update/remoteUpdateXML.js
deleted file mode 100644
index 831c87257f..0000000000
--- a/toolkit/mozapps/update/tests/unit_aus_update/remoteUpdateXML.js
+++ /dev/null
@@ -1,285 +0,0 @@
-/* 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/.
- */
-
-var gNextRunFunc;
-var gExpectedCount;
-
-function run_test() {
- setupTestCommon();
-
- debugDump("testing remote update xml attributes");
-
- start_httpserver();
- setUpdateURL(gURLData + gHTTPHandlerPath);
- setUpdateChannel("test_channel");
-
- // This test expects that the app.update.download.backgroundInterval
- // preference doesn't already exist.
- Services.prefs.deleteBranch("app.update.download.backgroundInterval");
-
- standardInit();
- do_execute_soon(run_test_pt01);
-}
-
-// Helper function for testing update counts returned from an update xml
-function run_test_helper_pt1(aMsg, aExpectedCount, aNextRunFunc) {
- gUpdates = null;
- gUpdateCount = null;
- gCheckFunc = check_test_helper_pt1;
- gNextRunFunc = aNextRunFunc;
- gExpectedCount = aExpectedCount;
- debugDump(aMsg, Components.stack.caller);
- gUpdateChecker.checkForUpdates(updateCheckListener, true);
-}
-
-function check_test_helper_pt1() {
- Assert.equal(gUpdateCount, gExpectedCount,
- "the update count" + MSG_SHOULD_EQUAL);
- gNextRunFunc();
-}
-
-// update xml not found
-function run_test_pt01() {
- run_test_helper_pt1("testing update xml not available",
- null, run_test_pt02);
-}
-
-// one update available and the update's property values
-function run_test_pt02() {
- debugDump("testing one update available and the update's property values");
- gUpdates = null;
- gUpdateCount = null;
- gCheckFunc = check_test_pt02;
- let patches = getRemotePatchString("complete", "http://complete/", "SHA1",
- "98db9dad8e1d80eda7e1170d0187d6f53e477059",
- "9856459");
- patches += getRemotePatchString("partial", "http://partial/", "SHA1",
- "e6678ca40ae7582316acdeddf3c133c9c8577de4",
- "1316138");
- let updates = getRemoteUpdateString(patches, "minor", "Minor Test",
- "version 2.1a1pre", "2.1a1pre",
- "20080811053724",
- "http://details/",
- "true",
- "true", "345600", "1200",
- "custom1_attr=\"custom1 value\"",
- "custom2_attr=\"custom2 value\"");
- gResponseBody = getRemoteUpdatesXMLString(updates);
- gUpdateChecker.checkForUpdates(updateCheckListener, true);
-}
-
-function check_test_pt02() {
- // XXXrstrong - not specifying a detailsURL will cause a leak due to bug 470244
- // and until this is fixed this will not test the value for detailsURL when it
- // isn't specified in the update xml.
-// let defaultDetailsURL;
-// try {
- // Try using a default details URL supplied by the distribution
- // if the update XML does not supply one.
-// let formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"].
-// getService(Ci.nsIURLFormatter);
-// defaultDetailsURL = formatter.formatURLPref(PREF_APP_UPDATE_URL_DETAILS);
-// } catch (e) {
-// defaultDetailsURL = "";
-// }
-
- Assert.equal(gUpdateCount, 1,
- "the update count" + MSG_SHOULD_EQUAL);
- let bestUpdate = gAUS.selectUpdate(gUpdates, gUpdateCount).QueryInterface(Ci.nsIPropertyBag);
- Assert.equal(bestUpdate.type, "minor",
- "the update type attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(bestUpdate.name, "Minor Test",
- "the update name attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(bestUpdate.displayVersion, "version 2.1a1pre",
- "the update displayVersion attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(bestUpdate.appVersion, "2.1a1pre",
- "the update appVersion attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(bestUpdate.buildID, "20080811053724",
- "the update buildID attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(bestUpdate.detailsURL, "http://details/",
- "the update detailsURL attribute" + MSG_SHOULD_EQUAL);
- Assert.ok(bestUpdate.showPrompt,
- "the update showPrompt attribute" + MSG_SHOULD_EQUAL);
- Assert.ok(bestUpdate.showNeverForVersion,
- "the update showNeverForVersion attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(bestUpdate.promptWaitTime, "345600",
- "the update promptWaitTime attribute" + MSG_SHOULD_EQUAL);
- // The default and maximum value for backgroundInterval is 600
- Assert.equal(bestUpdate.getProperty("backgroundInterval"), "600",
- "the update backgroundInterval attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(bestUpdate.serviceURL, gURLData + gHTTPHandlerPath + "?force=1",
- "the update serviceURL attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(bestUpdate.channel, "test_channel",
- "the update channel attribute" + MSG_SHOULD_EQUAL);
- Assert.ok(!bestUpdate.isCompleteUpdate,
- "the update isCompleteUpdate attribute" + MSG_SHOULD_EQUAL);
- Assert.ok(!bestUpdate.isSecurityUpdate,
- "the update isSecurityUpdate attribute" + MSG_SHOULD_EQUAL);
- // Check that installDate is within 10 seconds of the current date.
- Assert.ok((Date.now() - bestUpdate.installDate) < 10000,
- "the update installDate attribute should be within 10 seconds of " +
- "the current time");
- Assert.ok(!bestUpdate.statusText,
- "the update statusText attribute" + MSG_SHOULD_EQUAL);
- // nsIUpdate:state returns an empty string when no action has been performed
- // on an available update
- Assert.equal(bestUpdate.state, "",
- "the update state attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(bestUpdate.errorCode, 0,
- "the update errorCode attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(bestUpdate.patchCount, 2,
- "the update patchCount attribute" + MSG_SHOULD_EQUAL);
- // XXX TODO - test nsIUpdate:serialize
-
- Assert.equal(bestUpdate.getProperty("custom1_attr"), "custom1 value",
- "the update custom1_attr property" + MSG_SHOULD_EQUAL);
- Assert.equal(bestUpdate.getProperty("custom2_attr"), "custom2 value",
- "the update custom2_attr property" + MSG_SHOULD_EQUAL);
-
- let patch = bestUpdate.getPatchAt(0);
- Assert.equal(patch.type, "complete",
- "the update patch type attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(patch.URL, "http://complete/",
- "the update patch URL attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(patch.hashFunction, "SHA1",
- "the update patch hashFunction attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(patch.hashValue, "98db9dad8e1d80eda7e1170d0187d6f53e477059",
- "the update patch hashValue attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(patch.size, 9856459,
- "the update patch size attribute" + MSG_SHOULD_EQUAL);
- // The value for patch.state can be the string 'null' as a valid value. This
- // is confusing if it returns null which is an invalid value since the test
- // failure output will show a failure for null == null. To lessen the
- // confusion first check that the typeof for patch.state is string.
- Assert.equal(typeof patch.state, "string",
- "the update patch state typeof value should equal |string|");
- Assert.equal(patch.state, STATE_NONE,
- "the update patch state attribute" + MSG_SHOULD_EQUAL);
- Assert.ok(!patch.selected,
- "the update patch selected attribute" + MSG_SHOULD_EQUAL);
- // XXX TODO - test nsIUpdatePatch:serialize
-
- patch = bestUpdate.getPatchAt(1);
- Assert.equal(patch.type, "partial",
- "the update patch type attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(patch.URL, "http://partial/",
- "the update patch URL attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(patch.hashFunction, "SHA1",
- "the update patch hashFunction attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(patch.hashValue, "e6678ca40ae7582316acdeddf3c133c9c8577de4",
- "the update patch hashValue attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(patch.size, 1316138,
- "the update patch size attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(patch.state, STATE_NONE,
- "the update patch state attribute" + MSG_SHOULD_EQUAL);
- Assert.ok(!patch.selected,
- "the update patch selected attribute" + MSG_SHOULD_EQUAL);
- // XXX TODO - test nsIUpdatePatch:serialize
-
- run_test_pt03();
-}
-
-// Empty update xml (an empty xml file returns a root node name of parsererror)
-function run_test_pt03() {
- gResponseBody = "<parsererror/>";
- run_test_helper_pt1("testing empty update xml",
- null, run_test_pt04);
-}
-
-// no updates available
-function run_test_pt04() {
- gResponseBody = getRemoteUpdatesXMLString("");
- run_test_helper_pt1("testing no updates available",
- 0, run_test_pt05);
-}
-
-// one update available with two patches
-function run_test_pt05() {
- let patches = getRemotePatchString("complete");
- patches += getRemotePatchString("partial");
- let updates = getRemoteUpdateString(patches);
- gResponseBody = getRemoteUpdatesXMLString(updates);
- run_test_helper_pt1("testing one update available",
- 1, run_test_pt06);
-}
-
-// three updates available each with two patches
-function run_test_pt06() {
- let patches = getRemotePatchString("complete");
- patches += getRemotePatchString("partial");
- let updates = getRemoteUpdateString(patches);
- updates += getRemoteUpdateString(patches);
- updates += getRemoteUpdateString(patches);
- gResponseBody = getRemoteUpdatesXMLString(updates);
- run_test_helper_pt1("testing three updates available",
- 3, run_test_pt07);
-}
-
-// one update with complete and partial patches with size 0 specified in the
-// update xml
-function run_test_pt07() {
- let patches = getRemotePatchString("complete", null, null, null, "0");
- patches += getRemotePatchString("partial", null, null, null, "0");
- let updates = getRemoteUpdateString(patches);
- gResponseBody = getRemoteUpdatesXMLString(updates);
- run_test_helper_pt1("testing one update with complete and partial " +
- "patches with size 0", 0, run_test_pt08);
-}
-
-// one update with complete patch with size 0 specified in the update xml
-function run_test_pt08() {
- let patches = getRemotePatchString("complete", null, null, null, "0");
- let updates = getRemoteUpdateString(patches);
- gResponseBody = getRemoteUpdatesXMLString(updates);
- run_test_helper_pt1("testing one update with complete patch with size 0",
- 0, run_test_pt9);
-}
-
-// one update with partial patch with size 0 specified in the update xml
-function run_test_pt9() {
- let patches = getRemotePatchString("partial", null, null, null, "0");
- let updates = getRemoteUpdateString(patches);
- gResponseBody = getRemoteUpdatesXMLString(updates);
- run_test_helper_pt1("testing one update with partial patch with size 0",
- 0, run_test_pt10);
-}
-
-// check that updates for older versions of the application aren't selected
-function run_test_pt10() {
- let patches = getRemotePatchString("complete");
- patches += getRemotePatchString("partial");
- let updates = getRemoteUpdateString(patches, "minor", null, null, "1.0pre");
- updates += getRemoteUpdateString(patches, "minor", null, null, "1.0a");
- gResponseBody = getRemoteUpdatesXMLString(updates);
- run_test_helper_pt1("testing two updates older than the current version",
- 2, check_test_pt10);
-}
-
-function check_test_pt10() {
- let bestUpdate = gAUS.selectUpdate(gUpdates, gUpdateCount);
- Assert.ok(!bestUpdate,
- "there should be no update available");
- run_test_pt11();
-}
-
-// check that updates for the current version of the application are selected
-function run_test_pt11() {
- let patches = getRemotePatchString("complete");
- patches += getRemotePatchString("partial");
- let updates = getRemoteUpdateString(patches, "minor", null, "version 1.0");
- gResponseBody = getRemoteUpdatesXMLString(updates);
- run_test_helper_pt1("testing one update equal to the current version",
- 1, check_test_pt11);
-}
-
-function check_test_pt11() {
- let bestUpdate = gAUS.selectUpdate(gUpdates, gUpdateCount);
- Assert.ok(!!bestUpdate,
- "there should be one update available");
- Assert.equal(bestUpdate.displayVersion, "version 1.0",
- "the update displayVersion attribute" + MSG_SHOULD_EQUAL);
-
- doTestFinish();
-}
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/uiAutoPref.js b/toolkit/mozapps/update/tests/unit_aus_update/uiAutoPref.js
deleted file mode 100644
index ee1c40bfd5..0000000000
--- a/toolkit/mozapps/update/tests/unit_aus_update/uiAutoPref.js
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-Components.utils.import("resource://testing-common/MockRegistrar.jsm");
-
-const WindowWatcher = {
- openWindow: function(aParent, aUrl, aName, aFeatures, aArgs) {
- gCheckFunc();
- },
-
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowWatcher])
-};
-
-const WindowMediator = {
- getMostRecentWindow: function(aWindowType) {
- do_execute_soon(check_status);
- return { getInterface: XPCOMUtils.generateQI([Ci.nsIDOMWindow]) };
- },
-
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowMediator])
-};
-
-function run_test() {
- setupTestCommon();
- // Calling do_get_profile prevents an error from being logged
- do_get_profile();
-
- debugDump("testing that an update download doesn't start when the " +
- PREF_APP_UPDATE_AUTO + " preference is false");
-
- Services.prefs.setBoolPref(PREF_APP_UPDATE_AUTO, false);
- Services.prefs.setBoolPref(PREF_APP_UPDATE_SILENT, false);
-
- start_httpserver();
- setUpdateURL(gURLData + gHTTPHandlerPath);
- standardInit();
-
- let windowWatcherCID =
- MockRegistrar.register("@mozilla.org/embedcomp/window-watcher;1",
- WindowWatcher);
- let windowMediatorCID =
- MockRegistrar.register("@mozilla.org/appshell/window-mediator;1",
- WindowMediator);
- do_register_cleanup(() => {
- MockRegistrar.unregister(windowWatcherCID);
- MockRegistrar.unregister(windowMediatorCID);
- });
-
- gCheckFunc = check_showUpdateAvailable;
- let patches = getRemotePatchString("complete");
- let updates = getRemoteUpdateString(patches, "minor", null, null, "1.0");
- gResponseBody = getRemoteUpdatesXMLString(updates);
- gAUS.notify(null);
-}
-
-function check_status() {
- let status = readStatusFile();
- Assert.notEqual(status, STATE_DOWNLOADING,
- "the update state" + MSG_SHOULD_EQUAL);
-
- // Pause the download and reload the Update Manager with an empty update so
- // the Application Update Service doesn't write the update xml files during
- // xpcom-shutdown which will leave behind the test directory.
- gAUS.pauseDownload();
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), true);
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- reloadUpdateManagerData();
-
- do_execute_soon(doTestFinish);
-}
-
-function check_showUpdateAvailable() {
- do_throw("showUpdateAvailable should not have called openWindow!");
-}
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/uiSilentPref.js b/toolkit/mozapps/update/tests/unit_aus_update/uiSilentPref.js
deleted file mode 100644
index 25110be8cb..0000000000
--- a/toolkit/mozapps/update/tests/unit_aus_update/uiSilentPref.js
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-Components.utils.import("resource://testing-common/MockRegistrar.jsm");
-
-/**
- * Test that nsIUpdatePrompt doesn't display UI for showUpdateAvailable and
- * showUpdateError when the app.update.silent preference is true.
- */
-
-const WindowWatcher = {
- openWindow: function(aParent, aUrl, aName, aFeatures, aArgs) {
- gCheckFunc();
- },
-
- getNewPrompter: function(aParent) {
- gCheckFunc();
- },
-
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowWatcher])
-};
-
-function run_test() {
- setupTestCommon();
-
- debugDump("testing nsIUpdatePrompt notifications should not be seen " +
- "when the " + PREF_APP_UPDATE_SILENT + " preference is true");
-
- Services.prefs.setBoolPref(PREF_APP_UPDATE_SILENT, true);
-
- let windowWatcherCID =
- MockRegistrar.register("@mozilla.org/embedcomp/window-watcher;1",
- WindowWatcher);
- do_register_cleanup(() => {
- MockRegistrar.unregister(windowWatcherCID);
- });
-
- standardInit();
-
- debugDump("testing showUpdateAvailable should not call openWindow");
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
- let patches = getLocalPatchString(null, null, null, null, null, null,
- STATE_FAILED);
- let updates = getLocalUpdateString(patches);
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
- writeStatusFile(STATE_FAILED);
- reloadUpdateManagerData();
-
- gCheckFunc = check_showUpdateAvailable;
- let update = gUpdateManager.activeUpdate;
- gUP.showUpdateAvailable(update);
- // Report a successful check after the call to showUpdateAvailable since it
- // didn't throw and otherwise it would report no tests run.
- Assert.ok(true,
- "calling showUpdateAvailable should not attempt to open a window");
-
- debugDump("testing showUpdateError should not call getNewPrompter");
- gCheckFunc = check_showUpdateError;
- update.errorCode = WRITE_ERROR;
- gUP.showUpdateError(update);
- // Report a successful check after the call to showUpdateError since it
- // didn't throw and otherwise it would report no tests run.
- Assert.ok(true,
- "calling showUpdateError should not attempt to open a window");
-
- doTestFinish();
-}
-
-function check_showUpdateAvailable() {
- do_throw("showUpdateAvailable should not have called openWindow!");
-}
-
-function check_showUpdateError() {
- do_throw("showUpdateError should not have seen getNewPrompter!");
-}
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/uiUnsupportedAlreadyNotified.js b/toolkit/mozapps/update/tests/unit_aus_update/uiUnsupportedAlreadyNotified.js
deleted file mode 100644
index 5b694ed303..0000000000
--- a/toolkit/mozapps/update/tests/unit_aus_update/uiUnsupportedAlreadyNotified.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-Cu.import("resource://testing-common/MockRegistrar.jsm");
-
-const WindowWatcher = {
- openWindow: function(aParent, aUrl, aName, aFeatures, aArgs) {
- check_showUpdateAvailable();
- },
-
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowWatcher])
-};
-
-const WindowMediator = {
- getMostRecentWindow: function(aWindowType) {
- return null;
- },
-
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowMediator])
-};
-
-function run_test() {
- setupTestCommon();
-
- debugDump("testing nsIUpdatePrompt notifications should not be displayed " +
- "when showUpdateAvailable is called for an unsupported system " +
- "update when the unsupported notification has already been " +
- "shown (bug 843497)");
-
- start_httpserver();
- setUpdateURL(gURLData + gHTTPHandlerPath);
- standardInit();
-
- let windowWatcherCID =
- MockRegistrar.register("@mozilla.org/embedcomp/window-watcher;1",
- WindowWatcher);
- let windowMediatorCID =
- MockRegistrar.register("@mozilla.org/appshell/window-mediator;1",
- WindowMediator);
- do_register_cleanup(() => {
- MockRegistrar.unregister(windowWatcherCID);
- MockRegistrar.unregister(windowMediatorCID);
- });
-
- Services.prefs.setBoolPref(PREF_APP_UPDATE_SILENT, false);
- Services.prefs.setBoolPref(PREF_APP_UPDATE_NOTIFIEDUNSUPPORTED, true);
- // This preference is used to determine when the background update check has
- // completed since a successful check will clear the preference.
- Services.prefs.setIntPref(PREF_APP_UPDATE_BACKGROUNDERRORS, 1);
-
- gResponseBody = getRemoteUpdatesXMLString(" <update type=\"major\" " +
- "name=\"Unsupported Update\" " +
- "unsupported=\"true\" " +
- "detailsURL=\"" + URL_HOST +
- "\"></update>\n");
- gAUS.notify(null);
- do_execute_soon(check_test);
-}
-
-function check_test() {
- if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_BACKGROUNDERRORS)) {
- do_execute_soon(check_test);
- return;
- }
- Assert.ok(true,
- PREF_APP_UPDATE_BACKGROUNDERRORS + " preference should not exist");
-
- stop_httpserver(doTestFinish);
-}
-
-function check_showUpdateAvailable() {
- do_throw("showUpdateAvailable should not have called openWindow!");
-}
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/updateManagerXML.js b/toolkit/mozapps/update/tests/unit_aus_update/updateManagerXML.js
deleted file mode 100644
index e464694553..0000000000
--- a/toolkit/mozapps/update/tests/unit_aus_update/updateManagerXML.js
+++ /dev/null
@@ -1,177 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-function run_test() {
- setupTestCommon();
-
- debugDump("testing addition of a successful update to " + FILE_UPDATES_XML +
- " and verification of update properties including the format " +
- "prior to bug 530872");
-
- setUpdateChannel("test_channel");
-
- // This test expects that the app.update.download.backgroundInterval
- // preference doesn't already exist.
- Services.prefs.deleteBranch("app.update.download.backgroundInterval");
-
- // XXXrstrong - not specifying a detailsURL will cause a leak due to bug 470244
- // and until bug 470244 is fixed this will not test the value for detailsURL
- // when it isn't specified in the update xml.
- let patches = getLocalPatchString("partial", "http://partial/", "SHA256",
- "cd43", "86", "true", STATE_PENDING);
- let updates = getLocalUpdateString(patches, "major", "New", "version 4",
- "4.0", "20070811053724",
- "http://details1/",
- "http://service1/", "1238441300314",
- "test status text", "false",
- "test_channel", "true", "true", "true",
- "345600", "300", "3.0",
- "custom1_attr=\"custom1 value\"",
- "custom2_attr=\"custom2 value\"");
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
- writeStatusFile(STATE_SUCCEEDED);
-
- patches = getLocalPatchString("complete", "http://complete/", "SHA1", "6232",
- "75", "true", STATE_FAILED);
- updates = getLocalUpdateString(patches, "major", "Existing", null, "3.0",
- null,
- "http://details2/",
- "http://service2/", null,
- getString("patchApplyFailure"), "true",
- "test_channel", "false", null, null, "691200",
- null, null,
- "custom3_attr=\"custom3 value\"",
- "custom4_attr=\"custom4 value\"");
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), false);
-
- standardInit();
-
- Assert.ok(!gUpdateManager.activeUpdate,
- "the update manager activeUpdate attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.updateCount, 2,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
-
- debugDump("checking the activeUpdate properties");
- let update = gUpdateManager.getUpdateAt(0).QueryInterface(Ci.nsIPropertyBag);
- Assert.equal(update.state, STATE_SUCCEEDED,
- "the update state attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.type, "major",
- "the update type attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.name, "New",
- "the update name attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.displayVersion, "version 4",
- "the update displayVersion attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.appVersion, "4.0",
- "the update appVersion attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.buildID, "20070811053724",
- "the update buildID attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.detailsURL, "http://details1/",
- "the update detailsURL attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.serviceURL, "http://service1/",
- "the update serviceURL attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.installDate, "1238441300314",
- "the update installDate attribute" + MSG_SHOULD_EQUAL);
- // statusText is updated
- Assert.equal(update.statusText, getString("installSuccess"),
- "the update statusText attribute" + MSG_SHOULD_EQUAL);
- Assert.ok(!update.isCompleteUpdate,
- "the update isCompleteUpdate attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.channel, "test_channel",
- "the update channel attribute" + MSG_SHOULD_EQUAL);
- Assert.ok(!!update.showPrompt,
- "the update showPrompt attribute" + MSG_SHOULD_EQUAL);
- Assert.ok(!!update.showNeverForVersion,
- "the update showNeverForVersion attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.promptWaitTime, "345600",
- "the update promptWaitTime attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.getProperty("backgroundInterval"), "300",
- "the update backgroundInterval attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.previousAppVersion, "3.0",
- "the update previousAppVersion attribute" + MSG_SHOULD_EQUAL);
- // Custom attributes
- Assert.equal(update.getProperty("custom1_attr"), "custom1 value",
- "the update custom1_attr property" + MSG_SHOULD_EQUAL);
- Assert.equal(update.getProperty("custom2_attr"), "custom2 value",
- "the update custom2_attr property" + MSG_SHOULD_EQUAL);
-
- debugDump("checking the activeUpdate patch properties");
- let patch = update.selectedPatch;
- Assert.equal(patch.type, "partial",
- "the update patch type attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(patch.URL, "http://partial/",
- "the update patch URL attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(patch.hashFunction, "SHA256",
- "the update patch hashFunction attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(patch.hashValue, "cd43",
- "the update patch hashValue attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(patch.size, "86",
- "the update patch size attribute" + MSG_SHOULD_EQUAL);
- Assert.ok(!!patch.selected,
- "the update patch selected attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(patch.state, STATE_SUCCEEDED,
- "the update patch state attribute" + MSG_SHOULD_EQUAL);
-
- debugDump("checking the first update properties");
- update = gUpdateManager.getUpdateAt(1).QueryInterface(Ci.nsIPropertyBag);
- Assert.equal(update.state, STATE_FAILED,
- "the update state attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.name, "Existing",
- "the update name attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.type, "major",
- "the update type attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.displayVersion, "3.0",
- "the update displayVersion attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.appVersion, "3.0",
- "the update appVersion attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.detailsURL, "http://details2/",
- "the update detailsURL attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.serviceURL, "http://service2/",
- "the update serviceURL attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.installDate, "1238441400314",
- "the update installDate attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.statusText, getString("patchApplyFailure"),
- "the update statusText attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.buildID, "20080811053724",
- "the update buildID attribute" + MSG_SHOULD_EQUAL);
- Assert.ok(!!update.isCompleteUpdate,
- "the update isCompleteUpdate attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.channel, "test_channel",
- "the update channel attribute" + MSG_SHOULD_EQUAL);
- Assert.ok(!update.showPrompt,
- "the update showPrompt attribute" + MSG_SHOULD_EQUAL);
- Assert.ok(!update.showNeverForVersion,
- "the update showNeverForVersion attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.promptWaitTime, "691200",
- "the update promptWaitTime attribute" + MSG_SHOULD_EQUAL);
- // The default and maximum value for backgroundInterval is 600
- Assert.equal(update.getProperty("backgroundInterval"), "600",
- "the update backgroundInterval attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(update.previousAppVersion, null,
- "the update previousAppVersion attribute" + MSG_SHOULD_EQUAL);
- // Custom attributes
- Assert.equal(update.getProperty("custom3_attr"), "custom3 value",
- "the update custom3_attr property" + MSG_SHOULD_EQUAL);
- Assert.equal(update.getProperty("custom4_attr"), "custom4 value",
- "the update custom4_attr property" + MSG_SHOULD_EQUAL);
-
- debugDump("checking the first update patch properties");
- patch = update.selectedPatch;
- Assert.equal(patch.type, "complete",
- "the update patch type attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(patch.URL, "http://complete/",
- "the update patch URL attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(patch.hashFunction, "SHA1",
- "the update patch hashFunction attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(patch.hashValue, "6232",
- "the update patch hashValue attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(patch.size, "75",
- "the update patch size attribute" + MSG_SHOULD_EQUAL);
- Assert.ok(!!patch.selected,
- "the update patch selected attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(patch.state, STATE_FAILED,
- "the update patch state attribute" + MSG_SHOULD_EQUAL);
-
- doTestFinish();
-}
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/urlConstruction.js b/toolkit/mozapps/update/tests/unit_aus_update/urlConstruction.js
deleted file mode 100644
index db7d900946..0000000000
--- a/toolkit/mozapps/update/tests/unit_aus_update/urlConstruction.js
+++ /dev/null
@@ -1,305 +0,0 @@
-/* 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/.
- */
-
-/* General URL Construction Tests */
-
-const URL_PREFIX = URL_HOST + "/";
-
-var gAppInfo;
-
-// Since gUpdateChecker.checkForUpdates uses XMLHttpRequest and XMLHttpRequest
-// can be slow it combines the checks whenever possible.
-function run_test() {
- // This test needs access to omni.ja to read the update.locale file so don't
- // use a custom directory for the application directory.
- gUseTestAppDir = false;
- setupTestCommon();
-
- standardInit();
- gAppInfo = Cc["@mozilla.org/xre/app-info;1"].
- getService(Ci.nsIXULAppInfo).
- QueryInterface(Ci.nsIXULRuntime);
- do_execute_soon(run_test_pt1);
-}
-
-
-// url constructed with:
-// %PRODUCT%
-// %VERSION%
-// %BUILD_ID%
-// %BUILD_TARGET%
-// %LOCALE%
-// %CHANNEL%
-// %PLATFORM_VERSION%
-// %OS_VERSION%
-// %SYSTEM_CAPABILITIES%
-// %DISTRIBUTION%
-// %DISTRIBUTION_VERSION%
-function run_test_pt1() {
- gCheckFunc = check_test_pt1;
- // The code that gets the locale accesses the profile which is only available
- // after calling do_get_profile in xpcshell tests. This prevents an error from
- // being logged.
- do_get_profile();
-
- setUpdateChannel("test_channel");
- gDefaultPrefBranch.setCharPref(PREF_DISTRIBUTION_ID, "test_distro");
- gDefaultPrefBranch.setCharPref(PREF_DISTRIBUTION_VERSION, "test_distro_version");
-
- let url = URL_PREFIX + "%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/" +
- "%LOCALE%/%CHANNEL%/%PLATFORM_VERSION%/%OS_VERSION%/" +
- "%SYSTEM_CAPABILITIES%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/" +
- "updates.xml";
- debugDump("testing url construction - url: " + url);
- setUpdateURL(url);
- try {
- gUpdateChecker.checkForUpdates(updateCheckListener, true);
- } catch (e) {
- debugDump("The following error is most likely due to a missing " +
- "update.locale file");
- do_throw(e);
- }
-}
-
-function check_test_pt1() {
- let url = URL_PREFIX + gAppInfo.name + "/" + gAppInfo.version + "/" +
- gAppInfo.appBuildID + "/" + gAppInfo.OS + "_" + getABI() + "/" +
- INSTALL_LOCALE + "/test_channel/" + gAppInfo.platformVersion + "/" +
- getOSVersion() + "/" + getSystemCapabilities() +
- "/test_distro/test_distro_version/updates.xml?force=1";
- // Log the urls since Assert.equal won't print the entire urls to the log.
- if (gRequestURL != url) {
- logTestInfo("expected url: " + url);
- logTestInfo("returned url: " + gRequestURL);
- }
- Assert.equal(gRequestURL, url,
- "the url" + MSG_SHOULD_EQUAL);
- run_test_pt2();
-}
-
-// url constructed with:
-// %CHANNEL% with distribution partners
-// %CUSTOM% parameter
-// force param when there already is a param - bug 454357
-function run_test_pt2() {
- gCheckFunc = check_test_pt2;
- let url = URL_PREFIX + "%CHANNEL%/updates.xml?custom=%CUSTOM%";
- debugDump("testing url constructed with %CHANNEL% - " + url);
- setUpdateURL(url);
- gDefaultPrefBranch.setCharPref(PREFBRANCH_APP_PARTNER + "test_partner1",
- "test_partner1");
- gDefaultPrefBranch.setCharPref(PREFBRANCH_APP_PARTNER + "test_partner2",
- "test_partner2");
- Services.prefs.setCharPref("app.update.custom", "custom");
- gUpdateChecker.checkForUpdates(updateCheckListener, true);
-}
-
-function check_test_pt2() {
- let url = URL_PREFIX + "test_channel-cck-test_partner1-test_partner2/" +
- "updates.xml?custom=custom&force=1";
- Assert.equal(gRequestURL, url,
- "the url" + MSG_SHOULD_EQUAL);
- doTestFinish();
-}
-
-function getABI() {
- let abi;
- try {
- abi = gAppInfo.XPCOMABI;
- } catch (e) {
- do_throw("nsIXULAppInfo:XPCOMABI not defined\n");
- }
-
- if (IS_MACOSX) {
- // Mac universal build should report a different ABI than either macppc
- // or mactel. This is necessary since nsUpdateService.js will set the ABI to
- // Universal-gcc3 for Mac universal builds.
- let macutils = Cc["@mozilla.org/xpcom/mac-utils;1"].
- getService(Ci.nsIMacUtils);
-
- if (macutils.isUniversalBinary) {
- abi += "-u-" + macutils.architecturesInBinary;
- }
- } else if (IS_WIN) {
- // Windows build should report the CPU architecture that it's running on.
- abi += "-" + getProcArchitecture();
- }
- return abi;
-}
-
-function getOSVersion() {
- let sysInfo = Cc["@mozilla.org/system-info;1"].getService(Ci.nsIPropertyBag2);
- let osVersion = sysInfo.getProperty("name") + " " + sysInfo.getProperty("version");
-
- if (IS_WIN) {
- try {
- let servicePack = getServicePack();
- osVersion += "." + servicePack;
- } catch (e) {
- do_throw("Failure obtaining service pack: " + e);
- }
-
- if ("5.0" === sysInfo.getProperty("version")) { // Win2K
- osVersion += " (unknown)";
- } else {
- try {
- osVersion += " (" + getProcArchitecture() + ")";
- } catch (e) {
- do_throw("Failed to obtain processor architecture: " + e);
- }
- }
- }
-
- if (osVersion) {
- try {
- osVersion += " (" + sysInfo.getProperty("secondaryLibrary") + ")";
- } catch (e) {
- // Not all platforms have a secondary widget library, so an error is
- // nothing to worry about.
- }
- osVersion = encodeURIComponent(osVersion);
- }
- return osVersion;
-}
-
-function getServicePack() {
- // NOTE: This function is a helper function and not a test. Thus,
- // it uses throw() instead of do_throw(). Any tests that use this function
- // should catch exceptions thrown in this function and deal with them
- // appropriately (usually by calling do_throw).
- const BYTE = ctypes.uint8_t;
- const WORD = ctypes.uint16_t;
- const DWORD = ctypes.uint32_t;
- const WCHAR = ctypes.char16_t;
- const BOOL = ctypes.int;
-
- // This structure is described at:
- // http://msdn.microsoft.com/en-us/library/ms724833%28v=vs.85%29.aspx
- const SZCSDVERSIONLENGTH = 128;
- const OSVERSIONINFOEXW = new ctypes.StructType('OSVERSIONINFOEXW',
- [
- {dwOSVersionInfoSize: DWORD},
- {dwMajorVersion: DWORD},
- {dwMinorVersion: DWORD},
- {dwBuildNumber: DWORD},
- {dwPlatformId: DWORD},
- {szCSDVersion: ctypes.ArrayType(WCHAR, SZCSDVERSIONLENGTH)},
- {wServicePackMajor: WORD},
- {wServicePackMinor: WORD},
- {wSuiteMask: WORD},
- {wProductType: BYTE},
- {wReserved: BYTE}
- ]);
-
- let kernel32 = ctypes.open("kernel32");
- try {
- let GetVersionEx = kernel32.declare("GetVersionExW",
- ctypes.default_abi,
- BOOL,
- OSVERSIONINFOEXW.ptr);
- let winVer = OSVERSIONINFOEXW();
- winVer.dwOSVersionInfoSize = OSVERSIONINFOEXW.size;
-
- if (0 === GetVersionEx(winVer.address())) {
- // Using "throw" instead of "do_throw" (see NOTE above)
- throw ("Failure in GetVersionEx (returned 0)");
- }
-
- return winVer.wServicePackMajor + "." + winVer.wServicePackMinor;
- } finally {
- kernel32.close();
- }
-}
-
-function getProcArchitecture() {
- // NOTE: This function is a helper function and not a test. Thus,
- // it uses throw() instead of do_throw(). Any tests that use this function
- // should catch exceptions thrown in this function and deal with them
- // appropriately (usually by calling do_throw).
- const WORD = ctypes.uint16_t;
- const DWORD = ctypes.uint32_t;
-
- // This structure is described at:
- // http://msdn.microsoft.com/en-us/library/ms724958%28v=vs.85%29.aspx
- const SYSTEM_INFO = new ctypes.StructType('SYSTEM_INFO',
- [
- {wProcessorArchitecture: WORD},
- {wReserved: WORD},
- {dwPageSize: DWORD},
- {lpMinimumApplicationAddress: ctypes.voidptr_t},
- {lpMaximumApplicationAddress: ctypes.voidptr_t},
- {dwActiveProcessorMask: DWORD.ptr},
- {dwNumberOfProcessors: DWORD},
- {dwProcessorType: DWORD},
- {dwAllocationGranularity: DWORD},
- {wProcessorLevel: WORD},
- {wProcessorRevision: WORD}
- ]);
-
- let kernel32 = ctypes.open("kernel32");
- try {
- let GetNativeSystemInfo = kernel32.declare("GetNativeSystemInfo",
- ctypes.default_abi,
- ctypes.void_t,
- SYSTEM_INFO.ptr);
- let sysInfo = SYSTEM_INFO();
- // Default to unknown
- sysInfo.wProcessorArchitecture = 0xffff;
-
- GetNativeSystemInfo(sysInfo.address());
- switch (sysInfo.wProcessorArchitecture) {
- case 9:
- return "x64";
- case 6:
- return "IA64";
- case 0:
- return "x86";
- default:
- // Using "throw" instead of "do_throw" (see NOTE above)
- throw ("Unknown architecture returned from GetNativeSystemInfo: " + sysInfo.wProcessorArchitecture);
- }
- } finally {
- kernel32.close();
- }
-}
-
-/**
- * Provides system capability information for application update though it may
- * be used by other consumers.
- */
-function getSystemCapabilities() {
- if (IS_WIN) {
- const PF_MMX_INSTRUCTIONS_AVAILABLE = 3; // MMX
- const PF_XMMI_INSTRUCTIONS_AVAILABLE = 6; // SSE
- const PF_XMMI64_INSTRUCTIONS_AVAILABLE = 10; // SSE2
- const PF_SSE3_INSTRUCTIONS_AVAILABLE = 13; // SSE3
-
- let lib = ctypes.open("kernel32.dll");
- let IsProcessorFeaturePresent = lib.declare("IsProcessorFeaturePresent",
- ctypes.winapi_abi,
- ctypes.int32_t, /* success */
- ctypes.uint32_t); /* DWORD */
- let instructionSet = "unknown";
- try {
- if (IsProcessorFeaturePresent(PF_SSE3_INSTRUCTIONS_AVAILABLE)) {
- instructionSet = "SSE3";
- } else if (IsProcessorFeaturePresent(PF_XMMI64_INSTRUCTIONS_AVAILABLE)) {
- instructionSet = "SSE2";
- } else if (IsProcessorFeaturePresent(PF_XMMI_INSTRUCTIONS_AVAILABLE)) {
- instructionSet = "SSE";
- } else if (IsProcessorFeaturePresent(PF_MMX_INSTRUCTIONS_AVAILABLE)) {
- instructionSet = "MMX";
- }
- } catch (e) {
- Cu.reportError("Error getting processor instruction set. " +
- "Exception: " + e);
- }
-
- lib.close();
- return instructionSet;
- }
-
- return "NA";
-}
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/xpcshell.ini b/toolkit/mozapps/update/tests/unit_aus_update/xpcshell.ini
deleted file mode 100644
index 0d2205046e..0000000000
--- a/toolkit/mozapps/update/tests/unit_aus_update/xpcshell.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-; 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/.
-
-[DEFAULT]
-tags = appupdate
-head = head_update.js
-tail =
-
-[canCheckForAndCanApplyUpdates.js]
-[urlConstruction.js]
-[updateManagerXML.js]
-[remoteUpdateXML.js]
-[downloadAndHashCheckMar.js]
-[cleanupDownloadingForOlderAppVersion.js]
-[cleanupDownloadingForDifferentChannel.js]
-[cleanupDownloadingForSameVersionAndBuildID.js]
-[cleanupDownloadingIncorrectStatus.js]
-[cleanupPendingVersionFileIncorrectStatus.js]
-[cleanupSuccessLogMove.js]
-[cleanupSuccessLogsFIFO.js]
-[downloadInterruptedRecovery.js]
-[downloadResumeForSameAppVersion.js]
-[downloadCompleteAfterPartialFailure.js]
-[uiSilentPref.js]
-[uiUnsupportedAlreadyNotified.js]
-[uiAutoPref.js]
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/.eslintrc.js b/toolkit/mozapps/update/tests/unit_base_updater/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/head_update.js b/toolkit/mozapps/update/tests/unit_base_updater/head_update.js
deleted file mode 100644
index 9715c5828f..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/head_update.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-const IS_SERVICE_TEST = false;
-
-/* import-globals-from ../data/xpcshellUtilsAUS.js */
-load("../data/xpcshellUtilsAUS.js");
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgCallbackFileNotInInstallDirFailure.js b/toolkit/mozapps/update/tests/unit_base_updater/invalidArgCallbackFileNotInInstallDirFailure.js
deleted file mode 100644
index f3f7673945..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgCallbackFileNotInInstallDirFailure.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/* 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/.
- */
-
-/* Callback file not in install directory or a sub-directory of the install
- directory failure */
-
-const STATE_AFTER_RUNUPDATE = STATE_FAILED_INVALID_CALLBACK_DIR_ERROR;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- let path = getTestDirFile(FILE_HELPER_BIN).path;
- runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, null, path);
-}
-
-/**
- * Called after the call to runUpdateUsingUpdater finishes.
- */
-function runUpdateFinished() {
- standardInit();
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgCallbackFilePathTooLongFailure.js b/toolkit/mozapps/update/tests/unit_base_updater/invalidArgCallbackFilePathTooLongFailure.js
deleted file mode 100644
index 969f84f9df..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgCallbackFilePathTooLongFailure.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/* 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/.
- */
-
-/* Too long callback file path failure test */
-
-const STATE_AFTER_RUNUPDATE = STATE_FAILED_INVALID_CALLBACK_PATH_ERROR;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- let path = "123456789";
- if (IS_WIN) {
- path = "\\" + path;
- path = path.repeat(30); // 300 characters
- path = "C:" + path;
- } else {
- path = "/" + path;
- path = path.repeat(1000); // 10000 characters
- }
-
- runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, null, path);
-}
-
-/**
- * Called after the call to runUpdateUsingUpdater finishes.
- */
-function runUpdateFinished() {
- standardInit();
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgInstallDirPathTooLongFailure.js b/toolkit/mozapps/update/tests/unit_base_updater/invalidArgInstallDirPathTooLongFailure.js
deleted file mode 100644
index 70e03646a6..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgInstallDirPathTooLongFailure.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/* 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/.
- */
-
-/* Too long install directory path failure test */
-
-const STATE_AFTER_RUNUPDATE =
- IS_SERVICE_TEST ? STATE_FAILED_SERVICE_INVALID_INSTALL_DIR_PATH_ERROR
- : STATE_FAILED_INVALID_INSTALL_DIR_PATH_ERROR;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- let path = "123456789";
- if (IS_WIN) {
- path = "\\" + path;
- path = path.repeat(30); // 300 characters
- path = "C:" + path;
- } else {
- path = "/" + path;
- path = path.repeat(1000); // 10000 characters
- }
-
- runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, path, null, null);
-}
-
-/**
- * Called after the call to runUpdateUsingUpdater finishes.
- */
-function runUpdateFinished() {
- standardInit();
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgInstallDirPathTraversalFailure.js b/toolkit/mozapps/update/tests/unit_base_updater/invalidArgInstallDirPathTraversalFailure.js
deleted file mode 100644
index 330578de64..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgInstallDirPathTraversalFailure.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/* 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/.
- */
-
-/* Install directory path traversal failure test */
-
-const STATE_AFTER_RUNUPDATE =
- IS_SERVICE_TEST ? STATE_FAILED_SERVICE_INVALID_INSTALL_DIR_PATH_ERROR
- : STATE_FAILED_INVALID_INSTALL_DIR_PATH_ERROR;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- let path = "123456789";
- if (IS_WIN) {
- path = "C:\\" + path + "\\..\\" + path;
- } else {
- path = "/" + path + "/../" + path;
- }
-
- runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, path, null, null);
-}
-
-/**
- * Called after the call to runUpdateUsingUpdater finishes.
- */
-function runUpdateFinished() {
- standardInit();
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgInstallWorkingDirPathNotSameFailure_win.js b/toolkit/mozapps/update/tests/unit_base_updater/invalidArgInstallWorkingDirPathNotSameFailure_win.js
deleted file mode 100644
index 8ddb34af06..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgInstallWorkingDirPathNotSameFailure_win.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/* 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/.
- */
-
-/* Different install and working directories for a regular update failure */
-
-const STATE_AFTER_RUNUPDATE =
- IS_SERVICE_TEST ? STATE_FAILED_SERVICE_INVALID_APPLYTO_DIR_ERROR
- : STATE_FAILED_INVALID_APPLYTO_DIR_ERROR;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- let path = getApplyDirFile("..", false).path;
- runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, path, null);
-}
-
-/**
- * Called after the call to runUpdateUsingUpdater finishes.
- */
-function runUpdateFinished() {
- standardInit();
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgPatchDirPathTraversalFailure.js b/toolkit/mozapps/update/tests/unit_base_updater/invalidArgPatchDirPathTraversalFailure.js
deleted file mode 100644
index c8ae3f0c65..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgPatchDirPathTraversalFailure.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/* 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/.
- */
-
-/* Patch directory path traversal failure test */
-
-const STATE_AFTER_RUNUPDATE =
- IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- let path = getUpdatesPatchDir();
- if (IS_WIN) {
- path = path + "\\..\\";
- } else {
- path = path + "/../";
- }
-
- runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, path, null, null, null);
-}
-
-/**
- * Called after the call to runUpdateUsingUpdater finishes.
- */
-function runUpdateFinished() {
- standardInit();
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgStageDirNotInInstallDirFailure_win.js b/toolkit/mozapps/update/tests/unit_base_updater/invalidArgStageDirNotInInstallDirFailure_win.js
deleted file mode 100644
index e9b2276573..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgStageDirNotInInstallDirFailure_win.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/* 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/.
- */
-
-/* Different install and working directories for a regular update failure */
-
-const STATE_AFTER_RUNUPDATE =
- IS_SERVICE_TEST ? STATE_FAILED_SERVICE_INVALID_APPLYTO_DIR_STAGED_ERROR
- : STATE_FAILED_INVALID_APPLYTO_DIR_STAGED_ERROR;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- let path = getApplyDirFile("..", false).path;
- runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true, null, null, path, null);
-}
-
-/**
- * Called after the call to runUpdateUsingUpdater finishes.
- */
-function runUpdateFinished() {
- standardInit();
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgWorkingDirPathLocalUNCFailure_win.js b/toolkit/mozapps/update/tests/unit_base_updater/invalidArgWorkingDirPathLocalUNCFailure_win.js
deleted file mode 100644
index 87bbad4aa2..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgWorkingDirPathLocalUNCFailure_win.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/* 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/.
- */
-
-/* Working directory path local UNC failure test */
-
-const STATE_AFTER_RUNUPDATE =
- IS_SERVICE_TEST ? STATE_FAILED_SERVICE_INVALID_WORKING_DIR_PATH_ERROR
- : STATE_FAILED_INVALID_WORKING_DIR_PATH_ERROR;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- let path = "\\\\.\\" + getApplyDirFile(null, false).path;
- runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, path, null);
-}
-
-/**
- * Called after the call to runUpdateUsingUpdater finishes.
- */
-function runUpdateFinished() {
- standardInit();
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgWorkingDirPathRelativeFailure.js b/toolkit/mozapps/update/tests/unit_base_updater/invalidArgWorkingDirPathRelativeFailure.js
deleted file mode 100644
index a550909b28..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgWorkingDirPathRelativeFailure.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/* 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/.
- */
-
-/* Relative working directory path failure test */
-
-const STATE_AFTER_RUNUPDATE =
- IS_SERVICE_TEST ? STATE_FAILED_SERVICE_INVALID_WORKING_DIR_PATH_ERROR
- : STATE_FAILED_INVALID_WORKING_DIR_PATH_ERROR;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, "test", null);
-}
-
-/**
- * Called after the call to runUpdateUsingUpdater finishes.
- */
-function runUpdateFinished() {
- standardInit();
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marAppApplyDirLockedStageFailure_win.js b/toolkit/mozapps/update/tests/unit_base_updater/marAppApplyDirLockedStageFailure_win.js
deleted file mode 100644
index b9f793236a..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marAppApplyDirLockedStageFailure_win.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/**
- * Test applying an update by staging an update and launching an application to
- * apply it.
- */
-
-const STATE_AFTER_STAGE = STATE_PENDING;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
-
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- createUpdateInProgressLockFile(getAppBaseDir());
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- stageUpdate(false);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- removeUpdateInProgressLockFile(getAppBaseDir());
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(PERFORMING_STAGED_UPDATE);
- checkUpdateLogContains(ERR_UPDATE_IN_PROGRESS);
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateAppBinInUseStageSuccess_win.js b/toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateAppBinInUseStageSuccess_win.js
deleted file mode 100644
index a606720b70..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateAppBinInUseStageSuccess_win.js
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/**
- * Test applying an update by staging an update and launching an application to
- * apply it.
- */
-
-const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
-
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setupUpdaterTest(FILE_COMPLETE_MAR, undefined);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true, false);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS, true);
- lockDirectory(getAppBaseDir().path);
- // Switch the application to the staged application that was updated.
- runUpdateUsingApp(STATE_SUCCEEDED);
-}
-
-/**
- * Called after the call to runUpdateUsingApp finishes.
- */
-function runUpdateFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- checkAppBundleModTime();
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS);
-
- let updatesDir = getUpdatesPatchDir();
- Assert.ok(updatesDir.exists(),
- MSG_SHOULD_EXIST + getMsgPath(updatesDir.path));
-
- let log = getUpdateLog(FILE_UPDATE_LOG);
- Assert.ok(!log.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(log.path));
-
- log = getUpdateLog(FILE_LAST_UPDATE_LOG);
- Assert.ok(log.exists(),
- MSG_SHOULD_EXIST + getMsgPath(log.path));
-
- log = getUpdateLog(FILE_BACKUP_UPDATE_LOG);
- Assert.ok(log.exists(),
- MSG_SHOULD_EXIST + getMsgPath(log.path));
-
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateStageOldVersionFailure.js b/toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateStageOldVersionFailure.js
deleted file mode 100644
index 00b38adc79..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateStageOldVersionFailure.js
+++ /dev/null
@@ -1,88 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/**
- * Test a replace request for a staged update with a version file that specifies
- * an older version failure. The same check is used in nsUpdateDriver.cpp for
- * all update types which is why there aren't tests for the maintenance service
- * as well as for other update types.
- */
-
-const STATE_AFTER_STAGE = STATE_APPLIED;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
-
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setupUpdaterTest(FILE_COMPLETE_MAR);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- stageUpdate(false);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS, true);
- // Change the active update to an older version to simulate installing a new
- // version of the application while there is an update that has been staged.
- let channel = gDefaultPrefBranch.getCharPref(PREF_APP_UPDATE_CHANNEL);
- let patches = getLocalPatchString(null, null, null, null, null, "true",
- STATE_AFTER_STAGE);
- let updates = getLocalUpdateString(patches, null, null, null, "1.0", null,
- null, null, null, null, "true", channel);
- writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
- // Change the version file to an older version to simulate installing a new
- // version of the application while there is an update that has been staged.
- writeVersionFile("1.0");
- reloadUpdateManagerData();
- // Try to switch the application to the staged application that was updated.
- runUpdateUsingApp(STATE_AFTER_STAGE);
-}
-
-/**
- * Called after the call to runUpdateUsingApp finishes.
- */
-function runUpdateFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_AFTER_STAGE,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- setTestFilesAndDirsForFailure();
- checkFilesAfterUpdateFailure(getApplyDirFile, IS_MACOSX ? false : true, false);
-
- let updatesDir = getUpdatesPatchDir();
- Assert.ok(updatesDir.exists(),
- MSG_SHOULD_EXIST + getMsgPath(updatesDir.path));
-
- let log = getUpdateLog(FILE_UPDATE_LOG);
- Assert.ok(!log.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(log.path));
-
- log = getUpdateLog(FILE_LAST_UPDATE_LOG);
- Assert.ok(log.exists(),
- MSG_SHOULD_EXIST + getMsgPath(log.path));
-
- log = getUpdateLog(FILE_BACKUP_UPDATE_LOG);
- Assert.ok(!log.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(log.path));
-
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateStageSuccess.js b/toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateStageSuccess.js
deleted file mode 100644
index 5b9b08156d..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateStageSuccess.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/**
- * Test applying an update by staging an update and launching an application to
- * apply it.
- */
-
-const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
-
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setupUpdaterTest(FILE_COMPLETE_MAR, true);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS, true);
- // Switch the application to the staged application that was updated.
- runUpdateUsingApp(STATE_SUCCEEDED);
-}
-
-/**
- * Called after the call to runUpdateUsingApp finishes.
- */
-function runUpdateFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- checkAppBundleModTime();
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
- checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);
-
- let updatesDir = getUpdatesPatchDir();
- Assert.ok(updatesDir.exists(),
- MSG_SHOULD_EXIST + getMsgPath(updatesDir.path));
-
- let log = getUpdateLog(FILE_UPDATE_LOG);
- Assert.ok(!log.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(log.path));
-
- log = getUpdateLog(FILE_LAST_UPDATE_LOG);
- Assert.ok(log.exists(),
- MSG_SHOULD_EXIST + getMsgPath(log.path));
-
- log = getUpdateLog(FILE_BACKUP_UPDATE_LOG);
- Assert.ok(log.exists(),
- MSG_SHOULD_EXIST + getMsgPath(log.path));
-
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateSuccess.js b/toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateSuccess.js
deleted file mode 100644
index e76233fe6a..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marAppApplyUpdateSuccess.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/**
- * Test applying an update by staging an update and launching an application to
- * apply it.
- */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
-
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- // The third parameter will test that a full path to the post update binary
- // doesn't execute.
- setupUpdaterTest(FILE_COMPLETE_MAR, undefined,
- getApplyDirFile(null, true).path + "/");
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runUpdateUsingApp(STATE_SUCCEEDED);
-}
-
-/**
- * Called after the call to runUpdateUsingApp finishes.
- */
-function runUpdateFinished() {
- checkAppBundleModTime();
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getApplyDirFile);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS);
-
- let updatesDir = getUpdatesPatchDir();
- Assert.ok(updatesDir.exists(),
- MSG_SHOULD_EXIST + getMsgPath(updatesDir.path));
-
- let log = getUpdateLog(FILE_UPDATE_LOG);
- Assert.ok(!log.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(log.path));
-
- log = getUpdateLog(FILE_LAST_UPDATE_LOG);
- Assert.ok(log.exists(),
- MSG_SHOULD_EXIST + getMsgPath(log.path));
-
- log = getUpdateLog(FILE_BACKUP_UPDATE_LOG);
- Assert.ok(!log.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(log.path));
-
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marAppInUseStageFailureComplete_win.js b/toolkit/mozapps/update/tests/unit_base_updater/marAppInUseStageFailureComplete_win.js
deleted file mode 100644
index b1505d58eb..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marAppInUseStageFailureComplete_win.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* Application in use complete MAR file staged patch apply failure test */
-
-const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
-const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperFileInUse(DIR_RESOURCES + gCallbackBinFile, false);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS, true);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_AFTER_RUNUPDATE,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- setTestFilesAndDirsForFailure();
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(ERR_RENAME_FILE);
- checkUpdateLogContains(ERR_MOVE_DESTDIR_7 + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marAppInUseStageSuccessComplete_unix.js b/toolkit/mozapps/update/tests/unit_base_updater/marAppInUseStageSuccessComplete_unix.js
deleted file mode 100644
index a1cc7d0436..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marAppInUseStageSuccessComplete_unix.js
+++ /dev/null
@@ -1,113 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* Application in use complete MAR file staged patch apply success test */
-
-const START_STATE = STATE_PENDING;
-const STATE_AFTER_STAGE = STATE_APPLIED;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestFiles[gTestFiles.length - 1].originalContents = null;
- gTestFiles[gTestFiles.length - 1].compareContents = "FromComplete\n";
- gTestFiles[gTestFiles.length - 1].comparePerms = 0o644;
- gTestDirs = gTestDirsCompleteSuccess;
- setupUpdaterTest(FILE_COMPLETE_MAR, true);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- setupSymLinks();
- runHelperFileInUse(DIR_RESOURCES + gCallbackBinFile, false);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS, true);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_SUCCEEDED, true, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- checkAppBundleModTime();
- checkSymLinks();
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile);
- checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);
- checkCallbackLog();
-}
-
-/**
- * Setup symlinks for the test.
- */
-function setupSymLinks() {
- if (IS_UNIX) {
- removeSymlink();
- createSymlink();
- do_register_cleanup(removeSymlink);
- gTestFiles.splice(gTestFiles.length - 3, 0,
- {
- description: "Readable symlink",
- fileName: "link",
- relPathDir: DIR_RESOURCES,
- originalContents: "test",
- compareContents: "test",
- originalFile: null,
- compareFile: null,
- originalPerms: 0o666,
- comparePerms: 0o666
- });
- }
-}
-
-/**
- * Checks the state of the symlinks for the test.
- */
-function checkSymLinks() {
- if (IS_UNIX) {
- checkSymlink();
- }
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marAppInUseSuccessComplete.js b/toolkit/mozapps/update/tests/unit_base_updater/marAppInUseSuccessComplete.js
deleted file mode 100644
index 93333cadeb..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marAppInUseSuccessComplete.js
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* Application in use complete MAR file patch apply success test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperFileInUse(DIR_RESOURCES + gCallbackBinFile, false);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- runUpdate(STATE_SUCCEEDED, false, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- checkAppBundleModTime();
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marCallbackAppStageSuccessComplete_win.js b/toolkit/mozapps/update/tests/unit_base_updater/marCallbackAppStageSuccessComplete_win.js
deleted file mode 100644
index 79e54c1825..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marCallbackAppStageSuccessComplete_win.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* Replace app binary complete MAR file staged patch apply success test */
-
-const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- gCallbackBinFile = "exe0.exe";
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS, true);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_SUCCEEDED, true, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
- checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marCallbackAppStageSuccessPartial_win.js b/toolkit/mozapps/update/tests/unit_base_updater/marCallbackAppStageSuccessPartial_win.js
deleted file mode 100644
index b1f84715f0..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marCallbackAppStageSuccessPartial_win.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* Patch app binary partial MAR file staged patch apply success test */
-
-const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestDirs = gTestDirsPartialSuccess;
- gCallbackBinFile = "exe0.exe";
- setupUpdaterTest(FILE_PARTIAL_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true);
- checkUpdateLogContents(LOG_PARTIAL_SUCCESS, true);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_SUCCEEDED, true, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
- checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marCallbackAppSuccessComplete_win.js b/toolkit/mozapps/update/tests/unit_base_updater/marCallbackAppSuccessComplete_win.js
deleted file mode 100644
index 85e92d290e..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marCallbackAppSuccessComplete_win.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* Replace app binary complete MAR file patch apply success test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- gCallbackBinFile = "exe0.exe";
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runUpdate(STATE_SUCCEEDED, false, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marCallbackAppSuccessPartial_win.js b/toolkit/mozapps/update/tests/unit_base_updater/marCallbackAppSuccessPartial_win.js
deleted file mode 100644
index 1212c9ba2e..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marCallbackAppSuccessPartial_win.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* Patch app binary partial MAR file patch apply success test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestDirs = gTestDirsPartialSuccess;
- gCallbackBinFile = "exe0.exe";
- setupUpdaterTest(FILE_PARTIAL_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runUpdate(STATE_SUCCEEDED, false, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile);
- checkUpdateLogContents(LOG_PARTIAL_SUCCESS);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marFailurePartial.js b/toolkit/mozapps/update/tests/unit_base_updater/marFailurePartial.js
deleted file mode 100644
index 960c96f7b8..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marFailurePartial.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/* 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/.
- */
-
-/* General Partial MAR File Patch Apply Failure Test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestFiles[11].originalFile = "partial.png";
- gTestDirs = gTestDirsPartialSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_PARTIAL_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- // If execv is used the updater process will turn into the callback process
- // and the updater's return code will be that of the callback process.
- runUpdate(STATE_FAILED_LOADSOURCE_ERROR_WRONG_SIZE, false, (USE_EXECV ? 0 : 1),
- true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- checkAppBundleModTime();
- standardInit();
- Assert.equal(readStatusFile(), STATE_NONE,
- "the status file failure code" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_FAILED,
- "the update state" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).errorCode, LOADSOURCE_ERROR_WRONG_SIZE,
- "the update errorCode" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContents(LOG_PARTIAL_FAILURE);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marFileInUseStageFailureComplete_win.js b/toolkit/mozapps/update/tests/unit_base_updater/marFileInUseStageFailureComplete_win.js
deleted file mode 100644
index b39595f921..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marFileInUseStageFailureComplete_win.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File in use complete MAR file staged patch apply failure test */
-
-const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
-const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperFileInUse(gTestFiles[13].relPathDir + gTestFiles[13].fileName,
- false);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS, true);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- standardInit();
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_AFTER_RUNUPDATE,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- setTestFilesAndDirsForFailure();
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(ERR_RENAME_FILE);
- checkUpdateLogContains(ERR_MOVE_DESTDIR_7 + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marFileInUseStageFailurePartial_win.js b/toolkit/mozapps/update/tests/unit_base_updater/marFileInUseStageFailurePartial_win.js
deleted file mode 100644
index 06d386ad63..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marFileInUseStageFailurePartial_win.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File in use partial MAR file staged patch apply failure test */
-
-const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
-const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestDirs = gTestDirsPartialSuccess;
- setupUpdaterTest(FILE_PARTIAL_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperFileInUse(gTestFiles[11].relPathDir + gTestFiles[11].fileName,
- false);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true);
- checkUpdateLogContents(LOG_PARTIAL_SUCCESS, true);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- standardInit();
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_AFTER_RUNUPDATE,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- setTestFilesAndDirsForFailure();
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(ERR_RENAME_FILE);
- checkUpdateLogContains(ERR_MOVE_DESTDIR_7 + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marFileInUseSuccessComplete_win.js b/toolkit/mozapps/update/tests/unit_base_updater/marFileInUseSuccessComplete_win.js
deleted file mode 100644
index 89a2fff5ed..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marFileInUseSuccessComplete_win.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File in use complete MAR file patch apply success test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperFileInUse(gTestFiles[13].relPathDir + gTestFiles[13].fileName,
- false);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- runUpdate(STATE_SUCCEEDED, false, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
- checkUpdateLogContains(ERR_BACKUP_DISCARD);
- checkUpdateLogContains(STATE_SUCCEEDED + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marFileInUseSuccessPartial_win.js b/toolkit/mozapps/update/tests/unit_base_updater/marFileInUseSuccessPartial_win.js
deleted file mode 100644
index ea85ddccc7..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marFileInUseSuccessPartial_win.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File in use partial MAR file patch apply success test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestDirs = gTestDirsPartialSuccess;
- setupUpdaterTest(FILE_PARTIAL_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperFileInUse(gTestFiles[11].relPathDir + gTestFiles[11].fileName,
- false);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- runUpdate(STATE_SUCCEEDED, false, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
- checkUpdateLogContains(ERR_BACKUP_DISCARD);
- checkUpdateLogContains(STATE_SUCCEEDED + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marFileLockedFailureComplete_win.js b/toolkit/mozapps/update/tests/unit_base_updater/marFileLockedFailureComplete_win.js
deleted file mode 100644
index c5efaa8c07..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marFileLockedFailureComplete_win.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File locked complete MAR file patch apply failure test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperLockFile(gTestFiles[3]);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- runUpdate(STATE_FAILED_WRITE_ERROR, false, 1, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- standardInit();
- Assert.equal(readStatusFile(), STATE_PENDING,
- "the status file failure code" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_PENDING,
- "the update state" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).errorCode, WRITE_ERROR,
- "the update errorCode" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(ERR_RENAME_FILE);
- checkUpdateLogContains(ERR_BACKUP_CREATE_7);
- checkUpdateLogContains(STATE_FAILED_WRITE_ERROR + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marFileLockedFailurePartial_win.js b/toolkit/mozapps/update/tests/unit_base_updater/marFileLockedFailurePartial_win.js
deleted file mode 100644
index 4fdbadb5be..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marFileLockedFailurePartial_win.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File locked partial MAR file patch apply failure test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestDirs = gTestDirsPartialSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_PARTIAL_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperLockFile(gTestFiles[2]);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- runUpdate(STATE_FAILED_READ_ERROR, false, 1, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- standardInit();
- Assert.equal(readStatusFile(), STATE_NONE,
- "the status file failure code" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_FAILED,
- "the update state" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).errorCode, READ_ERROR,
- "the update errorCode" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(ERR_UNABLE_OPEN_DEST);
- checkUpdateLogContains(STATE_FAILED_READ_ERROR + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marFileLockedStageFailureComplete_win.js b/toolkit/mozapps/update/tests/unit_base_updater/marFileLockedStageFailureComplete_win.js
deleted file mode 100644
index 4d12f4e42f..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marFileLockedStageFailureComplete_win.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File locked complete MAR file staged patch apply failure test */
-
-const STATE_AFTER_STAGE = STATE_PENDING;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperLockFile(gTestFiles[3]);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- // Files aren't checked after staging since this test locks a file which
- // prevents reading the file.
- checkUpdateLogContains(ERR_ENSURE_COPY);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_FAILED_WRITE_ERROR, false, 1, false);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- standardInit();
- Assert.equal(readStatusFile(), STATE_PENDING,
- "the status file failure code" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.updateCount, 2,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_PENDING,
- "the update state" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).errorCode, WRITE_ERROR,
- "the update errorCode" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(ERR_RENAME_FILE);
- checkUpdateLogContains(ERR_BACKUP_CREATE_7);
- checkUpdateLogContains(STATE_FAILED_WRITE_ERROR + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marFileLockedStageFailurePartial_win.js b/toolkit/mozapps/update/tests/unit_base_updater/marFileLockedStageFailurePartial_win.js
deleted file mode 100644
index 5f64df34c9..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marFileLockedStageFailurePartial_win.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File locked partial MAR file staged patch apply failure test */
-
-const STATE_AFTER_STAGE = STATE_PENDING;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestDirs = gTestDirsPartialSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_PARTIAL_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperLockFile(gTestFiles[2]);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- // Files aren't checked after staging since this test locks a file which
- // prevents reading the file.
- checkUpdateLogContains(ERR_ENSURE_COPY);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_FAILED_READ_ERROR, false, 1, false);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- standardInit();
- Assert.equal(readStatusFile(), STATE_NONE,
- "the status file failure code" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.updateCount, 2,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_FAILED,
- "the update state" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).errorCode, READ_ERROR,
- "the update errorCode" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(ERR_UNABLE_OPEN_DEST);
- checkUpdateLogContains(STATE_FAILED_READ_ERROR + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marRMRFDirFileInUseStageFailureComplete_win.js b/toolkit/mozapps/update/tests/unit_base_updater/marRMRFDirFileInUseStageFailureComplete_win.js
deleted file mode 100644
index b83bafccc4..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marRMRFDirFileInUseStageFailureComplete_win.js
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File in use inside removed dir complete MAR file staged patch apply failure
- test */
-
-const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
-const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperFileInUse(gTestDirs[4].relPathDir + gTestDirs[4].subDirs[0] +
- gTestDirs[4].subDirFiles[0], true);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS, true);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_AFTER_RUNUPDATE,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- setTestFilesAndDirsForFailure();
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(ERR_RENAME_FILE);
- checkUpdateLogContains(ERR_MOVE_DESTDIR_7 + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marRMRFDirFileInUseStageFailurePartial_win.js b/toolkit/mozapps/update/tests/unit_base_updater/marRMRFDirFileInUseStageFailurePartial_win.js
deleted file mode 100644
index 39ea485cdc..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marRMRFDirFileInUseStageFailurePartial_win.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File in use inside removed dir partial MAR file staged patch apply failure
- test */
-
-const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
-const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestDirs = gTestDirsPartialSuccess;
- setupUpdaterTest(FILE_PARTIAL_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperFileInUse(gTestDirs[2].relPathDir + gTestDirs[2].files[0], true);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true);
- checkUpdateLogContents(LOG_PARTIAL_SUCCESS, true);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_AFTER_RUNUPDATE,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- setTestFilesAndDirsForFailure();
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(ERR_RENAME_FILE);
- checkUpdateLogContains(ERR_MOVE_DESTDIR_7 + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marRMRFDirFileInUseSuccessComplete_win.js b/toolkit/mozapps/update/tests/unit_base_updater/marRMRFDirFileInUseSuccessComplete_win.js
deleted file mode 100644
index a71bb8d490..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marRMRFDirFileInUseSuccessComplete_win.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File in use inside removed dir complete MAR file patch apply success test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperFileInUse(gTestDirs[4].relPathDir + gTestDirs[4].subDirs[0] +
- gTestDirs[4].subDirFiles[0], true);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- runUpdate(STATE_SUCCEEDED, false, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
- checkUpdateLogContains(ERR_BACKUP_DISCARD);
- checkUpdateLogContains(STATE_SUCCEEDED + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marRMRFDirFileInUseSuccessPartial_win.js b/toolkit/mozapps/update/tests/unit_base_updater/marRMRFDirFileInUseSuccessPartial_win.js
deleted file mode 100644
index 2cbe70ed8e..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marRMRFDirFileInUseSuccessPartial_win.js
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File in use inside removed dir partial MAR file patch apply success test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestDirs = gTestDirsPartialSuccess;
- setupUpdaterTest(FILE_PARTIAL_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperFileInUse(gTestDirs[2].relPathDir + gTestDirs[2].files[0], true);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- runUpdate(STATE_SUCCEEDED, false, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
- checkUpdateLogContains(ERR_BACKUP_DISCARD);
- checkUpdateLogContains(STATE_SUCCEEDED + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marStageFailurePartial.js b/toolkit/mozapps/update/tests/unit_base_updater/marStageFailurePartial.js
deleted file mode 100644
index a9ce234207..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marStageFailurePartial.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/* 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/.
- */
-
-/* General Partial MAR File Staged Patch Apply Failure Test */
-
-const STATE_AFTER_STAGE = STATE_FAILED;
-gStagingRemovedUpdate = true;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestFiles[11].originalFile = "partial.png";
- gTestDirs = gTestDirsPartialSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_PARTIAL_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).errorCode, LOADSOURCE_ERROR_WRONG_SIZE,
- "the update errorCode" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(ERR_LOADSOURCEFILE_FAILED);
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marStageSuccessComplete.js b/toolkit/mozapps/update/tests/unit_base_updater/marStageSuccessComplete.js
deleted file mode 100644
index f7745f68f4..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marStageSuccessComplete.js
+++ /dev/null
@@ -1,132 +0,0 @@
-/* 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/.
- */
-
-/* General Complete MAR File Staged Patch Apply Test */
-
-const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestFiles[gTestFiles.length - 1].originalContents = null;
- gTestFiles[gTestFiles.length - 1].compareContents = "FromComplete\n";
- gTestFiles[gTestFiles.length - 1].comparePerms = 0o644;
- gTestDirs = gTestDirsCompleteSuccess;
- setupDistributionDir();
- setupSymLinks();
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS, true);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_SUCCEEDED, true, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- checkAppBundleModTime();
- checkSymLinks();
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
- checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);
- checkDistributionDir();
- checkCallbackLog();
-}
-
-/**
- * Setup the state of the distribution directory for the test.
- */
-function setupDistributionDir() {
- if (IS_MACOSX) {
- // Create files in the old distribution directory location to verify that
- // the directory and its contents are removed when there is a distribution
- // directory in the new location.
- let testFile = getApplyDirFile(DIR_MACOS + "distribution/testFile", true);
- writeFile(testFile, "test\n");
- testFile = getApplyDirFile(DIR_MACOS + "distribution/test1/testFile", true);
- writeFile(testFile, "test\n");
- }
-}
-
-/**
- * Checks the state of the distribution directory for the test.
- */
-function checkDistributionDir() {
- if (IS_MACOSX) {
- let distributionDir = getApplyDirFile(DIR_MACOS + "distribution", true);
- Assert.ok(!distributionDir.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
- checkUpdateLogContains(REMOVE_OLD_DIST_DIR);
- }
-}
-
-/**
- * Setup symlinks for the test.
- */
-function setupSymLinks() {
- // Don't test symlinks on Mac OS X in this test since it tends to timeout.
- // It is tested on Mac OS X in marAppInUseStageSuccessComplete_unix.js
- if (IS_UNIX && !IS_MACOSX) {
- removeSymlink();
- createSymlink();
- do_register_cleanup(removeSymlink);
- gTestFiles.splice(gTestFiles.length - 3, 0,
- {
- description: "Readable symlink",
- fileName: "link",
- relPathDir: DIR_RESOURCES,
- originalContents: "test",
- compareContents: "test",
- originalFile: null,
- compareFile: null,
- originalPerms: 0o666,
- comparePerms: 0o666
- });
- }
-}
-
-/**
- * Checks the state of the symlinks for the test.
- */
-function checkSymLinks() {
- // Don't test symlinks on Mac OS X in this test since it tends to timeout.
- // It is tested on Mac OS X in marAppInUseStageSuccessComplete_unix.js
- if (IS_UNIX && !IS_MACOSX) {
- checkSymlink();
- }
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marStageSuccessPartial.js b/toolkit/mozapps/update/tests/unit_base_updater/marStageSuccessPartial.js
deleted file mode 100644
index ef15326de8..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marStageSuccessPartial.js
+++ /dev/null
@@ -1,112 +0,0 @@
-/* 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/.
- */
-
-/* General Partial MAR File Staged Patch Apply Test */
-
-const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestFiles[gTestFiles.length - 2].originalContents = null;
- gTestFiles[gTestFiles.length - 2].compareContents = "FromPartial\n";
- gTestFiles[gTestFiles.length - 2].comparePerms = 0o644;
- gTestDirs = gTestDirsPartialSuccess;
- preventDistributionFiles();
- setupDistributionDir();
- setupUpdaterTest(FILE_PARTIAL_MAR, true);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true);
- checkUpdateLogContents(LOG_PARTIAL_SUCCESS, true, false, true);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_SUCCEEDED, true, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- checkAppBundleModTime();
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
- checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true, true);
- checkDistributionDir();
- checkCallbackLog();
-}
-
-/**
- * Setup the state of the distribution directory for the test.
- */
-function setupDistributionDir() {
- if (IS_MACOSX) {
- // Create files in the old distribution directory location to verify that
- // the directory and its contents are moved to the new location on update.
- let testFile = getApplyDirFile(DIR_MACOS + "distribution/testFile", true);
- writeFile(testFile, "test\n");
- testFile = getApplyDirFile(DIR_MACOS + "distribution/test/testFile", true);
- writeFile(testFile, "test\n");
- }
-}
-
-/**
- * Checks the state of the distribution directory.
- */
-function checkDistributionDir() {
- let distributionDir = getApplyDirFile(DIR_RESOURCES + "distribution", true);
- if (IS_MACOSX) {
- Assert.ok(distributionDir.exists(),
- MSG_SHOULD_EXIST + getMsgPath(distributionDir.path));
-
- let testFile = getApplyDirFile(DIR_RESOURCES + "distribution/testFile", true);
- Assert.ok(testFile.exists(),
- MSG_SHOULD_EXIST + getMsgPath(testFile.path));
-
- testFile = getApplyDirFile(DIR_RESOURCES + "distribution/test/testFile", true);
- Assert.ok(testFile.exists(),
- MSG_SHOULD_EXIST + getMsgPath(testFile.path));
-
- distributionDir = getApplyDirFile(DIR_MACOS + "distribution", true);
- Assert.ok(!distributionDir.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
-
- checkUpdateLogContains(MOVE_OLD_DIST_DIR);
- } else {
- debugDump("testing that files aren't added with an add-if instruction " +
- "when the file's destination directory doesn't exist");
- Assert.ok(!distributionDir.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
- }
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marSuccessComplete.js b/toolkit/mozapps/update/tests/unit_base_updater/marSuccessComplete.js
deleted file mode 100644
index 1008e867fc..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marSuccessComplete.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/* 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/.
- */
-
-/* General Complete MAR File Patch Apply Test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- preventDistributionFiles();
- setupDistributionDir();
- setupUpdaterTest(FILE_COMPLETE_MAR, true);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runUpdate(STATE_SUCCEEDED, false, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- checkAppBundleModTime();
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS, false, false, true);
- checkDistributionDir();
- checkCallbackLog();
-}
-
-/**
- * Setup the state of the distribution directory for the test.
- */
-function setupDistributionDir() {
- if (IS_MACOSX) {
- // Create files in the old distribution directory location to verify that
- // the directory and its contents are moved to the new location on update.
- let testFile = getApplyDirFile(DIR_MACOS + "distribution/testFile", true);
- writeFile(testFile, "test\n");
- testFile = getApplyDirFile(DIR_MACOS + "distribution/test/testFile", true);
- writeFile(testFile, "test\n");
- }
-}
-
-/**
- * Checks the state of the distribution directory.
- */
-function checkDistributionDir() {
- let distributionDir = getApplyDirFile(DIR_RESOURCES + "distribution", true);
- if (IS_MACOSX) {
- Assert.ok(distributionDir.exists(),
- MSG_SHOULD_EXIST + getMsgPath(distributionDir.path));
-
- let testFile = getApplyDirFile(DIR_RESOURCES + "distribution/testFile", true);
- Assert.ok(testFile.exists(),
- MSG_SHOULD_EXIST + getMsgPath(testFile.path));
-
- testFile = getApplyDirFile(DIR_RESOURCES + "distribution/test/testFile", true);
- Assert.ok(testFile.exists(),
- MSG_SHOULD_EXIST + getMsgPath(testFile.path));
-
- distributionDir = getApplyDirFile(DIR_MACOS + "distribution", true);
- Assert.ok(!distributionDir.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
-
- checkUpdateLogContains(MOVE_OLD_DIST_DIR);
- } else {
- debugDump("testing that files aren't added with an add-if instruction " +
- "when the file's destination directory doesn't exist");
- Assert.ok(!distributionDir.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
- }
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marSuccessPartial.js b/toolkit/mozapps/update/tests/unit_base_updater/marSuccessPartial.js
deleted file mode 100644
index 616390f55c..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marSuccessPartial.js
+++ /dev/null
@@ -1,79 +0,0 @@
-/* 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/.
- */
-
-/* General Partial MAR File Patch Apply Test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestFiles[gTestFiles.length - 1].originalContents = null;
- gTestFiles[gTestFiles.length - 1].compareContents = "FromPartial\n";
- gTestFiles[gTestFiles.length - 1].comparePerms = 0o644;
- gTestFiles[gTestFiles.length - 2].originalContents = null;
- gTestFiles[gTestFiles.length - 2].compareContents = "FromPartial\n";
- gTestFiles[gTestFiles.length - 2].comparePerms = 0o644;
- gTestDirs = gTestDirsPartialSuccess;
- setupDistributionDir();
- // The third parameter will test that a relative path that contains a
- // directory traversal to the post update binary doesn't execute.
- setupUpdaterTest(FILE_PARTIAL_MAR, false, "test/../");
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runUpdate(STATE_SUCCEEDED, false, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- checkAppBundleModTime();
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getApplyDirFile);
- checkUpdateLogContents(LOG_PARTIAL_SUCCESS);
- checkDistributionDir();
- checkCallbackLog();
-}
-
-/**
- * Setup the state of the distribution directory for the test.
- */
-function setupDistributionDir() {
- if (IS_MACOSX) {
- // Create files in the old distribution directory location to verify that
- // the directory and its contents are removed when there is a distribution
- // directory in the new location.
- let testFile = getApplyDirFile(DIR_MACOS + "distribution/testFile", true);
- writeFile(testFile, "test\n");
- testFile = getApplyDirFile(DIR_MACOS + "distribution/test/testFile", true);
- writeFile(testFile, "test\n");
- }
-}
-
-/**
- * Checks the state of the distribution directory.
- */
-function checkDistributionDir() {
- if (IS_MACOSX) {
- let distributionDir = getApplyDirFile(DIR_MACOS + "distribution", true);
- Assert.ok(!distributionDir.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
- checkUpdateLogContains(REMOVE_OLD_DIST_DIR);
- }
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marVersionDowngrade.js b/toolkit/mozapps/update/tests/unit_base_updater/marVersionDowngrade.js
deleted file mode 100644
index 86a2eb821f..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marVersionDowngrade.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/* 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/.
- */
-
-/* Test version downgrade MAR security check */
-
-function run_test() {
- if (!MOZ_VERIFY_MAR_SIGNATURE) {
- return;
- }
-
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_OLD_VERSION_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- // If execv is used the updater process will turn into the callback process
- // and the updater's return code will be that of the callback process.
- runUpdate(STATE_FAILED_VERSION_DOWNGRADE_ERROR, false, (USE_EXECV ? 0 : 1),
- false);
-}
-
-/**
- * Called after the call to runUpdateUsingUpdater finishes.
- */
-function runUpdateFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_FAILED,
- "the update state" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).errorCode, VERSION_DOWNGRADE_ERROR,
- "the update errorCode" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(STATE_FAILED_VERSION_DOWNGRADE_ERROR);
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marWrongChannel.js b/toolkit/mozapps/update/tests/unit_base_updater/marWrongChannel.js
deleted file mode 100644
index 6db906fbc5..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/marWrongChannel.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/* 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/.
- */
-
-/* Test product/channel MAR security check */
-
-function run_test() {
- if (!MOZ_VERIFY_MAR_SIGNATURE) {
- return;
- }
-
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_WRONG_CHANNEL_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- // If execv is used the updater process will turn into the callback process
- // and the updater's return code will be that of the callback process.
- runUpdate(STATE_FAILED_MAR_CHANNEL_MISMATCH_ERROR, false, (USE_EXECV ? 0 : 1),
- false);
-}
-
-/**
- * Called after the call to runUpdateUsingUpdater finishes.
- */
-function runUpdateFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_FAILED,
- "the update state" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).errorCode, MAR_CHANNEL_MISMATCH_ERROR,
- "the update errorCode" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(STATE_FAILED_MAR_CHANNEL_MISMATCH_ERROR);
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_base_updater/xpcshell.ini b/toolkit/mozapps/update/tests/unit_base_updater/xpcshell.ini
deleted file mode 100644
index 2b77bee7a4..0000000000
--- a/toolkit/mozapps/update/tests/unit_base_updater/xpcshell.ini
+++ /dev/null
@@ -1,136 +0,0 @@
-; 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/.
-
-; Tests that require the updater binary. These tests should never run on Android
-; which doesn't use the updater binary as other applications do and are excluded
-; from running the tests in the moz.build file.
-
-[DEFAULT]
-tags = appupdate
-head = head_update.js
-tail =
-
-[invalidArgCallbackFileNotInInstallDirFailure.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-[invalidArgCallbackFilePathTooLongFailure.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-[invalidArgInstallDirPathTooLongFailure.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-[invalidArgInstallDirPathTraversalFailure.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-[invalidArgInstallWorkingDirPathNotSameFailure_win.js]
-skip-if = os != 'win' || debug && (os_version == '5.1' || os_version == '5.2')
-reason = Windows only test and bug 1291985
-[invalidArgPatchDirPathTraversalFailure.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-[invalidArgStageDirNotInInstallDirFailure_win.js]
-skip-if = os != 'win' || debug && (os_version == '5.1' || os_version == '5.2')
-reason = Windows only test and bug 1291985
-[invalidArgWorkingDirPathLocalUNCFailure_win.js]
-skip-if = os != 'win' || debug && (os_version == '5.1' || os_version == '5.2')
-reason = Windows only test and bug 1291985
-[invalidArgWorkingDirPathRelativeFailure.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-[marSuccessComplete.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-[marSuccessPartial.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-[marFailurePartial.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-[marStageSuccessComplete.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-[marStageSuccessPartial.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-[marVersionDowngrade.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985 and mar signing
-[marWrongChannel.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985 and mar signing
-[marStageFailurePartial.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-[marCallbackAppSuccessComplete_win.js]
-skip-if = os != 'win' || debug && (os_version == '5.1' || os_version == '5.2')
-reason = Windows only test and bug 1291985
-[marCallbackAppSuccessPartial_win.js]
-skip-if = os != 'win' || debug && (os_version == '5.1' || os_version == '5.2')
-reason = Windows only test and bug 1291985
-[marCallbackAppStageSuccessComplete_win.js]
-skip-if = os != 'win' || debug && (os_version == '5.1' || os_version == '5.2')
-reason = Windows only test and bug 1291985
-[marCallbackAppStageSuccessPartial_win.js]
-skip-if = os != 'win' || debug && (os_version == '5.1' || os_version == '5.2')
-reason = Windows only test and bug 1291985
-[marAppInUseSuccessComplete.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-[marAppInUseStageSuccessComplete_unix.js]
-skip-if = os == 'win'
-reason = not a Windows test
-[marAppInUseStageFailureComplete_win.js]
-skip-if = os != 'win' || debug && (os_version == '5.1' || os_version == '5.2')
-reason = Windows only test and bug 1291985
-[marFileLockedFailureComplete_win.js]
-skip-if = os != 'win' || debug && (os_version == '5.1' || os_version == '5.2')
-reason = Windows only test and bug 1291985
-[marFileLockedFailurePartial_win.js]
-skip-if = os != 'win' || debug && (os_version == '5.1' || os_version == '5.2')
-reason = Windows only test and bug 1291985
-[marFileLockedStageFailureComplete_win.js]
-skip-if = os != 'win' || debug && (os_version == '5.1' || os_version == '5.2')
-reason = Windows only test and bug 1291985
-[marFileLockedStageFailurePartial_win.js]
-skip-if = os != 'win' || debug && (os_version == '5.1' || os_version == '5.2')
-reason = Windows only test and bug 1291985
-[marFileInUseSuccessComplete_win.js]
-skip-if = os != 'win' || debug && (os_version == '5.1' || os_version == '5.2')
-reason = Windows only test and bug 1291985
-[marFileInUseSuccessPartial_win.js]
-skip-if = os != 'win' || debug && (os_version == '5.1' || os_version == '5.2')
-reason = Windows only test and bug 1291985
-[marRMRFDirFileInUseSuccessComplete_win.js]
-skip-if = os != 'win' || debug && (os_version == '5.1' || os_version == '5.2')
-reason = Windows only test and bug 1291985
-[marRMRFDirFileInUseSuccessPartial_win.js]
-skip-if = os != 'win' || debug && (os_version == '5.1' || os_version == '5.2')
-reason = Windows only test and bug 1291985
-[marFileInUseStageFailureComplete_win.js]
-skip-if = os != 'win' || debug && (os_version == '5.1' || os_version == '5.2')
-reason = Windows only test and bug 1291985
-[marFileInUseStageFailurePartial_win.js]
-skip-if = os != 'win' || debug && (os_version == '5.1' || os_version == '5.2')
-reason = Windows only test and bug 1291985
-[marRMRFDirFileInUseStageFailureComplete_win.js]
-skip-if = os != 'win' || debug && (os_version == '5.1' || os_version == '5.2')
-reason = Windows only test and bug 1291985
-[marRMRFDirFileInUseStageFailurePartial_win.js]
-skip-if = os != 'win' || debug && (os_version == '5.1' || os_version == '5.2')
-reason = Windows only test and bug 1291985
-[marAppApplyDirLockedStageFailure_win.js]
-skip-if = os != 'win' || debug && (os_version == '5.1' || os_version == '5.2')
-reason = Windows only test and bug 1291985
-[marAppApplyUpdateAppBinInUseStageSuccess_win.js]
-skip-if = os != 'win' || debug && (os_version == '5.1' || os_version == '5.2')
-reason = Windows only test and bug 1291985
-[marAppApplyUpdateSuccess.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-[marAppApplyUpdateStageSuccess.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-[marAppApplyUpdateStageOldVersionFailure.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/.eslintrc.js b/toolkit/mozapps/update/tests/unit_service_updater/.eslintrc.js
deleted file mode 100644
index d35787cd2c..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../../../testing/xpcshell/xpcshell.eslintrc.js"
- ]
-};
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/bootstrapSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/bootstrapSvc.js
deleted file mode 100644
index 015fbd0cbc..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/bootstrapSvc.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* Bootstrap the tests using the service by installing our own version of the service */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- // We don't actually care if the MAR has any data, we only care about the
- // application return code and update.status result.
- gTestFiles = gTestFilesCommon;
- gTestDirs = [];
- setupUpdaterTest(FILE_COMPLETE_MAR, null);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runUpdate(STATE_SUCCEEDED, false, 0, true);
-}
-
-/**
- * Called after the call to runUpdateUsingService finishes.
- */
-function runUpdateFinished() {
- checkFilesAfterUpdateSuccess(getApplyDirFile, false, false);
-
- // We need to check the service log even though this is a bootstrap
- // because the app bin could be in use by this test by the time the next
- // test runs.
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/checkUpdaterSigSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/checkUpdaterSigSvc.js
deleted file mode 100644
index bf765ee785..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/checkUpdaterSigSvc.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/**
- * We skip authenticode cert checks from the service udpates
- * so that we can use updater-xpcshell with the wrong certs for testing.
- * This tests that code path. */
-
-function run_test() {
- if (!IS_AUTHENTICODE_CHECK_ENABLED) {
- return;
- }
-
- let binDir = getGREBinDir();
- let maintenanceServiceBin = binDir.clone();
- maintenanceServiceBin.append(FILE_MAINTENANCE_SERVICE_BIN);
-
- let updaterBin = binDir.clone();
- updaterBin.append(FILE_UPDATER_BIN);
-
- debugDump("Launching maintenance service bin: " +
- maintenanceServiceBin.path + " to check updater: " +
- updaterBin.path + " signature.");
-
- // Bypass the manifest and run as invoker
- gEnv.set("__COMPAT_LAYER", "RunAsInvoker");
-
- let dummyInstallPath = "---";
- let maintenanceServiceBinArgs = ["check-cert", dummyInstallPath,
- updaterBin.path];
- let maintenanceServiceBinProcess = Cc["@mozilla.org/process/util;1"].
- createInstance(Ci.nsIProcess);
- maintenanceServiceBinProcess.init(maintenanceServiceBin);
- maintenanceServiceBinProcess.run(true, maintenanceServiceBinArgs,
- maintenanceServiceBinArgs.length);
- Assert.equal(maintenanceServiceBinProcess.exitValue, 0,
- "the maintenance service exit value should be 0");
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/head_update.js b/toolkit/mozapps/update/tests/unit_service_updater/head_update.js
deleted file mode 100644
index 38be4ee396..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/head_update.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-const IS_SERVICE_TEST = true;
-
-/* import-globals-from ../data/xpcshellUtilsAUS.js */
-load("../data/xpcshellUtilsAUS.js");
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/invalidArgInstallDirPathTooLongFailureSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/invalidArgInstallDirPathTooLongFailureSvc.js
deleted file mode 100644
index 70e03646a6..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/invalidArgInstallDirPathTooLongFailureSvc.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/* 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/.
- */
-
-/* Too long install directory path failure test */
-
-const STATE_AFTER_RUNUPDATE =
- IS_SERVICE_TEST ? STATE_FAILED_SERVICE_INVALID_INSTALL_DIR_PATH_ERROR
- : STATE_FAILED_INVALID_INSTALL_DIR_PATH_ERROR;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- let path = "123456789";
- if (IS_WIN) {
- path = "\\" + path;
- path = path.repeat(30); // 300 characters
- path = "C:" + path;
- } else {
- path = "/" + path;
- path = path.repeat(1000); // 10000 characters
- }
-
- runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, path, null, null);
-}
-
-/**
- * Called after the call to runUpdateUsingUpdater finishes.
- */
-function runUpdateFinished() {
- standardInit();
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/invalidArgInstallDirPathTraversalFailureSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/invalidArgInstallDirPathTraversalFailureSvc.js
deleted file mode 100644
index 330578de64..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/invalidArgInstallDirPathTraversalFailureSvc.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/* 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/.
- */
-
-/* Install directory path traversal failure test */
-
-const STATE_AFTER_RUNUPDATE =
- IS_SERVICE_TEST ? STATE_FAILED_SERVICE_INVALID_INSTALL_DIR_PATH_ERROR
- : STATE_FAILED_INVALID_INSTALL_DIR_PATH_ERROR;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- let path = "123456789";
- if (IS_WIN) {
- path = "C:\\" + path + "\\..\\" + path;
- } else {
- path = "/" + path + "/../" + path;
- }
-
- runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, path, null, null);
-}
-
-/**
- * Called after the call to runUpdateUsingUpdater finishes.
- */
-function runUpdateFinished() {
- standardInit();
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/invalidArgInstallWorkingDirPathNotSameFailureSvc_win.js b/toolkit/mozapps/update/tests/unit_service_updater/invalidArgInstallWorkingDirPathNotSameFailureSvc_win.js
deleted file mode 100644
index 8ddb34af06..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/invalidArgInstallWorkingDirPathNotSameFailureSvc_win.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/* 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/.
- */
-
-/* Different install and working directories for a regular update failure */
-
-const STATE_AFTER_RUNUPDATE =
- IS_SERVICE_TEST ? STATE_FAILED_SERVICE_INVALID_APPLYTO_DIR_ERROR
- : STATE_FAILED_INVALID_APPLYTO_DIR_ERROR;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- let path = getApplyDirFile("..", false).path;
- runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, path, null);
-}
-
-/**
- * Called after the call to runUpdateUsingUpdater finishes.
- */
-function runUpdateFinished() {
- standardInit();
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/invalidArgPatchDirPathTraversalFailureSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/invalidArgPatchDirPathTraversalFailureSvc.js
deleted file mode 100644
index c8ae3f0c65..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/invalidArgPatchDirPathTraversalFailureSvc.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/* 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/.
- */
-
-/* Patch directory path traversal failure test */
-
-const STATE_AFTER_RUNUPDATE =
- IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- let path = getUpdatesPatchDir();
- if (IS_WIN) {
- path = path + "\\..\\";
- } else {
- path = path + "/../";
- }
-
- runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, path, null, null, null);
-}
-
-/**
- * Called after the call to runUpdateUsingUpdater finishes.
- */
-function runUpdateFinished() {
- standardInit();
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/invalidArgStageDirNotInInstallDirFailureSvc_win.js b/toolkit/mozapps/update/tests/unit_service_updater/invalidArgStageDirNotInInstallDirFailureSvc_win.js
deleted file mode 100644
index e9b2276573..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/invalidArgStageDirNotInInstallDirFailureSvc_win.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/* 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/.
- */
-
-/* Different install and working directories for a regular update failure */
-
-const STATE_AFTER_RUNUPDATE =
- IS_SERVICE_TEST ? STATE_FAILED_SERVICE_INVALID_APPLYTO_DIR_STAGED_ERROR
- : STATE_FAILED_INVALID_APPLYTO_DIR_STAGED_ERROR;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- let path = getApplyDirFile("..", false).path;
- runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true, null, null, path, null);
-}
-
-/**
- * Called after the call to runUpdateUsingUpdater finishes.
- */
-function runUpdateFinished() {
- standardInit();
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/invalidArgWorkingDirPathLocalUNCFailureSvc_win.js b/toolkit/mozapps/update/tests/unit_service_updater/invalidArgWorkingDirPathLocalUNCFailureSvc_win.js
deleted file mode 100644
index 87bbad4aa2..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/invalidArgWorkingDirPathLocalUNCFailureSvc_win.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/* 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/.
- */
-
-/* Working directory path local UNC failure test */
-
-const STATE_AFTER_RUNUPDATE =
- IS_SERVICE_TEST ? STATE_FAILED_SERVICE_INVALID_WORKING_DIR_PATH_ERROR
- : STATE_FAILED_INVALID_WORKING_DIR_PATH_ERROR;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- let path = "\\\\.\\" + getApplyDirFile(null, false).path;
- runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, path, null);
-}
-
-/**
- * Called after the call to runUpdateUsingUpdater finishes.
- */
-function runUpdateFinished() {
- standardInit();
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/invalidArgWorkingDirPathRelativeFailureSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/invalidArgWorkingDirPathRelativeFailureSvc.js
deleted file mode 100644
index a550909b28..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/invalidArgWorkingDirPathRelativeFailureSvc.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/* 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/.
- */
-
-/* Relative working directory path failure test */
-
-const STATE_AFTER_RUNUPDATE =
- IS_SERVICE_TEST ? STATE_FAILED_SERVICE_INVALID_WORKING_DIR_PATH_ERROR
- : STATE_FAILED_INVALID_WORKING_DIR_PATH_ERROR;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, "test", null);
-}
-
-/**
- * Called after the call to runUpdateUsingUpdater finishes.
- */
-function runUpdateFinished() {
- standardInit();
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marAppApplyDirLockedStageFailureSvc_win.js b/toolkit/mozapps/update/tests/unit_service_updater/marAppApplyDirLockedStageFailureSvc_win.js
deleted file mode 100644
index b9f793236a..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marAppApplyDirLockedStageFailureSvc_win.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/**
- * Test applying an update by staging an update and launching an application to
- * apply it.
- */
-
-const STATE_AFTER_STAGE = STATE_PENDING;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
-
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- createUpdateInProgressLockFile(getAppBaseDir());
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- stageUpdate(false);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- removeUpdateInProgressLockFile(getAppBaseDir());
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(PERFORMING_STAGED_UPDATE);
- checkUpdateLogContains(ERR_UPDATE_IN_PROGRESS);
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marAppApplyUpdateAppBinInUseStageSuccessSvc_win.js b/toolkit/mozapps/update/tests/unit_service_updater/marAppApplyUpdateAppBinInUseStageSuccessSvc_win.js
deleted file mode 100644
index a606720b70..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marAppApplyUpdateAppBinInUseStageSuccessSvc_win.js
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/**
- * Test applying an update by staging an update and launching an application to
- * apply it.
- */
-
-const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
-
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setupUpdaterTest(FILE_COMPLETE_MAR, undefined);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true, false);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS, true);
- lockDirectory(getAppBaseDir().path);
- // Switch the application to the staged application that was updated.
- runUpdateUsingApp(STATE_SUCCEEDED);
-}
-
-/**
- * Called after the call to runUpdateUsingApp finishes.
- */
-function runUpdateFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- checkAppBundleModTime();
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS);
-
- let updatesDir = getUpdatesPatchDir();
- Assert.ok(updatesDir.exists(),
- MSG_SHOULD_EXIST + getMsgPath(updatesDir.path));
-
- let log = getUpdateLog(FILE_UPDATE_LOG);
- Assert.ok(!log.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(log.path));
-
- log = getUpdateLog(FILE_LAST_UPDATE_LOG);
- Assert.ok(log.exists(),
- MSG_SHOULD_EXIST + getMsgPath(log.path));
-
- log = getUpdateLog(FILE_BACKUP_UPDATE_LOG);
- Assert.ok(log.exists(),
- MSG_SHOULD_EXIST + getMsgPath(log.path));
-
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marAppApplyUpdateStageSuccessSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/marAppApplyUpdateStageSuccessSvc.js
deleted file mode 100644
index 5b9b08156d..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marAppApplyUpdateStageSuccessSvc.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/**
- * Test applying an update by staging an update and launching an application to
- * apply it.
- */
-
-const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
-
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setupUpdaterTest(FILE_COMPLETE_MAR, true);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS, true);
- // Switch the application to the staged application that was updated.
- runUpdateUsingApp(STATE_SUCCEEDED);
-}
-
-/**
- * Called after the call to runUpdateUsingApp finishes.
- */
-function runUpdateFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- checkAppBundleModTime();
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
- checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);
-
- let updatesDir = getUpdatesPatchDir();
- Assert.ok(updatesDir.exists(),
- MSG_SHOULD_EXIST + getMsgPath(updatesDir.path));
-
- let log = getUpdateLog(FILE_UPDATE_LOG);
- Assert.ok(!log.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(log.path));
-
- log = getUpdateLog(FILE_LAST_UPDATE_LOG);
- Assert.ok(log.exists(),
- MSG_SHOULD_EXIST + getMsgPath(log.path));
-
- log = getUpdateLog(FILE_BACKUP_UPDATE_LOG);
- Assert.ok(log.exists(),
- MSG_SHOULD_EXIST + getMsgPath(log.path));
-
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marAppApplyUpdateSuccessSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/marAppApplyUpdateSuccessSvc.js
deleted file mode 100644
index e76233fe6a..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marAppApplyUpdateSuccessSvc.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/**
- * Test applying an update by staging an update and launching an application to
- * apply it.
- */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
-
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- // The third parameter will test that a full path to the post update binary
- // doesn't execute.
- setupUpdaterTest(FILE_COMPLETE_MAR, undefined,
- getApplyDirFile(null, true).path + "/");
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runUpdateUsingApp(STATE_SUCCEEDED);
-}
-
-/**
- * Called after the call to runUpdateUsingApp finishes.
- */
-function runUpdateFinished() {
- checkAppBundleModTime();
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getApplyDirFile);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS);
-
- let updatesDir = getUpdatesPatchDir();
- Assert.ok(updatesDir.exists(),
- MSG_SHOULD_EXIST + getMsgPath(updatesDir.path));
-
- let log = getUpdateLog(FILE_UPDATE_LOG);
- Assert.ok(!log.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(log.path));
-
- log = getUpdateLog(FILE_LAST_UPDATE_LOG);
- Assert.ok(log.exists(),
- MSG_SHOULD_EXIST + getMsgPath(log.path));
-
- log = getUpdateLog(FILE_BACKUP_UPDATE_LOG);
- Assert.ok(!log.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(log.path));
-
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marAppInUseStageFailureCompleteSvc_win.js b/toolkit/mozapps/update/tests/unit_service_updater/marAppInUseStageFailureCompleteSvc_win.js
deleted file mode 100644
index b1505d58eb..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marAppInUseStageFailureCompleteSvc_win.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* Application in use complete MAR file staged patch apply failure test */
-
-const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
-const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperFileInUse(DIR_RESOURCES + gCallbackBinFile, false);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS, true);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_AFTER_RUNUPDATE,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- setTestFilesAndDirsForFailure();
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(ERR_RENAME_FILE);
- checkUpdateLogContains(ERR_MOVE_DESTDIR_7 + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marAppInUseSuccessCompleteSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/marAppInUseSuccessCompleteSvc.js
deleted file mode 100644
index 93333cadeb..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marAppInUseSuccessCompleteSvc.js
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* Application in use complete MAR file patch apply success test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperFileInUse(DIR_RESOURCES + gCallbackBinFile, false);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- runUpdate(STATE_SUCCEEDED, false, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- checkAppBundleModTime();
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marCallbackAppStageSuccessCompleteSvc_win.js b/toolkit/mozapps/update/tests/unit_service_updater/marCallbackAppStageSuccessCompleteSvc_win.js
deleted file mode 100644
index 79e54c1825..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marCallbackAppStageSuccessCompleteSvc_win.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* Replace app binary complete MAR file staged patch apply success test */
-
-const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- gCallbackBinFile = "exe0.exe";
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS, true);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_SUCCEEDED, true, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
- checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marCallbackAppStageSuccessPartialSvc_win.js b/toolkit/mozapps/update/tests/unit_service_updater/marCallbackAppStageSuccessPartialSvc_win.js
deleted file mode 100644
index b1f84715f0..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marCallbackAppStageSuccessPartialSvc_win.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* Patch app binary partial MAR file staged patch apply success test */
-
-const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestDirs = gTestDirsPartialSuccess;
- gCallbackBinFile = "exe0.exe";
- setupUpdaterTest(FILE_PARTIAL_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true);
- checkUpdateLogContents(LOG_PARTIAL_SUCCESS, true);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_SUCCEEDED, true, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
- checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marCallbackAppSuccessCompleteSvc_win.js b/toolkit/mozapps/update/tests/unit_service_updater/marCallbackAppSuccessCompleteSvc_win.js
deleted file mode 100644
index 85e92d290e..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marCallbackAppSuccessCompleteSvc_win.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* Replace app binary complete MAR file patch apply success test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- gCallbackBinFile = "exe0.exe";
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runUpdate(STATE_SUCCEEDED, false, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marCallbackAppSuccessPartialSvc_win.js b/toolkit/mozapps/update/tests/unit_service_updater/marCallbackAppSuccessPartialSvc_win.js
deleted file mode 100644
index 1212c9ba2e..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marCallbackAppSuccessPartialSvc_win.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* Patch app binary partial MAR file patch apply success test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestDirs = gTestDirsPartialSuccess;
- gCallbackBinFile = "exe0.exe";
- setupUpdaterTest(FILE_PARTIAL_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runUpdate(STATE_SUCCEEDED, false, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile);
- checkUpdateLogContents(LOG_PARTIAL_SUCCESS);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marFailurePartialSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/marFailurePartialSvc.js
deleted file mode 100644
index 960c96f7b8..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marFailurePartialSvc.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/* 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/.
- */
-
-/* General Partial MAR File Patch Apply Failure Test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestFiles[11].originalFile = "partial.png";
- gTestDirs = gTestDirsPartialSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_PARTIAL_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- // If execv is used the updater process will turn into the callback process
- // and the updater's return code will be that of the callback process.
- runUpdate(STATE_FAILED_LOADSOURCE_ERROR_WRONG_SIZE, false, (USE_EXECV ? 0 : 1),
- true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- checkAppBundleModTime();
- standardInit();
- Assert.equal(readStatusFile(), STATE_NONE,
- "the status file failure code" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_FAILED,
- "the update state" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).errorCode, LOADSOURCE_ERROR_WRONG_SIZE,
- "the update errorCode" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContents(LOG_PARTIAL_FAILURE);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marFileInUseStageFailureCompleteSvc_win.js b/toolkit/mozapps/update/tests/unit_service_updater/marFileInUseStageFailureCompleteSvc_win.js
deleted file mode 100644
index b39595f921..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marFileInUseStageFailureCompleteSvc_win.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File in use complete MAR file staged patch apply failure test */
-
-const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
-const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperFileInUse(gTestFiles[13].relPathDir + gTestFiles[13].fileName,
- false);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS, true);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- standardInit();
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_AFTER_RUNUPDATE,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- setTestFilesAndDirsForFailure();
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(ERR_RENAME_FILE);
- checkUpdateLogContains(ERR_MOVE_DESTDIR_7 + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marFileInUseStageFailurePartialSvc_win.js b/toolkit/mozapps/update/tests/unit_service_updater/marFileInUseStageFailurePartialSvc_win.js
deleted file mode 100644
index 06d386ad63..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marFileInUseStageFailurePartialSvc_win.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File in use partial MAR file staged patch apply failure test */
-
-const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
-const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestDirs = gTestDirsPartialSuccess;
- setupUpdaterTest(FILE_PARTIAL_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperFileInUse(gTestFiles[11].relPathDir + gTestFiles[11].fileName,
- false);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true);
- checkUpdateLogContents(LOG_PARTIAL_SUCCESS, true);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- standardInit();
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_AFTER_RUNUPDATE,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- setTestFilesAndDirsForFailure();
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(ERR_RENAME_FILE);
- checkUpdateLogContains(ERR_MOVE_DESTDIR_7 + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marFileInUseSuccessCompleteSvc_win.js b/toolkit/mozapps/update/tests/unit_service_updater/marFileInUseSuccessCompleteSvc_win.js
deleted file mode 100644
index 89a2fff5ed..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marFileInUseSuccessCompleteSvc_win.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File in use complete MAR file patch apply success test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperFileInUse(gTestFiles[13].relPathDir + gTestFiles[13].fileName,
- false);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- runUpdate(STATE_SUCCEEDED, false, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
- checkUpdateLogContains(ERR_BACKUP_DISCARD);
- checkUpdateLogContains(STATE_SUCCEEDED + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marFileInUseSuccessPartialSvc_win.js b/toolkit/mozapps/update/tests/unit_service_updater/marFileInUseSuccessPartialSvc_win.js
deleted file mode 100644
index ea85ddccc7..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marFileInUseSuccessPartialSvc_win.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File in use partial MAR file patch apply success test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestDirs = gTestDirsPartialSuccess;
- setupUpdaterTest(FILE_PARTIAL_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperFileInUse(gTestFiles[11].relPathDir + gTestFiles[11].fileName,
- false);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- runUpdate(STATE_SUCCEEDED, false, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
- checkUpdateLogContains(ERR_BACKUP_DISCARD);
- checkUpdateLogContains(STATE_SUCCEEDED + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marFileLockedFailureCompleteSvc_win.js b/toolkit/mozapps/update/tests/unit_service_updater/marFileLockedFailureCompleteSvc_win.js
deleted file mode 100644
index c5efaa8c07..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marFileLockedFailureCompleteSvc_win.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File locked complete MAR file patch apply failure test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperLockFile(gTestFiles[3]);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- runUpdate(STATE_FAILED_WRITE_ERROR, false, 1, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- standardInit();
- Assert.equal(readStatusFile(), STATE_PENDING,
- "the status file failure code" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_PENDING,
- "the update state" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).errorCode, WRITE_ERROR,
- "the update errorCode" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(ERR_RENAME_FILE);
- checkUpdateLogContains(ERR_BACKUP_CREATE_7);
- checkUpdateLogContains(STATE_FAILED_WRITE_ERROR + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marFileLockedFailurePartialSvc_win.js b/toolkit/mozapps/update/tests/unit_service_updater/marFileLockedFailurePartialSvc_win.js
deleted file mode 100644
index 4fdbadb5be..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marFileLockedFailurePartialSvc_win.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File locked partial MAR file patch apply failure test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestDirs = gTestDirsPartialSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_PARTIAL_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperLockFile(gTestFiles[2]);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- runUpdate(STATE_FAILED_READ_ERROR, false, 1, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- standardInit();
- Assert.equal(readStatusFile(), STATE_NONE,
- "the status file failure code" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_FAILED,
- "the update state" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).errorCode, READ_ERROR,
- "the update errorCode" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(ERR_UNABLE_OPEN_DEST);
- checkUpdateLogContains(STATE_FAILED_READ_ERROR + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marFileLockedStageFailureCompleteSvc_win.js b/toolkit/mozapps/update/tests/unit_service_updater/marFileLockedStageFailureCompleteSvc_win.js
deleted file mode 100644
index 4d12f4e42f..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marFileLockedStageFailureCompleteSvc_win.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File locked complete MAR file staged patch apply failure test */
-
-const STATE_AFTER_STAGE = STATE_PENDING;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperLockFile(gTestFiles[3]);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- // Files aren't checked after staging since this test locks a file which
- // prevents reading the file.
- checkUpdateLogContains(ERR_ENSURE_COPY);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_FAILED_WRITE_ERROR, false, 1, false);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- standardInit();
- Assert.equal(readStatusFile(), STATE_PENDING,
- "the status file failure code" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.updateCount, 2,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_PENDING,
- "the update state" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).errorCode, WRITE_ERROR,
- "the update errorCode" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(ERR_RENAME_FILE);
- checkUpdateLogContains(ERR_BACKUP_CREATE_7);
- checkUpdateLogContains(STATE_FAILED_WRITE_ERROR + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marFileLockedStageFailurePartialSvc_win.js b/toolkit/mozapps/update/tests/unit_service_updater/marFileLockedStageFailurePartialSvc_win.js
deleted file mode 100644
index 5f64df34c9..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marFileLockedStageFailurePartialSvc_win.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File locked partial MAR file staged patch apply failure test */
-
-const STATE_AFTER_STAGE = STATE_PENDING;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestDirs = gTestDirsPartialSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_PARTIAL_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperLockFile(gTestFiles[2]);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- // Files aren't checked after staging since this test locks a file which
- // prevents reading the file.
- checkUpdateLogContains(ERR_ENSURE_COPY);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_FAILED_READ_ERROR, false, 1, false);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- standardInit();
- Assert.equal(readStatusFile(), STATE_NONE,
- "the status file failure code" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.updateCount, 2,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_FAILED,
- "the update state" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).errorCode, READ_ERROR,
- "the update errorCode" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(ERR_UNABLE_OPEN_DEST);
- checkUpdateLogContains(STATE_FAILED_READ_ERROR + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marRMRFDirFileInUseStageFailureCompleteSvc_win.js b/toolkit/mozapps/update/tests/unit_service_updater/marRMRFDirFileInUseStageFailureCompleteSvc_win.js
deleted file mode 100644
index b83bafccc4..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marRMRFDirFileInUseStageFailureCompleteSvc_win.js
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File in use inside removed dir complete MAR file staged patch apply failure
- test */
-
-const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
-const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperFileInUse(gTestDirs[4].relPathDir + gTestDirs[4].subDirs[0] +
- gTestDirs[4].subDirFiles[0], true);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS, true);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_AFTER_RUNUPDATE,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- setTestFilesAndDirsForFailure();
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(ERR_RENAME_FILE);
- checkUpdateLogContains(ERR_MOVE_DESTDIR_7 + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marRMRFDirFileInUseStageFailurePartialSvc_win.js b/toolkit/mozapps/update/tests/unit_service_updater/marRMRFDirFileInUseStageFailurePartialSvc_win.js
deleted file mode 100644
index 39ea485cdc..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marRMRFDirFileInUseStageFailurePartialSvc_win.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File in use inside removed dir partial MAR file staged patch apply failure
- test */
-
-const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
-const STATE_AFTER_RUNUPDATE = IS_SERVICE_TEST ? STATE_PENDING_SVC : STATE_PENDING;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestDirs = gTestDirsPartialSuccess;
- setupUpdaterTest(FILE_PARTIAL_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperFileInUse(gTestDirs[2].relPathDir + gTestDirs[2].files[0], true);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true);
- checkUpdateLogContents(LOG_PARTIAL_SUCCESS, true);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_AFTER_RUNUPDATE,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- setTestFilesAndDirsForFailure();
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(ERR_RENAME_FILE);
- checkUpdateLogContains(ERR_MOVE_DESTDIR_7 + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marRMRFDirFileInUseSuccessCompleteSvc_win.js b/toolkit/mozapps/update/tests/unit_service_updater/marRMRFDirFileInUseSuccessCompleteSvc_win.js
deleted file mode 100644
index a71bb8d490..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marRMRFDirFileInUseSuccessCompleteSvc_win.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File in use inside removed dir complete MAR file patch apply success test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperFileInUse(gTestDirs[4].relPathDir + gTestDirs[4].subDirs[0] +
- gTestDirs[4].subDirFiles[0], true);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- runUpdate(STATE_SUCCEEDED, false, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
- checkUpdateLogContains(ERR_BACKUP_DISCARD);
- checkUpdateLogContains(STATE_SUCCEEDED + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marRMRFDirFileInUseSuccessPartialSvc_win.js b/toolkit/mozapps/update/tests/unit_service_updater/marRMRFDirFileInUseSuccessPartialSvc_win.js
deleted file mode 100644
index 2cbe70ed8e..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marRMRFDirFileInUseSuccessPartialSvc_win.js
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-/* File in use inside removed dir partial MAR file patch apply success test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestDirs = gTestDirsPartialSuccess;
- setupUpdaterTest(FILE_PARTIAL_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runHelperFileInUse(gTestDirs[2].relPathDir + gTestDirs[2].files[0], true);
-}
-
-/**
- * Called after the call to waitForHelperSleep finishes.
- */
-function waitForHelperSleepFinished() {
- runUpdate(STATE_SUCCEEDED, false, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- waitForHelperExit();
-}
-
-/**
- * Called after the call to waitForHelperExit finishes.
- */
-function waitForHelperExitFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
- checkUpdateLogContains(ERR_BACKUP_DISCARD);
- checkUpdateLogContains(STATE_SUCCEEDED + "\n" + CALL_QUIT);
- checkCallbackLog();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marStageFailurePartialSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/marStageFailurePartialSvc.js
deleted file mode 100644
index a9ce234207..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marStageFailurePartialSvc.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/* 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/.
- */
-
-/* General Partial MAR File Staged Patch Apply Failure Test */
-
-const STATE_AFTER_STAGE = STATE_FAILED;
-gStagingRemovedUpdate = true;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestFiles[11].originalFile = "partial.png";
- gTestDirs = gTestDirsPartialSuccess;
- setTestFilesAndDirsForFailure();
- setupUpdaterTest(FILE_PARTIAL_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).errorCode, LOADSOURCE_ERROR_WRONG_SIZE,
- "the update errorCode" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateFailure(getApplyDirFile);
- checkUpdateLogContains(ERR_LOADSOURCEFILE_FAILED);
- waitForFilesInUse();
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marStageSuccessCompleteSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/marStageSuccessCompleteSvc.js
deleted file mode 100644
index f7745f68f4..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marStageSuccessCompleteSvc.js
+++ /dev/null
@@ -1,132 +0,0 @@
-/* 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/.
- */
-
-/* General Complete MAR File Staged Patch Apply Test */
-
-const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestFiles[gTestFiles.length - 1].originalContents = null;
- gTestFiles[gTestFiles.length - 1].compareContents = "FromComplete\n";
- gTestFiles[gTestFiles.length - 1].comparePerms = 0o644;
- gTestDirs = gTestDirsCompleteSuccess;
- setupDistributionDir();
- setupSymLinks();
- setupUpdaterTest(FILE_COMPLETE_MAR, false);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS, true);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_SUCCEEDED, true, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- checkAppBundleModTime();
- checkSymLinks();
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
- checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);
- checkDistributionDir();
- checkCallbackLog();
-}
-
-/**
- * Setup the state of the distribution directory for the test.
- */
-function setupDistributionDir() {
- if (IS_MACOSX) {
- // Create files in the old distribution directory location to verify that
- // the directory and its contents are removed when there is a distribution
- // directory in the new location.
- let testFile = getApplyDirFile(DIR_MACOS + "distribution/testFile", true);
- writeFile(testFile, "test\n");
- testFile = getApplyDirFile(DIR_MACOS + "distribution/test1/testFile", true);
- writeFile(testFile, "test\n");
- }
-}
-
-/**
- * Checks the state of the distribution directory for the test.
- */
-function checkDistributionDir() {
- if (IS_MACOSX) {
- let distributionDir = getApplyDirFile(DIR_MACOS + "distribution", true);
- Assert.ok(!distributionDir.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
- checkUpdateLogContains(REMOVE_OLD_DIST_DIR);
- }
-}
-
-/**
- * Setup symlinks for the test.
- */
-function setupSymLinks() {
- // Don't test symlinks on Mac OS X in this test since it tends to timeout.
- // It is tested on Mac OS X in marAppInUseStageSuccessComplete_unix.js
- if (IS_UNIX && !IS_MACOSX) {
- removeSymlink();
- createSymlink();
- do_register_cleanup(removeSymlink);
- gTestFiles.splice(gTestFiles.length - 3, 0,
- {
- description: "Readable symlink",
- fileName: "link",
- relPathDir: DIR_RESOURCES,
- originalContents: "test",
- compareContents: "test",
- originalFile: null,
- compareFile: null,
- originalPerms: 0o666,
- comparePerms: 0o666
- });
- }
-}
-
-/**
- * Checks the state of the symlinks for the test.
- */
-function checkSymLinks() {
- // Don't test symlinks on Mac OS X in this test since it tends to timeout.
- // It is tested on Mac OS X in marAppInUseStageSuccessComplete_unix.js
- if (IS_UNIX && !IS_MACOSX) {
- checkSymlink();
- }
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marStageSuccessPartialSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/marStageSuccessPartialSvc.js
deleted file mode 100644
index ef15326de8..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marStageSuccessPartialSvc.js
+++ /dev/null
@@ -1,112 +0,0 @@
-/* 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/.
- */
-
-/* General Partial MAR File Staged Patch Apply Test */
-
-const STATE_AFTER_STAGE = IS_SERVICE_TEST ? STATE_APPLIED_SVC : STATE_APPLIED;
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestFiles[gTestFiles.length - 2].originalContents = null;
- gTestFiles[gTestFiles.length - 2].compareContents = "FromPartial\n";
- gTestFiles[gTestFiles.length - 2].comparePerms = 0o644;
- gTestDirs = gTestDirsPartialSuccess;
- preventDistributionFiles();
- setupDistributionDir();
- setupUpdaterTest(FILE_PARTIAL_MAR, true);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- stageUpdate(true);
-}
-
-/**
- * Called after the call to stageUpdate finishes.
- */
-function stageUpdateFinished() {
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getStageDirFile, true);
- checkUpdateLogContents(LOG_PARTIAL_SUCCESS, true, false, true);
- // Switch the application to the staged application that was updated.
- runUpdate(STATE_SUCCEEDED, true, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- checkAppBundleModTime();
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
- checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true, true);
- checkDistributionDir();
- checkCallbackLog();
-}
-
-/**
- * Setup the state of the distribution directory for the test.
- */
-function setupDistributionDir() {
- if (IS_MACOSX) {
- // Create files in the old distribution directory location to verify that
- // the directory and its contents are moved to the new location on update.
- let testFile = getApplyDirFile(DIR_MACOS + "distribution/testFile", true);
- writeFile(testFile, "test\n");
- testFile = getApplyDirFile(DIR_MACOS + "distribution/test/testFile", true);
- writeFile(testFile, "test\n");
- }
-}
-
-/**
- * Checks the state of the distribution directory.
- */
-function checkDistributionDir() {
- let distributionDir = getApplyDirFile(DIR_RESOURCES + "distribution", true);
- if (IS_MACOSX) {
- Assert.ok(distributionDir.exists(),
- MSG_SHOULD_EXIST + getMsgPath(distributionDir.path));
-
- let testFile = getApplyDirFile(DIR_RESOURCES + "distribution/testFile", true);
- Assert.ok(testFile.exists(),
- MSG_SHOULD_EXIST + getMsgPath(testFile.path));
-
- testFile = getApplyDirFile(DIR_RESOURCES + "distribution/test/testFile", true);
- Assert.ok(testFile.exists(),
- MSG_SHOULD_EXIST + getMsgPath(testFile.path));
-
- distributionDir = getApplyDirFile(DIR_MACOS + "distribution", true);
- Assert.ok(!distributionDir.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
-
- checkUpdateLogContains(MOVE_OLD_DIST_DIR);
- } else {
- debugDump("testing that files aren't added with an add-if instruction " +
- "when the file's destination directory doesn't exist");
- Assert.ok(!distributionDir.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
- }
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marSuccessCompleteSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/marSuccessCompleteSvc.js
deleted file mode 100644
index 1008e867fc..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marSuccessCompleteSvc.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/* 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/.
- */
-
-/* General Complete MAR File Patch Apply Test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesCompleteSuccess;
- gTestDirs = gTestDirsCompleteSuccess;
- preventDistributionFiles();
- setupDistributionDir();
- setupUpdaterTest(FILE_COMPLETE_MAR, true);
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runUpdate(STATE_SUCCEEDED, false, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- checkPostUpdateAppLog();
-}
-
-/**
- * Called after the call to checkPostUpdateAppLog finishes.
- */
-function checkPostUpdateAppLogFinished() {
- checkAppBundleModTime();
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(true);
- checkFilesAfterUpdateSuccess(getApplyDirFile);
- checkUpdateLogContents(LOG_COMPLETE_SUCCESS, false, false, true);
- checkDistributionDir();
- checkCallbackLog();
-}
-
-/**
- * Setup the state of the distribution directory for the test.
- */
-function setupDistributionDir() {
- if (IS_MACOSX) {
- // Create files in the old distribution directory location to verify that
- // the directory and its contents are moved to the new location on update.
- let testFile = getApplyDirFile(DIR_MACOS + "distribution/testFile", true);
- writeFile(testFile, "test\n");
- testFile = getApplyDirFile(DIR_MACOS + "distribution/test/testFile", true);
- writeFile(testFile, "test\n");
- }
-}
-
-/**
- * Checks the state of the distribution directory.
- */
-function checkDistributionDir() {
- let distributionDir = getApplyDirFile(DIR_RESOURCES + "distribution", true);
- if (IS_MACOSX) {
- Assert.ok(distributionDir.exists(),
- MSG_SHOULD_EXIST + getMsgPath(distributionDir.path));
-
- let testFile = getApplyDirFile(DIR_RESOURCES + "distribution/testFile", true);
- Assert.ok(testFile.exists(),
- MSG_SHOULD_EXIST + getMsgPath(testFile.path));
-
- testFile = getApplyDirFile(DIR_RESOURCES + "distribution/test/testFile", true);
- Assert.ok(testFile.exists(),
- MSG_SHOULD_EXIST + getMsgPath(testFile.path));
-
- distributionDir = getApplyDirFile(DIR_MACOS + "distribution", true);
- Assert.ok(!distributionDir.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
-
- checkUpdateLogContains(MOVE_OLD_DIST_DIR);
- } else {
- debugDump("testing that files aren't added with an add-if instruction " +
- "when the file's destination directory doesn't exist");
- Assert.ok(!distributionDir.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
- }
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marSuccessPartialSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/marSuccessPartialSvc.js
deleted file mode 100644
index 616390f55c..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/marSuccessPartialSvc.js
+++ /dev/null
@@ -1,79 +0,0 @@
-/* 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/.
- */
-
-/* General Partial MAR File Patch Apply Test */
-
-function run_test() {
- if (!setupTestCommon()) {
- return;
- }
- gTestFiles = gTestFilesPartialSuccess;
- gTestFiles[gTestFiles.length - 1].originalContents = null;
- gTestFiles[gTestFiles.length - 1].compareContents = "FromPartial\n";
- gTestFiles[gTestFiles.length - 1].comparePerms = 0o644;
- gTestFiles[gTestFiles.length - 2].originalContents = null;
- gTestFiles[gTestFiles.length - 2].compareContents = "FromPartial\n";
- gTestFiles[gTestFiles.length - 2].comparePerms = 0o644;
- gTestDirs = gTestDirsPartialSuccess;
- setupDistributionDir();
- // The third parameter will test that a relative path that contains a
- // directory traversal to the post update binary doesn't execute.
- setupUpdaterTest(FILE_PARTIAL_MAR, false, "test/../");
-}
-
-/**
- * Called after the call to setupUpdaterTest finishes.
- */
-function setupUpdaterTestFinished() {
- runUpdate(STATE_SUCCEEDED, false, 0, true);
-}
-
-/**
- * Called after the call to runUpdate finishes.
- */
-function runUpdateFinished() {
- checkAppBundleModTime();
- standardInit();
- Assert.equal(readStatusState(), STATE_NONE,
- "the status file state" + MSG_SHOULD_EQUAL);
- Assert.ok(!gUpdateManager.activeUpdate,
- "the active update should not be defined");
- Assert.equal(gUpdateManager.updateCount, 1,
- "the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
- Assert.equal(gUpdateManager.getUpdateAt(0).state, STATE_SUCCEEDED,
- "the update state" + MSG_SHOULD_EQUAL);
- checkPostUpdateRunningFile(false);
- checkFilesAfterUpdateSuccess(getApplyDirFile);
- checkUpdateLogContents(LOG_PARTIAL_SUCCESS);
- checkDistributionDir();
- checkCallbackLog();
-}
-
-/**
- * Setup the state of the distribution directory for the test.
- */
-function setupDistributionDir() {
- if (IS_MACOSX) {
- // Create files in the old distribution directory location to verify that
- // the directory and its contents are removed when there is a distribution
- // directory in the new location.
- let testFile = getApplyDirFile(DIR_MACOS + "distribution/testFile", true);
- writeFile(testFile, "test\n");
- testFile = getApplyDirFile(DIR_MACOS + "distribution/test/testFile", true);
- writeFile(testFile, "test\n");
- }
-}
-
-/**
- * Checks the state of the distribution directory.
- */
-function checkDistributionDir() {
- if (IS_MACOSX) {
- let distributionDir = getApplyDirFile(DIR_MACOS + "distribution", true);
- Assert.ok(!distributionDir.exists(),
- MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
- checkUpdateLogContains(REMOVE_OLD_DIST_DIR);
- }
-}
diff --git a/toolkit/mozapps/update/tests/unit_service_updater/xpcshell.ini b/toolkit/mozapps/update/tests/unit_service_updater/xpcshell.ini
deleted file mode 100644
index 1d63f85838..0000000000
--- a/toolkit/mozapps/update/tests/unit_service_updater/xpcshell.ini
+++ /dev/null
@@ -1,156 +0,0 @@
-; 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/.
-
-; Tests that require the updater binary and the maintenance service.
-
-[DEFAULT]
-tags = appupdate
-head = head_update.js
-tail =
-
-[bootstrapSvc.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[invalidArgInstallDirPathTooLongFailureSvc.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[invalidArgInstallDirPathTraversalFailureSvc.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[invalidArgInstallWorkingDirPathNotSameFailureSvc_win.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[invalidArgPatchDirPathTraversalFailureSvc.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[invalidArgStageDirNotInInstallDirFailureSvc_win.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[invalidArgWorkingDirPathLocalUNCFailureSvc_win.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[invalidArgWorkingDirPathRelativeFailureSvc.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marSuccessCompleteSvc.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marSuccessPartialSvc.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marFailurePartialSvc.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marStageSuccessCompleteSvc.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marStageSuccessPartialSvc.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marStageFailurePartialSvc.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marCallbackAppSuccessCompleteSvc_win.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marCallbackAppSuccessPartialSvc_win.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marCallbackAppStageSuccessCompleteSvc_win.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marCallbackAppStageSuccessPartialSvc_win.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marAppInUseSuccessCompleteSvc.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marAppInUseStageFailureCompleteSvc_win.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marFileLockedFailureCompleteSvc_win.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marFileLockedFailurePartialSvc_win.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marFileLockedStageFailureCompleteSvc_win.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marFileLockedStageFailurePartialSvc_win.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marFileInUseSuccessCompleteSvc_win.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marFileInUseSuccessPartialSvc_win.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marRMRFDirFileInUseSuccessCompleteSvc_win.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marRMRFDirFileInUseSuccessPartialSvc_win.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marFileInUseStageFailureCompleteSvc_win.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marFileInUseStageFailurePartialSvc_win.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marRMRFDirFileInUseStageFailureCompleteSvc_win.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marRMRFDirFileInUseStageFailurePartialSvc_win.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marAppApplyDirLockedStageFailureSvc_win.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marAppApplyUpdateAppBinInUseStageSuccessSvc_win.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marAppApplyUpdateSuccessSvc.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[marAppApplyUpdateStageSuccessSvc.js]
-skip-if = os == 'win' && debug && (os_version == '5.1' || os_version == '5.2')
-reason = bug 1291985
-run-sequentially = Uses the Mozilla Maintenance Service.
-[checkUpdaterSigSvc.js]
diff --git a/toolkit/nss.configure b/toolkit/nss.configure
deleted file mode 100644
index 734f4f0298..0000000000
--- a/toolkit/nss.configure
+++ /dev/null
@@ -1,16 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-
-# DBM support in NSS
-# ==============================================================
-@depends(build_project, '--help')
-def dbm_default(build_project, _):
- return build_project not in ('mobile/android', 'b2g', 'b2g/graphene')
-
-option('--enable-dbm', default=dbm_default, help='Enable building DBM')
-
-set_config('NSS_DISABLE_DBM', depends('--enable-dbm')(lambda x: not x))
diff --git a/toolkit/profile/gtest/TestProfileLock.cpp b/toolkit/profile/gtest/TestProfileLock.cpp
deleted file mode 100644
index ac5117d74f..0000000000
--- a/toolkit/profile/gtest/TestProfileLock.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "gtest/gtest.h"
-
-#include <sys/eventfd.h>
-#include <sched.h>
-
-#include "nsCOMPtr.h"
-#include "nsIFile.h"
-#include "nsProfileLock.h"
-#include "nsString.h"
-
-static void CleanParentLock(const char *tmpdir)
-{
- // nsProfileLock doesn't clean up all its files
- char permanent_lockfile[] = "/.parentlock";
-
- char * parentlock_name;
- size_t parentlock_name_size = strlen(tmpdir) + strlen(permanent_lockfile) + 1;
- parentlock_name = (char*)malloc(parentlock_name_size);
-
- strcpy(parentlock_name, tmpdir);
- strcat(parentlock_name, permanent_lockfile);
-
- EXPECT_EQ(0, unlink(parentlock_name));
- EXPECT_EQ(0, rmdir(tmpdir));
- free(parentlock_name);
-}
-
-TEST(ProfileLock, BasicLock)
-{
- char templ[] = "/tmp/profilelocktest.XXXXXX";
- char * tmpdir = mkdtemp(templ);
- ASSERT_NE(tmpdir, nullptr);
-
- // This scope exits so the nsProfileLock destructor
- // can clean up the files it leaves in tmpdir.
- {
- nsProfileLock myLock;
- nsresult rv;
- nsCOMPtr<nsIFile> dir(do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv));
- ASSERT_EQ(NS_SUCCEEDED(rv), true);
-
- rv = dir->InitWithNativePath(nsCString(tmpdir));
- ASSERT_EQ(NS_SUCCEEDED(rv), true);
-
- rv = myLock.Lock(dir, nullptr);
- EXPECT_EQ(NS_SUCCEEDED(rv), true);
- }
-
- CleanParentLock(tmpdir);
-}
-
-TEST(ProfileLock, RetryLock)
-{
- char templ[] = "/tmp/profilelocktest.XXXXXX";
- char * tmpdir = mkdtemp(templ);
- ASSERT_NE(tmpdir, nullptr);
-
- {
- nsProfileLock myLock;
- nsProfileLock myLock2;
- nsresult rv;
- nsCOMPtr<nsIFile> dir(do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv));
- ASSERT_EQ(NS_SUCCEEDED(rv), true);
-
- rv = dir->InitWithNativePath(nsCString(tmpdir));
- ASSERT_EQ(NS_SUCCEEDED(rv), true);
-
- int eventfd_fd = eventfd(0, 0);
- ASSERT_GE(eventfd_fd, 0);
-
- // fcntl advisory locks are per process, so it's hard
- // to avoid using fork here.
- pid_t childpid = fork();
-
- if (childpid) {
- // parent
-
- // blocking read causing us to lose the race
- eventfd_t value;
- EXPECT_EQ(0, eventfd_read(eventfd_fd, &value));
-
- rv = myLock2.Lock(dir, nullptr);
- EXPECT_EQ(NS_ERROR_FILE_ACCESS_DENIED, rv);
-
- // kill the child
- EXPECT_EQ(0, kill(childpid, SIGTERM));
-
- // reap zombie (required to collect the lock)
- int status;
- EXPECT_EQ(childpid, waitpid(childpid, &status, 0));
-
- rv = myLock2.Lock(dir, nullptr);
- EXPECT_EQ(NS_SUCCEEDED(rv), true);
- } else {
- // child
- rv = myLock.Lock(dir, nullptr);
- ASSERT_EQ(NS_SUCCEEDED(rv), true);
-
- // unblock parent
- EXPECT_EQ(0, eventfd_write(eventfd_fd, 1));
-
- // parent will kill us
- for (;;)
- sleep(1);
- }
-
- close(eventfd_fd);
- }
-
- CleanParentLock(tmpdir);
-}
diff --git a/toolkit/profile/gtest/moz.build b/toolkit/profile/gtest/moz.build
deleted file mode 100644
index 51b420e19d..0000000000
--- a/toolkit/profile/gtest/moz.build
+++ /dev/null
@@ -1,16 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-LOCAL_INCLUDES += [
- '..',
-]
-
-if CONFIG['OS_ARCH'] == 'Linux':
- UNIFIED_SOURCES += [
- 'TestProfileLock.cpp',
- ]
-
-FINAL_LIBRARY = 'xul-gtest'
diff --git a/toolkit/profile/moz.build b/toolkit/profile/moz.build
index b2383a871e..0a84b8c691 100644
--- a/toolkit/profile/moz.build
+++ b/toolkit/profile/moz.build
@@ -4,11 +4,6 @@
# 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/.
-MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini']
-
-if CONFIG['ENABLE_TESTS']:
- DIRS += ['gtest']
-
XPIDL_SOURCES += [
'nsIProfileMigrator.idl',
'nsIProfileUnlocker.idl',
@@ -18,26 +13,15 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'toolkitprofile'
-UNIFIED_SOURCES += [
- 'nsProfileLock.cpp'
-]
+UNIFIED_SOURCES += ['nsProfileLock.cpp']
if CONFIG['OS_ARCH'] == 'WINNT':
- UNIFIED_SOURCES += [
- 'ProfileUnlockerWin.cpp'
- ]
+ UNIFIED_SOURCES += ['ProfileUnlockerWin.cpp']
-UNIFIED_SOURCES += [
- 'nsToolkitProfileService.cpp'
-]
+UNIFIED_SOURCES += ['nsToolkitProfileService.cpp']
-LOCAL_INCLUDES += [
- '../xre',
-]
+LOCAL_INCLUDES += ['../xre']
FINAL_LIBRARY = 'xul'
JAR_MANIFESTS += ['jar.mn']
-
-with Files('**'):
- BUG_COMPONENT = ('Toolkit', 'Startup and Profile System')
diff --git a/toolkit/profile/nsToolkitProfileService.cpp b/toolkit/profile/nsToolkitProfileService.cpp
index e818d27e60..2fe51b2853 100644
--- a/toolkit/profile/nsToolkitProfileService.cpp
+++ b/toolkit/profile/nsToolkitProfileService.cpp
@@ -811,10 +811,10 @@ nsToolkitProfileService::CreateProfileInternal(nsIFile* aRootDir,
rv = rootDir->Create(nsIFile::DIRECTORY_TYPE, 0700);
NS_ENSURE_SUCCESS(rv, rv);
rv = rootDir->SetPermissions(0700);
-#ifndef ANDROID
+
// If the profile is on the sdcard, this will fail but its non-fatal
NS_ENSURE_SUCCESS(rv, rv);
-#endif
+
}
rv = localDir->Exists(&exists);
diff --git a/toolkit/profile/test/.eslintrc.js b/toolkit/profile/test/.eslintrc.js
deleted file mode 100644
index 4e6d4bcf08..0000000000
--- a/toolkit/profile/test/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../testing/mochitest/chrome.eslintrc.js"
- ]
-};
diff --git a/toolkit/profile/test/chrome.ini b/toolkit/profile/test/chrome.ini
deleted file mode 100644
index e21c1022e8..0000000000
--- a/toolkit/profile/test/chrome.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[DEFAULT]
-
-[test_create_profile.xul]
diff --git a/toolkit/profile/test/test_create_profile.xul b/toolkit/profile/test/test_create_profile.xul
deleted file mode 100644
index 040b1256b2..0000000000
--- a/toolkit/profile/test/test_create_profile.xul
+++ /dev/null
@@ -1,134 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
-<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=543854
--->
-<window title="Mozilla Bug 543854"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script type="application/javascript"
- src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-
- <!-- test results are displayed in the html:body -->
- <body xmlns="http://www.w3.org/1999/xhtml">
- <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=543854"
- target="_blank">Mozilla Bug 543854</a>
- </body>
-
- <!-- test code goes here -->
- <script type="application/javascript">
- <![CDATA[
-
- /** Test for Bug 543854 **/
-
- SimpleTest.waitForExplicitFinish();
-
- const Cc = Components.classes;
- const Ci = Components.interfaces;
-
- const ASCIIName = "myprofile";
- const UnicodeName = "\u09A0\u09BE\u0995\u09C1\u09B0"; // A Bengali name
-
- var gDirService;
- var gIOService;
- var gProfileService;
-
- var gDefaultLocalProfileParent;
-
- gDirService = Cc["@mozilla.org/file/directory_service;1"].
- getService(Ci.nsIProperties);
-
- gIOService = Cc["@mozilla.org/network/io-service;1"].
- getService(Ci.nsIIOService);
-
- gProfileService = Cc["@mozilla.org/toolkit/profile-service;1"].
- getService(Ci.nsIToolkitProfileService);
-
- gDefaultLocalProfileParent = gDirService.get("DefProfLRt", Ci.nsIFile);
-
- createProfile(ASCIIName);
- createProfile(UnicodeName);
- SimpleTest.finish();
-
-/**
- * Read the contents of an nsIFile. Throws on error.
-
- * @param file an nsIFile instance.
- * @return string contents.
- */
-function readFile(file) {
- let fstream = Cc["@mozilla.org/network/file-input-stream;1"].
- createInstance(Ci.nsIFileInputStream);
- let sstream = Cc["@mozilla.org/scriptableinputstream;1"].
- createInstance(Components.interfaces.nsIScriptableInputStream);
-
- const RO = 0x01;
- const READ_OTHERS = 4;
-
- fstream.init(file, RO, READ_OTHERS, 0);
- sstream.init(fstream);
- let out = sstream.read(sstream.available());
- sstream.close();
- fstream.close();
- return out;
-}
-
-function checkBounds(lowerBound, value, upperBound) {
- ok(lowerBound <= value, "value " + value +
- " is above lower bound " + lowerBound);
- ok(upperBound >= value, "value " + value +
- " is within upper bound " + upperBound);
-}
-
-function createProfile(profileName) {
- // Filesystem precision is lower than Date precision.
- let lowerBound = Date.now() - 1000;
-
- let profile = gProfileService.createProfile(null, profileName);
-
- // check that the directory was created
- isnot(profile, null, "Profile " + profileName + " created");
-
- let profileDir = profile.rootDir;
-
- ok(profileDir.exists(), "Profile dir created");
- ok(profileDir.isDirectory(), "Profile dir is a directory");
-
- let profileDirPath = profileDir.path;
-
- is(profileDirPath.substr(profileDirPath.length - profileName.length),
- profileName, "Profile dir has expected name");
-
- // Ensure that our timestamp file was created.
- let jsonFile = profileDir.clone();
- jsonFile.append("times.json");
- ok(jsonFile.path, "Path is " + jsonFile.path);
- ok(jsonFile.exists(), "Times file was created");
- ok(jsonFile.isFile(), "Times file is a file");
- let json = JSON.parse(readFile(jsonFile));
-
- let upperBound = Date.now() + 1000;
-
- let created = json.created;
- ok(created, "created is set");
-
- // Check against real clock time.
- checkBounds(lowerBound, created, upperBound);
-
- // Clean up the profile before local profile test.
- profile.remove(true);
-
- // Create with non-null aRootDir
- profile = gProfileService.createProfile(profileDir, profileName);
-
- let localProfileDir = profile.localDir;
- ok(gDefaultLocalProfileParent.contains(localProfileDir, false),
- "Local profile dir created in DefProfLRt");
-
- // Clean up the profile.
- profile.remove(true);
-}
-
- ]]>
- </script>
-</window>
diff --git a/toolkit/system/androidproxy/moz.build b/toolkit/system/androidproxy/moz.build
deleted file mode 100644
index 5c6b0c1057..0000000000
--- a/toolkit/system/androidproxy/moz.build
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-SOURCES += [
- 'nsAndroidSystemProxySettings.cpp',
-]
-
-FINAL_LIBRARY = 'xul'
diff --git a/toolkit/system/androidproxy/nsAndroidSystemProxySettings.cpp b/toolkit/system/androidproxy/nsAndroidSystemProxySettings.cpp
deleted file mode 100644
index 71e12bb77b..0000000000
--- a/toolkit/system/androidproxy/nsAndroidSystemProxySettings.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsIURI.h"
-
-#include "nsISystemProxySettings.h"
-#include "nsIServiceManager.h"
-#include "mozilla/ModuleUtils.h"
-#include "nsPrintfCString.h"
-#include "nsNetCID.h"
-#include "nsISupportsPrimitives.h"
-#include "nsIURI.h"
-
-#include "AndroidBridge.h"
-
-class nsAndroidSystemProxySettings : public nsISystemProxySettings
-{
-public:
- NS_DECL_THREADSAFE_ISUPPORTS
- NS_DECL_NSISYSTEMPROXYSETTINGS
-
- nsAndroidSystemProxySettings() {};
- nsresult Init();
-
-private:
- virtual ~nsAndroidSystemProxySettings() {}
-};
-
-NS_IMPL_ISUPPORTS(nsAndroidSystemProxySettings, nsISystemProxySettings)
-
-NS_IMETHODIMP
-nsAndroidSystemProxySettings::GetMainThreadOnly(bool *aMainThreadOnly)
-{
- *aMainThreadOnly = true;
- return NS_OK;
-}
-
-
-nsresult
-nsAndroidSystemProxySettings::Init()
-{
- return NS_OK;
-}
-
-nsresult
-nsAndroidSystemProxySettings::GetPACURI(nsACString& aResult)
-{
- return NS_OK;
-}
-
-nsresult
-nsAndroidSystemProxySettings::GetProxyForURI(const nsACString & aSpec,
- const nsACString & aScheme,
- const nsACString & aHost,
- const int32_t aPort,
- nsACString & aResult)
-{
- return mozilla::AndroidBridge::Bridge()->GetProxyForURI(aSpec, aScheme, aHost, aPort, aResult);
-}
-
-NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAndroidSystemProxySettings, Init)
-
-#define NS_ANDROIDSYSTEMPROXYSERVICE_CID \
- {0xf01f0060, 0x3708, 0x478e, \
- {0xb9, 0x35, 0x3e, 0xce, 0x8b, 0xe2, 0x94, 0xb8}}
-
-NS_DEFINE_NAMED_CID(NS_ANDROIDSYSTEMPROXYSERVICE_CID);
-
-void test() {};
-
-static const mozilla::Module::CIDEntry kSysProxyCIDs[] = {
- { &kNS_ANDROIDSYSTEMPROXYSERVICE_CID, false, nullptr, nsAndroidSystemProxySettingsConstructor },
- { nullptr }
-};
-
-static const mozilla::Module::ContractIDEntry kSysProxyContracts[] = {
- { NS_SYSTEMPROXYSETTINGS_CONTRACTID, &kNS_ANDROIDSYSTEMPROXYSERVICE_CID },
- { nullptr }
-};
-
-static const mozilla::Module kSysProxyModule = {
- mozilla::Module::kVersion,
- kSysProxyCIDs,
- kSysProxyContracts
-};
-
-NSMODULE_DEFN(nsAndroidProxyModule) = &kSysProxyModule;
diff --git a/toolkit/themes/mobile/global/empty.css b/toolkit/themes/mobile/global/empty.css
deleted file mode 100644
index d615bf8862..0000000000
--- a/toolkit/themes/mobile/global/empty.css
+++ /dev/null
@@ -1,7 +0,0 @@
-/* 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/. */
-
-/*
- * Empty stub for theme CSS
- */
diff --git a/toolkit/themes/mobile/global/icons/Error.png b/toolkit/themes/mobile/global/icons/Error.png
deleted file mode 100644
index bd4064f49a..0000000000
--- a/toolkit/themes/mobile/global/icons/Error.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/themes/mobile/global/media/TopLevelImageDocument.css b/toolkit/themes/mobile/global/media/TopLevelImageDocument.css
deleted file mode 100644
index 5242175161..0000000000
--- a/toolkit/themes/mobile/global/media/TopLevelImageDocument.css
+++ /dev/null
@@ -1,17 +0,0 @@
-/* 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/. */
-
-@media not print {
- /* N.B.: Remember to update ImageDocument.css in the tree or reftests may fail! */
-
- body {
- color: #eee;
- background-image: url("chrome://global/skin/media/imagedoc-darknoise.png");
- }
-
- img.transparent {
- background: hsl(0,0%,90%) url("chrome://global/skin/media/imagedoc-lightnoise.png");
- color: #222;
- }
-}
diff --git a/toolkit/themes/mobile/global/media/TopLevelVideoDocument.css b/toolkit/themes/mobile/global/media/TopLevelVideoDocument.css
deleted file mode 100644
index 760cdcd538..0000000000
--- a/toolkit/themes/mobile/global/media/TopLevelVideoDocument.css
+++ /dev/null
@@ -1,12 +0,0 @@
-/* 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/. */
-
-body {
- background-image: url("chrome://global/skin/media/imagedoc-darknoise.png");
- background-color: rgb(33,33,33); /* Average color of that ^ image. */
-}
-
-video {
- box-shadow: 0 0 15px #000;
-}
diff --git a/toolkit/themes/mobile/global/media/clicktoplay-bgtexture.png b/toolkit/themes/mobile/global/media/clicktoplay-bgtexture.png
deleted file mode 100644
index 0d3cacd117..0000000000
--- a/toolkit/themes/mobile/global/media/clicktoplay-bgtexture.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/themes/mobile/global/media/error.png b/toolkit/themes/mobile/global/media/error.png
deleted file mode 100644
index 58e37283a7..0000000000
--- a/toolkit/themes/mobile/global/media/error.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/themes/mobile/global/media/imagedoc-darknoise.png b/toolkit/themes/mobile/global/media/imagedoc-darknoise.png
deleted file mode 100644
index 5c33e24d4c..0000000000
--- a/toolkit/themes/mobile/global/media/imagedoc-darknoise.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/themes/mobile/global/media/imagedoc-lightnoise.png b/toolkit/themes/mobile/global/media/imagedoc-lightnoise.png
deleted file mode 100644
index 3467cf4d47..0000000000
--- a/toolkit/themes/mobile/global/media/imagedoc-lightnoise.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/themes/mobile/global/media/throbber.png b/toolkit/themes/mobile/global/media/throbber.png
deleted file mode 100644
index 8e49fe5b2a..0000000000
--- a/toolkit/themes/mobile/global/media/throbber.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/themes/mobile/global/media/videoClickToPlayButton.svg b/toolkit/themes/mobile/global/media/videoClickToPlayButton.svg
deleted file mode 100644
index f7ca6b6535..0000000000
--- a/toolkit/themes/mobile/global/media/videoClickToPlayButton.svg
+++ /dev/null
@@ -1,30 +0,0 @@
-<!-- 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/. -->
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMinYMin meet" viewBox="0 0 64 64">
- <defs>
- <linearGradient id="whiteGradientStops">
- <stop style="stop-color:#fff;stop-opacity:.95" offset="0"/>
- <stop style="stop-color:#fff;stop-opacity:.75" offset=".45"/>
- <stop style="stop-color:#fff;stop-opacity:.72" offset=".55"/>
- <stop style="stop-color:#fff;stop-opacity:.65" offset="1"/>
- </linearGradient>
- <linearGradient x1="32" y1="0" x2="32" y2="62" id="whiteGradient" xlink:href="#whiteGradientStops" gradientUnits="userSpaceOnUse"/>
- <linearGradient id="arrowGradientStops">
- <stop style="stop-color:#333;stop-opacity:.5" offset="0"/>
- <stop style="stop-color:#666;stop-opacity:.5" offset="1"/>
- </linearGradient>
- <linearGradient x1="32" y1="16" x2="32" y2="48" id="arrowGradient" xlink:href="#arrowGradientStops" gradientUnits="userSpaceOnUse"/>
- <filter x="-0.15" y="-0.15" width="1.25" height="1.25" color-interpolation-filters="sRGB" id="dropShadow">
- <feDropShadow dx="0" dy="1" flood-opacity="0.5"/>
- </filter>
- <mask id="dropShadowMask">
- <path style="fill:#fff;" d="M47.285,30.991L23.75,17.24c-0.357-0.208-0.692-0.278-0.969-0.221 C22.32,17.115,22,17.555,22,18.252v27.499c0,1.112,0.797,1.568,1.75,1.011l23.535-13.748C48.238,32.458,48.238,31.547,47.285,30.991 z M0,0v64h64V0H0z M32,60C16.536,60,4,47.464,4,32S16.536,4,32,4s28,12.536,28,28S47.464,60,32,60z"/>
- </mask>
- </defs>
- <path mask="url(#dropShadowMask)" id="playButtonShadow" style="filter:url(#dropShadow);" d="M32,4C16.536,4,4,16.536,4,32s12.536,28,28,28s28-12.536,28-28S47.464,4,32,4z M47.285,33.014 L23.75,46.762C22.797,47.319,22,46.863,22,45.751v-27.5c0-0.697,0.32-1.137,0.781-1.232c0.277-0.058,0.612,0.012,0.969,0.221 l23.535,13.751C48.238,31.546,48.238,32.458,47.285,33.014z"/>
- <path id="playButtonArrow" style="fill:url(#arrowGradient);" d="M22.781,17.019C22.32,17.114,22,17.555,22,18.251v27.5c0,1.112,0.797,1.568,1.75,1.011 l23.535-13.748c0.953-0.556,0.953-1.467,0-2.023L23.75,17.24C23.393,17.031,23.058,16.961,22.781,17.019z"/>
- <path id="playButton" style="fill:url(#whiteGradient);" d="M32,4C16.536,4,4,16.536,4,32s12.536,28,28,28s28-12.536,28-28S47.464,4,32,4z M47.285,33.014 L23.75,46.762C22.797,47.319,22,46.863,22,45.751v-27.5c0-0.697,0.32-1.137,0.781-1.232c0.277-0.058,0.612,0.012,0.969,0.221 l23.535,13.751C48.238,31.546,48.238,32.458,47.285,33.014z"/>
- <path id="playButtonEdgeHighlights" style="fill:white;fill-opacity:.3;" d="M32,4C16.536,4,4,16.536,4,32s12.536,28,28,28s28-12.536,28-28S47.464,4,32,4z M32,59C17.112,59,5,46.888,5,32S17.112,5,32,5s27,12.112,27,27S46.888,59,32,59z M47.789,30.127l-23.534-13.75 C23.826,16.126,23.396,16,22.976,16c-0.135,0-0.27,0.014-0.398,0.041C21.62,16.238,21,17.106,21,18.251v27.5 C21,47.075,21.812,48,22.977,48c0.423,0,0.854-0.126,1.279-0.375L47.79,33.877c0.769-0.449,1.21-1.132,1.21-1.875 S48.559,30.576,47.789,30.127z M47.285,33.014L23.75,46.762C23.474,46.924,23.211,47,22.977,47C22.402,47,22,46.541,22,45.751v-27.5 c0-0.697,0.32-1.137,0.781-1.232L22.976,17c0.233,0,0.498,0.079,0.775,0.24l23.535,13.751 C48.238,31.546,48.238,32.458,47.285,33.014z"/>
- <path id="playButtonTopEdgeHighlights" style="fill:white;fill-opacity:.8;" d="M32,4C16.536,4,4,16.536,4,32c0,0.167,0.01,0.333,0.013,0.5 C4.28,17.268,16.704,5,32,5c15.296,0,27.72,12.268,27.987,27.5C59.99,32.333,60,32.167,60,32C60,16.536,47.464,4,32,4z M47.285,33.014L23.75,46.762C22.797,47.319,22,46.863,22,45.751v1c0,1.112,0.797,1.568,1.75,1.011l23.535-13.748 c0.697-0.406,0.879-1.003,0.556-1.512C47.723,32.688,47.541,32.864,47.285,33.014z"/>
-</svg>
diff --git a/toolkit/themes/mobile/jar.mn b/toolkit/themes/mobile/jar.mn
deleted file mode 100644
index 62f8893494..0000000000
--- a/toolkit/themes/mobile/jar.mn
+++ /dev/null
@@ -1,55 +0,0 @@
-# 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/.
-
-toolkit.jar:
-% skin global classic/1.0 %skin/classic/global/
-# These are the CSS files that must exist
- skin/classic/global/autocomplete.css (global/empty.css)
- skin/classic/global/button.css (global/empty.css)
- skin/classic/global/checkbox.css (global/empty.css)
- skin/classic/global/dialog.css (global/empty.css)
- skin/classic/global/dropmarker.css (global/empty.css)
- skin/classic/global/global.css (global/empty.css)
- skin/classic/global/groupbox.css (global/empty.css)
- skin/classic/global/listbox.css (global/empty.css)
- skin/classic/global/menu.css (global/empty.css)
- skin/classic/global/menulist.css (global/empty.css)
- skin/classic/global/numberbox.css (global/empty.css)
- skin/classic/global/popup.css (global/empty.css)
- skin/classic/global/preferences.css (global/empty.css)
- skin/classic/global/progressmeter.css (global/empty.css)
- skin/classic/global/radio.css (global/empty.css)
- skin/classic/global/resizer.css (global/empty.css)
- skin/classic/global/richlistbox.css (global/empty.css)
- skin/classic/global/scale.css (global/empty.css)
- skin/classic/global/scrollbox.css (global/empty.css)
- skin/classic/global/spinbuttons.css (global/empty.css)
- skin/classic/global/splitter.css (global/empty.css)
- skin/classic/global/tabbox.css (global/empty.css)
- skin/classic/global/textbox.css (global/empty.css)
- skin/classic/global/toolbar.css (global/empty.css)
- skin/classic/global/toolbarbutton.css (global/empty.css)
- skin/classic/global/tree.css (global/empty.css)
- skin/classic/global/wizard.css (global/empty.css)
- skin/classic/global/scrollbars.css (global/empty.css)
-
- skin/classic/global/media/clicktoplay-bgtexture.png (global/media/clicktoplay-bgtexture.png)
- skin/classic/global/media/error.png (global/media/error.png)
- skin/classic/global/media/throbber.png (global/media/throbber.png)
- skin/classic/global/media/videoClickToPlayButton.svg (global/media/videoClickToPlayButton.svg)
- skin/classic/global/media/TopLevelImageDocument.css (global/media/TopLevelImageDocument.css)
- skin/classic/global/media/TopLevelVideoDocument.css (global/media/TopLevelVideoDocument.css)
- skin/classic/global/media/imagedoc-lightnoise.png (global/media/imagedoc-lightnoise.png)
- skin/classic/global/media/imagedoc-darknoise.png (global/media/imagedoc-darknoise.png)
-
- skin/classic/global/icons/Error.png (global/icons/Error.png)
-
-% skin mozapps classic/1.0 %skin/classic/mozapps/
- skin/classic/mozapps/plugins/pluginProblem.css (mozapps/plugins/pluginProblem.css)
-
- skin/classic/mozapps/plugins/contentPluginActivate.png (mozapps/plugins/contentPluginActivate.png)
- skin/classic/mozapps/plugins/contentPluginBlocked.png (mozapps/plugins/contentPluginBlocked.png)
- skin/classic/mozapps/plugins/contentPluginClose.png (mozapps/plugins/contentPluginClose.png)
- skin/classic/mozapps/plugins/contentPluginCrashed.png (mozapps/plugins/contentPluginCrashed.png)
- skin/classic/mozapps/plugins/contentPluginStripe.png (mozapps/plugins/contentPluginStripe.png)
diff --git a/toolkit/themes/mobile/moz.build b/toolkit/themes/mobile/moz.build
deleted file mode 100644
index aac3a838c4..0000000000
--- a/toolkit/themes/mobile/moz.build
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-JAR_MANIFESTS += ['jar.mn']
diff --git a/toolkit/themes/mobile/mozapps/plugins/contentPluginActivate.png b/toolkit/themes/mobile/mozapps/plugins/contentPluginActivate.png
deleted file mode 100644
index 31351dc3b7..0000000000
--- a/toolkit/themes/mobile/mozapps/plugins/contentPluginActivate.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/themes/mobile/mozapps/plugins/contentPluginBlocked.png b/toolkit/themes/mobile/mozapps/plugins/contentPluginBlocked.png
deleted file mode 100644
index 1e092bf189..0000000000
--- a/toolkit/themes/mobile/mozapps/plugins/contentPluginBlocked.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/themes/mobile/mozapps/plugins/contentPluginClose.png b/toolkit/themes/mobile/mozapps/plugins/contentPluginClose.png
deleted file mode 100644
index 61eb558288..0000000000
--- a/toolkit/themes/mobile/mozapps/plugins/contentPluginClose.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/themes/mobile/mozapps/plugins/contentPluginCrashed.png b/toolkit/themes/mobile/mozapps/plugins/contentPluginCrashed.png
deleted file mode 100644
index 89d3e91a99..0000000000
--- a/toolkit/themes/mobile/mozapps/plugins/contentPluginCrashed.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/themes/mobile/mozapps/plugins/contentPluginDisabled.png b/toolkit/themes/mobile/mozapps/plugins/contentPluginDisabled.png
deleted file mode 100644
index b8b6a10205..0000000000
--- a/toolkit/themes/mobile/mozapps/plugins/contentPluginDisabled.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/themes/mobile/mozapps/plugins/contentPluginStripe.png b/toolkit/themes/mobile/mozapps/plugins/contentPluginStripe.png
deleted file mode 100644
index 6035ee1215..0000000000
--- a/toolkit/themes/mobile/mozapps/plugins/contentPluginStripe.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/themes/mobile/mozapps/plugins/pluginProblem.css b/toolkit/themes/mobile/mozapps/plugins/pluginProblem.css
deleted file mode 100644
index e436b96cf1..0000000000
--- a/toolkit/themes/mobile/mozapps/plugins/pluginProblem.css
+++ /dev/null
@@ -1,196 +0,0 @@
-/* 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/. */
-
-@namespace html url(http://www.w3.org/1999/xhtml);
-
-/* These styles affect only the bound element, not other page content. */
-/* Keep any changes to these styles in sync with plugin-doorhanger.inc.css */
-.mainBox {
- font: message-box;
- font-size: 12px;
- text-align: center;
- display: table;
- width: 100%;
- height: 100%;
- background-color: rgb(72,72,72);
- color: white;
- -moz-user-select: none;
-}
-
-.hoverBox {
- display: table-cell;
- box-sizing: border-box;
- padding: 5px;
- vertical-align: middle;
- width: 100%;
- height: 100%;
-}
-:-moz-handler-vulnerable-updatable .hoverBox:active,
-:-moz-handler-vulnerable-no-update .hoverBox:active,
-:-moz-handler-clicktoplay .hoverBox:active {
- background-color: rgb(65, 65, 65);
-}
-
-:-moz-handler-clicktoplay .hoverBox:active .msgTapToPlay,
-:-moz-handler-clicktoplay .hoverBox:active .msgClickToPlay,
-:-moz-handler-vulnerable-updatable .hoverBox:active .msgTapToPlay,
-:-moz-handler-vulnerable-updatable .hoverBox:active .msgClickToPlay,
-:-moz-handler-vulnerable-no-update .hoverBox:active .msgTapToPlay,
-:-moz-handler-vulnerable-no-update .hoverBox:active .msgClickToPlay {
- color: red;
-}
-
-:-moz-handler-vulnerable-updatable .hoverBox,
-:-moz-handler-vulnerable-no-update .hoverBox,
-:-moz-handler-blocked .hoverBox,
-:-moz-handler-crashed .hoverBox {
- background-image: url(chrome://mozapps/skin/plugins/contentPluginStripe.png);
-}
-
-html|a {
- color: white;
-}
-
-.icon {
- width: 48px;
- height: 48px;
- background-position: center;
- background-repeat: no-repeat;
- border: none;
- background-color: transparent;
- -moz-user-focus: ignore;
- margin-bottom: 6px;
-}
-
-:-moz-handler-vulnerable-updatable .icon,
-:-moz-handler-vulnerable-no-update .icon {
- background-image: url(chrome://mozapps/skin/plugins/contentPluginBlocked.png);
- -moz-user-focus: normal;
-}
-:-moz-handler-blocked .icon {
- background-image: url(chrome://mozapps/skin/plugins/contentPluginBlocked.png);
-}
-:-moz-handler-clicktoplay .icon {
- background-image: url(chrome://mozapps/skin/plugins/contentPluginActivate.png);
- -moz-user-focus: normal;
-}
-:-moz-handler-crashed .icon {
- background-image: url(chrome://mozapps/skin/plugins/contentPluginCrashed.png);
-}
-
-.throbber {
- padding-left: 16px; /* width of the background image */
- background: url(chrome://global/skin/icons/loading.png) no-repeat;
- margin-left: 5px;
-}
-
-.msgTapToPlay,
-.msgClickToPlay {
- text-decoration: underline;
-}
-
-@media not all and (-moz-touch-enabled) {
- :-moz-handler-clicktoplay .msgTapToPlay {
- display: none;
- }
-}
-
-@media (-moz-touch-enabled) {
- :-moz-handler-clicktoplay .msgClickToPlay {
- display: none;
- }
-}
-
-.submitStatus div {
- min-height: 19px; /* height of biggest line (with throbber) */
-}
-
-.submitComment {
- width: 340px;
- height: 70px;
- padding: 5px;
- border: none;
- border-radius: 5px;
- resize: none;
- font-family: inherit;
- font-size: inherit;
-}
-
-.submitURLOptInBox {
- text-align: start;
-}
-
-.submitURLOptIn {
- margin-left: -1px;
-}
-
-.mainBox[chromedir="rtl"] .submitURLOptIn {
- margin-left: 0;
- margin-right: -1px;
-}
-
-.submitButtonBox {
- margin-top: 7px;
-}
-
-.submitButton {
- float: right;
-}
-
-.mainBox[chromedir="rtl"] .submitButton {
- float: left;
-}
-
-.helpIcon {
- display: inline-block;
- min-width: 16px;
- min-height: 16px;
- background: url(chrome://mozapps/skin/plugins/pluginHelp-16.png) no-repeat;
- cursor: pointer;
- float: left;
-}
-
-.mainBox[chromedir="rtl"] .helpIcon {
- float: right;
-}
-
-.closeIcon {
- display: block;
- width: 16px;
- height: 16px;
- margin-top: 4px;
- margin-inline-start: -20px;
- margin-inline-end: 4px;
- border: none;
- background-color: transparent;
- background-image: url("chrome://mozapps/skin/plugins/contentPluginClose.png");
- background-repeat: no-repeat;
-}
-
-.closeIcon:hover {
- background-position: -16px 0;
-}
-
-.closeIcon:hover:active {
- background-position: -32px 0;
-}
-
-.action-link {
- display: inline-block;
- border-radius: 10px;
- background-color: rgb(35, 35, 35);
- padding: 2px 8px;
- margin-top: 7px;
- text-decoration: none;
-}
-.action-link:active {
- background-color: rgb(20, 20, 20);
-}
-
-:-moz-handler-vulnerable-updatable .action-link {
- background-color: #a81b0c;
-}
-:-moz-handler-vulnerable-updatable .action-link:active {
- background-color: #801409;
-}
diff --git a/toolkit/themes/moz.build b/toolkit/themes/moz.build
index 4031f36b8f..d063959532 100644
--- a/toolkit/themes/moz.build
+++ b/toolkit/themes/moz.build
@@ -14,7 +14,6 @@
# GNOME/Linux linux (toolkit/themes/linux)
# non-mac (toolkit/themes/shared/non-mac)
# faststripe windows + faststripe (no native theme components)
-# mobile native UIs that do not use XUL for UI
toolkit = CONFIG['MOZ_WIDGET_TOOLKIT']
if CONFIG['MOZ_PHOENIX']:
@@ -27,8 +26,6 @@ if toolkit == 'cocoa':
DIRS += ['osx']
elif toolkit in ('gtk2', 'gtk3'):
DIRS += ['linux']
-elif app == 'mobile/android':
- DIRS += ['mobile']
else:
DIRS += ['windows']
diff --git a/toolkit/themes/shared/mozapps.inc.mn b/toolkit/themes/shared/mozapps.inc.mn
index 4a6b87cc89..db744c7052 100644
--- a/toolkit/themes/shared/mozapps.inc.mn
+++ b/toolkit/themes/shared/mozapps.inc.mn
@@ -10,9 +10,7 @@
skin/classic/mozapps/formautofill/requestAutocomplete.css (../../shared/formautofill/requestAutocomplete.css)
skin/classic/mozapps/plugins/pluginProblem.css (../../shared/plugins/pluginProblem.css)
skin/classic/mozapps/aboutNetworking.css (../../shared/aboutNetworking.css)
-#ifndef ANDROID
skin/classic/mozapps/aboutProfiles.css (../../shared/aboutProfiles.css)
-#endif
skin/classic/mozapps/aboutServiceWorkers.css (../../shared/aboutServiceWorkers.css)
skin/classic/mozapps/plugins/contentPluginActivate.png (../../shared/plugins/contentPluginActivate.png)
skin/classic/mozapps/plugins/contentPluginBlocked.png (../../shared/plugins/contentPluginBlocked.png)
diff --git a/toolkit/toolkit.mozbuild b/toolkit/toolkit.mozbuild
index fcc3eb556c..b5679ca50b 100644
--- a/toolkit/toolkit.mozbuild
+++ b/toolkit/toolkit.mozbuild
@@ -85,12 +85,6 @@ DIRS += [
'/xpfe/appshell'
]
-# This needs to be built after the gfx/ directory
-# to ensure all dependencies for skia (e.g. mozalloc, xpcom)
-# have been built
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
- DIRS += ['/other-licenses/skia-npapi']
-
if CONFIG['MOZ_UNIVERSALCHARDET']:
DIRS += ['/extensions/universalchardet']
@@ -143,7 +137,7 @@ DIRS += [
if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
DIRS += ['/toolkit/system/gnome']
-if CONFIG['ENABLE_MARIONETTE'] or CONFIG['MOZ_WIDGET_TOOLKIT'] not in ('android'):
+if CONFIG['ENABLE_MARIONETTE'] or True:
DIRS += [
'/testing/firefox-ui',
'/testing/marionette',
diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
index 072bd9ff93..4ad9926a8b 100644
--- a/toolkit/xre/moz.build
+++ b/toolkit/xre/moz.build
@@ -4,15 +4,7 @@
# 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/.
-if CONFIG['OS_ARCH'] == 'WINNT':
- TEST_DIRS += ['test/win']
-
-MOCHITEST_MANIFESTS += ['test/mochitest.ini']
-BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
-
-XPIDL_SOURCES += [
- 'nsINativeAppSupport.idl',
-]
+XPIDL_SOURCES += ['nsINativeAppSupport.idl']
if CONFIG['OS_ARCH'] == 'WINNT':
XPIDL_SOURCES += [
@@ -27,9 +19,7 @@ if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
EXPORTS += ['EventTracer.h']
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
- UNIFIED_SOURCES += [
- 'nsNativeAppSupportWin.cpp',
- ]
+ UNIFIED_SOURCES += ['nsNativeAppSupportWin.cpp']
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
UNIFIED_SOURCES += [
'MacApplicationDelegate.mm',
@@ -45,29 +35,16 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit':
'UIKitDirProvider.mm',
]
elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
- UNIFIED_SOURCES += [
- 'nsNativeAppSupportUnix.cpp',
- ]
+ UNIFIED_SOURCES += ['nsNativeAppSupportUnix.cpp']
else:
- UNIFIED_SOURCES += [
- 'nsNativeAppSupportDefault.cpp',
- ]
+ UNIFIED_SOURCES += ['nsNativeAppSupportDefault.cpp']
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
- UNIFIED_SOURCES += [
- 'nsGDKErrorHandler.cpp',
- ]
+ UNIFIED_SOURCES += ['nsGDKErrorHandler.cpp']
if CONFIG['MOZ_X11']:
EXPORTS += ['nsX11ErrorHandler.h']
- UNIFIED_SOURCES += [
- 'nsX11ErrorHandler.cpp',
- ]
-
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
- UNIFIED_SOURCES += [
- 'nsAndroidStartup.cpp',
- ]
+ UNIFIED_SOURCES += ['nsX11ErrorHandler.cpp']
UNIFIED_SOURCES += [
'CreateAppData.cpp',
@@ -97,10 +74,10 @@ if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
]
if CONFIG['MOZ_UPDATER']:
- if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
- UNIFIED_SOURCES += [
- 'nsUpdateDriver.cpp',
- ]
+ DEFINES['MOZ_UPDATER'] = True
+ UNIFIED_SOURCES += [
+ 'nsUpdateDriver.cpp',
+ ]
include('/ipc/chromium/chromium-config.mozbuild')
@@ -109,21 +86,18 @@ FINAL_LIBRARY = 'xul'
if CONFIG['MOZ_GL_DEFAULT_PROVIDER'] == 'GLX':
DEFINES['USE_GLX_TEST'] = True
-for var in ('MOZ_APP_NAME', 'MOZ_APP_BASENAME', 'MOZ_APP_VERSION', 'OS_TARGET',
+for var in ('MOZ_APP_NAME',
+ 'MOZ_APP_BASENAME',
+ 'MOZ_APP_VERSION',
+ 'OS_TARGET',
'MOZ_WIDGET_TOOLKIT'):
DEFINES[var] = '"%s"' % CONFIG[var]
-if CONFIG['MOZ_UPDATER'] and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
- DEFINES['MOZ_UPDATER'] = True
-
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
DEFINES['WIN32_LEAN_AND_MEAN'] = True
DEFINES['UNICODE'] = True
DEFINES['_UNICODE'] = True
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
- DEFINES['ANDROID_PACKAGE_NAME'] = '"%s"' % CONFIG['ANDROID_PACKAGE_NAME']
-
if CONFIG['TARGET_XPCOM_ABI']:
DEFINES['TARGET_OS_ABI'] = '"%s_%s"' % (CONFIG['OS_TARGET'],
CONFIG['TARGET_XPCOM_ABI'])
@@ -167,9 +141,7 @@ if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
DEFINES['TOPOBJDIR'] = TOPOBJDIR
-FINAL_TARGET_PP_FILES += [
- 'platform.ini'
-]
+FINAL_TARGET_PP_FILES += ['platform.ini']
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wno-error=shadow']
diff --git a/toolkit/xre/nsAndroidStartup.cpp b/toolkit/xre/nsAndroidStartup.cpp
deleted file mode 100644
index 68ad75c014..0000000000
--- a/toolkit/xre/nsAndroidStartup.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include <android/log.h>
-
-#include <jni.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <pthread.h>
-
-#include "mozilla/jni/Utils.h"
-#include "nsTArray.h"
-#include "nsString.h"
-#include "nsIFile.h"
-#include "nsAppRunner.h"
-#include "APKOpen.h"
-
-#define LOG(args...) __android_log_print(ANDROID_LOG_INFO, MOZ_APP_NAME, args)
-
-extern "C" NS_EXPORT void
-GeckoStart(JNIEnv* env, char* data, const nsXREAppData* appData)
-{
- mozilla::jni::SetGeckoThreadEnv(env);
-
- if (!data) {
- LOG("Failed to get arguments for GeckoStart\n");
- return;
- }
-
- nsTArray<char *> targs;
- char *arg = strtok(data, " ");
- while (arg) {
- targs.AppendElement(arg);
- arg = strtok(nullptr, " ");
- }
- targs.AppendElement(static_cast<char *>(nullptr));
-
- int result = XRE_main(targs.Length() - 1, targs.Elements(), appData, 0);
-
- if (result)
- LOG("XRE_main returned %d", result);
-}
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
index d8f95c2a81..55072c474a 100644
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -23,7 +23,7 @@
#include "nsAppRunner.h"
#include "mozilla/AppData.h"
-#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
+#ifdef MOZ_UPDATER
#include "nsUpdateDriver.h"
#endif
#include "ProfileReset.h"
@@ -186,10 +186,6 @@
#include "base/command_line.h"
#include "GTestRunner.h"
-#ifdef MOZ_WIDGET_ANDROID
-#include "GeneratedJNIWrappers.h"
-#endif
-
extern uint32_t gRestartMode;
extern void InstallSignalHandlers(const char *ProgramName);
@@ -1517,9 +1513,6 @@ static nsresult LaunchChild(nsINativeAppSupport* aNative,
SaveToEnv("MOZ_LAUNCHED_CHILD=1");
-#if defined(MOZ_WIDGET_ANDROID)
- java::GeckoAppShell::ScheduleRestart();
-#else
#if defined(XP_MACOSX)
CommandLineServiceMac::SetupMacCommandLine(gRestartArgc, gRestartArgv, true);
LaunchChildMac(gRestartArgc, gRestartArgv);
@@ -1559,7 +1552,6 @@ static nsresult LaunchChild(nsINativeAppSupport* aNative,
#endif // XP_UNIX
#endif // WP_WIN
#endif // WP_MACOSX
-#endif // MOZ_WIDGET_ANDROID
return NS_ERROR_LAUNCHED_CHILD_PROCESS;
}
@@ -1653,10 +1645,7 @@ ProfileLockedDialog(nsIFile* aProfileDir, nsIFile* aProfileLocalDir,
if (aUnlocker) {
int32_t button;
-#ifdef MOZ_WIDGET_ANDROID
- java::GeckoAppShell::KillAnyZombies();
- button = 0;
-#else
+
const uint32_t flags =
(nsIPromptService::BUTTON_TITLE_IS_STRING *
nsIPromptService::BUTTON_POS_0) +
@@ -1668,7 +1657,6 @@ ProfileLockedDialog(nsIFile* aProfileDir, nsIFile* aProfileLocalDir,
killTitle, nullptr, nullptr, nullptr,
&checkState, &button);
NS_ENSURE_SUCCESS_LOG(rv, rv);
-#endif
if (button == 0) {
rv = aUnlocker->Unlock(nsIProfileUnlocker::FORCE_QUIT);
@@ -1682,15 +1670,8 @@ ProfileLockedDialog(nsIFile* aProfileDir, nsIFile* aProfileLocalDir,
return LaunchChild(aNative);
}
} else {
-#ifdef MOZ_WIDGET_ANDROID
- if (java::GeckoAppShell::UnlockProfile()) {
- return NS_LockProfilePath(aProfileDir, aProfileLocalDir,
- nullptr, aResult);
- }
-#else
rv = ps->Alert(nullptr, killTitle, killMessage);
NS_ENSURE_SUCCESS_LOG(rv, rv);
-#endif
}
return NS_ERROR_ABORT;
@@ -2800,19 +2781,26 @@ XREMain::XRE_mainInit(bool* aExitFlag)
#endif
SetupErrorHandling(gArgv[0]);
-
- // Set up environment for NSS DBM database
+ // Set up environment for NSS database choice
+#ifndef NSS_DISABLE_DBM
// Allow iteration counts in DBM mode
SaveToEnv("NSS_ALLOW_LEGACY_DBM_ITERATION_COUNT=1");
- // Set default Master Password rounds to a sane value for DBM which is slower
- // than SQL for PBKDF. The NSS hard-coded default of 10,000 is too much.
- // See also Bug 1606992 for perf issues.
+#endif
+
#ifdef DEBUG
+ // Reduce the number of rounds for debug builds for perf/test reasons.
SaveToEnv("NSS_MAX_MP_PBE_ITERATION_COUNT=15");
#else
+#ifdef MOZ_SECURITY_SQLSTORE
+ // We're using SQL; NSS's defaults for rounds are fine.
+#else
+ // Set default Master Password rounds to a sane value for DBM which is slower
+ // than SQL for PBKDF. The NSS hard-coded default of 10,000 is too much.
+ // See also Bug 1606992 for perf issues.
SaveToEnv("NSS_MAX_MP_PBE_ITERATION_COUNT=500");
#endif
+#endif
#ifdef CAIRO_HAS_DWRITE_FONT
{
@@ -3409,7 +3397,7 @@ XREMain::XRE_mainStartup(bool* aExitFlag)
}
#endif
-#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
+#ifdef MOZ_UPDATER
// Check for and process any available updates
nsCOMPtr<nsIFile> updRoot;
bool persistent;
diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp
index 52b4437703..f0a8d9cab4 100644
--- a/toolkit/xre/nsEmbedFunctions.cpp
+++ b/toolkit/xre/nsEmbedFunctions.cpp
@@ -246,17 +246,9 @@ XRE_InitChildProcess(int aArgc,
NS_ENSURE_ARG_POINTER(aArgv[0]);
MOZ_ASSERT(aChildData);
-#if !defined(MOZ_WIDGET_ANDROID)
// On non-Fennec Gecko, the GMPLoader code resides in plugin-container,
// and we must forward it through to the GMP code here.
GMPProcessChild::SetGMPLoader(aChildData->gmpLoader.get());
-#else
- // On Fennec, the GMPLoader's code resides inside XUL (because for the time
- // being GMPLoader relies upon NSPR, which we can't use in plugin-container
- // on Android), so we create it here inside XUL and pass it to the GMP code.
- UniquePtr<GMPLoader> loader = CreateGMPLoader(nullptr);
- GMPProcessChild::SetGMPLoader(loader.get());
-#endif
#if defined(XP_WIN)
// From the --attach-console support in nsNativeAppSupportWin.cpp, but
diff --git a/toolkit/xre/nsSigHandlers.cpp b/toolkit/xre/nsSigHandlers.cpp
index 660af4522b..11648e45ac 100644
--- a/toolkit/xre/nsSigHandlers.cpp
+++ b/toolkit/xre/nsSigHandlers.cpp
@@ -27,9 +27,7 @@
#include <unistd.h>
#include <stdlib.h> // atoi
#include <sys/prctl.h>
-#ifndef ANDROID // no Android impl
-# include <ucontext.h>
-#endif
+#include <ucontext.h>
#endif
#ifdef XP_SOLARIS
@@ -172,7 +170,7 @@ static void fpehandler(int signum, siginfo_t *si, void *context)
*mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */
#endif
#endif
-#if defined(LINUX) && !defined(ANDROID)
+#if defined(LINUX)
ucontext_t *uc = (ucontext_t *)context;
#if defined(__i386__)
diff --git a/toolkit/xre/nsUpdateDriver.cpp b/toolkit/xre/nsUpdateDriver.cpp
index be11fb158a..4994458852 100644
--- a/toolkit/xre/nsUpdateDriver.cpp
+++ b/toolkit/xre/nsUpdateDriver.cpp
@@ -333,7 +333,7 @@ CopyUpdaterIntoUpdateDir(nsIFile *greDir, nsIFile *appDir, nsIFile *updateDir,
return false;
CopyFileIntoUpdateDir(appDir, NS_LITERAL_CSTRING(UPDATER_INI), updateDir);
#endif
-#if defined(XP_UNIX) && !defined(XP_MACOSX) && !defined(ANDROID)
+#if defined(XP_UNIX) && !defined(XP_MACOSX)
nsCOMPtr<nsIFile> iconDir;
appDir->Clone(getter_AddRefs(iconDir));
iconDir->AppendNative(NS_LITERAL_CSTRING("icons"));
diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
index 2656524775..151eb34e53 100644
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
@@ -1340,10 +1340,6 @@ nsXREDirProvider::GetUserDataDirectoryHome(nsIFile** aFile, bool aLocal)
if (!homeDir || !*homeDir)
return NS_ERROR_FAILURE;
-#ifdef ANDROID /* We want (ProfD == ProfLD) on Android. */
- aLocal = false;
-#endif
-
if (aLocal) {
// If $XDG_CACHE_HOME is defined use it, otherwise use $HOME/.cache.
const char* cacheHome = getenv("XDG_CACHE_HOME");
@@ -1550,15 +1546,6 @@ nsXREDirProvider::AppendProfilePath(nsIFile* aFile,
}
NS_ENSURE_SUCCESS(rv, rv);
-#elif defined(ANDROID)
- // The directory used for storing profiles
- // The parent of this directory is set in GetUserDataDirectoryHome
- // XXX: handle gAppData->profile properly
- // XXXsmaug ...and the rest of the profile creation!
- MOZ_ASSERT(!aAppName,
- "Profile creation for external applications is not implemented!");
- rv = aFile->AppendNative(nsDependentCString("mozilla"));
- NS_ENSURE_SUCCESS(rv, rv);
#elif defined(XP_UNIX)
nsAutoCString folder;
// Make it hidden (by starting with "."), except when local (the
diff --git a/toolkit/xre/test/.eslintrc.js b/toolkit/xre/test/.eslintrc.js
deleted file mode 100644
index e3134a291c..0000000000
--- a/toolkit/xre/test/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
- "extends": [
- "../../../testing/mochitest/mochitest.eslintrc.js"
- ]
-};
diff --git a/toolkit/xre/test/browser.ini b/toolkit/xre/test/browser.ini
deleted file mode 100644
index deadebc46d..0000000000
--- a/toolkit/xre/test/browser.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[DEFAULT]
-
-[browser_checkdllblockliststate.js]
-skip-if = os != "win"
diff --git a/toolkit/xre/test/browser_checkdllblockliststate.js b/toolkit/xre/test/browser_checkdllblockliststate.js
deleted file mode 100644
index 6b989c3705..0000000000
--- a/toolkit/xre/test/browser_checkdllblockliststate.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// Any copyright is dedicated to the Public Domain.
-// http://creativecommons.org/publicdomain/zero/1.0/
-
-// Tests that the dll blocklist initializes correctly during test runs.
-add_task(function* test() {
- yield BrowserTestUtils.withNewTab({gBrowser, url: "about:blank" }, function* (browser) {
- ok(Components.classes["@mozilla.org/xre/app-info;1"]
- .getService(Ci.nsIXULRuntime)
- .windowsDLLBlocklistStatus,
- "Windows dll blocklist status should be true, indicating it is " +
- "running properly. A failure in this test is considered a " +
- "release blocker.");
- });
-});
-
-
diff --git a/toolkit/xre/test/mochitest.ini b/toolkit/xre/test/mochitest.ini
deleted file mode 100644
index ccbb08ed97..0000000000
--- a/toolkit/xre/test/mochitest.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[DEFAULT]
-
-[test_fpuhandler.html]
diff --git a/toolkit/xre/test/test_fpuhandler.html b/toolkit/xre/test/test_fpuhandler.html
deleted file mode 100644
index afe70ee64f..0000000000
--- a/toolkit/xre/test/test_fpuhandler.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<head>
- <title>Floating-point exception handler test</title>
- <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-
-<body onload="runTest()">
- <embed id="plugin1" type="application/x-test" width="400" height="400"></embed>
-
- <script class="testbody" type="application/javascript">
- SimpleTest.waitForExplicitFinish();
-
- function doDiv(x, y) {
- var z;
- z = x / y;
-
- for (i = 0 + x; i < 1000; ++i)
- z = y / x;
-
- z = x / y;
- return z;
- }
-
- function runTest()
- {
- ok(isNaN(doDiv(0.0, 0.0)), "Undefined division-by-zero doesn't crash");
-
- try {
- document.getElementById('plugin1').enableFPExceptions();
- }
- catch (e) {
- ok(true, "No special code to set the FPU bit in the testplugin.");
- SimpleTest.finish();
- return;
- }
-
- ok(isNaN(doDiv(0.0, 0.0)), "Undefined division-by-zero doesn't crash again.");
- SimpleTest.finish();
- }
- </script>
diff --git a/toolkit/xre/test/win/Makefile.in b/toolkit/xre/test/win/Makefile.in
deleted file mode 100644
index 331a8a4fdc..0000000000
--- a/toolkit/xre/test/win/Makefile.in
+++ /dev/null
@@ -1,14 +0,0 @@
-# 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/.
-
-MOZ_WINCONSOLE = 1
-
-include $(topsrcdir)/config/rules.mk
-
-libs:: TestXREMakeCommandLineWin.ini
- $(INSTALL) $^ $(FINAL_TARGET)/
-
-check::
- @echo 'Running TestXREMakeCommandLineWin tests'
- @$(RUN_TEST_PROGRAM) $(FINAL_TARGET)/TestXREMakeCommandLineWin.exe
diff --git a/toolkit/xre/test/win/TestDllInterceptor.cpp b/toolkit/xre/test/win/TestDllInterceptor.cpp
deleted file mode 100644
index 57d68ea779..0000000000
--- a/toolkit/xre/test/win/TestDllInterceptor.cpp
+++ /dev/null
@@ -1,232 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include <shlobj.h>
-#include <stdio.h>
-
-#include "mozilla/WindowsVersion.h"
-#include "nsWindowsDllInterceptor.h"
-#include "nsWindowsHelpers.h"
-
-using namespace mozilla;
-
-struct payload {
- UINT64 a;
- UINT64 b;
- UINT64 c;
-
- bool operator==(const payload &other) const {
- return (a == other.a &&
- b == other.b &&
- c == other.c);
- }
-};
-
-extern "C" __declspec(dllexport) __declspec(noinline) payload rotatePayload(payload p) {
- UINT64 tmp = p.a;
- p.a = p.b;
- p.b = p.c;
- p.c = tmp;
- return p;
-}
-
-static bool patched_func_called = false;
-
-static payload (*orig_rotatePayload)(payload);
-
-static payload
-patched_rotatePayload(payload p)
-{
- patched_func_called = true;
- return orig_rotatePayload(p);
-}
-
-bool TestHook(const char *dll, const char *func)
-{
- void *orig_func;
- bool successful = false;
- {
- WindowsDllInterceptor TestIntercept;
- TestIntercept.Init(dll);
- successful = TestIntercept.AddHook(func, 0, &orig_func);
- }
-
- if (successful) {
- printf("TEST-PASS | WindowsDllInterceptor | Could hook %s from %s\n", func, dll);
- return true;
- } else {
- printf("TEST-UNEXPECTED-FAIL | WindowsDllInterceptor | Failed to hook %s from %s\n", func, dll);
- return false;
- }
-}
-
-bool TestDetour(const char *dll, const char *func)
-{
- void *orig_func;
- bool successful = false;
- {
- WindowsDllInterceptor TestIntercept;
- TestIntercept.Init(dll);
- successful = TestIntercept.AddDetour(func, 0, &orig_func);
- }
-
- if (successful) {
- printf("TEST-PASS | WindowsDllInterceptor | Could detour %s from %s\n", func, dll);
- return true;
- } else {
- printf("TEST-UNEXPECTED-FAIL | WindowsDllInterceptor | Failed to detour %s from %s\n", func, dll);
- return false;
- }
-}
-
-bool MaybeTestHook(const bool cond, const char* dll, const char* func)
-{
- if (!cond) {
- return true;
- }
-
- return TestHook(dll, func);
-}
-
-bool ShouldTestTipTsf()
-{
-#if defined(_M_X64)
- return false;
-#else
- if (!IsWin8OrLater()) {
- return false;
- }
-
- nsModuleHandle shell32(LoadLibraryW(L"shell32.dll"));
- if (!shell32) {
- return true;
- }
-
- auto pSHGetKnownFolderPath = reinterpret_cast<decltype(&SHGetKnownFolderPath)>(GetProcAddress(shell32, "SHGetKnownFolderPath"));
- if (!pSHGetKnownFolderPath) {
- return true;
- }
-
- PWSTR commonFilesPath = nullptr;
- if (FAILED(pSHGetKnownFolderPath(FOLDERID_ProgramFilesCommon, 0, nullptr,
- &commonFilesPath))) {
- return true;
- }
-
- wchar_t fullPath[MAX_PATH + 1] = {};
- wcscpy(fullPath, commonFilesPath);
- wcscat(fullPath, L"\\Microsoft Shared\\Ink\\tiptsf.dll");
- CoTaskMemFree(commonFilesPath);
-
- if (!LoadLibraryW(fullPath)) {
- return false;
- }
-
- // Leak the module so that it's loaded for the interceptor test
- return true;
-#endif
-}
-
-int main()
-{
- payload initial = { 0x12345678, 0xfc4e9d31, 0x87654321 };
- payload p0, p1;
- ZeroMemory(&p0, sizeof(p0));
- ZeroMemory(&p1, sizeof(p1));
-
- p0 = rotatePayload(initial);
-
- {
- WindowsDllInterceptor ExeIntercept;
- ExeIntercept.Init("TestDllInterceptor.exe");
- if (ExeIntercept.AddHook("rotatePayload", reinterpret_cast<intptr_t>(patched_rotatePayload), (void**) &orig_rotatePayload)) {
- printf("TEST-PASS | WindowsDllInterceptor | Hook added\n");
- } else {
- printf("TEST-UNEXPECTED-FAIL | WindowsDllInterceptor | Failed to add hook\n");
- return 1;
- }
-
- p1 = rotatePayload(initial);
-
- if (patched_func_called) {
- printf("TEST-PASS | WindowsDllInterceptor | Hook called\n");
- } else {
- printf("TEST-UNEXPECTED-FAIL | WindowsDllInterceptor | Hook was not called\n");
- return 1;
- }
-
- if (p0 == p1) {
- printf("TEST-PASS | WindowsDllInterceptor | Hook works properly\n");
- } else {
- printf("TEST-UNEXPECTED-FAIL | WindowsDllInterceptor | Hook didn't return the right information\n");
- return 1;
- }
- }
-
- patched_func_called = false;
- ZeroMemory(&p1, sizeof(p1));
-
- p1 = rotatePayload(initial);
-
- if (!patched_func_called) {
- printf("TEST-PASS | WindowsDllInterceptor | Hook was not called after unregistration\n");
- } else {
- printf("TEST-UNEXPECTED-FAIL | WindowsDllInterceptor | Hook was still called after unregistration\n");
- return 1;
- }
-
- if (p0 == p1) {
- printf("TEST-PASS | WindowsDllInterceptor | Original function worked properly\n");
- } else {
- printf("TEST-UNEXPECTED-FAIL | WindowsDllInterceptor | Original function didn't return the right information\n");
- return 1;
- }
-
- if (TestHook("user32.dll", "GetWindowInfo") &&
-#ifdef _WIN64
- TestHook("user32.dll", "SetWindowLongPtrA") &&
- TestHook("user32.dll", "SetWindowLongPtrW") &&
-#else
- TestHook("user32.dll", "SetWindowLongA") &&
- TestHook("user32.dll", "SetWindowLongW") &&
-#endif
- TestHook("user32.dll", "TrackPopupMenu") &&
-#ifdef _M_IX86
- // We keep this test to hook complex code on x86. (Bug 850957)
- TestHook("ntdll.dll", "NtFlushBuffersFile") &&
-#endif
- TestHook("ntdll.dll", "NtCreateFile") &&
- TestHook("ntdll.dll", "NtReadFile") &&
- TestHook("ntdll.dll", "NtReadFileScatter") &&
- TestHook("ntdll.dll", "NtWriteFile") &&
- TestHook("ntdll.dll", "NtWriteFileGather") &&
- TestHook("ntdll.dll", "NtQueryFullAttributesFile") &&
- // Bug 733892: toolkit/crashreporter/nsExceptionHandler.cpp
- TestHook("kernel32.dll", "SetUnhandledExceptionFilter") &&
-#ifdef _M_IX86
- // Bug 670967: xpcom/base/AvailableMemoryTracker.cpp
- TestHook("kernel32.dll", "VirtualAlloc") &&
- TestHook("kernel32.dll", "MapViewOfFile") &&
- TestHook("gdi32.dll", "CreateDIBSection") &&
- TestHook("kernel32.dll", "CreateFileW") &&
-#endif
- TestDetour("user32.dll", "CreateWindowExW") &&
- TestHook("user32.dll", "InSendMessageEx") &&
- TestHook("imm32.dll", "ImmGetContext") &&
- TestHook("imm32.dll", "ImmGetCompositionStringW") &&
- TestHook("imm32.dll", "ImmSetCandidateWindow") &&
-#ifdef _M_X64
- TestHook("user32.dll", "GetKeyState") &&
-#endif
- MaybeTestHook(ShouldTestTipTsf(), "tiptsf.dll", "ProcessCaretEvents") &&
-#ifdef _M_IX86
- TestHook("user32.dll", "SendMessageTimeoutW") &&
-#endif
- TestDetour("ntdll.dll", "LdrLoadDll")) {
- printf("TEST-PASS | WindowsDllInterceptor | all checks passed\n");
- return 0;
- }
-
- return 1;
-}
diff --git a/toolkit/xre/test/win/TestXREMakeCommandLineWin.cpp b/toolkit/xre/test/win/TestXREMakeCommandLineWin.cpp
deleted file mode 100644
index 00d786aa2b..0000000000
--- a/toolkit/xre/test/win/TestXREMakeCommandLineWin.cpp
+++ /dev/null
@@ -1,265 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <windows.h>
-// Support for _setmode
-#include <fcntl.h>
-#include <io.h>
-
-#include "nsWindowsRestart.cpp"
-
-// CommandLineToArgvW may return different values for argv[0] since it contains
-// the path to the binary that was executed so we prepend an argument that is
-// quoted with a space to prevent argv[1] being appended to argv[0].
-#define DUMMY_ARG1 L"\"arg 1\" "
-
-#ifndef MAXPATHLEN
-# ifdef PATH_MAX
-# define MAXPATHLEN PATH_MAX
-# elif defined(MAX_PATH)
-# define MAXPATHLEN MAX_PATH
-# elif defined(_MAX_PATH)
-# define MAXPATHLEN _MAX_PATH
-# elif defined(CCHMAXPATH)
-# define MAXPATHLEN CCHMAXPATH
-# else
-# define MAXPATHLEN 1024
-# endif
-#endif
-
-#define TEST_NAME L"XRE MakeCommandLine"
-#define MAX_TESTS 100
-
-// Verbose output can be enabled by defining VERBOSE 1
-#define VERBOSE 0
-
-// Compares compareCmdLine with the output of MakeCommandLine. This is
-// accomplished by converting inCmdLine to an argument list with
-// CommandLineToArgvW and converting it back to a command line with
-// MakeCommandLine.
-static int
-verifyCmdLineCreation(wchar_t *inCmdLine,
- wchar_t *compareCmdLine,
- bool passes, int testNum)
-{
- int rv = 0;
- int i;
- int inArgc;
- int outArgc;
- bool isEqual;
-
- // When debugging with command lines containing Unicode characters greater
- // than 255 you can set the mode for stdout to Unicode so the console will
- // receive the correct characters though it won't display them properly unless
- // the console's font has been set to one that can display the characters. You
- // can also redirect the console output to a file that has been saved as Unicode
- // to view the characters.
-// _setmode(_fileno(stdout), _O_WTEXT);
-
- // Prepend an additional argument to the command line. CommandLineToArgvW
- // handles argv[0] differently than other arguments since argv[0] is the path
- // to the binary being executed and MakeCommandLine only handles argv[1] and
- // larger.
- wchar_t *inCmdLineNew = (wchar_t *) malloc((wcslen(DUMMY_ARG1) + wcslen(inCmdLine) + 1) * sizeof(wchar_t));
- wcscpy(inCmdLineNew, DUMMY_ARG1);
- wcscat(inCmdLineNew, inCmdLine);
- LPWSTR *inArgv = CommandLineToArgvW(inCmdLineNew, &inArgc);
-
- wchar_t *outCmdLine = MakeCommandLine(inArgc - 1, inArgv + 1);
- wchar_t *outCmdLineNew = (wchar_t *) malloc((wcslen(DUMMY_ARG1) + wcslen(outCmdLine) + 1) * sizeof(wchar_t));
- wcscpy(outCmdLineNew, DUMMY_ARG1);
- wcscat(outCmdLineNew, outCmdLine);
- LPWSTR *outArgv = CommandLineToArgvW(outCmdLineNew, &outArgc);
-
- if (VERBOSE) {
- wprintf(L"\n");
- wprintf(L"Verbose Output\n");
- wprintf(L"--------------\n");
- wprintf(L"Input command line : >%s<\n", inCmdLine);
- wprintf(L"MakeComandLine output: >%s<\n", outCmdLine);
- wprintf(L"Expected command line: >%s<\n", compareCmdLine);
-
- wprintf(L"input argc : %d\n", inArgc - 1);
- wprintf(L"output argc: %d\n", outArgc - 1);
-
- for (i = 1; i < inArgc; ++i) {
- wprintf(L"input argv[%d] : >%s<\n", i - 1, inArgv[i]);
- }
-
- for (i = 1; i < outArgc; ++i) {
- wprintf(L"output argv[%d]: >%s<\n", i - 1, outArgv[i]);
- }
- wprintf(L"\n");
- }
-
- isEqual = (inArgc == outArgc);
- if (!isEqual) {
- wprintf(L"TEST-%s-FAIL | %s | ARGC Comparison (check %2d)\n",
- passes ? L"UNEXPECTED" : L"KNOWN", TEST_NAME, testNum);
- if (passes) {
- rv = 1;
- }
- LocalFree(inArgv);
- LocalFree(outArgv);
- free(inCmdLineNew);
- free(outCmdLineNew);
- free(outCmdLine);
- return rv;
- }
-
- for (i = 1; i < inArgc; ++i) {
- isEqual = (wcscmp(inArgv[i], outArgv[i]) == 0);
- if (!isEqual) {
- wprintf(L"TEST-%s-FAIL | %s | ARGV Comparison (check %2d)\n",
- passes ? L"UNEXPECTED" : L"KNOWN", TEST_NAME, testNum);
- if (passes) {
- rv = 1;
- }
- LocalFree(inArgv);
- LocalFree(outArgv);
- free(inCmdLineNew);
- free(outCmdLineNew);
- free(outCmdLine);
- return rv;
- }
- }
-
- isEqual = (wcscmp(outCmdLine, compareCmdLine) == 0);
- if (!isEqual) {
- wprintf(L"TEST-%s-FAIL | %s | Command Line Comparison (check %2d)\n",
- passes ? L"UNEXPECTED" : L"KNOWN", TEST_NAME, testNum);
- if (passes) {
- rv = 1;
- }
- LocalFree(inArgv);
- LocalFree(outArgv);
- free(inCmdLineNew);
- free(outCmdLineNew);
- free(outCmdLine);
- return rv;
- }
-
- if (rv == 0) {
- if (passes) {
- wprintf(L"TEST-PASS | %s | check %2d\n", TEST_NAME, testNum);
- } else {
- wprintf(L"TEST-UNEXPECTED-PASS | %s | check %2d\n", TEST_NAME, testNum);
- rv = 1;
- }
- }
-
- LocalFree(inArgv);
- LocalFree(outArgv);
- free(inCmdLineNew);
- free(outCmdLineNew);
- free(outCmdLine);
- return rv;
-}
-
-int wmain(int argc, wchar_t *argv[])
-{
- int i;
- int rv = 0;
-
- if (argc > 1 && (_wcsicmp(argv[1], L"-check-one") != 0 || argc != 3)) {
- fwprintf(stderr, L"Displays and validates output from MakeCommandLine.\n\n");
- fwprintf(stderr, L"Usage: %s -check-one <test number>\n\n", argv[0]);
- fwprintf(stderr, L" <test number>\tSpecifies the test number to run from the\n");
- fwprintf(stderr, L"\t\tTestXREMakeCommandLineWin.ini file.\n");
- return 255;
- }
-
- wchar_t inifile[MAXPATHLEN];
- if (!::GetModuleFileNameW(0, inifile, MAXPATHLEN)) {
- wprintf(L"TEST-UNEXPECTED-FAIL | %s | GetModuleFileNameW\n", TEST_NAME);
- return 2;
- }
-
- WCHAR *slash = wcsrchr(inifile, '\\');
- if (!slash) {
- wprintf(L"TEST-UNEXPECTED-FAIL | %s | wcsrchr\n", TEST_NAME);
- return 3;
- }
-
- wcscpy(slash + 1, L"TestXREMakeCommandLineWin.ini\0");
-
- for (i = 0; i < MAX_TESTS; ++i) {
- wchar_t sInputVal[MAXPATHLEN];
- wchar_t sOutputVal[MAXPATHLEN];
- wchar_t sPassesVal[MAXPATHLEN];
- wchar_t sInputKey[MAXPATHLEN];
- wchar_t sOutputKey[MAXPATHLEN];
- wchar_t sPassesKey[MAXPATHLEN];
-
- if (argc > 2 && _wcsicmp(argv[1], L"-check-one") == 0 && argc == 3) {
- i = _wtoi(argv[2]);
- }
-
- _snwprintf(sInputKey, MAXPATHLEN, L"input_%d", i);
- _snwprintf(sOutputKey, MAXPATHLEN, L"output_%d", i);
- _snwprintf(sPassesKey, MAXPATHLEN, L"passes_%d", i);
-
- if (!GetPrivateProfileStringW(L"MakeCommandLineTests", sInputKey, nullptr,
- sInputVal, MAXPATHLEN, inifile)) {
- if (i == 0 || (argc > 2 && _wcsicmp(argv[1], L"-check-one") == 0)) {
- wprintf(L"TEST-UNEXPECTED-FAIL | %s | see following explanation:\n", TEST_NAME);
- wprintf(L"ERROR: Either the TestXREMakeCommandLineWin.ini file doesn't exist\n");
- if (argc > 1 && _wcsicmp(argv[1], L"-check-one") == 0 && argc == 3) {
- wprintf(L"ERROR: or the test is not defined in the MakeCommandLineTests section.\n");
- } else {
- wprintf(L"ERROR: or it has no tests defined in the MakeCommandLineTests section.\n");
- }
- wprintf(L"ERROR: File: %s\n", inifile);
- return 4;
- }
- break;
- }
-
- GetPrivateProfileStringW(L"MakeCommandLineTests", sOutputKey, nullptr,
- sOutputVal, MAXPATHLEN, inifile);
- GetPrivateProfileStringW(L"MakeCommandLineTests", sPassesKey, nullptr,
- sPassesVal, MAXPATHLEN, inifile);
-
- rv |= verifyCmdLineCreation(sInputVal, sOutputVal,
- (_wcsicmp(sPassesVal, L"false") == 0) ? FALSE : TRUE,
- i);
-
- if (argc > 2 && _wcsicmp(argv[1], L"-check-one") == 0) {
- break;
- }
- }
-
- if (rv == 0) {
- wprintf(L"TEST-PASS | %s | all checks passed\n", TEST_NAME);
- } else {
- wprintf(L"TEST-UNEXPECTED-FAIL | %s | some checks failed\n", TEST_NAME);
- }
-
- return rv;
-}
-
-#ifdef __MINGW32__
-
-/* MingW currently does not implement a wide version of the
- startup routines. Workaround is to implement something like
- it ourselves. See bug 411826 */
-
-#include <shellapi.h>
-
-int main(int argc, char **argv)
-{
- LPWSTR commandLine = GetCommandLineW();
- int argcw = 0;
- LPWSTR *argvw = CommandLineToArgvW(commandLine, &argcw);
- if (!argvw)
- return 127;
-
- int result = wmain(argcw, argvw);
- LocalFree(argvw);
- return result;
-}
-#endif /* __MINGW32__ */
diff --git a/toolkit/xre/test/win/TestXREMakeCommandLineWin.ini b/toolkit/xre/test/win/TestXREMakeCommandLineWin.ini
deleted file mode 100644
index dbb529d1b1..0000000000
--- a/toolkit/xre/test/win/TestXREMakeCommandLineWin.ini
+++ /dev/null
@@ -1,94 +0,0 @@
-; A typical MakeCommandLine test will contain an input and an output name value
-; pair. The value for input_xx is the input command line and the value for
-; output_xx is the expected output command line.
-;
-; A test that is known to fail can be added as follows. If the passes_xx name
-; value pair doesn't exist it defaults to true.
-; input_99=yabadaba
-; output_99=doo
-; passes_99=false
-;
-; If a value starts and ends with single or double quotation marks then it must
-; be enclosed in single or double quotation marks due to GetPrivateProfileString
-; discarding the outmost quotation marks. See GetPrivateProfileString on MSDN
-; for more information.
-; http://msdn.microsoft.com/en-us/library/ms724353.aspx
-
-[MakeCommandLineTests]
-input_0=a:\
-output_0=a:\
-
-input_1=""a:\""
-output_1=a:\"
-
-input_2=""a:\b c""
-output_2=""a:\b c""
-
-input_3=""a:\b c\""
-output_3=""a:\b c\"""
-
-input_4=""a:\b c\d e""
-output_4=""a:\b c\d e""
-
-input_5=""a:\b c\d e\""
-output_5=""a:\b c\d e\"""
-
-input_6=""a:\\""
-output_6=a:\
-
-input_7="a:\" "b:\c d"
-output_7=a:\" "b:\c d"
-
-input_8="a "b:\" "c:\d e""
-output_8="a "b:\" c:\d" e"
-
-input_9="abc" d e
-output_9=abc d e
-
-input_10="a b c" d e
-output_10="a b c" d e
-
-input_11=a\\\b d"e f"g h
-output_11=a\\\b "de fg" h
-
-input_12=a b
-output_12=a b
-
-input_13=""a b""
-output_13=""a b""
-
-input_14=a\\\"b c d
-output_14=a\\\"b c d
-
-input_15=a\\\"b c"
-output_15=a\\\"b c
-
-input_16=""a\\\b c"
-output_16=""a\\\b c""
-
-input_17=\"a
-output_17=\"a
-
-input_18=\\"a
-output_18=\a
-
-input_19=\\"\\\\"a
-output_19=\\\a
-
-input_20=\\"\\\\\"a
-output_20=\\\\\\\"a
-
-input_21="a\\\"b c\" d e
-output_21=""a\\\"b c\" d e""
-
-input_22=a\\\\\"b c" d e"
-output_22=a\\\\\"b "c d e"
-
-input_23=a:\b c\アルファ オメガ\d
-output_23=a:\b c\アルファ オメガ\d
-
-input_24=a:\b "c\アルファ オメガ\d"
-output_24=a:\b "c\アルファ オメガ\d"
-
-input_25=アルファ オメガ
-output_25=アルファ オメガ
diff --git a/toolkit/xre/test/win/moz.build b/toolkit/xre/test/win/moz.build
deleted file mode 100644
index 51ad0bcb37..0000000000
--- a/toolkit/xre/test/win/moz.build
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-SimplePrograms([
- 'TestXREMakeCommandLineWin',
-])
-
-CppUnitTests([
- 'TestDllInterceptor',
-])
-
-DEFINES['NS_NO_XPCOM'] = True
-
-LOCAL_INCLUDES += [
- '/config',
- '/toolkit/xre',
-]
-
-DISABLE_STL_WRAPPING = True
-USE_STATIC_LIBS = True
-
-OS_LIBS += [
- 'comctl32',
- 'ole32',
- 'shell32',
- 'ws2_32',
-]
diff --git a/widget/cocoa/nsCocoaFeatures.h b/widget/cocoa/nsCocoaFeatures.h
index 597aff611b..984dae80e1 100644
--- a/widget/cocoa/nsCocoaFeatures.h
+++ b/widget/cocoa/nsCocoaFeatures.h
@@ -21,6 +21,9 @@ public:
static bool OnYosemiteOrLater();
static bool OnElCapitanOrLater();
static bool OnSierraOrLater();
+ static bool OnHighSierraOrLater();
+ static bool OnMojaveOrLater();
+ static bool OnCatalinaOrLater();
static bool IsAtLeastVersion(int32_t aMajor, int32_t aMinor, int32_t aBugFix=0);
diff --git a/widget/cocoa/nsCocoaFeatures.mm b/widget/cocoa/nsCocoaFeatures.mm
index 5a5c16fa14..065260837c 100644
--- a/widget/cocoa/nsCocoaFeatures.mm
+++ b/widget/cocoa/nsCocoaFeatures.mm
@@ -19,6 +19,9 @@
#define MAC_OS_X_VERSION_10_10_HEX 0x000010A0
#define MAC_OS_X_VERSION_10_11_HEX 0x000010B0
#define MAC_OS_X_VERSION_10_12_HEX 0x000010C0
+#define MAC_OS_X_VERSION_10_13_HEX 0x000010D0
+#define MAC_OS_X_VERSION_10_14_HEX 0x000010E0
+#define MAC_OS_X_VERSION_10_15_HEX 0x000010F0
#include "nsCocoaFeatures.h"
#include "nsCocoaUtils.h"
@@ -167,6 +170,24 @@ nsCocoaFeatures::OnSierraOrLater()
return (OSXVersion() >= MAC_OS_X_VERSION_10_12_HEX);
}
+/* static */ bool
+nsCocoaFeatures::OnHighSierraOrLater()
+{
+ return (OSXVersion() >= MAC_OS_X_VERSION_10_13_HEX);
+}
+
+/* static */ bool
+nsCocoaFeatures::OnMojaveOrLater()
+{
+ return (OSXVersion() >= MAC_OS_X_VERSION_10_14_HEX);
+}
+
+/* static */ bool
+nsCocoaFeatures::OnCatalinaOrLater()
+{
+ return (OSXVersion() >= MAC_OS_X_VERSION_10_15_HEX);
+}
+
/* static */ bool
nsCocoaFeatures::IsAtLeastVersion(int32_t aMajor, int32_t aMinor, int32_t aBugFix)
{
diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm
index db120fbddd..b6d94ea943 100644
--- a/widget/cocoa/nsCocoaWindow.mm
+++ b/widget/cocoa/nsCocoaWindow.mm
@@ -810,15 +810,17 @@ NS_IMETHODIMP nsCocoaWindow::Show(bool bState)
}
}
else if (mWindowType == eWindowType_popup) {
- // If a popup window is shown after being hidden, it needs to be "reset"
- // for it to receive any mouse events aside from mouse-moved events
- // (because it was removed from the "window cache" when it was hidden
- // -- see below). Setting the window number to -1 and then back to its
- // original value seems to accomplish this. The idea was "borrowed"
- // from the Java Embedding Plugin.
- NSInteger windowNumber = [mWindow windowNumber];
- [mWindow _setWindowNumber:-1];
- [mWindow _setWindowNumber:windowNumber];
+ if (!nsCocoaFeatures::OnMojaveOrLater()) {
+ // If a popup window is shown after being hidden, it needs to be "reset"
+ // for it to receive any mouse events aside from mouse-moved events
+ // (because it was removed from the "window cache" when it was hidden
+ // -- see below). Setting the window number to -1 and then back to its
+ // original value seems to accomplish this. The idea was "borrowed"
+ // from the Java Embedding Plugin. This is fixed on macOS 10.14+.
+ NSInteger windowNumber = [mWindow windowNumber];
+ [mWindow _setWindowNumber:-1];
+ [mWindow _setWindowNumber:windowNumber];
+ }
// For reasons that aren't yet clear, calls to [NSWindow orderFront:] or
// [NSWindow makeKeyAndOrderFront:] can sometimes trigger "Error (1000)
// creating CGSWindow", which in turn triggers an internal inconsistency
@@ -951,17 +953,22 @@ NS_IMETHODIMP nsCocoaWindow::Show(bool bState)
[nativeParentWindow removeChildWindow:mWindow];
[mWindow orderOut:nil];
- // Unless it's explicitly removed from NSApp's "window cache", a popup
- // window will keep receiving mouse-moved events even after it's been
- // "ordered out" (instead of the browser window that was underneath it,
- // until you click on that window). This is bmo bug 378645, but it's
- // surely an Apple bug. The "window cache" is an undocumented subsystem,
- // all of whose methods are included in the NSWindowCache category of
- // the NSApplication class (in header files generated using class-dump).
- // This workaround was "borrowed" from the Java Embedding Plugin (which
- // uses it for a different purpose).
- if (mWindowType == eWindowType_popup)
- [NSApp _removeWindowFromCache:mWindow];
+
+ if (!nsCocoaFeatures::OnMojaveOrLater()) {
+ // Unless it's explicitly removed from NSApp's "window cache", a popup
+ // window will keep receiving mouse-moved events even after it's been
+ // "ordered out" (instead of the browser window that was underneath it,
+ // until you click on that window). This is bmo bug 378645, but it's
+ // surely an Apple bug. The "window cache" is an undocumented
+ // subsystem, all of whose methods are included in the NSWindowCache
+ // category of the NSApplication class (in header files generated using
+ // class-dump). This workaround was "borrowed" from the Java Embedding
+ // Plugin (which uses it for a different purpose). This is fixed on
+ // macOS 10.14+.
+ if (mWindowType == eWindowType_popup) {
+ [NSApp _removeWindowFromCache:mWindow];
+ }
+ }
// If our popup window is a non-native context menu, tell the OS (and
// other programs) that a menu has closed.
diff --git a/xpcom/reflect/xptcall/md/unix/moz.build b/xpcom/reflect/xptcall/md/unix/moz.build
index 8ee7b31817..c5d9686080 100644
--- a/xpcom/reflect/xptcall/md/unix/moz.build
+++ b/xpcom/reflect/xptcall/md/unix/moz.build
@@ -177,7 +177,7 @@ if CONFIG['OS_ARCH'] == 'OpenBSD' and CONFIG['OS_TEST'] == 'powerpc':
'xptcstubs_ppc_openbsd.cpp',
]
-if CONFIG['OS_ARCH'] == 'Linux' and 'sparc' in CONFIG['OS_TEST']:
+if CONFIG['OS_ARCH'] == 'Linux' and CONFIG['OS_TEST'] == 'sparc':
SOURCES += [
'xptcinvoke_asm_sparc_linux_GCC3.s',
'xptcinvoke_sparc_solaris.cpp',
@@ -205,7 +205,7 @@ if CONFIG['OS_ARCH'] == 'OpenBSD' and CONFIG['OS_TEST'] == 'sparc':
# files for 64-bit SPARC with no ill effects, so basically the entire mess that
# was there before is no longer needed.
-if CONFIG['OS_ARCH'] in ('OpenBSD', 'FreeBSD', 'SunOS') and CONFIG['OS_TEST'] == 'sparc64':
+if CONFIG['OS_ARCH'] in ('OpenBSD', 'FreeBSD', 'SunOS', 'Linux') and CONFIG['OS_TEST'] == 'sparc64':
SOURCES += [
'xptcinvoke_asm_sparc64_openbsd.s',
'xptcinvoke_sparc64_openbsd.cpp',